@flux-ui/components 3.0.0-next.35 → 3.0.0-next.38

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 (330) hide show
  1. package/dist/component/FluxActionBar.vue.d.ts +17 -17
  2. package/dist/component/FluxActionPane.vue.d.ts +7 -7
  3. package/dist/component/FluxActionStack.vue.d.ts +11 -15
  4. package/dist/component/{FluxAutoGrid.vue.d.ts → FluxAdaptiveGroup.vue.d.ts} +6 -3
  5. package/dist/component/FluxAdaptiveSlot.vue.d.ts +35 -0
  6. package/dist/component/FluxAspectRatio.vue.d.ts +3 -3
  7. package/dist/component/FluxBadgeStack.vue.d.ts +3 -3
  8. package/dist/component/FluxButtonGroup.vue.d.ts +3 -3
  9. package/dist/component/FluxButtonStack.vue.d.ts +3 -3
  10. package/dist/component/FluxCalendar.vue.d.ts +3 -3
  11. package/dist/component/FluxCalendarEvent.vue.d.ts +3 -3
  12. package/dist/component/FluxCheckbox.vue.d.ts +2 -1
  13. package/dist/component/FluxClickablePane.vue.d.ts +5 -5
  14. package/dist/component/FluxColorSelect.vue.d.ts +1 -0
  15. package/dist/component/{FluxPaneDeck.vue.d.ts → FluxColumn.vue.d.ts} +5 -5
  16. package/dist/component/FluxComment.vue.d.ts +3 -3
  17. package/dist/component/FluxContainer.vue.d.ts +3 -3
  18. package/dist/component/FluxDivider.vue.d.ts +5 -3
  19. package/dist/component/FluxDropZone.vue.d.ts +8 -7
  20. package/dist/component/FluxExpandableGroup.vue.d.ts +3 -3
  21. package/dist/component/FluxFader.vue.d.ts +3 -3
  22. package/dist/component/FluxFaderItem.vue.d.ts +3 -3
  23. package/dist/component/FluxFilter.vue.d.ts +3 -3
  24. package/dist/component/FluxFilterBar.vue.d.ts +3 -3
  25. package/dist/component/FluxFilterBase.vue.d.ts +4 -4
  26. package/dist/component/FluxFilterWindow.vue.d.ts +13 -17
  27. package/dist/component/FluxFlyout.vue.d.ts +19 -21
  28. package/dist/component/FluxForm.vue.d.ts +3 -3
  29. package/dist/component/FluxFormColumn.vue.d.ts +3 -3
  30. package/dist/component/FluxFormDateInput.vue.d.ts +18 -24
  31. package/dist/component/FluxFormDateRangeInput.vue.d.ts +18 -21
  32. package/dist/component/FluxFormDateTimeInput.vue.d.ts +18 -24
  33. package/dist/component/FluxFormField.vue.d.ts +7 -7
  34. package/dist/component/FluxFormGrid.vue.d.ts +3 -3
  35. package/dist/component/FluxFormInput.vue.d.ts +2 -9
  36. package/dist/component/FluxFormInputAddition.vue.d.ts +3 -3
  37. package/dist/component/FluxFormInputGroup.vue.d.ts +3 -3
  38. package/dist/component/FluxFormPinInput.vue.d.ts +2 -4
  39. package/dist/component/FluxFormRangeSlider.vue.d.ts +18 -2
  40. package/dist/component/FluxFormRow.vue.d.ts +3 -3
  41. package/dist/component/FluxFormSection.vue.d.ts +3 -3
  42. package/dist/component/FluxFormSelect.vue.d.ts +2 -4
  43. package/dist/component/FluxFormSelectAsync.vue.d.ts +2 -4
  44. package/dist/component/FluxFormSlider.vue.d.ts +11 -2
  45. package/dist/component/FluxFormTextArea.vue.d.ts +2 -6
  46. package/dist/component/FluxFormTimeZonePicker.vue.d.ts +2 -4
  47. package/dist/component/FluxFormTreeViewSelect.vue.d.ts +15 -37
  48. package/dist/component/FluxGallery.vue.d.ts +3 -3
  49. package/dist/component/FluxGrid.vue.d.ts +3 -3
  50. package/dist/component/FluxGridColumn.vue.d.ts +3 -3
  51. package/dist/component/FluxIcon.vue.d.ts +1 -0
  52. package/dist/component/FluxInfo.vue.d.ts +3 -3
  53. package/dist/component/FluxInfoStack.vue.d.ts +3 -3
  54. package/dist/component/FluxLayerPane.vue.d.ts +20 -0
  55. package/dist/component/FluxLayerPaneSecondary.vue.d.ts +20 -0
  56. package/dist/component/FluxMenu.vue.d.ts +3 -3
  57. package/dist/component/FluxMenuCollapsible.vue.d.ts +47 -0
  58. package/dist/component/FluxMenuGroup.vue.d.ts +3 -3
  59. package/dist/component/FluxMenuItem.vue.d.ts +5 -3
  60. package/dist/component/FluxMenuOptions.vue.d.ts +3 -3
  61. package/dist/component/FluxNotice.vue.d.ts +5 -5
  62. package/dist/component/FluxNoticeStack.vue.d.ts +3 -3
  63. package/dist/component/FluxOverflowBar.vue.d.ts +4 -4
  64. package/dist/component/FluxPane.vue.d.ts +5 -5
  65. package/dist/component/FluxPaneBody.vue.d.ts +3 -3
  66. package/dist/component/FluxPaneFooter.vue.d.ts +3 -3
  67. package/dist/component/FluxPaneGroup.vue.d.ts +3 -3
  68. package/dist/component/FluxPaneHeader.vue.d.ts +6 -6
  69. package/dist/component/FluxPaneIllustration.vue.d.ts +5 -5
  70. package/dist/component/FluxPressable.vue.d.ts +3 -3
  71. package/dist/component/FluxPrompt.vue.d.ts +3 -17
  72. package/dist/component/FluxRoot.vue.d.ts +3 -3
  73. package/dist/component/FluxRow.vue.d.ts +23 -0
  74. package/dist/component/FluxSegmentedControl.vue.d.ts +3 -2
  75. package/dist/component/FluxSplitButton.vue.d.ts +5 -5
  76. package/dist/component/FluxStack.vue.d.ts +3 -3
  77. package/dist/component/FluxStepper.vue.d.ts +6 -6
  78. package/dist/component/FluxStepperStep.vue.d.ts +3 -3
  79. package/dist/component/FluxTab.vue.d.ts +3 -3
  80. package/dist/component/FluxTabBar.vue.d.ts +3 -3
  81. package/dist/component/FluxTabBarItem.vue.d.ts +5 -7
  82. package/dist/component/FluxTableActions.vue.d.ts +3 -3
  83. package/dist/component/FluxTableBar.vue.d.ts +3 -3
  84. package/dist/component/FluxTableCell.vue.d.ts +5 -5
  85. package/dist/component/FluxTableHeader.vue.d.ts +3 -3
  86. package/dist/component/FluxTableRow.vue.d.ts +3 -3
  87. package/dist/component/FluxTabs.vue.d.ts +6 -6
  88. package/dist/component/FluxTagStack.vue.d.ts +3 -3
  89. package/dist/component/FluxTimeline.vue.d.ts +3 -3
  90. package/dist/component/FluxTimelineItem.vue.d.ts +3 -3
  91. package/dist/component/FluxToggle.vue.d.ts +2 -3
  92. package/dist/component/FluxToolbar.vue.d.ts +3 -3
  93. package/dist/component/FluxToolbarGroup.vue.d.ts +3 -3
  94. package/dist/component/FluxWindow.vue.d.ts +3 -3
  95. package/dist/component/index.d.ts +7 -2
  96. package/dist/component/primitive/Anchor.vue.d.ts +3 -3
  97. package/dist/component/primitive/AnchorPopup.vue.d.ts +3 -3
  98. package/dist/component/primitive/CoordinatePicker.vue.d.ts +1 -0
  99. package/dist/component/primitive/DialogLayout.vue.d.ts +28 -0
  100. package/dist/component/primitive/FilterOptionBase.vue.d.ts +2 -2
  101. package/dist/component/primitive/SelectBase.vue.d.ts +19 -37
  102. package/dist/component/primitive/SliderThumb.vue.d.ts +4 -0
  103. package/dist/component/primitive/TreeNodeRenderer.vue.d.ts +30 -0
  104. package/dist/component/primitive/index.d.ts +2 -0
  105. package/dist/composable/index.d.ts +1 -0
  106. package/dist/composable/private/index.d.ts +8 -0
  107. package/dist/composable/private/useAsyncFilterOptions.d.ts +14 -0
  108. package/dist/composable/private/useDateFlyout.d.ts +10 -0
  109. package/dist/composable/private/useDropdownPopup.d.ts +27 -0
  110. package/dist/composable/private/useFilterOption.d.ts +12 -0
  111. package/dist/composable/useAdaptiveGroupInjection.d.ts +2 -0
  112. package/dist/data/di.d.ts +11 -0
  113. package/dist/data/filter.d.ts +4 -17
  114. package/dist/data/i18n.d.ts +17 -0
  115. package/dist/data/timeZones.d.ts +3 -0
  116. package/dist/index.css +372 -331
  117. package/dist/index.d.ts +1 -1
  118. package/dist/index.js +7116 -6286
  119. package/dist/index.js.map +1 -1
  120. package/dist/transition/FluxAutoHeightTransition.vue.d.ts +5 -3
  121. package/dist/transition/FluxAutoWidthTransition.vue.d.ts +5 -3
  122. package/dist/transition/FluxBreakthroughTransition.vue.d.ts +5 -3
  123. package/dist/transition/FluxFadeTransition.vue.d.ts +5 -3
  124. package/dist/transition/FluxOverlayTransition.vue.d.ts +5 -3
  125. package/dist/transition/FluxRouteTransition.vue.d.ts +5 -3
  126. package/dist/transition/FluxSlideOverTransition.vue.d.ts +5 -3
  127. package/dist/transition/FluxTooltipTransition.vue.d.ts +5 -3
  128. package/dist/transition/FluxVerticalWindowTransition.vue.d.ts +5 -3
  129. package/dist/transition/FluxWindowTransition.vue.d.ts +5 -3
  130. package/package.json +19 -23
  131. package/src/component/FluxActionBar.vue +9 -8
  132. package/src/component/FluxActionPane.vue +4 -3
  133. package/src/component/FluxActionStack.vue +2 -2
  134. package/src/component/FluxAdaptiveGroup.vue +112 -0
  135. package/src/component/FluxAdaptiveSlot.vue +159 -0
  136. package/src/component/FluxAlert.vue +8 -17
  137. package/src/component/FluxAnimatedColors.vue +1 -1
  138. package/src/component/FluxAspectRatio.vue +2 -1
  139. package/src/component/FluxBadge.vue +5 -1
  140. package/src/component/FluxBadgeStack.vue +2 -1
  141. package/src/component/FluxButtonGroup.vue +2 -1
  142. package/src/component/FluxButtonStack.vue +2 -1
  143. package/src/component/FluxCalendar.vue +8 -1
  144. package/src/component/FluxCalendarEvent.vue +2 -1
  145. package/src/component/FluxCheckbox.vue +33 -6
  146. package/src/component/FluxChip.vue +1 -0
  147. package/src/component/FluxClickablePane.vue +3 -2
  148. package/src/component/FluxColorPicker.vue +8 -1
  149. package/src/component/FluxColorSelect.vue +25 -4
  150. package/src/component/{FluxAutoGrid.vue → FluxColumn.vue} +5 -8
  151. package/src/component/FluxComment.vue +2 -2
  152. package/src/component/FluxConfirm.vue +8 -17
  153. package/src/component/FluxContainer.vue +3 -2
  154. package/src/component/FluxDataTable.vue +3 -1
  155. package/src/component/FluxDivider.vue +7 -3
  156. package/src/component/FluxDropZone.vue +22 -8
  157. package/src/component/FluxExpandable.vue +3 -2
  158. package/src/component/FluxExpandableGroup.vue +2 -2
  159. package/src/component/FluxFader.vue +2 -2
  160. package/src/component/FluxFaderItem.vue +2 -1
  161. package/src/component/FluxFilter.vue +2 -1
  162. package/src/component/FluxFilterBar.vue +3 -2
  163. package/src/component/FluxFilterBase.vue +17 -9
  164. package/src/component/FluxFilterOption.vue +3 -14
  165. package/src/component/FluxFilterOptionAsync.vue +17 -60
  166. package/src/component/FluxFilterOptions.vue +3 -25
  167. package/src/component/FluxFilterOptionsAsync.vue +9 -73
  168. package/src/component/FluxFilterWindow.vue +1 -1
  169. package/src/component/FluxFlyout.vue +13 -11
  170. package/src/component/FluxForm.vue +2 -1
  171. package/src/component/FluxFormColumn.vue +2 -1
  172. package/src/component/FluxFormDateInput.vue +9 -22
  173. package/src/component/FluxFormDateRangeInput.vue +20 -15
  174. package/src/component/FluxFormDateTimeInput.vue +17 -20
  175. package/src/component/FluxFormField.vue +4 -4
  176. package/src/component/FluxFormGrid.vue +2 -1
  177. package/src/component/FluxFormInput.vue +11 -10
  178. package/src/component/FluxFormInputAddition.vue +2 -1
  179. package/src/component/FluxFormInputGroup.vue +3 -2
  180. package/src/component/FluxFormPinInput.vue +14 -6
  181. package/src/component/FluxFormRangeSlider.vue +12 -2
  182. package/src/component/FluxFormRow.vue +2 -1
  183. package/src/component/FluxFormSection.vue +4 -3
  184. package/src/component/FluxFormSelect.vue +11 -4
  185. package/src/component/FluxFormSelectAsync.vue +14 -8
  186. package/src/component/FluxFormSlider.vue +8 -2
  187. package/src/component/FluxFormTextArea.vue +12 -7
  188. package/src/component/FluxFormTimeZonePicker.vue +13 -626
  189. package/src/component/FluxFormTreeViewSelect.vue +51 -79
  190. package/src/component/FluxGallery.vue +2 -1
  191. package/src/component/FluxGrid.vue +3 -2
  192. package/src/component/FluxGridColumn.vue +2 -1
  193. package/src/component/FluxIcon.vue +4 -2
  194. package/src/component/FluxInfo.vue +2 -1
  195. package/src/component/FluxInfoStack.vue +3 -2
  196. package/src/component/FluxLayerPane.vue +16 -0
  197. package/src/component/FluxLayerPaneSecondary.vue +16 -0
  198. package/src/component/FluxLegend.vue +9 -9
  199. package/src/component/FluxMenu.vue +2 -2
  200. package/src/component/FluxMenuCollapsible.vue +187 -0
  201. package/src/component/FluxMenuGroup.vue +2 -1
  202. package/src/component/FluxMenuItem.vue +9 -1
  203. package/src/component/FluxMenuOptions.vue +1 -1
  204. package/src/component/FluxNotice.vue +7 -2
  205. package/src/component/FluxNoticeStack.vue +2 -1
  206. package/src/component/FluxOverflowBar.vue +3 -3
  207. package/src/component/FluxPagination.vue +1 -0
  208. package/src/component/FluxPane.vue +3 -2
  209. package/src/component/FluxPaneBody.vue +2 -1
  210. package/src/component/FluxPaneFooter.vue +2 -1
  211. package/src/component/FluxPaneGroup.vue +2 -1
  212. package/src/component/FluxPaneHeader.vue +7 -6
  213. package/src/component/FluxPaneIllustration.vue +3 -3
  214. package/src/component/FluxPaneMedia.vue +1 -1
  215. package/src/component/FluxPercentageBar.vue +3 -1
  216. package/src/component/FluxPressable.vue +2 -1
  217. package/src/component/FluxProgressBar.vue +2 -1
  218. package/src/component/FluxPrompt.vue +16 -27
  219. package/src/component/FluxRemove.vue +4 -0
  220. package/src/component/FluxRoot.vue +2 -2
  221. package/src/component/FluxRow.vue +24 -0
  222. package/src/component/FluxSegmentedControl.vue +51 -4
  223. package/src/component/FluxSnackbar.vue +36 -12
  224. package/src/component/FluxSplitButton.vue +3 -2
  225. package/src/component/FluxStack.vue +4 -3
  226. package/src/component/FluxStepper.vue +3 -3
  227. package/src/component/FluxStepperStep.vue +2 -1
  228. package/src/component/FluxTab.vue +2 -1
  229. package/src/component/FluxTabBar.vue +3 -3
  230. package/src/component/FluxTableActions.vue +2 -1
  231. package/src/component/FluxTableBar.vue +2 -1
  232. package/src/component/FluxTableCell.vue +4 -3
  233. package/src/component/FluxTableHeader.vue +4 -2
  234. package/src/component/FluxTableRow.vue +2 -1
  235. package/src/component/FluxTabs.vue +15 -6
  236. package/src/component/FluxTag.vue +5 -1
  237. package/src/component/FluxTagStack.vue +2 -1
  238. package/src/component/FluxTimeline.vue +2 -1
  239. package/src/component/FluxTimelineItem.vue +2 -1
  240. package/src/component/FluxToggle.vue +20 -5
  241. package/src/component/FluxToolbar.vue +2 -1
  242. package/src/component/FluxToolbarGroup.vue +2 -1
  243. package/src/component/FluxTooltip.vue +1 -1
  244. package/src/component/FluxTreeView.vue +9 -35
  245. package/src/component/FluxWindow.vue +2 -2
  246. package/src/component/index.ts +7 -2
  247. package/src/component/primitive/Anchor.vue +3 -1
  248. package/src/component/primitive/AnchorPopup.vue +3 -3
  249. package/src/component/primitive/CoordinatePicker.vue +2 -1
  250. package/src/component/primitive/CoordinatePickerThumb.vue +2 -0
  251. package/src/component/primitive/DialogLayout.vue +44 -0
  252. package/src/component/primitive/SelectBase.vue +22 -28
  253. package/src/component/primitive/SliderBase.vue +0 -1
  254. package/src/component/primitive/SliderThumb.vue +9 -0
  255. package/src/component/primitive/TreeNodeRenderer.vue +77 -0
  256. package/src/component/primitive/index.ts +2 -0
  257. package/src/composable/index.ts +1 -0
  258. package/src/composable/private/index.ts +8 -0
  259. package/src/composable/private/useAsyncFilterOptions.ts +70 -0
  260. package/src/composable/private/useCommandPalette.ts +1 -1
  261. package/src/composable/private/useDateFlyout.ts +34 -0
  262. package/src/composable/private/useDropdownPopup.ts +99 -0
  263. package/src/composable/private/useFilterOption.ts +59 -0
  264. package/src/composable/useAdaptiveGroupInjection.ts +6 -0
  265. package/src/css/component/Action.module.scss +2 -2
  266. package/src/css/component/AdaptiveSlot.module.scss +25 -0
  267. package/src/css/component/Avatar.module.scss +10 -11
  268. package/src/css/component/Badge.module.scss +4 -4
  269. package/src/css/component/Button.module.scss +4 -16
  270. package/src/css/component/Calendar.module.scss +4 -4
  271. package/src/css/component/Chip.module.scss +6 -10
  272. package/src/css/component/Color.module.scss +1 -1
  273. package/src/css/component/DatePicker.module.scss +1 -1
  274. package/src/css/component/Expandable.module.scss +5 -5
  275. package/src/css/component/Fader.module.scss +2 -1
  276. package/src/css/component/Flyout.module.scss +1 -1
  277. package/src/css/component/FocalPoint.module.scss +1 -1
  278. package/src/css/component/Form.module.scss +56 -10
  279. package/src/css/component/Item.module.scss +4 -4
  280. package/src/css/component/LayerPane.module.scss +40 -0
  281. package/src/css/component/Layout.module.scss +11 -4
  282. package/src/css/component/Legend.module.scss +2 -2
  283. package/src/css/component/Menu.module.scss +59 -11
  284. package/src/css/component/Notice.module.scss +7 -7
  285. package/src/css/component/Overlay.module.scss +2 -2
  286. package/src/css/component/Pane.module.scss +10 -23
  287. package/src/css/component/PercentageBar.module.scss +1 -1
  288. package/src/css/component/Remove.module.scss +1 -1
  289. package/src/css/component/SegmentedControl.module.scss +1 -0
  290. package/src/css/component/Snackbar.module.scss +1 -1
  291. package/src/css/component/Statistic.module.scss +2 -2
  292. package/src/css/component/Stepper.module.scss +1 -1
  293. package/src/css/component/Tab.module.scss +11 -15
  294. package/src/css/component/Table.module.scss +13 -13
  295. package/src/css/component/Timeline.module.scss +2 -2
  296. package/src/css/component/Toolbar.module.scss +3 -3
  297. package/src/css/component/Tooltip.module.scss +3 -4
  298. package/src/css/component/Transition.module.scss +1 -1
  299. package/src/css/component/TreeView.module.scss +2 -15
  300. package/src/css/component/TreeViewSelect.module.scss +1 -15
  301. package/src/css/component/base/Button.module.scss +6 -7
  302. package/src/css/component/base/Effect.module.scss +2 -1
  303. package/src/css/component/primitive/Slider.module.scss +6 -7
  304. package/src/css/component/primitive/TreeNode.module.scss +19 -0
  305. package/src/css/mixin/button-active.scss +6 -0
  306. package/src/css/mixin/focus-ring.scss +1 -1
  307. package/src/css/mixin/index.scss +1 -0
  308. package/src/css/typography.scss +3 -2
  309. package/src/css/variables.scss +7 -2
  310. package/src/data/di.ts +13 -0
  311. package/src/data/filter.ts +24 -28
  312. package/src/data/i18n.ts +17 -0
  313. package/src/data/store.ts +46 -11
  314. package/src/data/timeZones.ts +619 -0
  315. package/src/index.ts +2 -0
  316. package/src/transition/FluxAutoHeightTransition.vue +5 -0
  317. package/src/transition/FluxAutoWidthTransition.vue +5 -0
  318. package/src/transition/FluxBreakthroughTransition.vue +5 -0
  319. package/src/transition/FluxFadeTransition.vue +5 -0
  320. package/src/transition/FluxOverlayTransition.vue +5 -0
  321. package/src/transition/FluxRouteTransition.vue +5 -0
  322. package/src/transition/FluxSlideOverTransition.vue +5 -0
  323. package/src/transition/FluxTooltipTransition.vue +5 -0
  324. package/src/transition/FluxVerticalWindowTransition.vue +5 -0
  325. package/src/transition/FluxWindowTransition.vue +5 -0
  326. package/dist/0db98648.svg +0 -3
  327. package/src/component/FluxPaneDeck.vue +0 -24
  328. package/src/css/component/base/Grid.module.scss +0 -8
  329. package/src/image/avatar-mask.svg +0 -3
  330. package/tsconfig.json +0 -7
@@ -11,7 +11,7 @@
11
11
  setup>
12
12
  import { useInterval } from '@basmilius/common';
13
13
  import { unrefTemplateElement } from '@flux-ui/internals';
14
- import { computed, ref, unref, useTemplateRef, watch } from 'vue';
14
+ import { computed, ref, unref, useTemplateRef, type VNode, watch } from 'vue';
15
15
  import $style from '$flux/css/component/Fader.module.scss';
16
16
 
17
17
  const emit = defineEmits<{
@@ -30,7 +30,7 @@
30
30
  previous(): void;
31
31
 
32
32
  readonly current: number;
33
- }): any;
33
+ }): VNode[];
34
34
  }>();
35
35
 
36
36
  const faderRef = useTemplateRef('fader');
@@ -7,9 +7,10 @@
7
7
  <script
8
8
  lang="ts"
9
9
  setup>
10
+ import type { VNode } from 'vue';
10
11
  import $style from '$flux/css/component/Fader.module.scss';
11
12
 
12
13
  defineSlots<{
13
- default(): any;
14
+ default(): VNode[];
14
15
  }>();
15
16
  </script>
@@ -20,6 +20,7 @@
20
20
  <script
21
21
  lang="ts"
22
22
  setup>
23
+ import type { VNode } from 'vue';
23
24
  import type { FluxFilterState } from '@flux-ui/types';
24
25
  import FluxFilterBase from './FluxFilterBase.vue';
25
26
  import FluxFilterWindow from '$flux/component/FluxFilterWindow.vue';
@@ -37,7 +38,7 @@
37
38
  }>();
38
39
 
39
40
  defineSlots<{
40
- default(): any;
41
+ default(): VNode[];
41
42
  }>();
42
43
 
43
44
  function reset(name: string): void {
@@ -75,8 +75,9 @@
75
75
  <script
76
76
  lang="ts"
77
77
  setup>
78
+ import type { VNode } from 'vue';
79
+ import { computed, unref } from 'vue';
78
80
  import type { FluxFilterState } from '@flux-ui/types';
79
- import { computed, unref } from "vue";
80
81
  import { FilterBadge, VNodeRenderer } from '$flux/component/primitive';
81
82
  import FluxFilterBase from './FluxFilterBase.vue';
82
83
  import FluxFilterWindow from './FluxFilterWindow.vue';
@@ -107,7 +108,7 @@
107
108
  }>();
108
109
 
109
110
  defineSlots<{
110
- default?(): any;
111
+ default?(): VNode[];
111
112
  }>();
112
113
 
113
114
  const isFiltered = computed(() => Object.entries(unref(modelValue)).filter(([, val]) => Boolean(val)).length > 0);
@@ -6,11 +6,19 @@
6
6
  lang="ts"
7
7
  setup>
8
8
  import { flattenVNodeTree, getComponentName, getComponentProps } from '@flux-ui/internals';
9
- import type { FluxFilterItem, FluxFilterOptionItem, FluxFilterState } from '@flux-ui/types';
9
+ import type { FluxFilterItem, FluxFilterOptionItem, FluxFilterSpecMap, FluxFilterState } from '@flux-ui/types';
10
10
  import { computed, provide, unref, type VNode } from 'vue';
11
11
  import { filterParsers, FluxFilterInjectionKey } from '$flux/data';
12
12
  import { camelCase } from 'lodash-es';
13
13
 
14
+ type FluxFilterType = keyof FluxFilterSpecMap;
15
+
16
+ function applyParser<K extends FluxFilterType>(type: K, spec: FluxFilterSpecMap[K]): FluxFilterItem {
17
+ const parser = filterParsers[type] as (spec: FluxFilterSpecMap[K]) => FluxFilterItem;
18
+
19
+ return parser(spec);
20
+ }
21
+
14
22
  const emit = defineEmits<{
15
23
  back: [];
16
24
  reset: [string]
@@ -29,9 +37,9 @@
29
37
  readonly buttons: Record<string, FluxFilterItem>;
30
38
  readonly filters: Record<string, VNode>;
31
39
  readonly menuItems: (FluxFilterItem | VNode)[][];
32
- }): any;
40
+ }): VNode[];
33
41
 
34
- filters(): any;
42
+ filters(): VNode[];
35
43
  }>();
36
44
 
37
45
  const buttons = computed(() => {
@@ -45,10 +53,10 @@
45
53
  continue;
46
54
  }
47
55
 
48
- const props = getComponentProps<Omit<FluxFilterItem, 'type'>>(item);
49
- const type = camelCase(name.substring(10)) as FluxFilterItem['type'];
56
+ const type = camelCase(name.substring(10)) as FluxFilterType;
57
+ const props = getComponentProps<FluxFilterSpecMap[FluxFilterType]>(item);
50
58
 
51
- buttons[props.name] = filterParsers[type](props);
59
+ buttons[props.name] = applyParser(type, props);
52
60
  }
53
61
 
54
62
  return buttons;
@@ -92,10 +100,10 @@
92
100
  }
93
101
 
94
102
  if (name.startsWith('FluxFilter')) {
95
- const props = getComponentProps<Omit<FluxFilterItem, 'type'>>(item);
96
- const type = camelCase(name.substring(10)) as FluxFilterItem['type'];
103
+ const type = camelCase(name.substring(10)) as FluxFilterType;
104
+ const props = getComponentProps<FluxFilterSpecMap[FluxFilterType]>(item);
97
105
 
98
- menuItems[menuItems.length - 1].push(filterParsers[type](props));
106
+ menuItems[menuItems.length - 1].push(applyParser(type, props));
99
107
  continue;
100
108
  }
101
109
 
@@ -11,9 +11,9 @@
11
11
  <script
12
12
  lang="ts"
13
13
  setup>
14
- import type { FluxFilterOptionRow, FluxFilterValue, FluxFilterValueSingle, FluxIconName } from '@flux-ui/types';
14
+ import type { FluxFilterOptionRow, FluxIconName } from '@flux-ui/types';
15
15
  import { computed, unref } from 'vue';
16
- import { useFilterInjection } from '$flux/composable';
16
+ import { useFilterOptionSingle } from '$flux/composable/private';
17
17
  import { isFluxFilterOptionHeader } from '$flux/data';
18
18
  import { FilterOptionBase } from './primitive';
19
19
 
@@ -31,19 +31,8 @@
31
31
  readonly searchPlaceholder?: string;
32
32
  }>();
33
33
 
34
- const {back, state, setValue} = useFilterInjection();
34
+ const {currentValue, onSelect} = useFilterOptionSingle(name);
35
35
 
36
- const currentValue = computed(() => unref(state)[name] as FluxFilterValueSingle);
37
36
  const filteredOptions = computed(() => options
38
37
  .filter(o => isFluxFilterOptionHeader(o) || unref(modelSearch).length === 0 || o.label.toLowerCase().includes(unref(modelSearch).toLowerCase())));
39
-
40
- function onSelect(value: FluxFilterValue): void {
41
- if (unref(currentValue) === value) {
42
- setValue(name, null);
43
- } else {
44
- setValue(name, value);
45
- }
46
-
47
- back();
48
- }
49
38
  </script>
@@ -12,11 +12,9 @@
12
12
  <script
13
13
  lang="ts"
14
14
  setup>
15
- import { useDebouncedRef, useLoaded } from '@basmilius/common';
16
- import type { FluxFilterOptionRow, FluxFilterValue, FluxFilterValueSingle, FluxIconName } from '@flux-ui/types';
17
- import { computed, ref, unref, watch } from 'vue';
18
- import { useFilterInjection } from '$flux/composable';
19
- import { isFluxFilterOptionItem } from '$flux/data';
15
+ import type { FluxFilterOptionRow, FluxFilterValue, FluxIconName } from '@flux-ui/types';
16
+ import { computed, unref } from 'vue';
17
+ import { useAsyncFilterOptions, useFilterOptionSingle } from '$flux/composable/private';
20
18
  import { FilterOptionBase } from './primitive';
21
19
 
22
20
  const modelSearch = defineModel<string>('searchQuery', {
@@ -39,64 +37,23 @@
39
37
  readonly searchPlaceholder?: string;
40
38
  }>();
41
39
 
42
- const {back, state, setValue} = useFilterInjection();
43
- const {isLoading, loaded} = useLoaded();
44
- const debouncedModelSearch = useDebouncedRef(modelSearch, 150);
45
- const fetchOptions = computed(() => loaded(fetchOptionsProp));
46
- const fetchRelevant = computed(() => loaded(fetchRelevantProp));
47
- const fetchSearch = computed(() => loaded(fetchSearchProp));
40
+ const {currentValue, onSelect} = useFilterOptionSingle(name);
48
41
 
49
- const selectedOptions = ref<FluxFilterOptionRow[]>([]);
50
- const visibleOptions = ref<FluxFilterOptionRow[]>([]);
42
+ const currentValueIds = computed<FluxFilterValue[]>(() => {
43
+ const value = unref(currentValue);
51
44
 
52
- const currentValue = computed(() => unref(state)[name] as FluxFilterValueSingle);
53
-
54
- const options = computed(() => {
55
- const options: FluxFilterOptionRow[] = [];
56
- const search = unref(modelSearch);
57
- const selected = unref(selectedOptions);
58
- const visible = unref(visibleOptions);
59
-
60
- visible.forEach(vo => options.push(vo));
61
-
62
- selected.forEach(so => {
63
- if (isFluxFilterOptionItem(so) && visible.find(vo => isFluxFilterOptionItem(vo) && vo.value === so.value)) {
64
- return;
65
- }
66
-
67
- if (isFluxFilterOptionItem(so) && !so.label.toLowerCase().includes(search.toLowerCase())) {
68
- return;
69
- }
70
-
71
- options.push(so);
72
- });
73
-
74
- return options;
75
- });
76
-
77
- function onSelect(value: FluxFilterValue): void {
78
- if (unref(currentValue) === value) {
79
- setValue(name, null);
80
- } else {
81
- setValue(name, value);
82
- }
83
-
84
- back();
85
- }
86
-
87
- watch(currentValue, async value => {
88
- if (!value && value !== 0) {
89
- return;
45
+ if (value === null || value === undefined) {
46
+ return [];
90
47
  }
91
48
 
92
- selectedOptions.value = await unref(fetchOptions)([value]);
93
- }, {immediate: true});
49
+ return [value];
50
+ });
94
51
 
95
- watch(debouncedModelSearch, async searchQuery => {
96
- if (searchQuery.length > 0) {
97
- visibleOptions.value = await unref(fetchSearch)(searchQuery);
98
- } else {
99
- visibleOptions.value = await unref(fetchRelevant)();
100
- }
101
- }, {immediate: true});
52
+ const {isLoading, options} = useAsyncFilterOptions({
53
+ currentValueIds,
54
+ modelSearch,
55
+ fetchOptions: (ids: FluxFilterValue[]) => fetchOptionsProp(ids),
56
+ fetchRelevant: () => fetchRelevantProp(),
57
+ fetchSearch: (searchQuery: string) => fetchSearchProp(searchQuery)
58
+ });
102
59
  </script>
@@ -11,9 +11,9 @@
11
11
  <script
12
12
  lang="ts"
13
13
  setup>
14
- import type { FluxFilterOptionRow, FluxFilterValueSingle, FluxIconName } from '@flux-ui/types';
14
+ import type { FluxFilterOptionRow, FluxIconName } from '@flux-ui/types';
15
15
  import { computed, unref } from 'vue';
16
- import { useFilterInjection } from '$flux/composable';
16
+ import { useFilterOptionMulti } from '$flux/composable/private';
17
17
  import { isFluxFilterOptionHeader } from '$flux/data';
18
18
  import { FilterOptionBase } from './primitive';
19
19
 
@@ -33,30 +33,8 @@
33
33
  readonly searchPlaceholder?: string;
34
34
  }>();
35
35
 
36
- const {state, setValue} = useFilterInjection();
37
-
38
- const currentValue = computed(() => {
39
- const value = unref(state)[name];
40
-
41
- if (Array.isArray(value)) {
42
- return value;
43
- }
44
-
45
- return [];
46
- });
36
+ const {currentValue, onSelect} = useFilterOptionMulti(name);
47
37
 
48
38
  const filteredOptions = computed(() => options
49
39
  .filter(o => isFluxFilterOptionHeader(o) || unref(modelSearch).length === 0 || o.label.toLowerCase().includes(unref(modelSearch).toLowerCase())));
50
-
51
- function onSelect(value: FluxFilterValueSingle): void {
52
- let values = Array.from(unref(currentValue));
53
-
54
- if (values.includes(value)) {
55
- values = values.filter(v => v !== value);
56
- } else {
57
- values.push(value);
58
- }
59
-
60
- setValue(name, values);
61
- }
62
40
  </script>
@@ -12,11 +12,8 @@
12
12
  <script
13
13
  lang="ts"
14
14
  setup>
15
- import { useDebouncedRef, useLoaded } from '@basmilius/common';
16
- import type { FluxFilterOptionRow, FluxFilterValue, FluxFilterValueSingle, FluxIconName } from '@flux-ui/types';
17
- import { computed, ref, unref, watch } from 'vue';
18
- import { useFilterInjection } from '$flux/composable';
19
- import { isFluxFilterOptionItem } from '$flux/data';
15
+ import type { FluxFilterOptionRow, FluxFilterValue, FluxIconName } from '@flux-ui/types';
16
+ import { useAsyncFilterOptions, useFilterOptionMulti } from '$flux/composable/private';
20
17
  import { FilterOptionBase } from './primitive';
21
18
 
22
19
  const modelSearch = defineModel<string>('searchQuery', {
@@ -39,74 +36,13 @@
39
36
  readonly searchPlaceholder?: string;
40
37
  }>();
41
38
 
42
- const {state, setValue} = useFilterInjection();
43
- const {isLoading, loaded} = useLoaded();
44
- const debouncedModelSearch = useDebouncedRef(modelSearch, 150);
45
- const fetchOptions = computed(() => loaded(fetchOptionsProp));
46
- const fetchRelevant = computed(() => loaded(fetchRelevantProp));
47
- const fetchSearch = computed(() => loaded(fetchSearchProp));
39
+ const {currentValue, onSelect} = useFilterOptionMulti(name);
48
40
 
49
- const selectedOptions = ref<FluxFilterOptionRow[]>([]);
50
- const visibleOptions = ref<FluxFilterOptionRow[]>([]);
51
-
52
- const currentValue = computed(() => {
53
- const value = unref(state)[name];
54
-
55
- if (Array.isArray(value)) {
56
- return value;
57
- }
58
-
59
- return [];
60
- });
61
-
62
- const options = computed(() => {
63
- const options: FluxFilterOptionRow[] = [];
64
- const search = unref(modelSearch);
65
- const selected = unref(selectedOptions);
66
- const visible = unref(visibleOptions);
67
-
68
- visible.forEach(vo => options.push(vo));
69
-
70
- selected.forEach(so => {
71
- if (isFluxFilterOptionItem(so) && visible.find(vo => isFluxFilterOptionItem(vo) && vo.value === so.value)) {
72
- return;
73
- }
74
-
75
- if (isFluxFilterOptionItem(so) && !so.label.toLowerCase().includes(search.toLowerCase())) {
76
- return;
77
- }
78
-
79
- options.push(so);
80
- });
81
-
82
- return options;
41
+ const {isLoading, options} = useAsyncFilterOptions({
42
+ currentValueIds: currentValue,
43
+ modelSearch,
44
+ fetchOptions: (ids: FluxFilterValue[]) => fetchOptionsProp(ids),
45
+ fetchRelevant: () => fetchRelevantProp(),
46
+ fetchSearch: (searchQuery: string) => fetchSearchProp(searchQuery)
83
47
  });
84
-
85
- function onSelect(value: FluxFilterValueSingle): void {
86
- let values = Array.from(unref(currentValue));
87
-
88
- if (values.includes(value)) {
89
- values = values.filter(v => v !== value);
90
- } else {
91
- values.push(value);
92
- }
93
-
94
- setValue(name, values);
95
- }
96
-
97
- watch(currentValue, async value => {
98
- if (value.length === 0) {
99
- return;
100
- }
101
-
102
- selectedOptions.value = await unref(fetchOptions)(value);
103
- }, {immediate: true});
104
-
105
- watch(debouncedModelSearch, async searchQuery => {
106
- if (searchQuery.length > 0) {
107
- visibleOptions.value = await unref(fetchSearch)(searchQuery);
108
- } else {
109
- visibleOptions.value = await unref(fetchRelevant)();
110
- }
111
- }, {immediate: true});
112
48
  </script>
@@ -65,7 +65,7 @@
65
65
  }>();
66
66
 
67
67
  defineSlots<{
68
- default(): any;
68
+ default(): VNode[];
69
69
  }>();
70
70
 
71
71
  const translate = useTranslate();
@@ -6,12 +6,12 @@
6
6
  '--opener-width': `${openerWidth}px`,
7
7
  '--pane-mx': `${paneMarginX}px`,
8
8
  '--pane-my': `${paneMarginY}px`,
9
- '--pane-x': `${paneX - 24}px`,
10
- '--pane-y': `${paneY - 24}px`
9
+ '--pane-x': `${paneX - 30}px`,
10
+ '--pane-y': `${paneY - 30}px`
11
11
  }">
12
12
  <slot
13
13
  name="opener"
14
- v-bind="{close, open, toggle}"/>
14
+ v-bind="{close, open, toggle, isOpen: isOpen || isOpening || isClosing}"/>
15
15
 
16
16
  <dialog
17
17
  ref="dialog"
@@ -42,7 +42,7 @@
42
42
  import { isSSR, unrefTemplateElement, useEventListener, useFocusTrap } from '@flux-ui/internals';
43
43
  import type { FluxDirection } from '@flux-ui/types';
44
44
  import { clsx } from 'clsx';
45
- import { provide, ref, unref, useTemplateRef, watch } from 'vue';
45
+ import { provide, ref, unref, useTemplateRef, type VNode, watch } from 'vue';
46
46
  import { FluxFlyoutInjectionKey } from '$flux/data';
47
47
  import FluxPane from './FluxPane.vue';
48
48
  import $style from '$flux/css/component/Flyout.module.scss';
@@ -65,13 +65,15 @@
65
65
  readonly paneY: number;
66
66
  readonly openerWidth: number;
67
67
  readonly openerHeight: number;
68
- }): any;
68
+ }): VNode[];
69
69
 
70
70
  opener(props: {
71
71
  close(): void;
72
72
  open(): void;
73
73
  toggle(): void;
74
- }): any;
74
+
75
+ readonly isOpen: boolean;
76
+ }): VNode[];
75
77
  }>();
76
78
 
77
79
  const dialogRef = useTemplateRef('dialog');
@@ -133,14 +135,14 @@
133
135
  const {top, left, width, height} = mount.children[0].getBoundingClientRect();
134
136
  const {width: paneWidth, height: paneHeight} = pane.getBoundingClientRect();
135
137
 
136
- let x, y, mx = 0, my = 0;
138
+ let x: number, y: number, mx = 0, my = 0;
137
139
 
138
140
  if (direction === 'horizontal') {
139
141
  x = left + width;
140
142
  y = top + height / 2 - paneHeight / 2;
141
143
  mx = margin;
142
144
 
143
- if (x + paneWidth > innerWidth - 30) {
145
+ if (x + paneWidth > innerWidth - 12) {
144
146
  x = left - paneWidth;
145
147
  mx = -mx;
146
148
  }
@@ -149,14 +151,14 @@
149
151
  y = top + height;
150
152
  my = margin;
151
153
 
152
- if (y + paneHeight > innerHeight - 30) {
154
+ if (y + paneHeight > innerHeight - 12) {
153
155
  y = top - paneHeight;
154
156
  my = -my;
155
157
  }
156
158
  }
157
159
 
158
- paneX.value = Math.max(30, Math.min(innerWidth - paneWidth - 30, x));
159
- paneY.value = Math.max(30, Math.min(innerHeight - paneHeight - 30, y));
160
+ paneX.value = Math.max(12, Math.min(innerWidth - paneWidth - 12, x));
161
+ paneY.value = Math.max(12, Math.min(innerHeight - paneHeight - 12, y));
160
162
  paneMarginX.value = mx;
161
163
  paneMarginY.value = my;
162
164
  }
@@ -12,6 +12,7 @@
12
12
  <script
13
13
  lang="ts"
14
14
  setup>
15
+ import type { VNode } from 'vue';
15
16
  import FluxDisabled from './FluxDisabled.vue';
16
17
  import $style from '$flux/css/component/Form.module.scss';
17
18
 
@@ -26,7 +27,7 @@
26
27
  }>();
27
28
 
28
29
  defineSlots<{
29
- default(): any;
30
+ default(): VNode[];
30
31
  }>();
31
32
 
32
33
  function onSubmit(): void {
@@ -7,9 +7,10 @@
7
7
  <script
8
8
  lang="ts"
9
9
  setup>
10
+ import type { VNode } from 'vue';
10
11
  import $style from '$flux/css/component/Form.module.scss';
11
12
 
12
13
  defineSlots<{
13
- default(): any;
14
+ default(): VNode[];
14
15
  }>();
15
16
  </script>
@@ -5,7 +5,7 @@
5
5
  <template #opener="{open}">
6
6
  <FluxFormInputGroup>
7
7
  <FluxFormInput
8
- :="{autoComplete, autoFocus, disabled, isReadonly, modelValue, placeholder}"
8
+ :="{autoComplete, autoFocus, error, isCondensed, isLoading, isReadonly, isSecondary, name, placeholder}"
9
9
  v-model="localValue"
10
10
  :class="$style.formDateInput"
11
11
  :disabled="disabled"
@@ -17,7 +17,7 @@
17
17
  @show-picker="open"/>
18
18
 
19
19
  <FluxSecondaryButton
20
- :disabled="disabled"
20
+ :disabled="disabled || isReadonly"
21
21
  icon-leading="calendar"
22
22
  @click.prevent="open"/>
23
23
  </FluxFormInputGroup>
@@ -33,10 +33,11 @@
33
33
  <script
34
34
  lang="ts"
35
35
  setup>
36
- import type { FluxAutoCompleteType } from '@flux-ui/types';
36
+ import type { FluxAutoCompleteType, FluxFormInputBaseProps } from '@flux-ui/types';
37
37
  import type { DateTime } from 'luxon';
38
- import { ref, toRef, unref, useTemplateRef, watch } from 'vue';
38
+ import { toRef, useTemplateRef } from 'vue';
39
39
  import { useDisabled } from '$flux/composable';
40
+ import { useDateFlyout } from '$flux/composable/private';
40
41
  import FluxDatePicker from './FluxDatePicker.vue';
41
42
  import FluxFlyout from './FluxFlyout.vue';
42
43
  import FluxFormInput from './FluxFormInput.vue';
@@ -55,20 +56,18 @@
55
56
 
56
57
  const {
57
58
  disabled: componentDisabled
58
- } = defineProps<{
59
+ } = defineProps<FluxFormInputBaseProps & {
59
60
  readonly autoComplete?: FluxAutoCompleteType;
60
- readonly autoFocus?: boolean;
61
- readonly disabled?: boolean;
62
- readonly isReadonly?: boolean;
63
61
  readonly max?: DateTime;
64
62
  readonly min?: DateTime;
65
- readonly placeholder?: string;
66
63
  }>();
67
64
 
68
65
  const disabled = useDisabled(toRef(() => componentDisabled));
69
66
  const flyoutRef = useTemplateRef('flyout');
70
67
 
71
- const localValue = ref<DateTime | null>(null);
68
+ const localValue = useDateFlyout(modelValue, flyoutRef, {
69
+ compareKey: value => value?.toISODate()
70
+ });
72
71
 
73
72
  function onBlur(): void {
74
73
  emit('blur');
@@ -77,16 +76,4 @@
77
76
  function onFocus(): void {
78
77
  emit('focus');
79
78
  }
80
-
81
- watch(modelValue, modelValue => localValue.value = modelValue, {immediate: true});
82
-
83
- watch(localValue, localValue => {
84
- unref(flyoutRef)?.close();
85
-
86
- if (modelValue.value?.toISODate() === localValue?.toISODate()) {
87
- return;
88
- }
89
-
90
- modelValue.value = localValue;
91
- });
92
79
  </script>
@@ -3,18 +3,29 @@
3
3
  ref="flyout"
4
4
  :width="300">
5
5
  <template #opener="{open}">
6
- <FluxFormInputGroup :aria-disabled="disabled ? true : undefined">
6
+ <FluxFormInputGroup
7
+ :aria-disabled="disabled ? true : undefined"
8
+ :aria-readonly="isReadonly ? true : undefined"
9
+ :aria-invalid="error ? true : undefined">
7
10
  <div
8
11
  :class="clsx(
9
12
  $style.formDateRangeInput,
10
- disabled && $style.isDisabled
13
+ disabled && $style.isDisabled,
14
+ isCondensed && $style.isCondensed,
15
+ isSecondary && $style.isSecondary,
16
+ error && $style.isInvalid
11
17
  )"
12
18
  role="presentation">
13
- <span>{{ label }}</span>
19
+ <span v-if="label">{{ label }}</span>
20
+ <span
21
+ v-else-if="placeholder"
22
+ :class="$style.formSelectPlaceholder">
23
+ {{ placeholder }}
24
+ </span>
14
25
  </div>
15
26
 
16
27
  <FluxSecondaryButton
17
- :disabled="disabled"
28
+ :disabled="disabled || isReadonly"
18
29
  icon-leading="calendar"
19
30
  @click.prevent="open"/>
20
31
  </FluxFormInputGroup>
@@ -31,10 +42,12 @@
31
42
  <script
32
43
  lang="ts"
33
44
  setup>
45
+ import type { FluxFormInputBaseProps } from '@flux-ui/types';
34
46
  import { clsx } from 'clsx';
35
47
  import type { DateTime } from 'luxon';
36
- import { computed, ref, toRef, unref, useTemplateRef, watch } from 'vue';
48
+ import { computed, toRef, unref, useTemplateRef } from 'vue';
37
49
  import { useDisabled } from '$flux/composable';
50
+ import { useDateFlyout } from '$flux/composable/private';
38
51
  import { createLabelForDateRange } from '$flux/util';
39
52
  import FluxDatePicker from './FluxDatePicker.vue';
40
53
  import FluxFlyout from './FluxFlyout.vue';
@@ -49,8 +62,7 @@
49
62
  const {
50
63
  disabled: componentDisabled,
51
64
  rangeMode = 'range'
52
- } = defineProps<{
53
- readonly disabled?: boolean;
65
+ } = defineProps<FluxFormInputBaseProps & {
54
66
  readonly max?: DateTime;
55
67
  readonly min?: DateTime;
56
68
  readonly rangeMode?: 'range' | 'week' | 'month';
@@ -59,7 +71,7 @@
59
71
  const disabled = useDisabled(toRef(() => componentDisabled));
60
72
  const flyoutRef = useTemplateRef('flyout');
61
73
 
62
- const localValue = ref<[DateTime, DateTime] | null>(null);
74
+ const localValue = useDateFlyout(modelValue, flyoutRef);
63
75
 
64
76
  const label = computed(() => {
65
77
  const value = unref(localValue);
@@ -72,11 +84,4 @@
72
84
 
73
85
  return createLabelForDateRange(start, end, true);
74
86
  });
75
-
76
- watch(localValue, localValue => {
77
- unref(flyoutRef)?.close();
78
- modelValue.value = localValue;
79
- });
80
-
81
- watch(modelValue, modelValue => localValue.value = modelValue, {immediate: true});
82
87
  </script>