@knitui/dates 0.14.0 → 1.0.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 (225) hide show
  1. package/lib/commonjs/Calendar/Calendar.js +4 -4
  2. package/lib/commonjs/Calendar/Calendar.js.map +1 -1
  3. package/lib/commonjs/CalendarHeader/CalendarHeader.js +24 -152
  4. package/lib/commonjs/CalendarHeader/CalendarHeader.js.map +1 -1
  5. package/lib/commonjs/DatePicker/DatePicker.js +1 -1
  6. package/lib/commonjs/DatePickerInput/DatePickerInput.js +1 -1
  7. package/lib/commonjs/DateTimePicker/DateTimePicker.js +1 -1
  8. package/lib/commonjs/DatesProvider/DatesProvider.js +1 -1
  9. package/lib/commonjs/Day/Day.js +74 -142
  10. package/lib/commonjs/Day/Day.js.map +1 -1
  11. package/lib/commonjs/DecadeLevel/DecadeLevel.js +5 -5
  12. package/lib/commonjs/DecadeLevel/DecadeLevel.js.map +1 -1
  13. package/lib/commonjs/InlineDateTimePicker/InlineDateTimePicker.js +16 -7
  14. package/lib/commonjs/InlineDateTimePicker/InlineDateTimePicker.js.map +1 -1
  15. package/lib/commonjs/LevelsGroup/LevelsGroup.js +3 -3
  16. package/lib/commonjs/LevelsGroup/LevelsGroup.js.map +1 -1
  17. package/lib/commonjs/MiniCalendar/MiniCalendar.js +37 -173
  18. package/lib/commonjs/MiniCalendar/MiniCalendar.js.map +1 -1
  19. package/lib/commonjs/Month/Month.js +15 -62
  20. package/lib/commonjs/Month/Month.js.map +1 -1
  21. package/lib/commonjs/MonthLevel/MonthLevel.js +5 -5
  22. package/lib/commonjs/MonthLevel/MonthLevel.js.map +1 -1
  23. package/lib/commonjs/MonthPicker/MonthPicker.js +1 -1
  24. package/lib/commonjs/MonthPickerInput/MonthPickerInput.js +1 -1
  25. package/lib/commonjs/MonthsList/MonthsList.js +8 -9
  26. package/lib/commonjs/MonthsList/MonthsList.js.map +1 -1
  27. package/lib/commonjs/PickerControl/PickerControl.js +41 -121
  28. package/lib/commonjs/PickerControl/PickerControl.js.map +1 -1
  29. package/lib/commonjs/PickerInputBase/PickerInputBase.js +1 -1
  30. package/lib/commonjs/TimeControlsList/TimeControl.js +19 -48
  31. package/lib/commonjs/TimeControlsList/TimeControl.js.map +1 -1
  32. package/lib/commonjs/TimeControlsList/TimeControlsList.js +1 -1
  33. package/lib/commonjs/TimeControlsList/TimeControlsList.js.map +1 -1
  34. package/lib/commonjs/TimeGrid/TimeGrid.js +50 -97
  35. package/lib/commonjs/TimeGrid/TimeGrid.js.map +1 -1
  36. package/lib/commonjs/TimeInput/TimeInput.js +1 -1
  37. package/lib/commonjs/TimePicker/TimePicker.js +20 -20
  38. package/lib/commonjs/TimePicker/TimePicker.js.map +1 -1
  39. package/lib/commonjs/TimePresets/TimePresetControl.js +32 -62
  40. package/lib/commonjs/TimePresets/TimePresetControl.js.map +1 -1
  41. package/lib/commonjs/TimePresets/TimePresetGroup.js +5 -5
  42. package/lib/commonjs/TimePresets/TimePresetGroup.js.map +1 -1
  43. package/lib/commonjs/TimePresets/TimePresets.js +4 -4
  44. package/lib/commonjs/TimePresets/TimePresets.js.map +1 -1
  45. package/lib/commonjs/TimeValue/TimeValue.js +2 -2
  46. package/lib/commonjs/WeekdaysRow/WeekdaysRow.js +7 -38
  47. package/lib/commonjs/WeekdaysRow/WeekdaysRow.js.map +1 -1
  48. package/lib/commonjs/YearLevel/YearLevel.js +5 -5
  49. package/lib/commonjs/YearLevel/YearLevel.js.map +1 -1
  50. package/lib/commonjs/YearPicker/YearPicker.js +1 -1
  51. package/lib/commonjs/YearPickerInput/YearPickerInput.js +1 -1
  52. package/lib/commonjs/YearsList/YearsList.js +8 -9
  53. package/lib/commonjs/YearsList/YearsList.js.map +1 -1
  54. package/lib/commonjs/_reference/ExampleControl.js +26 -91
  55. package/lib/commonjs/_reference/ExampleControl.js.map +1 -1
  56. package/lib/commonjs/_reference/README.md +3 -3
  57. package/lib/commonjs/cell-metrics.js +167 -37
  58. package/lib/commonjs/cell-metrics.js.map +1 -1
  59. package/lib/commonjs/internal/a11y.js +5 -3
  60. package/lib/commonjs/internal/a11y.js.map +1 -1
  61. package/lib/commonjs/internal/get-input-default-date.js +1 -1
  62. package/lib/commonjs/internal/select-on-focus.js +1 -1
  63. package/lib/module/Calendar/Calendar.js +5 -5
  64. package/lib/module/Calendar/Calendar.js.map +1 -1
  65. package/lib/module/CalendarHeader/CalendarHeader.js +26 -155
  66. package/lib/module/CalendarHeader/CalendarHeader.js.map +1 -1
  67. package/lib/module/DatePicker/DatePicker.js +1 -1
  68. package/lib/module/DatePickerInput/DatePickerInput.js +1 -1
  69. package/lib/module/DateTimePicker/DateTimePicker.js +1 -1
  70. package/lib/module/DatesProvider/DatesProvider.js +1 -1
  71. package/lib/module/Day/Day.js +76 -144
  72. package/lib/module/Day/Day.js.map +1 -1
  73. package/lib/module/DecadeLevel/DecadeLevel.js +6 -6
  74. package/lib/module/DecadeLevel/DecadeLevel.js.map +1 -1
  75. package/lib/module/InlineDateTimePicker/InlineDateTimePicker.js +16 -7
  76. package/lib/module/InlineDateTimePicker/InlineDateTimePicker.js.map +1 -1
  77. package/lib/module/LevelsGroup/LevelsGroup.js +4 -4
  78. package/lib/module/LevelsGroup/LevelsGroup.js.map +1 -1
  79. package/lib/module/MiniCalendar/MiniCalendar.js +39 -175
  80. package/lib/module/MiniCalendar/MiniCalendar.js.map +1 -1
  81. package/lib/module/Month/Month.js +17 -64
  82. package/lib/module/Month/Month.js.map +1 -1
  83. package/lib/module/MonthLevel/MonthLevel.js +6 -6
  84. package/lib/module/MonthLevel/MonthLevel.js.map +1 -1
  85. package/lib/module/MonthPicker/MonthPicker.js +1 -1
  86. package/lib/module/MonthPickerInput/MonthPickerInput.js +1 -1
  87. package/lib/module/MonthsList/MonthsList.js +9 -10
  88. package/lib/module/MonthsList/MonthsList.js.map +1 -1
  89. package/lib/module/PickerControl/PickerControl.js +42 -122
  90. package/lib/module/PickerControl/PickerControl.js.map +1 -1
  91. package/lib/module/PickerInputBase/PickerInputBase.js +1 -1
  92. package/lib/module/TimeControlsList/TimeControl.js +20 -49
  93. package/lib/module/TimeControlsList/TimeControl.js.map +1 -1
  94. package/lib/module/TimeControlsList/TimeControlsList.js +1 -1
  95. package/lib/module/TimeControlsList/TimeControlsList.js.map +1 -1
  96. package/lib/module/TimeGrid/TimeGrid.js +53 -100
  97. package/lib/module/TimeGrid/TimeGrid.js.map +1 -1
  98. package/lib/module/TimeInput/TimeInput.js +1 -1
  99. package/lib/module/TimePicker/TimePicker.js +20 -20
  100. package/lib/module/TimePicker/TimePicker.js.map +1 -1
  101. package/lib/module/TimePresets/TimePresetControl.js +36 -65
  102. package/lib/module/TimePresets/TimePresetControl.js.map +1 -1
  103. package/lib/module/TimePresets/TimePresetGroup.js +6 -6
  104. package/lib/module/TimePresets/TimePresetGroup.js.map +1 -1
  105. package/lib/module/TimePresets/TimePresets.js +4 -4
  106. package/lib/module/TimePresets/TimePresets.js.map +1 -1
  107. package/lib/module/TimeValue/TimeValue.js +2 -2
  108. package/lib/module/WeekdaysRow/WeekdaysRow.js +8 -39
  109. package/lib/module/WeekdaysRow/WeekdaysRow.js.map +1 -1
  110. package/lib/module/YearLevel/YearLevel.js +6 -6
  111. package/lib/module/YearLevel/YearLevel.js.map +1 -1
  112. package/lib/module/YearPicker/YearPicker.js +1 -1
  113. package/lib/module/YearPickerInput/YearPickerInput.js +1 -1
  114. package/lib/module/YearsList/YearsList.js +9 -10
  115. package/lib/module/YearsList/YearsList.js.map +1 -1
  116. package/lib/module/_reference/ExampleControl.js +28 -93
  117. package/lib/module/_reference/ExampleControl.js.map +1 -1
  118. package/lib/module/_reference/README.md +3 -3
  119. package/lib/module/cell-metrics.js +166 -36
  120. package/lib/module/cell-metrics.js.map +1 -1
  121. package/lib/module/internal/a11y.js +5 -3
  122. package/lib/module/internal/a11y.js.map +1 -1
  123. package/lib/module/internal/get-input-default-date.js +1 -1
  124. package/lib/module/internal/select-on-focus.js +1 -1
  125. package/lib/typescript/Calendar/Calendar.d.ts +28 -21
  126. package/lib/typescript/Calendar/Calendar.d.ts.map +1 -1
  127. package/lib/typescript/Calendar/pick-calendar-props/pick-calendar-props.d.ts +1 -1
  128. package/lib/typescript/CalendarHeader/CalendarHeader.d.ts +190 -53
  129. package/lib/typescript/CalendarHeader/CalendarHeader.d.ts.map +1 -1
  130. package/lib/typescript/Day/Day.d.ts +103 -84
  131. package/lib/typescript/Day/Day.d.ts.map +1 -1
  132. package/lib/typescript/DecadeLevel/DecadeLevel.d.ts +172 -71
  133. package/lib/typescript/DecadeLevel/DecadeLevel.d.ts.map +1 -1
  134. package/lib/typescript/DecadeLevelGroup/DecadeLevelGroup.d.ts +171 -86
  135. package/lib/typescript/DecadeLevelGroup/DecadeLevelGroup.d.ts.map +1 -1
  136. package/lib/typescript/InlineDateTimePicker/InlineDateTimePicker.d.ts +64 -12
  137. package/lib/typescript/InlineDateTimePicker/InlineDateTimePicker.d.ts.map +1 -1
  138. package/lib/typescript/LevelsGroup/LevelsGroup.d.ts +27 -20
  139. package/lib/typescript/LevelsGroup/LevelsGroup.d.ts.map +1 -1
  140. package/lib/typescript/MiniCalendar/MiniCalendar.d.ts +247 -61
  141. package/lib/typescript/MiniCalendar/MiniCalendar.d.ts.map +1 -1
  142. package/lib/typescript/Month/Month.d.ts +164 -43
  143. package/lib/typescript/Month/Month.d.ts.map +1 -1
  144. package/lib/typescript/MonthLevel/MonthLevel.d.ts +208 -79
  145. package/lib/typescript/MonthLevel/MonthLevel.d.ts.map +1 -1
  146. package/lib/typescript/MonthLevelGroup/MonthLevelGroup.d.ts +207 -94
  147. package/lib/typescript/MonthLevelGroup/MonthLevelGroup.d.ts.map +1 -1
  148. package/lib/typescript/MonthsList/MonthsList.d.ts +91 -26
  149. package/lib/typescript/MonthsList/MonthsList.d.ts.map +1 -1
  150. package/lib/typescript/PickerControl/PickerControl.d.ts +79 -59
  151. package/lib/typescript/PickerControl/PickerControl.d.ts.map +1 -1
  152. package/lib/typescript/TimeControlsList/TimeControl.d.ts +19 -4
  153. package/lib/typescript/TimeControlsList/TimeControl.d.ts.map +1 -1
  154. package/lib/typescript/TimeControlsList/TimeControlsList.d.ts +66 -12
  155. package/lib/typescript/TimeControlsList/TimeControlsList.d.ts.map +1 -1
  156. package/lib/typescript/TimeGrid/TimeGrid.d.ts +98 -34
  157. package/lib/typescript/TimeGrid/TimeGrid.d.ts.map +1 -1
  158. package/lib/typescript/TimePicker/TimePicker.d.ts +43 -7
  159. package/lib/typescript/TimePicker/TimePicker.d.ts.map +1 -1
  160. package/lib/typescript/TimePresets/TimePresetControl.d.ts +65 -10
  161. package/lib/typescript/TimePresets/TimePresetControl.d.ts.map +1 -1
  162. package/lib/typescript/TimePresets/TimePresetGroup.d.ts +132 -44
  163. package/lib/typescript/TimePresets/TimePresetGroup.d.ts.map +1 -1
  164. package/lib/typescript/TimePresets/TimePresets.d.ts +237 -64
  165. package/lib/typescript/TimePresets/TimePresets.d.ts.map +1 -1
  166. package/lib/typescript/WeekdaysRow/WeekdaysRow.d.ts +81 -27
  167. package/lib/typescript/WeekdaysRow/WeekdaysRow.d.ts.map +1 -1
  168. package/lib/typescript/YearLevel/YearLevel.d.ts +172 -71
  169. package/lib/typescript/YearLevel/YearLevel.d.ts.map +1 -1
  170. package/lib/typescript/YearLevelGroup/YearLevelGroup.d.ts +171 -86
  171. package/lib/typescript/YearLevelGroup/YearLevelGroup.d.ts.map +1 -1
  172. package/lib/typescript/YearsList/YearsList.d.ts +91 -26
  173. package/lib/typescript/YearsList/YearsList.d.ts.map +1 -1
  174. package/lib/typescript/_reference/ExampleControl.d.ts +163 -43
  175. package/lib/typescript/_reference/ExampleControl.d.ts.map +1 -1
  176. package/lib/typescript/cell-metrics.d.ts +120 -0
  177. package/lib/typescript/cell-metrics.d.ts.map +1 -1
  178. package/lib/typescript/internal/a11y.d.ts +0 -14
  179. package/lib/typescript/internal/a11y.d.ts.map +1 -1
  180. package/package.json +5 -5
  181. package/src/Calendar/Calendar.tsx +6 -5
  182. package/src/CalendarHeader/CalendarHeader.tsx +32 -74
  183. package/src/DatePicker/DatePicker.tsx +1 -1
  184. package/src/DatePickerInput/DatePickerInput.tsx +1 -1
  185. package/src/DateTimePicker/DateTimePicker.tsx +1 -1
  186. package/src/DatesProvider/DatesProvider.tsx +1 -1
  187. package/src/Day/Day.tsx +85 -82
  188. package/src/DecadeLevel/DecadeLevel.tsx +7 -5
  189. package/src/InlineDateTimePicker/InlineDateTimePicker.tsx +14 -7
  190. package/src/LevelsGroup/LevelsGroup.tsx +13 -13
  191. package/src/MiniCalendar/MiniCalendar.tsx +47 -91
  192. package/src/Month/Month.tsx +21 -37
  193. package/src/MonthLevel/MonthLevel.tsx +7 -5
  194. package/src/MonthPicker/MonthPicker.tsx +1 -1
  195. package/src/MonthPickerInput/MonthPickerInput.tsx +1 -1
  196. package/src/MonthsList/MonthsList.tsx +9 -10
  197. package/src/PickerControl/PickerControl.tsx +44 -89
  198. package/src/PickerInputBase/PickerInputBase.tsx +1 -1
  199. package/src/TimeControlsList/TimeControl.tsx +17 -28
  200. package/src/TimeControlsList/TimeControlsList.tsx +1 -1
  201. package/src/TimeGrid/TimeGrid.tsx +71 -61
  202. package/src/TimeInput/TimeInput.tsx +1 -1
  203. package/src/TimePicker/TimePicker.tsx +15 -15
  204. package/src/TimePresets/TimePresetControl.tsx +30 -45
  205. package/src/TimePresets/TimePresetGroup.tsx +7 -5
  206. package/src/TimePresets/TimePresets.tsx +4 -4
  207. package/src/TimeValue/TimeValue.tsx +2 -2
  208. package/src/WeekdaysRow/WeekdaysRow.tsx +9 -17
  209. package/src/YearLevel/YearLevel.tsx +121 -117
  210. package/src/YearPicker/YearPicker.tsx +1 -1
  211. package/src/YearPickerInput/YearPickerInput.tsx +1 -1
  212. package/src/YearsList/YearsList.tsx +142 -141
  213. package/src/_reference/ExampleControl.tsx +29 -53
  214. package/src/_reference/README.md +3 -3
  215. package/src/cell-metrics.ts +110 -36
  216. package/src/internal/a11y.ts +6 -3
  217. package/src/internal/get-input-default-date.ts +1 -1
  218. package/src/internal/select-on-focus.ts +1 -1
  219. package/lib/commonjs/internal/web-cursor.js +0 -24
  220. package/lib/commonjs/internal/web-cursor.js.map +0 -1
  221. package/lib/module/internal/web-cursor.js +0 -20
  222. package/lib/module/internal/web-cursor.js.map +0 -1
  223. package/lib/typescript/internal/web-cursor.d.ts +0 -10
  224. package/lib/typescript/internal/web-cursor.d.ts.map +0 -1
  225. package/src/internal/web-cursor.ts +0 -15
@@ -37,7 +37,7 @@
37
37
  // labelled `TimePicker` segments, and the submit `ActionIcon`.
38
38
  // 13. The `<Type>` generic is preserved through `forwardRef` (which would
39
39
  // otherwise pin it at `"default"`), so the ref is forwarded via a typed
40
- // `forwardRef` rather than `.styleable` — the documented sibling-picker
40
+ // `forwardRef` rather than `styleable()` — the documented sibling-picker
41
41
  // pattern (`DatePicker` / `DateTimePicker`).
42
42
  // 14. The styled wrapper parts (`.TimeWrapper` / `.TimeInput` / `.SubmitButton`
43
43
  // / `.RangeInfo`) are attached as static properties so consumers can
@@ -90,19 +90,26 @@ export type InlineDateTimePickerSubmitButtonProps = ActionIconProps;
90
90
  // to land on — the calendar twin of Mantine's `timeWrapper` / `rangeInfo`
91
91
  // class-name slots.
92
92
 
93
+ /**
94
+ * The root's `fullWidth` stretch, spread CONDITIONALLY: in v3 an explicit
95
+ * `width={undefined}` still claims the call-site slot and clears a slot/consumer
96
+ * width, so the prop is only present when it is on.
97
+ */
98
+ const FULL_WIDTH = { width: "100%" } as const;
99
+
93
100
  /** Row wrapping the time input(s) and the submit button. */
94
101
  const InlineDateTimePickerTimeWrapper = styled(Box, {
95
- name: "InlineDateTimePickerTimeWrapper",
102
+ displayName: "InlineDateTimePickerTimeWrapper",
96
103
  flexDirection: "row",
97
104
  alignItems: "center",
98
- gap: "$xs",
99
- marginTop: "$xs",
105
+ gap: "xs",
106
+ marginTop: "xs",
100
107
  });
101
108
 
102
109
  /** Read-only summary of the selected range (range mode only). */
103
110
  const InlineDateTimePickerRangeInfo = styled(Text, {
104
- name: "InlineDateTimePickerRangeInfo",
105
- marginTop: "$xs",
111
+ displayName: "InlineDateTimePickerRangeInfo",
112
+ marginTop: "xs",
106
113
  });
107
114
 
108
115
  /**
@@ -446,7 +453,7 @@ function InlineDateTimePickerInner<Type extends DatePickerType = "default">(
446
453
  );
447
454
 
448
455
  return (
449
- <Box ref={ref} width={_fullWidth ? "100%" : undefined} {...s.get("root")} {...others}>
456
+ <Box ref={ref} {...(_fullWidth ? FULL_WIDTH : null)} {...s.get("root")} {...others}>
450
457
  <DatePicker
451
458
  // `fullWidth` makes the calendar fill BOTH axes (its frame carries
452
459
  // `flexGrow: 1`), so when the picker is given a height the calendar fills
@@ -25,14 +25,14 @@
25
25
  // What this frame DOES carry: provenance header (#1); the `styled(Box)` root
26
26
  // Frame (#5); the `fullWidth` stretch as a boolean VARIANT, not a dynamic style
27
27
  // prop, which is the compiler-safe form (#15 — no `._o-0`-style dynamic flatten);
28
- // `.styleable` ref + style-prop forwarding to the root (#13); the styled Frame
28
+ // `styleable()` ref + style-prop forwarding to the root (#13); the styled Frame
29
29
  // exposed via `withStaticProperties` (#14). A11y (#11) is deliberately
30
30
  // FORWARDABLE rather than baked: Mantine's `LevelsGroup` carries no role of its
31
31
  // own, and the callers pass `role="group"` (see `DecadeLevelGroup`), so the role
32
32
  // flows through unchanged via `{...rest}` and is not hard-coded here.
33
33
  // ───────────────────────────────────────────────────────────────────────────
34
34
  import { Box } from "@knitui/components";
35
- import { type GetProps, styled, withStaticProperties } from "@knitui/core";
35
+ import { type GetProps, styleable, styled, withStaticProperties } from "@knitui/core";
36
36
 
37
37
  import { type CalendarSize, CELL_SPACING } from "../cell-metrics";
38
38
 
@@ -44,7 +44,7 @@ import { type CalendarSize, CELL_SPACING } from "../cell-metrics";
44
44
  * column to an equal share of the container).
45
45
  */
46
46
  const LevelsGroupFrame = styled(Box, {
47
- name: "LevelsGroup",
47
+ displayName: "LevelsGroup",
48
48
  flexDirection: "row",
49
49
  // A small fixed gap between adjacent level columns, matching the calendar's
50
50
  // shared cell spacing so columns read as one calendar (Mantine uses a fixed
@@ -93,17 +93,17 @@ export interface LevelsGroupProps extends LevelsGroupFrameProps {
93
93
  * <MonthLevel month="2024-02-01" />
94
94
  * </LevelsGroup>
95
95
  */
96
- const LevelsGroupComponent = LevelsGroupFrame.styleable<LevelsGroupProps>(function LevelsGroup(
97
- { size: _size, ...rest },
98
- ref,
99
- ) {
100
- // `size` is intentionally swallowed: the row layout does not depend on it,
101
- // and forwarding it to the host would leak an unknown attribute. Levels are
102
- // sized by their own `size` prop, set by the parent group.
103
- void _size;
96
+ const LevelsGroupComponent = styleable<LevelsGroupProps>(
97
+ LevelsGroupFrame,
98
+ function LevelsGroup({ size: _size, ...rest }, ref) {
99
+ // `size` is intentionally swallowed: the row layout does not depend on it,
100
+ // and forwarding it to the host would leak an unknown attribute. Levels are
101
+ // sized by their own `size` prop, set by the parent group.
102
+ void _size;
104
103
 
105
- return <LevelsGroupFrame ref={ref} {...rest} />;
106
- });
104
+ return <LevelsGroupFrame ref={ref} {...rest} />;
105
+ },
106
+ );
107
107
 
108
108
  LevelsGroupComponent.displayName = "@knitui/dates/LevelsGroup";
109
109
 
@@ -31,15 +31,22 @@ import {
31
31
  type GetProps,
32
32
  slotStyles,
33
33
  type SlotStyles,
34
+ styleable,
34
35
  styled,
35
36
  withStaticProperties,
36
37
  } from "@knitui/core";
37
38
  import { useUncontrolled } from "@knitui/hooks";
38
39
 
39
- import { type CalendarSize, CELL_FONT, CELL_WIDTH } from "../cell-metrics";
40
+ import {
41
+ type CalendarSize,
42
+ CELL_FONT,
43
+ cellFontVariant,
44
+ cellMinWidthVariant,
45
+ cellSquareVariant,
46
+ iconFontVariant,
47
+ } from "../cell-metrics";
40
48
  import { useDatesContext } from "../DatesProvider";
41
49
  import { controlA11yProps } from "../internal/a11y";
42
- import { webCursor } from "../internal/web-cursor";
43
50
  import type { DateStringValue } from "../types";
44
51
  import { isAfterMinDate, isBeforeMaxDate, toDateString } from "../utils";
45
52
 
@@ -55,39 +62,6 @@ const MiniCalendarContext = createStyledContext<{ size: CalendarSize }>({ size:
55
62
  // retuning a ladder moves every grid component together. The raw values resolve
56
63
  // at module-load — NOT `getTokenValue`, which needs the live config.
57
64
 
58
- /** Square prev/next control size per `size`, from the shared `CELL_WIDTH` ladder. */
59
- const controlSquareVariant = {
60
- xxs: { width: CELL_WIDTH.xxs, height: CELL_WIDTH.xxs },
61
- xs: { width: CELL_WIDTH.xs, height: CELL_WIDTH.xs },
62
- sm: { width: CELL_WIDTH.sm, height: CELL_WIDTH.sm },
63
- md: { width: CELL_WIDTH.md, height: CELL_WIDTH.md },
64
- lg: { width: CELL_WIDTH.lg, height: CELL_WIDTH.lg },
65
- xl: { width: CELL_WIDTH.xl, height: CELL_WIDTH.xl },
66
- xxl: { width: CELL_WIDTH.xxl, height: CELL_WIDTH.xxl },
67
- } as const;
68
-
69
- /** Day-cell minimum width per `size` (taller than wide — two stacked labels). */
70
- const dayWidthVariant = {
71
- xxs: { minWidth: CELL_WIDTH.xxs },
72
- xs: { minWidth: CELL_WIDTH.xs },
73
- sm: { minWidth: CELL_WIDTH.sm },
74
- md: { minWidth: CELL_WIDTH.md },
75
- lg: { minWidth: CELL_WIDTH.lg },
76
- xl: { minWidth: CELL_WIDTH.xl },
77
- xxl: { minWidth: CELL_WIDTH.xxl },
78
- } as const;
79
-
80
- /** Day-number font per `size` (the shared cell-label ladder). */
81
- const dayNumberFontVariant = {
82
- xxs: { fontSize: CELL_FONT.xxs },
83
- xs: { fontSize: CELL_FONT.xs },
84
- sm: { fontSize: CELL_FONT.sm },
85
- md: { fontSize: CELL_FONT.md },
86
- lg: { fontSize: CELL_FONT.lg },
87
- xl: { fontSize: CELL_FONT.xl },
88
- xxl: { fontSize: CELL_FONT.xxl },
89
- } as const;
90
-
91
65
  /** Month-label font per `size` (≈ 72% of the day-number font). */
92
66
  const monthFontVariant = {
93
67
  xxs: { fontSize: Math.round(CELL_FONT.xxs * 0.72) },
@@ -99,51 +73,37 @@ const monthFontVariant = {
99
73
  xxl: { fontSize: Math.round(CELL_FONT.xxl * 0.72) },
100
74
  } as const;
101
75
 
102
- /** Chevron glyph font per `size` (≈ 55% of the control size). */
103
- const chevronFontVariant = {
104
- xxs: { fontSize: Math.round(CELL_WIDTH.xxs * 0.55) },
105
- xs: { fontSize: Math.round(CELL_WIDTH.xs * 0.55) },
106
- sm: { fontSize: Math.round(CELL_WIDTH.sm * 0.55) },
107
- md: { fontSize: Math.round(CELL_WIDTH.md * 0.55) },
108
- lg: { fontSize: Math.round(CELL_WIDTH.lg * 0.55) },
109
- xl: { fontSize: Math.round(CELL_WIDTH.xl * 0.55) },
110
- xxl: { fontSize: Math.round(CELL_WIDTH.xxl * 0.55) },
111
- } as const;
112
-
113
76
  // ── Styled parts ────────────────────────────────────────────────────────────
114
77
 
115
78
  /** The root row: prev control · day strip · next control. */
116
79
  const MiniCalendarFrame = styled(Box, {
117
- name: "MiniCalendar",
80
+ displayName: "MiniCalendar",
118
81
  context: MiniCalendarContext,
119
82
  flexDirection: "row",
120
83
  alignItems: "center",
121
- gap: "$xs",
84
+ gap: "xs",
122
85
  });
123
86
 
124
87
  /** Prev/next square control — chevron button. */
125
88
  const MiniCalendarControl = styled(UnstyledButton.Frame, {
126
- name: "MiniCalendarControl",
89
+ displayName: "MiniCalendarControl",
127
90
  context: MiniCalendarContext,
128
91
  alignItems: "center",
129
92
  justifyContent: "center",
130
- borderRadius: "$sm",
131
- backgroundColor: "transparent",
132
- ...webCursor("pointer"),
133
- hoverStyle: { backgroundColor: "$color2" },
134
- pressStyle: { backgroundColor: "$color3" },
93
+ borderRadius: "sm",
94
+ backgroundColor: "transparent hover:color2 press:color3",
95
+ cursor: "web:pointer",
135
96
 
136
97
  variants: {
137
- size: controlSquareVariant,
98
+ size: cellSquareVariant,
138
99
 
139
100
  /** Disabled control — dimmed, non-interactive (Mantine parity: 0.3). */
140
101
  disabled: {
141
102
  true: {
142
103
  opacity: 0.3,
143
104
  pointerEvents: "none",
144
- ...webCursor("not-allowed"),
145
- hoverStyle: { backgroundColor: "transparent" },
146
- pressStyle: { backgroundColor: "transparent" },
105
+ cursor: "web:not-allowed",
106
+ backgroundColor: "hover:transparent press:transparent",
147
107
  },
148
108
  },
149
109
  } as const,
@@ -153,17 +113,17 @@ const MiniCalendarControl = styled(UnstyledButton.Frame, {
153
113
 
154
114
  /** The horizontal day strip wrapping the day buttons. */
155
115
  const MiniCalendarDays = styled(Box, {
156
- name: "MiniCalendarDays",
116
+ displayName: "MiniCalendarDays",
157
117
  context: MiniCalendarContext,
158
118
  flexDirection: "row",
159
119
  alignItems: "stretch",
160
- gap: "$xxs",
120
+ gap: "xxs",
161
121
  });
162
122
 
163
123
  /**
164
124
  * A single day button — month label stacked over the day-of-month number.
165
125
  *
166
- * 12. Interaction lives in real Tamagui pseudo-state (`hoverStyle`/`pressStyle`)
126
+ * 12. Interaction lives in real Tamagui pseudo-state (`hover:`/`press:` clauses)
167
127
  * and a `disabled` variant (Mantine parity: 0.3 + non-interactive), never a
168
128
  * runtime `onHoverIn` state machine.
169
129
  * 15. The selected look is a boolean `selected` VARIANT (accent fill via the
@@ -171,29 +131,25 @@ const MiniCalendarDays = styled(Box, {
171
131
  * the compiler can never extract a hide value onto the cell.
172
132
  */
173
133
  const MiniCalendarDay = styled(UnstyledButton.Frame, {
174
- name: "MiniCalendarDay",
134
+ displayName: "MiniCalendarDay",
175
135
  context: MiniCalendarContext,
176
136
  flexDirection: "column",
177
137
  alignItems: "center",
178
138
  justifyContent: "center",
179
139
  gap: 2,
180
- paddingVertical: "$xs",
181
- paddingHorizontal: "$xxs",
182
- borderRadius: "$sm",
183
- backgroundColor: "transparent",
184
- ...webCursor("pointer"),
185
- hoverStyle: { backgroundColor: "$color2" },
186
- pressStyle: { backgroundColor: "$color3" },
140
+ paddingVertical: "xs",
141
+ paddingHorizontal: "xxs",
142
+ borderRadius: "sm",
143
+ backgroundColor: "transparent hover:color2 press:color3",
144
+ cursor: "web:pointer",
187
145
 
188
146
  variants: {
189
- size: dayWidthVariant,
147
+ size: cellMinWidthVariant,
190
148
 
191
- /** Selected day — solid accent fill (the active theme's `$color9`). */
149
+ /** Selected day — solid accent fill (the active theme's `color9`). */
192
150
  selected: {
193
151
  true: {
194
- backgroundColor: "$color9",
195
- hoverStyle: { backgroundColor: "$color10" },
196
- pressStyle: { backgroundColor: "$color8" },
152
+ backgroundColor: "color9 hover:color10 press:color8",
197
153
  },
198
154
  },
199
155
 
@@ -202,9 +158,8 @@ const MiniCalendarDay = styled(UnstyledButton.Frame, {
202
158
  true: {
203
159
  opacity: 0.3,
204
160
  pointerEvents: "none",
205
- ...webCursor("not-allowed"),
206
- hoverStyle: { backgroundColor: "transparent" },
207
- pressStyle: { backgroundColor: "transparent" },
161
+ cursor: "web:not-allowed",
162
+ backgroundColor: "hover:transparent press:transparent",
208
163
  },
209
164
  },
210
165
  } as const,
@@ -216,7 +171,7 @@ const MiniCalendarDay = styled(UnstyledButton.Frame, {
216
171
  * The small month label rendered above every day's number (Mantine parity:
217
172
  * `.dayMonth` is always present, never toggled per-day). It's the regular
218
173
  * foreground dimmed to `opacity: 0.65` (NOT an accent-tinted label), so it uses
219
- * the neutral `$color` ramp here — `$color11` would paint it in the active
174
+ * the neutral `color` ramp here — `color11` would paint it in the active
220
175
  * theme's accent and is what made the label read as "differently coloured".
221
176
  *
222
177
  * 15. The 0.65 dim is a CONSTANT baked into the style, and the selected-state
@@ -227,42 +182,42 @@ const MiniCalendarDay = styled(UnstyledButton.Frame, {
227
182
  * blanking the WHOLE cell (number included).
228
183
  */
229
184
  const MiniCalendarDayMonth = styled(Text, {
230
- name: "MiniCalendarDayMonth",
185
+ displayName: "MiniCalendarDayMonth",
231
186
  context: MiniCalendarContext,
232
187
  userSelect: "none",
233
188
  opacity: 0.65,
234
- color: "$color",
189
+ color: "color",
235
190
  variants: {
236
191
  size: monthFontVariant,
237
192
 
238
193
  /** On a selected day's accent fill, the label flips to the contrast color. */
239
- selected: { true: { color: "$color1" } },
194
+ selected: { true: { color: "color1" } },
240
195
  } as const,
241
196
  defaultVariants: { size: "md" },
242
197
  });
243
198
 
244
199
  /** The day-of-month number. */
245
200
  const MiniCalendarDayNumber = styled(Text, {
246
- name: "MiniCalendarDayNumber",
201
+ displayName: "MiniCalendarDayNumber",
247
202
  context: MiniCalendarContext,
248
203
  userSelect: "none",
249
- color: "$color",
204
+ color: "color",
250
205
  variants: {
251
- size: dayNumberFontVariant,
206
+ size: cellFontVariant,
252
207
 
253
208
  /** On a selected day's accent fill, the number flips to the contrast color. */
254
- selected: { true: { color: "$color1" } },
209
+ selected: { true: { color: "color1" } },
255
210
  } as const,
256
211
  defaultVariants: { size: "md" },
257
212
  });
258
213
 
259
214
  /** The default chevron glyph — shares `size` via context. */
260
215
  const MiniCalendarChevron = styled(Text, {
261
- name: "MiniCalendarChevron",
216
+ displayName: "MiniCalendarChevron",
262
217
  context: MiniCalendarContext,
263
218
  userSelect: "none",
264
- color: "$color",
265
- variants: { size: chevronFontVariant } as const,
219
+ color: "color",
220
+ variants: { size: iconFontVariant } as const,
266
221
  defaultVariants: { size: "md" },
267
222
  });
268
223
 
@@ -378,10 +333,10 @@ export interface MiniCalendarProps extends MiniCalendarFrameProps {
378
333
  * uncontrolled via `useUncontrolled`); each day shows its month label above the
379
334
  * day number. Accent on the selected day comes from the active Tamagui theme.
380
335
  * Built from `Box` / `Text` / `UnstyledButton`; forwards its ref + style props to
381
- * the root via `.styleable`.
336
+ * the root via `styleable()`.
382
337
  *
383
338
  * Per-slot style sugar mirrors `@mantine/dates`' `styles`:
384
- * `styles={{ day: { borderRadius: "$lg" } }}` spreads onto the matching part;
339
+ * `styles={{ day: { borderRadius: "lg" } }}` spreads onto the matching part;
385
340
  * precedence is fixed (`defaults < styles[slot] < explicit props`).
386
341
  *
387
342
  * @example
@@ -391,7 +346,8 @@ export interface MiniCalendarProps extends MiniCalendarFrameProps {
391
346
  * onChange={setValue}
392
347
  * />
393
348
  */
394
- const MiniCalendarComponent = MiniCalendarFrame.styleable<MiniCalendarProps>(
349
+ const MiniCalendarComponent = styleable<MiniCalendarProps>(
350
+ MiniCalendarFrame,
395
351
  function MiniCalendar(props, ref) {
396
352
  const {
397
353
  date,
@@ -22,17 +22,24 @@ import { useMemo } from "react";
22
22
  import dayjs from "dayjs";
23
23
 
24
24
  import { Box, Text } from "@knitui/components";
25
+ import { hoverProps } from "@knitui/components/control-system";
25
26
  import {
26
27
  createStyledContext,
27
28
  type GetProps,
28
29
  slotStyles,
29
30
  type SlotStyles,
31
+ styleable,
30
32
  styled,
31
33
  withStaticProperties,
32
34
  } from "@knitui/core";
33
35
  import { useCallbackRef } from "@knitui/hooks";
34
36
 
35
- import { type CalendarSize, CELL_FONT, CELL_SPACING, CELL_WIDTH } from "../cell-metrics";
37
+ import {
38
+ type CalendarSize,
39
+ CELL_SPACING,
40
+ cellFontVariant,
41
+ cellWidthVariant,
42
+ } from "../cell-metrics";
36
43
  import { useDatesContext } from "../DatesProvider";
37
44
  import { Day, type DayProps, type RenderDay } from "../Day";
38
45
  import { areCellPropsEqual } from "../internal/are-cell-props-equal";
@@ -198,12 +205,9 @@ const MonthDayCell = React.memo(function MonthDayCell({
198
205
  onDayKeyDown,
199
206
  getDayRef,
200
207
  }: MonthDayCellProps) {
201
- // Tamagui hover handlers are not part `Day`'s public prop type; attach them via
202
- // a precisely-typed object spread, the kit's pattern for web-only affordances
203
- // (see `@knitui/components` `hoverProps`). Native ignores it.
204
- const hoverHandlers: { onHoverIn?: (event: unknown) => void } = {
205
- onHoverIn: (event) => onDayMouseEnter(event, date),
206
- };
208
+ // Range hover preview. `hoverProps` maps to `onMouseEnter` on web (v3 wires no
209
+ // listener for `onHoverIn` alone) and keeps `onHoverIn` on native.
210
+ const hoverHandlers = hoverProps({ onHoverIn: (event) => onDayMouseEnter(event, date) });
207
211
 
208
212
  return (
209
213
  <MonthCell role="cell" fullWidth={fullWidth} {...cellProps}>
@@ -276,31 +280,11 @@ const MonthContext = createStyledContext<{ size: MonthSize }>({ size: "md" });
276
280
  // The week-number column matches `Day`'s square `CELL_WIDTH` ladder so it lines
277
281
  // up with the day grid; its label tracks the same `CELL_FONT` ladder. Raw ladder
278
282
  // values (resolve at module-load) — never `getTokenValue`, which needs live config.
279
- const weekNumberWidthVariant = {
280
- xxs: { width: CELL_WIDTH.xxs },
281
- xs: { width: CELL_WIDTH.xs },
282
- sm: { width: CELL_WIDTH.sm },
283
- md: { width: CELL_WIDTH.md },
284
- lg: { width: CELL_WIDTH.lg },
285
- xl: { width: CELL_WIDTH.xl },
286
- xxl: { width: CELL_WIDTH.xxl },
287
- } as const;
288
-
289
- const weekNumberFontVariant = {
290
- xxs: { fontSize: CELL_FONT.xxs },
291
- xs: { fontSize: CELL_FONT.xs },
292
- sm: { fontSize: CELL_FONT.sm },
293
- md: { fontSize: CELL_FONT.md },
294
- lg: { fontSize: CELL_FONT.lg },
295
- xl: { fontSize: CELL_FONT.xl },
296
- xxl: { fontSize: CELL_FONT.xxl },
297
- } as const;
298
-
299
283
  // ── 5. Styled parts ───────────────────────────────────────────────────────────
300
284
 
301
285
  /** The grid container — a column of week rows (web `role="grid"`). */
302
286
  const MonthFrame = styled(Box, {
303
- name: "Month",
287
+ displayName: "Month",
304
288
  context: MonthContext,
305
289
  flexDirection: "column",
306
290
 
@@ -320,7 +304,7 @@ const MonthFrame = styled(Box, {
320
304
 
321
305
  /** A single week row (web `role="row"`). */
322
306
  const MonthRow = styled(Box, {
323
- name: "MonthRow",
307
+ displayName: "MonthRow",
324
308
  context: MonthContext,
325
309
  flexDirection: "row",
326
310
 
@@ -346,7 +330,7 @@ const MonthRow = styled(Box, {
346
330
  * per-render `flexGrow` spread — so the optimiser has nothing dynamic to fold).
347
331
  */
348
332
  const MonthCell = styled(Box, {
349
- name: "MonthCell",
333
+ displayName: "MonthCell",
350
334
  context: MonthContext,
351
335
  alignItems: "center",
352
336
  justifyContent: "center",
@@ -361,27 +345,27 @@ const MonthCell = styled(Box, {
361
345
 
362
346
  /** The leading week-number cell (web `role="rowheader"`). */
363
347
  const MonthWeekNumber = styled(Box, {
364
- name: "MonthWeekNumber",
348
+ displayName: "MonthWeekNumber",
365
349
  context: MonthContext,
366
350
  alignItems: "center",
367
351
  justifyContent: "center",
368
352
 
369
353
  variants: {
370
- size: weekNumberWidthVariant,
354
+ size: cellWidthVariant,
371
355
  } as const,
372
356
 
373
357
  defaultVariants: { size: "md" },
374
358
  });
375
359
 
376
- /** The week-number label — muted accent text (`$color11`). */
360
+ /** The week-number label — muted accent text (`color11`). */
377
361
  const MonthWeekNumberLabel = styled(Text, {
378
- name: "MonthWeekNumberLabel",
362
+ displayName: "MonthWeekNumberLabel",
379
363
  context: MonthContext,
380
- color: "$color11",
364
+ color: "color11",
381
365
  userSelect: "none",
382
366
 
383
367
  variants: {
384
- size: weekNumberFontVariant,
368
+ size: cellFontVariant,
385
369
  } as const,
386
370
 
387
371
  defaultVariants: { size: "md" },
@@ -543,7 +527,7 @@ export interface MonthProps extends MonthFrameProps, MonthSettings {
543
527
  * would be the ideal child of `role="grid"`, but the cross-platform `Role` type
544
528
  * has no `gridcell` member — only `cell` — so we use the portable value.)
545
529
  */
546
- const MonthComponent = MonthFrame.styleable<MonthProps>(function Month(props, ref) {
530
+ const MonthComponent = styleable<MonthProps>(MonthFrame, function Month(props, ref) {
547
531
  const {
548
532
  __stopPropagation,
549
533
  __preventFocus,
@@ -16,7 +16,7 @@
16
16
  // a11y/interaction (#11/#12) to `Month`/`Day`. The numbered rules in
17
17
  // `_reference/README.md` that apply here: #1 (this header), #2 (shared size
18
18
  // context), #7 (`styles` sugar + `getDayProps` passthrough — owned by `Month`),
19
- // #9 (locale), #10 (min/max bounds), #11 (delegated a11y), #13 (`.styleable` +
19
+ // #9 (locale), #10 (min/max bounds), #11 (delegated a11y), #13 (`styleable()` +
20
20
  // typed ref), #14 (`withStaticProperties`), #15 (no dynamic hide styles — none
21
21
  // used here). Unlike `DecadeLevel`, a month is NOT the top level: it zooms out to
22
22
  // a year, so the level control stays interactive (`onLevelClick`/`hasNextLevel`).
@@ -31,6 +31,7 @@ import {
31
31
  type GetProps,
32
32
  slotStyles,
33
33
  type SlotStyles,
34
+ styleable,
34
35
  styled,
35
36
  withStaticProperties,
36
37
  } from "@knitui/core";
@@ -59,10 +60,10 @@ const MonthLevelContext = createStyledContext<{ size: CalendarSize }>({ size: "m
59
60
 
60
61
  // ── 5/13. Styled root ─────────────────────────────────────────────────────────
61
62
  // The level root is a styled `Box` column (the dates norm: a real styled part so
62
- // `.styleable` can forward a ref + style props onto it). It establishes the
63
+ // `styleable()` can forward a ref + style props onto it). It establishes the
63
64
  // shared `size` context; the header and grid own the `size` variant themselves.
64
65
  const MonthLevelFrame = styled(Box, {
65
- name: "MonthLevel",
66
+ displayName: "MonthLevel",
66
67
  context: MonthLevelContext,
67
68
  flexDirection: "column",
68
69
 
@@ -152,7 +153,7 @@ export interface MonthLevelProps extends MonthLevelFrameProps, MonthLevelSetting
152
153
  * locale. All `__onDay*` / `__getDayRef` / `__preventFocus` / `__stopPropagation`
153
154
  * plumbing is forwarded straight to the `Month`.
154
155
  *
155
- * Per-slot style sugar: `styles={{ headerControl: { borderRadius: "$lg" } }}` routes
156
+ * Per-slot style sugar: `styles={{ headerControl: { borderRadius: "lg" } }}` routes
156
157
  * onto the matching part; per-cell tuning stays on `getDayProps(date)`. The day
157
158
  * grid's a11y/interaction/sizing are delegated to `Month`/`Day` and the header to
158
159
  * `CalendarHeader`. Forwards its ref + style props to the root.
@@ -160,7 +161,8 @@ export interface MonthLevelProps extends MonthLevelFrameProps, MonthLevelSetting
160
161
  * @example
161
162
  * <MonthLevel month="2024-01-01" onNext={nextMonth} onPrevious={prevMonth} onLevelClick={zoomOut} />
162
163
  */
163
- const MonthLevelComponent = MonthLevelFrame.styleable<MonthLevelProps>(
164
+ const MonthLevelComponent = styleable<MonthLevelProps>(
165
+ MonthLevelFrame,
164
166
  function MonthLevel(props, ref) {
165
167
  const {
166
168
  // Month settings
@@ -25,7 +25,7 @@
25
25
  // subtree — never a dynamic `opacity`/`display` style prop (15). The `<Type>`
26
26
  // generic is preserved through `forwardRef` (which would otherwise pin it at
27
27
  // `"default"`), so the ref is forwarded via a typed `forwardRef` rather than
28
- // `.styleable` (13) — the documented sibling-picker pattern.
28
+ // `styleable()` (13) — the documented sibling-picker pattern.
29
29
  // ───────────────────────────────────────────────────────────────────────────
30
30
  import * as React from "react";
31
31
  import { useRef } from "react";
@@ -37,7 +37,7 @@
37
37
  // dropdown subtree `PickerInputBase` owns — never a dynamic `opacity`/`display`
38
38
  // style prop (15). The `<Type>` generic is preserved through `forwardRef` (which
39
39
  // would otherwise pin it at `"default"`), so the ref is forwarded via a typed
40
- // `forwardRef` rather than `.styleable` (13) — the documented sibling-picker
40
+ // `forwardRef` rather than `styleable()` (13) — the documented sibling-picker
41
41
  // pattern (`MonthPicker` / `DatePickerInput` / `YearPickerInput`).
42
42
  // ───────────────────────────────────────────────────────────────────────────
43
43
  import * as React from "react";
@@ -23,11 +23,13 @@ import { useMemo } from "react";
23
23
  import dayjs from "dayjs";
24
24
 
25
25
  import { Box } from "@knitui/components";
26
+ import { hoverProps } from "@knitui/components/control-system";
26
27
  import {
27
28
  createStyledContext,
28
29
  type GetProps,
29
30
  slotStyles,
30
31
  type SlotStyles,
32
+ styleable,
31
33
  styled,
32
34
  withStaticProperties,
33
35
  } from "@knitui/core";
@@ -69,7 +71,7 @@ const MonthsListContext = createStyledContext<{ size: CalendarSize }>({ size: "m
69
71
 
70
72
  /** The grid container — a column of month rows (web `role="grid"`). */
71
73
  const MonthsListFrame = styled(Box, {
72
- name: "MonthsList",
74
+ displayName: "MonthsList",
73
75
  context: MonthsListContext,
74
76
  flexDirection: "column",
75
77
 
@@ -88,7 +90,7 @@ const MonthsListFrame = styled(Box, {
88
90
 
89
91
  /** A single month row (web `role="row"`). */
90
92
  const MonthsListRow = styled(Box, {
91
- name: "MonthsListRow",
93
+ displayName: "MonthsListRow",
92
94
  context: MonthsListContext,
93
95
  flexDirection: "row",
94
96
 
@@ -113,7 +115,7 @@ const MonthsListRow = styled(Box, {
113
115
  * per-render `flexGrow` spread — so the optimiser has nothing dynamic to fold).
114
116
  */
115
117
  const MonthsListCell = styled(Box, {
116
- name: "MonthsListCell",
118
+ displayName: "MonthsListCell",
117
119
  context: MonthsListContext,
118
120
  alignItems: "center",
119
121
  justifyContent: "center",
@@ -206,12 +208,8 @@ const MonthsListControlCell = React.memo(function MonthsListControlCell({
206
208
  onControlKeyDown,
207
209
  getControlRef,
208
210
  }: MonthsListControlCellProps) {
209
- // Tamagui hover handlers are not part of `PickerControl`'s public prop type;
210
- // attach them via a precisely-typed object spread, the kit's pattern for web-only
211
- // affordances (see `Month`). Native never fires it.
212
- const hoverHandlers: { onHoverIn?: (event: unknown) => void } = {
213
- onHoverIn: (event) => onControlMouseEnter(event, month),
214
- };
211
+ // Range hover preview (see `Month`): `onMouseEnter` on web, `onHoverIn` on native.
212
+ const hoverHandlers = hoverProps({ onHoverIn: (event) => onControlMouseEnter(event, month) });
215
213
 
216
214
  return (
217
215
  <MonthsListCell role="cell" fullWidth={fullWidth} {...cellProps}>
@@ -342,7 +340,8 @@ export interface MonthsListProps extends MonthsListFrameProps, MonthsListSetting
342
340
  * wrapping a `role="button"` control. (ARIA's `gridcell` would be the ideal child
343
341
  * of `role="grid"`, but the cross-platform `Role` type has no `gridcell` member.)
344
342
  */
345
- const MonthsListComponent = MonthsListFrame.styleable<MonthsListProps>(
343
+ const MonthsListComponent = styleable<MonthsListProps>(
344
+ MonthsListFrame,
346
345
  function MonthsList(props, ref) {
347
346
  const {
348
347
  year,