@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.mjs CHANGED
@@ -1,8 +1,4 @@
1
-
2
- if (typeof window !== 'undefined') {
3
- "use client";
4
- }
5
-
1
+ "use client";
6
2
 
7
3
  // src/components/Button/index.tsx
8
4
  import { Slot } from "@radix-ui/react-slot";
@@ -165,6 +161,11 @@ var ChevronDown = createLucideIcon("ChevronDown", [
165
161
  ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
166
162
  ]);
167
163
 
164
+ // ../../node_modules/lucide-react/dist/esm/icons/chevron-left.js
165
+ var ChevronLeft = createLucideIcon("ChevronLeft", [
166
+ ["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]
167
+ ]);
168
+
168
169
  // ../../node_modules/lucide-react/dist/esm/icons/chevron-right.js
169
170
  var ChevronRight = createLucideIcon("ChevronRight", [
170
171
  ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
@@ -184,6 +185,29 @@ var Circle = createLucideIcon("Circle", [
184
185
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
185
186
  ]);
186
187
 
188
+ // ../../node_modules/lucide-react/dist/esm/icons/download.js
189
+ var Download = createLucideIcon("Download", [
190
+ ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
191
+ ["polyline", { points: "7 10 12 15 17 10", key: "2ggqvy" }],
192
+ ["line", { x1: "12", x2: "12", y1: "15", y2: "3", key: "1vk2je" }]
193
+ ]);
194
+
195
+ // ../../node_modules/lucide-react/dist/esm/icons/external-link.js
196
+ var ExternalLink = createLucideIcon("ExternalLink", [
197
+ ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
198
+ ["path", { d: "M10 14 21 3", key: "gplh6r" }],
199
+ ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
200
+ ]);
201
+
202
+ // ../../node_modules/lucide-react/dist/esm/icons/file-text.js
203
+ var FileText = createLucideIcon("FileText", [
204
+ ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
205
+ ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
206
+ ["path", { d: "M10 9H8", key: "b1mrlr" }],
207
+ ["path", { d: "M16 13H8", key: "t4e002" }],
208
+ ["path", { d: "M16 17H8", key: "z1uh3a" }]
209
+ ]);
210
+
187
211
  // ../../node_modules/lucide-react/dist/esm/icons/filter-x.js
188
212
  var FilterX = createLucideIcon("FilterX", [
189
213
  ["path", { d: "M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055", key: "1fi1da" }],
@@ -232,6 +256,23 @@ var Mail = createLucideIcon("Mail", [
232
256
  ["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7", key: "1ocrg3" }]
233
257
  ]);
234
258
 
259
+ // ../../node_modules/lucide-react/dist/esm/icons/paperclip.js
260
+ var Paperclip = createLucideIcon("Paperclip", [
261
+ [
262
+ "path",
263
+ {
264
+ 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",
265
+ key: "1u3ebp"
266
+ }
267
+ ]
268
+ ]);
269
+
270
+ // ../../node_modules/lucide-react/dist/esm/icons/plus.js
271
+ var Plus = createLucideIcon("Plus", [
272
+ ["path", { d: "M5 12h14", key: "1ays0h" }],
273
+ ["path", { d: "M12 5v14", key: "s699le" }]
274
+ ]);
275
+
235
276
  // ../../node_modules/lucide-react/dist/esm/icons/search.js
236
277
  var Search = createLucideIcon("Search", [
237
278
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
@@ -247,6 +288,12 @@ var Trash2 = createLucideIcon("Trash2", [
247
288
  ["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
248
289
  ]);
249
290
 
291
+ // ../../node_modules/lucide-react/dist/esm/icons/user.js
292
+ var User = createLucideIcon("User", [
293
+ ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
294
+ ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
295
+ ]);
296
+
250
297
  // ../../node_modules/lucide-react/dist/esm/icons/x.js
251
298
  var X = createLucideIcon("X", [
252
299
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
@@ -3837,15 +3884,53 @@ var Input = React9.forwardRef(
3837
3884
  );
3838
3885
  Input.displayName = "Input";
3839
3886
 
3840
- // src/components/atoms/forms/checkbox.tsx
3887
+ // src/components/atoms/forms/textarea.tsx
3841
3888
  import * as React10 from "react";
3842
3889
  import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
3843
- var Checkbox = React10.forwardRef(
3890
+ var Textarea = React10.forwardRef(
3891
+ ({ className, id, label, required, ...props }, ref) => {
3892
+ const idGenerate = id ? id : label && `field-${Date.now()}-${Math.random() * 1e5}`;
3893
+ return /* @__PURE__ */ jsxs12("div", { className: "cnc-w-full", children: [
3894
+ label && /* @__PURE__ */ jsxs12(
3895
+ "label",
3896
+ {
3897
+ htmlFor: idGenerate,
3898
+ className: "cnc-block cnc-text-sm cnc-mb-1 cnc-font-medium cnc-text-brand-gray-600",
3899
+ children: [
3900
+ label,
3901
+ required && /* @__PURE__ */ jsx14("span", { className: "text-red-500", children: " *" })
3902
+ ]
3903
+ }
3904
+ ),
3905
+ /* @__PURE__ */ jsx14(
3906
+ "textarea",
3907
+ {
3908
+ id: idGenerate,
3909
+ className: cn(
3910
+ "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",
3911
+ "placeholder:cnc-text-muted-foreground focus-visible:cnc-outline-none",
3912
+ "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",
3913
+ "not-disabled:hover:cnc-border-brand-gray-500",
3914
+ className
3915
+ ),
3916
+ ref,
3917
+ ...props
3918
+ }
3919
+ )
3920
+ ] });
3921
+ }
3922
+ );
3923
+ Textarea.displayName = "Textarea";
3924
+
3925
+ // src/components/atoms/forms/checkbox.tsx
3926
+ import * as React11 from "react";
3927
+ import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
3928
+ var Checkbox = React11.forwardRef(
3844
3929
  ({ className, id, label, ...props }, ref) => {
3845
3930
  console.log();
3846
3931
  const idGenerate = id ? id : label && `field-${Date.now()}-${Math.random() * 1e5}`;
3847
- return /* @__PURE__ */ jsxs12("div", { className: "cnc-w-full cnc-flex cnc-flex-row", children: [
3848
- /* @__PURE__ */ jsx14(
3932
+ return /* @__PURE__ */ jsxs13("div", { className: "cnc-w-full cnc-flex cnc-flex-row", children: [
3933
+ /* @__PURE__ */ jsx15(
3849
3934
  "input",
3850
3935
  {
3851
3936
  type: "checkbox",
@@ -3855,7 +3940,7 @@ var Checkbox = React10.forwardRef(
3855
3940
  ...props
3856
3941
  }
3857
3942
  ),
3858
- label && /* @__PURE__ */ jsx14(
3943
+ label && /* @__PURE__ */ jsx15(
3859
3944
  "label",
3860
3945
  {
3861
3946
  htmlFor: idGenerate,
@@ -3869,9 +3954,9 @@ var Checkbox = React10.forwardRef(
3869
3954
  Checkbox.displayName = "Checkbox";
3870
3955
 
3871
3956
  // src/components/atoms/forms/switch.tsx
3872
- import * as React11 from "react";
3873
- import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
3874
- var Switch = React11.forwardRef(
3957
+ import * as React12 from "react";
3958
+ import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
3959
+ var Switch = React12.forwardRef(
3875
3960
  ({
3876
3961
  className,
3877
3962
  id,
@@ -3885,12 +3970,12 @@ var Switch = React11.forwardRef(
3885
3970
  name,
3886
3971
  "aria-label": ariaLabel
3887
3972
  }, ref) => {
3888
- const [internalChecked, setInternalChecked] = React11.useState(
3973
+ const [internalChecked, setInternalChecked] = React12.useState(
3889
3974
  defaultChecked ?? false
3890
3975
  );
3891
3976
  const isControlled = checked !== void 0;
3892
3977
  const isChecked = isControlled ? checked : internalChecked;
3893
- const reactId = React11.useId();
3978
+ const reactId = React12.useId();
3894
3979
  const fieldId = id || reactId;
3895
3980
  const handleToggle = () => {
3896
3981
  if (disabled) return;
@@ -3900,8 +3985,8 @@ var Switch = React11.forwardRef(
3900
3985
  }
3901
3986
  onChange?.(newValue);
3902
3987
  };
3903
- return /* @__PURE__ */ jsxs13("div", { className: cn("cnc-flex cnc-items-center cnc-gap-2", className), children: [
3904
- /* @__PURE__ */ jsx15(
3988
+ return /* @__PURE__ */ jsxs14("div", { className: cn("cnc-flex cnc-items-center cnc-gap-2", className), children: [
3989
+ /* @__PURE__ */ jsx16(
3905
3990
  "input",
3906
3991
  {
3907
3992
  type: "checkbox",
@@ -3913,7 +3998,7 @@ var Switch = React11.forwardRef(
3913
3998
  "aria-hidden": "true"
3914
3999
  }
3915
4000
  ),
3916
- /* @__PURE__ */ jsx15(
4001
+ /* @__PURE__ */ jsx16(
3917
4002
  "button",
3918
4003
  {
3919
4004
  ref,
@@ -3931,7 +4016,7 @@ var Switch = React11.forwardRef(
3931
4016
  "disabled:cnc-cursor-not-allowed disabled:cnc-opacity-50",
3932
4017
  isChecked ? "cnc-bg-brand-blue-400 cnc-border-brand-blue-500" : "cnc-bg-brand-gray-20 cnc-border-brand-gray-100"
3933
4018
  ),
3934
- children: /* @__PURE__ */ jsx15(
4019
+ children: /* @__PURE__ */ jsx16(
3935
4020
  "span",
3936
4021
  {
3937
4022
  className: cn(
@@ -3942,14 +4027,14 @@ var Switch = React11.forwardRef(
3942
4027
  )
3943
4028
  }
3944
4029
  ),
3945
- label && /* @__PURE__ */ jsxs13(
4030
+ label && /* @__PURE__ */ jsxs14(
3946
4031
  "label",
3947
4032
  {
3948
4033
  htmlFor: fieldId,
3949
4034
  className: "cnc-text-sm cnc-font-medium cnc-text-brand-gray-600 cnc-cursor-pointer",
3950
4035
  children: [
3951
4036
  label,
3952
- required && /* @__PURE__ */ jsx15("span", { className: "cnc-text-red-500", children: " *" })
4037
+ required && /* @__PURE__ */ jsx16("span", { className: "cnc-text-red-500", children: " *" })
3953
4038
  ]
3954
4039
  }
3955
4040
  )
@@ -3959,7 +4044,7 @@ var Switch = React11.forwardRef(
3959
4044
  Switch.displayName = "Switch";
3960
4045
 
3961
4046
  // src/components/atoms/display/badge.tsx
3962
- import { jsx as jsx16 } from "react/jsx-runtime";
4047
+ import { jsx as jsx17 } from "react/jsx-runtime";
3963
4048
  var Badge = ({
3964
4049
  variant = "default",
3965
4050
  rounded = true,
@@ -3981,7 +4066,7 @@ var Badge = ({
3981
4066
  md: "cnc-text-sm cnc-px-3 cnc-py-1",
3982
4067
  lg: "cnc-text-base cnc-px-4 cnc-py-2"
3983
4068
  };
3984
- return /* @__PURE__ */ jsx16(
4069
+ return /* @__PURE__ */ jsx17(
3985
4070
  "span",
3986
4071
  {
3987
4072
  className: cn(
@@ -3996,13 +4081,73 @@ var Badge = ({
3996
4081
  );
3997
4082
  };
3998
4083
 
4084
+ // src/components/atoms/display/avatar.tsx
4085
+ import * as React13 from "react";
4086
+ import { jsx as jsx18 } from "react/jsx-runtime";
4087
+ var avatarSizeClasses = {
4088
+ sm: "cnc-size-8 cnc-text-[10px]",
4089
+ md: "cnc-size-12 cnc-text-xs",
4090
+ lg: "cnc-size-16 cnc-text-sm",
4091
+ xl: "cnc-size-24 cnc-text-xl"
4092
+ };
4093
+ var avatarSizeIcon = {
4094
+ sm: 16,
4095
+ md: 20,
4096
+ lg: 28,
4097
+ xl: 40
4098
+ };
4099
+ function Avatar({
4100
+ src,
4101
+ alt,
4102
+ fallback,
4103
+ size = "md",
4104
+ isLoading = false,
4105
+ className,
4106
+ ...props
4107
+ }) {
4108
+ const [hasError, setHasError] = React13.useState(false);
4109
+ const baseClasses = cn(
4110
+ "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",
4111
+ avatarSizeClasses[size],
4112
+ className
4113
+ );
4114
+ if (isLoading) {
4115
+ return /* @__PURE__ */ jsx18(
4116
+ "span",
4117
+ {
4118
+ className: cn(baseClasses, "cnc-animate-pulse cnc-bg-brand-gray-50"),
4119
+ role: "status",
4120
+ "aria-label": "Carregando avatar",
4121
+ ...props
4122
+ }
4123
+ );
4124
+ }
4125
+ const showImage = src && !hasError;
4126
+ return /* @__PURE__ */ jsx18("span", { className: baseClasses, ...props, children: showImage ? /* @__PURE__ */ jsx18(
4127
+ "img",
4128
+ {
4129
+ src,
4130
+ alt: alt ?? "Avatar",
4131
+ className: "cnc-h-full cnc-w-full cnc-object-cover",
4132
+ onError: () => setHasError(true)
4133
+ }
4134
+ ) : fallback ? /* @__PURE__ */ jsx18("span", { className: "cnc-font-bold", children: fallback }) : /* @__PURE__ */ jsx18(
4135
+ User,
4136
+ {
4137
+ className: "cnc-shrink-0",
4138
+ size: avatarSizeIcon[size],
4139
+ "aria-hidden": "true"
4140
+ }
4141
+ ) });
4142
+ }
4143
+
3999
4144
  // src/components/molecules/card.tsx
4000
- import { jsx as jsx17 } from "react/jsx-runtime";
4145
+ import { jsx as jsx19 } from "react/jsx-runtime";
4001
4146
  function Card({
4002
4147
  className,
4003
4148
  ...rest
4004
4149
  }) {
4005
- return /* @__PURE__ */ jsx17(
4150
+ return /* @__PURE__ */ jsx19(
4006
4151
  "div",
4007
4152
  {
4008
4153
  className: cn(
@@ -4017,7 +4162,7 @@ function CardHeader({
4017
4162
  className,
4018
4163
  ...rest
4019
4164
  }) {
4020
- return /* @__PURE__ */ jsx17("div", { className: "cnc-px-6 cnc-pt-6", children: /* @__PURE__ */ jsx17(
4165
+ return /* @__PURE__ */ jsx19("div", { className: "cnc-px-6 cnc-pt-6", children: /* @__PURE__ */ jsx19(
4021
4166
  "div",
4022
4167
  {
4023
4168
  className: cn(
@@ -4032,13 +4177,13 @@ function CardContent({
4032
4177
  className,
4033
4178
  ...rest
4034
4179
  }) {
4035
- return /* @__PURE__ */ jsx17("div", { className: cn("cnc-px-6 cnc-py-2", className), ...rest });
4180
+ return /* @__PURE__ */ jsx19("div", { className: cn("cnc-px-6 cnc-py-2", className), ...rest });
4036
4181
  }
4037
4182
  function CardFooter({
4038
4183
  className,
4039
4184
  ...rest
4040
4185
  }) {
4041
- return /* @__PURE__ */ jsx17(
4186
+ return /* @__PURE__ */ jsx19(
4042
4187
  "div",
4043
4188
  {
4044
4189
  className: cn(
@@ -4053,7 +4198,7 @@ function CardFooterItem({
4053
4198
  className,
4054
4199
  ...rest
4055
4200
  }) {
4056
- return /* @__PURE__ */ jsx17(
4201
+ return /* @__PURE__ */ jsx19(
4057
4202
  "div",
4058
4203
  {
4059
4204
  className: cn(
@@ -4067,7 +4212,7 @@ function CardFooterItem({
4067
4212
 
4068
4213
  // src/components/molecules/collapsible.tsx
4069
4214
  import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
4070
- import { jsx as jsx18 } from "react/jsx-runtime";
4215
+ import { jsx as jsx20 } from "react/jsx-runtime";
4071
4216
  var Collapsible = CollapsiblePrimitive.Root;
4072
4217
  var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
4073
4218
  var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
@@ -4075,16 +4220,16 @@ var AnimatedCollapsibleContent = ({
4075
4220
  className,
4076
4221
  ...rest
4077
4222
  }) => {
4078
- return /* @__PURE__ */ jsx18(CollapsibleContent2, { className: "cnc-collapsible-content", ...rest });
4223
+ return /* @__PURE__ */ jsx20(CollapsibleContent2, { className: "cnc-collapsible-content", ...rest });
4079
4224
  };
4080
4225
 
4081
4226
  // src/components/molecules/display/page-header.tsx
4082
- import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
4227
+ import { jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
4083
4228
  function PageHeader({
4084
4229
  children,
4085
4230
  className
4086
4231
  }) {
4087
- return /* @__PURE__ */ jsx19(
4232
+ return /* @__PURE__ */ jsx21(
4088
4233
  "header",
4089
4234
  {
4090
4235
  className: cn(
@@ -4099,7 +4244,7 @@ function PageHeaderTitleContent({
4099
4244
  children,
4100
4245
  className
4101
4246
  }) {
4102
- return /* @__PURE__ */ jsx19(
4247
+ return /* @__PURE__ */ jsx21(
4103
4248
  "div",
4104
4249
  {
4105
4250
  className: cn(
@@ -4116,16 +4261,16 @@ function PageHeaderTitle({
4116
4261
  titleAs = "h1"
4117
4262
  }) {
4118
4263
  const ComponentTitle = titleAs;
4119
- return /* @__PURE__ */ jsxs14("div", { children: [
4120
- /* @__PURE__ */ jsx19(ComponentTitle, { className: "cnc-text-2xl cnc-font-semibold cnc-text-brand-blue-600", children: title }),
4121
- description && /* @__PURE__ */ jsx19("p", { className: "cnc-text-sm cnc-text-brand-gray-500", children: description })
4264
+ return /* @__PURE__ */ jsxs15("div", { children: [
4265
+ /* @__PURE__ */ jsx21(ComponentTitle, { className: "cnc-text-2xl cnc-font-semibold cnc-text-brand-blue-600", children: title }),
4266
+ description && /* @__PURE__ */ jsx21("p", { className: "cnc-text-sm cnc-text-brand-gray-500", children: description })
4122
4267
  ] });
4123
4268
  }
4124
4269
  function PageHeaderActionsContainer({
4125
4270
  children,
4126
4271
  className
4127
4272
  }) {
4128
- return /* @__PURE__ */ jsx19(
4273
+ return /* @__PURE__ */ jsx21(
4129
4274
  "div",
4130
4275
  {
4131
4276
  className: cn(
@@ -4137,17 +4282,151 @@ function PageHeaderActionsContainer({
4137
4282
  );
4138
4283
  }
4139
4284
  function Title2({ title, as: Component = "h1" }) {
4140
- return /* @__PURE__ */ jsx19(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 });
4285
+ return /* @__PURE__ */ jsx21(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 });
4286
+ }
4287
+
4288
+ // src/components/molecules/display/empty-state.tsx
4289
+ import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
4290
+ function EmptyState({
4291
+ icon,
4292
+ title,
4293
+ description,
4294
+ action,
4295
+ minHeight = "cnc-min-h-48",
4296
+ className,
4297
+ ...props
4298
+ }) {
4299
+ return /* @__PURE__ */ jsxs16(
4300
+ "div",
4301
+ {
4302
+ className: cn(
4303
+ "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",
4304
+ minHeight,
4305
+ className
4306
+ ),
4307
+ ...props,
4308
+ children: [
4309
+ /* @__PURE__ */ jsx22("div", { className: "cnc-mb-3 cnc-text-brand-gray-200", children: icon ?? /* @__PURE__ */ jsx22(FolderOpen, { className: "cnc-h-10 cnc-w-10" }) }),
4310
+ /* @__PURE__ */ jsx22("p", { className: "cnc-text-sm cnc-font-medium cnc-text-brand-blue-600", children: title }),
4311
+ description ? /* @__PURE__ */ jsx22("p", { className: "cnc-mt-1 cnc-max-w-md cnc-text-sm cnc-text-brand-gray-200", children: description }) : null,
4312
+ action ? /* @__PURE__ */ jsx22("div", { className: "cnc-mt-4", children: action }) : null
4313
+ ]
4314
+ }
4315
+ );
4316
+ }
4317
+
4318
+ // src/components/molecules/display/result-metadata.tsx
4319
+ import { jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
4320
+ function encontradosSuffix(resourceName, forceWordGender) {
4321
+ if (forceWordGender === "masc") return "o";
4322
+ if (forceWordGender === "fem") return "a";
4323
+ return resourceName.endsWith("a") ? "a" : "o";
4324
+ }
4325
+ function ResultMetadata({
4326
+ resourceName,
4327
+ total,
4328
+ displayed,
4329
+ isLoading = false,
4330
+ forceWordGender,
4331
+ truncationThreshold = 30,
4332
+ className,
4333
+ ...props
4334
+ }) {
4335
+ const encontradVogal = encontradosSuffix(resourceName, forceWordGender);
4336
+ return /* @__PURE__ */ jsxs17(
4337
+ "div",
4338
+ {
4339
+ className: cn("cnc-mt-4 cnc-mb-4", className),
4340
+ role: "status",
4341
+ "aria-live": "polite",
4342
+ ...props,
4343
+ children: [
4344
+ /* @__PURE__ */ jsx23("div", { className: "cnc-text-base cnc-font-bold cnc-text-brand-blue-100", children: `${resourceName} encontrad${encontradVogal}s | ${isLoading ? "carregando ..." : total?.toLocaleString("pt-BR")}` }),
4345
+ displayed >= truncationThreshold && /* @__PURE__ */ jsxs17("div", { children: [
4346
+ "Exibindo os ",
4347
+ /* @__PURE__ */ jsx23("span", { className: "cnc-font-bold", children: displayed }),
4348
+ " primeiros registros. Utilize os filtros para refinar sua busca."
4349
+ ] })
4350
+ ]
4351
+ }
4352
+ );
4353
+ }
4354
+
4355
+ // src/components/molecules/display/label-value.tsx
4356
+ import { jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
4357
+ function LabelValue({
4358
+ label,
4359
+ value,
4360
+ href,
4361
+ className,
4362
+ valueClassName
4363
+ }) {
4364
+ return /* @__PURE__ */ jsxs18("div", { className, children: [
4365
+ /* @__PURE__ */ jsx24("div", { className: "cnc-mb-2 cnc-text-sm cnc-font-bold cnc-leading-4 cnc-text-primary", children: label }),
4366
+ /* @__PURE__ */ jsxs18(
4367
+ "div",
4368
+ {
4369
+ className: cn(
4370
+ "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",
4371
+ valueClassName
4372
+ ),
4373
+ children: [
4374
+ value ?? "-",
4375
+ href && /* @__PURE__ */ jsx24(
4376
+ "a",
4377
+ {
4378
+ href,
4379
+ target: "_blank",
4380
+ rel: "noopener noreferrer",
4381
+ className: "cnc-inline-flex cnc-items-center cnc-text-brand-blue-500 hover:cnc-opacity-80",
4382
+ "aria-label": `Abrir link externo de ${label}`,
4383
+ children: /* @__PURE__ */ jsx24(ExternalLink, { className: "cnc-size-4" })
4384
+ }
4385
+ )
4386
+ ]
4387
+ }
4388
+ )
4389
+ ] });
4141
4390
  }
4142
4391
 
4143
4392
  // src/components/molecules/forms/combobox.tsx
4144
- import * as React14 from "react";
4393
+ import * as React16 from "react";
4394
+
4395
+ // src/components/molecules/forms/combobox-footer.tsx
4396
+ import { jsx as jsx25 } from "react/jsx-runtime";
4397
+ function ComboboxDropdownFooter({
4398
+ footerAction,
4399
+ renderFooter,
4400
+ close,
4401
+ hidden = false
4402
+ }) {
4403
+ if (hidden) return null;
4404
+ if (renderFooter) {
4405
+ return /* @__PURE__ */ jsx25("div", { className: "cnc-border-t cnc-border-brand-gray-50 cnc-p-2", children: renderFooter({ close }) });
4406
+ }
4407
+ if (!footerAction) return null;
4408
+ return /* @__PURE__ */ jsx25("div", { className: "cnc-border-t cnc-border-brand-gray-50 cnc-p-2", children: /* @__PURE__ */ jsx25(
4409
+ Button,
4410
+ {
4411
+ type: "button",
4412
+ variant: footerAction.variant ?? "create",
4413
+ className: "cnc-w-full",
4414
+ disabled: footerAction.disabled,
4415
+ onClick: (event) => {
4416
+ event.preventDefault();
4417
+ event.stopPropagation();
4418
+ footerAction.onClick(event);
4419
+ },
4420
+ children: footerAction.label
4421
+ }
4422
+ ) });
4423
+ }
4145
4424
 
4146
4425
  // src/components/molecules/overlay/command.tsx
4147
- import * as React12 from "react";
4426
+ import * as React14 from "react";
4148
4427
  import { Command as CommandPrimitive } from "cmdk";
4149
- import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
4150
- var Command = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
4428
+ import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
4429
+ var Command = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
4151
4430
  CommandPrimitive,
4152
4431
  {
4153
4432
  ref,
@@ -4160,16 +4439,16 @@ var Command = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__
4160
4439
  ));
4161
4440
  Command.displayName = CommandPrimitive.displayName;
4162
4441
  var CommandDialog = ({ children, ...props }) => {
4163
- return /* @__PURE__ */ jsx20(Dialog, { ...props, children: /* @__PURE__ */ jsx20(DialogContent, { className: "cnc-overflow-hidden cnc-p-0", children: /* @__PURE__ */ jsx20(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 }) }) });
4442
+ return /* @__PURE__ */ jsx26(Dialog, { ...props, children: /* @__PURE__ */ jsx26(DialogContent, { className: "cnc-overflow-hidden cnc-p-0", children: /* @__PURE__ */ jsx26(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 }) }) });
4164
4443
  };
4165
- var CommandInput = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs15(
4444
+ var CommandInput = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs19(
4166
4445
  "div",
4167
4446
  {
4168
4447
  className: "cnc-flex cnc-items-center cnc-border-b cnc-px-3",
4169
4448
  "cmdk-input-wrapper": "",
4170
4449
  children: [
4171
- /* @__PURE__ */ jsx20(Search, { className: "cnc-mr-2 cnc-h-4 cnc-w-4 cnc-shrink-0 cnc-opacity-50" }),
4172
- /* @__PURE__ */ jsx20(
4450
+ /* @__PURE__ */ jsx26(Search, { className: "cnc-mr-2 cnc-h-4 cnc-w-4 cnc-shrink-0 cnc-opacity-50" }),
4451
+ /* @__PURE__ */ jsx26(
4173
4452
  CommandPrimitive.Input,
4174
4453
  {
4175
4454
  ref,
@@ -4184,7 +4463,7 @@ var CommandInput = React12.forwardRef(({ className, ...props }, ref) => /* @__PU
4184
4463
  }
4185
4464
  ));
4186
4465
  CommandInput.displayName = CommandPrimitive.Input.displayName;
4187
- var CommandList = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
4466
+ var CommandList = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
4188
4467
  CommandPrimitive.List,
4189
4468
  {
4190
4469
  ref,
@@ -4196,7 +4475,7 @@ var CommandList = React12.forwardRef(({ className, ...props }, ref) => /* @__PUR
4196
4475
  }
4197
4476
  ));
4198
4477
  CommandList.displayName = CommandPrimitive.List.displayName;
4199
- var CommandEmpty = React12.forwardRef((props, ref) => /* @__PURE__ */ jsx20(
4478
+ var CommandEmpty = React14.forwardRef((props, ref) => /* @__PURE__ */ jsx26(
4200
4479
  CommandPrimitive.Empty,
4201
4480
  {
4202
4481
  ref,
@@ -4205,7 +4484,7 @@ var CommandEmpty = React12.forwardRef((props, ref) => /* @__PURE__ */ jsx20(
4205
4484
  }
4206
4485
  ));
4207
4486
  CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
4208
- var CommandGroup = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
4487
+ var CommandGroup = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
4209
4488
  CommandPrimitive.Group,
4210
4489
  {
4211
4490
  ref,
@@ -4217,7 +4496,7 @@ var CommandGroup = React12.forwardRef(({ className, ...props }, ref) => /* @__PU
4217
4496
  }
4218
4497
  ));
4219
4498
  CommandGroup.displayName = CommandPrimitive.Group.displayName;
4220
- var CommandSeparator = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
4499
+ var CommandSeparator = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
4221
4500
  CommandPrimitive.Separator,
4222
4501
  {
4223
4502
  ref,
@@ -4226,7 +4505,7 @@ var CommandSeparator = React12.forwardRef(({ className, ...props }, ref) => /* @
4226
4505
  }
4227
4506
  ));
4228
4507
  CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
4229
- var CommandItem = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
4508
+ var CommandItem = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
4230
4509
  CommandPrimitive.Item,
4231
4510
  {
4232
4511
  ref,
@@ -4242,7 +4521,7 @@ var CommandShortcut = ({
4242
4521
  className,
4243
4522
  ...props
4244
4523
  }) => {
4245
- return /* @__PURE__ */ jsx20(
4524
+ return /* @__PURE__ */ jsx26(
4246
4525
  "span",
4247
4526
  {
4248
4527
  className: cn(
@@ -4256,12 +4535,12 @@ var CommandShortcut = ({
4256
4535
  CommandShortcut.displayName = "CommandShortcut";
4257
4536
 
4258
4537
  // src/components/molecules/overlay/popover.tsx
4259
- import * as React13 from "react";
4538
+ import * as React15 from "react";
4260
4539
  import * as PopoverPrimitive2 from "@radix-ui/react-popover";
4261
- import { jsx as jsx21 } from "react/jsx-runtime";
4540
+ import { jsx as jsx27 } from "react/jsx-runtime";
4262
4541
  var Popover2 = PopoverPrimitive2.Root;
4263
4542
  var PopoverTrigger2 = PopoverPrimitive2.Trigger;
4264
- var PopoverContent2 = React13.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx21(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx21(
4543
+ var PopoverContent2 = React15.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx27(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx27(
4265
4544
  PopoverPrimitive2.Content,
4266
4545
  {
4267
4546
  ref,
@@ -4277,7 +4556,7 @@ var PopoverContent2 = React13.forwardRef(({ className, align = "center", sideOff
4277
4556
  PopoverContent2.displayName = PopoverPrimitive2.Content.displayName;
4278
4557
 
4279
4558
  // src/components/molecules/forms/combobox.tsx
4280
- import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
4559
+ import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
4281
4560
  function Combobox({
4282
4561
  options,
4283
4562
  placeholder = "",
@@ -4288,135 +4567,370 @@ function Combobox({
4288
4567
  modal = false,
4289
4568
  popoverClassName,
4290
4569
  buttonClassName,
4291
- disabled = false
4570
+ disabled = false,
4571
+ footerAction,
4572
+ renderFooter
4292
4573
  }) {
4293
- const [open, setOpen] = React14.useState(false);
4294
- return /* @__PURE__ */ jsxs16(Popover2, { open, onOpenChange: setOpen, modal, children: [
4295
- /* @__PURE__ */ jsx22(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs16(
4574
+ const [open, setOpen] = React16.useState(false);
4575
+ return /* @__PURE__ */ jsxs20(Popover2, { open, onOpenChange: setOpen, modal, children: [
4576
+ /* @__PURE__ */ jsx28(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs20(
4296
4577
  Button,
4297
4578
  {
4298
4579
  variant: "outline",
4299
4580
  role: "combobox",
4300
4581
  "aria-expanded": open,
4301
- className: cn("cnc-w-full cnc-justify-between cnc-truncate ", buttonClassName),
4582
+ className: cn(
4583
+ "cnc-w-full cnc-justify-between cnc-truncate ",
4584
+ buttonClassName
4585
+ ),
4302
4586
  disabled,
4303
4587
  children: [
4304
- /* @__PURE__ */ jsx22("div", { children: value ? options?.find((framework) => framework.value === value)?.label : placeholder }),
4305
- /* @__PURE__ */ jsx22(ChevronsUpDown, { className: "cnc-ml-2 cnc-h-4 cnc-w-4 cnc-shrink-0 cnc-opacity-50" })
4588
+ /* @__PURE__ */ jsx28("div", { children: value ? options?.find((framework) => framework.value === value)?.label : placeholder }),
4589
+ /* @__PURE__ */ jsx28(ChevronsUpDown, { className: "cnc-ml-2 cnc-h-4 cnc-w-4 cnc-shrink-0 cnc-opacity-50" })
4306
4590
  ]
4307
4591
  }
4308
4592
  ) }),
4309
- /* @__PURE__ */ jsx22(
4593
+ /* @__PURE__ */ jsxs20(
4310
4594
  PopoverContent2,
4311
4595
  {
4312
4596
  align: "start",
4313
- className: cn("cnc-w-[--radix-popover-trigger-width] cnc-p-0", popoverClassName),
4314
- children: /* @__PURE__ */ jsxs16(Command, { children: [
4315
- /* @__PURE__ */ jsx22(
4316
- CommandInput,
4317
- {
4318
- placeholder: command?.placeholder,
4319
- onInput: (e) => onInput && onInput(e.target?.value)
4320
- }
4321
- ),
4322
- /* @__PURE__ */ jsxs16(CommandList, { children: [
4323
- /* @__PURE__ */ jsx22(CommandEmpty, { children: command?.emptyMessage ?? "Nenhum item encontrado" }),
4324
- /* @__PURE__ */ jsx22(CommandGroup, { children: options?.map((option) => /* @__PURE__ */ jsxs16(
4325
- CommandItem,
4597
+ className: cn(
4598
+ "cnc-w-[--radix-popover-trigger-width] cnc-p-0",
4599
+ popoverClassName
4600
+ ),
4601
+ children: [
4602
+ /* @__PURE__ */ jsxs20(Command, { children: [
4603
+ /* @__PURE__ */ jsx28(
4604
+ CommandInput,
4326
4605
  {
4327
- value: option.value,
4328
- onSelect: (currentValue) => {
4329
- if (onChange)
4330
- onChange(currentValue === value ? "" : currentValue);
4331
- setOpen(false);
4606
+ placeholder: command?.placeholder,
4607
+ onInput: (e) => onInput && onInput(e.target?.value)
4608
+ }
4609
+ ),
4610
+ /* @__PURE__ */ jsxs20(CommandList, { children: [
4611
+ /* @__PURE__ */ jsx28(CommandEmpty, { children: command?.emptyMessage ?? "Nenhum item encontrado" }),
4612
+ /* @__PURE__ */ jsx28(CommandGroup, { children: options?.map((option) => /* @__PURE__ */ jsxs20(
4613
+ CommandItem,
4614
+ {
4615
+ value: option.value,
4616
+ onSelect: (currentValue) => {
4617
+ if (onChange)
4618
+ onChange(currentValue === value ? "" : currentValue);
4619
+ setOpen(false);
4620
+ },
4621
+ keywords: [option.value, option.label],
4622
+ disabled: option.disabled,
4623
+ children: [
4624
+ /* @__PURE__ */ jsx28(
4625
+ Check,
4626
+ {
4627
+ className: cn(
4628
+ "cnc-mr-2 cnc-h-4 cnc-w-4",
4629
+ value === option.value ? "cnc-opacity-100" : "cnc-opacity-0"
4630
+ )
4631
+ }
4632
+ ),
4633
+ option.label
4634
+ ]
4332
4635
  },
4333
- keywords: [option.value, option.label],
4334
- disabled: option.disabled,
4335
- children: [
4336
- /* @__PURE__ */ jsx22(
4337
- Check,
4338
- {
4339
- className: cn(
4340
- "cnc-mr-2 cnc-h-4 cnc-w-4",
4341
- value === option.value ? "cnc-opacity-100" : "cnc-opacity-0"
4342
- )
4343
- }
4344
- ),
4345
- option.label
4346
- ]
4347
- },
4348
- option.value
4349
- )) })
4350
- ] })
4351
- ] })
4636
+ option.value
4637
+ )) })
4638
+ ] })
4639
+ ] }),
4640
+ /* @__PURE__ */ jsx28(
4641
+ ComboboxDropdownFooter,
4642
+ {
4643
+ footerAction,
4644
+ renderFooter,
4645
+ close: () => setOpen(false),
4646
+ hidden: disabled
4647
+ }
4648
+ )
4649
+ ]
4352
4650
  }
4353
4651
  )
4354
4652
  ] });
4355
4653
  }
4356
4654
 
4357
- // src/components/organisms/filter/index.tsx
4358
- import * as React15 from "react";
4359
- import {
4360
- Controller,
4361
- useForm,
4362
- useWatch
4363
- } from "react-hook-form";
4364
- import { jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
4365
- var INPUT_BASE_CLASSES = [
4366
- "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",
4367
- "placeholder:cnc-text-muted-foreground focus-visible:cnc-outline-none",
4368
- "focus-visible:cnc-ring-2 focus-visible:cnc-ring-brand-gray-500/50 md:cnc-text-sm",
4369
- "not-disabled:hover:cnc-border-brand-gray-500",
4370
- "disabled:cnc-cursor-not-allowed disabled:cnc-opacity-50"
4371
- ].join(" ");
4372
- function buildDefaultValues(fields) {
4373
- const defaults = {};
4374
- for (const field of fields) {
4375
- defaults[field.name] = field.defaultValue ?? (field.type === "switch" ? false : "");
4376
- }
4377
- return defaults;
4378
- }
4379
- function buildValidationRules(field) {
4380
- if (!field.required) return void 0;
4381
- return {
4382
- required: field.errorMessage || "Campo obrigat\xF3rio",
4383
- validate: (value) => {
4384
- if (field.type === "switch") return true;
4385
- if (value === "" || value === null || value === void 0) {
4386
- return field.errorMessage || "Campo obrigat\xF3rio";
4387
- }
4388
- return true;
4655
+ // src/components/molecules/forms/multi-select.tsx
4656
+ import * as React17 from "react";
4657
+ import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
4658
+ function MultiSelect({
4659
+ options,
4660
+ value = [],
4661
+ onChange,
4662
+ placeholder = "Selecione...",
4663
+ disabled = false,
4664
+ modal = false,
4665
+ className,
4666
+ buttonClassName,
4667
+ popoverClassName,
4668
+ command,
4669
+ selectedCountText = (count) => `${count} selecionados`,
4670
+ footerAction,
4671
+ renderFooter
4672
+ }) {
4673
+ const [open, setOpen] = React17.useState(false);
4674
+ const buttonText = (() => {
4675
+ if (value.length === 0) return placeholder;
4676
+ if (value.length === 1) {
4677
+ return options?.find((option) => option.value === value[0])?.label ?? selectedCountText(1);
4389
4678
  }
4679
+ return selectedCountText(value.length);
4680
+ })();
4681
+ const toggleOption = (optionValue) => {
4682
+ if (!onChange) return;
4683
+ onChange(
4684
+ value.includes(optionValue) ? value.filter((item) => item !== optionValue) : [...value, optionValue]
4685
+ );
4390
4686
  };
4391
- }
4392
- var FilterFieldItem = React15.memo(function FilterFieldItem2({
4393
- field,
4394
- register,
4395
- control,
4396
- error
4397
- }) {
4398
- const fieldId = field.id || `filter-field-${field.name}`;
4399
- return /* @__PURE__ */ jsxs17(
4400
- "div",
4401
- {
4402
- className: "cnc-filter-field cnc-px-2 cnc-mb-3",
4403
- style: { "--cnc-filter-field-w": field.width || "25%" },
4404
- children: [
4405
- field.label && /* @__PURE__ */ jsxs17(
4406
- "label",
4407
- {
4408
- htmlFor: fieldId,
4409
- className: "cnc-block cnc-text-sm cnc-mb-1 cnc-font-medium cnc-text-brand-gray-600",
4410
- children: [
4411
- field.label,
4412
- field.required && /* @__PURE__ */ jsx23("span", { className: "cnc-text-red-500", children: " *" })
4413
- ]
4414
- }
4415
- ),
4416
- (field.type === "text" || field.type === "date") && /* @__PURE__ */ jsx23(
4417
- "input",
4418
- {
4419
- id: fieldId,
4687
+ return /* @__PURE__ */ jsxs21(Popover2, { open, onOpenChange: setOpen, modal, children: [
4688
+ /* @__PURE__ */ jsx29(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs21(
4689
+ Button,
4690
+ {
4691
+ type: "button",
4692
+ variant: "outline",
4693
+ role: "combobox",
4694
+ "aria-expanded": open,
4695
+ disabled,
4696
+ className: cn(
4697
+ "cnc-w-full cnc-justify-between cnc-truncate",
4698
+ buttonClassName,
4699
+ className
4700
+ ),
4701
+ children: [
4702
+ /* @__PURE__ */ jsx29("span", { className: "cnc-truncate", children: buttonText }),
4703
+ /* @__PURE__ */ jsx29(ChevronsUpDown, { className: "cnc-ml-2 cnc-h-4 cnc-w-4 cnc-shrink-0 cnc-opacity-50" })
4704
+ ]
4705
+ }
4706
+ ) }),
4707
+ /* @__PURE__ */ jsxs21(
4708
+ PopoverContent2,
4709
+ {
4710
+ align: "start",
4711
+ className: cn(
4712
+ "cnc-w-[--radix-popover-trigger-width] cnc-p-0",
4713
+ popoverClassName
4714
+ ),
4715
+ children: [
4716
+ /* @__PURE__ */ jsxs21(Command, { children: [
4717
+ /* @__PURE__ */ jsx29(CommandInput, { placeholder: command?.placeholder }),
4718
+ /* @__PURE__ */ jsxs21(CommandList, { children: [
4719
+ /* @__PURE__ */ jsx29(CommandEmpty, { children: command?.emptyMessage ?? "Nenhum item encontrado" }),
4720
+ /* @__PURE__ */ jsx29(CommandGroup, { children: options?.map((option) => {
4721
+ const isSelected = value.includes(option.value);
4722
+ return /* @__PURE__ */ jsxs21(
4723
+ CommandItem,
4724
+ {
4725
+ value: option.value,
4726
+ onSelect: () => toggleOption(option.value),
4727
+ keywords: [option.value, option.label],
4728
+ disabled: option.disabled,
4729
+ children: [
4730
+ /* @__PURE__ */ jsx29(
4731
+ Check,
4732
+ {
4733
+ className: cn(
4734
+ "cnc-mr-2 cnc-h-4 cnc-w-4",
4735
+ isSelected ? "cnc-opacity-100" : "cnc-opacity-0"
4736
+ )
4737
+ }
4738
+ ),
4739
+ option.label
4740
+ ]
4741
+ },
4742
+ option.value
4743
+ );
4744
+ }) })
4745
+ ] })
4746
+ ] }),
4747
+ /* @__PURE__ */ jsx29(
4748
+ ComboboxDropdownFooter,
4749
+ {
4750
+ footerAction,
4751
+ renderFooter,
4752
+ close: () => setOpen(false),
4753
+ hidden: disabled
4754
+ }
4755
+ )
4756
+ ]
4757
+ }
4758
+ )
4759
+ ] });
4760
+ }
4761
+
4762
+ // src/components/molecules/overlay/confirm-dialog.tsx
4763
+ import * as React18 from "react";
4764
+ import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
4765
+ function ConfirmDialog({
4766
+ open,
4767
+ onOpenChange,
4768
+ title,
4769
+ description,
4770
+ confirmLabel = "Confirmar",
4771
+ cancelLabel = "Cancelar",
4772
+ loadingLabel = "Aguarde...",
4773
+ onConfirm,
4774
+ icon,
4775
+ showIconBackground = true,
4776
+ footerAlign = "center",
4777
+ confirmVariant = "danger",
4778
+ children,
4779
+ isLoading,
4780
+ className
4781
+ }) {
4782
+ const [localLoading, setLocalLoading] = React18.useState(false);
4783
+ const isBusy = isLoading ?? localLoading;
4784
+ const handleConfirm = async () => {
4785
+ if (isLoading !== void 0) {
4786
+ await onConfirm?.();
4787
+ return;
4788
+ }
4789
+ setLocalLoading(true);
4790
+ try {
4791
+ await onConfirm?.();
4792
+ } finally {
4793
+ setLocalLoading(false);
4794
+ }
4795
+ };
4796
+ return /* @__PURE__ */ jsx30(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs22(DialogContent, { className: cn("cnc-max-w-md cnc-text-center", className), children: [
4797
+ /* @__PURE__ */ jsxs22(DialogHeader, { children: [
4798
+ /* @__PURE__ */ jsx30(
4799
+ "div",
4800
+ {
4801
+ className: cn(
4802
+ "cnc-mx-auto cnc-mb-2 cnc-flex cnc-items-center cnc-justify-center",
4803
+ showIconBackground && "cnc-size-16 cnc-rounded-full cnc-bg-red-100",
4804
+ showIconBackground && confirmVariant === "confirm" && "cnc-bg-brand-green-100/20"
4805
+ ),
4806
+ children: icon ?? /* @__PURE__ */ jsx30(Trash2, { className: cn("cnc-size-8 cnc-text-red-600", confirmVariant === "confirm" && "cnc-text-brand-green-300") })
4807
+ }
4808
+ ),
4809
+ /* @__PURE__ */ jsx30(DialogTitle, { className: "cnc-text-center", children: title }),
4810
+ description && /* @__PURE__ */ jsx30(DialogDescription, { className: "cnc-text-center", children: description })
4811
+ ] }),
4812
+ children,
4813
+ /* @__PURE__ */ jsxs22(
4814
+ DialogFooter,
4815
+ {
4816
+ className: cn(
4817
+ "cnc-flex cnc-gap-2",
4818
+ footerAlign === "end" ? "cnc-justify-end sm:cnc-justify-end" : "cnc-justify-center sm:cnc-justify-center"
4819
+ ),
4820
+ children: [
4821
+ /* @__PURE__ */ jsx30(
4822
+ Button,
4823
+ {
4824
+ type: "button",
4825
+ variant: "outline",
4826
+ onClick: () => onOpenChange(false),
4827
+ disabled: isBusy,
4828
+ children: cancelLabel
4829
+ }
4830
+ ),
4831
+ /* @__PURE__ */ jsx30(
4832
+ Button,
4833
+ {
4834
+ type: "button",
4835
+ variant: confirmVariant,
4836
+ isLoading: isBusy,
4837
+ onClick: handleConfirm,
4838
+ children: isBusy ? loadingLabel : confirmLabel
4839
+ }
4840
+ )
4841
+ ]
4842
+ }
4843
+ )
4844
+ ] }) });
4845
+ }
4846
+
4847
+ // src/components/molecules/overlay/tooltip.tsx
4848
+ import { jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
4849
+ function Tooltip({
4850
+ text,
4851
+ children,
4852
+ className,
4853
+ contentClassName
4854
+ }) {
4855
+ return /* @__PURE__ */ jsxs23("div", { className: cn("cnc-relative cnc-inline-flex cnc-group", className), children: [
4856
+ /* @__PURE__ */ jsx31(
4857
+ "div",
4858
+ {
4859
+ role: "tooltip",
4860
+ className: cn(
4861
+ "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",
4862
+ contentClassName
4863
+ ),
4864
+ children: text
4865
+ }
4866
+ ),
4867
+ /* @__PURE__ */ jsx31("span", { className: "cnc-cursor-pointer", children })
4868
+ ] });
4869
+ }
4870
+
4871
+ // src/components/organisms/filter/index.tsx
4872
+ import * as React19 from "react";
4873
+ import {
4874
+ Controller,
4875
+ useForm,
4876
+ useWatch
4877
+ } from "react-hook-form";
4878
+ import { jsx as jsx32, jsxs as jsxs24 } from "react/jsx-runtime";
4879
+ var INPUT_BASE_CLASSES = [
4880
+ "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",
4881
+ "placeholder:cnc-text-muted-foreground focus-visible:cnc-outline-none",
4882
+ "focus-visible:cnc-ring-2 focus-visible:cnc-ring-brand-gray-500/50 md:cnc-text-sm",
4883
+ "not-disabled:hover:cnc-border-brand-gray-500",
4884
+ "disabled:cnc-cursor-not-allowed disabled:cnc-opacity-50"
4885
+ ].join(" ");
4886
+ function buildDefaultValues(fields) {
4887
+ const defaults = {};
4888
+ for (const field of fields) {
4889
+ defaults[field.name] = field.defaultValue ?? (field.type === "switch" ? false : "");
4890
+ }
4891
+ return defaults;
4892
+ }
4893
+ function buildValidationRules(field) {
4894
+ if (!field.required) return void 0;
4895
+ return {
4896
+ required: field.errorMessage || "Campo obrigat\xF3rio",
4897
+ validate: (value) => {
4898
+ if (field.type === "switch") return true;
4899
+ if (value === "" || value === null || value === void 0) {
4900
+ return field.errorMessage || "Campo obrigat\xF3rio";
4901
+ }
4902
+ return true;
4903
+ }
4904
+ };
4905
+ }
4906
+ var FilterFieldItem = React19.memo(function FilterFieldItem2({
4907
+ field,
4908
+ register,
4909
+ control,
4910
+ error
4911
+ }) {
4912
+ const fieldId = field.id || `filter-field-${field.name}`;
4913
+ return /* @__PURE__ */ jsxs24(
4914
+ "div",
4915
+ {
4916
+ className: "cnc-filter-field cnc-px-2 cnc-mb-3",
4917
+ style: { "--cnc-filter-field-w": field.width || "25%" },
4918
+ children: [
4919
+ field.label && /* @__PURE__ */ jsxs24(
4920
+ "label",
4921
+ {
4922
+ htmlFor: fieldId,
4923
+ className: "cnc-block cnc-text-sm cnc-mb-1 cnc-font-medium cnc-text-brand-gray-600",
4924
+ children: [
4925
+ field.label,
4926
+ field.required && /* @__PURE__ */ jsx32("span", { className: "cnc-text-red-500", children: " *" })
4927
+ ]
4928
+ }
4929
+ ),
4930
+ (field.type === "text" || field.type === "date") && /* @__PURE__ */ jsx32(
4931
+ "input",
4932
+ {
4933
+ id: fieldId,
4420
4934
  type: field.type === "date" ? "date" : "text",
4421
4935
  placeholder: field.placeholder,
4422
4936
  disabled: field.disabled,
@@ -4427,13 +4941,13 @@ var FilterFieldItem = React15.memo(function FilterFieldItem2({
4427
4941
  )
4428
4942
  }
4429
4943
  ),
4430
- field.type === "combobox" && /* @__PURE__ */ jsx23(
4944
+ field.type === "combobox" && /* @__PURE__ */ jsx32(
4431
4945
  Controller,
4432
4946
  {
4433
4947
  name: field.name,
4434
4948
  control,
4435
4949
  rules: buildValidationRules(field),
4436
- render: ({ field: rhfField }) => /* @__PURE__ */ jsx23(
4950
+ render: ({ field: rhfField }) => /* @__PURE__ */ jsx32(
4437
4951
  Combobox,
4438
4952
  {
4439
4953
  value: rhfField.value || "",
@@ -4447,13 +4961,13 @@ var FilterFieldItem = React15.memo(function FilterFieldItem2({
4447
4961
  )
4448
4962
  }
4449
4963
  ),
4450
- field.type === "switch" && /* @__PURE__ */ jsx23(
4964
+ field.type === "switch" && /* @__PURE__ */ jsx32(
4451
4965
  Controller,
4452
4966
  {
4453
4967
  name: field.name,
4454
4968
  control,
4455
4969
  rules: buildValidationRules(field),
4456
- render: ({ field: rhfField }) => /* @__PURE__ */ jsx23(
4970
+ render: ({ field: rhfField }) => /* @__PURE__ */ jsx32(
4457
4971
  Switch,
4458
4972
  {
4459
4973
  checked: !!rhfField.value,
@@ -4464,14 +4978,14 @@ var FilterFieldItem = React15.memo(function FilterFieldItem2({
4464
4978
  )
4465
4979
  }
4466
4980
  ),
4467
- error && /* @__PURE__ */ jsx23("span", { className: "cnc-block cnc-text-xs cnc-text-red-500 cnc-mt-1", children: error.message })
4981
+ error && /* @__PURE__ */ jsx32("span", { className: "cnc-block cnc-text-xs cnc-text-red-500 cnc-mt-1", children: error.message })
4468
4982
  ]
4469
4983
  }
4470
4984
  );
4471
4985
  });
4472
4986
  function CleanButton({ control, onClean }) {
4473
4987
  const values = useWatch({ control });
4474
- const hasActiveFilters = React15.useMemo(() => {
4988
+ const hasActiveFilters = React19.useMemo(() => {
4475
4989
  const keys = Object.keys(values);
4476
4990
  return keys.some((key) => {
4477
4991
  const val = values[key];
@@ -4480,7 +4994,7 @@ function CleanButton({ control, onClean }) {
4480
4994
  return val !== null && val !== void 0 && val !== "";
4481
4995
  });
4482
4996
  }, [values]);
4483
- return /* @__PURE__ */ jsxs17(
4997
+ return /* @__PURE__ */ jsxs24(
4484
4998
  Button,
4485
4999
  {
4486
5000
  type: "button",
@@ -4489,13 +5003,13 @@ function CleanButton({ control, onClean }) {
4489
5003
  disabled: !hasActiveFilters,
4490
5004
  className: "cnc-shrink-0 cnc-gap-2",
4491
5005
  children: [
4492
- /* @__PURE__ */ jsx23(FilterX, { className: "cnc-h-4 cnc-w-4" }),
5006
+ /* @__PURE__ */ jsx32(FilterX, { className: "cnc-h-4 cnc-w-4" }),
4493
5007
  "Limpar"
4494
5008
  ]
4495
5009
  }
4496
5010
  );
4497
5011
  }
4498
- var Filter = React15.forwardRef(
5012
+ var Filter = React19.forwardRef(
4499
5013
  function Filter2({
4500
5014
  fields,
4501
5015
  collapsibleFields,
@@ -4505,12 +5019,12 @@ var Filter = React15.forwardRef(
4505
5019
  isLoading = false,
4506
5020
  className
4507
5021
  }, ref) {
4508
- const [isCollapsibleOpen, setIsCollapsibleOpen] = React15.useState(false);
4509
- const allFields = React15.useMemo(
5022
+ const [isCollapsibleOpen, setIsCollapsibleOpen] = React19.useState(false);
5023
+ const allFields = React19.useMemo(
4510
5024
  () => [...fields, ...collapsibleFields || []],
4511
5025
  [fields, collapsibleFields]
4512
5026
  );
4513
- const defaultValues = React15.useMemo(
5027
+ const defaultValues = React19.useMemo(
4514
5028
  () => buildDefaultValues(allFields),
4515
5029
  [allFields]
4516
5030
  );
@@ -4521,7 +5035,7 @@ var Filter = React15.forwardRef(
4521
5035
  reset,
4522
5036
  formState: { errors }
4523
5037
  } = useForm({ defaultValues });
4524
- React15.useEffect(() => {
5038
+ React19.useEffect(() => {
4525
5039
  if (collapsibleFields?.some((f) => errors[f.name])) {
4526
5040
  setIsCollapsibleOpen(true);
4527
5041
  }
@@ -4529,7 +5043,7 @@ var Filter = React15.forwardRef(
4529
5043
  const onSubmit = (data) => {
4530
5044
  onSearch(data);
4531
5045
  };
4532
- const handleClean = React15.useCallback(() => {
5046
+ const handleClean = React19.useCallback(() => {
4533
5047
  const emptyValues = {};
4534
5048
  for (const field of allFields) {
4535
5049
  emptyValues[field.name] = field.type === "switch" ? false : "";
@@ -4537,12 +5051,12 @@ var Filter = React15.forwardRef(
4537
5051
  reset(emptyValues);
4538
5052
  onClean?.();
4539
5053
  }, [allFields, reset, onClean]);
4540
- return /* @__PURE__ */ jsx23(
5054
+ return /* @__PURE__ */ jsx32(
4541
5055
  Collapsible,
4542
5056
  {
4543
5057
  open: isCollapsibleOpen,
4544
5058
  onOpenChange: setIsCollapsibleOpen,
4545
- children: /* @__PURE__ */ jsxs17(
5059
+ children: /* @__PURE__ */ jsxs24(
4546
5060
  "form",
4547
5061
  {
4548
5062
  ref,
@@ -4553,8 +5067,8 @@ var Filter = React15.forwardRef(
4553
5067
  ),
4554
5068
  style: { backgroundColor: "#F8FAFC" },
4555
5069
  children: [
4556
- /* @__PURE__ */ jsxs17("div", { className: "cnc-flex cnc-flex-wrap cnc-items-end", children: [
4557
- fields.map((field) => /* @__PURE__ */ jsx23(
5070
+ /* @__PURE__ */ jsxs24("div", { className: "cnc-flex cnc-flex-wrap cnc-items-end", children: [
5071
+ fields.map((field) => /* @__PURE__ */ jsx32(
4558
5072
  FilterFieldItem,
4559
5073
  {
4560
5074
  field,
@@ -4564,18 +5078,18 @@ var Filter = React15.forwardRef(
4564
5078
  },
4565
5079
  field.name
4566
5080
  )),
4567
- /* @__PURE__ */ jsxs17("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: [
4568
- collapsibleFields && collapsibleFields.length > 0 && /* @__PURE__ */ jsx23(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsx23(
5081
+ /* @__PURE__ */ jsxs24("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: [
5082
+ collapsibleFields && collapsibleFields.length > 0 && /* @__PURE__ */ jsx32(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsx32(
4569
5083
  Button,
4570
5084
  {
4571
5085
  type: "button",
4572
5086
  variant: "outline",
4573
5087
  size: "icon",
4574
5088
  className: "cnc-shrink-0",
4575
- children: /* @__PURE__ */ jsx23(ListFilter, { className: "cnc-h-4 cnc-w-4" })
5089
+ children: /* @__PURE__ */ jsx32(ListFilter, { className: "cnc-h-4 cnc-w-4" })
4576
5090
  }
4577
5091
  ) }),
4578
- /* @__PURE__ */ jsxs17(
5092
+ /* @__PURE__ */ jsxs24(
4579
5093
  Button,
4580
5094
  {
4581
5095
  type: "submit",
@@ -4583,15 +5097,15 @@ var Filter = React15.forwardRef(
4583
5097
  isLoading,
4584
5098
  className: "cnc-shrink-0 cnc-gap-2",
4585
5099
  children: [
4586
- /* @__PURE__ */ jsx23(Search, { className: "cnc-h-4 cnc-w-4" }),
5100
+ /* @__PURE__ */ jsx32(Search, { className: "cnc-h-4 cnc-w-4" }),
4587
5101
  "Pesquisar"
4588
5102
  ]
4589
5103
  }
4590
5104
  ),
4591
- !hideCleanFilterButton && /* @__PURE__ */ jsx23(CleanButton, { control, onClean: handleClean })
5105
+ !hideCleanFilterButton && /* @__PURE__ */ jsx32(CleanButton, { control, onClean: handleClean })
4592
5106
  ] })
4593
5107
  ] }),
4594
- collapsibleFields && collapsibleFields.length > 0 && /* @__PURE__ */ jsx23(AnimatedCollapsibleContent, { children: /* @__PURE__ */ jsx23("div", { className: "cnc-flex cnc-flex-wrap cnc-items-end cnc-pt-2", children: collapsibleFields.map((field) => /* @__PURE__ */ jsx23(
5108
+ collapsibleFields && collapsibleFields.length > 0 && /* @__PURE__ */ jsx32(AnimatedCollapsibleContent, { children: /* @__PURE__ */ jsx32("div", { className: "cnc-flex cnc-flex-wrap cnc-items-end cnc-pt-2", children: collapsibleFields.map((field) => /* @__PURE__ */ jsx32(
4595
5109
  FilterFieldItem,
4596
5110
  {
4597
5111
  field,
@@ -4610,8 +5124,8 @@ var Filter = React15.forwardRef(
4610
5124
  );
4611
5125
 
4612
5126
  // src/components/organisms/card-list/index.tsx
4613
- import * as React16 from "react";
4614
- import { jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
5127
+ import * as React20 from "react";
5128
+ import { jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
4615
5129
  function CardList({
4616
5130
  items,
4617
5131
  renderCard,
@@ -4627,21 +5141,21 @@ function CardList({
4627
5141
  gridTemplateColumns: `repeat(auto-fill, minmax(min(100%, ${minItemWidth}), 1fr))`
4628
5142
  };
4629
5143
  if (isLoading) {
4630
- return /* @__PURE__ */ jsx24(
5144
+ return /* @__PURE__ */ jsx33(
4631
5145
  "div",
4632
5146
  {
4633
5147
  className: cn("cnc-grid cnc-w-full", gap, className),
4634
5148
  style: gridStyle,
4635
5149
  "aria-busy": "true",
4636
- children: Array.from({ length: skeletonCount }).map((_, i) => /* @__PURE__ */ jsxs18(
5150
+ children: Array.from({ length: skeletonCount }).map((_, i) => /* @__PURE__ */ jsxs25(
4637
5151
  "div",
4638
5152
  {
4639
5153
  className: "cnc-animate-pulse cnc-rounded-md cnc-border-2 cnc-border-brand-gray-50 cnc-bg-white cnc-shadow cnc-p-6",
4640
5154
  children: [
4641
- /* @__PURE__ */ jsx24("div", { className: "cnc-h-4 cnc-w-1/2 cnc-bg-brand-gray-100 cnc-rounded cnc-mb-4" }),
4642
- /* @__PURE__ */ jsx24("div", { className: "cnc-h-3 cnc-w-3/4 cnc-bg-brand-gray-100 cnc-rounded cnc-mb-2" }),
4643
- /* @__PURE__ */ jsx24("div", { className: "cnc-h-3 cnc-w-2/3 cnc-bg-brand-gray-100 cnc-rounded cnc-mb-6" }),
4644
- /* @__PURE__ */ jsx24("div", { className: "cnc-h-8 cnc-w-full cnc-bg-brand-gray-100 cnc-rounded" })
5155
+ /* @__PURE__ */ jsx33("div", { className: "cnc-h-4 cnc-w-1/2 cnc-bg-brand-gray-100 cnc-rounded cnc-mb-4" }),
5156
+ /* @__PURE__ */ jsx33("div", { className: "cnc-h-3 cnc-w-3/4 cnc-bg-brand-gray-100 cnc-rounded cnc-mb-2" }),
5157
+ /* @__PURE__ */ jsx33("div", { className: "cnc-h-3 cnc-w-2/3 cnc-bg-brand-gray-100 cnc-rounded cnc-mb-6" }),
5158
+ /* @__PURE__ */ jsx33("div", { className: "cnc-h-8 cnc-w-full cnc-bg-brand-gray-100 cnc-rounded" })
4645
5159
  ]
4646
5160
  },
4647
5161
  i
@@ -4650,7 +5164,7 @@ function CardList({
4650
5164
  );
4651
5165
  }
4652
5166
  if (!items || items.length === 0) {
4653
- return /* @__PURE__ */ jsxs18(
5167
+ return /* @__PURE__ */ jsxs25(
4654
5168
  "div",
4655
5169
  {
4656
5170
  className: cn(
@@ -4659,24 +5173,897 @@ function CardList({
4659
5173
  ),
4660
5174
  style: { backgroundColor: "#F8FAFC", color: "#64748B" },
4661
5175
  children: [
4662
- /* @__PURE__ */ jsx24(FolderOpen, { className: "cnc-h-8 cnc-w-8 cnc-mb-2" }),
4663
- /* @__PURE__ */ jsx24("p", { className: "cnc-text-sm", children: emptyMessage })
5176
+ /* @__PURE__ */ jsx33(FolderOpen, { className: "cnc-h-8 cnc-w-8 cnc-mb-2" }),
5177
+ /* @__PURE__ */ jsx33("p", { className: "cnc-text-sm", children: emptyMessage })
4664
5178
  ]
4665
5179
  }
4666
5180
  );
4667
5181
  }
4668
- return /* @__PURE__ */ jsx24(
5182
+ return /* @__PURE__ */ jsx33(
4669
5183
  "div",
4670
5184
  {
4671
5185
  className: cn("cnc-grid cnc-w-full", gap, className),
4672
5186
  style: gridStyle,
4673
- children: items.map((item, index) => /* @__PURE__ */ jsx24(React16.Fragment, { children: renderCard(item, index) }, getKey ? getKey(item, index) : index))
5187
+ children: items.map((item, index) => /* @__PURE__ */ jsx33(React20.Fragment, { children: renderCard(item, index) }, getKey ? getKey(item, index) : index))
4674
5188
  }
4675
5189
  );
4676
5190
  }
4677
5191
 
5192
+ // src/components/organisms/drawer/drawer.tsx
5193
+ import * as DialogPrimitive2 from "@radix-ui/react-dialog";
5194
+ import * as React21 from "react";
5195
+ import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
5196
+ var Drawer = DialogPrimitive2.Root;
5197
+ var DrawerTrigger = DialogPrimitive2.Trigger;
5198
+ var DrawerPortal = DialogPrimitive2.Portal;
5199
+ var DrawerClose = DialogPrimitive2.Close;
5200
+ var DrawerOverlay = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
5201
+ DialogPrimitive2.Overlay,
5202
+ {
5203
+ ref,
5204
+ className: cn(
5205
+ "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",
5206
+ className
5207
+ ),
5208
+ ...props
5209
+ }
5210
+ ));
5211
+ DrawerOverlay.displayName = DialogPrimitive2.Overlay.displayName;
5212
+ var drawerSizeToWidth = {
5213
+ sm: "24rem",
5214
+ md: "32rem",
5215
+ lg: "40rem",
5216
+ xl: "48rem",
5217
+ full: "100vw"
5218
+ };
5219
+ var DrawerContent = React21.forwardRef(
5220
+ ({
5221
+ className,
5222
+ children,
5223
+ side = "right",
5224
+ size = "md",
5225
+ width,
5226
+ closeButton = true,
5227
+ style,
5228
+ ...props
5229
+ }, ref) => {
5230
+ const resolvedWidth = width ?? drawerSizeToWidth[size];
5231
+ return /* @__PURE__ */ jsxs26(DrawerPortal, { children: [
5232
+ /* @__PURE__ */ jsx34(DrawerOverlay, {}),
5233
+ /* @__PURE__ */ jsxs26(
5234
+ DialogPrimitive2.Content,
5235
+ {
5236
+ ref,
5237
+ style: { "--drawer-width": resolvedWidth, ...style },
5238
+ className: cn(
5239
+ "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",
5240
+ "sm:cnc-w-[--drawer-width] sm:cnc-max-w-full",
5241
+ 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",
5242
+ 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",
5243
+ className
5244
+ ),
5245
+ ...props,
5246
+ children: [
5247
+ children,
5248
+ closeButton && /* @__PURE__ */ jsxs26(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: [
5249
+ /* @__PURE__ */ jsx34(X, { className: "cnc-h-4 cnc-w-4" }),
5250
+ /* @__PURE__ */ jsx34("span", { className: "cnc-sr-only", children: "Fechar" })
5251
+ ] })
5252
+ ]
5253
+ }
5254
+ )
5255
+ ] });
5256
+ }
5257
+ );
5258
+ DrawerContent.displayName = DialogPrimitive2.Content.displayName;
5259
+ var DrawerHeader = ({
5260
+ className,
5261
+ ...props
5262
+ }) => /* @__PURE__ */ jsx34(
5263
+ "div",
5264
+ {
5265
+ className: cn(
5266
+ "cnc-flex cnc-flex-col cnc-space-y-1.5 cnc-border-b cnc-p-6",
5267
+ className
5268
+ ),
5269
+ ...props
5270
+ }
5271
+ );
5272
+ DrawerHeader.displayName = "DrawerHeader";
5273
+ var DrawerBody = ({
5274
+ className,
5275
+ ...props
5276
+ }) => /* @__PURE__ */ jsx34("div", { className: cn("cnc-flex-1 cnc-overflow-y-auto cnc-p-6", className), ...props });
5277
+ DrawerBody.displayName = "DrawerBody";
5278
+ var DrawerFooter = ({
5279
+ className,
5280
+ ...props
5281
+ }) => /* @__PURE__ */ jsx34("div", { className: cn("cnc-border-t cnc-p-6", className), ...props });
5282
+ DrawerFooter.displayName = "DrawerFooter";
5283
+ var DrawerTitle = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
5284
+ DialogPrimitive2.Title,
5285
+ {
5286
+ ref,
5287
+ className: cn(
5288
+ "cnc-text-lg cnc-font-semibold cnc-leading-none cnc-tracking-tight",
5289
+ className
5290
+ ),
5291
+ ...props
5292
+ }
5293
+ ));
5294
+ DrawerTitle.displayName = DialogPrimitive2.Title.displayName;
5295
+ var DrawerDescription = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
5296
+ DialogPrimitive2.Description,
5297
+ {
5298
+ ref,
5299
+ className: cn("cnc-text-sm cnc-text-muted-foreground", className),
5300
+ ...props
5301
+ }
5302
+ ));
5303
+ DrawerDescription.displayName = DialogPrimitive2.Description.displayName;
5304
+
5305
+ // src/components/organisms/drawer/drawer-context.tsx
5306
+ import * as React22 from "react";
5307
+ import { jsx as jsx35 } from "react/jsx-runtime";
5308
+ var DrawerContext = React22.createContext(
5309
+ void 0
5310
+ );
5311
+ function DrawerProvider({ children }) {
5312
+ const [activeDrawer, setActiveDrawer] = React22.useState(null);
5313
+ const openDrawer = React22.useCallback((drawerId) => {
5314
+ setActiveDrawer(drawerId);
5315
+ }, []);
5316
+ const closeDrawer = React22.useCallback(() => {
5317
+ setActiveDrawer(null);
5318
+ }, []);
5319
+ const isOpen = React22.useCallback(
5320
+ (drawerId) => activeDrawer === drawerId,
5321
+ [activeDrawer]
5322
+ );
5323
+ const value = React22.useMemo(
5324
+ () => ({ activeDrawer, openDrawer, closeDrawer, isOpen }),
5325
+ [activeDrawer, openDrawer, closeDrawer, isOpen]
5326
+ );
5327
+ return /* @__PURE__ */ jsx35(DrawerContext.Provider, { value, children });
5328
+ }
5329
+
5330
+ // src/components/organisms/drawer/use-drawer.ts
5331
+ import * as React23 from "react";
5332
+ function useDrawer() {
5333
+ const context = React23.useContext(DrawerContext);
5334
+ if (!context) {
5335
+ throw new Error("useDrawer deve ser usado dentro de um DrawerProvider");
5336
+ }
5337
+ return context;
5338
+ }
5339
+
5340
+ // src/components/organisms/upload/file-upload.tsx
5341
+ import * as React24 from "react";
5342
+
5343
+ // src/components/organisms/upload/utils.ts
5344
+ function formatSizeLimit(bytes) {
5345
+ if (bytes < 1024 * 1024) {
5346
+ return `${Math.max(1, Math.round(bytes / 1024))} KB`;
5347
+ }
5348
+ return `${(bytes / (1024 * 1024)).toLocaleString("pt-BR", {
5349
+ maximumFractionDigits: 1,
5350
+ minimumFractionDigits: 0
5351
+ })} MB`;
5352
+ }
5353
+ function formatFileSize(bytes) {
5354
+ if (bytes < 1024 * 1024) {
5355
+ return `${Math.max(1, Math.round(bytes / 1024))} KB`;
5356
+ }
5357
+ return `${(bytes / (1024 * 1024)).toLocaleString("pt-BR", {
5358
+ maximumFractionDigits: 1,
5359
+ minimumFractionDigits: 0
5360
+ })} MB`;
5361
+ }
5362
+ function isDuplicateFile(file, files) {
5363
+ return files.some(
5364
+ (currentFile) => currentFile.name === file.name && currentFile.size === file.size
5365
+ );
5366
+ }
5367
+ function validateFiles({
5368
+ currentFiles = [],
5369
+ incomingFiles,
5370
+ allowedTypes,
5371
+ maxSize,
5372
+ multiple = true
5373
+ }) {
5374
+ const acceptedFiles = [];
5375
+ const rejectedFiles = [];
5376
+ const baseFiles = multiple ? currentFiles : [];
5377
+ for (const file of incomingFiles) {
5378
+ if (allowedTypes?.length && !allowedTypes.includes(file.type)) {
5379
+ rejectedFiles.push({
5380
+ file,
5381
+ reason: "type",
5382
+ message: `Tipo n\xE3o permitido: ${file.name}`
5383
+ });
5384
+ continue;
5385
+ }
5386
+ if (maxSize !== void 0 && file.size > maxSize) {
5387
+ rejectedFiles.push({
5388
+ file,
5389
+ reason: "size",
5390
+ message: `Arquivo maior que ${formatSizeLimit(maxSize)}: ${file.name}`
5391
+ });
5392
+ continue;
5393
+ }
5394
+ if (isDuplicateFile(file, [...baseFiles, ...acceptedFiles])) {
5395
+ rejectedFiles.push({
5396
+ file,
5397
+ reason: "duplicate",
5398
+ message: `Arquivo j\xE1 adicionado: ${file.name}`
5399
+ });
5400
+ continue;
5401
+ }
5402
+ if (!multiple) {
5403
+ acceptedFiles.splice(0, acceptedFiles.length, file);
5404
+ continue;
5405
+ }
5406
+ acceptedFiles.push(file);
5407
+ }
5408
+ return { acceptedFiles, rejectedFiles };
5409
+ }
5410
+
5411
+ // src/components/organisms/upload/file-list.tsx
5412
+ import { Fragment as Fragment6, jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
5413
+ function FileList({
5414
+ items,
5415
+ onRemove,
5416
+ onDownload,
5417
+ disabled = false,
5418
+ variant = "bordered",
5419
+ emptyState,
5420
+ removeLabel = "Remover",
5421
+ className,
5422
+ ...props
5423
+ }) {
5424
+ if (items.length === 0) {
5425
+ return emptyState ? /* @__PURE__ */ jsx36(Fragment6, { children: emptyState }) : null;
5426
+ }
5427
+ return /* @__PURE__ */ jsx36(
5428
+ "ul",
5429
+ {
5430
+ className: cn(
5431
+ "cnc-divide-y",
5432
+ 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",
5433
+ className
5434
+ ),
5435
+ ...props,
5436
+ children: items.map((item, index) => {
5437
+ const canRemove = !!onRemove;
5438
+ const canDownload = !!onDownload;
5439
+ const isDisabled = disabled || item.disabled;
5440
+ const isPending = item.status === "pending";
5441
+ return /* @__PURE__ */ jsxs27(
5442
+ "li",
5443
+ {
5444
+ className: cn(
5445
+ "cnc-flex cnc-flex-col cnc-gap-2",
5446
+ 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"
5447
+ ),
5448
+ children: [
5449
+ /* @__PURE__ */ jsxs27("div", { className: "cnc-flex cnc-min-w-0 cnc-flex-1 cnc-items-start cnc-gap-2", children: [
5450
+ /* @__PURE__ */ jsx36(FileText, { className: "cnc-mt-0.5 cnc-size-4 cnc-shrink-0 cnc-text-slate-500" }),
5451
+ /* @__PURE__ */ jsxs27("div", { className: "cnc-min-w-0", children: [
5452
+ canDownload ? /* @__PURE__ */ jsxs27(
5453
+ "button",
5454
+ {
5455
+ type: "button",
5456
+ onClick: () => onDownload(item, index),
5457
+ disabled: isDisabled,
5458
+ 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",
5459
+ children: [
5460
+ /* @__PURE__ */ jsx36("span", { className: "cnc-min-w-0 cnc-truncate", children: item.name }),
5461
+ /* @__PURE__ */ jsx36(Download, { className: "cnc-size-3.5 cnc-shrink-0" })
5462
+ ]
5463
+ }
5464
+ ) : /* @__PURE__ */ jsx36("p", { className: "cnc-text-sm cnc-font-medium cnc-text-slate-800", children: /* @__PURE__ */ jsx36("span", { className: "cnc-break-all", children: item.name }) }),
5465
+ (item.meta || item.size !== void 0) && /* @__PURE__ */ jsxs27("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: [
5466
+ item.meta,
5467
+ item.meta && item.size !== void 0 ? /* @__PURE__ */ jsx36("span", { children: "\xB7" }) : null,
5468
+ item.size !== void 0 ? /* @__PURE__ */ jsx36("span", { children: formatFileSize(item.size) }) : null
5469
+ ] }),
5470
+ item.description ? /* @__PURE__ */ jsx36("p", { className: "cnc-mt-1 cnc-line-clamp-2 cnc-text-xs cnc-text-slate-600", children: item.description }) : null
5471
+ ] })
5472
+ ] }),
5473
+ canRemove ? isPending ? /* @__PURE__ */ jsx36(
5474
+ "button",
5475
+ {
5476
+ type: "button",
5477
+ onClick: () => onRemove(item, index),
5478
+ disabled: isDisabled,
5479
+ 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",
5480
+ "aria-label": `Remover ${item.name}`,
5481
+ children: /* @__PURE__ */ jsx36(X, { className: "cnc-size-4" })
5482
+ }
5483
+ ) : /* @__PURE__ */ jsxs27(
5484
+ "button",
5485
+ {
5486
+ type: "button",
5487
+ onClick: () => onRemove(item, index),
5488
+ disabled: isDisabled,
5489
+ 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",
5490
+ "aria-label": `Remover ${item.name}`,
5491
+ children: [
5492
+ /* @__PURE__ */ jsx36(Trash2, { className: "cnc-size-4" }),
5493
+ removeLabel
5494
+ ]
5495
+ }
5496
+ ) : null
5497
+ ]
5498
+ },
5499
+ item.id
5500
+ );
5501
+ })
5502
+ }
5503
+ );
5504
+ }
5505
+
5506
+ // src/components/organisms/upload/file-upload.tsx
5507
+ import { jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
5508
+ function fileToListItem(file, index) {
5509
+ return {
5510
+ id: `${file.name}-${file.size}-${file.lastModified}-${index}`,
5511
+ name: file.name,
5512
+ size: file.size,
5513
+ status: "pending"
5514
+ };
5515
+ }
5516
+ var FileUpload = React24.forwardRef(
5517
+ ({
5518
+ value = [],
5519
+ onChange,
5520
+ multiple = true,
5521
+ accept,
5522
+ allowedTypes,
5523
+ maxSize,
5524
+ disabled = false,
5525
+ isLoading = false,
5526
+ buttonLabel = "Adicionar arquivos",
5527
+ hint,
5528
+ icon,
5529
+ onReject,
5530
+ showList = true,
5531
+ listTitle = (count) => `Arquivos selecionados (${count})`,
5532
+ className,
5533
+ buttonClassName,
5534
+ listClassName,
5535
+ ...props
5536
+ }, ref) => {
5537
+ const fileInputRef = React24.useRef(null);
5538
+ const hintId = React24.useId();
5539
+ React24.useImperativeHandle(ref, () => fileInputRef.current, []);
5540
+ const isBusy = disabled || isLoading;
5541
+ const items = value.map(fileToListItem);
5542
+ const clearInput = () => {
5543
+ if (fileInputRef.current) {
5544
+ fileInputRef.current.value = "";
5545
+ }
5546
+ };
5547
+ const handleFileSelection = (event) => {
5548
+ const selectedFiles = Array.from(event.target.files ?? []);
5549
+ if (!selectedFiles.length) {
5550
+ clearInput();
5551
+ return;
5552
+ }
5553
+ const { acceptedFiles, rejectedFiles } = validateFiles({
5554
+ currentFiles: value,
5555
+ incomingFiles: selectedFiles,
5556
+ allowedTypes,
5557
+ maxSize,
5558
+ multiple
5559
+ });
5560
+ if (acceptedFiles.length > 0) {
5561
+ onChange?.(multiple ? [...value, ...acceptedFiles] : acceptedFiles.slice(0, 1));
5562
+ }
5563
+ if (rejectedFiles.length > 0) {
5564
+ onReject?.(rejectedFiles);
5565
+ }
5566
+ clearInput();
5567
+ };
5568
+ const handleRemove = (_item, index) => {
5569
+ onChange?.(value.filter((_, currentIndex) => currentIndex !== index));
5570
+ };
5571
+ return /* @__PURE__ */ jsxs28("div", { className: cn("cnc-flex cnc-min-w-0 cnc-flex-col cnc-gap-3", className), ...props, children: [
5572
+ /* @__PURE__ */ jsx37(
5573
+ "input",
5574
+ {
5575
+ ref: fileInputRef,
5576
+ type: "file",
5577
+ multiple,
5578
+ accept,
5579
+ className: "cnc-sr-only",
5580
+ tabIndex: -1,
5581
+ disabled: isBusy,
5582
+ "aria-describedby": hint ? hintId : void 0,
5583
+ onChange: handleFileSelection
5584
+ }
5585
+ ),
5586
+ /* @__PURE__ */ jsx37("div", { className: "cnc-flex cnc-flex-col cnc-gap-2 sm:cnc-flex-row sm:cnc-flex-wrap sm:cnc-items-center", children: /* @__PURE__ */ jsxs28(
5587
+ Button,
5588
+ {
5589
+ type: "button",
5590
+ variant: "outline",
5591
+ disabled: isBusy,
5592
+ className: buttonClassName,
5593
+ onClick: () => fileInputRef.current?.click(),
5594
+ children: [
5595
+ icon ?? /* @__PURE__ */ jsx37(Paperclip, { className: "cnc-mr-2 cnc-size-4" }),
5596
+ buttonLabel
5597
+ ]
5598
+ }
5599
+ ) }),
5600
+ hint ? /* @__PURE__ */ jsx37("p", { id: hintId, className: "cnc-text-sm cnc-text-slate-600", children: hint }) : null,
5601
+ showList && items.length > 0 ? /* @__PURE__ */ jsxs28("div", { className: "cnc-flex cnc-flex-col cnc-gap-2", children: [
5602
+ /* @__PURE__ */ jsx37("p", { role: "status", className: "cnc-text-sm cnc-font-medium cnc-text-slate-700", children: listTitle(items.length) }),
5603
+ /* @__PURE__ */ jsx37(
5604
+ FileList,
5605
+ {
5606
+ items,
5607
+ onRemove: handleRemove,
5608
+ disabled: isBusy,
5609
+ className: listClassName
5610
+ }
5611
+ )
5612
+ ] }) : null
5613
+ ] });
5614
+ }
5615
+ );
5616
+ FileUpload.displayName = "FileUpload";
5617
+
5618
+ // src/components/organisms/calendar/calendar-utils.ts
5619
+ var MESES_PT_BR = [
5620
+ "Janeiro",
5621
+ "Fevereiro",
5622
+ "Mar\xE7o",
5623
+ "Abril",
5624
+ "Maio",
5625
+ "Junho",
5626
+ "Julho",
5627
+ "Agosto",
5628
+ "Setembro",
5629
+ "Outubro",
5630
+ "Novembro",
5631
+ "Dezembro"
5632
+ ];
5633
+ var MESES_PT_BR_ABREV = [
5634
+ "JAN",
5635
+ "FEV",
5636
+ "MAR",
5637
+ "ABR",
5638
+ "MAI",
5639
+ "JUN",
5640
+ "JUL",
5641
+ "AGO",
5642
+ "SET",
5643
+ "OUT",
5644
+ "NOV",
5645
+ "DEZ"
5646
+ ];
5647
+ var DIAS_SEMANA_PT_BR = ["DOM", "SEG", "TER", "QUA", "QUI", "SEX", "S\xC1B"];
5648
+ function toDateKey(date) {
5649
+ const ano = date.getFullYear();
5650
+ const mes = String(date.getMonth() + 1).padStart(2, "0");
5651
+ const dia = String(date.getDate()).padStart(2, "0");
5652
+ return `${ano}-${mes}-${dia}`;
5653
+ }
5654
+ function toLocalNoon(date) {
5655
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), 12, 0, 0, 0);
5656
+ }
5657
+ function isSameDay(a, b) {
5658
+ return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
5659
+ }
5660
+ function isToday(date) {
5661
+ return isSameDay(date, /* @__PURE__ */ new Date());
5662
+ }
5663
+ function buildMonthDays(month, selectedDate, hasItems) {
5664
+ const year = month.getFullYear();
5665
+ const monthIndex = month.getMonth();
5666
+ const totalDays = new Date(year, monthIndex + 1, 0).getDate();
5667
+ const startOffset = new Date(year, monthIndex, 1).getDay();
5668
+ const cells = [];
5669
+ for (let i = 0; i < startOffset; i++) {
5670
+ cells.push(null);
5671
+ }
5672
+ for (let day = 1; day <= totalDays; day++) {
5673
+ const date = new Date(year, monthIndex, day, 12, 0, 0, 0);
5674
+ cells.push({
5675
+ date,
5676
+ number: day,
5677
+ dateKey: toDateKey(date),
5678
+ isToday: isToday(date),
5679
+ isSelected: selectedDate ? isSameDay(date, selectedDate) : false,
5680
+ hasItems: hasItems?.(date) ?? false
5681
+ });
5682
+ }
5683
+ return cells;
5684
+ }
5685
+ function formatMonthYear(date) {
5686
+ return `${MESES_PT_BR[date.getMonth()]} ${date.getFullYear()}`;
5687
+ }
5688
+ function formatDayAriaLabel(date) {
5689
+ return date.toLocaleDateString("pt-BR", {
5690
+ weekday: "long",
5691
+ day: "numeric",
5692
+ month: "long",
5693
+ year: "numeric"
5694
+ });
5695
+ }
5696
+
5697
+ // src/components/organisms/calendar/mini-month-calendar.tsx
5698
+ import * as React25 from "react";
5699
+ import { Fragment as Fragment7, jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
5700
+ function MiniMonthCalendar({
5701
+ month: monthProp,
5702
+ onMonthChange,
5703
+ selectedDate,
5704
+ onSelectDate,
5705
+ hasItems,
5706
+ renderDay,
5707
+ weekDays = DIAS_SEMANA_PT_BR,
5708
+ monthLabel = formatMonthYear,
5709
+ previousLabel = "M\xEAs anterior",
5710
+ nextLabel = "Pr\xF3ximo m\xEAs",
5711
+ className
5712
+ }) {
5713
+ const month = React25.useMemo(() => toLocalNoon(monthProp ?? /* @__PURE__ */ new Date()), [monthProp]);
5714
+ const cells = React25.useMemo(
5715
+ () => buildMonthDays(month, selectedDate, hasItems),
5716
+ [month, selectedDate, hasItems]
5717
+ );
5718
+ const goToMonth = (offset) => {
5719
+ onMonthChange?.(
5720
+ new Date(month.getFullYear(), month.getMonth() + offset, 1, 12, 0, 0, 0)
5721
+ );
5722
+ };
5723
+ return /* @__PURE__ */ jsxs29("div", { className: cn("cnc-w-full", className), children: [
5724
+ /* @__PURE__ */ jsxs29("div", { className: "cnc-mb-4 cnc-flex cnc-items-center cnc-justify-between cnc-px-1", children: [
5725
+ /* @__PURE__ */ jsx38(
5726
+ "button",
5727
+ {
5728
+ type: "button",
5729
+ onClick: () => goToMonth(-1),
5730
+ "aria-label": previousLabel,
5731
+ 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",
5732
+ children: /* @__PURE__ */ jsx38(ChevronLeft, { className: "cnc-size-4" })
5733
+ }
5734
+ ),
5735
+ /* @__PURE__ */ jsx38("span", { className: "cnc-text-sm cnc-font-bold cnc-text-primary", children: monthLabel(month) }),
5736
+ /* @__PURE__ */ jsx38(
5737
+ "button",
5738
+ {
5739
+ type: "button",
5740
+ onClick: () => goToMonth(1),
5741
+ "aria-label": nextLabel,
5742
+ 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",
5743
+ children: /* @__PURE__ */ jsx38(ChevronRight, { className: "cnc-size-4" })
5744
+ }
5745
+ )
5746
+ ] }),
5747
+ /* @__PURE__ */ jsxs29("div", { className: "cnc-grid cnc-grid-cols-7 cnc-gap-y-3 cnc-text-center cnc-text-xs", children: [
5748
+ weekDays.map((dayName) => /* @__PURE__ */ jsx38(
5749
+ "span",
5750
+ {
5751
+ className: "cnc-text-[11px] cnc-font-medium cnc-text-brand-gray-200",
5752
+ children: dayName
5753
+ },
5754
+ dayName
5755
+ )),
5756
+ cells.map((cell, index) => {
5757
+ if (!cell) {
5758
+ return /* @__PURE__ */ jsx38("span", {}, `vazio-${index}`);
5759
+ }
5760
+ return /* @__PURE__ */ jsx38(
5761
+ "button",
5762
+ {
5763
+ type: "button",
5764
+ onClick: () => onSelectDate?.(cell.date),
5765
+ "aria-label": formatDayAriaLabel(cell.date),
5766
+ "aria-pressed": cell.isSelected,
5767
+ className: cn(
5768
+ "cnc-group cnc-relative cnc-flex cnc-h-8 cnc-flex-col cnc-items-center cnc-justify-center cnc-rounded-full cnc-transition-colors",
5769
+ cell.isSelected ? "cnc-bg-primary cnc-text-white" : "cnc-text-brand-gray-600 hover:cnc-bg-brand-blue-50 hover:cnc-text-primary",
5770
+ cell.isToday && !cell.isSelected && "cnc-underline cnc-decoration-primary cnc-decoration-2 cnc-underline-offset-4"
5771
+ ),
5772
+ children: renderDay ? renderDay(cell) : /* @__PURE__ */ jsxs29(Fragment7, { children: [
5773
+ /* @__PURE__ */ jsx38("span", { className: "cnc-text-xs cnc-font-semibold", children: cell.number }),
5774
+ cell.hasItems && /* @__PURE__ */ jsx38("span", { className: "cnc-absolute cnc-bottom-1 cnc-size-1 cnc-rounded-full cnc-bg-primary group-aria-pressed:cnc-bg-white" })
5775
+ ] })
5776
+ },
5777
+ cell.dateKey
5778
+ );
5779
+ })
5780
+ ] })
5781
+ ] });
5782
+ }
5783
+
5784
+ // src/components/organisms/calendar/month-year-picker.tsx
5785
+ import * as React26 from "react";
5786
+ import { jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
5787
+ function MonthYearPicker({
5788
+ value,
5789
+ onChange,
5790
+ disabled = false,
5791
+ triggerLabel = formatMonthYear,
5792
+ previousYearLabel = "Ano anterior",
5793
+ nextYearLabel = "Pr\xF3ximo ano",
5794
+ className,
5795
+ triggerClassName,
5796
+ contentClassName
5797
+ }) {
5798
+ const [open, setOpen] = React26.useState(false);
5799
+ const [viewYear, setViewYear] = React26.useState(() => value.getFullYear());
5800
+ React26.useEffect(() => {
5801
+ if (open) setViewYear(value.getFullYear());
5802
+ }, [open, value]);
5803
+ const isSelectedMonth = (monthIndex) => value.getFullYear() === viewYear && value.getMonth() === monthIndex;
5804
+ const handleMonthSelect = (monthIndex) => {
5805
+ const lastDay = new Date(viewYear, monthIndex + 1, 0).getDate();
5806
+ const day = Math.min(value.getDate(), lastDay);
5807
+ onChange(new Date(viewYear, monthIndex, day));
5808
+ setOpen(false);
5809
+ };
5810
+ return /* @__PURE__ */ jsxs30(Popover2, { open, onOpenChange: setOpen, children: [
5811
+ /* @__PURE__ */ jsx39(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs30(
5812
+ Button,
5813
+ {
5814
+ type: "button",
5815
+ variant: "outline",
5816
+ disabled,
5817
+ "aria-expanded": open,
5818
+ className: cn(
5819
+ "cnc-justify-between cnc-gap-2 cnc-font-bold",
5820
+ triggerClassName
5821
+ ),
5822
+ children: [
5823
+ /* @__PURE__ */ jsx39("span", { className: "cnc-text-sm", children: triggerLabel(value) }),
5824
+ /* @__PURE__ */ jsx39(
5825
+ ChevronDown,
5826
+ {
5827
+ className: cn(
5828
+ "cnc-size-4 cnc-transition-transform",
5829
+ open && "cnc-rotate-180"
5830
+ )
5831
+ }
5832
+ )
5833
+ ]
5834
+ }
5835
+ ) }),
5836
+ /* @__PURE__ */ jsxs30(
5837
+ PopoverContent2,
5838
+ {
5839
+ align: "start",
5840
+ className: cn("cnc-w-72 cnc-p-4", className, contentClassName),
5841
+ children: [
5842
+ /* @__PURE__ */ jsxs30("div", { className: "cnc-mb-4 cnc-flex cnc-items-center cnc-justify-between", children: [
5843
+ /* @__PURE__ */ jsx39(
5844
+ "button",
5845
+ {
5846
+ type: "button",
5847
+ onClick: () => setViewYear((prev) => prev - 1),
5848
+ "aria-label": previousYearLabel,
5849
+ 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",
5850
+ children: /* @__PURE__ */ jsx39(ChevronLeft, { className: "cnc-size-5" })
5851
+ }
5852
+ ),
5853
+ /* @__PURE__ */ jsx39("span", { className: "cnc-text-base cnc-font-bold cnc-text-primary", children: viewYear }),
5854
+ /* @__PURE__ */ jsx39(
5855
+ "button",
5856
+ {
5857
+ type: "button",
5858
+ onClick: () => setViewYear((prev) => prev + 1),
5859
+ "aria-label": nextYearLabel,
5860
+ 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",
5861
+ children: /* @__PURE__ */ jsx39(ChevronRight, { className: "cnc-size-5" })
5862
+ }
5863
+ )
5864
+ ] }),
5865
+ /* @__PURE__ */ jsx39("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__ */ jsx39(
5866
+ "button",
5867
+ {
5868
+ type: "button",
5869
+ onClick: () => handleMonthSelect(monthIndex),
5870
+ "aria-pressed": isSelectedMonth(monthIndex),
5871
+ className: cn(
5872
+ "cnc-rounded-lg cnc-py-2 cnc-text-[10px] cnc-font-bold cnc-uppercase cnc-transition-colors",
5873
+ 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"
5874
+ ),
5875
+ children: month
5876
+ },
5877
+ month
5878
+ )) })
5879
+ ]
5880
+ }
5881
+ )
5882
+ ] });
5883
+ }
5884
+
5885
+ // src/components/organisms/period-range-list/index.tsx
5886
+ import * as React27 from "react";
5887
+ import { jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
5888
+ var DEFAULT_LABELS = {
5889
+ start: "In\xEDcio",
5890
+ end: "Fim",
5891
+ add: "Adicionar",
5892
+ empty: "Nenhum per\xEDodo adicionado.",
5893
+ startColumn: "In\xEDcio",
5894
+ endColumn: "Fim",
5895
+ actionsColumn: "A\xE7\xF5es"
5896
+ };
5897
+ function createPeriodId() {
5898
+ return `period-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
5899
+ }
5900
+ function normalizePeriods(periods) {
5901
+ return periods.map((period) => ({
5902
+ ...period,
5903
+ id: period.id ?? createPeriodId()
5904
+ }));
5905
+ }
5906
+ function formatForDisplay(value, inputType) {
5907
+ if (!value) return "";
5908
+ if (inputType === "date") {
5909
+ const [year2, month2, day2] = value.split("-");
5910
+ if (year2 && month2 && day2) return `${day2}/${month2}/${year2}`;
5911
+ return value;
5912
+ }
5913
+ const normalized = value.slice(0, 16);
5914
+ const [datePart, timePart] = normalized.split("T");
5915
+ if (!datePart) return value;
5916
+ const [year, month, day] = datePart.split("-");
5917
+ const dateText = year && month && day ? `${day}/${month}/${year}` : datePart;
5918
+ return timePart ? `${dateText} ${timePart}` : dateText;
5919
+ }
5920
+ function splitDisplay(value, inputType) {
5921
+ const formatted = formatForDisplay(value, inputType);
5922
+ if (inputType === "date") {
5923
+ return { date: formatted, time: "" };
5924
+ }
5925
+ const parts = formatted.split(" ");
5926
+ if (parts.length <= 1) {
5927
+ return { date: formatted, time: "" };
5928
+ }
5929
+ const time = parts.pop() ?? "";
5930
+ return { date: parts.join(" "), time };
5931
+ }
5932
+ function PeriodRangeList({
5933
+ value = [],
5934
+ onChange,
5935
+ inputType = "datetime-local",
5936
+ labels: labelsProp,
5937
+ readOnly = false,
5938
+ disabled = false,
5939
+ required = false,
5940
+ error,
5941
+ validate,
5942
+ className
5943
+ }) {
5944
+ const labels = { ...DEFAULT_LABELS, ...labelsProp };
5945
+ const endAfterStart = validate?.endAfterStart ?? true;
5946
+ const noDuplicates = validate?.noDuplicates ?? true;
5947
+ const [startDraft, setStartDraft] = React27.useState("");
5948
+ const [endDraft, setEndDraft] = React27.useState("");
5949
+ const periods = React27.useMemo(() => normalizePeriods(value), [value]);
5950
+ const isInvalidRange = Boolean(startDraft && endDraft) && endAfterStart && startDraft >= endDraft;
5951
+ const isDuplicate = Boolean(startDraft && endDraft) && noDuplicates && periods.some(
5952
+ (period) => period.start === startDraft && period.end === endDraft
5953
+ );
5954
+ const canAdd = Boolean(startDraft && endDraft) && !isInvalidRange && !isDuplicate;
5955
+ const addTitle = isDuplicate ? "Este per\xEDodo j\xE1 foi adicionado" : isInvalidRange ? "A data final deve ser posterior \xE0 data inicial" : void 0;
5956
+ function emitChange(next) {
5957
+ onChange?.(normalizePeriods(next));
5958
+ }
5959
+ function handleAdd() {
5960
+ if (!canAdd || disabled || readOnly) return;
5961
+ emitChange([
5962
+ ...periods,
5963
+ {
5964
+ id: createPeriodId(),
5965
+ start: startDraft,
5966
+ end: endDraft
5967
+ }
5968
+ ]);
5969
+ setStartDraft("");
5970
+ setEndDraft("");
5971
+ }
5972
+ function handleRemove(id) {
5973
+ if (disabled || readOnly) return;
5974
+ emitChange(periods.filter((period) => period.id !== id));
5975
+ }
5976
+ const showRequiredOnInputs = required && periods.length === 0;
5977
+ return /* @__PURE__ */ jsxs31("div", { className: cn("cnc-w-full cnc-space-y-4", className), children: [
5978
+ !readOnly && /* @__PURE__ */ jsxs31("div", { className: "cnc-grid cnc-grid-cols-1 md:cnc-grid-cols-12 cnc-gap-4 cnc-items-end", children: [
5979
+ /* @__PURE__ */ jsx40("div", { className: "md:cnc-col-span-5", children: /* @__PURE__ */ jsx40(
5980
+ Input,
5981
+ {
5982
+ type: inputType,
5983
+ label: labels.start,
5984
+ required: showRequiredOnInputs,
5985
+ value: startDraft,
5986
+ disabled,
5987
+ onChange: (event) => setStartDraft(event.target.value)
5988
+ }
5989
+ ) }),
5990
+ /* @__PURE__ */ jsx40("div", { className: "md:cnc-col-span-5", children: /* @__PURE__ */ jsx40(
5991
+ Input,
5992
+ {
5993
+ type: inputType,
5994
+ label: labels.end,
5995
+ required: showRequiredOnInputs,
5996
+ value: endDraft,
5997
+ min: startDraft || void 0,
5998
+ disabled,
5999
+ onChange: (event) => setEndDraft(event.target.value)
6000
+ }
6001
+ ) }),
6002
+ /* @__PURE__ */ jsx40("div", { className: "md:cnc-col-span-2", children: /* @__PURE__ */ jsxs31(
6003
+ Button,
6004
+ {
6005
+ type: "button",
6006
+ variant: "outline",
6007
+ className: "cnc-w-full cnc-gap-2",
6008
+ disabled: !canAdd || disabled,
6009
+ title: addTitle,
6010
+ onClick: handleAdd,
6011
+ children: [
6012
+ /* @__PURE__ */ jsx40(Plus, { className: "cnc-h-4 cnc-w-4" }),
6013
+ labels.add
6014
+ ]
6015
+ }
6016
+ ) })
6017
+ ] }),
6018
+ /* @__PURE__ */ jsx40("div", { className: "cnc-overflow-hidden cnc-rounded-lg cnc-border cnc-border-brand-gray-50 cnc-shadow-sm", children: /* @__PURE__ */ jsxs31("table", { className: "cnc-min-w-full cnc-divide-y cnc-divide-brand-gray-50", children: [
6019
+ /* @__PURE__ */ jsx40("thead", { className: "cnc-bg-brand-gray-10", children: /* @__PURE__ */ jsxs31("tr", { children: [
6020
+ /* @__PURE__ */ jsx40("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 }),
6021
+ /* @__PURE__ */ jsx40("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 }),
6022
+ !readOnly && /* @__PURE__ */ jsx40("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 })
6023
+ ] }) }),
6024
+ /* @__PURE__ */ jsxs31("tbody", { className: "cnc-divide-y cnc-divide-brand-gray-50 cnc-bg-white cnc-text-sm", children: [
6025
+ periods.map((period) => {
6026
+ const startDisplay = splitDisplay(period.start, inputType);
6027
+ const endDisplay = splitDisplay(period.end, inputType);
6028
+ return /* @__PURE__ */ jsxs31("tr", { className: "hover:cnc-bg-brand-gray-10/50", children: [
6029
+ /* @__PURE__ */ jsxs31("td", { className: "cnc-px-6 cnc-py-4 cnc-text-brand-gray-600", children: [
6030
+ /* @__PURE__ */ jsx40("span", { className: "cnc-font-medium cnc-text-brand-gray-600", children: startDisplay.date }),
6031
+ startDisplay.time ? /* @__PURE__ */ jsx40("span", { className: "cnc-ml-2 cnc-text-brand-gray-200", children: startDisplay.time }) : null
6032
+ ] }),
6033
+ /* @__PURE__ */ jsxs31("td", { className: "cnc-px-6 cnc-py-4 cnc-text-brand-gray-600", children: [
6034
+ /* @__PURE__ */ jsx40("span", { className: "cnc-font-medium cnc-text-brand-gray-600", children: endDisplay.date }),
6035
+ endDisplay.time ? /* @__PURE__ */ jsx40("span", { className: "cnc-ml-2 cnc-text-brand-gray-200", children: endDisplay.time }) : null
6036
+ ] }),
6037
+ !readOnly && /* @__PURE__ */ jsx40("td", { className: "cnc-px-6 cnc-py-4 cnc-text-right", children: /* @__PURE__ */ jsx40(
6038
+ "button",
6039
+ {
6040
+ type: "button",
6041
+ className: "cnc-text-brand-gray-200 hover:cnc-text-brand-red-500 cnc-transition-colors disabled:cnc-opacity-50",
6042
+ disabled,
6043
+ "aria-label": "Remover per\xEDodo",
6044
+ onClick: () => handleRemove(period.id),
6045
+ children: /* @__PURE__ */ jsx40(Trash2, { className: "cnc-h-5 cnc-w-5" })
6046
+ }
6047
+ ) })
6048
+ ] }, period.id);
6049
+ }),
6050
+ periods.length === 0 && /* @__PURE__ */ jsx40("tr", { children: /* @__PURE__ */ jsx40(
6051
+ "td",
6052
+ {
6053
+ colSpan: readOnly ? 2 : 3,
6054
+ className: "cnc-px-6 cnc-py-8 cnc-text-center cnc-text-brand-gray-200 cnc-italic",
6055
+ children: labels.empty
6056
+ }
6057
+ ) })
6058
+ ] })
6059
+ ] }) }),
6060
+ error ? /* @__PURE__ */ jsx40("p", { className: "cnc-text-xs cnc-font-medium cnc-text-brand-red-500", children: error }) : null
6061
+ ] });
6062
+ }
6063
+ var DateTimeRangeList = PeriodRangeList;
6064
+
4678
6065
  // src/components/organisms/header-notifications/index.tsx
4679
- import * as React18 from "react";
6066
+ import * as React29 from "react";
4680
6067
 
4681
6068
  // src/components/organisms/header-notifications/cliente.ts
4682
6069
  var URL_PADRAO_NOTIFICACOES = "https://dev-apinotificacoes-b5feekb4bdfyb7c2.eastus2-01.azurewebsites.net/v1";
@@ -4871,7 +6258,7 @@ function mapearParaItem(notificacao, getHref, agora) {
4871
6258
  }
4872
6259
 
4873
6260
  // src/components/organisms/header-notifications/modal-lembretes.tsx
4874
- import { jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
6261
+ import { jsx as jsx41, jsxs as jsxs32 } from "react/jsx-runtime";
4875
6262
  function ModalLembretes({
4876
6263
  lembretes,
4877
6264
  aberto,
@@ -4881,46 +6268,46 @@ function ModalLembretes({
4881
6268
  }) {
4882
6269
  const visivel = aberto && lembretes.length > 0;
4883
6270
  const tituloExibido = titulo ?? (lembretes.length === 1 ? "Voc\xEA tem um lembrete" : "Voc\xEA tem lembretes");
4884
- return /* @__PURE__ */ jsx25(
6271
+ return /* @__PURE__ */ jsx41(
4885
6272
  Dialog,
4886
6273
  {
4887
6274
  open: visivel,
4888
6275
  onOpenChange: (proximoEstado) => {
4889
6276
  if (!proximoEstado) onDispensar();
4890
6277
  },
4891
- children: /* @__PURE__ */ jsxs19(
6278
+ children: /* @__PURE__ */ jsxs32(
4892
6279
  DialogContent,
4893
6280
  {
4894
6281
  className: "cnc-max-w-[440px] cnc-rounded-lg cnc-bg-white cnc-p-0",
4895
6282
  onOpenAutoFocus: (evento) => evento.preventDefault(),
4896
6283
  children: [
4897
- /* @__PURE__ */ jsxs19("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: [
4898
- /* @__PURE__ */ jsx25("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__ */ jsx25(
6284
+ /* @__PURE__ */ jsxs32("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: [
6285
+ /* @__PURE__ */ jsx41("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__ */ jsx41(
4899
6286
  BellRing,
4900
6287
  {
4901
6288
  className: "cnc-h-[18px] cnc-w-[18px] cnc-text-brand-blue-400",
4902
6289
  "aria-hidden": "true"
4903
6290
  }
4904
6291
  ) }),
4905
- /* @__PURE__ */ jsx25(DialogTitle, { className: "cnc-m-0 cnc-text-base cnc-font-extrabold cnc-text-brand-blue-900", children: tituloExibido })
6292
+ /* @__PURE__ */ jsx41(DialogTitle, { className: "cnc-m-0 cnc-text-base cnc-font-extrabold cnc-text-brand-blue-900", children: tituloExibido })
4906
6293
  ] }),
4907
- /* @__PURE__ */ jsx25("ul", { className: "cnc-m-0 cnc-max-h-[320px] cnc-list-none cnc-overflow-y-auto cnc-p-0", children: lembretes.map((lembrete) => /* @__PURE__ */ jsxs19(
6294
+ /* @__PURE__ */ jsx41("ul", { className: "cnc-m-0 cnc-max-h-[320px] cnc-list-none cnc-overflow-y-auto cnc-p-0", children: lembretes.map((lembrete) => /* @__PURE__ */ jsxs32(
4908
6295
  "li",
4909
6296
  {
4910
6297
  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",
4911
6298
  children: [
4912
- /* @__PURE__ */ jsxs19("div", { className: "cnc-flex cnc-items-baseline cnc-justify-between cnc-gap-3", children: [
4913
- /* @__PURE__ */ jsx25("span", { className: "cnc-text-sm cnc-font-bold cnc-text-brand-blue-900", children: lembrete.titulo }),
4914
- /* @__PURE__ */ jsx25("span", { className: "cnc-shrink-0 cnc-text-[11px] cnc-text-brand-gray-600", children: formatarDataRelativa(lembrete.dataLembrete) })
6299
+ /* @__PURE__ */ jsxs32("div", { className: "cnc-flex cnc-items-baseline cnc-justify-between cnc-gap-3", children: [
6300
+ /* @__PURE__ */ jsx41("span", { className: "cnc-text-sm cnc-font-bold cnc-text-brand-blue-900", children: lembrete.titulo }),
6301
+ /* @__PURE__ */ jsx41("span", { className: "cnc-shrink-0 cnc-text-[11px] cnc-text-brand-gray-600", children: formatarDataRelativa(lembrete.dataLembrete) })
4915
6302
  ] }),
4916
- lembrete.mensagem && /* @__PURE__ */ jsx25("span", { className: "cnc-text-xs cnc-leading-relaxed cnc-text-brand-gray-600", children: lembrete.mensagem })
6303
+ lembrete.mensagem && /* @__PURE__ */ jsx41("span", { className: "cnc-text-xs cnc-leading-relaxed cnc-text-brand-gray-600", children: lembrete.mensagem })
4917
6304
  ]
4918
6305
  },
4919
6306
  lembrete.id
4920
6307
  )) }),
4921
- /* @__PURE__ */ jsxs19("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: [
4922
- /* @__PURE__ */ jsx25(Button, { variant: "confirm", className: "cnc-w-full", onClick: onDispensar, children: rotuloDispensar }),
4923
- /* @__PURE__ */ jsx25("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.` })
6308
+ /* @__PURE__ */ jsxs32("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: [
6309
+ /* @__PURE__ */ jsx41(Button, { variant: "confirm", className: "cnc-w-full", onClick: onDispensar, children: rotuloDispensar }),
6310
+ /* @__PURE__ */ jsx41("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.` })
4924
6311
  ] })
4925
6312
  ]
4926
6313
  }
@@ -4930,7 +6317,7 @@ function ModalLembretes({
4930
6317
  }
4931
6318
 
4932
6319
  // src/components/organisms/header-notifications/usar-notificacoes.ts
4933
- import * as React17 from "react";
6320
+ import * as React28 from "react";
4934
6321
  function foiAbortado(erro) {
4935
6322
  return erro?.name === "AbortError";
4936
6323
  }
@@ -4943,20 +6330,20 @@ function usarNotificacoes({
4943
6330
  habilitado = true,
4944
6331
  onErro
4945
6332
  }) {
4946
- const [notificacoes, setNotificacoes] = React17.useState([]);
4947
- const [carregando, setCarregando] = React17.useState(habilitado);
4948
- const notificacoesRef = React17.useRef(notificacoes);
4949
- const controladorRef = React17.useRef(null);
4950
- const jaCarregouRef = React17.useRef(false);
4951
- const onErroRef = React17.useRef(onErro);
4952
- React17.useEffect(() => {
6333
+ const [notificacoes, setNotificacoes] = React28.useState([]);
6334
+ const [carregando, setCarregando] = React28.useState(habilitado);
6335
+ const notificacoesRef = React28.useRef(notificacoes);
6336
+ const controladorRef = React28.useRef(null);
6337
+ const jaCarregouRef = React28.useRef(false);
6338
+ const onErroRef = React28.useRef(onErro);
6339
+ React28.useEffect(() => {
4953
6340
  notificacoesRef.current = notificacoes;
4954
6341
  }, [notificacoes]);
4955
- React17.useEffect(() => {
6342
+ React28.useEffect(() => {
4956
6343
  onErroRef.current = onErro;
4957
6344
  }, [onErro]);
4958
6345
  const chaveFiltros = JSON.stringify(filtros ?? {});
4959
- const atualizar = React17.useCallback(() => {
6346
+ const atualizar = React28.useCallback(() => {
4960
6347
  if (!habilitado) return;
4961
6348
  controladorRef.current?.abort();
4962
6349
  const controlador = new AbortController();
@@ -4983,7 +6370,7 @@ function usarNotificacoes({
4983
6370
  }
4984
6371
  })();
4985
6372
  }, [baseUrl, email, sistema, chaveFiltros, habilitado]);
4986
- React17.useEffect(() => {
6373
+ React28.useEffect(() => {
4987
6374
  if (!habilitado) {
4988
6375
  setCarregando(false);
4989
6376
  return;
@@ -4992,7 +6379,7 @@ function usarNotificacoes({
4992
6379
  atualizar();
4993
6380
  return () => controladorRef.current?.abort();
4994
6381
  }, [atualizar, habilitado]);
4995
- React17.useEffect(() => {
6382
+ React28.useEffect(() => {
4996
6383
  if (!habilitado || !intervaloAtualizacao) return;
4997
6384
  const temporizador = window.setInterval(() => {
4998
6385
  if (typeof document !== "undefined" && document.hidden) return;
@@ -5000,7 +6387,7 @@ function usarNotificacoes({
5000
6387
  }, intervaloAtualizacao);
5001
6388
  return () => window.clearInterval(temporizador);
5002
6389
  }, [atualizar, habilitado, intervaloAtualizacao]);
5003
- const aplicarLeitura = React17.useCallback((ids) => {
6390
+ const aplicarLeitura = React28.useCallback((ids) => {
5004
6391
  const alvos = new Set(ids.map(String));
5005
6392
  setNotificacoes(
5006
6393
  (atuais) => atuais.map(
@@ -5008,7 +6395,7 @@ function usarNotificacoes({
5008
6395
  )
5009
6396
  );
5010
6397
  }, []);
5011
- const reverterLeitura = React17.useCallback((anteriores) => {
6398
+ const reverterLeitura = React28.useCallback((anteriores) => {
5012
6399
  const original = new Map(
5013
6400
  anteriores.map((notificacao) => [String(notificacao.id), notificacao])
5014
6401
  );
@@ -5023,7 +6410,7 @@ function usarNotificacoes({
5023
6410
  })
5024
6411
  );
5025
6412
  }, []);
5026
- const marcarUmaComoLida = React17.useCallback(
6413
+ const marcarUmaComoLida = React28.useCallback(
5027
6414
  (id) => {
5028
6415
  const alvo = notificacoesRef.current.find(
5029
6416
  (notificacao) => String(notificacao.id) === String(id)
@@ -5037,7 +6424,7 @@ function usarNotificacoes({
5037
6424
  },
5038
6425
  [baseUrl, aplicarLeitura, reverterLeitura]
5039
6426
  );
5040
- const marcarComoLidas = React17.useCallback(
6427
+ const marcarComoLidas = React28.useCallback(
5041
6428
  (ids) => {
5042
6429
  const alvos = new Set(ids.map(String));
5043
6430
  const naoLidas = notificacoesRef.current.filter(
@@ -5055,10 +6442,10 @@ function usarNotificacoes({
5055
6442
  },
5056
6443
  [baseUrl, aplicarLeitura, reverterLeitura]
5057
6444
  );
5058
- const marcarTodasComoLidas = React17.useCallback(() => {
6445
+ const marcarTodasComoLidas = React28.useCallback(() => {
5059
6446
  marcarComoLidas(notificacoesRef.current.map((notificacao) => notificacao.id));
5060
6447
  }, [marcarComoLidas]);
5061
- const marcarUmaComoNaoLida = React17.useCallback(
6448
+ const marcarUmaComoNaoLida = React28.useCallback(
5062
6449
  (id) => {
5063
6450
  const alvo = notificacoesRef.current.find(
5064
6451
  (notificacao) => String(notificacao.id) === String(id)
@@ -5076,7 +6463,7 @@ function usarNotificacoes({
5076
6463
  },
5077
6464
  [baseUrl, reverterLeitura]
5078
6465
  );
5079
- const excluir = React17.useCallback(
6466
+ const excluir = React28.useCallback(
5080
6467
  (id) => {
5081
6468
  const alvo = notificacoesRef.current.find(
5082
6469
  (notificacao) => String(notificacao.id) === String(id)
@@ -5105,7 +6492,7 @@ function usarNotificacoes({
5105
6492
  }
5106
6493
 
5107
6494
  // src/components/organisms/header-notifications/index.tsx
5108
- import { Fragment as Fragment6, jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
6495
+ import { Fragment as Fragment8, jsx as jsx42, jsxs as jsxs33 } from "react/jsx-runtime";
5109
6496
  function HeaderNotifications(props) {
5110
6497
  const {
5111
6498
  items = [],
@@ -5137,11 +6524,11 @@ function HeaderNotifications(props) {
5137
6524
  tituloLembretes,
5138
6525
  rotuloDispensarLembretes
5139
6526
  } = props;
5140
- const [aberto, setAberto] = React18.useState(false);
5141
- const [lembretesEmAlerta, setLembretesEmAlerta] = React18.useState(
6527
+ const [aberto, setAberto] = React29.useState(false);
6528
+ const [lembretesEmAlerta, setLembretesEmAlerta] = React29.useState(
5142
6529
  []
5143
6530
  );
5144
- const avaliouLembretesRef = React18.useRef(false);
6531
+ const avaliouLembretesRef = React29.useRef(false);
5145
6532
  const conectado = Boolean(email && sistema);
5146
6533
  const remoto = usarNotificacoes({
5147
6534
  email: email ?? "",
@@ -5152,17 +6539,17 @@ function HeaderNotifications(props) {
5152
6539
  habilitado: conectado,
5153
6540
  onErro
5154
6541
  });
5155
- const elegiveis = React18.useMemo(
6542
+ const elegiveis = React29.useMemo(
5156
6543
  () => conectado ? selecionarVisiveis(remoto.notificacoes) : [],
5157
6544
  [conectado, remoto.notificacoes]
5158
6545
  );
5159
- const itensRemotos = React18.useMemo(
6546
+ const itensRemotos = React29.useMemo(
5160
6547
  () => elegiveis.slice(0, limite).map((notificacao) => mapearParaItem(notificacao, getHref)),
5161
6548
  [elegiveis, limite, getHref]
5162
6549
  );
5163
6550
  const itens = conectado ? itensRemotos : items;
5164
6551
  const carregandoLista = conectado ? remoto.carregando : isLoading;
5165
- React18.useEffect(() => {
6552
+ React29.useEffect(() => {
5166
6553
  if (!conectado || !alertarLembretes) return;
5167
6554
  if (remoto.carregando || avaliouLembretesRef.current) return;
5168
6555
  avaliouLembretesRef.current = true;
@@ -5212,28 +6599,28 @@ function HeaderNotifications(props) {
5212
6599
  const anelDeFoco = "focus-visible:cnc-ring-2 focus-visible:cnc-ring-inset focus-visible:cnc-ring-brand-gray-500/50";
5213
6600
  const renderarConteudo = () => {
5214
6601
  if (carregandoLista) {
5215
- return /* @__PURE__ */ jsx26("div", { "aria-busy": "true", children: Array.from({ length: skeletonCount }).map((_, indice) => /* @__PURE__ */ jsx26(
6602
+ return /* @__PURE__ */ jsx42("div", { "aria-busy": "true", children: Array.from({ length: skeletonCount }).map((_, indice) => /* @__PURE__ */ jsx42(
5216
6603
  "div",
5217
6604
  {
5218
6605
  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",
5219
- children: /* @__PURE__ */ jsxs20("div", { className: "cnc-flex cnc-w-full cnc-flex-col cnc-gap-2", children: [
5220
- /* @__PURE__ */ jsx26("div", { className: "cnc-h-3 cnc-w-1/2 cnc-animate-pulse cnc-rounded cnc-bg-brand-gray-20" }),
5221
- /* @__PURE__ */ jsx26("div", { className: "cnc-h-3 cnc-w-3/4 cnc-animate-pulse cnc-rounded cnc-bg-brand-gray-20" })
6606
+ children: /* @__PURE__ */ jsxs33("div", { className: "cnc-flex cnc-w-full cnc-flex-col cnc-gap-2", children: [
6607
+ /* @__PURE__ */ jsx42("div", { className: "cnc-h-3 cnc-w-1/2 cnc-animate-pulse cnc-rounded cnc-bg-brand-gray-20" }),
6608
+ /* @__PURE__ */ jsx42("div", { className: "cnc-h-3 cnc-w-3/4 cnc-animate-pulse cnc-rounded cnc-bg-brand-gray-20" })
5222
6609
  ] })
5223
6610
  },
5224
6611
  indice
5225
6612
  )) });
5226
6613
  }
5227
6614
  if (itens.length === 0) {
5228
- return /* @__PURE__ */ jsxs20("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: [
5229
- /* @__PURE__ */ jsx26(BellOff, { className: "cnc-mb-2 cnc-h-7 cnc-w-7", "aria-hidden": "true" }),
5230
- /* @__PURE__ */ jsx26("p", { className: "cnc-text-sm", children: emptyMessage })
6615
+ return /* @__PURE__ */ jsxs33("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: [
6616
+ /* @__PURE__ */ jsx42(BellOff, { className: "cnc-mb-2 cnc-h-7 cnc-w-7", "aria-hidden": "true" }),
6617
+ /* @__PURE__ */ jsx42("p", { className: "cnc-text-sm", children: emptyMessage })
5231
6618
  ] });
5232
6619
  }
5233
- return /* @__PURE__ */ jsx26("ul", { className: "cnc-m-0 cnc-list-none cnc-p-0", children: itens.map((item) => {
5234
- const conteudo = /* @__PURE__ */ jsxs20("span", { className: "cnc-flex cnc-min-w-0 cnc-flex-1 cnc-flex-col cnc-gap-0.5", children: [
5235
- /* @__PURE__ */ jsxs20("span", { className: "cnc-flex cnc-items-baseline cnc-justify-between cnc-gap-2", children: [
5236
- /* @__PURE__ */ jsx26(
6620
+ return /* @__PURE__ */ jsx42("ul", { className: "cnc-m-0 cnc-list-none cnc-p-0", children: itens.map((item) => {
6621
+ const conteudo = /* @__PURE__ */ jsxs33("span", { className: "cnc-flex cnc-min-w-0 cnc-flex-1 cnc-flex-col cnc-gap-0.5", children: [
6622
+ /* @__PURE__ */ jsxs33("span", { className: "cnc-flex cnc-items-baseline cnc-justify-between cnc-gap-2", children: [
6623
+ /* @__PURE__ */ jsx42(
5237
6624
  "span",
5238
6625
  {
5239
6626
  className: cn(
@@ -5243,10 +6630,10 @@ function HeaderNotifications(props) {
5243
6630
  children: item.title
5244
6631
  }
5245
6632
  ),
5246
- item.date && /* @__PURE__ */ jsx26("span", { className: "cnc-shrink-0 cnc-text-[11px] cnc-text-brand-gray-600", children: item.date })
6633
+ item.date && /* @__PURE__ */ jsx42("span", { className: "cnc-shrink-0 cnc-text-[11px] cnc-text-brand-gray-600", children: item.date })
5247
6634
  ] }),
5248
- item.message && /* @__PURE__ */ jsx26("span", { className: "cnc-line-clamp-2 cnc-text-xs cnc-text-brand-gray-600", children: item.message }),
5249
- !item.read && /* @__PURE__ */ jsx26("span", { className: "cnc-sr-only", children: "N\xE3o lida" })
6635
+ item.message && /* @__PURE__ */ jsx42("span", { className: "cnc-line-clamp-2 cnc-text-xs cnc-text-brand-gray-600", children: item.message }),
6636
+ !item.read && /* @__PURE__ */ jsx42("span", { className: "cnc-sr-only", children: "N\xE3o lida" })
5250
6637
  ] });
5251
6638
  const classesLinha = cn(
5252
6639
  "cnc-flex cnc-w-full cnc-items-start cnc-border-l-[3px] cnc-transition cnc-duration-200",
@@ -5261,7 +6648,7 @@ function HeaderNotifications(props) {
5261
6648
  "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",
5262
6649
  anelDeFoco
5263
6650
  );
5264
- const renderarAlvo = () => alvoClicavel ? /* @__PURE__ */ jsx26(
6651
+ const renderarAlvo = () => alvoClicavel ? /* @__PURE__ */ jsx42(
5265
6652
  "button",
5266
6653
  {
5267
6654
  type: "button",
@@ -5269,16 +6656,16 @@ function HeaderNotifications(props) {
5269
6656
  className: classesAlvo,
5270
6657
  children: conteudo
5271
6658
  }
5272
- ) : /* @__PURE__ */ jsx26("div", { className: classesAlvo, children: conteudo });
6659
+ ) : /* @__PURE__ */ jsx42("div", { className: classesAlvo, children: conteudo });
5273
6660
  const rotuloLeitura = item.read ? "Marcar como n\xE3o lida" : "Marcar como lida";
5274
- return /* @__PURE__ */ jsx26(
6661
+ return /* @__PURE__ */ jsx42(
5275
6662
  "li",
5276
6663
  {
5277
6664
  className: "cnc-border-b cnc-border-brand-gray-50 last:cnc-border-b-0",
5278
- children: /* @__PURE__ */ jsxs20("div", { className: classesLinha, children: [
6665
+ children: /* @__PURE__ */ jsxs33("div", { className: classesLinha, children: [
5279
6666
  renderarAlvo(),
5280
- (podeAlternarLeitura || podeExcluir) && /* @__PURE__ */ jsxs20("div", { className: "cnc-flex cnc-shrink-0 cnc-items-center cnc-gap-1 cnc-py-3 cnc-pr-2", children: [
5281
- podeAlternarLeitura && /* @__PURE__ */ jsx26(
6667
+ (podeAlternarLeitura || podeExcluir) && /* @__PURE__ */ jsxs33("div", { className: "cnc-flex cnc-shrink-0 cnc-items-center cnc-gap-1 cnc-py-3 cnc-pr-2", children: [
6668
+ podeAlternarLeitura && /* @__PURE__ */ jsx42(
5282
6669
  "button",
5283
6670
  {
5284
6671
  type: "button",
@@ -5289,7 +6676,7 @@ function HeaderNotifications(props) {
5289
6676
  classesAcao,
5290
6677
  "hover:cnc-text-brand-blue-400"
5291
6678
  ),
5292
- children: item.read ? /* @__PURE__ */ jsx26(Mail, { className: "cnc-h-4 cnc-w-4", "aria-hidden": "true" }) : /* @__PURE__ */ jsx26(
6679
+ children: item.read ? /* @__PURE__ */ jsx42(Mail, { className: "cnc-h-4 cnc-w-4", "aria-hidden": "true" }) : /* @__PURE__ */ jsx42(
5293
6680
  MailOpen,
5294
6681
  {
5295
6682
  className: "cnc-h-4 cnc-w-4",
@@ -5298,7 +6685,7 @@ function HeaderNotifications(props) {
5298
6685
  )
5299
6686
  }
5300
6687
  ),
5301
- podeExcluir && /* @__PURE__ */ jsx26(
6688
+ podeExcluir && /* @__PURE__ */ jsx42(
5302
6689
  "button",
5303
6690
  {
5304
6691
  type: "button",
@@ -5306,7 +6693,7 @@ function HeaderNotifications(props) {
5306
6693
  title: "Excluir notifica\xE7\xE3o",
5307
6694
  onClick: () => excluirItem(item),
5308
6695
  className: cn(classesAcao, "hover:cnc-text-brand-red-600"),
5309
- children: /* @__PURE__ */ jsx26(Trash2, { className: "cnc-h-4 cnc-w-4", "aria-hidden": "true" })
6696
+ children: /* @__PURE__ */ jsx42(Trash2, { className: "cnc-h-4 cnc-w-4", "aria-hidden": "true" })
5310
6697
  }
5311
6698
  )
5312
6699
  ] })
@@ -5317,8 +6704,8 @@ function HeaderNotifications(props) {
5317
6704
  }) });
5318
6705
  };
5319
6706
  const temRodapePadrao = podeMarcarTodas && naoLidas > 0;
5320
- return /* @__PURE__ */ jsxs20(Fragment6, { children: [
5321
- alertarLembretes && /* @__PURE__ */ jsx26(
6707
+ return /* @__PURE__ */ jsxs33(Fragment8, { children: [
6708
+ alertarLembretes && /* @__PURE__ */ jsx42(
5322
6709
  ModalLembretes,
5323
6710
  {
5324
6711
  lembretes: lembretesEmAlerta,
@@ -5328,8 +6715,8 @@ function HeaderNotifications(props) {
5328
6715
  rotuloDispensar: rotuloDispensarLembretes
5329
6716
  }
5330
6717
  ),
5331
- /* @__PURE__ */ jsxs20(Popover, { open: aberto, onOpenChange: alterarAbertura, children: [
5332
- /* @__PURE__ */ jsx26(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs20(
6718
+ /* @__PURE__ */ jsxs33(Popover, { open: aberto, onOpenChange: alterarAbertura, children: [
6719
+ /* @__PURE__ */ jsx42(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs33(
5333
6720
  "button",
5334
6721
  {
5335
6722
  type: "button",
@@ -5340,14 +6727,14 @@ function HeaderNotifications(props) {
5340
6727
  className
5341
6728
  ),
5342
6729
  children: [
5343
- /* @__PURE__ */ jsx26(
6730
+ /* @__PURE__ */ jsx42(
5344
6731
  Bell,
5345
6732
  {
5346
6733
  className: "cnc-h-5 cnc-w-5 cnc-text-brand-blue-900 cnc-header-item",
5347
6734
  "aria-hidden": "true"
5348
6735
  }
5349
6736
  ),
5350
- naoLidas > 0 && /* @__PURE__ */ jsx26(
6737
+ naoLidas > 0 && /* @__PURE__ */ jsx42(
5351
6738
  "span",
5352
6739
  {
5353
6740
  "aria-hidden": "true",
@@ -5358,7 +6745,7 @@ function HeaderNotifications(props) {
5358
6745
  ]
5359
6746
  }
5360
6747
  ) }),
5361
- /* @__PURE__ */ jsxs20(
6748
+ /* @__PURE__ */ jsxs33(
5362
6749
  PopoverContent,
5363
6750
  {
5364
6751
  align,
@@ -5370,12 +6757,12 @@ function HeaderNotifications(props) {
5370
6757
  contentClassName
5371
6758
  ),
5372
6759
  children: [
5373
- /* @__PURE__ */ jsxs20("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: [
5374
- /* @__PURE__ */ jsx26("h2", { className: "cnc-m-0 cnc-text-base cnc-font-extrabold cnc-text-brand-blue-900", children: title }),
5375
- naoLidas > 0 && /* @__PURE__ */ jsx26("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` })
6760
+ /* @__PURE__ */ jsxs33("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: [
6761
+ /* @__PURE__ */ jsx42("h2", { className: "cnc-m-0 cnc-text-base cnc-font-extrabold cnc-text-brand-blue-900", children: title }),
6762
+ naoLidas > 0 && /* @__PURE__ */ jsx42("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` })
5376
6763
  ] }),
5377
- /* @__PURE__ */ jsx26("div", { className: "cnc-max-h-[360px] cnc-overflow-y-auto", children: renderarConteudo() }),
5378
- footer ? /* @__PURE__ */ jsx26("div", { className: "cnc-border-t cnc-border-brand-gray-50 cnc-px-4 cnc-py-3", children: footer }) : temRodapePadrao && /* @__PURE__ */ jsx26("div", { className: "cnc-flex cnc-justify-end cnc-border-t cnc-border-brand-gray-50 cnc-px-4 cnc-py-3", children: /* @__PURE__ */ jsx26(
6764
+ /* @__PURE__ */ jsx42("div", { className: "cnc-max-h-[360px] cnc-overflow-y-auto", children: renderarConteudo() }),
6765
+ footer ? /* @__PURE__ */ jsx42("div", { className: "cnc-border-t cnc-border-brand-gray-50 cnc-px-4 cnc-py-3", children: footer }) : temRodapePadrao && /* @__PURE__ */ jsx42("div", { className: "cnc-flex cnc-justify-end cnc-border-t cnc-border-brand-gray-50 cnc-px-4 cnc-py-3", children: /* @__PURE__ */ jsx42(
5379
6766
  "button",
5380
6767
  {
5381
6768
  type: "button",
@@ -5396,6 +6783,7 @@ function HeaderNotifications(props) {
5396
6783
  export {
5397
6784
  AplicationsHeader,
5398
6785
  AppsMenu,
6786
+ Avatar,
5399
6787
  Badge,
5400
6788
  Button,
5401
6789
  Card,
@@ -5418,6 +6806,9 @@ export {
5418
6806
  CommandList,
5419
6807
  CommandSeparator,
5420
6808
  CommandShortcut,
6809
+ ConfirmDialog,
6810
+ DIAS_SEMANA_PT_BR,
6811
+ DateTimeRangeList,
5421
6812
  Dialog,
5422
6813
  DialogClose,
5423
6814
  DialogContent,
@@ -5428,6 +6819,19 @@ export {
5428
6819
  DialogPortal,
5429
6820
  DialogTitle,
5430
6821
  DialogTrigger,
6822
+ Drawer,
6823
+ DrawerBody,
6824
+ DrawerClose,
6825
+ DrawerContent,
6826
+ DrawerContext,
6827
+ DrawerDescription,
6828
+ DrawerFooter,
6829
+ DrawerHeader,
6830
+ DrawerOverlay,
6831
+ DrawerPortal,
6832
+ DrawerProvider,
6833
+ DrawerTitle,
6834
+ DrawerTrigger,
5431
6835
  DropdownMenu,
5432
6836
  DropdownMenuCheckboxItem,
5433
6837
  DropdownMenuContent,
@@ -5443,7 +6847,10 @@ export {
5443
6847
  DropdownMenuSubContent,
5444
6848
  DropdownMenuSubTrigger,
5445
6849
  DropdownMenuTrigger,
6850
+ EmptyState,
5446
6851
  ErroNotificacoes,
6852
+ FileList,
6853
+ FileUpload,
5447
6854
  Filter,
5448
6855
  Header,
5449
6856
  HeaderContainer,
@@ -5451,16 +6858,24 @@ export {
5451
6858
  HeaderProfileHeader,
5452
6859
  HeaderProfileItem,
5453
6860
  Input,
6861
+ LabelValue,
6862
+ MESES_PT_BR,
6863
+ MESES_PT_BR_ABREV,
6864
+ MiniMonthCalendar,
5454
6865
  Modal,
5455
6866
  ModalEntidade,
5456
6867
  ModalMudancaEntidade,
6868
+ MonthYearPicker,
6869
+ MultiSelect,
5457
6870
  PageHeader,
5458
6871
  PageHeaderActionsContainer,
5459
6872
  PageHeaderTitle,
5460
6873
  PageHeaderTitleContent,
6874
+ PeriodRangeList,
5461
6875
  Popover,
5462
6876
  PopoverContent,
5463
6877
  PopoverTrigger,
6878
+ ResultMetadata,
5464
6879
  Select,
5465
6880
  SelectContent,
5466
6881
  SelectGroup,
@@ -5483,10 +6898,22 @@ export {
5483
6898
  TabsContent,
5484
6899
  TabsList,
5485
6900
  TabsTrigger,
6901
+ Textarea,
5486
6902
  Title2 as Title,
6903
+ Tooltip,
5487
6904
  URL_PADRAO_NOTIFICACOES,
5488
6905
  availableApps,
5489
- buttonVariants
6906
+ buildMonthDays,
6907
+ buttonVariants,
6908
+ formatDayAriaLabel,
6909
+ formatFileSize,
6910
+ formatMonthYear,
6911
+ isSameDay,
6912
+ isToday,
6913
+ toDateKey,
6914
+ toLocalNoon,
6915
+ useDrawer,
6916
+ validateFiles
5490
6917
  };
5491
6918
  /*! Bundled license information:
5492
6919
 
@@ -5562,6 +6989,14 @@ lucide-react/dist/esm/icons/chevron-down.js:
5562
6989
  * See the LICENSE file in the root directory of this source tree.
5563
6990
  *)
5564
6991
 
6992
+ lucide-react/dist/esm/icons/chevron-left.js:
6993
+ (**
6994
+ * @license lucide-react v0.453.0 - ISC
6995
+ *
6996
+ * This source code is licensed under the ISC license.
6997
+ * See the LICENSE file in the root directory of this source tree.
6998
+ *)
6999
+
5565
7000
  lucide-react/dist/esm/icons/chevron-right.js:
5566
7001
  (**
5567
7002
  * @license lucide-react v0.453.0 - ISC
@@ -5594,6 +7029,30 @@ lucide-react/dist/esm/icons/circle.js:
5594
7029
  * See the LICENSE file in the root directory of this source tree.
5595
7030
  *)
5596
7031
 
7032
+ lucide-react/dist/esm/icons/download.js:
7033
+ (**
7034
+ * @license lucide-react v0.453.0 - ISC
7035
+ *
7036
+ * This source code is licensed under the ISC license.
7037
+ * See the LICENSE file in the root directory of this source tree.
7038
+ *)
7039
+
7040
+ lucide-react/dist/esm/icons/external-link.js:
7041
+ (**
7042
+ * @license lucide-react v0.453.0 - ISC
7043
+ *
7044
+ * This source code is licensed under the ISC license.
7045
+ * See the LICENSE file in the root directory of this source tree.
7046
+ *)
7047
+
7048
+ lucide-react/dist/esm/icons/file-text.js:
7049
+ (**
7050
+ * @license lucide-react v0.453.0 - ISC
7051
+ *
7052
+ * This source code is licensed under the ISC license.
7053
+ * See the LICENSE file in the root directory of this source tree.
7054
+ *)
7055
+
5597
7056
  lucide-react/dist/esm/icons/filter-x.js:
5598
7057
  (**
5599
7058
  * @license lucide-react v0.453.0 - ISC
@@ -5642,6 +7101,22 @@ lucide-react/dist/esm/icons/mail.js:
5642
7101
  * See the LICENSE file in the root directory of this source tree.
5643
7102
  *)
5644
7103
 
7104
+ lucide-react/dist/esm/icons/paperclip.js:
7105
+ (**
7106
+ * @license lucide-react v0.453.0 - ISC
7107
+ *
7108
+ * This source code is licensed under the ISC license.
7109
+ * See the LICENSE file in the root directory of this source tree.
7110
+ *)
7111
+
7112
+ lucide-react/dist/esm/icons/plus.js:
7113
+ (**
7114
+ * @license lucide-react v0.453.0 - ISC
7115
+ *
7116
+ * This source code is licensed under the ISC license.
7117
+ * See the LICENSE file in the root directory of this source tree.
7118
+ *)
7119
+
5645
7120
  lucide-react/dist/esm/icons/search.js:
5646
7121
  (**
5647
7122
  * @license lucide-react v0.453.0 - ISC
@@ -5658,6 +7133,14 @@ lucide-react/dist/esm/icons/trash-2.js:
5658
7133
  * See the LICENSE file in the root directory of this source tree.
5659
7134
  *)
5660
7135
 
7136
+ lucide-react/dist/esm/icons/user.js:
7137
+ (**
7138
+ * @license lucide-react v0.453.0 - ISC
7139
+ *
7140
+ * This source code is licensed under the ISC license.
7141
+ * See the LICENSE file in the root directory of this source tree.
7142
+ *)
7143
+
5661
7144
  lucide-react/dist/esm/icons/x.js:
5662
7145
  (**
5663
7146
  * @license lucide-react v0.453.0 - ISC