@bloodhoundenterprise/doodleui 1.0.0-alpha.0 → 1.0.0-alpha.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/doodleui.js CHANGED
@@ -3,68 +3,27 @@ import * as Oe from "react";
3
3
  import { useCallback as Ce, forwardRef as V, Children as B, isValidElement as Z, createElement as S, cloneElement as Se, Fragment as Le, useState as O, useEffect as L, createContext as me, useMemo as G, useContext as We, useRef as W, useLayoutEffect as Fe } from "react";
4
4
  import "react-dom";
5
5
  function ze(e) {
6
- var t, r, o = "";
7
- if (typeof e == "string" || typeof e == "number") o += e;
8
- else if (typeof e == "object") if (Array.isArray(e)) for (t = 0; t < e.length; t++) e[t] && (r = ze(e[t])) && (o && (o += " "), o += r);
9
- else for (t in e) e[t] && (o && (o += " "), o += t);
10
- return o;
11
- }
12
- function Ue() {
13
- for (var e, t, r = 0, o = ""; r < arguments.length; ) (e = arguments[r++]) && (t = ze(e)) && (o && (o += " "), o += t);
14
- return o;
15
- }
16
- const ge = (e) => typeof e == "boolean" ? "".concat(e) : e === 0 ? "0" : e, ve = Ue, R = (e, t) => (r) => {
17
- var o;
18
- if ((t == null ? void 0 : t.variants) == null) return ve(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
19
- const { variants: s, defaultVariants: n } = t, i = Object.keys(s).map((c) => {
20
- const p = r == null ? void 0 : r[c], u = n == null ? void 0 : n[c];
21
- if (p === null) return null;
22
- const b = ge(p) || ge(u);
23
- return s[c][b];
24
- }), a = r && Object.entries(r).reduce((c, p) => {
25
- let [u, b] = p;
26
- return b === void 0 || (c[u] = b), c;
27
- }, {}), l = t == null || (o = t.compoundVariants) === null || o === void 0 ? void 0 : o.reduce((c, p) => {
28
- let { class: u, className: b, ...x } = p;
29
- return Object.entries(x).every((y) => {
30
- let [h, m] = y;
31
- return Array.isArray(m) ? m.includes({
32
- ...n,
33
- ...a
34
- }[h]) : {
35
- ...n,
36
- ...a
37
- }[h] === m;
38
- }) ? [
39
- ...c,
40
- u,
41
- b
42
- ] : c;
43
- }, []);
44
- return ve(e, i, l, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
45
- };
46
- function Ae(e) {
47
6
  var t, r, o = "";
48
7
  if (typeof e == "string" || typeof e == "number") o += e;
49
8
  else if (typeof e == "object") if (Array.isArray(e)) {
50
9
  var s = e.length;
51
- for (t = 0; t < s; t++) e[t] && (r = Ae(e[t])) && (o && (o += " "), o += r);
10
+ for (t = 0; t < s; t++) e[t] && (r = ze(e[t])) && (o && (o += " "), o += r);
52
11
  } else for (r in e) e[r] && (o && (o += " "), o += r);
53
12
  return o;
54
13
  }
55
- function He() {
56
- for (var e, t, r = 0, o = "", s = arguments.length; r < s; r++) (e = arguments[r]) && (t = Ae(e)) && (o && (o += " "), o += t);
14
+ function Ue() {
15
+ for (var e, t, r = 0, o = "", s = arguments.length; r < s; r++) (e = arguments[r]) && (t = ze(e)) && (o && (o += " "), o += t);
57
16
  return o;
58
17
  }
59
18
  const ne = "-";
60
- function qe(e) {
61
- const t = Xe(e), {
19
+ function He(e) {
20
+ const t = Je(e), {
62
21
  conflictingClassGroups: r,
63
22
  conflictingClassGroupModifiers: o
64
23
  } = e;
65
24
  function s(i) {
66
25
  const a = i.split(ne);
67
- return a[0] === "" && a.length !== 1 && a.shift(), Ne(a, t) || Je(i);
26
+ return a[0] === "" && a.length !== 1 && a.shift(), Ae(a, t) || qe(i);
68
27
  }
69
28
  function n(i, a) {
70
29
  const l = r[i] || [];
@@ -75,11 +34,11 @@ function qe(e) {
75
34
  getConflictingClassGroupIds: n
76
35
  };
77
36
  }
78
- function Ne(e, t) {
37
+ function Ae(e, t) {
79
38
  var i;
80
39
  if (e.length === 0)
81
40
  return t.classGroupId;
82
- const r = e[0], o = t.nextPart.get(r), s = o ? Ne(e.slice(1), o) : void 0;
41
+ const r = e[0], o = t.nextPart.get(r), s = o ? Ae(e.slice(1), o) : void 0;
83
42
  if (s)
84
43
  return s;
85
44
  if (t.validators.length === 0)
@@ -89,15 +48,15 @@ function Ne(e, t) {
89
48
  validator: a
90
49
  }) => a(n))) == null ? void 0 : i.classGroupId;
91
50
  }
92
- const ye = /^\[(.+)\]$/;
93
- function Je(e) {
94
- if (ye.test(e)) {
95
- const t = ye.exec(e)[1], r = t == null ? void 0 : t.substring(0, t.indexOf(":"));
51
+ const ge = /^\[(.+)\]$/;
52
+ function qe(e) {
53
+ if (ge.test(e)) {
54
+ const t = ge.exec(e)[1], r = t == null ? void 0 : t.substring(0, t.indexOf(":"));
96
55
  if (r)
97
56
  return "arbitrary.." + r;
98
57
  }
99
58
  }
100
- function Xe(e) {
59
+ function Je(e) {
101
60
  const {
102
61
  theme: t,
103
62
  prefix: r
@@ -105,19 +64,19 @@ function Xe(e) {
105
64
  nextPart: /* @__PURE__ */ new Map(),
106
65
  validators: []
107
66
  };
108
- return Ke(Object.entries(e.classGroups), r).forEach(([n, i]) => {
67
+ return Ze(Object.entries(e.classGroups), r).forEach(([n, i]) => {
109
68
  re(i, o, n, t);
110
69
  }), o;
111
70
  }
112
71
  function re(e, t, r, o) {
113
72
  e.forEach((s) => {
114
73
  if (typeof s == "string") {
115
- const n = s === "" ? t : xe(t, s);
74
+ const n = s === "" ? t : ve(t, s);
116
75
  n.classGroupId = r;
117
76
  return;
118
77
  }
119
78
  if (typeof s == "function") {
120
- if (Ze(s)) {
79
+ if (Xe(s)) {
121
80
  re(s(o), t, r, o);
122
81
  return;
123
82
  }
@@ -128,11 +87,11 @@ function re(e, t, r, o) {
128
87
  return;
129
88
  }
130
89
  Object.entries(s).forEach(([n, i]) => {
131
- re(i, xe(t, n), r, o);
90
+ re(i, ve(t, n), r, o);
132
91
  });
133
92
  });
134
93
  }
135
- function xe(e, t) {
94
+ function ve(e, t) {
136
95
  let r = e;
137
96
  return t.split(ne).forEach((o) => {
138
97
  r.nextPart.has(o) || r.nextPart.set(o, {
@@ -141,16 +100,16 @@ function xe(e, t) {
141
100
  }), r = r.nextPart.get(o);
142
101
  }), r;
143
102
  }
144
- function Ze(e) {
103
+ function Xe(e) {
145
104
  return e.isThemeGetter;
146
105
  }
147
- function Ke(e, t) {
106
+ function Ze(e, t) {
148
107
  return t ? e.map(([r, o]) => {
149
108
  const s = o.map((n) => typeof n == "string" ? t + n : typeof n == "object" ? Object.fromEntries(Object.entries(n).map(([i, a]) => [t + i, a])) : n);
150
109
  return [r, s];
151
110
  }) : e;
152
111
  }
153
- function Ye(e) {
112
+ function Ke(e) {
154
113
  if (e < 1)
155
114
  return {
156
115
  get: () => {
@@ -175,8 +134,8 @@ function Ye(e) {
175
134
  }
176
135
  };
177
136
  }
178
- const Pe = "!";
179
- function De(e) {
137
+ const Ne = "!";
138
+ function Ye(e) {
180
139
  const t = e.separator, r = t.length === 1, o = t[0], s = t.length;
181
140
  return function(i) {
182
141
  const a = [];
@@ -195,7 +154,7 @@ function De(e) {
195
154
  }
196
155
  m === "[" ? l++ : m === "]" && l--;
197
156
  }
198
- const u = a.length === 0 ? i : i.substring(c), b = u.startsWith(Pe), x = b ? u.substring(1) : u, y = p && p > c ? p - c : void 0;
157
+ const u = a.length === 0 ? i : i.substring(c), b = u.startsWith(Ne), x = b ? u.substring(1) : u, y = p && p > c ? p - c : void 0;
199
158
  return {
200
159
  modifiers: a,
201
160
  hasImportantModifier: b,
@@ -204,7 +163,7 @@ function De(e) {
204
163
  };
205
164
  };
206
165
  }
207
- function Qe(e) {
166
+ function De(e) {
208
167
  if (e.length <= 1)
209
168
  return e;
210
169
  const t = [];
@@ -213,21 +172,21 @@ function Qe(e) {
213
172
  o[0] === "[" ? (t.push(...r.sort(), o), r = []) : r.push(o);
214
173
  }), t.push(...r.sort()), t;
215
174
  }
216
- function et(e) {
175
+ function Qe(e) {
217
176
  return {
218
- cache: Ye(e.cacheSize),
219
- splitModifiers: De(e),
220
- ...qe(e)
177
+ cache: Ke(e.cacheSize),
178
+ splitModifiers: Ye(e),
179
+ ...He(e)
221
180
  };
222
181
  }
223
- const tt = /\s+/;
224
- function rt(e, t) {
182
+ const et = /\s+/;
183
+ function tt(e, t) {
225
184
  const {
226
185
  splitModifiers: r,
227
186
  getClassGroupId: o,
228
187
  getConflictingClassGroupIds: s
229
188
  } = t, n = /* @__PURE__ */ new Set();
230
- return e.trim().split(tt).map((i) => {
189
+ return e.trim().split(et).map((i) => {
231
190
  const {
232
191
  modifiers: a,
233
192
  hasImportantModifier: l,
@@ -248,10 +207,10 @@ function rt(e, t) {
248
207
  };
249
208
  b = !1;
250
209
  }
251
- const x = Qe(a).join(":");
210
+ const x = De(a).join(":");
252
211
  return {
253
212
  isTailwindClass: !0,
254
- modifierId: l ? x + Pe : x,
213
+ modifierId: l ? x + Ne : x,
255
214
  classGroupId: u,
256
215
  originalClassName: i,
257
216
  hasPostfixModifier: b
@@ -267,100 +226,100 @@ function rt(e, t) {
267
226
  return n.has(p) ? !1 : (n.add(p), s(l, c).forEach((u) => n.add(a + u)), !0);
268
227
  }).reverse().map((i) => i.originalClassName).join(" ");
269
228
  }
270
- function ot() {
229
+ function rt() {
271
230
  let e = 0, t, r, o = "";
272
231
  for (; e < arguments.length; )
273
- (t = arguments[e++]) && (r = Me(t)) && (o && (o += " "), o += r);
232
+ (t = arguments[e++]) && (r = Pe(t)) && (o && (o += " "), o += r);
274
233
  return o;
275
234
  }
276
- function Me(e) {
235
+ function Pe(e) {
277
236
  if (typeof e == "string")
278
237
  return e;
279
238
  let t, r = "";
280
239
  for (let o = 0; o < e.length; o++)
281
- e[o] && (t = Me(e[o])) && (r && (r += " "), r += t);
240
+ e[o] && (t = Pe(e[o])) && (r && (r += " "), r += t);
282
241
  return r;
283
242
  }
284
- function nt(e, ...t) {
243
+ function ot(e, ...t) {
285
244
  let r, o, s, n = i;
286
245
  function i(l) {
287
246
  const c = t.reduce((p, u) => u(p), e());
288
- return r = et(c), o = r.cache.get, s = r.cache.set, n = a, a(l);
247
+ return r = Qe(c), o = r.cache.get, s = r.cache.set, n = a, a(l);
289
248
  }
290
249
  function a(l) {
291
250
  const c = o(l);
292
251
  if (c)
293
252
  return c;
294
- const p = rt(l, r);
253
+ const p = tt(l, r);
295
254
  return s(l, p), p;
296
255
  }
297
256
  return function() {
298
- return n(ot.apply(null, arguments));
257
+ return n(rt.apply(null, arguments));
299
258
  };
300
259
  }
301
260
  function g(e) {
302
261
  const t = (r) => r[e] || [];
303
262
  return t.isThemeGetter = !0, t;
304
263
  }
305
- const Ve = /^\[(?:([a-z-]+):)?(.+)\]$/i, st = /^\d+\/\d+$/, it = /* @__PURE__ */ new Set(["px", "full", "screen"]), at = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, lt = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, ct = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, dt = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, ut = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
264
+ const Me = /^\[(?:([a-z-]+):)?(.+)\]$/i, nt = /^\d+\/\d+$/, st = /* @__PURE__ */ new Set(["px", "full", "screen"]), it = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, at = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, lt = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, ct = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, dt = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
306
265
  function z(e) {
307
- return M(e) || it.has(e) || st.test(e);
266
+ return M(e) || st.has(e) || nt.test(e);
308
267
  }
309
268
  function A(e) {
310
- return j(e, "length", yt);
269
+ return R(e, "length", vt);
311
270
  }
312
271
  function M(e) {
313
272
  return !!e && !Number.isNaN(Number(e));
314
273
  }
315
274
  function J(e) {
316
- return j(e, "number", M);
275
+ return R(e, "number", M);
317
276
  }
318
277
  function E(e) {
319
278
  return !!e && Number.isInteger(Number(e));
320
279
  }
321
- function pt(e) {
280
+ function ut(e) {
322
281
  return e.endsWith("%") && M(e.slice(0, -1));
323
282
  }
324
283
  function d(e) {
325
- return Ve.test(e);
284
+ return Me.test(e);
326
285
  }
327
286
  function N(e) {
328
- return at.test(e);
287
+ return it.test(e);
288
+ }
289
+ const pt = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
290
+ function ft(e) {
291
+ return R(e, pt, Ve);
329
292
  }
330
- const ft = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
331
293
  function bt(e) {
332
- return j(e, ft, Re);
294
+ return R(e, "position", Ve);
333
295
  }
334
- function ht(e) {
335
- return j(e, "position", Re);
296
+ const ht = /* @__PURE__ */ new Set(["image", "url"]);
297
+ function mt(e) {
298
+ return R(e, ht, xt);
336
299
  }
337
- const mt = /* @__PURE__ */ new Set(["image", "url"]);
338
300
  function gt(e) {
339
- return j(e, mt, wt);
340
- }
341
- function vt(e) {
342
- return j(e, "", xt);
301
+ return R(e, "", yt);
343
302
  }
344
303
  function I() {
345
304
  return !0;
346
305
  }
347
- function j(e, t, r) {
348
- const o = Ve.exec(e);
306
+ function R(e, t, r) {
307
+ const o = Me.exec(e);
349
308
  return o ? o[1] ? typeof t == "string" ? o[1] === t : t.has(o[1]) : r(o[2]) : !1;
350
309
  }
351
- function yt(e) {
352
- return lt.test(e) && !ct.test(e);
310
+ function vt(e) {
311
+ return at.test(e) && !lt.test(e);
353
312
  }
354
- function Re() {
313
+ function Ve() {
355
314
  return !1;
356
315
  }
316
+ function yt(e) {
317
+ return ct.test(e);
318
+ }
357
319
  function xt(e) {
358
320
  return dt.test(e);
359
321
  }
360
- function wt(e) {
361
- return ut.test(e);
362
- }
363
- function kt() {
322
+ function wt() {
364
323
  const e = g("colors"), t = g("spacing"), r = g("blur"), o = g("brightness"), s = g("borderColor"), n = g("borderRadius"), i = g("borderSpacing"), a = g("borderWidth"), l = g("contrast"), c = g("grayscale"), p = g("hueRotate"), u = g("invert"), b = g("gap"), x = g("gradientColorStops"), y = g("gradientColorStopPositions"), h = g("inset"), m = g("margin"), $ = g("opacity"), w = g("padding"), F = g("saturate"), K = g("scale"), ae = g("sepia"), le = g("skew"), ce = g("space"), de = g("translate"), Y = () => ["auto", "contain", "none"], D = () => ["auto", "hidden", "clip", "visible", "scroll"], Q = () => ["auto", d, t], v = () => [d, t], ue = () => ["", z, A], U = () => ["auto", M, d], pe = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], H = () => ["solid", "dashed", "dotted", "double", "none"], fe = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], ee = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], _ = () => ["", "0", d], be = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], T = () => [M, J], q = () => [M, d];
365
324
  return {
366
325
  cacheSize: 500,
@@ -380,7 +339,7 @@ function kt() {
380
339
  invert: _(),
381
340
  gap: v(),
382
341
  gradientColorStops: [e],
383
- gradientColorStopPositions: [pt, A],
342
+ gradientColorStopPositions: [ut, A],
384
343
  inset: Q(),
385
344
  margin: Q(),
386
345
  opacity: T(),
@@ -1293,7 +1252,7 @@ function kt() {
1293
1252
  * @see https://tailwindcss.com/docs/background-position
1294
1253
  */
1295
1254
  "bg-position": [{
1296
- bg: [...pe(), ht]
1255
+ bg: [...pe(), bt]
1297
1256
  }],
1298
1257
  /**
1299
1258
  * Background Repeat
@@ -1309,7 +1268,7 @@ function kt() {
1309
1268
  * @see https://tailwindcss.com/docs/background-size
1310
1269
  */
1311
1270
  "bg-size": [{
1312
- bg: ["auto", "cover", "contain", bt]
1271
+ bg: ["auto", "cover", "contain", ft]
1313
1272
  }],
1314
1273
  /**
1315
1274
  * Background Image
@@ -1318,7 +1277,7 @@ function kt() {
1318
1277
  "bg-image": [{
1319
1278
  bg: ["none", {
1320
1279
  "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1321
- }, gt]
1280
+ }, mt]
1322
1281
  }],
1323
1282
  /**
1324
1283
  * Background Color
@@ -1720,7 +1679,7 @@ function kt() {
1720
1679
  * @see https://tailwindcss.com/docs/box-shadow
1721
1680
  */
1722
1681
  shadow: [{
1723
- shadow: ["", "inner", "none", N, vt]
1682
+ shadow: ["", "inner", "none", N, gt]
1724
1683
  }],
1725
1684
  /**
1726
1685
  * Box Shadow Color
@@ -2376,7 +2335,7 @@ function kt() {
2376
2335
  }
2377
2336
  };
2378
2337
  }
2379
- const $t = /* @__PURE__ */ nt(kt), Ct = [
2338
+ const kt = /* @__PURE__ */ ot(wt), $t = [
2380
2339
  "primary",
2381
2340
  "primary-variant",
2382
2341
  "primary",
@@ -2393,12 +2352,12 @@ const $t = /* @__PURE__ */ nt(kt), Ct = [
2393
2352
  "blue"
2394
2353
  ];
2395
2354
  function C(...e) {
2396
- return $t(He(e));
2355
+ return kt(Ue(e));
2397
2356
  }
2398
2357
  function se(e) {
2399
- return Ct.includes(e) ? `var(--${e})` : e;
2358
+ return $t.includes(e) ? `var(--${e})` : e;
2400
2359
  }
2401
- function je(...e) {
2360
+ function Re(...e) {
2402
2361
  return e.reduce((t, r) => {
2403
2362
  const [o, s] = r;
2404
2363
  return o ? { ...t, ...s } : t;
@@ -2407,9 +2366,50 @@ function je(...e) {
2407
2366
  const sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2408
2367
  __proto__: null,
2409
2368
  cn: C,
2410
- getConditionalStyles: je,
2369
+ getConditionalStyles: Re,
2411
2370
  getCssColor: se
2412
- }, Symbol.toStringTag, { value: "Module" })), St = R("flex justify-center items-center rounded-full bg-neutral-light-3", {
2371
+ }, Symbol.toStringTag, { value: "Module" }));
2372
+ function je(e) {
2373
+ var t, r, o = "";
2374
+ if (typeof e == "string" || typeof e == "number") o += e;
2375
+ else if (typeof e == "object") if (Array.isArray(e)) for (t = 0; t < e.length; t++) e[t] && (r = je(e[t])) && (o && (o += " "), o += r);
2376
+ else for (t in e) e[t] && (o && (o += " "), o += t);
2377
+ return o;
2378
+ }
2379
+ function Ct() {
2380
+ for (var e, t, r = 0, o = ""; r < arguments.length; ) (e = arguments[r++]) && (t = je(e)) && (o && (o += " "), o += t);
2381
+ return o;
2382
+ }
2383
+ const ye = (e) => typeof e == "boolean" ? "".concat(e) : e === 0 ? "0" : e, xe = Ct, j = (e, t) => (r) => {
2384
+ var o;
2385
+ if ((t == null ? void 0 : t.variants) == null) return xe(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2386
+ const { variants: s, defaultVariants: n } = t, i = Object.keys(s).map((c) => {
2387
+ const p = r == null ? void 0 : r[c], u = n == null ? void 0 : n[c];
2388
+ if (p === null) return null;
2389
+ const b = ye(p) || ye(u);
2390
+ return s[c][b];
2391
+ }), a = r && Object.entries(r).reduce((c, p) => {
2392
+ let [u, b] = p;
2393
+ return b === void 0 || (c[u] = b), c;
2394
+ }, {}), l = t == null || (o = t.compoundVariants) === null || o === void 0 ? void 0 : o.reduce((c, p) => {
2395
+ let { class: u, className: b, ...x } = p;
2396
+ return Object.entries(x).every((y) => {
2397
+ let [h, m] = y;
2398
+ return Array.isArray(m) ? m.includes({
2399
+ ...n,
2400
+ ...a
2401
+ }[h]) : {
2402
+ ...n,
2403
+ ...a
2404
+ }[h] === m;
2405
+ }) ? [
2406
+ ...c,
2407
+ u,
2408
+ b
2409
+ ] : c;
2410
+ }, []);
2411
+ return xe(e, i, l, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2412
+ }, St = j("flex justify-center items-center rounded-full bg-neutral-light-3", {
2413
2413
  variants: {
2414
2414
  type: {
2415
2415
  labeled: "size-8 p-2 shadow-none w-auto p-0 leading-[1] ",
@@ -2417,7 +2417,7 @@ const sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2417
2417
  "md-circle": "size-8 p-2 drop-shadow"
2418
2418
  }
2419
2419
  }
2420
- }), zt = R("rounded-full size-full", {
2420
+ }), zt = j("rounded-full size-full", {
2421
2421
  variants: {
2422
2422
  outlined: {
2423
2423
  true: "border-solid border-2 shadow-none bg-transparent"
@@ -2442,7 +2442,7 @@ const sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2442
2442
  ]
2443
2443
  });
2444
2444
  function ir(e) {
2445
- const { className: t, color: r = "secondary", outlined: o = !1, type: s, label: n = "md-circle", ...i } = e, a = se(r), l = s === "labeled", c = je(
2445
+ const { className: t, color: r = "secondary", outlined: o = !1, type: s, label: n = "md-circle", ...i } = e, a = se(r), l = s === "labeled", c = Re(
2446
2446
  [!o, { backgroundColor: a }],
2447
2447
  [!!o, { borderColor: a }],
2448
2448
  [
@@ -2519,7 +2519,7 @@ function Vt(e, t) {
2519
2519
  ...r
2520
2520
  };
2521
2521
  }
2522
- const Rt = R(
2522
+ const Rt = j(
2523
2523
  "shadow-outer-1 inline-flex items-center justify-center whitespace-nowrap h-10 px-6 py-2 rounded-3xl text-sm ring-offset-background transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:no-underline",
2524
2524
  {
2525
2525
  variants: {
@@ -2945,7 +2945,7 @@ function Be(e) {
2945
2945
  }
2946
2946
  const Dt = Xt, Qt = Kt, Ge = {
2947
2947
  size: "medium"
2948
- }, er = R(
2948
+ }, er = j(
2949
2949
  "flex items-center group rounded-3xl transition-all ease-in-out bg-neutral-dark-5 dark:bg-neutral-light-5 disabled:bg-neutral-light-5 disabled:opacity-50 data-[state=checked]:bg-primary dark:data-[state=checked]:bg-primary disabled:cursor-not-allowed focus-visible:outline-none",
2950
2950
  {
2951
2951
  variants: {
@@ -2957,7 +2957,7 @@ const Dt = Xt, Qt = Kt, Ge = {
2957
2957
  },
2958
2958
  defaultVariants: Ge
2959
2959
  }
2960
- ), tr = R(
2960
+ ), tr = j(
2961
2961
  "transition-all ease-in-out rounded-full bg-neutral-light-2 ring-primary shadow-outer-1 hover:ring-2 group-disabled:hover:ring-0 group-focus:ring-2 group-focus-visible:ring-2 data-[state=checked]:shadow-outer-2 data-[state=checked]:ring-1 data-[state=checked]:hover:ring-2",
2962
2962
  {
2963
2963
  variants: {
@@ -2969,7 +2969,7 @@ const Dt = Xt, Qt = Kt, Ge = {
2969
2969
  },
2970
2970
  defaultVariants: Ge
2971
2971
  }
2972
- ), $e = R("transition-all ease-in-out text-neutral-dark-5 dark:text-white hover:cursor-pointer", {
2972
+ ), $e = j("transition-all ease-in-out text-neutral-dark-5 dark:text-white hover:cursor-pointer", {
2973
2973
  variants: {
2974
2974
  size: {
2975
2975
  small: "text-sm",
@@ -0,0 +1,100 @@
1
+ import { ClassProp } from 'class-variance-authority/types';
2
+ import { ClassValue } from 'clsx';
3
+ import { ForwardRefExoticComponent } from 'react';
4
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
5
+ import * as React_2 from 'react';
6
+ import { RefAttributes } from 'react';
7
+ import * as SwitchPrimitives from '@radix-ui/react-switch';
8
+ import { VariantProps } from 'class-variance-authority';
9
+
10
+ export declare function Badge(props: BadgeProps): JSX_2.Element;
11
+
12
+ declare interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof BadgePropVariants> {
13
+ color?: ColorOptions;
14
+ outlined: boolean;
15
+ label?: string;
16
+ }
17
+
18
+ declare const BadgePropVariants: (props?: ({
19
+ type?: "labeled" | "sm-circle" | "md-circle" | null | undefined;
20
+ } & ClassProp) | undefined) => string;
21
+
22
+ export declare const Button: React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
23
+
24
+ declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof ButtonVariants> {
25
+ asChild?: boolean;
26
+ }
27
+
28
+ declare const ButtonVariants: (props?: ({
29
+ variant?: "primary" | "secondary" | "tertiary" | "text" | "icon" | null | undefined;
30
+ size?: "medium" | "large" | "small" | null | undefined;
31
+ } & ClassProp) | undefined) => string;
32
+
33
+ declare function cn(...inputs: ClassValue[]): string;
34
+
35
+ declare type ColorOptions = ThemeOptions | CustomColorOptions;
36
+
37
+ declare type CustomColorOptions = `#${string}` | `rgb(${string})` | `rgba(${string})` | `hsl(${string})` | `hsla(${string})`;
38
+
39
+ /**
40
+ *
41
+ * @param hedges [conditional, styles] - when conditional is true, styles will be applied in a cascading order. See example below.
42
+ * @returns React.CSSProperties
43
+ * @example ([truthy, {color: 'pink', fontSize: 12}],
44
+ * [truthy, {color: 'green'}],
45
+ * [falsy, {color: 'blue'}])
46
+ * // {color: 'green', fontSize: 12}
47
+ */
48
+ declare function getConditionalStyles(...hedges: [boolean, React.CSSProperties][]): React.CSSProperties;
49
+
50
+ /**
51
+ *
52
+ * @param color if using a theme color, use the css global var. Otherwise, just use the custom color value
53
+ * @returns string
54
+ */
55
+ declare function getCssColor(color: ThemeOptions | CustomColorOptions): string;
56
+
57
+ export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => JSX_2.Element;
58
+
59
+ declare interface HeaderProps {
60
+ user?: User;
61
+ onLogin?: () => void;
62
+ onLogout?: () => void;
63
+ onCreateAccount?: () => void;
64
+ }
65
+
66
+ export declare const Page: React.FC;
67
+
68
+ declare interface Props extends React.HTMLAttributes<HTMLDivElement> {
69
+ value: number;
70
+ color: ColorOptions;
71
+ hideAnimation?: boolean;
72
+ }
73
+
74
+ export declare function RadialGauge(props: Props): JSX_2.Element;
75
+
76
+ export declare const Switch: ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
77
+ size?: "medium" | "large" | "small" | null | undefined;
78
+ } & ClassProp) | undefined) => string> & {
79
+ label?: string | undefined;
80
+ labelPosition?: "left" | "right" | undefined;
81
+ } & RefAttributes<HTMLButtonElement>>;
82
+
83
+ declare type ThemeOptions = (typeof themeOptions)[number];
84
+
85
+ declare const themeOptions: readonly ["primary", "primary-variant", "primary", "primary-variant", "secondary", "secondary-variant", "tertiary", "tertiary-variant", "purple", "red", "orange", "yellow", "green", "blue"];
86
+
87
+ declare type User = {
88
+ name: string;
89
+ };
90
+
91
+ declare namespace utils {
92
+ export {
93
+ cn,
94
+ getCssColor,
95
+ getConditionalStyles
96
+ }
97
+ }
98
+ export { utils }
99
+
100
+ export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bloodhoundenterprise/doodleui",
3
- "version": "1.0.0-alpha.0",
3
+ "version": "1.0.0-alpha.1",
4
4
  "type": "module",
5
5
  "author": "SpecterOps",
6
6
  "repository": {
@@ -14,7 +14,8 @@
14
14
  "files": [
15
15
  "./dist"
16
16
  ],
17
- "main": "./src/index.ts",
17
+ "main": "./dist/doodleui.js",
18
+ "types": "./dist/index.d.ts",
18
19
  "license": "Apache-2.0",
19
20
  "scripts": {
20
21
  "dev": "npm run storybook",
@@ -79,6 +80,7 @@
79
80
  "tsx": "^4.7.3",
80
81
  "typescript": "^5.2.2",
81
82
  "vite": "^5.2.11",
83
+ "vite-plugin-dts": "^3.9.1",
82
84
  "vitest": "^1.6.0"
83
85
  },
84
86
  "packageManager": "yarn@4.3.0"