@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
|
@@ -1,607 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { t as DocLink } from "./host-B6znjEgQ.js";
|
|
3
|
-
import { a as DocTable, d as Section, i as DocPage, m as ThemePair, o as Example, r as DoDont, s as Guidelines, u as PropsTable } from "./docs-BNOb7AqR.js";
|
|
4
|
-
import { useMemo, useState } from "react";
|
|
5
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { Avatar, Badge, Button, Checkbox, IconButton, Pagination, Table, TableBody, TableCell, TableFrame, TableHead, TableHeaderCell, TableRow } from "@orbitcommerce/constellation";
|
|
7
|
-
import { DotsThreeIcon, PackageIcon, PrinterIcon } from "@orbitcommerce/constellation/icons";
|
|
8
|
-
//#region src/pages/components/table.tsx
|
|
9
|
-
var PAID = {
|
|
10
|
-
label: "Paid",
|
|
11
|
-
tone: "positive"
|
|
12
|
-
};
|
|
13
|
-
var PENDING = {
|
|
14
|
-
label: "Payment pending",
|
|
15
|
-
tone: "warning"
|
|
16
|
-
};
|
|
17
|
-
var REFUNDED = {
|
|
18
|
-
label: "Refunded",
|
|
19
|
-
tone: "negative"
|
|
20
|
-
};
|
|
21
|
-
var UNFULFILLED = {
|
|
22
|
-
label: "Unfulfilled",
|
|
23
|
-
tone: "warning"
|
|
24
|
-
};
|
|
25
|
-
var FULFILLED = {
|
|
26
|
-
label: "Fulfilled",
|
|
27
|
-
tone: "positive"
|
|
28
|
-
};
|
|
29
|
-
var ORDERS = [
|
|
30
|
-
{
|
|
31
|
-
id: "o1",
|
|
32
|
-
number: "#1043",
|
|
33
|
-
customer: "Sarah Whitfield",
|
|
34
|
-
date: "29 Sep, 14:02",
|
|
35
|
-
total: 240,
|
|
36
|
-
payment: PAID,
|
|
37
|
-
fulfilment: UNFULFILLED,
|
|
38
|
-
items: 2
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
id: "o2",
|
|
42
|
-
number: "#1042",
|
|
43
|
-
customer: "James Okafor",
|
|
44
|
-
date: "29 Sep, 11:47",
|
|
45
|
-
total: 89.5,
|
|
46
|
-
payment: PENDING,
|
|
47
|
-
fulfilment: UNFULFILLED,
|
|
48
|
-
items: 1
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
id: "o3",
|
|
52
|
-
number: "#1041",
|
|
53
|
-
customer: "Priya Shah",
|
|
54
|
-
date: "28 Sep, 19:20",
|
|
55
|
-
total: 1120,
|
|
56
|
-
payment: PAID,
|
|
57
|
-
fulfilment: FULFILLED,
|
|
58
|
-
items: 4
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
id: "o4",
|
|
62
|
-
number: "#1040",
|
|
63
|
-
customer: "Tom Hughes",
|
|
64
|
-
date: "28 Sep, 09:05",
|
|
65
|
-
total: 34.99,
|
|
66
|
-
payment: REFUNDED,
|
|
67
|
-
fulfilment: FULFILLED,
|
|
68
|
-
items: 1
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
id: "o5",
|
|
72
|
-
number: "#1039",
|
|
73
|
-
customer: "Eleanor Price",
|
|
74
|
-
date: "27 Sep, 16:33",
|
|
75
|
-
total: 412.8,
|
|
76
|
-
payment: PAID,
|
|
77
|
-
fulfilment: FULFILLED,
|
|
78
|
-
items: 3
|
|
79
|
-
}
|
|
80
|
-
];
|
|
81
|
-
var gbp = new Intl.NumberFormat("en-GB", {
|
|
82
|
-
style: "currency",
|
|
83
|
-
currency: "GBP"
|
|
84
|
-
});
|
|
85
|
-
function OrdersTable({ rows = ORDERS, density = "comfortable", selectable = false, sortable = false }) {
|
|
86
|
-
const [selected, setSelected] = useState({ o2: true });
|
|
87
|
-
const [sort, setSort] = useState({
|
|
88
|
-
key: "date",
|
|
89
|
-
dir: "descending"
|
|
90
|
-
});
|
|
91
|
-
const sorted = useMemo(() => {
|
|
92
|
-
if (!sortable) return rows;
|
|
93
|
-
const list = [...rows];
|
|
94
|
-
if (sort.key === "total") list.sort((a, b) => sort.dir === "ascending" ? a.total - b.total : b.total - a.total);
|
|
95
|
-
else if (sort.dir === "ascending") list.reverse();
|
|
96
|
-
return list;
|
|
97
|
-
}, [
|
|
98
|
-
rows,
|
|
99
|
-
sortable,
|
|
100
|
-
sort
|
|
101
|
-
]);
|
|
102
|
-
const count = Object.values(selected).filter(Boolean).length;
|
|
103
|
-
const all = count === rows.length ? true : count === 0 ? false : "indeterminate";
|
|
104
|
-
const sortOf = (key) => sort.key === key ? sort.dir : "none";
|
|
105
|
-
const toggleSort = (key) => setSort((s) => ({
|
|
106
|
-
key,
|
|
107
|
-
dir: s.key === key && s.dir === "descending" ? "ascending" : "descending"
|
|
108
|
-
}));
|
|
109
|
-
return /* @__PURE__ */ jsx(TableFrame, {
|
|
110
|
-
className: "table-demo",
|
|
111
|
-
children: /* @__PURE__ */ jsxs(Table, {
|
|
112
|
-
density,
|
|
113
|
-
children: [/* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
114
|
-
selectable ? /* @__PURE__ */ jsx(TableHeaderCell, {
|
|
115
|
-
style: { width: 44 },
|
|
116
|
-
children: /* @__PURE__ */ jsx(Checkbox, {
|
|
117
|
-
"aria-label": "Select all orders",
|
|
118
|
-
checked: all,
|
|
119
|
-
onCheckedChange: (next) => setSelected(Object.fromEntries(rows.map((r) => [r.id, next])))
|
|
120
|
-
})
|
|
121
|
-
}) : null,
|
|
122
|
-
/* @__PURE__ */ jsx(TableHeaderCell, { children: "Order" }),
|
|
123
|
-
/* @__PURE__ */ jsx(TableHeaderCell, {
|
|
124
|
-
sort: sortable ? sortOf("date") : void 0,
|
|
125
|
-
onSort: sortable ? () => toggleSort("date") : void 0,
|
|
126
|
-
children: "Date"
|
|
127
|
-
}),
|
|
128
|
-
/* @__PURE__ */ jsx(TableHeaderCell, { children: "Customer" }),
|
|
129
|
-
/* @__PURE__ */ jsx(TableHeaderCell, { children: "Payment" }),
|
|
130
|
-
/* @__PURE__ */ jsx(TableHeaderCell, { children: "Fulfilment" }),
|
|
131
|
-
/* @__PURE__ */ jsx(TableHeaderCell, {
|
|
132
|
-
align: "end",
|
|
133
|
-
sort: sortable ? sortOf("total") : void 0,
|
|
134
|
-
onSort: sortable ? () => toggleSort("total") : void 0,
|
|
135
|
-
children: "Total"
|
|
136
|
-
})
|
|
137
|
-
] }) }), /* @__PURE__ */ jsx(TableBody, { children: sorted.map((order) => /* @__PURE__ */ jsxs(TableRow, {
|
|
138
|
-
interactive: true,
|
|
139
|
-
selected: selectable && !!selected[order.id],
|
|
140
|
-
children: [
|
|
141
|
-
selectable ? /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Checkbox, {
|
|
142
|
-
"aria-label": `Select order ${order.number}`,
|
|
143
|
-
checked: !!selected[order.id],
|
|
144
|
-
onCheckedChange: (next) => setSelected((s) => ({
|
|
145
|
-
...s,
|
|
146
|
-
[order.id]: next
|
|
147
|
-
}))
|
|
148
|
-
}) }) : null,
|
|
149
|
-
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx("a", {
|
|
150
|
-
href: "#basics",
|
|
151
|
-
children: order.number
|
|
152
|
-
}) }),
|
|
153
|
-
/* @__PURE__ */ jsx(TableCell, {
|
|
154
|
-
className: "table-demo__quiet",
|
|
155
|
-
children: order.date
|
|
156
|
-
}),
|
|
157
|
-
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsxs("span", {
|
|
158
|
-
className: "table-demo__who",
|
|
159
|
-
children: [/* @__PURE__ */ jsx(Avatar, {
|
|
160
|
-
size: "xs",
|
|
161
|
-
name: order.customer
|
|
162
|
-
}), order.customer]
|
|
163
|
-
}) }),
|
|
164
|
-
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Badge, {
|
|
165
|
-
size: "sm",
|
|
166
|
-
tone: order.payment.tone,
|
|
167
|
-
dot: true,
|
|
168
|
-
children: order.payment.label
|
|
169
|
-
}) }),
|
|
170
|
-
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Badge, {
|
|
171
|
-
size: "sm",
|
|
172
|
-
tone: order.fulfilment.tone,
|
|
173
|
-
dot: true,
|
|
174
|
-
children: order.fulfilment.label
|
|
175
|
-
}) }),
|
|
176
|
-
/* @__PURE__ */ jsx(TableCell, {
|
|
177
|
-
numeric: true,
|
|
178
|
-
children: gbp.format(order.total)
|
|
179
|
-
})
|
|
180
|
-
]
|
|
181
|
-
}, order.id)) })]
|
|
182
|
-
})
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
function SelectionDemo() {
|
|
186
|
-
const [selected, setSelected] = useState({
|
|
187
|
-
o1: true,
|
|
188
|
-
o2: true
|
|
189
|
-
});
|
|
190
|
-
const count = Object.values(selected).filter(Boolean).length;
|
|
191
|
-
const all = count === ORDERS.length ? true : count === 0 ? false : "indeterminate";
|
|
192
|
-
return /* @__PURE__ */ jsx(TableFrame, {
|
|
193
|
-
className: "table-demo",
|
|
194
|
-
children: /* @__PURE__ */ jsxs(Table, { children: [/* @__PURE__ */ jsx(TableHead, { children: count > 0 ? /* @__PURE__ */ jsxs(TableRow, { children: [/* @__PURE__ */ jsx(TableHeaderCell, {
|
|
195
|
-
style: { width: 44 },
|
|
196
|
-
children: /* @__PURE__ */ jsx(Checkbox, {
|
|
197
|
-
"aria-label": "Select all orders",
|
|
198
|
-
checked: all,
|
|
199
|
-
onCheckedChange: (next) => setSelected(Object.fromEntries(ORDERS.map((r) => [r.id, next])))
|
|
200
|
-
})
|
|
201
|
-
}), /* @__PURE__ */ jsx(TableHeaderCell, {
|
|
202
|
-
colSpan: 3,
|
|
203
|
-
children: /* @__PURE__ */ jsxs("span", {
|
|
204
|
-
className: "table-demo__bulk",
|
|
205
|
-
children: [
|
|
206
|
-
/* @__PURE__ */ jsxs("strong", { children: [count, " selected"] }),
|
|
207
|
-
/* @__PURE__ */ jsx(Button, {
|
|
208
|
-
size: "xs",
|
|
209
|
-
variant: "soft",
|
|
210
|
-
icon: /* @__PURE__ */ jsx(PackageIcon, {}),
|
|
211
|
-
children: "Fulfil"
|
|
212
|
-
}),
|
|
213
|
-
/* @__PURE__ */ jsx(Button, {
|
|
214
|
-
size: "xs",
|
|
215
|
-
variant: "soft",
|
|
216
|
-
icon: /* @__PURE__ */ jsx(PrinterIcon, {}),
|
|
217
|
-
children: "Print packing slips"
|
|
218
|
-
}),
|
|
219
|
-
/* @__PURE__ */ jsx(IconButton, {
|
|
220
|
-
size: "xs",
|
|
221
|
-
label: "More actions",
|
|
222
|
-
children: /* @__PURE__ */ jsx(DotsThreeIcon, {})
|
|
223
|
-
})
|
|
224
|
-
]
|
|
225
|
-
})
|
|
226
|
-
})] }) : /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
227
|
-
/* @__PURE__ */ jsx(TableHeaderCell, {
|
|
228
|
-
style: { width: 44 },
|
|
229
|
-
children: /* @__PURE__ */ jsx(Checkbox, {
|
|
230
|
-
"aria-label": "Select all orders",
|
|
231
|
-
checked: false,
|
|
232
|
-
onCheckedChange: (next) => setSelected(Object.fromEntries(ORDERS.map((r) => [r.id, next])))
|
|
233
|
-
})
|
|
234
|
-
}),
|
|
235
|
-
/* @__PURE__ */ jsx(TableHeaderCell, { children: "Order" }),
|
|
236
|
-
/* @__PURE__ */ jsx(TableHeaderCell, { children: "Customer" }),
|
|
237
|
-
/* @__PURE__ */ jsx(TableHeaderCell, {
|
|
238
|
-
align: "end",
|
|
239
|
-
children: "Total"
|
|
240
|
-
})
|
|
241
|
-
] }) }), /* @__PURE__ */ jsx(TableBody, { children: ORDERS.map((order) => /* @__PURE__ */ jsxs(TableRow, {
|
|
242
|
-
interactive: true,
|
|
243
|
-
selected: !!selected[order.id],
|
|
244
|
-
children: [
|
|
245
|
-
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Checkbox, {
|
|
246
|
-
"aria-label": `Select order ${order.number}`,
|
|
247
|
-
checked: !!selected[order.id],
|
|
248
|
-
onCheckedChange: (next) => setSelected((s) => ({
|
|
249
|
-
...s,
|
|
250
|
-
[order.id]: next
|
|
251
|
-
}))
|
|
252
|
-
}) }),
|
|
253
|
-
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx("a", {
|
|
254
|
-
href: "#selection",
|
|
255
|
-
children: order.number
|
|
256
|
-
}) }),
|
|
257
|
-
/* @__PURE__ */ jsx(TableCell, { children: order.customer }),
|
|
258
|
-
/* @__PURE__ */ jsx(TableCell, {
|
|
259
|
-
numeric: true,
|
|
260
|
-
children: gbp.format(order.total)
|
|
261
|
-
})
|
|
262
|
-
]
|
|
263
|
-
}, order.id)) })] })
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
function FramedDemo() {
|
|
267
|
-
const [page, setPage] = useState(1);
|
|
268
|
-
const many = Array.from({ length: 12 }, (_, i) => ({
|
|
269
|
-
...ORDERS[i % ORDERS.length],
|
|
270
|
-
id: `m${i}`,
|
|
271
|
-
number: `#${1043 - i}`
|
|
272
|
-
}));
|
|
273
|
-
return /* @__PURE__ */ jsx(TableFrame, {
|
|
274
|
-
height: 300,
|
|
275
|
-
className: "table-demo",
|
|
276
|
-
footer: /* @__PURE__ */ jsx(Pagination, {
|
|
277
|
-
page,
|
|
278
|
-
pageCount: 25,
|
|
279
|
-
onPageChange: setPage,
|
|
280
|
-
summary: "1–50 of 1,241 orders"
|
|
281
|
-
}),
|
|
282
|
-
children: /* @__PURE__ */ jsxs(Table, {
|
|
283
|
-
density: "compact",
|
|
284
|
-
children: [/* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
285
|
-
/* @__PURE__ */ jsx(TableHeaderCell, { children: "Order" }),
|
|
286
|
-
/* @__PURE__ */ jsx(TableHeaderCell, { children: "Customer" }),
|
|
287
|
-
/* @__PURE__ */ jsx(TableHeaderCell, { children: "Payment" }),
|
|
288
|
-
/* @__PURE__ */ jsx(TableHeaderCell, {
|
|
289
|
-
align: "end",
|
|
290
|
-
children: "Total"
|
|
291
|
-
})
|
|
292
|
-
] }) }), /* @__PURE__ */ jsx(TableBody, { children: many.map((order) => /* @__PURE__ */ jsxs(TableRow, {
|
|
293
|
-
interactive: true,
|
|
294
|
-
children: [
|
|
295
|
-
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx("a", {
|
|
296
|
-
href: "#frame",
|
|
297
|
-
children: order.number
|
|
298
|
-
}) }),
|
|
299
|
-
/* @__PURE__ */ jsx(TableCell, { children: order.customer }),
|
|
300
|
-
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Badge, {
|
|
301
|
-
size: "sm",
|
|
302
|
-
tone: order.payment.tone,
|
|
303
|
-
dot: true,
|
|
304
|
-
children: order.payment.label
|
|
305
|
-
}) }),
|
|
306
|
-
/* @__PURE__ */ jsx(TableCell, {
|
|
307
|
-
numeric: true,
|
|
308
|
-
children: gbp.format(order.total)
|
|
309
|
-
})
|
|
310
|
-
]
|
|
311
|
-
}, order.id)) })]
|
|
312
|
-
})
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
function Preview() {
|
|
316
|
-
return /* @__PURE__ */ jsx("div", {
|
|
317
|
-
className: "table-preview",
|
|
318
|
-
children: /* @__PURE__ */ jsx(OrdersTable, {
|
|
319
|
-
rows: ORDERS.slice(0, 3),
|
|
320
|
-
density: "compact"
|
|
321
|
-
})
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
function Page() {
|
|
325
|
-
return /* @__PURE__ */ jsxs(DocPage, {
|
|
326
|
-
title: "Table",
|
|
327
|
-
status: "new",
|
|
328
|
-
importNames: [
|
|
329
|
-
"TableFrame",
|
|
330
|
-
"Table",
|
|
331
|
-
"TableHead",
|
|
332
|
-
"TableBody",
|
|
333
|
-
"TableRow",
|
|
334
|
-
"TableHeaderCell",
|
|
335
|
-
"TableCell"
|
|
336
|
-
],
|
|
337
|
-
lead: "Rows of records on hairlines: orders, products, customers. Quiet headings that stay put while the rows scroll, a soft hover, and a line of teal on the rows you have chosen.",
|
|
338
|
-
children: [
|
|
339
|
-
/* @__PURE__ */ jsx(Section, {
|
|
340
|
-
id: "basics",
|
|
341
|
-
title: "Basics",
|
|
342
|
-
description: /* @__PURE__ */ jsx("p", { children: "Plain table elements dressed by the kit, so bring any data engine (Orbit Commerce's store dashboard uses TanStack Table with virtual rows). Links in cells read as ink until pointed at: the row is the target." }),
|
|
343
|
-
children: /* @__PURE__ */ jsx(Example, {
|
|
344
|
-
align: "fill",
|
|
345
|
-
code: `
|
|
346
|
-
<TableFrame>
|
|
347
|
-
<Table>
|
|
348
|
-
<TableHead>
|
|
349
|
-
<TableRow>
|
|
350
|
-
<TableHeaderCell>Order</TableHeaderCell>
|
|
351
|
-
<TableHeaderCell>Customer</TableHeaderCell>
|
|
352
|
-
<TableHeaderCell>Payment</TableHeaderCell>
|
|
353
|
-
<TableHeaderCell align="end">Total</TableHeaderCell>
|
|
354
|
-
</TableRow>
|
|
355
|
-
</TableHead>
|
|
356
|
-
<TableBody>
|
|
357
|
-
{orders.map((order) => (
|
|
358
|
-
<TableRow key={order.id} interactive onClick={() => open(order)}>
|
|
359
|
-
<TableCell><Link to={order.href}>{order.number}</Link></TableCell>
|
|
360
|
-
<TableCell>{order.customer}</TableCell>
|
|
361
|
-
<TableCell><Badge size="sm" tone="positive" dot>Paid</Badge></TableCell>
|
|
362
|
-
<TableCell numeric>{gbp.format(order.total)}</TableCell>
|
|
363
|
-
</TableRow>
|
|
364
|
-
))}
|
|
365
|
-
</TableBody>
|
|
366
|
-
</Table>
|
|
367
|
-
</TableFrame>`,
|
|
368
|
-
children: /* @__PURE__ */ jsx(OrdersTable, {})
|
|
369
|
-
})
|
|
370
|
-
}),
|
|
371
|
-
/* @__PURE__ */ jsx(Section, {
|
|
372
|
-
id: "selection",
|
|
373
|
-
title: "Selection",
|
|
374
|
-
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
375
|
-
"A ",
|
|
376
|
-
/* @__PURE__ */ jsx(DocLink, {
|
|
377
|
-
to: "/components/checkbox",
|
|
378
|
-
children: "Checkbox"
|
|
379
|
-
}),
|
|
380
|
-
" column; the head box goes part-ticked while some rows are chosen. Chosen rows take a teal line on their leading edge and a tint. While anything is selected, the head row can make way for the actions that apply to the selection."
|
|
381
|
-
] }),
|
|
382
|
-
children: /* @__PURE__ */ jsx(Example, {
|
|
383
|
-
align: "fill",
|
|
384
|
-
code: `<TableRow selected={!!selected[order.id]}>…</TableRow>`,
|
|
385
|
-
children: /* @__PURE__ */ jsx(SelectionDemo, {})
|
|
386
|
-
})
|
|
387
|
-
}),
|
|
388
|
-
/* @__PURE__ */ jsx(Section, {
|
|
389
|
-
id: "sorting",
|
|
390
|
-
title: "Sorting",
|
|
391
|
-
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
392
|
-
"Give a heading ",
|
|
393
|
-
/* @__PURE__ */ jsx("code", { children: "sort" }),
|
|
394
|
-
" and ",
|
|
395
|
-
/* @__PURE__ */ jsx("code", { children: "onSort" }),
|
|
396
|
-
" and it becomes a button with an arrow; the header cell carries ",
|
|
397
|
-
/* @__PURE__ */ jsx("code", { children: "aria-sort" }),
|
|
398
|
-
". Press Date or Total."
|
|
399
|
-
] }),
|
|
400
|
-
children: /* @__PURE__ */ jsx(Example, {
|
|
401
|
-
align: "fill",
|
|
402
|
-
code: `<TableHeaderCell align="end" sort={sort.key === 'total' ? sort.dir : 'none'} onSort={() => toggle('total')}>
|
|
403
|
-
Total
|
|
404
|
-
</TableHeaderCell>`,
|
|
405
|
-
children: /* @__PURE__ */ jsx(OrdersTable, { sortable: true })
|
|
406
|
-
})
|
|
407
|
-
}),
|
|
408
|
-
/* @__PURE__ */ jsx(Section, {
|
|
409
|
-
id: "frame",
|
|
410
|
-
title: "Frame, scrolling and pages",
|
|
411
|
-
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
412
|
-
/* @__PURE__ */ jsx("code", { children: "TableFrame" }),
|
|
413
|
-
" is the hairline box with its own scroll area: set ",
|
|
414
|
-
/* @__PURE__ */ jsx("code", { children: "height" }),
|
|
415
|
-
" and the headings stay put while rows scroll. ",
|
|
416
|
-
/* @__PURE__ */ jsx("code", { children: "footer" }),
|
|
417
|
-
" pins ",
|
|
418
|
-
/* @__PURE__ */ jsx(DocLink, {
|
|
419
|
-
to: "/components/pagination",
|
|
420
|
-
children: "Pagination"
|
|
421
|
-
}),
|
|
422
|
-
" under it. Its ref goes to the scroll area, for virtual rows."
|
|
423
|
-
] }),
|
|
424
|
-
children: /* @__PURE__ */ jsx(Example, {
|
|
425
|
-
align: "fill",
|
|
426
|
-
code: `
|
|
427
|
-
<TableFrame height={300} footer={<Pagination page={page} pageCount={25} onPageChange={setPage} summary="1–50 of 1,241 orders" />}>
|
|
428
|
-
<Table density="compact">…</Table>
|
|
429
|
-
</TableFrame>`,
|
|
430
|
-
children: /* @__PURE__ */ jsx(FramedDemo, {})
|
|
431
|
-
})
|
|
432
|
-
}),
|
|
433
|
-
/* @__PURE__ */ jsx(Section, {
|
|
434
|
-
id: "density",
|
|
435
|
-
title: "Density",
|
|
436
|
-
description: /* @__PURE__ */ jsx("p", { children: "Rows are 56px (comfortable, the default) or 44px (compact) for long lists and side panels." }),
|
|
437
|
-
children: /* @__PURE__ */ jsx(Example, {
|
|
438
|
-
align: "fill",
|
|
439
|
-
code: `<Table density="compact">…</Table>`,
|
|
440
|
-
children: /* @__PURE__ */ jsx(OrdersTable, { density: "compact" })
|
|
441
|
-
})
|
|
442
|
-
}),
|
|
443
|
-
/* @__PURE__ */ jsx(Section, {
|
|
444
|
-
id: "both-themes",
|
|
445
|
-
title: "In both themes",
|
|
446
|
-
children: /* @__PURE__ */ jsx(ThemePair, {
|
|
447
|
-
align: "fill",
|
|
448
|
-
children: /* @__PURE__ */ jsx(OrdersTable, {
|
|
449
|
-
rows: ORDERS.slice(0, 3),
|
|
450
|
-
density: "compact",
|
|
451
|
-
selectable: true
|
|
452
|
-
})
|
|
453
|
-
})
|
|
454
|
-
}),
|
|
455
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
456
|
-
id: "guidelines",
|
|
457
|
-
title: "Guidelines",
|
|
458
|
-
children: [
|
|
459
|
-
/* @__PURE__ */ jsx(DoDont, {
|
|
460
|
-
do: {
|
|
461
|
-
children: /* @__PURE__ */ jsxs("span", {
|
|
462
|
-
className: "table-demo__cell-sample",
|
|
463
|
-
children: [
|
|
464
|
-
/* @__PURE__ */ jsx("span", { children: "£1,120.00" }),
|
|
465
|
-
/* @__PURE__ */ jsx("span", { children: "£89.50" }),
|
|
466
|
-
/* @__PURE__ */ jsx("span", { children: "£34.99" })
|
|
467
|
-
]
|
|
468
|
-
}),
|
|
469
|
-
caption: "Money and counts in tabular figures, aligned to the end, so digits line up by place."
|
|
470
|
-
},
|
|
471
|
-
dont: {
|
|
472
|
-
children: /* @__PURE__ */ jsxs("span", {
|
|
473
|
-
className: "table-demo__cell-sample",
|
|
474
|
-
"data-start": "",
|
|
475
|
-
children: [
|
|
476
|
-
/* @__PURE__ */ jsx("span", { children: "£1,120.00" }),
|
|
477
|
-
/* @__PURE__ */ jsx("span", { children: "£89.50" }),
|
|
478
|
-
/* @__PURE__ */ jsx("span", { children: "£34.99" })
|
|
479
|
-
]
|
|
480
|
-
}),
|
|
481
|
-
caption: "Left-aligned amounts make readers hunt for the decimal point."
|
|
482
|
-
}
|
|
483
|
-
}),
|
|
484
|
-
/* @__PURE__ */ jsx(Guidelines, { items: [
|
|
485
|
-
"Lead with the thing people scan for (the order number, the product name) and keep it one line where you can.",
|
|
486
|
-
"Status in words on a badge, never colour alone. Brand teal is not a status colour: it marks selection.",
|
|
487
|
-
"One primary action per page, outside the table. Row actions go in a menu at the end of the row.",
|
|
488
|
-
"Keep headings short and in sentence case; the heading names the column, the cells carry the detail."
|
|
489
|
-
] }),
|
|
490
|
-
/* @__PURE__ */ jsx(Fragment$1, {})
|
|
491
|
-
]
|
|
492
|
-
}),
|
|
493
|
-
/* @__PURE__ */ jsx(Section, {
|
|
494
|
-
id: "accessibility",
|
|
495
|
-
title: "Accessibility",
|
|
496
|
-
children: /* @__PURE__ */ jsx(Guidelines, { items: [
|
|
497
|
-
"Real table elements: headers are th with scope=\"col\", so screen readers announce the column for each cell.",
|
|
498
|
-
"Sortable headings are buttons inside the th, and the th carries aria-sort.",
|
|
499
|
-
"A selected row carries aria-selected; every row checkbox names its row (\"Select order #1043\").",
|
|
500
|
-
"A clickable row also has a real link in its first cell, so keyboard users can open it with Tab and Enter."
|
|
501
|
-
] })
|
|
502
|
-
}),
|
|
503
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
504
|
-
id: "props",
|
|
505
|
-
title: "Props",
|
|
506
|
-
description: /* @__PURE__ */ jsx("p", { children: "Every part also accepts the native attributes of its element." }),
|
|
507
|
-
children: [
|
|
508
|
-
/* @__PURE__ */ jsx(PropsTable, {
|
|
509
|
-
title: "TableFrame",
|
|
510
|
-
rows: [
|
|
511
|
-
{
|
|
512
|
-
name: "height",
|
|
513
|
-
type: "number | string",
|
|
514
|
-
description: "Height of the scroll area. The headings stick while rows scroll."
|
|
515
|
-
},
|
|
516
|
-
{
|
|
517
|
-
name: "footer",
|
|
518
|
-
type: "ReactNode",
|
|
519
|
-
description: "Pinned under the scroll area, e.g. Pagination."
|
|
520
|
-
},
|
|
521
|
-
{
|
|
522
|
-
name: "ref",
|
|
523
|
-
type: "Ref<HTMLDivElement>",
|
|
524
|
-
description: "The scroll area, for virtual rows."
|
|
525
|
-
}
|
|
526
|
-
]
|
|
527
|
-
}),
|
|
528
|
-
/* @__PURE__ */ jsx(PropsTable, {
|
|
529
|
-
title: "Table",
|
|
530
|
-
rows: [{
|
|
531
|
-
name: "density",
|
|
532
|
-
type: "'comfortable' | 'compact'",
|
|
533
|
-
default: "'comfortable'",
|
|
534
|
-
description: "56 or 44px rows."
|
|
535
|
-
}, {
|
|
536
|
-
name: "layout",
|
|
537
|
-
type: "'auto' | 'fixed'",
|
|
538
|
-
default: "'auto'",
|
|
539
|
-
description: "fixed pins column widths to a colgroup: steady columns under virtual rows."
|
|
540
|
-
}]
|
|
541
|
-
}),
|
|
542
|
-
/* @__PURE__ */ jsx(PropsTable, {
|
|
543
|
-
title: "TableRow",
|
|
544
|
-
rows: [{
|
|
545
|
-
name: "selected",
|
|
546
|
-
type: "boolean",
|
|
547
|
-
default: "false",
|
|
548
|
-
description: "Teal line and tint; aria-selected."
|
|
549
|
-
}, {
|
|
550
|
-
name: "interactive",
|
|
551
|
-
type: "boolean",
|
|
552
|
-
default: "false",
|
|
553
|
-
description: "Pointer cursor: the row opens something."
|
|
554
|
-
}]
|
|
555
|
-
}),
|
|
556
|
-
/* @__PURE__ */ jsx(PropsTable, {
|
|
557
|
-
title: "TableHeaderCell and TableCell",
|
|
558
|
-
rows: [
|
|
559
|
-
{
|
|
560
|
-
name: "align",
|
|
561
|
-
type: "'start' | 'center' | 'end'",
|
|
562
|
-
default: "'start'",
|
|
563
|
-
description: "Text alignment."
|
|
564
|
-
},
|
|
565
|
-
{
|
|
566
|
-
name: "sort",
|
|
567
|
-
type: "'ascending' | 'descending' | 'none'",
|
|
568
|
-
description: "Header cell: current sort; sets aria-sort."
|
|
569
|
-
},
|
|
570
|
-
{
|
|
571
|
-
name: "onSort",
|
|
572
|
-
type: "() => void",
|
|
573
|
-
description: "Header cell: makes the heading a sort button."
|
|
574
|
-
},
|
|
575
|
-
{
|
|
576
|
-
name: "numeric",
|
|
577
|
-
type: "boolean",
|
|
578
|
-
default: "false",
|
|
579
|
-
description: "Cell: tabular figures, aligned to the end."
|
|
580
|
-
},
|
|
581
|
-
{
|
|
582
|
-
name: "truncate",
|
|
583
|
-
type: "boolean",
|
|
584
|
-
default: "false",
|
|
585
|
-
description: "Cell: one line with an ellipsis (set a column width)."
|
|
586
|
-
}
|
|
587
|
-
]
|
|
588
|
-
}),
|
|
589
|
-
/* @__PURE__ */ jsx(DocTable, {
|
|
590
|
-
columns: ["Part", "Element"],
|
|
591
|
-
rows: [
|
|
592
|
-
[/* @__PURE__ */ jsx("code", { children: "TableFrame" }), "div (frame) › div (scroll area)"],
|
|
593
|
-
[/* @__PURE__ */ jsx("code", { children: "Table" }), "table"],
|
|
594
|
-
[/* @__PURE__ */ jsx("code", { children: "TableHead" }), "thead"],
|
|
595
|
-
[/* @__PURE__ */ jsx("code", { children: "TableBody" }), "tbody"],
|
|
596
|
-
[/* @__PURE__ */ jsx("code", { children: "TableRow" }), "tr"],
|
|
597
|
-
[/* @__PURE__ */ jsx("code", { children: "TableHeaderCell" }), "th"],
|
|
598
|
-
[/* @__PURE__ */ jsx("code", { children: "TableCell" }), "td"]
|
|
599
|
-
]
|
|
600
|
-
})
|
|
601
|
-
]
|
|
602
|
-
})
|
|
603
|
-
]
|
|
604
|
-
});
|
|
605
|
-
}
|
|
606
|
-
//#endregion
|
|
607
|
-
export { Page, Preview };
|