tiny-react-dialog 0.1.0 → 0.2.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/package.json +26 -17
- package/dist/TinyReactDialog.d.ts +0 -13
- package/dist/index.d.ts +0 -2
- package/dist/index.es.js +0 -355
- package/dist/index.umd.js +0 -22
- package/dist/tinyReactDialog.css +0 -71
- package/dist/utils/mergeClassnames.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tiny-react-dialog",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.umd.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"author": "Sebastien Seguin",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "https://github.com/sedomu/tiny-react-dialog.git"
|
|
12
|
+
"url": "git+https://github.com/sedomu/tiny-react-dialog.git"
|
|
13
13
|
},
|
|
14
14
|
"homepage": "https://github.com/sedomu/tiny-react-dialog#readme",
|
|
15
15
|
"files": [
|
|
@@ -25,8 +25,9 @@
|
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"dev": "vite",
|
|
28
|
+
"test": "vitest",
|
|
28
29
|
"build": "tsc -b && vite build",
|
|
29
|
-
"prettier": "prettier src --write",
|
|
30
|
+
"prettier": "prettier src tests --write",
|
|
30
31
|
"lint": "eslint .",
|
|
31
32
|
"preview": "vite preview"
|
|
32
33
|
},
|
|
@@ -35,20 +36,28 @@
|
|
|
35
36
|
"react-dom": ">=17"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
|
-
"@eslint/js": "^9.
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
39
|
+
"@eslint/js": "^9.0.0",
|
|
40
|
+
"@testing-library/react": "^16.3.2",
|
|
41
|
+
"@testing-library/user-event": "^14.6.1",
|
|
42
|
+
"@types/react": "^19.2.14",
|
|
43
|
+
"@types/react-dom": "^19.2.3",
|
|
44
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
45
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
46
|
+
"eslint": "^9.0.0",
|
|
47
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
48
|
+
"eslint-plugin-react-refresh": "^0.5.2",
|
|
49
|
+
"globals": "^17.4.0",
|
|
50
|
+
"jsdom": "^28.1.0",
|
|
51
|
+
"prettier": "3.8.1",
|
|
52
|
+
"typescript": "~5.9.3",
|
|
53
|
+
"typescript-eslint": "^8.56.1",
|
|
54
|
+
"vite": "^7.3.1",
|
|
55
|
+
"vite-plugin-css-injected-by-js": "^4.0.1",
|
|
51
56
|
"vite-plugin-dts": "^4.5.4",
|
|
52
|
-
"vite-plugin-static-copy": "^3.
|
|
57
|
+
"vite-plugin-static-copy": "^3.2.0",
|
|
58
|
+
"vitest": "^4.0.18"
|
|
59
|
+
},
|
|
60
|
+
"overrides": {
|
|
61
|
+
"minimatch": "^10.2.3"
|
|
53
62
|
}
|
|
54
63
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export type TinyReactDialogProps = {
|
|
3
|
-
visible?: boolean;
|
|
4
|
-
onClose: () => void;
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
classNames?: {
|
|
7
|
-
overlay?: string;
|
|
8
|
-
container?: string;
|
|
9
|
-
content?: string;
|
|
10
|
-
close?: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export declare function TinyReactDialog({ visible, onClose, children, classNames, }: TinyReactDialogProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/index.d.ts
DELETED
package/dist/index.es.js
DELETED
|
@@ -1,355 +0,0 @@
|
|
|
1
|
-
import te from "react";
|
|
2
|
-
var T = { exports: {} }, v = {};
|
|
3
|
-
/**
|
|
4
|
-
* @license React
|
|
5
|
-
* react-jsx-runtime.production.js
|
|
6
|
-
*
|
|
7
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/
|
|
12
|
-
var D;
|
|
13
|
-
function ne() {
|
|
14
|
-
if (D) return v;
|
|
15
|
-
D = 1;
|
|
16
|
-
var s = Symbol.for("react.transitional.element"), u = Symbol.for("react.fragment");
|
|
17
|
-
function m(c, a, i) {
|
|
18
|
-
var E = null;
|
|
19
|
-
if (i !== void 0 && (E = "" + i), a.key !== void 0 && (E = "" + a.key), "key" in a) {
|
|
20
|
-
i = {};
|
|
21
|
-
for (var R in a)
|
|
22
|
-
R !== "key" && (i[R] = a[R]);
|
|
23
|
-
} else i = a;
|
|
24
|
-
return a = i.ref, {
|
|
25
|
-
$$typeof: s,
|
|
26
|
-
type: c,
|
|
27
|
-
key: E,
|
|
28
|
-
ref: a !== void 0 ? a : null,
|
|
29
|
-
props: i
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
return v.Fragment = u, v.jsx = m, v.jsxs = m, v;
|
|
33
|
-
}
|
|
34
|
-
var b = {};
|
|
35
|
-
/**
|
|
36
|
-
* @license React
|
|
37
|
-
* react-jsx-runtime.development.js
|
|
38
|
-
*
|
|
39
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
40
|
-
*
|
|
41
|
-
* This source code is licensed under the MIT license found in the
|
|
42
|
-
* LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/
|
|
44
|
-
var L;
|
|
45
|
-
function oe() {
|
|
46
|
-
return L || (L = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
47
|
-
function s(e) {
|
|
48
|
-
if (e == null) return null;
|
|
49
|
-
if (typeof e == "function")
|
|
50
|
-
return e.$$typeof === K ? null : e.displayName || e.name || null;
|
|
51
|
-
if (typeof e == "string") return e;
|
|
52
|
-
switch (e) {
|
|
53
|
-
case g:
|
|
54
|
-
return "Fragment";
|
|
55
|
-
case z:
|
|
56
|
-
return "Profiler";
|
|
57
|
-
case J:
|
|
58
|
-
return "StrictMode";
|
|
59
|
-
case B:
|
|
60
|
-
return "Suspense";
|
|
61
|
-
case H:
|
|
62
|
-
return "SuspenseList";
|
|
63
|
-
case Q:
|
|
64
|
-
return "Activity";
|
|
65
|
-
}
|
|
66
|
-
if (typeof e == "object")
|
|
67
|
-
switch (typeof e.tag == "number" && console.error(
|
|
68
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
69
|
-
), e.$$typeof) {
|
|
70
|
-
case q:
|
|
71
|
-
return "Portal";
|
|
72
|
-
case G:
|
|
73
|
-
return (e.displayName || "Context") + ".Provider";
|
|
74
|
-
case V:
|
|
75
|
-
return (e._context.displayName || "Context") + ".Consumer";
|
|
76
|
-
case X:
|
|
77
|
-
var r = e.render;
|
|
78
|
-
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
79
|
-
case Z:
|
|
80
|
-
return r = e.displayName || null, r !== null ? r : s(e.type) || "Memo";
|
|
81
|
-
case y:
|
|
82
|
-
r = e._payload, e = e._init;
|
|
83
|
-
try {
|
|
84
|
-
return s(e(r));
|
|
85
|
-
} catch {
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
function u(e) {
|
|
91
|
-
return "" + e;
|
|
92
|
-
}
|
|
93
|
-
function m(e) {
|
|
94
|
-
try {
|
|
95
|
-
u(e);
|
|
96
|
-
var r = !1;
|
|
97
|
-
} catch {
|
|
98
|
-
r = !0;
|
|
99
|
-
}
|
|
100
|
-
if (r) {
|
|
101
|
-
r = console;
|
|
102
|
-
var t = r.error, n = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
103
|
-
return t.call(
|
|
104
|
-
r,
|
|
105
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
106
|
-
n
|
|
107
|
-
), u(e);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
function c(e) {
|
|
111
|
-
if (e === g) return "<>";
|
|
112
|
-
if (typeof e == "object" && e !== null && e.$$typeof === y)
|
|
113
|
-
return "<...>";
|
|
114
|
-
try {
|
|
115
|
-
var r = s(e);
|
|
116
|
-
return r ? "<" + r + ">" : "<...>";
|
|
117
|
-
} catch {
|
|
118
|
-
return "<...>";
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
function a() {
|
|
122
|
-
var e = x.A;
|
|
123
|
-
return e === null ? null : e.getOwner();
|
|
124
|
-
}
|
|
125
|
-
function i() {
|
|
126
|
-
return Error("react-stack-top-frame");
|
|
127
|
-
}
|
|
128
|
-
function E(e) {
|
|
129
|
-
if (N.call(e, "key")) {
|
|
130
|
-
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
131
|
-
if (r && r.isReactWarning) return !1;
|
|
132
|
-
}
|
|
133
|
-
return e.key !== void 0;
|
|
134
|
-
}
|
|
135
|
-
function R(e, r) {
|
|
136
|
-
function t() {
|
|
137
|
-
C || (C = !0, console.error(
|
|
138
|
-
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
139
|
-
r
|
|
140
|
-
));
|
|
141
|
-
}
|
|
142
|
-
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
143
|
-
get: t,
|
|
144
|
-
configurable: !0
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
function W() {
|
|
148
|
-
var e = s(this.type);
|
|
149
|
-
return Y[e] || (Y[e] = !0, console.error(
|
|
150
|
-
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
151
|
-
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
152
|
-
}
|
|
153
|
-
function U(e, r, t, n, d, l, j, w) {
|
|
154
|
-
return t = l.ref, e = {
|
|
155
|
-
$$typeof: S,
|
|
156
|
-
type: e,
|
|
157
|
-
key: r,
|
|
158
|
-
props: l,
|
|
159
|
-
_owner: d
|
|
160
|
-
}, (t !== void 0 ? t : null) !== null ? Object.defineProperty(e, "ref", {
|
|
161
|
-
enumerable: !1,
|
|
162
|
-
get: W
|
|
163
|
-
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
164
|
-
configurable: !1,
|
|
165
|
-
enumerable: !1,
|
|
166
|
-
writable: !0,
|
|
167
|
-
value: 0
|
|
168
|
-
}), Object.defineProperty(e, "_debugInfo", {
|
|
169
|
-
configurable: !1,
|
|
170
|
-
enumerable: !1,
|
|
171
|
-
writable: !0,
|
|
172
|
-
value: null
|
|
173
|
-
}), Object.defineProperty(e, "_debugStack", {
|
|
174
|
-
configurable: !1,
|
|
175
|
-
enumerable: !1,
|
|
176
|
-
writable: !0,
|
|
177
|
-
value: j
|
|
178
|
-
}), Object.defineProperty(e, "_debugTask", {
|
|
179
|
-
configurable: !1,
|
|
180
|
-
enumerable: !1,
|
|
181
|
-
writable: !0,
|
|
182
|
-
value: w
|
|
183
|
-
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
184
|
-
}
|
|
185
|
-
function A(e, r, t, n, d, l, j, w) {
|
|
186
|
-
var o = r.children;
|
|
187
|
-
if (o !== void 0)
|
|
188
|
-
if (n)
|
|
189
|
-
if (ee(o)) {
|
|
190
|
-
for (n = 0; n < o.length; n++)
|
|
191
|
-
P(o[n]);
|
|
192
|
-
Object.freeze && Object.freeze(o);
|
|
193
|
-
} else
|
|
194
|
-
console.error(
|
|
195
|
-
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
196
|
-
);
|
|
197
|
-
else P(o);
|
|
198
|
-
if (N.call(r, "key")) {
|
|
199
|
-
o = s(e);
|
|
200
|
-
var _ = Object.keys(r).filter(function(re) {
|
|
201
|
-
return re !== "key";
|
|
202
|
-
});
|
|
203
|
-
n = 0 < _.length ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}", $[o + n] || (_ = 0 < _.length ? "{" + _.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
204
|
-
`A props object containing a "key" prop is being spread into JSX:
|
|
205
|
-
let props = %s;
|
|
206
|
-
<%s {...props} />
|
|
207
|
-
React keys must be passed directly to JSX without using spread:
|
|
208
|
-
let props = %s;
|
|
209
|
-
<%s key={someKey} {...props} />`,
|
|
210
|
-
n,
|
|
211
|
-
o,
|
|
212
|
-
_,
|
|
213
|
-
o
|
|
214
|
-
), $[o + n] = !0);
|
|
215
|
-
}
|
|
216
|
-
if (o = null, t !== void 0 && (m(t), o = "" + t), E(r) && (m(r.key), o = "" + r.key), "key" in r) {
|
|
217
|
-
t = {};
|
|
218
|
-
for (var O in r)
|
|
219
|
-
O !== "key" && (t[O] = r[O]);
|
|
220
|
-
} else t = r;
|
|
221
|
-
return o && R(
|
|
222
|
-
t,
|
|
223
|
-
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
224
|
-
), U(
|
|
225
|
-
e,
|
|
226
|
-
o,
|
|
227
|
-
l,
|
|
228
|
-
d,
|
|
229
|
-
a(),
|
|
230
|
-
t,
|
|
231
|
-
j,
|
|
232
|
-
w
|
|
233
|
-
);
|
|
234
|
-
}
|
|
235
|
-
function P(e) {
|
|
236
|
-
typeof e == "object" && e !== null && e.$$typeof === S && e._store && (e._store.validated = 1);
|
|
237
|
-
}
|
|
238
|
-
var p = te, S = Symbol.for("react.transitional.element"), q = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), J = Symbol.for("react.strict_mode"), z = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), G = Symbol.for("react.context"), X = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), H = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), Q = Symbol.for("react.activity"), K = Symbol.for("react.client.reference"), x = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, ee = Array.isArray, h = console.createTask ? console.createTask : function() {
|
|
239
|
-
return null;
|
|
240
|
-
};
|
|
241
|
-
p = {
|
|
242
|
-
react_stack_bottom_frame: function(e) {
|
|
243
|
-
return e();
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
var C, Y = {}, F = p.react_stack_bottom_frame.bind(
|
|
247
|
-
p,
|
|
248
|
-
i
|
|
249
|
-
)(), I = h(c(i)), $ = {};
|
|
250
|
-
b.Fragment = g, b.jsx = function(e, r, t, n, d) {
|
|
251
|
-
var l = 1e4 > x.recentlyCreatedOwnerStacks++;
|
|
252
|
-
return A(
|
|
253
|
-
e,
|
|
254
|
-
r,
|
|
255
|
-
t,
|
|
256
|
-
!1,
|
|
257
|
-
n,
|
|
258
|
-
d,
|
|
259
|
-
l ? Error("react-stack-top-frame") : F,
|
|
260
|
-
l ? h(c(e)) : I
|
|
261
|
-
);
|
|
262
|
-
}, b.jsxs = function(e, r, t, n, d) {
|
|
263
|
-
var l = 1e4 > x.recentlyCreatedOwnerStacks++;
|
|
264
|
-
return A(
|
|
265
|
-
e,
|
|
266
|
-
r,
|
|
267
|
-
t,
|
|
268
|
-
!0,
|
|
269
|
-
n,
|
|
270
|
-
d,
|
|
271
|
-
l ? Error("react-stack-top-frame") : F,
|
|
272
|
-
l ? h(c(e)) : I
|
|
273
|
-
);
|
|
274
|
-
};
|
|
275
|
-
})()), b;
|
|
276
|
-
}
|
|
277
|
-
var M;
|
|
278
|
-
function ae() {
|
|
279
|
-
return M || (M = 1, process.env.NODE_ENV === "production" ? T.exports = ne() : T.exports = oe()), T.exports;
|
|
280
|
-
}
|
|
281
|
-
var f = ae();
|
|
282
|
-
function k(s, u) {
|
|
283
|
-
return [s, u].filter(Boolean).join(" ");
|
|
284
|
-
}
|
|
285
|
-
function ce({
|
|
286
|
-
visible: s = !1,
|
|
287
|
-
onClose: u,
|
|
288
|
-
children: m = "tiny-react-dialog: children is missing",
|
|
289
|
-
classNames: c = {}
|
|
290
|
-
}) {
|
|
291
|
-
return /* @__PURE__ */ f.jsx(f.Fragment, { children: s && /* @__PURE__ */ f.jsx(
|
|
292
|
-
"div",
|
|
293
|
-
{
|
|
294
|
-
className: k(
|
|
295
|
-
"tiny-react-dialog__overlay",
|
|
296
|
-
c?.overlay
|
|
297
|
-
),
|
|
298
|
-
onClick: u,
|
|
299
|
-
children: /* @__PURE__ */ f.jsxs(
|
|
300
|
-
"div",
|
|
301
|
-
{
|
|
302
|
-
className: k(
|
|
303
|
-
"tiny-react-dialog__container",
|
|
304
|
-
c?.container
|
|
305
|
-
),
|
|
306
|
-
onClick: (a) => a.stopPropagation(),
|
|
307
|
-
children: [
|
|
308
|
-
/* @__PURE__ */ f.jsx(
|
|
309
|
-
"div",
|
|
310
|
-
{
|
|
311
|
-
className: k(
|
|
312
|
-
"tiny-react-dialog__content",
|
|
313
|
-
c?.content
|
|
314
|
-
),
|
|
315
|
-
children: m
|
|
316
|
-
}
|
|
317
|
-
),
|
|
318
|
-
/* @__PURE__ */ f.jsx(
|
|
319
|
-
"button",
|
|
320
|
-
{
|
|
321
|
-
className: k(
|
|
322
|
-
"tiny-react-dialog__close",
|
|
323
|
-
c?.close
|
|
324
|
-
),
|
|
325
|
-
onClick: u,
|
|
326
|
-
children: /* @__PURE__ */ f.jsxs(
|
|
327
|
-
"svg",
|
|
328
|
-
{
|
|
329
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
330
|
-
width: "16",
|
|
331
|
-
height: "16",
|
|
332
|
-
viewBox: "0 0 24 24",
|
|
333
|
-
fill: "none",
|
|
334
|
-
stroke: "currentColor",
|
|
335
|
-
strokeWidth: "2",
|
|
336
|
-
strokeLinecap: "round",
|
|
337
|
-
strokeLinejoin: "round",
|
|
338
|
-
className: "lucide lucide-x-icon lucide-x",
|
|
339
|
-
children: [
|
|
340
|
-
/* @__PURE__ */ f.jsx("path", { d: "M18 6 6 18" }),
|
|
341
|
-
/* @__PURE__ */ f.jsx("path", { d: "m6 6 12 12" })
|
|
342
|
-
]
|
|
343
|
-
}
|
|
344
|
-
)
|
|
345
|
-
}
|
|
346
|
-
)
|
|
347
|
-
]
|
|
348
|
-
}
|
|
349
|
-
)
|
|
350
|
-
}
|
|
351
|
-
) });
|
|
352
|
-
}
|
|
353
|
-
export {
|
|
354
|
-
ce as TinyReactDialog
|
|
355
|
-
};
|
package/dist/index.umd.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
(function(m,R){typeof exports=="object"&&typeof module<"u"?R(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],R):(m=typeof globalThis<"u"?globalThis:m||self,R(m.TinyReactDialog={},m.React))})(this,(function(m,R){"use strict";var k={exports:{}},v={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var A;function q(){if(A)return v;A=1;var s=Symbol.for("react.transitional.element"),f=Symbol.for("react.fragment");function _(i,a,c){var p=null;if(c!==void 0&&(p=""+c),a.key!==void 0&&(p=""+a.key),"key"in a){c={};for(var T in a)T!=="key"&&(c[T]=a[T])}else c=a;return a=c.ref,{$$typeof:s,type:i,key:p,ref:a!==void 0?a:null,props:c}}return v.Fragment=f,v.jsx=_,v.jsxs=_,v}var b={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var P;function J(){return P||(P=1,process.env.NODE_ENV!=="production"&&(function(){function s(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case x:return"Fragment";case Z:return"Profiler";case H:return"StrictMode";case re:return"Suspense";case te:return"SuspenseList";case oe:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case B:return"Portal";case K:return(e.displayName||"Context")+".Provider";case Q:return(e._context.displayName||"Context")+".Consumer";case ee:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ne:return r=e.displayName||null,r!==null?r:s(e.type)||"Memo";case F:r=e._payload,e=e._init;try{return s(e(r))}catch{}}return null}function f(e){return""+e}function _(e){try{f(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),f(e)}}function i(e){if(e===x)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===F)return"<...>";try{var r=s(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function a(){var e=j.A;return e===null?null:e.getOwner()}function c(){return Error("react-stack-top-frame")}function p(e){if(I.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function T(e,r){function t(){L||(L=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function G(){var e=s(this.type);return M[e]||(M[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function X(e,r,t,n,d,l,O,w){return t=l.ref,e={$$typeof:D,type:e,key:r,props:l,_owner:d},(t!==void 0?t:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:G}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:O}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:w}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function C(e,r,t,n,d,l,O,w){var o=r.children;if(o!==void 0)if(n)if(se(o)){for(n=0;n<o.length;n++)Y(o[n]);Object.freeze&&Object.freeze(o)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Y(o);if(I.call(r,"key")){o=s(e);var E=Object.keys(r).filter(function(ie){return ie!=="key"});n=0<E.length?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}",U[o+n]||(E=0<E.length?"{"+E.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
-
let props = %s;
|
|
19
|
-
<%s {...props} />
|
|
20
|
-
React keys must be passed directly to JSX without using spread:
|
|
21
|
-
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,n,o,E,o),U[o+n]=!0)}if(o=null,t!==void 0&&(_(t),o=""+t),p(r)&&(_(r.key),o=""+r.key),"key"in r){t={};for(var S in r)S!=="key"&&(t[S]=r[S])}else t=r;return o&&T(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),X(e,o,l,d,a(),t,O,w)}function Y(e){typeof e=="object"&&e!==null&&e.$$typeof===D&&e._store&&(e._store.validated=1)}var h=R,D=Symbol.for("react.transitional.element"),B=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),K=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),ae=Symbol.for("react.client.reference"),j=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,se=Array.isArray,y=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(e){return e()}};var L,M={},$=h.react_stack_bottom_frame.bind(h,c)(),W=y(i(c)),U={};b.Fragment=x,b.jsx=function(e,r,t,n,d){var l=1e4>j.recentlyCreatedOwnerStacks++;return C(e,r,t,!1,n,d,l?Error("react-stack-top-frame"):$,l?y(i(e)):W)},b.jsxs=function(e,r,t,n,d){var l=1e4>j.recentlyCreatedOwnerStacks++;return C(e,r,t,!0,n,d,l?Error("react-stack-top-frame"):$,l?y(i(e)):W)}})()),b}var N;function z(){return N||(N=1,process.env.NODE_ENV==="production"?k.exports=q():k.exports=J()),k.exports}var u=z();function g(s,f){return[s,f].filter(Boolean).join(" ")}function V({visible:s=!1,onClose:f,children:_="tiny-react-dialog: children is missing",classNames:i={}}){return u.jsx(u.Fragment,{children:s&&u.jsx("div",{className:g("tiny-react-dialog__overlay",i?.overlay),onClick:f,children:u.jsxs("div",{className:g("tiny-react-dialog__container",i?.container),onClick:a=>a.stopPropagation(),children:[u.jsx("div",{className:g("tiny-react-dialog__content",i?.content),children:_}),u.jsx("button",{className:g("tiny-react-dialog__close",i?.close),onClick:f,children:u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x-icon lucide-x",children:[u.jsx("path",{d:"M18 6 6 18"}),u.jsx("path",{d:"m6 6 12 12"})]})})]})})})}m.TinyReactDialog=V,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/tinyReactDialog.css
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
.tiny-react-dialog__overlay {
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
right: 0;
|
|
5
|
-
bottom: 0;
|
|
6
|
-
left: 0;
|
|
7
|
-
z-index: 50;
|
|
8
|
-
background-color: oklch(0.215 0 0 / 0.5);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.tiny-react-dialog__container {
|
|
12
|
-
background-color: oklch(0.995 0 0);
|
|
13
|
-
position: fixed;
|
|
14
|
-
top: 50%;
|
|
15
|
-
left: 50%;
|
|
16
|
-
z-index: 51;
|
|
17
|
-
display: grid;
|
|
18
|
-
width: 100%;
|
|
19
|
-
max-width: calc(100% - 2rem);
|
|
20
|
-
transform: translate(-50%, -50%);
|
|
21
|
-
gap: 1rem;
|
|
22
|
-
border-radius: 0.5rem;
|
|
23
|
-
border: 1px solid oklch(0.927 0 0);
|
|
24
|
-
padding: 1.5rem;
|
|
25
|
-
box-shadow:
|
|
26
|
-
0 10px 15px -3px oklch(0 0 0 / 0.1),
|
|
27
|
-
0 4px 6px -2px oklch(0 0 0 / 0.05);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.tiny-react-dialog__content {
|
|
31
|
-
display: flex;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
gap: 0.5rem;
|
|
34
|
-
text-align: center;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.tiny-react-dialog__close {
|
|
38
|
-
position: absolute;
|
|
39
|
-
top: 1rem;
|
|
40
|
-
right: 1rem;
|
|
41
|
-
border-radius: 0.125rem;
|
|
42
|
-
opacity: 0.7;
|
|
43
|
-
background: transparent;
|
|
44
|
-
border: none;
|
|
45
|
-
cursor: pointer;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.tiny-react-dialog__close:hover {
|
|
49
|
-
opacity: 1;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.tiny-react-dialog__close:focus {
|
|
53
|
-
outline: none;
|
|
54
|
-
box-shadow: 0 0 0 2px oklch(0.708 0 0);
|
|
55
|
-
outline-offset: 2px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.tiny-react-dialog__close svg {
|
|
59
|
-
pointer-events: none;
|
|
60
|
-
flex-shrink: 0;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
@media (min-width: 640px) {
|
|
64
|
-
.tiny-react-dialog__container {
|
|
65
|
-
max-width: 425px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.tiny-react-dialog__content {
|
|
69
|
-
text-align: left;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function mergeClassnames(baseClassname: string, addedClassNames: string | undefined): string;
|