nexaas-ui-components 1.0.85 → 1.0.88
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 +53 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +57 -51
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9,11 +9,11 @@ var zustand = require('zustand');
|
|
|
9
9
|
var dateFns = require('date-fns');
|
|
10
10
|
var react = require('@headlessui/react');
|
|
11
11
|
var react$1 = require('@headlessui-float/react');
|
|
12
|
+
var reactTooltip = require('react-tooltip');
|
|
12
13
|
var IntlCurrencyInputRaw = require('react-intl-currency-input');
|
|
13
14
|
var lodashNamespace = require('lodash');
|
|
14
15
|
var InputMask = require('react-input-mask');
|
|
15
16
|
var Modal = require('react-modal');
|
|
16
|
-
var reactTooltip = require('react-tooltip');
|
|
17
17
|
var Select = require('react-select');
|
|
18
18
|
var AsyncSelect = require('react-select/async');
|
|
19
19
|
var reactTable = require('@tanstack/react-table');
|
|
@@ -163,8 +163,11 @@ var variants = {
|
|
|
163
163
|
successOutline: {
|
|
164
164
|
text: "active:shadow-none text-success-500 font-bold bg-surface border-[0.5px] border-success-500 hover:bg-success-100 active:bg-success-500 active:text-white active:border-transparent disabled:opacity-50 disabled:bg-surface disabled:text-success-500"
|
|
165
165
|
},
|
|
166
|
+
// Node 412:5067 — faltava o véu branco no default (ficava warning-500 chapado, enquanto
|
|
167
|
+
// danger/success já tinham o gradiente). Mesmo padrão dos dois: ::before com
|
|
168
|
+
// mix-blend-plus-lighter, zerado no hover (que troca pro gradiente opaco) e no active.
|
|
166
169
|
warn: {
|
|
167
|
-
text: "shadow-[0_1px_1.5px_0_rgba(242,153,20,0.2)] text-white bg-warning-500 hover:bg-gradient-to-b hover:from-warning-start hover:to-warning-end hover:shadow-[0_2px_3px_0_rgba(56,61,77,0.12)] active:bg-warning-600 active:shadow-none disabled:opacity-50 disabled:shadow-none"
|
|
170
|
+
text: "relative isolate shadow-[0_1px_1.5px_0_rgba(242,153,20,0.2)] text-white bg-warning-500 before:content-[''] before:absolute before:inset-0 before:-z-10 before:rounded-lg before:pointer-events-none before:mix-blend-plus-lighter before:bg-gradient-to-b before:from-[rgba(255,255,255,0.15)] before:to-[rgba(255,255,255,0)] hover:bg-gradient-to-b hover:from-warning-start hover:to-warning-end hover:shadow-[0_2px_3px_0_rgba(56,61,77,0.12)] hover:before:opacity-0 active:bg-warning-600 active:shadow-none active:before:opacity-0 disabled:opacity-50 disabled:shadow-none"
|
|
168
171
|
},
|
|
169
172
|
blue: {
|
|
170
173
|
text: "shadow-button bg-blue-500 text-accent-label hover:bg-blue-600 active:bg-blue-600 text-bold"
|
|
@@ -815,20 +818,8 @@ var DatePickerInput = React5.forwardRef(
|
|
|
815
818
|
var _a;
|
|
816
819
|
const [invalidDate, setInvalidDate] = React5.useState(false);
|
|
817
820
|
const [showCalendar, setShowCalendar] = React5.useState(false);
|
|
818
|
-
const [inputWidth, setInputWidth] = React5.useState(0);
|
|
819
821
|
const inputContainerRef = React5.useRef(null);
|
|
820
822
|
const dateFnsFormat = "dd/MM/yyyy";
|
|
821
|
-
React5.useEffect(() => {
|
|
822
|
-
const updateWidth = () => {
|
|
823
|
-
if (inputContainerRef.current) {
|
|
824
|
-
setInputWidth(inputContainerRef.current.offsetWidth + 10);
|
|
825
|
-
}
|
|
826
|
-
};
|
|
827
|
-
updateWidth();
|
|
828
|
-
window.addEventListener("resize", updateWidth);
|
|
829
|
-
return () => window.removeEventListener("resize", updateWidth);
|
|
830
|
-
}, []);
|
|
831
|
-
const finalOffset = popoverOffset || [inputWidth || 250, -46];
|
|
832
823
|
const fieldValidation = useFieldErrorsStore((state) => state.field);
|
|
833
824
|
const fieldValidationMessages = [
|
|
834
825
|
(_a = fieldValidation[name ? name : registration == null ? void 0 : registration.name]) == null ? void 0 : _a.message,
|
|
@@ -874,10 +865,6 @@ var DatePickerInput = React5.forwardRef(
|
|
|
874
865
|
ref.current = node;
|
|
875
866
|
}
|
|
876
867
|
},
|
|
877
|
-
style: {
|
|
878
|
-
["--popover-offset-x"]: `${finalOffset[0]}px`,
|
|
879
|
-
["--popover-offset-y"]: `${ -100}px`
|
|
880
|
-
},
|
|
881
868
|
children: [
|
|
882
869
|
icon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
883
870
|
"div",
|
|
@@ -902,10 +889,21 @@ var DatePickerInput = React5.forwardRef(
|
|
|
902
889
|
style: { height: "46px" }
|
|
903
890
|
},
|
|
904
891
|
popoverProps: {
|
|
905
|
-
placement: "bottom",
|
|
906
|
-
usePortal
|
|
892
|
+
placement: "bottom-start",
|
|
893
|
+
// usePortal false renderizava o calendario dentro do proprio input, entao
|
|
894
|
+
// qualquer ancestral com overflow auto/hidden (modal com scroll, painel
|
|
895
|
+
// lateral) o cortava e ele ficava inutilizavel. Com portal ele vai pro body e
|
|
896
|
+
// o Popper reposiciona sozinho quando nao ha espaco abaixo.
|
|
897
|
+
usePortal: true,
|
|
907
898
|
minimal: true,
|
|
908
|
-
popoverClassName: "date-picker-popover"
|
|
899
|
+
popoverClassName: "date-picker-popover",
|
|
900
|
+
// Sem boundary o flip ignora o viewport quando o input esta dentro de um
|
|
901
|
+
// container com scroll.
|
|
902
|
+
modifiers: {
|
|
903
|
+
preventOverflow: { enabled: true, options: { padding: 8 } },
|
|
904
|
+
flip: { enabled: true },
|
|
905
|
+
...popoverOffset ? { offset: { enabled: true, options: { offset: popoverOffset } } } : {}
|
|
906
|
+
}
|
|
909
907
|
},
|
|
910
908
|
disabled,
|
|
911
909
|
onChange: (e, isUserChange) => {
|
|
@@ -1304,6 +1302,26 @@ var Checkbox = ({
|
|
|
1304
1302
|
}
|
|
1305
1303
|
) })
|
|
1306
1304
|
] }) });
|
|
1305
|
+
var Popover = ({
|
|
1306
|
+
id,
|
|
1307
|
+
displayArrow = true,
|
|
1308
|
+
openOnClick = false
|
|
1309
|
+
}) => {
|
|
1310
|
+
const style = {
|
|
1311
|
+
noArrow: "hidden"
|
|
1312
|
+
};
|
|
1313
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1314
|
+
reactTooltip.Tooltip,
|
|
1315
|
+
{
|
|
1316
|
+
id,
|
|
1317
|
+
className: "absolute bg-neutral-700 text-p-md text-neutral-0 rounded-lg shadow-dropdown py-[6px] px-3 max-w-[430px] break-words whitespace-normal",
|
|
1318
|
+
classNameArrow: !displayArrow ? style.noArrow : "",
|
|
1319
|
+
openOnClick,
|
|
1320
|
+
delayHide: 0,
|
|
1321
|
+
delayShow: 0
|
|
1322
|
+
}
|
|
1323
|
+
) });
|
|
1324
|
+
};
|
|
1307
1325
|
var FilterCalendar = ({
|
|
1308
1326
|
icon,
|
|
1309
1327
|
label,
|
|
@@ -1598,6 +1616,9 @@ var FilterCalendar = ({
|
|
|
1598
1616
|
{
|
|
1599
1617
|
type: "button",
|
|
1600
1618
|
"aria-label": "Limpar",
|
|
1619
|
+
"data-tooltip-id": `filter-calendar-clear-${name}`,
|
|
1620
|
+
"data-tooltip-content": "Limpar",
|
|
1621
|
+
"data-tooltip-place": "top",
|
|
1601
1622
|
onClick: (e) => {
|
|
1602
1623
|
e.stopPropagation();
|
|
1603
1624
|
e.preventDefault();
|
|
@@ -1610,7 +1631,8 @@ var FilterCalendar = ({
|
|
|
1610
1631
|
),
|
|
1611
1632
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-full w-7 items-center justify-center rounded-[6px] text-white", children: /* @__PURE__ */ jsxRuntime.jsx("i", { className: "uil uil-times text-[18px]" }) })
|
|
1612
1633
|
}
|
|
1613
|
-
)
|
|
1634
|
+
),
|
|
1635
|
+
hasValue && clearButton && /* @__PURE__ */ jsxRuntime.jsx(Popover, { id: `filter-calendar-clear-${name}` })
|
|
1614
1636
|
] }) }),
|
|
1615
1637
|
open && /* @__PURE__ */ jsxRuntime.jsx(react$1.Float.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(react.PopoverPanel, { className: "p-3 whitespace-nowrap bg-surface rounded-lg shadow-dropdown border-[0.5px] border-neutral-200", children: ({ close }) => {
|
|
1616
1638
|
const onClose = () => {
|
|
@@ -2322,6 +2344,9 @@ var FilterSelect = ({
|
|
|
2322
2344
|
{
|
|
2323
2345
|
type: "button",
|
|
2324
2346
|
"aria-label": clearLabel,
|
|
2347
|
+
"data-tooltip-id": `filter-select-clear-${name}`,
|
|
2348
|
+
"data-tooltip-content": clearLabel,
|
|
2349
|
+
"data-tooltip-place": "top",
|
|
2325
2350
|
onClick: (e) => {
|
|
2326
2351
|
e.stopPropagation();
|
|
2327
2352
|
e.preventDefault();
|
|
@@ -2337,7 +2362,8 @@ var FilterSelect = ({
|
|
|
2337
2362
|
),
|
|
2338
2363
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-full w-7 items-center justify-center rounded-[6px] text-white", children: /* @__PURE__ */ jsxRuntime.jsx("i", { className: "uil uil-times text-[18px]" }) })
|
|
2339
2364
|
}
|
|
2340
|
-
)
|
|
2365
|
+
),
|
|
2366
|
+
hasValue && clearButton && /* @__PURE__ */ jsxRuntime.jsx(Popover, { id: `filter-select-clear-${name}` })
|
|
2341
2367
|
] }) }),
|
|
2342
2368
|
open && /* @__PURE__ */ jsxRuntime.jsx(react$1.Float.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2343
2369
|
react.PopoverPanel,
|
|
@@ -3197,26 +3223,6 @@ var ModalDialog = ({
|
|
|
3197
3223
|
)
|
|
3198
3224
|
] });
|
|
3199
3225
|
};
|
|
3200
|
-
var Popover4 = ({
|
|
3201
|
-
id,
|
|
3202
|
-
displayArrow = true,
|
|
3203
|
-
openOnClick = false
|
|
3204
|
-
}) => {
|
|
3205
|
-
const style = {
|
|
3206
|
-
noArrow: "hidden"
|
|
3207
|
-
};
|
|
3208
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3209
|
-
reactTooltip.Tooltip,
|
|
3210
|
-
{
|
|
3211
|
-
id,
|
|
3212
|
-
className: "absolute bg-neutral-700 text-p-md text-neutral-0 rounded-lg shadow-dropdown py-[6px] px-3 max-w-[430px] break-words whitespace-normal",
|
|
3213
|
-
classNameArrow: !displayArrow ? style.noArrow : "",
|
|
3214
|
-
openOnClick,
|
|
3215
|
-
delayHide: 0,
|
|
3216
|
-
delayShow: 0
|
|
3217
|
-
}
|
|
3218
|
-
) });
|
|
3219
|
-
};
|
|
3220
3226
|
|
|
3221
3227
|
// src/components/Select/Select.styles.ts
|
|
3222
3228
|
var customStyles = {
|
|
@@ -5112,7 +5118,7 @@ function CopyPopover({ children, valueToCopy }) {
|
|
|
5112
5118
|
"data-tooltip-content": copied ? "Copiado" : "Copiar",
|
|
5113
5119
|
"data-tooltip-place": "top",
|
|
5114
5120
|
children: [
|
|
5115
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5121
|
+
/* @__PURE__ */ jsxRuntime.jsx(Popover, { id: "copy-id" }),
|
|
5116
5122
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-neutral-400 text-xs", children })
|
|
5117
5123
|
]
|
|
5118
5124
|
}
|
|
@@ -5124,7 +5130,7 @@ function CopyPopover({ children, valueToCopy }) {
|
|
|
5124
5130
|
"data-tooltip-content": copied ? "Copiado" : "Copiar",
|
|
5125
5131
|
"data-tooltip-place": "top",
|
|
5126
5132
|
children: [
|
|
5127
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5133
|
+
/* @__PURE__ */ jsxRuntime.jsx(Popover, { id: "icon-id" }),
|
|
5128
5134
|
/* @__PURE__ */ jsxRuntime.jsx("i", { className: "uil uil-copy text-base text-blue-500 cursor-pointer -mt-[1px]" })
|
|
5129
5135
|
]
|
|
5130
5136
|
}
|
|
@@ -6084,7 +6090,7 @@ function InfoIcon({
|
|
|
6084
6090
|
"data-tooltip-html": content,
|
|
6085
6091
|
"data-tooltip-place": "top",
|
|
6086
6092
|
children: [
|
|
6087
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6093
|
+
/* @__PURE__ */ jsxRuntime.jsx(Popover, { id }),
|
|
6088
6094
|
/* @__PURE__ */ jsxRuntime.jsx("i", { className: "uil uil-info-circle text-p-lg text-neutral-400" })
|
|
6089
6095
|
]
|
|
6090
6096
|
}
|
|
@@ -7606,7 +7612,7 @@ exports.MultiSelectBottom = MultiSelectBottom;
|
|
|
7606
7612
|
exports.PageBox = PageBox;
|
|
7607
7613
|
exports.PageHeader = PageHeader;
|
|
7608
7614
|
exports.PaginationSelect = PaginationSelect;
|
|
7609
|
-
exports.Popover =
|
|
7615
|
+
exports.Popover = Popover;
|
|
7610
7616
|
exports.ProgressBar = ProgressBar;
|
|
7611
7617
|
exports.Radio = Radio;
|
|
7612
7618
|
exports.RocketIcon = RocketIcon;
|