nexaas-ui-components 1.0.19 → 1.0.21
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.cjs +321 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.cts +63 -17
- package/dist/index.d.ts +63 -17
- package/dist/index.js +317 -20
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -76,8 +76,8 @@ var sizes = {
|
|
|
76
76
|
icon: "text-[16px]"
|
|
77
77
|
},
|
|
78
78
|
sm: {
|
|
79
|
-
text: "h-[32px]",
|
|
80
|
-
icon: "text-[
|
|
79
|
+
text: "h-[32px] text-[12px]",
|
|
80
|
+
icon: "text-[12px]"
|
|
81
81
|
},
|
|
82
82
|
md: {
|
|
83
83
|
text: "h-[38px]",
|
|
@@ -93,16 +93,16 @@ var variants = {
|
|
|
93
93
|
text: "bg-gradient-to-b from-[#FF4D8B] to-[#DA3063] text-white shadow-[0_2px_6px_0_rgba(218,48,99,0.25)] hover:from-[#ff4d84] hover:to-[#df4573] active:from-[#ae264f] active:to-[#ae264f] disabled:opacity-50 disabled:shadow-none active:shadow-none disabled:hover:from-[#FF4D8B] disabled:hover:to-[#DA3063]"
|
|
94
94
|
},
|
|
95
95
|
secondary: {
|
|
96
|
-
text: "shadow-button bg-surface border-[0.5px] border-neutral-400 text-neutral-
|
|
96
|
+
text: "shadow-button bg-surface border-[0.5px] border-neutral-400 text-neutral-500 hover:bg-neutral-100 hover:text-neutral-600 active:text-neutral-600 active:shadow-none disabled:text-neutral-400 disabled:opacity-50"
|
|
97
97
|
},
|
|
98
98
|
icon: {
|
|
99
|
-
text: "shadow-button bg-white border-[0.5px] border-neutral-300 hover:bg-[#f5f5f5] active:bg-neutral-100 disabled:text-neutral-400 disabled:border-[0.5px] disabled:border-disabled disabled:bg-white disabled:opacity-50 active:shadow-none"
|
|
99
|
+
text: "shadow-button bg-white border-[0.5px] border-neutral-300 text-neutral-500 hover:bg-[#f5f5f5] hover:text-neutral-600 active:bg-neutral-100 active:text-neutral-600 disabled:text-neutral-400 disabled:border-[0.5px] disabled:border-disabled disabled:bg-white disabled:opacity-50 active:shadow-none"
|
|
100
100
|
},
|
|
101
101
|
outline: {
|
|
102
|
-
text: "shadow-button bg-surface border-[0.5px] border-rose-500 text-rose-500 hover:bg-rose-50 active:bg-rose-100
|
|
102
|
+
text: "shadow-button bg-surface border-[0.5px] border-rose-500 text-rose-500 hover:bg-rose-50 hover:text-rose-600 active:bg-rose-100 active:text-rose-600 disabled:bg-surface disabled:border-[0.5px] disabled:border-rose-700 disabled:opacity-50 active:shadow-none"
|
|
103
103
|
},
|
|
104
104
|
dangerOutline: {
|
|
105
|
-
text: "shadow-button text-dangerous-500 bg-surface border-[0.5px] border-dangerous-500 hover:bg-dangerous-100 active:bg-dangerous-500 active:text-white disabled:opacity-50 disabled:bg-white disabled:text-dangerous-500 active:shadow-none"
|
|
105
|
+
text: "shadow-button text-dangerous-500 bg-surface border-[0.5px] border-dangerous-500 hover:bg-dangerous-100 hover:text-dangerous-600 active:bg-dangerous-500 active:text-white disabled:opacity-50 disabled:bg-white disabled:text-dangerous-500 active:shadow-none"
|
|
106
106
|
},
|
|
107
107
|
danger: {
|
|
108
108
|
text: "shadow-button text-white bg-gradient-to-b from-danger-start to-danger-end hover:from-[#fe6464] hover:to-[#e24e4e] active:from-dangerous-600 active:to-dangerous-600 disabled:opacity-50 disabled:from-dangerous-500 disabled:to-dangerous-500 active:shadow-none"
|
|
@@ -114,13 +114,13 @@ var variants = {
|
|
|
114
114
|
text: "shadow-button text-white bg-gradient-to-b from-warning-start to-warning-end hover:from-[#febd5b] hover:to-[#f4a52e] active:from-warning-600 active:to-warning-600 disabled:opacity-50 disabled:from-warning-start disabled:to-warning-end active:shadow-none"
|
|
115
115
|
},
|
|
116
116
|
blue: {
|
|
117
|
-
text: "shadow-button bg-blue-500 text-white text-bold"
|
|
117
|
+
text: "shadow-button bg-blue-500 text-white hover:bg-blue-600 active:bg-blue-600 text-bold"
|
|
118
118
|
},
|
|
119
119
|
iconSecondary: {
|
|
120
120
|
text: "border-[1px] border-none text-white active:bg-[#0A0A0A40]/20 hover:bg-[#F5F5F526]/10 hover:text-white disabled:text-neutral-400 disabled:border-[0.5px] disabled:border-disabled disabled:bg-white disabled:opacity-50 active:shadow-none"
|
|
121
121
|
},
|
|
122
122
|
outlineIcon: {
|
|
123
|
-
text: "bg-white text-rose-500 hover:shadow-button active:bg-rose-500 active:text-white disabled:text-neutral-400
|
|
123
|
+
text: "bg-white text-rose-500 hover:shadow-button hover:text-rose-600 active:bg-rose-500 active:text-white disabled:text-neutral-400 disabled:border-disabled disabled:bg-white disabled:opacity-50 active:shadow-none"
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
var paddingConfig = {
|
|
@@ -189,7 +189,7 @@ var Button = ({
|
|
|
189
189
|
"flex-row items-center": hotkeyPosition === "left" || hotkeyPosition === "right"
|
|
190
190
|
}),
|
|
191
191
|
children: [
|
|
192
|
-
hotkey && (hotkeyPosition === "top" || hotkeyPosition === "left") && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "var(--label)" }, className: "text-p-sm font-normal
|
|
192
|
+
hotkey && (hotkeyPosition === "top" || hotkeyPosition === "left") && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "var(--label)" }, className: "text-p-sm font-normal", children: hotkeyLabel }),
|
|
193
193
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
194
194
|
"button",
|
|
195
195
|
{
|
|
@@ -222,7 +222,7 @@ var Button = ({
|
|
|
222
222
|
"span",
|
|
223
223
|
{
|
|
224
224
|
style: { color: "var(--label)" },
|
|
225
|
-
className: "text-p-sm font-normal
|
|
225
|
+
className: "text-p-sm font-normal",
|
|
226
226
|
children: hotkeyLabel
|
|
227
227
|
}
|
|
228
228
|
)
|
|
@@ -252,19 +252,19 @@ var variants2 = {
|
|
|
252
252
|
text: "shadow-button text-button-label bg-gradient-to-b hover:text-white from-rose-start to-rose-end active:bg-gradient-to-b active:from-rose-800 active:to-rose-800 disabled:bg-gradient-to-b disabled:from-rose-800 disabled:to-rose-800 disabled:opacity-50 hover:from-[#FD467F] hover:to-[#DF4573]"
|
|
253
253
|
},
|
|
254
254
|
secondary: {
|
|
255
|
-
text: "shadow-button bg-white border-[0.5px] border-paragraph text-
|
|
255
|
+
text: "shadow-button bg-white border-[0.5px] border-paragraph text-blue-500 hover:text-blue-600 hover:bg-[#f5f5f5] active:text-blue-600 active:bg-light-gray-100 disabled:text-dark-blue-400 disabled:bg-white disabled:border-[0.5px] disabled:border-dark-blue-400"
|
|
256
256
|
},
|
|
257
257
|
link: {
|
|
258
|
-
text: "text-blue-
|
|
258
|
+
text: "text-blue-500 hover:text-blue-600 hover:underline active:text-blue-600 active:underline disabled:text-blue-500 disabled:no-underline shadow-none font-normal"
|
|
259
259
|
},
|
|
260
260
|
icon: {
|
|
261
|
-
text: "bg-white border-[0.5px] border-dark-blue-300 hover:bg-[#f5f5f5] active:bg-light-gray-100
|
|
261
|
+
text: "bg-white border-[0.5px] border-dark-blue-300 text-blue-500 hover:text-blue-600 hover:bg-[#f5f5f5] active:text-blue-600 active:bg-light-gray-100 disabled:text-dark-blue-400 disabled:border-[0.5px] disabled:border-disabled disabled:bg-white disabled:opacity-50"
|
|
262
262
|
},
|
|
263
263
|
iconSecondary: {
|
|
264
264
|
text: "border-[1px] border-none text-white active:bg-[#0A0A0A40]/20 hover:bg-[#F5F5F526]/10 hover:text-white disabled:text-dark-blue-400 disabled:border-[0.5px] disabled:border-disabled disabled:bg-white disabled:opacity-50"
|
|
265
265
|
},
|
|
266
266
|
outline: {
|
|
267
|
-
text: "shadow-button bg-white border-[0.5px] border-rose-700 text-
|
|
267
|
+
text: "shadow-button bg-white border-[0.5px] border-rose-700 text-blue-500 hover:text-blue-600 hover:bg-[#f5f5f5] active:text-blue-600 active:bg-light-gray-100 disabled:text-rose-700 disabled:bg-white disabled:border-[0.5px] disabled:border-rose-700 disabled:opacity-50"
|
|
268
268
|
},
|
|
269
269
|
dark: {
|
|
270
270
|
text: "shadow-button text-white hover:bg-[#f5f5f526] active:bg-[#0a0a0a40] disabled:opacity-50 disabled:bg-transparent"
|
|
@@ -285,10 +285,10 @@ var variants2 = {
|
|
|
285
285
|
text: "shadow-button bg-blue-700 text-white text-bold"
|
|
286
286
|
},
|
|
287
287
|
filter: {
|
|
288
|
-
text: "shadow-button rounded-3xl border border-dark-blue-300 text-
|
|
288
|
+
text: "shadow-button rounded-3xl border border-dark-blue-300 text-blue-500 hover:text-blue-600 hover:bg-light-gray-100 active:border active:border-blue-700 active:text-blue-600 active:bg-blue-100 focus:border focus:border-blue-700 focus:text-blue-500 focus:bg-blue-100"
|
|
289
289
|
},
|
|
290
290
|
filterActive: {
|
|
291
|
-
text: "shadow-button rounded-3xl border border-blue-700 text-blue-
|
|
291
|
+
text: "shadow-button rounded-3xl border border-blue-700 text-blue-500 bg-blue-100 shadow-button hover:bg-blue-700 hover:text-white active:text-white active:bg-blue-900 active:border-blue-900 focus:text-white focus:bg-blue-900 focus:border-blue-900"
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
294
|
var ButtonLink = React4.forwardRef(
|
|
@@ -350,7 +350,7 @@ var ButtonLink = React4.forwardRef(
|
|
|
350
350
|
"span",
|
|
351
351
|
{
|
|
352
352
|
style: { color: "var(--label)" },
|
|
353
|
-
className: "text-p-sm font-normal
|
|
353
|
+
className: "text-p-sm font-normal",
|
|
354
354
|
children: hotkeyLabel
|
|
355
355
|
}
|
|
356
356
|
),
|
|
@@ -382,7 +382,7 @@ var ButtonLink = React4.forwardRef(
|
|
|
382
382
|
"span",
|
|
383
383
|
{
|
|
384
384
|
style: { color: "var(--label)" },
|
|
385
|
-
className: "text-p-sm font-normal
|
|
385
|
+
className: "text-p-sm font-normal",
|
|
386
386
|
children: hotkeyLabel
|
|
387
387
|
}
|
|
388
388
|
)
|
|
@@ -4311,23 +4311,326 @@ function DataTable({
|
|
|
4311
4311
|
)
|
|
4312
4312
|
] });
|
|
4313
4313
|
}
|
|
4314
|
+
var Accordion = ({ title, children, open = false }) => {
|
|
4315
|
+
const [isOpen, setOpen] = React4.useState(open);
|
|
4316
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4317
|
+
"div",
|
|
4318
|
+
{
|
|
4319
|
+
className: clsx9__default.default(
|
|
4320
|
+
{
|
|
4321
|
+
["border-neutral-200"]: !isOpen,
|
|
4322
|
+
["border-rose-700"]: isOpen
|
|
4323
|
+
},
|
|
4324
|
+
"flex flex-col w-full px-3 py-2 shadow-input border rounded-lg"
|
|
4325
|
+
),
|
|
4326
|
+
children: [
|
|
4327
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4328
|
+
"button",
|
|
4329
|
+
{
|
|
4330
|
+
onClick: () => {
|
|
4331
|
+
setOpen((state) => !state);
|
|
4332
|
+
},
|
|
4333
|
+
type: "button",
|
|
4334
|
+
className: "flex items-center justify-between w-full ",
|
|
4335
|
+
children: [
|
|
4336
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: title }),
|
|
4337
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4338
|
+
"i",
|
|
4339
|
+
{
|
|
4340
|
+
className: clsx9__default.default(
|
|
4341
|
+
{
|
|
4342
|
+
["transform rotate-[180deg]"]: isOpen
|
|
4343
|
+
},
|
|
4344
|
+
"duration-300 uil uil-angle-down text-[30px]"
|
|
4345
|
+
)
|
|
4346
|
+
}
|
|
4347
|
+
)
|
|
4348
|
+
]
|
|
4349
|
+
}
|
|
4350
|
+
),
|
|
4351
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4352
|
+
react.Transition,
|
|
4353
|
+
{
|
|
4354
|
+
show: isOpen,
|
|
4355
|
+
enter: "ease-in duration-300",
|
|
4356
|
+
enterFrom: "opacity-0",
|
|
4357
|
+
enterTo: "opacity-100",
|
|
4358
|
+
leave: "ease-out duration-300",
|
|
4359
|
+
leaveFrom: "opacity-100",
|
|
4360
|
+
leaveTo: "opacity-0",
|
|
4361
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4362
|
+
"div",
|
|
4363
|
+
{
|
|
4364
|
+
className: `${isOpen ? "flex opacity-100" : "hidden opacity-0"} overflow-auto table-scroll`,
|
|
4365
|
+
children
|
|
4366
|
+
}
|
|
4367
|
+
)
|
|
4368
|
+
}
|
|
4369
|
+
)
|
|
4370
|
+
]
|
|
4371
|
+
}
|
|
4372
|
+
) });
|
|
4373
|
+
};
|
|
4374
|
+
function CopyPopover({ children, valueToCopy }) {
|
|
4375
|
+
const [copied, setCopied] = React4.useState(false);
|
|
4376
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4377
|
+
"div",
|
|
4378
|
+
{
|
|
4379
|
+
className: "flex items-center gap-1",
|
|
4380
|
+
onClick: async () => {
|
|
4381
|
+
setCopied(true);
|
|
4382
|
+
navigator.clipboard.writeText(valueToCopy);
|
|
4383
|
+
},
|
|
4384
|
+
onMouseLeave: () => setTimeout(() => setCopied(false), 500),
|
|
4385
|
+
children: [
|
|
4386
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4387
|
+
"div",
|
|
4388
|
+
{
|
|
4389
|
+
className: "flex items-center gap-1",
|
|
4390
|
+
"data-tooltip-id": "copy-id",
|
|
4391
|
+
"data-tooltip-content": copied ? "Copiado" : "Copiar",
|
|
4392
|
+
"data-tooltip-place": "top",
|
|
4393
|
+
children: [
|
|
4394
|
+
/* @__PURE__ */ jsxRuntime.jsx(Popover3, { id: "copy-id" }),
|
|
4395
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-neutral-400 text-xs", children })
|
|
4396
|
+
]
|
|
4397
|
+
}
|
|
4398
|
+
),
|
|
4399
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4400
|
+
"div",
|
|
4401
|
+
{
|
|
4402
|
+
"data-tooltip-id": "icon-id",
|
|
4403
|
+
"data-tooltip-content": copied ? "Copiado" : "Copiar",
|
|
4404
|
+
"data-tooltip-place": "top",
|
|
4405
|
+
children: [
|
|
4406
|
+
/* @__PURE__ */ jsxRuntime.jsx(Popover3, { id: "icon-id" }),
|
|
4407
|
+
/* @__PURE__ */ jsxRuntime.jsx("i", { className: "uil uil-copy text-base text-blue-500 cursor-pointer -mt-[1px]" })
|
|
4408
|
+
]
|
|
4409
|
+
}
|
|
4410
|
+
)
|
|
4411
|
+
]
|
|
4412
|
+
}
|
|
4413
|
+
) });
|
|
4414
|
+
}
|
|
4415
|
+
var Menu = ({ triggerElement, children, className }) => {
|
|
4416
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Menu, { as: "div", className: "relative h-full cursor-pointer", children: [
|
|
4417
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4418
|
+
react.MenuButton,
|
|
4419
|
+
{
|
|
4420
|
+
as: "div",
|
|
4421
|
+
className: "flex rounded-full text-sm h-full w-full items-center",
|
|
4422
|
+
children: triggerElement
|
|
4423
|
+
}
|
|
4424
|
+
),
|
|
4425
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4426
|
+
react.Transition,
|
|
4427
|
+
{
|
|
4428
|
+
as: React4.Fragment,
|
|
4429
|
+
enter: "transition ease-out duration-200",
|
|
4430
|
+
enterFrom: "transform opacity-0 scale-95",
|
|
4431
|
+
enterTo: "transform opacity-100 scale-100",
|
|
4432
|
+
leave: "transition ease-in duration-75",
|
|
4433
|
+
leaveFrom: "transform opacity-100 scale-100",
|
|
4434
|
+
leaveTo: "transform opacity-0 scale-95",
|
|
4435
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4436
|
+
react.MenuItems,
|
|
4437
|
+
{
|
|
4438
|
+
className: `border-[0.5px] mt-1 color-neutral-300 flex min-w-[200px] flex-col gap-y-2 p-3 absolute right-0 z-[999] rounded-lg shadow-[2px_4px_8px_rgba(57,60,77,0.1)] bg-white cursor-default ${className}`,
|
|
4439
|
+
children
|
|
4440
|
+
}
|
|
4441
|
+
)
|
|
4442
|
+
}
|
|
4443
|
+
)
|
|
4444
|
+
] });
|
|
4445
|
+
};
|
|
4446
|
+
var Item = ({ index, isActive, onClick, children }) => {
|
|
4447
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.MenuItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4448
|
+
"div",
|
|
4449
|
+
{
|
|
4450
|
+
className: clsx9__default.default(
|
|
4451
|
+
"h-[36px] p-2 rounded-lg items-center cursor-pointer flex whitespace-nowrap no-underline ",
|
|
4452
|
+
{
|
|
4453
|
+
"bg-[#009EDB] hover:bg-[#009EDB] hover:text-[#FFFFFF] text-[#FFFFFF]": isActive
|
|
4454
|
+
},
|
|
4455
|
+
{
|
|
4456
|
+
"hover:bg-neutral-100 text-paragraph": !isActive
|
|
4457
|
+
}
|
|
4458
|
+
),
|
|
4459
|
+
tabIndex: index,
|
|
4460
|
+
role: "button",
|
|
4461
|
+
onClick,
|
|
4462
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-2 w-full items-center whitespace-nowrap", children })
|
|
4463
|
+
}
|
|
4464
|
+
) }, index);
|
|
4465
|
+
};
|
|
4466
|
+
var EditableButton = ({
|
|
4467
|
+
children,
|
|
4468
|
+
button,
|
|
4469
|
+
onClose
|
|
4470
|
+
}) => {
|
|
4471
|
+
const [showModal, setShowModal] = React4.useState(false);
|
|
4472
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col relative", children: [
|
|
4473
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4474
|
+
"div",
|
|
4475
|
+
{
|
|
4476
|
+
className: "group flex gap-[5px] items-center cursor-pointer",
|
|
4477
|
+
onClick: () => setShowModal(!showModal),
|
|
4478
|
+
children: button
|
|
4479
|
+
}
|
|
4480
|
+
),
|
|
4481
|
+
showModal && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-[294px] p-2 bg-white border border-neutral-300 top-14 absolute z-50 rounded-lg", children: [
|
|
4482
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pb-3", children }),
|
|
4483
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-3 pb-1 border-t border-neutral-200 flex items-center justify-end gap-2", children: [
|
|
4484
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4485
|
+
Button,
|
|
4486
|
+
{
|
|
4487
|
+
variant: "secondary",
|
|
4488
|
+
size: "sm",
|
|
4489
|
+
onClick: () => setShowModal(false),
|
|
4490
|
+
children: "Cancelar"
|
|
4491
|
+
}
|
|
4492
|
+
),
|
|
4493
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4494
|
+
Button,
|
|
4495
|
+
{
|
|
4496
|
+
variant: "primary",
|
|
4497
|
+
size: "sm",
|
|
4498
|
+
onClick: () => {
|
|
4499
|
+
setShowModal(false);
|
|
4500
|
+
if (onClose) onClose();
|
|
4501
|
+
},
|
|
4502
|
+
children: "Aplicar"
|
|
4503
|
+
}
|
|
4504
|
+
)
|
|
4505
|
+
] })
|
|
4506
|
+
] })
|
|
4507
|
+
] });
|
|
4508
|
+
};
|
|
4509
|
+
var EditableText = ({
|
|
4510
|
+
control,
|
|
4511
|
+
name = "",
|
|
4512
|
+
emptyLabel,
|
|
4513
|
+
children,
|
|
4514
|
+
onApply,
|
|
4515
|
+
value,
|
|
4516
|
+
hideEditIcon,
|
|
4517
|
+
truncate
|
|
4518
|
+
}) => {
|
|
4519
|
+
const [showModal, setShowModal] = React4.useState(false);
|
|
4520
|
+
const truncateText = (str, max, len) => {
|
|
4521
|
+
return str.length > max ? str.substring(0, len) + "..." : str;
|
|
4522
|
+
};
|
|
4523
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4524
|
+
reactHookForm.Controller,
|
|
4525
|
+
{
|
|
4526
|
+
control,
|
|
4527
|
+
name,
|
|
4528
|
+
render: ({ field }) => {
|
|
4529
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col relative", children: [
|
|
4530
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4531
|
+
"div",
|
|
4532
|
+
{
|
|
4533
|
+
className: "group flex gap-[5px] items-baseline cursor-pointer z-[500]",
|
|
4534
|
+
onClick: () => setShowModal(!showModal),
|
|
4535
|
+
children: [
|
|
4536
|
+
value && field.value ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: truncate ? value(truncateText(field.value, 14, 12)) : value(field.value) }) : field.value ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4537
|
+
"label",
|
|
4538
|
+
{
|
|
4539
|
+
className: clsx9__default.default(
|
|
4540
|
+
{
|
|
4541
|
+
["text-label"]: !field.value,
|
|
4542
|
+
["text-paragraph"]: field.value
|
|
4543
|
+
},
|
|
4544
|
+
"text-p-md group-hover:underline group-hover:underline-offset-[3px] cursor-pointer decoration-blue-500"
|
|
4545
|
+
),
|
|
4546
|
+
children: "Preenchido"
|
|
4547
|
+
}
|
|
4548
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
4549
|
+
"label",
|
|
4550
|
+
{
|
|
4551
|
+
className: clsx9__default.default(
|
|
4552
|
+
{
|
|
4553
|
+
["text-label"]: !field.value,
|
|
4554
|
+
["text-paragraph"]: field.value
|
|
4555
|
+
},
|
|
4556
|
+
"text-p-md group-hover:underline group-hover:underline-offset-[3px] cursor-pointer decoration-blue-500"
|
|
4557
|
+
),
|
|
4558
|
+
children: emptyLabel ? emptyLabel : "N\xE3o informado"
|
|
4559
|
+
}
|
|
4560
|
+
),
|
|
4561
|
+
!hideEditIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4562
|
+
"i",
|
|
4563
|
+
{
|
|
4564
|
+
style: { fontSize: "14px" },
|
|
4565
|
+
className: "uil uil-pen text-sm text-blue-500"
|
|
4566
|
+
}
|
|
4567
|
+
)
|
|
4568
|
+
]
|
|
4569
|
+
}
|
|
4570
|
+
),
|
|
4571
|
+
showModal && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
4572
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-[160px] md:w-[294px] p-2 bg-white border border-neutral-300 absolute z-[500] rounded-lg", children: [
|
|
4573
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pb-3 ", children }),
|
|
4574
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-3 pb-1 border-t border-neutral-200 flex flex-col md:flex-row md:items-center md:justify-end gap-2", children: [
|
|
4575
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4576
|
+
Button,
|
|
4577
|
+
{
|
|
4578
|
+
variant: "secondary",
|
|
4579
|
+
size: "sm",
|
|
4580
|
+
onClick: () => setShowModal(false),
|
|
4581
|
+
children: "Cancelar"
|
|
4582
|
+
}
|
|
4583
|
+
),
|
|
4584
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4585
|
+
Button,
|
|
4586
|
+
{
|
|
4587
|
+
variant: "primary",
|
|
4588
|
+
size: "sm",
|
|
4589
|
+
onClick: () => {
|
|
4590
|
+
setShowModal(false);
|
|
4591
|
+
onApply && onApply();
|
|
4592
|
+
},
|
|
4593
|
+
children: "Salvar"
|
|
4594
|
+
}
|
|
4595
|
+
)
|
|
4596
|
+
] })
|
|
4597
|
+
] }),
|
|
4598
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4599
|
+
"div",
|
|
4600
|
+
{
|
|
4601
|
+
className: "fixed top-0 bottom-0 left-0 right-0 z-40",
|
|
4602
|
+
onClick: () => setShowModal(false)
|
|
4603
|
+
}
|
|
4604
|
+
)
|
|
4605
|
+
] })
|
|
4606
|
+
] });
|
|
4607
|
+
}
|
|
4608
|
+
}
|
|
4609
|
+
);
|
|
4610
|
+
};
|
|
4314
4611
|
|
|
4612
|
+
exports.Accordion = Accordion;
|
|
4315
4613
|
exports.Badge = Badge;
|
|
4316
4614
|
exports.Button = Button;
|
|
4317
4615
|
exports.ButtonLink = ButtonLink;
|
|
4318
4616
|
exports.Calendar = Calendar;
|
|
4319
4617
|
exports.Checkbox = Checkbox;
|
|
4618
|
+
exports.CopyPopover = CopyPopover;
|
|
4320
4619
|
exports.DataTable = DataTable;
|
|
4321
4620
|
exports.DataTablePagination = DataTablePagination;
|
|
4322
4621
|
exports.DatePickerInput = DatePickerInput;
|
|
4622
|
+
exports.EditableButton = EditableButton;
|
|
4623
|
+
exports.EditableText = EditableText;
|
|
4323
4624
|
exports.FilterCalendar = FilterCalendar;
|
|
4324
4625
|
exports.FilterOptions = FilterOptions;
|
|
4325
4626
|
exports.Input = Input;
|
|
4326
4627
|
exports.InputMoney = InputMoney;
|
|
4327
4628
|
exports.InputNumber = InputNumber;
|
|
4328
4629
|
exports.InputPercentage = InputPercentage;
|
|
4630
|
+
exports.Item = Item;
|
|
4329
4631
|
exports.Logo = Logo;
|
|
4330
4632
|
exports.MaskedInput = MaskedInput;
|
|
4633
|
+
exports.Menu = Menu;
|
|
4331
4634
|
exports.ModalDialog = ModalDialog;
|
|
4332
4635
|
exports.PaginationSelect = PaginationSelect;
|
|
4333
4636
|
exports.Popover = Popover3;
|