@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,251 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as DocLink } from "./host-B6znjEgQ.js";
|
|
3
|
+
import { d as Section$1, i as DocPage, l as Note, o as Example, s as Guidelines, u as PropsTable } from "./docs-lM2UBSir.js";
|
|
4
|
+
import { n as PlanColumns, r as PlanPicker } from "./plan-card-DtloWvMh.js";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { PlanGrid, Switch } from "@orbitcommerce/constellation";
|
|
8
|
+
//#region src/pages/components/plan-grid.tsx
|
|
9
|
+
function Preview() {
|
|
10
|
+
return /* @__PURE__ */ jsx("div", {
|
|
11
|
+
className: "plan-preview",
|
|
12
|
+
children: /* @__PURE__ */ jsx(PlanGrid, {
|
|
13
|
+
loading: true,
|
|
14
|
+
skeletonCount: 1
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function States() {
|
|
19
|
+
const [loading, setLoading] = useState(true);
|
|
20
|
+
const [owner, setOwner] = useState(true);
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
22
|
+
className: "plan-demo",
|
|
23
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
24
|
+
className: "plan-demo__toggle",
|
|
25
|
+
children: [/* @__PURE__ */ jsx(Switch, {
|
|
26
|
+
checked: loading,
|
|
27
|
+
onCheckedChange: setLoading,
|
|
28
|
+
label: "Loading"
|
|
29
|
+
}), /* @__PURE__ */ jsx(Switch, {
|
|
30
|
+
checked: owner,
|
|
31
|
+
onCheckedChange: setOwner,
|
|
32
|
+
label: "The account owner"
|
|
33
|
+
})]
|
|
34
|
+
}), /* @__PURE__ */ jsx(PlanPicker, {
|
|
35
|
+
loading,
|
|
36
|
+
owner
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function Page() {
|
|
41
|
+
return /* @__PURE__ */ jsxs(DocPage, {
|
|
42
|
+
title: "Plan grid",
|
|
43
|
+
status: "new",
|
|
44
|
+
importNames: ["PlanGrid", "PLAN_GRID_LABELS"],
|
|
45
|
+
lead: "Plans side by side at one height a row: the billing interval and the currency above them, skeleton cards while they load, an empty state when there are none, and one footnote for all of them.",
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
48
|
+
id: "basics",
|
|
49
|
+
title: "Basics",
|
|
50
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
51
|
+
"Give it ",
|
|
52
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
53
|
+
to: "/components/plan-card",
|
|
54
|
+
children: "Plan cards"
|
|
55
|
+
}),
|
|
56
|
+
" as children; each is an item of a list (named by ",
|
|
57
|
+
/* @__PURE__ */ jsx("code", { children: "aria-label" }),
|
|
58
|
+
"), and every card in a row is as tall as the tallest, its button level with the rest.",
|
|
59
|
+
" ",
|
|
60
|
+
/* @__PURE__ */ jsx("code", { children: "interval" }),
|
|
61
|
+
", ",
|
|
62
|
+
/* @__PURE__ */ jsx("code", { children: "intervals" }),
|
|
63
|
+
" and ",
|
|
64
|
+
/* @__PURE__ */ jsx("code", { children: "onIntervalChange" }),
|
|
65
|
+
" put a segmented control above them, with an ",
|
|
66
|
+
/* @__PURE__ */ jsx("code", { children: "intervalNote" }),
|
|
67
|
+
" beside it; ",
|
|
68
|
+
/* @__PURE__ */ jsx("code", { children: "currency" }),
|
|
69
|
+
", ",
|
|
70
|
+
/* @__PURE__ */ jsx("code", { children: "currencies" }),
|
|
71
|
+
" and",
|
|
72
|
+
" ",
|
|
73
|
+
/* @__PURE__ */ jsx("code", { children: "onCurrencyChange" }),
|
|
74
|
+
" a select at the end (",
|
|
75
|
+
/* @__PURE__ */ jsx("code", { children: "currencyDisabled" }),
|
|
76
|
+
" holds a currency the account has fixed). ",
|
|
77
|
+
/* @__PURE__ */ jsx("code", { children: "footnote" }),
|
|
78
|
+
" is one quiet line under the plans, for what is true of every price. Change the interval and the currency, then press a plan's button."
|
|
79
|
+
] }),
|
|
80
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
81
|
+
align: "fill",
|
|
82
|
+
code: `
|
|
83
|
+
<PlanGrid
|
|
84
|
+
aria-label="Plans"
|
|
85
|
+
interval={interval}
|
|
86
|
+
intervals={[{ value: 'month', label: 'Monthly' }, { value: 'year', label: 'Yearly' }]}
|
|
87
|
+
onIntervalChange={setInterval}
|
|
88
|
+
intervalNote="Save 25% with yearly billing"
|
|
89
|
+
currency={currency}
|
|
90
|
+
currencies={[{ value: 'GBP', label: 'GBP, £' }, { value: 'EUR', label: 'EUR, €' }]}
|
|
91
|
+
onCurrencyChange={setCurrency}
|
|
92
|
+
footnote="Prices exclude VAT, which is added at checkout."
|
|
93
|
+
>
|
|
94
|
+
{plans.map((plan) => <PlanCard key={plan.id} … />)}
|
|
95
|
+
</PlanGrid>`,
|
|
96
|
+
children: /* @__PURE__ */ jsx(PlanPicker, {})
|
|
97
|
+
})
|
|
98
|
+
}),
|
|
99
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
100
|
+
id: "columns",
|
|
101
|
+
title: "Columns",
|
|
102
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
103
|
+
"It is a container, so its columns follow its own width and the number of plans, with every card at least 224px and no plan left alone on a row where that can be helped: two across from 464px, three from 704px, four from 944px and five from 1184px. Three plans stay one across until they fit three, never two and one; four go two by two, then four across. ",
|
|
104
|
+
/* @__PURE__ */ jsx("code", { children: "columns" }),
|
|
105
|
+
" sets the most across instead, folding while a card would be under 224px. Change the number of plans and the width."
|
|
106
|
+
] }),
|
|
107
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
108
|
+
align: "fill",
|
|
109
|
+
code: `<PlanGrid>{plans}</PlanGrid> // by the number of plans and the width\n<PlanGrid columns={3}>{plans}</PlanGrid> // at most three across`,
|
|
110
|
+
children: /* @__PURE__ */ jsx(PlanColumns, {})
|
|
111
|
+
})
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
114
|
+
id: "states",
|
|
115
|
+
title: "Loading, empty, and someone who cannot choose",
|
|
116
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
117
|
+
/* @__PURE__ */ jsx("code", { children: "loading" }),
|
|
118
|
+
" shows skeleton cards in a plan's shape (",
|
|
119
|
+
/* @__PURE__ */ jsx("code", { children: "skeletonCount" }),
|
|
120
|
+
", three by default), hidden from assistive tech, which hears \"Loading plans\" once. With no plans it says so in an empty state (",
|
|
121
|
+
/* @__PURE__ */ jsx("code", { children: "empty" }),
|
|
122
|
+
" gives its words and an action). For someone who cannot change the plan, each card's button says \"Owner only\" with the reason, still reachable: turn the account owner off below."
|
|
123
|
+
] }),
|
|
124
|
+
children: [/* @__PURE__ */ jsx(Example, {
|
|
125
|
+
align: "fill",
|
|
126
|
+
code: `<PlanGrid loading={isLoading} skeletonCount={4} empty={{ title: 'No plans are available right now' }}>…</PlanGrid>`,
|
|
127
|
+
children: /* @__PURE__ */ jsx(States, {})
|
|
128
|
+
}), /* @__PURE__ */ jsx(Example, {
|
|
129
|
+
align: "fill",
|
|
130
|
+
code: `<PlanGrid>{[]}</PlanGrid>`,
|
|
131
|
+
children: /* @__PURE__ */ jsx(PlanGrid, {
|
|
132
|
+
"aria-label": "No plans",
|
|
133
|
+
children: []
|
|
134
|
+
})
|
|
135
|
+
})]
|
|
136
|
+
}),
|
|
137
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
138
|
+
id: "accessibility",
|
|
139
|
+
title: "Accessibility",
|
|
140
|
+
children: [/* @__PURE__ */ jsx(Guidelines, { items: [
|
|
141
|
+
"The plans are a list, each an article named by its plan: a screen reader says how many there are and moves between them.",
|
|
142
|
+
"The interval is a radio group and the currency a select, each named (\"Billing interval\", \"Currency\").",
|
|
143
|
+
"While the plans load, the skeletons are hidden and a polite status says \"Loading plans\" once."
|
|
144
|
+
] }), /* @__PURE__ */ jsxs(Note, {
|
|
145
|
+
title: "Prices and VAT",
|
|
146
|
+
children: [
|
|
147
|
+
"Say whether prices include VAT once, in the ",
|
|
148
|
+
/* @__PURE__ */ jsx("code", { children: "footnote" }),
|
|
149
|
+
", not on every card."
|
|
150
|
+
]
|
|
151
|
+
})]
|
|
152
|
+
}),
|
|
153
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
154
|
+
id: "props",
|
|
155
|
+
title: "Props",
|
|
156
|
+
description: /* @__PURE__ */ jsx("p", { children: "Also accepts every native div attribute except children." }),
|
|
157
|
+
children: /* @__PURE__ */ jsx(PropsTable, {
|
|
158
|
+
title: "PlanGrid",
|
|
159
|
+
rows: [
|
|
160
|
+
{
|
|
161
|
+
name: "children",
|
|
162
|
+
type: "ReactNode",
|
|
163
|
+
description: "The plans: PlanCards, each an item of the list."
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: "columns",
|
|
167
|
+
type: "'auto' | 1 | 2 | 3 | 4 | 5",
|
|
168
|
+
default: "'auto'",
|
|
169
|
+
description: "By the number of plans and the width, or the most across."
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "loading",
|
|
173
|
+
type: "boolean",
|
|
174
|
+
default: "false",
|
|
175
|
+
description: "Skeleton cards in place of the plans."
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: "skeletonCount",
|
|
179
|
+
type: "number",
|
|
180
|
+
default: "3",
|
|
181
|
+
description: "How many skeleton cards."
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: "empty",
|
|
185
|
+
type: "{ title, description, actions }",
|
|
186
|
+
description: "The empty state's words, when there are no plans."
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: "interval",
|
|
190
|
+
type: "string",
|
|
191
|
+
description: "The chosen interval, with intervals and onIntervalChange."
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: "intervals",
|
|
195
|
+
type: "SegmentedControlOption[]",
|
|
196
|
+
description: "The intervals: Monthly, Yearly."
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: "onIntervalChange",
|
|
200
|
+
type: "(interval: string) => void",
|
|
201
|
+
description: "Called with the interval chosen."
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
name: "intervalNote",
|
|
205
|
+
type: "ReactNode",
|
|
206
|
+
description: "A quiet note beside the interval."
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
name: "currency",
|
|
210
|
+
type: "string",
|
|
211
|
+
description: "The chosen currency, with currencies and onCurrencyChange."
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: "currencies",
|
|
215
|
+
type: "SelectOption[]",
|
|
216
|
+
description: "The currencies to choose from."
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
name: "onCurrencyChange",
|
|
220
|
+
type: "(currency: string) => void",
|
|
221
|
+
description: "Called with the currency chosen."
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: "currencyDisabled",
|
|
225
|
+
type: "boolean",
|
|
226
|
+
default: "false",
|
|
227
|
+
description: "The currency is fixed for the account."
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: "footnote",
|
|
231
|
+
type: "ReactNode",
|
|
232
|
+
description: "One quiet line under every plan: words, or paragraphs of your own."
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: "aria-label",
|
|
236
|
+
type: "string",
|
|
237
|
+
description: "Names the list of plans."
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
name: "labels",
|
|
241
|
+
type: "Partial<PlanGridLabels>",
|
|
242
|
+
description: "interval, currency, loading, emptyTitle, emptyDescription. PLAN_GRID_LABELS is the English set."
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
})
|
|
246
|
+
})
|
|
247
|
+
]
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
//#endregion
|
|
251
|
+
export { Page, Preview };
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as DocLink } from "./host-B6znjEgQ.js";
|
|
3
|
+
import { d as Section$1, i as DocPage, m as ThemePair, o as Example, s as Guidelines, u as PropsTable } from "./docs-lM2UBSir.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { PointList, PointListItem } from "@orbitcommerce/constellation";
|
|
6
|
+
//#region src/pages/components/point-list.tsx
|
|
7
|
+
function CancelPoints() {
|
|
8
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
9
|
+
className: "point-list-panel",
|
|
10
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
11
|
+
className: "point-list-heading",
|
|
12
|
+
id: "cancel-heading",
|
|
13
|
+
children: "What happens when you cancel"
|
|
14
|
+
}), /* @__PURE__ */ jsxs(PointList, {
|
|
15
|
+
"aria-labelledby": "cancel-heading",
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ jsx(PointListItem, {
|
|
18
|
+
title: "You keep Pro until 30 November",
|
|
19
|
+
children: "Nothing changes until the period you have paid for ends."
|
|
20
|
+
}),
|
|
21
|
+
/* @__PURE__ */ jsx(PointListItem, {
|
|
22
|
+
title: "You are not charged again",
|
|
23
|
+
children: "No further payments are taken once the current period ends."
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ jsx(PointListItem, {
|
|
26
|
+
title: "Your catalogue and resellers stay",
|
|
27
|
+
children: "Your products and connected stores are kept."
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ jsx(PointListItem, {
|
|
30
|
+
title: "Easy to change your mind",
|
|
31
|
+
children: "Until 30 November you can keep your plan with one click from Plan and billing."
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
})]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function Preview() {
|
|
38
|
+
return /* @__PURE__ */ jsx("div", {
|
|
39
|
+
className: "point-list-preview",
|
|
40
|
+
children: /* @__PURE__ */ jsxs(PointList, {
|
|
41
|
+
"aria-label": "What happens when you cancel",
|
|
42
|
+
children: [/* @__PURE__ */ jsx(PointListItem, {
|
|
43
|
+
title: "You keep Pro until 30 November",
|
|
44
|
+
children: "Nothing changes until then."
|
|
45
|
+
}), /* @__PURE__ */ jsx(PointListItem, {
|
|
46
|
+
title: "You are not charged again",
|
|
47
|
+
children: "No further payments are taken."
|
|
48
|
+
})]
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function Page() {
|
|
53
|
+
return /* @__PURE__ */ jsxs(DocPage, {
|
|
54
|
+
title: "Point list",
|
|
55
|
+
status: "new",
|
|
56
|
+
importNames: ["PointList", "PointListItem"],
|
|
57
|
+
lead: "An ordered list of points, each a muted numeral before a short title and a quiet sentence: what happens when a plan is cancelled, the next steps after an email is verified.",
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
60
|
+
id: "basics",
|
|
61
|
+
title: "Basics",
|
|
62
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
63
|
+
"Put ",
|
|
64
|
+
/* @__PURE__ */ jsx("code", { children: "PointListItem" }),
|
|
65
|
+
"s inside a ",
|
|
66
|
+
/* @__PURE__ */ jsx("code", { children: "PointList" }),
|
|
67
|
+
". Each takes a ",
|
|
68
|
+
/* @__PURE__ */ jsx("code", { children: "title" }),
|
|
69
|
+
", a few words that say the point, and a sentence as its children that says more. The list numbers them \"1.\", \"2.\" in the quiet ink, and names itself from the heading above it (",
|
|
70
|
+
/* @__PURE__ */ jsx("code", { children: "aria-labelledby" }),
|
|
71
|
+
")."
|
|
72
|
+
] }),
|
|
73
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
74
|
+
align: "fill",
|
|
75
|
+
code: `
|
|
76
|
+
<h3 id="cancel-heading">What happens when you cancel</h3>
|
|
77
|
+
<PointList aria-labelledby="cancel-heading">
|
|
78
|
+
<PointListItem title="You keep Pro until 30 November">
|
|
79
|
+
Nothing changes until the period you have paid for ends.
|
|
80
|
+
</PointListItem>
|
|
81
|
+
<PointListItem title="You are not charged again">
|
|
82
|
+
No further payments are taken once the current period ends.
|
|
83
|
+
</PointListItem>
|
|
84
|
+
...
|
|
85
|
+
</PointList>`,
|
|
86
|
+
children: /* @__PURE__ */ jsx(CancelPoints, {})
|
|
87
|
+
})
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
90
|
+
id: "titles-only",
|
|
91
|
+
title: "Titles alone",
|
|
92
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
93
|
+
"A point can be its title alone, for steps short enough to need no sentence: what to do after an email is verified. A point left out (",
|
|
94
|
+
/* @__PURE__ */ jsx("code", { children: "null" }),
|
|
95
|
+
") takes no number, so the count runs on without a gap."
|
|
96
|
+
] }),
|
|
97
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
98
|
+
align: "fill",
|
|
99
|
+
code: `
|
|
100
|
+
<PointList aria-label="What happens next">
|
|
101
|
+
<PointListItem title="Sign in with your details" />
|
|
102
|
+
<PointListItem title="Our team reviews your application, usually within a few days" />
|
|
103
|
+
{referrals ? <PointListItem title="Your referral links go live once you are approved" /> : null}
|
|
104
|
+
</PointList>`,
|
|
105
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
106
|
+
className: "point-list-panel",
|
|
107
|
+
children: /* @__PURE__ */ jsxs(PointList, {
|
|
108
|
+
"aria-label": "What happens next",
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ jsx(PointListItem, { title: "Sign in with your details" }),
|
|
111
|
+
/* @__PURE__ */ jsx(PointListItem, { title: "Our team reviews your application, usually within a few days" }),
|
|
112
|
+
null,
|
|
113
|
+
/* @__PURE__ */ jsx(PointListItem, { title: "Your referral links go live once you are approved" })
|
|
114
|
+
]
|
|
115
|
+
})
|
|
116
|
+
})
|
|
117
|
+
})
|
|
118
|
+
}),
|
|
119
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
120
|
+
id: "start",
|
|
121
|
+
title: "Carrying on",
|
|
122
|
+
description: /* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("code", { children: "start" }), " numbers on from an earlier list, as a guide split by headings does. Past nine the numerals keep one width, so the titles stay in line."] }),
|
|
123
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
124
|
+
align: "fill",
|
|
125
|
+
code: `
|
|
126
|
+
<PointList start={9} aria-label="Going live">
|
|
127
|
+
<PointListItem title="Connect your domain" />
|
|
128
|
+
<PointListItem title="Turn on payments" />
|
|
129
|
+
<PointListItem title="Place a test order" />
|
|
130
|
+
</PointList>`,
|
|
131
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
132
|
+
className: "point-list-panel",
|
|
133
|
+
children: /* @__PURE__ */ jsxs(PointList, {
|
|
134
|
+
start: 9,
|
|
135
|
+
"aria-label": "Going live",
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ jsx(PointListItem, {
|
|
138
|
+
title: "Connect your domain",
|
|
139
|
+
children: "Point your domain at the store from your registrar."
|
|
140
|
+
}),
|
|
141
|
+
/* @__PURE__ */ jsx(PointListItem, {
|
|
142
|
+
title: "Turn on payments",
|
|
143
|
+
children: "Choose a provider and add your bank details."
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ jsx(PointListItem, {
|
|
146
|
+
title: "Place a test order",
|
|
147
|
+
children: "Buy something small and refund it, to see each email."
|
|
148
|
+
})
|
|
149
|
+
]
|
|
150
|
+
})
|
|
151
|
+
})
|
|
152
|
+
})
|
|
153
|
+
}),
|
|
154
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
155
|
+
id: "both-themes",
|
|
156
|
+
title: "In both themes",
|
|
157
|
+
description: /* @__PURE__ */ jsx("p", { children: "The list in light and dark." }),
|
|
158
|
+
children: /* @__PURE__ */ jsx(ThemePair, { children: /* @__PURE__ */ jsx(CancelPoints, {}) })
|
|
159
|
+
}),
|
|
160
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
161
|
+
id: "guidelines",
|
|
162
|
+
title: "Guidelines",
|
|
163
|
+
children: [/* @__PURE__ */ jsx(Guidelines, { items: [
|
|
164
|
+
"For points that come in an order, or that read best one after another. For a list with states (done, waiting), use the status checklist.",
|
|
165
|
+
"Lead each point with its title, a few words in sentence case; keep the sentence under it to one line where you can.",
|
|
166
|
+
"Three to five points. A longer list belongs in a page of its own."
|
|
167
|
+
] }), /* @__PURE__ */ jsxs("p", {
|
|
168
|
+
className: "point-list-note",
|
|
169
|
+
children: [
|
|
170
|
+
"A list of steps with a state each is the ",
|
|
171
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
172
|
+
to: "/components/status-checklist",
|
|
173
|
+
children: "status checklist"
|
|
174
|
+
}),
|
|
175
|
+
"."
|
|
176
|
+
]
|
|
177
|
+
})]
|
|
178
|
+
}),
|
|
179
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
180
|
+
id: "accessibility",
|
|
181
|
+
title: "Accessibility",
|
|
182
|
+
children: /* @__PURE__ */ jsx(Guidelines, { items: [
|
|
183
|
+
"It is an ordered list (role=\"list\" is set, which Safari needs once the markers are off), so a screen reader says each point's place: \"2 of 4\".",
|
|
184
|
+
"The drawn numeral is hidden from assistive tech, which hears the place from the list instead of twice.",
|
|
185
|
+
"Name the list from the heading above it with aria-labelledby, or give it an aria-label."
|
|
186
|
+
] })
|
|
187
|
+
}),
|
|
188
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
189
|
+
id: "props",
|
|
190
|
+
title: "Props",
|
|
191
|
+
description: /* @__PURE__ */ jsx("p", { children: "PointList takes every native ol attribute; PointListItem every li attribute." }),
|
|
192
|
+
children: [/* @__PURE__ */ jsx(PropsTable, {
|
|
193
|
+
title: "PointList",
|
|
194
|
+
rows: [{
|
|
195
|
+
name: "children",
|
|
196
|
+
type: "ReactNode",
|
|
197
|
+
description: "The PointListItems. One left out takes no number."
|
|
198
|
+
}, {
|
|
199
|
+
name: "start",
|
|
200
|
+
type: "number",
|
|
201
|
+
default: "1",
|
|
202
|
+
description: "The first point's number."
|
|
203
|
+
}]
|
|
204
|
+
}), /* @__PURE__ */ jsx(PropsTable, {
|
|
205
|
+
title: "PointListItem",
|
|
206
|
+
rows: [{
|
|
207
|
+
name: "title",
|
|
208
|
+
type: "ReactNode",
|
|
209
|
+
required: true,
|
|
210
|
+
description: "What the point says, in a few words."
|
|
211
|
+
}, {
|
|
212
|
+
name: "children",
|
|
213
|
+
type: "ReactNode",
|
|
214
|
+
description: "A quiet sentence under the title that says more."
|
|
215
|
+
}]
|
|
216
|
+
})]
|
|
217
|
+
})
|
|
218
|
+
]
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
//#endregion
|
|
222
|
+
export { Page, Preview };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as DocLink } from "./host-B6znjEgQ.js";
|
|
3
|
-
import { a as DocTable, 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-
|
|
4
|
-
import { c as SpecimenFrame, s as PopoverSheet } from "./_overlays-specimens-
|
|
3
|
+
import { a as DocTable, d as Section$1, i as DocPage, l as Note, m as ThemePair, o as Example, p as SubSection, r as DoDont, s as Guidelines, u as PropsTable } from "./docs-lM2UBSir.js";
|
|
4
|
+
import { c as SpecimenFrame, s as PopoverSheet } from "./_overlays-specimens-bawR331Z.js";
|
|
5
5
|
import { useId, useRef, useState } from "react";
|
|
6
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Avatar, Button, Field, IconButton, Input, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, SearchField, SegmentedControl } from "@orbitcommerce/constellation";
|
|
8
|
-
import { CheckIcon, CopySimpleIcon, FunnelIcon, LinkIcon, NotePencilIcon, PencilSimpleIcon, UserIcon, WarehouseIcon, XIcon } from "@orbitcommerce/constellation/icons";
|
|
8
|
+
import { CheckIcon, CopySimpleIcon, FunnelIcon, InfoIcon, LinkIcon, NotePencilIcon, PencilSimpleIcon, UserIcon, WarehouseIcon, XIcon } from "@orbitcommerce/constellation/icons";
|
|
9
9
|
//#region src/pages/components/popover.tsx
|
|
10
10
|
function Preview() {
|
|
11
11
|
return /* @__PURE__ */ jsx(PopoverSheet, {
|
|
@@ -571,7 +571,7 @@ function HeldOpen() {
|
|
|
571
571
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
572
572
|
size: "sm",
|
|
573
573
|
"aria-haspopup": "dialog",
|
|
574
|
-
"
|
|
574
|
+
"aria-expanded": "true",
|
|
575
575
|
children: "Adjust stock"
|
|
576
576
|
}), /* @__PURE__ */ jsx(PopoverSheet, {
|
|
577
577
|
width: 300,
|
|
@@ -630,6 +630,29 @@ function HeldOpen() {
|
|
|
630
630
|
})]
|
|
631
631
|
});
|
|
632
632
|
}
|
|
633
|
+
function ArrowHint() {
|
|
634
|
+
return /* @__PURE__ */ jsxs(Popover, { children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
635
|
+
asChild: true,
|
|
636
|
+
children: /* @__PURE__ */ jsx(IconButton, {
|
|
637
|
+
label: "What is the reorder point?",
|
|
638
|
+
variant: "secondary",
|
|
639
|
+
children: /* @__PURE__ */ jsx(InfoIcon, {})
|
|
640
|
+
})
|
|
641
|
+
}), /* @__PURE__ */ jsxs(PopoverContent, {
|
|
642
|
+
arrow: true,
|
|
643
|
+
side: "top",
|
|
644
|
+
sideOffset: 12,
|
|
645
|
+
width: 260,
|
|
646
|
+
"aria-label": "Reorder point",
|
|
647
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
648
|
+
className: "popover-title",
|
|
649
|
+
children: "Reorder point"
|
|
650
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
651
|
+
className: "popover-arrow-text",
|
|
652
|
+
children: "When stock falls to this many, the product shows in Low stock and its supplier is emailed."
|
|
653
|
+
})]
|
|
654
|
+
})] });
|
|
655
|
+
}
|
|
633
656
|
function Page() {
|
|
634
657
|
return /* @__PURE__ */ jsxs(DocPage, {
|
|
635
658
|
title: "Popover",
|
|
@@ -642,7 +665,7 @@ function Page() {
|
|
|
642
665
|
],
|
|
643
666
|
lead: "A raised sheet of free-form content anchored to a trigger: a quick edit, a few filters, or the details behind a value. It sits beside what it changes and the page stays live around it.",
|
|
644
667
|
children: [
|
|
645
|
-
/* @__PURE__ */ jsx(Section, {
|
|
668
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
646
669
|
id: "basics",
|
|
647
670
|
title: "Basics",
|
|
648
671
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -681,7 +704,7 @@ const [open, setOpen] = useState(false)
|
|
|
681
704
|
children: /* @__PURE__ */ jsx(ProductRow, {})
|
|
682
705
|
})
|
|
683
706
|
}),
|
|
684
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
707
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
685
708
|
id: "both-themes",
|
|
686
709
|
title: "In both themes",
|
|
687
710
|
description: /* @__PURE__ */ jsx("p", { children: "Held open for review, light beside dark. In light the sheet is white on the floating shadow; in dark it lifts to graphite with a faint ring so its edge holds on a dark page. Fields inside it keep their own wells." }),
|
|
@@ -697,7 +720,7 @@ const [open, setOpen] = useState(false)
|
|
|
697
720
|
})
|
|
698
721
|
})]
|
|
699
722
|
}),
|
|
700
|
-
/* @__PURE__ */ jsx(Section, {
|
|
723
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
701
724
|
id: "padding",
|
|
702
725
|
title: "Padding",
|
|
703
726
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -729,7 +752,7 @@ const [open, setOpen] = useState(false)
|
|
|
729
752
|
})
|
|
730
753
|
})
|
|
731
754
|
}),
|
|
732
|
-
/* @__PURE__ */ jsx(Section, {
|
|
755
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
733
756
|
id: "width",
|
|
734
757
|
title: "Width",
|
|
735
758
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -773,7 +796,7 @@ const [open, setOpen] = useState(false)
|
|
|
773
796
|
})
|
|
774
797
|
})
|
|
775
798
|
}),
|
|
776
|
-
/* @__PURE__ */ jsx(Section, {
|
|
799
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
777
800
|
id: "closing",
|
|
778
801
|
title: "Closing",
|
|
779
802
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -807,7 +830,7 @@ const [open, setOpen] = useState(false)
|
|
|
807
830
|
})
|
|
808
831
|
})
|
|
809
832
|
}),
|
|
810
|
-
/* @__PURE__ */ jsx(Section, {
|
|
833
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
811
834
|
id: "anchor",
|
|
812
835
|
title: "Anchor",
|
|
813
836
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -844,7 +867,40 @@ const [open, setOpen] = useState(false)
|
|
|
844
867
|
children: /* @__PURE__ */ jsx(PricePopover, {})
|
|
845
868
|
})
|
|
846
869
|
}),
|
|
847
|
-
/* @__PURE__ */
|
|
870
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
871
|
+
id: "arrow",
|
|
872
|
+
title: "Arrow",
|
|
873
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
874
|
+
/* @__PURE__ */ jsx("code", { children: "arrow" }),
|
|
875
|
+
" puts an arrow on the edge facing the trigger or anchor, pointing at it, in the sheet's colour (with its faint ring in dark). Use it for a hint about one control, where the link between the two must be plain, as the",
|
|
876
|
+
" ",
|
|
877
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
878
|
+
to: "/components/coachmark",
|
|
879
|
+
children: "Coachmark"
|
|
880
|
+
}),
|
|
881
|
+
" does. The sheet then does not scroll, since its arrow sits outside it, so keep what it holds short; give it a ",
|
|
882
|
+
/* @__PURE__ */ jsx("code", { children: "sideOffset" }),
|
|
883
|
+
" of about 12 for the arrow's room."
|
|
884
|
+
] }),
|
|
885
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
886
|
+
minHeight: 240,
|
|
887
|
+
code: `
|
|
888
|
+
<Popover>
|
|
889
|
+
<PopoverTrigger asChild>
|
|
890
|
+
<IconButton label="What is the reorder point?" variant="secondary"><InfoIcon /></IconButton>
|
|
891
|
+
</PopoverTrigger>
|
|
892
|
+
<PopoverContent arrow side="top" sideOffset={12} width={260} aria-label="Reorder point">
|
|
893
|
+
<p>Reorder point</p>
|
|
894
|
+
<p>When stock falls to this many, the product shows in Low stock and its supplier is emailed.</p>
|
|
895
|
+
</PopoverContent>
|
|
896
|
+
</Popover>`,
|
|
897
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
898
|
+
className: "popover-arrow-stage",
|
|
899
|
+
children: /* @__PURE__ */ jsx(ArrowHint, {})
|
|
900
|
+
})
|
|
901
|
+
})
|
|
902
|
+
}),
|
|
903
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
848
904
|
id: "choosing",
|
|
849
905
|
title: "Popover, menu or dialog",
|
|
850
906
|
description: /* @__PURE__ */ jsx("p", { children: "Four overlays, four jobs. Pick by what is inside and how much the moment matters." }),
|
|
@@ -968,7 +1024,7 @@ const [open, setOpen] = useState(false)
|
|
|
968
1024
|
] })
|
|
969
1025
|
]
|
|
970
1026
|
}),
|
|
971
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
1027
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
972
1028
|
id: "accessibility",
|
|
973
1029
|
title: "Accessibility",
|
|
974
1030
|
children: [/* @__PURE__ */ jsx(Guidelines, { items: [
|
|
@@ -1006,7 +1062,7 @@ const [open, setOpen] = useState(false)
|
|
|
1006
1062
|
]
|
|
1007
1063
|
})]
|
|
1008
1064
|
}),
|
|
1009
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
1065
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
1010
1066
|
id: "props",
|
|
1011
1067
|
title: "Props",
|
|
1012
1068
|
description: /* @__PURE__ */ jsx("p", { children: "Every part also accepts the matching Radix Popover props." }),
|
|
@@ -1073,6 +1129,12 @@ const [open, setOpen] = useState(false)
|
|
|
1073
1129
|
default: "'center'",
|
|
1074
1130
|
description: "Which part of the trigger it lines up with."
|
|
1075
1131
|
},
|
|
1132
|
+
{
|
|
1133
|
+
name: "arrow",
|
|
1134
|
+
type: "boolean",
|
|
1135
|
+
default: "false",
|
|
1136
|
+
description: "An arrow on the edge facing the trigger, pointing at it. The sheet then does not scroll."
|
|
1137
|
+
},
|
|
1076
1138
|
{
|
|
1077
1139
|
name: "sideOffset",
|
|
1078
1140
|
type: "number",
|
|
@@ -1095,7 +1157,7 @@ const [open, setOpen] = useState(false)
|
|
|
1095
1157
|
name: "container",
|
|
1096
1158
|
type: "HTMLElement | null",
|
|
1097
1159
|
default: "document.body",
|
|
1098
|
-
description: "Where the sheet is portalled."
|
|
1160
|
+
description: "Where the sheet is portalled. Inside a dialog it opens in the dialog's layer; null keeps it on the page."
|
|
1099
1161
|
},
|
|
1100
1162
|
{
|
|
1101
1163
|
name: "onOpenAutoFocus",
|