@c-rex/ui 0.0.11 → 0.0.13
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/package.json +34 -54
- package/src/alert.tsx +58 -0
- package/src/breadcrumb.tsx +115 -0
- package/src/button.tsx +66 -0
- package/src/command.tsx +151 -0
- package/src/dialog.tsx +122 -0
- package/src/hooks/use-mobile.tsx +19 -0
- package/src/input.tsx +22 -0
- package/src/popover.tsx +31 -0
- package/src/select.tsx +157 -0
- package/src/separator.tsx +29 -0
- package/src/sheet.tsx +140 -0
- package/src/sidebar.tsx +785 -0
- package/src/skeleton.tsx +15 -0
- package/src/table.tsx +120 -0
- package/src/tooltip.tsx +30 -0
- package/dist/alert.cjs.js +0 -197
- package/dist/alert.cjs.js.map +0 -1
- package/dist/alert.d.cts +0 -11
- package/dist/alert.d.ts +0 -11
- package/dist/alert.esm.js +0 -116
- package/dist/alert.esm.js.map +0 -1
- package/dist/breadcrumb.cjs.js +0 -299
- package/dist/breadcrumb.cjs.js.map +0 -1
- package/dist/breadcrumb.d.cts +0 -22
- package/dist/breadcrumb.d.ts +0 -22
- package/dist/breadcrumb.esm.js +0 -202
- package/dist/breadcrumb.esm.js.map +0 -1
- package/dist/button.cjs.js +0 -200
- package/dist/button.cjs.js.map +0 -1
- package/dist/button.d.cts +0 -15
- package/dist/button.d.ts +0 -15
- package/dist/button.esm.js +0 -123
- package/dist/button.esm.js.map +0 -1
- package/dist/command.cjs.js +0 -387
- package/dist/command.cjs.js.map +0 -1
- package/dist/command.d.cts +0 -83
- package/dist/command.d.ts +0 -83
- package/dist/command.esm.js +0 -282
- package/dist/command.esm.js.map +0 -1
- package/dist/dialog.cjs.js +0 -290
- package/dist/dialog.cjs.js.map +0 -1
- package/dist/dialog.d.cts +0 -22
- package/dist/dialog.d.ts +0 -22
- package/dist/dialog.esm.js +0 -181
- package/dist/dialog.esm.js.map +0 -1
- package/dist/hooks/use-mobile.cjs.js +0 -127
- package/dist/hooks/use-mobile.cjs.js.map +0 -1
- package/dist/hooks/use-mobile.d.cts +0 -3
- package/dist/hooks/use-mobile.d.ts +0 -3
- package/dist/hooks/use-mobile.esm.js +0 -66
- package/dist/hooks/use-mobile.esm.js.map +0 -1
- package/dist/input.cjs.js +0 -155
- package/dist/input.cjs.js.map +0 -1
- package/dist/input.d.cts +0 -5
- package/dist/input.d.ts +0 -5
- package/dist/input.esm.js +0 -82
- package/dist/input.esm.js.map +0 -1
- package/dist/popover.cjs.js +0 -175
- package/dist/popover.cjs.js.map +0 -1
- package/dist/popover.d.cts +0 -9
- package/dist/popover.d.ts +0 -9
- package/dist/popover.esm.js +0 -90
- package/dist/popover.esm.js.map +0 -1
- package/dist/select.cjs.js +0 -326
- package/dist/select.cjs.js.map +0 -1
- package/dist/select.d.cts +0 -15
- package/dist/select.d.ts +0 -15
- package/dist/select.esm.js +0 -217
- package/dist/select.esm.js.map +0 -1
- package/dist/separator.cjs.js +0 -158
- package/dist/separator.cjs.js.map +0 -1
- package/dist/separator.d.cts +0 -6
- package/dist/separator.d.ts +0 -6
- package/dist/separator.esm.js +0 -85
- package/dist/separator.esm.js.map +0 -1
- package/dist/sheet.cjs.js +0 -308
- package/dist/sheet.cjs.js.map +0 -1
- package/dist/sheet.d.cts +0 -29
- package/dist/sheet.d.ts +0 -29
- package/dist/sheet.esm.js +0 -199
- package/dist/sheet.esm.js.map +0 -1
- package/dist/sidebar.cjs.js +0 -1077
- package/dist/sidebar.cjs.js.map +0 -1
- package/dist/sidebar.d.cts +0 -72
- package/dist/sidebar.d.ts +0 -72
- package/dist/sidebar.esm.js +0 -912
- package/dist/sidebar.esm.js.map +0 -1
- package/dist/skeleton.cjs.js +0 -138
- package/dist/skeleton.cjs.js.map +0 -1
- package/dist/skeleton.d.cts +0 -5
- package/dist/skeleton.d.ts +0 -5
- package/dist/skeleton.esm.js +0 -76
- package/dist/skeleton.esm.js.map +0 -1
- package/dist/table.cjs.js +0 -254
- package/dist/table.cjs.js.map +0 -1
- package/dist/table.d.cts +0 -12
- package/dist/table.d.ts +0 -12
- package/dist/table.esm.js +0 -153
- package/dist/table.esm.js.map +0 -1
- package/dist/tooltip.cjs.js +0 -173
- package/dist/tooltip.cjs.js.map +0 -1
- package/dist/tooltip.d.cts +0 -9
- package/dist/tooltip.d.ts +0 -9
- package/dist/tooltip.esm.js +0 -88
- package/dist/tooltip.esm.js.map +0 -1
package/dist/dialog.d.cts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
4
|
-
|
|
5
|
-
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
6
|
-
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
8
|
-
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
-
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
declare const DialogHeader: {
|
|
12
|
-
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
13
|
-
displayName: string;
|
|
14
|
-
};
|
|
15
|
-
declare const DialogFooter: {
|
|
16
|
-
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
17
|
-
displayName: string;
|
|
18
|
-
};
|
|
19
|
-
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
20
|
-
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
21
|
-
|
|
22
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
package/dist/dialog.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
4
|
-
|
|
5
|
-
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
6
|
-
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
8
|
-
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
-
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
declare const DialogHeader: {
|
|
12
|
-
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
13
|
-
displayName: string;
|
|
14
|
-
};
|
|
15
|
-
declare const DialogFooter: {
|
|
16
|
-
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
17
|
-
displayName: string;
|
|
18
|
-
};
|
|
19
|
-
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
20
|
-
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
21
|
-
|
|
22
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
package/dist/dialog.esm.js
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
function _define_property(obj, key, value) {
|
|
3
|
-
if (key in obj) {
|
|
4
|
-
Object.defineProperty(obj, key, {
|
|
5
|
-
value: value,
|
|
6
|
-
enumerable: true,
|
|
7
|
-
configurable: true,
|
|
8
|
-
writable: true
|
|
9
|
-
});
|
|
10
|
-
} else {
|
|
11
|
-
obj[key] = value;
|
|
12
|
-
}
|
|
13
|
-
return obj;
|
|
14
|
-
}
|
|
15
|
-
function _object_spread(target) {
|
|
16
|
-
for(var i = 1; i < arguments.length; i++){
|
|
17
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
18
|
-
var ownKeys = Object.keys(source);
|
|
19
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
20
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
21
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
22
|
-
}));
|
|
23
|
-
}
|
|
24
|
-
ownKeys.forEach(function(key) {
|
|
25
|
-
_define_property(target, key, source[key]);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return target;
|
|
29
|
-
}
|
|
30
|
-
function ownKeys(object, enumerableOnly) {
|
|
31
|
-
var keys = Object.keys(object);
|
|
32
|
-
if (Object.getOwnPropertySymbols) {
|
|
33
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
34
|
-
if (enumerableOnly) {
|
|
35
|
-
symbols = symbols.filter(function(sym) {
|
|
36
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
keys.push.apply(keys, symbols);
|
|
40
|
-
}
|
|
41
|
-
return keys;
|
|
42
|
-
}
|
|
43
|
-
function _object_spread_props(target, source) {
|
|
44
|
-
source = source != null ? source : {};
|
|
45
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
46
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
47
|
-
} else {
|
|
48
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
49
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
return target;
|
|
53
|
-
}
|
|
54
|
-
function _object_without_properties(source, excluded) {
|
|
55
|
-
if (source == null) return {};
|
|
56
|
-
var target = _object_without_properties_loose(source, excluded);
|
|
57
|
-
var key, i;
|
|
58
|
-
if (Object.getOwnPropertySymbols) {
|
|
59
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
60
|
-
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
61
|
-
key = sourceSymbolKeys[i];
|
|
62
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
63
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
64
|
-
target[key] = source[key];
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return target;
|
|
68
|
-
}
|
|
69
|
-
function _object_without_properties_loose(source, excluded) {
|
|
70
|
-
if (source == null) return {};
|
|
71
|
-
var target = {};
|
|
72
|
-
var sourceKeys = Object.keys(source);
|
|
73
|
-
var key, i;
|
|
74
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
75
|
-
key = sourceKeys[i];
|
|
76
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
77
|
-
target[key] = source[key];
|
|
78
|
-
}
|
|
79
|
-
return target;
|
|
80
|
-
}
|
|
81
|
-
// src/dialog.tsx
|
|
82
|
-
import * as React from "react";
|
|
83
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
84
|
-
import { X } from "lucide-react";
|
|
85
|
-
// ../utils/src/classMerge.ts
|
|
86
|
-
import { clsx } from "clsx";
|
|
87
|
-
import { twMerge } from "tailwind-merge";
|
|
88
|
-
function cn() {
|
|
89
|
-
for(var _len = arguments.length, inputs = new Array(_len), _key = 0; _key < _len; _key++){
|
|
90
|
-
inputs[_key] = arguments[_key];
|
|
91
|
-
}
|
|
92
|
-
return twMerge(clsx(inputs));
|
|
93
|
-
}
|
|
94
|
-
// src/dialog.tsx
|
|
95
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
96
|
-
var Dialog = DialogPrimitive.Root;
|
|
97
|
-
var DialogTrigger = DialogPrimitive.Trigger;
|
|
98
|
-
var DialogPortal = DialogPrimitive.Portal;
|
|
99
|
-
var DialogClose = DialogPrimitive.Close;
|
|
100
|
-
var DialogOverlay = React.forwardRef(function(_param, ref) {
|
|
101
|
-
var className = _param.className, props = _object_without_properties(_param, [
|
|
102
|
-
"className"
|
|
103
|
-
]);
|
|
104
|
-
return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, _object_spread({
|
|
105
|
-
ref: ref,
|
|
106
|
-
className: cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className)
|
|
107
|
-
}, props));
|
|
108
|
-
});
|
|
109
|
-
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
110
|
-
var DialogContent = React.forwardRef(function(_param, ref) {
|
|
111
|
-
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
112
|
-
"className",
|
|
113
|
-
"children"
|
|
114
|
-
]);
|
|
115
|
-
return /* @__PURE__ */ jsxs(DialogPortal, {
|
|
116
|
-
children: [
|
|
117
|
-
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
118
|
-
/* @__PURE__ */ jsxs(DialogPrimitive.Content, _object_spread_props(_object_spread({
|
|
119
|
-
ref: ref,
|
|
120
|
-
className: cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className)
|
|
121
|
-
}, props), {
|
|
122
|
-
children: [
|
|
123
|
-
children,
|
|
124
|
-
/* @__PURE__ */ jsxs(DialogPrimitive.Close, {
|
|
125
|
-
className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
126
|
-
children: [
|
|
127
|
-
/* @__PURE__ */ jsx(X, {
|
|
128
|
-
className: "h-4 w-4"
|
|
129
|
-
}),
|
|
130
|
-
/* @__PURE__ */ jsx("span", {
|
|
131
|
-
className: "sr-only",
|
|
132
|
-
children: "Close"
|
|
133
|
-
})
|
|
134
|
-
]
|
|
135
|
-
})
|
|
136
|
-
]
|
|
137
|
-
}))
|
|
138
|
-
]
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
142
|
-
var DialogHeader = function(_param) {
|
|
143
|
-
var className = _param.className, props = _object_without_properties(_param, [
|
|
144
|
-
"className"
|
|
145
|
-
]);
|
|
146
|
-
return /* @__PURE__ */ jsx("div", _object_spread({
|
|
147
|
-
className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className)
|
|
148
|
-
}, props));
|
|
149
|
-
};
|
|
150
|
-
DialogHeader.displayName = "DialogHeader";
|
|
151
|
-
var DialogFooter = function(_param) {
|
|
152
|
-
var className = _param.className, props = _object_without_properties(_param, [
|
|
153
|
-
"className"
|
|
154
|
-
]);
|
|
155
|
-
return /* @__PURE__ */ jsx("div", _object_spread({
|
|
156
|
-
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)
|
|
157
|
-
}, props));
|
|
158
|
-
};
|
|
159
|
-
DialogFooter.displayName = "DialogFooter";
|
|
160
|
-
var DialogTitle = React.forwardRef(function(_param, ref) {
|
|
161
|
-
var className = _param.className, props = _object_without_properties(_param, [
|
|
162
|
-
"className"
|
|
163
|
-
]);
|
|
164
|
-
return /* @__PURE__ */ jsx(DialogPrimitive.Title, _object_spread({
|
|
165
|
-
ref: ref,
|
|
166
|
-
className: cn("text-lg font-semibold leading-none tracking-tight", className)
|
|
167
|
-
}, props));
|
|
168
|
-
});
|
|
169
|
-
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
170
|
-
var DialogDescription = React.forwardRef(function(_param, ref) {
|
|
171
|
-
var className = _param.className, props = _object_without_properties(_param, [
|
|
172
|
-
"className"
|
|
173
|
-
]);
|
|
174
|
-
return /* @__PURE__ */ jsx(DialogPrimitive.Description, _object_spread({
|
|
175
|
-
ref: ref,
|
|
176
|
-
className: cn("text-sm text-muted-foreground", className)
|
|
177
|
-
}, props));
|
|
178
|
-
});
|
|
179
|
-
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
180
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
181
|
-
//# sourceMappingURL=dialog.esm.js.map
|
package/dist/dialog.esm.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/periotto/Desktop/workspace/c-rex.net-web-client-foundation/packages/ui/dist/dialog.esm.js","../src/dialog.tsx","../../utils/src/classMerge.ts"],"names":["React","DialogPrimitive","X","clsx","twMerge","cn","inputs","jsx","jsxs","Dialog","Root","DialogTrigger","Trigger","DialogPortal","Portal","DialogClose","Close","DialogOverlay","forwardRef","ref","className","props","Overlay","displayName","DialogContent","children","Content","DialogHeader","DialogFooter","DialogTitle","Title","DialogDescription","Description"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,iBAAiB;ACAjB,YAAYA,WAAW,QAAA;AACvB,YAAYC,qBAAqB,yBAAA;AACjC,SAASC,CAAA,QAAS,eAAA;ADGlB,6BAA6B;AEP7B,SAASC,IAAA,QAA6B,OAAA;AACtC,SAASC,OAAA,QAAe,iBAAA;AAEjB,SAASC;IAAA,IAAA,IAAA,OAAA,UAAA,QAAA,AAAMC,SAAN,UAAA,OAAA,OAAA,GAAA,OAAA,MAAA;QAAMA,OAAN,QAAA,SAAA,CAAA,KAAM;;IAClB,OAAOF,QAAQD,KAAKG;AACxB;AFSA,iBAAiB;ACMb,SAAAC,GAAA,EA0BQC,IAAA,QA1BR,oBAAA;AAZJ,IAAMC,SAAyBR,gBAAAS,IAAA;AAE/B,IAAMC,gBAAgCV,gBAAAW,OAAA;AAEtC,IAAMC,eAA+BZ,gBAAAa,MAAA;AAErC,IAAMC,cAA8Bd,gBAAAe,KAAA;AAEpC,IAAMC,gBAAsBjB,MAAAkB,UAAA,CAG1B,iBAA0BC;QAAvBC,mBAAAA,WAAcC;QAAdD;;WACD,aAAA,GAAAb,IAAiBN,gBAAAqB,OAAA,EAAhB;QACGH,KAAAA;QACAC,WAAWf,GACP,2JACAe;OAEAC;;AAGZJ,cAAcM,WAAA,GAA8BtB,gBAAAqB,OAAA,CAAQC,WAAA;AAEpD,IAAMC,gBAAsBxB,MAAAkB,UAAA,CAG1B,iBAAoCC;QAAjCC,mBAAAA,WAAWK,kBAAAA,UAAaJ;QAAxBD;QAAWK;;WACZ,aAAA,GAAAjB,KAACK,cAAA;QACGY,UAAA;YAAA,aAAA,GAAAlB,IAACU,eAAA,CAAA;YACD,aAAA,GAAAT,KAAiBP,gBAAAyB,OAAA,EAAhB;gBACGP,KAAAA;gBACAC,WAAWf,GACP,+fACAe;eAEAC;gBAEHI,UAAA;oBAAAA;oBACD,aAAA,GAAAjB,KAAiBP,gBAAAe,KAAA,EAAhB;wBAAsBI,WAAU;wBAC7BK,UAAA;4BAAA,aAAA,GAAAlB,IAACL,GAAA;gCAAEkB,WAAU;4BAAA;4BACb,aAAA,GAAAb,IAAC,QAAA;gCAAKa,WAAU;gCAAUK,UAAA;4BAAA;yBAAK;oBAAA;iBACnC;;SACJ;IAAA;;AAGRD,cAAcD,WAAA,GAA8BtB,gBAAAyB,OAAA,CAAQH,WAAA;AAEpD,IAAMI,eAAe;QACjBP,mBAAAA,WACGC;QADHD;;WAGA,aAAA,GAAAb,IAAC,OAAA;QACGa,WAAWf,GACP,sDACAe;OAEAC;;AAGZM,aAAaJ,WAAA,GAAc;AAE3B,IAAMK,eAAe;QACjBR,mBAAAA,WACGC;QADHD;;WAGA,aAAA,GAAAb,IAAC,OAAA;QACGa,WAAWf,GACP,iEACAe;OAEAC;;AAGZO,aAAaL,WAAA,GAAc;AAE3B,IAAMM,cAAoB7B,MAAAkB,UAAA,CAGxB,iBAA0BC;QAAvBC,mBAAAA,WAAcC;QAAdD;;WACD,aAAA,GAAAb,IAAiBN,gBAAA6B,KAAA,EAAhB;QACGX,KAAAA;QACAC,WAAWf,GACP,qDACAe;OAEAC;;AAGZQ,YAAYN,WAAA,GAA8BtB,gBAAA6B,KAAA,CAAMP,WAAA;AAEhD,IAAMQ,oBAA0B/B,MAAAkB,UAAA,CAG9B,iBAA0BC;QAAvBC,mBAAAA,WAAcC;QAAdD;;WACD,aAAA,GAAAb,IAAiBN,gBAAA+B,WAAA,EAAhB;QACGb,KAAAA;QACAC,WAAWf,GAAG,iCAAiCe;OAC3CC;;AAGZU,kBAAkBR,WAAA,GAA8BtB,gBAAA+B,WAAA,CAAYT,WAAA;ADL5D,SACEd,MAAM,EACNM,WAAW,EACXS,aAAa,EACbO,iBAAiB,EACjBH,YAAY,EACZD,YAAY,EACZV,aAAa,EACbJ,YAAY,EACZgB,WAAW,EACXlB,aAAa,GACb","sourcesContent":["\"use client\";\n\n// src/dialog.tsx\nimport * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\n\n// ../utils/src/classMerge.ts\nimport { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\nfunction cn(...inputs) {\n return twMerge(clsx(inputs));\n}\n\n// src/dialog.tsx\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar Dialog = DialogPrimitive.Root;\nvar DialogTrigger = DialogPrimitive.Trigger;\nvar DialogPortal = DialogPrimitive.Portal;\nvar DialogClose = DialogPrimitive.Close;\nvar DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(\n DialogPrimitive.Overlay,\n {\n ref,\n className: cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n ),\n ...props\n }\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\nvar DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [\n /* @__PURE__ */ jsx(DialogOverlay, {}),\n /* @__PURE__ */ jsxs(\n DialogPrimitive.Content,\n {\n ref,\n className: cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className\n ),\n ...props,\n children: [\n children,\n /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: \"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\", children: [\n /* @__PURE__ */ jsx(X, { className: \"h-4 w-4\" }),\n /* @__PURE__ */ jsx(\"span\", { className: \"sr-only\", children: \"Close\" })\n ] })\n ]\n }\n )\n] }));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\nvar DialogHeader = ({\n className,\n ...props\n}) => /* @__PURE__ */ jsx(\n \"div\",\n {\n className: cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n ),\n ...props\n }\n);\nDialogHeader.displayName = \"DialogHeader\";\nvar DialogFooter = ({\n className,\n ...props\n}) => /* @__PURE__ */ jsx(\n \"div\",\n {\n className: cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n ),\n ...props\n }\n);\nDialogFooter.displayName = \"DialogFooter\";\nvar DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(\n DialogPrimitive.Title,\n {\n ref,\n className: cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n ),\n ...props\n }\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\nvar DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(\n DialogPrimitive.Description,\n {\n ref,\n className: cn(\"text-sm text-muted-foreground\", className),\n ...props\n }\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className,\n )}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"]}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
function _array_like_to_array(arr, len) {
|
|
3
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
4
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5
|
-
return arr2;
|
|
6
|
-
}
|
|
7
|
-
function _array_with_holes(arr) {
|
|
8
|
-
if (Array.isArray(arr)) return arr;
|
|
9
|
-
}
|
|
10
|
-
function _iterable_to_array_limit(arr, i) {
|
|
11
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
12
|
-
if (_i == null) return;
|
|
13
|
-
var _arr = [];
|
|
14
|
-
var _n = true;
|
|
15
|
-
var _d = false;
|
|
16
|
-
var _s, _e;
|
|
17
|
-
try {
|
|
18
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
19
|
-
_arr.push(_s.value);
|
|
20
|
-
if (i && _arr.length === i) break;
|
|
21
|
-
}
|
|
22
|
-
} catch (err) {
|
|
23
|
-
_d = true;
|
|
24
|
-
_e = err;
|
|
25
|
-
} finally{
|
|
26
|
-
try {
|
|
27
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
28
|
-
} finally{
|
|
29
|
-
if (_d) throw _e;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return _arr;
|
|
33
|
-
}
|
|
34
|
-
function _non_iterable_rest() {
|
|
35
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
36
|
-
}
|
|
37
|
-
function _sliced_to_array(arr, i) {
|
|
38
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
39
|
-
}
|
|
40
|
-
function _type_of(obj) {
|
|
41
|
-
"@swc/helpers - typeof";
|
|
42
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
43
|
-
}
|
|
44
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
45
|
-
if (!o) return;
|
|
46
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
47
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
48
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
49
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
50
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
51
|
-
}
|
|
52
|
-
var __defProp = Object.defineProperty;
|
|
53
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
54
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
55
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
56
|
-
var __export = function(target, all) {
|
|
57
|
-
for(var name in all)__defProp(target, name, {
|
|
58
|
-
get: all[name],
|
|
59
|
-
enumerable: true
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
var __copyProps = function(to, from, except, desc) {
|
|
63
|
-
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
64
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
65
|
-
try {
|
|
66
|
-
var _loop = function() {
|
|
67
|
-
var key = _step.value;
|
|
68
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
69
|
-
get: function() {
|
|
70
|
-
return from[key];
|
|
71
|
-
},
|
|
72
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
|
-
for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
|
|
76
|
-
} catch (err) {
|
|
77
|
-
_didIteratorError = true;
|
|
78
|
-
_iteratorError = err;
|
|
79
|
-
} finally{
|
|
80
|
-
try {
|
|
81
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
82
|
-
_iterator.return();
|
|
83
|
-
}
|
|
84
|
-
} finally{
|
|
85
|
-
if (_didIteratorError) {
|
|
86
|
-
throw _iteratorError;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return to;
|
|
92
|
-
};
|
|
93
|
-
var __toCommonJS = function(mod) {
|
|
94
|
-
return __copyProps(__defProp({}, "__esModule", {
|
|
95
|
-
value: true
|
|
96
|
-
}), mod);
|
|
97
|
-
};
|
|
98
|
-
// src/hooks/use-mobile.tsx
|
|
99
|
-
var use_mobile_exports = {};
|
|
100
|
-
__export(use_mobile_exports, {
|
|
101
|
-
useIsMobile: function() {
|
|
102
|
-
return useIsMobile;
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
module.exports = __toCommonJS(use_mobile_exports);
|
|
106
|
-
var import_react = require("react");
|
|
107
|
-
var MOBILE_BREAKPOINT = 768;
|
|
108
|
-
function useIsMobile() {
|
|
109
|
-
var _ref = _sliced_to_array((0, import_react.useState)(void 0), 2), isMobile = _ref[0], setIsMobile = _ref[1];
|
|
110
|
-
(0, import_react.useEffect)(function() {
|
|
111
|
-
var mql = window.matchMedia("(max-width: ".concat(MOBILE_BREAKPOINT - 1, "px)"));
|
|
112
|
-
var onChange = function() {
|
|
113
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
114
|
-
};
|
|
115
|
-
mql.addEventListener("change", onChange);
|
|
116
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
117
|
-
return function() {
|
|
118
|
-
return mql.removeEventListener("change", onChange);
|
|
119
|
-
};
|
|
120
|
-
}, []);
|
|
121
|
-
return !!isMobile;
|
|
122
|
-
}
|
|
123
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
124
|
-
0 && (module.exports = {
|
|
125
|
-
useIsMobile: useIsMobile
|
|
126
|
-
});
|
|
127
|
-
//# sourceMappingURL=use-mobile.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/periotto/Desktop/workspace/c-rex.net-web-client-foundation/packages/ui/dist/hooks/use-mobile.cjs.js","../../src/hooks/use-mobile.tsx"],"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","use_mobile_exports","useIsMobile","module","exports","import_react","require","MOBILE_BREAKPOINT","useState","isMobile","setIsMobile","useEffect","mql","window","matchMedia","onChange","innerWidth","addEventListener","removeEventListener"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAIA,YAAYC,OAAOC,cAAc;AACrC,IAAIC,mBAAmBF,OAAOG,wBAAwB;AACtD,IAAIC,oBAAoBJ,OAAOK,mBAAmB;AAClD,IAAIC,eAAeN,OAAOO,SAAS,CAACC,cAAc;AAClD,IAAIC,WAAW,SAACC,QAAQC;IACtB,IAAK,IAAIC,QAAQD,IACfZ,UAAUW,QAAQE,MAAM;QAAEC,KAAKF,GAAG,CAACC,KAAK;QAAEE,YAAY;IAAK;AAC/D;AACA,IAAIC,cAAc,SAACC,IAAIC,MAAMC,QAAQC;IACnC,IAAIF,QAAQ,CAAA,OAAOA,qCAAP,SAAOA,KAAG,MAAM,YAAY,OAAOA,SAAS,YAAY;YAC7D,kCAAA,2BAAA;;;gBAAA,IAAIG,MAAJ;gBACH,IAAI,CAACd,aAAae,IAAI,CAACL,IAAII,QAAQA,QAAQF,QACzCnB,UAAUiB,IAAII,KAAK;oBAAEP,KAAK;+BAAMI,IAAI,CAACG,IAAI;;oBAAEN,YAAY,CAAEK,CAAAA,OAAOjB,iBAAiBe,MAAMG,IAAG,KAAMD,KAAKL,UAAU;gBAAC;;YAFpH,QAAK,YAAWV,kBAAkBa,0BAA7B,SAAA,6BAAA,QAAA,yBAAA;;YAAA;YAAA;;;qBAAA,6BAAA;oBAAA;;;oBAAA;0BAAA;;;;IAGP;IACA,OAAOD;AACT;AACA,IAAIM,eAAe,SAACC;WAAQR,YAAYhB,UAAU,CAAC,GAAG,cAAc;QAAEyB,OAAO;IAAK,IAAID;;AAEtF,2BAA2B;ACnB3B,IAAAE,qBAAA,CAAA;AAAAhB,SAAAgB,oBAAA;IAAAC,aAAA;eAAAA;;AAAA;AAAAC,OAAAC,OAAA,GAAAN,aAAAG;AAAA,IAAAI,eAAoCC,QAAA;AAEpC,IAAMC,oBAAoB;AAEnB,SAASL;IACd,IAA4B,wBAAA,CAAA,GAAIG,aAAAG,QAAA,EAA8B,KAAA,QAAvDC,WAAqB,SAAXC,cAAW;IAE5B,CAAA,GAAAL,aAAAM,SAAA,EAAU;QACR,IAAMC,MAAMC,OAAOC,UAAA,CAAW,eAAoC,OAArBP,oBAAoB,GAAC;QAClE,IAAMQ,WAAW;YACfL,YAAYG,OAAOG,UAAA,GAAaT;QAClC;QACAK,IAAIK,gBAAA,CAAiB,UAAUF;QAC/BL,YAAYG,OAAOG,UAAA,GAAaT;QAChC,OAAO;mBAAMK,IAAIM,mBAAA,CAAoB,UAAUH;;IACjD,GAAG,EAAE;IAEL,OAAO,CAAC,CAACN;AACX;ADsBA,6DAA6D;AAC7D,KAAMN,CAAAA,OAAOC,OAAO,GAAG;IACrBF,aAAAA;AACF,CAAA","sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/hooks/use-mobile.tsx\nvar use_mobile_exports = {};\n__export(use_mobile_exports, {\n useIsMobile: () => useIsMobile\n});\nmodule.exports = __toCommonJS(use_mobile_exports);\nvar import_react = require(\"react\");\nvar MOBILE_BREAKPOINT = 768;\nfunction useIsMobile() {\n const [isMobile, setIsMobile] = (0, import_react.useState)(void 0);\n (0, import_react.useEffect)(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n };\n mql.addEventListener(\"change\", onChange);\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n return () => mql.removeEventListener(\"change\", onChange);\n }, []);\n return !!isMobile;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n useIsMobile\n});\n","import { useEffect, useState } from \"react\";\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = useState<boolean | undefined>(undefined);\n\n useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n };\n mql.addEventListener(\"change\", onChange);\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n return () => mql.removeEventListener(\"change\", onChange);\n }, []);\n\n return !!isMobile;\n}\n"]}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
// src/hooks/use-mobile.tsx
|
|
2
|
-
function _array_like_to_array(arr, len) {
|
|
3
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
4
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5
|
-
return arr2;
|
|
6
|
-
}
|
|
7
|
-
function _array_with_holes(arr) {
|
|
8
|
-
if (Array.isArray(arr)) return arr;
|
|
9
|
-
}
|
|
10
|
-
function _iterable_to_array_limit(arr, i) {
|
|
11
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
12
|
-
if (_i == null) return;
|
|
13
|
-
var _arr = [];
|
|
14
|
-
var _n = true;
|
|
15
|
-
var _d = false;
|
|
16
|
-
var _s, _e;
|
|
17
|
-
try {
|
|
18
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
19
|
-
_arr.push(_s.value);
|
|
20
|
-
if (i && _arr.length === i) break;
|
|
21
|
-
}
|
|
22
|
-
} catch (err) {
|
|
23
|
-
_d = true;
|
|
24
|
-
_e = err;
|
|
25
|
-
} finally{
|
|
26
|
-
try {
|
|
27
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
28
|
-
} finally{
|
|
29
|
-
if (_d) throw _e;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return _arr;
|
|
33
|
-
}
|
|
34
|
-
function _non_iterable_rest() {
|
|
35
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
36
|
-
}
|
|
37
|
-
function _sliced_to_array(arr, i) {
|
|
38
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
39
|
-
}
|
|
40
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
41
|
-
if (!o) return;
|
|
42
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
43
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
44
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
45
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
46
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
47
|
-
}
|
|
48
|
-
import { useEffect, useState } from "react";
|
|
49
|
-
var MOBILE_BREAKPOINT = 768;
|
|
50
|
-
function useIsMobile() {
|
|
51
|
-
var _useState = _sliced_to_array(useState(void 0), 2), isMobile = _useState[0], setIsMobile = _useState[1];
|
|
52
|
-
useEffect(function() {
|
|
53
|
-
var mql = window.matchMedia("(max-width: ".concat(MOBILE_BREAKPOINT - 1, "px)"));
|
|
54
|
-
var onChange = function() {
|
|
55
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
56
|
-
};
|
|
57
|
-
mql.addEventListener("change", onChange);
|
|
58
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
59
|
-
return function() {
|
|
60
|
-
return mql.removeEventListener("change", onChange);
|
|
61
|
-
};
|
|
62
|
-
}, []);
|
|
63
|
-
return !!isMobile;
|
|
64
|
-
}
|
|
65
|
-
export { useIsMobile };
|
|
66
|
-
//# sourceMappingURL=use-mobile.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/periotto/Desktop/workspace/c-rex.net-web-client-foundation/packages/ui/dist/hooks/use-mobile.esm.js","../../src/hooks/use-mobile.tsx"],"names":["useEffect","useState","MOBILE_BREAKPOINT","useIsMobile","isMobile","setIsMobile","mql","window","matchMedia","onChange","innerWidth","addEventListener","removeEventListener"],"mappings":"AAAA,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACA3B,SAASA,SAAA,EAAWC,QAAA,QAAgB,QAAA;AAEpC,IAAMC,oBAAoB;AAEnB,SAASC;IACd,IAAgCF,6BAAAA,SAA8B,KAAA,QAAvDG,WAAyBH,cAAfI,cAAeJ;IAEhCD,UAAU;QACR,IAAMM,MAAMC,OAAOC,UAAA,CAAW,eAAoC,OAArBN,oBAAoB,GAAC;QAClE,IAAMO,WAAW;YACfJ,YAAYE,OAAOG,UAAA,GAAaR;QAClC;QACAI,IAAIK,gBAAA,CAAiB,UAAUF;QAC/BJ,YAAYE,OAAOG,UAAA,GAAaR;QAChC,OAAO;mBAAMI,IAAIM,mBAAA,CAAoB,UAAUH;;IACjD,GAAG,EAAE;IAEL,OAAO,CAAC,CAACL;AACX;ADFA,SACED,WAAW,GACX","sourcesContent":["// src/hooks/use-mobile.tsx\nimport { useEffect, useState } from \"react\";\nvar MOBILE_BREAKPOINT = 768;\nfunction useIsMobile() {\n const [isMobile, setIsMobile] = useState(void 0);\n useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n };\n mql.addEventListener(\"change\", onChange);\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n return () => mql.removeEventListener(\"change\", onChange);\n }, []);\n return !!isMobile;\n}\nexport {\n useIsMobile\n};\n","import { useEffect, useState } from \"react\";\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = useState<boolean | undefined>(undefined);\n\n useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n };\n mql.addEventListener(\"change\", onChange);\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n return () => mql.removeEventListener(\"change\", onChange);\n }, []);\n\n return !!isMobile;\n}\n"]}
|
package/dist/input.cjs.js
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
function _define_property(obj, key, value) {
|
|
3
|
-
if (key in obj) {
|
|
4
|
-
Object.defineProperty(obj, key, {
|
|
5
|
-
value: value,
|
|
6
|
-
enumerable: true,
|
|
7
|
-
configurable: true,
|
|
8
|
-
writable: true
|
|
9
|
-
});
|
|
10
|
-
} else {
|
|
11
|
-
obj[key] = value;
|
|
12
|
-
}
|
|
13
|
-
return obj;
|
|
14
|
-
}
|
|
15
|
-
function _object_spread(target) {
|
|
16
|
-
for(var i = 1; i < arguments.length; i++){
|
|
17
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
18
|
-
var ownKeys = Object.keys(source);
|
|
19
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
20
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
21
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
22
|
-
}));
|
|
23
|
-
}
|
|
24
|
-
ownKeys.forEach(function(key) {
|
|
25
|
-
_define_property(target, key, source[key]);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return target;
|
|
29
|
-
}
|
|
30
|
-
function _object_without_properties(source, excluded) {
|
|
31
|
-
if (source == null) return {};
|
|
32
|
-
var target = _object_without_properties_loose(source, excluded);
|
|
33
|
-
var key, i;
|
|
34
|
-
if (Object.getOwnPropertySymbols) {
|
|
35
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
36
|
-
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
37
|
-
key = sourceSymbolKeys[i];
|
|
38
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
39
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
40
|
-
target[key] = source[key];
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return target;
|
|
44
|
-
}
|
|
45
|
-
function _object_without_properties_loose(source, excluded) {
|
|
46
|
-
if (source == null) return {};
|
|
47
|
-
var target = {};
|
|
48
|
-
var sourceKeys = Object.keys(source);
|
|
49
|
-
var key, i;
|
|
50
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
51
|
-
key = sourceKeys[i];
|
|
52
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
53
|
-
target[key] = source[key];
|
|
54
|
-
}
|
|
55
|
-
return target;
|
|
56
|
-
}
|
|
57
|
-
function _type_of(obj) {
|
|
58
|
-
"@swc/helpers - typeof";
|
|
59
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
60
|
-
}
|
|
61
|
-
var __create = Object.create;
|
|
62
|
-
var __defProp = Object.defineProperty;
|
|
63
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
64
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
65
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
66
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
67
|
-
var __export = function(target, all) {
|
|
68
|
-
for(var name in all)__defProp(target, name, {
|
|
69
|
-
get: all[name],
|
|
70
|
-
enumerable: true
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
var __copyProps = function(to, from, except, desc) {
|
|
74
|
-
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
75
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
76
|
-
try {
|
|
77
|
-
var _loop = function() {
|
|
78
|
-
var key = _step.value;
|
|
79
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
80
|
-
get: function() {
|
|
81
|
-
return from[key];
|
|
82
|
-
},
|
|
83
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
|
|
87
|
-
} catch (err) {
|
|
88
|
-
_didIteratorError = true;
|
|
89
|
-
_iteratorError = err;
|
|
90
|
-
} finally{
|
|
91
|
-
try {
|
|
92
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
93
|
-
_iterator.return();
|
|
94
|
-
}
|
|
95
|
-
} finally{
|
|
96
|
-
if (_didIteratorError) {
|
|
97
|
-
throw _iteratorError;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return to;
|
|
103
|
-
};
|
|
104
|
-
var __toESM = function(mod, isNodeMode, target) {
|
|
105
|
-
return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
|
|
106
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
107
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
108
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
109
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
110
|
-
value: mod,
|
|
111
|
-
enumerable: true
|
|
112
|
-
}) : target, mod);
|
|
113
|
-
};
|
|
114
|
-
var __toCommonJS = function(mod) {
|
|
115
|
-
return __copyProps(__defProp({}, "__esModule", {
|
|
116
|
-
value: true
|
|
117
|
-
}), mod);
|
|
118
|
-
};
|
|
119
|
-
// src/input.tsx
|
|
120
|
-
var input_exports = {};
|
|
121
|
-
__export(input_exports, {
|
|
122
|
-
Input: function() {
|
|
123
|
-
return Input;
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
module.exports = __toCommonJS(input_exports);
|
|
127
|
-
var React = __toESM(require("react"), 1);
|
|
128
|
-
// ../utils/src/classMerge.ts
|
|
129
|
-
var import_clsx = require("clsx");
|
|
130
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
131
|
-
function cn() {
|
|
132
|
-
for(var _len = arguments.length, inputs = new Array(_len), _key = 0; _key < _len; _key++){
|
|
133
|
-
inputs[_key] = arguments[_key];
|
|
134
|
-
}
|
|
135
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
136
|
-
}
|
|
137
|
-
// src/input.tsx
|
|
138
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
139
|
-
var Input = React.forwardRef(function(_param, ref) {
|
|
140
|
-
var className = _param.className, type = _param.type, props = _object_without_properties(_param, [
|
|
141
|
-
"className",
|
|
142
|
-
"type"
|
|
143
|
-
]);
|
|
144
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", _object_spread({
|
|
145
|
-
type: type,
|
|
146
|
-
className: cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
|
|
147
|
-
ref: ref
|
|
148
|
-
}, props));
|
|
149
|
-
});
|
|
150
|
-
Input.displayName = "Input";
|
|
151
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
152
|
-
0 && (module.exports = {
|
|
153
|
-
Input: Input
|
|
154
|
-
});
|
|
155
|
-
//# sourceMappingURL=input.cjs.js.map
|
package/dist/input.cjs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/periotto/Desktop/workspace/c-rex.net-web-client-foundation/packages/ui/dist/input.cjs.js","../src/input.tsx","../../utils/src/classMerge.ts"],"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","input_exports","Input","module","exports","React","require","import_clsx","import_tailwind_merge","cn","inputs","twMerge","clsx","import_jsx_runtime","forwardRef","ref","className","type","props","jsx","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAIA,WAAWC,OAAOC,MAAM;AAC5B,IAAIC,YAAYF,OAAOG,cAAc;AACrC,IAAIC,mBAAmBJ,OAAOK,wBAAwB;AACtD,IAAIC,oBAAoBN,OAAOO,mBAAmB;AAClD,IAAIC,eAAeR,OAAOS,cAAc;AACxC,IAAIC,eAAeV,OAAOW,SAAS,CAACC,cAAc;AAClD,IAAIC,WAAW,SAACC,QAAQC;IACtB,IAAK,IAAIC,QAAQD,IACfb,UAAUY,QAAQE,MAAM;QAAEC,KAAKF,GAAG,CAACC,KAAK;QAAEE,YAAY;IAAK;AAC/D;AACA,IAAIC,cAAc,SAACC,IAAIC,MAAMC,QAAQC;IACnC,IAAIF,QAAQ,CAAA,OAAOA,qCAAP,SAAOA,KAAG,MAAM,YAAY,OAAOA,SAAS,YAAY;YAC7D,kCAAA,2BAAA;;;gBAAA,IAAIG,MAAJ;gBACH,IAAI,CAACd,aAAae,IAAI,CAACL,IAAII,QAAQA,QAAQF,QACzCpB,UAAUkB,IAAII,KAAK;oBAAEP,KAAK;+BAAMI,IAAI,CAACG,IAAI;;oBAAEN,YAAY,CAAEK,CAAAA,OAAOnB,iBAAiBiB,MAAMG,IAAG,KAAMD,KAAKL,UAAU;gBAAC;;YAFpH,QAAK,YAAWZ,kBAAkBe,0BAA7B,SAAA,6BAAA,QAAA,yBAAA;;YAAA;YAAA;;;qBAAA,6BAAA;oBAAA;;;oBAAA;0BAAA;;;;IAGP;IACA,OAAOD;AACT;AACA,IAAIM,UAAU,SAACC,KAAKC,YAAYd;WAAYA,SAASa,OAAO,OAAO5B,SAASS,aAAamB,QAAQ,CAAC,GAAGR,YACnG,sEAAsE;IACtE,iEAAiE;IACjE,sEAAsE;IACtE,qEAAqE;IACrES,cAAc,CAACD,OAAO,CAACA,IAAIE,UAAU,GAAG3B,UAAUY,QAAQ,WAAW;QAAEgB,OAAOH;QAAKT,YAAY;IAAK,KAAKJ,QACzGa;;AAEF,IAAII,eAAe,SAACJ;WAAQR,YAAYjB,UAAU,CAAC,GAAG,cAAc;QAAE4B,OAAO;IAAK,IAAIH;;AAEtF,gBAAgB;AC7BhB,IAAAK,gBAAA,CAAA;AAAAnB,SAAAmB,eAAA;IAAAC,OAAA;eAAAA;;AAAA;AAAAC,OAAAC,OAAA,GAAAJ,aAAAC;AAAA,IAAAI,QAAuBV,QAAAW,QAAA,UAAA;ADqCvB,6BAA6B;AErC7B,IAAAC,cAAsCD,QAAA;AACtC,IAAAE,wBAAwBF,QAAA;AAEjB,SAASG;IAAA,IAAA,IAAA,OAAA,UAAA,QAAA,AAAMC,SAAN,UAAA,OAAA,OAAA,GAAA,OAAA,MAAA;QAAMA,OAAN,QAAA,SAAA,CAAA,KAAM;;IAClB,OAAA,CAAA,GAAOF,sBAAAG,OAAA,EAAA,CAAA,GAAQJ,YAAAK,IAAA,EAAKF;AACxB;AFuCA,gBAAgB;ACrCJ,IAAAG,qBAAAP,QAAA;AAHZ,IAAMJ,QAAcG,MAAAS,UAAA,CAChB,iBAAgCC;QAA7BC,mBAAAA,WAAWC,cAAAA,MAASC;QAApBF;QAAWC;;IACV,OACI,aAAA,GAAA,CAAA,GAAAJ,mBAAAM,GAAA,EAAC,SAAA;QACGF,MAAAA;QACAD,WAAWP,GACP,2WACAO;QAEJD,KAAAA;OACIG;AAGhB;AAEJhB,MAAMkB,WAAA,GAAc;AD4CpB,6DAA6D;AAC7D,KAAMjB,CAAAA,OAAOC,OAAO,GAAG;IACrBF,OAAAA;AACF,CAAA","sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/input.tsx\nvar input_exports = {};\n__export(input_exports, {\n Input: () => Input\n});\nmodule.exports = __toCommonJS(input_exports);\nvar React = __toESM(require(\"react\"), 1);\n\n// ../utils/src/classMerge.ts\nvar import_clsx = require(\"clsx\");\nvar import_tailwind_merge = require(\"tailwind-merge\");\nfunction cn(...inputs) {\n return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));\n}\n\n// src/input.tsx\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar Input = React.forwardRef(\n ({ className, type, ...props }, ref) => {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\n \"input\",\n {\n type,\n className: cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n ),\n ref,\n ...props\n }\n );\n }\n);\nInput.displayName = \"Input\";\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n Input\n});\n","import * as React from \"react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"]}
|
package/dist/input.d.cts
DELETED