@ethlete/components 1.0.0-next.78 → 1.0.0-next.79

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 (252) hide show
  1. package/CHANGELOG.md +113 -0
  2. package/design/accordion.ts +73 -0
  3. package/design/avatar.ts +90 -0
  4. package/design/badge.ts +48 -0
  5. package/design/banner.ts +77 -0
  6. package/design/bracket.ts +457 -0
  7. package/design/breadcrumb.ts +145 -0
  8. package/design/button.ts +49 -0
  9. package/design/calendar.ts +306 -0
  10. package/design/card.ts +92 -0
  11. package/design/carousel.ts +240 -0
  12. package/design/chart.ts +512 -0
  13. package/design/checkbox.ts +275 -0
  14. package/design/chip.ts +64 -0
  15. package/design/config.json +4 -1
  16. package/design/control.ts +19 -0
  17. package/design/copy-button.ts +59 -0
  18. package/design/description-list.ts +41 -0
  19. package/design/dialog.ts +214 -0
  20. package/design/divider.ts +27 -0
  21. package/design/empty-state.ts +45 -0
  22. package/design/floating-action.ts +55 -0
  23. package/design/grid.ts +148 -0
  24. package/design/input.ts +86 -0
  25. package/design/kbd.ts +19 -0
  26. package/design/loader.ts +152 -0
  27. package/design/masonry.ts +115 -0
  28. package/design/match.ts +131 -0
  29. package/design/menu.ts +143 -0
  30. package/design/notification.ts +129 -0
  31. package/design/otp-input.ts +107 -0
  32. package/design/pagination.ts +120 -0
  33. package/design/picture.ts +80 -0
  34. package/design/progress-steps.ts +79 -0
  35. package/design/query-error.ts +60 -0
  36. package/design/radio-group.ts +132 -0
  37. package/design/scheduler.ts +369 -0
  38. package/design/scrollable.ts +218 -0
  39. package/design/scrollbar.ts +47 -0
  40. package/design/sdk/assets/fallback.svg +1 -0
  41. package/design/sdk/assets/tall.svg +1 -0
  42. package/design/sdk/assets/wide.svg +1 -0
  43. package/design/sdk/components/accent-on-light/accent-on-light.css +35 -0
  44. package/design/sdk/components/accent-on-light/accent-on-light.ts +10 -0
  45. package/design/sdk/components/accent-on-light/shared/controls.ts +46 -0
  46. package/design/sdk/components/accordion/accordion.css +17 -0
  47. package/design/sdk/components/accordion/accordion.ts +64 -0
  48. package/design/sdk/components/avatar/avatar.css +14 -0
  49. package/design/sdk/components/avatar/avatar.ts +78 -0
  50. package/design/sdk/components/badge/badge.css +13 -0
  51. package/design/sdk/components/badge/badge.ts +52 -0
  52. package/design/sdk/components/banner/banner.css +18 -0
  53. package/design/sdk/components/banner/banner.ts +87 -0
  54. package/design/sdk/components/bracket/bracket.css +59 -0
  55. package/design/sdk/components/bracket/bracket.ts +143 -0
  56. package/design/sdk/components/breadcrumb/breadcrumb.css +25 -0
  57. package/design/sdk/components/breadcrumb/breadcrumb.ts +81 -0
  58. package/design/sdk/components/button/button.css +33 -0
  59. package/design/sdk/components/button/button.ts +50 -7
  60. package/design/sdk/components/calendar/calendar.css +33 -0
  61. package/design/sdk/components/calendar/calendar.ts +96 -0
  62. package/design/sdk/components/card/card.css +19 -0
  63. package/design/sdk/components/card/card.ts +61 -0
  64. package/design/sdk/components/carousel/carousel.css +44 -0
  65. package/design/sdk/components/carousel/carousel.ts +74 -0
  66. package/design/sdk/components/chart/chart.css +56 -0
  67. package/design/sdk/components/chart/chart.ts +98 -0
  68. package/design/sdk/components/chip/chip.css +18 -0
  69. package/design/sdk/components/chip/chip.ts +76 -0
  70. package/design/sdk/components/copy-button/copy-button.css +14 -0
  71. package/design/sdk/components/copy-button/copy-button.ts +59 -0
  72. package/design/sdk/components/description-list/description-list.css +7 -0
  73. package/design/sdk/components/description-list/description-list.ts +53 -0
  74. package/design/sdk/components/dialog/dialog.css +29 -0
  75. package/design/sdk/components/dialog/dialog.ts +78 -0
  76. package/design/sdk/components/divider/divider.css +26 -0
  77. package/design/sdk/components/divider/divider.ts +43 -0
  78. package/design/sdk/components/empty-state/empty-state.css +15 -0
  79. package/design/sdk/components/empty-state/empty-state.ts +56 -0
  80. package/design/sdk/components/floating-action/floating-action.css +51 -0
  81. package/design/sdk/components/floating-action/floating-action.ts +63 -0
  82. package/design/sdk/components/form-field/form-field.ts +23 -5
  83. package/design/sdk/components/grid/grid.css +17 -0
  84. package/design/sdk/components/grid/grid.ts +80 -0
  85. package/design/sdk/components/input/input.css +75 -0
  86. package/design/sdk/components/input/input.ts +79 -0
  87. package/design/sdk/components/kbd/kbd.css +25 -0
  88. package/design/sdk/components/kbd/kbd.ts +57 -0
  89. package/design/sdk/components/loader/loader.css +37 -0
  90. package/design/sdk/components/loader/loader.ts +68 -0
  91. package/design/sdk/components/masonry/masonry.css +7 -0
  92. package/design/sdk/components/masonry/masonry.ts +42 -0
  93. package/design/sdk/components/match/match.css +25 -0
  94. package/design/sdk/components/match/match.ts +76 -0
  95. package/design/sdk/components/menu/menu.css +22 -0
  96. package/design/sdk/components/menu/menu.ts +91 -0
  97. package/design/sdk/components/notification/notification.css +32 -0
  98. package/design/sdk/components/notification/notification.ts +106 -0
  99. package/design/sdk/components/otp-input/otp-input.css +35 -0
  100. package/design/sdk/components/otp-input/otp-input.ts +64 -0
  101. package/design/sdk/components/pagination/pagination.css +14 -0
  102. package/design/sdk/components/pagination/pagination.ts +75 -0
  103. package/design/sdk/components/picture/picture.css +37 -0
  104. package/design/sdk/components/picture/picture.ts +96 -0
  105. package/design/sdk/components/progress-steps/progress-steps.css +37 -0
  106. package/design/sdk/components/progress-steps/progress-steps.ts +91 -0
  107. package/design/sdk/components/query-error/query-error.css +33 -0
  108. package/design/sdk/components/query-error/query-error.ts +120 -0
  109. package/design/sdk/components/scheduler/scheduler.css +55 -0
  110. package/design/sdk/components/scheduler/scheduler.ts +239 -0
  111. package/design/sdk/components/scrollable/scrollable.css +58 -0
  112. package/design/sdk/components/scrollable/scrollable.ts +133 -0
  113. package/design/sdk/components/scrollbar/scrollbar.css +78 -0
  114. package/design/sdk/components/scrollbar/scrollbar.ts +123 -0
  115. package/design/sdk/components/select/select.ts +1 -1
  116. package/design/sdk/components/select/shared/select-part.ts +16 -1
  117. package/design/sdk/components/select-panel/select-panel.css +3 -0
  118. package/design/sdk/components/select-panel/select-panel.ts +124 -0
  119. package/design/sdk/components/skeleton/skeleton.css +22 -0
  120. package/design/sdk/components/skeleton/skeleton.ts +50 -0
  121. package/design/sdk/components/slider/slider.css +52 -0
  122. package/design/sdk/components/slider/slider.ts +86 -0
  123. package/design/sdk/components/standings/standings.css +33 -0
  124. package/design/sdk/components/standings/standings.ts +130 -0
  125. package/design/sdk/components/stat-tile/stat-tile.css +15 -0
  126. package/design/sdk/components/stat-tile/stat-tile.ts +84 -0
  127. package/design/sdk/components/stream/stream.css +48 -0
  128. package/design/sdk/components/stream/stream.ts +38 -0
  129. package/design/sdk/components/switch/switch.css +35 -0
  130. package/design/sdk/components/switch/switch.ts +63 -0
  131. package/design/sdk/components/table/table.css +67 -0
  132. package/design/sdk/components/table/table.ts +160 -0
  133. package/design/sdk/components/tabs/tabs.css +13 -0
  134. package/design/sdk/components/tabs/tabs.ts +74 -0
  135. package/design/sdk/components/textarea/textarea.css +116 -0
  136. package/design/sdk/components/textarea/textarea.ts +64 -0
  137. package/design/sdk/components/timeline/timeline.css +30 -0
  138. package/design/sdk/components/timeline/timeline.ts +87 -0
  139. package/design/sdk/components/toolbar/toolbar.css +24 -0
  140. package/design/sdk/components/toolbar/toolbar.ts +87 -0
  141. package/design/sdk/components/tooltip/tooltip.css +15 -0
  142. package/design/sdk/components/tooltip/tooltip.ts +28 -0
  143. package/design/sdk/components/tree/selected-tint.css +15 -0
  144. package/design/sdk/components/tree/tree.ts +70 -0
  145. package/design/sdk/foundations/colors/colors.css +108 -4
  146. package/design/sdk/foundations/elevation/elevation.css +6 -0
  147. package/design/sdk/foundations/elevation/elevation.ts +11 -0
  148. package/design/sdk/foundations/elevation/shared/elevation/scene.css +101 -0
  149. package/design/sdk/foundations/elevation/shared/elevation/scene.ts +74 -0
  150. package/design/sdk/foundations/icons/icons.ts +119 -0
  151. package/design/skeleton.ts +67 -0
  152. package/design/slider.ts +155 -0
  153. package/design/standings.ts +161 -0
  154. package/design/stat-tile.ts +109 -0
  155. package/design/stream.ts +92 -0
  156. package/design/switch.ts +83 -0
  157. package/design/table.ts +302 -0
  158. package/design/tabs.ts +75 -0
  159. package/design/textarea.ts +92 -0
  160. package/design/timeline.ts +52 -0
  161. package/design/toolbar.ts +95 -0
  162. package/design/tooltip.ts +87 -0
  163. package/fesm2022/ethlete-components.mjs +228 -187
  164. package/fesm2022/ethlete-components.mjs.map +1 -1
  165. package/package.json +1 -1
  166. package/src/lib/accordion/accordion.component.css +2 -1
  167. package/src/lib/avatar/avatar.component.css +10 -0
  168. package/src/lib/badge/badge.component.css +2 -2
  169. package/src/lib/banner/banner.component.css +3 -1
  170. package/src/lib/breadcrumb/breadcrumb-outlet.component.css +5 -0
  171. package/src/lib/breadcrumb/breadcrumb.component.css +5 -1
  172. package/src/lib/button/button.component.css +19 -0
  173. package/src/lib/button/icon-button.component.css +19 -20
  174. package/src/lib/button/split-button.component.css +5 -1
  175. package/src/lib/calendar/calendar.component.css +13 -3
  176. package/src/lib/card/card.component.css +4 -0
  177. package/src/lib/carousel/carousel-autoplay-styles.component.css +1 -1
  178. package/src/lib/carousel/carousel.component.css +2 -2
  179. package/src/lib/chart/chart-axis.component.css +3 -3
  180. package/src/lib/chip/chip.component.css +8 -2
  181. package/src/lib/description-list/description-list.component.css +2 -1
  182. package/src/lib/empty-state/empty-state.component.css +4 -0
  183. package/src/lib/floating-action/floating-action-styles.component.css +27 -0
  184. package/src/lib/focus-ring/focus-ring-styles.component.css +4 -1
  185. package/src/lib/forms/checkbox/checkbox.component.css +31 -5
  186. package/src/lib/forms/color-input/color-input.component.css +3 -1
  187. package/src/lib/forms/color-input/color-picker-panel.component.css +6 -2
  188. package/src/lib/forms/date-time/date-input/date-input.component.css +1 -1
  189. package/src/lib/forms/date-time/date-time-input/date-time-input.component.css +1 -1
  190. package/src/lib/forms/date-time/duration-input/duration-input.component.css +1 -1
  191. package/src/lib/forms/date-time/range-input-shell-styles.component.css +1 -1
  192. package/src/lib/forms/date-time/time-input/time-input.component.css +1 -1
  193. package/src/lib/forms/description/description.component.css +7 -0
  194. package/src/lib/forms/dropzone/dropzone.component.css +26 -0
  195. package/src/lib/forms/form-field/form-field-control-suffix-styles.component.css +4 -2
  196. package/src/lib/forms/form-field/form-field-text-shell-styles.component.css +54 -5
  197. package/src/lib/forms/form-field/form-field-textarea-styles.component.css +62 -0
  198. package/src/lib/forms/form-field/form-field.component.css +6 -0
  199. package/src/lib/forms/form-field/headless/label.directive.css +1 -1
  200. package/src/lib/forms/input/input.component.css +6 -2
  201. package/src/lib/forms/input/number-input.component.css +2 -2
  202. package/src/lib/forms/input/password-input.component.css +4 -3
  203. package/src/lib/forms/otp-input/otp-input.component.css +23 -4
  204. package/src/lib/forms/phone-input/phone-input.component.css +4 -3
  205. package/src/lib/forms/rating/rating.component.css +2 -1
  206. package/src/lib/forms/rich-text-editor/rich-text-editor.component.css +1 -1
  207. package/src/lib/forms/selection-card-styles.component.css +3 -2
  208. package/src/lib/forms/selection-list/checkbox-group/checkbox-group-select-all.component.css +4 -2
  209. package/src/lib/forms/selection-list/checkbox-group/checkbox-option.component.css +4 -2
  210. package/src/lib/forms/selection-list/radio-group/radio.component.css +5 -2
  211. package/src/lib/forms/selection-list/segmented-button-group/segmented-button.component.css +2 -1
  212. package/src/lib/forms/slider/range-slider.component.css +98 -6
  213. package/src/lib/forms/slider/slider.component.css +96 -4
  214. package/src/lib/forms/switch/switch.component.css +47 -4
  215. package/src/lib/forms/tag-input/tag-input.component.css +2 -2
  216. package/src/lib/forms/textarea/textarea-autosize-styles.component.css +2 -3
  217. package/src/lib/forms/textarea/textarea.component.css +7 -2
  218. package/src/lib/grid/grid-item-toolbar.component.css +10 -0
  219. package/src/lib/grid/grid-item.component.css +6 -1
  220. package/src/lib/loader/brand-loader/brand-loader.component.css +4 -1
  221. package/src/lib/loader/progress-bar/progress-bar.component.css +1 -1
  222. package/src/lib/loader/spinner/spinner-styles.component.css +1 -1
  223. package/src/lib/match/match-card.component.css +9 -3
  224. package/src/lib/match/match-score.component.css +4 -1
  225. package/src/lib/menu/menu-selection-item.component.css +1 -1
  226. package/src/lib/menu/menu.component.css +5 -0
  227. package/src/lib/overlay/overlay-container.component.css +4 -0
  228. package/src/lib/pagination/pagination.component.css +4 -0
  229. package/src/lib/progress-steps/progress-step.component.css +4 -4
  230. package/src/lib/query-error/query-error.component.css +4 -0
  231. package/src/lib/scheduler/scheduler-appointment-styles.component.css +21 -5
  232. package/src/lib/scheduler/scheduler-month-view.component.css +4 -2
  233. package/src/lib/scheduler/scheduler-time-grid-view.component.css +8 -2
  234. package/src/lib/scrollable/headless/scrollable-navigation.component.css +1 -1
  235. package/src/lib/standings/standings-pick.component.css +1 -1
  236. package/src/lib/standings/standings.component.css +10 -10
  237. package/src/lib/stat-tile/stat-tile-sparkline.component.css +1 -1
  238. package/src/lib/stream/consent/stream-consent.component.css +99 -0
  239. package/src/lib/stream/error/stream-player-error.component.css +100 -0
  240. package/src/lib/stream/loading/stream-player-loading.component.css +16 -0
  241. package/src/lib/stream/pip/pip-slot-placeholder.component.css +68 -0
  242. package/src/lib/stream/stream-player-slot-styles.component.css +4 -0
  243. package/src/lib/table/table-resize-grip.component.css +2 -1
  244. package/src/lib/table/table-select-cell.component.css +45 -15
  245. package/src/lib/table/table.component.css +15 -5
  246. package/src/lib/tabs/tab-bar-styles.component.css +1 -1
  247. package/src/lib/tabs/tabs/tab-group.component.css +111 -0
  248. package/src/lib/time-picker/time-picker.component.css +2 -1
  249. package/src/lib/timeline/timeline-item.component.css +5 -1
  250. package/src/lib/toolbar/toolbar.component.css +4 -0
  251. package/src/lib/tooltip/tooltip.component.css +14 -0
  252. package/types/ethlete-components.d.ts +11 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,118 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0-next.79
4
+
5
+ ### Minor Changes
6
+
7
+ - The package ships the `sdk` design base under `design/sdk`, with a `design/config.json` that declares the `sdk` product. A consumer extends it with `"base": "node_modules/@ethlete/components/design/sdk"`.
8
+ - The shared focus ring is drawn in the theme's ink tone in the light scheme and stays primary in the dark scheme.
9
+ - Add an `ariaLabel` input to `et-tab` that names the trigger button, for icon-only tabs.
10
+ - Text fields get a 3:1 rest frame, a 2px focus frame in the text colour, a dashed readonly frame with a dashed focus frame, a 4.5:1 placeholder, a 4px text-prefix gap, and the textarea grip in the frame corner.
11
+
12
+ ### Patch Changes
13
+
14
+ - Size an `etIcon` inside an avatar per avatar size. It filled the whole avatar and was clipped.
15
+ - Fix banner headings and bodies without break points overflowing the banner.
16
+ - Show the full focus ring on breadcrumb links and the overflow trigger. The breadcrumb's clip cut it off.
17
+ - Keep the first and last category label of a chart axis inside the plot when labels are thinned.
18
+ - Checkbox, checkbox option and select-all boxes now keep their set size in apps without a global `box-sizing: border-box` reset, so hints and errors line up with the label.
19
+ - The focus rings of grid items, accordion, breadcrumb, chip, tabs, table, calendar and scheduler are drawn in the theme's ink tone in the light scheme, matching the shared focus ring.
20
+ - Add `accordion()` and `accordionGroup()` design mocks under `@ethlete/components/design/accordion` that draw the accordion with its real markup and CSS.
21
+ - Add `avatar()`, `avatarGroup()` and `avatarRow()` design mocks under `@ethlete/components/design/avatar` that draw the avatar and avatar group with their real markup and CSS.
22
+ - Add `badge()` and `badgeRow()` design mocks under `@ethlete/components/design/badge` that draw the badge with its real markup and CSS.
23
+ - Add a `banner()` design mock under `@ethlete/components/design/banner` that draws the banner with its real markup and CSS.
24
+ - Add `bracket()` and `bracketParticipants()` design mocks under `@ethlete/components/design/bracket` that draw `et-bracket` with its real markup, CSS and `@ethlete/bracket` geometry.
25
+ - Add `breadcrumb()` and `breadcrumbOverflowPanel()` design mocks under `@ethlete/components/design/breadcrumb` that draw the breadcrumb with its real markup and CSS.
26
+ - Move the `et-breadcrumb-outlet` styles into a stylesheet.
27
+ - A filled button now hovers to its theme's active color and darkens further while pressed, so hover is visible on light accent colors.
28
+ - The `button()` design mock emits `data-can-animate` like `et-button`, so a drawn button transitions and `et design complete` no longer reports CONTROL-TRANSITION-MISSING on it.
29
+ - Match merged design for tooltip, OTP input and tabs: dark tooltip ring, ink OTP caret and hover edges, ink tab focus ring and solid baseline.
30
+ - Add a `calendar()` design mock under `@ethlete/components/design/calendar` that draws the inline calendar with its real markup and CSS.
31
+ - Add `card()` and `cardContent()` design mocks under `@ethlete/components/design/card` that draw the card with its real markup and CSS.
32
+ - Add a `carousel()` design mock under `@ethlete/components/design/carousel` that draws the carousel with its real markup and CSS, including its track, previous and next buttons, dots and autoplay countdown. The `scrollable()` mock takes an `itemSize`, an `itemGap` and extra host classes.
33
+ - Add `barChart()`, `lineChart()` and `pieChart()` design mocks under `@ethlete/components/design/chart` that draw the charts with their real markup and CSS.
34
+ - Add a checkbox design mock at `@ethlete/components/design/checkbox` with `checkbox()`, `checkboxGroup()`, `checkboxStyles` and `checkboxGroupStyles`.
35
+ - Add `chip()` and `chipRow()` design mocks under `@ethlete/components/design/chip` that draw the chip with its real markup and CSS.
36
+ - Add a `copyButton()` design mock under `@ethlete/components/design/copy-button` that draws the copy button with its real markup and CSS.
37
+ - Add a `descriptionList()` design mock under `@ethlete/components/design/description-list` that draws the description list with its real markup and CSS.
38
+ - Move the `et-description` styles into a stylesheet.
39
+ - `control(markup, name)` from `@ethlete/components/design/control` renames a control that is already marked, so a design reuses a control part under its own control name.
40
+ - The design mocks now draw the icons the package ships, and `@ethlete/components/design/icon-set` lists every built-in icon.
41
+ - Add `dialog()`, `alertDialog()` and `overlayBackdrop()` design mocks under `@ethlete/components/design/dialog` that draw the dialog pane with its real markup and CSS.
42
+ - Add a `divider()` design mock under `@ethlete/components/design/divider` that draws the divider with its real markup and CSS.
43
+ - Add an `emptyState()` design mock under `@ethlete/components/design/empty-state` that draws the empty state with its real markup and CSS.
44
+ - An invalid text field's frame uses the full error tone instead of a faded one, and an invalid checkbox keeps its error border on hover.
45
+ - An invalid text field's frame and an invalid checkbox's box use the error theme's hover tone on hover in light and its active ink tone in dark.
46
+ - An invalid dropzone and switch keep their error colour on hover instead of turning neutral.
47
+ - Add a `floatingAction()` design mock under `@ethlete/components/design/floating-action` that draws the floating action with its real markup and CSS, in its inline, floating and hidden states.
48
+ - Give the floating action trigger a light shadow that fades in with opacity only while it floats, and in light a 1px inset ink edge (`--et-button-shadow`) so it stands out from a light grey row.
49
+ - Form field: a text field in error switches its border and label to the error colour theme and keeps distinct rest, hover and focus states.
50
+ - Add a `grid()` design mock under `@ethlete/components/design/grid` that draws `et-grid`, its items, the item toolbar and the default actions with their real markup and CSS.
51
+ - Add an `iconButton()` design mock under `@ethlete/components/design/button` that draws `et-icon-button` with its real markup, `aria-label` and CSS.
52
+ - Loader, match, menu, progress-steps, standings and stat-tile accents use the theme's ink tone in the light scheme.
53
+ - Badge, banner, carousel, scrollable, timeline and stream accents use the theme's ink tone in the light scheme.
54
+ - Refine selection accents and light-scheme ink edges across components.
55
+ - Descriptions align with the label, search inputs lose the native clear button, and a textarea cannot shrink below one line. A one-row textarea lines up with the input, also with an inline label.
56
+ - Add a `kbd()` design mock under `@ethlete/components/design/kbd` that draws the keycaps with their real markup and CSS.
57
+ - Add `spinner()`, `progressBar()` and `brandLoader()` design mocks under `@ethlete/components/design/loader` that draw the loaders with their real markup and CSS, with each animation held at one frame.
58
+ - Add a `masonry()` design mock under `@ethlete/components/design/masonry` that draws an `etMasonry` list with its items packed by the masonry maths, using the real masonry CSS.
59
+ - Add a `matchCard()` design mock under `@ethlete/components/design/match` that draws `et-match-card` with its real markup and CSS.
60
+ - Add a `menu()` design mock under `@ethlete/components/design/menu` that draws the open `et-menu` panel with its real markup and CSS.
61
+ - Add `notification()` and `notificationStack()` design mocks under `@ethlete/components/design/notification` that draw the notification with its real markup and CSS.
62
+ - Add an otp input design mock at `@ethlete/components/design/otp-input` with `otpInput()` and `otpInputStyles`.
63
+ - Add a `pagination()` design mock under `@ethlete/components/design/pagination` that draws `et-pagination` with its real markup and CSS.
64
+ - Add a `picture()` design mock under `@ethlete/components/design/picture` that draws the picture with its real markup and CSS.
65
+ - Add a `progressSteps()` design mock under `@ethlete/components/design/progress-steps` that draws the progress steps with their real markup and CSS.
66
+ - Add a `queryError()` design mock under `@ethlete/components/design/query-error` that draws the query error with its real markup and CSS.
67
+ - Add a radio group design mock at `@ethlete/components/design/radio-group` with `radioGroup()` and `radioGroupStyles`.
68
+ - Add `scheduler()`, `schedulerTimeGrid()`, `schedulerMonth()` and `schedulerAgenda()` design mocks under `@ethlete/components/design/scheduler` that draw `et-scheduler` and its week, day, month and agenda views with their real markup and CSS.
69
+ - Add a `scrollable()` design mock under `@ethlete/components/design/scrollable` that draws the scrollable with its real markup and CSS, including its edge masks, scroll buttons and navigation dots.
70
+ - Add a `scrollbar()` design mock under `@ethlete/components/design/scrollbar` that draws the scrollbar with its real markup and CSS.
71
+ - The shipped sdk design tokens (`design/sdk/foundations/colors/colors.css`) apply `.et-surface--default-dark` only with the dark surface values, not also with the dark-elevated ones.
72
+ - A select option draws its check mark in `--et-theme-color-ink-solid`, and a keyboard-active option gets a 2px ink outline instead of a background tint, so both keep a 3:1 contrast on a light surface.
73
+ - Add a `skeleton()` design mock under `@ethlete/components/design/skeleton` that draws the skeleton, its items and text lines with their real markup and CSS, with the shimmer held at one frame.
74
+ - Add a slider design mock at `@ethlete/components/design/slider` with `slider()` and `sliderStyles`.
75
+ - Add `standings()` and `standingsPick()` design mocks under `@ethlete/components/design/standings` that draw `et-standings` and `et-standings-pick` with their real markup and CSS.
76
+ - Add a `statTile()` design mock under `@ethlete/components/design/stat-tile` that draws the stat tile and its sparkline with their real markup and CSS.
77
+ - Fix `et-stat-tile` throwing on a coloured delta when the app registers no `success` or `error` theme; the delta now keeps the inherited theme and warns once in dev mode.
78
+ - Add a `streamPlayerSlot()` design mock under `@ethlete/components/design/stream` that draws the stream player slot with its consent, loading, error and PiP placeholder overlays, with their real markup and CSS.
79
+ - Move the `et-stream-consent`, `et-stream-player-error`, `et-stream-player-loading` and `et-pip-slot-placeholder` styles into stylesheets.
80
+ - Add a `switchControl()` design mock under `@ethlete/components/design/switch` that draws `et-switch` with its real markup and CSS.
81
+ - `et-tab-group` takes its styles from `tab-group.component.css` instead of an inline `styles` block, and a new design mock `@ethlete/components/design/tabs` draws the tab group for design tools. The look does not change.
82
+ - Add a `table()` design mock under `@ethlete/components/design/table` that draws the table with its real markup and CSS.
83
+ - Add a text input design mock at `@ethlete/components/design/input` with `textInput()` and `textInputStyles`.
84
+ - Add a textarea design mock at `@ethlete/components/design/textarea` with `textareaField()` and `textareaFieldStyles`.
85
+ - Add a `timeline()` design mock under `@ethlete/components/design/timeline` that draws the timeline with its real markup and CSS.
86
+ - Add a `toolbar()` design mock under `@ethlete/components/design/toolbar` that draws the toolbar with its real markup and CSS.
87
+ - Add a `tooltip()` design mock under `@ethlete/components/design/tooltip` that draws `et-tooltip` with its real markup and CSS.
88
+ - Add a `tree()` design mock under `@ethlete/components/design/tree` that draws `et-tree` with its real markup and CSS.
89
+ - Tree: the keyboard focus outline of a row and of the status row uses `--et-theme-color-ink-solid` instead of the primary colour, so it stays visible on a light surface.
90
+ - Use the surface interaction color for resting selection card, checkbox, and radio frames.
91
+ - Fix inline description-list values without break points overflowing the list.
92
+ - The `control()` design helper writes `data-can-animate="true"`, as the real components do.
93
+ - The accordion, breadcrumb overflow and switch design mocks emit `data-can-animate` as the components do, and `@ethlete/components/design/control` marks a control's root element for the design check.
94
+ - A filled button in a dialog draws an inset ink edge in the light scheme.
95
+ - Radio circles, OTP input segments, the color input swatch, and the color picker thumbs and preview now keep their set size in apps without a global `box-sizing: border-box` reset.
96
+ - Form controls draw their focus rings in ink in the light scheme, like the shared focus ring. The dark scheme keeps primary.
97
+ - Keep a grid item's content clear of its actions, so a long title ends before the remove button; tune the space with `--et-grid-item-actions-reserve`.
98
+ - Move the `et-grid-item-toolbar` styles from an inline `styles` block into `grid-item-toolbar.component.css`, so the grid design mock can draw them.
99
+ - The filled icon button draws its inset ink edge only in the light scheme.
100
+ - Align filled icon buttons with the merged design, including their inset edge and interaction colors.
101
+ - Draw the clipboard-check, floppy-disk, pencil, arrow-up, arrow-right, arrows-left-right, plus and underline icons as outlines. They rendered filled before.
102
+ - Fix the match score clipping its digits at rest (it now clips only while a value rolls) and the winner's subtitle turning bold (the winner weight now sits on the name).
103
+ - `et-otp-input` no longer shows the caret on a focused readonly field, and its segments now shrink when the host is narrower than the row.
104
+ - The required marker on every form field uses the theme's ink tone, so it keeps 4.5:1, also in error on dark surfaces.
105
+ - Show the scheduler appointment color dot, truncate long badge text with an ellipsis, and stop clipping the first hour label in the time grid.
106
+ - Add `selectOption`, `selectAllOption`, `selectOptionGroup` and `selectPanel` design mocks, and draw option groups and the select-all row in `selectStyles`.
107
+ - Fix slider value bubbles covering the label, and vertical and end-of-track labels overhanging the host. The range slider grows by 16px to the 44px touch box of `et-slider`.
108
+ - Fix the standings draw letter contrast (lighter draw fill) and draw the zone bar as an inset shadow, so the row line runs the full row width; the bar stays on the start side in RTL.
109
+ - The switch track transitions its edge, and the chip remove button transitions its hover and pressed background and colour.
110
+ - The switch track draws a 1px edge, ink when on and only in the light scheme. The menu selection check and the indeterminate switch use ink.
111
+ - The tab group drops two focus ring rules that the global focus ring always overrode.
112
+ - Fix the table sort header focus ring cutting through the label.
113
+ - `et-input`, `et-password-input` and `et-textarea` now clear the native field when the value is reset to the one the field last rendered, for example right after a paste and Enter.
114
+ - Fix long timeline item content without break points overflowing the timeline.
115
+
3
116
  ## 1.0.0-next.78
4
117
 
5
118
  ### Patch Changes
@@ -0,0 +1,73 @@
1
+ import accordionGroupBase from '../src/lib/accordion/accordion-group.component.css?inline';
2
+ import accordionBase from '../src/lib/accordion/accordion.component.css?inline';
3
+ import iconStyles from '../src/lib/icon/headless/icon-styles.component.css?inline';
4
+ import { CHEVRON_ICON } from '../src/lib/icon/headless/chevron-icon';
5
+ import { iconMarkup } from './icon';
6
+
7
+ export type AccordionMockItem = {
8
+ label: string;
9
+ /** Secondary text at the end of the header, as the `etAccordionHint` template renders it. */
10
+ hint?: string;
11
+ /** The panel content, as HTML. */
12
+ content: string;
13
+ open?: boolean;
14
+ disabled?: boolean;
15
+ /** Extra attributes on the trigger button, e.g. design markers. */
16
+ triggerAttributes?: string;
17
+ };
18
+
19
+ export type AccordionMockOptions = {
20
+ label: string;
21
+ hint?: string;
22
+ content: string;
23
+ open?: boolean;
24
+ disabled?: boolean;
25
+ /** Defaults to 3. */
26
+ headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
27
+ /** Used for the trigger and panel ids. */
28
+ id?: string;
29
+ triggerAttributes?: string;
30
+ /** Extra attributes on the accordion, e.g. design markers. */
31
+ attributes?: string;
32
+ };
33
+
34
+ /** The stylesheets `accordion()` and `accordionGroup()` draw with: the real accordion, group and icon CSS. */
35
+ export const accordionStyles = /* @__PURE__ */ [iconStyles, accordionBase, accordionGroupBase].join('\n');
36
+
37
+ /** Draws an `et-accordion` as the component renders it, as HTML. */
38
+ export const accordion = (options: AccordionMockOptions) => {
39
+ const id = options.id ?? 'et-accordion-mock';
40
+ const hostAttributes = [
41
+ options.attributes,
42
+ 'class="et-accordion"',
43
+ 'data-can-animate="true"',
44
+ options.open && 'data-open=""',
45
+ options.disabled && 'data-disabled=""',
46
+ ].filter(Boolean);
47
+ const triggerAttributes = [
48
+ options.triggerAttributes,
49
+ 'class="et-accordion-trigger"',
50
+ 'etaccordiontrigger=""',
51
+ 'type="button"',
52
+ `id="${id}-trigger"`,
53
+ `aria-controls="${id}-panel"`,
54
+ `aria-expanded="${options.open ? 'true' : 'false'}"`,
55
+ options.disabled && 'aria-disabled="true"',
56
+ ].filter(Boolean);
57
+ const panelAttributes = [
58
+ 'class="et-accordion-panel"',
59
+ 'role="region"',
60
+ `id="${id}-panel"`,
61
+ `aria-labelledby="${id}-trigger"`,
62
+ options.open ? 'data-open=""' : 'inert=""',
63
+ ];
64
+ const hint = options.hint ? ` <span class="et-accordion-hint">${options.hint}</span>` : '';
65
+
66
+ return `<et-accordion ${hostAttributes.join(' ')}><div class="et-accordion-heading" role="heading" aria-level="${options.headingLevel ?? 3}"><button ${triggerAttributes.join(' ')}><span class="et-accordion-label">${options.label}</span>${hint}${iconMarkup(CHEVRON_ICON, 'et-accordion-chevron')}</button></div><div ${panelAttributes.join(' ')}><div class="et-accordion-panel-clip"><div class="et-accordion-panel-body">${options.content}</div></div></div></et-accordion>`;
67
+ };
68
+
69
+ /** Draws an `et-accordion-group` around one `et-accordion` per item, as HTML. */
70
+ export const accordionGroup = (items: AccordionMockItem[], attributes?: string) =>
71
+ `<et-accordion-group class="et-accordion-group"${attributes ? ` ${attributes}` : ''}>${items
72
+ .map((item, index) => accordion({ ...item, id: `et-accordion-mock-${index}` }))
73
+ .join('')}</et-accordion-group>`;
@@ -0,0 +1,90 @@
1
+ import avatarBase from '../src/lib/avatar/avatar.component.css?inline';
2
+ import avatarGroupBase from '../src/lib/avatar/avatar-group.component.css?inline';
3
+ import iconBase from '../src/lib/icon/headless/icon-styles.component.css?inline';
4
+ import { IconDefinition } from '../src/lib/icon/headless/icon-definition';
5
+ import { iconMarkup } from './icon';
6
+
7
+ export type AvatarMockOptions = {
8
+ /** Image URL. Keep it a data URI in a drawing. */
9
+ src?: string;
10
+ name?: string;
11
+ initials?: string;
12
+ /** Projected content, shown when there is no image and no initials. */
13
+ icon?: IconDefinition;
14
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
15
+ shape?: 'circle' | 'square';
16
+ /** A color theme name the app registers. Left out, the avatar takes the color theme around it. */
17
+ color?: string;
18
+ /** Extra attributes on the avatar, e.g. design markers. */
19
+ attributes?: string;
20
+ };
21
+
22
+ /** A generic placeholder portrait as an SVG data URI, for drawing the image form. */
23
+ export const avatarPlaceholderImage = `data:image/svg+xml,${
24
+ /* @__PURE__ */ encodeURIComponent(
25
+ '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" fill="#8a94a6"/><circle cx="32" cy="25" r="11" fill="#e6e9ef"/><path d="M12 60c2-12 10-18 20-18s18 6 20 18z" fill="#e6e9ef"/></svg>',
26
+ )
27
+ }`;
28
+
29
+ /** The stylesheets `avatar()` and `avatarGroup()` draw with: the real avatar, avatar group and icon CSS. */
30
+ export const avatarStyles = /* @__PURE__ */ [
31
+ iconBase,
32
+ avatarBase,
33
+ avatarGroupBase,
34
+ `@layer components {
35
+ .et-avatar-mock-row {
36
+ display: flex;
37
+ flex-wrap: wrap;
38
+ align-items: center;
39
+ gap: 12px;
40
+ }
41
+ }`,
42
+ ].join('\n');
43
+
44
+ const initialsFromName = (name: string) => {
45
+ const words = name.trim().split(/\s+/).filter(Boolean);
46
+ const first = words[0]?.[0] ?? '';
47
+ const last = words.length > 1 ? (words[words.length - 1]?.[0] ?? '') : '';
48
+
49
+ return (first + last).toUpperCase();
50
+ };
51
+
52
+ const avatarAttributes = (options: Pick<AvatarMockOptions, 'size' | 'shape' | 'color' | 'attributes'>, extra = '') =>
53
+ [
54
+ options.attributes ?? '',
55
+ `data-size="${options.size ?? 'md'}"`,
56
+ `data-shape="${options.shape ?? 'circle'}"`,
57
+ `class="${extra}et-avatar et-color--${options.color ?? 'inherited'}"`,
58
+ ]
59
+ .filter(Boolean)
60
+ .join(' ');
61
+
62
+ /** Draws an `et-avatar` as the component renders it, as HTML: image, else initials, else the icon. */
63
+ export const avatar = (options: AvatarMockOptions) => {
64
+ const initials = options.initials ?? (options.name ? initialsFromName(options.name) : '');
65
+ const content = options.src
66
+ ? `<img src="${options.src}" alt="${options.name ?? ''}" class="et-avatar-image" />`
67
+ : initials
68
+ ? `<span${options.name ? ` role="img" aria-label="${options.name}"` : ''} class="et-avatar-initials">${initials}</span>`
69
+ : options.icon
70
+ ? iconMarkup(options.icon)
71
+ : '';
72
+
73
+ return `<et-avatar ${avatarAttributes(options)}>${content}</et-avatar>`;
74
+ };
75
+
76
+ /** Draws an `et-avatar-group`: the avatars past `maxVisible` hidden and counted into a trailing `+N` avatar. */
77
+ export const avatarGroup = (avatars: AvatarMockOptions[], maxVisible?: number) => {
78
+ const visible = maxVisible === undefined ? avatars : avatars.slice(0, Math.max(maxVisible, 0));
79
+ const overflow = avatars.length - visible.length;
80
+ const first = avatars[0] ?? {};
81
+ const more =
82
+ overflow > 0
83
+ ? `<et-avatar ${avatarAttributes({ size: first.size, shape: first.shape }, 'et-avatar-group-overflow ')} role="img" aria-label="${overflow} more">+${overflow}</et-avatar>`
84
+ : '';
85
+
86
+ return `<et-avatar-group class="et-avatar-group">${visible.map((each) => avatar(each)).join('')}${more}</et-avatar-group>`;
87
+ };
88
+
89
+ /** Draws avatars or groups in a wrapping row. */
90
+ export const avatarRow = (items: string[]) => `<div class="et-avatar-mock-row">${items.join('')}</div>`;
@@ -0,0 +1,48 @@
1
+ import badgeBase from '../src/lib/badge/badge.component.css?inline';
2
+ import iconBase from '../src/lib/icon/headless/icon-styles.component.css?inline';
3
+ import { IconDefinition } from '../src/lib/icon/headless/icon-definition';
4
+ import { iconMarkup } from './icon';
5
+
6
+ export type BadgeMockOptions = {
7
+ label: string;
8
+ variant?: 'filled' | 'tonal' | 'outline';
9
+ size?: 'sm' | 'md' | 'lg';
10
+ icon?: IconDefinition;
11
+ iconAlignment?: 'start' | 'end';
12
+ /** A color theme name the app registers. Left out, the badge takes the color theme around it. */
13
+ color?: string;
14
+ /** Extra attributes on the badge, e.g. design markers. */
15
+ attributes?: string;
16
+ };
17
+
18
+ /** The stylesheets `badge()` draws with: the real badge and icon CSS. */
19
+ export const badgeStyles = /* @__PURE__ */ [
20
+ iconBase,
21
+ badgeBase,
22
+ `@layer components {
23
+ .et-badge-mock-row {
24
+ display: flex;
25
+ flex-wrap: wrap;
26
+ align-items: center;
27
+ gap: 8px;
28
+ }
29
+ }`,
30
+ ].join('\n');
31
+
32
+ /** Draws an `et-badge` as the component renders it, as HTML. */
33
+ export const badge = (options: BadgeMockOptions) => {
34
+ const alignment = options.iconAlignment ?? 'start';
35
+ const icon = `<div class="et-badge-icon">${options.icon ? iconMarkup(options.icon) : ''}</div>`;
36
+ const attributes = [
37
+ options.attributes ?? '',
38
+ `data-variant="${options.variant ?? 'tonal'}"`,
39
+ `data-size="${options.size ?? 'md'}"`,
40
+ `data-icon-alignment="${alignment}"`,
41
+ `class="et-badge et-color--${options.color ?? 'inherited'}"`,
42
+ ].filter(Boolean);
43
+
44
+ return `<et-badge ${attributes.join(' ')}>${alignment === 'start' ? icon : ''}<span class="et-badge-label">${options.label}</span>${alignment === 'end' ? icon : ''}</et-badge>`;
45
+ };
46
+
47
+ /** Draws badges in a wrapping row. */
48
+ export const badgeRow = (badges: string[]) => `<div class="et-badge-mock-row">${badges.join('')}</div>`;
@@ -0,0 +1,77 @@
1
+ import bannerBase from '../src/lib/banner/banner.component.css?inline';
2
+ import iconButtonBase from '../src/lib/button/icon-button.component.css?inline';
3
+ import textButtonBase from '../src/lib/button/text-button.component.css?inline';
4
+ import { CIRCLE_CHECK_ICON } from '../src/lib/icon/headless/circle-check-icon';
5
+ import { CIRCLE_INFO_ICON } from '../src/lib/icon/headless/circle-info-icon';
6
+ import iconBase from '../src/lib/icon/headless/icon-styles.component.css?inline';
7
+ import { TIMES_ICON } from '../src/lib/icon/headless/times-icon';
8
+ import { TRIANGLE_EXCLAMATION_ICON } from '../src/lib/icon/headless/triangle-exclamation-icon';
9
+ import { buttonStyles } from './button';
10
+ import { iconMarkup } from './icon';
11
+
12
+ export type BannerMockType = 'info' | 'success' | 'warning' | 'error';
13
+
14
+ export type BannerMockOptions = {
15
+ type?: BannerMockType;
16
+ heading?: string;
17
+ description?: string;
18
+ /** The projected `[etIcon]`. Left out, the type's usual icon; `false` draws none. */
19
+ icon?: 'info' | 'check' | 'triangle' | false;
20
+ /** The label of a projected `et-text-button etBannerAction`. Left out, no action. */
21
+ action?: string;
22
+ /** Extra attributes on the action button, e.g. design markers. */
23
+ actionAttributes?: string;
24
+ dismissible?: boolean;
25
+ /** Extra attributes on the dismiss button, e.g. design markers. */
26
+ dismissAttributes?: string;
27
+ /**
28
+ * The color theme name the banner forces: the `color` input, else the app's semantic theme for `success`,
29
+ * `warning` and `error`. Left out, the banner takes the color theme around it, as `info` does.
30
+ */
31
+ color?: string;
32
+ /** Extra attributes on the banner, e.g. design markers. */
33
+ attributes?: string;
34
+ };
35
+
36
+ const ICONS = {
37
+ info: CIRCLE_INFO_ICON,
38
+ check: CIRCLE_CHECK_ICON,
39
+ triangle: TRIANGLE_EXCLAMATION_ICON,
40
+ } as const;
41
+
42
+ const TYPE_ICONS: Record<BannerMockType, keyof typeof ICONS> = {
43
+ info: 'info',
44
+ success: 'check',
45
+ warning: 'triangle',
46
+ error: 'triangle',
47
+ };
48
+
49
+ /** The stylesheets `banner()` draws with: the real banner, icon button, text button and icon CSS. */
50
+ export const bannerStyles = /* @__PURE__ */ [buttonStyles, iconBase, iconButtonBase, textButtonBase, bannerBase].join(
51
+ '\n',
52
+ );
53
+
54
+ const dismissButton = (attributes?: string) =>
55
+ `<button ${attributes ?? ''} aria-label="Dismiss" type="button" class="et-banner-dismiss-btn et-surface-interactive et-color-interactive et-icon-button et-focus-ring et-color--inherited" data-variant="transparent" data-size="xs"><div class="et-icon-button-icon">${iconMarkup(TIMES_ICON)}</div></button>`;
56
+
57
+ const actionButton = (label: string, attributes?: string) =>
58
+ `<button ${attributes ?? ''} etBannerAction type="button" class="et-text-button et-color-interactive et-focus-ring et-color--inherited" data-icon-alignment="start" data-size="md"><div class="et-text-button-contents">${label}</div></button>`;
59
+
60
+ /** Draws an `et-banner` with its projected icon and action as the component renders it, as HTML. */
61
+ export const banner = (options: BannerMockOptions) => {
62
+ const type = options.type ?? 'info';
63
+ const icon = options.icon === false ? '' : iconMarkup(ICONS[options.icon ?? TYPE_ICONS[type]]);
64
+ const heading = options.heading ? `<p class="et-banner-heading">${options.heading}</p>` : '';
65
+ const description = options.description ? `<p class="et-banner-description">${options.description}</p>` : '';
66
+ const action = options.action ? actionButton(options.action, options.actionAttributes) : '';
67
+ const dismiss = options.dismissible ? dismissButton(options.dismissAttributes) : '';
68
+ const role = type === 'warning' || type === 'error' ? 'alert' : 'status';
69
+ const attributes = [
70
+ options.attributes,
71
+ `class="et-color--${options.color ?? 'inherited'} et-banner"`,
72
+ `role="${role}"`,
73
+ `data-type="${type}"`,
74
+ ].filter(Boolean);
75
+
76
+ return `<et-banner ${attributes.join(' ')}>${icon}<div class="et-banner-content">${heading}${description}${action}</div>${dismiss}</et-banner>`;
77
+ };