@orbitcommerce/constellation-docs 1.0.0 → 1.2.1
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/dist/docs.css +14764 -2237
- package/dist/index.js +2 -2
- package/dist/pages/{Playground-CNbBbErC.js → Playground-Mk1yIWXb.js} +2 -2
- 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-BDmScEny.js → _figures-data-DaDvB7Nm.js} +5 -5
- package/dist/pages/_kpi-examples-DeGCBB9T.js +208 -0
- package/dist/pages/{_overlays-specimens-Dpn6oiyH.js → _overlays-specimens-bawR331Z.js} +33 -23
- 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-BvxQWBTy.js +403 -0
- package/dist/pages/address-fields-CwSqro3W.js +277 -0
- package/dist/pages/ai-highlight-D3x2vD83.js +642 -0
- package/dist/pages/{alert-BD4e6QTh.js → alert-D3i7xZTU.js} +195 -50
- package/dist/pages/anchored-overlay-BV0OCu2Q.js +788 -0
- package/dist/pages/{app-shell-KbA-nRqZ.js → app-shell-D4hdlHps.js} +133 -54
- package/dist/pages/{area-chart-B91dLcGo.js → area-chart-BEWFwiB2.js} +183 -27
- package/dist/pages/{avatar-DPPHXJAu.js → avatar-BFEqQViw.js} +194 -12
- package/dist/pages/avatar-upload-BDCzJfyN.js +484 -0
- package/dist/pages/{badge-C9JR0thI.js → badge-0-PyMrih.js} +441 -135
- 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-D3V912P4.js → button-DAyfssDY.js} +276 -79
- package/dist/pages/{calendar-DSDZ9nRH.js → calendar-Ds7KsgSI.js} +69 -17
- package/dist/pages/canvas-stage-1KiPspkX.js +472 -0
- package/dist/pages/card-CXZ3V1d4.js +1612 -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-BwuO8xAv.js → colour-q2ntvI0w.js} +496 -20
- package/dist/pages/column-mapper-TsTG39cl.js +502 -0
- package/dist/pages/combobox-DvK2j5tI.js +1334 -0
- package/dist/pages/{command-palette-xAD7fOg6.js → command-palette-CJ7uBA04.js} +201 -58
- 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-BYSa816m.js → date-picker-GdBciR99.js} +186 -38
- package/dist/pages/date-time-BLKCXtVZ.js +678 -0
- package/dist/pages/{delta-CtAo0eIM.js → delta-CNAGv8JY.js} +266 -61
- 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-BNOb7AqR.js → docs-lM2UBSir.js} +20 -15
- 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-hg7txTc3.js +1381 -0
- package/dist/pages/{figure-tabs-CoPFzzKz.js → figure-tabs-QOeQMY6N.js} +153 -35
- 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-CFQwDtC9.js → home-dashboard-CxPmvduE.js} +21 -18
- 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-C9eSVPPW.js → icon-button-Bu4Gj5sy.js} +370 -31
- package/dist/pages/icon-picker-DEyoMUTh.js +291 -0
- package/dist/pages/icon-tile-DcgxyXPF.js +592 -0
- package/dist/pages/{icons-sxkTs5Ob.js → icons-CJ9Aar3d.js} +315 -52
- 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-DpsX8G_n.js → installation-DRUWNVHP.js} +112 -29
- package/dist/pages/job-indicator-DOXWbFdl.js +755 -0
- package/dist/pages/kanban-Dy9sPAI0.js +740 -0
- package/dist/pages/{kbd-cNfDoikz.js → kbd-UNj4zqxn.js} +15 -14
- 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-ClvLn9Lb.js → live-globe-95ROMhGQ.js} +191 -47
- 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-BfGF1Pq9.js → logo-D3a3QGKJ.js} +13 -13
- 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-by2sgQ09.js → menu-NrLYKqKp.js} +623 -109
- 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-BvTGc2Dk.js → motion-CrXtiBvA.js} +20 -10
- package/dist/pages/number-input-CuyMZg18.js +968 -0
- package/dist/pages/orbit-loader-DeVBtkFE.js +219 -0
- package/dist/pages/{orbit-spinner-Dil1Z3Oy.js → orbit-spinner-Dxv5qAhr.js} +30 -14
- package/dist/pages/otp-input-CVRoX1mw.js +591 -0
- package/dist/pages/{overview-BPEbZQ6g.js → overview-BSfEqHY8.js} +4 -4
- package/dist/pages/package-dimensions-DFCyZj_T.js +192 -0
- package/dist/pages/{pagination-BBUnGvv5.js → pagination-C1EgVtW4.js} +74 -29
- 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-BCPvtP8J.js +251 -0
- package/dist/pages/point-list-BbPmZjsm.js +222 -0
- package/dist/pages/{popover-Db1gLDpb.js → popover-C3Oar9D5.js} +76 -14
- 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-CeAIOIdt.js → principles-pnDyfHpK.js} +9 -9
- 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-CkdBWWfG.js → radio-group-CbiibLwn.js} +581 -18
- 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-CNR7zpf7.js +594 -0
- package/dist/pages/{release-Dvo684UJ.js → release-DYBCY7jm.js} +4 -1
- 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-qmvH84Mq.js → rolling-number-GR3Cyfpz.js} +12 -12
- 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-BN7MWGQ4.js → search-field-D1uG7R6A.js} +15 -15
- 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-CTbIpRBW.js → segmented-control-D-FB1K1T.js} +450 -37
- package/dist/pages/{select-DguELoRR.js → select-DZ43NpOm.js} +22 -17
- package/dist/pages/selection-chrome-Czcs6RN6.js +437 -0
- package/dist/pages/{separator-CPZub9pv.js → separator-CFwqRvfO.js} +99 -22
- package/dist/pages/serp-preview-BGwORjmo.js +346 -0
- package/dist/pages/setting-row-Bt-dZV8H.js +913 -0
- package/dist/pages/{shape-DKvA0YKr.js → shape-DzniHAVT.js} +10 -10
- 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-DMMYGbHn.js → sparkline-D3aavCly.js} +301 -22
- 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-B-Qe4kcT.js → switch-C93K6j9h.js} +151 -51
- package/dist/pages/table-mq_pNXza.js +3232 -0
- package/dist/pages/{tabs-B4M-usCV.js → tabs-Cf4MZ8Fq.js} +257 -21
- package/dist/pages/tag-input-BjZWKKRJ.js +1307 -0
- package/dist/pages/task-card-Dv0sR1-w.js +295 -0
- package/dist/pages/{textarea-fTuUZRQb.js → textarea-CCM-SnGN.js} +271 -15
- 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-CKP03zjy.js → toast-zXLRiMRT.js} +240 -25
- package/dist/pages/tool-rail-B1AbTMCP.js +355 -0
- package/dist/pages/toolbar-B9l_fHKy.js +754 -0
- package/dist/pages/{tooltip-CBYil3kt.js → tooltip-LHtCUkF-.js} +162 -33
- 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-PCbg8Bhg.js → typography-BSijtiRl.js} +153 -12
- 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 +10989 -1108
- package/package.json +3 -3
- package/dist/pages/card-DUggbis3.js +0 -659
- package/dist/pages/checkbox-DwimQaK3.js +0 -365
- package/dist/pages/dialog-BRAf4LMh.js +0 -1451
- package/dist/pages/empty-state-C-mLrXW2.js +0 -417
- package/dist/pages/input-KF9Gkawf.js +0 -1093
- package/dist/pages/registry-CroHzK9I.js +0 -244
- package/dist/pages/skeleton-DLuBhP46.js +0 -561
- package/dist/pages/table-AMoODng4.js +0 -607
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { d as Section$1, i as DocPage, o as Example, r as DoDont, s as Guidelines, u as PropsTable } from "./docs-lM2UBSir.js";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Button, Carousel, DialogFrame, Gallery, Thumbnail } from "@orbitcommerce/constellation";
|
|
6
|
+
//#region src/pages/components/gallery.tsx
|
|
7
|
+
var svgUrl = (markup) => `data:image/svg+xml,${encodeURIComponent(markup)}`;
|
|
8
|
+
/** A drawn app screen: a sidebar, a header and a body of the given kind. */
|
|
9
|
+
function screen(body, accent) {
|
|
10
|
+
return svgUrl(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 800"><rect width="1280" height="800" fill="#f6f7f8"/><rect width="220" height="800" fill="#e9ecee"/><rect x="28" y="36" width="120" height="18" rx="9" fill="${accent}"/>${[
|
|
11
|
+
0,
|
|
12
|
+
1,
|
|
13
|
+
2,
|
|
14
|
+
3,
|
|
15
|
+
4
|
|
16
|
+
].map((i) => `<rect x="28" y="${100 + i * 44}" width="${150 - i * 12}" height="14" rx="7" fill="#c9cfd3"/>`).join("")}<rect x="260" y="36" width="320" height="26" rx="13" fill="#d6dbde"/>${body}</svg>`);
|
|
17
|
+
}
|
|
18
|
+
var listScreen = screen([
|
|
19
|
+
0,
|
|
20
|
+
1,
|
|
21
|
+
2,
|
|
22
|
+
3,
|
|
23
|
+
4,
|
|
24
|
+
5,
|
|
25
|
+
6
|
|
26
|
+
].map((i) => `<rect x="260" y="${110 + i * 86}" width="980" height="70" rx="12" fill="#ffffff"/><circle cx="300" cy="${145 + i * 86}" r="18" fill="#c8d9d3"/><rect x="336" y="${136 + i * 86}" width="${260 - i * 14}" height="16" rx="8" fill="#9aa5ab"/><rect x="1080" y="${136 + i * 86}" width="120" height="16" rx="8" fill="#2f6f5e"/>`).join(""), "#2f6f5e");
|
|
27
|
+
var detailScreen = screen("<rect x=\"260\" y=\"110\" width=\"620\" height=\"640\" rx=\"16\" fill=\"#ffffff\"/><rect x=\"300\" y=\"150\" width=\"540\" height=\"300\" rx=\"12\" fill=\"#dfe8e6\"/><rect x=\"300\" y=\"480\" width=\"360\" height=\"20\" rx=\"10\" fill=\"#9aa5ab\"/><rect x=\"300\" y=\"520\" width=\"480\" height=\"14\" rx=\"7\" fill=\"#c9cfd3\"/><rect x=\"300\" y=\"548\" width=\"420\" height=\"14\" rx=\"7\" fill=\"#c9cfd3\"/><rect x=\"910\" y=\"110\" width=\"330\" height=\"300\" rx=\"16\" fill=\"#ffffff\"/><rect x=\"940\" y=\"150\" width=\"200\" height=\"18\" rx=\"9\" fill=\"#9aa5ab\"/><rect x=\"940\" y=\"330\" width=\"270\" height=\"48\" rx=\"24\" fill=\"#1d5bd8\"/>", "#1d5bd8");
|
|
28
|
+
var chartScreen = screen(`<rect x="260" y="110" width="980" height="640" rx="16" fill="#ffffff"/>${[
|
|
29
|
+
180,
|
|
30
|
+
260,
|
|
31
|
+
220,
|
|
32
|
+
340,
|
|
33
|
+
300,
|
|
34
|
+
420,
|
|
35
|
+
380,
|
|
36
|
+
470
|
|
37
|
+
].map((h, i) => `<rect x="${320 + i * 112}" y="${690 - h}" width="64" height="${h}" rx="8" fill="${i === 7 ? "#c9781e" : "#e8c79a"}"/>`).join("")}`, "#c9781e");
|
|
38
|
+
var SCREENSHOTS = [
|
|
39
|
+
{
|
|
40
|
+
id: "orders",
|
|
41
|
+
src: listScreen,
|
|
42
|
+
alt: "Ledger Sync: the order list, each order with its sync state"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "detail",
|
|
46
|
+
src: detailScreen,
|
|
47
|
+
alt: "Ledger Sync: an order with its invoice beside it"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: "reports",
|
|
51
|
+
src: chartScreen,
|
|
52
|
+
alt: "Ledger Sync: takings by week"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: "orders-2",
|
|
56
|
+
src: listScreen,
|
|
57
|
+
alt: "Ledger Sync: the order list, filtered to failed syncs"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "detail-2",
|
|
61
|
+
src: detailScreen,
|
|
62
|
+
alt: "Ledger Sync: the settings for a store"
|
|
63
|
+
}
|
|
64
|
+
];
|
|
65
|
+
var product = (colour, seat) => svgUrl(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 300"><rect width="400" height="300" fill="#ffffff"/><path d="M150 60c0-8 6-14 14-14h72c8 0 14 6 14 14v110H150z" fill="${colour}"/><rect x="128" y="170" width="144" height="28" rx="10" fill="${seat}"/><path d="M150 198v70M250 198v70" stroke="#3b3b3b" stroke-width="10" stroke-linecap="round"/></svg>`);
|
|
66
|
+
var PRODUCT = [
|
|
67
|
+
{
|
|
68
|
+
id: "front",
|
|
69
|
+
src: product("#b98a52", "#8a6033"),
|
|
70
|
+
alt: "Arden ergonomic chair, front"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "teal",
|
|
74
|
+
src: product("#2f6f5e", "#244f43"),
|
|
75
|
+
alt: "Arden ergonomic chair in teal"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: "grey",
|
|
79
|
+
src: product("#8a949a", "#5f686d"),
|
|
80
|
+
alt: "Arden ergonomic chair in slate"
|
|
81
|
+
}
|
|
82
|
+
];
|
|
83
|
+
var ITEMS = [
|
|
84
|
+
{
|
|
85
|
+
name: "Arden ergonomic chair",
|
|
86
|
+
sku: "ARD-100",
|
|
87
|
+
src: PRODUCT[0].src
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "Arden chair, teal",
|
|
91
|
+
sku: "ARD-101",
|
|
92
|
+
src: PRODUCT[1].src
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: "Arden chair, slate",
|
|
96
|
+
sku: "ARD-102",
|
|
97
|
+
src: PRODUCT[2].src
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: "Linden task lamp",
|
|
101
|
+
sku: "LIN-220",
|
|
102
|
+
src: void 0
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "Harbour standing desk",
|
|
106
|
+
sku: "HAR-310",
|
|
107
|
+
src: void 0
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: "Wren desk organiser",
|
|
111
|
+
sku: "WRN-014",
|
|
112
|
+
src: void 0
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: "Thistle filing cabinet",
|
|
116
|
+
sku: "THS-400",
|
|
117
|
+
src: void 0
|
|
118
|
+
}
|
|
119
|
+
];
|
|
120
|
+
function Preview() {
|
|
121
|
+
return /* @__PURE__ */ jsx("div", {
|
|
122
|
+
className: "gallery-preview",
|
|
123
|
+
children: /* @__PURE__ */ jsx(Gallery, {
|
|
124
|
+
images: SCREENSHOTS.slice(0, 3),
|
|
125
|
+
"aria-label": "Screenshots",
|
|
126
|
+
maxHeight: 110
|
|
127
|
+
})
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/** The stage opens a full-size view: here a plain dialog stands in for the dashboards' MediaLightbox. */
|
|
131
|
+
function OpenDemo() {
|
|
132
|
+
const [index, setIndex] = useState(0);
|
|
133
|
+
const [open, setOpen] = useState(null);
|
|
134
|
+
const shown = open === null ? null : SCREENSHOTS[open];
|
|
135
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Gallery, {
|
|
136
|
+
images: SCREENSHOTS,
|
|
137
|
+
index,
|
|
138
|
+
onIndexChange: setIndex,
|
|
139
|
+
onOpen: setOpen,
|
|
140
|
+
"aria-label": "Screenshots"
|
|
141
|
+
}), /* @__PURE__ */ jsx(DialogFrame, {
|
|
142
|
+
open: shown !== null,
|
|
143
|
+
onOpenChange: (next) => {
|
|
144
|
+
if (!next) setOpen(null);
|
|
145
|
+
},
|
|
146
|
+
size: "xl",
|
|
147
|
+
title: shown?.alt ?? "",
|
|
148
|
+
hideCancel: true,
|
|
149
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
150
|
+
onClick: () => setOpen(null),
|
|
151
|
+
children: "Close"
|
|
152
|
+
}),
|
|
153
|
+
children: shown ? /* @__PURE__ */ jsx("img", {
|
|
154
|
+
className: "gallery-lightbox",
|
|
155
|
+
src: shown.src,
|
|
156
|
+
alt: ""
|
|
157
|
+
}) : null
|
|
158
|
+
})] });
|
|
159
|
+
}
|
|
160
|
+
function Page() {
|
|
161
|
+
return /* @__PURE__ */ jsxs(DocPage, {
|
|
162
|
+
title: "Gallery",
|
|
163
|
+
status: "new",
|
|
164
|
+
importNames: ["Gallery", "Carousel"],
|
|
165
|
+
lead: "Pictures one at a time on a stage in the page, with round arrows that step through them and a strip of thumbnails under it, as an app store shows its screenshots. Carousel is its plainer cousin: a row of tiles that scrolls sideways a page at a time.",
|
|
166
|
+
children: [
|
|
167
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
168
|
+
id: "basics",
|
|
169
|
+
title: "Basics",
|
|
170
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
171
|
+
"Give ",
|
|
172
|
+
/* @__PURE__ */ jsx("code", { children: "images" }),
|
|
173
|
+
" (each a ",
|
|
174
|
+
/* @__PURE__ */ jsx("code", { children: "src" }),
|
|
175
|
+
" and an ",
|
|
176
|
+
/* @__PURE__ */ jsx("code", { children: "alt" }),
|
|
177
|
+
") and name the gallery with",
|
|
178
|
+
" ",
|
|
179
|
+
/* @__PURE__ */ jsx("code", { children: "aria-label" }),
|
|
180
|
+
". The picture is contained, never cropped, on a stage up to 520px tall (",
|
|
181
|
+
/* @__PURE__ */ jsx("code", { children: "maxHeight" }),
|
|
182
|
+
"). The arrows wrap at the ends, and the strip under the stage scrolls sideways when the thumbnails do not fit, keeping the one shown in view. Use it where pictures support a page (an app's listing, a supplier's product), not as the page's main media: that is a media library or a lightbox."
|
|
183
|
+
] }),
|
|
184
|
+
children: [/* @__PURE__ */ jsx(Example, {
|
|
185
|
+
align: "fill",
|
|
186
|
+
code: `
|
|
187
|
+
<Gallery images={screenshots} aria-label="Screenshots" />`,
|
|
188
|
+
children: /* @__PURE__ */ jsx(Gallery, {
|
|
189
|
+
images: SCREENSHOTS,
|
|
190
|
+
"aria-label": "Screenshots"
|
|
191
|
+
})
|
|
192
|
+
}), /* @__PURE__ */ jsx(Fragment$1, {})]
|
|
193
|
+
}),
|
|
194
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
195
|
+
id: "full-size",
|
|
196
|
+
title: "Opening full size",
|
|
197
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
198
|
+
"With ",
|
|
199
|
+
/* @__PURE__ */ jsx("code", { children: "onOpen" }),
|
|
200
|
+
" the stage is a button, \"Open image 2 of 5 full size\", called with the picture's place. Draw the full-size view yourself; keep ",
|
|
201
|
+
/* @__PURE__ */ jsx("code", { children: "index" }),
|
|
202
|
+
" in step so closing it leaves the gallery on the picture the person last saw."
|
|
203
|
+
] }),
|
|
204
|
+
children: [/* @__PURE__ */ jsx(Example, {
|
|
205
|
+
align: "fill",
|
|
206
|
+
code: `
|
|
207
|
+
const [index, setIndex] = useState(0)
|
|
208
|
+
const [open, setOpen] = useState<number | null>(null)
|
|
209
|
+
|
|
210
|
+
<Gallery images={screenshots} index={index} onIndexChange={setIndex} onOpen={setOpen} aria-label="Screenshots" />
|
|
211
|
+
<MediaLightbox items={screenshots} index={open} onIndexChange={setOpen} />`,
|
|
212
|
+
children: /* @__PURE__ */ jsx(OpenDemo, {})
|
|
213
|
+
}), /* @__PURE__ */ jsx(Fragment$1, {})]
|
|
214
|
+
}),
|
|
215
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
216
|
+
id: "product-shots",
|
|
217
|
+
title: "Product shots",
|
|
218
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
219
|
+
/* @__PURE__ */ jsx("code", { children: "ground=\"photo\"" }),
|
|
220
|
+
" stands the pictures on the white a product is cut out against, in both themes, and",
|
|
221
|
+
" ",
|
|
222
|
+
/* @__PURE__ */ jsx("code", { children: "ratio" }),
|
|
223
|
+
" fixes the stage's shape so the page does not move as pictures of different shapes come and go, as a supplier's product drawer has it."
|
|
224
|
+
] }),
|
|
225
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
226
|
+
align: "fill",
|
|
227
|
+
code: `
|
|
228
|
+
<Gallery images={productShots} ground="photo" ratio={4 / 3} aria-label="Arden ergonomic chair" />`,
|
|
229
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
230
|
+
className: "gallery-narrow",
|
|
231
|
+
children: /* @__PURE__ */ jsx(Gallery, {
|
|
232
|
+
images: PRODUCT,
|
|
233
|
+
ground: "photo",
|
|
234
|
+
ratio: 4 / 3,
|
|
235
|
+
"aria-label": "Arden ergonomic chair"
|
|
236
|
+
})
|
|
237
|
+
})
|
|
238
|
+
})
|
|
239
|
+
}),
|
|
240
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
241
|
+
id: "empty",
|
|
242
|
+
title: "One picture, or none",
|
|
243
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
244
|
+
"One picture has no arrows and no strip. With none the gallery draws nothing, or the sentence you give as",
|
|
245
|
+
" ",
|
|
246
|
+
/* @__PURE__ */ jsx("code", { children: "empty" }),
|
|
247
|
+
", so a page can say why there is nothing to see."
|
|
248
|
+
] }),
|
|
249
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
250
|
+
align: "fill",
|
|
251
|
+
code: `
|
|
252
|
+
<Gallery images={[screenshots[0]]} aria-label="Screenshots" maxHeight={240} />
|
|
253
|
+
<Gallery images={[]} aria-label="Screenshots" empty="No screenshots uploaded." />`,
|
|
254
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
255
|
+
className: "gallery-stack",
|
|
256
|
+
children: [/* @__PURE__ */ jsx(Gallery, {
|
|
257
|
+
images: SCREENSHOTS.slice(0, 1),
|
|
258
|
+
"aria-label": "Screenshots",
|
|
259
|
+
maxHeight: 240
|
|
260
|
+
}), /* @__PURE__ */ jsx(Gallery, {
|
|
261
|
+
images: [],
|
|
262
|
+
"aria-label": "Screenshots",
|
|
263
|
+
empty: "No screenshots uploaded."
|
|
264
|
+
})]
|
|
265
|
+
})
|
|
266
|
+
})
|
|
267
|
+
}),
|
|
268
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
269
|
+
id: "carousel",
|
|
270
|
+
title: "Carousel",
|
|
271
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
272
|
+
"A row of tiles of your own, each child an item, ",
|
|
273
|
+
/* @__PURE__ */ jsx("code", { children: "itemWidth" }),
|
|
274
|
+
" wide (180px). The arrows show only while the row overflows, scroll it a page at a time, and rest at its ends. Name the row with",
|
|
275
|
+
" ",
|
|
276
|
+
/* @__PURE__ */ jsx("code", { children: "aria-label" }),
|
|
277
|
+
". Each tile is yours to make: a button or a link that opens the thing it shows."
|
|
278
|
+
] }),
|
|
279
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
280
|
+
align: "fill",
|
|
281
|
+
code: `
|
|
282
|
+
<Carousel aria-label="Products">
|
|
283
|
+
{products.map((product) => (
|
|
284
|
+
<button key={product.sku} className="product-tile" onClick={() => open(product)}>
|
|
285
|
+
<Thumbnail size="fill" src={product.image} alt="" name={product.name} />
|
|
286
|
+
<span>{product.name}</span>
|
|
287
|
+
<span>{product.sku}</span>
|
|
288
|
+
</button>
|
|
289
|
+
))}
|
|
290
|
+
</Carousel>`,
|
|
291
|
+
children: /* @__PURE__ */ jsx(Carousel, {
|
|
292
|
+
"aria-label": "Products",
|
|
293
|
+
children: ITEMS.map((item) => /* @__PURE__ */ jsxs("button", {
|
|
294
|
+
type: "button",
|
|
295
|
+
className: "gallery-tile",
|
|
296
|
+
"aria-label": `View ${item.name}`,
|
|
297
|
+
children: [
|
|
298
|
+
/* @__PURE__ */ jsx(Thumbnail, {
|
|
299
|
+
size: "fill",
|
|
300
|
+
src: item.src,
|
|
301
|
+
alt: "",
|
|
302
|
+
name: item.name
|
|
303
|
+
}),
|
|
304
|
+
/* @__PURE__ */ jsx("span", {
|
|
305
|
+
className: "gallery-tile__name",
|
|
306
|
+
children: item.name
|
|
307
|
+
}),
|
|
308
|
+
/* @__PURE__ */ jsx("span", {
|
|
309
|
+
className: "gallery-tile__sku",
|
|
310
|
+
children: item.sku
|
|
311
|
+
})
|
|
312
|
+
]
|
|
313
|
+
}, item.sku))
|
|
314
|
+
})
|
|
315
|
+
})
|
|
316
|
+
}),
|
|
317
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
318
|
+
id: "guidelines",
|
|
319
|
+
title: "Guidelines",
|
|
320
|
+
children: [/* @__PURE__ */ jsx(DoDont, {
|
|
321
|
+
do: {
|
|
322
|
+
children: /* @__PURE__ */ jsx(Gallery, {
|
|
323
|
+
images: SCREENSHOTS.slice(0, 2),
|
|
324
|
+
"aria-label": "Screenshots",
|
|
325
|
+
maxHeight: 90
|
|
326
|
+
}),
|
|
327
|
+
caption: "Describe each picture in alt: what the screen shows, not \"Screenshot 2\"."
|
|
328
|
+
},
|
|
329
|
+
dont: {
|
|
330
|
+
children: /* @__PURE__ */ jsx(Gallery, {
|
|
331
|
+
images: SCREENSHOTS.slice(0, 2).map(({ id, src }) => ({
|
|
332
|
+
id,
|
|
333
|
+
src
|
|
334
|
+
})),
|
|
335
|
+
"aria-label": "Screenshots",
|
|
336
|
+
maxHeight: 90
|
|
337
|
+
}),
|
|
338
|
+
caption: "Without alt a picture is only its place, \"Image 2 of 2\", which tells nobody what it shows."
|
|
339
|
+
}
|
|
340
|
+
}), /* @__PURE__ */ jsx(Guidelines, { items: [
|
|
341
|
+
"Keep the pictures one shape where you can: a stage that changes height as the arrows step makes the page jump. Give ratio when they cannot be.",
|
|
342
|
+
"Use the photo ground for product shots on white, and the sunken ground for screenshots, which carry their own backgrounds.",
|
|
343
|
+
"A carousel is for a row of things to open, not for pictures to look at: those belong in a gallery."
|
|
344
|
+
] })]
|
|
345
|
+
}),
|
|
346
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
347
|
+
id: "accessibility",
|
|
348
|
+
title: "Accessibility",
|
|
349
|
+
children: /* @__PURE__ */ jsx(Guidelines, { items: [
|
|
350
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
351
|
+
"The gallery is a group named by ",
|
|
352
|
+
/* @__PURE__ */ jsx("code", { children: "aria-label" }),
|
|
353
|
+
". The arrows are buttons, \"Previous image\" and \"Next image\", and the picture's place is said in a polite status as it changes: \"Image 3 of 5\"."
|
|
354
|
+
] }),
|
|
355
|
+
"The strip is one tab stop. The left and right arrow keys move along it, in the page’s reading direction, Home and End go to the ends, and each shows its picture as it gets focus. The one shown is aria-current.",
|
|
356
|
+
"The strip's pictures say nothing of their own: each button is named by its place, and the stage's picture carries the alt.",
|
|
357
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
358
|
+
"With ",
|
|
359
|
+
/* @__PURE__ */ jsx("code", { children: "onOpen" }),
|
|
360
|
+
" the stage is a button that names the picture's place and that it opens full size."
|
|
361
|
+
] }),
|
|
362
|
+
"A carousel's arrows rest at the ends, aria-disabled and still focusable, so focus is never dropped as the row reaches its end."
|
|
363
|
+
] })
|
|
364
|
+
}),
|
|
365
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
366
|
+
id: "props",
|
|
367
|
+
title: "Props",
|
|
368
|
+
children: [/* @__PURE__ */ jsx(PropsTable, {
|
|
369
|
+
title: "Gallery",
|
|
370
|
+
rows: [
|
|
371
|
+
{
|
|
372
|
+
name: "images",
|
|
373
|
+
type: "GalleryImage[]",
|
|
374
|
+
required: true,
|
|
375
|
+
description: "Each { id?, src, thumbnail?, alt? }."
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
name: "index",
|
|
379
|
+
type: "number",
|
|
380
|
+
description: "The picture shown, for a controlled gallery."
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
name: "defaultIndex",
|
|
384
|
+
type: "number",
|
|
385
|
+
default: "0",
|
|
386
|
+
description: "The picture shown first."
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
name: "onIndexChange",
|
|
390
|
+
type: "(index: number) => void",
|
|
391
|
+
description: "Called with the place of the picture to show."
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
name: "onOpen",
|
|
395
|
+
type: "(index: number) => void",
|
|
396
|
+
description: "Makes the stage a button that opens the picture full size."
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
name: "empty",
|
|
400
|
+
type: "ReactNode",
|
|
401
|
+
description: "Drawn when there are no pictures. Without it, nothing is."
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
name: "maxHeight",
|
|
405
|
+
type: "number",
|
|
406
|
+
default: "520",
|
|
407
|
+
description: "The stage's tallest, in px, without a ratio."
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
name: "ratio",
|
|
411
|
+
type: "number",
|
|
412
|
+
description: "A fixed shape for the stage, width over height."
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
name: "ground",
|
|
416
|
+
type: "'sunken' | 'photo'",
|
|
417
|
+
default: "'sunken'",
|
|
418
|
+
description: "The quiet ground for screenshots, or the white of a product shot."
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
name: "labels",
|
|
422
|
+
type: "Partial<GalleryLabels>",
|
|
423
|
+
description: "previous, next, show, open, image, position, thumbnails (galleryLabels)."
|
|
424
|
+
}
|
|
425
|
+
]
|
|
426
|
+
}), /* @__PURE__ */ jsx(PropsTable, {
|
|
427
|
+
title: "Carousel",
|
|
428
|
+
rows: [
|
|
429
|
+
{
|
|
430
|
+
name: "children",
|
|
431
|
+
type: "ReactNode",
|
|
432
|
+
required: true,
|
|
433
|
+
description: "The tiles, one per child."
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
name: "itemWidth",
|
|
437
|
+
type: "number",
|
|
438
|
+
default: "180",
|
|
439
|
+
description: "Each tile's width, in px."
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
name: "labels",
|
|
443
|
+
type: "Partial<CarouselLabels>",
|
|
444
|
+
description: "previous, next (carouselLabels)."
|
|
445
|
+
}
|
|
446
|
+
]
|
|
447
|
+
})]
|
|
448
|
+
})
|
|
449
|
+
]
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
//#endregion
|
|
453
|
+
export { Page, Preview };
|