material-plus-ui 1.4.0 → 1.6.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 (211) hide show
  1. package/.fix.py +92 -0
  2. package/README.md +1 -1
  3. package/dist/components/accordion/MPAccordion.js +1 -1
  4. package/dist/components/alert/MPAlert.js +1 -1
  5. package/dist/components/animate-lighting/MPAnimateLighting.js +1 -1
  6. package/dist/components/aspect-ratio/MPAspectRatio.js +1 -1
  7. package/dist/components/avatar/MPAvatar.js +1 -1
  8. package/dist/components/avatar-group/MPAvatarGroup.js +1 -1
  9. package/dist/components/badge/MPBadge.js +1 -1
  10. package/dist/components/blockquote/MPBlockquote.js +1 -1
  11. package/dist/components/bottom-navigation/MPBottomNavigation.d.ts +17 -0
  12. package/dist/components/bottom-navigation/MPBottomNavigation.js +1 -1
  13. package/dist/components/breadcrumb/MPBreadcrumb.js +1 -1
  14. package/dist/components/button/MPButton.d.ts +49 -3
  15. package/dist/components/button/MPButton.js +1 -1
  16. package/dist/components/calendar/MPCalendar.d.ts +160 -0
  17. package/dist/components/calendar/MPCalendar.js +2 -0
  18. package/dist/components/calendar/index.d.ts +2 -0
  19. package/dist/components/calendar/index.js +1 -0
  20. package/dist/components/card/MPCard.js +1 -1
  21. package/dist/components/carousel/MPCarousel.js +1 -1
  22. package/dist/components/chat-bubble/MPChatBubble.js +1 -1
  23. package/dist/components/checkbox/MPCheckbox.d.ts +6 -0
  24. package/dist/components/checkbox/MPCheckbox.js +1 -1
  25. package/dist/components/chip/MPChip.d.ts +21 -6
  26. package/dist/components/chip/MPChip.js +1 -1
  27. package/dist/components/collapsible/MPCollapsible.js +1 -1
  28. package/dist/components/color-picker/MPColorPicker.js +1 -1
  29. package/dist/components/combobox/MPCombobox.d.ts +52 -3
  30. package/dist/components/combobox/MPCombobox.js +1 -1
  31. package/dist/components/command-palette/MPCommandPalette.d.ts +1 -1
  32. package/dist/components/command-palette/MPCommandPalette.js +1 -1
  33. package/dist/components/config/MPConfigProvider.d.ts +124 -0
  34. package/dist/components/config/MPConfigProvider.js +2 -0
  35. package/dist/components/config/index.d.ts +2 -0
  36. package/dist/components/config/index.js +1 -0
  37. package/dist/components/confirm/MPConfirmProvider.d.ts +143 -0
  38. package/dist/components/confirm/MPConfirmProvider.js +2 -0
  39. package/dist/components/confirm/index.d.ts +2 -0
  40. package/dist/components/confirm/index.js +1 -0
  41. package/dist/components/container/MPContainer.js +1 -1
  42. package/dist/components/date-picker/MPDatePicker.d.ts +53 -2
  43. package/dist/components/date-picker/MPDatePicker.js +1 -1
  44. package/dist/components/date-picker/index.d.ts +1 -1
  45. package/dist/components/date-range-picker/MPDateRangePicker.js +1 -1
  46. package/dist/components/date-time-picker/MPDateTimePicker.js +1 -1
  47. package/dist/components/dialog/MPDialog.d.ts +16 -3
  48. package/dist/components/dialog/MPDialog.js +1 -1
  49. package/dist/components/divider/MPDivider.js +1 -1
  50. package/dist/components/drawer/MPDrawer.d.ts +1 -1
  51. package/dist/components/drawer/MPDrawer.js +1 -1
  52. package/dist/components/empty/MPEmpty.js +1 -1
  53. package/dist/components/file-picker/MPFilePicker.d.ts +6 -0
  54. package/dist/components/file-picker/MPFilePicker.js +1 -1
  55. package/dist/components/floating-action-button/MPFloatingActionButton.js +1 -1
  56. package/dist/components/footer/MPFooter.js +1 -1
  57. package/dist/components/grid/MPGrid.d.ts +23 -1
  58. package/dist/components/grid/MPGrid.js +1 -1
  59. package/dist/components/header/MPHeader.js +1 -1
  60. package/dist/components/image/MPImage.d.ts +112 -0
  61. package/dist/components/image/MPImage.js +2 -0
  62. package/dist/components/image/index.d.ts +2 -0
  63. package/dist/components/image/index.js +1 -0
  64. package/dist/components/list/MPList.d.ts +28 -0
  65. package/dist/components/list/MPList.js +1 -1
  66. package/dist/components/menu/MPMenu.d.ts +25 -4
  67. package/dist/components/menu/MPMenu.js +1 -1
  68. package/dist/components/menubar/MPMenubar.d.ts +8 -1
  69. package/dist/components/menubar/MPMenubar.js +1 -1
  70. package/dist/components/navigation-menu/MPNavigationMenu.d.ts +8 -1
  71. package/dist/components/navigation-menu/MPNavigationMenu.js +1 -1
  72. package/dist/components/number-field/MPNumberField.d.ts +9 -3
  73. package/dist/components/number-field/MPNumberField.js +1 -1
  74. package/dist/components/otp-field/MPOtpField.js +1 -1
  75. package/dist/components/overlay/MPOverlay.d.ts +1 -1
  76. package/dist/components/overlay/MPOverlay.js +1 -1
  77. package/dist/components/pagination/MPPagination.js +1 -1
  78. package/dist/components/panes/MPPanes.js +1 -1
  79. package/dist/components/pill/MPPill.js +1 -1
  80. package/dist/components/popconfirm/MPPopconfirm.d.ts +92 -0
  81. package/dist/components/popconfirm/MPPopconfirm.js +2 -0
  82. package/dist/components/popconfirm/index.d.ts +2 -0
  83. package/dist/components/popconfirm/index.js +1 -0
  84. package/dist/components/popover/MPPopover.d.ts +1 -1
  85. package/dist/components/popover/MPPopover.js +1 -1
  86. package/dist/components/progress-box/MPProgressBox.js +1 -1
  87. package/dist/components/progress-circular/MPProgressCircular.js +1 -1
  88. package/dist/components/progress-linear/MPProgressLinear.js +1 -1
  89. package/dist/components/radio-group/MPRadioGroup.d.ts +12 -0
  90. package/dist/components/radio-group/MPRadioGroup.js +1 -1
  91. package/dist/components/rating/MPRating.js +1 -1
  92. package/dist/components/segmented-button/MPSegmentedButton.d.ts +7 -0
  93. package/dist/components/segmented-button/MPSegmentedButton.js +1 -1
  94. package/dist/components/select/MPSelect.d.ts +9 -2
  95. package/dist/components/select/MPSelect.js +1 -1
  96. package/dist/components/shortcut/MPShortcut.js +1 -1
  97. package/dist/components/sidebar/MPSidebar.js +1 -1
  98. package/dist/components/skeleton/MPSkeleton.js +1 -1
  99. package/dist/components/slider/MPSlider.d.ts +33 -0
  100. package/dist/components/slider/MPSlider.js +1 -1
  101. package/dist/components/snackbar/MPSnackbar.d.ts +20 -1
  102. package/dist/components/snackbar/MPSnackbar.js +1 -1
  103. package/dist/components/spoiler/MPSpoiler.js +1 -1
  104. package/dist/components/stepper/MPStepper.d.ts +153 -0
  105. package/dist/components/stepper/MPStepper.js +2 -0
  106. package/dist/components/stepper/index.d.ts +2 -0
  107. package/dist/components/stepper/index.js +1 -0
  108. package/dist/components/switch/MPSwitch.d.ts +6 -0
  109. package/dist/components/switch/MPSwitch.js +1 -1
  110. package/dist/components/table/MPTable.d.ts +1 -1
  111. package/dist/components/table/MPTable.js +1 -1
  112. package/dist/components/tabs/MPTabs.js +1 -1
  113. package/dist/components/text-field/MPTextField.d.ts +46 -14
  114. package/dist/components/text-field/MPTextField.js +1 -1
  115. package/dist/components/time-picker/MPTimePicker.js +1 -1
  116. package/dist/components/timeline/MPTimeline.d.ts +10 -2
  117. package/dist/components/timeline/MPTimeline.js +1 -1
  118. package/dist/components/toggle/MPToggle.js +1 -1
  119. package/dist/components/transfer/MPTransfer.js +1 -1
  120. package/dist/components/typography/MPTypography.d.ts +7 -0
  121. package/dist/components/typography/MPTypography.js +1 -2
  122. package/dist/components/visually-hidden/MPVisuallyHidden.d.ts +60 -0
  123. package/dist/components/visually-hidden/MPVisuallyHidden.js +2 -0
  124. package/dist/components/visually-hidden/index.d.ts +2 -0
  125. package/dist/components/visually-hidden/index.js +1 -0
  126. package/dist/constants/glyphs.d.ts +2 -0
  127. package/dist/constants/glyphs.js +1 -1
  128. package/dist/constants/icons.d.ts +1 -0
  129. package/dist/constants/icons.js +1 -1
  130. package/dist/hooks/index.d.ts +23 -0
  131. package/dist/hooks/index.js +1 -0
  132. package/dist/hooks/useMPColorScheme.d.ts +135 -0
  133. package/dist/hooks/useMPColorScheme.js +1 -0
  134. package/dist/hooks/useMPReducedMotion.d.ts +32 -0
  135. package/dist/hooks/useMPReducedMotion.js +1 -0
  136. package/dist/hooks/useMPShortcut.d.ts +105 -0
  137. package/dist/hooks/useMPShortcut.js +2 -0
  138. package/dist/hooks/useMPWindowClass.d.ts +48 -0
  139. package/dist/hooks/useMPWindowClass.js +1 -0
  140. package/dist/index.d.ts +8 -0
  141. package/dist/index.js +1 -1
  142. package/dist/internal/Calendar.d.ts +19 -4
  143. package/dist/internal/Calendar.js +1 -1
  144. package/dist/internal/Picker.d.ts +15 -3
  145. package/dist/internal/Picker.js +1 -1
  146. package/dist/internal/color-scheme.d.ts +28 -0
  147. package/dist/internal/color-scheme.js +2 -0
  148. package/dist/internal/config.d.ts +43 -0
  149. package/dist/internal/config.js +2 -0
  150. package/dist/internal/date.d.ts +50 -3
  151. package/dist/internal/date.js +1 -1
  152. package/dist/internal/i18n.d.ts +26 -1
  153. package/dist/internal/messages/confirm.d.ts +3 -0
  154. package/dist/internal/messages/confirm.js +1 -0
  155. package/dist/internal/messages/picker.js +1 -1
  156. package/dist/internal/progress.d.ts +14 -0
  157. package/dist/internal/step.d.ts +71 -0
  158. package/dist/internal/step.js +1 -0
  159. package/dist/internal/window-class.d.ts +21 -0
  160. package/dist/internal/window-class.js +2 -0
  161. package/dist/locales/ar.js +1 -1
  162. package/dist/locales/de.js +1 -1
  163. package/dist/locales/es.js +1 -1
  164. package/dist/locales/fr.js +1 -1
  165. package/dist/locales/hi.js +1 -1
  166. package/dist/locales/id.js +1 -1
  167. package/dist/locales/it.js +1 -1
  168. package/dist/locales/ja.js +1 -1
  169. package/dist/locales/ko.js +1 -1
  170. package/dist/locales/nl.js +1 -1
  171. package/dist/locales/pl.js +1 -1
  172. package/dist/locales/pt.js +1 -1
  173. package/dist/locales/ru.js +1 -1
  174. package/dist/locales/th.js +1 -1
  175. package/dist/locales/tr.js +1 -1
  176. package/dist/locales/vi.js +1 -1
  177. package/dist/locales/zh-hans.js +1 -1
  178. package/dist/locales/zh-hant.js +1 -1
  179. package/dist/styles/accordion.css +1 -1
  180. package/dist/styles/animate-lighting.css +1 -1
  181. package/dist/styles/aspect-ratio.css +1 -1
  182. package/dist/styles/bottom-navigation.css +1 -1
  183. package/dist/styles/calendar.css +2 -0
  184. package/dist/styles/chip.css +1 -1
  185. package/dist/styles/combobox.css +1 -1
  186. package/dist/styles/config.css +2 -0
  187. package/dist/styles/confirm.css +2 -0
  188. package/dist/styles/grid.css +1 -1
  189. package/dist/styles/highlight.css +1 -1
  190. package/dist/styles/image.css +2 -0
  191. package/dist/styles/list.css +1 -1
  192. package/dist/styles/panes.css +1 -1
  193. package/dist/styles/popconfirm.css +2 -0
  194. package/dist/styles/progress-box.css +1 -1
  195. package/dist/styles/progress-circular.css +1 -1
  196. package/dist/styles/progress-linear.css +1 -1
  197. package/dist/styles/rating.css +1 -1
  198. package/dist/styles/shortcut.css +1 -1
  199. package/dist/styles/slider.css +1 -1
  200. package/dist/styles/snackbar.css +1 -1
  201. package/dist/styles/stepper.css +2 -0
  202. package/dist/styles/text-field.css +1 -1
  203. package/dist/styles/timeline.css +1 -1
  204. package/dist/styles/tokens.css +1 -1
  205. package/dist/styles/transfer.css +1 -1
  206. package/dist/styles/typography.css +1 -1
  207. package/dist/styles/visually-hidden.css +2 -0
  208. package/dist/styles.css +1 -1
  209. package/dist/tailwind.css +91 -5
  210. package/dist/types.d.ts +64 -0
  211. package/package.json +6 -1
package/dist/tailwind.css CHANGED
@@ -128,7 +128,27 @@
128
128
  * `outline`, and a focus ring then reads as no change at all.
129
129
  */
130
130
  --mp-source-color: #00639b;
131
+ }
131
132
 
133
+ /*
134
+ * The light scheme's own tone stops, on `:root` and on anything that asks for
135
+ * light by name.
136
+ *
137
+ * The second selector is what makes forcing light **scoped** work. The dark
138
+ * block below applies to any element carrying the attribute, so a dark region
139
+ * inside a light page has always been one attribute; the reverse was not, and
140
+ * the documentation said it was. Under a system preference of dark, a
141
+ * `[data-mp-scheme='light']` on a section matched no rule at all — the media
142
+ * query had already retuned `:root`, the section inherited it, and nothing
143
+ * put the light stops back. It came out dark.
144
+ *
145
+ * `--mp-source-color` stays on `:root` alone and above this, deliberately.
146
+ * Repeating it here would freeze it: a consumer scoping a different source
147
+ * colour to a section would find this rule overriding theirs on any element
148
+ * that also asked for light.
149
+ */
150
+ :root,
151
+ [data-mp-scheme='light'] {
132
152
  /*
133
153
  * Tone stops.
134
154
  *
@@ -1194,6 +1214,11 @@
1194
1214
  * `min(span, columns)` is the clamp: `span={99}` fills its row instead of
1195
1215
  * running off the page, which is what the caller meant.
1196
1216
  *
1217
+ * `span="grow"` is the one width that is not this arithmetic. It is the row's
1218
+ * remainder, which nothing here can compute — only the flex algorithm knows what
1219
+ * is left after the other items have been laid out — so a growing item is given
1220
+ * a width of nought and a `flex-grow` of one, and takes the rest.
1221
+ *
1197
1222
  * Every slot cascades upward — each window size class falls back through the
1198
1223
  * ones below it — so `span={{ expanded: 6 }}` sets one custom property and not
1199
1224
  * five. The chains get long at `extra-large`; that is the cost of keeping the
@@ -1213,23 +1238,71 @@
1213
1238
  --_mp-cols: var(--_mp-cols-compact, 12);
1214
1239
  --_mp-gap-x: var(--_mp-gap-x-compact, 0px);
1215
1240
  --_mp-gap-y: var(--_mp-gap-y-compact, 0px);
1241
+
1242
+ /* The boundary, and the reason it has to exist.
1243
+ *
1244
+ * An item's slots are inline custom properties, and a custom property
1245
+ * *inherits*. So a grid nested inside an item — which is how nesting is spelled
1246
+ * — sits inside that item's `--_mp-span-large`, and an inner item that only
1247
+ * declared `--_mp-span-compact` resolves the outer one at every class above
1248
+ * compact: `span={12}` comes out a sixth of the row it is actually in, and the
1249
+ * card whose title it holds wraps a letter at a time.
1250
+ *
1251
+ * A grid is where a span stops meaning anything, so a grid is where the slots
1252
+ * are put back to nothing. `initial` on a custom property is the guaranteed-
1253
+ * invalid value, which is what makes the `var()` fallbacks below take over
1254
+ * rather than a number from two levels up. Fifteen declarations, once per
1255
+ * grid, and the arithmetic under them is the same as it was.
1256
+ *
1257
+ * Written on `.mp-grid` rather than on `.mp-grid-item` because an item that
1258
+ * reset its own slots would be resetting the ones it had just been given. */
1259
+ --_mp-span-compact: initial;
1260
+ --_mp-span-medium: initial;
1261
+ --_mp-span-expanded: initial;
1262
+ --_mp-span-large: initial;
1263
+ --_mp-span-extra-large: initial;
1264
+ --_mp-offset-compact: initial;
1265
+ --_mp-offset-medium: initial;
1266
+ --_mp-offset-expanded: initial;
1267
+ --_mp-offset-large: initial;
1268
+ --_mp-offset-extra-large: initial;
1269
+ --_mp-grow-compact: initial;
1270
+ --_mp-grow-medium: initial;
1271
+ --_mp-grow-expanded: initial;
1272
+ --_mp-grow-large: initial;
1273
+ --_mp-grow-extra-large: initial;
1216
1274
  }
1217
1275
 
1218
1276
  .mp-grid-item {
1219
1277
  --_mp-span: var(--_mp-span-compact, var(--_mp-cols, 12));
1220
1278
  --_mp-offset: var(--_mp-offset-compact, 0);
1279
+ --_mp-grow: var(--_mp-grow-compact, 0);
1221
1280
 
1222
1281
  /* One column plus one gutter. `--_mp-cols` and `--_mp-gap-x` are inherited
1223
1282
  from the grid, so this re-resolves on its own at every window class. */
1224
1283
  --_mp-track: calc((100% + var(--_mp-gap-x, 0px)) / var(--_mp-cols, 12));
1225
1284
 
1226
- /* Inseparable from the width under them: `flex` stops the row resizing the
1227
- item, `min-width` stops a long unbroken word doing the same, and
1228
- `box-sizing` is what makes the percentage mean the whole item. */
1285
+ /* Inseparable from the width under them: the three `flex` longhands stop the
1286
+ row resizing the item, `min-width` stops a long unbroken word doing the
1287
+ same, and `box-sizing` is what makes the percentage mean the whole item.
1288
+
1289
+ Longhands rather than `flex: 0 0 auto` because `--_mp-grow` is the one part
1290
+ of the shorthand that varies, and a shorthand cannot be half a variable. */
1229
1291
  box-sizing: border-box;
1230
- flex: 0 0 auto;
1292
+ flex-grow: var(--_mp-grow);
1293
+ flex-shrink: 0;
1294
+ flex-basis: auto;
1231
1295
  min-width: 0;
1232
- width: calc(var(--_mp-track) * min(var(--_mp-span), var(--_mp-cols, 12)) - var(--_mp-gap-x, 0px));
1296
+
1297
+ /* `1 - grow` is the switch, and it is arithmetic rather than a second
1298
+ declaration because a custom property cannot choose between two rules.
1299
+ A growing item measures nought and is then handed the row's remainder by
1300
+ `flex-grow`, which is the only place that remainder is known; every other
1301
+ item multiplies its column count by one and is the width it always was. */
1302
+ width: calc(
1303
+ (1 - var(--_mp-grow)) *
1304
+ (var(--_mp-track) * min(var(--_mp-span), var(--_mp-cols, 12)) - var(--_mp-gap-x, 0px))
1305
+ );
1233
1306
  margin-inline-start: calc(var(--_mp-track) * min(var(--_mp-offset), var(--_mp-cols, 12)));
1234
1307
  }
1235
1308
 
@@ -1243,6 +1316,7 @@
1243
1316
  .mp-grid-item {
1244
1317
  --_mp-span: var(--_mp-span-medium, var(--_mp-span-compact, var(--_mp-cols, 12)));
1245
1318
  --_mp-offset: var(--_mp-offset-medium, var(--_mp-offset-compact, 0));
1319
+ --_mp-grow: var(--_mp-grow-medium, var(--_mp-grow-compact, 0));
1246
1320
  }
1247
1321
  }
1248
1322
 
@@ -1262,6 +1336,7 @@
1262
1336
  --_mp-offset-expanded,
1263
1337
  var(--_mp-offset-medium, var(--_mp-offset-compact, 0))
1264
1338
  );
1339
+ --_mp-grow: var(--_mp-grow-expanded, var(--_mp-grow-medium, var(--_mp-grow-compact, 0)));
1265
1340
  }
1266
1341
  }
1267
1342
 
@@ -1290,6 +1365,10 @@
1290
1365
  --_mp-offset-large,
1291
1366
  var(--_mp-offset-expanded, var(--_mp-offset-medium, var(--_mp-offset-compact, 0)))
1292
1367
  );
1368
+ --_mp-grow: var(
1369
+ --_mp-grow-large,
1370
+ var(--_mp-grow-expanded, var(--_mp-grow-medium, var(--_mp-grow-compact, 0)))
1371
+ );
1293
1372
  }
1294
1373
  }
1295
1374
 
@@ -1336,6 +1415,13 @@
1336
1415
  var(--_mp-offset-expanded, var(--_mp-offset-medium, var(--_mp-offset-compact, 0)))
1337
1416
  )
1338
1417
  );
1418
+ --_mp-grow: var(
1419
+ --_mp-grow-extra-large,
1420
+ var(
1421
+ --_mp-grow-large,
1422
+ var(--_mp-grow-expanded, var(--_mp-grow-medium, var(--_mp-grow-compact, 0)))
1423
+ )
1424
+ );
1339
1425
  }
1340
1426
  }
1341
1427
 
package/dist/types.d.ts CHANGED
@@ -152,6 +152,70 @@ export interface MPStyleProps {
152
152
  /** Stretches the control to the width of its container. */
153
153
  fullWidth?: boolean;
154
154
  }
155
+ /**
156
+ * The raw events a control produces, for the handling its own callbacks do not
157
+ * cover.
158
+ *
159
+ * Every control here reports what it is *for* — an `MPTextField` hands over its
160
+ * text, an `MPSelect` its choice, an `MPDatePicker` its day — and that named
161
+ * callback is what a caller should reach for first. These are the other half:
162
+ * the keystroke that was not a change, the combination that means something to
163
+ * the page rather than to the field, the right-click that opens a menu of your
164
+ * own.
165
+ *
166
+ * ## They go on the control, not on the box
167
+ *
168
+ * Which is the opposite of where `className` goes, and for the reason that
169
+ * makes them different questions: a class describes the whole thing, and an
170
+ * event came from one element. So `onKeyDown` is a keystroke that landed in the
171
+ * field and never one that landed on the reveal toggle beside it, and `onFocus`
172
+ * is the control taking focus rather than anything in the row taking it.
173
+ *
174
+ * A `<div onKeyDown>` wrapped around a control gets some of this by bubbling,
175
+ * and that is what a caller had to write before. What it cannot do is go
176
+ * *first*.
177
+ *
178
+ * ## Yours runs first
179
+ *
180
+ * And a control that has its own answer for a key checks `defaultPrevented`
181
+ * before giving it. That is what makes `event.preventDefault()` a real answer
182
+ * rather than a suggestion: Ctrl+Enter can send a message without the field
183
+ * also reporting the plain submission it would otherwise have seen.
184
+ *
185
+ * `Element` is whichever element the component says it puts these on — an
186
+ * `<input>`, a trigger button — so `event.currentTarget` is typed as the thing
187
+ * it actually is.
188
+ */
189
+ export interface MPControlEventProps<Element extends HTMLElement = HTMLElement> {
190
+ /**
191
+ * Every keystroke that reaches the control, modifiers included — which makes
192
+ * this the one to reach for for a combination. It is also the only one of
193
+ * these where `preventDefault` still means anything.
194
+ */
195
+ onKeyDown?: React.KeyboardEventHandler<Element>;
196
+ /** The same keystroke released. */
197
+ onKeyUp?: React.KeyboardEventHandler<Element>;
198
+ /**
199
+ * The control took the focus.
200
+ *
201
+ * On the control itself rather than on the row, so it does not fire again for
202
+ * the button beside it — and it is what a form library wants for its "touched"
203
+ * bookkeeping, together with `onBlur`.
204
+ */
205
+ onFocus?: React.FocusEventHandler<Element>;
206
+ /** The control lost it. */
207
+ onBlur?: React.FocusEventHandler<Element>;
208
+ /** A press. The component's own answer to a press still happens. */
209
+ onClick?: React.MouseEventHandler<Element>;
210
+ /** Two presses. Selecting a field's whole value is the usual reason. */
211
+ onDoubleClick?: React.MouseEventHandler<Element>;
212
+ /**
213
+ * The right-click, or whatever opens a context menu on the platform.
214
+ * `event.preventDefault()` is how the browser's own menu is replaced with one
215
+ * of yours.
216
+ */
217
+ onContextMenu?: React.MouseEventHandler<Element>;
218
+ }
155
219
  /**
156
220
  * The props a glyph component is handed when Material Plus renders one.
157
221
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "material-plus-ui",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "description": "A React component library implementing Material Design 3 — the components other Material libraries do not ship, and wider versions of the ones they do. Built on Base UI and Tailwind CSS v4, themed with CSS custom properties so it can coexist with an existing Material setup. ESM only, types included.",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -54,6 +54,11 @@
54
54
  "module": "./dist/constants/icons.js",
55
55
  "default": "./dist/constants/icons.js"
56
56
  },
57
+ "./hooks": {
58
+ "types": "./dist/hooks/index.d.ts",
59
+ "module": "./dist/hooks/index.js",
60
+ "default": "./dist/hooks/index.js"
61
+ },
57
62
  "./components/*": {
58
63
  "types": "./dist/components/*/index.d.ts",
59
64
  "module": "./dist/components/*/index.js",