@krizaka/ui 3.74.0 → 3.76.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 +2 -6
- package/dist/blocks.css +2 -0
- package/dist/{chunk-GSQRSWOE.js → chunk-CEW3LQOZ.js} +520 -429
- package/dist/chunk-CEW3LQOZ.js.map +1 -0
- package/dist/{chunk-E4FMPPDL.js → chunk-WC3SO4CE.js} +2 -2
- package/dist/{chunk-KF7UB3LM.js → chunk-YQWYGQTV.js} +11 -9
- package/dist/{chunk-KF7UB3LM.js.map → chunk-YQWYGQTV.js.map} +1 -1
- package/dist/{chunk-M3GEYLMR.js → chunk-ZPOVOEO3.js} +1 -2
- package/dist/data-table.d.ts +1 -1
- package/dist/data-table.js +3 -3
- package/dist/filter-bar.d.ts +12 -4
- package/dist/filter-bar.js +1 -1
- package/dist/gallery-page.js +3 -3
- package/dist/genui.js +101 -35
- package/dist/genui.js.map +1 -1
- package/dist/language-switch.d.ts +9 -9
- package/dist/{lightbox-D5NAHFEA.js → lightbox-Q45BZ3HW.js} +3 -3
- package/dist/match-dialog.js +2 -2
- package/dist/motion.css +1 -25
- package/dist/native/list.js +1 -1
- package/dist/native/list.js.map +1 -1
- package/dist/native.d.ts +2 -54
- package/dist/native.js +464 -560
- package/dist/native.js.map +1 -1
- package/dist/nav-bar.js +1 -1
- package/dist/nav-bar.js.map +1 -1
- package/dist/product-page.js +3 -3
- package/dist/shop-gallery.js +1 -1
- package/dist/tag-selector.js +16 -10
- package/dist/tag-selector.js.map +1 -1
- package/dist/theme.d.ts +3 -1
- package/dist/theme.js +2 -1
- package/dist/theme.js.map +1 -1
- package/dist/vertical-video.js +1 -1
- package/dist/waveform.js.map +1 -1
- package/package.json +8 -84
- 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/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 +3 -3
- 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 +1 -1
- 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 +20 -20
- 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 +1 -1
- 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/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/image-cropper.json +1 -1
- package/registry/index.json +10 -185
- 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/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 +3 -14
- package/registry/meter.json +1 -1
- package/registry/money-input.json +1 -1
- package/registry/nav-bar.json +3 -3
- 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/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/price-catalogue-editor.json +1 -1
- package/registry/pricing-page.json +1 -1
- package/registry/product-page.json +2 -6
- 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 +1 -1
- package/registry/proposal.json +1 -1
- 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 +2 -3
- package/registry/reviews.json +1 -1
- package/registry/router.json +1 -1
- package/registry/schema-form.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 +3 -8
- package/registry/shop.json +2 -2
- package/registry/showcase.json +2 -7
- 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 +3 -4
- 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 +4 -4
- 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 +2 -6
- package/registry/video-player.json +2 -7
- package/registry/video-trimmer.json +3 -4
- package/registry/virtual.json +1 -1
- package/registry/wall.json +3 -9
- package/registry/waveform.json +4 -9
- package/dist/audio-player.d.ts +0 -115
- package/dist/audio-player.js +0 -211
- package/dist/audio-player.js.map +0 -1
- package/dist/chunk-GSQRSWOE.js.map +0 -1
- package/dist/chunk-YKOLME7R.js +0 -126
- package/dist/chunk-YKOLME7R.js.map +0 -1
- package/dist/how-it-works-page.d.ts +0 -49
- package/dist/how-it-works-page.js +0 -28
- package/dist/how-it-works-page.js.map +0 -1
- package/dist/marquee.d.ts +0 -34
- package/dist/marquee.js +0 -52
- package/dist/marquee.js.map +0 -1
- package/dist/media-grid.d.ts +0 -246
- package/dist/media-grid.js +0 -468
- package/dist/media-grid.js.map +0 -1
- package/dist/photo-grid.d.ts +0 -123
- package/dist/photo-grid.js +0 -94
- package/dist/photo-grid.js.map +0 -1
- package/registry/audio-player.json +0 -300
- package/registry/examples/audio-player/podcast.d.ts +0 -4
- package/registry/examples/audio-player/podcast.js +0 -22
- package/registry/examples/audio-player/podcast.tsx +0 -19
- package/registry/examples/audio-player/voice-note.d.ts +0 -4
- package/registry/examples/audio-player/voice-note.js +0 -12
- package/registry/examples/audio-player/voice-note.tsx +0 -12
- package/registry/examples/how-it-works-page/orazaka.d.ts +0 -4
- package/registry/examples/how-it-works-page/orazaka.js +0 -30
- package/registry/examples/how-it-works-page/orazaka.tsx +0 -26
- package/registry/examples/marquee/cards.d.ts +0 -4
- package/registry/examples/marquee/cards.js +0 -23
- package/registry/examples/marquee/cards.tsx +0 -21
- package/registry/examples/marquee/logos.d.ts +0 -4
- package/registry/examples/marquee/logos.js +0 -12
- package/registry/examples/marquee/logos.tsx +0 -17
- package/registry/examples/media-grid/feed.d.ts +0 -4
- package/registry/examples/media-grid/feed.js +0 -31
- package/registry/examples/media-grid/feed.tsx +0 -30
- package/registry/examples/media-grid/loading.d.ts +0 -4
- package/registry/examples/media-grid/loading.js +0 -28
- package/registry/examples/media-grid/loading.tsx +0 -25
- package/registry/examples/media-grid/uniform.d.ts +0 -4
- package/registry/examples/media-grid/uniform.js +0 -29
- package/registry/examples/media-grid/uniform.tsx +0 -26
- package/registry/examples/photo-grid/native/profile-photos.d.ts +0 -4
- package/registry/examples/photo-grid/native/profile-photos.dark.png +0 -0
- package/registry/examples/photo-grid/native/profile-photos.js +0 -27
- package/registry/examples/photo-grid/native/profile-photos.light.png +0 -0
- package/registry/examples/photo-grid/native/profile-photos.tsx +0 -24
- package/registry/examples/photo-grid/profile-photos.d.ts +0 -4
- package/registry/examples/photo-grid/profile-photos.js +0 -28
- package/registry/examples/photo-grid/profile-photos.tsx +0 -25
- package/registry/how-it-works-page.json +0 -258
- package/registry/marquee.json +0 -241
- package/registry/media-grid.json +0 -1034
- package/registry/photo-grid.json +0 -316
- /package/dist/{chunk-E4FMPPDL.js.map → chunk-WC3SO4CE.js.map} +0 -0
- /package/dist/{chunk-M3GEYLMR.js.map → chunk-ZPOVOEO3.js.map} +0 -0
- /package/dist/{lightbox-D5NAHFEA.js.map → lightbox-Q45BZ3HW.js.map} +0 -0
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-KH3JOEPY.js";
|
|
4
|
-
|
|
5
|
-
// src/how-it-works-page/how-it-works-page.tsx
|
|
6
|
-
import { CtaPanel } from "@krizaka/ui/cta-panel";
|
|
7
|
-
import { Section } from "@krizaka/ui/page";
|
|
8
|
-
import { PageHero } from "@krizaka/ui/page-hero";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
function HowItWorksPage({ brand, back, eyebrow, title, lead, aside, stepsLabel, steps, closing, linkAs, className, children, ...props }) {
|
|
11
|
-
return /* @__PURE__ */ jsxs("div", { className: cn(brand && "brand-" + brand, className), ...props, children: [
|
|
12
|
-
/* @__PURE__ */ jsx(PageHero, { back, linkAs, eyebrow, title, lead, aside }),
|
|
13
|
-
/* @__PURE__ */ jsx(Section, { "aria-label": stepsLabel, children: /* @__PURE__ */ jsx("ol", { className: "kz-tpl-timeline", children: steps.map((step, i) => /* @__PURE__ */ jsxs("li", { id: step.id, className: "kz-tpl-step", "data-reveal": "", children: [
|
|
14
|
-
/* @__PURE__ */ jsx("span", { className: "kz-tpl-step-n", "aria-hidden": true, children: i + 1 }),
|
|
15
|
-
/* @__PURE__ */ jsxs("div", { className: "kz-tpl-step-text", children: [
|
|
16
|
-
/* @__PURE__ */ jsx("h2", { children: step.title }),
|
|
17
|
-
/* @__PURE__ */ jsx("p", { children: step.text })
|
|
18
|
-
] }),
|
|
19
|
-
step.visual && /* @__PURE__ */ jsx("div", { className: "kz-tpl-step-visual", children: step.visual })
|
|
20
|
-
] }, step.id)) }) }),
|
|
21
|
-
children,
|
|
22
|
-
closing && /* @__PURE__ */ jsx(Section, { spacing: "sm", "aria-labelledby": "how-closing", children: /* @__PURE__ */ jsx(CtaPanel, { id: "how-closing", title: closing.title, body: closing.body, reveal: true, children: closing.actions }) })
|
|
23
|
-
] });
|
|
24
|
-
}
|
|
25
|
-
export {
|
|
26
|
-
HowItWorksPage
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=how-it-works-page.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/how-it-works-page/how-it-works-page.tsx"],"sourcesContent":["// Server-safe. How a product works, told in steps (blocks.css `.kz-tpl-timeline`): the hero, then a numbered line\n// down the page — each step its words beside its visual (a command, a schema, a screen), the sides alternating on a\n// wide screen, one column on a phone — then what is under the hood and the closing call.\nimport { CtaPanel } from \"@krizaka/ui/cta-panel\";\nimport { Section } from \"@krizaka/ui/page\";\nimport type { LinkComponent } from \"@krizaka/ui/page-hero\";\nimport { PageHero } from \"@krizaka/ui/page-hero\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport interface HowStep {\n /** A stable key (the step's anchor). */\n id: string;\n /** What happens, in a few words. */\n title: React.ReactNode;\n /** How, in two or three sentences. */\n text: React.ReactNode;\n /** Beside the words: a code block, a schema, a screen. */\n visual?: React.ReactNode;\n}\n\nexport type HowItWorksPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The brand the page wears (`.brand-<id>`). */\n brand?: string;\n /** The way back to the product. */\n back?: { href: string; label: string };\n /** A mono line above the title. */\n eyebrow?: React.ReactNode;\n /** The page's `h1`. */\n title: React.ReactNode;\n /** One or two sentences under it. */\n lead?: React.ReactNode;\n /** Beside the hero: the page's bird or an illustration. */\n aside?: React.ReactNode;\n /** The steps' accessible name (`The steps`). */\n stepsLabel: string;\n /** The steps, in order. */\n steps: readonly HowStep[];\n /** After the steps: architecture, guarantees, a module map. */\n children?: React.ReactNode;\n /** The closing call. */\n closing?: { title: React.ReactNode; body?: React.ReactNode; actions: React.ReactNode };\n /** The app's link component (Next's `Link`). */\n linkAs?: LinkComponent;\n};\n\n/** How a product works: the hero, a numbered timeline of steps with their visuals, then the details. */\nexport function HowItWorksPage({ brand, back, eyebrow, title, lead, aside, stepsLabel, steps, closing, linkAs, className, children, ...props }: HowItWorksPageProps) {\n return (\n <div className={cn(brand && \"brand-\" + brand, className)} {...props}>\n <PageHero back={back} linkAs={linkAs} eyebrow={eyebrow} title={title} lead={lead} aside={aside} />\n <Section aria-label={stepsLabel}>\n <ol className=\"kz-tpl-timeline\">\n {steps.map((step, i) => (\n <li key={step.id} id={step.id} className=\"kz-tpl-step\" data-reveal=\"\">\n <span className=\"kz-tpl-step-n\" aria-hidden>\n {i + 1}\n </span>\n <div className=\"kz-tpl-step-text\">\n <h2>{step.title}</h2>\n <p>{step.text}</p>\n </div>\n {step.visual && <div className=\"kz-tpl-step-visual\">{step.visual}</div>}\n </li>\n ))}\n </ol>\n </Section>\n {children}\n {closing && (\n <Section spacing=\"sm\" aria-labelledby=\"how-closing\">\n <CtaPanel id=\"how-closing\" title={closing.title} body={closing.body} reveal>\n {closing.actions}\n </CtaPanel>\n </Section>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;AAGA,SAAS,gBAAgB;AACzB,SAAS,eAAe;AAExB,SAAS,gBAAgB;AA6CnB,cAQQ,YARR;AAHC,SAAS,eAAe,EAAE,OAAO,MAAM,SAAS,OAAO,MAAM,OAAO,YAAY,OAAO,SAAS,QAAQ,WAAW,UAAU,GAAG,MAAM,GAAwB;AACnK,SACE,qBAAC,SAAI,WAAW,GAAG,SAAS,WAAW,OAAO,SAAS,GAAI,GAAG,OAC5D;AAAA,wBAAC,YAAS,MAAY,QAAgB,SAAkB,OAAc,MAAY,OAAc;AAAA,IAChG,oBAAC,WAAQ,cAAY,YACnB,8BAAC,QAAG,WAAU,mBACX,gBAAM,IAAI,CAAC,MAAM,MAChB,qBAAC,QAAiB,IAAI,KAAK,IAAI,WAAU,eAAc,eAAY,IACjE;AAAA,0BAAC,UAAK,WAAU,iBAAgB,eAAW,MACxC,cAAI,GACP;AAAA,MACA,qBAAC,SAAI,WAAU,oBACb;AAAA,4BAAC,QAAI,eAAK,OAAM;AAAA,QAChB,oBAAC,OAAG,eAAK,MAAK;AAAA,SAChB;AAAA,MACC,KAAK,UAAU,oBAAC,SAAI,WAAU,sBAAsB,eAAK,QAAO;AAAA,SAR1D,KAAK,EASd,CACD,GACH,GACF;AAAA,IACC;AAAA,IACA,WACC,oBAAC,WAAQ,SAAQ,MAAK,mBAAgB,eACpC,8BAAC,YAAS,IAAG,eAAc,OAAO,QAAQ,OAAO,MAAM,QAAQ,MAAM,QAAM,MACxE,kBAAQ,SACX,GACF;AAAA,KAEJ;AAEJ;","names":[]}
|
package/dist/marquee.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
type MarqueeProps = Omit<React.ComponentProps<"section">, "children"> & {
|
|
4
|
-
/** The accessible name of the band (“Our partners”) — passed translated. */
|
|
5
|
-
label: string;
|
|
6
|
-
/** The pause button's name (“Pause the band”) — passed translated. */
|
|
7
|
-
pauseLabel: string;
|
|
8
|
-
/** The same button's name once paused (“Play the band”) — passed translated. */
|
|
9
|
-
playLabel: string;
|
|
10
|
-
/** The items: logos, words, cards. */
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* Pixels per second.
|
|
14
|
-
* @default 40
|
|
15
|
-
*/
|
|
16
|
-
speed?: number;
|
|
17
|
-
/**
|
|
18
|
-
* Which way it slides.
|
|
19
|
-
* @default "left"
|
|
20
|
-
*/
|
|
21
|
-
direction?: "left" | "right";
|
|
22
|
-
/**
|
|
23
|
-
* The edges fade into the page.
|
|
24
|
-
* @default true
|
|
25
|
-
*/
|
|
26
|
-
fade?: boolean;
|
|
27
|
-
/** Starts paused. */
|
|
28
|
-
defaultPaused?: boolean;
|
|
29
|
-
};
|
|
30
|
-
/** A band of items sliding forever — pausable, accessible, still under reduced motion. */
|
|
31
|
-
declare function Marquee({ label, pauseLabel, playLabel, children, speed, direction, fade, defaultPaused, className, ...props }: MarqueeProps): React.JSX.Element;
|
|
32
|
-
|
|
33
|
-
export { Marquee };
|
|
34
|
-
export type { MarqueeProps };
|
package/dist/marquee.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
cn
|
|
4
|
-
} from "./chunk-NSLXEDIS.js";
|
|
5
|
-
|
|
6
|
-
// src/marquee/marquee.tsx
|
|
7
|
-
import * as React from "react";
|
|
8
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
function Marquee({ label, pauseLabel, playLabel, children, speed = 40, direction = "left", fade = true, defaultPaused = false, className, ...props }) {
|
|
10
|
-
const [paused, setPaused] = React.useState(defaultPaused);
|
|
11
|
-
const track = React.useRef(null);
|
|
12
|
-
React.useEffect(() => {
|
|
13
|
-
const el = track.current;
|
|
14
|
-
if (!el) return;
|
|
15
|
-
const measure = () => el.style.setProperty("--kz-marquee-duration", `${Math.max(4, el.scrollWidth / 2 / Math.max(1, speed))}s`);
|
|
16
|
-
measure();
|
|
17
|
-
const ro = new ResizeObserver(measure);
|
|
18
|
-
ro.observe(el);
|
|
19
|
-
return () => ro.disconnect();
|
|
20
|
-
}, [speed]);
|
|
21
|
-
return /* @__PURE__ */ jsxs("section", { "aria-label": label, "data-paused": paused ? "" : void 0, "data-direction": direction, "data-fade": fade ? "" : void 0, className: cn("kz-band group/marquee relative", className), ...props, children: [
|
|
22
|
-
/* @__PURE__ */ jsx(
|
|
23
|
-
"div",
|
|
24
|
-
{
|
|
25
|
-
tabIndex: 0,
|
|
26
|
-
className: "kz-band-viewport overflow-hidden rounded-lg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
|
|
27
|
-
children: /* @__PURE__ */ jsxs("div", { ref: track, className: "kz-marquee kz-loop", children: [
|
|
28
|
-
/* @__PURE__ */ jsx("ul", { className: "flex shrink-0 items-center gap-(--kz-band-gap) pr-(--kz-band-gap)", children: wrap(children) }),
|
|
29
|
-
/* @__PURE__ */ jsx("ul", { "aria-hidden": true, className: "kz-band-copy flex shrink-0 items-center gap-(--kz-band-gap) pr-(--kz-band-gap)", children: wrap(children) })
|
|
30
|
-
] })
|
|
31
|
-
}
|
|
32
|
-
),
|
|
33
|
-
/* @__PURE__ */ jsx(
|
|
34
|
-
"button",
|
|
35
|
-
{
|
|
36
|
-
type: "button",
|
|
37
|
-
"aria-pressed": paused,
|
|
38
|
-
"aria-label": paused ? playLabel : pauseLabel,
|
|
39
|
-
onClick: () => setPaused(!paused),
|
|
40
|
-
className: "absolute right-1 top-1/2 inline-flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-full border border-border-default bg-surface-1/90 text-fg-secondary opacity-0 shadow-sm transition-opacity hover:text-fg focus-visible:opacity-100 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring group-hover/marquee:opacity-100 aria-pressed:opacity-100 motion-reduce:hidden",
|
|
41
|
-
children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "h-3.5 w-3.5", fill: "currentColor", "aria-hidden": true, children: paused ? /* @__PURE__ */ jsx("path", { d: "M8 5.5v13l10-6.5Z" }) : /* @__PURE__ */ jsx("path", { d: "M7 5h3.5v14H7zM13.5 5H17v14h-3.5z" }) })
|
|
42
|
-
}
|
|
43
|
-
)
|
|
44
|
-
] });
|
|
45
|
-
}
|
|
46
|
-
function wrap(children) {
|
|
47
|
-
return React.Children.map(children, (child) => /* @__PURE__ */ jsx("li", { className: "shrink-0", children: child }));
|
|
48
|
-
}
|
|
49
|
-
export {
|
|
50
|
-
Marquee
|
|
51
|
-
};
|
|
52
|
-
//# sourceMappingURL=marquee.js.map
|
package/dist/marquee.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/marquee/marquee.tsx"],"sourcesContent":["// Client (a pause button, a measure). A band that slides — and that anyone can stop: it pauses under the pointer and\n// while something inside has the focus, it carries a visible pause button (WCAG 2.2.2: motion longer than 5 s can be\n// paused), its speed is in pixels per second whatever its width (a long band does not race), its copy is hidden from\n// assistive technology (each item is read once), and under reduced motion it is a still row you scroll by hand.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport type MarqueeProps = Omit<React.ComponentProps<\"section\">, \"children\"> & {\n /** The accessible name of the band (“Our partners”) — passed translated. */\n label: string;\n /** The pause button's name (“Pause the band”) — passed translated. */\n pauseLabel: string;\n /** The same button's name once paused (“Play the band”) — passed translated. */\n playLabel: string;\n /** The items: logos, words, cards. */\n children: React.ReactNode;\n /**\n * Pixels per second.\n * @default 40\n */\n speed?: number;\n /**\n * Which way it slides.\n * @default \"left\"\n */\n direction?: \"left\" | \"right\";\n /**\n * The edges fade into the page.\n * @default true\n */\n fade?: boolean;\n /** Starts paused. */\n defaultPaused?: boolean;\n};\n\n/** A band of items sliding forever — pausable, accessible, still under reduced motion. */\nexport function Marquee({ label, pauseLabel, playLabel, children, speed = 40, direction = \"left\", fade = true, defaultPaused = false, className, ...props }: MarqueeProps) {\n const [paused, setPaused] = React.useState(defaultPaused);\n const track = React.useRef<HTMLDivElement>(null);\n React.useEffect(() => {\n const el = track.current;\n if (!el) return;\n const measure = () => el.style.setProperty(\"--kz-marquee-duration\", `${Math.max(4, el.scrollWidth / 2 / Math.max(1, speed))}s`);\n measure();\n const ro = new ResizeObserver(measure);\n ro.observe(el);\n return () => ro.disconnect();\n }, [speed]);\n return (\n <section aria-label={label} data-paused={paused ? \"\" : undefined} data-direction={direction} data-fade={fade ? \"\" : undefined} className={cn(\"kz-band group/marquee relative\", className)} {...props}>\n {/* Focusable: the keyboard stops the band (focus-within) and, still under reduced motion, scrolls the row. */}\n <div\n tabIndex={0}\n className=\"kz-band-viewport overflow-hidden rounded-lg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\"\n >\n {/* Each copy ends with the gap: two copies are exactly twice one, so the loop never jumps. */}\n <div ref={track} className=\"kz-marquee kz-loop\">\n <ul className=\"flex shrink-0 items-center gap-(--kz-band-gap) pr-(--kz-band-gap)\">{wrap(children)}</ul>\n <ul aria-hidden className=\"kz-band-copy flex shrink-0 items-center gap-(--kz-band-gap) pr-(--kz-band-gap)\">\n {wrap(children)}\n </ul>\n </div>\n </div>\n <button\n type=\"button\"\n aria-pressed={paused}\n aria-label={paused ? playLabel : pauseLabel}\n onClick={() => setPaused(!paused)}\n className=\"absolute right-1 top-1/2 inline-flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-full border border-border-default bg-surface-1/90 text-fg-secondary opacity-0 shadow-sm transition-opacity hover:text-fg focus-visible:opacity-100 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring group-hover/marquee:opacity-100 aria-pressed:opacity-100 motion-reduce:hidden\"\n >\n <svg viewBox=\"0 0 24 24\" className=\"h-3.5 w-3.5\" fill=\"currentColor\" aria-hidden>\n {paused ? <path d=\"M8 5.5v13l10-6.5Z\" /> : <path d=\"M7 5h3.5v14H7zM13.5 5H17v14h-3.5z\" />}\n </svg>\n </button>\n </section>\n );\n}\n\nfunction wrap(children: React.ReactNode) {\n return React.Children.map(children, (child) => <li className=\"shrink-0\">{child}</li>);\n}\n"],"mappings":";;;;;;AAIA,YAAY,WAAW;AAqDf,SACE,KADF;AApBD,SAAS,QAAQ,EAAE,OAAO,YAAY,WAAW,UAAU,QAAQ,IAAI,YAAY,QAAQ,OAAO,MAAM,gBAAgB,OAAO,WAAW,GAAG,MAAM,GAAiB;AACzK,QAAM,CAAC,QAAQ,SAAS,IAAU,eAAS,aAAa;AACxD,QAAM,QAAc,aAAuB,IAAI;AAC/C,EAAM,gBAAU,MAAM;AACpB,UAAM,KAAK,MAAM;AACjB,QAAI,CAAC,GAAI;AACT,UAAM,UAAU,MAAM,GAAG,MAAM,YAAY,yBAAyB,GAAG,KAAK,IAAI,GAAG,GAAG,cAAc,IAAI,KAAK,IAAI,GAAG,KAAK,CAAC,CAAC,GAAG;AAC9H,YAAQ;AACR,UAAM,KAAK,IAAI,eAAe,OAAO;AACrC,OAAG,QAAQ,EAAE;AACb,WAAO,MAAM,GAAG,WAAW;AAAA,EAC7B,GAAG,CAAC,KAAK,CAAC;AACV,SACE,qBAAC,aAAQ,cAAY,OAAO,eAAa,SAAS,KAAK,QAAW,kBAAgB,WAAW,aAAW,OAAO,KAAK,QAAW,WAAW,GAAG,kCAAkC,SAAS,GAAI,GAAG,OAE7L;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV,WAAU;AAAA,QAGV,+BAAC,SAAI,KAAK,OAAO,WAAU,sBACzB;AAAA,8BAAC,QAAG,WAAU,qEAAqE,eAAK,QAAQ,GAAE;AAAA,UAClG,oBAAC,QAAG,eAAW,MAAC,WAAU,kFACvB,eAAK,QAAQ,GAChB;AAAA,WACF;AAAA;AAAA,IACF;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,gBAAc;AAAA,QACd,cAAY,SAAS,YAAY;AAAA,QACjC,SAAS,MAAM,UAAU,CAAC,MAAM;AAAA,QAChC,WAAU;AAAA,QAEV,8BAAC,SAAI,SAAQ,aAAY,WAAU,eAAc,MAAK,gBAAe,eAAW,MAC7E,mBAAS,oBAAC,UAAK,GAAE,qBAAoB,IAAK,oBAAC,UAAK,GAAE,qCAAoC,GACzF;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAEA,SAAS,KAAK,UAA2B;AACvC,SAAa,eAAS,IAAI,UAAU,CAAC,UAAU,oBAAC,QAAG,WAAU,YAAY,iBAAM,CAAK;AACtF;","names":[]}
|
package/dist/media-grid.d.ts
DELETED
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { L as LinkComponent } from './block-link-BAg4eoZk.js';
|
|
3
|
-
|
|
4
|
-
interface LoadMoreProps extends Omit<React.ComponentProps<"div">, "children" | "onError"> {
|
|
5
|
-
/** Asks for the next page. Not called while `loading`, nor once `hasMore` is false. */
|
|
6
|
-
onLoadMore: () => void;
|
|
7
|
-
/** There is a next page. */
|
|
8
|
-
hasMore: boolean;
|
|
9
|
-
/** A page is on its way. */
|
|
10
|
-
loading?: boolean;
|
|
11
|
-
/** The last page failed: the button reads `retryLabel`, and nothing loads by itself until it is pressed. */
|
|
12
|
-
failed?: boolean;
|
|
13
|
-
/** The button, passed translated ("Load more"). */
|
|
14
|
-
label: string;
|
|
15
|
-
/** The wait, passed translated ("Loading more videos"). */
|
|
16
|
-
loadingLabel: string;
|
|
17
|
-
/** The button after a failure, passed translated ("Try again"). Defaults to `label`. */
|
|
18
|
-
retryLabel?: string;
|
|
19
|
-
/** Shown instead of the button when the list is over, passed translated ("You have seen everything"). Nothing if absent. */
|
|
20
|
-
endLabel?: string;
|
|
21
|
-
/**
|
|
22
|
-
* How far below the viewport the page is already requested (an IntersectionObserver `rootMargin`).
|
|
23
|
-
* @default "900px 0px"
|
|
24
|
-
*/
|
|
25
|
-
rootMargin?: string;
|
|
26
|
-
}
|
|
27
|
-
/** Infinite scroll with a visible "Load more" under it. */
|
|
28
|
-
declare function LoadMore({ onLoadMore, hasMore, loading, failed, label, loadingLabel, retryLabel, endLabel, rootMargin, className, ...props }: LoadMoreProps): React.JSX.Element;
|
|
29
|
-
|
|
30
|
-
interface SectionHintProps {
|
|
31
|
-
/** The button's accessible name, passed translated (“What are Shorts?”). */
|
|
32
|
-
label: string;
|
|
33
|
-
/** The definition, in one line. */
|
|
34
|
-
text: string;
|
|
35
|
-
/** A link to the full definition (the glossary). */
|
|
36
|
-
link?: {
|
|
37
|
-
href: string;
|
|
38
|
-
label: string;
|
|
39
|
-
linkAs?: LinkComponent;
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
/** The definition of a section, one tap away from its heading. */
|
|
43
|
-
declare function SectionHint({ label, text, link }: SectionHintProps): React.JSX.Element;
|
|
44
|
-
|
|
45
|
-
interface ShortsShelfProps<T> extends Omit<React.ComponentProps<"section">, "children" | "title"> {
|
|
46
|
-
/** The shelf's accessible name ("Shorts"), passed translated; shown as its heading unless `title` is set. */
|
|
47
|
-
label: string;
|
|
48
|
-
/** A heading different from the name. */
|
|
49
|
-
title?: React.ReactNode;
|
|
50
|
-
/** A small “i” beside the heading: the one-line definition of the section and a link to the glossary. */
|
|
51
|
-
hint?: SectionHintProps;
|
|
52
|
-
/** The clips, in order. */
|
|
53
|
-
items: readonly T[];
|
|
54
|
-
/** A stable key for an item. */
|
|
55
|
-
getId: (item: T) => string;
|
|
56
|
-
/** One card: use `VideoCard aspect="portrait"`. */
|
|
57
|
-
renderItem: (item: T, index: number) => React.ReactNode;
|
|
58
|
-
/** Opens the vertical feed. */
|
|
59
|
-
seeAll?: {
|
|
60
|
-
href: string;
|
|
61
|
-
label: string;
|
|
62
|
-
linkAs?: LinkComponent;
|
|
63
|
-
};
|
|
64
|
-
/** The arrows' names, passed translated. */
|
|
65
|
-
previousLabel: string;
|
|
66
|
-
/** The next arrow's name. */
|
|
67
|
-
nextLabel: string;
|
|
68
|
-
}
|
|
69
|
-
/** A Shorts shelf: equal-height 9:16 cards in a snap-scrolling row. */
|
|
70
|
-
declare function ShortsShelf<T>({ label, title, hint, items, getId, renderItem, seeAll, previousLabel, nextLabel, className, ...props }: ShortsShelfProps<T>): React.JSX.Element | null;
|
|
71
|
-
|
|
72
|
-
/** A brand of the default avatars. */
|
|
73
|
-
type DefaultAvatarBrand = "krizaka" | "orazaka" | "yomizaka" | "akinaza";
|
|
74
|
-
/**
|
|
75
|
-
* What the picture is of. `person`: a neutral silhouette. `plain`: the brand's gradient alone, ready for initials.
|
|
76
|
-
* `folder`, `organisation` and `shop` are the pictures of a thing that is not a person (a folder or collection, a company, a shop):
|
|
77
|
-
* a glyph on the gradient, never a silhouette. The central sets of these kinds are in the Krizaka org JSON (`defaults`, `@krizaka/org`).
|
|
78
|
-
*/
|
|
79
|
-
type DefaultAvatarKind = "person" | "plain" | "folder" | "organisation" | "shop";
|
|
80
|
-
interface DefaultAvatar {
|
|
81
|
-
/** The brand of the product showing the avatar: its gradient, its hues. */
|
|
82
|
-
brand: DefaultAvatarBrand;
|
|
83
|
-
/** Any stable text or number of the person (their id): the same seed gives the same tone everywhere. */
|
|
84
|
-
seed?: string | number;
|
|
85
|
-
/** Force a tone, 1 to 6, instead of deriving it from `seed`. */
|
|
86
|
-
tone?: number;
|
|
87
|
-
/**
|
|
88
|
-
* `person` (default): a silhouette. `plain`: the gradient alone. `folder`, `organisation`, `shop`: that thing's glyph, drawn here
|
|
89
|
-
* (a data URL, no request) — a folder is never given a person.
|
|
90
|
-
* @default "person"
|
|
91
|
-
*/
|
|
92
|
-
kind?: DefaultAvatarKind;
|
|
93
|
-
/**
|
|
94
|
-
* The family's central set (`listDefaults("person")` of `@krizaka/org`): when given with a `seed`, the avatar is the set's picture for that seed —
|
|
95
|
-
* the same person has the same picture in every product — instead of the brand's silhouette. An empty set, or no seed, draws the silhouette.
|
|
96
|
-
*/
|
|
97
|
-
set?: readonly DefaultAvatarPicture[];
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* One picture of the family's central set, as `@krizaka/org` lists it (`listDefaults("person")` items fit as they are): the sizes it is served in.
|
|
101
|
-
* `disabled` pictures are never picked.
|
|
102
|
-
*/
|
|
103
|
-
interface DefaultAvatarPicture {
|
|
104
|
-
id: string;
|
|
105
|
-
disabled?: boolean;
|
|
106
|
-
urls: {
|
|
107
|
-
webp: Readonly<Record<string, string>>;
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
type VideoCardAspect = "landscape" | "portrait";
|
|
112
|
-
interface VideoCardCreator {
|
|
113
|
-
/** The creator's name. */
|
|
114
|
-
name: string;
|
|
115
|
-
/** Their photo. */
|
|
116
|
-
avatarSrc?: string | null;
|
|
117
|
-
/** Their profile. */
|
|
118
|
-
href?: string;
|
|
119
|
-
/** The Krizaka default picture when there is no photo (a brand and a seed). */
|
|
120
|
-
defaultAvatar?: DefaultAvatar;
|
|
121
|
-
}
|
|
122
|
-
interface VideoCardProps extends Omit<React.ComponentProps<"article">, "title"> {
|
|
123
|
-
/** The title; it names the card and is its link. */
|
|
124
|
-
title: string;
|
|
125
|
-
/** Where the card opens. */
|
|
126
|
-
href: string;
|
|
127
|
-
/** The app's router link (Next's `Link`). */
|
|
128
|
-
linkAs?: LinkComponent;
|
|
129
|
-
/**
|
|
130
|
-
* The frame: `landscape` (16:9) or `portrait` (9:16).
|
|
131
|
-
* @default "landscape"
|
|
132
|
-
*/
|
|
133
|
-
aspect?: VideoCardAspect;
|
|
134
|
-
/**
|
|
135
|
-
* `stack` (picture over text) or `row` (picture beside the text: the list mode of a section).
|
|
136
|
-
* @default "stack"
|
|
137
|
-
*/
|
|
138
|
-
layout?: "stack" | "row";
|
|
139
|
-
/** The picture. */
|
|
140
|
-
poster?: string | null;
|
|
141
|
-
/**
|
|
142
|
-
* An animated picture (WebP, a few hundred kB) that fades in over the poster once the pointer has rested on the card
|
|
143
|
-
* (or it is focused) for `previewDelay`, and is removed again on leave. It is never requested before. On a phone (no
|
|
144
|
-
* hover) only the card most inside the viewport plays it, unless the person asked for less data or less motion.
|
|
145
|
-
*/
|
|
146
|
-
previewSrc?: string | null;
|
|
147
|
-
/**
|
|
148
|
-
* How long the pointer must rest before the preview is requested, in ms: a pointer crossing the grid loads nothing.
|
|
149
|
-
* @default 200
|
|
150
|
-
*/
|
|
151
|
-
previewDelay?: number;
|
|
152
|
-
/**
|
|
153
|
-
* `fetchPriority` of the poster: `high` for the first row (the largest contentful paint).
|
|
154
|
-
* @default "auto"
|
|
155
|
-
*/
|
|
156
|
-
posterPriority?: "high" | "low" | "auto";
|
|
157
|
-
/**
|
|
158
|
-
* `cover` fills the frame; `contain` draws the whole picture over a blurred copy of itself (a source of the other
|
|
159
|
-
* orientation: no cropped face, no black bar).
|
|
160
|
-
* @default "cover"
|
|
161
|
-
*/
|
|
162
|
-
fit?: "cover" | "contain";
|
|
163
|
-
/** The length, already formatted (`3:42`). */
|
|
164
|
-
duration?: string;
|
|
165
|
-
/** Badges at the top-left of the picture (Free, a price, 18+). Put them on `scrim` so they read in both themes. */
|
|
166
|
-
badges?: React.ReactNode;
|
|
167
|
-
/** Who made it: name, photo, profile. */
|
|
168
|
-
creator?: VideoCardCreator;
|
|
169
|
-
/** What is counted (`12.4K views`), already formatted. */
|
|
170
|
-
meta?: React.ReactNode;
|
|
171
|
-
/** One quick action at the end of the footer (a tip, a save). Its clicks must not follow the card's link. */
|
|
172
|
-
action?: React.ReactNode;
|
|
173
|
-
/** A sensitive picture: blurred and scaled so nothing shows (put the reveal button in `overlay`). */
|
|
174
|
-
blurred?: boolean;
|
|
175
|
-
/** Over the whole picture, above the card's link (a veil, a reveal button). */
|
|
176
|
-
overlay?: React.ReactNode;
|
|
177
|
-
/** Shown instead of the picture while there is none. */
|
|
178
|
-
fallback?: React.ReactNode;
|
|
179
|
-
/** `eager` for the first cards of a page. */
|
|
180
|
-
loading?: "lazy" | "eager";
|
|
181
|
-
}
|
|
182
|
-
/** A video card whose frame, body and footer have one height per aspect, so a grid row or a shelf never staggers. */
|
|
183
|
-
declare function VideoCard({ title, href, linkAs, aspect, layout, poster, previewSrc, previewDelay, posterPriority, fit, duration, badges, creator, meta, action, fallback, blurred, overlay, loading, className, onMouseEnter, onMouseLeave, onFocus, onBlur, ref, ...props }: VideoCardProps): React.JSX.Element;
|
|
184
|
-
|
|
185
|
-
interface MediaGridState {
|
|
186
|
-
/** The frame the card is drawn in (`aspect` of `VideoCard`). */
|
|
187
|
-
aspect: VideoCardAspect;
|
|
188
|
-
/** The card's `layout`. */
|
|
189
|
-
layout: "stack" | "row";
|
|
190
|
-
/** The source's orientation differs from the frame: pass `fit="contain"`. */
|
|
191
|
-
mismatch: boolean;
|
|
192
|
-
}
|
|
193
|
-
interface MediaGridProps<T> extends Omit<React.ComponentProps<"div">, "children"> {
|
|
194
|
-
/** The videos, in order. */
|
|
195
|
-
items: readonly T[];
|
|
196
|
-
/** A stable key for an item. */
|
|
197
|
-
getId: (item: T) => string;
|
|
198
|
-
/** The source's orientation (from its width and height). */
|
|
199
|
-
orientationOf: (item: T) => VideoCardAspect;
|
|
200
|
-
/** One card, drawn in the frame the grid gives (`state`): use `VideoCard`. */
|
|
201
|
-
renderItem: (item: T, state: MediaGridState) => React.ReactNode;
|
|
202
|
-
/**
|
|
203
|
-
* `split`: verticals on the shelf, the others in the grid · `uniform`: all in one frame (`frame`).
|
|
204
|
-
* @default "split"
|
|
205
|
-
*/
|
|
206
|
-
mode?: "split" | "uniform";
|
|
207
|
-
/** The frame of `uniform`. @default "landscape" */
|
|
208
|
-
frame?: VideoCardAspect;
|
|
209
|
-
/** `grid` or `list` (one row per video). @default "grid" */
|
|
210
|
-
layout?: "grid" | "list";
|
|
211
|
-
/** The shelf of `split`: its name, "See all" and arrows, passed translated. */
|
|
212
|
-
shelf: Pick<ShortsShelfProps<unknown>, "label" | "title" | "hint" | "seeAll" | "previousLabel" | "nextLabel">;
|
|
213
|
-
/** A heading for the grid of the others (“Videos”), in the style of the shelf's, with an optional definition. */
|
|
214
|
-
grid?: {
|
|
215
|
-
label: string;
|
|
216
|
-
hint?: SectionHintProps;
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
/** A media grid that never mixes heights badly: a shelf for the 9:16, a uniform grid for the rest. */
|
|
220
|
-
declare function MediaGrid<T>({ items, getId, orientationOf, renderItem, mode, frame, layout, shelf, grid, className, ...props }: MediaGridProps<T>): React.JSX.Element;
|
|
221
|
-
|
|
222
|
-
interface VideoCardSkeletonProps extends React.ComponentProps<"div"> {
|
|
223
|
-
/** `landscape` (16:9) or `portrait` (9:16), as the card it stands for. @default "landscape" */
|
|
224
|
-
aspect?: VideoCardAspect;
|
|
225
|
-
/** `stack` or `row`, as the card it stands for. @default "stack" */
|
|
226
|
-
layout?: "stack" | "row";
|
|
227
|
-
}
|
|
228
|
-
/** The placeholder of a `VideoCard` (decorative: announce the wait on the list, with `MediaGridSkeleton`). */
|
|
229
|
-
declare function VideoCardSkeleton({ aspect, layout, className, ...props }: VideoCardSkeletonProps): React.JSX.Element;
|
|
230
|
-
interface MediaGridSkeletonProps extends Omit<React.ComponentProps<"div">, "children"> {
|
|
231
|
-
/** What is loading, passed translated ("Loading videos"): announced once, the cards are hidden from assistive technology. */
|
|
232
|
-
label: string;
|
|
233
|
-
/** Cards in the grid. @default 8 */
|
|
234
|
-
count?: number;
|
|
235
|
-
/** Cards on the Shorts shelf above the grid (`split` mode); 0 for none. @default 0 */
|
|
236
|
-
shelfCount?: number;
|
|
237
|
-
/** `grid` or `list`. @default "grid" */
|
|
238
|
-
layout?: "grid" | "list";
|
|
239
|
-
/** The frame of the grid. @default "landscape" */
|
|
240
|
-
frame?: VideoCardAspect;
|
|
241
|
-
}
|
|
242
|
-
/** The placeholder of a `MediaGrid`: the same shelf and grid, skeleton cards, one polite announcement. */
|
|
243
|
-
declare function MediaGridSkeleton({ label, count, shelfCount, layout, frame, className, ...props }: MediaGridSkeletonProps): React.JSX.Element;
|
|
244
|
-
|
|
245
|
-
export { LoadMore, MediaGrid, MediaGridSkeleton, SectionHint, ShortsShelf, VideoCard, VideoCardSkeleton };
|
|
246
|
-
export type { LoadMoreProps, MediaGridProps, MediaGridSkeletonProps, MediaGridState, SectionHintProps, ShortsShelfProps, VideoCardAspect, VideoCardCreator, VideoCardProps, VideoCardSkeletonProps };
|