@versini/ui-bubble 1.1.0 → 1.2.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.
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { SpacingProps } from '@versini/ui-private/dist/utilities';
2
+ import { SpacingTypes } from '@versini/ui-spacing-types';
3
3
 
4
4
  declare const BUBBLE_CLASSNAME = "av-bubble";
5
5
 
6
6
  type BubbleProps = {
7
7
  /**
8
- * The children to render.
8
+ * The text to render in the bubble.
9
9
  */
10
10
  children: React.ReactNode;
11
11
  /**
@@ -14,6 +14,9 @@ type BubbleProps = {
14
14
  className?: string;
15
15
  /**
16
16
  * Whether or not to show a "copy/paste" icon next to the Bubble.
17
+ * - If a function is passed, it will be called with the text to copy.
18
+ * - If a string is passed, that string will be copied.
19
+ * - If a boolean is passed, the children will be copied.
17
20
  */
18
21
  copyToClipboard?: boolean | string | ((text: any) => void);
19
22
  /**
@@ -50,7 +53,7 @@ type BubbleProps = {
50
53
  * Same as "footer" but accepts raw JSX.
51
54
  */
52
55
  rawFooter?: React.ReactNode;
53
- } & SpacingProps;
56
+ } & SpacingTypes.Props;
54
57
 
55
58
  declare const Bubble: ({ children, kind, className, footer, rawFooter, copyToClipboard, copyToClipboardFocusMode, copyToClipboardMode, spacing, }: BubbleProps) => react_jsx_runtime.JSX.Element;
56
59
 
package/dist/index.js CHANGED
@@ -1,20 +1,34 @@
1
- import { jsx as d, jsxs as v, Fragment as z } from "react/jsx-runtime";
1
+ import { jsx as c, jsxs as v, Fragment as R } from "react/jsx-runtime";
2
2
  import i from "clsx";
3
- import _, { useState as S, useEffect as L } from "react";
3
+ import I, { useState as U, useEffect as z } from "react";
4
4
  /*!
5
- @versini/ui-bubble v1.1.0
5
+ @versini/ui-bubble v1.2.0
6
6
  © 2024 gizmette.com
7
7
  */
8
8
  try {
9
9
  window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
10
- version: "1.1.0",
11
- buildTime: "12/18/2024 12:35 PM EST",
10
+ version: "1.2.0",
11
+ buildTime: "12/24/2024 06:47 PM EST",
12
12
  homepage: "https://github.com/aversini/ui-components",
13
13
  license: "MIT"
14
14
  });
15
15
  } catch {
16
16
  }
17
- const U = "av-bubble", T = "av-button", $ = (e) => {
17
+ const L = "av-bubble", T = "av-button";
18
+ /*!
19
+ @versini/ui-spacing v1.0.0
20
+ © 2024 gizmette.com
21
+ */
22
+ try {
23
+ window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
24
+ version: "1.0.0",
25
+ buildTime: "12/24/2024 06:47 PM EST",
26
+ homepage: "https://github.com/aversini/ui-components",
27
+ license: "MIT"
28
+ });
29
+ } catch {
30
+ }
31
+ const P = (e) => {
18
32
  let r = "";
19
33
  if (typeof e == "number" || typeof e == "string")
20
34
  r = "m-" + e;
@@ -23,7 +37,7 @@ const U = "av-bubble", T = "av-button", $ = (e) => {
23
37
  (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
38
  }
25
39
  return r;
26
- }, N = "icon", j = "button", H = "link", O = ({
40
+ }, N = "icon", $ = "button", A = "link", H = ({
27
41
  type: e,
28
42
  size: r,
29
43
  labelRight: t,
@@ -32,13 +46,13 @@ const U = "av-bubble", T = "av-button", $ = (e) => {
32
46
  }) => {
33
47
  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
48
  switch (e) {
35
- case j:
49
+ case $:
36
50
  return i("px-4", {
37
51
  [o]: r === "small",
38
52
  [s]: r === "medium",
39
53
  [l]: r === "large"
40
54
  });
41
- case H:
55
+ case A:
42
56
  return i("px-4 text-center", {
43
57
  [o]: r === "small",
44
58
  [s]: r === "medium",
@@ -57,7 +71,7 @@ const U = "av-bubble", T = "av-button", $ = (e) => {
57
71
  "h-12 px-4 text-lg font-medium": r === "large" && (t || a)
58
72
  });
59
73
  }
60
- }, P = ({
74
+ }, j = ({
61
75
  mode: e,
62
76
  noBackground: r,
63
77
  noTruncate: t,
@@ -89,7 +103,7 @@ const U = "av-bubble", T = "av-button", $ = (e) => {
89
103
  "bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
90
104
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
91
105
  });
92
- }, W = ({
106
+ }, G = ({
93
107
  mode: e,
94
108
  disabled: r,
95
109
  variant: t
@@ -117,7 +131,7 @@ const U = "av-bubble", T = "av-button", $ = (e) => {
117
131
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
118
132
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
119
133
  });
120
- }, A = ({
134
+ }, O = ({
121
135
  mode: e,
122
136
  disabled: r,
123
137
  variant: t
@@ -145,7 +159,7 @@ const U = "av-bubble", T = "av-button", $ = (e) => {
145
159
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
146
160
  "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
147
161
  });
148
- }, q = ({
162
+ }, W = ({
149
163
  mode: e,
150
164
  noBorder: r,
151
165
  variant: t
@@ -173,12 +187,12 @@ const U = "av-bubble", T = "av-button", $ = (e) => {
173
187
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
174
188
  "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
175
189
  });
176
- }, D = ({ focusMode: e }) => i("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
190
+ }, q = ({ focusMode: e }) => i("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
177
191
  "focus:outline-focus-dark": e === "dark",
178
192
  "focus:outline-focus-light": e === "light",
179
193
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
180
194
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
181
- }), C = ({
195
+ }), S = ({
182
196
  type: e,
183
197
  className: r,
184
198
  raw: t,
@@ -190,43 +204,43 @@ const U = "av-bubble", T = "av-button", $ = (e) => {
190
204
  noBorder: b,
191
205
  labelRight: g,
192
206
  labelLeft: p,
193
- spacing: h,
207
+ spacing: u,
194
208
  noBackground: m,
195
- variant: c,
196
- noTruncate: u,
209
+ variant: d,
210
+ noTruncate: h,
197
211
  align: f
198
- }) => (c || (c = "primary"), t ? i(T, r) : i(
212
+ }) => (d || (d = "primary"), t ? i(T, r) : i(
199
213
  T,
200
214
  r,
201
- $(h),
202
- P({ mode: a, variant: c, noBackground: m, noTruncate: u }),
203
- O({ type: e, size: l, labelRight: g, labelLeft: p, align: f }),
204
- q({ mode: a, variant: c, noBorder: b }),
205
- D({ focusMode: n }),
206
- W({ mode: a, variant: c, disabled: o }),
207
- A({ mode: a, variant: c, disabled: o }),
215
+ P(u),
216
+ j({ mode: a, variant: d, noBackground: m, noTruncate: h }),
217
+ H({ type: e, size: l, labelRight: g, labelLeft: p, align: f }),
218
+ W({ mode: a, variant: d, noBorder: b }),
219
+ q({ focusMode: n }),
220
+ G({ mode: a, variant: d, disabled: o }),
221
+ O({ mode: a, variant: d, disabled: o }),
208
222
  {
209
223
  "w-full": s,
210
224
  "disabled:cursor-not-allowed disabled:opacity-50": o
211
225
  }
212
- )), F = (e, r, t) => {
226
+ )), D = (e, r, t) => {
213
227
  var a;
214
228
  !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 = _.forwardRef((e, r) => {
229
+ }, B = I.forwardRef((e, r) => {
216
230
  const { onClick: t, noInternalClick: a = !1, ...n } = e;
217
- return /* @__PURE__ */ d(
231
+ return /* @__PURE__ */ c(
218
232
  "button",
219
233
  {
220
234
  ref: r,
221
235
  onClick: (o) => {
222
- F(o, a, t);
236
+ D(o, a, t);
223
237
  },
224
238
  ...n
225
239
  }
226
240
  );
227
241
  });
228
- I.displayName = "BaseButton";
229
- const E = _.forwardRef(
242
+ B.displayName = "BaseButton";
243
+ const E = I.forwardRef(
230
244
  ({
231
245
  children: e,
232
246
  disabled: r = !1,
@@ -239,15 +253,15 @@ const E = _.forwardRef(
239
253
  noBorder: b = !1,
240
254
  "aria-label": g,
241
255
  label: p,
242
- size: h = "medium",
256
+ size: u = "medium",
243
257
  labelRight: m,
244
- labelLeft: c,
245
- spacing: u,
258
+ labelLeft: d,
259
+ spacing: h,
246
260
  noBackground: f = !1,
247
261
  align: y = "center",
248
262
  ...k
249
263
  }, x) => {
250
- const w = C({
264
+ const _ = S({
251
265
  type: N,
252
266
  mode: t,
253
267
  focusMode: a,
@@ -256,31 +270,31 @@ const E = _.forwardRef(
256
270
  raw: l,
257
271
  className: o,
258
272
  noBorder: b,
259
- size: h,
273
+ size: u,
260
274
  labelRight: m,
261
- labelLeft: c,
262
- spacing: u,
275
+ labelLeft: d,
276
+ spacing: h,
263
277
  noBackground: f,
264
278
  align: y
265
- }), B = i({
279
+ }), w = i({
266
280
  "text-copy-accent-dark": t === "light" && !l,
267
281
  "text-copy-light": t === "dark" && !l,
268
282
  "text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !l,
269
283
  "text-copy-light dark:text-copy-accent-dark": t === "system" && !l
270
284
  });
271
285
  return /* @__PURE__ */ v(
272
- I,
286
+ B,
273
287
  {
274
288
  ref: x,
275
- className: w,
289
+ className: _,
276
290
  disabled: r,
277
291
  type: s,
278
292
  "aria-label": g || p,
279
293
  ...k,
280
294
  children: [
281
- c && /* @__PURE__ */ d("span", { className: "pr-2", children: c }),
282
- /* @__PURE__ */ d("div", { className: B, children: e }),
283
- m && /* @__PURE__ */ d("span", { className: "pl-2", children: m })
295
+ d && /* @__PURE__ */ c("span", { className: "pr-2", children: d }),
296
+ /* @__PURE__ */ c("div", { className: w, children: e }),
297
+ m && /* @__PURE__ */ c("span", { className: "pl-2", children: m })
284
298
  ]
285
299
  }
286
300
  );
@@ -288,19 +302,19 @@ const E = _.forwardRef(
288
302
  );
289
303
  E.displayName = "ButtonIcon";
290
304
  /*!
291
- @versini/ui-button v1.2.0
305
+ @versini/ui-button v1.3.0
292
306
  © 2024 gizmette.com
293
307
  */
294
308
  try {
295
309
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
296
- version: "1.2.0",
297
- buildTime: "12/18/2024 12:35 PM EST",
310
+ version: "1.3.0",
311
+ buildTime: "12/24/2024 06:47 PM EST",
298
312
  homepage: "https://github.com/aversini/ui-components",
299
313
  license: "MIT"
300
314
  });
301
315
  } catch {
302
316
  }
303
- const G = _.forwardRef(
317
+ const F = I.forwardRef(
304
318
  ({
305
319
  children: e,
306
320
  disabled: r = !1,
@@ -313,16 +327,16 @@ const G = _.forwardRef(
313
327
  noBorder: b = !1,
314
328
  "aria-label": g,
315
329
  label: p,
316
- size: h = "medium",
330
+ size: u = "medium",
317
331
  labelRight: m,
318
- labelLeft: c,
319
- spacing: u,
332
+ labelLeft: d,
333
+ spacing: h,
320
334
  noBackground: f = !1,
321
335
  align: y = "center",
322
336
  active: k = !1,
323
337
  ...x
324
- }, w) => {
325
- const B = C({
338
+ }, _) => {
339
+ const w = S({
326
340
  type: N,
327
341
  mode: t,
328
342
  focusMode: a,
@@ -331,18 +345,18 @@ const G = _.forwardRef(
331
345
  raw: l,
332
346
  className: o,
333
347
  noBorder: b,
334
- size: h,
348
+ size: u,
335
349
  labelRight: m,
336
- labelLeft: c,
337
- spacing: u,
350
+ labelLeft: d,
351
+ spacing: h,
338
352
  noBackground: f,
339
353
  align: y
340
- }), V = i({
354
+ }), M = i({
341
355
  "text-copy-accent-dark": t === "light" && !l,
342
356
  "text-copy-light": t === "dark" && !l,
343
357
  "text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !l,
344
358
  "text-copy-light dark:text-copy-accent-dark": t === "system" && !l
345
- }), R = k ? i(
359
+ }), V = k ? i(
346
360
  "relative",
347
361
  "focus-within:static",
348
362
  "focus-within:after:border-transparent",
@@ -359,25 +373,38 @@ const G = _.forwardRef(
359
373
  "after:border-table-light dark:after:border-table-dark": t === "alt-system"
360
374
  }
361
375
  ) : "";
362
- return /* @__PURE__ */ d("div", { className: R, children: /* @__PURE__ */ v(
363
- I,
376
+ return /* @__PURE__ */ c("div", { className: V, children: /* @__PURE__ */ v(
377
+ B,
364
378
  {
365
- ref: w,
366
- className: B,
379
+ ref: _,
380
+ className: w,
367
381
  disabled: r,
368
382
  type: s,
369
383
  "aria-label": g || p,
370
384
  ...x,
371
385
  children: [
372
- c && /* @__PURE__ */ d("span", { className: "pr-2", children: c }),
373
- /* @__PURE__ */ d("div", { className: V, children: e }),
374
- m && /* @__PURE__ */ d("span", { className: "pl-2", children: m })
386
+ d && /* @__PURE__ */ c("span", { className: "pr-2", children: d }),
387
+ /* @__PURE__ */ c("div", { className: M, children: e }),
388
+ m && /* @__PURE__ */ c("span", { className: "pl-2", children: m })
375
389
  ]
376
390
  }
377
391
  ) });
378
392
  }
379
393
  );
380
- G.displayName = "ButtonSort";
394
+ F.displayName = "ButtonSort";
395
+ /*!
396
+ @versini/ui-spacing v1.0.0
397
+ © 2024 gizmette.com
398
+ */
399
+ try {
400
+ window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
401
+ version: "1.0.0",
402
+ buildTime: "12/24/2024 06:47 PM EST",
403
+ homepage: "https://github.com/aversini/ui-components",
404
+ license: "MIT"
405
+ });
406
+ } catch {
407
+ }
381
408
  const J = (e) => {
382
409
  let r = "";
383
410
  if (typeof e == "number" || typeof e == "string")
@@ -387,7 +414,7 @@ const J = (e) => {
387
414
  (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
415
  }
389
416
  return r;
390
- }, M = ({
417
+ }, C = ({
391
418
  children: e,
392
419
  fill: r,
393
420
  viewBox: t,
@@ -399,16 +426,16 @@ const J = (e) => {
399
426
  semantic: b = !1,
400
427
  ...g
401
428
  }) => {
402
- const p = J(s), h = i(
429
+ const p = J(s), u = i(
403
430
  p,
404
431
  a || o
405
432
  );
406
- return /* @__PURE__ */ v(z, { children: [
407
- /* @__PURE__ */ d(
433
+ return /* @__PURE__ */ v(R, { children: [
434
+ /* @__PURE__ */ c(
408
435
  "svg",
409
436
  {
410
437
  xmlns: "http://www.w3.org/2000/svg",
411
- className: h,
438
+ className: u,
412
439
  viewBox: t || n,
413
440
  fill: r || "currentColor",
414
441
  role: "img",
@@ -418,17 +445,17 @@ const J = (e) => {
418
445
  children: e
419
446
  }
420
447
  ),
421
- l && b && /* @__PURE__ */ d("span", { className: "sr-only", children: l })
448
+ l && b && /* @__PURE__ */ c("span", { className: "sr-only", children: l })
422
449
  ] });
423
450
  };
424
451
  /*!
425
- @versini/ui-private v1.5.0
452
+ @versini/ui-private v1.6.0
426
453
  © 2024 gizmette.com
427
454
  */
428
455
  try {
429
456
  window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
430
- version: "1.5.0",
431
- buildTime: "12/18/2024 12:34 PM EST",
457
+ version: "1.6.0",
458
+ buildTime: "12/24/2024 06:47 PM EST",
432
459
  homepage: "https://github.com/aversini/ui-components",
433
460
  license: "MIT"
434
461
  });
@@ -442,7 +469,7 @@ const K = ({
442
469
  monotone: n,
443
470
  ...o
444
471
  }) => /* @__PURE__ */ v(
445
- M,
472
+ C,
446
473
  {
447
474
  defaultViewBox: "0 0 448 512",
448
475
  defaultClassName: "size-5",
@@ -452,14 +479,14 @@ const K = ({
452
479
  title: a || "Copied",
453
480
  ...o,
454
481
  children: [
455
- /* @__PURE__ */ d(
482
+ /* @__PURE__ */ c(
456
483
  "path",
457
484
  {
458
485
  opacity: "0.4",
459
486
  d: "M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"
460
487
  }
461
488
  ),
462
- /* @__PURE__ */ d("path", { d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z" })
489
+ /* @__PURE__ */ c("path", { d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z" })
463
490
  ]
464
491
  }
465
492
  ), Q = ({
@@ -469,8 +496,8 @@ const K = ({
469
496
  title: a,
470
497
  monotone: n,
471
498
  ...o
472
- }) => /* @__PURE__ */ d(
473
- M,
499
+ }) => /* @__PURE__ */ c(
500
+ C,
474
501
  {
475
502
  defaultViewBox: "0 0 512 512",
476
503
  defaultClassName: "size-5",
@@ -479,17 +506,30 @@ const K = ({
479
506
  spacing: t,
480
507
  title: a || "Copy",
481
508
  ...o,
482
- children: /* @__PURE__ */ d("path", { d: "M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z" })
509
+ children: /* @__PURE__ */ c("path", { d: "M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z" })
483
510
  }
484
511
  );
485
512
  /*!
486
- @versini/ui-icons v1.16.0
513
+ @versini/ui-icons v1.17.0
487
514
  © 2024 gizmette.com
488
515
  */
489
516
  try {
490
517
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
491
- version: "1.16.0",
492
- buildTime: "12/18/2024 12:35 PM EST",
518
+ version: "1.17.0",
519
+ buildTime: "12/24/2024 06:47 PM EST",
520
+ homepage: "https://github.com/aversini/ui-components",
521
+ license: "MIT"
522
+ });
523
+ } catch {
524
+ }
525
+ /*!
526
+ @versini/ui-spacing v1.0.0
527
+ © 2024 gizmette.com
528
+ */
529
+ try {
530
+ window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
531
+ version: "1.0.0",
532
+ buildTime: "12/24/2024 06:47 PM EST",
493
533
  homepage: "https://github.com/aversini/ui-components",
494
534
  license: "MIT"
495
535
  });
@@ -522,7 +562,7 @@ const X = (e) => {
522
562
  }) => {
523
563
  const a = i(
524
564
  r,
525
- U,
565
+ L,
526
566
  "flex items-start",
527
567
  X(t),
528
568
  {
@@ -555,27 +595,27 @@ const X = (e) => {
555
595
  copyToClipboardMode: l = "system",
556
596
  spacing: b
557
597
  }) => {
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 = () => {
598
+ const [g, p] = U(!1), u = re({ kind: r, className: t, spacing: b }), m = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), d = () => {
559
599
  p(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
560
600
  };
561
- return L(() => {
562
- let u;
563
- return g && (u = window.setTimeout(() => {
601
+ return z(() => {
602
+ let h;
603
+ return g && (h = window.setTimeout(() => {
564
604
  p(!1);
565
605
  }, 3e3)), () => {
566
- clearTimeout(u);
606
+ clearTimeout(h);
567
607
  };
568
- }, [g]), /* @__PURE__ */ v("div", { className: h.wrapper, children: [
608
+ }, [g]), /* @__PURE__ */ v("div", { className: u.wrapper, children: [
569
609
  /* @__PURE__ */ v("div", { children: [
570
- /* @__PURE__ */ d("div", { className: h.main, children: e }),
571
- a && Object.keys(a).map((u) => a[u] ? /* @__PURE__ */ d("div", { className: "prose-p:m-0", children: /* @__PURE__ */ v("p", { className: h.footer, children: [
572
- u,
610
+ /* @__PURE__ */ c("div", { className: u.main, children: e }),
611
+ a && Object.keys(a).map((h) => a[h] ? /* @__PURE__ */ c("div", { className: "prose-p:m-0", children: /* @__PURE__ */ v("p", { className: u.footer, children: [
612
+ h,
573
613
  ": ",
574
- a[u]
575
- ] }) }, `-${u}`) : null),
614
+ a[h]
615
+ ] }) }, `-${h}`) : null),
576
616
  n && n
577
617
  ] }),
578
- m && /* @__PURE__ */ d("div", { className: h.copyButton, children: /* @__PURE__ */ d(
618
+ m && /* @__PURE__ */ c("div", { className: u.copyButton, children: /* @__PURE__ */ c(
579
619
  E,
580
620
  {
581
621
  noBorder: !0,
@@ -584,14 +624,14 @@ const X = (e) => {
584
624
  mode: l,
585
625
  focusMode: s,
586
626
  label: g ? "Copied to clipboard" : "Copy to clipboard",
587
- onClick: c,
627
+ onClick: d,
588
628
  disabled: g,
589
- children: g ? /* @__PURE__ */ d(K, { className: "size-3" }) : /* @__PURE__ */ d(Q, { className: "size-3" })
629
+ children: g ? /* @__PURE__ */ c(K, { className: "size-3" }) : /* @__PURE__ */ c(Q, { className: "size-3" })
590
630
  }
591
631
  ) })
592
632
  ] });
593
633
  };
594
634
  export {
595
- U as BUBBLE_CLASSNAME,
635
+ L as BUBBLE_CLASSNAME,
596
636
  le as Bubble
597
637
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-bubble",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -39,14 +39,16 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@tailwindcss/typography": "0.5.15",
42
- "@versini/ui-button": "1.2.0",
43
- "@versini/ui-icons": "1.16.0",
44
- "@versini/ui-private": "1.5.0",
42
+ "@versini/ui-button": "1.3.0",
43
+ "@versini/ui-icons": "1.17.0",
44
+ "@versini/ui-private": "1.6.0",
45
+ "@versini/ui-spacing": "1.0.0",
46
+ "@versini/ui-spacing-types": "1.0.0",
45
47
  "clsx": "2.1.1",
46
- "tailwindcss": "3.4.15"
48
+ "tailwindcss": "3.4.17"
47
49
  },
48
50
  "sideEffects": [
49
51
  "**/*.css"
50
52
  ],
51
- "gitHead": "413e5c7cd8228d2f135f54fa897101401207229b"
53
+ "gitHead": "cb948414a675c01f3328ed6470ccf4b58f73534f"
52
54
  }