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

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 (568) hide show
  1. package/CHANGELOG.md +3480 -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 +145 -0
  10. package/design/button.ts +118 -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 +216 -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 +147 -0
  35. package/design/notification.ts +133 -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 +129 -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 +59 -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 +29 -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 +57 -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 +25 -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 +33 -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 +55 -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 +52 -0
  141. package/design/sdk/components/slider/slider.ts +133 -0
  142. package/design/sdk/components/standings/standings.css +33 -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 +48 -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 +99 -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 +660 -0
  165. package/design/sdk/foundations/colors/colors.ts +216 -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 +101 -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 +593 -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/toolbar.ts +95 -0
  189. package/design/tooltip.ts +95 -0
  190. package/design/tree.ts +106 -0
  191. package/fesm2022/ethlete-components-testing.mjs +440 -0
  192. package/fesm2022/ethlete-components-testing.mjs.map +1 -0
  193. package/fesm2022/ethlete-components.mjs +115320 -12455
  194. package/fesm2022/ethlete-components.mjs.map +1 -1
  195. package/generators/component/component-names.js +42 -0
  196. package/generators/component/component-templates.js +211 -0
  197. package/generators/component/generator.js +144 -0
  198. package/generators/component/schema.json +109 -0
  199. package/generators/component/workspace-edits.js +92 -0
  200. package/generators/generators.json +116 -0
  201. package/generators/icons/generator.js +231 -0
  202. package/generators/icons/schema.json +35 -0
  203. package/generators/migrate-bracket-default-cards/bracket-default-cards.js +67 -0
  204. package/generators/migrate-bracket-default-cards/migration.js +63 -0
  205. package/generators/migrate-bracket-default-cards/schema.json +26 -0
  206. package/generators/migrate-bracket-ethlete-renames/bracket-ethlete-renames.js +15 -0
  207. package/generators/migrate-bracket-ethlete-renames/migration.js +31 -0
  208. package/generators/migrate-bracket-ethlete-renames/schema.json +26 -0
  209. package/generators/migrate-cascader-tree-internals/cascader-tree-internals.js +6 -0
  210. package/generators/migrate-cascader-tree-internals/migration.js +11 -0
  211. package/generators/migrate-cascader-tree-internals/schema.json +26 -0
  212. package/generators/migrate-chart-baseline-y/chart-baseline-y.js +10 -0
  213. package/generators/migrate-chart-baseline-y/migration.js +41 -0
  214. package/generators/migrate-chart-baseline-y/schema.json +26 -0
  215. package/generators/migrate-duration-format-internals/duration-format-internals.js +6 -0
  216. package/generators/migrate-duration-format-internals/migration.js +11 -0
  217. package/generators/migrate-duration-format-internals/schema.json +26 -0
  218. package/generators/migrate-error-color-theme-signal/error-color-theme-signal.js +37 -0
  219. package/generators/migrate-error-color-theme-signal/migration.js +55 -0
  220. package/generators/migrate-error-color-theme-signal/schema.json +26 -0
  221. package/generators/migrate-grid-engine-internals/grid-engine-internals.js +43 -0
  222. package/generators/migrate-grid-engine-internals/migration.js +11 -0
  223. package/generators/migrate-grid-engine-internals/schema.json +26 -0
  224. package/generators/migrate-line-chart-stacked-area-mix/line-chart-stacked-area-mix.js +48 -0
  225. package/generators/migrate-line-chart-stacked-area-mix/migration.js +35 -0
  226. package/generators/migrate-line-chart-stacked-area-mix/schema.json +26 -0
  227. package/generators/migrate-loader-determinate/loader-determinate.js +87 -0
  228. package/generators/migrate-loader-determinate/migration.js +49 -0
  229. package/generators/migrate-loader-determinate/schema.json +26 -0
  230. package/generators/migrate-overlay-fullscreen-animation/migration.js +11 -0
  231. package/generators/migrate-overlay-fullscreen-animation/overlay-fullscreen-animation.js +16 -0
  232. package/generators/migrate-overlay-fullscreen-animation/schema.json +26 -0
  233. package/generators/migrate-overlay-nav-tab-imports/migration.js +35 -0
  234. package/generators/migrate-overlay-nav-tab-imports/overlay-nav-tab-imports.js +25 -0
  235. package/generators/migrate-overlay-nav-tab-imports/schema.json +26 -0
  236. package/generators/migrate-pip-window-z-index/migration.js +85 -0
  237. package/generators/migrate-pip-window-z-index/pip-window-z-index.js +60 -0
  238. package/generators/migrate-pip-window-z-index/schema.json +26 -0
  239. package/generators/migrate-query-error-labels/migration-scope.js +30 -0
  240. package/generators/migrate-query-error-labels/migration.js +58 -0
  241. package/generators/migrate-query-error-labels/query-error-labels.js +30 -0
  242. package/generators/migrate-query-error-labels/schema.json +26 -0
  243. package/generators/migrate-rich-text-editor-floating-toolbar/migration.js +57 -0
  244. package/generators/migrate-rich-text-editor-floating-toolbar/rich-text-editor-floating-toolbar.js +28 -0
  245. package/generators/migrate-rich-text-editor-floating-toolbar/schema.json +26 -0
  246. package/generators/migrate-rich-text-editor-link-editor/migration.js +57 -0
  247. package/generators/migrate-rich-text-editor-link-editor/rich-text-editor-link-editor.js +28 -0
  248. package/generators/migrate-rich-text-editor-link-editor/schema.json +26 -0
  249. package/generators/migrate-rich-text-editor-tools/migration.js +64 -0
  250. package/generators/migrate-rich-text-editor-tools/rich-text-editor-tools.js +36 -0
  251. package/generators/migrate-rich-text-editor-tools/schema.json +26 -0
  252. package/generators/migrate-select-input-renames/migration.js +41 -0
  253. package/generators/migrate-select-input-renames/schema.json +26 -0
  254. package/generators/migrate-select-input-renames/select-input-renames.js +37 -0
  255. package/generators/migrate-stream-default-components/migration.js +86 -0
  256. package/generators/migrate-stream-default-components/schema.json +26 -0
  257. package/generators/migrate-stream-default-components/stream-default-components.js +111 -0
  258. package/generators/migrate-time-picker-ring/migration.js +17 -0
  259. package/generators/migrate-time-picker-ring/schema.json +26 -0
  260. package/generators/migrate-time-picker-ring/time-picker-ring.js +25 -0
  261. package/generators/migrate-youtube-player-slot-directive/migration.js +11 -0
  262. package/generators/migrate-youtube-player-slot-directive/schema.json +26 -0
  263. package/generators/migrate-youtube-player-slot-directive/youtube-player-slot-directive.js +12 -0
  264. package/generators/removed-exports/removed-exports.js +154 -0
  265. package/generators/removed-exports/run-removed-exports-migration.js +48 -0
  266. package/migrations/components-sdk-layer.md +55 -0
  267. package/migrations.json +193 -0
  268. package/package.json +47 -17
  269. package/src/lib/accordion/accordion-group.component.css +12 -0
  270. package/src/lib/accordion/accordion.component.css +237 -0
  271. package/src/lib/avatar/avatar-group.component.css +31 -0
  272. package/src/lib/avatar/avatar.component.css +90 -0
  273. package/src/lib/badge/badge.component.css +114 -0
  274. package/src/lib/banner/banner.component.css +102 -0
  275. package/src/lib/bracket/bracket-default-continue.component.css +29 -0
  276. package/src/lib/bracket/bracket-default-final-match.component.css +76 -0
  277. package/src/lib/bracket/bracket-default-match.component.css +21 -0
  278. package/src/lib/bracket/bracket-default-round-header.component.css +36 -0
  279. package/src/lib/bracket/bracket-default-section-title.component.css +14 -0
  280. package/src/lib/bracket/bracket-participants.component.css +13 -0
  281. package/src/lib/bracket/bracket-pick-card.component.css +232 -0
  282. package/src/lib/bracket/bracket-rounds-list.component.css +75 -0
  283. package/src/lib/bracket/bracket-skeleton.component.css +55 -0
  284. package/src/lib/bracket/bracket.component.css +123 -0
  285. package/src/lib/bracket/layouts/swiss/bracket-swiss-styles.component.css +10 -0
  286. package/src/lib/breadcrumb/breadcrumb-outlet.component.css +5 -0
  287. package/src/lib/breadcrumb/breadcrumb-overflow.component.css +38 -0
  288. package/src/lib/breadcrumb/breadcrumb.component.css +127 -0
  289. package/src/lib/button/button-properties-styles.component.css +195 -0
  290. package/src/lib/button/button.component.css +242 -0
  291. package/src/lib/button/button.types.ts +33 -0
  292. package/src/lib/button/fab.component.css +260 -0
  293. package/src/lib/button/icon-button.component.css +156 -0
  294. package/src/lib/button/split-button.component.css +106 -0
  295. package/src/lib/button/text-button.component.css +142 -0
  296. package/src/lib/button/window-control-button.component.css +225 -0
  297. package/src/lib/calendar/calendar-coarse-grid-styles.component.css +29 -0
  298. package/src/lib/calendar/calendar-comparison-band-styles.component.css +36 -0
  299. package/src/lib/calendar/calendar-week-numbers-styles.component.css +32 -0
  300. package/src/lib/calendar/calendar.component.css +376 -0
  301. package/src/lib/card/card.component.css +43 -0
  302. package/src/lib/carousel/carousel-autoplay-styles.component.css +177 -0
  303. package/src/lib/carousel/carousel-transition-styles.component.css +179 -0
  304. package/src/lib/carousel/carousel.component.css +232 -0
  305. package/src/lib/chart/bar-chart.component.css +176 -0
  306. package/src/lib/chart/chart-axis.component.css +40 -0
  307. package/src/lib/chart/chart-grid.component.css +6 -0
  308. package/src/lib/chart/chart-legend.component.css +46 -0
  309. package/src/lib/chart/chart-tooltip.component.css +34 -0
  310. package/src/lib/chart/line-chart-tooltip.component.css +51 -0
  311. package/src/lib/chart/line-chart.component.css +234 -0
  312. package/src/lib/chart/pie-chart.component.css +176 -0
  313. package/src/lib/chart/sankey-chart.component.css +221 -0
  314. package/src/lib/chip/chip.component.css +163 -0
  315. package/src/lib/collapse/collapse.component.css +43 -0
  316. package/src/lib/command-palette/command-palette-item.component.css +98 -0
  317. package/src/lib/command-palette/command-palette.component.css +148 -0
  318. package/src/lib/description-list/description-list.component.css +78 -0
  319. package/src/lib/divider/divider.component.css +40 -0
  320. package/src/lib/empty-state/empty-state.component.css +79 -0
  321. package/src/lib/floating-action/floating-action-styles.component.css +105 -0
  322. package/src/lib/focus-ring/focus-ring-styles.component.css +31 -0
  323. package/src/lib/forms/cascader/cascader-breadcrumb-styles.component.css +98 -0
  324. package/src/lib/forms/cascader/cascader-panel.component.css +387 -0
  325. package/src/lib/forms/cascader/cascader-sheet-styles.component.css +241 -0
  326. package/src/lib/forms/cascader/cascader.component.css +52 -0
  327. package/src/lib/forms/checkbox/checkbox.component.css +291 -0
  328. package/src/lib/forms/choice-field/choice-field-card-styles.component.css +66 -0
  329. package/src/lib/forms/choice-field/choice-field.component.css +227 -0
  330. package/src/lib/forms/color-input/color-input.component.css +110 -0
  331. package/src/lib/forms/color-input/color-picker-panel.component.css +353 -0
  332. package/src/lib/forms/date-time/date-input/date-input.component.css +35 -0
  333. package/src/lib/forms/date-time/date-picker-panel.component.css +115 -0
  334. package/src/lib/forms/date-time/date-range-input/date-range-input.component.css +16 -0
  335. package/src/lib/forms/date-time/date-range-presets.component.css +60 -0
  336. package/src/lib/forms/date-time/date-time-input/date-time-input.component.css +151 -0
  337. package/src/lib/forms/date-time/date-time-range-input/date-time-range-input.component.css +121 -0
  338. package/src/lib/forms/date-time/duration-input/duration-input.component.css +88 -0
  339. package/src/lib/forms/date-time/range-input-shell-styles.component.css +55 -0
  340. package/src/lib/forms/date-time/time-input/time-input.component.css +35 -0
  341. package/src/lib/forms/date-time/time-range-input/time-range-input.component.css +16 -0
  342. package/src/lib/forms/description/description.component.css +7 -0
  343. package/src/lib/forms/dropzone/dropzone-crop.component.css +139 -0
  344. package/src/lib/forms/dropzone/dropzone-item.component.css +67 -0
  345. package/src/lib/forms/dropzone/dropzone-preview-styles.component.css +83 -0
  346. package/src/lib/forms/dropzone/dropzone-readonly-styles.component.css +34 -0
  347. package/src/lib/forms/dropzone/dropzone-row-styles.component.css +85 -0
  348. package/src/lib/forms/dropzone/dropzone.component.css +293 -0
  349. package/src/lib/forms/form-field/counter.component.css +25 -0
  350. package/src/lib/forms/form-field/form-field-control-suffix-styles.component.css +176 -0
  351. package/src/lib/forms/form-field/form-field-rich-text-styles.component.css +31 -0
  352. package/src/lib/forms/form-field/form-field-suffix-overlap-styles.component.css +93 -0
  353. package/src/lib/forms/form-field/form-field-text-shell-styles.component.css +409 -0
  354. package/src/lib/forms/form-field/form-field-textarea-styles.component.css +94 -0
  355. package/src/lib/forms/form-field/form-field.component.css +382 -0
  356. package/src/lib/forms/form-field/form-support-styles.component.css +102 -0
  357. package/src/lib/forms/form-field/headless/label.directive.css +25 -0
  358. package/src/lib/forms/form-field/hint.component.css +18 -0
  359. package/src/lib/forms/input/input.component.css +53 -0
  360. package/src/lib/forms/input/number-input.component.css +128 -0
  361. package/src/lib/forms/input/password-input.component.css +104 -0
  362. package/src/lib/forms/multi-language-rich-text-editor/multi-language-rich-text-editor.component.css +8 -0
  363. package/src/lib/forms/multi-language-rich-text-editor/tools/multi-language-rich-text-editor-language-tool.component.css +104 -0
  364. package/src/lib/forms/otp-input/otp-input.component.css +222 -0
  365. package/src/lib/forms/phone-input/phone-input.component.css +127 -0
  366. package/src/lib/forms/rating/rating.component.css +198 -0
  367. package/src/lib/forms/rich-text-editor/rich-text-content-styles.component.css +234 -0
  368. package/src/lib/forms/rich-text-editor/rich-text-editor-floating-toolbar.component.css +92 -0
  369. package/src/lib/forms/rich-text-editor/rich-text-editor-image-editor.component.css +172 -0
  370. package/src/lib/forms/rich-text-editor/rich-text-editor-link-editor.component.css +149 -0
  371. package/src/lib/forms/rich-text-editor/rich-text-editor-token-palette.component.css +18 -0
  372. package/src/lib/forms/rich-text-editor/rich-text-editor-token-popup.component.css +203 -0
  373. package/src/lib/forms/rich-text-editor/rich-text-editor.component.css +177 -0
  374. package/src/lib/forms/rich-text-editor/rich-text-viewer.component.css +6 -0
  375. package/src/lib/forms/rich-text-editor/tools/rich-text-editor-align-tool.component.css +5 -0
  376. package/src/lib/forms/rich-text-editor/tools/rich-text-editor-heading-tool.component.css +5 -0
  377. package/src/lib/forms/rich-text-editor/tools/rich-text-editor-image-styles.component.css +109 -0
  378. package/src/lib/forms/rich-text-editor/tools/rich-text-editor-table-styles.component.css +21 -0
  379. package/src/lib/forms/rich-text-editor/tools/rich-text-editor-table-tool.component.css +44 -0
  380. package/src/lib/forms/select/select-all-option.component.css +14 -0
  381. package/src/lib/forms/select/select-extras-styles.component.css +149 -0
  382. package/src/lib/forms/select/select-option-group.component.css +36 -0
  383. package/src/lib/forms/select/select-option-styles.component.css +167 -0
  384. package/src/lib/forms/select/select-panel.component.css +119 -0
  385. package/src/lib/forms/select/select.component.css +247 -0
  386. package/src/lib/forms/selection-card-styles.component.css +148 -0
  387. package/src/lib/forms/selection-list/checkbox-group/checkbox-group-select-all.component.css +108 -0
  388. package/src/lib/forms/selection-list/checkbox-group/checkbox-group.component.css +142 -0
  389. package/src/lib/forms/selection-list/checkbox-group/checkbox-option.component.css +172 -0
  390. package/src/lib/forms/selection-list/radio-group/radio-group.component.css +134 -0
  391. package/src/lib/forms/selection-list/radio-group/radio.component.css +154 -0
  392. package/src/lib/forms/selection-list/segmented-button-group/segmented-button-group.component.css +213 -0
  393. package/src/lib/forms/selection-list/segmented-button-group/segmented-button.component.css +199 -0
  394. package/src/lib/forms/slider/range-slider.component.css +440 -0
  395. package/src/lib/forms/slider/slider.component.css +434 -0
  396. package/src/lib/forms/switch/switch.component.css +217 -0
  397. package/src/lib/forms/tag-input/tag-input.component.css +54 -0
  398. package/src/lib/forms/textarea/textarea-autosize-styles.component.css +16 -0
  399. package/src/lib/forms/textarea/textarea.component.css +45 -0
  400. package/src/lib/grid/grid-debug.component.css +130 -0
  401. package/src/lib/grid/grid-item-default-actions.component.css +11 -0
  402. package/src/lib/grid/grid-item-toolbar.component.css +10 -0
  403. package/src/lib/grid/grid-item.component.css +177 -0
  404. package/src/lib/grid/grid.component.css +56 -0
  405. package/src/lib/icon/headless/align-icons.ts +30 -0
  406. package/src/lib/icon/headless/arrow-out-up-right-icon.ts +17 -0
  407. package/src/lib/icon/headless/arrow-right-icon.ts +23 -0
  408. package/src/lib/icon/headless/arrow-up-icon.ts +30 -0
  409. package/src/lib/icon/headless/arrows-left-right-icon.ts +31 -0
  410. package/src/lib/icon/headless/bold-icon.ts +11 -0
  411. package/src/lib/icon/headless/calendar-icon.ts +21 -0
  412. package/src/lib/icon/headless/check-icon.ts +14 -0
  413. package/src/lib/icon/headless/chevron-icon.ts +14 -0
  414. package/src/lib/icon/headless/circle-check-icon.ts +14 -0
  415. package/src/lib/icon/headless/circle-info-icon.ts +14 -0
  416. package/src/lib/icon/headless/clipboard-check-icon.ts +28 -0
  417. package/src/lib/icon/headless/clock-icon.ts +21 -0
  418. package/src/lib/icon/headless/code-block-icon.ts +15 -0
  419. package/src/lib/icon/headless/code-icon.ts +14 -0
  420. package/src/lib/icon/headless/ellipsis-icon.ts +13 -0
  421. package/src/lib/icon/headless/ellipsis-vertical-icon.ts +13 -0
  422. package/src/lib/icon/headless/eye-icons.ts +27 -0
  423. package/src/lib/icon/headless/eyedropper-icon.ts +22 -0
  424. package/src/lib/icon/headless/file-icon.ts +16 -0
  425. package/src/lib/icon/headless/filter-icon.ts +11 -0
  426. package/src/lib/icon/headless/floppy-disk-icon.ts +27 -0
  427. package/src/lib/icon/headless/focus-frame-icon.ts +16 -0
  428. package/src/lib/icon/headless/grid-2x2-icon.ts +17 -0
  429. package/src/lib/icon/headless/heading-1-icon.ts +11 -0
  430. package/src/lib/icon/headless/heading-2-icon.ts +11 -0
  431. package/src/lib/icon/headless/heading-3-icon.ts +11 -0
  432. package/src/lib/icon/headless/icon-definition.ts +14 -0
  433. package/src/lib/icon/headless/icon-styles.component.css +7 -0
  434. package/src/lib/icon/headless/image-icon.ts +14 -0
  435. package/src/lib/icon/headless/italic-icon.ts +19 -0
  436. package/src/lib/icon/headless/link-icon.ts +17 -0
  437. package/src/lib/icon/headless/list-bulleted-icon.ts +14 -0
  438. package/src/lib/icon/headless/list-numbered-icon.ts +14 -0
  439. package/src/lib/icon/headless/location-icon.ts +21 -0
  440. package/src/lib/icon/headless/lock-icon.ts +14 -0
  441. package/src/lib/icon/headless/minus-icon.ts +14 -0
  442. package/src/lib/icon/headless/paragraph-icon.ts +11 -0
  443. package/src/lib/icon/headless/pause-icon.ts +11 -0
  444. package/src/lib/icon/headless/pencil-icon.ts +21 -0
  445. package/src/lib/icon/headless/play-icon.ts +10 -0
  446. package/src/lib/icon/headless/plus-icon.ts +21 -0
  447. package/src/lib/icon/headless/quote-icon.ts +15 -0
  448. package/src/lib/icon/headless/rotate-right-icon.ts +16 -0
  449. package/src/lib/icon/headless/star-icon.ts +14 -0
  450. package/src/lib/icon/headless/strikethrough-icon.ts +18 -0
  451. package/src/lib/icon/headless/table-icon.ts +15 -0
  452. package/src/lib/icon/headless/thumbtack-icon.ts +18 -0
  453. package/src/lib/icon/headless/times-icon.ts +14 -0
  454. package/src/lib/icon/headless/trash-icon.ts +24 -0
  455. package/src/lib/icon/headless/triangle-exclamation-icon.ts +14 -0
  456. package/src/lib/icon/headless/trophy-icon.ts +24 -0
  457. package/src/lib/icon/headless/underline-icon.ts +12 -0
  458. package/src/lib/icon/headless/undo-redo-icons.ts +24 -0
  459. package/src/lib/icon/headless/upload-icon.ts +16 -0
  460. package/src/lib/kbd/kbd.component.css +62 -0
  461. package/src/lib/loader/brand-loader/brand-loader.component.css +133 -0
  462. package/src/lib/loader/progress-bar/progress-bar.component.css +186 -0
  463. package/src/lib/loader/spinner/spinner-styles.component.css +225 -0
  464. package/src/lib/loader/spinner/spinner-sweep-dashes.ts +19 -0
  465. package/src/lib/masonry/masonry-styles.component.css +84 -0
  466. package/src/lib/match/match-card.component.css +556 -0
  467. package/src/lib/match/match-participant.component.css +236 -0
  468. package/src/lib/match/match-score.component.css +77 -0
  469. package/src/lib/match/match-scoreline.component.css +53 -0
  470. package/src/lib/match/match-time.component.css +5 -0
  471. package/src/lib/menu/menu-group-label.component.css +12 -0
  472. package/src/lib/menu/menu-item-shortcut.component.css +26 -0
  473. package/src/lib/menu/menu-item-submenu-icon.component.css +18 -0
  474. package/src/lib/menu/menu-item.component.css +36 -0
  475. package/src/lib/menu/menu-search-styles.component.css +83 -0
  476. package/src/lib/menu/menu-selection-item.component.css +92 -0
  477. package/src/lib/menu/menu-separator.component.css +9 -0
  478. package/src/lib/menu/menu.component.css +307 -0
  479. package/src/lib/notification/notification-stack.component.css +114 -0
  480. package/src/lib/notification/notification.component.css +275 -0
  481. package/src/lib/overlay/alert-dialog/alert-dialog.component.css +55 -0
  482. package/src/lib/overlay/floating-panel-styles.component.css +71 -0
  483. package/src/lib/overlay/floating-tip-styles.component.css +84 -0
  484. package/src/lib/overlay/overlay-container.component.css +170 -0
  485. package/src/lib/overlay/overlay-main-styles.component.css +105 -0
  486. package/src/lib/overlay/overlay-template-host.component.css +7 -0
  487. package/src/lib/overlay/routing/overlay-route-header-template-outlet.component.css +36 -0
  488. package/src/lib/overlay/routing/overlay-router-outlet.component.css +215 -0
  489. package/src/lib/overlay/routing/overlay-shared-route-template-outlet.component.css +5 -0
  490. package/src/lib/overlay/sidebar/overlay-sidebar.component.css +23 -0
  491. package/src/lib/overlay/strategies/anchored-dialog-styles.component.css +78 -0
  492. package/src/lib/overlay/strategies/dialog-styles.component.css +77 -0
  493. package/src/lib/overlay/strategies/full-screen-dialog-styles.component.css +141 -0
  494. package/src/lib/overlay/strategies/overlay-arrow-styles.component.css +112 -0
  495. package/src/lib/overlay/strategies/overlay-origin-clone.component.css +92 -0
  496. package/src/lib/overlay/strategies/sheet-styles.component.css +170 -0
  497. package/src/lib/pagination/page-size-select.component.css +6 -0
  498. package/src/lib/pagination/pagination.component.css +186 -0
  499. package/src/lib/picture/picture.component.css +82 -0
  500. package/src/lib/progress-steps/progress-step.component.css +269 -0
  501. package/src/lib/progress-steps/progress-steps.component.css +26 -0
  502. package/src/lib/query-error/query-error.component.css +27 -0
  503. package/src/lib/scheduler/scheduler-agenda-view.component.css +106 -0
  504. package/src/lib/scheduler/scheduler-appointment-drag-styles.component.css +56 -0
  505. package/src/lib/scheduler/scheduler-appointment-styles.component.css +127 -0
  506. package/src/lib/scheduler/scheduler-edit-color.component.css +16 -0
  507. package/src/lib/scheduler/scheduler-edit-surface-actions.component.css +14 -0
  508. package/src/lib/scheduler/scheduler-edit-surface-breadcrumb.component.css +26 -0
  509. package/src/lib/scheduler/scheduler-edit-surface-children.component.css +57 -0
  510. package/src/lib/scheduler/scheduler-edit-surface-fields.component.css +11 -0
  511. package/src/lib/scheduler/scheduler-edit-surface-footer.component.css +7 -0
  512. package/src/lib/scheduler/scheduler-edit-surface-header.component.css +15 -0
  513. package/src/lib/scheduler/scheduler-edit-time-range.component.css +11 -0
  514. package/src/lib/scheduler/scheduler-month-view.component.css +145 -0
  515. package/src/lib/scheduler/scheduler-time-grid-view.component.css +271 -0
  516. package/src/lib/scheduler/scheduler.component.css +87 -0
  517. package/src/lib/scrollable/headless/scrollable-buttons.component.css +223 -0
  518. package/src/lib/scrollable/headless/scrollable-footer.css +37 -0
  519. package/src/lib/scrollable/headless/scrollable-masks.component.css +165 -0
  520. package/src/lib/scrollable/headless/scrollable-navigation.component.css +94 -0
  521. package/src/lib/scrollable/scrollable.component.css +234 -0
  522. package/src/lib/scrollbar/scrollbar.component.css +116 -0
  523. package/src/lib/skeleton/skeleton.component.css +138 -0
  524. package/src/lib/standings/standings-pick.component.css +216 -0
  525. package/src/lib/standings/standings.component.css +353 -0
  526. package/src/lib/stat-tile/stat-tile-sparkline.component.css +49 -0
  527. package/src/lib/stat-tile/stat-tile.component.css +134 -0
  528. package/src/lib/stream/consent/stream-consent.component.css +100 -0
  529. package/src/lib/stream/error/stream-player-error.component.css +101 -0
  530. package/src/lib/stream/loading/stream-player-loading.component.css +16 -0
  531. package/src/lib/stream/pip/pip-player.component.css +40 -0
  532. package/src/lib/stream/pip/pip-slot-placeholder.component.css +68 -0
  533. package/src/lib/stream/pip/pip-stage-styles.component.css +96 -0
  534. package/src/lib/stream/pip/pip-window.component.css +222 -0
  535. package/src/lib/stream/stream-manager-styles.component.css +10 -0
  536. package/src/lib/stream/stream-overlay-card-styles.component.css +69 -0
  537. package/src/lib/stream/stream-player-slot-styles.component.css +18 -0
  538. package/src/lib/table/table-column-chooser.component.css +17 -0
  539. package/src/lib/table/table-column-menu-trigger.component.css +31 -0
  540. package/src/lib/table/table-detail-styles.component.css +103 -0
  541. package/src/lib/table/table-drag-scroll-styles.component.css +18 -0
  542. package/src/lib/table/table-expander-cell.component.css +64 -0
  543. package/src/lib/table/table-filter-trigger.component.css +44 -0
  544. package/src/lib/table/table-group-header-row.component.css +38 -0
  545. package/src/lib/table/table-inline-edit-styles.component.css +20 -0
  546. package/src/lib/table/table-page-sticky-header-styles.component.css +77 -0
  547. package/src/lib/table/table-reorder-overlay.component.css +42 -0
  548. package/src/lib/table/table-resize-grip.component.css +66 -0
  549. package/src/lib/table/table-row-box-styles.component.css +272 -0
  550. package/src/lib/table/table-select-cell.component.css +119 -0
  551. package/src/lib/table/table-skeleton-rows.component.css +19 -0
  552. package/src/lib/table/table-sort-priority-styles.component.css +15 -0
  553. package/src/lib/table/table-sticky-columns-styles.component.css +80 -0
  554. package/src/lib/table/table-virtual-scroll-styles.component.css +9 -0
  555. package/src/lib/table/table.component.css +865 -0
  556. package/src/lib/tabs/nav-tabs/nav-tab-link-styles.component.css +37 -0
  557. package/src/lib/tabs/tab-bar-styles.component.css +230 -0
  558. package/src/lib/tabs/tab-scale-styles.component.css +61 -0
  559. package/src/lib/tabs/tabs/tab-group.component.css +115 -0
  560. package/src/lib/time-picker/time-picker.component.css +221 -0
  561. package/src/lib/timeline/timeline-item.component.css +142 -0
  562. package/src/lib/timeline/timeline.component.css +7 -0
  563. package/src/lib/toggletip/toggletip.component.css +83 -0
  564. package/src/lib/toolbar/toolbar.component.css +44 -0
  565. package/src/lib/tooltip/tooltip.component.css +84 -0
  566. package/src/lib/tree/tree.component.css +221 -0
  567. package/types/ethlete-components-testing.d.ts +300 -0
  568. package/types/ethlete-components.d.ts +37454 -3814
@@ -0,0 +1,275 @@
1
+ import { interactiveStyles } from '@ethlete/core/design/interactive-styles';
2
+ import checkboxBase from '../src/lib/forms/checkbox/checkbox.component.css?inline';
3
+ import choiceFieldBase from '../src/lib/forms/choice-field/choice-field.component.css?inline';
4
+ import description from '../src/lib/forms/description/description.component.css?inline';
5
+ import choiceFieldCard from '../src/lib/forms/choice-field/choice-field-card-styles.component.css?inline';
6
+ import formSupport from '../src/lib/forms/form-field/form-support-styles.component.css?inline';
7
+ import label from '../src/lib/forms/form-field/headless/label.directive.css?inline';
8
+ import selectionCard from '../src/lib/forms/selection-card-styles.component.css?inline';
9
+ import checkboxGroupBase from '../src/lib/forms/selection-list/checkbox-group/checkbox-group.component.css?inline';
10
+ import checkboxGroupSelectAll from '../src/lib/forms/selection-list/checkbox-group/checkbox-group-select-all.component.css?inline';
11
+ import checkboxOption from '../src/lib/forms/selection-list/checkbox-group/checkbox-option.component.css?inline';
12
+ import focusRing from '../src/lib/focus-ring/focus-ring-styles.component.css?inline';
13
+
14
+ /** An interaction a frame forces with the `data-et-force` design marker. */
15
+ export type CheckboxMockForce = 'hover' | 'focus-visible' | 'active';
16
+
17
+ type CheckboxMockSupport = {
18
+ /** The hint, as HTML. Hidden while an `error` shows. */
19
+ hint?: string;
20
+ /** The error message, as HTML. Draws the control touched and invalid. */
21
+ error?: string;
22
+ /** The color theme name the app registers for errors, e.g. `danger` in Storybook. */
23
+ errorColor?: string;
24
+ };
25
+
26
+ export type CheckboxMockOptions = CheckboxMockSupport & {
27
+ checked?: boolean;
28
+ /** The tri-state `mixed` value. Wins over `checked`. */
29
+ indeterminate?: boolean;
30
+ disabled?: boolean;
31
+ /** View-only: the normal look, without the interactive affordance. */
32
+ readonly?: boolean;
33
+ required?: boolean;
34
+ /** The label, as HTML. Draws the checkbox inside an `<et-choice-field>`; left out, the checkbox stands alone. */
35
+ label?: string;
36
+ /** The `et-description` under the label, as HTML. Only drawn with a `label`. */
37
+ description?: string;
38
+ /** Unique per frame: the label, description and message ids derive from it. */
39
+ id?: string;
40
+ /** The `et-choice-field` size. Only drawn with a `label`. */
41
+ size?: 'sm' | 'md' | 'lg';
42
+ /** The `et-choice-field` variant. Only drawn with a `label`. */
43
+ variant?: 'plain' | 'card';
44
+ /** Where a `card` puts the checkbox. */
45
+ controlPosition?: 'start' | 'end';
46
+ /** A color theme name the app registers. Only drawn with a `label`. */
47
+ color?: string;
48
+ /** Forced interactions, as if the pointer or keyboard were on the box. */
49
+ force?: CheckboxMockForce | CheckboxMockForce[];
50
+ };
51
+
52
+ export type CheckboxGroupMockOption = {
53
+ /** The option label, as HTML. */
54
+ label: string;
55
+ checked?: boolean;
56
+ disabled?: boolean;
57
+ /** The `et-description` under the label, as HTML. */
58
+ description?: string;
59
+ /** Forced interactions on this option. */
60
+ force?: CheckboxMockForce | CheckboxMockForce[];
61
+ };
62
+
63
+ export type CheckboxGroupMockOptions = CheckboxMockSupport & {
64
+ options: CheckboxGroupMockOption[];
65
+ /** The group label, as HTML. */
66
+ label?: string;
67
+ /** Draws an `<et-checkbox-group-select-all>` row with this text, e.g. `Select all`. */
68
+ selectAll?: string;
69
+ /** Forced interactions on the select-all row. */
70
+ selectAllForce?: CheckboxMockForce | CheckboxMockForce[];
71
+ /** The bulk-edit state: no option reads as checked yet, whatever its `checked`. */
72
+ mixed?: boolean;
73
+ disabled?: boolean;
74
+ readonly?: boolean;
75
+ required?: boolean;
76
+ /** Unique per frame: the label and message ids derive from it. */
77
+ id?: string;
78
+ size?: 'sm' | 'md' | 'lg';
79
+ orientation?: 'vertical' | 'horizontal';
80
+ variant?: 'plain' | 'card';
81
+ /** Where a `card` option puts its box. */
82
+ controlPosition?: 'start' | 'end';
83
+ /** A color theme name the app registers. */
84
+ color?: string;
85
+ };
86
+
87
+ /** The stylesheets `checkbox()` draws with: the real `et-checkbox`, `et-choice-field` and form support CSS. */
88
+ export const checkboxStyles = /* @__PURE__ */ [
89
+ interactiveStyles,
90
+ focusRing,
91
+ label,
92
+ description,
93
+ formSupport,
94
+ selectionCard,
95
+ choiceFieldBase,
96
+ choiceFieldCard,
97
+ checkboxBase,
98
+ ].join('\n');
99
+
100
+ /** The stylesheets `checkboxGroup()` draws with: the real `et-checkbox-group` and form support CSS. */
101
+ export const checkboxGroupStyles = /* @__PURE__ */ [
102
+ interactiveStyles,
103
+ label,
104
+ description,
105
+ formSupport,
106
+ selectionCard,
107
+ checkboxGroupBase,
108
+ checkboxGroupSelectAll,
109
+ checkboxOption,
110
+ ].join('\n');
111
+
112
+ const forceList = (force: CheckboxMockForce | CheckboxMockForce[] | undefined) =>
113
+ force === undefined ? [] : Array.isArray(force) ? force : [force];
114
+
115
+ const forceMarker = (force: CheckboxMockForce[]) => force.length > 0 && `data-et-force="${force.join(' ')}"`;
116
+
117
+ const CHECKMARK =
118
+ '<svg viewBox="0 0 16 16" aria-hidden="true" class="et-checkbox-checkmark"><polyline points="3.5 8 6.5 11 12.5 5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="et-checkbox-checkmark-path"></polyline></svg>';
119
+
120
+ const INDETERMINATE_MARK =
121
+ '<svg viewBox="0 0 16 16" aria-hidden="true" class="et-checkbox-indeterminate"><line x1="4" y1="8" x2="12" y2="8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" class="et-checkbox-indeterminate-path"></line></svg>';
122
+
123
+ const optionCheck = (className: string, hidden: boolean) =>
124
+ `<svg viewBox="0 0 12 10" fill="none"${hidden ? ' aria-hidden="true"' : ''} class="${className}"><path d="M1 5L4.5 8.5L11 1.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>`;
125
+
126
+ const supportOf = (
127
+ options: CheckboxMockSupport,
128
+ context: { ids: { hint: string; error: string }; exclude: boolean },
129
+ ) => {
130
+ const { ids, exclude } = context;
131
+ const { hint, error, errorColor } = options;
132
+
133
+ if (hint === undefined && error === undefined) return '';
134
+
135
+ const content =
136
+ error !== undefined
137
+ ? `<div class="et-form-support-content et-form-support-errors${errorColor ? ` et-color--${errorColor}` : ''}" id="${ids.error}" 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>`
138
+ : `<div class="et-form-support-content et-form-support-hint" id="${ids.hint}" data-active="true" data-direction="from-above" data-state="active"><et-hint>${hint}</et-hint></div>`;
139
+
140
+ return `<et-form-support class="et-form-support${exclude ? ' et-color-interactive-exclude' : ''}"><div class="et-form-support-stack">${content}</div></et-form-support>`;
141
+ };
142
+
143
+ const supportIdOf = (options: CheckboxMockSupport, ids: { hint: string; error: string }) =>
144
+ options.error !== undefined ? ids.error : options.hint !== undefined ? ids.hint : null;
145
+
146
+ const labelOf = (id: string, options: { label?: string; disabled?: boolean; required?: boolean }) =>
147
+ `<et-label id="${id}"${options.disabled ? ' data-disabled="true"' : ''}><span class="et-label-content">${options.label ?? ''}</span>${options.required ? '<span aria-hidden="true" class="et-label-required-marker">*</span>' : ''}</et-label>`;
148
+
149
+ /** Draws `<et-checkbox>` as HTML, inside an `<et-choice-field>` when it has a label, with the DOM the components render. */
150
+ export const checkbox = (options: CheckboxMockOptions = {}) => {
151
+ const { id = 'checkbox', variant = 'plain' } = options;
152
+ const hasField = options.label !== undefined;
153
+ const ids = { hint: `et-form-field-hint-${id}`, error: `et-form-field-error-${id}` };
154
+ const labelId = hasField ? `et-label-${id}` : null;
155
+ const descriptionId = hasField && options.description !== undefined ? `et-description-${id}` : null;
156
+ const describedBy = hasField ? [descriptionId, supportIdOf(options, ids)].filter(Boolean).join(' ') : '';
157
+ const invalid = hasField && options.error !== undefined;
158
+ const force = forceList(options.force);
159
+
160
+ const checkboxAttributes = [
161
+ 'role="checkbox"',
162
+ 'class="et-color-interactive et-checkbox et-focus-ring"',
163
+ `aria-checked="${options.indeterminate ? 'mixed' : !!options.checked}"`,
164
+ options.disabled && 'aria-disabled="true"',
165
+ options.readonly && 'aria-readonly="true" data-readonly="true"',
166
+ options.required && 'aria-required="true"',
167
+ describedBy && `aria-describedby="${describedBy}"`,
168
+ labelId && `aria-labelledby="${labelId}"`,
169
+ `tabindex="${options.disabled ? -1 : 0}"`,
170
+ invalid && 'aria-invalid="true"',
171
+ forceMarker(force),
172
+ ].filter(Boolean);
173
+
174
+ const control = `<et-checkbox ${checkboxAttributes.join(' ')}><div class="et-checkbox-box">${CHECKMARK}${INDETERMINATE_MARK}</div></et-checkbox>`;
175
+
176
+ if (labelId === null) return control;
177
+
178
+ const colorClass = invalid && options.errorColor ? options.errorColor : (options.color ?? 'inherited');
179
+
180
+ const fieldAttributes = [
181
+ `class="et-choice-field et-color--${colorClass}"`,
182
+ `data-size="${options.size ?? 'md'}"`,
183
+ `data-variant="${variant}"`,
184
+ variant === 'card' && `data-control-position="${options.controlPosition ?? 'end'}"`,
185
+ invalid && 'data-error="true"',
186
+ ].filter(Boolean);
187
+
188
+ const controlAttributes = [
189
+ `class="et-color-interactive-container et-color-interactive et-choice-field-control${variant === 'card' ? ' et-selection-card' : ''}"`,
190
+ forceMarker(force.filter((name) => name !== 'focus-visible')),
191
+ ].filter(Boolean);
192
+
193
+ const description = descriptionId
194
+ ? `<et-description class="et-description" id="${descriptionId}">${options.description}</et-description>`
195
+ : '';
196
+
197
+ return `<et-choice-field ${fieldAttributes.join(' ')}><div ${controlAttributes.join(' ')}><div class="et-choice-field-control-slot et-selection-card-control">${control}</div><div class="et-choice-field-label-area et-selection-card-content">${labelOf(labelId, options)}${description}</div></div>${supportOf(options, { ids, exclude: true })}</et-choice-field>`;
198
+ };
199
+
200
+ /** Draws `<et-checkbox-group>` with its `<et-checkbox-option>`s as HTML, with the DOM the components render. */
201
+ export const checkboxGroup = (options: CheckboxGroupMockOptions) => {
202
+ const { id = 'checkbox-group', variant = 'plain' } = options;
203
+ const ids = { hint: `et-form-field-hint-${id}`, error: `et-form-field-error-${id}` };
204
+ const labelId = options.label !== undefined ? `et-label-${id}` : null;
205
+ const supportId = supportIdOf(options, ids);
206
+ const invalid = options.error !== undefined;
207
+ const colorClass = invalid && options.errorColor ? options.errorColor : (options.color ?? 'inherited');
208
+ const enabled = (option: CheckboxGroupMockOption) => !options.disabled && !option.disabled;
209
+ const isChecked = (option: CheckboxGroupMockOption) => !options.mixed && !!option.checked;
210
+ const tabStop = options.options.find((o) => isChecked(o) && enabled(o)) ?? options.options.find(enabled);
211
+
212
+ const groupAttributes = [
213
+ `class="et-checkbox-group et-color--${colorClass}"`,
214
+ 'role="group"',
215
+ invalid && 'aria-invalid="true"',
216
+ options.required && 'aria-required="true"',
217
+ supportId && `aria-describedby="${supportId}"`,
218
+ labelId && `aria-labelledby="${labelId}"`,
219
+ options.disabled && 'data-disabled="true"',
220
+ options.mixed && 'data-mixed="true"',
221
+ options.readonly && 'data-readonly="true"',
222
+ `data-size="${options.size ?? 'md'}"`,
223
+ `data-orientation="${options.orientation ?? 'vertical'}"`,
224
+ invalid && 'data-error="true"',
225
+ ].filter(Boolean);
226
+
227
+ const checkedCount = options.options.filter(isChecked).length;
228
+ const selectAllChecked = checkedCount === 0 ? 'false' : checkedCount === options.options.length ? 'true' : 'mixed';
229
+
230
+ const selectAll =
231
+ options.selectAll !== undefined
232
+ ? `<et-checkbox-group-select-all ${[
233
+ 'class="et-color-interactive et-checkbox-group-select-all"',
234
+ 'role="checkbox"',
235
+ `aria-checked="${selectAllChecked}"`,
236
+ options.disabled && 'aria-disabled="true"',
237
+ options.readonly && 'aria-readonly="true"',
238
+ `tabindex="${options.disabled ? -1 : 0}"`,
239
+ forceMarker(forceList(options.selectAllForce)),
240
+ ]
241
+ .filter(Boolean)
242
+ .join(
243
+ ' ',
244
+ )}><span class="et-checkbox-group-select-all-box">${optionCheck('et-checkbox-group-select-all-check', true)}<span aria-hidden="true" class="et-checkbox-group-select-all-dash"></span></span><span class="et-checkbox-group-select-all-label">${options.selectAll}</span></et-checkbox-group-select-all>`
245
+ : '';
246
+
247
+ const items = options.options
248
+ .map((option, index) => {
249
+ const optionLabelId = `et-selection-option-label-${id}-${index}`;
250
+ const descriptionId = option.description !== undefined ? `et-description-${id}-${index}` : null;
251
+ const attributes = [
252
+ `class="et-color-interactive et-checkbox-option${variant === 'card' ? ' et-selection-card' : ''}"`,
253
+ 'role="checkbox"',
254
+ `aria-checked="${isChecked(option)}"`,
255
+ `aria-labelledby="${optionLabelId}"`,
256
+ descriptionId && `aria-describedby="${descriptionId}"`,
257
+ !enabled(option) && 'aria-disabled="true"',
258
+ options.readonly && 'aria-readonly="true" data-readonly="true"',
259
+ `tabindex="${option === tabStop ? 0 : -1}"`,
260
+ `data-variant="${variant}"`,
261
+ variant === 'card' && `data-control-position="${options.controlPosition ?? 'end'}"`,
262
+ forceMarker(forceList(option.force)),
263
+ ].filter(Boolean);
264
+ const description = descriptionId
265
+ ? `<et-description class="et-description" id="${descriptionId}">${option.description}</et-description>`
266
+ : '';
267
+
268
+ return `<et-checkbox-option ${attributes.join(' ')}><div class="et-checkbox-option-box et-selection-card-control">${optionCheck('et-checkbox-option-check', false)}</div><div class="et-checkbox-option-content et-selection-card-content"><span class="et-checkbox-option-label et-selection-card-label" id="${optionLabelId}">${option.label}</span>${description}</div></et-checkbox-option>`;
269
+ })
270
+ .join('');
271
+
272
+ const labelHtml = labelId ? labelOf(labelId, options) : '';
273
+
274
+ return `<et-checkbox-group ${groupAttributes.join(' ')}>${labelHtml}${selectAll}${items}${supportOf(options, { ids, exclude: false })}</et-checkbox-group>`;
275
+ };
package/design/chip.ts ADDED
@@ -0,0 +1,64 @@
1
+ import chipBase from '../src/lib/chip/chip.component.css?inline';
2
+ import iconBase from '../src/lib/icon/headless/icon-styles.component.css?inline';
3
+ import { TIMES_ICON } from '../src/lib/icon/headless/times-icon';
4
+ import { iconMarkup } from './icon';
5
+
6
+ export type ChipMockOptions = {
7
+ label: string;
8
+ removable?: boolean;
9
+ disabled?: boolean;
10
+ /** The role `etSelectionOption` gives the chip: `checkbox` in a multiple selection list, `radio` in a single one. */
11
+ selection?: 'checkbox' | 'radio';
12
+ selected?: boolean;
13
+ readonly?: boolean;
14
+ /** A color theme name the app registers. Left out, the chip takes the color theme around it. */
15
+ color?: string;
16
+ /** Extra attributes on the remove button, e.g. design markers. */
17
+ removeAttributes?: string;
18
+ /** Extra attributes on the chip, e.g. design markers. */
19
+ attributes?: string;
20
+ };
21
+
22
+ /** The stylesheets `chip()` draws with: the real chip and icon CSS. */
23
+ export const chipStyles = /* @__PURE__ */ [
24
+ iconBase,
25
+ chipBase,
26
+ `@layer components.sdk {
27
+ .et-chip-mock-row {
28
+ display: flex;
29
+ flex-wrap: wrap;
30
+ align-items: center;
31
+ gap: 8px;
32
+ }
33
+ }`,
34
+ ].join('\n');
35
+
36
+ let labelCount = 0;
37
+
38
+ /** Draws an `et-chip` as the component renders it, alone or as an `etSelectionOption`, as HTML. */
39
+ export const chip = (options: ChipMockOptions) => {
40
+ const labelId = `et-chip-label-mock-${labelCount++}`;
41
+ const removeButton = options.removable
42
+ ? `<button ${options.removeAttributes ?? ''} aria-describedby="${labelId}" etChipRemove type="button" aria-label="Remove" class="et-chip-remove-button"${options.disabled ? ' disabled' : ''}>${iconMarkup(TIMES_ICON)}</button>`
43
+ : '';
44
+ const selection = options.selection
45
+ ? [
46
+ `etSelectionOption role="${options.selection}" aria-checked="${!!options.selected}"`,
47
+ options.readonly ? 'data-readonly' : '',
48
+ options.readonly && options.selection === 'checkbox' ? 'aria-readonly="true"' : '',
49
+ `tabindex="${options.disabled ? -1 : 0}"`,
50
+ ]
51
+ : [];
52
+ const attributes = [
53
+ options.attributes ?? '',
54
+ ...selection,
55
+ options.disabled ? 'data-disabled="true" aria-disabled="true"' : '',
56
+ options.removable ? 'data-removable="true"' : '',
57
+ `class="et-chip et-color--${options.color ?? 'inherited'}"`,
58
+ ].filter(Boolean);
59
+
60
+ return `<et-chip ${attributes.join(' ')}><span id="${labelId}" class="et-chip-label">${options.label}</span>${removeButton}</et-chip>`;
61
+ };
62
+
63
+ /** Draws chips in a wrapping row, as a chip list or selection list lays them out. */
64
+ export const chipRow = (chips: string[]) => `<div class="et-chip-mock-row">${chips.join('')}</div>`;
@@ -0,0 +1,26 @@
1
+ {
2
+ "products": {
3
+ "sdk": {
4
+ "tokens": [
5
+ "foundations/colors"
6
+ ],
7
+ "presets": {
8
+ "phone": {
9
+ "width": 390,
10
+ "height": 844
11
+ },
12
+ "desktop": {
13
+ "width": 1440,
14
+ "height": 900
15
+ }
16
+ },
17
+ "generatedFiles": [
18
+ "foundations/colors/colors.css"
19
+ ],
20
+ "harness": {
21
+ "app": "apps/docs-examples",
22
+ "map": "apps/docs-examples/src/app/design-harness/design-harness-parts.ts"
23
+ }
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Marks the root element of a control's markup as `data-et-control` and animatable, so the design check can see its
3
+ * transitions. On markup that is already a control, for example a reused part's render, it renames the control.
4
+ */
5
+ export const control = (markup: string, name: string) => {
6
+ const rootTag = /^\s*<[a-zA-Z][^>]*/.exec(markup)?.[0];
7
+
8
+ if (!rootTag) {
9
+ throw new Error(`control("${name}"): the markup has no root element.`);
10
+ }
11
+
12
+ const tagName = /^\s*<[a-zA-Z][^\s/>]*/.exec(rootTag)?.[0] ?? rootTag;
13
+ const rest = rootTag
14
+ .slice(tagName.length)
15
+ .replace(/\s+data-et-control="[^"]*"/u, '')
16
+ .replace(/\s+data-can-animate="[^"]*"/u, '');
17
+
18
+ return `${tagName} data-et-control="${name}" data-can-animate="true"${rest}${markup.slice(rootTag.length)}`;
19
+ };
@@ -0,0 +1,59 @@
1
+ import iconButtonBase from '../src/lib/button/icon-button.component.css?inline';
2
+ import textButtonBase from '../src/lib/button/text-button.component.css?inline';
3
+ import { CHECK_ICON } from '../src/lib/icon/headless/check-icon';
4
+ import { CLIPBOARD_CHECK_ICON } from '../src/lib/icon/headless/clipboard-check-icon';
5
+ import iconBase from '../src/lib/icon/headless/icon-styles.component.css?inline';
6
+ import { buttonStyles } from './button';
7
+ import { iconMarkup } from './icon';
8
+
9
+ export type CopyButtonMockOptions = {
10
+ /** `icon` composes `etCopyButton` with `et-icon-button`, `text` with `et-text-button`. */
11
+ kind: 'icon' | 'text';
12
+ /** The outcome of the last copy, while `copied()` or `copyFailed()` holds. Left out, idle. */
13
+ outcome?: 'copied' | 'failed';
14
+ /** The icon button's variant. Left out, `transparent`, as `et-icon-button` defaults to. */
15
+ variant?: 'filled' | 'outline' | 'tonal' | 'transparent';
16
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
17
+ disabled?: boolean;
18
+ /** Extra attributes on the button, e.g. design markers. */
19
+ attributes?: string;
20
+ };
21
+
22
+ /** The stylesheets `copyButton()` draws with: the real icon-button, text-button, button and icon CSS. */
23
+ export const copyButtonStyles = /* @__PURE__ */ [buttonStyles, iconBase, iconButtonBase, textButtonBase].join('\n');
24
+
25
+ /**
26
+ * Draws a `<button etCopyButton>` composed as the copy-button docs show it - an `et-icon-button` swapping the
27
+ * clipboard icon for a check, or an `et-text-button` swapping `Copy` for `Copied!`, as HTML. The
28
+ * directive's visually hidden live region is left out.
29
+ */
30
+ export const copyButton = (options: CopyButtonMockOptions) => {
31
+ const { kind, outcome, size = 'md' } = options;
32
+ const copied = outcome === 'copied';
33
+
34
+ const classes =
35
+ kind === 'icon'
36
+ ? ['et-icon-button', 'et-color-interactive', 'et-focus-ring', 'et-color--inherited']
37
+ : ['et-text-button', 'et-color-interactive', 'et-focus-ring', 'et-color--inherited'];
38
+
39
+ const attributes = [
40
+ options.attributes,
41
+ `class="${classes.join(' ')}"`,
42
+ 'type="button"',
43
+ kind === 'icon' && 'aria-label="Copy the install command"',
44
+ 'etCopyButton',
45
+ options.disabled && 'disabled aria-disabled="true"',
46
+ kind === 'icon' && `data-variant="${options.variant ?? 'transparent'}"`,
47
+ kind === 'text' && 'data-icon-alignment="start"',
48
+ `data-size="${size}"`,
49
+ copied && 'data-copied="true"',
50
+ outcome === 'failed' && 'data-copy-failed="true"',
51
+ ].filter(Boolean);
52
+
53
+ const contents =
54
+ kind === 'icon'
55
+ ? `<div class="et-icon-button-icon">${iconMarkup(copied ? CHECK_ICON : CLIPBOARD_CHECK_ICON)}</div>`
56
+ : `<div class="et-text-button-icon"></div><div class="et-text-button-contents">${copied ? 'Copied!' : 'Copy'}</div>`;
57
+
58
+ return `<button ${attributes.join(' ')}>${contents}</button>`;
59
+ };
@@ -0,0 +1,41 @@
1
+ import descriptionListBase from '../src/lib/description-list/description-list.component.css?inline';
2
+
3
+ export type DescriptionListMockItem = {
4
+ term: string;
5
+ /** The detail's HTML. An empty string draws an empty `<dd>`. */
6
+ detail: string;
7
+ /** Wraps the pair in a `<div>`, as `<dl>` allows for grouping. */
8
+ grouped?: boolean;
9
+ };
10
+
11
+ export type DescriptionListMockOptions = {
12
+ items: DescriptionListMockItem[];
13
+ variant?: 'inline' | 'stacked';
14
+ /** Extra attributes on the list, e.g. design markers. */
15
+ attributes?: string;
16
+ };
17
+
18
+ /** The stylesheet `descriptionList()` draws with: the real description-list CSS. */
19
+ export const descriptionListStyles = descriptionListBase;
20
+
21
+ /** Draws a `dl[et-description-list]` with one `<dt>`/`<dd>` pair per item, as HTML. */
22
+ export const descriptionList = (options: DescriptionListMockOptions) => {
23
+ const { items, variant = 'inline' } = options;
24
+
25
+ const contents = items
26
+ .map(({ term, detail, grouped }) => {
27
+ const pair = `<dt>${term}</dt><dd>${detail}</dd>`;
28
+
29
+ return grouped ? `<div>${pair}</div>` : pair;
30
+ })
31
+ .join('');
32
+
33
+ const attributes = [
34
+ options.attributes,
35
+ 'et-description-list=""',
36
+ 'class="et-description-list"',
37
+ `data-variant="${variant}"`,
38
+ ].filter(Boolean);
39
+
40
+ return `<dl ${attributes.join(' ')}>${contents}</dl>`;
41
+ };