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