@krizaka/ui 3.68.0 → 3.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/README.md +1 -0
  2. package/dist/chunk-E4FMPPDL.js +134 -0
  3. package/dist/chunk-E4FMPPDL.js.map +1 -0
  4. package/dist/{chunk-E4X3V7QX.js → chunk-GRVIZTT2.js} +2 -2
  5. package/dist/{chunk-PFPOBIHL.js → chunk-T5NZSKWT.js} +15 -12
  6. package/dist/{chunk-PFPOBIHL.js.map → chunk-T5NZSKWT.js.map} +1 -1
  7. package/dist/data-table.js +3 -3
  8. package/dist/filter-bar.js +1 -1
  9. package/dist/genui.js +3 -3
  10. package/dist/lightbox-D5NAHFEA.js +95 -0
  11. package/dist/lightbox-D5NAHFEA.js.map +1 -0
  12. package/dist/match-dialog.js +17 -140
  13. package/dist/match-dialog.js.map +1 -1
  14. package/dist/shop/booking.d.ts +22 -3
  15. package/dist/shop/booking.js +33 -1
  16. package/dist/shop/booking.js.map +1 -1
  17. package/dist/shop-composer.d.ts +1 -1
  18. package/dist/shop-composer.js +109 -85
  19. package/dist/shop-composer.js.map +1 -1
  20. package/dist/shop-gallery.d.ts +47 -0
  21. package/dist/shop-gallery.js +121 -0
  22. package/dist/shop-gallery.js.map +1 -0
  23. package/dist/shop.d.ts +1 -1
  24. package/dist/shop.js +1 -1
  25. package/dist/shop.js.map +1 -1
  26. package/dist/tag-selector.js +5 -5
  27. package/dist/tag-selector.js.map +1 -1
  28. package/package.json +19 -4
  29. package/registry/account-menu.json +1 -1
  30. package/registry/account-settings.json +1 -1
  31. package/registry/achievement.json +1 -1
  32. package/registry/action-bar.json +1 -1
  33. package/registry/activity-feed.json +1 -1
  34. package/registry/agenda.json +1 -1
  35. package/registry/alert.json +1 -1
  36. package/registry/analysis-report.json +1 -1
  37. package/registry/anatomy-plate.json +1 -1
  38. package/registry/app-frame.json +2 -2
  39. package/registry/app-header.json +1 -1
  40. package/registry/app-shell.json +1 -1
  41. package/registry/argument-card.json +1 -1
  42. package/registry/audio-player.json +1 -1
  43. package/registry/auth-layout.json +1 -1
  44. package/registry/avatar.json +1 -1
  45. package/registry/badge.json +1 -1
  46. package/registry/bird-plate.json +1 -1
  47. package/registry/button.json +1 -1
  48. package/registry/captcha.json +1 -1
  49. package/registry/card-grid.json +1 -1
  50. package/registry/card.json +1 -1
  51. package/registry/catalogue-page.json +1 -1
  52. package/registry/changelog-page.json +1 -1
  53. package/registry/chapter.json +1 -1
  54. package/registry/chat.json +1 -1
  55. package/registry/checkbox.json +1 -1
  56. package/registry/chip-link.json +1 -1
  57. package/registry/chip-row.json +1 -1
  58. package/registry/chip.json +1 -1
  59. package/registry/choice-grid.json +1 -1
  60. package/registry/code-block.json +1 -1
  61. package/registry/collection-switcher.json +1 -1
  62. package/registry/combobox.json +1 -1
  63. package/registry/command.json +1 -1
  64. package/registry/comparison-table.json +1 -1
  65. package/registry/component-page.json +1 -1
  66. package/registry/confirm-button.json +1 -1
  67. package/registry/contact-page.json +1 -1
  68. package/registry/continue-prompt.json +1 -1
  69. package/registry/copy-button.json +1 -1
  70. package/registry/countdown.json +1 -1
  71. package/registry/cover-hero.json +1 -1
  72. package/registry/cta-panel.json +1 -1
  73. package/registry/dashboard-layout.json +1 -1
  74. package/registry/data-table.json +1 -1
  75. package/registry/date-picker.json +1 -1
  76. package/registry/decision-list.json +1 -1
  77. package/registry/description-list.json +1 -1
  78. package/registry/desktop-window.json +1 -1
  79. package/registry/detail-layout.json +1 -1
  80. package/registry/dialog.json +1 -1
  81. package/registry/docs-article-page.json +1 -1
  82. package/registry/docs-hub-page.json +1 -1
  83. package/registry/docs-layout.json +1 -1
  84. package/registry/docs-nav.json +1 -1
  85. package/registry/document-viewer.json +1 -1
  86. package/registry/doodle.json +1 -1
  87. package/registry/drop-overlay.json +1 -1
  88. package/registry/dropdown-menu.json +1 -1
  89. package/registry/elephant.json +2 -2
  90. package/registry/embed-facade.json +1 -1
  91. package/registry/empty-state.json +1 -1
  92. package/registry/engine-flow.json +1 -1
  93. package/registry/entity-header.json +1 -1
  94. package/registry/environment-notice.json +1 -1
  95. package/registry/error-page.json +1 -1
  96. package/registry/examples/shop/booking-closing-closed.d.ts +4 -0
  97. package/registry/examples/shop/booking-closing-closed.js +26 -0
  98. package/registry/examples/shop/booking-closing-closed.tsx +22 -0
  99. package/registry/examples/shop/booking-closing-mark.d.ts +4 -0
  100. package/registry/examples/shop/booking-closing-mark.js +13 -0
  101. package/registry/examples/shop/booking-closing-mark.tsx +12 -0
  102. package/registry/examples/shop/booking-closing.d.ts +4 -0
  103. package/registry/examples/shop/booking-closing.js +27 -0
  104. package/registry/examples/shop/booking-closing.tsx +23 -0
  105. package/registry/examples/shop-gallery/five.d.ts +4 -0
  106. package/registry/examples/shop-gallery/five.js +14 -0
  107. package/registry/examples/shop-gallery/five.tsx +10 -0
  108. package/registry/examples/shop-gallery/three.d.ts +4 -0
  109. package/registry/examples/shop-gallery/three.js +14 -0
  110. package/registry/examples/shop-gallery/three.tsx +10 -0
  111. package/registry/examples/shop-gallery/twelve.d.ts +4 -0
  112. package/registry/examples/shop-gallery/twelve.js +14 -0
  113. package/registry/examples/shop-gallery/twelve.tsx +10 -0
  114. package/registry/field.json +1 -1
  115. package/registry/file-upload.json +1 -1
  116. package/registry/filter-bar.json +2 -2
  117. package/registry/flock.json +1 -1
  118. package/registry/footnote.json +1 -1
  119. package/registry/force-update-screen.json +1 -1
  120. package/registry/form.json +1 -1
  121. package/registry/gallery-page.json +1 -1
  122. package/registry/genui.json +1 -1
  123. package/registry/glossary-term.json +1 -1
  124. package/registry/glossary.json +1 -1
  125. package/registry/glow-card.json +1 -1
  126. package/registry/goal-gauge.json +1 -1
  127. package/registry/grade-stamp.json +1 -1
  128. package/registry/how-it-works-page.json +1 -1
  129. package/registry/image-cropper.json +1 -1
  130. package/registry/index.json +42 -9
  131. package/registry/iso.json +1 -1
  132. package/registry/kanban.json +1 -1
  133. package/registry/kbd.json +1 -1
  134. package/registry/kind-config-editor.json +1 -1
  135. package/registry/kpi-explained.json +1 -1
  136. package/registry/landing-page.json +1 -1
  137. package/registry/landscape.json +1 -1
  138. package/registry/language-switch.json +1 -1
  139. package/registry/legal-page.json +1 -1
  140. package/registry/link-card.json +1 -1
  141. package/registry/list.json +1 -1
  142. package/registry/loader.json +1 -1
  143. package/registry/longform-page.json +1 -1
  144. package/registry/maintenance-screen.json +1 -1
  145. package/registry/map.json +2 -2
  146. package/registry/margin-layout.json +1 -1
  147. package/registry/markdown.json +1 -1
  148. package/registry/marketing-layout.json +1 -1
  149. package/registry/marquee.json +1 -1
  150. package/registry/mascot-quote.json +1 -1
  151. package/registry/mascot-state.json +1 -1
  152. package/registry/mascots.json +1 -1
  153. package/registry/match-dialog.json +1 -1
  154. package/registry/media-capture.json +1 -1
  155. package/registry/media-gallery.json +1 -1
  156. package/registry/media-grid.json +1 -1
  157. package/registry/meta-row.json +1 -1
  158. package/registry/meter.json +1 -1
  159. package/registry/money-input.json +1 -1
  160. package/registry/nav-bar.json +2 -2
  161. package/registry/next-actions.json +1 -1
  162. package/registry/notification-preferences.json +1 -1
  163. package/registry/number-ticker.json +1 -1
  164. package/registry/opening-hours.json +1 -1
  165. package/registry/page-header.json +1 -1
  166. package/registry/page-hero.json +1 -1
  167. package/registry/page-index.json +1 -1
  168. package/registry/page.json +1 -1
  169. package/registry/pagination.json +1 -1
  170. package/registry/photo-grid.json +1 -1
  171. package/registry/pointer-light.json +1 -1
  172. package/registry/popover.json +1 -1
  173. package/registry/pricing-page.json +1 -1
  174. package/registry/product-page.json +1 -1
  175. package/registry/profile-card.json +1 -1
  176. package/registry/progress.json +1 -1
  177. package/registry/promise-card.json +1 -1
  178. package/registry/promo-code-field.json +1 -1
  179. package/registry/qr-code.json +1 -1
  180. package/registry/quota-meter.json +1 -1
  181. package/registry/radio-group.json +1 -1
  182. package/registry/rail-nav.json +2 -2
  183. package/registry/recipes.json +1 -1
  184. package/registry/retro-tv.json +1 -1
  185. package/registry/reviews.json +1 -1
  186. package/registry/router.json +1 -1
  187. package/registry/scroll-stage.json +1 -1
  188. package/registry/search-field.json +1 -1
  189. package/registry/section-backdrop.json +1 -1
  190. package/registry/separator.json +1 -1
  191. package/registry/service-card.json +1 -1
  192. package/registry/settings-layout.json +1 -1
  193. package/registry/shop-composer.json +1 -1
  194. package/registry/shop-gallery.json +209 -0
  195. package/registry/shop.json +30 -6
  196. package/registry/showcase.json +1 -1
  197. package/registry/signature.json +1 -1
  198. package/registry/site-cahier.json +1 -1
  199. package/registry/site-footer.json +2 -2
  200. package/registry/sites.json +1 -1
  201. package/registry/skeleton.json +1 -1
  202. package/registry/skip-link.json +1 -1
  203. package/registry/slider.json +1 -1
  204. package/registry/slot-picker.json +1 -1
  205. package/registry/slot.json +1 -1
  206. package/registry/specimen-tag.json +1 -1
  207. package/registry/speed-lines.json +1 -1
  208. package/registry/spinner.json +1 -1
  209. package/registry/split-view.json +1 -1
  210. package/registry/stage-banner.json +1 -1
  211. package/registry/stat.json +1 -1
  212. package/registry/status-chip.json +1 -1
  213. package/registry/status-page.json +1 -1
  214. package/registry/step-progress.json +1 -1
  215. package/registry/step-showcase.json +1 -1
  216. package/registry/stepper.json +1 -1
  217. package/registry/sticky-action.json +1 -1
  218. package/registry/stuck.json +1 -1
  219. package/registry/swipe-deck.json +1 -1
  220. package/registry/switch.json +1 -1
  221. package/registry/tabs.json +1 -1
  222. package/registry/tag-input.json +1 -1
  223. package/registry/tag-selector.json +2 -2
  224. package/registry/taped-photo.json +1 -1
  225. package/registry/terminal-replay.json +1 -1
  226. package/registry/text-style.json +1 -1
  227. package/registry/theme.json +1 -1
  228. package/registry/toast.json +1 -1
  229. package/registry/toc.json +1 -1
  230. package/registry/tooltip.json +1 -1
  231. package/registry/tree-view.json +1 -1
  232. package/registry/update-prompt.json +1 -1
  233. package/registry/upload-queue.json +1 -1
  234. package/registry/usage.json +1 -1
  235. package/registry/verified-badge.json +1 -1
  236. package/registry/versus-card.json +1 -1
  237. package/registry/vertical-video.json +1 -1
  238. package/registry/video-player.json +1 -1
  239. package/registry/video-trimmer.json +1 -1
  240. package/registry/virtual.json +1 -1
  241. package/registry/wall.json +1 -1
  242. package/registry/waveform.json +1 -1
  243. /package/dist/{chunk-E4X3V7QX.js.map → chunk-GRVIZTT2.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/shop-gallery/lightbox.tsx"],"sourcesContent":["\"use client\";\n\n// The lightbox: loaded as a lazy chunk, only once a photo is opened. A Dialog (focus trapped, Escape, scroll lock), arrow\n// keys and a horizontal swipe, the photo at full resolution and its alt text as the caption.\nimport * as React from \"react\";\n\nimport { IconButton } from \"../button/button\";\nimport { Dialog } from \"../dialog\";\nimport type { ShopGalleryLabels } from \"./labels\";\nimport type { ShopGalleryPhoto } from \"./shop-gallery\";\n\nconst SWIPE = 50;\n\nfunction Arrow({ dir }: { dir: \"left\" | \"right\" }) {\n return (\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d={dir === \"left\" ? \"m15 6-6 6 6 6\" : \"m9 6 6 6-6 6\"} />\n </svg>\n );\n}\n\nexport type ShopGalleryLightboxProps = {\n photos: readonly ShopGalleryPhoto[];\n index: number;\n onIndexChange: (index: number) => void;\n onClose: () => void;\n label: string;\n labels: ShopGalleryLabels;\n /** Where focus goes back to when it closes. */\n returnFocus: () => HTMLElement | null;\n};\n\nexport default function ShopGalleryLightbox({ photos, index, onIndexChange, onClose, label, labels, returnFocus }: ShopGalleryLightboxProps) {\n const total = photos.length;\n const photo = photos[index];\n const startX = React.useRef<number | null>(null);\n const go = (to: number) => onIndexChange(((to % total) + total) % total);\n if (!photo) return null;\n const preload = [photos[(index + 1) % total], photos[(index - 1 + total) % total]];\n return (\n <Dialog.Root open onOpenChange={(open) => !open && onClose()}>\n <Dialog.Content\n closeLabel={labels.close}\n size=\"lg\"\n className=\"kz-sg-lightbox sm:max-w-5xl\"\n onCloseAutoFocus={(event) => {\n const target = returnFocus();\n if (target) {\n event.preventDefault();\n target.focus();\n }\n }}\n onKeyDown={(event) => {\n if (event.key === \"ArrowLeft\") go(index - 1);\n else if (event.key === \"ArrowRight\") go(index + 1);\n }}\n >\n <style>{`.kz-sg-stage{touch-action:pan-y}.kz-sg-lightbox img{user-select:none;-webkit-user-drag:none}@media (prefers-reduced-motion:no-preference){.kz-sg-photo{animation:kz-sg-in .22s ease-out}}@keyframes kz-sg-in{from{opacity:.4}to{opacity:1}}`}</style>\n <Dialog.Header>\n <Dialog.Title className=\"sr-only\">{labels.title(label)}</Dialog.Title>\n <p className=\"m-0 text-sm text-fg-secondary\" aria-live=\"polite\">{labels.position(index + 1, total)}</p>\n </Dialog.Header>\n <Dialog.Body className=\"flex flex-col gap-3\">\n <div\n className=\"kz-sg-stage relative flex items-center justify-center\"\n onTouchStart={(event) => {\n startX.current = event.touches[0]?.clientX ?? null;\n }}\n onTouchEnd={(event) => {\n const from = startX.current;\n const to = event.changedTouches[0]?.clientX;\n startX.current = null;\n if (from === null || to === undefined) return;\n if (to - from <= -SWIPE) go(index + 1);\n else if (to - from >= SWIPE) go(index - 1);\n }}\n >\n <img\n key={photo.id}\n src={photo.fullSrc ?? photo.src}\n srcSet={photo.fullSrcSet ?? photo.srcSet}\n sizes={photo.fullSrcSet ?? photo.srcSet ? \"(min-width: 64rem) 64rem, 100vw\" : undefined}\n alt={photo.alt}\n decoding=\"async\"\n className=\"kz-sg-photo max-h-[68dvh] w-full rounded-lg object-contain\"\n />\n {total > 1 && (\n <>\n <IconButton label={labels.previous} variant=\"secondary\" shape=\"pill\" className=\"absolute left-2 top-1/2 -translate-y-1/2\" onClick={() => go(index - 1)}>\n <Arrow dir=\"left\" />\n </IconButton>\n <IconButton label={labels.next} variant=\"secondary\" shape=\"pill\" className=\"absolute right-2 top-1/2 -translate-y-1/2\" onClick={() => go(index + 1)}>\n <Arrow dir=\"right\" />\n </IconButton>\n </>\n )}\n </div>\n <Dialog.Description className=\"m-0 min-h-5 text-center\">{photo.alt}</Dialog.Description>\n <div hidden aria-hidden>\n {preload.map((p) => p && p.id !== photo.id && <img key={p.id} src={p.fullSrc ?? p.src} alt=\"\" />)}\n </div>\n </Dialog.Body>\n </Dialog.Content>\n </Dialog.Root>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAIA,YAAY,WAAW;AAYjB,SAuEQ,UAvER,KA0CE,YA1CF;AALN,IAAM,QAAQ;AAEd,SAAS,MAAM,EAAE,IAAI,GAA8B;AACjD,SACE,oBAAC,SAAI,SAAQ,aAAY,WAAU,WAAU,MAAK,QAAO,QAAO,gBAAe,aAAY,KAAI,eAAc,SAAQ,gBAAe,SAAQ,eAAW,MACrJ,8BAAC,UAAK,GAAG,QAAQ,SAAS,kBAAkB,gBAAgB,GAC9D;AAEJ;AAae,SAAR,oBAAqC,EAAE,QAAQ,OAAO,eAAe,SAAS,OAAO,QAAQ,YAAY,GAA6B;AAC3I,QAAM,QAAQ,OAAO;AACrB,QAAM,QAAQ,OAAO,KAAK;AAC1B,QAAM,SAAe,aAAsB,IAAI;AAC/C,QAAM,KAAK,CAAC,OAAe,eAAgB,KAAK,QAAS,SAAS,KAAK;AACvE,MAAI,CAAC,MAAO,QAAO;AACnB,QAAM,UAAU,CAAC,QAAQ,QAAQ,KAAK,KAAK,GAAG,QAAQ,QAAQ,IAAI,SAAS,KAAK,CAAC;AACjF,SACE,oBAAC,OAAO,MAAP,EAAY,MAAI,MAAC,cAAc,CAAC,SAAS,CAAC,QAAQ,QAAQ,GACzD;AAAA,IAAC,OAAO;AAAA,IAAP;AAAA,MACC,YAAY,OAAO;AAAA,MACnB,MAAK;AAAA,MACL,WAAU;AAAA,MACV,kBAAkB,CAAC,UAAU;AAC3B,cAAM,SAAS,YAAY;AAC3B,YAAI,QAAQ;AACV,gBAAM,eAAe;AACrB,iBAAO,MAAM;AAAA,QACf;AA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SAAS,MAAM,GAAG,QAAQ,CAAC,GACnJ,8BAAC,SAAM,KAAI,QAAO,GACpB;AAAA,kBACA,oBAAC,cAAW,OAAO,OAAO,MAAM,SAAQ,aAAY,OAAM,QAAO,WAAU,6CAA4C,SAAS,MAAM,GAAG,QAAQ,CAAC,GAChJ,8BAAC,SAAM,KAAI,SAAQ,GACrB;AAAA,mBACF;AAAA;AAAA;AAAA,UAEJ;AAAA,UACA,oBAAC,OAAO,aAAP,EAAmB,WAAU,2BAA2B,gBAAM,KAAI;AAAA,UACnE,oBAAC,SAAI,QAAM,MAAC,eAAW,MACpB,kBAAQ,IAAI,CAAC,MAAM,KAAK,EAAE,OAAO,MAAM,MAAM,oBAAC,SAAe,KAAK,EAAE,WAAW,EAAE,KAAK,KAAI,MAAnC,EAAE,EAAoC,CAAE,GAClG;AAAA,WACF;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;","names":[]}
@@ -1,5 +1,8 @@
1
1
  "use client";
2
2
  import "./chunk-NPF3OHE2.js";
3
+ import {
4
+ Dialog
5
+ } from "./chunk-E4FMPPDL.js";
3
6
  import {
4
7
  Avatar
5
8
  } from "./chunk-HK525THY.js";
@@ -8,153 +11,27 @@ import {
8
11
  } from "./chunk-BDIU5LZB.js";
9
12
  import "./chunk-JXLDUDTD.js";
10
13
  import {
11
- Button,
12
- IconButton
14
+ Button
13
15
  } from "./chunk-M3GEYLMR.js";
14
16
  import "./chunk-D3T54RSL.js";
15
17
  import "./chunk-NSLXEDIS.js";
16
18
 
17
- // src/dialog/dialog.tsx
18
- import { Dialog as DialogPrimitive } from "radix-ui";
19
- import { tv } from "tailwind-variants";
20
-
21
- // src/dialog/return-focus.ts
22
- import * as React from "react";
23
- function useReturnFocus(onCloseAutoFocus) {
24
- const [opener] = React.useState(() => typeof document === "undefined" ? null : document.activeElement);
25
- return React.useCallback(
26
- (event) => {
27
- onCloseAutoFocus?.(event);
28
- if (event.defaultPrevented) return;
29
- if (opener instanceof HTMLElement && opener !== document.body && opener.isConnected) {
30
- event.preventDefault();
31
- opener.focus();
32
- }
33
- },
34
- [opener, onCloseAutoFocus]
35
- );
36
- }
37
-
38
- // src/dialog/dialog.tsx
39
- import { jsx, jsxs } from "react/jsx-runtime";
40
- var dialog = tv({
41
- slots: {
42
- overlay: "kz-overlay fixed inset-0 z-50 bg-overlay",
43
- content: "kz-dialog fixed z-50 flex flex-col overflow-hidden border border-border-default bg-surface-1 text-fg shadow-lg focus:outline-hidden",
44
- close: "absolute right-3 top-3 h-9 w-9",
45
- header: "flex flex-col gap-1 px-5 pb-2 pr-14 pt-5",
46
- title: "text-base font-bold text-fg",
47
- description: "text-sm text-fg-secondary",
48
- body: "min-h-0 flex-1 overflow-y-auto px-5 pb-5",
49
- footer: "flex flex-wrap items-center justify-end gap-2 border-t border-border-subtle px-5 py-4 pb-[max(1rem,env(safe-area-inset-bottom))]"
50
- },
51
- variants: {
52
- placement: {
53
- center: { content: "left-1/2 top-1/2 max-h-[85dvh] w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 rounded-xl" },
54
- /* A sheet: anchored at the bottom on a phone, centred from `sm` up. */
55
- bottom: {
56
- content: "inset-x-0 bottom-0 max-h-[92dvh] rounded-t-[1.75rem] sm:bottom-auto sm:left-1/2 sm:top-1/2 sm:w-full sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-[1.75rem]"
57
- },
58
- right: { content: "inset-y-0 right-0 h-full w-full max-w-md rounded-none border-y-0 border-r-0" },
59
- /* A navigation drawer: full height, from the left, clear of the notch. */
60
- left: { content: "inset-y-0 left-0 h-full w-full max-w-md rounded-none border-y-0 border-l-0 pl-[env(safe-area-inset-left)]" }
61
- },
62
- size: { sm: { content: "sm:max-w-sm" }, md: { content: "sm:max-w-md" }, lg: { content: "sm:max-w-2xl" } }
63
- },
64
- defaultVariants: { placement: "center", size: "md" }
65
- });
66
- var s = dialog();
67
- function CloseIcon() {
68
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M18 6 6 18M6 6l12 12" }) });
69
- }
70
- var prevent = (event) => event.preventDefault();
71
- function ReturnFocusContent({ onCloseAutoFocus, ...props }) {
72
- return /* @__PURE__ */ jsx(DialogPrimitive.Content, { onCloseAutoFocus: useReturnFocus(onCloseAutoFocus), ...props });
73
- }
74
- function DialogContent({
75
- placement,
76
- size,
77
- closeLabel,
78
- hideClose,
79
- dismissible = true,
80
- container,
81
- className,
82
- children,
83
- onEscapeKeyDown,
84
- onPointerDownOutside,
85
- onInteractOutside,
86
- ...props
87
- }) {
88
- const v = dialog({ placement, size });
89
- return /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { container, children: [
90
- /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: v.overlay() }),
91
- /* @__PURE__ */ jsxs(
92
- ReturnFocusContent,
93
- {
94
- "data-placement": placement ?? "center",
95
- "data-dismissible": dismissible ? void 0 : "false",
96
- className: v.content({ className }),
97
- onEscapeKeyDown: dismissible ? onEscapeKeyDown : chain(onEscapeKeyDown, prevent),
98
- onPointerDownOutside: dismissible ? onPointerDownOutside : chain(onPointerDownOutside, prevent),
99
- onInteractOutside: dismissible ? onInteractOutside : chain(onInteractOutside, prevent),
100
- ...props,
101
- children: [
102
- children,
103
- !hideClose && /* @__PURE__ */ jsx(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { label: closeLabel, variant: "ghost", shape: "pill", className: v.close(), children: /* @__PURE__ */ jsx(CloseIcon, {}) }) })
104
- ]
105
- }
106
- )
107
- ] });
108
- }
109
- function chain(handler, then) {
110
- return (event) => {
111
- handler?.(event);
112
- then(event);
113
- };
114
- }
115
- function DialogHeader({ className, ...props }) {
116
- return /* @__PURE__ */ jsx("div", { className: s.header({ className }), ...props });
117
- }
118
- function DialogTitle({ className, ...props }) {
119
- return /* @__PURE__ */ jsx(DialogPrimitive.Title, { className: s.title({ className }), ...props });
120
- }
121
- function DialogDescription({ className, ...props }) {
122
- return /* @__PURE__ */ jsx(DialogPrimitive.Description, { className: s.description({ className }), ...props });
123
- }
124
- function DialogBody({ className, ...props }) {
125
- return /* @__PURE__ */ jsx("div", { className: s.body({ className }), ...props });
126
- }
127
- function DialogFooter({ className, ...props }) {
128
- return /* @__PURE__ */ jsx("div", { className: s.footer({ className }), ...props });
129
- }
130
- var Dialog = {
131
- Root: DialogPrimitive.Root,
132
- Trigger: DialogPrimitive.Trigger,
133
- Close: DialogPrimitive.Close,
134
- Content: DialogContent,
135
- Header: DialogHeader,
136
- Title: DialogTitle,
137
- Description: DialogDescription,
138
- Body: DialogBody,
139
- Footer: DialogFooter
140
- };
141
-
142
19
  // src/match-dialog/match-dialog.tsx
143
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
20
+ import { jsx, jsxs } from "react/jsx-runtime";
144
21
  function MatchDialog({ open, onOpenChange, title, description, people, primaryLabel, onPrimary, secondaryLabel, container }) {
145
22
  warnDeprecated("match-dialog");
146
- return /* @__PURE__ */ jsx2(Dialog.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs2(Dialog.Content, { hideClose: true, size: "sm", container, className: "overflow-hidden border-0 bg-gradient-to-br from-accent to-accent-2 text-center text-on-accent", children: [
147
- /* @__PURE__ */ jsx2("style", { href: "krizaka-match", precedence: "default", children: "@media (prefers-reduced-motion:no-preference){[data-kz-match] [data-side=a]{animation:kz-match-a .55s cubic-bezier(.3,1.6,.5,1) both}[data-kz-match] [data-side=b]{animation:kz-match-b .55s cubic-bezier(.3,1.6,.5,1) both}[data-kz-match] [data-heart]{animation:kz-match-heart .45s .25s cubic-bezier(.3,1.6,.5,1) both}}@keyframes kz-match-a{from{transform:translateX(-60px) rotate(-8deg);opacity:0}}@keyframes kz-match-b{from{transform:translateX(60px) rotate(8deg);opacity:0}}@keyframes kz-match-heart{from{transform:scale(0)}}" }),
148
- /* @__PURE__ */ jsxs2("div", { "data-kz-match": "", className: "flex flex-col items-center gap-3 px-2 pb-2 pt-6", children: [
149
- /* @__PURE__ */ jsx2(Dialog.Title, { className: "font-display text-4xl font-black text-on-accent", children: title }),
150
- description ? /* @__PURE__ */ jsx2(Dialog.Description, { className: "max-w-xs text-sm text-on-accent", children: description }) : null,
151
- /* @__PURE__ */ jsxs2("div", { className: "relative my-6 flex h-36 w-64 items-center justify-center", "aria-hidden": true, children: [
152
- /* @__PURE__ */ jsx2("span", { "data-side": "a", className: "absolute left-6 -rotate-6 rounded-full ring-4 ring-on-accent", children: /* @__PURE__ */ jsx2(Avatar, { src: people[0].src ?? null, alt: "", fallback: people[0].name.charAt(0), className: "h-28 w-28 text-3xl" }) }),
153
- /* @__PURE__ */ jsx2("span", { "data-side": "b", className: "absolute right-6 rotate-6 rounded-full ring-4 ring-on-accent", children: /* @__PURE__ */ jsx2(Avatar, { src: people[1].src ?? null, alt: "", fallback: people[1].name.charAt(0), className: "h-28 w-28 text-3xl" }) }),
154
- /* @__PURE__ */ jsx2("span", { "data-heart": "", className: "absolute -bottom-1 flex h-12 w-12 items-center justify-center rounded-full bg-on-accent text-accent shadow-lg", children: /* @__PURE__ */ jsx2("svg", { viewBox: "0 0 24 24", className: "h-6 w-6", fill: "currentColor", children: /* @__PURE__ */ jsx2("path", { d: "M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z" }) }) })
23
+ return /* @__PURE__ */ jsx(Dialog.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs(Dialog.Content, { hideClose: true, size: "sm", container, className: "overflow-hidden border-0 bg-gradient-to-br from-accent to-accent-2 text-center text-on-accent", children: [
24
+ /* @__PURE__ */ jsx("style", { href: "krizaka-match", precedence: "default", children: "@media (prefers-reduced-motion:no-preference){[data-kz-match] [data-side=a]{animation:kz-match-a .55s cubic-bezier(.3,1.6,.5,1) both}[data-kz-match] [data-side=b]{animation:kz-match-b .55s cubic-bezier(.3,1.6,.5,1) both}[data-kz-match] [data-heart]{animation:kz-match-heart .45s .25s cubic-bezier(.3,1.6,.5,1) both}}@keyframes kz-match-a{from{transform:translateX(-60px) rotate(-8deg);opacity:0}}@keyframes kz-match-b{from{transform:translateX(60px) rotate(8deg);opacity:0}}@keyframes kz-match-heart{from{transform:scale(0)}}" }),
25
+ /* @__PURE__ */ jsxs("div", { "data-kz-match": "", className: "flex flex-col items-center gap-3 px-2 pb-2 pt-6", children: [
26
+ /* @__PURE__ */ jsx(Dialog.Title, { className: "font-display text-4xl font-black text-on-accent", children: title }),
27
+ description ? /* @__PURE__ */ jsx(Dialog.Description, { className: "max-w-xs text-sm text-on-accent", children: description }) : null,
28
+ /* @__PURE__ */ jsxs("div", { className: "relative my-6 flex h-36 w-64 items-center justify-center", "aria-hidden": true, children: [
29
+ /* @__PURE__ */ jsx("span", { "data-side": "a", className: "absolute left-6 -rotate-6 rounded-full ring-4 ring-on-accent", children: /* @__PURE__ */ jsx(Avatar, { src: people[0].src ?? null, alt: "", fallback: people[0].name.charAt(0), className: "h-28 w-28 text-3xl" }) }),
30
+ /* @__PURE__ */ jsx("span", { "data-side": "b", className: "absolute right-6 rotate-6 rounded-full ring-4 ring-on-accent", children: /* @__PURE__ */ jsx(Avatar, { src: people[1].src ?? null, alt: "", fallback: people[1].name.charAt(0), className: "h-28 w-28 text-3xl" }) }),
31
+ /* @__PURE__ */ jsx("span", { "data-heart": "", className: "absolute -bottom-1 flex h-12 w-12 items-center justify-center rounded-full bg-on-accent text-accent shadow-lg", children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "h-6 w-6", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z" }) }) })
155
32
  ] }),
156
- /* @__PURE__ */ jsxs2("div", { className: "flex w-full flex-col gap-2", children: [
157
- /* @__PURE__ */ jsx2(
33
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col gap-2", children: [
34
+ /* @__PURE__ */ jsx(
158
35
  Button,
159
36
  {
160
37
  size: "lg",
@@ -165,7 +42,7 @@ function MatchDialog({ open, onOpenChange, title, description, people, primaryLa
165
42
  children: primaryLabel
166
43
  }
167
44
  ),
168
- /* @__PURE__ */ jsx2(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx2(Button, { size: "lg", variant: "ghost", className: "text-on-accent hover:bg-on-accent/15", children: secondaryLabel }) })
45
+ /* @__PURE__ */ jsx(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "lg", variant: "ghost", className: "text-on-accent hover:bg-on-accent/15", children: secondaryLabel }) })
169
46
  ] })
170
47
  ] })
171
48
  ] }) });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/dialog/dialog.tsx","../src/dialog/return-focus.ts","../src/match-dialog/match-dialog.tsx"],"sourcesContent":["// Client (a portal). Radix does the focus trap, the scroll lock, Escape, the outside click, aria-modal, the\n// aria-labelledby / aria-describedby wiring and the focus return: this file only holds the shape.\nimport { Dialog as DialogPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { IconButton } from \"../button/button\";\nimport { useReturnFocus } from \"./return-focus\";\n\nexport const dialog = tv({\n slots: {\n overlay: \"kz-overlay fixed inset-0 z-50 bg-overlay\",\n content:\n \"kz-dialog fixed z-50 flex flex-col overflow-hidden border border-border-default bg-surface-1 text-fg shadow-lg focus:outline-hidden\",\n close: \"absolute right-3 top-3 h-9 w-9\",\n header: \"flex flex-col gap-1 px-5 pb-2 pr-14 pt-5\",\n title: \"text-base font-bold text-fg\",\n description: \"text-sm text-fg-secondary\",\n body: \"min-h-0 flex-1 overflow-y-auto px-5 pb-5\",\n footer:\n \"flex flex-wrap items-center justify-end gap-2 border-t border-border-subtle px-5 py-4 pb-[max(1rem,env(safe-area-inset-bottom))]\",\n },\n variants: {\n placement: {\n center: { content: \"left-1/2 top-1/2 max-h-[85dvh] w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 rounded-xl\" },\n /* A sheet: anchored at the bottom on a phone, centred from `sm` up. */\n bottom: {\n content:\n \"inset-x-0 bottom-0 max-h-[92dvh] rounded-t-[1.75rem] sm:bottom-auto sm:left-1/2 sm:top-1/2 sm:w-full \" +\n \"sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-[1.75rem]\",\n },\n right: { content: \"inset-y-0 right-0 h-full w-full max-w-md rounded-none border-y-0 border-r-0\" },\n /* A navigation drawer: full height, from the left, clear of the notch. */\n left: { content: \"inset-y-0 left-0 h-full w-full max-w-md rounded-none border-y-0 border-l-0 pl-[env(safe-area-inset-left)]\" },\n },\n size: { sm: { content: \"sm:max-w-sm\" }, md: { content: \"sm:max-w-md\" }, lg: { content: \"sm:max-w-2xl\" } },\n },\n defaultVariants: { placement: \"center\", size: \"md\" },\n});\nconst s = dialog();\n\nexport type DialogVariants = VariantProps<typeof dialog>;\n\nfunction CloseIcon() {\n return (\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </svg>\n );\n}\n\ntype CloseButtonProps =\n | {\n /** The accessible name of the close button — passed translated. */\n closeLabel: string;\n /** Leaves the close button out (the content brings its own way out, or none: see `dismissible`). */\n hideClose?: false;\n }\n | { closeLabel?: string; hideClose: true };\n\nexport type DialogContentProps = React.ComponentProps<typeof DialogPrimitive.Content> &\n DialogVariants &\n CloseButtonProps & {\n /**\n * center · bottom (a sheet on a phone, centred from `sm` up) · right (a side panel, full height) · left (a\n * navigation drawer, full height).\n * @default \"center\"\n */\n placement?: DialogVariants[\"placement\"];\n /**\n * sm · md · lg: the width of the dialog.\n * @default \"md\"\n */\n size?: DialogVariants[\"size\"];\n /**\n * `false`: Escape and a click outside do not close it (a gate the user must answer: age, terms). It still closes\n * through `open` / `onOpenChange` and any `Dialog.Close` inside. Default `true`.\n */\n dismissible?: boolean;\n /** The element the portal renders into (default: document.body). */\n container?: HTMLElement | null;\n };\n\nconst prevent = (event: Event) => event.preventDefault();\n\n/** Radix's content, mounted only while open: it remembers the opener then and gives focus back on close (WCAG 2.4.3). */\nfunction ReturnFocusContent({ onCloseAutoFocus, ...props }: React.ComponentProps<typeof DialogPrimitive.Content>) {\n return <DialogPrimitive.Content onCloseAutoFocus={useReturnFocus(onCloseAutoFocus)} {...props} />;\n}\n\n/** The dialog itself, portalled over a dimmed overlay, with a close button. Give it a `Dialog.Title`. */\nexport function DialogContent({\n placement,\n size,\n closeLabel,\n hideClose,\n dismissible = true,\n container,\n className,\n children,\n onEscapeKeyDown,\n onPointerDownOutside,\n onInteractOutside,\n ...props\n}: DialogContentProps) {\n const v = dialog({ placement, size });\n return (\n <DialogPrimitive.Portal container={container}>\n <DialogPrimitive.Overlay className={v.overlay()} />\n <ReturnFocusContent\n data-placement={placement ?? \"center\"}\n data-dismissible={dismissible ? undefined : \"false\"}\n className={v.content({ className })}\n onEscapeKeyDown={dismissible ? onEscapeKeyDown : chain(onEscapeKeyDown, prevent)}\n onPointerDownOutside={dismissible ? onPointerDownOutside : chain(onPointerDownOutside, prevent)}\n onInteractOutside={dismissible ? onInteractOutside : chain(onInteractOutside, prevent)}\n {...props}\n >\n {children}\n {!hideClose && (\n <DialogPrimitive.Close asChild>\n <IconButton label={closeLabel as string} variant=\"ghost\" shape=\"pill\" className={v.close()}>\n <CloseIcon />\n </IconButton>\n </DialogPrimitive.Close>\n )}\n </ReturnFocusContent>\n </DialogPrimitive.Portal>\n );\n}\n\nfunction chain<E extends Event>(handler: ((event: E) => void) | undefined, then: (event: E) => void) {\n return (event: E) => {\n handler?.(event);\n then(event);\n };\n}\n\nexport function DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div className={s.header({ className })} {...props} />;\n}\n\nexport function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return <DialogPrimitive.Title className={s.title({ className })} {...props} />;\n}\n\nexport function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return <DialogPrimitive.Description className={s.description({ className })} {...props} />;\n}\n\nexport function DialogBody({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div className={s.body({ className })} {...props} />;\n}\n\nexport function DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div className={s.footer({ className })} {...props} />;\n}\n\n/** `Dialog.Root/Trigger/Content/Header/Title/Description/Body/Footer/Close`. `open`/`defaultOpen` + `onOpenChange`. */\nexport const Dialog = {\n Root: DialogPrimitive.Root,\n Trigger: DialogPrimitive.Trigger,\n Close: DialogPrimitive.Close,\n Content: DialogContent,\n Header: DialogHeader,\n Title: DialogTitle,\n Description: DialogDescription,\n Body: DialogBody,\n Footer: DialogFooter,\n};\n\n/** `Omit` that keeps the close-button union (`closeLabel` required unless `hideClose`). */\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;\n\nexport type SheetProps = DistributiveOmit<DialogContentProps, \"placement\">;\n\n/** A sheet is a dialog anchored at the bottom (centred from `sm` up): `Dialog.Content placement=\"bottom\"`. */\nexport function Sheet(props: SheetProps) {\n return <DialogContent placement=\"bottom\" {...props} />;\n}\n","// Client. WCAG 2.4.3: when a dialog closes, focus goes back to what opened it. Radix only does it for `Dialog.Trigger`;\n// most app dialogs are controlled (`open` / `onOpenChange`) and opened by a plain button, so on Escape focus fell to\n// <body>. The content remembers the focused element when it mounts (it is still the opener: Radix moves focus in an\n// effect) and gives it back on close, unless the consumer's `onCloseAutoFocus` prevented the default.\nimport * as React from \"react\";\n\n/** The handler for `onCloseAutoFocus`: yours first, then focus back on the opener if it is still on the page. */\nexport function useReturnFocus(onCloseAutoFocus?: (event: Event) => void) {\n const [opener] = React.useState<Element | null>(() => (typeof document === \"undefined\" ? null : document.activeElement));\n return React.useCallback(\n (event: Event) => {\n onCloseAutoFocus?.(event);\n if (event.defaultPrevented) return;\n if (opener instanceof HTMLElement && opener !== document.body && opener.isConnected) {\n event.preventDefault();\n opener.focus();\n }\n },\n [opener, onCloseAutoFocus],\n );\n}\n","// Client (a portal). The moment two people choose each other — a match, a pair, a deal: a dialog in the brand\n// gradient, the two avatars meeting at a heart, the next step. The entrance plays once; still under reduced motion.\nimport * as React from \"react\";\n\nimport { Avatar } from \"../avatar\";\nimport { Button } from \"../button\";\nimport { warnDeprecated } from \"../deprecated\";\nimport { Dialog } from \"../dialog\";\n\nexport type MatchDialogProps = {\n /** Shown (controlled). */\n open: boolean;\n /** Called when it closes. */\n onOpenChange: (open: boolean) => void;\n /** The headline (“It's a match!”) — passed translated; the dialog's name. */\n title: string;\n /** A line under it. */\n description?: string;\n /** The two people: avatar URLs and names. */\n people: readonly [{ src?: string | null; name: string }, { src?: string | null; name: string }];\n /** The main action (“Send a message”). */\n primaryLabel: string;\n /** What it does. */\n onPrimary: () => void;\n /** The way back (“Keep swiping”). */\n secondaryLabel: string;\n /** Where it is drawn (the page's body by default): give an element inside a brand scope (`.brand-…`) so the dialog wears the brand too. */\n container?: HTMLElement | null;\n};\n\n/**\n * Two people choose each other: the avatars meet at a heart in the brand gradient, the next step under them.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function MatchDialog({ open, onOpenChange, title, description, people, primaryLabel, onPrimary, secondaryLabel, container }: MatchDialogProps) {\n warnDeprecated(\"match-dialog\");\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Content hideClose size=\"sm\" container={container} className=\"overflow-hidden border-0 bg-gradient-to-br from-accent to-accent-2 text-center text-on-accent\">\n <style href=\"krizaka-match\" precedence=\"default\">\n {\"@media (prefers-reduced-motion:no-preference){[data-kz-match] [data-side=a]{animation:kz-match-a .55s cubic-bezier(.3,1.6,.5,1) both}[data-kz-match] [data-side=b]{animation:kz-match-b .55s cubic-bezier(.3,1.6,.5,1) both}[data-kz-match] [data-heart]{animation:kz-match-heart .45s .25s cubic-bezier(.3,1.6,.5,1) both}}@keyframes kz-match-a{from{transform:translateX(-60px) rotate(-8deg);opacity:0}}@keyframes kz-match-b{from{transform:translateX(60px) rotate(8deg);opacity:0}}@keyframes kz-match-heart{from{transform:scale(0)}}\"}\n </style>\n <div data-kz-match=\"\" className=\"flex flex-col items-center gap-3 px-2 pb-2 pt-6\">\n <Dialog.Title className=\"font-display text-4xl font-black text-on-accent\">{title}</Dialog.Title>\n {description ? <Dialog.Description className=\"max-w-xs text-sm text-on-accent\">{description}</Dialog.Description> : null}\n <div className=\"relative my-6 flex h-36 w-64 items-center justify-center\" aria-hidden>\n <span data-side=\"a\" className=\"absolute left-6 -rotate-6 rounded-full ring-4 ring-on-accent\">\n <Avatar src={people[0].src ?? null} alt=\"\" fallback={people[0].name.charAt(0)} className=\"h-28 w-28 text-3xl\" />\n </span>\n <span data-side=\"b\" className=\"absolute right-6 rotate-6 rounded-full ring-4 ring-on-accent\">\n <Avatar src={people[1].src ?? null} alt=\"\" fallback={people[1].name.charAt(0)} className=\"h-28 w-28 text-3xl\" />\n </span>\n <span data-heart=\"\" className=\"absolute -bottom-1 flex h-12 w-12 items-center justify-center rounded-full bg-on-accent text-accent shadow-lg\">\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"currentColor\">\n <path d=\"M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z\" />\n </svg>\n </span>\n </div>\n <div className=\"flex w-full flex-col gap-2\">\n <Button\n size=\"lg\"\n onClick={() => {\n onOpenChange(false);\n onPrimary();\n }}\n >\n {primaryLabel}\n </Button>\n <Dialog.Close asChild>\n <Button size=\"lg\" variant=\"ghost\" className=\"text-on-accent hover:bg-on-accent/15\">\n {secondaryLabel}\n </Button>\n </Dialog.Close>\n </div>\n </div>\n </Dialog.Content>\n </Dialog.Root>\n );\n}\n"],"m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-dialog/match-dialog.tsx"],"sourcesContent":["// Client (a portal). The moment two people choose each other — a match, a pair, a deal: a dialog in the brand\n// gradient, the two avatars meeting at a heart, the next step. The entrance plays once; still under reduced motion.\nimport * as React from \"react\";\n\nimport { Avatar } from \"../avatar\";\nimport { Button } from \"../button\";\nimport { warnDeprecated } from \"../deprecated\";\nimport { Dialog } from \"../dialog\";\n\nexport type MatchDialogProps = {\n /** Shown (controlled). */\n open: boolean;\n /** Called when it closes. */\n onOpenChange: (open: boolean) => void;\n /** The headline (“It's a match!”) — passed translated; the dialog's name. */\n title: string;\n /** A line under it. */\n description?: string;\n /** The two people: avatar URLs and names. */\n people: readonly [{ src?: string | null; name: string }, { src?: string | null; name: string }];\n /** The main action (“Send a message”). */\n primaryLabel: string;\n /** What it does. */\n onPrimary: () => void;\n /** The way back (“Keep swiping”). */\n secondaryLabel: string;\n /** Where it is drawn (the page's body by default): give an element inside a brand scope (`.brand-…`) so the dialog wears the brand too. */\n container?: HTMLElement | null;\n};\n\n/**\n * Two people choose each other: the avatars meet at a heart in the brand gradient, the next step under them.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function MatchDialog({ open, onOpenChange, title, description, people, primaryLabel, onPrimary, secondaryLabel, container }: MatchDialogProps) {\n warnDeprecated(\"match-dialog\");\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Content hideClose size=\"sm\" container={container} className=\"overflow-hidden border-0 bg-gradient-to-br from-accent to-accent-2 text-center text-on-accent\">\n <style href=\"krizaka-match\" precedence=\"default\">\n {\"@media (prefers-reduced-motion:no-preference){[data-kz-match] [data-side=a]{animation:kz-match-a .55s cubic-bezier(.3,1.6,.5,1) both}[data-kz-match] [data-side=b]{animation:kz-match-b .55s cubic-bezier(.3,1.6,.5,1) both}[data-kz-match] [data-heart]{animation:kz-match-heart .45s .25s cubic-bezier(.3,1.6,.5,1) both}}@keyframes kz-match-a{from{transform:translateX(-60px) rotate(-8deg);opacity:0}}@keyframes kz-match-b{from{transform:translateX(60px) rotate(8deg);opacity:0}}@keyframes kz-match-heart{from{transform:scale(0)}}\"}\n </style>\n <div data-kz-match=\"\" className=\"flex flex-col items-center gap-3 px-2 pb-2 pt-6\">\n <Dialog.Title className=\"font-display text-4xl font-black text-on-accent\">{title}</Dialog.Title>\n {description ? <Dialog.Description className=\"max-w-xs text-sm text-on-accent\">{description}</Dialog.Description> : null}\n <div className=\"relative my-6 flex h-36 w-64 items-center justify-center\" aria-hidden>\n <span data-side=\"a\" className=\"absolute left-6 -rotate-6 rounded-full ring-4 ring-on-accent\">\n <Avatar src={people[0].src ?? null} alt=\"\" fallback={people[0].name.charAt(0)} className=\"h-28 w-28 text-3xl\" />\n </span>\n <span data-side=\"b\" className=\"absolute right-6 rotate-6 rounded-full ring-4 ring-on-accent\">\n <Avatar src={people[1].src ?? null} alt=\"\" fallback={people[1].name.charAt(0)} className=\"h-28 w-28 text-3xl\" />\n </span>\n <span data-heart=\"\" className=\"absolute -bottom-1 flex h-12 w-12 items-center justify-center rounded-full bg-on-accent text-accent shadow-lg\">\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"currentColor\">\n <path d=\"M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z\" />\n </svg>\n </span>\n </div>\n <div className=\"flex w-full flex-col gap-2\">\n <Button\n size=\"lg\"\n onClick={() => {\n onOpenChange(false);\n onPrimary();\n }}\n >\n {primaryLabel}\n </Button>\n <Dialog.Close asChild>\n <Button size=\"lg\" variant=\"ghost\" className=\"text-on-accent hover:bg-on-accent/15\">\n {secondaryLabel}\n </Button>\n </Dialog.Close>\n </div>\n </div>\n </Dialog.Content>\n </Dialog.Root>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAuCQ,cAME,YANF;AALD,SAAS,YAAY,EAAE,MAAM,cAAc,OAAO,aAAa,QAAQ,cAAc,WAAW,gBAAgB,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,SACF;AAAA,OACF;AAAA,KACF,GACF;AAEJ;","names":[]}
@@ -1,7 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import { L as LinkComponent } from '../block-link-BAg4eoZk.js';
3
+ import { ShopPhoto } from '../shop.js';
3
4
 
4
- type BookingVariant = "strip" | "panel" | "sticky";
5
+ type BookingVariant = "strip" | "panel" | "closing" | "sticky";
6
+ /** `closing`: the second action beside « Book » (`Call`, `Directions`): the host chooses it from the shop's settings. */
7
+ type BookingSecondary = {
8
+ label: string;
9
+ href: string;
10
+ };
5
11
  type BookingTime = {
6
12
  id: string;
7
13
  /** In words, formatted by the app (`Today 4:30 pm`). */
@@ -25,12 +31,25 @@ type BookingSectionProps = Omit<React.ComponentProps<"section">, "title"> & {
25
31
  /** `panel`: the invitation (`Ready when you are`), and why. */
26
32
  title?: React.ReactNode;
27
33
  body?: React.ReactNode;
34
+ /** `closing`: the shop's photo, one the page does not already show (the host plans it). Wins over `mark`. */
35
+ photo?: ShopPhoto;
36
+ /** `closing`: the shop's mark, when there is no photo. Decorative (hidden from assistive technology). */
37
+ mark?: React.ReactNode;
38
+ /**
39
+ * `closing`: the next free time (`Tomorrow 9 am`). On a closed day it is the next opening's. Absent, the call is the
40
+ * title and the primary action alone: never an empty box.
41
+ */
42
+ nextTime?: BookingTime;
43
+ /** `closing`: the words before the time (`Next free time`). */
44
+ nextTimeLabel?: string;
45
+ /** `closing`: « Call » or « Directions ». */
46
+ secondary?: BookingSecondary;
28
47
  linkAs?: LinkComponent;
29
48
  /** `sticky`: the selector of the page's own action (`#hero-book`): while it is on screen the bar hides. */
30
49
  hideWhileVisible?: string;
31
50
  };
32
51
  /** The way to book: the next free times, a closing call, or the phone bar. */
33
- declare function BookingSection({ variant, times, label, emptyLabel, href, actionLabel, title, body, linkAs, hideWhileVisible, className, ...props }: BookingSectionProps): React.JSX.Element;
52
+ declare function BookingSection({ variant, times, label, emptyLabel, href, actionLabel, title, body, linkAs, hideWhileVisible, photo, mark, nextTime, nextTimeLabel, secondary, className, ...props }: BookingSectionProps): React.JSX.Element;
34
53
 
35
54
  export { BookingSection };
36
- export type { BookingSectionProps, BookingTime, BookingVariant };
55
+ export type { BookingSecondary, BookingSectionProps, BookingTime, BookingVariant };
@@ -1,10 +1,14 @@
1
1
  import {
2
2
  BlockLink
3
3
  } from "../chunk-HKEAYSFS.js";
4
+ import {
5
+ Photo
6
+ } from "../chunk-5D7NMUF6.js";
4
7
  import {
5
8
  ShopSection
6
9
  } from "../chunk-A7MQPIEG.js";
7
10
  import {
11
+ Page,
8
12
  cn
9
13
  } from "../chunk-B47WSPMP.js";
10
14
 
@@ -12,12 +16,40 @@ import {
12
16
  import { buttonVariants } from "@krizaka/ui/button";
13
17
  import { CtaPanel } from "@krizaka/ui/cta-panel";
14
18
  import { StickyAction } from "@krizaka/ui/sticky-action";
19
+ import * as React from "react";
15
20
  import { jsx, jsxs } from "react/jsx-runtime";
16
- function BookingSection({ variant = "strip", times = [], label, emptyLabel, href, actionLabel, title, body, linkAs, hideWhileVisible, className, ...props }) {
21
+ function ClosingMedia({ photo, mark }) {
22
+ if (photo) return /* @__PURE__ */ jsx(Photo, { photo, ratio: "4/3", sizes: "(min-width: 64rem) 36rem, calc(100vw - 2rem)" });
23
+ if (!mark) return null;
24
+ return /* @__PURE__ */ jsx("div", { "aria-hidden": true, className: "grid aspect-[4/3] w-full place-items-center overflow-hidden rounded-xl bg-accent-soft text-fg-accent [&>svg]:h-1/2 [&>svg]:w-auto", children: mark });
25
+ }
26
+ function ClosingCall({ title, body, photo, mark, nextTime, nextTimeLabel, secondary, href, actionLabel, linkAs, className, ...props }) {
27
+ const headingId = React.useId();
28
+ const hasMedia = Boolean(photo ?? mark);
29
+ return /* @__PURE__ */ jsx(ShopSection, { "aria-labelledby": headingId, "data-variant": "closing", bleed: true, className, ...props, children: /* @__PURE__ */ jsx(Page, { children: /* @__PURE__ */ jsxs("div", { className: cn("grid items-center gap-6 rounded-2xl bg-surface-1 p-4 sm:p-6 lg:gap-10 lg:p-8", hasMedia && "lg:grid-cols-[minmax(0,5fr)_minmax(0,6fr)]"), children: [
30
+ /* @__PURE__ */ jsx(ClosingMedia, { photo, mark }),
31
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col items-start gap-4", children: [
32
+ /* @__PURE__ */ jsx("h2", { id: headingId, className: "m-0 text-2xl font-bold leading-tight text-fg sm:text-3xl", children: title }),
33
+ body ? /* @__PURE__ */ jsx("p", { className: "m-0 max-w-prose text-[15px] leading-relaxed text-fg-secondary", children: body }) : null,
34
+ nextTime ? /* @__PURE__ */ jsxs("p", { className: "m-0 flex flex-wrap items-center gap-2 text-sm text-fg-secondary", children: [
35
+ nextTimeLabel ? /* @__PURE__ */ jsx("span", { children: nextTimeLabel }) : null,
36
+ /* @__PURE__ */ jsx(BlockLink, { href: nextTime.href, linkAs, className: "inline-flex min-h-11 items-center rounded-md border border-border-control bg-surface-2 px-3 text-sm font-semibold tabular-nums text-fg no-underline hover:border-accent hover:bg-accent-soft focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", children: nextTime.label })
37
+ ] }) : null,
38
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
39
+ /* @__PURE__ */ jsx(BlockLink, { href, linkAs, className: cn(buttonVariants({ variant: "primary", size: "lg" }), "no-underline"), children: actionLabel }),
40
+ secondary ? /* @__PURE__ */ jsx(BlockLink, { href: secondary.href, linkAs, className: cn(buttonVariants({ variant: "secondary", size: "lg" }), "no-underline"), children: secondary.label }) : null
41
+ ] })
42
+ ] })
43
+ ] }) }) });
44
+ }
45
+ function BookingSection({ variant = "strip", times = [], label, emptyLabel, href, actionLabel, title, body, linkAs, hideWhileVisible, photo, mark, nextTime, nextTimeLabel, secondary, className, ...props }) {
17
46
  const action = (size) => /* @__PURE__ */ jsx(BlockLink, { href, linkAs, className: cn(buttonVariants({ variant: "primary", size }), "no-underline"), children: actionLabel });
18
47
  if (variant === "sticky") {
19
48
  return /* @__PURE__ */ jsx(StickyAction, { hideWhileVisible, "data-variant": "sticky", className, ...props, children: /* @__PURE__ */ jsx(BlockLink, { href, linkAs, className: cn(buttonVariants({ variant: "primary", size: "lg" }), "w-full justify-center no-underline"), children: actionLabel }) });
20
49
  }
50
+ if (variant === "closing") {
51
+ return /* @__PURE__ */ jsx(ClosingCall, { title: title ?? label, body, photo, mark, nextTime, nextTimeLabel, secondary, href, actionLabel, linkAs, className, ...props });
52
+ }
21
53
  if (variant === "panel") {
22
54
  return /* @__PURE__ */ jsx(ShopSection, { "aria-label": typeof title === "string" ? title : label, "data-variant": "panel", className, ...props, children: /* @__PURE__ */ jsx(CtaPanel, { title: title ?? label, body, children: action("lg") }) });
23
55
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/shop/booking/booking.tsx"],"sourcesContent":["// Server-safe (the phone bar is a client island imported through its own entry). The way to book (ADR-007 §3): `strip` —\n// the next free times, one tap each, in one line; `panel` — the closing call; `sticky` — the phone bar, held at the bottom\n// edge and never over content. The times are resolved by the product: the section draws them, it never fetches.\nimport { buttonVariants } from \"@krizaka/ui/button\";\nimport { CtaPanel } from \"@krizaka/ui/cta-panel\";\nimport { StickyAction } from \"@krizaka/ui/sticky-action\";\nimport * as React from \"react\";\n\nimport { BlockLink, type LinkComponent } from \"../../block-link\";\nimport { cn } from \"../../cn\";\nimport { ShopSection } from \"../frame\";\n\nexport type BookingVariant = \"strip\" | \"panel\" | \"sticky\";\n\nexport type BookingTime = {\n id: string;\n /** In words, formatted by the app (`Today 4:30 pm`). */\n label: string;\n /** The booking page with this time chosen. */\n href: string;\n};\n\nexport type BookingSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"strip\" */\n variant?: BookingVariant;\n /** `strip`: the next free times, in order (the first `count`). */\n times?: readonly BookingTime[];\n /** `strip`: the group's name (`Next free times`). */\n label: string;\n /** `strip`: said when no time is free. */\n emptyLabel?: string;\n /** The booking page (`All times →`, `Book`). */\n href: string;\n /** The words of that link / button. */\n actionLabel: string;\n /** `panel`: the invitation (`Ready when you are`), and why. */\n title?: React.ReactNode;\n body?: React.ReactNode;\n linkAs?: LinkComponent;\n /** `sticky`: the selector of the page's own action (`#hero-book`): while it is on screen the bar hides. */\n hideWhileVisible?: string;\n};\n\n/** The way to book: the next free times, a closing call, or the phone bar. */\nexport function BookingSection({ variant = \"strip\", times = [], label, emptyLabel, href, actionLabel, title, body, linkAs, hideWhileVisible, className, ...props }: BookingSectionProps) {\n const action = (size: \"md\" | \"lg\") => (\n <BlockLink href={href} linkAs={linkAs} className={cn(buttonVariants({ variant: \"primary\", size }), \"no-underline\")}>\n {actionLabel}\n </BlockLink>\n );\n if (variant === \"sticky\") {\n return (\n <StickyAction hideWhileVisible={hideWhileVisible} data-variant=\"sticky\" className={className} {...(props as object)}>\n <BlockLink href={href} linkAs={linkAs} className={cn(buttonVariants({ variant: \"primary\", size: \"lg\" }), \"w-full justify-center no-underline\")}>\n {actionLabel}\n </BlockLink>\n </StickyAction>\n );\n }\n if (variant === \"panel\") {\n return (\n <ShopSection aria-label={typeof title === \"string\" ? title : label} data-variant=\"panel\" className={className} {...props}>\n <CtaPanel title={title ?? label} body={body}>\n {action(\"lg\")}\n </CtaPanel>\n </ShopSection>\n );\n }\n return (\n <ShopSection aria-label={label} data-variant=\"strip\" className={className} {...props}>\n <div className=\"flex flex-wrap items-center gap-x-3 gap-y-2 rounded-xl border border-border-default bg-surface-1 p-3 sm:px-4\">\n <p className=\"m-0 order-1 text-sm font-semibold text-fg\">{label}</p>\n {times.length > 0 ? (\n <ul className=\"m-0 order-3 grid w-full list-none grid-cols-2 gap-2 p-0 sm:order-2 sm:flex sm:w-auto sm:min-w-0 sm:flex-1 sm:flex-wrap\">\n {times.map((t) => (\n <li key={t.id}>\n <BlockLink href={t.href} linkAs={linkAs} className=\"inline-flex min-h-11 items-center rounded-md border border-border-control bg-surface-2 px-3 text-[13px] font-semibold tabular-nums text-fg no-underline hover:border-accent hover:bg-accent-soft focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\">\n {t.label}\n </BlockLink>\n </li>\n ))}\n </ul>\n ) : (\n <p className=\"m-0 order-3 w-full text-sm text-fg-secondary sm:order-2 sm:w-auto sm:flex-1\">{emptyLabel}</p>\n )}\n <BlockLink href={href} linkAs={linkAs} className=\"order-2 ml-auto inline-flex min-h-11 items-center gap-1 text-[13px] sm:order-3 font-semibold text-fg-accent no-underline hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\">\n {actionLabel} <span aria-hidden>→</span>\n </BlockLink>\n </div>\n </ShopSection>\n );\n}\n"],"mappings":";;;;;;;;;;;AAGA,SAAS,sBAAsB;AAC/B,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAyCzB,cAuCI,YAvCJ;AAFG,SAAS,eAAe,EAAE,UAAU,SAAS,QAAQ,CAAC,GAAG,OAAO,YAAY,MAAM,aAAa,OAAO,MAAM,QAAQ,kBAAkB,WAAW,GAAG,MAAM,GAAwB;AACvL,QAAM,SAAS,CAAC,SACd,oBAAC,aAAU,MAAY,QAAgB,WAAW,GAAG,eAAe,EAAE,SAAS,WAAW,KAAK,CAAC,GAAG,cAAc,GAC9G,uBACH;AAEF,MAAI,YAAY,UAAU;AACxB,WACE,oBAAC,gBAAa,kBAAoC,gBAAa,UAAS,WAAuB,GAAI,OACjG,8BAAC,aAAU,MAAY,QAAgB,WAAW,GAAG,eAAe,EAAE,SAAS,WAAW,MAAM,KAAK,CAAC,GAAG,oCAAoC,GAC1I,uBACH,GACF;AAAA,EAEJ;AACA,MAAI,YAAY,SAAS;AACvB,WACE,oBAAC,eAAY,cAAY,OAAO,UAAU,WAAW,QAAQ,OAAO,gBAAa,SAAQ,WAAuB,GAAG,OACjH,8BAAC,YAAS,OAAO,SAAS,OAAO,MAC9B,iBAAO,IAAI,GACd,GACF;AAAA,EAEJ;AACA,SACE,oBAAC,eAAY,cAAY,OAAO,gBAAa,SAAQ,WAAuB,GAAG,OAC7E,+BAAC,SAAI,WAAU,gHACb;AAAA,wBAAC,OAAE,WAAU,6CAA6C,iBAAM;AAAA,IAC/D,MAAM,SAAS,IACd,oBAAC,QAAG,WAAU,0HACX,gBAAM,IAAI,CAAC,MACV,oBAAC,QACC,8BAAC,aAAU,MAAM,EAAE,MAAM,QAAgB,WAAU,sRAChD,YAAE,OACL,KAHO,EAAE,EAIX,CACD,GACH,IAEA,oBAAC,OAAE,WAAU,+EAA+E,sBAAW;AAAA,IAEzG,qBAAC,aAAU,MAAY,QAAgB,WAAU,8NAC9C;AAAA;AAAA,MAAY;AAAA,MAAC,oBAAC,UAAK,eAAW,MAAC,oBAAC;AAAA,OACnC;AAAA,KACF,GACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/shop/booking/booking.tsx"],"sourcesContent":["// Server-safe (the phone bar is a client island imported through its own entry). The way to book (ADR-007 §3): `strip` —\n// the next free times, one tap each, in one line; `panel` — the closing call in a box; `closing` — the closing call of a look (the shop's photo or mark, the next free time, Book); `sticky` — the phone bar, held at the bottom\n// edge and never over content. The times are resolved by the product: the section draws them, it never fetches.\nimport { buttonVariants } from \"@krizaka/ui/button\";\nimport { CtaPanel } from \"@krizaka/ui/cta-panel\";\nimport { StickyAction } from \"@krizaka/ui/sticky-action\";\nimport * as React from \"react\";\n\nimport { BlockLink, type LinkComponent } from \"../../block-link\";\nimport { cn } from \"../../cn\";\nimport { Page } from \"../../page/page\";\nimport { type ShopPhoto, ShopSection } from \"../frame\";\nimport { Photo } from \"../photo\";\n\nexport type BookingVariant = \"strip\" | \"panel\" | \"closing\" | \"sticky\";\n\n/** `closing`: the second action beside « Book » (`Call`, `Directions`): the host chooses it from the shop's settings. */\nexport type BookingSecondary = { label: string; href: string };\n\nexport type BookingTime = {\n id: string;\n /** In words, formatted by the app (`Today 4:30 pm`). */\n label: string;\n /** The booking page with this time chosen. */\n href: string;\n};\n\nexport type BookingSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"strip\" */\n variant?: BookingVariant;\n /** `strip`: the next free times, in order (the first `count`). */\n times?: readonly BookingTime[];\n /** `strip`: the group's name (`Next free times`). */\n label: string;\n /** `strip`: said when no time is free. */\n emptyLabel?: string;\n /** The booking page (`All times →`, `Book`). */\n href: string;\n /** The words of that link / button. */\n actionLabel: string;\n /** `panel`: the invitation (`Ready when you are`), and why. */\n title?: React.ReactNode;\n body?: React.ReactNode;\n /** `closing`: the shop's photo, one the page does not already show (the host plans it). Wins over `mark`. */\n photo?: ShopPhoto;\n /** `closing`: the shop's mark, when there is no photo. Decorative (hidden from assistive technology). */\n mark?: React.ReactNode;\n /**\n * `closing`: the next free time (`Tomorrow 9 am`). On a closed day it is the next opening's. Absent, the call is the\n * title and the primary action alone: never an empty box.\n */\n nextTime?: BookingTime;\n /** `closing`: the words before the time (`Next free time`). */\n nextTimeLabel?: string;\n /** `closing`: « Call » or « Directions ». */\n secondary?: BookingSecondary;\n linkAs?: LinkComponent;\n /** `sticky`: the selector of the page's own action (`#hero-book`): while it is on screen the bar hides. */\n hideWhileVisible?: string;\n};\n\ntype ClosingCallProps = Omit<React.ComponentProps<\"section\">, \"title\"> &\n Pick<BookingSectionProps, \"body\" | \"photo\" | \"mark\" | \"nextTime\" | \"nextTimeLabel\" | \"secondary\" | \"href\" | \"actionLabel\" | \"linkAs\"> & { title: React.ReactNode };\n\n/** The photo, or the mark when there is none, or nothing: the call then reads on one column. */\nfunction ClosingMedia({ photo, mark }: Pick<BookingSectionProps, \"photo\" | \"mark\">) {\n if (photo) return <Photo photo={photo} ratio=\"4/3\" sizes=\"(min-width: 64rem) 36rem, calc(100vw - 2rem)\" />;\n if (!mark) return null;\n return (\n <div aria-hidden className=\"grid aspect-[4/3] w-full place-items-center overflow-hidden rounded-xl bg-accent-soft text-fg-accent [&>svg]:h-1/2 [&>svg]:w-auto\">\n {mark}\n </div>\n );\n}\n\nfunction ClosingCall({ title, body, photo, mark, nextTime, nextTimeLabel, secondary, href, actionLabel, linkAs, className, ...props }: ClosingCallProps) {\n const headingId = React.useId();\n const hasMedia = Boolean(photo ?? mark);\n return (\n <ShopSection aria-labelledby={headingId} data-variant=\"closing\" bleed className={className} {...props}>\n <Page>\n <div className={cn(\"grid items-center gap-6 rounded-2xl bg-surface-1 p-4 sm:p-6 lg:gap-10 lg:p-8\", hasMedia && \"lg:grid-cols-[minmax(0,5fr)_minmax(0,6fr)]\")}>\n <ClosingMedia photo={photo} mark={mark} />\n <div className=\"flex min-w-0 flex-col items-start gap-4\">\n <h2 id={headingId} className=\"m-0 text-2xl font-bold leading-tight text-fg sm:text-3xl\">\n {title}\n </h2>\n {body ? <p className=\"m-0 max-w-prose text-[15px] leading-relaxed text-fg-secondary\">{body}</p> : null}\n {nextTime ? (\n <p className=\"m-0 flex flex-wrap items-center gap-2 text-sm text-fg-secondary\">\n {nextTimeLabel ? <span>{nextTimeLabel}</span> : null}\n <BlockLink href={nextTime.href} linkAs={linkAs} className=\"inline-flex min-h-11 items-center rounded-md border border-border-control bg-surface-2 px-3 text-sm font-semibold tabular-nums text-fg no-underline hover:border-accent hover:bg-accent-soft focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\">\n {nextTime.label}\n </BlockLink>\n </p>\n ) : null}\n <div className=\"flex flex-wrap items-center gap-3\">\n <BlockLink href={href} linkAs={linkAs} className={cn(buttonVariants({ variant: \"primary\", size: \"lg\" }), \"no-underline\")}>\n {actionLabel}\n </BlockLink>\n {secondary ? (\n <BlockLink href={secondary.href} linkAs={linkAs} className={cn(buttonVariants({ variant: \"secondary\", size: \"lg\" }), \"no-underline\")}>\n {secondary.label}\n </BlockLink>\n ) : null}\n </div>\n </div>\n </div>\n </Page>\n </ShopSection>\n );\n}\n\n/** The way to book: the next free times, a closing call, or the phone bar. */\nexport function BookingSection({ variant = \"strip\", times = [], label, emptyLabel, href, actionLabel, title, body, linkAs, hideWhileVisible, photo, mark, nextTime, nextTimeLabel, secondary, className, ...props }: BookingSectionProps) {\n const action = (size: \"md\" | \"lg\") => (\n <BlockLink href={href} linkAs={linkAs} className={cn(buttonVariants({ variant: \"primary\", size }), \"no-underline\")}>\n {actionLabel}\n </BlockLink>\n );\n if (variant === \"sticky\") {\n return (\n <StickyAction hideWhileVisible={hideWhileVisible} data-variant=\"sticky\" className={className} {...(props as object)}>\n <BlockLink href={href} linkAs={linkAs} className={cn(buttonVariants({ variant: \"primary\", size: \"lg\" }), \"w-full justify-center no-underline\")}>\n {actionLabel}\n </BlockLink>\n </StickyAction>\n );\n }\n if (variant === \"closing\") {\n return <ClosingCall title={title ?? label} body={body} photo={photo} mark={mark} nextTime={nextTime} nextTimeLabel={nextTimeLabel} secondary={secondary} href={href} actionLabel={actionLabel} linkAs={linkAs} className={className} {...props} />;\n }\n if (variant === \"panel\") {\n return (\n <ShopSection aria-label={typeof title === \"string\" ? title : label} data-variant=\"panel\" className={className} {...props}>\n <CtaPanel title={title ?? label} body={body}>\n {action(\"lg\")}\n </CtaPanel>\n </ShopSection>\n );\n }\n return (\n <ShopSection aria-label={label} data-variant=\"strip\" className={className} {...props}>\n <div className=\"flex flex-wrap items-center gap-x-3 gap-y-2 rounded-xl border border-border-default bg-surface-1 p-3 sm:px-4\">\n <p className=\"m-0 order-1 text-sm font-semibold text-fg\">{label}</p>\n {times.length > 0 ? (\n <ul className=\"m-0 order-3 grid w-full list-none grid-cols-2 gap-2 p-0 sm:order-2 sm:flex sm:w-auto sm:min-w-0 sm:flex-1 sm:flex-wrap\">\n {times.map((t) => (\n <li key={t.id}>\n <BlockLink href={t.href} linkAs={linkAs} className=\"inline-flex min-h-11 items-center rounded-md border border-border-control bg-surface-2 px-3 text-[13px] font-semibold tabular-nums text-fg no-underline hover:border-accent hover:bg-accent-soft focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\">\n {t.label}\n </BlockLink>\n </li>\n ))}\n </ul>\n ) : (\n <p className=\"m-0 order-3 w-full text-sm text-fg-secondary sm:order-2 sm:w-auto sm:flex-1\">{emptyLabel}</p>\n )}\n <BlockLink href={href} linkAs={linkAs} className=\"order-2 ml-auto inline-flex min-h-11 items-center gap-1 text-[13px] sm:order-3 font-semibold text-fg-accent no-underline hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\">\n {actionLabel} <span aria-hidden>→</span>\n </BlockLink>\n </div>\n </ShopSection>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAGA,SAAS,sBAAsB;AAC/B,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,YAAY,WAAW;AA4DH,cAuBN,YAvBM;AADpB,SAAS,aAAa,EAAE,OAAO,KAAK,GAAgD;AAClF,MAAI,MAAO,QAAO,oBAAC,SAAM,OAAc,OAAM,OAAM,OAAM,gDAA+C;AACxG,MAAI,CAAC,KAAM,QAAO;AAClB,SACE,oBAAC,SAAI,eAAW,MAAC,WAAU,qIACxB,gBACH;AAEJ;AAEA,SAAS,YAAY,EAAE,OAAO,MAAM,OAAO,MAAM,UAAU,eAAe,WAAW,MAAM,aAAa,QAAQ,WAAW,GAAG,MAAM,GAAqB;AACvJ,QAAM,YAAkB,YAAM;AAC9B,QAAM,WAAW,QAAQ,SAAS,IAAI;AACtC,SACE,oBAAC,eAAY,mBAAiB,WAAW,gBAAa,WAAU,OAAK,MAAC,WAAuB,GAAG,OAC9F,8BAAC,QACC,+BAAC,SAAI,WAAW,GAAG,gFAAgF,YAAY,4CAA4C,GACzJ;AAAA,wBAAC,gBAAa,OAAc,MAAY;AAAA,IACxC,qBAAC,SAAI,WAAU,2CACb;AAAA,0BAAC,QAAG,IAAI,WAAW,WAAU,4DAC1B,iBACH;AAAA,MACC,OAAO,oBAAC,OAAE,WAAU,iEAAiE,gBAAK,IAAO;AAAA,MACjG,WACC,qBAAC,OAAE,WAAU,mEACV;AAAA,wBAAgB,oBAAC,UAAM,yBAAc,IAAU;AAAA,QAChD,oBAAC,aAAU,MAAM,SAAS,MAAM,QAAgB,WAAU,kRACvD,mBAAS,OACZ;AAAA,S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AY,OAAO,gBAAa,SAAQ,WAAuB,GAAG,OAC7E,+BAAC,SAAI,WAAU,gHACb;AAAA,wBAAC,OAAE,WAAU,6CAA6C,iBAAM;AAAA,IAC/D,MAAM,SAAS,IACd,oBAAC,QAAG,WAAU,0HACX,gBAAM,IAAI,CAAC,MACV,oBAAC,QACC,8BAAC,aAAU,MAAM,EAAE,MAAM,QAAgB,WAAU,sRAChD,YAAE,OACL,KAHO,EAAE,EAIX,CACD,GACH,IAEA,oBAAC,OAAE,WAAU,+EAA+E,sBAAW;AAAA,IAEzG,qBAAC,aAAU,MAAY,QAAgB,WAAU,8NAC9C;AAAA;AAAA,MAAY;AAAA,MAAC,oBAAC,UAAK,eAAW,MAAC,oBAAC;AAAA,OACnC;AAAA,KACF,GACF;AAEJ;","names":[]}
@@ -85,7 +85,7 @@ declare const SECTION_DEFINITIONS: readonly [SectionDefinitionOf<"hero", readonl
85
85
  service: z.ZodMiniObject<{
86
86
  serviceId: z.ZodMiniString<string>;
87
87
  }, z.core.$strip>;
88
- }>, SectionDefinitionOf<"booking", readonly ["strip", "panel", "sticky"], z.ZodMiniObject<{
88
+ }>, SectionDefinitionOf<"booking", readonly ["strip", "panel", "closing", "sticky"], z.ZodMiniObject<{
89
89
  serviceId: z.ZodMiniOptional<z.ZodMiniString<string>>;
90
90
  count: z.ZodMiniUnion<[z.ZodMiniLiteral<3 | 4 | 6>, z.ZodMiniLiteral<3 | 4 | 6>]>;
91
91
  }, z.core.$strip>, Record<never, never>>, SectionDefinitionOf<"gallery", readonly ["mosaic", "filmstrip", "wall", "grid"], z.ZodMiniObject<{