@ardium-ui/ui 5.0.0-alpha.8 → 5.0.0-alpha.81

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 (302) hide show
  1. package/fesm2022/ardium-ui-ui.mjs +5003 -2545
  2. package/fesm2022/ardium-ui-ui.mjs.map +1 -1
  3. package/lib/_internal/boolean-component.d.ts +13 -1
  4. package/lib/_internal/disablable-component.d.ts +2 -1
  5. package/lib/_internal/focusable-component.d.ts +2 -1
  6. package/lib/_internal/form-field-component.d.ts +3 -2
  7. package/lib/_internal/item-storages/dropdown-item-storage.d.ts +19 -19
  8. package/lib/_internal/item-storages/simple-item-storage.d.ts +15 -12
  9. package/lib/_internal/item-storages/simplest-item-storage.d.ts +1 -1
  10. package/lib/_internal/ngmodel-component.d.ts +5 -8
  11. package/lib/_internal/selectable-list-component.d.ts +6 -6
  12. package/lib/_internal/utils/date.utils.d.ts +16 -0
  13. package/lib/badge/badge.directive.d.ts +3 -2
  14. package/lib/breakpoints/breakpoint.service.d.ts +12 -0
  15. package/lib/breakpoints/breakpoint.utils.d.ts +7 -0
  16. package/lib/breakpoints/breakpoints.d.ts +13 -0
  17. package/lib/breakpoints/index.d.ts +2 -0
  18. package/lib/buttons/_button-base.d.ts +12 -8
  19. package/lib/buttons/_button-base.defaults.d.ts +3 -2
  20. package/lib/buttons/button/button.component.d.ts +5 -5
  21. package/lib/buttons/button/button.defaults.d.ts +0 -2
  22. package/lib/buttons/button/button.directive.d.ts +17 -0
  23. package/lib/buttons/button/button.module.d.ts +3 -2
  24. package/lib/buttons/button/index.d.ts +1 -0
  25. package/lib/buttons/fab/fab.component.d.ts +3 -1
  26. package/lib/buttons/icon-button/icon-button.component.d.ts +6 -4
  27. package/lib/buttons/icon-button/icon-button.defaults.d.ts +2 -1
  28. package/lib/calendar/abstract-calendar.d.ts +128 -0
  29. package/lib/calendar/calendar.component.d.ts +8 -96
  30. package/lib/calendar/calendar.defaults.d.ts +16 -1
  31. package/lib/calendar/calendar.internal-directives.d.ts +24 -8
  32. package/lib/calendar/calendar.internal-types.d.ts +1 -0
  33. package/lib/calendar/calendar.module.d.ts +4 -9
  34. package/lib/calendar/calendar.types.d.ts +21 -5
  35. package/lib/calendar/index.d.ts +3 -0
  36. package/lib/calendar/range-calendar.component.d.ts +16 -0
  37. package/lib/calendar/range-calendar.directives.d.ts +51 -0
  38. package/lib/calendar/range-calendar.module.d.ts +10 -0
  39. package/lib/calendar/views/calendar-views.module.d.ts +13 -0
  40. package/lib/calendar/views/days-view/days-view.component.d.ts +20 -2
  41. package/lib/calendar/views/days-view/days-view.helpers.d.ts +2 -2
  42. package/lib/calendar/views/months-view/months-view.component.d.ts +15 -3
  43. package/lib/calendar/views/years-view/years-view.component.d.ts +16 -3
  44. package/lib/checkbox/checkbox.component.d.ts +5 -2
  45. package/lib/checkbox/checkbox.types.d.ts +2 -0
  46. package/lib/checkbox-list/checkbox-list.component.d.ts +9 -7
  47. package/lib/checkbox-list/checkbox-list.directives.d.ts +7 -0
  48. package/lib/checkbox-list/checkbox-list.module.d.ts +1 -1
  49. package/lib/chip/chip.component.d.ts +2 -1
  50. package/lib/chip/deletable-chip/deletable-chip.component.d.ts +2 -1
  51. package/lib/chip/selectable-chip/selectable-chip.component.d.ts +5 -2
  52. package/lib/dialog/dialog.component.d.ts +13 -8
  53. package/lib/dialog/dialog.types.d.ts +1 -0
  54. package/lib/divider/divider.component.d.ts +2 -3
  55. package/lib/divider/divider.defaults.d.ts +5 -0
  56. package/lib/divider/divider.directive.d.ts +18 -0
  57. package/lib/divider/divider.module.d.ts +3 -2
  58. package/lib/divider/divider.types.d.ts +5 -0
  59. package/lib/divider/index.d.ts +2 -0
  60. package/lib/dropdown-panel/dropdown-panel.component.d.ts +2 -1
  61. package/lib/dropdown-panel/dropdown-panel.types.d.ts +1 -1
  62. package/lib/file-inputs/file-input/file-input.component.d.ts +2 -1
  63. package/lib/file-inputs/file-input-base.d.ts +4 -5
  64. package/lib/form-field/auto-error/auto-error.component.d.ts +19 -0
  65. package/lib/form-field/auto-error/auto-error.provider.d.ts +7 -0
  66. package/lib/form-field/error/error.directive.d.ts +3 -2
  67. package/lib/form-field/form-field-base.d.ts +5 -2
  68. package/lib/form-field/form-field-child.token.d.ts +5 -5
  69. package/lib/form-field/form-field-native-inputs.d.ts +6 -11
  70. package/lib/form-field/form-field.component.d.ts +1 -1
  71. package/lib/form-field/form-field.defaults.d.ts +1 -0
  72. package/lib/form-field/form-field.module.d.ts +5 -4
  73. package/lib/form-field/hint/hint.directive.d.ts +3 -2
  74. package/lib/form-field/hint-error/hint-error.directive.d.ts +3 -2
  75. package/lib/form-field/horizontal-form-field.component.d.ts +1 -1
  76. package/lib/form-field/index.d.ts +2 -0
  77. package/lib/form-field/label/label.component.d.ts +3 -2
  78. package/lib/form-field-frame/form-field-frame.component.d.ts +5 -3
  79. package/lib/grid/grid.component.d.ts +51 -0
  80. package/lib/grid/grid.defaults.d.ts +16 -0
  81. package/lib/grid/grid.module.d.ts +7 -0
  82. package/lib/grid/grid.types.d.ts +38 -0
  83. package/lib/grid/grid.utils.d.ts +11 -0
  84. package/lib/grid/index.d.ts +4 -0
  85. package/lib/icon/icon.component.d.ts +2 -1
  86. package/lib/inputs/_simple-input-base.d.ts +6 -3
  87. package/lib/inputs/autocomplete-input/autocomplete-input.component.d.ts +5 -4
  88. package/lib/inputs/date-input/abstract-date-input.d.ts +112 -0
  89. package/lib/inputs/date-input/date-input.component.d.ts +19 -81
  90. package/lib/inputs/date-input/date-input.defaults.d.ts +21 -3
  91. package/lib/inputs/date-input/{date-input.directive.d.ts → date-input.directives.d.ts} +2 -2
  92. package/lib/inputs/date-input/date-input.module.d.ts +5 -4
  93. package/lib/inputs/date-input/date-input.serializers.d.ts +4 -2
  94. package/lib/inputs/date-input/date-input.types.d.ts +5 -4
  95. package/lib/inputs/date-input/date-range-input.component.d.ts +30 -0
  96. package/lib/inputs/date-input/date-range-input.directives.d.ts +82 -0
  97. package/lib/inputs/date-input/date-range-input.module.d.ts +17 -0
  98. package/lib/inputs/date-input/index.d.ts +7 -1
  99. package/lib/inputs/date-input/multipage-date-range-input.component.d.ts +45 -0
  100. package/lib/inputs/date-input/multipage-date-range-input.directives.d.ts +82 -0
  101. package/lib/inputs/date-input/multipage-date-range-input.module.d.ts +17 -0
  102. package/lib/inputs/digit-input/digit-input.component.d.ts +4 -3
  103. package/lib/inputs/hex-input/hex-input.component.d.ts +4 -3
  104. package/lib/inputs/input-utils.d.ts +13 -2
  105. package/lib/inputs/number-input/number-input.component.d.ts +20 -12
  106. package/lib/inputs/number-input/number-input.defaults.d.ts +6 -0
  107. package/lib/inputs/number-input/number-input.directives.d.ts +12 -0
  108. package/lib/inputs/number-input/number-input.module.d.ts +1 -1
  109. package/lib/inputs/number-input/number-input.types.d.ts +6 -0
  110. package/lib/inputs/password-input/password-input.component.d.ts +5 -3
  111. package/lib/kbd/kbd.component.d.ts +2 -1
  112. package/lib/kbd-shortcut/kbd-shortcut.component.d.ts +2 -1
  113. package/lib/modal/modal.component.d.ts +9 -6
  114. package/lib/modal/modal.defaults.d.ts +2 -0
  115. package/lib/option/option.component.d.ts +2 -1
  116. package/lib/progress-bar/progress-bar.component.d.ts +4 -3
  117. package/lib/progress-circle/progress-circle.component.d.ts +5 -4
  118. package/lib/radio/radio/radio.component.d.ts +8 -3
  119. package/lib/search-functions.d.ts +1 -1
  120. package/lib/segment/segment.component.d.ts +6 -5
  121. package/lib/select/select.component.d.ts +42 -32
  122. package/lib/select/select.defaults.d.ts +10 -2
  123. package/lib/select/select.directive.d.ts +6 -0
  124. package/lib/select/select.module.d.ts +1 -1
  125. package/lib/select/select.types.d.ts +6 -2
  126. package/lib/select/select.utils.d.ts +2 -0
  127. package/lib/slide-toggle/slide-toggle.component.d.ts +2 -0
  128. package/lib/slider/abstract-slider.d.ts +37 -29
  129. package/lib/slider/index.d.ts +1 -0
  130. package/lib/slider/range-slider/range-slider.component.d.ts +12 -9
  131. package/lib/slider/range-slider/range-slider.types.d.ts +6 -0
  132. package/lib/slider/slider.component.d.ts +5 -4
  133. package/lib/slider/slider.types.d.ts +3 -3
  134. package/lib/star/rating-display/rating-display.component.d.ts +2 -1
  135. package/lib/star/rating-input/rating-input.component.d.ts +5 -3
  136. package/lib/star/rating-input/rating-input.defaults.d.ts +2 -2
  137. package/lib/star/star-button/star-button.component.d.ts +4 -1
  138. package/lib/star/star-button/star-button.types.d.ts +1 -0
  139. package/lib/tabber/index.d.ts +2 -1
  140. package/lib/tabber/tab/tab.component.d.ts +16 -8
  141. package/lib/tabber/tabber.component.d.ts +25 -9
  142. package/lib/tabber/tabber.defaults.d.ts +2 -0
  143. package/lib/tabber/tabber.directives.d.ts +9 -0
  144. package/lib/tabber/tabber.module.d.ts +3 -2
  145. package/lib/tabber/tabber.types.d.ts +5 -0
  146. package/lib/table/table.component.d.ts +16 -15
  147. package/lib/table-pagination/table-pagination.component.d.ts +4 -3
  148. package/lib/text-list/text-list.component.d.ts +2 -1
  149. package/lib/types/alignment.types.d.ts +7 -1
  150. package/lib/types/item-storage.types.d.ts +17 -18
  151. package/lib/types/theming.types.d.ts +1 -0
  152. package/package.json +3 -2
  153. package/prebuilt-themes/default/badge.css +234 -205
  154. package/prebuilt-themes/default/badge.css.map +1 -1
  155. package/prebuilt-themes/default/buttons/button.css +324 -301
  156. package/prebuilt-themes/default/buttons/button.css.map +1 -1
  157. package/prebuilt-themes/default/buttons/fab.css +317 -299
  158. package/prebuilt-themes/default/buttons/fab.css.map +1 -1
  159. package/prebuilt-themes/default/buttons/icon-button.css +299 -287
  160. package/prebuilt-themes/default/buttons/icon-button.css.map +1 -1
  161. package/prebuilt-themes/default/calendar.css +390 -308
  162. package/prebuilt-themes/default/calendar.css.map +1 -1
  163. package/prebuilt-themes/default/card.css +151 -127
  164. package/prebuilt-themes/default/card.css.map +1 -1
  165. package/prebuilt-themes/default/checkbox-list.css +89 -62
  166. package/prebuilt-themes/default/checkbox-list.css.map +1 -1
  167. package/prebuilt-themes/default/checkbox.css +349 -362
  168. package/prebuilt-themes/default/checkbox.css.map +1 -1
  169. package/prebuilt-themes/default/chips.css +412 -359
  170. package/prebuilt-themes/default/chips.css.map +1 -1
  171. package/prebuilt-themes/default/color-display.css +34 -26
  172. package/prebuilt-themes/default/color-display.css.map +1 -1
  173. package/prebuilt-themes/default/color-picker.css +105 -103
  174. package/prebuilt-themes/default/color-picker.css.map +1 -1
  175. package/prebuilt-themes/default/core.css +108 -86
  176. package/prebuilt-themes/default/core.css.map +1 -1
  177. package/prebuilt-themes/default/dialog.css +19 -15
  178. package/prebuilt-themes/default/dialog.css.map +1 -1
  179. package/prebuilt-themes/default/divider.css +84 -8
  180. package/prebuilt-themes/default/divider.css.map +1 -1
  181. package/prebuilt-themes/default/dropdown-panel.css +42 -34
  182. package/prebuilt-themes/default/dropdown-panel.css.map +1 -1
  183. package/prebuilt-themes/default/file-drop-area.css +329 -276
  184. package/prebuilt-themes/default/file-drop-area.css.map +1 -1
  185. package/prebuilt-themes/default/form-field-frame.css +102 -98
  186. package/prebuilt-themes/default/form-field-frame.css.map +1 -1
  187. package/prebuilt-themes/default/form-field.css +148 -118
  188. package/prebuilt-themes/default/form-field.css.map +1 -1
  189. package/prebuilt-themes/default/inputs/autocomplete-input.css +183 -132
  190. package/prebuilt-themes/default/inputs/autocomplete-input.css.map +1 -1
  191. package/prebuilt-themes/default/inputs/color-input.css +99 -137
  192. package/prebuilt-themes/default/inputs/color-input.css.map +1 -1
  193. package/prebuilt-themes/default/inputs/date-input.css +134 -63
  194. package/prebuilt-themes/default/inputs/date-input.css.map +1 -1
  195. package/prebuilt-themes/default/inputs/digit-input.css +120 -110
  196. package/prebuilt-themes/default/inputs/digit-input.css.map +1 -1
  197. package/prebuilt-themes/default/inputs/file-input.css +385 -325
  198. package/prebuilt-themes/default/inputs/file-input.css.map +1 -1
  199. package/prebuilt-themes/default/inputs/hex-input.css +150 -117
  200. package/prebuilt-themes/default/inputs/hex-input.css.map +1 -1
  201. package/prebuilt-themes/default/inputs/input.css +137 -107
  202. package/prebuilt-themes/default/inputs/input.css.map +1 -1
  203. package/prebuilt-themes/default/inputs/number-input.css +213 -164
  204. package/prebuilt-themes/default/inputs/number-input.css.map +1 -1
  205. package/prebuilt-themes/default/inputs/password-input.css +120 -71
  206. package/prebuilt-themes/default/inputs/password-input.css.map +1 -1
  207. package/prebuilt-themes/default/kbd-shortcut.css +14 -9
  208. package/prebuilt-themes/default/kbd-shortcut.css.map +1 -1
  209. package/prebuilt-themes/default/kbd.css +26 -15
  210. package/prebuilt-themes/default/kbd.css.map +1 -1
  211. package/prebuilt-themes/default/modal.css +96 -71
  212. package/prebuilt-themes/default/modal.css.map +1 -1
  213. package/prebuilt-themes/default/progress-bar.css +250 -228
  214. package/prebuilt-themes/default/progress-bar.css.map +1 -1
  215. package/prebuilt-themes/default/progress-circle.css +178 -164
  216. package/prebuilt-themes/default/progress-circle.css.map +1 -1
  217. package/prebuilt-themes/default/radio.css +246 -223
  218. package/prebuilt-themes/default/radio.css.map +1 -1
  219. package/prebuilt-themes/default/segment.css +432 -414
  220. package/prebuilt-themes/default/segment.css.map +1 -1
  221. package/prebuilt-themes/default/select.css +302 -270
  222. package/prebuilt-themes/default/select.css.map +1 -1
  223. package/prebuilt-themes/default/slide-toggle.css +319 -261
  224. package/prebuilt-themes/default/slide-toggle.css.map +1 -1
  225. package/prebuilt-themes/default/slider.css +399 -351
  226. package/prebuilt-themes/default/slider.css.map +1 -1
  227. package/prebuilt-themes/default/snackbar.css +189 -169
  228. package/prebuilt-themes/default/snackbar.css.map +1 -1
  229. package/prebuilt-themes/default/spinner.css +161 -148
  230. package/prebuilt-themes/default/spinner.css.map +1 -1
  231. package/prebuilt-themes/default/stars.css +271 -246
  232. package/prebuilt-themes/default/stars.css.map +1 -1
  233. package/prebuilt-themes/default/tabber.css +250 -207
  234. package/prebuilt-themes/default/tabber.css.map +1 -1
  235. package/prebuilt-themes/default/table-pagination.css +57 -45
  236. package/prebuilt-themes/default/table-pagination.css.map +1 -1
  237. package/prebuilt-themes/default/table.css +464 -432
  238. package/prebuilt-themes/default/table.css.map +1 -1
  239. package/public-api.d.ts +2 -1
  240. package/themes/_variables.scss +2 -1
  241. package/themes/default/_coloring.scss +7 -0
  242. package/themes/default/_mixins.scss +5 -5
  243. package/themes/default/badge.scss +115 -80
  244. package/themes/default/buttons/_button-mixins.scss +43 -33
  245. package/themes/default/buttons/button.scss +90 -63
  246. package/themes/default/buttons/fab.scss +74 -49
  247. package/themes/default/buttons/icon-button.scss +70 -45
  248. package/themes/default/calendar.scss +257 -163
  249. package/themes/default/card.scss +167 -121
  250. package/themes/default/checkbox-list.scss +90 -62
  251. package/themes/default/checkbox.scss +64 -91
  252. package/themes/default/chips.scss +203 -143
  253. package/themes/default/color-display.scss +40 -28
  254. package/themes/default/color-picker.scss +95 -93
  255. package/themes/default/core.scss +123 -97
  256. package/themes/default/dialog.scss +22 -13
  257. package/themes/default/divider.scss +109 -7
  258. package/themes/default/dropdown-panel.scss +49 -34
  259. package/themes/default/file-drop-area.scss +197 -138
  260. package/themes/default/form-field-frame.scss +73 -63
  261. package/themes/default/form-field.scss +136 -98
  262. package/themes/default/inputs/_shared.scss +52 -12
  263. package/themes/default/inputs/autocomplete-input.scss +102 -31
  264. package/themes/default/inputs/color-input.scss +34 -32
  265. package/themes/default/inputs/date-input.scss +90 -20
  266. package/themes/default/inputs/digit-input.scss +103 -79
  267. package/themes/default/inputs/file-input.scss +160 -81
  268. package/themes/default/inputs/hex-input.scss +68 -16
  269. package/themes/default/inputs/input.scss +55 -6
  270. package/themes/default/inputs/number-input.scss +164 -92
  271. package/themes/default/inputs/password-input.scss +100 -29
  272. package/themes/default/kbd-shortcut.scss +16 -8
  273. package/themes/default/kbd.scss +35 -16
  274. package/themes/default/modal.scss +109 -73
  275. package/themes/default/progress-bar.scss +126 -102
  276. package/themes/default/progress-circle.scss +49 -41
  277. package/themes/default/radio.scss +110 -87
  278. package/themes/default/segment.scss +282 -267
  279. package/themes/default/select.scss +255 -197
  280. package/themes/default/slide-toggle.scss +193 -116
  281. package/themes/default/slider.scss +230 -187
  282. package/themes/default/snackbar.scss +52 -32
  283. package/themes/default/spinner.scss +24 -14
  284. package/themes/default/stars.scss +99 -68
  285. package/themes/default/tabber.scss +109 -67
  286. package/themes/default/table-pagination.scss +60 -44
  287. package/themes/default/table.scss +379 -343
  288. package/lib/statebox/index.d.ts +0 -4
  289. package/lib/statebox/statebox.component.d.ts +0 -26
  290. package/lib/statebox/statebox.defaults.d.ts +0 -10
  291. package/lib/statebox/statebox.module.d.ts +0 -8
  292. package/lib/statebox/statebox.types.d.ts +0 -26
  293. package/lib/tabber/tab/tab.defaults.d.ts +0 -6
  294. package/prebuilt-themes/default/calendar-OLD.css +0 -294
  295. package/prebuilt-themes/default/calendar-OLD.css.map +0 -1
  296. package/prebuilt-themes/default/inputs/search-bar.css +0 -118
  297. package/prebuilt-themes/default/inputs/search-bar.css.map +0 -1
  298. package/prebuilt-themes/default/statebox.css +0 -235
  299. package/prebuilt-themes/default/statebox.css.map +0 -1
  300. package/themes/default/calendar-OLD.scss +0 -183
  301. package/themes/default/inputs/search-bar.scss +0 -19
  302. package/themes/default/statebox.scss +0 -109
@@ -1,123 +1,161 @@
1
1
  @use '../variables' as ARD;
2
2
 
3
- ard-form-field,
4
- ard-horizontal-form-field {
5
- display: block;
6
- width: 100%;
7
- }
3
+ @layer ard-ui {
4
+ // the variables are commented out intentionally
5
+ // read more in docs/dev/css-variables.md
6
+ :root {
7
+ --ard-form-field-label-padding: 0.25rem 0 0.125rem 0.125rem;
8
+ --ard-form-field-label-font-size: 0.9375rem;
9
+ --ard-form-field-label-font-weight: 500;
10
+ --ard-form-field-label-required-font-weight: 500;
11
+ --ard-form-field-label-required-font-size: 112.5%;
12
+ --ard-form-field-label-required-color: orangered;
13
+ --ard-form-field-label-optional-font-weight: 400;
14
+ --ard-form-field-label-optional-font-size: 0.8125rem;
15
+ // --ard-form-field-label-optional-color: ;
16
+ --ard-form-field-label-optional-font-style: italic;
17
+ // --ard-form-field-error-color: ;
18
+ // --ard-form-field-success-color: ;
19
+ --ard-form-field-hint-padding: 0.125rem 0 0.25rem 0.125rem;
20
+ --ard-form-field-hint-font-size: 0.8125rem;
21
+ --ard-form-field-hint-line-height: 1.2;
22
+ --ard-form-field-hint-right-padding-left: 0.5rem;
23
+ --ard-form-field-hint-error-line-height: 1.2;
24
+ --ard-form-field-hint-error-gap: 0.375em;
25
+ --ard-form-field-label-disabled-opacity: 40%;
26
+ --ard-form-field-hint-disabled-opacity: 50%;
27
+ --ard-form-field-error-animation-duration: 0.25s;
28
+ --ard-horizontal-form-field-gap: 0.5rem;
29
+ }
30
+
31
+ ard-form-field,
32
+ ard-horizontal-form-field {
33
+ display: block;
34
+ width: 100%;
35
+ }
8
36
 
9
- .ard-form-field,
10
- .ard-horizontal-form-field {
11
- display: flex;
12
- flex-direction: column;
37
+ .ard-form-field,
38
+ .ard-horizontal-form-field {
39
+ display: flex;
40
+ flex-direction: column;
13
41
 
14
- .ard-label {
15
- padding: 0.25rem 0 0.125rem 0.125rem;
16
- font-size: 0.9375rem;
17
- font-weight: 500;
42
+ .ard-label {
43
+ padding: var(--ard-form-field-label-padding, 0.25rem 0 0.125rem 0.125rem);
44
+ font-size: var(--ard-form-field-label-font-size, 0.9375rem);
45
+ font-weight: var(--ard-form-field-label-font-weight, 500);
18
46
 
19
- .ard-label__required {
20
- .ard-label__required-optional-text {
21
- font-weight: 500;
22
- color: orangered;
23
- font-size: 112.5%;
24
- line-height: 1;
47
+ .ard-label__required {
48
+ .ard-label__required-optional-text {
49
+ font-weight: var(--ard-form-field-label-required-font-weight, 500);
50
+ font-size: var(--ard-form-field-label-required-font-size, 112.5%);
51
+ color: var(--ard-form-field-label-required-color, orangered);
52
+ line-height: 1;
53
+ }
25
54
  }
26
- }
27
- .ard-label__optional {
28
- .ard-label__required-optional-text {
29
- font-weight: 400;
30
- font-size: 0.8125rem;
31
- font-style: italic;
55
+ .ard-label__optional {
56
+ .ard-label__required-optional-text {
57
+ font-weight: var(--ard-form-field-label-optional-font-weight, 400);
58
+ font-size: var(--ard-form-field-label-optional-font-size, 0.8125rem);
59
+ color: var(--ard-form-field-label-optional-color, #{ARD.$text2});
60
+ font-style: var(--ard-form-field-label-optional-font-style, italic);
61
+ }
32
62
  }
33
63
  }
34
- }
35
- .ard-form-field__hints {
36
- padding: 0.125rem 0 0.25rem 0.125rem;
37
- font-size: 0.8125rem;
38
- line-height: 1.1;
64
+ .ard-form-field__hints {
65
+ padding: var(--ard-form-field-hint-padding, 0.125rem 0 0.25rem 0.125rem);
66
+ font-size: var(--ard-form-field-hint-font-size, 0.8125rem);
67
+ line-height: var(--ard-form-field-hint-line-height, 1.1);
39
68
 
40
- &.ard-form-field__reserve-hint-line {
41
- box-sizing: content-box;
42
- min-height: 1.1em;
69
+ &.ard-form-field__reserve-hint-line {
70
+ box-sizing: content-box;
71
+ min-height: calc(var(--ard-form-field-hint-line-height, 1.1) * 1em);
72
+ }
43
73
  }
44
- }
45
- .ard-form-field__hints-right,
46
- .ard-form-field__errors-right {
47
- > * {
48
- padding-left: 0.5rem;
74
+ .ard-form-field__hints-right,
75
+ .ard-form-field__errors-right {
76
+ > * {
77
+ padding-left: var(--ard-form-field-hint-right-padding-left, 0.5rem);
78
+ }
49
79
  }
50
- }
51
- .ard-hint,
52
- .ard-error {
53
- font-size: 1em;
54
- line-height: 1.1;
55
- display: inline-grid;
56
- min-height: 1.1em;
57
- }
58
- .ard-hint {
59
- color: ARD.$text2;
60
- }
61
- .ard-error:not(.ard-hint-error),
62
- .ard-form-field__errors .ard-hint-error {
63
- color: ARD.$danger700;
64
- overflow: hidden;
65
- }
66
- .ard-error:not(.ard-hint-error) {
67
- animation: errorAppear 0.25s ARD.$timing-fn forwards;
68
- }
69
- .ard-form-field__default-hint, .ard-form-field__default-error {
70
- gap: 0.375em;
71
- }
72
-
73
- &.ard-form-field__with-error {
74
- .ard-label {
75
- color: ARD.$danger700;
80
+ .ard-hint,
81
+ .ard-error {
82
+ font-size: 1em;
83
+ line-height: var(--ard-form-field-hint-error-line-height, 1.2);
84
+ display: inline-grid;
85
+ min-height: calc(var(--ard-form-field-hint-error-line-height, 1.2) * 1em);
76
86
  }
77
- }
78
- &.ard-form-field__is-success {
79
- .ard-label {
80
- color: ARD.$success700;
87
+ .ard-hint {
88
+ color: var(--ard-form-field-hint-color, #{ARD.$text2});
81
89
  }
82
- }
83
- &.ard-form-field__control-disabled {
84
- .ard-label {
85
- opacity: 40%;
90
+ .ard-error:not(.ard-hint-error),
91
+ .ard-form-field__errors .ard-hint-error {
92
+ color: var(--ard-form-field-error-color, #{ARD.$danger700});
93
+ overflow: hidden;
86
94
  }
87
- .ard-form-field__hints {
88
- opacity: 50%;
95
+ .ard-error:not(.ard-hint-error) {
96
+ animation: errorAppear var(--ard-form-field-error-animation-duration, 0.25s) ARD.$timing-fn forwards;
97
+ }
98
+ .ard-form-field__default-hint,
99
+ .ard-form-field__default-error {
100
+ gap: var(--ard-form-field-hint-error-gap, 0.375em);
89
101
  }
90
- }
91
- }
92
- .ard-horizontal-form-field {
93
- align-items: flex-start;
94
- justify-content: stretch;
95
- flex-direction: row;
96
- gap: 0.5rem;
97
102
 
98
- .ard-form-field__label-container {
99
- width: var(--ard-horizontal-form-field-label-width, 12rem);
100
- height: ARD.$form-field-height;
101
- display: flex;
102
- align-items: center;
103
- justify-content: var(--ard-horizontal-form-field-label-align, flex-start);
104
- }
105
- .ard-form-field__non-label {
106
- flex-grow: 1;
103
+ &.ard-form-field__with-error {
104
+ .ard-label,
105
+ ard-label {
106
+ color: var(--ard-form-field-error-color, #{ARD.$danger700});
107
+ }
108
+ }
109
+ &.ard-form-field__is-success {
110
+ .ard-label,
111
+ ard-label {
112
+ color: var(--ard-form-field-success-color, #{ARD.$success700});
113
+ }
114
+ }
115
+ &.ard-form-field__control-disabled {
116
+ .ard-label {
117
+ opacity: var(--ard-form-field-label-disabled-opacity, 40%);
118
+ }
119
+ .ard-form-field__hints {
120
+ opacity: var(--ard-form-field-hint-disabled-opacity, 50%);
121
+ }
122
+ }
107
123
  }
124
+ .ard-horizontal-form-field {
125
+ align-items: flex-start;
126
+ justify-content: stretch;
127
+ flex-direction: row;
128
+ gap: var(--ard-horizontal-form-field-gap, 0.5rem);
108
129
 
109
- &:has(.ard-form-field__input .ard-compact) {
110
130
  .ard-form-field__label-container {
111
- height: ARD.$form-field-compact-height;
131
+ width: var(--ard-horizontal-form-field-label-width, 12rem);
132
+ min-width: var(--ard-horizontal-form-field-label-width, 12rem);
133
+ height: ARD.$form-field-height;
134
+ display: flex;
135
+ align-items: center;
136
+ justify-content: var(--ard-horizontal-form-field-label-align, flex-start);
137
+ }
138
+ .ard-form-field__non-label {
139
+ flex-grow: 1;
140
+ }
141
+
142
+ &:has(.ard-form-field__input .ard-compact) {
143
+ .ard-form-field__label-container {
144
+ height: ARD.$form-field-compact-height;
145
+ }
112
146
  }
113
147
  }
114
- }
115
148
 
116
- @keyframes errorAppear {
117
- from {
118
- grid-template-rows: 0fr;
149
+ ard-label {
150
+ display: flex;
119
151
  }
120
- to {
121
- grid-template-rows: 1fr;
152
+
153
+ @keyframes errorAppear {
154
+ from {
155
+ grid-template-rows: 0fr;
156
+ }
157
+ to {
158
+ grid-template-rows: 1fr;
159
+ }
122
160
  }
123
161
  }
@@ -3,32 +3,69 @@
3
3
  /**
4
4
  * Should be applied to the first element in the component's template.
5
5
  */
6
- @mixin genericInput() {
6
+ @mixin genericInput(
7
+ $height,
8
+ $height-compact,
9
+ $gap,
10
+ $font-size,
11
+ $font-size-compact,
12
+ $line-height,
13
+ $line-height-compact,
14
+ $font-weight,
15
+ $padding-top,
16
+ $padding-right,
17
+ $padding-bottom,
18
+ $padding-left,
19
+ $padding-top-compact,
20
+ $padding-right-compact,
21
+ $padding-bottom-compact,
22
+ $padding-left-compact,
23
+ $color,
24
+ $placeholder-color,
25
+ $placeholder-opacity
26
+ ) {
27
+ height: $height;
7
28
  position: relative;
8
- font-family: 'Roboto', sans-serif;
29
+ font-family: var(--ard-font-family);
9
30
  display: flex;
10
31
  align-items: center;
11
32
  justify-content: stretch;
12
- gap: 0.625em;
33
+ gap: $gap;
13
34
  cursor: text;
14
35
  box-sizing: border-box;
15
- font-size: 1rem;
16
- line-height: 1.25em;
36
+ font-size: $font-size;
37
+ line-height: $line-height;
38
+ font-weight: $font-weight;
39
+ padding-left: $padding-left;
40
+ padding-right: $padding-right;
41
+ padding-top: $padding-top;
42
+ padding-bottom: $padding-bottom;
43
+ color: $color;
17
44
 
18
45
  .ard-input-container {
19
46
  flex-grow: 1;
20
47
  text-size-adjust: 100%;
21
48
  display: flex;
22
49
  align-items: center;
50
+ height: 100%;
51
+ position: relative;
23
52
 
53
+ > * {
54
+ position: absolute;
55
+ inset: 0;
56
+ max-width: 100%;
57
+ padding: 0;
58
+ }
24
59
  .ard-placeholder {
25
60
  font: inherit;
26
- opacity: 60%;
61
+ opacity: $placeholder-opacity;
62
+ color: $placeholder-color;
27
63
  white-space: nowrap;
28
64
  overflow: hidden;
29
65
  text-overflow: ellipsis;
30
- max-width: 100%;
31
66
  pointer-events: none;
67
+ display: flex;
68
+ align-items: center;
32
69
  }
33
70
 
34
71
  input {
@@ -36,15 +73,18 @@
36
73
  background: transparent;
37
74
  outline: none;
38
75
  font: inherit;
39
- padding: 0;
76
+ color: inherit;
40
77
  display: block;
41
- width: 100%;
42
78
  }
43
79
  }
44
80
  //! compact
45
81
  &.ard-compact {
46
- height: 1.5625em;
47
- font-size: 0.85em;
48
- line-height: 1;
82
+ height: $height-compact;
83
+ font-size: $font-size-compact;
84
+ line-height: $line-height-compact;
85
+ padding-left: $padding-left-compact;
86
+ padding-right: $padding-right-compact;
87
+ padding-top: $padding-top-compact;
88
+ padding-bottom: $padding-bottom-compact;
49
89
  }
50
90
  }
@@ -3,44 +3,115 @@
3
3
  @use '../clear-button' as CB;
4
4
  @use '../../variables' as ARD;
5
5
 
6
- .ard-autocomplete-input {
7
- @include inputMixin.genericInput();
8
- padding: 0 0.375rem;
9
- min-width: 10rem;
10
- max-width: 100%;
6
+ @layer ard-ui {
7
+ // the variables are commented out intentionally
8
+ // read more in docs/dev/css-variables.md
9
+ :root {
10
+ // --ard-autocomplete-input-height: ;
11
+ // --ard-autocomplete-input-height-compact: ;
12
+ --ard-autocomplete-input-gap: 0.625rem;
13
+ // --ard-autocomplete-input-font-size: ;
14
+ // --ard-autocomplete-input-font-size-compact: ;
15
+ --ard-autocomplete-input-line-height: 1.25;
16
+ --ard-autocomplete-input-line-height-compact: 1;
17
+ --ard-autocomplete-input-font-weight: 400;
18
+ // --ard-autocomplete-input-padding-top: ;
19
+ // --ard-autocomplete-input-padding-right: ;
20
+ // --ard-autocomplete-input-padding-bottom: ;
21
+ // --ard-autocomplete-input-padding-left: ;
22
+ // --ard-autocomplete-input-padding-top-compact: ;
23
+ // --ard-autocomplete-input-padding-right-compact: ;
24
+ // --ard-autocomplete-input-padding-bottom-compact: ;
25
+ // --ard-autocomplete-input-padding-left-compact: ;
26
+ // --ard-autocomplete-input-color: ;
27
+ // --ard-autocomplete-input-placeholder-color: ;
28
+ --ard-autocomplete-input-placeholder-opacity: 60%;
11
29
 
12
- @include CB.clearButton();
13
-
14
- .ard-autocomplete {
15
- opacity: 37.5%;
30
+ --ard-autocomplete-input-min-width: 10rem;
31
+ --ard-autocomplete-input-max-width: 100%;
32
+ --ard-autocomplete-input-autocomplete-opacity: 37.5%;
33
+ --ard-autocomplete-input-dropdown-padding: 0;
34
+ --ard-autocomplete-input-dropdown-max-height: 15rem;
35
+ --ard-autocomplete-input-dropdown-gap: 0;
36
+ --ard-autocomplete-input-option-padding: 0.375rem 0.625rem;
37
+ --ard-autocomplete-input-option-padding-compact: 0.25rem 0.5rem;
38
+ --ard-autocomplete-input-font-size: 1rem;
39
+ --ard-autocomplete-input-font-size-compact: 0.875rem;
40
+ // --ard-autocomplete-input-highlighted-background: ;
41
+ --ard-autocomplete-input-highlighted-font-weight: 400;
42
+ // --ard-autocomplete-input-selected-background: ;
43
+ --ard-autocomplete-input-selected-font-weight: 500;
44
+ --ard-autocomplete-input-disabled-opacity: 50%;
16
45
  }
17
- }
18
- //! suggestions
19
- .ard-input-suggestions-panel {
20
- .ard-option {
21
- padding: 0.375rem 0.625rem;
22
- font-size: 1rem;
23
- color: ARD.$text2;
24
- cursor: pointer;
25
-
26
- &.ard-option-highlighted {
27
- background: ARD.$darken-overlay-light;
28
- }
29
46
 
30
- &.ard-option-selected {
31
- font-weight: 500;
32
- background: ARD.$darken-overlay-medium;
33
- }
47
+ .ard-autocomplete-input {
48
+ @include inputMixin.genericInput(
49
+ var(--ard-autocomplete-input-height, var(--ard-form-field-height, 2.3125rem)),
50
+ var(--ard-autocomplete-input-height-compact, var(--ard-form-field-height-compact, 1.6875rem)),
51
+ var(--ard-autocomplete-input-gap, 0.625rem),
52
+ var(--ard-autocomplete-input-font-size, var(--ard-form-field-font-size, 1rem)),
53
+ var(--ard-autocomplete-input-font-size-compact, var(--ard-form-field-font-size-compact, 0.875rem)),
54
+ var(--ard-autocomplete-input-line-height, 1.25),
55
+ var(--ard-autocomplete-input-line-height-compact, 1),
56
+ var(--ard-autocomplete-input-font-weight, 400),
57
+ var(--ard-autocomplete-input-padding-top, var(--ard-form-field-padding-top, 0)),
58
+ var(--ard-autocomplete-input-padding-right, var(--ard-form-field-padding-right, 0.375rem)),
59
+ var(--ard-autocomplete-input-padding-bottom, var(--ard-form-field-padding-bottom, 0)),
60
+ var(--ard-autocomplete-input-padding-left, var(--ard-form-field-padding-left, 0.375rem)),
61
+ var(--ard-autocomplete-input-padding-top-compact, var(--ard-form-field-padding-top-compact, 0)),
62
+ var(--ard-autocomplete-input-padding-right-compact, var(--ard-form-field-padding-right-compact, 0.375rem)),
63
+ var(--ard-autocomplete-input-padding-bottom-compact, var(--ard-form-field-padding-bottom-compact, 0)),
64
+ var(--ard-autocomplete-input-padding-left-compact, var(--ard-form-field-padding-left-compact, 0.375rem)),
65
+ var(--ard-autocomplete-input-color, #{ARD.$text}),
66
+ var(--ard-autocomplete-input-placeholder-color, #{ARD.$text}),
67
+ var(--ard-autocomplete-input-placeholder-opacity, 60%)
68
+ );
69
+ min-width: var(--ard-autocomplete-input-min-width, 10rem);
70
+ max-width: var(--ard-autocomplete-input-max-width, 100%);
71
+
72
+ @include CB.clearButton();
34
73
 
35
- &.ard-option-disabled {
36
- pointer-events: none;
37
- opacity: 50%;
74
+ .ard-autocomplete {
75
+ display: flex;
76
+ align-items: center;
77
+ opacity: var(--ard-autocomplete-input-autocomplete-opacity, 37.5%);
38
78
  }
39
79
  }
40
- .ard-compact {
80
+ //! suggestions
81
+ .ard-input-suggestions-panel {
82
+ padding: var(--ard-autocomplete-input-dropdown-padding, 0);
83
+ display: flex;
84
+ flex-direction: column;
85
+ gap: var(--ard-autocomplete-input-dropdown-gap, 0);
86
+ max-height: var(--ard-autocomplete-input-dropdown-max-height, 15rem);
87
+ overflow-y: auto;
88
+
41
89
  .ard-option {
42
- padding: 0.25rem 0.5rem;
43
- font-size: 0.9rem;
90
+ padding: var(--ard-autocomplete-input-option-padding, 0.375rem 0.625rem);
91
+ font-size: var(--ard-autocomplete-input-font-size, 1rem);
92
+ color: var(--ard-autocomplete-input-color, #{ARD.$text2});
93
+ cursor: pointer;
94
+
95
+ &.ard-option-highlighted {
96
+ background: var(--ard-autocomplete-input-highlighted-background, #{ARD.$darken-overlay-light});
97
+ font-weight: var(--ard-autocomplete-input-highlighted-font-weight, 400);
98
+ }
99
+
100
+ &.ard-option-selected {
101
+ background: var(--ard-autocomplete-input-selected-background, #{ARD.$darken-overlay-medium});
102
+ font-weight: var(--ard-autocomplete-input-selected-font-weight, 500);
103
+ }
104
+
105
+ &.ard-option-disabled {
106
+ pointer-events: none;
107
+ opacity: var(--ard-autocomplete-input-disabled-opacity, 50%);
108
+ }
109
+ }
110
+ .ard-compact {
111
+ .ard-option {
112
+ padding: var(--ard-autocomplete-input-option-padding-compact, 0.25rem 0.5rem);
113
+ font-size: var(--ard-autocomplete-input-font-size-compact, 0.875rem);
114
+ }
44
115
  }
45
116
  }
46
117
  }
@@ -2,45 +2,47 @@
2
2
  @use '../mixins' as defaultMixins;
3
3
  @use '../clear-button' as CB;
4
4
 
5
- .ard-color-input {
6
- @include inputMixin.genericInput();
7
- padding: 0 0.375rem;
8
- min-width: 10rem;
9
- max-width: 100%;
10
- cursor: pointer;
5
+ @layer ard-ui {
6
+ .ard-color-input {
7
+ // @include inputMixin.genericInput();
8
+ padding: 0 0.375rem;
9
+ min-width: 10rem;
10
+ max-width: 100%;
11
+ cursor: pointer;
11
12
 
12
- @include CB.clearButton();
13
+ @include CB.clearButton();
13
14
 
14
- .ard-input-container {
15
- pointer-events: none;
15
+ .ard-input-container {
16
+ pointer-events: none;
16
17
 
17
- input {
18
- font-family: monospace;
19
- user-select: none;
18
+ input {
19
+ font-family: var(--ard-font-family-mono);
20
+ user-select: none;
21
+ }
20
22
  }
21
- }
22
23
 
23
- .ard-color-display-button {
24
- padding: 0;
25
- margin: 0;
26
- border: none;
27
- background: transparent;
28
- display: flex;
29
- align-items: center;
30
- cursor: pointer;
31
- width: 3em;
32
- outline: none;
24
+ .ard-color-display-button {
25
+ padding: 0;
26
+ margin: 0;
27
+ border: none;
28
+ background: transparent;
29
+ display: flex;
30
+ align-items: center;
31
+ cursor: pointer;
32
+ width: 3em;
33
+ outline: none;
33
34
 
34
- * {
35
- width: 100% !important;
36
- }
35
+ * {
36
+ width: 100% !important;
37
+ }
37
38
 
38
- ard-color-display {
39
- pointer-events: none;
40
- font-size: 1.1rem;
39
+ ard-color-display {
40
+ pointer-events: none;
41
+ font-size: 1.1rem;
42
+ }
41
43
  }
42
44
  }
43
- }
44
- .ard-color-input-overlay-card {
45
- margin: 0.4rem;
45
+ .ard-color-input-overlay-card {
46
+ margin: 0.4rem;
47
+ }
46
48
  }