@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
@@ -5,10 +5,15 @@
5
5
  :class="clsx(
6
6
  $formStyle.formSelect,
7
7
  disabled && $formStyle.isDisabled,
8
- isPopupOpen && $formStyle.isFocused
8
+ isPopupOpen && $formStyle.isFocused,
9
+ isCondensed && $formStyle.isCondensed,
10
+ isSecondary && $formStyle.isSecondary,
11
+ error && $formStyle.isInvalid
9
12
  )"
10
13
  :id="id"
11
14
  :aria-disabled="disabled ? true : undefined"
15
+ :aria-readonly="isReadonly ? true : undefined"
16
+ :aria-invalid="error ? true : undefined"
12
17
  tabindex="0"
13
18
  tag-name="div"
14
19
  @click="toggle()"
@@ -83,45 +88,19 @@
83
88
  @keydown.enter.prevent="onNodeClick(node)"
84
89
  @keydown.space.prevent="onNodeClick(node)">
85
90
 
86
- <!-- Line guides and expand button grouped without gap -->
87
- <div :class="$style.treeNodeLineArea">
88
- <span
89
- v-for="(showLine, guideIndex) in node.lineGuides"
90
- :key="`g-${guideIndex}`"
91
- :class="[$style.treeIndent, showLine && $style.hasLine]"/>
92
-
93
- <span
94
- v-if="node.depth > 0"
95
- :class="[$style.treeConnector, node.isLast && $style.isLast]"/>
96
-
97
- <span
98
- :class="$style.treeNodeExpand"
99
- @click="onExpandClick(node, $event)">
91
+ <TreeNodeRenderer
92
+ :node="node"
93
+ :expanded="expandedIds.has(node.id)"
94
+ :level-colors="levelColors"
95
+ @expand-click="onExpandClick(node, $event)">
96
+ <template #trailing>
100
97
  <FluxIcon
101
- v-if="node.children?.length"
102
- :name="expandedIds.has(node.id) ? 'angle-down' : 'angle-right'"
103
- :size="12"/>
104
- </span>
105
- </div>
106
-
107
- <span
108
- v-if="getLevelColor(node.depth, levelColors)"
109
- :class="$style.treeNodeColorDot"
110
- :style="{ background: getLevelColor(node.depth, levelColors) }"/>
111
-
112
- <FluxIcon
113
- v-if="node.icon"
114
- :class="$style.treeNodeIcon"
115
- :name="node.icon"
116
- :size="16"/>
117
-
118
- <span :class="$style.treeNodeLabel">{{ node.label }}</span>
119
-
120
- <FluxIcon
121
- v-if="selectedIds.has(node.id)"
122
- :class="$style.treeNodeCheck"
123
- name="check"
124
- :size="14"/>
98
+ v-if="selectedIds.has(node.id)"
99
+ :class="$style.treeNodeCheck"
100
+ name="check"
101
+ :size="14"/>
102
+ </template>
103
+ </TreeNodeRenderer>
125
104
  </div>
126
105
  </template>
127
106
  </div>
@@ -133,20 +112,20 @@
133
112
  <script
134
113
  lang="ts"
135
114
  setup>
136
- import { useClickOutside } from '@basmilius/common';
137
115
  import { unrefTemplateElement } from '@flux-ui/internals';
138
- import type { FluxColor, FluxFormTreeViewSelectOption, FluxFormTreeViewSelectValue } from '@flux-ui/types';
116
+ import type { FluxColor, FluxFormInputBaseProps, FluxFormTreeViewSelectOption, FluxFormTreeViewSelectValue } from '@flux-ui/types';
139
117
  import { clsx } from 'clsx';
140
118
  import { type ComponentPublicInstance, computed, nextTick, ref, toRef, unref, useTemplateRef, watch } from 'vue';
141
119
  import { useDisabled, useFormFieldInjection } from '$flux/composable';
142
- import { flattenAll, flattenVisible, getLevelColor, INITIAL_HIGHLIGHTED_INDEX, useTranslate, useTreeView } from '$flux/composable/private';
143
120
  import type { TreeFlatNode } from '$flux/composable/private';
121
+ import { flattenAll, flattenVisible, INITIAL_HIGHLIGHTED_INDEX, useDropdownPopup, useTranslate, useTreeView } from '$flux/composable/private';
144
122
  import { FluxFadeTransition } from '$flux/transition';
145
123
  import FluxFormInput from '$flux/component/FluxFormInput.vue';
146
124
  import FluxIcon from '$flux/component/FluxIcon.vue';
147
125
  import FluxTag from '$flux/component/FluxTag.vue';
148
126
  import Anchor from '$flux/component/primitive/Anchor.vue';
149
127
  import AnchorPopup from '$flux/component/primitive/AnchorPopup.vue';
128
+ import TreeNodeRenderer from '$flux/component/primitive/TreeNodeRenderer.vue';
150
129
  import $formStyle from '$flux/css/component/Form.module.scss';
151
130
  import $style from '$flux/css/component/TreeViewSelect.module.scss';
152
131
 
@@ -156,22 +135,21 @@
156
135
  inheritAttrs: false
157
136
  });
158
137
 
159
- const modelValue = defineModel<FluxFormTreeViewSelectValue>({ required: true });
138
+ const modelValue = defineModel<FluxFormTreeViewSelectValue>({required: true});
160
139
 
161
140
  const {
162
141
  disabled: componentDisabled,
163
142
  isMultiple,
143
+ isReadonly,
164
144
  isSearchable,
165
145
  levelColors,
166
146
  options,
167
147
  placeholder
168
- } = defineProps<{
169
- readonly disabled?: boolean;
148
+ } = defineProps<Pick<FluxFormInputBaseProps, 'autoFocus' | 'disabled' | 'error' | 'isCondensed' | 'isLoading' | 'isReadonly' | 'isSecondary' | 'name' | 'placeholder'> & {
170
149
  readonly isMultiple?: boolean;
171
150
  readonly isSearchable?: boolean;
172
151
  readonly levelColors?: (FluxColor | string)[];
173
152
  readonly options: FluxFormTreeViewSelectOption[];
174
- readonly placeholder?: string;
175
153
  }>();
176
154
 
177
155
  const disabled = useDisabled(toRef(() => componentDisabled));
@@ -179,16 +157,28 @@
179
157
  const translate = useTranslate();
180
158
 
181
159
  const anchorRef = useTemplateRef<ComponentPublicInstance>('anchor');
182
- const anchorPopupRef = useTemplateRef('anchorPopup');
160
+ const anchorPopupRef = useTemplateRef<ComponentPublicInstance>('anchorPopup');
183
161
  const nodeElementRefs = useTemplateRef<HTMLDivElement[]>('nodeElements');
184
162
  const searchInputRef = useTemplateRef<ComponentPublicInstance<typeof FluxFormInput>>('searchInput');
185
163
 
186
164
  const expandedIds = ref(new Set<string | number>());
187
- const isPopupOpen = ref(false);
188
165
  const searchQuery = ref('');
189
166
 
190
167
  const focusElement = computed(() => unrefTemplateElement(searchInputRef) ?? unrefTemplateElement(anchorRef));
191
168
 
169
+ const {
170
+ isOpen: isPopupOpen,
171
+ toggle,
172
+ focusAnchor,
173
+ onKeyDownBase
174
+ } = useDropdownPopup({
175
+ anchorRef,
176
+ popupRef: anchorPopupRef,
177
+ focusElement,
178
+ disabled,
179
+ readonly: toRef(() => !!isReadonly)
180
+ });
181
+
192
182
  const selectedIds = computed(() => {
193
183
  const value = unref(modelValue);
194
184
  if (Array.isArray(value)) {
@@ -218,19 +208,9 @@
218
208
  const {highlightedIndex, toggleExpand, onExpandClick, onKeyNavigate} = useTreeView({
219
209
  expandedIds,
220
210
  nodeElementRefs,
221
- visibleNodes,
211
+ visibleNodes
222
212
  });
223
213
 
224
- useClickOutside([anchorRef, anchorPopupRef], isPopupOpen, () => isPopupOpen.value = false);
225
- useClickOutside(anchorRef, isPopupOpen, () => unref(focusElement)?.focus());
226
-
227
- function toggle(): void {
228
- if (unref(disabled)) {
229
- return;
230
- }
231
- isPopupOpen.value = !unref(isPopupOpen);
232
- }
233
-
234
214
  function select(nodeId: string | number): void {
235
215
  if (unref(isMultiple)) {
236
216
  const current = [...unref(selectedIds)];
@@ -250,7 +230,7 @@
250
230
  if (Array.isArray(current)) {
251
231
  modelValue.value = current.filter(v => v !== nodeId);
252
232
  }
253
- nextTick(() => unrefTemplateElement(anchorRef)?.focus());
233
+ focusAnchor();
254
234
  }
255
235
 
256
236
  function onNodeClick(node: FlatNode): void {
@@ -273,26 +253,20 @@
273
253
  return;
274
254
  }
275
255
 
276
- switch (evt.key) {
277
- case 'Backspace':
278
- if (!unref(isMultiple)) {
279
- return;
280
- }
281
- if (unref(searchQuery).length > 0 || unref(selectedIds).size === 0) {
282
- return;
283
- }
284
- const selectedList = [...unref(selectedIds)];
285
- deselect(selectedList[selectedList.length - 1]);
256
+ if (evt.key === 'Backspace') {
257
+ if (!unref(isMultiple)) {
286
258
  return;
287
-
288
- case 'Escape':
289
- isPopupOpen.value = false;
290
- nextTick(() => unrefTemplateElement(anchorRef)?.focus());
259
+ }
260
+ if (unref(searchQuery).length > 0 || unref(selectedIds).size === 0) {
291
261
  return;
262
+ }
263
+ const selectedList = [...unref(selectedIds)];
264
+ deselect(selectedList[selectedList.length - 1]);
265
+ return;
266
+ }
292
267
 
293
- case 'Tab':
294
- isPopupOpen.value = false;
295
- return;
268
+ if (onKeyDownBase(evt)) {
269
+ return;
296
270
  }
297
271
 
298
272
  // When searchable, don't intercept letter keys — let the search input handle them
@@ -320,8 +294,6 @@
320
294
  highlightedIndex.value = firstSelectedIndex;
321
295
  }
322
296
  }
323
-
324
- unref(focusElement)?.focus();
325
297
  });
326
298
  });
327
299
 
@@ -57,6 +57,7 @@
57
57
  <script
58
58
  lang="ts"
59
59
  setup>
60
+ import type { VNode } from 'vue';
60
61
  import type { FluxFocalPointObject } from '@flux-ui/types';
61
62
  import { useTranslate } from '$flux/composable/private';
62
63
  import FluxDropZone from './FluxDropZone.vue';
@@ -76,7 +77,7 @@
76
77
  }>();
77
78
 
78
79
  defineSlots<{
79
- default(): any;
80
+ default(): VNode[];
80
81
  }>();
81
82
 
82
83
  const translate = useTranslate();
@@ -12,17 +12,18 @@
12
12
  <script
13
13
  lang="ts"
14
14
  setup>
15
+ import type { VNode } from 'vue';
15
16
  import $style from '$flux/css/component/Grid.module.scss';
16
17
 
17
18
  const {
18
19
  columns = 12,
19
- gap = 21
20
+ gap = 18
20
21
  } = defineProps<{
21
22
  readonly columns?: number;
22
23
  readonly gap?: number;
23
24
  }>();
24
25
 
25
26
  defineSlots<{
26
- default(): any;
27
+ default(): VNode[];
27
28
  }>();
28
29
  </script>
@@ -15,6 +15,7 @@
15
15
  <script
16
16
  lang="ts"
17
17
  setup>
18
+ import type { VNode } from 'vue';
18
19
  import $style from '$flux/css/component/Grid.module.scss';
19
20
 
20
21
  defineProps<{
@@ -26,6 +27,6 @@
26
27
  }>();
27
28
 
28
29
  defineSlots<{
29
- default(): any;
30
+ default(): VNode[];
30
31
  }>();
31
32
  </script>
@@ -8,8 +8,9 @@
8
8
  scale: definition.scale > 1 ? definition.scale : undefined
9
9
  }"
10
10
  focusable="false"
11
- role="img"
12
- aria-hidden="true"
11
+ :role="ariaLabel ? 'img' : undefined"
12
+ :aria-hidden="ariaLabel ? undefined : true"
13
+ :aria-label="ariaLabel"
13
14
  @click="onClick">
14
15
  <path
15
16
  v-for="path in definition.paths"
@@ -38,6 +39,7 @@
38
39
  const {
39
40
  name
40
41
  } = defineProps<{
42
+ readonly ariaLabel?: string;
41
43
  readonly size?: number | string;
42
44
  readonly name?: FluxIconName;
43
45
  }>();
@@ -14,6 +14,7 @@
14
14
  <script
15
15
  setup
16
16
  lang="ts">
17
+ import type { VNode } from 'vue';
17
18
  import type { FluxIconName } from '@flux-ui/types';
18
19
  import FluxIcon from './FluxIcon.vue';
19
20
  import $style from '$flux/css/component/Info.module.scss';
@@ -23,6 +24,6 @@
23
24
  }>();
24
25
 
25
26
  defineSlots<{
26
- default(): any;
27
+ default(): VNode[];
27
28
  }>();
28
29
  </script>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <FluxStack
3
3
  direction="vertical"
4
- :gap="21">
4
+ :gap="18">
5
5
  <slot/>
6
6
  </FluxStack>
7
7
  </template>
@@ -9,9 +9,10 @@
9
9
  <script
10
10
  setup
11
11
  lang="ts">
12
+ import type { VNode } from 'vue';
12
13
  import FluxStack from './FluxStack.vue';
13
14
 
14
15
  defineSlots<{
15
- default(): any;
16
+ default(): VNode[];
16
17
  }>();
17
18
  </script>
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <div :class="$style.layerPane">
3
+ <slot/>
4
+ </div>
5
+ </template>
6
+
7
+ <script
8
+ lang="ts"
9
+ setup>
10
+ import type { VNode } from 'vue';
11
+ import $style from '$flux/css/component/LayerPane.module.scss';
12
+
13
+ defineSlots<{
14
+ default(): VNode[];
15
+ }>();
16
+ </script>
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <div :class="$style.layerPaneSecondary">
3
+ <slot/>
4
+ </div>
5
+ </template>
6
+
7
+ <script
8
+ lang="ts"
9
+ setup>
10
+ import type { VNode } from 'vue';
11
+ import $style from '$flux/css/component/LayerPane.module.scss';
12
+
13
+ defineSlots<{
14
+ default(): VNode[];
15
+ }>();
16
+ </script>
@@ -1,14 +1,14 @@
1
1
  <template>
2
2
  <div :class="direction === 'horizontal' ? $style.legendHorizontal : $style.legendVertical">
3
- <template v-for="item of items">
4
- <span
5
- :class="$style.legendItem"
6
- :style="{
7
- '--color': item.color
8
- }">
9
- {{ item.label }}
10
- </span>
11
- </template>
3
+ <span
4
+ v-for="(item, index) of items"
5
+ :key="index"
6
+ :class="$style.legendItem"
7
+ :style="{
8
+ '--color': item.color
9
+ }">
10
+ {{ item.label }}
11
+ </span>
12
12
  </div>
13
13
  </template>
14
14
 
@@ -12,7 +12,7 @@
12
12
  lang="ts"
13
13
  setup>
14
14
  import { useFocusZone } from '@flux-ui/internals';
15
- import { useTemplateRef } from 'vue';
15
+ import { useTemplateRef, type VNode } from 'vue';
16
16
  import $style from '$flux/css/component/Menu.module.scss';
17
17
 
18
18
  defineProps<{
@@ -20,7 +20,7 @@
20
20
  }>();
21
21
 
22
22
  defineSlots<{
23
- default(): any;
23
+ default(): VNode[];
24
24
  }>();
25
25
 
26
26
  const elementRef = useTemplateRef('element');
@@ -0,0 +1,187 @@
1
+ <template>
2
+ <div :class="isOpen ? $style.menuCollapsibleOpened : $style.menuCollapsible">
3
+ <FluxMenuItem
4
+ :disabled="disabled"
5
+ :href="href"
6
+ :icon-leading="iconLeading"
7
+ :icon-trailing="isOpen ? 'angle-down' : 'angle-right'"
8
+ :label="label"
9
+ :rel="rel"
10
+ :target="target"
11
+ :to="to"
12
+ :aria-expanded="isOpen"
13
+ :aria-controls="bodyId"
14
+ @click="onHeaderClick">
15
+ <template
16
+ v-if="slots.before"
17
+ #before>
18
+ <slot name="before"/>
19
+ </template>
20
+ </FluxMenuItem>
21
+
22
+ <FluxAutoHeightTransition>
23
+ <div
24
+ v-if="isOpen"
25
+ :id="bodyId"
26
+ :class="$style.menuCollapsibleBody"
27
+ role="group">
28
+ <div :class="$style.menuCollapsibleContent">
29
+ <slot/>
30
+ </div>
31
+ </div>
32
+ </FluxAutoHeightTransition>
33
+ </div>
34
+ </template>
35
+
36
+ <script
37
+ lang="ts"
38
+ setup>
39
+ import type { FluxIconName, FluxTo } from '@flux-ui/types';
40
+ import { flattenVNodeTree } from '@flux-ui/internals';
41
+ import { computed, getCurrentInstance, ref, useId, type VNode, watch } from 'vue';
42
+ import { FluxAutoHeightTransition } from '$flux/transition';
43
+ import FluxMenuItem from './FluxMenuItem.vue';
44
+ import $style from '$flux/css/component/Menu.module.scss';
45
+
46
+ type RouteRecordLike = {
47
+ readonly name?: string | symbol | null | undefined;
48
+ };
49
+
50
+ type RouteLike = {
51
+ readonly path: string;
52
+ readonly matched: readonly RouteRecordLike[];
53
+ };
54
+
55
+ type RouteAwareInstance = {
56
+ readonly $route?: RouteLike;
57
+ };
58
+
59
+ const emit = defineEmits<{
60
+ toggle: [boolean];
61
+ 'update:isOpened': [boolean];
62
+ }>();
63
+
64
+ const {
65
+ href,
66
+ isOpened,
67
+ to
68
+ } = defineProps<{
69
+ readonly disabled?: boolean;
70
+ readonly href?: string;
71
+ readonly iconLeading?: FluxIconName | null;
72
+ readonly isOpened?: boolean;
73
+ readonly label?: string;
74
+ readonly rel?: string;
75
+ readonly target?: string;
76
+ readonly to?: FluxTo;
77
+ }>();
78
+
79
+ const slots = defineSlots<{
80
+ default(): VNode[];
81
+ before(): VNode[];
82
+ }>();
83
+
84
+ const bodyId = useId();
85
+ const instance = getCurrentInstance();
86
+ const isOpen = ref(!!isOpened);
87
+ const route = computed<RouteLike | undefined>(() => (instance?.proxy as RouteAwareInstance | null)?.$route);
88
+
89
+ function open(): void {
90
+ if (isOpen.value) {
91
+ return;
92
+ }
93
+
94
+ isOpen.value = true;
95
+ emit('toggle', true);
96
+ emit('update:isOpened', true);
97
+ }
98
+
99
+ function close(): void {
100
+ if (!isOpen.value) {
101
+ return;
102
+ }
103
+
104
+ isOpen.value = false;
105
+ emit('toggle', false);
106
+ emit('update:isOpened', false);
107
+ }
108
+
109
+ function toggle(): void {
110
+ if (isOpen.value) {
111
+ close();
112
+ } else {
113
+ open();
114
+ }
115
+ }
116
+
117
+ function onHeaderClick(): void {
118
+ if (to || href) {
119
+ open();
120
+ } else {
121
+ toggle();
122
+ }
123
+ }
124
+
125
+ function matchesRoute(target: unknown, currentRoute: RouteLike | undefined): boolean {
126
+ if (!target || !currentRoute) {
127
+ return false;
128
+ }
129
+
130
+ if (typeof target === 'string') {
131
+ return currentRoute.path === target || currentRoute.path.startsWith(`${target}/`);
132
+ }
133
+
134
+ if (typeof target === 'object') {
135
+ const obj = target as Record<string, unknown>;
136
+
137
+ if (typeof obj.path === 'string') {
138
+ return currentRoute.path === obj.path || currentRoute.path.startsWith(`${obj.path}/`);
139
+ }
140
+
141
+ if (obj.name && Array.isArray(currentRoute.matched)) {
142
+ return currentRoute.matched.some(record => record.name === obj.name);
143
+ }
144
+ }
145
+
146
+ return false;
147
+ }
148
+
149
+ watch(() => isOpened, value => {
150
+ if (value === undefined) {
151
+ return;
152
+ }
153
+
154
+ if (value) {
155
+ open();
156
+ } else {
157
+ close();
158
+ }
159
+ });
160
+
161
+ watch(route, currentRoute => {
162
+ if (!currentRoute) {
163
+ return;
164
+ }
165
+
166
+ const vnodes = flattenVNodeTree(slots.default?.() ?? []);
167
+
168
+ for (const vnode of vnodes) {
169
+ const childTo = vnode.props?.to;
170
+ const childHref = vnode.props?.href;
171
+
172
+ if (matchesRoute(childTo, currentRoute) || matchesRoute(childHref, currentRoute)) {
173
+ open();
174
+ return;
175
+ }
176
+ }
177
+ }, {
178
+ immediate: true
179
+ });
180
+
181
+ defineExpose({
182
+ isOpen,
183
+ open,
184
+ close,
185
+ toggle
186
+ });
187
+ </script>
@@ -9,6 +9,7 @@
9
9
  <script
10
10
  lang="ts"
11
11
  setup>
12
+ import type { VNode } from 'vue';
12
13
  import $style from '$flux/css/component/Menu.module.scss';
13
14
 
14
15
  defineProps<{
@@ -16,6 +17,6 @@
16
17
  }>();
17
18
 
18
19
  defineSlots<{
19
- default(): any;
20
+ default(): VNode[];
20
21
  }>();
21
22
  </script>
@@ -33,6 +33,12 @@
33
33
  :alt="imageAlt ?? ''"/>
34
34
  </template>
35
35
 
36
+ <template
37
+ v-else-if="slots.before"
38
+ #iconLeading>
39
+ <slot name="before"/>
40
+ </template>
41
+
36
42
  <template
37
43
  v-if="command || commandIcon || commandLoading || slots.after"
38
44
  #after>
@@ -62,6 +68,7 @@
62
68
  <script
63
69
  lang="ts"
64
70
  setup>
71
+ import type { VNode } from 'vue';
65
72
  import type { FluxButtonEmits, FluxButtonProps, FluxIconName } from '@flux-ui/types';
66
73
  import FluxButton from './FluxButton.vue';
67
74
  import FluxIcon from './FluxIcon.vue';
@@ -71,7 +78,8 @@
71
78
  defineEmits<FluxButtonEmits>();
72
79
 
73
80
  const slots = defineSlots<{
74
- after(): any;
81
+ after(): VNode[];
82
+ before(): VNode[];
75
83
  }>();
76
84
 
77
85
  const {
@@ -25,7 +25,7 @@
25
25
  }>();
26
26
 
27
27
  const slots = defineSlots<{
28
- default(): any;
28
+ default(): VNode[];
29
29
  }>();
30
30
 
31
31
  const items = computed(() => flattenVNodeTree(slots.default())