@serendie/ui 3.2.0 → 3.2.1-dev.202604251106

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 (519) hide show
  1. package/dist/client.js +6 -6
  2. package/dist/components/Accordion/Accordion.js +18 -21
  3. package/dist/components/Accordion/AccordionGroup.js +4 -4
  4. package/dist/components/Avatar/Avatar.js +19 -21
  5. package/dist/components/Badge/Badge.js +1 -1
  6. package/dist/components/Banner/Banner.js +4 -4
  7. package/dist/components/BottomNavigation/BottomNavigation.js +12 -11
  8. package/dist/components/BottomNavigation/BottomNavigationItem.js +4 -4
  9. package/dist/components/Button/Button.js +6 -6
  10. package/dist/components/CheckBox/CheckBox.js +28 -32
  11. package/dist/components/ChoiceBox/ChoiceBox.js +46 -52
  12. package/dist/components/DashboardWidget/DashboardWidget.js +4 -4
  13. package/dist/components/DataTable/DataTableComponent.js +16 -17
  14. package/dist/components/DataTable/table/BodyCell.js +3 -2
  15. package/dist/components/DataTable/table/HeaderCell.js +16 -15
  16. package/dist/components/DataTable/table/Root.js +7 -6
  17. package/dist/components/DatePicker/DatePicker.js +107 -127
  18. package/dist/components/DatePicker/index.js +1 -1
  19. package/dist/components/Divider/Divider.js +4 -4
  20. package/dist/components/Drawer/Drawer.js +22 -26
  21. package/dist/components/DropdownMenu/DropdownMenu.js +36 -41
  22. package/dist/components/IconButton/IconButton.js +4 -4
  23. package/dist/components/List/ListItem.js +1 -1
  24. package/dist/components/ModalDialog/ModalDialog.js +27 -33
  25. package/dist/components/NotificationBadge/NotificationBadge.js +1 -1
  26. package/dist/components/Pagination/Pagination.js +54 -59
  27. package/dist/components/RadioButton/RadioButton.js +32 -36
  28. package/dist/components/RadioButton/RadioGroup.js +4 -4
  29. package/dist/components/Search/Search.js +67 -74
  30. package/dist/components/Select/Select.js +53 -60
  31. package/dist/components/Switch/Switch.js +18 -22
  32. package/dist/components/Tabs/TabItem.js +16 -15
  33. package/dist/components/Tabs/Tabs.js +9 -10
  34. package/dist/components/TextArea/TextArea.js +4 -4
  35. package/dist/components/TextField/TextField.js +1 -1
  36. package/dist/components/Toast/Toast.js +16 -17
  37. package/dist/components/Tooltip/Tooltip.js +30 -35
  38. package/dist/components/TopAppBar/TopAppBar.js +4 -4
  39. package/dist/index.js +6 -6
  40. package/dist/node_modules/@ark-ui/react/dist/_virtual/_rolldown/runtime.js +11 -0
  41. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-context.js +5 -0
  42. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-content.js +15 -12
  43. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-context.js +5 -0
  44. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-indicator.js +11 -8
  45. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-trigger.js +16 -16
  46. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item.js +25 -22
  47. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-root-provider.js +24 -0
  48. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-root.js +21 -12
  49. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion.js +22 -0
  50. package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion-context.js +2 -2
  51. package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion-item-context.js +2 -2
  52. package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion-item-props-context.js +1 -1
  53. package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion.js +15 -13
  54. package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-context.js +5 -0
  55. package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-fallback.js +12 -9
  56. package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-image.js +11 -8
  57. package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-root-provider.js +20 -0
  58. package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-root.js +21 -11
  59. package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar.js +16 -0
  60. package/dist/node_modules/@ark-ui/react/dist/components/avatar/use-avatar-context.js +3 -3
  61. package/dist/node_modules/@ark-ui/react/dist/components/avatar/use-avatar.js +14 -12
  62. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-context.js +3 -3
  63. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-control.js +12 -9
  64. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-group-provider.js +22 -0
  65. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-group.js +32 -0
  66. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-hidden-input.js +13 -9
  67. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-indicator.js +17 -0
  68. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-label.js +13 -10
  69. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-root-provider.js +20 -0
  70. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-root.js +19 -13
  71. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox.anatomy.js +5 -0
  72. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox.js +24 -0
  73. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox-context.js +1 -1
  74. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox-group-context.js +2 -2
  75. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox-group.js +43 -0
  76. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox.js +16 -14
  77. package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-content.js +14 -12
  78. package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-root.js +15 -9
  79. package/dist/node_modules/@ark-ui/react/dist/components/collapsible/split-collapsible-props.js +5 -3
  80. package/dist/node_modules/@ark-ui/react/dist/components/collapsible/use-collapsible-context.js +1 -1
  81. package/dist/node_modules/@ark-ui/react/dist/components/collapsible/use-collapsible.js +17 -12
  82. package/dist/node_modules/@ark-ui/react/dist/components/collection/list-collection.js +2 -2
  83. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-clear-trigger.js +16 -0
  84. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-content.js +13 -10
  85. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-context.js +5 -0
  86. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-control.js +12 -9
  87. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-empty.js +15 -0
  88. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-input.js +14 -10
  89. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-context.js +5 -0
  90. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-group-label.js +17 -0
  91. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-group.js +20 -11
  92. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-indicator.js +17 -0
  93. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-text.js +12 -9
  94. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item.js +19 -10
  95. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-label.js +16 -0
  96. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-list.js +16 -0
  97. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-positioner.js +11 -8
  98. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-root-provider.js +25 -0
  99. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-root.js +24 -14
  100. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-trigger.js +17 -0
  101. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox.anatomy.js +5 -0
  102. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox.js +42 -0
  103. package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-context.js +2 -2
  104. package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-item-context.js +1 -1
  105. package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-item-group-props-context.js +1 -1
  106. package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-item-props-context.js +2 -2
  107. package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox.js +13 -11
  108. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-clear-trigger.js +16 -0
  109. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-content.js +13 -10
  110. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-context.js +2 -2
  111. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-control.js +12 -9
  112. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-input.js +13 -10
  113. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-label.js +12 -9
  114. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-month-select.js +14 -7
  115. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-next-trigger.js +14 -11
  116. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-positioner.js +11 -8
  117. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-preset-trigger.js +17 -0
  118. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-prev-trigger.js +14 -11
  119. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-range-text.js +21 -0
  120. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root-provider.js +26 -0
  121. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root.js +32 -16
  122. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-body.js +12 -9
  123. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell-trigger.js +16 -13
  124. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell.js +18 -13
  125. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-head.js +12 -9
  126. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-header.js +12 -9
  127. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-row.js +12 -9
  128. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table.js +22 -12
  129. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-trigger.js +11 -8
  130. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-value-text.js +25 -0
  131. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-control.js +12 -9
  132. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-trigger.js +17 -0
  133. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view.js +16 -16
  134. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-week-number-cell.js +17 -0
  135. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-week-number-header-cell.js +17 -0
  136. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-year-select.js +16 -9
  137. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker.anatomy.js +3 -3
  138. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker.js +64 -0
  139. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-context.js +1 -1
  140. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-cell-props-context.js +2 -2
  141. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-props-context.js +2 -2
  142. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-view-props-context.js +2 -2
  143. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker.js +16 -14
  144. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-backdrop.js +19 -13
  145. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-close-trigger.js +12 -9
  146. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-content.js +15 -12
  147. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-context.js +5 -0
  148. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-description.js +12 -9
  149. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-positioner.js +13 -10
  150. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-root-provider.js +24 -0
  151. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-root.js +17 -7
  152. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-title.js +13 -10
  153. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-trigger.js +21 -0
  154. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog.js +26 -0
  155. package/dist/node_modules/@ark-ui/react/dist/components/dialog/use-dialog-context.js +3 -3
  156. package/dist/node_modules/@ark-ui/react/dist/components/dialog/use-dialog.js +15 -13
  157. package/dist/node_modules/@ark-ui/react/dist/components/factory.js +21 -22
  158. package/dist/node_modules/@ark-ui/react/dist/components/field/use-field-context.js +1 -1
  159. package/dist/node_modules/@ark-ui/react/dist/components/fieldset/use-fieldset-context.js +11 -0
  160. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-arrow-tip.js +16 -0
  161. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-arrow.js +16 -0
  162. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-checkbox-item.js +35 -0
  163. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-content.js +13 -10
  164. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-context-trigger.js +16 -0
  165. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-context.js +5 -0
  166. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-indicator.js +16 -0
  167. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-context.js +5 -0
  168. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-group-label.js +17 -0
  169. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js +21 -12
  170. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-indicator.js +17 -0
  171. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-text.js +17 -0
  172. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item.js +25 -13
  173. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-positioner.js +14 -11
  174. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-radio-item-group.js +28 -0
  175. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-radio-item.js +39 -0
  176. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root-provider.js +31 -0
  177. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +32 -19
  178. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-separator.js +16 -0
  179. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-trigger-item.js +21 -0
  180. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-trigger.js +18 -17
  181. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu.js +48 -0
  182. package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-context.js +2 -2
  183. package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-item-context.js +2 -2
  184. package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-item-group-context.js +2 -2
  185. package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-machine-context.js +2 -2
  186. package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-option-item-props-context.js +2 -2
  187. package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-trigger-item-context.js +1 -1
  188. package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu.js +19 -14
  189. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-context.js +1 -1
  190. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-ellipsis.js +11 -8
  191. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-first-trigger.js +16 -0
  192. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-item.js +12 -9
  193. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-last-trigger.js +16 -0
  194. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-next-trigger.js +13 -10
  195. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-prev-trigger.js +13 -10
  196. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-root-provider.js +20 -0
  197. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-root.js +20 -12
  198. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination.js +24 -0
  199. package/dist/node_modules/@ark-ui/react/dist/components/pagination/use-pagination-context.js +4 -4
  200. package/dist/node_modules/@ark-ui/react/dist/components/pagination/use-pagination.js +15 -13
  201. package/dist/node_modules/@ark-ui/react/dist/components/portal/portal.js +16 -20
  202. package/dist/node_modules/@ark-ui/react/dist/components/presence/split-presence-props.js +1 -1
  203. package/dist/node_modules/@ark-ui/react/dist/components/presence/use-presence-context.js +3 -3
  204. package/dist/node_modules/@ark-ui/react/dist/components/presence/use-presence.js +13 -12
  205. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-context.js +5 -0
  206. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-indicator.js +16 -0
  207. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-context.js +1 -1
  208. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-control.js +12 -9
  209. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-hidden-input.js +12 -9
  210. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-text.js +14 -11
  211. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item.js +26 -13
  212. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-label.js +16 -0
  213. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-root-provider.js +20 -0
  214. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-root.js +18 -10
  215. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group.js +26 -0
  216. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group-context.js +1 -1
  217. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group-item-context.js +2 -2
  218. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group-item-props-context.js +1 -1
  219. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group.js +20 -13
  220. package/dist/node_modules/@ark-ui/react/dist/components/select/select-clear-trigger.js +16 -0
  221. package/dist/node_modules/@ark-ui/react/dist/components/select/select-content.js +13 -10
  222. package/dist/node_modules/@ark-ui/react/dist/components/select/select-context.js +5 -0
  223. package/dist/node_modules/@ark-ui/react/dist/components/select/select-control.js +12 -9
  224. package/dist/node_modules/@ark-ui/react/dist/components/select/select-hidden-select.js +23 -0
  225. package/dist/node_modules/@ark-ui/react/dist/components/select/select-indicator.js +16 -0
  226. package/dist/node_modules/@ark-ui/react/dist/components/select/select-item-context.js +5 -0
  227. package/dist/node_modules/@ark-ui/react/dist/components/select/select-item-group-label.js +17 -0
  228. package/dist/node_modules/@ark-ui/react/dist/components/select/select-item-group.js +24 -0
  229. package/dist/node_modules/@ark-ui/react/dist/components/select/select-item-indicator.js +17 -0
  230. package/dist/node_modules/@ark-ui/react/dist/components/select/select-item-text.js +17 -0
  231. package/dist/node_modules/@ark-ui/react/dist/components/select/select-item.js +22 -13
  232. package/dist/node_modules/@ark-ui/react/dist/components/select/select-label.js +13 -10
  233. package/dist/node_modules/@ark-ui/react/dist/components/select/select-list.js +16 -0
  234. package/dist/node_modules/@ark-ui/react/dist/components/select/select-positioner.js +11 -8
  235. package/dist/node_modules/@ark-ui/react/dist/components/select/select-root-provider.js +25 -0
  236. package/dist/node_modules/@ark-ui/react/dist/components/select/select-root.js +25 -14
  237. package/dist/node_modules/@ark-ui/react/dist/components/select/select-trigger.js +12 -9
  238. package/dist/node_modules/@ark-ui/react/dist/components/select/select-value-text.js +11 -7
  239. package/dist/node_modules/@ark-ui/react/dist/components/select/select.js +44 -0
  240. package/dist/node_modules/@ark-ui/react/dist/components/select/use-select-context.js +1 -1
  241. package/dist/node_modules/@ark-ui/react/dist/components/select/use-select-item-context.js +2 -2
  242. package/dist/node_modules/@ark-ui/react/dist/components/select/use-select-item-group-props.js +10 -0
  243. package/dist/node_modules/@ark-ui/react/dist/components/select/use-select-item-props-context.js +1 -1
  244. package/dist/node_modules/@ark-ui/react/dist/components/select/use-select.js +12 -10
  245. package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-context.js +5 -0
  246. package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-control.js +12 -9
  247. package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js +13 -9
  248. package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-label.js +12 -9
  249. package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-root-provider.js +20 -0
  250. package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-root.js +18 -12
  251. package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-thumb.js +10 -7
  252. package/dist/node_modules/@ark-ui/react/dist/components/switch/switch.js +20 -0
  253. package/dist/node_modules/@ark-ui/react/dist/components/switch/use-switch-context.js +1 -1
  254. package/dist/node_modules/@ark-ui/react/dist/components/switch/use-switch.js +13 -11
  255. package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-content.js +28 -0
  256. package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-indicator.js +16 -0
  257. package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-list.js +13 -10
  258. package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-trigger.js +14 -11
  259. package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-context.js +5 -0
  260. package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-root-provider.js +24 -0
  261. package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-root.js +20 -11
  262. package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs.js +20 -0
  263. package/dist/node_modules/@ark-ui/react/dist/components/tabs/use-tabs-context.js +3 -3
  264. package/dist/node_modules/@ark-ui/react/dist/components/tabs/use-tabs.js +15 -13
  265. package/dist/node_modules/@ark-ui/react/dist/components/toast/create-toaster.js +2 -2
  266. package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-action-trigger.js +16 -0
  267. package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-close-trigger.js +16 -0
  268. package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-context.js +5 -0
  269. package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-description.js +16 -0
  270. package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-root.js +14 -10
  271. package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-title.js +13 -10
  272. package/dist/node_modules/@ark-ui/react/dist/components/toast/toast.js +18 -0
  273. package/dist/node_modules/@ark-ui/react/dist/components/toast/toaster.js +37 -22
  274. package/dist/node_modules/@ark-ui/react/dist/components/toast/use-toast-context.js +4 -4
  275. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-arrow-tip.js +12 -9
  276. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-arrow.js +12 -9
  277. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-content.js +13 -10
  278. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-context.js +5 -0
  279. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-positioner.js +13 -10
  280. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-root-provider.js +20 -0
  281. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-root.js +16 -9
  282. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-trigger.js +12 -8
  283. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip.js +22 -0
  284. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/use-tooltip-context.js +1 -1
  285. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/use-tooltip.js +15 -13
  286. package/dist/node_modules/@ark-ui/react/dist/providers/environment/use-environment-context.js +1 -1
  287. package/dist/node_modules/@ark-ui/react/dist/providers/locale/use-locale-context.js +5 -2
  288. package/dist/node_modules/@ark-ui/react/dist/utils/compose-refs.js +7 -10
  289. package/dist/node_modules/@ark-ui/react/dist/utils/create-context.js +17 -20
  290. package/dist/node_modules/@ark-ui/react/dist/utils/create-split-props.js +4 -7
  291. package/dist/node_modules/@ark-ui/react/dist/utils/render-strategy.js +6 -6
  292. package/dist/node_modules/@ark-ui/react/dist/utils/use-controllable-state.js +8 -0
  293. package/dist/node_modules/@ark-ui/react/dist/utils/use-effect-once.js +1 -1
  294. package/dist/node_modules/@ark-ui/react/dist/utils/use-event.js +7 -10
  295. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +294 -289
  296. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +195 -194
  297. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +97 -97
  298. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +60 -62
  299. package/dist/node_modules/@internationalized/date/dist/GregorianCalendar.js +18 -12
  300. package/dist/node_modules/@internationalized/date/dist/conversion.js +35 -35
  301. package/dist/node_modules/@internationalized/date/dist/queries.js +126 -75
  302. package/dist/node_modules/@internationalized/date/dist/string.js +29 -28
  303. package/dist/node_modules/@zag-js/accordion/dist/accordion.anatomy.js +6 -0
  304. package/dist/node_modules/@zag-js/accordion/dist/accordion.connect.js +129 -0
  305. package/dist/node_modules/@zag-js/accordion/dist/accordion.dom.js +30 -0
  306. package/dist/node_modules/@zag-js/accordion/dist/accordion.machine.js +137 -0
  307. package/dist/node_modules/@zag-js/aria-hidden/dist/aria-hidden.js +14 -0
  308. package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +12 -49
  309. package/dist/node_modules/@zag-js/aria-hidden/dist/walk-tree-outside.js +41 -0
  310. package/dist/node_modules/@zag-js/avatar/dist/avatar.anatomy.js +6 -0
  311. package/dist/node_modules/@zag-js/avatar/dist/avatar.connect.js +52 -0
  312. package/dist/node_modules/@zag-js/avatar/dist/avatar.dom.js +17 -0
  313. package/dist/node_modules/@zag-js/avatar/dist/avatar.machine.js +93 -0
  314. package/dist/node_modules/@zag-js/checkbox/dist/checkbox.anatomy.js +6 -0
  315. package/dist/node_modules/@zag-js/checkbox/dist/checkbox.connect.js +108 -0
  316. package/dist/node_modules/@zag-js/checkbox/dist/checkbox.dom.js +21 -0
  317. package/dist/node_modules/@zag-js/checkbox/dist/checkbox.machine.js +141 -0
  318. package/dist/node_modules/@zag-js/collapsible/dist/collapsible.anatomy.js +6 -0
  319. package/dist/node_modules/@zag-js/collapsible/dist/collapsible.connect.js +80 -0
  320. package/dist/node_modules/@zag-js/collapsible/dist/collapsible.dom.js +16 -0
  321. package/dist/node_modules/@zag-js/collapsible/dist/{index.js → collapsible.machine.js} +58 -115
  322. package/dist/node_modules/@zag-js/collection/dist/chunk-QZ7TP4HQ.js +4 -0
  323. package/dist/node_modules/@zag-js/collection/dist/{index.js → list-collection.js} +58 -56
  324. package/dist/node_modules/@zag-js/collection/dist/selection-map.js +58 -0
  325. package/dist/node_modules/@zag-js/combobox/dist/combobox.anatomy.js +21 -0
  326. package/dist/node_modules/@zag-js/combobox/dist/combobox.collection.js +6 -0
  327. package/dist/node_modules/@zag-js/combobox/dist/combobox.connect.js +341 -0
  328. package/dist/node_modules/@zag-js/combobox/dist/combobox.dom.js +68 -0
  329. package/dist/node_modules/@zag-js/combobox/dist/combobox.machine.js +936 -0
  330. package/dist/node_modules/@zag-js/core/dist/create-machine.js +32 -0
  331. package/dist/node_modules/@zag-js/core/dist/memo.js +11 -0
  332. package/dist/node_modules/@zag-js/core/dist/merge-props.js +48 -0
  333. package/dist/node_modules/@zag-js/core/dist/scope.js +19 -0
  334. package/dist/node_modules/@zag-js/core/dist/state.js +143 -0
  335. package/dist/node_modules/@zag-js/core/dist/types.js +5 -0
  336. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.anatomy.js +31 -0
  337. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.connect.js +742 -0
  338. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.dom.js +73 -0
  339. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.machine.js +1042 -0
  340. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.parse.js +8 -0
  341. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.utils.js +155 -0
  342. package/dist/node_modules/@zag-js/date-utils/dist/align.js +15 -0
  343. package/dist/node_modules/@zag-js/date-utils/dist/assertion.js +26 -0
  344. package/dist/node_modules/@zag-js/date-utils/dist/constrain.js +40 -0
  345. package/dist/node_modules/@zag-js/date-utils/dist/date-month.js +74 -0
  346. package/dist/node_modules/@zag-js/date-utils/dist/date-year.js +37 -0
  347. package/dist/node_modules/@zag-js/date-utils/dist/duration.js +13 -0
  348. package/dist/node_modules/@zag-js/date-utils/dist/format.js +25 -0
  349. package/dist/node_modules/@zag-js/date-utils/dist/formatter.js +30 -0
  350. package/dist/node_modules/@zag-js/date-utils/dist/get-era-format.js +8 -0
  351. package/dist/node_modules/@zag-js/date-utils/dist/mutation.js +9 -0
  352. package/dist/node_modules/@zag-js/date-utils/dist/pagination.js +95 -0
  353. package/dist/node_modules/@zag-js/date-utils/dist/parse-date.js +34 -0
  354. package/dist/node_modules/@zag-js/date-utils/dist/preset.js +41 -0
  355. package/dist/node_modules/@zag-js/dialog/dist/dialog.anatomy.js +14 -0
  356. package/dist/node_modules/@zag-js/dialog/dist/dialog.connect.js +104 -0
  357. package/dist/node_modules/@zag-js/dialog/dist/dialog.dom.js +42 -0
  358. package/dist/node_modules/@zag-js/dialog/dist/dialog.machine.js +220 -0
  359. package/dist/node_modules/@zag-js/dismissable/dist/dismissable-layer.js +80 -0
  360. package/dist/node_modules/@zag-js/dismissable/dist/escape-keydown.js +11 -0
  361. package/dist/node_modules/@zag-js/dismissable/dist/layer-stack.js +103 -0
  362. package/dist/node_modules/@zag-js/dismissable/dist/pointer-event-outside.js +37 -0
  363. package/dist/node_modules/@zag-js/dom-query/dist/caret.js +12 -0
  364. package/dist/node_modules/@zag-js/dom-query/dist/chunk-QZ7TP4HQ.js +4 -0
  365. package/dist/node_modules/@zag-js/dom-query/dist/computed-style.js +8 -0
  366. package/dist/node_modules/@zag-js/dom-query/dist/controller.js +76 -0
  367. package/dist/node_modules/@zag-js/dom-query/dist/event.js +80 -0
  368. package/dist/node_modules/@zag-js/dom-query/dist/form.js +70 -0
  369. package/dist/node_modules/@zag-js/dom-query/dist/initial-focus.js +22 -0
  370. package/dist/node_modules/@zag-js/dom-query/dist/mutation-observer.js +41 -0
  371. package/dist/node_modules/@zag-js/dom-query/dist/navigate.js +13 -0
  372. package/dist/node_modules/@zag-js/dom-query/dist/node.js +87 -0
  373. package/dist/node_modules/@zag-js/dom-query/dist/overflow.js +27 -0
  374. package/dist/node_modules/@zag-js/dom-query/dist/platform.js +24 -0
  375. package/dist/node_modules/@zag-js/dom-query/dist/press.js +61 -0
  376. package/dist/node_modules/@zag-js/dom-query/dist/query.js +31 -0
  377. package/dist/node_modules/@zag-js/dom-query/dist/raf.js +51 -0
  378. package/dist/node_modules/@zag-js/dom-query/dist/resize-observer.js +34 -0
  379. package/dist/node_modules/@zag-js/dom-query/dist/searchable.js +17 -0
  380. package/dist/node_modules/@zag-js/dom-query/dist/set.js +29 -0
  381. package/dist/node_modules/@zag-js/dom-query/dist/shared.js +11 -0
  382. package/dist/node_modules/@zag-js/dom-query/dist/tabbable.js +110 -0
  383. package/dist/node_modules/@zag-js/dom-query/dist/text-selection.js +36 -0
  384. package/dist/node_modules/@zag-js/dom-query/dist/typeahead.js +25 -0
  385. package/dist/node_modules/@zag-js/dom-query/dist/visually-hidden.js +15 -0
  386. package/dist/node_modules/@zag-js/dom-query/dist/wait-for.js +42 -0
  387. package/dist/node_modules/@zag-js/focus-trap/dist/chunk-QZ7TP4HQ.js +4 -0
  388. package/dist/node_modules/@zag-js/focus-trap/dist/focus-trap.js +335 -0
  389. package/dist/node_modules/@zag-js/focus-trap/dist/index.js +24 -299
  390. package/dist/node_modules/@zag-js/focus-visible/dist/index.js +63 -39
  391. package/dist/node_modules/@zag-js/interact-outside/dist/frame-utils.js +60 -0
  392. package/dist/node_modules/@zag-js/interact-outside/dist/index.js +97 -131
  393. package/dist/node_modules/@zag-js/menu/dist/menu.anatomy.js +21 -0
  394. package/dist/node_modules/@zag-js/menu/dist/menu.connect.js +385 -0
  395. package/dist/node_modules/@zag-js/menu/dist/menu.dom.js +93 -0
  396. package/dist/node_modules/@zag-js/menu/dist/menu.machine.js +855 -0
  397. package/dist/node_modules/@zag-js/menu/dist/menu.utils.js +51 -0
  398. package/dist/node_modules/@zag-js/pagination/dist/pagination.anatomy.js +14 -0
  399. package/dist/node_modules/@zag-js/pagination/dist/pagination.connect.js +145 -0
  400. package/dist/node_modules/@zag-js/pagination/dist/pagination.dom.js +31 -0
  401. package/dist/node_modules/@zag-js/pagination/dist/pagination.machine.js +132 -0
  402. package/dist/node_modules/@zag-js/pagination/dist/pagination.utils.js +39 -0
  403. package/dist/node_modules/@zag-js/popper/dist/get-anchor.js +34 -0
  404. package/dist/node_modules/@zag-js/popper/dist/get-placement.js +190 -0
  405. package/dist/node_modules/@zag-js/popper/dist/get-styles.js +47 -0
  406. package/dist/node_modules/@zag-js/popper/dist/middleware.js +57 -0
  407. package/dist/node_modules/@zag-js/popper/dist/placement.js +11 -0
  408. package/dist/node_modules/@zag-js/presence/dist/presence.connect.js +16 -0
  409. package/dist/node_modules/@zag-js/presence/dist/{index.js → presence.machine.js} +39 -47
  410. package/dist/node_modules/@zag-js/radio-group/dist/radio-group.anatomy.js +13 -0
  411. package/dist/node_modules/@zag-js/radio-group/dist/radio-group.connect.js +197 -0
  412. package/dist/node_modules/@zag-js/radio-group/dist/radio-group.dom.js +57 -0
  413. package/dist/node_modules/@zag-js/radio-group/dist/radio-group.machine.js +179 -0
  414. package/dist/node_modules/@zag-js/react/dist/bindable.js +52 -0
  415. package/dist/node_modules/@zag-js/react/dist/machine.js +208 -0
  416. package/dist/node_modules/@zag-js/react/dist/normalize-props.js +5 -0
  417. package/dist/node_modules/@zag-js/react/dist/refs.js +15 -0
  418. package/dist/node_modules/@zag-js/react/dist/track.js +13 -0
  419. package/dist/node_modules/@zag-js/react/dist/use-layout-effect.js +5 -0
  420. package/dist/node_modules/@zag-js/rect-utils/dist/polygon.js +23 -0
  421. package/dist/node_modules/@zag-js/rect-utils/dist/rect.js +26 -0
  422. package/dist/node_modules/@zag-js/remove-scroll/dist/index.js +32 -23
  423. package/dist/node_modules/@zag-js/select/dist/select.anatomy.js +22 -0
  424. package/dist/node_modules/@zag-js/select/dist/select.collection.js +6 -0
  425. package/dist/node_modules/@zag-js/select/dist/select.connect.js +372 -0
  426. package/dist/node_modules/@zag-js/select/dist/select.dom.js +53 -0
  427. package/dist/node_modules/@zag-js/select/dist/select.machine.js +690 -0
  428. package/dist/node_modules/@zag-js/switch/dist/switch.anatomy.js +6 -0
  429. package/dist/node_modules/@zag-js/switch/dist/switch.connect.js +110 -0
  430. package/dist/node_modules/@zag-js/switch/dist/switch.dom.js +25 -0
  431. package/dist/node_modules/@zag-js/switch/dist/switch.machine.js +143 -0
  432. package/dist/node_modules/@zag-js/tabs/dist/tabs.anatomy.js +6 -0
  433. package/dist/node_modules/@zag-js/tabs/dist/tabs.connect.js +176 -0
  434. package/dist/node_modules/@zag-js/tabs/dist/tabs.dom.js +47 -0
  435. package/dist/node_modules/@zag-js/tabs/dist/tabs.machine.js +268 -0
  436. package/dist/node_modules/@zag-js/toast/dist/index.js +6 -798
  437. package/dist/node_modules/@zag-js/toast/dist/toast-group.connect.js +54 -0
  438. package/dist/node_modules/@zag-js/toast/dist/toast-group.machine.js +236 -0
  439. package/dist/node_modules/@zag-js/toast/dist/toast.anatomy.js +13 -0
  440. package/dist/node_modules/@zag-js/toast/dist/toast.connect.js +102 -0
  441. package/dist/node_modules/@zag-js/toast/dist/toast.dom.js +10 -0
  442. package/dist/node_modules/@zag-js/toast/dist/toast.machine.js +234 -0
  443. package/dist/node_modules/@zag-js/toast/dist/toast.store.js +134 -0
  444. package/dist/node_modules/@zag-js/toast/dist/toast.utils.js +122 -0
  445. package/dist/node_modules/@zag-js/tooltip/dist/tooltip.anatomy.js +6 -0
  446. package/dist/node_modules/@zag-js/tooltip/dist/tooltip.connect.js +120 -0
  447. package/dist/node_modules/@zag-js/tooltip/dist/tooltip.dom.js +25 -0
  448. package/dist/node_modules/@zag-js/tooltip/dist/{index.js → tooltip.machine.js} +109 -188
  449. package/dist/node_modules/@zag-js/tooltip/dist/tooltip.store.js +9 -0
  450. package/dist/node_modules/@zag-js/types/dist/prop-types.js +10 -0
  451. package/dist/node_modules/@zag-js/utils/dist/array.js +39 -0
  452. package/dist/node_modules/@zag-js/utils/dist/chunk-MXGZDBDQ.js +8 -0
  453. package/dist/node_modules/@zag-js/utils/dist/equal.js +27 -0
  454. package/dist/node_modules/@zag-js/utils/dist/functions.js +28 -0
  455. package/dist/node_modules/@zag-js/utils/dist/guard.js +19 -0
  456. package/dist/node_modules/@zag-js/utils/dist/number.js +11 -0
  457. package/dist/node_modules/@zag-js/utils/dist/object.js +13 -0
  458. package/dist/node_modules/@zag-js/utils/dist/store.js +25 -0
  459. package/dist/node_modules/@zag-js/utils/dist/timers.js +39 -0
  460. package/dist/node_modules/@zag-js/utils/dist/warning.js +25 -0
  461. package/dist/styled-system/css/css.js +1 -1
  462. package/dist/styled-system/helpers.js +85 -83
  463. package/dist/styled-system/jsx/is-valid-prop.js +1 -1
  464. package/dist/styles.css +1 -1
  465. package/package.json +18 -21
  466. package/styled-system/css/css.js +1 -1
  467. package/styled-system/helpers.js +3 -0
  468. package/styled-system/jsx/is-valid-prop.js +1 -1
  469. package/styled-system/patterns/aspect-ratio.d.ts +0 -1
  470. package/styled-system/patterns/bleed.d.ts +0 -1
  471. package/styled-system/patterns/box.d.ts +0 -1
  472. package/styled-system/patterns/center.d.ts +0 -1
  473. package/styled-system/patterns/circle.d.ts +0 -1
  474. package/styled-system/patterns/container.d.ts +0 -1
  475. package/styled-system/patterns/cq.d.ts +0 -1
  476. package/styled-system/patterns/divider.d.ts +0 -1
  477. package/styled-system/patterns/flex.d.ts +0 -1
  478. package/styled-system/patterns/float.d.ts +0 -1
  479. package/styled-system/patterns/grid-item.d.ts +0 -1
  480. package/styled-system/patterns/grid.d.ts +0 -1
  481. package/styled-system/patterns/hstack.d.ts +0 -1
  482. package/styled-system/patterns/link-overlay.d.ts +0 -1
  483. package/styled-system/patterns/spacer.d.ts +0 -1
  484. package/styled-system/patterns/square.d.ts +0 -1
  485. package/styled-system/patterns/stack.d.ts +0 -1
  486. package/styled-system/patterns/visually-hidden.d.ts +0 -1
  487. package/styled-system/patterns/vstack.d.ts +0 -1
  488. package/styled-system/patterns/wrap.d.ts +0 -1
  489. package/styled-system/themes/theme-asagi.json +1 -1
  490. package/styled-system/themes/theme-konjo-dark.json +1 -1
  491. package/styled-system/themes/theme-kurikawa.json +1 -1
  492. package/styled-system/themes/theme-sumire.json +1 -1
  493. package/styled-system/themes/theme-tsutsuji.json +1 -1
  494. package/styled-system/tokens/tokens.d.ts +1 -1
  495. package/styled-system/types/conditions.d.ts +11 -11
  496. package/styled-system/types/prop-type.d.ts +2 -0
  497. package/styled-system/types/style-props.d.ts +3 -4
  498. package/dist/node_modules/@zag-js/accordion/dist/index.js +0 -290
  499. package/dist/node_modules/@zag-js/avatar/dist/index.js +0 -154
  500. package/dist/node_modules/@zag-js/checkbox/dist/index.js +0 -270
  501. package/dist/node_modules/@zag-js/combobox/dist/index.js +0 -1415
  502. package/dist/node_modules/@zag-js/core/dist/index.js +0 -92
  503. package/dist/node_modules/@zag-js/date-picker/dist/index.js +0 -1826
  504. package/dist/node_modules/@zag-js/date-utils/dist/index.js +0 -366
  505. package/dist/node_modules/@zag-js/dialog/dist/index.js +0 -324
  506. package/dist/node_modules/@zag-js/dismissable/dist/index.js +0 -188
  507. package/dist/node_modules/@zag-js/dom-query/dist/index.js +0 -633
  508. package/dist/node_modules/@zag-js/menu/dist/index.js +0 -1235
  509. package/dist/node_modules/@zag-js/pagination/dist/index.js +0 -273
  510. package/dist/node_modules/@zag-js/popper/dist/index.js +0 -260
  511. package/dist/node_modules/@zag-js/radio-group/dist/index.js +0 -407
  512. package/dist/node_modules/@zag-js/react/dist/index.js +0 -269
  513. package/dist/node_modules/@zag-js/rect-utils/dist/index.js +0 -46
  514. package/dist/node_modules/@zag-js/select/dist/index.js +0 -1088
  515. package/dist/node_modules/@zag-js/switch/dist/index.js +0 -275
  516. package/dist/node_modules/@zag-js/tabs/dist/index.js +0 -475
  517. package/dist/node_modules/@zag-js/types/dist/index.js +0 -12
  518. package/dist/node_modules/@zag-js/utils/dist/index.js +0 -173
  519. /package/dist/node_modules/@zag-js/anatomy/dist/{index.js → create-anatomy.js} +0 -0
@@ -1,1415 +0,0 @@
1
- import { createAnatomy as ge } from "../../anatomy/dist/index.js";
2
- import { ListCollection as ie } from "../../collection/dist/index.js";
3
- import { raf as V, setCaretToEnd as de, nextTick as he, observeAttributes as pe, clickIfLink as me, dataAttr as c, ariaAttr as K, isDownloadingEvent as Ie, isOpeningInNewTab as Ce, isContextMenuEvent as ve, isLeftClick as D, getEventKey as $, isComposingEvent as fe, query as Oe, isAnchorElement as Ve, scrollIntoView as q } from "../../dom-query/dist/index.js";
4
- import { getPlacement as Y, getPlacementStyles as Ee } from "../../popper/dist/index.js";
5
- import { match as P, remove as Te, addOrRemove as j, isBoolean as ye, isEqual as Pe, ensure as ke } from "../../utils/dist/index.js";
6
- import { ariaHidden as Le } from "../../aria-hidden/dist/index.js";
7
- import { setup as Se } from "../../core/dist/index.js";
8
- import { trackDismissableElement as be } from "../../dismissable/dist/index.js";
9
- import { createProps as G } from "../../types/dist/index.js";
10
- var Ne = ge("combobox").parts(
11
- "root",
12
- "clearTrigger",
13
- "content",
14
- "control",
15
- "input",
16
- "item",
17
- "itemGroup",
18
- "itemGroupLabel",
19
- "itemIndicator",
20
- "itemText",
21
- "label",
22
- "list",
23
- "positioner",
24
- "trigger"
25
- ), C = Ne.build(), le = (e) => new ie(e);
26
- le.empty = () => new ie({ items: [] });
27
- var Fe = (e) => {
28
- var t;
29
- return ((t = e.ids) == null ? void 0 : t.root) ?? `combobox:${e.id}`;
30
- }, B = (e) => {
31
- var t;
32
- return ((t = e.ids) == null ? void 0 : t.label) ?? `combobox:${e.id}:label`;
33
- }, ne = (e) => {
34
- var t;
35
- return ((t = e.ids) == null ? void 0 : t.control) ?? `combobox:${e.id}:control`;
36
- }, M = (e) => {
37
- var t;
38
- return ((t = e.ids) == null ? void 0 : t.input) ?? `combobox:${e.id}:input`;
39
- }, w = (e) => {
40
- var t;
41
- return ((t = e.ids) == null ? void 0 : t.content) ?? `combobox:${e.id}:content`;
42
- }, oe = (e) => {
43
- var t;
44
- return ((t = e.ids) == null ? void 0 : t.positioner) ?? `combobox:${e.id}:popper`;
45
- }, ae = (e) => {
46
- var t;
47
- return ((t = e.ids) == null ? void 0 : t.trigger) ?? `combobox:${e.id}:toggle-btn`;
48
- }, se = (e) => {
49
- var t;
50
- return ((t = e.ids) == null ? void 0 : t.clearTrigger) ?? `combobox:${e.id}:clear-btn`;
51
- }, He = (e, t) => {
52
- var i, l;
53
- return ((l = (i = e.ids) == null ? void 0 : i.itemGroup) == null ? void 0 : l.call(i, t)) ?? `combobox:${e.id}:optgroup:${t}`;
54
- }, J = (e, t) => {
55
- var i, l;
56
- return ((l = (i = e.ids) == null ? void 0 : i.itemGroupLabel) == null ? void 0 : l.call(i, t)) ?? `combobox:${e.id}:optgroup-label:${t}`;
57
- }, Q = (e, t) => {
58
- var i, l;
59
- return ((l = (i = e.ids) == null ? void 0 : i.item) == null ? void 0 : l.call(i, t)) ?? `combobox:${e.id}:option:${t}`;
60
- }, k = (e) => e.getById(w(e)), L = (e) => e.getById(M(e)), X = (e) => e.getById(oe(e)), Z = (e) => e.getById(ne(e)), H = (e) => e.getById(ae(e)), z = (e) => e.getById(se(e)), F = (e, t) => {
61
- if (t == null) return null;
62
- const i = `[role=option][data-value="${CSS.escape(t)}"]`;
63
- return Oe(k(e), i);
64
- }, ee = (e) => {
65
- const t = L(e);
66
- e.isActiveElement(t) || t == null || t.focus({ preventScroll: !0 });
67
- }, Re = (e) => {
68
- const t = H(e);
69
- e.isActiveElement(t) || t == null || t.focus({ preventScroll: !0 });
70
- };
71
- function qe(e, t) {
72
- const { context: i, prop: l, state: n, send: o, scope: s, computed: u, event: E } = e, I = l("translations"), f = l("collection"), m = l("disabled"), T = u("isInteractive"), O = l("invalid"), N = l("readOnly"), h = n.hasTag("open"), R = n.hasTag("focused"), S = l("composite"), b = i.get("highlightedValue"), re = Ee({
73
- ...l("positioning"),
74
- placement: i.get("currentPlacement")
75
- });
76
- function U(a) {
77
- const r = f.getItemDisabled(a.item), g = f.getItemValue(a.item);
78
- return ke(g, () => `[zag-js] No value found for item ${JSON.stringify(a.item)}`), {
79
- value: g,
80
- disabled: !!(r || r),
81
- highlighted: b === g,
82
- selected: i.get("value").includes(g)
83
- };
84
- }
85
- return {
86
- focused: R,
87
- open: h,
88
- inputValue: i.get("inputValue"),
89
- highlightedValue: b,
90
- highlightedItem: i.get("highlightedItem"),
91
- value: i.get("value"),
92
- valueAsString: u("valueAsString"),
93
- hasSelectedItems: u("hasSelectedItems"),
94
- selectedItems: i.get("selectedItems"),
95
- collection: l("collection"),
96
- multiple: !!l("multiple"),
97
- disabled: !!m,
98
- syncSelectedItems() {
99
- o({ type: "SELECTED_ITEMS.SYNC" });
100
- },
101
- reposition(a = {}) {
102
- o({ type: "POSITIONING.SET", options: a });
103
- },
104
- setHighlightValue(a) {
105
- o({ type: "HIGHLIGHTED_VALUE.SET", value: a });
106
- },
107
- clearHighlightValue() {
108
- o({ type: "HIGHLIGHTED_VALUE.CLEAR" });
109
- },
110
- selectValue(a) {
111
- o({ type: "ITEM.SELECT", value: a });
112
- },
113
- setValue(a) {
114
- o({ type: "VALUE.SET", value: a });
115
- },
116
- setInputValue(a, r = "script") {
117
- o({ type: "INPUT_VALUE.SET", value: a, src: r });
118
- },
119
- clearValue(a) {
120
- a != null ? o({ type: "ITEM.CLEAR", value: a }) : o({ type: "VALUE.CLEAR" });
121
- },
122
- focus() {
123
- var a;
124
- (a = L(s)) == null || a.focus();
125
- },
126
- setOpen(a, r = "script") {
127
- n.hasTag("open") !== a && o({ type: a ? "OPEN" : "CLOSE", src: r });
128
- },
129
- getRootProps() {
130
- return t.element({
131
- ...C.root.attrs,
132
- dir: l("dir"),
133
- id: Fe(s),
134
- "data-invalid": c(O),
135
- "data-readonly": c(N)
136
- });
137
- },
138
- getLabelProps() {
139
- return t.label({
140
- ...C.label.attrs,
141
- dir: l("dir"),
142
- htmlFor: M(s),
143
- id: B(s),
144
- "data-readonly": c(N),
145
- "data-disabled": c(m),
146
- "data-invalid": c(O),
147
- "data-focus": c(R),
148
- onClick(a) {
149
- var r;
150
- S || (a.preventDefault(), (r = H(s)) == null || r.focus({ preventScroll: !0 }));
151
- }
152
- });
153
- },
154
- getControlProps() {
155
- return t.element({
156
- ...C.control.attrs,
157
- dir: l("dir"),
158
- id: ne(s),
159
- "data-state": h ? "open" : "closed",
160
- "data-focus": c(R),
161
- "data-disabled": c(m),
162
- "data-invalid": c(O)
163
- });
164
- },
165
- getPositionerProps() {
166
- return t.element({
167
- ...C.positioner.attrs,
168
- dir: l("dir"),
169
- id: oe(s),
170
- style: re.floating
171
- });
172
- },
173
- getInputProps() {
174
- return t.input({
175
- ...C.input.attrs,
176
- dir: l("dir"),
177
- "aria-invalid": K(O),
178
- "data-invalid": c(O),
179
- "data-autofocus": c(l("autoFocus")),
180
- name: l("name"),
181
- form: l("form"),
182
- disabled: m,
183
- required: l("required"),
184
- autoComplete: "off",
185
- autoCorrect: "off",
186
- autoCapitalize: "none",
187
- spellCheck: "false",
188
- readOnly: N,
189
- placeholder: l("placeholder"),
190
- id: M(s),
191
- type: "text",
192
- role: "combobox",
193
- defaultValue: i.get("inputValue"),
194
- "aria-autocomplete": u("autoComplete") ? "both" : "list",
195
- "aria-controls": w(s),
196
- "aria-expanded": h,
197
- "data-state": h ? "open" : "closed",
198
- "aria-activedescendant": b ? Q(s, b) : void 0,
199
- onClick(a) {
200
- a.defaultPrevented || l("openOnClick") && T && o({ type: "INPUT.CLICK", src: "input-click" });
201
- },
202
- onFocus() {
203
- m || o({ type: "INPUT.FOCUS" });
204
- },
205
- onBlur() {
206
- m || o({ type: "INPUT.BLUR" });
207
- },
208
- onChange(a) {
209
- o({ type: "INPUT.CHANGE", value: a.currentTarget.value, src: "input-change" });
210
- },
211
- onKeyDown(a) {
212
- if (a.defaultPrevented || !T || a.ctrlKey || a.shiftKey || fe(a)) return;
213
- const r = l("openOnKeyPress"), g = a.ctrlKey || a.metaKey || a.shiftKey, p = !0, A = {
214
- ArrowDown(y) {
215
- !r && !h || (o({ type: y.altKey ? "OPEN" : "INPUT.ARROW_DOWN", keypress: p, src: "arrow-key" }), y.preventDefault());
216
- },
217
- ArrowUp() {
218
- !r && !h || (o({ type: a.altKey ? "CLOSE" : "INPUT.ARROW_UP", keypress: p, src: "arrow-key" }), a.preventDefault());
219
- },
220
- Home(y) {
221
- g || (o({ type: "INPUT.HOME", keypress: p }), h && y.preventDefault());
222
- },
223
- End(y) {
224
- g || (o({ type: "INPUT.END", keypress: p }), h && y.preventDefault());
225
- },
226
- Enter(y) {
227
- var W;
228
- o({ type: "INPUT.ENTER", keypress: p, src: "item-select" });
229
- const ce = u("isCustomValue") && l("allowCustomValue");
230
- if (h && !ce && y.preventDefault(), b == null) return;
231
- const _ = F(s, b);
232
- Ve(_) && ((W = l("navigate")) == null || W({ value: b, node: _, href: _.href }));
233
- },
234
- Escape() {
235
- o({ type: "INPUT.ESCAPE", keypress: p, src: "escape-key" }), a.preventDefault();
236
- }
237
- }, ue = $(a, { dir: l("dir") }), x = A[ue];
238
- x == null || x(a);
239
- }
240
- });
241
- },
242
- getTriggerProps(a = {}) {
243
- return t.button({
244
- ...C.trigger.attrs,
245
- dir: l("dir"),
246
- id: ae(s),
247
- "aria-haspopup": S ? "listbox" : "dialog",
248
- type: "button",
249
- tabIndex: a.focusable ? void 0 : -1,
250
- "aria-label": I.triggerLabel,
251
- "aria-expanded": h,
252
- "data-state": h ? "open" : "closed",
253
- "aria-controls": h ? w(s) : void 0,
254
- disabled: m,
255
- "data-invalid": c(O),
256
- "data-focusable": c(a.focusable),
257
- "data-readonly": c(N),
258
- "data-disabled": c(m),
259
- onFocus() {
260
- a.focusable && o({ type: "INPUT.FOCUS", src: "trigger" });
261
- },
262
- onClick(r) {
263
- r.defaultPrevented || T && D(r) && o({ type: "TRIGGER.CLICK", src: "trigger-click" });
264
- },
265
- onPointerDown(r) {
266
- T && r.pointerType !== "touch" && D(r) && (r.preventDefault(), queueMicrotask(() => {
267
- var g;
268
- (g = L(s)) == null || g.focus({ preventScroll: !0 });
269
- }));
270
- },
271
- onKeyDown(r) {
272
- if (r.defaultPrevented || S) return;
273
- const g = {
274
- ArrowDown() {
275
- o({ type: "INPUT.ARROW_DOWN", src: "arrow-key" });
276
- },
277
- ArrowUp() {
278
- o({ type: "INPUT.ARROW_UP", src: "arrow-key" });
279
- }
280
- }, p = $(r, { dir: l("dir") }), A = g[p];
281
- A && (A(r), r.preventDefault());
282
- }
283
- });
284
- },
285
- getContentProps() {
286
- return t.element({
287
- ...C.content.attrs,
288
- dir: l("dir"),
289
- id: w(s),
290
- role: S ? "listbox" : "dialog",
291
- tabIndex: -1,
292
- hidden: !h,
293
- "data-state": h ? "open" : "closed",
294
- "data-placement": i.get("currentPlacement"),
295
- "aria-labelledby": B(s),
296
- "aria-multiselectable": l("multiple") && S ? !0 : void 0,
297
- "data-empty": c(f.size === 0),
298
- onPointerDown(a) {
299
- D(a) && a.preventDefault();
300
- }
301
- });
302
- },
303
- getListProps() {
304
- return t.element({
305
- ...C.list.attrs,
306
- role: S ? void 0 : "listbox",
307
- "data-empty": c(f.size === 0),
308
- "aria-labelledby": B(s),
309
- "aria-multiselectable": l("multiple") && !S ? !0 : void 0
310
- });
311
- },
312
- getClearTriggerProps() {
313
- return t.button({
314
- ...C.clearTrigger.attrs,
315
- dir: l("dir"),
316
- id: se(s),
317
- type: "button",
318
- tabIndex: -1,
319
- disabled: m,
320
- "data-invalid": c(O),
321
- "aria-label": I.clearTriggerLabel,
322
- "aria-controls": M(s),
323
- hidden: !i.get("value").length,
324
- onPointerDown(a) {
325
- D(a) && a.preventDefault();
326
- },
327
- onClick(a) {
328
- a.defaultPrevented || T && o({ type: "VALUE.CLEAR", src: "clear-trigger" });
329
- }
330
- });
331
- },
332
- getItemState: U,
333
- getItemProps(a) {
334
- const r = U(a), g = r.value;
335
- return t.element({
336
- ...C.item.attrs,
337
- dir: l("dir"),
338
- id: Q(s, g),
339
- role: "option",
340
- tabIndex: -1,
341
- "data-highlighted": c(r.highlighted),
342
- "data-state": r.selected ? "checked" : "unchecked",
343
- "aria-selected": K(r.highlighted),
344
- "aria-disabled": K(r.disabled),
345
- "data-disabled": c(r.disabled),
346
- "data-value": r.value,
347
- onPointerMove() {
348
- r.disabled || r.highlighted || o({ type: "ITEM.POINTER_MOVE", value: g });
349
- },
350
- onPointerLeave() {
351
- if (a.persistFocus || r.disabled) return;
352
- const p = E.previous();
353
- p != null && p.type.includes("POINTER") && o({ type: "ITEM.POINTER_LEAVE", value: g });
354
- },
355
- onClick(p) {
356
- Ie(p) || Ce(p) || ve(p) || r.disabled || o({ type: "ITEM.CLICK", src: "item-select", value: g });
357
- }
358
- });
359
- },
360
- getItemTextProps(a) {
361
- const r = U(a);
362
- return t.element({
363
- ...C.itemText.attrs,
364
- dir: l("dir"),
365
- "data-state": r.selected ? "checked" : "unchecked",
366
- "data-disabled": c(r.disabled),
367
- "data-highlighted": c(r.highlighted)
368
- });
369
- },
370
- getItemIndicatorProps(a) {
371
- const r = U(a);
372
- return t.element({
373
- "aria-hidden": !0,
374
- ...C.itemIndicator.attrs,
375
- dir: l("dir"),
376
- "data-state": r.selected ? "checked" : "unchecked",
377
- hidden: !r.selected
378
- });
379
- },
380
- getItemGroupProps(a) {
381
- const { id: r } = a;
382
- return t.element({
383
- ...C.itemGroup.attrs,
384
- dir: l("dir"),
385
- id: He(s, r),
386
- "aria-labelledby": J(s, r),
387
- "data-empty": c(f.size === 0),
388
- role: "group"
389
- });
390
- },
391
- getItemGroupLabelProps(a) {
392
- const { htmlFor: r } = a;
393
- return t.element({
394
- ...C.itemGroupLabel.attrs,
395
- dir: l("dir"),
396
- id: J(s, r),
397
- role: "presentation"
398
- });
399
- }
400
- };
401
- }
402
- var { guards: Ae, createMachine: Ue, choose: De } = Se(), { and: d, not: v } = Ae, Ye = Ue({
403
- props({ props: e }) {
404
- return {
405
- loopFocus: !0,
406
- openOnClick: !1,
407
- defaultValue: [],
408
- closeOnSelect: !e.multiple,
409
- allowCustomValue: !1,
410
- inputBehavior: "none",
411
- selectionBehavior: e.multiple ? "clear" : "replace",
412
- openOnKeyPress: !0,
413
- openOnChange: !0,
414
- composite: !0,
415
- navigate({ node: t }) {
416
- me(t);
417
- },
418
- collection: le.empty(),
419
- ...e,
420
- positioning: {
421
- placement: "bottom",
422
- sameWidth: !0,
423
- ...e.positioning
424
- },
425
- translations: {
426
- triggerLabel: "Toggle suggestions",
427
- clearTriggerLabel: "Clear value",
428
- ...e.translations
429
- }
430
- };
431
- },
432
- initialState({ prop: e }) {
433
- return e("open") || e("defaultOpen") ? "suggesting" : "idle";
434
- },
435
- context({ prop: e, bindable: t, getContext: i, getEvent: l }) {
436
- return {
437
- currentPlacement: t(() => ({
438
- defaultValue: void 0
439
- })),
440
- value: t(() => ({
441
- defaultValue: e("defaultValue"),
442
- value: e("value"),
443
- isEqual: Pe,
444
- hash(n) {
445
- return n.join(",");
446
- },
447
- onChange(n) {
448
- var I;
449
- const o = i(), s = o.get("selectedItems"), u = e("collection"), E = n.map((f) => s.find((T) => u.getItemValue(T) === f) || u.find(f));
450
- o.set("selectedItems", E), (I = e("onValueChange")) == null || I({ value: n, items: E });
451
- }
452
- })),
453
- highlightedValue: t(() => ({
454
- defaultValue: e("defaultHighlightedValue") || null,
455
- value: e("highlightedValue"),
456
- onChange(n) {
457
- var s;
458
- const o = e("collection").find(n);
459
- (s = e("onHighlightChange")) == null || s({ highlightedValue: n, highlightedItem: o });
460
- }
461
- })),
462
- inputValue: t(() => {
463
- let n = e("inputValue") || e("defaultInputValue") || "";
464
- const o = e("defaultValue") || e("value") || [];
465
- if (!n.trim() && !e("multiple")) {
466
- const s = e("collection").stringifyMany(o);
467
- n = P(e("selectionBehavior"), {
468
- preserve: n || s,
469
- replace: s,
470
- clear: ""
471
- });
472
- }
473
- return {
474
- defaultValue: n,
475
- value: e("inputValue"),
476
- onChange(s) {
477
- var I;
478
- const u = l(), E = (u.previousEvent || u).src;
479
- (I = e("onInputValueChange")) == null || I({ inputValue: s, reason: E });
480
- }
481
- };
482
- }),
483
- highlightedItem: t(() => {
484
- const n = e("highlightedValue");
485
- return { defaultValue: e("collection").find(n) };
486
- }),
487
- selectedItems: t(() => {
488
- const n = e("value") || e("defaultValue") || [];
489
- return { defaultValue: e("collection").findMany(n) };
490
- })
491
- };
492
- },
493
- computed: {
494
- isInputValueEmpty: ({ context: e }) => e.get("inputValue").length === 0,
495
- isInteractive: ({ prop: e }) => !(e("readOnly") || e("disabled")),
496
- autoComplete: ({ prop: e }) => e("inputBehavior") === "autocomplete",
497
- autoHighlight: ({ prop: e }) => e("inputBehavior") === "autohighlight",
498
- hasSelectedItems: ({ context: e }) => e.get("value").length > 0,
499
- valueAsString: ({ context: e, prop: t }) => t("collection").stringifyItems(e.get("selectedItems")),
500
- isCustomValue: ({ context: e, computed: t }) => e.get("inputValue") !== t("valueAsString")
501
- },
502
- watch({ context: e, prop: t, track: i, action: l, send: n }) {
503
- i([() => e.hash("value")], () => {
504
- l(["syncSelectedItems"]);
505
- }), i([() => e.get("inputValue")], () => {
506
- l(["syncInputValue"]);
507
- }), i([() => e.get("highlightedValue")], () => {
508
- l(["syncHighlightedItem", "autofillInputValue"]);
509
- }), i([() => t("open")], () => {
510
- l(["toggleVisibility"]);
511
- }), i([() => t("collection").toString()], () => {
512
- n({ type: "CHILDREN_CHANGE" });
513
- });
514
- },
515
- on: {
516
- "SELECTED_ITEMS.SYNC": {
517
- actions: ["syncSelectedItems"]
518
- },
519
- "HIGHLIGHTED_VALUE.SET": {
520
- actions: ["setHighlightedValue"]
521
- },
522
- "HIGHLIGHTED_VALUE.CLEAR": {
523
- actions: ["clearHighlightedValue"]
524
- },
525
- "ITEM.SELECT": {
526
- actions: ["selectItem"]
527
- },
528
- "ITEM.CLEAR": {
529
- actions: ["clearItem"]
530
- },
531
- "VALUE.SET": {
532
- actions: ["setValue"]
533
- },
534
- "INPUT_VALUE.SET": {
535
- actions: ["setInputValue"]
536
- },
537
- "POSITIONING.SET": {
538
- actions: ["reposition"]
539
- }
540
- },
541
- entry: De([
542
- {
543
- guard: "autoFocus",
544
- actions: ["setInitialFocus"]
545
- }
546
- ]),
547
- states: {
548
- idle: {
549
- tags: ["idle", "closed"],
550
- entry: ["scrollContentToTop", "clearHighlightedValue"],
551
- on: {
552
- "CONTROLLED.OPEN": {
553
- target: "interacting"
554
- },
555
- "TRIGGER.CLICK": [
556
- {
557
- guard: "isOpenControlled",
558
- actions: ["setInitialFocus", "highlightFirstSelectedItem", "invokeOnOpen"]
559
- },
560
- {
561
- target: "interacting",
562
- actions: ["setInitialFocus", "highlightFirstSelectedItem", "invokeOnOpen"]
563
- }
564
- ],
565
- "INPUT.CLICK": [
566
- {
567
- guard: "isOpenControlled",
568
- actions: ["highlightFirstSelectedItem", "invokeOnOpen"]
569
- },
570
- {
571
- target: "interacting",
572
- actions: ["highlightFirstSelectedItem", "invokeOnOpen"]
573
- }
574
- ],
575
- "INPUT.FOCUS": {
576
- target: "focused"
577
- },
578
- OPEN: [
579
- {
580
- guard: "isOpenControlled",
581
- actions: ["invokeOnOpen"]
582
- },
583
- {
584
- target: "interacting",
585
- actions: ["invokeOnOpen"]
586
- }
587
- ],
588
- "VALUE.CLEAR": {
589
- target: "focused",
590
- actions: ["clearInputValue", "clearSelectedItems", "setInitialFocus"]
591
- }
592
- }
593
- },
594
- focused: {
595
- tags: ["focused", "closed"],
596
- entry: ["scrollContentToTop", "clearHighlightedValue"],
597
- on: {
598
- "CONTROLLED.OPEN": [
599
- {
600
- guard: "isChangeEvent",
601
- target: "suggesting"
602
- },
603
- {
604
- target: "interacting"
605
- }
606
- ],
607
- "INPUT.CHANGE": [
608
- {
609
- guard: d("isOpenControlled", "openOnChange"),
610
- actions: ["setInputValue", "invokeOnOpen", "highlightFirstItemIfNeeded"]
611
- },
612
- {
613
- guard: "openOnChange",
614
- target: "suggesting",
615
- actions: ["setInputValue", "invokeOnOpen", "highlightFirstItemIfNeeded"]
616
- },
617
- {
618
- actions: ["setInputValue"]
619
- }
620
- ],
621
- "LAYER.INTERACT_OUTSIDE": {
622
- target: "idle"
623
- },
624
- "INPUT.ESCAPE": {
625
- guard: d("isCustomValue", v("allowCustomValue")),
626
- actions: ["revertInputValue"]
627
- },
628
- "INPUT.BLUR": {
629
- target: "idle"
630
- },
631
- "INPUT.CLICK": [
632
- {
633
- guard: "isOpenControlled",
634
- actions: ["highlightFirstSelectedItem", "invokeOnOpen"]
635
- },
636
- {
637
- target: "interacting",
638
- actions: ["highlightFirstSelectedItem", "invokeOnOpen"]
639
- }
640
- ],
641
- "TRIGGER.CLICK": [
642
- {
643
- guard: "isOpenControlled",
644
- actions: ["setInitialFocus", "highlightFirstSelectedItem", "invokeOnOpen"]
645
- },
646
- {
647
- target: "interacting",
648
- actions: ["setInitialFocus", "highlightFirstSelectedItem", "invokeOnOpen"]
649
- }
650
- ],
651
- "INPUT.ARROW_DOWN": [
652
- // == group 1 ==
653
- {
654
- guard: d("isOpenControlled", "autoComplete"),
655
- actions: ["invokeOnOpen"]
656
- },
657
- {
658
- guard: "autoComplete",
659
- target: "interacting",
660
- actions: ["invokeOnOpen"]
661
- },
662
- // == group 2 ==
663
- {
664
- guard: "isOpenControlled",
665
- actions: ["highlightFirstOrSelectedItem", "invokeOnOpen"]
666
- },
667
- {
668
- target: "interacting",
669
- actions: ["highlightFirstOrSelectedItem", "invokeOnOpen"]
670
- }
671
- ],
672
- "INPUT.ARROW_UP": [
673
- // == group 1 ==
674
- {
675
- guard: "autoComplete",
676
- target: "interacting",
677
- actions: ["invokeOnOpen"]
678
- },
679
- {
680
- guard: "autoComplete",
681
- target: "interacting",
682
- actions: ["invokeOnOpen"]
683
- },
684
- // == group 2 ==
685
- {
686
- target: "interacting",
687
- actions: ["highlightLastOrSelectedItem", "invokeOnOpen"]
688
- },
689
- {
690
- target: "interacting",
691
- actions: ["highlightLastOrSelectedItem", "invokeOnOpen"]
692
- }
693
- ],
694
- OPEN: [
695
- {
696
- guard: "isOpenControlled",
697
- actions: ["invokeOnOpen"]
698
- },
699
- {
700
- target: "interacting",
701
- actions: ["invokeOnOpen"]
702
- }
703
- ],
704
- "VALUE.CLEAR": {
705
- actions: ["clearInputValue", "clearSelectedItems"]
706
- }
707
- }
708
- },
709
- interacting: {
710
- tags: ["open", "focused"],
711
- entry: ["setInitialFocus"],
712
- effects: ["scrollToHighlightedItem", "trackDismissableLayer", "trackPlacement", "hideOtherElements"],
713
- on: {
714
- "CONTROLLED.CLOSE": [
715
- {
716
- guard: "restoreFocus",
717
- target: "focused",
718
- actions: ["setFinalFocus"]
719
- },
720
- {
721
- target: "idle"
722
- }
723
- ],
724
- CHILDREN_CHANGE: [
725
- {
726
- guard: "isHighlightedItemRemoved",
727
- actions: ["clearHighlightedValue"]
728
- },
729
- {
730
- actions: ["scrollToHighlightedItem"]
731
- }
732
- ],
733
- "INPUT.HOME": {
734
- actions: ["highlightFirstItem"]
735
- },
736
- "INPUT.END": {
737
- actions: ["highlightLastItem"]
738
- },
739
- "INPUT.ARROW_DOWN": [
740
- {
741
- guard: d("autoComplete", "isLastItemHighlighted"),
742
- actions: ["clearHighlightedValue", "scrollContentToTop"]
743
- },
744
- {
745
- actions: ["highlightNextItem"]
746
- }
747
- ],
748
- "INPUT.ARROW_UP": [
749
- {
750
- guard: d("autoComplete", "isFirstItemHighlighted"),
751
- actions: ["clearHighlightedValue"]
752
- },
753
- {
754
- actions: ["highlightPrevItem"]
755
- }
756
- ],
757
- "INPUT.ENTER": [
758
- // == group 1 ==
759
- {
760
- guard: d("isOpenControlled", "isCustomValue", v("hasHighlightedItem"), v("allowCustomValue")),
761
- actions: ["revertInputValue", "invokeOnClose"]
762
- },
763
- {
764
- guard: d("isCustomValue", v("hasHighlightedItem"), v("allowCustomValue")),
765
- target: "focused",
766
- actions: ["revertInputValue", "invokeOnClose"]
767
- },
768
- // == group 2 ==
769
- {
770
- guard: d("isOpenControlled", "closeOnSelect"),
771
- actions: ["selectHighlightedItem", "invokeOnClose"]
772
- },
773
- {
774
- guard: "closeOnSelect",
775
- target: "focused",
776
- actions: ["selectHighlightedItem", "invokeOnClose", "setFinalFocus"]
777
- },
778
- {
779
- actions: ["selectHighlightedItem"]
780
- }
781
- ],
782
- "INPUT.CHANGE": [
783
- {
784
- guard: "autoComplete",
785
- target: "suggesting",
786
- actions: ["setInputValue"]
787
- },
788
- {
789
- target: "suggesting",
790
- actions: ["clearHighlightedValue", "setInputValue"]
791
- }
792
- ],
793
- "ITEM.POINTER_MOVE": {
794
- actions: ["setHighlightedValue"]
795
- },
796
- "ITEM.POINTER_LEAVE": {
797
- actions: ["clearHighlightedValue"]
798
- },
799
- "ITEM.CLICK": [
800
- {
801
- guard: d("isOpenControlled", "closeOnSelect"),
802
- actions: ["selectItem", "invokeOnClose"]
803
- },
804
- {
805
- guard: "closeOnSelect",
806
- target: "focused",
807
- actions: ["selectItem", "invokeOnClose", "setFinalFocus"]
808
- },
809
- {
810
- actions: ["selectItem"]
811
- }
812
- ],
813
- "LAYER.ESCAPE": [
814
- {
815
- guard: d("isOpenControlled", "autoComplete"),
816
- actions: ["syncInputValue", "invokeOnClose"]
817
- },
818
- {
819
- guard: "autoComplete",
820
- target: "focused",
821
- actions: ["syncInputValue", "invokeOnClose"]
822
- },
823
- {
824
- guard: "isOpenControlled",
825
- actions: ["invokeOnClose"]
826
- },
827
- {
828
- target: "focused",
829
- actions: ["invokeOnClose", "setFinalFocus"]
830
- }
831
- ],
832
- "TRIGGER.CLICK": [
833
- {
834
- guard: "isOpenControlled",
835
- actions: ["invokeOnClose"]
836
- },
837
- {
838
- target: "focused",
839
- actions: ["invokeOnClose"]
840
- }
841
- ],
842
- "LAYER.INTERACT_OUTSIDE": [
843
- // == group 1 ==
844
- {
845
- guard: d("isOpenControlled", "isCustomValue", v("allowCustomValue")),
846
- actions: ["revertInputValue", "invokeOnClose"]
847
- },
848
- {
849
- guard: d("isCustomValue", v("allowCustomValue")),
850
- target: "idle",
851
- actions: ["revertInputValue", "invokeOnClose"]
852
- },
853
- // == group 2 ==
854
- {
855
- guard: "isOpenControlled",
856
- actions: ["invokeOnClose"]
857
- },
858
- {
859
- target: "idle",
860
- actions: ["invokeOnClose"]
861
- }
862
- ],
863
- CLOSE: [
864
- {
865
- guard: "isOpenControlled",
866
- actions: ["invokeOnClose"]
867
- },
868
- {
869
- target: "focused",
870
- actions: ["invokeOnClose", "setFinalFocus"]
871
- }
872
- ],
873
- "VALUE.CLEAR": [
874
- {
875
- guard: "isOpenControlled",
876
- actions: ["clearInputValue", "clearSelectedItems", "invokeOnClose"]
877
- },
878
- {
879
- target: "focused",
880
- actions: ["clearInputValue", "clearSelectedItems", "invokeOnClose", "setFinalFocus"]
881
- }
882
- ]
883
- }
884
- },
885
- suggesting: {
886
- tags: ["open", "focused"],
887
- effects: ["trackDismissableLayer", "scrollToHighlightedItem", "trackPlacement", "hideOtherElements"],
888
- entry: ["setInitialFocus"],
889
- on: {
890
- "CONTROLLED.CLOSE": [
891
- {
892
- guard: "restoreFocus",
893
- target: "focused",
894
- actions: ["setFinalFocus"]
895
- },
896
- {
897
- target: "idle"
898
- }
899
- ],
900
- CHILDREN_CHANGE: [
901
- {
902
- guard: "autoHighlight",
903
- actions: ["highlightFirstItem"]
904
- },
905
- {
906
- guard: "isHighlightedItemRemoved",
907
- actions: ["clearHighlightedValue"]
908
- }
909
- ],
910
- "INPUT.ARROW_DOWN": {
911
- target: "interacting",
912
- actions: ["highlightNextItem"]
913
- },
914
- "INPUT.ARROW_UP": {
915
- target: "interacting",
916
- actions: ["highlightPrevItem"]
917
- },
918
- "INPUT.HOME": {
919
- target: "interacting",
920
- actions: ["highlightFirstItem"]
921
- },
922
- "INPUT.END": {
923
- target: "interacting",
924
- actions: ["highlightLastItem"]
925
- },
926
- "INPUT.ENTER": [
927
- // == group 1 ==
928
- {
929
- guard: d("isOpenControlled", "isCustomValue", v("hasHighlightedItem"), v("allowCustomValue")),
930
- actions: ["revertInputValue", "invokeOnClose"]
931
- },
932
- {
933
- guard: d("isCustomValue", v("hasHighlightedItem"), v("allowCustomValue")),
934
- target: "focused",
935
- actions: ["revertInputValue", "invokeOnClose"]
936
- },
937
- // == group 2 ==
938
- {
939
- guard: d("isOpenControlled", "closeOnSelect"),
940
- actions: ["selectHighlightedItem", "invokeOnClose"]
941
- },
942
- {
943
- guard: "closeOnSelect",
944
- target: "focused",
945
- actions: ["selectHighlightedItem", "invokeOnClose", "setFinalFocus"]
946
- },
947
- {
948
- actions: ["selectHighlightedItem"]
949
- }
950
- ],
951
- "INPUT.CHANGE": {
952
- actions: ["setInputValue"]
953
- },
954
- "LAYER.ESCAPE": [
955
- {
956
- guard: "isOpenControlled",
957
- actions: ["invokeOnClose"]
958
- },
959
- {
960
- target: "focused",
961
- actions: ["invokeOnClose"]
962
- }
963
- ],
964
- "ITEM.POINTER_MOVE": {
965
- target: "interacting",
966
- actions: ["setHighlightedValue"]
967
- },
968
- "ITEM.POINTER_LEAVE": {
969
- actions: ["clearHighlightedValue"]
970
- },
971
- "LAYER.INTERACT_OUTSIDE": [
972
- // == group 1 ==
973
- {
974
- guard: d("isOpenControlled", "isCustomValue", v("allowCustomValue")),
975
- actions: ["revertInputValue", "invokeOnClose"]
976
- },
977
- {
978
- guard: d("isCustomValue", v("allowCustomValue")),
979
- target: "idle",
980
- actions: ["revertInputValue", "invokeOnClose"]
981
- },
982
- // == group 2 ==
983
- {
984
- guard: "isOpenControlled",
985
- actions: ["invokeOnClose"]
986
- },
987
- {
988
- target: "idle",
989
- actions: ["invokeOnClose"]
990
- }
991
- ],
992
- "TRIGGER.CLICK": [
993
- {
994
- guard: "isOpenControlled",
995
- actions: ["invokeOnClose"]
996
- },
997
- {
998
- target: "focused",
999
- actions: ["invokeOnClose"]
1000
- }
1001
- ],
1002
- "ITEM.CLICK": [
1003
- {
1004
- guard: d("isOpenControlled", "closeOnSelect"),
1005
- actions: ["selectItem", "invokeOnClose"]
1006
- },
1007
- {
1008
- guard: "closeOnSelect",
1009
- target: "focused",
1010
- actions: ["selectItem", "invokeOnClose", "setFinalFocus"]
1011
- },
1012
- {
1013
- actions: ["selectItem"]
1014
- }
1015
- ],
1016
- CLOSE: [
1017
- {
1018
- guard: "isOpenControlled",
1019
- actions: ["invokeOnClose"]
1020
- },
1021
- {
1022
- target: "focused",
1023
- actions: ["invokeOnClose", "setFinalFocus"]
1024
- }
1025
- ],
1026
- "VALUE.CLEAR": [
1027
- {
1028
- guard: "isOpenControlled",
1029
- actions: ["clearInputValue", "clearSelectedItems", "invokeOnClose"]
1030
- },
1031
- {
1032
- target: "focused",
1033
- actions: ["clearInputValue", "clearSelectedItems", "invokeOnClose", "setFinalFocus"]
1034
- }
1035
- ]
1036
- }
1037
- }
1038
- },
1039
- implementations: {
1040
- guards: {
1041
- isInputValueEmpty: ({ computed: e }) => e("isInputValueEmpty"),
1042
- autoComplete: ({ computed: e, prop: t }) => e("autoComplete") && !t("multiple"),
1043
- autoHighlight: ({ computed: e }) => e("autoHighlight"),
1044
- isFirstItemHighlighted: ({ prop: e, context: t }) => e("collection").firstValue === t.get("highlightedValue"),
1045
- isLastItemHighlighted: ({ prop: e, context: t }) => e("collection").lastValue === t.get("highlightedValue"),
1046
- isCustomValue: ({ computed: e }) => e("isCustomValue"),
1047
- allowCustomValue: ({ prop: e }) => !!e("allowCustomValue"),
1048
- hasHighlightedItem: ({ context: e }) => e.get("highlightedValue") != null,
1049
- closeOnSelect: ({ prop: e }) => !!e("closeOnSelect"),
1050
- isOpenControlled: ({ prop: e }) => e("open") != null,
1051
- openOnChange: ({ prop: e, context: t }) => {
1052
- const i = e("openOnChange");
1053
- return ye(i) ? i : !!(i != null && i({ inputValue: t.get("inputValue") }));
1054
- },
1055
- restoreFocus: ({ event: e }) => e.restoreFocus == null ? !0 : !!e.restoreFocus,
1056
- isChangeEvent: ({ event: e }) => {
1057
- var t;
1058
- return ((t = e.previousEvent) == null ? void 0 : t.type) === "INPUT.CHANGE";
1059
- },
1060
- autoFocus: ({ prop: e }) => !!e("autoFocus"),
1061
- isHighlightedItemRemoved: ({ prop: e, context: t }) => !e("collection").has(t.get("highlightedValue"))
1062
- },
1063
- effects: {
1064
- trackDismissableLayer({ send: e, prop: t, scope: i }) {
1065
- return t("disableLayer") ? void 0 : be(() => k(i), {
1066
- defer: !0,
1067
- exclude: () => [L(i), H(i), z(i)],
1068
- onFocusOutside: t("onFocusOutside"),
1069
- onPointerDownOutside: t("onPointerDownOutside"),
1070
- onInteractOutside: t("onInteractOutside"),
1071
- onEscapeKeyDown(n) {
1072
- n.preventDefault(), n.stopPropagation(), e({ type: "LAYER.ESCAPE", src: "escape-key" });
1073
- },
1074
- onDismiss() {
1075
- e({ type: "LAYER.INTERACT_OUTSIDE", src: "interact-outside", restoreFocus: !1 });
1076
- }
1077
- });
1078
- },
1079
- hideOtherElements({ scope: e }) {
1080
- return Le([
1081
- L(e),
1082
- k(e),
1083
- H(e),
1084
- z(e)
1085
- ]);
1086
- },
1087
- trackPlacement({ context: e, prop: t, scope: i }) {
1088
- const l = () => Z(i) || H(i), n = () => X(i);
1089
- return e.set("currentPlacement", t("positioning").placement), Y(l, n, {
1090
- ...t("positioning"),
1091
- defer: !0,
1092
- onComplete(o) {
1093
- e.set("currentPlacement", o.placement);
1094
- }
1095
- });
1096
- },
1097
- scrollToHighlightedItem({ context: e, prop: t, scope: i, event: l }) {
1098
- const n = L(i);
1099
- let o = [];
1100
- const s = (I) => {
1101
- const f = l.current().type.includes("POINTER"), m = e.get("highlightedValue");
1102
- if (f || !m) return;
1103
- const T = k(i), O = t("scrollToIndexFn");
1104
- if (O) {
1105
- const R = t("collection").indexOf(m);
1106
- O({
1107
- index: R,
1108
- immediate: I,
1109
- getElement: () => F(i, m)
1110
- });
1111
- return;
1112
- }
1113
- const N = F(i, m), h = V(() => {
1114
- q(N, { rootEl: T, block: "nearest" });
1115
- });
1116
- o.push(h);
1117
- }, u = V(() => s(!0));
1118
- o.push(u);
1119
- const E = pe(n, {
1120
- attributes: ["aria-activedescendant"],
1121
- callback: () => s(!1)
1122
- });
1123
- return o.push(E), () => {
1124
- o.forEach((I) => I());
1125
- };
1126
- }
1127
- },
1128
- actions: {
1129
- reposition({ context: e, prop: t, scope: i, event: l }) {
1130
- Y(() => Z(i), () => X(i), {
1131
- ...t("positioning"),
1132
- ...l.options,
1133
- defer: !0,
1134
- listeners: !1,
1135
- onComplete(s) {
1136
- e.set("currentPlacement", s.placement);
1137
- }
1138
- });
1139
- },
1140
- setHighlightedValue({ context: e, event: t }) {
1141
- t.value != null && e.set("highlightedValue", t.value);
1142
- },
1143
- clearHighlightedValue({ context: e }) {
1144
- e.set("highlightedValue", null);
1145
- },
1146
- selectHighlightedItem(e) {
1147
- var u;
1148
- const { context: t, prop: i } = e, l = i("collection"), n = t.get("highlightedValue");
1149
- if (!n || !l.has(n)) return;
1150
- const o = i("multiple") ? j(t.get("value"), n) : [n];
1151
- (u = i("onSelect")) == null || u({ value: o, itemValue: n }), t.set("value", o);
1152
- const s = P(i("selectionBehavior"), {
1153
- preserve: t.get("inputValue"),
1154
- replace: l.stringifyMany(o),
1155
- clear: ""
1156
- });
1157
- t.set("inputValue", s);
1158
- },
1159
- scrollToHighlightedItem({ context: e, prop: t, scope: i }) {
1160
- he(() => {
1161
- const l = e.get("highlightedValue");
1162
- if (l == null) return;
1163
- const n = F(i, l), o = k(i), s = t("scrollToIndexFn");
1164
- if (s) {
1165
- const u = t("collection").indexOf(l);
1166
- s({
1167
- index: u,
1168
- immediate: !0,
1169
- getElement: () => F(i, l)
1170
- });
1171
- return;
1172
- }
1173
- q(n, { rootEl: o, block: "nearest" });
1174
- });
1175
- },
1176
- selectItem(e) {
1177
- const { context: t, event: i, flush: l, prop: n } = e;
1178
- i.value != null && l(() => {
1179
- var u;
1180
- const o = n("multiple") ? j(t.get("value"), i.value) : [i.value];
1181
- (u = n("onSelect")) == null || u({ value: o, itemValue: i.value }), t.set("value", o);
1182
- const s = P(n("selectionBehavior"), {
1183
- preserve: t.get("inputValue"),
1184
- replace: n("collection").stringifyMany(o),
1185
- clear: ""
1186
- });
1187
- t.set("inputValue", s);
1188
- });
1189
- },
1190
- clearItem(e) {
1191
- const { context: t, event: i, flush: l, prop: n } = e;
1192
- i.value != null && l(() => {
1193
- const o = Te(t.get("value"), i.value);
1194
- t.set("value", o);
1195
- const s = P(n("selectionBehavior"), {
1196
- preserve: t.get("inputValue"),
1197
- replace: n("collection").stringifyMany(o),
1198
- clear: ""
1199
- });
1200
- t.set("inputValue", s);
1201
- });
1202
- },
1203
- setInitialFocus({ scope: e }) {
1204
- V(() => {
1205
- ee(e);
1206
- });
1207
- },
1208
- setFinalFocus({ scope: e }) {
1209
- V(() => {
1210
- const t = H(e);
1211
- (t == null ? void 0 : t.dataset.focusable) == null ? ee(e) : Re(e);
1212
- });
1213
- },
1214
- syncInputValue({ context: e, scope: t, event: i }) {
1215
- const l = L(t);
1216
- l && (l.value = e.get("inputValue"), queueMicrotask(() => {
1217
- i.current().type !== "INPUT.CHANGE" && de(l);
1218
- }));
1219
- },
1220
- setInputValue({ context: e, event: t }) {
1221
- e.set("inputValue", t.value);
1222
- },
1223
- clearInputValue({ context: e }) {
1224
- e.set("inputValue", "");
1225
- },
1226
- revertInputValue({ context: e, prop: t, computed: i }) {
1227
- const l = t("selectionBehavior"), n = P(l, {
1228
- replace: i("hasSelectedItems") ? i("valueAsString") : "",
1229
- preserve: e.get("inputValue"),
1230
- clear: ""
1231
- });
1232
- e.set("inputValue", n);
1233
- },
1234
- setValue(e) {
1235
- const { context: t, flush: i, event: l, prop: n } = e;
1236
- i(() => {
1237
- t.set("value", l.value);
1238
- const o = P(n("selectionBehavior"), {
1239
- preserve: t.get("inputValue"),
1240
- replace: n("collection").stringifyMany(l.value),
1241
- clear: ""
1242
- });
1243
- t.set("inputValue", o);
1244
- });
1245
- },
1246
- clearSelectedItems(e) {
1247
- const { context: t, flush: i, prop: l } = e;
1248
- i(() => {
1249
- t.set("value", []);
1250
- const n = P(l("selectionBehavior"), {
1251
- preserve: t.get("inputValue"),
1252
- replace: l("collection").stringifyMany([]),
1253
- clear: ""
1254
- });
1255
- t.set("inputValue", n);
1256
- });
1257
- },
1258
- scrollContentToTop({ prop: e, scope: t }) {
1259
- const i = e("scrollToIndexFn");
1260
- if (i) {
1261
- const l = e("collection").firstValue;
1262
- i({
1263
- index: 0,
1264
- immediate: !0,
1265
- getElement: () => F(t, l)
1266
- });
1267
- } else {
1268
- const l = k(t);
1269
- if (!l) return;
1270
- l.scrollTop = 0;
1271
- }
1272
- },
1273
- invokeOnOpen({ prop: e, event: t }) {
1274
- var l;
1275
- const i = te(t);
1276
- (l = e("onOpenChange")) == null || l({ open: !0, reason: i });
1277
- },
1278
- invokeOnClose({ prop: e, event: t }) {
1279
- var l;
1280
- const i = te(t);
1281
- (l = e("onOpenChange")) == null || l({ open: !1, reason: i });
1282
- },
1283
- highlightFirstItem({ context: e, prop: t, scope: i }) {
1284
- (k(i) ? queueMicrotask : V)(() => {
1285
- const n = t("collection").firstValue;
1286
- n && e.set("highlightedValue", n);
1287
- });
1288
- },
1289
- highlightFirstItemIfNeeded({ computed: e, action: t }) {
1290
- e("autoHighlight") && t(["highlightFirstItem"]);
1291
- },
1292
- highlightLastItem({ context: e, prop: t, scope: i }) {
1293
- (k(i) ? queueMicrotask : V)(() => {
1294
- const n = t("collection").lastValue;
1295
- n && e.set("highlightedValue", n);
1296
- });
1297
- },
1298
- highlightNextItem({ context: e, prop: t }) {
1299
- let i = null;
1300
- const l = e.get("highlightedValue"), n = t("collection");
1301
- l ? (i = n.getNextValue(l), !i && t("loopFocus") && (i = n.firstValue)) : i = n.firstValue, i && e.set("highlightedValue", i);
1302
- },
1303
- highlightPrevItem({ context: e, prop: t }) {
1304
- let i = null;
1305
- const l = e.get("highlightedValue"), n = t("collection");
1306
- l ? (i = n.getPreviousValue(l), !i && t("loopFocus") && (i = n.lastValue)) : i = n.lastValue, i && e.set("highlightedValue", i);
1307
- },
1308
- highlightFirstSelectedItem({ context: e, prop: t }) {
1309
- V(() => {
1310
- const [i] = t("collection").sort(e.get("value"));
1311
- i && e.set("highlightedValue", i);
1312
- });
1313
- },
1314
- highlightFirstOrSelectedItem({ context: e, prop: t, computed: i }) {
1315
- V(() => {
1316
- let l = null;
1317
- i("hasSelectedItems") ? l = t("collection").sort(e.get("value"))[0] : l = t("collection").firstValue, l && e.set("highlightedValue", l);
1318
- });
1319
- },
1320
- highlightLastOrSelectedItem({ context: e, prop: t, computed: i }) {
1321
- V(() => {
1322
- const l = t("collection");
1323
- let n = null;
1324
- i("hasSelectedItems") ? n = l.sort(e.get("value"))[0] : n = l.lastValue, n && e.set("highlightedValue", n);
1325
- });
1326
- },
1327
- autofillInputValue({ context: e, computed: t, prop: i, event: l, scope: n }) {
1328
- const o = L(n), s = i("collection");
1329
- if (!t("autoComplete") || !o || !l.keypress) return;
1330
- const u = s.stringify(e.get("highlightedValue"));
1331
- V(() => {
1332
- o.value = u || e.get("inputValue");
1333
- });
1334
- },
1335
- syncSelectedItems(e) {
1336
- queueMicrotask(() => {
1337
- const { context: t, prop: i } = e, l = i("collection"), n = t.get("value"), o = n.map((u) => t.get("selectedItems").find((I) => l.getItemValue(I) === u) || l.find(u));
1338
- t.set("selectedItems", o);
1339
- const s = P(i("selectionBehavior"), {
1340
- preserve: t.get("inputValue"),
1341
- replace: l.stringifyMany(n),
1342
- clear: ""
1343
- });
1344
- t.set("inputValue", s);
1345
- });
1346
- },
1347
- syncHighlightedItem({ context: e, prop: t }) {
1348
- const i = t("collection").find(e.get("highlightedValue"));
1349
- e.set("highlightedItem", i);
1350
- },
1351
- toggleVisibility({ event: e, send: t, prop: i }) {
1352
- t({ type: i("open") ? "CONTROLLED.OPEN" : "CONTROLLED.CLOSE", previousEvent: e });
1353
- }
1354
- }
1355
- }
1356
- });
1357
- function te(e) {
1358
- return (e.previousEvent || e).src;
1359
- }
1360
- G()([
1361
- "allowCustomValue",
1362
- "autoFocus",
1363
- "closeOnSelect",
1364
- "collection",
1365
- "composite",
1366
- "defaultHighlightedValue",
1367
- "defaultInputValue",
1368
- "defaultOpen",
1369
- "defaultValue",
1370
- "dir",
1371
- "disabled",
1372
- "disableLayer",
1373
- "form",
1374
- "getRootNode",
1375
- "highlightedValue",
1376
- "id",
1377
- "ids",
1378
- "inputBehavior",
1379
- "inputValue",
1380
- "invalid",
1381
- "loopFocus",
1382
- "multiple",
1383
- "name",
1384
- "navigate",
1385
- "onFocusOutside",
1386
- "onHighlightChange",
1387
- "onInputValueChange",
1388
- "onInteractOutside",
1389
- "onOpenChange",
1390
- "onOpenChange",
1391
- "onPointerDownOutside",
1392
- "onSelect",
1393
- "onValueChange",
1394
- "open",
1395
- "openOnChange",
1396
- "openOnClick",
1397
- "openOnKeyPress",
1398
- "placeholder",
1399
- "positioning",
1400
- "readOnly",
1401
- "required",
1402
- "scrollToIndexFn",
1403
- "selectionBehavior",
1404
- "translations",
1405
- "value"
1406
- ]);
1407
- G()(["htmlFor"]);
1408
- G()(["id"]);
1409
- G()(["item", "persistFocus"]);
1410
- export {
1411
- Ne as anatomy,
1412
- le as collection,
1413
- qe as connect,
1414
- Ye as machine
1415
- };