@lyeve-labs/ui-kit 0.42.0 → 0.42.1
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.
|
@@ -152,6 +152,7 @@
|
|
|
152
152
|
class="{cls} {inert ? 'pointer-events-none opacity-50' : ''}"
|
|
153
153
|
aria-disabled={inert ? 'true' : undefined}
|
|
154
154
|
tabindex={inert ? -1 : undefined}
|
|
155
|
+
onclick={inert ? undefined : onclick}
|
|
155
156
|
{...rest}
|
|
156
157
|
>
|
|
157
158
|
{#if loading}<Spinner size={spinnerSize} />{/if}
|
|
@@ -54,6 +54,12 @@
|
|
|
54
54
|
/** The period that quote was priced for. A monthly quote says nothing about a year. */
|
|
55
55
|
quotePeriod?: BillingPeriod | null;
|
|
56
56
|
period?: BillingPeriod;
|
|
57
|
+
/**
|
|
58
|
+
* What the total is charged per, when it differs from `period`. A
|
|
59
|
+
* one-time payment is quoted monthly and charged once, so its host passes
|
|
60
|
+
* `'once'` and the total reads "$6.00 once" rather than "$6.00/mo".
|
|
61
|
+
*/
|
|
62
|
+
per?: BillingPeriod | 'once';
|
|
57
63
|
/** True while a fresh price is in flight. */
|
|
58
64
|
quoting?: boolean;
|
|
59
65
|
/** The count the bill will carry, when the host knows better than the cart. */
|
|
@@ -117,6 +123,7 @@
|
|
|
117
123
|
quote = null,
|
|
118
124
|
quotePeriod = null,
|
|
119
125
|
period = 'monthly',
|
|
126
|
+
per,
|
|
120
127
|
quoting = false,
|
|
121
128
|
billedSkus = null,
|
|
122
129
|
currency = 'USD',
|
|
@@ -193,7 +200,10 @@
|
|
|
193
200
|
),
|
|
194
201
|
);
|
|
195
202
|
|
|
196
|
-
const perLabel = $derived(
|
|
203
|
+
const perLabel = $derived.by(() => {
|
|
204
|
+
const charged = per ?? period;
|
|
205
|
+
return charged === 'once' ? ' once' : charged === 'annual' ? '/yr' : '/mo';
|
|
206
|
+
});
|
|
197
207
|
|
|
198
208
|
// The volume ladder drawn as a meter: the rungs that take something off,
|
|
199
209
|
// placed along the count of the last one.
|
|
@@ -318,7 +328,7 @@
|
|
|
318
328
|
>{plugin.name}</span
|
|
319
329
|
>
|
|
320
330
|
</span>
|
|
321
|
-
<span id="{id}-price" class="shrink-0
|
|
331
|
+
<span id="{id}-price" class="shrink-0 tabular-nums text-sm font-semibold text-fg">
|
|
322
332
|
{formatCents(plugin.price_cents, currency)}<span
|
|
323
333
|
class="text-xs font-normal text-muted">/mo</span
|
|
324
334
|
>
|
|
@@ -350,13 +360,12 @@
|
|
|
350
360
|
class="flex items-center justify-between gap-3 rounded-xl border border-brand bg-surface px-4 py-3 text-sm shadow-lg transition-colors hover:bg-surface-2"
|
|
351
361
|
>
|
|
352
362
|
<span class="text-fg">
|
|
353
|
-
<span class="font-semibold">{count}</span> picked{#if total !== null}<span
|
|
354
|
-
class="text-muted"
|
|
363
|
+
<span class="font-semibold">{count}</span> picked{#if total !== null}{' '}<span
|
|
364
|
+
class="text-muted">·</span
|
|
355
365
|
>
|
|
356
|
-
|
|
357
|
-
</span><span class="font-mono">{formatCents(total, currency)}{perLabel}</span>{/if}
|
|
366
|
+
<span class="tabular-nums">{formatCents(total, currency)}</span>{/if}
|
|
358
367
|
</span>
|
|
359
|
-
<span class="font-semibold text-brand">Review</span>
|
|
368
|
+
<span class="font-semibold text-brand">Review order</span>
|
|
360
369
|
</a>
|
|
361
370
|
</div>
|
|
362
371
|
{/if}
|
|
@@ -404,7 +413,7 @@
|
|
|
404
413
|
<li class="flex items-center justify-between gap-2 text-xs">
|
|
405
414
|
<span class="truncate text-fg">{p?.name ?? sku}</span>
|
|
406
415
|
<span class="flex items-center gap-1">
|
|
407
|
-
<span class="
|
|
416
|
+
<span class="tabular-nums text-muted"
|
|
408
417
|
>{formatCents(p?.price_cents ?? 0, currency)}</span
|
|
409
418
|
>
|
|
410
419
|
<Button
|
|
@@ -445,7 +454,7 @@
|
|
|
445
454
|
<div class="relative mt-2 h-4 text-[10px] text-muted">
|
|
446
455
|
{#each rungs as r (r.plugins)}
|
|
447
456
|
<span
|
|
448
|
-
class="absolute -translate-x-1/2 whitespace-nowrap
|
|
457
|
+
class="absolute -translate-x-1/2 whitespace-nowrap tabular-nums"
|
|
449
458
|
style:left="{Math.min((r.plugins / ladderTop) * 100, 92)}%"
|
|
450
459
|
>
|
|
451
460
|
{r.plugins}+ · {r.discount_pct}%
|
|
@@ -479,7 +488,7 @@
|
|
|
479
488
|
{:else}
|
|
480
489
|
<p class="flex items-baseline justify-between gap-2">
|
|
481
490
|
<span class="text-sm text-muted">Total</span>
|
|
482
|
-
<span class="
|
|
491
|
+
<span class="tabular-nums text-xl font-semibold text-fg">
|
|
483
492
|
{formatCents(total, currency)}<span class="text-sm font-normal text-muted"
|
|
484
493
|
>{perLabel}</span
|
|
485
494
|
>
|
|
@@ -20,6 +20,12 @@ interface Props {
|
|
|
20
20
|
/** The period that quote was priced for. A monthly quote says nothing about a year. */
|
|
21
21
|
quotePeriod?: BillingPeriod | null;
|
|
22
22
|
period?: BillingPeriod;
|
|
23
|
+
/**
|
|
24
|
+
* What the total is charged per, when it differs from `period`. A
|
|
25
|
+
* one-time payment is quoted monthly and charged once, so its host passes
|
|
26
|
+
* `'once'` and the total reads "$6.00 once" rather than "$6.00/mo".
|
|
27
|
+
*/
|
|
28
|
+
per?: BillingPeriod | 'once';
|
|
23
29
|
/** True while a fresh price is in flight. */
|
|
24
30
|
quoting?: boolean;
|
|
25
31
|
/** The count the bill will carry, when the host knows better than the cart. */
|
package/dist/index.d.ts
CHANGED
|
@@ -107,4 +107,4 @@ export { cn, type ClassValue } from './utils/cn.js';
|
|
|
107
107
|
export { getTheme, getThemePreference, nextThemePreference, resolveTheme, setTheme, setThemePreference, systemTheme, themeBootScript, watchThemePreference, toggleTheme, watchSystemTheme, THEME_PREFERENCES, type Theme, type ThemePreference, } from './utils/theme.js';
|
|
108
108
|
export * as motion from './motion.js';
|
|
109
109
|
export type { Rung as MotionRung, Curve as MotionCurve } from './motion.js';
|
|
110
|
-
export declare const VERSION = "0.42.
|
|
110
|
+
export declare const VERSION = "0.42.1";
|
package/dist/index.js
CHANGED
|
@@ -119,4 +119,4 @@ export * as motion from './motion.js';
|
|
|
119
119
|
// ── Version ────────────────────────────────────────────────────────────────
|
|
120
120
|
// Generated from package.json by `pnpm version:sync`. Bump package.json, never
|
|
121
121
|
// this line. The build and the test suite fail when the two disagree.
|
|
122
|
-
export const VERSION = '0.42.
|
|
122
|
+
export const VERSION = '0.42.1';
|
package/package.json
CHANGED