@alexandregme/zljs 2.2.0 → 3.0.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.js CHANGED
@@ -1,18 +1,24 @@
1
1
  "use client";
2
2
  import {
3
+ Button,
4
+ ConnectedModal,
3
5
  Heading,
4
6
  Icon,
5
7
  Loader,
8
+ Modal,
6
9
  ReduxProvider,
7
10
  Spinner,
8
11
  Text,
9
12
  Toaster,
13
+ ZustandProviders,
14
+ appInitialState,
10
15
  splitURLasPath,
16
+ toast,
11
17
  useAppStore,
12
18
  usePageStore,
13
19
  useRouterStore,
14
20
  useToastStore
15
- } from "./chunk-CJYKXG6S.js";
21
+ } from "./chunk-NIKMOT72.js";
16
22
  import {
17
23
  Error,
18
24
  FormInput,
@@ -20,161 +26,6 @@ import {
20
26
  Input
21
27
  } from "./chunk-VW4GICIJ.js";
22
28
 
23
- // core/button/button.styles.ts
24
- import { tv } from "tailwind-variants";
25
- var button = tv({
26
- // outline-current covers the colors with no outline class (ghost, none): without it, browsers keep their default focus color.
27
- base: "cursor-pointer font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-current disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center",
28
- variants: {
29
- variant: {
30
- default: "px-4 py-2 text-sm gap-2 rounded-md",
31
- icon: "p-1 bg-transparent text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-md",
32
- // The invisible ::after grows the touch target to 44px without changing the layout.
33
- link: "relative text-xs hover:underline rounded-sm after:absolute after:top-1/2 after:left-1/2 after:h-11 after:w-full after:min-w-11 after:-translate-x-1/2 after:-translate-y-1/2"
34
- },
35
- color: {
36
- primary: "bg-zl-primary-bg hover:bg-zl-primary-hover text-zl-primary-on focus-visible:outline-zl-primary",
37
- success: "bg-zl-success-bg hover:bg-zl-success-hover text-zl-success-on focus-visible:outline-zl-success",
38
- danger: "bg-zl-danger-bg hover:bg-zl-danger-hover text-zl-danger-on focus-visible:outline-zl-danger",
39
- warning: "bg-zl-warning-bg hover:bg-zl-warning-hover text-zl-warning-on focus-visible:outline-zl-warning",
40
- info: "bg-zl-info-bg hover:bg-zl-info-hover text-zl-info-on focus-visible:outline-zl-info",
41
- muted: "bg-zl-muted-bg hover:bg-zl-muted-hover text-zl-muted-on focus-visible:outline-zl-muted",
42
- ghost: "bg-transparent text-current hover:text-current hover:bg-neutral-500/20",
43
- none: ""
44
- },
45
- size: {
46
- sm: "",
47
- md: "",
48
- lg: ""
49
- },
50
- fullWidth: {
51
- true: "w-full"
52
- }
53
- },
54
- compoundVariants: [
55
- {
56
- variant: "default",
57
- color: "none",
58
- class: "bg-gray-100 text-gray-900 hover:bg-gray-200"
59
- },
60
- {
61
- variant: "default",
62
- size: "sm",
63
- class: "px-2 py-1 text-xs gap-1"
64
- },
65
- {
66
- variant: "icon",
67
- size: "sm",
68
- class: "p-0.5"
69
- },
70
- {
71
- variant: "default",
72
- size: "lg",
73
- class: "px-6 py-3 text-base gap-2"
74
- },
75
- {
76
- variant: "icon",
77
- size: "lg",
78
- class: "p-2"
79
- },
80
- {
81
- variant: "link",
82
- color: "primary",
83
- class: "text-zl-primary hover:text-zl-primary-strong"
84
- },
85
- {
86
- variant: "link",
87
- color: "success",
88
- class: "text-zl-success hover:text-zl-success-strong"
89
- },
90
- {
91
- variant: "link",
92
- color: "danger",
93
- class: "text-zl-danger hover:text-zl-danger-strong"
94
- },
95
- {
96
- variant: "link",
97
- color: "warning",
98
- class: "text-zl-warning hover:text-zl-warning-strong"
99
- },
100
- {
101
- variant: "link",
102
- color: "info",
103
- class: "text-zl-info hover:text-zl-info-strong"
104
- },
105
- {
106
- variant: "link",
107
- color: "muted",
108
- class: "text-zl-muted hover:text-zl-muted-strong"
109
- },
110
- {
111
- variant: "link",
112
- color: "none",
113
- class: "text-slate-600 hover:text-slate-800"
114
- },
115
- {
116
- variant: "link",
117
- class: "bg-transparent hover:bg-transparent"
118
- }
119
- ],
120
- defaultVariants: {
121
- variant: "default",
122
- color: "primary",
123
- size: "md"
124
- }
125
- });
126
-
127
- // core/button/button.tsx
128
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
129
- var Button = ({
130
- children,
131
- type = "button",
132
- variant: variantProp,
133
- color = "primary",
134
- size = "md",
135
- fullWidth = false,
136
- icon,
137
- iconPosition = "left",
138
- disabled = false,
139
- "aria-label": ariaLabel,
140
- onClick
141
- }) => {
142
- const isIconOnly = icon && !children;
143
- const variant = variantProp ?? (isIconOnly ? "icon" : "default");
144
- const renderContent = () => {
145
- if (!icon) {
146
- return children;
147
- }
148
- const iconElement = /* @__PURE__ */ jsx(Icon, { name: icon, size });
149
- if (isIconOnly) {
150
- return iconElement;
151
- }
152
- return iconPosition === "left" ? /* @__PURE__ */ jsxs(Fragment, { children: [
153
- iconElement,
154
- children
155
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
156
- children,
157
- iconElement
158
- ] });
159
- };
160
- return /* @__PURE__ */ jsx(
161
- "button",
162
- {
163
- type,
164
- disabled,
165
- onClick,
166
- "aria-label": ariaLabel,
167
- className: button({
168
- variant,
169
- color: variant === "icon" && color !== "ghost" ? "none" : color,
170
- size,
171
- fullWidth
172
- }),
173
- children: renderContent()
174
- }
175
- );
176
- };
177
-
178
29
  // core/data-grid/data-grid.tsx
179
30
  import { AG_GRID_LOCALE_BR } from "@ag-grid-community/locale";
180
31
  import { AllCommunityModule, ModuleRegistry } from "ag-grid-community";
@@ -185,11 +36,11 @@ import { useState } from "react";
185
36
  import { useId } from "react";
186
37
 
187
38
  // core/forms/checkbox/checkbox.styles.ts
188
- import { tv as tv2 } from "tailwind-variants";
189
- var wrapper = tv2({
39
+ import { tv } from "tailwind-variants";
40
+ var wrapper = tv({
190
41
  base: "flex flex-col gap-1"
191
42
  });
192
- var innerWrapper = tv2({
43
+ var innerWrapper = tv({
193
44
  base: "flex cursor-pointer has-disabled:cursor-not-allowed",
194
45
  variants: {
195
46
  variant: {
@@ -201,7 +52,7 @@ var innerWrapper = tv2({
201
52
  variant: "default"
202
53
  }
203
54
  });
204
- var checkbox = tv2({
55
+ var checkbox = tv({
205
56
  base: "shrink-0 accent-zl-primary border-gray-300 rounded focus:ring-2 focus:ring-blue-500 disabled:cursor-not-allowed",
206
57
  variants: {
207
58
  size: {
@@ -214,12 +65,12 @@ var checkbox = tv2({
214
65
  size: "md"
215
66
  }
216
67
  });
217
- var label = tv2({
68
+ var label = tv({
218
69
  base: "min-w-0 flex-1 text-sm text-gray-700 select-none"
219
70
  });
220
71
 
221
72
  // core/forms/checkbox/checkbox.tsx
222
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
73
+ import { jsx, jsxs } from "react/jsx-runtime";
223
74
  var Checkbox = ({
224
75
  label: labelText,
225
76
  "aria-label": ariaLabel,
@@ -232,9 +83,9 @@ var Checkbox = ({
232
83
  }) => {
233
84
  const id = useId();
234
85
  const errorId = `${id}-error`;
235
- return /* @__PURE__ */ jsxs2("div", { className: wrapper(), children: [
236
- /* @__PURE__ */ jsxs2("label", { htmlFor: id, className: innerWrapper({ variant }), children: [
237
- /* @__PURE__ */ jsx2(
86
+ return /* @__PURE__ */ jsxs("div", { className: wrapper(), children: [
87
+ /* @__PURE__ */ jsxs("label", { htmlFor: id, className: innerWrapper({ variant }), children: [
88
+ /* @__PURE__ */ jsx(
238
89
  "input",
239
90
  {
240
91
  id,
@@ -248,45 +99,45 @@ var Checkbox = ({
248
99
  className: checkbox({ size })
249
100
  }
250
101
  ),
251
- /* @__PURE__ */ jsx2("span", { className: label(), children: labelText })
102
+ /* @__PURE__ */ jsx("span", { className: label(), children: labelText })
252
103
  ] }),
253
- error && /* @__PURE__ */ jsx2(Error, { id: errorId, message: error })
104
+ error && /* @__PURE__ */ jsx(Error, { id: errorId, message: error })
254
105
  ] });
255
106
  };
256
107
 
257
108
  // core/forms/form/form.styles.ts
258
- import { tv as tv3 } from "tailwind-variants";
259
- var fieldset = tv3({
109
+ import { tv as tv2 } from "tailwind-variants";
110
+ var fieldset = tv2({
260
111
  base: "border-none p-0"
261
112
  });
262
113
 
263
114
  // core/forms/form/form.tsx
264
- import { jsx as jsx3 } from "react/jsx-runtime";
115
+ import { jsx as jsx2 } from "react/jsx-runtime";
265
116
  var Form = ({ children, onSubmit, disabled }) => {
266
117
  const handleSubmit = (event) => {
267
118
  event.preventDefault();
268
119
  onSubmit?.(event);
269
120
  };
270
- return /* @__PURE__ */ jsx3("form", { onSubmit: handleSubmit, children: /* @__PURE__ */ jsx3("fieldset", { disabled, className: fieldset(), children }) });
121
+ return /* @__PURE__ */ jsx2("form", { onSubmit: handleSubmit, children: /* @__PURE__ */ jsx2("fieldset", { disabled, className: fieldset(), children }) });
271
122
  };
272
123
 
273
124
  // core/forms/radio/radio.tsx
274
125
  import { useId as useId2 } from "react";
275
126
 
276
127
  // core/forms/radio/radio.styles.ts
277
- import { tv as tv4 } from "tailwind-variants";
278
- var wrapper2 = tv4({
128
+ import { tv as tv3 } from "tailwind-variants";
129
+ var wrapper2 = tv3({
279
130
  base: "flex w-fit items-center gap-2 cursor-pointer has-disabled:cursor-not-allowed"
280
131
  });
281
- var radio = tv4({
132
+ var radio = tv3({
282
133
  base: "w-4 h-4 shrink-0 accent-zl-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-zl-primary disabled:cursor-not-allowed"
283
134
  });
284
- var label2 = tv4({
135
+ var label2 = tv3({
285
136
  base: "text-sm text-gray-700 select-none"
286
137
  });
287
138
 
288
139
  // core/forms/radio/radio.tsx
289
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
140
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
290
141
  var Radio = ({
291
142
  label: labelText,
292
143
  "aria-label": ariaLabel,
@@ -301,8 +152,8 @@ var Radio = ({
301
152
  ref
302
153
  }) => {
303
154
  const id = useId2();
304
- return /* @__PURE__ */ jsxs3("label", { htmlFor: id, className: wrapper2(), children: [
305
- /* @__PURE__ */ jsx4(
155
+ return /* @__PURE__ */ jsxs2("label", { htmlFor: id, className: wrapper2(), children: [
156
+ /* @__PURE__ */ jsx3(
306
157
  "input",
307
158
  {
308
159
  ref,
@@ -320,7 +171,7 @@ var Radio = ({
320
171
  className: radio()
321
172
  }
322
173
  ),
323
- labelText && /* @__PURE__ */ jsx4("span", { className: label2(), children: labelText })
174
+ labelText && /* @__PURE__ */ jsx3("span", { className: label2(), children: labelText })
324
175
  ] });
325
176
  };
326
177
 
@@ -328,19 +179,19 @@ var Radio = ({
328
179
  import { useId as useId3 } from "react";
329
180
 
330
181
  // core/forms/select/select.styles.ts
331
- import { tv as tv5 } from "tailwind-variants";
332
- var wrapper3 = tv5({
182
+ import { tv as tv4 } from "tailwind-variants";
183
+ var wrapper3 = tv4({
333
184
  base: "flex flex-col gap-1"
334
185
  });
335
- var label3 = tv5({
186
+ var label3 = tv4({
336
187
  base: "text-sm font-medium text-gray-700"
337
188
  });
338
- var select = tv5({
189
+ var select = tv4({
339
190
  base: "px-3 py-2 border border-gray-500 rounded-md text-sm bg-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-zl-primary disabled:bg-gray-100 disabled:cursor-not-allowed"
340
191
  });
341
192
 
342
193
  // core/forms/select/select.tsx
343
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
194
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
344
195
  var Select = ({
345
196
  label: labelText,
346
197
  "aria-label": ariaLabel,
@@ -359,9 +210,9 @@ var Select = ({
359
210
  }) => {
360
211
  const id = useId3();
361
212
  const errorId = `${id}-error`;
362
- return /* @__PURE__ */ jsxs4("div", { className: wrapper3(), children: [
363
- labelText && /* @__PURE__ */ jsx5("label", { htmlFor: id, className: label3(), children: labelText }),
364
- /* @__PURE__ */ jsxs4(
213
+ return /* @__PURE__ */ jsxs3("div", { className: wrapper3(), children: [
214
+ labelText && /* @__PURE__ */ jsx4("label", { htmlFor: id, className: label3(), children: labelText }),
215
+ /* @__PURE__ */ jsxs3(
365
216
  "select",
366
217
  {
367
218
  ref,
@@ -380,12 +231,12 @@ var Select = ({
380
231
  "aria-describedby": error ? errorId : void 0,
381
232
  className: select(),
382
233
  children: [
383
- placeholder && /* @__PURE__ */ jsx5("option", { value: "", disabled: true, children: placeholder }),
384
- options.map((option) => /* @__PURE__ */ jsx5("option", { value: option.value, children: option.label }, option.value))
234
+ placeholder && /* @__PURE__ */ jsx4("option", { value: "", disabled: true, children: placeholder }),
235
+ options.map((option) => /* @__PURE__ */ jsx4("option", { value: option.value, children: option.label }, option.value))
385
236
  ]
386
237
  }
387
238
  ),
388
- error && /* @__PURE__ */ jsx5(Error, { id: errorId, message: error })
239
+ error && /* @__PURE__ */ jsx4(Error, { id: errorId, message: error })
389
240
  ] });
390
241
  };
391
242
 
@@ -393,19 +244,19 @@ var Select = ({
393
244
  import { useId as useId4 } from "react";
394
245
 
395
246
  // core/forms/text-area/text-area.styles.ts
396
- import { tv as tv6 } from "tailwind-variants";
397
- var wrapper4 = tv6({
247
+ import { tv as tv5 } from "tailwind-variants";
248
+ var wrapper4 = tv5({
398
249
  base: "flex flex-col gap-1"
399
250
  });
400
- var label4 = tv6({
251
+ var label4 = tv5({
401
252
  base: "text-sm font-medium text-gray-700"
402
253
  });
403
- var textarea = tv6({
254
+ var textarea = tv5({
404
255
  base: "px-3 py-2 border border-gray-500 rounded-md text-sm placeholder:text-gray-500 resize-y focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-zl-primary disabled:bg-gray-100 disabled:cursor-not-allowed"
405
256
  });
406
257
 
407
258
  // core/forms/text-area/text-area.tsx
408
- import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
259
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
409
260
  var TextArea = ({
410
261
  label: labelText,
411
262
  "aria-label": ariaLabel,
@@ -424,9 +275,9 @@ var TextArea = ({
424
275
  }) => {
425
276
  const id = useId4();
426
277
  const errorId = `${id}-error`;
427
- return /* @__PURE__ */ jsxs5("div", { className: wrapper4(), children: [
428
- labelText && /* @__PURE__ */ jsx6("label", { htmlFor: id, className: label4(), children: labelText }),
429
- /* @__PURE__ */ jsx6(
278
+ return /* @__PURE__ */ jsxs4("div", { className: wrapper4(), children: [
279
+ labelText && /* @__PURE__ */ jsx5("label", { htmlFor: id, className: label4(), children: labelText }),
280
+ /* @__PURE__ */ jsx5(
430
281
  "textarea",
431
282
  {
432
283
  ref,
@@ -447,12 +298,12 @@ var TextArea = ({
447
298
  className: textarea()
448
299
  }
449
300
  ),
450
- error && /* @__PURE__ */ jsx6(Error, { id: errorId, message: error })
301
+ error && /* @__PURE__ */ jsx5(Error, { id: errorId, message: error })
451
302
  ] });
452
303
  };
453
304
 
454
305
  // core/data-grid/data-grid-toolbar.tsx
455
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
306
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
456
307
  var DataGridToolbar = ({
457
308
  searchTerm,
458
309
  onSearchTermChange,
@@ -464,13 +315,13 @@ var DataGridToolbar = ({
464
315
  onSearch();
465
316
  }
466
317
  };
467
- return /* @__PURE__ */ jsxs6(
318
+ return /* @__PURE__ */ jsxs5(
468
319
  "div",
469
320
  {
470
321
  className: "flex items-center gap-2 mb-3",
471
322
  "data-testid": "data-grid-toolbar",
472
323
  children: [
473
- /* @__PURE__ */ jsx7(
324
+ /* @__PURE__ */ jsx6(
474
325
  Input,
475
326
  {
476
327
  "aria-label": "Buscar na tabela",
@@ -480,16 +331,16 @@ var DataGridToolbar = ({
480
331
  onKeyDown: handleKeyDown
481
332
  }
482
333
  ),
483
- /* @__PURE__ */ jsx7(Button, { icon: "Search", color: "primary", onClick: onSearch, children: "Buscar" }),
484
- /* @__PURE__ */ jsx7(Button, { icon: "X", color: "danger", onClick: onClear, children: "Limpar" })
334
+ /* @__PURE__ */ jsx6(Button, { icon: "Search", color: "primary", onClick: onSearch, children: "Buscar" }),
335
+ /* @__PURE__ */ jsx6(Button, { icon: "X", color: "danger", onClick: onClear, children: "Limpar" })
485
336
  ]
486
337
  }
487
338
  );
488
339
  };
489
340
 
490
341
  // core/tag/tag.styles.ts
491
- import { tv as tv7 } from "tailwind-variants";
492
- var tag = tv7({
342
+ import { tv as tv6 } from "tailwind-variants";
343
+ var tag = tv6({
493
344
  base: "inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium",
494
345
  variants: {
495
346
  color: {
@@ -510,16 +361,16 @@ var tag = tv7({
510
361
  });
511
362
 
512
363
  // core/tag/tag.tsx
513
- import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
364
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
514
365
  var Tag = ({
515
366
  children,
516
367
  color = "primary",
517
368
  onRemove,
518
369
  removeLabel = "Remover"
519
370
  }) => {
520
- return /* @__PURE__ */ jsxs7("span", { "data-testid": "tag", className: tag({ color }), children: [
371
+ return /* @__PURE__ */ jsxs6("span", { "data-testid": "tag", className: tag({ color }), children: [
521
372
  children,
522
- onRemove && /* @__PURE__ */ jsx8(
373
+ onRemove && /* @__PURE__ */ jsx7(
523
374
  Button,
524
375
  {
525
376
  color: "ghost",
@@ -533,7 +384,7 @@ var Tag = ({
533
384
  };
534
385
 
535
386
  // core/data-grid/data-grid-status-bar.tsx
536
- import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
387
+ import { Fragment, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
537
388
  var DataGridStatusBar = ({
538
389
  totalRows,
539
390
  displayedRows,
@@ -543,21 +394,21 @@ var DataGridStatusBar = ({
543
394
  }) => {
544
395
  const isFiltered = displayedRows !== totalRows || activeFilters.length > 0;
545
396
  const count = isFiltered ? `${displayedRows} / ${totalRows} registros` : `${totalRows} registros`;
546
- return /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-3 px-2 py-1.5 bg-slate-100 border border-slate-200 rounded text-sm text-slate-600 mb-2", children: [
547
- /* @__PURE__ */ jsxs8("span", { role: "status", "aria-label": count, className: "font-medium", children: [
548
- isFiltered && /* @__PURE__ */ jsxs8(Fragment2, { children: [
549
- /* @__PURE__ */ jsx9(Text, { as: "span", variant: "caption", color: "primary", children: displayedRows }),
397
+ return /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-3 px-2 py-1.5 bg-slate-100 border border-slate-200 rounded text-sm text-slate-600 mb-2", children: [
398
+ /* @__PURE__ */ jsxs7("span", { role: "status", "aria-label": count, className: "font-medium", children: [
399
+ isFiltered && /* @__PURE__ */ jsxs7(Fragment, { children: [
400
+ /* @__PURE__ */ jsx8(Text, { as: "span", variant: "caption", color: "primary", children: displayedRows }),
550
401
  " ",
551
- /* @__PURE__ */ jsx9(Text, { as: "span", variant: "caption", children: "/" }),
402
+ /* @__PURE__ */ jsx8(Text, { as: "span", variant: "caption", children: "/" }),
552
403
  " "
553
404
  ] }),
554
- /* @__PURE__ */ jsx9(Text, { as: "span", variant: "caption", children: totalRows }),
405
+ /* @__PURE__ */ jsx8(Text, { as: "span", variant: "caption", children: totalRows }),
555
406
  " ",
556
- /* @__PURE__ */ jsx9(Text, { as: "span", variant: "caption", children: "registros" })
407
+ /* @__PURE__ */ jsx8(Text, { as: "span", variant: "caption", children: "registros" })
557
408
  ] }),
558
- activeFilters.length > 0 && /* @__PURE__ */ jsx9(Fragment2, { children: /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2 flex-wrap border-l border-slate-300 pl-3", children: [
559
- /* @__PURE__ */ jsx9(Text, { as: "span", variant: "caption", children: "Filtros:" }),
560
- activeFilters.map((filter) => /* @__PURE__ */ jsx9(
409
+ activeFilters.length > 0 && /* @__PURE__ */ jsx8(Fragment, { children: /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-2 flex-wrap border-l border-slate-300 pl-3", children: [
410
+ /* @__PURE__ */ jsx8(Text, { as: "span", variant: "caption", children: "Filtros:" }),
411
+ activeFilters.map((filter) => /* @__PURE__ */ jsx8(
561
412
  Tag,
562
413
  {
563
414
  onRemove: () => onClearFilter(filter.column),
@@ -566,7 +417,7 @@ var DataGridStatusBar = ({
566
417
  },
567
418
  filter.column
568
419
  )),
569
- /* @__PURE__ */ jsx9(Button, { variant: "link", color: "none", onClick: onClearAll, children: "Limpar todos" })
420
+ /* @__PURE__ */ jsx8(Button, { variant: "link", color: "none", onClick: onClearAll, children: "Limpar todos" })
570
421
  ] }) })
571
422
  ] });
572
423
  };
@@ -603,8 +454,8 @@ var dataGridTheme = themeAlpine.withParams({
603
454
  });
604
455
 
605
456
  // core/data-grid/data-grid.styles.ts
606
- import { tv as tv8 } from "tailwind-variants";
607
- var dataGrid = tv8({
457
+ import { tv as tv7 } from "tailwind-variants";
458
+ var dataGrid = tv7({
608
459
  slots: {
609
460
  base: "grid grid-rows-[auto_auto_1fr] grid-cols-1 h-full w-full",
610
461
  table: "ag-grid h-full min-h-80 w-full z-0"
@@ -612,7 +463,7 @@ var dataGrid = tv8({
612
463
  });
613
464
 
614
465
  // core/data-grid/data-grid.tsx
615
- import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
466
+ import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
616
467
  ModuleRegistry.registerModules([AllCommunityModule]);
617
468
  var DataGrid = ({
618
469
  columns,
@@ -669,8 +520,8 @@ var DataGrid = ({
669
520
  gridApi?.setFilterModel(null);
670
521
  };
671
522
  const { base, table } = dataGrid();
672
- return /* @__PURE__ */ jsxs9("div", { "data-testid": "data-grid", className: base(), children: [
673
- showSearch && /* @__PURE__ */ jsx10(
523
+ return /* @__PURE__ */ jsxs8("div", { "data-testid": "data-grid", className: base(), children: [
524
+ showSearch && /* @__PURE__ */ jsx9(
674
525
  DataGridToolbar,
675
526
  {
676
527
  searchTerm,
@@ -679,7 +530,7 @@ var DataGrid = ({
679
530
  onClear: handleClearSearch
680
531
  }
681
532
  ),
682
- /* @__PURE__ */ jsx10(
533
+ /* @__PURE__ */ jsx9(
683
534
  DataGridStatusBar,
684
535
  {
685
536
  totalRows: data.length,
@@ -689,7 +540,7 @@ var DataGrid = ({
689
540
  onClearAll: handleClearAll
690
541
  }
691
542
  ),
692
- /* @__PURE__ */ jsx10("div", { className: table(), children: /* @__PURE__ */ jsx10(
543
+ /* @__PURE__ */ jsx9("div", { className: table(), children: /* @__PURE__ */ jsx9(
693
544
  AgGridReact,
694
545
  {
695
546
  theme: dataGridTheme,
@@ -712,8 +563,8 @@ var DataGrid = ({
712
563
  };
713
564
 
714
565
  // core/stats-card/stats-card.styles.ts
715
- import { tv as tv9 } from "tailwind-variants";
716
- var statsCard = tv9({
566
+ import { tv as tv8 } from "tailwind-variants";
567
+ var statsCard = tv8({
717
568
  base: "p-4 rounded-lg",
718
569
  variants: {
719
570
  color: {
@@ -728,87 +579,21 @@ var statsCard = tv9({
728
579
  });
729
580
 
730
581
  // core/stats-card/stats-card.tsx
731
- import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
582
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
732
583
  var StatsCard = ({ label: label5, value, color }) => {
733
- return /* @__PURE__ */ jsxs10("div", { "data-testid": "stats-card", className: statsCard({ color }), children: [
734
- /* @__PURE__ */ jsx11(Text, { variant: "caption", children: label5 }),
735
- /* @__PURE__ */ jsx11(Text, { variant: "display", children: value })
584
+ return /* @__PURE__ */ jsxs9("div", { "data-testid": "stats-card", className: statsCard({ color }), children: [
585
+ /* @__PURE__ */ jsx10(Text, { variant: "caption", children: label5 }),
586
+ /* @__PURE__ */ jsx10(Text, { variant: "display", children: value })
736
587
  ] });
737
588
  };
738
589
 
739
- // core/modal/modal.tsx
740
- import * as Dialog from "@radix-ui/react-dialog";
741
-
742
- // core/modal/modal.styles.ts
743
- import { tv as tv10 } from "tailwind-variants";
744
- var overlay = tv10({
745
- base: "fixed inset-0 bg-black/50"
746
- });
747
- var content = tv10({
748
- base: "fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white rounded-lg shadow-lg p-6 w-full focus:outline-none max-h-[90vh] overflow-y-auto",
749
- variants: {
750
- size: {
751
- sm: "max-w-sm",
752
- md: "max-w-md",
753
- lg: "max-w-2xl",
754
- xl: "max-w-4xl",
755
- full: "max-w-6xl"
756
- }
757
- },
758
- defaultVariants: {
759
- size: "md"
760
- }
761
- });
762
- var header = tv10({
763
- base: "flex items-start justify-between"
764
- });
765
- var title = tv10({
766
- base: "text-lg font-semibold text-gray-900 m-0"
767
- });
768
- var description = tv10({
769
- base: "text-sm text-gray-600 mt-2"
770
- });
771
- var body = tv10({
772
- base: "mt-4"
773
- });
774
-
775
- // core/modal/modal.tsx
776
- import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
777
- var Modal = ({
778
- open,
779
- onClose,
780
- title: title2,
781
- description: description2,
782
- children,
783
- size = "md"
784
- }) => {
785
- return /* @__PURE__ */ jsx12(Dialog.Root, { open, onOpenChange: (isOpen) => !isOpen && onClose(), children: /* @__PURE__ */ jsxs11(Dialog.Portal, { children: [
786
- /* @__PURE__ */ jsx12(Dialog.Overlay, { className: overlay() }),
787
- /* @__PURE__ */ jsxs11(
788
- Dialog.Content,
789
- {
790
- className: content({ size }),
791
- ...!description2 && { "aria-describedby": void 0 },
792
- children: [
793
- /* @__PURE__ */ jsxs11("div", { className: header(), children: [
794
- /* @__PURE__ */ jsx12(Dialog.Title, { className: title(), children: title2 }),
795
- /* @__PURE__ */ jsx12(Button, { icon: "X", "aria-label": "Close", onClick: onClose })
796
- ] }),
797
- description2 && /* @__PURE__ */ jsx12(Dialog.Description, { className: description(), children: description2 }),
798
- children && /* @__PURE__ */ jsx12("div", { className: body(), children })
799
- ]
800
- }
801
- )
802
- ] }) });
803
- };
804
-
805
590
  // core/whatsapp-button/whatsapp-button.const.ts
806
591
  var whatsappWebUrl = "https://wa.me";
807
592
  var whatsappAppUrl = "whatsapp://send";
808
593
  var whatsappMobileUserAgent = /Android|iPhone|iPad|iPod/i;
809
594
 
810
595
  // core/whatsapp-button/whatsapp-button.tsx
811
- import { jsx as jsx13 } from "react/jsx-runtime";
596
+ import { jsx as jsx11 } from "react/jsx-runtime";
812
597
  var WhatsAppButton = ({
813
598
  phone,
814
599
  message,
@@ -833,7 +618,7 @@ var WhatsAppButton = ({
833
618
  }
834
619
  onClick?.();
835
620
  };
836
- return /* @__PURE__ */ jsx13(Button, { color: "success", icon: "SiWhatsapp", onClick: handleClick, children });
621
+ return /* @__PURE__ */ jsx11(Button, { color: "success", icon: "SiWhatsapp", onClick: handleClick, children });
837
622
  };
838
623
 
839
624
  // core/sidebar/sidebar.tsx
@@ -841,8 +626,8 @@ import { useState as useState2 } from "react";
841
626
  import Link from "next/link.js";
842
627
 
843
628
  // core/sidebar/sidebar.styles.ts
844
- import { tv as tv11 } from "tailwind-variants";
845
- var sidebar = tv11({
629
+ import { tv as tv9 } from "tailwind-variants";
630
+ var sidebar = tv9({
846
631
  base: "h-screen bg-neutral-800 text-neutral-300 flex flex-col overflow-hidden transition-all duration-200 divide-y divide-neutral-600/50",
847
632
  variants: {
848
633
  collapsed: {
@@ -854,16 +639,16 @@ var sidebar = tv11({
854
639
  collapsed: false
855
640
  }
856
641
  });
857
- var nav = tv11({
642
+ var nav = tv9({
858
643
  base: "flex-1 min-h-0 overflow-y-auto overflow-x-hidden divide-y divide-neutral-600/50"
859
644
  });
860
- var header2 = tv11({
645
+ var header = tv9({
861
646
  base: "shrink-0 p-2"
862
647
  });
863
- var section = tv11({
648
+ var section = tv9({
864
649
  base: "grid gap-1 p-2"
865
650
  });
866
- var item = tv11({
651
+ var item = tv9({
867
652
  // [&>*+*] is the label: Text takes no className, and the icon comes first, so a link with no label has nothing to hide.
868
653
  base: "flex items-center rounded-md transition-colors h-10 px-3 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-current [&>*+*]:truncate [&>*+*]:transition-all [&>*+*]:duration-200",
869
654
  variants: {
@@ -881,7 +666,7 @@ var item = tv11({
881
666
  collapsed: false
882
667
  }
883
668
  });
884
- var footer = tv11({
669
+ var footer = tv9({
885
670
  base: "shrink-0 h-16 p-3 flex items-center gap-3",
886
671
  variants: {
887
672
  collapsed: {
@@ -889,18 +674,18 @@ var footer = tv11({
889
674
  }
890
675
  }
891
676
  });
892
- var avatar = tv11({
677
+ var avatar = tv9({
893
678
  base: "shrink-0 size-8 rounded-full bg-neutral-600 text-white text-xs font-medium flex items-center justify-center"
894
679
  });
895
- var userInfo = tv11({
680
+ var userInfo = tv9({
896
681
  base: "flex flex-col min-w-0 text-white [&>*]:truncate [&>*:last-child]:text-xs [&>*:last-child]:text-neutral-400"
897
682
  });
898
- var toggleButton = tv11({
683
+ var toggleButton = tv9({
899
684
  base: "shrink-0 h-14 grid p-2 [&>button]:justify-start [&>button]:px-3 [&>button]:overflow-hidden [&>button]:whitespace-nowrap"
900
685
  });
901
686
 
902
687
  // core/sidebar/sidebar.tsx
903
- import { Fragment as Fragment3, jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
688
+ import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
904
689
  var getInitials = (name) => {
905
690
  const parts = name.trim().split(/\s+/);
906
691
  if (parts.length >= 2) {
@@ -920,8 +705,8 @@ var Sidebar = ({
920
705
  }) => {
921
706
  const [collapsed, setCollapsed] = useState2(defaultCollapsed);
922
707
  const initials = getInitials(user.name);
923
- return /* @__PURE__ */ jsxs12("aside", { className: sidebar({ collapsed }), children: [
924
- homeHref && /* @__PURE__ */ jsx14("div", { className: header2(), children: /* @__PURE__ */ jsxs12(
708
+ return /* @__PURE__ */ jsxs10("aside", { className: sidebar({ collapsed }), children: [
709
+ homeHref && /* @__PURE__ */ jsx12("div", { className: header(), children: /* @__PURE__ */ jsxs10(
925
710
  Link,
926
711
  {
927
712
  href: homeHref,
@@ -929,36 +714,36 @@ var Sidebar = ({
929
714
  "aria-label": homeLabel || "Home",
930
715
  ...homeHref === activeHref && { "aria-current": "page" },
931
716
  children: [
932
- /* @__PURE__ */ jsx14(Icon, { name: "Home" }),
933
- homeLabel && /* @__PURE__ */ jsx14(Text, { as: "span", variant: "caption", children: homeLabel })
717
+ /* @__PURE__ */ jsx12(Icon, { name: "Home" }),
718
+ homeLabel && /* @__PURE__ */ jsx12(Text, { as: "span", variant: "caption", children: homeLabel })
934
719
  ]
935
720
  }
936
721
  ) }),
937
- /* @__PURE__ */ jsx14("nav", { "aria-label": "Main navigation", className: nav(), children: sections.map((sectionData, i) => /* @__PURE__ */ jsx14("div", { className: section(), children: sectionData.items.map((sidebarItem) => {
722
+ /* @__PURE__ */ jsx12("nav", { "aria-label": "Main navigation", className: nav(), children: sections.map((sectionData, i) => /* @__PURE__ */ jsx12("div", { className: section(), children: sectionData.items.map((sidebarItem) => {
938
723
  const isActive = sidebarItem.href === activeHref;
939
- return /* @__PURE__ */ jsxs12(
724
+ return /* @__PURE__ */ jsxs10(
940
725
  Link,
941
726
  {
942
727
  href: sidebarItem.href,
943
728
  className: item({ active: isActive, collapsed }),
944
729
  ...isActive && { "aria-current": "page" },
945
730
  children: [
946
- /* @__PURE__ */ jsx14(Icon, { name: sidebarItem.icon }),
947
- /* @__PURE__ */ jsx14(Text, { as: "span", variant: "caption", children: sidebarItem.label })
731
+ /* @__PURE__ */ jsx12(Icon, { name: sidebarItem.icon }),
732
+ /* @__PURE__ */ jsx12(Text, { as: "span", variant: "caption", children: sidebarItem.label })
948
733
  ]
949
734
  },
950
735
  sidebarItem.href
951
736
  );
952
737
  }) }, i)) }),
953
- /* @__PURE__ */ jsxs12("div", { className: footer({ collapsed }), children: [
954
- !collapsed && /* @__PURE__ */ jsxs12(Fragment3, { children: [
955
- /* @__PURE__ */ jsx14("div", { "aria-hidden": "true", className: avatar(), children: initials }),
956
- /* @__PURE__ */ jsxs12("div", { className: userInfo(), children: [
957
- /* @__PURE__ */ jsx14(Text, { as: "span", variant: "caption", children: user.name }),
958
- /* @__PURE__ */ jsx14(Text, { as: "span", variant: "caption", children: user.email })
738
+ /* @__PURE__ */ jsxs10("div", { className: footer({ collapsed }), children: [
739
+ !collapsed && /* @__PURE__ */ jsxs10(Fragment2, { children: [
740
+ /* @__PURE__ */ jsx12("div", { "aria-hidden": "true", className: avatar(), children: initials }),
741
+ /* @__PURE__ */ jsxs10("div", { className: userInfo(), children: [
742
+ /* @__PURE__ */ jsx12(Text, { as: "span", variant: "caption", children: user.name }),
743
+ /* @__PURE__ */ jsx12(Text, { as: "span", variant: "caption", children: user.email })
959
744
  ] })
960
745
  ] }),
961
- /* @__PURE__ */ jsx14(
746
+ /* @__PURE__ */ jsx12(
962
747
  Button,
963
748
  {
964
749
  color: "ghost",
@@ -968,7 +753,7 @@ var Sidebar = ({
968
753
  }
969
754
  )
970
755
  ] }),
971
- /* @__PURE__ */ jsx14("div", { className: toggleButton(), children: /* @__PURE__ */ jsx14(
756
+ /* @__PURE__ */ jsx12("div", { className: toggleButton(), children: /* @__PURE__ */ jsx12(
972
757
  Button,
973
758
  {
974
759
  variant: "default",
@@ -982,69 +767,9 @@ var Sidebar = ({
982
767
  ] });
983
768
  };
984
769
 
985
- // core/index.ts
986
- import { toast } from "sonner";
987
-
988
- // core/state/zustand/modal/modal.store.ts
989
- import { create } from "zustand";
990
- import { devtools } from "zustand/middleware";
991
-
992
- // core/state/zustand/modal/modal.const.ts
993
- var modalInitialState = {
994
- modals: []
995
- };
996
- var modalDevtools = { name: "zljs", store: "modal" };
997
-
998
- // core/state/zustand/modal/modal.store.ts
999
- var useModalStore = create()(
1000
- devtools(
1001
- (set, get) => ({
1002
- ...modalInitialState,
1003
- openModal: (name) => set((s) => ({ modals: [...s.modals, { name }] }), false, "openModal"),
1004
- openModalWithPayload: (name, payload) => set(
1005
- (s) => ({ modals: [...s.modals, { name, payload }] }),
1006
- false,
1007
- "openModalWithPayload"
1008
- ),
1009
- closeModal: (name) => set(
1010
- (s) => ({ modals: s.modals.filter((m) => m.name !== name) }),
1011
- false,
1012
- "closeModal"
1013
- ),
1014
- isOpen: (name) => get().modals.some((m) => m.name === name),
1015
- getPayload: (name) => get().modals.find((m) => m.name === name)?.payload
1016
- }),
1017
- modalDevtools
1018
- )
1019
- );
1020
-
1021
- // core/connected-modal/connected-modal.tsx
1022
- import { jsx as jsx15 } from "react/jsx-runtime";
1023
- var ConnectedModal = ({
1024
- modalId,
1025
- title: title2,
1026
- description: description2,
1027
- size,
1028
- children
1029
- }) => {
1030
- const isOpen = useModalStore((s) => s.isOpen(modalId));
1031
- const closeModal = useModalStore((s) => s.closeModal);
1032
- return /* @__PURE__ */ jsx15(
1033
- Modal,
1034
- {
1035
- open: isOpen,
1036
- onClose: () => closeModal(modalId),
1037
- title: title2,
1038
- description: description2,
1039
- size,
1040
- children
1041
- }
1042
- );
1043
- };
1044
-
1045
770
  // core/card/card.styles.ts
1046
- import { tv as tv12 } from "tailwind-variants";
1047
- var card = tv12({
771
+ import { tv as tv10 } from "tailwind-variants";
772
+ var card = tv10({
1048
773
  slots: {
1049
774
  // A soft, wide shadow in the color of the card. shadow-sm only spreads 1 to
1050
775
  // 3px and reads as part of the border on a white page.
@@ -1074,20 +799,20 @@ var card = tv12({
1074
799
  });
1075
800
 
1076
801
  // core/card/card.tsx
1077
- import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
802
+ import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
1078
803
  var Card = ({
1079
804
  children,
1080
- title: title2,
805
+ title,
1081
806
  titleLevel = 2,
1082
807
  message,
1083
808
  color = "none"
1084
809
  }) => {
1085
- const { base, header: header3 } = card({ color });
810
+ const { base, header: header2 } = card({ color });
1086
811
  const messageColor = color === "none" ? "muted" : "none";
1087
- return /* @__PURE__ */ jsxs13("div", { "data-testid": "card", className: base(), children: [
1088
- (title2 || message) && /* @__PURE__ */ jsxs13("div", { className: header3(), children: [
1089
- title2 && /* @__PURE__ */ jsx16(Heading, { level: titleLevel, children: title2 }),
1090
- message && /* @__PURE__ */ jsx16(Text, { color: messageColor, children: message })
812
+ return /* @__PURE__ */ jsxs11("div", { "data-testid": "card", className: base(), children: [
813
+ (title || message) && /* @__PURE__ */ jsxs11("div", { className: header2(), children: [
814
+ title && /* @__PURE__ */ jsx13(Heading, { level: titleLevel, children: title }),
815
+ message && /* @__PURE__ */ jsx13(Text, { color: messageColor, children: message })
1091
816
  ] }),
1092
817
  children
1093
818
  ] });
@@ -1191,10 +916,11 @@ export {
1191
916
  TextArea,
1192
917
  Toaster,
1193
918
  WhatsAppButton,
919
+ ZustandProviders,
920
+ appInitialState,
1194
921
  splitURLasPath,
1195
922
  toast,
1196
923
  useAppStore,
1197
- useModalStore,
1198
924
  usePageStore,
1199
925
  useRouterStore,
1200
926
  useToastStore