@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,1567 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as DocLink } from "./host-B6znjEgQ.js";
|
|
3
|
+
import { 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 { a as showroomUrl, i as sectionShotUrl, n as fernhillLogoUrl, o as storefrontShotUrl, r as harbourLogoUrl, t as chairUrl } from "./_card-art-0be5ncyV.js";
|
|
5
|
+
import { Fragment, useEffect, useState } from "react";
|
|
6
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Avatar, Badge, Button, Card, CardBody, CardFooter, CardHeader, CardLink, CardMedia, Chip, Delta, IconButton, Separator, SkeletonCard, Table, TableBody, TableCell, TableFrame, TableHead, TableHeaderCell, TableRow } from "@orbitcommerce/constellation";
|
|
8
|
+
import { CaretRightIcon, ClockIcon, EnvelopeSimpleIcon, EyeIcon, HeartIcon, MapPinIcon, PackageIcon, PlusIcon, ReceiptIcon, StarIcon, TranslateIcon, UsersIcon, WalletIcon } from "@orbitcommerce/constellation/icons";
|
|
9
|
+
//#region src/pages/components/card.tsx
|
|
10
|
+
var LOW_STOCK = [
|
|
11
|
+
{
|
|
12
|
+
name: "Arden ergonomic chair, black",
|
|
13
|
+
left: 3,
|
|
14
|
+
weekly: 9
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "Oak veneer desk, 1600mm",
|
|
18
|
+
left: 2,
|
|
19
|
+
weekly: 4
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: "Three drawer pedestal, white",
|
|
23
|
+
left: 5,
|
|
24
|
+
weekly: 6
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
function Preview() {
|
|
28
|
+
return /* @__PURE__ */ jsxs(Card, {
|
|
29
|
+
padding: "sm",
|
|
30
|
+
className: "card-preview",
|
|
31
|
+
children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
32
|
+
icon: /* @__PURE__ */ jsx(PackageIcon, {}),
|
|
33
|
+
title: "Low stock",
|
|
34
|
+
description: "3 products sell out this week"
|
|
35
|
+
}), /* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsx(Button, {
|
|
36
|
+
size: "xs",
|
|
37
|
+
children: "Reorder stock"
|
|
38
|
+
}) })]
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function LowStockCard() {
|
|
42
|
+
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
43
|
+
/* @__PURE__ */ jsx(CardHeader, {
|
|
44
|
+
icon: /* @__PURE__ */ jsx(PackageIcon, {}),
|
|
45
|
+
title: "Low stock",
|
|
46
|
+
description: "Three products sell out this week.",
|
|
47
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
48
|
+
size: "sm",
|
|
49
|
+
variant: "ghost",
|
|
50
|
+
iconEnd: /* @__PURE__ */ jsx(CaretRightIcon, {}),
|
|
51
|
+
children: "View all"
|
|
52
|
+
})
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ jsx(CardBody, {
|
|
55
|
+
className: "card-stock",
|
|
56
|
+
children: LOW_STOCK.map((item, i) => /* @__PURE__ */ jsxs(Fragment, { children: [i > 0 ? /* @__PURE__ */ jsx(Separator, {}) : null, /* @__PURE__ */ jsxs("div", {
|
|
57
|
+
className: "card-stock__row",
|
|
58
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
59
|
+
className: "card-stock__name",
|
|
60
|
+
children: [item.name, /* @__PURE__ */ jsxs("span", {
|
|
61
|
+
className: "card-stock__meta",
|
|
62
|
+
children: [
|
|
63
|
+
"Sells about ",
|
|
64
|
+
item.weekly,
|
|
65
|
+
" a week"
|
|
66
|
+
]
|
|
67
|
+
})]
|
|
68
|
+
}), /* @__PURE__ */ jsxs(Badge, {
|
|
69
|
+
tone: "warning",
|
|
70
|
+
children: [item.left, " left"]
|
|
71
|
+
})]
|
|
72
|
+
})] }, item.name))
|
|
73
|
+
}),
|
|
74
|
+
/* @__PURE__ */ jsxs(CardFooter, { children: [/* @__PURE__ */ jsx(Button, {
|
|
75
|
+
size: "sm",
|
|
76
|
+
variant: "ghost",
|
|
77
|
+
children: "Dismiss"
|
|
78
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
79
|
+
size: "sm",
|
|
80
|
+
children: "Reorder stock"
|
|
81
|
+
})] })
|
|
82
|
+
] });
|
|
83
|
+
}
|
|
84
|
+
/** Two settings cards a phone's width across: a badge that fits beside its title, and an action that does not. */
|
|
85
|
+
function NarrowCards() {
|
|
86
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
87
|
+
className: "card-narrow",
|
|
88
|
+
children: [/* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardHeader, {
|
|
89
|
+
icon: /* @__PURE__ */ jsx(EnvelopeSimpleIcon, {}),
|
|
90
|
+
title: "Abandoned checkout emails",
|
|
91
|
+
description: "A reminder to customers who leave with items in their basket.",
|
|
92
|
+
actions: /* @__PURE__ */ jsx(Badge, {
|
|
93
|
+
tone: "positive",
|
|
94
|
+
children: "On"
|
|
95
|
+
})
|
|
96
|
+
}) }), /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardHeader, {
|
|
97
|
+
icon: /* @__PURE__ */ jsx(TranslateIcon, {}),
|
|
98
|
+
title: "Checkout language",
|
|
99
|
+
description: "Follows your store's language, English (UK).",
|
|
100
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
101
|
+
size: "sm",
|
|
102
|
+
children: "Change the language"
|
|
103
|
+
})
|
|
104
|
+
}) })]
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function OrdersCard() {
|
|
108
|
+
return /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
109
|
+
title: "Orders to fulfil",
|
|
110
|
+
description: "Paid and waiting to ship."
|
|
111
|
+
}), /* @__PURE__ */ jsxs(CardBody, {
|
|
112
|
+
className: "card-figure-row",
|
|
113
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
114
|
+
className: "card-figure",
|
|
115
|
+
children: "7"
|
|
116
|
+
}), /* @__PURE__ */ jsx(Badge, {
|
|
117
|
+
tone: "warning",
|
|
118
|
+
icon: /* @__PURE__ */ jsx(ClockIcon, {}),
|
|
119
|
+
children: "2 due today"
|
|
120
|
+
})]
|
|
121
|
+
})] });
|
|
122
|
+
}
|
|
123
|
+
function DeliveryTipCard() {
|
|
124
|
+
return /* @__PURE__ */ jsxs(Card, {
|
|
125
|
+
variant: "sunken",
|
|
126
|
+
children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
127
|
+
title: "Delivery tip",
|
|
128
|
+
description: "Shoppers in Northern Ireland see no delivery options yet. Add a rule for BT postcodes."
|
|
129
|
+
}), /* @__PURE__ */ jsx(CardBody, { children: /* @__PURE__ */ jsx(Button, {
|
|
130
|
+
size: "sm",
|
|
131
|
+
children: "Add a rule"
|
|
132
|
+
}) })]
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
function PayoutCard({ padding }) {
|
|
136
|
+
return /* @__PURE__ */ jsxs(Card, {
|
|
137
|
+
variant: "raised",
|
|
138
|
+
padding,
|
|
139
|
+
children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
140
|
+
title: "Next payout",
|
|
141
|
+
description: "Friday 2 October, to your account ending 4417."
|
|
142
|
+
}), /* @__PURE__ */ jsxs(CardBody, {
|
|
143
|
+
className: "card-figure-row",
|
|
144
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
145
|
+
className: "card-figure",
|
|
146
|
+
children: "£2,840.16"
|
|
147
|
+
}), /* @__PURE__ */ jsx(Delta, {
|
|
148
|
+
value: 12.4,
|
|
149
|
+
size: "sm",
|
|
150
|
+
label: "vs last week"
|
|
151
|
+
})]
|
|
152
|
+
})]
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
/** The vendor dashboard's supplier card: a cover with badges, a logo over its edge, the name as the card's link, a footer button beside it. */
|
|
156
|
+
function SupplierCard({ selected = false }) {
|
|
157
|
+
return /* @__PURE__ */ jsxs(Card, {
|
|
158
|
+
padding: "sm",
|
|
159
|
+
className: "card-listing",
|
|
160
|
+
selected,
|
|
161
|
+
children: [
|
|
162
|
+
/* @__PURE__ */ jsx(CardMedia, {
|
|
163
|
+
height: 112,
|
|
164
|
+
src: showroomUrl,
|
|
165
|
+
badges: /* @__PURE__ */ jsx(Badge, {
|
|
166
|
+
size: "sm",
|
|
167
|
+
tone: "accent",
|
|
168
|
+
icon: /* @__PURE__ */ jsx(StarIcon, { weight: "fill" }),
|
|
169
|
+
children: "Featured"
|
|
170
|
+
}),
|
|
171
|
+
actions: /* @__PURE__ */ jsx(Badge, {
|
|
172
|
+
size: "sm",
|
|
173
|
+
children: "Trade only"
|
|
174
|
+
}),
|
|
175
|
+
logo: /* @__PURE__ */ jsx("img", {
|
|
176
|
+
src: harbourLogoUrl,
|
|
177
|
+
alt: ""
|
|
178
|
+
})
|
|
179
|
+
}),
|
|
180
|
+
/* @__PURE__ */ jsx(CardHeader, {
|
|
181
|
+
titleAs: "h4",
|
|
182
|
+
title: /* @__PURE__ */ jsx(CardLink, {
|
|
183
|
+
href: "#media",
|
|
184
|
+
children: "Harbour Desk Co"
|
|
185
|
+
}),
|
|
186
|
+
description: /* @__PURE__ */ jsxs("span", {
|
|
187
|
+
className: "card-listing__place",
|
|
188
|
+
children: [/* @__PURE__ */ jsx(MapPinIcon, { "aria-hidden": "true" }), " Leeds, United Kingdom"]
|
|
189
|
+
})
|
|
190
|
+
}),
|
|
191
|
+
/* @__PURE__ */ jsxs(CardBody, {
|
|
192
|
+
className: "card-listing__body",
|
|
193
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
194
|
+
className: "card-listing__text",
|
|
195
|
+
children: "Office desks, task chairs and storage, made to order in Yorkshire and delivered in ten days."
|
|
196
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
197
|
+
className: "card-listing__chips",
|
|
198
|
+
children: [
|
|
199
|
+
/* @__PURE__ */ jsx(Chip, {
|
|
200
|
+
size: "sm",
|
|
201
|
+
children: "Desks"
|
|
202
|
+
}),
|
|
203
|
+
/* @__PURE__ */ jsx(Chip, {
|
|
204
|
+
size: "sm",
|
|
205
|
+
children: "Seating"
|
|
206
|
+
}),
|
|
207
|
+
/* @__PURE__ */ jsx(Chip, {
|
|
208
|
+
size: "sm",
|
|
209
|
+
children: "Storage"
|
|
210
|
+
})
|
|
211
|
+
]
|
|
212
|
+
})]
|
|
213
|
+
}),
|
|
214
|
+
/* @__PURE__ */ jsx(CardFooter, {
|
|
215
|
+
className: "card-listing__foot",
|
|
216
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
217
|
+
size: "sm",
|
|
218
|
+
variant: "secondary",
|
|
219
|
+
fullWidth: true,
|
|
220
|
+
children: "Connect"
|
|
221
|
+
})
|
|
222
|
+
})
|
|
223
|
+
]
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
/** The section library's card: the picture is the button, a hint says what it does, and it shows its work. */
|
|
227
|
+
function SectionCard() {
|
|
228
|
+
const [busy, setBusy] = useState(false);
|
|
229
|
+
useEffect(() => {
|
|
230
|
+
if (!busy) return void 0;
|
|
231
|
+
const timer = window.setTimeout(() => setBusy(false), 1600);
|
|
232
|
+
return () => window.clearTimeout(timer);
|
|
233
|
+
}, [busy]);
|
|
234
|
+
return /* @__PURE__ */ jsxs(Card, {
|
|
235
|
+
padding: "none",
|
|
236
|
+
className: "card-section",
|
|
237
|
+
children: [/* @__PURE__ */ jsx(CardMedia, {
|
|
238
|
+
ratio: "16 / 10",
|
|
239
|
+
src: sectionShotUrl,
|
|
240
|
+
position: "top",
|
|
241
|
+
hint: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(PlusIcon, { "aria-hidden": "true" }), " Add"] }),
|
|
242
|
+
busy,
|
|
243
|
+
busyLabel: "Adding"
|
|
244
|
+
}), /* @__PURE__ */ jsx(CardHeader, {
|
|
245
|
+
className: "card-section__head",
|
|
246
|
+
titleAs: "p",
|
|
247
|
+
title: /* @__PURE__ */ jsx(CardLink, {
|
|
248
|
+
onClick: () => setBusy(true),
|
|
249
|
+
busy,
|
|
250
|
+
"aria-label": "Add the split banner section",
|
|
251
|
+
children: "Split banner"
|
|
252
|
+
}),
|
|
253
|
+
actions: /* @__PURE__ */ jsx(IconButton, {
|
|
254
|
+
label: "Preview the split banner section",
|
|
255
|
+
size: "sm",
|
|
256
|
+
variant: "ghost",
|
|
257
|
+
children: /* @__PURE__ */ jsx(EyeIcon, {})
|
|
258
|
+
})
|
|
259
|
+
})]
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
/** A theme in the store: controls on a wash, shown while it is pointed at or one of them has focus. */
|
|
263
|
+
function ThemeCard({ chip = false }) {
|
|
264
|
+
return /* @__PURE__ */ jsxs(Card, {
|
|
265
|
+
padding: "sm",
|
|
266
|
+
className: "card-listing",
|
|
267
|
+
children: [/* @__PURE__ */ jsx(CardMedia, {
|
|
268
|
+
src: storefrontShotUrl,
|
|
269
|
+
ratio: "16 / 10",
|
|
270
|
+
position: "top",
|
|
271
|
+
badges: /* @__PURE__ */ jsx(Badge, {
|
|
272
|
+
size: "sm",
|
|
273
|
+
tone: "positive",
|
|
274
|
+
children: "Owned"
|
|
275
|
+
}),
|
|
276
|
+
actions: /* @__PURE__ */ jsx(IconButton, {
|
|
277
|
+
label: "Save Concourse to favourites",
|
|
278
|
+
size: "sm",
|
|
279
|
+
variant: "secondary",
|
|
280
|
+
children: /* @__PURE__ */ jsx(HeartIcon, {})
|
|
281
|
+
}),
|
|
282
|
+
scrim: chip ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Badge, { children: "Concourse" }), /* @__PURE__ */ jsx(Button, {
|
|
283
|
+
size: "sm",
|
|
284
|
+
variant: "primary",
|
|
285
|
+
children: "Preview theme"
|
|
286
|
+
})] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(IconButton, {
|
|
287
|
+
label: "Preview Concourse",
|
|
288
|
+
size: "sm",
|
|
289
|
+
variant: "secondary",
|
|
290
|
+
children: /* @__PURE__ */ jsx(EyeIcon, {})
|
|
291
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
292
|
+
label: "Apply Concourse",
|
|
293
|
+
size: "sm",
|
|
294
|
+
variant: "primary",
|
|
295
|
+
children: /* @__PURE__ */ jsx(PlusIcon, {})
|
|
296
|
+
})] })
|
|
297
|
+
}), /* @__PURE__ */ jsx(CardHeader, {
|
|
298
|
+
titleAs: "h4",
|
|
299
|
+
title: "Concourse",
|
|
300
|
+
description: "For furniture and homeware stores."
|
|
301
|
+
})]
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
function CoverFallbacks() {
|
|
305
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
306
|
+
className: "card-grid",
|
|
307
|
+
children: [
|
|
308
|
+
/* @__PURE__ */ jsxs(Card, {
|
|
309
|
+
padding: "sm",
|
|
310
|
+
children: [/* @__PURE__ */ jsx(CardMedia, { height: 96 }), /* @__PURE__ */ jsx(CardHeader, {
|
|
311
|
+
titleAs: "p",
|
|
312
|
+
title: "Orbit",
|
|
313
|
+
description: "The default: a well, an orbit, a satellite."
|
|
314
|
+
})]
|
|
315
|
+
}),
|
|
316
|
+
/* @__PURE__ */ jsxs(Card, {
|
|
317
|
+
padding: "sm",
|
|
318
|
+
children: [/* @__PURE__ */ jsx(CardMedia, {
|
|
319
|
+
height: 96,
|
|
320
|
+
fallback: "gradient",
|
|
321
|
+
seed: "Fernhill Workspace Ltd",
|
|
322
|
+
logo: /* @__PURE__ */ jsx("img", {
|
|
323
|
+
src: fernhillLogoUrl,
|
|
324
|
+
alt: ""
|
|
325
|
+
})
|
|
326
|
+
}), /* @__PURE__ */ jsx(CardHeader, {
|
|
327
|
+
titleAs: "p",
|
|
328
|
+
title: "Fernhill Workspace Ltd",
|
|
329
|
+
description: "A gradient hued from the name."
|
|
330
|
+
})]
|
|
331
|
+
}),
|
|
332
|
+
/* @__PURE__ */ jsxs(Card, {
|
|
333
|
+
padding: "sm",
|
|
334
|
+
children: [/* @__PURE__ */ jsx(CardMedia, {
|
|
335
|
+
height: 96,
|
|
336
|
+
fallback: "gradient",
|
|
337
|
+
seed: "Wren Stationery"
|
|
338
|
+
}), /* @__PURE__ */ jsx(CardHeader, {
|
|
339
|
+
titleAs: "p",
|
|
340
|
+
title: "Wren Stationery",
|
|
341
|
+
description: "Another name, another hue."
|
|
342
|
+
})]
|
|
343
|
+
}),
|
|
344
|
+
/* @__PURE__ */ jsxs(Card, {
|
|
345
|
+
padding: "sm",
|
|
346
|
+
children: [/* @__PURE__ */ jsx(CardMedia, {
|
|
347
|
+
height: 96,
|
|
348
|
+
fallback: "none"
|
|
349
|
+
}), /* @__PURE__ */ jsx(CardHeader, {
|
|
350
|
+
titleAs: "p",
|
|
351
|
+
title: "None",
|
|
352
|
+
description: "The sunken well alone."
|
|
353
|
+
})]
|
|
354
|
+
})
|
|
355
|
+
]
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
function PlanCards() {
|
|
359
|
+
const [plan, setPlan] = useState("grow");
|
|
360
|
+
return /* @__PURE__ */ jsx("div", {
|
|
361
|
+
className: "card-grid",
|
|
362
|
+
children: [
|
|
363
|
+
{
|
|
364
|
+
id: "start",
|
|
365
|
+
name: "Start",
|
|
366
|
+
price: "£29 a month"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
id: "grow",
|
|
370
|
+
name: "Grow",
|
|
371
|
+
price: "£79 a month"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
id: "scale",
|
|
375
|
+
name: "Scale",
|
|
376
|
+
price: "£199 a month"
|
|
377
|
+
}
|
|
378
|
+
].map((each) => /* @__PURE__ */ jsxs(Card, {
|
|
379
|
+
padding: "sm",
|
|
380
|
+
selected: each.id === plan,
|
|
381
|
+
children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
382
|
+
titleAs: "h4",
|
|
383
|
+
title: each.name,
|
|
384
|
+
description: each.price,
|
|
385
|
+
actions: each.id === plan ? /* @__PURE__ */ jsx(Badge, {
|
|
386
|
+
size: "sm",
|
|
387
|
+
tone: "accent",
|
|
388
|
+
children: "Current plan"
|
|
389
|
+
}) : null
|
|
390
|
+
}), /* @__PURE__ */ jsx(CardBody, { children: /* @__PURE__ */ jsx(Button, {
|
|
391
|
+
size: "sm",
|
|
392
|
+
variant: "secondary",
|
|
393
|
+
"aria-pressed": each.id === plan,
|
|
394
|
+
onClick: () => setPlan(each.id),
|
|
395
|
+
children: each.id === plan ? "Chosen" : "Choose " + each.name
|
|
396
|
+
}) })]
|
|
397
|
+
}, each.id))
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
function Page() {
|
|
401
|
+
return /* @__PURE__ */ jsxs(DocPage, {
|
|
402
|
+
title: "Card",
|
|
403
|
+
status: "stable",
|
|
404
|
+
importNames: [
|
|
405
|
+
"Card",
|
|
406
|
+
"CardHeader",
|
|
407
|
+
"CardBody",
|
|
408
|
+
"CardFooter",
|
|
409
|
+
"CardMedia",
|
|
410
|
+
"CardLink"
|
|
411
|
+
],
|
|
412
|
+
lead: "A 16px surface that holds one piece of the shop together: a summary, a list of things to act on, a way into a section. Reach for it only when the grouping cannot be read from space and a hairline alone.",
|
|
413
|
+
children: [
|
|
414
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
415
|
+
id: "variants",
|
|
416
|
+
title: "Variants",
|
|
417
|
+
description: /* @__PURE__ */ jsx("p", { children: "Three materials, and each has its place. A card carries a hairline or a shadow, never both, and every variant keeps a 1px border (transparent unless outlined), so switching variant never moves the content." }),
|
|
418
|
+
children: [/* @__PURE__ */ jsx(SubSection, {
|
|
419
|
+
title: "On the canvas: outline and sunken",
|
|
420
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
421
|
+
/* @__PURE__ */ jsx("code", { children: "outline" }),
|
|
422
|
+
" is the default: the canvas colour with a hairline. ",
|
|
423
|
+
/* @__PURE__ */ jsx("code", { children: "sunken" }),
|
|
424
|
+
" is set into the page, for secondary panels, tips and summaries."
|
|
425
|
+
] }),
|
|
426
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
427
|
+
align: "fill",
|
|
428
|
+
code: `
|
|
429
|
+
<Card>
|
|
430
|
+
<CardHeader title="Orders to fulfil" description="Paid and waiting to ship." />
|
|
431
|
+
<CardBody>
|
|
432
|
+
<span className="figure">7</span>
|
|
433
|
+
<Badge tone="warning" icon={<ClockIcon />}>2 due today</Badge>
|
|
434
|
+
</CardBody>
|
|
435
|
+
</Card>
|
|
436
|
+
|
|
437
|
+
<Card variant="sunken">
|
|
438
|
+
<CardHeader
|
|
439
|
+
title="Delivery tip"
|
|
440
|
+
description="Shoppers in Northern Ireland see no delivery options yet. Add a rule for BT postcodes."
|
|
441
|
+
/>
|
|
442
|
+
<CardBody>
|
|
443
|
+
<Button size="sm">Add a rule</Button>
|
|
444
|
+
</CardBody>
|
|
445
|
+
</Card>`,
|
|
446
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
447
|
+
className: "card-grid",
|
|
448
|
+
children: [/* @__PURE__ */ jsx(OrdersCard, {}), /* @__PURE__ */ jsx(DeliveryTipCard, {})]
|
|
449
|
+
})
|
|
450
|
+
})
|
|
451
|
+
}), /* @__PURE__ */ jsx(SubSection, {
|
|
452
|
+
title: "On the ground: raised",
|
|
453
|
+
description: /* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("code", { children: "raised" }), " trades the hairline for a soft shadow. It is for cards that sit on the porcelain ground beside the canvas, never on the canvas itself."] }),
|
|
454
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
455
|
+
align: "fill",
|
|
456
|
+
surface: "ground",
|
|
457
|
+
code: `
|
|
458
|
+
<Card variant="raised">
|
|
459
|
+
<CardHeader title="Next payout" description="Friday 2 October, to your account ending 4417." />
|
|
460
|
+
<CardBody>
|
|
461
|
+
<span className="figure">£2,840.16</span>
|
|
462
|
+
<Delta value={12.4} size="sm" label="vs last week" />
|
|
463
|
+
</CardBody>
|
|
464
|
+
</Card>`,
|
|
465
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
466
|
+
className: "card-demo",
|
|
467
|
+
children: /* @__PURE__ */ jsx(PayoutCard, {})
|
|
468
|
+
})
|
|
469
|
+
})
|
|
470
|
+
})]
|
|
471
|
+
}),
|
|
472
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
473
|
+
id: "anatomy",
|
|
474
|
+
title: "Header, body and footer",
|
|
475
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
476
|
+
/* @__PURE__ */ jsx("code", { children: "CardHeader" }),
|
|
477
|
+
" takes an optional icon in a 32px ",
|
|
478
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
479
|
+
to: "/components/icon-tile",
|
|
480
|
+
children: "icon tile"
|
|
481
|
+
}),
|
|
482
|
+
", a title, a one-line description and actions on the right, or under the words on a narrow card.",
|
|
483
|
+
" ",
|
|
484
|
+
/* @__PURE__ */ jsx("code", { children: "CardBody" }),
|
|
485
|
+
" holds the content. ",
|
|
486
|
+
/* @__PURE__ */ jsx("code", { children: "CardFooter" }),
|
|
487
|
+
" right-aligns its actions under a hairline that runs edge to edge. All three follow the card's padding."
|
|
488
|
+
] }),
|
|
489
|
+
children: [/* @__PURE__ */ jsx(Example, {
|
|
490
|
+
align: "fill",
|
|
491
|
+
code: `
|
|
492
|
+
<Card>
|
|
493
|
+
<CardHeader
|
|
494
|
+
icon={<PackageIcon />}
|
|
495
|
+
title="Low stock"
|
|
496
|
+
description="Three products sell out this week."
|
|
497
|
+
actions={<Button size="sm" variant="ghost" iconEnd={<CaretRightIcon />}>View all</Button>}
|
|
498
|
+
/>
|
|
499
|
+
<CardBody>
|
|
500
|
+
{products.map((item, i) => (
|
|
501
|
+
<Fragment key={item.name}>
|
|
502
|
+
{i > 0 ? <Separator /> : null}
|
|
503
|
+
<div className="row">
|
|
504
|
+
<span>{item.name} <span className="meta">Sells about {item.weekly} a week</span></span>
|
|
505
|
+
<Badge tone="warning">{item.left} left</Badge>
|
|
506
|
+
</div>
|
|
507
|
+
</Fragment>
|
|
508
|
+
))}
|
|
509
|
+
</CardBody>
|
|
510
|
+
<CardFooter>
|
|
511
|
+
<Button size="sm" variant="ghost">Dismiss</Button>
|
|
512
|
+
<Button size="sm">Reorder stock</Button>
|
|
513
|
+
</CardFooter>
|
|
514
|
+
</Card>`,
|
|
515
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
516
|
+
className: "card-demo",
|
|
517
|
+
children: /* @__PURE__ */ jsx(LowStockCard, {})
|
|
518
|
+
})
|
|
519
|
+
}), /* @__PURE__ */ jsx(Guidelines, { items: [
|
|
520
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
521
|
+
"Header actions are ",
|
|
522
|
+
/* @__PURE__ */ jsx("code", { children: "sm" }),
|
|
523
|
+
" controls: they centre on the title line without stretching the header."
|
|
524
|
+
] }),
|
|
525
|
+
"Inside a card, rows are divided by a Separator, not by more cards.",
|
|
526
|
+
"The footer holds the card's own actions. Keep the page's one primary button out of it."
|
|
527
|
+
] })]
|
|
528
|
+
}),
|
|
529
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
530
|
+
id: "narrow",
|
|
531
|
+
title: "On a narrow card",
|
|
532
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
533
|
+
"The header's actions sit beside the title while the title keeps 7rem (112px), as a",
|
|
534
|
+
" ",
|
|
535
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
536
|
+
to: "/components/row-list",
|
|
537
|
+
children: "row list"
|
|
538
|
+
}),
|
|
539
|
+
" keeps for its words. On a card too narrow for that, on a phone or in a side column, they drop under the title and the description, at the start and 12px below the words, so the title is never squeezed to a letter a line. It goes by what the actions need, not by the card's width: a badge, a switch or a short button stays beside the title wherever it fits."
|
|
540
|
+
] }),
|
|
541
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
542
|
+
align: "fill",
|
|
543
|
+
code: `
|
|
544
|
+
<Card>
|
|
545
|
+
<CardHeader
|
|
546
|
+
icon={<EnvelopeSimpleIcon />}
|
|
547
|
+
title="Abandoned checkout emails"
|
|
548
|
+
description="A reminder to customers who leave with items in their basket."
|
|
549
|
+
actions={<Badge tone="positive">On</Badge>}
|
|
550
|
+
/>
|
|
551
|
+
</Card>
|
|
552
|
+
<Card>
|
|
553
|
+
<CardHeader
|
|
554
|
+
icon={<TranslateIcon />}
|
|
555
|
+
title="Checkout language"
|
|
556
|
+
description="Follows your store's language, English (UK)."
|
|
557
|
+
actions={<Button size="sm">Change the language</Button>}
|
|
558
|
+
/>
|
|
559
|
+
</Card>`,
|
|
560
|
+
children: /* @__PURE__ */ jsx(NarrowCards, {})
|
|
561
|
+
})
|
|
562
|
+
}),
|
|
563
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
564
|
+
id: "padding",
|
|
565
|
+
title: "Padding",
|
|
566
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
567
|
+
/* @__PURE__ */ jsx("code", { children: "md" }),
|
|
568
|
+
" (20px) is the default. The gap between header, body and footer follows the padding, so a denser card is dense all the way through. ",
|
|
569
|
+
/* @__PURE__ */ jsx("code", { children: "none" }),
|
|
570
|
+
" is for tables and media, whose rows bring their own spacing."
|
|
571
|
+
] }),
|
|
572
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
573
|
+
align: "fill",
|
|
574
|
+
code: `
|
|
575
|
+
<Card padding="sm">
|
|
576
|
+
<CardHeader title="Small" description="16px, with 12px between parts. Side panels and dense grids." />
|
|
577
|
+
</Card>
|
|
578
|
+
<Card>
|
|
579
|
+
<CardHeader title="Medium" description="20px, with 16px between parts. The default." />
|
|
580
|
+
</Card>
|
|
581
|
+
<Card padding="lg">
|
|
582
|
+
<CardHeader title="Large" description="24px, with 20px between parts. A card that is a page's main content." />
|
|
583
|
+
</Card>
|
|
584
|
+
<Card padding="none">
|
|
585
|
+
<div className="row">None, for tables and media</div>
|
|
586
|
+
<Separator />
|
|
587
|
+
<div className="row">Rows bring their own spacing</div>
|
|
588
|
+
</Card>`,
|
|
589
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
590
|
+
className: "card-grid",
|
|
591
|
+
children: [
|
|
592
|
+
/* @__PURE__ */ jsx(Card, {
|
|
593
|
+
padding: "sm",
|
|
594
|
+
children: /* @__PURE__ */ jsx(CardHeader, {
|
|
595
|
+
title: "Small",
|
|
596
|
+
description: "16px, with 12px between parts. Side panels and dense grids."
|
|
597
|
+
})
|
|
598
|
+
}),
|
|
599
|
+
/* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardHeader, {
|
|
600
|
+
title: "Medium",
|
|
601
|
+
description: "20px, with 16px between parts. The default."
|
|
602
|
+
}) }),
|
|
603
|
+
/* @__PURE__ */ jsx(Card, {
|
|
604
|
+
padding: "lg",
|
|
605
|
+
children: /* @__PURE__ */ jsx(CardHeader, {
|
|
606
|
+
title: "Large",
|
|
607
|
+
description: "24px, with 20px between parts. A card that is a page's main content."
|
|
608
|
+
})
|
|
609
|
+
}),
|
|
610
|
+
/* @__PURE__ */ jsxs(Card, {
|
|
611
|
+
padding: "none",
|
|
612
|
+
children: [
|
|
613
|
+
/* @__PURE__ */ jsx("div", {
|
|
614
|
+
className: "card-table-row",
|
|
615
|
+
children: "None, for tables and media"
|
|
616
|
+
}),
|
|
617
|
+
/* @__PURE__ */ jsx(Separator, {}),
|
|
618
|
+
/* @__PURE__ */ jsx("div", {
|
|
619
|
+
className: "card-table-row",
|
|
620
|
+
children: "Rows bring their own spacing"
|
|
621
|
+
})
|
|
622
|
+
]
|
|
623
|
+
})
|
|
624
|
+
]
|
|
625
|
+
})
|
|
626
|
+
})
|
|
627
|
+
}),
|
|
628
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
629
|
+
id: "interactive",
|
|
630
|
+
title: "Interactive",
|
|
631
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
632
|
+
"When the whole card is one way in, set ",
|
|
633
|
+
/* @__PURE__ */ jsx("code", { children: "interactive" }),
|
|
634
|
+
" and render the link itself with",
|
|
635
|
+
" ",
|
|
636
|
+
/* @__PURE__ */ jsx("code", { children: "asChild" }),
|
|
637
|
+
". Hover firms the hairline (a sunken card changes tone, a raised card lifts to the floating shadow), a press dips it to 99.5%, and keyboard focus draws the teal ring. A card is a column, so one with a caret at its end lays itself out as a row. Point at them, or tab to them."
|
|
638
|
+
] }),
|
|
639
|
+
children: [
|
|
640
|
+
/* @__PURE__ */ jsx(Example, {
|
|
641
|
+
align: "fill",
|
|
642
|
+
code: `
|
|
643
|
+
<Card asChild interactive padding="sm" style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
644
|
+
<a href="/orders">
|
|
645
|
+
<CardHeader icon={<ReceiptIcon />} title="Orders" description="36 today, 7 to fulfil" titleAs="p" style={{ flex: 1 }} />
|
|
646
|
+
<CaretRightIcon size={16} style={{ flex: 'none', color: 'var(--o-fg-3)' }} aria-hidden="true" />
|
|
647
|
+
</a>
|
|
648
|
+
</Card>
|
|
649
|
+
<Card asChild interactive padding="sm" variant="sunken" style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
650
|
+
<a href="/customers">
|
|
651
|
+
<CardHeader icon={<UsersIcon />} title="Customers" description="1,284 customers, 12 new this week" titleAs="p" style={{ flex: 1 }} />
|
|
652
|
+
<CaretRightIcon size={16} style={{ flex: 'none', color: 'var(--o-fg-3)' }} aria-hidden="true" />
|
|
653
|
+
</a>
|
|
654
|
+
</Card>`,
|
|
655
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
656
|
+
className: "card-stack",
|
|
657
|
+
children: [/* @__PURE__ */ jsx(Card, {
|
|
658
|
+
asChild: true,
|
|
659
|
+
interactive: true,
|
|
660
|
+
padding: "sm",
|
|
661
|
+
style: {
|
|
662
|
+
flexDirection: "row",
|
|
663
|
+
alignItems: "center"
|
|
664
|
+
},
|
|
665
|
+
children: /* @__PURE__ */ jsxs("a", {
|
|
666
|
+
href: "#interactive",
|
|
667
|
+
children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
668
|
+
icon: /* @__PURE__ */ jsx(ReceiptIcon, {}),
|
|
669
|
+
title: "Orders",
|
|
670
|
+
description: "36 today, 7 to fulfil",
|
|
671
|
+
titleAs: "p",
|
|
672
|
+
style: { flex: 1 }
|
|
673
|
+
}), /* @__PURE__ */ jsx(CaretRightIcon, {
|
|
674
|
+
size: 16,
|
|
675
|
+
style: {
|
|
676
|
+
flex: "none",
|
|
677
|
+
color: "var(--o-fg-3)"
|
|
678
|
+
},
|
|
679
|
+
"aria-hidden": "true"
|
|
680
|
+
})]
|
|
681
|
+
})
|
|
682
|
+
}), /* @__PURE__ */ jsx(Card, {
|
|
683
|
+
asChild: true,
|
|
684
|
+
interactive: true,
|
|
685
|
+
padding: "sm",
|
|
686
|
+
variant: "sunken",
|
|
687
|
+
style: {
|
|
688
|
+
flexDirection: "row",
|
|
689
|
+
alignItems: "center"
|
|
690
|
+
},
|
|
691
|
+
children: /* @__PURE__ */ jsxs("a", {
|
|
692
|
+
href: "#interactive",
|
|
693
|
+
children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
694
|
+
icon: /* @__PURE__ */ jsx(UsersIcon, {}),
|
|
695
|
+
title: "Customers",
|
|
696
|
+
description: "1,284 customers, 12 new this week",
|
|
697
|
+
titleAs: "p",
|
|
698
|
+
style: { flex: 1 }
|
|
699
|
+
}), /* @__PURE__ */ jsx(CaretRightIcon, {
|
|
700
|
+
size: 16,
|
|
701
|
+
style: {
|
|
702
|
+
flex: "none",
|
|
703
|
+
color: "var(--o-fg-3)"
|
|
704
|
+
},
|
|
705
|
+
"aria-hidden": "true"
|
|
706
|
+
})]
|
|
707
|
+
})
|
|
708
|
+
})]
|
|
709
|
+
})
|
|
710
|
+
}),
|
|
711
|
+
/* @__PURE__ */ jsx(Example, {
|
|
712
|
+
align: "fill",
|
|
713
|
+
surface: "ground",
|
|
714
|
+
code: `
|
|
715
|
+
<Card asChild interactive padding="sm" variant="raised" style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
716
|
+
<a href="/payouts">
|
|
717
|
+
<CardHeader icon={<WalletIcon />} title="Payouts" description="Paid out £18,420.55 this month" titleAs="p" style={{ flex: 1 }} />
|
|
718
|
+
<CaretRightIcon size={16} style={{ flex: 'none', color: 'var(--o-fg-3)' }} aria-hidden="true" />
|
|
719
|
+
</a>
|
|
720
|
+
</Card>`,
|
|
721
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
722
|
+
className: "card-stack",
|
|
723
|
+
children: /* @__PURE__ */ jsx(Card, {
|
|
724
|
+
asChild: true,
|
|
725
|
+
interactive: true,
|
|
726
|
+
padding: "sm",
|
|
727
|
+
variant: "raised",
|
|
728
|
+
style: {
|
|
729
|
+
flexDirection: "row",
|
|
730
|
+
alignItems: "center"
|
|
731
|
+
},
|
|
732
|
+
children: /* @__PURE__ */ jsxs("a", {
|
|
733
|
+
href: "#interactive",
|
|
734
|
+
children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
735
|
+
icon: /* @__PURE__ */ jsx(WalletIcon, {}),
|
|
736
|
+
title: "Payouts",
|
|
737
|
+
description: "Paid out £18,420.55 this month",
|
|
738
|
+
titleAs: "p",
|
|
739
|
+
style: { flex: 1 }
|
|
740
|
+
}), /* @__PURE__ */ jsx(CaretRightIcon, {
|
|
741
|
+
size: 16,
|
|
742
|
+
style: {
|
|
743
|
+
flex: "none",
|
|
744
|
+
color: "var(--o-fg-3)"
|
|
745
|
+
},
|
|
746
|
+
"aria-hidden": "true"
|
|
747
|
+
})]
|
|
748
|
+
})
|
|
749
|
+
})
|
|
750
|
+
})
|
|
751
|
+
}),
|
|
752
|
+
/* @__PURE__ */ jsxs(Note, {
|
|
753
|
+
title: "Why a link?",
|
|
754
|
+
children: [/* @__PURE__ */ jsx("code", { children: "interactive" }), " only adds the look. The link gives the card its keyboard support and tells a screen reader where it goes. A card built on a div with a click handler can be neither reached nor announced."]
|
|
755
|
+
})
|
|
756
|
+
]
|
|
757
|
+
}),
|
|
758
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
759
|
+
id: "media",
|
|
760
|
+
title: "A cover across the top",
|
|
761
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
762
|
+
/* @__PURE__ */ jsx("code", { children: "CardMedia" }),
|
|
763
|
+
" first in a card is a cover band: full bleed, it reaches the card's edges and takes its top corners. It is 16:9 by default, or any ",
|
|
764
|
+
/* @__PURE__ */ jsx("code", { children: "ratio" }),
|
|
765
|
+
", the picture's own shape (",
|
|
766
|
+
/* @__PURE__ */ jsx("code", { children: "ratio=\"auto\"" }),
|
|
767
|
+
") or a fixed ",
|
|
768
|
+
/* @__PURE__ */ jsx("code", { children: "height" }),
|
|
769
|
+
". Badges ride its top at the start and small controls at the end, as canvas pills that read on any picture. A ",
|
|
770
|
+
/* @__PURE__ */ jsx("code", { children: "logo" }),
|
|
771
|
+
" overlaps its lower edge in a ring of the card's own colour, and the words start 8px under it. Put a ",
|
|
772
|
+
/* @__PURE__ */ jsx("code", { children: "CardLink" }),
|
|
773
|
+
" in the title and the whole card is one way in, while the footer's button stays a button of its own: point at the card, then tab through it."
|
|
774
|
+
] }),
|
|
775
|
+
children: [
|
|
776
|
+
/* @__PURE__ */ jsx(Example, {
|
|
777
|
+
align: "fill",
|
|
778
|
+
code: `
|
|
779
|
+
<Card padding="sm">
|
|
780
|
+
<CardMedia
|
|
781
|
+
height={112}
|
|
782
|
+
src={supplier.cover}
|
|
783
|
+
badges={<Badge size="sm" tone="accent" icon={<StarIcon weight="fill" />}>Featured</Badge>}
|
|
784
|
+
actions={<Badge size="sm">Trade only</Badge>}
|
|
785
|
+
logo={<img src={supplier.logo} alt="" />}
|
|
786
|
+
/>
|
|
787
|
+
<CardHeader
|
|
788
|
+
titleAs="h4"
|
|
789
|
+
title={<CardLink href="/suppliers/harbour-desk-co">Harbour Desk Co</CardLink>}
|
|
790
|
+
description={<><MapPinIcon aria-hidden="true" /> Leeds, United Kingdom</>}
|
|
791
|
+
/>
|
|
792
|
+
<CardBody>
|
|
793
|
+
<p>Office desks, task chairs and storage, made to order in Yorkshire and delivered in ten days.</p>
|
|
794
|
+
<Chip size="sm">Desks</Chip> <Chip size="sm">Seating</Chip> <Chip size="sm">Storage</Chip>
|
|
795
|
+
</CardBody>
|
|
796
|
+
<CardFooter>
|
|
797
|
+
<Button size="sm" variant="secondary" fullWidth>Connect</Button>
|
|
798
|
+
</CardFooter>
|
|
799
|
+
</Card>`,
|
|
800
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
801
|
+
className: "card-narrow",
|
|
802
|
+
children: /* @__PURE__ */ jsx(SupplierCard, {})
|
|
803
|
+
})
|
|
804
|
+
}),
|
|
805
|
+
/* @__PURE__ */ jsx(SubSection, {
|
|
806
|
+
title: "With no picture",
|
|
807
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
808
|
+
/* @__PURE__ */ jsx("code", { children: "fallback" }),
|
|
809
|
+
" says what the band draws without one. ",
|
|
810
|
+
/* @__PURE__ */ jsx("code", { children: "orbit" }),
|
|
811
|
+
", the default, is the vendor dashboard's: a sunken well with one hairline orbit and its teal satellite. ",
|
|
812
|
+
/* @__PURE__ */ jsx("code", { children: "gradient" }),
|
|
813
|
+
" washes the band in two neighbouring chart hues picked from ",
|
|
814
|
+
/* @__PURE__ */ jsx("code", { children: "seed" }),
|
|
815
|
+
", so the same name has the same colour on every page and in both themes. ",
|
|
816
|
+
/* @__PURE__ */ jsx("code", { children: "none" }),
|
|
817
|
+
" is the well alone. Anything else (a live render, an icon tile on the listing's own colour) goes in as children."
|
|
818
|
+
] }),
|
|
819
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
820
|
+
align: "fill",
|
|
821
|
+
code: `
|
|
822
|
+
<CardMedia height={96} />
|
|
823
|
+
<CardMedia height={96} fallback="gradient" seed="Fernhill Workspace Ltd" logo={<img src={logo} alt="" />} />
|
|
824
|
+
<CardMedia height={96} fallback="gradient" seed="Wren Stationery" />
|
|
825
|
+
<CardMedia height={96} fallback="none" />`,
|
|
826
|
+
children: /* @__PURE__ */ jsx(CoverFallbacks, {})
|
|
827
|
+
})
|
|
828
|
+
}),
|
|
829
|
+
/* @__PURE__ */ jsx(SubSection, {
|
|
830
|
+
title: "A person, the picture's own shape, and a router link",
|
|
831
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
832
|
+
/* @__PURE__ */ jsx("code", { children: "logoShape=\"circle\"" }),
|
|
833
|
+
" rings a person's avatar instead of a business's rounded square.",
|
|
834
|
+
" ",
|
|
835
|
+
/* @__PURE__ */ jsx("code", { children: "ratio=\"auto\"" }),
|
|
836
|
+
" gives the band the picture's own shape. With your router, render the card's link with",
|
|
837
|
+
" ",
|
|
838
|
+
/* @__PURE__ */ jsx("code", { children: "asChild" }),
|
|
839
|
+
" and give its words as ",
|
|
840
|
+
/* @__PURE__ */ jsx("code", { children: "label" }),
|
|
841
|
+
": the router's link becomes the card's, filled with them."
|
|
842
|
+
] }),
|
|
843
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
844
|
+
align: "fill",
|
|
845
|
+
code: `
|
|
846
|
+
<Card padding="sm">
|
|
847
|
+
<CardMedia height={88} fallback="gradient" seed="Priya Shah" logoShape="circle" logo={<Avatar name="Priya Shah" />} />
|
|
848
|
+
<CardHeader
|
|
849
|
+
titleAs="h4"
|
|
850
|
+
title={<CardLink asChild label="Priya Shah"><RouterLink to="/partners/priya-shah" /></CardLink>}
|
|
851
|
+
description="Partner since 2024, 14 stores"
|
|
852
|
+
/>
|
|
853
|
+
</Card>
|
|
854
|
+
<Card padding="sm">
|
|
855
|
+
<CardMedia ratio="auto" src={showroom.photo} />
|
|
856
|
+
<CardHeader titleAs="p" title="The picture's own shape" description="ratio="auto"" />
|
|
857
|
+
</Card>`,
|
|
858
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
859
|
+
className: "card-grid card-grid--narrow",
|
|
860
|
+
children: [/* @__PURE__ */ jsxs(Card, {
|
|
861
|
+
padding: "sm",
|
|
862
|
+
children: [/* @__PURE__ */ jsx(CardMedia, {
|
|
863
|
+
height: 88,
|
|
864
|
+
fallback: "gradient",
|
|
865
|
+
seed: "Priya Shah",
|
|
866
|
+
logoShape: "circle",
|
|
867
|
+
logo: /* @__PURE__ */ jsx(Avatar, { name: "Priya Shah" })
|
|
868
|
+
}), /* @__PURE__ */ jsx(CardHeader, {
|
|
869
|
+
titleAs: "h4",
|
|
870
|
+
title: /* @__PURE__ */ jsx(CardLink, {
|
|
871
|
+
asChild: true,
|
|
872
|
+
label: "Priya Shah",
|
|
873
|
+
children: /* @__PURE__ */ jsx("a", { href: "#media" })
|
|
874
|
+
}),
|
|
875
|
+
description: "Partner since 2024, 14 stores"
|
|
876
|
+
})]
|
|
877
|
+
}), /* @__PURE__ */ jsxs(Card, {
|
|
878
|
+
padding: "sm",
|
|
879
|
+
children: [/* @__PURE__ */ jsx(CardMedia, {
|
|
880
|
+
ratio: "auto",
|
|
881
|
+
src: showroomUrl
|
|
882
|
+
}), /* @__PURE__ */ jsx(CardHeader, {
|
|
883
|
+
titleAs: "p",
|
|
884
|
+
title: "The picture's own shape",
|
|
885
|
+
description: "ratio=\"auto\""
|
|
886
|
+
})]
|
|
887
|
+
})]
|
|
888
|
+
})
|
|
889
|
+
})
|
|
890
|
+
}),
|
|
891
|
+
/* @__PURE__ */ jsx(SubSection, {
|
|
892
|
+
title: "Shapes and a product on white",
|
|
893
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
894
|
+
"A screenshot keeps its top with ",
|
|
895
|
+
/* @__PURE__ */ jsx("code", { children: "position=\"top\"" }),
|
|
896
|
+
". A product shows whole with ",
|
|
897
|
+
/* @__PURE__ */ jsx("code", { children: "fit=\"contain\"" }),
|
|
898
|
+
", on white in both themes, since a photograph shot on white must not sit on a dark well."
|
|
899
|
+
] }),
|
|
900
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
901
|
+
align: "fill",
|
|
902
|
+
code: `
|
|
903
|
+
<Card padding="sm">
|
|
904
|
+
<CardMedia ratio="16 / 10" src={theme.screenshot} position="top" />
|
|
905
|
+
<CardHeader titleAs="p" title="16:10, held by its top" />
|
|
906
|
+
</Card>
|
|
907
|
+
<Card padding="sm">
|
|
908
|
+
<CardMedia ratio={1} src={product.photo} fit="contain" />
|
|
909
|
+
<CardHeader titleAs="p" title="Arden ergonomic chair" description="Square, whole, on white" />
|
|
910
|
+
</Card>`,
|
|
911
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
912
|
+
className: "card-grid card-grid--narrow",
|
|
913
|
+
children: [/* @__PURE__ */ jsxs(Card, {
|
|
914
|
+
padding: "sm",
|
|
915
|
+
children: [/* @__PURE__ */ jsx(CardMedia, {
|
|
916
|
+
ratio: "16 / 10",
|
|
917
|
+
src: storefrontShotUrl,
|
|
918
|
+
position: "top"
|
|
919
|
+
}), /* @__PURE__ */ jsx(CardHeader, {
|
|
920
|
+
titleAs: "p",
|
|
921
|
+
title: "16:10, held by its top",
|
|
922
|
+
description: "A theme's screenshot"
|
|
923
|
+
})]
|
|
924
|
+
}), /* @__PURE__ */ jsxs(Card, {
|
|
925
|
+
padding: "sm",
|
|
926
|
+
children: [/* @__PURE__ */ jsx(CardMedia, {
|
|
927
|
+
ratio: 1,
|
|
928
|
+
src: chairUrl,
|
|
929
|
+
fit: "contain"
|
|
930
|
+
}), /* @__PURE__ */ jsx(CardHeader, {
|
|
931
|
+
titleAs: "p",
|
|
932
|
+
title: "Arden ergonomic chair",
|
|
933
|
+
description: "Square, whole, on white"
|
|
934
|
+
})]
|
|
935
|
+
})]
|
|
936
|
+
})
|
|
937
|
+
})
|
|
938
|
+
})
|
|
939
|
+
]
|
|
940
|
+
}),
|
|
941
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
942
|
+
id: "cover-controls",
|
|
943
|
+
title: "Controls on the cover",
|
|
944
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
945
|
+
/* @__PURE__ */ jsx("code", { children: "scrim" }),
|
|
946
|
+
" lays controls on a dark wash over the band, shown while the card is pointed at or one of them has focus; on a touch screen, which cannot point, they stay shown with no wash. Hidden, they stay in the tab order, so tab to them and the wash appears. Icon buttons, or a name chip and a primary button. ",
|
|
947
|
+
/* @__PURE__ */ jsx("code", { children: "hint" }),
|
|
948
|
+
" is a teal pill that says what pressing the card does, and ",
|
|
949
|
+
/* @__PURE__ */ jsx("code", { children: "busy" }),
|
|
950
|
+
" washes the band with the action's word while it runs: press the split banner to add it."
|
|
951
|
+
] }),
|
|
952
|
+
children: [/* @__PURE__ */ jsx(Example, {
|
|
953
|
+
align: "fill",
|
|
954
|
+
code: `
|
|
955
|
+
<Card padding="sm">
|
|
956
|
+
<CardMedia
|
|
957
|
+
src={theme.screenshot}
|
|
958
|
+
ratio="16 / 10"
|
|
959
|
+
position="top"
|
|
960
|
+
badges={<Badge size="sm" tone="positive">Owned</Badge>}
|
|
961
|
+
actions={<IconButton label="Save Concourse to favourites" size="sm"><HeartIcon /></IconButton>}
|
|
962
|
+
scrim={
|
|
963
|
+
<>
|
|
964
|
+
<IconButton label="Preview Concourse" size="sm"><EyeIcon /></IconButton>
|
|
965
|
+
<IconButton label="Apply Concourse" size="sm" variant="primary"><PlusIcon /></IconButton>
|
|
966
|
+
</>
|
|
967
|
+
}
|
|
968
|
+
/>
|
|
969
|
+
<CardHeader titleAs="h4" title="Concourse" description="For furniture and homeware stores." />
|
|
970
|
+
</Card>
|
|
971
|
+
|
|
972
|
+
<Card padding="none">
|
|
973
|
+
<CardMedia ratio="16 / 10" src={section.preview} position="top" hint={<><PlusIcon aria-hidden="true" /> Add</>} busy={adding} busyLabel="Adding" />
|
|
974
|
+
<CardHeader
|
|
975
|
+
titleAs="p"
|
|
976
|
+
title={<CardLink onClick={add} busy={adding} aria-label="Add the split banner section">Split banner</CardLink>}
|
|
977
|
+
actions={<IconButton label="Preview the split banner section" size="sm" variant="ghost"><EyeIcon /></IconButton>}
|
|
978
|
+
/>
|
|
979
|
+
</Card>`,
|
|
980
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
981
|
+
className: "card-grid card-grid--narrow",
|
|
982
|
+
children: [
|
|
983
|
+
/* @__PURE__ */ jsx(ThemeCard, {}),
|
|
984
|
+
/* @__PURE__ */ jsx(ThemeCard, { chip: true }),
|
|
985
|
+
/* @__PURE__ */ jsx(SectionCard, {})
|
|
986
|
+
]
|
|
987
|
+
})
|
|
988
|
+
}), /* @__PURE__ */ jsx(Note, {
|
|
989
|
+
title: "The wash and the link",
|
|
990
|
+
children: "The washes let a press through to the card's link where they hold no control, and every control on the band sits above the link, so a preview button previews and never opens the card."
|
|
991
|
+
})]
|
|
992
|
+
}),
|
|
993
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
994
|
+
id: "selected",
|
|
995
|
+
title: "Selected",
|
|
996
|
+
description: /* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("code", { children: "selected" }), " marks the chosen one of several, or the one in use (the current plan): the edge takes the teal, a little firmer than the hairline, over a pale teal wash. It is drawn inside the card, so the focus ring outside it never stacks with it. It is a look only: say it in words (a \"Current plan\" badge) and mark the control that chose it."] }),
|
|
997
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
998
|
+
align: "fill",
|
|
999
|
+
code: `
|
|
1000
|
+
<Card padding="sm" selected={plan === 'grow'}>
|
|
1001
|
+
<CardHeader titleAs="h4" title="Grow" description="£79 a month" actions={<Badge size="sm" tone="accent">Current plan</Badge>} />
|
|
1002
|
+
<CardBody>
|
|
1003
|
+
<Button size="sm" aria-pressed={plan === 'grow'} onClick={() => setPlan('grow')}>Chosen</Button>
|
|
1004
|
+
</CardBody>
|
|
1005
|
+
</Card>`,
|
|
1006
|
+
children: /* @__PURE__ */ jsx(PlanCards, {})
|
|
1007
|
+
})
|
|
1008
|
+
}),
|
|
1009
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
1010
|
+
id: "nested",
|
|
1011
|
+
title: "A well inside a card",
|
|
1012
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
1013
|
+
"A card inside a card steps its corner down to the inputs' 12px, so the corners nest: that is how a sunken well sits in a card. Pass ",
|
|
1014
|
+
/* @__PURE__ */ jsx("code", { children: "radius" }),
|
|
1015
|
+
" to set it either way."
|
|
1016
|
+
] }),
|
|
1017
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
1018
|
+
align: "fill",
|
|
1019
|
+
code: `
|
|
1020
|
+
<Card>
|
|
1021
|
+
<CardHeader title="Payouts" description="Paid every Friday." />
|
|
1022
|
+
<Card variant="sunken" padding="sm">
|
|
1023
|
+
<CardHeader titleAs="p" title="Account ending 4417" description="Northgate Bank, sort code 00-00-00" />
|
|
1024
|
+
</Card>
|
|
1025
|
+
</Card>`,
|
|
1026
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1027
|
+
className: "card-demo",
|
|
1028
|
+
children: /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
1029
|
+
title: "Payouts",
|
|
1030
|
+
description: "Paid every Friday."
|
|
1031
|
+
}), /* @__PURE__ */ jsx(Card, {
|
|
1032
|
+
variant: "sunken",
|
|
1033
|
+
padding: "sm",
|
|
1034
|
+
children: /* @__PURE__ */ jsx(CardHeader, {
|
|
1035
|
+
titleAs: "p",
|
|
1036
|
+
title: "Account ending 4417",
|
|
1037
|
+
description: "Northgate Bank, sort code 00-00-00"
|
|
1038
|
+
})
|
|
1039
|
+
})] })
|
|
1040
|
+
})
|
|
1041
|
+
})
|
|
1042
|
+
}),
|
|
1043
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
1044
|
+
id: "table",
|
|
1045
|
+
title: "A table inside a card",
|
|
1046
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
1047
|
+
"An embedded ",
|
|
1048
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
1049
|
+
to: "/components/table",
|
|
1050
|
+
children: "table frame"
|
|
1051
|
+
}),
|
|
1052
|
+
" inside a card (",
|
|
1053
|
+
/* @__PURE__ */ jsx("code", { children: "TableFrame variant=\"embedded\"" }),
|
|
1054
|
+
", the card's padding its inset) paints its sticky heading and pinned columns on the card's own ground, so they match the rows on a sunken or a raised card in both themes. A framed table keeps its own canvas, heading and body alike."
|
|
1055
|
+
] }),
|
|
1056
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
1057
|
+
align: "fill",
|
|
1058
|
+
code: `
|
|
1059
|
+
<Card variant="sunken" padding="none">
|
|
1060
|
+
<CardHeader title="Orders" />
|
|
1061
|
+
<TableFrame variant="embedded" height={160}>
|
|
1062
|
+
<Table>…</Table>
|
|
1063
|
+
</TableFrame>
|
|
1064
|
+
</Card>`,
|
|
1065
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1066
|
+
className: "card-grid",
|
|
1067
|
+
children: ["outline", "sunken"].map((variant) => /* @__PURE__ */ jsxs(Card, {
|
|
1068
|
+
variant,
|
|
1069
|
+
padding: "none",
|
|
1070
|
+
children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
1071
|
+
titleAs: "p",
|
|
1072
|
+
title: variant === "outline" ? "Orders, outline" : "Orders, sunken",
|
|
1073
|
+
className: "card-table-head"
|
|
1074
|
+
}), /* @__PURE__ */ jsx(TableFrame, {
|
|
1075
|
+
variant: "embedded",
|
|
1076
|
+
height: 150,
|
|
1077
|
+
children: /* @__PURE__ */ jsxs(Table, { children: [/* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsxs(TableRow, { children: [/* @__PURE__ */ jsx(TableHeaderCell, { children: "Order" }), /* @__PURE__ */ jsx(TableHeaderCell, {
|
|
1078
|
+
align: "end",
|
|
1079
|
+
children: "Total"
|
|
1080
|
+
})] }) }), /* @__PURE__ */ jsx(TableBody, { children: [
|
|
1081
|
+
"1048",
|
|
1082
|
+
"1047",
|
|
1083
|
+
"1046",
|
|
1084
|
+
"1045",
|
|
1085
|
+
"1044"
|
|
1086
|
+
].map((order, index) => /* @__PURE__ */ jsxs(TableRow, { children: [/* @__PURE__ */ jsxs(TableCell, { children: ["#", order] }), /* @__PURE__ */ jsxs(TableCell, {
|
|
1087
|
+
align: "end",
|
|
1088
|
+
children: ["£", (72 + index * 18).toFixed(2)]
|
|
1089
|
+
})] }, order)) })] })
|
|
1090
|
+
})]
|
|
1091
|
+
}, variant))
|
|
1092
|
+
})
|
|
1093
|
+
})
|
|
1094
|
+
}),
|
|
1095
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
1096
|
+
id: "layout",
|
|
1097
|
+
title: "Your own layout",
|
|
1098
|
+
description: /* @__PURE__ */ jsx("p", { children: "The card's column is weightless, so a class of yours on the card sets its own display, direction or gap, whichever stylesheet loads first. With no class the card is a column. This one is a grid of its own, with no wrapper inside." }),
|
|
1099
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
1100
|
+
align: "fill",
|
|
1101
|
+
code: `
|
|
1102
|
+
.order-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
|
|
1103
|
+
|
|
1104
|
+
<Card className="order-tiles">
|
|
1105
|
+
<CardHeader titleAs="p" title="36" description="Orders today" />
|
|
1106
|
+
<CardHeader titleAs="p" title="7" description="To fulfil" />
|
|
1107
|
+
<CardHeader titleAs="p" title="2" description="Due today" />
|
|
1108
|
+
</Card>`,
|
|
1109
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1110
|
+
className: "card-demo",
|
|
1111
|
+
children: /* @__PURE__ */ jsxs(Card, {
|
|
1112
|
+
className: "card-tiles",
|
|
1113
|
+
children: [
|
|
1114
|
+
/* @__PURE__ */ jsx(CardHeader, {
|
|
1115
|
+
titleAs: "p",
|
|
1116
|
+
title: "36",
|
|
1117
|
+
description: "Orders today"
|
|
1118
|
+
}),
|
|
1119
|
+
/* @__PURE__ */ jsx(CardHeader, {
|
|
1120
|
+
titleAs: "p",
|
|
1121
|
+
title: "7",
|
|
1122
|
+
description: "To fulfil"
|
|
1123
|
+
}),
|
|
1124
|
+
/* @__PURE__ */ jsx(CardHeader, {
|
|
1125
|
+
titleAs: "p",
|
|
1126
|
+
title: "2",
|
|
1127
|
+
description: "Due today"
|
|
1128
|
+
})
|
|
1129
|
+
]
|
|
1130
|
+
})
|
|
1131
|
+
})
|
|
1132
|
+
})
|
|
1133
|
+
}),
|
|
1134
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
1135
|
+
id: "loading",
|
|
1136
|
+
title: "Loading",
|
|
1137
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
1138
|
+
/* @__PURE__ */ jsx("code", { children: "SkeletonCard" }),
|
|
1139
|
+
" takes ",
|
|
1140
|
+
/* @__PURE__ */ jsx("code", { children: "media" }),
|
|
1141
|
+
" for a cover in the band's own frame (",
|
|
1142
|
+
/* @__PURE__ */ jsx("code", { children: "true" }),
|
|
1143
|
+
" for 16:9, or its ",
|
|
1144
|
+
/* @__PURE__ */ jsx("code", { children: "ratio" }),
|
|
1145
|
+
" or ",
|
|
1146
|
+
/* @__PURE__ */ jsx("code", { children: "height" }),
|
|
1147
|
+
"), so a grid of cards keeps its shape while it loads."
|
|
1148
|
+
] }),
|
|
1149
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
1150
|
+
align: "fill",
|
|
1151
|
+
code: `<SkeletonCard media={{ height: 112 }} description lines={2} label="Loading suppliers" />`,
|
|
1152
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1153
|
+
className: "card-narrow",
|
|
1154
|
+
children: [/* @__PURE__ */ jsx(SkeletonCard, {
|
|
1155
|
+
media: { height: 112 },
|
|
1156
|
+
description: true,
|
|
1157
|
+
lines: 2,
|
|
1158
|
+
label: null
|
|
1159
|
+
}), /* @__PURE__ */ jsx(SupplierCard, {})]
|
|
1160
|
+
})
|
|
1161
|
+
})
|
|
1162
|
+
}),
|
|
1163
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
1164
|
+
id: "both-themes",
|
|
1165
|
+
title: "In both themes",
|
|
1166
|
+
description: /* @__PURE__ */ jsx("p", { children: "All three variants, light and dark side by side. In dark the canvas is near black, so outline and sunken cards read by their hairline and their tone, and the raised card sits on the ground." }),
|
|
1167
|
+
children: /* @__PURE__ */ jsx(ThemePair, {
|
|
1168
|
+
align: "fill",
|
|
1169
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1170
|
+
className: "card-stack",
|
|
1171
|
+
children: [
|
|
1172
|
+
/* @__PURE__ */ jsx(LowStockCard, {}),
|
|
1173
|
+
/* @__PURE__ */ jsx(DeliveryTipCard, {}),
|
|
1174
|
+
/* @__PURE__ */ jsx("div", {
|
|
1175
|
+
className: "card-ground",
|
|
1176
|
+
children: /* @__PURE__ */ jsx(PayoutCard, { padding: "sm" })
|
|
1177
|
+
})
|
|
1178
|
+
]
|
|
1179
|
+
})
|
|
1180
|
+
})
|
|
1181
|
+
}),
|
|
1182
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
1183
|
+
id: "guidelines",
|
|
1184
|
+
title: "Guidelines",
|
|
1185
|
+
description: /* @__PURE__ */ jsx("p", { children: "The kit groups with space, weight and hairlines before boxes. The page canvas is the one raised surface and the main container, and the home dashboard uses no cards at all. A card earns its border only when the grouping cannot be read without one." }),
|
|
1186
|
+
children: [
|
|
1187
|
+
/* @__PURE__ */ jsx(DoDont, {
|
|
1188
|
+
do: {
|
|
1189
|
+
children: /* @__PURE__ */ jsxs(Card, {
|
|
1190
|
+
padding: "sm",
|
|
1191
|
+
className: "card-dd",
|
|
1192
|
+
children: [/* @__PURE__ */ jsx(CardHeader, { title: "Recent orders" }), /* @__PURE__ */ jsxs(CardBody, {
|
|
1193
|
+
className: "card-stock",
|
|
1194
|
+
children: [
|
|
1195
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1196
|
+
className: "card-stock__row",
|
|
1197
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1198
|
+
className: "card-stock__name",
|
|
1199
|
+
children: "#1048 Amara Okafor"
|
|
1200
|
+
}), /* @__PURE__ */ jsx(Badge, {
|
|
1201
|
+
size: "sm",
|
|
1202
|
+
tone: "neutral",
|
|
1203
|
+
children: "Unfulfilled"
|
|
1204
|
+
})]
|
|
1205
|
+
}),
|
|
1206
|
+
/* @__PURE__ */ jsx(Separator, {}),
|
|
1207
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1208
|
+
className: "card-stock__row",
|
|
1209
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1210
|
+
className: "card-stock__name",
|
|
1211
|
+
children: "#1047 Callum Reid"
|
|
1212
|
+
}), /* @__PURE__ */ jsx(Badge, {
|
|
1213
|
+
size: "sm",
|
|
1214
|
+
tone: "positive",
|
|
1215
|
+
children: "Fulfilled"
|
|
1216
|
+
})]
|
|
1217
|
+
})
|
|
1218
|
+
]
|
|
1219
|
+
})]
|
|
1220
|
+
}),
|
|
1221
|
+
caption: "One card, its rows divided by hairlines."
|
|
1222
|
+
},
|
|
1223
|
+
dont: {
|
|
1224
|
+
children: /* @__PURE__ */ jsxs(Card, {
|
|
1225
|
+
padding: "sm",
|
|
1226
|
+
className: "card-dd",
|
|
1227
|
+
children: [
|
|
1228
|
+
/* @__PURE__ */ jsx(CardHeader, { title: "Recent orders" }),
|
|
1229
|
+
/* @__PURE__ */ jsx(Card, {
|
|
1230
|
+
padding: "sm",
|
|
1231
|
+
children: "#1048 Amara Okafor"
|
|
1232
|
+
}),
|
|
1233
|
+
/* @__PURE__ */ jsx(Card, {
|
|
1234
|
+
padding: "sm",
|
|
1235
|
+
children: "#1047 Callum Reid"
|
|
1236
|
+
})
|
|
1237
|
+
]
|
|
1238
|
+
}),
|
|
1239
|
+
caption: "Framed cards are never nested: boxes inside boxes add edges without adding meaning. A sunken well inside a card is not a box."
|
|
1240
|
+
}
|
|
1241
|
+
}),
|
|
1242
|
+
/* @__PURE__ */ jsx(DoDont, {
|
|
1243
|
+
do: {
|
|
1244
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1245
|
+
className: "card-ground",
|
|
1246
|
+
children: /* @__PURE__ */ jsx(Card, {
|
|
1247
|
+
variant: "raised",
|
|
1248
|
+
padding: "sm",
|
|
1249
|
+
children: /* @__PURE__ */ jsx(CardHeader, {
|
|
1250
|
+
title: "Next payout",
|
|
1251
|
+
description: "Friday 2 October"
|
|
1252
|
+
})
|
|
1253
|
+
})
|
|
1254
|
+
}),
|
|
1255
|
+
caption: "Raised cards sit on the porcelain ground."
|
|
1256
|
+
},
|
|
1257
|
+
dont: {
|
|
1258
|
+
children: /* @__PURE__ */ jsx(Card, {
|
|
1259
|
+
variant: "raised",
|
|
1260
|
+
padding: "sm",
|
|
1261
|
+
children: /* @__PURE__ */ jsx(CardHeader, {
|
|
1262
|
+
title: "Next payout",
|
|
1263
|
+
description: "Friday 2 October"
|
|
1264
|
+
})
|
|
1265
|
+
}),
|
|
1266
|
+
caption: "On the canvas a shadow starts a second raised layer. The canvas is the one raised page: use outline or sunken on it."
|
|
1267
|
+
}
|
|
1268
|
+
}),
|
|
1269
|
+
/* @__PURE__ */ jsx(Guidelines, { items: [
|
|
1270
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1271
|
+
"Headline figures sit on a hairline strip, not in a row of cards. See",
|
|
1272
|
+
" ",
|
|
1273
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
1274
|
+
to: "/components/figure-tabs",
|
|
1275
|
+
children: "Figure tabs"
|
|
1276
|
+
}),
|
|
1277
|
+
"."
|
|
1278
|
+
] }),
|
|
1279
|
+
"A card holds one idea: a summary, a list to act on, or a way into a section. Two ideas are two cards, or none.",
|
|
1280
|
+
"Name the card by what it is (\"Low stock\"), and let the description say why it matters now."
|
|
1281
|
+
] })
|
|
1282
|
+
]
|
|
1283
|
+
}),
|
|
1284
|
+
/* @__PURE__ */ jsx(Fragment$1, {}),
|
|
1285
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
1286
|
+
id: "accessibility",
|
|
1287
|
+
title: "Accessibility",
|
|
1288
|
+
children: /* @__PURE__ */ jsx(Guidelines, { items: [
|
|
1289
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1290
|
+
"The header title is an ",
|
|
1291
|
+
/* @__PURE__ */ jsx("code", { children: "h3" }),
|
|
1292
|
+
" by default. Set ",
|
|
1293
|
+
/* @__PURE__ */ jsx("code", { children: "titleAs" }),
|
|
1294
|
+
" so headings follow the page outline, or to ",
|
|
1295
|
+
/* @__PURE__ */ jsx("code", { children: "p" }),
|
|
1296
|
+
" when the title is not a heading, such as inside a link card."
|
|
1297
|
+
] }),
|
|
1298
|
+
"The icon tile is decorative and hidden from assistive tech.",
|
|
1299
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1300
|
+
/* @__PURE__ */ jsx("code", { children: "interactive" }),
|
|
1301
|
+
" adds hover, press and focus styles only. Pair it with ",
|
|
1302
|
+
/* @__PURE__ */ jsx("code", { children: "asChild" }),
|
|
1303
|
+
" on a link (or a button) so the card can be reached by keyboard and is announced for what it does."
|
|
1304
|
+
] }),
|
|
1305
|
+
"Prefer a link. A button flattens everything inside it, so a heading inside is no longer a heading.",
|
|
1306
|
+
"Keyboard focus draws a 2px teal ring 2px outside the card. The press dip is dropped under reduced motion.",
|
|
1307
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1308
|
+
"A ",
|
|
1309
|
+
/* @__PURE__ */ jsx("code", { children: "CardLink" }),
|
|
1310
|
+
" is named by the card's title alone, and the card's other controls (the header's actions, the footer, the cover's controls) sit beside it, never inside it: nothing nests in a link."
|
|
1311
|
+
] }),
|
|
1312
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1313
|
+
"The cover's picture is decorative unless it has ",
|
|
1314
|
+
/* @__PURE__ */ jsx("code", { children: "alt" }),
|
|
1315
|
+
". Its hint is hidden from assistive tech, since the link says the action, and a polite status says ",
|
|
1316
|
+
/* @__PURE__ */ jsx("code", { children: "busyLabel" }),
|
|
1317
|
+
" once when the action starts."
|
|
1318
|
+
] }),
|
|
1319
|
+
"The controls on a hidden wash stay in the tab order, and focusing one shows the wash.",
|
|
1320
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1321
|
+
"To send focus to a card's title (after a retry that worked, say), pass ",
|
|
1322
|
+
/* @__PURE__ */ jsx("code", { children: "titleRef" }),
|
|
1323
|
+
" to its",
|
|
1324
|
+
" ",
|
|
1325
|
+
/* @__PURE__ */ jsx("code", { children: "CardHeader" }),
|
|
1326
|
+
" and focus it: the title becomes focusable by script, never a tab stop, and shows the ring only when focus arrives from the keyboard."
|
|
1327
|
+
] })
|
|
1328
|
+
] })
|
|
1329
|
+
}),
|
|
1330
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
1331
|
+
id: "props",
|
|
1332
|
+
title: "Props",
|
|
1333
|
+
children: [
|
|
1334
|
+
/* @__PURE__ */ jsx(PropsTable, {
|
|
1335
|
+
title: "Card",
|
|
1336
|
+
rows: [
|
|
1337
|
+
{
|
|
1338
|
+
name: "variant",
|
|
1339
|
+
type: "'outline' | 'raised' | 'sunken'",
|
|
1340
|
+
default: "'outline'",
|
|
1341
|
+
description: "A hairline on the canvas colour; a soft shadow, for the ground; or set into the page."
|
|
1342
|
+
},
|
|
1343
|
+
{
|
|
1344
|
+
name: "padding",
|
|
1345
|
+
type: "'none' | 'sm' | 'md' | 'lg'",
|
|
1346
|
+
default: "'md'",
|
|
1347
|
+
description: "Inner spacing: 0, 16, 20 or 24px. The gap between parts follows: 0, 12, 16 or 20px."
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
name: "interactive",
|
|
1351
|
+
type: "boolean",
|
|
1352
|
+
default: "false",
|
|
1353
|
+
description: "Hover, press and focus states for a card that is one target. Pair with asChild."
|
|
1354
|
+
},
|
|
1355
|
+
{
|
|
1356
|
+
name: "asChild",
|
|
1357
|
+
type: "boolean",
|
|
1358
|
+
default: "false",
|
|
1359
|
+
description: "Render the child element (a link or button) as the card."
|
|
1360
|
+
},
|
|
1361
|
+
{
|
|
1362
|
+
name: "selected",
|
|
1363
|
+
type: "boolean",
|
|
1364
|
+
default: "false",
|
|
1365
|
+
description: "The chosen one, or the one in use: a 1.5px teal edge over a pale teal wash. Say it in words too."
|
|
1366
|
+
},
|
|
1367
|
+
{
|
|
1368
|
+
name: "radius",
|
|
1369
|
+
type: "'lg' | 'md'",
|
|
1370
|
+
description: "The corner: 16px, or 12px. Left out, 16px on the page and 12px inside another card."
|
|
1371
|
+
}
|
|
1372
|
+
]
|
|
1373
|
+
}),
|
|
1374
|
+
/* @__PURE__ */ jsx("p", {
|
|
1375
|
+
className: "doc-section__description",
|
|
1376
|
+
children: "Card also accepts every native div attribute."
|
|
1377
|
+
}),
|
|
1378
|
+
/* @__PURE__ */ jsx(PropsTable, {
|
|
1379
|
+
title: "CardHeader",
|
|
1380
|
+
rows: [
|
|
1381
|
+
{
|
|
1382
|
+
name: "title",
|
|
1383
|
+
type: "ReactNode",
|
|
1384
|
+
required: true,
|
|
1385
|
+
description: "The card's name, in 15px semibold."
|
|
1386
|
+
},
|
|
1387
|
+
{
|
|
1388
|
+
name: "description",
|
|
1389
|
+
type: "ReactNode",
|
|
1390
|
+
description: "One line under the title, in 13px secondary text."
|
|
1391
|
+
},
|
|
1392
|
+
{
|
|
1393
|
+
name: "actions",
|
|
1394
|
+
type: "ReactNode",
|
|
1395
|
+
description: "Controls on the right. Small controls centre on the title line; where they would leave the title less than 7rem, they drop under it, at the start."
|
|
1396
|
+
},
|
|
1397
|
+
{
|
|
1398
|
+
name: "icon",
|
|
1399
|
+
type: "ReactNode",
|
|
1400
|
+
description: "An icon in a 32px tile before the title. Decorative."
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
name: "titleAs",
|
|
1404
|
+
type: "'h2' | 'h3' | 'h4' | 'p' | 'div'",
|
|
1405
|
+
default: "'h3'",
|
|
1406
|
+
description: "Element for the title."
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
name: "titleRef",
|
|
1410
|
+
type: "Ref<HTMLElement>",
|
|
1411
|
+
description: "The title element, so focus can be sent there. Makes the title focusable by script (tabindex -1), never a tab stop."
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
name: "children",
|
|
1415
|
+
type: "ReactNode",
|
|
1416
|
+
description: "Extra content under the description, inside the heading block."
|
|
1417
|
+
}
|
|
1418
|
+
]
|
|
1419
|
+
}),
|
|
1420
|
+
/* @__PURE__ */ jsx(PropsTable, {
|
|
1421
|
+
title: "CardMedia",
|
|
1422
|
+
rows: [
|
|
1423
|
+
{
|
|
1424
|
+
name: "src",
|
|
1425
|
+
type: "string",
|
|
1426
|
+
description: "The picture across the band. Decorative unless alt is given."
|
|
1427
|
+
},
|
|
1428
|
+
{
|
|
1429
|
+
name: "alt",
|
|
1430
|
+
type: "string",
|
|
1431
|
+
description: "Names the picture, when it says something the title does not."
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
name: "ratio",
|
|
1435
|
+
type: "number | string",
|
|
1436
|
+
default: "'16 / 9'",
|
|
1437
|
+
description: "Any ratio, or 'auto' for the picture's own shape (at least 120px)."
|
|
1438
|
+
},
|
|
1439
|
+
{
|
|
1440
|
+
name: "height",
|
|
1441
|
+
type: "number | string",
|
|
1442
|
+
description: "A fixed height instead of a ratio. A number is px."
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
name: "fit",
|
|
1446
|
+
type: "'cover' | 'contain'",
|
|
1447
|
+
default: "'cover'",
|
|
1448
|
+
description: "Fill and trim, or show whole on white in both themes (a product)."
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
name: "position",
|
|
1452
|
+
type: "string",
|
|
1453
|
+
description: "Where a trimmed picture is held (object-position): 'top' for a page's screenshot."
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
name: "fallback",
|
|
1457
|
+
type: "'orbit' | 'gradient' | 'none'",
|
|
1458
|
+
default: "'orbit'",
|
|
1459
|
+
description: "With no picture: the orbit on a well, a wash hued from seed, or the well alone."
|
|
1460
|
+
},
|
|
1461
|
+
{
|
|
1462
|
+
name: "seed",
|
|
1463
|
+
type: "string",
|
|
1464
|
+
description: "The name a gradient takes its two hues from."
|
|
1465
|
+
},
|
|
1466
|
+
{
|
|
1467
|
+
name: "badges",
|
|
1468
|
+
type: "ReactNode",
|
|
1469
|
+
description: "Badges at the top start: canvas pills that read on any picture."
|
|
1470
|
+
},
|
|
1471
|
+
{
|
|
1472
|
+
name: "actions",
|
|
1473
|
+
type: "ReactNode",
|
|
1474
|
+
description: "Small controls at the top end, above the card's link."
|
|
1475
|
+
},
|
|
1476
|
+
{
|
|
1477
|
+
name: "scrim",
|
|
1478
|
+
type: "ReactNode",
|
|
1479
|
+
description: "Controls on a dark wash, shown on hover and focus (always on a touch screen)."
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
name: "hint",
|
|
1483
|
+
type: "ReactNode",
|
|
1484
|
+
description: "A teal pill at the bottom end saying what pressing the card does. Decorative."
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
name: "busy",
|
|
1488
|
+
type: "boolean",
|
|
1489
|
+
default: "false",
|
|
1490
|
+
description: "A pale wash with busyLabel, breathing; said once when it starts."
|
|
1491
|
+
},
|
|
1492
|
+
{
|
|
1493
|
+
name: "busyLabel",
|
|
1494
|
+
type: "string",
|
|
1495
|
+
default: "'Working'",
|
|
1496
|
+
description: "The busy word: \"Adding\"."
|
|
1497
|
+
},
|
|
1498
|
+
{
|
|
1499
|
+
name: "logo",
|
|
1500
|
+
type: "ReactNode",
|
|
1501
|
+
description: "A logo or avatar over the band's lower edge, in a ring of the card's colour. 56px."
|
|
1502
|
+
},
|
|
1503
|
+
{
|
|
1504
|
+
name: "logoShape",
|
|
1505
|
+
type: "'rounded' | 'circle'",
|
|
1506
|
+
default: "'rounded'",
|
|
1507
|
+
description: "A business's rounded square, or a person's circle."
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
name: "children",
|
|
1511
|
+
type: "ReactNode",
|
|
1512
|
+
description: "Anything to draw instead of a picture: a live render, an icon tile on a colour."
|
|
1513
|
+
}
|
|
1514
|
+
]
|
|
1515
|
+
}),
|
|
1516
|
+
/* @__PURE__ */ jsx(PropsTable, {
|
|
1517
|
+
title: "CardLink",
|
|
1518
|
+
rows: [
|
|
1519
|
+
{
|
|
1520
|
+
name: "children",
|
|
1521
|
+
type: "ReactNode",
|
|
1522
|
+
description: "The link's words: the card's name. Put the link in the CardHeader title."
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
name: "href",
|
|
1526
|
+
type: "string",
|
|
1527
|
+
description: "Where it goes. Without it the link is a button."
|
|
1528
|
+
},
|
|
1529
|
+
{
|
|
1530
|
+
name: "onClick",
|
|
1531
|
+
type: "(event) => void",
|
|
1532
|
+
description: "What pressing the card does, for a button."
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
name: "asChild",
|
|
1536
|
+
type: "boolean",
|
|
1537
|
+
default: "false",
|
|
1538
|
+
description: "Render the one child element (a router link) as the link."
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
name: "label",
|
|
1542
|
+
type: "ReactNode",
|
|
1543
|
+
description: "With asChild, the link's words."
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
name: "busy",
|
|
1547
|
+
type: "boolean",
|
|
1548
|
+
default: "false",
|
|
1549
|
+
description: "Running: aria-busy and aria-disabled, still focusable, and a press does nothing."
|
|
1550
|
+
}
|
|
1551
|
+
]
|
|
1552
|
+
}),
|
|
1553
|
+
/* @__PURE__ */ jsx(PropsTable, {
|
|
1554
|
+
title: "CardBody and CardFooter",
|
|
1555
|
+
rows: [{
|
|
1556
|
+
name: "children",
|
|
1557
|
+
type: "ReactNode",
|
|
1558
|
+
description: "The content. Both accept every native div attribute; the footer right-aligns and wraps its actions."
|
|
1559
|
+
}]
|
|
1560
|
+
})
|
|
1561
|
+
]
|
|
1562
|
+
})
|
|
1563
|
+
]
|
|
1564
|
+
});
|
|
1565
|
+
}
|
|
1566
|
+
//#endregion
|
|
1567
|
+
export { Page, Preview };
|