@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
@@ -27,11 +27,33 @@ $scrollbar-thumb-hover: rgba(var(--inverse-base), 0.6);
27
27
  }
28
28
  }
29
29
 
30
+ // Chrome ignores ::-webkit-scrollbar wherever these are set, and scrollbar-color
31
+ // inherits, so only browsers without the webkit pseudo-elements get them
32
+ @mixin scrollbars-standard {
33
+ @supports not selector(::-webkit-scrollbar) {
34
+ scrollbar-width: thin;
35
+ scrollbar-color: $scrollbar-thumb transparent;
36
+ }
37
+ }
38
+
39
+ // Clips, leaving room outside the box for the focus ring of a control flush with its edge.
40
+ // Safari lacks overflow-clip-margin, so there the box grows by padding cancelled by a negative
41
+ // margin: only for boxes without padding, margins or percentage sizes of their own.
42
+ @mixin clip-focus-room {
43
+ overflow: clip;
44
+ overflow-clip-margin: var(--zn-focus-ring-outset);
45
+
46
+ // Safari: a padded box pulled out by negative margins overflows its parent and gives scrollers around it a scrollbar
47
+ @supports not (overflow-clip-margin: 0px) {
48
+ overflow: visible;
49
+ clip-path: inset(calc(var(--zn-focus-ring-outset) * -1));
50
+ }
51
+ }
52
+
30
53
  // `scrollbars` only reaches descendant scroll areas; this styles an element that
31
54
  // is itself the scroller
32
55
  @mixin scrollbars-self {
33
- scrollbar-width: thin;
34
- scrollbar-color: $scrollbar-thumb transparent;
56
+ @include scrollbars-standard;
35
57
 
36
58
  &::-webkit-scrollbar {
37
59
  width: $scrollbar-size;
@@ -0,0 +1,126 @@
1
+ /// Wraps rules that should only apply when the user asked for less motion.
2
+ @mixin reduced-motion {
3
+ @media (prefers-reduced-motion: reduce) {
4
+ @content;
5
+ }
6
+ }
7
+
8
+ /// Gates hover-only motion so touch devices don't fire it on tap.
9
+ @mixin hover-fine {
10
+ @media (hover: hover) and (pointer: fine) {
11
+ @content;
12
+ }
13
+ }
14
+
15
+ /// Scale-down press feedback for any clickable surface. Sets `transition`, so it replaces any
16
+ /// transition list already on the element.
17
+ @mixin press($scale: 0.97) {
18
+ transition: transform 160ms var(--zn-ease-out);
19
+
20
+ &:active:not([disabled]) {
21
+ transform: scale($scale);
22
+ }
23
+ }
24
+
25
+ /// Pops a zn-popup in from its trigger on open; closing is instant. `$host` is the zn-popup's selector.
26
+ @mixin popover-motion($host, $duration: var(--zn-dropdown-duration, 120ms)) {
27
+ #{$host}::part(popup) {
28
+ transform-origin: top;
29
+ transition: opacity $duration var(--zn-ease-out),
30
+ translate $duration var(--zn-ease-out),
31
+ scale $duration var(--zn-ease-out);
32
+
33
+ @starting-style {
34
+ opacity: 0;
35
+ translate: 0 -3px;
36
+ scale: .98;
37
+ }
38
+
39
+ @include reduced-motion {
40
+ transition: opacity $duration var(--zn-ease-out);
41
+ }
42
+ }
43
+
44
+ #{$host}[data-current-placement^="top"]::part(popup) {
45
+ transform-origin: bottom;
46
+
47
+ @starting-style {
48
+ translate: 0 3px;
49
+ }
50
+ }
51
+
52
+ @each $side, $origin-y in (bottom: top, top: bottom) {
53
+ @each $align, $origin-x in (start: left, end: right) {
54
+ #{$host}[data-current-placement="#{$side}-#{$align}"]::part(popup) {
55
+ transform-origin: $origin-x $origin-y;
56
+ }
57
+ }
58
+ }
59
+ }
60
+
61
+ /// Expands a control's `__selected-content-wrapper` while it is `--checked`. `$block` is the BEM block, e.g. `checkbox`.
62
+ @mixin selected-content-reveal($block) {
63
+ .#{$block}__selected-content-wrapper {
64
+ display: grid;
65
+ grid-template-rows: 0fr;
66
+ opacity: 0;
67
+ // Hidden content stays out of the tab order once collapsed.
68
+ visibility: hidden;
69
+ transition: grid-template-rows 200ms var(--zn-ease-drawer),
70
+ opacity 120ms ease-out,
71
+ visibility 0s 200ms;
72
+ }
73
+
74
+ .#{$block}--checked .#{$block}__selected-content-wrapper {
75
+ grid-template-rows: 1fr;
76
+ opacity: 1;
77
+ visibility: visible;
78
+ transition: grid-template-rows 200ms var(--zn-ease-drawer),
79
+ opacity 150ms ease-out 50ms,
80
+ visibility 0s;
81
+
82
+ .#{$block}__selected-content-inner {
83
+ // Unclips once expanded so focus rings and popups inside aren't cut off.
84
+ overflow: visible;
85
+ transition: overflow 0s 200ms allow-discrete;
86
+ }
87
+ }
88
+
89
+ .#{$block}__selected-content-inner {
90
+ min-height: 0;
91
+ overflow: hidden;
92
+ }
93
+
94
+ @include reduced-motion {
95
+ .#{$block}__selected-content-wrapper,
96
+ .#{$block}--checked .#{$block}__selected-content-wrapper {
97
+ transition: none;
98
+ }
99
+ }
100
+ }
101
+
102
+ /// Continuous rotation for loading spinners.
103
+ @mixin spin($duration: 1s) {
104
+ animation: zn-spin $duration linear infinite;
105
+
106
+ @at-root {
107
+ @keyframes zn-spin {
108
+ to { rotate: 1turn; }
109
+ }
110
+ }
111
+ }
112
+
113
+ /// Indeterminate loader that slides the element across its (overflow: hidden) parent.
114
+ /// Positions are percentages of the element's own width.
115
+ @mixin sweep($duration, $from: -100%, $to: 100%, $easing: linear) {
116
+ animation: zn-sweep $duration $easing infinite;
117
+ --_sweep-from: #{$from};
118
+ --_sweep-to: #{$to};
119
+
120
+ @at-root {
121
+ @keyframes zn-sweep {
122
+ from { translate: var(--_sweep-from) 0; }
123
+ to { translate: var(--_sweep-to) 0; }
124
+ }
125
+ }
126
+ }
@@ -34,21 +34,22 @@
34
34
  }
35
35
 
36
36
  @mixin gutter {
37
+ // --zn-page-gutter lets a theme fix the gutter, which it can't reach through --zn-gutter set on :host.
37
38
  @container (width > 1024px) {
38
39
  :host {
39
- --zn-gutter: 16px;
40
+ --zn-gutter: var(--zn-page-gutter, 16px);
40
41
  }
41
42
  }
42
43
 
43
44
  @container (width > 1400px) {
44
45
  :host {
45
- --zn-gutter: 24px;
46
+ --zn-gutter: var(--zn-page-gutter, 24px);
46
47
  }
47
48
  }
48
49
 
49
50
  @container (width > 1500px) {
50
51
  :host {
51
- --zn-gutter: 32px;
52
+ --zn-gutter: var(--zn-page-gutter, 32px);
52
53
  }
53
54
  }
54
55
  }
@@ -0,0 +1,12 @@
1
+ /// Motion for a pill that slides between segmented tabs. On a tab change it squishes slightly, then its
2
+ /// leading edge glides to the new tab while the trailing edge follows on a damped spring, so it stretches
3
+ /// a little and settles. Neither edge travels beyond the new tab, so the pill can't overflow its track.
4
+ @mixin pill-tab-indicator-motion {
5
+ // Both edges wait for the squish to reach its deepest point
6
+ --zn-navbar-tab-indicator-delay: 60ms;
7
+ --zn-navbar-tab-indicator-squash: 0.87;
8
+ --zn-navbar-tab-indicator-duration: 280ms;
9
+ --zn-navbar-tab-indicator-easing: cubic-bezier(0.32, 0.72, 0, 1);
10
+ --zn-navbar-tab-indicator-trail-duration: 400ms;
11
+ --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);
12
+ }
@@ -9,7 +9,7 @@
9
9
  * as margin-block-end.
10
10
  */
11
11
  @mixin text-style($role, $spacing: false) {
12
- font-family: var(--zn-font-sans);
12
+ font-family: var(--zn-text-#{$role}-font-family, var(--zn-font-sans));
13
13
  font-size: var(--zn-text-#{$role}-font-size);
14
14
  font-weight: var(--zn-text-#{$role}-font-weight);
15
15
  line-height: var(--zn-text-#{$role}-line-height);
@@ -1,6 +1,9 @@
1
1
  @forward "spacing-mixins";
2
2
  @forward "helper-mixins";
3
3
  @forward "typography-mixins";
4
+ @forward "tab-indicator-mixins";
5
+ @forward "motion-mixins";
6
+ @use "motion-mixins" as motion;
4
7
 
5
8
 
6
9
  @mixin cosmic-border() {
@@ -28,5 +31,16 @@
28
31
  );
29
32
 
30
33
  animation: rotate-gradient 6s linear infinite;
34
+
35
+ @include motion.reduced-motion {
36
+ animation: none;
37
+ }
38
+ }
39
+
40
+ @at-root {
41
+ @keyframes rotate-gradient {
42
+ from { --rotate: 0deg; }
43
+ to { --rotate: 360deg; }
44
+ }
31
45
  }
32
46
  }
@@ -21,11 +21,22 @@ Apply default styles to the document, and shadow documents
21
21
 
22
22
  html, body {
23
23
  background-color: rgba(var(--zn-body), var(--zn-bg-opacity));
24
- container-type: size;
25
24
  min-height: 100%;
26
25
  height: 100%;
27
26
  }
28
27
 
28
+ // zn-split-pane rewrites this on every drag step; inherited, it would restyle everything in the pane each frame.
29
+ @property --zn-split-pane-size {
30
+ syntax: '<length-percentage>';
31
+ inherits: false;
32
+ initial-value: 50%;
33
+ }
34
+
35
+ // One root container: each nested container costs Safari a full layout on every restyle beneath it.
36
+ body {
37
+ container-type: size;
38
+ }
39
+
29
40
  .inline-container {
30
41
  container-type: inline-size;
31
42
  }
@@ -40,6 +51,23 @@ html, body {
40
51
  height: 100%;
41
52
  width: 100%;
42
53
  max-width: 100%;
54
+
55
+ // Room to scroll the end clear of anything hung over the pane's bottom edge, such as pull tabs. As the last flex
56
+ // item it lands after content that overflows the container, where padding would sit underneath it. A scroll
57
+ // container inside leaves the room itself. Rubix's app-content holds its page in a shadow root, out of :has()'s
58
+ // sight, so it is left to whatever scrolls in there.
59
+ &:not(app-content, :has(zn-scroll-container)) {
60
+ &::after {
61
+ content: "";
62
+ flex: none;
63
+ height: var(--zn-pane-end-inset, 0px);
64
+ }
65
+
66
+ // Only the outermost app container leaves that room
67
+ > * {
68
+ --zn-pane-end-inset: 0px;
69
+ }
70
+ }
43
71
  }
44
72
 
45
73
  .inline-app-container, .app-container.inline-app-container, [inline-container] .app-container {
@@ -83,18 +111,21 @@ h1, h2, h3, h4, h5, h6 {
83
111
  }
84
112
 
85
113
  h1 {
114
+ font-family: var(--zn-text-h1-font-family, inherit);
86
115
  font-size: var(--zn-text-h1-font-size);
87
116
  line-height: var(--zn-text-h1-line-height);
88
117
  font-weight: var(--zn-text-h1-font-weight);
89
118
  }
90
119
 
91
120
  h2 {
121
+ font-family: var(--zn-text-h2-font-family, inherit);
92
122
  font-size: var(--zn-text-h2-font-size);
93
123
  line-height: var(--zn-text-h2-line-height);
94
124
  font-weight: var(--zn-text-h2-font-weight);
95
125
  }
96
126
 
97
127
  h3, h4, h5, h6 {
128
+ font-family: var(--zn-text-h3-font-family, inherit);
98
129
  font-size: var(--zn-text-h3-font-size);
99
130
  line-height: var(--zn-text-h3-line-height);
100
131
  font-weight: var(--zn-text-h3-font-weight);
@@ -5,7 +5,7 @@
5
5
  display: inline-flex;
6
6
  align-items: center;
7
7
  justify-content: center;
8
- padding: var(--zn-base-px);// calc(var(--zn-base-px) + var(--zn-button-gutter));
8
+ padding: var(--zn-button-padding, var(--zn-base-px));
9
9
  margin: auto;
10
10
  width: fit-content;
11
11
  background-color: rgb(var(--zn-primary));
@@ -19,11 +19,13 @@
19
19
  border-color: transparent;
20
20
  white-space: nowrap;
21
21
 
22
- max-height: 36px;
23
- height: 36px;
24
- min-height: 36px;
22
+ max-height: var(--zn-button-height, 36px);
23
+ height: var(--zn-button-height, 36px);
24
+ min-height: var(--zn-button-height, 36px);
25
25
 
26
+ // A theme darkens on hover by setting --zn-button-mix-color; the default
27
+ // (transparent) is the same as fading the fill to that alpha.
26
28
  &:hover:not([disabled]) {
27
- background-color: rgba(var(--zn-primary), 0.8);
29
+ background-color: color-mix(in srgb, rgb(var(--zn-primary)) var(--zn-button-hover-mix, 80%), var(--zn-button-mix-color, transparent));
28
30
  }
29
31
  }
@@ -23,12 +23,14 @@ table:not(.remarkd-table) {
23
23
 
24
24
  a {
25
25
  cursor: pointer;
26
- color: rgb(var(--zn-primary));
26
+ color: var(--zn-color-primary-fg, rgb(var(--zn-primary)));
27
27
  }
28
28
  }
29
29
 
30
30
  tbody tr td {
31
- border-top: 1px solid rgb(var(--zn-border-color)) !important;
31
+ height: var(--zn-table-row-height, auto);
32
+ border-top: 1px solid var(--zn-table-row-divider-color, rgb(var(--zn-border-color))) !important;
33
+ font-variant-numeric: var(--zn-table-numeric, normal);
32
34
  }
33
35
 
34
36
  tbody tr:first-of-type td {
@@ -36,22 +38,51 @@ table:not(.remarkd-table) {
36
38
  }
37
39
 
38
40
  th, td {
39
- padding: var(--zn-spacing-small) var(--zn-spacing-medium);
41
+ padding: var(--zn-table-cell-padding, var(--zn-spacing-small) var(--zn-spacing-medium));
40
42
  min-width: 90px;
41
43
  white-space: nowrap;
42
44
  }
43
45
 
46
+ th:first-child, td:first-child {
47
+ padding-inline-start: var(--zn-table-edge-padding, var(--zn-spacing-medium));
48
+ }
49
+
50
+ th:last-child, td:last-child {
51
+ padding-inline-end: var(--zn-table-edge-padding, var(--zn-spacing-medium));
52
+ }
53
+
44
54
  td > span {
45
55
  white-space: normal;
46
56
  }
47
57
 
58
+ // Keep in step with zn-data-table: a cell with a meta line grows its row rather than filling it edge to edge
59
+ td:has(.zn-table-meta) {
60
+ padding-block: var(--zn-table-multiline-padding-block, 10px);
61
+ }
62
+
63
+ // A secondary line under the cell's main text.
64
+ .zn-table-meta {
65
+ display: block;
66
+ margin-top: 2px;
67
+ font-size: var(--zn-table-meta-font-size, var(--zn-font-size-x-small));
68
+ color: var(--zn-table-meta-color, var(--zn-text-color-muted));
69
+ }
70
+
48
71
  th {
49
72
  @include m.text-style(button-label);
50
- text-transform: capitalize;
73
+ font-size: var(--zn-table-header-font-size, var(--zn-text-button-label-font-size));
74
+ color: var(--zn-table-header-color, var(--zn-text-button-label-color));
75
+ height: var(--zn-table-header-height, auto);
76
+ text-transform: var(--zn-table-header-transform, capitalize);
51
77
  border-bottom: 1px solid rgb(var(--zn-border-color));
52
78
  }
53
79
  }
54
80
 
81
+ // Lets a wide table scroll inside its container instead of widening the page.
82
+ .zn-table-scroll {
83
+ overflow-x: auto;
84
+ }
85
+
55
86
  .zn-table-fixed {
56
87
  table-layout: fixed;
57
88
  }
@@ -1,5 +1,9 @@
1
1
  @use "../../scss/mixins";
2
2
 
3
+ .app-navigation {
4
+ --zn-collapsible-header-padding: var(--zn-base-px);
5
+ }
6
+
3
7
  .zn-nav.zn-transparent {
4
8
  background: transparent;
5
9
  }
@@ -88,7 +88,7 @@
88
88
  }
89
89
 
90
90
  &.zn-primary {
91
- color: rgb(var(--zn-primary)) !important;
91
+ color: var(--zn-color-primary-fg, rgb(var(--zn-primary))) !important;
92
92
  }
93
93
 
94
94
  &.zn-accent {
@@ -0,0 +1,206 @@
1
+ @use "mixins";
2
+
3
+ .table__tabs {
4
+ position: relative;
5
+ display: flex;
6
+ gap: var(--zn-spacing-x-small);
7
+ padding: 0 var(--zn-table-edge-padding, var(--zn-spacing-medium));
8
+ border-bottom: 1px solid rgb(var(--zn-border-color));
9
+ overflow-x: auto;
10
+ }
11
+
12
+ // Shares zn-navbar's indicator timing tokens so a theme tunes both together
13
+ .table__tabs__indicator {
14
+ position: absolute;
15
+ left: 0;
16
+ right: 100%;
17
+ bottom: 0;
18
+ height: 2px;
19
+ background-color: rgb(var(--zn-primary));
20
+ opacity: 0;
21
+ pointer-events: none;
22
+
23
+ --_lead: var(--zn-navbar-tab-indicator-duration, 300ms) var(--zn-navbar-tab-indicator-easing, cubic-bezier(0.4, 0, 0.2, 1)) var(--zn-navbar-tab-indicator-delay, 0ms);
24
+ --_trail: var(--zn-navbar-tab-indicator-trail-duration, var(--zn-navbar-tab-indicator-duration, 300ms)) var(--zn-navbar-tab-indicator-trail-easing, var(--zn-navbar-tab-indicator-easing, cubic-bezier(0.4, 0, 0.2, 1))) var(--zn-navbar-tab-indicator-trail-delay, var(--zn-navbar-tab-indicator-delay, 0ms));
25
+ }
26
+
27
+ .table__tabs__indicator--shown {
28
+ opacity: 1;
29
+ }
30
+
31
+ .table__tabs__indicator--ready {
32
+ transition: left var(--_lead), right var(--_lead);
33
+ }
34
+
35
+ .table__tabs__indicator--ready.table__tabs__indicator--forward {
36
+ transition: right var(--_lead), left var(--_trail);
37
+ }
38
+
39
+ .table__tabs__indicator--ready.table__tabs__indicator--backward {
40
+ transition: left var(--_lead), right var(--_trail);
41
+ }
42
+
43
+ @media (prefers-reduced-motion: reduce) {
44
+ .table__tabs__indicator--ready,
45
+ .table__tabs__indicator--ready.table__tabs__indicator--forward,
46
+ .table__tabs__indicator--ready.table__tabs__indicator--backward {
47
+ transition: none;
48
+ }
49
+ }
50
+
51
+ // Segmented tabs, as zn-navbar[pill]: a grey track with a raised pill that slides to the selected tab
52
+ .table__tabs--pill {
53
+ @include mixins.pill-tab-indicator-motion;
54
+ width: fit-content;
55
+ max-width: calc(100% - 2 * var(--zn-table-edge-padding, var(--zn-spacing-medium)));
56
+ margin: var(--zn-spacing-small) var(--zn-table-edge-padding, var(--zn-spacing-medium));
57
+ padding: 2px;
58
+ gap: 2px;
59
+ border-bottom: 0;
60
+ border-radius: 8px;
61
+ background: var(--zn-color-neutral-100);
62
+
63
+ .table__tabs__indicator {
64
+ top: 2px;
65
+ bottom: 2px;
66
+ height: auto;
67
+ border-radius: 6px;
68
+ background-color: rgb(var(--zn-panel));
69
+ box-shadow: var(--zn-shadow-small, 0 1px 3px rgba(13, 23, 56, 0.08), 0 1px 2px rgba(13, 23, 56, 0.04));
70
+ }
71
+
72
+ .table__tab {
73
+ position: relative;
74
+ z-index: 1;
75
+ min-height: calc(var(--zn-density-control-height, 36px) - 6px);
76
+ padding: 0 12px;
77
+ border-radius: 6px;
78
+ font-size: 12px;
79
+ font-weight: var(--zn-font-weight-semibold);
80
+ }
81
+
82
+ .table__tab:hover:not([disabled]),
83
+ .table__tab--active {
84
+ color: rgb(var(--zn-text));
85
+ }
86
+ }
87
+
88
+ // Native buttons, so each property the shared button mixin sets is reset here. They carry no
89
+ // type attribute: the reset's button[type="button"]:not(.button) would outrank this class.
90
+ .table__tab {
91
+ display: inline-flex;
92
+ align-items: center;
93
+ gap: 6px;
94
+ margin: 0;
95
+ width: auto;
96
+ height: auto;
97
+ max-height: none;
98
+ min-height: 40px;
99
+ padding: 0 var(--zn-spacing-x-small);
100
+ border: 0;
101
+ border-radius: 0;
102
+ background: none;
103
+ box-shadow: none;
104
+ font: inherit;
105
+ // Every tab shares the active weight so switching only changes colour, not label width
106
+ font-weight: var(--zn-font-weight-semibold);
107
+ text-transform: none;
108
+ letter-spacing: normal;
109
+ color: color-mix(in srgb, rgb(var(--zn-text)) 72%, transparent);
110
+ white-space: nowrap;
111
+ cursor: pointer;
112
+
113
+ &:hover:not([disabled]) {
114
+ background: none;
115
+ color: rgb(var(--zn-primary));
116
+ }
117
+
118
+ &:focus {
119
+ outline: none;
120
+ }
121
+
122
+ &:focus-visible {
123
+ outline: 2px solid rgb(var(--zn-primary));
124
+ outline-offset: -4px;
125
+ border-radius: var(--zn-border-radius);
126
+ }
127
+ }
128
+
129
+ .table__tab--active {
130
+ color: rgb(var(--zn-primary));
131
+ }
132
+
133
+ // Circular for a single digit, a pill for longer counts
134
+ .table__tab__count {
135
+ display: inline-flex;
136
+ align-items: center;
137
+ justify-content: center;
138
+ box-sizing: border-box;
139
+ min-width: 20px;
140
+ padding: 0 6px;
141
+ border-radius: 999px;
142
+ background: var(--zn-color-gray-100);
143
+ color: color-mix(in srgb, rgb(var(--zn-text)) 72%, transparent);
144
+ font-size: 0.75em;
145
+ font-weight: var(--zn-font-weight-medium);
146
+ line-height: 18px;
147
+ }
148
+
149
+ .table__head__sort {
150
+ margin: 0;
151
+ padding: 0;
152
+ opacity: 1;
153
+ display: flex;
154
+ flex-direction: column;
155
+ justify-content: center;
156
+ align-items: center;
157
+ cursor: pointer;
158
+ }
159
+
160
+ .table__head__sort--active {
161
+ color: rgb(var(--zn-primary));
162
+ }
163
+
164
+ // Sits on the header's bottom border; the component measures the header into --_head-height
165
+ .table__frame {
166
+ position: relative;
167
+ }
168
+
169
+ .table__loader {
170
+ position: absolute;
171
+ inset: calc(var(--_head-height, 0px) - 2px) 0 auto;
172
+ z-index: 4;
173
+ height: 2px;
174
+ overflow: hidden;
175
+ background-color: color-mix(in srgb, rgb(var(--zn-primary)) 20%, transparent);
176
+
177
+ &::before {
178
+ content: '';
179
+ position: absolute;
180
+ inset-block: 0;
181
+ left: 0;
182
+ width: 40%;
183
+ background-color: rgb(var(--zn-primary));
184
+ @include mixins.sweep(1.2s, -100%, 250%, ease-in-out);
185
+ }
186
+ }
187
+
188
+ // Lit swaps the table, empty state and skeleton for fresh DOM, so each fades in as it arrives
189
+ .table__enter {
190
+ animation: table-enter var(--zn-transition-medium, 250ms) ease-out;
191
+ }
192
+
193
+ @keyframes table-enter {
194
+ from { opacity: 0; }
195
+ }
196
+
197
+ @media (prefers-reduced-motion: reduce) {
198
+ .table__loader::before {
199
+ width: 100%;
200
+ animation: none;
201
+ }
202
+
203
+ .table__enter {
204
+ animation: none;
205
+ }
206
+ }
@@ -263,6 +263,7 @@
263
263
  --zn-shadow-medium: 0 6px 18px rgba(0, 0, 0, 0.24);
264
264
  --zn-shadow-large: 0 6px 20px rgba(0, 0, 0, 0.24);
265
265
  --zn-shadow-x-large: 0 6px 20px rgba(0, 0, 0, 0.34);
266
+ --zn-menu-submenu-shadow: 0 4px 12px rgba(0, 0, 0, 0.30), 0 1px 3px rgba(0, 0, 0, 0.20);
266
267
 
267
268
  /* Inputs */
268
269
  --zn-input-background-color: rgb(var(--zn-color-body));
@@ -285,9 +286,6 @@
285
286
  /* Panels */
286
287
  --zn-panel-background-color: rgb(var(--zn-panel));
287
288
 
288
- /* Tooltips */
289
- --zn-tooltip-background-color: var(--zn-color-neutral-800);
290
-
291
289
  /* tables */
292
290
  --zn-table-header-background-color: 27, 27, 30;
293
291
  }
@@ -1,6 +1,6 @@
1
1
  @use "light";
2
2
  @use "dark";
3
- @use "aura";
3
+ @use "openbyte";
4
4
  @use "spacing";
5
5
  @use "typography";
6
6
  @use "utility";