@ethlete/components 0.1.0-next.9 → 1.0.0-next.101

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 (579) hide show
  1. package/CHANGELOG.md +3519 -0
  2. package/README.md +1 -1
  3. package/design/accordion.ts +73 -0
  4. package/design/anchored-dialog.ts +102 -0
  5. package/design/avatar.ts +90 -0
  6. package/design/badge.ts +48 -0
  7. package/design/banner.ts +77 -0
  8. package/design/bracket.ts +457 -0
  9. package/design/breadcrumb.ts +144 -0
  10. package/design/button.ts +116 -0
  11. package/design/calendar.ts +306 -0
  12. package/design/card.ts +92 -0
  13. package/design/carousel.ts +240 -0
  14. package/design/chart.ts +512 -0
  15. package/design/checkbox.ts +275 -0
  16. package/design/chip.ts +64 -0
  17. package/design/config.json +26 -0
  18. package/design/control.ts +19 -0
  19. package/design/copy-button.ts +59 -0
  20. package/design/description-list.ts +41 -0
  21. package/design/dialog.ts +210 -0
  22. package/design/divider.ts +27 -0
  23. package/design/empty-state.ts +45 -0
  24. package/design/floating-action.ts +55 -0
  25. package/design/form-field.ts +256 -0
  26. package/design/grid.ts +148 -0
  27. package/design/icon-set.ts +19 -0
  28. package/design/icon.ts +9 -0
  29. package/design/input.ts +86 -0
  30. package/design/kbd.ts +19 -0
  31. package/design/loader.ts +156 -0
  32. package/design/masonry.ts +115 -0
  33. package/design/match.ts +131 -0
  34. package/design/menu.ts +149 -0
  35. package/design/notification.ts +132 -0
  36. package/design/otp-input.ts +107 -0
  37. package/design/pagination.ts +120 -0
  38. package/design/picture.ts +80 -0
  39. package/design/progress-steps.ts +79 -0
  40. package/design/query-error.ts +60 -0
  41. package/design/radio-group.ts +132 -0
  42. package/design/scheduler.ts +369 -0
  43. package/design/scrollable.ts +219 -0
  44. package/design/scrollbar.ts +47 -0
  45. package/design/sdk/assets/fallback.svg +1 -0
  46. package/design/sdk/assets/fonts/et-kbd-arrows-400-normal.woff2 +0 -0
  47. package/design/sdk/assets/fonts/et-kbd-control-400-normal.woff2 +0 -0
  48. package/design/sdk/assets/fonts/et-kbd-keys-400-normal.woff2 +0 -0
  49. package/design/sdk/assets/fonts/source-code-pro-latin-wght-normal.woff2 +0 -0
  50. package/design/sdk/assets/fonts/source-sans-3-latin-wght-normal.woff2 +0 -0
  51. package/design/sdk/assets/tall.svg +1 -0
  52. package/design/sdk/assets/wide.svg +1 -0
  53. package/design/sdk/components/accent-on-light/accent-on-light.css +35 -0
  54. package/design/sdk/components/accent-on-light/accent-on-light.ts +15 -0
  55. package/design/sdk/components/accent-on-light/shared/controls.ts +46 -0
  56. package/design/sdk/components/accordion/accordion.css +17 -0
  57. package/design/sdk/components/accordion/accordion.ts +79 -0
  58. package/design/sdk/components/action-sheet/action-sheet.css +124 -0
  59. package/design/sdk/components/action-sheet/action-sheet.ts +131 -0
  60. package/design/sdk/components/anchored-dialog/anchored-dialog.css +60 -0
  61. package/design/sdk/components/anchored-dialog/anchored-dialog.ts +89 -0
  62. package/design/sdk/components/avatar/avatar.css +14 -0
  63. package/design/sdk/components/avatar/avatar.ts +95 -0
  64. package/design/sdk/components/badge/badge.css +31 -0
  65. package/design/sdk/components/badge/badge.ts +89 -0
  66. package/design/sdk/components/banner/banner.css +18 -0
  67. package/design/sdk/components/banner/banner.ts +160 -0
  68. package/design/sdk/components/bracket/bracket.css +56 -0
  69. package/design/sdk/components/bracket/bracket.ts +183 -0
  70. package/design/sdk/components/breadcrumb/breadcrumb.css +25 -0
  71. package/design/sdk/components/breadcrumb/breadcrumb.ts +96 -0
  72. package/design/sdk/components/button/button.css +19 -0
  73. package/design/sdk/components/button/button.ts +201 -0
  74. package/design/sdk/components/calendar/calendar.css +33 -0
  75. package/design/sdk/components/calendar/calendar.ts +183 -0
  76. package/design/sdk/components/card/card.css +19 -0
  77. package/design/sdk/components/card/card.ts +111 -0
  78. package/design/sdk/components/carousel/carousel.css +44 -0
  79. package/design/sdk/components/carousel/carousel.ts +162 -0
  80. package/design/sdk/components/chart/chart.css +56 -0
  81. package/design/sdk/components/chart/chart.ts +146 -0
  82. package/design/sdk/components/checkbox/checkbox.css +10 -0
  83. package/design/sdk/components/checkbox/checkbox.ts +223 -0
  84. package/design/sdk/components/chip/chip.css +18 -0
  85. package/design/sdk/components/chip/chip.ts +99 -0
  86. package/design/sdk/components/copy-button/copy-button.css +14 -0
  87. package/design/sdk/components/copy-button/copy-button.ts +77 -0
  88. package/design/sdk/components/description-list/description-list.css +7 -0
  89. package/design/sdk/components/description-list/description-list.ts +64 -0
  90. package/design/sdk/components/dialog/dialog.css +29 -0
  91. package/design/sdk/components/dialog/dialog.ts +173 -0
  92. package/design/sdk/components/divider/divider.css +26 -0
  93. package/design/sdk/components/divider/divider.ts +49 -0
  94. package/design/sdk/components/empty-state/empty-state.css +39 -0
  95. package/design/sdk/components/empty-state/empty-state.ts +67 -0
  96. package/design/sdk/components/floating-action/floating-action.css +51 -0
  97. package/design/sdk/components/floating-action/floating-action.ts +78 -0
  98. package/design/sdk/components/form-field/form-field.ts +204 -0
  99. package/design/sdk/components/grid/grid.css +17 -0
  100. package/design/sdk/components/grid/grid.ts +96 -0
  101. package/design/sdk/components/input/input.css +48 -0
  102. package/design/sdk/components/input/input.ts +156 -0
  103. package/design/sdk/components/kbd/kbd.css +25 -0
  104. package/design/sdk/components/kbd/kbd.ts +70 -0
  105. package/design/sdk/components/loader/loader.css +37 -0
  106. package/design/sdk/components/loader/loader.ts +79 -0
  107. package/design/sdk/components/masonry/masonry.css +7 -0
  108. package/design/sdk/components/masonry/masonry.ts +50 -0
  109. package/design/sdk/components/match/match.css +22 -0
  110. package/design/sdk/components/match/match.ts +95 -0
  111. package/design/sdk/components/menu/menu.css +22 -0
  112. package/design/sdk/components/menu/menu.ts +120 -0
  113. package/design/sdk/components/notification/notification.css +32 -0
  114. package/design/sdk/components/notification/notification.ts +117 -0
  115. package/design/sdk/components/otp-input/otp-input.css +35 -0
  116. package/design/sdk/components/otp-input/otp-input.ts +94 -0
  117. package/design/sdk/components/pagination/pagination.css +14 -0
  118. package/design/sdk/components/pagination/pagination.ts +97 -0
  119. package/design/sdk/components/picture/picture.css +37 -0
  120. package/design/sdk/components/picture/picture.ts +112 -0
  121. package/design/sdk/components/progress-steps/progress-steps.css +37 -0
  122. package/design/sdk/components/progress-steps/progress-steps.ts +109 -0
  123. package/design/sdk/components/query-error/query-error.css +27 -0
  124. package/design/sdk/components/query-error/query-error.ts +167 -0
  125. package/design/sdk/components/radio-group/radio-group.css +10 -0
  126. package/design/sdk/components/radio-group/radio-group.ts +209 -0
  127. package/design/sdk/components/scheduler/scheduler.css +49 -0
  128. package/design/sdk/components/scheduler/scheduler.ts +267 -0
  129. package/design/sdk/components/scrollable/scrollable.css +58 -0
  130. package/design/sdk/components/scrollable/scrollable.ts +198 -0
  131. package/design/sdk/components/scrollbar/scrollbar.css +78 -0
  132. package/design/sdk/components/scrollbar/scrollbar.ts +152 -0
  133. package/design/sdk/components/select/select.css +5 -0
  134. package/design/sdk/components/select/select.ts +42 -0
  135. package/design/sdk/components/select/shared/select-part.ts +80 -0
  136. package/design/sdk/components/select-panel/select-panel.css +3 -0
  137. package/design/sdk/components/select-panel/select-panel.ts +144 -0
  138. package/design/sdk/components/skeleton/skeleton.css +22 -0
  139. package/design/sdk/components/skeleton/skeleton.ts +58 -0
  140. package/design/sdk/components/slider/slider.css +47 -0
  141. package/design/sdk/components/slider/slider.ts +133 -0
  142. package/design/sdk/components/standings/standings.css +32 -0
  143. package/design/sdk/components/standings/standings.ts +146 -0
  144. package/design/sdk/components/stat-tile/stat-tile.css +15 -0
  145. package/design/sdk/components/stat-tile/stat-tile.ts +97 -0
  146. package/design/sdk/components/stream/stream.css +42 -0
  147. package/design/sdk/components/stream/stream.ts +63 -0
  148. package/design/sdk/components/switch/switch.ts +94 -0
  149. package/design/sdk/components/table/table.css +67 -0
  150. package/design/sdk/components/table/table.ts +320 -0
  151. package/design/sdk/components/tabs/tabs.css +13 -0
  152. package/design/sdk/components/tabs/tabs.ts +95 -0
  153. package/design/sdk/components/textarea/textarea.css +90 -0
  154. package/design/sdk/components/textarea/textarea.ts +154 -0
  155. package/design/sdk/components/timeline/timeline.css +30 -0
  156. package/design/sdk/components/timeline/timeline.ts +98 -0
  157. package/design/sdk/components/toolbar/toolbar.css +24 -0
  158. package/design/sdk/components/toolbar/toolbar.ts +104 -0
  159. package/design/sdk/components/tooltip/tooltip.css +15 -0
  160. package/design/sdk/components/tooltip/tooltip.ts +39 -0
  161. package/design/sdk/components/tree/selected-tint.css +15 -0
  162. package/design/sdk/components/tree/tree.ts +89 -0
  163. package/design/sdk/fixtures.ts +0 -0
  164. package/design/sdk/foundations/colors/colors.css +602 -0
  165. package/design/sdk/foundations/colors/colors.ts +218 -0
  166. package/design/sdk/foundations/colors/faces.css +75 -0
  167. package/design/sdk/foundations/colors/overrides.json +19 -0
  168. package/design/sdk/foundations/colors/shared/contrast.ts +105 -0
  169. package/design/sdk/foundations/elevation/elevation.css +6 -0
  170. package/design/sdk/foundations/elevation/elevation.ts +18 -0
  171. package/design/sdk/foundations/elevation/shared/elevation/scene.css +106 -0
  172. package/design/sdk/foundations/elevation/shared/elevation/scene.ts +74 -0
  173. package/design/sdk/foundations/icons/icons.ts +125 -0
  174. package/design/sdk/lint-baseline.json +6 -0
  175. package/design/sdk/ready.json +488 -0
  176. package/design/sdk/rule-baseline.json +48 -0
  177. package/design/select.ts +199 -0
  178. package/design/skeleton.ts +67 -0
  179. package/design/slider.ts +155 -0
  180. package/design/standings.ts +166 -0
  181. package/design/stat-tile.ts +109 -0
  182. package/design/stream.ts +92 -0
  183. package/design/switch.ts +83 -0
  184. package/design/table.ts +309 -0
  185. package/design/tabs.ts +75 -0
  186. package/design/textarea.ts +94 -0
  187. package/design/timeline.ts +52 -0
  188. package/design/toggletip.ts +85 -0
  189. package/design/toolbar.ts +95 -0
  190. package/design/tooltip.ts +95 -0
  191. package/design/tree.ts +106 -0
  192. package/fesm2022/ethlete-components-testing.mjs +440 -0
  193. package/fesm2022/ethlete-components-testing.mjs.map +1 -0
  194. package/fesm2022/ethlete-components.mjs +115628 -12455
  195. package/fesm2022/ethlete-components.mjs.map +1 -1
  196. package/generators/component/component-names.js +42 -0
  197. package/generators/component/component-templates.js +211 -0
  198. package/generators/component/generator.js +144 -0
  199. package/generators/component/schema.json +109 -0
  200. package/generators/component/workspace-edits.js +92 -0
  201. package/generators/generators.json +126 -0
  202. package/generators/icons/generator.js +231 -0
  203. package/generators/icons/schema.json +35 -0
  204. package/generators/migrate-bracket-default-cards/bracket-default-cards.js +67 -0
  205. package/generators/migrate-bracket-default-cards/migration.js +63 -0
  206. package/generators/migrate-bracket-default-cards/schema.json +26 -0
  207. package/generators/migrate-bracket-ethlete-renames/bracket-ethlete-renames.js +15 -0
  208. package/generators/migrate-bracket-ethlete-renames/migration.js +31 -0
  209. package/generators/migrate-bracket-ethlete-renames/schema.json +26 -0
  210. package/generators/migrate-cascader-tree-internals/cascader-tree-internals.js +6 -0
  211. package/generators/migrate-cascader-tree-internals/migration.js +11 -0
  212. package/generators/migrate-cascader-tree-internals/schema.json +26 -0
  213. package/generators/migrate-chart-baseline-y/chart-baseline-y.js +10 -0
  214. package/generators/migrate-chart-baseline-y/migration.js +41 -0
  215. package/generators/migrate-chart-baseline-y/schema.json +26 -0
  216. package/generators/migrate-duration-format-internals/duration-format-internals.js +6 -0
  217. package/generators/migrate-duration-format-internals/migration.js +11 -0
  218. package/generators/migrate-duration-format-internals/schema.json +26 -0
  219. package/generators/migrate-error-color-theme-signal/error-color-theme-signal.js +37 -0
  220. package/generators/migrate-error-color-theme-signal/migration.js +55 -0
  221. package/generators/migrate-error-color-theme-signal/schema.json +26 -0
  222. package/generators/migrate-grid-engine-internals/grid-engine-internals.js +43 -0
  223. package/generators/migrate-grid-engine-internals/migration.js +11 -0
  224. package/generators/migrate-grid-engine-internals/schema.json +26 -0
  225. package/generators/migrate-line-chart-stacked-area-mix/line-chart-stacked-area-mix.js +48 -0
  226. package/generators/migrate-line-chart-stacked-area-mix/migration.js +35 -0
  227. package/generators/migrate-line-chart-stacked-area-mix/schema.json +26 -0
  228. package/generators/migrate-loader-determinate/loader-determinate.js +87 -0
  229. package/generators/migrate-loader-determinate/migration.js +49 -0
  230. package/generators/migrate-loader-determinate/schema.json +26 -0
  231. package/generators/migrate-overlay-and-column-api/column-visibility-host.js +102 -0
  232. package/generators/migrate-overlay-and-column-api/migration.js +39 -0
  233. package/generators/migrate-overlay-and-column-api/overlay-and-column-api.js +18 -0
  234. package/generators/migrate-overlay-and-column-api/overlay-result.js +399 -0
  235. package/generators/migrate-overlay-and-column-api/schema.json +26 -0
  236. package/generators/migrate-overlay-and-column-api/source-scan.js +171 -0
  237. package/generators/migrate-overlay-fullscreen-animation/migration.js +11 -0
  238. package/generators/migrate-overlay-fullscreen-animation/overlay-fullscreen-animation.js +16 -0
  239. package/generators/migrate-overlay-fullscreen-animation/schema.json +26 -0
  240. package/generators/migrate-overlay-nav-tab-imports/migration.js +35 -0
  241. package/generators/migrate-overlay-nav-tab-imports/overlay-nav-tab-imports.js +25 -0
  242. package/generators/migrate-overlay-nav-tab-imports/schema.json +26 -0
  243. package/generators/migrate-pip-window-z-index/migration.js +85 -0
  244. package/generators/migrate-pip-window-z-index/pip-window-z-index.js +60 -0
  245. package/generators/migrate-pip-window-z-index/schema.json +26 -0
  246. package/generators/migrate-query-error-labels/migration-scope.js +30 -0
  247. package/generators/migrate-query-error-labels/migration.js +58 -0
  248. package/generators/migrate-query-error-labels/query-error-labels.js +30 -0
  249. package/generators/migrate-query-error-labels/schema.json +26 -0
  250. package/generators/migrate-rich-text-editor-floating-toolbar/migration.js +57 -0
  251. package/generators/migrate-rich-text-editor-floating-toolbar/rich-text-editor-floating-toolbar.js +28 -0
  252. package/generators/migrate-rich-text-editor-floating-toolbar/schema.json +26 -0
  253. package/generators/migrate-rich-text-editor-link-editor/migration.js +57 -0
  254. package/generators/migrate-rich-text-editor-link-editor/rich-text-editor-link-editor.js +28 -0
  255. package/generators/migrate-rich-text-editor-link-editor/schema.json +26 -0
  256. package/generators/migrate-rich-text-editor-tools/migration.js +64 -0
  257. package/generators/migrate-rich-text-editor-tools/rich-text-editor-tools.js +36 -0
  258. package/generators/migrate-rich-text-editor-tools/schema.json +26 -0
  259. package/generators/migrate-select-input-renames/migration.js +41 -0
  260. package/generators/migrate-select-input-renames/schema.json +26 -0
  261. package/generators/migrate-select-input-renames/select-input-renames.js +37 -0
  262. package/generators/migrate-stream-default-components/migration.js +86 -0
  263. package/generators/migrate-stream-default-components/schema.json +26 -0
  264. package/generators/migrate-stream-default-components/stream-default-components.js +111 -0
  265. package/generators/migrate-tabs-active-underline/migration.js +31 -0
  266. package/generators/migrate-tabs-active-underline/schema.json +26 -0
  267. package/generators/migrate-tabs-active-underline/tabs-active-underline.js +46 -0
  268. package/generators/migrate-time-picker-ring/migration.js +17 -0
  269. package/generators/migrate-time-picker-ring/schema.json +26 -0
  270. package/generators/migrate-time-picker-ring/time-picker-ring.js +25 -0
  271. package/generators/migrate-youtube-player-slot-directive/migration.js +11 -0
  272. package/generators/migrate-youtube-player-slot-directive/schema.json +26 -0
  273. package/generators/migrate-youtube-player-slot-directive/youtube-player-slot-directive.js +12 -0
  274. package/generators/removed-exports/removed-exports.js +154 -0
  275. package/generators/removed-exports/run-removed-exports-migration.js +48 -0
  276. package/migrations/components-sdk-layer.md +55 -0
  277. package/migrations.json +211 -0
  278. package/package.json +47 -17
  279. package/src/lib/accordion/accordion-group.component.css +12 -0
  280. package/src/lib/accordion/accordion.component.css +236 -0
  281. package/src/lib/avatar/avatar-group.component.css +31 -0
  282. package/src/lib/avatar/avatar.component.css +90 -0
  283. package/src/lib/badge/badge.component.css +118 -0
  284. package/src/lib/banner/banner.component.css +102 -0
  285. package/src/lib/bracket/bracket-default-continue.component.css +29 -0
  286. package/src/lib/bracket/bracket-default-final-match.component.css +76 -0
  287. package/src/lib/bracket/bracket-default-match.component.css +21 -0
  288. package/src/lib/bracket/bracket-default-round-header.component.css +36 -0
  289. package/src/lib/bracket/bracket-default-section-title.component.css +14 -0
  290. package/src/lib/bracket/bracket-participants.component.css +13 -0
  291. package/src/lib/bracket/bracket-pick-card.component.css +232 -0
  292. package/src/lib/bracket/bracket-rounds-list.component.css +75 -0
  293. package/src/lib/bracket/bracket-skeleton.component.css +55 -0
  294. package/src/lib/bracket/bracket.component.css +123 -0
  295. package/src/lib/bracket/layouts/swiss/bracket-swiss-round-header.component.css +65 -0
  296. package/src/lib/bracket/layouts/swiss/bracket-swiss-styles.component.css +14 -0
  297. package/src/lib/breadcrumb/breadcrumb-outlet.component.css +5 -0
  298. package/src/lib/breadcrumb/breadcrumb-overflow.component.css +38 -0
  299. package/src/lib/breadcrumb/breadcrumb.component.css +126 -0
  300. package/src/lib/button/button-properties-styles.component.css +195 -0
  301. package/src/lib/button/button.component.css +259 -0
  302. package/src/lib/button/button.types.ts +33 -0
  303. package/src/lib/button/fab.component.css +257 -0
  304. package/src/lib/button/icon-button.component.css +152 -0
  305. package/src/lib/button/split-button.component.css +103 -0
  306. package/src/lib/button/text-button.component.css +142 -0
  307. package/src/lib/button/window-control-button.component.css +214 -0
  308. package/src/lib/calendar/calendar-coarse-grid-styles.component.css +29 -0
  309. package/src/lib/calendar/calendar-comparison-band-styles.component.css +36 -0
  310. package/src/lib/calendar/calendar-week-numbers-styles.component.css +32 -0
  311. package/src/lib/calendar/calendar.component.css +374 -0
  312. package/src/lib/card/card.component.css +43 -0
  313. package/src/lib/carousel/carousel-autoplay-styles.component.css +171 -0
  314. package/src/lib/carousel/carousel-transition-styles.component.css +179 -0
  315. package/src/lib/carousel/carousel.component.css +220 -0
  316. package/src/lib/chart/bar-chart.component.css +176 -0
  317. package/src/lib/chart/chart-axis.component.css +40 -0
  318. package/src/lib/chart/chart-grid.component.css +6 -0
  319. package/src/lib/chart/chart-legend.component.css +46 -0
  320. package/src/lib/chart/chart-tooltip.component.css +34 -0
  321. package/src/lib/chart/line-chart-tooltip.component.css +51 -0
  322. package/src/lib/chart/line-chart.component.css +234 -0
  323. package/src/lib/chart/pie-chart.component.css +176 -0
  324. package/src/lib/chart/sankey-chart.component.css +221 -0
  325. package/src/lib/chip/chip.component.css +161 -0
  326. package/src/lib/collapse/collapse.component.css +43 -0
  327. package/src/lib/command-palette/command-palette-item.component.css +98 -0
  328. package/src/lib/command-palette/command-palette.component.css +148 -0
  329. package/src/lib/description-list/description-list.component.css +78 -0
  330. package/src/lib/divider/divider.component.css +40 -0
  331. package/src/lib/empty-state/empty-state.component.css +79 -0
  332. package/src/lib/floating-action/floating-action-styles.component.css +105 -0
  333. package/src/lib/focus-ring/focus-ring-styles.component.css +31 -0
  334. package/src/lib/forms/cascader/cascader-breadcrumb-styles.component.css +98 -0
  335. package/src/lib/forms/cascader/cascader-panel.component.css +390 -0
  336. package/src/lib/forms/cascader/cascader-sheet-styles.component.css +241 -0
  337. package/src/lib/forms/cascader/cascader.component.css +52 -0
  338. package/src/lib/forms/checkbox/checkbox.component.css +278 -0
  339. package/src/lib/forms/choice-field/choice-field-card-styles.component.css +66 -0
  340. package/src/lib/forms/choice-field/choice-field.component.css +227 -0
  341. package/src/lib/forms/color-input/color-input.component.css +109 -0
  342. package/src/lib/forms/color-input/color-picker-panel.component.css +354 -0
  343. package/src/lib/forms/date-time/date-input/date-input.component.css +35 -0
  344. package/src/lib/forms/date-time/date-picker-panel.component.css +118 -0
  345. package/src/lib/forms/date-time/date-range-input/date-range-input.component.css +16 -0
  346. package/src/lib/forms/date-time/date-range-presets.component.css +60 -0
  347. package/src/lib/forms/date-time/date-time-input/date-time-input.component.css +151 -0
  348. package/src/lib/forms/date-time/date-time-range-input/date-time-range-input.component.css +121 -0
  349. package/src/lib/forms/date-time/duration-input/duration-input.component.css +88 -0
  350. package/src/lib/forms/date-time/range-input-shell-styles.component.css +55 -0
  351. package/src/lib/forms/date-time/time-input/time-input.component.css +35 -0
  352. package/src/lib/forms/date-time/time-range-input/time-range-input.component.css +16 -0
  353. package/src/lib/forms/description/description.component.css +7 -0
  354. package/src/lib/forms/dropzone/dropzone-crop.component.css +139 -0
  355. package/src/lib/forms/dropzone/dropzone-item.component.css +67 -0
  356. package/src/lib/forms/dropzone/dropzone-preview-styles.component.css +83 -0
  357. package/src/lib/forms/dropzone/dropzone-readonly-styles.component.css +34 -0
  358. package/src/lib/forms/dropzone/dropzone-row-styles.component.css +85 -0
  359. package/src/lib/forms/dropzone/dropzone.component.css +291 -0
  360. package/src/lib/forms/form-field/counter.component.css +25 -0
  361. package/src/lib/forms/form-field/form-field-control-suffix-styles.component.css +174 -0
  362. package/src/lib/forms/form-field/form-field-rich-text-styles.component.css +31 -0
  363. package/src/lib/forms/form-field/form-field-suffix-overlap-styles.component.css +93 -0
  364. package/src/lib/forms/form-field/form-field-text-shell-styles.component.css +396 -0
  365. package/src/lib/forms/form-field/form-field-textarea-styles.component.css +94 -0
  366. package/src/lib/forms/form-field/form-field.component.css +381 -0
  367. package/src/lib/forms/form-field/form-support-styles.component.css +102 -0
  368. package/src/lib/forms/form-field/headless/label.directive.css +25 -0
  369. package/src/lib/forms/form-field/hint.component.css +18 -0
  370. package/src/lib/forms/input/input.component.css +53 -0
  371. package/src/lib/forms/input/number-input.component.css +128 -0
  372. package/src/lib/forms/input/password-input.component.css +103 -0
  373. package/src/lib/forms/multi-language-rich-text-editor/multi-language-rich-text-editor.component.css +8 -0
  374. package/src/lib/forms/multi-language-rich-text-editor/tools/multi-language-rich-text-editor-language-tool.component.css +101 -0
  375. package/src/lib/forms/otp-input/otp-input.component.css +218 -0
  376. package/src/lib/forms/phone-input/phone-input.component.css +126 -0
  377. package/src/lib/forms/rating/rating.component.css +197 -0
  378. package/src/lib/forms/rich-text-editor/rich-text-content-styles.component.css +234 -0
  379. package/src/lib/forms/rich-text-editor/rich-text-editor-floating-toolbar.component.css +95 -0
  380. package/src/lib/forms/rich-text-editor/rich-text-editor-image-editor.component.css +172 -0
  381. package/src/lib/forms/rich-text-editor/rich-text-editor-link-editor.component.css +149 -0
  382. package/src/lib/forms/rich-text-editor/rich-text-editor-token-palette.component.css +18 -0
  383. package/src/lib/forms/rich-text-editor/rich-text-editor-token-popup.component.css +206 -0
  384. package/src/lib/forms/rich-text-editor/rich-text-editor.component.css +175 -0
  385. package/src/lib/forms/rich-text-editor/rich-text-viewer.component.css +6 -0
  386. package/src/lib/forms/rich-text-editor/tools/rich-text-editor-align-tool.component.css +5 -0
  387. package/src/lib/forms/rich-text-editor/tools/rich-text-editor-heading-tool.component.css +5 -0
  388. package/src/lib/forms/rich-text-editor/tools/rich-text-editor-image-styles.component.css +109 -0
  389. package/src/lib/forms/rich-text-editor/tools/rich-text-editor-table-styles.component.css +21 -0
  390. package/src/lib/forms/rich-text-editor/tools/rich-text-editor-table-tool.component.css +44 -0
  391. package/src/lib/forms/select/select-all-option.component.css +14 -0
  392. package/src/lib/forms/select/select-extras-styles.component.css +146 -0
  393. package/src/lib/forms/select/select-option-group.component.css +36 -0
  394. package/src/lib/forms/select/select-option-styles.component.css +167 -0
  395. package/src/lib/forms/select/select-panel.component.css +122 -0
  396. package/src/lib/forms/select/select.component.css +247 -0
  397. package/src/lib/forms/selection-card-styles.component.css +144 -0
  398. package/src/lib/forms/selection-list/checkbox-group/checkbox-group-select-all.component.css +98 -0
  399. package/src/lib/forms/selection-list/checkbox-group/checkbox-group.component.css +142 -0
  400. package/src/lib/forms/selection-list/checkbox-group/checkbox-option.component.css +162 -0
  401. package/src/lib/forms/selection-list/radio-group/radio-group.component.css +134 -0
  402. package/src/lib/forms/selection-list/radio-group/radio.component.css +144 -0
  403. package/src/lib/forms/selection-list/segmented-button-group/segmented-button-group.component.css +213 -0
  404. package/src/lib/forms/selection-list/segmented-button-group/segmented-button.component.css +200 -0
  405. package/src/lib/forms/slider/range-slider.component.css +434 -0
  406. package/src/lib/forms/slider/slider.component.css +428 -0
  407. package/src/lib/forms/switch/switch.component.css +214 -0
  408. package/src/lib/forms/tag-input/tag-input.component.css +54 -0
  409. package/src/lib/forms/textarea/textarea-autosize-styles.component.css +16 -0
  410. package/src/lib/forms/textarea/textarea.component.css +45 -0
  411. package/src/lib/grid/grid-debug.component.css +130 -0
  412. package/src/lib/grid/grid-item-default-actions.component.css +11 -0
  413. package/src/lib/grid/grid-item-toolbar.component.css +10 -0
  414. package/src/lib/grid/grid-item.component.css +176 -0
  415. package/src/lib/grid/grid.component.css +56 -0
  416. package/src/lib/icon/headless/align-icons.ts +30 -0
  417. package/src/lib/icon/headless/arrow-out-up-right-icon.ts +17 -0
  418. package/src/lib/icon/headless/arrow-right-icon.ts +23 -0
  419. package/src/lib/icon/headless/arrow-up-icon.ts +30 -0
  420. package/src/lib/icon/headless/arrows-left-right-icon.ts +31 -0
  421. package/src/lib/icon/headless/bold-icon.ts +11 -0
  422. package/src/lib/icon/headless/calendar-icon.ts +21 -0
  423. package/src/lib/icon/headless/check-icon.ts +14 -0
  424. package/src/lib/icon/headless/chevron-icon.ts +14 -0
  425. package/src/lib/icon/headless/circle-check-icon.ts +14 -0
  426. package/src/lib/icon/headless/circle-info-icon.ts +14 -0
  427. package/src/lib/icon/headless/clipboard-check-icon.ts +28 -0
  428. package/src/lib/icon/headless/clock-icon.ts +21 -0
  429. package/src/lib/icon/headless/code-block-icon.ts +15 -0
  430. package/src/lib/icon/headless/code-icon.ts +14 -0
  431. package/src/lib/icon/headless/ellipsis-icon.ts +13 -0
  432. package/src/lib/icon/headless/ellipsis-vertical-icon.ts +13 -0
  433. package/src/lib/icon/headless/eye-icons.ts +27 -0
  434. package/src/lib/icon/headless/eyedropper-icon.ts +22 -0
  435. package/src/lib/icon/headless/file-icon.ts +16 -0
  436. package/src/lib/icon/headless/filter-icon.ts +11 -0
  437. package/src/lib/icon/headless/floppy-disk-icon.ts +27 -0
  438. package/src/lib/icon/headless/focus-frame-icon.ts +16 -0
  439. package/src/lib/icon/headless/grid-2x2-icon.ts +17 -0
  440. package/src/lib/icon/headless/heading-1-icon.ts +11 -0
  441. package/src/lib/icon/headless/heading-2-icon.ts +11 -0
  442. package/src/lib/icon/headless/heading-3-icon.ts +11 -0
  443. package/src/lib/icon/headless/icon-definition.ts +14 -0
  444. package/src/lib/icon/headless/icon-styles.component.css +7 -0
  445. package/src/lib/icon/headless/image-icon.ts +14 -0
  446. package/src/lib/icon/headless/italic-icon.ts +19 -0
  447. package/src/lib/icon/headless/link-icon.ts +17 -0
  448. package/src/lib/icon/headless/list-bulleted-icon.ts +14 -0
  449. package/src/lib/icon/headless/list-numbered-icon.ts +14 -0
  450. package/src/lib/icon/headless/location-icon.ts +21 -0
  451. package/src/lib/icon/headless/lock-icon.ts +14 -0
  452. package/src/lib/icon/headless/minus-icon.ts +14 -0
  453. package/src/lib/icon/headless/paragraph-icon.ts +11 -0
  454. package/src/lib/icon/headless/pause-icon.ts +11 -0
  455. package/src/lib/icon/headless/pencil-icon.ts +21 -0
  456. package/src/lib/icon/headless/play-icon.ts +10 -0
  457. package/src/lib/icon/headless/plus-icon.ts +21 -0
  458. package/src/lib/icon/headless/quote-icon.ts +15 -0
  459. package/src/lib/icon/headless/rotate-right-icon.ts +16 -0
  460. package/src/lib/icon/headless/star-icon.ts +14 -0
  461. package/src/lib/icon/headless/strikethrough-icon.ts +18 -0
  462. package/src/lib/icon/headless/table-icon.ts +15 -0
  463. package/src/lib/icon/headless/thumbtack-icon.ts +18 -0
  464. package/src/lib/icon/headless/times-icon.ts +14 -0
  465. package/src/lib/icon/headless/trash-icon.ts +24 -0
  466. package/src/lib/icon/headless/triangle-exclamation-icon.ts +14 -0
  467. package/src/lib/icon/headless/trophy-icon.ts +24 -0
  468. package/src/lib/icon/headless/underline-icon.ts +12 -0
  469. package/src/lib/icon/headless/undo-redo-icons.ts +24 -0
  470. package/src/lib/icon/headless/upload-icon.ts +16 -0
  471. package/src/lib/kbd/kbd.component.css +62 -0
  472. package/src/lib/loader/brand-loader/brand-loader.component.css +133 -0
  473. package/src/lib/loader/progress-bar/progress-bar.component.css +186 -0
  474. package/src/lib/loader/spinner/spinner-styles.component.css +225 -0
  475. package/src/lib/loader/spinner/spinner-sweep-dashes.ts +19 -0
  476. package/src/lib/masonry/masonry-styles.component.css +84 -0
  477. package/src/lib/match/match-card.component.css +545 -0
  478. package/src/lib/match/match-participant.component.css +236 -0
  479. package/src/lib/match/match-score.component.css +77 -0
  480. package/src/lib/match/match-scoreline.component.css +53 -0
  481. package/src/lib/match/match-time.component.css +5 -0
  482. package/src/lib/menu/menu-group-label.component.css +12 -0
  483. package/src/lib/menu/menu-item-shortcut.component.css +26 -0
  484. package/src/lib/menu/menu-item-submenu-icon.component.css +18 -0
  485. package/src/lib/menu/menu-item.component.css +36 -0
  486. package/src/lib/menu/menu-search-styles.component.css +83 -0
  487. package/src/lib/menu/menu-selection-item.component.css +92 -0
  488. package/src/lib/menu/menu-separator.component.css +9 -0
  489. package/src/lib/menu/menu.component.css +310 -0
  490. package/src/lib/notification/notification-stack.component.css +114 -0
  491. package/src/lib/notification/notification.component.css +275 -0
  492. package/src/lib/overlay/alert-dialog/alert-dialog.component.css +55 -0
  493. package/src/lib/overlay/floating-panel-styles.component.css +71 -0
  494. package/src/lib/overlay/floating-tip-styles.component.css +84 -0
  495. package/src/lib/overlay/overlay-container.component.css +173 -0
  496. package/src/lib/overlay/overlay-main-styles.component.css +105 -0
  497. package/src/lib/overlay/overlay-template-host.component.css +7 -0
  498. package/src/lib/overlay/routing/overlay-route-header-template-outlet.component.css +36 -0
  499. package/src/lib/overlay/routing/overlay-router-outlet.component.css +215 -0
  500. package/src/lib/overlay/routing/overlay-shared-route-template-outlet.component.css +5 -0
  501. package/src/lib/overlay/sidebar/overlay-sidebar.component.css +23 -0
  502. package/src/lib/overlay/strategies/anchored-dialog-styles.component.css +78 -0
  503. package/src/lib/overlay/strategies/dialog-styles.component.css +77 -0
  504. package/src/lib/overlay/strategies/full-screen-dialog-styles.component.css +141 -0
  505. package/src/lib/overlay/strategies/overlay-arrow-styles.component.css +112 -0
  506. package/src/lib/overlay/strategies/overlay-origin-clone.component.css +92 -0
  507. package/src/lib/overlay/strategies/sheet-styles.component.css +170 -0
  508. package/src/lib/pagination/page-size-select.component.css +6 -0
  509. package/src/lib/pagination/pagination.component.css +185 -0
  510. package/src/lib/picture/picture.component.css +82 -0
  511. package/src/lib/progress-steps/progress-step.component.css +269 -0
  512. package/src/lib/progress-steps/progress-steps.component.css +26 -0
  513. package/src/lib/query-error/query-error.component.css +27 -0
  514. package/src/lib/scheduler/scheduler-agenda-view.component.css +106 -0
  515. package/src/lib/scheduler/scheduler-appointment-drag-styles.component.css +59 -0
  516. package/src/lib/scheduler/scheduler-appointment-styles.component.css +129 -0
  517. package/src/lib/scheduler/scheduler-edit-color.component.css +16 -0
  518. package/src/lib/scheduler/scheduler-edit-surface-actions.component.css +14 -0
  519. package/src/lib/scheduler/scheduler-edit-surface-breadcrumb.component.css +26 -0
  520. package/src/lib/scheduler/scheduler-edit-surface-children.component.css +57 -0
  521. package/src/lib/scheduler/scheduler-edit-surface-fields.component.css +11 -0
  522. package/src/lib/scheduler/scheduler-edit-surface-footer.component.css +7 -0
  523. package/src/lib/scheduler/scheduler-edit-surface-header.component.css +15 -0
  524. package/src/lib/scheduler/scheduler-edit-time-range.component.css +11 -0
  525. package/src/lib/scheduler/scheduler-month-view.component.css +143 -0
  526. package/src/lib/scheduler/scheduler-time-grid-view.component.css +269 -0
  527. package/src/lib/scheduler/scheduler.component.css +87 -0
  528. package/src/lib/scrollable/headless/scrollable-buttons.component.css +223 -0
  529. package/src/lib/scrollable/headless/scrollable-footer.css +37 -0
  530. package/src/lib/scrollable/headless/scrollable-masks.component.css +165 -0
  531. package/src/lib/scrollable/headless/scrollable-navigation.component.css +94 -0
  532. package/src/lib/scrollable/scrollable.component.css +234 -0
  533. package/src/lib/scrollbar/scrollbar.component.css +116 -0
  534. package/src/lib/skeleton/skeleton.component.css +132 -0
  535. package/src/lib/standings/standings-pick.component.css +208 -0
  536. package/src/lib/standings/standings.component.css +347 -0
  537. package/src/lib/stat-tile/stat-tile-sparkline.component.css +49 -0
  538. package/src/lib/stat-tile/stat-tile.component.css +134 -0
  539. package/src/lib/stream/consent/stream-consent.component.css +100 -0
  540. package/src/lib/stream/error/stream-player-error.component.css +101 -0
  541. package/src/lib/stream/loading/stream-player-loading.component.css +16 -0
  542. package/src/lib/stream/pip/pip-player.component.css +40 -0
  543. package/src/lib/stream/pip/pip-slot-placeholder.component.css +68 -0
  544. package/src/lib/stream/pip/pip-stage-styles.component.css +93 -0
  545. package/src/lib/stream/pip/pip-window.component.css +221 -0
  546. package/src/lib/stream/stream-manager-styles.component.css +10 -0
  547. package/src/lib/stream/stream-overlay-card-styles.component.css +69 -0
  548. package/src/lib/stream/stream-player-slot-styles.component.css +18 -0
  549. package/src/lib/table/table-column-chooser.component.css +17 -0
  550. package/src/lib/table/table-column-menu-trigger.component.css +31 -0
  551. package/src/lib/table/table-detail-styles.component.css +103 -0
  552. package/src/lib/table/table-drag-scroll-styles.component.css +18 -0
  553. package/src/lib/table/table-expander-cell.component.css +64 -0
  554. package/src/lib/table/table-filter-trigger.component.css +44 -0
  555. package/src/lib/table/table-group-header-row.component.css +38 -0
  556. package/src/lib/table/table-inline-edit-styles.component.css +20 -0
  557. package/src/lib/table/table-page-sticky-header-styles.component.css +77 -0
  558. package/src/lib/table/table-reorder-overlay.component.css +42 -0
  559. package/src/lib/table/table-resize-grip.component.css +65 -0
  560. package/src/lib/table/table-row-box-styles.component.css +268 -0
  561. package/src/lib/table/table-select-cell.component.css +119 -0
  562. package/src/lib/table/table-skeleton-rows.component.css +19 -0
  563. package/src/lib/table/table-sort-priority-styles.component.css +15 -0
  564. package/src/lib/table/table-sticky-columns-styles.component.css +80 -0
  565. package/src/lib/table/table-virtual-scroll-styles.component.css +9 -0
  566. package/src/lib/table/table.component.css +853 -0
  567. package/src/lib/tabs/nav-tabs/nav-tab-link-styles.component.css +37 -0
  568. package/src/lib/tabs/tab-bar-styles.component.css +266 -0
  569. package/src/lib/tabs/tab-scale-styles.component.css +61 -0
  570. package/src/lib/tabs/tabs/tab-group.component.css +115 -0
  571. package/src/lib/time-picker/time-picker.component.css +212 -0
  572. package/src/lib/timeline/timeline-item.component.css +139 -0
  573. package/src/lib/timeline/timeline.component.css +7 -0
  574. package/src/lib/toggletip/toggletip.component.css +88 -0
  575. package/src/lib/toolbar/toolbar.component.css +44 -0
  576. package/src/lib/tooltip/tooltip.component.css +84 -0
  577. package/src/lib/tree/tree.component.css +221 -0
  578. package/types/ethlete-components-testing.d.ts +300 -0
  579. package/types/ethlete-components.d.ts +37511 -3814
@@ -0,0 +1,133 @@
1
+ import { slider, type SliderMockOptions, sliderStyles } from '@ethlete/components/design/slider';
2
+ import { definePart, drawing } from '@design-system';
3
+ import frame from './slider.css?inline';
4
+
5
+ type Props = { field: SliderMockOptions };
6
+
7
+ const volume = (extra: Partial<SliderMockOptions> = {}): Props => ({
8
+ field: { id: 'volume', label: 'Volume', value: 40, ...extra },
9
+ });
10
+
11
+ const QUALITY = [
12
+ { value: 0, label: 'Low' },
13
+ { value: 1, label: 'Medium' },
14
+ { value: 2, label: 'High' },
15
+ ];
16
+
17
+ const INVALID = {
18
+ required: true,
19
+ value: 95,
20
+ error: 'Keep the volume at 80 or below.',
21
+ errorColor: 'danger',
22
+ } satisfies Partial<SliderMockOptions>;
23
+
24
+ export default definePart({
25
+ note: 'The SDK slider (et-slider) and range slider (et-range-slider), first drawing, drawn by slider() from @ethlete/components/design/slider with the real markup and CSS: et-label with the required marker, the interaction box with rail, fill, ticks with and without labels, one or two thumbs with the value bubble an etSliderThumbLabel template renders, et-form-support with hint and error; the brand theme, danger as the error theme. Hover, focus-visible and active are forced on a thumb, dragging as data-dragging on the host and thumb. Fixtures are fictional: Volume 0-100 at 0, 40 and 100, hint Applies to match highlights only., required at 95 with error Keep the volume at 80 or below.; steps of 10 with and without ticks; Quality with Low, Medium, High; Price range 20-80, 0-100, met at 50, in steps of 20 EUR; mixed with Different volumes, hint The selected clips disagree.; vertical with a value bubble and with labelled ticks; an unlabelled slider. Framed as a page with 16px padding at 320, 360 and 640. Numbers (light / dark), from shot pixels at scale 2 at 360, brand mint, a: rail (32 % surface-interaction) vs page 1.51 / 1.81; fill and thumb (primary) 1.33 / 13.50, thumb vs rail 1.14 / 7.45; focus ring (primary) 1.33 / 13.50; disabled (opacity 0.4) thumb 1.19 / 3.09, rail 1.18 / 1.22; thumb 18px, no border, so box-sizing does not change its size; the interaction box is 44px tall and the full track width on et-slider, so the touch target passes there; the thumb at min and max stays inside the host (margin-inline half a thumb) and lines up its outer edge with the label. Hover, active and dragging draw exactly like rest; readonly draws exactly like rest; invalid only turns the fill and thumb danger. Decided rules that arise: Q88 (the focus ring in ink; the invalid one takes the danger ink), Q99a (the mint fill and the mixed dashed rail take light-dark(ink, primary), the mint thumb keeps a 1px inset ink edge, the required marker light-dark(ink, primary)) and Q101 (a thumb hovers and drags to -active). No et-description on the slider, so form-field L1 does not arise. Lib bugs apart, all four fixed in the lib since: (S1) the value bubble overlapped et-label: nothing reserved room above the interaction box (Storybook Range Slider Default with showValueLabel at 360: bubble y 33.8-56.6, label y 42-57.6, the 20 bubble cut Price range; Slider Value Label: bubble y 41.8-64.6 over the label row). Fixed: a host with a value label carries data-thumb-value and gives the interaction box a 17.8px block-start margin (bubble y 59.6-82.4, label ends at 57.6); the 18px b and c draw replaces it, it does not add up. (S2) et-range-slider had a 28px interaction box, et-slider 44px (Storybook: h 28.0 vs 44.0). Fixed: both 44px, the range slider grows by 16px; b and c set the same 44px. (S3) vertical tick labels hung outside the host on the inline-start side (Storybook Vertical Marks at 360: host x 42, Medium x 11, High x 27, Low x 29). Fixed: the labels take a column as wide as the longest label, inside the host (Medium x 42); the 32px inline-start margin b and c drew doubled up with it and is gone. (S4, minor) the bubble and tick label on an end tick centred on it and overhung the host (Range Slider Labelled Marks: first label x 29, host x 42; range-ends: the 0 bubble left of the host). Fixed: their translate clamps at the track ends, so both start at the host edge (x 42). Design: (1) WCAG 1.4.11: the rail 1.51 / 1.81 is the only edge of the unfilled track; c draws it in surface-interaction, 4.74 / 6.94, but in light the ink fill then sits at 1.16 against it, told apart by hue only. (2) No hover, pressed or dragging look in a; Q101 in b shifts the thumb to -active, barely visible on an 18px thumb; c adds a 6px primary halo at 28 % while pressed or dragged (my proposal). (3) Readonly looks exactly like an editable slider and keeps focus; c draws a ring thumb in the page colour with a 2px light-dark(ink, primary) border (my proposal, box-sizing set). (4) On the ink fill of b and c the active ticks (on-primary at 70 %) sit near 3.0 against it, weaker than on the mint. (5) The error required marker takes the error theme primary, 3.71:1 in dark; Q113: it is not exempt and needs 4.5:1, drawn as is in this round. (6) Invalid has no mark beyond the danger colour of fill and thumb. Later rounds, left out here: thumb size tokens, the colour themes besides brand, RTL, the dragging motion and the bubble on focus only.',
26
+ madeBy: ['claude-opus-5-5', 'design check'],
27
+ groups: [
28
+ {
29
+ label: 'Rest',
30
+ states: ['min', 'mid', 'max', 'steps', 'marks', 'labelled-marks', 'hint', 'required', 'mixed', 'no-label'],
31
+ },
32
+ {
33
+ label: 'Interaction',
34
+ states: ['hover', 'focus-visible', 'active', 'dragging', 'value-label', 'value-label-max'],
35
+ },
36
+ {
37
+ label: 'Range',
38
+ states: ['range', 'range-value-label', 'range-ends', 'range-met', 'range-focus-visible', 'range-marks'],
39
+ },
40
+ {
41
+ label: 'Vertical',
42
+ states: ['vertical', 'vertical-marks'],
43
+ },
44
+ {
45
+ label: 'Disabled and readonly',
46
+ states: ['disabled', 'readonly', 'readonly-focus-visible'],
47
+ },
48
+ {
49
+ label: 'Errors',
50
+ states: ['invalid', 'invalid-focus-visible'],
51
+ },
52
+ ],
53
+ states: {
54
+ min: volume({ value: 0 }),
55
+ mid: volume(),
56
+ max: volume({ value: 100 }),
57
+ hover: volume({ force: { 0: 'hover' } }),
58
+ 'focus-visible': volume({ force: { 0: 'focus-visible' } }),
59
+ active: volume({ force: { 0: ['hover', 'active'] } }),
60
+ dragging: volume({ dragging: 0, force: { 0: ['hover', 'active'] } }),
61
+ 'value-label': volume({ valueLabel: true }),
62
+ 'value-label-max': volume({ value: 100, valueLabel: true }),
63
+ steps: volume({ step: 10, value: 40, hint: 'Snaps to multiples of 10.' }),
64
+ marks: volume({ step: 10, value: 40, marks: true, hint: 'A tick at every step.' }),
65
+ 'labelled-marks': { field: { id: 'quality', label: 'Quality', value: 1, max: 2, marks: QUALITY } },
66
+ hint: volume({ hint: 'Applies to match highlights only.' }),
67
+ required: volume({ required: true, hint: 'Applies to match highlights only.' }),
68
+ invalid: volume(INVALID),
69
+ 'invalid-focus-visible': volume({ ...INVALID, force: { 0: 'focus-visible' } }),
70
+ disabled: volume({ disabled: true }),
71
+ readonly: volume({ readonly: true }),
72
+ 'readonly-focus-visible': volume({ readonly: true, force: { 0: 'focus-visible' } }),
73
+ mixed: volume({ mixed: true, mixedLabel: 'Different volumes', hint: 'The selected clips disagree.' }),
74
+ 'no-label': { field: { id: 'quick', value: 40 } },
75
+ range: { field: { id: 'price', label: 'Price range', value: [20, 80] } },
76
+ 'range-value-label': { field: { id: 'price', label: 'Price range', value: [20, 80], valueLabel: true } },
77
+ 'range-ends': { field: { id: 'price', label: 'Price range', value: [0, 100], valueLabel: true } },
78
+ 'range-met': {
79
+ field: { id: 'price', label: 'Price range', value: [50, 50], dragging: 1, force: { 1: 'active' } },
80
+ },
81
+ 'range-focus-visible': {
82
+ field: { id: 'price', label: 'Price range', value: [20, 80], force: { 1: 'focus-visible' } },
83
+ },
84
+ 'range-marks': {
85
+ field: { id: 'price', label: 'Price range', value: [20, 60], step: 20, marks: true, hint: 'In steps of 20 EUR.' },
86
+ },
87
+ vertical: volume({ orientation: 'vertical', valueLabel: true }),
88
+ 'vertical-marks': {
89
+ field: { id: 'quality', label: 'Quality', value: 1, max: 2, marks: QUALITY, orientation: 'vertical' },
90
+ },
91
+ },
92
+ describe: {
93
+ min: 'Volume at 0; check that the thumb sits at the start, inside the host, and no fill shows.',
94
+ mid: 'Volume at 40; check that the fill runs from the start to the thumb.',
95
+ max: 'Volume at 100; check that the thumb sits at the end, inside the host, with a full fill.',
96
+ hover: 'The thumb hovered; check the hover look on the thumb.',
97
+ 'focus-visible': 'The thumb focused by keyboard; check that the focus ring wraps the thumb.',
98
+ active: 'The thumb pressed; check the press look on the thumb.',
99
+ dragging: 'The thumb being dragged; check the dragging look on thumb and host.',
100
+ 'value-label': 'Volume 40 with the value bubble; check that the bubble sits above the thumb clear of the label.',
101
+ 'value-label-max':
102
+ 'Volume 100 with the value bubble; check that the bubble clamps at the end and stays in the host.',
103
+ steps: 'Volume in steps of 10 with a hint; check that it looks like the plain slider with the hint below.',
104
+ marks: 'Volume in steps of 10 with ticks; check that a tick sits at every step and active ticks read on the fill.',
105
+ 'labelled-marks':
106
+ 'Quality with Low, Medium and High ticks; check that labels sit under their ticks and the ends clamp.',
107
+ hint: 'Volume with a hint; check that the hint sits under the track in muted text.',
108
+ required: 'The required volume with a hint; check that the required marker shows next to the label.',
109
+ invalid: 'Volume at 95 with an error; check that fill and thumb turn danger and the error text shows.',
110
+ 'invalid-focus-visible': 'The invalid slider focused; check that the focus ring takes the danger ink.',
111
+ disabled: 'The slider disabled; check that rail, fill, thumb and label fade.',
112
+ readonly: 'The slider read-only; check how it differs from the editable slider.',
113
+ 'readonly-focus-visible': 'The read-only slider focused by keyboard; check that a focus ring still shows.',
114
+ mixed: 'Volume in bulk edit with Different volumes; check the dashed rail and the mixed hint.',
115
+ 'no-label': 'A slider with no label; check that the track keeps its height without label space.',
116
+ range: 'A Price range from 20 to 80; check that two thumbs show and the fill runs between them.',
117
+ 'range-value-label': 'The range with value bubbles; check that both bubbles show and do not overlap.',
118
+ 'range-ends': 'The range at 0 and 100 with bubbles; check that both bubbles clamp inside the host.',
119
+ 'range-met': 'Both thumbs met at 50, the end one dragged; check that the thumbs stack cleanly.',
120
+ 'range-focus-visible': 'The range with the end thumb focused; check that only that thumb shows a focus ring.',
121
+ 'range-marks': 'The range 20 to 60 in steps of 20 with ticks; check the ticks and the hint below.',
122
+ vertical:
123
+ 'A vertical volume slider with a bubble; check that the fill runs bottom up and the bubble clears the label.',
124
+ 'vertical-marks': 'Vertical Quality with labelled ticks; check that labels take their own column inside the host.',
125
+ },
126
+ widths: [320, 360, 640],
127
+ frame: (body) => `<div class="t-frame">${body}</div>`,
128
+ render: (props: Props) =>
129
+ drawing({
130
+ body: slider(props.field),
131
+ styles: [sliderStyles, frame].join('\n'),
132
+ }),
133
+ });
@@ -0,0 +1,32 @@
1
+ .t-frame {
2
+ box-sizing: border-box;
3
+ padding: 1.6rem;
4
+ background: var(--et-surface-background);
5
+ color: var(--et-surface-text);
6
+ font-size: 1.4rem;
7
+ }
8
+
9
+ .t-mark {
10
+ color: var(--et-tone-text);
11
+ font-size: 1.2rem;
12
+ }
13
+
14
+ @layer components {
15
+ .et-standings-pick .et-focus-ring {
16
+ --_et-focus-ring-color: var(--et-tone-text);
17
+ }
18
+
19
+ .et-standings-row:where([data-zone]) .et-standings-cell:where([data-column='position']) {
20
+ box-shadow: inset var(--et-standings-zone-bar-width) 0 0 light-dark(var(--et-tone-text), var(--et-tone-fill));
21
+
22
+ &:dir(rtl) {
23
+ box-shadow: inset calc(var(--et-standings-zone-bar-width) * -1) 0 0
24
+ light-dark(var(--et-tone-text), var(--et-tone-fill));
25
+ }
26
+ }
27
+
28
+ .et-standings-legend-swatch,
29
+ .et-standings-pick-cut-line {
30
+ background: light-dark(var(--et-tone-text), var(--et-tone-fill));
31
+ }
32
+ }
@@ -0,0 +1,146 @@
1
+ import { standings, standingsPick, StandingsMockRow, standingsStyles } from '@ethlete/components/design/standings';
2
+ import { definePart, drawing } from '@design-system';
3
+ import frame from './standings.css?inline';
4
+
5
+ type Props = {
6
+ view: 'table' | 'pick';
7
+ plain?: boolean;
8
+ empty?: boolean;
9
+ cardForce?: { index: number; force: string };
10
+ dragging?: boolean;
11
+ locked?: boolean;
12
+ };
13
+
14
+ const ROWS: StandingsMockRow[] = [
15
+ {
16
+ position: 1,
17
+ name: 'Northbridge Rovers',
18
+ played: 10,
19
+ wins: 8,
20
+ ties: 1,
21
+ losses: 1,
22
+ difference: 17,
23
+ points: 25,
24
+ form: ['win', 'win', 'tie', 'win', 'win'],
25
+ },
26
+ {
27
+ position: 2,
28
+ name: 'Harbor City',
29
+ played: 10,
30
+ wins: 7,
31
+ ties: 1,
32
+ losses: 2,
33
+ difference: 11,
34
+ points: 22,
35
+ form: ['win', 'loss', 'win', 'win', 'tie'],
36
+ },
37
+ {
38
+ position: 3,
39
+ name: 'Eastvale United',
40
+ played: 10,
41
+ wins: 5,
42
+ ties: 2,
43
+ losses: 3,
44
+ difference: 4,
45
+ points: 17,
46
+ form: ['tie', 'win', 'loss', 'win', 'win'],
47
+ },
48
+ {
49
+ position: 4,
50
+ name: 'Pinewood Athletic',
51
+ played: 10,
52
+ wins: 4,
53
+ ties: 3,
54
+ losses: 3,
55
+ difference: 0,
56
+ points: 15,
57
+ form: ['loss', 'tie', 'win', 'tie', 'win'],
58
+ },
59
+ {
60
+ position: 5,
61
+ name: 'Lakeside Town',
62
+ played: 10,
63
+ wins: 2,
64
+ ties: 2,
65
+ losses: 6,
66
+ difference: -9,
67
+ points: 8,
68
+ form: ['loss', 'loss', 'tie', 'win', 'loss'],
69
+ },
70
+ {
71
+ position: 6,
72
+ name: 'Stonegate FC',
73
+ played: 10,
74
+ wins: 0,
75
+ ties: 3,
76
+ losses: 7,
77
+ difference: -23,
78
+ points: 3,
79
+ form: ['loss', 'tie', 'loss', 'loss', 'tie'],
80
+ },
81
+ ];
82
+
83
+ const ZONES = [
84
+ { from: 1, to: 2, label: 'Advances to the playoffs' },
85
+ { from: 6, to: 6, label: 'Relegated', color: 'danger' },
86
+ ];
87
+
88
+ const PICK_MARKS = ['+3', '+1', '0', '+3', '+1', '0'];
89
+
90
+ const table = (props: Props) =>
91
+ standings({
92
+ rows: props.empty ? [] : ROWS,
93
+ zones: props.plain || props.empty ? [] : ZONES,
94
+ highlighted: props.plain ? undefined : 4,
95
+ showLegend: !props.plain,
96
+ });
97
+
98
+ const pick = (props: Props) =>
99
+ standingsPick({
100
+ rows: ROWS.map((row, index) => ({
101
+ name: row.name,
102
+ mark: `<span class="t-mark">${PICK_MARKS[index]}</span>`,
103
+ cardForce: props.cardForce?.index === index ? props.cardForce.force : undefined,
104
+ })),
105
+ advancingCount: 2,
106
+ locked: props.locked,
107
+ dragging: props.dragging ? { index: 3, offset: -38, ghostOffset: -44 } : undefined,
108
+ shifts: props.dragging ? [0, 0, 44] : undefined,
109
+ });
110
+
111
+ export default definePart({
112
+ note: 'Decided rules only',
113
+ madeBy: ['claude-opus-5-5'],
114
+ states: {
115
+ table: { view: 'table' },
116
+ 'table-plain': { view: 'table', plain: true },
117
+ 'table-empty': { view: 'table', empty: true },
118
+ pick: { view: 'pick' },
119
+ 'pick-card-hover': { view: 'pick', cardForce: { index: 1, force: 'hover' } },
120
+ 'pick-card-focus-visible': { view: 'pick', cardForce: { index: 1, force: 'focus-visible' } },
121
+ 'pick-dragging': { view: 'pick', dragging: true },
122
+ 'pick-locked': { view: 'pick', locked: true },
123
+ },
124
+ describe: {
125
+ table:
126
+ 'Six teams with zones, a legend and Pinewood highlighted; check the zone marks, the form dots and the numbers align.',
127
+ 'table-plain': 'The six teams without zones, highlight or legend; check that rows read evenly with no zone marks.',
128
+ 'table-empty': 'The table with no rows; check that the header stays and the empty body does not collapse oddly.',
129
+ pick: 'The pick list of six teams with two advancing; check the cut line after the second card and the point marks.',
130
+ 'pick-card-hover': 'Harbor City hovered in the pick list; check that only that card shows the hover look.',
131
+ 'pick-card-focus-visible': 'Harbor City focused by keyboard; check that the focus ring wraps that card.',
132
+ 'pick-dragging':
133
+ 'Pinewood lifted and dragged up; check the drag shadow, the ghost slot and the shifted card below.',
134
+ 'pick-locked': 'The pick list locked; check that cards show no drag handle and read as fixed.',
135
+ },
136
+ widths: [480, 800],
137
+ frame: (body) => `<div class="t-frame">${body}</div>`,
138
+ render: (props: Props) =>
139
+ drawing({
140
+ body:
141
+ props.view === 'table'
142
+ ? table(props)
143
+ : pick(props).replaceAll('role="group"', 'role="group" data-et-action="emit:orderChange"'),
144
+ styles: [standingsStyles, frame].join('\n'),
145
+ }),
146
+ });
@@ -0,0 +1,15 @@
1
+ .stat-tile-frame {
2
+ padding: 2.4rem 1.6rem;
3
+ background: var(--et-surface-background);
4
+ color: var(--et-surface-text);
5
+
6
+ > .et-card {
7
+ inline-size: 280px;
8
+ }
9
+ }
10
+
11
+ @layer components {
12
+ .et-stat-tile-sparkline-current {
13
+ stroke: var(--et-tone-text, currentColor);
14
+ }
15
+ }
@@ -0,0 +1,97 @@
1
+ import { card, cardStyles } from '@ethlete/components/design/card';
2
+ import { statTile, StatTileMockOptions, statTileStyles } from '@ethlete/components/design/stat-tile';
3
+ import { definePart, drawing } from '@design-system';
4
+ import frame from './stat-tile.css?inline';
5
+
6
+ type Form =
7
+ | 'up-good'
8
+ | 'up-bad'
9
+ | 'down-good'
10
+ | 'down-unrated'
11
+ | 'unchanged'
12
+ | 'unit'
13
+ | 'no-value'
14
+ | 'without-sparkline'
15
+ | 'loading';
16
+
17
+ type Props = { form: Form };
18
+
19
+ const WEEKLY_USERS = [182, 176, 190, 201, 195, 210, 224, 218, 231, 240, 236, 252];
20
+ const LATENCY = [180, 185, 178, 190, 196, 188, 201, 199, 205, 210, 204, 212];
21
+
22
+ const DEFAULT: StatTileMockOptions = {
23
+ label: 'Weekly active users',
24
+ value: '25.2K',
25
+ delta: { text: '+6.8%', direction: 'up', sentiment: 'good' },
26
+ caption: 'vs last week',
27
+ sparkline: WEEKLY_USERS,
28
+ };
29
+
30
+ const FORMS: Record<Form, StatTileMockOptions> = {
31
+ 'up-good': DEFAULT,
32
+ 'up-bad': {
33
+ label: 'p95 latency',
34
+ value: '212',
35
+ unit: 'ms',
36
+ delta: { text: '+18', direction: 'up', sentiment: 'bad', color: 'danger' },
37
+ caption: 'vs last month',
38
+ sparkline: LATENCY,
39
+ },
40
+ 'down-good': {
41
+ label: 'Churn rate',
42
+ value: '3.4%',
43
+ delta: { text: '-2.1%', direction: 'down', sentiment: 'good' },
44
+ caption: 'vs last month',
45
+ },
46
+ 'down-unrated': {
47
+ label: 'Page views',
48
+ value: '12.9K',
49
+ delta: { text: '-310', direction: 'down' },
50
+ caption: 'vs last month',
51
+ },
52
+ unchanged: {
53
+ label: 'Open tickets',
54
+ value: '1,284',
55
+ delta: { text: '0', direction: 'neutral' },
56
+ caption: 'vs last month',
57
+ },
58
+ unit: { label: 'p95 latency', value: '212', unit: 'ms', caption: 'last 24 hours', sparkline: LATENCY },
59
+ 'no-value': { label: 'Weekly active users', value: null, caption: 'vs last week' },
60
+ 'without-sparkline': { ...DEFAULT, sparkline: undefined },
61
+ loading: { ...DEFAULT, loading: true },
62
+ };
63
+
64
+ export default definePart({
65
+ note: 'Decided rules only',
66
+ madeBy: ['claude-opus-5-5'],
67
+ states: {
68
+ default: { form: 'up-good' },
69
+ 'up-bad': { form: 'up-bad' },
70
+ 'down-good': { form: 'down-good' },
71
+ 'down-unrated': { form: 'down-unrated' },
72
+ unchanged: { form: 'unchanged' },
73
+ unit: { form: 'unit' },
74
+ 'no-value': { form: 'no-value' },
75
+ 'without-sparkline': { form: 'without-sparkline' },
76
+ loading: { form: 'loading' },
77
+ },
78
+ describe: {
79
+ default:
80
+ 'Weekly active users 25.2K, up 6.8% and good, with a sparkline; check that the delta reads positive and the line fits.',
81
+ 'up-bad': 'p95 latency 212 ms, up 18 and bad; check that the delta takes the danger color though it points up.',
82
+ 'down-good': 'Churn rate 3.4%, down 2.1% and good; check that the delta reads positive though it points down.',
83
+ 'down-unrated': 'Page views down 310 with no sentiment; check that the delta stays neutral in color.',
84
+ unchanged: 'Open tickets with a delta of 0; check that the neutral arrow and text show.',
85
+ unit: 'p95 latency 212 with the ms unit and no delta; check that the unit sits after the value, smaller.',
86
+ 'no-value': 'Weekly active users with no value; check that a placeholder holds the value line.',
87
+ 'without-sparkline': 'The default tile without a sparkline; check that the tile closes after the caption.',
88
+ loading: 'The default tile loading; check that skeletons replace value, delta and sparkline at the same size.',
89
+ },
90
+ widths: [480],
91
+ frame: (body) => `<div class="stat-tile-frame">${body}</div>`,
92
+ render: ({ form }: Props) =>
93
+ drawing({
94
+ body: card({ content: statTile(FORMS[form]) }),
95
+ styles: [cardStyles, statTileStyles, frame].join('\n'),
96
+ }),
97
+ });
@@ -0,0 +1,42 @@
1
+ .t-frame {
2
+ box-sizing: border-box;
3
+ padding: 1.6rem;
4
+ background: var(--et-surface-background);
5
+ color: var(--et-surface-text);
6
+ font-size: 1.4rem;
7
+ }
8
+
9
+ .t-frame .et-stream-player-slot {
10
+ inline-size: 100%;
11
+ aspect-ratio: 16 / 9;
12
+ }
13
+
14
+ .t-video {
15
+ position: absolute;
16
+ inset: 0;
17
+ display: grid;
18
+ place-items: center;
19
+ background: color-mix(in srgb, var(--et-surface-text) 14%, var(--et-surface-background));
20
+ }
21
+
22
+ .t-video::after {
23
+ content: '';
24
+ inline-size: 0;
25
+ block-size: 0;
26
+ border-block: 1.4rem solid transparent;
27
+ border-inline-start: 2.4rem solid var(--et-surface-text-muted);
28
+ }
29
+
30
+ @layer components {
31
+ .et-stream-player-loading .et-spinner {
32
+ --et-spinner-color: light-dark(var(--et-tone-text), var(--et-tone-fill));
33
+ }
34
+
35
+ .et-button {
36
+ --_et-focus-ring-color: var(--et-tone-text);
37
+ }
38
+
39
+ .et-button:where([data-variant='filled']) {
40
+ --et-button-shadow: inset 0 0 0 1px var(--et-tone-text);
41
+ }
42
+ }
@@ -0,0 +1,63 @@
1
+ import { streamPlayerSlot, StreamMockState, streamStyles } from '@ethlete/components/design/stream';
2
+ import { definePart, drawing } from '@design-system';
3
+ import frame from './stream.css?inline';
4
+
5
+ type Interaction = 'hover' | 'active' | 'focus-visible';
6
+
7
+ type Props = { state: StreamMockState; button?: Interaction };
8
+
9
+ const VIDEO = '<div class="t-video" aria-hidden="true"></div>';
10
+
11
+ const ACTIONS: Partial<Record<StreamMockState, string>> = {
12
+ consent: 'loading',
13
+ error: 'loading',
14
+ 'pip-placeholder': 'player',
15
+ };
16
+
17
+ const buttonAttributes = (state: StreamMockState, interaction: Interaction | undefined) =>
18
+ [
19
+ `data-et-control="action" data-et-action="${ACTIONS[state]}" data-can-animate`,
20
+ interaction && `data-et-force="${interaction}"`,
21
+ ]
22
+ .filter(Boolean)
23
+ .join(' ');
24
+
25
+ export default definePart({
26
+ note: 'Decided rules only',
27
+ madeBy: ['claude-opus-5-5'],
28
+ states: {
29
+ player: { state: 'player' },
30
+ consent: { state: 'consent' },
31
+ loading: { state: 'loading' },
32
+ error: { state: 'error' },
33
+ 'pip-placeholder': { state: 'pip-placeholder' },
34
+ 'consent-hover': { state: 'consent', button: 'hover' },
35
+ 'consent-active': { state: 'consent', button: 'active' },
36
+ 'consent-focus-visible': { state: 'consent', button: 'focus-visible' },
37
+ },
38
+ describe: {
39
+ player: 'The stream slot holding the player; check that the video fills the slot at its ratio.',
40
+ consent: 'The consent screen before the player loads; check the message and the action button, centered.',
41
+ loading: 'The stream slot loading; check that the spinner sits centered in the slot.',
42
+ error: 'The stream slot after an error; check the error message, centered in the slot.',
43
+ 'pip-placeholder':
44
+ 'The placeholder while the stream plays picture-in-picture; check its message in the empty slot.',
45
+ 'consent-hover': 'The consent action hovered; check that only the button shows the hover look.',
46
+ 'consent-active': 'The consent action pressed; check that the press look is deeper than hover.',
47
+ 'consent-focus-visible': 'The consent action focused by keyboard; check that the focus ring wraps the button.',
48
+ },
49
+ widths: [320, 480, 720],
50
+ controls: {
51
+ action: { kind: 'button', input: ['pointer', 'keyboard'] },
52
+ },
53
+ frame: (body) => `<div class="t-frame">${body}</div>`,
54
+ render: (props: Props) =>
55
+ drawing({
56
+ body: streamPlayerSlot({
57
+ state: props.state,
58
+ player: VIDEO,
59
+ buttonAttributes: buttonAttributes(props.state, props.button),
60
+ }),
61
+ styles: [streamStyles, frame].join('\n'),
62
+ }),
63
+ });
@@ -0,0 +1,94 @@
1
+ import { switchControl, type SwitchMockOptions, switchStyles } from '@ethlete/components/design/switch';
2
+ import { definePart, drawing } from '@design-system';
3
+
4
+ type Interaction = 'hover' | 'focus-visible' | 'active';
5
+
6
+ type Props = SwitchMockOptions & { interaction?: Interaction };
7
+
8
+ const ROWS = {
9
+ off: {},
10
+ on: { checked: true },
11
+ indeterminate: { indeterminate: true },
12
+ } satisfies Record<string, Props>;
13
+
14
+ const INTERACTIONS = ['hover', 'focus-visible', 'active'] as const;
15
+
16
+ type Row = keyof typeof ROWS;
17
+
18
+ const rowStates = Object.fromEntries(
19
+ Object.entries(ROWS).flatMap(([row, props]) => [
20
+ [row, props],
21
+ ...INTERACTIONS.map((interaction) => [`${row}-${interaction}`, { ...props, interaction }]),
22
+ [`${row}-disabled`, { ...props, disabled: true }],
23
+ ]),
24
+ ) as Record<Row | `${Row}-${Interaction | 'disabled'}`, Props>;
25
+
26
+ const columns = ['rest', ...INTERACTIONS, 'disabled'] as const;
27
+
28
+ export default definePart({
29
+ note: 'The SDK switch, drawn by its mock from @ethlete/components/design: alone off, on and indeterminate in every interaction, and inside an et-choice-field with a label in each size and as a card. The label area skips CLIPPED: its 1.2 line height rounds the 12 and 16 px line box down by under a pixel, with no glyph cut.',
30
+ consumerAction: 'a form control whose value the consumer binds',
31
+ madeBy: ['claude-opus-5-5', 'claude-sonnet-5-5'],
32
+ states: {
33
+ ...rowStates,
34
+ 'label-sm': { label: 'Email me updates', size: 'sm', checked: true },
35
+ 'label-md': { label: 'Email me updates', size: 'md', checked: true },
36
+ 'label-lg': { label: 'Email me updates', size: 'lg', checked: true },
37
+ 'card-off': { label: 'Weekly digest', variant: 'card' },
38
+ 'card-on': { label: 'Weekly digest', variant: 'card', checked: true },
39
+ },
40
+ describe: {
41
+ off: 'The switch off; check that the off track has a visible edge and the handle sits at the start.',
42
+ 'off-hover': 'The off switch hovered; check that the track shows the hover look.',
43
+ 'off-focus-visible': 'The off switch focused by keyboard; check that the focus ring wraps the track.',
44
+ 'off-active': 'The off switch pressed; check the press look on the track and handle.',
45
+ 'off-disabled': 'The off switch disabled; check that track and handle fade.',
46
+ on: 'The switch on; check that the track fills with the brand color and the handle sits at the end.',
47
+ 'on-hover': 'The on switch hovered; check that the filled track shifts visibly.',
48
+ 'on-focus-visible': 'The on switch focused by keyboard; check that the focus ring wraps the filled track.',
49
+ 'on-active': 'The on switch pressed; check the press look on the filled track.',
50
+ 'on-disabled': 'The on switch disabled; check that it fades but still reads as on.',
51
+ indeterminate: 'The switch indeterminate; check that the handle sits in the middle.',
52
+ 'indeterminate-hover': 'The indeterminate switch hovered; check the hover look on the track.',
53
+ 'indeterminate-focus-visible': 'The indeterminate switch focused by keyboard; check that the focus ring shows.',
54
+ 'indeterminate-active': 'The indeterminate switch pressed; check the press look on the track.',
55
+ 'indeterminate-disabled': 'The indeterminate switch disabled; check that it fades and the handle stays centered.',
56
+ 'label-sm': 'An on switch with a label at size sm; check that switch and label shrink and stay aligned.',
57
+ 'label-md': 'An on switch with a label at size md; check that the label centers on the switch.',
58
+ 'label-lg': 'An on switch with a label at size lg; check that switch and label grow and stay aligned.',
59
+ 'card-off': 'The Weekly digest card with the switch off; check the card border and the switch inside.',
60
+ 'card-on': 'The Weekly digest card with the switch on; check that the card takes the checked look.',
61
+ },
62
+ grid: {
63
+ columns,
64
+ rows: Object.fromEntries(
65
+ Object.keys(ROWS).map((row) => [
66
+ row,
67
+ Object.fromEntries(columns.map((column) => [column, column === 'rest' ? row : `${row}-${column}`])),
68
+ ]),
69
+ ) as Record<Row, Record<(typeof columns)[number], keyof typeof rowStates>>,
70
+ },
71
+ controls: {
72
+ switch: { kind: 'button', input: ['pointer', 'keyboard'], disabled: true },
73
+ },
74
+ render: ({ interaction, ...options }: Props) =>
75
+ drawing({
76
+ body: switchControl({
77
+ ...options,
78
+ color: 'brand',
79
+ attributes: [
80
+ options.attributes,
81
+ options.label === undefined && 'data-et-control="switch"',
82
+ interaction && `data-et-force="${interaction}"`,
83
+ ]
84
+ .filter(Boolean)
85
+ .join(' '),
86
+ })
87
+ .replace('<et-choice-field ', '<et-choice-field data-et-control="switch" ')
88
+ .replace(
89
+ 'class="et-choice-field-label-area',
90
+ `${options.variant === 'card' ? '' : 'data-et-skip="CLIPPED" '}class="et-choice-field-label-area`,
91
+ ),
92
+ styles: switchStyles,
93
+ }),
94
+ });