@flux-ui/components 3.1.2 → 3.1.3

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 (61) hide show
  1. package/dist/component/FluxAvatarGroup.vue.d.ts +17 -0
  2. package/dist/component/FluxContextMenu.vue.d.ts +26 -0
  3. package/dist/component/FluxDataTable.vue.d.ts +20 -10
  4. package/dist/component/FluxDescriptionItem.vue.d.ts +19 -0
  5. package/dist/component/FluxDescriptionList.vue.d.ts +17 -0
  6. package/dist/component/FluxFormCombobox.vue.d.ts +20 -0
  7. package/dist/component/FluxFormRating.vue.d.ts +21 -0
  8. package/dist/component/FluxFormTagsInput.vue.d.ts +27 -0
  9. package/dist/component/FluxFormTextArea.vue.d.ts +6 -1
  10. package/dist/component/FluxInlineEdit.vue.d.ts +41 -0
  11. package/dist/component/FluxMenu.vue.d.ts +1 -0
  12. package/dist/component/FluxMenuFlyout.vue.d.ts +22 -0
  13. package/dist/component/FluxTableCell.vue.d.ts +1 -0
  14. package/dist/component/FluxTour.vue.d.ts +35 -0
  15. package/dist/component/FluxTourItem.vue.d.ts +18 -0
  16. package/dist/component/FluxVirtualScroller.vue.d.ts +27 -0
  17. package/dist/component/index.d.ts +12 -0
  18. package/dist/component/primitive/AnchorPopup.vue.d.ts +7 -1
  19. package/dist/component/primitive/SelectBase.vue.d.ts +3 -0
  20. package/dist/composable/private/index.d.ts +1 -0
  21. package/dist/composable/private/useMenuFlyout.d.ts +42 -0
  22. package/dist/data/di.d.ts +35 -0
  23. package/dist/data/i18n.d.ts +7 -0
  24. package/dist/index.css +441 -1
  25. package/dist/index.js +2018 -407
  26. package/dist/index.js.map +1 -1
  27. package/package.json +7 -7
  28. package/src/component/FluxAvatarGroup.vue +52 -0
  29. package/src/component/FluxContextMenu.vue +134 -0
  30. package/src/component/FluxDataTable.vue +113 -32
  31. package/src/component/FluxDescriptionItem.vue +43 -0
  32. package/src/component/FluxDescriptionList.vue +37 -0
  33. package/src/component/FluxFormCombobox.vue +98 -0
  34. package/src/component/FluxFormRating.vue +172 -0
  35. package/src/component/FluxFormTagsInput.vue +249 -0
  36. package/src/component/FluxFormTextArea.vue +16 -1
  37. package/src/component/FluxInlineEdit.vue +176 -0
  38. package/src/component/FluxMenu.vue +13 -3
  39. package/src/component/FluxMenuFlyout.vue +118 -0
  40. package/src/component/FluxTableCell.vue +2 -0
  41. package/src/component/FluxTour.vue +332 -0
  42. package/src/component/FluxTourItem.vue +27 -0
  43. package/src/component/FluxVirtualScroller.vue +96 -0
  44. package/src/component/index.ts +12 -0
  45. package/src/component/primitive/AnchorPopup.vue +27 -0
  46. package/src/component/primitive/SelectBase.vue +37 -2
  47. package/src/composable/private/index.ts +1 -0
  48. package/src/composable/private/useMenuFlyout.ts +417 -0
  49. package/src/css/component/AvatarGroup.module.scss +22 -0
  50. package/src/css/component/ContextMenu.module.scss +17 -0
  51. package/src/css/component/DescriptionList.module.scss +98 -0
  52. package/src/css/component/Form.module.scss +51 -0
  53. package/src/css/component/FormRating.module.scss +47 -0
  54. package/src/css/component/InlineEdit.module.scss +45 -0
  55. package/src/css/component/Menu.module.scss +4 -1
  56. package/src/css/component/MenuFlyout.module.scss +38 -0
  57. package/src/css/component/Table.module.scss +16 -0
  58. package/src/css/component/Tour.module.scss +108 -0
  59. package/src/css/component/VirtualScroller.module.scss +17 -0
  60. package/src/data/di.ts +40 -0
  61. package/src/data/i18n.ts +7 -0
@@ -1134,3 +1134,54 @@
1134
1134
  transition: 210ms var(--swift-out);
1135
1135
  transition-property: background, border-color, color, opacity, scale, translate, mixin.focus-ring-transition-properties();
1136
1136
  }
1137
+
1138
+ .formTagsInput {
1139
+ composes: formInput;
1140
+
1141
+ display: flex;
1142
+ height: unset;
1143
+ min-height: 42px;
1144
+ padding: 4px 6px;
1145
+ align-items: center;
1146
+ flex-wrap: wrap;
1147
+ gap: 6px;
1148
+ cursor: text;
1149
+
1150
+ &:not(.formTagsInputDisabled) {
1151
+ @include mixin.focus-ring(-1px, true);
1152
+ }
1153
+ }
1154
+
1155
+ .formTagsInputEnabled {
1156
+ composes: formTagsInput;
1157
+ }
1158
+
1159
+ .formTagsInputDisabled {
1160
+ composes: formTagsInput;
1161
+
1162
+ background: var(--gray-100);
1163
+ cursor: not-allowed;
1164
+ }
1165
+
1166
+ .formTagsInputField {
1167
+ height: 30px;
1168
+ min-width: 60px;
1169
+ flex: 1 1 60px;
1170
+ background: none;
1171
+ border: 0;
1172
+ color: inherit;
1173
+ font: inherit;
1174
+ outline: 0;
1175
+
1176
+ &::placeholder {
1177
+ color: var(--foreground-secondary);
1178
+ }
1179
+
1180
+ &:disabled {
1181
+ cursor: not-allowed;
1182
+ }
1183
+ }
1184
+
1185
+ .formTagsInputPopup {
1186
+ composes: formSelectPopup;
1187
+ }
@@ -0,0 +1,47 @@
1
+ @use '~flux/components/css/mixin';
2
+
3
+ .formRating {
4
+ display: inline-flex;
5
+ gap: .15em;
6
+ font-size: 24px;
7
+ line-height: 1;
8
+ border-radius: 4px;
9
+
10
+ @include mixin.focus-ring(4px);
11
+
12
+ &.isDisabled {
13
+ opacity: .6;
14
+ }
15
+ }
16
+
17
+ .formRatingStar {
18
+ position: relative;
19
+ display: inline-flex;
20
+ padding: 0;
21
+ border: 0;
22
+ background: none;
23
+ line-height: 0;
24
+ cursor: pointer;
25
+
26
+ &:disabled {
27
+ cursor: default;
28
+ }
29
+ }
30
+
31
+ .formRatingStarEmpty {
32
+ color: var(--gray-300);
33
+ }
34
+
35
+ .formRatingStarFull {
36
+ position: absolute;
37
+ top: 0;
38
+ bottom: 0;
39
+ left: 0;
40
+ color: var(--warning-400);
41
+ clip-path: inset(0 calc((1 - var(--fill, 0)) * 100%) 0 0);
42
+ pointer-events: none;
43
+ }
44
+
45
+ .isInvalid .formRatingStarEmpty {
46
+ color: var(--danger-200);
47
+ }
@@ -0,0 +1,45 @@
1
+ @use '~flux/components/css/mixin';
2
+
3
+ .inlineEdit {
4
+ display: flex;
5
+ gap: 6px;
6
+ align-items: flex-start;
7
+ }
8
+
9
+ .inlineEditField {
10
+ min-width: 0;
11
+ flex: 1 1 auto;
12
+ }
13
+
14
+ .inlineEditActions {
15
+ display: flex;
16
+ gap: 6px;
17
+ align-items: center;
18
+ flex-shrink: 0;
19
+ }
20
+
21
+ .inlineEditDisplay {
22
+ display: inline-flex;
23
+ min-height: 30px;
24
+ padding: 3px 6px;
25
+ align-items: center;
26
+ border-radius: 6px;
27
+ color: var(--foreground);
28
+ line-height: 21px;
29
+ white-space: pre-wrap;
30
+ overflow-wrap: anywhere;
31
+
32
+ &.isInteractive {
33
+ cursor: text;
34
+
35
+ @include mixin.focus-ring(2px);
36
+
37
+ @include mixin.hover {
38
+ background: var(--surface-hover);
39
+ }
40
+ }
41
+
42
+ &.isPlaceholder {
43
+ color: var(--foreground-secondary);
44
+ }
45
+ }
@@ -33,7 +33,6 @@
33
33
 
34
34
  display: flex;
35
35
  flex-flow: column;
36
- gap: 1px;
37
36
  }
38
37
 
39
38
  .menuItem {
@@ -132,6 +131,10 @@
132
131
  margin-left: 33px;
133
132
  }
134
133
 
134
+ .menuConeActive .menuItem {
135
+ pointer-events: none;
136
+ }
137
+
135
138
  .menuCollapsible {
136
139
  display: flex;
137
140
  flex-flow: column;
@@ -0,0 +1,38 @@
1
+ .menuFlyoutPopup {
2
+ composes: basePane from './base/Pane.module.scss';
3
+
4
+ position: fixed;
5
+ top: 0;
6
+ left: 0;
7
+ min-width: 270px;
8
+ max-height: max(330px, 50dvh);
9
+ overflow: auto;
10
+ box-shadow: var(--shadow-md);
11
+ translate: var(--x) var(--y);
12
+ z-index: 10000;
13
+ }
14
+
15
+ .menuFlyoutTriggerOpen {
16
+ background: var(--gray-100);
17
+ }
18
+
19
+ .menuFlyoutConeDebug {
20
+ position: fixed;
21
+ top: 0;
22
+ left: 0;
23
+ width: 100vw;
24
+ height: 100vh;
25
+ pointer-events: none;
26
+ z-index: 20000;
27
+
28
+ polygon {
29
+ fill: var(--primary-500);
30
+ fill-opacity: .15;
31
+ stroke: var(--primary-500);
32
+ stroke-width: 1.5;
33
+ }
34
+
35
+ circle {
36
+ fill: var(--danger-500);
37
+ }
38
+ }
@@ -238,3 +238,19 @@ tfoot .tableCell {
238
238
  :not(.basePaneStructure) > .table .tableCell:not(.isBordered):last-child .tableCellContent {
239
239
  padding-right: 0;
240
240
  }
241
+
242
+ .tableCellExpand {
243
+ width: 0;
244
+ }
245
+
246
+ .tableExpandToggle :global(svg) {
247
+ transition: rotate .2s var(--swift-out);
248
+ }
249
+
250
+ .tableExpandToggle.isExpanded :global(svg) {
251
+ rotate: 90deg;
252
+ }
253
+
254
+ .tableExpandContent {
255
+ padding: 12px 15px;
256
+ }
@@ -0,0 +1,108 @@
1
+ @use '~flux/components/css/mixin';
2
+
3
+ .tour {
4
+ position: fixed;
5
+ inset: 0;
6
+ pointer-events: auto;
7
+ z-index: 9999;
8
+ }
9
+
10
+ .tourSpotlight {
11
+ position: fixed;
12
+ top: 0;
13
+ left: 0;
14
+ width: var(--w);
15
+ height: var(--h);
16
+ border-radius: 8px;
17
+ box-shadow: 0 0 0 9999px rgb(0 0 0 / .55);
18
+ pointer-events: none;
19
+ translate: var(--x) var(--y);
20
+ transition: translate .25s var(--swift-out), width .25s var(--swift-out), height .25s var(--swift-out);
21
+ }
22
+
23
+ .tourPopover {
24
+ position: fixed;
25
+ top: 0;
26
+ left: 0;
27
+ width: 321px;
28
+ max-width: calc(100vw - 24px);
29
+ translate: var(--x) var(--y);
30
+ z-index: 1;
31
+
32
+ &.isStepping {
33
+ transition: translate .25s var(--swift-out);
34
+ }
35
+ }
36
+
37
+ .tourPane {
38
+ overflow: hidden;
39
+ }
40
+
41
+ .tourBodyViewport {
42
+ position: relative;
43
+ overflow: hidden;
44
+ transition: height .25s var(--swift-out);
45
+ }
46
+
47
+ .tourBody {
48
+ display: flex;
49
+ padding: 15px 18px;
50
+ flex-flow: column;
51
+ gap: 6px;
52
+ transition: opacity .15s var(--swift-out);
53
+
54
+ &:global(.v-leave-active) {
55
+ position: absolute;
56
+ top: 0;
57
+ left: 0;
58
+ width: 100%;
59
+ }
60
+
61
+ &:global(.v-enter-from),
62
+ &:global(.v-leave-to) {
63
+ opacity: 0;
64
+ }
65
+ }
66
+
67
+ .tourTitle {
68
+ color: var(--foreground-prominent);
69
+ font-size: 15px;
70
+ font-weight: 600;
71
+ }
72
+
73
+ .tourContent {
74
+ font-size: 14px;
75
+ line-height: 21px;
76
+ color: var(--foreground);
77
+ }
78
+
79
+ .tourFooter {
80
+ display: flex;
81
+ padding: 12px 18px;
82
+ gap: 6px;
83
+ align-items: center;
84
+ border-top: 1px solid var(--surface-stroke);
85
+ }
86
+
87
+ .tourProgress {
88
+ color: var(--foreground-secondary);
89
+ font-size: 13px;
90
+ }
91
+
92
+ .tourSkip {
93
+ font: inherit;
94
+ font-size: 13px;
95
+ margin-right: 12px;
96
+ padding: 0;
97
+ cursor: pointer;
98
+ transition: color .15s var(--swift-out);
99
+ color: var(--foreground-secondary);
100
+ border: 0;
101
+ background: none;
102
+
103
+ @include mixin.hover {
104
+ color: var(--foreground);
105
+ }
106
+
107
+ @include mixin.focus-ring(2px);
108
+ }
@@ -0,0 +1,17 @@
1
+ .virtualScroller {
2
+ position: relative;
3
+ height: 100%;
4
+ overflow: auto;
5
+ }
6
+
7
+ .virtualScrollerSpacer {
8
+ position: relative;
9
+ width: 100%;
10
+ }
11
+
12
+ .virtualScrollerWindow {
13
+ position: absolute;
14
+ top: 0;
15
+ left: 0;
16
+ width: 100%;
17
+ }
package/src/data/di.ts CHANGED
@@ -12,6 +12,7 @@ export const FluxFilterInjectionKey: InjectionKey<FluxFilterInjection> = Symbol(
12
12
  export const FluxFormCheckboxGroupInjectionKey: InjectionKey<FluxFormCheckboxGroupInjection> = Symbol();
13
13
  export const FluxFormFieldInjectionKey: InjectionKey<FluxFormFieldInjection> = Symbol();
14
14
  export const FluxFormRadioGroupInjectionKey: InjectionKey<FluxFormRadioGroupInjection> = Symbol();
15
+ export const FluxMenuFlyoutInjectionKey: InjectionKey<FluxMenuFlyoutInjection> = Symbol();
15
16
  export const FluxSegmentedControlInjectionKey: InjectionKey<FluxSegmentedControlInjection> = Symbol();
16
17
  export const FluxSplitViewInjectionKey: InjectionKey<FluxSplitViewInjection> = Symbol();
17
18
  export const FluxTabBarInjectionKey: InjectionKey<FluxTabBarInjection> = Symbol();
@@ -150,6 +151,45 @@ export type FluxFlyoutInjection = {
150
151
  readonly isOpening: Ref<boolean>;
151
152
  };
152
153
 
154
+ export type FluxMenuFlyoutPointer = {
155
+ readonly x: number;
156
+ readonly y: number;
157
+ readonly px: number;
158
+ readonly py: number;
159
+ };
160
+
161
+ export type FluxMenuFlyoutCone = {
162
+ readonly id: number;
163
+ readonly ax: number;
164
+ readonly ay: number;
165
+ readonly bx: number;
166
+ readonly by: number;
167
+ readonly cx: number;
168
+ readonly cy: number;
169
+ };
170
+
171
+ export type FluxMenuFlyoutEntry = {
172
+ getTrigger(): HTMLElement | null;
173
+ getPopup(): HTMLElement | null;
174
+ readonly isOpen: Ref<boolean>;
175
+ close(): void;
176
+ };
177
+
178
+ export type FluxMenuFlyoutInjection = {
179
+ readonly debugCone: Ref<boolean>;
180
+ readonly pointer: Readonly<Ref<FluxMenuFlyoutPointer>>;
181
+ readonly activeCone: Ref<FluxMenuFlyoutCone | null>;
182
+ readonly keyboardStack: Ref<number[]>;
183
+
184
+ register(entry: FluxMenuFlyoutEntry): void;
185
+ unregister(entry: FluxMenuFlyoutEntry): void;
186
+ closeOthers(self: FluxMenuFlyoutEntry): void;
187
+ hasOpenDescendant(self: FluxMenuFlyoutEntry): boolean;
188
+ isAimingAtOpenSubmenu(): boolean;
189
+ isInsidePopups(target: Node | null): boolean;
190
+ closeAll(): void;
191
+ };
192
+
153
193
  export type FluxFormFieldInjection = {
154
194
  readonly id?: string;
155
195
  readonly labelId?: string;
package/src/data/i18n.ts CHANGED
@@ -5,10 +5,14 @@ export const english = {
5
5
  'flux.back': 'Back',
6
6
  'flux.cancel': 'Cancel',
7
7
  'flux.close': 'Close',
8
+ 'flux.collapseRow': 'Collapse row',
9
+ 'flux.expandRow': 'Expand row',
8
10
  'flux.comingSoon': 'Coming soon',
9
11
  'flux.continue': 'Continue',
12
+ 'flux.createOption': 'Create "{value}"',
10
13
  'flux.customPeriod': 'Custom period',
11
14
  'flux.delete': 'Delete',
15
+ 'flux.done': 'Done',
12
16
  'flux.filter': 'Filter',
13
17
  'flux.filterReset': 'Reset filters',
14
18
  'flux.justNow': 'Just now',
@@ -21,6 +25,7 @@ export const english = {
21
25
  'flux.previewClose': 'Close preview',
22
26
  'flux.displayingOf': '{from}–{to} of {total}',
23
27
  'flux.showN': 'Show {n}',
28
+ 'flux.skip': 'Skip',
24
29
  'flux.next': 'Next',
25
30
  'flux.noItems': 'There are no items (left).',
26
31
  'flux.pagination': 'Pagination',
@@ -33,6 +38,7 @@ export const english = {
33
38
  'flux.sortAscending': 'Ascending',
34
39
  'flux.sortDescending': 'Descending',
35
40
  'flux.sortRemove': 'Remove sorting',
41
+ 'flux.submenu': 'Submenu',
36
42
  'flux.today': 'Today',
37
43
  'flux.selectMonth': 'Select month',
38
44
  'flux.selectYear': 'Select year',
@@ -42,6 +48,7 @@ export const english = {
42
48
  'flux.previousYears': 'Previous years',
43
49
  'flux.nextYears': 'Next years',
44
50
  'flux.allDay': 'All day',
51
+ 'flux.andNMore': '{n} more',
45
52
  'flux.grabbedAnnounce': 'Item grabbed. Use arrow keys to move, Enter to drop, Escape to cancel.',
46
53
  'flux.releasedAnnounce': 'Item released.',
47
54
  'flux.goToPage': 'Go to page {page}',