@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,210 @@
1
+ import iconButtonBase from '../src/lib/button/icon-button.component.css?inline';
2
+ import { TIMES_ICON } from '../src/lib/icon/headless/times-icon';
3
+ import iconBase from '../src/lib/icon/headless/icon-styles.component.css?inline';
4
+ import alertDialogBase from '../src/lib/overlay/alert-dialog/alert-dialog.component.css?inline';
5
+ import overlayContainer from '../src/lib/overlay/overlay-container.component.css?inline';
6
+ import overlayMain from '../src/lib/overlay/overlay-main-styles.component.css?inline';
7
+ import dialogStrategy from '../src/lib/overlay/strategies/dialog-styles.component.css?inline';
8
+ import { button, buttonStyles } from './button';
9
+ import { iconMarkup } from './icon';
10
+
11
+ export type DialogMockButton = {
12
+ label: string;
13
+ variant?: 'filled' | 'outline' | 'tonal' | 'transparent';
14
+ /** A color theme name the app registers. Left out, the button takes the dialog's color theme. */
15
+ color?: string;
16
+ /** Extra attributes on the button, e.g. design markers. */
17
+ attributes?: string;
18
+ };
19
+
20
+ export type DialogMockOptions = {
21
+ /** The title, as HTML. */
22
+ title: string;
23
+ /** The body content, as HTML. */
24
+ body: string;
25
+ /** The footer buttons, in order. Leave it out for a dialog without a footer. */
26
+ actions?: DialogMockButton[];
27
+ /** Draws an `et-icon-button` with `etOverlayClose` in the header; the string adds attributes to it. */
28
+ close?: boolean | string;
29
+ /** As the body's `dividers` input. `dynamic` draws the body scrolled to its start. */
30
+ dividers?: false | 'static' | 'dynamic';
31
+ /** A surface theme name the app registers, for the pane. Left out, the pane takes the surface one elevation above its parent. */
32
+ surface?: string;
33
+ /** Extra attributes on the pane, e.g. design markers. */
34
+ attributes?: string;
35
+ /** Unique per frame: the title id derives from it. */
36
+ id?: string;
37
+ };
38
+
39
+ export type AlertDialogMockOptions = {
40
+ kind: 'alert' | 'confirm';
41
+ title: string;
42
+ message?: string;
43
+ /** The confirm button's color theme name, as `confirmColor` sets it. */
44
+ confirmColor?: string;
45
+ confirmLabel?: string;
46
+ cancelLabel?: string;
47
+ acknowledgeLabel?: string;
48
+ /** Extra attributes on the confirm (or acknowledge) button. */
49
+ confirmAttributes?: string;
50
+ /** Extra attributes on the cancel button. */
51
+ cancelAttributes?: string;
52
+ /** A surface theme name the app registers, for the pane. Left out, the pane takes the surface one elevation above its parent. */
53
+ surface?: string;
54
+ attributes?: string;
55
+ id?: string;
56
+ };
57
+
58
+ /** The stylesheets `dialog()` and `alertDialog()` draw with: the real overlay pane, dialog, button and icon button CSS. */
59
+ export const dialogStyles = /* @__PURE__ */ [
60
+ buttonStyles,
61
+ iconBase,
62
+ iconButtonBase,
63
+ overlayContainer,
64
+ overlayMain,
65
+ dialogStrategy,
66
+ alertDialogBase,
67
+ `@layer components.sdk {
68
+ .et-dialog-mock-header {
69
+ display: flex;
70
+ align-items: center;
71
+ justify-content: space-between;
72
+ gap: 1.2rem;
73
+ }
74
+ .et-dialog-mock-title {
75
+ margin: 0;
76
+ font-size: 1.8rem;
77
+ font-weight: 600;
78
+ }
79
+ .et-dialog-mock-actions {
80
+ display: flex;
81
+ flex-wrap: wrap;
82
+ justify-content: flex-end;
83
+ gap: 0.8rem;
84
+ }
85
+ .et-dialog-mock-scene {
86
+ position: relative;
87
+ display: grid;
88
+ place-items: center;
89
+ padding: 4rem 2.4rem;
90
+ }
91
+ .et-dialog-mock-scene > .et-overlay-runtime-backdrop {
92
+ position: absolute;
93
+ inset: 0;
94
+ }
95
+ }`,
96
+ ].join('\n');
97
+
98
+ const footerButton = (action: DialogMockButton) => {
99
+ const markup = button({ label: action.label, variant: action.variant ?? 'filled', color: action.color, size: 'md' });
100
+
101
+ return action.attributes ? markup.replace(/^<button /, `<button ${action.attributes} `) : markup;
102
+ };
103
+
104
+ const closeButton = (attributes?: string) => {
105
+ const classes = ['et-color-interactive', 'et-icon-button', 'et-focus-ring', 'et-color--inherited'];
106
+
107
+ return `<button ${attributes ?? ''} etOverlayClose type="button" aria-label="Close" class="${classes.join(' ')}" data-variant="transparent" data-size="sm"><div class="et-icon-button-icon">${iconMarkup(TIMES_ICON)}</div></button>`;
108
+ };
109
+
110
+ const pane = (
111
+ options: { surface?: string; attributes?: string; role: string; labelledBy: string; describedBy?: string },
112
+ content: string,
113
+ ) => {
114
+ const classes = [
115
+ 'et-overlay',
116
+ 'et-overlay-runtime-pane',
117
+ 'et-overlay--dialog',
118
+ 'et-color--inherited',
119
+ options.surface && `et-surface--${options.surface}`,
120
+ 'et-with-default-animation',
121
+ 'et-animation-enter-done',
122
+ ].filter(Boolean);
123
+ const attributes = [
124
+ options.attributes,
125
+ !options.surface && 'data-et-auto-surface',
126
+ `role="${options.role}"`,
127
+ 'aria-modal="true"',
128
+ 'tabindex="-1"',
129
+ `aria-labelledby="${options.labelledBy}"`,
130
+ options.describedBy && `aria-describedby="${options.describedBy}"`,
131
+ `class="${classes.join(' ')}"`,
132
+ ].filter(Boolean);
133
+
134
+ return `<et-overlay-container ${attributes.join(' ')}>${content}</et-overlay-container>`;
135
+ };
136
+
137
+ const body = (content: string, dividers: DialogMockOptions['dividers'] = false) => {
138
+ const classes = [
139
+ 'et-overlay-body',
140
+ dividers && 'et-overlay-body--render-dividers',
141
+ dividers === 'dynamic' && 'et-overlay-body--dynamic-dividers',
142
+ dividers === 'dynamic' && 'et-scrollable-body--can-scroll',
143
+ dividers === 'dynamic' && 'et-scrollable-body--is-at-start',
144
+ ].filter(Boolean);
145
+
146
+ return `<div class="${classes.join(' ')}"><div class="et-overlay-body-container"><div class="et-overlay-body-start-element"></div>${content}<div class="et-overlay-body-end-element"></div></div></div>`;
147
+ };
148
+
149
+ /**
150
+ * Draws an open dialog pane (`dialogOverlayStrategy`) with an `et-overlay-main` of header, body and
151
+ * footer, as HTML. The pane sits in flow; wrap it in `overlayBackdrop()` to draw the scrim.
152
+ */
153
+ export const dialog = (options: DialogMockOptions) => {
154
+ const titleId = `et-overlay-title-${options.id ?? 'dialog'}`;
155
+ const close = options.close ? closeButton(typeof options.close === 'string' ? options.close : undefined) : '';
156
+ const header = `<div class="et-overlay-header et-dialog-mock-header"><h2 class="et-dialog-mock-title" id="${titleId}" et-overlay-title>${options.title}</h2>${close}</div>`;
157
+ const footer = options.actions
158
+ ? `<div class="et-overlay-footer et-dialog-mock-actions">${options.actions.map(footerButton).join('')}</div>`
159
+ : '';
160
+
161
+ return pane(
162
+ { surface: options.surface, attributes: options.attributes, role: 'dialog', labelledBy: titleId },
163
+ `<et-overlay-main class="et-overlay-main">${header}${body(options.body, options.dividers)}${footer}</et-overlay-main>`,
164
+ );
165
+ };
166
+
167
+ /** Draws the open `et-alert-dialog` from `injectAlertDialog()` in its dialog pane, as HTML. */
168
+ export const alertDialog = (options: AlertDialogMockOptions) => {
169
+ const id = options.id ?? 'alert';
170
+ const titleId = `et-overlay-title-${id}`;
171
+ const messageId = `et-alert-dialog-message-${id}`;
172
+ const actions =
173
+ options.kind === 'confirm'
174
+ ? [
175
+ footerButton({
176
+ label: options.cancelLabel ?? 'Cancel',
177
+ variant: 'outline',
178
+ attributes: ['data-et-alert-dialog-initial-focus', options.cancelAttributes].filter(Boolean).join(' '),
179
+ }),
180
+ footerButton({
181
+ label: options.confirmLabel ?? 'Confirm',
182
+ color: options.confirmColor,
183
+ attributes: options.confirmAttributes,
184
+ }),
185
+ ]
186
+ : [
187
+ footerButton({
188
+ label: options.acknowledgeLabel ?? 'OK',
189
+ attributes: ['data-et-alert-dialog-initial-focus', options.confirmAttributes].filter(Boolean).join(' '),
190
+ }),
191
+ ];
192
+ const message = options.message
193
+ ? body(`<p id="${messageId}" class="et-alert-dialog-message">${options.message}</p>`)
194
+ : '';
195
+
196
+ return pane(
197
+ {
198
+ surface: options.surface,
199
+ attributes: options.attributes,
200
+ role: 'alertdialog',
201
+ labelledBy: titleId,
202
+ describedBy: options.message ? messageId : undefined,
203
+ },
204
+ `<et-alert-dialog class="et-alert-dialog et-overlay-main" data-kind="${options.kind}"><div class="et-overlay-header"><h2 class="et-alert-dialog-title" id="${titleId}" et-overlay-title>${options.title}</h2></div>${message}<div class="et-alert-dialog-actions et-overlay-footer">${actions.join('')}</div></et-alert-dialog>`,
205
+ );
206
+ };
207
+
208
+ /** Draws the visible `et-overlay-runtime-backdrop` behind `content`, both in flow. */
209
+ export const overlayBackdrop = (content: string) =>
210
+ `<div class="et-dialog-mock-scene"><div class="et-overlay-runtime-backdrop et-overlay-backdrop--visible"></div>${content}</div>`;
@@ -0,0 +1,27 @@
1
+ import dividerBase from '../src/lib/divider/divider.component.css?inline';
2
+
3
+ export type DividerMockOptions = {
4
+ orientation?: 'horizontal' | 'vertical';
5
+ /** Draws the divider as `decorative`: no separator role, hidden from assistive tech. */
6
+ decorative?: boolean;
7
+ /** Extra attributes on the divider, e.g. design markers. */
8
+ attributes?: string;
9
+ };
10
+
11
+ /** The stylesheets `divider()` draws with: the real divider CSS. */
12
+ export const dividerStyles = /* @__PURE__ */ [dividerBase].join('\n');
13
+
14
+ /** Draws an `et-divider` as the component renders it, as HTML. */
15
+ export const divider = (options: DividerMockOptions = {}) => {
16
+ const orientation = options.orientation ?? 'horizontal';
17
+ const attributes = [
18
+ options.attributes,
19
+ 'class="et-divider"',
20
+ `data-orientation="${orientation}"`,
21
+ options.decorative ? 'role="presentation"' : 'role="separator"',
22
+ !options.decorative && `aria-orientation="${orientation}"`,
23
+ options.decorative && 'aria-hidden="true"',
24
+ ].filter(Boolean);
25
+
26
+ return `<et-divider ${attributes.join(' ')}></et-divider>`;
27
+ };
@@ -0,0 +1,45 @@
1
+ import emptyStateBase from '../src/lib/empty-state/empty-state.component.css?inline';
2
+ import { FILE_ICON } from '../src/lib/icon/headless/file-icon';
3
+ import iconBase from '../src/lib/icon/headless/icon-styles.component.css?inline';
4
+ import { TRIANGLE_EXCLAMATION_ICON } from '../src/lib/icon/headless/triangle-exclamation-icon';
5
+ import { button, ButtonMockOptions, buttonStyles } from './button';
6
+ import { iconMarkup } from './icon';
7
+
8
+ export type EmptyStateMockOptions = {
9
+ heading?: string;
10
+ description?: string;
11
+ /** The projected `[etIcon]`. Left out, the file icon; `false` draws none. */
12
+ icon?: 'file' | 'triangle' | false;
13
+ /** The label of a projected `et-button etEmptyStateAction`. Left out, no action. */
14
+ action?: string;
15
+ /** The action's button variant. Left out, `filled`, as `et-button` defaults to. */
16
+ actionVariant?: ButtonMockOptions['variant'];
17
+ /** Extra attributes on the action button, e.g. design markers. */
18
+ actionAttributes?: string;
19
+ /** Extra attributes on the empty state, e.g. design markers. */
20
+ attributes?: string;
21
+ };
22
+
23
+ const ICONS = {
24
+ file: FILE_ICON,
25
+ triangle: TRIANGLE_EXCLAMATION_ICON,
26
+ } as const;
27
+
28
+ /** The stylesheets `emptyState()` draws with: the real empty-state, button and icon CSS. */
29
+ export const emptyStateStyles = /* @__PURE__ */ [buttonStyles, iconBase, emptyStateBase].join('\n');
30
+
31
+ /** Draws an `et-empty-state` with its projected icon and action as the component renders it, as HTML. */
32
+ export const emptyState = (options: EmptyStateMockOptions) => {
33
+ const icon = options.icon === false ? '' : iconMarkup(ICONS[options.icon ?? 'file']);
34
+ const heading = options.heading ? `<p class="et-empty-state-title">${options.heading}</p>` : '';
35
+ const description = options.description ? `<p class="et-empty-state-description">${options.description}</p>` : '';
36
+ const action = options.action
37
+ ? button({ label: options.action, variant: options.actionVariant }).replace(
38
+ /^<button /,
39
+ `<button ${options.actionAttributes ?? ''} etEmptyStateAction `,
40
+ )
41
+ : '';
42
+ const attributes = [options.attributes, 'class="et-empty-state"'].filter(Boolean);
43
+
44
+ return `<et-empty-state ${attributes.join(' ')}>${icon}${heading}${description}${action}</et-empty-state>`;
45
+ };
@@ -0,0 +1,55 @@
1
+ import floatingActionBase from '../src/lib/floating-action/floating-action-styles.component.css?inline';
2
+ import { FILTER_ICON } from '../src/lib/icon/headless/filter-icon';
3
+ import iconBase from '../src/lib/icon/headless/icon-styles.component.css?inline';
4
+ import { button, buttonStyles, ButtonMockOptions } from './button';
5
+ import { iconMarkup } from './icon';
6
+
7
+ export type FloatingActionMockOptions = {
8
+ /** The trigger, drawn as an `et-button`. */
9
+ trigger: ButtonMockOptions;
10
+ /** Draws the filter icon in the trigger, as the story's Filter button could carry. */
11
+ filterIcon?: boolean;
12
+ /** Where the trigger is. Left out, `inline`. */
13
+ state?: 'inline' | 'floating' | 'hidden';
14
+ /** The in-flow size the anchor holds while the trigger is out of the flow, in px. */
15
+ heldSize?: { inlineSize: number; blockSize: number };
16
+ /** Extra attributes on the trigger, e.g. design markers. */
17
+ triggerAttributes?: string;
18
+ /** Content before the anchor, as HTML. */
19
+ before?: string;
20
+ /** The region the trigger acts on (`etFloatingActionScope`), as HTML. Left out, no scope. */
21
+ scope?: string;
22
+ /** Content after the scope, as HTML. */
23
+ after?: string;
24
+ /** Extra attributes on the host, e.g. a style or design markers. */
25
+ attributes?: string;
26
+ };
27
+
28
+ /** The stylesheets `floatingAction()` draws with: the real floating-action, button and icon CSS. */
29
+ export const floatingActionStyles = /* @__PURE__ */ [buttonStyles, iconBase, floatingActionBase].join('\n');
30
+
31
+ /** Draws `[etFloatingAction]` with its anchor, trigger and scope as a static snapshot of one state. */
32
+ export const floatingAction = (options: FloatingActionMockOptions) => {
33
+ const { state = 'inline', heldSize } = options;
34
+ const trigger = button({
35
+ ...options.trigger,
36
+ icon: options.filterIcon ? iconMarkup(FILTER_ICON) : options.trigger.icon,
37
+ class: ['et-floating-action-trigger', options.trigger.class].filter(Boolean).join(' '),
38
+ style: [state !== 'inline' && 'animation: none; transition: none', options.trigger.style]
39
+ .filter(Boolean)
40
+ .join('; '),
41
+ }).replace(
42
+ /^<(button|a) /,
43
+ `<$1 ${[options.triggerAttributes, `data-floating-action-state="${state}"`].filter(Boolean).join(' ')} `,
44
+ );
45
+
46
+ const held =
47
+ state !== 'inline' && heldSize
48
+ ? ` style="min-inline-size: ${heldSize.inlineSize}px; min-block-size: ${heldSize.blockSize}px"`
49
+ : '';
50
+ const anchor = `<div class="et-floating-action-anchor"${held}>${trigger}</div>`;
51
+ const scope = options.scope === undefined ? '' : `<div class="et-floating-action-scope">${options.scope}</div>`;
52
+ const host = [options.attributes, 'class="et-floating-action"', `data-state="${state}"`].filter(Boolean);
53
+
54
+ return `<div ${host.join(' ')}>${options.before ?? ''}${anchor}${scope}${options.after ?? ''}</div>`;
55
+ };
@@ -0,0 +1,256 @@
1
+ import { interactiveStyles } from '@ethlete/core/design/interactive-styles';
2
+ import formFieldBase from '../src/lib/forms/form-field/form-field.component.css?inline';
3
+ import textShell from '../src/lib/forms/form-field/form-field-text-shell-styles.component.css?inline';
4
+ import suffixOverlap from '../src/lib/forms/form-field/form-field-suffix-overlap-styles.component.css?inline';
5
+ import label from '../src/lib/forms/form-field/headless/label.directive.css?inline';
6
+ import hint from '../src/lib/forms/form-field/hint.component.css?inline';
7
+ import inputBase from '../src/lib/forms/input/input.component.css?inline';
8
+ import textareaBase from '../src/lib/forms/textarea/textarea.component.css?inline';
9
+ import textareaAutosize from '../src/lib/forms/textarea/textarea-autosize-styles.component.css?inline';
10
+ import iconStyles from '../src/lib/icon/headless/icon-styles.component.css?inline';
11
+
12
+ /** The field state a control draws itself from. */
13
+ export type FormFieldMockState = {
14
+ id: string;
15
+ disabled: boolean;
16
+ readonly: boolean;
17
+ required: boolean;
18
+ invalid: boolean;
19
+ focused: boolean;
20
+ open: boolean;
21
+ labelId: string | null;
22
+ describedBy: string | null;
23
+ };
24
+
25
+ /** A control drawn inside `formField()`, for example `input()` or `select()`. */
26
+ export type FormFieldControlMock = {
27
+ controlType: string;
28
+ hasValue: boolean;
29
+ /** Can be opened, like a select: `open` then draws the field expanded. */
30
+ expandable?: boolean;
31
+ html: (state: FormFieldMockState) => string;
32
+ /** The control's own affordances, drawn first in the suffix area. */
33
+ suffix?: (state: FormFieldMockState) => string;
34
+ /** Drawn below the field, where the overlay would open. */
35
+ panel?: (state: FormFieldMockState) => string;
36
+ };
37
+
38
+ export type FormFieldMockOptions = {
39
+ /** The control, from `input()` or `select()`, or plain HTML for a text input. */
40
+ control: FormFieldControlMock | string;
41
+ /** The label, as HTML. */
42
+ label?: string;
43
+ /** Unique per frame: the ids that link the label, the control and the messages derive from it. */
44
+ id?: string;
45
+ /** The hint, as HTML. */
46
+ hint?: string;
47
+ /** The error message, as HTML. Draws the field in its error state. */
48
+ error?: string;
49
+ /** The color theme name the app registers for errors. */
50
+ errorColor?: string;
51
+ /** Prefix content, as HTML, for example an icon. */
52
+ prefix?: string;
53
+ /** Suffix content, as HTML. */
54
+ suffix?: string;
55
+ appearance?: 'box' | 'underline';
56
+ fill?: 'transparent' | 'filled';
57
+ labelMode?: 'static' | 'inline' | 'floating-inside' | 'floating-outside';
58
+ size?: 'sm' | 'md' | 'lg';
59
+ /** `'ghost'` draws no resting border, as the real form field does for a text-field control. */
60
+ variant?: 'default' | 'ghost';
61
+ /** A color theme name the app registers. */
62
+ color?: string;
63
+ /** A surface theme name the app registers. */
64
+ surface?: string;
65
+ required?: boolean;
66
+ disabled?: boolean;
67
+ readonly?: boolean;
68
+ focused?: boolean;
69
+ /** Opens an expandable control, like a select. */
70
+ open?: boolean;
71
+ class?: string;
72
+ style?: string;
73
+ };
74
+
75
+ export type InputMockOptions = {
76
+ value?: string;
77
+ placeholder?: string;
78
+ type?: string;
79
+ textAlign?: 'start' | 'center' | 'end';
80
+ };
81
+
82
+ export type TextareaMockOptions = {
83
+ value?: string;
84
+ placeholder?: string;
85
+ rows?: number;
86
+ /** Grows with its content, from `minRows` (default `rows`). On by default, like the real textarea. */
87
+ autosize?: boolean;
88
+ minRows?: number;
89
+ /** The native textarea's `aria-label`, for a field without a visible label. */
90
+ ariaLabel?: string;
91
+ };
92
+
93
+ /** The stylesheets `formField()`, `input()` and `textarea()` draw with: the real `et-form-field` CSS. */
94
+ export const formFieldStyles = /* @__PURE__ */ [
95
+ interactiveStyles,
96
+ iconStyles,
97
+ formFieldBase,
98
+ textShell,
99
+ suffixOverlap,
100
+ label,
101
+ hint,
102
+ inputBase,
103
+ textareaBase,
104
+ textareaAutosize,
105
+ `.et-design-panel-anchor { position: relative; }
106
+ .et-design-panel { position: absolute; inset-inline: 0; inset-block-start: calc(100% + 0.3rem); z-index: 1; }`,
107
+ ].join('\n');
108
+
109
+ const attributesOf = (entries: (string | false | null | undefined)[]) => entries.filter(Boolean).join(' ');
110
+
111
+ /** Draws `<et-input>` as a control for `formField()`. */
112
+ export const input = (options: InputMockOptions = {}): FormFieldControlMock => ({
113
+ controlType: 'text-input',
114
+ hasValue: !!options.value,
115
+ html: (state) => {
116
+ const attributes = attributesOf([
117
+ 'class="et-input-native"',
118
+ `type="${options.type ?? 'text'}"`,
119
+ options.value && `value="${options.value}"`,
120
+ state.disabled && 'disabled',
121
+ state.readonly && 'readonly',
122
+ state.required && 'required',
123
+ options.placeholder && `placeholder="${options.placeholder}"`,
124
+ state.invalid && 'aria-invalid="true"',
125
+ state.describedBy && `aria-describedby="${state.describedBy}"`,
126
+ state.labelId && `aria-labelledby="${state.labelId}"`,
127
+ `data-text-align="${options.textAlign ?? 'start'}"`,
128
+ ]);
129
+
130
+ return `<et-input class="et-color-interactive et-input"><input ${attributes}></et-input>`;
131
+ },
132
+ });
133
+
134
+ /** Draws `<et-textarea>` as a control for `formField()`. */
135
+ export const textarea = (options: TextareaMockOptions = {}): FormFieldControlMock => ({
136
+ controlType: 'textarea',
137
+ hasValue: !!options.value,
138
+ html: (state) => {
139
+ const rows = options.rows ?? 3;
140
+ const autosize = options.autosize ?? true;
141
+ const attributes = attributesOf([
142
+ 'class="et-textarea-native"',
143
+ `rows="${rows}"`,
144
+ state.disabled && 'disabled',
145
+ state.readonly && 'readonly',
146
+ state.required && 'required',
147
+ options.placeholder && `placeholder="${options.placeholder}"`,
148
+ state.invalid && 'aria-invalid="true"',
149
+ state.describedBy && `aria-describedby="${state.describedBy}"`,
150
+ state.labelId && `aria-labelledby="${state.labelId}"`,
151
+ options.ariaLabel && `aria-label="${options.ariaLabel}"`,
152
+ `data-resize="${autosize ? 'none' : 'vertical'}"`,
153
+ autosize && 'data-et-textarea-autosize=""',
154
+ autosize && `style="--et-textarea-min-rows: ${options.minRows ?? rows}"`,
155
+ ]);
156
+
157
+ return `<et-textarea class="et-color-interactive et-textarea"><textarea ${attributes}>${options.value ?? ''}</textarea></et-textarea>`;
158
+ },
159
+ });
160
+
161
+ /** Draws `<et-form-field>` with a control, its label, affixes and messages, as the component renders them. */
162
+ export const formField = (options: FormFieldMockOptions) => {
163
+ const control: FormFieldControlMock =
164
+ typeof options.control === 'string'
165
+ ? { controlType: 'text-input', hasValue: false, html: () => options.control as string }
166
+ : options.control;
167
+
168
+ const {
169
+ id = 'field',
170
+ appearance = 'box',
171
+ fill = 'transparent',
172
+ labelMode = 'static',
173
+ size = 'md',
174
+ error,
175
+ hint,
176
+ } = options;
177
+ const open = !!control.expandable && !!options.open;
178
+ const focused = !!options.focused || open;
179
+ const labelId = options.label ? `et-label-${id}` : null;
180
+ const errorId = `et-form-field-error-${id}`;
181
+ const hintId = `et-form-field-hint-${id}`;
182
+
183
+ const state: FormFieldMockState = {
184
+ id,
185
+ disabled: !!options.disabled,
186
+ readonly: !!options.readonly,
187
+ required: !!options.required,
188
+ invalid: error !== undefined,
189
+ focused,
190
+ open,
191
+ labelId,
192
+ describedBy: error !== undefined ? errorId : hint !== undefined ? hintId : null,
193
+ };
194
+
195
+ const errorColor = error !== undefined && options.errorColor;
196
+ const floating = labelMode === 'floating-inside' || labelMode === 'floating-outside';
197
+
198
+ const classes = [
199
+ 'et-color-interactive--has-focus',
200
+ 'et-form-field',
201
+ errorColor ? `et-color--${errorColor}` : `et-color--${options.color ?? 'inherited'}`,
202
+ `et-surface--${options.surface ?? 'inherited'}`,
203
+ options.class,
204
+ ].filter(Boolean);
205
+
206
+ const attributes = attributesOf([
207
+ `class="${classes.join(' ')}"`,
208
+ `data-control-type="${control.controlType}"`,
209
+ error !== undefined && 'data-error="true"',
210
+ open && 'data-expanded=""',
211
+ focused && 'data-focused=""',
212
+ state.readonly && 'data-readonly=""',
213
+ state.disabled && 'data-disabled=""',
214
+ `data-appearance="${appearance}"`,
215
+ `data-fill="${fill}"`,
216
+ fill === 'filled' && 'data-et-surface-fill=""',
217
+ floating && (focused || control.hasValue) && 'data-label-floated=""',
218
+ options.label && 'data-has-label=""',
219
+ `data-label-mode="${labelMode}"`,
220
+ `data-size="${size}"`,
221
+ options.variant === 'ghost' && 'data-variant="ghost"',
222
+ 'data-text-shell="true"',
223
+ options.style && `style="${options.style}"`,
224
+ ]);
225
+
226
+ const labelAreaClasses = [
227
+ 'et-form-field-label-area',
228
+ floating && 'et-form-field-label-area--floating',
229
+ labelMode === 'inline' && 'et-form-field-label-area--inline',
230
+ ].filter(Boolean);
231
+
232
+ const labelHtml = options.label
233
+ ? `<et-label id="${labelId}"${state.disabled ? ' data-disabled="true"' : ''}><span class="et-label-content">${options.label}</span>${state.required ? '<span class="et-label-required-marker" aria-hidden="true">*</span>' : ''}</et-label>`
234
+ : '';
235
+
236
+ const errorHtml =
237
+ error !== undefined
238
+ ? `<div class="et-form-field-support-content et-form-field-errors${errorColor ? ` et-color--${errorColor}` : ''}" id="${errorId}" aria-atomic="true" aria-live="polite" data-active="true" data-direction="from-below" data-state="active"><et-form-error class="et-form-error">${error}</et-form-error></div>`
239
+ : '';
240
+
241
+ const hintHtml =
242
+ hint !== undefined && error === undefined
243
+ ? `<div class="et-form-field-support-content et-form-field-hint" id="${hintId}" data-active="true" data-direction="from-above" data-state="active"><et-hint>${hint}</et-hint></div>`
244
+ : '';
245
+
246
+ const support =
247
+ error !== undefined || hint !== undefined
248
+ ? `<div class="et-color-interactive-exclude et-form-field-support"><div class="et-form-field-support-row"><div class="et-form-field-support-stack">${errorHtml}${hintHtml}</div><div class="et-form-field-support-counter${options.errorColor ? ` et-color--${options.errorColor}` : ''}" hidden></div></div></div>`
249
+ : '';
250
+
251
+ const field = `<et-form-field ${attributes}><div class="et-form-field-shell"><div class="et-form-field-control-frame"><div class="et-form-field-affix et-form-field-prefix">${options.prefix ?? ''}</div><div class="et-form-field-control-area"><div class="${labelAreaClasses.join(' ')}">${labelHtml}</div><div class="et-form-field-control-slot">${control.html(state)}</div></div><div class="et-form-field-affix et-form-field-suffix">${control.suffix?.(state) ?? ''}${options.suffix ?? ''}</div></div></div>${support}</et-form-field>`;
252
+
253
+ if (!open || !control.panel) return field;
254
+
255
+ return `<div class="et-design-panel-anchor">${field}<div class="et-design-panel">${control.panel(state)}</div></div>`;
256
+ };