@ethlete/components 1.0.0-next.69 → 1.0.0-next.71

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 (239) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/design/button.ts +57 -0
  3. package/design/form-field.ts +210 -0
  4. package/design/select.ts +110 -0
  5. package/fesm2022/ethlete-components-testing.mjs +3 -1
  6. package/fesm2022/ethlete-components-testing.mjs.map +1 -1
  7. package/fesm2022/ethlete-components.mjs +830 -108
  8. package/fesm2022/ethlete-components.mjs.map +1 -1
  9. package/package.json +20 -14
  10. package/src/lib/accordion/accordion-group.component.css +12 -0
  11. package/src/lib/accordion/accordion.component.css +185 -0
  12. package/src/lib/avatar/avatar-group.component.css +31 -0
  13. package/src/lib/avatar/avatar.component.css +75 -0
  14. package/src/lib/badge/badge.component.css +111 -0
  15. package/src/lib/banner/banner.component.css +94 -0
  16. package/src/lib/bracket/bracket-default-continue.component.css +29 -0
  17. package/src/lib/bracket/bracket-default-final-match.component.css +76 -0
  18. package/src/lib/bracket/bracket-default-match.component.css +21 -0
  19. package/src/lib/bracket/bracket-default-round-header.component.css +36 -0
  20. package/src/lib/bracket/bracket-participants.component.css +13 -0
  21. package/src/lib/bracket/bracket-pick-card.component.css +232 -0
  22. package/src/lib/bracket/bracket-rounds-list.component.css +75 -0
  23. package/src/lib/bracket/bracket-skeleton.component.css +55 -0
  24. package/src/lib/bracket/bracket.component.css +102 -0
  25. package/src/lib/bracket/layouts/swiss/bracket-swiss-styles.component.css +10 -0
  26. package/src/lib/breadcrumb/breadcrumb-overflow.component.css +38 -0
  27. package/src/lib/breadcrumb/breadcrumb.component.css +120 -0
  28. package/src/lib/button/button-properties-styles.component.css +143 -0
  29. package/src/lib/button/button.component.css +196 -0
  30. package/src/lib/button/fab.component.css +252 -0
  31. package/src/lib/button/icon-button.component.css +143 -0
  32. package/src/lib/button/split-button.component.css +77 -0
  33. package/src/lib/button/text-button.component.css +140 -0
  34. package/src/lib/button/window-control-button.component.css +158 -0
  35. package/src/lib/calendar/calendar-coarse-grid-styles.component.css +29 -0
  36. package/src/lib/calendar/calendar-comparison-band-styles.component.css +36 -0
  37. package/src/lib/calendar/calendar-week-numbers-styles.component.css +32 -0
  38. package/src/lib/calendar/calendar.component.css +366 -0
  39. package/src/lib/card/card.component.css +39 -0
  40. package/src/lib/carousel/carousel-autoplay-styles.component.css +166 -0
  41. package/src/lib/carousel/carousel-transition-styles.component.css +179 -0
  42. package/src/lib/carousel/carousel.component.css +142 -0
  43. package/src/lib/chart/bar-chart.component.css +176 -0
  44. package/src/lib/chart/chart-axis.component.css +40 -0
  45. package/src/lib/chart/chart-grid.component.css +6 -0
  46. package/src/lib/chart/chart-legend.component.css +46 -0
  47. package/src/lib/chart/chart-tooltip.component.css +34 -0
  48. package/src/lib/chart/line-chart-tooltip.component.css +51 -0
  49. package/src/lib/chart/line-chart.component.css +234 -0
  50. package/src/lib/chart/pie-chart.component.css +176 -0
  51. package/src/lib/chart/sankey-chart.component.css +221 -0
  52. package/src/lib/chip/chip.component.css +155 -0
  53. package/src/lib/command-palette/command-palette-item.component.css +94 -0
  54. package/src/lib/command-palette/command-palette.component.css +100 -0
  55. package/src/lib/description-list/description-list.component.css +77 -0
  56. package/src/lib/divider/divider.component.css +36 -0
  57. package/src/lib/empty-state/empty-state.component.css +73 -0
  58. package/src/lib/floating-action/floating-action-styles.component.css +78 -0
  59. package/src/lib/focus-ring/focus-ring-styles.component.css +13 -0
  60. package/src/lib/forms/cascader/cascader-breadcrumb-styles.component.css +98 -0
  61. package/src/lib/forms/cascader/cascader-panel.component.css +386 -0
  62. package/src/lib/forms/cascader/cascader-sheet-styles.component.css +241 -0
  63. package/src/lib/forms/cascader/cascader.component.css +52 -0
  64. package/src/lib/forms/checkbox/checkbox.component.css +247 -0
  65. package/src/lib/forms/choice-field/choice-field-card-styles.component.css +59 -0
  66. package/src/lib/forms/choice-field/choice-field.component.css +186 -0
  67. package/src/lib/forms/color-input/color-input.component.css +108 -0
  68. package/src/lib/forms/color-input/color-picker-panel.component.css +349 -0
  69. package/src/lib/forms/date-time/date-input/date-input.component.css +35 -0
  70. package/src/lib/forms/date-time/date-picker-panel.component.css +115 -0
  71. package/src/lib/forms/date-time/date-range-input/date-range-input.component.css +16 -0
  72. package/src/lib/forms/date-time/date-range-presets.component.css +60 -0
  73. package/src/lib/forms/date-time/date-time-input/date-time-input.component.css +151 -0
  74. package/src/lib/forms/date-time/date-time-range-input/date-time-range-input.component.css +121 -0
  75. package/src/lib/forms/date-time/duration-input/duration-input.component.css +88 -0
  76. package/src/lib/forms/date-time/range-input-shell-styles.component.css +55 -0
  77. package/src/lib/forms/date-time/time-input/time-input.component.css +35 -0
  78. package/src/lib/forms/date-time/time-range-input/time-range-input.component.css +16 -0
  79. package/src/lib/forms/dropzone/dropzone-item.component.css +51 -0
  80. package/src/lib/forms/dropzone/dropzone-preview-styles.component.css +67 -0
  81. package/src/lib/forms/dropzone/dropzone-readonly-styles.component.css +34 -0
  82. package/src/lib/forms/dropzone/dropzone.component.css +267 -0
  83. package/src/lib/forms/form-field/counter.component.css +25 -0
  84. package/src/lib/forms/form-field/form-field-control-suffix-styles.component.css +116 -0
  85. package/src/lib/forms/form-field/form-field-rich-text-styles.component.css +31 -0
  86. package/src/lib/forms/form-field/form-field-suffix-overlap-styles.component.css +66 -0
  87. package/src/lib/forms/form-field/form-field-text-shell-styles.component.css +312 -0
  88. package/src/lib/forms/form-field/form-field-textarea-styles.component.css +32 -0
  89. package/src/lib/forms/form-field/form-field.component.css +328 -0
  90. package/src/lib/forms/form-field/form-support-styles.component.css +102 -0
  91. package/src/lib/forms/form-field/headless/label.directive.css +25 -0
  92. package/src/lib/forms/form-field/hint.component.css +20 -0
  93. package/src/lib/forms/input/input.component.css +49 -0
  94. package/src/lib/forms/input/number-input.component.css +128 -0
  95. package/src/lib/forms/input/password-input.component.css +103 -0
  96. package/src/lib/forms/multi-language-rich-text-editor/multi-language-rich-text-editor.component.css +8 -0
  97. package/src/lib/forms/multi-language-rich-text-editor/tools/multi-language-rich-text-editor-language-tool.component.css +104 -0
  98. package/src/lib/forms/otp-input/otp-input.component.css +194 -0
  99. package/src/lib/forms/phone-input/phone-input.component.css +126 -0
  100. package/src/lib/forms/rating/rating.component.css +197 -0
  101. package/src/lib/forms/rich-text-editor/rich-text-content-styles.component.css +234 -0
  102. package/src/lib/forms/rich-text-editor/rich-text-editor-floating-toolbar.component.css +90 -0
  103. package/src/lib/forms/rich-text-editor/rich-text-editor-image-editor.component.css +172 -0
  104. package/src/lib/forms/rich-text-editor/rich-text-editor-link-editor.component.css +149 -0
  105. package/src/lib/forms/rich-text-editor/rich-text-editor-token-palette.component.css +18 -0
  106. package/src/lib/forms/rich-text-editor/rich-text-editor-token-popup.component.css +199 -0
  107. package/src/lib/forms/rich-text-editor/rich-text-editor.component.css +175 -0
  108. package/src/lib/forms/rich-text-editor/rich-text-viewer.component.css +6 -0
  109. package/src/lib/forms/rich-text-editor/tools/rich-text-editor-align-tool.component.css +5 -0
  110. package/src/lib/forms/rich-text-editor/tools/rich-text-editor-heading-tool.component.css +5 -0
  111. package/src/lib/forms/rich-text-editor/tools/rich-text-editor-image-styles.component.css +109 -0
  112. package/src/lib/forms/rich-text-editor/tools/rich-text-editor-table-styles.component.css +21 -0
  113. package/src/lib/forms/rich-text-editor/tools/rich-text-editor-table-tool.component.css +44 -0
  114. package/src/lib/forms/select/select-all-option.component.css +14 -0
  115. package/src/lib/forms/select/select-extras-styles.component.css +143 -0
  116. package/src/lib/forms/select/select-option-group.component.css +35 -0
  117. package/src/lib/forms/select/select-option-styles.component.css +137 -0
  118. package/src/lib/forms/select/select-panel.component.css +112 -0
  119. package/src/lib/forms/select/select.component.css +180 -0
  120. package/src/lib/forms/selection-card-styles.component.css +136 -0
  121. package/src/lib/forms/selection-list/checkbox-group/checkbox-group-select-all.component.css +89 -0
  122. package/src/lib/forms/selection-list/checkbox-group/checkbox-group.component.css +142 -0
  123. package/src/lib/forms/selection-list/checkbox-group/checkbox-option.component.css +153 -0
  124. package/src/lib/forms/selection-list/radio-group/radio-group.component.css +134 -0
  125. package/src/lib/forms/selection-list/radio-group/radio.component.css +137 -0
  126. package/src/lib/forms/selection-list/segmented-button-group/segmented-button-group.component.css +149 -0
  127. package/src/lib/forms/selection-list/segmented-button-group/segmented-button.component.css +180 -0
  128. package/src/lib/forms/slider/range-slider.component.css +348 -0
  129. package/src/lib/forms/slider/slider.component.css +342 -0
  130. package/src/lib/forms/switch/switch.component.css +187 -0
  131. package/src/lib/forms/tag-input/tag-input.component.css +54 -0
  132. package/src/lib/forms/textarea/textarea-autosize-styles.component.css +17 -0
  133. package/src/lib/forms/textarea/textarea.component.css +40 -0
  134. package/src/lib/grid/grid-debug.component.css +130 -0
  135. package/src/lib/grid/grid-item-default-actions.component.css +11 -0
  136. package/src/lib/grid/grid-item.component.css +172 -0
  137. package/src/lib/grid/grid.component.css +56 -0
  138. package/src/lib/icon/headless/icon-styles.component.css +7 -0
  139. package/src/lib/kbd/kbd.component.css +62 -0
  140. package/src/lib/loader/brand-loader/brand-loader.component.css +130 -0
  141. package/src/lib/loader/progress-bar/progress-bar.component.css +176 -0
  142. package/src/lib/loader/spinner/spinner.component.css +216 -0
  143. package/src/lib/masonry/masonry-styles.component.css +84 -0
  144. package/src/lib/match/match-card.component.css +441 -0
  145. package/src/lib/match/match-participant.component.css +137 -0
  146. package/src/lib/match/match-score.component.css +74 -0
  147. package/src/lib/menu/menu-group-label.component.css +12 -0
  148. package/src/lib/menu/menu-item-shortcut.component.css +10 -0
  149. package/src/lib/menu/menu-item-submenu-icon.component.css +18 -0
  150. package/src/lib/menu/menu-item.component.css +32 -0
  151. package/src/lib/menu/menu-search-styles.component.css +56 -0
  152. package/src/lib/menu/menu-selection-item.component.css +88 -0
  153. package/src/lib/menu/menu-separator.component.css +9 -0
  154. package/src/lib/menu/menu.component.css +296 -0
  155. package/src/lib/notification/notification-stack.component.css +114 -0
  156. package/src/lib/notification/notification.component.css +271 -0
  157. package/src/lib/overlay/alert-dialog/alert-dialog.component.css +45 -0
  158. package/src/lib/overlay/floating-panel-styles.component.css +71 -0
  159. package/src/lib/overlay/floating-tip-styles.component.css +78 -0
  160. package/src/lib/overlay/overlay-container.component.css +167 -0
  161. package/src/lib/overlay/overlay-main-styles.component.css +105 -0
  162. package/src/lib/overlay/overlay-template-host.component.css +7 -0
  163. package/src/lib/overlay/routing/overlay-route-header-template-outlet.component.css +36 -0
  164. package/src/lib/overlay/routing/overlay-router-outlet.component.css +207 -0
  165. package/src/lib/overlay/routing/overlay-shared-route-template-outlet.component.css +5 -0
  166. package/src/lib/overlay/sidebar/overlay-sidebar.component.css +16 -0
  167. package/src/lib/overlay/strategies/anchored-dialog-styles.component.css +51 -0
  168. package/src/lib/overlay/strategies/dialog-styles.component.css +50 -0
  169. package/src/lib/overlay/strategies/full-screen-dialog-styles.component.css +83 -0
  170. package/src/lib/overlay/strategies/overlay-arrow-styles.component.css +112 -0
  171. package/src/lib/overlay/strategies/overlay-origin-clone.component.css +63 -0
  172. package/src/lib/overlay/strategies/sheet-styles.component.css +143 -0
  173. package/src/lib/pagination/page-size-select.component.css +102 -0
  174. package/src/lib/pagination/pagination.component.css +192 -0
  175. package/src/lib/picture/picture.component.css +66 -0
  176. package/src/lib/progress-steps/progress-step.component.css +187 -0
  177. package/src/lib/progress-steps/progress-steps.component.css +26 -0
  178. package/src/lib/query-error/query-error.component.css +21 -0
  179. package/src/lib/scheduler/scheduler-agenda-view.component.css +97 -0
  180. package/src/lib/scheduler/scheduler-appointment-drag-styles.component.css +56 -0
  181. package/src/lib/scheduler/scheduler-appointment-styles.component.css +111 -0
  182. package/src/lib/scheduler/scheduler-edit-color.component.css +16 -0
  183. package/src/lib/scheduler/scheduler-edit-surface-actions.component.css +14 -0
  184. package/src/lib/scheduler/scheduler-edit-surface-breadcrumb.component.css +26 -0
  185. package/src/lib/scheduler/scheduler-edit-surface-children.component.css +57 -0
  186. package/src/lib/scheduler/scheduler-edit-surface-fields.component.css +11 -0
  187. package/src/lib/scheduler/scheduler-edit-surface-footer.component.css +7 -0
  188. package/src/lib/scheduler/scheduler-edit-surface-header.component.css +15 -0
  189. package/src/lib/scheduler/scheduler-edit-time-range.component.css +11 -0
  190. package/src/lib/scheduler/scheduler-month-view.component.css +143 -0
  191. package/src/lib/scheduler/scheduler-time-grid-view.component.css +260 -0
  192. package/src/lib/scheduler/scheduler.component.css +87 -0
  193. package/src/lib/scrollable/headless/scrollable-buttons.component.css +122 -0
  194. package/src/lib/scrollable/headless/scrollable-footer.css +25 -0
  195. package/src/lib/scrollable/headless/scrollable-masks.component.css +112 -0
  196. package/src/lib/scrollable/headless/scrollable-navigation.component.css +94 -0
  197. package/src/lib/scrollable/scrollable.component.css +192 -0
  198. package/src/lib/scrollbar/scrollbar.component.css +110 -0
  199. package/src/lib/skeleton/skeleton.component.css +108 -0
  200. package/src/lib/standings/standings-pick.component.css +172 -0
  201. package/src/lib/standings/standings.component.css +201 -0
  202. package/src/lib/stat-tile/stat-tile-sparkline.component.css +49 -0
  203. package/src/lib/stat-tile/stat-tile.component.css +111 -0
  204. package/src/lib/stream/pip/pip-chrome.component.css +96 -0
  205. package/src/lib/stream/pip/pip-player.component.css +40 -0
  206. package/src/lib/stream/pip/pip-window.component.css +222 -0
  207. package/src/lib/stream/stream-manager-styles.component.css +10 -0
  208. package/src/lib/stream/stream-overlay-card-styles.component.css +43 -0
  209. package/src/lib/stream/stream-player-slot-styles.component.css +14 -0
  210. package/src/lib/table/table-column-chooser.component.css +17 -0
  211. package/src/lib/table/table-column-menu-trigger.component.css +31 -0
  212. package/src/lib/table/table-detail-styles.component.css +103 -0
  213. package/src/lib/table/table-drag-scroll-styles.component.css +18 -0
  214. package/src/lib/table/table-expander-cell.component.css +58 -0
  215. package/src/lib/table/table-filter-trigger.component.css +44 -0
  216. package/src/lib/table/table-group-header-row.component.css +38 -0
  217. package/src/lib/table/table-inline-edit-styles.component.css +20 -0
  218. package/src/lib/table/table-page-sticky-header-styles.component.css +77 -0
  219. package/src/lib/table/table-reorder-overlay.component.css +42 -0
  220. package/src/lib/table/table-resize-grip.component.css +65 -0
  221. package/src/lib/table/table-row-box-styles.component.css +260 -0
  222. package/src/lib/table/table-select-cell.component.css +89 -0
  223. package/src/lib/table/table-skeleton-rows.component.css +19 -0
  224. package/src/lib/table/table-sort-priority-styles.component.css +15 -0
  225. package/src/lib/table/table-sticky-columns-styles.component.css +80 -0
  226. package/src/lib/table/table-virtual-scroll-styles.component.css +9 -0
  227. package/src/lib/table/table.component.css +829 -0
  228. package/src/lib/tabs/nav-tabs/nav-tab-link-styles.component.css +33 -0
  229. package/src/lib/tabs/tab-bar-styles.component.css +173 -0
  230. package/src/lib/tabs/tab-scale-styles.component.css +61 -0
  231. package/src/lib/time-picker/time-picker.component.css +220 -0
  232. package/src/lib/timeline/timeline-item.component.css +116 -0
  233. package/src/lib/timeline/timeline.component.css +7 -0
  234. package/src/lib/toggletip/toggletip.component.css +83 -0
  235. package/src/lib/toolbar/toolbar.component.css +40 -0
  236. package/src/lib/tooltip/tooltip.component.css +64 -0
  237. package/src/lib/tree/tree.component.css +221 -0
  238. package/types/ethlete-components-testing.d.ts +1 -1
  239. package/types/ethlete-components.d.ts +172 -7
@@ -0,0 +1,312 @@
1
+ @layer components {
2
+ et-form-field {
3
+ &:where([data-size='sm']) {
4
+ --et-form-field-gap: 4px;
5
+ --_et-form-field-control-border-radius: 4px;
6
+ --et-form-field-control-padding-block: 4px;
7
+ --et-form-field-control-padding-inline: 10px;
8
+ --et-form-field-control-affix-gap: 6px;
9
+ --et-form-field-control-font-size: 12px;
10
+ --et-form-field-control-min-height: 32px;
11
+ --et-form-field-label-font-size: 12px;
12
+ }
13
+
14
+ /* `data-size` is a host binding, so a field the router just created paints one frame without it.
15
+ The default size must therefore also match a field that has no attribute yet. */
16
+ &:where([data-size='md'], :not([data-size])) {
17
+ --et-form-field-gap: 5px;
18
+ --_et-form-field-control-border-radius: 5px;
19
+ --et-form-field-control-padding-block: 6px;
20
+ --et-form-field-control-padding-inline: 12px;
21
+ --et-form-field-control-affix-gap: 8px;
22
+ --et-form-field-control-font-size: 14px;
23
+ --et-form-field-control-min-height: 50px;
24
+ --et-form-field-label-font-size: 13px;
25
+ }
26
+
27
+ &:where([data-size='lg']) {
28
+ --et-form-field-gap: 6px;
29
+ --_et-form-field-control-border-radius: 6px;
30
+ --et-form-field-control-padding-block: 8px;
31
+ --et-form-field-control-padding-inline: 14px;
32
+ --et-form-field-control-affix-gap: 10px;
33
+ --et-form-field-control-font-size: 16px;
34
+ --et-form-field-control-min-height: 58px;
35
+ --et-form-field-label-font-size: 14px;
36
+ }
37
+
38
+ &[data-fill='filled'] {
39
+ --_et-form-field-control-background: var(
40
+ --et-surface-background-solid,
41
+ var(--et-surface-base-solid, transparent)
42
+ );
43
+ }
44
+
45
+ /* The host hook is a bare attribute selector, not `:where([data-text-shell])`: this sheet is
46
+ injected by the control, so a control instantiated before any form-field would inject it
47
+ *before* the base sheet and lose every source-order tie against the base frame/label rules. */
48
+ &[data-text-shell] {
49
+ &[data-label-mode='static'] {
50
+ &[data-has-label]:not(:has(et-label[hidden])) .et-form-field-shell {
51
+ padding-block-start: calc(var(--et-form-field-label-font-size) * 1.2 + var(--et-form-field-gap));
52
+ }
53
+
54
+ .et-form-field-control-area {
55
+ position: static;
56
+ }
57
+
58
+ .et-form-field-label-area {
59
+ position: absolute;
60
+ inset-block-start: 0;
61
+ inset-inline-start: var(--et-form-field-control-padding-inline);
62
+ transform: translateY(calc(-100% - var(--et-form-field-gap) - var(--et-form-field-control-border-width)));
63
+ }
64
+
65
+ &[data-appearance='underline'][data-fill='transparent'] .et-form-field-label-area {
66
+ inset-inline-start: 0;
67
+ }
68
+ }
69
+
70
+ &[data-label-mode='inline'] {
71
+ .et-form-field-control-frame {
72
+ align-items: stretch;
73
+ }
74
+
75
+ .et-form-field-control-area {
76
+ position: static;
77
+ gap: var(--et-form-field-control-affix-gap);
78
+ align-items: stretch;
79
+ }
80
+
81
+ .et-form-field-control-slot {
82
+ display: flex;
83
+ align-items: center;
84
+ }
85
+
86
+ .et-form-field-label-area--inline {
87
+ position: static;
88
+ flex-shrink: 0;
89
+ transform: none;
90
+ white-space: nowrap;
91
+ pointer-events: auto;
92
+ font-size: var(--et-form-field-control-font-size);
93
+ line-height: var(--et-form-field-control-line-height);
94
+ display: flex;
95
+ align-items: center;
96
+ margin-block: calc(var(--et-form-field-control-padding-block) * -1);
97
+ }
98
+
99
+ &[data-appearance='underline'] .et-form-field-label-area--inline::after {
100
+ content: ':';
101
+ }
102
+
103
+ &[data-appearance='box'] .et-form-field-label-area--inline {
104
+ padding-inline-end: var(--et-form-field-control-padding-inline);
105
+ margin-inline-end: calc(var(--et-form-field-control-padding-inline) - var(--et-form-field-control-affix-gap));
106
+ border-inline-end: var(--et-form-field-control-border-width) solid
107
+ var(--et-surface-border-solid, currentColor);
108
+ }
109
+ }
110
+
111
+ &[data-label-mode='floating-inside'],
112
+ &[data-label-mode='floating-outside'] {
113
+ :is(.et-input-native, .et-number-input-native, .et-textarea-native)::placeholder {
114
+ transition: color 150ms ease;
115
+ }
116
+
117
+ .et-select-value[data-placeholder] {
118
+ transition: color 150ms ease;
119
+ }
120
+
121
+ &:not([data-label-floated]) :is(.et-input-native, .et-number-input-native, .et-textarea-native)::placeholder {
122
+ color: transparent;
123
+ }
124
+
125
+ &:not([data-label-floated]) .et-select-value[data-placeholder] {
126
+ color: transparent;
127
+ }
128
+ }
129
+
130
+ &[data-label-mode='floating-outside'] {
131
+ .et-form-field-control-area {
132
+ align-self: stretch;
133
+ display: flex;
134
+ align-items: center;
135
+ }
136
+
137
+ .et-form-field-label-area--floating {
138
+ inset-inline-start: 0;
139
+ }
140
+
141
+ &[data-has-label]:not(:has(et-label[hidden])) .et-form-field-shell {
142
+ padding-block-start: calc(var(--et-form-field-label-font-size) * 1.2 + var(--et-form-field-gap));
143
+ }
144
+
145
+ &[data-label-floated] .et-form-field-label-area--floating {
146
+ inset-block-start: 0;
147
+ inset-inline-start: calc(var(--_et-form-field-prefix-offset, 0px) * -1);
148
+ transform: translateY(
149
+ calc(
150
+ -100% - var(--et-form-field-gap) - var(--et-form-field-control-border-width) -
151
+ var(--et-form-field-control-padding-block)
152
+ )
153
+ );
154
+ }
155
+ }
156
+
157
+ &[data-label-mode='floating-inside'] {
158
+ --_et-form-field-float-inside-extra-padding: calc(
159
+ var(--et-form-field-label-font-size) * var(--_et-form-field-floating-label-scale) + 2px
160
+ );
161
+
162
+ .et-form-field-control-area {
163
+ align-self: stretch;
164
+ display: flex;
165
+ align-items: center;
166
+ padding-block-start: var(--_et-form-field-float-inside-extra-padding);
167
+ }
168
+
169
+ .et-form-field-label-area--floating {
170
+ inset-inline-start: 0;
171
+ }
172
+
173
+ &[data-label-floated] .et-form-field-label-area--floating {
174
+ inset-block-start: 4px;
175
+ transform: scale(var(--_et-form-field-floating-label-scale));
176
+ }
177
+
178
+ .et-form-field-control-slot {
179
+ font-size: calc(var(--et-form-field-control-font-size) * 0.96);
180
+ }
181
+ }
182
+
183
+ .et-form-field-label-area {
184
+ max-inline-size: 100%;
185
+ overflow: hidden;
186
+ text-overflow: ellipsis;
187
+ white-space: nowrap;
188
+ }
189
+
190
+ /* Hover follows the FRAME and the label — the two boxes that activate the control — not the host,
191
+ whose box also spans the label band and the support row. Readonly and disabled get no hover
192
+ feedback at all: the frame's `pointer-events: none` (disabled) does not stop an ancestor from
193
+ matching `:hover`, so it has to be excluded here. */
194
+ @media (hover: hover) {
195
+ &:where(:not([data-readonly]):not([data-disabled]):not(:has(.et-color-interactive-exclude:hover))):where(
196
+ :has(.et-form-field-control-frame:hover),
197
+ :has(.et-form-field-label-area:hover)
198
+ ) {
199
+ .et-form-field-control-frame {
200
+ border-color: var(--et-surface-interaction-hover-solid, currentColor);
201
+ }
202
+
203
+ .et-form-field-label-area,
204
+ .et-form-field-affix {
205
+ color: var(--et-surface-color-solid, currentColor);
206
+ opacity: 1;
207
+ }
208
+ }
209
+ }
210
+
211
+ &:where(:has(:focus-visible):not([data-readonly])) .et-form-field-control-frame,
212
+ &:where([data-expanded]:not([data-readonly])) .et-form-field-control-frame,
213
+ &:where([data-focused]:not([data-readonly])) .et-form-field-control-frame {
214
+ border-color: var(--et-theme-color-primary-solid);
215
+ }
216
+
217
+ &:where(:has(:focus-visible):not([data-readonly])) .et-form-field-label-area,
218
+ &:where(:has(:focus-visible):not([data-readonly])) .et-form-field-affix,
219
+ &:where([data-expanded]:not([data-readonly])) .et-form-field-label-area,
220
+ &:where([data-expanded]:not([data-readonly])) .et-form-field-affix,
221
+ &:where([data-focused]:not([data-readonly])) .et-form-field-label-area,
222
+ &:where([data-focused]:not([data-readonly])) .et-form-field-affix {
223
+ color: var(--et-surface-color-solid, currentColor);
224
+ opacity: 1;
225
+ }
226
+
227
+ &[data-readonly] {
228
+ .et-form-field-shell {
229
+ cursor: default;
230
+ }
231
+
232
+ .et-form-field-control-frame {
233
+ cursor: default;
234
+ }
235
+
236
+ .et-form-field-label-area {
237
+ cursor: default;
238
+ }
239
+
240
+ .et-form-field-control,
241
+ input,
242
+ textarea,
243
+ [contenteditable] {
244
+ cursor: default;
245
+ }
246
+ }
247
+
248
+ &[data-error] .et-form-field-control-frame {
249
+ border-color: var(--et-theme-color-primary-solid);
250
+ }
251
+
252
+ &[data-error] .et-form-field-label-area {
253
+ color: var(--et-theme-color-ink-solid);
254
+ }
255
+
256
+ &[data-error] .et-form-field-affix {
257
+ color: var(--et-theme-color-ink-solid);
258
+ opacity: 1;
259
+ }
260
+
261
+ /* Driven by the registered control's disabled state (data-disabled), NOT :has(:disabled) —
262
+ a composite control like the rich text editor legitimately disables individual toolbar
263
+ buttons while fully enabled, and :has(:disabled) would dim (and pointer-events-kill) the
264
+ whole field over it. */
265
+ &[data-disabled] {
266
+ /* on the shell, not the frame: the frame's `pointer-events: none` takes it out of hit
267
+ testing, so its own cursor never reaches the pointer */
268
+ .et-form-field-shell {
269
+ cursor: not-allowed;
270
+ }
271
+
272
+ .et-form-field-control-frame {
273
+ opacity: var(--et-form-field-control-disabled-opacity);
274
+ pointer-events: none;
275
+ box-shadow: none;
276
+ }
277
+
278
+ .et-form-field-label-area {
279
+ cursor: not-allowed;
280
+ }
281
+ }
282
+
283
+ &[data-appearance='underline'] {
284
+ /* An underline field is text with a rule beneath it — there is no box to fill, so it must not
285
+ reserve the box height the filled/box skins need. A floating label still grows the frame
286
+ past this floor — it adds its own padding-block-start on top. */
287
+ --et-form-field-control-min-height: calc(
288
+ var(--et-form-field-control-font-size) * var(--et-form-field-control-line-height) +
289
+ var(--et-form-field-control-padding-block) * 2
290
+ );
291
+
292
+ .et-form-field-control-frame {
293
+ border-top: none;
294
+ border-inline: none;
295
+ border-radius: 0;
296
+ box-shadow: none;
297
+ }
298
+
299
+ &[data-fill='transparent'] {
300
+ .et-form-field-control-frame {
301
+ padding-inline: 0;
302
+ }
303
+
304
+ .et-form-field-errors,
305
+ .et-form-field-hint {
306
+ padding-inline-start: 0;
307
+ }
308
+ }
309
+ }
310
+ }
311
+ }
312
+ }
@@ -0,0 +1,32 @@
1
+ @layer components {
2
+ et-form-field[data-control-type='textarea'] {
3
+ .et-form-field-control-frame {
4
+ align-items: stretch;
5
+ }
6
+
7
+ .et-form-field-control-area,
8
+ .et-form-field-control-slot {
9
+ align-items: stretch;
10
+ }
11
+
12
+ .et-form-field-affix {
13
+ align-items: flex-start;
14
+ }
15
+
16
+ &:not([data-label-floated]) .et-form-field-label-area--floating {
17
+ inset-block-start: calc((var(--et-form-field-control-font-size) * var(--et-form-field-control-line-height)) / 2);
18
+ }
19
+
20
+ &[data-label-mode='floating-inside']:not([data-label-floated]) .et-form-field-label-area--floating {
21
+ inset-block-start: calc(
22
+ var(--_et-form-field-float-inside-extra-padding) +
23
+ (var(--et-form-field-control-font-size) * var(--et-form-field-control-line-height)) / 2
24
+ );
25
+ }
26
+
27
+ &[data-label-mode='inline'] .et-form-field-label-area--inline {
28
+ align-items: flex-start;
29
+ padding-block-start: var(--et-form-field-control-padding-block);
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,328 @@
1
+ @layer components {
2
+ @property --et-form-field-gap {
3
+ syntax: '<length>';
4
+ inherits: true;
5
+ initial-value: 4px;
6
+ }
7
+
8
+ @property --et-form-field-control-border-width {
9
+ syntax: '<length>';
10
+ inherits: true;
11
+ initial-value: 1px;
12
+ }
13
+
14
+ @property --et-form-field-control-padding-block {
15
+ syntax: '<length>';
16
+ inherits: true;
17
+ initial-value: 8px;
18
+ }
19
+
20
+ @property --et-form-field-control-padding-inline {
21
+ syntax: '<length>';
22
+ inherits: true;
23
+ initial-value: 12px;
24
+ }
25
+
26
+ @property --et-form-field-control-font-size {
27
+ syntax: '<length>';
28
+ inherits: true;
29
+ initial-value: 14px;
30
+ }
31
+
32
+ @property --et-form-field-control-line-height {
33
+ syntax: '<number>';
34
+ inherits: true;
35
+ initial-value: 1.5;
36
+ }
37
+
38
+ @property --et-form-field-control-affix-gap {
39
+ syntax: '<length>';
40
+ inherits: true;
41
+ initial-value: 8px;
42
+ }
43
+
44
+ @property --et-form-field-affix-icon-size {
45
+ syntax: '<length>';
46
+ inherits: true;
47
+ initial-value: 16px;
48
+ }
49
+
50
+ @property --et-form-field-control-disabled-opacity {
51
+ syntax: '<number>';
52
+ inherits: true;
53
+ initial-value: 0.5;
54
+ }
55
+
56
+ @property --et-form-field-control-min-height {
57
+ syntax: '<length>';
58
+ inherits: true;
59
+ initial-value: 40px;
60
+ }
61
+
62
+ @property --et-form-field-label-font-size {
63
+ syntax: '<length>';
64
+ inherits: true;
65
+ initial-value: 14px;
66
+ }
67
+
68
+ @property --et-form-field-error-font-size {
69
+ syntax: '<length>';
70
+ inherits: true;
71
+ initial-value: 12px;
72
+ }
73
+
74
+ @property --et-form-field-warning-font-size {
75
+ syntax: '<length>';
76
+ inherits: true;
77
+ initial-value: 12px;
78
+ }
79
+
80
+ @property --et-form-field-hint-font-size {
81
+ syntax: '<length>';
82
+ inherits: true;
83
+ initial-value: 12px;
84
+ }
85
+
86
+ @property --et-form-field-support-duration {
87
+ syntax: '<time>';
88
+ inherits: true;
89
+ initial-value: 180ms;
90
+ }
91
+
92
+ et-form-field {
93
+ --et-theme-color-primary-solid: rgb(var(--et-theme-color-primary-rgb));
94
+ --_et-form-field-control-background: transparent;
95
+ --_et-form-field-control-focus-ring: color-mix(in srgb, var(--et-theme-color-primary-solid) 18%, transparent);
96
+ --_et-form-field-floating-label-scale: 0.75;
97
+
98
+ display: flex;
99
+ flex-direction: column;
100
+ gap: var(--et-form-field-gap);
101
+ color: var(--et-surface-color-solid, currentColor);
102
+
103
+ .et-form-field-shell {
104
+ display: flex;
105
+ flex-direction: column;
106
+ gap: var(--et-form-field-gap);
107
+ min-inline-size: 0;
108
+ overflow: visible;
109
+ }
110
+
111
+ .et-form-field-label-area {
112
+ display: flex;
113
+ align-items: center;
114
+ font-size: var(--et-form-field-label-font-size);
115
+ font-weight: 500;
116
+ line-height: 1.2;
117
+ letter-spacing: -0.01em;
118
+ color: var(--et-surface-color-muted-solid, currentColor);
119
+ cursor: text;
120
+ -webkit-user-select: none;
121
+ user-select: none;
122
+ min-inline-size: 0;
123
+ transition:
124
+ color 150ms ease,
125
+ opacity 150ms ease;
126
+
127
+ et-label {
128
+ display: inline;
129
+ min-inline-size: 0;
130
+ }
131
+ }
132
+
133
+ .et-form-field-label-area--floating {
134
+ position: absolute;
135
+ inset-block-start: 50%;
136
+ inset-inline-start: 0;
137
+ z-index: 1;
138
+ max-inline-size: 100%;
139
+ overflow: hidden;
140
+ text-overflow: ellipsis;
141
+ white-space: nowrap;
142
+ transform: translateY(-50%);
143
+ transform-origin: left top;
144
+ pointer-events: none;
145
+ }
146
+
147
+ &[data-can-animate] .et-form-field-label-area--floating {
148
+ transition:
149
+ color 150ms ease,
150
+ opacity 150ms ease,
151
+ inset-block-start 150ms ease,
152
+ inset-inline-start 150ms ease,
153
+ transform 150ms ease;
154
+ }
155
+
156
+ .et-form-field-control-frame {
157
+ position: relative;
158
+ display: flex;
159
+ align-items: center;
160
+ box-sizing: border-box;
161
+ gap: var(--et-form-field-control-affix-gap);
162
+ min-inline-size: 0;
163
+ min-block-size: var(--et-form-field-control-min-height);
164
+ padding-block: var(--et-form-field-control-padding-block);
165
+ padding-inline: var(--et-form-field-control-padding-inline);
166
+ border: var(--et-form-field-control-border-width) solid var(--et-surface-border-solid, currentColor);
167
+ border-radius: var(--et-form-field-control-border-radius, var(--_et-form-field-control-border-radius, 4px));
168
+ background: var(--_et-form-field-control-background);
169
+ font-size: var(--et-form-field-control-font-size);
170
+ line-height: var(--et-form-field-control-line-height);
171
+ transition:
172
+ background-color 150ms ease,
173
+ border-color 150ms ease,
174
+ box-shadow 150ms ease,
175
+ opacity 150ms ease;
176
+ cursor: text;
177
+ }
178
+
179
+ .et-form-field-affix {
180
+ display: flex;
181
+ align-items: center;
182
+ justify-content: center;
183
+ flex-shrink: 0;
184
+ gap: var(--et-form-field-control-affix-gap);
185
+ color: var(--et-surface-color-muted-solid, currentColor);
186
+ pointer-events: none;
187
+ transition: color 150ms ease;
188
+
189
+ &:empty {
190
+ display: none;
191
+ }
192
+
193
+ > * {
194
+ pointer-events: none;
195
+ }
196
+
197
+ > :is([etInputPrefix], [etInputSuffix], .et-form-field-busy-spinner) {
198
+ opacity: 0.78;
199
+ transition: opacity 150ms ease;
200
+ }
201
+
202
+ /* Only a *direct* child: an icon nested in an affix control (e.g. an `et-icon-button` suffix)
203
+ is already sized by that control. */
204
+ > .et-icon {
205
+ flex: none;
206
+ inline-size: var(--et-form-field-affix-icon-size);
207
+ block-size: var(--et-form-field-affix-icon-size);
208
+ }
209
+
210
+ > :is(
211
+ button,
212
+ a[href],
213
+ input,
214
+ select,
215
+ textarea,
216
+ summary,
217
+ label,
218
+ [role='button'],
219
+ [tabindex]:not([tabindex='-1'])
220
+ ) {
221
+ pointer-events: auto;
222
+ }
223
+
224
+ button {
225
+ font: inherit;
226
+ color: inherit;
227
+ border: none;
228
+ background: transparent;
229
+ padding: 0;
230
+ cursor: pointer;
231
+ }
232
+ }
233
+
234
+ .et-form-field-control-area {
235
+ position: relative;
236
+ display: flex;
237
+ align-items: center;
238
+ flex: 1;
239
+ min-inline-size: 0;
240
+
241
+ > * {
242
+ min-inline-size: 0;
243
+ }
244
+ }
245
+
246
+ .et-form-field-control-slot {
247
+ display: flex;
248
+ align-items: center;
249
+ flex: 1;
250
+ min-inline-size: 0;
251
+ }
252
+
253
+ .et-form-field-support {
254
+ overflow: clip;
255
+ }
256
+
257
+ .et-form-field-support-row {
258
+ display: flex;
259
+ align-items: flex-start;
260
+ gap: var(--et-form-field-support-gap, 0.8rem);
261
+ }
262
+
263
+ .et-form-field-support-stack {
264
+ position: relative;
265
+ display: grid;
266
+ flex: 1 1 auto;
267
+ min-inline-size: 0;
268
+ }
269
+
270
+ .et-form-field-support-content {
271
+ grid-area: 1 / 1;
272
+ min-inline-size: 0;
273
+ opacity: 0;
274
+
275
+ &[data-active] {
276
+ opacity: 1;
277
+ }
278
+
279
+ &[data-state='leaving'] {
280
+ position: absolute;
281
+ inset: 0;
282
+ pointer-events: none;
283
+ }
284
+ }
285
+
286
+ .et-form-field-errors {
287
+ display: flex;
288
+ flex-direction: column;
289
+ gap: 2px;
290
+ font-size: var(--et-form-field-error-font-size);
291
+ color: var(--et-theme-color-ink-solid);
292
+ padding-inline-start: calc(
293
+ var(--et-form-field-control-padding-inline) + var(--et-form-field-control-border-width)
294
+ );
295
+ }
296
+
297
+ .et-form-field-warnings {
298
+ display: flex;
299
+ flex-direction: column;
300
+ gap: 2px;
301
+ font-size: var(--et-form-field-warning-font-size);
302
+ color: var(--et-theme-color-ink-solid);
303
+ padding-inline-start: calc(
304
+ var(--et-form-field-control-padding-inline) + var(--et-form-field-control-border-width)
305
+ );
306
+ }
307
+
308
+ .et-form-field-support[data-can-animate] {
309
+ transition: block-size var(--et-form-field-support-duration) ease;
310
+
311
+ .et-form-field-support-content {
312
+ transition: opacity var(--et-form-field-support-duration) ease;
313
+
314
+ @starting-style {
315
+ &[data-active] {
316
+ opacity: 0;
317
+ }
318
+ }
319
+ }
320
+ }
321
+ }
322
+
323
+ @media (prefers-reduced-motion: reduce) {
324
+ et-form-field {
325
+ --et-form-field-support-duration: 1ms;
326
+ }
327
+ }
328
+ }