@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,64 @@
1
+ @use '$flux/css/mixin';
2
+
3
+ @value placeholder from './Placeholder.module.scss';
4
+
5
+ .gallery {
6
+ display: grid;
7
+ gap: 9px;
8
+ grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
9
+ }
10
+
11
+ .galleryAdd {
12
+ composes: placeholder;
13
+
14
+ aspect-ratio: 1 / 1;
15
+ color: rgb(var(--gray-7));
16
+
17
+ @include mixin.hover {
18
+ background: rgb(var(--gray-1));
19
+ border-color: rgb(var(--gray-3));
20
+ }
21
+ }
22
+
23
+ .galleryMove {
24
+ transition: 360ms var(--swift-out);
25
+ }
26
+
27
+ .galleryItem {
28
+ position: relative;
29
+ aspect-ratio: 1 / 1;
30
+
31
+ :local(.remove) {
32
+ z-index: 1;
33
+ }
34
+ }
35
+
36
+ .galleryItemImage {
37
+ position: absolute;
38
+ display: block;
39
+ inset: 0;
40
+ height: 100%;
41
+ width: 100%;
42
+ border-radius: var(--radius);
43
+ object-fit: cover;
44
+ object-position: center;
45
+ outline: 1px solid rgb(0 0 0 / .025);
46
+ outline-offset: -1px;
47
+ }
48
+
49
+ .galleryItemLoader {
50
+ position: absolute;
51
+ display: flex;
52
+ inset: 1px;
53
+ align-items: center;
54
+ justify-content: center;
55
+ backdrop-filter: blur(2px) saturate(180%);
56
+ background: rgb(0 0 0 / .25);
57
+ border-radius: calc(var(--radius) - 1px);
58
+ z-index: 0;
59
+
60
+ .spinner {
61
+ --track: rgb(255 255 255 / .25);
62
+ --value: rgb(255 255 255);
63
+ }
64
+ }
@@ -0,0 +1,24 @@
1
+ @use '$flux/css/mixin';
2
+
3
+ .grid {
4
+ display: grid;
5
+ gap: var(--gap);
6
+ grid-template-columns: repeat(var(--columns), 1fr);
7
+ container: grid / inline-size;
8
+ }
9
+
10
+ .gridColumn {
11
+ display: flex;
12
+ flex-flow: column;
13
+ gap: var(--gap);
14
+ }
15
+
16
+ $-breakpoints: xl, lg, md, sm, xs;
17
+
18
+ @each $-breakpoint in $-breakpoints {
19
+ @include mixin.container-breakpoint-down(grid, $-breakpoint) {
20
+ .gridColumn {
21
+ grid-column: span var(--#{$-breakpoint});
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,104 @@
1
+ @value basePane from './base/Pane.module.scss';
2
+
3
+ @layer flux-base {
4
+ .icon {
5
+ height: 1em;
6
+ width: 1em;
7
+ flex-shrink: 0;
8
+ font-size: 20px;
9
+ line-height: 1;
10
+ }
11
+
12
+ .fontAwesomeIcon {
13
+ composes: icon;
14
+
15
+ display: inline-block;
16
+ }
17
+
18
+ .materialSymbolIcon {
19
+ composes: icon;
20
+
21
+ display: inline-flex;
22
+ color: currentColor;
23
+ font-family: 'Material Symbols Outlined', sans-serif;
24
+ font-weight: 400;
25
+ font-style: normal;
26
+ user-select: none;
27
+ -webkit-font-feature-settings: 'liga';
28
+ -webkit-font-smoothing: antialiased;
29
+ }
30
+
31
+ .iconBoxed {
32
+ composes: basePane;
33
+
34
+ display: flex;
35
+ height: 1em;
36
+ width: 1em;
37
+ align-items: center;
38
+ flex-shrink: 0;
39
+ justify-content: center;
40
+ font-size: 42px;
41
+
42
+ .icon {
43
+ font-size: .33em;
44
+ }
45
+
46
+ .materialSymbolIcon {
47
+ font-size: .5em;
48
+ }
49
+ }
50
+
51
+ .iconBoxedDefault {
52
+ composes: iconBoxed;
53
+
54
+ box-shadow: var(--shadow-sm);
55
+ }
56
+
57
+ .iconBoxedColored {
58
+ composes: iconBoxed;
59
+
60
+ border: 0;
61
+ }
62
+
63
+ .iconBoxedGray {
64
+ composes: iconBoxedColored;
65
+
66
+ background: rgb(var(--gray-2));
67
+ color: var(--foreground);
68
+ }
69
+
70
+ .iconBoxedPrimary {
71
+ composes: iconBoxedColored;
72
+
73
+ background: rgb(var(--primary-2));
74
+ color: rgb(var(--primary-10));
75
+ }
76
+
77
+ .iconBoxedDanger {
78
+ composes: iconBoxedColored;
79
+
80
+ background: rgb(var(--danger-2));
81
+ color: rgb(var(--danger-10));
82
+ }
83
+
84
+ .iconBoxedInfo {
85
+ composes: iconBoxedColored;
86
+
87
+ background: rgb(var(--info-2));
88
+ color: rgb(var(--info-10));
89
+ }
90
+
91
+ .iconBoxedSuccess {
92
+ composes: iconBoxedColored;
93
+
94
+ background: rgb(var(--success-2));
95
+ color: rgb(var(--success-10));
96
+ }
97
+
98
+ .iconBoxedWarning {
99
+ composes: iconBoxedColored;
100
+
101
+ background: rgb(var(--warning-2));
102
+ color: rgb(var(--warning-10));
103
+ }
104
+ }
@@ -0,0 +1,15 @@
1
+ .info {
2
+ display: flex;
3
+ gap: 15px;
4
+
5
+ > .icon {
6
+ margin-top: 1px;
7
+ flex-shrink: 0;
8
+ color: rgb(var(--primary-7));
9
+ }
10
+ }
11
+
12
+ .infoBody {
13
+ align-items: center;
14
+ line-height: 1.5;
15
+ }
@@ -0,0 +1,63 @@
1
+ @use '$flux/css/mixin';
2
+
3
+ @value baseAutoGrid from './base/Grid.module.scss';
4
+
5
+ @layer flux-base {
6
+ .aspectRatio {
7
+ position: relative;
8
+ flex-shrink: 0;
9
+
10
+ > * {
11
+ height: 100%;
12
+ width: 100%;
13
+ }
14
+ }
15
+
16
+ .autoGrid {
17
+ composes: baseAutoGrid;
18
+ }
19
+
20
+ .container {
21
+ margin-left: auto;
22
+ margin-right: auto;
23
+ padding-left: var(--gutter);
24
+ padding-right: var(--gutter);
25
+ width: 100%;
26
+
27
+ @include mixin.breakpoint-max-widths;
28
+ }
29
+
30
+ .spacer {
31
+ flex-grow: 1;
32
+ }
33
+
34
+ .stack {
35
+ gap: var(--gap, 0);
36
+
37
+ &.isCentered {
38
+ place-content: center;
39
+ place-items: center;
40
+ }
41
+
42
+ &.isFill {
43
+ width: 100%;
44
+ }
45
+
46
+ &.isWrapping {
47
+ flex-wrap: wrap;
48
+ }
49
+ }
50
+
51
+ .stackHorizontal {
52
+ composes: stack;
53
+
54
+ display: flex;
55
+ }
56
+
57
+ .stackVertical {
58
+ composes: stack;
59
+
60
+ display: flex;
61
+ flex-flow: column;
62
+ }
63
+ }
@@ -0,0 +1,32 @@
1
+ @value stackHorizontal, stackVertical from './Layout.module.scss';
2
+
3
+ .legendHorizontal {
4
+ composes: stackHorizontal;
5
+
6
+ gap: 12px 21px;
7
+ }
8
+
9
+ .legendVertical {
10
+ composes: stackVertical;
11
+
12
+ gap: 12px;
13
+ }
14
+
15
+ .legendItem {
16
+ display: flex;
17
+ flex-flow: row nowrap;
18
+ gap: 6px;
19
+ font-size: 14px;
20
+ line-height: 1;
21
+
22
+ &::before {
23
+ display: block;
24
+ margin-top: 1px;
25
+ height: 12px;
26
+ width: 12px;
27
+ content: '';
28
+ flex: 0 0 12px;
29
+ background: var(--color);
30
+ border-radius: 99px;
31
+ }
32
+ }
@@ -0,0 +1,314 @@
1
+ @use '$flux/css/mixin';
2
+
3
+ @value button, buttonIcon, buttonLabel from './base/Button.module.scss';
4
+ @value basePane from './base/Pane.module.scss';
5
+
6
+ .menu {
7
+ display: flex;
8
+ flex-flow: column;
9
+ }
10
+
11
+ .menuNormal {
12
+ composes: menu;
13
+
14
+ gap: 6px;
15
+ }
16
+
17
+ .menuLarge {
18
+ composes: menu;
19
+
20
+ gap: 9px;
21
+ }
22
+
23
+ .menuGroup {
24
+ counter-reset: menu-group;
25
+ }
26
+
27
+ .menuGroupHorizontal {
28
+ composes: menuGroup;
29
+
30
+ display: flex;
31
+ gap: 3px;
32
+ }
33
+
34
+ .menuGroupVertical {
35
+ composes: menuGroup;
36
+
37
+ display: flex;
38
+ flex-flow: column;
39
+ gap: 1px;
40
+ }
41
+
42
+ .menuItem {
43
+ composes: button;
44
+
45
+ height: unset;
46
+ min-height: 42px;
47
+ padding: 6px 12px;
48
+ gap: 15px;
49
+ justify-content: flex-start;
50
+ border: 0;
51
+ box-shadow: none;
52
+ color: var(--foreground);
53
+ text-align: left;
54
+
55
+ @include mixin.hover {
56
+ background: rgb(var(--gray-2));
57
+ }
58
+
59
+ &:active {
60
+ background: rgb(var(--gray-3));
61
+ }
62
+ }
63
+
64
+ .menuItemIcon {
65
+ composes: buttonIcon;
66
+
67
+ color: var(--foreground-prominent);
68
+ }
69
+
70
+ .menuItemLabel {
71
+ composes: buttonLabel;
72
+
73
+ flex-grow: 1;
74
+ font-weight: 400;
75
+ text-align: left;
76
+
77
+ &:only-child {
78
+ margin-left: 0;
79
+ margin-right: 0;
80
+ min-width: unset;
81
+ }
82
+ }
83
+
84
+ .menuItemActive {
85
+ background: rgb(var(--primary-7));
86
+ color: rgb(var(--primary-1));
87
+
88
+ .menuItemIcon {
89
+ color: rgb(var(--primary-0));
90
+ }
91
+
92
+ @media (hover: hover) {
93
+ &:hover {
94
+ background: rgb(var(--primary-7));
95
+ }
96
+ }
97
+
98
+ &:active {
99
+ background: rgb(var(--primary-7));
100
+ }
101
+ }
102
+
103
+ .menuItemDestructive {
104
+ .menuItemIcon {
105
+ color: rgb(var(--danger-8));
106
+ }
107
+
108
+ .menuItemLabel {
109
+ color: rgb(var(--danger-8));
110
+ }
111
+ }
112
+
113
+ .menuItemHighlighted {
114
+ background: rgb(var(--primary-2));
115
+ color: rgb(var(--primary-7));
116
+
117
+ .menuItemIcon {
118
+ color: rgb(var(--primary-8));
119
+ }
120
+
121
+ @media (hover: hover) {
122
+ &:hover {
123
+ background: rgb(var(--primary-2));
124
+ }
125
+ }
126
+
127
+ &:active {
128
+ background: rgb(var(--primary-2));
129
+ }
130
+ }
131
+
132
+ [dark] .menuItemHighlighted {
133
+ background: rgb(var(--primary-11) / .5);
134
+
135
+ @media (hover: hover) {
136
+ &:hover {
137
+ background: rgb(var(--primary-11) / .5);
138
+ }
139
+ }
140
+
141
+ &:active {
142
+ background: rgb(var(--primary-11) / .5);
143
+ }
144
+ }
145
+
146
+ .menuItemIndented {
147
+ margin-left: 33px;
148
+ }
149
+
150
+ .menuItemSelectableIcon {
151
+ composes: buttonIcon;
152
+ }
153
+
154
+ .menuItemSelected .menuItemSelectableIcon {
155
+ color: rgb(var(--primary-7));
156
+ }
157
+
158
+ .menuItemCommand {
159
+ margin-top: 1px;
160
+ margin-left: auto;
161
+ padding-left: 6px;
162
+ color: var(--foreground-secondary);
163
+ font: inherit;
164
+ font-size: 14px;
165
+ white-space: nowrap;
166
+ }
167
+
168
+ .menuItemCommandIcon {
169
+ margin-right: -6px;
170
+ color: var(--foreground-secondary);
171
+
172
+ &.icon {
173
+ font-size: 16px;
174
+ }
175
+ }
176
+
177
+ .menuItemCommand + .menuItemCommandIcon {
178
+ margin-left: -9px;
179
+ }
180
+
181
+ .menuItemActive .menuItemCommand,
182
+ .menuItemActive .menuItemCommandIcon {
183
+ color: rgb(var(--primary-4));
184
+ }
185
+
186
+ .menuItemImage {
187
+ margin-left: -2px;
188
+ margin-right: -2px;
189
+ height: 24px;
190
+ width: 24px;
191
+ border-radius: 3px;
192
+ }
193
+
194
+ .menuGroupHorizontal .menuItem {
195
+ flex-basis: 0;
196
+ flex-grow: 1;
197
+
198
+ &:has(.menuItemIcon:only-child) {
199
+ justify-content: center;
200
+ }
201
+ }
202
+
203
+ .menuTitle {
204
+ padding: 0 12px;
205
+ color: var(--foreground-prominent);
206
+ font-size: 18px;
207
+ font-weight: 700;
208
+ }
209
+
210
+ .menuSubHeader {
211
+ position: sticky;
212
+ display: flex;
213
+ top: 0;
214
+ margin-top: -9px;
215
+ margin-bottom: -3px;
216
+ padding: 12px 12px 6px;
217
+ align-items: center;
218
+ gap: 9px;
219
+ background: linear-gradient(to bottom, rgb(var(--gray-0)) 75%, transparent);
220
+ font-size: 14px;
221
+ pointer-events: none;
222
+ z-index: 1;
223
+ }
224
+
225
+ .menuSubHeaderIcon,
226
+ .menuSubHeaderLabel {
227
+ color: var(--foreground-secondary);
228
+ }
229
+
230
+ .menuSubHeaderIcon {
231
+ font-size: 16px;
232
+ }
233
+
234
+ .menuSubHeaderLabel {
235
+ flex-grow: 1;
236
+ }
237
+
238
+ .menuItem + .menuSubHeader {
239
+ margin-top: 9px;
240
+ }
241
+
242
+ .menuLarge .menuItem {
243
+ position: relative;
244
+ padding-left: 15px;
245
+ padding-right: 15px;
246
+
247
+ &::after {
248
+ position: absolute;
249
+ display: block;
250
+ top: 12px;
251
+ right: 12px;
252
+ bottom: 12px;
253
+ width: 4px;
254
+ content: '';
255
+ background: rgb(var(--primary-7));
256
+ border-radius: 99px;
257
+ opacity: 0;
258
+ transition: opacity 180ms var(--swift-out);
259
+ }
260
+ }
261
+
262
+ .menuLarge .menuItem:not(.menuItemIndented) {
263
+ min-height: 48px;
264
+
265
+ &::after {
266
+ background: rgb(var(--primary-0));
267
+ }
268
+ }
269
+
270
+ .menuLarge .menuItemActive {
271
+ &::after {
272
+ opacity: 1;
273
+ }
274
+
275
+ &.menuItemIndented {
276
+ background: rgb(var(--gray-2));
277
+
278
+ .menuItemIcon,
279
+ .menuItemLabel {
280
+ color: var(--foreground-prominent);
281
+ }
282
+ }
283
+ }
284
+
285
+ :local(.basePane) > .menu {
286
+ margin-left: 9px;
287
+ margin-right: 9px;
288
+
289
+ &:first-child {
290
+ margin-top: 9px;
291
+ }
292
+
293
+ &:last-child {
294
+ margin-bottom: 9px;
295
+ }
296
+
297
+ > :where(.divider, .separator) {
298
+ margin: 3px -9px;
299
+ }
300
+ }
301
+
302
+ :local(.expandableBody) > .menu {
303
+ margin-left: 9px;
304
+ margin-right: 9px;
305
+
306
+ &:last-child {
307
+ margin-bottom: 9px;
308
+ }
309
+
310
+ > :where(.divider, .separator) {
311
+ margin-left: 21px;
312
+ margin-right: 21px;
313
+ }
314
+ }