@cnc-ti/layout-basic 8.5.0 → 8.6.0
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/index.css +333 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +404 -37
- package/dist/index.d.ts +404 -37
- package/dist/index.js +1792 -269
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1761 -278
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
if (typeof window !== 'undefined') {
|
|
3
|
-
"use client";
|
|
4
|
-
}
|
|
5
|
-
|
|
1
|
+
"use client";
|
|
6
2
|
"use strict";
|
|
7
3
|
var __create = Object.create;
|
|
8
4
|
var __defProp = Object.defineProperty;
|
|
@@ -37,6 +33,7 @@ var src_exports = {};
|
|
|
37
33
|
__export(src_exports, {
|
|
38
34
|
AplicationsHeader: () => AplicationsHeader,
|
|
39
35
|
AppsMenu: () => AppsMenu,
|
|
36
|
+
Avatar: () => Avatar,
|
|
40
37
|
Badge: () => Badge,
|
|
41
38
|
Button: () => Button,
|
|
42
39
|
Card: () => Card,
|
|
@@ -59,6 +56,9 @@ __export(src_exports, {
|
|
|
59
56
|
CommandList: () => CommandList,
|
|
60
57
|
CommandSeparator: () => CommandSeparator,
|
|
61
58
|
CommandShortcut: () => CommandShortcut,
|
|
59
|
+
ConfirmDialog: () => ConfirmDialog,
|
|
60
|
+
DIAS_SEMANA_PT_BR: () => DIAS_SEMANA_PT_BR,
|
|
61
|
+
DateTimeRangeList: () => DateTimeRangeList,
|
|
62
62
|
Dialog: () => Dialog,
|
|
63
63
|
DialogClose: () => DialogClose,
|
|
64
64
|
DialogContent: () => DialogContent,
|
|
@@ -69,6 +69,19 @@ __export(src_exports, {
|
|
|
69
69
|
DialogPortal: () => DialogPortal,
|
|
70
70
|
DialogTitle: () => DialogTitle,
|
|
71
71
|
DialogTrigger: () => DialogTrigger,
|
|
72
|
+
Drawer: () => Drawer,
|
|
73
|
+
DrawerBody: () => DrawerBody,
|
|
74
|
+
DrawerClose: () => DrawerClose,
|
|
75
|
+
DrawerContent: () => DrawerContent,
|
|
76
|
+
DrawerContext: () => DrawerContext,
|
|
77
|
+
DrawerDescription: () => DrawerDescription,
|
|
78
|
+
DrawerFooter: () => DrawerFooter,
|
|
79
|
+
DrawerHeader: () => DrawerHeader,
|
|
80
|
+
DrawerOverlay: () => DrawerOverlay,
|
|
81
|
+
DrawerPortal: () => DrawerPortal,
|
|
82
|
+
DrawerProvider: () => DrawerProvider,
|
|
83
|
+
DrawerTitle: () => DrawerTitle,
|
|
84
|
+
DrawerTrigger: () => DrawerTrigger,
|
|
72
85
|
DropdownMenu: () => DropdownMenu,
|
|
73
86
|
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
|
|
74
87
|
DropdownMenuContent: () => DropdownMenuContent,
|
|
@@ -84,7 +97,10 @@ __export(src_exports, {
|
|
|
84
97
|
DropdownMenuSubContent: () => DropdownMenuSubContent,
|
|
85
98
|
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
|
|
86
99
|
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
100
|
+
EmptyState: () => EmptyState,
|
|
87
101
|
ErroNotificacoes: () => ErroNotificacoes,
|
|
102
|
+
FileList: () => FileList,
|
|
103
|
+
FileUpload: () => FileUpload,
|
|
88
104
|
Filter: () => Filter,
|
|
89
105
|
Header: () => Header,
|
|
90
106
|
HeaderContainer: () => HeaderContainer,
|
|
@@ -92,16 +108,24 @@ __export(src_exports, {
|
|
|
92
108
|
HeaderProfileHeader: () => HeaderProfileHeader,
|
|
93
109
|
HeaderProfileItem: () => HeaderProfileItem,
|
|
94
110
|
Input: () => Input,
|
|
111
|
+
LabelValue: () => LabelValue,
|
|
112
|
+
MESES_PT_BR: () => MESES_PT_BR,
|
|
113
|
+
MESES_PT_BR_ABREV: () => MESES_PT_BR_ABREV,
|
|
114
|
+
MiniMonthCalendar: () => MiniMonthCalendar,
|
|
95
115
|
Modal: () => Modal,
|
|
96
116
|
ModalEntidade: () => ModalEntidade,
|
|
97
117
|
ModalMudancaEntidade: () => ModalMudancaEntidade,
|
|
118
|
+
MonthYearPicker: () => MonthYearPicker,
|
|
119
|
+
MultiSelect: () => MultiSelect,
|
|
98
120
|
PageHeader: () => PageHeader,
|
|
99
121
|
PageHeaderActionsContainer: () => PageHeaderActionsContainer,
|
|
100
122
|
PageHeaderTitle: () => PageHeaderTitle,
|
|
101
123
|
PageHeaderTitleContent: () => PageHeaderTitleContent,
|
|
124
|
+
PeriodRangeList: () => PeriodRangeList,
|
|
102
125
|
Popover: () => Popover,
|
|
103
126
|
PopoverContent: () => PopoverContent,
|
|
104
127
|
PopoverTrigger: () => PopoverTrigger,
|
|
128
|
+
ResultMetadata: () => ResultMetadata,
|
|
105
129
|
Select: () => Select,
|
|
106
130
|
SelectContent: () => SelectContent,
|
|
107
131
|
SelectGroup: () => SelectGroup,
|
|
@@ -124,10 +148,22 @@ __export(src_exports, {
|
|
|
124
148
|
TabsContent: () => TabsContent,
|
|
125
149
|
TabsList: () => TabsList,
|
|
126
150
|
TabsTrigger: () => TabsTrigger,
|
|
151
|
+
Textarea: () => Textarea,
|
|
127
152
|
Title: () => Title2,
|
|
153
|
+
Tooltip: () => Tooltip,
|
|
128
154
|
URL_PADRAO_NOTIFICACOES: () => URL_PADRAO_NOTIFICACOES,
|
|
129
155
|
availableApps: () => availableApps,
|
|
130
|
-
|
|
156
|
+
buildMonthDays: () => buildMonthDays,
|
|
157
|
+
buttonVariants: () => buttonVariants,
|
|
158
|
+
formatDayAriaLabel: () => formatDayAriaLabel,
|
|
159
|
+
formatFileSize: () => formatFileSize,
|
|
160
|
+
formatMonthYear: () => formatMonthYear,
|
|
161
|
+
isSameDay: () => isSameDay,
|
|
162
|
+
isToday: () => isToday,
|
|
163
|
+
toDateKey: () => toDateKey,
|
|
164
|
+
toLocalNoon: () => toLocalNoon,
|
|
165
|
+
useDrawer: () => useDrawer,
|
|
166
|
+
validateFiles: () => validateFiles
|
|
131
167
|
});
|
|
132
168
|
module.exports = __toCommonJS(src_exports);
|
|
133
169
|
|
|
@@ -292,6 +328,11 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
292
328
|
["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
|
|
293
329
|
]);
|
|
294
330
|
|
|
331
|
+
// ../../node_modules/lucide-react/dist/esm/icons/chevron-left.js
|
|
332
|
+
var ChevronLeft = createLucideIcon("ChevronLeft", [
|
|
333
|
+
["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]
|
|
334
|
+
]);
|
|
335
|
+
|
|
295
336
|
// ../../node_modules/lucide-react/dist/esm/icons/chevron-right.js
|
|
296
337
|
var ChevronRight = createLucideIcon("ChevronRight", [
|
|
297
338
|
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
@@ -311,6 +352,29 @@ var Circle = createLucideIcon("Circle", [
|
|
|
311
352
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
|
|
312
353
|
]);
|
|
313
354
|
|
|
355
|
+
// ../../node_modules/lucide-react/dist/esm/icons/download.js
|
|
356
|
+
var Download = createLucideIcon("Download", [
|
|
357
|
+
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
358
|
+
["polyline", { points: "7 10 12 15 17 10", key: "2ggqvy" }],
|
|
359
|
+
["line", { x1: "12", x2: "12", y1: "15", y2: "3", key: "1vk2je" }]
|
|
360
|
+
]);
|
|
361
|
+
|
|
362
|
+
// ../../node_modules/lucide-react/dist/esm/icons/external-link.js
|
|
363
|
+
var ExternalLink = createLucideIcon("ExternalLink", [
|
|
364
|
+
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
365
|
+
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
366
|
+
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
367
|
+
]);
|
|
368
|
+
|
|
369
|
+
// ../../node_modules/lucide-react/dist/esm/icons/file-text.js
|
|
370
|
+
var FileText = createLucideIcon("FileText", [
|
|
371
|
+
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
372
|
+
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
373
|
+
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
374
|
+
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
375
|
+
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
376
|
+
]);
|
|
377
|
+
|
|
314
378
|
// ../../node_modules/lucide-react/dist/esm/icons/filter-x.js
|
|
315
379
|
var FilterX = createLucideIcon("FilterX", [
|
|
316
380
|
["path", { d: "M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055", key: "1fi1da" }],
|
|
@@ -359,6 +423,23 @@ var Mail = createLucideIcon("Mail", [
|
|
|
359
423
|
["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7", key: "1ocrg3" }]
|
|
360
424
|
]);
|
|
361
425
|
|
|
426
|
+
// ../../node_modules/lucide-react/dist/esm/icons/paperclip.js
|
|
427
|
+
var Paperclip = createLucideIcon("Paperclip", [
|
|
428
|
+
[
|
|
429
|
+
"path",
|
|
430
|
+
{
|
|
431
|
+
d: "m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",
|
|
432
|
+
key: "1u3ebp"
|
|
433
|
+
}
|
|
434
|
+
]
|
|
435
|
+
]);
|
|
436
|
+
|
|
437
|
+
// ../../node_modules/lucide-react/dist/esm/icons/plus.js
|
|
438
|
+
var Plus = createLucideIcon("Plus", [
|
|
439
|
+
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
440
|
+
["path", { d: "M12 5v14", key: "s699le" }]
|
|
441
|
+
]);
|
|
442
|
+
|
|
362
443
|
// ../../node_modules/lucide-react/dist/esm/icons/search.js
|
|
363
444
|
var Search = createLucideIcon("Search", [
|
|
364
445
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
@@ -374,6 +455,12 @@ var Trash2 = createLucideIcon("Trash2", [
|
|
|
374
455
|
["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
|
|
375
456
|
]);
|
|
376
457
|
|
|
458
|
+
// ../../node_modules/lucide-react/dist/esm/icons/user.js
|
|
459
|
+
var User = createLucideIcon("User", [
|
|
460
|
+
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
461
|
+
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
462
|
+
]);
|
|
463
|
+
|
|
377
464
|
// ../../node_modules/lucide-react/dist/esm/icons/x.js
|
|
378
465
|
var X = createLucideIcon("X", [
|
|
379
466
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
@@ -3961,15 +4048,53 @@ var Input = React9.forwardRef(
|
|
|
3961
4048
|
);
|
|
3962
4049
|
Input.displayName = "Input";
|
|
3963
4050
|
|
|
3964
|
-
// src/components/atoms/forms/
|
|
4051
|
+
// src/components/atoms/forms/textarea.tsx
|
|
3965
4052
|
var React10 = __toESM(require("react"));
|
|
3966
4053
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3967
|
-
var
|
|
4054
|
+
var Textarea = React10.forwardRef(
|
|
4055
|
+
({ className, id, label, required, ...props }, ref) => {
|
|
4056
|
+
const idGenerate = id ? id : label && `field-${Date.now()}-${Math.random() * 1e5}`;
|
|
4057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "cnc-w-full", children: [
|
|
4058
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
4059
|
+
"label",
|
|
4060
|
+
{
|
|
4061
|
+
htmlFor: idGenerate,
|
|
4062
|
+
className: "cnc-block cnc-text-sm cnc-mb-1 cnc-font-medium cnc-text-brand-gray-600",
|
|
4063
|
+
children: [
|
|
4064
|
+
label,
|
|
4065
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-red-500", children: " *" })
|
|
4066
|
+
]
|
|
4067
|
+
}
|
|
4068
|
+
),
|
|
4069
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4070
|
+
"textarea",
|
|
4071
|
+
{
|
|
4072
|
+
id: idGenerate,
|
|
4073
|
+
className: cn(
|
|
4074
|
+
"cnc-flex cnc-min-h-[96px] cnc-w-full cnc-rounded-md cnc-border cnc-border-input cnc-bg-transparent cnc-px-3 cnc-py-2 cnc-text-base cnc-shadow-sm cnc-transition-colors",
|
|
4075
|
+
"placeholder:cnc-text-muted-foreground focus-visible:cnc-outline-none",
|
|
4076
|
+
"focus-visible:cnc-ring-2 focus-visible:cnc-ring-brand-gray-500/50 disabled:cnc-cursor-not-allowed disabled:cnc-opacity-50 md:cnc-text-sm",
|
|
4077
|
+
"not-disabled:hover:cnc-border-brand-gray-500",
|
|
4078
|
+
className
|
|
4079
|
+
),
|
|
4080
|
+
ref,
|
|
4081
|
+
...props
|
|
4082
|
+
}
|
|
4083
|
+
)
|
|
4084
|
+
] });
|
|
4085
|
+
}
|
|
4086
|
+
);
|
|
4087
|
+
Textarea.displayName = "Textarea";
|
|
4088
|
+
|
|
4089
|
+
// src/components/atoms/forms/checkbox.tsx
|
|
4090
|
+
var React11 = __toESM(require("react"));
|
|
4091
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
4092
|
+
var Checkbox = React11.forwardRef(
|
|
3968
4093
|
({ className, id, label, ...props }, ref) => {
|
|
3969
4094
|
console.log();
|
|
3970
4095
|
const idGenerate = id ? id : label && `field-${Date.now()}-${Math.random() * 1e5}`;
|
|
3971
|
-
return /* @__PURE__ */ (0,
|
|
3972
|
-
/* @__PURE__ */ (0,
|
|
4096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "cnc-w-full cnc-flex cnc-flex-row", children: [
|
|
4097
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3973
4098
|
"input",
|
|
3974
4099
|
{
|
|
3975
4100
|
type: "checkbox",
|
|
@@ -3979,7 +4104,7 @@ var Checkbox = React10.forwardRef(
|
|
|
3979
4104
|
...props
|
|
3980
4105
|
}
|
|
3981
4106
|
),
|
|
3982
|
-
label && /* @__PURE__ */ (0,
|
|
4107
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3983
4108
|
"label",
|
|
3984
4109
|
{
|
|
3985
4110
|
htmlFor: idGenerate,
|
|
@@ -3993,9 +4118,9 @@ var Checkbox = React10.forwardRef(
|
|
|
3993
4118
|
Checkbox.displayName = "Checkbox";
|
|
3994
4119
|
|
|
3995
4120
|
// src/components/atoms/forms/switch.tsx
|
|
3996
|
-
var
|
|
3997
|
-
var
|
|
3998
|
-
var Switch =
|
|
4121
|
+
var React12 = __toESM(require("react"));
|
|
4122
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
4123
|
+
var Switch = React12.forwardRef(
|
|
3999
4124
|
({
|
|
4000
4125
|
className,
|
|
4001
4126
|
id,
|
|
@@ -4009,12 +4134,12 @@ var Switch = React11.forwardRef(
|
|
|
4009
4134
|
name,
|
|
4010
4135
|
"aria-label": ariaLabel
|
|
4011
4136
|
}, ref) => {
|
|
4012
|
-
const [internalChecked, setInternalChecked] =
|
|
4137
|
+
const [internalChecked, setInternalChecked] = React12.useState(
|
|
4013
4138
|
defaultChecked ?? false
|
|
4014
4139
|
);
|
|
4015
4140
|
const isControlled = checked !== void 0;
|
|
4016
4141
|
const isChecked = isControlled ? checked : internalChecked;
|
|
4017
|
-
const reactId =
|
|
4142
|
+
const reactId = React12.useId();
|
|
4018
4143
|
const fieldId = id || reactId;
|
|
4019
4144
|
const handleToggle = () => {
|
|
4020
4145
|
if (disabled) return;
|
|
@@ -4024,8 +4149,8 @@ var Switch = React11.forwardRef(
|
|
|
4024
4149
|
}
|
|
4025
4150
|
onChange?.(newValue);
|
|
4026
4151
|
};
|
|
4027
|
-
return /* @__PURE__ */ (0,
|
|
4028
|
-
/* @__PURE__ */ (0,
|
|
4152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn("cnc-flex cnc-items-center cnc-gap-2", className), children: [
|
|
4153
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
4029
4154
|
"input",
|
|
4030
4155
|
{
|
|
4031
4156
|
type: "checkbox",
|
|
@@ -4037,7 +4162,7 @@ var Switch = React11.forwardRef(
|
|
|
4037
4162
|
"aria-hidden": "true"
|
|
4038
4163
|
}
|
|
4039
4164
|
),
|
|
4040
|
-
/* @__PURE__ */ (0,
|
|
4165
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
4041
4166
|
"button",
|
|
4042
4167
|
{
|
|
4043
4168
|
ref,
|
|
@@ -4055,7 +4180,7 @@ var Switch = React11.forwardRef(
|
|
|
4055
4180
|
"disabled:cnc-cursor-not-allowed disabled:cnc-opacity-50",
|
|
4056
4181
|
isChecked ? "cnc-bg-brand-blue-400 cnc-border-brand-blue-500" : "cnc-bg-brand-gray-20 cnc-border-brand-gray-100"
|
|
4057
4182
|
),
|
|
4058
|
-
children: /* @__PURE__ */ (0,
|
|
4183
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
4059
4184
|
"span",
|
|
4060
4185
|
{
|
|
4061
4186
|
className: cn(
|
|
@@ -4066,14 +4191,14 @@ var Switch = React11.forwardRef(
|
|
|
4066
4191
|
)
|
|
4067
4192
|
}
|
|
4068
4193
|
),
|
|
4069
|
-
label && /* @__PURE__ */ (0,
|
|
4194
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
4070
4195
|
"label",
|
|
4071
4196
|
{
|
|
4072
4197
|
htmlFor: fieldId,
|
|
4073
4198
|
className: "cnc-text-sm cnc-font-medium cnc-text-brand-gray-600 cnc-cursor-pointer",
|
|
4074
4199
|
children: [
|
|
4075
4200
|
label,
|
|
4076
|
-
required && /* @__PURE__ */ (0,
|
|
4201
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "cnc-text-red-500", children: " *" })
|
|
4077
4202
|
]
|
|
4078
4203
|
}
|
|
4079
4204
|
)
|
|
@@ -4083,7 +4208,7 @@ var Switch = React11.forwardRef(
|
|
|
4083
4208
|
Switch.displayName = "Switch";
|
|
4084
4209
|
|
|
4085
4210
|
// src/components/atoms/display/badge.tsx
|
|
4086
|
-
var
|
|
4211
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
4087
4212
|
var Badge = ({
|
|
4088
4213
|
variant = "default",
|
|
4089
4214
|
rounded = true,
|
|
@@ -4105,7 +4230,7 @@ var Badge = ({
|
|
|
4105
4230
|
md: "cnc-text-sm cnc-px-3 cnc-py-1",
|
|
4106
4231
|
lg: "cnc-text-base cnc-px-4 cnc-py-2"
|
|
4107
4232
|
};
|
|
4108
|
-
return /* @__PURE__ */ (0,
|
|
4233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4109
4234
|
"span",
|
|
4110
4235
|
{
|
|
4111
4236
|
className: cn(
|
|
@@ -4120,13 +4245,73 @@ var Badge = ({
|
|
|
4120
4245
|
);
|
|
4121
4246
|
};
|
|
4122
4247
|
|
|
4248
|
+
// src/components/atoms/display/avatar.tsx
|
|
4249
|
+
var React13 = __toESM(require("react"));
|
|
4250
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
4251
|
+
var avatarSizeClasses = {
|
|
4252
|
+
sm: "cnc-size-8 cnc-text-[10px]",
|
|
4253
|
+
md: "cnc-size-12 cnc-text-xs",
|
|
4254
|
+
lg: "cnc-size-16 cnc-text-sm",
|
|
4255
|
+
xl: "cnc-size-24 cnc-text-xl"
|
|
4256
|
+
};
|
|
4257
|
+
var avatarSizeIcon = {
|
|
4258
|
+
sm: 16,
|
|
4259
|
+
md: 20,
|
|
4260
|
+
lg: 28,
|
|
4261
|
+
xl: 40
|
|
4262
|
+
};
|
|
4263
|
+
function Avatar({
|
|
4264
|
+
src,
|
|
4265
|
+
alt,
|
|
4266
|
+
fallback,
|
|
4267
|
+
size = "md",
|
|
4268
|
+
isLoading = false,
|
|
4269
|
+
className,
|
|
4270
|
+
...props
|
|
4271
|
+
}) {
|
|
4272
|
+
const [hasError, setHasError] = React13.useState(false);
|
|
4273
|
+
const baseClasses = cn(
|
|
4274
|
+
"cnc-flex cnc-shrink-0 cnc-items-center cnc-justify-center cnc-overflow-hidden cnc-rounded-full cnc-border-2 cnc-border-brand-gray-50 cnc-bg-brand-gray-10 cnc-text-brand-gray-200",
|
|
4275
|
+
avatarSizeClasses[size],
|
|
4276
|
+
className
|
|
4277
|
+
);
|
|
4278
|
+
if (isLoading) {
|
|
4279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4280
|
+
"span",
|
|
4281
|
+
{
|
|
4282
|
+
className: cn(baseClasses, "cnc-animate-pulse cnc-bg-brand-gray-50"),
|
|
4283
|
+
role: "status",
|
|
4284
|
+
"aria-label": "Carregando avatar",
|
|
4285
|
+
...props
|
|
4286
|
+
}
|
|
4287
|
+
);
|
|
4288
|
+
}
|
|
4289
|
+
const showImage = src && !hasError;
|
|
4290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: baseClasses, ...props, children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4291
|
+
"img",
|
|
4292
|
+
{
|
|
4293
|
+
src,
|
|
4294
|
+
alt: alt ?? "Avatar",
|
|
4295
|
+
className: "cnc-h-full cnc-w-full cnc-object-cover",
|
|
4296
|
+
onError: () => setHasError(true)
|
|
4297
|
+
}
|
|
4298
|
+
) : fallback ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "cnc-font-bold", children: fallback }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4299
|
+
User,
|
|
4300
|
+
{
|
|
4301
|
+
className: "cnc-shrink-0",
|
|
4302
|
+
size: avatarSizeIcon[size],
|
|
4303
|
+
"aria-hidden": "true"
|
|
4304
|
+
}
|
|
4305
|
+
) });
|
|
4306
|
+
}
|
|
4307
|
+
|
|
4123
4308
|
// src/components/molecules/card.tsx
|
|
4124
|
-
var
|
|
4309
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
4125
4310
|
function Card({
|
|
4126
4311
|
className,
|
|
4127
4312
|
...rest
|
|
4128
4313
|
}) {
|
|
4129
|
-
return /* @__PURE__ */ (0,
|
|
4314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4130
4315
|
"div",
|
|
4131
4316
|
{
|
|
4132
4317
|
className: cn(
|
|
@@ -4141,7 +4326,7 @@ function CardHeader({
|
|
|
4141
4326
|
className,
|
|
4142
4327
|
...rest
|
|
4143
4328
|
}) {
|
|
4144
|
-
return /* @__PURE__ */ (0,
|
|
4329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "cnc-px-6 cnc-pt-6", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4145
4330
|
"div",
|
|
4146
4331
|
{
|
|
4147
4332
|
className: cn(
|
|
@@ -4156,13 +4341,13 @@ function CardContent({
|
|
|
4156
4341
|
className,
|
|
4157
4342
|
...rest
|
|
4158
4343
|
}) {
|
|
4159
|
-
return /* @__PURE__ */ (0,
|
|
4344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: cn("cnc-px-6 cnc-py-2", className), ...rest });
|
|
4160
4345
|
}
|
|
4161
4346
|
function CardFooter({
|
|
4162
4347
|
className,
|
|
4163
4348
|
...rest
|
|
4164
4349
|
}) {
|
|
4165
|
-
return /* @__PURE__ */ (0,
|
|
4350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4166
4351
|
"div",
|
|
4167
4352
|
{
|
|
4168
4353
|
className: cn(
|
|
@@ -4177,7 +4362,7 @@ function CardFooterItem({
|
|
|
4177
4362
|
className,
|
|
4178
4363
|
...rest
|
|
4179
4364
|
}) {
|
|
4180
|
-
return /* @__PURE__ */ (0,
|
|
4365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4181
4366
|
"div",
|
|
4182
4367
|
{
|
|
4183
4368
|
className: cn(
|
|
@@ -4191,7 +4376,7 @@ function CardFooterItem({
|
|
|
4191
4376
|
|
|
4192
4377
|
// src/components/molecules/collapsible.tsx
|
|
4193
4378
|
var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"));
|
|
4194
|
-
var
|
|
4379
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
4195
4380
|
var Collapsible = CollapsiblePrimitive.Root;
|
|
4196
4381
|
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
|
4197
4382
|
var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
@@ -4199,16 +4384,16 @@ var AnimatedCollapsibleContent = ({
|
|
|
4199
4384
|
className,
|
|
4200
4385
|
...rest
|
|
4201
4386
|
}) => {
|
|
4202
|
-
return /* @__PURE__ */ (0,
|
|
4387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CollapsibleContent2, { className: "cnc-collapsible-content", ...rest });
|
|
4203
4388
|
};
|
|
4204
4389
|
|
|
4205
4390
|
// src/components/molecules/display/page-header.tsx
|
|
4206
|
-
var
|
|
4391
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
4207
4392
|
function PageHeader({
|
|
4208
4393
|
children,
|
|
4209
4394
|
className
|
|
4210
4395
|
}) {
|
|
4211
|
-
return /* @__PURE__ */ (0,
|
|
4396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4212
4397
|
"header",
|
|
4213
4398
|
{
|
|
4214
4399
|
className: cn(
|
|
@@ -4223,7 +4408,7 @@ function PageHeaderTitleContent({
|
|
|
4223
4408
|
children,
|
|
4224
4409
|
className
|
|
4225
4410
|
}) {
|
|
4226
|
-
return /* @__PURE__ */ (0,
|
|
4411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4227
4412
|
"div",
|
|
4228
4413
|
{
|
|
4229
4414
|
className: cn(
|
|
@@ -4240,16 +4425,16 @@ function PageHeaderTitle({
|
|
|
4240
4425
|
titleAs = "h1"
|
|
4241
4426
|
}) {
|
|
4242
4427
|
const ComponentTitle = titleAs;
|
|
4243
|
-
return /* @__PURE__ */ (0,
|
|
4244
|
-
/* @__PURE__ */ (0,
|
|
4245
|
-
description && /* @__PURE__ */ (0,
|
|
4428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
|
|
4429
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ComponentTitle, { className: "cnc-text-2xl cnc-font-semibold cnc-text-brand-blue-600", children: title }),
|
|
4430
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "cnc-text-sm cnc-text-brand-gray-500", children: description })
|
|
4246
4431
|
] });
|
|
4247
4432
|
}
|
|
4248
4433
|
function PageHeaderActionsContainer({
|
|
4249
4434
|
children,
|
|
4250
4435
|
className
|
|
4251
4436
|
}) {
|
|
4252
|
-
return /* @__PURE__ */ (0,
|
|
4437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4253
4438
|
"div",
|
|
4254
4439
|
{
|
|
4255
4440
|
className: cn(
|
|
@@ -4261,17 +4446,151 @@ function PageHeaderActionsContainer({
|
|
|
4261
4446
|
);
|
|
4262
4447
|
}
|
|
4263
4448
|
function Title2({ title, as: Component = "h1" }) {
|
|
4264
|
-
return /* @__PURE__ */ (0,
|
|
4449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Component, { className: "cnc-text-[24px] cnc-text-[#1F2C4D] cnc-font-bold cnc-mt-2 cnc-mb-4 text-center md:cnc-text-[28px] md:cnc-text-left", children: title });
|
|
4450
|
+
}
|
|
4451
|
+
|
|
4452
|
+
// src/components/molecules/display/empty-state.tsx
|
|
4453
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
4454
|
+
function EmptyState({
|
|
4455
|
+
icon,
|
|
4456
|
+
title,
|
|
4457
|
+
description,
|
|
4458
|
+
action,
|
|
4459
|
+
minHeight = "cnc-min-h-48",
|
|
4460
|
+
className,
|
|
4461
|
+
...props
|
|
4462
|
+
}) {
|
|
4463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4464
|
+
"div",
|
|
4465
|
+
{
|
|
4466
|
+
className: cn(
|
|
4467
|
+
"cnc-flex cnc-flex-col cnc-items-center cnc-justify-center cnc-rounded-md cnc-border cnc-border-dashed cnc-border-brand-gray-50 cnc-bg-brand-blue-50 cnc-px-4 cnc-py-8 cnc-text-center",
|
|
4468
|
+
minHeight,
|
|
4469
|
+
className
|
|
4470
|
+
),
|
|
4471
|
+
...props,
|
|
4472
|
+
children: [
|
|
4473
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "cnc-mb-3 cnc-text-brand-gray-200", children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FolderOpen, { className: "cnc-h-10 cnc-w-10" }) }),
|
|
4474
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "cnc-text-sm cnc-font-medium cnc-text-brand-blue-600", children: title }),
|
|
4475
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "cnc-mt-1 cnc-max-w-md cnc-text-sm cnc-text-brand-gray-200", children: description }) : null,
|
|
4476
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "cnc-mt-4", children: action }) : null
|
|
4477
|
+
]
|
|
4478
|
+
}
|
|
4479
|
+
);
|
|
4480
|
+
}
|
|
4481
|
+
|
|
4482
|
+
// src/components/molecules/display/result-metadata.tsx
|
|
4483
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
4484
|
+
function encontradosSuffix(resourceName, forceWordGender) {
|
|
4485
|
+
if (forceWordGender === "masc") return "o";
|
|
4486
|
+
if (forceWordGender === "fem") return "a";
|
|
4487
|
+
return resourceName.endsWith("a") ? "a" : "o";
|
|
4488
|
+
}
|
|
4489
|
+
function ResultMetadata({
|
|
4490
|
+
resourceName,
|
|
4491
|
+
total,
|
|
4492
|
+
displayed,
|
|
4493
|
+
isLoading = false,
|
|
4494
|
+
forceWordGender,
|
|
4495
|
+
truncationThreshold = 30,
|
|
4496
|
+
className,
|
|
4497
|
+
...props
|
|
4498
|
+
}) {
|
|
4499
|
+
const encontradVogal = encontradosSuffix(resourceName, forceWordGender);
|
|
4500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
4501
|
+
"div",
|
|
4502
|
+
{
|
|
4503
|
+
className: cn("cnc-mt-4 cnc-mb-4", className),
|
|
4504
|
+
role: "status",
|
|
4505
|
+
"aria-live": "polite",
|
|
4506
|
+
...props,
|
|
4507
|
+
children: [
|
|
4508
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "cnc-text-base cnc-font-bold cnc-text-brand-blue-100", children: `${resourceName} encontrad${encontradVogal}s | ${isLoading ? "carregando ..." : total?.toLocaleString("pt-BR")}` }),
|
|
4509
|
+
displayed >= truncationThreshold && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { children: [
|
|
4510
|
+
"Exibindo os ",
|
|
4511
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "cnc-font-bold", children: displayed }),
|
|
4512
|
+
" primeiros registros. Utilize os filtros para refinar sua busca."
|
|
4513
|
+
] })
|
|
4514
|
+
]
|
|
4515
|
+
}
|
|
4516
|
+
);
|
|
4517
|
+
}
|
|
4518
|
+
|
|
4519
|
+
// src/components/molecules/display/label-value.tsx
|
|
4520
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
4521
|
+
function LabelValue({
|
|
4522
|
+
label,
|
|
4523
|
+
value,
|
|
4524
|
+
href,
|
|
4525
|
+
className,
|
|
4526
|
+
valueClassName
|
|
4527
|
+
}) {
|
|
4528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className, children: [
|
|
4529
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "cnc-mb-2 cnc-text-sm cnc-font-bold cnc-leading-4 cnc-text-primary", children: label }),
|
|
4530
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
4531
|
+
"div",
|
|
4532
|
+
{
|
|
4533
|
+
className: cn(
|
|
4534
|
+
"cnc-flex cnc-flex-row cnc-items-center cnc-justify-start cnc-gap-2 cnc-text-sm cnc-font-medium cnc-text-brand-gray-600",
|
|
4535
|
+
valueClassName
|
|
4536
|
+
),
|
|
4537
|
+
children: [
|
|
4538
|
+
value ?? "-",
|
|
4539
|
+
href && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4540
|
+
"a",
|
|
4541
|
+
{
|
|
4542
|
+
href,
|
|
4543
|
+
target: "_blank",
|
|
4544
|
+
rel: "noopener noreferrer",
|
|
4545
|
+
className: "cnc-inline-flex cnc-items-center cnc-text-brand-blue-500 hover:cnc-opacity-80",
|
|
4546
|
+
"aria-label": `Abrir link externo de ${label}`,
|
|
4547
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ExternalLink, { className: "cnc-size-4" })
|
|
4548
|
+
}
|
|
4549
|
+
)
|
|
4550
|
+
]
|
|
4551
|
+
}
|
|
4552
|
+
)
|
|
4553
|
+
] });
|
|
4265
4554
|
}
|
|
4266
4555
|
|
|
4267
4556
|
// src/components/molecules/forms/combobox.tsx
|
|
4268
|
-
var
|
|
4557
|
+
var React16 = __toESM(require("react"));
|
|
4558
|
+
|
|
4559
|
+
// src/components/molecules/forms/combobox-footer.tsx
|
|
4560
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
4561
|
+
function ComboboxDropdownFooter({
|
|
4562
|
+
footerAction,
|
|
4563
|
+
renderFooter,
|
|
4564
|
+
close,
|
|
4565
|
+
hidden = false
|
|
4566
|
+
}) {
|
|
4567
|
+
if (hidden) return null;
|
|
4568
|
+
if (renderFooter) {
|
|
4569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "cnc-border-t cnc-border-brand-gray-50 cnc-p-2", children: renderFooter({ close }) });
|
|
4570
|
+
}
|
|
4571
|
+
if (!footerAction) return null;
|
|
4572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "cnc-border-t cnc-border-brand-gray-50 cnc-p-2", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4573
|
+
Button,
|
|
4574
|
+
{
|
|
4575
|
+
type: "button",
|
|
4576
|
+
variant: footerAction.variant ?? "create",
|
|
4577
|
+
className: "cnc-w-full",
|
|
4578
|
+
disabled: footerAction.disabled,
|
|
4579
|
+
onClick: (event) => {
|
|
4580
|
+
event.preventDefault();
|
|
4581
|
+
event.stopPropagation();
|
|
4582
|
+
footerAction.onClick(event);
|
|
4583
|
+
},
|
|
4584
|
+
children: footerAction.label
|
|
4585
|
+
}
|
|
4586
|
+
) });
|
|
4587
|
+
}
|
|
4269
4588
|
|
|
4270
4589
|
// src/components/molecules/overlay/command.tsx
|
|
4271
|
-
var
|
|
4590
|
+
var React14 = __toESM(require("react"));
|
|
4272
4591
|
var import_cmdk = require("cmdk");
|
|
4273
|
-
var
|
|
4274
|
-
var Command =
|
|
4592
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
4593
|
+
var Command = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4275
4594
|
import_cmdk.Command,
|
|
4276
4595
|
{
|
|
4277
4596
|
ref,
|
|
@@ -4284,16 +4603,16 @@ var Command = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
4284
4603
|
));
|
|
4285
4604
|
Command.displayName = import_cmdk.Command.displayName;
|
|
4286
4605
|
var CommandDialog = ({ children, ...props }) => {
|
|
4287
|
-
return /* @__PURE__ */ (0,
|
|
4606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Dialog, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogContent, { className: "cnc-overflow-hidden cnc-p-0", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Command, { className: "cnc-[&_cmdk-group-heading]:cnc-px-2 cnc-[&_cmdk-group-heading]:cnc-font-medium cnc-[&_cmdk-group-heading]:cnc-text-muted-foreground cnc-[&_cmdk-group]:not([hidden])~[cmdk-group]:cnc-pt-0 cnc-[&_cmdk-group]:cnc-px-2 cnc-[&_cmdk-input-wrapper]_svg:cnc-h-5 cnc-[&_cmdk-input-wrapper]_svg:cnc-w-5 cnc-[&_cmdk-input]:cnc-h-12 cnc-[&_cmdk-item]:cnc-px-2 cnc-[&_cmdk-item]:cnc-py-3 cnc-[&_cmdk-item]_svg:cnc-h-5 cnc-[&_cmdk-item]_svg:cnc-w-5", children }) }) });
|
|
4288
4607
|
};
|
|
4289
|
-
var CommandInput =
|
|
4608
|
+
var CommandInput = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4290
4609
|
"div",
|
|
4291
4610
|
{
|
|
4292
4611
|
className: "cnc-flex cnc-items-center cnc-border-b cnc-px-3",
|
|
4293
4612
|
"cmdk-input-wrapper": "",
|
|
4294
4613
|
children: [
|
|
4295
|
-
/* @__PURE__ */ (0,
|
|
4296
|
-
/* @__PURE__ */ (0,
|
|
4614
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Search, { className: "cnc-mr-2 cnc-h-4 cnc-w-4 cnc-shrink-0 cnc-opacity-50" }),
|
|
4615
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4297
4616
|
import_cmdk.Command.Input,
|
|
4298
4617
|
{
|
|
4299
4618
|
ref,
|
|
@@ -4308,7 +4627,7 @@ var CommandInput = React12.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
4308
4627
|
}
|
|
4309
4628
|
));
|
|
4310
4629
|
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
|
4311
|
-
var CommandList =
|
|
4630
|
+
var CommandList = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4312
4631
|
import_cmdk.Command.List,
|
|
4313
4632
|
{
|
|
4314
4633
|
ref,
|
|
@@ -4320,7 +4639,7 @@ var CommandList = React12.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4320
4639
|
}
|
|
4321
4640
|
));
|
|
4322
4641
|
CommandList.displayName = import_cmdk.Command.List.displayName;
|
|
4323
|
-
var CommandEmpty =
|
|
4642
|
+
var CommandEmpty = React14.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4324
4643
|
import_cmdk.Command.Empty,
|
|
4325
4644
|
{
|
|
4326
4645
|
ref,
|
|
@@ -4329,7 +4648,7 @@ var CommandEmpty = React12.forwardRef((props, ref) => /* @__PURE__ */ (0, import
|
|
|
4329
4648
|
}
|
|
4330
4649
|
));
|
|
4331
4650
|
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
|
4332
|
-
var CommandGroup =
|
|
4651
|
+
var CommandGroup = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4333
4652
|
import_cmdk.Command.Group,
|
|
4334
4653
|
{
|
|
4335
4654
|
ref,
|
|
@@ -4341,7 +4660,7 @@ var CommandGroup = React12.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
4341
4660
|
}
|
|
4342
4661
|
));
|
|
4343
4662
|
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
|
4344
|
-
var CommandSeparator =
|
|
4663
|
+
var CommandSeparator = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4345
4664
|
import_cmdk.Command.Separator,
|
|
4346
4665
|
{
|
|
4347
4666
|
ref,
|
|
@@ -4350,7 +4669,7 @@ var CommandSeparator = React12.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
4350
4669
|
}
|
|
4351
4670
|
));
|
|
4352
4671
|
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
|
4353
|
-
var CommandItem =
|
|
4672
|
+
var CommandItem = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4354
4673
|
import_cmdk.Command.Item,
|
|
4355
4674
|
{
|
|
4356
4675
|
ref,
|
|
@@ -4366,7 +4685,7 @@ var CommandShortcut = ({
|
|
|
4366
4685
|
className,
|
|
4367
4686
|
...props
|
|
4368
4687
|
}) => {
|
|
4369
|
-
return /* @__PURE__ */ (0,
|
|
4688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4370
4689
|
"span",
|
|
4371
4690
|
{
|
|
4372
4691
|
className: cn(
|
|
@@ -4380,12 +4699,12 @@ var CommandShortcut = ({
|
|
|
4380
4699
|
CommandShortcut.displayName = "CommandShortcut";
|
|
4381
4700
|
|
|
4382
4701
|
// src/components/molecules/overlay/popover.tsx
|
|
4383
|
-
var
|
|
4702
|
+
var React15 = __toESM(require("react"));
|
|
4384
4703
|
var PopoverPrimitive2 = __toESM(require("@radix-ui/react-popover"));
|
|
4385
|
-
var
|
|
4704
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
4386
4705
|
var Popover2 = PopoverPrimitive2.Root;
|
|
4387
4706
|
var PopoverTrigger2 = PopoverPrimitive2.Trigger;
|
|
4388
|
-
var PopoverContent2 =
|
|
4707
|
+
var PopoverContent2 = React15.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4389
4708
|
PopoverPrimitive2.Content,
|
|
4390
4709
|
{
|
|
4391
4710
|
ref,
|
|
@@ -4401,7 +4720,7 @@ var PopoverContent2 = React13.forwardRef(({ className, align = "center", sideOff
|
|
|
4401
4720
|
PopoverContent2.displayName = PopoverPrimitive2.Content.displayName;
|
|
4402
4721
|
|
|
4403
4722
|
// src/components/molecules/forms/combobox.tsx
|
|
4404
|
-
var
|
|
4723
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
4405
4724
|
function Combobox({
|
|
4406
4725
|
options,
|
|
4407
4726
|
placeholder = "",
|
|
@@ -4412,128 +4731,363 @@ function Combobox({
|
|
|
4412
4731
|
modal = false,
|
|
4413
4732
|
popoverClassName,
|
|
4414
4733
|
buttonClassName,
|
|
4415
|
-
disabled = false
|
|
4734
|
+
disabled = false,
|
|
4735
|
+
footerAction,
|
|
4736
|
+
renderFooter
|
|
4416
4737
|
}) {
|
|
4417
|
-
const [open, setOpen] =
|
|
4418
|
-
return /* @__PURE__ */ (0,
|
|
4419
|
-
/* @__PURE__ */ (0,
|
|
4738
|
+
const [open, setOpen] = React16.useState(false);
|
|
4739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Popover2, { open, onOpenChange: setOpen, modal, children: [
|
|
4740
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4420
4741
|
Button,
|
|
4421
4742
|
{
|
|
4422
4743
|
variant: "outline",
|
|
4423
4744
|
role: "combobox",
|
|
4424
4745
|
"aria-expanded": open,
|
|
4425
|
-
className: cn(
|
|
4746
|
+
className: cn(
|
|
4747
|
+
"cnc-w-full cnc-justify-between cnc-truncate ",
|
|
4748
|
+
buttonClassName
|
|
4749
|
+
),
|
|
4426
4750
|
disabled,
|
|
4427
4751
|
children: [
|
|
4428
|
-
/* @__PURE__ */ (0,
|
|
4429
|
-
/* @__PURE__ */ (0,
|
|
4752
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { children: value ? options?.find((framework) => framework.value === value)?.label : placeholder }),
|
|
4753
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ChevronsUpDown, { className: "cnc-ml-2 cnc-h-4 cnc-w-4 cnc-shrink-0 cnc-opacity-50" })
|
|
4430
4754
|
]
|
|
4431
4755
|
}
|
|
4432
4756
|
) }),
|
|
4433
|
-
/* @__PURE__ */ (0,
|
|
4757
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4434
4758
|
PopoverContent2,
|
|
4435
4759
|
{
|
|
4436
4760
|
align: "start",
|
|
4437
|
-
className: cn(
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
),
|
|
4446
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(CommandList, { children: [
|
|
4447
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CommandEmpty, { children: command?.emptyMessage ?? "Nenhum item encontrado" }),
|
|
4448
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CommandGroup, { children: options?.map((option) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4449
|
-
CommandItem,
|
|
4761
|
+
className: cn(
|
|
4762
|
+
"cnc-w-[--radix-popover-trigger-width] cnc-p-0",
|
|
4763
|
+
popoverClassName
|
|
4764
|
+
),
|
|
4765
|
+
children: [
|
|
4766
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Command, { children: [
|
|
4767
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4768
|
+
CommandInput,
|
|
4450
4769
|
{
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4770
|
+
placeholder: command?.placeholder,
|
|
4771
|
+
onInput: (e) => onInput && onInput(e.target?.value)
|
|
4772
|
+
}
|
|
4773
|
+
),
|
|
4774
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(CommandList, { children: [
|
|
4775
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CommandEmpty, { children: command?.emptyMessage ?? "Nenhum item encontrado" }),
|
|
4776
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CommandGroup, { children: options?.map((option) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4777
|
+
CommandItem,
|
|
4778
|
+
{
|
|
4779
|
+
value: option.value,
|
|
4780
|
+
onSelect: (currentValue) => {
|
|
4781
|
+
if (onChange)
|
|
4782
|
+
onChange(currentValue === value ? "" : currentValue);
|
|
4783
|
+
setOpen(false);
|
|
4784
|
+
},
|
|
4785
|
+
keywords: [option.value, option.label],
|
|
4786
|
+
disabled: option.disabled,
|
|
4787
|
+
children: [
|
|
4788
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4789
|
+
Check,
|
|
4790
|
+
{
|
|
4791
|
+
className: cn(
|
|
4792
|
+
"cnc-mr-2 cnc-h-4 cnc-w-4",
|
|
4793
|
+
value === option.value ? "cnc-opacity-100" : "cnc-opacity-0"
|
|
4794
|
+
)
|
|
4795
|
+
}
|
|
4796
|
+
),
|
|
4797
|
+
option.label
|
|
4798
|
+
]
|
|
4456
4799
|
},
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
},
|
|
4472
|
-
option.value
|
|
4473
|
-
)) })
|
|
4474
|
-
] })
|
|
4475
|
-
] })
|
|
4800
|
+
option.value
|
|
4801
|
+
)) })
|
|
4802
|
+
] })
|
|
4803
|
+
] }),
|
|
4804
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4805
|
+
ComboboxDropdownFooter,
|
|
4806
|
+
{
|
|
4807
|
+
footerAction,
|
|
4808
|
+
renderFooter,
|
|
4809
|
+
close: () => setOpen(false),
|
|
4810
|
+
hidden: disabled
|
|
4811
|
+
}
|
|
4812
|
+
)
|
|
4813
|
+
]
|
|
4476
4814
|
}
|
|
4477
4815
|
)
|
|
4478
4816
|
] });
|
|
4479
4817
|
}
|
|
4480
4818
|
|
|
4481
|
-
// src/components/
|
|
4482
|
-
var
|
|
4483
|
-
var
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
}
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
if (field.type === "switch") return true;
|
|
4505
|
-
if (value === "" || value === null || value === void 0) {
|
|
4506
|
-
return field.errorMessage || "Campo obrigat\xF3rio";
|
|
4507
|
-
}
|
|
4508
|
-
return true;
|
|
4819
|
+
// src/components/molecules/forms/multi-select.tsx
|
|
4820
|
+
var React17 = __toESM(require("react"));
|
|
4821
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
4822
|
+
function MultiSelect({
|
|
4823
|
+
options,
|
|
4824
|
+
value = [],
|
|
4825
|
+
onChange,
|
|
4826
|
+
placeholder = "Selecione...",
|
|
4827
|
+
disabled = false,
|
|
4828
|
+
modal = false,
|
|
4829
|
+
className,
|
|
4830
|
+
buttonClassName,
|
|
4831
|
+
popoverClassName,
|
|
4832
|
+
command,
|
|
4833
|
+
selectedCountText = (count) => `${count} selecionados`,
|
|
4834
|
+
footerAction,
|
|
4835
|
+
renderFooter
|
|
4836
|
+
}) {
|
|
4837
|
+
const [open, setOpen] = React17.useState(false);
|
|
4838
|
+
const buttonText = (() => {
|
|
4839
|
+
if (value.length === 0) return placeholder;
|
|
4840
|
+
if (value.length === 1) {
|
|
4841
|
+
return options?.find((option) => option.value === value[0])?.label ?? selectedCountText(1);
|
|
4509
4842
|
}
|
|
4843
|
+
return selectedCountText(value.length);
|
|
4844
|
+
})();
|
|
4845
|
+
const toggleOption = (optionValue) => {
|
|
4846
|
+
if (!onChange) return;
|
|
4847
|
+
onChange(
|
|
4848
|
+
value.includes(optionValue) ? value.filter((item) => item !== optionValue) : [...value, optionValue]
|
|
4849
|
+
);
|
|
4510
4850
|
};
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
"
|
|
4527
|
-
{
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Popover2, { open, onOpenChange: setOpen, modal, children: [
|
|
4852
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
4853
|
+
Button,
|
|
4854
|
+
{
|
|
4855
|
+
type: "button",
|
|
4856
|
+
variant: "outline",
|
|
4857
|
+
role: "combobox",
|
|
4858
|
+
"aria-expanded": open,
|
|
4859
|
+
disabled,
|
|
4860
|
+
className: cn(
|
|
4861
|
+
"cnc-w-full cnc-justify-between cnc-truncate",
|
|
4862
|
+
buttonClassName,
|
|
4863
|
+
className
|
|
4864
|
+
),
|
|
4865
|
+
children: [
|
|
4866
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "cnc-truncate", children: buttonText }),
|
|
4867
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ChevronsUpDown, { className: "cnc-ml-2 cnc-h-4 cnc-w-4 cnc-shrink-0 cnc-opacity-50" })
|
|
4868
|
+
]
|
|
4869
|
+
}
|
|
4870
|
+
) }),
|
|
4871
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
4872
|
+
PopoverContent2,
|
|
4873
|
+
{
|
|
4874
|
+
align: "start",
|
|
4875
|
+
className: cn(
|
|
4876
|
+
"cnc-w-[--radix-popover-trigger-width] cnc-p-0",
|
|
4877
|
+
popoverClassName
|
|
4878
|
+
),
|
|
4879
|
+
children: [
|
|
4880
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Command, { children: [
|
|
4881
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CommandInput, { placeholder: command?.placeholder }),
|
|
4882
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(CommandList, { children: [
|
|
4883
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CommandEmpty, { children: command?.emptyMessage ?? "Nenhum item encontrado" }),
|
|
4884
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CommandGroup, { children: options?.map((option) => {
|
|
4885
|
+
const isSelected = value.includes(option.value);
|
|
4886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
4887
|
+
CommandItem,
|
|
4888
|
+
{
|
|
4889
|
+
value: option.value,
|
|
4890
|
+
onSelect: () => toggleOption(option.value),
|
|
4891
|
+
keywords: [option.value, option.label],
|
|
4892
|
+
disabled: option.disabled,
|
|
4893
|
+
children: [
|
|
4894
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4895
|
+
Check,
|
|
4896
|
+
{
|
|
4897
|
+
className: cn(
|
|
4898
|
+
"cnc-mr-2 cnc-h-4 cnc-w-4",
|
|
4899
|
+
isSelected ? "cnc-opacity-100" : "cnc-opacity-0"
|
|
4900
|
+
)
|
|
4901
|
+
}
|
|
4902
|
+
),
|
|
4903
|
+
option.label
|
|
4904
|
+
]
|
|
4905
|
+
},
|
|
4906
|
+
option.value
|
|
4907
|
+
);
|
|
4908
|
+
}) })
|
|
4909
|
+
] })
|
|
4910
|
+
] }),
|
|
4911
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4912
|
+
ComboboxDropdownFooter,
|
|
4913
|
+
{
|
|
4914
|
+
footerAction,
|
|
4915
|
+
renderFooter,
|
|
4916
|
+
close: () => setOpen(false),
|
|
4917
|
+
hidden: disabled
|
|
4918
|
+
}
|
|
4919
|
+
)
|
|
4920
|
+
]
|
|
4921
|
+
}
|
|
4922
|
+
)
|
|
4923
|
+
] });
|
|
4924
|
+
}
|
|
4925
|
+
|
|
4926
|
+
// src/components/molecules/overlay/confirm-dialog.tsx
|
|
4927
|
+
var React18 = __toESM(require("react"));
|
|
4928
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4929
|
+
function ConfirmDialog({
|
|
4930
|
+
open,
|
|
4931
|
+
onOpenChange,
|
|
4932
|
+
title,
|
|
4933
|
+
description,
|
|
4934
|
+
confirmLabel = "Confirmar",
|
|
4935
|
+
cancelLabel = "Cancelar",
|
|
4936
|
+
loadingLabel = "Aguarde...",
|
|
4937
|
+
onConfirm,
|
|
4938
|
+
icon,
|
|
4939
|
+
showIconBackground = true,
|
|
4940
|
+
footerAlign = "center",
|
|
4941
|
+
confirmVariant = "danger",
|
|
4942
|
+
children,
|
|
4943
|
+
isLoading,
|
|
4944
|
+
className
|
|
4945
|
+
}) {
|
|
4946
|
+
const [localLoading, setLocalLoading] = React18.useState(false);
|
|
4947
|
+
const isBusy = isLoading ?? localLoading;
|
|
4948
|
+
const handleConfirm = async () => {
|
|
4949
|
+
if (isLoading !== void 0) {
|
|
4950
|
+
await onConfirm?.();
|
|
4951
|
+
return;
|
|
4952
|
+
}
|
|
4953
|
+
setLocalLoading(true);
|
|
4954
|
+
try {
|
|
4955
|
+
await onConfirm?.();
|
|
4956
|
+
} finally {
|
|
4957
|
+
setLocalLoading(false);
|
|
4958
|
+
}
|
|
4959
|
+
};
|
|
4960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(DialogContent, { className: cn("cnc-max-w-md cnc-text-center", className), children: [
|
|
4961
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(DialogHeader, { children: [
|
|
4962
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4963
|
+
"div",
|
|
4964
|
+
{
|
|
4965
|
+
className: cn(
|
|
4966
|
+
"cnc-mx-auto cnc-mb-2 cnc-flex cnc-items-center cnc-justify-center",
|
|
4967
|
+
showIconBackground && "cnc-size-16 cnc-rounded-full cnc-bg-red-100",
|
|
4968
|
+
showIconBackground && confirmVariant === "confirm" && "cnc-bg-brand-green-100/20"
|
|
4969
|
+
),
|
|
4970
|
+
children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Trash2, { className: cn("cnc-size-8 cnc-text-red-600", confirmVariant === "confirm" && "cnc-text-brand-green-300") })
|
|
4971
|
+
}
|
|
4972
|
+
),
|
|
4973
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DialogTitle, { className: "cnc-text-center", children: title }),
|
|
4974
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DialogDescription, { className: "cnc-text-center", children: description })
|
|
4975
|
+
] }),
|
|
4976
|
+
children,
|
|
4977
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
4978
|
+
DialogFooter,
|
|
4979
|
+
{
|
|
4980
|
+
className: cn(
|
|
4981
|
+
"cnc-flex cnc-gap-2",
|
|
4982
|
+
footerAlign === "end" ? "cnc-justify-end sm:cnc-justify-end" : "cnc-justify-center sm:cnc-justify-center"
|
|
4983
|
+
),
|
|
4984
|
+
children: [
|
|
4985
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4986
|
+
Button,
|
|
4987
|
+
{
|
|
4988
|
+
type: "button",
|
|
4989
|
+
variant: "outline",
|
|
4990
|
+
onClick: () => onOpenChange(false),
|
|
4991
|
+
disabled: isBusy,
|
|
4992
|
+
children: cancelLabel
|
|
4993
|
+
}
|
|
4994
|
+
),
|
|
4995
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4996
|
+
Button,
|
|
4997
|
+
{
|
|
4998
|
+
type: "button",
|
|
4999
|
+
variant: confirmVariant,
|
|
5000
|
+
isLoading: isBusy,
|
|
5001
|
+
onClick: handleConfirm,
|
|
5002
|
+
children: isBusy ? loadingLabel : confirmLabel
|
|
5003
|
+
}
|
|
5004
|
+
)
|
|
5005
|
+
]
|
|
5006
|
+
}
|
|
5007
|
+
)
|
|
5008
|
+
] }) });
|
|
5009
|
+
}
|
|
5010
|
+
|
|
5011
|
+
// src/components/molecules/overlay/tooltip.tsx
|
|
5012
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
5013
|
+
function Tooltip({
|
|
5014
|
+
text,
|
|
5015
|
+
children,
|
|
5016
|
+
className,
|
|
5017
|
+
contentClassName
|
|
5018
|
+
}) {
|
|
5019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn("cnc-relative cnc-inline-flex cnc-group", className), children: [
|
|
5020
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5021
|
+
"div",
|
|
5022
|
+
{
|
|
5023
|
+
role: "tooltip",
|
|
5024
|
+
className: cn(
|
|
5025
|
+
"cnc-pointer-events-none cnc-absolute cnc-bottom-full cnc-left-1/2 cnc-z-50 cnc-mb-2 cnc-w-max cnc-max-w-xs cnc--translate-x-1/2 cnc-rounded cnc-bg-black cnc-px-2 cnc-py-1 cnc-text-xs cnc-text-white cnc-opacity-0 cnc-shadow-md cnc-transition-opacity cnc-duration-200 group-hover:cnc-opacity-100 group-focus-within:cnc-opacity-100",
|
|
5026
|
+
contentClassName
|
|
5027
|
+
),
|
|
5028
|
+
children: text
|
|
5029
|
+
}
|
|
5030
|
+
),
|
|
5031
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "cnc-cursor-pointer", children })
|
|
5032
|
+
] });
|
|
5033
|
+
}
|
|
5034
|
+
|
|
5035
|
+
// src/components/organisms/filter/index.tsx
|
|
5036
|
+
var React19 = __toESM(require("react"));
|
|
5037
|
+
var import_react_hook_form = require("react-hook-form");
|
|
5038
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
5039
|
+
var INPUT_BASE_CLASSES = [
|
|
5040
|
+
"cnc-flex cnc-h-10 cnc-w-full cnc-rounded-md cnc-border cnc-bg-transparent cnc-px-3 cnc-py-1 cnc-text-base cnc-shadow-sm cnc-transition-colors",
|
|
5041
|
+
"placeholder:cnc-text-muted-foreground focus-visible:cnc-outline-none",
|
|
5042
|
+
"focus-visible:cnc-ring-2 focus-visible:cnc-ring-brand-gray-500/50 md:cnc-text-sm",
|
|
5043
|
+
"not-disabled:hover:cnc-border-brand-gray-500",
|
|
5044
|
+
"disabled:cnc-cursor-not-allowed disabled:cnc-opacity-50"
|
|
5045
|
+
].join(" ");
|
|
5046
|
+
function buildDefaultValues(fields) {
|
|
5047
|
+
const defaults = {};
|
|
5048
|
+
for (const field of fields) {
|
|
5049
|
+
defaults[field.name] = field.defaultValue ?? (field.type === "switch" ? false : "");
|
|
5050
|
+
}
|
|
5051
|
+
return defaults;
|
|
5052
|
+
}
|
|
5053
|
+
function buildValidationRules(field) {
|
|
5054
|
+
if (!field.required) return void 0;
|
|
5055
|
+
return {
|
|
5056
|
+
required: field.errorMessage || "Campo obrigat\xF3rio",
|
|
5057
|
+
validate: (value) => {
|
|
5058
|
+
if (field.type === "switch") return true;
|
|
5059
|
+
if (value === "" || value === null || value === void 0) {
|
|
5060
|
+
return field.errorMessage || "Campo obrigat\xF3rio";
|
|
5061
|
+
}
|
|
5062
|
+
return true;
|
|
5063
|
+
}
|
|
5064
|
+
};
|
|
5065
|
+
}
|
|
5066
|
+
var FilterFieldItem = React19.memo(function FilterFieldItem2({
|
|
5067
|
+
field,
|
|
5068
|
+
register,
|
|
5069
|
+
control,
|
|
5070
|
+
error
|
|
5071
|
+
}) {
|
|
5072
|
+
const fieldId = field.id || `filter-field-${field.name}`;
|
|
5073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
5074
|
+
"div",
|
|
5075
|
+
{
|
|
5076
|
+
className: "cnc-filter-field cnc-px-2 cnc-mb-3",
|
|
5077
|
+
style: { "--cnc-filter-field-w": field.width || "25%" },
|
|
5078
|
+
children: [
|
|
5079
|
+
field.label && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
5080
|
+
"label",
|
|
5081
|
+
{
|
|
5082
|
+
htmlFor: fieldId,
|
|
5083
|
+
className: "cnc-block cnc-text-sm cnc-mb-1 cnc-font-medium cnc-text-brand-gray-600",
|
|
5084
|
+
children: [
|
|
5085
|
+
field.label,
|
|
5086
|
+
field.required && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "cnc-text-red-500", children: " *" })
|
|
4533
5087
|
]
|
|
4534
5088
|
}
|
|
4535
5089
|
),
|
|
4536
|
-
(field.type === "text" || field.type === "date") && /* @__PURE__ */ (0,
|
|
5090
|
+
(field.type === "text" || field.type === "date") && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4537
5091
|
"input",
|
|
4538
5092
|
{
|
|
4539
5093
|
id: fieldId,
|
|
@@ -4547,13 +5101,13 @@ var FilterFieldItem = React15.memo(function FilterFieldItem2({
|
|
|
4547
5101
|
)
|
|
4548
5102
|
}
|
|
4549
5103
|
),
|
|
4550
|
-
field.type === "combobox" && /* @__PURE__ */ (0,
|
|
5104
|
+
field.type === "combobox" && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4551
5105
|
import_react_hook_form.Controller,
|
|
4552
5106
|
{
|
|
4553
5107
|
name: field.name,
|
|
4554
5108
|
control,
|
|
4555
5109
|
rules: buildValidationRules(field),
|
|
4556
|
-
render: ({ field: rhfField }) => /* @__PURE__ */ (0,
|
|
5110
|
+
render: ({ field: rhfField }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4557
5111
|
Combobox,
|
|
4558
5112
|
{
|
|
4559
5113
|
value: rhfField.value || "",
|
|
@@ -4567,13 +5121,13 @@ var FilterFieldItem = React15.memo(function FilterFieldItem2({
|
|
|
4567
5121
|
)
|
|
4568
5122
|
}
|
|
4569
5123
|
),
|
|
4570
|
-
field.type === "switch" && /* @__PURE__ */ (0,
|
|
5124
|
+
field.type === "switch" && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4571
5125
|
import_react_hook_form.Controller,
|
|
4572
5126
|
{
|
|
4573
5127
|
name: field.name,
|
|
4574
5128
|
control,
|
|
4575
5129
|
rules: buildValidationRules(field),
|
|
4576
|
-
render: ({ field: rhfField }) => /* @__PURE__ */ (0,
|
|
5130
|
+
render: ({ field: rhfField }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4577
5131
|
Switch,
|
|
4578
5132
|
{
|
|
4579
5133
|
checked: !!rhfField.value,
|
|
@@ -4584,14 +5138,14 @@ var FilterFieldItem = React15.memo(function FilterFieldItem2({
|
|
|
4584
5138
|
)
|
|
4585
5139
|
}
|
|
4586
5140
|
),
|
|
4587
|
-
error && /* @__PURE__ */ (0,
|
|
5141
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "cnc-block cnc-text-xs cnc-text-red-500 cnc-mt-1", children: error.message })
|
|
4588
5142
|
]
|
|
4589
5143
|
}
|
|
4590
5144
|
);
|
|
4591
5145
|
});
|
|
4592
5146
|
function CleanButton({ control, onClean }) {
|
|
4593
5147
|
const values = (0, import_react_hook_form.useWatch)({ control });
|
|
4594
|
-
const hasActiveFilters =
|
|
5148
|
+
const hasActiveFilters = React19.useMemo(() => {
|
|
4595
5149
|
const keys = Object.keys(values);
|
|
4596
5150
|
return keys.some((key) => {
|
|
4597
5151
|
const val = values[key];
|
|
@@ -4600,7 +5154,7 @@ function CleanButton({ control, onClean }) {
|
|
|
4600
5154
|
return val !== null && val !== void 0 && val !== "";
|
|
4601
5155
|
});
|
|
4602
5156
|
}, [values]);
|
|
4603
|
-
return /* @__PURE__ */ (0,
|
|
5157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
4604
5158
|
Button,
|
|
4605
5159
|
{
|
|
4606
5160
|
type: "button",
|
|
@@ -4609,13 +5163,13 @@ function CleanButton({ control, onClean }) {
|
|
|
4609
5163
|
disabled: !hasActiveFilters,
|
|
4610
5164
|
className: "cnc-shrink-0 cnc-gap-2",
|
|
4611
5165
|
children: [
|
|
4612
|
-
/* @__PURE__ */ (0,
|
|
5166
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(FilterX, { className: "cnc-h-4 cnc-w-4" }),
|
|
4613
5167
|
"Limpar"
|
|
4614
5168
|
]
|
|
4615
5169
|
}
|
|
4616
5170
|
);
|
|
4617
5171
|
}
|
|
4618
|
-
var Filter =
|
|
5172
|
+
var Filter = React19.forwardRef(
|
|
4619
5173
|
function Filter2({
|
|
4620
5174
|
fields,
|
|
4621
5175
|
collapsibleFields,
|
|
@@ -4625,12 +5179,12 @@ var Filter = React15.forwardRef(
|
|
|
4625
5179
|
isLoading = false,
|
|
4626
5180
|
className
|
|
4627
5181
|
}, ref) {
|
|
4628
|
-
const [isCollapsibleOpen, setIsCollapsibleOpen] =
|
|
4629
|
-
const allFields =
|
|
5182
|
+
const [isCollapsibleOpen, setIsCollapsibleOpen] = React19.useState(false);
|
|
5183
|
+
const allFields = React19.useMemo(
|
|
4630
5184
|
() => [...fields, ...collapsibleFields || []],
|
|
4631
5185
|
[fields, collapsibleFields]
|
|
4632
5186
|
);
|
|
4633
|
-
const defaultValues =
|
|
5187
|
+
const defaultValues = React19.useMemo(
|
|
4634
5188
|
() => buildDefaultValues(allFields),
|
|
4635
5189
|
[allFields]
|
|
4636
5190
|
);
|
|
@@ -4641,7 +5195,7 @@ var Filter = React15.forwardRef(
|
|
|
4641
5195
|
reset,
|
|
4642
5196
|
formState: { errors }
|
|
4643
5197
|
} = (0, import_react_hook_form.useForm)({ defaultValues });
|
|
4644
|
-
|
|
5198
|
+
React19.useEffect(() => {
|
|
4645
5199
|
if (collapsibleFields?.some((f) => errors[f.name])) {
|
|
4646
5200
|
setIsCollapsibleOpen(true);
|
|
4647
5201
|
}
|
|
@@ -4649,7 +5203,7 @@ var Filter = React15.forwardRef(
|
|
|
4649
5203
|
const onSubmit = (data) => {
|
|
4650
5204
|
onSearch(data);
|
|
4651
5205
|
};
|
|
4652
|
-
const handleClean =
|
|
5206
|
+
const handleClean = React19.useCallback(() => {
|
|
4653
5207
|
const emptyValues = {};
|
|
4654
5208
|
for (const field of allFields) {
|
|
4655
5209
|
emptyValues[field.name] = field.type === "switch" ? false : "";
|
|
@@ -4657,12 +5211,12 @@ var Filter = React15.forwardRef(
|
|
|
4657
5211
|
reset(emptyValues);
|
|
4658
5212
|
onClean?.();
|
|
4659
5213
|
}, [allFields, reset, onClean]);
|
|
4660
|
-
return /* @__PURE__ */ (0,
|
|
5214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4661
5215
|
Collapsible,
|
|
4662
5216
|
{
|
|
4663
5217
|
open: isCollapsibleOpen,
|
|
4664
5218
|
onOpenChange: setIsCollapsibleOpen,
|
|
4665
|
-
children: /* @__PURE__ */ (0,
|
|
5219
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
4666
5220
|
"form",
|
|
4667
5221
|
{
|
|
4668
5222
|
ref,
|
|
@@ -4673,8 +5227,8 @@ var Filter = React15.forwardRef(
|
|
|
4673
5227
|
),
|
|
4674
5228
|
style: { backgroundColor: "#F8FAFC" },
|
|
4675
5229
|
children: [
|
|
4676
|
-
/* @__PURE__ */ (0,
|
|
4677
|
-
fields.map((field) => /* @__PURE__ */ (0,
|
|
5230
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "cnc-flex cnc-flex-wrap cnc-items-end", children: [
|
|
5231
|
+
fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4678
5232
|
FilterFieldItem,
|
|
4679
5233
|
{
|
|
4680
5234
|
field,
|
|
@@ -4684,18 +5238,18 @@ var Filter = React15.forwardRef(
|
|
|
4684
5238
|
},
|
|
4685
5239
|
field.name
|
|
4686
5240
|
)),
|
|
4687
|
-
/* @__PURE__ */ (0,
|
|
4688
|
-
collapsibleFields && collapsibleFields.length > 0 && /* @__PURE__ */ (0,
|
|
5241
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "cnc-filter-actions cnc-flex cnc-items-center cnc-gap-2 cnc-px-2 cnc-mb-3 cnc-ml-auto cnc-h-10", children: [
|
|
5242
|
+
collapsibleFields && collapsibleFields.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4689
5243
|
Button,
|
|
4690
5244
|
{
|
|
4691
5245
|
type: "button",
|
|
4692
5246
|
variant: "outline",
|
|
4693
5247
|
size: "icon",
|
|
4694
5248
|
className: "cnc-shrink-0",
|
|
4695
|
-
children: /* @__PURE__ */ (0,
|
|
5249
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ListFilter, { className: "cnc-h-4 cnc-w-4" })
|
|
4696
5250
|
}
|
|
4697
5251
|
) }),
|
|
4698
|
-
/* @__PURE__ */ (0,
|
|
5252
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
4699
5253
|
Button,
|
|
4700
5254
|
{
|
|
4701
5255
|
type: "submit",
|
|
@@ -4703,15 +5257,15 @@ var Filter = React15.forwardRef(
|
|
|
4703
5257
|
isLoading,
|
|
4704
5258
|
className: "cnc-shrink-0 cnc-gap-2",
|
|
4705
5259
|
children: [
|
|
4706
|
-
/* @__PURE__ */ (0,
|
|
5260
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Search, { className: "cnc-h-4 cnc-w-4" }),
|
|
4707
5261
|
"Pesquisar"
|
|
4708
5262
|
]
|
|
4709
5263
|
}
|
|
4710
5264
|
),
|
|
4711
|
-
!hideCleanFilterButton && /* @__PURE__ */ (0,
|
|
5265
|
+
!hideCleanFilterButton && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(CleanButton, { control, onClean: handleClean })
|
|
4712
5266
|
] })
|
|
4713
5267
|
] }),
|
|
4714
|
-
collapsibleFields && collapsibleFields.length > 0 && /* @__PURE__ */ (0,
|
|
5268
|
+
collapsibleFields && collapsibleFields.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(AnimatedCollapsibleContent, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "cnc-flex cnc-flex-wrap cnc-items-end cnc-pt-2", children: collapsibleFields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4715
5269
|
FilterFieldItem,
|
|
4716
5270
|
{
|
|
4717
5271
|
field,
|
|
@@ -4730,8 +5284,8 @@ var Filter = React15.forwardRef(
|
|
|
4730
5284
|
);
|
|
4731
5285
|
|
|
4732
5286
|
// src/components/organisms/card-list/index.tsx
|
|
4733
|
-
var
|
|
4734
|
-
var
|
|
5287
|
+
var React20 = __toESM(require("react"));
|
|
5288
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
4735
5289
|
function CardList({
|
|
4736
5290
|
items,
|
|
4737
5291
|
renderCard,
|
|
@@ -4747,21 +5301,21 @@ function CardList({
|
|
|
4747
5301
|
gridTemplateColumns: `repeat(auto-fill, minmax(min(100%, ${minItemWidth}), 1fr))`
|
|
4748
5302
|
};
|
|
4749
5303
|
if (isLoading) {
|
|
4750
|
-
return /* @__PURE__ */ (0,
|
|
5304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4751
5305
|
"div",
|
|
4752
5306
|
{
|
|
4753
5307
|
className: cn("cnc-grid cnc-w-full", gap, className),
|
|
4754
5308
|
style: gridStyle,
|
|
4755
5309
|
"aria-busy": "true",
|
|
4756
|
-
children: Array.from({ length: skeletonCount }).map((_, i) => /* @__PURE__ */ (0,
|
|
5310
|
+
children: Array.from({ length: skeletonCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
4757
5311
|
"div",
|
|
4758
5312
|
{
|
|
4759
5313
|
className: "cnc-animate-pulse cnc-rounded-md cnc-border-2 cnc-border-brand-gray-50 cnc-bg-white cnc-shadow cnc-p-6",
|
|
4760
5314
|
children: [
|
|
4761
|
-
/* @__PURE__ */ (0,
|
|
4762
|
-
/* @__PURE__ */ (0,
|
|
4763
|
-
/* @__PURE__ */ (0,
|
|
4764
|
-
/* @__PURE__ */ (0,
|
|
5315
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "cnc-h-4 cnc-w-1/2 cnc-bg-brand-gray-100 cnc-rounded cnc-mb-4" }),
|
|
5316
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "cnc-h-3 cnc-w-3/4 cnc-bg-brand-gray-100 cnc-rounded cnc-mb-2" }),
|
|
5317
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "cnc-h-3 cnc-w-2/3 cnc-bg-brand-gray-100 cnc-rounded cnc-mb-6" }),
|
|
5318
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "cnc-h-8 cnc-w-full cnc-bg-brand-gray-100 cnc-rounded" })
|
|
4765
5319
|
]
|
|
4766
5320
|
},
|
|
4767
5321
|
i
|
|
@@ -4770,7 +5324,7 @@ function CardList({
|
|
|
4770
5324
|
);
|
|
4771
5325
|
}
|
|
4772
5326
|
if (!items || items.length === 0) {
|
|
4773
|
-
return /* @__PURE__ */ (0,
|
|
5327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
4774
5328
|
"div",
|
|
4775
5329
|
{
|
|
4776
5330
|
className: cn(
|
|
@@ -4779,24 +5333,897 @@ function CardList({
|
|
|
4779
5333
|
),
|
|
4780
5334
|
style: { backgroundColor: "#F8FAFC", color: "#64748B" },
|
|
4781
5335
|
children: [
|
|
4782
|
-
/* @__PURE__ */ (0,
|
|
4783
|
-
/* @__PURE__ */ (0,
|
|
5336
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FolderOpen, { className: "cnc-h-8 cnc-w-8 cnc-mb-2" }),
|
|
5337
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "cnc-text-sm", children: emptyMessage })
|
|
4784
5338
|
]
|
|
4785
5339
|
}
|
|
4786
5340
|
);
|
|
4787
5341
|
}
|
|
4788
|
-
return /* @__PURE__ */ (0,
|
|
5342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4789
5343
|
"div",
|
|
4790
5344
|
{
|
|
4791
5345
|
className: cn("cnc-grid cnc-w-full", gap, className),
|
|
4792
5346
|
style: gridStyle,
|
|
4793
|
-
children: items.map((item, index) => /* @__PURE__ */ (0,
|
|
5347
|
+
children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(React20.Fragment, { children: renderCard(item, index) }, getKey ? getKey(item, index) : index))
|
|
4794
5348
|
}
|
|
4795
5349
|
);
|
|
4796
5350
|
}
|
|
4797
5351
|
|
|
5352
|
+
// src/components/organisms/drawer/drawer.tsx
|
|
5353
|
+
var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"));
|
|
5354
|
+
var React21 = __toESM(require("react"));
|
|
5355
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5356
|
+
var Drawer = DialogPrimitive2.Root;
|
|
5357
|
+
var DrawerTrigger = DialogPrimitive2.Trigger;
|
|
5358
|
+
var DrawerPortal = DialogPrimitive2.Portal;
|
|
5359
|
+
var DrawerClose = DialogPrimitive2.Close;
|
|
5360
|
+
var DrawerOverlay = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5361
|
+
DialogPrimitive2.Overlay,
|
|
5362
|
+
{
|
|
5363
|
+
ref,
|
|
5364
|
+
className: cn(
|
|
5365
|
+
"cnc-fixed cnc-inset-0 cnc-z-50 cnc-bg-black/80 data-[state=open]:cnc-animate-in data-[state=closed]:cnc-animate-out data-[state=closed]:cnc-fade-out-0 data-[state=open]:cnc-fade-in-0",
|
|
5366
|
+
className
|
|
5367
|
+
),
|
|
5368
|
+
...props
|
|
5369
|
+
}
|
|
5370
|
+
));
|
|
5371
|
+
DrawerOverlay.displayName = DialogPrimitive2.Overlay.displayName;
|
|
5372
|
+
var drawerSizeToWidth = {
|
|
5373
|
+
sm: "24rem",
|
|
5374
|
+
md: "32rem",
|
|
5375
|
+
lg: "40rem",
|
|
5376
|
+
xl: "48rem",
|
|
5377
|
+
full: "100vw"
|
|
5378
|
+
};
|
|
5379
|
+
var DrawerContent = React21.forwardRef(
|
|
5380
|
+
({
|
|
5381
|
+
className,
|
|
5382
|
+
children,
|
|
5383
|
+
side = "right",
|
|
5384
|
+
size = "md",
|
|
5385
|
+
width,
|
|
5386
|
+
closeButton = true,
|
|
5387
|
+
style,
|
|
5388
|
+
...props
|
|
5389
|
+
}, ref) => {
|
|
5390
|
+
const resolvedWidth = width ?? drawerSizeToWidth[size];
|
|
5391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(DrawerPortal, { children: [
|
|
5392
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DrawerOverlay, {}),
|
|
5393
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
5394
|
+
DialogPrimitive2.Content,
|
|
5395
|
+
{
|
|
5396
|
+
ref,
|
|
5397
|
+
style: { "--drawer-width": resolvedWidth, ...style },
|
|
5398
|
+
className: cn(
|
|
5399
|
+
"cnc-fixed cnc-inset-y-0 cnc-z-50 cnc-flex cnc-w-full cnc-flex-col cnc-bg-background cnc-shadow-lg cnc-duration-200 data-[state=open]:cnc-animate-in data-[state=closed]:cnc-animate-out data-[state=closed]:cnc-fade-out-0 data-[state=open]:cnc-fade-in-0",
|
|
5400
|
+
"sm:cnc-w-[--drawer-width] sm:cnc-max-w-full",
|
|
5401
|
+
side === "right" && "cnc-right-0 cnc-border-l data-[state=closed]:cnc-slide-out-to-right-full data-[state=open]:cnc-slide-in-from-right-full",
|
|
5402
|
+
side === "left" && "cnc-left-0 cnc-border-r data-[state=closed]:cnc-slide-out-to-left-full data-[state=open]:cnc-slide-in-from-left-full",
|
|
5403
|
+
className
|
|
5404
|
+
),
|
|
5405
|
+
...props,
|
|
5406
|
+
children: [
|
|
5407
|
+
children,
|
|
5408
|
+
closeButton && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(DialogPrimitive2.Close, { className: "cnc-absolute cnc-right-4 cnc-top-4 cnc-rounded-sm cnc-opacity-70 cnc-ring-offset-background cnc-transition-opacity hover:cnc-opacity-100 focus:cnc-outline-none focus:cnc-ring-2 focus:cnc-ring-ring focus:cnc-ring-offset-2 disabled:cnc-pointer-events-none data-[state=open]:cnc-bg-accent data-[state=open]:cnc-text-muted-foreground", children: [
|
|
5409
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(X, { className: "cnc-h-4 cnc-w-4" }),
|
|
5410
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "cnc-sr-only", children: "Fechar" })
|
|
5411
|
+
] })
|
|
5412
|
+
]
|
|
5413
|
+
}
|
|
5414
|
+
)
|
|
5415
|
+
] });
|
|
5416
|
+
}
|
|
5417
|
+
);
|
|
5418
|
+
DrawerContent.displayName = DialogPrimitive2.Content.displayName;
|
|
5419
|
+
var DrawerHeader = ({
|
|
5420
|
+
className,
|
|
5421
|
+
...props
|
|
5422
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5423
|
+
"div",
|
|
5424
|
+
{
|
|
5425
|
+
className: cn(
|
|
5426
|
+
"cnc-flex cnc-flex-col cnc-space-y-1.5 cnc-border-b cnc-p-6",
|
|
5427
|
+
className
|
|
5428
|
+
),
|
|
5429
|
+
...props
|
|
5430
|
+
}
|
|
5431
|
+
);
|
|
5432
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
5433
|
+
var DrawerBody = ({
|
|
5434
|
+
className,
|
|
5435
|
+
...props
|
|
5436
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: cn("cnc-flex-1 cnc-overflow-y-auto cnc-p-6", className), ...props });
|
|
5437
|
+
DrawerBody.displayName = "DrawerBody";
|
|
5438
|
+
var DrawerFooter = ({
|
|
5439
|
+
className,
|
|
5440
|
+
...props
|
|
5441
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: cn("cnc-border-t cnc-p-6", className), ...props });
|
|
5442
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
5443
|
+
var DrawerTitle = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5444
|
+
DialogPrimitive2.Title,
|
|
5445
|
+
{
|
|
5446
|
+
ref,
|
|
5447
|
+
className: cn(
|
|
5448
|
+
"cnc-text-lg cnc-font-semibold cnc-leading-none cnc-tracking-tight",
|
|
5449
|
+
className
|
|
5450
|
+
),
|
|
5451
|
+
...props
|
|
5452
|
+
}
|
|
5453
|
+
));
|
|
5454
|
+
DrawerTitle.displayName = DialogPrimitive2.Title.displayName;
|
|
5455
|
+
var DrawerDescription = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5456
|
+
DialogPrimitive2.Description,
|
|
5457
|
+
{
|
|
5458
|
+
ref,
|
|
5459
|
+
className: cn("cnc-text-sm cnc-text-muted-foreground", className),
|
|
5460
|
+
...props
|
|
5461
|
+
}
|
|
5462
|
+
));
|
|
5463
|
+
DrawerDescription.displayName = DialogPrimitive2.Description.displayName;
|
|
5464
|
+
|
|
5465
|
+
// src/components/organisms/drawer/drawer-context.tsx
|
|
5466
|
+
var React22 = __toESM(require("react"));
|
|
5467
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5468
|
+
var DrawerContext = React22.createContext(
|
|
5469
|
+
void 0
|
|
5470
|
+
);
|
|
5471
|
+
function DrawerProvider({ children }) {
|
|
5472
|
+
const [activeDrawer, setActiveDrawer] = React22.useState(null);
|
|
5473
|
+
const openDrawer = React22.useCallback((drawerId) => {
|
|
5474
|
+
setActiveDrawer(drawerId);
|
|
5475
|
+
}, []);
|
|
5476
|
+
const closeDrawer = React22.useCallback(() => {
|
|
5477
|
+
setActiveDrawer(null);
|
|
5478
|
+
}, []);
|
|
5479
|
+
const isOpen = React22.useCallback(
|
|
5480
|
+
(drawerId) => activeDrawer === drawerId,
|
|
5481
|
+
[activeDrawer]
|
|
5482
|
+
);
|
|
5483
|
+
const value = React22.useMemo(
|
|
5484
|
+
() => ({ activeDrawer, openDrawer, closeDrawer, isOpen }),
|
|
5485
|
+
[activeDrawer, openDrawer, closeDrawer, isOpen]
|
|
5486
|
+
);
|
|
5487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DrawerContext.Provider, { value, children });
|
|
5488
|
+
}
|
|
5489
|
+
|
|
5490
|
+
// src/components/organisms/drawer/use-drawer.ts
|
|
5491
|
+
var React23 = __toESM(require("react"));
|
|
5492
|
+
function useDrawer() {
|
|
5493
|
+
const context = React23.useContext(DrawerContext);
|
|
5494
|
+
if (!context) {
|
|
5495
|
+
throw new Error("useDrawer deve ser usado dentro de um DrawerProvider");
|
|
5496
|
+
}
|
|
5497
|
+
return context;
|
|
5498
|
+
}
|
|
5499
|
+
|
|
5500
|
+
// src/components/organisms/upload/file-upload.tsx
|
|
5501
|
+
var React24 = __toESM(require("react"));
|
|
5502
|
+
|
|
5503
|
+
// src/components/organisms/upload/utils.ts
|
|
5504
|
+
function formatSizeLimit(bytes) {
|
|
5505
|
+
if (bytes < 1024 * 1024) {
|
|
5506
|
+
return `${Math.max(1, Math.round(bytes / 1024))} KB`;
|
|
5507
|
+
}
|
|
5508
|
+
return `${(bytes / (1024 * 1024)).toLocaleString("pt-BR", {
|
|
5509
|
+
maximumFractionDigits: 1,
|
|
5510
|
+
minimumFractionDigits: 0
|
|
5511
|
+
})} MB`;
|
|
5512
|
+
}
|
|
5513
|
+
function formatFileSize(bytes) {
|
|
5514
|
+
if (bytes < 1024 * 1024) {
|
|
5515
|
+
return `${Math.max(1, Math.round(bytes / 1024))} KB`;
|
|
5516
|
+
}
|
|
5517
|
+
return `${(bytes / (1024 * 1024)).toLocaleString("pt-BR", {
|
|
5518
|
+
maximumFractionDigits: 1,
|
|
5519
|
+
minimumFractionDigits: 0
|
|
5520
|
+
})} MB`;
|
|
5521
|
+
}
|
|
5522
|
+
function isDuplicateFile(file, files) {
|
|
5523
|
+
return files.some(
|
|
5524
|
+
(currentFile) => currentFile.name === file.name && currentFile.size === file.size
|
|
5525
|
+
);
|
|
5526
|
+
}
|
|
5527
|
+
function validateFiles({
|
|
5528
|
+
currentFiles = [],
|
|
5529
|
+
incomingFiles,
|
|
5530
|
+
allowedTypes,
|
|
5531
|
+
maxSize,
|
|
5532
|
+
multiple = true
|
|
5533
|
+
}) {
|
|
5534
|
+
const acceptedFiles = [];
|
|
5535
|
+
const rejectedFiles = [];
|
|
5536
|
+
const baseFiles = multiple ? currentFiles : [];
|
|
5537
|
+
for (const file of incomingFiles) {
|
|
5538
|
+
if (allowedTypes?.length && !allowedTypes.includes(file.type)) {
|
|
5539
|
+
rejectedFiles.push({
|
|
5540
|
+
file,
|
|
5541
|
+
reason: "type",
|
|
5542
|
+
message: `Tipo n\xE3o permitido: ${file.name}`
|
|
5543
|
+
});
|
|
5544
|
+
continue;
|
|
5545
|
+
}
|
|
5546
|
+
if (maxSize !== void 0 && file.size > maxSize) {
|
|
5547
|
+
rejectedFiles.push({
|
|
5548
|
+
file,
|
|
5549
|
+
reason: "size",
|
|
5550
|
+
message: `Arquivo maior que ${formatSizeLimit(maxSize)}: ${file.name}`
|
|
5551
|
+
});
|
|
5552
|
+
continue;
|
|
5553
|
+
}
|
|
5554
|
+
if (isDuplicateFile(file, [...baseFiles, ...acceptedFiles])) {
|
|
5555
|
+
rejectedFiles.push({
|
|
5556
|
+
file,
|
|
5557
|
+
reason: "duplicate",
|
|
5558
|
+
message: `Arquivo j\xE1 adicionado: ${file.name}`
|
|
5559
|
+
});
|
|
5560
|
+
continue;
|
|
5561
|
+
}
|
|
5562
|
+
if (!multiple) {
|
|
5563
|
+
acceptedFiles.splice(0, acceptedFiles.length, file);
|
|
5564
|
+
continue;
|
|
5565
|
+
}
|
|
5566
|
+
acceptedFiles.push(file);
|
|
5567
|
+
}
|
|
5568
|
+
return { acceptedFiles, rejectedFiles };
|
|
5569
|
+
}
|
|
5570
|
+
|
|
5571
|
+
// src/components/organisms/upload/file-list.tsx
|
|
5572
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5573
|
+
function FileList({
|
|
5574
|
+
items,
|
|
5575
|
+
onRemove,
|
|
5576
|
+
onDownload,
|
|
5577
|
+
disabled = false,
|
|
5578
|
+
variant = "bordered",
|
|
5579
|
+
emptyState,
|
|
5580
|
+
removeLabel = "Remover",
|
|
5581
|
+
className,
|
|
5582
|
+
...props
|
|
5583
|
+
}) {
|
|
5584
|
+
if (items.length === 0) {
|
|
5585
|
+
return emptyState ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children: emptyState }) : null;
|
|
5586
|
+
}
|
|
5587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5588
|
+
"ul",
|
|
5589
|
+
{
|
|
5590
|
+
className: cn(
|
|
5591
|
+
"cnc-divide-y",
|
|
5592
|
+
variant === "bordered" ? "cnc-rounded-md cnc-border cnc-border-slate-200 cnc-bg-white cnc-divide-slate-200" : "cnc-bg-transparent cnc-divide-slate-100",
|
|
5593
|
+
className
|
|
5594
|
+
),
|
|
5595
|
+
...props,
|
|
5596
|
+
children: items.map((item, index) => {
|
|
5597
|
+
const canRemove = !!onRemove;
|
|
5598
|
+
const canDownload = !!onDownload;
|
|
5599
|
+
const isDisabled = disabled || item.disabled;
|
|
5600
|
+
const isPending = item.status === "pending";
|
|
5601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
5602
|
+
"li",
|
|
5603
|
+
{
|
|
5604
|
+
className: cn(
|
|
5605
|
+
"cnc-flex cnc-flex-col cnc-gap-2",
|
|
5606
|
+
variant === "bordered" ? "cnc-px-4 cnc-py-3 sm:cnc-flex-row sm:cnc-items-center sm:cnc-justify-between" : "cnc-px-0 cnc-py-4 first:cnc-pt-0 last:cnc-pb-0 sm:cnc-flex-row sm:cnc-items-center sm:cnc-justify-between"
|
|
5607
|
+
),
|
|
5608
|
+
children: [
|
|
5609
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "cnc-flex cnc-min-w-0 cnc-flex-1 cnc-items-start cnc-gap-2", children: [
|
|
5610
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(FileText, { className: "cnc-mt-0.5 cnc-size-4 cnc-shrink-0 cnc-text-slate-500" }),
|
|
5611
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "cnc-min-w-0", children: [
|
|
5612
|
+
canDownload ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
5613
|
+
"button",
|
|
5614
|
+
{
|
|
5615
|
+
type: "button",
|
|
5616
|
+
onClick: () => onDownload(item, index),
|
|
5617
|
+
disabled: isDisabled,
|
|
5618
|
+
className: "cnc-inline-flex cnc-items-center cnc-gap-1 cnc-text-left cnc-text-sm cnc-font-medium cnc-text-[#002f87] hover:cnc-underline disabled:cnc-cursor-not-allowed disabled:cnc-opacity-50",
|
|
5619
|
+
children: [
|
|
5620
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "cnc-min-w-0 cnc-truncate", children: item.name }),
|
|
5621
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Download, { className: "cnc-size-3.5 cnc-shrink-0" })
|
|
5622
|
+
]
|
|
5623
|
+
}
|
|
5624
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "cnc-text-sm cnc-font-medium cnc-text-slate-800", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "cnc-break-all", children: item.name }) }),
|
|
5625
|
+
(item.meta || item.size !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "cnc-mt-0.5 cnc-flex cnc-flex-wrap cnc-gap-x-2 cnc-gap-y-1 cnc-text-xs cnc-text-slate-500", children: [
|
|
5626
|
+
item.meta,
|
|
5627
|
+
item.meta && item.size !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: "\xB7" }) : null,
|
|
5628
|
+
item.size !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: formatFileSize(item.size) }) : null
|
|
5629
|
+
] }),
|
|
5630
|
+
item.description ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "cnc-mt-1 cnc-line-clamp-2 cnc-text-xs cnc-text-slate-600", children: item.description }) : null
|
|
5631
|
+
] })
|
|
5632
|
+
] }),
|
|
5633
|
+
canRemove ? isPending ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5634
|
+
"button",
|
|
5635
|
+
{
|
|
5636
|
+
type: "button",
|
|
5637
|
+
onClick: () => onRemove(item, index),
|
|
5638
|
+
disabled: isDisabled,
|
|
5639
|
+
className: "cnc-inline-flex cnc-shrink-0 cnc-items-center cnc-justify-center cnc-rounded-md cnc-p-1.5 cnc-text-slate-500 cnc-transition hover:cnc-bg-slate-100 hover:cnc-text-slate-800 disabled:cnc-cursor-not-allowed disabled:cnc-opacity-50",
|
|
5640
|
+
"aria-label": `Remover ${item.name}`,
|
|
5641
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(X, { className: "cnc-size-4" })
|
|
5642
|
+
}
|
|
5643
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
5644
|
+
"button",
|
|
5645
|
+
{
|
|
5646
|
+
type: "button",
|
|
5647
|
+
onClick: () => onRemove(item, index),
|
|
5648
|
+
disabled: isDisabled,
|
|
5649
|
+
className: "cnc-inline-flex cnc-h-9 cnc-w-full cnc-shrink-0 cnc-items-center cnc-justify-center cnc-gap-2 cnc-rounded-md cnc-border cnc-border-red-200 cnc-px-3 cnc-text-sm cnc-font-semibold cnc-text-red-700 cnc-transition hover:cnc-bg-red-50 disabled:cnc-cursor-not-allowed disabled:cnc-opacity-60 sm:cnc-w-auto",
|
|
5650
|
+
"aria-label": `Remover ${item.name}`,
|
|
5651
|
+
children: [
|
|
5652
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Trash2, { className: "cnc-size-4" }),
|
|
5653
|
+
removeLabel
|
|
5654
|
+
]
|
|
5655
|
+
}
|
|
5656
|
+
) : null
|
|
5657
|
+
]
|
|
5658
|
+
},
|
|
5659
|
+
item.id
|
|
5660
|
+
);
|
|
5661
|
+
})
|
|
5662
|
+
}
|
|
5663
|
+
);
|
|
5664
|
+
}
|
|
5665
|
+
|
|
5666
|
+
// src/components/organisms/upload/file-upload.tsx
|
|
5667
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
5668
|
+
function fileToListItem(file, index) {
|
|
5669
|
+
return {
|
|
5670
|
+
id: `${file.name}-${file.size}-${file.lastModified}-${index}`,
|
|
5671
|
+
name: file.name,
|
|
5672
|
+
size: file.size,
|
|
5673
|
+
status: "pending"
|
|
5674
|
+
};
|
|
5675
|
+
}
|
|
5676
|
+
var FileUpload = React24.forwardRef(
|
|
5677
|
+
({
|
|
5678
|
+
value = [],
|
|
5679
|
+
onChange,
|
|
5680
|
+
multiple = true,
|
|
5681
|
+
accept,
|
|
5682
|
+
allowedTypes,
|
|
5683
|
+
maxSize,
|
|
5684
|
+
disabled = false,
|
|
5685
|
+
isLoading = false,
|
|
5686
|
+
buttonLabel = "Adicionar arquivos",
|
|
5687
|
+
hint,
|
|
5688
|
+
icon,
|
|
5689
|
+
onReject,
|
|
5690
|
+
showList = true,
|
|
5691
|
+
listTitle = (count) => `Arquivos selecionados (${count})`,
|
|
5692
|
+
className,
|
|
5693
|
+
buttonClassName,
|
|
5694
|
+
listClassName,
|
|
5695
|
+
...props
|
|
5696
|
+
}, ref) => {
|
|
5697
|
+
const fileInputRef = React24.useRef(null);
|
|
5698
|
+
const hintId = React24.useId();
|
|
5699
|
+
React24.useImperativeHandle(ref, () => fileInputRef.current, []);
|
|
5700
|
+
const isBusy = disabled || isLoading;
|
|
5701
|
+
const items = value.map(fileToListItem);
|
|
5702
|
+
const clearInput = () => {
|
|
5703
|
+
if (fileInputRef.current) {
|
|
5704
|
+
fileInputRef.current.value = "";
|
|
5705
|
+
}
|
|
5706
|
+
};
|
|
5707
|
+
const handleFileSelection = (event) => {
|
|
5708
|
+
const selectedFiles = Array.from(event.target.files ?? []);
|
|
5709
|
+
if (!selectedFiles.length) {
|
|
5710
|
+
clearInput();
|
|
5711
|
+
return;
|
|
5712
|
+
}
|
|
5713
|
+
const { acceptedFiles, rejectedFiles } = validateFiles({
|
|
5714
|
+
currentFiles: value,
|
|
5715
|
+
incomingFiles: selectedFiles,
|
|
5716
|
+
allowedTypes,
|
|
5717
|
+
maxSize,
|
|
5718
|
+
multiple
|
|
5719
|
+
});
|
|
5720
|
+
if (acceptedFiles.length > 0) {
|
|
5721
|
+
onChange?.(multiple ? [...value, ...acceptedFiles] : acceptedFiles.slice(0, 1));
|
|
5722
|
+
}
|
|
5723
|
+
if (rejectedFiles.length > 0) {
|
|
5724
|
+
onReject?.(rejectedFiles);
|
|
5725
|
+
}
|
|
5726
|
+
clearInput();
|
|
5727
|
+
};
|
|
5728
|
+
const handleRemove = (_item, index) => {
|
|
5729
|
+
onChange?.(value.filter((_, currentIndex) => currentIndex !== index));
|
|
5730
|
+
};
|
|
5731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: cn("cnc-flex cnc-min-w-0 cnc-flex-col cnc-gap-3", className), ...props, children: [
|
|
5732
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5733
|
+
"input",
|
|
5734
|
+
{
|
|
5735
|
+
ref: fileInputRef,
|
|
5736
|
+
type: "file",
|
|
5737
|
+
multiple,
|
|
5738
|
+
accept,
|
|
5739
|
+
className: "cnc-sr-only",
|
|
5740
|
+
tabIndex: -1,
|
|
5741
|
+
disabled: isBusy,
|
|
5742
|
+
"aria-describedby": hint ? hintId : void 0,
|
|
5743
|
+
onChange: handleFileSelection
|
|
5744
|
+
}
|
|
5745
|
+
),
|
|
5746
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "cnc-flex cnc-flex-col cnc-gap-2 sm:cnc-flex-row sm:cnc-flex-wrap sm:cnc-items-center", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
5747
|
+
Button,
|
|
5748
|
+
{
|
|
5749
|
+
type: "button",
|
|
5750
|
+
variant: "outline",
|
|
5751
|
+
disabled: isBusy,
|
|
5752
|
+
className: buttonClassName,
|
|
5753
|
+
onClick: () => fileInputRef.current?.click(),
|
|
5754
|
+
children: [
|
|
5755
|
+
icon ?? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Paperclip, { className: "cnc-mr-2 cnc-size-4" }),
|
|
5756
|
+
buttonLabel
|
|
5757
|
+
]
|
|
5758
|
+
}
|
|
5759
|
+
) }),
|
|
5760
|
+
hint ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { id: hintId, className: "cnc-text-sm cnc-text-slate-600", children: hint }) : null,
|
|
5761
|
+
showList && items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "cnc-flex cnc-flex-col cnc-gap-2", children: [
|
|
5762
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { role: "status", className: "cnc-text-sm cnc-font-medium cnc-text-slate-700", children: listTitle(items.length) }),
|
|
5763
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5764
|
+
FileList,
|
|
5765
|
+
{
|
|
5766
|
+
items,
|
|
5767
|
+
onRemove: handleRemove,
|
|
5768
|
+
disabled: isBusy,
|
|
5769
|
+
className: listClassName
|
|
5770
|
+
}
|
|
5771
|
+
)
|
|
5772
|
+
] }) : null
|
|
5773
|
+
] });
|
|
5774
|
+
}
|
|
5775
|
+
);
|
|
5776
|
+
FileUpload.displayName = "FileUpload";
|
|
5777
|
+
|
|
5778
|
+
// src/components/organisms/calendar/calendar-utils.ts
|
|
5779
|
+
var MESES_PT_BR = [
|
|
5780
|
+
"Janeiro",
|
|
5781
|
+
"Fevereiro",
|
|
5782
|
+
"Mar\xE7o",
|
|
5783
|
+
"Abril",
|
|
5784
|
+
"Maio",
|
|
5785
|
+
"Junho",
|
|
5786
|
+
"Julho",
|
|
5787
|
+
"Agosto",
|
|
5788
|
+
"Setembro",
|
|
5789
|
+
"Outubro",
|
|
5790
|
+
"Novembro",
|
|
5791
|
+
"Dezembro"
|
|
5792
|
+
];
|
|
5793
|
+
var MESES_PT_BR_ABREV = [
|
|
5794
|
+
"JAN",
|
|
5795
|
+
"FEV",
|
|
5796
|
+
"MAR",
|
|
5797
|
+
"ABR",
|
|
5798
|
+
"MAI",
|
|
5799
|
+
"JUN",
|
|
5800
|
+
"JUL",
|
|
5801
|
+
"AGO",
|
|
5802
|
+
"SET",
|
|
5803
|
+
"OUT",
|
|
5804
|
+
"NOV",
|
|
5805
|
+
"DEZ"
|
|
5806
|
+
];
|
|
5807
|
+
var DIAS_SEMANA_PT_BR = ["DOM", "SEG", "TER", "QUA", "QUI", "SEX", "S\xC1B"];
|
|
5808
|
+
function toDateKey(date) {
|
|
5809
|
+
const ano = date.getFullYear();
|
|
5810
|
+
const mes = String(date.getMonth() + 1).padStart(2, "0");
|
|
5811
|
+
const dia = String(date.getDate()).padStart(2, "0");
|
|
5812
|
+
return `${ano}-${mes}-${dia}`;
|
|
5813
|
+
}
|
|
5814
|
+
function toLocalNoon(date) {
|
|
5815
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate(), 12, 0, 0, 0);
|
|
5816
|
+
}
|
|
5817
|
+
function isSameDay(a, b) {
|
|
5818
|
+
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
5819
|
+
}
|
|
5820
|
+
function isToday(date) {
|
|
5821
|
+
return isSameDay(date, /* @__PURE__ */ new Date());
|
|
5822
|
+
}
|
|
5823
|
+
function buildMonthDays(month, selectedDate, hasItems) {
|
|
5824
|
+
const year = month.getFullYear();
|
|
5825
|
+
const monthIndex = month.getMonth();
|
|
5826
|
+
const totalDays = new Date(year, monthIndex + 1, 0).getDate();
|
|
5827
|
+
const startOffset = new Date(year, monthIndex, 1).getDay();
|
|
5828
|
+
const cells = [];
|
|
5829
|
+
for (let i = 0; i < startOffset; i++) {
|
|
5830
|
+
cells.push(null);
|
|
5831
|
+
}
|
|
5832
|
+
for (let day = 1; day <= totalDays; day++) {
|
|
5833
|
+
const date = new Date(year, monthIndex, day, 12, 0, 0, 0);
|
|
5834
|
+
cells.push({
|
|
5835
|
+
date,
|
|
5836
|
+
number: day,
|
|
5837
|
+
dateKey: toDateKey(date),
|
|
5838
|
+
isToday: isToday(date),
|
|
5839
|
+
isSelected: selectedDate ? isSameDay(date, selectedDate) : false,
|
|
5840
|
+
hasItems: hasItems?.(date) ?? false
|
|
5841
|
+
});
|
|
5842
|
+
}
|
|
5843
|
+
return cells;
|
|
5844
|
+
}
|
|
5845
|
+
function formatMonthYear(date) {
|
|
5846
|
+
return `${MESES_PT_BR[date.getMonth()]} ${date.getFullYear()}`;
|
|
5847
|
+
}
|
|
5848
|
+
function formatDayAriaLabel(date) {
|
|
5849
|
+
return date.toLocaleDateString("pt-BR", {
|
|
5850
|
+
weekday: "long",
|
|
5851
|
+
day: "numeric",
|
|
5852
|
+
month: "long",
|
|
5853
|
+
year: "numeric"
|
|
5854
|
+
});
|
|
5855
|
+
}
|
|
5856
|
+
|
|
5857
|
+
// src/components/organisms/calendar/mini-month-calendar.tsx
|
|
5858
|
+
var React25 = __toESM(require("react"));
|
|
5859
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5860
|
+
function MiniMonthCalendar({
|
|
5861
|
+
month: monthProp,
|
|
5862
|
+
onMonthChange,
|
|
5863
|
+
selectedDate,
|
|
5864
|
+
onSelectDate,
|
|
5865
|
+
hasItems,
|
|
5866
|
+
renderDay,
|
|
5867
|
+
weekDays = DIAS_SEMANA_PT_BR,
|
|
5868
|
+
monthLabel = formatMonthYear,
|
|
5869
|
+
previousLabel = "M\xEAs anterior",
|
|
5870
|
+
nextLabel = "Pr\xF3ximo m\xEAs",
|
|
5871
|
+
className
|
|
5872
|
+
}) {
|
|
5873
|
+
const month = React25.useMemo(() => toLocalNoon(monthProp ?? /* @__PURE__ */ new Date()), [monthProp]);
|
|
5874
|
+
const cells = React25.useMemo(
|
|
5875
|
+
() => buildMonthDays(month, selectedDate, hasItems),
|
|
5876
|
+
[month, selectedDate, hasItems]
|
|
5877
|
+
);
|
|
5878
|
+
const goToMonth = (offset) => {
|
|
5879
|
+
onMonthChange?.(
|
|
5880
|
+
new Date(month.getFullYear(), month.getMonth() + offset, 1, 12, 0, 0, 0)
|
|
5881
|
+
);
|
|
5882
|
+
};
|
|
5883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn("cnc-w-full", className), children: [
|
|
5884
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "cnc-mb-4 cnc-flex cnc-items-center cnc-justify-between cnc-px-1", children: [
|
|
5885
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5886
|
+
"button",
|
|
5887
|
+
{
|
|
5888
|
+
type: "button",
|
|
5889
|
+
onClick: () => goToMonth(-1),
|
|
5890
|
+
"aria-label": previousLabel,
|
|
5891
|
+
className: "cnc-rounded cnc-p-1 cnc-text-brand-gray-200 cnc-transition-colors hover:cnc-bg-brand-blue-50 hover:cnc-text-brand-blue-600",
|
|
5892
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ChevronLeft, { className: "cnc-size-4" })
|
|
5893
|
+
}
|
|
5894
|
+
),
|
|
5895
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "cnc-text-sm cnc-font-bold cnc-text-primary", children: monthLabel(month) }),
|
|
5896
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5897
|
+
"button",
|
|
5898
|
+
{
|
|
5899
|
+
type: "button",
|
|
5900
|
+
onClick: () => goToMonth(1),
|
|
5901
|
+
"aria-label": nextLabel,
|
|
5902
|
+
className: "cnc-rounded cnc-p-1 cnc-text-brand-gray-200 cnc-transition-colors hover:cnc-bg-brand-blue-50 hover:cnc-text-brand-blue-600",
|
|
5903
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ChevronRight, { className: "cnc-size-4" })
|
|
5904
|
+
}
|
|
5905
|
+
)
|
|
5906
|
+
] }),
|
|
5907
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "cnc-grid cnc-grid-cols-7 cnc-gap-y-3 cnc-text-center cnc-text-xs", children: [
|
|
5908
|
+
weekDays.map((dayName) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5909
|
+
"span",
|
|
5910
|
+
{
|
|
5911
|
+
className: "cnc-text-[11px] cnc-font-medium cnc-text-brand-gray-200",
|
|
5912
|
+
children: dayName
|
|
5913
|
+
},
|
|
5914
|
+
dayName
|
|
5915
|
+
)),
|
|
5916
|
+
cells.map((cell, index) => {
|
|
5917
|
+
if (!cell) {
|
|
5918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", {}, `vazio-${index}`);
|
|
5919
|
+
}
|
|
5920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5921
|
+
"button",
|
|
5922
|
+
{
|
|
5923
|
+
type: "button",
|
|
5924
|
+
onClick: () => onSelectDate?.(cell.date),
|
|
5925
|
+
"aria-label": formatDayAriaLabel(cell.date),
|
|
5926
|
+
"aria-pressed": cell.isSelected,
|
|
5927
|
+
className: cn(
|
|
5928
|
+
"cnc-group cnc-relative cnc-flex cnc-h-8 cnc-flex-col cnc-items-center cnc-justify-center cnc-rounded-full cnc-transition-colors",
|
|
5929
|
+
cell.isSelected ? "cnc-bg-primary cnc-text-white" : "cnc-text-brand-gray-600 hover:cnc-bg-brand-blue-50 hover:cnc-text-primary",
|
|
5930
|
+
cell.isToday && !cell.isSelected && "cnc-underline cnc-decoration-primary cnc-decoration-2 cnc-underline-offset-4"
|
|
5931
|
+
),
|
|
5932
|
+
children: renderDay ? renderDay(cell) : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
5933
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "cnc-text-xs cnc-font-semibold", children: cell.number }),
|
|
5934
|
+
cell.hasItems && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "cnc-absolute cnc-bottom-1 cnc-size-1 cnc-rounded-full cnc-bg-primary group-aria-pressed:cnc-bg-white" })
|
|
5935
|
+
] })
|
|
5936
|
+
},
|
|
5937
|
+
cell.dateKey
|
|
5938
|
+
);
|
|
5939
|
+
})
|
|
5940
|
+
] })
|
|
5941
|
+
] });
|
|
5942
|
+
}
|
|
5943
|
+
|
|
5944
|
+
// src/components/organisms/calendar/month-year-picker.tsx
|
|
5945
|
+
var React26 = __toESM(require("react"));
|
|
5946
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
5947
|
+
function MonthYearPicker({
|
|
5948
|
+
value,
|
|
5949
|
+
onChange,
|
|
5950
|
+
disabled = false,
|
|
5951
|
+
triggerLabel = formatMonthYear,
|
|
5952
|
+
previousYearLabel = "Ano anterior",
|
|
5953
|
+
nextYearLabel = "Pr\xF3ximo ano",
|
|
5954
|
+
className,
|
|
5955
|
+
triggerClassName,
|
|
5956
|
+
contentClassName
|
|
5957
|
+
}) {
|
|
5958
|
+
const [open, setOpen] = React26.useState(false);
|
|
5959
|
+
const [viewYear, setViewYear] = React26.useState(() => value.getFullYear());
|
|
5960
|
+
React26.useEffect(() => {
|
|
5961
|
+
if (open) setViewYear(value.getFullYear());
|
|
5962
|
+
}, [open, value]);
|
|
5963
|
+
const isSelectedMonth = (monthIndex) => value.getFullYear() === viewYear && value.getMonth() === monthIndex;
|
|
5964
|
+
const handleMonthSelect = (monthIndex) => {
|
|
5965
|
+
const lastDay = new Date(viewYear, monthIndex + 1, 0).getDate();
|
|
5966
|
+
const day = Math.min(value.getDate(), lastDay);
|
|
5967
|
+
onChange(new Date(viewYear, monthIndex, day));
|
|
5968
|
+
setOpen(false);
|
|
5969
|
+
};
|
|
5970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Popover2, { open, onOpenChange: setOpen, children: [
|
|
5971
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
5972
|
+
Button,
|
|
5973
|
+
{
|
|
5974
|
+
type: "button",
|
|
5975
|
+
variant: "outline",
|
|
5976
|
+
disabled,
|
|
5977
|
+
"aria-expanded": open,
|
|
5978
|
+
className: cn(
|
|
5979
|
+
"cnc-justify-between cnc-gap-2 cnc-font-bold",
|
|
5980
|
+
triggerClassName
|
|
5981
|
+
),
|
|
5982
|
+
children: [
|
|
5983
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "cnc-text-sm", children: triggerLabel(value) }),
|
|
5984
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5985
|
+
ChevronDown,
|
|
5986
|
+
{
|
|
5987
|
+
className: cn(
|
|
5988
|
+
"cnc-size-4 cnc-transition-transform",
|
|
5989
|
+
open && "cnc-rotate-180"
|
|
5990
|
+
)
|
|
5991
|
+
}
|
|
5992
|
+
)
|
|
5993
|
+
]
|
|
5994
|
+
}
|
|
5995
|
+
) }),
|
|
5996
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
5997
|
+
PopoverContent2,
|
|
5998
|
+
{
|
|
5999
|
+
align: "start",
|
|
6000
|
+
className: cn("cnc-w-72 cnc-p-4", className, contentClassName),
|
|
6001
|
+
children: [
|
|
6002
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "cnc-mb-4 cnc-flex cnc-items-center cnc-justify-between", children: [
|
|
6003
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6004
|
+
"button",
|
|
6005
|
+
{
|
|
6006
|
+
type: "button",
|
|
6007
|
+
onClick: () => setViewYear((prev) => prev - 1),
|
|
6008
|
+
"aria-label": previousYearLabel,
|
|
6009
|
+
className: "cnc-rounded-full cnc-p-1 cnc-text-brand-gray-200 cnc-transition-colors hover:cnc-bg-brand-blue-50 hover:cnc-text-brand-blue-600",
|
|
6010
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChevronLeft, { className: "cnc-size-5" })
|
|
6011
|
+
}
|
|
6012
|
+
),
|
|
6013
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "cnc-text-base cnc-font-bold cnc-text-primary", children: viewYear }),
|
|
6014
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6015
|
+
"button",
|
|
6016
|
+
{
|
|
6017
|
+
type: "button",
|
|
6018
|
+
onClick: () => setViewYear((prev) => prev + 1),
|
|
6019
|
+
"aria-label": nextYearLabel,
|
|
6020
|
+
className: "cnc-rounded-full cnc-p-1 cnc-text-brand-gray-200 cnc-transition-colors hover:cnc-bg-brand-blue-50 hover:cnc-text-brand-blue-600",
|
|
6021
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChevronRight, { className: "cnc-size-5" })
|
|
6022
|
+
}
|
|
6023
|
+
)
|
|
6024
|
+
] }),
|
|
6025
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "cnc-grid cnc-grid-cols-3 cnc-gap-x-2 cnc-gap-y-1", children: MESES_PT_BR_ABREV.map((month, monthIndex) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6026
|
+
"button",
|
|
6027
|
+
{
|
|
6028
|
+
type: "button",
|
|
6029
|
+
onClick: () => handleMonthSelect(monthIndex),
|
|
6030
|
+
"aria-pressed": isSelectedMonth(monthIndex),
|
|
6031
|
+
className: cn(
|
|
6032
|
+
"cnc-rounded-lg cnc-py-2 cnc-text-[10px] cnc-font-bold cnc-uppercase cnc-transition-colors",
|
|
6033
|
+
isSelectedMonth(monthIndex) ? "cnc-bg-primary-800 cnc-text-white cnc-shadow-md" : "cnc-text-brand-gray-200 hover:cnc-bg-brand-blue-50 hover:cnc-text-primary"
|
|
6034
|
+
),
|
|
6035
|
+
children: month
|
|
6036
|
+
},
|
|
6037
|
+
month
|
|
6038
|
+
)) })
|
|
6039
|
+
]
|
|
6040
|
+
}
|
|
6041
|
+
)
|
|
6042
|
+
] });
|
|
6043
|
+
}
|
|
6044
|
+
|
|
6045
|
+
// src/components/organisms/period-range-list/index.tsx
|
|
6046
|
+
var React27 = __toESM(require("react"));
|
|
6047
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
6048
|
+
var DEFAULT_LABELS = {
|
|
6049
|
+
start: "In\xEDcio",
|
|
6050
|
+
end: "Fim",
|
|
6051
|
+
add: "Adicionar",
|
|
6052
|
+
empty: "Nenhum per\xEDodo adicionado.",
|
|
6053
|
+
startColumn: "In\xEDcio",
|
|
6054
|
+
endColumn: "Fim",
|
|
6055
|
+
actionsColumn: "A\xE7\xF5es"
|
|
6056
|
+
};
|
|
6057
|
+
function createPeriodId() {
|
|
6058
|
+
return `period-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
6059
|
+
}
|
|
6060
|
+
function normalizePeriods(periods) {
|
|
6061
|
+
return periods.map((period) => ({
|
|
6062
|
+
...period,
|
|
6063
|
+
id: period.id ?? createPeriodId()
|
|
6064
|
+
}));
|
|
6065
|
+
}
|
|
6066
|
+
function formatForDisplay(value, inputType) {
|
|
6067
|
+
if (!value) return "";
|
|
6068
|
+
if (inputType === "date") {
|
|
6069
|
+
const [year2, month2, day2] = value.split("-");
|
|
6070
|
+
if (year2 && month2 && day2) return `${day2}/${month2}/${year2}`;
|
|
6071
|
+
return value;
|
|
6072
|
+
}
|
|
6073
|
+
const normalized = value.slice(0, 16);
|
|
6074
|
+
const [datePart, timePart] = normalized.split("T");
|
|
6075
|
+
if (!datePart) return value;
|
|
6076
|
+
const [year, month, day] = datePart.split("-");
|
|
6077
|
+
const dateText = year && month && day ? `${day}/${month}/${year}` : datePart;
|
|
6078
|
+
return timePart ? `${dateText} ${timePart}` : dateText;
|
|
6079
|
+
}
|
|
6080
|
+
function splitDisplay(value, inputType) {
|
|
6081
|
+
const formatted = formatForDisplay(value, inputType);
|
|
6082
|
+
if (inputType === "date") {
|
|
6083
|
+
return { date: formatted, time: "" };
|
|
6084
|
+
}
|
|
6085
|
+
const parts = formatted.split(" ");
|
|
6086
|
+
if (parts.length <= 1) {
|
|
6087
|
+
return { date: formatted, time: "" };
|
|
6088
|
+
}
|
|
6089
|
+
const time = parts.pop() ?? "";
|
|
6090
|
+
return { date: parts.join(" "), time };
|
|
6091
|
+
}
|
|
6092
|
+
function PeriodRangeList({
|
|
6093
|
+
value = [],
|
|
6094
|
+
onChange,
|
|
6095
|
+
inputType = "datetime-local",
|
|
6096
|
+
labels: labelsProp,
|
|
6097
|
+
readOnly = false,
|
|
6098
|
+
disabled = false,
|
|
6099
|
+
required = false,
|
|
6100
|
+
error,
|
|
6101
|
+
validate,
|
|
6102
|
+
className
|
|
6103
|
+
}) {
|
|
6104
|
+
const labels = { ...DEFAULT_LABELS, ...labelsProp };
|
|
6105
|
+
const endAfterStart = validate?.endAfterStart ?? true;
|
|
6106
|
+
const noDuplicates = validate?.noDuplicates ?? true;
|
|
6107
|
+
const [startDraft, setStartDraft] = React27.useState("");
|
|
6108
|
+
const [endDraft, setEndDraft] = React27.useState("");
|
|
6109
|
+
const periods = React27.useMemo(() => normalizePeriods(value), [value]);
|
|
6110
|
+
const isInvalidRange = Boolean(startDraft && endDraft) && endAfterStart && startDraft >= endDraft;
|
|
6111
|
+
const isDuplicate = Boolean(startDraft && endDraft) && noDuplicates && periods.some(
|
|
6112
|
+
(period) => period.start === startDraft && period.end === endDraft
|
|
6113
|
+
);
|
|
6114
|
+
const canAdd = Boolean(startDraft && endDraft) && !isInvalidRange && !isDuplicate;
|
|
6115
|
+
const addTitle = isDuplicate ? "Este per\xEDodo j\xE1 foi adicionado" : isInvalidRange ? "A data final deve ser posterior \xE0 data inicial" : void 0;
|
|
6116
|
+
function emitChange(next) {
|
|
6117
|
+
onChange?.(normalizePeriods(next));
|
|
6118
|
+
}
|
|
6119
|
+
function handleAdd() {
|
|
6120
|
+
if (!canAdd || disabled || readOnly) return;
|
|
6121
|
+
emitChange([
|
|
6122
|
+
...periods,
|
|
6123
|
+
{
|
|
6124
|
+
id: createPeriodId(),
|
|
6125
|
+
start: startDraft,
|
|
6126
|
+
end: endDraft
|
|
6127
|
+
}
|
|
6128
|
+
]);
|
|
6129
|
+
setStartDraft("");
|
|
6130
|
+
setEndDraft("");
|
|
6131
|
+
}
|
|
6132
|
+
function handleRemove(id) {
|
|
6133
|
+
if (disabled || readOnly) return;
|
|
6134
|
+
emitChange(periods.filter((period) => period.id !== id));
|
|
6135
|
+
}
|
|
6136
|
+
const showRequiredOnInputs = required && periods.length === 0;
|
|
6137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: cn("cnc-w-full cnc-space-y-4", className), children: [
|
|
6138
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "cnc-grid cnc-grid-cols-1 md:cnc-grid-cols-12 cnc-gap-4 cnc-items-end", children: [
|
|
6139
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "md:cnc-col-span-5", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6140
|
+
Input,
|
|
6141
|
+
{
|
|
6142
|
+
type: inputType,
|
|
6143
|
+
label: labels.start,
|
|
6144
|
+
required: showRequiredOnInputs,
|
|
6145
|
+
value: startDraft,
|
|
6146
|
+
disabled,
|
|
6147
|
+
onChange: (event) => setStartDraft(event.target.value)
|
|
6148
|
+
}
|
|
6149
|
+
) }),
|
|
6150
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "md:cnc-col-span-5", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6151
|
+
Input,
|
|
6152
|
+
{
|
|
6153
|
+
type: inputType,
|
|
6154
|
+
label: labels.end,
|
|
6155
|
+
required: showRequiredOnInputs,
|
|
6156
|
+
value: endDraft,
|
|
6157
|
+
min: startDraft || void 0,
|
|
6158
|
+
disabled,
|
|
6159
|
+
onChange: (event) => setEndDraft(event.target.value)
|
|
6160
|
+
}
|
|
6161
|
+
) }),
|
|
6162
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "md:cnc-col-span-2", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
6163
|
+
Button,
|
|
6164
|
+
{
|
|
6165
|
+
type: "button",
|
|
6166
|
+
variant: "outline",
|
|
6167
|
+
className: "cnc-w-full cnc-gap-2",
|
|
6168
|
+
disabled: !canAdd || disabled,
|
|
6169
|
+
title: addTitle,
|
|
6170
|
+
onClick: handleAdd,
|
|
6171
|
+
children: [
|
|
6172
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Plus, { className: "cnc-h-4 cnc-w-4" }),
|
|
6173
|
+
labels.add
|
|
6174
|
+
]
|
|
6175
|
+
}
|
|
6176
|
+
) })
|
|
6177
|
+
] }),
|
|
6178
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "cnc-overflow-hidden cnc-rounded-lg cnc-border cnc-border-brand-gray-50 cnc-shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("table", { className: "cnc-min-w-full cnc-divide-y cnc-divide-brand-gray-50", children: [
|
|
6179
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("thead", { className: "cnc-bg-brand-gray-10", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("tr", { children: [
|
|
6180
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("th", { className: "cnc-px-6 cnc-py-3 cnc-text-left cnc-text-xs cnc-font-semibold cnc-uppercase cnc-tracking-wider cnc-text-brand-gray-600", children: labels.startColumn }),
|
|
6181
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("th", { className: "cnc-px-6 cnc-py-3 cnc-text-left cnc-text-xs cnc-font-semibold cnc-uppercase cnc-tracking-wider cnc-text-brand-gray-600", children: labels.endColumn }),
|
|
6182
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("th", { className: "cnc-px-6 cnc-py-3 cnc-text-right cnc-text-xs cnc-font-semibold cnc-uppercase cnc-tracking-wider cnc-text-brand-gray-600", children: labels.actionsColumn })
|
|
6183
|
+
] }) }),
|
|
6184
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("tbody", { className: "cnc-divide-y cnc-divide-brand-gray-50 cnc-bg-white cnc-text-sm", children: [
|
|
6185
|
+
periods.map((period) => {
|
|
6186
|
+
const startDisplay = splitDisplay(period.start, inputType);
|
|
6187
|
+
const endDisplay = splitDisplay(period.end, inputType);
|
|
6188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("tr", { className: "hover:cnc-bg-brand-gray-10/50", children: [
|
|
6189
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("td", { className: "cnc-px-6 cnc-py-4 cnc-text-brand-gray-600", children: [
|
|
6190
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "cnc-font-medium cnc-text-brand-gray-600", children: startDisplay.date }),
|
|
6191
|
+
startDisplay.time ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "cnc-ml-2 cnc-text-brand-gray-200", children: startDisplay.time }) : null
|
|
6192
|
+
] }),
|
|
6193
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("td", { className: "cnc-px-6 cnc-py-4 cnc-text-brand-gray-600", children: [
|
|
6194
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "cnc-font-medium cnc-text-brand-gray-600", children: endDisplay.date }),
|
|
6195
|
+
endDisplay.time ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "cnc-ml-2 cnc-text-brand-gray-200", children: endDisplay.time }) : null
|
|
6196
|
+
] }),
|
|
6197
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "cnc-px-6 cnc-py-4 cnc-text-right", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6198
|
+
"button",
|
|
6199
|
+
{
|
|
6200
|
+
type: "button",
|
|
6201
|
+
className: "cnc-text-brand-gray-200 hover:cnc-text-brand-red-500 cnc-transition-colors disabled:cnc-opacity-50",
|
|
6202
|
+
disabled,
|
|
6203
|
+
"aria-label": "Remover per\xEDodo",
|
|
6204
|
+
onClick: () => handleRemove(period.id),
|
|
6205
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Trash2, { className: "cnc-h-5 cnc-w-5" })
|
|
6206
|
+
}
|
|
6207
|
+
) })
|
|
6208
|
+
] }, period.id);
|
|
6209
|
+
}),
|
|
6210
|
+
periods.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6211
|
+
"td",
|
|
6212
|
+
{
|
|
6213
|
+
colSpan: readOnly ? 2 : 3,
|
|
6214
|
+
className: "cnc-px-6 cnc-py-8 cnc-text-center cnc-text-brand-gray-200 cnc-italic",
|
|
6215
|
+
children: labels.empty
|
|
6216
|
+
}
|
|
6217
|
+
) })
|
|
6218
|
+
] })
|
|
6219
|
+
] }) }),
|
|
6220
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "cnc-text-xs cnc-font-medium cnc-text-brand-red-500", children: error }) : null
|
|
6221
|
+
] });
|
|
6222
|
+
}
|
|
6223
|
+
var DateTimeRangeList = PeriodRangeList;
|
|
6224
|
+
|
|
4798
6225
|
// src/components/organisms/header-notifications/index.tsx
|
|
4799
|
-
var
|
|
6226
|
+
var React29 = __toESM(require("react"));
|
|
4800
6227
|
|
|
4801
6228
|
// src/components/organisms/header-notifications/cliente.ts
|
|
4802
6229
|
var URL_PADRAO_NOTIFICACOES = "https://dev-apinotificacoes-b5feekb4bdfyb7c2.eastus2-01.azurewebsites.net/v1";
|
|
@@ -4991,7 +6418,7 @@ function mapearParaItem(notificacao, getHref, agora) {
|
|
|
4991
6418
|
}
|
|
4992
6419
|
|
|
4993
6420
|
// src/components/organisms/header-notifications/modal-lembretes.tsx
|
|
4994
|
-
var
|
|
6421
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
4995
6422
|
function ModalLembretes({
|
|
4996
6423
|
lembretes,
|
|
4997
6424
|
aberto,
|
|
@@ -5001,46 +6428,46 @@ function ModalLembretes({
|
|
|
5001
6428
|
}) {
|
|
5002
6429
|
const visivel = aberto && lembretes.length > 0;
|
|
5003
6430
|
const tituloExibido = titulo ?? (lembretes.length === 1 ? "Voc\xEA tem um lembrete" : "Voc\xEA tem lembretes");
|
|
5004
|
-
return /* @__PURE__ */ (0,
|
|
6431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5005
6432
|
Dialog,
|
|
5006
6433
|
{
|
|
5007
6434
|
open: visivel,
|
|
5008
6435
|
onOpenChange: (proximoEstado) => {
|
|
5009
6436
|
if (!proximoEstado) onDispensar();
|
|
5010
6437
|
},
|
|
5011
|
-
children: /* @__PURE__ */ (0,
|
|
6438
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
5012
6439
|
DialogContent,
|
|
5013
6440
|
{
|
|
5014
6441
|
className: "cnc-max-w-[440px] cnc-rounded-lg cnc-bg-white cnc-p-0",
|
|
5015
6442
|
onOpenAutoFocus: (evento) => evento.preventDefault(),
|
|
5016
6443
|
children: [
|
|
5017
|
-
/* @__PURE__ */ (0,
|
|
5018
|
-
/* @__PURE__ */ (0,
|
|
6444
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "cnc-flex cnc-items-center cnc-gap-3 cnc-border-b cnc-border-brand-gray-50 cnc-px-5 cnc-py-4", children: [
|
|
6445
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "cnc-flex cnc-h-9 cnc-w-9 cnc-shrink-0 cnc-items-center cnc-justify-center cnc-rounded-full cnc-bg-brand-blue-60", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5019
6446
|
BellRing,
|
|
5020
6447
|
{
|
|
5021
6448
|
className: "cnc-h-[18px] cnc-w-[18px] cnc-text-brand-blue-400",
|
|
5022
6449
|
"aria-hidden": "true"
|
|
5023
6450
|
}
|
|
5024
6451
|
) }),
|
|
5025
|
-
/* @__PURE__ */ (0,
|
|
6452
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DialogTitle, { className: "cnc-m-0 cnc-text-base cnc-font-extrabold cnc-text-brand-blue-900", children: tituloExibido })
|
|
5026
6453
|
] }),
|
|
5027
|
-
/* @__PURE__ */ (0,
|
|
6454
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("ul", { className: "cnc-m-0 cnc-max-h-[320px] cnc-list-none cnc-overflow-y-auto cnc-p-0", children: lembretes.map((lembrete) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
5028
6455
|
"li",
|
|
5029
6456
|
{
|
|
5030
6457
|
className: "cnc-flex cnc-flex-col cnc-gap-1 cnc-border-b cnc-border-brand-gray-50 cnc-px-5 cnc-py-4 last:cnc-border-b-0",
|
|
5031
6458
|
children: [
|
|
5032
|
-
/* @__PURE__ */ (0,
|
|
5033
|
-
/* @__PURE__ */ (0,
|
|
5034
|
-
/* @__PURE__ */ (0,
|
|
6459
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "cnc-flex cnc-items-baseline cnc-justify-between cnc-gap-3", children: [
|
|
6460
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "cnc-text-sm cnc-font-bold cnc-text-brand-blue-900", children: lembrete.titulo }),
|
|
6461
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "cnc-shrink-0 cnc-text-[11px] cnc-text-brand-gray-600", children: formatarDataRelativa(lembrete.dataLembrete) })
|
|
5035
6462
|
] }),
|
|
5036
|
-
lembrete.mensagem && /* @__PURE__ */ (0,
|
|
6463
|
+
lembrete.mensagem && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "cnc-text-xs cnc-leading-relaxed cnc-text-brand-gray-600", children: lembrete.mensagem })
|
|
5037
6464
|
]
|
|
5038
6465
|
},
|
|
5039
6466
|
lembrete.id
|
|
5040
6467
|
)) }),
|
|
5041
|
-
/* @__PURE__ */ (0,
|
|
5042
|
-
/* @__PURE__ */ (0,
|
|
5043
|
-
/* @__PURE__ */ (0,
|
|
6468
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "cnc-flex cnc-flex-col cnc-gap-2 cnc-border-t cnc-border-brand-gray-50 cnc-px-5 cnc-py-4", children: [
|
|
6469
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Button, { variant: "confirm", className: "cnc-w-full", onClick: onDispensar, children: rotuloDispensar }),
|
|
6470
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "cnc-m-0 cnc-text-center cnc-text-[11px] cnc-text-brand-gray-600", children: lembretes.length === 1 ? "Ao fechar, este lembrete \xE9 marcado como lido." : `Ao fechar, os ${lembretes.length} lembretes s\xE3o marcados como lidos.` })
|
|
5044
6471
|
] })
|
|
5045
6472
|
]
|
|
5046
6473
|
}
|
|
@@ -5050,7 +6477,7 @@ function ModalLembretes({
|
|
|
5050
6477
|
}
|
|
5051
6478
|
|
|
5052
6479
|
// src/components/organisms/header-notifications/usar-notificacoes.ts
|
|
5053
|
-
var
|
|
6480
|
+
var React28 = __toESM(require("react"));
|
|
5054
6481
|
function foiAbortado(erro) {
|
|
5055
6482
|
return erro?.name === "AbortError";
|
|
5056
6483
|
}
|
|
@@ -5063,20 +6490,20 @@ function usarNotificacoes({
|
|
|
5063
6490
|
habilitado = true,
|
|
5064
6491
|
onErro
|
|
5065
6492
|
}) {
|
|
5066
|
-
const [notificacoes, setNotificacoes] =
|
|
5067
|
-
const [carregando, setCarregando] =
|
|
5068
|
-
const notificacoesRef =
|
|
5069
|
-
const controladorRef =
|
|
5070
|
-
const jaCarregouRef =
|
|
5071
|
-
const onErroRef =
|
|
5072
|
-
|
|
6493
|
+
const [notificacoes, setNotificacoes] = React28.useState([]);
|
|
6494
|
+
const [carregando, setCarregando] = React28.useState(habilitado);
|
|
6495
|
+
const notificacoesRef = React28.useRef(notificacoes);
|
|
6496
|
+
const controladorRef = React28.useRef(null);
|
|
6497
|
+
const jaCarregouRef = React28.useRef(false);
|
|
6498
|
+
const onErroRef = React28.useRef(onErro);
|
|
6499
|
+
React28.useEffect(() => {
|
|
5073
6500
|
notificacoesRef.current = notificacoes;
|
|
5074
6501
|
}, [notificacoes]);
|
|
5075
|
-
|
|
6502
|
+
React28.useEffect(() => {
|
|
5076
6503
|
onErroRef.current = onErro;
|
|
5077
6504
|
}, [onErro]);
|
|
5078
6505
|
const chaveFiltros = JSON.stringify(filtros ?? {});
|
|
5079
|
-
const atualizar =
|
|
6506
|
+
const atualizar = React28.useCallback(() => {
|
|
5080
6507
|
if (!habilitado) return;
|
|
5081
6508
|
controladorRef.current?.abort();
|
|
5082
6509
|
const controlador = new AbortController();
|
|
@@ -5103,7 +6530,7 @@ function usarNotificacoes({
|
|
|
5103
6530
|
}
|
|
5104
6531
|
})();
|
|
5105
6532
|
}, [baseUrl, email, sistema, chaveFiltros, habilitado]);
|
|
5106
|
-
|
|
6533
|
+
React28.useEffect(() => {
|
|
5107
6534
|
if (!habilitado) {
|
|
5108
6535
|
setCarregando(false);
|
|
5109
6536
|
return;
|
|
@@ -5112,7 +6539,7 @@ function usarNotificacoes({
|
|
|
5112
6539
|
atualizar();
|
|
5113
6540
|
return () => controladorRef.current?.abort();
|
|
5114
6541
|
}, [atualizar, habilitado]);
|
|
5115
|
-
|
|
6542
|
+
React28.useEffect(() => {
|
|
5116
6543
|
if (!habilitado || !intervaloAtualizacao) return;
|
|
5117
6544
|
const temporizador = window.setInterval(() => {
|
|
5118
6545
|
if (typeof document !== "undefined" && document.hidden) return;
|
|
@@ -5120,7 +6547,7 @@ function usarNotificacoes({
|
|
|
5120
6547
|
}, intervaloAtualizacao);
|
|
5121
6548
|
return () => window.clearInterval(temporizador);
|
|
5122
6549
|
}, [atualizar, habilitado, intervaloAtualizacao]);
|
|
5123
|
-
const aplicarLeitura =
|
|
6550
|
+
const aplicarLeitura = React28.useCallback((ids) => {
|
|
5124
6551
|
const alvos = new Set(ids.map(String));
|
|
5125
6552
|
setNotificacoes(
|
|
5126
6553
|
(atuais) => atuais.map(
|
|
@@ -5128,7 +6555,7 @@ function usarNotificacoes({
|
|
|
5128
6555
|
)
|
|
5129
6556
|
);
|
|
5130
6557
|
}, []);
|
|
5131
|
-
const reverterLeitura =
|
|
6558
|
+
const reverterLeitura = React28.useCallback((anteriores) => {
|
|
5132
6559
|
const original = new Map(
|
|
5133
6560
|
anteriores.map((notificacao) => [String(notificacao.id), notificacao])
|
|
5134
6561
|
);
|
|
@@ -5143,7 +6570,7 @@ function usarNotificacoes({
|
|
|
5143
6570
|
})
|
|
5144
6571
|
);
|
|
5145
6572
|
}, []);
|
|
5146
|
-
const marcarUmaComoLida =
|
|
6573
|
+
const marcarUmaComoLida = React28.useCallback(
|
|
5147
6574
|
(id) => {
|
|
5148
6575
|
const alvo = notificacoesRef.current.find(
|
|
5149
6576
|
(notificacao) => String(notificacao.id) === String(id)
|
|
@@ -5157,7 +6584,7 @@ function usarNotificacoes({
|
|
|
5157
6584
|
},
|
|
5158
6585
|
[baseUrl, aplicarLeitura, reverterLeitura]
|
|
5159
6586
|
);
|
|
5160
|
-
const marcarComoLidas =
|
|
6587
|
+
const marcarComoLidas = React28.useCallback(
|
|
5161
6588
|
(ids) => {
|
|
5162
6589
|
const alvos = new Set(ids.map(String));
|
|
5163
6590
|
const naoLidas = notificacoesRef.current.filter(
|
|
@@ -5175,10 +6602,10 @@ function usarNotificacoes({
|
|
|
5175
6602
|
},
|
|
5176
6603
|
[baseUrl, aplicarLeitura, reverterLeitura]
|
|
5177
6604
|
);
|
|
5178
|
-
const marcarTodasComoLidas =
|
|
6605
|
+
const marcarTodasComoLidas = React28.useCallback(() => {
|
|
5179
6606
|
marcarComoLidas(notificacoesRef.current.map((notificacao) => notificacao.id));
|
|
5180
6607
|
}, [marcarComoLidas]);
|
|
5181
|
-
const marcarUmaComoNaoLida =
|
|
6608
|
+
const marcarUmaComoNaoLida = React28.useCallback(
|
|
5182
6609
|
(id) => {
|
|
5183
6610
|
const alvo = notificacoesRef.current.find(
|
|
5184
6611
|
(notificacao) => String(notificacao.id) === String(id)
|
|
@@ -5196,7 +6623,7 @@ function usarNotificacoes({
|
|
|
5196
6623
|
},
|
|
5197
6624
|
[baseUrl, reverterLeitura]
|
|
5198
6625
|
);
|
|
5199
|
-
const excluir =
|
|
6626
|
+
const excluir = React28.useCallback(
|
|
5200
6627
|
(id) => {
|
|
5201
6628
|
const alvo = notificacoesRef.current.find(
|
|
5202
6629
|
(notificacao) => String(notificacao.id) === String(id)
|
|
@@ -5225,7 +6652,7 @@ function usarNotificacoes({
|
|
|
5225
6652
|
}
|
|
5226
6653
|
|
|
5227
6654
|
// src/components/organisms/header-notifications/index.tsx
|
|
5228
|
-
var
|
|
6655
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5229
6656
|
function HeaderNotifications(props) {
|
|
5230
6657
|
const {
|
|
5231
6658
|
items = [],
|
|
@@ -5257,11 +6684,11 @@ function HeaderNotifications(props) {
|
|
|
5257
6684
|
tituloLembretes,
|
|
5258
6685
|
rotuloDispensarLembretes
|
|
5259
6686
|
} = props;
|
|
5260
|
-
const [aberto, setAberto] =
|
|
5261
|
-
const [lembretesEmAlerta, setLembretesEmAlerta] =
|
|
6687
|
+
const [aberto, setAberto] = React29.useState(false);
|
|
6688
|
+
const [lembretesEmAlerta, setLembretesEmAlerta] = React29.useState(
|
|
5262
6689
|
[]
|
|
5263
6690
|
);
|
|
5264
|
-
const avaliouLembretesRef =
|
|
6691
|
+
const avaliouLembretesRef = React29.useRef(false);
|
|
5265
6692
|
const conectado = Boolean(email && sistema);
|
|
5266
6693
|
const remoto = usarNotificacoes({
|
|
5267
6694
|
email: email ?? "",
|
|
@@ -5272,17 +6699,17 @@ function HeaderNotifications(props) {
|
|
|
5272
6699
|
habilitado: conectado,
|
|
5273
6700
|
onErro
|
|
5274
6701
|
});
|
|
5275
|
-
const elegiveis =
|
|
6702
|
+
const elegiveis = React29.useMemo(
|
|
5276
6703
|
() => conectado ? selecionarVisiveis(remoto.notificacoes) : [],
|
|
5277
6704
|
[conectado, remoto.notificacoes]
|
|
5278
6705
|
);
|
|
5279
|
-
const itensRemotos =
|
|
6706
|
+
const itensRemotos = React29.useMemo(
|
|
5280
6707
|
() => elegiveis.slice(0, limite).map((notificacao) => mapearParaItem(notificacao, getHref)),
|
|
5281
6708
|
[elegiveis, limite, getHref]
|
|
5282
6709
|
);
|
|
5283
6710
|
const itens = conectado ? itensRemotos : items;
|
|
5284
6711
|
const carregandoLista = conectado ? remoto.carregando : isLoading;
|
|
5285
|
-
|
|
6712
|
+
React29.useEffect(() => {
|
|
5286
6713
|
if (!conectado || !alertarLembretes) return;
|
|
5287
6714
|
if (remoto.carregando || avaliouLembretesRef.current) return;
|
|
5288
6715
|
avaliouLembretesRef.current = true;
|
|
@@ -5332,28 +6759,28 @@ function HeaderNotifications(props) {
|
|
|
5332
6759
|
const anelDeFoco = "focus-visible:cnc-ring-2 focus-visible:cnc-ring-inset focus-visible:cnc-ring-brand-gray-500/50";
|
|
5333
6760
|
const renderarConteudo = () => {
|
|
5334
6761
|
if (carregandoLista) {
|
|
5335
|
-
return /* @__PURE__ */ (0,
|
|
6762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { "aria-busy": "true", children: Array.from({ length: skeletonCount }).map((_, indice) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5336
6763
|
"div",
|
|
5337
6764
|
{
|
|
5338
6765
|
className: "cnc-flex cnc-border-b cnc-border-l-[3px] cnc-border-brand-gray-50 cnc-border-l-transparent cnc-py-3 cnc-pl-3 cnc-pr-4 last:cnc-border-b-0",
|
|
5339
|
-
children: /* @__PURE__ */ (0,
|
|
5340
|
-
/* @__PURE__ */ (0,
|
|
5341
|
-
/* @__PURE__ */ (0,
|
|
6766
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "cnc-flex cnc-w-full cnc-flex-col cnc-gap-2", children: [
|
|
6767
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "cnc-h-3 cnc-w-1/2 cnc-animate-pulse cnc-rounded cnc-bg-brand-gray-20" }),
|
|
6768
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "cnc-h-3 cnc-w-3/4 cnc-animate-pulse cnc-rounded cnc-bg-brand-gray-20" })
|
|
5342
6769
|
] })
|
|
5343
6770
|
},
|
|
5344
6771
|
indice
|
|
5345
6772
|
)) });
|
|
5346
6773
|
}
|
|
5347
6774
|
if (itens.length === 0) {
|
|
5348
|
-
return /* @__PURE__ */ (0,
|
|
5349
|
-
/* @__PURE__ */ (0,
|
|
5350
|
-
/* @__PURE__ */ (0,
|
|
6775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "cnc-flex cnc-flex-col cnc-items-center cnc-justify-center cnc-px-4 cnc-py-12 cnc-text-brand-gray-200", children: [
|
|
6776
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(BellOff, { className: "cnc-mb-2 cnc-h-7 cnc-w-7", "aria-hidden": "true" }),
|
|
6777
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "cnc-text-sm", children: emptyMessage })
|
|
5351
6778
|
] });
|
|
5352
6779
|
}
|
|
5353
|
-
return /* @__PURE__ */ (0,
|
|
5354
|
-
const conteudo = /* @__PURE__ */ (0,
|
|
5355
|
-
/* @__PURE__ */ (0,
|
|
5356
|
-
/* @__PURE__ */ (0,
|
|
6780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("ul", { className: "cnc-m-0 cnc-list-none cnc-p-0", children: itens.map((item) => {
|
|
6781
|
+
const conteudo = /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "cnc-flex cnc-min-w-0 cnc-flex-1 cnc-flex-col cnc-gap-0.5", children: [
|
|
6782
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "cnc-flex cnc-items-baseline cnc-justify-between cnc-gap-2", children: [
|
|
6783
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5357
6784
|
"span",
|
|
5358
6785
|
{
|
|
5359
6786
|
className: cn(
|
|
@@ -5363,10 +6790,10 @@ function HeaderNotifications(props) {
|
|
|
5363
6790
|
children: item.title
|
|
5364
6791
|
}
|
|
5365
6792
|
),
|
|
5366
|
-
item.date && /* @__PURE__ */ (0,
|
|
6793
|
+
item.date && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "cnc-shrink-0 cnc-text-[11px] cnc-text-brand-gray-600", children: item.date })
|
|
5367
6794
|
] }),
|
|
5368
|
-
item.message && /* @__PURE__ */ (0,
|
|
5369
|
-
!item.read && /* @__PURE__ */ (0,
|
|
6795
|
+
item.message && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "cnc-line-clamp-2 cnc-text-xs cnc-text-brand-gray-600", children: item.message }),
|
|
6796
|
+
!item.read && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "cnc-sr-only", children: "N\xE3o lida" })
|
|
5370
6797
|
] });
|
|
5371
6798
|
const classesLinha = cn(
|
|
5372
6799
|
"cnc-flex cnc-w-full cnc-items-start cnc-border-l-[3px] cnc-transition cnc-duration-200",
|
|
@@ -5381,7 +6808,7 @@ function HeaderNotifications(props) {
|
|
|
5381
6808
|
"cnc-flex cnc-h-7 cnc-w-7 cnc-shrink-0 cnc-cursor-pointer cnc-items-center cnc-justify-center cnc-rounded cnc-border-0 cnc-bg-transparent cnc-p-0 cnc-text-brand-gray-200 cnc-outline-none cnc-transition cnc-duration-200 hover:cnc-bg-white",
|
|
5382
6809
|
anelDeFoco
|
|
5383
6810
|
);
|
|
5384
|
-
const renderarAlvo = () => alvoClicavel ? /* @__PURE__ */ (0,
|
|
6811
|
+
const renderarAlvo = () => alvoClicavel ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5385
6812
|
"button",
|
|
5386
6813
|
{
|
|
5387
6814
|
type: "button",
|
|
@@ -5389,16 +6816,16 @@ function HeaderNotifications(props) {
|
|
|
5389
6816
|
className: classesAlvo,
|
|
5390
6817
|
children: conteudo
|
|
5391
6818
|
}
|
|
5392
|
-
) : /* @__PURE__ */ (0,
|
|
6819
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: classesAlvo, children: conteudo });
|
|
5393
6820
|
const rotuloLeitura = item.read ? "Marcar como n\xE3o lida" : "Marcar como lida";
|
|
5394
|
-
return /* @__PURE__ */ (0,
|
|
6821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5395
6822
|
"li",
|
|
5396
6823
|
{
|
|
5397
6824
|
className: "cnc-border-b cnc-border-brand-gray-50 last:cnc-border-b-0",
|
|
5398
|
-
children: /* @__PURE__ */ (0,
|
|
6825
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: classesLinha, children: [
|
|
5399
6826
|
renderarAlvo(),
|
|
5400
|
-
(podeAlternarLeitura || podeExcluir) && /* @__PURE__ */ (0,
|
|
5401
|
-
podeAlternarLeitura && /* @__PURE__ */ (0,
|
|
6827
|
+
(podeAlternarLeitura || podeExcluir) && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "cnc-flex cnc-shrink-0 cnc-items-center cnc-gap-1 cnc-py-3 cnc-pr-2", children: [
|
|
6828
|
+
podeAlternarLeitura && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5402
6829
|
"button",
|
|
5403
6830
|
{
|
|
5404
6831
|
type: "button",
|
|
@@ -5409,7 +6836,7 @@ function HeaderNotifications(props) {
|
|
|
5409
6836
|
classesAcao,
|
|
5410
6837
|
"hover:cnc-text-brand-blue-400"
|
|
5411
6838
|
),
|
|
5412
|
-
children: item.read ? /* @__PURE__ */ (0,
|
|
6839
|
+
children: item.read ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Mail, { className: "cnc-h-4 cnc-w-4", "aria-hidden": "true" }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5413
6840
|
MailOpen,
|
|
5414
6841
|
{
|
|
5415
6842
|
className: "cnc-h-4 cnc-w-4",
|
|
@@ -5418,7 +6845,7 @@ function HeaderNotifications(props) {
|
|
|
5418
6845
|
)
|
|
5419
6846
|
}
|
|
5420
6847
|
),
|
|
5421
|
-
podeExcluir && /* @__PURE__ */ (0,
|
|
6848
|
+
podeExcluir && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5422
6849
|
"button",
|
|
5423
6850
|
{
|
|
5424
6851
|
type: "button",
|
|
@@ -5426,7 +6853,7 @@ function HeaderNotifications(props) {
|
|
|
5426
6853
|
title: "Excluir notifica\xE7\xE3o",
|
|
5427
6854
|
onClick: () => excluirItem(item),
|
|
5428
6855
|
className: cn(classesAcao, "hover:cnc-text-brand-red-600"),
|
|
5429
|
-
children: /* @__PURE__ */ (0,
|
|
6856
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Trash2, { className: "cnc-h-4 cnc-w-4", "aria-hidden": "true" })
|
|
5430
6857
|
}
|
|
5431
6858
|
)
|
|
5432
6859
|
] })
|
|
@@ -5437,8 +6864,8 @@ function HeaderNotifications(props) {
|
|
|
5437
6864
|
}) });
|
|
5438
6865
|
};
|
|
5439
6866
|
const temRodapePadrao = podeMarcarTodas && naoLidas > 0;
|
|
5440
|
-
return /* @__PURE__ */ (0,
|
|
5441
|
-
alertarLembretes && /* @__PURE__ */ (0,
|
|
6867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
6868
|
+
alertarLembretes && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5442
6869
|
ModalLembretes,
|
|
5443
6870
|
{
|
|
5444
6871
|
lembretes: lembretesEmAlerta,
|
|
@@ -5448,8 +6875,8 @@ function HeaderNotifications(props) {
|
|
|
5448
6875
|
rotuloDispensar: rotuloDispensarLembretes
|
|
5449
6876
|
}
|
|
5450
6877
|
),
|
|
5451
|
-
/* @__PURE__ */ (0,
|
|
5452
|
-
/* @__PURE__ */ (0,
|
|
6878
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Popover, { open: aberto, onOpenChange: alterarAbertura, children: [
|
|
6879
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
5453
6880
|
"button",
|
|
5454
6881
|
{
|
|
5455
6882
|
type: "button",
|
|
@@ -5460,14 +6887,14 @@ function HeaderNotifications(props) {
|
|
|
5460
6887
|
className
|
|
5461
6888
|
),
|
|
5462
6889
|
children: [
|
|
5463
|
-
/* @__PURE__ */ (0,
|
|
6890
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5464
6891
|
Bell,
|
|
5465
6892
|
{
|
|
5466
6893
|
className: "cnc-h-5 cnc-w-5 cnc-text-brand-blue-900 cnc-header-item",
|
|
5467
6894
|
"aria-hidden": "true"
|
|
5468
6895
|
}
|
|
5469
6896
|
),
|
|
5470
|
-
naoLidas > 0 && /* @__PURE__ */ (0,
|
|
6897
|
+
naoLidas > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5471
6898
|
"span",
|
|
5472
6899
|
{
|
|
5473
6900
|
"aria-hidden": "true",
|
|
@@ -5478,7 +6905,7 @@ function HeaderNotifications(props) {
|
|
|
5478
6905
|
]
|
|
5479
6906
|
}
|
|
5480
6907
|
) }),
|
|
5481
|
-
/* @__PURE__ */ (0,
|
|
6908
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
5482
6909
|
PopoverContent,
|
|
5483
6910
|
{
|
|
5484
6911
|
align,
|
|
@@ -5490,12 +6917,12 @@ function HeaderNotifications(props) {
|
|
|
5490
6917
|
contentClassName
|
|
5491
6918
|
),
|
|
5492
6919
|
children: [
|
|
5493
|
-
/* @__PURE__ */ (0,
|
|
5494
|
-
/* @__PURE__ */ (0,
|
|
5495
|
-
naoLidas > 0 && /* @__PURE__ */ (0,
|
|
6920
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "cnc-flex cnc-items-center cnc-justify-between cnc-gap-2 cnc-border-b cnc-border-brand-gray-50 cnc-px-4 cnc-py-3", children: [
|
|
6921
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h2", { className: "cnc-m-0 cnc-text-base cnc-font-extrabold cnc-text-brand-blue-900", children: title }),
|
|
6922
|
+
naoLidas > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "cnc-rounded-md cnc-bg-brand-blue-60 cnc-px-2 cnc-py-1 cnc-text-xs cnc-font-semibold cnc-text-brand-blue-400", children: naoLidas === 1 ? "1 nova" : `${naoLidas} novas` })
|
|
5496
6923
|
] }),
|
|
5497
|
-
/* @__PURE__ */ (0,
|
|
5498
|
-
footer ? /* @__PURE__ */ (0,
|
|
6924
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "cnc-max-h-[360px] cnc-overflow-y-auto", children: renderarConteudo() }),
|
|
6925
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "cnc-border-t cnc-border-brand-gray-50 cnc-px-4 cnc-py-3", children: footer }) : temRodapePadrao && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "cnc-flex cnc-justify-end cnc-border-t cnc-border-brand-gray-50 cnc-px-4 cnc-py-3", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5499
6926
|
"button",
|
|
5500
6927
|
{
|
|
5501
6928
|
type: "button",
|
|
@@ -5517,6 +6944,7 @@ function HeaderNotifications(props) {
|
|
|
5517
6944
|
0 && (module.exports = {
|
|
5518
6945
|
AplicationsHeader,
|
|
5519
6946
|
AppsMenu,
|
|
6947
|
+
Avatar,
|
|
5520
6948
|
Badge,
|
|
5521
6949
|
Button,
|
|
5522
6950
|
Card,
|
|
@@ -5539,6 +6967,9 @@ function HeaderNotifications(props) {
|
|
|
5539
6967
|
CommandList,
|
|
5540
6968
|
CommandSeparator,
|
|
5541
6969
|
CommandShortcut,
|
|
6970
|
+
ConfirmDialog,
|
|
6971
|
+
DIAS_SEMANA_PT_BR,
|
|
6972
|
+
DateTimeRangeList,
|
|
5542
6973
|
Dialog,
|
|
5543
6974
|
DialogClose,
|
|
5544
6975
|
DialogContent,
|
|
@@ -5549,6 +6980,19 @@ function HeaderNotifications(props) {
|
|
|
5549
6980
|
DialogPortal,
|
|
5550
6981
|
DialogTitle,
|
|
5551
6982
|
DialogTrigger,
|
|
6983
|
+
Drawer,
|
|
6984
|
+
DrawerBody,
|
|
6985
|
+
DrawerClose,
|
|
6986
|
+
DrawerContent,
|
|
6987
|
+
DrawerContext,
|
|
6988
|
+
DrawerDescription,
|
|
6989
|
+
DrawerFooter,
|
|
6990
|
+
DrawerHeader,
|
|
6991
|
+
DrawerOverlay,
|
|
6992
|
+
DrawerPortal,
|
|
6993
|
+
DrawerProvider,
|
|
6994
|
+
DrawerTitle,
|
|
6995
|
+
DrawerTrigger,
|
|
5552
6996
|
DropdownMenu,
|
|
5553
6997
|
DropdownMenuCheckboxItem,
|
|
5554
6998
|
DropdownMenuContent,
|
|
@@ -5564,7 +7008,10 @@ function HeaderNotifications(props) {
|
|
|
5564
7008
|
DropdownMenuSubContent,
|
|
5565
7009
|
DropdownMenuSubTrigger,
|
|
5566
7010
|
DropdownMenuTrigger,
|
|
7011
|
+
EmptyState,
|
|
5567
7012
|
ErroNotificacoes,
|
|
7013
|
+
FileList,
|
|
7014
|
+
FileUpload,
|
|
5568
7015
|
Filter,
|
|
5569
7016
|
Header,
|
|
5570
7017
|
HeaderContainer,
|
|
@@ -5572,16 +7019,24 @@ function HeaderNotifications(props) {
|
|
|
5572
7019
|
HeaderProfileHeader,
|
|
5573
7020
|
HeaderProfileItem,
|
|
5574
7021
|
Input,
|
|
7022
|
+
LabelValue,
|
|
7023
|
+
MESES_PT_BR,
|
|
7024
|
+
MESES_PT_BR_ABREV,
|
|
7025
|
+
MiniMonthCalendar,
|
|
5575
7026
|
Modal,
|
|
5576
7027
|
ModalEntidade,
|
|
5577
7028
|
ModalMudancaEntidade,
|
|
7029
|
+
MonthYearPicker,
|
|
7030
|
+
MultiSelect,
|
|
5578
7031
|
PageHeader,
|
|
5579
7032
|
PageHeaderActionsContainer,
|
|
5580
7033
|
PageHeaderTitle,
|
|
5581
7034
|
PageHeaderTitleContent,
|
|
7035
|
+
PeriodRangeList,
|
|
5582
7036
|
Popover,
|
|
5583
7037
|
PopoverContent,
|
|
5584
7038
|
PopoverTrigger,
|
|
7039
|
+
ResultMetadata,
|
|
5585
7040
|
Select,
|
|
5586
7041
|
SelectContent,
|
|
5587
7042
|
SelectGroup,
|
|
@@ -5604,10 +7059,22 @@ function HeaderNotifications(props) {
|
|
|
5604
7059
|
TabsContent,
|
|
5605
7060
|
TabsList,
|
|
5606
7061
|
TabsTrigger,
|
|
7062
|
+
Textarea,
|
|
5607
7063
|
Title,
|
|
7064
|
+
Tooltip,
|
|
5608
7065
|
URL_PADRAO_NOTIFICACOES,
|
|
5609
7066
|
availableApps,
|
|
5610
|
-
|
|
7067
|
+
buildMonthDays,
|
|
7068
|
+
buttonVariants,
|
|
7069
|
+
formatDayAriaLabel,
|
|
7070
|
+
formatFileSize,
|
|
7071
|
+
formatMonthYear,
|
|
7072
|
+
isSameDay,
|
|
7073
|
+
isToday,
|
|
7074
|
+
toDateKey,
|
|
7075
|
+
toLocalNoon,
|
|
7076
|
+
useDrawer,
|
|
7077
|
+
validateFiles
|
|
5611
7078
|
});
|
|
5612
7079
|
/*! Bundled license information:
|
|
5613
7080
|
|
|
@@ -5683,6 +7150,14 @@ lucide-react/dist/esm/icons/chevron-down.js:
|
|
|
5683
7150
|
* See the LICENSE file in the root directory of this source tree.
|
|
5684
7151
|
*)
|
|
5685
7152
|
|
|
7153
|
+
lucide-react/dist/esm/icons/chevron-left.js:
|
|
7154
|
+
(**
|
|
7155
|
+
* @license lucide-react v0.453.0 - ISC
|
|
7156
|
+
*
|
|
7157
|
+
* This source code is licensed under the ISC license.
|
|
7158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7159
|
+
*)
|
|
7160
|
+
|
|
5686
7161
|
lucide-react/dist/esm/icons/chevron-right.js:
|
|
5687
7162
|
(**
|
|
5688
7163
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -5715,6 +7190,30 @@ lucide-react/dist/esm/icons/circle.js:
|
|
|
5715
7190
|
* See the LICENSE file in the root directory of this source tree.
|
|
5716
7191
|
*)
|
|
5717
7192
|
|
|
7193
|
+
lucide-react/dist/esm/icons/download.js:
|
|
7194
|
+
(**
|
|
7195
|
+
* @license lucide-react v0.453.0 - ISC
|
|
7196
|
+
*
|
|
7197
|
+
* This source code is licensed under the ISC license.
|
|
7198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7199
|
+
*)
|
|
7200
|
+
|
|
7201
|
+
lucide-react/dist/esm/icons/external-link.js:
|
|
7202
|
+
(**
|
|
7203
|
+
* @license lucide-react v0.453.0 - ISC
|
|
7204
|
+
*
|
|
7205
|
+
* This source code is licensed under the ISC license.
|
|
7206
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7207
|
+
*)
|
|
7208
|
+
|
|
7209
|
+
lucide-react/dist/esm/icons/file-text.js:
|
|
7210
|
+
(**
|
|
7211
|
+
* @license lucide-react v0.453.0 - ISC
|
|
7212
|
+
*
|
|
7213
|
+
* This source code is licensed under the ISC license.
|
|
7214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7215
|
+
*)
|
|
7216
|
+
|
|
5718
7217
|
lucide-react/dist/esm/icons/filter-x.js:
|
|
5719
7218
|
(**
|
|
5720
7219
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -5763,6 +7262,22 @@ lucide-react/dist/esm/icons/mail.js:
|
|
|
5763
7262
|
* See the LICENSE file in the root directory of this source tree.
|
|
5764
7263
|
*)
|
|
5765
7264
|
|
|
7265
|
+
lucide-react/dist/esm/icons/paperclip.js:
|
|
7266
|
+
(**
|
|
7267
|
+
* @license lucide-react v0.453.0 - ISC
|
|
7268
|
+
*
|
|
7269
|
+
* This source code is licensed under the ISC license.
|
|
7270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7271
|
+
*)
|
|
7272
|
+
|
|
7273
|
+
lucide-react/dist/esm/icons/plus.js:
|
|
7274
|
+
(**
|
|
7275
|
+
* @license lucide-react v0.453.0 - ISC
|
|
7276
|
+
*
|
|
7277
|
+
* This source code is licensed under the ISC license.
|
|
7278
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7279
|
+
*)
|
|
7280
|
+
|
|
5766
7281
|
lucide-react/dist/esm/icons/search.js:
|
|
5767
7282
|
(**
|
|
5768
7283
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -5779,6 +7294,14 @@ lucide-react/dist/esm/icons/trash-2.js:
|
|
|
5779
7294
|
* See the LICENSE file in the root directory of this source tree.
|
|
5780
7295
|
*)
|
|
5781
7296
|
|
|
7297
|
+
lucide-react/dist/esm/icons/user.js:
|
|
7298
|
+
(**
|
|
7299
|
+
* @license lucide-react v0.453.0 - ISC
|
|
7300
|
+
*
|
|
7301
|
+
* This source code is licensed under the ISC license.
|
|
7302
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7303
|
+
*)
|
|
7304
|
+
|
|
5782
7305
|
lucide-react/dist/esm/icons/x.js:
|
|
5783
7306
|
(**
|
|
5784
7307
|
* @license lucide-react v0.453.0 - ISC
|