@orbitcommerce/constellation-docs 0.0.0-stage → 1.2.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/LICENSE.md +6 -0
- package/README.md +6 -2
- package/dist/docs.css +20787 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +308 -0
- package/dist/pages/Playground-Mk1yIWXb.js +129 -0
- package/dist/pages/_address-data-L9BR499w.js +161 -0
- package/dist/pages/_builder-demo-C0eJUmPU.js +282 -0
- package/dist/pages/_card-art-0be5ncyV.js +18 -0
- package/dist/pages/_conversation-samples-Bq7cn-4d.js +70 -0
- package/dist/pages/_figures-data-DaDvB7Nm.js +606 -0
- package/dist/pages/_foundations-blXWyYh8.js +30 -0
- package/dist/pages/_kpi-examples-DeGCBB9T.js +208 -0
- package/dist/pages/_overlays-specimens-bawR331Z.js +320 -0
- package/dist/pages/_preview-specimens-DKQC9HAo.js +153 -0
- package/dist/pages/accordion-Sg0TUqxB.js +1036 -0
- package/dist/pages/address-autocomplete-DP0PUOlK.js +360 -0
- package/dist/pages/address-block-BZOOOPA9.js +368 -0
- package/dist/pages/address-fields-CwSqro3W.js +277 -0
- package/dist/pages/ai-highlight-D3x2vD83.js +642 -0
- package/dist/pages/alert-D3i7xZTU.js +914 -0
- package/dist/pages/anchored-overlay-BV0OCu2Q.js +788 -0
- package/dist/pages/app-shell-D4hdlHps.js +1558 -0
- package/dist/pages/area-chart-BEWFwiB2.js +718 -0
- package/dist/pages/avatar-BFEqQViw.js +895 -0
- package/dist/pages/avatar-upload-BDCzJfyN.js +484 -0
- package/dist/pages/badge-0-PyMrih.js +1035 -0
- package/dist/pages/bar-chart-DkLogYlt.js +1060 -0
- package/dist/pages/bar-fold-B-3XeIDZ.js +360 -0
- package/dist/pages/board-card-D2tZY_mU.js +415 -0
- package/dist/pages/brand-mark-BqiLvFSR.js +417 -0
- package/dist/pages/button-DAyfssDY.js +715 -0
- package/dist/pages/calendar-Ds7KsgSI.js +682 -0
- package/dist/pages/canvas-stage-1KiPspkX.js +472 -0
- package/dist/pages/card-CQEM1_wc.js +1567 -0
- package/dist/pages/caret-suggestions-oHI6QvqW.js +526 -0
- package/dist/pages/chart-legend-B20AbakD.js +724 -0
- package/dist/pages/chat-composer-CwzUJYIa.js +437 -0
- package/dist/pages/checkbox-BG9Zkb6j.js +1581 -0
- package/dist/pages/checklist-card-DEyykVFS.js +783 -0
- package/dist/pages/chip-Ck-o3Ui6.js +839 -0
- package/dist/pages/chip-list-k1LxXuCi.js +414 -0
- package/dist/pages/clamp-text-n-iE8RDR.js +203 -0
- package/dist/pages/coachmark-Be2ghobT.js +366 -0
- package/dist/pages/code-block-Dv_Y5GYq.js +622 -0
- package/dist/pages/collab-field-CfqqK7d2.js +696 -0
- package/dist/pages/color-field-CZpfcA-A.js +1127 -0
- package/dist/pages/colour-q2ntvI0w.js +1974 -0
- package/dist/pages/column-mapper-TsTG39cl.js +502 -0
- package/dist/pages/combobox-DvK2j5tI.js +1334 -0
- package/dist/pages/command-palette-CJ7uBA04.js +1386 -0
- package/dist/pages/comment-box-CDSGYhr5.js +346 -0
- package/dist/pages/composer-D4B0NgpA.js +689 -0
- package/dist/pages/condition-builder-BZy2ZGXe.js +715 -0
- package/dist/pages/conflict-chooser-C--_9UIS.js +210 -0
- package/dist/pages/context-menu-F9DV30ia.js +487 -0
- package/dist/pages/copy-button-Cn7WiKRF.js +568 -0
- package/dist/pages/copy-field-D3Xt3Jq6.js +511 -0
- package/dist/pages/danger-zone-Db_UUeiP.js +564 -0
- package/dist/pages/date-input-GOW067EB.js +956 -0
- package/dist/pages/date-picker-GdBciR99.js +1569 -0
- package/dist/pages/date-time-BLKCXtVZ.js +678 -0
- package/dist/pages/delta-CNAGv8JY.js +779 -0
- package/dist/pages/description-list-BPeXn1eW.js +1268 -0
- package/dist/pages/device-switcher-BCaN99c1.js +554 -0
- package/dist/pages/dialog-CRpkRC98.js +3164 -0
- package/dist/pages/docs-lM2UBSir.js +520 -0
- package/dist/pages/doodle-nzkqi2UI.js +201 -0
- package/dist/pages/drag-ghost-B6kpzC3O.js +426 -0
- package/dist/pages/drill-menu-cskH5mol.js +490 -0
- package/dist/pages/dropzone-DOY_Rhw0.js +1069 -0
- package/dist/pages/element-toolbar-DZIhXlCJ.js +498 -0
- package/dist/pages/emoji-picker-CqaWaffD.js +235 -0
- package/dist/pages/empty-state-4U2txFpI.js +1113 -0
- package/dist/pages/facet-filters-McbBeY9e.js +353 -0
- package/dist/pages/figure-D-HF5vCj.js +563 -0
- package/dist/pages/figure-strip-BB3mNl7D.js +1364 -0
- package/dist/pages/figure-tabs-QOeQMY6N.js +578 -0
- package/dist/pages/file-chip-DMDjtlqQ.js +738 -0
- package/dist/pages/filter-pill-DzqNOsD4.js +1295 -0
- package/dist/pages/font-picker-Bqhu0QMh.js +416 -0
- package/dist/pages/form-grid-BfWCVlie.js +692 -0
- package/dist/pages/gallery-BBk2EOri.js +453 -0
- package/dist/pages/gif-picker-CnoDTCaL.js +270 -0
- package/dist/pages/gradient-editor-Bqxp7Fxj.js +378 -0
- package/dist/pages/grouped-checklist-gNZ0tBKU.js +477 -0
- package/dist/pages/heatmap-BohgIcNk.js +507 -0
- package/dist/pages/highlight-text-BfxzfmvS.js +287 -0
- package/dist/pages/home-dashboard-CxPmvduE.js +962 -0
- package/dist/pages/host-B6znjEgQ.js +109 -0
- package/dist/pages/hosted-embed-Jef3aIMP.js +163 -0
- package/dist/pages/hosted-field-BLh-53AE.js +208 -0
- package/dist/pages/hosted-field-DEpI4lVS.js +514 -0
- package/dist/pages/icon-button-Bu4Gj5sy.js +1200 -0
- package/dist/pages/icon-picker-DEyoMUTh.js +291 -0
- package/dist/pages/icon-tile-DcgxyXPF.js +592 -0
- package/dist/pages/icons-CJ9Aar3d.js +736 -0
- package/dist/pages/image-cropper-NyougqLH.js +466 -0
- package/dist/pages/image-field-7knBv4mJ.js +567 -0
- package/dist/pages/import-result-CmTtGXW_.js +486 -0
- package/dist/pages/inline-confirm-CEcI5Lxo.js +327 -0
- package/dist/pages/inline-edit-Ba39SzhM.js +1125 -0
- package/dist/pages/input-CzLCzfyx.js +2372 -0
- package/dist/pages/installation-C3UcpQJT.js +528 -0
- package/dist/pages/job-indicator-DOXWbFdl.js +755 -0
- package/dist/pages/kanban-Dy9sPAI0.js +740 -0
- package/dist/pages/kbd-UNj4zqxn.js +545 -0
- package/dist/pages/layout-primitives-CPRaZeyt.js +483 -0
- package/dist/pages/line-chart-CntWxeMF.js +1117 -0
- package/dist/pages/link-CXqvAg9z.js +689 -0
- package/dist/pages/link-picker-BMFGCC67.js +478 -0
- package/dist/pages/link-row-x8yaUuWc.js +595 -0
- package/dist/pages/live-globe-95ROMhGQ.js +715 -0
- package/dist/pages/loading-overlay-BeGuXM9G.js +456 -0
- package/dist/pages/loading-state-BNbCo51C.js +556 -0
- package/dist/pages/log-viewer-BQz8I_a2.js +503 -0
- package/dist/pages/logo-B38rnzoq.js +571 -0
- package/dist/pages/lottie_light-CxEH8eiR.js +9116 -0
- package/dist/pages/markdown-Ied72vMT.js +237 -0
- package/dist/pages/markdown-field-BfnIEKZH.js +193 -0
- package/dist/pages/media-banner-DkStCia0.js +233 -0
- package/dist/pages/menu-NrLYKqKp.js +2132 -0
- package/dist/pages/message-thread-Bo4zbxqu.js +731 -0
- package/dist/pages/meta-line-D5p2TycR.js +371 -0
- package/dist/pages/model-viewer-BfokvHoc.js +60288 -0
- package/dist/pages/model-viewer-C8PFO8wk.js +577 -0
- package/dist/pages/month-calendar-T1vw9Rup.js +457 -0
- package/dist/pages/motion-CrXtiBvA.js +865 -0
- package/dist/pages/number-input-CuyMZg18.js +968 -0
- package/dist/pages/orbit-loader-DeVBtkFE.js +219 -0
- package/dist/pages/orbit-spinner-Dxv5qAhr.js +348 -0
- package/dist/pages/otp-input-CVRoX1mw.js +591 -0
- package/dist/pages/overview-LA9XRhZc.js +130 -0
- package/dist/pages/package-dimensions-DFCyZj_T.js +192 -0
- package/dist/pages/pagination-C1EgVtW4.js +294 -0
- package/dist/pages/palette-tile-X9ZXu2Z0.js +414 -0
- package/dist/pages/password-field-DHEQKyUC.js +912 -0
- package/dist/pages/person-cell-BmjbADBz.js +564 -0
- package/dist/pages/phone-input-B3G7Qpb2.js +747 -0
- package/dist/pages/plan-card-DRaA6RuB.js +621 -0
- package/dist/pages/plan-card-DtloWvMh.js +258 -0
- package/dist/pages/plan-comparison-BVIGTtbd.js +559 -0
- package/dist/pages/plan-grid-cfPVTB5V.js +251 -0
- package/dist/pages/point-list-BbPmZjsm.js +222 -0
- package/dist/pages/popover-C3Oar9D5.js +1198 -0
- package/dist/pages/presence-avatars-CRZIk8n9.js +328 -0
- package/dist/pages/preview-frame-Bcwk0y_Q.js +1631 -0
- package/dist/pages/price-CRBLoa9h.js +604 -0
- package/dist/pages/principles-pnDyfHpK.js +483 -0
- package/dist/pages/print-page-BkLv6bW8.js +513 -0
- package/dist/pages/profile-hero-CC9dUzuN.js +498 -0
- package/dist/pages/progress-CP_awmo4.js +904 -0
- package/dist/pages/progress-ring-JuOAwk2T.js +576 -0
- package/dist/pages/radio-group-C-4tg6FS.js +1639 -0
- package/dist/pages/radius-control-B2kRA2Ch.js +441 -0
- package/dist/pages/rating-CweKN2SX.js +471 -0
- package/dist/pages/record-layout-DUP_X0RL.js +719 -0
- package/dist/pages/record-pager-y9D7JFgb.js +278 -0
- package/dist/pages/registry-BZg-xAbi.js +594 -0
- package/dist/pages/release-Cs6tl16C.js +16 -0
- package/dist/pages/repeater-BRZYKRQa.js +1351 -0
- package/dist/pages/reply-feedback-BDnHprla.js +192 -0
- package/dist/pages/reveal-BygENBbL.js +460 -0
- package/dist/pages/rich-text-DOFQZEpT.js +156 -0
- package/dist/pages/rich-text-editor-BhIM20JI.js +1265 -0
- package/dist/pages/rolldown-runtime-CbKu08Hx.js +25 -0
- package/dist/pages/rolling-number-GR3Cyfpz.js +529 -0
- package/dist/pages/row-list-Dl6CYhC-.js +1565 -0
- package/dist/pages/rule-list-DTCmIMpT.js +648 -0
- package/dist/pages/save-status-B5KkyMZP.js +378 -0
- package/dist/pages/schedule-YycI95O1.js +243 -0
- package/dist/pages/scroll-area-B2sGm23Q.js +423 -0
- package/dist/pages/search-field-D1uG7R6A.js +693 -0
- package/dist/pages/search-menu-DMuXyUUW.js +580 -0
- package/dist/pages/secret-field-Dj9x3LL8.js +337 -0
- package/dist/pages/section-rail-BtTCETS5.js +637 -0
- package/dist/pages/section-v2Pubup9.js +639 -0
- package/dist/pages/segmented-control-D-FB1K1T.js +1190 -0
- package/dist/pages/select-DZ43NpOm.js +1434 -0
- package/dist/pages/selection-chrome-Czcs6RN6.js +437 -0
- package/dist/pages/separator-CFwqRvfO.js +428 -0
- package/dist/pages/serp-preview-BGwORjmo.js +346 -0
- package/dist/pages/setting-row-Bt-dZV8H.js +913 -0
- package/dist/pages/shape-DzniHAVT.js +627 -0
- package/dist/pages/share-list-D4wgBxKN.js +926 -0
- package/dist/pages/side-panel-CCtkrZjs.js +811 -0
- package/dist/pages/site-preview-Dj1hM2Yo.js +353 -0
- package/dist/pages/skeleton-C1F5HkAu.js +1325 -0
- package/dist/pages/skip-link-BxznhSkz.js +252 -0
- package/dist/pages/slider-CAoPURKD.js +774 -0
- package/dist/pages/sortable-card-Sr44uCpI.js +424 -0
- package/dist/pages/sortable-list-DUAleYE1.js +1298 -0
- package/dist/pages/sortable-tree-BLzK-hTE.js +737 -0
- package/dist/pages/spacing-box-CtuvzxQu.js +550 -0
- package/dist/pages/sparkline-D3aavCly.js +947 -0
- package/dist/pages/split-bar-DYgZnFID.js +414 -0
- package/dist/pages/split-button-Be08-VI-.js +335 -0
- package/dist/pages/split-pane-lSNZgTKt.js +523 -0
- package/dist/pages/status-badge-DOdNhmzn.js +1074 -0
- package/dist/pages/status-checklist-CWkjCZIC.js +1152 -0
- package/dist/pages/status-dot-D99gAGsV.js +567 -0
- package/dist/pages/stepper-CxKTbEA-.js +1093 -0
- package/dist/pages/success-mark-CqFTOBEu.js +142 -0
- package/dist/pages/swatch-H_kNvHuC.js +565 -0
- package/dist/pages/switch-C93K6j9h.js +617 -0
- package/dist/pages/table-CL0vomno.js +3225 -0
- package/dist/pages/tabs-Dh0mUsLw.js +1690 -0
- package/dist/pages/tag-input-BjZWKKRJ.js +1307 -0
- package/dist/pages/task-card-Dv0sR1-w.js +295 -0
- package/dist/pages/textarea-CCM-SnGN.js +949 -0
- package/dist/pages/thumbnail-DwFJL_k1.js +1147 -0
- package/dist/pages/time-input-CA9-uZAa.js +442 -0
- package/dist/pages/time-zone-select-CEtMXVYO.js +296 -0
- package/dist/pages/timeline-BsMUTlpR.js +1798 -0
- package/dist/pages/toast-zXLRiMRT.js +1391 -0
- package/dist/pages/tool-rail-B1AbTMCP.js +355 -0
- package/dist/pages/toolbar-B9l_fHKy.js +754 -0
- package/dist/pages/tooltip-LHtCUkF-.js +826 -0
- package/dist/pages/translation-field-CTRXiF2N.js +251 -0
- package/dist/pages/tree-checklist-CJj3OcLg.js +451 -0
- package/dist/pages/tree-select-DU1qXHy_.js +492 -0
- package/dist/pages/tree-view-g_RjLtAb.js +739 -0
- package/dist/pages/typography-BSijtiRl.js +876 -0
- package/dist/pages/unit-input-Dml4fjmK.js +659 -0
- package/dist/pages/upload-rules-yozEzSah.js +419 -0
- package/dist/pages/url-upload-input-SSnMgfpA.js +307 -0
- package/dist/pages/value-change-CnubDKyO.js +489 -0
- package/dist/pages/weekly-hours-i2EpsmTx.js +287 -0
- package/dist/pages/widget-preview-CUJMyZ_k.js +625 -0
- package/dist/pages/working-status-CENemSsw.js +389 -0
- package/manifest.json +13001 -0
- package/package.json +35 -4
|
@@ -0,0 +1,1147 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as DocLink } from "./host-B6znjEgQ.js";
|
|
3
|
+
import { a as DocTable, d as Section$1, i as DocPage, l as Note, m as ThemePair, o as Example, p as SubSection, r as DoDont, s as Guidelines, u as PropsTable } from "./docs-lM2UBSir.js";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Button, Thumbnail, ThumbnailAction } from "@orbitcommerce/constellation";
|
|
7
|
+
import { ImageSquareIcon, PencilSimpleIcon, StarIcon, XIcon } from "@orbitcommerce/constellation/icons";
|
|
8
|
+
//#region src/pages/components/thumbnail.tsx
|
|
9
|
+
var svgUrl = (markup) => `data:image/svg+xml,${encodeURIComponent(markup)}`;
|
|
10
|
+
var chairUrl = svgUrl("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\"><rect width=\"96\" height=\"96\" fill=\"#efe7da\"/><path d=\"M34 22c0-3 2-5 5-5h18c3 0 5 2 5 5v30H34z\" fill=\"#b98a52\"/><rect x=\"28\" y=\"52\" width=\"40\" height=\"8\" rx=\"3\" fill=\"#8a6033\"/><path d=\"M34 60v22M62 60v22\" stroke=\"#6f4d29\" stroke-width=\"4\" stroke-linecap=\"round\" fill=\"none\"/></svg>");
|
|
11
|
+
var lampUrl = svgUrl("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\"><rect width=\"96\" height=\"96\" fill=\"#e7eef1\"/><path d=\"M48 20v52\" stroke=\"#5a6b74\" stroke-width=\"4\" stroke-linecap=\"round\" fill=\"none\"/><path d=\"M30 34h36l-7-16H37z\" fill=\"#d8a94e\"/><ellipse cx=\"48\" cy=\"74\" rx=\"20\" ry=\"6\" fill=\"#5a6b74\"/></svg>");
|
|
12
|
+
var logoUrl = svgUrl("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\"><circle cx=\"48\" cy=\"48\" r=\"30\" fill=\"none\" stroke=\"#2f6f5e\" stroke-width=\"8\"/><path d=\"M34 62l14-30 14 30z\" fill=\"#2f6f5e\"/></svg>");
|
|
13
|
+
var sceneUrl = svgUrl("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 160 90\"><rect width=\"160\" height=\"90\" fill=\"#dfe8e6\"/><circle cx=\"122\" cy=\"28\" r=\"13\" fill=\"#e6b85c\"/><path d=\"M0 90l46-44 30 30 26-24 58 38z\" fill=\"#7d9c88\"/></svg>");
|
|
14
|
+
/** An image that cannot be decoded, so the thumbnail falls back to its initials. */
|
|
15
|
+
var urlThatFails = "data:image/png;base64,AAAA";
|
|
16
|
+
/** A mark with see-through parts, for the checkerboard ground. */
|
|
17
|
+
var markUrl = svgUrl("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\"><path d=\"M48 14l30 52H18z\" fill=\"#2f6f5e\"/><circle cx=\"48\" cy=\"54\" r=\"12\" fill=\"#e6b85c\"/></svg>");
|
|
18
|
+
/** App icon art drawn small in the middle of its canvas, as a plugin's branding ships it: it needs a zoom to fill a tile. */
|
|
19
|
+
var appArtUrl = svgUrl("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\"><rect x=\"30\" y=\"30\" width=\"36\" height=\"36\" rx=\"8\" fill=\"#ffffff\"/><path d=\"M40 52l6 6 12-14\" stroke=\"#1d5bd8\" stroke-width=\"5\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>");
|
|
20
|
+
/** A poster for a video and a render for a 3D model. */
|
|
21
|
+
var posterUrl = svgUrl("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 160 90\"><rect width=\"160\" height=\"90\" fill=\"#26343a\"/><rect x=\"18\" y=\"20\" width=\"58\" height=\"50\" rx=\"4\" fill=\"#5a7d8a\"/><rect x=\"88\" y=\"34\" width=\"54\" height=\"36\" rx=\"4\" fill=\"#c9a46a\"/></svg>");
|
|
22
|
+
var renderUrl = svgUrl("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\"><rect width=\"96\" height=\"96\" fill=\"#f1f3f4\"/><path d=\"M48 18l26 14v30L48 78 22 62V32z\" fill=\"#9fb3bb\"/><path d=\"M48 18l26 14-26 14-26-14z\" fill=\"#c7d4d9\"/><path d=\"M48 46v32\" stroke=\"#7d939b\" stroke-width=\"2\"/></svg>");
|
|
23
|
+
/** A cover banner for the ring example. */
|
|
24
|
+
var coverUrl = svgUrl("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 100\"><rect width=\"320\" height=\"100\" fill=\"#c8d9d3\"/><circle cx=\"260\" cy=\"30\" r=\"18\" fill=\"#f0c86e\"/><path d=\"M0 100l80-52 52 34 48-28 140 46z\" fill=\"#6f9584\"/></svg>");
|
|
25
|
+
/** A thumbnail above its caption, as in a media grid. */
|
|
26
|
+
function Tile({ label, children }) {
|
|
27
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
28
|
+
className: "thumbnail-cell",
|
|
29
|
+
children: [children, /* @__PURE__ */ jsx("span", {
|
|
30
|
+
className: "thumbnail-cell__label",
|
|
31
|
+
children: label
|
|
32
|
+
})]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function Preview() {
|
|
36
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
37
|
+
className: "thumbnail-preview",
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ jsx(Thumbnail, {
|
|
40
|
+
size: "lg",
|
|
41
|
+
src: chairUrl,
|
|
42
|
+
alt: "Arden ergonomic chair",
|
|
43
|
+
name: "Arden ergonomic chair"
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ jsx(Thumbnail, {
|
|
46
|
+
size: "lg",
|
|
47
|
+
name: "Harbour Desk Co",
|
|
48
|
+
alt: "Harbour Desk Co"
|
|
49
|
+
}),
|
|
50
|
+
/* @__PURE__ */ jsx(Thumbnail, {
|
|
51
|
+
size: "lg",
|
|
52
|
+
src: logoUrl,
|
|
53
|
+
alt: "Fernhill Interiors",
|
|
54
|
+
name: "Fernhill Interiors"
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* A picture that is not served yet, as one just uploaded can be: it fails, waits and tries again, three times, then
|
|
61
|
+
* offers Retry. "Start again" sets it going from the top.
|
|
62
|
+
*/
|
|
63
|
+
function RetryDemo() {
|
|
64
|
+
const [run, setRun] = useState(0);
|
|
65
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
66
|
+
className: "thumbnail-row",
|
|
67
|
+
children: [/* @__PURE__ */ jsx(Tile, {
|
|
68
|
+
label: "Tries again three times",
|
|
69
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
70
|
+
size: "xl",
|
|
71
|
+
src: `${urlThatFails}#${run}`,
|
|
72
|
+
alt: "Arden ergonomic chair, just uploaded",
|
|
73
|
+
name: "Arden ergonomic chair",
|
|
74
|
+
spinner: true,
|
|
75
|
+
retries: 3,
|
|
76
|
+
retryDelay: 2500,
|
|
77
|
+
showRetry: true
|
|
78
|
+
}, run)
|
|
79
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
80
|
+
size: "sm",
|
|
81
|
+
onClick: () => setRun((n) => n + 1),
|
|
82
|
+
children: "Start again"
|
|
83
|
+
})]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function Page() {
|
|
87
|
+
return /* @__PURE__ */ jsxs(DocPage, {
|
|
88
|
+
title: "Thumbnail",
|
|
89
|
+
status: "new",
|
|
90
|
+
importNames: ["Thumbnail", "ThumbnailAction"],
|
|
91
|
+
lead: "A product or a brand image in a frame that keeps its shape: a fixed size or the host's width, and an aspect ratio. It loads lazily and, until the picture arrives or if it fails, its place shows initials, an icon of your own or a drawn picture, so a row never shifts.",
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
94
|
+
id: "basics",
|
|
95
|
+
title: "Basics",
|
|
96
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
97
|
+
"Pass ",
|
|
98
|
+
/* @__PURE__ */ jsx("code", { children: "src" }),
|
|
99
|
+
" for the picture and ",
|
|
100
|
+
/* @__PURE__ */ jsx("code", { children: "alt" }),
|
|
101
|
+
" to describe it. Give ",
|
|
102
|
+
/* @__PURE__ */ jsx("code", { children: "name" }),
|
|
103
|
+
" as well: it is the initials the fallback shows while the picture loads and after it fails, and it is how a product or a brand still reads in a list. Reach for a Thumbnail where a small picture sits beside a row, a card or a table cell. When the picture is the main thing on a page, use a full image with its own caption instead."
|
|
104
|
+
] }),
|
|
105
|
+
children: [/* @__PURE__ */ jsx(Example, {
|
|
106
|
+
align: "start",
|
|
107
|
+
code: `
|
|
108
|
+
<Thumbnail src={chairUrl} alt="Arden ergonomic chair" name="Arden ergonomic chair" />
|
|
109
|
+
<Thumbnail name="Harbour Desk Co" alt="Harbour Desk Co" />
|
|
110
|
+
<Thumbnail src={urlThatFails} alt="Wren Stationery" name="Wren Stationery" />
|
|
111
|
+
<Thumbnail alt="No picture yet" />`,
|
|
112
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
113
|
+
className: "thumbnail-row",
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
116
|
+
label: "A product photo",
|
|
117
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
118
|
+
src: chairUrl,
|
|
119
|
+
alt: "Arden ergonomic chair",
|
|
120
|
+
name: "Arden ergonomic chair"
|
|
121
|
+
})
|
|
122
|
+
}),
|
|
123
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
124
|
+
label: "Initials only",
|
|
125
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
126
|
+
name: "Harbour Desk Co",
|
|
127
|
+
alt: "Harbour Desk Co"
|
|
128
|
+
})
|
|
129
|
+
}),
|
|
130
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
131
|
+
label: "A picture that fails",
|
|
132
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
133
|
+
src: urlThatFails,
|
|
134
|
+
alt: "Wren Stationery",
|
|
135
|
+
name: "Wren Stationery"
|
|
136
|
+
})
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
139
|
+
label: "No name either",
|
|
140
|
+
children: /* @__PURE__ */ jsx(Thumbnail, { alt: "No picture yet" })
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
})
|
|
144
|
+
}), /* @__PURE__ */ jsx(Fragment$1, {})]
|
|
145
|
+
}),
|
|
146
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
147
|
+
id: "sizes",
|
|
148
|
+
title: "Sizes",
|
|
149
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
150
|
+
/* @__PURE__ */ jsx("code", { children: "size" }),
|
|
151
|
+
" is the width of the frame. Five named steps, ",
|
|
152
|
+
/* @__PURE__ */ jsx("code", { children: "fill" }),
|
|
153
|
+
" for the host's width, or a number of pixels. ",
|
|
154
|
+
/* @__PURE__ */ jsx("code", { children: "md" }),
|
|
155
|
+
" is the default, the thumb of a list row."
|
|
156
|
+
] }),
|
|
157
|
+
children: [
|
|
158
|
+
/* @__PURE__ */ jsx(Example, {
|
|
159
|
+
align: "start",
|
|
160
|
+
code: `
|
|
161
|
+
<Thumbnail size="xs" src={chairUrl} alt="Arden ergonomic chair" name="Arden ergonomic chair" />
|
|
162
|
+
<Thumbnail size="sm" src={chairUrl} alt="Arden ergonomic chair" name="Arden ergonomic chair" />
|
|
163
|
+
<Thumbnail src={chairUrl} alt="Arden ergonomic chair" name="Arden ergonomic chair" />
|
|
164
|
+
<Thumbnail size="lg" src={chairUrl} alt="Arden ergonomic chair" name="Arden ergonomic chair" />
|
|
165
|
+
<Thumbnail size="xl" src={chairUrl} alt="Arden ergonomic chair" name="Arden ergonomic chair" />`,
|
|
166
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
167
|
+
className: "thumbnail-row",
|
|
168
|
+
children: [
|
|
169
|
+
"xs",
|
|
170
|
+
"sm",
|
|
171
|
+
"md",
|
|
172
|
+
"lg",
|
|
173
|
+
"xl"
|
|
174
|
+
].map((size) => /* @__PURE__ */ jsx(Tile, {
|
|
175
|
+
label: size,
|
|
176
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
177
|
+
size,
|
|
178
|
+
src: chairUrl,
|
|
179
|
+
alt: "Arden ergonomic chair",
|
|
180
|
+
name: "Arden ergonomic chair"
|
|
181
|
+
})
|
|
182
|
+
}, size))
|
|
183
|
+
})
|
|
184
|
+
}),
|
|
185
|
+
/* @__PURE__ */ jsx(DocTable, {
|
|
186
|
+
columns: [
|
|
187
|
+
"Size",
|
|
188
|
+
"Pixels",
|
|
189
|
+
"Use it for"
|
|
190
|
+
],
|
|
191
|
+
rows: [
|
|
192
|
+
[
|
|
193
|
+
/* @__PURE__ */ jsx("code", { children: "xs" }),
|
|
194
|
+
"24",
|
|
195
|
+
"A dense table cell, or a line of an order."
|
|
196
|
+
],
|
|
197
|
+
[
|
|
198
|
+
/* @__PURE__ */ jsx("code", { children: "sm" }),
|
|
199
|
+
"32",
|
|
200
|
+
"Rows in a list or a picker."
|
|
201
|
+
],
|
|
202
|
+
[
|
|
203
|
+
/* @__PURE__ */ jsx("code", { children: "md" }),
|
|
204
|
+
"40",
|
|
205
|
+
"The default: the thumb of a list row."
|
|
206
|
+
],
|
|
207
|
+
[
|
|
208
|
+
/* @__PURE__ */ jsx("code", { children: "lg" }),
|
|
209
|
+
"64",
|
|
210
|
+
"A card, or a collection tile."
|
|
211
|
+
],
|
|
212
|
+
[
|
|
213
|
+
/* @__PURE__ */ jsx("code", { children: "xl" }),
|
|
214
|
+
"96",
|
|
215
|
+
"A product's own page."
|
|
216
|
+
],
|
|
217
|
+
[
|
|
218
|
+
/* @__PURE__ */ jsx("code", { children: "fill" }),
|
|
219
|
+
"the host's width",
|
|
220
|
+
"A media card that fills its column."
|
|
221
|
+
]
|
|
222
|
+
]
|
|
223
|
+
}),
|
|
224
|
+
/* @__PURE__ */ jsx(SubSection, {
|
|
225
|
+
title: "A width of your own",
|
|
226
|
+
description: /* @__PURE__ */ jsx("p", { children: "A number is a width in pixels. Use it for a step between the named ones, or for a size a layout asks for." }),
|
|
227
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
228
|
+
code: `
|
|
229
|
+
<Thumbnail size={72} src={lampUrl} alt="Linden task lamp" name="Linden task lamp" />`,
|
|
230
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
231
|
+
size: 72,
|
|
232
|
+
src: lampUrl,
|
|
233
|
+
alt: "Linden task lamp",
|
|
234
|
+
name: "Linden task lamp"
|
|
235
|
+
})
|
|
236
|
+
})
|
|
237
|
+
})
|
|
238
|
+
]
|
|
239
|
+
}),
|
|
240
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
241
|
+
id: "ratio",
|
|
242
|
+
title: "Shape of the frame",
|
|
243
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
244
|
+
/* @__PURE__ */ jsx("code", { children: "size" }),
|
|
245
|
+
" is the width and ",
|
|
246
|
+
/* @__PURE__ */ jsx("code", { children: "ratio" }),
|
|
247
|
+
" is the width over the height, so the frame is square by default and can hold a wider or a taller picture. A number is a plain ratio."
|
|
248
|
+
] }),
|
|
249
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
250
|
+
align: "start",
|
|
251
|
+
code: `
|
|
252
|
+
<Thumbnail size="lg" ratio="1/1" src={chairUrl} alt="Arden ergonomic chair" name="Arden ergonomic chair" />
|
|
253
|
+
<Thumbnail size="lg" ratio="4/3" src={chairUrl} alt="Arden ergonomic chair" name="Arden ergonomic chair" />
|
|
254
|
+
<Thumbnail size="lg" ratio="3/4" src={chairUrl} alt="Arden ergonomic chair" name="Arden ergonomic chair" />
|
|
255
|
+
<Thumbnail size="lg" ratio="16/9" src={sceneUrl} alt="A showroom scene" name="Showroom" />
|
|
256
|
+
<Thumbnail size="lg" ratio={1.5} src={sceneUrl} alt="A showroom scene" name="Showroom" />`,
|
|
257
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
258
|
+
className: "thumbnail-row",
|
|
259
|
+
children: [[
|
|
260
|
+
"1/1",
|
|
261
|
+
"4/3",
|
|
262
|
+
"3/4",
|
|
263
|
+
"16/9"
|
|
264
|
+
].map((ratio) => /* @__PURE__ */ jsx(Tile, {
|
|
265
|
+
label: ratio,
|
|
266
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
267
|
+
size: "lg",
|
|
268
|
+
ratio,
|
|
269
|
+
src: ratio === "16/9" ? sceneUrl : chairUrl,
|
|
270
|
+
alt: ratio === "16/9" ? "A showroom scene" : "Arden ergonomic chair",
|
|
271
|
+
name: ratio === "16/9" ? "Showroom" : "Arden ergonomic chair"
|
|
272
|
+
})
|
|
273
|
+
}, ratio)), /* @__PURE__ */ jsx(Tile, {
|
|
274
|
+
label: "1.5",
|
|
275
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
276
|
+
size: "lg",
|
|
277
|
+
ratio: 1.5,
|
|
278
|
+
src: sceneUrl,
|
|
279
|
+
alt: "A showroom scene",
|
|
280
|
+
name: "Showroom"
|
|
281
|
+
})
|
|
282
|
+
})]
|
|
283
|
+
})
|
|
284
|
+
})
|
|
285
|
+
}),
|
|
286
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
287
|
+
id: "shape-and-fit",
|
|
288
|
+
title: "Corners and fitting",
|
|
289
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
290
|
+
/* @__PURE__ */ jsx("code", { children: "shape" }),
|
|
291
|
+
" rounds the corners with the frame's size by default, or keeps them square for a QR code or a picture that runs to the edge of its tile. ",
|
|
292
|
+
/* @__PURE__ */ jsx("code", { children: "fit" }),
|
|
293
|
+
" shows a product whole on the white ground, or fills the frame and crops a photo."
|
|
294
|
+
] }),
|
|
295
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
296
|
+
code: `
|
|
297
|
+
<Thumbnail size="lg" src={logoUrl} alt="Fernhill Interiors" name="Fernhill Interiors" />
|
|
298
|
+
<Thumbnail size="lg" src={logoUrl} alt="Fernhill Interiors" name="Fernhill Interiors" fit="cover" />
|
|
299
|
+
<Thumbnail size="lg" src={logoUrl} alt="Fernhill Interiors" name="Fernhill Interiors" shape="square" fit="cover" />
|
|
300
|
+
<Thumbnail size="lg" ratio="4/3" src={sceneUrl} alt="A showroom scene" name="Showroom" fit="cover" shape="square" />`,
|
|
301
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
302
|
+
className: "thumbnail-row",
|
|
303
|
+
children: [
|
|
304
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
305
|
+
label: "Contain (default)",
|
|
306
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
307
|
+
size: "lg",
|
|
308
|
+
src: logoUrl,
|
|
309
|
+
alt: "Fernhill Interiors",
|
|
310
|
+
name: "Fernhill Interiors"
|
|
311
|
+
})
|
|
312
|
+
}),
|
|
313
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
314
|
+
label: "Cover",
|
|
315
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
316
|
+
size: "lg",
|
|
317
|
+
src: logoUrl,
|
|
318
|
+
alt: "Fernhill Interiors",
|
|
319
|
+
name: "Fernhill Interiors",
|
|
320
|
+
fit: "cover"
|
|
321
|
+
})
|
|
322
|
+
}),
|
|
323
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
324
|
+
label: "Square",
|
|
325
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
326
|
+
size: "lg",
|
|
327
|
+
src: logoUrl,
|
|
328
|
+
alt: "Fernhill Interiors",
|
|
329
|
+
name: "Fernhill Interiors",
|
|
330
|
+
shape: "square",
|
|
331
|
+
fit: "cover"
|
|
332
|
+
})
|
|
333
|
+
}),
|
|
334
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
335
|
+
label: "A wide, square tile",
|
|
336
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
337
|
+
size: "lg",
|
|
338
|
+
ratio: "4/3",
|
|
339
|
+
src: sceneUrl,
|
|
340
|
+
alt: "A showroom scene",
|
|
341
|
+
name: "Showroom",
|
|
342
|
+
fit: "cover",
|
|
343
|
+
shape: "square"
|
|
344
|
+
})
|
|
345
|
+
})
|
|
346
|
+
]
|
|
347
|
+
})
|
|
348
|
+
})
|
|
349
|
+
}),
|
|
350
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
351
|
+
id: "fallbacks",
|
|
352
|
+
title: "Fallbacks",
|
|
353
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
354
|
+
"With no picture, or one that fails, the frame shows a fallback: the initials of ",
|
|
355
|
+
/* @__PURE__ */ jsx("code", { children: "name" }),
|
|
356
|
+
", an icon you pass as ",
|
|
357
|
+
/* @__PURE__ */ jsx("code", { children: "fallback" }),
|
|
358
|
+
", or a drawn picture when there is neither. The fallback sits under the picture and goes as the picture arrives, so a failure brings it back with nothing jumping."
|
|
359
|
+
] }),
|
|
360
|
+
children: [/* @__PURE__ */ jsx(Example, {
|
|
361
|
+
align: "start",
|
|
362
|
+
code: `
|
|
363
|
+
<Thumbnail size="lg" name="Northgate Seating" alt="Northgate Seating" />
|
|
364
|
+
<Thumbnail size="lg" fallback={<ImageSquareIcon />} alt="Arden ergonomic chair" />
|
|
365
|
+
<Thumbnail size="lg" alt="No picture yet" />
|
|
366
|
+
<Thumbnail size="lg" src={urlThatFails} alt="Thistle & Oak" name="Thistle & Oak" />`,
|
|
367
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
368
|
+
className: "thumbnail-row",
|
|
369
|
+
children: [
|
|
370
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
371
|
+
label: "Initials from name",
|
|
372
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
373
|
+
size: "lg",
|
|
374
|
+
name: "Northgate Seating",
|
|
375
|
+
alt: "Northgate Seating"
|
|
376
|
+
})
|
|
377
|
+
}),
|
|
378
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
379
|
+
label: "An icon of your own",
|
|
380
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
381
|
+
size: "lg",
|
|
382
|
+
fallback: /* @__PURE__ */ jsx(ImageSquareIcon, {}),
|
|
383
|
+
alt: "Arden ergonomic chair"
|
|
384
|
+
})
|
|
385
|
+
}),
|
|
386
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
387
|
+
label: "The drawn picture",
|
|
388
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
389
|
+
size: "lg",
|
|
390
|
+
alt: "No picture yet"
|
|
391
|
+
})
|
|
392
|
+
}),
|
|
393
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
394
|
+
label: "After a failure",
|
|
395
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
396
|
+
size: "lg",
|
|
397
|
+
src: urlThatFails,
|
|
398
|
+
alt: "Thistle & Oak",
|
|
399
|
+
name: "Thistle & Oak"
|
|
400
|
+
})
|
|
401
|
+
})
|
|
402
|
+
]
|
|
403
|
+
})
|
|
404
|
+
}), /* @__PURE__ */ jsxs(Note, {
|
|
405
|
+
title: "The fallback is decoration",
|
|
406
|
+
children: [
|
|
407
|
+
"The initials, your icon and the drawn picture are hidden from assistive technology: the words of",
|
|
408
|
+
" ",
|
|
409
|
+
/* @__PURE__ */ jsx("code", { children: "alt" }),
|
|
410
|
+
" name the frame on their own, so a screen reader does not read the fallback twice."
|
|
411
|
+
]
|
|
412
|
+
})]
|
|
413
|
+
}),
|
|
414
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
415
|
+
id: "states",
|
|
416
|
+
title: "States",
|
|
417
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
418
|
+
"The picture loads lazily as it nears the viewport, which suits a long list. Give",
|
|
419
|
+
" ",
|
|
420
|
+
/* @__PURE__ */ jsx("code", { children: "loading=\"eager\"" }),
|
|
421
|
+
" to a thumb that is above the fold, such as the first of a page.",
|
|
422
|
+
" ",
|
|
423
|
+
/* @__PURE__ */ jsx("code", { children: "selected" }),
|
|
424
|
+
" draws the chosen look, an accent ring inside the frame, so it is never taken for the focus ring outside it. It is a look only, so pair it with ",
|
|
425
|
+
/* @__PURE__ */ jsx("code", { children: "aria-pressed" }),
|
|
426
|
+
" or ",
|
|
427
|
+
/* @__PURE__ */ jsx("code", { children: "aria-checked" }),
|
|
428
|
+
" on the control that chooses."
|
|
429
|
+
] }),
|
|
430
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
431
|
+
code: `
|
|
432
|
+
<Thumbnail size="lg" src={chairUrl} alt="Arden ergonomic chair" name="Arden ergonomic chair" />
|
|
433
|
+
<Thumbnail size="lg" src={chairUrl} alt="Arden ergonomic chair" name="Arden ergonomic chair" loading="eager" />
|
|
434
|
+
<Thumbnail size="lg" src={chairUrl} alt="Arden ergonomic chair" name="Arden ergonomic chair" selected />`,
|
|
435
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
436
|
+
className: "thumbnail-row",
|
|
437
|
+
children: [
|
|
438
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
439
|
+
label: "Lazy (default)",
|
|
440
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
441
|
+
size: "lg",
|
|
442
|
+
src: chairUrl,
|
|
443
|
+
alt: "Arden ergonomic chair",
|
|
444
|
+
name: "Arden ergonomic chair"
|
|
445
|
+
})
|
|
446
|
+
}),
|
|
447
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
448
|
+
label: "Eager",
|
|
449
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
450
|
+
size: "lg",
|
|
451
|
+
src: chairUrl,
|
|
452
|
+
alt: "Arden ergonomic chair",
|
|
453
|
+
name: "Arden ergonomic chair",
|
|
454
|
+
loading: "eager"
|
|
455
|
+
})
|
|
456
|
+
}),
|
|
457
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
458
|
+
label: "Selected",
|
|
459
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
460
|
+
size: "lg",
|
|
461
|
+
src: chairUrl,
|
|
462
|
+
alt: "Arden ergonomic chair",
|
|
463
|
+
name: "Arden ergonomic chair",
|
|
464
|
+
selected: true
|
|
465
|
+
})
|
|
466
|
+
})
|
|
467
|
+
]
|
|
468
|
+
})
|
|
469
|
+
})
|
|
470
|
+
}),
|
|
471
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
472
|
+
id: "loading",
|
|
473
|
+
title: "Loading and retrying",
|
|
474
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
475
|
+
/* @__PURE__ */ jsx("code", { children: "spinner" }),
|
|
476
|
+
" draws a spinner over the frame while the picture comes, and says \"Image loading\" in a polite status each time a new picture starts to load. ",
|
|
477
|
+
/* @__PURE__ */ jsx("code", { children: "retries" }),
|
|
478
|
+
" tries a failed picture again by itself, ",
|
|
479
|
+
/* @__PURE__ */ jsx("code", { children: "retryDelay" }),
|
|
480
|
+
" apart, for a picture that has only just been stored and may not be served yet: the frame stays loading meanwhile, and says which try it is on once the frame is 64px or more.",
|
|
481
|
+
" ",
|
|
482
|
+
/* @__PURE__ */ jsx("code", { children: "showRetry" }),
|
|
483
|
+
" puts a Retry button on a picture that has failed for good. ",
|
|
484
|
+
/* @__PURE__ */ jsx("code", { children: "onLoad" }),
|
|
485
|
+
" and",
|
|
486
|
+
" ",
|
|
487
|
+
/* @__PURE__ */ jsx("code", { children: "onError" }),
|
|
488
|
+
" tell the page, ",
|
|
489
|
+
/* @__PURE__ */ jsx("code", { children: "onError" }),
|
|
490
|
+
" only once every try has failed."
|
|
491
|
+
] }),
|
|
492
|
+
children: [
|
|
493
|
+
/* @__PURE__ */ jsx(Example, {
|
|
494
|
+
align: "start",
|
|
495
|
+
code: `
|
|
496
|
+
<Thumbnail
|
|
497
|
+
size="xl"
|
|
498
|
+
src={justUploadedUrl}
|
|
499
|
+
alt="Arden ergonomic chair, just uploaded"
|
|
500
|
+
name="Arden ergonomic chair"
|
|
501
|
+
spinner
|
|
502
|
+
retries={3}
|
|
503
|
+
retryDelay={2500}
|
|
504
|
+
showRetry
|
|
505
|
+
/>`,
|
|
506
|
+
children: /* @__PURE__ */ jsx(RetryDemo, {})
|
|
507
|
+
}),
|
|
508
|
+
/* @__PURE__ */ jsx(Example, {
|
|
509
|
+
align: "start",
|
|
510
|
+
code: `
|
|
511
|
+
<Thumbnail size="lg" src={urlThatFails} alt="Wren Stationery" name="Wren Stationery" showRetry />
|
|
512
|
+
<Thumbnail size="md" src={urlThatFails} alt="Wren Stationery" name="Wren Stationery" showRetry />`,
|
|
513
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
514
|
+
className: "thumbnail-row",
|
|
515
|
+
children: [/* @__PURE__ */ jsx(Tile, {
|
|
516
|
+
label: "Failed, 64px",
|
|
517
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
518
|
+
size: "lg",
|
|
519
|
+
src: urlThatFails,
|
|
520
|
+
alt: "Wren Stationery",
|
|
521
|
+
name: "Wren Stationery",
|
|
522
|
+
showRetry: true
|
|
523
|
+
})
|
|
524
|
+
}), /* @__PURE__ */ jsx(Tile, {
|
|
525
|
+
label: "Failed, 40px",
|
|
526
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
527
|
+
size: "md",
|
|
528
|
+
src: urlThatFails,
|
|
529
|
+
alt: "Wren Stationery",
|
|
530
|
+
name: "Wren Stationery",
|
|
531
|
+
showRetry: true
|
|
532
|
+
})
|
|
533
|
+
})]
|
|
534
|
+
})
|
|
535
|
+
}),
|
|
536
|
+
/* @__PURE__ */ jsxs(Note, {
|
|
537
|
+
title: "The spinner is a choice",
|
|
538
|
+
children: [
|
|
539
|
+
"Without ",
|
|
540
|
+
/* @__PURE__ */ jsx("code", { children: "spinner" }),
|
|
541
|
+
" a thumbnail shows its fallback while it loads, as it always has: in a long list a spinner on every row is noise. Reach for it where one picture matters, a detail page or a tile someone is waiting on. Under 72px the Retry button is its icon alone, and its word stays its name."
|
|
542
|
+
]
|
|
543
|
+
})
|
|
544
|
+
]
|
|
545
|
+
}),
|
|
546
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
547
|
+
id: "kinds",
|
|
548
|
+
title: "Videos and 3D models",
|
|
549
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
550
|
+
/* @__PURE__ */ jsx("code", { children: "kind=\"video\"" }),
|
|
551
|
+
" draws a video by its ",
|
|
552
|
+
/* @__PURE__ */ jsx("code", { children: "poster" }),
|
|
553
|
+
", or by its first frame when it has none (muted, never played, out of the tab order), with a play mark and a Video pill. ",
|
|
554
|
+
/* @__PURE__ */ jsx("code", { children: "kind=\"model\"" }),
|
|
555
|
+
" ",
|
|
556
|
+
"draws a 3D model by its ",
|
|
557
|
+
/* @__PURE__ */ jsx("code", { children: "poster" }),
|
|
558
|
+
", a render, or a cube when it has none, with a 3D pill. The pills show on a frame of 64px or more; the words are ",
|
|
559
|
+
/* @__PURE__ */ jsx("code", { children: "labels.video" }),
|
|
560
|
+
" and ",
|
|
561
|
+
/* @__PURE__ */ jsx("code", { children: "labels.model" }),
|
|
562
|
+
"."
|
|
563
|
+
] }),
|
|
564
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
565
|
+
align: "start",
|
|
566
|
+
code: `
|
|
567
|
+
<Thumbnail size="xl" kind="video" src={tourUrl} poster={posterUrl} alt="Showroom tour, video" fit="cover" />
|
|
568
|
+
<Thumbnail size="xl" kind="model" src={chairModelUrl} poster={renderUrl} alt="Arden chair, 3D model" />
|
|
569
|
+
<Thumbnail size="xl" kind="model" src={chairModelUrl} alt="Arden chair, 3D model" />
|
|
570
|
+
<Thumbnail size="md" kind="video" src={tourUrl} poster={posterUrl} alt="Showroom tour, video" fit="cover" />`,
|
|
571
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
572
|
+
className: "thumbnail-row",
|
|
573
|
+
children: [
|
|
574
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
575
|
+
label: "A video's poster",
|
|
576
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
577
|
+
size: "xl",
|
|
578
|
+
kind: "video",
|
|
579
|
+
src: "/tour.mp4",
|
|
580
|
+
poster: posterUrl,
|
|
581
|
+
alt: "Showroom tour, video",
|
|
582
|
+
fit: "cover"
|
|
583
|
+
})
|
|
584
|
+
}),
|
|
585
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
586
|
+
label: "A model's render",
|
|
587
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
588
|
+
size: "xl",
|
|
589
|
+
kind: "model",
|
|
590
|
+
src: "/arden.glb",
|
|
591
|
+
poster: renderUrl,
|
|
592
|
+
alt: "Arden chair, 3D model"
|
|
593
|
+
})
|
|
594
|
+
}),
|
|
595
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
596
|
+
label: "A model, no render",
|
|
597
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
598
|
+
size: "xl",
|
|
599
|
+
kind: "model",
|
|
600
|
+
src: "/arden.glb",
|
|
601
|
+
alt: "Arden chair, 3D model"
|
|
602
|
+
})
|
|
603
|
+
}),
|
|
604
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
605
|
+
label: "40px: no pill",
|
|
606
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
607
|
+
size: "md",
|
|
608
|
+
kind: "video",
|
|
609
|
+
src: "/tour.mp4",
|
|
610
|
+
poster: posterUrl,
|
|
611
|
+
alt: "Showroom tour, video",
|
|
612
|
+
fit: "cover"
|
|
613
|
+
})
|
|
614
|
+
})
|
|
615
|
+
]
|
|
616
|
+
})
|
|
617
|
+
})
|
|
618
|
+
}),
|
|
619
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
620
|
+
id: "grounds",
|
|
621
|
+
title: "Grounds, logos and app icons",
|
|
622
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
623
|
+
"A picture stands on white by default, the ground a product cut-out is shot against.",
|
|
624
|
+
" ",
|
|
625
|
+
/* @__PURE__ */ jsx("code", { children: "ground=\"checkerboard\"" }),
|
|
626
|
+
" shows a picture's see-through parts on the theme's greys, as a media library does, and ",
|
|
627
|
+
/* @__PURE__ */ jsx("code", { children: "ground=\"clear\"" }),
|
|
628
|
+
" stands it on nothing. ",
|
|
629
|
+
/* @__PURE__ */ jsx("code", { children: "padded" }),
|
|
630
|
+
" keeps a logo off the frame's edge. For an app or a plugin icon, ",
|
|
631
|
+
/* @__PURE__ */ jsx("code", { children: "shape=\"app\"" }),
|
|
632
|
+
" rounds the corners at 28% of the side, and the icon's branding data gives the tile its colour (",
|
|
633
|
+
/* @__PURE__ */ jsx("code", { children: "groundColor" }),
|
|
634
|
+
") and its art a zoom (",
|
|
635
|
+
/* @__PURE__ */ jsx("code", { children: "zoom" }),
|
|
636
|
+
"), so any app reads right from its data alone."
|
|
637
|
+
] }),
|
|
638
|
+
children: [/* @__PURE__ */ jsx(Example, {
|
|
639
|
+
align: "start",
|
|
640
|
+
code: `
|
|
641
|
+
<Thumbnail size="xl" src={markUrl} alt="Fernhill Interiors" ground="checkerboard" />
|
|
642
|
+
<Thumbnail size={80} src={logoUrl} alt="Fernhill Interiors" padded />
|
|
643
|
+
<Thumbnail size={80} src={appArtUrl} alt="Ledger Sync" shape="app" groundColor="#1d5bd8" zoom={1.6} />
|
|
644
|
+
<Thumbnail size={80} src={appArtUrl} alt="Ledger Sync" shape="app" groundColor="#1d5bd8" />`,
|
|
645
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
646
|
+
className: "thumbnail-row",
|
|
647
|
+
children: [
|
|
648
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
649
|
+
label: "Checkerboard",
|
|
650
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
651
|
+
size: "xl",
|
|
652
|
+
src: markUrl,
|
|
653
|
+
alt: "Fernhill Interiors",
|
|
654
|
+
ground: "checkerboard"
|
|
655
|
+
})
|
|
656
|
+
}),
|
|
657
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
658
|
+
label: "A padded logo, 80px",
|
|
659
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
660
|
+
size: 80,
|
|
661
|
+
src: logoUrl,
|
|
662
|
+
alt: "Fernhill Interiors",
|
|
663
|
+
padded: true
|
|
664
|
+
})
|
|
665
|
+
}),
|
|
666
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
667
|
+
label: "An app icon, zoomed",
|
|
668
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
669
|
+
size: 80,
|
|
670
|
+
src: appArtUrl,
|
|
671
|
+
alt: "Ledger Sync",
|
|
672
|
+
shape: "app",
|
|
673
|
+
groundColor: "#1d5bd8",
|
|
674
|
+
zoom: 1.6
|
|
675
|
+
})
|
|
676
|
+
}),
|
|
677
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
678
|
+
label: "The same art, no zoom",
|
|
679
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
680
|
+
size: 80,
|
|
681
|
+
src: appArtUrl,
|
|
682
|
+
alt: "Ledger Sync",
|
|
683
|
+
shape: "app",
|
|
684
|
+
groundColor: "#1d5bd8"
|
|
685
|
+
})
|
|
686
|
+
})
|
|
687
|
+
]
|
|
688
|
+
})
|
|
689
|
+
}), /* @__PURE__ */ jsx(SubSection, {
|
|
690
|
+
title: "Over a cover",
|
|
691
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
692
|
+
/* @__PURE__ */ jsx("code", { children: "ring" }),
|
|
693
|
+
" draws a ring of the surface colour round the frame, so a logo laid over a cover cuts out of it. Set ",
|
|
694
|
+
/* @__PURE__ */ jsx("code", { children: "--o-thumbnail-ring" }),
|
|
695
|
+
" where the surface is not the canvas."
|
|
696
|
+
] }),
|
|
697
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
698
|
+
align: "fill",
|
|
699
|
+
code: `
|
|
700
|
+
<div className="profile-cover">
|
|
701
|
+
<img src={coverUrl} alt="" />
|
|
702
|
+
<Thumbnail size={80} src={logoUrl} alt="Fernhill Interiors" padded ring />
|
|
703
|
+
</div>`,
|
|
704
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
705
|
+
className: "thumbnail-cover",
|
|
706
|
+
children: [/* @__PURE__ */ jsx("img", {
|
|
707
|
+
className: "thumbnail-cover__image",
|
|
708
|
+
src: coverUrl,
|
|
709
|
+
alt: ""
|
|
710
|
+
}), /* @__PURE__ */ jsx(Thumbnail, {
|
|
711
|
+
className: "thumbnail-cover__logo",
|
|
712
|
+
size: 80,
|
|
713
|
+
src: logoUrl,
|
|
714
|
+
alt: "Fernhill Interiors",
|
|
715
|
+
padded: true,
|
|
716
|
+
ring: true
|
|
717
|
+
})]
|
|
718
|
+
})
|
|
719
|
+
})
|
|
720
|
+
})]
|
|
721
|
+
}),
|
|
722
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
723
|
+
id: "corners",
|
|
724
|
+
title: "Badges, counts and actions",
|
|
725
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
726
|
+
/* @__PURE__ */ jsx("code", { children: "badge" }),
|
|
727
|
+
" sits on the start corner (a Primary star, an order number, a page type) and",
|
|
728
|
+
" ",
|
|
729
|
+
/* @__PURE__ */ jsx("code", { children: "count" }),
|
|
730
|
+
" on the end corner (how many more). Both are drawn for the eye: say what they mean in",
|
|
731
|
+
" ",
|
|
732
|
+
/* @__PURE__ */ jsx("code", { children: "alt" }),
|
|
733
|
+
". ",
|
|
734
|
+
/* @__PURE__ */ jsx("code", { children: "actions" }),
|
|
735
|
+
" puts controls on the top end corner, ",
|
|
736
|
+
/* @__PURE__ */ jsx("code", { children: "ThumbnailAction" }),
|
|
737
|
+
" ",
|
|
738
|
+
"buttons, shown under the pointer and while the frame has focus, and always on a touch screen. A press on one is its own, never the row's or the tile's under it."
|
|
739
|
+
] }),
|
|
740
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
741
|
+
align: "start",
|
|
742
|
+
code: `
|
|
743
|
+
<Thumbnail size="xl" src={chairUrl} alt="Arden ergonomic chair, primary image" fit="cover"
|
|
744
|
+
badge={<><StarIcon weight="fill" /> Primary</>} />
|
|
745
|
+
<Thumbnail size="xl" src={lampUrl} alt="Linden task lamp, image 2, 4 more" fit="cover" badge="2" count="+4" />
|
|
746
|
+
<Thumbnail
|
|
747
|
+
size="xl"
|
|
748
|
+
src={chairUrl}
|
|
749
|
+
alt="Arden ergonomic chair"
|
|
750
|
+
fit="cover"
|
|
751
|
+
actions={
|
|
752
|
+
<>
|
|
753
|
+
<ThumbnailAction label="Edit Arden ergonomic chair"><PencilSimpleIcon /></ThumbnailAction>
|
|
754
|
+
<ThumbnailAction label="Remove Arden ergonomic chair" tone="negative"><XIcon weight="bold" /></ThumbnailAction>
|
|
755
|
+
</>
|
|
756
|
+
}
|
|
757
|
+
/>`,
|
|
758
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
759
|
+
className: "thumbnail-row",
|
|
760
|
+
children: [
|
|
761
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
762
|
+
label: "A badge",
|
|
763
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
764
|
+
size: "xl",
|
|
765
|
+
src: chairUrl,
|
|
766
|
+
alt: "Arden ergonomic chair, primary image",
|
|
767
|
+
fit: "cover",
|
|
768
|
+
badge: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(StarIcon, { weight: "fill" }), " Primary"] })
|
|
769
|
+
})
|
|
770
|
+
}),
|
|
771
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
772
|
+
label: "A badge and a count",
|
|
773
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
774
|
+
size: "xl",
|
|
775
|
+
src: lampUrl,
|
|
776
|
+
alt: "Linden task lamp, image 2, 4 more",
|
|
777
|
+
fit: "cover",
|
|
778
|
+
badge: "2",
|
|
779
|
+
count: "+4"
|
|
780
|
+
})
|
|
781
|
+
}),
|
|
782
|
+
/* @__PURE__ */ jsx(Tile, {
|
|
783
|
+
label: "Actions (hover or focus)",
|
|
784
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
785
|
+
size: "xl",
|
|
786
|
+
src: chairUrl,
|
|
787
|
+
alt: "Arden ergonomic chair",
|
|
788
|
+
fit: "cover",
|
|
789
|
+
actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ThumbnailAction, {
|
|
790
|
+
label: "Edit Arden ergonomic chair",
|
|
791
|
+
children: /* @__PURE__ */ jsx(PencilSimpleIcon, {})
|
|
792
|
+
}), /* @__PURE__ */ jsx(ThumbnailAction, {
|
|
793
|
+
label: "Remove Arden ergonomic chair",
|
|
794
|
+
tone: "negative",
|
|
795
|
+
children: /* @__PURE__ */ jsx(XIcon, { weight: "bold" })
|
|
796
|
+
})] })
|
|
797
|
+
})
|
|
798
|
+
})
|
|
799
|
+
]
|
|
800
|
+
})
|
|
801
|
+
})
|
|
802
|
+
}),
|
|
803
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
804
|
+
id: "both-themes",
|
|
805
|
+
title: "In both themes",
|
|
806
|
+
description: /* @__PURE__ */ jsx("p", { children: "A photo and a brand mark on the frame's ground, light and dark side by side. The ground is white in both themes, so a cut-out product reads the same on either." }),
|
|
807
|
+
children: /* @__PURE__ */ jsx(ThemePair, { children: /* @__PURE__ */ jsxs("div", {
|
|
808
|
+
className: "thumbnail-row",
|
|
809
|
+
children: [
|
|
810
|
+
/* @__PURE__ */ jsx(Thumbnail, {
|
|
811
|
+
size: "lg",
|
|
812
|
+
src: chairUrl,
|
|
813
|
+
alt: "Arden ergonomic chair",
|
|
814
|
+
name: "Arden ergonomic chair"
|
|
815
|
+
}),
|
|
816
|
+
/* @__PURE__ */ jsx(Thumbnail, {
|
|
817
|
+
size: "lg",
|
|
818
|
+
src: logoUrl,
|
|
819
|
+
alt: "Fernhill Interiors",
|
|
820
|
+
name: "Fernhill Interiors",
|
|
821
|
+
shape: "square"
|
|
822
|
+
}),
|
|
823
|
+
/* @__PURE__ */ jsx(Thumbnail, {
|
|
824
|
+
size: "lg",
|
|
825
|
+
name: "Wren Stationery",
|
|
826
|
+
alt: "Wren Stationery",
|
|
827
|
+
shape: "square"
|
|
828
|
+
})
|
|
829
|
+
]
|
|
830
|
+
}) })
|
|
831
|
+
}),
|
|
832
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
833
|
+
id: "guidelines",
|
|
834
|
+
title: "Guidelines",
|
|
835
|
+
children: [/* @__PURE__ */ jsx(DoDont, {
|
|
836
|
+
do: {
|
|
837
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
838
|
+
size: "lg",
|
|
839
|
+
src: chairUrl,
|
|
840
|
+
alt: "Arden ergonomic chair",
|
|
841
|
+
name: "Arden ergonomic chair"
|
|
842
|
+
}),
|
|
843
|
+
caption: "Name the picture with alt, and give name for the fallback initials: it still reads in the list if the picture never comes."
|
|
844
|
+
},
|
|
845
|
+
dont: {
|
|
846
|
+
children: /* @__PURE__ */ jsx(Thumbnail, {
|
|
847
|
+
size: "lg",
|
|
848
|
+
src: chairUrl,
|
|
849
|
+
alt: ""
|
|
850
|
+
}),
|
|
851
|
+
caption: "An empty alt hides the frame. Without a name written beside it, the picture means nothing to a screen reader."
|
|
852
|
+
}
|
|
853
|
+
}), /* @__PURE__ */ jsx(Guidelines, { items: [
|
|
854
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
855
|
+
"Use ",
|
|
856
|
+
/* @__PURE__ */ jsx("code", { children: "md" }),
|
|
857
|
+
" in a list and ",
|
|
858
|
+
/* @__PURE__ */ jsx("code", { children: "lg" }),
|
|
859
|
+
" or ",
|
|
860
|
+
/* @__PURE__ */ jsx("code", { children: "xl" }),
|
|
861
|
+
" on a detail page. Keep one step on a page: mixed sizes make a list uneven."
|
|
862
|
+
] }),
|
|
863
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
864
|
+
"Always give ",
|
|
865
|
+
/* @__PURE__ */ jsx("code", { children: "name" }),
|
|
866
|
+
" as well as ",
|
|
867
|
+
/* @__PURE__ */ jsx("code", { children: "alt" }),
|
|
868
|
+
". The initials are the fallback, and a brand reads better as its name than as a blank frame."
|
|
869
|
+
] }),
|
|
870
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
871
|
+
"Reach for ",
|
|
872
|
+
/* @__PURE__ */ jsx("code", { children: "fit=\"cover\"" }),
|
|
873
|
+
" with ",
|
|
874
|
+
/* @__PURE__ */ jsx("code", { children: "shape=\"square\"" }),
|
|
875
|
+
" for a real photo, and the default",
|
|
876
|
+
" ",
|
|
877
|
+
/* @__PURE__ */ jsx("code", { children: "contain" }),
|
|
878
|
+
" on white for a product cut-out or a logo."
|
|
879
|
+
] }),
|
|
880
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
881
|
+
/* @__PURE__ */ jsx("code", { children: "selected" }),
|
|
882
|
+
" is a look, not a state. On a tile the person picks, pair it with",
|
|
883
|
+
" ",
|
|
884
|
+
/* @__PURE__ */ jsx("code", { children: "aria-pressed" }),
|
|
885
|
+
" (a toggle) or ",
|
|
886
|
+
/* @__PURE__ */ jsx("code", { children: "aria-checked" }),
|
|
887
|
+
" (a radio or a checkbox), as the",
|
|
888
|
+
" ",
|
|
889
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
890
|
+
to: "/components/checkbox",
|
|
891
|
+
children: "Checkbox"
|
|
892
|
+
}),
|
|
893
|
+
" and",
|
|
894
|
+
" ",
|
|
895
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
896
|
+
to: "/components/radio-group",
|
|
897
|
+
children: "RadioGroup"
|
|
898
|
+
}),
|
|
899
|
+
" pages show."
|
|
900
|
+
] }),
|
|
901
|
+
"Do not rely on the initials alone for a product people need to recognise: pass the real picture when you have one."
|
|
902
|
+
] })]
|
|
903
|
+
}),
|
|
904
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
905
|
+
id: "accessibility",
|
|
906
|
+
title: "Accessibility",
|
|
907
|
+
children: /* @__PURE__ */ jsx(Guidelines, { items: [
|
|
908
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
909
|
+
"The frame is an image with the ",
|
|
910
|
+
/* @__PURE__ */ jsx("code", { children: "img" }),
|
|
911
|
+
" role, named by ",
|
|
912
|
+
/* @__PURE__ */ jsx("code", { children: "alt" }),
|
|
913
|
+
"."
|
|
914
|
+
] }),
|
|
915
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
916
|
+
"When the name is already written beside it, pass ",
|
|
917
|
+
/* @__PURE__ */ jsx("code", { children: "alt=\"\"" }),
|
|
918
|
+
". The frame is then hidden from screen readers, and the initials still come from ",
|
|
919
|
+
/* @__PURE__ */ jsx("code", { children: "name" }),
|
|
920
|
+
"."
|
|
921
|
+
] }),
|
|
922
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
923
|
+
"The fallback, your icon and the drawn picture are all hidden from assistive technology, so the words of ",
|
|
924
|
+
/* @__PURE__ */ jsx("code", { children: "alt" }),
|
|
925
|
+
" are read once and nothing else."
|
|
926
|
+
] }),
|
|
927
|
+
/* @__PURE__ */ jsx(Fragment$1, { children: "The frame takes no focus and answers no key: it is a picture, not a control. If the thumb opens a record, put the link in the row beside it (or on the row itself), as a list does." }),
|
|
928
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
929
|
+
"Loading is said only with ",
|
|
930
|
+
/* @__PURE__ */ jsx("code", { children: "spinner" }),
|
|
931
|
+
": a polite status says \"Image loading\" when a picture starts to load again (a new ",
|
|
932
|
+
/* @__PURE__ */ jsx("code", { children: "src" }),
|
|
933
|
+
", a retry), never for the one the frame first draws."
|
|
934
|
+
] }),
|
|
935
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
936
|
+
"With ",
|
|
937
|
+
/* @__PURE__ */ jsx("code", { children: "spinner" }),
|
|
938
|
+
", ",
|
|
939
|
+
/* @__PURE__ */ jsx("code", { children: "showRetry" }),
|
|
940
|
+
" or ",
|
|
941
|
+
/* @__PURE__ */ jsx("code", { children: "actions" }),
|
|
942
|
+
" the frame holds controls or a status, which an image would hide: the picture inside it is the image, named by ",
|
|
943
|
+
/* @__PURE__ */ jsx("code", { children: "alt" }),
|
|
944
|
+
". When the Retry button goes, as its picture loads, focus moves to the picture rather than the page."
|
|
945
|
+
] }),
|
|
946
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
947
|
+
"The badge, the count, the play mark and the Video and 3D pills are hidden from assistive technology. Say what they mean in ",
|
|
948
|
+
/* @__PURE__ */ jsx("code", { children: "alt" }),
|
|
949
|
+
": \"Arden chair, primary image\"."
|
|
950
|
+
] }),
|
|
951
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
952
|
+
"A ",
|
|
953
|
+
/* @__PURE__ */ jsx("code", { children: "ThumbnailAction" }),
|
|
954
|
+
" is a real button named by ",
|
|
955
|
+
/* @__PURE__ */ jsx("code", { children: "label" }),
|
|
956
|
+
", which also gives its tooltip: name the thing it acts on, \"Remove Arden chair\"."
|
|
957
|
+
] })
|
|
958
|
+
] })
|
|
959
|
+
}),
|
|
960
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
961
|
+
id: "props",
|
|
962
|
+
title: "Props",
|
|
963
|
+
children: [
|
|
964
|
+
/* @__PURE__ */ jsx(PropsTable, {
|
|
965
|
+
title: "Thumbnail",
|
|
966
|
+
rows: [
|
|
967
|
+
{
|
|
968
|
+
name: "src",
|
|
969
|
+
type: "string | null",
|
|
970
|
+
description: "Image URL. Falls back to initials or an icon while it loads and if it fails."
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
name: "alt",
|
|
974
|
+
type: "string",
|
|
975
|
+
required: true,
|
|
976
|
+
description: "The image description. An empty string hides the frame from screen readers."
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
name: "name",
|
|
980
|
+
type: "string",
|
|
981
|
+
description: "Product or brand name: the initials in the fallback come from it."
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
name: "fallback",
|
|
985
|
+
type: "ReactNode",
|
|
986
|
+
description: "Your own fallback, e.g. an icon, drawn at the picture glyph's size. Wins over the initials from name."
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
name: "size",
|
|
990
|
+
type: "'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'fill' | number",
|
|
991
|
+
default: "'md'",
|
|
992
|
+
description: "24, 32, 40, 64, 96, the host width, or a width in px."
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
name: "ratio",
|
|
996
|
+
type: "'1/1' | '4/3' | '3/4' | '3/2' | '2/3' | '16/9' | number",
|
|
997
|
+
default: "'1/1'",
|
|
998
|
+
description: "Width over height, as a named ratio or a number."
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
name: "shape",
|
|
1002
|
+
type: "'rounded' | 'square'",
|
|
1003
|
+
default: "'rounded'",
|
|
1004
|
+
description: "Square keeps the corners, for a QR code or an edge-to-edge tile."
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
name: "fit",
|
|
1008
|
+
type: "'contain' | 'cover'",
|
|
1009
|
+
default: "'contain'",
|
|
1010
|
+
description: "Contain shows a product whole on the white ground; cover fills the frame."
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
name: "selected",
|
|
1014
|
+
type: "boolean",
|
|
1015
|
+
description: "Draws the chosen look (an accent ring inside the frame). Visual only; pair it with a pressed or checked state."
|
|
1016
|
+
},
|
|
1017
|
+
{
|
|
1018
|
+
name: "loading",
|
|
1019
|
+
type: "'lazy' | 'eager'",
|
|
1020
|
+
default: "'lazy'",
|
|
1021
|
+
description: "Native loading hint. Eager is for a thumb above the fold."
|
|
1022
|
+
},
|
|
1023
|
+
{
|
|
1024
|
+
name: "kind",
|
|
1025
|
+
type: "'image' | 'video' | 'model'",
|
|
1026
|
+
default: "'image'",
|
|
1027
|
+
description: "A video draws its poster or first frame with a play mark; a model its poster or a cube. Both carry a pill at 64px and up."
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
name: "poster",
|
|
1031
|
+
type: "string | null",
|
|
1032
|
+
description: "A picture of a video or a model to draw in the file's place."
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
name: "spinner",
|
|
1036
|
+
type: "boolean",
|
|
1037
|
+
description: "A spinner over the frame while the picture loads, and a polite \"Image loading\" when one starts again."
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
name: "retries",
|
|
1041
|
+
type: "number",
|
|
1042
|
+
default: "0",
|
|
1043
|
+
description: "Tries a failed picture again by itself this many times before it counts as failed."
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
name: "retryDelay",
|
|
1047
|
+
type: "number",
|
|
1048
|
+
default: "2000",
|
|
1049
|
+
description: "The pause before each try, in ms."
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
name: "showRetry",
|
|
1053
|
+
type: "boolean",
|
|
1054
|
+
description: "A Retry button on a picture that has failed for good."
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
name: "onLoad",
|
|
1058
|
+
type: "(event) => void",
|
|
1059
|
+
description: "Called when the picture or the first frame has loaded."
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
name: "onError",
|
|
1063
|
+
type: "(event) => void",
|
|
1064
|
+
description: "Called when the picture has failed, after its retries."
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
name: "ground",
|
|
1068
|
+
type: "'photo' | 'checkerboard' | 'clear'",
|
|
1069
|
+
default: "'photo'",
|
|
1070
|
+
description: "What the picture stands on: white, a checkerboard for see-through parts, or nothing."
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
name: "groundColor",
|
|
1074
|
+
type: "string | null",
|
|
1075
|
+
description: "A tile colour from data, as an app's branding gives it. Wins over ground."
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
name: "zoom",
|
|
1079
|
+
type: "number | null",
|
|
1080
|
+
description: "Scales the picture from its middle, as an app icon's branding asks."
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
name: "padded",
|
|
1084
|
+
type: "boolean",
|
|
1085
|
+
description: "Room round a contained picture, so a logo keeps off the frame's edge."
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
name: "ring",
|
|
1089
|
+
type: "boolean",
|
|
1090
|
+
description: "A ring of the surface colour round the frame, for a logo over a cover (--o-thumbnail-ring)."
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
name: "badge",
|
|
1094
|
+
type: "ReactNode",
|
|
1095
|
+
description: "A mark on the start corner. For the eye: say it in alt."
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
name: "count",
|
|
1099
|
+
type: "ReactNode",
|
|
1100
|
+
description: "A pill on the end corner. For the eye: say it in alt."
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
name: "actions",
|
|
1104
|
+
type: "ReactNode",
|
|
1105
|
+
description: "ThumbnailAction buttons on the top end corner, on hover and focus, always on touch."
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
name: "labels",
|
|
1109
|
+
type: "Partial<ThumbnailLabels>",
|
|
1110
|
+
description: "The words: loading, retry, retrying, video, model (thumbnailLabels)."
|
|
1111
|
+
}
|
|
1112
|
+
]
|
|
1113
|
+
}),
|
|
1114
|
+
/* @__PURE__ */ jsx("p", {
|
|
1115
|
+
className: "doc-section__description",
|
|
1116
|
+
children: "Thumbnail also accepts every native span attribute except children."
|
|
1117
|
+
}),
|
|
1118
|
+
/* @__PURE__ */ jsx(PropsTable, {
|
|
1119
|
+
title: "ThumbnailAction",
|
|
1120
|
+
rows: [
|
|
1121
|
+
{
|
|
1122
|
+
name: "label",
|
|
1123
|
+
type: "string",
|
|
1124
|
+
required: true,
|
|
1125
|
+
description: "The name, and the tooltip: \"Remove Arden chair\"."
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
name: "children",
|
|
1129
|
+
type: "ReactNode",
|
|
1130
|
+
required: true,
|
|
1131
|
+
description: "The icon."
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
name: "tone",
|
|
1135
|
+
type: "'neutral' | 'negative'",
|
|
1136
|
+
default: "'neutral'",
|
|
1137
|
+
description: "Negative draws the icon in the negative colour, for remove and delete."
|
|
1138
|
+
}
|
|
1139
|
+
]
|
|
1140
|
+
})
|
|
1141
|
+
]
|
|
1142
|
+
})
|
|
1143
|
+
]
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1146
|
+
//#endregion
|
|
1147
|
+
export { Page, Preview };
|