@orbitcommerce/constellation-docs 1.0.0 → 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/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-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-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-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-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-BB3mNl7D.js +1364 -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-C3UcpQJT.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-B38rnzoq.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-LA9XRhZc.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-cfPVTB5V.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-C-4tg6FS.js} +580 -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-BZg-xAbi.js +594 -0
- package/dist/pages/{release-Dvo684UJ.js → release-Cs6tl16C.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-CL0vomno.js +3225 -0
- package/dist/pages/{tabs-B4M-usCV.js → tabs-Dh0mUsLw.js} +256 -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 +10984 -1108
- package/package.json +2 -2
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orbitcommerce/constellation-docs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "The Constellation by Orbit Commerce documentation pages, packaged for developers.orbitcommerce.net. Not for use in apps: install @orbitcommerce/constellation.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Orbit Commerce",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"manifest.json"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@orbitcommerce/constellation": "1.0
|
|
25
|
+
"@orbitcommerce/constellation": "1.2.0",
|
|
26
26
|
"motion": "^13.4.6",
|
|
27
27
|
"shiki": "^4.4.3"
|
|
28
28
|
},
|
|
@@ -1,659 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { t as DocLink } from "./host-B6znjEgQ.js";
|
|
3
|
-
import { d as Section, 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-BNOb7AqR.js";
|
|
4
|
-
import { Fragment } from "react";
|
|
5
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { Badge, Button, Card, CardBody, CardFooter, CardHeader, Delta, Separator } from "@orbitcommerce/constellation";
|
|
7
|
-
import { CaretRightIcon, ClockIcon, PackageIcon, ReceiptIcon, UsersIcon, WalletIcon } from "@orbitcommerce/constellation/icons";
|
|
8
|
-
//#region src/pages/components/card.tsx
|
|
9
|
-
var LOW_STOCK = [
|
|
10
|
-
{
|
|
11
|
-
name: "Arden ergonomic chair, black",
|
|
12
|
-
left: 3,
|
|
13
|
-
weekly: 9
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: "Oak veneer desk, 1600mm",
|
|
17
|
-
left: 2,
|
|
18
|
-
weekly: 4
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
name: "Three drawer pedestal, white",
|
|
22
|
-
left: 5,
|
|
23
|
-
weekly: 6
|
|
24
|
-
}
|
|
25
|
-
];
|
|
26
|
-
function Preview() {
|
|
27
|
-
return /* @__PURE__ */ jsxs(Card, {
|
|
28
|
-
padding: "sm",
|
|
29
|
-
className: "card-preview",
|
|
30
|
-
children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
31
|
-
icon: /* @__PURE__ */ jsx(PackageIcon, {}),
|
|
32
|
-
title: "Low stock",
|
|
33
|
-
description: "3 products sell out this week"
|
|
34
|
-
}), /* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsx(Button, {
|
|
35
|
-
size: "xs",
|
|
36
|
-
children: "Reorder stock"
|
|
37
|
-
}) })]
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
function LowStockCard() {
|
|
41
|
-
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
42
|
-
/* @__PURE__ */ jsx(CardHeader, {
|
|
43
|
-
icon: /* @__PURE__ */ jsx(PackageIcon, {}),
|
|
44
|
-
title: "Low stock",
|
|
45
|
-
description: "Three products sell out this week.",
|
|
46
|
-
actions: /* @__PURE__ */ jsx(Button, {
|
|
47
|
-
size: "sm",
|
|
48
|
-
variant: "ghost",
|
|
49
|
-
iconEnd: /* @__PURE__ */ jsx(CaretRightIcon, {}),
|
|
50
|
-
children: "View all"
|
|
51
|
-
})
|
|
52
|
-
}),
|
|
53
|
-
/* @__PURE__ */ jsx(CardBody, {
|
|
54
|
-
className: "card-stock",
|
|
55
|
-
children: LOW_STOCK.map((item, i) => /* @__PURE__ */ jsxs(Fragment, { children: [i > 0 ? /* @__PURE__ */ jsx(Separator, {}) : null, /* @__PURE__ */ jsxs("div", {
|
|
56
|
-
className: "card-stock__row",
|
|
57
|
-
children: [/* @__PURE__ */ jsxs("span", {
|
|
58
|
-
className: "card-stock__name",
|
|
59
|
-
children: [item.name, /* @__PURE__ */ jsxs("span", {
|
|
60
|
-
className: "card-stock__meta",
|
|
61
|
-
children: [
|
|
62
|
-
"Sells about ",
|
|
63
|
-
item.weekly,
|
|
64
|
-
" a week"
|
|
65
|
-
]
|
|
66
|
-
})]
|
|
67
|
-
}), /* @__PURE__ */ jsxs(Badge, {
|
|
68
|
-
tone: "warning",
|
|
69
|
-
children: [item.left, " left"]
|
|
70
|
-
})]
|
|
71
|
-
})] }, item.name))
|
|
72
|
-
}),
|
|
73
|
-
/* @__PURE__ */ jsxs(CardFooter, { children: [/* @__PURE__ */ jsx(Button, {
|
|
74
|
-
size: "sm",
|
|
75
|
-
variant: "ghost",
|
|
76
|
-
children: "Dismiss"
|
|
77
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
78
|
-
size: "sm",
|
|
79
|
-
children: "Reorder stock"
|
|
80
|
-
})] })
|
|
81
|
-
] });
|
|
82
|
-
}
|
|
83
|
-
function OrdersCard() {
|
|
84
|
-
return /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
85
|
-
title: "Orders to fulfil",
|
|
86
|
-
description: "Paid and waiting to ship."
|
|
87
|
-
}), /* @__PURE__ */ jsxs(CardBody, {
|
|
88
|
-
className: "card-figure-row",
|
|
89
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
90
|
-
className: "card-figure",
|
|
91
|
-
children: "7"
|
|
92
|
-
}), /* @__PURE__ */ jsx(Badge, {
|
|
93
|
-
tone: "warning",
|
|
94
|
-
icon: /* @__PURE__ */ jsx(ClockIcon, {}),
|
|
95
|
-
children: "2 due today"
|
|
96
|
-
})]
|
|
97
|
-
})] });
|
|
98
|
-
}
|
|
99
|
-
function DeliveryTipCard() {
|
|
100
|
-
return /* @__PURE__ */ jsxs(Card, {
|
|
101
|
-
variant: "sunken",
|
|
102
|
-
children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
103
|
-
title: "Delivery tip",
|
|
104
|
-
description: "Shoppers in Northern Ireland see no delivery options yet. Add a rule for BT postcodes."
|
|
105
|
-
}), /* @__PURE__ */ jsx(CardBody, { children: /* @__PURE__ */ jsx(Button, {
|
|
106
|
-
size: "sm",
|
|
107
|
-
children: "Add a rule"
|
|
108
|
-
}) })]
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
function PayoutCard({ padding }) {
|
|
112
|
-
return /* @__PURE__ */ jsxs(Card, {
|
|
113
|
-
variant: "raised",
|
|
114
|
-
padding,
|
|
115
|
-
children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
116
|
-
title: "Next payout",
|
|
117
|
-
description: "Friday 2 October, to your account ending 4417."
|
|
118
|
-
}), /* @__PURE__ */ jsxs(CardBody, {
|
|
119
|
-
className: "card-figure-row",
|
|
120
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
121
|
-
className: "card-figure",
|
|
122
|
-
children: "£2,840.16"
|
|
123
|
-
}), /* @__PURE__ */ jsx(Delta, {
|
|
124
|
-
value: 12.4,
|
|
125
|
-
size: "sm",
|
|
126
|
-
label: "vs last week"
|
|
127
|
-
})]
|
|
128
|
-
})]
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
function Page() {
|
|
132
|
-
return /* @__PURE__ */ jsxs(DocPage, {
|
|
133
|
-
title: "Card",
|
|
134
|
-
status: "stable",
|
|
135
|
-
importNames: [
|
|
136
|
-
"Card",
|
|
137
|
-
"CardHeader",
|
|
138
|
-
"CardBody",
|
|
139
|
-
"CardFooter"
|
|
140
|
-
],
|
|
141
|
-
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.",
|
|
142
|
-
children: [
|
|
143
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
144
|
-
id: "variants",
|
|
145
|
-
title: "Variants",
|
|
146
|
-
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." }),
|
|
147
|
-
children: [/* @__PURE__ */ jsx(SubSection, {
|
|
148
|
-
title: "On the canvas: outline and sunken",
|
|
149
|
-
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
150
|
-
/* @__PURE__ */ jsx("code", { children: "outline" }),
|
|
151
|
-
" is the default: the canvas colour with a hairline. ",
|
|
152
|
-
/* @__PURE__ */ jsx("code", { children: "sunken" }),
|
|
153
|
-
" is set into the page, for secondary panels, tips and summaries."
|
|
154
|
-
] }),
|
|
155
|
-
children: /* @__PURE__ */ jsx(Example, {
|
|
156
|
-
align: "fill",
|
|
157
|
-
code: `
|
|
158
|
-
<Card>
|
|
159
|
-
<CardHeader title="Orders to fulfil" description="Paid and waiting to ship." />
|
|
160
|
-
<CardBody>
|
|
161
|
-
<span className="figure">7</span>
|
|
162
|
-
<Badge tone="warning" icon={<ClockIcon />}>2 due today</Badge>
|
|
163
|
-
</CardBody>
|
|
164
|
-
</Card>
|
|
165
|
-
|
|
166
|
-
<Card variant="sunken">
|
|
167
|
-
<CardHeader
|
|
168
|
-
title="Delivery tip"
|
|
169
|
-
description="Shoppers in Northern Ireland see no delivery options yet. Add a rule for BT postcodes."
|
|
170
|
-
/>
|
|
171
|
-
<CardBody>
|
|
172
|
-
<Button size="sm">Add a rule</Button>
|
|
173
|
-
</CardBody>
|
|
174
|
-
</Card>`,
|
|
175
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
176
|
-
className: "card-grid",
|
|
177
|
-
children: [/* @__PURE__ */ jsx(OrdersCard, {}), /* @__PURE__ */ jsx(DeliveryTipCard, {})]
|
|
178
|
-
})
|
|
179
|
-
})
|
|
180
|
-
}), /* @__PURE__ */ jsx(SubSection, {
|
|
181
|
-
title: "On the ground: raised",
|
|
182
|
-
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."] }),
|
|
183
|
-
children: /* @__PURE__ */ jsx(Example, {
|
|
184
|
-
align: "fill",
|
|
185
|
-
surface: "ground",
|
|
186
|
-
code: `
|
|
187
|
-
<Card variant="raised">
|
|
188
|
-
<CardHeader title="Next payout" description="Friday 2 October, to your account ending 4417." />
|
|
189
|
-
<CardBody>
|
|
190
|
-
<span className="figure">£2,840.16</span>
|
|
191
|
-
<Delta value={12.4} size="sm" label="vs last week" />
|
|
192
|
-
</CardBody>
|
|
193
|
-
</Card>`,
|
|
194
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
195
|
-
className: "card-demo",
|
|
196
|
-
children: /* @__PURE__ */ jsx(PayoutCard, {})
|
|
197
|
-
})
|
|
198
|
-
})
|
|
199
|
-
})]
|
|
200
|
-
}),
|
|
201
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
202
|
-
id: "anatomy",
|
|
203
|
-
title: "Header, body and footer",
|
|
204
|
-
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
205
|
-
/* @__PURE__ */ jsx("code", { children: "CardHeader" }),
|
|
206
|
-
" takes an optional icon in a 32px tile, a title, a one-line description and actions on the right. ",
|
|
207
|
-
/* @__PURE__ */ jsx("code", { children: "CardBody" }),
|
|
208
|
-
" holds the content. ",
|
|
209
|
-
/* @__PURE__ */ jsx("code", { children: "CardFooter" }),
|
|
210
|
-
" right-aligns its actions under a hairline that runs edge to edge. All three follow the card's padding."
|
|
211
|
-
] }),
|
|
212
|
-
children: [/* @__PURE__ */ jsx(Example, {
|
|
213
|
-
align: "fill",
|
|
214
|
-
code: `
|
|
215
|
-
<Card>
|
|
216
|
-
<CardHeader
|
|
217
|
-
icon={<PackageIcon />}
|
|
218
|
-
title="Low stock"
|
|
219
|
-
description="Three products sell out this week."
|
|
220
|
-
actions={<Button size="sm" variant="ghost" iconEnd={<CaretRightIcon />}>View all</Button>}
|
|
221
|
-
/>
|
|
222
|
-
<CardBody>
|
|
223
|
-
{products.map((item, i) => (
|
|
224
|
-
<Fragment key={item.name}>
|
|
225
|
-
{i > 0 ? <Separator /> : null}
|
|
226
|
-
<div className="row">
|
|
227
|
-
<span>{item.name} <span className="meta">Sells about {item.weekly} a week</span></span>
|
|
228
|
-
<Badge tone="warning">{item.left} left</Badge>
|
|
229
|
-
</div>
|
|
230
|
-
</Fragment>
|
|
231
|
-
))}
|
|
232
|
-
</CardBody>
|
|
233
|
-
<CardFooter>
|
|
234
|
-
<Button size="sm" variant="ghost">Dismiss</Button>
|
|
235
|
-
<Button size="sm">Reorder stock</Button>
|
|
236
|
-
</CardFooter>
|
|
237
|
-
</Card>`,
|
|
238
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
239
|
-
className: "card-demo",
|
|
240
|
-
children: /* @__PURE__ */ jsx(LowStockCard, {})
|
|
241
|
-
})
|
|
242
|
-
}), /* @__PURE__ */ jsx(Guidelines, { items: [
|
|
243
|
-
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
244
|
-
"Header actions are ",
|
|
245
|
-
/* @__PURE__ */ jsx("code", { children: "sm" }),
|
|
246
|
-
" controls: they centre on the title line without stretching the header."
|
|
247
|
-
] }),
|
|
248
|
-
"Inside a card, rows are divided by a Separator, not by more cards.",
|
|
249
|
-
"The footer holds the card's own actions. Keep the page's one primary button out of it."
|
|
250
|
-
] })]
|
|
251
|
-
}),
|
|
252
|
-
/* @__PURE__ */ jsx(Section, {
|
|
253
|
-
id: "padding",
|
|
254
|
-
title: "Padding",
|
|
255
|
-
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
256
|
-
/* @__PURE__ */ jsx("code", { children: "md" }),
|
|
257
|
-
" (20px) is the default. The gap between header, body and footer follows the padding, so a denser card is dense all the way through. ",
|
|
258
|
-
/* @__PURE__ */ jsx("code", { children: "none" }),
|
|
259
|
-
" is for tables and media, whose rows bring their own spacing."
|
|
260
|
-
] }),
|
|
261
|
-
children: /* @__PURE__ */ jsx(Example, {
|
|
262
|
-
align: "fill",
|
|
263
|
-
code: `
|
|
264
|
-
<Card padding="sm">
|
|
265
|
-
<CardHeader title="Small" description="16px, with 12px between parts. Side panels and dense grids." />
|
|
266
|
-
</Card>
|
|
267
|
-
<Card>
|
|
268
|
-
<CardHeader title="Medium" description="20px, with 16px between parts. The default." />
|
|
269
|
-
</Card>
|
|
270
|
-
<Card padding="lg">
|
|
271
|
-
<CardHeader title="Large" description="24px, with 20px between parts. A card that is a page's main content." />
|
|
272
|
-
</Card>
|
|
273
|
-
<Card padding="none">
|
|
274
|
-
<div className="row">None, for tables and media</div>
|
|
275
|
-
<Separator />
|
|
276
|
-
<div className="row">Rows bring their own spacing</div>
|
|
277
|
-
</Card>`,
|
|
278
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
279
|
-
className: "card-grid",
|
|
280
|
-
children: [
|
|
281
|
-
/* @__PURE__ */ jsx(Card, {
|
|
282
|
-
padding: "sm",
|
|
283
|
-
children: /* @__PURE__ */ jsx(CardHeader, {
|
|
284
|
-
title: "Small",
|
|
285
|
-
description: "16px, with 12px between parts. Side panels and dense grids."
|
|
286
|
-
})
|
|
287
|
-
}),
|
|
288
|
-
/* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardHeader, {
|
|
289
|
-
title: "Medium",
|
|
290
|
-
description: "20px, with 16px between parts. The default."
|
|
291
|
-
}) }),
|
|
292
|
-
/* @__PURE__ */ jsx(Card, {
|
|
293
|
-
padding: "lg",
|
|
294
|
-
children: /* @__PURE__ */ jsx(CardHeader, {
|
|
295
|
-
title: "Large",
|
|
296
|
-
description: "24px, with 20px between parts. A card that is a page's main content."
|
|
297
|
-
})
|
|
298
|
-
}),
|
|
299
|
-
/* @__PURE__ */ jsxs(Card, {
|
|
300
|
-
padding: "none",
|
|
301
|
-
children: [
|
|
302
|
-
/* @__PURE__ */ jsx("div", {
|
|
303
|
-
className: "card-table-row",
|
|
304
|
-
children: "None, for tables and media"
|
|
305
|
-
}),
|
|
306
|
-
/* @__PURE__ */ jsx(Separator, {}),
|
|
307
|
-
/* @__PURE__ */ jsx("div", {
|
|
308
|
-
className: "card-table-row",
|
|
309
|
-
children: "Rows bring their own spacing"
|
|
310
|
-
})
|
|
311
|
-
]
|
|
312
|
-
})
|
|
313
|
-
]
|
|
314
|
-
})
|
|
315
|
-
})
|
|
316
|
-
}),
|
|
317
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
318
|
-
id: "interactive",
|
|
319
|
-
title: "Interactive",
|
|
320
|
-
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
321
|
-
"When the whole card is one way in, set ",
|
|
322
|
-
/* @__PURE__ */ jsx("code", { children: "interactive" }),
|
|
323
|
-
" and render the link itself with",
|
|
324
|
-
" ",
|
|
325
|
-
/* @__PURE__ */ jsx("code", { children: "asChild" }),
|
|
326
|
-
". Hover firms the hairline (a sunken card darkens, a raised card lifts to the floating shadow), a press dips it to 99.5%, and keyboard focus draws the teal ring. Point at them, or tab to them."
|
|
327
|
-
] }),
|
|
328
|
-
children: [
|
|
329
|
-
/* @__PURE__ */ jsx(Example, {
|
|
330
|
-
align: "fill",
|
|
331
|
-
code: `
|
|
332
|
-
<Card asChild interactive padding="sm" className="nav-card">
|
|
333
|
-
<a href="/orders">
|
|
334
|
-
<CardHeader icon={<ReceiptIcon />} title="Orders" description="36 today, 7 to fulfil" titleAs="p" />
|
|
335
|
-
<CaretRightIcon className="caret" aria-hidden="true" />
|
|
336
|
-
</a>
|
|
337
|
-
</Card>
|
|
338
|
-
<Card asChild interactive padding="sm" variant="sunken" className="nav-card">
|
|
339
|
-
<a href="/customers">
|
|
340
|
-
<CardHeader icon={<UsersIcon />} title="Customers" description="1,284 customers, 12 new this week" titleAs="p" />
|
|
341
|
-
<CaretRightIcon className="caret" aria-hidden="true" />
|
|
342
|
-
</a>
|
|
343
|
-
</Card>`,
|
|
344
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
345
|
-
className: "card-stack",
|
|
346
|
-
children: [/* @__PURE__ */ jsx(Card, {
|
|
347
|
-
asChild: true,
|
|
348
|
-
interactive: true,
|
|
349
|
-
padding: "sm",
|
|
350
|
-
className: "card-nav",
|
|
351
|
-
children: /* @__PURE__ */ jsxs("a", {
|
|
352
|
-
href: "#interactive",
|
|
353
|
-
children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
354
|
-
icon: /* @__PURE__ */ jsx(ReceiptIcon, {}),
|
|
355
|
-
title: "Orders",
|
|
356
|
-
description: "36 today, 7 to fulfil",
|
|
357
|
-
titleAs: "p",
|
|
358
|
-
style: { flex: 1 }
|
|
359
|
-
}), /* @__PURE__ */ jsx(CaretRightIcon, {
|
|
360
|
-
className: "card-nav__caret",
|
|
361
|
-
"aria-hidden": "true"
|
|
362
|
-
})]
|
|
363
|
-
})
|
|
364
|
-
}), /* @__PURE__ */ jsx(Card, {
|
|
365
|
-
asChild: true,
|
|
366
|
-
interactive: true,
|
|
367
|
-
padding: "sm",
|
|
368
|
-
variant: "sunken",
|
|
369
|
-
className: "card-nav",
|
|
370
|
-
children: /* @__PURE__ */ jsxs("a", {
|
|
371
|
-
href: "#interactive",
|
|
372
|
-
children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
373
|
-
icon: /* @__PURE__ */ jsx(UsersIcon, {}),
|
|
374
|
-
title: "Customers",
|
|
375
|
-
description: "1,284 customers, 12 new this week",
|
|
376
|
-
titleAs: "p",
|
|
377
|
-
style: { flex: 1 }
|
|
378
|
-
}), /* @__PURE__ */ jsx(CaretRightIcon, {
|
|
379
|
-
className: "card-nav__caret",
|
|
380
|
-
"aria-hidden": "true"
|
|
381
|
-
})]
|
|
382
|
-
})
|
|
383
|
-
})]
|
|
384
|
-
})
|
|
385
|
-
}),
|
|
386
|
-
/* @__PURE__ */ jsx(Example, {
|
|
387
|
-
align: "fill",
|
|
388
|
-
surface: "ground",
|
|
389
|
-
code: `
|
|
390
|
-
<Card asChild interactive padding="sm" variant="raised" className="nav-card">
|
|
391
|
-
<a href="/payouts">
|
|
392
|
-
<CardHeader icon={<WalletIcon />} title="Payouts" description="Paid out £18,420.55 this month" titleAs="p" />
|
|
393
|
-
<CaretRightIcon className="caret" aria-hidden="true" />
|
|
394
|
-
</a>
|
|
395
|
-
</Card>`,
|
|
396
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
397
|
-
className: "card-stack",
|
|
398
|
-
children: /* @__PURE__ */ jsx(Card, {
|
|
399
|
-
asChild: true,
|
|
400
|
-
interactive: true,
|
|
401
|
-
padding: "sm",
|
|
402
|
-
variant: "raised",
|
|
403
|
-
className: "card-nav",
|
|
404
|
-
children: /* @__PURE__ */ jsxs("a", {
|
|
405
|
-
href: "#interactive",
|
|
406
|
-
children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
407
|
-
icon: /* @__PURE__ */ jsx(WalletIcon, {}),
|
|
408
|
-
title: "Payouts",
|
|
409
|
-
description: "Paid out £18,420.55 this month",
|
|
410
|
-
titleAs: "p",
|
|
411
|
-
style: { flex: 1 }
|
|
412
|
-
}), /* @__PURE__ */ jsx(CaretRightIcon, {
|
|
413
|
-
className: "card-nav__caret",
|
|
414
|
-
"aria-hidden": "true"
|
|
415
|
-
})]
|
|
416
|
-
})
|
|
417
|
-
})
|
|
418
|
-
})
|
|
419
|
-
}),
|
|
420
|
-
/* @__PURE__ */ jsxs(Note, {
|
|
421
|
-
title: "Why a link?",
|
|
422
|
-
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."]
|
|
423
|
-
})
|
|
424
|
-
]
|
|
425
|
-
}),
|
|
426
|
-
/* @__PURE__ */ jsx(Section, {
|
|
427
|
-
id: "both-themes",
|
|
428
|
-
title: "In both themes",
|
|
429
|
-
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." }),
|
|
430
|
-
children: /* @__PURE__ */ jsx(ThemePair, {
|
|
431
|
-
align: "fill",
|
|
432
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
433
|
-
className: "card-stack",
|
|
434
|
-
children: [
|
|
435
|
-
/* @__PURE__ */ jsx(LowStockCard, {}),
|
|
436
|
-
/* @__PURE__ */ jsx(DeliveryTipCard, {}),
|
|
437
|
-
/* @__PURE__ */ jsx("div", {
|
|
438
|
-
className: "card-ground",
|
|
439
|
-
children: /* @__PURE__ */ jsx(PayoutCard, { padding: "sm" })
|
|
440
|
-
})
|
|
441
|
-
]
|
|
442
|
-
})
|
|
443
|
-
})
|
|
444
|
-
}),
|
|
445
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
446
|
-
id: "guidelines",
|
|
447
|
-
title: "Guidelines",
|
|
448
|
-
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." }),
|
|
449
|
-
children: [
|
|
450
|
-
/* @__PURE__ */ jsx(DoDont, {
|
|
451
|
-
do: {
|
|
452
|
-
children: /* @__PURE__ */ jsxs(Card, {
|
|
453
|
-
padding: "sm",
|
|
454
|
-
className: "card-dd",
|
|
455
|
-
children: [/* @__PURE__ */ jsx(CardHeader, { title: "Recent orders" }), /* @__PURE__ */ jsxs(CardBody, {
|
|
456
|
-
className: "card-stock",
|
|
457
|
-
children: [
|
|
458
|
-
/* @__PURE__ */ jsxs("div", {
|
|
459
|
-
className: "card-stock__row",
|
|
460
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
461
|
-
className: "card-stock__name",
|
|
462
|
-
children: "#1048 Amara Okafor"
|
|
463
|
-
}), /* @__PURE__ */ jsx(Badge, {
|
|
464
|
-
size: "sm",
|
|
465
|
-
tone: "warning",
|
|
466
|
-
children: "Unfulfilled"
|
|
467
|
-
})]
|
|
468
|
-
}),
|
|
469
|
-
/* @__PURE__ */ jsx(Separator, {}),
|
|
470
|
-
/* @__PURE__ */ jsxs("div", {
|
|
471
|
-
className: "card-stock__row",
|
|
472
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
473
|
-
className: "card-stock__name",
|
|
474
|
-
children: "#1047 Callum Reid"
|
|
475
|
-
}), /* @__PURE__ */ jsx(Badge, {
|
|
476
|
-
size: "sm",
|
|
477
|
-
tone: "positive",
|
|
478
|
-
children: "Fulfilled"
|
|
479
|
-
})]
|
|
480
|
-
})
|
|
481
|
-
]
|
|
482
|
-
})]
|
|
483
|
-
}),
|
|
484
|
-
caption: "One card, its rows divided by hairlines."
|
|
485
|
-
},
|
|
486
|
-
dont: {
|
|
487
|
-
children: /* @__PURE__ */ jsxs(Card, {
|
|
488
|
-
padding: "sm",
|
|
489
|
-
className: "card-dd",
|
|
490
|
-
children: [
|
|
491
|
-
/* @__PURE__ */ jsx(CardHeader, { title: "Recent orders" }),
|
|
492
|
-
/* @__PURE__ */ jsx(Card, {
|
|
493
|
-
padding: "sm",
|
|
494
|
-
children: "#1048 Amara Okafor"
|
|
495
|
-
}),
|
|
496
|
-
/* @__PURE__ */ jsx(Card, {
|
|
497
|
-
padding: "sm",
|
|
498
|
-
children: "#1047 Callum Reid"
|
|
499
|
-
})
|
|
500
|
-
]
|
|
501
|
-
}),
|
|
502
|
-
caption: "Cards are never nested. Boxes inside boxes add edges without adding meaning."
|
|
503
|
-
}
|
|
504
|
-
}),
|
|
505
|
-
/* @__PURE__ */ jsx(DoDont, {
|
|
506
|
-
do: {
|
|
507
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
508
|
-
className: "card-ground",
|
|
509
|
-
children: /* @__PURE__ */ jsx(Card, {
|
|
510
|
-
variant: "raised",
|
|
511
|
-
padding: "sm",
|
|
512
|
-
children: /* @__PURE__ */ jsx(CardHeader, {
|
|
513
|
-
title: "Next payout",
|
|
514
|
-
description: "Friday 2 October"
|
|
515
|
-
})
|
|
516
|
-
})
|
|
517
|
-
}),
|
|
518
|
-
caption: "Raised cards sit on the porcelain ground."
|
|
519
|
-
},
|
|
520
|
-
dont: {
|
|
521
|
-
children: /* @__PURE__ */ jsx(Card, {
|
|
522
|
-
variant: "raised",
|
|
523
|
-
padding: "sm",
|
|
524
|
-
children: /* @__PURE__ */ jsx(CardHeader, {
|
|
525
|
-
title: "Next payout",
|
|
526
|
-
description: "Friday 2 October"
|
|
527
|
-
})
|
|
528
|
-
}),
|
|
529
|
-
caption: "On the canvas a shadow starts a second raised layer. The canvas is the one raised page: use outline or sunken on it."
|
|
530
|
-
}
|
|
531
|
-
}),
|
|
532
|
-
/* @__PURE__ */ jsx(Guidelines, { items: [
|
|
533
|
-
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
534
|
-
"Headline figures sit on a hairline strip, not in a row of cards. See",
|
|
535
|
-
" ",
|
|
536
|
-
/* @__PURE__ */ jsx(DocLink, {
|
|
537
|
-
to: "/components/figure-tabs",
|
|
538
|
-
children: "Figure tabs"
|
|
539
|
-
}),
|
|
540
|
-
"."
|
|
541
|
-
] }),
|
|
542
|
-
"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.",
|
|
543
|
-
"Name the card by what it is (\"Low stock\"), and let the description say why it matters now."
|
|
544
|
-
] })
|
|
545
|
-
]
|
|
546
|
-
}),
|
|
547
|
-
/* @__PURE__ */ jsx(Section, {
|
|
548
|
-
id: "accessibility",
|
|
549
|
-
title: "Accessibility",
|
|
550
|
-
children: /* @__PURE__ */ jsx(Guidelines, { items: [
|
|
551
|
-
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
552
|
-
"The header title is an ",
|
|
553
|
-
/* @__PURE__ */ jsx("code", { children: "h3" }),
|
|
554
|
-
" by default. Set ",
|
|
555
|
-
/* @__PURE__ */ jsx("code", { children: "titleAs" }),
|
|
556
|
-
" so headings follow the page outline, or to ",
|
|
557
|
-
/* @__PURE__ */ jsx("code", { children: "p" }),
|
|
558
|
-
" when the title is not a heading, such as inside a link card."
|
|
559
|
-
] }),
|
|
560
|
-
"The icon tile is decorative and hidden from assistive tech.",
|
|
561
|
-
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
562
|
-
/* @__PURE__ */ jsx("code", { children: "interactive" }),
|
|
563
|
-
" adds hover, press and focus styles only. Pair it with ",
|
|
564
|
-
/* @__PURE__ */ jsx("code", { children: "asChild" }),
|
|
565
|
-
" on a link (or a button) so the card can be reached by keyboard and is announced for what it does."
|
|
566
|
-
] }),
|
|
567
|
-
"Prefer a link. A button flattens everything inside it, so a heading inside is no longer a heading.",
|
|
568
|
-
"Keyboard focus draws a 2px teal ring 2px outside the card. The press dip is dropped under reduced motion."
|
|
569
|
-
] })
|
|
570
|
-
}),
|
|
571
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
572
|
-
id: "props",
|
|
573
|
-
title: "Props",
|
|
574
|
-
children: [
|
|
575
|
-
/* @__PURE__ */ jsx(PropsTable, {
|
|
576
|
-
title: "Card",
|
|
577
|
-
rows: [
|
|
578
|
-
{
|
|
579
|
-
name: "variant",
|
|
580
|
-
type: "'outline' | 'raised' | 'sunken'",
|
|
581
|
-
default: "'outline'",
|
|
582
|
-
description: "A hairline on the canvas colour; a soft shadow, for the ground; or set into the page."
|
|
583
|
-
},
|
|
584
|
-
{
|
|
585
|
-
name: "padding",
|
|
586
|
-
type: "'none' | 'sm' | 'md' | 'lg'",
|
|
587
|
-
default: "'md'",
|
|
588
|
-
description: "Inner spacing: 0, 16, 20 or 24px. The gap between parts follows: 0, 12, 16 or 20px."
|
|
589
|
-
},
|
|
590
|
-
{
|
|
591
|
-
name: "interactive",
|
|
592
|
-
type: "boolean",
|
|
593
|
-
default: "false",
|
|
594
|
-
description: "Hover, press and focus states for a card that is one target. Pair with asChild."
|
|
595
|
-
},
|
|
596
|
-
{
|
|
597
|
-
name: "asChild",
|
|
598
|
-
type: "boolean",
|
|
599
|
-
default: "false",
|
|
600
|
-
description: "Render the child element (a link or button) as the card."
|
|
601
|
-
}
|
|
602
|
-
]
|
|
603
|
-
}),
|
|
604
|
-
/* @__PURE__ */ jsx("p", {
|
|
605
|
-
className: "doc-section__description",
|
|
606
|
-
children: "Card also accepts every native div attribute."
|
|
607
|
-
}),
|
|
608
|
-
/* @__PURE__ */ jsx(PropsTable, {
|
|
609
|
-
title: "CardHeader",
|
|
610
|
-
rows: [
|
|
611
|
-
{
|
|
612
|
-
name: "title",
|
|
613
|
-
type: "ReactNode",
|
|
614
|
-
required: true,
|
|
615
|
-
description: "The card's name, in 15px semibold."
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
name: "description",
|
|
619
|
-
type: "ReactNode",
|
|
620
|
-
description: "One line under the title, in 13px secondary text."
|
|
621
|
-
},
|
|
622
|
-
{
|
|
623
|
-
name: "actions",
|
|
624
|
-
type: "ReactNode",
|
|
625
|
-
description: "Controls on the right. Small controls centre on the title line."
|
|
626
|
-
},
|
|
627
|
-
{
|
|
628
|
-
name: "icon",
|
|
629
|
-
type: "ReactNode",
|
|
630
|
-
description: "An icon in a 32px tile before the title. Decorative."
|
|
631
|
-
},
|
|
632
|
-
{
|
|
633
|
-
name: "titleAs",
|
|
634
|
-
type: "'h2' | 'h3' | 'h4' | 'p' | 'div'",
|
|
635
|
-
default: "'h3'",
|
|
636
|
-
description: "Element for the title."
|
|
637
|
-
},
|
|
638
|
-
{
|
|
639
|
-
name: "children",
|
|
640
|
-
type: "ReactNode",
|
|
641
|
-
description: "Extra content under the description, inside the heading block."
|
|
642
|
-
}
|
|
643
|
-
]
|
|
644
|
-
}),
|
|
645
|
-
/* @__PURE__ */ jsx(PropsTable, {
|
|
646
|
-
title: "CardBody and CardFooter",
|
|
647
|
-
rows: [{
|
|
648
|
-
name: "children",
|
|
649
|
-
type: "ReactNode",
|
|
650
|
-
description: "The content. Both accept every native div attribute; the footer right-aligns and wraps its actions."
|
|
651
|
-
}]
|
|
652
|
-
})
|
|
653
|
-
]
|
|
654
|
-
})
|
|
655
|
-
]
|
|
656
|
-
});
|
|
657
|
-
}
|
|
658
|
-
//#endregion
|
|
659
|
-
export { Page, Preview };
|