@sudobility/design-components 1.1.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +196 -458
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +0 -4
- package/dist/badge-designer.d.ts +0 -33
- package/dist/badge-designer.d.ts.map +0 -1
- package/dist/color-picker-advanced.d.ts +0 -8
- package/dist/color-picker-advanced.d.ts.map +0 -1
- package/dist/color-picker.d.ts +0 -42
- package/dist/color-picker.d.ts.map +0 -1
- package/dist/color-swatch.d.ts +0 -41
- package/dist/color-swatch.d.ts.map +0 -1
- package/src/badge-designer.tsx +0 -60
- package/src/color-picker-advanced.tsx +0 -51
- package/src/color-picker.tsx +0 -188
- package/src/color-swatch.tsx +0 -151
package/dist/index.esm.js
CHANGED
|
@@ -1,149 +1,149 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { cn as
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
var
|
|
11
|
-
if (
|
|
12
|
-
|
|
13
|
-
for (var
|
|
14
|
-
|
|
15
|
-
} else
|
|
16
|
-
return u =
|
|
17
|
-
$$typeof:
|
|
18
|
-
type:
|
|
19
|
-
key:
|
|
1
|
+
import re from "react";
|
|
2
|
+
import { cn as k } from "@sudobility/components";
|
|
3
|
+
var E = { exports: {} }, b = {};
|
|
4
|
+
var D;
|
|
5
|
+
function te() {
|
|
6
|
+
if (D) return b;
|
|
7
|
+
D = 1;
|
|
8
|
+
var l = Symbol.for("react.transitional.element"), i = Symbol.for("react.fragment");
|
|
9
|
+
function n(s, u, c) {
|
|
10
|
+
var d = null;
|
|
11
|
+
if (c !== void 0 && (d = "" + c), u.key !== void 0 && (d = "" + u.key), "key" in u) {
|
|
12
|
+
c = {};
|
|
13
|
+
for (var f in u)
|
|
14
|
+
f !== "key" && (c[f] = u[f]);
|
|
15
|
+
} else c = u;
|
|
16
|
+
return u = c.ref, {
|
|
17
|
+
$$typeof: l,
|
|
18
|
+
type: s,
|
|
19
|
+
key: d,
|
|
20
20
|
ref: u !== void 0 ? u : null,
|
|
21
|
-
props:
|
|
21
|
+
props: c
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return b.Fragment = i, b.jsx = n, b.jsxs = n, b;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
27
|
-
var
|
|
26
|
+
var g = {};
|
|
27
|
+
var L;
|
|
28
28
|
function oe() {
|
|
29
|
-
return
|
|
30
|
-
function
|
|
29
|
+
return L || (L = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
30
|
+
function l(e) {
|
|
31
31
|
if (e == null) return null;
|
|
32
32
|
if (typeof e == "function")
|
|
33
|
-
return e.$$typeof ===
|
|
33
|
+
return e.$$typeof === Q ? null : e.displayName || e.name || null;
|
|
34
34
|
if (typeof e == "string") return e;
|
|
35
35
|
switch (e) {
|
|
36
|
-
case
|
|
36
|
+
case T:
|
|
37
37
|
return "Fragment";
|
|
38
|
-
case
|
|
38
|
+
case q:
|
|
39
39
|
return "Profiler";
|
|
40
|
-
case
|
|
40
|
+
case V:
|
|
41
41
|
return "StrictMode";
|
|
42
42
|
case X:
|
|
43
43
|
return "Suspense";
|
|
44
|
-
case
|
|
44
|
+
case B:
|
|
45
45
|
return "SuspenseList";
|
|
46
|
-
case
|
|
46
|
+
case Z:
|
|
47
47
|
return "Activity";
|
|
48
48
|
}
|
|
49
49
|
if (typeof e == "object")
|
|
50
50
|
switch (typeof e.tag == "number" && console.error(
|
|
51
51
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
52
52
|
), e.$$typeof) {
|
|
53
|
-
case
|
|
53
|
+
case W:
|
|
54
54
|
return "Portal";
|
|
55
55
|
case J:
|
|
56
56
|
return e.displayName || "Context";
|
|
57
|
-
case
|
|
57
|
+
case z:
|
|
58
58
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
59
59
|
case G:
|
|
60
|
-
var
|
|
61
|
-
return e = e.displayName, e || (e =
|
|
62
|
-
case
|
|
63
|
-
return
|
|
64
|
-
case
|
|
65
|
-
|
|
60
|
+
var r = e.render;
|
|
61
|
+
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
62
|
+
case H:
|
|
63
|
+
return r = e.displayName || null, r !== null ? r : l(e.type) || "Memo";
|
|
64
|
+
case x:
|
|
65
|
+
r = e._payload, e = e._init;
|
|
66
66
|
try {
|
|
67
|
-
return
|
|
67
|
+
return l(e(r));
|
|
68
68
|
} catch {
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function i(e) {
|
|
74
74
|
return "" + e;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function n(e) {
|
|
77
77
|
try {
|
|
78
|
-
|
|
79
|
-
var
|
|
78
|
+
i(e);
|
|
79
|
+
var r = !1;
|
|
80
80
|
} catch {
|
|
81
|
-
|
|
81
|
+
r = !0;
|
|
82
82
|
}
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
var
|
|
86
|
-
return
|
|
87
|
-
|
|
83
|
+
if (r) {
|
|
84
|
+
r = console;
|
|
85
|
+
var t = r.error, o = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
86
|
+
return t.call(
|
|
87
|
+
r,
|
|
88
88
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
89
|
-
|
|
90
|
-
),
|
|
89
|
+
o
|
|
90
|
+
), i(e);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
if (e ===
|
|
95
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
93
|
+
function s(e) {
|
|
94
|
+
if (e === T) return "<>";
|
|
95
|
+
if (typeof e == "object" && e !== null && e.$$typeof === x)
|
|
96
96
|
return "<...>";
|
|
97
97
|
try {
|
|
98
|
-
var
|
|
99
|
-
return
|
|
98
|
+
var r = l(e);
|
|
99
|
+
return r ? "<" + r + ">" : "<...>";
|
|
100
100
|
} catch {
|
|
101
101
|
return "<...>";
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
function u() {
|
|
105
|
-
var e =
|
|
105
|
+
var e = w.A;
|
|
106
106
|
return e === null ? null : e.getOwner();
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function c() {
|
|
109
109
|
return Error("react-stack-top-frame");
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
if (
|
|
113
|
-
var
|
|
114
|
-
if (
|
|
111
|
+
function d(e) {
|
|
112
|
+
if (C.call(e, "key")) {
|
|
113
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
114
|
+
if (r && r.isReactWarning) return !1;
|
|
115
115
|
}
|
|
116
116
|
return e.key !== void 0;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
function
|
|
120
|
-
|
|
118
|
+
function f(e, r) {
|
|
119
|
+
function t() {
|
|
120
|
+
U || (U = !0, console.error(
|
|
121
121
|
"%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)",
|
|
122
|
-
|
|
122
|
+
r
|
|
123
123
|
));
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
get:
|
|
125
|
+
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
126
|
+
get: t,
|
|
127
127
|
configurable: !0
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
var e =
|
|
132
|
-
return
|
|
130
|
+
function y() {
|
|
131
|
+
var e = l(this.type);
|
|
132
|
+
return Y[e] || (Y[e] = !0, console.error(
|
|
133
133
|
"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."
|
|
134
134
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
var
|
|
136
|
+
function h(e, r, t, o, _, A) {
|
|
137
|
+
var a = t.ref;
|
|
138
138
|
return e = {
|
|
139
|
-
$$typeof:
|
|
139
|
+
$$typeof: N,
|
|
140
140
|
type: e,
|
|
141
|
-
key:
|
|
142
|
-
props:
|
|
143
|
-
_owner:
|
|
144
|
-
}, (
|
|
141
|
+
key: r,
|
|
142
|
+
props: t,
|
|
143
|
+
_owner: o
|
|
144
|
+
}, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
|
|
145
145
|
enumerable: !1,
|
|
146
|
-
get:
|
|
146
|
+
get: y
|
|
147
147
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
148
148
|
configurable: !1,
|
|
149
149
|
enumerable: !1,
|
|
@@ -158,481 +158,219 @@ function oe() {
|
|
|
158
158
|
configurable: !1,
|
|
159
159
|
enumerable: !1,
|
|
160
160
|
writable: !0,
|
|
161
|
-
value:
|
|
161
|
+
value: _
|
|
162
162
|
}), Object.defineProperty(e, "_debugTask", {
|
|
163
163
|
configurable: !1,
|
|
164
164
|
enumerable: !1,
|
|
165
165
|
writable: !0,
|
|
166
|
-
value:
|
|
166
|
+
value: A
|
|
167
167
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
var
|
|
171
|
-
if (
|
|
172
|
-
if (
|
|
173
|
-
if (
|
|
174
|
-
for (
|
|
175
|
-
|
|
176
|
-
Object.freeze && Object.freeze(
|
|
169
|
+
function p(e, r, t, o, _, A) {
|
|
170
|
+
var a = r.children;
|
|
171
|
+
if (a !== void 0)
|
|
172
|
+
if (o)
|
|
173
|
+
if (K(a)) {
|
|
174
|
+
for (o = 0; o < a.length; o++)
|
|
175
|
+
j(a[o]);
|
|
176
|
+
Object.freeze && Object.freeze(a);
|
|
177
177
|
} else
|
|
178
178
|
console.error(
|
|
179
179
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
180
180
|
);
|
|
181
|
-
else
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
var
|
|
185
|
-
return
|
|
181
|
+
else j(a);
|
|
182
|
+
if (C.call(r, "key")) {
|
|
183
|
+
a = l(e);
|
|
184
|
+
var m = Object.keys(r).filter(function(ee) {
|
|
185
|
+
return ee !== "key";
|
|
186
186
|
});
|
|
187
|
-
|
|
187
|
+
o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", F[a + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
188
188
|
`A props object containing a "key" prop is being spread into JSX:
|
|
189
189
|
let props = %s;
|
|
190
190
|
<%s {...props} />
|
|
191
191
|
React keys must be passed directly to JSX without using spread:
|
|
192
192
|
let props = %s;
|
|
193
193
|
<%s key={someKey} {...props} />`,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
),
|
|
194
|
+
o,
|
|
195
|
+
a,
|
|
196
|
+
m,
|
|
197
|
+
a
|
|
198
|
+
), F[a + o] = !0);
|
|
199
199
|
}
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
for (var
|
|
203
|
-
|
|
204
|
-
} else
|
|
205
|
-
return
|
|
206
|
-
|
|
200
|
+
if (a = null, t !== void 0 && (n(t), a = "" + t), d(r) && (n(r.key), a = "" + r.key), "key" in r) {
|
|
201
|
+
t = {};
|
|
202
|
+
for (var S in r)
|
|
203
|
+
S !== "key" && (t[S] = r[S]);
|
|
204
|
+
} else t = r;
|
|
205
|
+
return a && f(
|
|
206
|
+
t,
|
|
207
207
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
208
|
-
),
|
|
208
|
+
), h(
|
|
209
209
|
e,
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
a,
|
|
211
|
+
t,
|
|
212
212
|
u(),
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
_,
|
|
214
|
+
A
|
|
215
215
|
);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
|
|
217
|
+
function j(e) {
|
|
218
|
+
P(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === x && (e._payload.status === "fulfilled" ? P(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
220
|
+
function P(e) {
|
|
221
|
+
return typeof e == "object" && e !== null && e.$$typeof === N;
|
|
222
222
|
}
|
|
223
|
-
var
|
|
223
|
+
var v = re, N = Symbol.for("react.transitional.element"), W = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), V = Symbol.for("react.strict_mode"), q = Symbol.for("react.profiler"), z = Symbol.for("react.consumer"), J = Symbol.for("react.context"), G = Symbol.for("react.forward_ref"), X = Symbol.for("react.suspense"), B = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), Z = Symbol.for("react.activity"), Q = Symbol.for("react.client.reference"), w = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = Object.prototype.hasOwnProperty, K = Array.isArray, O = console.createTask ? console.createTask : function() {
|
|
224
224
|
return null;
|
|
225
225
|
};
|
|
226
|
-
|
|
226
|
+
v = {
|
|
227
227
|
react_stack_bottom_frame: function(e) {
|
|
228
228
|
return e();
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
var
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
)(),
|
|
235
|
-
|
|
236
|
-
var
|
|
237
|
-
return
|
|
231
|
+
var U, Y = {}, $ = v.react_stack_bottom_frame.bind(
|
|
232
|
+
v,
|
|
233
|
+
c
|
|
234
|
+
)(), I = O(s(c)), F = {};
|
|
235
|
+
g.Fragment = T, g.jsx = function(e, r, t) {
|
|
236
|
+
var o = 1e4 > w.recentlyCreatedOwnerStacks++;
|
|
237
|
+
return p(
|
|
238
238
|
e,
|
|
239
|
+
r,
|
|
239
240
|
t,
|
|
240
|
-
i,
|
|
241
241
|
!1,
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
o ? Error("react-stack-top-frame") : $,
|
|
243
|
+
o ? O(s(e)) : I
|
|
244
244
|
);
|
|
245
|
-
},
|
|
246
|
-
var
|
|
247
|
-
return
|
|
245
|
+
}, g.jsxs = function(e, r, t) {
|
|
246
|
+
var o = 1e4 > w.recentlyCreatedOwnerStacks++;
|
|
247
|
+
return p(
|
|
248
248
|
e,
|
|
249
|
+
r,
|
|
249
250
|
t,
|
|
250
|
-
i,
|
|
251
251
|
!0,
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
o ? Error("react-stack-top-frame") : $,
|
|
253
|
+
o ? O(s(e)) : I
|
|
254
254
|
);
|
|
255
255
|
};
|
|
256
|
-
})()),
|
|
256
|
+
})()), g;
|
|
257
257
|
}
|
|
258
|
-
var
|
|
259
|
-
function
|
|
260
|
-
return
|
|
258
|
+
var M;
|
|
259
|
+
function ae() {
|
|
260
|
+
return M || (M = 1, process.env.NODE_ENV === "production" ? E.exports = te() : E.exports = oe()), E.exports;
|
|
261
261
|
}
|
|
262
|
-
var
|
|
263
|
-
const
|
|
264
|
-
className:
|
|
265
|
-
children:
|
|
266
|
-
disabled:
|
|
267
|
-
onClick:
|
|
268
|
-
}) => /* @__PURE__ */
|
|
262
|
+
var R = ae();
|
|
263
|
+
const se = ({
|
|
264
|
+
className: l,
|
|
265
|
+
children: i,
|
|
266
|
+
disabled: n = !1,
|
|
267
|
+
onClick: s
|
|
268
|
+
}) => /* @__PURE__ */ R.jsx(
|
|
269
269
|
"div",
|
|
270
270
|
{
|
|
271
|
-
className:
|
|
271
|
+
className: k(
|
|
272
272
|
"p-4 rounded-lg border transition-colors",
|
|
273
273
|
"bg-white dark:bg-gray-900",
|
|
274
274
|
"border-gray-200 dark:border-gray-700",
|
|
275
275
|
"text-gray-900 dark:text-white",
|
|
276
|
-
|
|
276
|
+
n && "opacity-50 cursor-not-allowed",
|
|
277
277
|
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
278
|
-
|
|
278
|
+
l
|
|
279
279
|
),
|
|
280
|
-
onClick:
|
|
280
|
+
onClick: n ? void 0 : s,
|
|
281
281
|
role: "region",
|
|
282
282
|
"aria-label": "UauroraUbackground",
|
|
283
|
-
children:
|
|
284
|
-
}
|
|
285
|
-
), ce = ({
|
|
286
|
-
className: a,
|
|
287
|
-
children: l,
|
|
288
|
-
disabled: o = !1,
|
|
289
|
-
onClick: c
|
|
290
|
-
}) => /* @__PURE__ */ r.jsx(
|
|
291
|
-
"div",
|
|
292
|
-
{
|
|
293
|
-
className: h(
|
|
294
|
-
"p-4 rounded-lg border transition-colors",
|
|
295
|
-
"bg-white dark:bg-gray-900",
|
|
296
|
-
"border-gray-200 dark:border-gray-700",
|
|
297
|
-
"text-gray-900 dark:text-white",
|
|
298
|
-
o && "opacity-50 cursor-not-allowed",
|
|
299
|
-
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
300
|
-
a
|
|
301
|
-
),
|
|
302
|
-
onClick: o ? void 0 : c,
|
|
303
|
-
role: "region",
|
|
304
|
-
"aria-label": "UbadgeUdesigner",
|
|
305
|
-
children: l || "UbadgeUdesigner Component"
|
|
283
|
+
children: i || "UauroraUbackground Component"
|
|
306
284
|
}
|
|
307
285
|
), ue = ({
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}) => {
|
|
313
|
-
const g = o || [
|
|
314
|
-
"#000000",
|
|
315
|
-
"#ffffff",
|
|
316
|
-
"#ff0000",
|
|
317
|
-
"#00ff00",
|
|
318
|
-
"#0000ff",
|
|
319
|
-
"#ffff00",
|
|
320
|
-
"#ff00ff",
|
|
321
|
-
"#00ffff"
|
|
322
|
-
];
|
|
323
|
-
return /* @__PURE__ */ r.jsxs("div", { className: h("space-y-3", c), children: [
|
|
324
|
-
/* @__PURE__ */ r.jsx(
|
|
325
|
-
"input",
|
|
326
|
-
{
|
|
327
|
-
type: "color",
|
|
328
|
-
value: a,
|
|
329
|
-
onChange: (m) => l(m.target.value),
|
|
330
|
-
className: "w-full h-12 rounded cursor-pointer"
|
|
331
|
-
}
|
|
332
|
-
),
|
|
333
|
-
/* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-8 gap-2", children: g.map((m) => /* @__PURE__ */ r.jsx(
|
|
334
|
-
"button",
|
|
335
|
-
{
|
|
336
|
-
onClick: () => l(m),
|
|
337
|
-
className: h(
|
|
338
|
-
"w-8 h-8 rounded border-2",
|
|
339
|
-
a === m ? "border-blue-500" : "border-transparent"
|
|
340
|
-
),
|
|
341
|
-
style: { backgroundColor: m }
|
|
342
|
-
},
|
|
343
|
-
m
|
|
344
|
-
)) })
|
|
345
|
-
] });
|
|
346
|
-
}, de = ({
|
|
347
|
-
value: a,
|
|
348
|
-
onChange: l,
|
|
349
|
-
presets: o = [
|
|
350
|
-
"#000000",
|
|
351
|
-
"#FFFFFF",
|
|
352
|
-
"#FF6B6B",
|
|
353
|
-
"#4ECDC4",
|
|
354
|
-
"#45B7D1",
|
|
355
|
-
"#FFA07A",
|
|
356
|
-
"#F7DC6F",
|
|
357
|
-
"#BB8FCE",
|
|
358
|
-
"#85C1E2",
|
|
359
|
-
"#F8B500",
|
|
360
|
-
"#52B788",
|
|
361
|
-
"#E63946",
|
|
362
|
-
"#1D3557",
|
|
363
|
-
"#457B9D",
|
|
364
|
-
"#A8DADC",
|
|
365
|
-
"#F4A261",
|
|
366
|
-
"#264653",
|
|
367
|
-
"#2A9D8F"
|
|
368
|
-
],
|
|
369
|
-
showInput: c = !0,
|
|
370
|
-
showOpacity: u = !1,
|
|
371
|
-
className: g
|
|
372
|
-
}) => {
|
|
373
|
-
const [m, b] = D(a), [p, v] = D(100), y = (s) => {
|
|
374
|
-
l(s), b(s);
|
|
375
|
-
}, w = (s) => {
|
|
376
|
-
const x = s.target.value;
|
|
377
|
-
b(x), /^#[0-9A-F]{6}$/i.test(x) && l(x);
|
|
378
|
-
}, E = (s) => {
|
|
379
|
-
v(Number(s.target.value));
|
|
380
|
-
}, k = u ? ((s, x) => {
|
|
381
|
-
const _ = parseInt(s.slice(1, 3), 16), A = parseInt(s.slice(3, 5), 16), P = parseInt(s.slice(5, 7), 16);
|
|
382
|
-
return `rgba(${_}, ${A}, ${P}, ${x / 100})`;
|
|
383
|
-
})(a, p) : a;
|
|
384
|
-
return /* @__PURE__ */ r.jsxs("div", { className: h("bg-white dark:bg-gray-900 rounded-lg p-4", g), children: [
|
|
385
|
-
/* @__PURE__ */ r.jsx("div", { className: "mb-4", children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
386
|
-
/* @__PURE__ */ r.jsx(
|
|
387
|
-
"div",
|
|
388
|
-
{
|
|
389
|
-
className: "w-16 h-16 rounded-lg border-2 border-gray-200 dark:border-gray-700 shadow-sm",
|
|
390
|
-
style: { backgroundColor: k }
|
|
391
|
-
}
|
|
392
|
-
),
|
|
393
|
-
/* @__PURE__ */ r.jsxs("div", { className: "flex-1", children: [
|
|
394
|
-
/* @__PURE__ */ r.jsx("p", { className: "text-sm font-medium text-gray-900 dark:text-white", children: "Selected Color" }),
|
|
395
|
-
/* @__PURE__ */ r.jsxs("p", { className: "text-xs text-gray-600 dark:text-gray-400 mt-1 font-mono", children: [
|
|
396
|
-
a,
|
|
397
|
-
u && ` (${p}%)`
|
|
398
|
-
] })
|
|
399
|
-
] })
|
|
400
|
-
] }) }),
|
|
401
|
-
/* @__PURE__ */ r.jsxs("div", { className: "mb-4", children: [
|
|
402
|
-
/* @__PURE__ */ r.jsx("p", { className: "text-sm font-medium text-gray-700 dark:text-gray-300 mb-2", children: "Preset Colors" }),
|
|
403
|
-
/* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-6 gap-2", children: o.map((s) => /* @__PURE__ */ r.jsx(
|
|
404
|
-
"button",
|
|
405
|
-
{
|
|
406
|
-
onClick: () => y(s),
|
|
407
|
-
className: h(
|
|
408
|
-
"w-full aspect-square rounded-md border-2 transition-all hover:scale-110",
|
|
409
|
-
s === a ? "border-blue-500 dark:border-blue-400 ring-2 ring-blue-200 dark:ring-blue-800" : "border-gray-200 dark:border-gray-700"
|
|
410
|
-
),
|
|
411
|
-
style: { backgroundColor: s },
|
|
412
|
-
"aria-label": `Select color ${s}`
|
|
413
|
-
},
|
|
414
|
-
s
|
|
415
|
-
)) })
|
|
416
|
-
] }),
|
|
417
|
-
c && /* @__PURE__ */ r.jsxs("div", { className: "mb-4", children: [
|
|
418
|
-
/* @__PURE__ */ r.jsx("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2", children: "Custom Color (Hex)" }),
|
|
419
|
-
/* @__PURE__ */ r.jsxs("div", { className: "flex gap-2", children: [
|
|
420
|
-
/* @__PURE__ */ r.jsx(
|
|
421
|
-
"input",
|
|
422
|
-
{
|
|
423
|
-
type: "text",
|
|
424
|
-
value: m,
|
|
425
|
-
onChange: w,
|
|
426
|
-
placeholder: "#000000",
|
|
427
|
-
className: "flex-1 px-3 py-2 text-sm font-mono bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"
|
|
428
|
-
}
|
|
429
|
-
),
|
|
430
|
-
/* @__PURE__ */ r.jsx(
|
|
431
|
-
"input",
|
|
432
|
-
{
|
|
433
|
-
type: "color",
|
|
434
|
-
value: a,
|
|
435
|
-
onChange: (s) => y(s.target.value),
|
|
436
|
-
className: "w-12 h-10 rounded-md cursor-pointer"
|
|
437
|
-
}
|
|
438
|
-
)
|
|
439
|
-
] })
|
|
440
|
-
] }),
|
|
441
|
-
u && /* @__PURE__ */ r.jsxs("div", { children: [
|
|
442
|
-
/* @__PURE__ */ r.jsxs("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2", children: [
|
|
443
|
-
"Opacity: ",
|
|
444
|
-
p,
|
|
445
|
-
"%"
|
|
446
|
-
] }),
|
|
447
|
-
/* @__PURE__ */ r.jsx(
|
|
448
|
-
"input",
|
|
449
|
-
{
|
|
450
|
-
type: "range",
|
|
451
|
-
min: "0",
|
|
452
|
-
max: "100",
|
|
453
|
-
value: p,
|
|
454
|
-
onChange: E,
|
|
455
|
-
className: "w-full h-2 bg-gray-200 dark:bg-gray-700 rounded-lg appearance-none cursor-pointer"
|
|
456
|
-
}
|
|
457
|
-
)
|
|
458
|
-
] })
|
|
459
|
-
] });
|
|
460
|
-
}, fe = ({
|
|
461
|
-
colors: a,
|
|
462
|
-
selectedColor: l,
|
|
463
|
-
onColorSelect: o,
|
|
464
|
-
size: c = "md",
|
|
465
|
-
showNames: u = !1,
|
|
466
|
-
showCopy: g = !1,
|
|
467
|
-
className: m
|
|
468
|
-
}) => {
|
|
469
|
-
const [b, p] = D(null), v = {
|
|
470
|
-
sm: "w-8 h-8",
|
|
471
|
-
md: "w-12 h-12",
|
|
472
|
-
lg: "w-16 h-16"
|
|
473
|
-
}, y = () => a.map(
|
|
474
|
-
(n) => typeof n == "string" ? { hex: n } : n
|
|
475
|
-
), w = async (n, k) => {
|
|
476
|
-
k.stopPropagation(), await navigator.clipboard.writeText(n), p(n), setTimeout(() => p(null), 2e3);
|
|
477
|
-
}, E = y();
|
|
478
|
-
return /* @__PURE__ */ r.jsx("div", { className: h("flex flex-wrap gap-3", m), children: E.map((n, k) => {
|
|
479
|
-
const s = l === n.hex, x = b === n.hex;
|
|
480
|
-
return /* @__PURE__ */ r.jsxs("div", { className: "flex flex-col items-center gap-2", children: [
|
|
481
|
-
/* @__PURE__ */ r.jsx(
|
|
482
|
-
"button",
|
|
483
|
-
{
|
|
484
|
-
onClick: () => o?.(n.hex),
|
|
485
|
-
className: h(
|
|
486
|
-
"rounded-lg transition-all relative group",
|
|
487
|
-
v[c],
|
|
488
|
-
s && "ring-2 ring-blue-500 ring-offset-2 dark:ring-offset-gray-900",
|
|
489
|
-
!s && "hover:scale-110"
|
|
490
|
-
),
|
|
491
|
-
style: { backgroundColor: n.hex },
|
|
492
|
-
"aria-label": n.name || n.hex,
|
|
493
|
-
children: g && /* @__PURE__ */ r.jsx(
|
|
494
|
-
"div",
|
|
495
|
-
{
|
|
496
|
-
className: "absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/50 rounded-lg",
|
|
497
|
-
onClick: (_) => w(n.hex, _),
|
|
498
|
-
children: x ? /* @__PURE__ */ r.jsx(
|
|
499
|
-
"svg",
|
|
500
|
-
{
|
|
501
|
-
className: "w-4 h-4 text-white",
|
|
502
|
-
fill: "none",
|
|
503
|
-
stroke: "currentColor",
|
|
504
|
-
viewBox: "0 0 24 24",
|
|
505
|
-
children: /* @__PURE__ */ r.jsx(
|
|
506
|
-
"path",
|
|
507
|
-
{
|
|
508
|
-
strokeLinecap: "round",
|
|
509
|
-
strokeLinejoin: "round",
|
|
510
|
-
strokeWidth: 2,
|
|
511
|
-
d: "M5 13l4 4L19 7"
|
|
512
|
-
}
|
|
513
|
-
)
|
|
514
|
-
}
|
|
515
|
-
) : /* @__PURE__ */ r.jsx(
|
|
516
|
-
"svg",
|
|
517
|
-
{
|
|
518
|
-
className: "w-4 h-4 text-white",
|
|
519
|
-
fill: "none",
|
|
520
|
-
stroke: "currentColor",
|
|
521
|
-
viewBox: "0 0 24 24",
|
|
522
|
-
children: /* @__PURE__ */ r.jsx(
|
|
523
|
-
"path",
|
|
524
|
-
{
|
|
525
|
-
strokeLinecap: "round",
|
|
526
|
-
strokeLinejoin: "round",
|
|
527
|
-
strokeWidth: 2,
|
|
528
|
-
d: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"
|
|
529
|
-
}
|
|
530
|
-
)
|
|
531
|
-
}
|
|
532
|
-
)
|
|
533
|
-
}
|
|
534
|
-
)
|
|
535
|
-
}
|
|
536
|
-
),
|
|
537
|
-
u && /* @__PURE__ */ r.jsxs("div", { className: "text-center", children: [
|
|
538
|
-
n.name && /* @__PURE__ */ r.jsx("p", { className: "text-xs font-medium text-gray-900 dark:text-white", children: n.name }),
|
|
539
|
-
/* @__PURE__ */ r.jsx("p", { className: "text-xs text-gray-600 dark:text-gray-400 font-mono", children: n.hex })
|
|
540
|
-
] })
|
|
541
|
-
] }, k);
|
|
542
|
-
}) });
|
|
543
|
-
}, ge = ({
|
|
544
|
-
children: a,
|
|
545
|
-
variant: l = "blue-purple",
|
|
546
|
-
gradientClasses: o,
|
|
547
|
-
size: c = "md",
|
|
286
|
+
children: l,
|
|
287
|
+
variant: i = "blue-purple",
|
|
288
|
+
gradientClasses: n,
|
|
289
|
+
size: s = "md",
|
|
548
290
|
rounded: u = "2xl",
|
|
549
|
-
bordered:
|
|
550
|
-
borderClasses:
|
|
551
|
-
className:
|
|
291
|
+
bordered: c = !1,
|
|
292
|
+
borderClasses: d = "border border-white/20",
|
|
293
|
+
className: f
|
|
552
294
|
}) => {
|
|
553
|
-
const
|
|
295
|
+
const y = {
|
|
554
296
|
"blue-purple": "bg-gradient-to-r from-blue-600 to-purple-600 text-white",
|
|
555
297
|
"green-blue": "bg-gradient-to-r from-green-600 to-blue-600 text-white",
|
|
556
298
|
"orange-red": "bg-gradient-to-r from-orange-600 to-red-600 text-white",
|
|
557
299
|
gray: "bg-gradient-to-r from-gray-600 to-gray-800 dark:from-gray-700 dark:to-gray-900 text-white",
|
|
558
300
|
light: "bg-gradient-to-r from-blue-50 to-purple-50 dark:from-blue-900/20 dark:to-purple-900/20 text-gray-900 dark:text-gray-100",
|
|
559
|
-
custom:
|
|
560
|
-
},
|
|
301
|
+
custom: n || "bg-gradient-to-r from-blue-600 to-purple-600 text-white"
|
|
302
|
+
}, h = {
|
|
561
303
|
sm: "p-4",
|
|
562
304
|
md: "p-6",
|
|
563
305
|
lg: "p-8"
|
|
564
|
-
},
|
|
306
|
+
}, p = {
|
|
565
307
|
md: "rounded-md",
|
|
566
308
|
lg: "rounded-lg",
|
|
567
309
|
xl: "rounded-xl",
|
|
568
310
|
"2xl": "rounded-2xl"
|
|
569
311
|
};
|
|
570
|
-
return /* @__PURE__ */
|
|
312
|
+
return /* @__PURE__ */ R.jsx(
|
|
571
313
|
"div",
|
|
572
314
|
{
|
|
573
|
-
className:
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
315
|
+
className: k(
|
|
316
|
+
y[i],
|
|
317
|
+
h[s],
|
|
318
|
+
p[u],
|
|
319
|
+
c && d,
|
|
320
|
+
f
|
|
579
321
|
),
|
|
580
|
-
children:
|
|
322
|
+
children: l
|
|
581
323
|
}
|
|
582
324
|
);
|
|
583
|
-
},
|
|
584
|
-
className:
|
|
585
|
-
children:
|
|
586
|
-
disabled:
|
|
587
|
-
onClick:
|
|
588
|
-
}) => /* @__PURE__ */
|
|
325
|
+
}, ie = ({
|
|
326
|
+
className: l,
|
|
327
|
+
children: i,
|
|
328
|
+
disabled: n = !1,
|
|
329
|
+
onClick: s
|
|
330
|
+
}) => /* @__PURE__ */ R.jsx(
|
|
589
331
|
"div",
|
|
590
332
|
{
|
|
591
|
-
className:
|
|
333
|
+
className: k(
|
|
592
334
|
"p-4 rounded-lg border transition-colors",
|
|
593
335
|
"bg-white dark:bg-gray-900",
|
|
594
336
|
"border-gray-200 dark:border-gray-700",
|
|
595
337
|
"text-gray-900 dark:text-white",
|
|
596
|
-
|
|
338
|
+
n && "opacity-50 cursor-not-allowed",
|
|
597
339
|
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
598
|
-
|
|
340
|
+
l
|
|
599
341
|
),
|
|
600
|
-
onClick:
|
|
342
|
+
onClick: n ? void 0 : s,
|
|
601
343
|
role: "region",
|
|
602
344
|
"aria-label": "UneumorphicUbutton",
|
|
603
|
-
children:
|
|
345
|
+
children: i || "UneumorphicUbutton Component"
|
|
604
346
|
}
|
|
605
|
-
),
|
|
606
|
-
className:
|
|
607
|
-
children:
|
|
608
|
-
disabled:
|
|
609
|
-
onClick:
|
|
610
|
-
}) => /* @__PURE__ */
|
|
347
|
+
), ce = ({
|
|
348
|
+
className: l,
|
|
349
|
+
children: i,
|
|
350
|
+
disabled: n = !1,
|
|
351
|
+
onClick: s
|
|
352
|
+
}) => /* @__PURE__ */ R.jsx(
|
|
611
353
|
"div",
|
|
612
354
|
{
|
|
613
|
-
className:
|
|
355
|
+
className: k(
|
|
614
356
|
"p-4 rounded-lg border transition-colors",
|
|
615
357
|
"bg-white dark:bg-gray-900",
|
|
616
358
|
"border-gray-200 dark:border-gray-700",
|
|
617
359
|
"text-gray-900 dark:text-white",
|
|
618
|
-
|
|
360
|
+
n && "opacity-50 cursor-not-allowed",
|
|
619
361
|
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
620
|
-
|
|
362
|
+
l
|
|
621
363
|
),
|
|
622
|
-
onClick:
|
|
364
|
+
onClick: n ? void 0 : s,
|
|
623
365
|
role: "region",
|
|
624
366
|
"aria-label": "UthemeUswitcher",
|
|
625
|
-
children:
|
|
367
|
+
children: i || "UthemeUswitcher Component"
|
|
626
368
|
}
|
|
627
369
|
);
|
|
628
370
|
export {
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
ie as UauroraUbackground,
|
|
634
|
-
ce as UbadgeUdesigner,
|
|
635
|
-
me as UneumorphicUbutton,
|
|
636
|
-
be as UthemeUswitcher
|
|
371
|
+
ue as GradientBanner,
|
|
372
|
+
se as UauroraUbackground,
|
|
373
|
+
ie as UneumorphicUbutton,
|
|
374
|
+
ce as UthemeUswitcher
|
|
637
375
|
};
|
|
638
376
|
//# sourceMappingURL=index.esm.js.map
|