@flux-ui/components 3.0.0-next.33 → 3.0.0-next.35

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 (44) hide show
  1. package/dist/component/FluxBoxedIcon.vue.d.ts +1 -5
  2. package/dist/component/FluxCommandPalette.vue.d.ts +52 -0
  3. package/dist/component/FluxCommandPaletteGroup.vue.d.ts +8 -0
  4. package/dist/component/FluxCommandPaletteItem.vue.d.ts +18 -0
  5. package/dist/component/FluxFormDateRangeInput.vue.d.ts +1 -5
  6. package/dist/component/FluxTag.vue.d.ts +1 -0
  7. package/dist/component/index.d.ts +4 -1
  8. package/dist/composable/private/useCommandPalette.d.ts +38 -0
  9. package/dist/index.css +320 -0
  10. package/dist/index.js +686 -120
  11. package/dist/index.js.map +1 -1
  12. package/package.json +10 -10
  13. package/src/component/FluxBoxedIcon.vue +0 -4
  14. package/src/component/FluxCalendar.vue +2 -1
  15. package/src/component/FluxChip.vue +1 -1
  16. package/src/component/FluxColorPicker.vue +1 -1
  17. package/src/component/FluxColorSelect.vue +3 -3
  18. package/src/component/FluxCommandPalette.vue +290 -0
  19. package/src/component/FluxCommandPaletteGroup.vue +23 -0
  20. package/src/component/FluxCommandPaletteItem.vue +60 -0
  21. package/src/component/FluxDatePicker.vue +0 -1
  22. package/src/component/FluxFader.vue +2 -2
  23. package/src/component/FluxFocalPointEditor.vue +3 -3
  24. package/src/component/FluxFormDateRangeInput.vue +0 -5
  25. package/src/component/FluxFormDateTimeInput.vue +2 -2
  26. package/src/component/FluxFormSelect.vue +2 -2
  27. package/src/component/FluxFormTextArea.vue +1 -0
  28. package/src/component/FluxQuantitySelector.vue +3 -6
  29. package/src/component/FluxSnackbar.vue +5 -3
  30. package/src/component/FluxTableActions.vue +3 -3
  31. package/src/component/FluxTag.vue +3 -1
  32. package/src/component/index.ts +4 -1
  33. package/src/component/primitive/CoordinatePicker.vue +10 -11
  34. package/src/component/primitive/FilterItem.vue +11 -2
  35. package/src/component/primitive/SelectBase.vue +2 -2
  36. package/src/component/primitive/SliderBase.vue +10 -13
  37. package/src/composable/private/useCommandPalette.ts +405 -0
  38. package/src/composable/private/useFormSelect.ts +2 -2
  39. package/src/css/component/Badge.module.scss +7 -0
  40. package/src/css/component/CommandPalette.module.scss +332 -0
  41. package/src/css/reset.scss +0 -107
  42. package/src/css/variables.scss +0 -26
  43. /package/dist/component/{FluxActions.vue.d.ts → FluxActionStack.vue.d.ts} +0 -0
  44. /package/src/component/{FluxActions.vue → FluxActionStack.vue} +0 -0
@@ -0,0 +1,332 @@
1
+ @use "$flux/css/mixin";
2
+
3
+ .commandPaletteBackdrop {
4
+ position: fixed;
5
+ inset: 0;
6
+ background: var(--overlay);
7
+ backdrop-filter: blur(3px) saturate(180%);
8
+ animation: commandPaletteBackdropIn 300ms var(--swift-out) both;
9
+ z-index: 99000;
10
+
11
+ &.isClosing {
12
+ animation: commandPaletteBackdropOut 210ms var(--swift-out) both;
13
+ }
14
+ }
15
+
16
+ .commandPaletteDialog {
17
+ position: fixed;
18
+ inset: 0;
19
+ display: flex;
20
+ padding-top: clamp(60px, 15vh, 160px);
21
+ align-items: flex-start;
22
+ justify-content: center;
23
+ animation: commandPaletteIn 300ms var(--swift-out) both;
24
+ z-index: 99001;
25
+
26
+ &.isClosing {
27
+ animation: commandPaletteOut 210ms var(--swift-out) both;
28
+ pointer-events: none;
29
+ }
30
+ }
31
+
32
+ .commandPalette {
33
+ display: flex;
34
+ overflow: hidden;
35
+ width: min(600px, calc(100dvw - 48px));
36
+ max-height: min(480px, calc(100dvh - 120px - clamp(60px, 15vh, 160px)));
37
+ flex-flow: column nowrap;
38
+ background: var(--surface);
39
+ background-clip: padding-box;
40
+ border: 1px solid var(--surface-stroke-out);
41
+ border-radius: var(--radius);
42
+ box-shadow: var(--shadow-lg);
43
+ transition: height 120ms var(--deceleration-curve);
44
+ }
45
+
46
+ .commandPaletteSearch {
47
+ display: flex;
48
+ height: 54px;
49
+ padding: 0 18px;
50
+ align-items: center;
51
+ flex-shrink: 0;
52
+ gap: 12px;
53
+ border-bottom: 1px solid var(--gray-100);
54
+ }
55
+
56
+ .commandPaletteSearchIcon {
57
+ flex-shrink: 0;
58
+ color: var(--foreground-secondary);
59
+ font-size: 16px;
60
+ }
61
+
62
+ .commandPaletteSearchInput {
63
+ height: 100%;
64
+ flex-grow: 1;
65
+ background: transparent;
66
+ border: 0;
67
+ color: var(--foreground);
68
+ font: inherit;
69
+ font-size: 16px;
70
+ outline: 0;
71
+
72
+ &::placeholder {
73
+ color: var(--foreground-secondary);
74
+ }
75
+ }
76
+
77
+ .commandPaletteBreadcrumb {
78
+ padding: 0;
79
+ flex-shrink: 0;
80
+ background: transparent;
81
+ border: 0;
82
+ cursor: pointer;
83
+ color: var(--foreground-secondary);
84
+ font: inherit;
85
+ font-size: 15px;
86
+ font-weight: 500;
87
+ white-space: nowrap;
88
+ transition: color 150ms;
89
+
90
+ @include mixin.hover {
91
+ color: var(--foreground);
92
+ }
93
+ }
94
+
95
+ .commandPaletteBreadcrumbSeparator {
96
+ flex-shrink: 0;
97
+ opacity: .5;
98
+ color: var(--foreground-secondary);
99
+ font-size: 14px;
100
+ }
101
+
102
+
103
+ .commandPaletteTabs {
104
+ display: flex;
105
+ overflow-x: auto;
106
+ scrollbar-width: none;
107
+ padding: 6px 15px;
108
+ flex-shrink: 0;
109
+ gap: 3px;
110
+ border-bottom: 1px solid var(--gray-100);
111
+
112
+ &::-webkit-scrollbar {
113
+ display: none;
114
+ }
115
+ }
116
+
117
+ .commandPaletteTab {
118
+ display: flex;
119
+ height: 30px;
120
+ padding: 0 10px;
121
+ align-items: center;
122
+ gap: 6px;
123
+ background: transparent;
124
+ border: 0;
125
+ border-radius: var(--radius-half);
126
+ cursor: pointer;
127
+ color: var(--foreground-secondary);
128
+ font: inherit;
129
+ font-size: 13px;
130
+ font-weight: 500;
131
+ white-space: nowrap;
132
+ transition: background 150ms, color 150ms;
133
+
134
+ @include mixin.hover {
135
+ background: var(--gray-100);
136
+ color: var(--foreground);
137
+ }
138
+ }
139
+
140
+ .commandPaletteTabActive {
141
+ composes: commandPaletteTab;
142
+
143
+ background: var(--primary-100);
144
+ color: var(--primary-700);
145
+
146
+ @include mixin.hover {
147
+ background: var(--primary-100);
148
+ color: var(--primary-700);
149
+ }
150
+ }
151
+
152
+ .commandPaletteTabIcon {
153
+ font-size: 13px;
154
+ }
155
+
156
+ .commandPaletteResults {
157
+ overflow-y: auto;
158
+ overscroll-behavior: contain;
159
+ scroll-padding-block: 42px 6px;
160
+ scrollbar-width: thin;
161
+ padding: 6px;
162
+ flex-grow: 1;
163
+ }
164
+
165
+ .commandPaletteLoading {
166
+ display: flex;
167
+ padding: 24px;
168
+ align-items: center;
169
+ justify-content: center;
170
+ }
171
+
172
+ .commandPaletteEmpty {
173
+ display: flex;
174
+ padding: 24px;
175
+ align-items: center;
176
+ justify-content: center;
177
+ color: var(--foreground-secondary);
178
+ font-size: 14px;
179
+ }
180
+
181
+ .commandPaletteGroup {
182
+ display: flex;
183
+ padding: 9px 10px 3px;
184
+ align-items: center;
185
+ gap: 6px;
186
+ color: var(--foreground-secondary);
187
+ font-size: 12px;
188
+ font-weight: 600;
189
+ text-transform: uppercase;
190
+ letter-spacing: 0.05em;
191
+ pointer-events: none;
192
+ }
193
+
194
+ .commandPaletteGroupIcon {
195
+ font-size: 12px;
196
+ }
197
+
198
+ .commandPaletteItem {
199
+ display: flex;
200
+ width: 100%;
201
+ padding: 8px 10px;
202
+ align-items: center;
203
+ gap: 10px;
204
+ background: transparent;
205
+ border: 0;
206
+ border-radius: var(--radius-half);
207
+ cursor: pointer;
208
+ color: var(--foreground);
209
+ font: inherit;
210
+ font-size: 14px;
211
+ text-align: left;
212
+ transition: background 100ms;
213
+
214
+ @include mixin.hover {
215
+ background: var(--gray-100);
216
+ }
217
+
218
+ &:active {
219
+ background: var(--gray-200);
220
+ }
221
+ }
222
+
223
+ .commandPaletteItemHighlighted {
224
+ composes: commandPaletteItem;
225
+
226
+ background: var(--gray-100);
227
+
228
+ @include mixin.hover {
229
+ background: var(--gray-100);
230
+ }
231
+ }
232
+
233
+ .commandPaletteItemIcon {
234
+ display: flex;
235
+ width: 30px;
236
+ height: 30px;
237
+ align-items: center;
238
+ align-self: flex-start;
239
+ flex-shrink: 0;
240
+ justify-content: center;
241
+ background: var(--gray-100);
242
+ border-radius: var(--radius-half);
243
+ color: var(--foreground);
244
+ transition: background 100ms, color 100ms;
245
+
246
+ :local(.icon) {
247
+ font-size: 16px;
248
+ }
249
+ }
250
+
251
+ .commandPaletteItemHighlighted .commandPaletteItemIcon {
252
+ background: var(--gray-200);
253
+ }
254
+
255
+ .commandPaletteItemContent {
256
+ overflow: hidden;
257
+ flex-grow: 1;
258
+ }
259
+
260
+ .commandPaletteItemLabel {
261
+ overflow: hidden;
262
+ white-space: nowrap;
263
+ text-overflow: ellipsis;
264
+ }
265
+
266
+ .commandPaletteItemSubLabel {
267
+ overflow: hidden;
268
+ margin-top: 1px;
269
+ color: var(--foreground-secondary);
270
+ font-size: 12px;
271
+ white-space: nowrap;
272
+ text-overflow: ellipsis;
273
+ transition: color 100ms;
274
+ }
275
+
276
+ .commandPaletteItemHighlighted .commandPaletteItemSubLabel {
277
+ color: var(--primary-500);
278
+ }
279
+
280
+
281
+ .commandPaletteItemSubActionIndicator {
282
+ flex-shrink: 0;
283
+ color: var(--foreground-secondary);
284
+ font-size: 12px;
285
+ transition: color 100ms;
286
+ }
287
+
288
+ .commandPaletteItemHighlighted .commandPaletteItemSubActionIndicator {
289
+ color: var(--primary-500);
290
+ }
291
+
292
+ @keyframes commandPaletteIn {
293
+ from {
294
+ opacity: 0;
295
+ scale: 1.05;
296
+ }
297
+
298
+ to {
299
+ opacity: 1;
300
+ scale: 1;
301
+ }
302
+ }
303
+
304
+ @keyframes commandPaletteOut {
305
+ from {
306
+ opacity: 1;
307
+ }
308
+
309
+ to {
310
+ opacity: 0;
311
+ }
312
+ }
313
+
314
+ @keyframes commandPaletteBackdropIn {
315
+ from {
316
+ opacity: 0;
317
+ }
318
+
319
+ to {
320
+ opacity: 1;
321
+ }
322
+ }
323
+
324
+ @keyframes commandPaletteBackdropOut {
325
+ from {
326
+ opacity: 1;
327
+ }
328
+
329
+ to {
330
+ opacity: 0;
331
+ }
332
+ }
@@ -9,11 +9,6 @@
9
9
  margin: 0;
10
10
  }
11
11
 
12
- // Keyword animations.
13
- //html {
14
- // interpolate-size: allow-keywords;
15
- //}
16
-
17
12
  body {
18
13
  // Accessible line-height.
19
14
  line-height: 1.5;
@@ -71,105 +66,3 @@
71
66
  isolation: isolate;
72
67
  }
73
68
  }
74
-
75
- //@layer flux-reset {
76
- // *,
77
- // *::before,
78
- // *::after {
79
- // box-sizing: border-box;
80
- // }
81
- //
82
- // html {
83
- // line-height: 1.6;
84
- // -webkit-text-size-adjust: 100%;
85
- // -webkit-tap-highlight-color: rgb(0 0 0 / 0);
86
- // -moz-tab-size: 4;
87
- // tab-size: 4;
88
- // }
89
- //
90
- // body {
91
- // margin: 0;
92
- // padding: 0;
93
- // line-height: inherit;
94
- // }
95
- //
96
- // blockquote,
97
- // dl,
98
- // dd,
99
- // h1,
100
- // h2,
101
- // h3,
102
- // h4,
103
- // h5,
104
- // h6,
105
- // hr,
106
- // figure,
107
- // p,
108
- // pre {
109
- // margin: 0;
110
- // }
111
- //
112
- // h1,
113
- // h2,
114
- // h3,
115
- // h4,
116
- // h5,
117
- // h6 {
118
- // font-size: inherit;
119
- // font-weight: inherit;
120
- // }
121
- //
122
- // ul,
123
- // ol {
124
- // margin: 0;
125
- // }
126
- //
127
- // code,
128
- // kbd,
129
- // samp,
130
- // pre {
131
- // font-family: monospace;
132
- // font-size: 1em;
133
- // }
134
- //
135
- // small {
136
- // font-size: 80%;
137
- // }
138
- //
139
- // sub,
140
- // sup {
141
- // position: relative;
142
- // font-size: 75%;
143
- // line-height: 0;
144
- // vertical-align: baseline;
145
- // }
146
- //
147
- // sub {
148
- // bottom: -0.25em;
149
- // }
150
- //
151
- // sup {
152
- // top: -0.5em;
153
- // }
154
- //
155
- // button,
156
- // select {
157
- // text-transform: none;
158
- // }
159
- //
160
- // button,
161
- // input,
162
- // textarea {
163
- // font: inherit;
164
- // }
165
- //
166
- // a {
167
- // color: inherit;
168
- // text-decoration: none;
169
- // }
170
- //
171
- // b,
172
- // strong {
173
- // font-weight: bolder;
174
- // }
175
- //}
@@ -21,32 +21,6 @@
21
21
  --gray-900: #1a1f2d;
22
22
  --gray-950: #090c19;
23
23
 
24
- //--gray-25: #ffffff;
25
- //--gray-50: #f9fafb;
26
- //--gray-100: #f3f4f6;
27
- //--gray-200: #e5e7eb;
28
- //--gray-300: #d1d5db;
29
- //--gray-400: #9ca3af;
30
- //--gray-500: #6b7280;
31
- //--gray-600: #4b5563;
32
- //--gray-700: #374151;
33
- //--gray-800: #1f2937;
34
- //--gray-900: #111827;
35
- //--gray-950: #030712;
36
-
37
- //--gray-25: #ffffff;
38
- //--gray-50: #f9fafb;
39
- //--gray-100: #f1f5f9;
40
- //--gray-200: #e2e8f0;
41
- //--gray-300: #cbd5e1;
42
- //--gray-400: #94a3b8;
43
- //--gray-500: #64748b;
44
- //--gray-600: #475569;
45
- //--gray-700: #334155;
46
- //--gray-800: #1e293b;
47
- //--gray-900: #0f172a;
48
- //--gray-950: #020617;
49
-
50
24
  --primary-25: #fcfcfc;
51
25
  --primary-50: #ebf2ff;
52
26
  --primary-100: #d7e5ff;