@react-md/core 1.0.0-next.7 → 1.0.0-next.9

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 (713) hide show
  1. package/.stylelintrc.json +14 -0
  2. package/.turbo/turbo-build.log +6 -6
  3. package/.turbo/turbo-lint.log +13 -12
  4. package/CHANGELOG.md +15 -0
  5. package/README.md +39 -24
  6. package/coverage/clover.xml +1013 -529
  7. package/coverage/coverage-final.json +9 -3
  8. package/coverage/lcov-report/AutoComplete.tsx.html +283 -0
  9. package/coverage/lcov-report/MenuItemCheckbox.tsx.html +223 -0
  10. package/coverage/lcov-report/MenuItemInputToggle.tsx.html +178 -232
  11. package/coverage/lcov-report/MenuItemRadio.tsx.html +436 -0
  12. package/coverage/lcov-report/RootHtml.tsx.html +370 -0
  13. package/coverage/lcov-report/Select.tsx.html +1411 -0
  14. package/coverage/lcov-report/SrOnly.tsx.html +328 -0
  15. package/coverage/lcov-report/Typography.tsx.html +1027 -0
  16. package/coverage/lcov-report/autocomplete/AutoComplete.tsx.html +283 -0
  17. package/coverage/lcov-report/autocomplete/Autocomplete.tsx.html +283 -0
  18. package/coverage/lcov-report/autocomplete/index.html +161 -0
  19. package/coverage/lcov-report/autocomplete/useAutoComplete.ts.html +775 -0
  20. package/coverage/lcov-report/autocomplete/useAutocomplete.ts.html +775 -0
  21. package/coverage/lcov-report/autocomplete/useInlineAutoComplete.ts.html +340 -0
  22. package/coverage/lcov-report/autocomplete/useInlineAutocomplete.ts.html +346 -0
  23. package/coverage/lcov-report/autocomplete/utils.ts.html +106 -0
  24. package/coverage/lcov-report/avatar/Avatar.tsx.html +162 -99
  25. package/coverage/lcov-report/avatar/index.html +19 -34
  26. package/coverage/lcov-report/avatar/styles.ts.html +1 -1
  27. package/coverage/lcov-report/button/Button.tsx.html +85 -85
  28. package/coverage/lcov-report/button/index.html +12 -12
  29. package/coverage/lcov-report/dialog/DialogFooter.tsx.html +36 -36
  30. package/coverage/lcov-report/dialog/DialogHeader.tsx.html +26 -26
  31. package/coverage/lcov-report/dialog/index.html +34 -19
  32. package/coverage/lcov-report/form/AutoComplete.tsx.html +283 -0
  33. package/coverage/lcov-report/form/Form.tsx.html +22 -22
  34. package/coverage/lcov-report/form/OptGroup.tsx.html +169 -166
  35. package/coverage/lcov-report/form/Option.tsx.html +727 -0
  36. package/coverage/lcov-report/form/Select.tsx.html +962 -1112
  37. package/coverage/lcov-report/form/SelectOriginal.tsx.html +1630 -0
  38. package/coverage/lcov-report/form/SelectV2.tsx.html +1024 -0
  39. package/coverage/lcov-report/form/SelectedOption.tsx.html +250 -0
  40. package/coverage/lcov-report/form/index.html +57 -12
  41. package/coverage/lcov-report/form/selectUtils.ts.html +188 -221
  42. package/coverage/lcov-report/form/useAutoComplete.ts.html +787 -0
  43. package/coverage/lcov-report/form/useCombobox.ts.html +454 -460
  44. package/coverage/lcov-report/form/useComboboxList.ts.html +108 -93
  45. package/coverage/lcov-report/form/useFormReset.ts.html +229 -0
  46. package/coverage/lcov-report/form/useInlineAutoComplete.ts.html +379 -0
  47. package/coverage/lcov-report/form/useSelectCombobox.ts.html +499 -0
  48. package/coverage/lcov-report/form/utils.ts.html +209 -170
  49. package/coverage/lcov-report/icon/FontIcon.tsx.html +28 -28
  50. package/coverage/lcov-report/icon/MaterialIcon.tsx.html +235 -0
  51. package/coverage/lcov-report/icon/index.html +1 -1
  52. package/coverage/lcov-report/index.html +32 -32
  53. package/coverage/lcov-report/media-queries/appSize.ts.html +1 -1
  54. package/coverage/lcov-report/media-queries/index.html +1 -1
  55. package/coverage/lcov-report/menu/DropdownMenu.tsx.html +188 -188
  56. package/coverage/lcov-report/menu/Menu.tsx.html +271 -265
  57. package/coverage/lcov-report/menu/MenuItem.tsx.html +292 -0
  58. package/coverage/lcov-report/menu/MenuVisibilityProvider.tsx.html +48 -33
  59. package/coverage/lcov-report/menu/index.html +45 -15
  60. package/coverage/lcov-report/menu/useContextMenu.ts.html +490 -0
  61. package/coverage/lcov-report/menuItemInputToggleStyles.ts.html +319 -0
  62. package/coverage/lcov-report/movement/index.html +19 -19
  63. package/coverage/lcov-report/movement/useKeyboardMovementProvider.ts.html +422 -383
  64. package/coverage/lcov-report/positioning/constants.ts.html +463 -0
  65. package/coverage/lcov-report/positioning/index.html +30 -30
  66. package/coverage/lcov-report/positioning/useFixedPositioning.ts.html +1321 -0
  67. package/coverage/lcov-report/progress/CircularProgress.tsx.html +184 -184
  68. package/coverage/lcov-report/progress/index.html +19 -34
  69. package/coverage/lcov-report/searching/caseInsensitive.ts.html +685 -0
  70. package/coverage/lcov-report/searching/fuzzy.ts.html +610 -0
  71. package/coverage/lcov-report/searching/index.html +161 -0
  72. package/coverage/lcov-report/searching/toSearchQuery.ts.html +139 -0
  73. package/coverage/lcov-report/searching/utils.ts.html +247 -0
  74. package/coverage/lcov-report/src/CoreProviders.tsx.html +20 -20
  75. package/coverage/lcov-report/src/NoSsr.tsx.html +1 -1
  76. package/coverage/lcov-report/src/RootHtml.tsx.html +370 -0
  77. package/coverage/lcov-report/src/SsrProvider.tsx.html +10 -10
  78. package/coverage/lcov-report/src/app-bar/AppBar.tsx.html +1 -1
  79. package/coverage/lcov-report/src/app-bar/AppBarTitle.tsx.html +1 -1
  80. package/coverage/lcov-report/src/app-bar/index.html +1 -1
  81. package/coverage/lcov-report/src/avatar/Avatar.tsx.html +1 -1
  82. package/coverage/lcov-report/src/avatar/index.html +1 -1
  83. package/coverage/lcov-report/src/avatar/styles.ts.html +1 -1
  84. package/coverage/lcov-report/src/badge/Badge.tsx.html +1 -1
  85. package/coverage/lcov-report/src/badge/index.html +1 -1
  86. package/coverage/lcov-report/src/box/Box.tsx.html +1 -1
  87. package/coverage/lcov-report/src/box/index.html +1 -1
  88. package/coverage/lcov-report/src/box/styles.ts.html +1 -1
  89. package/coverage/lcov-report/src/button/AsyncButton.tsx.html +1 -1
  90. package/coverage/lcov-report/src/button/Button.tsx.html +1 -1
  91. package/coverage/lcov-report/src/button/ButtonUnstyled.tsx.html +1 -1
  92. package/coverage/lcov-report/src/button/FloatingActionButton.tsx.html +1 -1
  93. package/coverage/lcov-report/src/button/TooltippedButton.tsx.html +1 -1
  94. package/coverage/lcov-report/src/button/buttonStyles.ts.html +1 -1
  95. package/coverage/lcov-report/src/button/buttonUnstyledStyles.ts.html +1 -1
  96. package/coverage/lcov-report/src/button/index.html +1 -1
  97. package/coverage/lcov-report/src/card/Card.tsx.html +1 -1
  98. package/coverage/lcov-report/src/card/CardContent.tsx.html +1 -1
  99. package/coverage/lcov-report/src/card/CardFooter.tsx.html +1 -1
  100. package/coverage/lcov-report/src/card/CardHeader.tsx.html +1 -1
  101. package/coverage/lcov-report/src/card/CardSubtitle.tsx.html +1 -1
  102. package/coverage/lcov-report/src/card/CardTitle.tsx.html +1 -1
  103. package/coverage/lcov-report/src/card/ClickableCard.tsx.html +1 -1
  104. package/coverage/lcov-report/src/card/index.html +1 -1
  105. package/coverage/lcov-report/src/card/styles.ts.html +1 -1
  106. package/coverage/lcov-report/src/chip/Chip.tsx.html +1 -1
  107. package/coverage/lcov-report/src/chip/index.html +1 -1
  108. package/coverage/lcov-report/src/chip/styles.ts.html +1 -1
  109. package/coverage/lcov-report/src/cssUtils.ts.html +53 -53
  110. package/coverage/lcov-report/src/delegateEvent.ts.html +1 -1
  111. package/coverage/lcov-report/src/dialog/Dialog.tsx.html +1 -1
  112. package/coverage/lcov-report/src/dialog/DialogContainer.tsx.html +1 -1
  113. package/coverage/lcov-report/src/dialog/DialogContent.tsx.html +1 -1
  114. package/coverage/lcov-report/src/dialog/DialogFooter.tsx.html +1 -1
  115. package/coverage/lcov-report/src/dialog/DialogHeader.tsx.html +1 -1
  116. package/coverage/lcov-report/src/dialog/DialogTitle.tsx.html +1 -1
  117. package/coverage/lcov-report/src/dialog/FixedDialog.tsx.html +1 -1
  118. package/coverage/lcov-report/src/dialog/NestedDialogProvider.ts.html +1 -1
  119. package/coverage/lcov-report/src/dialog/index.html +1 -1
  120. package/coverage/lcov-report/src/dialog/styles.ts.html +1 -1
  121. package/coverage/lcov-report/src/divider/Divider.tsx.html +1 -1
  122. package/coverage/lcov-report/src/divider/index.html +1 -1
  123. package/coverage/lcov-report/src/divider/styles.ts.html +1 -1
  124. package/coverage/lcov-report/src/draggable/index.html +1 -1
  125. package/coverage/lcov-report/src/draggable/useDraggable.ts.html +1 -1
  126. package/coverage/lcov-report/src/draggable/utils.ts.html +1 -1
  127. package/coverage/lcov-report/src/expansion-panel/ExpansionList.tsx.html +1 -1
  128. package/coverage/lcov-report/src/expansion-panel/ExpansionPanel.tsx.html +1 -1
  129. package/coverage/lcov-report/src/expansion-panel/ExpansionPanelHeader.tsx.html +1 -1
  130. package/coverage/lcov-report/src/expansion-panel/index.html +1 -1
  131. package/coverage/lcov-report/src/expansion-panel/useExpansionList.ts.html +1 -1
  132. package/coverage/lcov-report/src/expansion-panel/useExpansionPanels.ts.html +1 -1
  133. package/coverage/lcov-report/src/focus/index.html +1 -1
  134. package/coverage/lcov-report/src/focus/useFocusContainer.ts.html +1 -1
  135. package/coverage/lcov-report/src/focus/utils.ts.html +1 -1
  136. package/coverage/lcov-report/src/form/AutoComplete.tsx.html +283 -0
  137. package/coverage/lcov-report/src/form/Checkbox.tsx.html +1 -1
  138. package/coverage/lcov-report/src/form/Fieldset.tsx.html +1 -1
  139. package/coverage/lcov-report/src/form/FileInput.tsx.html +1 -1
  140. package/coverage/lcov-report/src/form/Form.tsx.html +11 -8
  141. package/coverage/lcov-report/src/form/FormMessage.tsx.html +1 -1
  142. package/coverage/lcov-report/src/form/FormMessageContainer.tsx.html +1 -1
  143. package/coverage/lcov-report/src/form/FormMessageCounter.tsx.html +1 -1
  144. package/coverage/lcov-report/src/form/InputToggle.tsx.html +1 -1
  145. package/coverage/lcov-report/src/form/InputToggleIcon.tsx.html +56 -56
  146. package/coverage/lcov-report/src/form/Label.tsx.html +1 -1
  147. package/coverage/lcov-report/src/form/Legend.tsx.html +1 -1
  148. package/coverage/lcov-report/src/form/MenuItemCheckbox.tsx.html +3 -3
  149. package/coverage/lcov-report/src/form/MenuItemFileInput.tsx.html +1 -1
  150. package/coverage/lcov-report/src/form/MenuItemInputToggle.tsx.html +178 -232
  151. package/coverage/lcov-report/src/form/MenuItemRadio.tsx.html +3 -3
  152. package/coverage/lcov-report/src/form/MenuItemSwitch.tsx.html +1 -1
  153. package/coverage/lcov-report/src/form/MenuItemTextField.tsx.html +1 -1
  154. package/coverage/lcov-report/src/form/NativeSelect.tsx.html +1 -1
  155. package/coverage/lcov-report/src/form/OptGroup.tsx.html +1 -1
  156. package/coverage/lcov-report/src/form/Option.tsx.html +1 -1
  157. package/coverage/lcov-report/src/form/Password.tsx.html +1 -1
  158. package/coverage/lcov-report/src/form/Radio.tsx.html +1 -1
  159. package/coverage/lcov-report/src/form/Select.tsx.html +894 -1146
  160. package/coverage/lcov-report/src/form/SelectValue.tsx.html +1 -1
  161. package/coverage/lcov-report/src/form/Slider.tsx.html +1 -1
  162. package/coverage/lcov-report/src/form/SliderContainer.tsx.html +1 -1
  163. package/coverage/lcov-report/src/form/SliderMark.tsx.html +1 -1
  164. package/coverage/lcov-report/src/form/SliderMarkLabel.tsx.html +1 -1
  165. package/coverage/lcov-report/src/form/SliderThumb.tsx.html +1 -1
  166. package/coverage/lcov-report/src/form/SliderTrack.tsx.html +1 -1
  167. package/coverage/lcov-report/src/form/SliderValueMarks.tsx.html +1 -1
  168. package/coverage/lcov-report/src/form/SliderValueTooltip.tsx.html +1 -1
  169. package/coverage/lcov-report/src/form/Switch.tsx.html +1 -1
  170. package/coverage/lcov-report/src/form/SwitchTrack.tsx.html +1 -1
  171. package/coverage/lcov-report/src/form/TextArea.tsx.html +1 -1
  172. package/coverage/lcov-report/src/form/TextField.tsx.html +1 -1
  173. package/coverage/lcov-report/src/form/TextFieldAddon.tsx.html +1 -1
  174. package/coverage/lcov-report/src/form/TextFieldContainer.tsx.html +1 -1
  175. package/coverage/lcov-report/src/form/TextFieldContainerStyles.ts.html +1 -1
  176. package/coverage/lcov-report/src/form/fileUtils.ts.html +1 -1
  177. package/coverage/lcov-report/src/form/formConfig.ts.html +1 -1
  178. package/coverage/lcov-report/src/form/formMessageStyles.ts.html +1 -1
  179. package/coverage/lcov-report/src/form/index.html +30 -900
  180. package/coverage/lcov-report/src/form/inputToggleStyles.ts.html +30 -30
  181. package/coverage/lcov-report/src/form/menuItemInputToggleStyles.ts.html +319 -0
  182. package/coverage/lcov-report/src/form/nativeSelectStyles.ts.html +1 -1
  183. package/coverage/lcov-report/src/form/optionStyles.ts.html +1 -1
  184. package/coverage/lcov-report/src/form/passwordStyles.ts.html +1 -1
  185. package/coverage/lcov-report/src/form/selectStyles.ts.html +1 -1
  186. package/coverage/lcov-report/src/form/selectUtils.ts.html +1 -1
  187. package/coverage/lcov-report/src/form/sliderUtils.ts.html +1 -1
  188. package/coverage/lcov-report/src/form/switchStyles.ts.html +1 -1
  189. package/coverage/lcov-report/src/form/textAreaStyles.ts.html +1 -1
  190. package/coverage/lcov-report/src/form/textFieldStyles.ts.html +1 -1
  191. package/coverage/lcov-report/src/form/useAutoComplete.ts.html +787 -0
  192. package/coverage/lcov-report/src/form/useCheckboxGroup.ts.html +1 -1
  193. package/coverage/lcov-report/src/form/useCombobox.ts.html +943 -457
  194. package/coverage/lcov-report/src/form/useEditableCombobox.ts.html +502 -0
  195. package/coverage/lcov-report/src/form/useFileUpload.ts.html +1 -1
  196. package/coverage/lcov-report/src/form/useInlineAutoComplete.ts.html +109 -0
  197. package/coverage/lcov-report/src/form/useListboxProvider.ts.html +1 -1
  198. package/coverage/lcov-report/src/form/useNumberField.ts.html +1 -1
  199. package/coverage/lcov-report/src/form/useRadioGroup.ts.html +1 -1
  200. package/coverage/lcov-report/src/form/useRangeSlider.ts.html +1 -1
  201. package/coverage/lcov-report/src/form/useResizingTextArea.ts.html +1 -1
  202. package/coverage/lcov-report/src/form/useSelectCombobox.ts.html +295 -0
  203. package/coverage/lcov-report/src/form/useSlider.ts.html +1 -1
  204. package/coverage/lcov-report/src/form/useTextField.ts.html +1 -1
  205. package/coverage/lcov-report/src/form/utils.ts.html +200 -170
  206. package/coverage/lcov-report/src/form/validation.ts.html +1 -1
  207. package/coverage/lcov-report/src/hoverMode/index.html +1 -1
  208. package/coverage/lcov-report/src/hoverMode/useHoverMode.ts.html +1 -1
  209. package/coverage/lcov-report/src/hoverMode/useHoverModeProvider.ts.html +1 -1
  210. package/coverage/lcov-report/src/icon/FontIcon.tsx.html +28 -28
  211. package/coverage/lcov-report/src/icon/IconRotator.tsx.html +1 -1
  212. package/coverage/lcov-report/src/icon/MaterialIcon.tsx.html +1 -1
  213. package/coverage/lcov-report/src/icon/MaterialSymbol.tsx.html +1 -1
  214. package/coverage/lcov-report/src/icon/SVGIcon.tsx.html +1 -1
  215. package/coverage/lcov-report/src/icon/TextIconSpacing.tsx.html +51 -51
  216. package/coverage/lcov-report/src/icon/iconConfig.tsx.html +10 -10
  217. package/coverage/lcov-report/src/icon/index.html +1 -1
  218. package/coverage/lcov-report/src/icon/material.ts.html +1 -1
  219. package/coverage/lcov-report/src/icon/materialConfig.ts.html +1 -1
  220. package/coverage/lcov-report/src/icon/styles.ts.html +38 -38
  221. package/coverage/lcov-report/src/index.html +9 -354
  222. package/coverage/lcov-report/src/interaction/Ripple.tsx.html +1 -1
  223. package/coverage/lcov-report/src/interaction/RippleContainer.tsx.html +1 -1
  224. package/coverage/lcov-report/src/interaction/UserInteractionModeProvider.tsx.html +87 -87
  225. package/coverage/lcov-report/src/interaction/config.ts.html +7 -7
  226. package/coverage/lcov-report/src/interaction/index.html +1 -1
  227. package/coverage/lcov-report/src/interaction/useElementInteraction.tsx.html +83 -83
  228. package/coverage/lcov-report/src/interaction/useHigherContrastChildren.tsx.html +7 -7
  229. package/coverage/lcov-report/src/interaction/utils.ts.html +1 -1
  230. package/coverage/lcov-report/src/layout/LayoutAppBar.tsx.html +1 -1
  231. package/coverage/lcov-report/src/layout/LayoutNav.tsx.html +1 -1
  232. package/coverage/lcov-report/src/layout/LayoutWindowSplitter.tsx.html +1 -1
  233. package/coverage/lcov-report/src/layout/Main.tsx.html +1 -1
  234. package/coverage/lcov-report/src/layout/index.html +1 -1
  235. package/coverage/lcov-report/src/layout/layoutNavStyles.ts.html +1 -1
  236. package/coverage/lcov-report/src/layout/layoutWindowSplitterStyles.ts.html +1 -1
  237. package/coverage/lcov-report/src/layout/mainStyles.ts.html +1 -1
  238. package/coverage/lcov-report/src/layout/useExpandableLayout.ts.html +1 -1
  239. package/coverage/lcov-report/src/layout/useHorizontalLayoutTransition.ts.html +1 -1
  240. package/coverage/lcov-report/src/layout/useLayoutAppBarHeight.ts.html +1 -1
  241. package/coverage/lcov-report/src/layout/useLayoutTree.ts.html +1 -1
  242. package/coverage/lcov-report/src/layout/useLayoutWindowSplitter.ts.html +1 -1
  243. package/coverage/lcov-report/src/layout/useMainTabIndex.ts.html +1 -1
  244. package/coverage/lcov-report/src/layout/useResizableLayout.ts.html +1 -1
  245. package/coverage/lcov-report/src/layout/useTemporaryLayout.ts.html +1 -1
  246. package/coverage/lcov-report/src/link/Link.tsx.html +1 -1
  247. package/coverage/lcov-report/src/link/SkipToMainContent.tsx.html +1 -1
  248. package/coverage/lcov-report/src/link/index.html +1 -1
  249. package/coverage/lcov-report/src/link/styles.ts.html +1 -1
  250. package/coverage/lcov-report/src/list/List.tsx.html +30 -30
  251. package/coverage/lcov-report/src/list/ListItem.tsx.html +124 -124
  252. package/coverage/lcov-report/src/list/ListItemAddon.tsx.html +35 -35
  253. package/coverage/lcov-report/src/list/ListItemChildren.tsx.html +79 -79
  254. package/coverage/lcov-report/src/list/ListItemLink.tsx.html +2 -2
  255. package/coverage/lcov-report/src/list/ListItemText.tsx.html +35 -35
  256. package/coverage/lcov-report/src/list/ListSubheader.tsx.html +1 -1
  257. package/coverage/lcov-report/src/list/getListItemHeight.ts.html +44 -47
  258. package/coverage/lcov-report/src/list/index.html +5 -5
  259. package/coverage/lcov-report/src/list/listItemStyles.ts.html +65 -65
  260. package/coverage/lcov-report/src/media-queries/AppSizeProvider.tsx.html +49 -49
  261. package/coverage/lcov-report/src/media-queries/appSize.ts.html +1 -1
  262. package/coverage/lcov-report/src/media-queries/index.html +1 -1
  263. package/coverage/lcov-report/src/media-queries/useMediaQuery.ts.html +24 -24
  264. package/coverage/lcov-report/src/menu/DropdownMenu.tsx.html +1 -1
  265. package/coverage/lcov-report/src/menu/Menu.tsx.html +3 -3
  266. package/coverage/lcov-report/src/menu/MenuBar.tsx.html +1 -1
  267. package/coverage/lcov-report/src/menu/MenuButton.tsx.html +1 -1
  268. package/coverage/lcov-report/src/menu/MenuConfigurationProvider.tsx.html +1 -1
  269. package/coverage/lcov-report/src/menu/MenuItem.tsx.html +1 -1
  270. package/coverage/lcov-report/src/menu/MenuItemButton.tsx.html +1 -1
  271. package/coverage/lcov-report/src/menu/MenuItemGroup.tsx.html +1 -1
  272. package/coverage/lcov-report/src/menu/MenuItemSeparator.tsx.html +1 -1
  273. package/coverage/lcov-report/src/menu/MenuSheet.tsx.html +1 -1
  274. package/coverage/lcov-report/src/menu/MenuVisibilityProvider.tsx.html +1 -1
  275. package/coverage/lcov-report/src/menu/MenuWidget.tsx.html +1 -1
  276. package/coverage/lcov-report/src/menu/MenuWidgetKeyboardProvider.tsx.html +1 -1
  277. package/coverage/lcov-report/src/menu/index.html +1 -1
  278. package/coverage/lcov-report/src/menu/useContextMenu.ts.html +1 -1
  279. package/coverage/lcov-report/src/menu/useMenuBarProvider.ts.html +1 -1
  280. package/coverage/lcov-report/src/menu/utils.ts.html +1 -1
  281. package/coverage/lcov-report/src/movement/constants.ts.html +1 -1
  282. package/coverage/lcov-report/src/movement/findMatchIndex.ts.html +1 -1
  283. package/coverage/lcov-report/src/movement/index.html +17 -62
  284. package/coverage/lcov-report/src/movement/useKeyboardMovementProvider.ts.html +1 -1
  285. package/coverage/lcov-report/src/movement/utils.ts.html +143 -119
  286. package/coverage/lcov-report/src/overlay/Overlay.tsx.html +1 -1
  287. package/coverage/lcov-report/src/overlay/index.html +1 -1
  288. package/coverage/lcov-report/src/overlay/overlayStyles.ts.html +1 -1
  289. package/coverage/lcov-report/src/portal/Portal.tsx.html +1 -1
  290. package/coverage/lcov-report/src/portal/PortalContainerProvider.tsx.html +36 -36
  291. package/coverage/lcov-report/src/portal/index.html +1 -1
  292. package/coverage/lcov-report/src/positioning/constants.ts.html +1 -1
  293. package/coverage/lcov-report/src/positioning/createHorizontalPosition.ts.html +1 -1
  294. package/coverage/lcov-report/src/positioning/createVerticalPosition.ts.html +1 -1
  295. package/coverage/lcov-report/src/positioning/getFixedPosition.ts.html +1 -1
  296. package/coverage/lcov-report/src/positioning/index.html +1 -1
  297. package/coverage/lcov-report/src/positioning/useFixedPositioning.ts.html +1 -1
  298. package/coverage/lcov-report/src/positioning/utils.ts.html +1 -1
  299. package/coverage/lcov-report/src/progress/CircularProgress.tsx.html +81 -81
  300. package/coverage/lcov-report/src/progress/LinearProgress.tsx.html +1 -1
  301. package/coverage/lcov-report/src/progress/getProgressA11y.ts.html +1 -1
  302. package/coverage/lcov-report/src/progress/index.html +1 -1
  303. package/coverage/lcov-report/src/responsive-item/ResponsiveItemContainer.tsx.html +1 -1
  304. package/coverage/lcov-report/src/responsive-item/ResponsiveItemOverlay.tsx.html +1 -1
  305. package/coverage/lcov-report/src/responsive-item/index.html +1 -1
  306. package/coverage/lcov-report/src/responsive-item/styles.ts.html +1 -1
  307. package/coverage/lcov-report/src/scroll/ScrollLock.tsx.html +1 -1
  308. package/coverage/lcov-report/src/scroll/getScrollbarWidth.ts.html +1 -1
  309. package/coverage/lcov-report/src/scroll/index.html +1 -1
  310. package/coverage/lcov-report/src/scroll/useScrollLock.ts.html +1 -1
  311. package/coverage/lcov-report/src/segmented-button/SegmentedButton.tsx.html +1 -1
  312. package/coverage/lcov-report/src/segmented-button/SegmentedButtonContainer.tsx.html +1 -1
  313. package/coverage/lcov-report/src/segmented-button/index.html +1 -1
  314. package/coverage/lcov-report/src/segmented-button/segmentedButtonContainerStyles.ts.html +1 -1
  315. package/coverage/lcov-report/src/segmented-button/segmentedButtonStyles.ts.html +1 -1
  316. package/coverage/lcov-report/src/sheet/Sheet.tsx.html +1 -1
  317. package/coverage/lcov-report/src/sheet/index.html +1 -1
  318. package/coverage/lcov-report/src/sheet/styles.ts.html +1 -1
  319. package/coverage/lcov-report/src/snackbar/DefaultToastRenderer.tsx.html +1 -1
  320. package/coverage/lcov-report/src/snackbar/Snackbar.tsx.html +1 -1
  321. package/coverage/lcov-report/src/snackbar/Toast.tsx.html +1 -1
  322. package/coverage/lcov-report/src/snackbar/ToastActionButton.tsx.html +1 -1
  323. package/coverage/lcov-report/src/snackbar/ToastCloseButton.tsx.html +1 -1
  324. package/coverage/lcov-report/src/snackbar/ToastContent.tsx.html +1 -1
  325. package/coverage/lcov-report/src/snackbar/ToastManager.tsx.html +1 -1
  326. package/coverage/lcov-report/src/snackbar/ToastManagerProvider.tsx.html +1 -1
  327. package/coverage/lcov-report/src/snackbar/index.html +1 -1
  328. package/coverage/lcov-report/src/snackbar/snackbarStyles.ts.html +1 -1
  329. package/coverage/lcov-report/src/snackbar/toastContentStyles.ts.html +1 -1
  330. package/coverage/lcov-report/src/snackbar/toastStyles.ts.html +1 -1
  331. package/coverage/lcov-report/src/snackbar/useCurrentToastActions.ts.html +1 -1
  332. package/coverage/lcov-report/src/suspense/CircularProgressSuspense.tsx.html +142 -142
  333. package/coverage/lcov-report/src/suspense/NullSuspense.tsx.html +88 -88
  334. package/coverage/lcov-report/src/suspense/index.html +32 -32
  335. package/coverage/lcov-report/src/table/Table.tsx.html +1 -1
  336. package/coverage/lcov-report/src/table/TableBody.tsx.html +1 -1
  337. package/coverage/lcov-report/src/table/TableCell.tsx.html +1 -1
  338. package/coverage/lcov-report/src/table/TableCellContent.tsx.html +1 -1
  339. package/coverage/lcov-report/src/table/TableCheckbox.tsx.html +1 -1
  340. package/coverage/lcov-report/src/table/TableConfigurationProvider.tsx.html +1 -1
  341. package/coverage/lcov-report/src/table/TableContainer.tsx.html +1 -1
  342. package/coverage/lcov-report/src/table/TableContainerProvider.tsx.html +1 -1
  343. package/coverage/lcov-report/src/table/TableFooter.tsx.html +1 -1
  344. package/coverage/lcov-report/src/table/TableHeader.tsx.html +1 -1
  345. package/coverage/lcov-report/src/table/TableRadio.tsx.html +1 -1
  346. package/coverage/lcov-report/src/table/TableRow.tsx.html +1 -1
  347. package/coverage/lcov-report/src/table/index.html +1 -1
  348. package/coverage/lcov-report/src/table/tableCellStyles.ts.html +1 -1
  349. package/coverage/lcov-report/src/table/tableContainerStyles.ts.html +1 -1
  350. package/coverage/lcov-report/src/table/tableFooterStyles.ts.html +1 -1
  351. package/coverage/lcov-report/src/table/tableHeaderStyles.ts.html +1 -1
  352. package/coverage/lcov-report/src/table/tableRowStyles.ts.html +1 -1
  353. package/coverage/lcov-report/src/table/tableStyles.ts.html +1 -1
  354. package/coverage/lcov-report/src/tabs/Tab.tsx.html +1 -1
  355. package/coverage/lcov-report/src/tabs/TabList.tsx.html +1 -1
  356. package/coverage/lcov-report/src/tabs/TabListScrollButton.tsx.html +1 -1
  357. package/coverage/lcov-report/src/tabs/index.html +1 -1
  358. package/coverage/lcov-report/src/tabs/tabIndicatorStyles.ts.html +1 -1
  359. package/coverage/lcov-report/src/tabs/tabListScrollButtonStyles.ts.html +1 -1
  360. package/coverage/lcov-report/src/tabs/tabListStyles.ts.html +1 -1
  361. package/coverage/lcov-report/src/tabs/tabStyles.ts.html +1 -1
  362. package/coverage/lcov-report/src/tabs/useTabList.ts.html +1 -1
  363. package/coverage/lcov-report/src/tabs/useTabs.ts.html +1 -1
  364. package/coverage/lcov-report/src/tabs/utils.ts.html +1 -1
  365. package/coverage/lcov-report/src/test-utils/IntersectionObserver.ts.html +1 -1
  366. package/coverage/lcov-report/src/test-utils/ResizeObserver.ts.html +1 -1
  367. package/coverage/lcov-report/src/test-utils/data-testid.ts.html +18 -6
  368. package/coverage/lcov-report/src/test-utils/drag.ts.html +1 -1
  369. package/coverage/lcov-report/src/test-utils/index.html +7 -7
  370. package/coverage/lcov-report/src/test-utils/jest-setup.ts.html +9 -9
  371. package/coverage/lcov-report/src/test-utils/matchMedia.ts.html +4 -4
  372. package/coverage/lcov-report/src/test-utils/polyfills/IntersectionObserver.ts.html +4 -4
  373. package/coverage/lcov-report/src/test-utils/polyfills/ResizeObserver.ts.html +3 -3
  374. package/coverage/lcov-report/src/test-utils/polyfills/TextDecoder.ts.html +106 -0
  375. package/coverage/lcov-report/src/test-utils/polyfills/TextEncoder.ts.html +100 -0
  376. package/coverage/lcov-report/src/test-utils/polyfills/index.html +1 -1
  377. package/coverage/lcov-report/src/test-utils/polyfills/matchMedia.ts.html +6 -6
  378. package/coverage/lcov-report/src/test-utils/polyfills/offsetParent.ts.html +14 -14
  379. package/coverage/lcov-report/src/test-utils/polyfills/scrollIntoView.ts.html +5 -5
  380. package/coverage/lcov-report/src/test-utils/render.tsx.html +21 -21
  381. package/coverage/lcov-report/src/test-utils/root-html-environment.ts.html +85 -0
  382. package/coverage/lcov-report/src/test-utils/timers.ts.html +1 -1
  383. package/coverage/lcov-report/src/theme/LocalStorageColorSchemeProvider.tsx.html +1 -1
  384. package/coverage/lcov-report/src/theme/ThemeProvider.tsx.html +1 -1
  385. package/coverage/lcov-report/src/theme/colors.ts.html +1 -1
  386. package/coverage/lcov-report/src/theme/cssVars.ts.html +1 -1
  387. package/coverage/lcov-report/src/theme/index.html +1 -1
  388. package/coverage/lcov-report/src/theme/useCSSVariables.ts.html +1 -1
  389. package/coverage/lcov-report/src/theme/useColorScheme.ts.html +1 -1
  390. package/coverage/lcov-report/src/theme/useColorSchemeMetaTag.ts.html +1 -1
  391. package/coverage/lcov-report/src/theme/useColorSchemeProvider.ts.html +1 -1
  392. package/coverage/lcov-report/src/theme/usePrefersColorScheme.ts.html +1 -1
  393. package/coverage/lcov-report/src/theme/utils.ts.html +1 -1
  394. package/coverage/lcov-report/src/tooltip/Tooltip.tsx.html +1 -1
  395. package/coverage/lcov-report/src/tooltip/TooltipHoverModeProvider.tsx.html +1 -1
  396. package/coverage/lcov-report/src/tooltip/constants.ts.html +1 -1
  397. package/coverage/lcov-report/src/tooltip/index.html +1 -1
  398. package/coverage/lcov-report/src/tooltip/tooltipStyles.ts.html +1 -1
  399. package/coverage/lcov-report/src/tooltip/useTooltip.ts.html +1 -1
  400. package/coverage/lcov-report/src/tooltip/useTooltipPosition.ts.html +1 -1
  401. package/coverage/lcov-report/src/tooltip/utils.ts.html +1 -1
  402. package/coverage/lcov-report/src/transition/CSSTransition.tsx.html +1 -1
  403. package/coverage/lcov-report/src/transition/Collapse.tsx.html +1 -1
  404. package/coverage/lcov-report/src/transition/CrossFade.tsx.html +1 -1
  405. package/coverage/lcov-report/src/transition/ScaleTransition.tsx.html +1 -1
  406. package/coverage/lcov-report/src/transition/SkeletonPlaceholder.tsx.html +1 -1
  407. package/coverage/lcov-report/src/transition/Slide.tsx.html +1 -1
  408. package/coverage/lcov-report/src/transition/SlideContainer.tsx.html +1 -1
  409. package/coverage/lcov-report/src/transition/collapseStyles.ts.html +13 -13
  410. package/coverage/lcov-report/src/transition/config.ts.html +3 -3
  411. package/coverage/lcov-report/src/transition/index.html +7 -7
  412. package/coverage/lcov-report/src/transition/maxWidthTransition.ts.html +1 -1
  413. package/coverage/lcov-report/src/transition/skeletonPlaceholderUtils.ts.html +1 -1
  414. package/coverage/lcov-report/src/transition/useCSSTransition.ts.html +1 -1
  415. package/coverage/lcov-report/src/transition/useCarousel.ts.html +1 -1
  416. package/coverage/lcov-report/src/transition/useCollapseTransition.ts.html +96 -150
  417. package/coverage/lcov-report/src/transition/useCrossFadeTransition.ts.html +1 -1
  418. package/coverage/lcov-report/src/transition/useMaxWidthTransition.ts.html +1 -1
  419. package/coverage/lcov-report/src/transition/useScaleTransition.ts.html +1 -1
  420. package/coverage/lcov-report/src/transition/useSkeletonPlaceholder.ts.html +1 -1
  421. package/coverage/lcov-report/src/transition/useSlideTransition.ts.html +1 -1
  422. package/coverage/lcov-report/src/transition/useTransition.ts.html +152 -152
  423. package/coverage/lcov-report/src/transition/utils.ts.html +14 -14
  424. package/coverage/lcov-report/src/tree/DefaultTreeItemRenderer.tsx.html +1 -1
  425. package/coverage/lcov-report/src/tree/Tree.tsx.html +1 -1
  426. package/coverage/lcov-report/src/tree/TreeGroup.tsx.html +45 -45
  427. package/coverage/lcov-report/src/tree/TreeItem.tsx.html +1 -1
  428. package/coverage/lcov-report/src/tree/TreeItemExpander.tsx.html +1 -1
  429. package/coverage/lcov-report/src/tree/TreeProvider.tsx.html +8 -8
  430. package/coverage/lcov-report/src/tree/index.html +1 -1
  431. package/coverage/lcov-report/src/tree/styles.ts.html +5 -5
  432. package/coverage/lcov-report/src/tree/useTree.ts.html +1 -1
  433. package/coverage/lcov-report/src/tree/useTreeExpansion.ts.html +1 -1
  434. package/coverage/lcov-report/src/tree/useTreeItems.ts.html +1 -1
  435. package/coverage/lcov-report/src/tree/useTreeMovement.ts.html +1 -1
  436. package/coverage/lcov-report/src/tree/useTreeSelection.ts.html +1 -1
  437. package/coverage/lcov-report/src/tree/utils.ts.html +1 -1
  438. package/coverage/lcov-report/src/typography/SrOnly.tsx.html +12 -12
  439. package/coverage/lcov-report/src/typography/TextContainer.tsx.html +1 -1
  440. package/coverage/lcov-report/src/typography/Typography.tsx.html +94 -94
  441. package/coverage/lcov-report/src/typography/WritingDirectionProvider.tsx.html +1 -1
  442. package/coverage/lcov-report/src/typography/index.html +1 -1
  443. package/coverage/lcov-report/src/useAsyncAction.ts.html +1 -1
  444. package/coverage/lcov-report/src/useDebouncedFunction.ts.html +1 -1
  445. package/coverage/lcov-report/src/useDropzone.ts.html +1 -1
  446. package/coverage/lcov-report/src/useElementSize.ts.html +1 -1
  447. package/coverage/lcov-report/src/useEnsuredId.ts.html +8 -8
  448. package/coverage/lcov-report/src/useEnsuredRef.ts.html +11 -11
  449. package/coverage/lcov-report/src/useEnsuredState.ts.html +16 -16
  450. package/coverage/lcov-report/src/useHtmlClassName.ts.html +1 -1
  451. package/coverage/lcov-report/src/useIntersectionObserver.ts.html +1 -1
  452. package/coverage/lcov-report/src/useIsomorphicLayoutEffect.ts.html +1 -1
  453. package/coverage/lcov-report/src/useLocalStorage.ts.html +1 -1
  454. package/coverage/lcov-report/src/useOrientation.ts.html +32 -32
  455. package/coverage/lcov-report/src/usePageInactive.ts.html +1 -1
  456. package/coverage/lcov-report/src/useResizeListener.ts.html +1 -1
  457. package/coverage/lcov-report/src/useResizeObserver.ts.html +23 -23
  458. package/coverage/lcov-report/src/useThrottledFunction.ts.html +1 -1
  459. package/coverage/lcov-report/src/useToggle.ts.html +1 -1
  460. package/coverage/lcov-report/src/useUnmounted.ts.html +1 -1
  461. package/coverage/lcov-report/src/useWindowSize.ts.html +1 -1
  462. package/coverage/lcov-report/src/utils/RenderRecursively.tsx.html +1 -1
  463. package/coverage/lcov-report/src/utils/alphaNumericSort.ts.html +1 -1
  464. package/coverage/lcov-report/src/utils/applyRef.ts.html +1 -1
  465. package/coverage/lcov-report/src/utils/bem.ts.html +50 -50
  466. package/coverage/lcov-report/src/utils/filters.ts.html +357 -84
  467. package/coverage/lcov-report/src/utils/getClientPosition.ts.html +1 -1
  468. package/coverage/lcov-report/src/utils/getMiddleOfRange.ts.html +1 -1
  469. package/coverage/lcov-report/src/utils/getPercentage.ts.html +1 -1
  470. package/coverage/lcov-report/src/utils/getRangeDefaultValue.ts.html +1 -1
  471. package/coverage/lcov-report/src/utils/getRangeSteps.ts.html +1 -1
  472. package/coverage/lcov-report/src/utils/identity.ts.html +1 -1
  473. package/coverage/lcov-report/src/utils/index.html +13 -268
  474. package/coverage/lcov-report/src/utils/isElementVisible.ts.html +1 -1
  475. package/coverage/lcov-report/src/utils/loop.ts.html +1 -1
  476. package/coverage/lcov-report/src/utils/nearest.ts.html +1 -1
  477. package/coverage/lcov-report/src/utils/parseCssLengthUnit.ts.html +1 -1
  478. package/coverage/lcov-report/src/utils/randomInt.ts.html +1 -1
  479. package/coverage/lcov-report/src/utils/wait.ts.html +1 -1
  480. package/coverage/lcov-report/src/utils/withinRange.ts.html +1 -1
  481. package/coverage/lcov-report/src/window-splitter/WindowSplitter.tsx.html +1 -1
  482. package/coverage/lcov-report/src/window-splitter/index.html +1 -1
  483. package/coverage/lcov-report/src/window-splitter/useWindowSplitter.ts.html +1 -1
  484. package/coverage/lcov-report/transition/config.ts.html +5 -5
  485. package/coverage/lcov-report/transition/index.html +1 -1
  486. package/coverage/lcov-report/transition/useScaleTransition.ts.html +535 -0
  487. package/coverage/lcov-report/useAutoComplete.ts.html +787 -0
  488. package/coverage/lcov-report/useCollapseTransition.ts.html +166 -211
  489. package/coverage/lcov-report/useCombobox.ts.html +1513 -0
  490. package/coverage/lcov-report/useInlineAutoComplete.ts.html +379 -0
  491. package/coverage/lcov-report/useSelectCombobox.ts.html +295 -0
  492. package/coverage/lcov-report/utils/alphaNumericSort.ts.html +11 -50
  493. package/coverage/lcov-report/utils/filters.ts.html +1056 -201
  494. package/coverage/lcov-report/utils/index.html +10 -10
  495. package/coverage/lcov-report/utils/searching.ts.html +85 -0
  496. package/coverage/lcov-report/utils.ts.html +109 -277
  497. package/coverage/lcov.info +900 -363
  498. package/dist/RootHtml.d.ts +62 -0
  499. package/dist/RootHtml.js +49 -0
  500. package/dist/RootHtml.js.map +1 -0
  501. package/dist/_core.scss +49 -43
  502. package/dist/avatar/Avatar.d.ts +14 -0
  503. package/dist/avatar/Avatar.js +5 -2
  504. package/dist/avatar/Avatar.js.map +1 -1
  505. package/dist/badge/_badge.scss +23 -19
  506. package/dist/dialog/FixedDialog.d.ts +5 -4
  507. package/dist/dialog/FixedDialog.js +5 -4
  508. package/dist/dialog/FixedDialog.js.map +1 -1
  509. package/dist/form/MenuItemInputToggle.d.ts +2 -15
  510. package/dist/form/MenuItemInputToggle.js +26 -37
  511. package/dist/form/MenuItemInputToggle.js.map +1 -1
  512. package/dist/form/NativeSelect.d.ts +5 -2
  513. package/dist/form/NativeSelect.js.map +1 -1
  514. package/dist/form/Option.js +3 -2
  515. package/dist/form/Option.js.map +1 -1
  516. package/dist/form/Select.d.ts +105 -15
  517. package/dist/form/Select.js +160 -249
  518. package/dist/form/Select.js.map +1 -1
  519. package/dist/form/SelectedOption.d.ts +21 -0
  520. package/dist/form/SelectedOption.js +37 -0
  521. package/dist/form/SelectedOption.js.map +1 -0
  522. package/dist/form/TextField.d.ts +2 -2
  523. package/dist/form/TextField.js.map +1 -1
  524. package/dist/form/_form.scss +47 -29
  525. package/dist/form/menuItemInputToggleStyles.d.ts +39 -0
  526. package/dist/form/menuItemInputToggleStyles.js +31 -0
  527. package/dist/form/menuItemInputToggleStyles.js.map +1 -0
  528. package/dist/form/selectUtils.d.ts +1 -3
  529. package/dist/form/selectUtils.js +2 -10
  530. package/dist/form/selectUtils.js.map +1 -1
  531. package/dist/form/types.d.ts +6 -6
  532. package/dist/form/types.js.map +1 -1
  533. package/dist/form/useCombobox.d.ts +157 -0
  534. package/dist/form/useCombobox.js +206 -0
  535. package/dist/form/useCombobox.js.map +1 -0
  536. package/dist/form/useEditableCombobox.d.ts +15 -0
  537. package/dist/form/useEditableCombobox.js +101 -0
  538. package/dist/form/useEditableCombobox.js.map +1 -0
  539. package/dist/form/useFormReset.d.ts +16 -0
  540. package/dist/form/useFormReset.js +32 -0
  541. package/dist/form/useFormReset.js.map +1 -0
  542. package/dist/form/useListboxProvider.d.ts +1 -0
  543. package/dist/form/useListboxProvider.js +1 -0
  544. package/dist/form/useListboxProvider.js.map +1 -1
  545. package/dist/form/useSelectCombobox.d.ts +17 -0
  546. package/dist/form/useSelectCombobox.js +36 -0
  547. package/dist/form/useSelectCombobox.js.map +1 -0
  548. package/dist/form/utils.d.ts +11 -1
  549. package/dist/form/utils.js +6 -0
  550. package/dist/form/utils.js.map +1 -1
  551. package/dist/icon/_icon.scss +7 -5
  552. package/dist/index.d.ts +15 -1
  553. package/dist/index.js +15 -1
  554. package/dist/index.js.map +1 -1
  555. package/dist/interaction/_interaction.scss +56 -44
  556. package/dist/list/types.d.ts +10 -1
  557. package/dist/list/types.js.map +1 -1
  558. package/dist/menu/Menu.js +12 -1
  559. package/dist/menu/Menu.js.map +1 -1
  560. package/dist/menu/_menu.scss +1 -0
  561. package/dist/menu/useContextMenu.d.ts +3 -3
  562. package/dist/menu/useContextMenu.js +3 -3
  563. package/dist/menu/useContextMenu.js.map +1 -1
  564. package/dist/movement/types.d.ts +40 -21
  565. package/dist/movement/types.js.map +1 -1
  566. package/dist/movement/useKeyboardMovementProvider.js +15 -4
  567. package/dist/movement/useKeyboardMovementProvider.js.map +1 -1
  568. package/dist/movement/utils.d.ts +7 -2
  569. package/dist/movement/utils.js +10 -0
  570. package/dist/movement/utils.js.map +1 -1
  571. package/dist/positioning/useFixedPositioning.js +0 -8
  572. package/dist/positioning/useFixedPositioning.js.map +1 -1
  573. package/dist/searching/caseInsensitive.d.ts +150 -0
  574. package/dist/searching/caseInsensitive.js +30 -0
  575. package/dist/searching/caseInsensitive.js.map +1 -0
  576. package/dist/searching/fuzzy.d.ts +128 -0
  577. package/dist/searching/fuzzy.js +54 -0
  578. package/dist/searching/fuzzy.js.map +1 -0
  579. package/dist/searching/toSearchQuery.d.ts +5 -0
  580. package/dist/searching/toSearchQuery.js +13 -0
  581. package/dist/searching/toSearchQuery.js.map +1 -0
  582. package/dist/searching/types.d.ts +28 -0
  583. package/dist/searching/types.js +5 -0
  584. package/dist/searching/types.js.map +1 -0
  585. package/dist/searching/utils.d.ts +21 -0
  586. package/dist/searching/utils.js +28 -0
  587. package/dist/searching/utils.js.map +1 -0
  588. package/dist/test-utils/IntersectionObserver.d.ts +12 -0
  589. package/dist/test-utils/ResizeObserver.d.ts +172 -0
  590. package/dist/test-utils/data-testid.d.ts +7 -0
  591. package/dist/test-utils/data-testid.js +1 -0
  592. package/dist/test-utils/data-testid.js.map +1 -1
  593. package/dist/test-utils/drag.d.ts +26 -0
  594. package/dist/test-utils/index.d.ts +7 -0
  595. package/dist/test-utils/jest-setup.d.ts +1 -0
  596. package/dist/test-utils/matchMedia.d.ts +101 -0
  597. package/dist/test-utils/polyfills/IntersectionObserver.d.ts +1 -0
  598. package/dist/test-utils/polyfills/ResizeObserver.d.ts +1 -0
  599. package/dist/test-utils/polyfills/TextDecoder.d.ts +1 -0
  600. package/dist/test-utils/polyfills/TextDecoder.js +8 -0
  601. package/dist/test-utils/polyfills/TextDecoder.js.map +1 -0
  602. package/dist/test-utils/polyfills/TextEncoder.d.ts +1 -0
  603. package/dist/test-utils/polyfills/TextEncoder.js +6 -0
  604. package/dist/test-utils/polyfills/TextEncoder.js.map +1 -0
  605. package/dist/test-utils/polyfills/index.d.ts +7 -0
  606. package/dist/test-utils/polyfills/index.js +2 -0
  607. package/dist/test-utils/polyfills/index.js.map +1 -1
  608. package/dist/test-utils/polyfills/matchMedia.d.ts +1 -0
  609. package/dist/test-utils/polyfills/offsetParent.d.ts +1 -0
  610. package/dist/test-utils/polyfills/scrollIntoView.d.ts +1 -0
  611. package/dist/test-utils/render.d.ts +13 -0
  612. package/dist/test-utils/timers.d.ts +39 -0
  613. package/dist/theme/_theme.scss +192 -34
  614. package/dist/transition/useCollapseTransition.d.ts +3 -18
  615. package/dist/transition/useCollapseTransition.js +1 -10
  616. package/dist/transition/useCollapseTransition.js.map +1 -1
  617. package/dist/transition/utils.js +7 -2
  618. package/dist/transition/utils.js.map +1 -1
  619. package/dist/typography/SrOnly.d.ts +3 -3
  620. package/dist/typography/SrOnly.js +4 -4
  621. package/dist/typography/SrOnly.js.map +1 -1
  622. package/dist/typography/Typography.d.ts +19 -19
  623. package/dist/typography/Typography.js +19 -19
  624. package/dist/typography/Typography.js.map +1 -1
  625. package/dist/typography/_typography.scss +65 -25
  626. package/dist/useEnsuredState.d.ts +1 -1
  627. package/dist/useEnsuredState.js.map +1 -1
  628. package/dist/utils/alphaNumericSort.d.ts +1 -1
  629. package/dist/utils/alphaNumericSort.js +2 -10
  630. package/dist/utils/alphaNumericSort.js.map +1 -1
  631. package/jest.config.ts +4 -0
  632. package/package.json +21 -20
  633. package/src/RootHtml.tsx +95 -0
  634. package/src/__tests__/RootHtml.node.tsx +46 -0
  635. package/src/__tests__/__snapshots__/RootHtml.node.tsx.snap +19 -0
  636. package/src/_core.scss +49 -43
  637. package/src/avatar/Avatar.tsx +24 -3
  638. package/src/avatar/__tests__/Avatar.tsx +1 -1
  639. package/src/avatar/__tests__/__snapshots__/Avatar.tsx.snap +6 -6
  640. package/src/badge/_badge.scss +23 -19
  641. package/src/button/__tests__/__snapshots__/Button.tsx.snap +1 -1
  642. package/src/dialog/FixedDialog.tsx +5 -4
  643. package/src/form/MenuItemInputToggle.tsx +46 -64
  644. package/src/form/NativeSelect.tsx +6 -3
  645. package/src/form/Option.tsx +8 -2
  646. package/src/form/Select.tsx +251 -335
  647. package/src/form/SelectedOption.tsx +55 -0
  648. package/src/form/TextField.tsx +2 -2
  649. package/src/form/__tests__/MenuItemCheckbox.tsx +53 -0
  650. package/src/form/__tests__/MenuItemRadio.tsx +53 -0
  651. package/src/form/__tests__/Select.tsx +439 -0
  652. package/src/form/__tests__/__snapshots__/FileInput.tsx.snap +23 -23
  653. package/src/form/__tests__/__snapshots__/MenuItemCheckbox.tsx.snap +96 -0
  654. package/src/form/__tests__/__snapshots__/MenuItemRadio.tsx.snap +96 -0
  655. package/src/form/__tests__/__snapshots__/Select.tsx.snap +492 -0
  656. package/src/form/__tests__/useFormReset.tsx +195 -0
  657. package/src/form/_form.scss +47 -29
  658. package/src/form/menuItemInputToggleStyles.ts +78 -0
  659. package/src/form/selectUtils.ts +3 -14
  660. package/src/form/types.ts +6 -6
  661. package/src/form/useCombobox.ts +523 -0
  662. package/src/form/useEditableCombobox.ts +139 -0
  663. package/src/form/useFormReset.ts +48 -0
  664. package/src/form/useListboxProvider.ts +2 -0
  665. package/src/form/useSelectCombobox.ts +70 -0
  666. package/src/form/utils.ts +17 -4
  667. package/src/icon/_icon.scss +7 -5
  668. package/src/index.ts +15 -1
  669. package/src/interaction/_interaction.scss +56 -44
  670. package/src/list/types.ts +12 -1
  671. package/src/menu/Menu.tsx +9 -1
  672. package/src/menu/__tests__/__snapshots__/useContextMenu.tsx.snap +54 -0
  673. package/src/menu/__tests__/useContextMenu.tsx +41 -0
  674. package/src/menu/_menu.scss +1 -0
  675. package/src/menu/useContextMenu.ts +3 -3
  676. package/src/movement/types.ts +50 -25
  677. package/src/movement/useKeyboardMovementProvider.ts +21 -8
  678. package/src/movement/utils.ts +12 -2
  679. package/src/positioning/__tests__/__snapshots__/useFixedPositioning.tsx.snap +0 -32
  680. package/src/positioning/__tests__/useFixedPositioning.tsx +0 -14
  681. package/src/positioning/useFixedPositioning.ts +0 -6
  682. package/src/searching/__tests__/caseInsensitive.ts +165 -0
  683. package/src/searching/__tests__/fuzzy.ts +169 -0
  684. package/src/searching/__tests__/toSearchQuery.ts +21 -0
  685. package/src/searching/caseInsensitive.ts +200 -0
  686. package/src/searching/fuzzy.ts +175 -0
  687. package/src/searching/toSearchQuery.ts +18 -0
  688. package/src/searching/types.ts +34 -0
  689. package/src/searching/utils.ts +54 -0
  690. package/src/test-utils/data-testid.ts +5 -1
  691. package/src/test-utils/polyfills/TextDecoder.ts +7 -0
  692. package/src/test-utils/polyfills/TextEncoder.ts +5 -0
  693. package/src/test-utils/polyfills/index.ts +2 -0
  694. package/src/theme/_theme.scss +192 -34
  695. package/src/transition/__tests__/utils.ts +25 -0
  696. package/src/transition/useCollapseTransition.ts +6 -24
  697. package/src/transition/utils.ts +10 -5
  698. package/src/typography/SrOnly.tsx +9 -9
  699. package/src/typography/Typography.tsx +19 -19
  700. package/src/typography/__tests__/__snapshots__/SrOnly.tsx.snap +5 -5
  701. package/src/typography/_typography.scss +65 -25
  702. package/src/useEnsuredState.ts +1 -1
  703. package/src/utils/alphaNumericSort.ts +3 -16
  704. package/tsconfig.json +2 -2
  705. package/tsconfig.types.json +1 -1
  706. package/dist/form/SelectValue.d.ts +0 -17
  707. package/dist/form/SelectValue.js +0 -32
  708. package/dist/form/SelectValue.js.map +0 -1
  709. package/dist/utils/filters.d.ts +0 -196
  710. package/dist/utils/filters.js +0 -67
  711. package/dist/utils/filters.js.map +0 -1
  712. package/src/form/SelectValue.tsx +0 -39
  713. package/src/utils/filters.ts +0 -320
@@ -1,6 +1,6 @@
1
1
  import { type CSSProperties, type HTMLAttributes, type InputHTMLAttributes, type ReactNode } from "react";
2
2
  import { type PropsWithRef } from "../types.js";
3
- import { type FormFieldOptions, type UserAgentAutoCompleteProps } from "./types.js";
3
+ import { type FormFieldOptions, type UserAgentAutocompleteProps } from "./types.js";
4
4
  /**
5
5
  * These are all the "supported" input types for react-md so that they at least
6
6
  * render reasonably well by default. There is no built-in validation or
@@ -20,7 +20,7 @@ export type TextFieldInputAttributes = Omit<InputHTMLAttributes<HTMLInputElement
20
20
  /**
21
21
  * @remarks \@since 6.0.0 Removed the `containerRef` prop.
22
22
  */
23
- export interface TextFieldProps extends TextFieldInputAttributes, UserAgentAutoCompleteProps, FormFieldOptions {
23
+ export interface TextFieldProps extends TextFieldInputAttributes, UserAgentAutocompleteProps, FormFieldOptions {
24
24
  /**
25
25
  * @defaultValue `"text-field-" + useId()`
26
26
  */
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/TextField.tsx"],"sourcesContent":["import {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { FormMessageContainer } from \"./FormMessageContainer.js\";\nimport { Label } from \"./Label.js\";\nimport { TextFieldContainer } from \"./TextFieldContainer.js\";\nimport { getFormConfig } from \"./formConfig.js\";\nimport { textField } from \"./textFieldStyles.js\";\nimport {\n type FormFieldOptions,\n type UserAgentAutoCompleteProps,\n} from \"./types.js\";\n\n/**\n * These are all the \"supported\" input types for react-md so that they at least\n * render reasonably well by default. There is no built-in validation or\n * anything adding onto existing browser functionality for these types.\n *\n * @remarks\n * \\@since 2.5.0 - `\"search\"` was added\n * \\@since 6.0.0 Dropped support for `\"week\"` and `\"month\"` input types since\n * they are not available in Firefox and Safari at this time.\n */\nexport type SupportedInputTypes =\n | \"text\"\n | \"password\"\n | \"number\"\n | \"tel\"\n | \"email\"\n | \"date\"\n | \"time\"\n | \"datetime-local\"\n | \"url\"\n | \"color\"\n | \"search\";\n\n/**\n * @remarks \\@since 6.0.0 Renamed from `TextFieldAttributes` to\n * `TextFieldInputAttributes`\n */\nexport type TextFieldInputAttributes = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"type\"\n>;\n\n/**\n * @remarks \\@since 6.0.0 Removed the `containerRef` prop.\n */\nexport interface TextFieldProps\n extends TextFieldInputAttributes,\n UserAgentAutoCompleteProps,\n FormFieldOptions {\n /**\n * @defaultValue `\"text-field-\" + useId()`\n */\n id?: string;\n\n /**\n * Optional placeholder text to display in the text field.\n *\n * @defaultValue `label ? \" \" : \"\"`\n */\n placeholder?: string;\n\n /**\n * Any optional inline styles to set on the input.\n */\n inputStyle?: CSSProperties;\n\n /**\n * An optional `className` to add to the input.\n */\n inputClassName?: string;\n\n /**\n * The text field type.\n *\n * @defaultValue `\"text\"`\n */\n type?: SupportedInputTypes;\n\n /**\n * Optional props to provide to the {@link TextFieldContainer} component.\n * There probably isn't any real use for this prop other than if you need to\n * add a `ref` for some DOM behavior.\n */\n containerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n\n /**\n * The `children` will be rendered within the `TextFieldContainer` and before\n * the `<input />` element. This was added to support the new `Select`\n * component implementation\n *\n * @internal\n * @remarks \\@since 6.0.0\n */\n children?: ReactNode;\n}\n\n/**\n * **Server Component**\n *\n * The structure for this component is:\n * @example\n * Component Structure\n * ```tsx\n * <FormMessageContainer {...messageContainerProps}>\n * <TextFieldContainer {...containerProps}>\n * <input {...props} />\n * <Label {...labelProps} />\n * </TextFieldContainer>\n * </FormMessageContainer>\n * ```\n *\n * @example\n * Simple Example\n * ```tsx\n * import { TextField } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <TextField\n * label=\"Name\"\n * placeholder=\"Bob\"\n * defaultValue=\"\"\n * />\n * );\n * }\n * ```\n */\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(props, ref) {\n const {\n id: propId,\n style,\n className,\n type = \"text\",\n label,\n labelProps,\n labelStyle,\n labelClassName,\n autoCompleteValue,\n autoComplete = autoCompleteValue,\n name = autoCompleteValue,\n dense = false,\n error = false,\n active = false,\n inline = false,\n stretch = false,\n leftAddon,\n leftAddonProps,\n rightAddon,\n rightAddonProps,\n disableLeftAddonStyles = false,\n disableRightAddonStyles = false,\n inputStyle,\n inputClassName,\n theme: propTheme,\n underlineDirection: propUnderlineDirection,\n messageProps,\n messageContainerProps,\n containerProps,\n children,\n ...remaining\n } = props;\n const { disabled = false, readOnly = false } = props;\n const id = useEnsuredId(propId, \"text-field\");\n const theme = getFormConfig(\"theme\", propTheme);\n const underlineDirection = getFormConfig(\n \"underlineDirection\",\n propUnderlineDirection\n );\n\n let { placeholder = \"\" } = props;\n if (label && !placeholder) {\n // See the placeholder type definition comments for information\n placeholder = \" \";\n }\n\n return (\n <FormMessageContainer\n {...messageContainerProps}\n messageProps={messageProps}\n >\n <TextFieldContainer\n {...containerProps}\n style={style}\n className={className}\n theme={theme}\n label={!!label}\n error={error}\n dense={dense}\n inline={inline}\n active={active}\n stretch={stretch}\n readOnly={readOnly}\n disabled={disabled}\n leftAddon={leftAddon}\n leftAddonProps={leftAddonProps}\n rightAddon={rightAddon}\n rightAddonProps={rightAddonProps}\n underlineDirection={underlineDirection}\n disableLeftAddonStyles={disableLeftAddonStyles}\n disableRightAddonStyles={disableRightAddonStyles}\n >\n {children}\n <input\n {...remaining}\n id={id}\n ref={ref}\n type={type}\n name={name}\n disabled={disabled}\n placeholder={placeholder}\n autoComplete={autoComplete}\n style={inputStyle}\n className={textField({\n className: inputClassName,\n placeholderHidden: !!label && !active,\n })}\n />\n {label && (\n <Label\n floating\n dense={dense}\n error={error}\n active={active}\n disabled={disabled}\n {...labelProps}\n htmlFor={id}\n style={labelProps?.style ?? labelStyle}\n className={labelProps?.className ?? labelClassName}\n >\n {label}\n </Label>\n )}\n </TextFieldContainer>\n </FormMessageContainer>\n );\n }\n);\n"],"names":["forwardRef","useEnsuredId","FormMessageContainer","Label","TextFieldContainer","getFormConfig","textField","TextField","props","ref","id","propId","style","className","type","label","labelProps","labelStyle","labelClassName","autoCompleteValue","autoComplete","name","dense","error","active","inline","stretch","leftAddon","leftAddonProps","rightAddon","rightAddonProps","disableLeftAddonStyles","disableRightAddonStyles","inputStyle","inputClassName","theme","propTheme","underlineDirection","propUnderlineDirection","messageProps","messageContainerProps","containerProps","children","remaining","disabled","readOnly","placeholder","input","placeholderHidden","floating","htmlFor"],"mappings":";AAAA,SACEA,UAAU,QAKL,QAAQ;AAEf,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,oBAAoB,QAAQ,4BAA4B;AACjE,SAASC,KAAK,QAAQ,aAAa;AACnC,SAASC,kBAAkB,QAAQ,0BAA0B;AAC7D,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,SAAS,QAAQ,uBAAuB;AA4FjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BC,GACD,OAAO,MAAMC,0BAAYP,WACvB,SAASO,UAAUC,KAAK,EAAEC,GAAG;IAC3B,MAAM,EACJC,IAAIC,MAAM,EACVC,KAAK,EACLC,SAAS,EACTC,OAAO,MAAM,EACbC,KAAK,EACLC,UAAU,EACVC,UAAU,EACVC,cAAc,EACdC,iBAAiB,EACjBC,eAAeD,iBAAiB,EAChCE,OAAOF,iBAAiB,EACxBG,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,SAAS,EACTC,cAAc,EACdC,UAAU,EACVC,eAAe,EACfC,yBAAyB,KAAK,EAC9BC,0BAA0B,KAAK,EAC/BC,UAAU,EACVC,cAAc,EACdC,OAAOC,SAAS,EAChBC,oBAAoBC,sBAAsB,EAC1CC,YAAY,EACZC,qBAAqB,EACrBC,cAAc,EACdC,QAAQ,EACR,GAAGC,WACJ,GAAGnC;IACJ,MAAM,EAAEoC,WAAW,KAAK,EAAEC,WAAW,KAAK,EAAE,GAAGrC;IAC/C,MAAME,KAAKT,aAAaU,QAAQ;IAChC,MAAMwB,QAAQ9B,cAAc,SAAS+B;IACrC,MAAMC,qBAAqBhC,cACzB,sBACAiC;IAGF,IAAI,EAAEQ,cAAc,EAAE,EAAE,GAAGtC;IAC3B,IAAIO,SAAS,CAAC+B,aAAa;QACzB,+DAA+D;QAC/DA,cAAc;IAChB;IAEA,qBACE,KAAC5C;QACE,GAAGsC,qBAAqB;QACzBD,cAAcA;kBAEd,cAAA,MAACnC;YACE,GAAGqC,cAAc;YAClB7B,OAAOA;YACPC,WAAWA;YACXsB,OAAOA;YACPpB,OAAO,CAAC,CAACA;YACTQ,OAAOA;YACPD,OAAOA;YACPG,QAAQA;YACRD,QAAQA;YACRE,SAASA;YACTmB,UAAUA;YACVD,UAAUA;YACVjB,WAAWA;YACXC,gBAAgBA;YAChBC,YAAYA;YACZC,iBAAiBA;YACjBO,oBAAoBA;YACpBN,wBAAwBA;YACxBC,yBAAyBA;;gBAExBU;8BACD,KAACK;oBACE,GAAGJ,SAAS;oBACbjC,IAAIA;oBACJD,KAAKA;oBACLK,MAAMA;oBACNO,MAAMA;oBACNuB,UAAUA;oBACVE,aAAaA;oBACb1B,cAAcA;oBACdR,OAAOqB;oBACPpB,WAAWP,UAAU;wBACnBO,WAAWqB;wBACXc,mBAAmB,CAAC,CAACjC,SAAS,CAACS;oBACjC;;gBAEDT,uBACC,KAACZ;oBACC8C,QAAQ;oBACR3B,OAAOA;oBACPC,OAAOA;oBACPC,QAAQA;oBACRoB,UAAUA;oBACT,GAAG5B,UAAU;oBACdkC,SAASxC;oBACTE,OAAOI,YAAYJ,SAASK;oBAC5BJ,WAAWG,YAAYH,aAAaK;8BAEnCH;;;;;AAMb,GACA"}
1
+ {"version":3,"sources":["../../src/form/TextField.tsx"],"sourcesContent":["import {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { FormMessageContainer } from \"./FormMessageContainer.js\";\nimport { Label } from \"./Label.js\";\nimport { TextFieldContainer } from \"./TextFieldContainer.js\";\nimport { getFormConfig } from \"./formConfig.js\";\nimport { textField } from \"./textFieldStyles.js\";\nimport {\n type FormFieldOptions,\n type UserAgentAutocompleteProps,\n} from \"./types.js\";\n\n/**\n * These are all the \"supported\" input types for react-md so that they at least\n * render reasonably well by default. There is no built-in validation or\n * anything adding onto existing browser functionality for these types.\n *\n * @remarks\n * \\@since 2.5.0 - `\"search\"` was added\n * \\@since 6.0.0 Dropped support for `\"week\"` and `\"month\"` input types since\n * they are not available in Firefox and Safari at this time.\n */\nexport type SupportedInputTypes =\n | \"text\"\n | \"password\"\n | \"number\"\n | \"tel\"\n | \"email\"\n | \"date\"\n | \"time\"\n | \"datetime-local\"\n | \"url\"\n | \"color\"\n | \"search\";\n\n/**\n * @remarks \\@since 6.0.0 Renamed from `TextFieldAttributes` to\n * `TextFieldInputAttributes`\n */\nexport type TextFieldInputAttributes = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"type\"\n>;\n\n/**\n * @remarks \\@since 6.0.0 Removed the `containerRef` prop.\n */\nexport interface TextFieldProps\n extends TextFieldInputAttributes,\n UserAgentAutocompleteProps,\n FormFieldOptions {\n /**\n * @defaultValue `\"text-field-\" + useId()`\n */\n id?: string;\n\n /**\n * Optional placeholder text to display in the text field.\n *\n * @defaultValue `label ? \" \" : \"\"`\n */\n placeholder?: string;\n\n /**\n * Any optional inline styles to set on the input.\n */\n inputStyle?: CSSProperties;\n\n /**\n * An optional `className` to add to the input.\n */\n inputClassName?: string;\n\n /**\n * The text field type.\n *\n * @defaultValue `\"text\"`\n */\n type?: SupportedInputTypes;\n\n /**\n * Optional props to provide to the {@link TextFieldContainer} component.\n * There probably isn't any real use for this prop other than if you need to\n * add a `ref` for some DOM behavior.\n */\n containerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n\n /**\n * The `children` will be rendered within the `TextFieldContainer` and before\n * the `<input />` element. This was added to support the new `Select`\n * component implementation\n *\n * @internal\n * @remarks \\@since 6.0.0\n */\n children?: ReactNode;\n}\n\n/**\n * **Server Component**\n *\n * The structure for this component is:\n * @example\n * Component Structure\n * ```tsx\n * <FormMessageContainer {...messageContainerProps}>\n * <TextFieldContainer {...containerProps}>\n * <input {...props} />\n * <Label {...labelProps} />\n * </TextFieldContainer>\n * </FormMessageContainer>\n * ```\n *\n * @example\n * Simple Example\n * ```tsx\n * import { TextField } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <TextField\n * label=\"Name\"\n * placeholder=\"Bob\"\n * defaultValue=\"\"\n * />\n * );\n * }\n * ```\n */\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(props, ref) {\n const {\n id: propId,\n style,\n className,\n type = \"text\",\n label,\n labelProps,\n labelStyle,\n labelClassName,\n autoCompleteValue,\n autoComplete = autoCompleteValue,\n name = autoCompleteValue,\n dense = false,\n error = false,\n active = false,\n inline = false,\n stretch = false,\n leftAddon,\n leftAddonProps,\n rightAddon,\n rightAddonProps,\n disableLeftAddonStyles = false,\n disableRightAddonStyles = false,\n inputStyle,\n inputClassName,\n theme: propTheme,\n underlineDirection: propUnderlineDirection,\n messageProps,\n messageContainerProps,\n containerProps,\n children,\n ...remaining\n } = props;\n const { disabled = false, readOnly = false } = props;\n const id = useEnsuredId(propId, \"text-field\");\n const theme = getFormConfig(\"theme\", propTheme);\n const underlineDirection = getFormConfig(\n \"underlineDirection\",\n propUnderlineDirection\n );\n\n let { placeholder = \"\" } = props;\n if (label && !placeholder) {\n // See the placeholder type definition comments for information\n placeholder = \" \";\n }\n\n return (\n <FormMessageContainer\n {...messageContainerProps}\n messageProps={messageProps}\n >\n <TextFieldContainer\n {...containerProps}\n style={style}\n className={className}\n theme={theme}\n label={!!label}\n error={error}\n dense={dense}\n inline={inline}\n active={active}\n stretch={stretch}\n readOnly={readOnly}\n disabled={disabled}\n leftAddon={leftAddon}\n leftAddonProps={leftAddonProps}\n rightAddon={rightAddon}\n rightAddonProps={rightAddonProps}\n underlineDirection={underlineDirection}\n disableLeftAddonStyles={disableLeftAddonStyles}\n disableRightAddonStyles={disableRightAddonStyles}\n >\n {children}\n <input\n {...remaining}\n id={id}\n ref={ref}\n type={type}\n name={name}\n disabled={disabled}\n placeholder={placeholder}\n autoComplete={autoComplete}\n style={inputStyle}\n className={textField({\n className: inputClassName,\n placeholderHidden: !!label && !active,\n })}\n />\n {label && (\n <Label\n floating\n dense={dense}\n error={error}\n active={active}\n disabled={disabled}\n {...labelProps}\n htmlFor={id}\n style={labelProps?.style ?? labelStyle}\n className={labelProps?.className ?? labelClassName}\n >\n {label}\n </Label>\n )}\n </TextFieldContainer>\n </FormMessageContainer>\n );\n }\n);\n"],"names":["forwardRef","useEnsuredId","FormMessageContainer","Label","TextFieldContainer","getFormConfig","textField","TextField","props","ref","id","propId","style","className","type","label","labelProps","labelStyle","labelClassName","autoCompleteValue","autoComplete","name","dense","error","active","inline","stretch","leftAddon","leftAddonProps","rightAddon","rightAddonProps","disableLeftAddonStyles","disableRightAddonStyles","inputStyle","inputClassName","theme","propTheme","underlineDirection","propUnderlineDirection","messageProps","messageContainerProps","containerProps","children","remaining","disabled","readOnly","placeholder","input","placeholderHidden","floating","htmlFor"],"mappings":";AAAA,SACEA,UAAU,QAKL,QAAQ;AAEf,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,oBAAoB,QAAQ,4BAA4B;AACjE,SAASC,KAAK,QAAQ,aAAa;AACnC,SAASC,kBAAkB,QAAQ,0BAA0B;AAC7D,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,SAAS,QAAQ,uBAAuB;AA4FjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BC,GACD,OAAO,MAAMC,0BAAYP,WACvB,SAASO,UAAUC,KAAK,EAAEC,GAAG;IAC3B,MAAM,EACJC,IAAIC,MAAM,EACVC,KAAK,EACLC,SAAS,EACTC,OAAO,MAAM,EACbC,KAAK,EACLC,UAAU,EACVC,UAAU,EACVC,cAAc,EACdC,iBAAiB,EACjBC,eAAeD,iBAAiB,EAChCE,OAAOF,iBAAiB,EACxBG,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,SAAS,EACTC,cAAc,EACdC,UAAU,EACVC,eAAe,EACfC,yBAAyB,KAAK,EAC9BC,0BAA0B,KAAK,EAC/BC,UAAU,EACVC,cAAc,EACdC,OAAOC,SAAS,EAChBC,oBAAoBC,sBAAsB,EAC1CC,YAAY,EACZC,qBAAqB,EACrBC,cAAc,EACdC,QAAQ,EACR,GAAGC,WACJ,GAAGnC;IACJ,MAAM,EAAEoC,WAAW,KAAK,EAAEC,WAAW,KAAK,EAAE,GAAGrC;IAC/C,MAAME,KAAKT,aAAaU,QAAQ;IAChC,MAAMwB,QAAQ9B,cAAc,SAAS+B;IACrC,MAAMC,qBAAqBhC,cACzB,sBACAiC;IAGF,IAAI,EAAEQ,cAAc,EAAE,EAAE,GAAGtC;IAC3B,IAAIO,SAAS,CAAC+B,aAAa;QACzB,+DAA+D;QAC/DA,cAAc;IAChB;IAEA,qBACE,KAAC5C;QACE,GAAGsC,qBAAqB;QACzBD,cAAcA;kBAEd,cAAA,MAACnC;YACE,GAAGqC,cAAc;YAClB7B,OAAOA;YACPC,WAAWA;YACXsB,OAAOA;YACPpB,OAAO,CAAC,CAACA;YACTQ,OAAOA;YACPD,OAAOA;YACPG,QAAQA;YACRD,QAAQA;YACRE,SAASA;YACTmB,UAAUA;YACVD,UAAUA;YACVjB,WAAWA;YACXC,gBAAgBA;YAChBC,YAAYA;YACZC,iBAAiBA;YACjBO,oBAAoBA;YACpBN,wBAAwBA;YACxBC,yBAAyBA;;gBAExBU;8BACD,KAACK;oBACE,GAAGJ,SAAS;oBACbjC,IAAIA;oBACJD,KAAKA;oBACLK,MAAMA;oBACNO,MAAMA;oBACNuB,UAAUA;oBACVE,aAAaA;oBACb1B,cAAcA;oBACdR,OAAOqB;oBACPpB,WAAWP,UAAU;wBACnBO,WAAWqB;wBACXc,mBAAmB,CAAC,CAACjC,SAAS,CAACS;oBACjC;;gBAEDT,uBACC,KAACZ;oBACC8C,QAAQ;oBACR3B,OAAOA;oBACPC,OAAOA;oBACPC,QAAQA;oBACRoB,UAAUA;oBACT,GAAG5B,UAAU;oBACdkC,SAASxC;oBACTE,OAAOI,YAAYJ,SAASK;oBAC5BJ,WAAWG,YAAYH,aAAaK;8BAEnCH;;;;;AAMb,GACA"}
@@ -271,6 +271,7 @@ $variables: (
271
271
  focus-color,
272
272
  addon-top,
273
273
  addon-margin-top,
274
+ addon-left-offset,
274
275
  label-floating-top,
275
276
  label-left-offset,
276
277
  label-top-offset,
@@ -331,10 +332,12 @@ $variables: (
331
332
  text-field-hover-border-color,
332
333
  $text-field-light-hover-border-color
333
334
  );
334
- @include set-var(
335
- text-field-filled-color,
336
- $text-field-light-filled-background-color
337
- );
335
+ @if not $disable-text-field-filled-theme {
336
+ @include set-var(
337
+ text-field-filled-color,
338
+ $text-field-light-filled-background-color
339
+ );
340
+ }
338
341
  @if not $disable-switch {
339
342
  @include set-var(
340
343
  switch-track-background-color,
@@ -382,10 +385,12 @@ $variables: (
382
385
  text-field-hover-border-color,
383
386
  $text-field-dark-hover-border-color
384
387
  );
385
- @include set-var(
386
- text-field-filled-color,
387
- $text-field-dark-filled-background-color
388
- );
388
+ @if not $disable-text-field-filled-theme {
389
+ @include set-var(
390
+ text-field-filled-color,
391
+ $text-field-dark-filled-background-color
392
+ );
393
+ }
389
394
  @if not $disable-switch {
390
395
  @include set-var(
391
396
  switch-track-background-color,
@@ -615,7 +620,6 @@ $variables: (
615
620
  @mixin text-field-container-styles($disable-layer: false) {
616
621
  @include utils.optional-layer(form, $disable-layer) {
617
622
  .rmd-text-field-container {
618
- @include set-var(label-left-offset, get-var(text-field-padding-left));
619
623
  @include use-var(height, text-field-height);
620
624
 
621
625
  align-items: center;
@@ -684,13 +688,20 @@ $variables: (
684
688
  text-field-padding-right,
685
689
  $text-field-outlined-padding
686
690
  );
687
- @include set-var(label-top-offset, -50%);
688
- @include set-var(label-active-padding, 0 $label-floating-padding);
689
- @include set-var(
690
- label-active-background-color,
691
- theme.theme-get-var(background-color)
692
- );
693
691
  @include use-var(border-color, text-field-border-color);
692
+ @if not $disable-text-field-addon {
693
+ @include set-var(addon-left-offset, $text-field-outlined-padding);
694
+ }
695
+
696
+ @if not $disable-floating-label {
697
+ @include set-var(label-left-offset, $text-field-outlined-padding);
698
+ @include set-var(label-top-offset, -50%);
699
+ @include set-var(label-active-padding, 0 $label-floating-padding);
700
+ @include set-var(
701
+ label-active-background-color,
702
+ theme.theme-get-var(background-color)
703
+ );
704
+ }
694
705
 
695
706
  border-radius: $text-field-border-radius;
696
707
  border-style: solid;
@@ -738,6 +749,17 @@ $variables: (
738
749
  text-field-padding-right,
739
750
  $text-field-filled-padding
740
751
  );
752
+ @if not $disable-floating-label {
753
+ @include set-var(
754
+ label-left-offset,
755
+ $text-field-filled-padding + $label-floating-padding
756
+ );
757
+ }
758
+
759
+ @if not $disable-text-field-addon {
760
+ @include set-var(addon-left-offset, $text-field-filled-padding);
761
+ }
762
+
741
763
  @include use-var(background-color, text-field-filled-color);
742
764
  }
743
765
  }
@@ -1048,25 +1070,20 @@ $variables: (
1048
1070
  outline-style: none;
1049
1071
  }
1050
1072
 
1051
- .rmd-select-value {
1052
- @include _text-field-base-styles;
1053
-
1054
- align-items: center;
1055
- display: flex;
1056
- gap: 0.5rem;
1073
+ .rmd-selected-option {
1057
1074
  position: absolute;
1058
- white-space: nowrap;
1059
-
1060
- &__v {
1061
- @include typography.text-overflow;
1062
- }
1063
1075
  }
1064
1076
 
1065
1077
  .rmd-select {
1078
+ // disable pointer events on touch devices so the soft keyboard does not
1079
+ // appear when clicking the select
1080
+ @media (hover: none) and (pointer: course) {
1081
+ pointer-events: none;
1082
+ }
1083
+
1066
1084
  opacity: 0;
1067
- pointer-events: none;
1068
1085
 
1069
- // ALl these additional overrides are provided so that the select will have
1086
+ // All these additional overrides are provided so that the select will have
1070
1087
  // the same sizing as a text field with the same props provided.
1071
1088
  @if not $disable-text-field-underlined-theme {
1072
1089
  &--underline {
@@ -1196,7 +1213,7 @@ $variables: (
1196
1213
  // `.rmd-text-field-container` which would prevent these styles from being
1197
1214
  // applied
1198
1215
  &--before {
1199
- @include utils.auto-rtl(left, get-var(label-left-offset));
1216
+ @include utils.auto-rtl(left, get-var(addon-left-offset));
1200
1217
  }
1201
1218
 
1202
1219
  &--after {
@@ -1989,6 +2006,7 @@ $variables: (
1989
2006
  @if not $disable-text-field-addon {
1990
2007
  @include set-var(addon-top, auto);
1991
2008
  @include set-var(addon-margin-top, 0px);
2009
+ @include set-var(addon-left-offset, 0px);
1992
2010
  }
1993
2011
 
1994
2012
  @if not $disable-switch {
@@ -0,0 +1,39 @@
1
+ /** @remarks \@since 6.0.0 */
2
+ export interface MenuItemInputToggleClassNameOptions {
3
+ className?: string;
4
+ type: "radio" | "checkbox" | "switch";
5
+ }
6
+ /**
7
+ * @remarks \@since 6.0.0
8
+ */
9
+ export declare function menuItemInputToggle(options: MenuItemInputToggleClassNameOptions): string;
10
+ /**
11
+ * @remarks \@since 6.0.0
12
+ */
13
+ export interface MenuItemInputToggleTrackClassNameOptions {
14
+ className?: string;
15
+ }
16
+ /**
17
+ * @remarks \@since 6.0.0
18
+ */
19
+ export declare function menuItemInputToggleTrack(options?: MenuItemInputToggleTrackClassNameOptions): string;
20
+ /**
21
+ * @remarks \@since 6.0.0
22
+ */
23
+ export interface MenuItemInputToggleBallClassNameOptions {
24
+ className?: string;
25
+ }
26
+ /**
27
+ * @remarks \@since 6.0.0
28
+ */
29
+ export declare function menuItemInputToggleBall(options?: MenuItemInputToggleBallClassNameOptions): string;
30
+ /**
31
+ * @remarks \@since 6.0.0
32
+ */
33
+ export interface MenuItemInputToggleIconClassNameOptions {
34
+ className?: string;
35
+ }
36
+ /**
37
+ * @remarks \@since 6.0.0
38
+ */
39
+ export declare function menuItemInputToggleIcon(options?: MenuItemInputToggleIconClassNameOptions): string;
@@ -0,0 +1,31 @@
1
+ import { cnb } from "cnbuilder";
2
+ import { bem } from "../utils/bem.js";
3
+ const styles = bem("rmd-menu-item-input-toggle");
4
+ /**
5
+ * @remarks \@since 6.0.0
6
+ */ export function menuItemInputToggle(options) {
7
+ const { className, type } = options;
8
+ return cnb(`rmd-${type}-menu-item`, styles({
9
+ switch: type === "switch"
10
+ }), className);
11
+ }
12
+ /**
13
+ * @remarks \@since 6.0.0
14
+ */ export function menuItemInputToggleTrack(options = {}) {
15
+ const { className } = options;
16
+ return cnb(styles("track"), className);
17
+ }
18
+ /**
19
+ * @remarks \@since 6.0.0
20
+ */ export function menuItemInputToggleBall(options = {}) {
21
+ const { className } = options;
22
+ return cnb(styles("ball"), className);
23
+ }
24
+ /**
25
+ * @remarks \@since 6.0.0
26
+ */ export function menuItemInputToggleIcon(options = {}) {
27
+ const { className } = options;
28
+ return cnb(styles("icon"), className);
29
+ }
30
+
31
+ //# sourceMappingURL=menuItemInputToggleStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/form/menuItemInputToggleStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-menu-item-input-toggle\");\n\n/** @remarks \\@since 6.0.0 */\nexport interface MenuItemInputToggleClassNameOptions {\n className?: string;\n type: \"radio\" | \"checkbox\" | \"switch\";\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function menuItemInputToggle(\n options: MenuItemInputToggleClassNameOptions\n): string {\n const { className, type } = options;\n return cnb(\n `rmd-${type}-menu-item`,\n styles({ switch: type === \"switch\" }),\n className\n );\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface MenuItemInputToggleTrackClassNameOptions {\n className?: string;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function menuItemInputToggleTrack(\n options: MenuItemInputToggleTrackClassNameOptions = {}\n): string {\n const { className } = options;\n\n return cnb(styles(\"track\"), className);\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface MenuItemInputToggleBallClassNameOptions {\n className?: string;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function menuItemInputToggleBall(\n options: MenuItemInputToggleBallClassNameOptions = {}\n): string {\n const { className } = options;\n\n return cnb(styles(\"ball\"), className);\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface MenuItemInputToggleIconClassNameOptions {\n className?: string;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function menuItemInputToggleIcon(\n options: MenuItemInputToggleIconClassNameOptions = {}\n): string {\n const { className } = options;\n\n return cnb(styles(\"icon\"), className);\n}\n"],"names":["cnb","bem","styles","menuItemInputToggle","options","className","type","switch","menuItemInputToggleTrack","menuItemInputToggleBall","menuItemInputToggleIcon"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAQnB;;CAEC,GACD,OAAO,SAASE,oBACdC,OAA4C;IAE5C,MAAM,EAAEC,SAAS,EAAEC,IAAI,EAAE,GAAGF;IAC5B,OAAOJ,IACL,CAAC,IAAI,EAAEM,KAAK,UAAU,CAAC,EACvBJ,OAAO;QAAEK,QAAQD,SAAS;IAAS,IACnCD;AAEJ;AASA;;CAEC,GACD,OAAO,SAASG,yBACdJ,UAAoD,CAAC,CAAC;IAEtD,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,OAAOJ,IAAIE,OAAO,UAAUG;AAC9B;AASA;;CAEC,GACD,OAAO,SAASI,wBACdL,UAAmD,CAAC,CAAC;IAErD,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,OAAOJ,IAAIE,OAAO,SAASG;AAC7B;AASA;;CAEC,GACD,OAAO,SAASK,wBACdN,UAAmD,CAAC,CAAC;IAErD,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,OAAOJ,IAAIE,OAAO,SAASG;AAC7B"}
@@ -12,10 +12,8 @@ export interface SelectOption<Value extends string | number = string> extends Me
12
12
  * @remarks \@since 6.0.0
13
13
  */
14
14
  interface ExtractedOptions<Value extends string | number> {
15
- options: readonly SelectOption<Value>[];
15
+ options: readonly Value[];
16
16
  currentOption: SelectOption<Value> | undefined;
17
- searchValues: readonly string[];
18
- currentIndex: number;
19
17
  }
20
18
  /**
21
19
  * @internal
@@ -31,7 +31,6 @@ import { Children, isValidElement } from "react";
31
31
  * @remarks \@since 6.0.0
32
32
  */ export function extractOptionsFromChildren(children, currentValue) {
33
33
  let currentOption;
34
- let currentIndex = -1;
35
34
  const options = [];
36
35
  const searchValues = [];
37
36
  Children.forEach(children, (child)=>{
@@ -42,10 +41,9 @@ import { Children, isValidElement } from "react";
42
41
  if (typeof value !== "undefined") {
43
42
  if (value === currentValue || !currentOption && typeof currentValue === "undefined") {
44
43
  currentOption = child.props;
45
- currentIndex = options.length;
46
44
  }
47
45
  if (!disabled) {
48
- options.push(child.props);
46
+ options.push(child.props.value);
49
47
  searchValues.push(getLabelFromChildren(children));
50
48
  }
51
49
  } else if (children) {
@@ -53,18 +51,12 @@ import { Children, isValidElement } from "react";
53
51
  if (!currentOption) {
54
52
  ({ currentOption } = result);
55
53
  }
56
- if (result.currentIndex !== -1) {
57
- currentIndex = options.length + result.currentIndex;
58
- }
59
54
  options.push(...result.options);
60
- searchValues.push(...result.searchValues);
61
55
  }
62
56
  });
63
57
  return {
64
58
  options,
65
- searchValues,
66
- currentOption,
67
- currentIndex
59
+ currentOption
68
60
  };
69
61
  }
70
62
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/selectUtils.ts"],"sourcesContent":["import { Children, isValidElement, type ReactNode } from \"react\";\nimport { type MenuItemProps } from \"../menu/MenuItem.js\";\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport interface SelectOption<Value extends string | number = string>\n extends MenuItemProps {\n value: Value;\n}\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nfunction getLabelFromChildren(children: ReactNode): string {\n if (!children) {\n return \"\";\n }\n\n if (typeof children === \"string\" || typeof children === \"number\") {\n return `${children}`;\n }\n\n if (isValidElement<{ children: ReactNode; hidden?: boolean }>(children)) {\n if (children.props.hidden) {\n return \"\";\n }\n\n return getLabelFromChildren(children.props.children);\n }\n\n const childList = Children.toArray(children);\n for (const child of childList) {\n if (typeof child === \"string\" || typeof child === \"number\") {\n return `${child}`[0].toUpperCase();\n }\n\n if (\n isValidElement<{ children: ReactNode; hidden?: boolean }>(child) &&\n !child.props.hidden\n ) {\n return getLabelFromChildren(child.props.children);\n }\n }\n\n return \"\";\n}\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\ninterface ExtractedOptions<Value extends string | number> {\n options: readonly SelectOption<Value>[];\n currentOption: SelectOption<Value> | undefined;\n searchValues: readonly string[];\n currentIndex: number;\n}\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport function extractOptionsFromChildren<Value extends string | number>(\n children: ReactNode,\n currentValue: Value | undefined\n): ExtractedOptions<Value> {\n let currentOption: SelectOption<Value> | undefined;\n let currentIndex = -1;\n\n const options: SelectOption<Value>[] = [];\n const searchValues: string[] = [];\n Children.forEach(children, (child) => {\n if (!isValidElement<SelectOption<Value>>(child)) {\n return;\n }\n\n const { value, disabled, children } = child.props;\n if (typeof value !== \"undefined\") {\n if (\n value === currentValue ||\n (!currentOption && typeof currentValue === \"undefined\")\n ) {\n currentOption = child.props;\n currentIndex = options.length;\n }\n\n if (!disabled) {\n options.push(child.props);\n searchValues.push(getLabelFromChildren(children));\n }\n } else if (children) {\n const result = extractOptionsFromChildren(children, currentValue);\n if (!currentOption) {\n ({ currentOption } = result);\n }\n\n if (result.currentIndex !== -1) {\n currentIndex = options.length + result.currentIndex;\n }\n\n options.push(...result.options);\n searchValues.push(...result.searchValues);\n }\n });\n\n return {\n options,\n searchValues,\n currentOption,\n currentIndex,\n };\n}\n"],"names":["Children","isValidElement","getLabelFromChildren","children","props","hidden","childList","toArray","child","toUpperCase","extractOptionsFromChildren","currentValue","currentOption","currentIndex","options","searchValues","forEach","value","disabled","length","push","result"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,cAAc,QAAwB,QAAQ;AAYjE;;;CAGC,GACD,SAASC,qBAAqBC,QAAmB;IAC/C,IAAI,CAACA,UAAU;QACb,OAAO;IACT;IAEA,IAAI,OAAOA,aAAa,YAAY,OAAOA,aAAa,UAAU;QAChE,OAAO,CAAC,EAAEA,SAAS,CAAC;IACtB;IAEA,IAAIF,eAA0DE,WAAW;QACvE,IAAIA,SAASC,KAAK,CAACC,MAAM,EAAE;YACzB,OAAO;QACT;QAEA,OAAOH,qBAAqBC,SAASC,KAAK,CAACD,QAAQ;IACrD;IAEA,MAAMG,YAAYN,SAASO,OAAO,CAACJ;IACnC,KAAK,MAAMK,SAASF,UAAW;QAC7B,IAAI,OAAOE,UAAU,YAAY,OAAOA,UAAU,UAAU;YAC1D,OAAO,CAAC,EAAEA,MAAM,CAAC,CAAC,EAAE,CAACC,WAAW;QAClC;QAEA,IACER,eAA0DO,UAC1D,CAACA,MAAMJ,KAAK,CAACC,MAAM,EACnB;YACA,OAAOH,qBAAqBM,MAAMJ,KAAK,CAACD,QAAQ;QAClD;IACF;IAEA,OAAO;AACT;AAaA;;;CAGC,GACD,OAAO,SAASO,2BACdP,QAAmB,EACnBQ,YAA+B;IAE/B,IAAIC;IACJ,IAAIC,eAAe,CAAC;IAEpB,MAAMC,UAAiC,EAAE;IACzC,MAAMC,eAAyB,EAAE;IACjCf,SAASgB,OAAO,CAACb,UAAU,CAACK;QAC1B,IAAI,CAACP,eAAoCO,QAAQ;YAC/C;QACF;QAEA,MAAM,EAAES,KAAK,EAAEC,QAAQ,EAAEf,QAAQ,EAAE,GAAGK,MAAMJ,KAAK;QACjD,IAAI,OAAOa,UAAU,aAAa;YAChC,IACEA,UAAUN,gBACT,CAACC,iBAAiB,OAAOD,iBAAiB,aAC3C;gBACAC,gBAAgBJ,MAAMJ,KAAK;gBAC3BS,eAAeC,QAAQK,MAAM;YAC/B;YAEA,IAAI,CAACD,UAAU;gBACbJ,QAAQM,IAAI,CAACZ,MAAMJ,KAAK;gBACxBW,aAAaK,IAAI,CAAClB,qBAAqBC;YACzC;QACF,OAAO,IAAIA,UAAU;YACnB,MAAMkB,SAASX,2BAA2BP,UAAUQ;YACpD,IAAI,CAACC,eAAe;gBACjB,CAAA,EAAEA,aAAa,EAAE,GAAGS,MAAK;YAC5B;YAEA,IAAIA,OAAOR,YAAY,KAAK,CAAC,GAAG;gBAC9BA,eAAeC,QAAQK,MAAM,GAAGE,OAAOR,YAAY;YACrD;YAEAC,QAAQM,IAAI,IAAIC,OAAOP,OAAO;YAC9BC,aAAaK,IAAI,IAAIC,OAAON,YAAY;QAC1C;IACF;IAEA,OAAO;QACLD;QACAC;QACAH;QACAC;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/form/selectUtils.ts"],"sourcesContent":["import { Children, isValidElement, type ReactNode } from \"react\";\nimport { type MenuItemProps } from \"../menu/MenuItem.js\";\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport interface SelectOption<Value extends string | number = string>\n extends MenuItemProps {\n value: Value;\n}\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nfunction getLabelFromChildren(children: ReactNode): string {\n if (!children) {\n return \"\";\n }\n\n if (typeof children === \"string\" || typeof children === \"number\") {\n return `${children}`;\n }\n\n if (isValidElement<{ children: ReactNode; hidden?: boolean }>(children)) {\n if (children.props.hidden) {\n return \"\";\n }\n\n return getLabelFromChildren(children.props.children);\n }\n\n const childList = Children.toArray(children);\n for (const child of childList) {\n if (typeof child === \"string\" || typeof child === \"number\") {\n return `${child}`[0].toUpperCase();\n }\n\n if (\n isValidElement<{ children: ReactNode; hidden?: boolean }>(child) &&\n !child.props.hidden\n ) {\n return getLabelFromChildren(child.props.children);\n }\n }\n\n return \"\";\n}\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\ninterface ExtractedOptions<Value extends string | number> {\n options: readonly Value[];\n currentOption: SelectOption<Value> | undefined;\n}\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport function extractOptionsFromChildren<Value extends string | number>(\n children: ReactNode,\n currentValue: Value | undefined\n): ExtractedOptions<Value> {\n let currentOption: SelectOption<Value> | undefined;\n\n const options: Value[] = [];\n const searchValues: string[] = [];\n Children.forEach(children, (child) => {\n if (!isValidElement<SelectOption<Value>>(child)) {\n return;\n }\n\n const { value, disabled, children } = child.props;\n if (typeof value !== \"undefined\") {\n if (\n value === currentValue ||\n (!currentOption && typeof currentValue === \"undefined\")\n ) {\n currentOption = child.props;\n }\n\n if (!disabled) {\n options.push(child.props.value);\n searchValues.push(getLabelFromChildren(children));\n }\n } else if (children) {\n const result = extractOptionsFromChildren(children, currentValue);\n if (!currentOption) {\n ({ currentOption } = result);\n }\n\n options.push(...result.options);\n }\n });\n\n return {\n options,\n currentOption,\n };\n}\n"],"names":["Children","isValidElement","getLabelFromChildren","children","props","hidden","childList","toArray","child","toUpperCase","extractOptionsFromChildren","currentValue","currentOption","options","searchValues","forEach","value","disabled","push","result"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,cAAc,QAAwB,QAAQ;AAYjE;;;CAGC,GACD,SAASC,qBAAqBC,QAAmB;IAC/C,IAAI,CAACA,UAAU;QACb,OAAO;IACT;IAEA,IAAI,OAAOA,aAAa,YAAY,OAAOA,aAAa,UAAU;QAChE,OAAO,CAAC,EAAEA,SAAS,CAAC;IACtB;IAEA,IAAIF,eAA0DE,WAAW;QACvE,IAAIA,SAASC,KAAK,CAACC,MAAM,EAAE;YACzB,OAAO;QACT;QAEA,OAAOH,qBAAqBC,SAASC,KAAK,CAACD,QAAQ;IACrD;IAEA,MAAMG,YAAYN,SAASO,OAAO,CAACJ;IACnC,KAAK,MAAMK,SAASF,UAAW;QAC7B,IAAI,OAAOE,UAAU,YAAY,OAAOA,UAAU,UAAU;YAC1D,OAAO,CAAC,EAAEA,MAAM,CAAC,CAAC,EAAE,CAACC,WAAW;QAClC;QAEA,IACER,eAA0DO,UAC1D,CAACA,MAAMJ,KAAK,CAACC,MAAM,EACnB;YACA,OAAOH,qBAAqBM,MAAMJ,KAAK,CAACD,QAAQ;QAClD;IACF;IAEA,OAAO;AACT;AAWA;;;CAGC,GACD,OAAO,SAASO,2BACdP,QAAmB,EACnBQ,YAA+B;IAE/B,IAAIC;IAEJ,MAAMC,UAAmB,EAAE;IAC3B,MAAMC,eAAyB,EAAE;IACjCd,SAASe,OAAO,CAACZ,UAAU,CAACK;QAC1B,IAAI,CAACP,eAAoCO,QAAQ;YAC/C;QACF;QAEA,MAAM,EAAEQ,KAAK,EAAEC,QAAQ,EAAEd,QAAQ,EAAE,GAAGK,MAAMJ,KAAK;QACjD,IAAI,OAAOY,UAAU,aAAa;YAChC,IACEA,UAAUL,gBACT,CAACC,iBAAiB,OAAOD,iBAAiB,aAC3C;gBACAC,gBAAgBJ,MAAMJ,KAAK;YAC7B;YAEA,IAAI,CAACa,UAAU;gBACbJ,QAAQK,IAAI,CAACV,MAAMJ,KAAK,CAACY,KAAK;gBAC9BF,aAAaI,IAAI,CAAChB,qBAAqBC;YACzC;QACF,OAAO,IAAIA,UAAU;YACnB,MAAMgB,SAAST,2BAA2BP,UAAUQ;YACpD,IAAI,CAACC,eAAe;gBACjB,CAAA,EAAEA,aAAa,EAAE,GAAGO,MAAK;YAC5B;YAEAN,QAAQK,IAAI,IAAIC,OAAON,OAAO;QAChC;IACF;IAEA,OAAO;QACLA;QACAD;IACF;AACF"}
@@ -73,15 +73,15 @@ export interface FormComponentStates {
73
73
  * @see https://html.spec.whatwg.org/multipage/forms.html#autofill
74
74
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values
75
75
  */
76
- export type AutoCompleteValue = "off" | "on" | "name" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "email" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level1" | "address-level2" | "address-level3" | "address-level4" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel" | "tel-country-code" | "tel-national" | "tek-area-code" | "tel-local" | "tel-extension" | "impp" | "url" | "photo";
76
+ export type AutocompleteValue = "off" | "on" | "name" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "email" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level1" | "address-level2" | "address-level3" | "address-level4" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel" | "tel-country-code" | "tel-national" | "tek-area-code" | "tel-local" | "tel-extension" | "impp" | "url" | "photo";
77
77
  /**
78
78
  * @remarks \@since 6.0.0
79
79
  */
80
- export interface UserAgentAutoCompleteProps {
80
+ export interface UserAgentAutocompleteProps {
81
81
  /**
82
82
  * Set this to enable additional autocompletion suggestions for a user for
83
83
  * different form fields. Using this prop will update the
84
- * {@link UserAgentAutoCompleteProps.name} and {@link autoComplete} to default to
84
+ * {@link UserAgentAutocompleteProps.name} and {@link autoComplete} to default to
85
85
  * this value.
86
86
  *
87
87
  * @example
@@ -110,11 +110,11 @@ export interface UserAgentAutoCompleteProps {
110
110
  *
111
111
  * @see https://html.spec.whatwg.org/multipage/forms.html#autofill
112
112
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values
113
- * @see {@link AutoCompleteValue}
113
+ * @see {@link AutocompleteValue}
114
114
  * @see {@link autoComplete}
115
- * @see {@link UserAgentAutoCompleteProps.name}
115
+ * @see {@link UserAgentAutocompleteProps.name}
116
116
  */
117
- autoCompleteValue?: AutoCompleteValue;
117
+ autoCompleteValue?: AutocompleteValue;
118
118
  /**
119
119
  * @see {@link autoCompleteValue}
120
120
  * @defaultValue `autoCompleteValue`
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/types.ts"],"sourcesContent":["import {\n type CSSProperties,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type LabelHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-form-active-color\"?: string;\n \"--rmd-form-focus-color\"?: string;\n }\n}\n\n/**\n * The supported themes for the `TextField`, `TextArea`, and `Select`\n * components.\n *\n * - \"none\" - display as an unstyled text field without any border or background\n * colors.\n * - \"underline\" - display with only an underline that gains the form active\n * color and animates from the left or right to the other side when the field\n * is focused.\n * - \"filled\" - an extension of the `\"underline\"` state that will also have a\n * slightly dark background applied.\n * - \"outline\" - outlines the entire text field in a border and applies the\n * active color as box shadow when the field is focused.\n */\nexport type FormTheme = \"none\" | \"underline\" | \"filled\" | \"outline\";\n\n/**\n * The direction that the underline should appear from when the theme is\n * `\"underline\"` or `\"filled\"`.\n */\nexport type FormUnderlineDirection = \"left\" | \"center\" | \"right\";\n\nexport interface FormThemeOptions {\n /**\n * The current theme type.\n *\n * @defaultValue `\"outline\"`\n */\n theme?: FormTheme;\n\n /**\n * The current underline direction.\n *\n * @defaultValue `\"left\"`\n */\n underlineDirection?: FormUnderlineDirection;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface FormConfiguration extends Required<FormThemeOptions> {\n /**\n * Set this to `false` if the `$disable-uncontrolled-input-toggles` variable\n * is set to `true` in the Sass configuration.\n *\n * Since the `checked` state only changes for the radio that has been clicked,\n * the previously checked radio would also be shown as checked with no way of\n * fixing it without controlling the radio component. When this flag is\n * enabled, the checked icons and state are handled through css instead of\n * `useState`.\n *\n * @defaultValue `true`\n */\n uncontrolledToggles: boolean;\n}\n\nexport interface FormComponentStates {\n /** @defaultValue `false` */\n error?: boolean;\n\n /** @defaultValue `false` */\n active?: boolean;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /** @defaultValue `false` */\n readOnly?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @see https://html.spec.whatwg.org/multipage/forms.html#autofill\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n */\nexport type AutoCompleteValue =\n | \"off\"\n | \"on\"\n | \"name\"\n | \"honorific-prefix\"\n | \"given-name\"\n | \"additional-name\"\n | \"family-name\"\n | \"honorific-suffix\"\n | \"nickname\"\n | \"email\"\n | \"username\"\n | \"new-password\"\n | \"current-password\"\n | \"one-time-code\"\n | \"organization-title\"\n | \"organization\"\n | \"street-address\"\n | \"address-line1\"\n | \"address-line2\"\n | \"address-line3\"\n | \"address-level1\"\n | \"address-level2\"\n | \"address-level3\"\n | \"address-level4\"\n | \"country\"\n | \"country-name\"\n | \"postal-code\"\n | \"cc-name\"\n | \"cc-given-name\"\n | \"cc-additional-name\"\n | \"cc-family-name\"\n | \"cc-number\"\n | \"cc-exp\"\n | \"cc-exp-month\"\n | \"cc-exp-year\"\n | \"cc-csc\"\n | \"cc-type\"\n | \"transaction-currency\"\n | \"transaction-amount\"\n | \"language\"\n | \"bday\"\n | \"bday-day\"\n | \"bday-month\"\n | \"bday-year\"\n | \"sex\"\n | \"tel\"\n | \"tel-country-code\"\n | \"tel-national\"\n | \"tek-area-code\"\n | \"tel-local\"\n | \"tel-extension\"\n | \"impp\"\n | \"url\"\n | \"photo\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface UserAgentAutoCompleteProps {\n /**\n * Set this to enable additional autocompletion suggestions for a user for\n * different form fields. Using this prop will update the\n * {@link UserAgentAutoCompleteProps.name} and {@link autoComplete} to default to\n * this value.\n *\n * @example\n * ```tsx\n * <Form>\n * <TextField\n * label=\"Enter your credit card number\"\n * autoCompleteValue=\"cc-number\"\n * {...creditCardProps}\n * inputMode=\"number\"\n * />\n * <TextField\n * label=\"Name on card\"\n * autoCompleteValue=\"cc-name\"\n * {...creditCardNameProps}\n * />\n * <TextField\n * label=\"Security code\"\n * autoCompleteValue=\"cc-csc\"\n * {...securityCodeProps}\n * inputMode=\"number\"\n * />\n * <Button type=\"submit\">Submit</Button>\n * </Form>\n * ```\n *\n * @see https://html.spec.whatwg.org/multipage/forms.html#autofill\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n * @see {@link AutoCompleteValue}\n * @see {@link autoComplete}\n * @see {@link UserAgentAutoCompleteProps.name}\n */\n autoCompleteValue?: AutoCompleteValue;\n\n /**\n * @see {@link autoCompleteValue}\n * @defaultValue `autoCompleteValue`\n */\n autoComplete?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n\n /**\n * @see {@link autoCompleteValue}\n * @defaultValue `autoCompleteValue`\n */\n name?: string;\n}\n\nexport interface FormMessageClassNameOptions {\n className?: string;\n\n /**\n * Boolean if the message should gain the error state which changes the text\n * color to `red` by default.\n *\n * @defaultValue `false`\n */\n error?: boolean;\n\n /**\n * The current theme for the related text field. This is really only used to\n * match the current horizontal padding of the text field.\n *\n * @defaultValue `\"outline\"`\n */\n theme?: FormTheme;\n}\n\nexport interface FormMessageProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"minLength\" | \"maxLength\">,\n FormMessageClassNameOptions {\n /**\n * If this component is acting as a form-level error message handler, the role\n * should be updated to be `\"alert\"` for additional accessibility.\n *\n * Note: when creating a form-level error message handler, the messages should\n * no longer appear as the user types and instead once the user tries to\n * submit the form. Having an alert role disrupts normal screen reader\n * behavior by immediately reading changes in this element.\n *\n * @defaultValue `undefined`\n */\n role?: \"alert\";\n\n /**\n * Boolean if the children should no longer be wrapped in a `<p>` tag. This\n * should normally only be disabled if using a custom error message wrapper or\n * the counter behavior is not being used. To get correct alignments of the\n * message and counter, the `children` must be wrapped in some element and\n * cannot be plain test.\n *\n * Note: this will always be considered `true` if the `role` is set to\n * `\"alert\"`.\n *\n * @defaultValue `false`\n */\n disableWrap?: boolean;\n\n /**\n * An optional style to apply to the `<p>` tag that surrounds the `children`.\n * This will not be used if `role=\"alert\"` or `disableWrap={true}`.\n */\n messageStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the `<p>` tag that surrounds the\n * `children`. This will not be used if `role=\"alert\"` or\n * `disableWrap={true}`.\n */\n messageClassName?: string;\n}\n\n/**\n * Props that are used to automatically add a counter for the remaining letters\n * available for the text field. The counter will always be created to the right\n * of the optional message.\n *\n * The counter is really a simple string of: `${length} / ${maxLength}`.\n *\n * If you need additional customization, it is recommended to create your own\n * implementation such as:\n *\n * ```tsx\n * <FormMessage>\n * {errorMessage}\n * <MyCounter {...props} />\n * </FormMessage>\n * ```\n *\n * Note: this should not be used alongside form-level messages.\n *\n * @remarks \\@since 2.9.0 Renamed from `FormMessageCounterProps` to\n * `FormMessageInputLengthCounterProps` since a `FormMessageCounter` component\n * was added\n */\nexport interface FormMessageInputLengthCounterProps {\n /**\n * The current length of the value in the related text field.\n */\n length: number;\n\n /**\n * The max length allowed for the value in the related text field.\n */\n maxLength: number;\n\n /**\n * An optional style to apply to the counter wrapper element.\n */\n counterStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the counter wrapper element.\n */\n counterClassName?: string;\n}\n\nexport interface FormMessageWithCounterProps\n extends FormMessageProps,\n FormMessageInputLengthCounterProps {}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface FormMessageWithoutCounterProps extends FormMessageProps {\n length?: never;\n maxLength?: never;\n counterStyle?: never;\n counterClassName?: never;\n}\n\nexport interface FormMessageContainerExtension {\n /**\n * If the extension doesn't actually want to render the `FormMessage`\n * component, these props are optional. It kind of eliminates the whole\n * purpose of this component though.\n */\n messageProps?: PropsWithRef<\n FormMessageProps & Partial<FormMessageInputLengthCounterProps>,\n HTMLDivElement\n >;\n\n /**\n * Any props (and an optional ref) to provide to the `<div>` surrounding the\n * children and `FormMessage` component.\n *\n * Note: This will not be used if the `messageProps` are not provided since\n * only the `children` will be returned without the container.\n */\n messageContainerProps?: PropsWithRef<\n HTMLAttributes<HTMLDivElement>,\n HTMLDivElement\n >;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface LabelClassNameOptions {\n className?: string;\n\n /**\n * Set this to `true` to remove the `gap` style from the label.\n *\n * @see `$label-gap`\n * @defaultValue `false`\n */\n gap?: boolean;\n\n /**\n * Set this to `true` when the parent `TextFieldContainer` has the `dense`\n * spec enabled. This updates the floating styles to match the smaller height.\n *\n * @defaultValue `false`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to update the label's color to the error color.\n *\n * @see `$error-color`\n * @defaultValue `false`\n */\n error?: boolean;\n\n /**\n * Set this to `true` to update the label's color to the active color.\n *\n * @see `$active-color`\n * @defaultValue `false`\n */\n active?: boolean;\n\n /**\n * Set this to `true` if the label should gain `flex-direction: column`\n * styling.\n *\n * @defaultValue `false`\n */\n stacked?: boolean;\n\n /**\n * Set this to `true` to update the label's color to be the disabled color.\n *\n * @see `$disabled-color`\n * @defaultValue `false`\n */\n disabled?: boolean;\n\n /**\n * Set this to true when label can floating above an input, textarea, or\n * select inside of a `TextFieldContainer`.\n *\n * @defaultValue `false`\n */\n floating?: boolean;\n\n /**\n * Set this to true when label is currently floating above an input,\n * textarea, or selected inside of a `TextFieldContainer`.\n *\n * @see {@link active}\n * @defaultValue `active`\n */\n floatingActive?: boolean;\n\n /**\n * Set this to `true` to gain `flex-direction: row-reversed` styling. If the\n * {@link stacked} prop is also `true`, `flex-direction: column-reversed` will\n * be applied.\n *\n * @defaultValue `false`\n */\n reversed?: boolean;\n\n /**\n * @defaultValue `false`\n */\n inactive?: boolean;\n}\n\nexport interface LabelProps\n extends LabelHTMLAttributes<HTMLLabelElement>,\n LabelClassNameOptions {}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface ConfigurableTextFieldAddonProps\n extends HTMLAttributes<HTMLSpanElement> {\n /**\n * Boolean if the addon should be presentational only and prevent pointer\n * events.\n *\n * @defaultValue `false`\n */\n pointerEvents?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0 Added support for `leftAddonProps` and\n * `rightAddonProps`.\n */\nexport interface TextFieldContainerOptions\n extends FormThemeOptions,\n FormComponentStates {\n /**\n * Set this to `true` to enable the dense spec which reduces the height.\n *\n * @defaultValue `false`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to change the style from `display: flex` to\n * `display: inline-flex`.\n *\n * @defaultValue `false`\n */\n inline?: boolean;\n\n /**\n * Set this to `true` if this component should stretch to fill a flex or grid\n * container using `flex: 1 1 auto`.\n *\n * @defaultValue `false`\n */\n stretch?: boolean;\n\n /**\n * This should generally be an icon or a button that will be placed before the\n * `TextField` or `TextArea`.\n */\n leftAddon?: ReactNode;\n\n /**\n * Any additional props to pass to the `<span>` surrounding the {@link leftAddon}.\n *\n * @remarks \\@since 6.0.0\n */\n leftAddonProps?: PropsWithRef<\n ConfigurableTextFieldAddonProps,\n HTMLSpanElement\n >;\n\n /**\n * @see {@link TextFieldAddonProps.disabled}\n *\n * @defaultValue `false`\n */\n disableLeftAddonStyles?: boolean;\n\n /**\n * This should generally be an icon or a button that will be placed after the\n * `TextField` or `TextArea`.\n */\n rightAddon?: ReactNode;\n\n /**\n * Any additional props to pass to the `<span>` surrounding the {@link rightAddon}.\n *\n * @remarks \\@since 6.0.0\n */\n rightAddonProps?: PropsWithRef<\n ConfigurableTextFieldAddonProps,\n HTMLSpanElement\n >;\n\n /**\n * @see {@link TextFieldAddonProps.disabled}\n *\n * @defaultValue `false`\n */\n disableRightAddonStyles?: boolean;\n}\n\nexport interface FormFieldOptions\n extends TextFieldContainerOptions,\n FormMessageContainerExtension {\n /**\n * An optional floating label to use with the text field. A label is generally\n * recommended for accessibility, but can be omitted if an `aria-label` or\n * `aria-labelledby` is provided.\n */\n label?: ReactNode;\n\n /**\n * Any additional props and/or ref that should be passed to the `<label>`\n * element when a {@link label} is provided.\n *\n * @example\n * ```tsx\n * labelProps={{\n * ref: labelRef,\n * style: {},\n * className: \"some-custom-class-name\",\n * onClick: (event) => {\n * // do something\n * }\n * }}\n * ```\n */\n labelProps?: PropsWithRef<LabelProps, HTMLLabelElement>;\n\n /**\n * A convenience prop to apply a custom style to a label. This is equivalent\n * to:\n *\n * ```ts\n * labelProps={{\n * style: // some style here\n * }}\n * ```\n */\n labelStyle?: CSSProperties;\n\n /**\n * A convenience prop to apply a custom className to a label. This is\n * equivalent to:\n *\n * ```ts\n * labelProps={{\n * className: \"some-class-name\",\n * }}\n * ```\n */\n labelClassName?: string;\n}\n"],"names":[],"mappings":"AAihBA,WAmDC"}
1
+ {"version":3,"sources":["../../src/form/types.ts"],"sourcesContent":["import {\n type CSSProperties,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type LabelHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-form-active-color\"?: string;\n \"--rmd-form-focus-color\"?: string;\n }\n}\n\n/**\n * The supported themes for the `TextField`, `TextArea`, and `Select`\n * components.\n *\n * - \"none\" - display as an unstyled text field without any border or background\n * colors.\n * - \"underline\" - display with only an underline that gains the form active\n * color and animates from the left or right to the other side when the field\n * is focused.\n * - \"filled\" - an extension of the `\"underline\"` state that will also have a\n * slightly dark background applied.\n * - \"outline\" - outlines the entire text field in a border and applies the\n * active color as box shadow when the field is focused.\n */\nexport type FormTheme = \"none\" | \"underline\" | \"filled\" | \"outline\";\n\n/**\n * The direction that the underline should appear from when the theme is\n * `\"underline\"` or `\"filled\"`.\n */\nexport type FormUnderlineDirection = \"left\" | \"center\" | \"right\";\n\nexport interface FormThemeOptions {\n /**\n * The current theme type.\n *\n * @defaultValue `\"outline\"`\n */\n theme?: FormTheme;\n\n /**\n * The current underline direction.\n *\n * @defaultValue `\"left\"`\n */\n underlineDirection?: FormUnderlineDirection;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface FormConfiguration extends Required<FormThemeOptions> {\n /**\n * Set this to `false` if the `$disable-uncontrolled-input-toggles` variable\n * is set to `true` in the Sass configuration.\n *\n * Since the `checked` state only changes for the radio that has been clicked,\n * the previously checked radio would also be shown as checked with no way of\n * fixing it without controlling the radio component. When this flag is\n * enabled, the checked icons and state are handled through css instead of\n * `useState`.\n *\n * @defaultValue `true`\n */\n uncontrolledToggles: boolean;\n}\n\nexport interface FormComponentStates {\n /** @defaultValue `false` */\n error?: boolean;\n\n /** @defaultValue `false` */\n active?: boolean;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /** @defaultValue `false` */\n readOnly?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @see https://html.spec.whatwg.org/multipage/forms.html#autofill\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n */\nexport type AutocompleteValue =\n | \"off\"\n | \"on\"\n | \"name\"\n | \"honorific-prefix\"\n | \"given-name\"\n | \"additional-name\"\n | \"family-name\"\n | \"honorific-suffix\"\n | \"nickname\"\n | \"email\"\n | \"username\"\n | \"new-password\"\n | \"current-password\"\n | \"one-time-code\"\n | \"organization-title\"\n | \"organization\"\n | \"street-address\"\n | \"address-line1\"\n | \"address-line2\"\n | \"address-line3\"\n | \"address-level1\"\n | \"address-level2\"\n | \"address-level3\"\n | \"address-level4\"\n | \"country\"\n | \"country-name\"\n | \"postal-code\"\n | \"cc-name\"\n | \"cc-given-name\"\n | \"cc-additional-name\"\n | \"cc-family-name\"\n | \"cc-number\"\n | \"cc-exp\"\n | \"cc-exp-month\"\n | \"cc-exp-year\"\n | \"cc-csc\"\n | \"cc-type\"\n | \"transaction-currency\"\n | \"transaction-amount\"\n | \"language\"\n | \"bday\"\n | \"bday-day\"\n | \"bday-month\"\n | \"bday-year\"\n | \"sex\"\n | \"tel\"\n | \"tel-country-code\"\n | \"tel-national\"\n | \"tek-area-code\"\n | \"tel-local\"\n | \"tel-extension\"\n | \"impp\"\n | \"url\"\n | \"photo\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface UserAgentAutocompleteProps {\n /**\n * Set this to enable additional autocompletion suggestions for a user for\n * different form fields. Using this prop will update the\n * {@link UserAgentAutocompleteProps.name} and {@link autoComplete} to default to\n * this value.\n *\n * @example\n * ```tsx\n * <Form>\n * <TextField\n * label=\"Enter your credit card number\"\n * autoCompleteValue=\"cc-number\"\n * {...creditCardProps}\n * inputMode=\"number\"\n * />\n * <TextField\n * label=\"Name on card\"\n * autoCompleteValue=\"cc-name\"\n * {...creditCardNameProps}\n * />\n * <TextField\n * label=\"Security code\"\n * autoCompleteValue=\"cc-csc\"\n * {...securityCodeProps}\n * inputMode=\"number\"\n * />\n * <Button type=\"submit\">Submit</Button>\n * </Form>\n * ```\n *\n * @see https://html.spec.whatwg.org/multipage/forms.html#autofill\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n * @see {@link AutocompleteValue}\n * @see {@link autoComplete}\n * @see {@link UserAgentAutocompleteProps.name}\n */\n autoCompleteValue?: AutocompleteValue;\n\n /**\n * @see {@link autoCompleteValue}\n * @defaultValue `autoCompleteValue`\n */\n autoComplete?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n\n /**\n * @see {@link autoCompleteValue}\n * @defaultValue `autoCompleteValue`\n */\n name?: string;\n}\n\nexport interface FormMessageClassNameOptions {\n className?: string;\n\n /**\n * Boolean if the message should gain the error state which changes the text\n * color to `red` by default.\n *\n * @defaultValue `false`\n */\n error?: boolean;\n\n /**\n * The current theme for the related text field. This is really only used to\n * match the current horizontal padding of the text field.\n *\n * @defaultValue `\"outline\"`\n */\n theme?: FormTheme;\n}\n\nexport interface FormMessageProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"minLength\" | \"maxLength\">,\n FormMessageClassNameOptions {\n /**\n * If this component is acting as a form-level error message handler, the role\n * should be updated to be `\"alert\"` for additional accessibility.\n *\n * Note: when creating a form-level error message handler, the messages should\n * no longer appear as the user types and instead once the user tries to\n * submit the form. Having an alert role disrupts normal screen reader\n * behavior by immediately reading changes in this element.\n *\n * @defaultValue `undefined`\n */\n role?: \"alert\";\n\n /**\n * Boolean if the children should no longer be wrapped in a `<p>` tag. This\n * should normally only be disabled if using a custom error message wrapper or\n * the counter behavior is not being used. To get correct alignments of the\n * message and counter, the `children` must be wrapped in some element and\n * cannot be plain test.\n *\n * Note: this will always be considered `true` if the `role` is set to\n * `\"alert\"`.\n *\n * @defaultValue `false`\n */\n disableWrap?: boolean;\n\n /**\n * An optional style to apply to the `<p>` tag that surrounds the `children`.\n * This will not be used if `role=\"alert\"` or `disableWrap={true}`.\n */\n messageStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the `<p>` tag that surrounds the\n * `children`. This will not be used if `role=\"alert\"` or\n * `disableWrap={true}`.\n */\n messageClassName?: string;\n}\n\n/**\n * Props that are used to automatically add a counter for the remaining letters\n * available for the text field. The counter will always be created to the right\n * of the optional message.\n *\n * The counter is really a simple string of: `${length} / ${maxLength}`.\n *\n * If you need additional customization, it is recommended to create your own\n * implementation such as:\n *\n * ```tsx\n * <FormMessage>\n * {errorMessage}\n * <MyCounter {...props} />\n * </FormMessage>\n * ```\n *\n * Note: this should not be used alongside form-level messages.\n *\n * @remarks \\@since 2.9.0 Renamed from `FormMessageCounterProps` to\n * `FormMessageInputLengthCounterProps` since a `FormMessageCounter` component\n * was added\n */\nexport interface FormMessageInputLengthCounterProps {\n /**\n * The current length of the value in the related text field.\n */\n length: number;\n\n /**\n * The max length allowed for the value in the related text field.\n */\n maxLength: number;\n\n /**\n * An optional style to apply to the counter wrapper element.\n */\n counterStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the counter wrapper element.\n */\n counterClassName?: string;\n}\n\nexport interface FormMessageWithCounterProps\n extends FormMessageProps,\n FormMessageInputLengthCounterProps {}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface FormMessageWithoutCounterProps extends FormMessageProps {\n length?: never;\n maxLength?: never;\n counterStyle?: never;\n counterClassName?: never;\n}\n\nexport interface FormMessageContainerExtension {\n /**\n * If the extension doesn't actually want to render the `FormMessage`\n * component, these props are optional. It kind of eliminates the whole\n * purpose of this component though.\n */\n messageProps?: PropsWithRef<\n FormMessageProps & Partial<FormMessageInputLengthCounterProps>,\n HTMLDivElement\n >;\n\n /**\n * Any props (and an optional ref) to provide to the `<div>` surrounding the\n * children and `FormMessage` component.\n *\n * Note: This will not be used if the `messageProps` are not provided since\n * only the `children` will be returned without the container.\n */\n messageContainerProps?: PropsWithRef<\n HTMLAttributes<HTMLDivElement>,\n HTMLDivElement\n >;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface LabelClassNameOptions {\n className?: string;\n\n /**\n * Set this to `true` to remove the `gap` style from the label.\n *\n * @see `$label-gap`\n * @defaultValue `false`\n */\n gap?: boolean;\n\n /**\n * Set this to `true` when the parent `TextFieldContainer` has the `dense`\n * spec enabled. This updates the floating styles to match the smaller height.\n *\n * @defaultValue `false`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to update the label's color to the error color.\n *\n * @see `$error-color`\n * @defaultValue `false`\n */\n error?: boolean;\n\n /**\n * Set this to `true` to update the label's color to the active color.\n *\n * @see `$active-color`\n * @defaultValue `false`\n */\n active?: boolean;\n\n /**\n * Set this to `true` if the label should gain `flex-direction: column`\n * styling.\n *\n * @defaultValue `false`\n */\n stacked?: boolean;\n\n /**\n * Set this to `true` to update the label's color to be the disabled color.\n *\n * @see `$disabled-color`\n * @defaultValue `false`\n */\n disabled?: boolean;\n\n /**\n * Set this to true when label can floating above an input, textarea, or\n * select inside of a `TextFieldContainer`.\n *\n * @defaultValue `false`\n */\n floating?: boolean;\n\n /**\n * Set this to true when label is currently floating above an input,\n * textarea, or selected inside of a `TextFieldContainer`.\n *\n * @see {@link active}\n * @defaultValue `active`\n */\n floatingActive?: boolean;\n\n /**\n * Set this to `true` to gain `flex-direction: row-reversed` styling. If the\n * {@link stacked} prop is also `true`, `flex-direction: column-reversed` will\n * be applied.\n *\n * @defaultValue `false`\n */\n reversed?: boolean;\n\n /**\n * @defaultValue `false`\n */\n inactive?: boolean;\n}\n\nexport interface LabelProps\n extends LabelHTMLAttributes<HTMLLabelElement>,\n LabelClassNameOptions {}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface ConfigurableTextFieldAddonProps\n extends HTMLAttributes<HTMLSpanElement> {\n /**\n * Boolean if the addon should be presentational only and prevent pointer\n * events.\n *\n * @defaultValue `false`\n */\n pointerEvents?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0 Added support for `leftAddonProps` and\n * `rightAddonProps`.\n */\nexport interface TextFieldContainerOptions\n extends FormThemeOptions,\n FormComponentStates {\n /**\n * Set this to `true` to enable the dense spec which reduces the height.\n *\n * @defaultValue `false`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to change the style from `display: flex` to\n * `display: inline-flex`.\n *\n * @defaultValue `false`\n */\n inline?: boolean;\n\n /**\n * Set this to `true` if this component should stretch to fill a flex or grid\n * container using `flex: 1 1 auto`.\n *\n * @defaultValue `false`\n */\n stretch?: boolean;\n\n /**\n * This should generally be an icon or a button that will be placed before the\n * `TextField` or `TextArea`.\n */\n leftAddon?: ReactNode;\n\n /**\n * Any additional props to pass to the `<span>` surrounding the {@link leftAddon}.\n *\n * @remarks \\@since 6.0.0\n */\n leftAddonProps?: PropsWithRef<\n ConfigurableTextFieldAddonProps,\n HTMLSpanElement\n >;\n\n /**\n * @see {@link TextFieldAddonProps.disabled}\n *\n * @defaultValue `false`\n */\n disableLeftAddonStyles?: boolean;\n\n /**\n * This should generally be an icon or a button that will be placed after the\n * `TextField` or `TextArea`.\n */\n rightAddon?: ReactNode;\n\n /**\n * Any additional props to pass to the `<span>` surrounding the {@link rightAddon}.\n *\n * @remarks \\@since 6.0.0\n */\n rightAddonProps?: PropsWithRef<\n ConfigurableTextFieldAddonProps,\n HTMLSpanElement\n >;\n\n /**\n * @see {@link TextFieldAddonProps.disabled}\n *\n * @defaultValue `false`\n */\n disableRightAddonStyles?: boolean;\n}\n\nexport interface FormFieldOptions\n extends TextFieldContainerOptions,\n FormMessageContainerExtension {\n /**\n * An optional floating label to use with the text field. A label is generally\n * recommended for accessibility, but can be omitted if an `aria-label` or\n * `aria-labelledby` is provided.\n */\n label?: ReactNode;\n\n /**\n * Any additional props and/or ref that should be passed to the `<label>`\n * element when a {@link label} is provided.\n *\n * @example\n * ```tsx\n * labelProps={{\n * ref: labelRef,\n * style: {},\n * className: \"some-custom-class-name\",\n * onClick: (event) => {\n * // do something\n * }\n * }}\n * ```\n */\n labelProps?: PropsWithRef<LabelProps, HTMLLabelElement>;\n\n /**\n * A convenience prop to apply a custom style to a label. This is equivalent\n * to:\n *\n * ```ts\n * labelProps={{\n * style: // some style here\n * }}\n * ```\n */\n labelStyle?: CSSProperties;\n\n /**\n * A convenience prop to apply a custom className to a label. This is\n * equivalent to:\n *\n * ```ts\n * labelProps={{\n * className: \"some-class-name\",\n * }}\n * ```\n */\n labelClassName?: string;\n}\n"],"names":[],"mappings":"AAihBA,WAmDC"}