@flux-ui/components 3.0.0-next.34 → 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 (339) 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/{FluxActions.vue.d.ts → 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/FluxCommandPalette.vue.d.ts +52 -0
  17. package/dist/component/FluxCommandPaletteGroup.vue.d.ts +8 -0
  18. package/dist/component/FluxCommandPaletteItem.vue.d.ts +18 -0
  19. package/dist/component/FluxComment.vue.d.ts +3 -3
  20. package/dist/component/FluxContainer.vue.d.ts +3 -3
  21. package/dist/component/FluxDivider.vue.d.ts +5 -3
  22. package/dist/component/FluxDropZone.vue.d.ts +8 -7
  23. package/dist/component/FluxExpandableGroup.vue.d.ts +3 -3
  24. package/dist/component/FluxFader.vue.d.ts +3 -3
  25. package/dist/component/FluxFaderItem.vue.d.ts +3 -3
  26. package/dist/component/FluxFilter.vue.d.ts +3 -3
  27. package/dist/component/FluxFilterBar.vue.d.ts +3 -3
  28. package/dist/component/FluxFilterBase.vue.d.ts +4 -4
  29. package/dist/component/FluxFilterWindow.vue.d.ts +13 -17
  30. package/dist/component/FluxFlyout.vue.d.ts +19 -21
  31. package/dist/component/FluxForm.vue.d.ts +3 -3
  32. package/dist/component/FluxFormColumn.vue.d.ts +3 -3
  33. package/dist/component/FluxFormDateInput.vue.d.ts +18 -24
  34. package/dist/component/FluxFormDateRangeInput.vue.d.ts +18 -21
  35. package/dist/component/FluxFormDateTimeInput.vue.d.ts +18 -24
  36. package/dist/component/FluxFormField.vue.d.ts +7 -7
  37. package/dist/component/FluxFormGrid.vue.d.ts +3 -3
  38. package/dist/component/FluxFormInput.vue.d.ts +2 -9
  39. package/dist/component/FluxFormInputAddition.vue.d.ts +3 -3
  40. package/dist/component/FluxFormInputGroup.vue.d.ts +3 -3
  41. package/dist/component/FluxFormPinInput.vue.d.ts +2 -4
  42. package/dist/component/FluxFormRangeSlider.vue.d.ts +18 -2
  43. package/dist/component/FluxFormRow.vue.d.ts +3 -3
  44. package/dist/component/FluxFormSection.vue.d.ts +3 -3
  45. package/dist/component/FluxFormSelect.vue.d.ts +2 -4
  46. package/dist/component/FluxFormSelectAsync.vue.d.ts +2 -4
  47. package/dist/component/FluxFormSlider.vue.d.ts +11 -2
  48. package/dist/component/FluxFormTextArea.vue.d.ts +2 -6
  49. package/dist/component/FluxFormTimeZonePicker.vue.d.ts +2 -4
  50. package/dist/component/FluxFormTreeViewSelect.vue.d.ts +15 -37
  51. package/dist/component/FluxGallery.vue.d.ts +3 -3
  52. package/dist/component/FluxGrid.vue.d.ts +3 -3
  53. package/dist/component/FluxGridColumn.vue.d.ts +3 -3
  54. package/dist/component/FluxIcon.vue.d.ts +1 -0
  55. package/dist/component/FluxInfo.vue.d.ts +3 -3
  56. package/dist/component/FluxInfoStack.vue.d.ts +3 -3
  57. package/dist/component/FluxLayerPane.vue.d.ts +20 -0
  58. package/dist/component/FluxLayerPaneSecondary.vue.d.ts +20 -0
  59. package/dist/component/FluxMenu.vue.d.ts +3 -3
  60. package/dist/component/FluxMenuCollapsible.vue.d.ts +47 -0
  61. package/dist/component/FluxMenuGroup.vue.d.ts +3 -3
  62. package/dist/component/FluxMenuItem.vue.d.ts +5 -3
  63. package/dist/component/FluxMenuOptions.vue.d.ts +3 -3
  64. package/dist/component/FluxNotice.vue.d.ts +5 -5
  65. package/dist/component/FluxNoticeStack.vue.d.ts +3 -3
  66. package/dist/component/FluxOverflowBar.vue.d.ts +4 -4
  67. package/dist/component/FluxPane.vue.d.ts +5 -5
  68. package/dist/component/FluxPaneBody.vue.d.ts +3 -3
  69. package/dist/component/FluxPaneFooter.vue.d.ts +3 -3
  70. package/dist/component/FluxPaneGroup.vue.d.ts +3 -3
  71. package/dist/component/FluxPaneHeader.vue.d.ts +6 -6
  72. package/dist/component/FluxPaneIllustration.vue.d.ts +5 -5
  73. package/dist/component/FluxPressable.vue.d.ts +3 -3
  74. package/dist/component/FluxPrompt.vue.d.ts +3 -17
  75. package/dist/component/FluxRoot.vue.d.ts +3 -3
  76. package/dist/component/FluxRow.vue.d.ts +23 -0
  77. package/dist/component/FluxSegmentedControl.vue.d.ts +3 -2
  78. package/dist/component/FluxSplitButton.vue.d.ts +5 -5
  79. package/dist/component/FluxStack.vue.d.ts +3 -3
  80. package/dist/component/FluxStepper.vue.d.ts +6 -6
  81. package/dist/component/FluxStepperStep.vue.d.ts +3 -3
  82. package/dist/component/FluxTab.vue.d.ts +3 -3
  83. package/dist/component/FluxTabBar.vue.d.ts +3 -3
  84. package/dist/component/FluxTabBarItem.vue.d.ts +5 -7
  85. package/dist/component/FluxTableActions.vue.d.ts +3 -3
  86. package/dist/component/FluxTableBar.vue.d.ts +3 -3
  87. package/dist/component/FluxTableCell.vue.d.ts +5 -5
  88. package/dist/component/FluxTableHeader.vue.d.ts +3 -3
  89. package/dist/component/FluxTableRow.vue.d.ts +3 -3
  90. package/dist/component/FluxTabs.vue.d.ts +6 -6
  91. package/dist/component/FluxTag.vue.d.ts +1 -0
  92. package/dist/component/FluxTagStack.vue.d.ts +3 -3
  93. package/dist/component/FluxTimeline.vue.d.ts +3 -3
  94. package/dist/component/FluxTimelineItem.vue.d.ts +3 -3
  95. package/dist/component/FluxToggle.vue.d.ts +2 -3
  96. package/dist/component/FluxToolbar.vue.d.ts +3 -3
  97. package/dist/component/FluxToolbarGroup.vue.d.ts +3 -3
  98. package/dist/component/FluxWindow.vue.d.ts +3 -3
  99. package/dist/component/index.d.ts +11 -3
  100. package/dist/component/primitive/Anchor.vue.d.ts +3 -3
  101. package/dist/component/primitive/AnchorPopup.vue.d.ts +3 -3
  102. package/dist/component/primitive/CoordinatePicker.vue.d.ts +1 -0
  103. package/dist/component/primitive/DialogLayout.vue.d.ts +28 -0
  104. package/dist/component/primitive/FilterOptionBase.vue.d.ts +2 -2
  105. package/dist/component/primitive/SelectBase.vue.d.ts +19 -37
  106. package/dist/component/primitive/SliderThumb.vue.d.ts +4 -0
  107. package/dist/component/primitive/TreeNodeRenderer.vue.d.ts +30 -0
  108. package/dist/component/primitive/index.d.ts +2 -0
  109. package/dist/composable/index.d.ts +1 -0
  110. package/dist/composable/private/index.d.ts +8 -0
  111. package/dist/composable/private/useAsyncFilterOptions.d.ts +14 -0
  112. package/dist/composable/private/useCommandPalette.d.ts +38 -0
  113. package/dist/composable/private/useDateFlyout.d.ts +10 -0
  114. package/dist/composable/private/useDropdownPopup.d.ts +27 -0
  115. package/dist/composable/private/useFilterOption.d.ts +12 -0
  116. package/dist/composable/useAdaptiveGroupInjection.d.ts +2 -0
  117. package/dist/data/di.d.ts +11 -0
  118. package/dist/data/filter.d.ts +4 -17
  119. package/dist/data/i18n.d.ts +17 -0
  120. package/dist/data/timeZones.d.ts +3 -0
  121. package/dist/index.css +710 -349
  122. package/dist/index.d.ts +1 -1
  123. package/dist/index.js +6936 -5537
  124. package/dist/index.js.map +1 -1
  125. package/dist/transition/FluxAutoHeightTransition.vue.d.ts +5 -3
  126. package/dist/transition/FluxAutoWidthTransition.vue.d.ts +5 -3
  127. package/dist/transition/FluxBreakthroughTransition.vue.d.ts +5 -3
  128. package/dist/transition/FluxFadeTransition.vue.d.ts +5 -3
  129. package/dist/transition/FluxOverlayTransition.vue.d.ts +5 -3
  130. package/dist/transition/FluxRouteTransition.vue.d.ts +5 -3
  131. package/dist/transition/FluxSlideOverTransition.vue.d.ts +5 -3
  132. package/dist/transition/FluxTooltipTransition.vue.d.ts +5 -3
  133. package/dist/transition/FluxVerticalWindowTransition.vue.d.ts +5 -3
  134. package/dist/transition/FluxWindowTransition.vue.d.ts +5 -3
  135. package/package.json +19 -23
  136. package/src/component/FluxActionBar.vue +9 -8
  137. package/src/component/FluxActionPane.vue +4 -3
  138. package/src/component/{FluxActions.vue → FluxActionStack.vue} +2 -2
  139. package/src/component/FluxAdaptiveGroup.vue +112 -0
  140. package/src/component/FluxAdaptiveSlot.vue +159 -0
  141. package/src/component/FluxAlert.vue +8 -17
  142. package/src/component/FluxAnimatedColors.vue +1 -1
  143. package/src/component/FluxAspectRatio.vue +2 -1
  144. package/src/component/FluxBadge.vue +5 -1
  145. package/src/component/FluxBadgeStack.vue +2 -1
  146. package/src/component/FluxButtonGroup.vue +2 -1
  147. package/src/component/FluxButtonStack.vue +2 -1
  148. package/src/component/FluxCalendar.vue +8 -1
  149. package/src/component/FluxCalendarEvent.vue +2 -1
  150. package/src/component/FluxCheckbox.vue +33 -6
  151. package/src/component/FluxChip.vue +1 -0
  152. package/src/component/FluxClickablePane.vue +3 -2
  153. package/src/component/FluxColorPicker.vue +8 -1
  154. package/src/component/FluxColorSelect.vue +25 -4
  155. package/src/component/{FluxAutoGrid.vue → FluxColumn.vue} +5 -8
  156. package/src/component/FluxCommandPalette.vue +290 -0
  157. package/src/component/FluxCommandPaletteGroup.vue +23 -0
  158. package/src/component/FluxCommandPaletteItem.vue +60 -0
  159. package/src/component/FluxComment.vue +2 -2
  160. package/src/component/FluxConfirm.vue +8 -17
  161. package/src/component/FluxContainer.vue +3 -2
  162. package/src/component/FluxDataTable.vue +3 -1
  163. package/src/component/FluxDivider.vue +7 -3
  164. package/src/component/FluxDropZone.vue +22 -8
  165. package/src/component/FluxExpandable.vue +3 -2
  166. package/src/component/FluxExpandableGroup.vue +2 -2
  167. package/src/component/FluxFader.vue +2 -2
  168. package/src/component/FluxFaderItem.vue +2 -1
  169. package/src/component/FluxFilter.vue +2 -1
  170. package/src/component/FluxFilterBar.vue +3 -2
  171. package/src/component/FluxFilterBase.vue +17 -9
  172. package/src/component/FluxFilterOption.vue +3 -14
  173. package/src/component/FluxFilterOptionAsync.vue +17 -60
  174. package/src/component/FluxFilterOptions.vue +3 -25
  175. package/src/component/FluxFilterOptionsAsync.vue +9 -73
  176. package/src/component/FluxFilterWindow.vue +1 -1
  177. package/src/component/FluxFlyout.vue +13 -11
  178. package/src/component/FluxForm.vue +2 -1
  179. package/src/component/FluxFormColumn.vue +2 -1
  180. package/src/component/FluxFormDateInput.vue +9 -22
  181. package/src/component/FluxFormDateRangeInput.vue +20 -15
  182. package/src/component/FluxFormDateTimeInput.vue +17 -20
  183. package/src/component/FluxFormField.vue +4 -4
  184. package/src/component/FluxFormGrid.vue +2 -1
  185. package/src/component/FluxFormInput.vue +11 -10
  186. package/src/component/FluxFormInputAddition.vue +2 -1
  187. package/src/component/FluxFormInputGroup.vue +3 -2
  188. package/src/component/FluxFormPinInput.vue +14 -6
  189. package/src/component/FluxFormRangeSlider.vue +12 -2
  190. package/src/component/FluxFormRow.vue +2 -1
  191. package/src/component/FluxFormSection.vue +4 -3
  192. package/src/component/FluxFormSelect.vue +11 -4
  193. package/src/component/FluxFormSelectAsync.vue +14 -8
  194. package/src/component/FluxFormSlider.vue +8 -2
  195. package/src/component/FluxFormTextArea.vue +12 -7
  196. package/src/component/FluxFormTimeZonePicker.vue +13 -626
  197. package/src/component/FluxFormTreeViewSelect.vue +51 -79
  198. package/src/component/FluxGallery.vue +2 -1
  199. package/src/component/FluxGrid.vue +3 -2
  200. package/src/component/FluxGridColumn.vue +2 -1
  201. package/src/component/FluxIcon.vue +4 -2
  202. package/src/component/FluxInfo.vue +2 -1
  203. package/src/component/FluxInfoStack.vue +3 -2
  204. package/src/component/FluxLayerPane.vue +16 -0
  205. package/src/component/FluxLayerPaneSecondary.vue +16 -0
  206. package/src/component/FluxLegend.vue +9 -9
  207. package/src/component/FluxMenu.vue +2 -2
  208. package/src/component/FluxMenuCollapsible.vue +187 -0
  209. package/src/component/FluxMenuGroup.vue +2 -1
  210. package/src/component/FluxMenuItem.vue +9 -1
  211. package/src/component/FluxMenuOptions.vue +1 -1
  212. package/src/component/FluxNotice.vue +7 -2
  213. package/src/component/FluxNoticeStack.vue +2 -1
  214. package/src/component/FluxOverflowBar.vue +3 -3
  215. package/src/component/FluxPagination.vue +1 -0
  216. package/src/component/FluxPane.vue +3 -2
  217. package/src/component/FluxPaneBody.vue +2 -1
  218. package/src/component/FluxPaneFooter.vue +2 -1
  219. package/src/component/FluxPaneGroup.vue +2 -1
  220. package/src/component/FluxPaneHeader.vue +7 -6
  221. package/src/component/FluxPaneIllustration.vue +3 -3
  222. package/src/component/FluxPaneMedia.vue +1 -1
  223. package/src/component/FluxPercentageBar.vue +3 -1
  224. package/src/component/FluxPressable.vue +2 -1
  225. package/src/component/FluxProgressBar.vue +2 -1
  226. package/src/component/FluxPrompt.vue +16 -27
  227. package/src/component/FluxRemove.vue +4 -0
  228. package/src/component/FluxRoot.vue +2 -2
  229. package/src/component/FluxRow.vue +24 -0
  230. package/src/component/FluxSegmentedControl.vue +51 -4
  231. package/src/component/FluxSnackbar.vue +36 -12
  232. package/src/component/FluxSplitButton.vue +3 -2
  233. package/src/component/FluxStack.vue +4 -3
  234. package/src/component/FluxStepper.vue +3 -3
  235. package/src/component/FluxStepperStep.vue +2 -1
  236. package/src/component/FluxTab.vue +2 -1
  237. package/src/component/FluxTabBar.vue +3 -3
  238. package/src/component/FluxTableActions.vue +5 -4
  239. package/src/component/FluxTableBar.vue +2 -1
  240. package/src/component/FluxTableCell.vue +4 -3
  241. package/src/component/FluxTableHeader.vue +4 -2
  242. package/src/component/FluxTableRow.vue +2 -1
  243. package/src/component/FluxTabs.vue +15 -6
  244. package/src/component/FluxTag.vue +8 -2
  245. package/src/component/FluxTagStack.vue +2 -1
  246. package/src/component/FluxTimeline.vue +2 -1
  247. package/src/component/FluxTimelineItem.vue +2 -1
  248. package/src/component/FluxToggle.vue +20 -5
  249. package/src/component/FluxToolbar.vue +2 -1
  250. package/src/component/FluxToolbarGroup.vue +2 -1
  251. package/src/component/FluxTooltip.vue +1 -1
  252. package/src/component/FluxTreeView.vue +9 -35
  253. package/src/component/FluxWindow.vue +2 -2
  254. package/src/component/index.ts +11 -3
  255. package/src/component/primitive/Anchor.vue +3 -1
  256. package/src/component/primitive/AnchorPopup.vue +3 -3
  257. package/src/component/primitive/CoordinatePicker.vue +2 -1
  258. package/src/component/primitive/CoordinatePickerThumb.vue +2 -0
  259. package/src/component/primitive/DialogLayout.vue +44 -0
  260. package/src/component/primitive/SelectBase.vue +22 -28
  261. package/src/component/primitive/SliderBase.vue +0 -1
  262. package/src/component/primitive/SliderThumb.vue +9 -0
  263. package/src/component/primitive/TreeNodeRenderer.vue +77 -0
  264. package/src/component/primitive/index.ts +2 -0
  265. package/src/composable/index.ts +1 -0
  266. package/src/composable/private/index.ts +8 -0
  267. package/src/composable/private/useAsyncFilterOptions.ts +70 -0
  268. package/src/composable/private/useCommandPalette.ts +405 -0
  269. package/src/composable/private/useDateFlyout.ts +34 -0
  270. package/src/composable/private/useDropdownPopup.ts +99 -0
  271. package/src/composable/private/useFilterOption.ts +59 -0
  272. package/src/composable/useAdaptiveGroupInjection.ts +6 -0
  273. package/src/css/component/Action.module.scss +2 -2
  274. package/src/css/component/AdaptiveSlot.module.scss +25 -0
  275. package/src/css/component/Avatar.module.scss +10 -11
  276. package/src/css/component/Badge.module.scss +11 -4
  277. package/src/css/component/Button.module.scss +4 -16
  278. package/src/css/component/Calendar.module.scss +4 -4
  279. package/src/css/component/Chip.module.scss +6 -10
  280. package/src/css/component/Color.module.scss +1 -1
  281. package/src/css/component/CommandPalette.module.scss +332 -0
  282. package/src/css/component/DatePicker.module.scss +1 -1
  283. package/src/css/component/Expandable.module.scss +5 -5
  284. package/src/css/component/Fader.module.scss +2 -1
  285. package/src/css/component/Flyout.module.scss +1 -1
  286. package/src/css/component/FocalPoint.module.scss +1 -1
  287. package/src/css/component/Form.module.scss +56 -10
  288. package/src/css/component/Item.module.scss +4 -4
  289. package/src/css/component/LayerPane.module.scss +40 -0
  290. package/src/css/component/Layout.module.scss +11 -4
  291. package/src/css/component/Legend.module.scss +2 -2
  292. package/src/css/component/Menu.module.scss +59 -11
  293. package/src/css/component/Notice.module.scss +7 -7
  294. package/src/css/component/Overlay.module.scss +2 -2
  295. package/src/css/component/Pane.module.scss +10 -23
  296. package/src/css/component/PercentageBar.module.scss +1 -1
  297. package/src/css/component/Remove.module.scss +1 -1
  298. package/src/css/component/SegmentedControl.module.scss +1 -0
  299. package/src/css/component/Snackbar.module.scss +1 -1
  300. package/src/css/component/Statistic.module.scss +2 -2
  301. package/src/css/component/Stepper.module.scss +1 -1
  302. package/src/css/component/Tab.module.scss +11 -15
  303. package/src/css/component/Table.module.scss +13 -13
  304. package/src/css/component/Timeline.module.scss +2 -2
  305. package/src/css/component/Toolbar.module.scss +3 -3
  306. package/src/css/component/Tooltip.module.scss +3 -4
  307. package/src/css/component/Transition.module.scss +1 -1
  308. package/src/css/component/TreeView.module.scss +2 -15
  309. package/src/css/component/TreeViewSelect.module.scss +1 -15
  310. package/src/css/component/base/Button.module.scss +6 -7
  311. package/src/css/component/base/Effect.module.scss +2 -1
  312. package/src/css/component/primitive/Slider.module.scss +6 -7
  313. package/src/css/component/primitive/TreeNode.module.scss +19 -0
  314. package/src/css/mixin/button-active.scss +6 -0
  315. package/src/css/mixin/focus-ring.scss +1 -1
  316. package/src/css/mixin/index.scss +1 -0
  317. package/src/css/typography.scss +3 -2
  318. package/src/css/variables.scss +7 -2
  319. package/src/data/di.ts +13 -0
  320. package/src/data/filter.ts +24 -28
  321. package/src/data/i18n.ts +17 -0
  322. package/src/data/store.ts +46 -11
  323. package/src/data/timeZones.ts +619 -0
  324. package/src/index.ts +2 -0
  325. package/src/transition/FluxAutoHeightTransition.vue +5 -0
  326. package/src/transition/FluxAutoWidthTransition.vue +5 -0
  327. package/src/transition/FluxBreakthroughTransition.vue +5 -0
  328. package/src/transition/FluxFadeTransition.vue +5 -0
  329. package/src/transition/FluxOverlayTransition.vue +5 -0
  330. package/src/transition/FluxRouteTransition.vue +5 -0
  331. package/src/transition/FluxSlideOverTransition.vue +5 -0
  332. package/src/transition/FluxTooltipTransition.vue +5 -0
  333. package/src/transition/FluxVerticalWindowTransition.vue +5 -0
  334. package/src/transition/FluxWindowTransition.vue +5 -0
  335. package/dist/0db98648.svg +0 -3
  336. package/src/component/FluxPaneDeck.vue +0 -24
  337. package/src/css/component/base/Grid.module.scss +0 -8
  338. package/src/image/avatar-mask.svg +0 -3
  339. package/tsconfig.json +0 -7
@@ -0,0 +1,290 @@
1
+ <template>
2
+ <Teleport to="body">
3
+ <div
4
+ v-if="isOpen || isClosing"
5
+ :class="[$style.commandPaletteBackdrop, isClosing && $style.isClosing]"
6
+ @click="close"/>
7
+
8
+ <div
9
+ v-if="isOpen || isClosing"
10
+ ref="dialogRef"
11
+ :class="[$style.commandPaletteDialog, isClosing && $style.isClosing]"
12
+ @click.self="close"
13
+ @keydown="onKeyDown">
14
+ <div
15
+ v-height-transition
16
+ :class="$style.commandPalette"
17
+ @mousedown.prevent>
18
+ <div :class="$style.commandPaletteSearch">
19
+ <FluxIcon
20
+ :class="$style.commandPaletteSearchIcon"
21
+ name="magnifying-glass"/>
22
+
23
+ <template v-if="activeTabSource">
24
+ <button
25
+ :class="$style.commandPaletteBreadcrumb"
26
+ tabindex="-1"
27
+ type="button"
28
+ @click="clearSubActionTarget"
29
+ @mousedown.prevent>
30
+ {{ activeTabSource.label }}
31
+ </button>
32
+
33
+ <span :class="$style.commandPaletteBreadcrumbSeparator">/</span>
34
+ </template>
35
+
36
+ <template v-if="subActionTarget">
37
+ <button
38
+ :class="$style.commandPaletteBreadcrumb"
39
+ tabindex="-1"
40
+ type="button"
41
+ @mousedown.prevent>
42
+ {{ subActionTarget.label }}
43
+ </button>
44
+
45
+ <span :class="$style.commandPaletteBreadcrumbSeparator">/</span>
46
+ </template>
47
+
48
+ <input
49
+ ref="inputRef"
50
+ :class="$style.commandPaletteSearchInput"
51
+ :placeholder="placeholder ?? 'Search...'"
52
+ :value="search"
53
+ type="text"
54
+ @input="setSearch(($event.target as HTMLInputElement).value)"/>
55
+
56
+ <FluxTag
57
+ is-keyboard-shortcut
58
+ label="Esc"/>
59
+ </div>
60
+
61
+ <div
62
+ v-if="tabs.length > 0 && !subActionTarget"
63
+ :class="$style.commandPaletteTabs">
64
+ <button
65
+ :class="activeTab === null ? $style.commandPaletteTabActive : $style.commandPaletteTab"
66
+ tabindex="-1"
67
+ type="button"
68
+ @click="setActiveTab(null)"
69
+ @mousedown.prevent>
70
+ All
71
+ </button>
72
+
73
+ <button
74
+ v-for="tab of tabs"
75
+ :key="tab.key"
76
+ :class="activeTab === tab.key ? $style.commandPaletteTabActive : $style.commandPaletteTab"
77
+ tabindex="-1"
78
+ type="button"
79
+ @click="setActiveTab(tab.key)"
80
+ @mousedown.prevent>
81
+ <FluxIcon
82
+ v-if="tab.icon"
83
+ :class="$style.commandPaletteTabIcon"
84
+ :name="tab.icon"/>
85
+
86
+ {{ tab.label }}
87
+ </button>
88
+ </div>
89
+
90
+ <FluxWindowTransition :is-back="isTransitioningBack">
91
+ <div
92
+ :key="activeTab"
93
+ :class="$style.commandPaletteResults">
94
+ <template v-if="subActionTarget">
95
+ <FluxCommandPaletteItem
96
+ v-for="(action, index) of subActions"
97
+ :key="index"
98
+ ref="itemRefs"
99
+ :icon="action.icon"
100
+ :is-highlighted="highlightedIndex === index"
101
+ :label="action.label"
102
+ @activate="activateSubAction(action)"
103
+ @highlight="highlightedIndex = index"/>
104
+ </template>
105
+
106
+ <template v-else-if="groupedItems.length > 0">
107
+ <template
108
+ v-for="group of groupedItems"
109
+ :key="group.sourceKey">
110
+ <FluxCommandPaletteGroup
111
+ v-if="group.sourceLabel"
112
+ :label="group.sourceLabel"/>
113
+
114
+ <FluxCommandPaletteItem
115
+ v-for="result of group.items"
116
+ :key="result.item.id"
117
+ ref="itemRefs"
118
+ :command="result.item.command"
119
+ :has-sub-actions="!!result.item.subActions?.length"
120
+ :icon="result.item.icon"
121
+ :is-highlighted="highlightedIndex === result.globalIndex"
122
+ :label="result.item.label"
123
+ :sub-label="result.item.subLabel"
124
+ @activate="activateItem(result.item)"
125
+ @highlight="highlightedIndex = result.globalIndex"/>
126
+ </template>
127
+ </template>
128
+
129
+ <div
130
+ v-else-if="isLoading"
131
+ :class="$style.commandPaletteLoading">
132
+ <FluxSpinner :size="22"/>
133
+ </div>
134
+
135
+ <div
136
+ v-else
137
+ :class="$style.commandPaletteEmpty">
138
+ No results found.
139
+ </div>
140
+ </div>
141
+ </FluxWindowTransition>
142
+ </div>
143
+ </div>
144
+ </Teleport>
145
+ </template>
146
+
147
+ <script
148
+ lang="ts"
149
+ setup>
150
+ import type { FluxCommandSource, FluxCommandSourceItem } from '@flux-ui/types';
151
+ import { isSSR, vHeightTransition } from '@flux-ui/internals';
152
+ import { onMounted, onUnmounted, ref, toRef, unref, useTemplateRef } from 'vue';
153
+ import { useCommandPalette } from '$flux/composable/private/useCommandPalette';
154
+ import FluxCommandPaletteGroup from './FluxCommandPaletteGroup.vue';
155
+ import FluxCommandPaletteItem from './FluxCommandPaletteItem.vue';
156
+ import FluxIcon from './FluxIcon.vue';
157
+ import FluxSpinner from './FluxSpinner.vue';
158
+ import FluxTag from './FluxTag.vue';
159
+ import FluxWindowTransition from '$flux/transition/FluxWindowTransition.vue';
160
+ import $style from '$flux/css/component/CommandPalette.module.scss';
161
+
162
+ const props = defineProps<{
163
+ readonly hasKeyboardShortcut?: boolean;
164
+ readonly placeholder?: string;
165
+ readonly sources: FluxCommandSource[];
166
+ }>();
167
+
168
+ const emit = defineEmits<{
169
+ select: [item: FluxCommandSourceItem];
170
+ }>();
171
+
172
+ const dialogRef = useTemplateRef<HTMLDivElement>('dialogRef');
173
+ const inputRef = useTemplateRef<HTMLInputElement>('inputRef');
174
+ const itemRefs = ref<InstanceType<typeof FluxCommandPaletteItem>[]>();
175
+
176
+ const isOpen = ref(false);
177
+ const isClosing = ref(false);
178
+
179
+ const {
180
+ search,
181
+ activeTab,
182
+ activeTabSource,
183
+ highlightedIndex,
184
+ isLoading,
185
+ isTransitioningBack,
186
+ subActionTarget,
187
+ groupedItems,
188
+ subActions,
189
+ tabs,
190
+ setSearch,
191
+ setActiveTab,
192
+ enterSubActions,
193
+ onKeyNavigate,
194
+ reset
195
+ } = useCommandPalette({
196
+ sources: toRef(() => props.sources),
197
+ itemRefs
198
+ });
199
+
200
+ function open(): void {
201
+ if (unref(isOpen)) {
202
+ return;
203
+ }
204
+
205
+ isOpen.value = true;
206
+
207
+ requestAnimationFrame(() => unref(inputRef)?.focus());
208
+ }
209
+
210
+ function close(): void {
211
+ if (!unref(isOpen)) {
212
+ return;
213
+ }
214
+
215
+ const dialog = unref(dialogRef);
216
+
217
+ if (!dialog) {
218
+ return;
219
+ }
220
+
221
+ isClosing.value = true;
222
+
223
+ const finishClose = () => {
224
+ isClosing.value = false;
225
+ isOpen.value = false;
226
+ reset();
227
+ };
228
+
229
+ const fallbackTimeout = setTimeout(finishClose, 250);
230
+
231
+ dialog.addEventListener('animationend', () => {
232
+ clearTimeout(fallbackTimeout);
233
+ finishClose();
234
+ }, {once: true});
235
+ }
236
+
237
+ function clearSubActionTarget(): void {
238
+ subActionTarget.value = null;
239
+ highlightedIndex.value = -1;
240
+ }
241
+
242
+ function activateItem(item: FluxCommandSourceItem): void {
243
+ if (item.subActions?.length) {
244
+ enterSubActions(item);
245
+ } else {
246
+ item.onActivate();
247
+ emit('select', item);
248
+ close();
249
+ }
250
+ }
251
+
252
+ function activateSubAction(action: { readonly onActivate: () => void; }): void {
253
+ action.onActivate();
254
+ close();
255
+ }
256
+
257
+ function onKeyDown(evt: KeyboardEvent): void {
258
+ onKeyNavigate(evt, close, (item) => {
259
+ emit('select', item);
260
+ close();
261
+ });
262
+ }
263
+
264
+ function onGlobalKeyDown(evt: KeyboardEvent): void {
265
+ if (evt.key === 'k' && (evt.metaKey || evt.ctrlKey)) {
266
+ evt.preventDefault();
267
+
268
+ if (unref(isOpen)) {
269
+ close();
270
+ } else {
271
+ open();
272
+ }
273
+ }
274
+ }
275
+
276
+ if (!isSSR && props.hasKeyboardShortcut) {
277
+ onMounted(() => {
278
+ window.addEventListener('keydown', onGlobalKeyDown);
279
+ });
280
+
281
+ onUnmounted(() => {
282
+ window.removeEventListener('keydown', onGlobalKeyDown);
283
+ });
284
+ }
285
+
286
+ defineExpose({
287
+ close,
288
+ open
289
+ });
290
+ </script>
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <div :class="$style.commandPaletteGroup">
3
+ <FluxIcon
4
+ v-if="icon"
5
+ :class="$style.commandPaletteGroupIcon"
6
+ :name="icon"/>
7
+
8
+ <span>{{ label }}</span>
9
+ </div>
10
+ </template>
11
+
12
+ <script
13
+ lang="ts"
14
+ setup>
15
+ import type { FluxIconName } from '@flux-ui/types';
16
+ import FluxIcon from './FluxIcon.vue';
17
+ import $style from '$flux/css/component/CommandPalette.module.scss';
18
+
19
+ defineProps<{
20
+ readonly icon?: FluxIconName;
21
+ readonly label: string;
22
+ }>();
23
+ </script>
@@ -0,0 +1,60 @@
1
+ <template>
2
+ <button
3
+ :class="isHighlighted ? $style.commandPaletteItemHighlighted : $style.commandPaletteItem"
4
+ tabindex="-1"
5
+ type="button"
6
+ @click="$emit('activate')"
7
+ @mousedown.prevent
8
+ @mouseenter="$emit('highlight')">
9
+ <div
10
+ v-if="icon"
11
+ :class="$style.commandPaletteItemIcon">
12
+ <FluxIcon :name="icon"/>
13
+ </div>
14
+
15
+ <div :class="$style.commandPaletteItemContent">
16
+ <div :class="$style.commandPaletteItemLabel">
17
+ {{ label }}
18
+ </div>
19
+
20
+ <div
21
+ v-if="subLabel"
22
+ :class="$style.commandPaletteItemSubLabel">
23
+ {{ subLabel }}
24
+ </div>
25
+ </div>
26
+
27
+ <FluxTag
28
+ v-if="command"
29
+ is-keyboard-shortcut
30
+ :label="command"/>
31
+
32
+ <FluxIcon
33
+ v-if="hasSubActions"
34
+ :class="$style.commandPaletteItemSubActionIndicator"
35
+ name="chevron-right"/>
36
+ </button>
37
+ </template>
38
+
39
+ <script
40
+ lang="ts"
41
+ setup>
42
+ import type { FluxIconName } from '@flux-ui/types';
43
+ import FluxIcon from './FluxIcon.vue';
44
+ import FluxTag from './FluxTag.vue';
45
+ import $style from '$flux/css/component/CommandPalette.module.scss';
46
+
47
+ defineEmits<{
48
+ activate: [];
49
+ highlight: [];
50
+ }>();
51
+
52
+ defineProps<{
53
+ readonly command?: string;
54
+ readonly hasSubActions?: boolean;
55
+ readonly icon?: FluxIconName;
56
+ readonly isHighlighted?: boolean;
57
+ readonly label: string;
58
+ readonly subLabel?: string;
59
+ }>();
60
+ </script>
@@ -38,7 +38,7 @@
38
38
  import type { FluxIconName } from '@flux-ui/types';
39
39
  import { clsx } from 'clsx';
40
40
  import type { DateTime } from 'luxon';
41
- import { computed } from 'vue';
41
+ import { computed, type VNode } from 'vue';
42
42
  import { useTranslate } from '$flux/composable/private';
43
43
  import FluxAvatar from './FluxAvatar.vue';
44
44
  import $style from '$flux/css/component/Comment.module.scss';
@@ -60,7 +60,7 @@
60
60
  }>();
61
61
 
62
62
  defineSlots<{
63
- default(): any;
63
+ default(): VNode[];
64
64
  }>();
65
65
 
66
66
  const translate = useTranslate();
@@ -1,14 +1,9 @@
1
1
  <template>
2
- <FluxPane>
3
- <FluxPaneHeader
4
- :icon="confirm.icon"
5
- :title="confirm.title"/>
6
-
7
- <FluxPaneBody v-html="confirm.message"/>
8
-
9
- <FluxPaneFooter>
10
- <FluxSpacer/>
11
-
2
+ <DialogLayout
3
+ :icon="confirm.icon"
4
+ :message="confirm.message"
5
+ :title="confirm.title">
6
+ <template #footer>
12
7
  <FluxSecondaryButton
13
8
  :label="translate('flux.cancel')"
14
9
  @click="confirm.onCancel()"/>
@@ -17,8 +12,8 @@
17
12
  icon-leading="circle-check"
18
13
  :label="translate('flux.ok')"
19
14
  @click="confirm.onConfirm()"/>
20
- </FluxPaneFooter>
21
- </FluxPane>
15
+ </template>
16
+ </DialogLayout>
22
17
  </template>
23
18
 
24
19
  <script
@@ -26,13 +21,9 @@
26
21
  setup>
27
22
  import type { FluxConfirmObject } from '@flux-ui/types';
28
23
  import { useTranslate } from '$flux/composable/private';
29
- import FluxPane from './FluxPane.vue';
30
- import FluxPaneBody from './FluxPaneBody.vue';
31
- import FluxPaneFooter from './FluxPaneFooter.vue';
32
- import FluxPaneHeader from './FluxPaneHeader.vue';
33
24
  import FluxPrimaryButton from './FluxPrimaryButton.vue';
34
25
  import FluxSecondaryButton from './FluxSecondaryButton.vue';
35
- import FluxSpacer from './FluxSpacer.vue';
26
+ import { DialogLayout } from './primitive';
36
27
 
37
28
  defineProps<{
38
29
  readonly confirm: FluxConfirmObject;
@@ -9,15 +9,16 @@
9
9
  <script
10
10
  lang="ts"
11
11
  setup>
12
+ import type { VNode } from 'vue';
12
13
  import $style from '$flux/css/component/Layout.module.scss';
13
14
 
14
15
  const {
15
- gutter = 21
16
+ gutter = 18
16
17
  } = defineProps<{
17
18
  readonly gutter?: number;
18
19
  }>();
19
20
 
20
21
  defineSlots<{
21
- default(): any;
22
+ default(): VNode[];
22
23
  }>();
23
24
  </script>
@@ -15,7 +15,9 @@
15
15
  <template
16
16
  v-if="'header' in slots"
17
17
  #header>
18
- <slot name="filter" v-bind="{page, perPage, items: limitedItems, total}"/>
18
+ <slot
19
+ name="filter"
20
+ v-bind="{page, perPage, items: limitedItems, total}"/>
19
21
 
20
22
  <FluxTableRow>
21
23
  <slot
@@ -6,7 +6,7 @@
6
6
  contentPlacement === 'end' && $style.dividerContentEnd
7
7
  )"
8
8
  role="separator"
9
- aria-orientation="horizontal">
9
+ :aria-orientation="direction">
10
10
  <div
11
11
  v-if="slots.default"
12
12
  :class="$style.dividerContent">
@@ -22,16 +22,20 @@
22
22
  <script
23
23
  lang="ts"
24
24
  setup>
25
+ import type { VNode } from 'vue';
26
+ import type { FluxDirection } from '@flux-ui/types';
25
27
  import { clsx } from 'clsx';
26
28
  import $style from '$flux/css/component/Divider.module.scss';
27
29
 
28
30
  const {
29
- contentPlacement = 'center'
31
+ contentPlacement = 'center',
32
+ direction = 'horizontal'
30
33
  } = defineProps<{
31
34
  readonly contentPlacement?: 'start' | 'center' | 'end';
35
+ readonly direction?: FluxDirection;
32
36
  }>();
33
37
 
34
38
  const slots = defineSlots<{
35
- default?(): any;
39
+ default?(): VNode[];
36
40
  }>();
37
41
  </script>
@@ -5,7 +5,10 @@
5
5
  isDragging && $style.isDragging,
6
6
  isDraggingOver && $style.isDraggingOver
7
7
  ]"
8
- :aria-disabled="disabled ? true : undefined">
8
+ :aria-disabled="disabled ? true : undefined"
9
+ :aria-label="ariaLabel ?? translate('flux.dropFilesOrClick')"
10
+ :tabindex="disabled ? -1 : 0"
11
+ @keydown.self="onKeyDown">
9
12
  <div
10
13
  :class="$style.dropZoneContent"
11
14
  @dragleave.capture="onDragLeave"
@@ -52,8 +55,9 @@
52
55
  lang="ts"
53
56
  setup>
54
57
  import { roundStep } from '@basmilius/utils';
55
- import { onMounted, onUnmounted, ref, toRef, unref, useTemplateRef, watch } from 'vue';
58
+ import { onMounted, onUnmounted, ref, toRef, unref, useTemplateRef, type VNode, watch } from 'vue';
56
59
  import { useDisabled } from '$flux/composable';
60
+ import { useTranslate } from '$flux/composable/private';
57
61
  import { FluxFadeTransition } from '$flux/transition';
58
62
  import FluxSpinner from './FluxSpinner.vue';
59
63
  import $style from '$flux/css/component/DropZone.module.scss';
@@ -65,10 +69,12 @@
65
69
 
66
70
  const {
67
71
  accept,
72
+ ariaLabel,
68
73
  disabled: componentDisabled,
69
74
  isMultiple
70
75
  } = defineProps<{
71
76
  readonly accept?: string;
77
+ readonly ariaLabel?: string;
72
78
  readonly disabled?: boolean;
73
79
  readonly isLoading?: boolean;
74
80
  readonly isMultiple?: boolean;
@@ -80,25 +86,26 @@
80
86
  readonly isDraggingOver: boolean;
81
87
 
82
88
  showPicker(): void;
83
- }): any;
89
+ }): VNode[];
84
90
 
85
91
  actions?(props: {
86
92
  readonly isDragging: boolean;
87
93
  readonly isDraggingOver: boolean;
88
94
 
89
95
  showPicker(): void;
90
- }): any;
96
+ }): VNode[];
91
97
 
92
98
  extra?(props: {
93
99
  readonly isDragging: boolean;
94
100
  readonly isDraggingOver: boolean;
95
101
 
96
102
  showPicker(): void;
97
- }): any;
103
+ }): VNode[];
98
104
  }>();
99
105
 
100
106
  const contentRef = useTemplateRef('content');
101
107
  const disabled = useDisabled(toRef(() => componentDisabled));
108
+ const translate = useTranslate();
102
109
 
103
110
  const isDragging = ref(false);
104
111
  const isDraggingOver = ref(false);
@@ -111,11 +118,18 @@
111
118
  });
112
119
 
113
120
  onUnmounted(() => {
114
- window.removeEventListener('dragleave', onWindowDragEnd);
115
- window.removeEventListener('dragover', onWindowDragStart);
116
- window.removeEventListener('drop', onWindowDrop);
121
+ window.removeEventListener('dragleave', onWindowDragEnd, {capture: true});
122
+ window.removeEventListener('dragover', onWindowDragStart, {capture: true});
123
+ window.removeEventListener('drop', onWindowDrop, {capture: true});
117
124
  });
118
125
 
126
+ function onKeyDown(evt: KeyboardEvent): void {
127
+ if (evt.key === 'Enter' || evt.key === ' ') {
128
+ showPicker();
129
+ evt.preventDefault();
130
+ }
131
+ }
132
+
119
133
  function onDragEnter(evt: DragEvent): void {
120
134
  isDraggingOver.value = true;
121
135
  evt.preventDefault();
@@ -34,6 +34,7 @@
34
34
  v-if="isOpen"
35
35
  :class="$style.expandableBody"
36
36
  :id="contentId"
37
+ role="region"
37
38
  :aria-labelledby="headerId">
38
39
  <slot
39
40
  v-bind="{label, close}"
@@ -80,8 +81,8 @@
80
81
 
81
82
  const expandIcon = computed<FluxIconName>(() => unref(isOpen) ? 'minus' : 'plus');
82
83
 
83
- onBeforeMount(() => register?.(unref(componentId), instance));
84
- onUnmounted(() => unregister?.(unref(componentId)));
84
+ onBeforeMount(() => register?.(componentId.value, instance));
85
+ onUnmounted(() => unregister?.(componentId.value));
85
86
 
86
87
  function close(): void {
87
88
  isOpen.value = false;
@@ -8,7 +8,7 @@
8
8
  lang="ts"
9
9
  setup>
10
10
  import { getExposedRef } from '@flux-ui/internals';
11
- import { type ComponentInternalInstance, provide } from 'vue';
11
+ import { type ComponentInternalInstance, provide, type VNode } from 'vue';
12
12
  import { FluxExpandableGroupInjectionKey } from '$flux/data';
13
13
  import $style from '$flux/css/component/Expandable.module.scss';
14
14
 
@@ -20,7 +20,7 @@
20
20
 
21
21
 
22
22
  defineSlots<{
23
- default(): any;
23
+ default(): VNode[];
24
24
  }>();
25
25
 
26
26
  const expandables: { [key: number]: ComponentInternalInstance; } = {};
@@ -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 {