@orbitcommerce/constellation-docs 1.0.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs.css +14764 -2237
- package/dist/index.js +2 -2
- package/dist/pages/{Playground-CNbBbErC.js → Playground-Mk1yIWXb.js} +2 -2
- package/dist/pages/_address-data-L9BR499w.js +161 -0
- package/dist/pages/_builder-demo-C0eJUmPU.js +282 -0
- package/dist/pages/_card-art-0be5ncyV.js +18 -0
- package/dist/pages/_conversation-samples-Bq7cn-4d.js +70 -0
- package/dist/pages/{_figures-data-BDmScEny.js → _figures-data-DaDvB7Nm.js} +5 -5
- package/dist/pages/_kpi-examples-DeGCBB9T.js +208 -0
- package/dist/pages/{_overlays-specimens-Dpn6oiyH.js → _overlays-specimens-bawR331Z.js} +33 -23
- package/dist/pages/_preview-specimens-DKQC9HAo.js +153 -0
- package/dist/pages/accordion-Sg0TUqxB.js +1036 -0
- package/dist/pages/address-autocomplete-DP0PUOlK.js +360 -0
- package/dist/pages/address-block-BvxQWBTy.js +403 -0
- package/dist/pages/address-fields-CwSqro3W.js +277 -0
- package/dist/pages/ai-highlight-D3x2vD83.js +642 -0
- package/dist/pages/{alert-BD4e6QTh.js → alert-D3i7xZTU.js} +195 -50
- package/dist/pages/anchored-overlay-BV0OCu2Q.js +788 -0
- package/dist/pages/{app-shell-KbA-nRqZ.js → app-shell-D4hdlHps.js} +133 -54
- package/dist/pages/{area-chart-B91dLcGo.js → area-chart-BEWFwiB2.js} +183 -27
- package/dist/pages/{avatar-DPPHXJAu.js → avatar-BFEqQViw.js} +194 -12
- package/dist/pages/avatar-upload-BDCzJfyN.js +484 -0
- package/dist/pages/{badge-C9JR0thI.js → badge-0-PyMrih.js} +441 -135
- package/dist/pages/bar-chart-DkLogYlt.js +1060 -0
- package/dist/pages/bar-fold-B-3XeIDZ.js +360 -0
- package/dist/pages/board-card-D2tZY_mU.js +415 -0
- package/dist/pages/brand-mark-BqiLvFSR.js +417 -0
- package/dist/pages/{button-D3V912P4.js → button-DAyfssDY.js} +276 -79
- package/dist/pages/{calendar-DSDZ9nRH.js → calendar-Ds7KsgSI.js} +69 -17
- package/dist/pages/canvas-stage-1KiPspkX.js +472 -0
- package/dist/pages/card-CXZ3V1d4.js +1612 -0
- package/dist/pages/caret-suggestions-oHI6QvqW.js +526 -0
- package/dist/pages/chart-legend-B20AbakD.js +724 -0
- package/dist/pages/chat-composer-CwzUJYIa.js +437 -0
- package/dist/pages/checkbox-BG9Zkb6j.js +1581 -0
- package/dist/pages/checklist-card-DEyykVFS.js +783 -0
- package/dist/pages/chip-Ck-o3Ui6.js +839 -0
- package/dist/pages/chip-list-k1LxXuCi.js +414 -0
- package/dist/pages/clamp-text-n-iE8RDR.js +203 -0
- package/dist/pages/coachmark-Be2ghobT.js +366 -0
- package/dist/pages/code-block-Dv_Y5GYq.js +622 -0
- package/dist/pages/collab-field-CfqqK7d2.js +696 -0
- package/dist/pages/color-field-CZpfcA-A.js +1127 -0
- package/dist/pages/{colour-BwuO8xAv.js → colour-q2ntvI0w.js} +496 -20
- package/dist/pages/column-mapper-TsTG39cl.js +502 -0
- package/dist/pages/combobox-DvK2j5tI.js +1334 -0
- package/dist/pages/{command-palette-xAD7fOg6.js → command-palette-CJ7uBA04.js} +201 -58
- package/dist/pages/comment-box-CDSGYhr5.js +346 -0
- package/dist/pages/composer-D4B0NgpA.js +689 -0
- package/dist/pages/condition-builder-BZy2ZGXe.js +715 -0
- package/dist/pages/conflict-chooser-C--_9UIS.js +210 -0
- package/dist/pages/context-menu-F9DV30ia.js +487 -0
- package/dist/pages/copy-button-Cn7WiKRF.js +568 -0
- package/dist/pages/copy-field-D3Xt3Jq6.js +511 -0
- package/dist/pages/danger-zone-Db_UUeiP.js +564 -0
- package/dist/pages/date-input-GOW067EB.js +956 -0
- package/dist/pages/{date-picker-BYSa816m.js → date-picker-GdBciR99.js} +186 -38
- package/dist/pages/date-time-BLKCXtVZ.js +678 -0
- package/dist/pages/{delta-CtAo0eIM.js → delta-CNAGv8JY.js} +266 -61
- package/dist/pages/description-list-BPeXn1eW.js +1268 -0
- package/dist/pages/device-switcher-BCaN99c1.js +554 -0
- package/dist/pages/dialog-CRpkRC98.js +3164 -0
- package/dist/pages/{docs-BNOb7AqR.js → docs-lM2UBSir.js} +20 -15
- package/dist/pages/doodle-nzkqi2UI.js +201 -0
- package/dist/pages/drag-ghost-B6kpzC3O.js +426 -0
- package/dist/pages/drill-menu-cskH5mol.js +490 -0
- package/dist/pages/dropzone-DOY_Rhw0.js +1069 -0
- package/dist/pages/element-toolbar-DZIhXlCJ.js +498 -0
- package/dist/pages/emoji-picker-CqaWaffD.js +235 -0
- package/dist/pages/empty-state-4U2txFpI.js +1113 -0
- package/dist/pages/facet-filters-McbBeY9e.js +353 -0
- package/dist/pages/figure-D-HF5vCj.js +563 -0
- package/dist/pages/figure-strip-hg7txTc3.js +1381 -0
- package/dist/pages/{figure-tabs-CoPFzzKz.js → figure-tabs-QOeQMY6N.js} +153 -35
- package/dist/pages/file-chip-DMDjtlqQ.js +738 -0
- package/dist/pages/filter-pill-DzqNOsD4.js +1295 -0
- package/dist/pages/font-picker-Bqhu0QMh.js +416 -0
- package/dist/pages/form-grid-BfWCVlie.js +692 -0
- package/dist/pages/gallery-BBk2EOri.js +453 -0
- package/dist/pages/gif-picker-CnoDTCaL.js +270 -0
- package/dist/pages/gradient-editor-Bqxp7Fxj.js +378 -0
- package/dist/pages/grouped-checklist-gNZ0tBKU.js +477 -0
- package/dist/pages/heatmap-BohgIcNk.js +507 -0
- package/dist/pages/highlight-text-BfxzfmvS.js +287 -0
- package/dist/pages/{home-dashboard-CFQwDtC9.js → home-dashboard-CxPmvduE.js} +21 -18
- package/dist/pages/hosted-embed-Jef3aIMP.js +163 -0
- package/dist/pages/hosted-field-BLh-53AE.js +208 -0
- package/dist/pages/hosted-field-DEpI4lVS.js +514 -0
- package/dist/pages/{icon-button-C9eSVPPW.js → icon-button-Bu4Gj5sy.js} +370 -31
- package/dist/pages/icon-picker-DEyoMUTh.js +291 -0
- package/dist/pages/icon-tile-DcgxyXPF.js +592 -0
- package/dist/pages/{icons-sxkTs5Ob.js → icons-CJ9Aar3d.js} +315 -52
- package/dist/pages/image-cropper-NyougqLH.js +466 -0
- package/dist/pages/image-field-7knBv4mJ.js +567 -0
- package/dist/pages/import-result-CmTtGXW_.js +486 -0
- package/dist/pages/inline-confirm-CEcI5Lxo.js +327 -0
- package/dist/pages/inline-edit-Ba39SzhM.js +1125 -0
- package/dist/pages/input-CzLCzfyx.js +2372 -0
- package/dist/pages/{installation-DpsX8G_n.js → installation-DRUWNVHP.js} +112 -29
- package/dist/pages/job-indicator-DOXWbFdl.js +755 -0
- package/dist/pages/kanban-Dy9sPAI0.js +740 -0
- package/dist/pages/{kbd-cNfDoikz.js → kbd-UNj4zqxn.js} +15 -14
- package/dist/pages/layout-primitives-CPRaZeyt.js +483 -0
- package/dist/pages/line-chart-CntWxeMF.js +1117 -0
- package/dist/pages/link-CXqvAg9z.js +689 -0
- package/dist/pages/link-picker-BMFGCC67.js +478 -0
- package/dist/pages/link-row-x8yaUuWc.js +595 -0
- package/dist/pages/{live-globe-ClvLn9Lb.js → live-globe-95ROMhGQ.js} +191 -47
- package/dist/pages/loading-overlay-BeGuXM9G.js +456 -0
- package/dist/pages/loading-state-BNbCo51C.js +556 -0
- package/dist/pages/log-viewer-BQz8I_a2.js +503 -0
- package/dist/pages/{logo-BfGF1Pq9.js → logo-D3a3QGKJ.js} +13 -13
- package/dist/pages/lottie_light-CxEH8eiR.js +9116 -0
- package/dist/pages/markdown-Ied72vMT.js +237 -0
- package/dist/pages/markdown-field-BfnIEKZH.js +193 -0
- package/dist/pages/media-banner-DkStCia0.js +233 -0
- package/dist/pages/{menu-by2sgQ09.js → menu-NrLYKqKp.js} +623 -109
- package/dist/pages/message-thread-Bo4zbxqu.js +731 -0
- package/dist/pages/meta-line-D5p2TycR.js +371 -0
- package/dist/pages/model-viewer-BfokvHoc.js +60288 -0
- package/dist/pages/model-viewer-C8PFO8wk.js +577 -0
- package/dist/pages/month-calendar-T1vw9Rup.js +457 -0
- package/dist/pages/{motion-BvTGc2Dk.js → motion-CrXtiBvA.js} +20 -10
- package/dist/pages/number-input-CuyMZg18.js +968 -0
- package/dist/pages/orbit-loader-DeVBtkFE.js +219 -0
- package/dist/pages/{orbit-spinner-Dil1Z3Oy.js → orbit-spinner-Dxv5qAhr.js} +30 -14
- package/dist/pages/otp-input-CVRoX1mw.js +591 -0
- package/dist/pages/{overview-BPEbZQ6g.js → overview-BSfEqHY8.js} +4 -4
- package/dist/pages/package-dimensions-DFCyZj_T.js +192 -0
- package/dist/pages/{pagination-BBUnGvv5.js → pagination-C1EgVtW4.js} +74 -29
- package/dist/pages/palette-tile-X9ZXu2Z0.js +414 -0
- package/dist/pages/password-field-DHEQKyUC.js +912 -0
- package/dist/pages/person-cell-BmjbADBz.js +564 -0
- package/dist/pages/phone-input-B3G7Qpb2.js +747 -0
- package/dist/pages/plan-card-DRaA6RuB.js +621 -0
- package/dist/pages/plan-card-DtloWvMh.js +258 -0
- package/dist/pages/plan-comparison-BVIGTtbd.js +559 -0
- package/dist/pages/plan-grid-BCPvtP8J.js +251 -0
- package/dist/pages/point-list-BbPmZjsm.js +222 -0
- package/dist/pages/{popover-Db1gLDpb.js → popover-C3Oar9D5.js} +76 -14
- package/dist/pages/presence-avatars-CRZIk8n9.js +328 -0
- package/dist/pages/preview-frame-Bcwk0y_Q.js +1631 -0
- package/dist/pages/price-CRBLoa9h.js +604 -0
- package/dist/pages/{principles-CeAIOIdt.js → principles-pnDyfHpK.js} +9 -9
- package/dist/pages/print-page-BkLv6bW8.js +513 -0
- package/dist/pages/profile-hero-CC9dUzuN.js +498 -0
- package/dist/pages/progress-CP_awmo4.js +904 -0
- package/dist/pages/progress-ring-JuOAwk2T.js +576 -0
- package/dist/pages/{radio-group-CkdBWWfG.js → radio-group-CbiibLwn.js} +581 -18
- package/dist/pages/radius-control-B2kRA2Ch.js +441 -0
- package/dist/pages/rating-CweKN2SX.js +471 -0
- package/dist/pages/record-layout-DUP_X0RL.js +719 -0
- package/dist/pages/record-pager-y9D7JFgb.js +278 -0
- package/dist/pages/registry-CNR7zpf7.js +594 -0
- package/dist/pages/{release-Dvo684UJ.js → release-DYBCY7jm.js} +4 -1
- package/dist/pages/repeater-BRZYKRQa.js +1351 -0
- package/dist/pages/reply-feedback-BDnHprla.js +192 -0
- package/dist/pages/reveal-BygENBbL.js +460 -0
- package/dist/pages/rich-text-DOFQZEpT.js +156 -0
- package/dist/pages/rich-text-editor-BhIM20JI.js +1265 -0
- package/dist/pages/rolldown-runtime-CbKu08Hx.js +25 -0
- package/dist/pages/{rolling-number-qmvH84Mq.js → rolling-number-GR3Cyfpz.js} +12 -12
- package/dist/pages/row-list-Dl6CYhC-.js +1565 -0
- package/dist/pages/rule-list-DTCmIMpT.js +648 -0
- package/dist/pages/save-status-B5KkyMZP.js +378 -0
- package/dist/pages/schedule-YycI95O1.js +243 -0
- package/dist/pages/scroll-area-B2sGm23Q.js +423 -0
- package/dist/pages/{search-field-BN7MWGQ4.js → search-field-D1uG7R6A.js} +15 -15
- package/dist/pages/search-menu-DMuXyUUW.js +580 -0
- package/dist/pages/secret-field-Dj9x3LL8.js +337 -0
- package/dist/pages/section-rail-BtTCETS5.js +637 -0
- package/dist/pages/section-v2Pubup9.js +639 -0
- package/dist/pages/{segmented-control-CTbIpRBW.js → segmented-control-D-FB1K1T.js} +450 -37
- package/dist/pages/{select-DguELoRR.js → select-DZ43NpOm.js} +22 -17
- package/dist/pages/selection-chrome-Czcs6RN6.js +437 -0
- package/dist/pages/{separator-CPZub9pv.js → separator-CFwqRvfO.js} +99 -22
- package/dist/pages/serp-preview-BGwORjmo.js +346 -0
- package/dist/pages/setting-row-Bt-dZV8H.js +913 -0
- package/dist/pages/{shape-DKvA0YKr.js → shape-DzniHAVT.js} +10 -10
- package/dist/pages/share-list-D4wgBxKN.js +926 -0
- package/dist/pages/side-panel-CCtkrZjs.js +811 -0
- package/dist/pages/site-preview-Dj1hM2Yo.js +353 -0
- package/dist/pages/skeleton-C1F5HkAu.js +1325 -0
- package/dist/pages/skip-link-BxznhSkz.js +252 -0
- package/dist/pages/slider-CAoPURKD.js +774 -0
- package/dist/pages/sortable-card-Sr44uCpI.js +424 -0
- package/dist/pages/sortable-list-DUAleYE1.js +1298 -0
- package/dist/pages/sortable-tree-BLzK-hTE.js +737 -0
- package/dist/pages/spacing-box-CtuvzxQu.js +550 -0
- package/dist/pages/{sparkline-DMMYGbHn.js → sparkline-D3aavCly.js} +301 -22
- package/dist/pages/split-bar-DYgZnFID.js +414 -0
- package/dist/pages/split-button-Be08-VI-.js +335 -0
- package/dist/pages/split-pane-lSNZgTKt.js +523 -0
- package/dist/pages/status-badge-DOdNhmzn.js +1074 -0
- package/dist/pages/status-checklist-CWkjCZIC.js +1152 -0
- package/dist/pages/status-dot-D99gAGsV.js +567 -0
- package/dist/pages/stepper-CxKTbEA-.js +1093 -0
- package/dist/pages/success-mark-CqFTOBEu.js +142 -0
- package/dist/pages/swatch-H_kNvHuC.js +565 -0
- package/dist/pages/{switch-B-Qe4kcT.js → switch-C93K6j9h.js} +151 -51
- package/dist/pages/table-mq_pNXza.js +3232 -0
- package/dist/pages/{tabs-B4M-usCV.js → tabs-Cf4MZ8Fq.js} +257 -21
- package/dist/pages/tag-input-BjZWKKRJ.js +1307 -0
- package/dist/pages/task-card-Dv0sR1-w.js +295 -0
- package/dist/pages/{textarea-fTuUZRQb.js → textarea-CCM-SnGN.js} +271 -15
- package/dist/pages/thumbnail-DwFJL_k1.js +1147 -0
- package/dist/pages/time-input-CA9-uZAa.js +442 -0
- package/dist/pages/time-zone-select-CEtMXVYO.js +296 -0
- package/dist/pages/timeline-BsMUTlpR.js +1798 -0
- package/dist/pages/{toast-CKP03zjy.js → toast-zXLRiMRT.js} +240 -25
- package/dist/pages/tool-rail-B1AbTMCP.js +355 -0
- package/dist/pages/toolbar-B9l_fHKy.js +754 -0
- package/dist/pages/{tooltip-CBYil3kt.js → tooltip-LHtCUkF-.js} +162 -33
- package/dist/pages/translation-field-CTRXiF2N.js +251 -0
- package/dist/pages/tree-checklist-CJj3OcLg.js +451 -0
- package/dist/pages/tree-select-DU1qXHy_.js +492 -0
- package/dist/pages/tree-view-g_RjLtAb.js +739 -0
- package/dist/pages/{typography-PCbg8Bhg.js → typography-BSijtiRl.js} +153 -12
- package/dist/pages/unit-input-Dml4fjmK.js +659 -0
- package/dist/pages/upload-rules-yozEzSah.js +419 -0
- package/dist/pages/url-upload-input-SSnMgfpA.js +307 -0
- package/dist/pages/value-change-CnubDKyO.js +489 -0
- package/dist/pages/weekly-hours-i2EpsmTx.js +287 -0
- package/dist/pages/widget-preview-CUJMyZ_k.js +625 -0
- package/dist/pages/working-status-CENemSsw.js +389 -0
- package/manifest.json +10989 -1108
- package/package.json +3 -3
- package/dist/pages/card-DUggbis3.js +0 -659
- package/dist/pages/checkbox-DwimQaK3.js +0 -365
- package/dist/pages/dialog-BRAf4LMh.js +0 -1451
- package/dist/pages/empty-state-C-mLrXW2.js +0 -417
- package/dist/pages/input-KF9Gkawf.js +0 -1093
- package/dist/pages/registry-CroHzK9I.js +0 -244
- package/dist/pages/skeleton-DLuBhP46.js +0 -561
- package/dist/pages/table-AMoODng4.js +0 -607
|
@@ -0,0 +1,639 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as DocLink } from "./host-B6znjEgQ.js";
|
|
3
|
+
import { a as DocTable, d as Section$1, i as DocPage, m as ThemePair, n as CodeBlock$1, o as Example, p as SubSection, r as DoDont, s as Guidelines, u as PropsTable } from "./docs-lM2UBSir.js";
|
|
4
|
+
import { useRef, useState } from "react";
|
|
5
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Badge, Button, Card, IconButton, Section } from "@orbitcommerce/constellation";
|
|
7
|
+
import { ArrowRightIcon, PaintBrushIcon, PencilSimpleIcon, PlusIcon, PuzzlePieceIcon } from "@orbitcommerce/constellation/icons";
|
|
8
|
+
//#region src/pages/components/section.tsx
|
|
9
|
+
function Preview() {
|
|
10
|
+
return /* @__PURE__ */ jsx("div", {
|
|
11
|
+
className: "section-preview",
|
|
12
|
+
children: /* @__PURE__ */ jsx(Section, {
|
|
13
|
+
title: "Order summary",
|
|
14
|
+
actions: /* @__PURE__ */ jsx(Badge, {
|
|
15
|
+
tone: "positive",
|
|
16
|
+
size: "sm",
|
|
17
|
+
children: "Paid"
|
|
18
|
+
}),
|
|
19
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
20
|
+
className: "section-lines",
|
|
21
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
22
|
+
className: "section-line",
|
|
23
|
+
children: [/* @__PURE__ */ jsx("span", { children: "Subtotal" }), /* @__PURE__ */ jsx("span", { children: "£240.00" })]
|
|
24
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
25
|
+
className: "section-line",
|
|
26
|
+
children: [/* @__PURE__ */ jsx("span", { children: "Delivery" }), /* @__PURE__ */ jsx("span", { children: "£9.50" })]
|
|
27
|
+
})]
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/** Invented figures, set the way a summary sets them: label left, figure right, tabular. */
|
|
33
|
+
function Lines({ rows }) {
|
|
34
|
+
return /* @__PURE__ */ jsx("div", {
|
|
35
|
+
className: "section-lines",
|
|
36
|
+
children: rows.map(([label, figure]) => /* @__PURE__ */ jsxs("p", {
|
|
37
|
+
className: "section-line",
|
|
38
|
+
children: [/* @__PURE__ */ jsx("span", { children: label }), /* @__PURE__ */ jsx("span", { children: figure })]
|
|
39
|
+
}, label))
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function Block({ height = 56, children }) {
|
|
43
|
+
return /* @__PURE__ */ jsx("div", {
|
|
44
|
+
className: "section-block",
|
|
45
|
+
style: { height },
|
|
46
|
+
children
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function RecordPage() {
|
|
50
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
51
|
+
className: "section-record",
|
|
52
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
53
|
+
className: "section-record__main",
|
|
54
|
+
children: [/* @__PURE__ */ jsx(Section, {
|
|
55
|
+
title: "Order items",
|
|
56
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
57
|
+
size: "sm",
|
|
58
|
+
variant: "ghost",
|
|
59
|
+
icon: /* @__PURE__ */ jsx(PlusIcon, {}),
|
|
60
|
+
children: "Add item"
|
|
61
|
+
}),
|
|
62
|
+
rule: "none",
|
|
63
|
+
children: /* @__PURE__ */ jsx(Lines, { rows: [["Arden ergonomic chair, black × 2", "£398.00"], ["Oak veneer desk, 1600mm × 1", "£349.00"]] })
|
|
64
|
+
}), /* @__PURE__ */ jsx(Section, {
|
|
65
|
+
title: "Order summary",
|
|
66
|
+
children: /* @__PURE__ */ jsx(Lines, { rows: [
|
|
67
|
+
["Subtotal", "£747.00"],
|
|
68
|
+
["Delivery", "£9.50"],
|
|
69
|
+
["Total", "£756.50"]
|
|
70
|
+
] })
|
|
71
|
+
})]
|
|
72
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
73
|
+
className: "section-record__side",
|
|
74
|
+
children: [/* @__PURE__ */ jsx(Section, {
|
|
75
|
+
size: "side",
|
|
76
|
+
title: "Customer",
|
|
77
|
+
actions: /* @__PURE__ */ jsx(IconButton, {
|
|
78
|
+
label: "Edit customer",
|
|
79
|
+
size: "sm",
|
|
80
|
+
children: /* @__PURE__ */ jsx(PencilSimpleIcon, {})
|
|
81
|
+
}),
|
|
82
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
83
|
+
className: "section-prose",
|
|
84
|
+
children: "Priya Shah, Harbour Desk Co"
|
|
85
|
+
})
|
|
86
|
+
}), /* @__PURE__ */ jsx(Section, {
|
|
87
|
+
size: "side",
|
|
88
|
+
title: "Tags",
|
|
89
|
+
titleAside: /* @__PURE__ */ jsx(Badge, {
|
|
90
|
+
size: "sm",
|
|
91
|
+
children: "2"
|
|
92
|
+
}),
|
|
93
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
94
|
+
className: "section-prose",
|
|
95
|
+
children: "trade, repeat"
|
|
96
|
+
})
|
|
97
|
+
})]
|
|
98
|
+
})]
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function Heads() {
|
|
102
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
103
|
+
className: "section-stack",
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ jsx(Section, {
|
|
106
|
+
title: "Title only",
|
|
107
|
+
children: /* @__PURE__ */ jsx(Block, { height: 40 })
|
|
108
|
+
}),
|
|
109
|
+
/* @__PURE__ */ jsx(Section, {
|
|
110
|
+
title: "With a description",
|
|
111
|
+
description: "One quiet sentence under the title.",
|
|
112
|
+
children: /* @__PURE__ */ jsx(Block, { height: 40 })
|
|
113
|
+
}),
|
|
114
|
+
/* @__PURE__ */ jsx(Section, {
|
|
115
|
+
title: "Installed plugins",
|
|
116
|
+
titleAside: /* @__PURE__ */ jsx(Badge, {
|
|
117
|
+
size: "sm",
|
|
118
|
+
children: "4"
|
|
119
|
+
}),
|
|
120
|
+
children: /* @__PURE__ */ jsx(Block, { height: 40 })
|
|
121
|
+
}),
|
|
122
|
+
/* @__PURE__ */ jsx(Section, {
|
|
123
|
+
title: "Explore plugins",
|
|
124
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
125
|
+
size: "sm",
|
|
126
|
+
variant: "ghost",
|
|
127
|
+
iconEnd: /* @__PURE__ */ jsx(ArrowRightIcon, {}),
|
|
128
|
+
children: "View all"
|
|
129
|
+
}),
|
|
130
|
+
children: /* @__PURE__ */ jsx(Block, { height: 40 })
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ jsx(Section, {
|
|
133
|
+
title: "Recent orders",
|
|
134
|
+
description: "The last five, newest first.",
|
|
135
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
136
|
+
size: "sm",
|
|
137
|
+
variant: "ghost",
|
|
138
|
+
iconEnd: /* @__PURE__ */ jsx(ArrowRightIcon, {}),
|
|
139
|
+
children: "View all"
|
|
140
|
+
}),
|
|
141
|
+
children: /* @__PURE__ */ jsx(Block, { height: 40 })
|
|
142
|
+
})
|
|
143
|
+
]
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
function Sizes() {
|
|
147
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
148
|
+
className: "section-stack",
|
|
149
|
+
children: [
|
|
150
|
+
/* @__PURE__ */ jsx(Section, {
|
|
151
|
+
size: "page",
|
|
152
|
+
title: "Quick actions",
|
|
153
|
+
children: /* @__PURE__ */ jsx(Block, {})
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ jsx(Section, {
|
|
156
|
+
size: "main",
|
|
157
|
+
title: "Order summary",
|
|
158
|
+
children: /* @__PURE__ */ jsx(Block, {})
|
|
159
|
+
}),
|
|
160
|
+
/* @__PURE__ */ jsx("div", {
|
|
161
|
+
className: "section-side-demo",
|
|
162
|
+
children: /* @__PURE__ */ jsx(Section, {
|
|
163
|
+
size: "side",
|
|
164
|
+
title: "Customer",
|
|
165
|
+
children: /* @__PURE__ */ jsx(Block, {})
|
|
166
|
+
})
|
|
167
|
+
})
|
|
168
|
+
]
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
function Rules() {
|
|
172
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
173
|
+
className: "section-stack",
|
|
174
|
+
children: [
|
|
175
|
+
/* @__PURE__ */ jsx(Section, {
|
|
176
|
+
title: "Rule below",
|
|
177
|
+
description: "The default: the hairline sits under the head.",
|
|
178
|
+
children: /* @__PURE__ */ jsx(Block, { height: 40 })
|
|
179
|
+
}),
|
|
180
|
+
/* @__PURE__ */ jsx(Section, {
|
|
181
|
+
rule: "above",
|
|
182
|
+
title: "Rule above",
|
|
183
|
+
description: "The hairline sits over the section, then the head. For work areas that follow one another.",
|
|
184
|
+
children: /* @__PURE__ */ jsx(Block, { height: 40 })
|
|
185
|
+
}),
|
|
186
|
+
/* @__PURE__ */ jsx(Section, {
|
|
187
|
+
rule: "none",
|
|
188
|
+
title: "No rule",
|
|
189
|
+
description: "Nothing under the head: the content follows it, as a table does.",
|
|
190
|
+
children: /* @__PURE__ */ jsx(Block, { height: 40 })
|
|
191
|
+
})
|
|
192
|
+
]
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
function SendFocus() {
|
|
196
|
+
const heading = useRef(null);
|
|
197
|
+
const [plugins, setPlugins] = useState([
|
|
198
|
+
"Courier labels",
|
|
199
|
+
"Stock alerts",
|
|
200
|
+
"Review requests"
|
|
201
|
+
]);
|
|
202
|
+
return /* @__PURE__ */ jsx("div", {
|
|
203
|
+
className: "section-focus",
|
|
204
|
+
children: /* @__PURE__ */ jsx(Section, {
|
|
205
|
+
title: "Installed plugins",
|
|
206
|
+
titleRef: heading,
|
|
207
|
+
titleAside: /* @__PURE__ */ jsx(Badge, {
|
|
208
|
+
size: "sm",
|
|
209
|
+
children: plugins.length
|
|
210
|
+
}),
|
|
211
|
+
children: /* @__PURE__ */ jsx("ul", {
|
|
212
|
+
className: "section-list",
|
|
213
|
+
children: plugins.map((name) => /* @__PURE__ */ jsxs("li", { children: [/* @__PURE__ */ jsx("span", { children: name }), /* @__PURE__ */ jsx(Button, {
|
|
214
|
+
size: "xs",
|
|
215
|
+
variant: "ghost",
|
|
216
|
+
onClick: () => {
|
|
217
|
+
setPlugins((was) => was.filter((entry) => entry !== name));
|
|
218
|
+
heading.current?.focus();
|
|
219
|
+
},
|
|
220
|
+
children: "Uninstall"
|
|
221
|
+
})] }, name))
|
|
222
|
+
})
|
|
223
|
+
})
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
function Page() {
|
|
227
|
+
return /* @__PURE__ */ jsxs(DocPage, {
|
|
228
|
+
title: "Section",
|
|
229
|
+
status: "new",
|
|
230
|
+
importNames: ["Section"],
|
|
231
|
+
lead: "A part of a page on the canvas with no box round it: a headline over a hairline, then the content. Record and settings pages stack these, so nothing nests a card inside a card. Reach for it where a page has several parts and a card would be one box too many.",
|
|
232
|
+
children: [
|
|
233
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
234
|
+
id: "record",
|
|
235
|
+
title: "On a record page",
|
|
236
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
237
|
+
"A record's main column holds sections with a Sora headline, and its side column the quieter ones with a smaller Geist headline. The sections carry no space of their own: the page spaces them (44px in the main column, 36px in the side one), which is what ",
|
|
238
|
+
/* @__PURE__ */ jsx("code", { children: "RecordLayout" }),
|
|
239
|
+
" does for you."
|
|
240
|
+
] }),
|
|
241
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
242
|
+
align: "fill",
|
|
243
|
+
code: `
|
|
244
|
+
<Section title="Order items" rule="none" actions={<Button size="sm" variant="ghost" icon={<PlusIcon />}>Add item</Button>}>…</Section>
|
|
245
|
+
<Section title="Order summary">…</Section>
|
|
246
|
+
|
|
247
|
+
<Section size="side" title="Customer" actions={<IconButton label="Edit customer" size="sm"><PencilSimpleIcon /></IconButton>}>…</Section>
|
|
248
|
+
<Section size="side" title="Tags" titleAside={<Badge size="sm">2</Badge>}>…</Section>`,
|
|
249
|
+
children: /* @__PURE__ */ jsx(RecordPage, {})
|
|
250
|
+
})
|
|
251
|
+
}),
|
|
252
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
253
|
+
id: "sizes",
|
|
254
|
+
title: "Sizes",
|
|
255
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
256
|
+
/* @__PURE__ */ jsx("code", { children: "main" }),
|
|
257
|
+
" (default) is a Sora 16px headline, for a record's main column. ",
|
|
258
|
+
/* @__PURE__ */ jsx("code", { children: "side" }),
|
|
259
|
+
" is a Geist 14px headline and a tighter head, for its side column. ",
|
|
260
|
+
/* @__PURE__ */ jsx("code", { children: "page" }),
|
|
261
|
+
" is a Sora 20px headline, for the sections that make up a whole page, such as a storefront overview."
|
|
262
|
+
] }),
|
|
263
|
+
children: [/* @__PURE__ */ jsx(Example, {
|
|
264
|
+
align: "fill",
|
|
265
|
+
code: `
|
|
266
|
+
<Section size="page" title="Quick actions">…</Section>
|
|
267
|
+
<Section size="main" title="Order summary">…</Section>
|
|
268
|
+
<Section size="side" title="Customer">…</Section>`,
|
|
269
|
+
children: /* @__PURE__ */ jsx(Sizes, {})
|
|
270
|
+
}), /* @__PURE__ */ jsx(DocTable, {
|
|
271
|
+
columns: [
|
|
272
|
+
"Size",
|
|
273
|
+
"Headline",
|
|
274
|
+
"Head",
|
|
275
|
+
"Use it for"
|
|
276
|
+
],
|
|
277
|
+
rows: [
|
|
278
|
+
[
|
|
279
|
+
/* @__PURE__ */ jsx("code", { children: "page" }),
|
|
280
|
+
"Sora 20px, weight 600",
|
|
281
|
+
"12px above the hairline, 8px below",
|
|
282
|
+
"The sections that make up a page"
|
|
283
|
+
],
|
|
284
|
+
[
|
|
285
|
+
/* @__PURE__ */ jsx("code", { children: "main" }),
|
|
286
|
+
"Sora 16px, weight 600",
|
|
287
|
+
"12px above the hairline, 14px below",
|
|
288
|
+
"A record's main column"
|
|
289
|
+
],
|
|
290
|
+
[
|
|
291
|
+
/* @__PURE__ */ jsx("code", { children: "side" }),
|
|
292
|
+
"Geist 14px, weight 600",
|
|
293
|
+
"10px above the hairline, 12px below",
|
|
294
|
+
"A record's side column"
|
|
295
|
+
]
|
|
296
|
+
]
|
|
297
|
+
})]
|
|
298
|
+
}),
|
|
299
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
300
|
+
id: "heads",
|
|
301
|
+
title: "The head",
|
|
302
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
303
|
+
"The head holds the title, an optional sentence, something set beside the title (a count badge, a status) and, at the right, the section's actions: a quiet link, an icon button or two, one small button. Small buttons hang a little over the head's edges, so they do not make it taller, and stay on the title's line when a sentence sits under it. A ghost action's words end on the content's edge. In a column too narrow to keep the title 7rem beside them, the actions drop under the title and its sentence, at the start, as a",
|
|
304
|
+
" ",
|
|
305
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
306
|
+
to: "/components/card#narrow",
|
|
307
|
+
children: "card's header"
|
|
308
|
+
}),
|
|
309
|
+
" does."
|
|
310
|
+
] }),
|
|
311
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
312
|
+
align: "fill",
|
|
313
|
+
code: `
|
|
314
|
+
<Section title="Title only">…</Section>
|
|
315
|
+
<Section title="With a description" description="One quiet sentence under the title.">…</Section>
|
|
316
|
+
<Section title="Installed plugins" titleAside={<Badge size="sm">4</Badge>}>…</Section>
|
|
317
|
+
<Section title="Explore plugins" actions={<Button size="sm" variant="ghost" iconEnd={<ArrowRightIcon />}>View all</Button>}>…</Section>
|
|
318
|
+
<Section
|
|
319
|
+
title="Recent orders"
|
|
320
|
+
description="The last five, newest first."
|
|
321
|
+
actions={<Button size="sm" variant="ghost" iconEnd={<ArrowRightIcon />}>View all</Button>}
|
|
322
|
+
>…</Section>`,
|
|
323
|
+
children: /* @__PURE__ */ jsx(Heads, {})
|
|
324
|
+
})
|
|
325
|
+
}),
|
|
326
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
327
|
+
id: "icon",
|
|
328
|
+
title: "With an icon",
|
|
329
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
330
|
+
/* @__PURE__ */ jsx("code", { children: "icon" }),
|
|
331
|
+
" sets a small tile before the title and its sentence, as a",
|
|
332
|
+
" ",
|
|
333
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
334
|
+
to: "/components/card",
|
|
335
|
+
children: "card's header"
|
|
336
|
+
}),
|
|
337
|
+
" has, for the sections that lead a library page: the plugins and the themes an agency can install. It is decorative, the title says what the section is.",
|
|
338
|
+
" ",
|
|
339
|
+
/* @__PURE__ */ jsx("code", { children: "iconTone" }),
|
|
340
|
+
" and ",
|
|
341
|
+
/* @__PURE__ */ jsx("code", { children: "iconSize" }),
|
|
342
|
+
" are the tile's (",
|
|
343
|
+
/* @__PURE__ */ jsx("code", { children: "md" }),
|
|
344
|
+
", 32px, by default; ",
|
|
345
|
+
/* @__PURE__ */ jsx("code", { children: "xl" }),
|
|
346
|
+
", 40px, for a page's lead section). A one-line title centres on the tile; with a sentence the tile sits beside both."
|
|
347
|
+
] }),
|
|
348
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
349
|
+
align: "fill",
|
|
350
|
+
code: `
|
|
351
|
+
<Section
|
|
352
|
+
size="page"
|
|
353
|
+
icon={<PuzzlePieceIcon />}
|
|
354
|
+
iconTone="accent"
|
|
355
|
+
iconSize="xl"
|
|
356
|
+
title="Plugin marketplace"
|
|
357
|
+
description="Extend your stores with plugins."
|
|
358
|
+
actions={<Button size="sm" variant="ghost" iconEnd={<ArrowRightIcon />}>View all</Button>}
|
|
359
|
+
>…</Section>
|
|
360
|
+
<Section icon={<PaintBrushIcon />} title="Themes">…</Section>`,
|
|
361
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
362
|
+
className: "section-stack",
|
|
363
|
+
children: [/* @__PURE__ */ jsx(Section, {
|
|
364
|
+
size: "page",
|
|
365
|
+
icon: /* @__PURE__ */ jsx(PuzzlePieceIcon, {}),
|
|
366
|
+
iconTone: "accent",
|
|
367
|
+
iconSize: "xl",
|
|
368
|
+
title: "Plugin marketplace",
|
|
369
|
+
description: "Extend your stores with plugins.",
|
|
370
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
371
|
+
size: "sm",
|
|
372
|
+
variant: "ghost",
|
|
373
|
+
iconEnd: /* @__PURE__ */ jsx(ArrowRightIcon, {}),
|
|
374
|
+
children: "View all"
|
|
375
|
+
}),
|
|
376
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
377
|
+
className: "section-note",
|
|
378
|
+
children: "Harbour Reviews, Arden Loyalty and 24 more."
|
|
379
|
+
})
|
|
380
|
+
}), /* @__PURE__ */ jsx(Section, {
|
|
381
|
+
icon: /* @__PURE__ */ jsx(PaintBrushIcon, {}),
|
|
382
|
+
title: "Themes",
|
|
383
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
384
|
+
className: "section-note",
|
|
385
|
+
children: "Concourse, Provision and Harbour."
|
|
386
|
+
})
|
|
387
|
+
})]
|
|
388
|
+
})
|
|
389
|
+
})
|
|
390
|
+
}),
|
|
391
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
392
|
+
id: "rules",
|
|
393
|
+
title: "The hairline",
|
|
394
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
395
|
+
"By default the hairline runs under the head. ",
|
|
396
|
+
/* @__PURE__ */ jsx("code", { children: "rule=\"above\"" }),
|
|
397
|
+
" moves it over the section, for work areas that follow one another down a page; ",
|
|
398
|
+
/* @__PURE__ */ jsx("code", { children: "rule=\"none\"" }),
|
|
399
|
+
" takes it away, for a section whose content (a table) draws its own."
|
|
400
|
+
] }),
|
|
401
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
402
|
+
align: "fill",
|
|
403
|
+
code: `
|
|
404
|
+
<Section title="Rule below">…</Section>
|
|
405
|
+
<Section rule="above" title="Rule above">…</Section>
|
|
406
|
+
<Section rule="none" title="No rule">…</Section>`,
|
|
407
|
+
children: /* @__PURE__ */ jsx(Rules, {})
|
|
408
|
+
})
|
|
409
|
+
}),
|
|
410
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
411
|
+
id: "focus",
|
|
412
|
+
title: "Sending focus to the heading",
|
|
413
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
414
|
+
"Removing the row that held focus loses it. Give ",
|
|
415
|
+
/* @__PURE__ */ jsx("code", { children: "titleRef" }),
|
|
416
|
+
" a ref and call ",
|
|
417
|
+
/* @__PURE__ */ jsx("code", { children: "focus()" }),
|
|
418
|
+
": the heading takes focus by script. Only a heading given a ",
|
|
419
|
+
/* @__PURE__ */ jsx("code", { children: "titleRef" }),
|
|
420
|
+
" is focusable (",
|
|
421
|
+
/* @__PURE__ */ jsx("code", { children: "tabindex=\"-1\"" }),
|
|
422
|
+
", never a tab stop); without one it is plain text, and a click on it moves no focus. Uninstall a plugin below with the keyboard and the heading shows the focus ring; with a click it shows none. Then press Tab: focus continues from the heading."
|
|
423
|
+
] }),
|
|
424
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
425
|
+
align: "fill",
|
|
426
|
+
code: `
|
|
427
|
+
const heading = useRef<HTMLHeadingElement>(null)
|
|
428
|
+
|
|
429
|
+
<Section title="Installed plugins" titleRef={heading}>
|
|
430
|
+
…
|
|
431
|
+
<Button onClick={() => { remove(name); heading.current?.focus() }}>Uninstall</Button>
|
|
432
|
+
</Section>`,
|
|
433
|
+
children: /* @__PURE__ */ jsx(SendFocus, {})
|
|
434
|
+
})
|
|
435
|
+
}),
|
|
436
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
437
|
+
id: "landmark",
|
|
438
|
+
title: "A grouping, or a landmark",
|
|
439
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
440
|
+
"A section is a plain grouping under its heading: nothing in the page's list of regions. A page of ten sections would list ten landmarks, which is noise, so turn ",
|
|
441
|
+
/* @__PURE__ */ jsx("code", { children: "landmark" }),
|
|
442
|
+
" on only for the few a person would want to jump to. It then renders a ",
|
|
443
|
+
/* @__PURE__ */ jsx("code", { children: "section" }),
|
|
444
|
+
" named by its heading, a ",
|
|
445
|
+
/* @__PURE__ */ jsx("code", { children: "region" }),
|
|
446
|
+
". Name it yourself with",
|
|
447
|
+
" ",
|
|
448
|
+
/* @__PURE__ */ jsx("code", { children: "aria-label" }),
|
|
449
|
+
" or ",
|
|
450
|
+
/* @__PURE__ */ jsx("code", { children: "aria-labelledby" }),
|
|
451
|
+
" and it is a region too, named as you say."
|
|
452
|
+
] }),
|
|
453
|
+
children: /* @__PURE__ */ jsx(CodeBlock$1, { code: `
|
|
454
|
+
<Section title="Order items">…</Section> {/* a plain grouping */}
|
|
455
|
+
<Section title="Order items" landmark>…</Section> {/* a region named "Order items" */}
|
|
456
|
+
<Section title="Order items" aria-label="Items bought">…</Section> {/* a region named "Items bought" */}` })
|
|
457
|
+
}),
|
|
458
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
459
|
+
id: "both-themes",
|
|
460
|
+
title: "In both themes",
|
|
461
|
+
description: /* @__PURE__ */ jsx("p", { children: "A main section with a count and an action, and a side section, light and dark side by side." }),
|
|
462
|
+
children: /* @__PURE__ */ jsx(ThemePair, { children: /* @__PURE__ */ jsxs("div", {
|
|
463
|
+
className: "section-theme",
|
|
464
|
+
children: [/* @__PURE__ */ jsx(Section, {
|
|
465
|
+
title: "Order items",
|
|
466
|
+
titleAside: /* @__PURE__ */ jsx(Badge, {
|
|
467
|
+
size: "sm",
|
|
468
|
+
children: "2"
|
|
469
|
+
}),
|
|
470
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
471
|
+
size: "sm",
|
|
472
|
+
variant: "ghost",
|
|
473
|
+
children: "Edit"
|
|
474
|
+
}),
|
|
475
|
+
children: /* @__PURE__ */ jsx(Lines, { rows: [["Arden ergonomic chair × 2", "£398.00"], ["Oak veneer desk × 1", "£349.00"]] })
|
|
476
|
+
}), /* @__PURE__ */ jsx(Section, {
|
|
477
|
+
size: "side",
|
|
478
|
+
title: "Customer",
|
|
479
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
480
|
+
className: "section-prose",
|
|
481
|
+
children: "Priya Shah, Harbour Desk Co"
|
|
482
|
+
})
|
|
483
|
+
})]
|
|
484
|
+
}) })
|
|
485
|
+
}),
|
|
486
|
+
/* @__PURE__ */ jsx(Fragment$1, {}),
|
|
487
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
488
|
+
id: "guidelines",
|
|
489
|
+
title: "Guidelines",
|
|
490
|
+
children: [/* @__PURE__ */ jsx(DoDont, {
|
|
491
|
+
do: {
|
|
492
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
493
|
+
className: "section-dd",
|
|
494
|
+
children: /* @__PURE__ */ jsx(Section, {
|
|
495
|
+
title: "Order summary",
|
|
496
|
+
children: /* @__PURE__ */ jsx(Block, { height: 32 })
|
|
497
|
+
})
|
|
498
|
+
}),
|
|
499
|
+
caption: "A headline over a hairline on the canvas, then the content."
|
|
500
|
+
},
|
|
501
|
+
dont: {
|
|
502
|
+
children: /* @__PURE__ */ jsx(Card, {
|
|
503
|
+
padding: "sm",
|
|
504
|
+
className: "section-dd",
|
|
505
|
+
children: /* @__PURE__ */ jsx(Section, {
|
|
506
|
+
title: "Order summary",
|
|
507
|
+
children: /* @__PURE__ */ jsx(Block, { height: 32 })
|
|
508
|
+
})
|
|
509
|
+
}),
|
|
510
|
+
caption: "A section inside a card. The hairline already groups it, and a box in a box says it twice."
|
|
511
|
+
}
|
|
512
|
+
}), /* @__PURE__ */ jsx(Guidelines, { items: [
|
|
513
|
+
"One headline, a few words. The head holds at most two actions.",
|
|
514
|
+
"Pick the size by where the section sits, not by how important it is: main in the main column, side in the side one.",
|
|
515
|
+
"Pick the heading level that fits the page’s outline: the title is an h2 unless you say otherwise.",
|
|
516
|
+
"Use a card for a thing that is one box (a payment method, a plan). Use a section for a part of a page.",
|
|
517
|
+
"Teal does not appear in a head. Status and counts go in badges, beside the title."
|
|
518
|
+
] })]
|
|
519
|
+
}),
|
|
520
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
521
|
+
id: "accessibility",
|
|
522
|
+
title: "Accessibility",
|
|
523
|
+
children: /* @__PURE__ */ jsx(Guidelines, { items: [
|
|
524
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
525
|
+
"A plain grouping by default, so a screen reader's list of regions is not ten entries long. With",
|
|
526
|
+
" ",
|
|
527
|
+
/* @__PURE__ */ jsx("code", { children: "landmark" }),
|
|
528
|
+
" it is a ",
|
|
529
|
+
/* @__PURE__ */ jsx("code", { children: "section" }),
|
|
530
|
+
" named by its heading, so it is listed as a region and can be jumped to. Name it yourself with ",
|
|
531
|
+
/* @__PURE__ */ jsx("code", { children: "aria-label" }),
|
|
532
|
+
" or ",
|
|
533
|
+
/* @__PURE__ */ jsx("code", { children: "aria-labelledby" }),
|
|
534
|
+
" if a heading is not the right name; that makes it a region too."
|
|
535
|
+
] }),
|
|
536
|
+
"The title is a real heading, at the level you choose, so the page’s outline reads in order.",
|
|
537
|
+
"The heading can take focus by script when you give it titleRef (tabindex -1, never a tab stop), so keyboard users are not slowed down. Focus sent there after a key press shows the focus ring.",
|
|
538
|
+
"Actions in the head are ordinary controls after the title in the source and the tab order."
|
|
539
|
+
] })
|
|
540
|
+
}),
|
|
541
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
542
|
+
id: "props",
|
|
543
|
+
title: "Props",
|
|
544
|
+
description: /* @__PURE__ */ jsx("p", { children: "Also accepts every native div or section attribute." }),
|
|
545
|
+
children: [/* @__PURE__ */ jsx(PropsTable, { rows: [
|
|
546
|
+
{
|
|
547
|
+
name: "title",
|
|
548
|
+
type: "ReactNode",
|
|
549
|
+
required: true,
|
|
550
|
+
description: "The headline, and the section's name when it is a landmark."
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
name: "description",
|
|
554
|
+
type: "ReactNode",
|
|
555
|
+
description: "A quiet sentence under the title."
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
name: "titleAside",
|
|
559
|
+
type: "ReactNode",
|
|
560
|
+
description: "Set beside the title: a count badge, a status."
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
name: "icon",
|
|
564
|
+
type: "ReactNode",
|
|
565
|
+
description: "An icon in a small decorative tile before the title and its sentence."
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
name: "iconTone",
|
|
569
|
+
type: "IconTileTone",
|
|
570
|
+
default: "'neutral'",
|
|
571
|
+
description: "The icon tile's tone."
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
name: "iconSize",
|
|
575
|
+
type: "IconTileSize",
|
|
576
|
+
default: "'md'",
|
|
577
|
+
description: "The icon tile's size: md 32px, lg 36px, xl 40px."
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
name: "actions",
|
|
581
|
+
type: "ReactNode",
|
|
582
|
+
description: "At the right of the head: a quiet link, an icon button or two, one small button. Where they would leave the title less than 7rem, they drop under it, at the start."
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
name: "size",
|
|
586
|
+
type: "'side' | 'main' | 'page'",
|
|
587
|
+
default: "'main'",
|
|
588
|
+
description: "A Geist 14px headline and a tight head, a Sora 16px headline, or a Sora 20px headline."
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
name: "rule",
|
|
592
|
+
type: "'below' | 'above' | 'none'",
|
|
593
|
+
default: "'below'",
|
|
594
|
+
description: "The hairline under the head, over the section, or none."
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
name: "titleAs",
|
|
598
|
+
type: "'h2' | 'h3' | 'h4'",
|
|
599
|
+
default: "'h2'",
|
|
600
|
+
description: "The heading level."
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
name: "titleRef",
|
|
604
|
+
type: "Ref<HTMLHeadingElement>",
|
|
605
|
+
description: "The heading element, so focus can be sent there. Giving it makes the heading focusable by script (tabindex -1), never a tab stop."
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
name: "landmark",
|
|
609
|
+
type: "boolean",
|
|
610
|
+
default: "false",
|
|
611
|
+
description: "A region named by the heading, for the few sections worth jumping to. An aria-label or aria-labelledby of your own makes it a region too."
|
|
612
|
+
}
|
|
613
|
+
] }), /* @__PURE__ */ jsx(SubSection, {
|
|
614
|
+
title: "Related",
|
|
615
|
+
children: /* @__PURE__ */ jsx(DocTable, {
|
|
616
|
+
columns: ["To do this", "Use"],
|
|
617
|
+
rows: [
|
|
618
|
+
["A part of a page with a hairline under its headline", "Section"],
|
|
619
|
+
["A framed group with an optional icon tile and actions", /* @__PURE__ */ jsx(DocLink, {
|
|
620
|
+
to: "/components/card",
|
|
621
|
+
children: "Card"
|
|
622
|
+
})],
|
|
623
|
+
["Rows of settings inside a section", /* @__PURE__ */ jsx(DocLink, {
|
|
624
|
+
to: "/components/setting-row",
|
|
625
|
+
children: "Setting row"
|
|
626
|
+
})],
|
|
627
|
+
["A group of fields with a legend", /* @__PURE__ */ jsx(DocLink, {
|
|
628
|
+
to: "/components/form-grid",
|
|
629
|
+
children: "Field set"
|
|
630
|
+
})]
|
|
631
|
+
]
|
|
632
|
+
})
|
|
633
|
+
})]
|
|
634
|
+
})
|
|
635
|
+
]
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
//#endregion
|
|
639
|
+
export { Page, Preview };
|