@sdxc/ui 2026.11.17 → 2026.11.22

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.
Files changed (238) hide show
  1. package/README.md +139 -2
  2. package/dist/app/index.d.ts +1 -0
  3. package/dist/app/index.js +1 -0
  4. package/dist/app/mixins/command-palette.js +10 -2
  5. package/dist/app/mixins/log-viewer.js +17 -14
  6. package/dist/app/mixins/route-dialog.d.ts +17 -0
  7. package/dist/app/mixins/route-dialog.js +53 -0
  8. package/dist/app/optimistic-toggle.js +6 -0
  9. package/dist/app/route-dialog.d.ts +38 -0
  10. package/dist/app/route-dialog.js +49 -0
  11. package/dist/audio/equalizer.d.ts +24 -0
  12. package/dist/audio/equalizer.js +57 -0
  13. package/dist/audio/index.d.ts +16 -0
  14. package/dist/audio/index.js +16 -0
  15. package/dist/audio/media-tile.d.ts +38 -0
  16. package/dist/audio/media-tile.js +98 -0
  17. package/dist/audio/player-bar.d.ts +108 -0
  18. package/dist/audio/player-bar.js +338 -0
  19. package/dist/audio/queue-list.d.ts +56 -0
  20. package/dist/audio/queue-list.js +102 -0
  21. package/dist/audio/track-list.d.ts +91 -0
  22. package/dist/audio/track-list.js +226 -0
  23. package/dist/audio/utils/media-session.d.ts +44 -0
  24. package/dist/audio/utils/media-session.js +87 -0
  25. package/dist/audio/utils/play-queue.d.ts +98 -0
  26. package/dist/audio/utils/play-queue.js +149 -0
  27. package/dist/audio/utils/track-time.d.ts +28 -0
  28. package/dist/audio/utils/track-time.js +36 -0
  29. package/dist/chat/composer-format.d.ts +35 -0
  30. package/dist/chat/composer-format.js +84 -0
  31. package/dist/chat/index.d.ts +6 -0
  32. package/dist/chat/index.js +6 -0
  33. package/dist/chat/mention-menu.d.ts +43 -0
  34. package/dist/chat/mention-menu.js +70 -0
  35. package/dist/chat/message-group.d.ts +92 -0
  36. package/dist/chat/message-group.js +222 -0
  37. package/dist/chat/mixins/composer-format.d.ts +28 -0
  38. package/dist/chat/mixins/composer-format.js +80 -0
  39. package/dist/chat/mixins/composer-send.d.ts +2 -2
  40. package/dist/chat/mixins/composer-send.js +4 -2
  41. package/dist/chat/mixins/mention-menu.d.ts +41 -0
  42. package/dist/chat/mixins/mention-menu.js +213 -0
  43. package/dist/chat/mixins/reaction-sync.d.ts +47 -0
  44. package/dist/chat/mixins/reaction-sync.js +172 -0
  45. package/dist/chat/reaction-bar.d.ts +70 -0
  46. package/dist/chat/reaction-bar.js +108 -0
  47. package/dist/chat/typing-indicator.d.ts +42 -0
  48. package/dist/chat/typing-indicator.js +68 -0
  49. package/dist/chat/utils/composer-text.d.ts +38 -0
  50. package/dist/chat/utils/composer-text.js +86 -0
  51. package/dist/chat/utils/markdown-format.d.ts +30 -0
  52. package/dist/chat/utils/markdown-format.js +158 -0
  53. package/dist/chat/utils/mention-query.d.ts +55 -0
  54. package/dist/chat/utils/mention-query.js +60 -0
  55. package/dist/commerce/cart-drawer.d.ts +69 -0
  56. package/dist/commerce/cart-drawer.js +163 -0
  57. package/dist/commerce/cart-line.d.ts +32 -0
  58. package/dist/commerce/cart-line.js +43 -0
  59. package/dist/commerce/checkout-layout.d.ts +32 -0
  60. package/dist/commerce/checkout-layout.js +51 -0
  61. package/dist/commerce/facet-filters.d.ts +121 -0
  62. package/dist/commerce/facet-filters.js +318 -0
  63. package/dist/commerce/fulfilment-note.d.ts +28 -0
  64. package/dist/commerce/fulfilment-note.js +26 -0
  65. package/dist/commerce/index.d.ts +27 -0
  66. package/dist/commerce/index.js +27 -0
  67. package/dist/commerce/item-options-dialog.d.ts +67 -0
  68. package/dist/commerce/item-options-dialog.js +150 -0
  69. package/dist/commerce/menu-item-card.d.ts +37 -0
  70. package/dist/commerce/menu-item-card.js +96 -0
  71. package/dist/commerce/option-group.d.ts +62 -0
  72. package/dist/commerce/option-group.js +121 -0
  73. package/dist/commerce/order-summary.d.ts +42 -0
  74. package/dist/commerce/order-summary.js +76 -0
  75. package/dist/commerce/order-tracker.d.ts +80 -0
  76. package/dist/commerce/order-tracker.js +178 -0
  77. package/dist/commerce/price.d.ts +52 -0
  78. package/dist/commerce/price.js +108 -0
  79. package/dist/commerce/product-card.d.ts +53 -0
  80. package/dist/commerce/product-card.js +127 -0
  81. package/dist/commerce/product-gallery.d.ts +70 -0
  82. package/dist/commerce/product-gallery.js +186 -0
  83. package/dist/commerce/promo-code.d.ts +56 -0
  84. package/dist/commerce/promo-code.js +101 -0
  85. package/dist/commerce/quantity-stepper.d.ts +42 -0
  86. package/dist/commerce/quantity-stepper.js +53 -0
  87. package/dist/commerce/question-list.d.ts +53 -0
  88. package/dist/commerce/question-list.js +92 -0
  89. package/dist/commerce/shipping-estimate.d.ts +53 -0
  90. package/dist/commerce/shipping-estimate.js +39 -0
  91. package/dist/commerce/sort-select.d.ts +38 -0
  92. package/dist/commerce/sort-select.js +38 -0
  93. package/dist/commerce/variant-picker.d.ts +75 -0
  94. package/dist/commerce/variant-picker.js +135 -0
  95. package/dist/components/amount.d.ts +46 -0
  96. package/dist/components/amount.js +34 -0
  97. package/dist/components/autocomplete.d.ts +82 -0
  98. package/dist/components/autocomplete.js +114 -0
  99. package/dist/components/carousel.d.ts +31 -1
  100. package/dist/components/carousel.js +66 -3
  101. package/dist/components/index.d.ts +11 -0
  102. package/dist/components/index.js +11 -0
  103. package/dist/components/letterbox.d.ts +47 -0
  104. package/dist/components/letterbox.js +56 -0
  105. package/dist/components/lightbox.d.ts +88 -0
  106. package/dist/components/lightbox.js +224 -0
  107. package/dist/components/media-grid.d.ts +53 -0
  108. package/dist/components/media-grid.js +89 -0
  109. package/dist/components/range-months.d.ts +100 -0
  110. package/dist/components/range-months.js +274 -0
  111. package/dist/components/rating-input.d.ts +33 -0
  112. package/dist/components/rating-input.js +63 -0
  113. package/dist/components/rating.d.ts +38 -0
  114. package/dist/components/rating.js +66 -0
  115. package/dist/components/review-card.d.ts +39 -0
  116. package/dist/components/review-card.js +59 -0
  117. package/dist/components/section-bar.d.ts +57 -0
  118. package/dist/components/section-bar.js +140 -0
  119. package/dist/components/step-indicator.d.ts +46 -0
  120. package/dist/components/step-indicator.js +96 -0
  121. package/dist/finance/index.d.ts +10 -0
  122. package/dist/finance/index.js +10 -0
  123. package/dist/finance/ledger.d.ts +60 -0
  124. package/dist/finance/ledger.js +93 -0
  125. package/dist/finance/payment-card.d.ts +49 -0
  126. package/dist/finance/payment-card.js +115 -0
  127. package/dist/map/engine.d.ts +49 -0
  128. package/dist/map/engine.js +591 -0
  129. package/dist/map/index.d.ts +12 -0
  130. package/dist/map/index.js +12 -0
  131. package/dist/map/map-canvas.d.ts +101 -0
  132. package/dist/map/map-canvas.js +275 -0
  133. package/dist/map/map.d.ts +217 -0
  134. package/dist/map/map.js +598 -0
  135. package/dist/map/mixins/map-link.d.ts +30 -0
  136. package/dist/map/mixins/map-link.js +116 -0
  137. package/dist/map/utils/basemap.d.ts +88 -0
  138. package/dist/map/utils/basemap.js +84 -0
  139. package/dist/map/utils/cluster.d.ts +43 -0
  140. package/dist/map/utils/cluster.js +80 -0
  141. package/dist/map/utils/mercator.d.ts +66 -0
  142. package/dist/map/utils/mercator.js +92 -0
  143. package/dist/map/utils/stage.d.ts +24 -0
  144. package/dist/map/utils/stage.js +49 -0
  145. package/dist/mixins/autocomplete.d.ts +28 -0
  146. package/dist/mixins/autocomplete.js +283 -0
  147. package/dist/mixins/carousel-controls.d.ts +14 -3
  148. package/dist/mixins/carousel-controls.js +89 -30
  149. package/dist/mixins/index.d.ts +2 -0
  150. package/dist/mixins/index.js +2 -0
  151. package/dist/mixins/lightbox-controls.d.ts +34 -0
  152. package/dist/mixins/lightbox-controls.js +176 -0
  153. package/dist/schedule/agenda.d.ts +63 -0
  154. package/dist/schedule/agenda.js +221 -0
  155. package/dist/schedule/day-strip.d.ts +50 -0
  156. package/dist/schedule/day-strip.js +136 -0
  157. package/dist/schedule/free-busy.d.ts +96 -0
  158. package/dist/schedule/free-busy.js +285 -0
  159. package/dist/schedule/index.d.ts +15 -0
  160. package/dist/schedule/index.js +15 -0
  161. package/dist/schedule/mixins/day-strip-scroll.d.ts +16 -0
  162. package/dist/schedule/mixins/day-strip-scroll.js +40 -0
  163. package/dist/schedule/mixins/time-grid-drag.d.ts +24 -0
  164. package/dist/schedule/mixins/time-grid-drag.js +532 -0
  165. package/dist/schedule/month-view.d.ts +68 -0
  166. package/dist/schedule/month-view.js +301 -0
  167. package/dist/schedule/time-grid.d.ts +168 -0
  168. package/dist/schedule/time-grid.js +417 -0
  169. package/dist/schedule/utils/time-grid-layout.d.ts +50 -0
  170. package/dist/schedule/utils/time-grid-layout.js +93 -0
  171. package/dist/schedule/year-view.d.ts +46 -0
  172. package/dist/schedule/year-view.js +142 -0
  173. package/dist/styles/index.d.ts +1 -0
  174. package/dist/styles/index.js +1 -0
  175. package/dist/styles/typewriter-text.d.ts +20 -0
  176. package/dist/styles/typewriter-text.js +23 -0
  177. package/dist/test/map.d.ts +18 -0
  178. package/dist/test/map.js +96 -0
  179. package/dist/test/reels.d.ts +30 -0
  180. package/dist/test/reels.js +41 -0
  181. package/dist/test/stories.d.ts +31 -0
  182. package/dist/test/stories.js +66 -0
  183. package/dist/travel/boarding-pass.d.ts +107 -0
  184. package/dist/travel/boarding-pass.js +293 -0
  185. package/dist/travel/car-offer.d.ts +70 -0
  186. package/dist/travel/car-offer.js +127 -0
  187. package/dist/travel/fare-calendar.d.ts +85 -0
  188. package/dist/travel/fare-calendar.js +233 -0
  189. package/dist/travel/fare-options.d.ts +84 -0
  190. package/dist/travel/fare-options.js +142 -0
  191. package/dist/travel/flight-itinerary.d.ts +84 -0
  192. package/dist/travel/flight-itinerary.js +112 -0
  193. package/dist/travel/flight-option.d.ts +58 -0
  194. package/dist/travel/flight-option.js +111 -0
  195. package/dist/travel/flight-segment.d.ts +105 -0
  196. package/dist/travel/flight-segment.js +174 -0
  197. package/dist/travel/index.d.ts +20 -0
  198. package/dist/travel/index.js +20 -0
  199. package/dist/travel/package-savings.d.ts +74 -0
  200. package/dist/travel/package-savings.js +128 -0
  201. package/dist/travel/price-breakdown.d.ts +66 -0
  202. package/dist/travel/price-breakdown.js +102 -0
  203. package/dist/travel/rating-breakdown.d.ts +81 -0
  204. package/dist/travel/rating-breakdown.js +132 -0
  205. package/dist/travel/seat-map.d.ts +108 -0
  206. package/dist/travel/seat-map.js +371 -0
  207. package/dist/travel/trip-timeline.d.ts +84 -0
  208. package/dist/travel/trip-timeline.js +212 -0
  209. package/dist/utils/gamepad-presses.d.ts +21 -0
  210. package/dist/utils/gamepad-presses.js +28 -0
  211. package/dist/utils/index.d.ts +5 -0
  212. package/dist/utils/index.js +5 -0
  213. package/dist/utils/move-focus.d.ts +20 -0
  214. package/dist/utils/move-focus.js +28 -0
  215. package/dist/utils/range-months.d.ts +54 -0
  216. package/dist/utils/range-months.js +98 -0
  217. package/dist/utils/swipe-direction.d.ts +23 -0
  218. package/dist/utils/swipe-direction.js +27 -0
  219. package/dist/utils/typewriter.d.ts +49 -0
  220. package/dist/utils/typewriter.js +171 -0
  221. package/dist/video/index.d.ts +6 -2
  222. package/dist/video/index.js +6 -2
  223. package/dist/video/mixins/reel-feed-sync.d.ts +41 -0
  224. package/dist/video/mixins/reel-feed-sync.js +430 -0
  225. package/dist/video/mixins/story-viewer-sync.d.ts +31 -0
  226. package/dist/video/mixins/story-viewer-sync.js +391 -0
  227. package/dist/video/mixins/video-player-sync.js +138 -5
  228. package/dist/video/reel-feed.d.ts +95 -0
  229. package/dist/video/reel-feed.js +124 -0
  230. package/dist/video/story-ring.d.ts +32 -0
  231. package/dist/video/story-ring.js +42 -0
  232. package/dist/video/story-viewer.d.ts +85 -0
  233. package/dist/video/story-viewer.js +250 -0
  234. package/dist/video/video-card.d.ts +3 -1
  235. package/dist/video/video-card.js +15 -5
  236. package/dist/video/video-player.d.ts +33 -0
  237. package/dist/video/video-player.js +226 -20
  238. 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
+ });
@@ -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;
@@ -0,0 +1,115 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
2
+ import { NfcIcon, SnowflakeIcon } from "@sdxc/icons";
3
+ import { visuallyHidden } from "@sdxc/u/a11y";
4
+ import { mergeMix, raw } from "@sdxc/u/general";
5
+ import { motionReduce } from "@sdxc/u/responsive";
6
+ import { when } from "@sdxc/u/state";
7
+ import { font, tabularNums, weight } from "@sdxc/u/typography";
8
+ /** The width-to-height ratio of a bank card (ISO/IEC 7810 ID-1, 85.60 × 53.98 mm). */
9
+ const CARD_RATIO = "85.6 / 53.98";
10
+ /** The gradient each tone paints, from the theme's own scales. */
11
+ const TONE_BACKGROUND = {
12
+ brand: "linear-gradient(135deg, var(--ui-color-brand-500, #c2410c), var(--ui-color-brand-800, #7c2d12))",
13
+ ink: "linear-gradient(135deg, var(--ui-color-neutral-800, #27272a), var(--ui-color-neutral-950, #09090b))",
14
+ neutral: "linear-gradient(135deg, var(--ui-color-neutral-200, #e4e4e7), var(--ui-color-neutral-400, #a1a1aa))",
15
+ };
16
+ /**
17
+ * Renders the card face. Sizes are in container units, so the same card fits a phone's
18
+ * carousel and a desktop column, and the masked number never wraps.
19
+ *
20
+ * @example <PaymentCard label="Everyday card ending 4821" brand="Tuppence" last4="4821" holder="Noor Halvorsen" expires="09/29" network="debit" />
21
+ * @example <PaymentCard label="Online card ending 0937" brand="Tuppence" last4="0937" holder="Noor Halvorsen" expires="03/27" network="debit" kind="virtual" tone="ink" frozen />
22
+ */
23
+ export function PaymentCard(handle) {
24
+ return () => {
25
+ let { label, brand, last4, holder, expires, network, kind = "physical", virtualLabel = "Virtual", tone = "brand", frozen = false, frozenLabel = "Frozen", expiresLabel = "Exp", mix, ...rest } = handle.props;
26
+ return (_jsxs("div", { role: "group", "aria-label": frozen ? `${label}, ${frozenLabel.toLowerCase()}` : label, ...rest, "data-slot": "payment-card", "data-tone": tone, "data-kind": kind, "data-frozen": frozen ? "" : undefined, mix: mergeMix([
27
+ raw({
28
+ containerType: "inline-size",
29
+ position: "relative",
30
+ isolation: "isolate",
31
+ inlineSize: "100%",
32
+ maxInlineSize: "var(--ui-payment-card-max, 26rem)",
33
+ aspectRatio: CARD_RATIO,
34
+ overflow: "hidden",
35
+ borderRadius: "var(--ui-payment-card-radius, 1rem)",
36
+ background: `var(--ui-payment-card-bg, ${TONE_BACKGROUND[tone]})`,
37
+ color: tone === "neutral" ? "var(--ui-color-neutral-900, #18181b)" : "white",
38
+ boxShadow: "0 1px 0 rgb(255 255 255 / 0.18) inset, 0 12px 28px -14px rgb(0 0 0 / 0.45)",
39
+ userSelect: "none",
40
+ }),
41
+ ], mix), children: [_jsx(CardPattern, {}), _jsxs("div", { "data-slot": "payment-card-face", mix: [
42
+ raw({
43
+ position: "absolute",
44
+ inset: "0",
45
+ display: "grid",
46
+ gridTemplateRows: "auto 1fr auto auto",
47
+ padding: "6.5cqi 7cqi",
48
+ gap: "2cqi",
49
+ transition: "filter 240ms ease",
50
+ }),
51
+ when("[data-frozen] > &", raw({ filter: "grayscale(0.85) blur(1.5px)", opacity: "0.75" })),
52
+ motionReduce(raw({ transition: "none" })),
53
+ ], children: [_jsxs("div", { mix: raw({
54
+ display: "flex",
55
+ alignItems: "center",
56
+ justifyContent: "space-between",
57
+ fontSize: "5cqi",
58
+ }), children: [_jsx("span", { "data-slot": "payment-card-brand", mix: weight("semibold"), children: brand }), kind === "virtual" ? (_jsx("span", { "data-slot": "payment-card-virtual", mix: raw({
59
+ fontSize: "3.4cqi",
60
+ paddingBlock: "0.6cqi",
61
+ paddingInline: "2.4cqi",
62
+ borderRadius: "999px",
63
+ border: "1px solid currentcolor",
64
+ opacity: "0.85",
65
+ letterSpacing: "0.06em",
66
+ textTransform: "uppercase",
67
+ }), children: virtualLabel })) : (_jsx(NfcIcon, { size: 20, "aria-hidden": "true", mix: raw({ inlineSize: "6cqi", blockSize: "6cqi", opacity: "0.8" }) }))] }), _jsx("div", { mix: raw({ alignSelf: "center" }), children: kind === "physical" ? _jsx(Chip, {}) : null }), _jsxs("div", { "data-slot": "payment-card-number", mix: [
68
+ font("mono"),
69
+ tabularNums(),
70
+ raw({ fontSize: "6.2cqi", letterSpacing: "0.08em", whiteSpace: "nowrap" }),
71
+ ], children: [_jsx("span", { "aria-hidden": "true", children: "\u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 " }), _jsx("span", { mix: visuallyHidden(), children: "ending " }), last4] }), _jsxs("div", { mix: raw({
72
+ display: "flex",
73
+ alignItems: "flex-end",
74
+ justifyContent: "space-between",
75
+ gap: "3cqi",
76
+ fontSize: "3.6cqi",
77
+ }), children: [_jsx("span", { "data-slot": "payment-card-holder", mix: raw({
78
+ textTransform: "uppercase",
79
+ letterSpacing: "0.08em",
80
+ overflow: "hidden",
81
+ textOverflow: "ellipsis",
82
+ whiteSpace: "nowrap",
83
+ }), children: holder }), _jsxs("span", { mix: raw({ display: "flex", alignItems: "baseline", gap: "4cqi", flex: "none" }), children: [_jsxs("span", { "data-slot": "payment-card-expires", mix: tabularNums(), children: [_jsx("span", { mix: raw({ opacity: "0.7", marginInlineEnd: "1.2cqi" }), children: expiresLabel }), expires] }), _jsx("span", { "data-slot": "payment-card-network", mix: [
84
+ weight("bold"),
85
+ raw({ fontSize: "5.4cqi", fontStyle: "italic", letterSpacing: "-0.01em" }),
86
+ ], children: network })] })] })] }), frozen ? (_jsxs("div", { "data-slot": "payment-card-frozen", mix: raw({
87
+ position: "absolute",
88
+ inset: "0",
89
+ display: "grid",
90
+ placeItems: "center",
91
+ alignContent: "center",
92
+ gap: "1.5cqi",
93
+ fontSize: "4.6cqi",
94
+ fontWeight: "600",
95
+ color: "white",
96
+ background: "linear-gradient(160deg, rgb(219 234 254 / 0.38), rgb(148 163 184 / 0.32))",
97
+ textShadow: "0 1px 2px rgb(0 0 0 / 0.35)",
98
+ }), children: [_jsx(SnowflakeIcon, { size: 28, "aria-hidden": "true", mix: raw({ inlineSize: "9cqi", blockSize: "9cqi" }) }), _jsx("span", { "aria-hidden": "true", children: frozenLabel })] })) : null] }));
99
+ };
100
+ }
101
+ /** The chip, drawn as a gold square with its contact lines, a third of the card's height. */
102
+ function Chip() {
103
+ return () => (_jsxs("svg", { viewBox: "0 0 40 30", "aria-hidden": "true", "data-slot": "payment-card-chip", mix: raw({ display: "block", inlineSize: "13cqi", blockSize: "auto" }), children: [_jsx("rect", { x: "0.5", y: "0.5", width: "39", height: "29", rx: "5", fill: "#e2c178" }), _jsx("path", { d: "M0 10 H13 M0 20 H13 M27 10 H40 M27 20 H40 M13 0 V30 M27 0 V30 M13 15 H27", stroke: "rgb(120 80 20 / 0.45)", "stroke-width": "1", fill: "none" })] }));
104
+ }
105
+ /** Wide concentric arcs at the far edge, a quiet guilloche that makes the face read as printed. */
106
+ function CardPattern() {
107
+ return () => (_jsx("svg", { viewBox: "0 0 160 100", preserveAspectRatio: "xMaxYMid slice", "aria-hidden": "true", mix: raw({
108
+ position: "absolute",
109
+ inset: "0",
110
+ inlineSize: "100%",
111
+ blockSize: "100%",
112
+ opacity: "0.16",
113
+ pointerEvents: "none",
114
+ }), children: [18, 30, 42, 54, 66, 78, 90].map((radius) => (_jsx("circle", { cx: "150", cy: "18", r: radius, fill: "none", stroke: "currentColor", "stroke-width": "0.6" }))) }));
115
+ }