@orbitcommerce/constellation-docs 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs.css +14764 -2237
- package/dist/index.js +2 -2
- package/dist/pages/{Playground-CNbBbErC.js → Playground-Mk1yIWXb.js} +2 -2
- package/dist/pages/_address-data-L9BR499w.js +161 -0
- package/dist/pages/_builder-demo-C0eJUmPU.js +282 -0
- package/dist/pages/_card-art-0be5ncyV.js +18 -0
- package/dist/pages/_conversation-samples-Bq7cn-4d.js +70 -0
- package/dist/pages/{_figures-data-BDmScEny.js → _figures-data-DaDvB7Nm.js} +5 -5
- package/dist/pages/_kpi-examples-DeGCBB9T.js +208 -0
- package/dist/pages/{_overlays-specimens-Dpn6oiyH.js → _overlays-specimens-bawR331Z.js} +33 -23
- package/dist/pages/_preview-specimens-DKQC9HAo.js +153 -0
- package/dist/pages/accordion-Sg0TUqxB.js +1036 -0
- package/dist/pages/address-autocomplete-DP0PUOlK.js +360 -0
- package/dist/pages/address-block-BZOOOPA9.js +368 -0
- package/dist/pages/address-fields-CwSqro3W.js +277 -0
- package/dist/pages/ai-highlight-D3x2vD83.js +642 -0
- package/dist/pages/{alert-BD4e6QTh.js → alert-D3i7xZTU.js} +195 -50
- package/dist/pages/anchored-overlay-BV0OCu2Q.js +788 -0
- package/dist/pages/{app-shell-KbA-nRqZ.js → app-shell-D4hdlHps.js} +133 -54
- package/dist/pages/{area-chart-B91dLcGo.js → area-chart-BEWFwiB2.js} +183 -27
- package/dist/pages/{avatar-DPPHXJAu.js → avatar-BFEqQViw.js} +194 -12
- package/dist/pages/avatar-upload-BDCzJfyN.js +484 -0
- package/dist/pages/{badge-C9JR0thI.js → badge-0-PyMrih.js} +441 -135
- package/dist/pages/bar-chart-DkLogYlt.js +1060 -0
- package/dist/pages/bar-fold-B-3XeIDZ.js +360 -0
- package/dist/pages/board-card-D2tZY_mU.js +415 -0
- package/dist/pages/brand-mark-BqiLvFSR.js +417 -0
- package/dist/pages/{button-D3V912P4.js → button-DAyfssDY.js} +276 -79
- package/dist/pages/{calendar-DSDZ9nRH.js → calendar-Ds7KsgSI.js} +69 -17
- package/dist/pages/canvas-stage-1KiPspkX.js +472 -0
- package/dist/pages/card-CQEM1_wc.js +1567 -0
- package/dist/pages/caret-suggestions-oHI6QvqW.js +526 -0
- package/dist/pages/chart-legend-B20AbakD.js +724 -0
- package/dist/pages/chat-composer-CwzUJYIa.js +437 -0
- package/dist/pages/checkbox-BG9Zkb6j.js +1581 -0
- package/dist/pages/checklist-card-DEyykVFS.js +783 -0
- package/dist/pages/chip-Ck-o3Ui6.js +839 -0
- package/dist/pages/chip-list-k1LxXuCi.js +414 -0
- package/dist/pages/clamp-text-n-iE8RDR.js +203 -0
- package/dist/pages/coachmark-Be2ghobT.js +366 -0
- package/dist/pages/code-block-Dv_Y5GYq.js +622 -0
- package/dist/pages/collab-field-CfqqK7d2.js +696 -0
- package/dist/pages/color-field-CZpfcA-A.js +1127 -0
- package/dist/pages/{colour-BwuO8xAv.js → colour-q2ntvI0w.js} +496 -20
- package/dist/pages/column-mapper-TsTG39cl.js +502 -0
- package/dist/pages/combobox-DvK2j5tI.js +1334 -0
- package/dist/pages/{command-palette-xAD7fOg6.js → command-palette-CJ7uBA04.js} +201 -58
- package/dist/pages/comment-box-CDSGYhr5.js +346 -0
- package/dist/pages/composer-D4B0NgpA.js +689 -0
- package/dist/pages/condition-builder-BZy2ZGXe.js +715 -0
- package/dist/pages/conflict-chooser-C--_9UIS.js +210 -0
- package/dist/pages/context-menu-F9DV30ia.js +487 -0
- package/dist/pages/copy-button-Cn7WiKRF.js +568 -0
- package/dist/pages/copy-field-D3Xt3Jq6.js +511 -0
- package/dist/pages/danger-zone-Db_UUeiP.js +564 -0
- package/dist/pages/date-input-GOW067EB.js +956 -0
- package/dist/pages/{date-picker-BYSa816m.js → date-picker-GdBciR99.js} +186 -38
- package/dist/pages/date-time-BLKCXtVZ.js +678 -0
- package/dist/pages/{delta-CtAo0eIM.js → delta-CNAGv8JY.js} +266 -61
- package/dist/pages/description-list-BPeXn1eW.js +1268 -0
- package/dist/pages/device-switcher-BCaN99c1.js +554 -0
- package/dist/pages/dialog-CRpkRC98.js +3164 -0
- package/dist/pages/{docs-BNOb7AqR.js → docs-lM2UBSir.js} +20 -15
- package/dist/pages/doodle-nzkqi2UI.js +201 -0
- package/dist/pages/drag-ghost-B6kpzC3O.js +426 -0
- package/dist/pages/drill-menu-cskH5mol.js +490 -0
- package/dist/pages/dropzone-DOY_Rhw0.js +1069 -0
- package/dist/pages/element-toolbar-DZIhXlCJ.js +498 -0
- package/dist/pages/emoji-picker-CqaWaffD.js +235 -0
- package/dist/pages/empty-state-4U2txFpI.js +1113 -0
- package/dist/pages/facet-filters-McbBeY9e.js +353 -0
- package/dist/pages/figure-D-HF5vCj.js +563 -0
- package/dist/pages/figure-strip-BB3mNl7D.js +1364 -0
- package/dist/pages/{figure-tabs-CoPFzzKz.js → figure-tabs-QOeQMY6N.js} +153 -35
- package/dist/pages/file-chip-DMDjtlqQ.js +738 -0
- package/dist/pages/filter-pill-DzqNOsD4.js +1295 -0
- package/dist/pages/font-picker-Bqhu0QMh.js +416 -0
- package/dist/pages/form-grid-BfWCVlie.js +692 -0
- package/dist/pages/gallery-BBk2EOri.js +453 -0
- package/dist/pages/gif-picker-CnoDTCaL.js +270 -0
- package/dist/pages/gradient-editor-Bqxp7Fxj.js +378 -0
- package/dist/pages/grouped-checklist-gNZ0tBKU.js +477 -0
- package/dist/pages/heatmap-BohgIcNk.js +507 -0
- package/dist/pages/highlight-text-BfxzfmvS.js +287 -0
- package/dist/pages/{home-dashboard-CFQwDtC9.js → home-dashboard-CxPmvduE.js} +21 -18
- package/dist/pages/hosted-embed-Jef3aIMP.js +163 -0
- package/dist/pages/hosted-field-BLh-53AE.js +208 -0
- package/dist/pages/hosted-field-DEpI4lVS.js +514 -0
- package/dist/pages/{icon-button-C9eSVPPW.js → icon-button-Bu4Gj5sy.js} +370 -31
- package/dist/pages/icon-picker-DEyoMUTh.js +291 -0
- package/dist/pages/icon-tile-DcgxyXPF.js +592 -0
- package/dist/pages/{icons-sxkTs5Ob.js → icons-CJ9Aar3d.js} +315 -52
- package/dist/pages/image-cropper-NyougqLH.js +466 -0
- package/dist/pages/image-field-7knBv4mJ.js +567 -0
- package/dist/pages/import-result-CmTtGXW_.js +486 -0
- package/dist/pages/inline-confirm-CEcI5Lxo.js +327 -0
- package/dist/pages/inline-edit-Ba39SzhM.js +1125 -0
- package/dist/pages/input-CzLCzfyx.js +2372 -0
- package/dist/pages/{installation-DpsX8G_n.js → installation-C3UcpQJT.js} +112 -29
- package/dist/pages/job-indicator-DOXWbFdl.js +755 -0
- package/dist/pages/kanban-Dy9sPAI0.js +740 -0
- package/dist/pages/{kbd-cNfDoikz.js → kbd-UNj4zqxn.js} +15 -14
- package/dist/pages/layout-primitives-CPRaZeyt.js +483 -0
- package/dist/pages/line-chart-CntWxeMF.js +1117 -0
- package/dist/pages/link-CXqvAg9z.js +689 -0
- package/dist/pages/link-picker-BMFGCC67.js +478 -0
- package/dist/pages/link-row-x8yaUuWc.js +595 -0
- package/dist/pages/{live-globe-ClvLn9Lb.js → live-globe-95ROMhGQ.js} +191 -47
- package/dist/pages/loading-overlay-BeGuXM9G.js +456 -0
- package/dist/pages/loading-state-BNbCo51C.js +556 -0
- package/dist/pages/log-viewer-BQz8I_a2.js +503 -0
- package/dist/pages/{logo-BfGF1Pq9.js → logo-B38rnzoq.js} +13 -13
- package/dist/pages/lottie_light-CxEH8eiR.js +9116 -0
- package/dist/pages/markdown-Ied72vMT.js +237 -0
- package/dist/pages/markdown-field-BfnIEKZH.js +193 -0
- package/dist/pages/media-banner-DkStCia0.js +233 -0
- package/dist/pages/{menu-by2sgQ09.js → menu-NrLYKqKp.js} +623 -109
- package/dist/pages/message-thread-Bo4zbxqu.js +731 -0
- package/dist/pages/meta-line-D5p2TycR.js +371 -0
- package/dist/pages/model-viewer-BfokvHoc.js +60288 -0
- package/dist/pages/model-viewer-C8PFO8wk.js +577 -0
- package/dist/pages/month-calendar-T1vw9Rup.js +457 -0
- package/dist/pages/{motion-BvTGc2Dk.js → motion-CrXtiBvA.js} +20 -10
- package/dist/pages/number-input-CuyMZg18.js +968 -0
- package/dist/pages/orbit-loader-DeVBtkFE.js +219 -0
- package/dist/pages/{orbit-spinner-Dil1Z3Oy.js → orbit-spinner-Dxv5qAhr.js} +30 -14
- package/dist/pages/otp-input-CVRoX1mw.js +591 -0
- package/dist/pages/{overview-BPEbZQ6g.js → overview-LA9XRhZc.js} +4 -4
- package/dist/pages/package-dimensions-DFCyZj_T.js +192 -0
- package/dist/pages/{pagination-BBUnGvv5.js → pagination-C1EgVtW4.js} +74 -29
- package/dist/pages/palette-tile-X9ZXu2Z0.js +414 -0
- package/dist/pages/password-field-DHEQKyUC.js +912 -0
- package/dist/pages/person-cell-BmjbADBz.js +564 -0
- package/dist/pages/phone-input-B3G7Qpb2.js +747 -0
- package/dist/pages/plan-card-DRaA6RuB.js +621 -0
- package/dist/pages/plan-card-DtloWvMh.js +258 -0
- package/dist/pages/plan-comparison-BVIGTtbd.js +559 -0
- package/dist/pages/plan-grid-cfPVTB5V.js +251 -0
- package/dist/pages/point-list-BbPmZjsm.js +222 -0
- package/dist/pages/{popover-Db1gLDpb.js → popover-C3Oar9D5.js} +76 -14
- package/dist/pages/presence-avatars-CRZIk8n9.js +328 -0
- package/dist/pages/preview-frame-Bcwk0y_Q.js +1631 -0
- package/dist/pages/price-CRBLoa9h.js +604 -0
- package/dist/pages/{principles-CeAIOIdt.js → principles-pnDyfHpK.js} +9 -9
- package/dist/pages/print-page-BkLv6bW8.js +513 -0
- package/dist/pages/profile-hero-CC9dUzuN.js +498 -0
- package/dist/pages/progress-CP_awmo4.js +904 -0
- package/dist/pages/progress-ring-JuOAwk2T.js +576 -0
- package/dist/pages/{radio-group-CkdBWWfG.js → radio-group-C-4tg6FS.js} +580 -18
- package/dist/pages/radius-control-B2kRA2Ch.js +441 -0
- package/dist/pages/rating-CweKN2SX.js +471 -0
- package/dist/pages/record-layout-DUP_X0RL.js +719 -0
- package/dist/pages/record-pager-y9D7JFgb.js +278 -0
- package/dist/pages/registry-BZg-xAbi.js +594 -0
- package/dist/pages/{release-Dvo684UJ.js → release-Cs6tl16C.js} +4 -1
- package/dist/pages/repeater-BRZYKRQa.js +1351 -0
- package/dist/pages/reply-feedback-BDnHprla.js +192 -0
- package/dist/pages/reveal-BygENBbL.js +460 -0
- package/dist/pages/rich-text-DOFQZEpT.js +156 -0
- package/dist/pages/rich-text-editor-BhIM20JI.js +1265 -0
- package/dist/pages/rolldown-runtime-CbKu08Hx.js +25 -0
- package/dist/pages/{rolling-number-qmvH84Mq.js → rolling-number-GR3Cyfpz.js} +12 -12
- package/dist/pages/row-list-Dl6CYhC-.js +1565 -0
- package/dist/pages/rule-list-DTCmIMpT.js +648 -0
- package/dist/pages/save-status-B5KkyMZP.js +378 -0
- package/dist/pages/schedule-YycI95O1.js +243 -0
- package/dist/pages/scroll-area-B2sGm23Q.js +423 -0
- package/dist/pages/{search-field-BN7MWGQ4.js → search-field-D1uG7R6A.js} +15 -15
- package/dist/pages/search-menu-DMuXyUUW.js +580 -0
- package/dist/pages/secret-field-Dj9x3LL8.js +337 -0
- package/dist/pages/section-rail-BtTCETS5.js +637 -0
- package/dist/pages/section-v2Pubup9.js +639 -0
- package/dist/pages/{segmented-control-CTbIpRBW.js → segmented-control-D-FB1K1T.js} +450 -37
- package/dist/pages/{select-DguELoRR.js → select-DZ43NpOm.js} +22 -17
- package/dist/pages/selection-chrome-Czcs6RN6.js +437 -0
- package/dist/pages/{separator-CPZub9pv.js → separator-CFwqRvfO.js} +99 -22
- package/dist/pages/serp-preview-BGwORjmo.js +346 -0
- package/dist/pages/setting-row-Bt-dZV8H.js +913 -0
- package/dist/pages/{shape-DKvA0YKr.js → shape-DzniHAVT.js} +10 -10
- package/dist/pages/share-list-D4wgBxKN.js +926 -0
- package/dist/pages/side-panel-CCtkrZjs.js +811 -0
- package/dist/pages/site-preview-Dj1hM2Yo.js +353 -0
- package/dist/pages/skeleton-C1F5HkAu.js +1325 -0
- package/dist/pages/skip-link-BxznhSkz.js +252 -0
- package/dist/pages/slider-CAoPURKD.js +774 -0
- package/dist/pages/sortable-card-Sr44uCpI.js +424 -0
- package/dist/pages/sortable-list-DUAleYE1.js +1298 -0
- package/dist/pages/sortable-tree-BLzK-hTE.js +737 -0
- package/dist/pages/spacing-box-CtuvzxQu.js +550 -0
- package/dist/pages/{sparkline-DMMYGbHn.js → sparkline-D3aavCly.js} +301 -22
- package/dist/pages/split-bar-DYgZnFID.js +414 -0
- package/dist/pages/split-button-Be08-VI-.js +335 -0
- package/dist/pages/split-pane-lSNZgTKt.js +523 -0
- package/dist/pages/status-badge-DOdNhmzn.js +1074 -0
- package/dist/pages/status-checklist-CWkjCZIC.js +1152 -0
- package/dist/pages/status-dot-D99gAGsV.js +567 -0
- package/dist/pages/stepper-CxKTbEA-.js +1093 -0
- package/dist/pages/success-mark-CqFTOBEu.js +142 -0
- package/dist/pages/swatch-H_kNvHuC.js +565 -0
- package/dist/pages/{switch-B-Qe4kcT.js → switch-C93K6j9h.js} +151 -51
- package/dist/pages/table-CL0vomno.js +3225 -0
- package/dist/pages/{tabs-B4M-usCV.js → tabs-Dh0mUsLw.js} +256 -21
- package/dist/pages/tag-input-BjZWKKRJ.js +1307 -0
- package/dist/pages/task-card-Dv0sR1-w.js +295 -0
- package/dist/pages/{textarea-fTuUZRQb.js → textarea-CCM-SnGN.js} +271 -15
- package/dist/pages/thumbnail-DwFJL_k1.js +1147 -0
- package/dist/pages/time-input-CA9-uZAa.js +442 -0
- package/dist/pages/time-zone-select-CEtMXVYO.js +296 -0
- package/dist/pages/timeline-BsMUTlpR.js +1798 -0
- package/dist/pages/{toast-CKP03zjy.js → toast-zXLRiMRT.js} +240 -25
- package/dist/pages/tool-rail-B1AbTMCP.js +355 -0
- package/dist/pages/toolbar-B9l_fHKy.js +754 -0
- package/dist/pages/{tooltip-CBYil3kt.js → tooltip-LHtCUkF-.js} +162 -33
- package/dist/pages/translation-field-CTRXiF2N.js +251 -0
- package/dist/pages/tree-checklist-CJj3OcLg.js +451 -0
- package/dist/pages/tree-select-DU1qXHy_.js +492 -0
- package/dist/pages/tree-view-g_RjLtAb.js +739 -0
- package/dist/pages/{typography-PCbg8Bhg.js → typography-BSijtiRl.js} +153 -12
- package/dist/pages/unit-input-Dml4fjmK.js +659 -0
- package/dist/pages/upload-rules-yozEzSah.js +419 -0
- package/dist/pages/url-upload-input-SSnMgfpA.js +307 -0
- package/dist/pages/value-change-CnubDKyO.js +489 -0
- package/dist/pages/weekly-hours-i2EpsmTx.js +287 -0
- package/dist/pages/widget-preview-CUJMyZ_k.js +625 -0
- package/dist/pages/working-status-CENemSsw.js +389 -0
- package/manifest.json +10984 -1108
- package/package.json +2 -2
- package/dist/pages/card-DUggbis3.js +0 -659
- package/dist/pages/checkbox-DwimQaK3.js +0 -365
- package/dist/pages/dialog-BRAf4LMh.js +0 -1451
- package/dist/pages/empty-state-C-mLrXW2.js +0 -417
- package/dist/pages/input-KF9Gkawf.js +0 -1093
- package/dist/pages/registry-CroHzK9I.js +0 -244
- package/dist/pages/skeleton-DLuBhP46.js +0 -561
- package/dist/pages/table-AMoODng4.js +0 -607
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as DocLink } from "./host-B6znjEgQ.js";
|
|
3
|
+
import { a as DocTable, d as Section$1, i as DocPage, l as Note, m as ThemePair, o as Example, s as Guidelines, u as PropsTable } from "./docs-lM2UBSir.js";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Field, SpacingBox, spacingToCss } from "@orbitcommerce/constellation";
|
|
7
|
+
//#region src/pages/components/spacing-box.tsx
|
|
8
|
+
function Preview() {
|
|
9
|
+
return /* @__PURE__ */ jsx("div", {
|
|
10
|
+
className: "spacing-box-preview",
|
|
11
|
+
children: /* @__PURE__ */ jsx(SpacingBox, {
|
|
12
|
+
"aria-label": "Padding",
|
|
13
|
+
defaultValue: {
|
|
14
|
+
top: 16,
|
|
15
|
+
right: 24,
|
|
16
|
+
bottom: 16,
|
|
17
|
+
left: 24
|
|
18
|
+
},
|
|
19
|
+
min: 0
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function Padding() {
|
|
24
|
+
const [padding, setPadding] = useState({
|
|
25
|
+
top: 16,
|
|
26
|
+
right: 24,
|
|
27
|
+
bottom: 16,
|
|
28
|
+
left: 24
|
|
29
|
+
});
|
|
30
|
+
const [unit, setUnit] = useState("px");
|
|
31
|
+
const [committed, setCommitted] = useState(spacingToCss(padding, "px"));
|
|
32
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
33
|
+
className: "spacing-box-stack",
|
|
34
|
+
children: [/* @__PURE__ */ jsx(Field, {
|
|
35
|
+
label: "Padding",
|
|
36
|
+
hint: "Space inside the section",
|
|
37
|
+
children: /* @__PURE__ */ jsx(SpacingBox, {
|
|
38
|
+
value: padding,
|
|
39
|
+
onValueChange: setPadding,
|
|
40
|
+
onValueCommit: (value) => setCommitted(spacingToCss(value, unit)),
|
|
41
|
+
min: 0,
|
|
42
|
+
units: [
|
|
43
|
+
"px",
|
|
44
|
+
"rem",
|
|
45
|
+
"%"
|
|
46
|
+
],
|
|
47
|
+
unit,
|
|
48
|
+
onUnitChange: setUnit
|
|
49
|
+
})
|
|
50
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
51
|
+
className: "spacing-box-status",
|
|
52
|
+
role: "status",
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ jsxs("code", { children: ["padding: ", spacingToCss(padding, unit) || "not set"] }),
|
|
55
|
+
", committed",
|
|
56
|
+
" ",
|
|
57
|
+
/* @__PURE__ */ jsx("code", { children: committed || "not set" })
|
|
58
|
+
]
|
|
59
|
+
})]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function Margin() {
|
|
63
|
+
const [margin, setMargin] = useState({
|
|
64
|
+
top: 0,
|
|
65
|
+
right: "auto",
|
|
66
|
+
bottom: -24,
|
|
67
|
+
left: "auto"
|
|
68
|
+
});
|
|
69
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
70
|
+
className: "spacing-box-stack",
|
|
71
|
+
children: [/* @__PURE__ */ jsx(Field, {
|
|
72
|
+
label: "Margin",
|
|
73
|
+
hint: "auto on both sides centres the block; below zero pulls it closer",
|
|
74
|
+
children: /* @__PURE__ */ jsx(SpacingBox, {
|
|
75
|
+
value: margin,
|
|
76
|
+
onValueChange: setMargin,
|
|
77
|
+
allowAuto: true
|
|
78
|
+
})
|
|
79
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
80
|
+
className: "spacing-box-status",
|
|
81
|
+
role: "status",
|
|
82
|
+
children: /* @__PURE__ */ jsxs("code", { children: ["margin: ", spacingToCss(margin, "px") || "not set"] })
|
|
83
|
+
})]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function Linked() {
|
|
87
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
88
|
+
className: "spacing-box-grid",
|
|
89
|
+
children: [/* @__PURE__ */ jsx(Field, {
|
|
90
|
+
label: "Linked",
|
|
91
|
+
hint: "Every side matches, so it starts linked",
|
|
92
|
+
children: /* @__PURE__ */ jsx(SpacingBox, {
|
|
93
|
+
defaultValue: 12,
|
|
94
|
+
min: 0
|
|
95
|
+
})
|
|
96
|
+
}), /* @__PURE__ */ jsx(Field, {
|
|
97
|
+
label: "Unlinked",
|
|
98
|
+
hint: "The sides differ",
|
|
99
|
+
children: /* @__PURE__ */ jsx(SpacingBox, {
|
|
100
|
+
defaultValue: {
|
|
101
|
+
top: 8,
|
|
102
|
+
right: 16,
|
|
103
|
+
bottom: 8,
|
|
104
|
+
left: 16
|
|
105
|
+
},
|
|
106
|
+
min: 0
|
|
107
|
+
})
|
|
108
|
+
})]
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function Units() {
|
|
112
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
113
|
+
className: "spacing-box-grid",
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ jsx(Field, {
|
|
116
|
+
label: "A list",
|
|
117
|
+
hint: /* @__PURE__ */ jsx("code", { children: "units={['px', 'rem', '%']}" }),
|
|
118
|
+
children: /* @__PURE__ */ jsx(SpacingBox, {
|
|
119
|
+
defaultValue: 1,
|
|
120
|
+
defaultUnit: "rem",
|
|
121
|
+
units: [
|
|
122
|
+
"px",
|
|
123
|
+
{
|
|
124
|
+
value: "rem",
|
|
125
|
+
step: .25
|
|
126
|
+
},
|
|
127
|
+
"%"
|
|
128
|
+
],
|
|
129
|
+
min: 0
|
|
130
|
+
})
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ jsx(Field, {
|
|
133
|
+
label: "One unit",
|
|
134
|
+
hint: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("code", { children: "unit=\"px\"" }), ", written in the corner"] }),
|
|
135
|
+
children: /* @__PURE__ */ jsx(SpacingBox, {
|
|
136
|
+
defaultValue: 4,
|
|
137
|
+
unit: "px",
|
|
138
|
+
min: 0
|
|
139
|
+
})
|
|
140
|
+
}),
|
|
141
|
+
/* @__PURE__ */ jsx(Field, {
|
|
142
|
+
label: "Not set",
|
|
143
|
+
hint: "Empty sides inherit",
|
|
144
|
+
children: /* @__PURE__ */ jsx(SpacingBox, {
|
|
145
|
+
defaultValue: {
|
|
146
|
+
top: 8,
|
|
147
|
+
bottom: 8
|
|
148
|
+
},
|
|
149
|
+
min: 0
|
|
150
|
+
})
|
|
151
|
+
})
|
|
152
|
+
]
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
function Disabled() {
|
|
156
|
+
return /* @__PURE__ */ jsx("div", {
|
|
157
|
+
className: "spacing-box-stack",
|
|
158
|
+
children: /* @__PURE__ */ jsx(Field, {
|
|
159
|
+
label: "Padding",
|
|
160
|
+
hint: "Set by the theme for this section",
|
|
161
|
+
children: /* @__PURE__ */ jsx(SpacingBox, {
|
|
162
|
+
defaultValue: {
|
|
163
|
+
top: 48,
|
|
164
|
+
right: 24,
|
|
165
|
+
bottom: 48,
|
|
166
|
+
left: 24
|
|
167
|
+
},
|
|
168
|
+
disabled: true,
|
|
169
|
+
units: ["px", "rem"]
|
|
170
|
+
})
|
|
171
|
+
})
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/** The builder's spacing group, at an inspector's width. */
|
|
175
|
+
function Inspector() {
|
|
176
|
+
const [margin, setMargin] = useState({
|
|
177
|
+
top: 0,
|
|
178
|
+
right: "auto",
|
|
179
|
+
bottom: 32,
|
|
180
|
+
left: "auto"
|
|
181
|
+
});
|
|
182
|
+
const [padding, setPadding] = useState({
|
|
183
|
+
top: 24,
|
|
184
|
+
right: 24,
|
|
185
|
+
bottom: 24,
|
|
186
|
+
left: 24
|
|
187
|
+
});
|
|
188
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
189
|
+
className: "spacing-box-inspector",
|
|
190
|
+
role: "group",
|
|
191
|
+
"aria-label": "Section spacing",
|
|
192
|
+
children: [
|
|
193
|
+
/* @__PURE__ */ jsx("p", {
|
|
194
|
+
className: "spacing-box-inspector__title",
|
|
195
|
+
children: "Spacing"
|
|
196
|
+
}),
|
|
197
|
+
/* @__PURE__ */ jsx(Field, {
|
|
198
|
+
label: "Margin",
|
|
199
|
+
children: /* @__PURE__ */ jsx(SpacingBox, {
|
|
200
|
+
value: margin,
|
|
201
|
+
onValueChange: setMargin,
|
|
202
|
+
allowAuto: true,
|
|
203
|
+
units: [
|
|
204
|
+
"px",
|
|
205
|
+
"rem",
|
|
206
|
+
"%"
|
|
207
|
+
]
|
|
208
|
+
})
|
|
209
|
+
}),
|
|
210
|
+
/* @__PURE__ */ jsx(Field, {
|
|
211
|
+
label: "Padding",
|
|
212
|
+
children: /* @__PURE__ */ jsx(SpacingBox, {
|
|
213
|
+
value: padding,
|
|
214
|
+
onValueChange: setPadding,
|
|
215
|
+
min: 0,
|
|
216
|
+
units: [
|
|
217
|
+
"px",
|
|
218
|
+
"rem",
|
|
219
|
+
"%"
|
|
220
|
+
]
|
|
221
|
+
})
|
|
222
|
+
})
|
|
223
|
+
]
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
function Page() {
|
|
227
|
+
return /* @__PURE__ */ jsxs(DocPage, {
|
|
228
|
+
title: "Spacing box",
|
|
229
|
+
status: "new",
|
|
230
|
+
importNames: [
|
|
231
|
+
"SpacingBox",
|
|
232
|
+
"spacingBoxLabels",
|
|
233
|
+
"spacingToCss",
|
|
234
|
+
"spacingFromCss"
|
|
235
|
+
],
|
|
236
|
+
lead: "Margin or padding on four sides, as the box model draws it: a value on each side of a box that stands for the element. Drag a side outwards to grow it, click it to type, or use the arrow keys; a link in the box gives every side one value.",
|
|
237
|
+
children: [
|
|
238
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
239
|
+
id: "basics",
|
|
240
|
+
title: "Basics",
|
|
241
|
+
description: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("p", { children: [
|
|
242
|
+
"Give ",
|
|
243
|
+
/* @__PURE__ */ jsx("code", { children: "SpacingBox" }),
|
|
244
|
+
" the four sides as ",
|
|
245
|
+
/* @__PURE__ */ jsx("code", { children: "{ top, right, bottom, left }" }),
|
|
246
|
+
" (or one value for all four) with ",
|
|
247
|
+
/* @__PURE__ */ jsx("code", { children: "onValueChange" }),
|
|
248
|
+
", or a ",
|
|
249
|
+
/* @__PURE__ */ jsx("code", { children: "defaultValue" }),
|
|
250
|
+
". A side is a number in the box's unit,",
|
|
251
|
+
" ",
|
|
252
|
+
/* @__PURE__ */ jsx("code", { children: "'auto'" }),
|
|
253
|
+
", or ",
|
|
254
|
+
/* @__PURE__ */ jsx("code", { children: "null" }),
|
|
255
|
+
" for not set. ",
|
|
256
|
+
/* @__PURE__ */ jsx("code", { children: "onValueChange" }),
|
|
257
|
+
" calls on every change, for a live preview, also while a side is dragged; ",
|
|
258
|
+
/* @__PURE__ */ jsx("code", { children: "onValueCommit" }),
|
|
259
|
+
" once a change is finished. Pass",
|
|
260
|
+
" ",
|
|
261
|
+
/* @__PURE__ */ jsx("code", { children: "units" }),
|
|
262
|
+
" for a unit list in the corner. ",
|
|
263
|
+
/* @__PURE__ */ jsx("code", { children: "spacingToCss" }),
|
|
264
|
+
" writes the shortest CSS."
|
|
265
|
+
] }), /* @__PURE__ */ jsxs("p", { children: [
|
|
266
|
+
"Inside a ",
|
|
267
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
268
|
+
to: "/components/input#field",
|
|
269
|
+
children: "Field"
|
|
270
|
+
}),
|
|
271
|
+
", the label names the sides (\"Top Padding\") and leads to the top one."
|
|
272
|
+
] })] }),
|
|
273
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
274
|
+
code: `
|
|
275
|
+
const [padding, setPadding] = useState({ top: 16, right: 24, bottom: 16, left: 24 })
|
|
276
|
+
const [unit, setUnit] = useState('px')
|
|
277
|
+
|
|
278
|
+
<Field label="Padding" hint="Space inside the section">
|
|
279
|
+
<SpacingBox value={padding} onValueChange={setPadding} min={0} units={['px', 'rem', '%']} unit={unit} onUnitChange={setUnit} />
|
|
280
|
+
</Field>
|
|
281
|
+
// spacingToCss(padding, unit) is '16px 24px'`,
|
|
282
|
+
children: /* @__PURE__ */ jsx(Padding, {})
|
|
283
|
+
})
|
|
284
|
+
}),
|
|
285
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
286
|
+
id: "margin",
|
|
287
|
+
title: "Margins: auto and below zero",
|
|
288
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
289
|
+
/* @__PURE__ */ jsx("code", { children: "allowAuto" }),
|
|
290
|
+
" lets a side be ",
|
|
291
|
+
/* @__PURE__ */ jsx("code", { children: "auto" }),
|
|
292
|
+
", typed as the word, as a margin can be (padding cannot). With no ",
|
|
293
|
+
/* @__PURE__ */ jsx("code", { children: "min" }),
|
|
294
|
+
", a side can go below zero, as a margin that pulls a block closer does; give padding",
|
|
295
|
+
" ",
|
|
296
|
+
/* @__PURE__ */ jsxs("code", { children: ["min=", "{0}"] }),
|
|
297
|
+
"."
|
|
298
|
+
] }),
|
|
299
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
300
|
+
code: `<SpacingBox value={margin} onValueChange={setMargin} allowAuto />`,
|
|
301
|
+
children: /* @__PURE__ */ jsx(Margin, {})
|
|
302
|
+
})
|
|
303
|
+
}),
|
|
304
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
305
|
+
id: "linking",
|
|
306
|
+
title: "Linking the sides",
|
|
307
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
308
|
+
"The link in the box makes one value set every side. It starts on when the four sides match and off when they differ, and turns off when the page hands it sides that no longer match; turning it on gives every side the top's value. Pass ",
|
|
309
|
+
/* @__PURE__ */ jsx("code", { children: "linked" }),
|
|
310
|
+
" and",
|
|
311
|
+
" ",
|
|
312
|
+
/* @__PURE__ */ jsx("code", { children: "onLinkedChange" }),
|
|
313
|
+
" to keep the choice yourself, for instance per element."
|
|
314
|
+
] }),
|
|
315
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
316
|
+
align: "fill",
|
|
317
|
+
code: `
|
|
318
|
+
<SpacingBox defaultValue={12} min={0} />
|
|
319
|
+
<SpacingBox defaultValue={{ top: 8, right: 16, bottom: 8, left: 16 }} min={0} />`,
|
|
320
|
+
children: /* @__PURE__ */ jsx(Linked, {})
|
|
321
|
+
})
|
|
322
|
+
}),
|
|
323
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
324
|
+
id: "editing",
|
|
325
|
+
title: "Dragging and typing",
|
|
326
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
327
|
+
"Each side of the well is a handle: press and drag it outwards (up for the top, right for the right, down for the bottom, left for the left) to grow that side, inwards to shrink it, a step for every 2px and ten with Shift. A press that does not move opens the side for typing, its value selected (a side still being typed in is applied first). On a touch screen a swipe up or down over the left or right side scrolls the page, and a drag the browser takes over that way puts the sides back. A side takes a number, with or without a unit (\"12px\"), the word auto where it is allowed, or nothing for not set; it is held to ",
|
|
328
|
+
/* @__PURE__ */ jsx("code", { children: "min" }),
|
|
329
|
+
" and",
|
|
330
|
+
" ",
|
|
331
|
+
/* @__PURE__ */ jsx("code", { children: "max" }),
|
|
332
|
+
" when you leave it or press Enter, and Escape puts back what it had."
|
|
333
|
+
] }),
|
|
334
|
+
children: /* @__PURE__ */ jsx(DocTable, {
|
|
335
|
+
columns: ["Keys", "On a side"],
|
|
336
|
+
rows: [
|
|
337
|
+
["Tab", "The sides in CSS order: top, right, bottom, left; then the link and the unit."],
|
|
338
|
+
["Up and Down arrows", "A step each, ten with Shift (Page Up and Page Down too), committed each time."],
|
|
339
|
+
["Typing, then Enter or Tab", "Sets the side, held to the bounds."],
|
|
340
|
+
["Escape", "Puts back what the side had when it took focus. With nothing to put back, it is the page’s."]
|
|
341
|
+
]
|
|
342
|
+
})
|
|
343
|
+
}),
|
|
344
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
345
|
+
id: "units",
|
|
346
|
+
title: "Units",
|
|
347
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
348
|
+
"With ",
|
|
349
|
+
/* @__PURE__ */ jsx("code", { children: "units" }),
|
|
350
|
+
", the corner holds a ",
|
|
351
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
352
|
+
to: "/components/unit-input#unit-select",
|
|
353
|
+
children: "UnitSelect"
|
|
354
|
+
}),
|
|
355
|
+
"; a unit given as an object sets its own ",
|
|
356
|
+
/* @__PURE__ */ jsx("code", { children: "min" }),
|
|
357
|
+
", ",
|
|
358
|
+
/* @__PURE__ */ jsx("code", { children: "max" }),
|
|
359
|
+
" and ",
|
|
360
|
+
/* @__PURE__ */ jsx("code", { children: "step" }),
|
|
361
|
+
" (a quarter rem). A new unit keeps the numbers, held to its bounds. Without a list, the corner writes the one ",
|
|
362
|
+
/* @__PURE__ */ jsx("code", { children: "unit" }),
|
|
363
|
+
"(px by default), or nothing for ",
|
|
364
|
+
/* @__PURE__ */ jsx("code", { children: "unit=\"\"" }),
|
|
365
|
+
". A side left out is not set, and shows a dash."
|
|
366
|
+
] }),
|
|
367
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
368
|
+
align: "fill",
|
|
369
|
+
code: `
|
|
370
|
+
<SpacingBox defaultValue={1} defaultUnit="rem" units={['px', { value: 'rem', step: 0.25 }, '%']} min={0} />
|
|
371
|
+
<SpacingBox defaultValue={4} unit="px" min={0} />
|
|
372
|
+
<SpacingBox defaultValue={{ top: 8, bottom: 8 }} min={0} />`,
|
|
373
|
+
children: /* @__PURE__ */ jsx(Units, {})
|
|
374
|
+
})
|
|
375
|
+
}),
|
|
376
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
377
|
+
id: "disabled",
|
|
378
|
+
title: "Disabled",
|
|
379
|
+
description: /* @__PURE__ */ jsx("p", { children: "Every side, the drag, the link and the unit switch off together." }),
|
|
380
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
381
|
+
code: `<SpacingBox defaultValue={{ top: 48, right: 24, bottom: 48, left: 24 }} disabled units={['px', 'rem']} />`,
|
|
382
|
+
children: /* @__PURE__ */ jsx(Disabled, {})
|
|
383
|
+
})
|
|
384
|
+
}),
|
|
385
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
386
|
+
id: "inspector",
|
|
387
|
+
title: "In an inspector",
|
|
388
|
+
description: /* @__PURE__ */ jsx("p", { children: "The page builder's spacing group, at the settings panel's 288px: a margin that centres the section, and its padding." }),
|
|
389
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
390
|
+
code: `
|
|
391
|
+
<Field label="Margin">
|
|
392
|
+
<SpacingBox value={margin} onValueChange={setMargin} allowAuto units={['px', 'rem', '%']} />
|
|
393
|
+
</Field>
|
|
394
|
+
<Field label="Padding">
|
|
395
|
+
<SpacingBox value={padding} onValueChange={setPadding} min={0} units={['px', 'rem', '%']} />
|
|
396
|
+
</Field>`,
|
|
397
|
+
children: /* @__PURE__ */ jsx(Inspector, {})
|
|
398
|
+
})
|
|
399
|
+
}),
|
|
400
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
401
|
+
id: "themes",
|
|
402
|
+
title: "Light and dark",
|
|
403
|
+
children: /* @__PURE__ */ jsx(ThemePair, {
|
|
404
|
+
align: "fill",
|
|
405
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
406
|
+
className: "spacing-box-stack",
|
|
407
|
+
children: /* @__PURE__ */ jsx(SpacingBox, {
|
|
408
|
+
"aria-label": "Padding",
|
|
409
|
+
defaultValue: {
|
|
410
|
+
top: 16,
|
|
411
|
+
right: "auto",
|
|
412
|
+
bottom: null,
|
|
413
|
+
left: -8
|
|
414
|
+
},
|
|
415
|
+
allowAuto: true,
|
|
416
|
+
units: ["px", "rem"]
|
|
417
|
+
})
|
|
418
|
+
})
|
|
419
|
+
})
|
|
420
|
+
}),
|
|
421
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
422
|
+
id: "accessibility",
|
|
423
|
+
title: "Accessibility",
|
|
424
|
+
children: [/* @__PURE__ */ jsx(Guidelines, { items: [
|
|
425
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
426
|
+
"Each side is a field (a ",
|
|
427
|
+
/* @__PURE__ */ jsx("code", { children: "spinbutton" }),
|
|
428
|
+
") named for its place and the box (\"Top Padding\"), with its value spoken (\"16px\", \"auto\", \"Not set\") and its bounds. The page builder's box could only be dragged or double-clicked; here every side is reached with Tab and stepped with the arrow keys."
|
|
429
|
+
] }),
|
|
430
|
+
/* @__PURE__ */ jsx(Fragment$1, { children: "The link is a toggle button, pressed while one value sets every side, with what it does in a tooltip." }),
|
|
431
|
+
/* @__PURE__ */ jsx(Fragment$1, { children: "The box model is drawn the way the page is, left on the left, in right-to-left text too: the sides are the CSS sides they set. Under forced colours the well and the element keep system outlines." }),
|
|
432
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
433
|
+
"Translate the words with ",
|
|
434
|
+
/* @__PURE__ */ jsx("code", { children: "labels" }),
|
|
435
|
+
"; ",
|
|
436
|
+
/* @__PURE__ */ jsx("code", { children: "spacingBoxLabels" }),
|
|
437
|
+
" is the English set."
|
|
438
|
+
] })
|
|
439
|
+
] }), /* @__PURE__ */ jsxs(Note, {
|
|
440
|
+
title: "For one value only",
|
|
441
|
+
children: [
|
|
442
|
+
"A setting with one spacing value (a gap between columns) is a ",
|
|
443
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
444
|
+
to: "/components/unit-input",
|
|
445
|
+
children: "UnitInput"
|
|
446
|
+
}),
|
|
447
|
+
" or a",
|
|
448
|
+
" ",
|
|
449
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
450
|
+
to: "/components/slider",
|
|
451
|
+
children: "Slider"
|
|
452
|
+
}),
|
|
453
|
+
"."
|
|
454
|
+
]
|
|
455
|
+
})]
|
|
456
|
+
}),
|
|
457
|
+
/* @__PURE__ */ jsx(Fragment$1, {}),
|
|
458
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
459
|
+
id: "props",
|
|
460
|
+
title: "Props",
|
|
461
|
+
children: [/* @__PURE__ */ jsx(PropsTable, { rows: [
|
|
462
|
+
{
|
|
463
|
+
name: "value",
|
|
464
|
+
type: "Partial<SpacingValue> | number | 'auto' | null",
|
|
465
|
+
description: "The sides, for a controlled box; one value sets all four. A side left out is not set."
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
name: "defaultValue",
|
|
469
|
+
type: "the same",
|
|
470
|
+
description: "The sides at first, when it is not controlled."
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
name: "onValueChange",
|
|
474
|
+
type: "(value: SpacingValue) => void",
|
|
475
|
+
description: "Called on every change, while a side is dragged too."
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
name: "onValueCommit",
|
|
479
|
+
type: "(value: SpacingValue) => void",
|
|
480
|
+
description: "Called once a change is finished, when the sides differ from where it began."
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
name: "unit / defaultUnit / onUnitChange",
|
|
484
|
+
type: "string",
|
|
485
|
+
default: "the first unit, or px",
|
|
486
|
+
description: "The unit the numbers are in."
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
name: "units",
|
|
490
|
+
type: "readonly (string | UnitOption)[]",
|
|
491
|
+
description: "The units to choose from, in the corner. Left out, the unit is written there."
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
name: "min",
|
|
495
|
+
type: "number",
|
|
496
|
+
description: "The smallest a side may be. Left out, below zero is allowed (margins)."
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
name: "max",
|
|
500
|
+
type: "number",
|
|
501
|
+
description: "The largest a side may be."
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
name: "step",
|
|
505
|
+
type: "number",
|
|
506
|
+
default: "1",
|
|
507
|
+
description: "How far an arrow, or 2px of drag, moves a side. A unit may set its own."
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
name: "allowAuto",
|
|
511
|
+
type: "boolean",
|
|
512
|
+
default: "false",
|
|
513
|
+
description: "Lets a side be auto."
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
name: "linked / onLinkedChange",
|
|
517
|
+
type: "boolean",
|
|
518
|
+
description: "Whether one value sets every side, for a controlled link. By default it starts on when the sides match."
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
name: "disabled",
|
|
522
|
+
type: "boolean",
|
|
523
|
+
default: "false",
|
|
524
|
+
description: "Switches off the sides, the drag, the link and the unit."
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
name: "locale",
|
|
528
|
+
type: "string",
|
|
529
|
+
default: "'en-GB'",
|
|
530
|
+
description: "The locale the numbers are written and read in."
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
name: "labels",
|
|
534
|
+
type: "Partial<SpacingBoxLabels>",
|
|
535
|
+
description: "The side names, the link and its tooltips, auto, Not set and Unit."
|
|
536
|
+
}
|
|
537
|
+
] }), /* @__PURE__ */ jsx(DocTable, {
|
|
538
|
+
columns: ["Helper", "What it does"],
|
|
539
|
+
rows: [
|
|
540
|
+
[/* @__PURE__ */ jsx("code", { children: "spacingToCss(value, unit)" }, "t"), "The shortest CSS for four sides: '8px', '8px 16px', '0px auto'; '' with no side set."],
|
|
541
|
+
[/* @__PURE__ */ jsx("code", { children: "spacingFromCss(text, defaultUnit?)" }, "f"), "Reads one to four lengths into the sides and their unit: '0 auto 4px' is top 0, sides auto, bottom 4, in px. Shorthand in two units ('8px 1rem'), which one box cannot hold, reads as no side set, so check it before you show it."],
|
|
542
|
+
[/* @__PURE__ */ jsx("code", { children: "normaliseSpacing(input)" }, "n"), "The four sides from an object, a number or auto."]
|
|
543
|
+
]
|
|
544
|
+
})]
|
|
545
|
+
})
|
|
546
|
+
]
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
//#endregion
|
|
550
|
+
export { Page, Preview };
|