nexaas-ui-components 1.0.18 → 1.0.19
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/README.md +75 -0
- package/dist/index.cjs +377 -170
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.cts +99 -8
- package/dist/index.d.ts +99 -8
- package/dist/index.js +304 -99
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import * as React4 from 'react';
|
|
2
|
+
import React4__default, { forwardRef, useEffect, useState, useRef, useMemo, cloneElement, Fragment as Fragment$1 } from 'react';
|
|
3
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
|
+
import clsx9, { clsx } from 'clsx';
|
|
3
5
|
import { DateInput3, DateRangePicker3, DatePicker3 } from '@blueprintjs/datetime2';
|
|
4
|
-
import * as React2 from 'react';
|
|
5
|
-
import React2__default, { forwardRef, useState, useRef, useEffect, useMemo, cloneElement, Fragment as Fragment$1 } from 'react';
|
|
6
6
|
import { Controller } from 'react-hook-form';
|
|
7
7
|
import { create } from 'zustand';
|
|
8
8
|
import { parse, format, set, startOfWeek, endOfWeek, startOfMonth, endOfMonth, sub, subYears } from 'date-fns';
|
|
@@ -18,7 +18,7 @@ import AsyncSelect from 'react-select/async';
|
|
|
18
18
|
import { useReactTable, getExpandedRowModel, getFacetedUniqueValues, getFacetedRowModel, getFilteredRowModel, getCoreRowModel, flexRender } from '@tanstack/react-table';
|
|
19
19
|
import { rankItem } from '@tanstack/match-sorter-utils';
|
|
20
20
|
|
|
21
|
-
// src/
|
|
21
|
+
// src/components/Button.tsx
|
|
22
22
|
var SpinnerIcon = (props) => /* @__PURE__ */ jsx(
|
|
23
23
|
"svg",
|
|
24
24
|
{
|
|
@@ -87,9 +87,6 @@ var variants = {
|
|
|
87
87
|
blue: {
|
|
88
88
|
text: "shadow-button bg-blue-500 text-white text-bold"
|
|
89
89
|
},
|
|
90
|
-
link: {
|
|
91
|
-
text: "text-left text-blue-500 hover:text-blue-600 hover:underline active:text-blue-600 disabled:text-blue-500 disabled:no-underline shadow-none font-normal disabled:opacity-50"
|
|
92
|
-
},
|
|
93
90
|
iconSecondary: {
|
|
94
91
|
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"
|
|
95
92
|
},
|
|
@@ -122,6 +119,8 @@ var paddingConfig = {
|
|
|
122
119
|
var Button = ({
|
|
123
120
|
variant = "primary",
|
|
124
121
|
size = "lg",
|
|
122
|
+
hotkey,
|
|
123
|
+
hotkeyPosition = "bottom",
|
|
125
124
|
...props
|
|
126
125
|
}) => {
|
|
127
126
|
const applyGap = props.icon && props.children;
|
|
@@ -129,14 +128,47 @@ var Button = ({
|
|
|
129
128
|
const appliedSize = sizes[size];
|
|
130
129
|
const appliedPadding = props.icon ? paddingConfig[size].icon : paddingConfig[size].normal;
|
|
131
130
|
const gapText = applyGap ? "gap-[6px]" : "gap-0";
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
useEffect(() => {
|
|
132
|
+
if (!hotkey || !props.onClick) return;
|
|
133
|
+
const handleKeyDown = (event) => {
|
|
134
|
+
var _a;
|
|
135
|
+
if (props.disabled || props.loading) return;
|
|
136
|
+
const keys = hotkey.toLowerCase().split("+").map((k) => k.trim());
|
|
137
|
+
const primaryKey = keys.pop();
|
|
138
|
+
if (!primaryKey) return;
|
|
139
|
+
const requiredCtrl = keys.includes("ctrl");
|
|
140
|
+
const requiredAlt = keys.includes("alt");
|
|
141
|
+
const requiredShift = keys.includes("shift");
|
|
142
|
+
const requiredMeta = keys.includes("meta") || keys.includes("cmd");
|
|
143
|
+
const match = event.key.toLowerCase() === primaryKey && event.ctrlKey === requiredCtrl && event.altKey === requiredAlt && event.shiftKey === requiredShift && event.metaKey === requiredMeta;
|
|
144
|
+
if (match) {
|
|
145
|
+
event.preventDefault();
|
|
146
|
+
(_a = props.onClick) == null ? void 0 : _a.call(props, event);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
150
|
+
return () => {
|
|
151
|
+
window.removeEventListener("keydown", handleKeyDown);
|
|
152
|
+
};
|
|
153
|
+
}, [hotkey, props.onClick, props.disabled, props.loading]);
|
|
154
|
+
const hotkeyLabel = hotkey && /* @__PURE__ */ jsx("span", { className: "text-p-sm font-normal", children: hotkey.toUpperCase() });
|
|
155
|
+
return /* @__PURE__ */ jsxs(
|
|
156
|
+
"div",
|
|
134
157
|
{
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
158
|
+
className: clsx9("inline-flex gap-[8px]", {
|
|
159
|
+
"flex-col items-center": hotkeyPosition === "top" || hotkeyPosition === "bottom",
|
|
160
|
+
"flex-row items-center": hotkeyPosition === "left" || hotkeyPosition === "right"
|
|
161
|
+
}),
|
|
162
|
+
children: [
|
|
163
|
+
hotkey && (hotkeyPosition === "top" || hotkeyPosition === "left") && /* @__PURE__ */ jsx("span", { style: { color: "var(--label)" }, className: "text-p-sm font-normal -mt-[5px]", children: hotkeyLabel }),
|
|
164
|
+
/* @__PURE__ */ jsx(
|
|
165
|
+
"button",
|
|
166
|
+
{
|
|
167
|
+
type: props.type,
|
|
168
|
+
id: "button-component",
|
|
169
|
+
...props,
|
|
170
|
+
disabled: props.disabled || props.loading,
|
|
171
|
+
className: `
|
|
140
172
|
${props.className}
|
|
141
173
|
${appliedVariant}
|
|
142
174
|
${appliedSize.text}
|
|
@@ -144,20 +176,193 @@ var Button = ({
|
|
|
144
176
|
${gapText}
|
|
145
177
|
whitespace-nowrap group rounded-lg font-bold disabled:shadow-none active:shadow-none flex items-center
|
|
146
178
|
`,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
179
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
180
|
+
props.icon && /* @__PURE__ */ jsx(
|
|
181
|
+
"div",
|
|
182
|
+
{
|
|
183
|
+
className: `flex items-center justify-center ${appliedSize.icon}`,
|
|
184
|
+
children: props.icon && !props.loading ? props.icon : props.loadingIcon && props.loading ? props.loadingIcon : /* @__PURE__ */ jsx(SpinnerIcon, { className: "animate-spin" })
|
|
185
|
+
}
|
|
186
|
+
),
|
|
187
|
+
props.children,
|
|
188
|
+
props.dropdown && /* @__PURE__ */ jsx("i", { className: "uil uil-angle-down text-[18px]" })
|
|
189
|
+
] })
|
|
153
190
|
}
|
|
154
191
|
),
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
192
|
+
hotkey && (hotkeyPosition === "bottom" || hotkeyPosition === "right") && /* @__PURE__ */ jsx(
|
|
193
|
+
"span",
|
|
194
|
+
{
|
|
195
|
+
style: { color: "var(--label)" },
|
|
196
|
+
className: "text-p-sm font-normal -mt-[5px]",
|
|
197
|
+
children: hotkeyLabel
|
|
198
|
+
}
|
|
199
|
+
)
|
|
200
|
+
]
|
|
158
201
|
}
|
|
159
202
|
);
|
|
160
203
|
};
|
|
204
|
+
var sizes2 = {
|
|
205
|
+
xxs: {
|
|
206
|
+
text: "min-h-[14px] max-h-[40px]"
|
|
207
|
+
},
|
|
208
|
+
xs: {
|
|
209
|
+
text: "h-[36px]"
|
|
210
|
+
},
|
|
211
|
+
sm: {
|
|
212
|
+
text: "h-[40px]"
|
|
213
|
+
},
|
|
214
|
+
md: {
|
|
215
|
+
text: "h-[46px]"
|
|
216
|
+
},
|
|
217
|
+
table: {
|
|
218
|
+
text: "h-8 w-8"
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
var variants2 = {
|
|
222
|
+
primary: {
|
|
223
|
+
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]"
|
|
224
|
+
},
|
|
225
|
+
secondary: {
|
|
226
|
+
text: "shadow-button bg-white border-[0.5px] border-paragraph text-dark-blue-600 hover:text-dark-blue-600 hover:bg-[#f5f5f5] active:bg-light-gray-100 disabled:text-dark-blue-400 disabled:bg-white disabled:border-[0.5px] disabled:border-dark-blue-400"
|
|
227
|
+
},
|
|
228
|
+
link: {
|
|
229
|
+
text: "text-blue-700 hover:text-blue-800 hover:underline active:text-blue-900 active:underline disabled:text-blue-700 disabled:no-underline shadow-none font-normal"
|
|
230
|
+
},
|
|
231
|
+
icon: {
|
|
232
|
+
text: "bg-white border-[0.5px] border-dark-blue-300 hover:bg-[#f5f5f5] active:bg-light-gray-100 hover:text-paragraph disabled:text-dark-blue-400 disabled:border-[0.5px] disabled:border-disabled disabled:bg-white disabled:opacity-50"
|
|
233
|
+
},
|
|
234
|
+
iconSecondary: {
|
|
235
|
+
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"
|
|
236
|
+
},
|
|
237
|
+
outline: {
|
|
238
|
+
text: "shadow-button bg-white border-[0.5px] border-rose-700 text-rose-700 hover:bg-[#f5f5f5] active:bg-light-gray-100 disabled:text-rose-700 disabled:bg-white disabled:border-[0.5px] disabled:border-rose-700 disabled:opacity-50"
|
|
239
|
+
},
|
|
240
|
+
dark: {
|
|
241
|
+
text: "shadow-button text-white hover:bg-[#f5f5f526] active:bg-[#0a0a0a40] disabled:opacity-50 disabled:bg-transparent"
|
|
242
|
+
},
|
|
243
|
+
dangerLight: {
|
|
244
|
+
text: "shadow-button text-dangerous-700 font-bold bg-white border-[0.5px] border-dangerous-700 hover:bg-dangerous-100 active:bg-dangerous-700 active:text-white disabled:opacity-50 disabled:bg-white disabled:text-dangerous-700"
|
|
245
|
+
},
|
|
246
|
+
danger: {
|
|
247
|
+
text: "shadow-button text-white bg-gradient-to-b from-danger-start to-danger-end hover:from-[#FD6363] hover:to-[#E34E4E] active:from-dangerous-800 active:to-dangerous-800 disabled:opacity-50 disabled:from-dangerous-700 disabled:to-dangerous-700"
|
|
248
|
+
},
|
|
249
|
+
success: {
|
|
250
|
+
text: "shadow-button text-white bg-gradient-to-b from-success-start to-success-end hover:from-[#3FF09B] hover:to-[#27C579] active:from-success-800 active:to-success-800 disabled:opacity-50 disabled:from-success-700 disabled:to-success-700"
|
|
251
|
+
},
|
|
252
|
+
warn: {
|
|
253
|
+
text: "shadow-button text-white bg-gradient-to-b from-warning-start to-warning-end hover:from-[#FEBD5D] hover:to-[#F4A42D] active:from-warning-800 active:to-warning-800 disabled:opacity-50 disabled:from-warning-700 disabled:to-warning-700"
|
|
254
|
+
},
|
|
255
|
+
blue: {
|
|
256
|
+
text: "shadow-button bg-blue-700 text-white text-bold"
|
|
257
|
+
},
|
|
258
|
+
filter: {
|
|
259
|
+
text: "shadow-button rounded-3xl border border-dark-blue-300 text-paragraph shadow-button hover:bg-light-gray-100 active:border active:border-blue-700 active:text-blue-700 active:bg-blue-100 focus:border focus:border-blue-700 focus:text-blue-700 focus:bg-blue-100"
|
|
260
|
+
},
|
|
261
|
+
filterActive: {
|
|
262
|
+
text: "shadow-button rounded-3xl border border-blue-700 text-blue-700 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"
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
var ButtonLink = forwardRef(
|
|
266
|
+
({
|
|
267
|
+
size = "md",
|
|
268
|
+
icon,
|
|
269
|
+
padding = "px-3",
|
|
270
|
+
label,
|
|
271
|
+
disabled,
|
|
272
|
+
name,
|
|
273
|
+
target,
|
|
274
|
+
variant = "link",
|
|
275
|
+
className,
|
|
276
|
+
as: LinkComponent = "a",
|
|
277
|
+
hotkey,
|
|
278
|
+
hotkeyPosition = "bottom",
|
|
279
|
+
...props
|
|
280
|
+
}, ref) => {
|
|
281
|
+
var _a;
|
|
282
|
+
const applyGap = icon;
|
|
283
|
+
useEffect(() => {
|
|
284
|
+
if (!hotkey) return;
|
|
285
|
+
const handleKeyDown = (event) => {
|
|
286
|
+
var _a2;
|
|
287
|
+
if (disabled) return;
|
|
288
|
+
const keys = hotkey.toLowerCase().split("+").map((k) => k.trim());
|
|
289
|
+
const primaryKey = keys.pop();
|
|
290
|
+
if (!primaryKey) return;
|
|
291
|
+
const requiredCtrl = keys.includes("ctrl");
|
|
292
|
+
const requiredAlt = keys.includes("alt");
|
|
293
|
+
const requiredShift = keys.includes("shift");
|
|
294
|
+
const requiredMeta = keys.includes("meta") || keys.includes("cmd");
|
|
295
|
+
const match = event.key.toLowerCase() === primaryKey && event.ctrlKey === requiredCtrl && event.altKey === requiredAlt && event.shiftKey === requiredShift && event.metaKey === requiredMeta;
|
|
296
|
+
if (match) {
|
|
297
|
+
event.preventDefault();
|
|
298
|
+
if (props.onClick) {
|
|
299
|
+
(_a2 = props.onClick) == null ? void 0 : _a2.call(props, event);
|
|
300
|
+
} else {
|
|
301
|
+
const linkElement = document.querySelector(`a[href="${props.href}"]`);
|
|
302
|
+
linkElement == null ? void 0 : linkElement.click();
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
307
|
+
return () => {
|
|
308
|
+
window.removeEventListener("keydown", handleKeyDown);
|
|
309
|
+
};
|
|
310
|
+
}, [hotkey, props.onClick, props.href, disabled]);
|
|
311
|
+
const hotkeyLabel = hotkey && /* @__PURE__ */ jsx("span", { className: "text-p-sm font-normal", children: hotkey.toUpperCase() });
|
|
312
|
+
return /* @__PURE__ */ jsxs(
|
|
313
|
+
"div",
|
|
314
|
+
{
|
|
315
|
+
className: clsx9("inline-flex gap-[8px]", {
|
|
316
|
+
"flex-col items-center justify-center": hotkeyPosition === "top" || hotkeyPosition === "bottom",
|
|
317
|
+
"flex-row items-center justify-center": hotkeyPosition === "left" || hotkeyPosition === "right"
|
|
318
|
+
}),
|
|
319
|
+
children: [
|
|
320
|
+
hotkey && (hotkeyPosition === "top" || hotkeyPosition === "left") && /* @__PURE__ */ jsx(
|
|
321
|
+
"span",
|
|
322
|
+
{
|
|
323
|
+
style: { color: "var(--label)" },
|
|
324
|
+
className: "text-p-sm font-normal -mt-[5px]",
|
|
325
|
+
children: hotkeyLabel
|
|
326
|
+
}
|
|
327
|
+
),
|
|
328
|
+
/* @__PURE__ */ jsxs(
|
|
329
|
+
LinkComponent,
|
|
330
|
+
{
|
|
331
|
+
ref,
|
|
332
|
+
className: clsx9(
|
|
333
|
+
{
|
|
334
|
+
[(_a = variants2[variant]) == null ? void 0 : _a.text]: true,
|
|
335
|
+
[sizes2[size].text]: true,
|
|
336
|
+
["pointer-events-none shadow-none text-label"]: disabled,
|
|
337
|
+
["px-2"]: variant !== "link"
|
|
338
|
+
},
|
|
339
|
+
`group rounded-lg font-bold active:shadow-none font-title flex items-center justify-start cursor-pointer
|
|
340
|
+
${applyGap ? "gap-2" : "gap-0"} ${className}
|
|
341
|
+
`
|
|
342
|
+
),
|
|
343
|
+
target,
|
|
344
|
+
...props,
|
|
345
|
+
download: name,
|
|
346
|
+
children: [
|
|
347
|
+
icon && /* @__PURE__ */ jsx("div", { className: "text-[20px] flex items-center justify-center", children: icon }),
|
|
348
|
+
/* @__PURE__ */ jsx("span", { className: "cursor-pointer line-clamp-2", children: label })
|
|
349
|
+
]
|
|
350
|
+
}
|
|
351
|
+
),
|
|
352
|
+
hotkey && (hotkeyPosition === "bottom" || hotkeyPosition === "right") && /* @__PURE__ */ jsx(
|
|
353
|
+
"span",
|
|
354
|
+
{
|
|
355
|
+
style: { color: "var(--label)" },
|
|
356
|
+
className: "text-p-sm font-normal -mt-[5px]",
|
|
357
|
+
children: hotkeyLabel
|
|
358
|
+
}
|
|
359
|
+
)
|
|
360
|
+
]
|
|
361
|
+
}
|
|
362
|
+
);
|
|
363
|
+
}
|
|
364
|
+
);
|
|
365
|
+
ButtonLink.displayName = "ButtonLink";
|
|
161
366
|
var Input = ({
|
|
162
367
|
label,
|
|
163
368
|
type,
|
|
@@ -208,7 +413,7 @@ var Input = ({
|
|
|
208
413
|
value,
|
|
209
414
|
defaultValue,
|
|
210
415
|
style: !label && placeholder && icon || icon ? inlineStyles.inputWithIcon : void 0,
|
|
211
|
-
className:
|
|
416
|
+
className: clsx9({
|
|
212
417
|
[styles.error]: hasError,
|
|
213
418
|
[styles.input]: true,
|
|
214
419
|
["pr-10"]: clearField,
|
|
@@ -229,14 +434,14 @@ var Input = ({
|
|
|
229
434
|
icon && /* @__PURE__ */ jsx(
|
|
230
435
|
"div",
|
|
231
436
|
{
|
|
232
|
-
className:
|
|
437
|
+
className: clsx9(styles.icon, "flex justify-center items-center"),
|
|
233
438
|
children: icon
|
|
234
439
|
}
|
|
235
440
|
),
|
|
236
441
|
hideInput && /* @__PURE__ */ jsx(
|
|
237
442
|
"div",
|
|
238
443
|
{
|
|
239
|
-
className:
|
|
444
|
+
className: clsx9(
|
|
240
445
|
styles.rightIcon,
|
|
241
446
|
"flex justify-center items-center"
|
|
242
447
|
),
|
|
@@ -247,7 +452,7 @@ var Input = ({
|
|
|
247
452
|
"label",
|
|
248
453
|
{
|
|
249
454
|
style: icon ? inlineStyles.labelWithIcon : void 0,
|
|
250
|
-
className:
|
|
455
|
+
className: clsx9(
|
|
251
456
|
{
|
|
252
457
|
[styles.label]: true,
|
|
253
458
|
["left-2.5"]: !icon
|
|
@@ -264,7 +469,7 @@ var Input = ({
|
|
|
264
469
|
clearField && value && value !== "" && !disabled && /* @__PURE__ */ jsx(
|
|
265
470
|
"i",
|
|
266
471
|
{
|
|
267
|
-
className:
|
|
472
|
+
className: clsx9(
|
|
268
473
|
{
|
|
269
474
|
[styles.clear]: true
|
|
270
475
|
},
|
|
@@ -469,7 +674,7 @@ var DatePickerInput = forwardRef(
|
|
|
469
674
|
"div",
|
|
470
675
|
{
|
|
471
676
|
id: "icon",
|
|
472
|
-
className:
|
|
677
|
+
className: clsx9(
|
|
473
678
|
styles.icon,
|
|
474
679
|
"flex justify-center items-center text-[20px] bg-gray-100"
|
|
475
680
|
),
|
|
@@ -516,7 +721,7 @@ var DatePickerInput = forwardRef(
|
|
|
516
721
|
/* @__PURE__ */ jsxs(
|
|
517
722
|
"label",
|
|
518
723
|
{
|
|
519
|
-
className:
|
|
724
|
+
className: clsx9(
|
|
520
725
|
"pointer-events-none ",
|
|
521
726
|
styles.label,
|
|
522
727
|
`
|
|
@@ -533,7 +738,7 @@ var DatePickerInput = forwardRef(
|
|
|
533
738
|
clearField && (field == null ? void 0 : field.value) && (field == null ? void 0 : field.value) !== "" && !disabled && /* @__PURE__ */ jsx(
|
|
534
739
|
"i",
|
|
535
740
|
{
|
|
536
|
-
className:
|
|
741
|
+
className: clsx9(
|
|
537
742
|
{
|
|
538
743
|
[styles.clear]: true
|
|
539
744
|
},
|
|
@@ -568,7 +773,7 @@ var DatePickerInput = forwardRef(
|
|
|
568
773
|
] });
|
|
569
774
|
}
|
|
570
775
|
);
|
|
571
|
-
var
|
|
776
|
+
var variants3 = {
|
|
572
777
|
success: "bg-success-100 text-success-600",
|
|
573
778
|
warning: "bg-warning-100 text-warning-600",
|
|
574
779
|
blue: "bg-blue-100 text-blue-500",
|
|
@@ -590,8 +795,8 @@ var Badge = ({
|
|
|
590
795
|
return /* @__PURE__ */ jsx(
|
|
591
796
|
"span",
|
|
592
797
|
{
|
|
593
|
-
className:
|
|
594
|
-
{ [
|
|
798
|
+
className: clsx9(
|
|
799
|
+
{ [variants3[variant]]: (variant == null ? void 0 : variant.length) > 0 },
|
|
595
800
|
"py-1 px-2 text-p-md font-normal inline-flex items-center justify-center gap-1 rounded-full text-center",
|
|
596
801
|
className
|
|
597
802
|
),
|
|
@@ -865,7 +1070,7 @@ var Checkbox = ({
|
|
|
865
1070
|
id: registration ? registration.name : key,
|
|
866
1071
|
disabled,
|
|
867
1072
|
type: "checkbox",
|
|
868
|
-
className:
|
|
1073
|
+
className: clsx9(
|
|
869
1074
|
"disabled:hover:bg-neutral-100 disabled:cursor-default cursor-pointer h-[16px] w-[16px] rounded-[2.5px] border border-neutral-200 text-blue-500 focus:rounded-[4px] focus:border-[1.5px] focus:ring-blue-500 focus-visible:ring-blue-500 checked:after:text-blue-500 disabled:bg-neutral-100"
|
|
870
1075
|
)
|
|
871
1076
|
}
|
|
@@ -1131,7 +1336,7 @@ var FilterCalendar = ({
|
|
|
1131
1336
|
return /* @__PURE__ */ jsx(
|
|
1132
1337
|
Popover,
|
|
1133
1338
|
{
|
|
1134
|
-
className:
|
|
1339
|
+
className: clsx9(
|
|
1135
1340
|
{ ["w-full"]: isMobileSize },
|
|
1136
1341
|
"relative text-paragraph"
|
|
1137
1342
|
),
|
|
@@ -1141,7 +1346,7 @@ var FilterCalendar = ({
|
|
|
1141
1346
|
/* @__PURE__ */ jsx(Float.Reference, { children: /* @__PURE__ */ jsx(PopoverButton, { as: "button", children: /* @__PURE__ */ jsxs(
|
|
1142
1347
|
"div",
|
|
1143
1348
|
{
|
|
1144
|
-
className:
|
|
1349
|
+
className: clsx9(
|
|
1145
1350
|
{
|
|
1146
1351
|
[style.filter]: !hasValue && !open,
|
|
1147
1352
|
[style.filterOpen]: open && !hasValue,
|
|
@@ -1153,7 +1358,7 @@ var FilterCalendar = ({
|
|
|
1153
1358
|
icon && /* @__PURE__ */ jsx(
|
|
1154
1359
|
"div",
|
|
1155
1360
|
{
|
|
1156
|
-
className:
|
|
1361
|
+
className: clsx9({
|
|
1157
1362
|
["text-label group-active:text-blue-500"]: !field.value && !open,
|
|
1158
1363
|
["text-blue-500"]: open && !field.value,
|
|
1159
1364
|
["text-blue-500 group-hover:text-white group-active:text-white"]: open && field.value
|
|
@@ -1164,7 +1369,7 @@ var FilterCalendar = ({
|
|
|
1164
1369
|
/* @__PURE__ */ jsx(
|
|
1165
1370
|
"label",
|
|
1166
1371
|
{
|
|
1167
|
-
className:
|
|
1372
|
+
className: clsx9(
|
|
1168
1373
|
{
|
|
1169
1374
|
["text-paragraph group-active:text-blue-500"]: !field.value && !open,
|
|
1170
1375
|
["text-blue-500"]: open && !field.value,
|
|
@@ -1180,7 +1385,7 @@ var FilterCalendar = ({
|
|
|
1180
1385
|
/* @__PURE__ */ jsx(
|
|
1181
1386
|
"i",
|
|
1182
1387
|
{
|
|
1183
|
-
className:
|
|
1388
|
+
className: clsx9(
|
|
1184
1389
|
{
|
|
1185
1390
|
["text-label group-active:text-blue-500"]: !field.value && !open,
|
|
1186
1391
|
["text-blue-500"]: open && !field.value,
|
|
@@ -1207,7 +1412,7 @@ var FilterCalendar = ({
|
|
|
1207
1412
|
onClear && /* @__PURE__ */ jsx("div", { className: "mr-1", children: /* @__PURE__ */ jsx(
|
|
1208
1413
|
Button,
|
|
1209
1414
|
{
|
|
1210
|
-
variant: "
|
|
1415
|
+
variant: "secondary",
|
|
1211
1416
|
size: "xxs",
|
|
1212
1417
|
onClick: () => {
|
|
1213
1418
|
if (onClear) {
|
|
@@ -1282,8 +1487,8 @@ function InputSmall({
|
|
|
1282
1487
|
clear: "pr-[5px] cursor-pointer text-label text-[16px]"
|
|
1283
1488
|
};
|
|
1284
1489
|
const elem = inputRef == null ? void 0 : inputRef.current;
|
|
1285
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
1286
|
-
icon && !searchOnClick && /* @__PURE__ */ jsx("div", { className:
|
|
1490
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx9(styles.wrapper), children: [
|
|
1491
|
+
icon && !searchOnClick && /* @__PURE__ */ jsx("div", { className: clsx9(styles.icon), children: icon }),
|
|
1287
1492
|
/* @__PURE__ */ jsx(
|
|
1288
1493
|
"input",
|
|
1289
1494
|
{
|
|
@@ -1291,7 +1496,7 @@ function InputSmall({
|
|
|
1291
1496
|
...inputProps,
|
|
1292
1497
|
type: "search-text",
|
|
1293
1498
|
ref: inputRef,
|
|
1294
|
-
className:
|
|
1499
|
+
className: clsx9(
|
|
1295
1500
|
{
|
|
1296
1501
|
["pl-1"]: collapsed
|
|
1297
1502
|
},
|
|
@@ -1308,7 +1513,7 @@ function InputSmall({
|
|
|
1308
1513
|
clearField && value && !disabled && /* @__PURE__ */ jsx(
|
|
1309
1514
|
"i",
|
|
1310
1515
|
{
|
|
1311
|
-
className:
|
|
1516
|
+
className: clsx9(styles.clear, "uil uil-times"),
|
|
1312
1517
|
onClick: () => {
|
|
1313
1518
|
elem.value = "";
|
|
1314
1519
|
elem == null ? void 0 : elem.focus();
|
|
@@ -1323,7 +1528,7 @@ function InputSmall({
|
|
|
1323
1528
|
"button",
|
|
1324
1529
|
{
|
|
1325
1530
|
type: "button",
|
|
1326
|
-
className:
|
|
1531
|
+
className: clsx9({
|
|
1327
1532
|
["border-l border-input pl-1"]: clearField && value && !disabled,
|
|
1328
1533
|
["text-blue-500"]: !disabled,
|
|
1329
1534
|
["text-neutral-300"]: disabled,
|
|
@@ -1403,7 +1608,7 @@ var FilterOptions = ({
|
|
|
1403
1608
|
children: /* @__PURE__ */ jsxs(
|
|
1404
1609
|
"div",
|
|
1405
1610
|
{
|
|
1406
|
-
className:
|
|
1611
|
+
className: clsx9(
|
|
1407
1612
|
"relative cursor-pointer outline-none select-none p-3 rounded-lg pr-9 text-paragraph mt-1 first:mt-0 overflow-hidden w-full",
|
|
1408
1613
|
{
|
|
1409
1614
|
["hover:bg-neutral-200"]: !option.disabled && !isSelected,
|
|
@@ -1415,7 +1620,7 @@ var FilterOptions = ({
|
|
|
1415
1620
|
/* @__PURE__ */ jsx(
|
|
1416
1621
|
"span",
|
|
1417
1622
|
{
|
|
1418
|
-
className:
|
|
1623
|
+
className: clsx9(
|
|
1419
1624
|
{
|
|
1420
1625
|
["font-semibold text-white"]: isSelected
|
|
1421
1626
|
},
|
|
@@ -1427,7 +1632,7 @@ var FilterOptions = ({
|
|
|
1427
1632
|
/* @__PURE__ */ jsx(
|
|
1428
1633
|
"span",
|
|
1429
1634
|
{
|
|
1430
|
-
className:
|
|
1635
|
+
className: clsx9(
|
|
1431
1636
|
{
|
|
1432
1637
|
["font-semibold text-white"]: isSelected
|
|
1433
1638
|
},
|
|
@@ -1439,7 +1644,7 @@ var FilterOptions = ({
|
|
|
1439
1644
|
isSelected ? /* @__PURE__ */ jsx(
|
|
1440
1645
|
"span",
|
|
1441
1646
|
{
|
|
1442
|
-
className:
|
|
1647
|
+
className: clsx9(
|
|
1443
1648
|
"absolute inset-y-0 text-white right-0 flex items-center pr-4"
|
|
1444
1649
|
),
|
|
1445
1650
|
children: /* @__PURE__ */ jsx("i", { className: "uil uil-check text-lg" })
|
|
@@ -1464,7 +1669,7 @@ var FilterOptions = ({
|
|
|
1464
1669
|
return /* @__PURE__ */ jsx(
|
|
1465
1670
|
Popover,
|
|
1466
1671
|
{
|
|
1467
|
-
className:
|
|
1672
|
+
className: clsx9(
|
|
1468
1673
|
{ ["w-full"]: isMobileSize },
|
|
1469
1674
|
"relative text-paragraph"
|
|
1470
1675
|
),
|
|
@@ -1474,7 +1679,7 @@ var FilterOptions = ({
|
|
|
1474
1679
|
/* @__PURE__ */ jsx(Float.Reference, { children: /* @__PURE__ */ jsx(PopoverButton, { as: "button", children: /* @__PURE__ */ jsxs(
|
|
1475
1680
|
"div",
|
|
1476
1681
|
{
|
|
1477
|
-
className:
|
|
1682
|
+
className: clsx9(
|
|
1478
1683
|
{
|
|
1479
1684
|
[style.filter]: !hasValue && !open,
|
|
1480
1685
|
[style.filterOpen]: open && !hasValue,
|
|
@@ -1486,7 +1691,7 @@ var FilterOptions = ({
|
|
|
1486
1691
|
icon && /* @__PURE__ */ jsx(
|
|
1487
1692
|
"div",
|
|
1488
1693
|
{
|
|
1489
|
-
className:
|
|
1694
|
+
className: clsx9({
|
|
1490
1695
|
["text-label group-active:text-blue-500"]: !field.value && !open,
|
|
1491
1696
|
["text-blue-500"]: open && !field.value,
|
|
1492
1697
|
["text-blue-500 group-hover:text-white group-active:text-white"]: open && field.value
|
|
@@ -1497,7 +1702,7 @@ var FilterOptions = ({
|
|
|
1497
1702
|
/* @__PURE__ */ jsx(
|
|
1498
1703
|
"label",
|
|
1499
1704
|
{
|
|
1500
|
-
className:
|
|
1705
|
+
className: clsx9(
|
|
1501
1706
|
{
|
|
1502
1707
|
["text-paragraph group-active:text-blue-500"]: !field.value && !open,
|
|
1503
1708
|
["text-blue-500"]: open && !field.value,
|
|
@@ -1512,7 +1717,7 @@ var FilterOptions = ({
|
|
|
1512
1717
|
/* @__PURE__ */ jsx(
|
|
1513
1718
|
"i",
|
|
1514
1719
|
{
|
|
1515
|
-
className:
|
|
1720
|
+
className: clsx9(
|
|
1516
1721
|
{
|
|
1517
1722
|
["text-label group-active:text-blue-500"]: !field.value && !open,
|
|
1518
1723
|
["text-blue-500"]: open && !field.value,
|
|
@@ -1567,7 +1772,7 @@ var FilterOptions = ({
|
|
|
1567
1772
|
return /* @__PURE__ */ jsx(
|
|
1568
1773
|
"button",
|
|
1569
1774
|
{
|
|
1570
|
-
className:
|
|
1775
|
+
className: clsx9(
|
|
1571
1776
|
{
|
|
1572
1777
|
["bg-blue-500 text-white"]: active,
|
|
1573
1778
|
["text-paragraph"]: !active
|
|
@@ -1626,7 +1831,7 @@ var FilterOptions = ({
|
|
|
1626
1831
|
isMulti && onSelectAll && /* @__PURE__ */ jsx("div", { className: "border-r pr-2 border-neutral-300", children: /* @__PURE__ */ jsx(
|
|
1627
1832
|
Button,
|
|
1628
1833
|
{
|
|
1629
|
-
variant: "
|
|
1834
|
+
variant: "secondary",
|
|
1630
1835
|
size: "xxs",
|
|
1631
1836
|
onClick: () => {
|
|
1632
1837
|
onSelectAll();
|
|
@@ -1640,7 +1845,7 @@ var FilterOptions = ({
|
|
|
1640
1845
|
onClear && /* @__PURE__ */ jsx("div", { className: "mr-1", children: /* @__PURE__ */ jsx(
|
|
1641
1846
|
Button,
|
|
1642
1847
|
{
|
|
1643
|
-
variant: "
|
|
1848
|
+
variant: "secondary",
|
|
1644
1849
|
size: "xxs",
|
|
1645
1850
|
onClick: () => {
|
|
1646
1851
|
if (onClear) {
|
|
@@ -1758,7 +1963,7 @@ function InputMoney({
|
|
|
1758
1963
|
icon && /* @__PURE__ */ jsx(
|
|
1759
1964
|
"div",
|
|
1760
1965
|
{
|
|
1761
|
-
className:
|
|
1966
|
+
className: clsx9(
|
|
1762
1967
|
styles.icon,
|
|
1763
1968
|
"flex justify-center items-center"
|
|
1764
1969
|
),
|
|
@@ -1772,7 +1977,7 @@ function InputMoney({
|
|
|
1772
1977
|
...inputProps,
|
|
1773
1978
|
...field,
|
|
1774
1979
|
type: "text",
|
|
1775
|
-
className:
|
|
1980
|
+
className: clsx9({
|
|
1776
1981
|
[styles.input]: true,
|
|
1777
1982
|
["pr-10"]: clearField,
|
|
1778
1983
|
["pr-2"]: !clearField,
|
|
@@ -1794,7 +1999,7 @@ function InputMoney({
|
|
|
1794
1999
|
/* @__PURE__ */ jsxs(
|
|
1795
2000
|
"label",
|
|
1796
2001
|
{
|
|
1797
|
-
className:
|
|
2002
|
+
className: clsx9(
|
|
1798
2003
|
{
|
|
1799
2004
|
[styles.label]: true,
|
|
1800
2005
|
["left-[46px]"]: icon,
|
|
@@ -1904,7 +2109,7 @@ function InputNumber({
|
|
|
1904
2109
|
icon && /* @__PURE__ */ jsx(
|
|
1905
2110
|
"div",
|
|
1906
2111
|
{
|
|
1907
|
-
className:
|
|
2112
|
+
className: clsx9(
|
|
1908
2113
|
styles.icon,
|
|
1909
2114
|
"flex justify-center items-center"
|
|
1910
2115
|
),
|
|
@@ -1918,7 +2123,7 @@ function InputNumber({
|
|
|
1918
2123
|
type: "number",
|
|
1919
2124
|
autoComplete: "off",
|
|
1920
2125
|
id: name,
|
|
1921
|
-
className:
|
|
2126
|
+
className: clsx9({
|
|
1922
2127
|
[styles.input]: true,
|
|
1923
2128
|
["pr-10"]: clearField,
|
|
1924
2129
|
["pr-2"]: !clearField,
|
|
@@ -1969,7 +2174,7 @@ function InputNumber({
|
|
|
1969
2174
|
/* @__PURE__ */ jsxs(
|
|
1970
2175
|
"label",
|
|
1971
2176
|
{
|
|
1972
|
-
className:
|
|
2177
|
+
className: clsx9(
|
|
1973
2178
|
{
|
|
1974
2179
|
[styles.label]: true,
|
|
1975
2180
|
["left-[3.5rem]"]: icon,
|
|
@@ -1985,12 +2190,12 @@ function InputNumber({
|
|
|
1985
2190
|
}
|
|
1986
2191
|
)
|
|
1987
2192
|
] }),
|
|
1988
|
-
!hideArrows && /* @__PURE__ */ jsxs("div", { className:
|
|
2193
|
+
!hideArrows && /* @__PURE__ */ jsxs("div", { className: clsx9([styles.buttonsWrapper]), children: [
|
|
1989
2194
|
/* @__PURE__ */ jsx(
|
|
1990
2195
|
"button",
|
|
1991
2196
|
{
|
|
1992
2197
|
type: "button",
|
|
1993
|
-
className:
|
|
2198
|
+
className: clsx9([styles.button]),
|
|
1994
2199
|
disabled,
|
|
1995
2200
|
onClick: () => {
|
|
1996
2201
|
if (!maxValue || maxValue && Number(value2 || 0) + 1 <= maxValue) {
|
|
@@ -2004,7 +2209,7 @@ function InputNumber({
|
|
|
2004
2209
|
"button",
|
|
2005
2210
|
{
|
|
2006
2211
|
type: "button",
|
|
2007
|
-
className:
|
|
2212
|
+
className: clsx9([styles.button]),
|
|
2008
2213
|
disabled,
|
|
2009
2214
|
onClick: () => {
|
|
2010
2215
|
if (!maxValue || maxValue && Number(value2 === 0 ? 0 : Number(value2) - 1) <= maxValue) {
|
|
@@ -2094,7 +2299,7 @@ function InputPercentage({
|
|
|
2094
2299
|
icon && /* @__PURE__ */ jsx(
|
|
2095
2300
|
"div",
|
|
2096
2301
|
{
|
|
2097
|
-
className:
|
|
2302
|
+
className: clsx9(
|
|
2098
2303
|
styles.icon,
|
|
2099
2304
|
"flex justify-center items-center"
|
|
2100
2305
|
),
|
|
@@ -2108,7 +2313,7 @@ function InputPercentage({
|
|
|
2108
2313
|
...inputProps,
|
|
2109
2314
|
...field,
|
|
2110
2315
|
type: "text",
|
|
2111
|
-
className:
|
|
2316
|
+
className: clsx9({
|
|
2112
2317
|
[styles.input]: true,
|
|
2113
2318
|
["pr-10"]: clearField,
|
|
2114
2319
|
["pr-2"]: !clearField,
|
|
@@ -2126,7 +2331,7 @@ function InputPercentage({
|
|
|
2126
2331
|
/* @__PURE__ */ jsxs(
|
|
2127
2332
|
"label",
|
|
2128
2333
|
{
|
|
2129
|
-
className:
|
|
2334
|
+
className: clsx9(
|
|
2130
2335
|
{
|
|
2131
2336
|
[styles.label]: true,
|
|
2132
2337
|
["left-[3rem]"]: icon,
|
|
@@ -2245,7 +2450,7 @@ var alertTypes = {
|
|
|
2245
2450
|
info: "text-blue-500",
|
|
2246
2451
|
primary: "text-rose-700"
|
|
2247
2452
|
};
|
|
2248
|
-
var
|
|
2453
|
+
var sizes3 = {
|
|
2249
2454
|
xs: "w-[350px]",
|
|
2250
2455
|
sm: "w-[662px]",
|
|
2251
2456
|
md: "w-[960px]",
|
|
@@ -2302,10 +2507,10 @@ var ModalDialog = ({
|
|
|
2302
2507
|
onRequestClose: onClose,
|
|
2303
2508
|
style: customStyles3,
|
|
2304
2509
|
contentLabel: "Example Modal",
|
|
2305
|
-
children: /* @__PURE__ */ jsxs("div", { className:
|
|
2510
|
+
children: /* @__PURE__ */ jsxs("div", { className: clsx9(sizes3[size]), children: [
|
|
2306
2511
|
/* @__PURE__ */ jsxs("div", { className: "pb-2 border-b border-b-neutral-200 flex items-center justify-between", children: [
|
|
2307
2512
|
/* @__PURE__ */ jsxs("h3", { className: "text-[24px] font-bold flex items-center gap-2", children: [
|
|
2308
|
-
alertType && /* @__PURE__ */ jsx("div", { className:
|
|
2513
|
+
alertType && /* @__PURE__ */ jsx("div", { className: clsx9([alertTypes[alertType]], "text-[30px]"), children: icon }),
|
|
2309
2514
|
title
|
|
2310
2515
|
] }),
|
|
2311
2516
|
/* @__PURE__ */ jsx("button", { onClick: onCancel, className: "text-neutral-500 text-[24px]", children: /* @__PURE__ */ jsx("i", { className: "uil uil-times" }) })
|
|
@@ -2315,7 +2520,7 @@ var ModalDialog = ({
|
|
|
2315
2520
|
/* @__PURE__ */ jsx(
|
|
2316
2521
|
"div",
|
|
2317
2522
|
{
|
|
2318
|
-
className:
|
|
2523
|
+
className: clsx9({
|
|
2319
2524
|
["flex-1"]: info
|
|
2320
2525
|
}),
|
|
2321
2526
|
children: info
|
|
@@ -2589,7 +2794,7 @@ var SelectField = ({
|
|
|
2589
2794
|
alignItems: "center",
|
|
2590
2795
|
justifyContent: "space-between"
|
|
2591
2796
|
},
|
|
2592
|
-
children: /* @__PURE__ */ jsx("span", { className:
|
|
2797
|
+
children: /* @__PURE__ */ jsx("span", { className: clsx9("text-p-md focus:text-white"), children: props.data.label })
|
|
2593
2798
|
}
|
|
2594
2799
|
) });
|
|
2595
2800
|
};
|
|
@@ -2666,7 +2871,7 @@ var SelectField = ({
|
|
|
2666
2871
|
icon && /* @__PURE__ */ jsx(
|
|
2667
2872
|
"div",
|
|
2668
2873
|
{
|
|
2669
|
-
className:
|
|
2874
|
+
className: clsx9(
|
|
2670
2875
|
"z-[70] absolute bg-neutral-100 top-[1px] left-[1px] rounded-l-lg flex justify-center items-center h-[44px] w-[38px] text-[22px] text-dark-blue-600",
|
|
2671
2876
|
{
|
|
2672
2877
|
"text-blue-500": isFocused && hasIcon.hasIcon,
|
|
@@ -2718,7 +2923,7 @@ var SelectField = ({
|
|
|
2718
2923
|
/* @__PURE__ */ jsxs(
|
|
2719
2924
|
"span",
|
|
2720
2925
|
{
|
|
2721
|
-
className:
|
|
2926
|
+
className: clsx9(
|
|
2722
2927
|
"text-label text-sm left-2.5 cursor-pointer pointer-events-none absolute transition-all duration-200",
|
|
2723
2928
|
{
|
|
2724
2929
|
"scale-75 -translate-y-3": field.value || inputValue,
|
|
@@ -2970,7 +3175,7 @@ var SelectFieldBip = ({
|
|
|
2970
3175
|
alignItems: "center",
|
|
2971
3176
|
justifyContent: "space-between"
|
|
2972
3177
|
},
|
|
2973
|
-
children: /* @__PURE__ */ jsx("span", { className:
|
|
3178
|
+
children: /* @__PURE__ */ jsx("span", { className: clsx9("text-p-md focus:text-white"), children: props.data.label })
|
|
2974
3179
|
}
|
|
2975
3180
|
) });
|
|
2976
3181
|
};
|
|
@@ -3109,7 +3314,7 @@ var SelectFieldBip = ({
|
|
|
3109
3314
|
/* @__PURE__ */ jsxs(
|
|
3110
3315
|
"span",
|
|
3111
3316
|
{
|
|
3112
|
-
className:
|
|
3317
|
+
className: clsx9(
|
|
3113
3318
|
"text-label text-sm left-2.5 cursor-pointer pointer-events-none",
|
|
3114
3319
|
{
|
|
3115
3320
|
[" scale-75 -translate-y-3 "]: field.value,
|
|
@@ -3343,7 +3548,7 @@ function PaginationSelect({
|
|
|
3343
3548
|
Combobox.Option,
|
|
3344
3549
|
{
|
|
3345
3550
|
value: opt,
|
|
3346
|
-
className:
|
|
3551
|
+
className: clsx9(
|
|
3347
3552
|
"p-2 rounded-lg items-center justify-center cursor-pointer flex whitespace-nowrap no-underline ",
|
|
3348
3553
|
{
|
|
3349
3554
|
"bg-blue-500 hover:bg-blue-500 hover:text-[#FFFFFF] text-[#FFFFFF]": selected
|
|
@@ -3418,7 +3623,7 @@ function PaginationSelect({
|
|
|
3418
3623
|
Combobox.Option,
|
|
3419
3624
|
{
|
|
3420
3625
|
value: opt,
|
|
3421
|
-
className:
|
|
3626
|
+
className: clsx9(
|
|
3422
3627
|
"p-2 rounded-lg items-center justify-center cursor-pointer flex whitespace-nowrap no-underline ",
|
|
3423
3628
|
{
|
|
3424
3629
|
"bg-blue-500 hover:bg-blue-500 hover:text-[#FFFFFF] text-[#FFFFFF]": selected
|
|
@@ -3438,7 +3643,7 @@ function PaginationSelect({
|
|
|
3438
3643
|
] })
|
|
3439
3644
|
] });
|
|
3440
3645
|
}
|
|
3441
|
-
var Table =
|
|
3646
|
+
var Table = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3442
3647
|
"table",
|
|
3443
3648
|
{
|
|
3444
3649
|
ref,
|
|
@@ -3451,7 +3656,7 @@ var Table = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
3451
3656
|
}
|
|
3452
3657
|
));
|
|
3453
3658
|
Table.displayName = "Table";
|
|
3454
|
-
var TableHeader =
|
|
3659
|
+
var TableHeader = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3455
3660
|
"thead",
|
|
3456
3661
|
{
|
|
3457
3662
|
ref,
|
|
@@ -3460,9 +3665,9 @@ var TableHeader = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
3460
3665
|
}
|
|
3461
3666
|
));
|
|
3462
3667
|
TableHeader.displayName = "TableHeader";
|
|
3463
|
-
var TableBody =
|
|
3668
|
+
var TableBody = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", { ref, className: clsx(className), ...props }));
|
|
3464
3669
|
TableBody.displayName = "TableBody";
|
|
3465
|
-
var TableFooter =
|
|
3670
|
+
var TableFooter = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3466
3671
|
"div",
|
|
3467
3672
|
{
|
|
3468
3673
|
ref,
|
|
@@ -3474,9 +3679,9 @@ var TableFooter = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
3474
3679
|
}
|
|
3475
3680
|
));
|
|
3476
3681
|
TableFooter.displayName = "TableFooter";
|
|
3477
|
-
var TableRow =
|
|
3682
|
+
var TableRow = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tr", { ref, className: clsx(className), ...props }));
|
|
3478
3683
|
TableRow.displayName = "TableRow";
|
|
3479
|
-
var TableHead =
|
|
3684
|
+
var TableHead = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3480
3685
|
"th",
|
|
3481
3686
|
{
|
|
3482
3687
|
ref,
|
|
@@ -3491,7 +3696,7 @@ var TableHead = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
3491
3696
|
}
|
|
3492
3697
|
));
|
|
3493
3698
|
TableHead.displayName = "TableHead";
|
|
3494
|
-
var TableCell =
|
|
3699
|
+
var TableCell = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3495
3700
|
"td",
|
|
3496
3701
|
{
|
|
3497
3702
|
ref,
|
|
@@ -3503,7 +3708,7 @@ var TableCell = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
3503
3708
|
}
|
|
3504
3709
|
));
|
|
3505
3710
|
TableCell.displayName = "TableCell";
|
|
3506
|
-
var TableCaption =
|
|
3711
|
+
var TableCaption = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3507
3712
|
"caption",
|
|
3508
3713
|
{
|
|
3509
3714
|
ref,
|
|
@@ -3557,10 +3762,10 @@ function DataTablePagination({
|
|
|
3557
3762
|
(pageSizeOptions == null ? void 0 : pageSizeOptions.length) > 0 && /* @__PURE__ */ jsx(PaginationSelect, { table, pageSizeOptions }),
|
|
3558
3763
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col md:flex-row items-center justify-center md:justify-normal gap-2 md:gap-4", children: [
|
|
3559
3764
|
footer,
|
|
3560
|
-
selectAllOption && /* @__PURE__ */ jsx("div", { children: rowsSelected !== totalData ? /* @__PURE__ */ jsx("div", { className: "md:border-l border-gray-300 pl-4", children: /* @__PURE__ */ jsxs(Button, { size: "xxs", onClick: onSelectAll, variant: "
|
|
3765
|
+
selectAllOption && /* @__PURE__ */ jsx("div", { children: rowsSelected !== totalData ? /* @__PURE__ */ jsx("div", { className: "md:border-l border-gray-300 pl-4", children: /* @__PURE__ */ jsxs(Button, { size: "xxs", onClick: onSelectAll, variant: "secondary", children: [
|
|
3561
3766
|
"Selecionar todos os ",
|
|
3562
3767
|
totalData
|
|
3563
|
-
] }) }) : /* @__PURE__ */ jsx("div", { className: "md:border-l border-gray-300 pl-4", children: /* @__PURE__ */ jsx(Button, { size: "xxs", onClick: onRemoveAll, variant: "
|
|
3768
|
+
] }) }) : /* @__PURE__ */ jsx("div", { className: "md:border-l border-gray-300 pl-4", children: /* @__PURE__ */ jsx(Button, { size: "xxs", onClick: onRemoveAll, variant: "secondary", children: "Desmarcar todos" }) }) })
|
|
3564
3769
|
] }),
|
|
3565
3770
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col md:flex-row items-center md:justify-end justify-center gap-2 flex-1", children: [
|
|
3566
3771
|
/* @__PURE__ */ jsxs("span", { className: "text-p-md text-paragraph mr-1", children: [
|
|
@@ -3958,7 +4163,7 @@ function DataTable({
|
|
|
3958
4163
|
/* @__PURE__ */ jsxs(
|
|
3959
4164
|
"div",
|
|
3960
4165
|
{
|
|
3961
|
-
className:
|
|
4166
|
+
className: clsx9("w-full flex mt-4 flex-col justify-between", {
|
|
3962
4167
|
"flex-1": !hideTableData,
|
|
3963
4168
|
[tableClass]: tableClass
|
|
3964
4169
|
}),
|
|
@@ -3966,7 +4171,7 @@ function DataTable({
|
|
|
3966
4171
|
/* @__PURE__ */ jsxs(
|
|
3967
4172
|
Table,
|
|
3968
4173
|
{
|
|
3969
|
-
className:
|
|
4174
|
+
className: clsx9(
|
|
3970
4175
|
"w-full table_container z-20 overflow-x-scroll md:overflow-x-hidden"
|
|
3971
4176
|
),
|
|
3972
4177
|
onScroll,
|
|
@@ -3993,7 +4198,7 @@ function DataTable({
|
|
|
3993
4198
|
width: header.getSize()
|
|
3994
4199
|
},
|
|
3995
4200
|
scope: "col",
|
|
3996
|
-
className:
|
|
4201
|
+
className: clsx9(
|
|
3997
4202
|
{
|
|
3998
4203
|
"hover:bg-neutral-100 th-shadow cursor-pointer": header.column.getCanSort(),
|
|
3999
4204
|
["with-shadow"]: (arrRowSelected == null ? void 0 : arrRowSelected.length) == 0 && withShadow
|
|
@@ -4009,7 +4214,7 @@ function DataTable({
|
|
|
4009
4214
|
((_a2 = sorting[0]) == null ? void 0 : _a2.id) == header.column.id ? /* @__PURE__ */ jsx(
|
|
4010
4215
|
"i",
|
|
4011
4216
|
{
|
|
4012
|
-
className:
|
|
4217
|
+
className: clsx9(
|
|
4013
4218
|
{
|
|
4014
4219
|
["rotate-0"]: !((_b2 = sorting[0]) == null ? void 0 : _b2.desc),
|
|
4015
4220
|
["rotate-180"]: (_c2 = sorting[0]) == null ? void 0 : _c2.desc
|
|
@@ -4024,7 +4229,7 @@ function DataTable({
|
|
|
4024
4229
|
);
|
|
4025
4230
|
}) }, headerGroup.id + headerIndex + "header")) }),
|
|
4026
4231
|
/* @__PURE__ */ jsx(TableBody, { children: (_f = (_e = table == null ? void 0 : table.getRowModel()) == null ? void 0 : _e.rows) == null ? void 0 : _f.map((row, rowIndex) => {
|
|
4027
|
-
return /* @__PURE__ */ jsx(
|
|
4232
|
+
return /* @__PURE__ */ jsx(React4__default.Fragment, { children: !row.original._destroy && /* @__PURE__ */ jsxs(React4__default.Fragment, { children: [
|
|
4028
4233
|
/* @__PURE__ */ jsx(
|
|
4029
4234
|
TableRow,
|
|
4030
4235
|
{
|
|
@@ -4042,7 +4247,7 @@ function DataTable({
|
|
|
4042
4247
|
backgroundColor: backgroundColor ? backgroundColor : "",
|
|
4043
4248
|
...stylesRow(row)
|
|
4044
4249
|
},
|
|
4045
|
-
className:
|
|
4250
|
+
className: clsx9(
|
|
4046
4251
|
{
|
|
4047
4252
|
["hidden"]: cell.row.original._destroy,
|
|
4048
4253
|
["first:border-l last:border-r"]: borderFull,
|
|
@@ -4078,6 +4283,6 @@ function DataTable({
|
|
|
4078
4283
|
] });
|
|
4079
4284
|
}
|
|
4080
4285
|
|
|
4081
|
-
export { Badge, Button, Calendar, Checkbox, DataTable, DataTablePagination, DatePickerInput, FilterCalendar, FilterOptions, Input, InputMoney, InputNumber, InputPercentage, Logo, MaskedInput, ModalDialog, PaginationSelect, Popover3 as Popover, Radio, RocketIcon, SelectField, SelectFieldBip, SpinnerIcon, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Toggle, ValueContainer };
|
|
4286
|
+
export { Badge, Button, ButtonLink, Calendar, Checkbox, DataTable, DataTablePagination, DatePickerInput, FilterCalendar, FilterOptions, Input, InputMoney, InputNumber, InputPercentage, Logo, MaskedInput, ModalDialog, PaginationSelect, Popover3 as Popover, Radio, RocketIcon, SelectField, SelectFieldBip, SpinnerIcon, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Toggle, ValueContainer, sizes2 as sizes };
|
|
4082
4287
|
//# sourceMappingURL=index.js.map
|
|
4083
4288
|
//# sourceMappingURL=index.js.map
|