@kubex/zinc 1.1.185 → 2.0.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 (358) hide show
  1. package/.browserslistrc +2 -0
  2. package/.github/workflows/js_build_and_deploy.yaml +54 -1
  3. package/.github/workflows/test.yaml +27 -0
  4. package/dist/chunks/zn.UWJLIXDT.js +1 -0
  5. package/dist/custom-elements.json +9998 -2345
  6. package/dist/vscode.html-custom-data.json +1022 -67
  7. package/dist/web-types.json +2129 -177
  8. package/dist/zn.d.ts +2293 -416
  9. package/dist/zn.min.css +1 -1
  10. package/dist/zn.min.js +2310 -1637
  11. package/docs/_includes/default.njk +4 -1
  12. package/docs/assets/scripts/docs.js +22 -6
  13. package/docs/assets/styles/docs.css +9 -2
  14. package/docs/data/report-table-day-compare.json +380 -0
  15. package/docs/data/report-table.json +314 -0
  16. package/docs/pages/components/avatar-group.md +57 -0
  17. package/docs/pages/components/badge.md +67 -0
  18. package/docs/pages/components/button.md +41 -1
  19. package/docs/pages/components/chat-message.md +16 -0
  20. package/docs/pages/components/checkbox.md +1 -1
  21. package/docs/pages/components/chip.md +25 -13
  22. package/docs/pages/components/color-picker.md +37 -0
  23. package/docs/pages/components/copy-button.md +2 -2
  24. package/docs/pages/components/data-table-filter.md +33 -50
  25. package/docs/pages/components/data-table-search.md +4 -4
  26. package/docs/pages/components/data-table.md +27 -3
  27. package/docs/pages/components/date-range.md +116 -0
  28. package/docs/pages/components/dialog.md +29 -37
  29. package/docs/pages/components/diff-row.md +28 -0
  30. package/docs/pages/components/diff.md +46 -0
  31. package/docs/pages/components/editor.md +55 -0
  32. package/docs/pages/components/icon.md +46 -1
  33. package/docs/pages/components/input.md +30 -11
  34. package/docs/pages/components/item.md +35 -0
  35. package/docs/pages/components/key-value.md +25 -0
  36. package/docs/pages/components/menu.md +74 -7
  37. package/docs/pages/components/nav-item.md +15 -0
  38. package/docs/pages/components/nav-list.md +132 -0
  39. package/docs/pages/components/navbar.md +100 -1
  40. package/docs/pages/components/page.md +242 -74
  41. package/docs/pages/components/priority-list.md +43 -5
  42. package/docs/pages/components/query-builder.md +23 -0
  43. package/docs/pages/components/radio-group.md +33 -1
  44. package/docs/pages/components/radio.md +1 -1
  45. package/docs/pages/components/report-table.md +202 -0
  46. package/docs/pages/components/stat.md +30 -0
  47. package/docs/pages/components/tile.md +11 -0
  48. package/docs/pages/components/tooltip.md +1 -1
  49. package/docs/pages/components/translation-grid.md +86 -0
  50. package/docs/pages/components/vertical-stepper.md +108 -64
  51. package/package.json +2 -1
  52. package/scss/_global-spacing.scss +2 -2
  53. package/scss/_root.scss +11 -171
  54. package/scss/boot.scss +14 -0
  55. package/scss/mixins/_helper-mixins.scss +24 -2
  56. package/scss/mixins/_motion-mixins.scss +126 -0
  57. package/scss/mixins/_spacing-mixins.scss +4 -3
  58. package/scss/mixins/_tab-indicator-mixins.scss +12 -0
  59. package/scss/mixins/_typography-mixins.scss +1 -1
  60. package/scss/mixins/index.scss +14 -0
  61. package/scss/shared/_base.scss +32 -1
  62. package/scss/shared/_button-mixin.scss +7 -5
  63. package/scss/shared/_table.scss +35 -4
  64. package/scss/shared/nav.scss +4 -0
  65. package/scss/shared/shimmer.scss +1 -1
  66. package/scss/table-controls.scss +206 -0
  67. package/scss/themes/_dark.scss +1 -3
  68. package/scss/themes/_index.scss +1 -1
  69. package/scss/themes/_light.scss +46 -6
  70. package/scss/themes/_modes.scss +11 -11
  71. package/scss/themes/_openbyte.scss +944 -0
  72. package/scss/themes/_typography.scss +4 -2
  73. package/scss/variables/index.scss +0 -9
  74. package/src/components/alert/alert.component.ts +14 -4
  75. package/src/components/alert/alert.scss +55 -69
  76. package/src/components/alert/alert.test.ts +8 -0
  77. package/src/components/animated-button/animated-button.component.ts +3 -2
  78. package/src/components/animated-button/animated-button.scss +6 -23
  79. package/src/components/animated-button/animated-button.test.ts +4 -3
  80. package/src/components/avatar-group/avatar-group.component.ts +84 -0
  81. package/src/components/avatar-group/avatar-group.scss +54 -0
  82. package/src/components/avatar-group/avatar-group.test.ts +59 -0
  83. package/src/components/avatar-group/index.ts +12 -0
  84. package/src/components/badge/badge.component.ts +49 -0
  85. package/src/components/badge/badge.scss +80 -0
  86. package/src/components/badge/badge.test.ts +34 -0
  87. package/src/components/badge/index.ts +12 -0
  88. package/src/components/bulk-actions/bulk-actions.component.ts +14 -2
  89. package/src/components/button/button.component.ts +228 -8
  90. package/src/components/button/button.scss +115 -32
  91. package/src/components/button/button.test.ts +122 -0
  92. package/src/components/button-menu/button-menu.component.ts +32 -11
  93. package/src/components/button-menu/button-menu.scss +5 -1
  94. package/src/components/channel-tile/channel-tile.component.ts +34 -27
  95. package/src/components/channel-tile/channel-tile.scss +76 -43
  96. package/src/components/chart/builders.test.ts +46 -0
  97. package/src/components/chart/builders.ts +27 -3
  98. package/src/components/chart/chart-live.test.ts +4 -6
  99. package/src/components/chart/chart.component.ts +125 -5
  100. package/src/components/chart/chart.scss +121 -0
  101. package/src/components/chart/chart.test.ts +81 -0
  102. package/src/components/chat-message/chat-message.component.ts +21 -1
  103. package/src/components/chat-message/chat-message.scss +13 -2
  104. package/src/components/chat-message/chat-message.test.ts +9 -0
  105. package/src/components/checkbox/checkbox.component.ts +61 -27
  106. package/src/components/checkbox/checkbox.scss +58 -25
  107. package/src/components/checkbox-group/checkbox-group.component.ts +7 -1
  108. package/src/components/chip/chip.component.ts +11 -1
  109. package/src/components/chip/chip.scss +91 -26
  110. package/src/components/chip/chip.test.ts +17 -0
  111. package/src/components/collapsible/collapsible.component.ts +17 -3
  112. package/src/components/collapsible/collapsible.scss +19 -10
  113. package/src/components/color-picker/color-picker.component.ts +277 -0
  114. package/src/components/color-picker/color-picker.scss +141 -0
  115. package/src/components/color-picker/color-picker.test.ts +57 -0
  116. package/src/components/color-picker/index.ts +12 -0
  117. package/src/components/cols/cols.component.ts +10 -0
  118. package/src/components/cols/cols.test.ts +17 -0
  119. package/src/components/confirm/confirm.component.ts +20 -6
  120. package/src/components/confirm/confirm.test.ts +52 -0
  121. package/src/components/content-block/content-block.component.ts +38 -9
  122. package/src/components/content-block/content-block.scss +11 -5
  123. package/src/components/content-block/content-block.test.ts +26 -0
  124. package/src/components/copy-button/copy-button.component.ts +2 -2
  125. package/src/components/copy-button/copy-button.scss +17 -4
  126. package/src/components/data-select/data-select.component.ts +3 -1
  127. package/src/components/data-table/data-table.component.ts +362 -140
  128. package/src/components/data-table/data-table.scss +133 -60
  129. package/src/components/data-table/data-table.test.ts +356 -4
  130. package/src/components/data-table-filter/data-table-filter.component.ts +426 -406
  131. package/src/components/data-table-filter/data-table-filter.scss +176 -148
  132. package/src/components/data-table-filter/data-table-filter.test.ts +271 -273
  133. package/src/components/data-table-search/data-table-search.component.ts +4 -2
  134. package/src/components/data-table-search/data-table-search.scss +8 -1
  135. package/src/components/data-table-search/data-table-search.test.ts +29 -0
  136. package/src/components/date-range/date-range-math.test.ts +78 -0
  137. package/src/components/date-range/date-range-math.ts +105 -0
  138. package/src/components/date-range/date-range.component.ts +375 -0
  139. package/src/components/date-range/date-range.scss +272 -0
  140. package/src/components/date-range/date-range.test.ts +247 -0
  141. package/src/components/date-range/index.ts +12 -0
  142. package/src/components/datepicker/datepicker.component.ts +44 -7
  143. package/src/components/datepicker/datepicker.scss +9 -0
  144. package/src/components/datepicker/datepicker.test.ts +2 -2
  145. package/src/components/dialog/dialog.component.ts +38 -19
  146. package/src/components/dialog/dialog.scss +65 -36
  147. package/src/components/dialog/dialog.test.ts +14 -0
  148. package/src/components/diff/diff.component.ts +55 -0
  149. package/src/components/diff/diff.scss +46 -0
  150. package/src/components/diff/diff.test.ts +15 -0
  151. package/src/components/diff/index.ts +12 -0
  152. package/src/components/diff-row/diff-row.component.ts +75 -0
  153. package/src/components/diff-row/diff-row.scss +70 -0
  154. package/src/components/diff-row/diff-row.test.ts +37 -0
  155. package/src/components/diff-row/index.ts +12 -0
  156. package/src/components/dropdown/dropdown.component.ts +12 -10
  157. package/src/components/dropdown/dropdown.scss +2 -0
  158. package/src/components/editor/editor.component.ts +159 -11
  159. package/src/components/editor/editor.scss +250 -1
  160. package/src/components/editor/editor.test.ts +31 -3
  161. package/src/components/editor/modules/ai/panel/ai-panel.scss +0 -1
  162. package/src/components/editor/modules/attachment/attachment.ts +53 -31
  163. package/src/components/editor/modules/context-menu/context-menu.ts +17 -0
  164. package/src/components/editor/modules/dialog/dialog.component.ts +23 -1
  165. package/src/components/editor/modules/dialog/dialog.test.ts +28 -0
  166. package/src/components/editor/modules/emoji/emoji.ts +4 -5
  167. package/src/components/editor/modules/merge-field/merge-field.ts +83 -0
  168. package/src/components/editor/modules/toolbar/toolbar.component.ts +121 -68
  169. package/src/components/editor/modules/toolbar/toolbar.scss +38 -0
  170. package/src/components/editor/modules/toolbar/toolbar.ts +25 -1
  171. package/src/components/empty-state/empty-state.component.ts +6 -1
  172. package/src/components/empty-state/empty-state.scss +21 -4
  173. package/src/components/expanding-action/expanding-action.component.ts +22 -34
  174. package/src/components/expanding-action/expanding-action.scss +3 -45
  175. package/src/components/expanding-action/expanding-action.test.ts +2 -1
  176. package/src/components/file/file.component.ts +30 -2
  177. package/src/components/file/file.scss +6 -0
  178. package/src/components/flow-builder/flow-builder.component.ts +36 -3
  179. package/src/components/flow-builder/flow-builder.scss +0 -6
  180. package/src/components/flow-builder/modules/flow-canvas/flow-canvas.component.ts +8 -0
  181. package/src/components/flow-builder/modules/flow-canvas/flow-canvas.scss +10 -5
  182. package/src/components/flow-builder/modules/flow-node/flow-node.component.ts +17 -0
  183. package/src/components/flow-builder/modules/flow-node/flow-node.scss +10 -0
  184. package/src/components/form-actions/form-actions.component.ts +48 -2
  185. package/src/components/form-actions/form-actions.scss +1 -1
  186. package/src/components/form-group/form-group.component.ts +10 -3
  187. package/src/components/form-group/form-group.scss +37 -4
  188. package/src/components/form-group/form-group.test.ts +10 -0
  189. package/src/components/header/header.component.ts +11 -4
  190. package/src/components/header/header.scss +47 -5
  191. package/src/components/hover-container/hover-container.component.ts +4 -5
  192. package/src/components/icon/icon.component.ts +95 -9
  193. package/src/components/icon/icon.scss +70 -6
  194. package/src/components/icon/icon.test.ts +55 -0
  195. package/src/components/icon-picker/icon-picker.component.ts +35 -1
  196. package/src/components/inline-edit/inline-edit.component.ts +38 -8
  197. package/src/components/inline-edit/inline-edit.scss +128 -19
  198. package/src/components/input/input.component.ts +173 -297
  199. package/src/components/input/input.scss +65 -43
  200. package/src/components/input/input.test.ts +86 -4
  201. package/src/components/item/item.component.ts +12 -0
  202. package/src/components/item/item.scss +102 -3
  203. package/src/components/item/item.test.ts +23 -0
  204. package/src/components/key/key.component.ts +2 -2
  205. package/src/components/key/key.scss +11 -0
  206. package/src/components/key-value/index.ts +12 -0
  207. package/src/components/key-value/key-value.component.ts +160 -0
  208. package/src/components/key-value/key-value.scss +20 -0
  209. package/src/components/key-value/key-value.test.ts +22 -0
  210. package/src/components/markdown-editor/markdown-editor.component.ts +8 -1
  211. package/src/components/menu/menu.component.ts +21 -2
  212. package/src/components/menu/menu.scss +43 -23
  213. package/src/components/menu/menu.test.ts +33 -0
  214. package/src/components/menu-item/menu-item.component.ts +13 -2
  215. package/src/components/menu-item/menu-item.scss +56 -23
  216. package/src/components/menu-item/menu-item.test.ts +31 -0
  217. package/src/components/menu-item/submenu-controller.ts +25 -15
  218. package/src/components/menu-label/index.ts +12 -0
  219. package/src/components/menu-label/menu-label.component.ts +30 -0
  220. package/src/components/menu-label/menu-label.scss +18 -0
  221. package/src/components/nav-item/index.ts +12 -0
  222. package/src/components/nav-item/nav-item.component.ts +83 -0
  223. package/src/components/nav-item/nav-item.scss +128 -0
  224. package/src/components/nav-list/index.ts +12 -0
  225. package/src/components/nav-list/nav-list.component.ts +313 -0
  226. package/src/components/nav-list/nav-list.scss +87 -0
  227. package/src/components/nav-list/nav-list.test.ts +250 -0
  228. package/src/components/navbar/navbar.component.ts +235 -171
  229. package/src/components/navbar/navbar.scss +333 -169
  230. package/src/components/navbar/navbar.test.ts +63 -143
  231. package/src/components/page/page.component.ts +114 -29
  232. package/src/components/page/page.scss +223 -95
  233. package/src/components/page/page.test.ts +214 -3
  234. package/src/components/page-builder/page-builder.component.ts +51 -5
  235. package/src/components/page-builder/page-builder.scss +6 -1
  236. package/src/components/page-nav/page-nav.component.ts +25 -3
  237. package/src/components/page-nav/page-nav.scss +10 -2
  238. package/src/components/pagination/pagination.scss +1 -1
  239. package/src/components/panel/panel.component.ts +14 -13
  240. package/src/components/panel/panel.scss +14 -10
  241. package/src/components/panel/panel.test.ts +42 -0
  242. package/src/components/popup/popup.component.ts +20 -13
  243. package/src/components/popup/popup.test.ts +21 -1
  244. package/src/components/priority-list/priority-list.component.ts +157 -172
  245. package/src/components/priority-list/priority-list.scss +113 -17
  246. package/src/components/priority-list/priority-list.test.ts +301 -3
  247. package/src/components/progress-bar/progress-bar.component.ts +1 -1
  248. package/src/components/progress-bar/progress-bar.scss +16 -4
  249. package/src/components/progress-tile/progress-tile.scss +1 -1
  250. package/src/components/query-builder/query-builder.component.ts +85 -10
  251. package/src/components/query-builder/query-builder.scss +7 -1
  252. package/src/components/query-builder/query-builder.test.ts +40 -0
  253. package/src/components/radio/radio.component.ts +57 -18
  254. package/src/components/radio/radio.scss +101 -26
  255. package/src/components/radio-group/radio-group.component.ts +45 -7
  256. package/src/components/radio-group/radio-group.scss +17 -0
  257. package/src/components/radio-group/radio-group.test.ts +63 -2
  258. package/src/components/rating/rating.component.ts +23 -0
  259. package/src/components/rating/rating.scss +1 -1
  260. package/src/components/remarkd-editor/remarkd-editor.component.ts +60 -5
  261. package/src/components/remarkd-editor/remarkd-editor.scss +12 -4
  262. package/src/components/report-table/index.ts +12 -0
  263. package/src/components/report-table/report-format.test.ts +86 -0
  264. package/src/components/report-table/report-format.ts +72 -0
  265. package/src/components/report-table/report-math.test.ts +74 -0
  266. package/src/components/report-table/report-math.ts +252 -0
  267. package/src/components/report-table/report-table.component.ts +681 -0
  268. package/src/components/report-table/report-table.scss +328 -0
  269. package/src/components/report-table/report-table.test.ts +702 -0
  270. package/src/components/reveal/reveal.component.ts +15 -1
  271. package/src/components/reveal/reveal.scss +5 -0
  272. package/src/components/schedule-builder/schedule-builder.component.ts +23 -8
  273. package/src/components/scroll-container/scroll-container.component.ts +19 -1
  274. package/src/components/scroll-container/scroll-container.scss +6 -1
  275. package/src/components/select/select.component.ts +52 -36
  276. package/src/components/select/select.scss +42 -25
  277. package/src/components/select/select.test.ts +14 -2
  278. package/src/components/settings-container/settings-container.scss +18 -5
  279. package/src/components/sidebar/sidebar.component.ts +8 -1
  280. package/src/components/sidebar/sidebar.scss +6 -1
  281. package/src/components/skeleton/skeleton.component.ts +3 -3
  282. package/src/components/skeleton/skeleton.scss +6 -6
  283. package/src/components/skeleton/skeleton.test.ts +9 -0
  284. package/src/components/slash-menu/slash-menu.scss +1 -1
  285. package/src/components/slideout/slideout.component.ts +20 -3
  286. package/src/components/slideout/slideout.scss +13 -6
  287. package/src/components/slideout/slideout.test.ts +19 -0
  288. package/src/components/split-button/split-button.component.ts +1 -1
  289. package/src/components/split-pane/split-pane.component.ts +71 -8
  290. package/src/components/split-pane/split-pane.scss +145 -41
  291. package/src/components/split-pane/split-pane.test.ts +23 -3
  292. package/src/components/stat/stat.component.ts +209 -14
  293. package/src/components/stat/stat.scss +305 -5
  294. package/src/components/stat/stat.test.ts +143 -2
  295. package/src/components/status-indicator/status-indicator.scss +22 -21
  296. package/src/components/stepper/stepper.scss +3 -3
  297. package/src/components/tab/tab.component.ts +1 -0
  298. package/src/components/table/table.component.ts +12 -1
  299. package/src/components/table/table.scss +21 -13
  300. package/src/components/table/table.test.ts +17 -0
  301. package/src/components/tabs/tabs.component.ts +150 -37
  302. package/src/components/tabs/tabs.scss +48 -7
  303. package/src/components/tabs/tabs.test.ts +169 -0
  304. package/src/components/textarea/textarea.component.ts +25 -3
  305. package/src/components/textarea/textarea.scss +10 -0
  306. package/src/components/textarea/textarea.test.ts +8 -4
  307. package/src/components/theme-editor/theme-editor.scss +0 -6
  308. package/src/components/tile/tile.component.ts +32 -2
  309. package/src/components/tile/tile.scss +40 -7
  310. package/src/components/tile/tile.test.ts +10 -0
  311. package/src/components/toggle/toggle.component.ts +23 -7
  312. package/src/components/toggle/toggle.scss +36 -29
  313. package/src/components/toggle/toggle.test.ts +17 -0
  314. package/src/components/tooltip/tooltip.component.ts +3 -0
  315. package/src/components/tooltip/tooltip.scss +11 -6
  316. package/src/components/tooltip/tooltip.test.ts +12 -0
  317. package/src/components/translation-field/index.ts +12 -0
  318. package/src/components/translation-field/translation-field.component.ts +55 -0
  319. package/src/components/translation-field/translation-field.scss +101 -0
  320. package/src/components/translation-fields/index.ts +12 -0
  321. package/src/components/translation-fields/translation-fields.component.ts +80 -0
  322. package/src/components/translation-fields/translation-fields.scss +60 -0
  323. package/src/components/translation-grid/index.ts +12 -0
  324. package/src/components/translation-grid/translation-grid.component.ts +157 -0
  325. package/src/components/translation-grid/translation-grid.scss +138 -0
  326. package/src/components/translation-grid/translation-grid.test.ts +28 -0
  327. package/src/components/vertical-stepper/vertical-stepper.component.ts +35 -9
  328. package/src/components/vertical-stepper/vertical-stepper.scss +110 -39
  329. package/src/components/vertical-stepper/vertical-stepper.test.ts +35 -0
  330. package/src/components/well/well.scss +2 -2
  331. package/src/events/events.ts +2 -0
  332. package/src/events/zn-chart-click.ts +13 -0
  333. package/src/events/zn-report-change.ts +7 -0
  334. package/src/form-control.scss +36 -3
  335. package/src/internal/anchored-popover.ts +175 -0
  336. package/src/internal/animate.ts +19 -5
  337. package/src/internal/cosmic-border.ts +15 -0
  338. package/src/internal/form.ts +1 -1
  339. package/src/internal/hover-intent.ts +15 -0
  340. package/src/internal/input-modality.ts +15 -0
  341. package/src/internal/pointer-intent.ts +37 -0
  342. package/src/internal/reorder.ts +625 -0
  343. package/src/internal/scroll.ts +51 -3
  344. package/src/internal/selection-card.ts +1 -1
  345. package/src/internal/tab-indicator.ts +92 -0
  346. package/src/internal/table-sort.ts +25 -0
  347. package/src/internal/table-tabs.ts +108 -0
  348. package/src/internal/test-drag.ts +35 -0
  349. package/src/internal/theme-openbyte.test.ts +126 -0
  350. package/src/internal/theme.ts +4 -4
  351. package/src/internal/zinc-element.ts +2 -2
  352. package/src/selection-card.scss +25 -0
  353. package/src/types/web-test-runner-commands.d.ts +1 -0
  354. package/src/utilities/color.test.ts +43 -0
  355. package/src/utilities/color.ts +189 -0
  356. package/src/zinc.ts +14 -0
  357. package/.github/workflows/eleventy_build.yml +0 -42
  358. package/scss/themes/_aura.scss +0 -114
@@ -119,6 +119,61 @@ In ticket mode (default), Enter creates new lines. Forms must be submitted using
119
119
  </script>
120
120
  ```
121
121
 
122
+ ### Compact
123
+
124
+ Add `compact` to draw the editor as a form field: a bordered, resizable box under a small toolbar of bold, italic,
125
+ link and lists. Add `source` for a button that switches to editing the raw HTML, which is submitted exactly as written.
126
+ Switching back to the editor reduces the HTML to what the editor can show.
127
+
128
+ ```html:preview
129
+ <zn-editor
130
+ name="body"
131
+ interaction-type="ticket"
132
+ compact
133
+ source
134
+ links
135
+ placeholder="Write the email"
136
+ help-text="Use Source to paste a designed HTML email."
137
+ value="<p>Thanks for signing up.</p><p>Reply to this email if you need anything.</p>">
138
+ </zn-editor>
139
+ ```
140
+
141
+ ### Help Text
142
+
143
+ Add text under the editor with the `help-text` attribute, or the `help-text` slot for HTML.
144
+
145
+ ```html:preview
146
+ <zn-editor
147
+ name="content"
148
+ help-text="Type / to see what you can insert."
149
+ style="height: 250px">
150
+ </zn-editor>
151
+ ```
152
+
153
+ {% raw %}
154
+
155
+ ### Merge Fields
156
+
157
+ Add `merge-fields` to show `{{token}}` replacements as highlighted chips. Each chip is labelled from the
158
+ `zn-editor-quick-action` whose `content` is that token, so the same actions offer them from the `/` menu. The editor's
159
+ value keeps the raw tokens, and tokens inside attributes such as a link's `href` are left as text.
160
+
161
+ ```html:preview
162
+ <zn-editor
163
+ name="body"
164
+ interaction-type="ticket"
165
+ merge-fields
166
+ value="<p>Hi {{recipient.firstName}}, welcome to {{brand.displayName}}.</p>"
167
+ style="height: 250px">
168
+ <zn-editor-quick-action slot="context-items" icon="braces@lu" label="First name"
169
+ content="{{recipient.firstName}}"></zn-editor-quick-action>
170
+ <zn-editor-quick-action slot="context-items" icon="braces@lu" label="Brand name"
171
+ content="{{brand.displayName}}"></zn-editor-quick-action>
172
+ </zn-editor>
173
+ ```
174
+
175
+ {% endraw %}
176
+
122
177
  ### Caching Unsent Content
123
178
 
124
179
  Set a `store-key` to cache what the agent has typed, so an unsent reply survives page reloads and navigation. Content is saved as it is typed, restored when an editor with the same key next loads, and cleared when the form is submitted or the editor is emptied.
@@ -335,6 +335,50 @@ Using shorthand notation:
335
335
  <zn-icon src="Jane Smith@av" size="40" round></zn-icon>
336
336
  ```
337
337
 
338
+ #### Avatar Sizes
339
+
340
+ `size` takes the named avatar sizes `sm` (22px), `md` (28px), `lg` (40px) and `xl` (56px), as well as a number of pixels.
341
+
342
+ ```html:preview
343
+ <zn-icon src="Fiona Hart" library="avatar" size="sm" round></zn-icon>
344
+ <zn-icon src="Fiona Hart" library="avatar" size="md" round></zn-icon>
345
+ <zn-icon src="Fiona Hart" library="avatar" size="lg" round></zn-icon>
346
+ <zn-icon src="Harry Hill" library="avatar" size="xl" round></zn-icon>
347
+ ```
348
+
349
+ #### Presence
350
+
351
+ Set `presence` to `online`, `away`, `busy`, `meeting` or `offline` to show a live-status dot. Use it only where live
352
+ status matters, such as agents and teams.
353
+
354
+ ```html:preview
355
+ <zn-icon src="Ben Brooks" library="avatar" size="md" color="success" presence="online" round></zn-icon>
356
+ <zn-icon src="Jade Ellis" library="avatar" size="md" color="warning" presence="away" round></zn-icon>
357
+ <zn-icon src="Kai Walsh" library="avatar" size="md" color="error" presence="busy" round></zn-icon>
358
+ <zn-icon src="Mia Nash" library="avatar" size="md" presence="meeting" round></zn-icon>
359
+ <zn-icon src="Ola Reed" library="avatar" size="md" presence="offline" round></zn-icon>
360
+ ```
361
+
362
+ #### Tinted and Solid Avatars
363
+
364
+ Avatars are solid circles unless the theme tints them — the OpenByte theme draws initials on a tinted circle. Add
365
+ `solid` to keep an avatar solid in a tinting theme, such as a dark `default` avatar for the signed-in user.
366
+
367
+ ```html:preview
368
+ <zn-icon src="Ann Isaacs" library="avatar" size="md" color="violet" round></zn-icon>
369
+ <zn-icon src="Mark Nolan" library="avatar" size="md" color="default" solid round></zn-icon>
370
+ ```
371
+
372
+ Theme tokens control the look:
373
+
374
+ - `--zn-avatar-tint`: `1` draws a tinted circle with darker initials; `0` (the default) a solid circle
375
+ - `--zn-avatar-default-color`: the colour of avatars without a `color`, in place of the colour picked from the name
376
+ - `--zn-avatar-font-scale`: the initials' size as a fraction of the avatar's (default `0.4167`)
377
+ - `--zn-avatar-font-weight`: the initials' weight
378
+ - `--zn-avatar-ring-color`: the ring around the presence dot (default: the panel surface)
379
+
380
+ To overlap several avatars with a tooltip on each, use [Avatar Group](/components/avatar-group).
381
+
338
382
  ### Gravatar
339
383
 
340
384
  Gravatar provides globally recognized avatars based on email addresses. Simply provide an email address as the `src` and the component will automatically detect it and use Gravatar.
@@ -455,7 +499,8 @@ The icon component exposes CSS custom properties for advanced styling:
455
499
 
456
500
  ### CSS Parts
457
501
 
458
- The icon component exposes the `icon` part for styling the internal icon element:
502
+ The icon component exposes the `icon` part for styling the internal icon element, and `presence` for an avatar's
503
+ status dot:
459
504
 
460
505
  ```html:preview
461
506
  <style>
@@ -36,6 +36,17 @@ Add descriptive help text to an input with the `help-text` attribute. For help t
36
36
  </zn-input>
37
37
  ```
38
38
 
39
+ ### Label Note
40
+
41
+ Use the `label-note` attribute to show short text next to the label, styled like the help text. This is useful for
42
+ marking a field as optional.
43
+
44
+ ```html:preview
45
+ <zn-input label="Middle name" label-note="optional"></zn-input>
46
+ <br />
47
+ <zn-input label="Nickname" label-note="optional" label-tooltip="What friends call you"></zn-input>
48
+ ```
49
+
39
50
  ### Label with Tooltip
40
51
 
41
52
  Use the `label-tooltip` attribute to add text that appears in a tooltip triggered by an info icon next to the label.
@@ -136,27 +147,35 @@ the [Properties table](#properties) for the full list of options.
136
147
 
137
148
  #### Color Input
138
149
 
139
- The color input type displays a clickable color swatch on the right that opens the browser's native color picker. The color value is shown as editable text in the input field, allowing users to either pick a color visually or enter a color value directly.
150
+ A colour input shows the colour and its value in one field: a swatch, then the value. Type a colour in any format —
151
+ HEX, RGB, HSL, OKLCH, a colour name or a CSS variable such as `var(--zn-color-primary)` — and the swatch follows. The
152
+ field works out which format was typed and keeps writing the value that way. A value that isn't a colour turns the field
153
+ red.
154
+
155
+ The swatch opens a panel with a colour area (saturation across, brightness down), a hue slider and the colour's HEX,
156
+ RGB, HSL and OKLCH values. Edit any one and the others follow; working in a row switches the field to that format.
157
+ Escape or a click outside closes the panel.
140
158
 
141
- Use the `color-format` attribute to specify the format: `hex` (default), `rgb`, or `oklch`.
159
+ `color-format` sets the format the value starts in: `hex` (default), `rgb`, `hsl` or `oklch`.
142
160
 
143
161
  ```html:preview
144
- <zn-input type="color" label="Hex Format (default)" value="#3b82f6">
145
- <div slot="help-text">Default format. Click the swatch to pick a color, or type a hex value like #3b82f6.</div>
146
- </zn-input>
162
+ <zn-input type="color" label="Brand colour" value="#085EFD"></zn-input>
147
163
  <br />
148
- <zn-input type="color" label="RGB Format" color-format="rgb" value="rgb(139, 92, 246)">
149
- <div slot="help-text">Type RGB values like rgb(139, 92, 246). The picker converts to/from hex automatically.</div>
164
+ <zn-input type="color" label="Accent" color-format="rgb" value="#7557F5">
165
+ <div slot="help-text">Starts as RGB.</div>
150
166
  </zn-input>
151
167
  <br />
152
- <zn-input type="color" label="OKLCH Format" color-format="oklch" value="oklch(0.628 0.225 292.6)">
153
- <div slot="help-text">Type OKLCH values like oklch(0.628 0.225 292.6). The picker converts to/from hex automatically.</div>
168
+ <zn-input type="color" label="Highlight" color-format="hsl" value="hsl(219, 100%, 50%)">
169
+ <div slot="help-text">Starts as HSL.</div>
154
170
  </zn-input>
155
171
  <br />
156
- <zn-input type="color" label="Background Color" value="#f59e0b" clearable>
157
- <div slot="help-text">Use the <code>clearable</code> attribute to allow clearing the color value.</div>
172
+ <zn-input type="color" label="Surface" color-format="oklch" value="oklch(37.1% 0.222 274.9)">
173
+ <div slot="help-text">Starts as OKLCH.</div>
158
174
  </zn-input>
159
175
  <br />
176
+ <zn-input type="color" label="Background colour" value="#F59E0B" clearable>
177
+ <div slot="help-text">Use the <code>clearable</code> attribute to allow clearing the colour.</div>
178
+ </zn-input>
160
179
  ```
161
180
 
162
181
  #### Range Input
@@ -49,6 +49,41 @@ Use `align-end` to right align the content value.
49
49
  </zn-sp>
50
50
  ```
51
51
 
52
+ ### Facts
53
+
54
+ Use `fact` for a grid of headline attributes: a small muted caption above the value. Lay them out with `zn-cols`.
55
+
56
+ ```html:preview
57
+ <zn-cols layout="1,1,1" basis="150">
58
+ <zn-item fact caption="Sender">noreply@example.com</zn-item>
59
+ <zn-item fact caption="Service">Fortifi (Email)</zn-item>
60
+ <zn-item fact caption="List type">Customer</zn-item>
61
+ <zn-item fact caption="Created">17 Sep 2026</zn-item>
62
+ </zn-cols>
63
+ ```
64
+
65
+ ### Key–Value
66
+
67
+ Use `key-value` for the rows of a record's details: a small muted caption beside a right-aligned value on a compact
68
+ row. Add `mono` to show identifiers in the monospace font. Put the rows in a flush, divided `zn-sp` inside a flush
69
+ panel so the dividers run edge to edge.
70
+
71
+ ```html:preview
72
+ <zn-panel caption="Details" flush>
73
+ <zn-sp flush divide no-gap>
74
+ <zn-item key-value mono caption="Charge ID">
75
+ fVeWtIUlss82t3RvFxD
76
+ <zn-copy-button slot="actions" value="fVeWtIUlss82t3RvFxD" size="16"></zn-copy-button>
77
+ </zn-item>
78
+ <zn-item key-value mono caption="Legacy ID">
79
+ XX:d3efbe77-d20c-11f1-b5b2-726fd569efa7:1
80
+ <zn-copy-button slot="actions" value="XX:d3efbe77-d20c-11f1-b5b2-726fd569efa7:1" size="16"></zn-copy-button>
81
+ </zn-item>
82
+ <zn-item key-value caption="Status"><zn-badge type="success" dot>Active</zn-badge></zn-item>
83
+ </zn-sp>
84
+ </zn-panel>
85
+ ```
86
+
52
87
  ### Icons
53
88
 
54
89
  ```html:preview
@@ -0,0 +1,25 @@
1
+ ---
2
+ meta:
3
+ title: Key Value
4
+ description: Edits a list of name and value pairs, submitted as a JSON object.
5
+ layout: component
6
+ ---
7
+
8
+ ```html:preview
9
+ <zn-key-value label="Placeholders" name="placeholders" key-label="Name" value-label="Value"
10
+ value='{"1": "{{recipient.firstName}}"}'></zn-key-value>
11
+ ```
12
+
13
+ ## Examples
14
+
15
+ ### Labels
16
+
17
+ Use `key-label` and `value-label` for the placeholder of each input, and `add-text` for the add button.
18
+
19
+ ```html:preview
20
+ <zn-key-value label="Headers" key-label="Header" value-label="Content" add-text="Add header"></zn-key-value>
21
+ ```
22
+
23
+ ### Merge fields
24
+
25
+ `slash-items` is passed to each value input, so typing `/` offers the same insertions as `zn-input`.
@@ -79,6 +79,73 @@ Use the `prefix` slot to add icons to menu items.
79
79
  </zn-menu>
80
80
  ```
81
81
 
82
+ ### Section Labels
83
+
84
+ Head a group of items with `zn-menu-label`. Labels are skipped by keyboard navigation.
85
+
86
+ ```html:preview
87
+ <zn-menu>
88
+ <zn-menu-label>Customer</zn-menu-label>
89
+ <zn-menu-item>Send email</zn-menu-item>
90
+ <zn-menu-item>Issue refund</zn-menu-item>
91
+ <zn-menu-label>Account</zn-menu-label>
92
+ <zn-menu-item>Change plan</zn-menu-item>
93
+ </zn-menu>
94
+ ```
95
+
96
+ ### Keyboard Shortcuts
97
+
98
+ Set `shortcut` on an item to show its keyboard shortcut as a key cap at the end of the row. It labels the shortcut only;
99
+ handle the key press yourself.
100
+
101
+ ```html:preview
102
+ <zn-menu>
103
+ <zn-menu-item shortcut="E">
104
+ <zn-icon slot="prefix" src="mail@lu" size="18"></zn-icon>
105
+ Send email
106
+ </zn-menu-item>
107
+ <zn-menu-item shortcut="R">
108
+ <zn-icon slot="prefix" src="undo-2@lu" size="18"></zn-icon>
109
+ Issue refund
110
+ </zn-menu-item>
111
+ </zn-menu>
112
+ ```
113
+
114
+ ### Actions Menu
115
+
116
+ A typical actions menu: a label, items with icons and shortcuts, and a destructive item last, after a divider.
117
+
118
+ ```html:preview
119
+ <zn-dropdown>
120
+ <zn-button slot="trigger" caret color="secondary">Actions</zn-button>
121
+ <zn-menu>
122
+ <zn-menu-label>Customer</zn-menu-label>
123
+ <zn-menu-item shortcut="E"><zn-icon slot="prefix" src="mail@lu" size="18"></zn-icon>Send email</zn-menu-item>
124
+ <zn-menu-item shortcut="R"><zn-icon slot="prefix" src="undo-2@lu" size="18"></zn-icon>Issue refund</zn-menu-item>
125
+ <zn-menu-item><zn-icon slot="prefix" src="repeat@lu" size="18"></zn-icon>Retry payment</zn-menu-item>
126
+ <zn-menu-item><zn-icon slot="prefix" src="copy@lu" size="18"></zn-icon>Copy customer ID</zn-menu-item>
127
+ <hr>
128
+ <zn-menu-item color="error"><zn-icon slot="prefix" src="trash-2@lu" size="18"></zn-icon>Delete customer</zn-menu-item>
129
+ </zn-menu>
130
+ </zn-dropdown>
131
+ ```
132
+
133
+ The `actions` property builds the same menu from data: `type: "label"` adds a label, `type: "divider"` a divider, and
134
+ an item's `color` and `shortcut` work as the attributes do.
135
+
136
+ ```html:preview
137
+ <zn-menu id="actions-menu"></zn-menu>
138
+ <script>
139
+ document.getElementById('actions-menu').actions = [
140
+ {type: 'label', title: 'Customer'},
141
+ {title: 'Send email', icon: 'mail@lu', shortcut: 'E', path: '#'},
142
+ {title: 'Issue refund', icon: 'undo-2@lu', shortcut: 'R', path: '#'},
143
+ {type: 'divider'},
144
+ {title: 'Delete customer', icon: 'trash-2@lu', color: 'error', path: '#'}
145
+ ];
146
+ </script>
147
+ ```
148
+
82
149
  ### Shell Variant
83
150
 
84
151
  Use `variant="shell"` for the app-shell header dropdown look: a padded, translucent panel with floating rounded items that highlight with the primary colour on hover. The variant is automatically propagated to the menu's items.
@@ -313,16 +380,16 @@ Menus support full keyboard navigation:
313
380
 
314
381
  ### Dividers
315
382
 
316
- Menu items have no built-in separators — to group items visually, add HTML elements with `role="separator"`.
383
+ Add an `<hr>` between menu items to split them into groups.
317
384
 
318
385
  ```html:preview
319
386
  <zn-menu>
320
387
  <zn-menu-item>Cut</zn-menu-item>
321
388
  <zn-menu-item>Copy</zn-menu-item>
322
389
  <zn-menu-item>Paste</zn-menu-item>
323
- <hr style="margin: 0; border: none; border-top: 1px solid rgba(0,0,0,0.1);">
390
+ <hr>
324
391
  <zn-menu-item>Select All</zn-menu-item>
325
- <hr style="margin: 0; border: none; border-top: 1px solid rgba(0,0,0,0.1);">
392
+ <hr>
326
393
  <zn-menu-item color="error">Delete</zn-menu-item>
327
394
  </zn-menu>
328
395
  ```
@@ -351,7 +418,7 @@ A comprehensive example showing various menu features together.
351
418
  <zn-menu-item value="doc3">document3.txt</zn-menu-item>
352
419
  </zn-menu>
353
420
  </zn-menu-item>
354
- <hr style="margin: 0; border: none; border-top: 1px solid rgba(0,0,0,0.1);">
421
+ <hr>
355
422
  <zn-menu-item value="save">
356
423
  <zn-icon slot="prefix" src="save" size="20"></zn-icon>
357
424
  Save
@@ -360,14 +427,14 @@ A comprehensive example showing various menu features together.
360
427
  <zn-icon slot="prefix" src="save_as" size="20"></zn-icon>
361
428
  Save As...
362
429
  </zn-menu-item>
363
- <hr style="margin: 0; border: none; border-top: 1px solid rgba(0,0,0,0.1);">
430
+ <hr>
364
431
  <zn-menu-item type="checkbox" value="auto-save" checked>
365
432
  Auto Save
366
433
  </zn-menu-item>
367
434
  <zn-menu-item type="checkbox" value="show-line-numbers">
368
435
  Show Line Numbers
369
436
  </zn-menu-item>
370
- <hr style="margin: 0; border: none; border-top: 1px solid rgba(0,0,0,0.1);">
437
+ <hr>
371
438
  <zn-menu-item value="export">
372
439
  Export
373
440
  <zn-menu slot="submenu">
@@ -381,7 +448,7 @@ A comprehensive example showing various menu features together.
381
448
  </zn-menu-item>
382
449
  </zn-menu>
383
450
  </zn-menu-item>
384
- <hr style="margin: 0; border: none; border-top: 1px solid rgba(0,0,0,0.1);">
451
+ <hr>
385
452
  <zn-menu-item value="close" color="error">
386
453
  <zn-icon slot="prefix" src="close" size="20"></zn-icon>
387
454
  Close File
@@ -0,0 +1,15 @@
1
+ ---
2
+ meta:
3
+ title: Nav Item
4
+ description: A selectable row in a nav list, with an optional description and count.
5
+ layout: component
6
+ ---
7
+
8
+ ```html:preview
9
+ <zn-nav-list>
10
+ <zn-nav-item count="4">Monthly plans</zn-nav-item>
11
+ <zn-nav-item count="3">Annual plans</zn-nav-item>
12
+ </zn-nav-list>
13
+ ```
14
+
15
+ Nav items are used inside a [Nav List](/components/nav-list). See its page for the master–detail layout.
@@ -0,0 +1,132 @@
1
+ ---
2
+ meta:
3
+ title: Nav List
4
+ description: A card of selectable groups shown beside the selected group's contents, for a master–detail layout.
5
+ layout: component
6
+ ---
7
+
8
+ ```html:preview
9
+ <zn-tabs flush gap>
10
+ <zn-nav-list slot="left">
11
+ <zn-nav-item tab="" count="4">Monthly plans</zn-nav-item>
12
+ <zn-nav-item tab="annual-plans" count="3">Annual plans</zn-nav-item>
13
+ <zn-nav-item tab="billing" count="3">Billing preferences</zn-nav-item>
14
+ </zn-nav-list>
15
+
16
+ <zn-panel id="" caption="Monthly plans">
17
+ <p>The selected group's contents (usually a data table).</p>
18
+ </zn-panel>
19
+ <zn-panel id="annual-plans" caption="Annual plans">
20
+ <p>Annual plan contents.</p>
21
+ </zn-panel>
22
+ <zn-panel id="billing" caption="Billing preferences">
23
+ <p>Billing preference contents.</p>
24
+ </zn-panel>
25
+ </zn-tabs>
26
+ ```
27
+
28
+ ## Examples
29
+
30
+ ### Master–Detail
31
+
32
+ Use a nav list when a long set of groups sits beside the selected group's contents. Place it in the `left` slot of
33
+ a `zn-tabs` with the `flush` and `gap` attributes. Each `zn-nav-item` takes a `tab` attribute naming the `id` of its panel, the
34
+ same way tab navigation does, so the selection can also be remembered with `store-key` and panels loaded with
35
+ `tab-uri`.
36
+
37
+ When the tabs are narrower than 900px, the list moves above the contents and scrolls after 224px.
38
+
39
+ ```html:preview
40
+ <zn-tabs flush gap>
41
+ <zn-nav-list slot="left">
42
+ <zn-nav-item tab="" count="12">Customers</zn-nav-item>
43
+ <zn-nav-item tab="leads" count="48">Leads</zn-nav-item>
44
+ <zn-nav-item tab="archived">Archived</zn-nav-item>
45
+ </zn-nav-list>
46
+
47
+ <zn-panel id="" caption="Customers">
48
+ <p>Customer contents.</p>
49
+ </zn-panel>
50
+ <zn-panel id="leads" caption="Leads">
51
+ <p>Lead contents.</p>
52
+ </zn-panel>
53
+ <zn-panel id="archived" caption="Archived">
54
+ <p>Archived contents.</p>
55
+ </zn-panel>
56
+ </zn-tabs>
57
+ ```
58
+
59
+ ### Counts
60
+
61
+ Set `count` on an item to show a count at the end of the row. Long labels are truncated with an ellipsis.
62
+
63
+ ```html:preview
64
+ <zn-nav-list>
65
+ <zn-nav-item count="4">Monthly plans</zn-nav-item>
66
+ <zn-nav-item count="128">A group with a much longer name than the list is wide</zn-nav-item>
67
+ <zn-nav-item>No count</zn-nav-item>
68
+ </zn-nav-list>
69
+ ```
70
+
71
+ ### Divided
72
+
73
+ Add the `divide` attribute for full-width rows split by dividers, with the selected row marked by a bar on its edge
74
+ and counts drawn as pills. Give an item a `description` for a line of detail below its label.
75
+
76
+ ```html:preview
77
+ <zn-tabs flush gap>
78
+ <zn-nav-list slot="left" caption="Sections" divide>
79
+ <zn-nav-item tab="" count="6" description="Opening, discovery and resolution">General</zn-nav-item>
80
+ <zn-nav-item tab="security" count="5" description="Identity checks and disclosures">Security &amp; compliance</zn-nav-item>
81
+ <zn-nav-item tab="closing" count="3" description="Wrap-up and follow-up">Closing</zn-nav-item>
82
+ </zn-nav-list>
83
+
84
+ <zn-panel id="" caption="General"><p>General contents.</p></zn-panel>
85
+ <zn-panel id="security" caption="Security &amp; compliance"><p>Security contents.</p></zn-panel>
86
+ <zn-panel id="closing" caption="Closing"><p>Closing contents.</p></zn-panel>
87
+ </zn-tabs>
88
+ ```
89
+
90
+ ### Search
91
+
92
+ Add the `searchable` attribute to filter the items by their label. Set `search-placeholder` and `empty-label` to change
93
+ the input's placeholder and the message shown when nothing matches.
94
+
95
+ ```html:preview
96
+ <zn-tabs flush gap>
97
+ <zn-nav-list slot="left" searchable search-placeholder="Search groups">
98
+ <zn-nav-item tab="" count="4">Monthly plans</zn-nav-item>
99
+ <zn-nav-item tab="annual-plans" count="3">Annual plans</zn-nav-item>
100
+ <zn-nav-item tab="billing" count="3">Billing preferences</zn-nav-item>
101
+ <zn-nav-item tab="notifications" count="7">Notifications</zn-nav-item>
102
+ <zn-nav-item tab="security" count="2">Security</zn-nav-item>
103
+ </zn-nav-list>
104
+
105
+ <zn-panel id="" caption="Monthly plans"><p>Monthly plan contents.</p></zn-panel>
106
+ <zn-panel id="annual-plans" caption="Annual plans"><p>Annual plan contents.</p></zn-panel>
107
+ <zn-panel id="billing" caption="Billing preferences"><p>Billing preference contents.</p></zn-panel>
108
+ <zn-panel id="notifications" caption="Notifications"><p>Notification contents.</p></zn-panel>
109
+ <zn-panel id="security" caption="Security"><p>Security contents.</p></zn-panel>
110
+ </zn-tabs>
111
+ ```
112
+
113
+ ### Width and Height
114
+
115
+ Set `--zn-nav-list-width` to change the card's width, and `--zn-nav-list-max-height` to cap its height. The list
116
+ scrolls inside the card once it reaches the cap.
117
+
118
+ ```html:preview
119
+ <zn-nav-list style="--zn-nav-list-width: 12rem; --zn-nav-list-max-height: 9rem;">
120
+ <zn-nav-item count="1">January</zn-nav-item>
121
+ <zn-nav-item count="4">February</zn-nav-item>
122
+ <zn-nav-item count="2">March</zn-nav-item>
123
+ <zn-nav-item count="6">April</zn-nav-item>
124
+ <zn-nav-item count="3">May</zn-nav-item>
125
+ <zn-nav-item count="5">June</zn-nav-item>
126
+ </zn-nav-list>
127
+ ```
128
+
129
+ ### Keyboard
130
+
131
+ The list is a single tab stop. Arrow Up and Arrow Down move between items, Home and End jump to the first and last, and
132
+ Enter or Space selects the focused item.
@@ -54,4 +54,103 @@ layout: component
54
54
 
55
55
  <zn-navbar small icon-bar rounded navigation="[{&quot;path&quot;:&quot;#&quot;,&quot;title&quot;:&quot;HTML&quot;},{&quot;path&quot;:&quot;#&quot;,&quot;title&quot;:&quot;Text&quot;}]">>
56
56
  </zn-navbar>
57
- ```
57
+ ```
58
+
59
+ ### Pill
60
+
61
+ Add the `pill` attribute to draw the tabs as a segmented control: a grey track with a raised pill that slides to the
62
+ active tab, stretching and settling with a spring as it moves.
63
+
64
+ ```html:preview
65
+ <zn-tabs>
66
+ <zn-navbar slot="top" pill navigation='[{"tab":"","title":"All"},{"tab":"active","title":"Active"},{"tab":"draft","title":"Draft"},{"tab":"archived","title":"Archived"}]'></zn-navbar>
67
+ <div id="">All</div>
68
+ <div id="active">Active</div>
69
+ <div id="draft">Draft</div>
70
+ <div id="archived">Archived</div>
71
+ </zn-tabs>
72
+ ```
73
+
74
+ ### Sliding Indicator
75
+
76
+ Set `--zn-navbar-tab-indicator-slide: 1` to replace each tab's own line with a single indicator that slides to the active tab. Style it with `::part(indicator)`; `--zn-navbar-indicator-top` and `--zn-navbar-indicator-height` give the active tab's box, so the indicator can fill the tab as a pill instead of underlining it.
77
+
78
+ ```html:preview
79
+ <style>
80
+ .pill-tabs zn-navbar {
81
+ --zn-navbar-tab-indicator-slide: 1;
82
+ --zn-navbar-tab-background: transparent;
83
+ --zn-navbar-tab-hover-background: transparent;
84
+ --zn-navbar-tab-hover-backdrop: transparent;
85
+ --zn-navbar-tab-active-background: transparent;
86
+ }
87
+
88
+ .pill-tabs zn-navbar::part(container) {
89
+ border-bottom: 0;
90
+ }
91
+
92
+ .pill-tabs zn-navbar::part(navbar) {
93
+ width: fit-content;
94
+ height: auto;
95
+ padding: 4px;
96
+ border-radius: 10px;
97
+ background: var(--zn-color-neutral-100);
98
+ }
99
+
100
+ .pill-tabs zn-navbar::part(navbar-item) {
101
+ z-index: 1;
102
+ min-height: 32px;
103
+ border: 0;
104
+ }
105
+
106
+ .pill-tabs zn-navbar::part(indicator) {
107
+ z-index: 0;
108
+ top: var(--zn-navbar-indicator-top);
109
+ bottom: auto;
110
+ height: var(--zn-navbar-indicator-height);
111
+ border-radius: 7px;
112
+ background: #fff;
113
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
114
+ }
115
+ </style>
116
+
117
+ <zn-tabs class="pill-tabs">
118
+ <zn-navbar slot="top" navigation='[{"tab":"","title":"All"},{"tab":"active","title":"Active"},{"tab":"draft","title":"Draft"},{"tab":"archived","title":"Archived"}]'></zn-navbar>
119
+ <div id="">All</div>
120
+ <div id="active">Active</div>
121
+ <div id="draft">Draft</div>
122
+ <div id="archived">Archived</div>
123
+ </zn-tabs>
124
+ ```
125
+
126
+ ### Liquid Indicator
127
+
128
+ `zn-navbar pill` draws the tabs as a segmented control with this motion built in. The indicator moves by its two
129
+ edges: on a tab change it squishes slightly during `--zn-navbar-tab-indicator-delay`, then its leading edge glides to
130
+ the new tab while the trailing edge follows on a damped spring, so it stretches a little and settles. Neither edge
131
+ travels beyond the new tab. Reduced motion turns all of this off.
132
+
133
+ ```html:preview
134
+ <style>
135
+ .liquid-tabs zn-navbar {
136
+ /* Squish, then move once the squish is at its deepest */
137
+ --zn-navbar-tab-indicator-delay: 60ms;
138
+ --zn-navbar-tab-indicator-squash: 0.87;
139
+ /* The leading edge glides in on a drawer curve */
140
+ --zn-navbar-tab-indicator-duration: 280ms;
141
+ --zn-navbar-tab-indicator-easing: cubic-bezier(0.32, 0.72, 0, 1);
142
+ /* The trailing edge follows on a spring that overshoots once as it catches up */
143
+ --zn-navbar-tab-indicator-trail-duration: 400ms;
144
+ --zn-navbar-tab-indicator-trail-easing: linear(0, 0.044, 0.151, 0.286, 0.428, 0.562, 0.681, 0.78, 0.86, 0.92, 0.964, 0.993, 1.012, 1.023, 1.028, 1.028, 1.026, 1.023, 1.019, 1.015, 1.011, 1.008, 1.005, 1.003, 1.002, 1.001, 1, 1, 1);
145
+ }
146
+ </style>
147
+
148
+ <zn-tabs class="pill-tabs liquid-tabs">
149
+ <zn-navbar slot="top" navigation='[{"tab":"","title":"All"},{"tab":"active","title":"Active"},{"tab":"draft","title":"Draft"},{"tab":"suspended","title":"Suspended"},{"tab":"archived","title":"Archived"}]'></zn-navbar>
150
+ <div id="">All</div>
151
+ <div id="active">Active</div>
152
+ <div id="draft">Draft</div>
153
+ <div id="suspended">Suspended</div>
154
+ <div id="archived">Archived</div>
155
+ </zn-tabs>
156
+ ```