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.js CHANGED
@@ -6,13 +6,13 @@ import { DateInput3, DateRangePicker3, DatePicker3 } from '@blueprintjs/datetime
6
6
  import { Controller } from 'react-hook-form';
7
7
  import { create } from 'zustand';
8
8
  import { parse, format, set, sub, startOfWeek, endOfWeek, startOfMonth, endOfMonth, subYears } from 'date-fns';
9
- import { Switch, Popover, PopoverButton, PopoverPanel, Listbox, ListboxOptions, Combobox, Transition, Menu as Menu$1, MenuButton, MenuItems, MenuItem, TabGroup, TabList, Tab, TabPanels, TabPanel, ListboxOption, Dialog } from '@headlessui/react';
9
+ import { Switch, Popover as Popover$1, PopoverButton, PopoverPanel, Listbox, ListboxOptions, Combobox, Transition, Menu as Menu$1, MenuButton, MenuItems, MenuItem, TabGroup, TabList, Tab, TabPanels, TabPanel, ListboxOption, Dialog } from '@headlessui/react';
10
10
  import { Float } from '@headlessui-float/react';
11
+ import { Tooltip } from 'react-tooltip';
11
12
  import IntlCurrencyInputRaw from 'react-intl-currency-input';
12
13
  import * as lodashNamespace from 'lodash';
13
14
  import InputMask from 'react-input-mask';
14
15
  import Modal from 'react-modal';
15
- import { Tooltip } from 'react-tooltip';
16
16
  import Select, { components } from 'react-select';
17
17
  import AsyncSelect from 'react-select/async';
18
18
  import { useReactTable, getExpandedRowModel, getFacetedUniqueValues, getFacetedRowModel, getFilteredRowModel, getCoreRowModel, flexRender } from '@tanstack/react-table';
@@ -131,8 +131,11 @@ var variants = {
131
131
  successOutline: {
132
132
  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"
133
133
  },
134
+ // Node 412:5067 — faltava o véu branco no default (ficava warning-500 chapado, enquanto
135
+ // danger/success já tinham o gradiente). Mesmo padrão dos dois: ::before com
136
+ // mix-blend-plus-lighter, zerado no hover (que troca pro gradiente opaco) e no active.
134
137
  warn: {
135
- 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"
138
+ 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"
136
139
  },
137
140
  blue: {
138
141
  text: "shadow-button bg-blue-500 text-accent-label hover:bg-blue-600 active:bg-blue-600 text-bold"
@@ -541,7 +544,9 @@ var Input = ({
541
544
  const hasError = fieldValidationMessages.some((item) => item !== void 0);
542
545
  const [showPassword, setShowPassword] = React5__default.useState(false);
543
546
  const styles = {
544
- 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] focus-visible:rounded-[2px] ${label ? "pt-[22px]" : "pt-[10px]"}
547
+ // Sem `focus-visible:rounded-*`: o anel de foco tem que seguir o mesmo raio do campo
548
+ // (`rounded-lg`) — reduzir pra 2px no foco deixava o anel quadrado sobre um campo arredondado.
549
+ 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]"}
545
550
  ${!hasError ? "border-stroke" : ""}`,
546
551
  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`,
547
552
  rightIcon: "absolute h-[44px] top-[1px] right-[1.5px] w-[38px] text-[22px]",
@@ -1270,6 +1275,26 @@ var Checkbox = ({
1270
1275
  }
1271
1276
  ) })
1272
1277
  ] }) });
1278
+ var Popover = ({
1279
+ id,
1280
+ displayArrow = true,
1281
+ openOnClick = false
1282
+ }) => {
1283
+ const style = {
1284
+ noArrow: "hidden"
1285
+ };
1286
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
1287
+ Tooltip,
1288
+ {
1289
+ id,
1290
+ 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",
1291
+ classNameArrow: !displayArrow ? style.noArrow : "",
1292
+ openOnClick,
1293
+ delayHide: 0,
1294
+ delayShow: 0
1295
+ }
1296
+ ) });
1297
+ };
1273
1298
  var FilterCalendar = ({
1274
1299
  icon,
1275
1300
  label,
@@ -1526,7 +1551,7 @@ var FilterCalendar = ({
1526
1551
  };
1527
1552
  const chipLabel = calendarLabel ? calendarLabel : ((_b = field == null ? void 0 : field.value) == null ? void 0 : _b.length) > 0 ? (_c = field == null ? void 0 : field.value) == null ? void 0 : _c.map((item) => item !== null ? format(item, "dd/MM/yyyy") : "").join(" - ") : label;
1528
1553
  return /* @__PURE__ */ jsx(
1529
- Popover,
1554
+ Popover$1,
1530
1555
  {
1531
1556
  className: clsx9(
1532
1557
  { ["w-full"]: isMobileSize },
@@ -1564,6 +1589,9 @@ var FilterCalendar = ({
1564
1589
  {
1565
1590
  type: "button",
1566
1591
  "aria-label": "Limpar",
1592
+ "data-tooltip-id": `filter-calendar-clear-${name}`,
1593
+ "data-tooltip-content": "Limpar",
1594
+ "data-tooltip-place": "top",
1567
1595
  onClick: (e) => {
1568
1596
  e.stopPropagation();
1569
1597
  e.preventDefault();
@@ -1576,7 +1604,8 @@ var FilterCalendar = ({
1576
1604
  ),
1577
1605
  children: /* @__PURE__ */ jsx("span", { className: "flex h-full w-7 items-center justify-center rounded-[6px] text-white", children: /* @__PURE__ */ jsx("i", { className: "uil uil-times text-[18px]" }) })
1578
1606
  }
1579
- )
1607
+ ),
1608
+ hasValue && clearButton && /* @__PURE__ */ jsx(Popover, { id: `filter-calendar-clear-${name}` })
1580
1609
  ] }) }),
1581
1610
  open && /* @__PURE__ */ jsx(Float.Content, { children: /* @__PURE__ */ jsx(PopoverPanel, { className: "p-3 whitespace-nowrap bg-surface rounded-lg shadow-dropdown border-[0.5px] border-neutral-200", children: ({ close }) => {
1582
1611
  const onClose = () => {
@@ -1858,7 +1887,7 @@ var FilterOptions = ({
1858
1887
  var _a, _b;
1859
1888
  let hasValue = isMulti ? ((_a = field == null ? void 0 : field.value) == null ? void 0 : _a.length) > 0 : !!((_b = field == null ? void 0 : field.value) == null ? void 0 : _b.id);
1860
1889
  return /* @__PURE__ */ jsx(
1861
- Popover,
1890
+ Popover$1,
1862
1891
  {
1863
1892
  className: clsx9(
1864
1893
  { ["w-full"]: isMobileSize },
@@ -2247,7 +2276,7 @@ var FilterSelect = ({
2247
2276
  var _a, _b;
2248
2277
  let hasValue = isMulti ? ((_a = field == null ? void 0 : field.value) == null ? void 0 : _a.length) > 0 : !!((_b = field == null ? void 0 : field.value) == null ? void 0 : _b.id);
2249
2278
  return /* @__PURE__ */ jsx(
2250
- Popover,
2279
+ Popover$1,
2251
2280
  {
2252
2281
  className: clsx9(
2253
2282
  { ["w-full"]: isMobileSize },
@@ -2288,6 +2317,9 @@ var FilterSelect = ({
2288
2317
  {
2289
2318
  type: "button",
2290
2319
  "aria-label": clearLabel,
2320
+ "data-tooltip-id": `filter-select-clear-${name}`,
2321
+ "data-tooltip-content": clearLabel,
2322
+ "data-tooltip-place": "top",
2291
2323
  onClick: (e) => {
2292
2324
  e.stopPropagation();
2293
2325
  e.preventDefault();
@@ -2303,7 +2335,8 @@ var FilterSelect = ({
2303
2335
  ),
2304
2336
  children: /* @__PURE__ */ jsx("span", { className: "flex h-full w-7 items-center justify-center rounded-[6px] text-white", children: /* @__PURE__ */ jsx("i", { className: "uil uil-times text-[18px]" }) })
2305
2337
  }
2306
- )
2338
+ ),
2339
+ hasValue && clearButton && /* @__PURE__ */ jsx(Popover, { id: `filter-select-clear-${name}` })
2307
2340
  ] }) }),
2308
2341
  open && /* @__PURE__ */ jsx(Float.Content, { children: /* @__PURE__ */ jsx(
2309
2342
  PopoverPanel,
@@ -3163,26 +3196,6 @@ var ModalDialog = ({
3163
3196
  )
3164
3197
  ] });
3165
3198
  };
3166
- var Popover4 = ({
3167
- id,
3168
- displayArrow = true,
3169
- openOnClick = false
3170
- }) => {
3171
- const style = {
3172
- noArrow: "hidden"
3173
- };
3174
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
3175
- Tooltip,
3176
- {
3177
- id,
3178
- 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",
3179
- classNameArrow: !displayArrow ? style.noArrow : "",
3180
- openOnClick,
3181
- delayHide: 0,
3182
- delayShow: 0
3183
- }
3184
- ) });
3185
- };
3186
3199
 
3187
3200
  // src/components/Select/Select.styles.ts
3188
3201
  var customStyles = {
@@ -3249,7 +3262,9 @@ var customStyles = {
3249
3262
  border,
3250
3263
  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)",
3251
3264
  outline: "none",
3252
- borderRadius: state.isFocused ? "2px" : "0.5rem",
3265
+ // Raio fixo: o anel de foco é desenhado por box-shadow, que segue o borderRadius do
3266
+ // control — trocar pra 2px no foco deixava o anel quadrado sobre um campo arredondado.
3267
+ borderRadius: "0.5rem",
3253
3268
  placeholder: " ",
3254
3269
  height: state.selectProps.smallField ? "30px" : "46px",
3255
3270
  backgroundColor: state.isDisabled ? "var(--light-100)" : "var(--surface)",
@@ -3670,7 +3685,9 @@ var customStyles2 = {
3670
3685
  border,
3671
3686
  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)",
3672
3687
  outline: "none",
3673
- borderRadius: state.isFocused ? "2px" : "0.5rem",
3688
+ // Raio fixo: o anel de foco é desenhado por box-shadow, que segue o borderRadius do
3689
+ // control — trocar pra 2px no foco deixava o anel quadrado sobre um campo arredondado.
3690
+ borderRadius: "0.5rem",
3674
3691
  placeholder: " ",
3675
3692
  height: "46px",
3676
3693
  backgroundColor: state.isDisabled ? "var(--input-bg-disabled)" : "var(--surface)",
@@ -5074,7 +5091,7 @@ function CopyPopover({ children, valueToCopy }) {
5074
5091
  "data-tooltip-content": copied ? "Copiado" : "Copiar",
5075
5092
  "data-tooltip-place": "top",
5076
5093
  children: [
5077
- /* @__PURE__ */ jsx(Popover4, { id: "copy-id" }),
5094
+ /* @__PURE__ */ jsx(Popover, { id: "copy-id" }),
5078
5095
  /* @__PURE__ */ jsx("div", { className: "text-neutral-400 text-xs", children })
5079
5096
  ]
5080
5097
  }
@@ -5086,7 +5103,7 @@ function CopyPopover({ children, valueToCopy }) {
5086
5103
  "data-tooltip-content": copied ? "Copiado" : "Copiar",
5087
5104
  "data-tooltip-place": "top",
5088
5105
  children: [
5089
- /* @__PURE__ */ jsx(Popover4, { id: "icon-id" }),
5106
+ /* @__PURE__ */ jsx(Popover, { id: "icon-id" }),
5090
5107
  /* @__PURE__ */ jsx("i", { className: "uil uil-copy text-base text-blue-500 cursor-pointer -mt-[1px]" })
5091
5108
  ]
5092
5109
  }
@@ -6046,7 +6063,7 @@ function InfoIcon({
6046
6063
  "data-tooltip-html": content,
6047
6064
  "data-tooltip-place": "top",
6048
6065
  children: [
6049
- /* @__PURE__ */ jsx(Popover4, { id }),
6066
+ /* @__PURE__ */ jsx(Popover, { id }),
6050
6067
  /* @__PURE__ */ jsx("i", { className: "uil uil-info-circle text-p-lg text-neutral-400" })
6051
6068
  ]
6052
6069
  }
@@ -7534,6 +7551,6 @@ function ControlledInput({
7534
7551
  }
7535
7552
  ControlledInput.displayName = "ControlledInput";
7536
7553
 
7537
- export { Accordion, Badge, Button, ButtonLink, Calendar, Checkbox, ControlledInput, CopyPopover, DataTable, DataTablePagination, DatePickerInput, EditableButton, EditableText, EditableTextSelect, FileUpload, FilterCalendar, FilterOptions, FilterSelect, InfoIcon, Input, InputMoney, InputNumber, InputPercentage, InputTag, Item, Logo, MaskedInput, Menu, ModalDialog, MultiSelect, MultiSelectBottom, PageBox, PageHeader, PaginationSelect, Popover4 as Popover, ProgressBar, Radio, RocketIcon, SelectField, SelectFieldBip, SimpleTab, SkeletonDetails, SkeletonList, SkeletonRegister, SpinnerIcon, StatusBall, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TextArea, Timeline, Toggle, ValueContainer4 as ValueContainer, sizes2 as sizes, translateVariant };
7554
+ export { Accordion, Badge, Button, ButtonLink, Calendar, Checkbox, ControlledInput, CopyPopover, DataTable, DataTablePagination, DatePickerInput, EditableButton, EditableText, EditableTextSelect, FileUpload, FilterCalendar, FilterOptions, FilterSelect, InfoIcon, Input, InputMoney, InputNumber, InputPercentage, InputTag, Item, Logo, MaskedInput, Menu, ModalDialog, MultiSelect, MultiSelectBottom, PageBox, PageHeader, PaginationSelect, Popover, ProgressBar, Radio, RocketIcon, SelectField, SelectFieldBip, SimpleTab, SkeletonDetails, SkeletonList, SkeletonRegister, SpinnerIcon, StatusBall, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TextArea, Timeline, Toggle, ValueContainer4 as ValueContainer, sizes2 as sizes, translateVariant };
7538
7555
  //# sourceMappingURL=index.js.map
7539
7556
  //# sourceMappingURL=index.js.map