analytica-frontend-lib 1.0.45 → 1.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Card/index.d.mts +62 -0
- package/dist/Card/index.d.ts +62 -0
- package/dist/Card/index.js +1085 -0
- package/dist/Card/index.js.map +1 -0
- package/dist/Card/index.mjs +1054 -0
- package/dist/Card/index.mjs.map +1 -0
- package/dist/Stepper/index.d.mts +169 -0
- package/dist/Stepper/index.d.ts +169 -0
- package/dist/Stepper/index.js +381 -0
- package/dist/Stepper/index.js.map +1 -0
- package/dist/Stepper/index.mjs +354 -0
- package/dist/Stepper/index.mjs.map +1 -0
- package/dist/index.css +405 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +828 -105
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +816 -101
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +405 -0
- package/dist/styles.css.map +1 -1
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -24,6 +24,13 @@ __export(src_exports, {
|
|
|
24
24
|
Badge: () => Badge_default,
|
|
25
25
|
Button: () => Button_default,
|
|
26
26
|
Calendar: () => Calendar_default,
|
|
27
|
+
CardActivesResults: () => CardActivesResults,
|
|
28
|
+
CardPerformance: () => CardPerformance,
|
|
29
|
+
CardProgress: () => CardProgress,
|
|
30
|
+
CardQuestions: () => CardQuestions,
|
|
31
|
+
CardResults: () => CardResults,
|
|
32
|
+
CardStatus: () => CardStatus,
|
|
33
|
+
CardTopic: () => CardTopic,
|
|
27
34
|
CheckBox: () => CheckBox_default,
|
|
28
35
|
Chips: () => Chips_default,
|
|
29
36
|
Divider: () => Divider_default,
|
|
@@ -54,6 +61,7 @@ __export(src_exports, {
|
|
|
54
61
|
SelectTrigger: () => SelectTrigger,
|
|
55
62
|
SelectValue: () => SelectValue,
|
|
56
63
|
SelectionButton: () => SelectionButton_default,
|
|
64
|
+
Stepper: () => Stepper_default,
|
|
57
65
|
Table: () => Table_default,
|
|
58
66
|
Text: () => Text_default,
|
|
59
67
|
TextArea: () => TextArea_default,
|
|
@@ -2089,9 +2097,308 @@ var ProgressCircle = ({
|
|
|
2089
2097
|
};
|
|
2090
2098
|
var ProgressCircle_default = ProgressCircle;
|
|
2091
2099
|
|
|
2100
|
+
// src/components/Stepper/Stepper.tsx
|
|
2101
|
+
var import_phosphor_react7 = require("phosphor-react");
|
|
2102
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2103
|
+
var SIZE_CLASSES9 = {
|
|
2104
|
+
small: {
|
|
2105
|
+
container: "gap-2",
|
|
2106
|
+
// 8px gap as specified in CSS
|
|
2107
|
+
stepWidth: "w-[58px]",
|
|
2108
|
+
// exact 58px from CSS
|
|
2109
|
+
stepHeight: "h-[38px]",
|
|
2110
|
+
// exact 38px from CSS
|
|
2111
|
+
indicator: "w-5 h-5",
|
|
2112
|
+
// 20px as specified
|
|
2113
|
+
progressBar: "h-0.5",
|
|
2114
|
+
// 2px as specified
|
|
2115
|
+
indicatorTextSize: "2xs",
|
|
2116
|
+
// 10px as specified
|
|
2117
|
+
labelTextSize: "xs",
|
|
2118
|
+
// 12px as specified
|
|
2119
|
+
iconSize: "w-3 h-3"
|
|
2120
|
+
// 12px
|
|
2121
|
+
},
|
|
2122
|
+
medium: {
|
|
2123
|
+
container: "gap-3",
|
|
2124
|
+
// 12px (8px + 4px progression)
|
|
2125
|
+
stepWidth: "w-[110px]",
|
|
2126
|
+
// 110px (increased from 90px to fit "Endereço Residencial")
|
|
2127
|
+
stepHeight: "h-[48px]",
|
|
2128
|
+
// 48px (increased from 46px for better proportion)
|
|
2129
|
+
indicator: "w-6 h-6",
|
|
2130
|
+
// 24px (20px + 4px progression)
|
|
2131
|
+
progressBar: "h-0.5",
|
|
2132
|
+
// 2px maintained for consistency
|
|
2133
|
+
indicatorTextSize: "2xs",
|
|
2134
|
+
// 10px maintained for readability
|
|
2135
|
+
labelTextSize: "xs",
|
|
2136
|
+
// 12px maintained
|
|
2137
|
+
iconSize: "w-3.5 h-3.5"
|
|
2138
|
+
// 14px
|
|
2139
|
+
},
|
|
2140
|
+
large: {
|
|
2141
|
+
container: "gap-4",
|
|
2142
|
+
// 16px (12px + 4px progression)
|
|
2143
|
+
stepWidth: "w-[160px]",
|
|
2144
|
+
// 160px (increased from 140px to fit "Endereço Residencial")
|
|
2145
|
+
stepHeight: "h-[58px]",
|
|
2146
|
+
// 58px (increased from 54px for better proportion)
|
|
2147
|
+
indicator: "w-7 h-7",
|
|
2148
|
+
// 28px (24px + 4px progression)
|
|
2149
|
+
progressBar: "h-1",
|
|
2150
|
+
// 4px (increased for better visibility)
|
|
2151
|
+
indicatorTextSize: "xs",
|
|
2152
|
+
// 12px (increased for larger size)
|
|
2153
|
+
labelTextSize: "sm",
|
|
2154
|
+
// 14px (increased for larger size)
|
|
2155
|
+
iconSize: "w-4 h-4"
|
|
2156
|
+
// 16px
|
|
2157
|
+
},
|
|
2158
|
+
extraLarge: {
|
|
2159
|
+
container: "gap-5",
|
|
2160
|
+
// 20px (16px + 4px progression)
|
|
2161
|
+
stepWidth: "w-[200px]",
|
|
2162
|
+
// 200px (increased from 180px to ensure "Endereço Residencial" fits)
|
|
2163
|
+
stepHeight: "h-[68px]",
|
|
2164
|
+
// 68px (increased from 62px for better proportion)
|
|
2165
|
+
indicator: "w-8 h-8",
|
|
2166
|
+
// 32px (28px + 4px progression)
|
|
2167
|
+
progressBar: "h-1",
|
|
2168
|
+
// 4px maintained
|
|
2169
|
+
indicatorTextSize: "xs",
|
|
2170
|
+
// 12px maintained for readability
|
|
2171
|
+
labelTextSize: "sm",
|
|
2172
|
+
// 14px maintained
|
|
2173
|
+
iconSize: "w-[18px] h-[18px]"
|
|
2174
|
+
// 18px
|
|
2175
|
+
}
|
|
2176
|
+
};
|
|
2177
|
+
var STATE_CLASSES6 = {
|
|
2178
|
+
pending: {
|
|
2179
|
+
progressBar: "bg-text-400",
|
|
2180
|
+
// #A3A3A3
|
|
2181
|
+
indicator: "bg-text-400",
|
|
2182
|
+
// #A3A3A3
|
|
2183
|
+
indicatorText: "text-white",
|
|
2184
|
+
// Branco para contraste com background cinza
|
|
2185
|
+
label: "text-text-400"
|
|
2186
|
+
// #A3A3A3
|
|
2187
|
+
},
|
|
2188
|
+
current: {
|
|
2189
|
+
progressBar: "bg-primary-800",
|
|
2190
|
+
// #1C61B2 usando classe Tailwind padrão
|
|
2191
|
+
indicator: "bg-primary-800",
|
|
2192
|
+
// #1C61B2 usando classe Tailwind padrão
|
|
2193
|
+
indicatorText: "text-white",
|
|
2194
|
+
// Branco usando classe Tailwind padrão
|
|
2195
|
+
label: "text-primary-800"
|
|
2196
|
+
// #1C61B2 usando classe Tailwind padrão
|
|
2197
|
+
},
|
|
2198
|
+
completed: {
|
|
2199
|
+
progressBar: "bg-primary-400",
|
|
2200
|
+
// #48A0E8 para barra quando checked (completed)
|
|
2201
|
+
indicator: "bg-primary-400",
|
|
2202
|
+
// #48A0E8 para corresponder à barra de progresso
|
|
2203
|
+
indicatorText: "text-white",
|
|
2204
|
+
// Branco usando classe Tailwind padrão
|
|
2205
|
+
label: "text-primary-400"
|
|
2206
|
+
// #48A0E8 para corresponder à barra de progresso
|
|
2207
|
+
}
|
|
2208
|
+
};
|
|
2209
|
+
var Step = ({
|
|
2210
|
+
step,
|
|
2211
|
+
index,
|
|
2212
|
+
size: _size,
|
|
2213
|
+
sizeClasses,
|
|
2214
|
+
stateClasses,
|
|
2215
|
+
isLast: _isLast,
|
|
2216
|
+
className = ""
|
|
2217
|
+
}) => {
|
|
2218
|
+
const stepNumber = index + 1;
|
|
2219
|
+
const isCompleted = step.state === "completed";
|
|
2220
|
+
const getAriaLabel = () => {
|
|
2221
|
+
let suffix = "";
|
|
2222
|
+
if (step.state === "completed") {
|
|
2223
|
+
suffix = " (conclu\xEDdo)";
|
|
2224
|
+
} else if (step.state === "current") {
|
|
2225
|
+
suffix = " (atual)";
|
|
2226
|
+
}
|
|
2227
|
+
return `${step.label}${suffix}`;
|
|
2228
|
+
};
|
|
2229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2230
|
+
"div",
|
|
2231
|
+
{
|
|
2232
|
+
className: `
|
|
2233
|
+
flex flex-col justify-center items-center pb-2 gap-2
|
|
2234
|
+
${sizeClasses.stepWidth} ${sizeClasses.stepHeight}
|
|
2235
|
+
flex-none flex-grow
|
|
2236
|
+
${className}
|
|
2237
|
+
sm:max-w-[100px] md:max-w-[120px] lg:max-w-none xl:max-w-none
|
|
2238
|
+
sm:min-h-[40px] md:min-h-[45px] lg:min-h-none
|
|
2239
|
+
overflow-visible
|
|
2240
|
+
`,
|
|
2241
|
+
children: [
|
|
2242
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2243
|
+
"div",
|
|
2244
|
+
{
|
|
2245
|
+
className: `
|
|
2246
|
+
w-full ${sizeClasses.progressBar} ${stateClasses.progressBar}
|
|
2247
|
+
rounded-sm flex-none
|
|
2248
|
+
`
|
|
2249
|
+
}
|
|
2250
|
+
),
|
|
2251
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2252
|
+
"div",
|
|
2253
|
+
{
|
|
2254
|
+
className: `
|
|
2255
|
+
flex flex-col sm:flex-row items-center
|
|
2256
|
+
gap-1 sm:gap-2 w-full sm:w-auto
|
|
2257
|
+
h-auto sm:h-5 flex-none
|
|
2258
|
+
overflow-visible
|
|
2259
|
+
`,
|
|
2260
|
+
children: [
|
|
2261
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2262
|
+
"div",
|
|
2263
|
+
{
|
|
2264
|
+
className: `
|
|
2265
|
+
${sizeClasses.indicator} ${stateClasses.indicator}
|
|
2266
|
+
rounded-full flex items-center justify-center relative
|
|
2267
|
+
flex-none transition-all duration-300 ease-out
|
|
2268
|
+
w-4 h-4 sm:w-5 sm:h-5 md:w-5 md:h-5 lg:w-6 lg:h-6
|
|
2269
|
+
`,
|
|
2270
|
+
"aria-label": getAriaLabel(),
|
|
2271
|
+
children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2272
|
+
import_phosphor_react7.Check,
|
|
2273
|
+
{
|
|
2274
|
+
weight: "bold",
|
|
2275
|
+
className: `
|
|
2276
|
+
${stateClasses.indicatorText}
|
|
2277
|
+
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
|
|
2278
|
+
`
|
|
2279
|
+
}
|
|
2280
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2281
|
+
Text_default,
|
|
2282
|
+
{
|
|
2283
|
+
size: sizeClasses.indicatorTextSize,
|
|
2284
|
+
weight: "medium",
|
|
2285
|
+
color: "",
|
|
2286
|
+
className: `${stateClasses.indicatorText} leading-none text-2xs sm:text-xs`,
|
|
2287
|
+
children: stepNumber
|
|
2288
|
+
}
|
|
2289
|
+
)
|
|
2290
|
+
}
|
|
2291
|
+
),
|
|
2292
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2293
|
+
Text_default,
|
|
2294
|
+
{
|
|
2295
|
+
size: sizeClasses.labelTextSize,
|
|
2296
|
+
weight: "medium",
|
|
2297
|
+
color: "",
|
|
2298
|
+
className: `
|
|
2299
|
+
${stateClasses.label} leading-tight flex-none
|
|
2300
|
+
text-center sm:text-left break-words
|
|
2301
|
+
px-1 sm:px-0 max-w-full
|
|
2302
|
+
text-2xs sm:text-xs md:text-xs lg:text-sm
|
|
2303
|
+
whitespace-normal
|
|
2304
|
+
`,
|
|
2305
|
+
children: step.label
|
|
2306
|
+
}
|
|
2307
|
+
)
|
|
2308
|
+
]
|
|
2309
|
+
}
|
|
2310
|
+
)
|
|
2311
|
+
]
|
|
2312
|
+
}
|
|
2313
|
+
);
|
|
2314
|
+
};
|
|
2315
|
+
var calculateStepStates = (steps, currentStep) => {
|
|
2316
|
+
return steps.map((step, index) => {
|
|
2317
|
+
let stepState;
|
|
2318
|
+
if (index < currentStep) {
|
|
2319
|
+
stepState = "completed";
|
|
2320
|
+
} else if (index === currentStep) {
|
|
2321
|
+
stepState = "current";
|
|
2322
|
+
} else {
|
|
2323
|
+
stepState = "pending";
|
|
2324
|
+
}
|
|
2325
|
+
return {
|
|
2326
|
+
...step,
|
|
2327
|
+
state: stepState
|
|
2328
|
+
};
|
|
2329
|
+
});
|
|
2330
|
+
};
|
|
2331
|
+
var getProgressText = (currentStep, totalSteps, customText) => {
|
|
2332
|
+
if (customText) return customText;
|
|
2333
|
+
return `Etapa ${currentStep + 1} de ${totalSteps}`;
|
|
2334
|
+
};
|
|
2335
|
+
var Stepper = ({
|
|
2336
|
+
steps: initialSteps,
|
|
2337
|
+
size = "medium",
|
|
2338
|
+
currentStep,
|
|
2339
|
+
className = "",
|
|
2340
|
+
stepClassName = "",
|
|
2341
|
+
showProgress = false,
|
|
2342
|
+
progressText,
|
|
2343
|
+
responsive = true
|
|
2344
|
+
}) => {
|
|
2345
|
+
const sizeClasses = SIZE_CLASSES9[size];
|
|
2346
|
+
const steps = currentStep !== void 0 ? calculateStepStates(initialSteps, currentStep) : initialSteps;
|
|
2347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2348
|
+
"fieldset",
|
|
2349
|
+
{
|
|
2350
|
+
className: `flex flex-col gap-4 sm:gap-5 md:gap-6 ${className} border-0 p-0 m-0`,
|
|
2351
|
+
children: [
|
|
2352
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("legend", { className: "absolute w-px h-px p-0 -m-px overflow-hidden whitespace-nowrap border-0", children: "Stepper de formul\xE1rio" }),
|
|
2353
|
+
showProgress && currentStep !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2354
|
+
Text_default,
|
|
2355
|
+
{
|
|
2356
|
+
size: "sm",
|
|
2357
|
+
weight: "medium",
|
|
2358
|
+
className: "text-text-600 text-center sm:text-left text-xs sm:text-sm",
|
|
2359
|
+
children: getProgressText(currentStep, steps.length, progressText)
|
|
2360
|
+
}
|
|
2361
|
+
),
|
|
2362
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2363
|
+
"div",
|
|
2364
|
+
{
|
|
2365
|
+
className: `
|
|
2366
|
+
flex items-center
|
|
2367
|
+
${sizeClasses.container}
|
|
2368
|
+
${responsive ? "flex-row overflow-x-auto overflow-y-hidden scrollbar-hide justify-start sm:justify-center md:justify-center lg:justify-center" : "flex-row justify-center"}
|
|
2369
|
+
px-2 sm:px-4 md:px-6 lg:px-0
|
|
2370
|
+
max-w-full min-w-0
|
|
2371
|
+
gap-2 sm:gap-3 md:gap-4 lg:gap-4
|
|
2372
|
+
`,
|
|
2373
|
+
role: "tablist",
|
|
2374
|
+
"aria-label": "Progress steps",
|
|
2375
|
+
children: steps.map((step, index) => {
|
|
2376
|
+
const stateClasses = STATE_CLASSES6[step.state];
|
|
2377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2378
|
+
Step,
|
|
2379
|
+
{
|
|
2380
|
+
step,
|
|
2381
|
+
index,
|
|
2382
|
+
size,
|
|
2383
|
+
sizeClasses,
|
|
2384
|
+
stateClasses,
|
|
2385
|
+
isLast: index === steps.length - 1,
|
|
2386
|
+
className: stepClassName
|
|
2387
|
+
},
|
|
2388
|
+
step.id
|
|
2389
|
+
);
|
|
2390
|
+
})
|
|
2391
|
+
}
|
|
2392
|
+
)
|
|
2393
|
+
]
|
|
2394
|
+
}
|
|
2395
|
+
);
|
|
2396
|
+
};
|
|
2397
|
+
var Stepper_default = Stepper;
|
|
2398
|
+
|
|
2092
2399
|
// src/components/Calendar/Calendar.tsx
|
|
2093
2400
|
var import_react9 = require("react");
|
|
2094
|
-
var
|
|
2401
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2095
2402
|
var WEEK_DAYS = ["SEG", "TER", "QUA", "QUI", "SEX", "S\xC1B", "DOM"];
|
|
2096
2403
|
var WEEK_DAYS_SHORT = ["S", "T", "Q", "Q", "S", "S", "D"];
|
|
2097
2404
|
var MONTH_NAMES = [
|
|
@@ -2114,15 +2421,15 @@ var MonthYearPicker = ({
|
|
|
2114
2421
|
currentDate,
|
|
2115
2422
|
onYearChange,
|
|
2116
2423
|
onMonthChange
|
|
2117
|
-
}) => /* @__PURE__ */ (0,
|
|
2424
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2118
2425
|
"div",
|
|
2119
2426
|
{
|
|
2120
2427
|
ref: monthPickerRef,
|
|
2121
2428
|
className: "absolute top-full left-0 z-50 mt-1 bg-white rounded-lg shadow-lg border border-border-200 p-4 min-w-[280px]",
|
|
2122
2429
|
children: [
|
|
2123
|
-
/* @__PURE__ */ (0,
|
|
2124
|
-
/* @__PURE__ */ (0,
|
|
2125
|
-
/* @__PURE__ */ (0,
|
|
2430
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "mb-4", children: [
|
|
2431
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h3", { className: "text-sm font-medium text-text-700 mb-2", children: "Selecionar Ano" }),
|
|
2432
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "grid grid-cols-4 gap-1 max-h-32 overflow-y-auto", children: availableYears.map((year) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2126
2433
|
"button",
|
|
2127
2434
|
{
|
|
2128
2435
|
onClick: () => onYearChange(year),
|
|
@@ -2135,9 +2442,9 @@ var MonthYearPicker = ({
|
|
|
2135
2442
|
year
|
|
2136
2443
|
)) })
|
|
2137
2444
|
] }),
|
|
2138
|
-
/* @__PURE__ */ (0,
|
|
2139
|
-
/* @__PURE__ */ (0,
|
|
2140
|
-
/* @__PURE__ */ (0,
|
|
2445
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
|
|
2446
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h3", { className: "text-sm font-medium text-text-700 mb-2", children: "Selecionar M\xEAs" }),
|
|
2447
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "grid grid-cols-3 gap-1", children: MONTH_NAMES.map((month, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2141
2448
|
"button",
|
|
2142
2449
|
{
|
|
2143
2450
|
onClick: () => onMonthChange(index, currentDate.getFullYear()),
|
|
@@ -2269,28 +2576,28 @@ var Calendar = ({
|
|
|
2269
2576
|
onDateSelect?.(day.date);
|
|
2270
2577
|
};
|
|
2271
2578
|
if (variant === "navigation") {
|
|
2272
|
-
return /* @__PURE__ */ (0,
|
|
2273
|
-
/* @__PURE__ */ (0,
|
|
2274
|
-
/* @__PURE__ */ (0,
|
|
2275
|
-
/* @__PURE__ */ (0,
|
|
2579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: `bg-background rounded-xl p-3 ${className}`, children: [
|
|
2580
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center justify-between mb-4 px-6", children: [
|
|
2581
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative", ref: monthPickerContainerRef, children: [
|
|
2582
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2276
2583
|
"button",
|
|
2277
2584
|
{
|
|
2278
2585
|
onClick: toggleMonthPicker,
|
|
2279
2586
|
className: "flex items-center gap-1 hover:bg-background-100 rounded px-2 py-1 transition-colors",
|
|
2280
2587
|
children: [
|
|
2281
|
-
/* @__PURE__ */ (0,
|
|
2588
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "text-sm font-medium text-text-600", children: [
|
|
2282
2589
|
MONTH_NAMES[currentDate.getMonth()],
|
|
2283
2590
|
" ",
|
|
2284
2591
|
currentDate.getFullYear()
|
|
2285
2592
|
] }),
|
|
2286
|
-
/* @__PURE__ */ (0,
|
|
2593
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2287
2594
|
"svg",
|
|
2288
2595
|
{
|
|
2289
2596
|
className: `w-4 h-4 text-primary-950 transition-transform ${isMonthPickerOpen ? "rotate-180" : ""}`,
|
|
2290
2597
|
fill: "none",
|
|
2291
2598
|
stroke: "currentColor",
|
|
2292
2599
|
viewBox: "0 0 24 24",
|
|
2293
|
-
children: /* @__PURE__ */ (0,
|
|
2600
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2294
2601
|
"path",
|
|
2295
2602
|
{
|
|
2296
2603
|
strokeLinecap: "round",
|
|
@@ -2304,7 +2611,7 @@ var Calendar = ({
|
|
|
2304
2611
|
]
|
|
2305
2612
|
}
|
|
2306
2613
|
),
|
|
2307
|
-
isMonthPickerOpen && /* @__PURE__ */ (0,
|
|
2614
|
+
isMonthPickerOpen && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2308
2615
|
MonthYearPicker,
|
|
2309
2616
|
{
|
|
2310
2617
|
monthPickerRef,
|
|
@@ -2315,21 +2622,21 @@ var Calendar = ({
|
|
|
2315
2622
|
}
|
|
2316
2623
|
)
|
|
2317
2624
|
] }),
|
|
2318
|
-
/* @__PURE__ */ (0,
|
|
2319
|
-
/* @__PURE__ */ (0,
|
|
2625
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-10", children: [
|
|
2626
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2320
2627
|
"button",
|
|
2321
2628
|
{
|
|
2322
2629
|
onClick: goToPreviousMonth,
|
|
2323
2630
|
className: "p-1 rounded hover:bg-background-100 transition-colors",
|
|
2324
2631
|
"aria-label": "M\xEAs anterior",
|
|
2325
|
-
children: /* @__PURE__ */ (0,
|
|
2632
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2326
2633
|
"svg",
|
|
2327
2634
|
{
|
|
2328
2635
|
className: "w-6 h-6 text-primary-950",
|
|
2329
2636
|
fill: "none",
|
|
2330
2637
|
stroke: "currentColor",
|
|
2331
2638
|
viewBox: "0 0 24 24",
|
|
2332
|
-
children: /* @__PURE__ */ (0,
|
|
2639
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2333
2640
|
"path",
|
|
2334
2641
|
{
|
|
2335
2642
|
strokeLinecap: "round",
|
|
@@ -2342,20 +2649,20 @@ var Calendar = ({
|
|
|
2342
2649
|
)
|
|
2343
2650
|
}
|
|
2344
2651
|
),
|
|
2345
|
-
/* @__PURE__ */ (0,
|
|
2652
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2346
2653
|
"button",
|
|
2347
2654
|
{
|
|
2348
2655
|
onClick: goToNextMonth,
|
|
2349
2656
|
className: "p-1 rounded hover:bg-background-100 transition-colors",
|
|
2350
2657
|
"aria-label": "Pr\xF3ximo m\xEAs",
|
|
2351
|
-
children: /* @__PURE__ */ (0,
|
|
2658
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2352
2659
|
"svg",
|
|
2353
2660
|
{
|
|
2354
2661
|
className: "w-6 h-6 text-primary-950",
|
|
2355
2662
|
fill: "none",
|
|
2356
2663
|
stroke: "currentColor",
|
|
2357
2664
|
viewBox: "0 0 24 24",
|
|
2358
|
-
children: /* @__PURE__ */ (0,
|
|
2665
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2359
2666
|
"path",
|
|
2360
2667
|
{
|
|
2361
2668
|
strokeLinecap: "round",
|
|
@@ -2370,7 +2677,7 @@ var Calendar = ({
|
|
|
2370
2677
|
)
|
|
2371
2678
|
] })
|
|
2372
2679
|
] }),
|
|
2373
|
-
/* @__PURE__ */ (0,
|
|
2680
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "grid grid-cols-7 gap-1 mb-2", children: WEEK_DAYS_SHORT.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2374
2681
|
"div",
|
|
2375
2682
|
{
|
|
2376
2683
|
className: "h-9 flex items-center justify-center text-xs font-normal text-text-600",
|
|
@@ -2378,13 +2685,13 @@ var Calendar = ({
|
|
|
2378
2685
|
},
|
|
2379
2686
|
`${day}-${index}`
|
|
2380
2687
|
)) }),
|
|
2381
|
-
/* @__PURE__ */ (0,
|
|
2688
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "grid grid-cols-7 gap-1", children: calendarData.map((day) => {
|
|
2382
2689
|
if (!day.isCurrentMonth) {
|
|
2383
|
-
return /* @__PURE__ */ (0,
|
|
2690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2384
2691
|
"div",
|
|
2385
2692
|
{
|
|
2386
2693
|
className: "flex items-center justify-center",
|
|
2387
|
-
children: /* @__PURE__ */ (0,
|
|
2694
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w-9 h-9" })
|
|
2388
2695
|
},
|
|
2389
2696
|
day.date.getTime()
|
|
2390
2697
|
);
|
|
@@ -2400,11 +2707,11 @@ var Calendar = ({
|
|
|
2400
2707
|
} else if (day.isSelected) {
|
|
2401
2708
|
spanClass = "h-6 w-6 rounded-full bg-primary-950 text-text";
|
|
2402
2709
|
}
|
|
2403
|
-
return /* @__PURE__ */ (0,
|
|
2710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2404
2711
|
"div",
|
|
2405
2712
|
{
|
|
2406
2713
|
className: "flex items-center justify-center",
|
|
2407
|
-
children: /* @__PURE__ */ (0,
|
|
2714
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2408
2715
|
"button",
|
|
2409
2716
|
{
|
|
2410
2717
|
className: `
|
|
@@ -2420,7 +2727,7 @@ var Calendar = ({
|
|
|
2420
2727
|
"aria-label": `${day.date.getDate()} de ${MONTH_NAMES[day.date.getMonth()]}`,
|
|
2421
2728
|
"aria-current": day.isToday ? "date" : void 0,
|
|
2422
2729
|
tabIndex: 0,
|
|
2423
|
-
children: /* @__PURE__ */ (0,
|
|
2730
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: spanClass, children: day.date.getDate() })
|
|
2424
2731
|
}
|
|
2425
2732
|
)
|
|
2426
2733
|
},
|
|
@@ -2429,28 +2736,28 @@ var Calendar = ({
|
|
|
2429
2736
|
}) })
|
|
2430
2737
|
] });
|
|
2431
2738
|
}
|
|
2432
|
-
return /* @__PURE__ */ (0,
|
|
2433
|
-
/* @__PURE__ */ (0,
|
|
2434
|
-
/* @__PURE__ */ (0,
|
|
2435
|
-
/* @__PURE__ */ (0,
|
|
2739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: `bg-background rounded-xl p-4 ${className}`, children: [
|
|
2740
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center justify-between mb-3.5", children: [
|
|
2741
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative", ref: monthPickerContainerRef, children: [
|
|
2742
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2436
2743
|
"button",
|
|
2437
2744
|
{
|
|
2438
2745
|
onClick: toggleMonthPicker,
|
|
2439
2746
|
className: "flex items-center gap-2 hover:bg-background-100 rounded px-2 py-1 transition-colors",
|
|
2440
2747
|
children: [
|
|
2441
|
-
/* @__PURE__ */ (0,
|
|
2748
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("h2", { className: "text-lg font-semibold text-text-950", children: [
|
|
2442
2749
|
MONTH_NAMES[currentDate.getMonth()],
|
|
2443
2750
|
" ",
|
|
2444
2751
|
currentDate.getFullYear()
|
|
2445
2752
|
] }),
|
|
2446
|
-
/* @__PURE__ */ (0,
|
|
2753
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2447
2754
|
"svg",
|
|
2448
2755
|
{
|
|
2449
2756
|
className: `w-4 h-4 text-text-400 transition-transform ${isMonthPickerOpen ? "rotate-180" : ""}`,
|
|
2450
2757
|
fill: "none",
|
|
2451
2758
|
stroke: "currentColor",
|
|
2452
2759
|
viewBox: "0 0 24 24",
|
|
2453
|
-
children: /* @__PURE__ */ (0,
|
|
2760
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2454
2761
|
"path",
|
|
2455
2762
|
{
|
|
2456
2763
|
strokeLinecap: "round",
|
|
@@ -2464,7 +2771,7 @@ var Calendar = ({
|
|
|
2464
2771
|
]
|
|
2465
2772
|
}
|
|
2466
2773
|
),
|
|
2467
|
-
isMonthPickerOpen && /* @__PURE__ */ (0,
|
|
2774
|
+
isMonthPickerOpen && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2468
2775
|
MonthYearPicker,
|
|
2469
2776
|
{
|
|
2470
2777
|
monthPickerRef,
|
|
@@ -2475,21 +2782,21 @@ var Calendar = ({
|
|
|
2475
2782
|
}
|
|
2476
2783
|
)
|
|
2477
2784
|
] }),
|
|
2478
|
-
/* @__PURE__ */ (0,
|
|
2479
|
-
/* @__PURE__ */ (0,
|
|
2785
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
2786
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2480
2787
|
"button",
|
|
2481
2788
|
{
|
|
2482
2789
|
onClick: goToPreviousMonth,
|
|
2483
2790
|
className: "p-1 rounded-md hover:bg-background-100 transition-colors",
|
|
2484
2791
|
"aria-label": "M\xEAs anterior",
|
|
2485
|
-
children: /* @__PURE__ */ (0,
|
|
2792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2486
2793
|
"svg",
|
|
2487
2794
|
{
|
|
2488
2795
|
className: "w-6 h-6 text-primary-950",
|
|
2489
2796
|
fill: "none",
|
|
2490
2797
|
stroke: "currentColor",
|
|
2491
2798
|
viewBox: "0 0 24 24",
|
|
2492
|
-
children: /* @__PURE__ */ (0,
|
|
2799
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2493
2800
|
"path",
|
|
2494
2801
|
{
|
|
2495
2802
|
strokeLinecap: "round",
|
|
@@ -2502,20 +2809,20 @@ var Calendar = ({
|
|
|
2502
2809
|
)
|
|
2503
2810
|
}
|
|
2504
2811
|
),
|
|
2505
|
-
/* @__PURE__ */ (0,
|
|
2812
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2506
2813
|
"button",
|
|
2507
2814
|
{
|
|
2508
2815
|
onClick: goToNextMonth,
|
|
2509
2816
|
className: "p-1 rounded-md hover:bg-background-100 transition-colors",
|
|
2510
2817
|
"aria-label": "Pr\xF3ximo m\xEAs",
|
|
2511
|
-
children: /* @__PURE__ */ (0,
|
|
2818
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2512
2819
|
"svg",
|
|
2513
2820
|
{
|
|
2514
2821
|
className: "w-6 h-6 text-primary-950",
|
|
2515
2822
|
fill: "none",
|
|
2516
2823
|
stroke: "currentColor",
|
|
2517
2824
|
viewBox: "0 0 24 24",
|
|
2518
|
-
children: /* @__PURE__ */ (0,
|
|
2825
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2519
2826
|
"path",
|
|
2520
2827
|
{
|
|
2521
2828
|
strokeLinecap: "round",
|
|
@@ -2530,7 +2837,7 @@ var Calendar = ({
|
|
|
2530
2837
|
)
|
|
2531
2838
|
] })
|
|
2532
2839
|
] }),
|
|
2533
|
-
/* @__PURE__ */ (0,
|
|
2840
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "grid grid-cols-7 gap-1 mb-2", children: WEEK_DAYS.map((day) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2534
2841
|
"div",
|
|
2535
2842
|
{
|
|
2536
2843
|
className: "h-4 flex items-center justify-center text-xs font-semibold text-text-500",
|
|
@@ -2538,13 +2845,13 @@ var Calendar = ({
|
|
|
2538
2845
|
},
|
|
2539
2846
|
day
|
|
2540
2847
|
)) }),
|
|
2541
|
-
/* @__PURE__ */ (0,
|
|
2848
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "grid grid-cols-7 gap-1", children: calendarData.map((day) => {
|
|
2542
2849
|
if (!day.isCurrentMonth) {
|
|
2543
|
-
return /* @__PURE__ */ (0,
|
|
2850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2544
2851
|
"div",
|
|
2545
2852
|
{
|
|
2546
2853
|
className: "flex items-center justify-center",
|
|
2547
|
-
children: /* @__PURE__ */ (0,
|
|
2854
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w-10 h-10" })
|
|
2548
2855
|
},
|
|
2549
2856
|
day.date.getTime()
|
|
2550
2857
|
);
|
|
@@ -2554,11 +2861,11 @@ var Calendar = ({
|
|
|
2554
2861
|
variant,
|
|
2555
2862
|
showActivities
|
|
2556
2863
|
);
|
|
2557
|
-
return /* @__PURE__ */ (0,
|
|
2864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2558
2865
|
"div",
|
|
2559
2866
|
{
|
|
2560
2867
|
className: "flex items-center justify-center",
|
|
2561
|
-
children: /* @__PURE__ */ (0,
|
|
2868
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2562
2869
|
"button",
|
|
2563
2870
|
{
|
|
2564
2871
|
className: `
|
|
@@ -2588,9 +2895,9 @@ var Calendar_default = Calendar;
|
|
|
2588
2895
|
|
|
2589
2896
|
// src/components/Modal/Modal.tsx
|
|
2590
2897
|
var import_react10 = require("react");
|
|
2591
|
-
var
|
|
2592
|
-
var
|
|
2593
|
-
var
|
|
2898
|
+
var import_phosphor_react8 = require("phosphor-react");
|
|
2899
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2900
|
+
var SIZE_CLASSES10 = {
|
|
2594
2901
|
xs: "max-w-[360px]",
|
|
2595
2902
|
sm: "max-w-[420px]",
|
|
2596
2903
|
md: "max-w-[510px]",
|
|
@@ -2641,10 +2948,10 @@ var Modal = ({
|
|
|
2641
2948
|
}
|
|
2642
2949
|
};
|
|
2643
2950
|
if (!isOpen) return null;
|
|
2644
|
-
const sizeClasses =
|
|
2951
|
+
const sizeClasses = SIZE_CLASSES10[size];
|
|
2645
2952
|
const baseClasses = "bg-background rounded-3xl shadow-hard-shadow-2 border border-border-100 w-full mx-4";
|
|
2646
2953
|
const modalClasses = `${baseClasses} ${sizeClasses} ${className}`;
|
|
2647
|
-
return /* @__PURE__ */ (0,
|
|
2954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2648
2955
|
"div",
|
|
2649
2956
|
{
|
|
2650
2957
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-xs",
|
|
@@ -2652,7 +2959,7 @@ var Modal = ({
|
|
|
2652
2959
|
onKeyDown: handleBackdropKeyDown,
|
|
2653
2960
|
role: "none",
|
|
2654
2961
|
"aria-hidden": "true",
|
|
2655
|
-
children: /* @__PURE__ */ (0,
|
|
2962
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2656
2963
|
"div",
|
|
2657
2964
|
{
|
|
2658
2965
|
className: modalClasses,
|
|
@@ -2660,20 +2967,20 @@ var Modal = ({
|
|
|
2660
2967
|
"aria-modal": "true",
|
|
2661
2968
|
"aria-labelledby": "modal-title",
|
|
2662
2969
|
children: [
|
|
2663
|
-
/* @__PURE__ */ (0,
|
|
2664
|
-
/* @__PURE__ */ (0,
|
|
2665
|
-
!hideCloseButton && /* @__PURE__ */ (0,
|
|
2970
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center justify-between px-6 py-6", children: [
|
|
2971
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h2", { id: "modal-title", className: "text-lg font-semibold text-text-950", children: title }),
|
|
2972
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2666
2973
|
"button",
|
|
2667
2974
|
{
|
|
2668
2975
|
onClick: onClose,
|
|
2669
2976
|
className: "p-1 text-text-500 hover:text-text-700 hover:bg-background-50 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-indicator-info focus:ring-offset-2",
|
|
2670
2977
|
"aria-label": "Fechar modal",
|
|
2671
|
-
children: /* @__PURE__ */ (0,
|
|
2978
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_phosphor_react8.X, { size: 18 })
|
|
2672
2979
|
}
|
|
2673
2980
|
)
|
|
2674
2981
|
] }),
|
|
2675
|
-
/* @__PURE__ */ (0,
|
|
2676
|
-
footer && /* @__PURE__ */ (0,
|
|
2982
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "px-6 pb-6", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "text-text-500 font-normal text-sm leading-6", children }) }),
|
|
2983
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex justify-end gap-3 px-6 pb-6", children: footer })
|
|
2677
2984
|
]
|
|
2678
2985
|
}
|
|
2679
2986
|
)
|
|
@@ -2683,10 +2990,10 @@ var Modal = ({
|
|
|
2683
2990
|
var Modal_default = Modal;
|
|
2684
2991
|
|
|
2685
2992
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2686
|
-
var
|
|
2993
|
+
var import_phosphor_react9 = require("phosphor-react");
|
|
2687
2994
|
var import_react11 = require("react");
|
|
2688
2995
|
var import_zustand2 = require("zustand");
|
|
2689
|
-
var
|
|
2996
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2690
2997
|
function createDropdownStore() {
|
|
2691
2998
|
return (0, import_zustand2.create)((set) => ({
|
|
2692
2999
|
open: false,
|
|
@@ -2781,7 +3088,7 @@ var DropdownMenu = ({
|
|
|
2781
3088
|
setOpen(propOpen);
|
|
2782
3089
|
}
|
|
2783
3090
|
}, [propOpen]);
|
|
2784
|
-
return /* @__PURE__ */ (0,
|
|
3091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "relative", ref: menuRef, children: injectStore(children, store) });
|
|
2785
3092
|
};
|
|
2786
3093
|
var DropdownMenuTrigger = ({
|
|
2787
3094
|
className,
|
|
@@ -2793,7 +3100,7 @@ var DropdownMenuTrigger = ({
|
|
|
2793
3100
|
const store = useDropdownStore(externalStore);
|
|
2794
3101
|
const open = (0, import_zustand2.useStore)(store, (s) => s.open);
|
|
2795
3102
|
const toggleOpen = () => store.setState({ open: !open });
|
|
2796
|
-
return /* @__PURE__ */ (0,
|
|
3103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2797
3104
|
Button_default,
|
|
2798
3105
|
{
|
|
2799
3106
|
variant: "outline",
|
|
@@ -2830,7 +3137,7 @@ var MENUCONTENT_VARIANT_CLASSES = {
|
|
|
2830
3137
|
profile: "p-6"
|
|
2831
3138
|
};
|
|
2832
3139
|
var MenuLabel = (0, import_react11.forwardRef)(({ className, inset, store: _store, ...props }, ref) => {
|
|
2833
|
-
return /* @__PURE__ */ (0,
|
|
3140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2834
3141
|
"div",
|
|
2835
3142
|
{
|
|
2836
3143
|
ref,
|
|
@@ -2869,7 +3176,7 @@ var MenuContent = (0, import_react11.forwardRef)(
|
|
|
2869
3176
|
return `absolute ${vertical} ${horizontal}`;
|
|
2870
3177
|
};
|
|
2871
3178
|
const variantClasses = MENUCONTENT_VARIANT_CLASSES[variant];
|
|
2872
|
-
return /* @__PURE__ */ (0,
|
|
3179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2873
3180
|
"div",
|
|
2874
3181
|
{
|
|
2875
3182
|
ref,
|
|
@@ -2928,7 +3235,7 @@ var DropdownMenuItem = (0, import_react11.forwardRef)(
|
|
|
2928
3235
|
const getVariantProps = () => {
|
|
2929
3236
|
return variant === "profile" ? { "data-variant": "profile" } : {};
|
|
2930
3237
|
};
|
|
2931
|
-
return /* @__PURE__ */ (0,
|
|
3238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2932
3239
|
"div",
|
|
2933
3240
|
{
|
|
2934
3241
|
ref,
|
|
@@ -2950,7 +3257,7 @@ var DropdownMenuItem = (0, import_react11.forwardRef)(
|
|
|
2950
3257
|
...props,
|
|
2951
3258
|
children: [
|
|
2952
3259
|
iconLeft,
|
|
2953
|
-
/* @__PURE__ */ (0,
|
|
3260
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "w-full text-md", children }),
|
|
2954
3261
|
iconRight
|
|
2955
3262
|
]
|
|
2956
3263
|
}
|
|
@@ -2958,7 +3265,7 @@ var DropdownMenuItem = (0, import_react11.forwardRef)(
|
|
|
2958
3265
|
}
|
|
2959
3266
|
);
|
|
2960
3267
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
2961
|
-
var DropdownMenuSeparator = (0, import_react11.forwardRef)(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3268
|
+
var DropdownMenuSeparator = (0, import_react11.forwardRef)(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2962
3269
|
"div",
|
|
2963
3270
|
{
|
|
2964
3271
|
ref,
|
|
@@ -2971,7 +3278,7 @@ var ProfileMenuTrigger = (0, import_react11.forwardRef)(({ className, onClick, s
|
|
|
2971
3278
|
const store = useDropdownStore(externalStore);
|
|
2972
3279
|
const open = (0, import_zustand2.useStore)(store, (s) => s.open);
|
|
2973
3280
|
const toggleOpen = () => store.setState({ open: !open });
|
|
2974
|
-
return /* @__PURE__ */ (0,
|
|
3281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2975
3282
|
"button",
|
|
2976
3283
|
{
|
|
2977
3284
|
ref,
|
|
@@ -2983,13 +3290,13 @@ var ProfileMenuTrigger = (0, import_react11.forwardRef)(({ className, onClick, s
|
|
|
2983
3290
|
},
|
|
2984
3291
|
"aria-expanded": open,
|
|
2985
3292
|
...props,
|
|
2986
|
-
children: /* @__PURE__ */ (0,
|
|
3293
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "size-6 rounded-full bg-background-100 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_phosphor_react9.User, { className: "text-background-950", size: 18 }) })
|
|
2987
3294
|
}
|
|
2988
3295
|
);
|
|
2989
3296
|
});
|
|
2990
3297
|
ProfileMenuTrigger.displayName = "ProfileMenuTrigger";
|
|
2991
3298
|
var ProfileMenuHeader = (0, import_react11.forwardRef)(({ className, name, email, store: _store, ...props }, ref) => {
|
|
2992
|
-
return /* @__PURE__ */ (0,
|
|
3299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2993
3300
|
"div",
|
|
2994
3301
|
{
|
|
2995
3302
|
ref,
|
|
@@ -3000,10 +3307,10 @@ var ProfileMenuHeader = (0, import_react11.forwardRef)(({ className, name, email
|
|
|
3000
3307
|
`,
|
|
3001
3308
|
...props,
|
|
3002
3309
|
children: [
|
|
3003
|
-
/* @__PURE__ */ (0,
|
|
3004
|
-
/* @__PURE__ */ (0,
|
|
3005
|
-
/* @__PURE__ */ (0,
|
|
3006
|
-
/* @__PURE__ */ (0,
|
|
3310
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "size-16 bg-background-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_phosphor_react9.User, { size: 34, className: "text-background-950" }) }),
|
|
3311
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-col ", children: [
|
|
3312
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-xl font-bold text-text-950", children: name }),
|
|
3313
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-md text-text-600", children: email })
|
|
3007
3314
|
] })
|
|
3008
3315
|
]
|
|
3009
3316
|
}
|
|
@@ -3011,7 +3318,7 @@ var ProfileMenuHeader = (0, import_react11.forwardRef)(({ className, name, email
|
|
|
3011
3318
|
});
|
|
3012
3319
|
ProfileMenuHeader.displayName = "ProfileMenuHeader";
|
|
3013
3320
|
var ProfileMenuSection = (0, import_react11.forwardRef)(({ className, children, store: _store, ...props }, ref) => {
|
|
3014
|
-
return /* @__PURE__ */ (0,
|
|
3321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3015
3322
|
"div",
|
|
3016
3323
|
{
|
|
3017
3324
|
ref,
|
|
@@ -3034,7 +3341,7 @@ var ProfileMenuFooter = ({
|
|
|
3034
3341
|
}) => {
|
|
3035
3342
|
const store = useDropdownStore(externalStore);
|
|
3036
3343
|
const setOpen = (0, import_zustand2.useStore)(store, (s) => s.setOpen);
|
|
3037
|
-
return /* @__PURE__ */ (0,
|
|
3344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3038
3345
|
Button_default,
|
|
3039
3346
|
{
|
|
3040
3347
|
variant: "outline",
|
|
@@ -3046,8 +3353,8 @@ var ProfileMenuFooter = ({
|
|
|
3046
3353
|
},
|
|
3047
3354
|
...props,
|
|
3048
3355
|
children: [
|
|
3049
|
-
/* @__PURE__ */ (0,
|
|
3050
|
-
/* @__PURE__ */ (0,
|
|
3356
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_phosphor_react9.SignOut, {}) }),
|
|
3357
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: "Sair" })
|
|
3051
3358
|
]
|
|
3052
3359
|
}
|
|
3053
3360
|
);
|
|
@@ -3058,14 +3365,14 @@ var DropdownMenu_default = DropdownMenu;
|
|
|
3058
3365
|
// src/components/Select/Select.tsx
|
|
3059
3366
|
var import_zustand3 = require("zustand");
|
|
3060
3367
|
var import_react12 = require("react");
|
|
3061
|
-
var
|
|
3062
|
-
var
|
|
3368
|
+
var import_phosphor_react10 = require("phosphor-react");
|
|
3369
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3063
3370
|
var VARIANT_CLASSES4 = {
|
|
3064
3371
|
outlined: "border-2 rounded-sm focus:border-primary-950",
|
|
3065
3372
|
underlined: "border-b-2 focus:border-primary-950",
|
|
3066
3373
|
rounded: "border-2 rounded-4xl focus:border-primary-950"
|
|
3067
3374
|
};
|
|
3068
|
-
var
|
|
3375
|
+
var SIZE_CLASSES11 = {
|
|
3069
3376
|
small: "text-sm",
|
|
3070
3377
|
medium: "text-md",
|
|
3071
3378
|
large: "text-lg"
|
|
@@ -3105,7 +3412,7 @@ function getLabelAsNode(children) {
|
|
|
3105
3412
|
}
|
|
3106
3413
|
const flattened = import_react12.Children.toArray(children);
|
|
3107
3414
|
if (flattened.length === 1) return flattened[0];
|
|
3108
|
-
return /* @__PURE__ */ (0,
|
|
3415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jsx_runtime24.Fragment, { children: flattened });
|
|
3109
3416
|
}
|
|
3110
3417
|
var injectStore2 = (children, store) => {
|
|
3111
3418
|
return import_react12.Children.map(children, (child) => {
|
|
@@ -3206,8 +3513,8 @@ var Select = ({
|
|
|
3206
3513
|
if (label) store.setState({ selectedLabel: label });
|
|
3207
3514
|
}
|
|
3208
3515
|
}, [propValue]);
|
|
3209
|
-
const sizeClasses =
|
|
3210
|
-
return /* @__PURE__ */ (0,
|
|
3516
|
+
const sizeClasses = SIZE_CLASSES11[size];
|
|
3517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: `relative ${sizeClasses} w-[288px]`, ref: selectRef, children: injectStore2(children, store) });
|
|
3211
3518
|
};
|
|
3212
3519
|
var SelectValue = ({
|
|
3213
3520
|
placeholder,
|
|
@@ -3216,7 +3523,7 @@ var SelectValue = ({
|
|
|
3216
3523
|
const store = useSelectStore(externalStore);
|
|
3217
3524
|
const selectedLabel = (0, import_zustand3.useStore)(store, (s) => s.selectedLabel);
|
|
3218
3525
|
const value = (0, import_zustand3.useStore)(store, (s) => s.value);
|
|
3219
|
-
return /* @__PURE__ */ (0,
|
|
3526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-inherit", children: selectedLabel || placeholder || value });
|
|
3220
3527
|
};
|
|
3221
3528
|
var SelectTrigger = (0, import_react12.forwardRef)(
|
|
3222
3529
|
({
|
|
@@ -3231,7 +3538,7 @@ var SelectTrigger = (0, import_react12.forwardRef)(
|
|
|
3231
3538
|
const open = (0, import_zustand3.useStore)(store, (s) => s.open);
|
|
3232
3539
|
const toggleOpen = () => store.setState({ open: !open });
|
|
3233
3540
|
const variantClasses = VARIANT_CLASSES4[variant];
|
|
3234
|
-
return /* @__PURE__ */ (0,
|
|
3541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3235
3542
|
"button",
|
|
3236
3543
|
{
|
|
3237
3544
|
ref,
|
|
@@ -3250,8 +3557,8 @@ var SelectTrigger = (0, import_react12.forwardRef)(
|
|
|
3250
3557
|
...props,
|
|
3251
3558
|
children: [
|
|
3252
3559
|
props.children,
|
|
3253
|
-
/* @__PURE__ */ (0,
|
|
3254
|
-
|
|
3560
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3561
|
+
import_phosphor_react10.CaretDown,
|
|
3255
3562
|
{
|
|
3256
3563
|
className: `h-[1em] w-[1em] opacity-50 transition-transform ${open ? "rotate-180" : ""}`
|
|
3257
3564
|
}
|
|
@@ -3275,7 +3582,7 @@ var SelectContent = (0, import_react12.forwardRef)(
|
|
|
3275
3582
|
const open = (0, import_zustand3.useStore)(store, (s) => s.open);
|
|
3276
3583
|
if (!open) return null;
|
|
3277
3584
|
const getPositionClasses = () => `w-full min-w-full absolute ${SIDE_CLASSES2[side]} ${ALIGN_CLASSES2[align]}`;
|
|
3278
|
-
return /* @__PURE__ */ (0,
|
|
3585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3279
3586
|
"div",
|
|
3280
3587
|
{
|
|
3281
3588
|
role: "menu",
|
|
@@ -3313,7 +3620,7 @@ var SelectItem = (0, import_react12.forwardRef)(
|
|
|
3313
3620
|
}
|
|
3314
3621
|
props.onClick?.(e);
|
|
3315
3622
|
};
|
|
3316
|
-
return /* @__PURE__ */ (0,
|
|
3623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3317
3624
|
"div",
|
|
3318
3625
|
{
|
|
3319
3626
|
role: "menuitem",
|
|
@@ -3333,7 +3640,7 @@ var SelectItem = (0, import_react12.forwardRef)(
|
|
|
3333
3640
|
tabIndex: disabled ? -1 : 0,
|
|
3334
3641
|
...props,
|
|
3335
3642
|
children: [
|
|
3336
|
-
/* @__PURE__ */ (0,
|
|
3643
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: selectedValue === value && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_phosphor_react10.Check, { className: "" }) }),
|
|
3337
3644
|
children
|
|
3338
3645
|
]
|
|
3339
3646
|
}
|
|
@@ -3346,8 +3653,8 @@ var Select_default = Select;
|
|
|
3346
3653
|
// src/components/Menu/Menu.tsx
|
|
3347
3654
|
var import_zustand4 = require("zustand");
|
|
3348
3655
|
var import_react13 = require("react");
|
|
3349
|
-
var
|
|
3350
|
-
var
|
|
3656
|
+
var import_phosphor_react11 = require("phosphor-react");
|
|
3657
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3351
3658
|
var createMenuStore = () => (0, import_zustand4.create)((set) => ({
|
|
3352
3659
|
value: "",
|
|
3353
3660
|
setValue: (value) => set({ value })
|
|
@@ -3383,7 +3690,7 @@ var Menu = (0, import_react13.forwardRef)(
|
|
|
3383
3690
|
}, [value, onValueChange]);
|
|
3384
3691
|
const baseClasses = "w-full flex flex-row items-center gap-2 py-2 px-6";
|
|
3385
3692
|
const variantClasses = VARIANT_CLASSES5[variant];
|
|
3386
|
-
return /* @__PURE__ */ (0,
|
|
3693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3387
3694
|
"ul",
|
|
3388
3695
|
{
|
|
3389
3696
|
ref,
|
|
@@ -3428,7 +3735,7 @@ var MenuItem = (0, import_react13.forwardRef)(
|
|
|
3428
3735
|
...props
|
|
3429
3736
|
};
|
|
3430
3737
|
const variants = {
|
|
3431
|
-
menu: /* @__PURE__ */ (0,
|
|
3738
|
+
menu: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3432
3739
|
"li",
|
|
3433
3740
|
{
|
|
3434
3741
|
"data-variant": "menu",
|
|
@@ -3443,7 +3750,7 @@ var MenuItem = (0, import_react13.forwardRef)(
|
|
|
3443
3750
|
children
|
|
3444
3751
|
}
|
|
3445
3752
|
),
|
|
3446
|
-
menu2: /* @__PURE__ */ (0,
|
|
3753
|
+
menu2: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3447
3754
|
"li",
|
|
3448
3755
|
{
|
|
3449
3756
|
"data-variant": "menu2",
|
|
@@ -3455,7 +3762,7 @@ var MenuItem = (0, import_react13.forwardRef)(
|
|
|
3455
3762
|
children
|
|
3456
3763
|
}
|
|
3457
3764
|
),
|
|
3458
|
-
breadcrumb: /* @__PURE__ */ (0,
|
|
3765
|
+
breadcrumb: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3459
3766
|
"li",
|
|
3460
3767
|
{
|
|
3461
3768
|
"data-variant": "breadcrumb",
|
|
@@ -3466,7 +3773,7 @@ var MenuItem = (0, import_react13.forwardRef)(
|
|
|
3466
3773
|
${className ?? ""}
|
|
3467
3774
|
`,
|
|
3468
3775
|
...commonProps,
|
|
3469
|
-
children: /* @__PURE__ */ (0,
|
|
3776
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3470
3777
|
"span",
|
|
3471
3778
|
{
|
|
3472
3779
|
className: `
|
|
@@ -3484,14 +3791,14 @@ var MenuItem = (0, import_react13.forwardRef)(
|
|
|
3484
3791
|
);
|
|
3485
3792
|
MenuItem.displayName = "MenuItem";
|
|
3486
3793
|
var MenuSeparator = (0, import_react13.forwardRef)(
|
|
3487
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3794
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3488
3795
|
"li",
|
|
3489
3796
|
{
|
|
3490
3797
|
ref,
|
|
3491
3798
|
"aria-hidden": "true",
|
|
3492
3799
|
className: `[&>svg]:w-4 [&>svg]:h-4 text-text-600 ${className ?? ""}`,
|
|
3493
3800
|
...props,
|
|
3494
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
3801
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.CaretRight, {})
|
|
3495
3802
|
}
|
|
3496
3803
|
)
|
|
3497
3804
|
);
|
|
@@ -3506,12 +3813,427 @@ var injectStore3 = (children, store) => import_react13.Children.map(children, (c
|
|
|
3506
3813
|
});
|
|
3507
3814
|
});
|
|
3508
3815
|
var Menu_default = Menu;
|
|
3816
|
+
|
|
3817
|
+
// src/components/Card/Card.tsx
|
|
3818
|
+
var import_react14 = require("react");
|
|
3819
|
+
var import_phosphor_react12 = require("phosphor-react");
|
|
3820
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3821
|
+
var ACTION_CARD_CLASSES = {
|
|
3822
|
+
warning: "bg-warning-background",
|
|
3823
|
+
success: "bg-success-300",
|
|
3824
|
+
error: "bg-error-100",
|
|
3825
|
+
info: "bg-info-background"
|
|
3826
|
+
};
|
|
3827
|
+
var ACTION_ICON_CLASSES = {
|
|
3828
|
+
warning: "bg-warning-300 text-text",
|
|
3829
|
+
success: "bg-yellow-300 text-text-950",
|
|
3830
|
+
error: "bg-error-500 text-text",
|
|
3831
|
+
info: "bg-info-500 text-text"
|
|
3832
|
+
};
|
|
3833
|
+
var ACTION_SUBTITLE_CLASSES = {
|
|
3834
|
+
warning: "text-warning-600",
|
|
3835
|
+
success: "text-success-700",
|
|
3836
|
+
error: "text-error-700",
|
|
3837
|
+
info: "text-info-700"
|
|
3838
|
+
};
|
|
3839
|
+
var ACTION_HEADER_CLASSES = {
|
|
3840
|
+
warning: "text-warning-300",
|
|
3841
|
+
success: "text-success-300",
|
|
3842
|
+
error: "text-error-300",
|
|
3843
|
+
info: "text-info-300"
|
|
3844
|
+
};
|
|
3845
|
+
var CardActivesResults = (0, import_react14.forwardRef)(
|
|
3846
|
+
({
|
|
3847
|
+
icon,
|
|
3848
|
+
title,
|
|
3849
|
+
subTitle,
|
|
3850
|
+
header,
|
|
3851
|
+
extended = false,
|
|
3852
|
+
action = "success",
|
|
3853
|
+
description,
|
|
3854
|
+
className,
|
|
3855
|
+
...props
|
|
3856
|
+
}, ref) => {
|
|
3857
|
+
const actionCardClasses = ACTION_CARD_CLASSES[action];
|
|
3858
|
+
const actionIconClasses = ACTION_ICON_CLASSES[action];
|
|
3859
|
+
const actionSubTitleClasses = ACTION_SUBTITLE_CLASSES[action];
|
|
3860
|
+
const actionHeaderClasses = ACTION_HEADER_CLASSES[action];
|
|
3861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3862
|
+
"div",
|
|
3863
|
+
{
|
|
3864
|
+
ref,
|
|
3865
|
+
className: `w-full flex flex-col border border-border-50 bg-background rounded-xl ${className}`,
|
|
3866
|
+
...props,
|
|
3867
|
+
children: [
|
|
3868
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3869
|
+
"div",
|
|
3870
|
+
{
|
|
3871
|
+
className: `
|
|
3872
|
+
flex flex-col gap-1 items-center justify-center p-4
|
|
3873
|
+
${actionCardClasses}
|
|
3874
|
+
${extended ? "rounded-t-xl" : "rounded-xl"}`,
|
|
3875
|
+
children: [
|
|
3876
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3877
|
+
"span",
|
|
3878
|
+
{
|
|
3879
|
+
className: `size-7.5 rounded-full flex items-center justify-center ${actionIconClasses}`,
|
|
3880
|
+
children: icon
|
|
3881
|
+
}
|
|
3882
|
+
),
|
|
3883
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-text-800 font-medium uppercase text-2xs", children: title }),
|
|
3884
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: `text-lg font-bold ${actionSubTitleClasses}`, children: subTitle })
|
|
3885
|
+
]
|
|
3886
|
+
}
|
|
3887
|
+
),
|
|
3888
|
+
extended && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col items-center gap-2.5 pb-9.5 pt-2.5", children: [
|
|
3889
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3890
|
+
"p",
|
|
3891
|
+
{
|
|
3892
|
+
className: `text-2xs font-medium uppercase ${actionHeaderClasses}`,
|
|
3893
|
+
children: header
|
|
3894
|
+
}
|
|
3895
|
+
),
|
|
3896
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-sm text-info-800 text-center", children: description })
|
|
3897
|
+
] })
|
|
3898
|
+
]
|
|
3899
|
+
}
|
|
3900
|
+
);
|
|
3901
|
+
}
|
|
3902
|
+
);
|
|
3903
|
+
var CardQuestions = (0, import_react14.forwardRef)(
|
|
3904
|
+
({
|
|
3905
|
+
header,
|
|
3906
|
+
state = "undone",
|
|
3907
|
+
className,
|
|
3908
|
+
onClickButton,
|
|
3909
|
+
valueButton,
|
|
3910
|
+
...props
|
|
3911
|
+
}, ref) => {
|
|
3912
|
+
const isDone = state === "done";
|
|
3913
|
+
const stateLabel = isDone ? "Realizado" : "N\xE3o Realizado";
|
|
3914
|
+
const buttonLabel = isDone ? "Ver Quest\xE3o" : "Responder";
|
|
3915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3916
|
+
"div",
|
|
3917
|
+
{
|
|
3918
|
+
ref,
|
|
3919
|
+
className: `
|
|
3920
|
+
w-full flex flex-row justify-between rounded-xl p-4 gap-4 bg-background border border-border-50
|
|
3921
|
+
${className}
|
|
3922
|
+
`,
|
|
3923
|
+
...props,
|
|
3924
|
+
children: [
|
|
3925
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("section", { className: "flex flex-col gap-1", children: [
|
|
3926
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "font-bold text-xs text-text-950", children: header }),
|
|
3927
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-row gap-6 items-center", children: [
|
|
3928
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3929
|
+
Badge_default,
|
|
3930
|
+
{
|
|
3931
|
+
size: "medium",
|
|
3932
|
+
variant: "solid",
|
|
3933
|
+
action: isDone ? "success" : "error",
|
|
3934
|
+
children: stateLabel
|
|
3935
|
+
}
|
|
3936
|
+
),
|
|
3937
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "flex flex-row items-center gap-1 text-text-700 text-xs", children: [
|
|
3938
|
+
isDone ? "Nota" : "Sem nota",
|
|
3939
|
+
isDone && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Badge_default, { size: "medium", action: "success", children: "00" })
|
|
3940
|
+
] })
|
|
3941
|
+
] })
|
|
3942
|
+
] }),
|
|
3943
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Button_default, { size: "extra-small", onClick: () => onClickButton?.(valueButton), children: buttonLabel })
|
|
3944
|
+
]
|
|
3945
|
+
}
|
|
3946
|
+
);
|
|
3947
|
+
}
|
|
3948
|
+
);
|
|
3949
|
+
var CardProgress = (0, import_react14.forwardRef)(
|
|
3950
|
+
({
|
|
3951
|
+
header,
|
|
3952
|
+
subhead,
|
|
3953
|
+
initialDate,
|
|
3954
|
+
endDate,
|
|
3955
|
+
progress = 0,
|
|
3956
|
+
direction = "horizontal",
|
|
3957
|
+
icon,
|
|
3958
|
+
color = "#B7DFFF",
|
|
3959
|
+
className,
|
|
3960
|
+
...props
|
|
3961
|
+
}, ref) => {
|
|
3962
|
+
const isHorizontal = direction === "horizontal";
|
|
3963
|
+
const contentComponent = {
|
|
3964
|
+
horizontal: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
3965
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-row gap-6 items-center", children: [
|
|
3966
|
+
initialDate && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
3967
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-text-800 font-semibold", children: "In\xEDcio" }),
|
|
3968
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-text-600", children: initialDate })
|
|
3969
|
+
] }),
|
|
3970
|
+
endDate && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
3971
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-text-800 font-semibold", children: "Fim" }),
|
|
3972
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-text-600", children: endDate })
|
|
3973
|
+
] })
|
|
3974
|
+
] }),
|
|
3975
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3976
|
+
ProgressBar_default,
|
|
3977
|
+
{
|
|
3978
|
+
size: "medium",
|
|
3979
|
+
showPercentage: true,
|
|
3980
|
+
value: progress,
|
|
3981
|
+
"data-testid": "progress-bar"
|
|
3982
|
+
}
|
|
3983
|
+
)
|
|
3984
|
+
] }),
|
|
3985
|
+
vertical: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-sm text-text-800", children: subhead })
|
|
3986
|
+
};
|
|
3987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3988
|
+
"div",
|
|
3989
|
+
{
|
|
3990
|
+
ref,
|
|
3991
|
+
className: `
|
|
3992
|
+
w-full flex border border-border-50 rounded-xl
|
|
3993
|
+
${isHorizontal ? "flex-row h-20" : "flex-col"}
|
|
3994
|
+
${className}
|
|
3995
|
+
`,
|
|
3996
|
+
...props,
|
|
3997
|
+
children: [
|
|
3998
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3999
|
+
"div",
|
|
4000
|
+
{
|
|
4001
|
+
className: `
|
|
4002
|
+
flex justify-center items-center [&>svg]:size-8 text-text-950
|
|
4003
|
+
${isHorizontal ? "w-20 h-full rounded-l-xl" : "min-h-[50px] w-full rounded-t-xl"}
|
|
4004
|
+
`,
|
|
4005
|
+
style: {
|
|
4006
|
+
backgroundColor: color
|
|
4007
|
+
},
|
|
4008
|
+
children: icon
|
|
4009
|
+
}
|
|
4010
|
+
),
|
|
4011
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4012
|
+
"div",
|
|
4013
|
+
{
|
|
4014
|
+
className: `
|
|
4015
|
+
p-4 flex flex-col justify-between w-full h-full
|
|
4016
|
+
${!isHorizontal && "gap-4"}
|
|
4017
|
+
`,
|
|
4018
|
+
children: [
|
|
4019
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-xs font-bold text-text-950", children: header }),
|
|
4020
|
+
contentComponent[direction]
|
|
4021
|
+
]
|
|
4022
|
+
}
|
|
4023
|
+
)
|
|
4024
|
+
]
|
|
4025
|
+
}
|
|
4026
|
+
);
|
|
4027
|
+
}
|
|
4028
|
+
);
|
|
4029
|
+
var CardTopic = (0, import_react14.forwardRef)(
|
|
4030
|
+
({
|
|
4031
|
+
header,
|
|
4032
|
+
subHead,
|
|
4033
|
+
progress,
|
|
4034
|
+
showPercentage = false,
|
|
4035
|
+
className = "",
|
|
4036
|
+
...props
|
|
4037
|
+
}, ref) => {
|
|
4038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4039
|
+
"div",
|
|
4040
|
+
{
|
|
4041
|
+
ref,
|
|
4042
|
+
className: `w-full py-2 px-4 flex flex-col justify-center gap-2 border border-border-50 rounded-xl min-h-20 ${className}`,
|
|
4043
|
+
...props,
|
|
4044
|
+
children: [
|
|
4045
|
+
subHead && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react14.Fragment, { children: [
|
|
4046
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { children: text }),
|
|
4047
|
+
index < subHead.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { children: "\u2022" })
|
|
4048
|
+
] }, `${text} - ${index}`)) }),
|
|
4049
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-xs text-text-950 font-bold", children: header }),
|
|
4050
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ProgressBar_default, { showPercentage, value: progress })
|
|
4051
|
+
]
|
|
4052
|
+
}
|
|
4053
|
+
);
|
|
4054
|
+
}
|
|
4055
|
+
);
|
|
4056
|
+
var CardPerformance = (0, import_react14.forwardRef)(
|
|
4057
|
+
({
|
|
4058
|
+
header,
|
|
4059
|
+
progress,
|
|
4060
|
+
description = "Sem dados ainda! Voc\xEA ainda n\xE3o fez um question\xE1rio neste assunto.",
|
|
4061
|
+
className = "",
|
|
4062
|
+
onClickButton,
|
|
4063
|
+
valueButton,
|
|
4064
|
+
...props
|
|
4065
|
+
}, ref) => {
|
|
4066
|
+
const hasProgress = progress !== void 0;
|
|
4067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4068
|
+
"div",
|
|
4069
|
+
{
|
|
4070
|
+
ref,
|
|
4071
|
+
className: `w-full h-20.5 flex flex-row justify-between p-4 gap-2 bg-background border border-border-50 ${className}`,
|
|
4072
|
+
...props,
|
|
4073
|
+
children: [
|
|
4074
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
4075
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-row justify-between items-center", children: [
|
|
4076
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-md font-bold text-text-950", children: header }),
|
|
4077
|
+
hasProgress && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4078
|
+
Button_default,
|
|
4079
|
+
{
|
|
4080
|
+
variant: "outline",
|
|
4081
|
+
size: "extra-small",
|
|
4082
|
+
onClick: () => onClickButton?.(valueButton),
|
|
4083
|
+
children: "Ver Aula"
|
|
4084
|
+
}
|
|
4085
|
+
)
|
|
4086
|
+
] }),
|
|
4087
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ProgressBar_default, { value: progress, label: `${progress}% corretas` }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-xs text-text-600", children: description }) })
|
|
4088
|
+
] }),
|
|
4089
|
+
!hasProgress && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4090
|
+
import_phosphor_react12.CaretRight,
|
|
4091
|
+
{
|
|
4092
|
+
className: "size-4.5",
|
|
4093
|
+
"data-testid": "caret-icon",
|
|
4094
|
+
onClick: () => onClickButton?.(valueButton)
|
|
4095
|
+
}
|
|
4096
|
+
)
|
|
4097
|
+
]
|
|
4098
|
+
}
|
|
4099
|
+
);
|
|
4100
|
+
}
|
|
4101
|
+
);
|
|
4102
|
+
var CardResults = (0, import_react14.forwardRef)(
|
|
4103
|
+
({
|
|
4104
|
+
header,
|
|
4105
|
+
correct_answers,
|
|
4106
|
+
incorrect_answers,
|
|
4107
|
+
icon,
|
|
4108
|
+
direction = "col",
|
|
4109
|
+
color = "#B7DFFF",
|
|
4110
|
+
className,
|
|
4111
|
+
...props
|
|
4112
|
+
}, ref) => {
|
|
4113
|
+
const isRow = direction == "row";
|
|
4114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4115
|
+
"div",
|
|
4116
|
+
{
|
|
4117
|
+
ref,
|
|
4118
|
+
className: `
|
|
4119
|
+
w-full flex border border-border-50 rounded-xl min-h-20 flex-row items-center pr-4
|
|
4120
|
+
${className}
|
|
4121
|
+
`,
|
|
4122
|
+
...props,
|
|
4123
|
+
children: [
|
|
4124
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4125
|
+
"div",
|
|
4126
|
+
{
|
|
4127
|
+
className: `
|
|
4128
|
+
flex justify-center items-center [&>svg]:size-8 text-text-950 min-w-20 max-w-20 h-full rounded-l-xl
|
|
4129
|
+
`,
|
|
4130
|
+
style: {
|
|
4131
|
+
backgroundColor: color
|
|
4132
|
+
},
|
|
4133
|
+
children: icon
|
|
4134
|
+
}
|
|
4135
|
+
),
|
|
4136
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4137
|
+
"div",
|
|
4138
|
+
{
|
|
4139
|
+
className: `
|
|
4140
|
+
p-4 flex justify-between w-full h-full
|
|
4141
|
+
${isRow ? "flex-row items-center" : "flex-col"}
|
|
4142
|
+
`,
|
|
4143
|
+
children: [
|
|
4144
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-xs font-bold text-text-950", children: header }),
|
|
4145
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "flex flex-row gap-1 items-center", children: [
|
|
4146
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4147
|
+
Badge_default,
|
|
4148
|
+
{
|
|
4149
|
+
action: "success",
|
|
4150
|
+
variant: "solid",
|
|
4151
|
+
size: "medium",
|
|
4152
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react12.CheckCircle, {}),
|
|
4153
|
+
children: [
|
|
4154
|
+
correct_answers,
|
|
4155
|
+
" Corretas"
|
|
4156
|
+
]
|
|
4157
|
+
}
|
|
4158
|
+
),
|
|
4159
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4160
|
+
Badge_default,
|
|
4161
|
+
{
|
|
4162
|
+
action: "error",
|
|
4163
|
+
variant: "solid",
|
|
4164
|
+
size: "medium",
|
|
4165
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react12.XCircle, {}),
|
|
4166
|
+
children: [
|
|
4167
|
+
incorrect_answers,
|
|
4168
|
+
" Incorretas"
|
|
4169
|
+
]
|
|
4170
|
+
}
|
|
4171
|
+
)
|
|
4172
|
+
] })
|
|
4173
|
+
]
|
|
4174
|
+
}
|
|
4175
|
+
),
|
|
4176
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react12.CaretRight, { className: "min-w-6 min-h-6" })
|
|
4177
|
+
]
|
|
4178
|
+
}
|
|
4179
|
+
);
|
|
4180
|
+
}
|
|
4181
|
+
);
|
|
4182
|
+
var CardStatus = (0, import_react14.forwardRef)(
|
|
4183
|
+
({ header, className, status, ...props }, ref) => {
|
|
4184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4185
|
+
"div",
|
|
4186
|
+
{
|
|
4187
|
+
ref,
|
|
4188
|
+
className: `
|
|
4189
|
+
w-full flex border border-border-50 rounded-xl min-h-20 flex-row items-center pr-4
|
|
4190
|
+
${className}
|
|
4191
|
+
`,
|
|
4192
|
+
...props,
|
|
4193
|
+
children: [
|
|
4194
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4195
|
+
"div",
|
|
4196
|
+
{
|
|
4197
|
+
className: `
|
|
4198
|
+
p-4 flex justify-between w-full h-full flex-row items-center
|
|
4199
|
+
`,
|
|
4200
|
+
children: [
|
|
4201
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-xs font-bold text-text-950", children: header }),
|
|
4202
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "flex flex-row gap-1 items-center", children: [
|
|
4203
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4204
|
+
Badge_default,
|
|
4205
|
+
{
|
|
4206
|
+
action: status == "correct" ? "success" : "error",
|
|
4207
|
+
variant: "solid",
|
|
4208
|
+
size: "medium",
|
|
4209
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react12.CheckCircle, {}),
|
|
4210
|
+
children: status == "correct" ? "Correta" : "Incorreta"
|
|
4211
|
+
}
|
|
4212
|
+
),
|
|
4213
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-sm text-text-800", children: "Respondida" })
|
|
4214
|
+
] })
|
|
4215
|
+
]
|
|
4216
|
+
}
|
|
4217
|
+
),
|
|
4218
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react12.CaretRight, { className: "min-w-6 min-h-6" })
|
|
4219
|
+
]
|
|
4220
|
+
}
|
|
4221
|
+
);
|
|
4222
|
+
}
|
|
4223
|
+
);
|
|
3509
4224
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3510
4225
|
0 && (module.exports = {
|
|
3511
4226
|
Alert,
|
|
3512
4227
|
Badge,
|
|
3513
4228
|
Button,
|
|
3514
4229
|
Calendar,
|
|
4230
|
+
CardActivesResults,
|
|
4231
|
+
CardPerformance,
|
|
4232
|
+
CardProgress,
|
|
4233
|
+
CardQuestions,
|
|
4234
|
+
CardResults,
|
|
4235
|
+
CardStatus,
|
|
4236
|
+
CardTopic,
|
|
3515
4237
|
CheckBox,
|
|
3516
4238
|
Chips,
|
|
3517
4239
|
Divider,
|
|
@@ -3542,6 +4264,7 @@ var Menu_default = Menu;
|
|
|
3542
4264
|
SelectTrigger,
|
|
3543
4265
|
SelectValue,
|
|
3544
4266
|
SelectionButton,
|
|
4267
|
+
Stepper,
|
|
3545
4268
|
Table,
|
|
3546
4269
|
Text,
|
|
3547
4270
|
TextArea,
|