nexaas-ui-components 1.0.84 → 1.0.86
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 +48 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +52 -35
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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"
|
|
@@ -573,7 +576,9 @@ var Input = ({
|
|
|
573
576
|
const hasError = fieldValidationMessages.some((item) => item !== void 0);
|
|
574
577
|
const [showPassword, setShowPassword] = React5__namespace.default.useState(false);
|
|
575
578
|
const styles = {
|
|
576
|
-
|
|
579
|
+
// Sem `focus-visible:rounded-*`: o anel de foco tem que seguir o mesmo raio do campo
|
|
580
|
+
// (`rounded-lg`) — reduzir pra 2px no foco deixava o anel quadrado sobre um campo arredondado.
|
|
581
|
+
input: `text-p-md pl-2 peer text-paragraph bg-surface shadow-input border-[0.5px] rounded-lg outline-none block pb-[10px] h-[46px] w-full disabled:bg-[var(--input-bg-disabled)] disabled:border-[var(--input-border-disabled)] disabled:text-disabled disabled:cursor-not-allowed disabled:shadow-none focus-visible:ring-[1.5px] focus-visible:ring-blue-500 focus-visible:ring-offset-[2px] ${label ? "pt-[22px]" : "pt-[10px]"}
|
|
577
582
|
${!hasError ? "border-stroke" : ""}`,
|
|
578
583
|
icon: `absolute bg-neutral-100 h-[44px] top-[1px] left-[1.5px] w-[38px] rounded-l-lg text-[20px] ${hasError ? "text-dangerous-500" : "text-label peer-focus:text-blue-500"} peer-focus:border-blue-500`,
|
|
579
584
|
rightIcon: "absolute h-[44px] top-[1px] right-[1.5px] w-[38px] text-[22px]",
|
|
@@ -1302,6 +1307,26 @@ var Checkbox = ({
|
|
|
1302
1307
|
}
|
|
1303
1308
|
) })
|
|
1304
1309
|
] }) });
|
|
1310
|
+
var Popover = ({
|
|
1311
|
+
id,
|
|
1312
|
+
displayArrow = true,
|
|
1313
|
+
openOnClick = false
|
|
1314
|
+
}) => {
|
|
1315
|
+
const style = {
|
|
1316
|
+
noArrow: "hidden"
|
|
1317
|
+
};
|
|
1318
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1319
|
+
reactTooltip.Tooltip,
|
|
1320
|
+
{
|
|
1321
|
+
id,
|
|
1322
|
+
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",
|
|
1323
|
+
classNameArrow: !displayArrow ? style.noArrow : "",
|
|
1324
|
+
openOnClick,
|
|
1325
|
+
delayHide: 0,
|
|
1326
|
+
delayShow: 0
|
|
1327
|
+
}
|
|
1328
|
+
) });
|
|
1329
|
+
};
|
|
1305
1330
|
var FilterCalendar = ({
|
|
1306
1331
|
icon,
|
|
1307
1332
|
label,
|
|
@@ -1596,6 +1621,9 @@ var FilterCalendar = ({
|
|
|
1596
1621
|
{
|
|
1597
1622
|
type: "button",
|
|
1598
1623
|
"aria-label": "Limpar",
|
|
1624
|
+
"data-tooltip-id": `filter-calendar-clear-${name}`,
|
|
1625
|
+
"data-tooltip-content": "Limpar",
|
|
1626
|
+
"data-tooltip-place": "top",
|
|
1599
1627
|
onClick: (e) => {
|
|
1600
1628
|
e.stopPropagation();
|
|
1601
1629
|
e.preventDefault();
|
|
@@ -1608,7 +1636,8 @@ var FilterCalendar = ({
|
|
|
1608
1636
|
),
|
|
1609
1637
|
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]" }) })
|
|
1610
1638
|
}
|
|
1611
|
-
)
|
|
1639
|
+
),
|
|
1640
|
+
hasValue && clearButton && /* @__PURE__ */ jsxRuntime.jsx(Popover, { id: `filter-calendar-clear-${name}` })
|
|
1612
1641
|
] }) }),
|
|
1613
1642
|
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 }) => {
|
|
1614
1643
|
const onClose = () => {
|
|
@@ -2320,6 +2349,9 @@ var FilterSelect = ({
|
|
|
2320
2349
|
{
|
|
2321
2350
|
type: "button",
|
|
2322
2351
|
"aria-label": clearLabel,
|
|
2352
|
+
"data-tooltip-id": `filter-select-clear-${name}`,
|
|
2353
|
+
"data-tooltip-content": clearLabel,
|
|
2354
|
+
"data-tooltip-place": "top",
|
|
2323
2355
|
onClick: (e) => {
|
|
2324
2356
|
e.stopPropagation();
|
|
2325
2357
|
e.preventDefault();
|
|
@@ -2335,7 +2367,8 @@ var FilterSelect = ({
|
|
|
2335
2367
|
),
|
|
2336
2368
|
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]" }) })
|
|
2337
2369
|
}
|
|
2338
|
-
)
|
|
2370
|
+
),
|
|
2371
|
+
hasValue && clearButton && /* @__PURE__ */ jsxRuntime.jsx(Popover, { id: `filter-select-clear-${name}` })
|
|
2339
2372
|
] }) }),
|
|
2340
2373
|
open && /* @__PURE__ */ jsxRuntime.jsx(react$1.Float.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2341
2374
|
react.PopoverPanel,
|
|
@@ -3195,26 +3228,6 @@ var ModalDialog = ({
|
|
|
3195
3228
|
)
|
|
3196
3229
|
] });
|
|
3197
3230
|
};
|
|
3198
|
-
var Popover4 = ({
|
|
3199
|
-
id,
|
|
3200
|
-
displayArrow = true,
|
|
3201
|
-
openOnClick = false
|
|
3202
|
-
}) => {
|
|
3203
|
-
const style = {
|
|
3204
|
-
noArrow: "hidden"
|
|
3205
|
-
};
|
|
3206
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3207
|
-
reactTooltip.Tooltip,
|
|
3208
|
-
{
|
|
3209
|
-
id,
|
|
3210
|
-
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",
|
|
3211
|
-
classNameArrow: !displayArrow ? style.noArrow : "",
|
|
3212
|
-
openOnClick,
|
|
3213
|
-
delayHide: 0,
|
|
3214
|
-
delayShow: 0
|
|
3215
|
-
}
|
|
3216
|
-
) });
|
|
3217
|
-
};
|
|
3218
3231
|
|
|
3219
3232
|
// src/components/Select/Select.styles.ts
|
|
3220
3233
|
var customStyles = {
|
|
@@ -3281,7 +3294,9 @@ var customStyles = {
|
|
|
3281
3294
|
border,
|
|
3282
3295
|
boxShadow: state.isDisabled ? "none" : state.isFocused ? "0 0 0 2px var(--surface), 0 0 0 3.5px var(--blue-500)" : "0px 1px 1.5px 0px rgba(56,61,77,0.12)",
|
|
3283
3296
|
outline: "none",
|
|
3284
|
-
|
|
3297
|
+
// Raio fixo: o anel de foco é desenhado por box-shadow, que segue o borderRadius do
|
|
3298
|
+
// control — trocar pra 2px no foco deixava o anel quadrado sobre um campo arredondado.
|
|
3299
|
+
borderRadius: "0.5rem",
|
|
3285
3300
|
placeholder: " ",
|
|
3286
3301
|
height: state.selectProps.smallField ? "30px" : "46px",
|
|
3287
3302
|
backgroundColor: state.isDisabled ? "var(--light-100)" : "var(--surface)",
|
|
@@ -3702,7 +3717,9 @@ var customStyles2 = {
|
|
|
3702
3717
|
border,
|
|
3703
3718
|
boxShadow: state.isDisabled ? "none" : state.isFocused ? "0 0 0 2px var(--surface), 0 0 0 3.5px var(--blue-500)" : "0px 1px 1.5px 0px rgba(56,61,77,0.12)",
|
|
3704
3719
|
outline: "none",
|
|
3705
|
-
|
|
3720
|
+
// Raio fixo: o anel de foco é desenhado por box-shadow, que segue o borderRadius do
|
|
3721
|
+
// control — trocar pra 2px no foco deixava o anel quadrado sobre um campo arredondado.
|
|
3722
|
+
borderRadius: "0.5rem",
|
|
3706
3723
|
placeholder: " ",
|
|
3707
3724
|
height: "46px",
|
|
3708
3725
|
backgroundColor: state.isDisabled ? "var(--input-bg-disabled)" : "var(--surface)",
|
|
@@ -5106,7 +5123,7 @@ function CopyPopover({ children, valueToCopy }) {
|
|
|
5106
5123
|
"data-tooltip-content": copied ? "Copiado" : "Copiar",
|
|
5107
5124
|
"data-tooltip-place": "top",
|
|
5108
5125
|
children: [
|
|
5109
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5126
|
+
/* @__PURE__ */ jsxRuntime.jsx(Popover, { id: "copy-id" }),
|
|
5110
5127
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-neutral-400 text-xs", children })
|
|
5111
5128
|
]
|
|
5112
5129
|
}
|
|
@@ -5118,7 +5135,7 @@ function CopyPopover({ children, valueToCopy }) {
|
|
|
5118
5135
|
"data-tooltip-content": copied ? "Copiado" : "Copiar",
|
|
5119
5136
|
"data-tooltip-place": "top",
|
|
5120
5137
|
children: [
|
|
5121
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5138
|
+
/* @__PURE__ */ jsxRuntime.jsx(Popover, { id: "icon-id" }),
|
|
5122
5139
|
/* @__PURE__ */ jsxRuntime.jsx("i", { className: "uil uil-copy text-base text-blue-500 cursor-pointer -mt-[1px]" })
|
|
5123
5140
|
]
|
|
5124
5141
|
}
|
|
@@ -6078,7 +6095,7 @@ function InfoIcon({
|
|
|
6078
6095
|
"data-tooltip-html": content,
|
|
6079
6096
|
"data-tooltip-place": "top",
|
|
6080
6097
|
children: [
|
|
6081
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6098
|
+
/* @__PURE__ */ jsxRuntime.jsx(Popover, { id }),
|
|
6082
6099
|
/* @__PURE__ */ jsxRuntime.jsx("i", { className: "uil uil-info-circle text-p-lg text-neutral-400" })
|
|
6083
6100
|
]
|
|
6084
6101
|
}
|
|
@@ -7600,7 +7617,7 @@ exports.MultiSelectBottom = MultiSelectBottom;
|
|
|
7600
7617
|
exports.PageBox = PageBox;
|
|
7601
7618
|
exports.PageHeader = PageHeader;
|
|
7602
7619
|
exports.PaginationSelect = PaginationSelect;
|
|
7603
|
-
exports.Popover =
|
|
7620
|
+
exports.Popover = Popover;
|
|
7604
7621
|
exports.ProgressBar = ProgressBar;
|
|
7605
7622
|
exports.Radio = Radio;
|
|
7606
7623
|
exports.RocketIcon = RocketIcon;
|