@versini/ui-bubble 0.0.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +41 -41
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import { jsx as d, jsxs as v, Fragment as z } from "react/jsx-runtime";
2
2
  import i from "clsx";
3
- import N, { useState as S, useEffect as L } from "react";
3
+ import _, { useState as L, useEffect as S } from "react";
4
4
  /*!
5
- @versini/ui-bubble v0.0.0
5
+ @versini/ui-bubble v1.0.0
6
6
  © 2024 gizmette.com
7
7
  */
8
8
  try {
9
- window.__VERSINI_UI_ANCHOR__ || (window.__VERSINI_UI_ANCHOR__ = {
10
- version: "0.0.0",
11
- buildTime: "09/16/2024 06:43 PM EDT",
9
+ window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
10
+ version: "1.0.0",
11
+ buildTime: "09/17/2024 02:24 PM EDT",
12
12
  homepage: "https://github.com/aversini/ui-components",
13
13
  license: "MIT"
14
14
  });
15
15
  } catch {
16
16
  }
17
- const $ = "av-bubble", T = "av-button", H = (e) => {
17
+ const U = "av-bubble", T = "av-button", $ = (e) => {
18
18
  let r = "";
19
19
  if (typeof e == "number" || typeof e == "string")
20
20
  r = "m-" + e;
@@ -23,7 +23,7 @@ const $ = "av-bubble", T = "av-button", H = (e) => {
23
23
  (e == null ? void 0 : e.t) !== void 0 && t.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && t.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && t.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && t.push(`ml-${e.l}`), r = t.join(" ");
24
24
  }
25
25
  return r;
26
- }, B = "icon", U = "button", j = "link", O = ({
26
+ }, N = "icon", j = "button", H = "link", O = ({
27
27
  type: e,
28
28
  size: r,
29
29
  labelRight: t,
@@ -32,19 +32,19 @@ const $ = "av-bubble", T = "av-button", H = (e) => {
32
32
  }) => {
33
33
  const o = "text-sm font-medium max-h-8 py-0", s = "text-base font-medium max-h-9 py-1", l = "text-lg font-medium max-h-12 py-2";
34
34
  switch (e) {
35
- case U:
35
+ case j:
36
36
  return i("px-4", {
37
37
  [o]: r === "small",
38
38
  [s]: r === "medium",
39
39
  [l]: r === "large"
40
40
  });
41
- case j:
41
+ case H:
42
42
  return i("px-4 text-center", {
43
43
  [o]: r === "small",
44
44
  [s]: r === "medium",
45
45
  [l]: r === "large"
46
46
  });
47
- case B:
47
+ case N:
48
48
  return i("inline-flex items-center", {
49
49
  "justify-center": n === "center",
50
50
  "justify-start": n === "left",
@@ -57,7 +57,7 @@ const $ = "av-bubble", T = "av-button", H = (e) => {
57
57
  "h-12 px-4 text-lg font-medium": r === "large" && (t || a)
58
58
  });
59
59
  }
60
- }, A = ({
60
+ }, P = ({
61
61
  mode: e,
62
62
  noBackground: r,
63
63
  noTruncate: t,
@@ -89,7 +89,7 @@ const $ = "av-bubble", T = "av-button", H = (e) => {
89
89
  "bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
90
90
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
91
91
  });
92
- }, P = ({
92
+ }, W = ({
93
93
  mode: e,
94
94
  disabled: r,
95
95
  variant: t
@@ -117,7 +117,7 @@ const $ = "av-bubble", T = "av-button", H = (e) => {
117
117
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
118
118
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
119
119
  });
120
- }, W = ({
120
+ }, A = ({
121
121
  mode: e,
122
122
  disabled: r,
123
123
  variant: t
@@ -198,13 +198,13 @@ const $ = "av-bubble", T = "av-button", H = (e) => {
198
198
  }) => (c || (c = "primary"), t ? i(T, r) : i(
199
199
  T,
200
200
  r,
201
- H(h),
202
- A({ mode: a, variant: c, noBackground: m, noTruncate: u }),
201
+ $(h),
202
+ P({ mode: a, variant: c, noBackground: m, noTruncate: u }),
203
203
  O({ type: e, size: l, labelRight: g, labelLeft: p, align: f }),
204
204
  D({ mode: a, variant: c, noBorder: b }),
205
205
  q({ focusMode: n }),
206
- P({ mode: a, variant: c, disabled: o }),
207
206
  W({ mode: a, variant: c, disabled: o }),
207
+ A({ mode: a, variant: c, disabled: o }),
208
208
  {
209
209
  "w-full": s,
210
210
  "disabled:cursor-not-allowed disabled:opacity-50": o
@@ -212,7 +212,7 @@ const $ = "av-bubble", T = "av-button", H = (e) => {
212
212
  )), F = (e, r, t) => {
213
213
  var a;
214
214
  !r && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
215
- }, I = N.forwardRef((e, r) => {
215
+ }, I = _.forwardRef((e, r) => {
216
216
  const { onClick: t, noInternalClick: a = !1, ...n } = e;
217
217
  return /* @__PURE__ */ d(
218
218
  "button",
@@ -226,7 +226,7 @@ const $ = "av-bubble", T = "av-button", H = (e) => {
226
226
  );
227
227
  });
228
228
  I.displayName = "BaseButton";
229
- const M = N.forwardRef(
229
+ const E = _.forwardRef(
230
230
  ({
231
231
  children: e,
232
232
  disabled: r = !1,
@@ -248,7 +248,7 @@ const M = N.forwardRef(
248
248
  ...k
249
249
  }, x) => {
250
250
  const w = C({
251
- type: B,
251
+ type: N,
252
252
  mode: t,
253
253
  focusMode: a,
254
254
  fullWidth: n,
@@ -262,7 +262,7 @@ const M = N.forwardRef(
262
262
  spacing: u,
263
263
  noBackground: f,
264
264
  align: y
265
- }), _ = i({
265
+ }), B = i({
266
266
  "text-copy-accent-dark": t === "light" && !l,
267
267
  "text-copy-light": t === "dark" && !l,
268
268
  "text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !l,
@@ -279,28 +279,28 @@ const M = N.forwardRef(
279
279
  ...k,
280
280
  children: [
281
281
  c && /* @__PURE__ */ d("span", { className: "pr-2", children: c }),
282
- /* @__PURE__ */ d("div", { className: _, children: e }),
282
+ /* @__PURE__ */ d("div", { className: B, children: e }),
283
283
  m && /* @__PURE__ */ d("span", { className: "pl-2", children: m })
284
284
  ]
285
285
  }
286
286
  );
287
287
  }
288
288
  );
289
- M.displayName = "ButtonIcon";
289
+ E.displayName = "ButtonIcon";
290
290
  /*!
291
- @versini/ui-button v1.0.2
291
+ @versini/ui-button v1.1.0
292
292
  © 2024 gizmette.com
293
293
  */
294
294
  try {
295
295
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
296
- version: "1.0.2",
297
- buildTime: "09/16/2024 06:43 PM EDT",
296
+ version: "1.1.0",
297
+ buildTime: "09/17/2024 02:24 PM EDT",
298
298
  homepage: "https://github.com/aversini/ui-components",
299
299
  license: "MIT"
300
300
  });
301
301
  } catch {
302
302
  }
303
- const G = N.forwardRef(
303
+ const G = _.forwardRef(
304
304
  ({
305
305
  children: e,
306
306
  disabled: r = !1,
@@ -322,8 +322,8 @@ const G = N.forwardRef(
322
322
  active: k = !1,
323
323
  ...x
324
324
  }, w) => {
325
- const _ = C({
326
- type: B,
325
+ const B = C({
326
+ type: N,
327
327
  mode: t,
328
328
  focusMode: a,
329
329
  fullWidth: n,
@@ -342,7 +342,7 @@ const G = N.forwardRef(
342
342
  "text-copy-light": t === "dark" && !l,
343
343
  "text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !l,
344
344
  "text-copy-light dark:text-copy-accent-dark": t === "system" && !l
345
- }), E = k ? i(
345
+ }), R = k ? i(
346
346
  "relative",
347
347
  "focus-within:static",
348
348
  "focus-within:after:border-transparent",
@@ -359,11 +359,11 @@ const G = N.forwardRef(
359
359
  "after:border-table-light dark:after:border-table-dark": t === "alt-system"
360
360
  }
361
361
  ) : "";
362
- return /* @__PURE__ */ d("div", { className: E, children: /* @__PURE__ */ v(
362
+ return /* @__PURE__ */ d("div", { className: R, children: /* @__PURE__ */ v(
363
363
  I,
364
364
  {
365
365
  ref: w,
366
- className: _,
366
+ className: B,
367
367
  disabled: r,
368
368
  type: s,
369
369
  "aria-label": g || p,
@@ -387,7 +387,7 @@ const J = (e) => {
387
387
  (e == null ? void 0 : e.t) !== void 0 && t.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && t.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && t.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && t.push(`ml-${e.l}`), r = t.join(" ");
388
388
  }
389
389
  return r;
390
- }, R = ({
390
+ }, M = ({
391
391
  children: e,
392
392
  fill: r,
393
393
  viewBox: t,
@@ -428,7 +428,7 @@ const J = (e) => {
428
428
  try {
429
429
  window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
430
430
  version: "1.4.9",
431
- buildTime: "09/16/2024 06:43 PM EDT",
431
+ buildTime: "09/17/2024 02:24 PM EDT",
432
432
  homepage: "https://github.com/aversini/ui-components",
433
433
  license: "MIT"
434
434
  });
@@ -442,7 +442,7 @@ const K = ({
442
442
  monotone: n,
443
443
  ...o
444
444
  }) => /* @__PURE__ */ v(
445
- R,
445
+ M,
446
446
  {
447
447
  defaultViewBox: "0 0 448 512",
448
448
  defaultClassName: "size-5",
@@ -470,7 +470,7 @@ const K = ({
470
470
  monotone: n,
471
471
  ...o
472
472
  }) => /* @__PURE__ */ d(
473
- R,
473
+ M,
474
474
  {
475
475
  defaultViewBox: "0 0 512 512",
476
476
  defaultClassName: "size-5",
@@ -489,7 +489,7 @@ const K = ({
489
489
  try {
490
490
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
491
491
  version: "1.12.1",
492
- buildTime: "09/16/2024 06:43 PM EDT",
492
+ buildTime: "09/17/2024 02:24 PM EDT",
493
493
  homepage: "https://github.com/aversini/ui-components",
494
494
  license: "MIT"
495
495
  });
@@ -522,7 +522,7 @@ const X = (e) => {
522
522
  }) => {
523
523
  const a = i(
524
524
  r,
525
- $,
525
+ U,
526
526
  "flex items-start",
527
527
  X(t),
528
528
  {
@@ -555,10 +555,10 @@ const X = (e) => {
555
555
  copyToClipboardMode: l = "system",
556
556
  spacing: b
557
557
  }) => {
558
- const [g, p] = S(!1), h = re({ kind: r, className: t, spacing: b }), m = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), c = () => {
558
+ const [g, p] = L(!1), h = re({ kind: r, className: t, spacing: b }), m = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), c = () => {
559
559
  p(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
560
560
  };
561
- return L(() => {
561
+ return S(() => {
562
562
  let u;
563
563
  return g && (u = window.setTimeout(() => {
564
564
  p(!1);
@@ -576,7 +576,7 @@ const X = (e) => {
576
576
  n && n
577
577
  ] }),
578
578
  m && /* @__PURE__ */ d("div", { className: h.copyButton, children: /* @__PURE__ */ d(
579
- M,
579
+ E,
580
580
  {
581
581
  noBorder: !0,
582
582
  noBackground: !0,
@@ -592,6 +592,6 @@ const X = (e) => {
592
592
  ] });
593
593
  };
594
594
  export {
595
- $ as BUBBLE_CLASSNAME,
595
+ U as BUBBLE_CLASSNAME,
596
596
  le as Bubble
597
597
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-bubble",
3
- "version": "0.0.0",
3
+ "version": "1.0.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@tailwindcss/typography": "0.5.15",
45
- "@versini/ui-button": "1.0.2",
45
+ "@versini/ui-button": "1.1.0",
46
46
  "@versini/ui-icons": "1.12.1",
47
47
  "@versini/ui-private": "1.4.9",
48
48
  "clsx": "2.1.1",
@@ -51,5 +51,5 @@
51
51
  "sideEffects": [
52
52
  "**/*.css"
53
53
  ],
54
- "gitHead": "7eb19b791ba2d13c72d2b19bb0a01626f0ee3b97"
54
+ "gitHead": "e38f3b0dde5bc4d45c908d98cde86df03612b6db"
55
55
  }