@grazziotin/react-components-next 0.1.0 → 1.0.1

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
@@ -1,11 +1,23 @@
1
1
  'use strict';
2
2
 
3
+ var tailwindMerge = require('tailwind-merge');
4
+ var clsx = require('clsx');
5
+ var material = require('@mui/material');
6
+ var core = require('@mantine/core');
3
7
  var jsxRuntime = require('react/jsx-runtime');
4
- var React = require('react');
8
+ var DialogMui = require('@mui/material/Dialog');
9
+ var DialogTitle = require('@mui/material/DialogTitle');
10
+ var DialogActions = require('@mui/material/DialogActions');
11
+ var DialogContent = require('@mui/material/DialogContent');
12
+ var locales = require('@mui/x-data-grid/locales');
13
+ var xDataGrid = require('@mui/x-data-grid');
5
14
 
6
15
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
7
16
 
8
- var React__default = /*#__PURE__*/_interopDefault(React);
17
+ var DialogMui__default = /*#__PURE__*/_interopDefault(DialogMui);
18
+ var DialogTitle__default = /*#__PURE__*/_interopDefault(DialogTitle);
19
+ var DialogActions__default = /*#__PURE__*/_interopDefault(DialogActions);
20
+ var DialogContent__default = /*#__PURE__*/_interopDefault(DialogContent);
9
21
 
10
22
  var __defProp = Object.defineProperty;
11
23
  var __defProps = Object.defineProperties;
@@ -39,377 +51,532 @@ var __objRest = (source, exclude) => {
39
51
  return target;
40
52
  };
41
53
 
42
- // src/lib/utils.ts
43
- function cn(...inputs) {
44
- const result = [];
45
- for (const input of inputs) {
46
- if (!input && input !== 0) continue;
47
- if (typeof input === "string") {
48
- result.push(input);
49
- } else if (typeof input === "number" || typeof input === "bigint") {
50
- result.push(String(input));
51
- } else if (Array.isArray(input)) {
52
- const nested = cn(...input);
53
- if (nested) result.push(nested);
54
+ // #style-inject:#style-inject
55
+ function styleInject(css, { insertAt } = {}) {
56
+ if (typeof document === "undefined") return;
57
+ const head = document.head || document.getElementsByTagName("head")[0];
58
+ const style = document.createElement("style");
59
+ style.type = "text/css";
60
+ if (insertAt === "top") {
61
+ if (head.firstChild) {
62
+ head.insertBefore(style, head.firstChild);
63
+ } else {
64
+ head.appendChild(style);
54
65
  }
66
+ } else {
67
+ head.appendChild(style);
68
+ }
69
+ if (style.styleSheet) {
70
+ style.styleSheet.cssText = css;
71
+ } else {
72
+ style.appendChild(document.createTextNode(css));
55
73
  }
56
- return result.join(" ").replace(/\s+/g, " ").trim();
57
74
  }
58
- var variantStyles = {
59
- primary: "bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 focus-visible:ring-blue-500",
60
- secondary: "bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 focus-visible:ring-gray-400",
61
- outline: "border border-gray-300 bg-transparent text-gray-900 hover:bg-gray-50 active:bg-gray-100 focus-visible:ring-gray-400",
62
- ghost: "bg-transparent text-gray-700 hover:bg-gray-100 active:bg-gray-200 focus-visible:ring-gray-400",
63
- destructive: "bg-red-600 text-white hover:bg-red-700 active:bg-red-800 focus-visible:ring-red-500"
64
- };
65
- var sizeStyles = {
66
- sm: "h-8 px-3 text-sm gap-1.5",
67
- md: "h-10 px-4 text-sm gap-2",
68
- lg: "h-12 px-6 text-base gap-2.5"
69
- };
70
- function Button(_a) {
71
- var _b = _a, {
72
- variant = "primary",
73
- size = "md",
74
- loading = false,
75
- leftIcon,
76
- rightIcon,
77
- fullWidth = false,
78
- children,
79
- className,
80
- disabled
81
- } = _b, props = __objRest(_b, [
82
- "variant",
83
- "size",
84
- "loading",
85
- "leftIcon",
86
- "rightIcon",
87
- "fullWidth",
88
- "children",
89
- "className",
90
- "disabled"
91
- ]);
92
- const isDisabled = disabled || loading;
75
+
76
+ // src/styles/tailwind-output.css
77
+ 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-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 --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-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-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}\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 .block {\n display: block;\n }\n .block\\! {\n display: block !important;\n }\n .flex {\n display: flex;\n }\n .hidden {\n display: none;\n }\n .inline-block {\n display: inline-block;\n }\n .table {\n display: table;\n }\n .min-h-\\[210px\\]\\! {\n min-height: 210px !important;\n }\n .min-h-screen {\n min-height: 100vh;\n }\n .max-w-3xl {\n max-width: var(--container-3xl);\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-center {\n justify-content: center;\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-3 {\n gap: calc(var(--spacing) * 3);\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 .rounded {\n border-radius: .25rem;\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\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-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 .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 .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-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-black {\n color: var(--color-black);\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 {\n --tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);\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}\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');
78
+ function cn(...values) {
79
+ return tailwindMerge.twMerge(clsx.clsx(values));
80
+ }
81
+
82
+ // src/functions/nvl/nvl.ts
83
+ function nvl(value, defaultValue) {
84
+ return value != null ? value : defaultValue;
85
+ }
86
+
87
+ // src/core/remove-digits.ts
88
+ function removeDigits(value) {
89
+ return value.replace(/\D/g, "");
90
+ }
91
+
92
+ // src/functions/format-cpf-cnpj/format-cpf-cnpj.ts
93
+ function formatCpfCnpj(data) {
94
+ if (!data) return "";
95
+ const value = removeDigits(data);
96
+ if (!value) return "";
97
+ if (value.length <= 11) {
98
+ const cpf = value.slice(0, 11);
99
+ return cpf.replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d{1,2})$/, "$1-$2");
100
+ }
101
+ const cnpj = value.slice(0, 14);
102
+ return cnpj.replace(/^(\d{2})(\d)/, "$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/, "$1.$2.$3").replace(/\.(\d{3})(\d)/, ".$1/$2").replace(/(\d{4})(\d)/, "$1-$2");
103
+ }
104
+
105
+ // src/functions/format-phone-br/format-phone-br.ts
106
+ function formatPhoneBr(phone) {
107
+ if (!phone) return "";
108
+ const digits = removeDigits(phone).slice(0, 11);
109
+ if (!digits) return "";
110
+ if (digits.length <= 2) return digits;
111
+ if (digits.length <= 6) {
112
+ return digits.replace(/(\d{2})(\d+)/, "($1) $2");
113
+ }
114
+ if (digits.length <= 10) {
115
+ return digits.replace(/(\d{2})(\d{4})(\d+)/, "($1) $2-$3");
116
+ }
117
+ return digits.replace(/(\d{2})(\d{5})(\d+)/, "($1) $2-$3");
118
+ }
119
+ function Card({
120
+ margin,
121
+ onClick,
122
+ title,
123
+ toolTip,
124
+ className,
125
+ borderTitle,
126
+ children,
127
+ borderRadius,
128
+ width = "100%",
129
+ height = "auto",
130
+ titleWidth = "100%",
131
+ justifyContent = "space-between",
132
+ titleColor = "var(--primary-color)",
133
+ icon
134
+ }) {
93
135
  return /* @__PURE__ */ jsxRuntime.jsxs(
94
- "button",
95
- __spreadProps(__spreadValues({
96
- className: cn(
97
- "inline-flex items-center justify-center rounded-md font-medium",
98
- "transition-colors duration-150 ease-in-out",
99
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
100
- "disabled:pointer-events-none disabled:opacity-50",
101
- variantStyles[variant],
102
- sizeStyles[size],
103
- fullWidth && "w-full",
104
- className
105
- ),
106
- disabled: isDisabled
107
- }, props), {
136
+ material.Box,
137
+ {
138
+ onClick,
139
+ className: cn(className, "text-sm!"),
140
+ sx: __spreadValues({
141
+ width,
142
+ margin,
143
+ height,
144
+ borderRadius,
145
+ "@media (max-width: 768px)": { width: "100%" },
146
+ boxShadow: "0 0.15rem 0.5rem rgba(0, 0, 0, 0.16)"
147
+ }, onClick && { cursor: "pointer !important" }),
108
148
  children: [
109
- loading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size }) : leftIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: leftIcon }),
110
- children,
111
- !loading && rightIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: rightIcon })
149
+ /* @__PURE__ */ jsxRuntime.jsxs(
150
+ material.Box,
151
+ {
152
+ sx: {
153
+ justifyContent,
154
+ height: "24px",
155
+ color: "white",
156
+ display: "flex",
157
+ width: titleWidth,
158
+ overflow: "hidden",
159
+ padding: "0px 15px",
160
+ alignItems: "center",
161
+ flexDirection: "row",
162
+ borderRadius: borderTitle,
163
+ backgroundColor: titleColor
164
+ },
165
+ children: [
166
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 font-semibold! truncate!", children: /* @__PURE__ */ jsxRuntime.jsx(
167
+ core.Tooltip,
168
+ {
169
+ withArrow: true,
170
+ radius: "md",
171
+ label: title,
172
+ arrowSize: 6,
173
+ position: "top",
174
+ arrowOffset: 15,
175
+ disabled: !toolTip,
176
+ color: titleColor,
177
+ classNames: { tooltip: "text-xs!" },
178
+ offset: { mainAxis: 11, crossAxis: -21 },
179
+ transitionProps: { transition: "fade", duration: 100 },
180
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block! truncate!", children: title })
181
+ }
182
+ ) }),
183
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: icon })
184
+ ]
185
+ }
186
+ ),
187
+ children
112
188
  ]
113
- })
189
+ }
114
190
  );
115
191
  }
116
- function Spinner({ size }) {
117
- const spinnerSize = size === "sm" ? "h-3 w-3" : size === "lg" ? "h-5 w-5" : "h-4 w-4";
192
+ var card_default = Card;
193
+
194
+ // src/components/ui/dialog/utils/constants.ts
195
+ var DIALOG_BACKDROP_STYLE = {
196
+ backdropFilter: "blur(4px)",
197
+ backgroundColor: "rgba(0, 0, 0, 0.5)"
198
+ };
199
+ var DIALOG_PAPER_FONT_SX = {
200
+ fontFamily: "var(--font-family, inherit) !important",
201
+ "& .MuiDialogTitle-root, & .MuiDialogContent-root, & .MuiDialogActions-root, & .MuiTypography-root": {
202
+ fontFamily: "inherit !important"
203
+ }
204
+ };
205
+ function Dialog({
206
+ open,
207
+ title,
208
+ onClose,
209
+ actions,
210
+ children,
211
+ maxWidth,
212
+ blurBackdrop = false
213
+ }) {
214
+ const backdropStyle = blurBackdrop ? DIALOG_BACKDROP_STYLE : {};
118
215
  return /* @__PURE__ */ jsxRuntime.jsxs(
119
- "svg",
216
+ DialogMui__default.default,
120
217
  {
121
- className: cn("animate-spin shrink-0", spinnerSize),
122
- xmlns: "http://www.w3.org/2000/svg",
123
- fill: "none",
124
- viewBox: "0 0 24 24",
218
+ fullWidth: true,
219
+ open,
220
+ onClose,
221
+ maxWidth,
222
+ slotProps: {
223
+ backdrop: { sx: backdropStyle },
224
+ paper: { sx: DIALOG_PAPER_FONT_SX }
225
+ },
125
226
  children: [
126
- /* @__PURE__ */ jsxRuntime.jsx(
127
- "circle",
128
- {
129
- className: "opacity-25",
130
- cx: "12",
131
- cy: "12",
132
- r: "10",
133
- stroke: "currentColor",
134
- strokeWidth: "4"
135
- }
136
- ),
137
- /* @__PURE__ */ jsxRuntime.jsx(
138
- "path",
139
- {
140
- className: "opacity-75",
141
- fill: "currentColor",
142
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
143
- }
144
- )
227
+ title && /* @__PURE__ */ jsxRuntime.jsx(DialogTitle__default.default, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold text-black-de", children: title }) }),
228
+ /* @__PURE__ */ jsxRuntime.jsx(DialogContent__default.default, { className: "text-black", children }),
229
+ actions && /* @__PURE__ */ jsxRuntime.jsx(DialogActions__default.default, { children: actions })
145
230
  ]
146
231
  }
147
232
  );
148
233
  }
149
- var sizeStyles2 = {
150
- sm: "h-8 px-2.5 text-sm",
151
- md: "h-10 px-3 text-sm",
152
- lg: "h-12 px-4 text-base"
234
+ var dialog_default = Dialog;
235
+ var localeText = __spreadProps(__spreadValues({}, locales.ptBR.components.MuiDataGrid.defaultProps.localeText), {
236
+ noColumnsOverlayLabel: "Nenhuma coluna dispon\xEDvel",
237
+ noColumnsOverlayManageColumns: "Gerenciar colunas",
238
+ columnsManagementSearchTitle: "Buscar coluna",
239
+ columnsManagementNoColumns: "Nenhuma coluna para mostrar",
240
+ columnsManagementShowHideAllText: "Mostrar/Ocultar todas",
241
+ columnsManagementReset: "Redefinir",
242
+ columnsManagementDeleteIconLabel: "Excluir",
243
+ columnMenuManageColumns: "Gerenciar colunas",
244
+ columnMenuShowColumns: "Mostrar colunas",
245
+ columnMenuLabel: "Menu da coluna",
246
+ columnMenuHideColumn: "Ocultar",
247
+ columnMenuUnsort: "Remover ordena\xE7\xE3o",
248
+ columnMenuSortAsc: "Ordenar ASC",
249
+ columnMenuSortDesc: "Ordenar DESC",
250
+ columnMenuFilter: "Filtrar",
251
+ toolbarQuickFilterLabel: "Filtro r\xE1pido",
252
+ toolbarQuickFilterPlaceholder: "Filtrar\u2026",
253
+ toolbarQuickFilterDeleteIconLabel: "Limpar filtro",
254
+ toolbarExport: "Exportar",
255
+ toolbarExportLabel: "Exportar",
256
+ toolbarExportCSV: "Baixar como CSV",
257
+ toolbarExportPrint: "Imprimir",
258
+ toolbarColumns: "Colunas",
259
+ toolbarColumnsLabel: "Selecionar colunas",
260
+ toolbarFilters: "Filtros",
261
+ toolbarFiltersLabel: "Mostrar filtros",
262
+ toolbarFiltersTooltipHide: "Ocultar filtros",
263
+ toolbarFiltersTooltipShow: "Mostrar filtros",
264
+ toolbarFiltersTooltipActive: (count) => count === 1 ? `${count} filtro ativo` : `${count} filtros ativos`,
265
+ toolbarDensity: "Densidade",
266
+ toolbarDensityLabel: "Densidade",
267
+ toolbarDensityCompact: "Compacta",
268
+ toolbarDensityStandard: "Padr\xE3o",
269
+ toolbarDensityComfortable: "Confort\xE1vel",
270
+ filterPanelAddFilter: "Adicionar filtro",
271
+ filterPanelDeleteIconLabel: "Excluir",
272
+ filterPanelOperatorAnd: "E",
273
+ filterPanelOperatorOr: "OU",
274
+ filterPanelColumn: "Colunas",
275
+ filterPanelInputLabel: "Valor",
276
+ filterPanelInputPlaceholder: "Valor do filtro",
277
+ filterOperatorContains: "cont\xE9m",
278
+ filterOperatorEquals: "igual a",
279
+ filterOperatorStartsWith: "come\xE7a com",
280
+ filterOperatorEndsWith: "termina com",
281
+ filterOperatorIs: "\xE9",
282
+ filterOperatorNot: "n\xE3o \xE9",
283
+ filterOperatorAfter: "depois de",
284
+ filterOperatorOnOrAfter: "em ou depois de",
285
+ filterOperatorBefore: "antes de",
286
+ filterOperatorOnOrBefore: "em ou antes de",
287
+ filterOperatorIsEmpty: "est\xE1 vazio",
288
+ filterOperatorIsNotEmpty: "n\xE3o est\xE1 vazio",
289
+ filterOperatorIsAnyOf: "\xE9 qualquer um de",
290
+ footerTotalRows: "Total de linhas:",
291
+ footerRowSelected: (count) => count === 1 ? "1 linha selecionada" : `${count.toLocaleString()} linhas selecionadas`,
292
+ footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} de ${totalCount.toLocaleString()}`,
293
+ paginationRowsPerPage: "Linhas por p\xE1gina:",
294
+ paginationItemAriaLabel: (type) => {
295
+ switch (type) {
296
+ case "first":
297
+ return "Primeira p\xE1gina";
298
+ case "last":
299
+ return "\xDAltima p\xE1gina";
300
+ case "next":
301
+ return "Pr\xF3xima p\xE1gina";
302
+ case "previous":
303
+ return "P\xE1gina anterior";
304
+ default:
305
+ return "";
306
+ }
307
+ },
308
+ noRowsLabel: "Nenhum dado encontrado",
309
+ noResultsOverlayLabel: "Nenhum resultado encontrado",
310
+ checkboxSelectionHeaderName: "Sele\xE7\xE3o de checkbox",
311
+ checkboxSelectionSelectAllRows: "Selecionar todas as linhas",
312
+ checkboxSelectionUnselectAllRows: "Desmarcar todas as linhas",
313
+ checkboxSelectionSelectRow: "Selecionar linha",
314
+ checkboxSelectionUnselectRow: "Desmarcar linha",
315
+ columnHeaderSortIconLabel: "Ordenar",
316
+ groupingColumnHeaderName: "Grupo",
317
+ groupColumn: (name) => `Agrupar por ${name}`,
318
+ unGroupColumn: (name) => `Parar de agrupar por ${name}`,
319
+ detailPanelToggle: "Alternar painel de detalhes",
320
+ expandDetailPanel: "Expandir",
321
+ collapseDetailPanel: "Recolher",
322
+ treeDataGroupingHeaderName: "Grupo",
323
+ treeDataExpand: "ver filhos",
324
+ treeDataCollapse: "ocultar filhos",
325
+ aggregationMenuItemHeader: "Agrega\xE7\xE3o",
326
+ aggregationFunctionLabelSum: "soma",
327
+ aggregationFunctionLabelAvg: "m\xE9dia",
328
+ aggregationFunctionLabelMin: "m\xEDn",
329
+ aggregationFunctionLabelMax: "m\xE1x",
330
+ aggregationFunctionLabelSize: "tamanho",
331
+ paginationDisplayedRows: ({ from, to, count }) => {
332
+ const total = count === -1 ? "mais de " + to : count;
333
+ return `${from}\u2013${to} de ${total}`;
334
+ }
335
+ });
336
+ var columnPanelSx = {
337
+ padding: 2,
338
+ width: "350px",
339
+ color: "#000000DE"
153
340
  };
154
- function Input(_a) {
155
- var _b = _a, {
156
- label,
157
- hint,
158
- error,
159
- size = "md",
160
- leftAddon,
161
- rightAddon,
162
- fullWidth = false,
163
- className,
164
- id
165
- } = _b, props = __objRest(_b, [
166
- "label",
167
- "hint",
168
- "error",
169
- "size",
170
- "leftAddon",
171
- "rightAddon",
172
- "fullWidth",
173
- "className",
174
- "id"
175
- ]);
176
- const inputId = id != null ? id : label == null ? void 0 : label.toLowerCase().replace(/\s+/g, "-");
177
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-1.5", fullWidth && "w-full"), children: [
178
- label && /* @__PURE__ */ jsxRuntime.jsx(
179
- "label",
180
- {
181
- htmlFor: inputId,
182
- className: "text-sm font-medium text-gray-700",
183
- children: label
184
- }
185
- ),
186
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center", children: [
187
- leftAddon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-3 flex items-center text-gray-500", children: leftAddon }),
341
+ var columnMenuSx = {
342
+ "& .MuiListItemText-primary": {
343
+ fontSize: "14px !important"
344
+ }
345
+ };
346
+ var filterSx = {
347
+ width: "750px",
348
+ "*": { fontSize: "14px !important" },
349
+ "& .MuiDataGrid-filterFormColumnInput": { width: "230px" },
350
+ "& .MuiDataGrid-filterFormOperatorInput": { width: "230px" }
351
+ };
352
+ var paginationSx = {
353
+ "& .MuiTablePagination-root": { fontSize: "12px !important" },
354
+ "& .MuiTablePagination-selectLabel": { fontSize: "12px !important" },
355
+ "& .MuiTablePagination-displayedRows": { fontSize: "12px !important" },
356
+ "& .MuiTablePagination-select": { fontSize: "12px !important" },
357
+ "& .MuiTablePagination-toolbar": {
358
+ minHeight: "40px !important",
359
+ padding: "0 8px !important"
360
+ }
361
+ };
362
+ var tableSx = {
363
+ fontSize: "13px",
364
+ "& .MuiDataGrid-row:nth-of-type(even)": {
365
+ backgroundColor: "#F9FAFB"
366
+ },
367
+ "& .MuiDataGrid-row:nth-of-type(odd)": {
368
+ backgroundColor: "#FFFFFF"
369
+ },
370
+ "& .MuiDataGrid-row.Mui-selected:nth-of-type(even)": {
371
+ backgroundColor: "#F9FAFB !important"
372
+ },
373
+ "& .MuiDataGrid-row.Mui-selected:nth-of-type(odd)": {
374
+ backgroundColor: "#FFFFFF !important"
375
+ },
376
+ "& .MuiDataGrid-row:hover": { backgroundColor: "#F3F4F6 !important" },
377
+ "& .MuiDataGrid-columnHeaderTitleContainer": {
378
+ color: "#FFFFFF",
379
+ justifyContent: "center",
380
+ "& svg": { color: "#FFFFFF" }
381
+ },
382
+ "& .MuiDataGrid-iconButtonContainer .MuiIconButton-root, & .MuiDataGrid-menuIconButton": {
383
+ color: "#FFFFFF"
384
+ },
385
+ "& .MuiDataGrid-iconButtonContainer .MuiIconButton-root:hover, & .MuiDataGrid-menuIconButton:hover": { backgroundColor: "transparent" },
386
+ "& .MuiDataGrid-iconButtonContainer .MuiIconButton-root.Mui-focusVisible, & .MuiDataGrid-menuIconButton.Mui-focusVisible": { backgroundColor: "transparent" },
387
+ "& .MuiDataGrid-columnHeaders": {
388
+ background: "linear-gradient(to right, #00B2A6 0%, #0AAEB2 100%)"
389
+ },
390
+ "& .MuiDataGrid-columnHeader": {
391
+ color: "#FFFFFF",
392
+ fontWeight: "bold",
393
+ backgroundColor: "transparent",
394
+ "& svg": { color: "#FFFFFF" }
395
+ },
396
+ "& .MuiDataGrid-columnHeader:hover": { backgroundColor: "transparent" },
397
+ "& .MuiDataGrid-columnHeader:hover .MuiIconButton-root": {
398
+ backgroundColor: "transparent"
399
+ },
400
+ "& .MuiDataGrid-columnHeader:focus-within": {
401
+ backgroundColor: "transparent"
402
+ },
403
+ "& .MuiDataGrid-columnHeader--sorted": { backgroundColor: "transparent" },
404
+ "& .MuiDataGrid-columnHeader--sorted .MuiIconButton-root": {
405
+ backgroundColor: "transparent"
406
+ },
407
+ "& .MuiDataGrid-sortIcon": { color: "#FFFFFF" },
408
+ "& .MuiDataGrid-sortIcon:hover": { backgroundColor: "transparent" },
409
+ "& .MuiDataGrid-columnHeaderTitle": { fontWeight: "500", color: "#FFFFFF" }
410
+ };
411
+ var createChange = (item, applyValue) => (index) => ({ target }) => {
412
+ const [start = "", end = ""] = Array.isArray(item.value) ? item.value : [];
413
+ applyValue(__spreadProps(__spreadValues({}, item), {
414
+ value: index === 0 ? [target.value, end] : [start, target.value]
415
+ }));
416
+ };
417
+ var textBetweenOp = {
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) return null;
424
+ return (value) => {
425
+ const cell = (value == null ? void 0 : value.toString()) || "";
426
+ return cell >= start && cell <= end;
427
+ };
428
+ },
429
+ InputComponent: ({ item, applyValue, focusElementRef }) => {
430
+ const onChange = createChange(item, applyValue);
431
+ return /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: [
188
432
  /* @__PURE__ */ jsxRuntime.jsx(
189
- "input",
190
- __spreadValues({
191
- id: inputId,
192
- className: cn(
193
- "w-full rounded-md border bg-white text-gray-900 placeholder:text-gray-400",
194
- "transition-colors duration-150",
195
- "focus:outline-none focus:ring-2 focus:ring-offset-0",
196
- "disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-500",
197
- sizeStyles2[size],
198
- error ? "border-red-400 focus:border-red-400 focus:ring-red-300" : "border-gray-300 focus:border-blue-500 focus:ring-blue-300",
199
- leftAddon && "pl-9",
200
- rightAddon && "pr-9",
201
- className
202
- )
203
- }, props)
433
+ material.TextField,
434
+ {
435
+ size: "small",
436
+ label: "De",
437
+ variant: "outlined",
438
+ inputRef: focusElementRef,
439
+ value: (item.value || ["", ""])[0] || "",
440
+ onChange: onChange(0),
441
+ placeholder: "Inicial"
442
+ }
204
443
  ),
205
- rightAddon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-3 flex items-center text-gray-500", children: rightAddon })
206
- ] }),
207
- (hint || error) && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-xs", error ? "text-red-500" : "text-gray-500"), children: error != null ? error : hint })
208
- ] });
209
- }
210
- var shadowStyles = {
211
- none: "",
212
- sm: "shadow-sm",
213
- md: "shadow-md",
214
- lg: "shadow-lg"
215
- };
216
- var paddingStyles = {
217
- none: "",
218
- sm: "p-4",
219
- md: "p-6",
220
- lg: "p-8"
444
+ /* @__PURE__ */ jsxRuntime.jsx(
445
+ material.TextField,
446
+ {
447
+ size: "small",
448
+ label: "At\xE9",
449
+ variant: "outlined",
450
+ value: (item.value || ["", ""])[1] || "",
451
+ onChange: onChange(1),
452
+ placeholder: "Final"
453
+ }
454
+ )
455
+ ] });
456
+ }
221
457
  };
222
- function Card(_a) {
223
- var _b = _a, {
224
- shadow = "sm",
225
- hoverable = false,
226
- bordered = true,
227
- padding = "md",
228
- className,
229
- children
230
- } = _b, props = __objRest(_b, [
231
- "shadow",
232
- "hoverable",
233
- "bordered",
234
- "padding",
235
- "className",
236
- "children"
237
- ]);
238
- return /* @__PURE__ */ jsxRuntime.jsx(
239
- "div",
240
- __spreadProps(__spreadValues({
241
- className: cn(
242
- "rounded-xl bg-white",
243
- shadowStyles[shadow],
244
- paddingStyles[padding],
245
- bordered && "border border-gray-200",
246
- hoverable && "cursor-pointer transition-shadow duration-200 hover:shadow-md",
247
- className
458
+ var numberBetweenOp = {
459
+ label: "entre",
460
+ value: "between",
461
+ getApplyFilterFn: (filter) => {
462
+ if (!filter.value || !Array.isArray(filter.value)) return null;
463
+ const [start, end] = filter.value;
464
+ if (start === "" || end === "" || start == null || end == null) return null;
465
+ return (value) => {
466
+ const number = Number(value);
467
+ return number >= Number(start) && number <= Number(end);
468
+ };
469
+ },
470
+ InputComponent: ({ item, applyValue, focusElementRef }) => {
471
+ const onChange = createChange(item, applyValue);
472
+ return /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: [
473
+ /* @__PURE__ */ jsxRuntime.jsx(
474
+ material.TextField,
475
+ {
476
+ size: "small",
477
+ label: "De",
478
+ type: "number",
479
+ variant: "outlined",
480
+ inputRef: focusElementRef,
481
+ value: (item.value || ["", ""])[0] || "",
482
+ onChange: onChange(0),
483
+ placeholder: "M\xEDnimo"
484
+ }
485
+ ),
486
+ /* @__PURE__ */ jsxRuntime.jsx(
487
+ material.TextField,
488
+ {
489
+ size: "small",
490
+ label: "At\xE9",
491
+ type: "number",
492
+ variant: "outlined",
493
+ value: (item.value || ["", ""])[1] || "",
494
+ onChange: onChange(1),
495
+ placeholder: "M\xE1ximo"
496
+ }
248
497
  )
249
- }, props), {
250
- children
251
- })
252
- );
498
+ ] });
499
+ }
500
+ };
501
+ var getTextOps = () => {
502
+ return [...xDataGrid.getGridStringOperators(), textBetweenOp];
503
+ };
504
+ var getNumberOps = () => {
505
+ return [...xDataGrid.getGridNumericOperators(), numberBetweenOp];
506
+ };
507
+ xDataGrid.GRID_STRING_COL_DEF.filterOperators = getTextOps();
508
+ xDataGrid.GRID_NUMERIC_COL_DEF.filterOperators = getNumberOps();
509
+ function CustomColumnsPanel(props) {
510
+ return /* @__PURE__ */ jsxRuntime.jsx(xDataGrid.GridColumnsPanel, __spreadProps(__spreadValues({}, props), { sx: columnPanelSx }));
253
511
  }
254
- function CardHeader(_a) {
255
- var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
256
- return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({ className: cn("mb-4 flex flex-col gap-1", className) }, props), { children }));
512
+ function CustomColumnMenu(props) {
513
+ return /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: columnMenuSx, children: /* @__PURE__ */ jsxRuntime.jsx(xDataGrid.GridColumnMenu, __spreadValues({}, props)) });
257
514
  }
258
- function CardTitle(_a) {
259
- var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
260
- return /* @__PURE__ */ jsxRuntime.jsx(
261
- "h3",
262
- __spreadProps(__spreadValues({
263
- className: cn("text-lg font-semibold text-gray-900", className)
264
- }, props), {
265
- children
266
- })
267
- );
515
+ function CustomFilterPanel(props) {
516
+ return /* @__PURE__ */ jsxRuntime.jsx(xDataGrid.GridFilterPanel, __spreadProps(__spreadValues({}, props), { sx: filterSx }));
268
517
  }
269
- function CardDescription(_a) {
270
- var _b = _a, {
271
- className,
272
- children
273
- } = _b, props = __objRest(_b, [
274
- "className",
275
- "children"
276
- ]);
277
- return /* @__PURE__ */ jsxRuntime.jsx("p", __spreadProps(__spreadValues({ className: cn("text-sm text-gray-500", className) }, props), { children }));
518
+ function CustomNoRowsOverlay() {
519
+ return /* @__PURE__ */ jsxRuntime.jsx(xDataGrid.GridOverlay, { children: /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { mt: 1 }, children: "Nenhum dado encontrado." }) });
278
520
  }
279
- function CardContent(_a) {
280
- var _b = _a, {
281
- className,
282
- children
283
- } = _b, props = __objRest(_b, [
284
- "className",
285
- "children"
286
- ]);
287
- return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({ className: cn("text-sm text-gray-700", className) }, props), { children }));
521
+ function CustomPagination() {
522
+ return /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: paginationSx, children: /* @__PURE__ */ jsxRuntime.jsx(xDataGrid.GridPagination, {}) });
288
523
  }
289
- function CardFooter(_a) {
290
- var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
291
- return /* @__PURE__ */ jsxRuntime.jsx(
292
- "div",
524
+ var DataTable = (_a) => {
525
+ var rest = __objRest(_a, []);
526
+ return /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { mb: 2, mt: 2, height: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx(
527
+ xDataGrid.DataGrid,
293
528
  __spreadProps(__spreadValues({
294
- className: cn("mt-4 flex items-center gap-2", className)
295
- }, props), {
296
- children
297
- })
298
- );
299
- }
300
- var variantStyles2 = {
301
- default: "bg-gray-100 text-gray-700",
302
- primary: "bg-blue-100 text-blue-700",
303
- success: "bg-green-100 text-green-700",
304
- warning: "bg-yellow-100 text-yellow-700",
305
- danger: "bg-red-100 text-red-700",
306
- info: "bg-sky-100 text-sky-700"
307
- };
308
- var dotStyles = {
309
- default: "bg-gray-500",
310
- primary: "bg-blue-500",
311
- success: "bg-green-500",
312
- warning: "bg-yellow-500",
313
- danger: "bg-red-500",
314
- info: "bg-sky-500"
315
- };
316
- function Badge(_a) {
317
- var _b = _a, {
318
- variant = "default",
319
- dot = false,
320
- className,
321
- children
322
- } = _b, props = __objRest(_b, [
323
- "variant",
324
- "dot",
325
- "className",
326
- "children"
327
- ]);
328
- return /* @__PURE__ */ jsxRuntime.jsxs(
329
- "span",
330
- __spreadProps(__spreadValues({
331
- className: cn(
332
- "inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium",
333
- variantStyles2[variant],
334
- className
335
- )
336
- }, props), {
337
- children: [
338
- dot && /* @__PURE__ */ jsxRuntime.jsx(
339
- "span",
340
- {
341
- className: cn("h-1.5 w-1.5 rounded-full", dotStyles[variant])
342
- }
343
- ),
344
- children
345
- ]
529
+ sx: tableSx
530
+ }, rest), {
531
+ className: "min-h-[210px]!",
532
+ localeText,
533
+ disableRowSelectionOnClick: true,
534
+ slotProps: {
535
+ loadingOverlay: {
536
+ variant: "linear-progress",
537
+ noRowsVariant: "skeleton"
538
+ }
539
+ },
540
+ slots: {
541
+ columnMenu: CustomColumnMenu,
542
+ filterPanel: CustomFilterPanel,
543
+ columnsPanel: CustomColumnsPanel,
544
+ noRowsOverlay: CustomNoRowsOverlay,
545
+ pagination: CustomPagination
546
+ }
346
547
  })
347
- );
348
- }
349
- var sizeStyles3 = {
350
- xs: "h-6 w-6 text-xs",
351
- sm: "h-8 w-8 text-sm",
352
- md: "h-10 w-10 text-sm",
353
- lg: "h-12 w-12 text-base",
354
- xl: "h-16 w-16 text-lg"
548
+ ) });
355
549
  };
356
- function getInitials(name) {
357
- return name.split(" ").slice(0, 2).map((word) => {
358
- var _a, _b;
359
- return (_b = (_a = word[0]) == null ? void 0 : _a.toUpperCase()) != null ? _b : "";
360
- }).join("");
361
- }
362
- function Avatar(_a) {
363
- var _b = _a, {
364
- src,
365
- alt = "",
366
- fallback,
367
- size = "md",
368
- className
369
- } = _b, props = __objRest(_b, [
370
- "src",
371
- "alt",
372
- "fallback",
373
- "size",
374
- "className"
375
- ]);
376
- const [imgError, setImgError] = React__default.default.useState(false);
377
- const showFallback = !src || imgError;
378
- const initials = fallback ? getInitials(fallback) : alt ? getInitials(alt) : "?";
379
- return /* @__PURE__ */ jsxRuntime.jsx(
380
- "span",
381
- __spreadProps(__spreadValues({
382
- className: cn(
383
- "relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-gray-200",
384
- sizeStyles3[size],
385
- className
386
- )
387
- }, props), {
388
- children: !showFallback ? (
389
- // eslint-disable-next-line @next/next/no-img-element
390
- /* @__PURE__ */ jsxRuntime.jsx(
391
- "img",
392
- {
393
- src,
394
- alt,
395
- className: "h-full w-full object-cover",
396
- onError: () => setImgError(true)
397
- }
398
- )
399
- ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-gray-600 select-none", children: initials })
400
- })
401
- );
402
- }
550
+ var data_table_default = DataTable;
551
+ var DEFAULT_TAB_COLOR = "var(--primary-color)";
552
+ var DEFAULT_TAB_FONT_FAMILY = "var(--font-family, inherit)";
553
+ var Tabs = material.styled(material.Tabs, {
554
+ shouldForwardProp: (prop) => prop !== "color"
555
+ })(({ color = DEFAULT_TAB_COLOR }) => ({
556
+ fontFamily: `${DEFAULT_TAB_FONT_FAMILY} !important`,
557
+ "& .MuiTabs-indicator": { backgroundColor: color }
558
+ }));
559
+ var Tab = material.styled(material.Tab, {
560
+ shouldForwardProp: (prop) => prop !== "color" && prop !== "fontFamily"
561
+ })(
562
+ ({ color = DEFAULT_TAB_COLOR, fontFamily = DEFAULT_TAB_FONT_FAMILY }) => ({
563
+ fontWeight: "500 !important",
564
+ color: "#000000CC !important",
565
+ fontSize: "14px !important",
566
+ textTransform: "uppercase !important",
567
+ fontFamily: `${fontFamily} !important`,
568
+ "&.Mui-selected": { color: `${color} !important` }
569
+ })
570
+ );
403
571
 
404
- exports.Avatar = Avatar;
405
- exports.Badge = Badge;
406
- exports.Button = Button;
407
- exports.Card = Card;
408
- exports.CardContent = CardContent;
409
- exports.CardDescription = CardDescription;
410
- exports.CardFooter = CardFooter;
411
- exports.CardHeader = CardHeader;
412
- exports.CardTitle = CardTitle;
413
- exports.Input = Input;
572
+ exports.Card = card_default;
573
+ exports.DataTable = data_table_default;
574
+ exports.Dialog = dialog_default;
575
+ exports.Tab = Tab;
576
+ exports.Tabs = Tabs;
577
+ exports.cn = cn;
578
+ exports.formatCpfCnpj = formatCpfCnpj;
579
+ exports.formatPhoneBr = formatPhoneBr;
580
+ exports.nvl = nvl;
414
581
  //# sourceMappingURL=index.js.map
415
582
  //# sourceMappingURL=index.js.map