ropav 0.6.0 → 0.7.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 (320) hide show
  1. package/README.md +32 -9
  2. package/dist/components/accordion/index.d.ts +2 -190
  3. package/dist/components/accordion/index.js +1 -12
  4. package/dist/components/alert/alert-indicator.js +1 -1
  5. package/dist/components/alert/index.d.ts +2 -131
  6. package/dist/components/alert/index.js +1 -10
  7. package/dist/components/alert-dialog/alert-dialog-close.js +1 -1
  8. package/dist/components/alert-dialog/alert-dialog-heading.js +2 -2
  9. package/dist/components/alert-dialog/alert-dialog.types.d.ts +1 -1
  10. package/dist/components/alert-dialog/index.d.ts +2 -296
  11. package/dist/components/alert-dialog/index.js +1 -17
  12. package/dist/components/autocomplete/autocomplete-popover.js +2 -2
  13. package/dist/components/autocomplete/autocomplete-root.js +1 -1
  14. package/dist/components/autocomplete/index.d.ts +2 -250
  15. package/dist/components/autocomplete/index.js +1 -12
  16. package/dist/components/avatar/avatar.context.d.ts +1 -1
  17. package/dist/components/avatar/index.d.ts +2 -101
  18. package/dist/components/avatar/index.js +1 -8
  19. package/dist/components/badge/badge-anchor.js +5 -4
  20. package/dist/components/badge/badge-auto-label.d.ts +4 -4
  21. package/dist/components/badge/badge-auto-label.js +2 -2
  22. package/dist/components/badge/badge-root.js +2 -2
  23. package/dist/components/badge/index.d.ts +2 -95
  24. package/dist/components/badge/index.js +1 -8
  25. package/dist/components/breadcrumbs/breadcrumbs-item.js +2 -2
  26. package/dist/components/breadcrumbs/breadcrumbs.types.d.ts +2 -2
  27. package/dist/components/breadcrumbs/index.d.ts +2 -90
  28. package/dist/components/breadcrumbs/index.js +1 -7
  29. package/dist/components/button/index.d.ts +2 -61
  30. package/dist/components/button/index.js +1 -4
  31. package/dist/components/button-group/index.d.ts +2 -72
  32. package/dist/components/button-group/index.js +1 -7
  33. package/dist/components/calendar/calendar-grid-body.js +2 -2
  34. package/dist/components/calendar/calendar-grid-header.js +1 -1
  35. package/dist/components/calendar/calendar-grid.js +2 -1
  36. package/dist/components/calendar/calendar-root.d.ts +1 -1
  37. package/dist/components/calendar/calendar-root.js +13 -13
  38. package/dist/components/calendar/calendar.context.js +1 -1
  39. package/dist/components/calendar/calendar.types.d.ts +3 -1
  40. package/dist/components/calendar/index.d.ts +2 -422
  41. package/dist/components/calendar/index.js +1 -27
  42. package/dist/components/calendar-year-picker/calendar-year-picker-cell.js +15 -11
  43. package/dist/components/calendar-year-picker/calendar-year-picker-grid-body.js +9 -10
  44. package/dist/components/calendar-year-picker/calendar-year-picker-grid.js +36 -32
  45. package/dist/components/calendar-year-picker/calendar-year-picker-trigger-heading.js +1 -1
  46. package/dist/components/calendar-year-picker/calendar-year-picker-trigger.js +1 -1
  47. package/dist/components/calendar-year-picker/calendar-year-picker.context.d.ts +26 -8
  48. package/dist/components/calendar-year-picker/calendar-year-picker.context.js +2 -2
  49. package/dist/components/calendar-year-picker/calendar-year-picker.types.d.ts +8 -1
  50. package/dist/components/calendar-year-picker/index.d.ts +0 -134
  51. package/dist/components/calendar-year-picker/index.js +1 -11
  52. package/dist/components/card/index.d.ts +2 -152
  53. package/dist/components/card/index.js +1 -11
  54. package/dist/components/checkbox/index.d.ts +2 -146
  55. package/dist/components/checkbox/index.js +1 -9
  56. package/dist/components/checkbox-group/index.d.ts +2 -77
  57. package/dist/components/checkbox-group/index.js +1 -4
  58. package/dist/components/chip/chip-auto-label.d.ts +4 -4
  59. package/dist/components/chip/chip-auto-label.js +2 -2
  60. package/dist/components/chip/chip-root.js +2 -2
  61. package/dist/components/chip/index.d.ts +2 -72
  62. package/dist/components/chip/index.js +1 -7
  63. package/dist/components/close-button/index.d.ts +2 -55
  64. package/dist/components/close-button/index.js +1 -4
  65. package/dist/components/color-area/index.d.ts +2 -100
  66. package/dist/components/color-area/index.js +1 -7
  67. package/dist/components/color-field/color-field-root.js +1 -1
  68. package/dist/components/color-field/index.d.ts +2 -175
  69. package/dist/components/color-field/index.js +1 -14
  70. package/dist/components/color-input-group/index.d.ts +2 -115
  71. package/dist/components/color-input-group/index.js +1 -9
  72. package/dist/components/color-picker/color-picker-popover.js +2 -2
  73. package/dist/components/color-picker/index.d.ts +2 -110
  74. package/dist/components/color-picker/index.js +1 -8
  75. package/dist/components/color-slider/index.d.ts +2 -138
  76. package/dist/components/color-slider/index.js +1 -9
  77. package/dist/components/color-swatch/index.d.ts +2 -59
  78. package/dist/components/color-swatch/index.js +1 -4
  79. package/dist/components/color-swatch-picker/color-swatch-picker-item.js +1 -1
  80. package/dist/components/color-swatch-picker/index.d.ts +2 -129
  81. package/dist/components/color-swatch-picker/index.js +1 -9
  82. package/dist/components/combo-box/combo-box-popover.js +2 -2
  83. package/dist/components/combo-box/combo-box.types.d.ts +1 -1
  84. package/dist/components/combo-box/index.d.ts +2 -229
  85. package/dist/components/combo-box/index.js +1 -10
  86. package/dist/components/date-field/date-field-root.js +2 -2
  87. package/dist/components/date-field/index.d.ts +2 -241
  88. package/dist/components/date-field/index.js +1 -12
  89. package/dist/components/date-input-group/use-date-segment.js +1 -1
  90. package/dist/components/date-picker/date-picker-popover.js +2 -2
  91. package/dist/components/date-picker/date-picker-root.js +6 -3
  92. package/dist/components/date-picker/index.d.ts +2 -186
  93. package/dist/components/date-picker/index.js +1 -9
  94. package/dist/components/date-range-picker/date-range-picker-popover.js +2 -2
  95. package/dist/components/date-range-picker/date-range-picker-root.js +6 -3
  96. package/dist/components/date-range-picker/index.d.ts +2 -209
  97. package/dist/components/date-range-picker/index.js +1 -10
  98. package/dist/components/description/index.d.ts +2 -45
  99. package/dist/components/description/index.js +1 -4
  100. package/dist/components/disclosure/disclosure-root.js +3 -3
  101. package/dist/components/disclosure/index.d.ts +2 -163
  102. package/dist/components/disclosure/index.js +1 -11
  103. package/dist/components/disclosure-group/index.d.ts +2 -57
  104. package/dist/components/disclosure-group/index.js +1 -4
  105. package/dist/components/drawer/drawer-close.js +1 -1
  106. package/dist/components/drawer/drawer-dialog.js +1 -1
  107. package/dist/components/drawer/drawer-heading.js +2 -2
  108. package/dist/components/drawer/drawer.types.d.ts +1 -1
  109. package/dist/components/drawer/index.d.ts +2 -291
  110. package/dist/components/drawer/index.js +1 -17
  111. package/dist/components/drop-zone/index.d.ts +2 -80
  112. package/dist/components/drop-zone/index.js +1 -7
  113. package/dist/components/dropdown/dropdown-popover.js +2 -2
  114. package/dist/components/dropdown/index.d.ts +2 -265
  115. package/dist/components/dropdown/index.js +1 -23
  116. package/dist/components/empty-state/index.d.ts +2 -45
  117. package/dist/components/empty-state/index.js +1 -4
  118. package/dist/components/error-message/index.d.ts +2 -45
  119. package/dist/components/error-message/index.js +1 -4
  120. package/dist/components/field-error/field-error-root.js +2 -2
  121. package/dist/components/field-error/index.d.ts +2 -66
  122. package/dist/components/field-error/index.js +1 -7
  123. package/dist/components/fieldset/index.d.ts +2 -110
  124. package/dist/components/fieldset/index.js +1 -9
  125. package/dist/components/form/index.d.ts +2 -49
  126. package/dist/components/form/index.js +1 -4
  127. package/dist/components/header/index.d.ts +2 -45
  128. package/dist/components/header/index.js +1 -4
  129. package/dist/components/i18n-provider/index.d.ts +2 -2
  130. package/dist/components/i18n-provider/index.js +1 -1
  131. package/dist/components/input/index.d.ts +2 -51
  132. package/dist/components/input/index.js +1 -4
  133. package/dist/components/input-group/index.d.ts +2 -141
  134. package/dist/components/input-group/index.js +1 -10
  135. package/dist/components/input-otp/index.d.ts +2 -151
  136. package/dist/components/input-otp/index.js +1 -9
  137. package/dist/components/kbd/index.d.ts +2 -86
  138. package/dist/components/kbd/index.js +1 -8
  139. package/dist/components/label/index.d.ts +2 -51
  140. package/dist/components/label/index.js +1 -4
  141. package/dist/components/link/index.d.ts +2 -94
  142. package/dist/components/link/index.js +1 -7
  143. package/dist/components/list-box/index.d.ts +2 -191
  144. package/dist/components/list-box/index.js +1 -14
  145. package/dist/components/list-box/list-box-drop-indicator.js +2 -2
  146. package/dist/components/list-box/list-box-root.js +4 -4
  147. package/dist/components/list-box-item/index.d.ts +2 -74
  148. package/dist/components/list-box-item/index.js +1 -7
  149. package/dist/components/list-box-item/list-box-item-root.js +2 -2
  150. package/dist/components/list-box-section/index.d.ts +2 -47
  151. package/dist/components/list-box-section/index.js +1 -4
  152. package/dist/components/menu/index.d.ts +2 -83
  153. package/dist/components/menu/index.js +1 -4
  154. package/dist/components/menu-item/index.d.ts +2 -96
  155. package/dist/components/menu-item/index.js +1 -8
  156. package/dist/components/menu-item/menu-item-root.js +2 -2
  157. package/dist/components/menu-section/index.d.ts +2 -63
  158. package/dist/components/menu-section/index.js +1 -4
  159. package/dist/components/meter/index.d.ts +2 -127
  160. package/dist/components/meter/index.js +1 -9
  161. package/dist/components/modal/index.d.ts +2 -296
  162. package/dist/components/modal/index.js +1 -17
  163. package/dist/components/modal/modal-close.js +1 -1
  164. package/dist/components/modal/modal-heading.js +2 -2
  165. package/dist/components/modal/modal.context.d.ts +2 -2
  166. package/dist/components/modal/modal.types.d.ts +1 -1
  167. package/dist/components/number-field/index.d.ts +2 -186
  168. package/dist/components/number-field/index.js +1 -10
  169. package/dist/components/number-field/number-field-decrement-button.js +1 -1
  170. package/dist/components/number-field/number-field-increment-button.js +1 -1
  171. package/dist/components/overlay/overlay-slots.d.ts +1 -1
  172. package/dist/components/pagination/index.d.ts +2 -244
  173. package/dist/components/pagination/index.js +1 -15
  174. package/dist/components/pagination/pagination-next.js +4 -1
  175. package/dist/components/pagination/pagination-previous.js +4 -1
  176. package/dist/components/popover/index.d.ts +2 -172
  177. package/dist/components/popover/index.js +1 -11
  178. package/dist/components/popover/popover-arrow.js +2 -2
  179. package/dist/components/popover/popover-content.js +2 -2
  180. package/dist/components/popover/popover-heading.js +2 -2
  181. package/dist/components/popover/popover.types.d.ts +1 -1
  182. package/dist/components/progress-bar/index.d.ts +2 -133
  183. package/dist/components/progress-bar/index.js +1 -9
  184. package/dist/components/progress-circle/index.d.ts +2 -124
  185. package/dist/components/progress-circle/index.js +1 -9
  186. package/dist/components/radio/index.d.ts +2 -120
  187. package/dist/components/radio/index.js +1 -9
  188. package/dist/components/radio-group/index.d.ts +2 -79
  189. package/dist/components/radio-group/index.js +1 -4
  190. package/dist/components/range-calendar/index.d.ts +2 -424
  191. package/dist/components/range-calendar/index.js +1 -27
  192. package/dist/components/range-calendar/range-calendar-cell.js +4 -2
  193. package/dist/components/range-calendar/range-calendar-grid-body.js +2 -2
  194. package/dist/components/range-calendar/range-calendar-grid-header.js +1 -1
  195. package/dist/components/range-calendar/range-calendar-grid.js +2 -1
  196. package/dist/components/range-calendar/range-calendar-root.d.ts +3 -3
  197. package/dist/components/range-calendar/range-calendar-root.js +13 -13
  198. package/dist/components/range-calendar/range-calendar.context.d.ts +1 -1
  199. package/dist/components/range-calendar/range-calendar.context.js +1 -1
  200. package/dist/components/range-calendar/range-calendar.types.d.ts +3 -1
  201. package/dist/components/router-provider/index.d.ts +2 -2
  202. package/dist/components/router-provider/index.js +1 -1
  203. package/dist/components/scroll-shadow/index.d.ts +2 -69
  204. package/dist/components/scroll-shadow/index.js +1 -4
  205. package/dist/components/search-field/index.d.ts +2 -195
  206. package/dist/components/search-field/index.js +1 -10
  207. package/dist/components/search-field/search-field-clear-button.js +5 -5
  208. package/dist/components/segmented-control/index.d.ts +2 -126
  209. package/dist/components/segmented-control/index.js +1 -9
  210. package/dist/components/select/index.d.ts +2 -202
  211. package/dist/components/select/index.js +1 -10
  212. package/dist/components/select/select-popover.js +2 -2
  213. package/dist/components/select/select-value.js +1 -1
  214. package/dist/components/separator/index.d.ts +2 -41
  215. package/dist/components/separator/index.js +1 -4
  216. package/dist/components/sidebar/index.d.ts +2 -520
  217. package/dist/components/sidebar/index.js +1 -25
  218. package/dist/components/sidebar/sidebar-content.js +2 -2
  219. package/dist/components/sidebar/sidebar-item-tooltip.js +2 -2
  220. package/dist/components/sidebar/sidebar-panel.js +1 -0
  221. package/dist/components/sidebar/sidebar-rail.js +1 -0
  222. package/dist/components/sidebar/sidebar-root.js +23 -5
  223. package/dist/components/sidebar/sidebar.state.d.ts +3 -0
  224. package/dist/components/sidebar/sidebar.state.js +5 -0
  225. package/dist/components/sidebar/sidebar.types.d.ts +2 -2
  226. package/dist/components/skeleton/index.d.ts +2 -47
  227. package/dist/components/skeleton/index.js +1 -4
  228. package/dist/components/slider/index.d.ts +2 -180
  229. package/dist/components/slider/index.js +1 -11
  230. package/dist/components/spinner/index.d.ts +2 -41
  231. package/dist/components/spinner/index.js +1 -4
  232. package/dist/components/splitter/index.d.ts +2 -134
  233. package/dist/components/splitter/index.js +1 -8
  234. package/dist/components/surface/index.d.ts +2 -47
  235. package/dist/components/surface/index.js +1 -4
  236. package/dist/components/switch/index.d.ts +2 -165
  237. package/dist/components/switch/index.js +1 -10
  238. package/dist/components/switch-group/index.d.ts +2 -47
  239. package/dist/components/switch-group/index.js +1 -4
  240. package/dist/components/table/index.d.ts +2 -442
  241. package/dist/components/table/index.js +1 -23
  242. package/dist/components/table/table-body.js +9 -9
  243. package/dist/components/table/table-cell.js +3 -3
  244. package/dist/components/table/table-column.js +4 -4
  245. package/dist/components/table/table-content.js +3 -3
  246. package/dist/components/table/table-drag-handle.js +1 -1
  247. package/dist/components/table/table-drop-indicator.js +9 -7
  248. package/dist/components/table/table-header.js +4 -4
  249. package/dist/components/table/table-load-more.js +5 -5
  250. package/dist/components/table/table-row.js +4 -4
  251. package/dist/components/table/table.context.d.ts +2 -2
  252. package/dist/components/table/table.types.d.ts +3 -3
  253. package/dist/components/tabs/index.d.ts +2 -189
  254. package/dist/components/tabs/index.js +1 -12
  255. package/dist/components/tabs/tabs-list-container.js +2 -2
  256. package/dist/components/tag/index.d.ts +2 -76
  257. package/dist/components/tag/index.js +1 -7
  258. package/dist/components/tag/tag-remove-button.js +2 -2
  259. package/dist/components/tag-group/index.d.ts +2 -93
  260. package/dist/components/tag-group/index.js +1 -7
  261. package/dist/components/textarea/index.d.ts +2 -51
  262. package/dist/components/textarea/index.js +1 -4
  263. package/dist/components/textfield/index.d.ts +2 -109
  264. package/dist/components/textfield/index.js +1 -4
  265. package/dist/components/time-field/index.d.ts +2 -233
  266. package/dist/components/time-field/index.js +1 -12
  267. package/dist/components/toast/index.d.ts +2 -216
  268. package/dist/components/toast/index.js +1 -15
  269. package/dist/components/toast/toast-action-button.js +2 -2
  270. package/dist/components/toast/toast-default-content.js +1 -1
  271. package/dist/components/toast/toast-queue.d.ts +1 -1
  272. package/dist/components/toast/toast-queue.js +1 -1
  273. package/dist/components/toast/toast-root.js +1 -1
  274. package/dist/components/toast/toast.types.d.ts +3 -3
  275. package/dist/components/toggle-button/index.d.ts +2 -65
  276. package/dist/components/toggle-button/index.js +1 -4
  277. package/dist/components/toggle-button-group/index.d.ts +2 -82
  278. package/dist/components/toggle-button-group/index.js +1 -7
  279. package/dist/components/toolbar/index.d.ts +2 -49
  280. package/dist/components/toolbar/index.js +1 -4
  281. package/dist/components/tooltip/index.d.ts +2 -136
  282. package/dist/components/tooltip/index.js +1 -9
  283. package/dist/components/tooltip/tooltip-arrow.js +2 -2
  284. package/dist/components/tooltip/tooltip-root.js +1 -1
  285. package/dist/components/tooltip/tooltip.types.d.ts +1 -1
  286. package/dist/components/typography/code.js +2 -2
  287. package/dist/components/typography/heading.js +2 -2
  288. package/dist/components/typography/index.d.ts +2 -1269
  289. package/dist/components/typography/index.js +1 -10
  290. package/dist/components/typography/paragraph.js +2 -2
  291. package/dist/components/typography/typography-root.js +2 -2
  292. package/dist/composables/use-calendar-grid.js +2 -1
  293. package/dist/composables/use-calendar-year-picker.js +12 -3
  294. package/dist/composables/use-color-slider.d.ts +1 -1
  295. package/dist/composables/use-color-slider.js +1 -1
  296. package/dist/composables/use-press.d.ts +10 -0
  297. package/dist/composables/use-press.js +27 -2
  298. package/dist/composables/use-prevent-scroll.d.ts +11 -5
  299. package/dist/composables/use-prevent-scroll.js +11 -5
  300. package/dist/composables/use-range-calendar.js +2 -1
  301. package/dist/composables/use-text-field.js +1 -1
  302. package/dist/index.d.ts +1 -1
  303. package/dist/index.js +110 -111
  304. package/dist/styles-no-preflight.css +3 -0
  305. package/dist/styles-overrides.css +15 -0
  306. package/dist/styles.css +1 -16
  307. package/dist/utils/calendar-systems.d.ts +14 -0
  308. package/dist/utils/calendar-systems.js +2 -0
  309. package/dist/utils/calendar.d.ts +14 -5
  310. package/dist/utils/calendar.js +18 -21
  311. package/dist/utils/compose.d.ts +4 -6
  312. package/dist/utils/compose.js +4 -6
  313. package/dist/utils/dnd-list-drop-target-delegate.d.ts +19 -1
  314. package/dist/utils/dnd-list-drop-target-delegate.js +37 -6
  315. package/dist/utils/index.d.ts +1 -0
  316. package/dist/utils/virtualizer-list-layout.d.ts +8 -0
  317. package/dist/utils/virtualizer-list-layout.js +12 -2
  318. package/dist/utils/virtualizer-table-layout.d.ts +1 -0
  319. package/dist/utils/virtualizer-table-layout.js +3 -0
  320. package/package.json +7 -4
@@ -4,13 +4,4 @@ import heading_default from "./heading.js";
4
4
  import paragraph_default from "./paragraph.js";
5
5
  import prose_default from "./prose.js";
6
6
  import { typographyVariants } from "@ropav/styles";
7
- //#region src/components/typography/index.ts
8
- var Typography = Object.assign(typography_root_default, {
9
- Code: code_default,
10
- Heading: heading_default,
11
- Paragraph: paragraph_default,
12
- Prose: prose_default,
13
- Root: typography_root_default
14
- });
15
- //#endregion
16
- export { code_default as Code, heading_default as Heading, paragraph_default as Paragraph, prose_default as Prose, Typography, typography_root_default as TypographyRoot, typographyVariants };
7
+ export { code_default as Code, heading_default as Heading, paragraph_default as Paragraph, prose_default as Prose, typography_root_default as Typography, typographyVariants };
@@ -24,8 +24,8 @@ var paragraph_vue_vue_type_script_setup_true_vapor_true_lang_default = /*@__PURE
24
24
  type: () => type.value,
25
25
  weight: () => props.weight
26
26
  }, extend(() => {
27
- return createSlot("default", null, null, 36);
28
- }, { _: 8 }), true);
27
+ return createSlot("default", null, null, 4);
28
+ }, { _: 1 }), true);
29
29
  }
30
30
  });
31
31
  //#endregion
@@ -30,8 +30,8 @@ var typography_root_vue_vue_type_script_setup_true_vapor_true_lang_default = /*@
30
30
  "data-slot": "typography",
31
31
  "data-type": () => resolvedType.value
32
32
  }, extend(() => {
33
- return createSlot("default", null, null, 36);
34
- }, { _: 8 }), 1);
33
+ return createSlot("default", null, null, 4);
34
+ }, { _: 1 }), 1);
35
35
  }
36
36
  });
37
37
  //#endregion
@@ -2,6 +2,7 @@ import { useLocale } from "./use-locale.js";
2
2
  import { useDateFormatter } from "./use-date-formatter.js";
3
3
  import { useLabels } from "./use-labels.js";
4
4
  import { isRangeCalendarState, useVisibleRangeDescription } from "./use-calendar.js";
5
+ import "../utils/calendar.js";
5
6
  import { computed, toValue } from "vue";
6
7
  import { startOfWeek, today } from "@internationalized/date";
7
8
  //#region src/composables/use-calendar-grid.ts
@@ -84,7 +85,7 @@ var useCalendarGrid = (options, state, shared) => {
84
85
  };
85
86
  const dayFormatter = useDateFormatter(() => ({
86
87
  timeZone: state.timeZone.value,
87
- weekday: toValue(options.weekdayStyle) || "narrow"
88
+ weekday: toValue(options.weekdayStyle) || "short"
88
89
  }));
89
90
  const weekDays = computed(() => {
90
91
  const duration = state.visibleDuration.value;
@@ -4,6 +4,16 @@ import { computed, toValue } from "vue";
4
4
  import { isSameYear, toCalendarDate } from "@internationalized/date";
5
5
  //#region src/composables/use-calendar-year-picker.ts
6
6
  /**
7
+ * A year is read off the calendar date in UTC, the one zone that never skips an hour or a day.
8
+ *
9
+ * A bare date has no zone of its own, so resolving one through the calendar's zone has to pick a
10
+ * moment for it, and midnight is not always available: where a zone drops the end of December 31 —
11
+ * or the whole day, as the ones that crossed the date line did — the moment slides forward into
12
+ * January and the year comes back one too high. Reading and writing the date in the same
13
+ * gapless zone keeps every label the year it was built from.
14
+ */
15
+ var LABEL_TIME_ZONE = "UTC";
16
+ /**
7
17
  * The list of years a calendar can jump to.
8
18
  *
9
19
  * Ported from react-aria's `packages/react-aria/src/calendar/useCalendarYearPicker.ts`
@@ -20,7 +30,7 @@ var useCalendarYearPicker = (options, state) => {
20
30
  return {
21
31
  calendar: focused.calendar.identifier,
22
32
  era: format?.era || (focused.calendar.identifier === "gregory" && focused.era === "BC" ? "short" : void 0),
23
- timeZone: state.timeZone.value,
33
+ timeZone: LABEL_TIME_ZONE,
24
34
  year: format?.year || "numeric"
25
35
  };
26
36
  });
@@ -45,13 +55,12 @@ var useCalendarYearPicker = (options, state) => {
45
55
  });
46
56
  const items = computed(() => {
47
57
  const { maxDate, minDate } = bounds.value;
48
- const timeZone = state.timeZone.value;
49
58
  const years = [];
50
59
  let date = minDate;
51
60
  while (date.compare(maxDate) <= 0) {
52
61
  years.push({
53
62
  date,
54
- formatted: formatter.value.format(date.toDate(timeZone)),
63
+ formatted: formatter.value.format(date.toDate(LABEL_TIME_ZONE)),
55
64
  id: years.length
56
65
  });
57
66
  date = date.add({ years: 1 });
@@ -63,7 +63,7 @@ export interface UseColorSliderReturn {
63
63
  * uses. Three things are particular to a colour and are the reason this exists at all:
64
64
  *
65
65
  * - **The group is the track.** Upstream merges `groupProps` into `trackProps`, so `role="group"`
66
- * and the accessible name sit on `.color-slider__track` rather than on the root the way they do
66
+ * and the accessible name sit on `.rp-color-slider__track` rather than on the root the way they do
67
67
  * on a plain slider. Binding them on the root instead gives a slider two mislabelled elements
68
68
  * and no visible sign of it.
69
69
  * - **The gradient is computed, not styled.** The track's `background` is generated from the
@@ -22,7 +22,7 @@ var HUE_STOPS = [
22
22
  * uses. Three things are particular to a colour and are the reason this exists at all:
23
23
  *
24
24
  * - **The group is the track.** Upstream merges `groupProps` into `trackProps`, so `role="group"`
25
- * and the accessible name sit on `.color-slider__track` rather than on the root the way they do
25
+ * and the accessible name sit on `.rp-color-slider__track` rather than on the root the way they do
26
26
  * on a plain slider. Binding them on the root instead gives a slider two mislabelled elements
27
27
  * and no visible sign of it.
28
28
  * - **The gradient is computed, not styled.** The track's `background` is generated from the
@@ -77,6 +77,11 @@ export declare const isVirtualClick: (event: MouseEvent) => boolean;
77
77
  *
78
78
  * A screen reader activating an element reports a zero-sized pointer. Safari on iOS gives
79
79
  * such events the wrong coordinates and target, so they have to be left to the click handler.
80
+ *
81
+ * Android needs a shape of its own, and the zero-size test is turned off there rather than left
82
+ * to miss: TalkBack's double tap reports a one-by-one pointer claiming to be a mouse. Every part
83
+ * of that is load-bearing — pressure alone would catch real presses in Safari, which reports zero
84
+ * for those too, and the mouse claim is what separates the double tap from a touch screen press.
80
85
  */
81
86
  export declare const isVirtualPointerEvent: (event: PointerEvent) => boolean;
82
87
  /**
@@ -95,6 +100,11 @@ export declare const isVirtualPointerEvent: (event: PointerEvent) => boolean;
95
100
  * environments without `PointerEvent`; every browser this package targets has it, and so does
96
101
  * jsdom, so the fallback would be untested code.
97
102
  *
103
+ * Whether the pointer is still over the element is read from the element's own enter and leave,
104
+ * where React Aria hit-tests a global pointer move. The cheaper pair costs one thing: a touch
105
+ * dragged off its element keeps looking pressed until the release rules on it, rather than
106
+ * un-pressing under the finger on the way out.
107
+ *
98
108
  * @example
99
109
  * ```ts
100
110
  * const press = usePress({
@@ -1,4 +1,4 @@
1
- import { isMac } from "../utils/platform.js";
1
+ import { isAndroid, isMac } from "../utils/platform.js";
2
2
  import { computed, onScopeDispose, shallowRef, toValue, watch } from "vue";
3
3
  //#region src/composables/use-press.ts
4
4
  /**
@@ -10,6 +10,7 @@ import { computed, onScopeDispose, shallowRef, toValue, watch } from "vue";
10
10
  */
11
11
  var isVirtualClick = (event) => {
12
12
  if (event.pointerType === "" && event.isTrusted) return true;
13
+ if (isAndroid() && event.pointerType) return event.type === "click" && event.buttons === 1;
13
14
  return event.detail === 0 && !event.pointerType;
14
15
  };
15
16
  /**
@@ -17,8 +18,25 @@ var isVirtualClick = (event) => {
17
18
  *
18
19
  * A screen reader activating an element reports a zero-sized pointer. Safari on iOS gives
19
20
  * such events the wrong coordinates and target, so they have to be left to the click handler.
21
+ *
22
+ * Android needs a shape of its own, and the zero-size test is turned off there rather than left
23
+ * to miss: TalkBack's double tap reports a one-by-one pointer claiming to be a mouse. Every part
24
+ * of that is load-bearing — pressure alone would catch real presses in Safari, which reports zero
25
+ * for those too, and the mouse claim is what separates the double tap from a touch screen press.
26
+ */
27
+ var isVirtualPointerEvent = (event) => !isAndroid() && event.width === 0 && event.height === 0 || isAndroid() && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse";
28
+ /**
29
+ * Whether an enter or a leave came from a pointer with no hover to report.
30
+ *
31
+ * A touch pointer is created where the finger lands and destroyed where it lifts, and the browser
32
+ * reports each as an enter and a leave. Neither is the finger crossing the element's edge, and the
33
+ * leave is the damaging one: it arrives immediately after the release, ahead of the click that
34
+ * completes a touch press, so a press that acted on it would end itself before it could activate.
35
+ *
36
+ * Where the finger actually went is answered by the release instead — a press released outside its
37
+ * target is abandoned there.
20
38
  */
21
- var isVirtualPointerEvent = (event) => event.width === 0 && event.height === 0;
39
+ var cannotHover = (event) => event.pointerType === "touch";
22
40
  var NON_TEXT_INPUT_TYPES = /* @__PURE__ */ new Set([
23
41
  "button",
24
42
  "checkbox",
@@ -83,6 +101,11 @@ var contains = (root, target) => root instanceof Node && target instanceof Node
83
101
  * environments without `PointerEvent`; every browser this package targets has it, and so does
84
102
  * jsdom, so the fallback would be untested code.
85
103
  *
104
+ * Whether the pointer is still over the element is read from the element's own enter and leave,
105
+ * where React Aria hit-tests a global pointer move. The cheaper pair costs one thing: a touch
106
+ * dragged off its element keeps looking pressed until the release rules on it, rather than
107
+ * un-pressing under the finger on the way out.
108
+ *
86
109
  * @example
87
110
  * ```ts
88
111
  * const press = usePress({
@@ -340,12 +363,14 @@ var usePress = (options = {}) => {
340
363
  if (shouldStopPropagation) event.stopPropagation();
341
364
  },
342
365
  onPointerenter: (event) => {
366
+ if (cannotHover(event)) return;
343
367
  if (event.pointerId === state.activePointerId && state.target && !state.isOverTarget && state.pointerType !== null) {
344
368
  state.isOverTarget = true;
345
369
  triggerPressStart({ target: state.target }, state.pointerType);
346
370
  }
347
371
  },
348
372
  onPointerleave: (event) => {
373
+ if (cannotHover(event)) return;
349
374
  if (event.pointerId === state.activePointerId && state.target && state.isOverTarget && state.pointerType !== null) {
350
375
  state.isOverTarget = false;
351
376
  triggerPressEnd({ target: state.target }, state.pointerType, false);
@@ -6,15 +6,21 @@ export interface UsePreventScrollOptions {
6
6
  * Block page scrolling while a modal overlay is open, ported from React Aria's
7
7
  * `usePreventScroll`.
8
8
  *
9
- * An overlay is positioned once, against where its trigger was. Scrolling the page behind it
10
- * moves the trigger and leaves the overlay pointing at nothing, so a modal overlay stops the page
11
- * moving rather than trying to follow it.
9
+ * A modal overlay covers the page, and content nobody can reach should not move under the cover.
10
+ * An overlay is positioned once, in document coordinates, so a page that scrolled would carry the
11
+ * overlay along with its trigger still aligned, but travelling out of view. Only a scroll inside
12
+ * some region between the two actually breaks the alignment, and that one closes the overlay
13
+ * rather than being blocked here.
12
14
  *
13
15
  * The count is module-level because the page has one scroll position: two overlays open at once
14
16
  * both want it held, and the second closing must not release it while the first is still open.
15
17
  *
16
- * React Aria carries a second implementation for Safari on iOS, which scrolls the page even with
17
- * `overflow: hidden`. That is not ported.
18
+ * React Aria carries a second implementation for Safari on iOS, built on holding the body in place
19
+ * and replaying the scroll position afterwards. It is deliberately not ported. The behaviour it
20
+ * works around belongs to an older WebKit — `overflow: hidden` on the root holds the page on
21
+ * current iOS — and the technique would cost more here than it gives: it makes the body the
22
+ * containing block, and every overlay is placed in document coordinates measured before the lock,
23
+ * so each one would be displaced by the scroll offset on the way open.
18
24
  *
19
25
  * @example
20
26
  * ```ts
@@ -25,15 +25,21 @@ var preventScroll = () => {
25
25
  * Block page scrolling while a modal overlay is open, ported from React Aria's
26
26
  * `usePreventScroll`.
27
27
  *
28
- * An overlay is positioned once, against where its trigger was. Scrolling the page behind it
29
- * moves the trigger and leaves the overlay pointing at nothing, so a modal overlay stops the page
30
- * moving rather than trying to follow it.
28
+ * A modal overlay covers the page, and content nobody can reach should not move under the cover.
29
+ * An overlay is positioned once, in document coordinates, so a page that scrolled would carry the
30
+ * overlay along with its trigger still aligned, but travelling out of view. Only a scroll inside
31
+ * some region between the two actually breaks the alignment, and that one closes the overlay
32
+ * rather than being blocked here.
31
33
  *
32
34
  * The count is module-level because the page has one scroll position: two overlays open at once
33
35
  * both want it held, and the second closing must not release it while the first is still open.
34
36
  *
35
- * React Aria carries a second implementation for Safari on iOS, which scrolls the page even with
36
- * `overflow: hidden`. That is not ported.
37
+ * React Aria carries a second implementation for Safari on iOS, built on holding the body in place
38
+ * and replaying the scroll position afterwards. It is deliberately not ported. The behaviour it
39
+ * works around belongs to an older WebKit — `overflow: hidden` on the root holds the page on
40
+ * current iOS — and the technique would cost more here than it gives: it makes the body the
41
+ * containing block, and every overlay is placed in document coordinates measured before the lock,
42
+ * so each one would be displaced by the scroll offset on the way open.
37
43
  *
38
44
  * @example
39
45
  * ```ts
@@ -1,3 +1,4 @@
1
+ import { isVirtualPointerEvent } from "./use-press.js";
1
2
  import { useCalendar } from "./use-calendar.js";
2
3
  import { onScopeDispose, toValue, watch } from "vue";
3
4
  //#region src/composables/use-range-calendar.ts
@@ -32,7 +33,7 @@ var useRangeCalendar = (options, state) => {
32
33
  };
33
34
  let isVirtualClick = false;
34
35
  const onWindowPointerdown = (event) => {
35
- isVirtualClick = event.width === 0 && event.height === 0;
36
+ isVirtualClick = isVirtualPointerEvent(event);
36
37
  };
37
38
  const onWindowPointerup = (event) => {
38
39
  if (isVirtualClick) {
@@ -35,7 +35,7 @@ var useTextField = (options = {}) => {
35
35
  const registerElement = (next) => {
36
36
  element.value = next;
37
37
  };
38
- const isTextArea = computed(() => element.value instanceof HTMLTextAreaElement);
38
+ const isTextArea = computed(() => typeof HTMLTextAreaElement !== "undefined" && element.value instanceof HTMLTextAreaElement);
39
39
  const { setState, state: value } = useControllableState({
40
40
  defaultValue: toValue(options.defaultValue) ?? "",
41
41
  onValueChange: options.onChange,
package/dist/index.d.ts CHANGED
@@ -2,4 +2,4 @@ export * from "./components/index.js";
2
2
  export * from "./composables/index.js";
3
3
  export * from "./utils/index.js";
4
4
  export { ROPAV_VERSION } from "./version.js";
5
- export { tv, cn, type VariantProps } from "tailwind-variants";
5
+ export type { VariantProps } from "@ropav/styles";