analytica-frontend-lib 1.2.21 → 1.2.22
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/AlertManager/index.css +0 -3
- package/dist/AlertManager/index.css.map +1 -1
- package/dist/AlertManagerView/index.js +347 -159
- package/dist/AlertManagerView/index.js.map +1 -1
- package/dist/AlertManagerView/index.mjs +346 -159
- package/dist/AlertManagerView/index.mjs.map +1 -1
- package/dist/Radio/index.d.mts +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Table/index.d.mts +23 -24
- package/dist/Table/index.d.ts +23 -24
- package/dist/Table/index.js +328 -140
- package/dist/Table/index.js.map +1 -1
- package/dist/Table/index.mjs +323 -136
- package/dist/Table/index.mjs.map +1 -1
- package/dist/TableProvider/index.css +0 -3
- package/dist/TableProvider/index.css.map +1 -1
- package/dist/TableProvider/index.d.mts +1 -1
- package/dist/TableProvider/index.d.ts +1 -1
- package/dist/TableProvider/index.js +826 -629
- package/dist/TableProvider/index.js.map +1 -1
- package/dist/TableProvider/index.mjs +737 -541
- package/dist/TableProvider/index.mjs.map +1 -1
- package/dist/{TableProvider-D4Ak7ofz.d.ts → TableProvider-48a6wb7j.d.ts} +43 -4
- package/dist/{TableProvider-CDcL1tDj.d.mts → TableProvider-DyhwEkPT.d.mts} +43 -4
- package/dist/index.css +0 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +643 -598
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +601 -557
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +0 -3
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2944,7 +2944,7 @@ var Divider = ({
|
|
|
2944
2944
|
var Divider_default = Divider;
|
|
2945
2945
|
|
|
2946
2946
|
// src/components/Table/Table.tsx
|
|
2947
|
-
var
|
|
2947
|
+
var import_react16 = require("react");
|
|
2948
2948
|
var import_phosphor_react11 = require("phosphor-react");
|
|
2949
2949
|
|
|
2950
2950
|
// src/components/NoSearchResult/NoSearchResult.tsx
|
|
@@ -2976,9 +2976,161 @@ var NoSearchResult = ({ image, title, description }) => {
|
|
|
2976
2976
|
};
|
|
2977
2977
|
var NoSearchResult_default = NoSearchResult;
|
|
2978
2978
|
|
|
2979
|
+
// src/components/Skeleton/Skeleton.tsx
|
|
2980
|
+
var import_react15 = require("react");
|
|
2981
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2982
|
+
var SKELETON_ANIMATION_CLASSES = {
|
|
2983
|
+
pulse: "animate-pulse",
|
|
2984
|
+
none: ""
|
|
2985
|
+
};
|
|
2986
|
+
var SKELETON_VARIANT_CLASSES = {
|
|
2987
|
+
text: "h-4 bg-background-200 rounded",
|
|
2988
|
+
circular: "bg-background-200 rounded-full",
|
|
2989
|
+
rectangular: "bg-background-200",
|
|
2990
|
+
rounded: "bg-background-200 rounded-lg"
|
|
2991
|
+
};
|
|
2992
|
+
var SPACING_CLASSES = {
|
|
2993
|
+
none: "",
|
|
2994
|
+
small: "space-y-1",
|
|
2995
|
+
medium: "space-y-2",
|
|
2996
|
+
large: "space-y-3"
|
|
2997
|
+
};
|
|
2998
|
+
var Skeleton = (0, import_react15.forwardRef)(
|
|
2999
|
+
({
|
|
3000
|
+
variant = "text",
|
|
3001
|
+
width,
|
|
3002
|
+
height,
|
|
3003
|
+
animation = "pulse",
|
|
3004
|
+
lines = 1,
|
|
3005
|
+
spacing = "none",
|
|
3006
|
+
className = "",
|
|
3007
|
+
children,
|
|
3008
|
+
...props
|
|
3009
|
+
}, ref) => {
|
|
3010
|
+
const animationClass = SKELETON_ANIMATION_CLASSES[animation];
|
|
3011
|
+
const variantClass = SKELETON_VARIANT_CLASSES[variant];
|
|
3012
|
+
const spacingClass = SPACING_CLASSES[spacing];
|
|
3013
|
+
const style = {
|
|
3014
|
+
width: typeof width === "number" ? `${width}px` : width,
|
|
3015
|
+
height: typeof height === "number" ? `${height}px` : height
|
|
3016
|
+
};
|
|
3017
|
+
if (variant === "text" && lines > 1) {
|
|
3018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3019
|
+
"div",
|
|
3020
|
+
{
|
|
3021
|
+
ref,
|
|
3022
|
+
className: cn("flex flex-col", spacingClass, className),
|
|
3023
|
+
...props,
|
|
3024
|
+
children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3025
|
+
"div",
|
|
3026
|
+
{
|
|
3027
|
+
className: cn(variantClass, animationClass),
|
|
3028
|
+
style: index === lines - 1 ? { width: "60%" } : void 0
|
|
3029
|
+
},
|
|
3030
|
+
index
|
|
3031
|
+
))
|
|
3032
|
+
}
|
|
3033
|
+
);
|
|
3034
|
+
}
|
|
3035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3036
|
+
"div",
|
|
3037
|
+
{
|
|
3038
|
+
ref,
|
|
3039
|
+
className: cn(variantClass, animationClass, className),
|
|
3040
|
+
style,
|
|
3041
|
+
...props,
|
|
3042
|
+
children
|
|
3043
|
+
}
|
|
3044
|
+
);
|
|
3045
|
+
}
|
|
3046
|
+
);
|
|
3047
|
+
var SkeletonText = (0, import_react15.forwardRef)(
|
|
3048
|
+
(props, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Skeleton, { ref, variant: "text", ...props })
|
|
3049
|
+
);
|
|
3050
|
+
var SkeletonCircle = (0, import_react15.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Skeleton, { ref, variant: "circular", ...props }));
|
|
3051
|
+
var SkeletonRectangle = (0, import_react15.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Skeleton, { ref, variant: "rectangular", ...props }));
|
|
3052
|
+
var SkeletonRounded = (0, import_react15.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Skeleton, { ref, variant: "rounded", ...props }));
|
|
3053
|
+
var SkeletonCard = (0, import_react15.forwardRef)(
|
|
3054
|
+
({
|
|
3055
|
+
showAvatar = true,
|
|
3056
|
+
showTitle = true,
|
|
3057
|
+
showDescription = true,
|
|
3058
|
+
showActions = true,
|
|
3059
|
+
lines = 2,
|
|
3060
|
+
className = "",
|
|
3061
|
+
...props
|
|
3062
|
+
}, ref) => {
|
|
3063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3064
|
+
"div",
|
|
3065
|
+
{
|
|
3066
|
+
ref,
|
|
3067
|
+
className: cn(
|
|
3068
|
+
"w-full p-4 bg-background border border-border-200 rounded-lg",
|
|
3069
|
+
className
|
|
3070
|
+
),
|
|
3071
|
+
...props,
|
|
3072
|
+
children: [
|
|
3073
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-start space-x-3", children: [
|
|
3074
|
+
showAvatar && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SkeletonCircle, { width: 40, height: 40 }),
|
|
3075
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
3076
|
+
showTitle && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SkeletonText, { width: "60%", height: 20 }),
|
|
3077
|
+
showDescription && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SkeletonText, { lines, spacing: "small" })
|
|
3078
|
+
] })
|
|
3079
|
+
] }),
|
|
3080
|
+
showActions && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex justify-end space-x-2 mt-4", children: [
|
|
3081
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SkeletonRectangle, { width: 80, height: 32 }),
|
|
3082
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SkeletonRectangle, { width: 80, height: 32 })
|
|
3083
|
+
] })
|
|
3084
|
+
]
|
|
3085
|
+
}
|
|
3086
|
+
);
|
|
3087
|
+
}
|
|
3088
|
+
);
|
|
3089
|
+
var SkeletonList = (0, import_react15.forwardRef)(
|
|
3090
|
+
({
|
|
3091
|
+
items = 3,
|
|
3092
|
+
showAvatar = true,
|
|
3093
|
+
showTitle = true,
|
|
3094
|
+
showDescription = true,
|
|
3095
|
+
lines = 1,
|
|
3096
|
+
className = "",
|
|
3097
|
+
...props
|
|
3098
|
+
}, ref) => {
|
|
3099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-start space-x-3 p-3", children: [
|
|
3100
|
+
showAvatar && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SkeletonCircle, { width: 32, height: 32 }),
|
|
3101
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
3102
|
+
showTitle && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SkeletonText, { width: "40%", height: 16 }),
|
|
3103
|
+
showDescription && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SkeletonText, { lines, spacing: "small" })
|
|
3104
|
+
] })
|
|
3105
|
+
] }, index)) });
|
|
3106
|
+
}
|
|
3107
|
+
);
|
|
3108
|
+
var SkeletonTable = (0, import_react15.forwardRef)(
|
|
3109
|
+
({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
|
|
3110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { ref, className: cn("w-full", className), ...props, children: [
|
|
3111
|
+
showHeader && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3112
|
+
SkeletonText,
|
|
3113
|
+
{
|
|
3114
|
+
width: `${100 / columns}%`,
|
|
3115
|
+
height: 20
|
|
3116
|
+
},
|
|
3117
|
+
index
|
|
3118
|
+
)) }),
|
|
3119
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "space-y-2", children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex space-x-2", children: Array.from({ length: columns }, (_2, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3120
|
+
SkeletonText,
|
|
3121
|
+
{
|
|
3122
|
+
width: `${100 / columns}%`,
|
|
3123
|
+
height: 16
|
|
3124
|
+
},
|
|
3125
|
+
colIndex
|
|
3126
|
+
)) }, rowIndex)) })
|
|
3127
|
+
] });
|
|
3128
|
+
}
|
|
3129
|
+
);
|
|
3130
|
+
|
|
2979
3131
|
// src/components/Table/TablePagination.tsx
|
|
2980
3132
|
var import_phosphor_react10 = require("phosphor-react");
|
|
2981
|
-
var
|
|
3133
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2982
3134
|
var TablePagination = ({
|
|
2983
3135
|
totalItems,
|
|
2984
3136
|
currentPage,
|
|
@@ -3009,7 +3161,7 @@ var TablePagination = ({
|
|
|
3009
3161
|
};
|
|
3010
3162
|
const isFirstPage = currentPage === 1;
|
|
3011
3163
|
const isLastPage = currentPage === totalPages;
|
|
3012
|
-
return /* @__PURE__ */ (0,
|
|
3164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3013
3165
|
"div",
|
|
3014
3166
|
{
|
|
3015
3167
|
className: cn(
|
|
@@ -3019,29 +3171,29 @@ var TablePagination = ({
|
|
|
3019
3171
|
),
|
|
3020
3172
|
...props,
|
|
3021
3173
|
children: [
|
|
3022
|
-
/* @__PURE__ */ (0,
|
|
3174
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "font-normal text-xs leading-[14px] text-text-800", children: [
|
|
3023
3175
|
startItem,
|
|
3024
3176
|
" de ",
|
|
3025
3177
|
totalItems,
|
|
3026
3178
|
" ",
|
|
3027
3179
|
itemLabel
|
|
3028
3180
|
] }),
|
|
3029
|
-
/* @__PURE__ */ (0,
|
|
3030
|
-
onItemsPerPageChange && /* @__PURE__ */ (0,
|
|
3031
|
-
/* @__PURE__ */ (0,
|
|
3181
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-wrap sm:flex-nowrap items-center gap-2 sm:gap-4 justify-center sm:justify-start", children: [
|
|
3182
|
+
onItemsPerPageChange && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "relative", children: [
|
|
3183
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3032
3184
|
"select",
|
|
3033
3185
|
{
|
|
3034
3186
|
value: itemsPerPage,
|
|
3035
3187
|
onChange: handleItemsPerPageChange,
|
|
3036
3188
|
className: "w-24 h-9 py-0 px-3 pr-8 bg-background border border-border-300 rounded appearance-none cursor-pointer font-normal text-sm leading-[21px] text-text-900",
|
|
3037
3189
|
"aria-label": "Items por p\xE1gina",
|
|
3038
|
-
children: itemsPerPageOptions.map((option) => /* @__PURE__ */ (0,
|
|
3190
|
+
children: itemsPerPageOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("option", { value: option, children: [
|
|
3039
3191
|
option,
|
|
3040
3192
|
" itens"
|
|
3041
3193
|
] }, option))
|
|
3042
3194
|
}
|
|
3043
3195
|
),
|
|
3044
|
-
/* @__PURE__ */ (0,
|
|
3196
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3045
3197
|
import_phosphor_react10.CaretDown,
|
|
3046
3198
|
{
|
|
3047
3199
|
size: 14,
|
|
@@ -3050,13 +3202,13 @@ var TablePagination = ({
|
|
|
3050
3202
|
}
|
|
3051
3203
|
)
|
|
3052
3204
|
] }),
|
|
3053
|
-
/* @__PURE__ */ (0,
|
|
3205
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "font-normal text-xs leading-[14px] text-text-950", children: [
|
|
3054
3206
|
"P\xE1gina ",
|
|
3055
3207
|
currentPage,
|
|
3056
3208
|
" de ",
|
|
3057
3209
|
totalPages
|
|
3058
3210
|
] }),
|
|
3059
|
-
/* @__PURE__ */ (0,
|
|
3211
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3060
3212
|
"button",
|
|
3061
3213
|
{
|
|
3062
3214
|
onClick: handlePrevious,
|
|
@@ -3067,12 +3219,12 @@ var TablePagination = ({
|
|
|
3067
3219
|
),
|
|
3068
3220
|
"aria-label": "P\xE1gina anterior",
|
|
3069
3221
|
children: [
|
|
3070
|
-
/* @__PURE__ */ (0,
|
|
3071
|
-
/* @__PURE__ */ (0,
|
|
3222
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_phosphor_react10.CaretLeft, { size: 12, weight: "bold", className: "text-primary-950" }),
|
|
3223
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "font-medium text-xs leading-[14px] text-primary-950", children: "Anterior" })
|
|
3072
3224
|
]
|
|
3073
3225
|
}
|
|
3074
3226
|
),
|
|
3075
|
-
/* @__PURE__ */ (0,
|
|
3227
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3076
3228
|
"button",
|
|
3077
3229
|
{
|
|
3078
3230
|
onClick: handleNext2,
|
|
@@ -3083,8 +3235,8 @@ var TablePagination = ({
|
|
|
3083
3235
|
),
|
|
3084
3236
|
"aria-label": "Pr\xF3xima p\xE1gina",
|
|
3085
3237
|
children: [
|
|
3086
|
-
/* @__PURE__ */ (0,
|
|
3087
|
-
/* @__PURE__ */ (0,
|
|
3238
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "font-medium text-xs leading-[14px] text-primary-950", children: "Pr\xF3xima" }),
|
|
3239
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_phosphor_react10.CaretRight, { size: 12, weight: "bold", className: "text-primary-950" })
|
|
3088
3240
|
]
|
|
3089
3241
|
}
|
|
3090
3242
|
)
|
|
@@ -3097,7 +3249,7 @@ TablePagination.displayName = "TablePagination";
|
|
|
3097
3249
|
var TablePagination_default = TablePagination;
|
|
3098
3250
|
|
|
3099
3251
|
// src/components/Table/Table.tsx
|
|
3100
|
-
var
|
|
3252
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3101
3253
|
function useTableSort(data, options = {}) {
|
|
3102
3254
|
const { syncWithUrl = false } = options;
|
|
3103
3255
|
const getInitialState = () => {
|
|
@@ -3116,13 +3268,13 @@ function useTableSort(data, options = {}) {
|
|
|
3116
3268
|
return { column: null, direction: null };
|
|
3117
3269
|
};
|
|
3118
3270
|
const initialState2 = getInitialState();
|
|
3119
|
-
const [sortColumn, setSortColumn] = (0,
|
|
3271
|
+
const [sortColumn, setSortColumn] = (0, import_react16.useState)(
|
|
3120
3272
|
initialState2.column
|
|
3121
3273
|
);
|
|
3122
|
-
const [sortDirection, setSortDirection] = (0,
|
|
3274
|
+
const [sortDirection, setSortDirection] = (0, import_react16.useState)(
|
|
3123
3275
|
initialState2.direction
|
|
3124
3276
|
);
|
|
3125
|
-
(0,
|
|
3277
|
+
(0, import_react16.useEffect)(() => {
|
|
3126
3278
|
if (!syncWithUrl || globalThis.window === void 0) return;
|
|
3127
3279
|
const url = new URL(globalThis.location.href);
|
|
3128
3280
|
const params = url.searchParams;
|
|
@@ -3148,7 +3300,7 @@ function useTableSort(data, options = {}) {
|
|
|
3148
3300
|
setSortDirection("asc");
|
|
3149
3301
|
}
|
|
3150
3302
|
};
|
|
3151
|
-
const sortedData = (0,
|
|
3303
|
+
const sortedData = (0, import_react16.useMemo)(() => {
|
|
3152
3304
|
if (!sortColumn || !sortDirection) {
|
|
3153
3305
|
return data;
|
|
3154
3306
|
}
|
|
@@ -3167,121 +3319,157 @@ function useTableSort(data, options = {}) {
|
|
|
3167
3319
|
}, [data, sortColumn, sortDirection]);
|
|
3168
3320
|
return { sortedData, sortColumn, sortDirection, handleSort };
|
|
3169
3321
|
}
|
|
3170
|
-
var
|
|
3322
|
+
var renderHeaderElements = (children) => {
|
|
3323
|
+
return import_react16.Children.map(children, (child) => {
|
|
3324
|
+
if ((0, import_react16.isValidElement)(child) && (child.type === TableCaption || child.type === TableHeader)) {
|
|
3325
|
+
return child;
|
|
3326
|
+
}
|
|
3327
|
+
return null;
|
|
3328
|
+
});
|
|
3329
|
+
};
|
|
3330
|
+
var getNoSearchResultContent = (config, defaultTitle, defaultDescription) => {
|
|
3331
|
+
if (config.component) {
|
|
3332
|
+
return config.component;
|
|
3333
|
+
}
|
|
3334
|
+
if (config.image) {
|
|
3335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3336
|
+
NoSearchResult_default,
|
|
3337
|
+
{
|
|
3338
|
+
image: config.image,
|
|
3339
|
+
title: config.title || defaultTitle,
|
|
3340
|
+
description: config.description || defaultDescription
|
|
3341
|
+
}
|
|
3342
|
+
);
|
|
3343
|
+
}
|
|
3344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "text-center", children: [
|
|
3345
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-text-600 text-lg font-semibold mb-2", children: config.title || defaultTitle }),
|
|
3346
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-text-500 text-sm", children: config.description || defaultDescription })
|
|
3347
|
+
] });
|
|
3348
|
+
};
|
|
3349
|
+
var getEmptyStateContent = (config, defaultMessage, defaultButtonText, onButtonClick) => {
|
|
3350
|
+
if (config?.component) {
|
|
3351
|
+
return config.component;
|
|
3352
|
+
}
|
|
3353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col items-center justify-center gap-4", children: [
|
|
3354
|
+
config?.image && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3355
|
+
"img",
|
|
3356
|
+
{
|
|
3357
|
+
src: config.image,
|
|
3358
|
+
alt: "Empty state",
|
|
3359
|
+
className: "w-auto h-auto max-w-full"
|
|
3360
|
+
}
|
|
3361
|
+
),
|
|
3362
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-text-600 text-base font-normal", children: config?.message || defaultMessage }),
|
|
3363
|
+
(config?.onButtonClick || onButtonClick) && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3364
|
+
Button_default,
|
|
3365
|
+
{
|
|
3366
|
+
variant: "solid",
|
|
3367
|
+
action: "primary",
|
|
3368
|
+
size: "medium",
|
|
3369
|
+
onClick: config?.onButtonClick || onButtonClick,
|
|
3370
|
+
children: config?.buttonText || defaultButtonText
|
|
3371
|
+
}
|
|
3372
|
+
)
|
|
3373
|
+
] });
|
|
3374
|
+
};
|
|
3375
|
+
var renderTableWrapper = (variant, tableRef, className, children, stateContent, tableProps) => {
|
|
3376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3377
|
+
"div",
|
|
3378
|
+
{
|
|
3379
|
+
className: cn(
|
|
3380
|
+
"relative w-full overflow-x-auto",
|
|
3381
|
+
variant === "default" && "border border-border-200 rounded-xl"
|
|
3382
|
+
),
|
|
3383
|
+
children: [
|
|
3384
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3385
|
+
"table",
|
|
3386
|
+
{
|
|
3387
|
+
ref: tableRef,
|
|
3388
|
+
className: cn(
|
|
3389
|
+
"analytica-table w-full caption-bottom text-sm border-separate border-spacing-0",
|
|
3390
|
+
className
|
|
3391
|
+
),
|
|
3392
|
+
...tableProps,
|
|
3393
|
+
children: renderHeaderElements(children)
|
|
3394
|
+
}
|
|
3395
|
+
),
|
|
3396
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "py-8 flex justify-center", children: stateContent })
|
|
3397
|
+
]
|
|
3398
|
+
}
|
|
3399
|
+
);
|
|
3400
|
+
};
|
|
3401
|
+
var Table = (0, import_react16.forwardRef)(
|
|
3171
3402
|
({
|
|
3172
3403
|
variant = "default",
|
|
3173
3404
|
className,
|
|
3174
3405
|
children,
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
onEmptyStateButtonClick,
|
|
3406
|
+
showLoading = false,
|
|
3407
|
+
loadingState,
|
|
3408
|
+
showNoSearchResult = false,
|
|
3409
|
+
noSearchResultState,
|
|
3410
|
+
showEmpty = false,
|
|
3411
|
+
emptyState,
|
|
3182
3412
|
...props
|
|
3183
3413
|
}, ref) => {
|
|
3184
|
-
const
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
});
|
|
3196
|
-
return
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
const rowProps = row.props;
|
|
3206
|
-
count = import_react15.Children.count(rowProps.children);
|
|
3207
|
-
}
|
|
3208
|
-
});
|
|
3209
|
-
}
|
|
3210
|
-
});
|
|
3211
|
-
return count || 1;
|
|
3212
|
-
}, [children]);
|
|
3213
|
-
const hasSearchTerm = searchTerm && searchTerm.trim() !== "";
|
|
3214
|
-
const showNoSearchResult = hasSearchTerm && isTableBodyEmpty;
|
|
3215
|
-
const showEmptyState = !hasSearchTerm && isTableBodyEmpty;
|
|
3414
|
+
const defaultNoSearchResultState = {
|
|
3415
|
+
title: "Nenhum resultado encontrado",
|
|
3416
|
+
description: "N\xE3o encontramos nenhum resultado com esse nome. Tente revisar a busca ou usar outra palavra-chave."
|
|
3417
|
+
};
|
|
3418
|
+
const defaultEmptyState = {
|
|
3419
|
+
message: "Nenhum dado dispon\xEDvel no momento.",
|
|
3420
|
+
buttonText: "Adicionar item"
|
|
3421
|
+
};
|
|
3422
|
+
const finalNoSearchResultState = noSearchResultState || defaultNoSearchResultState;
|
|
3423
|
+
const finalEmptyState = emptyState || defaultEmptyState;
|
|
3424
|
+
if (showLoading) {
|
|
3425
|
+
const loadingContent = loadingState?.component || /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SkeletonTable, { rows: 5, columns: 4, showHeader: false });
|
|
3426
|
+
return renderTableWrapper(
|
|
3427
|
+
variant,
|
|
3428
|
+
ref,
|
|
3429
|
+
className,
|
|
3430
|
+
children,
|
|
3431
|
+
loadingContent,
|
|
3432
|
+
props
|
|
3433
|
+
);
|
|
3434
|
+
}
|
|
3216
3435
|
if (showNoSearchResult) {
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
className: cn(
|
|
3230
|
-
"analytica-table w-full caption-bottom text-sm border-separate border-spacing-0",
|
|
3231
|
-
className
|
|
3232
|
-
),
|
|
3233
|
-
...props,
|
|
3234
|
-
children: import_react15.Children.map(children, (child) => {
|
|
3235
|
-
if ((0, import_react15.isValidElement)(child) && (child.type === TableCaption || child.type === TableHeader)) {
|
|
3236
|
-
return child;
|
|
3237
|
-
}
|
|
3238
|
-
return null;
|
|
3239
|
-
})
|
|
3240
|
-
}
|
|
3241
|
-
),
|
|
3242
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "py-8 flex justify-center", children: noSearchResultImage ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3243
|
-
NoSearchResult_default,
|
|
3244
|
-
{
|
|
3245
|
-
image: noSearchResultImage,
|
|
3246
|
-
title: noSearchResultTitle,
|
|
3247
|
-
description: noSearchResultDescription
|
|
3248
|
-
}
|
|
3249
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "text-center", children: [
|
|
3250
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-text-600 text-lg font-semibold mb-2", children: noSearchResultTitle }),
|
|
3251
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-text-500 text-sm", children: noSearchResultDescription })
|
|
3252
|
-
] }) })
|
|
3253
|
-
]
|
|
3254
|
-
}
|
|
3436
|
+
const noSearchContent = getNoSearchResultContent(
|
|
3437
|
+
finalNoSearchResultState,
|
|
3438
|
+
defaultNoSearchResultState.title || "",
|
|
3439
|
+
defaultNoSearchResultState.description || ""
|
|
3440
|
+
);
|
|
3441
|
+
return renderTableWrapper(
|
|
3442
|
+
variant,
|
|
3443
|
+
ref,
|
|
3444
|
+
className,
|
|
3445
|
+
children,
|
|
3446
|
+
noSearchContent,
|
|
3447
|
+
props
|
|
3255
3448
|
);
|
|
3256
3449
|
}
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
});
|
|
3274
|
-
}
|
|
3275
|
-
return child;
|
|
3276
|
-
});
|
|
3277
|
-
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3450
|
+
if (showEmpty) {
|
|
3451
|
+
const emptyContent = getEmptyStateContent(
|
|
3452
|
+
finalEmptyState,
|
|
3453
|
+
defaultEmptyState.message || "Nenhum dado dispon\xEDvel no momento.",
|
|
3454
|
+
defaultEmptyState.buttonText || "Adicionar item"
|
|
3455
|
+
);
|
|
3456
|
+
return renderTableWrapper(
|
|
3457
|
+
variant,
|
|
3458
|
+
ref,
|
|
3459
|
+
className,
|
|
3460
|
+
children,
|
|
3461
|
+
emptyContent,
|
|
3462
|
+
props
|
|
3463
|
+
);
|
|
3464
|
+
}
|
|
3465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3278
3466
|
"div",
|
|
3279
3467
|
{
|
|
3280
3468
|
className: cn(
|
|
3281
3469
|
"relative w-full overflow-x-auto",
|
|
3282
3470
|
variant === "default" && "border border-border-200 rounded-xl"
|
|
3283
3471
|
),
|
|
3284
|
-
children: /* @__PURE__ */ (0,
|
|
3472
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3285
3473
|
"table",
|
|
3286
3474
|
{
|
|
3287
3475
|
ref,
|
|
@@ -3293,10 +3481,10 @@ var Table = (0, import_react15.forwardRef)(
|
|
|
3293
3481
|
),
|
|
3294
3482
|
...props,
|
|
3295
3483
|
children: [
|
|
3296
|
-
!
|
|
3297
|
-
(child) => (0,
|
|
3298
|
-
) && /* @__PURE__ */ (0,
|
|
3299
|
-
|
|
3484
|
+
!import_react16.Children.toArray(children).some(
|
|
3485
|
+
(child) => (0, import_react16.isValidElement)(child) && child.type === TableCaption
|
|
3486
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("caption", { className: "sr-only", children: "My Table" }),
|
|
3487
|
+
children
|
|
3300
3488
|
]
|
|
3301
3489
|
}
|
|
3302
3490
|
)
|
|
@@ -3305,7 +3493,7 @@ var Table = (0, import_react15.forwardRef)(
|
|
|
3305
3493
|
}
|
|
3306
3494
|
);
|
|
3307
3495
|
Table.displayName = "Table";
|
|
3308
|
-
var TableHeader = (0,
|
|
3496
|
+
var TableHeader = (0, import_react16.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3309
3497
|
"thead",
|
|
3310
3498
|
{
|
|
3311
3499
|
ref,
|
|
@@ -3314,8 +3502,8 @@ var TableHeader = (0, import_react15.forwardRef)(({ className, ...props }, ref)
|
|
|
3314
3502
|
}
|
|
3315
3503
|
));
|
|
3316
3504
|
TableHeader.displayName = "TableHeader";
|
|
3317
|
-
var TableBody = (0,
|
|
3318
|
-
({ className, variant = "default", ...props }, ref) => /* @__PURE__ */ (0,
|
|
3505
|
+
var TableBody = (0, import_react16.forwardRef)(
|
|
3506
|
+
({ className, variant = "default", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3319
3507
|
"tbody",
|
|
3320
3508
|
{
|
|
3321
3509
|
ref,
|
|
@@ -3329,8 +3517,8 @@ var TableBody = (0, import_react15.forwardRef)(
|
|
|
3329
3517
|
)
|
|
3330
3518
|
);
|
|
3331
3519
|
TableBody.displayName = "TableBody";
|
|
3332
|
-
var TableFooter = (0,
|
|
3333
|
-
({ variant = "default", className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3520
|
+
var TableFooter = (0, import_react16.forwardRef)(
|
|
3521
|
+
({ variant = "default", className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3334
3522
|
"tfoot",
|
|
3335
3523
|
{
|
|
3336
3524
|
ref,
|
|
@@ -3366,7 +3554,7 @@ var VARIANT_STATES_ROW = {
|
|
|
3366
3554
|
borderless: "bg-background-50 opacity-50 cursor-not-allowed"
|
|
3367
3555
|
}
|
|
3368
3556
|
};
|
|
3369
|
-
var TableRow = (0,
|
|
3557
|
+
var TableRow = (0, import_react16.forwardRef)(
|
|
3370
3558
|
({
|
|
3371
3559
|
variant = "default",
|
|
3372
3560
|
state = "default",
|
|
@@ -3374,7 +3562,7 @@ var TableRow = (0, import_react15.forwardRef)(
|
|
|
3374
3562
|
className,
|
|
3375
3563
|
...props
|
|
3376
3564
|
}, ref) => {
|
|
3377
|
-
return /* @__PURE__ */ (0,
|
|
3565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3378
3566
|
"tr",
|
|
3379
3567
|
{
|
|
3380
3568
|
ref,
|
|
@@ -3392,7 +3580,7 @@ var TableRow = (0, import_react15.forwardRef)(
|
|
|
3392
3580
|
}
|
|
3393
3581
|
);
|
|
3394
3582
|
TableRow.displayName = "TableRow";
|
|
3395
|
-
var TableHead = (0,
|
|
3583
|
+
var TableHead = (0, import_react16.forwardRef)(
|
|
3396
3584
|
({
|
|
3397
3585
|
className,
|
|
3398
3586
|
sortable = true,
|
|
@@ -3406,7 +3594,7 @@ var TableHead = (0, import_react15.forwardRef)(
|
|
|
3406
3594
|
onSort();
|
|
3407
3595
|
}
|
|
3408
3596
|
};
|
|
3409
|
-
return /* @__PURE__ */ (0,
|
|
3597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3410
3598
|
"th",
|
|
3411
3599
|
{
|
|
3412
3600
|
ref,
|
|
@@ -3417,11 +3605,11 @@ var TableHead = (0, import_react15.forwardRef)(
|
|
|
3417
3605
|
),
|
|
3418
3606
|
onClick: handleClick,
|
|
3419
3607
|
...props,
|
|
3420
|
-
children: /* @__PURE__ */ (0,
|
|
3608
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3421
3609
|
children,
|
|
3422
|
-
sortable && /* @__PURE__ */ (0,
|
|
3423
|
-
sortDirection === "asc" && /* @__PURE__ */ (0,
|
|
3424
|
-
sortDirection === "desc" && /* @__PURE__ */ (0,
|
|
3610
|
+
sortable && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col", children: [
|
|
3611
|
+
sortDirection === "asc" && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.CaretUp, { size: 16, weight: "fill", className: "text-text-800" }),
|
|
3612
|
+
sortDirection === "desc" && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.CaretDown, { size: 16, weight: "fill", className: "text-text-800" })
|
|
3425
3613
|
] })
|
|
3426
3614
|
] })
|
|
3427
3615
|
}
|
|
@@ -3429,7 +3617,7 @@ var TableHead = (0, import_react15.forwardRef)(
|
|
|
3429
3617
|
}
|
|
3430
3618
|
);
|
|
3431
3619
|
TableHead.displayName = "TableHead";
|
|
3432
|
-
var TableCell = (0,
|
|
3620
|
+
var TableCell = (0, import_react16.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3433
3621
|
"td",
|
|
3434
3622
|
{
|
|
3435
3623
|
ref,
|
|
@@ -3441,7 +3629,7 @@ var TableCell = (0, import_react15.forwardRef)(({ className, ...props }, ref) =>
|
|
|
3441
3629
|
}
|
|
3442
3630
|
));
|
|
3443
3631
|
TableCell.displayName = "TableCell";
|
|
3444
|
-
var TableCaption = (0,
|
|
3632
|
+
var TableCaption = (0, import_react16.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3445
3633
|
"caption",
|
|
3446
3634
|
{
|
|
3447
3635
|
ref,
|
|
@@ -3457,7 +3645,7 @@ var Table_default = Table;
|
|
|
3457
3645
|
|
|
3458
3646
|
// src/components/AlertManagerView/AlertsManagerView.tsx
|
|
3459
3647
|
var import_phosphor_react12 = require("phosphor-react");
|
|
3460
|
-
var
|
|
3648
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3461
3649
|
var AlertsManagerView = ({
|
|
3462
3650
|
alertData,
|
|
3463
3651
|
isOpen = false,
|
|
@@ -3486,7 +3674,7 @@ var AlertsManagerView = ({
|
|
|
3486
3674
|
year: "numeric"
|
|
3487
3675
|
});
|
|
3488
3676
|
};
|
|
3489
|
-
return /* @__PURE__ */ (0,
|
|
3677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3490
3678
|
Modal_default,
|
|
3491
3679
|
{
|
|
3492
3680
|
isOpen,
|
|
@@ -3494,59 +3682,59 @@ var AlertsManagerView = ({
|
|
|
3494
3682
|
title: alertData.title,
|
|
3495
3683
|
size: "md",
|
|
3496
3684
|
contentClassName: "p-0",
|
|
3497
|
-
children: /* @__PURE__ */ (0,
|
|
3498
|
-
/* @__PURE__ */ (0,
|
|
3499
|
-
(imageLink || alertData.image || defaultImage) && /* @__PURE__ */ (0,
|
|
3685
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex flex-col h-[calc(100vh-8rem)] max-h-[700px]", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: [
|
|
3686
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "bg-background-50 px-5 py-6 flex flex-col items-center gap-4 rounded-xl mb-4", children: [
|
|
3687
|
+
(imageLink || alertData.image || defaultImage) && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3500
3688
|
"img",
|
|
3501
3689
|
{
|
|
3502
3690
|
src: imageLink || alertData.image || defaultImage || void 0,
|
|
3503
3691
|
alt: alertData.title || "Imagem do alerta"
|
|
3504
3692
|
}
|
|
3505
3693
|
),
|
|
3506
|
-
/* @__PURE__ */ (0,
|
|
3507
|
-
/* @__PURE__ */ (0,
|
|
3508
|
-
/* @__PURE__ */ (0,
|
|
3694
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col items-center text-center gap-3", children: [
|
|
3695
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text_default, { size: "lg", weight: "semibold", children: alertData.title || "Sem T\xEDtulo" }),
|
|
3696
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text_default, { size: "sm", weight: "normal", className: "text-text-500", children: alertData.message || "Sem mensagem" })
|
|
3509
3697
|
] })
|
|
3510
3698
|
] }),
|
|
3511
|
-
/* @__PURE__ */ (0,
|
|
3512
|
-
/* @__PURE__ */ (0,
|
|
3513
|
-
/* @__PURE__ */ (0,
|
|
3514
|
-
/* @__PURE__ */ (0,
|
|
3699
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Divider_default, { className: "my-4" }),
|
|
3700
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex justify-between items-center mb-4 px-2", children: [
|
|
3701
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-700", children: "Enviado em" }),
|
|
3702
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text_default, { size: "sm", weight: "medium", className: "text-text-900", children: formatDate(alertData.sentAt) })
|
|
3515
3703
|
] }),
|
|
3516
|
-
/* @__PURE__ */ (0,
|
|
3517
|
-
/* @__PURE__ */ (0,
|
|
3518
|
-
/* @__PURE__ */ (0,
|
|
3519
|
-
/* @__PURE__ */ (0,
|
|
3520
|
-
/* @__PURE__ */ (0,
|
|
3704
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Divider_default, { className: "my-4" }),
|
|
3705
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Table_default, { variant: "borderless", className: "table-fixed", children: [
|
|
3706
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(TableRow, { variant: "borderless", children: [
|
|
3707
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableHead, { className: "py-2 px-3.5 text-start", children: "Destinat\xE1rio" }),
|
|
3708
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableHead, { className: "py-2 px-3.5 w-[120px] text-start", children: "Status" })
|
|
3521
3709
|
] }) }),
|
|
3522
|
-
/* @__PURE__ */ (0,
|
|
3523
|
-
/* @__PURE__ */ (0,
|
|
3524
|
-
/* @__PURE__ */ (0,
|
|
3710
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableBody, { variant: "borderless", children: paginatedRecipients.map((recipient) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(TableRow, { children: [
|
|
3711
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(TableCell, { className: "py-2 px-3.5 flex flex-row gap-2 text-start truncate", children: [
|
|
3712
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "rounded-full size-6 bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react12.User, { className: "text-primary-950", size: 18 }) }),
|
|
3525
3713
|
recipient.name
|
|
3526
3714
|
] }),
|
|
3527
|
-
/* @__PURE__ */ (0,
|
|
3715
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableCell, { className: "py-2 px-3.5 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex justify-center items-center gap-1", children: recipient.status === "viewed" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Badge_default, { variant: "solid", action: "success", children: "Visualizado" }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Badge_default, { variant: "solid", action: "error", children: "Pendente" }) }) })
|
|
3528
3716
|
] }, recipient.id)) })
|
|
3529
3717
|
] }) }),
|
|
3530
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
3531
|
-
/* @__PURE__ */ (0,
|
|
3718
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex justify-end items-center gap-2 bg-background-50 border border-border-200 py-3.5 px-2 rounded-b-2xl", children: [
|
|
3719
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text_default, { size: "sm", className: "text-text-600", children: [
|
|
3532
3720
|
"P\xE1gina ",
|
|
3533
3721
|
effectiveCurrentPage,
|
|
3534
3722
|
" de ",
|
|
3535
3723
|
totalPages
|
|
3536
3724
|
] }),
|
|
3537
|
-
/* @__PURE__ */ (0,
|
|
3538
|
-
/* @__PURE__ */ (0,
|
|
3725
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex gap-2", children: onPageChange ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
3726
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3539
3727
|
Button_default,
|
|
3540
3728
|
{
|
|
3541
3729
|
variant: "link",
|
|
3542
3730
|
size: "extra-small",
|
|
3543
3731
|
onClick: () => onPageChange(Math.max(1, effectiveCurrentPage - 1)),
|
|
3544
3732
|
disabled: effectiveCurrentPage === 1,
|
|
3545
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
3733
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react12.CaretLeft, {}),
|
|
3546
3734
|
children: "Anterior"
|
|
3547
3735
|
}
|
|
3548
3736
|
),
|
|
3549
|
-
/* @__PURE__ */ (0,
|
|
3737
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3550
3738
|
Button_default,
|
|
3551
3739
|
{
|
|
3552
3740
|
variant: "link",
|
|
@@ -3555,28 +3743,28 @@ var AlertsManagerView = ({
|
|
|
3555
3743
|
Math.min(totalPages, effectiveCurrentPage + 1)
|
|
3556
3744
|
),
|
|
3557
3745
|
disabled: effectiveCurrentPage === totalPages,
|
|
3558
|
-
iconRight: /* @__PURE__ */ (0,
|
|
3746
|
+
iconRight: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react12.CaretRight, {}),
|
|
3559
3747
|
children: "Pr\xF3ximo"
|
|
3560
3748
|
}
|
|
3561
3749
|
)
|
|
3562
|
-
] }) : /* @__PURE__ */ (0,
|
|
3563
|
-
/* @__PURE__ */ (0,
|
|
3750
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
3751
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3564
3752
|
Button_default,
|
|
3565
3753
|
{
|
|
3566
3754
|
variant: "link",
|
|
3567
3755
|
size: "extra-small",
|
|
3568
3756
|
disabled: effectiveCurrentPage === 1,
|
|
3569
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
3757
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react12.CaretLeft, {}),
|
|
3570
3758
|
children: "Anterior"
|
|
3571
3759
|
}
|
|
3572
3760
|
),
|
|
3573
|
-
/* @__PURE__ */ (0,
|
|
3761
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3574
3762
|
Button_default,
|
|
3575
3763
|
{
|
|
3576
3764
|
variant: "link",
|
|
3577
3765
|
size: "extra-small",
|
|
3578
3766
|
disabled: effectiveCurrentPage === totalPages,
|
|
3579
|
-
iconRight: /* @__PURE__ */ (0,
|
|
3767
|
+
iconRight: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react12.CaretRight, {}),
|
|
3580
3768
|
children: "Pr\xF3ximo"
|
|
3581
3769
|
}
|
|
3582
3770
|
)
|
|
@@ -3588,9 +3776,9 @@ var AlertsManagerView = ({
|
|
|
3588
3776
|
};
|
|
3589
3777
|
|
|
3590
3778
|
// src/components/Radio/Radio.tsx
|
|
3591
|
-
var
|
|
3779
|
+
var import_react17 = require("react");
|
|
3592
3780
|
var import_zustand3 = require("zustand");
|
|
3593
|
-
var
|
|
3781
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3594
3782
|
var SIZE_CLASSES7 = {
|
|
3595
3783
|
small: {
|
|
3596
3784
|
radio: "w-5 h-5",
|
|
@@ -3655,7 +3843,7 @@ var DOT_CLASSES = {
|
|
|
3655
3843
|
invalid: "bg-primary-950",
|
|
3656
3844
|
disabled: "bg-primary-950"
|
|
3657
3845
|
};
|
|
3658
|
-
var Radio = (0,
|
|
3846
|
+
var Radio = (0, import_react17.forwardRef)(
|
|
3659
3847
|
({
|
|
3660
3848
|
label,
|
|
3661
3849
|
size = "medium",
|
|
@@ -3673,10 +3861,10 @@ var Radio = (0, import_react16.forwardRef)(
|
|
|
3673
3861
|
onChange,
|
|
3674
3862
|
...props
|
|
3675
3863
|
}, ref) => {
|
|
3676
|
-
const generatedId = (0,
|
|
3864
|
+
const generatedId = (0, import_react17.useId)();
|
|
3677
3865
|
const inputId = id ?? `radio-${generatedId}`;
|
|
3678
|
-
const inputRef = (0,
|
|
3679
|
-
const [internalChecked, setInternalChecked] = (0,
|
|
3866
|
+
const inputRef = (0, import_react17.useRef)(null);
|
|
3867
|
+
const [internalChecked, setInternalChecked] = (0, import_react17.useState)(defaultChecked);
|
|
3680
3868
|
const isControlled = checkedProp !== void 0;
|
|
3681
3869
|
const checked = isControlled ? checkedProp : internalChecked;
|
|
3682
3870
|
const handleChange = (event) => {
|
|
@@ -3729,8 +3917,8 @@ var Radio = (0, import_react16.forwardRef)(
|
|
|
3729
3917
|
const getCursorClass = () => {
|
|
3730
3918
|
return currentState === "disabled" ? "cursor-not-allowed" : "cursor-pointer";
|
|
3731
3919
|
};
|
|
3732
|
-
return /* @__PURE__ */ (0,
|
|
3733
|
-
/* @__PURE__ */ (0,
|
|
3920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col", children: [
|
|
3921
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
3734
3922
|
"div",
|
|
3735
3923
|
{
|
|
3736
3924
|
className: cn(
|
|
@@ -3739,7 +3927,7 @@ var Radio = (0, import_react16.forwardRef)(
|
|
|
3739
3927
|
disabled ? "opacity-40" : ""
|
|
3740
3928
|
),
|
|
3741
3929
|
children: [
|
|
3742
|
-
/* @__PURE__ */ (0,
|
|
3930
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3743
3931
|
"input",
|
|
3744
3932
|
{
|
|
3745
3933
|
ref: (node) => {
|
|
@@ -3763,7 +3951,7 @@ var Radio = (0, import_react16.forwardRef)(
|
|
|
3763
3951
|
...props
|
|
3764
3952
|
}
|
|
3765
3953
|
),
|
|
3766
|
-
/* @__PURE__ */ (0,
|
|
3954
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3767
3955
|
"button",
|
|
3768
3956
|
{
|
|
3769
3957
|
type: "button",
|
|
@@ -3788,10 +3976,10 @@ var Radio = (0, import_react16.forwardRef)(
|
|
|
3788
3976
|
}
|
|
3789
3977
|
}
|
|
3790
3978
|
},
|
|
3791
|
-
children: checked && /* @__PURE__ */ (0,
|
|
3979
|
+
children: checked && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: dotClasses })
|
|
3792
3980
|
}
|
|
3793
3981
|
),
|
|
3794
|
-
label && /* @__PURE__ */ (0,
|
|
3982
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3795
3983
|
"div",
|
|
3796
3984
|
{
|
|
3797
3985
|
className: cn(
|
|
@@ -3799,7 +3987,7 @@ var Radio = (0, import_react16.forwardRef)(
|
|
|
3799
3987
|
sizeClasses.labelHeight,
|
|
3800
3988
|
"flex-1 min-w-0"
|
|
3801
3989
|
),
|
|
3802
|
-
children: /* @__PURE__ */ (0,
|
|
3990
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3803
3991
|
Text_default,
|
|
3804
3992
|
{
|
|
3805
3993
|
as: "label",
|
|
@@ -3820,7 +4008,7 @@ var Radio = (0, import_react16.forwardRef)(
|
|
|
3820
4008
|
]
|
|
3821
4009
|
}
|
|
3822
4010
|
),
|
|
3823
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
4011
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3824
4012
|
Text_default,
|
|
3825
4013
|
{
|
|
3826
4014
|
size: "sm",
|
|
@@ -3830,7 +4018,7 @@ var Radio = (0, import_react16.forwardRef)(
|
|
|
3830
4018
|
children: errorMessage
|
|
3831
4019
|
}
|
|
3832
4020
|
),
|
|
3833
|
-
helperText && !errorMessage && /* @__PURE__ */ (0,
|
|
4021
|
+
helperText && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3834
4022
|
Text_default,
|
|
3835
4023
|
{
|
|
3836
4024
|
size: "sm",
|
|
@@ -3862,16 +4050,16 @@ var useRadioGroupStore = (externalStore) => {
|
|
|
3862
4050
|
}
|
|
3863
4051
|
return externalStore;
|
|
3864
4052
|
};
|
|
3865
|
-
var injectStore2 = (children, store) =>
|
|
3866
|
-
if (!(0,
|
|
4053
|
+
var injectStore2 = (children, store) => import_react17.Children.map(children, (child) => {
|
|
4054
|
+
if (!(0, import_react17.isValidElement)(child)) return child;
|
|
3867
4055
|
const typedChild = child;
|
|
3868
4056
|
const shouldInject = typedChild.type === RadioGroupItem;
|
|
3869
|
-
return (0,
|
|
4057
|
+
return (0, import_react17.cloneElement)(typedChild, {
|
|
3870
4058
|
...shouldInject ? { store } : {},
|
|
3871
4059
|
...typedChild.props.children ? { children: injectStore2(typedChild.props.children, store) } : {}
|
|
3872
4060
|
});
|
|
3873
4061
|
});
|
|
3874
|
-
var RadioGroup = (0,
|
|
4062
|
+
var RadioGroup = (0, import_react17.forwardRef)(
|
|
3875
4063
|
({
|
|
3876
4064
|
value: propValue,
|
|
3877
4065
|
defaultValue = "",
|
|
@@ -3882,9 +4070,9 @@ var RadioGroup = (0, import_react16.forwardRef)(
|
|
|
3882
4070
|
children,
|
|
3883
4071
|
...props
|
|
3884
4072
|
}, ref) => {
|
|
3885
|
-
const generatedId = (0,
|
|
4073
|
+
const generatedId = (0, import_react17.useId)();
|
|
3886
4074
|
const name = propName || `radio-group-${generatedId}`;
|
|
3887
|
-
const storeRef = (0,
|
|
4075
|
+
const storeRef = (0, import_react17.useRef)(null);
|
|
3888
4076
|
storeRef.current ??= createRadioGroupStore(
|
|
3889
4077
|
name,
|
|
3890
4078
|
defaultValue,
|
|
@@ -3893,21 +4081,21 @@ var RadioGroup = (0, import_react16.forwardRef)(
|
|
|
3893
4081
|
);
|
|
3894
4082
|
const store = storeRef.current;
|
|
3895
4083
|
const { setValue } = (0, import_zustand3.useStore)(store, (s) => s);
|
|
3896
|
-
(0,
|
|
4084
|
+
(0, import_react17.useEffect)(() => {
|
|
3897
4085
|
const currentValue = store.getState().value;
|
|
3898
4086
|
if (currentValue && onValueChange) {
|
|
3899
4087
|
onValueChange(currentValue);
|
|
3900
4088
|
}
|
|
3901
4089
|
}, []);
|
|
3902
|
-
(0,
|
|
4090
|
+
(0, import_react17.useEffect)(() => {
|
|
3903
4091
|
if (propValue !== void 0) {
|
|
3904
4092
|
setValue(propValue);
|
|
3905
4093
|
}
|
|
3906
4094
|
}, [propValue, setValue]);
|
|
3907
|
-
(0,
|
|
4095
|
+
(0, import_react17.useEffect)(() => {
|
|
3908
4096
|
store.setState({ disabled });
|
|
3909
4097
|
}, [disabled, store]);
|
|
3910
|
-
return /* @__PURE__ */ (0,
|
|
4098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3911
4099
|
"div",
|
|
3912
4100
|
{
|
|
3913
4101
|
ref,
|
|
@@ -3921,7 +4109,7 @@ var RadioGroup = (0, import_react16.forwardRef)(
|
|
|
3921
4109
|
}
|
|
3922
4110
|
);
|
|
3923
4111
|
RadioGroup.displayName = "RadioGroup";
|
|
3924
|
-
var RadioGroupItem = (0,
|
|
4112
|
+
var RadioGroupItem = (0, import_react17.forwardRef)(
|
|
3925
4113
|
({
|
|
3926
4114
|
value,
|
|
3927
4115
|
store: externalStore,
|
|
@@ -3939,12 +4127,12 @@ var RadioGroupItem = (0, import_react16.forwardRef)(
|
|
|
3939
4127
|
disabled: groupDisabled,
|
|
3940
4128
|
name
|
|
3941
4129
|
} = (0, import_zustand3.useStore)(store);
|
|
3942
|
-
const generatedId = (0,
|
|
4130
|
+
const generatedId = (0, import_react17.useId)();
|
|
3943
4131
|
const inputId = id ?? `radio-item-${generatedId}`;
|
|
3944
4132
|
const isChecked = groupValue === value;
|
|
3945
4133
|
const isDisabled = groupDisabled || itemDisabled;
|
|
3946
4134
|
const currentState = isDisabled ? "disabled" : state;
|
|
3947
|
-
return /* @__PURE__ */ (0,
|
|
4135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3948
4136
|
Radio,
|
|
3949
4137
|
{
|
|
3950
4138
|
ref,
|
|
@@ -3971,7 +4159,7 @@ var Radio_default = Radio;
|
|
|
3971
4159
|
|
|
3972
4160
|
// src/components/Toast/Toast.tsx
|
|
3973
4161
|
var import_phosphor_react13 = require("phosphor-react");
|
|
3974
|
-
var
|
|
4162
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3975
4163
|
var VARIANT_ACTION_CLASSES4 = {
|
|
3976
4164
|
solid: {
|
|
3977
4165
|
warning: "bg-warning text-warning-600 border-none focus-visible:outline-none",
|
|
@@ -4011,7 +4199,7 @@ var Toast = ({
|
|
|
4011
4199
|
};
|
|
4012
4200
|
const IconAction = iconMap[action] || iconMap["success"];
|
|
4013
4201
|
const baseClasses = "max-w-[390px] w-full flex flex-row items-start justify-between shadow-lg rounded-lg border p-4 gap-6 group";
|
|
4014
|
-
return /* @__PURE__ */ (0,
|
|
4202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4015
4203
|
"div",
|
|
4016
4204
|
{
|
|
4017
4205
|
role: "alert",
|
|
@@ -4025,20 +4213,20 @@ var Toast = ({
|
|
|
4025
4213
|
),
|
|
4026
4214
|
...props,
|
|
4027
4215
|
children: [
|
|
4028
|
-
/* @__PURE__ */ (0,
|
|
4029
|
-
/* @__PURE__ */ (0,
|
|
4030
|
-
/* @__PURE__ */ (0,
|
|
4031
|
-
/* @__PURE__ */ (0,
|
|
4032
|
-
description && /* @__PURE__ */ (0,
|
|
4216
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-row items-start gap-3", children: [
|
|
4217
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "mt-1", "data-testid": `toast-icon-${action}`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconAction, {}) }),
|
|
4218
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col items-start justify-start", children: [
|
|
4219
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "font-semibold text-md", children: title }),
|
|
4220
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-md text-text-900", children: description })
|
|
4033
4221
|
] })
|
|
4034
4222
|
] }),
|
|
4035
|
-
/* @__PURE__ */ (0,
|
|
4223
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4036
4224
|
"button",
|
|
4037
4225
|
{
|
|
4038
4226
|
onClick: onClose,
|
|
4039
4227
|
"aria-label": "Dismiss notification",
|
|
4040
4228
|
className: "text-background-500 cursor-pointer opacity-0 group-hover:opacity-100 transition-opacity",
|
|
4041
|
-
children: /* @__PURE__ */ (0,
|
|
4229
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.X, {})
|
|
4042
4230
|
}
|
|
4043
4231
|
)
|
|
4044
4232
|
]
|
|
@@ -4066,11 +4254,11 @@ var useToastStore = (0, import_zustand4.create)((set) => ({
|
|
|
4066
4254
|
var ToastStore_default = useToastStore;
|
|
4067
4255
|
|
|
4068
4256
|
// src/components/Toast/utils/Toaster.tsx
|
|
4069
|
-
var
|
|
4257
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
4070
4258
|
var Toaster = () => {
|
|
4071
4259
|
const toasts = ToastStore_default((state) => state.toasts);
|
|
4072
4260
|
const removeToast = ToastStore_default((state) => state.removeToast);
|
|
4073
|
-
return /* @__PURE__ */ (0,
|
|
4261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children: toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4074
4262
|
Toast_default,
|
|
4075
4263
|
{
|
|
4076
4264
|
title: toast.title,
|
|
@@ -4087,19 +4275,19 @@ var Toaster_default = Toaster;
|
|
|
4087
4275
|
|
|
4088
4276
|
// src/components/Search/Search.tsx
|
|
4089
4277
|
var import_phosphor_react16 = require("phosphor-react");
|
|
4090
|
-
var
|
|
4278
|
+
var import_react21 = require("react");
|
|
4091
4279
|
|
|
4092
4280
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
4093
4281
|
var import_phosphor_react15 = require("phosphor-react");
|
|
4094
|
-
var
|
|
4282
|
+
var import_react20 = require("react");
|
|
4095
4283
|
var import_zustand6 = require("zustand");
|
|
4096
4284
|
|
|
4097
4285
|
// src/components/ThemeToggle/ThemeToggle.tsx
|
|
4098
4286
|
var import_phosphor_react14 = require("phosphor-react");
|
|
4099
|
-
var
|
|
4287
|
+
var import_react19 = require("react");
|
|
4100
4288
|
|
|
4101
4289
|
// src/hooks/useTheme.ts
|
|
4102
|
-
var
|
|
4290
|
+
var import_react18 = require("react");
|
|
4103
4291
|
|
|
4104
4292
|
// src/store/themeStore.ts
|
|
4105
4293
|
var import_zustand5 = require("zustand");
|
|
@@ -4203,7 +4391,7 @@ var useTheme = () => {
|
|
|
4203
4391
|
initializeTheme,
|
|
4204
4392
|
handleSystemThemeChange
|
|
4205
4393
|
} = useThemeStore();
|
|
4206
|
-
(0,
|
|
4394
|
+
(0, import_react18.useEffect)(() => {
|
|
4207
4395
|
initializeTheme();
|
|
4208
4396
|
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
4209
4397
|
mediaQuery.addEventListener("change", handleSystemThemeChange);
|
|
@@ -4220,31 +4408,31 @@ var useTheme = () => {
|
|
|
4220
4408
|
};
|
|
4221
4409
|
|
|
4222
4410
|
// src/components/ThemeToggle/ThemeToggle.tsx
|
|
4223
|
-
var
|
|
4411
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4224
4412
|
var ThemeToggle = ({
|
|
4225
4413
|
variant = "default",
|
|
4226
4414
|
onToggle
|
|
4227
4415
|
}) => {
|
|
4228
4416
|
const { themeMode, setTheme } = useTheme();
|
|
4229
|
-
const [tempTheme, setTempTheme] = (0,
|
|
4230
|
-
(0,
|
|
4417
|
+
const [tempTheme, setTempTheme] = (0, import_react19.useState)(themeMode);
|
|
4418
|
+
(0, import_react19.useEffect)(() => {
|
|
4231
4419
|
setTempTheme(themeMode);
|
|
4232
4420
|
}, [themeMode]);
|
|
4233
4421
|
const problemTypes = [
|
|
4234
4422
|
{
|
|
4235
4423
|
id: "light",
|
|
4236
4424
|
title: "Claro",
|
|
4237
|
-
icon: /* @__PURE__ */ (0,
|
|
4425
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_phosphor_react14.Sun, { size: 24 })
|
|
4238
4426
|
},
|
|
4239
4427
|
{
|
|
4240
4428
|
id: "dark",
|
|
4241
4429
|
title: "Escuro",
|
|
4242
|
-
icon: /* @__PURE__ */ (0,
|
|
4430
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_phosphor_react14.Moon, { size: 24 })
|
|
4243
4431
|
},
|
|
4244
4432
|
{
|
|
4245
4433
|
id: "system",
|
|
4246
4434
|
title: "Sistema",
|
|
4247
|
-
icon: /* @__PURE__ */ (0,
|
|
4435
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4248
4436
|
"svg",
|
|
4249
4437
|
{
|
|
4250
4438
|
width: "25",
|
|
@@ -4252,7 +4440,7 @@ var ThemeToggle = ({
|
|
|
4252
4440
|
viewBox: "0 0 25 25",
|
|
4253
4441
|
fill: "none",
|
|
4254
4442
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4255
|
-
children: /* @__PURE__ */ (0,
|
|
4443
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4256
4444
|
"path",
|
|
4257
4445
|
{
|
|
4258
4446
|
d: "M12.5 2.75C15.085 2.75276 17.5637 3.78054 19.3916 5.6084C21.2195 7.43628 22.2473 9.915 22.25 12.5C22.25 14.4284 21.6778 16.3136 20.6064 17.917C19.5352 19.5201 18.0128 20.7699 16.2314 21.5078C14.4499 22.2458 12.489 22.4387 10.5977 22.0625C8.70642 21.6863 6.96899 20.758 5.60547 19.3945C4.24197 18.031 3.31374 16.2936 2.9375 14.4023C2.56129 12.511 2.75423 10.5501 3.49219 8.76855C4.23012 6.98718 5.47982 5.46483 7.08301 4.39355C8.68639 3.32221 10.5716 2.75 12.5 2.75ZM11.75 4.28516C9.70145 4.47452 7.7973 5.42115 6.41016 6.94043C5.02299 8.4599 4.25247 10.4426 4.25 12.5C4.25247 14.5574 5.02299 16.5401 6.41016 18.0596C7.7973 19.5789 9.70145 20.5255 11.75 20.7148V4.28516Z",
|
|
@@ -4274,7 +4462,7 @@ var ThemeToggle = ({
|
|
|
4274
4462
|
}
|
|
4275
4463
|
};
|
|
4276
4464
|
const currentTheme = variant === "with-save" ? tempTheme : themeMode;
|
|
4277
|
-
return /* @__PURE__ */ (0,
|
|
4465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex flex-row gap-2 sm:gap-4 py-2", children: problemTypes.map((type) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4278
4466
|
SelectionButton_default,
|
|
4279
4467
|
{
|
|
4280
4468
|
icon: type.icon,
|
|
@@ -4288,7 +4476,7 @@ var ThemeToggle = ({
|
|
|
4288
4476
|
};
|
|
4289
4477
|
|
|
4290
4478
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
4291
|
-
var
|
|
4479
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
4292
4480
|
function createDropdownStore() {
|
|
4293
4481
|
return (0, import_zustand6.create)((set) => ({
|
|
4294
4482
|
open: false,
|
|
@@ -4304,8 +4492,8 @@ var useDropdownStore = (externalStore) => {
|
|
|
4304
4492
|
return externalStore;
|
|
4305
4493
|
};
|
|
4306
4494
|
var injectStore3 = (children, store) => {
|
|
4307
|
-
return
|
|
4308
|
-
if ((0,
|
|
4495
|
+
return import_react20.Children.map(children, (child) => {
|
|
4496
|
+
if ((0, import_react20.isValidElement)(child)) {
|
|
4309
4497
|
const typedChild = child;
|
|
4310
4498
|
const displayName = typedChild.type.displayName;
|
|
4311
4499
|
const allowed = [
|
|
@@ -4327,7 +4515,7 @@ var injectStore3 = (children, store) => {
|
|
|
4327
4515
|
if (typedChild.props.children) {
|
|
4328
4516
|
newProps.children = injectStore3(typedChild.props.children, store);
|
|
4329
4517
|
}
|
|
4330
|
-
return (0,
|
|
4518
|
+
return (0, import_react20.cloneElement)(typedChild, newProps);
|
|
4331
4519
|
}
|
|
4332
4520
|
return child;
|
|
4333
4521
|
});
|
|
@@ -4337,14 +4525,14 @@ var DropdownMenu = ({
|
|
|
4337
4525
|
open: propOpen,
|
|
4338
4526
|
onOpenChange
|
|
4339
4527
|
}) => {
|
|
4340
|
-
const storeRef = (0,
|
|
4528
|
+
const storeRef = (0, import_react20.useRef)(null);
|
|
4341
4529
|
storeRef.current ??= createDropdownStore();
|
|
4342
4530
|
const store = storeRef.current;
|
|
4343
4531
|
const { open, setOpen: storeSetOpen } = (0, import_zustand6.useStore)(store, (s) => s);
|
|
4344
4532
|
const setOpen = (newOpen) => {
|
|
4345
4533
|
storeSetOpen(newOpen);
|
|
4346
4534
|
};
|
|
4347
|
-
const menuRef = (0,
|
|
4535
|
+
const menuRef = (0, import_react20.useRef)(null);
|
|
4348
4536
|
const handleArrowDownOrArrowUp = (event) => {
|
|
4349
4537
|
const menuContent = menuRef.current?.querySelector('[role="menu"]');
|
|
4350
4538
|
if (menuContent) {
|
|
@@ -4378,7 +4566,7 @@ var DropdownMenu = ({
|
|
|
4378
4566
|
setOpen(false);
|
|
4379
4567
|
}
|
|
4380
4568
|
};
|
|
4381
|
-
(0,
|
|
4569
|
+
(0, import_react20.useEffect)(() => {
|
|
4382
4570
|
if (open) {
|
|
4383
4571
|
document.addEventListener("pointerdown", handleClickOutside);
|
|
4384
4572
|
document.addEventListener("keydown", handleDownkey);
|
|
@@ -4388,15 +4576,15 @@ var DropdownMenu = ({
|
|
|
4388
4576
|
document.removeEventListener("keydown", handleDownkey);
|
|
4389
4577
|
};
|
|
4390
4578
|
}, [open]);
|
|
4391
|
-
(0,
|
|
4579
|
+
(0, import_react20.useEffect)(() => {
|
|
4392
4580
|
onOpenChange?.(open);
|
|
4393
4581
|
}, [open, onOpenChange]);
|
|
4394
|
-
(0,
|
|
4582
|
+
(0, import_react20.useEffect)(() => {
|
|
4395
4583
|
if (propOpen !== void 0) {
|
|
4396
4584
|
setOpen(propOpen);
|
|
4397
4585
|
}
|
|
4398
4586
|
}, [propOpen]);
|
|
4399
|
-
return /* @__PURE__ */ (0,
|
|
4587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "relative", ref: menuRef, children: injectStore3(children, store) });
|
|
4400
4588
|
};
|
|
4401
4589
|
var DropdownMenuTrigger = ({
|
|
4402
4590
|
className,
|
|
@@ -4408,7 +4596,7 @@ var DropdownMenuTrigger = ({
|
|
|
4408
4596
|
const store = useDropdownStore(externalStore);
|
|
4409
4597
|
const open = (0, import_zustand6.useStore)(store, (s) => s.open);
|
|
4410
4598
|
const toggleOpen = () => store.setState({ open: !open });
|
|
4411
|
-
return /* @__PURE__ */ (0,
|
|
4599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4412
4600
|
"div",
|
|
4413
4601
|
{
|
|
4414
4602
|
onClick: (e) => {
|
|
@@ -4452,8 +4640,8 @@ var MENUCONTENT_VARIANT_CLASSES = {
|
|
|
4452
4640
|
menu: "p-1",
|
|
4453
4641
|
profile: "p-6"
|
|
4454
4642
|
};
|
|
4455
|
-
var MenuLabel = (0,
|
|
4456
|
-
return /* @__PURE__ */ (0,
|
|
4643
|
+
var MenuLabel = (0, import_react20.forwardRef)(({ className, inset, store: _store, ...props }, ref) => {
|
|
4644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4457
4645
|
"div",
|
|
4458
4646
|
{
|
|
4459
4647
|
ref,
|
|
@@ -4463,7 +4651,7 @@ var MenuLabel = (0, import_react19.forwardRef)(({ className, inset, store: _stor
|
|
|
4463
4651
|
);
|
|
4464
4652
|
});
|
|
4465
4653
|
MenuLabel.displayName = "MenuLabel";
|
|
4466
|
-
var DropdownMenuContent = (0,
|
|
4654
|
+
var DropdownMenuContent = (0, import_react20.forwardRef)(
|
|
4467
4655
|
({
|
|
4468
4656
|
className,
|
|
4469
4657
|
align = "start",
|
|
@@ -4476,8 +4664,8 @@ var DropdownMenuContent = (0, import_react19.forwardRef)(
|
|
|
4476
4664
|
}, ref) => {
|
|
4477
4665
|
const store = useDropdownStore(externalStore);
|
|
4478
4666
|
const open = (0, import_zustand6.useStore)(store, (s) => s.open);
|
|
4479
|
-
const [isVisible, setIsVisible] = (0,
|
|
4480
|
-
(0,
|
|
4667
|
+
const [isVisible, setIsVisible] = (0, import_react20.useState)(open);
|
|
4668
|
+
(0, import_react20.useEffect)(() => {
|
|
4481
4669
|
if (open) {
|
|
4482
4670
|
setIsVisible(true);
|
|
4483
4671
|
} else {
|
|
@@ -4492,7 +4680,7 @@ var DropdownMenuContent = (0, import_react19.forwardRef)(
|
|
|
4492
4680
|
return `absolute ${vertical} ${horizontal}`;
|
|
4493
4681
|
};
|
|
4494
4682
|
const variantClasses = MENUCONTENT_VARIANT_CLASSES[variant];
|
|
4495
|
-
return /* @__PURE__ */ (0,
|
|
4683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4496
4684
|
"div",
|
|
4497
4685
|
{
|
|
4498
4686
|
ref,
|
|
@@ -4517,7 +4705,7 @@ var DropdownMenuContent = (0, import_react19.forwardRef)(
|
|
|
4517
4705
|
}
|
|
4518
4706
|
);
|
|
4519
4707
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
4520
|
-
var DropdownMenuItem = (0,
|
|
4708
|
+
var DropdownMenuItem = (0, import_react20.forwardRef)(
|
|
4521
4709
|
({
|
|
4522
4710
|
className,
|
|
4523
4711
|
size = "small",
|
|
@@ -4561,7 +4749,7 @@ var DropdownMenuItem = (0, import_react19.forwardRef)(
|
|
|
4561
4749
|
const getVariantProps = () => {
|
|
4562
4750
|
return variant === "profile" ? { "data-variant": "profile" } : {};
|
|
4563
4751
|
};
|
|
4564
|
-
return /* @__PURE__ */ (0,
|
|
4752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
4565
4753
|
"div",
|
|
4566
4754
|
{
|
|
4567
4755
|
ref,
|
|
@@ -4587,7 +4775,7 @@ var DropdownMenuItem = (0, import_react19.forwardRef)(
|
|
|
4587
4775
|
...props,
|
|
4588
4776
|
children: [
|
|
4589
4777
|
iconLeft,
|
|
4590
|
-
/* @__PURE__ */ (0,
|
|
4778
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-full", children }),
|
|
4591
4779
|
iconRight
|
|
4592
4780
|
]
|
|
4593
4781
|
}
|
|
@@ -4595,7 +4783,7 @@ var DropdownMenuItem = (0, import_react19.forwardRef)(
|
|
|
4595
4783
|
}
|
|
4596
4784
|
);
|
|
4597
4785
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
4598
|
-
var DropdownMenuSeparator = (0,
|
|
4786
|
+
var DropdownMenuSeparator = (0, import_react20.forwardRef)(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4599
4787
|
"div",
|
|
4600
4788
|
{
|
|
4601
4789
|
ref,
|
|
@@ -4604,11 +4792,11 @@ var DropdownMenuSeparator = (0, import_react19.forwardRef)(({ className, store:
|
|
|
4604
4792
|
}
|
|
4605
4793
|
));
|
|
4606
4794
|
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
4607
|
-
var ProfileMenuTrigger = (0,
|
|
4795
|
+
var ProfileMenuTrigger = (0, import_react20.forwardRef)(({ className, onClick, store: externalStore, ...props }, ref) => {
|
|
4608
4796
|
const store = useDropdownStore(externalStore);
|
|
4609
4797
|
const open = (0, import_zustand6.useStore)(store, (s) => s.open);
|
|
4610
4798
|
const toggleOpen = () => store.setState({ open: !open });
|
|
4611
|
-
return /* @__PURE__ */ (0,
|
|
4799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4612
4800
|
"button",
|
|
4613
4801
|
{
|
|
4614
4802
|
ref,
|
|
@@ -4623,13 +4811,13 @@ var ProfileMenuTrigger = (0, import_react19.forwardRef)(({ className, onClick, s
|
|
|
4623
4811
|
},
|
|
4624
4812
|
"aria-expanded": open,
|
|
4625
4813
|
...props,
|
|
4626
|
-
children: /* @__PURE__ */ (0,
|
|
4814
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "size-6 rounded-full bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_phosphor_react15.User, { className: "text-primary-950", size: 18 }) })
|
|
4627
4815
|
}
|
|
4628
4816
|
);
|
|
4629
4817
|
});
|
|
4630
4818
|
ProfileMenuTrigger.displayName = "ProfileMenuTrigger";
|
|
4631
|
-
var ProfileMenuHeader = (0,
|
|
4632
|
-
return /* @__PURE__ */ (0,
|
|
4819
|
+
var ProfileMenuHeader = (0, import_react20.forwardRef)(({ className, name, email, photoUrl, store: _store, ...props }, ref) => {
|
|
4820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
4633
4821
|
"div",
|
|
4634
4822
|
{
|
|
4635
4823
|
ref,
|
|
@@ -4640,16 +4828,16 @@ var ProfileMenuHeader = (0, import_react19.forwardRef)(({ className, name, email
|
|
|
4640
4828
|
),
|
|
4641
4829
|
...props,
|
|
4642
4830
|
children: [
|
|
4643
|
-
/* @__PURE__ */ (0,
|
|
4831
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "w-16 h-16 bg-primary-100 rounded-full flex items-center justify-center overflow-hidden flex-shrink-0", children: photoUrl ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4644
4832
|
"img",
|
|
4645
4833
|
{
|
|
4646
4834
|
src: photoUrl,
|
|
4647
4835
|
alt: "Foto de perfil",
|
|
4648
4836
|
className: "w-full h-full object-cover"
|
|
4649
4837
|
}
|
|
4650
|
-
) : /* @__PURE__ */ (0,
|
|
4651
|
-
/* @__PURE__ */ (0,
|
|
4652
|
-
/* @__PURE__ */ (0,
|
|
4838
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_phosphor_react15.User, { size: 34, className: "text-primary-800" }) }),
|
|
4839
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col min-w-0", children: [
|
|
4840
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4653
4841
|
Text_default,
|
|
4654
4842
|
{
|
|
4655
4843
|
size: "xl",
|
|
@@ -4659,14 +4847,14 @@ var ProfileMenuHeader = (0, import_react19.forwardRef)(({ className, name, email
|
|
|
4659
4847
|
children: name
|
|
4660
4848
|
}
|
|
4661
4849
|
),
|
|
4662
|
-
/* @__PURE__ */ (0,
|
|
4850
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text_default, { size: "md", color: "text-text-600", className: "truncate", children: email })
|
|
4663
4851
|
] })
|
|
4664
4852
|
]
|
|
4665
4853
|
}
|
|
4666
4854
|
);
|
|
4667
4855
|
});
|
|
4668
4856
|
ProfileMenuHeader.displayName = "ProfileMenuHeader";
|
|
4669
|
-
var ProfileMenuInfo = (0,
|
|
4857
|
+
var ProfileMenuInfo = (0, import_react20.forwardRef)(
|
|
4670
4858
|
({
|
|
4671
4859
|
className,
|
|
4672
4860
|
schoolName,
|
|
@@ -4675,7 +4863,7 @@ var ProfileMenuInfo = (0, import_react19.forwardRef)(
|
|
|
4675
4863
|
store: _store,
|
|
4676
4864
|
...props
|
|
4677
4865
|
}, ref) => {
|
|
4678
|
-
return /* @__PURE__ */ (0,
|
|
4866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
4679
4867
|
"div",
|
|
4680
4868
|
{
|
|
4681
4869
|
ref,
|
|
@@ -4683,13 +4871,13 @@ var ProfileMenuInfo = (0, import_react19.forwardRef)(
|
|
|
4683
4871
|
className: cn("flex flex-row gap-4 items-center", className),
|
|
4684
4872
|
...props,
|
|
4685
4873
|
children: [
|
|
4686
|
-
/* @__PURE__ */ (0,
|
|
4687
|
-
/* @__PURE__ */ (0,
|
|
4688
|
-
/* @__PURE__ */ (0,
|
|
4689
|
-
/* @__PURE__ */ (0,
|
|
4690
|
-
/* @__PURE__ */ (0,
|
|
4691
|
-
/* @__PURE__ */ (0,
|
|
4692
|
-
/* @__PURE__ */ (0,
|
|
4874
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "w-16 h-16" }),
|
|
4875
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col ", children: [
|
|
4876
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text_default, { size: "md", color: "text-text-600", children: schoolName }),
|
|
4877
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "flex flex-row items-center gap-2", children: [
|
|
4878
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text_default, { size: "md", color: "text-text-600", children: classYearName }),
|
|
4879
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-text-600 text-xs align-middle", children: "\u25CF" }),
|
|
4880
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text_default, { size: "md", color: "text-text-600", children: schoolYearName })
|
|
4693
4881
|
] })
|
|
4694
4882
|
] })
|
|
4695
4883
|
]
|
|
@@ -4703,9 +4891,9 @@ var ProfileToggleTheme = ({
|
|
|
4703
4891
|
...props
|
|
4704
4892
|
}) => {
|
|
4705
4893
|
const { themeMode, setTheme } = useTheme();
|
|
4706
|
-
const [modalThemeToggle, setModalThemeToggle] = (0,
|
|
4707
|
-
const [selectedTheme, setSelectedTheme] = (0,
|
|
4708
|
-
const internalStoreRef = (0,
|
|
4894
|
+
const [modalThemeToggle, setModalThemeToggle] = (0, import_react20.useState)(false);
|
|
4895
|
+
const [selectedTheme, setSelectedTheme] = (0, import_react20.useState)(themeMode);
|
|
4896
|
+
const internalStoreRef = (0, import_react20.useRef)(null);
|
|
4709
4897
|
internalStoreRef.current ??= createDropdownStore();
|
|
4710
4898
|
const store = externalStore ?? internalStoreRef.current;
|
|
4711
4899
|
const setOpen = (0, import_zustand6.useStore)(store, (s) => s.setOpen);
|
|
@@ -4724,14 +4912,14 @@ var ProfileToggleTheme = ({
|
|
|
4724
4912
|
setModalThemeToggle(false);
|
|
4725
4913
|
setOpen(false);
|
|
4726
4914
|
};
|
|
4727
|
-
return /* @__PURE__ */ (0,
|
|
4728
|
-
/* @__PURE__ */ (0,
|
|
4915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
|
|
4916
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4729
4917
|
DropdownMenuItem,
|
|
4730
4918
|
{
|
|
4731
4919
|
variant: "profile",
|
|
4732
4920
|
preventClose: true,
|
|
4733
4921
|
store,
|
|
4734
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
4922
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4735
4923
|
"svg",
|
|
4736
4924
|
{
|
|
4737
4925
|
width: "24",
|
|
@@ -4739,7 +4927,7 @@ var ProfileToggleTheme = ({
|
|
|
4739
4927
|
viewBox: "0 0 25 25",
|
|
4740
4928
|
fill: "none",
|
|
4741
4929
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4742
|
-
children: /* @__PURE__ */ (0,
|
|
4930
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4743
4931
|
"path",
|
|
4744
4932
|
{
|
|
4745
4933
|
d: "M12.5 2.75C15.085 2.75276 17.5637 3.78054 19.3916 5.6084C21.2195 7.43628 22.2473 9.915 22.25 12.5C22.25 14.4284 21.6778 16.3136 20.6064 17.917C19.5352 19.5201 18.0128 20.7699 16.2314 21.5078C14.4499 22.2458 12.489 22.4387 10.5977 22.0625C8.70642 21.6863 6.96899 20.758 5.60547 19.3945C4.24197 18.031 3.31374 16.2936 2.9375 14.4023C2.56129 12.511 2.75423 10.5501 3.49219 8.76855C4.23012 6.98718 5.47982 5.46483 7.08301 4.39355C8.68639 3.32221 10.5716 2.75 12.5 2.75ZM11.75 4.28516C9.70145 4.47452 7.7973 5.42115 6.41016 6.94043C5.02299 8.4599 4.25247 10.4426 4.25 12.5C4.25247 14.5574 5.02299 16.5401 6.41016 18.0596C7.7973 19.5789 9.70145 20.5255 11.75 20.7148V4.28516Z",
|
|
@@ -4748,7 +4936,7 @@ var ProfileToggleTheme = ({
|
|
|
4748
4936
|
)
|
|
4749
4937
|
}
|
|
4750
4938
|
),
|
|
4751
|
-
iconRight: /* @__PURE__ */ (0,
|
|
4939
|
+
iconRight: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_phosphor_react15.CaretRight, {}),
|
|
4752
4940
|
onClick: handleClick,
|
|
4753
4941
|
onKeyDown: (e) => {
|
|
4754
4942
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -4758,31 +4946,31 @@ var ProfileToggleTheme = ({
|
|
|
4758
4946
|
}
|
|
4759
4947
|
},
|
|
4760
4948
|
...props,
|
|
4761
|
-
children: /* @__PURE__ */ (0,
|
|
4949
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text_default, { size: "md", color: "text-text-700", children: "Apar\xEAncia" })
|
|
4762
4950
|
}
|
|
4763
4951
|
),
|
|
4764
|
-
/* @__PURE__ */ (0,
|
|
4952
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4765
4953
|
Modal_default,
|
|
4766
4954
|
{
|
|
4767
4955
|
isOpen: modalThemeToggle,
|
|
4768
4956
|
onClose: handleCancel,
|
|
4769
4957
|
title: "Apar\xEAncia",
|
|
4770
4958
|
size: "md",
|
|
4771
|
-
footer: /* @__PURE__ */ (0,
|
|
4772
|
-
/* @__PURE__ */ (0,
|
|
4773
|
-
/* @__PURE__ */ (0,
|
|
4959
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex gap-3", children: [
|
|
4960
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Button_default, { variant: "outline", onClick: handleCancel, children: "Cancelar" }),
|
|
4961
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Button_default, { variant: "solid", onClick: handleSave, children: "Salvar" })
|
|
4774
4962
|
] }),
|
|
4775
|
-
children: /* @__PURE__ */ (0,
|
|
4776
|
-
/* @__PURE__ */ (0,
|
|
4777
|
-
/* @__PURE__ */ (0,
|
|
4963
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col", children: [
|
|
4964
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-sm text-text-500", children: "Escolha o tema:" }),
|
|
4965
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ThemeToggle, { variant: "with-save", onToggle: setSelectedTheme })
|
|
4778
4966
|
] })
|
|
4779
4967
|
}
|
|
4780
4968
|
)
|
|
4781
4969
|
] });
|
|
4782
4970
|
};
|
|
4783
4971
|
ProfileToggleTheme.displayName = "ProfileToggleTheme";
|
|
4784
|
-
var ProfileMenuSection = (0,
|
|
4785
|
-
return /* @__PURE__ */ (0,
|
|
4972
|
+
var ProfileMenuSection = (0, import_react20.forwardRef)(({ className, children, store: _store, ...props }, ref) => {
|
|
4973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { ref, className: cn("flex flex-col p-2", className), ...props, children });
|
|
4786
4974
|
});
|
|
4787
4975
|
ProfileMenuSection.displayName = "ProfileMenuSection";
|
|
4788
4976
|
var ProfileMenuFooter = ({
|
|
@@ -4794,7 +4982,7 @@ var ProfileMenuFooter = ({
|
|
|
4794
4982
|
}) => {
|
|
4795
4983
|
const store = useDropdownStore(externalStore);
|
|
4796
4984
|
const setOpen = (0, import_zustand6.useStore)(store, (s) => s.setOpen);
|
|
4797
|
-
return /* @__PURE__ */ (0,
|
|
4985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
4798
4986
|
Button_default,
|
|
4799
4987
|
{
|
|
4800
4988
|
variant: "outline",
|
|
@@ -4806,8 +4994,8 @@ var ProfileMenuFooter = ({
|
|
|
4806
4994
|
},
|
|
4807
4995
|
...props,
|
|
4808
4996
|
children: [
|
|
4809
|
-
/* @__PURE__ */ (0,
|
|
4810
|
-
/* @__PURE__ */ (0,
|
|
4997
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_phosphor_react15.SignOut, { className: "text-inherit" }) }),
|
|
4998
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text_default, { color: "inherit", children: "Sair" })
|
|
4811
4999
|
]
|
|
4812
5000
|
}
|
|
4813
5001
|
);
|
|
@@ -4816,7 +5004,7 @@ ProfileMenuFooter.displayName = "ProfileMenuFooter";
|
|
|
4816
5004
|
var DropdownMenu_default = DropdownMenu;
|
|
4817
5005
|
|
|
4818
5006
|
// src/components/Search/Search.tsx
|
|
4819
|
-
var
|
|
5007
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4820
5008
|
var filterOptions = (options, query) => {
|
|
4821
5009
|
if (!query || query.length < 1) return [];
|
|
4822
5010
|
return options.filter(
|
|
@@ -4841,7 +5029,7 @@ var updateInputValue = (value, ref, onChange) => {
|
|
|
4841
5029
|
onChange(event);
|
|
4842
5030
|
}
|
|
4843
5031
|
};
|
|
4844
|
-
var Search = (0,
|
|
5032
|
+
var Search = (0, import_react21.forwardRef)(
|
|
4845
5033
|
({
|
|
4846
5034
|
options = [],
|
|
4847
5035
|
onSelect,
|
|
@@ -4862,13 +5050,13 @@ var Search = (0, import_react20.forwardRef)(
|
|
|
4862
5050
|
onKeyDown: userOnKeyDown,
|
|
4863
5051
|
...props
|
|
4864
5052
|
}, ref) => {
|
|
4865
|
-
const [dropdownOpen, setDropdownOpen] = (0,
|
|
4866
|
-
const [forceClose, setForceClose] = (0,
|
|
4867
|
-
const justSelectedRef = (0,
|
|
4868
|
-
const dropdownStore = (0,
|
|
4869
|
-
const dropdownRef = (0,
|
|
4870
|
-
const inputElRef = (0,
|
|
4871
|
-
const filteredOptions = (0,
|
|
5053
|
+
const [dropdownOpen, setDropdownOpen] = (0, import_react21.useState)(false);
|
|
5054
|
+
const [forceClose, setForceClose] = (0, import_react21.useState)(false);
|
|
5055
|
+
const justSelectedRef = (0, import_react21.useRef)(false);
|
|
5056
|
+
const dropdownStore = (0, import_react21.useRef)(createDropdownStore()).current;
|
|
5057
|
+
const dropdownRef = (0, import_react21.useRef)(null);
|
|
5058
|
+
const inputElRef = (0, import_react21.useRef)(null);
|
|
5059
|
+
const filteredOptions = (0, import_react21.useMemo)(() => {
|
|
4872
5060
|
if (!options.length) {
|
|
4873
5061
|
return [];
|
|
4874
5062
|
}
|
|
@@ -4881,7 +5069,7 @@ var Search = (0, import_react20.forwardRef)(
|
|
|
4881
5069
|
dropdownStore.setState({ open });
|
|
4882
5070
|
onDropdownChange?.(open);
|
|
4883
5071
|
};
|
|
4884
|
-
(0,
|
|
5072
|
+
(0, import_react21.useEffect)(() => {
|
|
4885
5073
|
if (justSelectedRef.current) {
|
|
4886
5074
|
justSelectedRef.current = false;
|
|
4887
5075
|
return;
|
|
@@ -4900,7 +5088,7 @@ var Search = (0, import_react20.forwardRef)(
|
|
|
4900
5088
|
setOpenAndNotify(false);
|
|
4901
5089
|
updateInputValue(option, ref, onChange);
|
|
4902
5090
|
};
|
|
4903
|
-
(0,
|
|
5091
|
+
(0, import_react21.useEffect)(() => {
|
|
4904
5092
|
const handleClickOutside = (event) => {
|
|
4905
5093
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
4906
5094
|
setOpenAndNotify(false);
|
|
@@ -4913,7 +5101,7 @@ var Search = (0, import_react20.forwardRef)(
|
|
|
4913
5101
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
4914
5102
|
};
|
|
4915
5103
|
}, [showDropdown, dropdownStore, onDropdownChange]);
|
|
4916
|
-
const generatedId = (0,
|
|
5104
|
+
const generatedId = (0, import_react21.useId)();
|
|
4917
5105
|
const inputId = id ?? `search-${generatedId}`;
|
|
4918
5106
|
const dropdownId = `${inputId}-dropdown`;
|
|
4919
5107
|
const handleClear = () => {
|
|
@@ -4962,14 +5150,14 @@ var Search = (0, import_react20.forwardRef)(
|
|
|
4962
5150
|
const hasValue = String(value ?? "").length > 0;
|
|
4963
5151
|
const showClearButton = hasValue && !disabled && !readOnly;
|
|
4964
5152
|
const showSearchIcon = !hasValue && !disabled && !readOnly;
|
|
4965
|
-
return /* @__PURE__ */ (0,
|
|
5153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
4966
5154
|
"div",
|
|
4967
5155
|
{
|
|
4968
5156
|
ref: dropdownRef,
|
|
4969
5157
|
className: `w-full max-w-lg md:w-[488px] ${containerClassName}`,
|
|
4970
5158
|
children: [
|
|
4971
|
-
/* @__PURE__ */ (0,
|
|
4972
|
-
/* @__PURE__ */ (0,
|
|
5159
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "relative flex items-center", children: [
|
|
5160
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4973
5161
|
"input",
|
|
4974
5162
|
{
|
|
4975
5163
|
ref: (node) => {
|
|
@@ -4997,35 +5185,35 @@ var Search = (0, import_react20.forwardRef)(
|
|
|
4997
5185
|
...props
|
|
4998
5186
|
}
|
|
4999
5187
|
),
|
|
5000
|
-
showClearButton && /* @__PURE__ */ (0,
|
|
5188
|
+
showClearButton && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5001
5189
|
"button",
|
|
5002
5190
|
{
|
|
5003
5191
|
type: "button",
|
|
5004
5192
|
className: "p-0 border-0 bg-transparent cursor-pointer",
|
|
5005
5193
|
onMouseDown: handleClearClick,
|
|
5006
5194
|
"aria-label": "Limpar busca",
|
|
5007
|
-
children: /* @__PURE__ */ (0,
|
|
5195
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "w-6 h-6 text-text-800 flex items-center justify-center hover:text-text-600 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_phosphor_react16.X, {}) })
|
|
5008
5196
|
}
|
|
5009
5197
|
) }),
|
|
5010
|
-
showSearchIcon && /* @__PURE__ */ (0,
|
|
5198
|
+
showSearchIcon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5011
5199
|
"button",
|
|
5012
5200
|
{
|
|
5013
5201
|
type: "button",
|
|
5014
5202
|
className: "p-0 border-0 bg-transparent cursor-pointer",
|
|
5015
5203
|
onMouseDown: handleSearchIconClick,
|
|
5016
5204
|
"aria-label": "Buscar",
|
|
5017
|
-
children: /* @__PURE__ */ (0,
|
|
5205
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "w-6 h-6 text-text-800 flex items-center justify-center hover:text-text-600 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_phosphor_react16.MagnifyingGlass, {}) })
|
|
5018
5206
|
}
|
|
5019
5207
|
) })
|
|
5020
5208
|
] }),
|
|
5021
|
-
showDropdown && /* @__PURE__ */ (0,
|
|
5209
|
+
showDropdown && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenu_default, { open: showDropdown, onOpenChange: setDropdownOpen, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5022
5210
|
DropdownMenuContent,
|
|
5023
5211
|
{
|
|
5024
5212
|
id: dropdownId,
|
|
5025
5213
|
className: "w-full mt-1",
|
|
5026
5214
|
style: { maxHeight: dropdownMaxHeight },
|
|
5027
5215
|
align: "start",
|
|
5028
|
-
children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ (0,
|
|
5216
|
+
children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5029
5217
|
DropdownMenuItem,
|
|
5030
5218
|
{
|
|
5031
5219
|
onClick: () => handleSelectOption(option),
|
|
@@ -5033,7 +5221,7 @@ var Search = (0, import_react20.forwardRef)(
|
|
|
5033
5221
|
children: option
|
|
5034
5222
|
},
|
|
5035
5223
|
option
|
|
5036
|
-
)) : /* @__PURE__ */ (0,
|
|
5224
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "px-3 py-3 text-text-700 text-base", children: noResultsText })
|
|
5037
5225
|
}
|
|
5038
5226
|
) })
|
|
5039
5227
|
]
|
|
@@ -5046,7 +5234,7 @@ var Search_default = Search;
|
|
|
5046
5234
|
|
|
5047
5235
|
// src/components/Chips/Chips.tsx
|
|
5048
5236
|
var import_phosphor_react17 = require("phosphor-react");
|
|
5049
|
-
var
|
|
5237
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
5050
5238
|
var STATE_CLASSES5 = {
|
|
5051
5239
|
default: "bg-background text-text-950 border border-border-100 hover:bg-secondary-50 hover:border-border-300",
|
|
5052
5240
|
selected: "bg-info-background text-primary-950 border-2 border-primary-950 hover:bg-secondary-50 focus-visible:border-0"
|
|
@@ -5061,7 +5249,7 @@ var Chips = ({
|
|
|
5061
5249
|
}) => {
|
|
5062
5250
|
const stateClasses = selected ? STATE_CLASSES5.selected : STATE_CLASSES5.default;
|
|
5063
5251
|
const baseClasses = "inline-flex items-center justify-center rounded-full cursor-pointer font-normal text-sm px-4 py-2 gap-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-primary-600 disabled:opacity-40 disabled:cursor-not-allowed";
|
|
5064
|
-
return /* @__PURE__ */ (0,
|
|
5252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
5065
5253
|
"button",
|
|
5066
5254
|
{
|
|
5067
5255
|
className: cn(baseClasses, stateClasses, className),
|
|
@@ -5069,8 +5257,8 @@ var Chips = ({
|
|
|
5069
5257
|
type,
|
|
5070
5258
|
...props,
|
|
5071
5259
|
children: [
|
|
5072
|
-
selected && /* @__PURE__ */ (0,
|
|
5073
|
-
/* @__PURE__ */ (0,
|
|
5260
|
+
selected && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: `flex items-center`, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_phosphor_react17.Check, { weight: "bold", size: 16 }) }),
|
|
5261
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "flex-1", children })
|
|
5074
5262
|
]
|
|
5075
5263
|
}
|
|
5076
5264
|
);
|
|
@@ -5078,7 +5266,7 @@ var Chips = ({
|
|
|
5078
5266
|
var Chips_default = Chips;
|
|
5079
5267
|
|
|
5080
5268
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
5081
|
-
var
|
|
5269
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5082
5270
|
var SIZE_CLASSES8 = {
|
|
5083
5271
|
small: {
|
|
5084
5272
|
container: "h-1",
|
|
@@ -5190,20 +5378,20 @@ var renderStackedHitCountDisplay = (showHitCount, showPercentage, clampedValue,
|
|
|
5190
5378
|
max,
|
|
5191
5379
|
percentage
|
|
5192
5380
|
);
|
|
5193
|
-
return /* @__PURE__ */ (0,
|
|
5381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5194
5382
|
"div",
|
|
5195
5383
|
{
|
|
5196
5384
|
className: cn(
|
|
5197
5385
|
"text-xs font-medium leading-[14px] text-right",
|
|
5198
5386
|
percentageClassName
|
|
5199
5387
|
),
|
|
5200
|
-
children: displayPriority.type === "hitCount" ? /* @__PURE__ */ (0,
|
|
5201
|
-
/* @__PURE__ */ (0,
|
|
5202
|
-
/* @__PURE__ */ (0,
|
|
5388
|
+
children: displayPriority.type === "hitCount" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
5389
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-success-200", children: Math.round(clampedValue) }),
|
|
5390
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "text-text-600", children: [
|
|
5203
5391
|
" de ",
|
|
5204
5392
|
max
|
|
5205
5393
|
] })
|
|
5206
|
-
] }) : /* @__PURE__ */ (0,
|
|
5394
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Text_default, { size: "xs", weight: "medium", className: "text-success-200", children: [
|
|
5207
5395
|
Math.round(percentage),
|
|
5208
5396
|
"%"
|
|
5209
5397
|
] })
|
|
@@ -5218,7 +5406,7 @@ var ProgressBarBase = ({
|
|
|
5218
5406
|
variantClasses,
|
|
5219
5407
|
containerClassName,
|
|
5220
5408
|
fillClassName
|
|
5221
|
-
}) => /* @__PURE__ */ (0,
|
|
5409
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
5222
5410
|
"div",
|
|
5223
5411
|
{
|
|
5224
5412
|
className: cn(
|
|
@@ -5227,7 +5415,7 @@ var ProgressBarBase = ({
|
|
|
5227
5415
|
"overflow-hidden relative"
|
|
5228
5416
|
),
|
|
5229
5417
|
children: [
|
|
5230
|
-
/* @__PURE__ */ (0,
|
|
5418
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5231
5419
|
"progress",
|
|
5232
5420
|
{
|
|
5233
5421
|
value: clampedValue,
|
|
@@ -5236,7 +5424,7 @@ var ProgressBarBase = ({
|
|
|
5236
5424
|
className: "absolute inset-0 w-full h-full opacity-0"
|
|
5237
5425
|
}
|
|
5238
5426
|
),
|
|
5239
|
-
/* @__PURE__ */ (0,
|
|
5427
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5240
5428
|
"div",
|
|
5241
5429
|
{
|
|
5242
5430
|
className: cn(
|
|
@@ -5262,7 +5450,7 @@ var StackedLayout = ({
|
|
|
5262
5450
|
percentage,
|
|
5263
5451
|
variantClasses,
|
|
5264
5452
|
dimensions
|
|
5265
|
-
}) => /* @__PURE__ */ (0,
|
|
5453
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
5266
5454
|
"div",
|
|
5267
5455
|
{
|
|
5268
5456
|
className: cn(
|
|
@@ -5272,8 +5460,8 @@ var StackedLayout = ({
|
|
|
5272
5460
|
className
|
|
5273
5461
|
),
|
|
5274
5462
|
children: [
|
|
5275
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0,
|
|
5276
|
-
label && /* @__PURE__ */ (0,
|
|
5463
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-row justify-between items-center w-full h-[19px]", children: [
|
|
5464
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5277
5465
|
Text_default,
|
|
5278
5466
|
{
|
|
5279
5467
|
as: "div",
|
|
@@ -5292,7 +5480,7 @@ var StackedLayout = ({
|
|
|
5292
5480
|
percentageClassName
|
|
5293
5481
|
)
|
|
5294
5482
|
] }),
|
|
5295
|
-
/* @__PURE__ */ (0,
|
|
5483
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5296
5484
|
ProgressBarBase,
|
|
5297
5485
|
{
|
|
5298
5486
|
clampedValue,
|
|
@@ -5334,7 +5522,7 @@ var CompactLayout = ({
|
|
|
5334
5522
|
percentageClassName,
|
|
5335
5523
|
labelClassName
|
|
5336
5524
|
});
|
|
5337
|
-
return /* @__PURE__ */ (0,
|
|
5525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
5338
5526
|
"div",
|
|
5339
5527
|
{
|
|
5340
5528
|
className: cn(
|
|
@@ -5344,7 +5532,7 @@ var CompactLayout = ({
|
|
|
5344
5532
|
className
|
|
5345
5533
|
),
|
|
5346
5534
|
children: [
|
|
5347
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0,
|
|
5535
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5348
5536
|
Text_default,
|
|
5349
5537
|
{
|
|
5350
5538
|
as: "div",
|
|
@@ -5355,7 +5543,7 @@ var CompactLayout = ({
|
|
|
5355
5543
|
children: content
|
|
5356
5544
|
}
|
|
5357
5545
|
),
|
|
5358
|
-
/* @__PURE__ */ (0,
|
|
5546
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5359
5547
|
ProgressBarBase,
|
|
5360
5548
|
{
|
|
5361
5549
|
clampedValue,
|
|
@@ -5391,9 +5579,9 @@ var DefaultLayout = ({
|
|
|
5391
5579
|
label,
|
|
5392
5580
|
showPercentage
|
|
5393
5581
|
);
|
|
5394
|
-
return /* @__PURE__ */ (0,
|
|
5395
|
-
displayConfig.showHeader && /* @__PURE__ */ (0,
|
|
5396
|
-
label && /* @__PURE__ */ (0,
|
|
5582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: cn("flex", sizeClasses.layout, gapClass, className), children: [
|
|
5583
|
+
displayConfig.showHeader && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-row items-center justify-between w-full", children: [
|
|
5584
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5397
5585
|
Text_default,
|
|
5398
5586
|
{
|
|
5399
5587
|
as: "div",
|
|
@@ -5406,7 +5594,7 @@ var DefaultLayout = ({
|
|
|
5406
5594
|
children: label
|
|
5407
5595
|
}
|
|
5408
5596
|
),
|
|
5409
|
-
showPercentage && /* @__PURE__ */ (0,
|
|
5597
|
+
showPercentage && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
5410
5598
|
Text_default,
|
|
5411
5599
|
{
|
|
5412
5600
|
size: "xs",
|
|
@@ -5422,7 +5610,7 @@ var DefaultLayout = ({
|
|
|
5422
5610
|
}
|
|
5423
5611
|
)
|
|
5424
5612
|
] }),
|
|
5425
|
-
/* @__PURE__ */ (0,
|
|
5613
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5426
5614
|
ProgressBarBase,
|
|
5427
5615
|
{
|
|
5428
5616
|
clampedValue,
|
|
@@ -5442,7 +5630,7 @@ var DefaultLayout = ({
|
|
|
5442
5630
|
)
|
|
5443
5631
|
}
|
|
5444
5632
|
),
|
|
5445
|
-
displayConfig.showPercentage && /* @__PURE__ */ (0,
|
|
5633
|
+
displayConfig.showPercentage && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
5446
5634
|
Text_default,
|
|
5447
5635
|
{
|
|
5448
5636
|
size: "xs",
|
|
@@ -5457,7 +5645,7 @@ var DefaultLayout = ({
|
|
|
5457
5645
|
]
|
|
5458
5646
|
}
|
|
5459
5647
|
),
|
|
5460
|
-
displayConfig.showLabel && /* @__PURE__ */ (0,
|
|
5648
|
+
displayConfig.showLabel && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5461
5649
|
Text_default,
|
|
5462
5650
|
{
|
|
5463
5651
|
as: "div",
|
|
@@ -5493,7 +5681,7 @@ var ProgressBar = ({
|
|
|
5493
5681
|
const sizeClasses = SIZE_CLASSES8[size];
|
|
5494
5682
|
const variantClasses = VARIANT_CLASSES2[variant];
|
|
5495
5683
|
if (layout === "stacked") {
|
|
5496
|
-
return /* @__PURE__ */ (0,
|
|
5684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5497
5685
|
StackedLayout,
|
|
5498
5686
|
{
|
|
5499
5687
|
className,
|
|
@@ -5514,7 +5702,7 @@ var ProgressBar = ({
|
|
|
5514
5702
|
);
|
|
5515
5703
|
}
|
|
5516
5704
|
if (layout === "compact") {
|
|
5517
|
-
return /* @__PURE__ */ (0,
|
|
5705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5518
5706
|
CompactLayout,
|
|
5519
5707
|
{
|
|
5520
5708
|
className,
|
|
@@ -5534,7 +5722,7 @@ var ProgressBar = ({
|
|
|
5534
5722
|
}
|
|
5535
5723
|
);
|
|
5536
5724
|
}
|
|
5537
|
-
return /* @__PURE__ */ (0,
|
|
5725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5538
5726
|
DefaultLayout,
|
|
5539
5727
|
{
|
|
5540
5728
|
className,
|
|
@@ -5554,7 +5742,7 @@ var ProgressBar = ({
|
|
|
5554
5742
|
var ProgressBar_default = ProgressBar;
|
|
5555
5743
|
|
|
5556
5744
|
// src/components/ProgressCircle/ProgressCircle.tsx
|
|
5557
|
-
var
|
|
5745
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5558
5746
|
var SIZE_CLASSES9 = {
|
|
5559
5747
|
small: {
|
|
5560
5748
|
container: "w-[90px] h-[90px]",
|
|
@@ -5636,7 +5824,7 @@ var ProgressCircle = ({
|
|
|
5636
5824
|
const strokeDashoffset = circumference - percentage / 100 * circumference;
|
|
5637
5825
|
const center = size === "small" ? 45 : 76;
|
|
5638
5826
|
const svgSize = size === "small" ? 90 : 152;
|
|
5639
|
-
return /* @__PURE__ */ (0,
|
|
5827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
5640
5828
|
"div",
|
|
5641
5829
|
{
|
|
5642
5830
|
className: cn(
|
|
@@ -5646,7 +5834,7 @@ var ProgressCircle = ({
|
|
|
5646
5834
|
className
|
|
5647
5835
|
),
|
|
5648
5836
|
children: [
|
|
5649
|
-
/* @__PURE__ */ (0,
|
|
5837
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
5650
5838
|
"svg",
|
|
5651
5839
|
{
|
|
5652
5840
|
className: "absolute inset-0 transform -rotate-90",
|
|
@@ -5655,7 +5843,7 @@ var ProgressCircle = ({
|
|
|
5655
5843
|
viewBox: `0 0 ${svgSize} ${svgSize}`,
|
|
5656
5844
|
"aria-hidden": "true",
|
|
5657
5845
|
children: [
|
|
5658
|
-
/* @__PURE__ */ (0,
|
|
5846
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5659
5847
|
"circle",
|
|
5660
5848
|
{
|
|
5661
5849
|
cx: center,
|
|
@@ -5666,7 +5854,7 @@ var ProgressCircle = ({
|
|
|
5666
5854
|
className: cn(variantClasses.background, "rounded-lg")
|
|
5667
5855
|
}
|
|
5668
5856
|
),
|
|
5669
|
-
/* @__PURE__ */ (0,
|
|
5857
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5670
5858
|
"circle",
|
|
5671
5859
|
{
|
|
5672
5860
|
cx: center,
|
|
@@ -5686,7 +5874,7 @@ var ProgressCircle = ({
|
|
|
5686
5874
|
]
|
|
5687
5875
|
}
|
|
5688
5876
|
),
|
|
5689
|
-
/* @__PURE__ */ (0,
|
|
5877
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5690
5878
|
"progress",
|
|
5691
5879
|
{
|
|
5692
5880
|
value: clampedValue,
|
|
@@ -5695,7 +5883,7 @@ var ProgressCircle = ({
|
|
|
5695
5883
|
className: "absolute opacity-0 w-0 h-0"
|
|
5696
5884
|
}
|
|
5697
5885
|
),
|
|
5698
|
-
/* @__PURE__ */ (0,
|
|
5886
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
5699
5887
|
"div",
|
|
5700
5888
|
{
|
|
5701
5889
|
className: cn(
|
|
@@ -5704,7 +5892,7 @@ var ProgressCircle = ({
|
|
|
5704
5892
|
sizeClasses.contentWidth
|
|
5705
5893
|
),
|
|
5706
5894
|
children: [
|
|
5707
|
-
showPercentage && /* @__PURE__ */ (0,
|
|
5895
|
+
showPercentage && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
5708
5896
|
Text_default,
|
|
5709
5897
|
{
|
|
5710
5898
|
size: sizeClasses.textSize,
|
|
@@ -5720,7 +5908,7 @@ var ProgressCircle = ({
|
|
|
5720
5908
|
]
|
|
5721
5909
|
}
|
|
5722
5910
|
),
|
|
5723
|
-
label && /* @__PURE__ */ (0,
|
|
5911
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5724
5912
|
Text_default,
|
|
5725
5913
|
{
|
|
5726
5914
|
as: "span",
|
|
@@ -5745,7 +5933,7 @@ var ProgressCircle_default = ProgressCircle;
|
|
|
5745
5933
|
|
|
5746
5934
|
// src/components/Stepper/Stepper.tsx
|
|
5747
5935
|
var import_phosphor_react18 = require("phosphor-react");
|
|
5748
|
-
var
|
|
5936
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5749
5937
|
var SIZE_CLASSES10 = {
|
|
5750
5938
|
small: {
|
|
5751
5939
|
container: "gap-2",
|
|
@@ -5872,7 +6060,7 @@ var Step = ({
|
|
|
5872
6060
|
}
|
|
5873
6061
|
return `${step.label}${suffix}`;
|
|
5874
6062
|
};
|
|
5875
|
-
return /* @__PURE__ */ (0,
|
|
6063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
5876
6064
|
"div",
|
|
5877
6065
|
{
|
|
5878
6066
|
className: `
|
|
@@ -5885,7 +6073,7 @@ var Step = ({
|
|
|
5885
6073
|
overflow-visible
|
|
5886
6074
|
`,
|
|
5887
6075
|
children: [
|
|
5888
|
-
/* @__PURE__ */ (0,
|
|
6076
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5889
6077
|
"div",
|
|
5890
6078
|
{
|
|
5891
6079
|
className: `
|
|
@@ -5894,7 +6082,7 @@ var Step = ({
|
|
|
5894
6082
|
`
|
|
5895
6083
|
}
|
|
5896
6084
|
),
|
|
5897
|
-
/* @__PURE__ */ (0,
|
|
6085
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
5898
6086
|
"div",
|
|
5899
6087
|
{
|
|
5900
6088
|
className: `
|
|
@@ -5904,7 +6092,7 @@ var Step = ({
|
|
|
5904
6092
|
overflow-visible
|
|
5905
6093
|
`,
|
|
5906
6094
|
children: [
|
|
5907
|
-
/* @__PURE__ */ (0,
|
|
6095
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5908
6096
|
"div",
|
|
5909
6097
|
{
|
|
5910
6098
|
className: `
|
|
@@ -5913,7 +6101,7 @@ var Step = ({
|
|
|
5913
6101
|
flex-none transition-all duration-300 ease-out
|
|
5914
6102
|
`,
|
|
5915
6103
|
"aria-label": getAriaLabel(),
|
|
5916
|
-
children: isCompleted ? /* @__PURE__ */ (0,
|
|
6104
|
+
children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5917
6105
|
import_phosphor_react18.Check,
|
|
5918
6106
|
{
|
|
5919
6107
|
weight: "bold",
|
|
@@ -5922,7 +6110,7 @@ var Step = ({
|
|
|
5922
6110
|
w-2.5 h-2.5 sm:w-3 sm:h-3 md:w-3 md:h-3 lg:w-3.5 lg:h-3.5
|
|
5923
6111
|
`
|
|
5924
6112
|
}
|
|
5925
|
-
) : /* @__PURE__ */ (0,
|
|
6113
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5926
6114
|
Text_default,
|
|
5927
6115
|
{
|
|
5928
6116
|
size: sizeClasses.indicatorTextSize,
|
|
@@ -5934,7 +6122,7 @@ var Step = ({
|
|
|
5934
6122
|
)
|
|
5935
6123
|
}
|
|
5936
6124
|
),
|
|
5937
|
-
/* @__PURE__ */ (0,
|
|
6125
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5938
6126
|
Text_default,
|
|
5939
6127
|
{
|
|
5940
6128
|
size: sizeClasses.labelTextSize,
|
|
@@ -5986,7 +6174,7 @@ var Stepper = ({
|
|
|
5986
6174
|
}) => {
|
|
5987
6175
|
const sizeClasses = SIZE_CLASSES10[size];
|
|
5988
6176
|
const steps = currentStep !== void 0 ? calculateStepStates(initialSteps, currentStep) : initialSteps;
|
|
5989
|
-
return /* @__PURE__ */ (0,
|
|
6177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
5990
6178
|
"fieldset",
|
|
5991
6179
|
{
|
|
5992
6180
|
className: cn(
|
|
@@ -5995,8 +6183,8 @@ var Stepper = ({
|
|
|
5995
6183
|
"border-0 p-0 m-0"
|
|
5996
6184
|
),
|
|
5997
6185
|
children: [
|
|
5998
|
-
/* @__PURE__ */ (0,
|
|
5999
|
-
showProgress && currentStep !== void 0 && /* @__PURE__ */ (0,
|
|
6186
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("legend", { className: "absolute w-px h-px p-0 -m-px overflow-hidden whitespace-nowrap border-0", children: "Stepper de formul\xE1rio" }),
|
|
6187
|
+
showProgress && currentStep !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6000
6188
|
Text_default,
|
|
6001
6189
|
{
|
|
6002
6190
|
size: "sm",
|
|
@@ -6005,7 +6193,7 @@ var Stepper = ({
|
|
|
6005
6193
|
children: getProgressText(currentStep, steps.length, progressText)
|
|
6006
6194
|
}
|
|
6007
6195
|
),
|
|
6008
|
-
/* @__PURE__ */ (0,
|
|
6196
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6009
6197
|
"div",
|
|
6010
6198
|
{
|
|
6011
6199
|
className: cn(
|
|
@@ -6018,7 +6206,7 @@ var Stepper = ({
|
|
|
6018
6206
|
"aria-label": "Progress steps",
|
|
6019
6207
|
children: steps.map((step, index) => {
|
|
6020
6208
|
const stateClasses = STATE_CLASSES6[step.state];
|
|
6021
|
-
return /* @__PURE__ */ (0,
|
|
6209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6022
6210
|
Step,
|
|
6023
6211
|
{
|
|
6024
6212
|
step,
|
|
@@ -6041,8 +6229,8 @@ var Stepper = ({
|
|
|
6041
6229
|
var Stepper_default = Stepper;
|
|
6042
6230
|
|
|
6043
6231
|
// src/components/Calendar/Calendar.tsx
|
|
6044
|
-
var
|
|
6045
|
-
var
|
|
6232
|
+
var import_react22 = require("react");
|
|
6233
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
6046
6234
|
var WEEK_DAYS = ["SEG", "TER", "QUA", "QUI", "SEX", "S\xC1B", "DOM"];
|
|
6047
6235
|
var WEEK_DAYS_SHORT = ["S", "T", "Q", "Q", "S", "S", "D"];
|
|
6048
6236
|
var MONTH_NAMES = [
|
|
@@ -6065,15 +6253,15 @@ var MonthYearPicker = ({
|
|
|
6065
6253
|
currentDate,
|
|
6066
6254
|
onYearChange,
|
|
6067
6255
|
onMonthChange
|
|
6068
|
-
}) => /* @__PURE__ */ (0,
|
|
6256
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
6069
6257
|
"div",
|
|
6070
6258
|
{
|
|
6071
6259
|
ref: monthPickerRef,
|
|
6072
6260
|
className: "absolute top-full left-0 z-50 mt-1 bg-background rounded-lg shadow-lg border border-border-200 p-4 min-w-[280px]",
|
|
6073
6261
|
children: [
|
|
6074
|
-
/* @__PURE__ */ (0,
|
|
6075
|
-
/* @__PURE__ */ (0,
|
|
6076
|
-
/* @__PURE__ */ (0,
|
|
6262
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "mb-4", children: [
|
|
6263
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h3", { className: "text-sm font-medium text-text-700 mb-2", children: "Selecionar Ano" }),
|
|
6264
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "grid grid-cols-4 gap-1 max-h-32 overflow-y-auto", children: availableYears.map((year) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6077
6265
|
"button",
|
|
6078
6266
|
{
|
|
6079
6267
|
onClick: () => onYearChange(year),
|
|
@@ -6086,9 +6274,9 @@ var MonthYearPicker = ({
|
|
|
6086
6274
|
year
|
|
6087
6275
|
)) })
|
|
6088
6276
|
] }),
|
|
6089
|
-
/* @__PURE__ */ (0,
|
|
6090
|
-
/* @__PURE__ */ (0,
|
|
6091
|
-
/* @__PURE__ */ (0,
|
|
6277
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
|
|
6278
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h3", { className: "text-sm font-medium text-text-700 mb-2", children: "Selecionar M\xEAs" }),
|
|
6279
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "grid grid-cols-3 gap-1", children: MONTH_NAMES.map((month, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6092
6280
|
"button",
|
|
6093
6281
|
{
|
|
6094
6282
|
onClick: () => onMonthChange(index, currentDate.getFullYear()),
|
|
@@ -6141,11 +6329,11 @@ var Calendar = ({
|
|
|
6141
6329
|
showActivities = true,
|
|
6142
6330
|
className = ""
|
|
6143
6331
|
}) => {
|
|
6144
|
-
const [currentDate, setCurrentDate] = (0,
|
|
6145
|
-
const [isMonthPickerOpen, setIsMonthPickerOpen] = (0,
|
|
6146
|
-
const monthPickerRef = (0,
|
|
6147
|
-
const monthPickerContainerRef = (0,
|
|
6148
|
-
(0,
|
|
6332
|
+
const [currentDate, setCurrentDate] = (0, import_react22.useState)(selectedDate || /* @__PURE__ */ new Date());
|
|
6333
|
+
const [isMonthPickerOpen, setIsMonthPickerOpen] = (0, import_react22.useState)(false);
|
|
6334
|
+
const monthPickerRef = (0, import_react22.useRef)(null);
|
|
6335
|
+
const monthPickerContainerRef = (0, import_react22.useRef)(null);
|
|
6336
|
+
(0, import_react22.useEffect)(() => {
|
|
6149
6337
|
const handleClickOutside = (event) => {
|
|
6150
6338
|
if (monthPickerContainerRef.current && !monthPickerContainerRef.current.contains(event.target)) {
|
|
6151
6339
|
setIsMonthPickerOpen(false);
|
|
@@ -6159,7 +6347,7 @@ var Calendar = ({
|
|
|
6159
6347
|
};
|
|
6160
6348
|
}, [isMonthPickerOpen]);
|
|
6161
6349
|
const today = /* @__PURE__ */ new Date();
|
|
6162
|
-
const availableYears = (0,
|
|
6350
|
+
const availableYears = (0, import_react22.useMemo)(() => {
|
|
6163
6351
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
6164
6352
|
const years = [];
|
|
6165
6353
|
for (let year = currentYear - 10; year <= currentYear + 10; year++) {
|
|
@@ -6167,7 +6355,7 @@ var Calendar = ({
|
|
|
6167
6355
|
}
|
|
6168
6356
|
return years;
|
|
6169
6357
|
}, []);
|
|
6170
|
-
const calendarData = (0,
|
|
6358
|
+
const calendarData = (0, import_react22.useMemo)(() => {
|
|
6171
6359
|
const year = currentDate.getFullYear();
|
|
6172
6360
|
const month = currentDate.getMonth();
|
|
6173
6361
|
const firstDay = new Date(year, month, 1);
|
|
@@ -6220,28 +6408,28 @@ var Calendar = ({
|
|
|
6220
6408
|
onDateSelect?.(day.date);
|
|
6221
6409
|
};
|
|
6222
6410
|
if (variant === "navigation") {
|
|
6223
|
-
return /* @__PURE__ */ (0,
|
|
6224
|
-
/* @__PURE__ */ (0,
|
|
6225
|
-
/* @__PURE__ */ (0,
|
|
6226
|
-
/* @__PURE__ */ (0,
|
|
6411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: cn("bg-background rounded-xl pt-6", className), children: [
|
|
6412
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center justify-between mb-4 px-6", children: [
|
|
6413
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "relative", ref: monthPickerContainerRef, children: [
|
|
6414
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
6227
6415
|
"button",
|
|
6228
6416
|
{
|
|
6229
6417
|
onClick: toggleMonthPicker,
|
|
6230
6418
|
className: "flex items-center group gap-1 rounded transition-colors cursor-pointer",
|
|
6231
6419
|
children: [
|
|
6232
|
-
/* @__PURE__ */ (0,
|
|
6420
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "text-sm font-medium text-text-600 group-hover:text-primary-950", children: [
|
|
6233
6421
|
MONTH_NAMES[currentDate.getMonth()],
|
|
6234
6422
|
" ",
|
|
6235
6423
|
currentDate.getFullYear()
|
|
6236
6424
|
] }),
|
|
6237
|
-
/* @__PURE__ */ (0,
|
|
6425
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6238
6426
|
"svg",
|
|
6239
6427
|
{
|
|
6240
6428
|
className: `w-4 h-4 text-primary-950 transition-transform ${isMonthPickerOpen ? "rotate-180" : ""}`,
|
|
6241
6429
|
fill: "none",
|
|
6242
6430
|
stroke: "currentColor",
|
|
6243
6431
|
viewBox: "0 0 24 24",
|
|
6244
|
-
children: /* @__PURE__ */ (0,
|
|
6432
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6245
6433
|
"path",
|
|
6246
6434
|
{
|
|
6247
6435
|
strokeLinecap: "round",
|
|
@@ -6255,7 +6443,7 @@ var Calendar = ({
|
|
|
6255
6443
|
]
|
|
6256
6444
|
}
|
|
6257
6445
|
),
|
|
6258
|
-
isMonthPickerOpen && /* @__PURE__ */ (0,
|
|
6446
|
+
isMonthPickerOpen && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6259
6447
|
MonthYearPicker,
|
|
6260
6448
|
{
|
|
6261
6449
|
monthPickerRef,
|
|
@@ -6266,21 +6454,21 @@ var Calendar = ({
|
|
|
6266
6454
|
}
|
|
6267
6455
|
)
|
|
6268
6456
|
] }),
|
|
6269
|
-
/* @__PURE__ */ (0,
|
|
6270
|
-
/* @__PURE__ */ (0,
|
|
6457
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center gap-10", children: [
|
|
6458
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6271
6459
|
"button",
|
|
6272
6460
|
{
|
|
6273
6461
|
onClick: goToPreviousMonth,
|
|
6274
6462
|
className: "p-1 rounded hover:bg-background-100 transition-colors",
|
|
6275
6463
|
"aria-label": "M\xEAs anterior",
|
|
6276
|
-
children: /* @__PURE__ */ (0,
|
|
6464
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6277
6465
|
"svg",
|
|
6278
6466
|
{
|
|
6279
6467
|
className: "w-6 h-6 text-primary-950",
|
|
6280
6468
|
fill: "none",
|
|
6281
6469
|
stroke: "currentColor",
|
|
6282
6470
|
viewBox: "0 0 24 24",
|
|
6283
|
-
children: /* @__PURE__ */ (0,
|
|
6471
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6284
6472
|
"path",
|
|
6285
6473
|
{
|
|
6286
6474
|
strokeLinecap: "round",
|
|
@@ -6293,20 +6481,20 @@ var Calendar = ({
|
|
|
6293
6481
|
)
|
|
6294
6482
|
}
|
|
6295
6483
|
),
|
|
6296
|
-
/* @__PURE__ */ (0,
|
|
6484
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6297
6485
|
"button",
|
|
6298
6486
|
{
|
|
6299
6487
|
onClick: goToNextMonth,
|
|
6300
6488
|
className: "p-1 rounded hover:bg-background-100 transition-colors",
|
|
6301
6489
|
"aria-label": "Pr\xF3ximo m\xEAs",
|
|
6302
|
-
children: /* @__PURE__ */ (0,
|
|
6490
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6303
6491
|
"svg",
|
|
6304
6492
|
{
|
|
6305
6493
|
className: "w-6 h-6 text-primary-950",
|
|
6306
6494
|
fill: "none",
|
|
6307
6495
|
stroke: "currentColor",
|
|
6308
6496
|
viewBox: "0 0 24 24",
|
|
6309
|
-
children: /* @__PURE__ */ (0,
|
|
6497
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6310
6498
|
"path",
|
|
6311
6499
|
{
|
|
6312
6500
|
strokeLinecap: "round",
|
|
@@ -6321,7 +6509,7 @@ var Calendar = ({
|
|
|
6321
6509
|
)
|
|
6322
6510
|
] })
|
|
6323
6511
|
] }),
|
|
6324
|
-
/* @__PURE__ */ (0,
|
|
6512
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "grid grid-cols-7 gap-1 mb-2 px-3", children: WEEK_DAYS_SHORT.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6325
6513
|
"div",
|
|
6326
6514
|
{
|
|
6327
6515
|
className: "h-9 flex items-center justify-center text-xs font-normal text-text-600",
|
|
@@ -6329,13 +6517,13 @@ var Calendar = ({
|
|
|
6329
6517
|
},
|
|
6330
6518
|
`${day}-${index}`
|
|
6331
6519
|
)) }),
|
|
6332
|
-
/* @__PURE__ */ (0,
|
|
6520
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "grid grid-cols-7 gap-1 px-3", children: calendarData.map((day) => {
|
|
6333
6521
|
if (!day.isCurrentMonth) {
|
|
6334
|
-
return /* @__PURE__ */ (0,
|
|
6522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6335
6523
|
"div",
|
|
6336
6524
|
{
|
|
6337
6525
|
className: "flex items-center justify-center",
|
|
6338
|
-
children: /* @__PURE__ */ (0,
|
|
6526
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "w-9 h-9" })
|
|
6339
6527
|
},
|
|
6340
6528
|
day.date.getTime()
|
|
6341
6529
|
);
|
|
@@ -6351,11 +6539,11 @@ var Calendar = ({
|
|
|
6351
6539
|
} else if (day.isSelected) {
|
|
6352
6540
|
spanClass = "h-6 w-6 rounded-full bg-primary-950 text-text";
|
|
6353
6541
|
}
|
|
6354
|
-
return /* @__PURE__ */ (0,
|
|
6542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6355
6543
|
"div",
|
|
6356
6544
|
{
|
|
6357
6545
|
className: "flex items-center justify-center",
|
|
6358
|
-
children: /* @__PURE__ */ (0,
|
|
6546
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6359
6547
|
"button",
|
|
6360
6548
|
{
|
|
6361
6549
|
className: `
|
|
@@ -6371,7 +6559,7 @@ var Calendar = ({
|
|
|
6371
6559
|
"aria-label": `${day.date.getDate()} de ${MONTH_NAMES[day.date.getMonth()]}`,
|
|
6372
6560
|
"aria-current": day.isToday ? "date" : void 0,
|
|
6373
6561
|
tabIndex: 0,
|
|
6374
|
-
children: /* @__PURE__ */ (0,
|
|
6562
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: spanClass, children: day.date.getDate() })
|
|
6375
6563
|
}
|
|
6376
6564
|
)
|
|
6377
6565
|
},
|
|
@@ -6380,28 +6568,28 @@ var Calendar = ({
|
|
|
6380
6568
|
}) })
|
|
6381
6569
|
] });
|
|
6382
6570
|
}
|
|
6383
|
-
return /* @__PURE__ */ (0,
|
|
6384
|
-
/* @__PURE__ */ (0,
|
|
6385
|
-
/* @__PURE__ */ (0,
|
|
6386
|
-
/* @__PURE__ */ (0,
|
|
6571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: cn("bg-background rounded-xl p-4", className), children: [
|
|
6572
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center justify-between mb-3.5", children: [
|
|
6573
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "relative", ref: monthPickerContainerRef, children: [
|
|
6574
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
6387
6575
|
"button",
|
|
6388
6576
|
{
|
|
6389
6577
|
onClick: toggleMonthPicker,
|
|
6390
6578
|
className: "flex items-center gap-2 hover:bg-background-100 rounded px-2 py-1 transition-colors",
|
|
6391
6579
|
children: [
|
|
6392
|
-
/* @__PURE__ */ (0,
|
|
6580
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("h2", { className: "text-lg font-semibold text-text-950", children: [
|
|
6393
6581
|
MONTH_NAMES[currentDate.getMonth()],
|
|
6394
6582
|
" ",
|
|
6395
6583
|
currentDate.getFullYear()
|
|
6396
6584
|
] }),
|
|
6397
|
-
/* @__PURE__ */ (0,
|
|
6585
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6398
6586
|
"svg",
|
|
6399
6587
|
{
|
|
6400
6588
|
className: `w-4 h-4 text-text-400 transition-transform ${isMonthPickerOpen ? "rotate-180" : ""}`,
|
|
6401
6589
|
fill: "none",
|
|
6402
6590
|
stroke: "currentColor",
|
|
6403
6591
|
viewBox: "0 0 24 24",
|
|
6404
|
-
children: /* @__PURE__ */ (0,
|
|
6592
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6405
6593
|
"path",
|
|
6406
6594
|
{
|
|
6407
6595
|
strokeLinecap: "round",
|
|
@@ -6415,7 +6603,7 @@ var Calendar = ({
|
|
|
6415
6603
|
]
|
|
6416
6604
|
}
|
|
6417
6605
|
),
|
|
6418
|
-
isMonthPickerOpen && /* @__PURE__ */ (0,
|
|
6606
|
+
isMonthPickerOpen && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6419
6607
|
MonthYearPicker,
|
|
6420
6608
|
{
|
|
6421
6609
|
monthPickerRef,
|
|
@@ -6426,21 +6614,21 @@ var Calendar = ({
|
|
|
6426
6614
|
}
|
|
6427
6615
|
)
|
|
6428
6616
|
] }),
|
|
6429
|
-
/* @__PURE__ */ (0,
|
|
6430
|
-
/* @__PURE__ */ (0,
|
|
6617
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
6618
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6431
6619
|
"button",
|
|
6432
6620
|
{
|
|
6433
6621
|
onClick: goToPreviousMonth,
|
|
6434
6622
|
className: "p-1 rounded-md hover:bg-background-100 transition-colors",
|
|
6435
6623
|
"aria-label": "M\xEAs anterior",
|
|
6436
|
-
children: /* @__PURE__ */ (0,
|
|
6624
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6437
6625
|
"svg",
|
|
6438
6626
|
{
|
|
6439
6627
|
className: "w-6 h-6 text-primary-950",
|
|
6440
6628
|
fill: "none",
|
|
6441
6629
|
stroke: "currentColor",
|
|
6442
6630
|
viewBox: "0 0 24 24",
|
|
6443
|
-
children: /* @__PURE__ */ (0,
|
|
6631
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6444
6632
|
"path",
|
|
6445
6633
|
{
|
|
6446
6634
|
strokeLinecap: "round",
|
|
@@ -6453,20 +6641,20 @@ var Calendar = ({
|
|
|
6453
6641
|
)
|
|
6454
6642
|
}
|
|
6455
6643
|
),
|
|
6456
|
-
/* @__PURE__ */ (0,
|
|
6644
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6457
6645
|
"button",
|
|
6458
6646
|
{
|
|
6459
6647
|
onClick: goToNextMonth,
|
|
6460
6648
|
className: "p-1 rounded-md hover:bg-background-100 transition-colors",
|
|
6461
6649
|
"aria-label": "Pr\xF3ximo m\xEAs",
|
|
6462
|
-
children: /* @__PURE__ */ (0,
|
|
6650
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6463
6651
|
"svg",
|
|
6464
6652
|
{
|
|
6465
6653
|
className: "w-6 h-6 text-primary-950",
|
|
6466
6654
|
fill: "none",
|
|
6467
6655
|
stroke: "currentColor",
|
|
6468
6656
|
viewBox: "0 0 24 24",
|
|
6469
|
-
children: /* @__PURE__ */ (0,
|
|
6657
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6470
6658
|
"path",
|
|
6471
6659
|
{
|
|
6472
6660
|
strokeLinecap: "round",
|
|
@@ -6481,7 +6669,7 @@ var Calendar = ({
|
|
|
6481
6669
|
)
|
|
6482
6670
|
] })
|
|
6483
6671
|
] }),
|
|
6484
|
-
/* @__PURE__ */ (0,
|
|
6672
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "grid grid-cols-7 mb-2", children: WEEK_DAYS.map((day) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6485
6673
|
"div",
|
|
6486
6674
|
{
|
|
6487
6675
|
className: "h-4 flex items-center justify-center text-xs font-semibold text-text-500",
|
|
@@ -6489,13 +6677,13 @@ var Calendar = ({
|
|
|
6489
6677
|
},
|
|
6490
6678
|
day
|
|
6491
6679
|
)) }),
|
|
6492
|
-
/* @__PURE__ */ (0,
|
|
6680
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "grid grid-cols-7", children: calendarData.map((day) => {
|
|
6493
6681
|
if (!day.isCurrentMonth) {
|
|
6494
|
-
return /* @__PURE__ */ (0,
|
|
6682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6495
6683
|
"div",
|
|
6496
6684
|
{
|
|
6497
6685
|
className: "flex items-center justify-center",
|
|
6498
|
-
children: /* @__PURE__ */ (0,
|
|
6686
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "w-10 h-10" })
|
|
6499
6687
|
},
|
|
6500
6688
|
day.date.getTime()
|
|
6501
6689
|
);
|
|
@@ -6505,11 +6693,11 @@ var Calendar = ({
|
|
|
6505
6693
|
variant,
|
|
6506
6694
|
showActivities
|
|
6507
6695
|
);
|
|
6508
|
-
return /* @__PURE__ */ (0,
|
|
6696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6509
6697
|
"div",
|
|
6510
6698
|
{
|
|
6511
6699
|
className: "flex items-center justify-center",
|
|
6512
|
-
children: /* @__PURE__ */ (0,
|
|
6700
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6513
6701
|
"button",
|
|
6514
6702
|
{
|
|
6515
6703
|
className: `
|
|
@@ -6538,8 +6726,8 @@ var Calendar = ({
|
|
|
6538
6726
|
var Calendar_default = Calendar;
|
|
6539
6727
|
|
|
6540
6728
|
// src/components/AlertDialog/AlertDialog.tsx
|
|
6541
|
-
var
|
|
6542
|
-
var
|
|
6729
|
+
var import_react23 = require("react");
|
|
6730
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
6543
6731
|
var SIZE_CLASSES11 = {
|
|
6544
6732
|
"extra-small": "w-screen max-w-[324px]",
|
|
6545
6733
|
small: "w-screen max-w-[378px]",
|
|
@@ -6547,7 +6735,7 @@ var SIZE_CLASSES11 = {
|
|
|
6547
6735
|
large: "w-screen max-w-[578px]",
|
|
6548
6736
|
"extra-large": "w-screen max-w-[912px]"
|
|
6549
6737
|
};
|
|
6550
|
-
var AlertDialog = (0,
|
|
6738
|
+
var AlertDialog = (0, import_react23.forwardRef)(
|
|
6551
6739
|
({
|
|
6552
6740
|
description,
|
|
6553
6741
|
cancelButtonLabel = "Cancelar",
|
|
@@ -6565,7 +6753,7 @@ var AlertDialog = (0, import_react22.forwardRef)(
|
|
|
6565
6753
|
size = "medium",
|
|
6566
6754
|
...props
|
|
6567
6755
|
}, ref) => {
|
|
6568
|
-
(0,
|
|
6756
|
+
(0, import_react23.useEffect)(() => {
|
|
6569
6757
|
if (!isOpen || !closeOnEscape) return;
|
|
6570
6758
|
const handleEscape = (event) => {
|
|
6571
6759
|
if (event.key === "Escape") {
|
|
@@ -6575,7 +6763,7 @@ var AlertDialog = (0, import_react22.forwardRef)(
|
|
|
6575
6763
|
document.addEventListener("keydown", handleEscape);
|
|
6576
6764
|
return () => document.removeEventListener("keydown", handleEscape);
|
|
6577
6765
|
}, [isOpen, closeOnEscape]);
|
|
6578
|
-
(0,
|
|
6766
|
+
(0, import_react23.useEffect)(() => {
|
|
6579
6767
|
if (isOpen) {
|
|
6580
6768
|
document.body.style.overflow = "hidden";
|
|
6581
6769
|
} else {
|
|
@@ -6604,14 +6792,14 @@ var AlertDialog = (0, import_react22.forwardRef)(
|
|
|
6604
6792
|
onCancel?.(cancelValue);
|
|
6605
6793
|
};
|
|
6606
6794
|
const sizeClasses = SIZE_CLASSES11[size];
|
|
6607
|
-
return /* @__PURE__ */ (0,
|
|
6795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6608
6796
|
"div",
|
|
6609
6797
|
{
|
|
6610
6798
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",
|
|
6611
6799
|
onClick: handleBackdropClick,
|
|
6612
6800
|
onKeyDown: handleBackdropKeyDown,
|
|
6613
6801
|
"data-testid": "alert-dialog-overlay",
|
|
6614
|
-
children: /* @__PURE__ */ (0,
|
|
6802
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
6615
6803
|
"div",
|
|
6616
6804
|
{
|
|
6617
6805
|
ref,
|
|
@@ -6622,7 +6810,7 @@ var AlertDialog = (0, import_react22.forwardRef)(
|
|
|
6622
6810
|
),
|
|
6623
6811
|
...props,
|
|
6624
6812
|
children: [
|
|
6625
|
-
/* @__PURE__ */ (0,
|
|
6813
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6626
6814
|
"h2",
|
|
6627
6815
|
{
|
|
6628
6816
|
id: "alert-dialog-title",
|
|
@@ -6630,7 +6818,7 @@ var AlertDialog = (0, import_react22.forwardRef)(
|
|
|
6630
6818
|
children: title
|
|
6631
6819
|
}
|
|
6632
6820
|
),
|
|
6633
|
-
/* @__PURE__ */ (0,
|
|
6821
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6634
6822
|
"p",
|
|
6635
6823
|
{
|
|
6636
6824
|
id: "alert-dialog-description",
|
|
@@ -6638,9 +6826,9 @@ var AlertDialog = (0, import_react22.forwardRef)(
|
|
|
6638
6826
|
children: description
|
|
6639
6827
|
}
|
|
6640
6828
|
),
|
|
6641
|
-
/* @__PURE__ */ (0,
|
|
6642
|
-
/* @__PURE__ */ (0,
|
|
6643
|
-
/* @__PURE__ */ (0,
|
|
6829
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex flex-row items-center justify-end pt-4 gap-3", children: [
|
|
6830
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Button_default, { variant: "outline", size: "small", onClick: handleCancel, children: cancelButtonLabel }),
|
|
6831
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6644
6832
|
Button_default,
|
|
6645
6833
|
{
|
|
6646
6834
|
variant: "solid",
|
|
@@ -6661,12 +6849,12 @@ var AlertDialog = (0, import_react22.forwardRef)(
|
|
|
6661
6849
|
AlertDialog.displayName = "AlertDialog";
|
|
6662
6850
|
|
|
6663
6851
|
// src/components/LoadingModal/loadingModal.tsx
|
|
6664
|
-
var
|
|
6665
|
-
var
|
|
6666
|
-
var LoadingModal = (0,
|
|
6852
|
+
var import_react24 = require("react");
|
|
6853
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6854
|
+
var LoadingModal = (0, import_react24.forwardRef)(
|
|
6667
6855
|
({ open, title = "Titulo...", subtitle = "Subtitulo...", ...props }, ref) => {
|
|
6668
6856
|
if (!open) return null;
|
|
6669
|
-
return /* @__PURE__ */ (0,
|
|
6857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6670
6858
|
"div",
|
|
6671
6859
|
{
|
|
6672
6860
|
ref,
|
|
@@ -6675,8 +6863,8 @@ var LoadingModal = (0, import_react23.forwardRef)(
|
|
|
6675
6863
|
"aria-describedby": "loading-modal-subtitle",
|
|
6676
6864
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-background/90 backdrop-blur-xs",
|
|
6677
6865
|
...props,
|
|
6678
|
-
children: /* @__PURE__ */ (0,
|
|
6679
|
-
/* @__PURE__ */ (0,
|
|
6866
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "w-full max-w-[364px] flex flex-col items-center justify-center gap-14", children: [
|
|
6867
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "animate-spin", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
6680
6868
|
"svg",
|
|
6681
6869
|
{
|
|
6682
6870
|
width: "102",
|
|
@@ -6687,14 +6875,14 @@ var LoadingModal = (0, import_react23.forwardRef)(
|
|
|
6687
6875
|
"aria-hidden": "true",
|
|
6688
6876
|
focusable: false,
|
|
6689
6877
|
children: [
|
|
6690
|
-
/* @__PURE__ */ (0,
|
|
6878
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6691
6879
|
"path",
|
|
6692
6880
|
{
|
|
6693
6881
|
d: "M101.5 51C101.5 78.8904 78.8904 101.5 51 101.5C23.1096 101.5 0.5 78.8904 0.5 51C0.5 23.1096 23.1096 0.5 51 0.5C78.8904 0.5 101.5 23.1096 101.5 51ZM8.62286 51C8.62286 74.4043 27.5957 93.3771 51 93.3771C74.4043 93.3771 93.3771 74.4043 93.3771 51C93.3771 27.5957 74.4043 8.62286 51 8.62286C27.5957 8.62286 8.62286 27.5957 8.62286 51Z",
|
|
6694
6882
|
className: "fill-primary-100"
|
|
6695
6883
|
}
|
|
6696
6884
|
),
|
|
6697
|
-
/* @__PURE__ */ (0,
|
|
6885
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6698
6886
|
"path",
|
|
6699
6887
|
{
|
|
6700
6888
|
d: "M97.4386 51C99.6816 51 101.517 52.8213 101.337 55.0571C100.754 62.2833 98.6212 69.3162 95.0643 75.6696C90.8444 83.207 84.7616 89.536 77.3975 94.0514C70.0333 98.5668 61.6339 101.118 53.0024 101.46C44.371 101.803 35.7959 99.9255 28.0971 96.0078C20.3982 92.0902 13.833 86.2631 9.02917 79.0838C4.22529 71.9045 1.34332 63.6129 0.658804 55.0017C-0.0257159 46.3906 1.51009 37.7479 5.1194 29.8997C8.16173 23.2845 12.5915 17.4202 18.0904 12.6959C19.7917 11.2341 22.3444 11.6457 23.6647 13.459C24.9851 15.2723 24.5702 17.7988 22.8916 19.2866C18.5048 23.1747 14.9608 27.9413 12.4992 33.2937C9.47048 39.8794 8.1817 47.132 8.75612 54.3581C9.33053 61.5841 11.7489 68.542 15.7801 74.5666C19.8113 80.5911 25.3205 85.4809 31.781 88.7684C38.2414 92.0559 45.4372 93.6312 52.6804 93.3438C59.9235 93.0564 66.9718 90.9158 73.1515 87.1267C79.3311 83.3375 84.4355 78.0266 87.9766 71.7015C90.8546 66.561 92.6217 60.8903 93.1827 55.0553C93.3973 52.8225 95.1955 51 97.4386 51Z",
|
|
@@ -6704,9 +6892,9 @@ var LoadingModal = (0, import_react23.forwardRef)(
|
|
|
6704
6892
|
]
|
|
6705
6893
|
}
|
|
6706
6894
|
) }),
|
|
6707
|
-
/* @__PURE__ */ (0,
|
|
6708
|
-
/* @__PURE__ */ (0,
|
|
6709
|
-
/* @__PURE__ */ (0,
|
|
6895
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex flex-col gap-4 text-center", children: [
|
|
6896
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { id: "loading-modal-title", className: "text-text-950 text-lg", children: title }),
|
|
6897
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { id: "loading-modal-subtitle", className: "text-text-600 text-lg", children: subtitle })
|
|
6710
6898
|
] })
|
|
6711
6899
|
] })
|
|
6712
6900
|
}
|
|
@@ -6719,158 +6907,6 @@ var loadingModal_default = LoadingModal;
|
|
|
6719
6907
|
var import_phosphor_react19 = require("phosphor-react");
|
|
6720
6908
|
var import_react26 = require("react");
|
|
6721
6909
|
|
|
6722
|
-
// src/components/Skeleton/Skeleton.tsx
|
|
6723
|
-
var import_react24 = require("react");
|
|
6724
|
-
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6725
|
-
var SKELETON_ANIMATION_CLASSES = {
|
|
6726
|
-
pulse: "animate-pulse",
|
|
6727
|
-
none: ""
|
|
6728
|
-
};
|
|
6729
|
-
var SKELETON_VARIANT_CLASSES = {
|
|
6730
|
-
text: "h-4 bg-background-200 rounded",
|
|
6731
|
-
circular: "bg-background-200 rounded-full",
|
|
6732
|
-
rectangular: "bg-background-200",
|
|
6733
|
-
rounded: "bg-background-200 rounded-lg"
|
|
6734
|
-
};
|
|
6735
|
-
var SPACING_CLASSES = {
|
|
6736
|
-
none: "",
|
|
6737
|
-
small: "space-y-1",
|
|
6738
|
-
medium: "space-y-2",
|
|
6739
|
-
large: "space-y-3"
|
|
6740
|
-
};
|
|
6741
|
-
var Skeleton = (0, import_react24.forwardRef)(
|
|
6742
|
-
({
|
|
6743
|
-
variant = "text",
|
|
6744
|
-
width,
|
|
6745
|
-
height,
|
|
6746
|
-
animation = "pulse",
|
|
6747
|
-
lines = 1,
|
|
6748
|
-
spacing = "none",
|
|
6749
|
-
className = "",
|
|
6750
|
-
children,
|
|
6751
|
-
...props
|
|
6752
|
-
}, ref) => {
|
|
6753
|
-
const animationClass = SKELETON_ANIMATION_CLASSES[animation];
|
|
6754
|
-
const variantClass = SKELETON_VARIANT_CLASSES[variant];
|
|
6755
|
-
const spacingClass = SPACING_CLASSES[spacing];
|
|
6756
|
-
const style = {
|
|
6757
|
-
width: typeof width === "number" ? `${width}px` : width,
|
|
6758
|
-
height: typeof height === "number" ? `${height}px` : height
|
|
6759
|
-
};
|
|
6760
|
-
if (variant === "text" && lines > 1) {
|
|
6761
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6762
|
-
"div",
|
|
6763
|
-
{
|
|
6764
|
-
ref,
|
|
6765
|
-
className: cn("flex flex-col", spacingClass, className),
|
|
6766
|
-
...props,
|
|
6767
|
-
children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6768
|
-
"div",
|
|
6769
|
-
{
|
|
6770
|
-
className: cn(variantClass, animationClass),
|
|
6771
|
-
style: index === lines - 1 ? { width: "60%" } : void 0
|
|
6772
|
-
},
|
|
6773
|
-
index
|
|
6774
|
-
))
|
|
6775
|
-
}
|
|
6776
|
-
);
|
|
6777
|
-
}
|
|
6778
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6779
|
-
"div",
|
|
6780
|
-
{
|
|
6781
|
-
ref,
|
|
6782
|
-
className: cn(variantClass, animationClass, className),
|
|
6783
|
-
style,
|
|
6784
|
-
...props,
|
|
6785
|
-
children
|
|
6786
|
-
}
|
|
6787
|
-
);
|
|
6788
|
-
}
|
|
6789
|
-
);
|
|
6790
|
-
var SkeletonText = (0, import_react24.forwardRef)(
|
|
6791
|
-
(props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "text", ...props })
|
|
6792
|
-
);
|
|
6793
|
-
var SkeletonCircle = (0, import_react24.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "circular", ...props }));
|
|
6794
|
-
var SkeletonRectangle = (0, import_react24.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "rectangular", ...props }));
|
|
6795
|
-
var SkeletonRounded = (0, import_react24.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "rounded", ...props }));
|
|
6796
|
-
var SkeletonCard = (0, import_react24.forwardRef)(
|
|
6797
|
-
({
|
|
6798
|
-
showAvatar = true,
|
|
6799
|
-
showTitle = true,
|
|
6800
|
-
showDescription = true,
|
|
6801
|
-
showActions = true,
|
|
6802
|
-
lines = 2,
|
|
6803
|
-
className = "",
|
|
6804
|
-
...props
|
|
6805
|
-
}, ref) => {
|
|
6806
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
6807
|
-
"div",
|
|
6808
|
-
{
|
|
6809
|
-
ref,
|
|
6810
|
-
className: cn(
|
|
6811
|
-
"w-full p-4 bg-background border border-border-200 rounded-lg",
|
|
6812
|
-
className
|
|
6813
|
-
),
|
|
6814
|
-
...props,
|
|
6815
|
-
children: [
|
|
6816
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-start space-x-3", children: [
|
|
6817
|
-
showAvatar && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SkeletonCircle, { width: 40, height: 40 }),
|
|
6818
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
6819
|
-
showTitle && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SkeletonText, { width: "60%", height: 20 }),
|
|
6820
|
-
showDescription && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SkeletonText, { lines, spacing: "small" })
|
|
6821
|
-
] })
|
|
6822
|
-
] }),
|
|
6823
|
-
showActions && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex justify-end space-x-2 mt-4", children: [
|
|
6824
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SkeletonRectangle, { width: 80, height: 32 }),
|
|
6825
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SkeletonRectangle, { width: 80, height: 32 })
|
|
6826
|
-
] })
|
|
6827
|
-
]
|
|
6828
|
-
}
|
|
6829
|
-
);
|
|
6830
|
-
}
|
|
6831
|
-
);
|
|
6832
|
-
var SkeletonList = (0, import_react24.forwardRef)(
|
|
6833
|
-
({
|
|
6834
|
-
items = 3,
|
|
6835
|
-
showAvatar = true,
|
|
6836
|
-
showTitle = true,
|
|
6837
|
-
showDescription = true,
|
|
6838
|
-
lines = 1,
|
|
6839
|
-
className = "",
|
|
6840
|
-
...props
|
|
6841
|
-
}, ref) => {
|
|
6842
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-start space-x-3 p-3", children: [
|
|
6843
|
-
showAvatar && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SkeletonCircle, { width: 32, height: 32 }),
|
|
6844
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
6845
|
-
showTitle && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SkeletonText, { width: "40%", height: 16 }),
|
|
6846
|
-
showDescription && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SkeletonText, { lines, spacing: "small" })
|
|
6847
|
-
] })
|
|
6848
|
-
] }, index)) });
|
|
6849
|
-
}
|
|
6850
|
-
);
|
|
6851
|
-
var SkeletonTable = (0, import_react24.forwardRef)(
|
|
6852
|
-
({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
|
|
6853
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { ref, className: cn("w-full", className), ...props, children: [
|
|
6854
|
-
showHeader && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6855
|
-
SkeletonText,
|
|
6856
|
-
{
|
|
6857
|
-
width: `${100 / columns}%`,
|
|
6858
|
-
height: 20
|
|
6859
|
-
},
|
|
6860
|
-
index
|
|
6861
|
-
)) }),
|
|
6862
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "space-y-2", children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex space-x-2", children: Array.from({ length: columns }, (_2, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6863
|
-
SkeletonText,
|
|
6864
|
-
{
|
|
6865
|
-
width: `${100 / columns}%`,
|
|
6866
|
-
height: 16
|
|
6867
|
-
},
|
|
6868
|
-
colIndex
|
|
6869
|
-
)) }, rowIndex)) })
|
|
6870
|
-
] });
|
|
6871
|
-
}
|
|
6872
|
-
);
|
|
6873
|
-
|
|
6874
6910
|
// src/hooks/useMobile.ts
|
|
6875
6911
|
var import_react25 = require("react");
|
|
6876
6912
|
var MOBILE_WIDTH = 500;
|
|
@@ -8358,7 +8394,9 @@ function TableProvider({
|
|
|
8358
8394
|
initialFilters = [],
|
|
8359
8395
|
paginationConfig = {},
|
|
8360
8396
|
searchPlaceholder = "Buscar...",
|
|
8361
|
-
|
|
8397
|
+
emptyState,
|
|
8398
|
+
loadingState,
|
|
8399
|
+
noSearchResultState,
|
|
8362
8400
|
rowKey,
|
|
8363
8401
|
onParamsChange,
|
|
8364
8402
|
onRowClick,
|
|
@@ -8477,7 +8515,10 @@ function TableProvider({
|
|
|
8477
8515
|
const start = (currentPage - 1) * itemsPerPage;
|
|
8478
8516
|
return sortedData.slice(start, start + itemsPerPage);
|
|
8479
8517
|
}, [useInternalPagination, sortedData, currentPage, itemsPerPage]);
|
|
8480
|
-
const isEmpty =
|
|
8518
|
+
const isEmpty = data.length === 0;
|
|
8519
|
+
const showLoading = loading;
|
|
8520
|
+
const showNoSearchResult = !loading && data.length === 0 && searchQuery.trim() !== "";
|
|
8521
|
+
const showEmpty = !loading && data.length === 0 && searchQuery.trim() === "";
|
|
8481
8522
|
const controls = (enableSearch || enableFilters) && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
8482
8523
|
enableFilters && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
8483
8524
|
Button_default,
|
|
@@ -8507,8 +8548,12 @@ function TableProvider({
|
|
|
8507
8548
|
Table_default,
|
|
8508
8549
|
{
|
|
8509
8550
|
variant,
|
|
8510
|
-
|
|
8511
|
-
|
|
8551
|
+
showLoading,
|
|
8552
|
+
loadingState,
|
|
8553
|
+
showNoSearchResult,
|
|
8554
|
+
noSearchResultState,
|
|
8555
|
+
showEmpty,
|
|
8556
|
+
emptyState,
|
|
8512
8557
|
children: [
|
|
8513
8558
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8514
8559
|
TableRow,
|