@grazziotin/react-components-next 2.2.0 → 3.0.0

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.
@@ -0,0 +1,960 @@
1
+ import { cn, formatItem150, formatItem170, removeNonDigits, removeTextOnly, formatPriceBrl, formatPhoneBr, removeDigits, formatCpfCnpj } from './chunk-DM64WOVD.mjs';
2
+ import { __spreadProps, __spreadValues, __objRest } from './chunk-YOSPWY5K.mjs';
3
+ import { createTheme, styled, Tabs as Tabs$1, Tab as Tab$1, TextField, Box, ThemeProvider, useMediaQuery, Drawer, Grid, InputAdornment, IconButton } from '@mui/material';
4
+ import { Tooltip, ActionIcon, Button } from '@mantine/core';
5
+ import { jsxs, jsx } from 'react/jsx-runtime';
6
+ import DialogMui from '@mui/material/Dialog';
7
+ import DialogTitle from '@mui/material/DialogTitle';
8
+ import DialogActions from '@mui/material/DialogActions';
9
+ import DialogContent from '@mui/material/DialogContent';
10
+ import { ptBR } from '@mui/x-data-grid/locales';
11
+ import { GRID_STRING_COL_DEF, GRID_NUMERIC_COL_DEF, getGridStringOperators, getGridNumericOperators, DataGrid, GridPagination, GridOverlay, GridColumnsPanel, GridFilterPanel, GridColumnMenu } from '@mui/x-data-grid';
12
+ import { memo, useState, useMemo, useCallback } from 'react';
13
+ import { MdVisibilityOff, MdVisibility } from 'react-icons/md';
14
+ import Autocomplete from '@mui/material/Autocomplete';
15
+ import { FaFilter } from 'react-icons/fa';
16
+
17
+ // #style-inject:#style-inject
18
+ function styleInject(css, { insertAt } = {}) {
19
+ if (typeof document === "undefined") return;
20
+ const head = document.head || document.getElementsByTagName("head")[0];
21
+ const style = document.createElement("style");
22
+ style.type = "text/css";
23
+ if (insertAt === "top") {
24
+ if (head.firstChild) {
25
+ head.insertBefore(style, head.firstChild);
26
+ } else {
27
+ head.appendChild(style);
28
+ }
29
+ } else {
30
+ head.appendChild(style);
31
+ }
32
+ if (style.styleSheet) {
33
+ style.styleSheet.cssText = css;
34
+ } else {
35
+ style.appendChild(document.createTextNode(css));
36
+ }
37
+ }
38
+
39
+ // src/styles/tailwind-output.css
40
+ styleInject('/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */\n@layer properties {\n @supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))) {\n *,\n :before,\n :after,\n ::backdrop {\n --tw-space-x-reverse:0;\n --tw-border-style:solid;\n --tw-font-weight:initial;\n --tw-shadow:0 0 #0000;\n --tw-shadow-color:initial;\n --tw-shadow-alpha:100%;\n --tw-inset-shadow:0 0 #0000;\n --tw-inset-shadow-color:initial;\n --tw-inset-shadow-alpha:100%;\n --tw-ring-color:initial;\n --tw-ring-shadow:0 0 #0000;\n --tw-inset-ring-color:initial;\n --tw-inset-ring-shadow:0 0 #0000;\n --tw-ring-inset:initial;\n --tw-ring-offset-width:0px;\n --tw-ring-offset-color:#fff;\n --tw-ring-offset-shadow:0 0 #0000;\n --tw-outline-style:solid;\n --tw-blur:initial;\n --tw-brightness:initial;\n --tw-contrast:initial;\n --tw-grayscale:initial;\n --tw-hue-rotate:initial;\n --tw-invert:initial;\n --tw-opacity:initial;\n --tw-saturate:initial;\n --tw-sepia:initial;\n --tw-drop-shadow:initial;\n --tw-drop-shadow-color:initial;\n --tw-drop-shadow-alpha:100%;\n --tw-drop-shadow-size:initial;\n }\n }\n}\n@layer theme {\n :root,\n :host {\n --font-sans:ui-sans-serif,\n system-ui,\n sans-serif,\n "Apple Color Emoji",\n "Segoe UI Emoji",\n "Segoe UI Symbol",\n "Noto Color Emoji";\n --font-mono:ui-monospace,\n SFMono-Regular,\n Menlo,\n Monaco,\n Consolas,\n "Liberation Mono",\n "Courier New",\n monospace;\n --color-red-600:oklch(57.7% .245 27.325);\n --color-green-50:oklch(98.2% .018 155.826);\n --color-green-100:oklch(96.2% .044 156.743);\n --color-green-400:oklch(79.2% .209 151.711);\n --color-green-500:oklch(72.3% .219 149.579);\n --color-green-800:oklch(44.8% .119 151.328);\n --color-teal-500:oklch(70.4% .14 182.503);\n --color-blue-500:oklch(62.3% .214 259.815);\n --color-gray-50:oklch(98.5% .002 247.839);\n --color-gray-100:oklch(96.7% .003 264.542);\n --color-gray-200:oklch(92.8% .006 264.531);\n --color-gray-500:oklch(55.1% .027 264.364);\n --color-gray-600:oklch(44.6% .03 256.802);\n --color-gray-700:oklch(37.3% .034 259.733);\n --color-gray-900:oklch(21% .034 264.665);\n --color-black:#000;\n --color-white:#fff;\n --spacing:.25rem;\n --container-3xl:48rem;\n --container-5xl:64rem;\n --text-xs:.75rem;\n --text-xs--line-height:calc(1 / .75);\n --text-sm:.875rem;\n --text-sm--line-height:calc(1.25 / .875);\n --text-lg:1.125rem;\n --text-lg--line-height:calc(1.75 / 1.125);\n --text-2xl:1.5rem;\n --text-2xl--line-height:calc(2 / 1.5);\n --font-weight-medium:500;\n --font-weight-semibold:600;\n --font-weight-bold:700;\n --radius-md:.375rem;\n --radius-lg:.5rem;\n --default-transition-duration:.15s;\n --default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);\n --default-font-family:var(--font-sans);\n --default-mono-font-family:var(--font-mono);\n }\n :root {\n --primary-color:#00b2a6;\n --font-poppins:"Poppins", sans-serif;\n --font-family:var(--font-poppins);\n --default-font-family:var(--font-poppins);\n --mui-font-family:var(--font-poppins);\n --mantine-font-family:var(--font-poppins);\n }\n}\n@layer base {\n *,\n :after,\n :before,\n ::backdrop {\n box-sizing: border-box;\n border: 0 solid;\n margin: 0;\n padding: 0;\n }\n ::file-selector-button {\n box-sizing: border-box;\n border: 0 solid;\n margin: 0;\n padding: 0;\n }\n html,\n :host {\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n line-height: 1.5;\n font-family: var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings,normal);\n font-variation-settings: var(--default-font-variation-settings,normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n -webkit-text-decoration: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b,\n strong {\n font-weight: bolder;\n }\n code,\n kbd,\n samp,\n pre {\n font-family: var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings,normal);\n font-variation-settings: var(--default-mono-font-variation-settings,normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub,\n sup {\n vertical-align: baseline;\n font-size: 75%;\n line-height: 0;\n position: relative;\n }\n sub {\n bottom: -.25em;\n }\n sup {\n top: -.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol,\n ul,\n menu {\n list-style: none;\n }\n img,\n svg,\n video,\n canvas,\n audio,\n iframe,\n embed,\n object {\n vertical-align: middle;\n display: block;\n }\n img,\n video {\n max-width: 100%;\n height: auto;\n }\n button,\n input,\n select,\n optgroup,\n textarea {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n opacity: 1;\n background-color: #0000;\n border-radius: 0;\n }\n ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n opacity: 1;\n background-color: #0000;\n border-radius: 0;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px) {\n ::placeholder {\n color: currentColor;\n }\n @supports (color:color-mix(in lab, red, red)) {\n ::placeholder {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit {\n padding-block: 0;\n }\n ::-webkit-datetime-edit-year-field {\n padding-block: 0;\n }\n ::-webkit-datetime-edit-month-field {\n padding-block: 0;\n }\n ::-webkit-datetime-edit-day-field {\n padding-block: 0;\n }\n ::-webkit-datetime-edit-hour-field {\n padding-block: 0;\n }\n ::-webkit-datetime-edit-minute-field {\n padding-block: 0;\n }\n ::-webkit-datetime-edit-second-field {\n padding-block: 0;\n }\n ::-webkit-datetime-edit-millisecond-field {\n padding-block: 0;\n }\n ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n ::-webkit-calendar-picker-indicator {\n line-height: 1;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button,\n input:where([type=button], [type=reset], [type=submit]) {\n appearance: button;\n }\n ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button {\n height: auto;\n }\n ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=until-found])) {\n display: none !important;\n }\n}\n@layer components;\n@layer utilities {\n .container {\n width: 100%;\n }\n @media (min-width: 40rem) {\n .container {\n max-width: 40rem;\n }\n }\n @media (min-width: 48rem) {\n .container {\n max-width: 48rem;\n }\n }\n @media (min-width: 64rem) {\n .container {\n max-width: 64rem;\n }\n }\n @media (min-width: 80rem) {\n .container {\n max-width: 80rem;\n }\n }\n @media (min-width: 96rem) {\n .container {\n max-width: 96rem;\n }\n }\n .mt-2 {\n margin-top: calc(var(--spacing) * 2);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .ml-1 {\n margin-left: calc(var(--spacing) * 1);\n }\n .block {\n display: block;\n }\n .block\\! {\n display: block !important;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .hidden {\n display: none;\n }\n .inline-block {\n display: inline-block;\n }\n .table {\n display: table;\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-15 {\n height: calc(var(--spacing) * 15);\n }\n .h-full {\n height: 100%;\n }\n .min-h-\\[210px\\]\\! {\n min-height: 210px !important;\n }\n .min-h-screen {\n min-height: 100vh;\n }\n .w-2 {\n width: calc(var(--spacing) * 2);\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-80 {\n width: calc(var(--spacing) * 80);\n }\n .w-full {\n width: 100%;\n }\n .max-w-3xl {\n max-width: var(--container-3xl);\n }\n .max-w-5xl {\n max-width: var(--container-5xl);\n }\n .min-w-0 {\n min-width: calc(var(--spacing) * 0);\n }\n .flex-1 {\n flex: 1;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .resize {\n resize: both;\n }\n .flex-col {\n flex-direction: column;\n }\n .items-center {\n align-items: center;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-end {\n justify-content: flex-end;\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n :where(.space-x-4 > :not(:last-child)) {\n --tw-space-x-reverse:0;\n margin-inline-start: calc(calc(var(--spacing) * 4) * var(--tw-space-x-reverse));\n margin-inline-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-x-reverse)));\n }\n .truncate {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n .truncate\\! {\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n }\n .overflow-hidden {\n overflow: hidden;\n }\n .rounded {\n border-radius: .25rem;\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .rounded-md {\n border-radius: var(--radius-md);\n }\n .rounded-tl-md {\n border-top-left-radius: var(--radius-md);\n }\n .rounded-bl-md {\n border-bottom-left-radius: var(--radius-md);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-green-500 {\n border-color: var(--color-green-500);\n }\n .bg-\\(--primary-color\\) {\n background-color: var(--primary-color);\n }\n .bg-blue-500 {\n background-color: var(--color-blue-500);\n }\n .bg-gray-50 {\n background-color: var(--color-gray-50);\n }\n .bg-gray-100 {\n background-color: var(--color-gray-100);\n }\n .bg-gray-200 {\n background-color: var(--color-gray-200);\n }\n .bg-gray-900 {\n background-color: var(--color-gray-900);\n }\n .bg-green-50 {\n background-color: var(--color-green-50);\n }\n .bg-green-100 {\n background-color: var(--color-green-100);\n }\n .bg-red-600 {\n background-color: var(--color-red-600);\n }\n .bg-teal-500 {\n background-color: var(--color-teal-500);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .px-2 {\n padding-inline: calc(var(--spacing) * 2);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .px-6 {\n padding-inline: calc(var(--spacing) * 6);\n }\n .py-0 {\n padding-block: calc(var(--spacing) * 0);\n }\n .py-0\\.5 {\n padding-block: calc(var(--spacing) * .5);\n }\n .py-1 {\n padding-block: calc(var(--spacing) * 1);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .py-3 {\n padding-block: calc(var(--spacing) * 3);\n }\n .py-4 {\n padding-block: calc(var(--spacing) * 4);\n }\n .pt-1 {\n padding-top: calc(var(--spacing) * 1);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pr-5 {\n padding-right: calc(var(--spacing) * 5);\n }\n .pb-5 {\n padding-bottom: calc(var(--spacing) * 5);\n }\n .pl-5 {\n padding-left: calc(var(--spacing) * 5);\n }\n .text-center {\n text-align: center;\n }\n .font-mono {\n font-family: var(--font-mono);\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading,var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading,var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading,var(--text-sm--line-height));\n }\n .text-sm\\! {\n font-size: var(--text-sm) !important;\n line-height: var(--tw-leading,var(--text-sm--line-height)) !important;\n }\n .text-xs {\n font-size: var(--text-xs);\n line-height: var(--tw-leading,var(--text-xs--line-height));\n }\n .text-xs\\! {\n font-size: var(--text-xs) !important;\n line-height: var(--tw-leading,var(--text-xs--line-height)) !important;\n }\n .font-bold {\n --tw-font-weight:var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight:var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight:var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .font-semibold\\! {\n --tw-font-weight:var(--font-weight-semibold) !important;\n font-weight: var(--font-weight-semibold) !important;\n }\n .text-ellipsis {\n text-overflow: ellipsis;\n }\n .whitespace-nowrap {\n white-space: nowrap;\n }\n .text-black {\n color: var(--color-black);\n }\n .text-black\\/80 {\n color: #000c;\n }\n @supports (color:color-mix(in lab, red, red)) {\n .text-black\\/80 {\n color: color-mix(in oklab, var(--color-black) 80%, transparent);\n }\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-gray-700 {\n color: var(--color-gray-700);\n }\n .text-gray-900 {\n color: var(--color-gray-900);\n }\n .text-green-400 {\n color: var(--color-green-400);\n }\n .text-green-800 {\n color: var(--color-green-800);\n }\n .text-white {\n color: var(--color-white);\n }\n .uppercase {\n text-transform: uppercase;\n }\n .underline {\n text-decoration-line: underline;\n }\n .shadow-\\[0_2px_6px_-1px_rgba\\(0\\,0\\,0\\,\\.16\\)\\,0_6px_18px_-1px_rgba\\(0\\,0\\,0\\,\\.06\\)\\] {\n --tw-shadow:0 2px 6px -1px var(--tw-shadow-color,#00000029), 0 6px 18px -1px var(--tw-shadow-color,#0000000f);\n box-shadow:\n var(--tw-inset-shadow),\n var(--tw-inset-ring-shadow),\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .blur {\n --tw-blur:blur(8px);\n filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);\n }\n .filter {\n filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);\n }\n .transition {\n transition-property:\n color,\n background-color,\n border-color,\n outline-color,\n text-decoration-color,\n fill,\n stroke,\n --tw-gradient-from,\n --tw-gradient-via,\n --tw-gradient-to,\n opacity,\n box-shadow,\n transform,\n translate,\n scale,\n rotate,\n filter,\n -webkit-backdrop-filter,\n backdrop-filter,\n display,\n content-visibility,\n overlay,\n pointer-events;\n transition-timing-function: var(--tw-ease,var(--default-transition-timing-function));\n transition-duration: var(--tw-duration,var(--default-transition-duration));\n }\n .select-none {\n -webkit-user-select: none;\n user-select: none;\n }\n .disabled\\:opacity-50:disabled {\n opacity: .5;\n }\n}\n@layer mui, mantine;\n@property --tw-space-x-reverse { syntax:"*";inherits:false;initial-value:0 }\n@property --tw-border-style { syntax:"*";inherits:false;initial-value:solid }\n@property --tw-font-weight { syntax:"*";inherits:false }\n@property --tw-shadow { syntax:"*";inherits:false;initial-value:0 0 #0000 }\n@property --tw-shadow-color { syntax:"*";inherits:false }\n@property --tw-shadow-alpha { syntax:"<percentage>";inherits:false;initial-value:100% }\n@property --tw-inset-shadow { syntax:"*";inherits:false;initial-value:0 0 #0000 }\n@property --tw-inset-shadow-color { syntax:"*";inherits:false }\n@property --tw-inset-shadow-alpha { syntax:"<percentage>";inherits:false;initial-value:100% }\n@property --tw-ring-color { syntax:"*";inherits:false }\n@property --tw-ring-shadow { syntax:"*";inherits:false;initial-value:0 0 #0000 }\n@property --tw-inset-ring-color { syntax:"*";inherits:false }\n@property --tw-inset-ring-shadow { syntax:"*";inherits:false;initial-value:0 0 #0000 }\n@property --tw-ring-inset { syntax:"*";inherits:false }\n@property --tw-ring-offset-width { syntax:"<length>";inherits:false;initial-value:0 }\n@property --tw-ring-offset-color { syntax:"*";inherits:false;initial-value:#fff }\n@property --tw-ring-offset-shadow { syntax:"*";inherits:false;initial-value:0 0 #0000 }\n@property --tw-outline-style { syntax:"*";inherits:false;initial-value:solid }\n@property --tw-blur { syntax:"*";inherits:false }\n@property --tw-brightness { syntax:"*";inherits:false }\n@property --tw-contrast { syntax:"*";inherits:false }\n@property --tw-grayscale { syntax:"*";inherits:false }\n@property --tw-hue-rotate { syntax:"*";inherits:false }\n@property --tw-invert { syntax:"*";inherits:false }\n@property --tw-opacity { syntax:"*";inherits:false }\n@property --tw-saturate { syntax:"*";inherits:false }\n@property --tw-sepia { syntax:"*";inherits:false }\n@property --tw-drop-shadow { syntax:"*";inherits:false }\n@property --tw-drop-shadow-color { syntax:"*";inherits:false }\n@property --tw-drop-shadow-alpha { syntax:"<percentage>";inherits:false;initial-value:100% }\n@property --tw-drop-shadow-size { syntax:"*";inherits:false }\n');
41
+ function Card({
42
+ margin,
43
+ onClick,
44
+ title,
45
+ toolTip,
46
+ className,
47
+ borderTitle,
48
+ children,
49
+ borderRadius,
50
+ width = "100%",
51
+ height = "auto",
52
+ titleWidth = "100%",
53
+ justifyContent = "space-between",
54
+ titleColor = "var(--primary-color)",
55
+ icon
56
+ }) {
57
+ return /* @__PURE__ */ jsxs(
58
+ Box,
59
+ {
60
+ onClick,
61
+ className: cn(className, "text-sm!"),
62
+ sx: __spreadValues({
63
+ width,
64
+ margin,
65
+ height,
66
+ borderRadius,
67
+ "@media (max-width: 768px)": { width: "100%" },
68
+ boxShadow: "0 0.15rem 0.5rem rgba(0, 0, 0, 0.16)"
69
+ }, onClick && { cursor: "pointer !important" }),
70
+ children: [
71
+ /* @__PURE__ */ jsxs(
72
+ Box,
73
+ {
74
+ sx: {
75
+ justifyContent,
76
+ height: "24px",
77
+ color: "white",
78
+ display: "flex",
79
+ width: titleWidth,
80
+ overflow: "hidden",
81
+ padding: "0px 15px",
82
+ alignItems: "center",
83
+ flexDirection: "row",
84
+ borderRadius: borderTitle,
85
+ backgroundColor: titleColor
86
+ },
87
+ children: [
88
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 font-semibold! truncate!", children: /* @__PURE__ */ jsx(
89
+ Tooltip,
90
+ {
91
+ withArrow: true,
92
+ radius: "md",
93
+ label: title,
94
+ arrowSize: 6,
95
+ position: "top",
96
+ arrowOffset: 15,
97
+ disabled: !toolTip,
98
+ color: titleColor,
99
+ classNames: { tooltip: "text-xs!" },
100
+ offset: { mainAxis: 11, crossAxis: -21 },
101
+ transitionProps: { transition: "fade", duration: 100 },
102
+ children: /* @__PURE__ */ jsx("span", { className: "block! truncate!", children: title })
103
+ }
104
+ ) }),
105
+ /* @__PURE__ */ jsx("div", { children: icon })
106
+ ]
107
+ }
108
+ ),
109
+ children
110
+ ]
111
+ }
112
+ );
113
+ }
114
+ var card_default = Card;
115
+
116
+ // src/components/ui/dialog/utils/constants.ts
117
+ var DIALOG_BACKDROP_STYLE = {
118
+ backdropFilter: "blur(4px)",
119
+ backgroundColor: "rgba(0, 0, 0, 0.5)"
120
+ };
121
+ var DIALOG_PAPER_FONT_SX = {
122
+ fontFamily: "var(--font-family, inherit) !important",
123
+ "& .MuiDialogTitle-root, & .MuiDialogContent-root, & .MuiDialogActions-root, & .MuiTypography-root": {
124
+ fontFamily: "inherit !important"
125
+ }
126
+ };
127
+ function Dialog({
128
+ open,
129
+ title,
130
+ onClose,
131
+ actions,
132
+ children,
133
+ maxWidth,
134
+ blurBackdrop = false
135
+ }) {
136
+ const backdropStyle = blurBackdrop ? DIALOG_BACKDROP_STYLE : {};
137
+ return /* @__PURE__ */ jsxs(
138
+ DialogMui,
139
+ {
140
+ fullWidth: true,
141
+ open,
142
+ onClose,
143
+ maxWidth,
144
+ slotProps: {
145
+ backdrop: { sx: backdropStyle },
146
+ paper: { sx: DIALOG_PAPER_FONT_SX }
147
+ },
148
+ children: [
149
+ title && /* @__PURE__ */ jsx(DialogTitle, { children: /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-black", children: title }) }),
150
+ /* @__PURE__ */ jsx(DialogContent, { className: "text-black", children }),
151
+ actions && /* @__PURE__ */ jsx(DialogActions, { children: actions })
152
+ ]
153
+ }
154
+ );
155
+ }
156
+ var dialog_default = Dialog;
157
+ var tableFont = "var(--font-family, var(--font-poppins, Poppins, sans-serif))";
158
+ var localeText = __spreadProps(__spreadValues({}, ptBR.components.MuiDataGrid.defaultProps.localeText), {
159
+ noColumnsOverlayLabel: "Nenhuma coluna dispon\xEDvel",
160
+ noColumnsOverlayManageColumns: "Gerenciar colunas",
161
+ columnsManagementSearchTitle: "Buscar coluna",
162
+ columnsManagementNoColumns: "Nenhuma coluna para mostrar",
163
+ columnsManagementShowHideAllText: "Mostrar/Ocultar todas",
164
+ columnsManagementReset: "Redefinir",
165
+ columnsManagementDeleteIconLabel: "Excluir",
166
+ columnMenuManageColumns: "Gerenciar colunas",
167
+ columnMenuShowColumns: "Mostrar colunas",
168
+ columnMenuLabel: "Menu da coluna",
169
+ columnMenuHideColumn: "Ocultar",
170
+ columnMenuUnsort: "Remover ordena\xE7\xE3o",
171
+ columnMenuSortAsc: "Ordenar ASC",
172
+ columnMenuSortDesc: "Ordenar DESC",
173
+ columnMenuFilter: "Filtrar",
174
+ toolbarQuickFilterLabel: "Filtro r\xE1pido",
175
+ toolbarQuickFilterPlaceholder: "Filtrar\u2026",
176
+ toolbarQuickFilterDeleteIconLabel: "Limpar filtro",
177
+ toolbarExport: "Exportar",
178
+ toolbarExportLabel: "Exportar",
179
+ toolbarExportCSV: "Baixar como CSV",
180
+ toolbarExportPrint: "Imprimir",
181
+ toolbarColumns: "Colunas",
182
+ toolbarColumnsLabel: "Selecionar colunas",
183
+ toolbarFilters: "Filtros",
184
+ toolbarFiltersLabel: "Mostrar filtros",
185
+ toolbarFiltersTooltipHide: "Ocultar filtros",
186
+ toolbarFiltersTooltipShow: "Mostrar filtros",
187
+ toolbarFiltersTooltipActive: (count) => count === 1 ? `${count} filtro ativo` : `${count} filtros ativos`,
188
+ toolbarDensity: "Densidade",
189
+ toolbarDensityLabel: "Densidade",
190
+ toolbarDensityCompact: "Compacta",
191
+ toolbarDensityStandard: "Padr\xE3o",
192
+ toolbarDensityComfortable: "Confort\xE1vel",
193
+ filterPanelAddFilter: "Adicionar filtro",
194
+ filterPanelDeleteIconLabel: "Excluir",
195
+ filterPanelOperatorAnd: "E",
196
+ filterPanelOperatorOr: "OU",
197
+ filterPanelColumn: "Colunas",
198
+ filterPanelInputLabel: "Valor",
199
+ filterPanelInputPlaceholder: "Valor do filtro",
200
+ filterOperatorContains: "cont\xE9m",
201
+ filterOperatorEquals: "igual a",
202
+ filterOperatorStartsWith: "come\xE7a com",
203
+ filterOperatorEndsWith: "termina com",
204
+ filterOperatorIs: "\xE9",
205
+ filterOperatorNot: "n\xE3o \xE9",
206
+ filterOperatorAfter: "depois de",
207
+ filterOperatorOnOrAfter: "em ou depois de",
208
+ filterOperatorBefore: "antes de",
209
+ filterOperatorOnOrBefore: "em ou antes de",
210
+ filterOperatorIsEmpty: "est\xE1 vazio",
211
+ filterOperatorIsNotEmpty: "n\xE3o est\xE1 vazio",
212
+ filterOperatorIsAnyOf: "\xE9 qualquer um de",
213
+ footerTotalRows: "Total de linhas:",
214
+ footerRowSelected: (count) => count === 1 ? "1 linha selecionada" : `${count.toLocaleString()} linhas selecionadas`,
215
+ footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} de ${totalCount.toLocaleString()}`,
216
+ paginationRowsPerPage: "Linhas por p\xE1gina:",
217
+ paginationItemAriaLabel: (type) => {
218
+ switch (type) {
219
+ case "first":
220
+ return "Primeira p\xE1gina";
221
+ case "last":
222
+ return "\xDAltima p\xE1gina";
223
+ case "next":
224
+ return "Pr\xF3xima p\xE1gina";
225
+ case "previous":
226
+ return "P\xE1gina anterior";
227
+ default:
228
+ return "";
229
+ }
230
+ },
231
+ noRowsLabel: "Nenhum dado encontrado",
232
+ noResultsOverlayLabel: "Nenhum resultado encontrado",
233
+ checkboxSelectionHeaderName: "Sele\xE7\xE3o de checkbox",
234
+ checkboxSelectionSelectAllRows: "Selecionar todas as linhas",
235
+ checkboxSelectionUnselectAllRows: "Desmarcar todas as linhas",
236
+ checkboxSelectionSelectRow: "Selecionar linha",
237
+ checkboxSelectionUnselectRow: "Desmarcar linha",
238
+ columnHeaderSortIconLabel: "Ordenar",
239
+ groupingColumnHeaderName: "Grupo",
240
+ groupColumn: (name) => `Agrupar por ${name}`,
241
+ unGroupColumn: (name) => `Parar de agrupar por ${name}`,
242
+ detailPanelToggle: "Alternar painel de detalhes",
243
+ expandDetailPanel: "Expandir",
244
+ collapseDetailPanel: "Recolher",
245
+ treeDataGroupingHeaderName: "Grupo",
246
+ treeDataExpand: "ver filhos",
247
+ treeDataCollapse: "ocultar filhos",
248
+ aggregationMenuItemHeader: "Agrega\xE7\xE3o",
249
+ aggregationFunctionLabelSum: "soma",
250
+ aggregationFunctionLabelAvg: "m\xE9dia",
251
+ aggregationFunctionLabelMin: "m\xEDn",
252
+ aggregationFunctionLabelMax: "m\xE1x",
253
+ aggregationFunctionLabelSize: "tamanho",
254
+ paginationDisplayedRows: ({ from, to, count }) => {
255
+ const total = count === -1 ? "mais de " + to : count;
256
+ return `${from}\u2013${to} de ${total}`;
257
+ }
258
+ });
259
+ var columnPanelSx = {
260
+ padding: 2,
261
+ width: "350px",
262
+ color: "#000000DE",
263
+ "*": { fontFamily: `${tableFont} !important` }
264
+ };
265
+ var columnMenuSx = {
266
+ "*": { fontFamily: `${tableFont} !important` },
267
+ "& .MuiListItemText-primary": {
268
+ fontSize: "14px !important"
269
+ }
270
+ };
271
+ var filterSx = {
272
+ width: "750px",
273
+ "*": {
274
+ fontSize: "14px !important",
275
+ fontFamily: `${tableFont} !important`
276
+ },
277
+ "& .MuiDataGrid-filterFormColumnInput": { width: "230px" },
278
+ "& .MuiDataGrid-filterFormOperatorInput": { width: "230px" }
279
+ };
280
+ var filterTheme = createTheme({
281
+ typography: { fontFamily: tableFont },
282
+ components: {
283
+ MuiList: {
284
+ styleOverrides: {
285
+ root: { fontFamily: tableFont }
286
+ }
287
+ },
288
+ MuiMenuItem: {
289
+ styleOverrides: {
290
+ root: { fontFamily: tableFont }
291
+ }
292
+ }
293
+ }
294
+ });
295
+ var paginationSx = {
296
+ "& .MuiTablePagination-root": {
297
+ fontSize: "12px !important",
298
+ fontFamily: `${tableFont} !important`
299
+ },
300
+ "& .MuiTablePagination-selectLabel": {
301
+ fontSize: "12px !important",
302
+ fontFamily: `${tableFont} !important`
303
+ },
304
+ "& .MuiTablePagination-displayedRows": {
305
+ fontSize: "12px !important",
306
+ fontFamily: `${tableFont} !important`
307
+ },
308
+ "& .MuiTablePagination-select": {
309
+ fontSize: "12px !important",
310
+ fontFamily: `${tableFont} !important`
311
+ },
312
+ "& .MuiTablePagination-toolbar": {
313
+ minHeight: "40px !important",
314
+ padding: "0 8px !important"
315
+ }
316
+ };
317
+ var tableSx = {
318
+ fontSize: "13px",
319
+ fontFamily: `${tableFont} !important`,
320
+ "& *": {
321
+ fontFamily: `${tableFont} !important`
322
+ },
323
+ "& .MuiDataGrid-row:nth-of-type(even)": {
324
+ backgroundColor: "#F9FAFB"
325
+ },
326
+ "& .MuiDataGrid-row:nth-of-type(odd)": {
327
+ backgroundColor: "#FFFFFF"
328
+ },
329
+ "& .MuiDataGrid-row.Mui-selected:nth-of-type(even)": {
330
+ backgroundColor: "#F9FAFB !important"
331
+ },
332
+ "& .MuiDataGrid-row.Mui-selected:nth-of-type(odd)": {
333
+ backgroundColor: "#FFFFFF !important"
334
+ },
335
+ "& .MuiDataGrid-row:hover": { backgroundColor: "#F3F4F6 !important" },
336
+ "& .MuiDataGrid-columnHeaderTitleContainer": {
337
+ color: "#FFFFFF",
338
+ justifyContent: "center",
339
+ "& svg": { color: "#FFFFFF" }
340
+ },
341
+ "& .MuiDataGrid-iconButtonContainer .MuiIconButton-root, & .MuiDataGrid-menuIconButton": {
342
+ color: "#FFFFFF"
343
+ },
344
+ "& .MuiDataGrid-iconButtonContainer .MuiIconButton-root:hover, & .MuiDataGrid-menuIconButton:hover": { backgroundColor: "transparent" },
345
+ "& .MuiDataGrid-iconButtonContainer .MuiIconButton-root.Mui-focusVisible, & .MuiDataGrid-menuIconButton.Mui-focusVisible": { backgroundColor: "transparent" },
346
+ "& .MuiDataGrid-columnHeaders": {
347
+ background: "linear-gradient(to right, #00B2A6 0%, #0AAEB2 100%)"
348
+ },
349
+ "& .MuiDataGrid-columnHeader": {
350
+ color: "#FFFFFF",
351
+ fontWeight: "bold",
352
+ backgroundColor: "transparent",
353
+ "& svg": { color: "#FFFFFF" }
354
+ },
355
+ "& .MuiDataGrid-columnHeader:hover": { backgroundColor: "transparent" },
356
+ "& .MuiDataGrid-columnHeader:hover .MuiIconButton-root": {
357
+ backgroundColor: "transparent"
358
+ },
359
+ "& .MuiDataGrid-columnHeader:focus-within": {
360
+ backgroundColor: "transparent"
361
+ },
362
+ "& .MuiDataGrid-columnHeader--sorted": { backgroundColor: "transparent" },
363
+ "& .MuiDataGrid-columnHeader--sorted .MuiIconButton-root": {
364
+ backgroundColor: "transparent"
365
+ },
366
+ "& .MuiDataGrid-sortIcon": { color: "#FFFFFF" },
367
+ "& .MuiDataGrid-sortIcon:hover": { backgroundColor: "transparent" },
368
+ "& .MuiDataGrid-columnHeaderTitle": { fontWeight: "500", color: "#FFFFFF" }
369
+ };
370
+ var createChange = (item, applyValue) => (index) => ({ target }) => {
371
+ const [start = "", end = ""] = Array.isArray(item.value) ? item.value : [];
372
+ applyValue(__spreadProps(__spreadValues({}, item), {
373
+ value: index === 0 ? [target.value, end] : [start, target.value]
374
+ }));
375
+ };
376
+ var textBetweenOp = {
377
+ label: "entre",
378
+ value: "between",
379
+ getApplyFilterFn: (filter) => {
380
+ if (!filter.value || !Array.isArray(filter.value)) return null;
381
+ const [start, end] = filter.value;
382
+ if (!start || !end) return null;
383
+ return (value) => {
384
+ const cell = (value == null ? void 0 : value.toString()) || "";
385
+ return cell >= start && cell <= end;
386
+ };
387
+ },
388
+ InputComponent: ({ item, applyValue, focusElementRef }) => {
389
+ const onChange = createChange(item, applyValue);
390
+ return /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: [
391
+ /* @__PURE__ */ jsx(
392
+ TextField,
393
+ {
394
+ size: "small",
395
+ label: "De",
396
+ variant: "outlined",
397
+ inputRef: focusElementRef,
398
+ value: (item.value || ["", ""])[0] || "",
399
+ onChange: onChange(0),
400
+ placeholder: "Inicial"
401
+ }
402
+ ),
403
+ /* @__PURE__ */ jsx(
404
+ TextField,
405
+ {
406
+ size: "small",
407
+ label: "At\xE9",
408
+ variant: "outlined",
409
+ value: (item.value || ["", ""])[1] || "",
410
+ onChange: onChange(1),
411
+ placeholder: "Final"
412
+ }
413
+ )
414
+ ] });
415
+ }
416
+ };
417
+ var numberBetweenOp = {
418
+ label: "entre",
419
+ value: "between",
420
+ getApplyFilterFn: (filter) => {
421
+ if (!filter.value || !Array.isArray(filter.value)) return null;
422
+ const [start, end] = filter.value;
423
+ if (start === "" || end === "" || start == null || end == null) return null;
424
+ return (value) => {
425
+ const number = Number(value);
426
+ return number >= Number(start) && number <= Number(end);
427
+ };
428
+ },
429
+ InputComponent: ({ item, applyValue, focusElementRef }) => {
430
+ const onChange = createChange(item, applyValue);
431
+ return /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: [
432
+ /* @__PURE__ */ jsx(
433
+ TextField,
434
+ {
435
+ size: "small",
436
+ label: "De",
437
+ type: "number",
438
+ variant: "outlined",
439
+ inputRef: focusElementRef,
440
+ value: (item.value || ["", ""])[0] || "",
441
+ onChange: onChange(0),
442
+ placeholder: "M\xEDnimo"
443
+ }
444
+ ),
445
+ /* @__PURE__ */ jsx(
446
+ TextField,
447
+ {
448
+ size: "small",
449
+ label: "At\xE9",
450
+ type: "number",
451
+ variant: "outlined",
452
+ value: (item.value || ["", ""])[1] || "",
453
+ onChange: onChange(1),
454
+ placeholder: "M\xE1ximo"
455
+ }
456
+ )
457
+ ] });
458
+ }
459
+ };
460
+ var getTextOps = () => {
461
+ return [...getGridStringOperators(), textBetweenOp];
462
+ };
463
+ var getNumberOps = () => {
464
+ return [...getGridNumericOperators(), numberBetweenOp];
465
+ };
466
+ GRID_STRING_COL_DEF.filterOperators = getTextOps();
467
+ GRID_NUMERIC_COL_DEF.filterOperators = getNumberOps();
468
+ function CustomColumnsPanel(props) {
469
+ return /* @__PURE__ */ jsx(GridColumnsPanel, __spreadProps(__spreadValues({}, props), { sx: columnPanelSx }));
470
+ }
471
+ function CustomColumnMenu(props) {
472
+ return /* @__PURE__ */ jsx(Box, { sx: columnMenuSx, children: /* @__PURE__ */ jsx(GridColumnMenu, __spreadValues({}, props)) });
473
+ }
474
+ function CustomFilterPanel(props) {
475
+ return /* @__PURE__ */ jsx(ThemeProvider, { theme: filterTheme, children: /* @__PURE__ */ jsx(GridFilterPanel, __spreadProps(__spreadValues({}, props), { sx: filterSx })) });
476
+ }
477
+ function CustomNoRowsOverlay() {
478
+ return /* @__PURE__ */ jsx(GridOverlay, { children: /* @__PURE__ */ jsx(Box, { sx: { mt: 1 }, children: "Nenhum dado encontrado." }) });
479
+ }
480
+ function CustomPagination() {
481
+ return /* @__PURE__ */ jsx(Box, { sx: paginationSx, children: /* @__PURE__ */ jsx(GridPagination, {}) });
482
+ }
483
+ var DataTable = (_a) => {
484
+ var rest = __objRest(_a, []);
485
+ return /* @__PURE__ */ jsx(Box, { sx: { mb: 2, mt: 2, height: "100%" }, children: /* @__PURE__ */ jsx(
486
+ DataGrid,
487
+ __spreadProps(__spreadValues({
488
+ sx: tableSx
489
+ }, rest), {
490
+ className: "min-h-[210px]!",
491
+ localeText,
492
+ disableRowSelectionOnClick: true,
493
+ slotProps: {
494
+ loadingOverlay: {
495
+ variant: "linear-progress",
496
+ noRowsVariant: "skeleton"
497
+ }
498
+ },
499
+ slots: {
500
+ columnMenu: CustomColumnMenu,
501
+ filterPanel: CustomFilterPanel,
502
+ columnsPanel: CustomColumnsPanel,
503
+ noRowsOverlay: CustomNoRowsOverlay,
504
+ pagination: CustomPagination
505
+ }
506
+ })
507
+ ) });
508
+ };
509
+ var data_table_default = DataTable;
510
+ var DEFAULT_TAB_COLOR = "var(--primary-color)";
511
+ var DEFAULT_TAB_FONT_FAMILY = "var(--font-family, inherit)";
512
+ var Tabs = styled(Tabs$1, {
513
+ shouldForwardProp: (prop) => prop !== "color"
514
+ })(({ color = DEFAULT_TAB_COLOR }) => ({
515
+ fontFamily: `${DEFAULT_TAB_FONT_FAMILY} !important`,
516
+ "& .MuiTabs-indicator": { backgroundColor: color }
517
+ }));
518
+ var Tab = styled(Tab$1, {
519
+ shouldForwardProp: (prop) => prop !== "color" && prop !== "fontFamily"
520
+ })(
521
+ ({ color = DEFAULT_TAB_COLOR, fontFamily = DEFAULT_TAB_FONT_FAMILY }) => ({
522
+ fontWeight: "500 !important",
523
+ color: "#000000CC !important",
524
+ fontSize: "14px !important",
525
+ textTransform: "uppercase !important",
526
+ fontFamily: `${fontFamily} !important`,
527
+ "&.Mui-selected": { color: `${color} !important` }
528
+ })
529
+ );
530
+
531
+ // src/core/css-var.ts
532
+ function withCssVar(style, name, value) {
533
+ if (value == null || value === "") return style;
534
+ return __spreadProps(__spreadValues({}, style), { [name]: value });
535
+ }
536
+ var DEFAULT_ACCENT = "var(--primary-color)";
537
+ var accent = "var(--primary-color)";
538
+ var errorColor = "#D32F2F";
539
+ var focusLabel = { color: accent };
540
+ var errorLabel = { color: errorColor };
541
+ var borderAccent = { borderColor: accent };
542
+ var borderError = { borderColor: errorColor };
543
+ var underlineAccent = { borderBottomColor: accent };
544
+ var underlineError = { borderBottomColor: errorColor };
545
+ var disabledText = { color: "#9E9E9E", cursor: "not-allowed" };
546
+ var disabledBorder = { borderColor: "#9E9E9E", cursor: "not-allowed" };
547
+ var input = {
548
+ color: "#333",
549
+ fontSize: "13px !important",
550
+ fontFamily: "var(--font-poppins) !important"
551
+ };
552
+ var InputTextField = styled(TextField)({
553
+ fontFamily: "var(--font-poppins) !important",
554
+ "& input": input,
555
+ "& label": input,
556
+ "& label.Mui-focused": focusLabel,
557
+ "& label.Mui-error": errorLabel,
558
+ "& .MuiInput-underline:after": underlineAccent,
559
+ "& .MuiInput-underline.Mui-error:after": underlineError,
560
+ "& .MuiOutlinedInput-root": {
561
+ "& fieldset": borderAccent,
562
+ "&:hover fieldset": borderAccent,
563
+ "&.Mui-disabled fieldset": disabledBorder,
564
+ "&.Mui-focused fieldset": borderAccent,
565
+ "&.Mui-error fieldset": borderError,
566
+ "&.Mui-error:hover fieldset": borderError,
567
+ "&.Mui-error.Mui-focused fieldset": borderError
568
+ },
569
+ "& .MuiFilledInput-root": {
570
+ backgroundColor: "#F9FAFB",
571
+ "&:after": underlineAccent,
572
+ "&:before": underlineAccent,
573
+ "&:hover:before": underlineAccent,
574
+ "&.Mui-error:after": underlineError,
575
+ "&.Mui-error:before": underlineError,
576
+ "&:hover": { backgroundColor: "#F5F5F5" },
577
+ "&.Mui-error:hover:before": underlineError,
578
+ fontFamily: "var(--font-poppins) !important",
579
+ "&.Mui-disabled": __spreadProps(__spreadValues({}, disabledText), { backgroundColor: "#F9FAFB" })
580
+ },
581
+ "& .MuiInputBase-input": __spreadProps(__spreadValues({}, input), { "&.Mui-disabled": disabledText }),
582
+ "& .MuiFormHelperText-root": {
583
+ fontSize: "11px",
584
+ marginLeft: 2,
585
+ fontFamily: "var(--font-poppins) !important"
586
+ },
587
+ "& .MuiFormHelperText-root.Mui-error": { color: errorColor },
588
+ "& .Mui-disabled": disabledText
589
+ });
590
+ var css_default = memo(InputTextField);
591
+ function useInputMasker({ type, onChange }) {
592
+ const formatValue = useCallback(
593
+ (v) => {
594
+ if (!v) return "";
595
+ switch (type) {
596
+ case "cpf-cnpj":
597
+ return formatCpfCnpj(v);
598
+ case "numeric":
599
+ return removeDigits(v);
600
+ case "tel":
601
+ return formatPhoneBr(v);
602
+ case "price":
603
+ return formatPriceBrl(v);
604
+ case "text-only":
605
+ return removeTextOnly(v);
606
+ case "text-no-number":
607
+ return removeNonDigits(v);
608
+ case "item-170":
609
+ return formatItem170(v);
610
+ case "item-150":
611
+ return formatItem150(v);
612
+ default:
613
+ return v;
614
+ }
615
+ },
616
+ [type]
617
+ );
618
+ const handleChange = (e) => {
619
+ const newValue = e.target.value;
620
+ onChange == null ? void 0 : onChange(__spreadProps(__spreadValues({}, e), {
621
+ target: __spreadProps(__spreadValues({}, e.target), { value: formatValue(newValue) })
622
+ }));
623
+ };
624
+ return { handleChange };
625
+ }
626
+ function withPasswordToggle({
627
+ showPwd,
628
+ canToggle,
629
+ slotProps,
630
+ setShowPwd,
631
+ color = DEFAULT_ACCENT
632
+ }) {
633
+ if (!canToggle) return slotProps;
634
+ const Icon = showPwd ? MdVisibilityOff : MdVisibility;
635
+ return __spreadProps(__spreadValues({}, slotProps), {
636
+ input: __spreadProps(__spreadValues({}, slotProps == null ? void 0 : slotProps.input), {
637
+ endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx(
638
+ IconButton,
639
+ {
640
+ edge: "end",
641
+ size: "small",
642
+ sx: { color },
643
+ onClick: () => setShowPwd((prev) => !prev),
644
+ children: /* @__PURE__ */ jsx(Icon, { size: 20 })
645
+ }
646
+ ) })
647
+ })
648
+ });
649
+ }
650
+ function buildSlotProps(args) {
651
+ return withPasswordToggle(args);
652
+ }
653
+ var CUSTOM_INPUT_TYPES = /* @__PURE__ */ new Set([
654
+ "cpf-cnpj",
655
+ "numeric",
656
+ "price",
657
+ "item-170",
658
+ "item-150",
659
+ "text-only",
660
+ "text-no-number"
661
+ ]);
662
+ function resolveHtmlInputType(type) {
663
+ if (!type || CUSTOM_INPUT_TYPES.has(type)) return "text";
664
+ return type;
665
+ }
666
+ var Input = (_a) => {
667
+ var _b = _a, {
668
+ color,
669
+ onChange,
670
+ isPassword,
671
+ type = "text",
672
+ size = "small"
673
+ } = _b, rest = __objRest(_b, [
674
+ "color",
675
+ "onChange",
676
+ "isPassword",
677
+ "type",
678
+ "size"
679
+ ]);
680
+ const [showPwd, setShowPwd] = useState(false);
681
+ const isPwd = type === "password";
682
+ const canToggle = isPwd && isPassword;
683
+ const htmlType = resolveHtmlInputType(type);
684
+ const inputType = canToggle && showPwd ? "text" : htmlType;
685
+ const style = useMemo(
686
+ () => withCssVar(rest.style, "--primary-color", color),
687
+ [color, rest.style]
688
+ );
689
+ const slotProps = useMemo(
690
+ () => buildSlotProps({
691
+ color,
692
+ showPwd,
693
+ canToggle,
694
+ setShowPwd,
695
+ slotProps: rest.slotProps
696
+ }),
697
+ [canToggle, color, showPwd, rest.slotProps]
698
+ );
699
+ const { handleChange } = useInputMasker({ type, onChange });
700
+ return /* @__PURE__ */ jsx(
701
+ css_default,
702
+ __spreadProps(__spreadValues({}, rest), {
703
+ size,
704
+ style,
705
+ type: inputType,
706
+ slotProps,
707
+ onChange: handleChange,
708
+ className: cn("select-none", rest.className)
709
+ })
710
+ );
711
+ };
712
+ var input_default = Input;
713
+
714
+ // src/components/ui/input-select/utils/css.ts
715
+ var optionText = {
716
+ fontSize: "13px !important",
717
+ fontFamily: "var(--font-poppins) !important"
718
+ };
719
+ var selectMui = {
720
+ "& .MuiAutocomplete-option": __spreadProps(__spreadValues({
721
+ padding: "8px 12px"
722
+ }, optionText), {
723
+ lineHeight: "25px !important"
724
+ }),
725
+ "& .MuiAutocomplete-noOptions": optionText,
726
+ "& .MuiAutocomplete-listbox": { padding: "5px" }
727
+ };
728
+
729
+ // src/components/ui/input-select/utils/constants.ts
730
+ var locale = {
731
+ noOptionsText: "Nenhum resultado encontrado"
732
+ };
733
+ function InputSelect(_a) {
734
+ var _b = _a, {
735
+ input: input2,
736
+ multiple,
737
+ onChange,
738
+ optionLabel,
739
+ noOptionsText = locale.noOptionsText
740
+ } = _b, rest = __objRest(_b, [
741
+ "input",
742
+ "multiple",
743
+ "onChange",
744
+ "optionLabel",
745
+ "noOptionsText"
746
+ ]);
747
+ const handleChange = (event, value, reason, details) => {
748
+ onChange == null ? void 0 : onChange(event, value, reason, details);
749
+ };
750
+ return /* @__PURE__ */ jsx(
751
+ Autocomplete,
752
+ __spreadProps(__spreadValues({}, rest), {
753
+ size: "small",
754
+ multiple,
755
+ onChange: handleChange,
756
+ noOptionsText,
757
+ slotProps: { paper: { sx: selectMui } },
758
+ getOptionLabel: (option) => typeof option === "string" ? "" : optionLabel(option),
759
+ isOptionEqualToValue: (option, value) => JSON.stringify(option) === JSON.stringify(value),
760
+ renderInput: (params) => {
761
+ var _a2;
762
+ return /* @__PURE__ */ jsx(input_default, __spreadProps(__spreadValues(__spreadValues({}, params), input2), { size: (_a2 = input2 == null ? void 0 : input2.size) != null ? _a2 : "small" }));
763
+ }
764
+ })
765
+ );
766
+ }
767
+ var input_select_default = InputSelect;
768
+ var FilterCard = ({
769
+ title,
770
+ setOpen,
771
+ renderFilter
772
+ }) => {
773
+ return /* @__PURE__ */ jsxs("div", { className: "h-15 flex items-center w-full bg-white mb-2 rounded-md shadow-[0_2px_6px_-1px_rgba(0,0,0,.16),0_6px_18px_-1px_rgba(0,0,0,.06)]", children: [
774
+ /* @__PURE__ */ jsx("div", { className: "h-full w-2 bg-(--primary-color) rounded-tl-md rounded-bl-md" }),
775
+ /* @__PURE__ */ jsxs("div", { className: "w-full flex justify-between items-center p-3", children: [
776
+ /* @__PURE__ */ jsx("h1", { className: "font-medium text-lg whitespace-nowrap text-ellipsis overflow-hidden ml-1 text-black/80", children: title }),
777
+ /* @__PURE__ */ jsx("div", { className: "flex items-center space-x-4", children: renderFilter && /* @__PURE__ */ jsx(
778
+ Tooltip,
779
+ {
780
+ withArrow: true,
781
+ arrowSize: 4,
782
+ color: "#00b2a6",
783
+ arrowOffset: 20,
784
+ label: "Ver filtros",
785
+ className: "text-xs!",
786
+ transitionProps: { transition: "pop", duration: 300 },
787
+ children: /* @__PURE__ */ jsx("span", { className: "flex items-center", children: /* @__PURE__ */ jsx(
788
+ ActionIcon,
789
+ {
790
+ size: 40,
791
+ radius: "md",
792
+ "aria-label": "Ver filtros",
793
+ color: "var(--primary-color)",
794
+ onClick: () => setOpen(true),
795
+ children: /* @__PURE__ */ jsx(FaFilter, { className: "h-5 w-5 text-white" })
796
+ }
797
+ ) })
798
+ }
799
+ ) })
800
+ ] })
801
+ ] });
802
+ };
803
+ var card_default2 = FilterCard;
804
+
805
+ // src/components/ui/filter/utils/constants.ts
806
+ var FILTER_DEFAULT_ORDER = 99;
807
+ var FILTER_DRAWER_PAPER_SX = {
808
+ ["& .MuiDrawer-paper"]: { borderRadius: "0px 0px 20px 20px" }
809
+ };
810
+ function hasFilterFields(inputs, inputSelect) {
811
+ var _a, _b;
812
+ return ((_a = inputs == null ? void 0 : inputs.length) != null ? _a : 0) > 0 || ((_b = inputSelect == null ? void 0 : inputSelect.length) != null ? _b : 0) > 0;
813
+ }
814
+ function isInputSelect(field) {
815
+ return "options" in field;
816
+ }
817
+ function filterInputSelect(props) {
818
+ return props;
819
+ }
820
+ function sortFilterFields(fields) {
821
+ return [...fields].sort(
822
+ (a, b) => {
823
+ var _a, _b;
824
+ return ((_a = a.order) != null ? _a : FILTER_DEFAULT_ORDER) - ((_b = b.order) != null ? _b : FILTER_DEFAULT_ORDER);
825
+ }
826
+ );
827
+ }
828
+ function mergeFilterFields(inputs, inputSelect) {
829
+ return sortFilterFields([...inputs, ...inputSelect]);
830
+ }
831
+ function getFilterGridColumns(isMobile, isTablet) {
832
+ if (isMobile) return 1;
833
+ if (isTablet) return 3;
834
+ return 7;
835
+ }
836
+ var FilterDrawer = ({
837
+ open,
838
+ setOpen,
839
+ onClear,
840
+ onSubmit,
841
+ inputs = [],
842
+ inputSelect = []
843
+ }) => {
844
+ const m640 = useMediaQuery("(max-width:640px)");
845
+ const m1120 = useMediaQuery("(max-width:1120px)");
846
+ const allInputs = mergeFilterFields(inputs, inputSelect);
847
+ const renderField = (field, index) => {
848
+ var _a, _b, _c;
849
+ if (isInputSelect(field)) {
850
+ if (field.multiple) {
851
+ return /* @__PURE__ */ jsx(Grid, { size: (_a = field.xs) != null ? _a : 1, children: /* @__PURE__ */ jsx(
852
+ input_select_default,
853
+ __spreadProps(__spreadValues({}, field), {
854
+ id: `inputSM${index}`,
855
+ fullWidth: true
856
+ })
857
+ ) }, `inputSelect-${index}`);
858
+ }
859
+ return /* @__PURE__ */ jsx(Grid, { size: (_b = field.xs) != null ? _b : 1, children: /* @__PURE__ */ jsx(
860
+ input_select_default,
861
+ __spreadProps(__spreadValues({}, field), {
862
+ id: `inputSM${index}`,
863
+ fullWidth: true
864
+ })
865
+ ) }, `inputSelect-${index}`);
866
+ }
867
+ return /* @__PURE__ */ jsx(Grid, { size: (_c = field.xs) != null ? _c : 1, children: /* @__PURE__ */ jsx(input_default, __spreadProps(__spreadValues({}, field), { fullWidth: true })) }, `input-${index}`);
868
+ };
869
+ const handleSubmit = (event) => {
870
+ event.preventDefault();
871
+ if (!onSubmit) return;
872
+ onSubmit(event);
873
+ setOpen(false);
874
+ };
875
+ return /* @__PURE__ */ jsx(
876
+ Drawer,
877
+ {
878
+ open,
879
+ anchor: "top",
880
+ onClose: () => setOpen(false),
881
+ sx: FILTER_DRAWER_PAPER_SX,
882
+ children: /* @__PURE__ */ jsxs(
883
+ "form",
884
+ {
885
+ onSubmit: handleSubmit,
886
+ className: "flex w-full select-none flex-col py-4 pl-5",
887
+ children: [
888
+ /* @__PURE__ */ jsx("p", { className: "text-lg font-medium text-system-900", children: "Filtros" }),
889
+ /* @__PURE__ */ jsx("p", { className: "pb-5 pt-1 text-sm text-black/80", children: "Para que possamos apresentar dados espec\xEDficos, por favor, preencha os campos abaixo." }),
890
+ /* @__PURE__ */ jsx(
891
+ Grid,
892
+ {
893
+ container: true,
894
+ rowSpacing: 2,
895
+ className: "pr-5",
896
+ columnSpacing: 1,
897
+ columns: getFilterGridColumns(Boolean(m640), Boolean(m1120)),
898
+ children: allInputs.map((field, index) => renderField(field, index))
899
+ }
900
+ ),
901
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-end space-x-4 pr-4 pt-4", children: [
902
+ onClear && /* @__PURE__ */ jsx(
903
+ Button,
904
+ {
905
+ radius: "sm",
906
+ color: "#253E56",
907
+ variant: "outline",
908
+ onClick: onClear,
909
+ size: "xs",
910
+ children: "LIMPAR FILTROS"
911
+ }
912
+ ),
913
+ onSubmit && /* @__PURE__ */ jsx(
914
+ Button,
915
+ {
916
+ size: "xs",
917
+ radius: "sm",
918
+ type: "submit",
919
+ variant: "filled",
920
+ color: "var(--primary-color)",
921
+ children: "PESQUISAR"
922
+ }
923
+ )
924
+ ] })
925
+ ]
926
+ }
927
+ )
928
+ }
929
+ );
930
+ };
931
+ var filter_default = FilterDrawer;
932
+ var Filter = ({
933
+ title,
934
+ inputs,
935
+ onClear,
936
+ onSubmit,
937
+ inputSelect
938
+ }) => {
939
+ const [open, setOpen] = useState(false);
940
+ const hasFields = hasFilterFields(inputs, inputSelect);
941
+ return /* @__PURE__ */ jsxs("div", { children: [
942
+ /* @__PURE__ */ jsx(card_default2, { title, setOpen, renderFilter: hasFields }),
943
+ /* @__PURE__ */ jsx(
944
+ filter_default,
945
+ {
946
+ open,
947
+ inputs,
948
+ setOpen,
949
+ onClear,
950
+ onSubmit,
951
+ inputSelect
952
+ }
953
+ )
954
+ ] });
955
+ };
956
+ var filter_default2 = Filter;
957
+
958
+ export { Tab, Tabs, card_default, data_table_default, dialog_default, filterInputSelect, filter_default2 as filter_default, input_default, input_select_default };
959
+ //# sourceMappingURL=chunk-OFMJB5WP.mjs.map
960
+ //# sourceMappingURL=chunk-OFMJB5WP.mjs.map