@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
@@ -10,24 +10,24 @@ import { cssUtils } from "../cssUtils.js";
10
10
  * @example
11
11
  * Simple Example
12
12
  * ```ts
13
- * import { getTypographyClassName } from "@react-md/core";
13
+ * import { typography } from "@react-md/core";
14
14
  *
15
15
  * function Example() {
16
16
  * return (
17
17
  * <>
18
- * <h1 className={getTypographyClassName({ type: "headline-1" })} />
19
- * <h2 className={getTypographyClassName({ type: "headline-2" })} />
20
- * <h3 className={getTypographyClassName({ type: "headline-3" })} />
21
- * <h4 className={getTypographyClassName({ type: "headline-4" })} />
22
- * <h5 className={getTypographyClassName({ type: "headline-5" })} />
23
- * <h6 className={getTypographyClassName({ type: "headline-6" })} />
24
- * <h5 className={getTypographyClassName({ type: "subtitle-1" })} />
25
- * <h6 className={getTypographyClassName({ type: "subtitle-2" })} />
26
- * <p className={getTypographyClassName()} />
27
- * <p className={getTypographyClassName({ type "body-1" })} />
28
- * <p className={getTypographyClassName({ type "body-1" })} />
29
- * <caption className={getTypographyClassName({ type: "caption" })} />
30
- * <span className={getTypographyClassName({ type: "overline" })} />
18
+ * <h1 className={typography({ type: "headline-1" })} />
19
+ * <h2 className={typography({ type: "headline-2" })} />
20
+ * <h3 className={typography({ type: "headline-3" })} />
21
+ * <h4 className={typography({ type: "headline-4" })} />
22
+ * <h5 className={typography({ type: "headline-5" })} />
23
+ * <h6 className={typography({ type: "headline-6" })} />
24
+ * <h5 className={typography({ type: "subtitle-1" })} />
25
+ * <h6 className={typography({ type: "subtitle-2" })} />
26
+ * <p className={typography()} />
27
+ * <p className={typography({ type "body-1" })} />
28
+ * <p className={typography({ type "body-1" })} />
29
+ * <caption className={typography({ type: "caption" })} />
30
+ * <span className={typography({ type: "overline" })} />
31
31
  * </>
32
32
  * );
33
33
  * }
@@ -36,14 +36,14 @@ import { cssUtils } from "../cssUtils.js";
36
36
  * @example
37
37
  * Applying Additional Styles
38
38
  * ```ts
39
- * import { getTypography } from "@react-md/core";
39
+ * import { typography } from "@react-md/core";
40
40
  *
41
41
  * function Example() {
42
42
  * return (
43
43
  * <>
44
44
  * <h1
45
45
  * // only maintain the default margin-bottom
46
- * className={getTypographyClassName({
46
+ * className={typography({
47
47
  * type: "headline-1",
48
48
  * margin: "bottom",
49
49
  * })}
@@ -51,7 +51,7 @@ import { cssUtils } from "../cssUtils.js";
51
51
  *
52
52
  * <h2
53
53
  * // remove all default margin
54
- * className={getTypographyClassName({
54
+ * className={typography({
55
55
  * type: "headline-2",
56
56
  * margin: "none",
57
57
  * })}
@@ -59,7 +59,7 @@ import { cssUtils } from "../cssUtils.js";
59
59
  *
60
60
  * <h3
61
61
  * // only maintain the default margin-top
62
- * className={getTypographyClassName({
62
+ * className={typography({
63
63
  * type: "headline-3",
64
64
  * margin: "top",
65
65
  * })}
@@ -67,7 +67,7 @@ import { cssUtils } from "../cssUtils.js";
67
67
  *
68
68
  * <p
69
69
  * // center the text, set to bold, and only maintain default margin-bottom
70
- * className={getTypographyClassName({
70
+ * className={typography({
71
71
  * type "subtitle-1",
72
72
  * align: "center",
73
73
  * margin: "bottom",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/typography/Typography.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type ElementType,\n type HTMLAttributes,\n type ReactElement,\n} from \"react\";\nimport { cssUtils, type TextCssUtilsOptions } from \"../cssUtils.js\";\n\n/**\n * A union of all the material design provided typography styles. When used with\n * the Typography component, this will generate the correct typography className\n * to apply and determine what component to be rendered as if none was provided.\n *\n * @remarks \\@since 4.0.0\n */\nexport type TypographyType =\n | \"headline-1\"\n | \"headline-2\"\n | \"headline-3\"\n | \"headline-4\"\n | \"headline-5\"\n | \"headline-6\"\n | \"subtitle-1\"\n | \"subtitle-2\"\n | \"body-1\"\n | \"body-2\"\n | \"caption\"\n | \"overline\";\n\n/** @remarks \\@since 6.0.0 */\nexport interface TypographyClassNameOptions extends TextCssUtilsOptions {\n className?: string;\n\n /**\n * @see {@link TypographyType}\n * @defaultValue `\"body-1\"`\n */\n type?: TypographyType;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport type NullableTypographyClassNameOptions = Omit<\n TypographyClassNameOptions,\n \"type\"\n> & {\n /**\n * When using the {@link typography} class name utility, the `type` can be set\n * to `null` to inherit font.\n *\n * @see {@link TypographyType}\n * @defaultValue `\"body-1\"`\n */\n type?: TypographyType | null;\n};\n\n/**\n * Get a typography class name based on different typography options. This is\n * only useful if you are unable to use the {@link Typography} component for\n * some reason.\n *\n * @example\n * Simple Example\n * ```ts\n * import { getTypographyClassName } from \"@react-md/core\";\n *\n * function Example() {\n * return (\n * <>\n * <h1 className={getTypographyClassName({ type: \"headline-1\" })} />\n * <h2 className={getTypographyClassName({ type: \"headline-2\" })} />\n * <h3 className={getTypographyClassName({ type: \"headline-3\" })} />\n * <h4 className={getTypographyClassName({ type: \"headline-4\" })} />\n * <h5 className={getTypographyClassName({ type: \"headline-5\" })} />\n * <h6 className={getTypographyClassName({ type: \"headline-6\" })} />\n * <h5 className={getTypographyClassName({ type: \"subtitle-1\" })} />\n * <h6 className={getTypographyClassName({ type: \"subtitle-2\" })} />\n * <p className={getTypographyClassName()} />\n * <p className={getTypographyClassName({ type \"body-1\" })} />\n * <p className={getTypographyClassName({ type \"body-1\" })} />\n * <caption className={getTypographyClassName({ type: \"caption\" })} />\n * <span className={getTypographyClassName({ type: \"overline\" })} />\n * </>\n * );\n * }\n * ```\n *\n * @example\n * Applying Additional Styles\n * ```ts\n * import { getTypography } from \"@react-md/core\";\n *\n * function Example() {\n * return (\n * <>\n * <h1\n * // only maintain the default margin-bottom\n * className={getTypographyClassName({\n * type: \"headline-1\",\n * margin: \"bottom\",\n * })}\n * />\n *\n * <h2\n * // remove all default margin\n * className={getTypographyClassName({\n * type: \"headline-2\",\n * margin: \"none\",\n * })}\n * />\n *\n * <h3\n * // only maintain the default margin-top\n * className={getTypographyClassName({\n * type: \"headline-3\",\n * margin: \"top\",\n * })}\n * />\n *\n * <p\n * // center the text, set to bold, and only maintain default margin-bottom\n * className={getTypographyClassName({\n * type \"subtitle-1\",\n * align: \"center\",\n * margin: \"bottom\",\n * })}\n * />\n * </>\n * );\n * }\n * ```\n *\n * @see {@link Typography}\n * @param options - An optional object of options used to create the typography\n * class name.\n * @returns a typography class name string\n * @remarks \\@since 6.0.0\n */\nexport function typography(\n options: NullableTypographyClassNameOptions = {}\n): string {\n const { type = \"body-1\" } = options;\n\n // using `&&` instead of `bem` since the latest version of typescript does not\n // support setting the same object key (empty string)\n return cnb(\n \"rmd-typography\",\n type && `rmd-typography--${type}`,\n cssUtils(options)\n );\n}\n\n/**\n * A union of the default supported elements that the `Typography` component can\n * be rendered as. This is mostly used for adding the correct `HTMLAttributes`\n * and enabling the forward ref.\n *\n * @remarks \\@since 4.0.0\n */\nexport type TypographyHTMLElement =\n | HTMLHeadingElement\n | HTMLParagraphElement\n | HTMLSpanElement\n | HTMLDivElement\n | HTMLAnchorElement\n | HTMLBodyElement\n | HTMLHtmlElement;\n\n/** @remarks \\@since 6.0.0 */\nexport type CustomTypographyComponent = ElementType<\n HTMLAttributes<TypographyHTMLElement> & { className: string }\n>;\n\n/** @internal */\nfunction getComponent(\n as: CustomTypographyComponent | undefined,\n type: TypographyType\n): ElementType {\n if (as) {\n return as;\n }\n\n switch (type) {\n case \"headline-1\":\n return \"h1\";\n case \"headline-2\":\n return \"h2\";\n case \"headline-3\":\n return \"h3\";\n case \"headline-4\":\n return \"h4\";\n case \"headline-5\":\n return \"h5\";\n case \"headline-6\":\n case \"subtitle-1\":\n case \"subtitle-2\":\n return \"h6\";\n case \"body-1\":\n case \"body-2\":\n return \"p\";\n case \"caption\":\n return \"caption\";\n default:\n return \"span\";\n }\n}\n\nexport interface TypographyProps\n extends HTMLAttributes<TypographyHTMLElement>,\n TypographyClassNameOptions {\n /**\n * The component to render as when the children are not a render function. If\n * this prop is omitted, the component will be determined by the `type` prop\n * where:\n *\n * - `\"headline-1\" -> <h1>`\n * - `\"headline-2\" -> <h2>`\n * - `\"headline-3\" -> <h3>`\n * - `\"headline-4\" -> <h4>`\n * - `\"headline-5\" -> <h5>`\n * - `\"headline-6\" -> <h6>`\n * - `\"subtitle-1\" -> <h5>`\n * - `\"subtitle-2\" -> <h6>`\n * - `\"body-1\" -> <p>`\n * - `\"body-2\" -> <p>`\n * - `\"caption\" -> <caption>`\n * - `\"overline\" -> <span>`\n */\n as?: CustomTypographyComponent;\n}\n\n/**\n * **Server Component**\n *\n * Render text with one of the material design typography styles applied and\n * optional styles like font-weight, font-style, text color, etc.\n *\n * @example\n * All Example\n * ```tsx\n * import { Typography } from \"@react-md/core\":\n *\n * export function Example() {\n * return (\n * <>\n * <Typography type=\"headline-1\">Headline 1</Typography>\n * <Typography type=\"headline-2\">Headline 2</Typography>\n * <Typography type=\"headline-3\">Headline 3</Typography>\n * <Typography type=\"headline-4\">Headline 4</Typography>\n * <Typography type=\"headline-5\">Headline 5</Typography>\n * <Typography type=\"headline-6\">Headline 6</Typography>\n * <Typography type=\"subtitle-1\">Subtitle 1</Typography>\n * <Typography type=\"subtitle-2\">Subtitle 2</Typography>\n * <Typography>\n * A paragraph of text.\n * </Typography>\n * <Typography type=\"body-1\">\n * A paragraph of text.\n * </Typography>\n * <Typography type=\"body-2\">\n * Another paragraph of text.\n * </Typography>\n * <Typography type=\"caption\" component=\"h5\">\n * Caption text\n * </Typography>\n * <Typography type=\"overline\" component=\"h5\">\n * Overline text\n * </Typography>\n * </>\n * ):\n * }\n * ```\n */\nexport const Typography = forwardRef<TypographyHTMLElement, TypographyProps>(\n function Typography(props, ref): ReactElement {\n const {\n as,\n type = \"body-1\",\n className,\n margin,\n fontStyle,\n fontWeight,\n textAlign,\n textColor,\n textDecoration,\n textTransform,\n textOverflow,\n children,\n ...remaining\n } = props;\n\n const Component = getComponent(as, type);\n return (\n <Component\n {...remaining}\n ref={ref}\n className={typography({\n type,\n margin,\n fontStyle,\n fontWeight,\n textAlign,\n textColor,\n textDecoration,\n textTransform,\n textOverflow,\n className,\n })}\n >\n {children}\n </Component>\n );\n }\n);\n"],"names":["cnb","forwardRef","cssUtils","typography","options","type","getComponent","as","Typography","props","ref","className","margin","fontStyle","fontWeight","textAlign","textColor","textDecoration","textTransform","textOverflow","children","remaining","Component"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,QAIL,QAAQ;AACf,SAASC,QAAQ,QAAkC,iBAAiB;AAiDpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFC,GACD,OAAO,SAASC,WACdC,UAA8C,CAAC,CAAC;IAEhD,MAAM,EAAEC,OAAO,QAAQ,EAAE,GAAGD;IAE5B,8EAA8E;IAC9E,qDAAqD;IACrD,OAAOJ,IACL,kBACAK,QAAQ,CAAC,gBAAgB,EAAEA,KAAK,CAAC,EACjCH,SAASE;AAEb;AAuBA,cAAc,GACd,SAASE,aACPC,EAAyC,EACzCF,IAAoB;IAEpB,IAAIE,IAAI;QACN,OAAOA;IACT;IAEA,OAAQF;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE,OAAO;IACX;AACF;AA0BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCC,GACD,OAAO,MAAMG,2BAAaP,WACxB,SAASO,WAAWC,KAAK,EAAEC,GAAG;IAC5B,MAAM,EACJH,EAAE,EACFF,OAAO,QAAQ,EACfM,SAAS,EACTC,MAAM,EACNC,SAAS,EACTC,UAAU,EACVC,SAAS,EACTC,SAAS,EACTC,cAAc,EACdC,aAAa,EACbC,YAAY,EACZC,QAAQ,EACR,GAAGC,WACJ,GAAGZ;IAEJ,MAAMa,YAAYhB,aAAaC,IAAIF;IACnC,qBACE,KAACiB;QACE,GAAGD,SAAS;QACbX,KAAKA;QACLC,WAAWR,WAAW;YACpBE;YACAO;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAR;QACF;kBAECS;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/typography/Typography.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type ElementType,\n type HTMLAttributes,\n type ReactElement,\n} from \"react\";\nimport { cssUtils, type TextCssUtilsOptions } from \"../cssUtils.js\";\n\n/**\n * A union of all the material design provided typography styles. When used with\n * the Typography component, this will generate the correct typography className\n * to apply and determine what component to be rendered as if none was provided.\n *\n * @remarks \\@since 4.0.0\n */\nexport type TypographyType =\n | \"headline-1\"\n | \"headline-2\"\n | \"headline-3\"\n | \"headline-4\"\n | \"headline-5\"\n | \"headline-6\"\n | \"subtitle-1\"\n | \"subtitle-2\"\n | \"body-1\"\n | \"body-2\"\n | \"caption\"\n | \"overline\";\n\n/** @remarks \\@since 6.0.0 */\nexport interface TypographyClassNameOptions extends TextCssUtilsOptions {\n className?: string;\n\n /**\n * @see {@link TypographyType}\n * @defaultValue `\"body-1\"`\n */\n type?: TypographyType;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport type NullableTypographyClassNameOptions = Omit<\n TypographyClassNameOptions,\n \"type\"\n> & {\n /**\n * When using the {@link typography} class name utility, the `type` can be set\n * to `null` to inherit font.\n *\n * @see {@link TypographyType}\n * @defaultValue `\"body-1\"`\n */\n type?: TypographyType | null;\n};\n\n/**\n * Get a typography class name based on different typography options. This is\n * only useful if you are unable to use the {@link Typography} component for\n * some reason.\n *\n * @example\n * Simple Example\n * ```ts\n * import { typography } from \"@react-md/core\";\n *\n * function Example() {\n * return (\n * <>\n * <h1 className={typography({ type: \"headline-1\" })} />\n * <h2 className={typography({ type: \"headline-2\" })} />\n * <h3 className={typography({ type: \"headline-3\" })} />\n * <h4 className={typography({ type: \"headline-4\" })} />\n * <h5 className={typography({ type: \"headline-5\" })} />\n * <h6 className={typography({ type: \"headline-6\" })} />\n * <h5 className={typography({ type: \"subtitle-1\" })} />\n * <h6 className={typography({ type: \"subtitle-2\" })} />\n * <p className={typography()} />\n * <p className={typography({ type \"body-1\" })} />\n * <p className={typography({ type \"body-1\" })} />\n * <caption className={typography({ type: \"caption\" })} />\n * <span className={typography({ type: \"overline\" })} />\n * </>\n * );\n * }\n * ```\n *\n * @example\n * Applying Additional Styles\n * ```ts\n * import { typography } from \"@react-md/core\";\n *\n * function Example() {\n * return (\n * <>\n * <h1\n * // only maintain the default margin-bottom\n * className={typography({\n * type: \"headline-1\",\n * margin: \"bottom\",\n * })}\n * />\n *\n * <h2\n * // remove all default margin\n * className={typography({\n * type: \"headline-2\",\n * margin: \"none\",\n * })}\n * />\n *\n * <h3\n * // only maintain the default margin-top\n * className={typography({\n * type: \"headline-3\",\n * margin: \"top\",\n * })}\n * />\n *\n * <p\n * // center the text, set to bold, and only maintain default margin-bottom\n * className={typography({\n * type \"subtitle-1\",\n * align: \"center\",\n * margin: \"bottom\",\n * })}\n * />\n * </>\n * );\n * }\n * ```\n *\n * @see {@link Typography}\n * @param options - An optional object of options used to create the typography\n * class name.\n * @returns a typography class name string\n * @remarks \\@since 6.0.0\n */\nexport function typography(\n options: NullableTypographyClassNameOptions = {}\n): string {\n const { type = \"body-1\" } = options;\n\n // using `&&` instead of `bem` since the latest version of typescript does not\n // support setting the same object key (empty string)\n return cnb(\n \"rmd-typography\",\n type && `rmd-typography--${type}`,\n cssUtils(options)\n );\n}\n\n/**\n * A union of the default supported elements that the `Typography` component can\n * be rendered as. This is mostly used for adding the correct `HTMLAttributes`\n * and enabling the forward ref.\n *\n * @remarks \\@since 4.0.0\n */\nexport type TypographyHTMLElement =\n | HTMLHeadingElement\n | HTMLParagraphElement\n | HTMLSpanElement\n | HTMLDivElement\n | HTMLAnchorElement\n | HTMLBodyElement\n | HTMLHtmlElement;\n\n/** @remarks \\@since 6.0.0 */\nexport type CustomTypographyComponent = ElementType<\n HTMLAttributes<TypographyHTMLElement> & { className: string }\n>;\n\n/** @internal */\nfunction getComponent(\n as: CustomTypographyComponent | undefined,\n type: TypographyType\n): ElementType {\n if (as) {\n return as;\n }\n\n switch (type) {\n case \"headline-1\":\n return \"h1\";\n case \"headline-2\":\n return \"h2\";\n case \"headline-3\":\n return \"h3\";\n case \"headline-4\":\n return \"h4\";\n case \"headline-5\":\n return \"h5\";\n case \"headline-6\":\n case \"subtitle-1\":\n case \"subtitle-2\":\n return \"h6\";\n case \"body-1\":\n case \"body-2\":\n return \"p\";\n case \"caption\":\n return \"caption\";\n default:\n return \"span\";\n }\n}\n\nexport interface TypographyProps\n extends HTMLAttributes<TypographyHTMLElement>,\n TypographyClassNameOptions {\n /**\n * The component to render as when the children are not a render function. If\n * this prop is omitted, the component will be determined by the `type` prop\n * where:\n *\n * - `\"headline-1\" -> <h1>`\n * - `\"headline-2\" -> <h2>`\n * - `\"headline-3\" -> <h3>`\n * - `\"headline-4\" -> <h4>`\n * - `\"headline-5\" -> <h5>`\n * - `\"headline-6\" -> <h6>`\n * - `\"subtitle-1\" -> <h5>`\n * - `\"subtitle-2\" -> <h6>`\n * - `\"body-1\" -> <p>`\n * - `\"body-2\" -> <p>`\n * - `\"caption\" -> <caption>`\n * - `\"overline\" -> <span>`\n */\n as?: CustomTypographyComponent;\n}\n\n/**\n * **Server Component**\n *\n * Render text with one of the material design typography styles applied and\n * optional styles like font-weight, font-style, text color, etc.\n *\n * @example\n * All Example\n * ```tsx\n * import { Typography } from \"@react-md/core\":\n *\n * export function Example() {\n * return (\n * <>\n * <Typography type=\"headline-1\">Headline 1</Typography>\n * <Typography type=\"headline-2\">Headline 2</Typography>\n * <Typography type=\"headline-3\">Headline 3</Typography>\n * <Typography type=\"headline-4\">Headline 4</Typography>\n * <Typography type=\"headline-5\">Headline 5</Typography>\n * <Typography type=\"headline-6\">Headline 6</Typography>\n * <Typography type=\"subtitle-1\">Subtitle 1</Typography>\n * <Typography type=\"subtitle-2\">Subtitle 2</Typography>\n * <Typography>\n * A paragraph of text.\n * </Typography>\n * <Typography type=\"body-1\">\n * A paragraph of text.\n * </Typography>\n * <Typography type=\"body-2\">\n * Another paragraph of text.\n * </Typography>\n * <Typography type=\"caption\" component=\"h5\">\n * Caption text\n * </Typography>\n * <Typography type=\"overline\" component=\"h5\">\n * Overline text\n * </Typography>\n * </>\n * ):\n * }\n * ```\n */\nexport const Typography = forwardRef<TypographyHTMLElement, TypographyProps>(\n function Typography(props, ref): ReactElement {\n const {\n as,\n type = \"body-1\",\n className,\n margin,\n fontStyle,\n fontWeight,\n textAlign,\n textColor,\n textDecoration,\n textTransform,\n textOverflow,\n children,\n ...remaining\n } = props;\n\n const Component = getComponent(as, type);\n return (\n <Component\n {...remaining}\n ref={ref}\n className={typography({\n type,\n margin,\n fontStyle,\n fontWeight,\n textAlign,\n textColor,\n textDecoration,\n textTransform,\n textOverflow,\n className,\n })}\n >\n {children}\n </Component>\n );\n }\n);\n"],"names":["cnb","forwardRef","cssUtils","typography","options","type","getComponent","as","Typography","props","ref","className","margin","fontStyle","fontWeight","textAlign","textColor","textDecoration","textTransform","textOverflow","children","remaining","Component"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,QAIL,QAAQ;AACf,SAASC,QAAQ,QAAkC,iBAAiB;AAiDpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFC,GACD,OAAO,SAASC,WACdC,UAA8C,CAAC,CAAC;IAEhD,MAAM,EAAEC,OAAO,QAAQ,EAAE,GAAGD;IAE5B,8EAA8E;IAC9E,qDAAqD;IACrD,OAAOJ,IACL,kBACAK,QAAQ,CAAC,gBAAgB,EAAEA,KAAK,CAAC,EACjCH,SAASE;AAEb;AAuBA,cAAc,GACd,SAASE,aACPC,EAAyC,EACzCF,IAAoB;IAEpB,IAAIE,IAAI;QACN,OAAOA;IACT;IAEA,OAAQF;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE,OAAO;IACX;AACF;AA0BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCC,GACD,OAAO,MAAMG,2BAAaP,WACxB,SAASO,WAAWC,KAAK,EAAEC,GAAG;IAC5B,MAAM,EACJH,EAAE,EACFF,OAAO,QAAQ,EACfM,SAAS,EACTC,MAAM,EACNC,SAAS,EACTC,UAAU,EACVC,SAAS,EACTC,SAAS,EACTC,cAAc,EACdC,aAAa,EACbC,YAAY,EACZC,QAAQ,EACR,GAAGC,WACJ,GAAGZ;IAEJ,MAAMa,YAAYhB,aAAaC,IAAIF;IACnC,qBACE,KAACiB;QACE,GAAGD,SAAS;QACbX,KAAKA;QACLC,WAAWR,WAAW;YACpBE;YACAO;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAR;QACF;kBAECS;;AAGP,GACA"}
@@ -4,6 +4,18 @@
4
4
  @use "../utils";
5
5
 
6
6
  $disable-text-container: false !default;
7
+ $disable-headline-1: false !default;
8
+ $disable-headline-2: false !default;
9
+ $disable-headline-3: false !default;
10
+ $disable-headline-4: false !default;
11
+ $disable-headline-5: false !default;
12
+ $disable-headline-6: false !default;
13
+ $disable-subtitle-1: false !default;
14
+ $disable-subtitle-2: false !default;
15
+ $disable-body-1: false !default;
16
+ $disable-body-2: false !default;
17
+ $disable-caption: false !default;
18
+ $disable-overline: false !default;
7
19
 
8
20
  /// A small utility function to get the letter spacing based on tracking and
9
21
  /// font-size
@@ -216,9 +228,13 @@ $button-recommended-styles: map.merge(
216
228
  $base-font-styles,
217
229
  (
218
230
  font-size: 0.875rem,
219
- line-height: 2.25rem,
220
231
  font-weight: map.get($font-weights, medium),
221
232
  letter-spacing: get-letter-spacing(1.25, 0.875),
233
+ line-height: 2.25rem,
234
+ // buttons with multiple lines of text look terrible because of the large
235
+ // line-height. You normally want to use a different component if the
236
+ // clickable area has so much content to line-wrap
237
+ line-wrap: nowrap,
222
238
  )
223
239
  );
224
240
  $button-custom-styles: () !default;
@@ -276,52 +292,76 @@ $typography-variables: (line-length, text-container-padding);
276
292
  .rmd-typography {
277
293
  @include utils.map-to-styles($base-font-styles);
278
294
 
279
- &--headline-1 {
280
- @include utils.map-to-styles($headline-1-styles);
295
+ @if not $disable-headline-1 {
296
+ &--headline-1 {
297
+ @include utils.map-to-styles($headline-1-styles);
298
+ }
281
299
  }
282
300
 
283
- &--headline-2 {
284
- @include utils.map-to-styles($headline-2-styles);
301
+ @if not $disable-headline-2 {
302
+ &--headline-2 {
303
+ @include utils.map-to-styles($headline-2-styles);
304
+ }
285
305
  }
286
306
 
287
- &--headline-3 {
288
- @include utils.map-to-styles($headline-3-styles);
307
+ @if not $disable-headline-3 {
308
+ &--headline-3 {
309
+ @include utils.map-to-styles($headline-3-styles);
310
+ }
289
311
  }
290
312
 
291
- &--headline-4 {
292
- @include utils.map-to-styles($headline-4-styles);
313
+ @if not $disable-headline-4 {
314
+ &--headline-4 {
315
+ @include utils.map-to-styles($headline-4-styles);
316
+ }
293
317
  }
294
318
 
295
- &--headline-5 {
296
- @include utils.map-to-styles($headline-5-styles);
319
+ @if not $disable-headline-5 {
320
+ &--headline-5 {
321
+ @include utils.map-to-styles($headline-5-styles);
322
+ }
297
323
  }
298
324
 
299
- &--headline-6 {
300
- @include utils.map-to-styles($headline-6-styles);
325
+ @if not $disable-headline-6 {
326
+ &--headline-6 {
327
+ @include utils.map-to-styles($headline-6-styles);
328
+ }
301
329
  }
302
330
 
303
- &--subtitle-1 {
304
- @include utils.map-to-styles($subtitle-1-styles);
331
+ @if not $disable-subtitle-1 {
332
+ &--subtitle-1 {
333
+ @include utils.map-to-styles($subtitle-1-styles);
334
+ }
305
335
  }
306
336
 
307
- &--subtitle-2 {
308
- @include utils.map-to-styles($subtitle-2-styles);
337
+ @if not $disable-subtitle-2 {
338
+ &--subtitle-2 {
339
+ @include utils.map-to-styles($subtitle-2-styles);
340
+ }
309
341
  }
310
342
 
311
- &--body-1 {
312
- @include utils.map-to-styles($body-1-styles);
343
+ @if not $disable-body-1 {
344
+ &--body-1 {
345
+ @include utils.map-to-styles($body-1-styles);
346
+ }
313
347
  }
314
348
 
315
- &--body-2 {
316
- @include utils.map-to-styles($body-2-styles);
349
+ @if not $disable-body-2 {
350
+ &--body-2 {
351
+ @include utils.map-to-styles($body-2-styles);
352
+ }
317
353
  }
318
354
 
319
- &--caption {
320
- @include utils.map-to-styles($caption-styles);
355
+ @if not $disable-caption {
356
+ &--caption {
357
+ @include utils.map-to-styles($caption-styles);
358
+ }
321
359
  }
322
360
 
323
- &--overline {
324
- @include utils.map-to-styles($overline-styles);
361
+ @if not $disable-overline {
362
+ &--overline {
363
+ @include utils.map-to-styles($overline-styles);
364
+ }
325
365
  }
326
366
  }
327
367
  }
@@ -4,7 +4,7 @@ import type { UseStateInitializer, UseStateSetter } from "./types.js";
4
4
  * @internal
5
5
  * @remarks \@since 6.0.0
6
6
  */
7
- export interface EnsuredStateOptions<V, Setter extends Dispatch<V> | UseStateSetter<V>> {
7
+ export interface EnsuredStateOptions<V, Setter extends Dispatch<V> | UseStateSetter<V> = UseStateSetter<V>> {
8
8
  value?: V;
9
9
  setValue?: Setter;
10
10
  defaultValue?: UseStateInitializer<V>;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/useEnsuredState.ts"],"sourcesContent":["/* eslint-disable react-hooks/rules-of-hooks */\nimport type { Dispatch } from \"react\";\nimport { useState } from \"react\";\nimport type { UseStateInitializer, UseStateSetter } from \"./types.js\";\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport interface EnsuredStateOptions<\n V,\n Setter extends Dispatch<V> | UseStateSetter<V>,\n> {\n value?: V;\n setValue?: Setter;\n defaultValue?: UseStateInitializer<V>;\n}\n\n/**\n * This is used to dynamically allow controlling hooks by providing a `value` +\n * `setValue` or defaulting to uncontrolled behavior with local state.\n *\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport function useEnsuredState<\n V,\n Setter extends Dispatch<V> | UseStateSetter<V>,\n>(\n options: EnsuredStateOptions<V, Setter>\n): readonly [value: V, setValue: Setter] {\n const { value, setValue, defaultValue } = options;\n if (typeof value !== \"undefined\" && typeof setValue !== \"undefined\") {\n return [value, setValue];\n }\n\n if (typeof value !== \"undefined\" || typeof setValue !== \"undefined\") {\n throw new Error(\n \"Both a `value` and `setValue` must be defined for controlled components.\"\n );\n }\n\n if (typeof defaultValue === \"undefined\") {\n throw new Error(\n \"A `defaultValue` must be defined for uncontrolled components.\"\n );\n }\n\n return useState(defaultValue) as [value: V, setValue: Setter];\n}\n"],"names":["useState","useEnsuredState","options","value","setValue","defaultValue","Error"],"mappings":"AAAA,6CAA6C,GAE7C,SAASA,QAAQ,QAAQ,QAAQ;AAgBjC;;;;;;CAMC,GACD,OAAO,SAASC,gBAIdC,OAAuC;IAEvC,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,YAAY,EAAE,GAAGH;IAC1C,IAAI,OAAOC,UAAU,eAAe,OAAOC,aAAa,aAAa;QACnE,OAAO;YAACD;YAAOC;SAAS;IAC1B;IAEA,IAAI,OAAOD,UAAU,eAAe,OAAOC,aAAa,aAAa;QACnE,MAAM,IAAIE,MACR;IAEJ;IAEA,IAAI,OAAOD,iBAAiB,aAAa;QACvC,MAAM,IAAIC,MACR;IAEJ;IAEA,OAAON,SAASK;AAClB"}
1
+ {"version":3,"sources":["../src/useEnsuredState.ts"],"sourcesContent":["/* eslint-disable react-hooks/rules-of-hooks */\nimport type { Dispatch } from \"react\";\nimport { useState } from \"react\";\nimport type { UseStateInitializer, UseStateSetter } from \"./types.js\";\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport interface EnsuredStateOptions<\n V,\n Setter extends Dispatch<V> | UseStateSetter<V> = UseStateSetter<V>,\n> {\n value?: V;\n setValue?: Setter;\n defaultValue?: UseStateInitializer<V>;\n}\n\n/**\n * This is used to dynamically allow controlling hooks by providing a `value` +\n * `setValue` or defaulting to uncontrolled behavior with local state.\n *\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport function useEnsuredState<\n V,\n Setter extends Dispatch<V> | UseStateSetter<V>,\n>(\n options: EnsuredStateOptions<V, Setter>\n): readonly [value: V, setValue: Setter] {\n const { value, setValue, defaultValue } = options;\n if (typeof value !== \"undefined\" && typeof setValue !== \"undefined\") {\n return [value, setValue];\n }\n\n if (typeof value !== \"undefined\" || typeof setValue !== \"undefined\") {\n throw new Error(\n \"Both a `value` and `setValue` must be defined for controlled components.\"\n );\n }\n\n if (typeof defaultValue === \"undefined\") {\n throw new Error(\n \"A `defaultValue` must be defined for uncontrolled components.\"\n );\n }\n\n return useState(defaultValue) as [value: V, setValue: Setter];\n}\n"],"names":["useState","useEnsuredState","options","value","setValue","defaultValue","Error"],"mappings":"AAAA,6CAA6C,GAE7C,SAASA,QAAQ,QAAQ,QAAQ;AAgBjC;;;;;;CAMC,GACD,OAAO,SAASC,gBAIdC,OAAuC;IAEvC,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,YAAY,EAAE,GAAGH;IAC1C,IAAI,OAAOC,UAAU,eAAe,OAAOC,aAAa,aAAa;QACnE,OAAO;YAACD;YAAOC;SAAS;IAC1B;IAEA,IAAI,OAAOD,UAAU,eAAe,OAAOC,aAAa,aAAa;QACnE,MAAM,IAAIE,MACR;IAEJ;IAEA,IAAI,OAAOD,iBAAiB,aAAa;QACvC,MAAM,IAAIC,MACR;IAEJ;IAEA,OAAON,SAASK;AAClB"}
@@ -1,4 +1,4 @@
1
- import type { TextExtractor } from "../types.js";
1
+ import { type TextExtractor } from "../types.js";
2
2
  /**
3
3
  * The default `Intl.Collator` that should be used for sorting large lists.
4
4
  *
@@ -1,12 +1,4 @@
1
- const identity = (item)=>{
2
- if (typeof item === "string") {
3
- return item;
4
- }
5
- if (process.env.NODE_ENV !== "production") {
6
- throw new Error("A `TextExtractor` must be provided to `alphaNumericSort` for lists that do not contain strings");
7
- }
8
- return "";
9
- };
1
+ import { defaultExtractor } from "../searching/utils.js";
10
2
  /**
11
3
  * The default `Intl.Collator` that should be used for sorting large lists.
12
4
  *
@@ -17,7 +9,7 @@ const identity = (item)=>{
17
9
  caseFirst: "upper"
18
10
  });
19
11
  export function alphaNumericSort(list, options = {}) {
20
- const { compare = DEFAULT_COLLATOR.compare, extractor = identity, descending = false } = options;
12
+ const { compare = DEFAULT_COLLATOR.compare, extractor = defaultExtractor("alphaNumericSort"), descending = false } = options;
21
13
  const sorted = list.slice();
22
14
  sorted.sort((a, b)=>{
23
15
  const aValue = extractor(a);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/alphaNumericSort.ts"],"sourcesContent":["import type { TextExtractor } from \"../types.js\";\n\nconst identity = <T>(item: T): string => {\n if (typeof item === \"string\") {\n return item;\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n throw new Error(\n \"A `TextExtractor` must be provided to `alphaNumericSort` for lists that do not contain strings\"\n );\n }\n\n return \"\";\n};\n\n/**\n * The default `Intl.Collator` that should be used for sorting large lists.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare#performance\n * @remarks \\@since 6.0.0\n */\nexport const DEFAULT_COLLATOR = new Intl.Collator(\"en-US\", {\n numeric: true,\n caseFirst: \"upper\",\n});\n\n/** @remarks \\@since 6.0.0 */\nexport interface AlphaNumericSortOptions<T> {\n /**\n * The extractor is only required when the list of items are not strings.\n *\n * @example\n * Simple Example\n * ```ts\n * interface Item {\n * name: string;\n * }\n *\n * const items: Item[] = [{ name: 'Hello' }, { name: 'World' }];\n *\n * `alphaNumericSort(items, {\n * extractor: item => item.name,\n * })`\n * ```\n *\n * @remarks\n * For javascript developers, this will throw an error in dev mode if an\n * extractor is not provided for non-string lists.\n *\n * @defaultValue `typeof item === \"string\" ? item : \"\"`\n */\n extractor?: TextExtractor<T>;\n\n /**\n * A custom compare function for sorting the list. This should really only be\n * provided if the language for your app is not `\"en-US\"` or you'd like to\n * provide some custom sorting options.\n *\n * @example\n * Custom Compare using Intl.Collator\n * ```ts\n * const collator = new Intl.Collator(\"en-US\", {\n * numeric: false,\n * caseFirst: \"lower\",\n * usage: \"search\",\n * });\n *\n * alphaNumericSort(items, {\n * compare: collator.compare,\n * })\n * ```\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator\n * @defaultValue `new Intl.Collator(\"en-US\", { numeric: true, caseFirst: \"upper\" }).compare`\n */\n compare?(a: string, b: string): number;\n\n /**\n * Setting this to `true` will return the list in descending order instead of\n * ascending.\n *\n * @defaultValue `false`\n */\n descending?: boolean;\n}\n\n/**\n * @example\n * Simple Example\n * ```ts\n * const items = [\"World\", \"Hello\"];\n *\n * const sorted = alphaNumericSort(items);\n * // sorted == [\"Hello\", \"World\"]\n * ```\n *\n * @param list - The list of strings to sort\n * @returns a new sorted list\n */\nexport function alphaNumericSort<T extends string>(\n list: readonly T[],\n options?: Omit<AlphaNumericSortOptions<T>, \"extractor\">\n): readonly T[];\n/**\n * @example\n * Simple Example\n * ```ts\n * interface Item {\n * name: string;\n * }\n *\n * const items: Item[] = [{ name: \"World\" }, { name: \"Hello\" }];\n *\n * const sorted = alphaNumericSort(items, {\n * extractor: item => item.name,\n * });\n * // sorted == [{ name: \"Hello\" }, { name: \"World\" }]\n * ```\n *\n * @param list - The list of items to sort\n * @returns a new sorted list\n */\nexport function alphaNumericSort<T>(\n list: readonly T[],\n options: AlphaNumericSortOptions<T> & { extractor: TextExtractor<T> }\n): readonly T[];\nexport function alphaNumericSort<T>(\n list: readonly T[],\n options: AlphaNumericSortOptions<T> = {}\n): readonly T[] {\n const {\n compare = DEFAULT_COLLATOR.compare,\n extractor = identity,\n descending = false,\n } = options;\n\n const sorted = list.slice();\n sorted.sort((a, b) => {\n const aValue = extractor(a);\n const bValue = extractor(b);\n\n const value1 = descending ? bValue : aValue;\n const value2 = descending ? aValue : bValue;\n\n return compare(value1, value2);\n });\n\n return sorted;\n}\n"],"names":["identity","item","process","env","NODE_ENV","Error","DEFAULT_COLLATOR","Intl","Collator","numeric","caseFirst","alphaNumericSort","list","options","compare","extractor","descending","sorted","slice","sort","a","b","aValue","bValue","value1","value2"],"mappings":"AAEA,MAAMA,WAAW,CAAIC;IACnB,IAAI,OAAOA,SAAS,UAAU;QAC5B,OAAOA;IACT;IAEA,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,MAAM,IAAIC,MACR;IAEJ;IAEA,OAAO;AACT;AAEA;;;;;CAKC,GACD,OAAO,MAAMC,mBAAmB,IAAIC,KAAKC,QAAQ,CAAC,SAAS;IACzDC,SAAS;IACTC,WAAW;AACb,GAAG;AAsGH,OAAO,SAASC,iBACdC,IAAkB,EAClBC,UAAsC,CAAC,CAAC;IAExC,MAAM,EACJC,UAAUR,iBAAiBQ,OAAO,EAClCC,YAAYf,QAAQ,EACpBgB,aAAa,KAAK,EACnB,GAAGH;IAEJ,MAAMI,SAASL,KAAKM,KAAK;IACzBD,OAAOE,IAAI,CAAC,CAACC,GAAGC;QACd,MAAMC,SAASP,UAAUK;QACzB,MAAMG,SAASR,UAAUM;QAEzB,MAAMG,SAASR,aAAaO,SAASD;QACrC,MAAMG,SAAST,aAAaM,SAASC;QAErC,OAAOT,QAAQU,QAAQC;IACzB;IAEA,OAAOR;AACT"}
1
+ {"version":3,"sources":["../../src/utils/alphaNumericSort.ts"],"sourcesContent":["import { defaultExtractor } from \"../searching/utils.js\";\nimport { type TextExtractor } from \"../types.js\";\n\n/**\n * The default `Intl.Collator` that should be used for sorting large lists.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare#performance\n * @remarks \\@since 6.0.0\n */\nexport const DEFAULT_COLLATOR = new Intl.Collator(\"en-US\", {\n numeric: true,\n caseFirst: \"upper\",\n});\n\n/** @remarks \\@since 6.0.0 */\nexport interface AlphaNumericSortOptions<T> {\n /**\n * The extractor is only required when the list of items are not strings.\n *\n * @example\n * Simple Example\n * ```ts\n * interface Item {\n * name: string;\n * }\n *\n * const items: Item[] = [{ name: 'Hello' }, { name: 'World' }];\n *\n * `alphaNumericSort(items, {\n * extractor: item => item.name,\n * })`\n * ```\n *\n * @remarks\n * For javascript developers, this will throw an error in dev mode if an\n * extractor is not provided for non-string lists.\n *\n * @defaultValue `typeof item === \"string\" ? item : \"\"`\n */\n extractor?: TextExtractor<T>;\n\n /**\n * A custom compare function for sorting the list. This should really only be\n * provided if the language for your app is not `\"en-US\"` or you'd like to\n * provide some custom sorting options.\n *\n * @example\n * Custom Compare using Intl.Collator\n * ```ts\n * const collator = new Intl.Collator(\"en-US\", {\n * numeric: false,\n * caseFirst: \"lower\",\n * usage: \"search\",\n * });\n *\n * alphaNumericSort(items, {\n * compare: collator.compare,\n * })\n * ```\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator\n * @defaultValue `new Intl.Collator(\"en-US\", { numeric: true, caseFirst: \"upper\" }).compare`\n */\n compare?(a: string, b: string): number;\n\n /**\n * Setting this to `true` will return the list in descending order instead of\n * ascending.\n *\n * @defaultValue `false`\n */\n descending?: boolean;\n}\n\n/**\n * @example\n * Simple Example\n * ```ts\n * const items = [\"World\", \"Hello\"];\n *\n * const sorted = alphaNumericSort(items);\n * // sorted == [\"Hello\", \"World\"]\n * ```\n *\n * @param list - The list of strings to sort\n * @returns a new sorted list\n */\nexport function alphaNumericSort<T extends string>(\n list: readonly T[],\n options?: Omit<AlphaNumericSortOptions<T>, \"extractor\">\n): readonly T[];\n/**\n * @example\n * Simple Example\n * ```ts\n * interface Item {\n * name: string;\n * }\n *\n * const items: Item[] = [{ name: \"World\" }, { name: \"Hello\" }];\n *\n * const sorted = alphaNumericSort(items, {\n * extractor: item => item.name,\n * });\n * // sorted == [{ name: \"Hello\" }, { name: \"World\" }]\n * ```\n *\n * @param list - The list of items to sort\n * @returns a new sorted list\n */\nexport function alphaNumericSort<T>(\n list: readonly T[],\n options: AlphaNumericSortOptions<T> & { extractor: TextExtractor<T> }\n): readonly T[];\nexport function alphaNumericSort<T>(\n list: readonly T[],\n options: AlphaNumericSortOptions<T> = {}\n): readonly T[] {\n const {\n compare = DEFAULT_COLLATOR.compare,\n extractor = defaultExtractor(\"alphaNumericSort\"),\n descending = false,\n } = options;\n\n const sorted = list.slice();\n sorted.sort((a, b) => {\n const aValue = extractor(a);\n const bValue = extractor(b);\n\n const value1 = descending ? bValue : aValue;\n const value2 = descending ? aValue : bValue;\n\n return compare(value1, value2);\n });\n\n return sorted;\n}\n"],"names":["defaultExtractor","DEFAULT_COLLATOR","Intl","Collator","numeric","caseFirst","alphaNumericSort","list","options","compare","extractor","descending","sorted","slice","sort","a","b","aValue","bValue","value1","value2"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,wBAAwB;AAGzD;;;;;CAKC,GACD,OAAO,MAAMC,mBAAmB,IAAIC,KAAKC,QAAQ,CAAC,SAAS;IACzDC,SAAS;IACTC,WAAW;AACb,GAAG;AAsGH,OAAO,SAASC,iBACdC,IAAkB,EAClBC,UAAsC,CAAC,CAAC;IAExC,MAAM,EACJC,UAAUR,iBAAiBQ,OAAO,EAClCC,YAAYV,iBAAiB,mBAAmB,EAChDW,aAAa,KAAK,EACnB,GAAGH;IAEJ,MAAMI,SAASL,KAAKM,KAAK;IACzBD,OAAOE,IAAI,CAAC,CAACC,GAAGC;QACd,MAAMC,SAASP,UAAUK;QACzB,MAAMG,SAASR,UAAUM;QAEzB,MAAMG,SAASR,aAAaO,SAASD;QACrC,MAAMG,SAAST,aAAaM,SAASC;QAErC,OAAOT,QAAQU,QAAQC;IACzB;IAEA,OAAOR;AACT"}
package/jest.config.ts CHANGED
@@ -56,6 +56,10 @@ const config: Config = {
56
56
  // able to remove this one I start testing the documentation site
57
57
  "!<rootDir>/src/**/index.ts",
58
58
  "!<rootDir>/src/**/types.ts",
59
+ // it's hard to verify these since they probably only occur when trying to
60
+ // use react-dom/server in jsdom?
61
+ "!<rootDir>/src/test-utils/polyfills/TextEncoder.ts",
62
+ "!<rootDir>/src/test-utils/polyfills/TextDecoder.ts",
59
63
  ],
60
64
 
61
65
  extensionsToTreatAsEsm: [".ts", ".tsx"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-md/core",
3
- "version": "1.0.0-next.7",
3
+ "version": "1.0.0-next.9",
4
4
  "description": "The core components and functionality for react-md.",
5
5
  "type": "module",
6
6
  "sass": "./dist/_core.scss",
@@ -55,23 +55,23 @@
55
55
  "license": "MIT",
56
56
  "dependencies": {
57
57
  "cnbuilder": "^3.1.0",
58
- "nanoid": "^5.0.4"
58
+ "nanoid": "^5.0.6"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@jest/globals": "^29.7.0",
62
62
  "@jest/types": "^29.6.3",
63
- "@swc/cli": "^0.1.63",
64
- "@swc/core": "1.3.105",
65
- "@swc/jest": "^0.2.31",
63
+ "@swc/cli": "^0.3.10",
64
+ "@swc/core": "1.4.2",
65
+ "@swc/jest": "^0.2.36",
66
66
  "@testing-library/dom": "^9.3.4",
67
- "@testing-library/jest-dom": "^6.3.0",
68
- "@testing-library/react": "^14.1.2",
67
+ "@testing-library/jest-dom": "^6.4.2",
68
+ "@testing-library/react": "^14.2.1",
69
69
  "@testing-library/user-event": "^14.5.2",
70
70
  "@types/lodash": "^4.14.202",
71
- "@types/node": "^20.11.6",
72
- "@types/react": "^18.2.48",
73
- "@types/react-dom": "^18.2.18",
74
- "chokidar": "^3.5.3",
71
+ "@types/node": "^20.11.24",
72
+ "@types/react": "^18.2.62",
73
+ "@types/react-dom": "^18.2.19",
74
+ "chokidar": "^3.6.0",
75
75
  "filesize": "^10.1.0",
76
76
  "glob": "10.3.10",
77
77
  "jest": "^29.7.0",
@@ -80,22 +80,23 @@
80
80
  "lodash": "^4.17.21",
81
81
  "lz-string": "^1.5.0",
82
82
  "npm-run-all": "^4.1.5",
83
- "postcss": "^8.4.33",
83
+ "postcss": "^8.4.35",
84
84
  "postcss-scss": "^4.0.9",
85
- "stylelint": "^16.2.0",
85
+ "stylelint": "^16.2.1",
86
86
  "stylelint-config-prettier-scss": "^1.0.0",
87
87
  "stylelint-config-recommended-scss": "^14.0.0",
88
88
  "stylelint-order": "^6.0.4",
89
+ "stylelint-scss": "^6.2.0",
89
90
  "ts-node": "^10.9.2",
90
91
  "typescript": "^5.3.3"
91
92
  },
92
93
  "peerDependencies": {
93
- "@jest/globals": "^29.6.1",
94
- "@jest/types": "^29.6.1",
95
- "@testing-library/dom": "^9.3.1",
96
- "@testing-library/jest-dom": "^5.16.5",
97
- "@testing-library/react": "^14.0.0",
98
- "@testing-library/user-event": "^14.4.3",
94
+ "@jest/globals": "^29.7.0",
95
+ "@jest/types": "^29.6.3",
96
+ "@testing-library/dom": "^9.3.4",
97
+ "@testing-library/jest-dom": "^6.3.0",
98
+ "@testing-library/react": "^14.1.2",
99
+ "@testing-library/user-event": "^14.5.2",
99
100
  "react": ">= 18",
100
101
  "react-dom": ">= 18"
101
102
  },
@@ -132,7 +133,7 @@
132
133
  "dev": "npm-run-all --parallel build-esm-watch build-scss-watch build-types-watch",
133
134
  "prepare-release": "npm-run-all clean-dist build",
134
135
  "build": "npm-run-all build-esm build-scss build-types",
135
- "build-esm": "swc src -d ./dist",
136
+ "build-esm": "swc -d ./dist --strip-leading-paths src",
136
137
  "build-esm-watch": "pnpm run build-esm --watch",
137
138
  "build-types": "tsc -P tsconfig.types.json",
138
139
  "build-types-watch": "pnpm run build-types --watch",
@@ -0,0 +1,95 @@
1
+ import {
2
+ type HTMLAttributes,
3
+ type HtmlHTMLAttributes,
4
+ type ReactElement,
5
+ type ReactNode,
6
+ } from "react";
7
+ import { type PropsWithRef } from "./types.js";
8
+
9
+ /**
10
+ * @remarks \@since 6.0.0
11
+ */
12
+ export interface RootHtmlProps extends HtmlHTMLAttributes<HTMLHtmlElement> {
13
+ /** @defaultValue `"ltr"` */
14
+ dir?: string;
15
+
16
+ /** @defaultValue `"en"` */
17
+ lang?: string;
18
+
19
+ /**
20
+ * Any additional props to provide to the `<body>` element and also supports a
21
+ * `ref` if that is required for some reason. Using a `ref` would make your
22
+ * root layout a client component though.
23
+ */
24
+ bodyProps?: PropsWithRef<HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>;
25
+
26
+ /**
27
+ * Convenience prop to replace `bodyProps={{ className: "custom-class-name" }}`.
28
+ */
29
+ bodyClassName?: string;
30
+
31
+ /**
32
+ * Any content to render before the `<body>` tag. This can be useful if you
33
+ * need to render a custom `<head>` element.
34
+ */
35
+ beforeBodyChildren?: ReactNode;
36
+
37
+ /**
38
+ * Any content to render after the `<body>` tag. This can be useful to insert
39
+ * `<script>` tags for analytics or other external libraries.
40
+ */
41
+ afterBodyChildren?: ReactNode;
42
+ }
43
+
44
+ /**
45
+ * **Server Component**
46
+ *
47
+ * This is mostly for creating the root html for next.js applications that
48
+ * defaults to setting the `dir="ltr"` and `lang="en"`. Additional props can be
49
+ * passed to the root `<html>` and `<body>` elements and children can be
50
+ * rendered before and after the `<body>` if needed.
51
+ *
52
+ * @example
53
+ * Simple Example
54
+ * ```tsx
55
+ * // src/app/layout.tsx
56
+ * import { RootHtml } from "@react-md/core";
57
+ * import { type ReactElement, type PropsWithChildren } from "react";
58
+ * import { Roboto_Flex } from "next/font/google";
59
+ *
60
+ * const roboto = Roboto_Flex({
61
+ * subsets: ["latin"],
62
+ * variable: "--roboto",
63
+ * });
64
+ *
65
+ * export default function RootLayout(props: PropsWithChildren): ReactElement {
66
+ * const { children } = props;
67
+ *
68
+ * return <RootHtml className={roboto.variable}>{children}</RootHtml>;
69
+ * }
70
+ * ```
71
+ *
72
+ * @remarks \@since 6.0.0
73
+ */
74
+ export function RootHtml(props: RootHtmlProps): ReactElement {
75
+ const {
76
+ dir = "ltr",
77
+ lang = "en",
78
+ children,
79
+ bodyProps,
80
+ bodyClassName,
81
+ beforeBodyChildren,
82
+ afterBodyChildren,
83
+ ...remaining
84
+ } = props;
85
+
86
+ return (
87
+ <html dir={dir} lang={lang} {...remaining}>
88
+ {beforeBodyChildren}
89
+ <body {...bodyProps} className={bodyClassName || bodyProps?.className}>
90
+ {children}
91
+ </body>
92
+ {afterBodyChildren}
93
+ </html>
94
+ );
95
+ }
@@ -0,0 +1,46 @@
1
+ /** @jest-environment node */
2
+ /* eslint-disable testing-library/render-result-naming-convention */
3
+
4
+ import { describe, expect, it } from "@jest/globals";
5
+ import { renderToString } from "react-dom/server";
6
+ import { RootHtml } from "../RootHtml.js";
7
+
8
+ describe("RootHtml", () => {
9
+ it("should render the html and body elements with the default props", () => {
10
+ expect(renderToString(<RootHtml />)).toMatchSnapshot();
11
+ });
12
+
13
+ it("should allow a custom bodyClassName", () => {
14
+ expect(<RootHtml bodyClassName="body-class-name" />).toMatchSnapshot();
15
+ });
16
+
17
+ it("should allow the body className to be set through bodyProps when the bodyClassName prop is not provided", () => {
18
+ const html1 = renderToString(
19
+ <RootHtml bodyProps={{ className: "custom-body-class" }} />
20
+ );
21
+ const html2 = renderToString(
22
+ <RootHtml
23
+ bodyProps={{ className: "custom-body-name" }}
24
+ bodyClassName="body-class"
25
+ />
26
+ );
27
+
28
+ expect(html1).toContain("custom-body-class");
29
+ expect(html1).toMatchSnapshot();
30
+
31
+ expect(html2).not.toContain("custom-body-class");
32
+ expect(html2).toMatchSnapshot();
33
+ });
34
+
35
+ it("should allow the lang to be overwritten", () => {
36
+ expect(renderToString(<RootHtml lang="da" />)).toMatchSnapshot();
37
+ });
38
+
39
+ it("should allow the dir to be overwritten", () => {
40
+ expect(renderToString(<RootHtml dir="rtl" />)).toMatchSnapshot();
41
+ });
42
+
43
+ it("should allow the dir and lang to be overwritten", () => {
44
+ expect(renderToString(<RootHtml lang="ar" dir="rtl" />)).toMatchSnapshot();
45
+ });
46
+ });
@@ -0,0 +1,19 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`RootHtml should allow a custom bodyClassName 1`] = `
4
+ <RootHtml
5
+ bodyClassName="body-class-name"
6
+ />
7
+ `;
8
+
9
+ exports[`RootHtml should allow the body className to be set through bodyProps when the bodyClassName prop is not provided 1`] = `"<html dir="ltr" lang="en"><body class="custom-body-class"></body></html>"`;
10
+
11
+ exports[`RootHtml should allow the body className to be set through bodyProps when the bodyClassName prop is not provided 2`] = `"<html dir="ltr" lang="en"><body class="body-class"></body></html>"`;
12
+
13
+ exports[`RootHtml should allow the dir and lang to be overwritten 1`] = `"<html dir="rtl" lang="ar"><body></body></html>"`;
14
+
15
+ exports[`RootHtml should allow the dir to be overwritten 1`] = `"<html dir="rtl" lang="en"><body></body></html>"`;
16
+
17
+ exports[`RootHtml should allow the lang to be overwritten 1`] = `"<html dir="ltr" lang="da"><body></body></html>"`;
18
+
19
+ exports[`RootHtml should render the html and body elements with the default props 1`] = `"<html dir="ltr" lang="en"><body></body></html>"`;