@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,177 @@
1
+ @use '$flux/css/mixin';
2
+
3
+ .avatar {
4
+ position: relative;
5
+ display: inline-flex;
6
+ height: 1em;
7
+ width: 1em;
8
+ flex: 0 0 1em;
9
+ border-radius: .5em;
10
+ user-select: none;
11
+ }
12
+
13
+ .avatarImage {
14
+ display: block;
15
+ height: inherit;
16
+ width: inherit;
17
+ background: rgb(var(--gray-1));
18
+ border-radius: inherit;
19
+ box-shadow: inset 0 0 0 1px rgb(var(--gray-2));
20
+ }
21
+
22
+ .avatarFallback {
23
+ position: absolute;
24
+ display: flex;
25
+ inset: 0;
26
+ align-items: center;
27
+ justify-content: center;
28
+ border-radius: inherit;
29
+
30
+ .icon {
31
+ font-size: .5em;
32
+ }
33
+
34
+ :is(span) {
35
+ font-size: .4em;
36
+ font-weight: 600;
37
+ line-height: 1;
38
+ }
39
+ }
40
+
41
+ .avatarFallbackColorized {
42
+ composes: avatarFallback;
43
+
44
+ background: color-mix(in srgb, var(--color), rgb(var(--gray-0)) 80%);
45
+ color: var(--color);
46
+ }
47
+
48
+ [dark] .avatarFallbackColorized {
49
+ background: color-mix(in srgb, var(--color), rgb(var(--gray-0)) 70%);
50
+ }
51
+
52
+ .avatarFallbackNeutral {
53
+ composes: avatarFallback;
54
+
55
+ background: rgb(var(--gray-3));
56
+ color: var(--foreground-secondary);
57
+ }
58
+
59
+ .avatarLoading {
60
+ position: absolute;
61
+ display: flex;
62
+ inset: 0;
63
+ align-items: center;
64
+ justify-content: center;
65
+ background: rgb(var(--gray-1) / .84);
66
+ box-shadow: inset 0 0 0 1px rgb(var(--gray-2));
67
+ border-radius: inherit;
68
+ backdrop-filter: blur(3px) saturate(180%);
69
+
70
+ :local(.spinner) {
71
+ --track: rgb(0 0 0 / .12);
72
+ }
73
+ }
74
+
75
+ .avatarStatus {
76
+ position: absolute;
77
+ display: block;
78
+ right: 0.0238095238em;
79
+ bottom: 0.0238095238em;
80
+ height: 0.285714286em;
81
+ width: 0.285714286em;
82
+ background: black;
83
+ border-radius: 99px;
84
+ }
85
+
86
+ .avatarStatusGray {
87
+ composes: avatarStatus;
88
+
89
+ background: rgb(var(--gray-6));
90
+ }
91
+
92
+ .avatarStatusPrimary {
93
+ composes: avatarStatus;
94
+
95
+ background: rgb(var(--primary-7));
96
+ }
97
+
98
+ .avatarStatusDanger {
99
+ composes: avatarStatus;
100
+
101
+ background: rgb(var(--danger-7));
102
+ }
103
+
104
+ .avatarStatusInfo {
105
+ composes: avatarStatus;
106
+
107
+ background: rgb(var(--info-7));
108
+ }
109
+
110
+ .avatarStatusSuccess {
111
+ composes: avatarStatus;
112
+
113
+ background: rgb(var(--success-7));
114
+ }
115
+
116
+ .avatarStatusWarning {
117
+ composes: avatarStatus;
118
+
119
+ background: rgb(var(--warning-7));
120
+ }
121
+
122
+ .avatarClickable {
123
+ cursor: pointer;
124
+ transition: filter 150ms var(--swift-out);
125
+
126
+ @include mixin.hover {
127
+ filter: brightness(110%);
128
+ }
129
+ }
130
+
131
+ .statusAvatar {
132
+ composes: avatar;
133
+ }
134
+
135
+ .statusAvatar .avatarFallback,
136
+ .statusAvatar .avatarImage {
137
+ mask: url('$flux/image/avatar-mask.svg') no-repeat center center / cover;
138
+ -webkit-mask: url('$flux/image/avatar-mask.svg') no-repeat center center / cover;
139
+ }
140
+
141
+ .persona {
142
+ display: flex;
143
+ padding: 6px;
144
+ align-items: center;
145
+ gap: 12px;
146
+ background: unset;
147
+ border: 0;
148
+ border-radius: var(--radius);
149
+ cursor: pointer;
150
+ text-align: left;
151
+ transition: 180ms var(--swift-out);
152
+ transition-property: background, mixin.focus-ring-transition-properties();
153
+
154
+ @include mixin.focus-ring(2px);
155
+
156
+ @include mixin.hover {
157
+ background: rgb(var(--gray-2));
158
+ }
159
+ }
160
+
161
+ .personaDetails {
162
+ display: flex;
163
+ margin-right: 9px;
164
+ flex-flow: column;
165
+ gap: 3px;
166
+ line-height: 1.2;
167
+
168
+ :is(strong) {
169
+ width: max-content;
170
+ color: var(--foreground-prominent);
171
+ }
172
+
173
+ :is(span) {
174
+ color: var(--foreground);
175
+ font-size: 14px;
176
+ }
177
+ }
@@ -0,0 +1,189 @@
1
+ @use '$flux/css/mixin';
2
+
3
+ .badge {
4
+ display: inline-flex;
5
+ height: 28px;
6
+ margin-top: -2px;
7
+ margin-bottom: -2px;
8
+ padding-left: 9px;
9
+ padding-right: 9px;
10
+ align-items: center;
11
+ gap: 6px;
12
+ background: rgb(var(--gray-0));
13
+ border: 1px solid rgb(var(--gray-3));
14
+ border-radius: 99px;
15
+ color: var(--foreground-prominent);
16
+ font-size: 13px;
17
+ font-weight: 500;
18
+
19
+ &:is(a) {
20
+ color: var(--foreground-prominent);
21
+ cursor: pointer;
22
+ text-decoration: none;
23
+ transition: background 180ms var(--swift-out);
24
+
25
+ @include mixin.hover {
26
+ background: rgb(var(--gray-1));
27
+ color: var(--foreground-prominent);
28
+ }
29
+ }
30
+
31
+ .spinner {
32
+ --value: var(--color);
33
+ }
34
+ }
35
+
36
+ .badgeClose {
37
+ display: flex;
38
+ height: 20px;
39
+ width: 20px;
40
+ margin-right: -6px;
41
+ padding: 5px;
42
+ align-items: center;
43
+ justify-content: center;
44
+ background: unset;
45
+ border: 0;
46
+ border-radius: 99px;
47
+ color: var(--foreground-secondary);
48
+ cursor: pointer;
49
+
50
+ @include mixin.hover {
51
+ background: rgb(var(--gray-2));
52
+ color: var(--foreground);
53
+ }
54
+
55
+ &:active {
56
+ background: rgb(var(--gray-3));
57
+ color: var(--foreground);
58
+ }
59
+
60
+ .icon {
61
+ font-size: 16px;
62
+ }
63
+ }
64
+
65
+ .badgeDot {
66
+ display: block;
67
+ height: 9px;
68
+ width: 9px;
69
+ background: var(--color);
70
+ border-radius: 99px;
71
+ }
72
+
73
+ .badgeIcon {
74
+ margin-left: -3px;
75
+ color: var(--color);
76
+ }
77
+
78
+ .badgeLabel {
79
+ overflow: hidden;
80
+ text-overflow: ellipsis;
81
+ white-space: nowrap;
82
+
83
+ &:only-child {
84
+ margin-left: 3px;
85
+ margin-right: 3px;
86
+ color: var(--color);
87
+ }
88
+ }
89
+
90
+ .badgeGray {
91
+ composes: badge;
92
+
93
+ --color: rgb(var(--gray-8));
94
+
95
+ .badgeLabel {
96
+ color: var(--foreground-prominent);
97
+ }
98
+
99
+ .spinner {
100
+ --value: rgb(var(--primary-7));
101
+ }
102
+ }
103
+
104
+ .badgePrimary {
105
+ composes: badge;
106
+
107
+ --color: rgb(var(--primary-7));
108
+ }
109
+
110
+ .badgeDanger {
111
+ composes: badge;
112
+
113
+ --color: rgb(var(--danger-7));
114
+ }
115
+
116
+ .badgeInfo {
117
+ composes: badge;
118
+
119
+ --color: rgb(var(--info-7));
120
+ }
121
+
122
+ .badgeSuccess {
123
+ composes: badge;
124
+
125
+ --color: rgb(var(--success-7));
126
+ }
127
+
128
+ .badgeWarning {
129
+ composes: badge;
130
+
131
+ --color: rgb(var(--warning-7));
132
+ }
133
+
134
+ .tag {
135
+ composes: badge;
136
+
137
+ background: rgb(var(--gray-1));
138
+ border-color: rgb(var(--gray-3));
139
+ border-radius: calc(var(--radius) / 2);
140
+ font-weight: 400;
141
+ }
142
+
143
+ .tagClose {
144
+ composes: badgeClose;
145
+
146
+ border-radius: calc(var(--radius) / 3);
147
+ }
148
+
149
+ .tagDot {
150
+ composes: badgeDot;
151
+ }
152
+
153
+ .tagIcon {
154
+ composes: badgeIcon;
155
+ }
156
+
157
+ .tagLabel {
158
+ composes: badgeLabel;
159
+ }
160
+
161
+ .tagGray {
162
+ composes: badgeGray;
163
+ composes: tag;
164
+ }
165
+
166
+ .tagPrimary {
167
+ composes: badgePrimary;
168
+ composes: tag;
169
+ }
170
+
171
+ .tagDanger {
172
+ composes: badgeDanger;
173
+ composes: tag;
174
+ }
175
+
176
+ .tagInfo {
177
+ composes: badgeInfo;
178
+ composes: tag;
179
+ }
180
+
181
+ .tagSuccess {
182
+ composes: badgeSuccess;
183
+ composes: tag;
184
+ }
185
+
186
+ .tagWarning {
187
+ composes: badgeWarning;
188
+ composes: tag;
189
+ }
@@ -0,0 +1,293 @@
1
+ @use '$flux/css/mixin';
2
+
3
+ @value button, buttonIcon, buttonLabel, isSmall, isMedium, isLarge, isXl from './base/Button.module.scss';
4
+
5
+ .primaryButton {
6
+ composes: button;
7
+
8
+ background: rgb(var(--primary-7));
9
+ border-color: rgb(var(--primary-9));
10
+ box-shadow: 0 1px 1px rgb(var(--primary-7) / .25);
11
+ color: rgb(var(--primary-0));
12
+
13
+ @include mixin.hover {
14
+ background: rgb(var(--primary-8));
15
+ }
16
+
17
+ &:active {
18
+ background: rgb(var(--primary-9));
19
+ scale: .9875;
20
+ }
21
+
22
+ .spinner {
23
+ --track: rgb(var(--primary-8));
24
+ --value: rgb(var(--primary-0));
25
+ }
26
+ }
27
+
28
+ .primaryButtonIcon {
29
+ composes: buttonIcon;
30
+
31
+ color: rgb(var(--primary-0));
32
+ }
33
+
34
+ .primaryButtonLabel {
35
+ composes: buttonLabel;
36
+ }
37
+
38
+ .secondaryButton {
39
+ composes: button;
40
+
41
+ background: rgb(var(--gray-0));
42
+ border-color: rgb(var(--gray-3));
43
+ color: var(--foreground);
44
+
45
+ @include mixin.hover {
46
+ background: rgb(var(--gray-2));
47
+ }
48
+
49
+ &:active {
50
+ background: rgb(var(--gray-3));
51
+ border-color: rgb(var(--gray-4));
52
+ scale: .9875;
53
+ }
54
+ }
55
+
56
+ .secondaryButtonIcon {
57
+ composes: buttonIcon;
58
+
59
+ color: var(--foreground-prominent);
60
+ }
61
+
62
+ .secondaryButtonLabel {
63
+ composes: buttonLabel;
64
+ }
65
+
66
+ .destructiveButton {
67
+ composes: button;
68
+
69
+ background: rgb(var(--gray-0));
70
+ border-color: rgb(var(--gray-3));
71
+ color: var(--foreground);
72
+
73
+ @include mixin.hover {
74
+ background: rgb(var(--gray-2));
75
+ }
76
+
77
+ &:active {
78
+ background: rgb(var(--gray-3));
79
+ border-color: rgb(var(--gray-4));
80
+ scale: .9875;
81
+ }
82
+
83
+ .spinner {
84
+ --value: rgb(var(--danger-7));
85
+ }
86
+ }
87
+
88
+ .destructiveButtonIcon {
89
+ composes: buttonIcon;
90
+
91
+ color: rgb(var(--danger-7));
92
+ }
93
+
94
+ .destructiveButtonLabel {
95
+ composes: buttonLabel;
96
+
97
+ &:only-child {
98
+ color: rgb(var(--danger-7));
99
+ }
100
+ }
101
+
102
+ [dark] .secondaryButton,
103
+ [dark] .destructiveButton {
104
+ background: rgb(var(--gray-1));
105
+ border-color: rgb(var(--gray-3));
106
+
107
+ @include mixin.hover {
108
+ background: rgb(var(--gray-2));
109
+ }
110
+
111
+ &:active {
112
+ background: rgb(var(--gray-3));
113
+ }
114
+ }
115
+
116
+ .secondaryButton,
117
+ .destructiveButton {
118
+ box-shadow: var(--shadow-px), inset 0 -1px rgb(var(--gray-3) / .3);
119
+ }
120
+
121
+ .linkButton {
122
+ composes: button;
123
+
124
+ display: inline-flex;
125
+ height: unset;
126
+ padding: 0;
127
+ border: 0;
128
+ box-shadow: unset;
129
+ color: rgb(var(--primary-7));
130
+ text-decoration: underline;
131
+ text-decoration-thickness: 1px;
132
+ text-underline-offset: 4px;
133
+
134
+ @include mixin.focus-ring(6px);
135
+
136
+ @include mixin.hover {
137
+ color: rgb(var(--primary-10));
138
+
139
+ .linkButtonIcon {
140
+ transform: translate3d(6px, 0, 0);
141
+ }
142
+ }
143
+ }
144
+
145
+ .linkButtonIcon {
146
+ composes: buttonIcon;
147
+
148
+ color: rgb(var(--primary-7));
149
+ transition: inherit;
150
+ transition-property: transform;
151
+
152
+ &.icon {
153
+ font-size: 16px;
154
+ }
155
+ }
156
+
157
+ .linkButtonLabel {
158
+ composes: buttonLabel;
159
+ }
160
+
161
+ .publishButton {
162
+ composes: primaryButton;
163
+
164
+ position: relative;
165
+ overflow: hidden;
166
+ }
167
+
168
+ .publishButtonIcon {
169
+ composes: primaryButtonIcon;
170
+ }
171
+
172
+ .publishButtonLabel {
173
+ composes: primaryButtonLabel;
174
+ }
175
+
176
+ .publishButtonAnimation {
177
+ position: relative;
178
+ display: block;
179
+ height: 20px;
180
+ width: 20px;
181
+ align-items: center;
182
+ justify-content: center;
183
+ overflow: visible;
184
+
185
+ :is(path) {
186
+ fill: currentColor;
187
+ transition: 270ms var(--swift-out);
188
+ }
189
+ }
190
+
191
+ .publishButton.isDone {
192
+ .publishButtonAnimationArrow {
193
+ animation: publishArrowOut .4s var(--acceleration-curve) both;
194
+ }
195
+
196
+ .publishButtonAnimationCheck,
197
+ .publishButtonAnimationCircle {
198
+ transition-delay: .5s;
199
+ }
200
+ }
201
+
202
+ .publishButton.isIdle .publishButtonAnimationCheck {
203
+ opacity: 0;
204
+ }
205
+
206
+ .publishButton.isLoading {
207
+ .publishButtonAnimationArrow {
208
+ animation: publishArrowIn 1s var(--deceleration-curve) both;
209
+ }
210
+
211
+ .publishButtonAnimationCheck,
212
+ .publishButtonAnimationCircle {
213
+ opacity: 0;
214
+ }
215
+ }
216
+
217
+ .publishButtonCloud {
218
+ position: absolute;
219
+ top: 50%;
220
+ opacity: 0;
221
+ animation: publish .6s linear infinite;
222
+ transition: 360ms var(--swift-out) 210ms;
223
+
224
+ &:nth-child(2) {
225
+ left: -12px;
226
+ animation-delay: -.3s;
227
+ }
228
+
229
+ &:nth-child(3) {
230
+ right: -12px;
231
+ }
232
+ }
233
+
234
+ .publishButton.isLoading .publishButtonCloud {
235
+ opacity: .5;
236
+ }
237
+
238
+ .buttonGroup {
239
+ display: inline-flex;
240
+ width: min-content;
241
+ flex-grow: 0;
242
+ flex-shrink: 0;
243
+ z-index: 0;
244
+
245
+ :local(.button) {
246
+ border-radius: 0;
247
+
248
+ &:first-child {
249
+ border-top-left-radius: var(--radius);
250
+ border-bottom-left-radius: var(--radius);
251
+ }
252
+
253
+ &:last-child {
254
+ border-top-right-radius: var(--radius);
255
+ border-bottom-right-radius: var(--radius);
256
+ }
257
+ }
258
+
259
+ :local(.primaryButton) {
260
+ z-index: 1;
261
+ }
262
+
263
+ :local(.button) + :local(.button) {
264
+ margin-left: -1px;
265
+ }
266
+ }
267
+
268
+ @keyframes publish {
269
+ from {
270
+ translate: 0 calc(-30px - 50%);
271
+ }
272
+
273
+ to {
274
+ translate: 0 calc(30px - 50%);
275
+ }
276
+ }
277
+
278
+ @keyframes publishArrowIn {
279
+ 25% {
280
+ translate: 0 128px;
281
+ }
282
+
283
+ 100% {
284
+ translate: 0 0;
285
+ }
286
+ }
287
+
288
+ @keyframes publishArrowOut {
289
+ to {
290
+ opacity: 0;
291
+ translate: 0 -512px;
292
+ }
293
+ }