react-miui 0.34.0 → 0.36.0

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 (427) hide show
  1. package/.claude/settings.local.json +2 -1
  2. package/CHANGELOG.md +17 -0
  3. package/dist/components/form/index.d.ts +1 -0
  4. package/dist/components/form/index.d.ts.map +1 -1
  5. package/dist/components/form/index.js +1 -0
  6. package/dist/components/form/index.js.map +1 -1
  7. package/dist/components/form/input/Input.d.ts.map +1 -1
  8. package/dist/components/form/input/Input.js +9 -5
  9. package/dist/components/form/input/Input.js.map +1 -1
  10. package/dist/components/form/timepicker/TimePicker.css.d.ts +99 -0
  11. package/dist/components/form/timepicker/TimePicker.css.d.ts.map +1 -0
  12. package/dist/components/form/timepicker/TimePicker.css.js +116 -0
  13. package/dist/components/form/timepicker/TimePicker.css.js.map +1 -0
  14. package/dist/components/form/timepicker/TimePicker.d.ts +22 -0
  15. package/dist/components/form/timepicker/TimePicker.d.ts.map +1 -0
  16. package/dist/components/form/timepicker/TimePicker.js +141 -0
  17. package/dist/components/form/timepicker/TimePicker.js.map +1 -0
  18. package/dist/components/form/timepicker/TimePicker.styled.d.ts +936 -0
  19. package/dist/components/form/timepicker/TimePicker.styled.d.ts.map +1 -0
  20. package/dist/components/form/timepicker/TimePicker.styled.js +29 -0
  21. package/dist/components/form/timepicker/TimePicker.styled.js.map +1 -0
  22. package/dist/components/form/timepicker/TimePickerModal.d.ts +17 -0
  23. package/dist/components/form/timepicker/TimePickerModal.d.ts.map +1 -0
  24. package/dist/components/form/timepicker/TimePickerModal.js +92 -0
  25. package/dist/components/form/timepicker/TimePickerModal.js.map +1 -0
  26. package/dist/components/form/timepicker/Wheel.d.ts +12 -0
  27. package/dist/components/form/timepicker/Wheel.d.ts.map +1 -0
  28. package/dist/components/form/timepicker/Wheel.js +187 -0
  29. package/dist/components/form/timepicker/Wheel.js.map +1 -0
  30. package/dist/components/form/timepicker/utils.d.ts +4 -0
  31. package/dist/components/form/timepicker/utils.d.ts.map +1 -0
  32. package/dist/components/form/timepicker/utils.js +62 -0
  33. package/dist/components/form/timepicker/utils.js.map +1 -0
  34. package/dist/components/icons/Clock.d.ts +7 -0
  35. package/dist/components/icons/Clock.d.ts.map +1 -0
  36. package/dist/components/icons/Clock.js +45 -0
  37. package/dist/components/icons/Clock.js.map +1 -0
  38. package/dist/components/icons/Icon.d.ts +2 -1
  39. package/dist/components/icons/Icon.d.ts.map +1 -1
  40. package/dist/components/icons/Icon.js +3 -0
  41. package/dist/components/icons/Icon.js.map +1 -1
  42. package/dist/components/layout/header/HeaderIconAction.d.ts.map +1 -1
  43. package/dist/components/layout/header/HeaderIconAction.js +13 -3
  44. package/dist/components/layout/header/HeaderIconAction.js.map +1 -1
  45. package/dist/components/layout/header/HeaderIconAction.styled.d.ts.map +1 -1
  46. package/dist/components/layout/header/HeaderIconAction.styled.js +11 -17
  47. package/dist/components/layout/header/HeaderIconAction.styled.js.map +1 -1
  48. package/dist/components/layout/list/Item.d.ts.map +1 -1
  49. package/dist/components/layout/list/Item.js +17 -7
  50. package/dist/components/layout/list/Item.js.map +1 -1
  51. package/dist/components/layout/list/Item.styled.d.ts.map +1 -1
  52. package/dist/components/layout/list/Item.styled.js +2 -1
  53. package/dist/components/layout/list/Item.styled.js.map +1 -1
  54. package/dist/components/ui/button/Button.d.ts +94 -1
  55. package/dist/components/ui/button/Button.d.ts.map +1 -1
  56. package/dist/components/ui/button/Button.js +59 -2
  57. package/dist/components/ui/button/Button.js.map +1 -1
  58. package/dist/components/ui/button/Button.styled.d.ts +2 -2
  59. package/dist/components/ui/button/Button.styled.d.ts.map +1 -1
  60. package/dist/components/ui/button/Button.styled.js +4 -3
  61. package/dist/components/ui/button/Button.styled.js.map +1 -1
  62. package/dist/components/ui/directionPad/Button.d.ts.map +1 -1
  63. package/dist/components/ui/directionPad/Button.js +7 -2
  64. package/dist/components/ui/directionPad/Button.js.map +1 -1
  65. package/dist/components/ui/directionPad/Button.styled.d.ts.map +1 -1
  66. package/dist/components/ui/directionPad/Button.styled.js +2 -1
  67. package/dist/components/ui/directionPad/Button.styled.js.map +1 -1
  68. package/dist/components/ui/directionPad/Middle.d.ts.map +1 -1
  69. package/dist/components/ui/directionPad/Middle.js +7 -1
  70. package/dist/components/ui/directionPad/Middle.js.map +1 -1
  71. package/dist/components/ui/directionPad/Middle.styled.d.ts.map +1 -1
  72. package/dist/components/ui/directionPad/Middle.styled.js +2 -1
  73. package/dist/components/ui/directionPad/Middle.styled.js.map +1 -1
  74. package/dist/components/ui/modal/Modal.d.ts +1 -2
  75. package/dist/components/ui/modal/Modal.d.ts.map +1 -1
  76. package/dist/components/ui/modal/Modal.js +114 -42
  77. package/dist/components/ui/modal/Modal.js.map +1 -1
  78. package/dist/components/ui/modal/Modal.styled.d.ts +1 -1
  79. package/dist/components/ui/modal/Modal.styled.d.ts.map +1 -1
  80. package/dist/components/ui/modal/Modal.styled.js +40 -25
  81. package/dist/components/ui/modal/Modal.styled.js.map +1 -1
  82. package/dist/components/ui/modal/ModalButtons.d.ts +179 -1
  83. package/dist/components/ui/modal/ModalButtons.d.ts.map +1 -1
  84. package/dist/components/ui/modal/ModalButtons.js +63 -2
  85. package/dist/components/ui/modal/ModalButtons.js.map +1 -1
  86. package/dist/components/ui/modal/ModalButtons.styled.d.ts +90 -91
  87. package/dist/components/ui/modal/ModalButtons.styled.d.ts.map +1 -1
  88. package/dist/components/ui/modal/ModalButtons.styled.js +5 -7
  89. package/dist/components/ui/modal/ModalButtons.styled.js.map +1 -1
  90. package/dist/components/ui/pop/Pop.styled.d.ts.map +1 -1
  91. package/dist/components/ui/pop/Pop.styled.js +15 -17
  92. package/dist/components/ui/pop/Pop.styled.js.map +1 -1
  93. package/dist/components/ui/pop/PopOption.d.ts.map +1 -1
  94. package/dist/components/ui/pop/PopOption.js +7 -2
  95. package/dist/components/ui/pop/PopOption.js.map +1 -1
  96. package/dist/components/ui/toolButton/ToolButton.d.ts +94 -1
  97. package/dist/components/ui/toolButton/ToolButton.d.ts.map +1 -1
  98. package/dist/components/ui/toolButton/ToolButton.js +59 -2
  99. package/dist/components/ui/toolButton/ToolButton.js.map +1 -1
  100. package/dist/components/ui/toolButton/ToolButton.styled.d.ts +2 -2
  101. package/dist/components/ui/toolButton/ToolButton.styled.d.ts.map +1 -1
  102. package/dist/components/ui/toolButton/ToolButton.styled.js +20 -25
  103. package/dist/components/ui/toolButton/ToolButton.styled.js.map +1 -1
  104. package/dist/theme.css-global.d.ts.map +1 -1
  105. package/dist/theme.css-global.js +0 -1
  106. package/dist/theme.css-global.js.map +1 -1
  107. package/dist/utils/index.d.ts +1 -0
  108. package/dist/utils/index.d.ts.map +1 -1
  109. package/dist/utils/index.js +1 -0
  110. package/dist/utils/index.js.map +1 -1
  111. package/dist/utils/useNativeValidity.d.ts +11 -0
  112. package/dist/utils/useNativeValidity.d.ts.map +1 -0
  113. package/dist/utils/useNativeValidity.js +32 -0
  114. package/dist/utils/useNativeValidity.js.map +1 -0
  115. package/dist/utils/useRipple.d.ts +15 -0
  116. package/dist/utils/useRipple.d.ts.map +1 -0
  117. package/dist/utils/useRipple.js +120 -0
  118. package/dist/utils/useRipple.js.map +1 -0
  119. package/dist/utils/useRipple.styled.d.ts +28 -0
  120. package/dist/utils/useRipple.styled.d.ts.map +1 -0
  121. package/dist/utils/useRipple.styled.js +36 -0
  122. package/dist/utils/useRipple.styled.js.map +1 -0
  123. package/docs/assets/navigation.js +1 -1
  124. package/docs/assets/search.js +1 -1
  125. package/docs/classes/index.Pop.html +7 -7
  126. package/docs/documents/Test.html +2 -2
  127. package/docs/enums/index.ICON.html +3 -2
  128. package/docs/functions/index.Action.html +3 -3
  129. package/docs/functions/index.Button.html +3 -9
  130. package/docs/functions/index.Card.html +2 -2
  131. package/docs/functions/index.Checkbox.html +3 -3
  132. package/docs/functions/index.Choice.html +2 -2
  133. package/docs/functions/index.ColorPicker.html +3 -3
  134. package/docs/functions/index.CoveringLoader.html +3 -3
  135. package/docs/functions/index.DirectionPad.html +2 -2
  136. package/docs/functions/index.Drawer.html +2 -2
  137. package/docs/functions/index.EqualActions.html +2 -2
  138. package/docs/functions/index.FullLoader.html +3 -3
  139. package/docs/functions/index.Gap.html +2 -2
  140. package/docs/functions/index.HandleEsc.html +3 -3
  141. package/docs/functions/index.Header.html +3 -3
  142. package/docs/functions/index.HeaderIconAction.html +3 -3
  143. package/docs/functions/index.Icon-1.html +2 -2
  144. package/docs/functions/index.If.html +3 -3
  145. package/docs/functions/index.Input.html +1 -1
  146. package/docs/functions/index.KeyValue.html +2 -2
  147. package/docs/functions/index.Label.html +2 -2
  148. package/docs/functions/index.Line.html +3 -3
  149. package/docs/functions/index.List.html +2 -2
  150. package/docs/functions/index.Loader.html +3 -3
  151. package/docs/functions/index.Loading.html +3 -3
  152. package/docs/functions/index.Message.html +3 -3
  153. package/docs/functions/index.Modal.html +2 -2
  154. package/docs/functions/index.ModalButtons.html +3 -3
  155. package/docs/functions/index.PopLoader.html +3 -3
  156. package/docs/functions/index.PopOption.html +2 -2
  157. package/docs/functions/index.Progress.html +2 -2
  158. package/docs/functions/index.SearchContainer.html +2 -2
  159. package/docs/functions/index.Section.html +4 -4
  160. package/docs/functions/index.Select.html +2 -2
  161. package/docs/functions/index.Selector.html +2 -2
  162. package/docs/functions/index.Spacer.html +2 -2
  163. package/docs/functions/index.Stats.html +2 -2
  164. package/docs/functions/index.StickyHeader.html +4 -4
  165. package/docs/functions/index.Table.html +2 -2
  166. package/docs/functions/index.TextArea.html +2 -2
  167. package/docs/functions/index.TimePicker.html +10 -0
  168. package/docs/functions/index.ToasterProvider.html +3 -3
  169. package/docs/functions/index.Toggle.html +3 -3
  170. package/docs/functions/index.ToolButton.html +3 -9
  171. package/docs/functions/index.Tooltip.html +3 -3
  172. package/docs/functions/index.TooltipProvider.html +2 -2
  173. package/docs/functions/index.borderPxToRem.html +1 -1
  174. package/docs/functions/index.createTheme.html +1 -1
  175. package/docs/functions/index.css.html +1 -1
  176. package/docs/functions/index.dimensionsPxToRem.html +1 -1
  177. package/docs/functions/index.fontPxToRem.html +1 -1
  178. package/docs/functions/index.getCssText.html +1 -1
  179. package/docs/functions/index.globalCss.html +2 -2
  180. package/docs/functions/index.injectGlobalStyles.html +1 -1
  181. package/docs/functions/index.keyframes.html +1 -1
  182. package/docs/functions/index.pxToRem.html +1 -1
  183. package/docs/functions/index.styled.html +1 -1
  184. package/docs/functions/index.toast.html +2 -2
  185. package/docs/functions/index.useToaster.html +1 -1
  186. package/docs/index.html +2 -2
  187. package/docs/interfaces/index.IconProps.html +2 -2
  188. package/docs/interfaces/index.InputCustomProps.html +3 -3
  189. package/docs/interfaces/index.LoaderProps.html +6 -6
  190. package/docs/interfaces/index.StickyHeaderProps.html +4 -4
  191. package/docs/interfaces/index.ToasterProviderProps.html +3 -3
  192. package/docs/interfaces/index.TooltipProps.html +14 -14
  193. package/docs/interfaces/index.TooltipProviderProps.html +5 -5
  194. package/docs/modules/index.html +1 -1
  195. package/docs/modules.html +1 -1
  196. package/docs/types/index.ActionProps.html +1 -1
  197. package/docs/types/index.CardProps.html +1 -1
  198. package/docs/types/index.CheckboxProps.html +2 -2
  199. package/docs/types/index.ChoiceProps.html +1 -1
  200. package/docs/types/index.ColorPickerProps.html +1 -1
  201. package/docs/types/index.DirectionPadProps.html +1 -1
  202. package/docs/types/index.DrawerFrom.html +1 -1
  203. package/docs/types/index.DrawerProps.html +2 -2
  204. package/docs/types/index.EqualActionsProps.html +1 -1
  205. package/docs/types/index.HeaderProps.html +1 -1
  206. package/docs/types/index.InputProps.html +1 -1
  207. package/docs/types/index.KeyValueProps.html +1 -1
  208. package/docs/types/index.LabelProps.html +1 -1
  209. package/docs/types/index.OverwriteProps.html +1 -1
  210. package/docs/types/index.ProgressProps.html +2 -2
  211. package/docs/types/index.SelectProps.html +1 -1
  212. package/docs/types/index.SelectorProps.html +1 -1
  213. package/docs/types/index.Stat.html +1 -1
  214. package/docs/types/index.StatsProps.html +1 -1
  215. package/docs/types/index.TextAreaProps.html +1 -1
  216. package/docs/types/index.ThemeCSS.html +1 -1
  217. package/docs/types/index.TimePickerProps.html +1 -0
  218. package/docs/types/index.ToggleProps.html +2 -2
  219. package/docs/variables/index.ActionBadgeSelector.html +1 -1
  220. package/docs/variables/index.ActionCircleSelector.html +1 -1
  221. package/docs/variables/index.CheckboxCheckmarkWrapperSelector.html +1 -1
  222. package/docs/variables/index.CheckboxTextLabelSelector.html +1 -1
  223. package/docs/variables/index.ChoiceItemSelector.html +1 -1
  224. package/docs/variables/index.ColorPickerColorDisplaySelector.html +1 -1
  225. package/docs/variables/index.DirectionPadButtonDotSelector.html +1 -1
  226. package/docs/variables/index.DirectionPadButtonSelector.html +1 -1
  227. package/docs/variables/index.DirectionPadLineSelector.html +1 -1
  228. package/docs/variables/index.DirectionPadMiddleSelector.html +1 -1
  229. package/docs/variables/index.DrawerContentSelector.html +1 -1
  230. package/docs/variables/index.HeaderAfterSelector.html +1 -1
  231. package/docs/variables/index.HeaderBeforeSelector.html +1 -1
  232. package/docs/variables/index.HeaderContentsSelector.html +1 -1
  233. package/docs/variables/index.HeaderIconActionIconSelector.html +1 -1
  234. package/docs/variables/index.InputContainerSelector.html +1 -1
  235. package/docs/variables/index.InputInputSelector.html +1 -1
  236. package/docs/variables/index.InputLabelSelector.html +1 -1
  237. package/docs/variables/index.InputPrefixSelector.html +1 -1
  238. package/docs/variables/index.InputSuffixSelector.html +1 -1
  239. package/docs/variables/index.KeyValueIconSelector.html +1 -1
  240. package/docs/variables/index.KeyValueItemSelector.html +1 -1
  241. package/docs/variables/index.KeyValueKeySelector.html +1 -1
  242. package/docs/variables/index.KeyValuePairSelector.html +1 -1
  243. package/docs/variables/index.KeyValueValueSelector.html +1 -1
  244. package/docs/variables/index.LabelTextSelector.html +1 -1
  245. package/docs/variables/index.ListItemInnerContainerClassNameSelector.html +1 -1
  246. package/docs/variables/index.ModalContainerSelector.html +1 -1
  247. package/docs/variables/index.ModalRemovePaddingSelector.html +1 -1
  248. package/docs/variables/index.ModalTitleSelector.html +1 -1
  249. package/docs/variables/index.PopListSelector.html +1 -1
  250. package/docs/variables/index.PopOptionButtonSelector.html +1 -1
  251. package/docs/variables/index.PopOptionIconSelector.html +1 -1
  252. package/docs/variables/index.PopOverlaySelector.html +1 -1
  253. package/docs/variables/index.ProgressBackgroundSelector.html +1 -1
  254. package/docs/variables/index.ProgressValueSelector.html +1 -1
  255. package/docs/variables/index.SelectorItemSelector.html +1 -1
  256. package/docs/variables/index.StatsItemSelector.html +1 -1
  257. package/docs/variables/index.StatsLabelSelector.html +1 -1
  258. package/docs/variables/index.StatsSeparatorSelector.html +1 -1
  259. package/docs/variables/index.StatsValueSelector.html +1 -1
  260. package/docs/variables/index.TextAreaLabelSelector.html +1 -1
  261. package/docs/variables/index.TextAreaTextAreaSelector.html +1 -1
  262. package/docs/variables/index.TextAreaWrapperSelector.html +1 -1
  263. package/docs/variables/index.ToggleStyledToggleSelector.html +1 -1
  264. package/docs/variables/index.TooltipContentSelector.html +1 -1
  265. package/docs/variables/index.config.html +1 -1
  266. package/docs/variables/index.cssReset.html +2 -2
  267. package/docs/variables/index.darkTheme.html +1 -1
  268. package/docs/variables/index.miuiScrollbars.html +1 -1
  269. package/docs/variables/index.theme.html +1 -1
  270. package/esm/components/form/index.d.ts +1 -0
  271. package/esm/components/form/index.d.ts.map +1 -1
  272. package/esm/components/form/index.js +1 -0
  273. package/esm/components/form/index.js.map +1 -1
  274. package/esm/components/form/input/Input.d.ts.map +1 -1
  275. package/esm/components/form/input/Input.js +9 -5
  276. package/esm/components/form/input/Input.js.map +1 -1
  277. package/esm/components/form/timepicker/TimePicker.css.d.ts +99 -0
  278. package/esm/components/form/timepicker/TimePicker.css.d.ts.map +1 -0
  279. package/esm/components/form/timepicker/TimePicker.css.js +102 -0
  280. package/esm/components/form/timepicker/TimePicker.css.js.map +1 -0
  281. package/esm/components/form/timepicker/TimePicker.d.ts +22 -0
  282. package/esm/components/form/timepicker/TimePicker.d.ts.map +1 -0
  283. package/esm/components/form/timepicker/TimePicker.js +93 -0
  284. package/esm/components/form/timepicker/TimePicker.js.map +1 -0
  285. package/esm/components/form/timepicker/TimePicker.styled.d.ts +936 -0
  286. package/esm/components/form/timepicker/TimePicker.styled.d.ts.map +1 -0
  287. package/esm/components/form/timepicker/TimePicker.styled.js +20 -0
  288. package/esm/components/form/timepicker/TimePicker.styled.js.map +1 -0
  289. package/esm/components/form/timepicker/TimePickerModal.d.ts +17 -0
  290. package/esm/components/form/timepicker/TimePickerModal.d.ts.map +1 -0
  291. package/esm/components/form/timepicker/TimePickerModal.js +56 -0
  292. package/esm/components/form/timepicker/TimePickerModal.js.map +1 -0
  293. package/esm/components/form/timepicker/Wheel.d.ts +12 -0
  294. package/esm/components/form/timepicker/Wheel.d.ts.map +1 -0
  295. package/esm/components/form/timepicker/Wheel.js +151 -0
  296. package/esm/components/form/timepicker/Wheel.js.map +1 -0
  297. package/esm/components/form/timepicker/utils.d.ts +4 -0
  298. package/esm/components/form/timepicker/utils.d.ts.map +1 -0
  299. package/esm/components/form/timepicker/utils.js +58 -0
  300. package/esm/components/form/timepicker/utils.js.map +1 -0
  301. package/esm/components/icons/Clock.d.ts +7 -0
  302. package/esm/components/icons/Clock.d.ts.map +1 -0
  303. package/esm/components/icons/Clock.js +9 -0
  304. package/esm/components/icons/Clock.js.map +1 -0
  305. package/esm/components/icons/Icon.d.ts +2 -1
  306. package/esm/components/icons/Icon.d.ts.map +1 -1
  307. package/esm/components/icons/Icon.js +3 -0
  308. package/esm/components/icons/Icon.js.map +1 -1
  309. package/esm/components/layout/header/HeaderIconAction.d.ts.map +1 -1
  310. package/esm/components/layout/header/HeaderIconAction.js +13 -3
  311. package/esm/components/layout/header/HeaderIconAction.js.map +1 -1
  312. package/esm/components/layout/header/HeaderIconAction.styled.d.ts.map +1 -1
  313. package/esm/components/layout/header/HeaderIconAction.styled.js +11 -17
  314. package/esm/components/layout/header/HeaderIconAction.styled.js.map +1 -1
  315. package/esm/components/layout/list/Item.d.ts.map +1 -1
  316. package/esm/components/layout/list/Item.js +18 -8
  317. package/esm/components/layout/list/Item.js.map +1 -1
  318. package/esm/components/layout/list/Item.styled.d.ts.map +1 -1
  319. package/esm/components/layout/list/Item.styled.js +2 -1
  320. package/esm/components/layout/list/Item.styled.js.map +1 -1
  321. package/esm/components/ui/button/Button.d.ts +94 -1
  322. package/esm/components/ui/button/Button.d.ts.map +1 -1
  323. package/esm/components/ui/button/Button.js +15 -1
  324. package/esm/components/ui/button/Button.js.map +1 -1
  325. package/esm/components/ui/button/Button.styled.d.ts +2 -2
  326. package/esm/components/ui/button/Button.styled.d.ts.map +1 -1
  327. package/esm/components/ui/button/Button.styled.js +3 -2
  328. package/esm/components/ui/button/Button.styled.js.map +1 -1
  329. package/esm/components/ui/directionPad/Button.d.ts.map +1 -1
  330. package/esm/components/ui/directionPad/Button.js +7 -2
  331. package/esm/components/ui/directionPad/Button.js.map +1 -1
  332. package/esm/components/ui/directionPad/Button.styled.d.ts.map +1 -1
  333. package/esm/components/ui/directionPad/Button.styled.js +2 -1
  334. package/esm/components/ui/directionPad/Button.styled.js.map +1 -1
  335. package/esm/components/ui/directionPad/Middle.d.ts.map +1 -1
  336. package/esm/components/ui/directionPad/Middle.js +7 -1
  337. package/esm/components/ui/directionPad/Middle.js.map +1 -1
  338. package/esm/components/ui/directionPad/Middle.styled.d.ts.map +1 -1
  339. package/esm/components/ui/directionPad/Middle.styled.js +2 -1
  340. package/esm/components/ui/directionPad/Middle.styled.js.map +1 -1
  341. package/esm/components/ui/modal/Modal.d.ts +1 -2
  342. package/esm/components/ui/modal/Modal.d.ts.map +1 -1
  343. package/esm/components/ui/modal/Modal.js +103 -43
  344. package/esm/components/ui/modal/Modal.js.map +1 -1
  345. package/esm/components/ui/modal/Modal.styled.d.ts +1 -1
  346. package/esm/components/ui/modal/Modal.styled.d.ts.map +1 -1
  347. package/esm/components/ui/modal/Modal.styled.js +40 -25
  348. package/esm/components/ui/modal/Modal.styled.js.map +1 -1
  349. package/esm/components/ui/modal/ModalButtons.d.ts +179 -1
  350. package/esm/components/ui/modal/ModalButtons.d.ts.map +1 -1
  351. package/esm/components/ui/modal/ModalButtons.js +19 -1
  352. package/esm/components/ui/modal/ModalButtons.js.map +1 -1
  353. package/esm/components/ui/modal/ModalButtons.styled.d.ts +90 -91
  354. package/esm/components/ui/modal/ModalButtons.styled.d.ts.map +1 -1
  355. package/esm/components/ui/modal/ModalButtons.styled.js +3 -6
  356. package/esm/components/ui/modal/ModalButtons.styled.js.map +1 -1
  357. package/esm/components/ui/pop/Pop.styled.d.ts.map +1 -1
  358. package/esm/components/ui/pop/Pop.styled.js +15 -17
  359. package/esm/components/ui/pop/Pop.styled.js.map +1 -1
  360. package/esm/components/ui/pop/PopOption.d.ts.map +1 -1
  361. package/esm/components/ui/pop/PopOption.js +7 -2
  362. package/esm/components/ui/pop/PopOption.js.map +1 -1
  363. package/esm/components/ui/toolButton/ToolButton.d.ts +94 -1
  364. package/esm/components/ui/toolButton/ToolButton.d.ts.map +1 -1
  365. package/esm/components/ui/toolButton/ToolButton.js +15 -1
  366. package/esm/components/ui/toolButton/ToolButton.js.map +1 -1
  367. package/esm/components/ui/toolButton/ToolButton.styled.d.ts +2 -2
  368. package/esm/components/ui/toolButton/ToolButton.styled.d.ts.map +1 -1
  369. package/esm/components/ui/toolButton/ToolButton.styled.js +19 -24
  370. package/esm/components/ui/toolButton/ToolButton.styled.js.map +1 -1
  371. package/esm/theme.css-global.d.ts.map +1 -1
  372. package/esm/theme.css-global.js +0 -1
  373. package/esm/theme.css-global.js.map +1 -1
  374. package/esm/utils/index.d.ts +1 -0
  375. package/esm/utils/index.d.ts.map +1 -1
  376. package/esm/utils/index.js +1 -0
  377. package/esm/utils/index.js.map +1 -1
  378. package/esm/utils/useNativeValidity.d.ts +11 -0
  379. package/esm/utils/useNativeValidity.d.ts.map +1 -0
  380. package/esm/utils/useNativeValidity.js +29 -0
  381. package/esm/utils/useNativeValidity.js.map +1 -0
  382. package/esm/utils/useRipple.d.ts +15 -0
  383. package/esm/utils/useRipple.d.ts.map +1 -0
  384. package/esm/utils/useRipple.js +84 -0
  385. package/esm/utils/useRipple.js.map +1 -0
  386. package/esm/utils/useRipple.styled.d.ts +28 -0
  387. package/esm/utils/useRipple.styled.d.ts.map +1 -0
  388. package/esm/utils/useRipple.styled.js +33 -0
  389. package/esm/utils/useRipple.styled.js.map +1 -0
  390. package/package.json +1 -1
  391. package/src/components/form/index.ts +1 -0
  392. package/src/components/form/input/Input.stories.tsx +47 -1
  393. package/src/components/form/input/Input.tsx +11 -5
  394. package/src/components/form/timepicker/TimePicker.css.ts +132 -0
  395. package/src/components/form/timepicker/TimePicker.stories.tsx +107 -0
  396. package/src/components/form/timepicker/TimePicker.styled.ts +52 -0
  397. package/src/components/form/timepicker/TimePicker.tsx +229 -0
  398. package/src/components/form/timepicker/TimePickerModal.tsx +131 -0
  399. package/src/components/form/timepicker/Wheel.tsx +201 -0
  400. package/src/components/form/timepicker/utils.ts +66 -0
  401. package/src/components/icons/Clock.tsx +38 -0
  402. package/src/components/icons/Icon.tsx +3 -0
  403. package/src/components/layout/header/HeaderIconAction.styled.ts +11 -18
  404. package/src/components/layout/header/HeaderIconAction.tsx +32 -5
  405. package/src/components/layout/list/Item.styled.ts +2 -1
  406. package/src/components/layout/list/Item.tsx +38 -5
  407. package/src/components/ui/button/Button.styled.ts +3 -2
  408. package/src/components/ui/button/Button.tsx +33 -1
  409. package/src/components/ui/directionPad/Button.styled.ts +2 -1
  410. package/src/components/ui/directionPad/Button.tsx +13 -1
  411. package/src/components/ui/directionPad/Middle.styled.ts +2 -1
  412. package/src/components/ui/directionPad/Middle.tsx +13 -1
  413. package/src/components/ui/modal/Modal.stories.tsx +43 -7
  414. package/src/components/ui/modal/Modal.styled.ts +46 -25
  415. package/src/components/ui/modal/Modal.tsx +135 -52
  416. package/src/components/ui/modal/ModalButtons.styled.ts +4 -7
  417. package/src/components/ui/modal/ModalButtons.tsx +38 -1
  418. package/src/components/ui/pop/Pop.styled.ts +15 -18
  419. package/src/components/ui/pop/PopOption.tsx +15 -1
  420. package/src/components/ui/toolButton/ToolButton.styled.ts +20 -26
  421. package/src/components/ui/toolButton/ToolButton.tsx +33 -0
  422. package/src/theme.css-global.ts +0 -1
  423. package/src/utils/index.ts +1 -0
  424. package/src/utils/useNativeValidity.ts +57 -0
  425. package/src/utils/useRipple.styled.ts +56 -0
  426. package/src/utils/useRipple.tsx +139 -0
  427. package/src/components/ui/toolButton/ToolButton.ts +0 -1
@@ -1,4 +1,5 @@
1
1
  import { dimensionsPxToRem, fontPxToRem, styled } from "../../../theme";
2
+ import { rippleHostStyles } from "../../../utils/useRipple.styled";
2
3
 
3
4
  const Overlay = styled("div", {
4
5
  position: "fixed",
@@ -26,24 +27,20 @@ const ListItem = styled("li", {
26
27
  },
27
28
  });
28
29
 
29
- const Button = styled("button", {
30
- "border": "none",
31
- "background": "$background",
32
- "height": dimensionsPxToRem(116),
33
- "padding": `0 ${dimensionsPxToRem(42)}`,
34
- "boxSizing": "border-box",
35
- "width": "100%",
36
- "minWidth": dimensionsPxToRem(460),
37
- "textAlign": "left",
38
- "color": "$popText",
39
- "fontSize": fontPxToRem(26),
40
- "fontWeight": "revert",
41
- "display": "flex",
42
- "alignItems": "center",
43
-
44
- "&:hover": {
45
- background: "$activeBg",
46
- },
30
+ const Button = styled("button", rippleHostStyles, {
31
+ border: "none",
32
+ background: "$background",
33
+ height: dimensionsPxToRem(116),
34
+ padding: `0 ${dimensionsPxToRem(42)}`,
35
+ boxSizing: "border-box",
36
+ width: "100%",
37
+ minWidth: dimensionsPxToRem(460),
38
+ textAlign: "left",
39
+ color: "$popText",
40
+ fontSize: fontPxToRem(26),
41
+ fontWeight: "revert",
42
+ display: "flex",
43
+ alignItems: "center",
47
44
  });
48
45
 
49
46
  const Icon = styled("div", {
@@ -1,5 +1,8 @@
1
1
  import React, { forwardRef } from "react";
2
2
 
3
+ import { useForwardedRef } from "@bedrock-layout/use-forwarded-ref";
4
+
5
+ import { useRipple } from "../../../utils/useRipple";
3
6
  import { Button, FakeIcon, Icon, ListItem } from "./Pop.styled";
4
7
 
5
8
  interface Props {
@@ -11,13 +14,24 @@ interface Props {
11
14
  }
12
15
 
13
16
  const PopOption = forwardRef<HTMLLIElement, Props>((props, ref) => {
17
+ const buttonRef = useForwardedRef<HTMLButtonElement | null>(null);
18
+ const ripple = useRipple({ ref: buttonRef });
19
+
14
20
  const ic = props.icon
15
21
  ? <Icon>{props.icon}</Icon>
16
22
  : ((props.forceEmptyIcon ?? true) ? <FakeIcon /> : null);
17
23
 
18
24
  return (
19
25
  <ListItem ref={ref} className={props.className}>
20
- <Button onClick={props.onClick}>{ic}{props.children}</Button>
26
+ <Button
27
+ ref={buttonRef}
28
+ onClick={props.onClick}
29
+ onPointerDown={ripple.onPointerDown}
30
+ onKeyDown={ripple.onKeyDown}
31
+ >
32
+ {ic}{props.children}
33
+ {ripple.ripples}
34
+ </Button>
21
35
  </ListItem>
22
36
  );
23
37
  });
@@ -1,27 +1,24 @@
1
1
  import { dimensionsPxToRem, fontPxToRem, styled } from "../../../theme";
2
+ import { rippleHostStyles } from "../../../utils/useRipple.styled";
2
3
 
3
4
  /**
4
5
  * Small buttons for toolbars
5
6
  */
6
- const ToolButton = styled("button", {
7
- "height": dimensionsPxToRem(79),
8
- "borderRadius": dimensionsPxToRem(10),
9
- "fontWeight": "bold",
10
- "fontSize": fontPxToRem(23),
11
- "display": "flex",
12
- "alignItems": "center",
13
- "justifyContent": "center",
14
- "paddingInline": dimensionsPxToRem(16),
15
- "background": "white",
16
- "boxSizing": "border-box",
17
- "border": `${dimensionsPxToRem(6)} solid transparent`,
7
+ const StyledToolButton = styled("button", rippleHostStyles, {
8
+ height: dimensionsPxToRem(79),
9
+ borderRadius: dimensionsPxToRem(10),
10
+ fontWeight: "bold",
11
+ fontSize: fontPxToRem(23),
12
+ display: "flex",
13
+ alignItems: "center",
14
+ justifyContent: "center",
15
+ paddingInline: dimensionsPxToRem(16),
16
+ background: "white",
17
+ boxSizing: "border-box",
18
+ border: `${dimensionsPxToRem(6)} solid transparent`,
19
+ color: "$toolButtonText",
18
20
 
19
- "color": "$toolButtonText",
20
- "&:hover": {
21
- background: "#ffffffcc",
22
- },
23
-
24
- "variants": {
21
+ variants: {
25
22
  inline: {
26
23
  true: {
27
24
  width: "auto",
@@ -30,19 +27,16 @@ const ToolButton = styled("button", {
30
27
  },
31
28
  variant: {
32
29
  secondary: {
33
- "border": `${dimensionsPxToRem(6)} solid #ffffff42`,
34
- "background": "none",
35
-
36
- "&:hover": {
37
- background: "#ffffff22",
38
- },
39
- "color": "white",
30
+ border: `${dimensionsPxToRem(6)} solid #ffffff42`,
31
+ background: "none",
32
+ color: "white",
40
33
  },
41
34
  secondaryOnLight: {
42
35
  "border": `${dimensionsPxToRem(6)} solid $border`,
43
36
  "background": "none",
44
37
  "color": "$text",
45
38
 
39
+ // emphasize border on hover (more than just the universal tint overlay)
46
40
  "&:hover": {
47
41
  borderColor: "$buttonBorder",
48
42
  },
@@ -52,5 +46,5 @@ const ToolButton = styled("button", {
52
46
  });
53
47
 
54
48
  export {
55
- ToolButton,
49
+ StyledToolButton,
56
50
  };
@@ -0,0 +1,33 @@
1
+ import React, { forwardRef } from "react";
2
+
3
+ import { useForwardedRef } from "@bedrock-layout/use-forwarded-ref";
4
+
5
+ import { useRipple } from "../../../utils/useRipple";
6
+ import { StyledToolButton } from "./ToolButton.styled";
7
+
8
+ type Props = React.ComponentProps<typeof StyledToolButton>;
9
+
10
+ const ToolButton = forwardRef<HTMLButtonElement, Props>((props, ref) => {
11
+ const { children, onPointerDown, onKeyDown, ...rest } = props;
12
+ const innerRef = useForwardedRef(ref);
13
+ const ripple = useRipple({ ref: innerRef, onPointerDown, onKeyDown });
14
+
15
+ return (
16
+ <StyledToolButton
17
+ ref={innerRef}
18
+ onPointerDown={ripple.onPointerDown}
19
+ onKeyDown={ripple.onKeyDown}
20
+ {...rest}
21
+ >
22
+ {children}
23
+ {ripple.ripples}
24
+ </StyledToolButton>
25
+ );
26
+ });
27
+
28
+ ToolButton.displayName = "ToolButton";
29
+ ToolButton.toString = () => StyledToolButton.toString();
30
+
31
+ export {
32
+ ToolButton,
33
+ };
@@ -7,7 +7,6 @@ const injectGlobalStyles = globalCss({
7
7
  "*:focus-visible:focus-visible": {
8
8
  outline: "none !important",
9
9
  borderColor: "$focusColor",
10
- backgroundColor: "var(--focus-bg-set)",
11
10
  },
12
11
  "body": {
13
12
  color: "$text",
@@ -1,3 +1,4 @@
1
1
  export * from "./toObjectValue";
2
2
  export * from "./useKeyPress";
3
+ export * from "./useNativeValidity";
3
4
  export * from "./useTailSpin";
@@ -0,0 +1,57 @@
1
+ import { useCallback, useState } from "react";
2
+
3
+ import type React from "react";
4
+
5
+ interface UseNativeValidityResult {
6
+ /** Combined: the explicit `error` prop OR the input's native invalid state. Pass to your `error`/styling. */
7
+ finalError: boolean;
8
+ /** Re-checks validity. Call from your `onBlur`. */
9
+ onBlur: (e: React.FocusEvent<HTMLInputElement>) => void;
10
+ /** Clears the invalid flag if the value just became valid. Call from your `onChange`. */
11
+ onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
12
+ /** Fires when the form tries to submit an invalid value. Call from your `onInvalid`. */
13
+ onInvalid: () => void;
14
+ /** Clears the invalid flag if the input is currently valid. Useful after programmatic value changes. */
15
+ revalidate: (input: HTMLInputElement | null) => void;
16
+ }
17
+
18
+ /**
19
+ * Tracks native HTML5 validity (pattern, required, type=email/url, etc.) and surfaces it
20
+ * as an `error` boolean — the rule mirrors the CSS `:user-invalid` pseudo-class:
21
+ * invalid is sticky after blur or a failed submit, and clears as soon as the value becomes valid.
22
+ *
23
+ * Compose the returned handlers with your component's own `onBlur` / `onChange` / `onInvalid`.
24
+ */
25
+ const useNativeValidity = (error: boolean | undefined): UseNativeValidityResult => {
26
+ const [nativeInvalid, setNativeInvalid] = useState(false);
27
+
28
+ const onBlur = useCallback((e: React.FocusEvent<HTMLInputElement>) => {
29
+ setNativeInvalid(!e.currentTarget.checkValidity());
30
+ }, []);
31
+
32
+ const onChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
33
+ if (e.currentTarget.checkValidity()) {
34
+ setNativeInvalid(false);
35
+ }
36
+ }, []);
37
+
38
+ const onInvalid = useCallback(() => {
39
+ setNativeInvalid(true);
40
+ }, []);
41
+
42
+ const revalidate = useCallback((input: HTMLInputElement | null) => {
43
+ if (input?.checkValidity()) {
44
+ setNativeInvalid(false);
45
+ }
46
+ }, []);
47
+
48
+ return {
49
+ finalError: Boolean(error) || nativeInvalid,
50
+ onBlur,
51
+ onChange,
52
+ onInvalid,
53
+ revalidate,
54
+ };
55
+ };
56
+
57
+ export { useNativeValidity };
@@ -0,0 +1,56 @@
1
+ import { keyframes } from "../theme";
2
+
3
+ const rippleKeyframes = keyframes({
4
+ "0%": { transform: "scale(0)", opacity: 0.35 },
5
+ "100%": { transform: "scale(1)", opacity: 0 },
6
+ });
7
+
8
+ /**
9
+ * Use with Stitches `styled(...)` definition to make the element a ripple host.
10
+ * Pair with `useRipple()` which provides handlers and rendered ripple spans.
11
+ *
12
+ * Sets `position: relative` and `overflow: hidden` on the host.
13
+ *
14
+ * To disable the effect for an element or whole subtree, set the CSS variable
15
+ * `--miui-ripple: 0` on the element or any ancestor. The hover/active overlay
16
+ * opacity is multiplied by this var and the JS hook skips ripple creation when
17
+ * it reads `0`.
18
+ */
19
+ const rippleHostStyles = {
20
+ "position": "relative",
21
+ "overflow": "hidden",
22
+ "WebkitTapHighlightColor": "transparent",
23
+ "transition": "box-shadow 150ms ease-out",
24
+
25
+ // Subtle hover/active overlay so interactive elements look clickable.
26
+ // Scoped to `a`/`button` so non-interactive hosts (e.g. List.Item rendered
27
+ // as <div>) don't get false affordances. `:active` also serves as the
28
+ // minimal feedback for users with `prefers-reduced-motion: reduce`,
29
+ // who don't see the ripple.
30
+ "&:where(a, button):hover:not(:disabled):not([aria-disabled='true'])": {
31
+ boxShadow: "inset 0 0 0 9999px color-mix(in srgb, currentColor calc(6% * var(--miui-ripple, 1)), transparent)",
32
+ },
33
+ "&:where(a, button):active:not(:disabled):not([aria-disabled='true'])": {
34
+ boxShadow: "inset 0 0 0 9999px color-mix(in srgb, currentColor calc(12% * var(--miui-ripple, 1)), transparent)",
35
+ },
36
+
37
+ "@media (prefers-reduced-motion: reduce)": {
38
+ transition: "none",
39
+ },
40
+
41
+ "& > span[data-miui-ripple]": {
42
+ position: "absolute",
43
+ pointerEvents: "none",
44
+ borderRadius: "50%",
45
+ backgroundColor: "currentColor",
46
+ transform: "scale(0)",
47
+ opacity: 0,
48
+ animationName: String(rippleKeyframes),
49
+ animationTimingFunction: "ease-out",
50
+ animationFillMode: "forwards",
51
+ },
52
+ };
53
+
54
+ export {
55
+ rippleHostStyles,
56
+ };
@@ -0,0 +1,139 @@
1
+ import React, { useCallback, useRef, useState } from "react";
2
+
3
+ type Ripple = {
4
+ id: number;
5
+ x: number;
6
+ y: number;
7
+ size: number;
8
+ duration: number;
9
+ };
10
+
11
+ const HALF = 2;
12
+ const RIPPLE_SPEED_PX_PER_MS = 1.5;
13
+ const RIPPLE_MIN_DURATION_MS = 250;
14
+
15
+ const prefersReducedMotion = (): boolean => {
16
+ if (typeof window === "undefined") {
17
+ return false;
18
+ }
19
+ return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
20
+ };
21
+
22
+ const isDisabled = (el: HTMLElement): boolean => {
23
+ if ("disabled" in el && (el as HTMLButtonElement).disabled) {
24
+ return true;
25
+ }
26
+ return el.getAttribute("aria-disabled") === "true";
27
+ };
28
+
29
+ const isRippleDisabledByCssVar = (el: HTMLElement): boolean => {
30
+ if (typeof window === "undefined") {
31
+ return false;
32
+ }
33
+ return window.getComputedStyle(el).getPropertyValue("--miui-ripple").trim() === "0";
34
+ };
35
+
36
+ type UseRippleArgs<T extends HTMLElement> = {
37
+ ref: React.RefObject<T | null>;
38
+ onPointerDown?: React.PointerEventHandler<T> | undefined;
39
+ onKeyDown?: React.KeyboardEventHandler<T> | undefined;
40
+ /**
41
+ * If true, the ripple always emanates from the element's center,
42
+ * regardless of pointer position.
43
+ */
44
+ fromCenter?: boolean | undefined;
45
+ };
46
+
47
+ type UseRippleResult<T extends HTMLElement> = {
48
+ onPointerDown: React.PointerEventHandler<T>;
49
+ onKeyDown: React.KeyboardEventHandler<T>;
50
+ ripples: React.ReactNode;
51
+ };
52
+
53
+ /**
54
+ * Adds an Android-style ripple effect to an element.
55
+ *
56
+ * Pair with `rippleHostStyles` spread into the host's styled definition.
57
+ *
58
+ * - Triggered by pointer (mouse/touch/pen) and keyboard (Enter/Space — emanates from center).
59
+ * - Skipped when the host is `disabled` / `aria-disabled` or when `prefers-reduced-motion: reduce`.
60
+ * - Ripple duration scales with size (constant px/ms) so big and small elements feel the same.
61
+ */
62
+ // eslint-disable-next-line max-lines-per-function
63
+ const useRipple = <T extends HTMLElement>(args: UseRippleArgs<T>): UseRippleResult<T> => {
64
+ const { ref, onPointerDown, onKeyDown, fromCenter = false } = args;
65
+ const [ripples, setRipples] = useState<Ripple[]>([]);
66
+ const idCounter = useRef(0);
67
+
68
+ const addRippleAt = useCallback((clientX: number, clientY: number) => {
69
+ const el = ref.current;
70
+ if (!el || isDisabled(el) || prefersReducedMotion() || isRippleDisabledByCssVar(el)) {
71
+ return;
72
+ }
73
+ const rect = el.getBoundingClientRect();
74
+ const x = clientX - rect.left;
75
+ const y = clientY - rect.top;
76
+ const maxX = Math.max(x, rect.width - x);
77
+ const maxY = Math.max(y, rect.height - y);
78
+ const size = Math.hypot(maxX, maxY) * HALF;
79
+ const duration = Math.max(RIPPLE_MIN_DURATION_MS, size / RIPPLE_SPEED_PX_PER_MS);
80
+ idCounter.current += 1;
81
+ const id = idCounter.current;
82
+ setRipples((arr) => [...arr, { id, x, y, size, duration }]);
83
+ }, [ref]);
84
+
85
+ const handlePointerDown = useCallback<React.PointerEventHandler<T>>((evt) => {
86
+ if (fromCenter) {
87
+ const el = ref.current;
88
+ if (el) {
89
+ const rect = el.getBoundingClientRect();
90
+ addRippleAt(rect.left + (rect.width / HALF), rect.top + (rect.height / HALF));
91
+ }
92
+ }
93
+ else {
94
+ addRippleAt(evt.clientX, evt.clientY);
95
+ }
96
+ onPointerDown?.(evt);
97
+ }, [addRippleAt, onPointerDown, fromCenter, ref]);
98
+
99
+ const handleKeyDown = useCallback<React.KeyboardEventHandler<T>>((evt) => {
100
+ if (!evt.repeat && (evt.key === "Enter" || evt.key === " ")) {
101
+ const el = ref.current;
102
+ if (el) {
103
+ const rect = el.getBoundingClientRect();
104
+ addRippleAt(rect.left + (rect.width / HALF), rect.top + (rect.height / HALF));
105
+ }
106
+ }
107
+ onKeyDown?.(evt);
108
+ }, [addRippleAt, ref, onKeyDown]);
109
+
110
+ const handleAnimationEnd = useCallback<React.AnimationEventHandler<HTMLSpanElement>>((evt) => {
111
+ const id = Number(evt.currentTarget.dataset.rippleId);
112
+ setRipples((arr) => arr.filter((r) => r.id !== id));
113
+ }, []);
114
+
115
+ const elements = ripples.map((r) => (
116
+ <span
117
+ key={r.id}
118
+ data-miui-ripple={true}
119
+ data-ripple-id={r.id}
120
+ aria-hidden={true}
121
+ style={{
122
+ left: `${String(r.x - (r.size / HALF))}px`,
123
+ top: `${String(r.y - (r.size / HALF))}px`,
124
+ width: `${String(r.size)}px`,
125
+ height: `${String(r.size)}px`,
126
+ animationDuration: `${String(r.duration)}ms`,
127
+ }}
128
+ onAnimationEnd={handleAnimationEnd}
129
+ />
130
+ ));
131
+
132
+ return {
133
+ onPointerDown: handlePointerDown,
134
+ onKeyDown: handleKeyDown,
135
+ ripples: elements,
136
+ };
137
+ };
138
+
139
+ export { useRipple };
@@ -1 +0,0 @@
1
- export { ToolButton } from "./ToolButton.styled";