@sdxc/ui 2026.11.18 → 2026.11.26
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/README.md +133 -1
- package/dist/app/index.d.ts +1 -0
- package/dist/app/index.js +1 -0
- package/dist/app/mixins/command-palette.js +10 -2
- package/dist/app/mixins/log-viewer.js +17 -14
- package/dist/app/mixins/route-dialog.d.ts +17 -0
- package/dist/app/mixins/route-dialog.js +53 -0
- package/dist/app/optimistic-toggle.js +6 -0
- package/dist/app/route-dialog.d.ts +38 -0
- package/dist/app/route-dialog.js +49 -0
- package/dist/audio/equalizer.d.ts +24 -0
- package/dist/audio/equalizer.js +57 -0
- package/dist/audio/index.d.ts +16 -0
- package/dist/audio/index.js +16 -0
- package/dist/audio/media-tile.d.ts +38 -0
- package/dist/audio/media-tile.js +98 -0
- package/dist/audio/player-bar.d.ts +108 -0
- package/dist/audio/player-bar.js +338 -0
- package/dist/audio/queue-list.d.ts +56 -0
- package/dist/audio/queue-list.js +102 -0
- package/dist/audio/track-list.d.ts +91 -0
- package/dist/audio/track-list.js +226 -0
- package/dist/audio/utils/media-session.d.ts +44 -0
- package/dist/audio/utils/media-session.js +87 -0
- package/dist/audio/utils/play-queue.d.ts +98 -0
- package/dist/audio/utils/play-queue.js +149 -0
- package/dist/audio/utils/track-time.d.ts +28 -0
- package/dist/audio/utils/track-time.js +36 -0
- package/dist/chat/composer-format.d.ts +35 -0
- package/dist/chat/composer-format.js +84 -0
- package/dist/chat/index.d.ts +6 -0
- package/dist/chat/index.js +6 -0
- package/dist/chat/mention-menu.d.ts +43 -0
- package/dist/chat/mention-menu.js +70 -0
- package/dist/chat/message-group.d.ts +92 -0
- package/dist/chat/message-group.js +222 -0
- package/dist/chat/mixins/composer-format.d.ts +28 -0
- package/dist/chat/mixins/composer-format.js +80 -0
- package/dist/chat/mixins/composer-send.d.ts +2 -2
- package/dist/chat/mixins/composer-send.js +4 -2
- package/dist/chat/mixins/mention-menu.d.ts +41 -0
- package/dist/chat/mixins/mention-menu.js +213 -0
- package/dist/chat/mixins/reaction-sync.d.ts +47 -0
- package/dist/chat/mixins/reaction-sync.js +172 -0
- package/dist/chat/reaction-bar.d.ts +70 -0
- package/dist/chat/reaction-bar.js +108 -0
- package/dist/chat/typing-indicator.d.ts +42 -0
- package/dist/chat/typing-indicator.js +68 -0
- package/dist/chat/utils/composer-text.d.ts +38 -0
- package/dist/chat/utils/composer-text.js +86 -0
- package/dist/chat/utils/markdown-format.d.ts +30 -0
- package/dist/chat/utils/markdown-format.js +158 -0
- package/dist/chat/utils/mention-query.d.ts +55 -0
- package/dist/chat/utils/mention-query.js +60 -0
- package/dist/commerce/cart-drawer.d.ts +69 -0
- package/dist/commerce/cart-drawer.js +163 -0
- package/dist/commerce/cart-line.d.ts +32 -0
- package/dist/commerce/cart-line.js +43 -0
- package/dist/commerce/checkout-layout.d.ts +32 -0
- package/dist/commerce/checkout-layout.js +51 -0
- package/dist/commerce/facet-filters.d.ts +121 -0
- package/dist/commerce/facet-filters.js +318 -0
- package/dist/commerce/fulfilment-note.d.ts +28 -0
- package/dist/commerce/fulfilment-note.js +26 -0
- package/dist/commerce/index.d.ts +27 -0
- package/dist/commerce/index.js +27 -0
- package/dist/commerce/item-options-dialog.d.ts +67 -0
- package/dist/commerce/item-options-dialog.js +150 -0
- package/dist/commerce/menu-item-card.d.ts +37 -0
- package/dist/commerce/menu-item-card.js +96 -0
- package/dist/commerce/option-group.d.ts +62 -0
- package/dist/commerce/option-group.js +121 -0
- package/dist/commerce/order-summary.d.ts +42 -0
- package/dist/commerce/order-summary.js +76 -0
- package/dist/commerce/order-tracker.d.ts +80 -0
- package/dist/commerce/order-tracker.js +178 -0
- package/dist/commerce/price.d.ts +52 -0
- package/dist/commerce/price.js +108 -0
- package/dist/commerce/product-card.d.ts +53 -0
- package/dist/commerce/product-card.js +127 -0
- package/dist/commerce/product-gallery.d.ts +70 -0
- package/dist/commerce/product-gallery.js +186 -0
- package/dist/commerce/promo-code.d.ts +56 -0
- package/dist/commerce/promo-code.js +101 -0
- package/dist/commerce/quantity-stepper.d.ts +42 -0
- package/dist/commerce/quantity-stepper.js +53 -0
- package/dist/commerce/question-list.d.ts +53 -0
- package/dist/commerce/question-list.js +92 -0
- package/dist/commerce/shipping-estimate.d.ts +53 -0
- package/dist/commerce/shipping-estimate.js +39 -0
- package/dist/commerce/sort-select.d.ts +38 -0
- package/dist/commerce/sort-select.js +38 -0
- package/dist/commerce/variant-picker.d.ts +75 -0
- package/dist/commerce/variant-picker.js +135 -0
- package/dist/components/amount.d.ts +46 -0
- package/dist/components/amount.js +34 -0
- package/dist/components/autocomplete.d.ts +82 -0
- package/dist/components/autocomplete.js +114 -0
- package/dist/components/carousel.d.ts +31 -1
- package/dist/components/carousel.js +66 -3
- package/dist/components/index.d.ts +11 -0
- package/dist/components/index.js +11 -0
- package/dist/components/letterbox.d.ts +47 -0
- package/dist/components/letterbox.js +56 -0
- package/dist/components/lightbox.d.ts +88 -0
- package/dist/components/lightbox.js +224 -0
- package/dist/components/media-grid.d.ts +53 -0
- package/dist/components/media-grid.js +89 -0
- package/dist/components/range-months.d.ts +100 -0
- package/dist/components/range-months.js +274 -0
- package/dist/components/rating-input.d.ts +33 -0
- package/dist/components/rating-input.js +63 -0
- package/dist/components/rating.d.ts +38 -0
- package/dist/components/rating.js +66 -0
- package/dist/components/review-card.d.ts +39 -0
- package/dist/components/review-card.js +59 -0
- package/dist/components/section-bar.d.ts +57 -0
- package/dist/components/section-bar.js +140 -0
- package/dist/components/slider.js +7 -0
- package/dist/components/step-indicator.d.ts +46 -0
- package/dist/components/step-indicator.js +96 -0
- package/dist/finance/index.d.ts +10 -0
- package/dist/finance/index.js +10 -0
- package/dist/finance/ledger.d.ts +60 -0
- package/dist/finance/ledger.js +93 -0
- package/dist/finance/payment-card.d.ts +49 -0
- package/dist/finance/payment-card.js +115 -0
- package/dist/map/engine.d.ts +49 -0
- package/dist/map/engine.js +591 -0
- package/dist/map/index.d.ts +12 -0
- package/dist/map/index.js +12 -0
- package/dist/map/map-canvas.d.ts +101 -0
- package/dist/map/map-canvas.js +275 -0
- package/dist/map/map.d.ts +217 -0
- package/dist/map/map.js +598 -0
- package/dist/map/mixins/map-link.d.ts +30 -0
- package/dist/map/mixins/map-link.js +116 -0
- package/dist/map/utils/basemap.d.ts +88 -0
- package/dist/map/utils/basemap.js +84 -0
- package/dist/map/utils/cluster.d.ts +43 -0
- package/dist/map/utils/cluster.js +80 -0
- package/dist/map/utils/mercator.d.ts +66 -0
- package/dist/map/utils/mercator.js +92 -0
- package/dist/map/utils/stage.d.ts +24 -0
- package/dist/map/utils/stage.js +49 -0
- package/dist/mixins/autocomplete.d.ts +28 -0
- package/dist/mixins/autocomplete.js +283 -0
- package/dist/mixins/carousel-controls.d.ts +14 -3
- package/dist/mixins/carousel-controls.js +89 -30
- package/dist/mixins/index.d.ts +2 -0
- package/dist/mixins/index.js +2 -0
- package/dist/mixins/lightbox-controls.d.ts +34 -0
- package/dist/mixins/lightbox-controls.js +176 -0
- package/dist/schedule/agenda.d.ts +63 -0
- package/dist/schedule/agenda.js +221 -0
- package/dist/schedule/day-strip.d.ts +50 -0
- package/dist/schedule/day-strip.js +136 -0
- package/dist/schedule/free-busy.d.ts +96 -0
- package/dist/schedule/free-busy.js +285 -0
- package/dist/schedule/index.d.ts +15 -0
- package/dist/schedule/index.js +15 -0
- package/dist/schedule/mixins/day-strip-scroll.d.ts +16 -0
- package/dist/schedule/mixins/day-strip-scroll.js +40 -0
- package/dist/schedule/mixins/time-grid-drag.d.ts +24 -0
- package/dist/schedule/mixins/time-grid-drag.js +532 -0
- package/dist/schedule/month-view.d.ts +68 -0
- package/dist/schedule/month-view.js +301 -0
- package/dist/schedule/time-grid.d.ts +168 -0
- package/dist/schedule/time-grid.js +417 -0
- package/dist/schedule/utils/time-grid-layout.d.ts +50 -0
- package/dist/schedule/utils/time-grid-layout.js +93 -0
- package/dist/schedule/year-view.d.ts +46 -0
- package/dist/schedule/year-view.js +142 -0
- package/dist/styles/index.d.ts +1 -0
- package/dist/styles/index.js +1 -0
- package/dist/styles/typewriter-text.d.ts +20 -0
- package/dist/styles/typewriter-text.js +23 -0
- package/dist/test/map.d.ts +18 -0
- package/dist/test/map.js +96 -0
- package/dist/test/reels.d.ts +30 -0
- package/dist/test/reels.js +41 -0
- package/dist/test/stories.d.ts +31 -0
- package/dist/test/stories.js +66 -0
- package/dist/travel/boarding-pass.d.ts +107 -0
- package/dist/travel/boarding-pass.js +293 -0
- package/dist/travel/car-offer.d.ts +70 -0
- package/dist/travel/car-offer.js +127 -0
- package/dist/travel/fare-calendar.d.ts +85 -0
- package/dist/travel/fare-calendar.js +233 -0
- package/dist/travel/fare-options.d.ts +84 -0
- package/dist/travel/fare-options.js +142 -0
- package/dist/travel/flight-itinerary.d.ts +84 -0
- package/dist/travel/flight-itinerary.js +112 -0
- package/dist/travel/flight-option.d.ts +58 -0
- package/dist/travel/flight-option.js +111 -0
- package/dist/travel/flight-segment.d.ts +105 -0
- package/dist/travel/flight-segment.js +174 -0
- package/dist/travel/index.d.ts +20 -0
- package/dist/travel/index.js +20 -0
- package/dist/travel/package-savings.d.ts +74 -0
- package/dist/travel/package-savings.js +128 -0
- package/dist/travel/price-breakdown.d.ts +66 -0
- package/dist/travel/price-breakdown.js +102 -0
- package/dist/travel/rating-breakdown.d.ts +81 -0
- package/dist/travel/rating-breakdown.js +132 -0
- package/dist/travel/seat-map.d.ts +108 -0
- package/dist/travel/seat-map.js +371 -0
- package/dist/travel/trip-timeline.d.ts +84 -0
- package/dist/travel/trip-timeline.js +212 -0
- package/dist/utils/gamepad-presses.d.ts +21 -0
- package/dist/utils/gamepad-presses.js +28 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/move-focus.d.ts +20 -0
- package/dist/utils/move-focus.js +28 -0
- package/dist/utils/range-months.d.ts +54 -0
- package/dist/utils/range-months.js +98 -0
- package/dist/utils/swipe-direction.d.ts +23 -0
- package/dist/utils/swipe-direction.js +27 -0
- package/dist/utils/typewriter.d.ts +49 -0
- package/dist/utils/typewriter.js +171 -0
- package/dist/video/index.d.ts +6 -2
- package/dist/video/index.js +6 -2
- package/dist/video/mixins/reel-feed-sync.d.ts +41 -0
- package/dist/video/mixins/reel-feed-sync.js +430 -0
- package/dist/video/mixins/story-viewer-sync.d.ts +31 -0
- package/dist/video/mixins/story-viewer-sync.js +391 -0
- package/dist/video/reel-feed.d.ts +95 -0
- package/dist/video/reel-feed.js +124 -0
- package/dist/video/story-ring.d.ts +32 -0
- package/dist/video/story-ring.js +42 -0
- package/dist/video/story-viewer.d.ts +85 -0
- package/dist/video/story-viewer.js +250 -0
- package/package.json +21 -2
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { mergeMix, raw } from "@sdxc/u/general";
|
|
3
|
+
import { motionReduce } from "@sdxc/u/responsive";
|
|
4
|
+
import { when } from "@sdxc/u/state";
|
|
5
|
+
import { clientEntry } from "remix/component";
|
|
6
|
+
/** The bar's own height, which a section's `scroll-margin-top` adds to the sticky offset. */
|
|
7
|
+
export const SECTION_BAR_BLOCK_SIZE = "3.25rem";
|
|
8
|
+
/**
|
|
9
|
+
* Renders the bar: a `<nav>` holding a sideways-scrolling row of chip links, the first one
|
|
10
|
+
* marked current until the island reads the scroll.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <SectionBar id="menu-bar" label="Menu categories" top="4rem" items={[{ id: "tacos", label: "Tacos", count: 3 }]} />
|
|
14
|
+
*/
|
|
15
|
+
export function SectionBar(handle) {
|
|
16
|
+
return () => {
|
|
17
|
+
let { id, label, items, top = "0px", mix, ...rest } = handle.props;
|
|
18
|
+
return (_jsxs("nav", { ...rest, id: id, "aria-label": label, "data-slot": "section-bar", mix: mergeMix([
|
|
19
|
+
raw({
|
|
20
|
+
position: "sticky",
|
|
21
|
+
insetBlockStart: top,
|
|
22
|
+
zIndex: "10",
|
|
23
|
+
blockSize: SECTION_BAR_BLOCK_SIZE,
|
|
24
|
+
display: "flex",
|
|
25
|
+
alignItems: "center",
|
|
26
|
+
backgroundColor: "color-mix(in oklch, var(--ui-bg, Canvas) 92%, transparent)",
|
|
27
|
+
backdropFilter: "blur(12px) saturate(1.3)",
|
|
28
|
+
WebkitBackdropFilter: "blur(12px) saturate(1.3)",
|
|
29
|
+
borderBlockEnd: "1px solid var(--ui-neutral-border)",
|
|
30
|
+
}),
|
|
31
|
+
], mix), children: [_jsx("ul", { "data-slot": "section-bar-row", mix: [
|
|
32
|
+
raw({
|
|
33
|
+
display: "flex",
|
|
34
|
+
gap: "0.375rem",
|
|
35
|
+
inlineSize: "100%",
|
|
36
|
+
margin: "0",
|
|
37
|
+
paddingBlock: "0.5rem",
|
|
38
|
+
paddingInline: "var(--ui-section-bar-inset, 1rem)",
|
|
39
|
+
listStyle: "none",
|
|
40
|
+
overflowX: "auto",
|
|
41
|
+
overscrollBehaviorInline: "contain",
|
|
42
|
+
scrollbarWidth: "none",
|
|
43
|
+
scrollPaddingInline: "var(--ui-section-bar-inset, 1rem)",
|
|
44
|
+
"&::-webkit-scrollbar": { display: "none" },
|
|
45
|
+
}),
|
|
46
|
+
], children: items.map((item, index) => (_jsx("li", { mix: [raw({ flexShrink: "0" })], children: _jsxs("a", { href: `#${item.id}`, "data-section": item.id, "aria-current": index === 0 ? "true" : undefined, mix: [
|
|
47
|
+
raw({
|
|
48
|
+
display: "inline-flex",
|
|
49
|
+
alignItems: "center",
|
|
50
|
+
gap: "0.375rem",
|
|
51
|
+
blockSize: "2.25rem",
|
|
52
|
+
paddingInline: "0.875rem",
|
|
53
|
+
borderRadius: "999px",
|
|
54
|
+
fontSize: "0.875rem",
|
|
55
|
+
fontWeight: "550",
|
|
56
|
+
whiteSpace: "nowrap",
|
|
57
|
+
color: "var(--ui-neutral-fg)",
|
|
58
|
+
textDecoration: "none",
|
|
59
|
+
transition: "background-color 160ms ease, color 160ms ease",
|
|
60
|
+
}),
|
|
61
|
+
when("&:hover", raw({
|
|
62
|
+
color: "var(--ui-neutral-fg-emphasis)",
|
|
63
|
+
backgroundColor: "var(--ui-neutral-bg-tint)",
|
|
64
|
+
})),
|
|
65
|
+
when("&[aria-current='true']", raw({
|
|
66
|
+
color: "var(--ui-neutral-fg-on-solid)",
|
|
67
|
+
backgroundColor: "var(--ui-neutral-bg-solid)",
|
|
68
|
+
})),
|
|
69
|
+
when("&:focus-visible", raw({ outline: "2px solid var(--ui-brand-ring)", outlineOffset: "2px" })),
|
|
70
|
+
motionReduce(raw({ transition: "none" })),
|
|
71
|
+
], children: [item.label, item.count === undefined ? null : (_jsx("span", { "data-slot": "section-bar-count", mix: [
|
|
72
|
+
raw({
|
|
73
|
+
fontVariantNumeric: "tabular-nums",
|
|
74
|
+
fontWeight: "500",
|
|
75
|
+
opacity: "0.65",
|
|
76
|
+
}),
|
|
77
|
+
], children: item.count }))] }) }))) }), _jsx(SectionBarSpy, { bar: id })] }));
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The island that follows the scroll: on each frame the page scrolls, the current section is
|
|
82
|
+
* the last one whose top has passed under the bar, and its chip is marked and scrolled into
|
|
83
|
+
* the row's view. A page scrolled to its end marks the last section, however short it is.
|
|
84
|
+
*/
|
|
85
|
+
export const SectionBarSpy = clientEntry("@sdxc/ui/section-bar#SectionBarSpy", function SectionBarSpy(handle) {
|
|
86
|
+
let pending = false;
|
|
87
|
+
let current = "";
|
|
88
|
+
/** Marks one chip current and brings it into the row's view. */
|
|
89
|
+
function mark(bar, links, id) {
|
|
90
|
+
if (id === current)
|
|
91
|
+
return;
|
|
92
|
+
current = id;
|
|
93
|
+
let row = bar.querySelector('[data-slot="section-bar-row"]');
|
|
94
|
+
for (let link of links) {
|
|
95
|
+
let on = link.dataset.section === id;
|
|
96
|
+
if (on)
|
|
97
|
+
link.setAttribute("aria-current", "true");
|
|
98
|
+
else
|
|
99
|
+
link.removeAttribute("aria-current");
|
|
100
|
+
if (on && row !== null) {
|
|
101
|
+
let left = link.offsetLeft - (row.clientWidth - link.offsetWidth) / 2;
|
|
102
|
+
let smooth = !matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
103
|
+
row.scrollTo({ left: Math.max(left, 0), behavior: smooth ? "smooth" : "instant" });
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/** Reads which section is under the bar now. */
|
|
108
|
+
function update(bar) {
|
|
109
|
+
pending = false;
|
|
110
|
+
let links = [...bar.querySelectorAll("a[data-section]")];
|
|
111
|
+
let line = bar.getBoundingClientRect().bottom + 8;
|
|
112
|
+
let found = links[0]?.dataset.section ?? "";
|
|
113
|
+
for (let link of links) {
|
|
114
|
+
let section = document.getElementById(link.dataset.section ?? "");
|
|
115
|
+
if (section !== null && section.getBoundingClientRect().top <= line) {
|
|
116
|
+
found = link.dataset.section ?? found;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
let atEnd = Math.ceil(window.scrollY + window.innerHeight) >= document.documentElement.scrollHeight - 2;
|
|
120
|
+
if (atEnd)
|
|
121
|
+
found = links.at(-1)?.dataset.section ?? found;
|
|
122
|
+
mark(bar, links, found);
|
|
123
|
+
}
|
|
124
|
+
handle.queueTask(() => {
|
|
125
|
+
let bar = document.getElementById(handle.props.bar);
|
|
126
|
+
if (bar === null || handle.signal.aborted)
|
|
127
|
+
return;
|
|
128
|
+
let target = bar;
|
|
129
|
+
let schedule = () => {
|
|
130
|
+
if (pending)
|
|
131
|
+
return;
|
|
132
|
+
pending = true;
|
|
133
|
+
requestAnimationFrame(() => update(target));
|
|
134
|
+
};
|
|
135
|
+
window.addEventListener("scroll", schedule, { passive: true, signal: handle.signal });
|
|
136
|
+
window.addEventListener("resize", schedule, { passive: true, signal: handle.signal });
|
|
137
|
+
update(target);
|
|
138
|
+
});
|
|
139
|
+
return () => _jsx("span", { hidden: true, "data-slot": "section-bar-spy" });
|
|
140
|
+
});
|
|
@@ -19,6 +19,12 @@ const DEFAULT_STEP = 1;
|
|
|
19
19
|
* already that thick keeps its own box.
|
|
20
20
|
*/
|
|
21
21
|
const THUMB_HIT_INSET = "min(0px, calc((100% - max(var(--ui-slider-thumb-size, 1.25rem), var(--ui-target-size, 1.5rem))) / 2))";
|
|
22
|
+
/**
|
|
23
|
+
* How far WebKit's thumb moves down its input to sit on the rail's centre line: WebKit draws it at
|
|
24
|
+
* the start of an input that {@link THUMB_HIT_INSET} grew past the thumb, so it takes half the
|
|
25
|
+
* growth as margin. Firefox centres its thumb on its own.
|
|
26
|
+
*/
|
|
27
|
+
const THUMB_CENTER_OFFSET = "calc((max(var(--ui-slider-thumb-size, 1.25rem), var(--ui-target-size, 1.5rem)) - var(--ui-slider-thumb-size, 1.25rem)) / 2)";
|
|
22
28
|
/**
|
|
23
29
|
* Renders the root `<div>`, stacking its children and resolving range, value, orientation
|
|
24
30
|
* and thumb id into context. Nested parts scope orientation rules to its `data-slot`, so an
|
|
@@ -164,6 +170,7 @@ Slider.Thumb = function SliderThumb(handle) {
|
|
|
164
170
|
when("&:disabled", cursor("not-allowed")),
|
|
165
171
|
outlineStyle("none"),
|
|
166
172
|
when("&::-webkit-slider-runnable-track", [appearance(), bs("100%"), bg("transparent")]),
|
|
173
|
+
when("&::-webkit-slider-thumb", raw({ marginBlockStart: THUMB_CENTER_OFFSET })),
|
|
167
174
|
when("&::-moz-range-track", [
|
|
168
175
|
appearance(),
|
|
169
176
|
bs("100%"),
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the reader is in a flow spread over several pages, such as payee, amount and review:
|
|
3
|
+
* a numbered row of steps joined by a line, done steps checked and linkable back, the current
|
|
4
|
+
* one marked for assistive tech. On a narrow screen only the current step keeps its name.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
/** Prop types for {@link StepIndicator} and {@link StepIndicator.Step}. */
|
|
11
|
+
export declare namespace StepIndicator {
|
|
12
|
+
/** Where a step stands: behind the reader, where they are, or still ahead. */
|
|
13
|
+
type State = "complete" | "current" | "upcoming";
|
|
14
|
+
/** Props accepted by {@link StepIndicator}. */
|
|
15
|
+
interface Props extends TagProps<"nav"> {
|
|
16
|
+
/** The landmark's name, such as "Transfer steps". */
|
|
17
|
+
label: string;
|
|
18
|
+
/** {@link StepIndicator.Step}s in order. */
|
|
19
|
+
children: RemixNode;
|
|
20
|
+
}
|
|
21
|
+
/** Props accepted by {@link StepIndicator.Step}. */
|
|
22
|
+
interface StepProps extends Omit<TagProps<"li">, "children"> {
|
|
23
|
+
/** The step's place in the flow, from 1. */
|
|
24
|
+
number: number;
|
|
25
|
+
state: State;
|
|
26
|
+
/** The address of a done step, so the reader can go back and change it. */
|
|
27
|
+
href?: string;
|
|
28
|
+
/** The step's name. */
|
|
29
|
+
children: RemixNode;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Renders the row of steps as an ordered list in a `nav` spanning its container, so a
|
|
34
|
+
* screen reader announces how many steps there are and which one is current.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* <StepIndicator label="Transfer steps">
|
|
38
|
+
* <StepIndicator.Step number={1} state="complete" href="/transfer">Payee</StepIndicator.Step>
|
|
39
|
+
* <StepIndicator.Step number={2} state="current">Amount</StepIndicator.Step>
|
|
40
|
+
* <StepIndicator.Step number={3} state="upcoming">Review</StepIndicator.Step>
|
|
41
|
+
* </StepIndicator>
|
|
42
|
+
*/
|
|
43
|
+
export declare function StepIndicator(handle: Handle<StepIndicator.Props>): () => import("remix/component").RemixElement;
|
|
44
|
+
export declare namespace StepIndicator {
|
|
45
|
+
var Step: (handle: Handle<StepIndicator.StepProps>) => () => import("remix/component").RemixElement;
|
|
46
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { CheckIcon } from "@sdxc/icons";
|
|
3
|
+
import { visuallyHidden } from "@sdxc/u/a11y";
|
|
4
|
+
import { mergeMix, raw } from "@sdxc/u/general";
|
|
5
|
+
import { atQuery } from "@sdxc/u/responsive";
|
|
6
|
+
import { when } from "@sdxc/u/state";
|
|
7
|
+
import { text, weight } from "@sdxc/u/typography";
|
|
8
|
+
/**
|
|
9
|
+
* Renders the row of steps as an ordered list in a `nav` spanning its container, so a
|
|
10
|
+
* screen reader announces how many steps there are and which one is current.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <StepIndicator label="Transfer steps">
|
|
14
|
+
* <StepIndicator.Step number={1} state="complete" href="/transfer">Payee</StepIndicator.Step>
|
|
15
|
+
* <StepIndicator.Step number={2} state="current">Amount</StepIndicator.Step>
|
|
16
|
+
* <StepIndicator.Step number={3} state="upcoming">Review</StepIndicator.Step>
|
|
17
|
+
* </StepIndicator>
|
|
18
|
+
*/
|
|
19
|
+
export function StepIndicator(handle) {
|
|
20
|
+
return () => {
|
|
21
|
+
let { label, children, mix, ...rest } = handle.props;
|
|
22
|
+
return (_jsx("nav", { "aria-label": label, ...rest, "data-slot": "step-indicator", mix: mergeMix([raw({ containerType: "inline-size" })], mix), children: _jsx("ol", { mix: raw({
|
|
23
|
+
listStyle: "none",
|
|
24
|
+
margin: "0",
|
|
25
|
+
padding: "0",
|
|
26
|
+
display: "flex",
|
|
27
|
+
alignItems: "center",
|
|
28
|
+
gap: "0.5rem",
|
|
29
|
+
}), children: children }) }));
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Renders one step: its number (a check once done) in a circle, then its name, with a line
|
|
34
|
+
* leading in from the step before. A done step with `href` is a link back to it.
|
|
35
|
+
*/
|
|
36
|
+
StepIndicator.Step = function StepIndicatorStep(handle) {
|
|
37
|
+
return () => {
|
|
38
|
+
let { number, state, href, children, mix, ...rest } = handle.props;
|
|
39
|
+
let marker = (_jsx("span", { "data-slot": "step-indicator-marker", "aria-hidden": "true", mix: raw({
|
|
40
|
+
display: "grid",
|
|
41
|
+
placeItems: "center",
|
|
42
|
+
flex: "none",
|
|
43
|
+
inlineSize: "1.5rem",
|
|
44
|
+
blockSize: "1.5rem",
|
|
45
|
+
borderRadius: "999px",
|
|
46
|
+
fontSize: "0.75rem",
|
|
47
|
+
fontWeight: "600",
|
|
48
|
+
border: "1.5px solid currentcolor",
|
|
49
|
+
}), children: state === "complete" ? _jsx(CheckIcon, { size: 14, strokeWidth: 3 }) : number }));
|
|
50
|
+
let name = (_jsx("span", { "data-slot": "step-indicator-label", mix: [
|
|
51
|
+
text("sm"),
|
|
52
|
+
raw({ whiteSpace: "nowrap" }),
|
|
53
|
+
when("[data-state='current'] &", weight("semibold")),
|
|
54
|
+
], children: children }));
|
|
55
|
+
let content = (_jsxs(_Fragment, { children: [marker, name] }));
|
|
56
|
+
return (_jsx("li", { ...rest, "data-slot": "step-indicator-step", "data-state": state, "aria-current": state === "current" ? "step" : undefined, mix: mergeMix([
|
|
57
|
+
raw({
|
|
58
|
+
display: "flex",
|
|
59
|
+
alignItems: "center",
|
|
60
|
+
gap: "0.5rem",
|
|
61
|
+
color: "var(--ui-neutral-fg-muted, GrayText)",
|
|
62
|
+
}),
|
|
63
|
+
/**
|
|
64
|
+
* Every step after the first grows to share the row, and a line leads into it that
|
|
65
|
+
* stretches across the gap; the line fills in the brand colour once the reader has
|
|
66
|
+
* reached that step, so the row reads as how far along the flow they are.
|
|
67
|
+
*/
|
|
68
|
+
when("&:not(:first-child)", raw({ flex: "1 1 0", minInlineSize: "0" })),
|
|
69
|
+
when("&:not(:first-child)::before", raw({
|
|
70
|
+
content: "''",
|
|
71
|
+
display: "block",
|
|
72
|
+
flex: "1 1 auto",
|
|
73
|
+
minInlineSize: "0.75rem",
|
|
74
|
+
blockSize: "2px",
|
|
75
|
+
borderRadius: "1px",
|
|
76
|
+
backgroundColor: "var(--ui-neutral-border, GrayText)",
|
|
77
|
+
})),
|
|
78
|
+
when("&[data-state='complete']::before, &[data-state='current']::before", raw({ backgroundColor: "var(--ui-brand-bg-solid, LinkText)" })),
|
|
79
|
+
when("&[data-state='complete'], &[data-state='current']", raw({ color: "var(--ui-brand-fg, LinkText)" })),
|
|
80
|
+
when("&[data-state='complete'] [data-slot='step-indicator-marker'], &[data-state='current'] [data-slot='step-indicator-marker']", raw({
|
|
81
|
+
backgroundColor: "var(--ui-brand-bg-solid, LinkText)",
|
|
82
|
+
borderColor: "var(--ui-brand-bg-solid, LinkText)",
|
|
83
|
+
color: "var(--ui-brand-fg-on-solid, white)",
|
|
84
|
+
})),
|
|
85
|
+
when("&[data-state='current']", raw({ color: "var(--ui-fg, CanvasText)" })),
|
|
86
|
+
/** Under 24rem a non-current step keeps only its numbered circle. */
|
|
87
|
+
atQuery("(max-width: 24rem)", when("&:not([data-state='current']) [data-slot='step-indicator-label']", visuallyHidden())),
|
|
88
|
+
], mix), children: href !== undefined && state === "complete" ? (_jsx("a", { href: href, mix: raw({
|
|
89
|
+
display: "inline-flex",
|
|
90
|
+
alignItems: "center",
|
|
91
|
+
gap: "0.5rem",
|
|
92
|
+
color: "inherit",
|
|
93
|
+
textDecorationLine: "none",
|
|
94
|
+
}), children: content })) : (content) }));
|
|
95
|
+
};
|
|
96
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Barrel for `@sdxc/ui/finance`: the pieces a banking, budgeting or wallet app is built
|
|
3
|
+
* from, such as a statement grouped by day and a drawn payment card. Each module also
|
|
4
|
+
* imports on its own, as `@sdxc/ui/finance/ledger`.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
export * from "./ledger.js";
|
|
10
|
+
export * from "./payment-card.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Barrel for `@sdxc/ui/finance`: the pieces a banking, budgeting or wallet app is built
|
|
3
|
+
* from, such as a statement grouped by day and a drawn payment card. Each module also
|
|
4
|
+
* imports on its own, as `@sdxc/ui/finance/ledger`.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
export * from "./ledger.js";
|
|
10
|
+
export * from "./payment-card.js";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A statement of money movements grouped by day: each day a heading with its net total,
|
|
3
|
+
* each entry a row of mark, name, detail and amount that may link to its record. The day
|
|
4
|
+
* headings stick while their rows scroll, so a long list keeps saying which day it shows.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
/** Prop types for {@link Ledger} and its parts. */
|
|
11
|
+
export declare namespace Ledger {
|
|
12
|
+
/** Props accepted by {@link Ledger}. */
|
|
13
|
+
interface Props extends TagProps<"div"> {
|
|
14
|
+
/** {@link Ledger.Day} groups, newest first. */
|
|
15
|
+
children: RemixNode;
|
|
16
|
+
}
|
|
17
|
+
/** Props accepted by {@link Ledger.Day}. */
|
|
18
|
+
interface DayProps extends Omit<TagProps<"section">, "title"> {
|
|
19
|
+
/** The day's heading as the reader says it: "Today", "Yesterday", "Mon 16 Nov". */
|
|
20
|
+
title: RemixNode;
|
|
21
|
+
/** The day's net movement, usually an `Amount`; omitted on a day of one entry. */
|
|
22
|
+
total?: RemixNode;
|
|
23
|
+
/** {@link Ledger.Entry} rows, newest first. */
|
|
24
|
+
children: RemixNode;
|
|
25
|
+
}
|
|
26
|
+
/** Props accepted by {@link Ledger.Entry}. */
|
|
27
|
+
interface EntryProps extends Omit<TagProps<"li">, "title"> {
|
|
28
|
+
/** The merchant or person: a logo, an `Avatar` or an icon tile, about 2.5rem square. */
|
|
29
|
+
mark?: RemixNode;
|
|
30
|
+
/** Who the money went to or came from. */
|
|
31
|
+
title: RemixNode;
|
|
32
|
+
/** A quiet second line: the category, the account, a time or "Pending". */
|
|
33
|
+
meta?: RemixNode;
|
|
34
|
+
/** The amount, usually an `Amount` with `sign="ledger"`. */
|
|
35
|
+
amount: RemixNode;
|
|
36
|
+
/** A quiet line under the amount: the original currency, a split share, a note mark. */
|
|
37
|
+
amountMeta?: RemixNode;
|
|
38
|
+
/** The record's address; the whole row becomes one link to it. */
|
|
39
|
+
href?: string;
|
|
40
|
+
/** Marks the row whose record is open beside the list. */
|
|
41
|
+
current?: boolean;
|
|
42
|
+
/** Draws the row muted, for a pending or declined movement. */
|
|
43
|
+
muted?: boolean;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Renders the statement as a column of day groups.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* <Ledger>
|
|
51
|
+
* <Ledger.Day title="Today" total={<Amount value={-2340} currency="EUR" />}>
|
|
52
|
+
* <Ledger.Entry mark={<Avatar … />} title="Mercado Rua" meta="Groceries" amount={<Amount value={-2340} currency="EUR" sign="ledger" />} href="?tx=4" />
|
|
53
|
+
* </Ledger.Day>
|
|
54
|
+
* </Ledger>
|
|
55
|
+
*/
|
|
56
|
+
export declare function Ledger(handle: Handle<Ledger.Props>): () => import("remix/component").RemixElement;
|
|
57
|
+
export declare namespace Ledger {
|
|
58
|
+
var Day: (handle: Handle<Ledger.DayProps>) => () => import("remix/component").RemixElement;
|
|
59
|
+
var Entry: (handle: Handle<Ledger.EntryProps>) => () => import("remix/component").RemixElement;
|
|
60
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "remix/component/jsx-runtime";
|
|
2
|
+
import { bg, fg } from "@sdxc/u/color";
|
|
3
|
+
import { mergeMix, raw } from "@sdxc/u/general";
|
|
4
|
+
import { focusVisible, hover, when } from "@sdxc/u/state";
|
|
5
|
+
import { leading, text, truncate, weight } from "@sdxc/u/typography";
|
|
6
|
+
import { resolveHeadingLevel, TAG_BY_LEVEL } from "../components/heading-scope.js";
|
|
7
|
+
/**
|
|
8
|
+
* Renders the statement as a column of day groups.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <Ledger>
|
|
12
|
+
* <Ledger.Day title="Today" total={<Amount value={-2340} currency="EUR" />}>
|
|
13
|
+
* <Ledger.Entry mark={<Avatar … />} title="Mercado Rua" meta="Groceries" amount={<Amount value={-2340} currency="EUR" sign="ledger" />} href="?tx=4" />
|
|
14
|
+
* </Ledger.Day>
|
|
15
|
+
* </Ledger>
|
|
16
|
+
*/
|
|
17
|
+
export function Ledger(handle) {
|
|
18
|
+
return () => {
|
|
19
|
+
let { children, mix, ...rest } = handle.props;
|
|
20
|
+
return (_jsx("div", { ...rest, "data-slot": "ledger", mix: mergeMix([raw({ display: "flex", flexDirection: "column", gap: "1.25rem" })], mix), children: children }));
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Renders one day: a sticky heading row with the day's total at its end, over its entries.
|
|
25
|
+
* The heading paints `--ui-ledger-bg` (the page's background by default) and sticks at
|
|
26
|
+
* `--ui-ledger-sticky-top`, so it reads over the rows passing under it.
|
|
27
|
+
*/
|
|
28
|
+
Ledger.Day = function LedgerDay(handle) {
|
|
29
|
+
return () => {
|
|
30
|
+
let { title, total, children, mix, ...rest } = handle.props;
|
|
31
|
+
let Tag = TAG_BY_LEVEL[resolveHeadingLevel(handle)];
|
|
32
|
+
return (_jsxs("section", { ...rest, "data-slot": "ledger-day", mix: mergeMix([], mix), children: [_jsxs("div", { "data-slot": "ledger-day-header", mix: [
|
|
33
|
+
raw({
|
|
34
|
+
position: "sticky",
|
|
35
|
+
insetBlockStart: "var(--ui-ledger-sticky-top, 0px)",
|
|
36
|
+
zIndex: "1",
|
|
37
|
+
display: "flex",
|
|
38
|
+
alignItems: "baseline",
|
|
39
|
+
justifyContent: "space-between",
|
|
40
|
+
gap: "1rem",
|
|
41
|
+
paddingBlock: "0.5rem",
|
|
42
|
+
paddingInline: "var(--ui-ledger-inset, 0.75rem)",
|
|
43
|
+
backgroundColor: "var(--ui-ledger-bg, var(--ui-bg, Canvas))",
|
|
44
|
+
}),
|
|
45
|
+
text("xs"),
|
|
46
|
+
fg("neutral.muted"),
|
|
47
|
+
], children: [_jsx(Tag, { mix: [raw({ fontSize: "inherit", margin: "0" }), weight("semibold")], children: title }), total === undefined ? null : _jsx("span", { "data-slot": "ledger-day-total", children: total })] }), _jsx("ul", { "data-slot": "ledger-entries", mix: raw({
|
|
48
|
+
listStyle: "none",
|
|
49
|
+
margin: "0",
|
|
50
|
+
padding: "0",
|
|
51
|
+
display: "flex",
|
|
52
|
+
flexDirection: "column",
|
|
53
|
+
}), children: children })] }));
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Renders one movement. With `href` the row is a single link covering mark, name and amount,
|
|
58
|
+
* so a tap anywhere opens it; the name truncates before the amount ever does.
|
|
59
|
+
*/
|
|
60
|
+
Ledger.Entry = function LedgerEntry(handle) {
|
|
61
|
+
return () => {
|
|
62
|
+
let { mark, title, meta, amount, amountMeta, href, current, muted, mix, ...rest } = handle.props;
|
|
63
|
+
let body = (_jsxs(_Fragment, { children: [mark === undefined ? null : (_jsx("span", { "data-slot": "ledger-mark", mix: raw({ display: "grid", placeItems: "center", flex: "none" }), children: mark })), _jsxs("span", { mix: raw({ display: "flex", flexDirection: "column", minInlineSize: "0", flex: "1" }), children: [_jsx("span", { "data-slot": "ledger-title", mix: [truncate(), weight("medium"), leading("snug")], children: title }), meta === undefined ? null : (_jsx("span", { "data-slot": "ledger-meta", mix: [truncate(), text("xs"), fg("neutral.muted"), leading("snug")], children: meta }))] }), _jsxs("span", { mix: raw({
|
|
64
|
+
display: "flex",
|
|
65
|
+
flexDirection: "column",
|
|
66
|
+
alignItems: "flex-end",
|
|
67
|
+
flex: "none",
|
|
68
|
+
textAlign: "end",
|
|
69
|
+
}), children: [_jsx("span", { "data-slot": "ledger-amount", mix: [weight("medium"), leading("snug")], children: amount }), amountMeta === undefined ? null : (_jsx("span", { "data-slot": "ledger-amount-meta", mix: [text("xs"), fg("neutral.muted"), leading("snug")], children: amountMeta }))] })] }));
|
|
70
|
+
let row = [
|
|
71
|
+
raw({
|
|
72
|
+
display: "flex",
|
|
73
|
+
alignItems: "center",
|
|
74
|
+
gap: "0.75rem",
|
|
75
|
+
minBlockSize: "3.5rem",
|
|
76
|
+
paddingBlock: "0.5rem",
|
|
77
|
+
paddingInline: "var(--ui-ledger-inset, 0.75rem)",
|
|
78
|
+
borderRadius: "var(--ui-radius-lg, 0.75rem)",
|
|
79
|
+
color: "inherit",
|
|
80
|
+
textDecoration: "none",
|
|
81
|
+
outlineOffset: "-2px",
|
|
82
|
+
}),
|
|
83
|
+
];
|
|
84
|
+
return (_jsx("li", { ...rest, "data-slot": "ledger-entry", "data-current": current ? "" : undefined, "data-muted": muted ? "" : undefined, mix: mergeMix([
|
|
85
|
+
when("&[data-muted]", raw({ opacity: "0.6" })),
|
|
86
|
+
when("&[data-current] > *", bg("brand.tint")),
|
|
87
|
+
], mix), children: href === undefined ? (_jsx("div", { mix: row, children: body })) : (_jsx("a", { href: href, "aria-current": current ? "true" : undefined, mix: [
|
|
88
|
+
row,
|
|
89
|
+
hover(bg("neutral.bg-tint-hover")),
|
|
90
|
+
focusVisible(raw({ outline: "2px solid var(--ui-brand-bg-solid, Highlight)" })),
|
|
91
|
+
], children: body })) }));
|
|
92
|
+
};
|
|
93
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A drawn payment card face: the issuer's mark, a chip or a "Virtual" tag, the masked
|
|
3
|
+
* number, holder, expiry and network word, at the ID-1 card ratio. Its type scales with
|
|
4
|
+
* its width, and a frozen card frosts over with a label, so the state reads at a glance.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
/** Prop types for {@link PaymentCard}. */
|
|
11
|
+
export declare namespace PaymentCard {
|
|
12
|
+
/** The face's paint: the brand scale, near-black ink, or a light neutral metal. */
|
|
13
|
+
type Tone = "brand" | "ink" | "neutral";
|
|
14
|
+
/** Props accepted by {@link PaymentCard}. */
|
|
15
|
+
interface Props extends Omit<TagProps<"div">, "children"> {
|
|
16
|
+
/** The card's accessible name, such as "Everyday debit card ending 4821". */
|
|
17
|
+
label: string;
|
|
18
|
+
/** The issuer's mark or name, top left. */
|
|
19
|
+
brand: RemixNode;
|
|
20
|
+
/** The last four digits; the rest of the number is drawn as dots and never passed. */
|
|
21
|
+
last4: string;
|
|
22
|
+
/** The cardholder's name as printed. */
|
|
23
|
+
holder: string;
|
|
24
|
+
/** The expiry as printed, `MM/YY`. */
|
|
25
|
+
expires: string;
|
|
26
|
+
/** The network or product word, bottom right, such as "debit". */
|
|
27
|
+
network: string;
|
|
28
|
+
/** `virtual` swaps the chip for a "Virtual" tag. @default "physical" */
|
|
29
|
+
kind?: "physical" | "virtual";
|
|
30
|
+
/** The tag a virtual card shows. @default "Virtual" */
|
|
31
|
+
virtualLabel?: string;
|
|
32
|
+
/** @default "brand" */
|
|
33
|
+
tone?: Tone;
|
|
34
|
+
/** Frosts the face and shows {@link frozenLabel}. @default false */
|
|
35
|
+
frozen?: boolean;
|
|
36
|
+
/** @default "Frozen" */
|
|
37
|
+
frozenLabel?: string;
|
|
38
|
+
/** The printed label before the expiry. @default "Exp" */
|
|
39
|
+
expiresLabel?: string;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Renders the card face. Sizes are in container units, so the same card fits a phone's
|
|
44
|
+
* carousel and a desktop column, and the masked number never wraps.
|
|
45
|
+
*
|
|
46
|
+
* @example <PaymentCard label="Everyday card ending 4821" brand="Tuppence" last4="4821" holder="Noor Halvorsen" expires="09/29" network="debit" />
|
|
47
|
+
* @example <PaymentCard label="Online card ending 0937" brand="Tuppence" last4="0937" holder="Noor Halvorsen" expires="03/27" network="debit" kind="virtual" tone="ink" frozen />
|
|
48
|
+
*/
|
|
49
|
+
export declare function PaymentCard(handle: Handle<PaymentCard.Props>): () => import("remix/component").RemixElement;
|