@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,13 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as DocLink } from "./host-B6znjEgQ.js";
|
|
3
|
-
import { a as DocTable, d as Section, i as DocPage, l as Note, m as ThemePair, o as Example, p as SubSection, r as DoDont, s as Guidelines, u as PropsTable } from "./docs-
|
|
4
|
-
import { a as MenuSheet, c as SpecimenFrame, i as MenuRule, n as MenuHeading, r as MenuRow } from "./_overlays-specimens-
|
|
5
|
-
import {
|
|
3
|
+
import { a as DocTable, d as Section$1, i as DocPage, l as Note, m as ThemePair, n as CodeBlock$1, o as Example, p as SubSection, r as DoDont, s as Guidelines, u as PropsTable } from "./docs-lM2UBSir.js";
|
|
4
|
+
import { a as MenuSheet, c as SpecimenFrame, i as MenuRule, n as MenuHeading, r as MenuRow } from "./_overlays-specimens-bawR331Z.js";
|
|
5
|
+
import { useState } from "react";
|
|
6
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { Avatar, Badge, Button, ConfirmDialog, IconButton, Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuHeader, MenuItem, MenuLabel, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger } from "@orbitcommerce/constellation";
|
|
8
|
-
import { ArchiveIcon, ArrowCounterClockwiseIcon, ArrowSquareOutIcon, ArrowsDownUpIcon, BarcodeIcon, CaretDownIcon, CircleHalfIcon, ColumnsIcon, CopyIcon, DotsThreeIcon, DownloadSimpleIcon, EnvelopeSimpleIcon, EyeIcon, FilePdfIcon, GearSixIcon, KeyboardIcon, MonitorIcon, MoonIcon, PencilSimpleIcon, PlusIcon, PrinterIcon, QuestionIcon, ReceiptIcon, SignOutIcon, SlidersHorizontalIcon, StorefrontIcon, SunIcon, TrashIcon, TruckIcon, UserIcon, XCircleIcon } from "@orbitcommerce/constellation/icons";
|
|
7
|
+
import { Avatar, Badge, Button, ConfirmDialog, IconButton, Menu, MenuCheckboxItem, MenuChipTrigger, MenuContent, MenuGroup, MenuHeader, MenuInlineSub, MenuItem, MenuLabel, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger } from "@orbitcommerce/constellation";
|
|
8
|
+
import { ArchiveIcon, ArrowCounterClockwiseIcon, ArrowSquareOutIcon, ArrowsDownUpIcon, BarcodeIcon, CaretDownIcon, CircleHalfIcon, ColumnsIcon, CopyIcon, CpuIcon, DotsThreeIcon, DownloadSimpleIcon, EnvelopeSimpleIcon, EyeIcon, FilePdfIcon, FileTextIcon, GaugeIcon, GearSixIcon, KeyboardIcon, MagicWandIcon, MonitorIcon, MoonIcon, PenNibIcon, PencilSimpleIcon, PlusIcon, PrinterIcon, QuestionIcon, ReceiptIcon, SignOutIcon, SlidersHorizontalIcon, SparkleIcon, StorefrontIcon, SunIcon, TranslateIcon, TrashIcon, TruckIcon, UserIcon, XCircleIcon } from "@orbitcommerce/constellation/icons";
|
|
9
9
|
//#region src/pages/components/menu.tsx
|
|
10
10
|
var wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
11
|
+
var storeUrl = "https://harbourdesk.example";
|
|
12
|
+
var helpUrl = "https://help.example.com";
|
|
11
13
|
function Preview() {
|
|
12
14
|
return /* @__PURE__ */ jsxs(MenuSheet, {
|
|
13
15
|
width: 210,
|
|
@@ -33,7 +35,6 @@ function Preview() {
|
|
|
33
35
|
}
|
|
34
36
|
function OrderRowActions() {
|
|
35
37
|
const [cancelOpen, setCancelOpen] = useState(false);
|
|
36
|
-
const trigger = useRef(null);
|
|
37
38
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
|
|
38
39
|
className: "menu-order-row",
|
|
39
40
|
children: [
|
|
@@ -53,17 +54,11 @@ function OrderRowActions() {
|
|
|
53
54
|
className: "menu-order-row__total",
|
|
54
55
|
children: "£240.00"
|
|
55
56
|
}),
|
|
56
|
-
/* @__PURE__ */ jsx(OrderActionsMenu, {
|
|
57
|
-
triggerRef: trigger,
|
|
58
|
-
onCancel: () => setCancelOpen(true)
|
|
59
|
-
})
|
|
57
|
+
/* @__PURE__ */ jsx(OrderActionsMenu, { onCancel: () => setCancelOpen(true) })
|
|
60
58
|
]
|
|
61
59
|
}), /* @__PURE__ */ jsx(ConfirmDialog, {
|
|
62
60
|
open: cancelOpen,
|
|
63
|
-
onOpenChange:
|
|
64
|
-
setCancelOpen(open);
|
|
65
|
-
if (!open) requestAnimationFrame(() => trigger.current?.focus());
|
|
66
|
-
},
|
|
61
|
+
onOpenChange: setCancelOpen,
|
|
67
62
|
tone: "critical",
|
|
68
63
|
title: "Cancel order #1043?",
|
|
69
64
|
description: "Sarah Whitfield gets £240.00 back on her card and an email to say so. The stock goes back on sale.",
|
|
@@ -149,7 +144,9 @@ function ProductActions() {
|
|
|
149
144
|
icon: /* @__PURE__ */ jsx(StorefrontIcon, {}),
|
|
150
145
|
hint: /* @__PURE__ */ jsx(ArrowSquareOutIcon, {}),
|
|
151
146
|
children: /* @__PURE__ */ jsx("a", {
|
|
152
|
-
href:
|
|
147
|
+
href: storeUrl,
|
|
148
|
+
target: "_blank",
|
|
149
|
+
rel: "noreferrer",
|
|
153
150
|
children: "View on your store"
|
|
154
151
|
})
|
|
155
152
|
}),
|
|
@@ -255,14 +252,15 @@ function SortMenu() {
|
|
|
255
252
|
iconEnd: /* @__PURE__ */ jsx(CaretDownIcon, {}),
|
|
256
253
|
children: label
|
|
257
254
|
})
|
|
258
|
-
}), /* @__PURE__ */
|
|
255
|
+
}), /* @__PURE__ */ jsx(MenuContent, { children: /* @__PURE__ */ jsx(MenuRadioGroup, {
|
|
256
|
+
label: "Sort orders by",
|
|
259
257
|
value: sort,
|
|
260
258
|
onValueChange: setSort,
|
|
261
259
|
children: SORTS.map((s) => /* @__PURE__ */ jsx(MenuRadioItem, {
|
|
262
260
|
value: s.value,
|
|
263
261
|
children: s.label
|
|
264
262
|
}, s.value))
|
|
265
|
-
})
|
|
263
|
+
}) })] });
|
|
266
264
|
}
|
|
267
265
|
function ViewMenu() {
|
|
268
266
|
const [sort, setSort] = useState("newest");
|
|
@@ -277,7 +275,8 @@ function ViewMenu() {
|
|
|
277
275
|
children: "View"
|
|
278
276
|
})
|
|
279
277
|
}), /* @__PURE__ */ jsxs(MenuContent, { children: [
|
|
280
|
-
/* @__PURE__ */ jsxs(
|
|
278
|
+
/* @__PURE__ */ jsxs(MenuRadioGroup, {
|
|
279
|
+
label: "Sort by",
|
|
281
280
|
value: sort,
|
|
282
281
|
onValueChange: setSort,
|
|
283
282
|
children: [
|
|
@@ -297,29 +296,31 @@ function ViewMenu() {
|
|
|
297
296
|
children: "Highest total"
|
|
298
297
|
})
|
|
299
298
|
]
|
|
300
|
-
})
|
|
299
|
+
}),
|
|
301
300
|
/* @__PURE__ */ jsx(MenuSeparator, {}),
|
|
302
|
-
/* @__PURE__ */ jsxs(MenuGroup, {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
301
|
+
/* @__PURE__ */ jsxs(MenuGroup, {
|
|
302
|
+
label: "Show columns",
|
|
303
|
+
children: [
|
|
304
|
+
/* @__PURE__ */ jsx(MenuCheckboxItem, {
|
|
305
|
+
checked: customer,
|
|
306
|
+
onCheckedChange: setCustomer,
|
|
307
|
+
onSelect: keepOpen,
|
|
308
|
+
children: "Customer"
|
|
309
|
+
}),
|
|
310
|
+
/* @__PURE__ */ jsx(MenuCheckboxItem, {
|
|
311
|
+
checked: channel,
|
|
312
|
+
onCheckedChange: setChannel,
|
|
313
|
+
onSelect: keepOpen,
|
|
314
|
+
children: "Sales channel"
|
|
315
|
+
}),
|
|
316
|
+
/* @__PURE__ */ jsx(MenuCheckboxItem, {
|
|
317
|
+
checked: total,
|
|
318
|
+
onCheckedChange: setTotal,
|
|
319
|
+
onSelect: keepOpen,
|
|
320
|
+
children: "Total"
|
|
321
|
+
})
|
|
322
|
+
]
|
|
323
|
+
})
|
|
323
324
|
] })] });
|
|
324
325
|
}
|
|
325
326
|
var APPEARANCE = {
|
|
@@ -330,11 +331,9 @@ var APPEARANCE = {
|
|
|
330
331
|
function AccountMenu() {
|
|
331
332
|
const [appearance, setAppearance] = useState("system");
|
|
332
333
|
const [logOutOpen, setLogOutOpen] = useState(false);
|
|
333
|
-
const trigger = useRef(null);
|
|
334
334
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Menu, { children: [/* @__PURE__ */ jsx(MenuTrigger, {
|
|
335
335
|
asChild: true,
|
|
336
336
|
children: /* @__PURE__ */ jsx(IconButton, {
|
|
337
|
-
ref: trigger,
|
|
338
337
|
label: "Account",
|
|
339
338
|
children: /* @__PURE__ */ jsx(Avatar, { name: "Priya Shah" })
|
|
340
339
|
})
|
|
@@ -400,7 +399,9 @@ function AccountMenu() {
|
|
|
400
399
|
icon: /* @__PURE__ */ jsx(QuestionIcon, {}),
|
|
401
400
|
hint: /* @__PURE__ */ jsx(ArrowSquareOutIcon, {}),
|
|
402
401
|
children: /* @__PURE__ */ jsx("a", {
|
|
403
|
-
href:
|
|
402
|
+
href: helpUrl,
|
|
403
|
+
target: "_blank",
|
|
404
|
+
rel: "noreferrer",
|
|
404
405
|
children: "Help centre"
|
|
405
406
|
})
|
|
406
407
|
}),
|
|
@@ -414,10 +415,7 @@ function AccountMenu() {
|
|
|
414
415
|
]
|
|
415
416
|
})] }), /* @__PURE__ */ jsx(ConfirmDialog, {
|
|
416
417
|
open: logOutOpen,
|
|
417
|
-
onOpenChange:
|
|
418
|
-
setLogOutOpen(open);
|
|
419
|
-
if (!open) requestAnimationFrame(() => trigger.current?.focus());
|
|
420
|
-
},
|
|
418
|
+
onOpenChange: setLogOutOpen,
|
|
421
419
|
tone: "critical",
|
|
422
420
|
title: "Log out of Orbit?",
|
|
423
421
|
description: "You will be signed out of Harbour Desk Co on this device.",
|
|
@@ -536,7 +534,7 @@ function HeldOpen() {
|
|
|
536
534
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
537
535
|
icon: /* @__PURE__ */ jsx(SlidersHorizontalIcon, {}),
|
|
538
536
|
"aria-haspopup": "menu",
|
|
539
|
-
"
|
|
537
|
+
"aria-expanded": "true",
|
|
540
538
|
children: "View"
|
|
541
539
|
}), /* @__PURE__ */ jsxs(MenuSheet, { children: [
|
|
542
540
|
/* @__PURE__ */ jsx(MenuHeading, { children: "Sort by" }),
|
|
@@ -577,7 +575,7 @@ function HeldOpen() {
|
|
|
577
575
|
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
578
576
|
label: "Account",
|
|
579
577
|
"aria-haspopup": "menu",
|
|
580
|
-
"
|
|
578
|
+
"aria-expanded": "true",
|
|
581
579
|
children: /* @__PURE__ */ jsx(Avatar, { name: "Priya Shah" })
|
|
582
580
|
}), /* @__PURE__ */ jsxs("div", {
|
|
583
581
|
className: "menu-still__with-sub",
|
|
@@ -666,6 +664,213 @@ function DoDontStill({ children }) {
|
|
|
666
664
|
children
|
|
667
665
|
});
|
|
668
666
|
}
|
|
667
|
+
var MODELS = [
|
|
668
|
+
{
|
|
669
|
+
id: "sonnet",
|
|
670
|
+
label: "Sonnet 4.5",
|
|
671
|
+
tagline: "Fast and capable, for most of your work",
|
|
672
|
+
isDefault: true
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
id: "opus",
|
|
676
|
+
label: "Opus 4.5",
|
|
677
|
+
tagline: "The most capable, for long and careful tasks"
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
id: "haiku",
|
|
681
|
+
label: "Haiku 4.5",
|
|
682
|
+
tagline: "The quickest, for short answers"
|
|
683
|
+
}
|
|
684
|
+
];
|
|
685
|
+
var EFFORTS = [
|
|
686
|
+
{
|
|
687
|
+
id: "low",
|
|
688
|
+
label: "Low",
|
|
689
|
+
tagline: "Answers straight away"
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
id: "medium",
|
|
693
|
+
label: "Medium",
|
|
694
|
+
tagline: "Thinks a little first",
|
|
695
|
+
isDefault: true
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
id: "high",
|
|
699
|
+
label: "High",
|
|
700
|
+
tagline: "Thinks it through"
|
|
701
|
+
}
|
|
702
|
+
];
|
|
703
|
+
function ModelPicker({ size = "sm" }) {
|
|
704
|
+
const [model, setModel] = useState("sonnet");
|
|
705
|
+
const chosen = MODELS.find((each) => each.id === model);
|
|
706
|
+
return /* @__PURE__ */ jsxs(Menu, { children: [/* @__PURE__ */ jsx(MenuChipTrigger, {
|
|
707
|
+
label: "Model",
|
|
708
|
+
icon: /* @__PURE__ */ jsx(CpuIcon, {}),
|
|
709
|
+
size,
|
|
710
|
+
children: chosen.label
|
|
711
|
+
}), /* @__PURE__ */ jsx(MenuContent, {
|
|
712
|
+
align: "start",
|
|
713
|
+
side: "top",
|
|
714
|
+
width: 272,
|
|
715
|
+
children: /* @__PURE__ */ jsx(MenuRadioGroup, {
|
|
716
|
+
label: "Model",
|
|
717
|
+
value: model,
|
|
718
|
+
onValueChange: setModel,
|
|
719
|
+
children: MODELS.map((each) => /* @__PURE__ */ jsx(MenuRadioItem, {
|
|
720
|
+
value: each.id,
|
|
721
|
+
description: each.tagline,
|
|
722
|
+
isDefault: each.isDefault,
|
|
723
|
+
children: each.label
|
|
724
|
+
}, each.id))
|
|
725
|
+
})
|
|
726
|
+
})] });
|
|
727
|
+
}
|
|
728
|
+
function EffortPicker({ size = "sm" }) {
|
|
729
|
+
const [effort, setEffort] = useState("medium");
|
|
730
|
+
const chosen = EFFORTS.find((each) => each.id === effort);
|
|
731
|
+
return /* @__PURE__ */ jsxs(Menu, { children: [/* @__PURE__ */ jsx(MenuChipTrigger, {
|
|
732
|
+
label: "Effort",
|
|
733
|
+
icon: /* @__PURE__ */ jsx(GaugeIcon, {}),
|
|
734
|
+
size,
|
|
735
|
+
children: chosen.label
|
|
736
|
+
}), /* @__PURE__ */ jsx(MenuContent, {
|
|
737
|
+
align: "start",
|
|
738
|
+
side: "top",
|
|
739
|
+
width: 248,
|
|
740
|
+
children: /* @__PURE__ */ jsx(MenuRadioGroup, {
|
|
741
|
+
label: "Effort",
|
|
742
|
+
value: effort,
|
|
743
|
+
onValueChange: setEffort,
|
|
744
|
+
children: EFFORTS.map((each) => /* @__PURE__ */ jsx(MenuRadioItem, {
|
|
745
|
+
value: each.id,
|
|
746
|
+
description: each.tagline,
|
|
747
|
+
isDefault: each.isDefault,
|
|
748
|
+
disabledReason: each.id === "high" ? "Not on Haiku" : void 0,
|
|
749
|
+
children: each.label
|
|
750
|
+
}, each.id))
|
|
751
|
+
})
|
|
752
|
+
})] });
|
|
753
|
+
}
|
|
754
|
+
function Composer$1() {
|
|
755
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
756
|
+
className: "menu-composer",
|
|
757
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
758
|
+
className: "menu-composer__field",
|
|
759
|
+
children: "Ask Nebula about your orders"
|
|
760
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
761
|
+
className: "menu-composer__tools",
|
|
762
|
+
children: [/* @__PURE__ */ jsx(ModelPicker, {}), /* @__PURE__ */ jsx(EffortPicker, {})]
|
|
763
|
+
})]
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
function AssistMenu() {
|
|
767
|
+
const [text, setText] = useState("");
|
|
768
|
+
const [running, setRunning] = useState(null);
|
|
769
|
+
const run = (what) => {
|
|
770
|
+
setRunning(what);
|
|
771
|
+
window.setTimeout(() => setRunning(null), 1600);
|
|
772
|
+
};
|
|
773
|
+
const reason = text.trim() ? void 0 : "Type something first";
|
|
774
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
775
|
+
className: "menu-assist",
|
|
776
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
777
|
+
className: "menu-assist__field",
|
|
778
|
+
"aria-label": "Reply",
|
|
779
|
+
placeholder: "Write a reply, or let AI draft one",
|
|
780
|
+
value: text,
|
|
781
|
+
onChange: (event) => setText(event.target.value)
|
|
782
|
+
}), /* @__PURE__ */ jsxs(Menu, { children: [/* @__PURE__ */ jsx(MenuTrigger, {
|
|
783
|
+
asChild: true,
|
|
784
|
+
children: /* @__PURE__ */ jsx(IconButton, {
|
|
785
|
+
label: running ? `${running}…` : "AI assist",
|
|
786
|
+
loading: running !== null,
|
|
787
|
+
children: /* @__PURE__ */ jsx(SparkleIcon, {})
|
|
788
|
+
})
|
|
789
|
+
}), /* @__PURE__ */ jsxs(MenuContent, {
|
|
790
|
+
align: "end",
|
|
791
|
+
side: "top",
|
|
792
|
+
width: 252,
|
|
793
|
+
children: [
|
|
794
|
+
/* @__PURE__ */ jsx(MenuItem, {
|
|
795
|
+
icon: /* @__PURE__ */ jsx(MagicWandIcon, {}),
|
|
796
|
+
onSelect: () => run("Drafting"),
|
|
797
|
+
children: "Draft a reply"
|
|
798
|
+
}),
|
|
799
|
+
/* @__PURE__ */ jsx(MenuItem, {
|
|
800
|
+
icon: /* @__PURE__ */ jsx(PenNibIcon, {}),
|
|
801
|
+
disabledReason: reason,
|
|
802
|
+
onSelect: () => run("Polishing"),
|
|
803
|
+
children: "Polish"
|
|
804
|
+
}),
|
|
805
|
+
/* @__PURE__ */ jsxs(MenuInlineSub, {
|
|
806
|
+
label: "Translate",
|
|
807
|
+
icon: /* @__PURE__ */ jsx(TranslateIcon, {}),
|
|
808
|
+
disabledReason: reason,
|
|
809
|
+
children: [
|
|
810
|
+
/* @__PURE__ */ jsx(MenuItem, {
|
|
811
|
+
onSelect: () => run("Translating"),
|
|
812
|
+
children: "French"
|
|
813
|
+
}),
|
|
814
|
+
/* @__PURE__ */ jsx(MenuItem, {
|
|
815
|
+
onSelect: () => run("Translating"),
|
|
816
|
+
children: "German"
|
|
817
|
+
}),
|
|
818
|
+
/* @__PURE__ */ jsx(MenuItem, {
|
|
819
|
+
onSelect: () => run("Translating"),
|
|
820
|
+
children: "Spanish"
|
|
821
|
+
})
|
|
822
|
+
]
|
|
823
|
+
}),
|
|
824
|
+
/* @__PURE__ */ jsx(MenuItem, {
|
|
825
|
+
icon: /* @__PURE__ */ jsx(FileTextIcon, {}),
|
|
826
|
+
onSelect: () => run("Summarising"),
|
|
827
|
+
children: "Summarise the chat"
|
|
828
|
+
})
|
|
829
|
+
]
|
|
830
|
+
})] })]
|
|
831
|
+
});
|
|
832
|
+
}
|
|
833
|
+
function ExportMenu() {
|
|
834
|
+
const [busy, setBusy] = useState(false);
|
|
835
|
+
const exportAs = () => {
|
|
836
|
+
setBusy(true);
|
|
837
|
+
window.setTimeout(() => setBusy(false), 2e3);
|
|
838
|
+
};
|
|
839
|
+
return /* @__PURE__ */ jsxs(Menu, { children: [/* @__PURE__ */ jsx(MenuTrigger, {
|
|
840
|
+
asChild: true,
|
|
841
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
842
|
+
icon: /* @__PURE__ */ jsx(DownloadSimpleIcon, {}),
|
|
843
|
+
loading: busy,
|
|
844
|
+
children: busy ? "Exporting" : "Export"
|
|
845
|
+
})
|
|
846
|
+
}), /* @__PURE__ */ jsxs(MenuContent, {
|
|
847
|
+
width: 300,
|
|
848
|
+
children: [
|
|
849
|
+
/* @__PURE__ */ jsx(MenuItem, {
|
|
850
|
+
onSelect: exportAs,
|
|
851
|
+
description: "Every turn that matches the filters above",
|
|
852
|
+
children: "CSV"
|
|
853
|
+
}),
|
|
854
|
+
/* @__PURE__ */ jsx(MenuItem, {
|
|
855
|
+
onSelect: exportAs,
|
|
856
|
+
description: "The turns that failed, timed out or were marked unhelpful, by store",
|
|
857
|
+
children: "Gaps report"
|
|
858
|
+
}),
|
|
859
|
+
/* @__PURE__ */ jsx(MenuSeparator, {}),
|
|
860
|
+
/* @__PURE__ */ jsx(MenuItem, {
|
|
861
|
+
asChild: true,
|
|
862
|
+
icon: /* @__PURE__ */ jsx(ArrowSquareOutIcon, {}),
|
|
863
|
+
description: "Kept for 30 days, in the help centre",
|
|
864
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
865
|
+
href: helpUrl,
|
|
866
|
+
target: "_blank",
|
|
867
|
+
rel: "noreferrer",
|
|
868
|
+
children: "Past exports"
|
|
869
|
+
})
|
|
870
|
+
})
|
|
871
|
+
]
|
|
872
|
+
})] });
|
|
873
|
+
}
|
|
669
874
|
function Page() {
|
|
670
875
|
return /* @__PURE__ */ jsxs(DocPage, {
|
|
671
876
|
title: "Menu",
|
|
@@ -678,7 +883,7 @@ function Page() {
|
|
|
678
883
|
],
|
|
679
884
|
lead: "A short list of actions or choices that opens from a button. Reach for it when a row, a record or the page has more actions than fit on screen, or for a quick choice such as how a list is sorted.",
|
|
680
885
|
children: [
|
|
681
|
-
/* @__PURE__ */
|
|
886
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
682
887
|
id: "basics",
|
|
683
888
|
title: "Basics",
|
|
684
889
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -693,16 +898,15 @@ function Page() {
|
|
|
693
898
|
/* @__PURE__ */ jsx("code", { children: "onSelect" }),
|
|
694
899
|
": it runs the action and closes the menu. The sheet grows out of its trigger on a spring and its rows settle in just behind it. Here, the actions for one order, from the button at the end of its row."
|
|
695
900
|
] }),
|
|
696
|
-
children: /* @__PURE__ */ jsx(Example, {
|
|
901
|
+
children: [/* @__PURE__ */ jsx(Example, {
|
|
697
902
|
align: "fill",
|
|
698
903
|
minHeight: 300,
|
|
699
904
|
code: `
|
|
700
905
|
const [cancelOpen, setCancelOpen] = useState(false)
|
|
701
|
-
const trigger = useRef<HTMLButtonElement>(null)
|
|
702
906
|
|
|
703
907
|
<Menu>
|
|
704
908
|
<MenuTrigger asChild>
|
|
705
|
-
<IconButton
|
|
909
|
+
<IconButton label="Actions for order #1043">
|
|
706
910
|
<DotsThreeIcon weight="bold" />
|
|
707
911
|
</IconButton>
|
|
708
912
|
</MenuTrigger>
|
|
@@ -721,11 +925,7 @@ const trigger = useRef<HTMLButtonElement>(null)
|
|
|
721
925
|
|
|
722
926
|
<ConfirmDialog
|
|
723
927
|
open={cancelOpen}
|
|
724
|
-
onOpenChange={
|
|
725
|
-
setCancelOpen(open)
|
|
726
|
-
// ConfirmDialog has no trigger of its own: hand focus back to the menu's trigger.
|
|
727
|
-
if (!open) requestAnimationFrame(() => trigger.current?.focus())
|
|
728
|
-
}}
|
|
928
|
+
onOpenChange={setCancelOpen}
|
|
729
929
|
tone="critical"
|
|
730
930
|
title="Cancel order #1043?"
|
|
731
931
|
description="Sarah Whitfield gets £240.00 back on her card and an email to say so. The stock goes back on sale."
|
|
@@ -734,9 +934,31 @@ const trigger = useRef<HTMLButtonElement>(null)
|
|
|
734
934
|
onConfirm={cancelOrder}
|
|
735
935
|
/>`,
|
|
736
936
|
children: /* @__PURE__ */ jsx(OrderRowActions, {})
|
|
737
|
-
})
|
|
937
|
+
}), /* @__PURE__ */ jsxs(Note, {
|
|
938
|
+
title: "Opening a dialog from a row",
|
|
939
|
+
children: [
|
|
940
|
+
"Set the dialog's ",
|
|
941
|
+
/* @__PURE__ */ jsx("code", { children: "open" }),
|
|
942
|
+
" from the row's ",
|
|
943
|
+
/* @__PURE__ */ jsx("code", { children: "onSelect" }),
|
|
944
|
+
", as here. The dialog waits for the menu to finish closing and, when it closes, hands focus back to this menu's button: no ref and no",
|
|
945
|
+
" ",
|
|
946
|
+
/* @__PURE__ */ jsx("code", { children: "onCloseAutoFocus" }),
|
|
947
|
+
" to wire. A row that starts something else which needs focus straight away, an inline field or a panel from another library, takes ",
|
|
948
|
+
/* @__PURE__ */ jsx("code", { children: "afterClose" }),
|
|
949
|
+
" instead of doing the work in",
|
|
950
|
+
" ",
|
|
951
|
+
/* @__PURE__ */ jsx("code", { children: "onSelect" }),
|
|
952
|
+
". It runs a moment after the click, so for something a browser only allows inside a click, such as opening a file chooser, test it in the browsers you support. See ",
|
|
953
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
954
|
+
to: "/components/dialog#from-a-menu",
|
|
955
|
+
children: "Dialog"
|
|
956
|
+
}),
|
|
957
|
+
"."
|
|
958
|
+
]
|
|
959
|
+
})]
|
|
738
960
|
}),
|
|
739
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
961
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
740
962
|
id: "both-themes",
|
|
741
963
|
title: "In both themes",
|
|
742
964
|
description: /* @__PURE__ */ jsx("p", { children: "Held open for review: the account menu with its Appearance submenu out, and a view menu with radio and checkbox rows, light above dark. The sheet is the canvas colour in light and lifts to graphite in dark, with a faint ring so its edge holds on a dark page." }),
|
|
@@ -760,7 +982,7 @@ const trigger = useRef<HTMLButtonElement>(null)
|
|
|
760
982
|
})
|
|
761
983
|
})]
|
|
762
984
|
}),
|
|
763
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
985
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
764
986
|
id: "rows",
|
|
765
987
|
title: "Rows",
|
|
766
988
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -770,7 +992,7 @@ const trigger = useRef<HTMLButtonElement>(null)
|
|
|
770
992
|
/* @__PURE__ */ jsx("code", { children: "icon" }),
|
|
771
993
|
" is 16px and stays muted until the row is highlighted. ",
|
|
772
994
|
/* @__PURE__ */ jsx("code", { children: "hint" }),
|
|
773
|
-
" is a quiet detail at the end, such as a file format or why a row is off.",
|
|
995
|
+
" is a quiet detail at the end, such as a file format or, for people who can see it, why a row is off.",
|
|
774
996
|
" ",
|
|
775
997
|
/* @__PURE__ */ jsx("code", { children: "shortcut" }),
|
|
776
998
|
" draws keycaps that read right on every platform (",
|
|
@@ -808,9 +1030,15 @@ const trigger = useRef<HTMLButtonElement>(null)
|
|
|
808
1030
|
["Critical", /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("code", { children: "tone=\"critical\"" }), " turns the row red and its highlight into a red wash. For actions that destroy something or sign out; keep them last, after a separator."] })],
|
|
809
1031
|
["Disabled", /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
810
1032
|
/* @__PURE__ */ jsx("code", { children: "disabled" }),
|
|
811
|
-
" dims the row
|
|
1033
|
+
" dims the row's words, icon and keycaps and keeps its ",
|
|
812
1034
|
/* @__PURE__ */ jsx("code", { children: "hint" }),
|
|
813
|
-
"."
|
|
1035
|
+
" clear, so say why there. The hint is for people who can see it: the arrow keys pass over the row, so a keyboard or screen reader user never meets it. For a row people must understand, give a",
|
|
1036
|
+
" ",
|
|
1037
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
1038
|
+
to: "/components/menu#disabled-reason",
|
|
1039
|
+
children: "disabledReason"
|
|
1040
|
+
}),
|
|
1041
|
+
" instead."
|
|
814
1042
|
] })],
|
|
815
1043
|
["Link", /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
816
1044
|
/* @__PURE__ */ jsx("code", { children: "asChild" }),
|
|
@@ -830,7 +1058,7 @@ const trigger = useRef<HTMLButtonElement>(null)
|
|
|
830
1058
|
]
|
|
831
1059
|
})]
|
|
832
1060
|
}),
|
|
833
|
-
/* @__PURE__ */ jsx(Section, {
|
|
1061
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
834
1062
|
id: "checkbox-items",
|
|
835
1063
|
title: "Checkbox items",
|
|
836
1064
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -870,7 +1098,7 @@ const [shown, setShown] = useState({ customer: true, channel: false, payment: tr
|
|
|
870
1098
|
})
|
|
871
1099
|
})
|
|
872
1100
|
}),
|
|
873
|
-
/* @__PURE__ */ jsx(Section, {
|
|
1101
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
874
1102
|
id: "radio-groups",
|
|
875
1103
|
title: "Radio groups",
|
|
876
1104
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -891,8 +1119,7 @@ const [sort, setSort] = useState('newest')
|
|
|
891
1119
|
<Button icon={<ArrowsDownUpIcon />} iconEnd={<CaretDownIcon />}>{label}</Button>
|
|
892
1120
|
</MenuTrigger>
|
|
893
1121
|
<MenuContent>
|
|
894
|
-
<
|
|
895
|
-
<MenuRadioGroup value={sort} onValueChange={setSort}>
|
|
1122
|
+
<MenuRadioGroup label="Sort orders by" value={sort} onValueChange={setSort}>
|
|
896
1123
|
<MenuRadioItem value="newest">Newest first</MenuRadioItem>
|
|
897
1124
|
<MenuRadioItem value="oldest">Oldest first</MenuRadioItem>
|
|
898
1125
|
<MenuRadioItem value="total-high">Highest total</MenuRadioItem>
|
|
@@ -907,7 +1134,7 @@ const [sort, setSort] = useState('newest')
|
|
|
907
1134
|
})
|
|
908
1135
|
})
|
|
909
1136
|
}),
|
|
910
|
-
/* @__PURE__ */ jsx(Section, {
|
|
1137
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
911
1138
|
id: "structure",
|
|
912
1139
|
title: "Labels, groups and separators",
|
|
913
1140
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -917,7 +1144,14 @@ const [sort, setSort] = useState('newest')
|
|
|
917
1144
|
/* @__PURE__ */ jsx("code", { children: "MenuSeparator" }),
|
|
918
1145
|
" is a hairline between groups. ",
|
|
919
1146
|
/* @__PURE__ */ jsx("code", { children: "MenuGroup" }),
|
|
920
|
-
" ties rows together for assistive tech and has no look of its own.
|
|
1147
|
+
" ties rows together for assistive tech and has no look of its own. Give a group, or a ",
|
|
1148
|
+
/* @__PURE__ */ jsx("code", { children: "MenuRadioGroup" }),
|
|
1149
|
+
", a",
|
|
1150
|
+
" ",
|
|
1151
|
+
/* @__PURE__ */ jsx("code", { children: "label" }),
|
|
1152
|
+
" and it draws that heading and is named by it, so a screen reader reads \"Sort by\" with its rows; a ",
|
|
1153
|
+
/* @__PURE__ */ jsx("code", { children: "MenuLabel" }),
|
|
1154
|
+
" on its own is only seen. A view menu for the orders list mixes a radio group and checkboxes, and stays open while you change it."
|
|
921
1155
|
] }),
|
|
922
1156
|
children: /* @__PURE__ */ jsx(Example, {
|
|
923
1157
|
align: "fill",
|
|
@@ -930,17 +1164,13 @@ const keepOpen = (event: Event) => event.preventDefault()
|
|
|
930
1164
|
<Button icon={<SlidersHorizontalIcon />}>View</Button>
|
|
931
1165
|
</MenuTrigger>
|
|
932
1166
|
<MenuContent>
|
|
933
|
-
<
|
|
934
|
-
<
|
|
935
|
-
<
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
<MenuRadioItem value="total" onSelect={keepOpen}>Highest total</MenuRadioItem>
|
|
939
|
-
</MenuRadioGroup>
|
|
940
|
-
</MenuGroup>
|
|
1167
|
+
<MenuRadioGroup label="Sort by" value={sort} onValueChange={setSort}>
|
|
1168
|
+
<MenuRadioItem value="newest" onSelect={keepOpen}>Newest first</MenuRadioItem>
|
|
1169
|
+
<MenuRadioItem value="oldest" onSelect={keepOpen}>Oldest first</MenuRadioItem>
|
|
1170
|
+
<MenuRadioItem value="total" onSelect={keepOpen}>Highest total</MenuRadioItem>
|
|
1171
|
+
</MenuRadioGroup>
|
|
941
1172
|
<MenuSeparator />
|
|
942
|
-
<MenuGroup>
|
|
943
|
-
<MenuLabel>Show columns</MenuLabel>
|
|
1173
|
+
<MenuGroup label="Show columns">
|
|
944
1174
|
<MenuCheckboxItem checked={customer} onCheckedChange={setCustomer} onSelect={keepOpen}>
|
|
945
1175
|
Customer
|
|
946
1176
|
</MenuCheckboxItem>
|
|
@@ -959,7 +1189,7 @@ const keepOpen = (event: Event) => event.preventDefault()
|
|
|
959
1189
|
})
|
|
960
1190
|
})
|
|
961
1191
|
}),
|
|
962
|
-
/* @__PURE__ */ jsx(Section, {
|
|
1192
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
963
1193
|
id: "submenus",
|
|
964
1194
|
title: "Submenus",
|
|
965
1195
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -1021,7 +1251,7 @@ const [appearance, setAppearance] = useState('system')
|
|
|
1021
1251
|
})
|
|
1022
1252
|
})
|
|
1023
1253
|
}),
|
|
1024
|
-
/* @__PURE__ */ jsx(Section, {
|
|
1254
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
1025
1255
|
id: "header",
|
|
1026
1256
|
title: "Header",
|
|
1027
1257
|
description: /* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("code", { children: "MenuHeader" }), " is a free-form block at the top of the sheet: who is signed in, or the record the menu acts on. It is not a row, so it cannot be focused and the arrow keys pass over it. Follow it with a separator."] }),
|
|
@@ -1054,7 +1284,7 @@ const [appearance, setAppearance] = useState('system')
|
|
|
1054
1284
|
})
|
|
1055
1285
|
})
|
|
1056
1286
|
}),
|
|
1057
|
-
/* @__PURE__ */ jsx(Section, {
|
|
1287
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
1058
1288
|
id: "width",
|
|
1059
1289
|
title: "Width",
|
|
1060
1290
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -1096,7 +1326,7 @@ const [appearance, setAppearance] = useState('system')
|
|
|
1096
1326
|
})
|
|
1097
1327
|
})
|
|
1098
1328
|
}),
|
|
1099
|
-
/* @__PURE__ */ jsx(Section, {
|
|
1329
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
1100
1330
|
id: "placement",
|
|
1101
1331
|
title: "Alignment and side",
|
|
1102
1332
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -1132,7 +1362,168 @@ const [appearance, setAppearance] = useState('system')
|
|
|
1132
1362
|
]
|
|
1133
1363
|
})
|
|
1134
1364
|
}),
|
|
1135
|
-
/* @__PURE__ */
|
|
1365
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
1366
|
+
id: "second-lines",
|
|
1367
|
+
title: "Second lines and the default",
|
|
1368
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
1369
|
+
/* @__PURE__ */ jsx("code", { children: "description" }),
|
|
1370
|
+
" puts a quiet line under a row's label, on ",
|
|
1371
|
+
/* @__PURE__ */ jsx("code", { children: "MenuItem" }),
|
|
1372
|
+
",",
|
|
1373
|
+
" ",
|
|
1374
|
+
/* @__PURE__ */ jsx("code", { children: "MenuRadioItem" }),
|
|
1375
|
+
" and ",
|
|
1376
|
+
/* @__PURE__ */ jsx("code", { children: "MenuCheckboxItem" }),
|
|
1377
|
+
": what a choice does, a tagline. It wraps, the row lines its icon and its mark up with the first line, and a screen reader reads it as the row's description, after its name. ",
|
|
1378
|
+
/* @__PURE__ */ jsx("code", { children: "isDefault" }),
|
|
1379
|
+
" marks the choice the app falls back to with a quiet “Default” after the label (",
|
|
1380
|
+
/* @__PURE__ */ jsx("code", { children: "defaultLabel" }),
|
|
1381
|
+
" for other words). Here, a chat's model and effort pickers."
|
|
1382
|
+
] }),
|
|
1383
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
1384
|
+
align: "fill",
|
|
1385
|
+
minHeight: 320,
|
|
1386
|
+
code: `
|
|
1387
|
+
<Menu>
|
|
1388
|
+
<MenuChipTrigger label="Model" icon={<CpuIcon />}>{chosen.label}</MenuChipTrigger>
|
|
1389
|
+
<MenuContent side="top" width={272}>
|
|
1390
|
+
<MenuRadioGroup label="Model" value={model} onValueChange={setModel}>
|
|
1391
|
+
<MenuRadioItem value="sonnet" description="Fast and capable, for most of your work" isDefault>
|
|
1392
|
+
Sonnet 4.5
|
|
1393
|
+
</MenuRadioItem>
|
|
1394
|
+
<MenuRadioItem value="opus" description="The most capable, for long and careful tasks">
|
|
1395
|
+
Opus 4.5
|
|
1396
|
+
</MenuRadioItem>
|
|
1397
|
+
<MenuRadioItem value="haiku" description="The quickest, for short answers">Haiku 4.5</MenuRadioItem>
|
|
1398
|
+
</MenuRadioGroup>
|
|
1399
|
+
</MenuContent>
|
|
1400
|
+
</Menu>`,
|
|
1401
|
+
children: /* @__PURE__ */ jsx(Composer$1, {})
|
|
1402
|
+
})
|
|
1403
|
+
}),
|
|
1404
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
1405
|
+
id: "disabled-reason",
|
|
1406
|
+
title: "A row that says why it is off",
|
|
1407
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
1408
|
+
/* @__PURE__ */ jsx("code", { children: "disabledReason" }),
|
|
1409
|
+
" turns a row off and puts the reason on its second line. Unlike",
|
|
1410
|
+
" ",
|
|
1411
|
+
/* @__PURE__ */ jsx("code", { children: "disabled" }),
|
|
1412
|
+
", the row stays in reach of the arrow keys (it is ",
|
|
1413
|
+
/* @__PURE__ */ jsx("code", { children: "aria-disabled" }),
|
|
1414
|
+
"), so a keyboard or screen reader user meets the reason too; choosing it does nothing and leaves the menu open. Its words dim, the reason keeps its strength. Here, the chat's AI assist menu: with the reply empty, Polish and Translate say what they need. Type a word and they come on."
|
|
1415
|
+
] }),
|
|
1416
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
1417
|
+
align: "fill",
|
|
1418
|
+
minHeight: 320,
|
|
1419
|
+
code: `
|
|
1420
|
+
<MenuItem icon={<PenNibIcon />} disabledReason={text ? undefined : 'Type something first'} onSelect={polish}>
|
|
1421
|
+
Polish
|
|
1422
|
+
</MenuItem>`,
|
|
1423
|
+
children: /* @__PURE__ */ jsx(AssistMenu, {})
|
|
1424
|
+
})
|
|
1425
|
+
}),
|
|
1426
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
1427
|
+
id: "inline-submenus",
|
|
1428
|
+
title: "Inline submenus",
|
|
1429
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
1430
|
+
/* @__PURE__ */ jsx("code", { children: "MenuInlineSub" }),
|
|
1431
|
+
" opens its rows in place, under itself and indented, instead of in a second sheet: for a short set where a flyout would cover the menu it came from, or a narrow screen with no room beside it. Enter, Space or a click toggles it, the arrow towards its chevron opens it and walks in, and the arrow back closes it from any of its rows; its rows join the menu's own, so the up and down arrows walk on through them. It takes a ",
|
|
1432
|
+
/* @__PURE__ */ jsx("code", { children: "disabledReason" }),
|
|
1433
|
+
" too. Translate, in the assist menu above, is one."
|
|
1434
|
+
] }),
|
|
1435
|
+
children: /* @__PURE__ */ jsx(CodeBlock$1, { code: `
|
|
1436
|
+
<MenuInlineSub label="Translate" icon={<TranslateIcon />} disabledReason={reason}>
|
|
1437
|
+
<MenuItem onSelect={() => translate('fr')}>French</MenuItem>
|
|
1438
|
+
<MenuItem onSelect={() => translate('de')}>German</MenuItem>
|
|
1439
|
+
<MenuItem onSelect={() => translate('es')}>Spanish</MenuItem>
|
|
1440
|
+
</MenuInlineSub>` })
|
|
1441
|
+
}),
|
|
1442
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
1443
|
+
id: "busy-trigger",
|
|
1444
|
+
title: "While a row's action runs",
|
|
1445
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
1446
|
+
"Give the trigger's ",
|
|
1447
|
+
/* @__PURE__ */ jsx("code", { children: "Button" }),
|
|
1448
|
+
" its ",
|
|
1449
|
+
/* @__PURE__ */ jsx("code", { children: "loading" }),
|
|
1450
|
+
" while what a row started is running. It spins in its icon's place, keeps focus (the menu hands it back as it closes), and the menu will not open again until it is done. Choose an export below. The assist menu above does the same with its",
|
|
1451
|
+
" ",
|
|
1452
|
+
/* @__PURE__ */ jsx("code", { children: "IconButton" }),
|
|
1453
|
+
". A link row given through ",
|
|
1454
|
+
/* @__PURE__ */ jsx("code", { children: "asChild" }),
|
|
1455
|
+
" takes a ",
|
|
1456
|
+
/* @__PURE__ */ jsx("code", { children: "description" }),
|
|
1457
|
+
" ",
|
|
1458
|
+
"(and an ",
|
|
1459
|
+
/* @__PURE__ */ jsx("code", { children: "isDefault" }),
|
|
1460
|
+
" or a ",
|
|
1461
|
+
/* @__PURE__ */ jsx("code", { children: "disabledReason" }),
|
|
1462
|
+
") too, drawn inside the link."
|
|
1463
|
+
] }),
|
|
1464
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
1465
|
+
minHeight: 240,
|
|
1466
|
+
code: `
|
|
1467
|
+
const [busy, setBusy] = useState(false)
|
|
1468
|
+
|
|
1469
|
+
<Menu>
|
|
1470
|
+
<MenuTrigger asChild>
|
|
1471
|
+
<Button icon={<DownloadSimpleIcon />} loading={busy}>{busy ? 'Exporting' : 'Export'}</Button>
|
|
1472
|
+
</MenuTrigger>
|
|
1473
|
+
<MenuContent width={300}>
|
|
1474
|
+
<MenuItem onSelect={() => exportAs('csv')} description="Every turn that matches the filters above">CSV</MenuItem>
|
|
1475
|
+
<MenuItem onSelect={() => exportAs('gaps')} description="The turns that failed, timed out or were marked unhelpful, by store">
|
|
1476
|
+
Gaps report
|
|
1477
|
+
</MenuItem>
|
|
1478
|
+
<MenuSeparator />
|
|
1479
|
+
<MenuItem asChild icon={<ArrowSquareOutIcon />} description="Kept for 30 days, in the help centre">
|
|
1480
|
+
<a href={helpUrl} target="_blank" rel="noreferrer">Past exports</a>
|
|
1481
|
+
</MenuItem>
|
|
1482
|
+
</MenuContent>
|
|
1483
|
+
</Menu>`,
|
|
1484
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1485
|
+
className: "overlays-top",
|
|
1486
|
+
children: /* @__PURE__ */ jsx(ExportMenu, {})
|
|
1487
|
+
})
|
|
1488
|
+
})
|
|
1489
|
+
}),
|
|
1490
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
1491
|
+
id: "chip-trigger",
|
|
1492
|
+
title: "Chip trigger",
|
|
1493
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
1494
|
+
/* @__PURE__ */ jsx("code", { children: "MenuChipTrigger" }),
|
|
1495
|
+
" is a small pill that opens its menu and shows the current choice: an icon, the value and a caret. It suits a picker in a row of tools, such as the model and effort under a prompt. It takes the place of ",
|
|
1496
|
+
/* @__PURE__ */ jsx("code", { children: "MenuTrigger" }),
|
|
1497
|
+
", is named by its ",
|
|
1498
|
+
/* @__PURE__ */ jsx("code", { children: "label" }),
|
|
1499
|
+
" and its value (“Model Sonnet 4.5”), comes in ",
|
|
1500
|
+
/* @__PURE__ */ jsx("code", { children: "sm" }),
|
|
1501
|
+
" (24px) and ",
|
|
1502
|
+
/* @__PURE__ */ jsx("code", { children: "md" }),
|
|
1503
|
+
" (30px), and with ",
|
|
1504
|
+
/* @__PURE__ */ jsx("code", { children: "busy" }),
|
|
1505
|
+
" ",
|
|
1506
|
+
"spins in its icon's place and does not open."
|
|
1507
|
+
] }),
|
|
1508
|
+
children: /* @__PURE__ */ jsx(ThemePair, {
|
|
1509
|
+
minHeight: 120,
|
|
1510
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1511
|
+
className: "menu-chips",
|
|
1512
|
+
children: [
|
|
1513
|
+
/* @__PURE__ */ jsx(ModelPicker, {}),
|
|
1514
|
+
/* @__PURE__ */ jsx(EffortPicker, {}),
|
|
1515
|
+
/* @__PURE__ */ jsx(ModelPicker, { size: "md" }),
|
|
1516
|
+
/* @__PURE__ */ jsxs(Menu, { children: [/* @__PURE__ */ jsx(MenuChipTrigger, {
|
|
1517
|
+
label: "Model",
|
|
1518
|
+
icon: /* @__PURE__ */ jsx(CpuIcon, {}),
|
|
1519
|
+
busy: true,
|
|
1520
|
+
children: "Opus 4.5"
|
|
1521
|
+
}), /* @__PURE__ */ jsx(MenuContent, { children: /* @__PURE__ */ jsx(MenuItem, { children: "Opus 4.5" }) })] })
|
|
1522
|
+
]
|
|
1523
|
+
})
|
|
1524
|
+
})
|
|
1525
|
+
}),
|
|
1526
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
1136
1527
|
id: "guidelines",
|
|
1137
1528
|
title: "Guidelines",
|
|
1138
1529
|
children: [
|
|
@@ -1214,7 +1605,7 @@ const [appearance, setAppearance] = useState('system')
|
|
|
1214
1605
|
] })
|
|
1215
1606
|
]
|
|
1216
1607
|
}),
|
|
1217
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
1608
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
1218
1609
|
id: "accessibility",
|
|
1219
1610
|
title: "Accessibility",
|
|
1220
1611
|
children: [/* @__PURE__ */ jsx(Guidelines, { items: [
|
|
@@ -1263,7 +1654,7 @@ const [appearance, setAppearance] = useState('system')
|
|
|
1263
1654
|
]
|
|
1264
1655
|
})]
|
|
1265
1656
|
}),
|
|
1266
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
1657
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
1267
1658
|
id: "props",
|
|
1268
1659
|
title: "Props",
|
|
1269
1660
|
description: /* @__PURE__ */ jsx("p", { children: "Every part also accepts the matching Radix DropdownMenu props." }),
|
|
@@ -1297,17 +1688,25 @@ const [appearance, setAppearance] = useState('system')
|
|
|
1297
1688
|
}),
|
|
1298
1689
|
/* @__PURE__ */ jsx(PropsTable, {
|
|
1299
1690
|
title: "MenuTrigger",
|
|
1300
|
-
rows: [
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1691
|
+
rows: [
|
|
1692
|
+
{
|
|
1693
|
+
name: "asChild",
|
|
1694
|
+
type: "boolean",
|
|
1695
|
+
default: "false",
|
|
1696
|
+
description: "Render your Button or IconButton as the trigger. Almost always on."
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
name: "disabled",
|
|
1700
|
+
type: "boolean",
|
|
1701
|
+
default: "false",
|
|
1702
|
+
description: "The trigger cannot open the menu."
|
|
1703
|
+
},
|
|
1704
|
+
{
|
|
1705
|
+
name: "(busy)",
|
|
1706
|
+
type: "aria-disabled on the trigger",
|
|
1707
|
+
description: "While the Button is loading (or anything sets aria-disabled=\"true\"), the menu does not open and the trigger keeps focus."
|
|
1708
|
+
}
|
|
1709
|
+
]
|
|
1311
1710
|
}),
|
|
1312
1711
|
/* @__PURE__ */ jsx(PropsTable, {
|
|
1313
1712
|
title: "MenuContent",
|
|
@@ -1357,7 +1756,7 @@ const [appearance, setAppearance] = useState('system')
|
|
|
1357
1756
|
name: "container",
|
|
1358
1757
|
type: "HTMLElement | null",
|
|
1359
1758
|
default: "document.body",
|
|
1360
|
-
description: "Where the sheet is portalled."
|
|
1759
|
+
description: "Where the sheet is portalled. Inside a dialog it opens in the dialog's layer; null keeps it on the page."
|
|
1361
1760
|
},
|
|
1362
1761
|
{
|
|
1363
1762
|
name: "onCloseAutoFocus",
|
|
@@ -1400,12 +1799,39 @@ const [appearance, setAppearance] = useState('system')
|
|
|
1400
1799
|
type: "'critical'",
|
|
1401
1800
|
description: "Red, for actions that destroy something or sign out."
|
|
1402
1801
|
},
|
|
1802
|
+
{
|
|
1803
|
+
name: "afterClose",
|
|
1804
|
+
type: "() => void",
|
|
1805
|
+
description: "Runs once the menu has left the page and its button has its focus back, instead of inside the click. For a row that focuses an inline field or opens a panel from another library. It runs a moment after the click, not inside it. Not called when onSelect keeps the menu open."
|
|
1806
|
+
},
|
|
1403
1807
|
{
|
|
1404
1808
|
name: "disabled",
|
|
1405
1809
|
type: "boolean",
|
|
1406
1810
|
default: "false",
|
|
1407
1811
|
description: "Dimmed and skipped by the arrow keys."
|
|
1408
1812
|
},
|
|
1813
|
+
{
|
|
1814
|
+
name: "description",
|
|
1815
|
+
type: "ReactNode",
|
|
1816
|
+
description: "A quiet second line under the label that wraps. Read as the row’s description. Not drawn on an asChild link."
|
|
1817
|
+
},
|
|
1818
|
+
{
|
|
1819
|
+
name: "isDefault",
|
|
1820
|
+
type: "boolean",
|
|
1821
|
+
default: "false",
|
|
1822
|
+
description: "A quiet “Default” after the label."
|
|
1823
|
+
},
|
|
1824
|
+
{
|
|
1825
|
+
name: "defaultLabel",
|
|
1826
|
+
type: "string",
|
|
1827
|
+
default: "'Default'",
|
|
1828
|
+
description: "The word isDefault draws."
|
|
1829
|
+
},
|
|
1830
|
+
{
|
|
1831
|
+
name: "disabledReason",
|
|
1832
|
+
type: "ReactNode",
|
|
1833
|
+
description: "Off, saying why on its second line. Stays in reach of the arrow keys (aria-disabled); choosing it does nothing."
|
|
1834
|
+
},
|
|
1409
1835
|
{
|
|
1410
1836
|
name: "asChild",
|
|
1411
1837
|
type: "boolean",
|
|
@@ -1442,6 +1868,11 @@ const [appearance, setAppearance] = useState('system')
|
|
|
1442
1868
|
type: "ReactNode, ReactNode, string[]",
|
|
1443
1869
|
description: "As on MenuItem. The check sits at the end."
|
|
1444
1870
|
},
|
|
1871
|
+
{
|
|
1872
|
+
name: "description, isDefault, defaultLabel, disabledReason",
|
|
1873
|
+
type: "as on MenuItem",
|
|
1874
|
+
description: "A second line, the default’s word, and off with a reason (its state then does not change)."
|
|
1875
|
+
},
|
|
1445
1876
|
{
|
|
1446
1877
|
name: "disabled",
|
|
1447
1878
|
type: "boolean",
|
|
@@ -1452,15 +1883,23 @@ const [appearance, setAppearance] = useState('system')
|
|
|
1452
1883
|
}),
|
|
1453
1884
|
/* @__PURE__ */ jsx(PropsTable, {
|
|
1454
1885
|
title: "MenuRadioGroup",
|
|
1455
|
-
rows: [
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1886
|
+
rows: [
|
|
1887
|
+
{
|
|
1888
|
+
name: "value",
|
|
1889
|
+
type: "string",
|
|
1890
|
+
description: "The chosen value."
|
|
1891
|
+
},
|
|
1892
|
+
{
|
|
1893
|
+
name: "onValueChange",
|
|
1894
|
+
type: "(value: string) => void",
|
|
1895
|
+
description: "Called with the newly chosen value."
|
|
1896
|
+
},
|
|
1897
|
+
{
|
|
1898
|
+
name: "label",
|
|
1899
|
+
type: "ReactNode",
|
|
1900
|
+
description: "A heading above the choices that also names the group for screen readers."
|
|
1901
|
+
}
|
|
1902
|
+
]
|
|
1464
1903
|
}),
|
|
1465
1904
|
/* @__PURE__ */ jsx(PropsTable, {
|
|
1466
1905
|
title: "MenuRadioItem",
|
|
@@ -1481,6 +1920,11 @@ const [appearance, setAppearance] = useState('system')
|
|
|
1481
1920
|
type: "ReactNode, ReactNode, string[]",
|
|
1482
1921
|
description: "As on MenuItem. The ring and satellite sit at the end."
|
|
1483
1922
|
},
|
|
1923
|
+
{
|
|
1924
|
+
name: "description, isDefault, defaultLabel, disabledReason",
|
|
1925
|
+
type: "as on MenuItem",
|
|
1926
|
+
description: "A second line, the default’s word, and off with a reason (the group’s value then does not change)."
|
|
1927
|
+
},
|
|
1484
1928
|
{
|
|
1485
1929
|
name: "disabled",
|
|
1486
1930
|
type: "boolean",
|
|
@@ -1573,7 +2017,73 @@ const [appearance, setAppearance] = useState('system')
|
|
|
1573
2017
|
name: "container",
|
|
1574
2018
|
type: "HTMLElement | null",
|
|
1575
2019
|
default: "document.body",
|
|
1576
|
-
description: "Where the sheet is portalled."
|
|
2020
|
+
description: "Where the sheet is portalled. Inside a dialog it opens in the dialog's layer; null keeps it on the page."
|
|
2021
|
+
}
|
|
2022
|
+
]
|
|
2023
|
+
}),
|
|
2024
|
+
/* @__PURE__ */ jsx(PropsTable, {
|
|
2025
|
+
title: "MenuInlineSub",
|
|
2026
|
+
rows: [
|
|
2027
|
+
{
|
|
2028
|
+
name: "label",
|
|
2029
|
+
type: "ReactNode",
|
|
2030
|
+
required: true,
|
|
2031
|
+
description: "The row’s words. Also names the rows it opens."
|
|
2032
|
+
},
|
|
2033
|
+
{
|
|
2034
|
+
name: "children",
|
|
2035
|
+
type: "ReactNode",
|
|
2036
|
+
required: true,
|
|
2037
|
+
description: "The rows it opens in place."
|
|
2038
|
+
},
|
|
2039
|
+
{
|
|
2040
|
+
name: "icon, hint",
|
|
2041
|
+
type: "ReactNode",
|
|
2042
|
+
description: "As on MenuSubTrigger."
|
|
2043
|
+
},
|
|
2044
|
+
{
|
|
2045
|
+
name: "open / defaultOpen / onOpenChange",
|
|
2046
|
+
type: "boolean / boolean / (open) => void",
|
|
2047
|
+
description: "Controlled or uncontrolled open state."
|
|
2048
|
+
},
|
|
2049
|
+
{
|
|
2050
|
+
name: "description, disabledReason",
|
|
2051
|
+
type: "ReactNode",
|
|
2052
|
+
description: "As on MenuItem. Off, it does not open."
|
|
2053
|
+
}
|
|
2054
|
+
]
|
|
2055
|
+
}),
|
|
2056
|
+
/* @__PURE__ */ jsx(PropsTable, {
|
|
2057
|
+
title: "MenuChipTrigger",
|
|
2058
|
+
rows: [
|
|
2059
|
+
{
|
|
2060
|
+
name: "label",
|
|
2061
|
+
type: "string",
|
|
2062
|
+
required: true,
|
|
2063
|
+
description: "What it chooses, for its name: “Model”. Not shown."
|
|
2064
|
+
},
|
|
2065
|
+
{
|
|
2066
|
+
name: "children",
|
|
2067
|
+
type: "ReactNode",
|
|
2068
|
+
required: true,
|
|
2069
|
+
description: "The current choice, shown."
|
|
2070
|
+
},
|
|
2071
|
+
{
|
|
2072
|
+
name: "icon",
|
|
2073
|
+
type: "ReactNode",
|
|
2074
|
+
description: "A leading glyph."
|
|
2075
|
+
},
|
|
2076
|
+
{
|
|
2077
|
+
name: "size",
|
|
2078
|
+
type: "'sm' | 'md'",
|
|
2079
|
+
default: "'sm'",
|
|
2080
|
+
description: "24px or 30px tall."
|
|
2081
|
+
},
|
|
2082
|
+
{
|
|
2083
|
+
name: "busy",
|
|
2084
|
+
type: "boolean",
|
|
2085
|
+
default: "false",
|
|
2086
|
+
description: "Spins in the icon’s place, stays focusable and does not open."
|
|
1577
2087
|
}
|
|
1578
2088
|
]
|
|
1579
2089
|
}),
|
|
@@ -1591,6 +2101,10 @@ const [appearance, setAppearance] = useState('system')
|
|
|
1591
2101
|
name: "children",
|
|
1592
2102
|
type: "ReactNode",
|
|
1593
2103
|
description: "The rows it groups for assistive tech. It has no look of its own."
|
|
2104
|
+
}, {
|
|
2105
|
+
name: "label",
|
|
2106
|
+
type: "ReactNode",
|
|
2107
|
+
description: "A heading above the rows that also names the group for screen readers."
|
|
1594
2108
|
}]
|
|
1595
2109
|
}),
|
|
1596
2110
|
/* @__PURE__ */ jsx(PropsTable, {
|