@flux-ui/components 3.0.0-next.58 → 3.0.0-next.59

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 (301) hide show
  1. package/dist/component/FluxButtonStack.vue.d.ts +1 -1
  2. package/dist/component/FluxCalendar.vue.d.ts +63 -2
  3. package/dist/component/{FluxCalendarEvent.vue.d.ts → FluxCalendarItem.vue.d.ts} +9 -7
  4. package/dist/component/FluxClickablePane.vue.d.ts +1 -1
  5. package/dist/component/FluxDivider.vue.d.ts +1 -1
  6. package/dist/component/FluxFilter.vue.d.ts +1 -1
  7. package/dist/component/FluxFilterBar.vue.d.ts +1 -1
  8. package/dist/component/FluxFormInput.vue.d.ts +2 -2
  9. package/dist/component/FluxFormInputAddition.vue.d.ts +1 -1
  10. package/dist/component/FluxFormTreeViewSelect.vue.d.ts +3 -3
  11. package/dist/component/FluxGallery.vue.d.ts +1 -1
  12. package/dist/component/FluxInfo.vue.d.ts +1 -1
  13. package/dist/component/FluxKanbanColumn.vue.d.ts +2 -2
  14. package/dist/component/{FluxKanbanCard.vue.d.ts → FluxKanbanItem.vue.d.ts} +1 -1
  15. package/dist/component/FluxMenuItem.vue.d.ts +1 -1
  16. package/dist/component/FluxNotice.vue.d.ts +1 -1
  17. package/dist/component/FluxPaneHeader.vue.d.ts +1 -1
  18. package/dist/component/FluxPressable.vue.d.ts +1 -1
  19. package/dist/component/FluxPrompt.vue.d.ts +3 -3
  20. package/dist/component/FluxSplitButton.vue.d.ts +1 -1
  21. package/dist/component/FluxStack.vue.d.ts +1 -1
  22. package/dist/component/FluxTab.vue.d.ts +1 -1
  23. package/dist/component/FluxTabBar.vue.d.ts +4 -1
  24. package/dist/component/FluxTabs.vue.d.ts +4 -1
  25. package/dist/component/FluxTimelineItem.vue.d.ts +1 -1
  26. package/dist/component/calendar/FluxCalendarItemDisplay.vue.d.ts +9 -0
  27. package/dist/component/calendar/FluxCalendarMonthView.vue.d.ts +19 -0
  28. package/dist/component/calendar/FluxCalendarTimeGridView.vue.d.ts +36 -0
  29. package/dist/component/calendar/index.d.ts +3 -0
  30. package/dist/component/index.d.ts +2 -2
  31. package/dist/component/primitive/DialogLayout.vue.d.ts +1 -1
  32. package/dist/component/primitive/SelectBase.vue.d.ts +3 -3
  33. package/dist/composable/index.d.ts +3 -0
  34. package/dist/composable/private/index.d.ts +5 -8
  35. package/dist/composable/private/useKanban.d.ts +2 -2
  36. package/dist/composable/private/useKanbanAutoScroll.d.ts +13 -0
  37. package/dist/composable/useCalendarInjection.d.ts +2 -0
  38. package/dist/composable/useKanbanInjection.d.ts +2 -0
  39. package/dist/composable/useTabBarInjection.d.ts +2 -0
  40. package/dist/data/di.d.ts +54 -12
  41. package/dist/data/i18n.d.ts +4 -0
  42. package/dist/index.css +1500 -1221
  43. package/dist/index.js +9339 -8216
  44. package/dist/index.js.map +1 -1
  45. package/package.json +6 -6
  46. package/src/component/FluxAction.vue +1 -1
  47. package/src/component/FluxActionBar.vue +2 -2
  48. package/src/component/FluxActionPane.vue +1 -1
  49. package/src/component/FluxAdaptiveGroup.vue +2 -2
  50. package/src/component/FluxAdaptiveSlot.vue +2 -2
  51. package/src/component/FluxAlert.vue +1 -1
  52. package/src/component/FluxAnimatedColors.vue +1 -1
  53. package/src/component/FluxAspectRatio.vue +1 -1
  54. package/src/component/FluxAvatar.vue +2 -2
  55. package/src/component/FluxBadge.vue +2 -2
  56. package/src/component/FluxBorderShine.vue +1 -1
  57. package/src/component/FluxBoxedIcon.vue +1 -1
  58. package/src/component/FluxButton.vue +2 -2
  59. package/src/component/FluxButtonGroup.vue +1 -1
  60. package/src/component/FluxButtonStack.vue +1 -1
  61. package/src/component/FluxCalendar.vue +588 -179
  62. package/src/component/FluxCalendarItem.vue +79 -0
  63. package/src/component/FluxCheckbox.vue +2 -2
  64. package/src/component/FluxChip.vue +2 -2
  65. package/src/component/FluxClickablePane.vue +2 -2
  66. package/src/component/FluxColorPicker.vue +2 -2
  67. package/src/component/FluxColorSelect.vue +3 -3
  68. package/src/component/FluxColumn.vue +1 -1
  69. package/src/component/FluxCommandPalette.vue +4 -4
  70. package/src/component/FluxCommandPaletteGroup.vue +1 -1
  71. package/src/component/FluxCommandPaletteItem.vue +1 -1
  72. package/src/component/FluxComment.vue +2 -2
  73. package/src/component/FluxConfirm.vue +1 -1
  74. package/src/component/FluxContainer.vue +1 -1
  75. package/src/component/FluxDataTable.vue +1 -2
  76. package/src/component/FluxDatePicker.vue +3 -3
  77. package/src/component/FluxDestructiveButton.vue +1 -1
  78. package/src/component/FluxDisabled.vue +1 -1
  79. package/src/component/FluxDivider.vue +2 -2
  80. package/src/component/FluxDotPattern.vue +1 -1
  81. package/src/component/FluxDropZone.vue +4 -4
  82. package/src/component/FluxExpandable.vue +3 -3
  83. package/src/component/FluxExpandableGroup.vue +2 -2
  84. package/src/component/FluxFader.vue +1 -1
  85. package/src/component/FluxFaderItem.vue +1 -1
  86. package/src/component/FluxFilter.vue +2 -2
  87. package/src/component/FluxFilterBar.vue +5 -6
  88. package/src/component/FluxFilterBase.vue +2 -2
  89. package/src/component/FluxFilterDate.vue +2 -2
  90. package/src/component/FluxFilterDateRange.vue +2 -2
  91. package/src/component/FluxFilterOption.vue +2 -2
  92. package/src/component/FluxFilterOptionAsync.vue +1 -1
  93. package/src/component/FluxFilterOptions.vue +2 -2
  94. package/src/component/FluxFilterOptionsAsync.vue +1 -1
  95. package/src/component/FluxFilterRange.vue +2 -2
  96. package/src/component/FluxFilterWindow.vue +3 -3
  97. package/src/component/FluxFlickeringGrid.vue +1 -1
  98. package/src/component/FluxFlyout.vue +2 -2
  99. package/src/component/FluxFocalPointEditor.vue +3 -3
  100. package/src/component/FluxFocalPointImage.vue +1 -1
  101. package/src/component/FluxForm.vue +1 -1
  102. package/src/component/FluxFormColumn.vue +1 -1
  103. package/src/component/FluxFormDateInput.vue +3 -3
  104. package/src/component/FluxFormDateRangeInput.vue +4 -4
  105. package/src/component/FluxFormDateTimeInput.vue +3 -3
  106. package/src/component/FluxFormField.vue +3 -3
  107. package/src/component/FluxFormFieldAddition.vue +1 -1
  108. package/src/component/FluxFormGrid.vue +1 -1
  109. package/src/component/FluxFormInput.vue +3 -3
  110. package/src/component/FluxFormInputAddition.vue +2 -2
  111. package/src/component/FluxFormInputGroup.vue +2 -2
  112. package/src/component/FluxFormPinInput.vue +3 -3
  113. package/src/component/FluxFormRangeSlider.vue +3 -3
  114. package/src/component/FluxFormRow.vue +1 -1
  115. package/src/component/FluxFormSection.vue +1 -1
  116. package/src/component/FluxFormSelect.vue +4 -4
  117. package/src/component/FluxFormSelectAsync.vue +6 -6
  118. package/src/component/FluxFormSlider.vue +2 -2
  119. package/src/component/FluxFormTextArea.vue +2 -2
  120. package/src/component/FluxFormTimeZonePicker.vue +4 -4
  121. package/src/component/FluxFormTreeViewSelect.vue +9 -12
  122. package/src/component/FluxGallery.vue +3 -3
  123. package/src/component/FluxGalleryItem.vue +1 -1
  124. package/src/component/FluxGrid.vue +1 -1
  125. package/src/component/FluxGridColumn.vue +1 -1
  126. package/src/component/FluxGridPattern.vue +1 -1
  127. package/src/component/FluxIcon.vue +2 -2
  128. package/src/component/FluxInfo.vue +2 -2
  129. package/src/component/FluxItem.vue +1 -1
  130. package/src/component/FluxItemActions.vue +1 -1
  131. package/src/component/FluxItemContent.vue +1 -1
  132. package/src/component/FluxItemMedia.vue +1 -1
  133. package/src/component/FluxItemStack.vue +1 -1
  134. package/src/component/FluxKanban.vue +6 -13
  135. package/src/component/FluxKanbanColumn.vue +42 -36
  136. package/src/component/FluxKanbanItem.vue +162 -0
  137. package/src/component/FluxLayerPane.vue +1 -1
  138. package/src/component/FluxLayerPaneSecondary.vue +1 -1
  139. package/src/component/FluxLegend.vue +1 -1
  140. package/src/component/FluxLink.vue +1 -1
  141. package/src/component/FluxMenu.vue +1 -1
  142. package/src/component/FluxMenuCollapsible.vue +3 -3
  143. package/src/component/FluxMenuGroup.vue +1 -1
  144. package/src/component/FluxMenuItem.vue +2 -2
  145. package/src/component/FluxMenuSubHeader.vue +1 -1
  146. package/src/component/FluxMenuTitle.vue +1 -1
  147. package/src/component/FluxNotice.vue +3 -3
  148. package/src/component/FluxOverflowBar.vue +1 -1
  149. package/src/component/FluxOverlay.vue +3 -3
  150. package/src/component/FluxOverlayProvider.vue +2 -2
  151. package/src/component/FluxPagination.vue +3 -3
  152. package/src/component/FluxPaginationBar.vue +2 -2
  153. package/src/component/FluxPaginationButton.vue +1 -1
  154. package/src/component/FluxPane.vue +1 -1
  155. package/src/component/FluxPaneBody.vue +1 -1
  156. package/src/component/FluxPaneFooter.vue +1 -1
  157. package/src/component/FluxPaneGroup.vue +1 -1
  158. package/src/component/FluxPaneHeader.vue +2 -2
  159. package/src/component/FluxPaneIllustration.vue +1 -1
  160. package/src/component/FluxPaneMedia.vue +1 -1
  161. package/src/component/FluxPercentageBar.vue +1 -1
  162. package/src/component/FluxPersona.vue +1 -1
  163. package/src/component/FluxPlaceholder.vue +1 -1
  164. package/src/component/FluxPressable.vue +1 -1
  165. package/src/component/FluxPrimaryButton.vue +1 -1
  166. package/src/component/FluxPrimaryLinkButton.vue +1 -1
  167. package/src/component/FluxProgressBar.vue +2 -2
  168. package/src/component/FluxPrompt.vue +1 -1
  169. package/src/component/FluxPublishButton.vue +1 -1
  170. package/src/component/FluxQuantitySelector.vue +2 -2
  171. package/src/component/FluxRemove.vue +2 -2
  172. package/src/component/FluxRoot.vue +2 -2
  173. package/src/component/FluxRow.vue +1 -1
  174. package/src/component/FluxSecondaryButton.vue +1 -1
  175. package/src/component/FluxSecondaryLinkButton.vue +1 -1
  176. package/src/component/FluxSegmentedControl.vue +1 -1
  177. package/src/component/FluxSeparator.vue +1 -1
  178. package/src/component/FluxSlideOver.vue +3 -3
  179. package/src/component/FluxSnackbar.vue +2 -2
  180. package/src/component/FluxSnackbarProvider.vue +2 -2
  181. package/src/component/FluxSpacer.vue +1 -1
  182. package/src/component/FluxSpinner.vue +1 -1
  183. package/src/component/FluxSplitButton.vue +2 -2
  184. package/src/component/FluxStack.vue +2 -2
  185. package/src/component/FluxStatistic.vue +2 -2
  186. package/src/component/FluxStepper.vue +1 -1
  187. package/src/component/FluxStepperStep.vue +1 -1
  188. package/src/component/FluxStepperSteps.vue +2 -2
  189. package/src/component/FluxTab.vue +2 -2
  190. package/src/component/FluxTabBar.vue +75 -7
  191. package/src/component/FluxTabBarItem.vue +35 -4
  192. package/src/component/FluxTable.vue +3 -4
  193. package/src/component/FluxTableActions.vue +1 -1
  194. package/src/component/FluxTableBar.vue +3 -3
  195. package/src/component/FluxTableCell.vue +3 -3
  196. package/src/component/FluxTableHeader.vue +3 -3
  197. package/src/component/FluxTableRow.vue +1 -1
  198. package/src/component/FluxTabs.vue +10 -4
  199. package/src/component/FluxTag.vue +2 -2
  200. package/src/component/FluxTicks.vue +1 -1
  201. package/src/component/FluxTimeline.vue +1 -1
  202. package/src/component/FluxTimelineItem.vue +2 -2
  203. package/src/component/FluxToggle.vue +2 -2
  204. package/src/component/FluxToolbar.vue +2 -2
  205. package/src/component/FluxTooltip.vue +1 -1
  206. package/src/component/FluxTooltipProvider.vue +3 -3
  207. package/src/component/FluxTreeView.vue +3 -4
  208. package/src/component/FluxWindow.vue +1 -1
  209. package/src/component/calendar/FluxCalendarItemDisplay.vue +117 -0
  210. package/src/component/calendar/FluxCalendarMonthView.vue +134 -0
  211. package/src/component/calendar/FluxCalendarTimeGridView.vue +550 -0
  212. package/src/component/calendar/index.ts +3 -0
  213. package/src/component/index.ts +2 -2
  214. package/src/component/primitive/CoordinatePicker.vue +2 -2
  215. package/src/component/primitive/CoordinatePickerThumb.vue +2 -2
  216. package/src/component/primitive/DialogLayout.vue +1 -1
  217. package/src/component/primitive/FilterBadge.vue +2 -2
  218. package/src/component/primitive/FilterItem.vue +1 -1
  219. package/src/component/primitive/FilterMenuRenderer.ts +2 -2
  220. package/src/component/primitive/FilterOptionBase.vue +6 -6
  221. package/src/component/primitive/SelectBase.vue +13 -13
  222. package/src/component/primitive/SliderBase.vue +3 -3
  223. package/src/component/primitive/SliderThumb.vue +2 -2
  224. package/src/component/primitive/SliderTrack.vue +1 -1
  225. package/src/component/primitive/TreeNodeRenderer.vue +3 -4
  226. package/src/component/primitive/VNodeRenderer.ts +1 -2
  227. package/src/composable/index.ts +3 -0
  228. package/src/composable/private/index.ts +5 -8
  229. package/src/composable/private/useAsyncFilterOptions.ts +2 -2
  230. package/src/composable/private/useCommandPalette.ts +2 -2
  231. package/src/composable/private/useDateFlyout.ts +1 -1
  232. package/src/composable/private/useDropdownPopup.ts +1 -1
  233. package/src/composable/private/useFilterOption.ts +2 -2
  234. package/src/composable/private/useFormSelect.ts +2 -3
  235. package/src/composable/private/useKanban.ts +167 -244
  236. package/src/composable/private/useKanbanAutoScroll.ts +95 -0
  237. package/src/composable/private/useTranslate.ts +1 -2
  238. package/src/composable/private/useTreeView.ts +1 -1
  239. package/src/composable/useAdaptiveGroupInjection.ts +1 -1
  240. package/src/composable/useBreakpoints.ts +1 -2
  241. package/src/composable/useCalendarInjection.ts +6 -0
  242. package/src/composable/useDisabled.ts +1 -2
  243. package/src/composable/useDisabledInjection.ts +1 -1
  244. package/src/composable/useExpandableGroupInjection.ts +1 -1
  245. package/src/composable/useFilterInjection.ts +1 -1
  246. package/src/composable/useFlyoutInjection.ts +1 -1
  247. package/src/composable/useFormFieldInjection.ts +1 -1
  248. package/src/composable/useKanbanInjection.ts +12 -0
  249. package/src/composable/useTabBarInjection.ts +10 -0
  250. package/src/composable/useTableInjection.ts +1 -1
  251. package/src/composable/useTooltipInjection.ts +1 -1
  252. package/src/css/component/Action.module.scss +1 -1
  253. package/src/css/component/AdaptiveSlot.module.scss +5 -7
  254. package/src/css/component/Avatar.module.scss +1 -1
  255. package/src/css/component/Badge.module.scss +1 -1
  256. package/src/css/component/Button.module.scss +1 -1
  257. package/src/css/component/Calendar.module.scss +274 -44
  258. package/src/css/component/Chip.module.scss +1 -1
  259. package/src/css/component/Color.module.scss +1 -1
  260. package/src/css/component/CommandPalette.module.scss +1 -1
  261. package/src/css/component/DatePicker.module.scss +1 -1
  262. package/src/css/component/Expandable.module.scss +1 -1
  263. package/src/css/component/Form.module.scss +1 -1
  264. package/src/css/component/Gallery.module.scss +1 -1
  265. package/src/css/component/Grid.module.scss +1 -1
  266. package/src/css/component/Item.module.scss +1 -1
  267. package/src/css/component/{FluxKanban.module.scss → Kanban.module.scss} +56 -79
  268. package/src/css/component/Layout.module.scss +1 -1
  269. package/src/css/component/Menu.module.scss +1 -1
  270. package/src/css/component/Notice.module.scss +1 -1
  271. package/src/css/component/Overlay.module.scss +4 -4
  272. package/src/css/component/Pagination.module.scss +1 -1
  273. package/src/css/component/Pane.module.scss +2 -1
  274. package/src/css/component/Placeholder.module.scss +1 -1
  275. package/src/css/component/Remove.module.scss +1 -1
  276. package/src/css/component/SegmentedControl.module.scss +1 -1
  277. package/src/css/component/Snackbar.module.scss +1 -1
  278. package/src/css/component/Tab.module.scss +138 -34
  279. package/src/css/component/Table.module.scss +1 -1
  280. package/src/css/component/TreeView.module.scss +1 -1
  281. package/src/css/component/TreeViewSelect.module.scss +1 -1
  282. package/src/css/component/base/Button.module.scss +1 -1
  283. package/src/css/component/primitive/Slider.module.scss +1 -1
  284. package/src/css/component/primitive/TreeNode.module.scss +1 -1
  285. package/src/css/variables.scss +2 -2
  286. package/src/data/di.ts +64 -11
  287. package/src/data/filter.ts +3 -3
  288. package/src/data/i18n.ts +4 -0
  289. package/src/data/store.ts +1 -2
  290. package/src/transition/FluxBreakthroughTransition.vue +1 -1
  291. package/src/transition/FluxFadeTransition.vue +1 -1
  292. package/src/transition/FluxOverlayTransition.vue +1 -1
  293. package/src/transition/FluxRouteTransition.vue +1 -1
  294. package/src/transition/FluxSlideOverTransition.vue +1 -1
  295. package/src/transition/FluxTooltipTransition.vue +1 -1
  296. package/src/transition/FluxVerticalWindowTransition.vue +1 -1
  297. package/src/transition/FluxWindowTransition.vue +1 -1
  298. package/src/util/createDialogRenderer.ts +3 -4
  299. package/src/util/createLabelForDateRange.ts +1 -1
  300. package/src/component/FluxCalendarEvent.vue +0 -42
  301. package/src/component/FluxKanbanCard.vue +0 -199
@@ -0,0 +1,95 @@
1
+ const AUTOSCROLL_ZONE = 40;
2
+ const AUTOSCROLL_MAX_SPEED = 12;
3
+
4
+ export type UseKanbanAutoScrollOptions = {
5
+ getBoardElement(): Element | null;
6
+ getVerticalTarget(): Element | null;
7
+ };
8
+
9
+ export type UseKanbanAutoScrollReturn = {
10
+ onPointerMove(clientX: number, clientY: number): void;
11
+ stop(): void;
12
+ };
13
+
14
+ /**
15
+ * Drives horizontal (board) and vertical (column body) auto-scroll while a drag
16
+ * is in progress. Reads the active scroll containers via the option callbacks.
17
+ */
18
+ export function useKanbanAutoScroll(options: UseKanbanAutoScrollOptions): UseKanbanAutoScrollReturn {
19
+ let frame: number | null = null;
20
+ let deltaX = 0;
21
+ let deltaY = 0;
22
+ let verticalTarget: Element | null = null;
23
+
24
+ function onPointerMove(clientX: number, clientY: number): void {
25
+ const board = options.getBoardElement();
26
+ const target = options.getVerticalTarget();
27
+
28
+ deltaX = board ? computeScrollDelta(board.getBoundingClientRect(), clientX, 'horizontal') : 0;
29
+ deltaY = target ? computeScrollDelta(target.getBoundingClientRect(), clientY, 'vertical') : 0;
30
+ verticalTarget = target;
31
+
32
+ if (deltaX !== 0 || deltaY !== 0) {
33
+ start();
34
+ } else {
35
+ stop();
36
+ }
37
+ }
38
+
39
+ function start(): void {
40
+ if (frame !== null) {
41
+ return;
42
+ }
43
+
44
+ const tick = (): void => {
45
+ const board = options.getBoardElement();
46
+
47
+ if (deltaX !== 0 && board) {
48
+ board.scrollLeft += deltaX;
49
+ }
50
+
51
+ if (deltaY !== 0 && verticalTarget) {
52
+ verticalTarget.scrollTop += deltaY;
53
+ }
54
+
55
+ if (deltaX === 0 && deltaY === 0) {
56
+ frame = null;
57
+ return;
58
+ }
59
+
60
+ frame = requestAnimationFrame(tick);
61
+ };
62
+
63
+ frame = requestAnimationFrame(tick);
64
+ }
65
+
66
+ function stop(): void {
67
+ if (frame !== null) {
68
+ cancelAnimationFrame(frame);
69
+ frame = null;
70
+ }
71
+
72
+ deltaX = 0;
73
+ deltaY = 0;
74
+ verticalTarget = null;
75
+ }
76
+
77
+ return {onPointerMove, stop};
78
+ }
79
+
80
+ function computeScrollDelta(rect: DOMRect, position: number, axis: 'horizontal' | 'vertical'): number {
81
+ const start = axis === 'horizontal' ? rect.left : rect.top;
82
+ const end = axis === 'horizontal' ? rect.right : rect.bottom;
83
+
84
+ if (position < start + AUTOSCROLL_ZONE) {
85
+ const distance = Math.max(0, position - start);
86
+ return -Math.round(((AUTOSCROLL_ZONE - distance) / AUTOSCROLL_ZONE) * AUTOSCROLL_MAX_SPEED);
87
+ }
88
+
89
+ if (position > end - AUTOSCROLL_ZONE) {
90
+ const distance = Math.max(0, end - position);
91
+ return Math.round(((AUTOSCROLL_ZONE - distance) / AUTOSCROLL_ZONE) * AUTOSCROLL_MAX_SPEED);
92
+ }
93
+
94
+ return 0;
95
+ }
@@ -1,6 +1,5 @@
1
1
  import { getCurrentInstance } from 'vue';
2
- import type { FluxTranslate, FluxTranslation } from '$flux/data';
3
- import { english } from '$flux/data';
2
+ import { english, type FluxTranslate, type FluxTranslation } from '~flux/components/data';
4
3
 
5
4
  const fallback: FluxTranslate = (key, params) => {
6
5
  if (!(key in english)) {
@@ -1,5 +1,5 @@
1
1
  import type { FluxColor, FluxIconName } from '@flux-ui/types';
2
- import { type ComputedRef, nextTick, ref, type Ref, unref, watch } from 'vue';
2
+ import { nextTick, ref, unref, watch, type ComputedRef, type Ref } from 'vue';
3
3
 
4
4
  export type TreeBaseOption = {
5
5
  readonly id: string | number;
@@ -1,5 +1,5 @@
1
1
  import { inject } from 'vue';
2
- import { FluxAdaptiveGroupInjectionKey } from '$flux/data';
2
+ import { FluxAdaptiveGroupInjectionKey } from '~flux/components/data';
3
3
 
4
4
  export default function () {
5
5
  return inject(FluxAdaptiveGroupInjectionKey, null);
@@ -1,5 +1,4 @@
1
- import type { Ref } from 'vue';
2
- import { onMounted, onUnmounted, ref } from 'vue';
1
+ import { onMounted, onUnmounted, ref, type Ref } from 'vue';
3
2
 
4
3
  const BREAKPOINTS = {
5
4
  xs: 0,
@@ -0,0 +1,6 @@
1
+ import { inject } from 'vue';
2
+ import { FluxCalendarInjectionKey, type FluxCalendarInjection } from '~flux/components/data';
3
+
4
+ export default function (): FluxCalendarInjection | null {
5
+ return inject(FluxCalendarInjectionKey, null);
6
+ }
@@ -1,5 +1,4 @@
1
- import type { Ref } from 'vue';
2
- import { computed, unref } from 'vue';
1
+ import { computed, unref, type Ref } from 'vue';
3
2
  import useDisabledInjection from './useDisabledInjection';
4
3
 
5
4
  export default function (componentDisabled: Ref<boolean>) {
@@ -1,5 +1,5 @@
1
1
  import { inject, ref } from 'vue';
2
- import { FluxDisabledInjectionKey } from '$flux/data';
2
+ import { FluxDisabledInjectionKey } from '~flux/components/data';
3
3
 
4
4
  export default function () {
5
5
  return inject(FluxDisabledInjectionKey, ref(false));
@@ -1,5 +1,5 @@
1
1
  import { inject } from 'vue';
2
- import { FluxExpandableGroupInjectionKey } from '$flux/data';
2
+ import { FluxExpandableGroupInjectionKey } from '~flux/components/data';
3
3
 
4
4
  export default function () {
5
5
  return inject(FluxExpandableGroupInjectionKey, {
@@ -1,5 +1,5 @@
1
1
  import { inject, ref } from 'vue';
2
- import { FluxFilterInjectionKey } from '$flux/data';
2
+ import { FluxFilterInjectionKey } from '~flux/components/data';
3
3
 
4
4
  export default function () {
5
5
  return inject(FluxFilterInjectionKey, {
@@ -1,5 +1,5 @@
1
1
  import { inject, ref } from 'vue';
2
- import { FluxFlyoutInjectionKey } from '$flux/data';
2
+ import { FluxFlyoutInjectionKey } from '~flux/components/data';
3
3
 
4
4
  export default function () {
5
5
  return inject(FluxFlyoutInjectionKey, {
@@ -1,5 +1,5 @@
1
1
  import { inject, useId } from 'vue';
2
- import { FluxFormFieldInjectionKey } from '$flux/data';
2
+ import { FluxFormFieldInjectionKey } from '~flux/components/data';
3
3
 
4
4
  export default function () {
5
5
  return inject(FluxFormFieldInjectionKey, {
@@ -0,0 +1,12 @@
1
+ import { inject } from 'vue';
2
+ import { FluxKanbanInjectionKey, type FluxKanbanInjection } from '~flux/components/data';
3
+
4
+ export default function (): FluxKanbanInjection {
5
+ const injection = inject(FluxKanbanInjectionKey);
6
+
7
+ if (!injection) {
8
+ throw new Error('useFluxKanbanInjection must be used inside a FluxKanban.');
9
+ }
10
+
11
+ return injection;
12
+ }
@@ -0,0 +1,10 @@
1
+ import { inject, ref } from 'vue';
2
+ import { FluxTabBarInjectionKey } from '~flux/components/data';
3
+
4
+ export default function () {
5
+ return inject(FluxTabBarInjectionKey, {
6
+ isPills: ref(false),
7
+ registerItem: () => undefined,
8
+ unregisterItem: () => undefined
9
+ });
10
+ }
@@ -1,5 +1,5 @@
1
1
  import { inject } from 'vue';
2
- import { FluxTableInjectionKey } from '$flux/data';
2
+ import { FluxTableInjectionKey } from '~flux/components/data';
3
3
 
4
4
  export default function () {
5
5
  return inject(FluxTableInjectionKey, {
@@ -1,5 +1,5 @@
1
1
  import { inject } from 'vue';
2
- import { FluxTooltipInjectionKey } from '$flux/data';
2
+ import { FluxTooltipInjectionKey } from '~flux/components/data';
3
3
 
4
4
  export default function () {
5
5
  return inject(FluxTooltipInjectionKey, {
@@ -1,4 +1,4 @@
1
- @use '$flux/css/mixin';
1
+ @use '~flux/components/css/mixin';
2
2
 
3
3
  .action {
4
4
  composes: button from './base/Button.module.scss';
@@ -1,25 +1,23 @@
1
1
  .adaptiveGroup {
2
2
  display: flex;
3
- overflow: hidden;
3
+ min-width: 0;
4
4
  flex-flow: row nowrap;
5
5
  gap: var(--gap, 9px);
6
- min-width: 0;
7
6
  }
8
7
 
9
8
  .adaptiveSlot {
10
9
  display: flex;
11
- overflow: hidden;
12
- flex-flow: row nowrap;
13
10
  min-width: 0;
11
+ flex-flow: row nowrap;
14
12
  }
15
13
 
16
14
  .adaptiveSlotMeasurer {
17
15
  position: absolute;
16
+ display: flex;
18
17
  top: 0;
19
18
  left: 0;
20
- display: flex;
21
- visibility: hidden;
22
- flex-flow: row nowrap;
23
19
  width: max-content;
20
+ flex-flow: row nowrap;
24
21
  pointer-events: none;
22
+ visibility: hidden;
25
23
  }
@@ -1,4 +1,4 @@
1
- @use '$flux/css/mixin';
1
+ @use '~flux/components/css/mixin';
2
2
 
3
3
  .avatar {
4
4
  position: relative;
@@ -1,4 +1,4 @@
1
- @use '$flux/css/mixin';
1
+ @use '~flux/components/css/mixin';
2
2
 
3
3
  .badge {
4
4
  display: inline-flex;
@@ -1,4 +1,4 @@
1
- @use '$flux/css/mixin';
1
+ @use '~flux/components/css/mixin';
2
2
 
3
3
  .primaryButton {
4
4
  composes: button from './base/Button.module.scss';
@@ -1,14 +1,19 @@
1
- @use '$flux/css/mixin';
1
+ @use '~flux/components/css/mixin';
2
2
 
3
3
  .calendar {
4
4
  composes: basePaneStructure from './base/Pane.module.scss';
5
5
 
6
6
  display: flex;
7
7
  flex-flow: column;
8
+ flex-grow: 1;
8
9
  box-shadow: var(--shadow-sm);
9
10
  contain: paint;
10
11
  }
11
12
 
13
+ .calendarItemRegistry {
14
+ display: none;
15
+ }
16
+
12
17
  .calendarActions {
13
18
  align-items: center;
14
19
  }
@@ -50,17 +55,55 @@
50
55
  color: var(--foreground);
51
56
  }
52
57
 
58
+ .calendarRangeLabel {
59
+ composes: calendarCurrentValue;
60
+
61
+ color: var(--foreground-prominent);
62
+ font-weight: 700;
63
+ }
64
+
65
+ .calendarItem {
66
+ display: block;
67
+ padding: 0;
68
+ background: transparent;
69
+ border: 0;
70
+ cursor: default;
71
+ text-align: left;
72
+
73
+ @include mixin.focus-ring;
74
+
75
+ &.isClickable {
76
+ cursor: pointer;
77
+ }
78
+
79
+ &.isDraggable {
80
+ cursor: grab;
81
+
82
+ &:active {
83
+ cursor: grabbing;
84
+ }
85
+ }
86
+
87
+ &.isGrabbed {
88
+ outline: 2px solid var(--primary-500);
89
+ outline-offset: 2px;
90
+ }
91
+ }
92
+
93
+ /* region Month view */
94
+
53
95
  .calendarCells {
54
96
  display: grid;
55
97
  flex-grow: 1;
56
98
  gap: 1px;
57
- grid-template-columns: repeat(7, 1fr);
58
- grid-template-rows: min-content repeat(6, auto);
99
+ grid-template-columns: repeat(7, minmax(180px, 1fr));
100
+ grid-auto-rows: auto;
101
+ overflow-x: auto;
59
102
  background: var(--gray-100);
60
103
  }
61
104
 
62
105
  .calendarCell {
63
- padding: 12px 18px;
106
+ padding: 9px;
64
107
  background: var(--gray-25);
65
108
  }
66
109
 
@@ -81,13 +124,17 @@
81
124
  composes: calendarCell;
82
125
 
83
126
  position: relative;
84
- min-height: 105px;
85
- padding-bottom: 39px;
127
+ min-height: 90px;
128
+ padding-top: 33px;
129
+ outline: 2px dashed transparent;
130
+ outline-offset: 2px;
131
+ transition: 210ms var(--swift-out);
132
+ transition-property: background, outline-color, z-index;
133
+ z-index: 0;
86
134
 
87
135
  &.isDisabled {
88
136
  background: var(--gray-50);
89
137
  color: var(--foreground-secondary);
90
- pointer-events: none;
91
138
 
92
139
  .calendarEntryDate {
93
140
  opacity: .25;
@@ -98,70 +145,253 @@
98
145
  pointer-events: none;
99
146
  }
100
147
  }
148
+
149
+ &.isFocused,
150
+ &.isDropTarget {
151
+ z-index: 1;
152
+ }
153
+
154
+ &.isFocused {
155
+ box-shadow: inset 0 0 0 2px var(--primary-200);
156
+ }
157
+
158
+ &.isDropTarget {
159
+ background: var(--primary-50);
160
+ outline-color: var(--primary-600);
161
+ }
162
+
163
+ &.isToday .calendarEntryDate {
164
+ color: var(--primary-600);
165
+ }
101
166
  }
102
167
 
103
168
  .calendarEntryDate {
104
169
  position: absolute;
105
- right: 18px;
106
- bottom: 15px;
170
+ top: 12px;
171
+ left: 12px;
107
172
  color: var(--foreground);
108
- font-size: 15px;
173
+ font-size: 12px;
109
174
  font-weight: 700;
110
175
  line-height: 1em;
111
176
  }
112
177
 
113
178
  .calendarEvents {
114
179
  display: grid;
115
- grid-auto-rows: 1fr;
180
+ grid-auto-rows: auto;
116
181
  gap: 3px;
117
182
  }
118
183
 
119
- .calendarEvent {
120
- margin-left: -9px;
121
- margin-right: -9px;
122
- padding: 6px 9px;
123
- background: var(--primary-100);
124
- border: 0;
125
- color: var(--primary-800);
126
- cursor: pointer;
127
- font-size: 14px;
128
- line-height: 1.3em;
129
- text-align: left;
184
+ /* endregion */
185
+
186
+ /* region Time-grid view */
187
+
188
+ .timeGrid {
189
+ display: flex;
190
+ flex-flow: column;
191
+ flex-grow: 1;
192
+ overflow: hidden;
193
+ background: var(--gray-25);
194
+ }
130
195
 
131
- /** note: This works in all browsers. */
132
- display: -webkit-box;
196
+ .timeGridInner {
197
+ display: flex;
198
+ flex-flow: column;
199
+ flex-grow: 1;
133
200
  overflow: hidden;
134
- -webkit-line-clamp: 2;
135
- -webkit-box-orient: vertical;
201
+ }
202
+
203
+ .timeGridHeader {
204
+ display: grid;
205
+ grid-template-columns: 64px 1fr;
206
+ background: var(--gray-25);
207
+ border-bottom: 1px solid var(--gray-100);
208
+ }
136
209
 
137
- &.isSingle {
138
- border-radius: var(--radius-half);
210
+ .timeGridHeaderGutter {
211
+ background: var(--gray-25);
212
+ }
213
+
214
+ .timeGridHeaderDays {
215
+ display: grid;
216
+ grid-auto-flow: column;
217
+ grid-auto-columns: minmax(0, 1fr);
218
+ gap: 1px;
219
+ background: var(--gray-100);
220
+ }
221
+
222
+ .timeGridHeaderDay {
223
+ padding: 9px 12px;
224
+ background: var(--gray-25);
225
+ color: var(--foreground-secondary);
226
+ font-size: 12px;
227
+ font-weight: 600;
228
+ line-height: 1em;
229
+ text-align: center;
230
+ text-transform: capitalize;
231
+
232
+ &.isToday {
233
+ color: var(--primary-600);
139
234
  }
235
+ }
140
236
 
141
- &.isMiddle {
142
- margin-left: -22px;
143
- margin-right: -22px;
237
+ .timeGridAllDay {
238
+ display: grid;
239
+ grid-template-columns: 64px 1fr;
240
+ background: var(--gray-25);
241
+ border-bottom: 1px solid var(--gray-100);
242
+ }
243
+
244
+ .timeGridAllDayLabel {
245
+ align-self: stretch;
246
+ padding: 6px 9px;
247
+ color: var(--foreground-secondary);
248
+ font-size: 11px;
249
+ font-weight: 500;
250
+ line-height: 1em;
251
+ text-align: right;
252
+ }
253
+
254
+ .timeGridAllDayDays {
255
+ display: grid;
256
+ grid-auto-flow: column;
257
+ grid-auto-columns: minmax(0, 1fr);
258
+ gap: 1px;
259
+ min-height: 36px;
260
+ background: var(--gray-100);
261
+ }
262
+
263
+ .timeGridAllDayCell {
264
+ display: flex;
265
+ flex-flow: column;
266
+ gap: 3px;
267
+ padding: 6px;
268
+ background: var(--gray-25);
269
+
270
+ &.isDropTarget {
271
+ box-shadow: inset 0 0 0 2px var(--primary-300);
272
+ }
273
+ }
274
+
275
+ .timeGridBody {
276
+ display: grid;
277
+ grid-template-columns: 64px 1fr;
278
+ flex-grow: 1;
279
+ overflow-y: auto;
280
+ overflow-x: hidden;
281
+ position: relative;
282
+ }
283
+
284
+ .timeGridHours {
285
+ display: flex;
286
+ flex-flow: column;
287
+ background: var(--gray-25);
288
+ }
289
+
290
+ .timeGridHourLabel {
291
+ position: relative;
292
+ box-sizing: border-box;
293
+ padding-right: 9px;
294
+ color: var(--foreground-secondary);
295
+ font-size: 11px;
296
+ font-weight: 500;
297
+ line-height: 1em;
298
+ text-align: right;
299
+ }
300
+
301
+ .timeGridHourLabelText {
302
+ position: absolute;
303
+ top: 0;
304
+ right: 9px;
305
+ transform: translateY(-50%);
306
+ background: var(--gray-25);
307
+ padding: 0 2px;
308
+ }
309
+
310
+ .timeGridDays {
311
+ display: grid;
312
+ grid-auto-flow: column;
313
+ grid-auto-columns: minmax(0, 1fr);
314
+ gap: 1px;
315
+ background: var(--gray-100);
316
+ }
317
+
318
+ .timeGridDay {
319
+ position: relative;
320
+ background: var(--gray-25);
321
+ background-image: repeating-linear-gradient(
322
+ to bottom,
323
+ transparent,
324
+ transparent calc(var(--hour-height, 48px) - 1px),
325
+ var(--gray-100) calc(var(--hour-height, 48px) - 1px),
326
+ var(--gray-100) var(--hour-height, 48px)
327
+ );
328
+
329
+ &.isDropTarget {
330
+ box-shadow: inset 0 0 0 2px var(--primary-300);
144
331
  }
332
+ }
333
+
334
+ .timeGridDayItem {
335
+ position: absolute;
336
+ box-sizing: border-box;
337
+ overflow: hidden;
338
+ padding: 2px;
145
339
 
146
- &.isStart {
147
- margin-right: -18px;
148
- border-top-left-radius: var(--radius-half);
149
- border-bottom-left-radius: var(--radius-half);
340
+ &.isClippedTop {
341
+ border-top: 2px dashed var(--warning-300);
150
342
  }
151
343
 
152
- &.isEnd {
153
- margin-left: -18px;
154
- border-top-right-radius: var(--radius-half);
155
- border-bottom-right-radius: var(--radius-half);
344
+ &.isClippedBottom {
345
+ border-bottom: 2px dashed var(--warning-300);
156
346
  }
157
347
 
158
- &:not(.isSingle):not(.isStart) {
159
- span {
160
- opacity: 0;
161
- }
348
+ &.isResizing {
349
+ opacity: .8;
162
350
  }
351
+ }
352
+
353
+ .timeGridDayItemBody {
354
+ position: relative;
355
+ height: 100%;
356
+ width: 100%;
357
+
358
+ > button {
359
+ display: block;
360
+ width: 100%;
361
+ height: 100%;
362
+ }
363
+ }
364
+
365
+ .timeGridDayItemHandle {
366
+ position: absolute;
367
+ left: 0;
368
+ right: 0;
369
+ height: 6px;
370
+ cursor: ns-resize;
371
+ z-index: 2;
372
+ background: transparent;
163
373
 
164
374
  @include mixin.hover {
165
- background: var(--primary-200);
375
+ background: var(--primary-300);
376
+ }
377
+
378
+ &.isTop {
379
+ top: 0;
380
+ }
381
+
382
+ &.isBottom {
383
+ bottom: 0;
166
384
  }
167
385
  }
386
+
387
+ .timeGridDropIndicator {
388
+ position: absolute;
389
+ left: 0;
390
+ right: 0;
391
+ height: 2px;
392
+ background: var(--primary-500);
393
+ z-index: 5;
394
+ pointer-events: none;
395
+ }
396
+
397
+ /* endregion */
@@ -1,4 +1,4 @@
1
- @use '$flux/css/mixin';
1
+ @use '~flux/components/css/mixin';
2
2
 
3
3
  .chip {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- @use '$flux/css/mixin';
1
+ @use '~flux/components/css/mixin';
2
2
 
3
3
  .colorPicker {
4
4
  --transparent: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMElEQVQ4T2N89uzZfwY8QFJSEp80A+OoAcMiDP7//483HTx//hx/Ohg1gIFx6IcBALl+VXknOCvFAAAAAElFTkSuQmCC);