@flux-ui/components 3.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/README.md +45 -0
  2. package/package.json +77 -0
  3. package/src/component/FluxAction.vue +27 -0
  4. package/src/component/FluxActionBar.vue +94 -0
  5. package/src/component/FluxActionPane.vue +40 -0
  6. package/src/component/FluxActions.vue +27 -0
  7. package/src/component/FluxAlert.vue +37 -0
  8. package/src/component/FluxAnimatedColors.vue +141 -0
  9. package/src/component/FluxAspectRatio.vue +21 -0
  10. package/src/component/FluxAutoGrid.vue +27 -0
  11. package/src/component/FluxAvatar.vue +119 -0
  12. package/src/component/FluxBadge.vue +84 -0
  13. package/src/component/FluxBadgeStack.vue +18 -0
  14. package/src/component/FluxBorderShine.vue +36 -0
  15. package/src/component/FluxBoxedIcon.vue +36 -0
  16. package/src/component/FluxButton.vue +110 -0
  17. package/src/component/FluxButtonGroup.vue +15 -0
  18. package/src/component/FluxButtonStack.vue +28 -0
  19. package/src/component/FluxCalendar.vue +254 -0
  20. package/src/component/FluxCalendarEvent.vue +41 -0
  21. package/src/component/FluxCheckbox.vue +60 -0
  22. package/src/component/FluxChip.vue +57 -0
  23. package/src/component/FluxClickablePane.vue +61 -0
  24. package/src/component/FluxColorPicker.vue +265 -0
  25. package/src/component/FluxColorSelect.vue +81 -0
  26. package/src/component/FluxComment.vue +71 -0
  27. package/src/component/FluxConfirm.vue +42 -0
  28. package/src/component/FluxContainer.vue +23 -0
  29. package/src/component/FluxDataTable.vue +96 -0
  30. package/src/component/FluxDatePicker.vue +353 -0
  31. package/src/component/FluxDestructiveButton.vue +28 -0
  32. package/src/component/FluxDisabled.vue +22 -0
  33. package/src/component/FluxDivider.vue +37 -0
  34. package/src/component/FluxDotPattern.vue +72 -0
  35. package/src/component/FluxDropZone.vue +202 -0
  36. package/src/component/FluxDynamicView.vue +16 -0
  37. package/src/component/FluxExpandable.vue +119 -0
  38. package/src/component/FluxExpandableGroup.vue +53 -0
  39. package/src/component/FluxFader.vue +64 -0
  40. package/src/component/FluxFaderItem.vue +15 -0
  41. package/src/component/FluxFilter.vue +133 -0
  42. package/src/component/FluxFilterDate.vue +58 -0
  43. package/src/component/FluxFilterDateRange.vue +59 -0
  44. package/src/component/FluxFilterOption.vue +49 -0
  45. package/src/component/FluxFilterOptionAsync.vue +103 -0
  46. package/src/component/FluxFilterOptions.vue +62 -0
  47. package/src/component/FluxFilterOptionsAsync.vue +113 -0
  48. package/src/component/FluxFilterRange.vue +91 -0
  49. package/src/component/FluxFlickeringGrid.vue +141 -0
  50. package/src/component/FluxFlyout.vue +205 -0
  51. package/src/component/FluxFocalPointEditor.vue +137 -0
  52. package/src/component/FluxFocalPointImage.vue +29 -0
  53. package/src/component/FluxForm.vue +35 -0
  54. package/src/component/FluxFormColumn.vue +15 -0
  55. package/src/component/FluxFormDateInput.vue +92 -0
  56. package/src/component/FluxFormDateRangeInput.vue +87 -0
  57. package/src/component/FluxFormDateTimeInput.vue +120 -0
  58. package/src/component/FluxFormField.vue +98 -0
  59. package/src/component/FluxFormFieldAddition.vue +37 -0
  60. package/src/component/FluxFormInput.vue +223 -0
  61. package/src/component/FluxFormInputAddition.vue +31 -0
  62. package/src/component/FluxFormInputGroup.vue +25 -0
  63. package/src/component/FluxFormPinInput.vue +135 -0
  64. package/src/component/FluxFormRangeSlider.vue +179 -0
  65. package/src/component/FluxFormRow.vue +15 -0
  66. package/src/component/FluxFormSection.vue +23 -0
  67. package/src/component/FluxFormSelect.vue +59 -0
  68. package/src/component/FluxFormSelectAsync.vue +118 -0
  69. package/src/component/FluxFormSlider.vue +123 -0
  70. package/src/component/FluxFormTextArea.vue +53 -0
  71. package/src/component/FluxFormTimeZonePicker.vue +713 -0
  72. package/src/component/FluxGallery.vue +99 -0
  73. package/src/component/FluxGalleryItem.vue +49 -0
  74. package/src/component/FluxGrid.vue +28 -0
  75. package/src/component/FluxGridColumn.vue +31 -0
  76. package/src/component/FluxGridPattern.vue +60 -0
  77. package/src/component/FluxIcon.vue +79 -0
  78. package/src/component/FluxInfo.vue +28 -0
  79. package/src/component/FluxInfoStack.vue +17 -0
  80. package/src/component/FluxLegend.vue +27 -0
  81. package/src/component/FluxLink.vue +35 -0
  82. package/src/component/FluxMenu.vue +31 -0
  83. package/src/component/FluxMenuGroup.vue +21 -0
  84. package/src/component/FluxMenuItem.vue +84 -0
  85. package/src/component/FluxMenuOptions.vue +38 -0
  86. package/src/component/FluxMenuSubHeader.vue +33 -0
  87. package/src/component/FluxMenuTitle.vue +17 -0
  88. package/src/component/FluxNotice.vue +79 -0
  89. package/src/component/FluxNoticeStack.vue +17 -0
  90. package/src/component/FluxOverlay.vue +31 -0
  91. package/src/component/FluxPagination.vue +148 -0
  92. package/src/component/FluxPaginationBar.vue +81 -0
  93. package/src/component/FluxPane.vue +45 -0
  94. package/src/component/FluxPaneBody.vue +15 -0
  95. package/src/component/FluxPaneDeck.vue +24 -0
  96. package/src/component/FluxPaneFooter.vue +15 -0
  97. package/src/component/FluxPaneGroup.vue +15 -0
  98. package/src/component/FluxPaneHeader.vue +44 -0
  99. package/src/component/FluxPaneIllustration.vue +68 -0
  100. package/src/component/FluxPaneMedia.vue +31 -0
  101. package/src/component/FluxPercentageBar.vue +45 -0
  102. package/src/component/FluxPersona.vue +48 -0
  103. package/src/component/FluxPlaceholder.vue +56 -0
  104. package/src/component/FluxPressable.vue +77 -0
  105. package/src/component/FluxPrimaryButton.vue +28 -0
  106. package/src/component/FluxProgressBar.vue +75 -0
  107. package/src/component/FluxPrompt.vue +77 -0
  108. package/src/component/FluxPublishButton.vue +59 -0
  109. package/src/component/FluxQuantitySelector.vue +109 -0
  110. package/src/component/FluxRemove.vue +34 -0
  111. package/src/component/FluxRoot.vue +60 -0
  112. package/src/component/FluxSecondaryButton.vue +28 -0
  113. package/src/component/FluxSegmentedControl.vue +77 -0
  114. package/src/component/FluxSegmentedView.vue +15 -0
  115. package/src/component/FluxSeparator.vue +19 -0
  116. package/src/component/FluxSlideOver.vue +25 -0
  117. package/src/component/FluxSnackbar.vue +154 -0
  118. package/src/component/FluxSnackbarProvider.vue +34 -0
  119. package/src/component/FluxSpacer.vue +9 -0
  120. package/src/component/FluxSpacing.vue +32 -0
  121. package/src/component/FluxSpinner.vue +48 -0
  122. package/src/component/FluxSplitButton.vue +61 -0
  123. package/src/component/FluxStack.vue +40 -0
  124. package/src/component/FluxStatistic.vue +68 -0
  125. package/src/component/FluxStepper.vue +69 -0
  126. package/src/component/FluxStepperStep.vue +15 -0
  127. package/src/component/FluxStepperSteps.vue +62 -0
  128. package/src/component/FluxTab.vue +23 -0
  129. package/src/component/FluxTabBar.vue +87 -0
  130. package/src/component/FluxTabBarItem.vue +104 -0
  131. package/src/component/FluxTable.vue +68 -0
  132. package/src/component/FluxTableActions.vue +16 -0
  133. package/src/component/FluxTableCell.vue +47 -0
  134. package/src/component/FluxTableHeader.vue +111 -0
  135. package/src/component/FluxTableRow.vue +15 -0
  136. package/src/component/FluxTabs.vue +91 -0
  137. package/src/component/FluxTag.vue +85 -0
  138. package/src/component/FluxTagStack.vue +18 -0
  139. package/src/component/FluxTicks.vue +44 -0
  140. package/src/component/FluxTimeline.vue +17 -0
  141. package/src/component/FluxTimelineItem.vue +73 -0
  142. package/src/component/FluxToggle.vue +64 -0
  143. package/src/component/FluxToolbar.vue +32 -0
  144. package/src/component/FluxToolbarGroup.vue +18 -0
  145. package/src/component/FluxTooltip.vue +56 -0
  146. package/src/component/FluxTooltipProvider.vue +176 -0
  147. package/src/component/FluxWindow.vue +47 -0
  148. package/src/component/index.ts +142 -0
  149. package/src/component/primitive/Anchor.vue +17 -0
  150. package/src/component/primitive/AnchorPopup.vue +194 -0
  151. package/src/component/primitive/CoordinatePicker.vue +155 -0
  152. package/src/component/primitive/CoordinatePickerThumb.vue +71 -0
  153. package/src/component/primitive/FilterItem.vue +44 -0
  154. package/src/component/primitive/FilterMenuRenderer.ts +233 -0
  155. package/src/component/primitive/FilterOptionBase.vue +67 -0
  156. package/src/component/primitive/SelectBase.vue +340 -0
  157. package/src/component/primitive/SliderBase.vue +89 -0
  158. package/src/component/primitive/SliderThumb.vue +64 -0
  159. package/src/component/primitive/SliderTrack.vue +22 -0
  160. package/src/component/primitive/VNodeRenderer.ts +11 -0
  161. package/src/component/primitive/index.ts +10 -0
  162. package/src/composable/index.ts +9 -0
  163. package/src/composable/private/index.ts +3 -0
  164. package/src/composable/private/useFormSelect.ts +66 -0
  165. package/src/composable/private/useLoaded.ts +21 -0
  166. package/src/composable/private/useTranslate.ts +35 -0
  167. package/src/composable/useBreakpoints.ts +54 -0
  168. package/src/composable/useDisabled.ts +9 -0
  169. package/src/composable/useDisabledInjection.ts +6 -0
  170. package/src/composable/useExpandableGroupInjection.ts +10 -0
  171. package/src/composable/useFilterInjection.ts +22 -0
  172. package/src/composable/useFlyoutInjection.ts +10 -0
  173. package/src/composable/useFormFieldInjection.ts +8 -0
  174. package/src/composable/useTableInjection.ts +11 -0
  175. package/src/css/base.scss +33 -0
  176. package/src/css/component/Action.module.scss +107 -0
  177. package/src/css/component/Avatar.module.scss +177 -0
  178. package/src/css/component/Badge.module.scss +189 -0
  179. package/src/css/component/Button.module.scss +293 -0
  180. package/src/css/component/Calendar.module.scss +171 -0
  181. package/src/css/component/Chip.module.scss +58 -0
  182. package/src/css/component/Color.module.scss +184 -0
  183. package/src/css/component/Comment.module.scss +123 -0
  184. package/src/css/component/DatePicker.module.scss +193 -0
  185. package/src/css/component/Divider.module.scss +79 -0
  186. package/src/css/component/DropZone.module.scss +99 -0
  187. package/src/css/component/Expandable.module.scss +112 -0
  188. package/src/css/component/Fader.module.scss +38 -0
  189. package/src/css/component/Filter.module.scss +80 -0
  190. package/src/css/component/Flyout.module.scss +63 -0
  191. package/src/css/component/FocalPoint.module.scss +84 -0
  192. package/src/css/component/Form.module.scss +812 -0
  193. package/src/css/component/Gallery.module.scss +64 -0
  194. package/src/css/component/Grid.module.scss +24 -0
  195. package/src/css/component/Icon.module.scss +104 -0
  196. package/src/css/component/Info.module.scss +15 -0
  197. package/src/css/component/Layout.module.scss +63 -0
  198. package/src/css/component/Legend.module.scss +32 -0
  199. package/src/css/component/Menu.module.scss +314 -0
  200. package/src/css/component/Notice.module.scss +279 -0
  201. package/src/css/component/Overlay.module.scss +149 -0
  202. package/src/css/component/Pagination.module.scss +59 -0
  203. package/src/css/component/Pane.module.scss +218 -0
  204. package/src/css/component/PercentageBar.module.scss +31 -0
  205. package/src/css/component/Placeholder.module.scss +72 -0
  206. package/src/css/component/Progress.module.scss +84 -0
  207. package/src/css/component/Remove.module.scss +29 -0
  208. package/src/css/component/Root.module.scss +8 -0
  209. package/src/css/component/SegmentedControl.module.scss +82 -0
  210. package/src/css/component/Snackbar.module.scss +227 -0
  211. package/src/css/component/Spinner.module.scss +36 -0
  212. package/src/css/component/Statistic.module.scss +118 -0
  213. package/src/css/component/Stepper.module.scss +103 -0
  214. package/src/css/component/Tab.module.scss +162 -0
  215. package/src/css/component/Table.module.scss +164 -0
  216. package/src/css/component/Timeline.module.scss +173 -0
  217. package/src/css/component/Toolbar.module.scss +82 -0
  218. package/src/css/component/Tooltip.module.scss +62 -0
  219. package/src/css/component/Transition.module.scss +142 -0
  220. package/src/css/component/Visual.module.scss +70 -0
  221. package/src/css/component/base/Button.module.scss +87 -0
  222. package/src/css/component/base/Effect.module.scss +139 -0
  223. package/src/css/component/base/Grid.module.scss +8 -0
  224. package/src/css/component/base/Pane.module.scss +54 -0
  225. package/src/css/component/primitive/CoordinatePicker.module.scss +24 -0
  226. package/src/css/component/primitive/Slider.module.scss +116 -0
  227. package/src/css/index.scss +5 -0
  228. package/src/css/layers.scss +1 -0
  229. package/src/css/mixin/breakpoints.scss +112 -0
  230. package/src/css/mixin/focus-ring.scss +56 -0
  231. package/src/css/mixin/hover.scss +7 -0
  232. package/src/css/mixin/index.scss +3 -0
  233. package/src/css/reset.scss +169 -0
  234. package/src/css/typography.scss +87 -0
  235. package/src/css/variables.scss +214 -0
  236. package/src/data/di.ts +42 -0
  237. package/src/data/filter.ts +9 -0
  238. package/src/data/helper.ts +9 -0
  239. package/src/data/i18n.ts +55 -0
  240. package/src/data/iconRegistry.ts +21 -0
  241. package/src/data/index.ts +8 -0
  242. package/src/data/inputMask.ts +34 -0
  243. package/src/data/store.ts +233 -0
  244. package/src/image/avatar-mask.svg +3 -0
  245. package/src/index.ts +25 -0
  246. package/src/transition/FluxAutoHeightTransition.vue +59 -0
  247. package/src/transition/FluxAutoWidthTransition.vue +59 -0
  248. package/src/transition/FluxBreakthroughTransition.vue +23 -0
  249. package/src/transition/FluxFadeTransition.vue +24 -0
  250. package/src/transition/FluxOverlayTransition.vue +22 -0
  251. package/src/transition/FluxRouteTransition.vue +23 -0
  252. package/src/transition/FluxSlideOverTransition.vue +22 -0
  253. package/src/transition/FluxTooltipTransition.vue +22 -0
  254. package/src/transition/FluxVerticalWindowTransition.vue +23 -0
  255. package/src/transition/FluxWindowTransition.vue +23 -0
  256. package/src/transition/index.ts +10 -0
  257. package/src/util/createDialogRenderer.ts +64 -0
  258. package/src/util/createLabelForDateRange.ts +61 -0
  259. package/src/util/index.ts +2 -0
  260. package/src/vite.d.ts +13 -0
  261. package/tsconfig.json +45 -0
@@ -0,0 +1,142 @@
1
+ export { default as FluxAction } from './FluxAction.vue';
2
+ export { default as FluxActionBar } from './FluxActionBar.vue';
3
+ export { default as FluxActionPane } from './FluxActionPane.vue';
4
+ export { default as FluxActions } from './FluxActions.vue';
5
+ export { default as FluxAnimatedColors } from './FluxAnimatedColors.vue';
6
+ export { default as FluxAspectRatio } from './FluxAspectRatio.vue';
7
+ export { default as FluxAutoGrid } from './FluxAutoGrid.vue';
8
+ export { default as FluxAvatar } from './FluxAvatar.vue';
9
+ export { default as FluxBadge } from './FluxBadge.vue';
10
+ export { default as FluxBadgeStack } from './FluxBadgeStack.vue';
11
+ export { default as FluxBorderShine } from './FluxBorderShine.vue';
12
+ export { default as FluxBoxedIcon } from './FluxBoxedIcon.vue';
13
+ export { default as FluxButton } from './FluxButton.vue';
14
+ export { default as FluxButtonGroup } from './FluxButtonGroup.vue';
15
+ export { default as FluxButtonStack } from './FluxButtonStack.vue';
16
+ export { default as FluxCalendar } from './FluxCalendar.vue';
17
+ export { default as FluxCalendarEvent } from './FluxCalendarEvent.vue';
18
+ export { default as FluxCheckbox } from './FluxCheckbox.vue';
19
+ export { default as FluxChip } from './FluxChip.vue';
20
+ export { default as FluxClickablePane } from './FluxClickablePane.vue';
21
+ export { default as FluxComment } from './FluxComment.vue';
22
+ export { default as FluxColorPicker } from './FluxColorPicker.vue';
23
+ export { default as FluxColorSelect } from './FluxColorSelect.vue';
24
+ export { default as FluxContainer } from './FluxContainer.vue';
25
+ export { default as FluxDataTable } from './FluxDataTable.vue';
26
+ export { default as FluxDatePicker } from './FluxDatePicker.vue';
27
+ export { default as FluxDestructiveButton } from './FluxDestructiveButton.vue';
28
+ export { default as FluxDisabled } from './FluxDisabled.vue';
29
+ export { default as FluxDivider } from './FluxDivider.vue';
30
+ export { default as FluxDotPattern } from './FluxDotPattern.vue';
31
+ export { default as FluxDropZone } from './FluxDropZone.vue';
32
+ export { default as FluxDynamicView } from './FluxDynamicView.vue';
33
+ export { default as FluxExpandable } from './FluxExpandable.vue';
34
+ export { default as FluxExpandableGroup } from './FluxExpandableGroup.vue';
35
+ export { default as FluxFader } from './FluxFader.vue';
36
+ export { default as FluxFaderItem } from './FluxFaderItem.vue';
37
+ export { default as FluxFilter } from './FluxFilter.vue';
38
+ export { default as FluxFilterDate } from './FluxFilterDate.vue';
39
+ export { default as FluxFilterDateRange } from './FluxFilterDateRange.vue';
40
+ export { default as FluxFilterOption } from './FluxFilterOption.vue';
41
+ export { default as FluxFilterOptionAsync } from './FluxFilterOptionAsync.vue';
42
+ export { default as FluxFilterOptions } from './FluxFilterOptions.vue';
43
+ export { default as FluxFilterOptionsAsync } from './FluxFilterOptionsAsync.vue';
44
+ export { default as FluxFilterRange } from './FluxFilterRange.vue';
45
+ export { default as FluxFlickeringGrid } from './FluxFlickeringGrid.vue';
46
+ export { default as FluxFlyout } from './FluxFlyout.vue';
47
+ export { default as FluxFocalPointEditor } from './FluxFocalPointEditor.vue';
48
+ export { default as FluxFocalPointImage } from './FluxFocalPointImage.vue';
49
+ export { default as FluxForm } from './FluxForm.vue';
50
+ export { default as FluxFormColumn } from './FluxFormColumn.vue';
51
+ export { default as FluxFormDateInput } from './FluxFormDateInput.vue';
52
+ export { default as FluxFormDateRangeInput } from './FluxFormDateRangeInput.vue';
53
+ export { default as FluxFormDateTimeInput } from './FluxFormDateTimeInput.vue';
54
+ export { default as FluxFormField } from './FluxFormField.vue';
55
+ export { default as FluxFormFieldAddition } from './FluxFormFieldAddition.vue';
56
+ export { default as FluxFormInput } from './FluxFormInput.vue';
57
+ export { default as FluxFormInputAddition } from './FluxFormInputAddition.vue';
58
+ export { default as FluxFormInputGroup } from './FluxFormInputGroup.vue';
59
+ export { default as FluxFormPinInput } from './FluxFormPinInput.vue';
60
+ export { default as FluxFormRangeSlider } from './FluxFormRangeSlider.vue';
61
+ export { default as FluxFormRow } from './FluxFormRow.vue';
62
+ export { default as FluxFormSection } from './FluxFormSection.vue';
63
+ export { default as FluxFormSelect } from './FluxFormSelect.vue';
64
+ export { default as FluxFormSelectAsync } from './FluxFormSelectAsync.vue';
65
+ export { default as FluxFormSlider } from './FluxFormSlider.vue';
66
+ export { default as FluxFormTextArea } from './FluxFormTextArea.vue';
67
+ export { default as FluxFormTimeZonePicker } from './FluxFormTimeZonePicker.vue';
68
+ export { default as FluxGallery } from './FluxGallery.vue';
69
+ export { default as FluxGalleryItem } from './FluxGalleryItem.vue';
70
+ export { default as FluxGrid } from './FluxGrid.vue';
71
+ export { default as FluxGridColumn } from './FluxGridColumn.vue';
72
+ export { default as FluxGridPattern } from './FluxGridPattern.vue';
73
+ export { default as FluxIcon } from './FluxIcon.vue';
74
+ export { default as FluxInfo } from './FluxInfo.vue';
75
+ export { default as FluxInfoStack } from './FluxInfoStack.vue';
76
+ export { default as FluxLegend } from './FluxLegend.vue';
77
+ export { default as FluxLink } from './FluxLink.vue';
78
+ export { default as FluxMenu } from './FluxMenu.vue';
79
+ export { default as FluxMenuGroup } from './FluxMenuGroup.vue';
80
+ export { default as FluxMenuItem } from './FluxMenuItem.vue';
81
+ export { default as FluxMenuOptions } from './FluxMenuOptions.vue';
82
+ export { default as FluxMenuSubHeader } from './FluxMenuSubHeader.vue';
83
+ export { default as FluxMenuTitle } from './FluxMenuTitle.vue';
84
+ export { default as FluxNotice } from './FluxNotice.vue';
85
+ export { default as FluxNoticeStack } from './FluxNoticeStack.vue';
86
+ export { default as FluxOverlay } from './FluxOverlay.vue';
87
+ export { default as FluxPagination } from './FluxPagination.vue';
88
+ export { default as FluxPaginationBar } from './FluxPaginationBar.vue';
89
+ export { default as FluxPane } from './FluxPane.vue';
90
+ export { default as FluxPaneBody } from './FluxPaneBody.vue';
91
+ export { default as FluxPaneDeck } from './FluxPaneDeck.vue';
92
+ export { default as FluxPaneFooter } from './FluxPaneFooter.vue';
93
+ export { default as FluxPaneGroup } from './FluxPaneGroup.vue';
94
+ export { default as FluxPaneHeader } from './FluxPaneHeader.vue';
95
+ export { default as FluxPaneIllustration } from './FluxPaneIllustration.vue';
96
+ export { default as FluxPaneMedia } from './FluxPaneMedia.vue';
97
+ export { default as FluxPercentageBar } from './FluxPercentageBar.vue';
98
+ export { default as FluxPersona } from './FluxPersona.vue';
99
+ export { default as FluxPlaceholder } from './FluxPlaceholder.vue';
100
+ export { default as FluxPressable } from './FluxPressable.vue';
101
+ export { default as FluxPrimaryButton } from './FluxPrimaryButton.vue';
102
+ export { default as FluxProgressBar } from './FluxProgressBar.vue';
103
+ export { default as FluxPublishButton } from './FluxPublishButton.vue';
104
+ export { default as FluxQuantitySelector } from './FluxQuantitySelector.vue';
105
+ export { default as FluxRemove } from './FluxRemove.vue';
106
+ export { default as FluxRoot } from './FluxRoot.vue';
107
+ export { default as FluxSecondaryButton } from './FluxSecondaryButton.vue';
108
+ export { default as FluxSegmentedControl } from './FluxSegmentedControl.vue';
109
+ export { default as FluxSegmentedView } from './FluxSegmentedView.vue';
110
+ export { default as FluxSeparator } from './FluxSeparator.vue';
111
+ export { default as FluxSlideOver } from './FluxSlideOver.vue';
112
+ export { default as FluxSnackbar } from './FluxSnackbar.vue';
113
+ export { default as FluxSnackbarProvider } from './FluxSnackbarProvider.vue';
114
+ export { default as FluxSpacer } from './FluxSpacer.vue';
115
+ export { default as FluxSpacing } from './FluxSpacing.vue';
116
+ export { default as FluxSpinner } from './FluxSpinner.vue';
117
+ export { default as FluxSplitButton } from './FluxSplitButton.vue';
118
+ export { default as FluxStack } from './FluxStack.vue';
119
+ export { default as FluxStatistic } from './FluxStatistic.vue';
120
+ export { default as FluxStepper } from './FluxStepper.vue';
121
+ export { default as FluxStepperStep } from './FluxStepperStep.vue';
122
+ export { default as FluxStepperSteps } from './FluxStepperSteps.vue';
123
+ export { default as FluxTab } from './FluxTab.vue';
124
+ export { default as FluxTabBar } from './FluxTabBar.vue';
125
+ export { default as FluxTabBarItem } from './FluxTabBarItem.vue';
126
+ export { default as FluxTabs } from './FluxTabs.vue';
127
+ export { default as FluxTable } from './FluxTable.vue';
128
+ export { default as FluxTableActions } from './FluxTableActions.vue';
129
+ export { default as FluxTableCell } from './FluxTableCell.vue';
130
+ export { default as FluxTableHeader } from './FluxTableHeader.vue';
131
+ export { default as FluxTableRow } from './FluxTableRow.vue';
132
+ export { default as FluxTag } from './FluxTag.vue';
133
+ export { default as FluxTagStack } from './FluxTagStack.vue';
134
+ export { default as FluxTicks } from './FluxTicks.vue';
135
+ export { default as FluxTimeline } from './FluxTimeline.vue';
136
+ export { default as FluxTimelineItem } from './FluxTimelineItem.vue';
137
+ export { default as FluxToggle } from './FluxToggle.vue';
138
+ export { default as FluxToolbar } from './FluxToolbar.vue';
139
+ export { default as FluxToolbarGroup } from './FluxToolbarGroup.vue';
140
+ export { default as FluxTooltip } from './FluxTooltip.vue';
141
+ export { default as FluxTooltipProvider } from './FluxTooltipProvider.vue';
142
+ export { default as FluxWindow } from './FluxWindow.vue';
@@ -0,0 +1,17 @@
1
+ <template>
2
+ <component :is="tagName">
3
+ <slot/>
4
+ </component>
5
+ </template>
6
+
7
+ <script
8
+ lang="ts"
9
+ setup>
10
+ defineProps<{
11
+ readonly tagName: keyof HTMLElementTagNameMap;
12
+ }>();
13
+
14
+ defineSlots<{
15
+ default(): any;
16
+ }>();
17
+ </script>
@@ -0,0 +1,194 @@
1
+ <template>
2
+ <div
3
+ ref="popup"
4
+ :style="{
5
+ '--x': `${state.x}px`,
6
+ '--y': `${state.y}px`,
7
+ '--width': state.width ? `${state.width}px` : undefined
8
+ }">
9
+ <slot/>
10
+ </div>
11
+ </template>
12
+
13
+ <script
14
+ lang="ts"
15
+ setup>
16
+ import { isHtmlElement } from '@basmilius/utils';
17
+ import { useMutationObserver } from '@flux-ui/internals';
18
+ import type { FluxDirection } from '@flux-ui/types';
19
+ import { ComponentPublicInstance, onMounted, onUnmounted, reactive, ref, unref, useTemplateRef, watchEffect } from 'vue';
20
+
21
+ const {
22
+ anchor,
23
+ direction = 'vertical',
24
+ margin = 12,
25
+ position,
26
+ useAnchorWidth
27
+ } = defineProps<{
28
+ readonly anchor?: ComponentPublicInstance | HTMLElement | null;
29
+ readonly direction?: FluxDirection;
30
+ readonly margin?: number;
31
+ readonly position?:
32
+ | 'top' | 'top-left' | 'top-right'
33
+ | 'left' | 'left-top' | 'left-bottom'
34
+ | 'right' | 'right-top' | 'right-bottom'
35
+ | 'bottom' | 'bottom-left' | 'bottom-right';
36
+ readonly useAnchorWidth?: boolean;
37
+ }>();
38
+
39
+ defineSlots<{
40
+ default(): any;
41
+ }>();
42
+
43
+ const anchorRef = ref<HTMLElement>();
44
+ const popupRef = useTemplateRef('popup');
45
+
46
+ const state = reactive({
47
+ x: 0,
48
+ y: 0,
49
+ width: null as number | null
50
+ });
51
+
52
+ onMounted(() => {
53
+ window.addEventListener('resize', onResize, {passive: true});
54
+ window.addEventListener('scroll', onScroll, {capture: true, passive: true});
55
+ });
56
+
57
+ onUnmounted(() => {
58
+ window.removeEventListener('resize', onResize);
59
+ window.removeEventListener('scroll', onScroll);
60
+ });
61
+
62
+ useMutationObserver(popupRef, () => {
63
+ reposition();
64
+ }, {childList: true, subtree: true});
65
+
66
+ function reposition(): void {
67
+ const anchor = unref(anchorRef);
68
+ const popup = unref(popupRef);
69
+
70
+ if (!anchor || !popup) {
71
+ return;
72
+ }
73
+
74
+ const {x, y, height, width} = anchor.getBoundingClientRect();
75
+ const {height: popupHeight, width: popupWidth} = popup.getBoundingClientRect();
76
+
77
+ let px: number,
78
+ py: number;
79
+
80
+ switch (position) {
81
+ case 'top':
82
+ px = x + width / 2 - popupWidth / 2;
83
+ py = y - popupHeight - margin;
84
+ break;
85
+
86
+ case 'top-left':
87
+ px = x;
88
+ py = y - popupHeight - margin;
89
+ break;
90
+
91
+ case 'top-right':
92
+ px = x - popupWidth + width;
93
+ py = y - popupHeight - margin;
94
+ break;
95
+
96
+ case 'left':
97
+ px = x - popupWidth - margin;
98
+ py = y + height / 2 - popupHeight / 2;
99
+ break;
100
+
101
+ case 'left-top':
102
+ px = x - popupWidth - margin;
103
+ py = y;
104
+ break;
105
+
106
+ case 'left-bottom':
107
+ px = x - popupWidth - margin;
108
+ py = y + height - popupHeight;
109
+ break;
110
+
111
+ case 'right':
112
+ px = x + width + margin;
113
+ py = y + height / 2 - popupHeight / 2;
114
+ break;
115
+
116
+ case 'right-top':
117
+ px = x + width + margin;
118
+ py = y;
119
+ break;
120
+
121
+ case 'right-bottom':
122
+ px = x + width + margin;
123
+ py = y + height - popupHeight;
124
+ break;
125
+
126
+ case 'bottom':
127
+ px = x + width / 2 - popupWidth / 2;
128
+ py = y + height + margin;
129
+ break;
130
+
131
+ case 'bottom-left':
132
+ px = x;
133
+ py = y + height + margin;
134
+ break;
135
+
136
+ case 'bottom-right':
137
+ px = x - popupWidth + width;
138
+ py = y + height + margin;
139
+ break;
140
+
141
+ default:
142
+ if (direction === 'horizontal') {
143
+ px = x + width + margin;
144
+ py = y + height / 2 - popupHeight / 2;
145
+
146
+ if (px + popupWidth > innerWidth) {
147
+ px = x - popupWidth - margin;
148
+ }
149
+ } else {
150
+ px = x + width / 2 - popupWidth / 2;
151
+ py = y + height + margin;
152
+
153
+ if (py + popupHeight > innerHeight) {
154
+ py = y - popupHeight - margin;
155
+ }
156
+ }
157
+ break;
158
+ }
159
+
160
+ state.x = px;
161
+ state.y = py;
162
+ }
163
+
164
+ function resize(): void {
165
+ const anchor = unref(anchorRef);
166
+
167
+ if (!anchor) {
168
+ return;
169
+ }
170
+
171
+ const {width} = anchor.getBoundingClientRect();
172
+ state.width = useAnchorWidth ? width : null;
173
+ }
174
+
175
+ function onResize(): void {
176
+ resize();
177
+ reposition();
178
+ }
179
+
180
+ function onScroll(): void {
181
+ reposition();
182
+ }
183
+
184
+ watchEffect(() => {
185
+ if (!anchor || (!isHtmlElement(anchor) && !anchor.$el)) {
186
+ return;
187
+ }
188
+
189
+ anchorRef.value = isHtmlElement(anchor) ? anchor : anchor.$el;
190
+
191
+ requestAnimationFrame(resize);
192
+ requestAnimationFrame(reposition);
193
+ });
194
+ </script>
@@ -0,0 +1,155 @@
1
+ <template>
2
+ <div
3
+ ref="root"
4
+ :class="$style.coordinatePicker"
5
+ role="slider"
6
+ :aria-disabled="disabled ? true : undefined"
7
+ @pointerdown="onPointerDown">
8
+ <CoordinatePickerThumb
9
+ :disabled="disabled"
10
+ :is-dragging="isDragging"
11
+ :position="thumbPosition"
12
+ @decrement="onDecrement"
13
+ @increment="onIncrement"/>
14
+ </div>
15
+ </template>
16
+
17
+ <script
18
+ lang="ts"
19
+ setup>
20
+ import { roundStep } from '@basmilius/utils';
21
+ import { unrefTemplateElement } from '@flux-ui/internals';
22
+ import { computed, onMounted, onUnmounted, ref, toRef, unref, useTemplateRef, watch } from 'vue';
23
+ import { useDisabled } from '$flux/composable';
24
+ import CoordinatePickerThumb from './CoordinatePickerThumb.vue';
25
+ import $style from '$flux/css/component/primitive/CoordinatePicker.module.scss';
26
+
27
+ const emit = defineEmits<{
28
+ dragging: [boolean];
29
+ }>();
30
+
31
+ const modelValue = defineModel<[number, number]>({
32
+ default: [0, 0]
33
+ });
34
+
35
+ const {
36
+ disabled: componentDisabled,
37
+ max: maxProp = 100,
38
+ min: minProp = 0,
39
+ step: stepProp = 1
40
+ } = defineProps<{
41
+ readonly disabled?: boolean;
42
+ readonly max?: number | [number, number];
43
+ readonly min?: number | [number, number];
44
+ readonly step?: number | [number, number];
45
+ }>();
46
+
47
+ const disabled = useDisabled(toRef(() => componentDisabled));
48
+ const rootRef = useTemplateRef('root');
49
+
50
+ const isDragging = ref(false);
51
+
52
+ const max = computed(() => Array.isArray(maxProp) ? maxProp : [maxProp, maxProp]);
53
+ const min = computed(() => Array.isArray(minProp) ? minProp : [minProp, minProp]);
54
+ const step = computed(() => Array.isArray(stepProp) ? stepProp : [stepProp, stepProp]);
55
+
56
+ const thumbPosition = computed<[number, number]>(() => [
57
+ (unref(modelValue)[0] - unref(min)[0]) / (unref(max)[0] - unref(min)[0]),
58
+ (unref(modelValue)[1] - unref(min)[1]) / (unref(max)[1] - unref(min)[1])
59
+ ]);
60
+
61
+ onMounted(() => {
62
+ document.addEventListener('pointermove', onPointerMove);
63
+ document.addEventListener('pointerup', onPointerUp, {passive: true});
64
+ });
65
+
66
+ onUnmounted(() => {
67
+ document.removeEventListener('pointermove', onPointerMove);
68
+ document.removeEventListener('pointerup', onPointerUp);
69
+ });
70
+
71
+ function onDecrement(x: boolean, y: boolean): void {
72
+ if (unref(disabled)) {
73
+ return;
74
+ }
75
+
76
+ let [valueX, valueY] = unref(modelValue);
77
+ const [maxX, maxY] = unref(max);
78
+ const [minX, minY] = unref(min);
79
+ const [stepX, stepY] = unref(step);
80
+
81
+ if (x) {
82
+ valueX = +roundStep(Math.max(minX, Math.min(maxX, valueX - stepX)), stepX).toPrecision(4);
83
+ }
84
+
85
+ if (y) {
86
+ valueY = +roundStep(Math.max(minY, Math.min(maxY, valueY - stepY)), stepY).toPrecision(4);
87
+ }
88
+
89
+ modelValue.value = [valueX, valueY];
90
+ }
91
+
92
+ function onIncrement(x: boolean, y: boolean): void {
93
+ if (unref(disabled)) {
94
+ return;
95
+ }
96
+
97
+ let [valueX, valueY] = unref(modelValue);
98
+ const [maxX, maxY] = unref(max);
99
+ const [minX, minY] = unref(min);
100
+ const [stepX, stepY] = unref(step);
101
+
102
+ if (x) {
103
+ valueX = +roundStep(Math.max(minX, Math.min(maxX, valueX + stepX)), stepX).toPrecision(4);
104
+ }
105
+
106
+ if (y) {
107
+ valueY = +roundStep(Math.max(minY, Math.min(maxY, valueY + stepY)), stepY).toPrecision(4);
108
+ }
109
+
110
+ modelValue.value = [valueX, valueY];
111
+ }
112
+
113
+ function onPointerDown(evt: PointerEvent): void {
114
+ if (unref(disabled)) {
115
+ return;
116
+ }
117
+
118
+ isDragging.value = true;
119
+ requestAnimationFrame(() => onPointerMove(evt));
120
+ }
121
+
122
+ function onPointerMove(evt: PointerEvent): void {
123
+ const root = unrefTemplateElement(rootRef);
124
+
125
+ if (!unref(isDragging) || !root) {
126
+ return;
127
+ }
128
+
129
+ const [maxX, maxY] = unref(max);
130
+ const [minX, minY] = unref(min);
131
+ const [stepX, stepY] = unref(step);
132
+
133
+ let {top, left, width, height} = root.getBoundingClientRect();
134
+ top += 6;
135
+ left += 6;
136
+ width -= 12;
137
+ height -= 12;
138
+
139
+ const x = Math.max(0, Math.min(1, (evt.clientX - left) / width));
140
+ const y = Math.max(0, Math.min(1, (evt.clientY - top) / height));
141
+
142
+ modelValue.value = [
143
+ +roundStep(x * (maxX - minX) + minX, stepX).toPrecision(4),
144
+ +roundStep(y * (maxY - minY) + minY, stepY).toPrecision(4)
145
+ ];
146
+
147
+ evt.preventDefault();
148
+ }
149
+
150
+ function onPointerUp(): void {
151
+ isDragging.value = false;
152
+ }
153
+
154
+ watch(isDragging, isDragging => emit('dragging', isDragging));
155
+ </script>
@@ -0,0 +1,71 @@
1
+ <template>
2
+ <button
3
+ :class="clsx(
4
+ $style.coordinatePickerThumb,
5
+ disabled && $style.isDisabled,
6
+ isDragging && $style.isDragging
7
+ )"
8
+ :style="{
9
+ top: `${position[1] * 100}%`,
10
+ left: `${position[0] * 100}%`
11
+ }"
12
+ :aria-disabled="disabled ? true : undefined"
13
+ :tabindex="disabled ? -1 : 0"
14
+ type="button"
15
+ @keydown="onKeyDown"
16
+ @pointerdown="$emit('grab', $event)"/>
17
+ </template>
18
+
19
+ <script
20
+ lang="ts"
21
+ setup>
22
+ import { clsx } from 'clsx';
23
+ import { toRef, unref } from 'vue';
24
+ import { useDisabled } from '$flux/composable';
25
+ import $style from '$flux/css/component/primitive/CoordinatePicker.module.scss';
26
+
27
+ const emit = defineEmits<{
28
+ decrement: [boolean, boolean];
29
+ grab: [PointerEvent];
30
+ increment: [boolean, boolean];
31
+ }>();
32
+
33
+ const {
34
+ disabled: componentDisabled
35
+ } = defineProps<{
36
+ readonly disabled?: boolean;
37
+ readonly isDragging?: boolean;
38
+ readonly position: [number, number];
39
+ }>();
40
+
41
+ const disabled = useDisabled(toRef(() => componentDisabled));
42
+
43
+ function onKeyDown(evt: KeyboardEvent): void {
44
+ if (unref(disabled)) {
45
+ return;
46
+ }
47
+
48
+ switch (evt.key) {
49
+ case 'ArrowUp':
50
+ emit('decrement', false, true);
51
+ break;
52
+
53
+ case 'ArrowDown':
54
+ emit('increment', false, true);
55
+ break;
56
+
57
+ case 'ArrowLeft':
58
+ emit('decrement', true, false);
59
+ break;
60
+
61
+ case 'ArrowRight':
62
+ emit('increment', true, false);
63
+ break;
64
+
65
+ default:
66
+ return;
67
+ }
68
+
69
+ evt.preventDefault();
70
+ }
71
+ </script>
@@ -0,0 +1,44 @@
1
+ <template>
2
+ <FluxMenuItem
3
+ :command="valueLabel"
4
+ command-icon="angle-right"
5
+ :command-loading="isLoading"
6
+ :icon-leading="item.icon"
7
+ :label="item.label"
8
+ type="button"
9
+ @click="onClick"/>
10
+ </template>
11
+
12
+ <script
13
+ lang="ts"
14
+ setup>
15
+ import type { FluxFilterItem, FluxFilterValue } from '@flux-ui/types';
16
+ import { computed, ref, unref, watch } from 'vue';
17
+ import { useLoaded } from '$flux/composable/private';
18
+ import FluxMenuItem from '$flux/component/FluxMenuItem.vue';
19
+
20
+ const emit = defineEmits<{
21
+ click: [MouseEvent];
22
+ }>();
23
+
24
+ const {
25
+ item,
26
+ value
27
+ } = defineProps<{
28
+ readonly item: FluxFilterItem;
29
+ readonly value: FluxFilterValue;
30
+ }>();
31
+
32
+ const {isLoading, loaded} = useLoaded();
33
+ const getValueLabel = computed(() => loaded(item.getValueLabel));
34
+
35
+ const valueLabel = ref<string>();
36
+
37
+ function onClick(evt: MouseEvent): void {
38
+ emit('click', evt);
39
+ }
40
+
41
+ watch(() => item, async () => {
42
+ valueLabel.value = await unref(getValueLabel)(value) ?? undefined;
43
+ }, {deep: true, immediate: true});
44
+ </script>