@grazziotin/react-components-next 0.1.0 → 1.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.
package/dist/index.js CHANGED
@@ -1,15 +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');
5
12
 
6
13
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
7
14
 
8
- var React__default = /*#__PURE__*/_interopDefault(React);
15
+ var DialogMui__default = /*#__PURE__*/_interopDefault(DialogMui);
16
+ var DialogTitle__default = /*#__PURE__*/_interopDefault(DialogTitle);
17
+ var DialogActions__default = /*#__PURE__*/_interopDefault(DialogActions);
18
+ var DialogContent__default = /*#__PURE__*/_interopDefault(DialogContent);
9
19
 
10
20
  var __defProp = Object.defineProperty;
11
- var __defProps = Object.defineProperties;
12
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
13
21
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
14
22
  var __hasOwnProp = Object.prototype.hasOwnProperty;
15
23
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
@@ -25,391 +33,185 @@ var __spreadValues = (a, b) => {
25
33
  }
26
34
  return a;
27
35
  };
28
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
29
- var __objRest = (source, exclude) => {
30
- var target = {};
31
- for (var prop in source)
32
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
33
- target[prop] = source[prop];
34
- if (source != null && __getOwnPropSymbols)
35
- for (var prop of __getOwnPropSymbols(source)) {
36
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
37
- target[prop] = source[prop];
38
- }
39
- return target;
40
- };
41
36
 
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);
37
+ // #style-inject:#style-inject
38
+ function styleInject(css, { insertAt } = {}) {
39
+ if (typeof document === "undefined") return;
40
+ const head = document.head || document.getElementsByTagName("head")[0];
41
+ const style = document.createElement("style");
42
+ style.type = "text/css";
43
+ if (insertAt === "top") {
44
+ if (head.firstChild) {
45
+ head.insertBefore(style, head.firstChild);
46
+ } else {
47
+ head.appendChild(style);
54
48
  }
49
+ } else {
50
+ head.appendChild(style);
51
+ }
52
+ if (style.styleSheet) {
53
+ style.styleSheet.cssText = css;
54
+ } else {
55
+ style.appendChild(document.createTextNode(css));
55
56
  }
56
- return result.join(" ").replace(/\s+/g, " ").trim();
57
- }
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;
93
- 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), {
108
- 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 })
112
- ]
113
- })
114
- );
115
- }
116
- function Spinner({ size }) {
117
- const spinnerSize = size === "sm" ? "h-3 w-3" : size === "lg" ? "h-5 w-5" : "h-4 w-4";
118
- return /* @__PURE__ */ jsxRuntime.jsxs(
119
- "svg",
120
- {
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",
125
- 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
- )
145
- ]
146
- }
147
- );
148
- }
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"
153
- };
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 }),
188
- /* @__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)
204
- ),
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"
221
- };
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
248
- )
249
- }, props), {
250
- children
251
- })
252
- );
253
57
  }
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 }));
58
+
59
+ // src/styles/tailwind-output.css
60
+ 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-400:oklch(79.2% .209 151.711);\n --color-green-500:oklch(72.3% .219 149.579);\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 --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-screen {\n min-height: 100vh;\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-red-600 {\n background-color: var(--color-red-600);\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-white {\n color: var(--color-white);\n }\n .underline {\n text-decoration-line: underline;\n }\n .antialiased {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\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');
61
+ function cn(...values) {
62
+ return tailwindMerge.twMerge(clsx.clsx(values));
257
63
  }
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
- );
64
+
65
+ // src/functions/nvl/nvl.ts
66
+ function nvl(value, defaultValue) {
67
+ return value != null ? value : defaultValue;
268
68
  }
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 }));
69
+
70
+ // src/core/remove-digits.ts
71
+ function removeDigits(value) {
72
+ return value.replace(/\D/g, "");
278
73
  }
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 }));
74
+
75
+ // src/functions/format-cpf-cnpj/format-cpf-cnpj.ts
76
+ function formatCpfCnpj(data) {
77
+ if (!data) return "";
78
+ const value = removeDigits(data);
79
+ if (!value) return "";
80
+ if (value.length <= 11) {
81
+ const cpf = value.slice(0, 11);
82
+ return cpf.replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d{1,2})$/, "$1-$2");
83
+ }
84
+ const cnpj = value.slice(0, 14);
85
+ 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");
288
86
  }
289
- function CardFooter(_a) {
290
- var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
291
- return /* @__PURE__ */ jsxRuntime.jsx(
292
- "div",
293
- __spreadProps(__spreadValues({
294
- className: cn("mt-4 flex items-center gap-2", className)
295
- }, props), {
296
- children
297
- })
298
- );
87
+
88
+ // src/functions/format-phone-br/format-phone-br.ts
89
+ function formatPhoneBr(phone) {
90
+ if (!phone) return "";
91
+ const digits = removeDigits(phone).slice(0, 11);
92
+ if (!digits) return "";
93
+ if (digits.length <= 2) return digits;
94
+ if (digits.length <= 6) {
95
+ return digits.replace(/(\d{2})(\d+)/, "($1) $2");
96
+ }
97
+ if (digits.length <= 10) {
98
+ return digits.replace(/(\d{2})(\d{4})(\d+)/, "($1) $2-$3");
99
+ }
100
+ return digits.replace(/(\d{2})(\d{5})(\d+)/, "($1) $2-$3");
299
101
  }
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
- ]);
102
+ function Card({
103
+ margin,
104
+ onClick,
105
+ title,
106
+ toolTip,
107
+ className,
108
+ borderTitle,
109
+ children,
110
+ borderRadius,
111
+ width = "100%",
112
+ height = "auto",
113
+ titleWidth = "100%",
114
+ justifyContent = "space-between",
115
+ titleColor = "var(--color-primary)",
116
+ icon
117
+ }) {
328
118
  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), {
119
+ material.Box,
120
+ {
121
+ onClick,
122
+ className: cn(className, "text-sm!"),
123
+ sx: __spreadValues({
124
+ width,
125
+ margin,
126
+ height,
127
+ borderRadius,
128
+ "@media (max-width: 768px)": { width: "100%" },
129
+ boxShadow: "0 0.15rem 0.5rem rgba(0, 0, 0, 0.16)"
130
+ }, onClick && { cursor: "pointer !important" }),
337
131
  children: [
338
- dot && /* @__PURE__ */ jsxRuntime.jsx(
339
- "span",
132
+ /* @__PURE__ */ jsxRuntime.jsxs(
133
+ material.Box,
340
134
  {
341
- className: cn("h-1.5 w-1.5 rounded-full", dotStyles[variant])
135
+ sx: {
136
+ justifyContent,
137
+ height: "24px",
138
+ color: "white",
139
+ display: "flex",
140
+ width: titleWidth,
141
+ overflow: "hidden",
142
+ padding: "0px 15px",
143
+ alignItems: "center",
144
+ flexDirection: "row",
145
+ borderRadius: borderTitle,
146
+ backgroundColor: titleColor
147
+ },
148
+ children: [
149
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 font-semibold! truncate!", children: /* @__PURE__ */ jsxRuntime.jsx(
150
+ core.Tooltip,
151
+ {
152
+ withArrow: true,
153
+ radius: "md",
154
+ label: title,
155
+ arrowSize: 6,
156
+ position: "top",
157
+ arrowOffset: 15,
158
+ disabled: !toolTip,
159
+ color: titleColor,
160
+ classNames: { tooltip: "text-xs!" },
161
+ offset: { mainAxis: 11, crossAxis: -21 },
162
+ transitionProps: { transition: "fade", duration: 100 },
163
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block! truncate!", children: title })
164
+ }
165
+ ) }),
166
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: icon })
167
+ ]
342
168
  }
343
169
  ),
344
170
  children
345
171
  ]
346
- })
172
+ }
347
173
  );
348
174
  }
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"
175
+ var card_default = Card;
176
+
177
+ // src/components/ui/dialog/utils/constants.ts
178
+ var DIALOG_BACKDROP_STYLE = {
179
+ backdropFilter: "blur(4px)",
180
+ backgroundColor: "rgba(0, 0, 0, 0.5)"
355
181
  };
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
- })
182
+ function Dialog({
183
+ open,
184
+ title,
185
+ onClose,
186
+ actions,
187
+ children,
188
+ maxWidth,
189
+ blurBackdrop = false
190
+ }) {
191
+ const backdropStyle = blurBackdrop ? DIALOG_BACKDROP_STYLE : {};
192
+ return /* @__PURE__ */ jsxRuntime.jsxs(
193
+ DialogMui__default.default,
194
+ {
195
+ fullWidth: true,
196
+ open,
197
+ onClose,
198
+ maxWidth,
199
+ slotProps: { backdrop: { sx: backdropStyle } },
200
+ children: [
201
+ title && /* @__PURE__ */ jsxRuntime.jsx(DialogTitle__default.default, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold text-black-de", children: title }) }),
202
+ /* @__PURE__ */ jsxRuntime.jsx(DialogContent__default.default, { className: "text-black", children }),
203
+ actions && /* @__PURE__ */ jsxRuntime.jsx(DialogActions__default.default, { children: actions })
204
+ ]
205
+ }
401
206
  );
402
207
  }
208
+ var dialog_default = Dialog;
403
209
 
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;
210
+ exports.Card = card_default;
211
+ exports.Dialog = dialog_default;
212
+ exports.cn = cn;
213
+ exports.formatCpfCnpj = formatCpfCnpj;
214
+ exports.formatPhoneBr = formatPhoneBr;
215
+ exports.nvl = nvl;
414
216
  //# sourceMappingURL=index.js.map
415
217
  //# sourceMappingURL=index.js.map