@orbitcommerce/constellation-docs 0.0.0-stage → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +6 -0
- package/README.md +6 -2
- package/dist/docs.css +20787 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +308 -0
- package/dist/pages/Playground-Mk1yIWXb.js +129 -0
- package/dist/pages/_address-data-L9BR499w.js +161 -0
- package/dist/pages/_builder-demo-C0eJUmPU.js +282 -0
- package/dist/pages/_card-art-0be5ncyV.js +18 -0
- package/dist/pages/_conversation-samples-Bq7cn-4d.js +70 -0
- package/dist/pages/_figures-data-DaDvB7Nm.js +606 -0
- package/dist/pages/_foundations-blXWyYh8.js +30 -0
- package/dist/pages/_kpi-examples-DeGCBB9T.js +208 -0
- package/dist/pages/_overlays-specimens-bawR331Z.js +320 -0
- package/dist/pages/_preview-specimens-DKQC9HAo.js +153 -0
- package/dist/pages/accordion-Sg0TUqxB.js +1036 -0
- package/dist/pages/address-autocomplete-DP0PUOlK.js +360 -0
- package/dist/pages/address-block-BZOOOPA9.js +368 -0
- package/dist/pages/address-fields-CwSqro3W.js +277 -0
- package/dist/pages/ai-highlight-D3x2vD83.js +642 -0
- package/dist/pages/alert-D3i7xZTU.js +914 -0
- package/dist/pages/anchored-overlay-BV0OCu2Q.js +788 -0
- package/dist/pages/app-shell-D4hdlHps.js +1558 -0
- package/dist/pages/area-chart-BEWFwiB2.js +718 -0
- package/dist/pages/avatar-BFEqQViw.js +895 -0
- package/dist/pages/avatar-upload-BDCzJfyN.js +484 -0
- package/dist/pages/badge-0-PyMrih.js +1035 -0
- package/dist/pages/bar-chart-DkLogYlt.js +1060 -0
- package/dist/pages/bar-fold-B-3XeIDZ.js +360 -0
- package/dist/pages/board-card-D2tZY_mU.js +415 -0
- package/dist/pages/brand-mark-BqiLvFSR.js +417 -0
- package/dist/pages/button-DAyfssDY.js +715 -0
- package/dist/pages/calendar-Ds7KsgSI.js +682 -0
- package/dist/pages/canvas-stage-1KiPspkX.js +472 -0
- package/dist/pages/card-CQEM1_wc.js +1567 -0
- package/dist/pages/caret-suggestions-oHI6QvqW.js +526 -0
- package/dist/pages/chart-legend-B20AbakD.js +724 -0
- package/dist/pages/chat-composer-CwzUJYIa.js +437 -0
- package/dist/pages/checkbox-BG9Zkb6j.js +1581 -0
- package/dist/pages/checklist-card-DEyykVFS.js +783 -0
- package/dist/pages/chip-Ck-o3Ui6.js +839 -0
- package/dist/pages/chip-list-k1LxXuCi.js +414 -0
- package/dist/pages/clamp-text-n-iE8RDR.js +203 -0
- package/dist/pages/coachmark-Be2ghobT.js +366 -0
- package/dist/pages/code-block-Dv_Y5GYq.js +622 -0
- package/dist/pages/collab-field-CfqqK7d2.js +696 -0
- package/dist/pages/color-field-CZpfcA-A.js +1127 -0
- package/dist/pages/colour-q2ntvI0w.js +1974 -0
- package/dist/pages/column-mapper-TsTG39cl.js +502 -0
- package/dist/pages/combobox-DvK2j5tI.js +1334 -0
- package/dist/pages/command-palette-CJ7uBA04.js +1386 -0
- package/dist/pages/comment-box-CDSGYhr5.js +346 -0
- package/dist/pages/composer-D4B0NgpA.js +689 -0
- package/dist/pages/condition-builder-BZy2ZGXe.js +715 -0
- package/dist/pages/conflict-chooser-C--_9UIS.js +210 -0
- package/dist/pages/context-menu-F9DV30ia.js +487 -0
- package/dist/pages/copy-button-Cn7WiKRF.js +568 -0
- package/dist/pages/copy-field-D3Xt3Jq6.js +511 -0
- package/dist/pages/danger-zone-Db_UUeiP.js +564 -0
- package/dist/pages/date-input-GOW067EB.js +956 -0
- package/dist/pages/date-picker-GdBciR99.js +1569 -0
- package/dist/pages/date-time-BLKCXtVZ.js +678 -0
- package/dist/pages/delta-CNAGv8JY.js +779 -0
- package/dist/pages/description-list-BPeXn1eW.js +1268 -0
- package/dist/pages/device-switcher-BCaN99c1.js +554 -0
- package/dist/pages/dialog-CRpkRC98.js +3164 -0
- package/dist/pages/docs-lM2UBSir.js +520 -0
- package/dist/pages/doodle-nzkqi2UI.js +201 -0
- package/dist/pages/drag-ghost-B6kpzC3O.js +426 -0
- package/dist/pages/drill-menu-cskH5mol.js +490 -0
- package/dist/pages/dropzone-DOY_Rhw0.js +1069 -0
- package/dist/pages/element-toolbar-DZIhXlCJ.js +498 -0
- package/dist/pages/emoji-picker-CqaWaffD.js +235 -0
- package/dist/pages/empty-state-4U2txFpI.js +1113 -0
- package/dist/pages/facet-filters-McbBeY9e.js +353 -0
- package/dist/pages/figure-D-HF5vCj.js +563 -0
- package/dist/pages/figure-strip-BB3mNl7D.js +1364 -0
- package/dist/pages/figure-tabs-QOeQMY6N.js +578 -0
- package/dist/pages/file-chip-DMDjtlqQ.js +738 -0
- package/dist/pages/filter-pill-DzqNOsD4.js +1295 -0
- package/dist/pages/font-picker-Bqhu0QMh.js +416 -0
- package/dist/pages/form-grid-BfWCVlie.js +692 -0
- package/dist/pages/gallery-BBk2EOri.js +453 -0
- package/dist/pages/gif-picker-CnoDTCaL.js +270 -0
- package/dist/pages/gradient-editor-Bqxp7Fxj.js +378 -0
- package/dist/pages/grouped-checklist-gNZ0tBKU.js +477 -0
- package/dist/pages/heatmap-BohgIcNk.js +507 -0
- package/dist/pages/highlight-text-BfxzfmvS.js +287 -0
- package/dist/pages/home-dashboard-CxPmvduE.js +962 -0
- package/dist/pages/host-B6znjEgQ.js +109 -0
- package/dist/pages/hosted-embed-Jef3aIMP.js +163 -0
- package/dist/pages/hosted-field-BLh-53AE.js +208 -0
- package/dist/pages/hosted-field-DEpI4lVS.js +514 -0
- package/dist/pages/icon-button-Bu4Gj5sy.js +1200 -0
- package/dist/pages/icon-picker-DEyoMUTh.js +291 -0
- package/dist/pages/icon-tile-DcgxyXPF.js +592 -0
- package/dist/pages/icons-CJ9Aar3d.js +736 -0
- package/dist/pages/image-cropper-NyougqLH.js +466 -0
- package/dist/pages/image-field-7knBv4mJ.js +567 -0
- package/dist/pages/import-result-CmTtGXW_.js +486 -0
- package/dist/pages/inline-confirm-CEcI5Lxo.js +327 -0
- package/dist/pages/inline-edit-Ba39SzhM.js +1125 -0
- package/dist/pages/input-CzLCzfyx.js +2372 -0
- package/dist/pages/installation-C3UcpQJT.js +528 -0
- package/dist/pages/job-indicator-DOXWbFdl.js +755 -0
- package/dist/pages/kanban-Dy9sPAI0.js +740 -0
- package/dist/pages/kbd-UNj4zqxn.js +545 -0
- package/dist/pages/layout-primitives-CPRaZeyt.js +483 -0
- package/dist/pages/line-chart-CntWxeMF.js +1117 -0
- package/dist/pages/link-CXqvAg9z.js +689 -0
- package/dist/pages/link-picker-BMFGCC67.js +478 -0
- package/dist/pages/link-row-x8yaUuWc.js +595 -0
- package/dist/pages/live-globe-95ROMhGQ.js +715 -0
- package/dist/pages/loading-overlay-BeGuXM9G.js +456 -0
- package/dist/pages/loading-state-BNbCo51C.js +556 -0
- package/dist/pages/log-viewer-BQz8I_a2.js +503 -0
- package/dist/pages/logo-B38rnzoq.js +571 -0
- package/dist/pages/lottie_light-CxEH8eiR.js +9116 -0
- package/dist/pages/markdown-Ied72vMT.js +237 -0
- package/dist/pages/markdown-field-BfnIEKZH.js +193 -0
- package/dist/pages/media-banner-DkStCia0.js +233 -0
- package/dist/pages/menu-NrLYKqKp.js +2132 -0
- package/dist/pages/message-thread-Bo4zbxqu.js +731 -0
- package/dist/pages/meta-line-D5p2TycR.js +371 -0
- package/dist/pages/model-viewer-BfokvHoc.js +60288 -0
- package/dist/pages/model-viewer-C8PFO8wk.js +577 -0
- package/dist/pages/month-calendar-T1vw9Rup.js +457 -0
- package/dist/pages/motion-CrXtiBvA.js +865 -0
- package/dist/pages/number-input-CuyMZg18.js +968 -0
- package/dist/pages/orbit-loader-DeVBtkFE.js +219 -0
- package/dist/pages/orbit-spinner-Dxv5qAhr.js +348 -0
- package/dist/pages/otp-input-CVRoX1mw.js +591 -0
- package/dist/pages/overview-LA9XRhZc.js +130 -0
- package/dist/pages/package-dimensions-DFCyZj_T.js +192 -0
- package/dist/pages/pagination-C1EgVtW4.js +294 -0
- package/dist/pages/palette-tile-X9ZXu2Z0.js +414 -0
- package/dist/pages/password-field-DHEQKyUC.js +912 -0
- package/dist/pages/person-cell-BmjbADBz.js +564 -0
- package/dist/pages/phone-input-B3G7Qpb2.js +747 -0
- package/dist/pages/plan-card-DRaA6RuB.js +621 -0
- package/dist/pages/plan-card-DtloWvMh.js +258 -0
- package/dist/pages/plan-comparison-BVIGTtbd.js +559 -0
- package/dist/pages/plan-grid-cfPVTB5V.js +251 -0
- package/dist/pages/point-list-BbPmZjsm.js +222 -0
- package/dist/pages/popover-C3Oar9D5.js +1198 -0
- package/dist/pages/presence-avatars-CRZIk8n9.js +328 -0
- package/dist/pages/preview-frame-Bcwk0y_Q.js +1631 -0
- package/dist/pages/price-CRBLoa9h.js +604 -0
- package/dist/pages/principles-pnDyfHpK.js +483 -0
- package/dist/pages/print-page-BkLv6bW8.js +513 -0
- package/dist/pages/profile-hero-CC9dUzuN.js +498 -0
- package/dist/pages/progress-CP_awmo4.js +904 -0
- package/dist/pages/progress-ring-JuOAwk2T.js +576 -0
- package/dist/pages/radio-group-C-4tg6FS.js +1639 -0
- package/dist/pages/radius-control-B2kRA2Ch.js +441 -0
- package/dist/pages/rating-CweKN2SX.js +471 -0
- package/dist/pages/record-layout-DUP_X0RL.js +719 -0
- package/dist/pages/record-pager-y9D7JFgb.js +278 -0
- package/dist/pages/registry-BZg-xAbi.js +594 -0
- package/dist/pages/release-Cs6tl16C.js +16 -0
- package/dist/pages/repeater-BRZYKRQa.js +1351 -0
- package/dist/pages/reply-feedback-BDnHprla.js +192 -0
- package/dist/pages/reveal-BygENBbL.js +460 -0
- package/dist/pages/rich-text-DOFQZEpT.js +156 -0
- package/dist/pages/rich-text-editor-BhIM20JI.js +1265 -0
- package/dist/pages/rolldown-runtime-CbKu08Hx.js +25 -0
- package/dist/pages/rolling-number-GR3Cyfpz.js +529 -0
- package/dist/pages/row-list-Dl6CYhC-.js +1565 -0
- package/dist/pages/rule-list-DTCmIMpT.js +648 -0
- package/dist/pages/save-status-B5KkyMZP.js +378 -0
- package/dist/pages/schedule-YycI95O1.js +243 -0
- package/dist/pages/scroll-area-B2sGm23Q.js +423 -0
- package/dist/pages/search-field-D1uG7R6A.js +693 -0
- package/dist/pages/search-menu-DMuXyUUW.js +580 -0
- package/dist/pages/secret-field-Dj9x3LL8.js +337 -0
- package/dist/pages/section-rail-BtTCETS5.js +637 -0
- package/dist/pages/section-v2Pubup9.js +639 -0
- package/dist/pages/segmented-control-D-FB1K1T.js +1190 -0
- package/dist/pages/select-DZ43NpOm.js +1434 -0
- package/dist/pages/selection-chrome-Czcs6RN6.js +437 -0
- package/dist/pages/separator-CFwqRvfO.js +428 -0
- package/dist/pages/serp-preview-BGwORjmo.js +346 -0
- package/dist/pages/setting-row-Bt-dZV8H.js +913 -0
- package/dist/pages/shape-DzniHAVT.js +627 -0
- package/dist/pages/share-list-D4wgBxKN.js +926 -0
- package/dist/pages/side-panel-CCtkrZjs.js +811 -0
- package/dist/pages/site-preview-Dj1hM2Yo.js +353 -0
- package/dist/pages/skeleton-C1F5HkAu.js +1325 -0
- package/dist/pages/skip-link-BxznhSkz.js +252 -0
- package/dist/pages/slider-CAoPURKD.js +774 -0
- package/dist/pages/sortable-card-Sr44uCpI.js +424 -0
- package/dist/pages/sortable-list-DUAleYE1.js +1298 -0
- package/dist/pages/sortable-tree-BLzK-hTE.js +737 -0
- package/dist/pages/spacing-box-CtuvzxQu.js +550 -0
- package/dist/pages/sparkline-D3aavCly.js +947 -0
- package/dist/pages/split-bar-DYgZnFID.js +414 -0
- package/dist/pages/split-button-Be08-VI-.js +335 -0
- package/dist/pages/split-pane-lSNZgTKt.js +523 -0
- package/dist/pages/status-badge-DOdNhmzn.js +1074 -0
- package/dist/pages/status-checklist-CWkjCZIC.js +1152 -0
- package/dist/pages/status-dot-D99gAGsV.js +567 -0
- package/dist/pages/stepper-CxKTbEA-.js +1093 -0
- package/dist/pages/success-mark-CqFTOBEu.js +142 -0
- package/dist/pages/swatch-H_kNvHuC.js +565 -0
- package/dist/pages/switch-C93K6j9h.js +617 -0
- package/dist/pages/table-CL0vomno.js +3225 -0
- package/dist/pages/tabs-Dh0mUsLw.js +1690 -0
- package/dist/pages/tag-input-BjZWKKRJ.js +1307 -0
- package/dist/pages/task-card-Dv0sR1-w.js +295 -0
- package/dist/pages/textarea-CCM-SnGN.js +949 -0
- package/dist/pages/thumbnail-DwFJL_k1.js +1147 -0
- package/dist/pages/time-input-CA9-uZAa.js +442 -0
- package/dist/pages/time-zone-select-CEtMXVYO.js +296 -0
- package/dist/pages/timeline-BsMUTlpR.js +1798 -0
- package/dist/pages/toast-zXLRiMRT.js +1391 -0
- package/dist/pages/tool-rail-B1AbTMCP.js +355 -0
- package/dist/pages/toolbar-B9l_fHKy.js +754 -0
- package/dist/pages/tooltip-LHtCUkF-.js +826 -0
- package/dist/pages/translation-field-CTRXiF2N.js +251 -0
- package/dist/pages/tree-checklist-CJj3OcLg.js +451 -0
- package/dist/pages/tree-select-DU1qXHy_.js +492 -0
- package/dist/pages/tree-view-g_RjLtAb.js +739 -0
- package/dist/pages/typography-BSijtiRl.js +876 -0
- package/dist/pages/unit-input-Dml4fjmK.js +659 -0
- package/dist/pages/upload-rules-yozEzSah.js +419 -0
- package/dist/pages/url-upload-input-SSnMgfpA.js +307 -0
- package/dist/pages/value-change-CnubDKyO.js +489 -0
- package/dist/pages/weekly-hours-i2EpsmTx.js +287 -0
- package/dist/pages/widget-preview-CUJMyZ_k.js +625 -0
- package/dist/pages/working-status-CENemSsw.js +389 -0
- package/manifest.json +13001 -0
- package/package.json +35 -4
|
@@ -0,0 +1,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."
|
|
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 };
|