@factorialco/f0-react 1.183.0 → 1.185.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/f0.js CHANGED
@@ -1,9 +1,9 @@
1
- import { C as v, L as ne, c as ie, P as q, a as x, f as de, b as ce, A as ue, B as fe, d as he, e as me, g as pe, V as ve, h as A, i as ge, j as xe, F as H, k as be, l as ye, m as Ce, D as we, n as Ne, o as Le, p as Pe, q as U, S as Se, r as ke, s as w, U as W, t as Fe, u as Me, v as j, w as Te, x as Y, y as De, z as Re, E as Be, G as Ie, H as $e, I as Ee, J as Oe, K as je, M as _e, X as ze, N as Ve, O as qe, Q as Ae, R as He } from "./hooks-DPlQOpZs.js";
2
- import { ak as ja, T as _a, am as za, av as Va, W as qa, Y as Aa, Z as Ha, _ as Ua, $ as Wa, a0 as Ya, a1 as Ga, a2 as Xa, a4 as Ja, a5 as Ka, a6 as Qa, a7 as Za, a9 as er, aa as ar, ab as rr, ac as sr, af as tr, ag as lr, ah as or, ai as nr, a8 as ir, aj as dr, ae as cr, as as ur, al as fr, aq as hr, aw as mr, a3 as pr, ad as vr, an as gr, ao as xr, ap as br, ax as yr, ar as Cr, au as wr, at as Nr } from "./hooks-DPlQOpZs.js";
3
- import { jsx as e, jsxs as c, Fragment as I } from "react/jsx-runtime";
4
- import * as $ from "react";
5
- import Ue, { forwardRef as D, useRef as G, useImperativeHandle as We, Children as Ye, useState as g, useEffect as X, createContext as Ge } from "react";
6
- const ba = {
1
+ import { C as v, L as pe, c as ve, P as H, a as b, f as ge, b as be, A as xe, B as Ce, d as ye, e as we, g as Ne, V as Le, h as U, i as W, j as Pe, k as Y, S as G, l as D, m as X, n as ke, O as Fe, o as J, p as Se, q as Me, F as K, r as De, s as Te, t as Be, D as Re, u as Ie, v as $e, w as Oe, x as Q, y as w, U as Z, z as Ee, E as _e, G as z, H as je, I as ee, J as ze, K as Ve, M as qe, N as Ae, Q as He, R as Ue, X as We, T as Ye, W as Ge, Y as Xe, Z as Je } from "./hooks-mfYg1env.js";
2
+ import { ao as Ua, _ as Wa, aq as Ya, ay as Ga, $ as Xa, a0 as Ja, a1 as Ka, a2 as Qa, a3 as Za, a4 as er, a5 as ar, a6 as rr, a8 as sr, a9 as tr, aa as lr, ab as or, ad as nr, ae as ir, af as dr, ag as cr, aj as ur, ak as fr, al as hr, am as mr, ac as pr, an as vr, ai as gr, av as br, ap as xr, az as Cr, a7 as yr, ah as wr, ar as Nr, as as Lr, at as Pr, aA as kr, au as Fr, ax as Sr, aw as Mr } from "./hooks-mfYg1env.js";
3
+ import { jsx as e, jsxs as c, Fragment as O } from "react/jsx-runtime";
4
+ import * as E from "react";
5
+ import Ke, { useState as g, forwardRef as B, useRef as ae, useImperativeHandle as Qe, Children as Ze, useEffect as re, createContext as ea } from "react";
6
+ const Pa = {
7
7
  approvals: {
8
8
  history: "Approval history",
9
9
  statuses: {
@@ -190,51 +190,51 @@ const ba = {
190
190
  welcome: "I'm One. Ask or make anything.",
191
191
  initialMessage: "How can I help you today?"
192
192
  }
193
- }, ya = v(
193
+ }, ka = v(
194
194
  {
195
195
  name: "Link",
196
196
  type: "info"
197
197
  },
198
- ne
199
- ), Ca = ["person", "team", "company", "file"];
200
- var E = "Progress", O = 100, [Xe, wa] = ie(E), [Je, Ke] = Xe(E), J = $.forwardRef(
198
+ pe
199
+ ), Fa = ["person", "team", "company", "file"];
200
+ var _ = "Progress", j = 100, [aa, Sa] = ve(_), [ra, sa] = aa(_), se = E.forwardRef(
201
201
  (a, r) => {
202
202
  const {
203
203
  __scopeProgress: s,
204
204
  value: t = null,
205
205
  max: l,
206
- getValueLabel: u = Qe,
207
- ...i
206
+ getValueLabel: d = ta,
207
+ ...n
208
208
  } = a;
209
- (l || l === 0) && !_(l) && console.error(Ze(`${l}`, "Progress"));
210
- const n = _(l) ? l : O;
211
- t !== null && !z(t, n) && console.error(ea(`${t}`, "Progress"));
212
- const o = z(t, n) ? t : null, h = T(o) ? u(o, n) : void 0;
213
- return /* @__PURE__ */ e(Je, { scope: s, value: o, max: n, children: /* @__PURE__ */ e(
214
- q.div,
209
+ (l || l === 0) && !V(l) && console.error(la(`${l}`, "Progress"));
210
+ const i = V(l) ? l : j;
211
+ t !== null && !q(t, i) && console.error(oa(`${t}`, "Progress"));
212
+ const o = q(t, i) ? t : null, f = T(o) ? d(o, i) : void 0;
213
+ return /* @__PURE__ */ e(ra, { scope: s, value: o, max: i, children: /* @__PURE__ */ e(
214
+ H.div,
215
215
  {
216
- "aria-valuemax": n,
216
+ "aria-valuemax": i,
217
217
  "aria-valuemin": 0,
218
218
  "aria-valuenow": T(o) ? o : void 0,
219
- "aria-valuetext": h,
219
+ "aria-valuetext": f,
220
220
  role: "progressbar",
221
- "data-state": Z(o, n),
221
+ "data-state": oe(o, i),
222
222
  "data-value": o ?? void 0,
223
- "data-max": n,
224
- ...i,
223
+ "data-max": i,
224
+ ...n,
225
225
  ref: r
226
226
  }
227
227
  ) });
228
228
  }
229
229
  );
230
- J.displayName = E;
231
- var K = "ProgressIndicator", Q = $.forwardRef(
230
+ se.displayName = _;
231
+ var te = "ProgressIndicator", le = E.forwardRef(
232
232
  (a, r) => {
233
- const { __scopeProgress: s, ...t } = a, l = Ke(K, s);
233
+ const { __scopeProgress: s, ...t } = a, l = sa(te, s);
234
234
  return /* @__PURE__ */ e(
235
- q.div,
235
+ H.div,
236
236
  {
237
- "data-state": Z(l.value, l.max),
237
+ "data-state": oe(l.value, l.max),
238
238
  "data-value": l.value ?? void 0,
239
239
  "data-max": l.max,
240
240
  ...t,
@@ -243,45 +243,45 @@ var K = "ProgressIndicator", Q = $.forwardRef(
243
243
  );
244
244
  }
245
245
  );
246
- Q.displayName = K;
247
- function Qe(a, r) {
246
+ le.displayName = te;
247
+ function ta(a, r) {
248
248
  return `${Math.round(a / r * 100)}%`;
249
249
  }
250
- function Z(a, r) {
250
+ function oe(a, r) {
251
251
  return a == null ? "indeterminate" : a === r ? "complete" : "loading";
252
252
  }
253
253
  function T(a) {
254
254
  return typeof a == "number";
255
255
  }
256
- function _(a) {
256
+ function V(a) {
257
257
  return T(a) && !isNaN(a) && a > 0;
258
258
  }
259
- function z(a, r) {
259
+ function q(a, r) {
260
260
  return T(a) && !isNaN(a) && a <= r && a >= 0;
261
261
  }
262
- function Ze(a, r) {
263
- return `Invalid prop \`max\` of value \`${a}\` supplied to \`${r}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${O}\`.`;
262
+ function la(a, r) {
263
+ return `Invalid prop \`max\` of value \`${a}\` supplied to \`${r}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${j}\`.`;
264
264
  }
265
- function ea(a, r) {
265
+ function oa(a, r) {
266
266
  return `Invalid prop \`value\` of value \`${a}\` supplied to \`${r}\`. The \`value\` prop must be:
267
267
  - a positive number
268
- - less than the value passed to \`max\` (or ${O} if no \`max\` prop is set)
268
+ - less than the value passed to \`max\` (or ${j} if no \`max\` prop is set)
269
269
  - \`null\` or \`undefined\` if the progress is indeterminate.
270
270
 
271
271
  Defaulting to \`null\`.`;
272
272
  }
273
- var ee = J, aa = Q;
274
- const ae = $.forwardRef(({ className: a, value: r, ...s }, t) => /* @__PURE__ */ e(
275
- ee,
273
+ var ne = se, na = le;
274
+ const ie = E.forwardRef(({ className: a, value: r, ...s }, t) => /* @__PURE__ */ e(
275
+ ne,
276
276
  {
277
277
  ref: t,
278
- className: x(
278
+ className: b(
279
279
  "relative h-2 w-full overflow-hidden rounded-full bg-f1-background-secondary",
280
280
  a
281
281
  ),
282
282
  ...s,
283
283
  children: /* @__PURE__ */ e(
284
- aa,
284
+ na,
285
285
  {
286
286
  className: "h-full w-full flex-1 transition-all",
287
287
  style: {
@@ -292,165 +292,237 @@ const ae = $.forwardRef(({ className: a, value: r, ...s }, t) => /* @__PURE__ */
292
292
  )
293
293
  }
294
294
  ));
295
- ae.displayName = ee.displayName;
296
- const ra = ({ value: a, max: r = 100, label: s, color: t }, l) => {
297
- const u = t || ce(0), i = a / r * 100;
295
+ ie.displayName = ne.displayName;
296
+ const ia = ({ value: a, max: r = 100, label: s, color: t }, l) => {
297
+ const d = t || be(0), n = a / r * 100;
298
298
  return /* @__PURE__ */ c("div", { className: "flex items-center space-x-2", "aria-live": "polite", children: [
299
299
  /* @__PURE__ */ e("div", { className: "flex-grow", children: /* @__PURE__ */ e(
300
- ae,
300
+ ie,
301
301
  {
302
- color: u,
303
- value: i,
302
+ color: d,
303
+ value: n,
304
304
  className: "w-full",
305
305
  "aria-valuemin": 0,
306
306
  "aria-valuemax": r,
307
307
  "aria-valuenow": a,
308
- "aria-label": `${i.toFixed(1)}%`
308
+ "aria-label": `${n.toFixed(1)}%`
309
309
  }
310
310
  ) }),
311
311
  s && /* @__PURE__ */ e("div", { className: "flex-shrink-0 text-sm font-medium", children: s })
312
312
  ] });
313
- }, sa = de(ra), Na = v(
313
+ }, da = ge(ia), Ma = v(
314
314
  {
315
315
  name: "AreaChart",
316
316
  type: "info"
317
317
  },
318
- ue
319
- ), La = v(
318
+ xe
319
+ ), Da = v(
320
320
  {
321
321
  name: "BarChart",
322
322
  type: "info"
323
323
  },
324
- fe
325
- ), Pa = v(
324
+ Ce
325
+ ), Ta = v(
326
326
  {
327
327
  name: "CategoryBarChart",
328
328
  type: "info"
329
329
  },
330
- he
331
- ), Sa = v(
330
+ ye
331
+ ), Ba = v(
332
332
  {
333
333
  name: "LineChart",
334
334
  type: "info"
335
335
  },
336
- me
337
- ), ka = v(
336
+ we
337
+ ), Ra = v(
338
338
  {
339
339
  name: "PieChart",
340
340
  type: "info"
341
341
  },
342
- pe
343
- ), Fa = v(
342
+ Ne
343
+ ), Ia = v(
344
344
  {
345
345
  name: "VerticalBarChart",
346
346
  type: "info"
347
347
  },
348
- ve
349
- ), Ma = v(
348
+ Le
349
+ ), $a = v(
350
350
  {
351
351
  name: "ProgressBarChart",
352
352
  type: "info"
353
353
  },
354
- sa
355
- ), ta = {
354
+ da
355
+ ), $ = ({ count: a, list: r }) => {
356
+ const [s, t] = g(!1), l = /* @__PURE__ */ e(D, { label: `+${a}` });
357
+ return r != null && r.length ? /* @__PURE__ */ c(U, { open: s, onOpenChange: t, children: [
358
+ /* @__PURE__ */ e(W, { asChild: !0, children: /* @__PURE__ */ e("button", { className: Pe("inline-flex flex-shrink-0 items-center"), children: l }) }),
359
+ /* @__PURE__ */ e(
360
+ Y,
361
+ {
362
+ className: "rounded-md border border-solid border-f1-border-secondary p-1 shadow-md",
363
+ align: "end",
364
+ children: /* @__PURE__ */ c(G, { className: "[*[data-state=visible]_div]:bg-f1-background flex max-h-[172px] flex-col", children: [
365
+ r.map((d, n) => /* @__PURE__ */ e(
366
+ "div",
367
+ {
368
+ className: "flex w-[220px] min-w-0 items-center gap-1.5 px-2 py-1 [&:first-child]:pt-2 [&:last-child]:pb-2",
369
+ children: /* @__PURE__ */ e(D, { ...d })
370
+ },
371
+ n
372
+ )),
373
+ /* @__PURE__ */ e(
374
+ X,
375
+ {
376
+ orientation: "vertical",
377
+ className: "[&_div]:bg-f1-background"
378
+ }
379
+ )
380
+ ] })
381
+ }
382
+ )
383
+ ] }) : l;
384
+ };
385
+ $.displayName = "ChipCounter";
386
+ const de = ({
387
+ chips: a,
388
+ max: r = 4,
389
+ remainingCount: s,
390
+ layout: t = "compact"
391
+ }) => {
392
+ if (t === "fill")
393
+ return /* @__PURE__ */ e(
394
+ Fe,
395
+ {
396
+ items: a,
397
+ renderListItem: (o) => /* @__PURE__ */ e(D, { ...o }),
398
+ renderDropdownItem: () => null,
399
+ forceShowingOverflowIndicator: s !== void 0,
400
+ renderOverflowIndicator: (o) => /* @__PURE__ */ e(
401
+ $,
402
+ {
403
+ count: (s ?? 0) + o,
404
+ list: s ? void 0 : a.slice(a.length - o)
405
+ }
406
+ ),
407
+ overflowIndicatorWithPopover: !1,
408
+ className: "flex-1"
409
+ }
410
+ );
411
+ const l = a.slice(0, r), d = a.slice(r), n = s ?? a.length - r, i = n > 0;
412
+ return /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
413
+ l.map((o, f) => /* @__PURE__ */ e(D, { ...o }, f)),
414
+ i && /* @__PURE__ */ e(
415
+ $,
416
+ {
417
+ count: n,
418
+ list: s ? void 0 : d
419
+ }
420
+ )
421
+ ] });
422
+ };
423
+ de.displayName = "F0ChipList";
424
+ const Oa = ke(
425
+ "F0ChipList",
426
+ de
427
+ ), ca = {
356
428
  xs: 1,
357
429
  sm: 2,
358
430
  md: 2,
359
431
  lg: 2
360
- }, la = D(function({ widgets: r, children: s }, t) {
361
- const l = G(null);
362
- We(t, () => l.current);
363
- const u = Ye.toArray(r).filter((i) => !!i).map((i, n) => /* @__PURE__ */ e("div", { className: "h-full @5xl:h-auto [&>div]:h-full", children: i }, n));
364
- return /* @__PURE__ */ e(A, { layout: "home", children: /* @__PURE__ */ c("div", { ref: l, className: "@container", children: [
432
+ }, ua = B(function({ widgets: r, children: s }, t) {
433
+ const l = ae(null);
434
+ Qe(t, () => l.current);
435
+ const d = Ze.toArray(r).filter((n) => !!n).map((n, i) => /* @__PURE__ */ e("div", { className: "h-full @5xl:h-auto [&>div]:h-full", children: n }, i));
436
+ return /* @__PURE__ */ e(J, { layout: "home", children: /* @__PURE__ */ c("div", { ref: l, className: "@container", children: [
365
437
  /* @__PURE__ */ c("div", { className: "flex flex-col gap-6 px-5 pt-4 @md:pt-2 @5xl:hidden", children: [
366
- /* @__PURE__ */ e(ge, { columns: ta, showArrows: !1, children: u }),
438
+ /* @__PURE__ */ e(Se, { columns: ca, showArrows: !1, children: d }),
367
439
  /* @__PURE__ */ e("main", { children: s })
368
440
  ] }),
369
441
  /* @__PURE__ */ c("div", { className: "hidden grid-cols-3 gap-5 px-6 pb-6 pt-2 @5xl:grid", children: [
370
- /* @__PURE__ */ e("div", { className: "col-span-3 flex flex-row gap-5 *:flex-1", children: u.slice(0, 3) }),
442
+ /* @__PURE__ */ e("div", { className: "col-span-3 flex flex-row gap-5 *:flex-1", children: d.slice(0, 3) }),
371
443
  /* @__PURE__ */ e("main", { className: "col-span-2", children: s }),
372
- /* @__PURE__ */ e("div", { className: "flex flex-1 flex-col gap-5", children: u.slice(3) })
444
+ /* @__PURE__ */ e("div", { className: "flex flex-1 flex-col gap-5", children: d.slice(3) })
373
445
  ] })
374
446
  ] }) });
375
- }), oa = D(
447
+ }), fa = B(
376
448
  function({ children: r, sideContent: s, mainColumnPosition: t = "left" }, l) {
377
449
  return /* @__PURE__ */ e("div", { ref: l, className: "h-full overflow-auto", children: /* @__PURE__ */ c(
378
450
  "div",
379
451
  {
380
- className: x(
452
+ className: b(
381
453
  "flex h-full overflow-auto text-f1-foreground sm:flex-row",
382
454
  t === "right" ? "flex-col" : "flex-col-reverse"
383
455
  ),
384
456
  children: [
385
- t === "right" && /* @__PURE__ */ e(V, { children: s }),
457
+ t === "right" && /* @__PURE__ */ e(A, { children: s }),
386
458
  /* @__PURE__ */ e(
387
459
  "main",
388
460
  {
389
- className: x(
461
+ className: b(
390
462
  "h-fit min-h-full border-0 px-6 py-5 sm:basis-3/4 sm:border-solid",
391
463
  t === "right" ? "sm:border-l sm:border-l-f1-border-secondary" : "sm:border-r sm:border-r-f1-border-secondary"
392
464
  ),
393
465
  children: r
394
466
  }
395
467
  ),
396
- t === "left" && /* @__PURE__ */ e(V, { children: s })
468
+ t === "left" && /* @__PURE__ */ e(A, { children: s })
397
469
  ]
398
470
  }
399
471
  ) });
400
472
  }
401
- ), V = ({ children: a }) => /* @__PURE__ */ e("aside", { className: "py-5 pl-2 pr-4 sm:basis-1/4 sm:pb-6", children: a }), na = xe({
473
+ ), A = ({ children: a }) => /* @__PURE__ */ e("aside", { className: "py-5 pl-2 pr-4 sm:basis-1/4 sm:pb-6", children: a }), ha = Me({
402
474
  base: "relative flex min-h-full w-full flex-col gap-4 place-self-center overflow-y-auto px-6 py-5",
403
475
  variants: {
404
476
  variant: {
405
477
  narrow: "max-w-screen-lg"
406
478
  }
407
479
  }
408
- }), re = Ue.forwardRef(({ children: a, variant: r, className: s, ...t }, l) => /* @__PURE__ */ e(A, { layout: "standard", children: /* @__PURE__ */ e(
480
+ }), ce = Ke.forwardRef(({ children: a, variant: r, className: s, ...t }, l) => /* @__PURE__ */ e(J, { layout: "standard", children: /* @__PURE__ */ e(
409
481
  "section",
410
482
  {
411
483
  ref: l,
412
- className: x("relative flex-1 overflow-auto", s),
484
+ className: b("relative flex-1 overflow-auto", s),
413
485
  ...t,
414
- children: /* @__PURE__ */ e("div", { className: x(na({ variant: r })), children: a })
486
+ children: /* @__PURE__ */ e("div", { className: b(ha({ variant: r })), children: a })
415
487
  }
416
488
  ) }));
417
- re.displayName = "StandardLayout";
418
- const Ta = v(
489
+ ce.displayName = "StandardLayout";
490
+ const Ea = v(
419
491
  {
420
492
  name: "StandardLayout",
421
493
  type: "layout"
422
494
  },
423
- re
424
- ), Da = v(
495
+ ce
496
+ ), _a = v(
425
497
  {
426
498
  name: "TwoColumnLayout",
427
499
  type: "layout"
428
500
  },
429
- oa
430
- ), Ra = v(
501
+ fa
502
+ ), ja = v(
431
503
  {
432
504
  name: "HomeLayout",
433
505
  type: "layout"
434
506
  },
435
- la
436
- ), ia = ({ benefits: a }) => /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: a.map((r, s) => /* @__PURE__ */ e(da, { text: r }, s)) }), da = ({ text: a }) => /* @__PURE__ */ c("div", { className: "flex flex-row items-start gap-2", children: [
437
- /* @__PURE__ */ e(ye, { icon: Ce, size: "md", className: "text-f1-icon-positive" }),
507
+ ua
508
+ ), ma = ({ benefits: a }) => /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: a.map((r, s) => /* @__PURE__ */ e(pa, { text: r }, s)) }), pa = ({ text: a }) => /* @__PURE__ */ c("div", { className: "flex flex-row items-start gap-2", children: [
509
+ /* @__PURE__ */ e(Te, { icon: Be, size: "md", className: "text-f1-icon-positive" }),
438
510
  /* @__PURE__ */ e("span", { children: a })
439
- ] }), se = D(
511
+ ] }), ue = B(
440
512
  ({
441
513
  title: a,
442
514
  image: r,
443
515
  benefits: s,
444
516
  actions: t,
445
517
  withShadow: l = !0,
446
- module: u,
447
- moduleName: i,
448
- tag: n
518
+ module: d,
519
+ moduleName: n,
520
+ tag: i
449
521
  }, o) => /* @__PURE__ */ c(
450
522
  "div",
451
523
  {
452
524
  ref: o,
453
- className: x(
525
+ className: b(
454
526
  "bg-white flex flex-row rounded-xl border border-f1-border-secondary",
455
527
  l && "shadow-md"
456
528
  ),
@@ -467,13 +539,13 @@ const Ta = v(
467
539
  /* @__PURE__ */ c("div", { className: "flex flex-col gap-5", children: [
468
540
  /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
469
541
  /* @__PURE__ */ c("div", { className: "flex flex-row items-center gap-2", children: [
470
- u && /* @__PURE__ */ e(H, { module: u }),
471
- i && /* @__PURE__ */ e("p", { className: "text-base font-medium text-f1-foreground", children: i })
542
+ d && /* @__PURE__ */ e(K, { module: d }),
543
+ n && /* @__PURE__ */ e("p", { className: "text-base font-medium text-f1-foreground", children: n })
472
544
  ] }),
473
- n && /* @__PURE__ */ e("div", { className: "flex justify-start", children: /* @__PURE__ */ e(be, { icon: n.icon, text: n.label }) }),
545
+ i && /* @__PURE__ */ e("div", { className: "flex justify-start", children: /* @__PURE__ */ e(De, { icon: i.icon, text: i.label }) }),
474
546
  /* @__PURE__ */ e("h2", { className: "font-bold text-xl text-f1-foreground", children: a })
475
547
  ] }),
476
- /* @__PURE__ */ e(ia, { benefits: s })
548
+ /* @__PURE__ */ e(ma, { benefits: s })
477
549
  ] }),
478
550
  t && /* @__PURE__ */ e("div", { className: "flex gap-3", children: t })
479
551
  ] })
@@ -481,46 +553,46 @@ const Ta = v(
481
553
  }
482
554
  )
483
555
  );
484
- se.displayName = "ProductBlankslate";
485
- function ca({
556
+ ue.displayName = "ProductBlankslate";
557
+ function va({
486
558
  isOpen: a,
487
559
  onClose: r,
488
560
  title: s,
489
561
  children: t,
490
562
  module: l,
491
- portalContainer: u
563
+ portalContainer: d
492
564
  }) {
493
- const [i, n] = g(a);
494
- return X(() => {
495
- n(a);
496
- }, [a]), /* @__PURE__ */ e(we, { open: i, onOpenChange: (h) => {
497
- n(h), h || r();
565
+ const [n, i] = g(a);
566
+ return re(() => {
567
+ i(a);
568
+ }, [a]), /* @__PURE__ */ e(Re, { open: n, onOpenChange: (f) => {
569
+ i(f), f || r();
498
570
  }, modal: !0, children: /* @__PURE__ */ c(
499
- Ne,
571
+ Ie,
500
572
  {
501
573
  className: "max-h-[620px] w-[760px] overflow-y-auto overflow-x-hidden bg-f1-background",
502
- container: u,
574
+ container: d,
503
575
  children: [
504
576
  /* @__PURE__ */ c("div", { className: "flex flex-row items-center justify-between px-4 py-4", children: [
505
- /* @__PURE__ */ c(Le, { className: "flex flex-row items-center gap-2 text-lg font-semibold text-f1-foreground", children: [
506
- l && /* @__PURE__ */ e(H, { module: l, size: "lg" }),
577
+ /* @__PURE__ */ c($e, { className: "flex flex-row items-center gap-2 text-lg font-semibold text-f1-foreground", children: [
578
+ l && /* @__PURE__ */ e(K, { module: l, size: "lg" }),
507
579
  s
508
580
  ] }),
509
581
  /* @__PURE__ */ e(
510
- Pe,
582
+ Oe,
511
583
  {
512
584
  variant: "outline",
513
- icon: U,
585
+ icon: Q,
514
586
  onClick: r,
515
587
  label: "Close modal",
516
588
  hideLabel: !0
517
589
  }
518
590
  )
519
591
  ] }),
520
- /* @__PURE__ */ c(Se, { className: "[*[data-state=visible]_div]:bg-f1-background flex max-h-[512px] flex-col", children: [
592
+ /* @__PURE__ */ c(G, { className: "[*[data-state=visible]_div]:bg-f1-background flex max-h-[512px] flex-col", children: [
521
593
  t,
522
594
  /* @__PURE__ */ e(
523
- ke,
595
+ X,
524
596
  {
525
597
  orientation: "vertical",
526
598
  className: "[&_div]:bg-f1-background"
@@ -531,75 +603,75 @@ function ca({
531
603
  }
532
604
  ) });
533
605
  }
534
- function Ba({
606
+ function za({
535
607
  isOpen: a,
536
608
  onClose: r,
537
609
  title: s,
538
610
  image: t,
539
611
  benefits: l,
540
- errorMessage: u,
541
- successMessage: i,
542
- loadingState: n,
612
+ errorMessage: d,
613
+ successMessage: n,
614
+ loadingState: i,
543
615
  nextSteps: o,
544
- closeLabel: h,
545
- primaryAction: f,
616
+ closeLabel: f,
617
+ primaryAction: h,
546
618
  modalTitle: N,
547
619
  modalModule: L,
548
- secondaryAction: d,
549
- portalContainer: b,
550
- tag: S
620
+ secondaryAction: u,
621
+ portalContainer: x,
622
+ tag: k
551
623
  }) {
552
- const [R, k] = g(a), [y, C] = g(null), [P, m] = g(!1), F = async () => {
553
- if (f != null && f.onClick) {
624
+ const [R, F] = g(a), [C, y] = g(null), [P, m] = g(!1), S = async () => {
625
+ if (h != null && h.onClick) {
554
626
  m(!0);
555
627
  try {
556
- await f.onClick(), k(!1), C("success");
628
+ await h.onClick(), F(!1), y("success");
557
629
  } catch {
558
- C("error");
630
+ y("error");
559
631
  } finally {
560
632
  m(!1);
561
633
  }
562
634
  }
563
635
  }, M = () => {
564
- k(!1), r == null || r();
565
- }, B = P;
566
- return /* @__PURE__ */ c(I, { children: [
636
+ F(!1), r == null || r();
637
+ }, I = P;
638
+ return /* @__PURE__ */ c(O, { children: [
567
639
  /* @__PURE__ */ e(
568
- ca,
640
+ va,
569
641
  {
570
642
  isOpen: R,
571
643
  onClose: M,
572
644
  title: N,
573
645
  module: L,
574
- portalContainer: b,
646
+ portalContainer: x,
575
647
  children: /* @__PURE__ */ e("div", { className: "pb-4 pl-4", children: /* @__PURE__ */ e(
576
- se,
648
+ ue,
577
649
  {
578
650
  title: s,
579
651
  image: t,
580
652
  benefits: l,
581
653
  withShadow: !1,
582
- tag: S,
654
+ tag: k,
583
655
  actions: /* @__PURE__ */ c("div", { className: "flex gap-3", children: [
584
- f && /* @__PURE__ */ e(
656
+ h && /* @__PURE__ */ e(
585
657
  w,
586
658
  {
587
- variant: f.variant,
588
- label: B ? n.label : f.label,
589
- icon: f.icon || void 0,
590
- onClick: F,
591
- loading: f.loading,
592
- size: f.size
659
+ variant: h.variant,
660
+ label: I ? i.label : h.label,
661
+ icon: h.icon || void 0,
662
+ onClick: S,
663
+ loading: h.loading,
664
+ size: h.size
593
665
  }
594
666
  ),
595
- d && /* @__PURE__ */ e(
667
+ u && /* @__PURE__ */ e(
596
668
  w,
597
669
  {
598
- onClick: d.onClick,
599
- label: d.label,
600
- variant: d.variant,
601
- size: d.size,
602
- icon: d.icon
670
+ onClick: u.onClick,
671
+ label: u.label,
672
+ variant: u.variant,
673
+ size: u.size,
674
+ icon: u.icon
603
675
  }
604
676
  )
605
677
  ] })
@@ -607,48 +679,48 @@ function Ba({
607
679
  ) })
608
680
  }
609
681
  ),
610
- y && /* @__PURE__ */ e(
611
- W,
682
+ C && /* @__PURE__ */ e(
683
+ Z,
612
684
  {
613
685
  open: !0,
614
686
  onClose: () => {
615
- M(), C(null);
687
+ M(), y(null);
616
688
  },
617
- success: y === "success",
618
- errorMessage: u,
619
- successMessage: i,
689
+ success: C === "success",
690
+ errorMessage: d,
691
+ successMessage: n,
620
692
  nextSteps: o,
621
- closeLabel: h,
622
- portalContainer: b
693
+ closeLabel: f,
694
+ portalContainer: x
623
695
  }
624
696
  )
625
697
  ] });
626
698
  }
627
- function ua({
699
+ function ga({
628
700
  mediaUrl: a,
629
701
  title: r,
630
702
  description: s,
631
703
  onClose: t,
632
704
  dismissible: l,
633
- width: u,
634
- trackVisibility: i,
635
- actions: n,
705
+ width: d,
706
+ trackVisibility: n,
707
+ actions: i,
636
708
  showConfirmation: o = !0
637
709
  }) {
638
- const [h, f] = g(!1), N = () => {
639
- f(!0), t && t();
710
+ const [f, h] = g(!1), N = () => {
711
+ h(!0), t && t();
640
712
  };
641
- X(() => {
642
- i && i(!h);
643
- }, [i, h]);
713
+ re(() => {
714
+ n && n(!f);
715
+ }, [n, f]);
644
716
  const L = a == null ? void 0 : a.includes(".mp4");
645
- return /* @__PURE__ */ e(I, { children: h ? null : /* @__PURE__ */ c(Fe, { style: { width: u }, className: "relative bg-f1-background p-1", children: [
646
- /* @__PURE__ */ c(Me, { children: [
717
+ return /* @__PURE__ */ e(O, { children: f ? null : /* @__PURE__ */ c(Ee, { style: { width: d }, className: "relative bg-f1-background p-1", children: [
718
+ /* @__PURE__ */ c(_e, { children: [
647
719
  l && /* @__PURE__ */ e("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ e(
648
720
  w,
649
721
  {
650
722
  variant: "ghost",
651
- icon: U,
723
+ icon: Q,
652
724
  size: "sm",
653
725
  hideLabel: !0,
654
726
  onClick: N,
@@ -675,42 +747,42 @@ function ua({
675
747
  }
676
748
  )) }),
677
749
  /* @__PURE__ */ c("div", { className: "flex flex-col gap-[2px] p-3", children: [
678
- /* @__PURE__ */ e(j, { className: "text-lg font-medium", children: r }),
679
- /* @__PURE__ */ e(j, { className: "line-clamp-3 text-base font-normal text-f1-foreground-secondary", children: s })
750
+ /* @__PURE__ */ e(z, { className: "text-lg font-medium", children: r }),
751
+ /* @__PURE__ */ e(z, { className: "line-clamp-3 text-base font-normal text-f1-foreground-secondary", children: s })
680
752
  ] })
681
753
  ] })
682
754
  ] }),
683
- n && /* @__PURE__ */ e(Te, { className: "p-3", children: n.map(
684
- (d) => d.type === "upsell" ? /* @__PURE__ */ e(
685
- Y,
755
+ i && /* @__PURE__ */ e(je, { className: "p-3", children: i.map(
756
+ (u) => u.type === "upsell" ? /* @__PURE__ */ e(
757
+ ee,
686
758
  {
687
- label: d.label,
688
- onRequest: d.onClick,
689
- errorMessage: d.errorMessage,
690
- successMessage: d.successMessage,
691
- loadingState: d.loadingState,
692
- nextSteps: d.nextSteps,
693
- closeLabel: d.closeLabel,
694
- showConfirmation: o && d.showConfirmation,
695
- variant: d.variant
759
+ label: u.label,
760
+ onRequest: u.onClick,
761
+ errorMessage: u.errorMessage,
762
+ successMessage: u.successMessage,
763
+ loadingState: u.loadingState,
764
+ nextSteps: u.nextSteps,
765
+ closeLabel: u.closeLabel,
766
+ showConfirmation: o && u.showConfirmation,
767
+ variant: u.variant
696
768
  },
697
- d.label
769
+ u.label
698
770
  ) : /* @__PURE__ */ e(
699
771
  w,
700
772
  {
701
- label: d.label,
702
- onClick: d.onClick,
703
- variant: d.variant
773
+ label: u.label,
774
+ onClick: u.onClick,
775
+ variant: u.variant
704
776
  },
705
- d.label
777
+ u.label
706
778
  )
707
779
  ) })
708
780
  ] }) });
709
781
  }
710
- const fa = D(
782
+ const ba = B(
711
783
  function({ primaryAction: r, secondaryAction: s, ...t }, l) {
712
- const u = (o) => o.variant === "promote" ? /* @__PURE__ */ e(
713
- Y,
784
+ const d = (o) => o.variant === "promote" ? /* @__PURE__ */ e(
785
+ ee,
714
786
  {
715
787
  label: o.label,
716
788
  onRequest: async () => {
@@ -734,101 +806,101 @@ const fa = D(
734
806
  size: "md",
735
807
  icon: o.icon
736
808
  }
737
- ), i = (r == null ? void 0 : r.variant) !== "promote" ? r : void 0, n = (s == null ? void 0 : s.variant) !== "promote" ? s : void 0;
809
+ ), n = (r == null ? void 0 : r.variant) !== "promote" ? r : void 0, i = (s == null ? void 0 : s.variant) !== "promote" ? s : void 0;
738
810
  return /* @__PURE__ */ c(
739
- De,
811
+ ze,
740
812
  {
741
813
  ref: l,
742
814
  ...t,
743
- primaryAction: i,
744
- secondaryAction: n,
815
+ primaryAction: n,
816
+ secondaryAction: i,
745
817
  children: [
746
- (r == null ? void 0 : r.variant) === "promote" && u(r),
747
- (s == null ? void 0 : s.variant) === "promote" && u(s)
818
+ (r == null ? void 0 : r.variant) === "promote" && d(r),
819
+ (s == null ? void 0 : s.variant) === "promote" && d(s)
748
820
  ]
749
821
  }
750
822
  );
751
823
  }
752
824
  );
753
- fa.displayName = "UpsellingBanner";
754
- function Ia({
825
+ ba.displayName = "UpsellingBanner";
826
+ function Va({
755
827
  isOpen: a,
756
828
  setIsOpen: r,
757
829
  label: s,
758
830
  variant: t = "promote",
759
831
  size: l = "md",
760
- showIcon: u = !0,
761
- side: i = "right",
762
- align: n = "center",
763
- icon: o = Ie,
764
- mediaUrl: h,
765
- title: f,
832
+ showIcon: d = !0,
833
+ side: n = "right",
834
+ align: i = "center",
835
+ icon: o = Ve,
836
+ mediaUrl: f,
837
+ title: h,
766
838
  description: N,
767
839
  width: L = "300px",
768
- trackVisibility: d,
769
- actions: b,
770
- onClick: S,
840
+ trackVisibility: u,
841
+ actions: x,
842
+ onClick: k,
771
843
  hideLabel: R = !1
772
844
  }) {
773
- const [k, y] = g(!1), [C, P] = g(null), [m, F] = g(null), M = (p) => {
774
- r(p), S && S();
775
- }, B = async (p) => {
845
+ const [F, C] = g(!1), [y, P] = g(null), [m, S] = g(null), M = (p) => {
846
+ r(p), k && k();
847
+ }, I = async (p) => {
776
848
  if (p.type === "upsell") {
777
- F(p);
849
+ S(p);
778
850
  try {
779
- await p.onClick(), p.showConfirmation && (y(!0), P("success"));
851
+ await p.onClick(), p.showConfirmation && (C(!0), P("success"));
780
852
  } catch {
781
- y(!0), P("error");
853
+ C(!0), P("error");
782
854
  }
783
855
  }
784
- }, te = () => {
785
- P(null), y(!1), F(null), r(!1);
786
- }, le = a && !k, oe = b == null ? void 0 : b.map((p) => p.type === "upsell" ? {
856
+ }, fe = () => {
857
+ P(null), C(!1), S(null), r(!1);
858
+ }, he = a && !F, me = x == null ? void 0 : x.map((p) => p.type === "upsell" ? {
787
859
  ...p,
788
- onClick: () => B(p)
860
+ onClick: () => I(p)
789
861
  } : p);
790
- return /* @__PURE__ */ c(I, { children: [
791
- /* @__PURE__ */ c(Re, { open: le, onOpenChange: M, children: [
792
- /* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ e(
862
+ return /* @__PURE__ */ c(O, { children: [
863
+ /* @__PURE__ */ c(U, { open: he, onOpenChange: M, children: [
864
+ /* @__PURE__ */ e(W, { asChild: !0, children: /* @__PURE__ */ e(
793
865
  w,
794
866
  {
795
867
  variant: t,
796
868
  label: s,
797
869
  size: l,
798
- icon: u ? o : void 0,
870
+ icon: d ? o : void 0,
799
871
  onClick: () => r(a),
800
872
  hideLabel: R
801
873
  }
802
874
  ) }),
803
875
  /* @__PURE__ */ e(
804
- $e,
876
+ Y,
805
877
  {
806
- side: i,
807
- align: n,
878
+ side: n,
879
+ align: i,
808
880
  className: "w-fit border-none bg-transparent p-2 shadow-none",
809
881
  children: /* @__PURE__ */ e(
810
- ua,
882
+ ga,
811
883
  {
812
- mediaUrl: h,
813
- title: f,
884
+ mediaUrl: f,
885
+ title: h,
814
886
  description: N,
815
887
  onClose: () => r(!1),
816
888
  dismissible: !1,
817
889
  width: L,
818
- trackVisibility: d,
819
- actions: oe,
890
+ trackVisibility: u,
891
+ actions: me,
820
892
  showConfirmation: !1
821
893
  }
822
894
  )
823
895
  }
824
896
  )
825
897
  ] }),
826
- (m == null ? void 0 : m.type) === "upsell" && m.showConfirmation && C && /* @__PURE__ */ e(
827
- W,
898
+ (m == null ? void 0 : m.type) === "upsell" && m.showConfirmation && y && /* @__PURE__ */ e(
899
+ Z,
828
900
  {
829
901
  open: !0,
830
- onClose: te,
831
- success: C === "success",
902
+ onClose: fe,
903
+ success: y === "success",
832
904
  errorMessage: m.errorMessage,
833
905
  successMessage: m.successMessage,
834
906
  nextSteps: m.nextSteps,
@@ -838,114 +910,115 @@ function Ia({
838
910
  )
839
911
  ] });
840
912
  }
841
- const ha = Ge(
913
+ const xa = ea(
842
914
  null
843
- ), ma = ({ children: a, fullScreen: r = !0 }) => {
844
- const s = G(null), [t, l] = g(s.current);
845
- return He(() => {
915
+ ), Ca = ({ children: a, fullScreen: r = !0 }) => {
916
+ const s = ae(null), [t, l] = g(s.current);
917
+ return Je(() => {
846
918
  l(s.current);
847
- }, []), /* @__PURE__ */ e(ha.Provider, { value: { element: t }, children: /* @__PURE__ */ e(
919
+ }, []), /* @__PURE__ */ e(xa.Provider, { value: { element: t }, children: /* @__PURE__ */ e(
848
920
  "div",
849
921
  {
850
922
  ref: s,
851
923
  id: "f0-layout",
852
- className: x({
924
+ className: b({
853
925
  "flex h-screen w-screen flex-col bg-[#F5F6F8] dark:bg-[#0D1625]": r
854
926
  }),
855
927
  children: a
856
928
  }
857
929
  ) });
858
- }, pa = ({
930
+ }, ya = ({
859
931
  children: a
860
- }) => /* @__PURE__ */ e(Ae, { reducedMotion: "user", children: a }), $a = ({
932
+ }) => /* @__PURE__ */ e(Xe, { reducedMotion: "user", children: a }), qa = ({
861
933
  children: a,
862
934
  layout: r,
863
935
  link: s,
864
936
  privacyModeInitiallyEnabled: t,
865
937
  image: l,
866
- i18n: u,
867
- l10n: i,
868
- isDev: n = !1,
938
+ i18n: d,
939
+ l10n: n,
940
+ isDev: i = !1,
869
941
  showExperimentalWarnings: o = !1
870
- }) => /* @__PURE__ */ e(pa, { children: /* @__PURE__ */ e(
871
- Ee,
942
+ }) => /* @__PURE__ */ e(ya, { children: /* @__PURE__ */ e(
943
+ qe,
872
944
  {
873
- isDev: n,
945
+ isDev: i,
874
946
  showExperimentalWarnings: o,
875
- children: /* @__PURE__ */ e(Oe, { ...i, children: /* @__PURE__ */ e(je, { ...u, children: /* @__PURE__ */ e(_e, { ...s, children: /* @__PURE__ */ e(ma, { ...r, children: /* @__PURE__ */ e(ze, { children: /* @__PURE__ */ e(
876
- Ve,
947
+ children: /* @__PURE__ */ e(Ae, { ...n, children: /* @__PURE__ */ e(He, { ...d, children: /* @__PURE__ */ e(Ue, { ...s, children: /* @__PURE__ */ e(Ca, { ...r, children: /* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(
948
+ Ye,
877
949
  {
878
950
  initiallyEnabled: t,
879
- children: /* @__PURE__ */ e(qe, { ...l, children: a })
951
+ children: /* @__PURE__ */ e(Ge, { ...l, children: a })
880
952
  }
881
953
  ) }) }) }) }) })
882
954
  }
883
955
  ) });
884
956
  export {
885
- Na as AreaChart,
886
- ja as Await,
887
- La as BarChart,
957
+ Ma as AreaChart,
958
+ Ua as Await,
959
+ Da as BarChart,
888
960
  w as Button,
889
- Pa as CategoryBarChart,
890
- _a as CopyButton,
891
- za as DndProvider,
892
- Va as EmojiImage,
893
- qa as F0Avatar,
894
- Aa as F0AvatarAlert,
895
- Ha as F0AvatarCompany,
896
- Ua as F0AvatarDate,
897
- Wa as F0AvatarEmoji,
898
- Ya as F0AvatarFile,
899
- Ga as F0AvatarIcon,
900
- Xa as F0AvatarList,
901
- H as F0AvatarModule,
902
- Ja as F0AvatarPerson,
903
- Ka as F0AvatarTeam,
904
- Qa as F0Card,
905
- Za as F0Checkbox,
906
- ye as F0Icon,
907
- er as F0TagAlert,
908
- ar as F0TagBalance,
909
- rr as F0TagCompany,
910
- sr as F0TagDot,
911
- tr as F0TagList,
912
- lr as F0TagPerson,
913
- be as F0TagRaw,
914
- or as F0TagStatus,
915
- nr as F0TagTeam,
916
- $a as FactorialOneProvider,
917
- Ra as HomeLayout,
918
- Sa as LineChart,
919
- ya as Link,
920
- ir as OneFilterPicker,
921
- ka as PieChart,
922
- Ve as PrivacyModeProvider,
923
- se as ProductBlankslate,
924
- dr as ProductCard,
925
- Ba as ProductModal,
926
- ua as ProductWidget,
927
- Ma as ProgressBarChart,
928
- Ta as StandardLayout,
929
- cr as TagCounter,
930
- Da as TwoColumnLayout,
931
- W as UpsellRequestResponseDialog,
932
- fa as UpsellingBanner,
933
- Y as UpsellingButton,
934
- Ia as UpsellingPopover,
935
- Fa as VerticalBarChart,
936
- Ca as avatarVariants,
937
- ur as buildTranslations,
938
- fr as createAtlaskitDriver,
939
- ba as defaultTranslations,
940
- hr as experimental,
941
- mr as getEmojiLabel,
942
- pr as modules,
943
- vr as tagDotColors,
944
- gr as useDndEvents,
945
- xr as useDraggable,
946
- br as useDroppableList,
947
- yr as useEmojiConfetti,
948
- Cr as usePrivacyMode,
949
- wr as useReducedMotion,
950
- Nr as useXRay
961
+ Ta as CategoryBarChart,
962
+ Wa as CopyButton,
963
+ Ya as DndProvider,
964
+ Ga as EmojiImage,
965
+ Xa as F0Avatar,
966
+ Ja as F0AvatarAlert,
967
+ Ka as F0AvatarCompany,
968
+ Qa as F0AvatarDate,
969
+ Za as F0AvatarEmoji,
970
+ er as F0AvatarFile,
971
+ ar as F0AvatarIcon,
972
+ rr as F0AvatarList,
973
+ K as F0AvatarModule,
974
+ sr as F0AvatarPerson,
975
+ tr as F0AvatarTeam,
976
+ lr as F0Card,
977
+ or as F0Checkbox,
978
+ Oa as F0ChipList,
979
+ Te as F0Icon,
980
+ nr as F0TagAlert,
981
+ ir as F0TagBalance,
982
+ dr as F0TagCompany,
983
+ cr as F0TagDot,
984
+ ur as F0TagList,
985
+ fr as F0TagPerson,
986
+ De as F0TagRaw,
987
+ hr as F0TagStatus,
988
+ mr as F0TagTeam,
989
+ qa as FactorialOneProvider,
990
+ ja as HomeLayout,
991
+ Ba as LineChart,
992
+ ka as Link,
993
+ pr as OneFilterPicker,
994
+ Ra as PieChart,
995
+ Ye as PrivacyModeProvider,
996
+ ue as ProductBlankslate,
997
+ vr as ProductCard,
998
+ za as ProductModal,
999
+ ga as ProductWidget,
1000
+ $a as ProgressBarChart,
1001
+ Ea as StandardLayout,
1002
+ gr as TagCounter,
1003
+ _a as TwoColumnLayout,
1004
+ Z as UpsellRequestResponseDialog,
1005
+ ba as UpsellingBanner,
1006
+ ee as UpsellingButton,
1007
+ Va as UpsellingPopover,
1008
+ Ia as VerticalBarChart,
1009
+ Fa as avatarVariants,
1010
+ br as buildTranslations,
1011
+ xr as createAtlaskitDriver,
1012
+ Pa as defaultTranslations,
1013
+ ke as experimental,
1014
+ Cr as getEmojiLabel,
1015
+ yr as modules,
1016
+ wr as tagDotColors,
1017
+ Nr as useDndEvents,
1018
+ Lr as useDraggable,
1019
+ Pr as useDroppableList,
1020
+ kr as useEmojiConfetti,
1021
+ Fr as usePrivacyMode,
1022
+ Sr as useReducedMotion,
1023
+ Mr as useXRay
951
1024
  };