@krizaka/ui 3.67.1 → 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.
- package/README.md +1 -0
- package/dist/chunk-E4FMPPDL.js +134 -0
- package/dist/chunk-E4FMPPDL.js.map +1 -0
- package/dist/{chunk-E4X3V7QX.js → chunk-GRVIZTT2.js} +2 -2
- package/dist/chunk-PZ4FJOD5.js +44 -0
- package/dist/chunk-PZ4FJOD5.js.map +1 -0
- package/dist/{chunk-PFPOBIHL.js → chunk-T5NZSKWT.js} +15 -12
- package/dist/{chunk-PFPOBIHL.js.map → chunk-T5NZSKWT.js.map} +1 -1
- package/dist/{chunk-6BMKLAZ7.js → chunk-Z47KIPCT.js} +7 -2
- package/dist/{chunk-6BMKLAZ7.js.map → chunk-Z47KIPCT.js.map} +1 -1
- package/dist/copy-button.d.ts +29 -0
- package/dist/copy-button.js +56 -0
- package/dist/copy-button.js.map +1 -0
- package/dist/data-table.js +3 -3
- package/dist/date-picker.d.ts +15 -15
- package/dist/filter-bar.d.ts +3 -3
- package/dist/filter-bar.js +1 -1
- package/dist/genui.js +3 -3
- package/dist/index.js +3 -3
- package/dist/kind-config-editor.js +106 -129
- package/dist/kind-config-editor.js.map +1 -1
- package/dist/lightbox-D5NAHFEA.js +95 -0
- package/dist/lightbox-D5NAHFEA.js.map +1 -0
- package/dist/match-dialog.js +17 -140
- package/dist/match-dialog.js.map +1 -1
- package/dist/money-input.d.ts +29 -0
- package/dist/money-input.js +78 -0
- package/dist/money-input.js.map +1 -0
- package/dist/nav-bar.d.ts +28 -4
- package/dist/nav-bar.js +20 -10
- package/dist/nav-bar.js.map +1 -1
- package/dist/promo-code-field.d.ts +38 -0
- package/dist/promo-code-field.js +94 -0
- package/dist/promo-code-field.js.map +1 -0
- package/dist/radio-group.js +1 -1
- package/dist/retro-tv.d.ts +39 -4
- package/dist/retro-tv.js +217 -40
- package/dist/retro-tv.js.map +1 -1
- package/dist/shop/booking.d.ts +22 -3
- package/dist/shop/booking.js +33 -1
- package/dist/shop/booking.js.map +1 -1
- package/dist/shop-composer.d.ts +1 -1
- package/dist/shop-composer.js +109 -85
- package/dist/shop-composer.js.map +1 -1
- package/dist/shop-gallery.d.ts +47 -0
- package/dist/shop-gallery.js +121 -0
- package/dist/shop-gallery.js.map +1 -0
- package/dist/shop.d.ts +1 -1
- package/dist/shop.js +1 -1
- package/dist/shop.js.map +1 -1
- package/dist/status-chip.js +1 -1
- package/dist/tag-selector.js +5 -5
- package/dist/tag-selector.js.map +1 -1
- package/dist/terminal-replay.js +1 -1
- package/dist/virtual.d.ts +3 -3
- package/package.json +63 -5
- package/registry/account-menu.json +1 -1
- package/registry/account-settings.json +1 -1
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/activity-feed.json +1 -1
- package/registry/agenda.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/analysis-report.json +1 -1
- package/registry/anatomy-plate.json +1 -1
- package/registry/app-frame.json +2 -2
- package/registry/app-header.json +1 -1
- package/registry/app-shell.json +1 -1
- package/registry/argument-card.json +1 -1
- package/registry/audio-player.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/bird-plate.json +1 -1
- package/registry/button.json +1 -1
- package/registry/captcha.json +1 -1
- package/registry/card-grid.json +1 -1
- package/registry/card.json +1 -1
- package/registry/catalogue-page.json +1 -1
- package/registry/changelog-page.json +1 -1
- package/registry/chapter.json +1 -1
- package/registry/chat.json +1 -1
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip-row.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/choice-grid.json +1 -1
- package/registry/code-block.json +1 -1
- package/registry/collection-switcher.json +1 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/comparison-table.json +1 -1
- package/registry/component-page.json +1 -1
- package/registry/confirm-button.json +1 -1
- package/registry/contact-page.json +1 -1
- package/registry/continue-prompt.json +1 -1
- package/registry/copy-button.json +382 -0
- package/registry/countdown.json +1 -1
- package/registry/cover-hero.json +1 -1
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +1 -1
- package/registry/date-picker.json +1 -1
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +1 -1
- package/registry/desktop-window.json +1 -1
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +1 -1
- package/registry/docs-article-page.json +1 -1
- package/registry/docs-hub-page.json +1 -1
- package/registry/docs-layout.json +1 -1
- package/registry/docs-nav.json +1 -1
- package/registry/document-viewer.json +1 -1
- package/registry/doodle.json +1 -1
- package/registry/drop-overlay.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/elephant.json +2 -2
- package/registry/embed-facade.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/engine-flow.json +1 -1
- package/registry/entity-header.json +1 -1
- package/registry/environment-notice.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/examples/copy-button/default.d.ts +4 -0
- package/registry/examples/copy-button/default.js +11 -0
- package/registry/examples/copy-button/default.tsx +7 -0
- package/registry/examples/copy-button/icon-only.d.ts +4 -0
- package/registry/examples/copy-button/icon-only.js +11 -0
- package/registry/examples/copy-button/icon-only.tsx +7 -0
- package/registry/examples/money-input/currencies.d.ts +4 -0
- package/registry/examples/money-input/currencies.js +18 -0
- package/registry/examples/money-input/currencies.tsx +16 -0
- package/registry/examples/money-input/default.d.ts +4 -0
- package/registry/examples/money-input/default.js +18 -0
- package/registry/examples/money-input/default.tsx +16 -0
- package/registry/examples/promo-code-field/applied.d.ts +4 -0
- package/registry/examples/promo-code-field/applied.js +11 -0
- package/registry/examples/promo-code-field/applied.tsx +7 -0
- package/registry/examples/promo-code-field/default.d.ts +4 -0
- package/registry/examples/promo-code-field/default.js +19 -0
- package/registry/examples/promo-code-field/default.tsx +14 -0
- package/registry/examples/promo-code-field/expired.d.ts +4 -0
- package/registry/examples/promo-code-field/expired.js +11 -0
- package/registry/examples/promo-code-field/expired.tsx +7 -0
- package/registry/examples/retro-tv/playlist-channel.d.ts +4 -0
- package/registry/examples/retro-tv/playlist-channel.js +15 -0
- package/registry/examples/retro-tv/playlist-channel.tsx +10 -0
- package/registry/examples/retro-tv/playlist-crossfade.d.ts +4 -0
- package/registry/examples/retro-tv/playlist-crossfade.js +15 -0
- package/registry/examples/retro-tv/playlist-crossfade.tsx +10 -0
- package/registry/examples/retro-tv/playlist-slide.d.ts +4 -0
- package/registry/examples/retro-tv/playlist-slide.js +15 -0
- package/registry/examples/retro-tv/playlist-slide.tsx +10 -0
- package/registry/examples/shop/booking-closing-closed.d.ts +4 -0
- package/registry/examples/shop/booking-closing-closed.js +26 -0
- package/registry/examples/shop/booking-closing-closed.tsx +22 -0
- package/registry/examples/shop/booking-closing-mark.d.ts +4 -0
- package/registry/examples/shop/booking-closing-mark.js +13 -0
- package/registry/examples/shop/booking-closing-mark.tsx +12 -0
- package/registry/examples/shop/booking-closing.d.ts +4 -0
- package/registry/examples/shop/booking-closing.js +27 -0
- package/registry/examples/shop/booking-closing.tsx +23 -0
- package/registry/examples/shop-gallery/five.d.ts +4 -0
- package/registry/examples/shop-gallery/five.js +14 -0
- package/registry/examples/shop-gallery/five.tsx +10 -0
- package/registry/examples/shop-gallery/three.d.ts +4 -0
- package/registry/examples/shop-gallery/three.js +14 -0
- package/registry/examples/shop-gallery/three.tsx +10 -0
- package/registry/examples/shop-gallery/twelve.d.ts +4 -0
- package/registry/examples/shop-gallery/twelve.js +14 -0
- package/registry/examples/shop-gallery/twelve.tsx +10 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +1 -1
- package/registry/filter-bar.json +2 -2
- package/registry/flock.json +1 -1
- package/registry/footnote.json +1 -1
- package/registry/force-update-screen.json +1 -1
- package/registry/form.json +1 -1
- package/registry/gallery-page.json +1 -1
- package/registry/genui.json +1 -1
- package/registry/glossary-term.json +1 -1
- package/registry/glossary.json +1 -1
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/grade-stamp.json +1 -1
- package/registry/how-it-works-page.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +142 -10
- package/registry/iso.json +1 -1
- package/registry/kanban.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/kind-config-editor.json +1 -1
- package/registry/kpi-explained.json +1 -1
- package/registry/landing-page.json +1 -1
- package/registry/landscape.json +1 -1
- package/registry/language-switch.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +1 -1
- package/registry/list.json +1 -1
- package/registry/loader.json +1 -1
- package/registry/longform-page.json +1 -1
- package/registry/maintenance-screen.json +1 -1
- package/registry/map.json +2 -2
- package/registry/margin-layout.json +1 -1
- package/registry/markdown.json +1 -1
- package/registry/marketing-layout.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +1 -1
- package/registry/mascot-state.json +1 -1
- package/registry/mascots.json +1 -1
- package/registry/match-dialog.json +1 -1
- package/registry/media-capture.json +1 -1
- package/registry/media-gallery.json +1 -1
- package/registry/media-grid.json +1 -1
- package/registry/meta-row.json +1 -1
- package/registry/meter.json +1 -1
- package/registry/money-input.json +236 -0
- package/registry/nav-bar.json +22 -8
- package/registry/next-actions.json +1 -1
- package/registry/notification-preferences.json +1 -1
- package/registry/number-ticker.json +1 -1
- package/registry/opening-hours.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +1 -1
- package/registry/page-index.json +1 -1
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/photo-grid.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/pricing-page.json +1 -1
- package/registry/product-page.json +1 -1
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/promise-card.json +1 -1
- package/registry/promo-code-field.json +258 -0
- package/registry/qr-code.json +1 -1
- package/registry/quota-meter.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/rail-nav.json +2 -2
- package/registry/recipes.json +1 -1
- package/registry/retro-tv.json +120 -8
- package/registry/reviews.json +1 -1
- package/registry/router.json +1 -1
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +1 -1
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/service-card.json +1 -1
- package/registry/settings-layout.json +1 -1
- package/registry/shop-composer.json +1 -1
- package/registry/shop-gallery.json +209 -0
- package/registry/shop.json +30 -6
- package/registry/showcase.json +1 -1
- package/registry/signature.json +1 -1
- package/registry/site-cahier.json +1 -1
- package/registry/site-footer.json +2 -2
- package/registry/sites.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/skip-link.json +1 -1
- package/registry/slider.json +1 -1
- package/registry/slot-picker.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/specimen-tag.json +1 -1
- package/registry/speed-lines.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +1 -1
- package/registry/stat.json +1 -1
- package/registry/status-chip.json +1 -1
- package/registry/status-page.json +1 -1
- package/registry/step-progress.json +1 -1
- package/registry/step-showcase.json +1 -1
- package/registry/stepper.json +1 -1
- package/registry/sticky-action.json +1 -1
- package/registry/stuck.json +1 -1
- package/registry/swipe-deck.json +1 -1
- package/registry/switch.json +1 -1
- package/registry/tabs.json +1 -1
- package/registry/tag-input.json +1 -1
- package/registry/tag-selector.json +2 -2
- package/registry/taped-photo.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/text-style.json +1 -1
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/tree-view.json +1 -1
- package/registry/update-prompt.json +1 -1
- package/registry/upload-queue.json +1 -1
- package/registry/usage.json +1 -1
- package/registry/verified-badge.json +1 -1
- package/registry/versus-card.json +1 -1
- package/registry/vertical-video.json +1 -1
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/registry/virtual.json +1 -1
- package/registry/wall.json +1 -1
- package/registry/waveform.json +1 -1
- /package/dist/{chunk-E4X3V7QX.js.map → chunk-GRVIZTT2.js.map} +0 -0
package/dist/shop-composer.js
CHANGED
|
@@ -102,7 +102,7 @@ var servicesSection = defineSection({
|
|
|
102
102
|
});
|
|
103
103
|
var bookingSection = defineSection({
|
|
104
104
|
type: "booking",
|
|
105
|
-
variants: ["strip", "panel", "sticky"],
|
|
105
|
+
variants: ["strip", "panel", "closing", "sticky"],
|
|
106
106
|
settings: z3.object({
|
|
107
107
|
/** A service the times are for; absent, the next free times of any service. */
|
|
108
108
|
serviceId: z3.optional(ref),
|
|
@@ -332,7 +332,7 @@ function applyCommand(page, cmd) {
|
|
|
332
332
|
import { Button as Button4 } from "@krizaka/ui/button";
|
|
333
333
|
import { Dialog } from "@krizaka/ui/dialog";
|
|
334
334
|
import { RadioGroup as RadioGroup3 } from "@krizaka/ui/radio-group";
|
|
335
|
-
import * as
|
|
335
|
+
import * as React8 from "react";
|
|
336
336
|
|
|
337
337
|
// src/cn.ts
|
|
338
338
|
import { clsx } from "clsx";
|
|
@@ -443,7 +443,7 @@ function redo(h) {
|
|
|
443
443
|
// src/shop-composer/inspector.tsx
|
|
444
444
|
import { Button as Button2 } from "@krizaka/ui/button";
|
|
445
445
|
import { RadioGroup as RadioGroup2 } from "@krizaka/ui/radio-group";
|
|
446
|
-
import * as
|
|
446
|
+
import * as React6 from "react";
|
|
447
447
|
|
|
448
448
|
// src/shop-composer/keys.ts
|
|
449
449
|
var alphabet = "0123456789abcdef";
|
|
@@ -859,6 +859,7 @@ function Button({
|
|
|
859
859
|
import { buttonVariants as buttonVariants2 } from "@krizaka/ui/button";
|
|
860
860
|
import { CtaPanel } from "@krizaka/ui/cta-panel";
|
|
861
861
|
import { StickyAction } from "@krizaka/ui/sticky-action";
|
|
862
|
+
import * as React4 from "react";
|
|
862
863
|
|
|
863
864
|
// src/block-link.tsx
|
|
864
865
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
@@ -875,9 +876,6 @@ function BlockLink({
|
|
|
875
876
|
return /* @__PURE__ */ jsx4(Comp, { href, rel, ...props });
|
|
876
877
|
}
|
|
877
878
|
|
|
878
|
-
// src/shop/frame.tsx
|
|
879
|
-
import * as React3 from "react";
|
|
880
|
-
|
|
881
879
|
// src/page/page.tsx
|
|
882
880
|
import * as React2 from "react";
|
|
883
881
|
import { Fragment as Fragment3, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
@@ -916,6 +914,7 @@ function SectionHeading({ id, eyebrow, number, title, lead: lead2, actions, leve
|
|
|
916
914
|
}
|
|
917
915
|
|
|
918
916
|
// src/shop/frame.tsx
|
|
917
|
+
import * as React3 from "react";
|
|
919
918
|
import { Fragment as Fragment4, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
920
919
|
var PAPERS = { plain: void 0, seyes: "ruled", kraft: "kraft", washi: "washi" };
|
|
921
920
|
function ShopFrame({ preset, density = "compact", accent, paper = "plain", className, ...props }) {
|
|
@@ -934,30 +933,84 @@ function ShopSection({ id, title, eyebrow, lead: lead2, actions, bleed, first, c
|
|
|
934
933
|
] }) });
|
|
935
934
|
}
|
|
936
935
|
|
|
936
|
+
// src/shop/photo.tsx
|
|
937
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
938
|
+
var RATIOS = {
|
|
939
|
+
"1/1": "aspect-square",
|
|
940
|
+
"4/5": "aspect-[4/5]",
|
|
941
|
+
"3/4": "aspect-[3/4]",
|
|
942
|
+
"4/3": "aspect-[4/3]",
|
|
943
|
+
"3/2": "aspect-[3/2]",
|
|
944
|
+
"16/9": "aspect-video",
|
|
945
|
+
"21/9": "aspect-[21/9]"
|
|
946
|
+
};
|
|
947
|
+
function Photo({ photo, ratio, sizes, priority, className, ...props }) {
|
|
948
|
+
return /* @__PURE__ */ jsx7("div", { "data-shop-photo": "", "data-ratio": ratio, className: cn("relative w-full overflow-hidden bg-media", RATIOS[ratio], className), ...props, children: /* @__PURE__ */ jsx7(
|
|
949
|
+
"img",
|
|
950
|
+
{
|
|
951
|
+
src: photo.src,
|
|
952
|
+
srcSet: photo.srcSet,
|
|
953
|
+
sizes: photo.srcSet ? sizes : void 0,
|
|
954
|
+
alt: photo.alt,
|
|
955
|
+
loading: priority ? void 0 : "lazy",
|
|
956
|
+
fetchPriority: priority ? "high" : void 0,
|
|
957
|
+
decoding: "async",
|
|
958
|
+
className: "absolute inset-0 h-full w-full object-cover"
|
|
959
|
+
}
|
|
960
|
+
) });
|
|
961
|
+
}
|
|
962
|
+
|
|
937
963
|
// src/shop/booking/booking.tsx
|
|
938
|
-
import { jsx as
|
|
939
|
-
function
|
|
940
|
-
|
|
964
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
965
|
+
function ClosingMedia({ photo, mark }) {
|
|
966
|
+
if (photo) return /* @__PURE__ */ jsx8(Photo, { photo, ratio: "4/3", sizes: "(min-width: 64rem) 36rem, calc(100vw - 2rem)" });
|
|
967
|
+
if (!mark) return null;
|
|
968
|
+
return /* @__PURE__ */ jsx8("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 });
|
|
969
|
+
}
|
|
970
|
+
function ClosingCall({ title, body, photo, mark, nextTime, nextTimeLabel, secondary, href, actionLabel, linkAs, className, ...props }) {
|
|
971
|
+
const headingId = React4.useId();
|
|
972
|
+
const hasMedia = Boolean(photo ?? mark);
|
|
973
|
+
return /* @__PURE__ */ jsx8(ShopSection, { "aria-labelledby": headingId, "data-variant": "closing", bleed: true, className, ...props, children: /* @__PURE__ */ jsx8(Page, { children: /* @__PURE__ */ jsxs6("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: [
|
|
974
|
+
/* @__PURE__ */ jsx8(ClosingMedia, { photo, mark }),
|
|
975
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex min-w-0 flex-col items-start gap-4", children: [
|
|
976
|
+
/* @__PURE__ */ jsx8("h2", { id: headingId, className: "m-0 text-2xl font-bold leading-tight text-fg sm:text-3xl", children: title }),
|
|
977
|
+
body ? /* @__PURE__ */ jsx8("p", { className: "m-0 max-w-prose text-[15px] leading-relaxed text-fg-secondary", children: body }) : null,
|
|
978
|
+
nextTime ? /* @__PURE__ */ jsxs6("p", { className: "m-0 flex flex-wrap items-center gap-2 text-sm text-fg-secondary", children: [
|
|
979
|
+
nextTimeLabel ? /* @__PURE__ */ jsx8("span", { children: nextTimeLabel }) : null,
|
|
980
|
+
/* @__PURE__ */ jsx8(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 })
|
|
981
|
+
] }) : null,
|
|
982
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
983
|
+
/* @__PURE__ */ jsx8(BlockLink, { href, linkAs, className: cn(buttonVariants2({ variant: "primary", size: "lg" }), "no-underline"), children: actionLabel }),
|
|
984
|
+
secondary ? /* @__PURE__ */ jsx8(BlockLink, { href: secondary.href, linkAs, className: cn(buttonVariants2({ variant: "secondary", size: "lg" }), "no-underline"), children: secondary.label }) : null
|
|
985
|
+
] })
|
|
986
|
+
] })
|
|
987
|
+
] }) }) });
|
|
988
|
+
}
|
|
989
|
+
function BookingSection({ variant = "strip", times = [], label, emptyLabel, href, actionLabel, title, body, linkAs, hideWhileVisible, photo, mark, nextTime, nextTimeLabel, secondary, className, ...props }) {
|
|
990
|
+
const action = (size) => /* @__PURE__ */ jsx8(BlockLink, { href, linkAs, className: cn(buttonVariants2({ variant: "primary", size }), "no-underline"), children: actionLabel });
|
|
941
991
|
if (variant === "sticky") {
|
|
942
|
-
return /* @__PURE__ */
|
|
992
|
+
return /* @__PURE__ */ jsx8(StickyAction, { hideWhileVisible, "data-variant": "sticky", className, ...props, children: /* @__PURE__ */ jsx8(BlockLink, { href, linkAs, className: cn(buttonVariants2({ variant: "primary", size: "lg" }), "w-full justify-center no-underline"), children: actionLabel }) });
|
|
993
|
+
}
|
|
994
|
+
if (variant === "closing") {
|
|
995
|
+
return /* @__PURE__ */ jsx8(ClosingCall, { title: title ?? label, body, photo, mark, nextTime, nextTimeLabel, secondary, href, actionLabel, linkAs, className, ...props });
|
|
943
996
|
}
|
|
944
997
|
if (variant === "panel") {
|
|
945
|
-
return /* @__PURE__ */
|
|
998
|
+
return /* @__PURE__ */ jsx8(ShopSection, { "aria-label": typeof title === "string" ? title : label, "data-variant": "panel", className, ...props, children: /* @__PURE__ */ jsx8(CtaPanel, { title: title ?? label, body, children: action("lg") }) });
|
|
946
999
|
}
|
|
947
|
-
return /* @__PURE__ */
|
|
948
|
-
/* @__PURE__ */
|
|
949
|
-
times.length > 0 ? /* @__PURE__ */
|
|
1000
|
+
return /* @__PURE__ */ jsx8(ShopSection, { "aria-label": label, "data-variant": "strip", className, ...props, children: /* @__PURE__ */ jsxs6("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", children: [
|
|
1001
|
+
/* @__PURE__ */ jsx8("p", { className: "m-0 order-1 text-sm font-semibold text-fg", children: label }),
|
|
1002
|
+
times.length > 0 ? /* @__PURE__ */ jsx8("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", children: times.map((t) => /* @__PURE__ */ jsx8("li", { children: /* @__PURE__ */ jsx8(BlockLink, { href: t.href, 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", children: t.label }) }, t.id)) }) : /* @__PURE__ */ jsx8("p", { className: "m-0 order-3 w-full text-sm text-fg-secondary sm:order-2 sm:w-auto sm:flex-1", children: emptyLabel }),
|
|
950
1003
|
/* @__PURE__ */ jsxs6(BlockLink, { href, 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", children: [
|
|
951
1004
|
actionLabel,
|
|
952
1005
|
" ",
|
|
953
|
-
/* @__PURE__ */
|
|
1006
|
+
/* @__PURE__ */ jsx8("span", { "aria-hidden": true, children: "\u2192" })
|
|
954
1007
|
] })
|
|
955
1008
|
] }) });
|
|
956
1009
|
}
|
|
957
1010
|
|
|
958
1011
|
// src/shop/bulletin/bulletin.tsx
|
|
959
1012
|
import { PinnedNote } from "@krizaka/ui/wall";
|
|
960
|
-
import { jsx as
|
|
1013
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
961
1014
|
function liveFlyers(flyers, today) {
|
|
962
1015
|
return flyers.filter((f) => !f.until || f.until >= today).slice(0, SHOP_LIMITS.flyers);
|
|
963
1016
|
}
|
|
@@ -965,9 +1018,9 @@ function BulletinSection({ variant = "board", flyers, today, title, className, .
|
|
|
965
1018
|
const live = liveFlyers(flyers, today);
|
|
966
1019
|
if (live.length === 0) return null;
|
|
967
1020
|
if (variant === "banner") {
|
|
968
|
-
return /* @__PURE__ */
|
|
1021
|
+
return /* @__PURE__ */ jsx9("aside", { "aria-label": title, "data-variant": "banner", className: cn("border-b border-border-subtle bg-accent-soft", className), children: /* @__PURE__ */ jsx9("p", { className: "m-0 mx-auto max-w-6xl px-4 py-2 text-center text-[13px] font-medium text-fg", children: live[0].text }) });
|
|
969
1022
|
}
|
|
970
|
-
return /* @__PURE__ */
|
|
1023
|
+
return /* @__PURE__ */ jsx9(ShopSection, { title, className, "data-variant": "board", ...props, children: /* @__PURE__ */ jsx9("ul", { className: "m-0 grid list-none gap-4 p-0 sm:grid-cols-2 lg:grid-cols-3", children: live.map((f, i) => /* @__PURE__ */ jsx9("li", { children: /* @__PURE__ */ jsx9(PinnedNote, { text: f.text, signature: f.signature, rotation: [-1.2, 1, -0.6][i % 3], hold: i % 2 === 0 ? "tape" : "pin", lines: 3 }) }, f.id)) }) });
|
|
971
1024
|
}
|
|
972
1025
|
|
|
973
1026
|
// src/shop/demo/media.ts
|
|
@@ -1061,7 +1114,7 @@ var demoPets = {
|
|
|
1061
1114
|
};
|
|
1062
1115
|
|
|
1063
1116
|
// src/shop/faq/faq.tsx
|
|
1064
|
-
import { jsx as
|
|
1117
|
+
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1065
1118
|
function faqJsonLd(questions) {
|
|
1066
1119
|
const data = {
|
|
1067
1120
|
"@context": "https://schema.org",
|
|
@@ -1073,49 +1126,20 @@ function faqJsonLd(questions) {
|
|
|
1073
1126
|
function FaqSection({ title, questions, className, ...props }) {
|
|
1074
1127
|
if (questions.length === 0) return null;
|
|
1075
1128
|
return /* @__PURE__ */ jsxs7(ShopSection, { title, className, "data-variant": "list", ...props, children: [
|
|
1076
|
-
/* @__PURE__ */
|
|
1129
|
+
/* @__PURE__ */ jsx10("div", { className: "max-w-3xl divide-y divide-border-subtle border-y border-border-subtle", children: questions.map((q) => /* @__PURE__ */ jsxs7("details", { className: "group py-3", children: [
|
|
1077
1130
|
/* @__PURE__ */ jsxs7("summary", { className: "flex min-h-11 cursor-pointer list-none items-center justify-between gap-4 font-semibold text-fg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&::-webkit-details-marker]:hidden", children: [
|
|
1078
1131
|
q.question,
|
|
1079
|
-
/* @__PURE__ */
|
|
1132
|
+
/* @__PURE__ */ jsx10("span", { "aria-hidden": true, className: "shrink-0 text-fg-secondary transition-transform group-open:rotate-45 motion-reduce:transition-none", children: "+" })
|
|
1080
1133
|
] }),
|
|
1081
|
-
/* @__PURE__ */
|
|
1134
|
+
/* @__PURE__ */ jsx10("p", { className: "m-0 mt-2 text-[15px] leading-relaxed text-fg-secondary", children: q.answer })
|
|
1082
1135
|
] }, q.id)) }),
|
|
1083
|
-
/* @__PURE__ */
|
|
1136
|
+
/* @__PURE__ */ jsx10("script", { type: "application/ld+json", dangerouslySetInnerHTML: { __html: faqJsonLd(questions) } })
|
|
1084
1137
|
] });
|
|
1085
1138
|
}
|
|
1086
1139
|
|
|
1087
1140
|
// src/shop/gallery/gallery.tsx
|
|
1088
1141
|
import { MediaGallery } from "@krizaka/ui/media-gallery";
|
|
1089
1142
|
import { Wall } from "@krizaka/ui/wall";
|
|
1090
|
-
|
|
1091
|
-
// src/shop/photo.tsx
|
|
1092
|
-
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1093
|
-
var RATIOS = {
|
|
1094
|
-
"1/1": "aspect-square",
|
|
1095
|
-
"4/5": "aspect-[4/5]",
|
|
1096
|
-
"3/4": "aspect-[3/4]",
|
|
1097
|
-
"4/3": "aspect-[4/3]",
|
|
1098
|
-
"3/2": "aspect-[3/2]",
|
|
1099
|
-
"16/9": "aspect-video",
|
|
1100
|
-
"21/9": "aspect-[21/9]"
|
|
1101
|
-
};
|
|
1102
|
-
function Photo({ photo, ratio, sizes, priority, className, ...props }) {
|
|
1103
|
-
return /* @__PURE__ */ jsx10("div", { "data-shop-photo": "", "data-ratio": ratio, className: cn("relative w-full overflow-hidden bg-media", RATIOS[ratio], className), ...props, children: /* @__PURE__ */ jsx10(
|
|
1104
|
-
"img",
|
|
1105
|
-
{
|
|
1106
|
-
src: photo.src,
|
|
1107
|
-
srcSet: photo.srcSet,
|
|
1108
|
-
sizes: photo.srcSet ? sizes : void 0,
|
|
1109
|
-
alt: photo.alt,
|
|
1110
|
-
loading: priority ? void 0 : "lazy",
|
|
1111
|
-
fetchPriority: priority ? "high" : void 0,
|
|
1112
|
-
decoding: "async",
|
|
1113
|
-
className: "absolute inset-0 h-full w-full object-cover"
|
|
1114
|
-
}
|
|
1115
|
-
) });
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
// src/shop/gallery/gallery.tsx
|
|
1119
1143
|
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1120
1144
|
function wallLayout(count) {
|
|
1121
1145
|
const perRow = Math.min(5, Math.max(1, Math.ceil(count / 2)));
|
|
@@ -1282,7 +1306,7 @@ function ReviewsSection({ variant = "summary-cards", title, summary: summary2, r
|
|
|
1282
1306
|
import { Badge } from "@krizaka/ui/badge";
|
|
1283
1307
|
import { buttonVariants as buttonVariants3 } from "@krizaka/ui/button";
|
|
1284
1308
|
import { ServiceCard } from "@krizaka/ui/service-card";
|
|
1285
|
-
import * as
|
|
1309
|
+
import * as React5 from "react";
|
|
1286
1310
|
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1287
1311
|
var GROUP_NOTE = "m-0 font-mono text-[13px] lowercase text-fg-secondary";
|
|
1288
1312
|
function groupsOf(services, by) {
|
|
@@ -1331,7 +1355,7 @@ function MenuRow({ service, chooseLabel, popularLabel, linkAs }) {
|
|
|
1331
1355
|
}
|
|
1332
1356
|
function Menu({ services, groupBy, columns, aside, chooseLabel, popularLabel, listLabel, linkAs }) {
|
|
1333
1357
|
const groups = groupsOf(services, groupBy);
|
|
1334
|
-
const uid =
|
|
1358
|
+
const uid = React5.useId();
|
|
1335
1359
|
const list = /* @__PURE__ */ jsx15("div", { className: cn("grid gap-x-12", !aside && columns === 2 && "lg:grid-cols-2"), children: groups.map((g, i) => /* @__PURE__ */ jsxs11("div", { className: "mb-3 min-w-0 last:mb-0", children: [
|
|
1336
1360
|
g.name && /* @__PURE__ */ jsx15("p", { className: GROUP_NOTE, id: `${uid}-grp-${i}`, children: g.name }),
|
|
1337
1361
|
/* @__PURE__ */ jsx15("ul", { "aria-label": g.name ? void 0 : listLabel, "aria-labelledby": g.name ? `${uid}-grp-${i}` : void 0, className: "m-0 list-none p-0", children: g.items.map((s) => /* @__PURE__ */ jsx15(MenuRow, { service: s, chooseLabel, popularLabel, linkAs }, s.id)) })
|
|
@@ -1537,7 +1561,7 @@ function SectionThumbnail({ type, variant, preset, density }) {
|
|
|
1537
1561
|
// src/shop-composer/inspector.tsx
|
|
1538
1562
|
import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1539
1563
|
function Words({ section, m, run: run2 }) {
|
|
1540
|
-
const id =
|
|
1564
|
+
const id = React6.useId();
|
|
1541
1565
|
const text = section.text ?? {};
|
|
1542
1566
|
const field = (name, label) => /* @__PURE__ */ jsxs16("fieldset", { className: "m-0 grid gap-1.5 border-0 p-0", children: [
|
|
1543
1567
|
/* @__PURE__ */ jsx22("legend", { className: "mb-1 text-xs font-semibold text-fg-secondary", children: label }),
|
|
@@ -1617,7 +1641,7 @@ function defaultBlockSettings(type) {
|
|
|
1617
1641
|
}
|
|
1618
1642
|
function Inspector({ section, name, messages: m, run: run2, epoch, announce, onInvalid, preset, density }) {
|
|
1619
1643
|
const def = sectionDefinition(section.type);
|
|
1620
|
-
const label =
|
|
1644
|
+
const label = React6.useId();
|
|
1621
1645
|
return /* @__PURE__ */ jsxs16("div", { className: "flex min-w-0 flex-col gap-6", children: [
|
|
1622
1646
|
/* @__PURE__ */ jsxs16("section", { "aria-labelledby": label, className: "grid gap-2", children: [
|
|
1623
1647
|
/* @__PURE__ */ jsx22("h3", { id: label, className: "m-0 text-sm font-semibold text-fg", children: m.variant }),
|
|
@@ -1655,7 +1679,7 @@ function Inspector({ section, name, messages: m, run: run2, epoch, announce, onI
|
|
|
1655
1679
|
import { Button as Button3 } from "@krizaka/ui/button";
|
|
1656
1680
|
import { DropdownMenu } from "@krizaka/ui/dropdown-menu";
|
|
1657
1681
|
import { Switch as Switch2 } from "@krizaka/ui/switch";
|
|
1658
|
-
import * as
|
|
1682
|
+
import * as React7 from "react";
|
|
1659
1683
|
import { jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1660
1684
|
function sectionLabel(sections, index, messages) {
|
|
1661
1685
|
const s = sections[index];
|
|
@@ -1665,17 +1689,17 @@ function sectionLabel(sections, index, messages) {
|
|
|
1665
1689
|
}
|
|
1666
1690
|
var ICON = "h-4 w-4";
|
|
1667
1691
|
function Outline({ sections, selected, onSelect, run: run2, messages: m, announce, onAdd, focusRequest }) {
|
|
1668
|
-
const rows =
|
|
1669
|
-
const wanted =
|
|
1670
|
-
const [tick, setTick] =
|
|
1692
|
+
const rows = React7.useRef(/* @__PURE__ */ new Map());
|
|
1693
|
+
const wanted = React7.useRef(null);
|
|
1694
|
+
const [tick, setTick] = React7.useState(0);
|
|
1671
1695
|
const want = (key2) => {
|
|
1672
1696
|
wanted.current = key2;
|
|
1673
1697
|
setTick((t) => t + 1);
|
|
1674
1698
|
};
|
|
1675
|
-
|
|
1699
|
+
React7.useLayoutEffect(() => {
|
|
1676
1700
|
if (focusRequest) wanted.current = focusRequest.key;
|
|
1677
1701
|
}, [focusRequest]);
|
|
1678
|
-
|
|
1702
|
+
React7.useLayoutEffect(() => {
|
|
1679
1703
|
const key2 = wanted.current;
|
|
1680
1704
|
wanted.current = null;
|
|
1681
1705
|
if (key2) rows.current.get(key2)?.focus();
|
|
@@ -1813,21 +1837,21 @@ function PreviewFrame({ src, title, phone, frame }) {
|
|
|
1813
1837
|
}
|
|
1814
1838
|
function ShopComposer({ value, resetKey, onChange, onPublish, onDiscard, published, previewUrl, presets, foldedTypes = [], messages = defaultShopComposerMessages, className }) {
|
|
1815
1839
|
const m = messages;
|
|
1816
|
-
const [{ history, epoch }, dispatch] =
|
|
1840
|
+
const [{ history, epoch }, dispatch] = React8.useReducer(reducer, value, (v) => ({ history: createHistory(v), epoch: 0 }));
|
|
1817
1841
|
const page = history.present;
|
|
1818
|
-
const [baseline, setBaseline] =
|
|
1819
|
-
const [selected, setSelected] =
|
|
1820
|
-
const [step, setStep] =
|
|
1821
|
-
const [live, setLive] =
|
|
1822
|
-
const [status, setStatus] =
|
|
1823
|
-
const [adding, setAdding] =
|
|
1824
|
-
const [publishing, setPublishing] =
|
|
1825
|
-
const [device, setDevice] =
|
|
1826
|
-
const [previewOpen, setPreviewOpen] =
|
|
1827
|
-
const [invalid, setInvalid] =
|
|
1828
|
-
const [focusRequest, setFocusRequest] =
|
|
1829
|
-
const frame =
|
|
1830
|
-
const origin =
|
|
1842
|
+
const [baseline, setBaseline] = React8.useState(published ?? value);
|
|
1843
|
+
const [selected, setSelected] = React8.useState(page.sections[0]?.key ?? null);
|
|
1844
|
+
const [step, setStep] = React8.useState("list");
|
|
1845
|
+
const [live, setLive] = React8.useState("");
|
|
1846
|
+
const [status, setStatus] = React8.useState("idle");
|
|
1847
|
+
const [adding, setAdding] = React8.useState(false);
|
|
1848
|
+
const [publishing, setPublishing] = React8.useState(false);
|
|
1849
|
+
const [device, setDevice] = React8.useState("desktop");
|
|
1850
|
+
const [previewOpen, setPreviewOpen] = React8.useState(false);
|
|
1851
|
+
const [invalid, setInvalid] = React8.useState(/* @__PURE__ */ new Set());
|
|
1852
|
+
const [focusRequest, setFocusRequest] = React8.useState(null);
|
|
1853
|
+
const frame = React8.useRef(null);
|
|
1854
|
+
const origin = React8.useMemo(() => {
|
|
1831
1855
|
try {
|
|
1832
1856
|
return new URL(previewUrl, typeof location === "undefined" ? void 0 : location.href).origin;
|
|
1833
1857
|
} catch {
|
|
@@ -1835,9 +1859,9 @@ function ShopComposer({ value, resetKey, onChange, onPublish, onDiscard, publish
|
|
|
1835
1859
|
}
|
|
1836
1860
|
}, [previewUrl]);
|
|
1837
1861
|
const hasOrigin = origin !== "" && origin !== "null";
|
|
1838
|
-
const first =
|
|
1839
|
-
const saved =
|
|
1840
|
-
|
|
1862
|
+
const first = React8.useRef(true);
|
|
1863
|
+
const saved = React8.useRef(page);
|
|
1864
|
+
React8.useEffect(() => {
|
|
1841
1865
|
if (first.current) {
|
|
1842
1866
|
first.current = false;
|
|
1843
1867
|
return;
|
|
@@ -1848,12 +1872,12 @@ function ShopComposer({ value, resetKey, onChange, onPublish, onDiscard, publish
|
|
|
1848
1872
|
setBaseline(published ?? value);
|
|
1849
1873
|
setSelected(value.sections[0]?.key ?? null);
|
|
1850
1874
|
}, [resetKey]);
|
|
1851
|
-
const parsed =
|
|
1852
|
-
const announce =
|
|
1853
|
-
const exec =
|
|
1875
|
+
const parsed = React8.useMemo(() => parseShopPage(page), [page]);
|
|
1876
|
+
const announce = React8.useCallback((message) => setLive((prev) => prev === message ? message + String.fromCodePoint(8203) : message), []);
|
|
1877
|
+
const exec = React8.useCallback((cmd, merge) => dispatch({ type: "run", cmd, merge }), []);
|
|
1854
1878
|
const selectedSection = page.sections.find((s) => s.key === selected) ?? null;
|
|
1855
1879
|
const selectedIndex = selectedSection ? page.sections.indexOf(selectedSection) : -1;
|
|
1856
|
-
|
|
1880
|
+
React8.useEffect(() => {
|
|
1857
1881
|
if (page === saved.current || !parsed.ok || !onChange) return;
|
|
1858
1882
|
const timer = setTimeout(async () => {
|
|
1859
1883
|
setStatus("saving");
|
|
@@ -1868,7 +1892,7 @@ function ShopComposer({ value, resetKey, onChange, onPublish, onDiscard, publish
|
|
|
1868
1892
|
}, AUTOSAVE_MS);
|
|
1869
1893
|
return () => clearTimeout(timer);
|
|
1870
1894
|
}, [page, parsed.ok, onChange, origin, hasOrigin]);
|
|
1871
|
-
|
|
1895
|
+
React8.useEffect(() => {
|
|
1872
1896
|
if (selected && hasOrigin) postToPreview(frame.current?.contentWindow, origin, { source: "krizaka-shop-composer", type: "scroll", key: selected });
|
|
1873
1897
|
}, [selected, origin, hasOrigin]);
|
|
1874
1898
|
const select = (key2) => {
|
|
@@ -2006,7 +2030,7 @@ function ShopComposer({ value, resetKey, onChange, onPublish, onDiscard, publish
|
|
|
2006
2030
|
] }),
|
|
2007
2031
|
/* @__PURE__ */ jsx24(Dialog.Body, { children: [SECTION_DEFINITIONS.filter((d) => !foldedTypes.includes(d.type)), SECTION_DEFINITIONS.filter((d) => foldedTypes.includes(d.type))].map((group, g) => {
|
|
2008
2032
|
const list = /* @__PURE__ */ jsx24("ul", { className: "m-0 grid list-none gap-1 p-0", children: group.map((d) => /* @__PURE__ */ jsx24("li", { children: /* @__PURE__ */ jsx24(Button4, { variant: "ghost", className: "w-full justify-start", disabled: d.type === "hero" && page.sections.some((s) => s.type === "hero"), onClick: () => addSection2(d.type), children: m.sectionNames[d.type] }) }, d.type)) });
|
|
2009
|
-
return group.length === 0 ? null : g === 0 ? /* @__PURE__ */ jsx24(
|
|
2033
|
+
return group.length === 0 ? null : g === 0 ? /* @__PURE__ */ jsx24(React8.Fragment, { children: list }, g) : /* @__PURE__ */ jsxs18("details", { className: "mt-3", children: [
|
|
2010
2034
|
/* @__PURE__ */ jsx24("summary", { className: "min-h-9 cursor-pointer text-sm text-fg-secondary", children: "\u2026" }),
|
|
2011
2035
|
list
|
|
2012
2036
|
] }, g);
|