@photoroom/ui 0.1.492 → 0.1.494

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/index.mjs CHANGED
@@ -56154,12 +56154,15 @@ var WSe = ({ lang: e, monthlyProcessedImages: r = 1e3, items: i, partnerCard: a,
56154
56154
  className: U("flex flex-wrap gap-2 xl:flex-1 xl:flex-nowrap", j9),
56155
56155
  children: i
56156
56156
  })]
56157
- }), F9 = ({ isChecked: r, planName: i, description: a, includedLabel: o, excludedLabel: s }) => /* @__PURE__ */ t(N9, { children: /* @__PURE__ */ n("div", {
56157
+ }), F9 = ({ isChecked: r, planName: i, description: a, includedLabel: o, excludedLabel: s, isLoading: c }) => /* @__PURE__ */ t(N9, { children: /* @__PURE__ */ n("div", {
56158
56158
  className: U("h-8 px-2", "inline-flex items-center gap-1.5", "rounded-400 border-misc-hairline misc-border-size-hairline", "xl:h-auto xl:border-none xl:px-0", "component-500 text-content-primary"),
56159
56159
  children: [!!i && /* @__PURE__ */ n("span", {
56160
56160
  className: "text-content-secondary xl:sr-only",
56161
56161
  children: [i, ":"]
56162
- }), a || /* @__PURE__ */ t("div", {
56162
+ }), c ? /* @__PURE__ */ t(LJ, {
56163
+ className: "h-4 w-12",
56164
+ rounding: "200"
56165
+ }) : a || /* @__PURE__ */ t("div", {
56163
56166
  className: "flex h-6 w-6 items-center justify-center",
56164
56167
  children: r ? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(u, { className: "icon-size-400 text-content-accent" }), /* @__PURE__ */ t("span", {
56165
56168
  className: "sr-only",
@@ -56277,8 +56280,8 @@ var WSe = ({ lang: e, monthlyProcessedImages: r = 1e3, items: i, partnerCard: a,
56277
56280
  className: "flex flex-1 flex-col gap-6 *:flex-1 sm:flex-row sm:gap-4 xl:gap-1.5",
56278
56281
  children: i
56279
56282
  })]
56280
- }), I9 = ({ value: e, originalValue: r, priceSubLabel: i, billingPeriod: a, perMonthLabel: o, perYearLabel: s, billedAnnuallyLabel: c, showYearlyPriceAsMonthly: l, disabled: u, variant: d = "default", children: f }) => {
56281
- let p = l ? o : s;
56283
+ }), I9 = ({ value: e, originalValue: r, priceSubLabel: i, billingPeriod: a, perMonthLabel: o, perYearLabel: s, billedAnnuallyLabel: c, showYearlyPriceAsMonthly: l, disabled: u, isLoading: d, isError: f, variant: p = "default", children: m }) => {
56284
+ let h = l ? o : s;
56282
56285
  return /* @__PURE__ */ n("div", {
56283
56286
  className: "flex w-full flex-col gap-6",
56284
56287
  children: [/* @__PURE__ */ n("div", {
@@ -56290,66 +56293,52 @@ var WSe = ({ lang: e, monthlyProcessedImages: r = 1e3, items: i, partnerCard: a,
56290
56293
  children: r
56291
56294
  }), /* @__PURE__ */ t("span", {
56292
56295
  className: "text-900 font-600 leading-500",
56293
- children: u ? "–" : e || "\xA0"
56296
+ children: u ? "–" : d ? /* @__PURE__ */ t(LJ, {
56297
+ className: "inline-block h-[1em] w-24 align-middle",
56298
+ rounding: "300"
56299
+ }) : e || (f ? "–" : " ")
56294
56300
  })]
56295
56301
  }), !u && /* @__PURE__ */ t("span", {
56296
- className: U("component-500", d === "dark" ? "text-content-white-secondary" : "text-content-primary"),
56302
+ className: U("component-500", p === "dark" ? "text-content-white-secondary" : "text-content-primary"),
56297
56303
  children: i ?? /* @__PURE__ */ n("span", {
56298
56304
  className: "component-400 text-content-secondary",
56299
56305
  children: [
56300
56306
  a === "monthly" && o,
56301
- a === "yearly" && p,
56307
+ a === "yearly" && h,
56302
56308
  l && c && `, ${c}`
56303
56309
  ]
56304
56310
  })
56305
56311
  })]
56306
- }), !u && f]
56312
+ }), !u && m]
56307
56313
  });
56308
- }, L9 = ({ options: e = [], value: r, onValueChange: i, ariaLabel: a, variant: o = "radio", isDark: s = !1 }) => {
56314
+ }, L9 = ({ options: e = [], value: n, onValueChange: r, ariaLabel: i, isDark: a = !1, isLoading: o = !1 }) => {
56309
56315
  if (!e.length) return null;
56310
- let c = s ? "text-content-white-primary" : "text-content-primary", l = (t) => {
56311
- let n = e.find((e) => e.value === t);
56312
- return n?.description ?? n?.label ?? null;
56313
- }, [u] = e;
56314
- if (e.length === 1 && u) return /* @__PURE__ */ t("div", {
56315
- className: U("component-500 flex min-h-10 items-center", c),
56316
- children: l(u.value)
56317
- });
56318
- if (o === "select") return /* @__PURE__ */ t(V6, {
56316
+ if (o) return /* @__PURE__ */ t(LJ, {
56317
+ className: "h-10 w-full",
56318
+ rounding: "300"
56319
+ });
56320
+ let [s] = e;
56321
+ return e.length === 1 && s ? /* @__PURE__ */ t("div", {
56322
+ className: U("component-500 flex min-h-10 items-center", a ? "text-content-white-primary" : "text-content-primary"),
56323
+ children: s.label
56324
+ }) : /* @__PURE__ */ t(V6, {
56319
56325
  isSearchable: !1,
56320
56326
  multiline: !0,
56321
56327
  className: "w-full",
56322
- placeholder: a,
56323
- value: r,
56324
- onValueChange: (e) => i?.(e),
56328
+ placeholder: i,
56329
+ value: n,
56330
+ onValueChange: (e) => r?.(e),
56325
56331
  options: e.map((e) => ({
56326
56332
  value: e.value,
56327
56333
  label: e.label
56328
56334
  })),
56329
- renderOption: (e) => l(e.value),
56330
- renderValue: (e) => l(e)
56331
- });
56332
- let d = e.find((e) => e.value === r)?.description;
56333
- return /* @__PURE__ */ n("div", {
56334
- className: "flex flex-col gap-2",
56335
- children: [/* @__PURE__ */ t(p3, {
56336
- variant: "label",
56337
- value: r,
56338
- onValueChange: i,
56339
- children: e.map((e) => /* @__PURE__ */ t(p3.Item, {
56340
- value: e.value,
56341
- label: e.label
56342
- }, e.value))
56343
- }), !!d && /* @__PURE__ */ t("div", {
56344
- className: U("component-500 [&_strong]:text-content-accent [&_strong]:font-medium", c),
56345
- children: d
56346
- })]
56335
+ renderValue: (t) => e.find((e) => e.value === t)?.label ?? null
56347
56336
  });
56348
- }, oCe = ({ planType: r, description: i, cta: a, propLists: o, billingPeriod: s, specialOfferLabel: c, clientLogos: l, planPriceLabelOverride: u, planPriceSubLabel: d, planName: f, showYearlyPriceAsMonthly: p, tagLabel: m, tagVariant: h = "neutral", variant: g = "default", freePlanLabel: _, perMonthLabel: v, perYearLabel: y, billedAnnuallyLabel: b, subscriptionOptions: x, isUnavailable: S, unavailableLabel: C, subscriptionType: w, onSubscriptionTypeChange: T, subscriptionTypeSelectorVariant: E, resolvedPrice: D, ...O }) => {
56349
- let [k, A] = je(x?.[0]?.value), j = w ?? k, M = T ?? A, N = s === "yearly" && p, { value: P, originalValue: F } = D ?? {}, I = g === "dark";
56337
+ }, oCe = ({ planType: r, description: i, cta: a, propLists: o, billingPeriod: s, specialOfferLabel: c, clientLogos: l, planPriceLabelOverride: u, planPriceSubLabel: d, planName: f, showYearlyPriceAsMonthly: p, tagLabel: m, tagVariant: h = "neutral", variant: g = "default", freePlanLabel: _, perMonthLabel: v, perYearLabel: y, billedAnnuallyLabel: b, subscriptionOptions: x, isUnavailable: S, unavailableLabel: C, subscriptionType: w, onSubscriptionTypeChange: T, resolvedPrice: E, isError: D, isSelectorLoading: O, ...k }) => {
56338
+ let [A, j] = je(x?.[0]?.value), M = w ?? A, N = T ?? j, P = s === "yearly" && p, { value: F, originalValue: I } = E ?? {}, ee = g === "dark";
56350
56339
  return /* @__PURE__ */ n("div", {
56351
- className: U("relative flex w-full flex-col gap-6", "px-4 py-7", "rounded-500", I ? "bg-background-default text-content-white-primary" : "bg-background-inverted", "border", I ? "border-white-alpha-3" : "border-misc-border", m && "max-xl:pt-0", !m && "sm:max-xl:pt-0"),
56352
- ...O,
56340
+ className: U("relative flex w-full flex-col gap-6", "px-4 py-7", "rounded-500", ee ? "bg-background-default text-content-white-primary" : "bg-background-inverted", "border", ee ? "border-white-alpha-3" : "border-misc-border", m && "max-xl:pt-0", !m && "sm:max-xl:pt-0"),
56341
+ ...k,
56353
56342
  children: [/* @__PURE__ */ n("div", {
56354
56343
  className: "flex flex-col",
56355
56344
  children: [
@@ -56365,7 +56354,7 @@ var WSe = ({ lang: e, monthlyProcessedImages: r = 1e3, items: i, partnerCard: a,
56365
56354
  children: [/* @__PURE__ */ n("div", {
56366
56355
  className: "inline-flex flex-row gap-3",
56367
56356
  children: [/* @__PURE__ */ t("div", {
56368
- className: U("component-semi-strong-800", I ? "text-content-white-primary" : "text-content-primary"),
56357
+ className: U("component-semi-strong-800", ee ? "text-content-white-primary" : "text-content-primary"),
56369
56358
  children: f
56370
56359
  }), c && /* @__PURE__ */ t("div", {
56371
56360
  className: "flex items-center",
@@ -56378,7 +56367,7 @@ var WSe = ({ lang: e, monthlyProcessedImages: r = 1e3, items: i, partnerCard: a,
56378
56367
  className: "flex flex-col",
56379
56368
  "data-pricing-card-description": !0,
56380
56369
  children: i && /* @__PURE__ */ t("div", {
56381
- className: U("component-500", I ? "text-content-white-secondary" : "text-content-subdued-primary"),
56370
+ className: U("component-500", ee ? "text-content-white-secondary" : "text-content-subdued-primary"),
56382
56371
  children: i
56383
56372
  })
56384
56373
  })]
@@ -56397,24 +56386,26 @@ var WSe = ({ lang: e, monthlyProcessedImages: r = 1e3, items: i, partnerCard: a,
56397
56386
  "pro",
56398
56387
  "business",
56399
56388
  "ultra"
56400
- ].includes(r) && (P ? /* @__PURE__ */ t(I9, {
56401
- value: P,
56402
- originalValue: F,
56389
+ ].includes(r) && /* @__PURE__ */ t(I9, {
56390
+ value: F,
56391
+ originalValue: I,
56403
56392
  disabled: S,
56393
+ isLoading: !F && !D,
56394
+ isError: D,
56404
56395
  billingPeriod: s,
56405
56396
  perMonthLabel: v,
56406
56397
  perYearLabel: y,
56407
- showYearlyPriceAsMonthly: N,
56398
+ showYearlyPriceAsMonthly: P,
56408
56399
  billedAnnuallyLabel: b,
56409
56400
  children: /* @__PURE__ */ t(L9, {
56410
56401
  options: x,
56411
- value: j,
56412
- onValueChange: M,
56413
- variant: E,
56402
+ value: M,
56403
+ onValueChange: N,
56414
56404
  ariaLabel: f,
56415
- isDark: I
56405
+ isDark: ee,
56406
+ isLoading: O
56416
56407
  })
56417
- }) : /* @__PURE__ */ t(I9, { disabled: S })),
56408
+ }),
56418
56409
  r === "enterprise" && /* @__PURE__ */ t(I9, {
56419
56410
  value: u,
56420
56411
  priceSubLabel: d,
@@ -56424,11 +56415,11 @@ var WSe = ({ lang: e, monthlyProcessedImages: r = 1e3, items: i, partnerCard: a,
56424
56415
  perYearLabel: y,
56425
56416
  children: /* @__PURE__ */ t(L9, {
56426
56417
  options: x,
56427
- value: j,
56428
- onValueChange: M,
56429
- variant: E,
56418
+ value: M,
56419
+ onValueChange: N,
56430
56420
  ariaLabel: f,
56431
- isDark: I
56421
+ isDark: ee,
56422
+ isLoading: O
56432
56423
  })
56433
56424
  })
56434
56425
  ]
@@ -56445,8 +56436,8 @@ var WSe = ({ lang: e, monthlyProcessedImages: r = 1e3, items: i, partnerCard: a,
56445
56436
  })
56446
56437
  ]
56447
56438
  }), /* @__PURE__ */ n("div", {
56448
- className: U("flex flex-1 flex-col justify-between gap-6", I && "[&_svg]:text-content-white-primary"),
56449
- children: [o && o.length > 0 && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", { className: U("h-px w-full shrink-0", I ? "bg-white-alpha-3" : "bg-misc-divider") }), /* @__PURE__ */ t("div", {
56439
+ className: U("flex flex-1 flex-col justify-between gap-6", ee && "[&_svg]:text-content-white-primary"),
56440
+ children: [o && o.length > 0 && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", { className: U("h-px w-full shrink-0", ee ? "bg-white-alpha-3" : "bg-misc-divider") }), /* @__PURE__ */ t("div", {
56450
56441
  className: U("flex flex-1 flex-col justify-between gap-8", o.length > 1 && "[&>*:last-child]:justify-end"),
56451
56442
  children: o
56452
56443
  })] }), l && l.length > 0 && /* @__PURE__ */ t("div", {
@@ -56458,8 +56449,8 @@ var WSe = ({ lang: e, monthlyProcessedImages: r = 1e3, items: i, partnerCard: a,
56458
56449
  }, sCe = ({ planName: e, planShortName: n }) => /* @__PURE__ */ t(P9, {
56459
56450
  planName: e,
56460
56451
  planShortName: n
56461
- }), cCe = ({ planName: e, planType: r, billingPeriod: i, showYearlyPriceAsMonthly: a, planPriceLabelOverride: o, cta: s, perMonthLabel: c, perYearLabel: l, billedAnnuallyLabel: u, resolvedPrice: d }) => {
56462
- let f = r === "enterprise", { value: p } = d ?? {}, m = f ? o : p, h = i === "monthly" || a ? c : l, g = i === "yearly" && a ? u : void 0;
56452
+ }), cCe = ({ planName: e, planType: r, billingPeriod: i, showYearlyPriceAsMonthly: a, planPriceLabelOverride: o, cta: s, perMonthLabel: c, perYearLabel: l, billedAnnuallyLabel: u, resolvedPrice: d, isError: f }) => {
56453
+ let p = r === "enterprise", { value: m } = d ?? {}, h = p ? o : m, g = !p && !h && !f, _ = i === "monthly" || a ? c : l, v = i === "yearly" && a ? u : void 0;
56463
56454
  return /* @__PURE__ */ t(N9, { children: /* @__PURE__ */ n("div", {
56464
56455
  className: "flex h-full flex-col gap-4",
56465
56456
  children: [
@@ -56471,10 +56462,13 @@ var WSe = ({ lang: e, monthlyProcessedImages: r = 1e3, items: i, partnerCard: a,
56471
56462
  className: "flex flex-col items-start",
56472
56463
  children: [/* @__PURE__ */ t("span", {
56473
56464
  className: "text-800 font-600 text-content-primary leading-500 [word-break:break-word]",
56474
- children: m || "\xA0"
56475
- }), !f && h && /* @__PURE__ */ n("span", {
56465
+ children: g ? /* @__PURE__ */ t(LJ, {
56466
+ className: "inline-block h-[1em] w-20 align-middle",
56467
+ rounding: "300"
56468
+ }) : h || (f ? "–" : "\xA0")
56469
+ }), !p && _ && /* @__PURE__ */ n("span", {
56476
56470
  className: "component-light-400 text-content-subdued-primary flex min-w-0",
56477
- children: [/* @__PURE__ */ t("span", { children: h }), g && /* @__PURE__ */ n("span", { children: [", ", g] })]
56471
+ children: [/* @__PURE__ */ t("span", { children: _ }), v && /* @__PURE__ */ n("span", { children: [", ", v] })]
56478
56472
  })]
56479
56473
  }),
56480
56474
  s && /* @__PURE__ */ t("div", {
@@ -56483,12 +56477,13 @@ var WSe = ({ lang: e, monthlyProcessedImages: r = 1e3, items: i, partnerCard: a,
56483
56477
  })
56484
56478
  ]
56485
56479
  }) });
56486
- }, lCe = ({ isChecked: e, description: n, planName: r, includedLabel: i, excludedLabel: a }) => /* @__PURE__ */ t(F9, {
56480
+ }, lCe = ({ isChecked: e, description: n, planName: r, includedLabel: i, excludedLabel: a, isLoading: o }) => /* @__PURE__ */ t(F9, {
56487
56481
  isChecked: e,
56488
56482
  description: n,
56489
56483
  planName: r,
56490
56484
  includedLabel: i,
56491
- excludedLabel: a
56485
+ excludedLabel: a,
56486
+ isLoading: o
56492
56487
  }), uCe = ({ children: e, ...n }) => /* @__PURE__ */ t("div", {
56493
56488
  className: "rounded-400 bg-background-subdued inline-flex gap-0.5 p-0.5",
56494
56489
  ...n,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@photoroom/ui",
3
- "version": "0.1.492",
3
+ "version": "0.1.494",
4
4
  "private": false,
5
5
  "description": "Photoroom design system components",
6
6
  "sideEffects": [