@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.
Files changed (232) hide show
  1. package/LICENSE.md +6 -0
  2. package/README.md +6 -2
  3. package/dist/docs.css +20787 -0
  4. package/dist/index.d.ts +33 -0
  5. package/dist/index.js +308 -0
  6. package/dist/pages/Playground-Mk1yIWXb.js +129 -0
  7. package/dist/pages/_address-data-L9BR499w.js +161 -0
  8. package/dist/pages/_builder-demo-C0eJUmPU.js +282 -0
  9. package/dist/pages/_card-art-0be5ncyV.js +18 -0
  10. package/dist/pages/_conversation-samples-Bq7cn-4d.js +70 -0
  11. package/dist/pages/_figures-data-DaDvB7Nm.js +606 -0
  12. package/dist/pages/_foundations-blXWyYh8.js +30 -0
  13. package/dist/pages/_kpi-examples-DeGCBB9T.js +208 -0
  14. package/dist/pages/_overlays-specimens-bawR331Z.js +320 -0
  15. package/dist/pages/_preview-specimens-DKQC9HAo.js +153 -0
  16. package/dist/pages/accordion-Sg0TUqxB.js +1036 -0
  17. package/dist/pages/address-autocomplete-DP0PUOlK.js +360 -0
  18. package/dist/pages/address-block-BZOOOPA9.js +368 -0
  19. package/dist/pages/address-fields-CwSqro3W.js +277 -0
  20. package/dist/pages/ai-highlight-D3x2vD83.js +642 -0
  21. package/dist/pages/alert-D3i7xZTU.js +914 -0
  22. package/dist/pages/anchored-overlay-BV0OCu2Q.js +788 -0
  23. package/dist/pages/app-shell-D4hdlHps.js +1558 -0
  24. package/dist/pages/area-chart-BEWFwiB2.js +718 -0
  25. package/dist/pages/avatar-BFEqQViw.js +895 -0
  26. package/dist/pages/avatar-upload-BDCzJfyN.js +484 -0
  27. package/dist/pages/badge-0-PyMrih.js +1035 -0
  28. package/dist/pages/bar-chart-DkLogYlt.js +1060 -0
  29. package/dist/pages/bar-fold-B-3XeIDZ.js +360 -0
  30. package/dist/pages/board-card-D2tZY_mU.js +415 -0
  31. package/dist/pages/brand-mark-BqiLvFSR.js +417 -0
  32. package/dist/pages/button-DAyfssDY.js +715 -0
  33. package/dist/pages/calendar-Ds7KsgSI.js +682 -0
  34. package/dist/pages/canvas-stage-1KiPspkX.js +472 -0
  35. package/dist/pages/card-CQEM1_wc.js +1567 -0
  36. package/dist/pages/caret-suggestions-oHI6QvqW.js +526 -0
  37. package/dist/pages/chart-legend-B20AbakD.js +724 -0
  38. package/dist/pages/chat-composer-CwzUJYIa.js +437 -0
  39. package/dist/pages/checkbox-BG9Zkb6j.js +1581 -0
  40. package/dist/pages/checklist-card-DEyykVFS.js +783 -0
  41. package/dist/pages/chip-Ck-o3Ui6.js +839 -0
  42. package/dist/pages/chip-list-k1LxXuCi.js +414 -0
  43. package/dist/pages/clamp-text-n-iE8RDR.js +203 -0
  44. package/dist/pages/coachmark-Be2ghobT.js +366 -0
  45. package/dist/pages/code-block-Dv_Y5GYq.js +622 -0
  46. package/dist/pages/collab-field-CfqqK7d2.js +696 -0
  47. package/dist/pages/color-field-CZpfcA-A.js +1127 -0
  48. package/dist/pages/colour-q2ntvI0w.js +1974 -0
  49. package/dist/pages/column-mapper-TsTG39cl.js +502 -0
  50. package/dist/pages/combobox-DvK2j5tI.js +1334 -0
  51. package/dist/pages/command-palette-CJ7uBA04.js +1386 -0
  52. package/dist/pages/comment-box-CDSGYhr5.js +346 -0
  53. package/dist/pages/composer-D4B0NgpA.js +689 -0
  54. package/dist/pages/condition-builder-BZy2ZGXe.js +715 -0
  55. package/dist/pages/conflict-chooser-C--_9UIS.js +210 -0
  56. package/dist/pages/context-menu-F9DV30ia.js +487 -0
  57. package/dist/pages/copy-button-Cn7WiKRF.js +568 -0
  58. package/dist/pages/copy-field-D3Xt3Jq6.js +511 -0
  59. package/dist/pages/danger-zone-Db_UUeiP.js +564 -0
  60. package/dist/pages/date-input-GOW067EB.js +956 -0
  61. package/dist/pages/date-picker-GdBciR99.js +1569 -0
  62. package/dist/pages/date-time-BLKCXtVZ.js +678 -0
  63. package/dist/pages/delta-CNAGv8JY.js +779 -0
  64. package/dist/pages/description-list-BPeXn1eW.js +1268 -0
  65. package/dist/pages/device-switcher-BCaN99c1.js +554 -0
  66. package/dist/pages/dialog-CRpkRC98.js +3164 -0
  67. package/dist/pages/docs-lM2UBSir.js +520 -0
  68. package/dist/pages/doodle-nzkqi2UI.js +201 -0
  69. package/dist/pages/drag-ghost-B6kpzC3O.js +426 -0
  70. package/dist/pages/drill-menu-cskH5mol.js +490 -0
  71. package/dist/pages/dropzone-DOY_Rhw0.js +1069 -0
  72. package/dist/pages/element-toolbar-DZIhXlCJ.js +498 -0
  73. package/dist/pages/emoji-picker-CqaWaffD.js +235 -0
  74. package/dist/pages/empty-state-4U2txFpI.js +1113 -0
  75. package/dist/pages/facet-filters-McbBeY9e.js +353 -0
  76. package/dist/pages/figure-D-HF5vCj.js +563 -0
  77. package/dist/pages/figure-strip-BB3mNl7D.js +1364 -0
  78. package/dist/pages/figure-tabs-QOeQMY6N.js +578 -0
  79. package/dist/pages/file-chip-DMDjtlqQ.js +738 -0
  80. package/dist/pages/filter-pill-DzqNOsD4.js +1295 -0
  81. package/dist/pages/font-picker-Bqhu0QMh.js +416 -0
  82. package/dist/pages/form-grid-BfWCVlie.js +692 -0
  83. package/dist/pages/gallery-BBk2EOri.js +453 -0
  84. package/dist/pages/gif-picker-CnoDTCaL.js +270 -0
  85. package/dist/pages/gradient-editor-Bqxp7Fxj.js +378 -0
  86. package/dist/pages/grouped-checklist-gNZ0tBKU.js +477 -0
  87. package/dist/pages/heatmap-BohgIcNk.js +507 -0
  88. package/dist/pages/highlight-text-BfxzfmvS.js +287 -0
  89. package/dist/pages/home-dashboard-CxPmvduE.js +962 -0
  90. package/dist/pages/host-B6znjEgQ.js +109 -0
  91. package/dist/pages/hosted-embed-Jef3aIMP.js +163 -0
  92. package/dist/pages/hosted-field-BLh-53AE.js +208 -0
  93. package/dist/pages/hosted-field-DEpI4lVS.js +514 -0
  94. package/dist/pages/icon-button-Bu4Gj5sy.js +1200 -0
  95. package/dist/pages/icon-picker-DEyoMUTh.js +291 -0
  96. package/dist/pages/icon-tile-DcgxyXPF.js +592 -0
  97. package/dist/pages/icons-CJ9Aar3d.js +736 -0
  98. package/dist/pages/image-cropper-NyougqLH.js +466 -0
  99. package/dist/pages/image-field-7knBv4mJ.js +567 -0
  100. package/dist/pages/import-result-CmTtGXW_.js +486 -0
  101. package/dist/pages/inline-confirm-CEcI5Lxo.js +327 -0
  102. package/dist/pages/inline-edit-Ba39SzhM.js +1125 -0
  103. package/dist/pages/input-CzLCzfyx.js +2372 -0
  104. package/dist/pages/installation-C3UcpQJT.js +528 -0
  105. package/dist/pages/job-indicator-DOXWbFdl.js +755 -0
  106. package/dist/pages/kanban-Dy9sPAI0.js +740 -0
  107. package/dist/pages/kbd-UNj4zqxn.js +545 -0
  108. package/dist/pages/layout-primitives-CPRaZeyt.js +483 -0
  109. package/dist/pages/line-chart-CntWxeMF.js +1117 -0
  110. package/dist/pages/link-CXqvAg9z.js +689 -0
  111. package/dist/pages/link-picker-BMFGCC67.js +478 -0
  112. package/dist/pages/link-row-x8yaUuWc.js +595 -0
  113. package/dist/pages/live-globe-95ROMhGQ.js +715 -0
  114. package/dist/pages/loading-overlay-BeGuXM9G.js +456 -0
  115. package/dist/pages/loading-state-BNbCo51C.js +556 -0
  116. package/dist/pages/log-viewer-BQz8I_a2.js +503 -0
  117. package/dist/pages/logo-B38rnzoq.js +571 -0
  118. package/dist/pages/lottie_light-CxEH8eiR.js +9116 -0
  119. package/dist/pages/markdown-Ied72vMT.js +237 -0
  120. package/dist/pages/markdown-field-BfnIEKZH.js +193 -0
  121. package/dist/pages/media-banner-DkStCia0.js +233 -0
  122. package/dist/pages/menu-NrLYKqKp.js +2132 -0
  123. package/dist/pages/message-thread-Bo4zbxqu.js +731 -0
  124. package/dist/pages/meta-line-D5p2TycR.js +371 -0
  125. package/dist/pages/model-viewer-BfokvHoc.js +60288 -0
  126. package/dist/pages/model-viewer-C8PFO8wk.js +577 -0
  127. package/dist/pages/month-calendar-T1vw9Rup.js +457 -0
  128. package/dist/pages/motion-CrXtiBvA.js +865 -0
  129. package/dist/pages/number-input-CuyMZg18.js +968 -0
  130. package/dist/pages/orbit-loader-DeVBtkFE.js +219 -0
  131. package/dist/pages/orbit-spinner-Dxv5qAhr.js +348 -0
  132. package/dist/pages/otp-input-CVRoX1mw.js +591 -0
  133. package/dist/pages/overview-LA9XRhZc.js +130 -0
  134. package/dist/pages/package-dimensions-DFCyZj_T.js +192 -0
  135. package/dist/pages/pagination-C1EgVtW4.js +294 -0
  136. package/dist/pages/palette-tile-X9ZXu2Z0.js +414 -0
  137. package/dist/pages/password-field-DHEQKyUC.js +912 -0
  138. package/dist/pages/person-cell-BmjbADBz.js +564 -0
  139. package/dist/pages/phone-input-B3G7Qpb2.js +747 -0
  140. package/dist/pages/plan-card-DRaA6RuB.js +621 -0
  141. package/dist/pages/plan-card-DtloWvMh.js +258 -0
  142. package/dist/pages/plan-comparison-BVIGTtbd.js +559 -0
  143. package/dist/pages/plan-grid-cfPVTB5V.js +251 -0
  144. package/dist/pages/point-list-BbPmZjsm.js +222 -0
  145. package/dist/pages/popover-C3Oar9D5.js +1198 -0
  146. package/dist/pages/presence-avatars-CRZIk8n9.js +328 -0
  147. package/dist/pages/preview-frame-Bcwk0y_Q.js +1631 -0
  148. package/dist/pages/price-CRBLoa9h.js +604 -0
  149. package/dist/pages/principles-pnDyfHpK.js +483 -0
  150. package/dist/pages/print-page-BkLv6bW8.js +513 -0
  151. package/dist/pages/profile-hero-CC9dUzuN.js +498 -0
  152. package/dist/pages/progress-CP_awmo4.js +904 -0
  153. package/dist/pages/progress-ring-JuOAwk2T.js +576 -0
  154. package/dist/pages/radio-group-C-4tg6FS.js +1639 -0
  155. package/dist/pages/radius-control-B2kRA2Ch.js +441 -0
  156. package/dist/pages/rating-CweKN2SX.js +471 -0
  157. package/dist/pages/record-layout-DUP_X0RL.js +719 -0
  158. package/dist/pages/record-pager-y9D7JFgb.js +278 -0
  159. package/dist/pages/registry-BZg-xAbi.js +594 -0
  160. package/dist/pages/release-Cs6tl16C.js +16 -0
  161. package/dist/pages/repeater-BRZYKRQa.js +1351 -0
  162. package/dist/pages/reply-feedback-BDnHprla.js +192 -0
  163. package/dist/pages/reveal-BygENBbL.js +460 -0
  164. package/dist/pages/rich-text-DOFQZEpT.js +156 -0
  165. package/dist/pages/rich-text-editor-BhIM20JI.js +1265 -0
  166. package/dist/pages/rolldown-runtime-CbKu08Hx.js +25 -0
  167. package/dist/pages/rolling-number-GR3Cyfpz.js +529 -0
  168. package/dist/pages/row-list-Dl6CYhC-.js +1565 -0
  169. package/dist/pages/rule-list-DTCmIMpT.js +648 -0
  170. package/dist/pages/save-status-B5KkyMZP.js +378 -0
  171. package/dist/pages/schedule-YycI95O1.js +243 -0
  172. package/dist/pages/scroll-area-B2sGm23Q.js +423 -0
  173. package/dist/pages/search-field-D1uG7R6A.js +693 -0
  174. package/dist/pages/search-menu-DMuXyUUW.js +580 -0
  175. package/dist/pages/secret-field-Dj9x3LL8.js +337 -0
  176. package/dist/pages/section-rail-BtTCETS5.js +637 -0
  177. package/dist/pages/section-v2Pubup9.js +639 -0
  178. package/dist/pages/segmented-control-D-FB1K1T.js +1190 -0
  179. package/dist/pages/select-DZ43NpOm.js +1434 -0
  180. package/dist/pages/selection-chrome-Czcs6RN6.js +437 -0
  181. package/dist/pages/separator-CFwqRvfO.js +428 -0
  182. package/dist/pages/serp-preview-BGwORjmo.js +346 -0
  183. package/dist/pages/setting-row-Bt-dZV8H.js +913 -0
  184. package/dist/pages/shape-DzniHAVT.js +627 -0
  185. package/dist/pages/share-list-D4wgBxKN.js +926 -0
  186. package/dist/pages/side-panel-CCtkrZjs.js +811 -0
  187. package/dist/pages/site-preview-Dj1hM2Yo.js +353 -0
  188. package/dist/pages/skeleton-C1F5HkAu.js +1325 -0
  189. package/dist/pages/skip-link-BxznhSkz.js +252 -0
  190. package/dist/pages/slider-CAoPURKD.js +774 -0
  191. package/dist/pages/sortable-card-Sr44uCpI.js +424 -0
  192. package/dist/pages/sortable-list-DUAleYE1.js +1298 -0
  193. package/dist/pages/sortable-tree-BLzK-hTE.js +737 -0
  194. package/dist/pages/spacing-box-CtuvzxQu.js +550 -0
  195. package/dist/pages/sparkline-D3aavCly.js +947 -0
  196. package/dist/pages/split-bar-DYgZnFID.js +414 -0
  197. package/dist/pages/split-button-Be08-VI-.js +335 -0
  198. package/dist/pages/split-pane-lSNZgTKt.js +523 -0
  199. package/dist/pages/status-badge-DOdNhmzn.js +1074 -0
  200. package/dist/pages/status-checklist-CWkjCZIC.js +1152 -0
  201. package/dist/pages/status-dot-D99gAGsV.js +567 -0
  202. package/dist/pages/stepper-CxKTbEA-.js +1093 -0
  203. package/dist/pages/success-mark-CqFTOBEu.js +142 -0
  204. package/dist/pages/swatch-H_kNvHuC.js +565 -0
  205. package/dist/pages/switch-C93K6j9h.js +617 -0
  206. package/dist/pages/table-CL0vomno.js +3225 -0
  207. package/dist/pages/tabs-Dh0mUsLw.js +1690 -0
  208. package/dist/pages/tag-input-BjZWKKRJ.js +1307 -0
  209. package/dist/pages/task-card-Dv0sR1-w.js +295 -0
  210. package/dist/pages/textarea-CCM-SnGN.js +949 -0
  211. package/dist/pages/thumbnail-DwFJL_k1.js +1147 -0
  212. package/dist/pages/time-input-CA9-uZAa.js +442 -0
  213. package/dist/pages/time-zone-select-CEtMXVYO.js +296 -0
  214. package/dist/pages/timeline-BsMUTlpR.js +1798 -0
  215. package/dist/pages/toast-zXLRiMRT.js +1391 -0
  216. package/dist/pages/tool-rail-B1AbTMCP.js +355 -0
  217. package/dist/pages/toolbar-B9l_fHKy.js +754 -0
  218. package/dist/pages/tooltip-LHtCUkF-.js +826 -0
  219. package/dist/pages/translation-field-CTRXiF2N.js +251 -0
  220. package/dist/pages/tree-checklist-CJj3OcLg.js +451 -0
  221. package/dist/pages/tree-select-DU1qXHy_.js +492 -0
  222. package/dist/pages/tree-view-g_RjLtAb.js +739 -0
  223. package/dist/pages/typography-BSijtiRl.js +876 -0
  224. package/dist/pages/unit-input-Dml4fjmK.js +659 -0
  225. package/dist/pages/upload-rules-yozEzSah.js +419 -0
  226. package/dist/pages/url-upload-input-SSnMgfpA.js +307 -0
  227. package/dist/pages/value-change-CnubDKyO.js +489 -0
  228. package/dist/pages/weekly-hours-i2EpsmTx.js +287 -0
  229. package/dist/pages/widget-preview-CUJMyZ_k.js +625 -0
  230. package/dist/pages/working-status-CENemSsw.js +389 -0
  231. package/manifest.json +13001 -0
  232. package/package.json +35 -4
@@ -0,0 +1,895 @@
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 { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ import { Avatar, AvatarGroup, initialsOf } from "@orbitcommerce/constellation";
6
+ //#region src/pages/components/avatar.tsx
7
+ var PEOPLE = [
8
+ "Imran Aziz",
9
+ "Amara Okafor",
10
+ "Priya Shah",
11
+ "Grace Liu",
12
+ "Rhys Evans",
13
+ "Callum Reid"
14
+ ];
15
+ var STORES = [
16
+ "Fernhill Interiors",
17
+ "Harbour Desk Co",
18
+ "Northgate Seating",
19
+ "Thistle & Oak",
20
+ "Linden Workspace",
21
+ "Wren Stationery"
22
+ ];
23
+ var svgUrl = (markup) => `data:image/svg+xml,${encodeURIComponent(markup)}`;
24
+ var wrenLogoUrl = svgUrl("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 64 64\"><rect width=\"64\" height=\"64\" fill=\"#3d5a47\"/><text x=\"32\" y=\"43\" text-anchor=\"middle\" font-family=\"Georgia, serif\" font-size=\"30\" fill=\"#f2ede1\">W</text></svg>");
25
+ var lindenMarkUrl = svgUrl("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 64 64\"><circle cx=\"32\" cy=\"32\" r=\"27\" fill=\"none\" stroke=\"#c0643a\" stroke-width=\"6\"/><text x=\"32\" y=\"43\" text-anchor=\"middle\" font-family=\"Georgia, serif\" font-size=\"29\" font-weight=\"700\" fill=\"#c0643a\">L</text></svg>");
26
+ /** An image that cannot be decoded, so the avatar falls back to initials. */
27
+ var urlThatFails = "data:image/png;base64,AAAA";
28
+ var mutedStrip = {
29
+ background: "var(--o-bg-muted)",
30
+ padding: 12,
31
+ borderRadius: 12
32
+ };
33
+ var mutedSurface = {
34
+ ...mutedStrip,
35
+ "--o-avatar-surface": "var(--o-bg-muted)"
36
+ };
37
+ function Preview() {
38
+ return /* @__PURE__ */ jsxs("div", {
39
+ className: "avatar-preview",
40
+ children: [/* @__PURE__ */ jsx(AvatarGroup, {
41
+ size: "lg",
42
+ max: 4,
43
+ children: PEOPLE.slice(0, 5).map((name) => /* @__PURE__ */ jsx(Avatar, { name }, name))
44
+ }), /* @__PURE__ */ jsxs("div", {
45
+ className: "avatar-preview__row",
46
+ children: [
47
+ /* @__PURE__ */ jsx(Avatar, {
48
+ size: "lg",
49
+ shape: "square",
50
+ name: "Harbour Desk Co"
51
+ }),
52
+ /* @__PURE__ */ jsx(Avatar, {
53
+ size: "lg",
54
+ name: "Priya Shah",
55
+ status: "online"
56
+ }),
57
+ /* @__PURE__ */ jsx(Avatar, {
58
+ size: "lg",
59
+ shape: "square",
60
+ name: "Linden Workspace"
61
+ })
62
+ ]
63
+ })]
64
+ });
65
+ }
66
+ function Team({ max, size }) {
67
+ return /* @__PURE__ */ jsx(AvatarGroup, {
68
+ max,
69
+ size,
70
+ "aria-label": "Staff on this order",
71
+ children: PEOPLE.map((name) => /* @__PURE__ */ jsx(Avatar, { name }, name))
72
+ });
73
+ }
74
+ function Page() {
75
+ return /* @__PURE__ */ jsxs(DocPage, {
76
+ title: "Avatar",
77
+ status: "stable",
78
+ importNames: [
79
+ "Avatar",
80
+ "AvatarGroup",
81
+ "initialsOf"
82
+ ],
83
+ lead: "A person or a store, as a small circle or square. It shows an image when there is one and initials on a quiet tint when there is not, so every customer, colleague and shop has a face in lists, menus and headers.",
84
+ children: [
85
+ /* @__PURE__ */ jsxs(Section$1, {
86
+ id: "sizes",
87
+ title: "Sizes",
88
+ description: /* @__PURE__ */ jsxs("p", { children: [
89
+ "Five sizes. ",
90
+ /* @__PURE__ */ jsx("code", { children: "md" }),
91
+ " is the default. Initials are set at 40% of the size, so they stay in proportion at every step."
92
+ ] }),
93
+ children: [/* @__PURE__ */ jsxs(Example, {
94
+ code: `
95
+ <Avatar size="xs" name="Priya Shah" />
96
+ <Avatar size="sm" name="Priya Shah" />
97
+ <Avatar name="Priya Shah" />
98
+ <Avatar size="lg" name="Priya Shah" />
99
+ <Avatar size="xl" name="Priya Shah" />`,
100
+ children: [
101
+ /* @__PURE__ */ jsx(Avatar, {
102
+ size: "xs",
103
+ name: "Priya Shah"
104
+ }),
105
+ /* @__PURE__ */ jsx(Avatar, {
106
+ size: "sm",
107
+ name: "Priya Shah"
108
+ }),
109
+ /* @__PURE__ */ jsx(Avatar, { name: "Priya Shah" }),
110
+ /* @__PURE__ */ jsx(Avatar, {
111
+ size: "lg",
112
+ name: "Priya Shah"
113
+ }),
114
+ /* @__PURE__ */ jsx(Avatar, {
115
+ size: "xl",
116
+ name: "Priya Shah"
117
+ })
118
+ ]
119
+ }), /* @__PURE__ */ jsx(DocTable, {
120
+ columns: [
121
+ "Size",
122
+ "Pixels",
123
+ "Use it for"
124
+ ],
125
+ rows: [
126
+ [
127
+ /* @__PURE__ */ jsx("code", { children: "xs" }),
128
+ "20",
129
+ "Inline with text, and in dense tables."
130
+ ],
131
+ [
132
+ /* @__PURE__ */ jsx("code", { children: "sm" }),
133
+ "24",
134
+ "Rows in lists and tables."
135
+ ],
136
+ [
137
+ /* @__PURE__ */ jsx("code", { children: "md" }),
138
+ "32",
139
+ "The default: menus, cards, activity."
140
+ ],
141
+ [
142
+ /* @__PURE__ */ jsx("code", { children: "lg" }),
143
+ "40",
144
+ "Page headers and summaries."
145
+ ],
146
+ [
147
+ /* @__PURE__ */ jsx("code", { children: "xl" }),
148
+ "56",
149
+ "A customer's or a colleague's own page."
150
+ ]
151
+ ]
152
+ })]
153
+ }),
154
+ /* @__PURE__ */ jsx(Section$1, {
155
+ id: "people-and-stores",
156
+ title: "People and stores",
157
+ description: /* @__PURE__ */ jsx("p", { children: "People are circles, the default. Stores, brands and suppliers are rounded squares, with corners at 28% of the size. The shape also changes the initials: a person takes their first and last name, a store its first two words, which is how shop names are shortened." }),
158
+ children: /* @__PURE__ */ jsx(Example, {
159
+ align: "fill",
160
+ code: `
161
+ <Avatar size="lg" name="Priya Shah" alt="" /> Priya Shah
162
+ <Avatar size="lg" name="Callum James Reid" alt="" /> Callum James Reid
163
+
164
+ <Avatar size="lg" shape="square" name="Harbour Desk Co" alt="" /> Harbour Desk Co
165
+ <Avatar size="lg" shape="square" name="The Copper Kettle Ltd" alt="" /> The Copper Kettle Ltd
166
+ <Avatar size="lg" shape="square" name="Thistle & Oak" alt="" /> Thistle & Oak`,
167
+ children: /* @__PURE__ */ jsx("div", {
168
+ className: "avatar-people",
169
+ children: [
170
+ {
171
+ name: "Priya Shah",
172
+ note: "PS: first and last name"
173
+ },
174
+ {
175
+ name: "Callum James Reid",
176
+ note: "CR: skips the middle name"
177
+ },
178
+ {
179
+ name: "Harbour Desk Co",
180
+ note: "HD: first two words",
181
+ store: true
182
+ },
183
+ {
184
+ name: "The Copper Kettle Ltd",
185
+ note: "CK: skips The and Ltd",
186
+ store: true
187
+ },
188
+ {
189
+ name: "Thistle & Oak",
190
+ note: "TO: skips the ampersand",
191
+ store: true
192
+ }
193
+ ].map((item) => /* @__PURE__ */ jsxs("span", {
194
+ className: "avatar-person",
195
+ children: [/* @__PURE__ */ jsx(Avatar, {
196
+ size: "lg",
197
+ shape: item.store ? "square" : "circle",
198
+ name: item.name,
199
+ alt: ""
200
+ }), /* @__PURE__ */ jsxs("span", { children: [item.name, /* @__PURE__ */ jsx("span", {
201
+ className: "avatar-person__meta",
202
+ children: item.note
203
+ })] })]
204
+ }, item.name))
205
+ })
206
+ })
207
+ }),
208
+ /* @__PURE__ */ jsxs(Section$1, {
209
+ id: "tints",
210
+ title: "Tints",
211
+ description: /* @__PURE__ */ jsx("p", { children: "Without an image, initials sit on one of six quiet tints: Orbit teal turned a little either way around the colour wheel, plus a slate. The tint is picked from the name, so the same person or shop gets the same colour everywhere, on every visit." }),
212
+ children: [/* @__PURE__ */ jsx(Example, {
213
+ code: `
214
+ <Avatar size="lg" name="Imran Aziz" />
215
+ <Avatar size="lg" name="Amara Okafor" />
216
+ <Avatar size="lg" name="Priya Shah" />
217
+ <Avatar size="lg" name="Grace Liu" />
218
+ <Avatar size="lg" name="Rhys Evans" />
219
+ <Avatar size="lg" name="Callum Reid" />
220
+
221
+ <Avatar size="lg" shape="square" name="Fernhill Interiors" />
222
+ {/* …one for each store */}`,
223
+ children: /* @__PURE__ */ jsxs("div", {
224
+ className: "avatar-rows",
225
+ children: [/* @__PURE__ */ jsx("div", {
226
+ className: "avatar-row",
227
+ children: PEOPLE.map((name) => /* @__PURE__ */ jsx(Avatar, {
228
+ size: "lg",
229
+ name
230
+ }, name))
231
+ }), /* @__PURE__ */ jsx("div", {
232
+ className: "avatar-row",
233
+ children: STORES.map((name) => /* @__PURE__ */ jsx(Avatar, {
234
+ size: "lg",
235
+ shape: "square",
236
+ name
237
+ }, name))
238
+ })]
239
+ })
240
+ }), /* @__PURE__ */ jsx(SubSection, {
241
+ title: "Choosing the tint yourself",
242
+ description: /* @__PURE__ */ jsxs("p", { children: [
243
+ "Pass ",
244
+ /* @__PURE__ */ jsx("code", { children: "seed" }),
245
+ ", such as a customer ID, when names can change or collide. Here two different customers share a name, and the seed tells them apart."
246
+ ] }),
247
+ children: /* @__PURE__ */ jsxs(Example, {
248
+ code: `
249
+ <Avatar size="lg" name="Priya Shah" seed="cus_1042" />
250
+ <Avatar size="lg" name="Priya Shah" seed="cus_2231" />`,
251
+ children: [/* @__PURE__ */ jsx(Avatar, {
252
+ size: "lg",
253
+ name: "Priya Shah",
254
+ seed: "cus_1042"
255
+ }), /* @__PURE__ */ jsx(Avatar, {
256
+ size: "lg",
257
+ name: "Priya Shah",
258
+ seed: "cus_2231"
259
+ })]
260
+ })
261
+ })]
262
+ }),
263
+ /* @__PURE__ */ jsx(Section$1, {
264
+ id: "status",
265
+ title: "Status",
266
+ description: /* @__PURE__ */ jsxs("p", { children: [
267
+ "A presence dot on the rim, for colleagues: ",
268
+ /* @__PURE__ */ jsx("code", { children: "online" }),
269
+ ", ",
270
+ /* @__PURE__ */ jsx("code", { children: "away" }),
271
+ " or ",
272
+ /* @__PURE__ */ jsx("code", { children: "busy" }),
273
+ ". Each has its own shape as well as its own colour (a solid dot, a ring, a dot with a bar), so it reads without colour. The dot scales with the avatar."
274
+ ] }),
275
+ children: /* @__PURE__ */ jsx(Example, {
276
+ code: `
277
+ <Avatar size="lg" name="Priya Shah" status="online" />
278
+ <Avatar size="lg" name="Callum Reid" status="away" />
279
+ <Avatar size="lg" name="Grace Liu" status="busy" />
280
+ <Avatar size="lg" shape="square" name="Thistle & Oak" status="online" />
281
+
282
+ <Avatar size="xs" name="Rhys Evans" status="online" />
283
+ <Avatar size="sm" name="Rhys Evans" status="away" />
284
+ <Avatar name="Rhys Evans" status="busy" />
285
+ <Avatar size="xl" name="Rhys Evans" status="online" />`,
286
+ children: /* @__PURE__ */ jsxs("div", {
287
+ className: "avatar-rows",
288
+ children: [/* @__PURE__ */ jsxs("div", {
289
+ className: "avatar-row",
290
+ children: [
291
+ /* @__PURE__ */ jsx(Avatar, {
292
+ size: "lg",
293
+ name: "Priya Shah",
294
+ status: "online"
295
+ }),
296
+ /* @__PURE__ */ jsx(Avatar, {
297
+ size: "lg",
298
+ name: "Callum Reid",
299
+ status: "away"
300
+ }),
301
+ /* @__PURE__ */ jsx(Avatar, {
302
+ size: "lg",
303
+ name: "Grace Liu",
304
+ status: "busy"
305
+ }),
306
+ /* @__PURE__ */ jsx(Avatar, {
307
+ size: "lg",
308
+ shape: "square",
309
+ name: "Thistle & Oak",
310
+ status: "online"
311
+ })
312
+ ]
313
+ }), /* @__PURE__ */ jsxs("div", {
314
+ className: "avatar-row",
315
+ children: [
316
+ /* @__PURE__ */ jsx(Avatar, {
317
+ size: "xs",
318
+ name: "Rhys Evans",
319
+ status: "online"
320
+ }),
321
+ /* @__PURE__ */ jsx(Avatar, {
322
+ size: "sm",
323
+ name: "Rhys Evans",
324
+ status: "away"
325
+ }),
326
+ /* @__PURE__ */ jsx(Avatar, {
327
+ name: "Rhys Evans",
328
+ status: "busy"
329
+ }),
330
+ /* @__PURE__ */ jsx(Avatar, {
331
+ size: "xl",
332
+ name: "Rhys Evans",
333
+ status: "online"
334
+ })
335
+ ]
336
+ })]
337
+ })
338
+ })
339
+ }),
340
+ /* @__PURE__ */ jsxs(Section$1, {
341
+ id: "activity",
342
+ title: "Activity",
343
+ description: /* @__PURE__ */ jsxs("p", { children: [
344
+ "What a colleague is doing on the record you share with them: ",
345
+ /* @__PURE__ */ jsx("code", { children: "activity=\"viewing\"" }),
346
+ " rings the avatar in green, ",
347
+ /* @__PURE__ */ jsx("code", { children: "\"editing\"" }),
348
+ " in amber with a pencil on the rim, so the two differ by a mark as well as a colour. The ring sits past a hairline of the surface and takes no room. The name says it too: \"Sean Hughes (Editing)\". A status dot moves to the upper rim to make room for the pencil."
349
+ ] }),
350
+ children: [/* @__PURE__ */ jsx(Example, {
351
+ code: `
352
+ <Avatar size="lg" name="Priya Shah" activity="viewing" />
353
+ <Avatar size="lg" name="Sean Hughes" activity="editing" />
354
+ <Avatar size="lg" name="Grace Liu" activity="editing" status="online" />
355
+
356
+ <Avatar size="sm" name="Sean Hughes" activity="editing" />
357
+ <Avatar name="Sean Hughes" activity="editing" />
358
+ <Avatar size="xl" name="Sean Hughes" activity="editing" />`,
359
+ children: /* @__PURE__ */ jsxs("div", {
360
+ className: "avatar-rows",
361
+ children: [/* @__PURE__ */ jsxs("div", {
362
+ className: "avatar-row avatar-row--roomy",
363
+ children: [
364
+ /* @__PURE__ */ jsx(Avatar, {
365
+ size: "lg",
366
+ name: "Priya Shah",
367
+ activity: "viewing"
368
+ }),
369
+ /* @__PURE__ */ jsx(Avatar, {
370
+ size: "lg",
371
+ name: "Sean Hughes",
372
+ activity: "editing"
373
+ }),
374
+ /* @__PURE__ */ jsx(Avatar, {
375
+ size: "lg",
376
+ name: "Grace Liu",
377
+ activity: "editing",
378
+ status: "online"
379
+ })
380
+ ]
381
+ }), /* @__PURE__ */ jsxs("div", {
382
+ className: "avatar-row avatar-row--roomy",
383
+ children: [
384
+ /* @__PURE__ */ jsx(Avatar, {
385
+ size: "xs",
386
+ name: "Sean Hughes",
387
+ activity: "editing"
388
+ }),
389
+ /* @__PURE__ */ jsx(Avatar, {
390
+ size: "sm",
391
+ name: "Sean Hughes",
392
+ activity: "editing"
393
+ }),
394
+ /* @__PURE__ */ jsx(Avatar, {
395
+ name: "Sean Hughes",
396
+ activity: "editing"
397
+ }),
398
+ /* @__PURE__ */ jsx(Avatar, {
399
+ size: "xl",
400
+ name: "Sean Hughes",
401
+ activity: "editing"
402
+ })
403
+ ]
404
+ })]
405
+ })
406
+ }), /* @__PURE__ */ jsx(SubSection, {
407
+ title: "A spaced group",
408
+ description: /* @__PURE__ */ jsxs("p", { children: [
409
+ "Overlapping avatars would cover each other's rings, so a group of colleagues on a page takes",
410
+ " ",
411
+ /* @__PURE__ */ jsx("code", { children: "spacing=\"spaced\"" }),
412
+ ": side by side with a small gap. ",
413
+ /* @__PURE__ */ jsx("code", { children: "overflowTooltip" }),
414
+ " gives the +N chip a tooltip (the people it stands for) and keyboard focus. ",
415
+ /* @__PURE__ */ jsx(DocLink, {
416
+ to: "/components/presence-avatars",
417
+ children: "Presence avatars"
418
+ }),
419
+ " builds the whole thing for an editor's top bar."
420
+ ] }),
421
+ children: /* @__PURE__ */ jsx(Example, {
422
+ code: `
423
+ <AvatarGroup spacing="spaced" size="sm" max={3} overflowTooltip="Rhys Evans (viewing), Amara Okafor (viewing)" aria-label="Others on this page">
424
+ <Avatar name="Priya Shah" activity="viewing" />
425
+ <Avatar name="Sean Hughes" activity="editing" />
426
+ <Avatar name="Grace Liu" activity="editing" />
427
+ <Avatar name="Rhys Evans" activity="viewing" />
428
+ <Avatar name="Amara Okafor" activity="viewing" />
429
+ </AvatarGroup>`,
430
+ children: /* @__PURE__ */ jsxs(AvatarGroup, {
431
+ spacing: "spaced",
432
+ size: "sm",
433
+ max: 3,
434
+ overflowTooltip: "Rhys Evans (viewing), Amara Okafor (viewing)",
435
+ "aria-label": "Others on this page",
436
+ children: [
437
+ /* @__PURE__ */ jsx(Avatar, {
438
+ name: "Priya Shah",
439
+ activity: "viewing"
440
+ }),
441
+ /* @__PURE__ */ jsx(Avatar, {
442
+ name: "Sean Hughes",
443
+ activity: "editing"
444
+ }),
445
+ /* @__PURE__ */ jsx(Avatar, {
446
+ name: "Grace Liu",
447
+ activity: "editing"
448
+ }),
449
+ /* @__PURE__ */ jsx(Avatar, {
450
+ name: "Rhys Evans",
451
+ activity: "viewing"
452
+ }),
453
+ /* @__PURE__ */ jsx(Avatar, {
454
+ name: "Amara Okafor",
455
+ activity: "viewing"
456
+ })
457
+ ]
458
+ })
459
+ })
460
+ })]
461
+ }),
462
+ /* @__PURE__ */ jsxs(Section$1, {
463
+ id: "images",
464
+ title: "Images and fallbacks",
465
+ description: /* @__PURE__ */ jsxs("p", { children: [
466
+ "Pass ",
467
+ /* @__PURE__ */ jsx("code", { children: "src" }),
468
+ " and the image fades in once it has loaded (a cached image shows at once). If it is missing or fails, the initials stay. Logos that must not touch the edge take ",
469
+ /* @__PURE__ */ jsx("code", { children: "fit=\"contain\"" }),
470
+ ": the mark is inset on the canvas colour. With no name at all, a quiet silhouette stands in for a person and a shopfront for a store."
471
+ ] }),
472
+ children: [/* @__PURE__ */ jsxs(Example, {
473
+ code: `
474
+ <Avatar size="lg" shape="square" name="Wren Stationery" src={wrenLogoUrl} />
475
+ <Avatar size="lg" shape="square" fit="contain" name="Linden Workspace" src={lindenMarkUrl} />
476
+ <Avatar size="lg" name="Hannah Doyle" src={urlThatFails} />
477
+ <Avatar size="lg" />
478
+ <Avatar size="lg" shape="square" />`,
479
+ children: [
480
+ /* @__PURE__ */ jsx(Avatar, {
481
+ size: "lg",
482
+ shape: "square",
483
+ name: "Wren Stationery",
484
+ src: wrenLogoUrl
485
+ }),
486
+ /* @__PURE__ */ jsx(Avatar, {
487
+ size: "lg",
488
+ shape: "square",
489
+ fit: "contain",
490
+ name: "Linden Workspace",
491
+ src: lindenMarkUrl
492
+ }),
493
+ /* @__PURE__ */ jsx(Avatar, {
494
+ size: "lg",
495
+ name: "Hannah Doyle",
496
+ src: urlThatFails
497
+ }),
498
+ /* @__PURE__ */ jsx(Avatar, { size: "lg" }),
499
+ /* @__PURE__ */ jsx(Avatar, {
500
+ size: "lg",
501
+ shape: "square"
502
+ })
503
+ ]
504
+ }), /* @__PURE__ */ jsx(Note, {
505
+ title: "Logos in dark",
506
+ children: "A contained logo sits on the canvas colour, which is near black in dark. A dark logo on a clear ground disappears there: ask for a mark that reads on both, or pass the right file for each theme."
507
+ })]
508
+ }),
509
+ /* @__PURE__ */ jsxs(Section$1, {
510
+ id: "groups",
511
+ title: "Groups",
512
+ description: /* @__PURE__ */ jsxs("p", { children: [
513
+ /* @__PURE__ */ jsx("code", { children: "AvatarGroup" }),
514
+ " overlaps avatars, each cut out of the one beneath by a ring in the surface colour. It sets the size and shape for all of them. With ",
515
+ /* @__PURE__ */ jsx("code", { children: "max" }),
516
+ ", the rest collapse into a +N chip. Point at one and it comes forward."
517
+ ] }),
518
+ children: [/* @__PURE__ */ jsxs(Example, {
519
+ code: `
520
+ <AvatarGroup max={4} aria-label="Staff on this order">
521
+ <Avatar name="Imran Aziz" />
522
+ <Avatar name="Amara Okafor" />
523
+ <Avatar name="Priya Shah" />
524
+ <Avatar name="Grace Liu" />
525
+ <Avatar name="Rhys Evans" />
526
+ <Avatar name="Callum Reid" />
527
+ </AvatarGroup>
528
+
529
+ <AvatarGroup size="sm" shape="square" max={3} aria-label="Your stores">
530
+ {stores.map((name) => <Avatar key={name} name={name} />)}
531
+ </AvatarGroup>
532
+
533
+ <AvatarGroup size="lg" aria-label="Viewing this order">
534
+ <Avatar name="Priya Shah" />
535
+ <Avatar name="Grace Liu" />
536
+ <Avatar name="Callum Reid" />
537
+ </AvatarGroup>`,
538
+ children: [
539
+ /* @__PURE__ */ jsx(Team, { max: 4 }),
540
+ /* @__PURE__ */ jsx(AvatarGroup, {
541
+ size: "sm",
542
+ shape: "square",
543
+ max: 3,
544
+ "aria-label": "Your stores",
545
+ children: STORES.map((name) => /* @__PURE__ */ jsx(Avatar, { name }, name))
546
+ }),
547
+ /* @__PURE__ */ jsxs(AvatarGroup, {
548
+ size: "lg",
549
+ "aria-label": "Viewing this order",
550
+ children: [
551
+ /* @__PURE__ */ jsx(Avatar, { name: "Priya Shah" }),
552
+ /* @__PURE__ */ jsx(Avatar, { name: "Grace Liu" }),
553
+ /* @__PURE__ */ jsx(Avatar, { name: "Callum Reid" })
554
+ ]
555
+ })
556
+ ]
557
+ }), /* @__PURE__ */ jsx(SubSection, {
558
+ title: "On other surfaces",
559
+ description: /* @__PURE__ */ jsxs("p", { children: [
560
+ "The rings and status dots are cut in the colour of the surface behind them: the canvas by default, and sunken cards set their own. On any other surface, set ",
561
+ /* @__PURE__ */ jsx("code", { children: "--o-avatar-surface" }),
562
+ " on a parent to that surface's colour, or the cut-outs show as halos."
563
+ ] }),
564
+ children: /* @__PURE__ */ jsx(Example, {
565
+ code: `
566
+ <div style={{ background: 'var(--o-bg-muted)', '--o-avatar-surface': 'var(--o-bg-muted)' }}>
567
+ <AvatarGroup max={4} aria-label="Staff on this order">…</AvatarGroup>
568
+ </div>`,
569
+ children: /* @__PURE__ */ jsx("div", {
570
+ style: mutedSurface,
571
+ children: /* @__PURE__ */ jsx(Team, { max: 4 })
572
+ })
573
+ })
574
+ })]
575
+ }),
576
+ /* @__PURE__ */ jsx(Section$1, {
577
+ id: "both-themes",
578
+ title: "In both themes",
579
+ description: /* @__PURE__ */ jsx("p", { children: "All six tints for people and for stores, with status and a group, light and dark side by side." }),
580
+ children: /* @__PURE__ */ jsx(ThemePair, { children: /* @__PURE__ */ jsxs("div", {
581
+ className: "avatar-rows",
582
+ children: [
583
+ /* @__PURE__ */ jsx("div", {
584
+ className: "avatar-row",
585
+ children: PEOPLE.map((name) => /* @__PURE__ */ jsx(Avatar, {
586
+ size: "lg",
587
+ name
588
+ }, name))
589
+ }),
590
+ /* @__PURE__ */ jsx("div", {
591
+ className: "avatar-row",
592
+ children: STORES.map((name) => /* @__PURE__ */ jsx(Avatar, {
593
+ size: "lg",
594
+ shape: "square",
595
+ name
596
+ }, name))
597
+ }),
598
+ /* @__PURE__ */ jsxs("div", {
599
+ className: "avatar-row",
600
+ children: [
601
+ /* @__PURE__ */ jsx(Avatar, {
602
+ size: "lg",
603
+ name: "Priya Shah",
604
+ status: "online"
605
+ }),
606
+ /* @__PURE__ */ jsx(Avatar, {
607
+ size: "lg",
608
+ name: "Callum Reid",
609
+ status: "away"
610
+ }),
611
+ /* @__PURE__ */ jsx(Avatar, {
612
+ size: "lg",
613
+ name: "Grace Liu",
614
+ status: "busy"
615
+ }),
616
+ /* @__PURE__ */ jsx(Team, { max: 3 })
617
+ ]
618
+ }),
619
+ /* @__PURE__ */ jsxs("div", {
620
+ className: "avatar-row avatar-row--roomy",
621
+ children: [
622
+ /* @__PURE__ */ jsx(Avatar, {
623
+ size: "lg",
624
+ name: "Priya Shah",
625
+ activity: "viewing"
626
+ }),
627
+ /* @__PURE__ */ jsx(Avatar, {
628
+ size: "lg",
629
+ name: "Sean Hughes",
630
+ activity: "editing"
631
+ }),
632
+ /* @__PURE__ */ jsxs(AvatarGroup, {
633
+ spacing: "spaced",
634
+ size: "sm",
635
+ "aria-label": "Others on this page",
636
+ children: [/* @__PURE__ */ jsx(Avatar, {
637
+ name: "Grace Liu",
638
+ activity: "editing"
639
+ }), /* @__PURE__ */ jsx(Avatar, {
640
+ name: "Rhys Evans",
641
+ activity: "viewing"
642
+ })]
643
+ })
644
+ ]
645
+ })
646
+ ]
647
+ }) })
648
+ }),
649
+ /* @__PURE__ */ jsx(Section$1, {
650
+ id: "initials",
651
+ title: "Initials",
652
+ description: /* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("code", { children: "initialsOf(name, kind)" }), " is the function the avatar uses, exported for anywhere else you need the same letters. It drops company suffixes (Ltd, Limited, LLP, PLC, Inc), a leading \"The\" and stray punctuation, and keeps accented letters."] }),
653
+ children: /* @__PURE__ */ jsx(DocTable, {
654
+ columns: [
655
+ "Name",
656
+ "As a person",
657
+ "As a store"
658
+ ],
659
+ rows: [
660
+ "Priya Shah",
661
+ "Callum James Reid",
662
+ "Harbour Desk Co",
663
+ "The Copper Kettle Ltd",
664
+ "Thistle & Oak",
665
+ "Élodie Durand",
666
+ "Fernhill"
667
+ ].map((name) => [
668
+ name,
669
+ /* @__PURE__ */ jsx("code", { children: `'${initialsOf(name)}'` }),
670
+ /* @__PURE__ */ jsx("code", { children: `'${initialsOf(name, "store")}'` })
671
+ ])
672
+ })
673
+ }),
674
+ /* @__PURE__ */ jsxs(Section$1, {
675
+ id: "guidelines",
676
+ title: "Guidelines",
677
+ children: [
678
+ /* @__PURE__ */ jsx(DoDont, {
679
+ do: {
680
+ children: /* @__PURE__ */ jsx(Avatar, {
681
+ size: "lg",
682
+ shape: "square",
683
+ name: "Harbour Desk Co"
684
+ }),
685
+ caption: "A store is a rounded square, and its initials come from its first two words: HD."
686
+ },
687
+ dont: {
688
+ children: /* @__PURE__ */ jsx(Avatar, {
689
+ size: "lg",
690
+ name: "Harbour Desk Co"
691
+ }),
692
+ caption: "As a circle it reads as a person, and takes the first and last words: HC."
693
+ }
694
+ }),
695
+ /* @__PURE__ */ jsx(DoDont, {
696
+ do: {
697
+ children: /* @__PURE__ */ jsx("div", {
698
+ style: mutedSurface,
699
+ children: /* @__PURE__ */ jsx(Team, { max: 4 })
700
+ }),
701
+ caption: "On a surface of your own, set --o-avatar-surface so the cut-outs match it."
702
+ },
703
+ dont: {
704
+ children: /* @__PURE__ */ jsx("div", {
705
+ style: mutedStrip,
706
+ children: /* @__PURE__ */ jsx(Team, { max: 4 })
707
+ }),
708
+ caption: "Left on the canvas colour, the rings show as white halos on the grey."
709
+ }
710
+ }),
711
+ /* @__PURE__ */ jsx(Guidelines, { items: [
712
+ "Always pass name, even with an image: it names the avatar, and it is the fallback when the image fails.",
713
+ "Use status for colleagues only. A customer does not have a presence.",
714
+ "Keep a group to what fits: max={3} or max={4}, and let the +N chip say the rest.",
715
+ "Put the name beside the avatar in lists. An avatar alone is a face, not an answer."
716
+ ] })
717
+ ]
718
+ }),
719
+ /* @__PURE__ */ jsx(Section$1, {
720
+ id: "accessibility",
721
+ title: "Accessibility",
722
+ children: /* @__PURE__ */ jsx(Guidelines, { items: [
723
+ /* @__PURE__ */ jsxs(Fragment, { children: [
724
+ "The avatar is an image named by ",
725
+ /* @__PURE__ */ jsx("code", { children: "name" }),
726
+ " (or ",
727
+ /* @__PURE__ */ jsx("code", { children: "alt" }),
728
+ "), with its status: \"Priya Shah (Online)\". The picture inside has an empty alt, so the name is read once."
729
+ ] }),
730
+ /* @__PURE__ */ jsxs(Fragment, { children: [
731
+ "When the name is written beside it, pass ",
732
+ /* @__PURE__ */ jsx("code", { children: "alt=\"\"" }),
733
+ ". The initials still come from",
734
+ " ",
735
+ /* @__PURE__ */ jsx("code", { children: "name" }),
736
+ ", and the avatar is hidden from screen readers so the name is not read twice."
737
+ ] }),
738
+ /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("code", { children: "statusLabel" }), " replaces the words read for the status, for translations."] }),
739
+ /* @__PURE__ */ jsxs(Fragment, { children: [
740
+ "A group has the ",
741
+ /* @__PURE__ */ jsx("code", { children: "group" }),
742
+ " role: name it with ",
743
+ /* @__PURE__ */ jsx("code", { children: "aria-label" }),
744
+ " (\"Staff on this order\"). The +N chip reads as \"2 more\"; ",
745
+ /* @__PURE__ */ jsx("code", { children: "overflowLabel" }),
746
+ " translates it."
747
+ ] }),
748
+ /* @__PURE__ */ jsxs(Fragment, { children: [
749
+ "An activity is read in the name, after any status: \"Sean Hughes (Online, Editing)\". ",
750
+ /* @__PURE__ */ jsx("code", { children: "activityLabel" }),
751
+ " ",
752
+ "translates it. In forced colours the ring is an outline, dashed for an editor."
753
+ ] }),
754
+ /* @__PURE__ */ jsxs(Fragment, { children: [
755
+ "With ",
756
+ /* @__PURE__ */ jsx("code", { children: "overflowTooltip" }),
757
+ " the +N chip takes keyboard focus, so its tooltip opens from the keyboard as well as the pointer."
758
+ ] }),
759
+ "The lift on hover in a group is dropped under reduced motion."
760
+ ] })
761
+ }),
762
+ /* @__PURE__ */ jsxs(Section$1, {
763
+ id: "props",
764
+ title: "Props",
765
+ children: [
766
+ /* @__PURE__ */ jsx(PropsTable, {
767
+ title: "Avatar",
768
+ rows: [
769
+ {
770
+ name: "name",
771
+ type: "string",
772
+ description: "Person or store name: the accessible name, the initials and the tint come from it."
773
+ },
774
+ {
775
+ name: "src",
776
+ type: "string | null",
777
+ description: "Image URL. Falls back to initials if it is missing or fails to load."
778
+ },
779
+ {
780
+ name: "alt",
781
+ type: "string",
782
+ description: "Accessible name when it should differ from name. An empty string hides the avatar from screen readers."
783
+ },
784
+ {
785
+ name: "size",
786
+ type: "'xs' | 'sm' | 'md' | 'lg' | 'xl'",
787
+ default: "'md'",
788
+ description: "20, 24, 32, 40 or 56px. Inherited from an AvatarGroup."
789
+ },
790
+ {
791
+ name: "shape",
792
+ type: "'circle' | 'square'",
793
+ default: "'circle'",
794
+ description: "Circle for people, square for stores and brands. Inherited from an AvatarGroup."
795
+ },
796
+ {
797
+ name: "fit",
798
+ type: "'cover' | 'contain'",
799
+ default: "'cover'",
800
+ description: "contain insets the image on the canvas colour, for logos."
801
+ },
802
+ {
803
+ name: "status",
804
+ type: "'online' | 'away' | 'busy'",
805
+ description: "Presence dot on the rim, included in the accessible name."
806
+ },
807
+ {
808
+ name: "statusLabel",
809
+ type: "string",
810
+ description: "Words read for the status. Defaults to \"Online\", \"Away\" or \"Busy\"."
811
+ },
812
+ {
813
+ name: "seed",
814
+ type: "string",
815
+ description: "Picks the tint instead of name, e.g. a stable customer ID."
816
+ },
817
+ {
818
+ name: "activity",
819
+ type: "'viewing' | 'editing'",
820
+ description: "What a colleague is doing on the page: a green ring, or an amber ring and a pencil. Read in the name."
821
+ },
822
+ {
823
+ name: "activityLabel",
824
+ type: "string",
825
+ description: "Words read for the activity. Defaults to \"Viewing\" or \"Editing\"."
826
+ }
827
+ ]
828
+ }),
829
+ /* @__PURE__ */ jsx("p", {
830
+ className: "doc-section__description",
831
+ children: "Avatar also accepts every native span attribute except children."
832
+ }),
833
+ /* @__PURE__ */ jsx(PropsTable, {
834
+ title: "AvatarGroup",
835
+ rows: [
836
+ {
837
+ name: "max",
838
+ type: "number",
839
+ description: "Most avatars to show. The rest collapse into a +N chip."
840
+ },
841
+ {
842
+ name: "size",
843
+ type: "'xs' | 'sm' | 'md' | 'lg' | 'xl'",
844
+ default: "'md'",
845
+ description: "Size for every avatar in the group."
846
+ },
847
+ {
848
+ name: "shape",
849
+ type: "'circle' | 'square'",
850
+ description: "Shape for every avatar in the group, unless one sets its own."
851
+ },
852
+ {
853
+ name: "overflowLabel",
854
+ type: "(hidden: number) => string",
855
+ default: "(n) => `${n} more`",
856
+ description: "Accessible text for the +N chip."
857
+ },
858
+ {
859
+ name: "spacing",
860
+ type: "'overlap' | 'spaced'",
861
+ default: "'overlap'",
862
+ description: "Overlapping cut-outs, or side by side for avatars with activity rings."
863
+ },
864
+ {
865
+ name: "overflowTooltip",
866
+ type: "ReactNode",
867
+ description: "The +N chip's tooltip, such as the people it stands for. The chip then takes keyboard focus."
868
+ }
869
+ ]
870
+ }),
871
+ /* @__PURE__ */ jsx("p", {
872
+ className: "doc-section__description",
873
+ children: "AvatarGroup also accepts every native div attribute."
874
+ }),
875
+ /* @__PURE__ */ jsx(PropsTable, {
876
+ title: "initialsOf(name, kind)",
877
+ rows: [{
878
+ name: "name",
879
+ type: "string",
880
+ required: true,
881
+ description: "The name to shorten. Returns an empty string when there is nothing to use."
882
+ }, {
883
+ name: "kind",
884
+ type: "'person' | 'store'",
885
+ default: "'person'",
886
+ description: "First and last word for a person; first two words for a store."
887
+ }]
888
+ })
889
+ ]
890
+ })
891
+ ]
892
+ });
893
+ }
894
+ //#endregion
895
+ export { Page, Preview };