@flux-ui/components 3.0.0-next.60 → 3.0.0-next.63
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.
- package/dist/component/FluxActionStack.vue.d.ts +25 -19
- package/dist/component/FluxAspectRatio.vue.d.ts +4 -3
- package/dist/component/FluxBorderShine.vue.d.ts +1 -1
- package/dist/component/FluxCalendar.vue.d.ts +2 -6
- package/dist/component/FluxContainer.vue.d.ts +3 -2
- package/dist/component/FluxFilter.vue.d.ts +6 -7
- package/dist/component/FluxFilterBar.vue.d.ts +5 -4
- package/dist/component/FluxFilterBase.vue.d.ts +14 -11
- package/dist/component/FluxFilterDate.vue.d.ts +3 -6
- package/dist/component/FluxFilterDateRange.vue.d.ts +3 -6
- package/dist/component/FluxFilterOption.vue.d.ts +3 -6
- package/dist/component/FluxFilterOptionAsync.vue.d.ts +3 -6
- package/dist/component/FluxFilterOptions.vue.d.ts +3 -6
- package/dist/component/FluxFilterOptionsAsync.vue.d.ts +3 -6
- package/dist/component/FluxFilterRange.vue.d.ts +3 -7
- package/dist/component/FluxFilterWindow.vue.d.ts +3 -8
- package/dist/component/FluxFlex.vue.d.ts +30 -0
- package/dist/component/{FluxRow.vue.d.ts → FluxFlexItem.vue.d.ts} +5 -3
- package/dist/component/FluxGrid.vue.d.ts +3 -2
- package/dist/component/FluxGridColumn.vue.d.ts +3 -2
- package/dist/component/FluxKanbanColumn.vue.d.ts +3 -0
- package/dist/component/FluxScroller.vue.d.ts +32 -0
- package/dist/component/{FluxStack.vue.d.ts → FluxSplitView.vue.d.ts} +7 -6
- package/dist/component/{FluxColumn.vue.d.ts → FluxSplitViewPane.vue.d.ts} +4 -1
- package/dist/component/FluxSticky.vue.d.ts +34 -0
- package/dist/component/index.d.ts +6 -3
- package/dist/component/primitive/FilterBadge.vue.d.ts +2 -2
- package/dist/component/primitive/FilterItem.vue.d.ts +3 -2
- package/dist/component/primitive/SelectBase.vue.d.ts +4 -4
- package/dist/composable/private/index.d.ts +1 -0
- package/dist/composable/private/useSplitView.d.ts +23 -0
- package/dist/data/di.d.ts +19 -2
- package/dist/data/index.d.ts +0 -1
- package/dist/index.css +586 -331
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8754 -8108
- package/dist/index.js.map +1 -1
- package/dist/util/defineFilter.d.ts +3 -0
- package/dist/util/filter.d.ts +7 -0
- package/dist/util/index.d.ts +2 -0
- package/dist/vite/defineFilterMacro.d.ts +3 -0
- package/dist/vite/index.d.ts +1 -0
- package/dist/vite.js +217 -0
- package/dist/vite.js.map +1 -0
- package/package.json +11 -7
- package/src/component/FluxActionBar.vue +3 -4
- package/src/component/FluxActionStack.vue +3 -3
- package/src/component/FluxAspectRatio.vue +5 -3
- package/src/component/FluxBadgeStack.vue +4 -4
- package/src/component/FluxButtonStack.vue +6 -4
- package/src/component/FluxCalendar.vue +160 -157
- package/src/component/FluxContainer.vue +4 -2
- package/src/component/FluxFilter.vue +10 -11
- package/src/component/FluxFilterBar.vue +71 -15
- package/src/component/FluxFilterBase.vue +65 -51
- package/src/component/FluxFilterDate.vue +24 -8
- package/src/component/FluxFilterDateRange.vue +27 -9
- package/src/component/FluxFilterOption.vue +20 -10
- package/src/component/FluxFilterOptionAsync.vue +19 -11
- package/src/component/FluxFilterOptions.vue +26 -11
- package/src/component/FluxFilterOptionsAsync.vue +28 -12
- package/src/component/FluxFilterRange.vue +25 -11
- package/src/component/FluxFilterWindow.vue +25 -11
- package/src/component/FluxFlex.vue +53 -0
- package/src/component/FluxFlexItem.vue +40 -0
- package/src/component/FluxFormDateTimeInput.vue +3 -4
- package/src/component/FluxGrid.vue +4 -2
- package/src/component/FluxGridColumn.vue +4 -2
- package/src/component/FluxInfoStack.vue +3 -3
- package/src/component/FluxItemStack.vue +4 -4
- package/src/component/FluxKanbanColumn.vue +16 -3
- package/src/component/FluxNoticeStack.vue +3 -3
- package/src/component/FluxProgressBar.vue +4 -3
- package/src/component/FluxScroller.vue +63 -0
- package/src/component/FluxSplitView.vue +101 -0
- package/src/component/FluxSplitViewPane.vue +23 -0
- package/src/component/FluxSticky.vue +67 -0
- package/src/component/FluxTagStack.vue +4 -4
- package/src/component/FluxToolbar.vue +3 -4
- package/src/component/FluxToolbarGroup.vue +3 -4
- package/src/component/FluxTooltipProvider.vue +56 -25
- package/src/component/index.ts +6 -3
- package/src/component/primitive/FilterBadge.vue +2 -2
- package/src/component/primitive/FilterItem.vue +4 -2
- package/src/component/primitive/FilterMenuRenderer.ts +10 -5
- package/src/component/primitive/FilterOptionBase.vue +1 -1
- package/src/composable/private/index.ts +1 -0
- package/src/composable/private/useAsyncFilterOptions.ts +1 -1
- package/src/composable/private/useFilterOption.ts +1 -1
- package/src/composable/private/useSplitView.ts +249 -0
- package/src/composable/useFilterInjection.ts +3 -1
- package/src/css/component/Calendar.module.scss +11 -17
- package/src/css/component/Comment.module.scss +3 -11
- package/src/css/component/Filter.module.scss +6 -2
- package/src/css/component/Flex.module.scss +84 -0
- package/src/css/component/Flyout.module.scss +1 -0
- package/src/css/component/Icon.module.scss +4 -0
- package/src/css/component/Kanban.module.scss +31 -28
- package/src/css/component/LayerPane.module.scss +5 -0
- package/src/css/component/Layout.module.scss +0 -41
- package/src/css/component/Legend.module.scss +3 -4
- package/src/css/component/Menu.module.scss +1 -0
- package/src/css/component/Pagination.module.scss +1 -1
- package/src/css/component/Pane.module.scss +1 -1
- package/src/css/component/Progress.module.scss +2 -2
- package/src/css/component/Scroller.module.scss +109 -0
- package/src/css/component/SplitView.module.scss +78 -0
- package/src/css/component/Sticky.module.scss +35 -0
- package/src/css/component/Tab.module.scss +1 -0
- package/src/css/component/Table.module.scss +1 -0
- package/src/css/component/Tooltip.module.scss +14 -0
- package/src/data/di.ts +22 -2
- package/src/data/index.ts +0 -1
- package/src/index.ts +11 -0
- package/src/util/defineFilter.ts +10 -0
- package/src/util/filter.ts +63 -0
- package/src/util/index.ts +2 -0
- package/src/vite/defineFilterMacro.ts +335 -0
- package/src/vite/index.ts +1 -0
- package/dist/data/filter.d.ts +0 -7
- package/src/component/FluxColumn.vue +0 -24
- package/src/component/FluxRow.vue +0 -24
- package/src/component/FluxStack.vue +0 -41
- package/src/data/filter.ts +0 -165
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { FluxFilterDefinition, FluxFilterValue } from '@flux-ui/types';
|
|
2
|
+
export type FluxFilterDefinitionFactory<TProps = any, TValue extends FluxFilterValue = FluxFilterValue> = (props: TProps) => FluxFilterDefinition<TValue>;
|
|
3
|
+
export default function defineFilter<TProps, TValue extends FluxFilterValue = FluxFilterValue>(factory: FluxFilterDefinitionFactory<TProps, TValue>): FluxFilterDefinitionFactory<TProps, TValue>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FluxFilterDefinition, FluxFilterOptionHeader, FluxFilterOptionItem, FluxFilterSpec, FluxFilterValue, FluxFilterValueSingle } from '@flux-ui/types';
|
|
2
|
+
import { FluxTranslate } from '../data';
|
|
3
|
+
export declare function isFluxFilterOptionHeader(obj: object): obj is FluxFilterOptionHeader;
|
|
4
|
+
export declare function isFluxFilterOptionItem(obj: object): obj is FluxFilterOptionItem;
|
|
5
|
+
export declare function isResettable(definition: FluxFilterDefinition | undefined, value: FluxFilterValue | undefined): boolean;
|
|
6
|
+
export declare function pickFilterCommon<T extends FluxFilterSpec>(props: T): FluxFilterSpec;
|
|
7
|
+
export declare function generateMultiOptionsLabel(translate: FluxTranslate, options: FluxFilterOptionItem[], values: FluxFilterValueSingle[]): string | null;
|
package/dist/util/index.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { default as createDialogRenderer } from './createDialogRenderer';
|
|
2
2
|
export { default as createLabelForDateRange } from './createLabelForDateRange';
|
|
3
|
+
export { default as defineFilter, type FluxFilterDefinitionFactory } from './defineFilter';
|
|
4
|
+
export { generateMultiOptionsLabel, isFluxFilterOptionHeader, isFluxFilterOptionItem, isResettable, pickFilterCommon } from './filter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as defineFilterMacro } from './defineFilterMacro';
|
package/dist/vite.js
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
//#region src/vite/defineFilterMacro.ts
|
|
2
|
+
var SCRIPT_SETUP_REGEX = /<script\b([^>]*)\bsetup\b([^>]*)>([\s\S]*?)<\/script>/gi;
|
|
3
|
+
function defineFilterMacro() {
|
|
4
|
+
return {
|
|
5
|
+
name: "@flux-ui/components/define-filter-macro",
|
|
6
|
+
enforce: "pre",
|
|
7
|
+
transform(code, id) {
|
|
8
|
+
if (!id.endsWith(".vue")) return;
|
|
9
|
+
if (!code.includes("defineFilter")) return;
|
|
10
|
+
let transformed = false;
|
|
11
|
+
const newCode = code.replace(SCRIPT_SETUP_REGEX, (match, before, after, content) => {
|
|
12
|
+
if (!content.includes("defineFilter")) return match;
|
|
13
|
+
if (content.includes("__filterDefinitionFactory")) return match;
|
|
14
|
+
if (containsTopLevelCall(content, "defineOptions")) return match;
|
|
15
|
+
const wrapped = wrapDefineFilter(content);
|
|
16
|
+
if (wrapped === content) return match;
|
|
17
|
+
transformed = true;
|
|
18
|
+
return `<script${before}setup${after}>${wrapped}<\/script>`;
|
|
19
|
+
});
|
|
20
|
+
if (!transformed) return;
|
|
21
|
+
return {
|
|
22
|
+
code: newCode,
|
|
23
|
+
map: null
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function wrapDefineFilter(content) {
|
|
29
|
+
const range = findTopLevelCall(content, "defineFilter");
|
|
30
|
+
if (!range) return content;
|
|
31
|
+
const replacement = `defineOptions({\n __filterDefinitionFactory: ${content.slice(range.callStart, range.callEnd)}\n})`;
|
|
32
|
+
return content.slice(0, range.callStart) + replacement + content.slice(range.callEnd);
|
|
33
|
+
}
|
|
34
|
+
function containsTopLevelCall(content, name) {
|
|
35
|
+
return findTopLevelCall(content, name) !== null;
|
|
36
|
+
}
|
|
37
|
+
function findTopLevelCall(content, name) {
|
|
38
|
+
let parenDepth = 0;
|
|
39
|
+
let braceDepth = 0;
|
|
40
|
+
let bracketDepth = 0;
|
|
41
|
+
let inString = null;
|
|
42
|
+
let inComment = null;
|
|
43
|
+
let i = 0;
|
|
44
|
+
while (i < content.length) {
|
|
45
|
+
const c = content[i];
|
|
46
|
+
const n = content[i + 1];
|
|
47
|
+
if (inComment === "single") {
|
|
48
|
+
if (c === "\n") inComment = null;
|
|
49
|
+
i++;
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (inComment === "multi") {
|
|
53
|
+
if (c === "*" && n === "/") {
|
|
54
|
+
inComment = null;
|
|
55
|
+
i += 2;
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
i++;
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if (inString) {
|
|
62
|
+
if (c === "\\") {
|
|
63
|
+
i += 2;
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (c === inString) inString = null;
|
|
67
|
+
i++;
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
if (c === "/" && n === "/") {
|
|
71
|
+
inComment = "single";
|
|
72
|
+
i += 2;
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (c === "/" && n === "*") {
|
|
76
|
+
inComment = "multi";
|
|
77
|
+
i += 2;
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
if (c === "\"" || c === "'" || c === "`") {
|
|
81
|
+
inString = c;
|
|
82
|
+
i++;
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
if (c === "(") {
|
|
86
|
+
parenDepth++;
|
|
87
|
+
i++;
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
if (c === ")") {
|
|
91
|
+
parenDepth--;
|
|
92
|
+
i++;
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
if (c === "{") {
|
|
96
|
+
braceDepth++;
|
|
97
|
+
i++;
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
if (c === "}") {
|
|
101
|
+
braceDepth--;
|
|
102
|
+
i++;
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
if (c === "[") {
|
|
106
|
+
bracketDepth++;
|
|
107
|
+
i++;
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (c === "]") {
|
|
111
|
+
bracketDepth--;
|
|
112
|
+
i++;
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
if (!(parenDepth === 0 && braceDepth === 0 && bracketDepth === 0) || !content.startsWith(name, i)) {
|
|
116
|
+
i++;
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
const prevChar = i > 0 ? content[i - 1] : "";
|
|
120
|
+
if (/[A-Za-z0-9_$]/.test(prevChar)) {
|
|
121
|
+
i++;
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
const afterName = i + name.length;
|
|
125
|
+
const nextChar = content[afterName];
|
|
126
|
+
if (nextChar && /[A-Za-z0-9_$]/.test(nextChar)) {
|
|
127
|
+
i++;
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
const callOpen = skipGenericAndWhitespace(content, afterName);
|
|
131
|
+
if (callOpen === -1 || content[callOpen] !== "(") {
|
|
132
|
+
i++;
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
const callClose = matchClosingParen(content, callOpen);
|
|
136
|
+
if (callClose === -1) return null;
|
|
137
|
+
return {
|
|
138
|
+
callStart: i,
|
|
139
|
+
callEnd: callClose + 1
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
function skipGenericAndWhitespace(content, start) {
|
|
145
|
+
let i = start;
|
|
146
|
+
while (i < content.length && /\s/.test(content[i])) i++;
|
|
147
|
+
if (content[i] !== "<") return i;
|
|
148
|
+
let depth = 1;
|
|
149
|
+
i++;
|
|
150
|
+
while (i < content.length && depth > 0) {
|
|
151
|
+
const c = content[i];
|
|
152
|
+
if (c === "<") depth++;
|
|
153
|
+
else if (c === ">") depth--;
|
|
154
|
+
i++;
|
|
155
|
+
}
|
|
156
|
+
while (i < content.length && /\s/.test(content[i])) i++;
|
|
157
|
+
return i;
|
|
158
|
+
}
|
|
159
|
+
function matchClosingParen(content, openIndex) {
|
|
160
|
+
let depth = 1;
|
|
161
|
+
let inString = null;
|
|
162
|
+
let inComment = null;
|
|
163
|
+
let i = openIndex + 1;
|
|
164
|
+
while (i < content.length) {
|
|
165
|
+
const c = content[i];
|
|
166
|
+
const n = content[i + 1];
|
|
167
|
+
if (inComment === "single") {
|
|
168
|
+
if (c === "\n") inComment = null;
|
|
169
|
+
i++;
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
if (inComment === "multi") {
|
|
173
|
+
if (c === "*" && n === "/") {
|
|
174
|
+
inComment = null;
|
|
175
|
+
i += 2;
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
i++;
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
if (inString) {
|
|
182
|
+
if (c === "\\") {
|
|
183
|
+
i += 2;
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
if (c === inString) inString = null;
|
|
187
|
+
i++;
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
if (c === "/" && n === "/") {
|
|
191
|
+
inComment = "single";
|
|
192
|
+
i += 2;
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
if (c === "/" && n === "*") {
|
|
196
|
+
inComment = "multi";
|
|
197
|
+
i += 2;
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
if (c === "\"" || c === "'" || c === "`") {
|
|
201
|
+
inString = c;
|
|
202
|
+
i++;
|
|
203
|
+
continue;
|
|
204
|
+
}
|
|
205
|
+
if (c === "(") depth++;
|
|
206
|
+
else if (c === ")") {
|
|
207
|
+
depth--;
|
|
208
|
+
if (depth === 0) return i;
|
|
209
|
+
}
|
|
210
|
+
i++;
|
|
211
|
+
}
|
|
212
|
+
return -1;
|
|
213
|
+
}
|
|
214
|
+
//#endregion
|
|
215
|
+
export { defineFilterMacro };
|
|
216
|
+
|
|
217
|
+
//# sourceMappingURL=vite.js.map
|
package/dist/vite.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite.js","names":[],"sources":["../src/vite/defineFilterMacro.ts"],"sourcesContent":["import type { Plugin } from 'vite';\n\nconst SCRIPT_SETUP_REGEX = /<script\\b([^>]*)\\bsetup\\b([^>]*)>([\\s\\S]*?)<\\/script>/gi;\n\nfunction defineFilterMacro(): Plugin {\n return {\n name: '@flux-ui/components/define-filter-macro',\n enforce: 'pre',\n\n transform(code, id) {\n if (!id.endsWith('.vue')) {\n return;\n }\n\n if (!code.includes('defineFilter')) {\n return;\n }\n\n let transformed = false;\n\n const newCode = code.replace(SCRIPT_SETUP_REGEX, (match, before, after, content) => {\n if (!content.includes('defineFilter')) {\n return match;\n }\n\n if (content.includes('__filterDefinitionFactory')) {\n return match;\n }\n\n if (containsTopLevelCall(content, 'defineOptions')) {\n return match;\n }\n\n const wrapped = wrapDefineFilter(content);\n\n if (wrapped === content) {\n return match;\n }\n\n transformed = true;\n return `<script${before}setup${after}>${wrapped}</script>`;\n });\n\n if (!transformed) {\n return;\n }\n\n return {\n code: newCode,\n map: null\n };\n }\n };\n}\n\nexport default defineFilterMacro;\n\nfunction wrapDefineFilter(content: string): string {\n const range = findTopLevelCall(content, 'defineFilter');\n\n if (!range) {\n return content;\n }\n\n const callExpression = content.slice(range.callStart, range.callEnd);\n const replacement = `defineOptions({\\n __filterDefinitionFactory: ${callExpression}\\n})`;\n\n return content.slice(0, range.callStart) + replacement + content.slice(range.callEnd);\n}\n\nfunction containsTopLevelCall(content: string, name: string): boolean {\n return findTopLevelCall(content, name) !== null;\n}\n\ntype CallRange = {\n readonly callStart: number;\n readonly callEnd: number;\n};\n\nfunction findTopLevelCall(content: string, name: string): CallRange | null {\n let parenDepth = 0;\n let braceDepth = 0;\n let bracketDepth = 0;\n let inString: string | null = null;\n let inComment: 'single' | 'multi' | null = null;\n\n let i = 0;\n\n while (i < content.length) {\n const c = content[i];\n const n = content[i + 1];\n\n if (inComment === 'single') {\n if (c === '\\n') {\n inComment = null;\n }\n\n i++;\n continue;\n }\n\n if (inComment === 'multi') {\n if (c === '*' && n === '/') {\n inComment = null;\n i += 2;\n continue;\n }\n\n i++;\n continue;\n }\n\n if (inString) {\n if (c === '\\\\') {\n i += 2;\n continue;\n }\n\n if (c === inString) {\n inString = null;\n }\n\n i++;\n continue;\n }\n\n if (c === '/' && n === '/') {\n inComment = 'single';\n i += 2;\n continue;\n }\n\n if (c === '/' && n === '*') {\n inComment = 'multi';\n i += 2;\n continue;\n }\n\n if (c === '\"' || c === '\\'' || c === '`') {\n inString = c;\n i++;\n continue;\n }\n\n if (c === '(') {\n parenDepth++;\n i++;\n continue;\n }\n\n if (c === ')') {\n parenDepth--;\n i++;\n continue;\n }\n\n if (c === '{') {\n braceDepth++;\n i++;\n continue;\n }\n\n if (c === '}') {\n braceDepth--;\n i++;\n continue;\n }\n\n if (c === '[') {\n bracketDepth++;\n i++;\n continue;\n }\n\n if (c === ']') {\n bracketDepth--;\n i++;\n continue;\n }\n\n const isTopLevel = parenDepth === 0 && braceDepth === 0 && bracketDepth === 0;\n\n if (!isTopLevel || !content.startsWith(name, i)) {\n i++;\n continue;\n }\n\n const prevChar = i > 0 ? content[i - 1] : '';\n\n if (/[A-Za-z0-9_$]/.test(prevChar)) {\n i++;\n continue;\n }\n\n const afterName = i + name.length;\n const nextChar = content[afterName];\n\n if (nextChar && /[A-Za-z0-9_$]/.test(nextChar)) {\n i++;\n continue;\n }\n\n const callOpen = skipGenericAndWhitespace(content, afterName);\n\n if (callOpen === -1 || content[callOpen] !== '(') {\n i++;\n continue;\n }\n\n const callClose = matchClosingParen(content, callOpen);\n\n if (callClose === -1) {\n return null;\n }\n\n return {\n callStart: i,\n callEnd: callClose + 1\n };\n }\n\n return null;\n}\n\nfunction skipGenericAndWhitespace(content: string, start: number): number {\n let i = start;\n\n while (i < content.length && /\\s/.test(content[i])) {\n i++;\n }\n\n if (content[i] !== '<') {\n return i;\n }\n\n let depth = 1;\n i++;\n\n while (i < content.length && depth > 0) {\n const c = content[i];\n\n if (c === '<') {\n depth++;\n } else if (c === '>') {\n depth--;\n }\n\n i++;\n }\n\n while (i < content.length && /\\s/.test(content[i])) {\n i++;\n }\n\n return i;\n}\n\nfunction matchClosingParen(content: string, openIndex: number): number {\n let depth = 1;\n let inString: string | null = null;\n let inComment: 'single' | 'multi' | null = null;\n\n let i = openIndex + 1;\n\n while (i < content.length) {\n const c = content[i];\n const n = content[i + 1];\n\n if (inComment === 'single') {\n if (c === '\\n') {\n inComment = null;\n }\n\n i++;\n continue;\n }\n\n if (inComment === 'multi') {\n if (c === '*' && n === '/') {\n inComment = null;\n i += 2;\n continue;\n }\n\n i++;\n continue;\n }\n\n if (inString) {\n if (c === '\\\\') {\n i += 2;\n continue;\n }\n\n if (c === inString) {\n inString = null;\n }\n\n i++;\n continue;\n }\n\n if (c === '/' && n === '/') {\n inComment = 'single';\n i += 2;\n continue;\n }\n\n if (c === '/' && n === '*') {\n inComment = 'multi';\n i += 2;\n continue;\n }\n\n if (c === '\"' || c === '\\'' || c === '`') {\n inString = c;\n i++;\n continue;\n }\n\n if (c === '(') {\n depth++;\n } else if (c === ')') {\n depth--;\n\n if (depth === 0) {\n return i;\n }\n }\n\n i++;\n }\n\n return -1;\n}\n"],"mappings":";AAEA,IAAM,qBAAqB;AAE3B,SAAS,oBAA4B;AACjC,QAAO;EACH,MAAM;EACN,SAAS;EAET,UAAU,MAAM,IAAI;AAChB,OAAI,CAAC,GAAG,SAAS,OAAO,CACpB;AAGJ,OAAI,CAAC,KAAK,SAAS,eAAe,CAC9B;GAGJ,IAAI,cAAc;GAElB,MAAM,UAAU,KAAK,QAAQ,qBAAqB,OAAO,QAAQ,OAAO,YAAY;AAChF,QA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AM,IACb;AAGJ;;AAGJ,QAAO,IAAI,QAAQ,UAAU,KAAK,KAAK,QAAQ,GAAG,CAC9C;AAGJ,QAAO;;AAGX,SAAS,kBAAkB,SAAiB,WAA2B;CACnE,IAAI,QAAQ;CACZ,IAAI,WAA0B;CAC9B,IAAI,YAAuC;CAE3C,IAAI,IAAI,YAAY;AAEpB,QAAO,IAAI,QAAQ,QAAQ;EACvB,MAAM,IAAI,QAAQ;EAClB,MAAM,IAAI,QAAQ,IAAI;AAEtB,MAAI,cAAc,UAAU;AACxB,OAAI,MAAM,KACN,aAAY;AAGhB;AACA;;AAGJ,MAAI,cAAc,SAAS;AACvB,OAAI,MAAM,OAAO,MAAM,KAAK;AACxB,gBAAY;AACZ,SAAK;AACL;;AAGJ;AACA;;AAGJ,MAAI,UAAU;AACV,OAAI,MAAM,MAAM;AACZ,SAAK;AACL;;AAGJ,OAAI,MAAM,SACN,YAAW;AAGf;AACA;;AAGJ,MAAI,MAAM,OAAO,MAAM,KAAK;AACxB,eAAY;AACZ,QAAK;AACL;;AAGJ,MAAI,MAAM,OAAO,MAAM,KAAK;AACxB,eAAY;AACZ,QAAK;AACL;;AAGJ,MAAI,MAAM,QAAO,MAAM,OAAQ,MAAM,KAAK;AACtC,cAAW;AACX;AACA;;AAGJ,MAAI,MAAM,IACN;WACO,MAAM,KAAK;AAClB;AAEA,OAAI,UAAU,EACV,QAAO;;AAIf;;AAGJ,QAAO"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flux-ui/components",
|
|
3
3
|
"description": "A set of opiniated UI components.",
|
|
4
|
-
"version": "3.0.0-next.
|
|
4
|
+
"version": "3.0.0-next.63",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/basmilius",
|
|
@@ -33,6 +33,10 @@
|
|
|
33
33
|
"types": "./dist/index.d.ts",
|
|
34
34
|
"default": "./dist/index.js"
|
|
35
35
|
},
|
|
36
|
+
"./vite": {
|
|
37
|
+
"types": "./dist/vite/index.d.ts",
|
|
38
|
+
"default": "./dist/vite.js"
|
|
39
|
+
},
|
|
36
40
|
"./style.css": "./dist/index.css"
|
|
37
41
|
},
|
|
38
42
|
"publishConfig": {
|
|
@@ -47,10 +51,10 @@
|
|
|
47
51
|
"module": "./dist/index.js",
|
|
48
52
|
"types": "./dist/index.d.ts",
|
|
49
53
|
"dependencies": {
|
|
50
|
-
"@basmilius/common": "^3.
|
|
51
|
-
"@basmilius/utils": "^3.
|
|
52
|
-
"@flux-ui/internals": "3.0.0-next.
|
|
53
|
-
"@flux-ui/types": "3.0.0-next.
|
|
54
|
+
"@basmilius/common": "^3.25.0",
|
|
55
|
+
"@basmilius/utils": "^3.25.0",
|
|
56
|
+
"@flux-ui/internals": "3.0.0-next.63",
|
|
57
|
+
"@flux-ui/types": "3.0.0-next.63",
|
|
54
58
|
"@fortawesome/fontawesome-common-types": "^7.2.0",
|
|
55
59
|
"clsx": "^2.1.1",
|
|
56
60
|
"imask": "^7.6.1",
|
|
@@ -61,7 +65,7 @@
|
|
|
61
65
|
"vue": "^3.6.0-beta.10"
|
|
62
66
|
},
|
|
63
67
|
"devDependencies": {
|
|
64
|
-
"@basmilius/vite-preset": "^3.
|
|
68
|
+
"@basmilius/vite-preset": "^3.25.0",
|
|
65
69
|
"@types/lodash-es": "^4.17.12",
|
|
66
70
|
"@types/luxon": "^3.7.1",
|
|
67
71
|
"@types/node": "^25.6.0",
|
|
@@ -70,6 +74,6 @@
|
|
|
70
74
|
"sass-embedded": "^1.99.0",
|
|
71
75
|
"typescript": "^6.0.3",
|
|
72
76
|
"vite": "^8.0.10",
|
|
73
|
-
"vue-tsc": "^3.2.
|
|
77
|
+
"vue-tsc": "^3.2.8"
|
|
74
78
|
}
|
|
75
79
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FluxFlex
|
|
3
3
|
:class="$style.actionBar"
|
|
4
|
-
direction="horizontal"
|
|
5
4
|
:gap="9">
|
|
6
5
|
<slot name="primary"/>
|
|
7
6
|
<slot name="actionsStart"/>
|
|
@@ -42,7 +41,7 @@
|
|
|
42
41
|
</FluxFlyout>
|
|
43
42
|
|
|
44
43
|
<slot name="actionsEnd"/>
|
|
45
|
-
</
|
|
44
|
+
</FluxFlex>
|
|
46
45
|
</template>
|
|
47
46
|
|
|
48
47
|
<script
|
|
@@ -52,10 +51,10 @@
|
|
|
52
51
|
import { useTranslate } from '~flux/components/composable/private';
|
|
53
52
|
import FluxButtonGroup from './FluxButtonGroup.vue';
|
|
54
53
|
import FluxDestructiveButton from './FluxDestructiveButton.vue';
|
|
54
|
+
import FluxFlex from './FluxFlex.vue';
|
|
55
55
|
import FluxFlyout from './FluxFlyout.vue';
|
|
56
56
|
import FluxSecondaryButton from './FluxSecondaryButton.vue';
|
|
57
57
|
import FluxSpacer from './FluxSpacer.vue';
|
|
58
|
-
import FluxStack from './FluxStack.vue';
|
|
59
58
|
import FluxTooltip from './FluxTooltip.vue';
|
|
60
59
|
import $style from '~flux/components/css/component/Action.module.scss';
|
|
61
60
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FluxFlex
|
|
3
3
|
ref="element"
|
|
4
4
|
direction="horizontal"
|
|
5
5
|
:gap="1"
|
|
6
6
|
tag="nav">
|
|
7
7
|
<slot/>
|
|
8
|
-
</
|
|
8
|
+
</FluxFlex>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
setup>
|
|
14
14
|
import { useFocusZone } from '@flux-ui/internals';
|
|
15
15
|
import { useTemplateRef, type VNode } from 'vue';
|
|
16
|
-
import
|
|
16
|
+
import FluxFlex from './FluxFlex.vue';
|
|
17
17
|
|
|
18
18
|
defineSlots<{
|
|
19
19
|
default(): VNode[];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<Component
|
|
3
|
+
:is="tag ?? 'div'"
|
|
3
4
|
:class="$style.aspectRatio"
|
|
4
5
|
:style="{aspectRatio}">
|
|
5
6
|
<slot/>
|
|
6
|
-
</
|
|
7
|
+
</Component>
|
|
7
8
|
</template>
|
|
8
9
|
|
|
9
10
|
<script
|
|
@@ -13,7 +14,8 @@
|
|
|
13
14
|
import $style from '~flux/components/css/component/Layout.module.scss';
|
|
14
15
|
|
|
15
16
|
defineProps<{
|
|
16
|
-
aspectRatio: number;
|
|
17
|
+
readonly aspectRatio: number;
|
|
18
|
+
readonly tag?: keyof HTMLElementTagNameMap;
|
|
17
19
|
}>();
|
|
18
20
|
|
|
19
21
|
defineSlots<{
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FluxFlex
|
|
3
3
|
direction="horizontal"
|
|
4
4
|
:gap="6"
|
|
5
|
-
|
|
5
|
+
wrap="wrap">
|
|
6
6
|
<slot/>
|
|
7
|
-
</
|
|
7
|
+
</FluxFlex>
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
10
|
<script
|
|
11
11
|
lang="ts"
|
|
12
12
|
setup>
|
|
13
13
|
import type { VNode } from 'vue';
|
|
14
|
-
import
|
|
14
|
+
import FluxFlex from './FluxFlex.vue';
|
|
15
15
|
|
|
16
16
|
defineSlots<{
|
|
17
17
|
default(): VNode[];
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FluxFlex
|
|
3
|
+
:class="isFill ? $style.flexFill : undefined"
|
|
3
4
|
:direction="direction"
|
|
4
5
|
:gap="gap"
|
|
5
|
-
|
|
6
|
+
wrap="wrap">
|
|
6
7
|
<slot/>
|
|
7
|
-
</
|
|
8
|
+
</FluxFlex>
|
|
8
9
|
</template>
|
|
9
10
|
|
|
10
11
|
<script
|
|
@@ -12,7 +13,8 @@
|
|
|
12
13
|
setup>
|
|
13
14
|
import type { FluxDirection } from '@flux-ui/types';
|
|
14
15
|
import type { VNode } from 'vue';
|
|
15
|
-
import
|
|
16
|
+
import FluxFlex from './FluxFlex.vue';
|
|
17
|
+
import $style from '~flux/components/css/component/Flex.module.scss';
|
|
16
18
|
|
|
17
19
|
const {
|
|
18
20
|
direction = 'horizontal',
|