@chloe0592/pebble 0.1.1 → 0.1.2

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
@@ -129,10 +129,13 @@ export declare type SelectSize = 'sm' | 'md' | 'lg';
129
129
 
130
130
  export declare const Spinner: default_2.ForwardRefExoticComponent<SpinnerProps & default_2.RefAttributes<SVGSVGElement>>;
131
131
 
132
+ declare type SpinnerColor = 'indigo' | 'white';
133
+
132
134
  export declare interface SpinnerProps {
133
135
  size?: SpinnerSize;
134
136
  label?: string;
135
137
  className?: string;
138
+ color?: SpinnerColor;
136
139
  }
137
140
 
138
141
  export declare type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
package/dist/pebble.es.js CHANGED
@@ -1,7 +1,7 @@
1
- import { jsxs as _, jsx as t } from "react/jsx-runtime";
2
- import b, { useId as L, useRef as O, useEffect as z, useState as H, useCallback as ae } from "react";
1
+ import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
+ import g, { useId as L, useRef as O, useEffect as z, useState as H, useCallback as ae } from "react";
3
3
  import { createPortal as le } from "react-dom";
4
- const ie = "_spinner_10ctt_1", ce = "_track_10ctt_10", de = "_arc_10ctt_18", _e = "_xs_10ctt_24", pe = "_sm_10ctt_25", ue = "_md_10ctt_26", fe = "_lg_10ctt_27", he = "_xl_10ctt_28", M = {
4
+ const ie = "_spinner_10ctt_1", ce = "_track_10ctt_10", de = "_arc_10ctt_18", _e = "_xs_10ctt_24", pe = "_sm_10ctt_25", ue = "_md_10ctt_26", he = "_lg_10ctt_27", fe = "_xl_10ctt_28", M = {
5
5
  spinner: ie,
6
6
  "pb-spin": "_pb-spin_10ctt_1",
7
7
  track: ce,
@@ -10,33 +10,33 @@ const ie = "_spinner_10ctt_1", ce = "_track_10ctt_10", de = "_arc_10ctt_18", _e
10
10
  xs: _e,
11
11
  sm: pe,
12
12
  md: ue,
13
- lg: fe,
14
- xl: he
13
+ lg: he,
14
+ xl: fe
15
15
  }, me = {
16
16
  xs: 12,
17
17
  sm: 16,
18
18
  md: 24,
19
19
  lg: 32,
20
20
  xl: 48
21
- }, Q = b.forwardRef(
22
- ({ size: r = "md", label: e = "Loading…", className: o = "" }, n) => {
23
- const s = me[r], i = L().replace(/:/g, "");
24
- return /* @__PURE__ */ _(
21
+ }, Q = g.forwardRef(
22
+ ({ size: r = "md", label: e = "Loading…", className: o = "", color: n = "indigo" }, s) => {
23
+ const d = me[r], l = L().replace(/:/g, ""), i = n === "white", u = i ? "rgba(255,255,255,0)" : "#6366f1", m = i ? "rgba(255,255,255,0.9)" : "#6366f1", _ = i ? "rgba(255,255,255,0.9)" : "#a855f7", f = i ? "rgba(255,255,255,0.25)" : void 0;
24
+ return /* @__PURE__ */ p(
25
25
  "svg",
26
26
  {
27
- ref: n,
27
+ ref: s,
28
28
  className: [M.spinner, M[r], o].filter(Boolean).join(" "),
29
- width: s,
30
- height: s,
29
+ width: d,
30
+ height: d,
31
31
  viewBox: "0 0 24 24",
32
32
  fill: "none",
33
33
  "aria-label": e,
34
34
  role: "status",
35
35
  children: [
36
- /* @__PURE__ */ t("defs", { children: /* @__PURE__ */ _("linearGradient", { id: i, x1: "12", y1: "3", x2: "21", y2: "12", gradientUnits: "userSpaceOnUse", children: [
37
- /* @__PURE__ */ t("stop", { offset: "0%", stopColor: "#6366f1", stopOpacity: "0" }),
38
- /* @__PURE__ */ t("stop", { offset: "40%", stopColor: "#6366f1", stopOpacity: "1" }),
39
- /* @__PURE__ */ t("stop", { offset: "100%", stopColor: "#a855f7", stopOpacity: "1" })
36
+ /* @__PURE__ */ t("defs", { children: /* @__PURE__ */ p("linearGradient", { id: l, x1: "12", y1: "3", x2: "21", y2: "12", gradientUnits: "userSpaceOnUse", children: [
37
+ /* @__PURE__ */ t("stop", { offset: "0%", stopColor: u, stopOpacity: "1" }),
38
+ /* @__PURE__ */ t("stop", { offset: "40%", stopColor: m, stopOpacity: "1" }),
39
+ /* @__PURE__ */ t("stop", { offset: "100%", stopColor: _, stopOpacity: "1" })
40
40
  ] }) }),
41
41
  /* @__PURE__ */ t(
42
42
  "circle",
@@ -45,7 +45,8 @@ const ie = "_spinner_10ctt_1", ce = "_track_10ctt_10", de = "_arc_10ctt_18", _e
45
45
  cx: "12",
46
46
  cy: "12",
47
47
  r: "9",
48
- strokeWidth: "2.5"
48
+ strokeWidth: "2.5",
49
+ style: f ? { stroke: f } : void 0
49
50
  }
50
51
  ),
51
52
  /* @__PURE__ */ t(
@@ -55,7 +56,7 @@ const ie = "_spinner_10ctt_1", ce = "_track_10ctt_10", de = "_arc_10ctt_18", _e
55
56
  d: "M12 3a9 9 0 0 1 9 9",
56
57
  strokeWidth: "2.5",
57
58
  strokeLinecap: "round",
58
- stroke: `url(#${i})`
59
+ stroke: `url(#${l})`
59
60
  }
60
61
  )
61
62
  ]
@@ -79,38 +80,45 @@ const be = "_button_s5t2n_1", ge = "_sm_s5t2n_47", ve = "_md_s5t2n_55", ke = "_l
79
80
  iconLeft: Re,
80
81
  iconRight: Le,
81
82
  label: Ie
82
- }, Ce = b.forwardRef(
83
+ }, Ce = g.forwardRef(
83
84
  ({
84
85
  variant: r = "primary",
85
86
  size: e = "md",
86
87
  isLoading: o = !1,
87
88
  leftIcon: n,
88
89
  rightIcon: s,
89
- fullWidth: i = !1,
90
- children: c,
91
- disabled: d,
92
- className: f = "",
93
- ...g
94
- }, u) => {
95
- const h = [
90
+ fullWidth: d = !1,
91
+ children: l,
92
+ disabled: i,
93
+ className: u = "",
94
+ ...m
95
+ }, _) => {
96
+ const f = [
96
97
  R.button,
97
98
  R[r],
98
99
  R[e],
99
- i ? R.fullWidth : "",
100
+ d ? R.fullWidth : "",
100
101
  o ? R.loading : "",
101
- f
102
+ u
102
103
  ].filter(Boolean).join(" ");
103
- return /* @__PURE__ */ _(
104
+ return /* @__PURE__ */ p(
104
105
  "button",
105
106
  {
106
- ref: u,
107
- className: h,
108
- disabled: d || o,
107
+ ref: _,
108
+ className: f,
109
+ disabled: i || o,
109
110
  "aria-busy": o || void 0,
110
- ...g,
111
+ ...m,
111
112
  children: [
112
- o ? /* @__PURE__ */ t(Q, { size: "sm", label: "Loading" }) : n && /* @__PURE__ */ t("span", { className: R.iconLeft, "aria-hidden": "true", children: n }),
113
- c && /* @__PURE__ */ t("span", { className: R.label, children: c }),
113
+ o ? /* @__PURE__ */ t(
114
+ Q,
115
+ {
116
+ size: "sm",
117
+ label: "Loading",
118
+ color: r === "primary" || r === "danger" ? "white" : "indigo"
119
+ }
120
+ ) : n && /* @__PURE__ */ t("span", { className: R.iconLeft, "aria-hidden": "true", children: n }),
121
+ l && /* @__PURE__ */ t("span", { className: R.label, children: l }),
114
122
  !o && s && /* @__PURE__ */ t("span", { className: R.iconRight, "aria-hidden": "true", children: s })
115
123
  ]
116
124
  }
@@ -118,10 +126,10 @@ const be = "_button_s5t2n_1", ge = "_sm_s5t2n_47", ve = "_md_s5t2n_55", ke = "_l
118
126
  }
119
127
  );
120
128
  Ce.displayName = "Button";
121
- const Te = "_wrapper_5z8qu_3", Se = "_label_5z8qu_10", We = "_inputWrapper_5z8qu_21", ze = "_error_5z8qu_39", Ee = "_disabled_5z8qu_39", qe = "_sm_5z8qu_70", Ae = "_md_5z8qu_71", De = "_lg_5z8qu_72", Me = "_input_5z8qu_21", Pe = "_hasLeft_5z8qu_109", Fe = "_hasRight_5z8qu_110", Oe = "_iconLeft_5z8qu_114", Ue = "_iconRight_5z8qu_115", Ve = "_helperText_5z8qu_134", Ge = "_errorText_5z8qu_142", k = {
129
+ const Te = "_wrapper_5z8qu_3", We = "_label_5z8qu_10", Se = "_inputWrapper_5z8qu_21", ze = "_error_5z8qu_39", Ee = "_disabled_5z8qu_39", qe = "_sm_5z8qu_70", Ae = "_md_5z8qu_71", De = "_lg_5z8qu_72", Me = "_input_5z8qu_21", Pe = "_hasLeft_5z8qu_109", Fe = "_hasRight_5z8qu_110", Oe = "_iconLeft_5z8qu_114", Ue = "_iconRight_5z8qu_115", Ve = "_helperText_5z8qu_134", Ge = "_errorText_5z8qu_142", k = {
122
130
  wrapper: Te,
123
- label: Se,
124
- inputWrapper: We,
131
+ label: We,
132
+ inputWrapper: Se,
125
133
  error: ze,
126
134
  disabled: Ee,
127
135
  sm: qe,
@@ -134,50 +142,50 @@ const Te = "_wrapper_5z8qu_3", Se = "_label_5z8qu_10", We = "_inputWrapper_5z8qu
134
142
  iconRight: Ue,
135
143
  helperText: Ve,
136
144
  errorText: Ge
137
- }, He = b.forwardRef(
145
+ }, He = g.forwardRef(
138
146
  ({
139
147
  label: r,
140
148
  helperText: e,
141
149
  errorText: o,
142
150
  leftIcon: n,
143
151
  rightIcon: s,
144
- size: i = "md",
145
- className: c = "",
146
- id: d,
147
- disabled: f,
148
- ...g
149
- }, u) => {
150
- const h = L(), a = d ?? h, w = `${a}-helper`, m = `${a}-error`, N = !!o, E = [N ? m : "", e ? w : ""].filter(Boolean).join(" ") || void 0;
151
- return /* @__PURE__ */ _("div", { className: [k.wrapper, c].filter(Boolean).join(" "), children: [
152
+ size: d = "md",
153
+ className: l = "",
154
+ id: i,
155
+ disabled: u,
156
+ ...m
157
+ }, _) => {
158
+ const f = L(), a = i ?? f, w = `${a}-helper`, b = `${a}-error`, N = !!o, E = [N ? b : "", e ? w : ""].filter(Boolean).join(" ") || void 0;
159
+ return /* @__PURE__ */ p("div", { className: [k.wrapper, l].filter(Boolean).join(" "), children: [
152
160
  r && /* @__PURE__ */ t("label", { htmlFor: a, className: k.label, children: r }),
153
- /* @__PURE__ */ _(
161
+ /* @__PURE__ */ p(
154
162
  "div",
155
163
  {
156
164
  className: [
157
165
  k.inputWrapper,
158
- k[i],
166
+ k[d],
159
167
  N ? k.error : "",
160
- f ? k.disabled : ""
168
+ u ? k.disabled : ""
161
169
  ].filter(Boolean).join(" "),
162
170
  children: [
163
171
  n && /* @__PURE__ */ t("span", { className: k.iconLeft, "aria-hidden": "true", children: n }),
164
172
  /* @__PURE__ */ t(
165
173
  "input",
166
174
  {
167
- ref: u,
175
+ ref: _,
168
176
  id: a,
169
177
  className: [k.input, n ? k.hasLeft : "", s ? k.hasRight : ""].filter(Boolean).join(" "),
170
- disabled: f,
178
+ disabled: u,
171
179
  "aria-invalid": N || void 0,
172
180
  "aria-describedby": E,
173
- ...g
181
+ ...m
174
182
  }
175
183
  ),
176
184
  s && /* @__PURE__ */ t("span", { className: k.iconRight, "aria-hidden": "true", children: s })
177
185
  ]
178
186
  }
179
187
  ),
180
- N ? /* @__PURE__ */ t("p", { id: m, className: k.errorText, role: "alert", children: o }) : e ? /* @__PURE__ */ t("p", { id: w, className: k.helperText, children: e }) : null
188
+ N ? /* @__PURE__ */ t("p", { id: b, className: k.errorText, role: "alert", children: o }) : e ? /* @__PURE__ */ t("p", { id: w, className: k.helperText, children: e }) : null
181
189
  ] });
182
190
  }
183
191
  );
@@ -190,40 +198,40 @@ const Ke = "_wrapper_1566g_3", Je = "_label_1566g_10", Qe = "_textarea_1566g_19"
190
198
  disabled: Ye,
191
199
  helperText: Ze,
192
200
  errorText: et
193
- }, tt = b.forwardRef(
201
+ }, tt = g.forwardRef(
194
202
  ({
195
203
  label: r,
196
204
  helperText: e,
197
205
  errorText: o,
198
206
  resize: n = "vertical",
199
207
  className: s = "",
200
- id: i,
201
- disabled: c,
202
- rows: d = 4,
203
- ...f
204
- }, g) => {
205
- const u = L(), h = i ?? u, a = `${h}-helper`, w = `${h}-error`, m = !!o, N = [m ? w : "", e ? a : ""].filter(Boolean).join(" ") || void 0;
206
- return /* @__PURE__ */ _("div", { className: [T.wrapper, s].filter(Boolean).join(" "), children: [
207
- r && /* @__PURE__ */ t("label", { htmlFor: h, className: T.label, children: r }),
208
+ id: d,
209
+ disabled: l,
210
+ rows: i = 4,
211
+ ...u
212
+ }, m) => {
213
+ const _ = L(), f = d ?? _, a = `${f}-helper`, w = `${f}-error`, b = !!o, N = [b ? w : "", e ? a : ""].filter(Boolean).join(" ") || void 0;
214
+ return /* @__PURE__ */ p("div", { className: [T.wrapper, s].filter(Boolean).join(" "), children: [
215
+ r && /* @__PURE__ */ t("label", { htmlFor: f, className: T.label, children: r }),
208
216
  /* @__PURE__ */ t(
209
217
  "textarea",
210
218
  {
211
- ref: g,
212
- id: h,
213
- rows: d,
219
+ ref: m,
220
+ id: f,
221
+ rows: i,
214
222
  className: [
215
223
  T.textarea,
216
- m ? T.error : "",
217
- c ? T.disabled : ""
224
+ b ? T.error : "",
225
+ l ? T.disabled : ""
218
226
  ].filter(Boolean).join(" "),
219
227
  style: { resize: n },
220
- disabled: c,
221
- "aria-invalid": m || void 0,
228
+ disabled: l,
229
+ "aria-invalid": b || void 0,
222
230
  "aria-describedby": N,
223
- ...f
231
+ ...u
224
232
  }
225
233
  ),
226
- m ? /* @__PURE__ */ t("p", { id: w, className: T.errorText, role: "alert", children: o }) : e ? /* @__PURE__ */ t("p", { id: a, className: T.helperText, children: e }) : null
234
+ b ? /* @__PURE__ */ t("p", { id: w, className: T.errorText, role: "alert", children: o }) : e ? /* @__PURE__ */ t("p", { id: a, className: T.helperText, children: e }) : null
227
235
  ] });
228
236
  }
229
237
  );
@@ -243,21 +251,21 @@ const ot = "_backdrop_1v4s9_3", rt = "_dialog_1v4s9_17", st = "_sm_1v4s9_37", nt
243
251
  description: _t,
244
252
  body: pt,
245
253
  footer: ut
246
- }, ft = ({
254
+ }, ht = ({
247
255
  isOpen: r,
248
256
  onClose: e,
249
257
  title: o,
250
258
  description: n,
251
259
  size: s = "md",
252
- closeOnBackdrop: i = !0,
253
- children: c,
254
- footer: d,
255
- className: f = ""
260
+ closeOnBackdrop: d = !0,
261
+ children: l,
262
+ footer: i,
263
+ className: u = ""
256
264
  }) => {
257
- const g = L(), u = L(), h = O(null);
265
+ const m = L(), _ = L(), f = O(null);
258
266
  return z(() => {
259
267
  if (!r) return;
260
- const a = h.current;
268
+ const a = f.current;
261
269
  if (!a) return;
262
270
  const w = a.querySelector(
263
271
  'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
@@ -276,17 +284,17 @@ const ot = "_backdrop_1v4s9_3", rt = "_dialog_1v4s9_17", st = "_sm_1v4s9_37", nt
276
284
  "div",
277
285
  {
278
286
  className: $.backdrop,
279
- onClick: i ? e : void 0,
287
+ onClick: d ? e : void 0,
280
288
  "aria-hidden": "true",
281
- children: /* @__PURE__ */ _(
289
+ children: /* @__PURE__ */ p(
282
290
  "div",
283
291
  {
284
- ref: h,
292
+ ref: f,
285
293
  role: "dialog",
286
294
  "aria-modal": "true",
287
- "aria-labelledby": o ? g : void 0,
288
- "aria-describedby": n ? u : void 0,
289
- className: [$.dialog, $[s], f].filter(Boolean).join(" "),
295
+ "aria-labelledby": o ? m : void 0,
296
+ "aria-describedby": n ? _ : void 0,
297
+ className: [$.dialog, $[s], u].filter(Boolean).join(" "),
290
298
  tabIndex: -1,
291
299
  onClick: (a) => a.stopPropagation(),
292
300
  children: [
@@ -311,12 +319,12 @@ const ot = "_backdrop_1v4s9_3", rt = "_dialog_1v4s9_17", st = "_sm_1v4s9_37", nt
311
319
  )
312
320
  }
313
321
  ),
314
- (o || n) && /* @__PURE__ */ _("div", { className: $.header, children: [
315
- o && /* @__PURE__ */ t("h2", { id: g, className: $.title, children: o }),
316
- n && /* @__PURE__ */ t("p", { id: u, className: $.description, children: n })
322
+ (o || n) && /* @__PURE__ */ p("div", { className: $.header, children: [
323
+ o && /* @__PURE__ */ t("h2", { id: m, className: $.title, children: o }),
324
+ n && /* @__PURE__ */ t("p", { id: _, className: $.description, children: n })
317
325
  ] }),
318
- /* @__PURE__ */ t("div", { className: $.body, children: c }),
319
- d && /* @__PURE__ */ t("div", { className: $.footer, children: d })
326
+ /* @__PURE__ */ t("div", { className: $.body, children: l }),
327
+ i && /* @__PURE__ */ t("div", { className: $.footer, children: i })
320
328
  ]
321
329
  }
322
330
  )
@@ -325,9 +333,9 @@ const ot = "_backdrop_1v4s9_3", rt = "_dialog_1v4s9_17", st = "_sm_1v4s9_37", nt
325
333
  document.body
326
334
  ) : null;
327
335
  };
328
- ft.displayName = "Modal";
329
- const ht = "_card_i6i72_3", mt = "_elevated_i6i72_25", bt = "_bordered_i6i72_36", gt = "_flat_i6i72_48", vt = "_hoverable_i6i72_60", kt = "_clickable_i6i72_68", wt = "_header_i6i72_96", yt = "_body_i6i72_105", xt = "_footer_i6i72_112", S = {
330
- card: ht,
336
+ ht.displayName = "Modal";
337
+ const ft = "_card_i6i72_3", mt = "_elevated_i6i72_25", bt = "_bordered_i6i72_36", gt = "_flat_i6i72_48", vt = "_hoverable_i6i72_60", kt = "_clickable_i6i72_68", wt = "_header_i6i72_96", yt = "_body_i6i72_105", xt = "_footer_i6i72_112", W = {
338
+ card: ft,
331
339
  default: "_default_i6i72_15",
332
340
  elevated: mt,
333
341
  bordered: bt,
@@ -337,36 +345,36 @@ const ht = "_card_i6i72_3", mt = "_elevated_i6i72_25", bt = "_bordered_i6i72_36"
337
345
  header: wt,
338
346
  body: yt,
339
347
  footer: xt
340
- }, X = ({ children: r, className: e = "", ...o }) => /* @__PURE__ */ t("div", { className: [S.header, e].filter(Boolean).join(" "), ...o, children: r });
348
+ }, X = ({ children: r, className: e = "", ...o }) => /* @__PURE__ */ t("div", { className: [W.header, e].filter(Boolean).join(" "), ...o, children: r });
341
349
  X.displayName = "Card.Header";
342
- const Y = ({ children: r, className: e = "", ...o }) => /* @__PURE__ */ t("div", { className: [S.body, e].filter(Boolean).join(" "), ...o, children: r });
350
+ const Y = ({ children: r, className: e = "", ...o }) => /* @__PURE__ */ t("div", { className: [W.body, e].filter(Boolean).join(" "), ...o, children: r });
343
351
  Y.displayName = "Card.Body";
344
- const Z = ({ children: r, className: e = "", ...o }) => /* @__PURE__ */ t("div", { className: [S.footer, e].filter(Boolean).join(" "), ...o, children: r });
352
+ const Z = ({ children: r, className: e = "", ...o }) => /* @__PURE__ */ t("div", { className: [W.footer, e].filter(Boolean).join(" "), ...o, children: r });
345
353
  Z.displayName = "Card.Footer";
346
- const U = b.forwardRef(
354
+ const U = g.forwardRef(
347
355
  ({
348
356
  variant: r = "default",
349
357
  hoverable: e = !1,
350
358
  clickable: o = !1,
351
359
  children: n,
352
360
  className: s = "",
353
- ...i
354
- }, c) => {
355
- const d = [
356
- S.card,
357
- S[r],
358
- e ? S.hoverable : "",
359
- o ? S.clickable : "",
361
+ ...d
362
+ }, l) => {
363
+ const i = [
364
+ W.card,
365
+ W[r],
366
+ e ? W.hoverable : "",
367
+ o ? W.clickable : "",
360
368
  s
361
369
  ].filter(Boolean).join(" ");
362
370
  return /* @__PURE__ */ t(
363
371
  "div",
364
372
  {
365
- ref: c,
366
- className: d,
373
+ ref: l,
374
+ className: i,
367
375
  role: o ? "button" : void 0,
368
376
  tabIndex: o ? 0 : void 0,
369
- ...i,
377
+ ...d,
370
378
  children: n
371
379
  }
372
380
  );
@@ -387,28 +395,28 @@ const Nt = "_badge_1uusg_3", $t = "_sm_1uusg_20", Bt = "_md_1uusg_25", jt = "_do
387
395
  warning: It,
388
396
  danger: Ct,
389
397
  info: Tt
390
- }, St = b.forwardRef(
398
+ }, Wt = g.forwardRef(
391
399
  ({
392
400
  variant: r = "default",
393
401
  size: e = "md",
394
402
  dot: o = !1,
395
403
  children: n,
396
404
  className: s = "",
397
- ...i
398
- }, c) => {
399
- const d = [
405
+ ...d
406
+ }, l) => {
407
+ const i = [
400
408
  P.badge,
401
409
  P[r],
402
410
  P[e],
403
411
  o ? P.dot : "",
404
412
  s
405
413
  ].filter(Boolean).join(" ");
406
- return /* @__PURE__ */ t("span", { ref: c, className: d, ...i, children: o ? null : n });
414
+ return /* @__PURE__ */ t("span", { ref: l, className: i, ...d, children: o ? null : n });
407
415
  }
408
416
  );
409
- St.displayName = "Badge";
410
- const Wt = "_avatar_n1f99_3", zt = "_xs_n1f99_25", Et = "_sm_n1f99_26", qt = "_md_n1f99_27", At = "_lg_n1f99_28", Dt = "_xl_n1f99_29", Mt = "_image_n1f99_33", Pt = "_initials_n1f99_42", Ft = "_fallbackIcon_n1f99_57", Ot = "_status_n1f99_65", Ut = "_overflow_n1f99_95", Vt = "_group_n1f99_107", y = {
411
- avatar: Wt,
417
+ Wt.displayName = "Badge";
418
+ const St = "_avatar_n1f99_3", zt = "_xs_n1f99_25", Et = "_sm_n1f99_26", qt = "_md_n1f99_27", At = "_lg_n1f99_28", Dt = "_xl_n1f99_29", Mt = "_image_n1f99_33", Pt = "_initials_n1f99_42", Ft = "_fallbackIcon_n1f99_57", Ot = "_status_n1f99_65", Ut = "_overflow_n1f99_95", Vt = "_group_n1f99_107", y = {
419
+ avatar: St,
412
420
  xs: zt,
413
421
  sm: Et,
414
422
  md: qt,
@@ -429,26 +437,26 @@ function Gt(r) {
429
437
  const e = r.trim().split(/\s+/);
430
438
  return e.length === 1 ? e[0].charAt(0).toUpperCase() : (e[0].charAt(0) + e[e.length - 1].charAt(0)).toUpperCase();
431
439
  }
432
- const Ht = b.forwardRef(
433
- ({ src: r, alt: e = "", name: o, size: n = "md", status: s, className: i = "" }, c) => {
434
- const [d, f] = H(!1), g = r && !d, u = o ? Gt(o) : null;
435
- return /* @__PURE__ */ _(
440
+ const Ht = g.forwardRef(
441
+ ({ src: r, alt: e = "", name: o, size: n = "md", status: s, className: d = "" }, l) => {
442
+ const [i, u] = H(!1), m = r && !i, _ = o ? Gt(o) : null;
443
+ return /* @__PURE__ */ p(
436
444
  "div",
437
445
  {
438
- ref: c,
439
- className: [y.avatar, y[n], i].filter(Boolean).join(" "),
446
+ ref: l,
447
+ className: [y.avatar, y[n], d].filter(Boolean).join(" "),
440
448
  "aria-label": o ?? e,
441
449
  title: o ?? e,
442
450
  children: [
443
- g ? /* @__PURE__ */ t(
451
+ m ? /* @__PURE__ */ t(
444
452
  "img",
445
453
  {
446
454
  src: r,
447
455
  alt: e || o || "",
448
456
  className: y.image,
449
- onError: () => f(!0)
457
+ onError: () => u(!0)
450
458
  }
451
- ) : u ? /* @__PURE__ */ t("span", { className: y.initials, "aria-hidden": "true", children: u }) : /* @__PURE__ */ t(
459
+ ) : _ ? /* @__PURE__ */ t("span", { className: y.initials, "aria-hidden": "true", children: _ }) : /* @__PURE__ */ t(
452
460
  "svg",
453
461
  {
454
462
  className: y.fallbackIcon,
@@ -477,12 +485,12 @@ const Kt = ({
477
485
  size: o = "md",
478
486
  className: n = ""
479
487
  }) => {
480
- const s = b.Children.toArray(r), i = e ? s.slice(0, e) : s, c = e && s.length > e ? s.length - e : 0;
481
- return /* @__PURE__ */ _("div", { className: [y.group, n].filter(Boolean).join(" "), children: [
482
- i,
483
- c > 0 && /* @__PURE__ */ t("div", { className: [y.avatar, y[o], y.overflow].join(" "), children: /* @__PURE__ */ _("span", { className: y.initials, children: [
488
+ const s = g.Children.toArray(r), d = e ? s.slice(0, e) : s, l = e && s.length > e ? s.length - e : 0;
489
+ return /* @__PURE__ */ p("div", { className: [y.group, n].filter(Boolean).join(" "), children: [
490
+ d,
491
+ l > 0 && /* @__PURE__ */ t("div", { className: [y.avatar, y[o], y.overflow].join(" "), children: /* @__PURE__ */ p("span", { className: y.initials, children: [
484
492
  "+",
485
- c
493
+ l
486
494
  ] }) })
487
495
  ] });
488
496
  };
@@ -501,12 +509,12 @@ const Jt = "_wrapper_4w97v_8", Qt = "_tooltip_4w97v_17", Xt = "_arrow_4w97v_49",
501
509
  children: o,
502
510
  className: n = ""
503
511
  }) => {
504
- const s = L(), i = b.cloneElement(o, {
512
+ const s = L(), d = g.cloneElement(o, {
505
513
  "aria-describedby": s
506
514
  });
507
- return /* @__PURE__ */ _("div", { className: [F.wrapper, n].filter(Boolean).join(" "), children: [
508
- i,
509
- /* @__PURE__ */ _(
515
+ return /* @__PURE__ */ p("div", { className: [F.wrapper, n].filter(Boolean).join(" "), children: [
516
+ d,
517
+ /* @__PURE__ */ p(
510
518
  "div",
511
519
  {
512
520
  id: s,
@@ -521,7 +529,7 @@ const Jt = "_wrapper_4w97v_8", Qt = "_tooltip_4w97v_17", Xt = "_arrow_4w97v_49",
521
529
  ] });
522
530
  };
523
531
  oo.displayName = "Tooltip";
524
- const ro = "_wrapper_kn5iw_3", so = "_label_kn5iw_12", no = "_triggerWrapper_kn5iw_23", ao = "_trigger_kn5iw_23", lo = "_open_kn5iw_64", io = "_error_kn5iw_71", co = "_disabled_kn5iw_78", _o = "_sm_kn5iw_90", po = "_md_kn5iw_91", uo = "_lg_kn5iw_92", fo = "_triggerValue_kn5iw_96", ho = "_triggerPlaceholder_kn5iw_103", mo = "_chevron_kn5iw_113", bo = "_chevronOpen_kn5iw_124", go = "_dropdown_kn5iw_135", vo = "_option_kn5iw_159", ko = "_optionDisabled_kn5iw_173", wo = "_optionSelected_kn5iw_177", yo = "_optionLabel_kn5iw_192", xo = "_checkmark_kn5iw_196", No = "_helperText_kn5iw_206", $o = "_errorText_kn5iw_214", p = {
532
+ const ro = "_wrapper_kn5iw_3", so = "_label_kn5iw_12", no = "_triggerWrapper_kn5iw_23", ao = "_trigger_kn5iw_23", lo = "_open_kn5iw_64", io = "_error_kn5iw_71", co = "_disabled_kn5iw_78", _o = "_sm_kn5iw_90", po = "_md_kn5iw_91", uo = "_lg_kn5iw_92", ho = "_triggerValue_kn5iw_96", fo = "_triggerPlaceholder_kn5iw_103", mo = "_chevron_kn5iw_113", bo = "_chevronOpen_kn5iw_124", go = "_dropdown_kn5iw_135", vo = "_option_kn5iw_159", ko = "_optionDisabled_kn5iw_173", wo = "_optionSelected_kn5iw_177", yo = "_optionLabel_kn5iw_192", xo = "_checkmark_kn5iw_196", No = "_helperText_kn5iw_206", $o = "_errorText_kn5iw_214", h = {
525
533
  wrapper: ro,
526
534
  label: so,
527
535
  triggerWrapper: no,
@@ -532,8 +540,8 @@ const ro = "_wrapper_kn5iw_3", so = "_label_kn5iw_12", no = "_triggerWrapper_kn5
532
540
  sm: _o,
533
541
  md: po,
534
542
  lg: uo,
535
- triggerValue: fo,
536
- triggerPlaceholder: ho,
543
+ triggerValue: ho,
544
+ triggerPlaceholder: fo,
537
545
  chevron: mo,
538
546
  chevronOpen: bo,
539
547
  dropdown: go,
@@ -546,8 +554,8 @@ const ro = "_wrapper_kn5iw_3", so = "_label_kn5iw_12", no = "_triggerWrapper_kn5
546
554
  errorText: $o
547
555
  };
548
556
  function Bo(r) {
549
- return b.Children.toArray(r).filter(
550
- (e) => b.isValidElement(e) && e.type === "option" && !e.props.disabled
557
+ return g.Children.toArray(r).filter(
558
+ (e) => g.isValidElement(e) && e.type === "option" && !e.props.disabled
551
559
  ).map((e) => ({
552
560
  value: String(e.props.value ?? ""),
553
561
  label: String(e.props.children ?? ""),
@@ -555,69 +563,69 @@ function Bo(r) {
555
563
  })).filter((e) => e.value !== "");
556
564
  }
557
565
  function jo(r) {
558
- const e = b.Children.toArray(r).find(
559
- (o) => b.isValidElement(o) && o.type === "option" && (o.props.value === "" || o.props.value == null) && o.props.disabled
566
+ const e = g.Children.toArray(r).find(
567
+ (o) => g.isValidElement(o) && o.type === "option" && (o.props.value === "" || o.props.value == null) && o.props.disabled
560
568
  );
561
569
  return e ? String(e.props.children) : void 0;
562
570
  }
563
- const Ro = b.forwardRef(
571
+ const Ro = g.forwardRef(
564
572
  ({
565
573
  label: r,
566
574
  helperText: e,
567
575
  errorText: o,
568
576
  placeholder: n,
569
577
  size: s = "md",
570
- className: i = "",
571
- id: c,
572
- disabled: d,
573
- value: f,
574
- defaultValue: g,
575
- onChange: u,
576
- children: h
578
+ className: d = "",
579
+ id: l,
580
+ disabled: i,
581
+ value: u,
582
+ defaultValue: m,
583
+ onChange: _,
584
+ children: f
577
585
  }, a) => {
578
- const w = L(), m = c ?? w, N = `${m}-listbox`, E = `${m}-helper`, K = `${m}-error`, q = !!o, W = Bo(h), ee = n ?? jo(h) ?? "Select…", [B, j] = H(!1), [te, oe] = H(
579
- String(g ?? f ?? "")
580
- ), A = f !== void 0 ? String(f) : te, D = W.find((l) => l.value === A), V = O(null), J = O(null), re = (l) => {
581
- J.current = l, typeof a == "function" ? a(l) : a && (a.current = l);
586
+ const w = L(), b = l ?? w, N = `${b}-listbox`, E = `${b}-helper`, K = `${b}-error`, q = !!o, S = Bo(f), ee = n ?? jo(f) ?? "Select…", [B, j] = H(!1), [te, oe] = H(
587
+ String(m ?? u ?? "")
588
+ ), A = u !== void 0 ? String(u) : te, D = S.find((c) => c.value === A), V = O(null), J = O(null), re = (c) => {
589
+ J.current = c, typeof a == "function" ? a(c) : a && (a.current = c);
582
590
  };
583
591
  z(() => {
584
592
  if (!B) return;
585
- const l = (v) => {
593
+ const c = (v) => {
586
594
  V.current && !V.current.contains(v.target) && j(!1);
587
595
  };
588
- return document.addEventListener("pointerdown", l), () => document.removeEventListener("pointerdown", l);
596
+ return document.addEventListener("pointerdown", c), () => document.removeEventListener("pointerdown", c);
589
597
  }, [B]);
590
598
  const G = ae(
591
- (l) => {
599
+ (c) => {
592
600
  var v;
593
- f === void 0 && oe(l), j(!1), (v = J.current) == null || v.focus(), u == null || u({ target: { value: l } });
601
+ u === void 0 && oe(c), j(!1), (v = J.current) == null || v.focus(), _ == null || _({ target: { value: c } });
594
602
  },
595
- [f, u]
596
- ), se = (l) => {
597
- if (!d)
598
- switch (l.key) {
603
+ [u, _]
604
+ ), se = (c) => {
605
+ if (!i)
606
+ switch (c.key) {
599
607
  case "Enter":
600
608
  case " ":
601
- l.preventDefault(), j((v) => !v);
609
+ c.preventDefault(), j((v) => !v);
602
610
  break;
603
611
  case "Escape":
604
612
  j(!1);
605
613
  break;
606
614
  case "ArrowDown": {
607
- if (l.preventDefault(), !B) {
615
+ if (c.preventDefault(), !B) {
608
616
  j(!0);
609
617
  break;
610
618
  }
611
- const v = W.findIndex((C) => C.value === A), I = W.slice(v + 1).find((C) => !C.disabled);
619
+ const v = S.findIndex((C) => C.value === A), I = S.slice(v + 1).find((C) => !C.disabled);
612
620
  I && G(I.value);
613
621
  break;
614
622
  }
615
623
  case "ArrowUp": {
616
- if (l.preventDefault(), !B) {
624
+ if (c.preventDefault(), !B) {
617
625
  j(!0);
618
626
  break;
619
627
  }
620
- const v = W.findIndex((C) => C.value === A), I = W.slice(0, v).reverse().find((C) => !C.disabled);
628
+ const v = S.findIndex((C) => C.value === A), I = S.slice(0, v).reverse().find((C) => !C.disabled);
621
629
  I && G(I.value);
622
630
  break;
623
631
  }
@@ -626,38 +634,38 @@ const Ro = b.forwardRef(
626
634
  break;
627
635
  }
628
636
  }, ne = [q ? K : "", e ? E : ""].filter(Boolean).join(" ") || void 0;
629
- return /* @__PURE__ */ _("div", { ref: V, className: [p.wrapper, i].filter(Boolean).join(" "), children: [
630
- r && /* @__PURE__ */ t("label", { id: `${m}-label`, htmlFor: m, className: p.label, children: r }),
631
- /* @__PURE__ */ _("div", { className: p.triggerWrapper, children: [
632
- /* @__PURE__ */ _(
637
+ return /* @__PURE__ */ p("div", { ref: V, className: [h.wrapper, d].filter(Boolean).join(" "), children: [
638
+ r && /* @__PURE__ */ t("label", { id: `${b}-label`, htmlFor: b, className: h.label, children: r }),
639
+ /* @__PURE__ */ p("div", { className: h.triggerWrapper, children: [
640
+ /* @__PURE__ */ p(
633
641
  "button",
634
642
  {
635
643
  ref: re,
636
644
  type: "button",
637
- id: m,
645
+ id: b,
638
646
  role: "combobox",
639
647
  "aria-haspopup": "listbox",
640
648
  "aria-expanded": B,
641
649
  "aria-controls": N,
642
- "aria-labelledby": r ? `${m}-label` : void 0,
650
+ "aria-labelledby": r ? `${b}-label` : void 0,
643
651
  "aria-describedby": ne,
644
652
  "aria-invalid": q || void 0,
645
- disabled: d,
653
+ disabled: i,
646
654
  className: [
647
- p.trigger,
648
- p[s],
649
- q ? p.error : "",
650
- d ? p.disabled : "",
651
- B ? p.open : ""
655
+ h.trigger,
656
+ h[s],
657
+ q ? h.error : "",
658
+ i ? h.disabled : "",
659
+ B ? h.open : ""
652
660
  ].filter(Boolean).join(" "),
653
- onClick: () => !d && j((l) => !l),
661
+ onClick: () => !i && j((c) => !c),
654
662
  onKeyDown: se,
655
663
  children: [
656
- /* @__PURE__ */ t("span", { className: D ? p.triggerValue : p.triggerPlaceholder, children: (D == null ? void 0 : D.label) ?? ee }),
664
+ /* @__PURE__ */ t("span", { className: D ? h.triggerValue : h.triggerPlaceholder, children: (D == null ? void 0 : D.label) ?? ee }),
657
665
  /* @__PURE__ */ t(
658
666
  "span",
659
667
  {
660
- className: [p.chevron, B ? p.chevronOpen : ""].filter(Boolean).join(" "),
668
+ className: [h.chevron, B ? h.chevronOpen : ""].filter(Boolean).join(" "),
661
669
  "aria-hidden": "true",
662
670
  children: /* @__PURE__ */ t(
663
671
  "svg",
@@ -683,27 +691,27 @@ const Ro = b.forwardRef(
683
691
  {
684
692
  id: N,
685
693
  role: "listbox",
686
- "aria-labelledby": r ? `${m}-label` : void 0,
687
- className: p.dropdown,
688
- children: W.map((l) => {
689
- const v = l.value === A;
690
- return /* @__PURE__ */ _(
694
+ "aria-labelledby": r ? `${b}-label` : void 0,
695
+ className: h.dropdown,
696
+ children: S.map((c) => {
697
+ const v = c.value === A;
698
+ return /* @__PURE__ */ p(
691
699
  "li",
692
700
  {
693
701
  role: "option",
694
702
  "aria-selected": v,
695
- "aria-disabled": l.disabled,
703
+ "aria-disabled": c.disabled,
696
704
  className: [
697
- p.option,
698
- v ? p.optionSelected : "",
699
- l.disabled ? p.optionDisabled : ""
705
+ h.option,
706
+ v ? h.optionSelected : "",
707
+ c.disabled ? h.optionDisabled : ""
700
708
  ].filter(Boolean).join(" "),
701
709
  onPointerDown: (I) => {
702
- I.preventDefault(), l.disabled || G(l.value);
710
+ I.preventDefault(), c.disabled || G(c.value);
703
711
  },
704
712
  children: [
705
- /* @__PURE__ */ t("span", { className: p.optionLabel, children: l.label }),
706
- v && /* @__PURE__ */ t("span", { className: p.checkmark, "aria-hidden": "true", children: /* @__PURE__ */ t(
713
+ /* @__PURE__ */ t("span", { className: h.optionLabel, children: c.label }),
714
+ v && /* @__PURE__ */ t("span", { className: h.checkmark, "aria-hidden": "true", children: /* @__PURE__ */ t(
707
715
  "svg",
708
716
  {
709
717
  width: "14",
@@ -719,63 +727,63 @@ const Ro = b.forwardRef(
719
727
  ) })
720
728
  ]
721
729
  },
722
- l.value
730
+ c.value
723
731
  );
724
732
  })
725
733
  }
726
734
  )
727
735
  ] }),
728
- q ? /* @__PURE__ */ t("p", { id: K, className: p.errorText, role: "alert", children: o }) : e ? /* @__PURE__ */ t("p", { id: E, className: p.helperText, children: e }) : null
736
+ q ? /* @__PURE__ */ t("p", { id: K, className: h.errorText, role: "alert", children: o }) : e ? /* @__PURE__ */ t("p", { id: E, className: h.helperText, children: e }) : null
729
737
  ] });
730
738
  }
731
739
  );
732
740
  Ro.displayName = "Select";
733
- const Lo = "_wrapper_cefjy_3", Io = "_checkboxRow_cefjy_10", Co = "_sm_cefjy_18", To = "_checkboxBox_cefjy_18", So = "_label_cefjy_22", Wo = "_md_cefjy_26", zo = "_checkboxOuter_cefjy_36", Eo = "_input_cefjy_46", qo = "_checkmark_cefjy_142", Ao = "_dash_cefjy_143", Do = "_disabled_cefjy_174", Mo = "_helperText_cefjy_181", x = {
741
+ const Lo = "_wrapper_cefjy_3", Io = "_checkboxRow_cefjy_10", Co = "_sm_cefjy_18", To = "_checkboxBox_cefjy_18", Wo = "_label_cefjy_22", So = "_md_cefjy_26", zo = "_checkboxOuter_cefjy_36", Eo = "_input_cefjy_46", qo = "_checkmark_cefjy_142", Ao = "_dash_cefjy_143", Do = "_disabled_cefjy_174", Mo = "_helperText_cefjy_181", x = {
734
742
  wrapper: Lo,
735
743
  checkboxRow: Io,
736
744
  sm: Co,
737
745
  checkboxBox: To,
738
- label: So,
739
- md: Wo,
746
+ label: Wo,
747
+ md: So,
740
748
  checkboxOuter: zo,
741
749
  input: Eo,
742
750
  checkmark: qo,
743
751
  dash: Ao,
744
752
  disabled: Do,
745
753
  helperText: Mo
746
- }, Po = b.forwardRef(
754
+ }, Po = g.forwardRef(
747
755
  ({
748
756
  label: r,
749
757
  indeterminate: e = !1,
750
758
  size: o = "md",
751
759
  helperText: n,
752
760
  className: s = "",
753
- id: i,
754
- disabled: c,
755
- ...d
756
- }, f) => {
757
- const g = L(), u = i ?? g, h = O(null), a = f ?? h;
761
+ id: d,
762
+ disabled: l,
763
+ ...i
764
+ }, u) => {
765
+ const m = L(), _ = d ?? m, f = O(null), a = u ?? f;
758
766
  return z(() => {
759
767
  a && "current" in a && a.current && (a.current.indeterminate = e);
760
- }, [e, a]), /* @__PURE__ */ _(
768
+ }, [e, a]), /* @__PURE__ */ p(
761
769
  "div",
762
770
  {
763
- className: [x.wrapper, x[o], c ? x.disabled : "", s].filter(Boolean).join(" "),
771
+ className: [x.wrapper, x[o], l ? x.disabled : "", s].filter(Boolean).join(" "),
764
772
  children: [
765
- /* @__PURE__ */ _("div", { className: x.checkboxRow, children: [
766
- /* @__PURE__ */ _("div", { className: x.checkboxOuter, children: [
773
+ /* @__PURE__ */ p("div", { className: x.checkboxRow, children: [
774
+ /* @__PURE__ */ p("div", { className: x.checkboxOuter, children: [
767
775
  /* @__PURE__ */ t(
768
776
  "input",
769
777
  {
770
778
  ref: a,
771
- id: u,
779
+ id: _,
772
780
  type: "checkbox",
773
781
  className: x.input,
774
- disabled: c,
775
- ...d
782
+ disabled: l,
783
+ ...i
776
784
  }
777
785
  ),
778
- /* @__PURE__ */ _("div", { className: x.checkboxBox, "aria-hidden": "true", children: [
786
+ /* @__PURE__ */ p("div", { className: x.checkboxBox, "aria-hidden": "true", children: [
779
787
  /* @__PURE__ */ t(
780
788
  "svg",
781
789
  {
@@ -813,7 +821,7 @@ const Lo = "_wrapper_cefjy_3", Io = "_checkboxRow_cefjy_10", Co = "_sm_cefjy_18"
813
821
  )
814
822
  ] })
815
823
  ] }),
816
- r && /* @__PURE__ */ t("label", { htmlFor: u, className: x.label, children: r })
824
+ r && /* @__PURE__ */ t("label", { htmlFor: _, className: x.label, children: r })
817
825
  ] }),
818
826
  n && /* @__PURE__ */ t("p", { className: x.helperText, children: n })
819
827
  ]
@@ -825,12 +833,12 @@ Po.displayName = "Checkbox";
825
833
  export {
826
834
  Ht as Avatar,
827
835
  Kt as AvatarGroup,
828
- St as Badge,
836
+ Wt as Badge,
829
837
  Ce as Button,
830
838
  U as Card,
831
839
  Po as Checkbox,
832
840
  He as Input,
833
- ft as Modal,
841
+ ht as Modal,
834
842
  Ro as Select,
835
843
  Q as Spinner,
836
844
  tt as Textarea,
@@ -1 +1 @@
1
- (function(p,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],e):(p=typeof globalThis<"u"?globalThis:p||self,e(p.Pebble={},p.ReactJSXRuntime,p.React,p.ReactDOM))})(this,function(p,e,t,ne){"use strict";const q={spinner:"_spinner_10ctt_1","pb-spin":"_pb-spin_10ctt_1",track:"_track_10ctt_10","pb-pulse":"_pb-pulse_10ctt_1",arc:"_arc_10ctt_18",xs:"_xs_10ctt_24",sm:"_sm_10ctt_25",md:"_md_10ctt_26",lg:"_lg_10ctt_27",xl:"_xl_10ctt_28"},le={xs:12,sm:16,md:24,lg:32,xl:48},F=t.forwardRef(({size:s="md",label:r="Loading…",className:o=""},n)=>{const a=le[s],i=t.useId().replace(/:/g,"");return e.jsxs("svg",{ref:n,className:[q.spinner,q[s],o].filter(Boolean).join(" "),width:a,height:a,viewBox:"0 0 24 24",fill:"none","aria-label":r,role:"status",children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:i,x1:"12",y1:"3",x2:"21",y2:"12",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{offset:"0%",stopColor:"#6366f1",stopOpacity:"0"}),e.jsx("stop",{offset:"40%",stopColor:"#6366f1",stopOpacity:"1"}),e.jsx("stop",{offset:"100%",stopColor:"#a855f7",stopOpacity:"1"})]})}),e.jsx("circle",{className:q.track,cx:"12",cy:"12",r:"9",strokeWidth:"2.5"}),e.jsx("path",{className:q.arc,d:"M12 3a9 9 0 0 1 9 9",strokeWidth:"2.5",strokeLinecap:"round",stroke:`url(#${i})`})]})});F.displayName="Spinner";const B={button:"_button_s5t2n_1",sm:"_sm_s5t2n_47",md:"_md_s5t2n_55",lg:"_lg_s5t2n_62",primary:"_primary_s5t2n_73",secondary:"_secondary_s5t2n_108",ghost:"_ghost_s5t2n_148",outline:"_outline_s5t2n_166",danger:"_danger_s5t2n_187",fullWidth:"_fullWidth_s5t2n_234",loading:"_loading_s5t2n_238",iconLeft:"_iconLeft_s5t2n_244",iconRight:"_iconRight_s5t2n_245",label:"_label_s5t2n_258"},G=t.forwardRef(({variant:s="primary",size:r="md",isLoading:o=!1,leftIcon:n,rightIcon:a,fullWidth:i=!1,children:d,disabled:_,className:u="",...v},h)=>{const b=[B.button,B[s],B[r],i?B.fullWidth:"",o?B.loading:"",u].filter(Boolean).join(" ");return e.jsxs("button",{ref:h,className:b,disabled:_||o,"aria-busy":o||void 0,...v,children:[o?e.jsx(F,{size:"sm",label:"Loading"}):n&&e.jsx("span",{className:B.iconLeft,"aria-hidden":"true",children:n}),d&&e.jsx("span",{className:B.label,children:d}),!o&&a&&e.jsx("span",{className:B.iconRight,"aria-hidden":"true",children:a})]})});G.displayName="Button";const k={wrapper:"_wrapper_5z8qu_3",label:"_label_5z8qu_10",inputWrapper:"_inputWrapper_5z8qu_21",error:"_error_5z8qu_39",disabled:"_disabled_5z8qu_39",sm:"_sm_5z8qu_70",md:"_md_5z8qu_71",lg:"_lg_5z8qu_72",input:"_input_5z8qu_21",hasLeft:"_hasLeft_5z8qu_109",hasRight:"_hasRight_5z8qu_110",iconLeft:"_iconLeft_5z8qu_114",iconRight:"_iconRight_5z8qu_115",helperText:"_helperText_5z8qu_134",errorText:"_errorText_5z8qu_142"},H=t.forwardRef(({label:s,helperText:r,errorText:o,leftIcon:n,rightIcon:a,size:i="md",className:d="",id:_,disabled:u,...v},h)=>{const b=t.useId(),l=_??b,w=`${l}-helper`,g=`${l}-error`,N=!!o,D=[N?g:"",r?w:""].filter(Boolean).join(" ")||void 0;return e.jsxs("div",{className:[k.wrapper,d].filter(Boolean).join(" "),children:[s&&e.jsx("label",{htmlFor:l,className:k.label,children:s}),e.jsxs("div",{className:[k.inputWrapper,k[i],N?k.error:"",u?k.disabled:""].filter(Boolean).join(" "),children:[n&&e.jsx("span",{className:k.iconLeft,"aria-hidden":"true",children:n}),e.jsx("input",{ref:h,id:l,className:[k.input,n?k.hasLeft:"",a?k.hasRight:""].filter(Boolean).join(" "),disabled:u,"aria-invalid":N||void 0,"aria-describedby":D,...v}),a&&e.jsx("span",{className:k.iconRight,"aria-hidden":"true",children:a})]}),N?e.jsx("p",{id:g,className:k.errorText,role:"alert",children:o}):r?e.jsx("p",{id:w,className:k.helperText,children:r}):null]})});H.displayName="Input";const I={wrapper:"_wrapper_1566g_3",label:"_label_1566g_10",textarea:"_textarea_1566g_19",error:"_error_1566g_47",disabled:"_disabled_1566g_47",helperText:"_helperText_1566g_82",errorText:"_errorText_1566g_90"},K=t.forwardRef(({label:s,helperText:r,errorText:o,resize:n="vertical",className:a="",id:i,disabled:d,rows:_=4,...u},v)=>{const h=t.useId(),b=i??h,l=`${b}-helper`,w=`${b}-error`,g=!!o,N=[g?w:"",r?l:""].filter(Boolean).join(" ")||void 0;return e.jsxs("div",{className:[I.wrapper,a].filter(Boolean).join(" "),children:[s&&e.jsx("label",{htmlFor:b,className:I.label,children:s}),e.jsx("textarea",{ref:v,id:b,rows:_,className:[I.textarea,g?I.error:"",d?I.disabled:""].filter(Boolean).join(" "),style:{resize:n},disabled:d,"aria-invalid":g||void 0,"aria-describedby":N,...u}),g?e.jsx("p",{id:w,className:I.errorText,role:"alert",children:o}):r?e.jsx("p",{id:l,className:I.helperText,children:r}):null]})});K.displayName="Textarea";const x={backdrop:"_backdrop_1v4s9_3","pb-backdrop-in":"_pb-backdrop-in_1v4s9_1",dialog:"_dialog_1v4s9_17","pb-dialog-in":"_pb-dialog-in_1v4s9_1",sm:"_sm_1v4s9_37",md:"_md_1v4s9_38",lg:"_lg_1v4s9_39",full:"_full_1v4s9_40",closeBtn:"_closeBtn_1v4s9_50",header:"_header_1v4s9_92",title:"_title_1v4s9_97",description:"_description_1v4s9_107",body:"_body_1v4s9_117",footer:"_footer_1v4s9_133"},J=({isOpen:s,onClose:r,title:o,description:n,size:a="md",closeOnBackdrop:i=!0,children:d,footer:_,className:u=""})=>{const v=t.useId(),h=t.useId(),b=t.useRef(null);return t.useEffect(()=>{if(!s)return;const l=b.current;if(!l)return;const w=l.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');w?w.focus():l.focus()},[s]),t.useEffect(()=>{if(!s)return;const l=w=>{w.key==="Escape"&&r()};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[s,r]),t.useEffect(()=>(s?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[s]),s?ne.createPortal(e.jsx("div",{className:x.backdrop,onClick:i?r:void 0,"aria-hidden":"true",children:e.jsxs("div",{ref:b,role:"dialog","aria-modal":"true","aria-labelledby":o?v:void 0,"aria-describedby":n?h:void 0,className:[x.dialog,x[a],u].filter(Boolean).join(" "),tabIndex:-1,onClick:l=>l.stopPropagation(),children:[e.jsx("button",{className:x.closeBtn,onClick:r,"aria-label":"Close modal",children:e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})})}),(o||n)&&e.jsxs("div",{className:x.header,children:[o&&e.jsx("h2",{id:v,className:x.title,children:o}),n&&e.jsx("p",{id:h,className:x.description,children:n})]}),e.jsx("div",{className:x.body,children:d}),_&&e.jsx("div",{className:x.footer,children:_})]})}),document.body):null};J.displayName="Modal";const L={card:"_card_i6i72_3",default:"_default_i6i72_15",elevated:"_elevated_i6i72_25",bordered:"_bordered_i6i72_36",flat:"_flat_i6i72_48",hoverable:"_hoverable_i6i72_60",clickable:"_clickable_i6i72_68",header:"_header_i6i72_96",body:"_body_i6i72_105",footer:"_footer_i6i72_112"},X=({children:s,className:r="",...o})=>e.jsx("div",{className:[L.header,r].filter(Boolean).join(" "),...o,children:s});X.displayName="Card.Header";const Q=({children:s,className:r="",...o})=>e.jsx("div",{className:[L.body,r].filter(Boolean).join(" "),...o,children:s});Q.displayName="Card.Body";const Y=({children:s,className:r="",...o})=>e.jsx("div",{className:[L.footer,r].filter(Boolean).join(" "),...o,children:s});Y.displayName="Card.Footer";const E=t.forwardRef(({variant:s="default",hoverable:r=!1,clickable:o=!1,children:n,className:a="",...i},d)=>{const _=[L.card,L[s],r?L.hoverable:"",o?L.clickable:"",a].filter(Boolean).join(" ");return e.jsx("div",{ref:d,className:_,role:o?"button":void 0,tabIndex:o?0:void 0,...i,children:n})});E.displayName="Card",E.Header=X,E.Body=Q,E.Footer=Y;const z={badge:"_badge_1uusg_3",sm:"_sm_1uusg_20",md:"_md_1uusg_25",dot:"_dot_1uusg_32",default:"_default_1uusg_49",primary:"_primary_1uusg_56",success:"_success_1uusg_63",warning:"_warning_1uusg_70",danger:"_danger_1uusg_77",info:"_info_1uusg_84"},Z=t.forwardRef(({variant:s="default",size:r="md",dot:o=!1,children:n,className:a="",...i},d)=>{const _=[z.badge,z[s],z[r],o?z.dot:"",a].filter(Boolean).join(" ");return e.jsx("span",{ref:d,className:_,...i,children:o?null:n})});Z.displayName="Badge";const $={avatar:"_avatar_n1f99_3",xs:"_xs_n1f99_25",sm:"_sm_n1f99_26",md:"_md_n1f99_27",lg:"_lg_n1f99_28",xl:"_xl_n1f99_29",image:"_image_n1f99_33",initials:"_initials_n1f99_42",fallbackIcon:"_fallbackIcon_n1f99_57",status:"_status_n1f99_65","status-online":"_status-online_n1f99_79","status-offline":"_status-offline_n1f99_83","status-busy":"_status-busy_n1f99_84","status-away":"_status-away_n1f99_88",overflow:"_overflow_n1f99_95",group:"_group_n1f99_107"};function ce(s){const r=s.trim().split(/\s+/);return r.length===1?r[0].charAt(0).toUpperCase():(r[0].charAt(0)+r[r.length-1].charAt(0)).toUpperCase()}const R=t.forwardRef(({src:s,alt:r="",name:o,size:n="md",status:a,className:i=""},d)=>{const[_,u]=t.useState(!1),v=s&&!_,h=o?ce(o):null;return e.jsxs("div",{ref:d,className:[$.avatar,$[n],i].filter(Boolean).join(" "),"aria-label":o??r,title:o??r,children:[v?e.jsx("img",{src:s,alt:r||o||"",className:$.image,onError:()=>u(!0)}):h?e.jsx("span",{className:$.initials,"aria-hidden":"true",children:h}):e.jsx("svg",{className:$.fallbackIcon,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 2c-5.33 0-8 2.67-8 4v1h16v-1c0-1.33-2.67-4-8-4z"})}),a&&e.jsx("span",{className:[$.status,$[`status-${a}`]].join(" "),"aria-label":a})]})});R.displayName="Avatar";const ee=({children:s,max:r,size:o="md",className:n=""})=>{const a=t.Children.toArray(s),i=r?a.slice(0,r):a,d=r&&a.length>r?a.length-r:0;return e.jsxs("div",{className:[$.group,n].filter(Boolean).join(" "),children:[i,d>0&&e.jsx("div",{className:[$.avatar,$[o],$.overflow].join(" "),children:e.jsxs("span",{className:$.initials,children:["+",d]})})]})};ee.displayName="AvatarGroup";const A={wrapper:"_wrapper_4w97v_8",tooltip:"_tooltip_4w97v_17",arrow:"_arrow_4w97v_49",top:"_top_4w97v_58",bottom:"_bottom_4w97v_77",left:"_left_4w97v_96",right:"_right_4w97v_115"},re=({content:s,placement:r="top",children:o,className:n=""})=>{const a=t.useId(),i=t.cloneElement(o,{"aria-describedby":a});return e.jsxs("div",{className:[A.wrapper,n].filter(Boolean).join(" "),children:[i,e.jsxs("div",{id:a,role:"tooltip",className:[A.tooltip,A[r]].join(" "),children:[s,e.jsx("span",{className:A.arrow,"aria-hidden":"true"})]})]})};re.displayName="Tooltip";const f={wrapper:"_wrapper_kn5iw_3",label:"_label_kn5iw_12",triggerWrapper:"_triggerWrapper_kn5iw_23",trigger:"_trigger_kn5iw_23",open:"_open_kn5iw_64",error:"_error_kn5iw_71",disabled:"_disabled_kn5iw_78",sm:"_sm_kn5iw_90",md:"_md_kn5iw_91",lg:"_lg_kn5iw_92",triggerValue:"_triggerValue_kn5iw_96",triggerPlaceholder:"_triggerPlaceholder_kn5iw_103",chevron:"_chevron_kn5iw_113",chevronOpen:"_chevronOpen_kn5iw_124",dropdown:"_dropdown_kn5iw_135",option:"_option_kn5iw_159",optionDisabled:"_optionDisabled_kn5iw_173",optionSelected:"_optionSelected_kn5iw_177",optionLabel:"_optionLabel_kn5iw_192",checkmark:"_checkmark_kn5iw_196",helperText:"_helperText_kn5iw_206",errorText:"_errorText_kn5iw_214"};function ie(s){return t.Children.toArray(s).filter(r=>t.isValidElement(r)&&r.type==="option"&&!r.props.disabled).map(r=>({value:String(r.props.value??""),label:String(r.props.children??""),disabled:!!r.props.disabled})).filter(r=>r.value!=="")}function de(s){const r=t.Children.toArray(s).find(o=>t.isValidElement(o)&&o.type==="option"&&(o.props.value===""||o.props.value==null)&&o.props.disabled);return r?String(r.props.children):void 0}const oe=t.forwardRef(({label:s,helperText:r,errorText:o,placeholder:n,size:a="md",className:i="",id:d,disabled:_,value:u,defaultValue:v,onChange:h,children:b},l)=>{const w=t.useId(),g=d??w,N=`${g}-listbox`,D=`${g}-helper`,te=`${g}-error`,M=!!o,W=ie(b),_e=n??de(b)??"Select…",[j,T]=t.useState(!1),[pe,fe]=t.useState(String(v??u??"")),P=u!==void 0?String(u):pe,O=W.find(c=>c.value===P),V=t.useRef(null),ae=t.useRef(null),he=c=>{ae.current=c,typeof l=="function"?l(c):l&&(l.current=c)};t.useEffect(()=>{if(!j)return;const c=m=>{V.current&&!V.current.contains(m.target)&&T(!1)};return document.addEventListener("pointerdown",c),()=>document.removeEventListener("pointerdown",c)},[j]);const U=t.useCallback(c=>{var m;u===void 0&&fe(c),T(!1),(m=ae.current)==null||m.focus(),h==null||h({target:{value:c}})},[u,h]),ue=c=>{if(!_)switch(c.key){case"Enter":case" ":c.preventDefault(),T(m=>!m);break;case"Escape":T(!1);break;case"ArrowDown":{if(c.preventDefault(),!j){T(!0);break}const m=W.findIndex(C=>C.value===P),S=W.slice(m+1).find(C=>!C.disabled);S&&U(S.value);break}case"ArrowUp":{if(c.preventDefault(),!j){T(!0);break}const m=W.findIndex(C=>C.value===P),S=W.slice(0,m).reverse().find(C=>!C.disabled);S&&U(S.value);break}case"Tab":T(!1);break}},be=[M?te:"",r?D:""].filter(Boolean).join(" ")||void 0;return e.jsxs("div",{ref:V,className:[f.wrapper,i].filter(Boolean).join(" "),children:[s&&e.jsx("label",{id:`${g}-label`,htmlFor:g,className:f.label,children:s}),e.jsxs("div",{className:f.triggerWrapper,children:[e.jsxs("button",{ref:he,type:"button",id:g,role:"combobox","aria-haspopup":"listbox","aria-expanded":j,"aria-controls":N,"aria-labelledby":s?`${g}-label`:void 0,"aria-describedby":be,"aria-invalid":M||void 0,disabled:_,className:[f.trigger,f[a],M?f.error:"",_?f.disabled:"",j?f.open:""].filter(Boolean).join(" "),onClick:()=>!_&&T(c=>!c),onKeyDown:ue,children:[e.jsx("span",{className:O?f.triggerValue:f.triggerPlaceholder,children:(O==null?void 0:O.label)??_e}),e.jsx("span",{className:[f.chevron,j?f.chevronOpen:""].filter(Boolean).join(" "),"aria-hidden":"true",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"m6 9 6 6 6-6"})})})]}),j&&e.jsx("ul",{id:N,role:"listbox","aria-labelledby":s?`${g}-label`:void 0,className:f.dropdown,children:W.map(c=>{const m=c.value===P;return e.jsxs("li",{role:"option","aria-selected":m,"aria-disabled":c.disabled,className:[f.option,m?f.optionSelected:"",c.disabled?f.optionDisabled:""].filter(Boolean).join(" "),onPointerDown:S=>{S.preventDefault(),c.disabled||U(c.value)},children:[e.jsx("span",{className:f.optionLabel,children:c.label}),m&&e.jsx("span",{className:f.checkmark,"aria-hidden":"true",children:e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})})})]},c.value)})})]}),M?e.jsx("p",{id:te,className:f.errorText,role:"alert",children:o}):r?e.jsx("p",{id:D,className:f.helperText,children:r}):null]})});oe.displayName="Select";const y={wrapper:"_wrapper_cefjy_3",checkboxRow:"_checkboxRow_cefjy_10",sm:"_sm_cefjy_18",checkboxBox:"_checkboxBox_cefjy_18",label:"_label_cefjy_22",md:"_md_cefjy_26",checkboxOuter:"_checkboxOuter_cefjy_36",input:"_input_cefjy_46",checkmark:"_checkmark_cefjy_142",dash:"_dash_cefjy_143",disabled:"_disabled_cefjy_174",helperText:"_helperText_cefjy_181"},se=t.forwardRef(({label:s,indeterminate:r=!1,size:o="md",helperText:n,className:a="",id:i,disabled:d,..._},u)=>{const v=t.useId(),h=i??v,b=t.useRef(null),l=u??b;return t.useEffect(()=>{l&&"current"in l&&l.current&&(l.current.indeterminate=r)},[r,l]),e.jsxs("div",{className:[y.wrapper,y[o],d?y.disabled:"",a].filter(Boolean).join(" "),children:[e.jsxs("div",{className:y.checkboxRow,children:[e.jsxs("div",{className:y.checkboxOuter,children:[e.jsx("input",{ref:l,id:h,type:"checkbox",className:y.input,disabled:d,..._}),e.jsxs("div",{className:y.checkboxBox,"aria-hidden":"true",children:[e.jsx("svg",{className:y.checkmark,viewBox:"0 0 12 12",fill:"none",children:e.jsx("path",{d:"M2 6l3 3 5-5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),e.jsx("svg",{className:y.dash,viewBox:"0 0 12 12",fill:"none",children:e.jsx("path",{d:"M2.5 6h7",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})})]})]}),s&&e.jsx("label",{htmlFor:h,className:y.label,children:s})]}),n&&e.jsx("p",{className:y.helperText,children:n})]})});se.displayName="Checkbox",p.Avatar=R,p.AvatarGroup=ee,p.Badge=Z,p.Button=G,p.Card=E,p.Checkbox=se,p.Input=H,p.Modal=J,p.Select=oe,p.Spinner=F,p.Textarea=K,p.Tooltip=re,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
1
+ (function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f.Pebble={},f.ReactJSXRuntime,f.React,f.ReactDOM))})(this,function(f,e,t,ne){"use strict";const q={spinner:"_spinner_10ctt_1","pb-spin":"_pb-spin_10ctt_1",track:"_track_10ctt_10","pb-pulse":"_pb-pulse_10ctt_1",arc:"_arc_10ctt_18",xs:"_xs_10ctt_24",sm:"_sm_10ctt_25",md:"_md_10ctt_26",lg:"_lg_10ctt_27",xl:"_xl_10ctt_28"},le={xs:12,sm:16,md:24,lg:32,xl:48},F=t.forwardRef(({size:s="md",label:r="Loading…",className:o="",color:n="indigo"},a)=>{const _=le[s],i=t.useId().replace(/:/g,""),c=n==="white",u=c?"rgba(255,255,255,0)":"#6366f1",g=c?"rgba(255,255,255,0.9)":"#6366f1",p=c?"rgba(255,255,255,0.9)":"#a855f7",b=c?"rgba(255,255,255,0.25)":void 0;return e.jsxs("svg",{ref:a,className:[q.spinner,q[s],o].filter(Boolean).join(" "),width:_,height:_,viewBox:"0 0 24 24",fill:"none","aria-label":r,role:"status",children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:i,x1:"12",y1:"3",x2:"21",y2:"12",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{offset:"0%",stopColor:u,stopOpacity:"1"}),e.jsx("stop",{offset:"40%",stopColor:g,stopOpacity:"1"}),e.jsx("stop",{offset:"100%",stopColor:p,stopOpacity:"1"})]})}),e.jsx("circle",{className:q.track,cx:"12",cy:"12",r:"9",strokeWidth:"2.5",style:b?{stroke:b}:void 0}),e.jsx("path",{className:q.arc,d:"M12 3a9 9 0 0 1 9 9",strokeWidth:"2.5",strokeLinecap:"round",stroke:`url(#${i})`})]})});F.displayName="Spinner";const B={button:"_button_s5t2n_1",sm:"_sm_s5t2n_47",md:"_md_s5t2n_55",lg:"_lg_s5t2n_62",primary:"_primary_s5t2n_73",secondary:"_secondary_s5t2n_108",ghost:"_ghost_s5t2n_148",outline:"_outline_s5t2n_166",danger:"_danger_s5t2n_187",fullWidth:"_fullWidth_s5t2n_234",loading:"_loading_s5t2n_238",iconLeft:"_iconLeft_s5t2n_244",iconRight:"_iconRight_s5t2n_245",label:"_label_s5t2n_258"},G=t.forwardRef(({variant:s="primary",size:r="md",isLoading:o=!1,leftIcon:n,rightIcon:a,fullWidth:_=!1,children:i,disabled:c,className:u="",...g},p)=>{const b=[B.button,B[s],B[r],_?B.fullWidth:"",o?B.loading:"",u].filter(Boolean).join(" ");return e.jsxs("button",{ref:p,className:b,disabled:c||o,"aria-busy":o||void 0,...g,children:[o?e.jsx(F,{size:"sm",label:"Loading",color:s==="primary"||s==="danger"?"white":"indigo"}):n&&e.jsx("span",{className:B.iconLeft,"aria-hidden":"true",children:n}),i&&e.jsx("span",{className:B.label,children:i}),!o&&a&&e.jsx("span",{className:B.iconRight,"aria-hidden":"true",children:a})]})});G.displayName="Button";const k={wrapper:"_wrapper_5z8qu_3",label:"_label_5z8qu_10",inputWrapper:"_inputWrapper_5z8qu_21",error:"_error_5z8qu_39",disabled:"_disabled_5z8qu_39",sm:"_sm_5z8qu_70",md:"_md_5z8qu_71",lg:"_lg_5z8qu_72",input:"_input_5z8qu_21",hasLeft:"_hasLeft_5z8qu_109",hasRight:"_hasRight_5z8qu_110",iconLeft:"_iconLeft_5z8qu_114",iconRight:"_iconRight_5z8qu_115",helperText:"_helperText_5z8qu_134",errorText:"_errorText_5z8qu_142"},H=t.forwardRef(({label:s,helperText:r,errorText:o,leftIcon:n,rightIcon:a,size:_="md",className:i="",id:c,disabled:u,...g},p)=>{const b=t.useId(),l=c??b,$=`${l}-helper`,v=`${l}-error`,N=!!o,D=[N?v:"",r?$:""].filter(Boolean).join(" ")||void 0;return e.jsxs("div",{className:[k.wrapper,i].filter(Boolean).join(" "),children:[s&&e.jsx("label",{htmlFor:l,className:k.label,children:s}),e.jsxs("div",{className:[k.inputWrapper,k[_],N?k.error:"",u?k.disabled:""].filter(Boolean).join(" "),children:[n&&e.jsx("span",{className:k.iconLeft,"aria-hidden":"true",children:n}),e.jsx("input",{ref:p,id:l,className:[k.input,n?k.hasLeft:"",a?k.hasRight:""].filter(Boolean).join(" "),disabled:u,"aria-invalid":N||void 0,"aria-describedby":D,...g}),a&&e.jsx("span",{className:k.iconRight,"aria-hidden":"true",children:a})]}),N?e.jsx("p",{id:v,className:k.errorText,role:"alert",children:o}):r?e.jsx("p",{id:$,className:k.helperText,children:r}):null]})});H.displayName="Input";const I={wrapper:"_wrapper_1566g_3",label:"_label_1566g_10",textarea:"_textarea_1566g_19",error:"_error_1566g_47",disabled:"_disabled_1566g_47",helperText:"_helperText_1566g_82",errorText:"_errorText_1566g_90"},K=t.forwardRef(({label:s,helperText:r,errorText:o,resize:n="vertical",className:a="",id:_,disabled:i,rows:c=4,...u},g)=>{const p=t.useId(),b=_??p,l=`${b}-helper`,$=`${b}-error`,v=!!o,N=[v?$:"",r?l:""].filter(Boolean).join(" ")||void 0;return e.jsxs("div",{className:[I.wrapper,a].filter(Boolean).join(" "),children:[s&&e.jsx("label",{htmlFor:b,className:I.label,children:s}),e.jsx("textarea",{ref:g,id:b,rows:c,className:[I.textarea,v?I.error:"",i?I.disabled:""].filter(Boolean).join(" "),style:{resize:n},disabled:i,"aria-invalid":v||void 0,"aria-describedby":N,...u}),v?e.jsx("p",{id:$,className:I.errorText,role:"alert",children:o}):r?e.jsx("p",{id:l,className:I.helperText,children:r}):null]})});K.displayName="Textarea";const x={backdrop:"_backdrop_1v4s9_3","pb-backdrop-in":"_pb-backdrop-in_1v4s9_1",dialog:"_dialog_1v4s9_17","pb-dialog-in":"_pb-dialog-in_1v4s9_1",sm:"_sm_1v4s9_37",md:"_md_1v4s9_38",lg:"_lg_1v4s9_39",full:"_full_1v4s9_40",closeBtn:"_closeBtn_1v4s9_50",header:"_header_1v4s9_92",title:"_title_1v4s9_97",description:"_description_1v4s9_107",body:"_body_1v4s9_117",footer:"_footer_1v4s9_133"},J=({isOpen:s,onClose:r,title:o,description:n,size:a="md",closeOnBackdrop:_=!0,children:i,footer:c,className:u=""})=>{const g=t.useId(),p=t.useId(),b=t.useRef(null);return t.useEffect(()=>{if(!s)return;const l=b.current;if(!l)return;const $=l.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');$?$.focus():l.focus()},[s]),t.useEffect(()=>{if(!s)return;const l=$=>{$.key==="Escape"&&r()};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[s,r]),t.useEffect(()=>(s?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[s]),s?ne.createPortal(e.jsx("div",{className:x.backdrop,onClick:_?r:void 0,"aria-hidden":"true",children:e.jsxs("div",{ref:b,role:"dialog","aria-modal":"true","aria-labelledby":o?g:void 0,"aria-describedby":n?p:void 0,className:[x.dialog,x[a],u].filter(Boolean).join(" "),tabIndex:-1,onClick:l=>l.stopPropagation(),children:[e.jsx("button",{className:x.closeBtn,onClick:r,"aria-label":"Close modal",children:e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})})}),(o||n)&&e.jsxs("div",{className:x.header,children:[o&&e.jsx("h2",{id:g,className:x.title,children:o}),n&&e.jsx("p",{id:p,className:x.description,children:n})]}),e.jsx("div",{className:x.body,children:i}),c&&e.jsx("div",{className:x.footer,children:c})]})}),document.body):null};J.displayName="Modal";const L={card:"_card_i6i72_3",default:"_default_i6i72_15",elevated:"_elevated_i6i72_25",bordered:"_bordered_i6i72_36",flat:"_flat_i6i72_48",hoverable:"_hoverable_i6i72_60",clickable:"_clickable_i6i72_68",header:"_header_i6i72_96",body:"_body_i6i72_105",footer:"_footer_i6i72_112"},X=({children:s,className:r="",...o})=>e.jsx("div",{className:[L.header,r].filter(Boolean).join(" "),...o,children:s});X.displayName="Card.Header";const Q=({children:s,className:r="",...o})=>e.jsx("div",{className:[L.body,r].filter(Boolean).join(" "),...o,children:s});Q.displayName="Card.Body";const Y=({children:s,className:r="",...o})=>e.jsx("div",{className:[L.footer,r].filter(Boolean).join(" "),...o,children:s});Y.displayName="Card.Footer";const E=t.forwardRef(({variant:s="default",hoverable:r=!1,clickable:o=!1,children:n,className:a="",..._},i)=>{const c=[L.card,L[s],r?L.hoverable:"",o?L.clickable:"",a].filter(Boolean).join(" ");return e.jsx("div",{ref:i,className:c,role:o?"button":void 0,tabIndex:o?0:void 0,..._,children:n})});E.displayName="Card",E.Header=X,E.Body=Q,E.Footer=Y;const z={badge:"_badge_1uusg_3",sm:"_sm_1uusg_20",md:"_md_1uusg_25",dot:"_dot_1uusg_32",default:"_default_1uusg_49",primary:"_primary_1uusg_56",success:"_success_1uusg_63",warning:"_warning_1uusg_70",danger:"_danger_1uusg_77",info:"_info_1uusg_84"},Z=t.forwardRef(({variant:s="default",size:r="md",dot:o=!1,children:n,className:a="",..._},i)=>{const c=[z.badge,z[s],z[r],o?z.dot:"",a].filter(Boolean).join(" ");return e.jsx("span",{ref:i,className:c,..._,children:o?null:n})});Z.displayName="Badge";const w={avatar:"_avatar_n1f99_3",xs:"_xs_n1f99_25",sm:"_sm_n1f99_26",md:"_md_n1f99_27",lg:"_lg_n1f99_28",xl:"_xl_n1f99_29",image:"_image_n1f99_33",initials:"_initials_n1f99_42",fallbackIcon:"_fallbackIcon_n1f99_57",status:"_status_n1f99_65","status-online":"_status-online_n1f99_79","status-offline":"_status-offline_n1f99_83","status-busy":"_status-busy_n1f99_84","status-away":"_status-away_n1f99_88",overflow:"_overflow_n1f99_95",group:"_group_n1f99_107"};function ie(s){const r=s.trim().split(/\s+/);return r.length===1?r[0].charAt(0).toUpperCase():(r[0].charAt(0)+r[r.length-1].charAt(0)).toUpperCase()}const R=t.forwardRef(({src:s,alt:r="",name:o,size:n="md",status:a,className:_=""},i)=>{const[c,u]=t.useState(!1),g=s&&!c,p=o?ie(o):null;return e.jsxs("div",{ref:i,className:[w.avatar,w[n],_].filter(Boolean).join(" "),"aria-label":o??r,title:o??r,children:[g?e.jsx("img",{src:s,alt:r||o||"",className:w.image,onError:()=>u(!0)}):p?e.jsx("span",{className:w.initials,"aria-hidden":"true",children:p}):e.jsx("svg",{className:w.fallbackIcon,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 2c-5.33 0-8 2.67-8 4v1h16v-1c0-1.33-2.67-4-8-4z"})}),a&&e.jsx("span",{className:[w.status,w[`status-${a}`]].join(" "),"aria-label":a})]})});R.displayName="Avatar";const ee=({children:s,max:r,size:o="md",className:n=""})=>{const a=t.Children.toArray(s),_=r?a.slice(0,r):a,i=r&&a.length>r?a.length-r:0;return e.jsxs("div",{className:[w.group,n].filter(Boolean).join(" "),children:[_,i>0&&e.jsx("div",{className:[w.avatar,w[o],w.overflow].join(" "),children:e.jsxs("span",{className:w.initials,children:["+",i]})})]})};ee.displayName="AvatarGroup";const A={wrapper:"_wrapper_4w97v_8",tooltip:"_tooltip_4w97v_17",arrow:"_arrow_4w97v_49",top:"_top_4w97v_58",bottom:"_bottom_4w97v_77",left:"_left_4w97v_96",right:"_right_4w97v_115"},re=({content:s,placement:r="top",children:o,className:n=""})=>{const a=t.useId(),_=t.cloneElement(o,{"aria-describedby":a});return e.jsxs("div",{className:[A.wrapper,n].filter(Boolean).join(" "),children:[_,e.jsxs("div",{id:a,role:"tooltip",className:[A.tooltip,A[r]].join(" "),children:[s,e.jsx("span",{className:A.arrow,"aria-hidden":"true"})]})]})};re.displayName="Tooltip";const h={wrapper:"_wrapper_kn5iw_3",label:"_label_kn5iw_12",triggerWrapper:"_triggerWrapper_kn5iw_23",trigger:"_trigger_kn5iw_23",open:"_open_kn5iw_64",error:"_error_kn5iw_71",disabled:"_disabled_kn5iw_78",sm:"_sm_kn5iw_90",md:"_md_kn5iw_91",lg:"_lg_kn5iw_92",triggerValue:"_triggerValue_kn5iw_96",triggerPlaceholder:"_triggerPlaceholder_kn5iw_103",chevron:"_chevron_kn5iw_113",chevronOpen:"_chevronOpen_kn5iw_124",dropdown:"_dropdown_kn5iw_135",option:"_option_kn5iw_159",optionDisabled:"_optionDisabled_kn5iw_173",optionSelected:"_optionSelected_kn5iw_177",optionLabel:"_optionLabel_kn5iw_192",checkmark:"_checkmark_kn5iw_196",helperText:"_helperText_kn5iw_206",errorText:"_errorText_kn5iw_214"};function ce(s){return t.Children.toArray(s).filter(r=>t.isValidElement(r)&&r.type==="option"&&!r.props.disabled).map(r=>({value:String(r.props.value??""),label:String(r.props.children??""),disabled:!!r.props.disabled})).filter(r=>r.value!=="")}function de(s){const r=t.Children.toArray(s).find(o=>t.isValidElement(o)&&o.type==="option"&&(o.props.value===""||o.props.value==null)&&o.props.disabled);return r?String(r.props.children):void 0}const oe=t.forwardRef(({label:s,helperText:r,errorText:o,placeholder:n,size:a="md",className:_="",id:i,disabled:c,value:u,defaultValue:g,onChange:p,children:b},l)=>{const $=t.useId(),v=i??$,N=`${v}-listbox`,D=`${v}-helper`,te=`${v}-error`,M=!!o,W=ce(b),_e=n??de(b)??"Select…",[j,T]=t.useState(!1),[pe,fe]=t.useState(String(g??u??"")),P=u!==void 0?String(u):pe,O=W.find(d=>d.value===P),V=t.useRef(null),ae=t.useRef(null),he=d=>{ae.current=d,typeof l=="function"?l(d):l&&(l.current=d)};t.useEffect(()=>{if(!j)return;const d=m=>{V.current&&!V.current.contains(m.target)&&T(!1)};return document.addEventListener("pointerdown",d),()=>document.removeEventListener("pointerdown",d)},[j]);const U=t.useCallback(d=>{var m;u===void 0&&fe(d),T(!1),(m=ae.current)==null||m.focus(),p==null||p({target:{value:d}})},[u,p]),ue=d=>{if(!c)switch(d.key){case"Enter":case" ":d.preventDefault(),T(m=>!m);break;case"Escape":T(!1);break;case"ArrowDown":{if(d.preventDefault(),!j){T(!0);break}const m=W.findIndex(C=>C.value===P),S=W.slice(m+1).find(C=>!C.disabled);S&&U(S.value);break}case"ArrowUp":{if(d.preventDefault(),!j){T(!0);break}const m=W.findIndex(C=>C.value===P),S=W.slice(0,m).reverse().find(C=>!C.disabled);S&&U(S.value);break}case"Tab":T(!1);break}},be=[M?te:"",r?D:""].filter(Boolean).join(" ")||void 0;return e.jsxs("div",{ref:V,className:[h.wrapper,_].filter(Boolean).join(" "),children:[s&&e.jsx("label",{id:`${v}-label`,htmlFor:v,className:h.label,children:s}),e.jsxs("div",{className:h.triggerWrapper,children:[e.jsxs("button",{ref:he,type:"button",id:v,role:"combobox","aria-haspopup":"listbox","aria-expanded":j,"aria-controls":N,"aria-labelledby":s?`${v}-label`:void 0,"aria-describedby":be,"aria-invalid":M||void 0,disabled:c,className:[h.trigger,h[a],M?h.error:"",c?h.disabled:"",j?h.open:""].filter(Boolean).join(" "),onClick:()=>!c&&T(d=>!d),onKeyDown:ue,children:[e.jsx("span",{className:O?h.triggerValue:h.triggerPlaceholder,children:(O==null?void 0:O.label)??_e}),e.jsx("span",{className:[h.chevron,j?h.chevronOpen:""].filter(Boolean).join(" "),"aria-hidden":"true",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"m6 9 6 6 6-6"})})})]}),j&&e.jsx("ul",{id:N,role:"listbox","aria-labelledby":s?`${v}-label`:void 0,className:h.dropdown,children:W.map(d=>{const m=d.value===P;return e.jsxs("li",{role:"option","aria-selected":m,"aria-disabled":d.disabled,className:[h.option,m?h.optionSelected:"",d.disabled?h.optionDisabled:""].filter(Boolean).join(" "),onPointerDown:S=>{S.preventDefault(),d.disabled||U(d.value)},children:[e.jsx("span",{className:h.optionLabel,children:d.label}),m&&e.jsx("span",{className:h.checkmark,"aria-hidden":"true",children:e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})})})]},d.value)})})]}),M?e.jsx("p",{id:te,className:h.errorText,role:"alert",children:o}):r?e.jsx("p",{id:D,className:h.helperText,children:r}):null]})});oe.displayName="Select";const y={wrapper:"_wrapper_cefjy_3",checkboxRow:"_checkboxRow_cefjy_10",sm:"_sm_cefjy_18",checkboxBox:"_checkboxBox_cefjy_18",label:"_label_cefjy_22",md:"_md_cefjy_26",checkboxOuter:"_checkboxOuter_cefjy_36",input:"_input_cefjy_46",checkmark:"_checkmark_cefjy_142",dash:"_dash_cefjy_143",disabled:"_disabled_cefjy_174",helperText:"_helperText_cefjy_181"},se=t.forwardRef(({label:s,indeterminate:r=!1,size:o="md",helperText:n,className:a="",id:_,disabled:i,...c},u)=>{const g=t.useId(),p=_??g,b=t.useRef(null),l=u??b;return t.useEffect(()=>{l&&"current"in l&&l.current&&(l.current.indeterminate=r)},[r,l]),e.jsxs("div",{className:[y.wrapper,y[o],i?y.disabled:"",a].filter(Boolean).join(" "),children:[e.jsxs("div",{className:y.checkboxRow,children:[e.jsxs("div",{className:y.checkboxOuter,children:[e.jsx("input",{ref:l,id:p,type:"checkbox",className:y.input,disabled:i,...c}),e.jsxs("div",{className:y.checkboxBox,"aria-hidden":"true",children:[e.jsx("svg",{className:y.checkmark,viewBox:"0 0 12 12",fill:"none",children:e.jsx("path",{d:"M2 6l3 3 5-5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),e.jsx("svg",{className:y.dash,viewBox:"0 0 12 12",fill:"none",children:e.jsx("path",{d:"M2.5 6h7",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})})]})]}),s&&e.jsx("label",{htmlFor:p,className:y.label,children:s})]}),n&&e.jsx("p",{className:y.helperText,children:n})]})});se.displayName="Checkbox",f.Avatar=R,f.AvatarGroup=ee,f.Badge=Z,f.Button=G,f.Card=E,f.Checkbox=se,f.Input=H,f.Modal=J,f.Select=oe,f.Spinner=F,f.Textarea=K,f.Tooltip=re,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chloe0592/pebble",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "A compact, thoughtfully designed React component library",
5
5
  "type": "module",
6
6
  "main": "./dist/pebble.umd.js",