@orbitcommerce/constellation-docs 0.0.0-stage → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +6 -0
- package/README.md +6 -2
- package/dist/docs.css +20787 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +308 -0
- package/dist/pages/Playground-Mk1yIWXb.js +129 -0
- package/dist/pages/_address-data-L9BR499w.js +161 -0
- package/dist/pages/_builder-demo-C0eJUmPU.js +282 -0
- package/dist/pages/_card-art-0be5ncyV.js +18 -0
- package/dist/pages/_conversation-samples-Bq7cn-4d.js +70 -0
- package/dist/pages/_figures-data-DaDvB7Nm.js +606 -0
- package/dist/pages/_foundations-blXWyYh8.js +30 -0
- package/dist/pages/_kpi-examples-DeGCBB9T.js +208 -0
- package/dist/pages/_overlays-specimens-bawR331Z.js +320 -0
- package/dist/pages/_preview-specimens-DKQC9HAo.js +153 -0
- package/dist/pages/accordion-Sg0TUqxB.js +1036 -0
- package/dist/pages/address-autocomplete-DP0PUOlK.js +360 -0
- package/dist/pages/address-block-BZOOOPA9.js +368 -0
- package/dist/pages/address-fields-CwSqro3W.js +277 -0
- package/dist/pages/ai-highlight-D3x2vD83.js +642 -0
- package/dist/pages/alert-D3i7xZTU.js +914 -0
- package/dist/pages/anchored-overlay-BV0OCu2Q.js +788 -0
- package/dist/pages/app-shell-D4hdlHps.js +1558 -0
- package/dist/pages/area-chart-BEWFwiB2.js +718 -0
- package/dist/pages/avatar-BFEqQViw.js +895 -0
- package/dist/pages/avatar-upload-BDCzJfyN.js +484 -0
- package/dist/pages/badge-0-PyMrih.js +1035 -0
- package/dist/pages/bar-chart-DkLogYlt.js +1060 -0
- package/dist/pages/bar-fold-B-3XeIDZ.js +360 -0
- package/dist/pages/board-card-D2tZY_mU.js +415 -0
- package/dist/pages/brand-mark-BqiLvFSR.js +417 -0
- package/dist/pages/button-DAyfssDY.js +715 -0
- package/dist/pages/calendar-Ds7KsgSI.js +682 -0
- package/dist/pages/canvas-stage-1KiPspkX.js +472 -0
- package/dist/pages/card-CQEM1_wc.js +1567 -0
- package/dist/pages/caret-suggestions-oHI6QvqW.js +526 -0
- package/dist/pages/chart-legend-B20AbakD.js +724 -0
- package/dist/pages/chat-composer-CwzUJYIa.js +437 -0
- package/dist/pages/checkbox-BG9Zkb6j.js +1581 -0
- package/dist/pages/checklist-card-DEyykVFS.js +783 -0
- package/dist/pages/chip-Ck-o3Ui6.js +839 -0
- package/dist/pages/chip-list-k1LxXuCi.js +414 -0
- package/dist/pages/clamp-text-n-iE8RDR.js +203 -0
- package/dist/pages/coachmark-Be2ghobT.js +366 -0
- package/dist/pages/code-block-Dv_Y5GYq.js +622 -0
- package/dist/pages/collab-field-CfqqK7d2.js +696 -0
- package/dist/pages/color-field-CZpfcA-A.js +1127 -0
- package/dist/pages/colour-q2ntvI0w.js +1974 -0
- package/dist/pages/column-mapper-TsTG39cl.js +502 -0
- package/dist/pages/combobox-DvK2j5tI.js +1334 -0
- package/dist/pages/command-palette-CJ7uBA04.js +1386 -0
- package/dist/pages/comment-box-CDSGYhr5.js +346 -0
- package/dist/pages/composer-D4B0NgpA.js +689 -0
- package/dist/pages/condition-builder-BZy2ZGXe.js +715 -0
- package/dist/pages/conflict-chooser-C--_9UIS.js +210 -0
- package/dist/pages/context-menu-F9DV30ia.js +487 -0
- package/dist/pages/copy-button-Cn7WiKRF.js +568 -0
- package/dist/pages/copy-field-D3Xt3Jq6.js +511 -0
- package/dist/pages/danger-zone-Db_UUeiP.js +564 -0
- package/dist/pages/date-input-GOW067EB.js +956 -0
- package/dist/pages/date-picker-GdBciR99.js +1569 -0
- package/dist/pages/date-time-BLKCXtVZ.js +678 -0
- package/dist/pages/delta-CNAGv8JY.js +779 -0
- package/dist/pages/description-list-BPeXn1eW.js +1268 -0
- package/dist/pages/device-switcher-BCaN99c1.js +554 -0
- package/dist/pages/dialog-CRpkRC98.js +3164 -0
- package/dist/pages/docs-lM2UBSir.js +520 -0
- package/dist/pages/doodle-nzkqi2UI.js +201 -0
- package/dist/pages/drag-ghost-B6kpzC3O.js +426 -0
- package/dist/pages/drill-menu-cskH5mol.js +490 -0
- package/dist/pages/dropzone-DOY_Rhw0.js +1069 -0
- package/dist/pages/element-toolbar-DZIhXlCJ.js +498 -0
- package/dist/pages/emoji-picker-CqaWaffD.js +235 -0
- package/dist/pages/empty-state-4U2txFpI.js +1113 -0
- package/dist/pages/facet-filters-McbBeY9e.js +353 -0
- package/dist/pages/figure-D-HF5vCj.js +563 -0
- package/dist/pages/figure-strip-BB3mNl7D.js +1364 -0
- package/dist/pages/figure-tabs-QOeQMY6N.js +578 -0
- package/dist/pages/file-chip-DMDjtlqQ.js +738 -0
- package/dist/pages/filter-pill-DzqNOsD4.js +1295 -0
- package/dist/pages/font-picker-Bqhu0QMh.js +416 -0
- package/dist/pages/form-grid-BfWCVlie.js +692 -0
- package/dist/pages/gallery-BBk2EOri.js +453 -0
- package/dist/pages/gif-picker-CnoDTCaL.js +270 -0
- package/dist/pages/gradient-editor-Bqxp7Fxj.js +378 -0
- package/dist/pages/grouped-checklist-gNZ0tBKU.js +477 -0
- package/dist/pages/heatmap-BohgIcNk.js +507 -0
- package/dist/pages/highlight-text-BfxzfmvS.js +287 -0
- package/dist/pages/home-dashboard-CxPmvduE.js +962 -0
- package/dist/pages/host-B6znjEgQ.js +109 -0
- package/dist/pages/hosted-embed-Jef3aIMP.js +163 -0
- package/dist/pages/hosted-field-BLh-53AE.js +208 -0
- package/dist/pages/hosted-field-DEpI4lVS.js +514 -0
- package/dist/pages/icon-button-Bu4Gj5sy.js +1200 -0
- package/dist/pages/icon-picker-DEyoMUTh.js +291 -0
- package/dist/pages/icon-tile-DcgxyXPF.js +592 -0
- package/dist/pages/icons-CJ9Aar3d.js +736 -0
- package/dist/pages/image-cropper-NyougqLH.js +466 -0
- package/dist/pages/image-field-7knBv4mJ.js +567 -0
- package/dist/pages/import-result-CmTtGXW_.js +486 -0
- package/dist/pages/inline-confirm-CEcI5Lxo.js +327 -0
- package/dist/pages/inline-edit-Ba39SzhM.js +1125 -0
- package/dist/pages/input-CzLCzfyx.js +2372 -0
- package/dist/pages/installation-C3UcpQJT.js +528 -0
- package/dist/pages/job-indicator-DOXWbFdl.js +755 -0
- package/dist/pages/kanban-Dy9sPAI0.js +740 -0
- package/dist/pages/kbd-UNj4zqxn.js +545 -0
- package/dist/pages/layout-primitives-CPRaZeyt.js +483 -0
- package/dist/pages/line-chart-CntWxeMF.js +1117 -0
- package/dist/pages/link-CXqvAg9z.js +689 -0
- package/dist/pages/link-picker-BMFGCC67.js +478 -0
- package/dist/pages/link-row-x8yaUuWc.js +595 -0
- package/dist/pages/live-globe-95ROMhGQ.js +715 -0
- package/dist/pages/loading-overlay-BeGuXM9G.js +456 -0
- package/dist/pages/loading-state-BNbCo51C.js +556 -0
- package/dist/pages/log-viewer-BQz8I_a2.js +503 -0
- package/dist/pages/logo-B38rnzoq.js +571 -0
- package/dist/pages/lottie_light-CxEH8eiR.js +9116 -0
- package/dist/pages/markdown-Ied72vMT.js +237 -0
- package/dist/pages/markdown-field-BfnIEKZH.js +193 -0
- package/dist/pages/media-banner-DkStCia0.js +233 -0
- package/dist/pages/menu-NrLYKqKp.js +2132 -0
- package/dist/pages/message-thread-Bo4zbxqu.js +731 -0
- package/dist/pages/meta-line-D5p2TycR.js +371 -0
- package/dist/pages/model-viewer-BfokvHoc.js +60288 -0
- package/dist/pages/model-viewer-C8PFO8wk.js +577 -0
- package/dist/pages/month-calendar-T1vw9Rup.js +457 -0
- package/dist/pages/motion-CrXtiBvA.js +865 -0
- package/dist/pages/number-input-CuyMZg18.js +968 -0
- package/dist/pages/orbit-loader-DeVBtkFE.js +219 -0
- package/dist/pages/orbit-spinner-Dxv5qAhr.js +348 -0
- package/dist/pages/otp-input-CVRoX1mw.js +591 -0
- package/dist/pages/overview-LA9XRhZc.js +130 -0
- package/dist/pages/package-dimensions-DFCyZj_T.js +192 -0
- package/dist/pages/pagination-C1EgVtW4.js +294 -0
- package/dist/pages/palette-tile-X9ZXu2Z0.js +414 -0
- package/dist/pages/password-field-DHEQKyUC.js +912 -0
- package/dist/pages/person-cell-BmjbADBz.js +564 -0
- package/dist/pages/phone-input-B3G7Qpb2.js +747 -0
- package/dist/pages/plan-card-DRaA6RuB.js +621 -0
- package/dist/pages/plan-card-DtloWvMh.js +258 -0
- package/dist/pages/plan-comparison-BVIGTtbd.js +559 -0
- package/dist/pages/plan-grid-cfPVTB5V.js +251 -0
- package/dist/pages/point-list-BbPmZjsm.js +222 -0
- package/dist/pages/popover-C3Oar9D5.js +1198 -0
- package/dist/pages/presence-avatars-CRZIk8n9.js +328 -0
- package/dist/pages/preview-frame-Bcwk0y_Q.js +1631 -0
- package/dist/pages/price-CRBLoa9h.js +604 -0
- package/dist/pages/principles-pnDyfHpK.js +483 -0
- package/dist/pages/print-page-BkLv6bW8.js +513 -0
- package/dist/pages/profile-hero-CC9dUzuN.js +498 -0
- package/dist/pages/progress-CP_awmo4.js +904 -0
- package/dist/pages/progress-ring-JuOAwk2T.js +576 -0
- package/dist/pages/radio-group-C-4tg6FS.js +1639 -0
- package/dist/pages/radius-control-B2kRA2Ch.js +441 -0
- package/dist/pages/rating-CweKN2SX.js +471 -0
- package/dist/pages/record-layout-DUP_X0RL.js +719 -0
- package/dist/pages/record-pager-y9D7JFgb.js +278 -0
- package/dist/pages/registry-BZg-xAbi.js +594 -0
- package/dist/pages/release-Cs6tl16C.js +16 -0
- package/dist/pages/repeater-BRZYKRQa.js +1351 -0
- package/dist/pages/reply-feedback-BDnHprla.js +192 -0
- package/dist/pages/reveal-BygENBbL.js +460 -0
- package/dist/pages/rich-text-DOFQZEpT.js +156 -0
- package/dist/pages/rich-text-editor-BhIM20JI.js +1265 -0
- package/dist/pages/rolldown-runtime-CbKu08Hx.js +25 -0
- package/dist/pages/rolling-number-GR3Cyfpz.js +529 -0
- package/dist/pages/row-list-Dl6CYhC-.js +1565 -0
- package/dist/pages/rule-list-DTCmIMpT.js +648 -0
- package/dist/pages/save-status-B5KkyMZP.js +378 -0
- package/dist/pages/schedule-YycI95O1.js +243 -0
- package/dist/pages/scroll-area-B2sGm23Q.js +423 -0
- package/dist/pages/search-field-D1uG7R6A.js +693 -0
- package/dist/pages/search-menu-DMuXyUUW.js +580 -0
- package/dist/pages/secret-field-Dj9x3LL8.js +337 -0
- package/dist/pages/section-rail-BtTCETS5.js +637 -0
- package/dist/pages/section-v2Pubup9.js +639 -0
- package/dist/pages/segmented-control-D-FB1K1T.js +1190 -0
- package/dist/pages/select-DZ43NpOm.js +1434 -0
- package/dist/pages/selection-chrome-Czcs6RN6.js +437 -0
- package/dist/pages/separator-CFwqRvfO.js +428 -0
- package/dist/pages/serp-preview-BGwORjmo.js +346 -0
- package/dist/pages/setting-row-Bt-dZV8H.js +913 -0
- package/dist/pages/shape-DzniHAVT.js +627 -0
- package/dist/pages/share-list-D4wgBxKN.js +926 -0
- package/dist/pages/side-panel-CCtkrZjs.js +811 -0
- package/dist/pages/site-preview-Dj1hM2Yo.js +353 -0
- package/dist/pages/skeleton-C1F5HkAu.js +1325 -0
- package/dist/pages/skip-link-BxznhSkz.js +252 -0
- package/dist/pages/slider-CAoPURKD.js +774 -0
- package/dist/pages/sortable-card-Sr44uCpI.js +424 -0
- package/dist/pages/sortable-list-DUAleYE1.js +1298 -0
- package/dist/pages/sortable-tree-BLzK-hTE.js +737 -0
- package/dist/pages/spacing-box-CtuvzxQu.js +550 -0
- package/dist/pages/sparkline-D3aavCly.js +947 -0
- package/dist/pages/split-bar-DYgZnFID.js +414 -0
- package/dist/pages/split-button-Be08-VI-.js +335 -0
- package/dist/pages/split-pane-lSNZgTKt.js +523 -0
- package/dist/pages/status-badge-DOdNhmzn.js +1074 -0
- package/dist/pages/status-checklist-CWkjCZIC.js +1152 -0
- package/dist/pages/status-dot-D99gAGsV.js +567 -0
- package/dist/pages/stepper-CxKTbEA-.js +1093 -0
- package/dist/pages/success-mark-CqFTOBEu.js +142 -0
- package/dist/pages/swatch-H_kNvHuC.js +565 -0
- package/dist/pages/switch-C93K6j9h.js +617 -0
- package/dist/pages/table-CL0vomno.js +3225 -0
- package/dist/pages/tabs-Dh0mUsLw.js +1690 -0
- package/dist/pages/tag-input-BjZWKKRJ.js +1307 -0
- package/dist/pages/task-card-Dv0sR1-w.js +295 -0
- package/dist/pages/textarea-CCM-SnGN.js +949 -0
- package/dist/pages/thumbnail-DwFJL_k1.js +1147 -0
- package/dist/pages/time-input-CA9-uZAa.js +442 -0
- package/dist/pages/time-zone-select-CEtMXVYO.js +296 -0
- package/dist/pages/timeline-BsMUTlpR.js +1798 -0
- package/dist/pages/toast-zXLRiMRT.js +1391 -0
- package/dist/pages/tool-rail-B1AbTMCP.js +355 -0
- package/dist/pages/toolbar-B9l_fHKy.js +754 -0
- package/dist/pages/tooltip-LHtCUkF-.js +826 -0
- package/dist/pages/translation-field-CTRXiF2N.js +251 -0
- package/dist/pages/tree-checklist-CJj3OcLg.js +451 -0
- package/dist/pages/tree-select-DU1qXHy_.js +492 -0
- package/dist/pages/tree-view-g_RjLtAb.js +739 -0
- package/dist/pages/typography-BSijtiRl.js +876 -0
- package/dist/pages/unit-input-Dml4fjmK.js +659 -0
- package/dist/pages/upload-rules-yozEzSah.js +419 -0
- package/dist/pages/url-upload-input-SSnMgfpA.js +307 -0
- package/dist/pages/value-change-CnubDKyO.js +489 -0
- package/dist/pages/weekly-hours-i2EpsmTx.js +287 -0
- package/dist/pages/widget-preview-CUJMyZ_k.js +625 -0
- package/dist/pages/working-status-CENemSsw.js +389 -0
- package/manifest.json +13001 -0
- package/package.json +35 -4
|
@@ -0,0 +1,1035 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as DocLink } from "./host-B6znjEgQ.js";
|
|
3
|
+
import { a as DocTable, d as Section$1, i as DocPage, l as Note, m as ThemePair, o as Example, p as SubSection, r as DoDont, s as Guidelines, u as PropsTable } from "./docs-lM2UBSir.js";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Badge, IconButton, statusRegistry } from "@orbitcommerce/constellation";
|
|
7
|
+
import { ArrowsClockwiseIcon, ClockIcon, CreditCardIcon, MinusIcon, PackageIcon, PlusIcon, ReceiptIcon, StorefrontIcon, TagIcon } from "@orbitcommerce/constellation/icons";
|
|
8
|
+
//#region src/pages/components/badge.tsx
|
|
9
|
+
function Preview() {
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
11
|
+
className: "badge-preview",
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
14
|
+
tone: "positive",
|
|
15
|
+
children: "Paid"
|
|
16
|
+
}),
|
|
17
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
18
|
+
tone: "warning",
|
|
19
|
+
dot: true,
|
|
20
|
+
children: "Awaiting payment"
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
23
|
+
tone: "negative",
|
|
24
|
+
children: "Failed"
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
27
|
+
variant: "outline",
|
|
28
|
+
children: "Trade"
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
31
|
+
tone: "info",
|
|
32
|
+
children: "Click and collect"
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
35
|
+
variant: "solid",
|
|
36
|
+
tone: "accent",
|
|
37
|
+
children: "3"
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
var TONES = [
|
|
43
|
+
"neutral",
|
|
44
|
+
"accent",
|
|
45
|
+
"positive",
|
|
46
|
+
"negative",
|
|
47
|
+
"warning",
|
|
48
|
+
"info"
|
|
49
|
+
];
|
|
50
|
+
var VARIANTS = [
|
|
51
|
+
"subtle",
|
|
52
|
+
"solid",
|
|
53
|
+
"outline"
|
|
54
|
+
];
|
|
55
|
+
var capitalise = (word) => word.charAt(0).toUpperCase() + word.slice(1);
|
|
56
|
+
/** Every tone in every variant, labelled with the tone's name. */
|
|
57
|
+
function BadgeMatrix() {
|
|
58
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
59
|
+
className: "badge-matrix",
|
|
60
|
+
children: [VARIANTS.map((variant) => /* @__PURE__ */ jsx("span", {
|
|
61
|
+
className: "badge-matrix__head",
|
|
62
|
+
children: capitalise(variant)
|
|
63
|
+
}, variant)), TONES.map((tone) => VARIANTS.map((variant) => /* @__PURE__ */ jsx(Badge, {
|
|
64
|
+
tone,
|
|
65
|
+
variant,
|
|
66
|
+
children: capitalise(tone)
|
|
67
|
+
}, `${tone}-${variant}`)))]
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function LiveCount() {
|
|
71
|
+
const [count, setCount] = useState(7);
|
|
72
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
73
|
+
/* @__PURE__ */ jsxs("span", {
|
|
74
|
+
className: "badge-count",
|
|
75
|
+
children: ["Unfulfilled orders", /* @__PURE__ */ jsx(Badge, {
|
|
76
|
+
variant: "solid",
|
|
77
|
+
tone: "accent",
|
|
78
|
+
children: count
|
|
79
|
+
})]
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ jsx(IconButton, {
|
|
82
|
+
label: "One fewer",
|
|
83
|
+
size: "sm",
|
|
84
|
+
variant: "secondary",
|
|
85
|
+
onClick: () => setCount((n) => Math.max(0, n - 1)),
|
|
86
|
+
children: /* @__PURE__ */ jsx(MinusIcon, {})
|
|
87
|
+
}),
|
|
88
|
+
/* @__PURE__ */ jsx(IconButton, {
|
|
89
|
+
label: "One more",
|
|
90
|
+
size: "sm",
|
|
91
|
+
variant: "secondary",
|
|
92
|
+
onClick: () => setCount((n) => n + 1),
|
|
93
|
+
children: /* @__PURE__ */ jsx(PlusIcon, {})
|
|
94
|
+
})
|
|
95
|
+
] });
|
|
96
|
+
}
|
|
97
|
+
var tone = (name) => /* @__PURE__ */ jsx("code", { children: name });
|
|
98
|
+
/** A badge with its tone beside it, for the mapping table. */
|
|
99
|
+
function Status({ tone: meaning, icon, children }) {
|
|
100
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
101
|
+
className: "badge-status",
|
|
102
|
+
children: [/* @__PURE__ */ jsx(Badge, {
|
|
103
|
+
tone: meaning,
|
|
104
|
+
icon,
|
|
105
|
+
children
|
|
106
|
+
}), /* @__PURE__ */ jsx("code", { children: meaning })]
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/** A status as the registry draws it, so this table cannot disagree with the status badge. */
|
|
110
|
+
function Registered({ domain, status, label }) {
|
|
111
|
+
return /* @__PURE__ */ jsx(Status, {
|
|
112
|
+
tone: statusRegistry.tone(domain, status),
|
|
113
|
+
children: label ?? statusRegistry.label(domain, status)
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
function Page() {
|
|
117
|
+
return /* @__PURE__ */ jsxs(DocPage, {
|
|
118
|
+
title: "Badge",
|
|
119
|
+
status: "stable",
|
|
120
|
+
importNames: ["Badge"],
|
|
121
|
+
lead: "A small pill that labels a status, a count or a category. Reach for it when one or two words tell the merchant the state of something at a glance: Paid, Unfulfilled, 3 new. For a status that comes from the API, use the status badge, which picks the tone for you.",
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
124
|
+
id: "tones",
|
|
125
|
+
title: "Tones",
|
|
126
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
127
|
+
"The tone is the meaning. ",
|
|
128
|
+
/* @__PURE__ */ jsx("code", { children: "neutral" }),
|
|
129
|
+
" is the default. The four status tones carry the same meaning everywhere in Orbit, so a merchant learns them once."
|
|
130
|
+
] }),
|
|
131
|
+
children: [/* @__PURE__ */ jsxs(Example, {
|
|
132
|
+
code: `
|
|
133
|
+
<Badge>Draft</Badge>
|
|
134
|
+
<Badge tone="accent">New</Badge>
|
|
135
|
+
<Badge tone="positive">Paid</Badge>
|
|
136
|
+
<Badge tone="negative">Failed</Badge>
|
|
137
|
+
<Badge tone="warning">Low stock</Badge>
|
|
138
|
+
<Badge tone="info">Scheduled</Badge>`,
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ jsx(Badge, { children: "Draft" }),
|
|
141
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
142
|
+
tone: "accent",
|
|
143
|
+
children: "New"
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
146
|
+
tone: "positive",
|
|
147
|
+
children: "Paid"
|
|
148
|
+
}),
|
|
149
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
150
|
+
tone: "negative",
|
|
151
|
+
children: "Failed"
|
|
152
|
+
}),
|
|
153
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
154
|
+
tone: "warning",
|
|
155
|
+
children: "Low stock"
|
|
156
|
+
}),
|
|
157
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
158
|
+
tone: "info",
|
|
159
|
+
children: "Scheduled"
|
|
160
|
+
})
|
|
161
|
+
]
|
|
162
|
+
}), /* @__PURE__ */ jsx(SubSection, {
|
|
163
|
+
title: "What each tone means",
|
|
164
|
+
children: /* @__PURE__ */ jsx(DocTable, {
|
|
165
|
+
columns: [
|
|
166
|
+
"Tone",
|
|
167
|
+
"Means",
|
|
168
|
+
"For example"
|
|
169
|
+
],
|
|
170
|
+
rows: [
|
|
171
|
+
[
|
|
172
|
+
tone("neutral"),
|
|
173
|
+
"No judgement: not started, closed, or just a fact.",
|
|
174
|
+
"Draft, Archived, Unfulfilled"
|
|
175
|
+
],
|
|
176
|
+
[
|
|
177
|
+
tone("accent"),
|
|
178
|
+
"Orbit teal: what Orbit wants you to notice. New, live, a count asking for attention. Also the few special states that are neither good nor bad. Never a good or bad status.",
|
|
179
|
+
"New, 3, Returned, Syncing"
|
|
180
|
+
],
|
|
181
|
+
[
|
|
182
|
+
tone("positive"),
|
|
183
|
+
"Done and good. Nothing to do.",
|
|
184
|
+
"Paid, Fulfilled, In stock"
|
|
185
|
+
],
|
|
186
|
+
[
|
|
187
|
+
tone("negative"),
|
|
188
|
+
"Something failed, was refused or was cancelled.",
|
|
189
|
+
"Payment failed, Cancelled, Declined"
|
|
190
|
+
],
|
|
191
|
+
[
|
|
192
|
+
tone("warning"),
|
|
193
|
+
"Needs the merchant soon, or money is still owed or moving back.",
|
|
194
|
+
"Awaiting payment, Refunded, Low stock"
|
|
195
|
+
],
|
|
196
|
+
[
|
|
197
|
+
tone("info"),
|
|
198
|
+
"Worth knowing, nothing to do.",
|
|
199
|
+
"Click and collect, Scheduled, Pre-order"
|
|
200
|
+
]
|
|
201
|
+
]
|
|
202
|
+
})
|
|
203
|
+
})]
|
|
204
|
+
}),
|
|
205
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
206
|
+
id: "variants",
|
|
207
|
+
title: "Variants",
|
|
208
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
209
|
+
"Four materials. ",
|
|
210
|
+
/* @__PURE__ */ jsx("code", { children: "subtle" }),
|
|
211
|
+
" is the default and is right for status. ",
|
|
212
|
+
/* @__PURE__ */ jsx("code", { children: "solid" }),
|
|
213
|
+
" is for counts and the few states that must shout. ",
|
|
214
|
+
/* @__PURE__ */ jsx("code", { children: "outline" }),
|
|
215
|
+
" is for categories and quiet flags that sit beside a status without competing with it. ",
|
|
216
|
+
/* @__PURE__ */ jsx("code", { children: "dashed" }),
|
|
217
|
+
" is for a value that is not there yet: quiet words in a dashed hairline, whatever the tone."
|
|
218
|
+
] }),
|
|
219
|
+
children: [/* @__PURE__ */ jsx(Example, {
|
|
220
|
+
align: "start",
|
|
221
|
+
code: `
|
|
222
|
+
<Badge tone="positive">Paid</Badge>
|
|
223
|
+
<Badge tone="warning">Awaiting payment</Badge>
|
|
224
|
+
<Badge tone="negative">Failed</Badge>
|
|
225
|
+
|
|
226
|
+
<Badge variant="solid" tone="accent">3</Badge>
|
|
227
|
+
<Badge variant="solid">12</Badge>
|
|
228
|
+
<Badge variant="solid" tone="negative">99+</Badge>
|
|
229
|
+
<Badge variant="solid" tone="negative">Overdue</Badge>
|
|
230
|
+
|
|
231
|
+
<Badge variant="outline">Trade</Badge>
|
|
232
|
+
<Badge variant="outline" tone="info">Pre-order</Badge>
|
|
233
|
+
<Badge variant="outline" tone="warning">Sample data</Badge>
|
|
234
|
+
|
|
235
|
+
<Badge variant="dashed">No pricing yet</Badge>
|
|
236
|
+
<Badge variant="dashed" dot>No plan</Badge>`,
|
|
237
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
238
|
+
className: "badge-rows",
|
|
239
|
+
children: [
|
|
240
|
+
/* @__PURE__ */ jsxs("div", {
|
|
241
|
+
className: "badge-row",
|
|
242
|
+
children: [
|
|
243
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
244
|
+
tone: "positive",
|
|
245
|
+
children: "Paid"
|
|
246
|
+
}),
|
|
247
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
248
|
+
tone: "warning",
|
|
249
|
+
children: "Awaiting payment"
|
|
250
|
+
}),
|
|
251
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
252
|
+
tone: "negative",
|
|
253
|
+
children: "Failed"
|
|
254
|
+
})
|
|
255
|
+
]
|
|
256
|
+
}),
|
|
257
|
+
/* @__PURE__ */ jsxs("div", {
|
|
258
|
+
className: "badge-row",
|
|
259
|
+
children: [
|
|
260
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
261
|
+
variant: "solid",
|
|
262
|
+
tone: "accent",
|
|
263
|
+
children: "3"
|
|
264
|
+
}),
|
|
265
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
266
|
+
variant: "solid",
|
|
267
|
+
children: "12"
|
|
268
|
+
}),
|
|
269
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
270
|
+
variant: "solid",
|
|
271
|
+
tone: "negative",
|
|
272
|
+
children: "99+"
|
|
273
|
+
}),
|
|
274
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
275
|
+
variant: "solid",
|
|
276
|
+
tone: "negative",
|
|
277
|
+
children: "Overdue"
|
|
278
|
+
})
|
|
279
|
+
]
|
|
280
|
+
}),
|
|
281
|
+
/* @__PURE__ */ jsxs("div", {
|
|
282
|
+
className: "badge-row",
|
|
283
|
+
children: [
|
|
284
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
285
|
+
variant: "outline",
|
|
286
|
+
children: "Trade"
|
|
287
|
+
}),
|
|
288
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
289
|
+
variant: "outline",
|
|
290
|
+
tone: "info",
|
|
291
|
+
children: "Pre-order"
|
|
292
|
+
}),
|
|
293
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
294
|
+
variant: "outline",
|
|
295
|
+
tone: "warning",
|
|
296
|
+
children: "Sample data"
|
|
297
|
+
})
|
|
298
|
+
]
|
|
299
|
+
}),
|
|
300
|
+
/* @__PURE__ */ jsxs("div", {
|
|
301
|
+
className: "badge-row",
|
|
302
|
+
children: [/* @__PURE__ */ jsx(Badge, {
|
|
303
|
+
variant: "dashed",
|
|
304
|
+
children: "No pricing yet"
|
|
305
|
+
}), /* @__PURE__ */ jsx(Badge, {
|
|
306
|
+
variant: "dashed",
|
|
307
|
+
dot: true,
|
|
308
|
+
children: "No plan"
|
|
309
|
+
})]
|
|
310
|
+
})
|
|
311
|
+
]
|
|
312
|
+
})
|
|
313
|
+
}), /* @__PURE__ */ jsx(SubSection, {
|
|
314
|
+
title: "When to use each",
|
|
315
|
+
children: /* @__PURE__ */ jsx(DocTable, {
|
|
316
|
+
columns: ["Variant", "Use it for"],
|
|
317
|
+
rows: [
|
|
318
|
+
[/* @__PURE__ */ jsx("code", { children: "subtle" }), "Status in lists, rows and headers: a tinted pill with toned text. The default."],
|
|
319
|
+
[/* @__PURE__ */ jsx("code", { children: "solid" }), "Counts, and strong states such as Overdue. A single digit becomes a circle."],
|
|
320
|
+
[/* @__PURE__ */ jsx("code", { children: "outline" }), "Categories and quiet flags: Trade, Pre-order, VAT 20%, Sample data."],
|
|
321
|
+
[/* @__PURE__ */ jsx("code", { children: "dashed" }), "A value that is not there yet, where a dash would be lost: No pricing yet, No plan."]
|
|
322
|
+
]
|
|
323
|
+
})
|
|
324
|
+
})]
|
|
325
|
+
}),
|
|
326
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
327
|
+
id: "both-themes",
|
|
328
|
+
title: "In both themes",
|
|
329
|
+
description: /* @__PURE__ */ jsx("p", { children: "Every tone in every variant, light and dark side by side. In dark the washes deepen and the status hues lift, so toned text still reads as ink with a colour." }),
|
|
330
|
+
children: /* @__PURE__ */ jsx(ThemePair, { children: /* @__PURE__ */ jsx(BadgeMatrix, {}) })
|
|
331
|
+
}),
|
|
332
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
333
|
+
id: "sizes",
|
|
334
|
+
title: "Sizes",
|
|
335
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
336
|
+
/* @__PURE__ */ jsx("code", { children: "md" }),
|
|
337
|
+
" is 22px tall with 12px text, the default. ",
|
|
338
|
+
/* @__PURE__ */ jsx("code", { children: "sm" }),
|
|
339
|
+
" is 18px with 11px text, for dense table rows and beside 13px text. ",
|
|
340
|
+
/* @__PURE__ */ jsx("code", { children: "lg" }),
|
|
341
|
+
" is 28px with 13px text, the height of the controls beside it: a summary under a page title, or a status that is a link."
|
|
342
|
+
] }),
|
|
343
|
+
children: [/* @__PURE__ */ jsx(Example, {
|
|
344
|
+
align: "start",
|
|
345
|
+
code: `
|
|
346
|
+
<Badge tone="positive">Paid</Badge>
|
|
347
|
+
<Badge tone="warning" dot>Awaiting payment</Badge>
|
|
348
|
+
<Badge variant="outline">VAT 20%</Badge>
|
|
349
|
+
<Badge variant="solid" tone="accent">5</Badge>
|
|
350
|
+
|
|
351
|
+
<Badge size="sm" tone="positive">Paid</Badge>
|
|
352
|
+
<Badge size="sm" tone="warning" dot>Awaiting payment</Badge>
|
|
353
|
+
<Badge size="sm" variant="outline">VAT 20%</Badge>
|
|
354
|
+
<Badge size="sm" variant="solid" tone="accent">5</Badge>
|
|
355
|
+
|
|
356
|
+
<Badge size="lg" tone="positive">Paid</Badge>
|
|
357
|
+
<Badge size="lg" tone="warning" dot>Awaiting payment</Badge>
|
|
358
|
+
<Badge size="lg" variant="outline">VAT 20%</Badge>`,
|
|
359
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
360
|
+
className: "badge-rows",
|
|
361
|
+
children: [
|
|
362
|
+
/* @__PURE__ */ jsxs("div", {
|
|
363
|
+
className: "badge-row",
|
|
364
|
+
children: [
|
|
365
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
366
|
+
tone: "positive",
|
|
367
|
+
children: "Paid"
|
|
368
|
+
}),
|
|
369
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
370
|
+
tone: "warning",
|
|
371
|
+
dot: true,
|
|
372
|
+
children: "Awaiting payment"
|
|
373
|
+
}),
|
|
374
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
375
|
+
variant: "outline",
|
|
376
|
+
children: "VAT 20%"
|
|
377
|
+
}),
|
|
378
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
379
|
+
variant: "solid",
|
|
380
|
+
tone: "accent",
|
|
381
|
+
children: "5"
|
|
382
|
+
})
|
|
383
|
+
]
|
|
384
|
+
}),
|
|
385
|
+
/* @__PURE__ */ jsxs("div", {
|
|
386
|
+
className: "badge-row",
|
|
387
|
+
children: [
|
|
388
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
389
|
+
size: "sm",
|
|
390
|
+
tone: "positive",
|
|
391
|
+
children: "Paid"
|
|
392
|
+
}),
|
|
393
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
394
|
+
size: "sm",
|
|
395
|
+
tone: "warning",
|
|
396
|
+
dot: true,
|
|
397
|
+
children: "Awaiting payment"
|
|
398
|
+
}),
|
|
399
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
400
|
+
size: "sm",
|
|
401
|
+
variant: "outline",
|
|
402
|
+
children: "VAT 20%"
|
|
403
|
+
}),
|
|
404
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
405
|
+
size: "sm",
|
|
406
|
+
variant: "solid",
|
|
407
|
+
tone: "accent",
|
|
408
|
+
children: "5"
|
|
409
|
+
})
|
|
410
|
+
]
|
|
411
|
+
}),
|
|
412
|
+
/* @__PURE__ */ jsxs("div", {
|
|
413
|
+
className: "badge-row",
|
|
414
|
+
children: [
|
|
415
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
416
|
+
size: "lg",
|
|
417
|
+
tone: "positive",
|
|
418
|
+
children: "Paid"
|
|
419
|
+
}),
|
|
420
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
421
|
+
size: "lg",
|
|
422
|
+
tone: "warning",
|
|
423
|
+
dot: true,
|
|
424
|
+
children: "Awaiting payment"
|
|
425
|
+
}),
|
|
426
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
427
|
+
size: "lg",
|
|
428
|
+
variant: "outline",
|
|
429
|
+
children: "VAT 20%"
|
|
430
|
+
})
|
|
431
|
+
]
|
|
432
|
+
})
|
|
433
|
+
]
|
|
434
|
+
})
|
|
435
|
+
}), /* @__PURE__ */ jsx(SubSection, {
|
|
436
|
+
title: "With a figure",
|
|
437
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
438
|
+
/* @__PURE__ */ jsx("code", { children: "figure" }),
|
|
439
|
+
" puts a number before the words, in ink at 600 on the neutral pill, and the two read as one phrase. At ",
|
|
440
|
+
/* @__PURE__ */ jsx("code", { children: "lg" }),
|
|
441
|
+
" it is the summary strip under a supplier's name."
|
|
442
|
+
] }),
|
|
443
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
444
|
+
align: "start",
|
|
445
|
+
code: `
|
|
446
|
+
<Badge size="lg" icon={<PackageIcon />} figure="142">products imported</Badge>
|
|
447
|
+
<Badge size="lg" icon={<ArrowsClockwiseIcon />} figure="12">updates waiting</Badge>
|
|
448
|
+
<Badge size="lg" icon={<ClockIcon />}>Synced 3 hours ago</Badge>`,
|
|
449
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
450
|
+
className: "badge-row",
|
|
451
|
+
children: [
|
|
452
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
453
|
+
size: "lg",
|
|
454
|
+
icon: /* @__PURE__ */ jsx(PackageIcon, {}),
|
|
455
|
+
figure: "142",
|
|
456
|
+
children: "products imported"
|
|
457
|
+
}),
|
|
458
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
459
|
+
size: "lg",
|
|
460
|
+
icon: /* @__PURE__ */ jsx(ArrowsClockwiseIcon, {}),
|
|
461
|
+
figure: "12",
|
|
462
|
+
children: "updates waiting"
|
|
463
|
+
}),
|
|
464
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
465
|
+
size: "lg",
|
|
466
|
+
icon: /* @__PURE__ */ jsx(ClockIcon, {}),
|
|
467
|
+
children: "Synced 3 hours ago"
|
|
468
|
+
})
|
|
469
|
+
]
|
|
470
|
+
})
|
|
471
|
+
})
|
|
472
|
+
})]
|
|
473
|
+
}),
|
|
474
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
475
|
+
id: "dot-and-pulse",
|
|
476
|
+
title: "Dot and pulse",
|
|
477
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
478
|
+
/* @__PURE__ */ jsx("code", { children: "dot" }),
|
|
479
|
+
" puts a small tone dot before the label. It helps the eye scan a column of mixed states by colour before reading, so use it for every badge in that column or none. ",
|
|
480
|
+
/* @__PURE__ */ jsx("code", { children: "pulse" }),
|
|
481
|
+
" makes the dot send out a ring on a loop, like a transmission: only for states that are live right now."
|
|
482
|
+
] }),
|
|
483
|
+
children: [/* @__PURE__ */ jsxs(Example, {
|
|
484
|
+
code: `
|
|
485
|
+
<Badge tone="warning" dot>Awaiting payment</Badge>
|
|
486
|
+
<Badge tone="positive" dot>Paid</Badge>
|
|
487
|
+
<Badge dot>Draft</Badge>
|
|
488
|
+
<Badge tone="positive" pulse>Store live</Badge>
|
|
489
|
+
<Badge tone="accent" pulse>Syncing catalogue</Badge>`,
|
|
490
|
+
children: [
|
|
491
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
492
|
+
tone: "warning",
|
|
493
|
+
dot: true,
|
|
494
|
+
children: "Awaiting payment"
|
|
495
|
+
}),
|
|
496
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
497
|
+
tone: "positive",
|
|
498
|
+
dot: true,
|
|
499
|
+
children: "Paid"
|
|
500
|
+
}),
|
|
501
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
502
|
+
dot: true,
|
|
503
|
+
children: "Draft"
|
|
504
|
+
}),
|
|
505
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
506
|
+
tone: "positive",
|
|
507
|
+
pulse: true,
|
|
508
|
+
children: "Store live"
|
|
509
|
+
}),
|
|
510
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
511
|
+
tone: "accent",
|
|
512
|
+
pulse: true,
|
|
513
|
+
children: "Syncing catalogue"
|
|
514
|
+
})
|
|
515
|
+
]
|
|
516
|
+
}), /* @__PURE__ */ jsx(Note, {
|
|
517
|
+
title: "Reduced motion",
|
|
518
|
+
children: "When the system asks for reduced motion the pulse stops sending rings and the dot breathes in place instead, so a live state still looks live."
|
|
519
|
+
})]
|
|
520
|
+
}),
|
|
521
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
522
|
+
id: "icons",
|
|
523
|
+
title: "With an icon",
|
|
524
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
525
|
+
/* @__PURE__ */ jsx("code", { children: "icon" }),
|
|
526
|
+
" leads the label at 12px (11px at ",
|
|
527
|
+
/* @__PURE__ */ jsx("code", { children: "sm" }),
|
|
528
|
+
"). Use one when the picture says something the word alone does not, such as how an order is being collected. The icon is decorative; the label still has to carry the meaning."
|
|
529
|
+
] }),
|
|
530
|
+
children: /* @__PURE__ */ jsxs(Example, {
|
|
531
|
+
code: `
|
|
532
|
+
<Badge tone="info" icon={<StorefrontIcon />}>Click and collect</Badge>
|
|
533
|
+
<Badge tone="warning" icon={<ClockIcon />}>Due today</Badge>
|
|
534
|
+
<Badge tone="accent" icon={<TagIcon />}>On sale</Badge>
|
|
535
|
+
<Badge variant="outline" icon={<ReceiptIcon />}>VAT invoice</Badge>`,
|
|
536
|
+
children: [
|
|
537
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
538
|
+
tone: "info",
|
|
539
|
+
icon: /* @__PURE__ */ jsx(StorefrontIcon, {}),
|
|
540
|
+
children: "Click and collect"
|
|
541
|
+
}),
|
|
542
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
543
|
+
tone: "warning",
|
|
544
|
+
icon: /* @__PURE__ */ jsx(ClockIcon, {}),
|
|
545
|
+
children: "Due today"
|
|
546
|
+
}),
|
|
547
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
548
|
+
tone: "accent",
|
|
549
|
+
icon: /* @__PURE__ */ jsx(TagIcon, {}),
|
|
550
|
+
children: "On sale"
|
|
551
|
+
}),
|
|
552
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
553
|
+
variant: "outline",
|
|
554
|
+
icon: /* @__PURE__ */ jsx(ReceiptIcon, {}),
|
|
555
|
+
children: "VAT invoice"
|
|
556
|
+
})
|
|
557
|
+
]
|
|
558
|
+
})
|
|
559
|
+
}),
|
|
560
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
561
|
+
id: "counts",
|
|
562
|
+
title: "Counts",
|
|
563
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
564
|
+
"A badge whose only content is a number, or a string of digits such as ",
|
|
565
|
+
/* @__PURE__ */ jsx("code", { children: "\"99+\"" }),
|
|
566
|
+
", is a count. A number is formatted the UK way (",
|
|
567
|
+
/* @__PURE__ */ jsx("code", { children: "{1204}" }),
|
|
568
|
+
" shows as 1,204); a string is shown as written. A solid count is compact, and a single digit becomes a circle. When the value changes the badge bumps once, never on first render. Press the buttons to see it."
|
|
569
|
+
] }),
|
|
570
|
+
children: [/* @__PURE__ */ jsx(Example, {
|
|
571
|
+
code: `
|
|
572
|
+
const [count, setCount] = useState(7)
|
|
573
|
+
|
|
574
|
+
<span>Unfulfilled orders</span>
|
|
575
|
+
<Badge variant="solid" tone="accent">{count}</Badge>
|
|
576
|
+
<IconButton label="One fewer" size="sm" variant="secondary" onClick={() => setCount((n) => Math.max(0, n - 1))}>
|
|
577
|
+
<MinusIcon />
|
|
578
|
+
</IconButton>
|
|
579
|
+
<IconButton label="One more" size="sm" variant="secondary" onClick={() => setCount((n) => n + 1)}>
|
|
580
|
+
<PlusIcon />
|
|
581
|
+
</IconButton>`,
|
|
582
|
+
children: /* @__PURE__ */ jsx(LiveCount, {})
|
|
583
|
+
}), /* @__PURE__ */ jsxs(Example, {
|
|
584
|
+
code: `
|
|
585
|
+
<Badge variant="solid" tone="accent">3</Badge>
|
|
586
|
+
<Badge variant="solid">12</Badge>
|
|
587
|
+
<Badge variant="solid" tone="info">{1204}</Badge>
|
|
588
|
+
<Badge variant="solid" tone="negative">99+</Badge>
|
|
589
|
+
<Badge size="sm" variant="solid" tone="accent">5</Badge>`,
|
|
590
|
+
children: [
|
|
591
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
592
|
+
variant: "solid",
|
|
593
|
+
tone: "accent",
|
|
594
|
+
children: "3"
|
|
595
|
+
}),
|
|
596
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
597
|
+
variant: "solid",
|
|
598
|
+
children: "12"
|
|
599
|
+
}),
|
|
600
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
601
|
+
variant: "solid",
|
|
602
|
+
tone: "info",
|
|
603
|
+
children: 1204
|
|
604
|
+
}),
|
|
605
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
606
|
+
variant: "solid",
|
|
607
|
+
tone: "negative",
|
|
608
|
+
children: "99+"
|
|
609
|
+
}),
|
|
610
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
611
|
+
size: "sm",
|
|
612
|
+
variant: "solid",
|
|
613
|
+
tone: "accent",
|
|
614
|
+
children: "5"
|
|
615
|
+
})
|
|
616
|
+
]
|
|
617
|
+
})]
|
|
618
|
+
}),
|
|
619
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
620
|
+
id: "as-a-link",
|
|
621
|
+
title: "As a link or button",
|
|
622
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
623
|
+
/* @__PURE__ */ jsx("code", { children: "asChild" }),
|
|
624
|
+
" dresses the child element as the badge, so a badge can be a link or a button and keep its focus ring and keyboard behaviour. It takes the hover wash under the pointer and a deeper one when pressed, on every variant and tone, and its target reaches a few pixels past the pill. The child's own words become the label, and end in an ellipsis if they are too long. Put an icon in the ",
|
|
625
|
+
/* @__PURE__ */ jsx("code", { children: "icon" }),
|
|
626
|
+
" prop, as below. An icon you place inside the child instead stays where you put it, beside the words, and is not part of the label."
|
|
627
|
+
] }),
|
|
628
|
+
children: [/* @__PURE__ */ jsxs(Example, {
|
|
629
|
+
code: `
|
|
630
|
+
<Badge asChild tone="warning" icon={<ClockIcon />}>
|
|
631
|
+
<a href="/billing">Trial ends in 3 days</a>
|
|
632
|
+
</Badge>
|
|
633
|
+
<Badge asChild variant="outline" tone="warning">
|
|
634
|
+
<button type="button" onClick={showSample}>Sample data</button>
|
|
635
|
+
</Badge>`,
|
|
636
|
+
children: [/* @__PURE__ */ jsx(Badge, {
|
|
637
|
+
asChild: true,
|
|
638
|
+
tone: "warning",
|
|
639
|
+
icon: /* @__PURE__ */ jsx(ClockIcon, {}),
|
|
640
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
641
|
+
href: "#as-a-link",
|
|
642
|
+
children: "Trial ends in 3 days"
|
|
643
|
+
})
|
|
644
|
+
}), /* @__PURE__ */ jsx(Badge, {
|
|
645
|
+
asChild: true,
|
|
646
|
+
variant: "outline",
|
|
647
|
+
tone: "warning",
|
|
648
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
649
|
+
type: "button",
|
|
650
|
+
children: "Sample data"
|
|
651
|
+
})
|
|
652
|
+
})]
|
|
653
|
+
}), /* @__PURE__ */ jsx(SubSection, {
|
|
654
|
+
title: "A link with a state",
|
|
655
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
656
|
+
"At ",
|
|
657
|
+
/* @__PURE__ */ jsx("code", { children: "lg" }),
|
|
658
|
+
" a link badge stands beside buttons: an icon, the state in words, and a tone that follows the state. While the state is being worked out, ",
|
|
659
|
+
/* @__PURE__ */ jsx("code", { children: "loading" }),
|
|
660
|
+
" swaps the icon for a spinner; the words say what is happening. This is the label-buying balance beside an order's actions."
|
|
661
|
+
] }),
|
|
662
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
663
|
+
align: "start",
|
|
664
|
+
code: `
|
|
665
|
+
<Badge size="lg" loading>Checking the balance</Badge>
|
|
666
|
+
<Badge asChild size="lg" icon={<CreditCardIcon />}>
|
|
667
|
+
<a href="/settings/shipping">£12.40 in credit</a>
|
|
668
|
+
</Badge>
|
|
669
|
+
<Badge asChild size="lg" tone="info" icon={<CreditCardIcon />}>
|
|
670
|
+
<a href="/settings/shipping">Settling £8.20</a>
|
|
671
|
+
</Badge>
|
|
672
|
+
<Badge asChild size="lg" tone="negative" icon={<CreditCardIcon />}>
|
|
673
|
+
<a href="/settings/shipping">Labels paused: confirm payment</a>
|
|
674
|
+
</Badge>`,
|
|
675
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
676
|
+
className: "badge-row",
|
|
677
|
+
children: [
|
|
678
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
679
|
+
size: "lg",
|
|
680
|
+
loading: true,
|
|
681
|
+
children: "Checking the balance"
|
|
682
|
+
}),
|
|
683
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
684
|
+
asChild: true,
|
|
685
|
+
size: "lg",
|
|
686
|
+
icon: /* @__PURE__ */ jsx(CreditCardIcon, {}),
|
|
687
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
688
|
+
href: "#as-a-link",
|
|
689
|
+
children: "£12.40 in credit"
|
|
690
|
+
})
|
|
691
|
+
}),
|
|
692
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
693
|
+
asChild: true,
|
|
694
|
+
size: "lg",
|
|
695
|
+
tone: "info",
|
|
696
|
+
icon: /* @__PURE__ */ jsx(CreditCardIcon, {}),
|
|
697
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
698
|
+
href: "#as-a-link",
|
|
699
|
+
children: "Settling £8.20"
|
|
700
|
+
})
|
|
701
|
+
}),
|
|
702
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
703
|
+
asChild: true,
|
|
704
|
+
size: "lg",
|
|
705
|
+
tone: "negative",
|
|
706
|
+
icon: /* @__PURE__ */ jsx(CreditCardIcon, {}),
|
|
707
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
708
|
+
href: "#as-a-link",
|
|
709
|
+
children: "Labels paused: confirm payment"
|
|
710
|
+
})
|
|
711
|
+
})
|
|
712
|
+
]
|
|
713
|
+
})
|
|
714
|
+
})
|
|
715
|
+
})]
|
|
716
|
+
}),
|
|
717
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
718
|
+
id: "wrapping",
|
|
719
|
+
title: "Wrapping words",
|
|
720
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
721
|
+
"A badge stays on one line and ends long words in an ellipsis. ",
|
|
722
|
+
/* @__PURE__ */ jsx("code", { children: "wrap" }),
|
|
723
|
+
" lets them run onto more lines instead, for a name that must be read whole, such as a release. The pill grows from its one-line height and keeps a pill's corners, and the dot or icon stays level with the first line."
|
|
724
|
+
] }),
|
|
725
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
726
|
+
align: "start",
|
|
727
|
+
code: `
|
|
728
|
+
<Badge tone="accent">Development release 12 of the booking plugin</Badge>
|
|
729
|
+
<Badge tone="accent" wrap>Development release 12 of the booking plugin</Badge>`,
|
|
730
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
731
|
+
className: "badge-rows badge-narrow",
|
|
732
|
+
children: [/* @__PURE__ */ jsx(Badge, {
|
|
733
|
+
tone: "accent",
|
|
734
|
+
children: "Development release 12 of the booking plugin"
|
|
735
|
+
}), /* @__PURE__ */ jsx(Badge, {
|
|
736
|
+
tone: "accent",
|
|
737
|
+
wrap: true,
|
|
738
|
+
dot: true,
|
|
739
|
+
children: "Development release 12 of the booking plugin"
|
|
740
|
+
})]
|
|
741
|
+
})
|
|
742
|
+
})
|
|
743
|
+
}),
|
|
744
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
745
|
+
id: "colour",
|
|
746
|
+
title: "A dot of its own colour",
|
|
747
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
748
|
+
/* @__PURE__ */ jsx("code", { children: "color" }),
|
|
749
|
+
" gives the dot a colour that belongs to what the badge names: a customer group's, a category's, a brand's. It turns the dot on, and a hairline round it keeps a pale colour visible. The pill keeps its tone, so the colour never competes with a status. A missing or unreadable colour leaves the tone's dot. The",
|
|
750
|
+
" ",
|
|
751
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
752
|
+
to: "/components/status-dot#colour",
|
|
753
|
+
children: "status dot"
|
|
754
|
+
}),
|
|
755
|
+
" takes the same ",
|
|
756
|
+
/* @__PURE__ */ jsx("code", { children: "color" }),
|
|
757
|
+
"."
|
|
758
|
+
] }),
|
|
759
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
760
|
+
align: "start",
|
|
761
|
+
code: `
|
|
762
|
+
<Badge variant="outline" color="#7c3aed">Wholesale</Badge>
|
|
763
|
+
<Badge variant="outline" color="#0ea5e9">Key accounts</Badge>
|
|
764
|
+
<Badge variant="outline" color="#fde68a">Pending review</Badge>
|
|
765
|
+
<Badge variant="outline" dot color={group.color}>Unsorted</Badge>`,
|
|
766
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
767
|
+
className: "badge-row",
|
|
768
|
+
children: [
|
|
769
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
770
|
+
variant: "outline",
|
|
771
|
+
color: "#7c3aed",
|
|
772
|
+
children: "Wholesale"
|
|
773
|
+
}),
|
|
774
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
775
|
+
variant: "outline",
|
|
776
|
+
color: "#0ea5e9",
|
|
777
|
+
children: "Key accounts"
|
|
778
|
+
}),
|
|
779
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
780
|
+
variant: "outline",
|
|
781
|
+
color: "#fde68a",
|
|
782
|
+
children: "Pending review"
|
|
783
|
+
}),
|
|
784
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
785
|
+
variant: "outline",
|
|
786
|
+
dot: true,
|
|
787
|
+
color: null,
|
|
788
|
+
children: "Unsorted"
|
|
789
|
+
})
|
|
790
|
+
]
|
|
791
|
+
})
|
|
792
|
+
})
|
|
793
|
+
}),
|
|
794
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
795
|
+
id: "order-statuses",
|
|
796
|
+
title: "Order statuses",
|
|
797
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
798
|
+
"The mapping for orders in Orbit Commerce's store dashboard, as the vendor dashboard draws it. Pick the tone by what the merchant has to do next, not by how the word feels: warning when it needs them or money is still owed or moving back, negative when something failed or was cancelled. This table is drawn from the status registry. To use the same tones in your own pages, use the ",
|
|
799
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
800
|
+
to: "/components/status-badge",
|
|
801
|
+
children: "status badge"
|
|
802
|
+
}),
|
|
803
|
+
", and see there where they differ from what this page used to say."
|
|
804
|
+
] }),
|
|
805
|
+
children: [/* @__PURE__ */ jsx(DocTable, {
|
|
806
|
+
columns: ["Status and tone", "Use it when"],
|
|
807
|
+
rows: [
|
|
808
|
+
[/* @__PURE__ */ jsx(Registered, {
|
|
809
|
+
domain: "payment",
|
|
810
|
+
status: "paid"
|
|
811
|
+
}), "The money is in. Nothing to do."],
|
|
812
|
+
[/* @__PURE__ */ jsx(Registered, {
|
|
813
|
+
domain: "payment",
|
|
814
|
+
status: "awaiting_payment"
|
|
815
|
+
}), "The customer still owes it: a bank transfer, an invoice or a payment link."],
|
|
816
|
+
[/* @__PURE__ */ jsx(Registered, {
|
|
817
|
+
domain: "payment",
|
|
818
|
+
status: "partially_paid"
|
|
819
|
+
}), "A deposit is in and the balance is still owed."],
|
|
820
|
+
[/* @__PURE__ */ jsx(Registered, {
|
|
821
|
+
domain: "payment",
|
|
822
|
+
status: "failed"
|
|
823
|
+
}), "The charge did not go through. Do not ship yet."],
|
|
824
|
+
[/* @__PURE__ */ jsx(Registered, {
|
|
825
|
+
domain: "payment",
|
|
826
|
+
status: "disputed"
|
|
827
|
+
}), "The customer's bank has opened a chargeback, and it needs a reply."],
|
|
828
|
+
[/* @__PURE__ */ jsx(Registered, {
|
|
829
|
+
domain: "payment",
|
|
830
|
+
status: "refunded"
|
|
831
|
+
}), "Money is moving back to the customer. A part refund says so: Partially refunded."],
|
|
832
|
+
[/* @__PURE__ */ jsx(Registered, {
|
|
833
|
+
domain: "fulfilment",
|
|
834
|
+
status: "unfulfilled"
|
|
835
|
+
}), "Paid and waiting to ship, with nothing started."],
|
|
836
|
+
[/* @__PURE__ */ jsx(Registered, {
|
|
837
|
+
domain: "fulfilment",
|
|
838
|
+
status: "partially_fulfilled"
|
|
839
|
+
}), "Some items have shipped and the rest are waiting."],
|
|
840
|
+
[/* @__PURE__ */ jsx(Registered, {
|
|
841
|
+
domain: "fulfilment",
|
|
842
|
+
status: "fulfilled"
|
|
843
|
+
}), "Everything has shipped. Delivered works the same way."],
|
|
844
|
+
[/* @__PURE__ */ jsx(Status, {
|
|
845
|
+
tone: "info",
|
|
846
|
+
icon: /* @__PURE__ */ jsx(StorefrontIcon, {}),
|
|
847
|
+
children: "Click and collect"
|
|
848
|
+
}), "How the order is reaching the customer. Useful to know, nothing to do."],
|
|
849
|
+
[/* @__PURE__ */ jsx(Registered, {
|
|
850
|
+
domain: "order",
|
|
851
|
+
status: "draft"
|
|
852
|
+
}), "A draft order that has not been sent or paid. It is work waiting."],
|
|
853
|
+
[/* @__PURE__ */ jsx(Registered, {
|
|
854
|
+
domain: "order",
|
|
855
|
+
status: "canceled"
|
|
856
|
+
}), "Closed, and it will not be fulfilled or paid."],
|
|
857
|
+
[/* @__PURE__ */ jsx(Registered, {
|
|
858
|
+
domain: "orderReturn",
|
|
859
|
+
status: "returned"
|
|
860
|
+
}), "A special state, neither good nor bad: the accent."]
|
|
861
|
+
]
|
|
862
|
+
}), /* @__PURE__ */ jsxs(Note, {
|
|
863
|
+
title: "Teal is not a good or bad status",
|
|
864
|
+
children: [
|
|
865
|
+
"Orbit teal is the brand's line of light. Use ",
|
|
866
|
+
/* @__PURE__ */ jsx("code", { children: "accent" }),
|
|
867
|
+
" for what Orbit wants you to notice: something new, something live, a count that wants attention. The dashboards also draw a few special states in it, such as a returned order. A paid order is ",
|
|
868
|
+
/* @__PURE__ */ jsx("code", { children: "positive" }),
|
|
869
|
+
", never teal."
|
|
870
|
+
]
|
|
871
|
+
})]
|
|
872
|
+
}),
|
|
873
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
874
|
+
id: "guidelines",
|
|
875
|
+
title: "Guidelines",
|
|
876
|
+
children: [
|
|
877
|
+
/* @__PURE__ */ jsx(DoDont, {
|
|
878
|
+
do: {
|
|
879
|
+
children: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Badge, {
|
|
880
|
+
tone: "positive",
|
|
881
|
+
children: "Paid"
|
|
882
|
+
}), /* @__PURE__ */ jsx(Badge, {
|
|
883
|
+
variant: "solid",
|
|
884
|
+
tone: "accent",
|
|
885
|
+
children: "3"
|
|
886
|
+
})] }),
|
|
887
|
+
caption: "Status tones for status. Teal marks what Orbit wants you to notice, such as a count."
|
|
888
|
+
},
|
|
889
|
+
dont: {
|
|
890
|
+
children: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Badge, {
|
|
891
|
+
tone: "accent",
|
|
892
|
+
children: "Paid"
|
|
893
|
+
}), /* @__PURE__ */ jsx(Badge, {
|
|
894
|
+
tone: "accent",
|
|
895
|
+
children: "Fulfilled"
|
|
896
|
+
})] }),
|
|
897
|
+
caption: "A teal status reads as a brand label, and sits too close to the green of good states."
|
|
898
|
+
}
|
|
899
|
+
}),
|
|
900
|
+
/* @__PURE__ */ jsx(DoDont, {
|
|
901
|
+
do: {
|
|
902
|
+
children: /* @__PURE__ */ jsx(Badge, {
|
|
903
|
+
tone: "warning",
|
|
904
|
+
children: "Awaiting payment"
|
|
905
|
+
}),
|
|
906
|
+
caption: "One or two words that name the state."
|
|
907
|
+
},
|
|
908
|
+
dont: {
|
|
909
|
+
children: /* @__PURE__ */ jsx(Badge, {
|
|
910
|
+
tone: "warning",
|
|
911
|
+
children: "This order is still waiting to be sent out"
|
|
912
|
+
}),
|
|
913
|
+
caption: "A sentence in a pill is cut off in tables and makes a column hard to scan. Put detail in the row."
|
|
914
|
+
}
|
|
915
|
+
}),
|
|
916
|
+
/* @__PURE__ */ jsx(Guidelines, { items: [
|
|
917
|
+
"Sentence case, one or two words: \"Unfulfilled\", \"Awaiting payment\". Never all caps.",
|
|
918
|
+
"Keep the same word for the same state across the dashboard, so a filter, a badge and a message agree.",
|
|
919
|
+
"One status per column. A row can carry a payment badge and a fulfilment badge, each in its own column.",
|
|
920
|
+
"Pulse only for live states (a store taking orders, a sync running). A pulse that never stops means nothing.",
|
|
921
|
+
"A badge is a label, not a control. To filter by status, use a button or a segmented control."
|
|
922
|
+
] })
|
|
923
|
+
]
|
|
924
|
+
}),
|
|
925
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
926
|
+
id: "accessibility",
|
|
927
|
+
title: "Accessibility",
|
|
928
|
+
children: /* @__PURE__ */ jsx(Guidelines, { items: [
|
|
929
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
930
|
+
"Renders a plain ",
|
|
931
|
+
/* @__PURE__ */ jsx("code", { children: "span" }),
|
|
932
|
+
". Screen readers read its words in place, so the label must make sense on its own: the state, not a colour."
|
|
933
|
+
] }),
|
|
934
|
+
"Dots and icons are hidden from assistive tech. Colour is never the only signal, because the label names the state.",
|
|
935
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
936
|
+
"A count reads as just the number. Keep the words that give it meaning beside it (\"Unfulfilled orders 7\"), or add them in a visually hidden span with the ",
|
|
937
|
+
/* @__PURE__ */ jsx("code", { children: "o-sr-only" }),
|
|
938
|
+
" class next to the badge. Text inside the badge would stop it being treated as a count."
|
|
939
|
+
] }),
|
|
940
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
941
|
+
"A badge that needs explaining can sit inside a ",
|
|
942
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
943
|
+
to: "/components/tooltip",
|
|
944
|
+
children: "Tooltip"
|
|
945
|
+
}),
|
|
946
|
+
". Give it",
|
|
947
|
+
" ",
|
|
948
|
+
/* @__PURE__ */ jsxs("code", { children: ["tabIndex=", "{0}"] }),
|
|
949
|
+
" so keyboard users can reach it."
|
|
950
|
+
] }),
|
|
951
|
+
"Under reduced motion the pulse breathes in place and counts change without the bump.",
|
|
952
|
+
"A figure and its words are read as one phrase (\"142 products imported\"). A spinner is decorative: the words say what is happening (\"Checking the balance\").",
|
|
953
|
+
"A dot of its own colour is decoration too. The words name the group, so the colour is never the only signal."
|
|
954
|
+
] })
|
|
955
|
+
}),
|
|
956
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
957
|
+
id: "props",
|
|
958
|
+
title: "Props",
|
|
959
|
+
description: /* @__PURE__ */ jsx("p", { children: "Also accepts every native span attribute." }),
|
|
960
|
+
children: /* @__PURE__ */ jsx(PropsTable, { rows: [
|
|
961
|
+
{
|
|
962
|
+
name: "tone",
|
|
963
|
+
type: "'neutral' | 'accent' | 'positive' | 'negative' | 'warning' | 'info'",
|
|
964
|
+
default: "'neutral'",
|
|
965
|
+
description: "What the badge means. Status tones are for status only."
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
name: "variant",
|
|
969
|
+
type: "'subtle' | 'solid' | 'outline' | 'dashed'",
|
|
970
|
+
default: "'subtle'",
|
|
971
|
+
description: "Material: a tinted pill with toned text, a filled pill, a hairline ring, or a dashed ring for a value not there yet."
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
name: "size",
|
|
975
|
+
type: "'sm' | 'md' | 'lg'",
|
|
976
|
+
default: "'md'",
|
|
977
|
+
description: "18px with 11px text, 22px with 12px text, or 28px with 13px text (the controls' height)."
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
name: "figure",
|
|
981
|
+
type: "ReactNode",
|
|
982
|
+
description: "A number before the words, in ink at 600, read with them as one phrase."
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
name: "loading",
|
|
986
|
+
type: "boolean",
|
|
987
|
+
default: "false",
|
|
988
|
+
description: "A spinner in the icon's place (or the dot's). Decorative."
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
name: "wrap",
|
|
992
|
+
type: "boolean",
|
|
993
|
+
default: "false",
|
|
994
|
+
description: "Long words wrap onto more lines instead of ending in an ellipsis."
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
name: "color",
|
|
998
|
+
type: "string | null",
|
|
999
|
+
description: "A hex colour of the dot's own (a group's). Turns the dot on, held by a hairline; the pill keeps its tone."
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
name: "dot",
|
|
1003
|
+
type: "boolean",
|
|
1004
|
+
default: "false",
|
|
1005
|
+
description: "A tone dot before the label: 6px, or 5px at sm."
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
name: "pulse",
|
|
1009
|
+
type: "boolean",
|
|
1010
|
+
default: "false",
|
|
1011
|
+
description: "The dot sends out a ring on a loop. Live states only. Implies dot."
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
name: "icon",
|
|
1015
|
+
type: "ReactNode",
|
|
1016
|
+
description: "Leading icon, 12px (11px at sm). Decorative."
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
name: "asChild",
|
|
1020
|
+
type: "boolean",
|
|
1021
|
+
default: "false",
|
|
1022
|
+
description: "Render the child element (a link or a button) as the badge. Its words are the label; put an icon in the icon prop."
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
name: "children",
|
|
1026
|
+
type: "ReactNode",
|
|
1027
|
+
description: "The label. A number, or a string of digits such as \"99+\", is treated as a count."
|
|
1028
|
+
}
|
|
1029
|
+
] })
|
|
1030
|
+
})
|
|
1031
|
+
]
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1034
|
+
//#endregion
|
|
1035
|
+
export { Page, Preview };
|