fluekit 1.1.1 → 1.4.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.
- package/dist/Border.d.ts +3 -14
- package/dist/BoxDecoration.d.ts +2 -4
- package/dist/Button.d.ts +30 -0
- package/dist/ButtonStyle.d.ts +22 -0
- package/dist/Image.d.ts +32 -0
- package/dist/ImageProvider.d.ts +37 -0
- package/dist/InputDecoration.d.ts +35 -0
- package/dist/Stack.d.ts +1 -1
- package/dist/TextArea.d.ts +23 -0
- package/dist/TextField.d.ts +64 -0
- package/dist/TextStyle.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +1048 -672
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { Comment, Fragment, Text, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, h, inject, mergeProps, normalizeClass, normalizeStyle, onMounted, onUnmounted, openBlock, provide, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useAttrs, useSlots, warn, withCtx } from "vue";
|
|
2
|
-
function isUndefined(
|
|
3
|
-
return
|
|
1
|
+
import { Comment, Fragment, Text, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, defineComponent, h, inject, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onUnmounted, openBlock, provide, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useAttrs, useSlots, warn, watch, withCtx } from "vue";
|
|
2
|
+
function isUndefined(e) {
|
|
3
|
+
return e === void 0;
|
|
4
4
|
}
|
|
5
5
|
var PURE_NUMBER_REGEX = /^[+-]?(?:\d+\.?\d*|\.\d+)$/, NUMBER_PX_REGEX = /^[+-]?(?:\d+\.?\d*|\.\d+)px$/;
|
|
6
|
-
function isPureNumber(
|
|
7
|
-
return PURE_NUMBER_REGEX.test(
|
|
6
|
+
function isPureNumber(e) {
|
|
7
|
+
return PURE_NUMBER_REGEX.test(e);
|
|
8
8
|
}
|
|
9
|
-
function isNumberPx(
|
|
10
|
-
return NUMBER_PX_REGEX.test(
|
|
9
|
+
function isNumberPx(e) {
|
|
10
|
+
return NUMBER_PX_REGEX.test(e);
|
|
11
11
|
}
|
|
12
|
-
function isDefined(
|
|
13
|
-
return
|
|
12
|
+
function isDefined(e) {
|
|
13
|
+
return e != null;
|
|
14
14
|
}
|
|
15
|
-
function isPlainObject(
|
|
16
|
-
return Object.prototype.toLocaleString.call(
|
|
15
|
+
function isPlainObject(e) {
|
|
16
|
+
return Object.prototype.toLocaleString.call(e) == "[object Object]";
|
|
17
17
|
}
|
|
18
|
-
function isHtmlTag(
|
|
19
|
-
return typeof
|
|
18
|
+
function isHtmlTag(e) {
|
|
19
|
+
return typeof e.type == "string";
|
|
20
20
|
}
|
|
21
21
|
var DEFAULT_VW = 750, canTransform = !0;
|
|
22
|
-
function setTransform(
|
|
23
|
-
canTransform =
|
|
22
|
+
function setTransform(e) {
|
|
23
|
+
canTransform = e;
|
|
24
24
|
}
|
|
25
|
-
function setDefaultVW(
|
|
26
|
-
if (!isPureNumber(`${
|
|
27
|
-
if (
|
|
28
|
-
DEFAULT_VW =
|
|
25
|
+
function setDefaultVW(e) {
|
|
26
|
+
if (!isPureNumber(`${e}`)) throw Error("defaultVW must be a number");
|
|
27
|
+
if (e <= 0) throw Error("defaultVW must be greater than 0");
|
|
28
|
+
DEFAULT_VW = e;
|
|
29
29
|
}
|
|
30
30
|
var EXCLUDED_VALUES = [
|
|
31
31
|
"0px",
|
|
@@ -37,18 +37,18 @@ var EXCLUDED_VALUES = [
|
|
|
37
37
|
"-0%",
|
|
38
38
|
"-0px",
|
|
39
39
|
"+0px"
|
|
40
|
-
], nonTransform = (
|
|
41
|
-
function px2vw(
|
|
42
|
-
if (!canTransform) return isPureNumber(`${
|
|
43
|
-
if (!(
|
|
44
|
-
if (
|
|
45
|
-
if (typeof
|
|
46
|
-
if (
|
|
47
|
-
if (nonTransform(
|
|
48
|
-
let
|
|
49
|
-
if (isNumberPx(
|
|
40
|
+
], nonTransform = (e) => e.endsWith("vw") || e.endsWith("%") || EXCLUDED_VALUES.includes(e);
|
|
41
|
+
function px2vw(e, S = DEFAULT_VW) {
|
|
42
|
+
if (!canTransform) return isPureNumber(`${e}`) ? `${e}px` : e;
|
|
43
|
+
if (!(e === void 0 || e == null || typeof e == "number" && !Number.isFinite(e))) {
|
|
44
|
+
if (e === 0) return "0";
|
|
45
|
+
if (typeof e == "string") {
|
|
46
|
+
if (e = e.trim(), e == "") return;
|
|
47
|
+
if (nonTransform(e)) return e;
|
|
48
|
+
let S = e;
|
|
49
|
+
if (isNumberPx(e) && (e = e.slice(0, -2)), !isPureNumber(e)) return S;
|
|
50
50
|
}
|
|
51
|
-
return
|
|
51
|
+
return e = Number(e), S /= 100, `${Math.round(e / S * 1e5) / 1e5}vw`;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
const Alignment = {
|
|
@@ -62,10 +62,10 @@ const Alignment = {
|
|
|
62
62
|
bottomCenter: "bottomCenter",
|
|
63
63
|
bottomRight: "bottomRight"
|
|
64
64
|
};
|
|
65
|
-
function alignmentToFlex(
|
|
66
|
-
let
|
|
67
|
-
|
|
68
|
-
let
|
|
65
|
+
function alignmentToFlex(e, S = "row") {
|
|
66
|
+
let C = e, w = "flex-start", T = "flex-start";
|
|
67
|
+
C.toLowerCase().includes("left") || C.toLowerCase().includes("right");
|
|
68
|
+
let E = {
|
|
69
69
|
topLeft: {
|
|
70
70
|
x: "flex-start",
|
|
71
71
|
y: "flex-start"
|
|
@@ -102,17 +102,17 @@ function alignmentToFlex(o, F = "row") {
|
|
|
102
102
|
x: "flex-end",
|
|
103
103
|
y: "flex-end"
|
|
104
104
|
}
|
|
105
|
-
}[
|
|
105
|
+
}[C] || {
|
|
106
106
|
x: "flex-start",
|
|
107
107
|
y: "flex-start"
|
|
108
108
|
};
|
|
109
|
-
return
|
|
110
|
-
justifyContent:
|
|
111
|
-
alignItems:
|
|
109
|
+
return S === "row" ? (w = E.x, T = E.y) : (w = E.y, T = E.x), {
|
|
110
|
+
justifyContent: w,
|
|
111
|
+
alignItems: T
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
114
|
const alignmentToStyle = alignmentToFlex;
|
|
115
|
-
function alignmentToCssPosition(
|
|
115
|
+
function alignmentToCssPosition(e) {
|
|
116
116
|
return {
|
|
117
117
|
topLeft: "left top",
|
|
118
118
|
topCenter: "center top",
|
|
@@ -123,12 +123,12 @@ function alignmentToCssPosition(o) {
|
|
|
123
123
|
bottomLeft: "left bottom",
|
|
124
124
|
bottomCenter: "center bottom",
|
|
125
125
|
bottomRight: "right bottom"
|
|
126
|
-
}[
|
|
126
|
+
}[e] || "center";
|
|
127
127
|
}
|
|
128
|
-
function alignmentToOrigin(
|
|
129
|
-
return alignmentToCssPosition(
|
|
128
|
+
function alignmentToOrigin(e) {
|
|
129
|
+
return alignmentToCssPosition(e);
|
|
130
130
|
}
|
|
131
|
-
function alignmentToGrid(
|
|
131
|
+
function alignmentToGrid(e) {
|
|
132
132
|
return {
|
|
133
133
|
topLeft: {
|
|
134
134
|
justifyItems: "start",
|
|
@@ -166,7 +166,7 @@ function alignmentToGrid(o) {
|
|
|
166
166
|
justifyItems: "end",
|
|
167
167
|
alignItems: "end"
|
|
168
168
|
}
|
|
169
|
-
}[
|
|
169
|
+
}[e] || {
|
|
170
170
|
justifyItems: "start",
|
|
171
171
|
alignItems: "start"
|
|
172
172
|
};
|
|
@@ -179,162 +179,168 @@ var Align_default = /* @__PURE__ */ defineComponent({
|
|
|
179
179
|
widthFactor: {},
|
|
180
180
|
heightFactor: {}
|
|
181
181
|
},
|
|
182
|
-
setup(
|
|
183
|
-
let
|
|
184
|
-
let
|
|
182
|
+
setup(e) {
|
|
183
|
+
let S = e, C = computed(() => {
|
|
184
|
+
let e = {
|
|
185
185
|
display: "flex",
|
|
186
186
|
position: "relative"
|
|
187
187
|
};
|
|
188
|
-
return Object.assign(
|
|
189
|
-
}),
|
|
190
|
-
return (
|
|
188
|
+
return Object.assign(e, alignmentToStyle(S.alignment)), S.widthFactor ? e.width = `calc(100% * ${S.widthFactor})` : e.width = "100%", S.heightFactor ? e.height = `calc(100% * ${S.heightFactor})` : e.height = "100%", e;
|
|
189
|
+
}), w = computed(() => ({ flexShrink: 0 }));
|
|
190
|
+
return (e, S) => (openBlock(), createElementBlock("div", {
|
|
191
191
|
class: "flutter-align",
|
|
192
|
-
style: normalizeStyle(
|
|
192
|
+
style: normalizeStyle(C.value)
|
|
193
193
|
}, [createElementVNode("div", {
|
|
194
194
|
class: "flutter-align-child",
|
|
195
|
-
style: normalizeStyle(
|
|
196
|
-
}, [renderSlot(
|
|
195
|
+
style: normalizeStyle(w.value)
|
|
196
|
+
}, [renderSlot(e.$slots, "default")], 4)], 4));
|
|
197
197
|
}
|
|
198
|
-
}), BOX_CONSTRAINTS_SYMBOL = Symbol("boxConstraints"), toVal = (
|
|
199
|
-
function BoxConstraints(
|
|
200
|
-
let
|
|
198
|
+
}), BOX_CONSTRAINTS_SYMBOL = Symbol("boxConstraints"), toVal = (e) => e === Infinity ? void 0 : e;
|
|
199
|
+
function BoxConstraints(e = {}) {
|
|
200
|
+
let S = Math.max(0, e.minWidth ?? 0), C = Math.max(0, e.minHeight ?? 0), w = Math.max(S, e.maxWidth ?? Infinity), T = Math.max(C, e.maxHeight ?? Infinity);
|
|
201
201
|
return {
|
|
202
|
-
minWidth: toVal(
|
|
203
|
-
maxWidth: toVal(
|
|
204
|
-
minHeight: toVal(
|
|
205
|
-
maxHeight: toVal(
|
|
202
|
+
minWidth: toVal(S),
|
|
203
|
+
maxWidth: toVal(w),
|
|
204
|
+
minHeight: toVal(C),
|
|
205
|
+
maxHeight: toVal(T),
|
|
206
206
|
[BOX_CONSTRAINTS_SYMBOL]: !0
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
|
-
BoxConstraints.tight = (
|
|
210
|
-
minWidth:
|
|
211
|
-
maxWidth:
|
|
212
|
-
minHeight:
|
|
213
|
-
maxHeight:
|
|
214
|
-
}), BoxConstraints.loose = (
|
|
209
|
+
BoxConstraints.tight = (e) => BoxConstraints({
|
|
210
|
+
minWidth: e.width,
|
|
211
|
+
maxWidth: e.width,
|
|
212
|
+
minHeight: e.height,
|
|
213
|
+
maxHeight: e.height
|
|
214
|
+
}), BoxConstraints.loose = (e) => BoxConstraints({
|
|
215
215
|
minWidth: 0,
|
|
216
|
-
maxWidth:
|
|
216
|
+
maxWidth: e.width,
|
|
217
217
|
minHeight: 0,
|
|
218
|
-
maxHeight:
|
|
219
|
-
}), BoxConstraints.expand = ({ width:
|
|
220
|
-
minWidth:
|
|
221
|
-
maxWidth:
|
|
222
|
-
minHeight:
|
|
223
|
-
maxHeight:
|
|
218
|
+
maxHeight: e.height
|
|
219
|
+
}), BoxConstraints.expand = ({ width: e, height: S } = {}) => BoxConstraints({
|
|
220
|
+
minWidth: e ?? Infinity,
|
|
221
|
+
maxWidth: e ?? Infinity,
|
|
222
|
+
minHeight: S ?? Infinity,
|
|
223
|
+
maxHeight: S ?? Infinity
|
|
224
224
|
});
|
|
225
|
-
function isBoxConstraints(
|
|
226
|
-
return isPlainObject(
|
|
225
|
+
function isBoxConstraints(e) {
|
|
226
|
+
return isPlainObject(e) ? BOX_CONSTRAINTS_SYMBOL in e : !1;
|
|
227
227
|
}
|
|
228
|
-
function boxConstraintsToStyle(
|
|
229
|
-
let
|
|
228
|
+
function boxConstraintsToStyle(e) {
|
|
229
|
+
let S = e ?? {};
|
|
230
230
|
return {
|
|
231
|
-
minWidth: px2vw(
|
|
232
|
-
maxWidth: px2vw(
|
|
233
|
-
minHeight: px2vw(
|
|
234
|
-
maxHeight: px2vw(
|
|
231
|
+
minWidth: px2vw(S.minWidth),
|
|
232
|
+
maxWidth: px2vw(S.maxWidth),
|
|
233
|
+
minHeight: px2vw(S.minHeight),
|
|
234
|
+
maxHeight: px2vw(S.maxHeight)
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
237
|
var BORDER_SIDE_SYMBOL = Symbol("borderSide"), BORDERS_SYMBOL = Symbol("borders");
|
|
238
|
-
function
|
|
238
|
+
function BorderSide(e) {
|
|
239
239
|
return {
|
|
240
|
-
width:
|
|
241
|
-
color:
|
|
242
|
-
style:
|
|
240
|
+
width: e.width ? e.width : 1,
|
|
241
|
+
color: e.color || "#000",
|
|
242
|
+
style: e.style || "solid",
|
|
243
243
|
[BORDER_SIDE_SYMBOL]: !0
|
|
244
244
|
};
|
|
245
245
|
}
|
|
246
|
-
Border
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
246
|
+
const Border = BorderSide;
|
|
247
|
+
Border.all = ({ color: e, width: S, style: C } = {}) => {
|
|
248
|
+
let w = Border({
|
|
249
|
+
color: e,
|
|
250
|
+
width: S,
|
|
251
|
+
style: C
|
|
251
252
|
});
|
|
252
253
|
return {
|
|
253
|
-
top:
|
|
254
|
-
bottom:
|
|
255
|
-
left:
|
|
256
|
-
right:
|
|
254
|
+
top: w,
|
|
255
|
+
bottom: w,
|
|
256
|
+
left: w,
|
|
257
|
+
right: w,
|
|
257
258
|
[BORDERS_SYMBOL]: !0
|
|
258
259
|
};
|
|
259
260
|
};
|
|
260
|
-
function isBorderSide(
|
|
261
|
-
return isPlainObject(
|
|
262
|
-
}
|
|
263
|
-
function isBorders(
|
|
264
|
-
return isPlainObject(
|
|
265
|
-
}
|
|
266
|
-
function borderSideToString(
|
|
267
|
-
if (!
|
|
268
|
-
let
|
|
269
|
-
return
|
|
270
|
-
}
|
|
271
|
-
function
|
|
272
|
-
if (
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
261
|
+
function isBorderSide(e) {
|
|
262
|
+
return isPlainObject(e) ? BORDER_SIDE_SYMBOL in e : !1;
|
|
263
|
+
}
|
|
264
|
+
function isBorders(e) {
|
|
265
|
+
return isPlainObject(e) ? BORDERS_SYMBOL in e : !1;
|
|
266
|
+
}
|
|
267
|
+
function borderSideToString(e) {
|
|
268
|
+
if (!e) return;
|
|
269
|
+
let S = [], { width: C, color: w, style: T } = e;
|
|
270
|
+
return C && S.push(C > 1 ? px2vw(C) : C + "px"), w && S.push(w), T && S.push(T), `${S.join(" ")}`;
|
|
271
|
+
}
|
|
272
|
+
function borderSideToStyle(e) {
|
|
273
|
+
if (!e) return {};
|
|
274
|
+
let S = borderSideToString(e);
|
|
275
|
+
return S ? { border: S } : {};
|
|
276
|
+
}
|
|
277
|
+
function borderToStyle(e) {
|
|
278
|
+
if (e) return {
|
|
279
|
+
borderLeft: borderSideToString(e.left),
|
|
280
|
+
borderTop: borderSideToString(e.top),
|
|
281
|
+
borderRight: borderSideToString(e.right),
|
|
282
|
+
borderBottom: borderSideToString(e.bottom)
|
|
277
283
|
};
|
|
278
284
|
}
|
|
279
285
|
var BORDER_RADIUS_SYMBOL = Symbol("borderRadius");
|
|
280
|
-
function BorderRadius(
|
|
281
|
-
let { topLeft:
|
|
286
|
+
function BorderRadius(e) {
|
|
287
|
+
let { topLeft: S, topRight: C, bottomLeft: w, bottomRight: T } = e;
|
|
282
288
|
return {
|
|
283
|
-
topLeft:
|
|
284
|
-
topRight:
|
|
285
|
-
bottomLeft:
|
|
286
|
-
bottomRight:
|
|
289
|
+
topLeft: S || 0,
|
|
290
|
+
topRight: C || 0,
|
|
291
|
+
bottomLeft: w || 0,
|
|
292
|
+
bottomRight: T || 0,
|
|
287
293
|
[BORDER_RADIUS_SYMBOL]: !0
|
|
288
294
|
};
|
|
289
295
|
}
|
|
290
|
-
BorderRadius.all = (
|
|
291
|
-
topLeft:
|
|
292
|
-
topRight:
|
|
293
|
-
bottomLeft:
|
|
294
|
-
bottomRight:
|
|
296
|
+
BorderRadius.all = (e) => ({
|
|
297
|
+
topLeft: e,
|
|
298
|
+
topRight: e,
|
|
299
|
+
bottomLeft: e,
|
|
300
|
+
bottomRight: e,
|
|
295
301
|
[BORDER_RADIUS_SYMBOL]: !0
|
|
296
|
-
}), BorderRadius.circular = (
|
|
297
|
-
topLeft:
|
|
298
|
-
topRight:
|
|
299
|
-
bottomLeft:
|
|
300
|
-
bottomRight:
|
|
302
|
+
}), BorderRadius.circular = (e) => BorderRadius.all(e), BorderRadius.only = ({ topLeft: e, topRight: S, bottomLeft: C, bottomRight: w }) => BorderRadius({
|
|
303
|
+
topLeft: e,
|
|
304
|
+
topRight: S,
|
|
305
|
+
bottomLeft: C,
|
|
306
|
+
bottomRight: w
|
|
301
307
|
}), BorderRadius.zero = BorderRadius({});
|
|
302
|
-
function isBorderRadius(
|
|
303
|
-
return typeof
|
|
308
|
+
function isBorderRadius(e) {
|
|
309
|
+
return typeof e == "object" && !!e && BORDER_RADIUS_SYMBOL in e;
|
|
304
310
|
}
|
|
305
|
-
function borderRadiusToStyle(
|
|
306
|
-
if (!
|
|
307
|
-
let { topLeft:
|
|
308
|
-
return
|
|
311
|
+
function borderRadiusToStyle(e) {
|
|
312
|
+
if (!e) return {};
|
|
313
|
+
let { topLeft: S, topRight: C, bottomLeft: w, bottomRight: T } = e, E = {};
|
|
314
|
+
return w && (E.borderBottomLeftRadius = px2vw(w)), T && (E.borderBottomRightRadius = px2vw(T)), S && (E.borderTopLeftRadius = px2vw(S)), C && (E.borderTopRightRadius = px2vw(C)), E;
|
|
309
315
|
}
|
|
310
|
-
let BlurStyle = /* @__PURE__ */ function(
|
|
311
|
-
return
|
|
316
|
+
let BlurStyle = /* @__PURE__ */ function(e) {
|
|
317
|
+
return e.normal = "normal", e.solid = "solid", e.outer = "outer", e.inner = "inner", e;
|
|
312
318
|
}({});
|
|
313
319
|
var BOX_SHADOW_SYMBOL = Symbol("boxShadow");
|
|
314
|
-
function BoxShadow(
|
|
320
|
+
function BoxShadow(e = {}) {
|
|
315
321
|
return {
|
|
316
|
-
color:
|
|
317
|
-
offset:
|
|
322
|
+
color: e.color || "rgba(0, 0, 0, 0.2)",
|
|
323
|
+
offset: e.offset || {
|
|
318
324
|
x: 0,
|
|
319
325
|
y: 0
|
|
320
326
|
},
|
|
321
|
-
blurRadius:
|
|
322
|
-
spreadRadius:
|
|
323
|
-
blurStyle:
|
|
327
|
+
blurRadius: e.blurRadius || 0,
|
|
328
|
+
spreadRadius: e.spreadRadius || 0,
|
|
329
|
+
blurStyle: e.blurStyle || BlurStyle.normal,
|
|
324
330
|
[BOX_SHADOW_SYMBOL]: !0
|
|
325
331
|
};
|
|
326
332
|
}
|
|
327
|
-
function isBoxShadow(
|
|
328
|
-
return isPlainObject(
|
|
333
|
+
function isBoxShadow(e) {
|
|
334
|
+
return isPlainObject(e) ? BOX_SHADOW_SYMBOL in e : !1;
|
|
329
335
|
}
|
|
330
|
-
function boxShadowToCSS(
|
|
331
|
-
return `${px2vw(
|
|
336
|
+
function boxShadowToCSS(e) {
|
|
337
|
+
return `${px2vw(e.offset?.x || 0)} ${px2vw(e.offset?.y || 0)} ${px2vw(e.blurRadius || 0)} ${px2vw(e.spreadRadius || 0)} ${e.color || "rgba(0,0,0,0.2)"} ${e.blurStyle === BlurStyle.inner ? "inset" : ""}`.trim();
|
|
332
338
|
}
|
|
333
|
-
let TileMode = /* @__PURE__ */ function(
|
|
334
|
-
return
|
|
339
|
+
let TileMode = /* @__PURE__ */ function(e) {
|
|
340
|
+
return e.clamp = "clamp", e.repeated = "repeated", e.mirror = "mirror", e.decal = "decal", e;
|
|
335
341
|
}({});
|
|
336
|
-
function alignmentToCSSSide(
|
|
337
|
-
switch (
|
|
342
|
+
function alignmentToCSSSide(e) {
|
|
343
|
+
switch (e) {
|
|
338
344
|
case Alignment.topLeft: return "to bottom right";
|
|
339
345
|
case Alignment.topCenter: return "to bottom";
|
|
340
346
|
case Alignment.topRight: return "to bottom left";
|
|
@@ -346,20 +352,20 @@ function alignmentToCSSSide(o) {
|
|
|
346
352
|
default: return "to bottom";
|
|
347
353
|
}
|
|
348
354
|
}
|
|
349
|
-
function calculateLinearDirection(
|
|
350
|
-
return
|
|
355
|
+
function calculateLinearDirection(e, S) {
|
|
356
|
+
return e === Alignment.topCenter && S === Alignment.bottomCenter ? "to bottom" : e === Alignment.bottomCenter && S === Alignment.topCenter ? "to top" : e === Alignment.centerLeft && S === Alignment.centerRight ? "to right" : e === Alignment.centerRight && S === Alignment.centerLeft ? "to left" : e === Alignment.topLeft && S === Alignment.bottomRight ? "to bottom right" : e === Alignment.bottomRight && S === Alignment.topLeft ? "to top left" : e === Alignment.topRight && S === Alignment.bottomLeft ? "to bottom left" : e === Alignment.bottomLeft && S === Alignment.topRight ? "to top right" : alignmentToCSSSide(e);
|
|
351
357
|
}
|
|
352
|
-
function LinearGradient(
|
|
353
|
-
let { colors:
|
|
354
|
-
if (!
|
|
355
|
-
let
|
|
356
|
-
return
|
|
358
|
+
function LinearGradient(e) {
|
|
359
|
+
let { colors: S, stops: C, begin: w = Alignment.centerLeft, end: T = Alignment.centerRight } = e;
|
|
360
|
+
if (!S || S.length === 0) return "none";
|
|
361
|
+
let E = calculateLinearDirection(w, T), D = "";
|
|
362
|
+
return D = C && C.length === S.length ? S.map((e, S) => `${e} ${C[S] * 100}%`).join(", ") : S.join(", "), `linear-gradient(${E}, ${D})`;
|
|
357
363
|
}
|
|
358
|
-
function RadialGradient(
|
|
359
|
-
let { colors:
|
|
360
|
-
if (!
|
|
361
|
-
let
|
|
362
|
-
return
|
|
364
|
+
function RadialGradient(e) {
|
|
365
|
+
let { colors: S, stops: C, center: w = Alignment.center } = e;
|
|
366
|
+
if (!S || S.length === 0) return "none";
|
|
367
|
+
let T = alignmentToCssPosition(w), E = "";
|
|
368
|
+
return E = C && C.length === S.length ? S.map((e, S) => `${e} ${C[S] * 100}%`).join(", ") : S.join(", "), `radial-gradient(circle at ${T}, ${E})`;
|
|
363
369
|
}
|
|
364
370
|
const BoxFit = {
|
|
365
371
|
fitWidth: "fitWidth",
|
|
@@ -386,52 +392,51 @@ var ImageFitMap = {
|
|
|
386
392
|
center: "center"
|
|
387
393
|
};
|
|
388
394
|
const BoxAlignment = Alignment;
|
|
389
|
-
let BoxShape = /* @__PURE__ */ function(
|
|
390
|
-
return
|
|
395
|
+
let BoxShape = /* @__PURE__ */ function(e) {
|
|
396
|
+
return e.rectangle = "rectangle", e.circle = "circle", e;
|
|
391
397
|
}({});
|
|
392
398
|
var _baseUrl = "";
|
|
393
|
-
function setBaseUrl(
|
|
394
|
-
_baseUrl =
|
|
395
|
-
}
|
|
396
|
-
function normalizeSrc(
|
|
397
|
-
if (!
|
|
398
|
-
if (/^(https?:|file:|blob:|data:|\/\/)/i.test(
|
|
399
|
-
let
|
|
400
|
-
return
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
if (
|
|
413
|
-
else if (o.alignment !== Alignment.center) if (Object.keys(Alignment).includes(o.alignment)) F.backgroundPosition = alignmentToCssPosition(o.alignment);
|
|
399
|
+
function setBaseUrl(e) {
|
|
400
|
+
_baseUrl = e;
|
|
401
|
+
}
|
|
402
|
+
function normalizeSrc(e) {
|
|
403
|
+
if (!e) return "";
|
|
404
|
+
if (/^(https?:|file:|blob:|data:|\/\/)/i.test(e) || /^(linear|radial|conic|repeating-linear|repeating-radial)-gradient\(/.test(e) || !_baseUrl || _baseUrl === "/") return e;
|
|
405
|
+
let S = _baseUrl.endsWith("/") ? _baseUrl.slice(0, -1) : _baseUrl;
|
|
406
|
+
return e.startsWith(S) ? e : `${S}/${e.startsWith("/") ? e.slice(1) : e}`;
|
|
407
|
+
}
|
|
408
|
+
function DecorationImage(e) {
|
|
409
|
+
return e;
|
|
410
|
+
}
|
|
411
|
+
var BOX_DECORATION_SYMBOL = Symbol("boxDecoration"), isGradient = (e) => /^(linear|radial|conic|repeating-linear|repeating-radial)-gradient\(/.test(e);
|
|
412
|
+
function decorationImageToStyle(e) {
|
|
413
|
+
if (!e) return {};
|
|
414
|
+
let S = {}, C = normalizeSrc(typeof e.image == "string" ? e.image : e.image.src);
|
|
415
|
+
if (S.backgroundImage = isGradient(C) ? C : `url(${C})`, e.fit && (S.backgroundSize = ImageFitMap[e.fit] || e.fit), S.backgroundAttachment = e.attachment, S.backgroundBlendMode = e.blendMode, S.backgroundClip = e.clip, S.backgroundOrigin = e.origin, S.backgroundRepeat = e.repeat ?? "no-repeat", e.alignment) {
|
|
416
|
+
let C = alignmentToCssPosition(e.alignment);
|
|
417
|
+
if (C && C !== "center") S.backgroundPosition = C;
|
|
418
|
+
else if (e.alignment !== Alignment.center) if (Object.keys(Alignment).includes(e.alignment)) S.backgroundPosition = alignmentToCssPosition(e.alignment);
|
|
414
419
|
else {
|
|
415
|
-
let [
|
|
416
|
-
|
|
420
|
+
let [C, w] = (e.alignment || "").split(" ");
|
|
421
|
+
C && !cssPoisitions[C] && (C = px2vw(C)), w && !cssPoisitions[w] && (w = px2vw(w)), C && !w && (w = "center"), S.backgroundPosition = `${C} ${w}`;
|
|
417
422
|
}
|
|
418
|
-
else
|
|
423
|
+
else S.backgroundPosition = "center";
|
|
419
424
|
}
|
|
420
|
-
return
|
|
425
|
+
return S;
|
|
421
426
|
}
|
|
422
|
-
function boxDecorationToStyle(
|
|
423
|
-
if (!
|
|
424
|
-
let { color:
|
|
425
|
-
return
|
|
427
|
+
function boxDecorationToStyle(e) {
|
|
428
|
+
if (!e) return {};
|
|
429
|
+
let { color: S, border: C, borderRadius: w, boxShadow: T, gradient: E, image: D, overflow: O, opacity: k, shape: A } = e, j = {};
|
|
430
|
+
return S && (j.backgroundColor = S), k !== void 0 && (j.opacity = k), O && (j.overflow = O), E && (j.backgroundImage = E), D && Object.assign(j, decorationImageToStyle(D)), C && Object.assign(j, borderToStyle(C)), A === BoxShape.circle ? j.borderRadius = "50%" : w && Object.assign(j, borderRadiusToStyle(w)), T && (j.boxShadow = (Array.isArray(T) ? T : [T]).map(boxShadowToCSS).join(", ")), j;
|
|
426
431
|
}
|
|
427
|
-
function BoxDecoration(
|
|
432
|
+
function BoxDecoration(e) {
|
|
428
433
|
return {
|
|
429
|
-
...
|
|
434
|
+
...e,
|
|
430
435
|
[BOX_DECORATION_SYMBOL]: !0
|
|
431
436
|
};
|
|
432
437
|
}
|
|
433
|
-
function isBoxDecoration(
|
|
434
|
-
return isPlainObject(
|
|
438
|
+
function isBoxDecoration(e) {
|
|
439
|
+
return isPlainObject(e) ? BOX_DECORATION_SYMBOL in e : !1;
|
|
435
440
|
}
|
|
436
441
|
const Clip = {
|
|
437
442
|
none: "none",
|
|
@@ -440,45 +445,45 @@ const Clip = {
|
|
|
440
445
|
antiAliasWithSaveLayer: "antiAliasWithSaveLayer"
|
|
441
446
|
};
|
|
442
447
|
var EDGE_INSETS_SYMBOL = Symbol("edgeInsets");
|
|
443
|
-
function EdgeInsets(
|
|
444
|
-
let { top:
|
|
448
|
+
function EdgeInsets(e) {
|
|
449
|
+
let { top: S, right: C, bottom: w, left: T, horizontal: E, vertical: D } = e;
|
|
445
450
|
return {
|
|
446
|
-
top:
|
|
447
|
-
right:
|
|
448
|
-
bottom:
|
|
449
|
-
left:
|
|
451
|
+
top: S ?? D ?? 0,
|
|
452
|
+
right: C ?? E ?? 0,
|
|
453
|
+
bottom: w ?? D ?? 0,
|
|
454
|
+
left: T ?? E ?? 0,
|
|
450
455
|
[EDGE_INSETS_SYMBOL]: !0
|
|
451
456
|
};
|
|
452
457
|
}
|
|
453
|
-
EdgeInsets.all = (
|
|
454
|
-
top:
|
|
455
|
-
right:
|
|
456
|
-
bottom:
|
|
457
|
-
left:
|
|
458
|
+
EdgeInsets.all = (e) => ({
|
|
459
|
+
top: e,
|
|
460
|
+
right: e,
|
|
461
|
+
bottom: e,
|
|
462
|
+
left: e,
|
|
458
463
|
[EDGE_INSETS_SYMBOL]: !0
|
|
459
|
-
}), EdgeInsets.symmetric = ({ vertical:
|
|
460
|
-
vertical:
|
|
461
|
-
horizontal:
|
|
462
|
-
}), EdgeInsets.only = ({ top:
|
|
463
|
-
top:
|
|
464
|
-
right:
|
|
465
|
-
bottom:
|
|
466
|
-
left:
|
|
464
|
+
}), EdgeInsets.symmetric = ({ vertical: e, horizontal: S }) => EdgeInsets({
|
|
465
|
+
vertical: e,
|
|
466
|
+
horizontal: S
|
|
467
|
+
}), EdgeInsets.only = ({ top: e, right: S, bottom: C, left: w }) => EdgeInsets({
|
|
468
|
+
top: e,
|
|
469
|
+
right: S,
|
|
470
|
+
bottom: C,
|
|
471
|
+
left: w
|
|
467
472
|
}), EdgeInsets.zero = EdgeInsets({});
|
|
468
|
-
function isEdgeInsets(
|
|
469
|
-
return typeof
|
|
473
|
+
function isEdgeInsets(e) {
|
|
474
|
+
return typeof e == "object" && !!e && EDGE_INSETS_SYMBOL in e;
|
|
470
475
|
}
|
|
471
|
-
function edgeInsetsToStyle(
|
|
472
|
-
if (!
|
|
473
|
-
let
|
|
476
|
+
function edgeInsetsToStyle(e, S) {
|
|
477
|
+
if (!S) return {};
|
|
478
|
+
let C = EdgeInsets(S);
|
|
474
479
|
return {
|
|
475
|
-
[`${
|
|
476
|
-
[`${
|
|
477
|
-
[`${
|
|
478
|
-
[`${
|
|
480
|
+
[`${e}Top`]: px2vw(C.top),
|
|
481
|
+
[`${e}Right`]: px2vw(C.right),
|
|
482
|
+
[`${e}Bottom`]: px2vw(C.bottom),
|
|
483
|
+
[`${e}Left`]: px2vw(C.left)
|
|
479
484
|
};
|
|
480
485
|
}
|
|
481
|
-
const paddingToStyle = (
|
|
486
|
+
const paddingToStyle = (e) => edgeInsetsToStyle("padding", e), marginToStyle = (e) => edgeInsetsToStyle("margin", e), CrossAxisAlignment = {
|
|
482
487
|
start: "start",
|
|
483
488
|
end: "end",
|
|
484
489
|
center: "center",
|
|
@@ -509,35 +514,35 @@ const paddingToStyle = (o) => edgeInsetsToStyle("padding", o), marginToStyle = (
|
|
|
509
514
|
expand: "expand",
|
|
510
515
|
passthrough: "passthrough"
|
|
511
516
|
};
|
|
512
|
-
function Size(
|
|
513
|
-
let { width:
|
|
517
|
+
function Size(e) {
|
|
518
|
+
let { width: S, height: C } = e;
|
|
514
519
|
return {
|
|
515
|
-
width:
|
|
516
|
-
height:
|
|
520
|
+
width: S,
|
|
521
|
+
height: C
|
|
517
522
|
};
|
|
518
523
|
}
|
|
519
|
-
Size.square = (
|
|
520
|
-
width:
|
|
521
|
-
height:
|
|
524
|
+
Size.square = (e) => Size({
|
|
525
|
+
width: e,
|
|
526
|
+
height: e
|
|
522
527
|
}), Size.zero = Size({
|
|
523
528
|
width: 0,
|
|
524
529
|
height: 0
|
|
525
530
|
}), Size.infinite = Size({
|
|
526
531
|
width: Infinity,
|
|
527
532
|
height: Infinity
|
|
528
|
-
}), Size.fromHeight = (
|
|
533
|
+
}), Size.fromHeight = (e) => Size({
|
|
529
534
|
width: Infinity,
|
|
530
|
-
height:
|
|
531
|
-
}), Size.fromWidth = (
|
|
532
|
-
width:
|
|
535
|
+
height: e
|
|
536
|
+
}), Size.fromWidth = (e) => Size({
|
|
537
|
+
width: e,
|
|
533
538
|
height: Infinity
|
|
534
539
|
});
|
|
535
|
-
function sizeToStyle(
|
|
536
|
-
if (!
|
|
537
|
-
let { width:
|
|
540
|
+
function sizeToStyle(e) {
|
|
541
|
+
if (!e) return;
|
|
542
|
+
let { width: S, height: C } = e;
|
|
538
543
|
return {
|
|
539
|
-
width: px2vw(
|
|
540
|
-
height: px2vw(
|
|
544
|
+
width: px2vw(S),
|
|
545
|
+
height: px2vw(C)
|
|
541
546
|
};
|
|
542
547
|
}
|
|
543
548
|
var GESTURE_HANDLED = Symbol("gesture_handled");
|
|
@@ -550,108 +555,108 @@ const events = [
|
|
|
550
555
|
"pan-update",
|
|
551
556
|
"pan-end"
|
|
552
557
|
];
|
|
553
|
-
function useGestures({ emit:
|
|
554
|
-
let
|
|
558
|
+
function useGestures({ emit: e }) {
|
|
559
|
+
let S = ref(0), C = ref(null), w = ref(!1), T = ref({
|
|
555
560
|
x: 0,
|
|
556
561
|
y: 0
|
|
557
|
-
}),
|
|
562
|
+
}), E = ref({
|
|
558
563
|
x: 0,
|
|
559
564
|
y: 0
|
|
560
|
-
}),
|
|
561
|
-
onTap: () =>
|
|
562
|
-
onClick: (
|
|
563
|
-
onDoubleTap: () =>
|
|
564
|
-
onLongPress: () =>
|
|
565
|
-
onPanStart: (
|
|
566
|
-
onPanUpdate: (
|
|
567
|
-
onPanEnd: () =>
|
|
568
|
-
},
|
|
569
|
-
if (
|
|
570
|
-
|
|
571
|
-
let
|
|
572
|
-
|
|
573
|
-
},
|
|
574
|
-
|
|
575
|
-
},
|
|
576
|
-
(Math.abs(
|
|
577
|
-
},
|
|
578
|
-
|
|
579
|
-
},
|
|
580
|
-
if (
|
|
581
|
-
let
|
|
582
|
-
|
|
583
|
-
},
|
|
584
|
-
if (
|
|
585
|
-
|
|
586
|
-
let
|
|
587
|
-
(Math.abs(
|
|
588
|
-
},
|
|
589
|
-
|
|
590
|
-
},
|
|
591
|
-
|
|
592
|
-
},
|
|
593
|
-
|
|
594
|
-
|
|
565
|
+
}), D = {
|
|
566
|
+
onTap: () => e("tap"),
|
|
567
|
+
onClick: (S) => e("click", S),
|
|
568
|
+
onDoubleTap: () => e("double-tap"),
|
|
569
|
+
onLongPress: () => e("long-press"),
|
|
570
|
+
onPanStart: (S) => e("pan-start", S),
|
|
571
|
+
onPanUpdate: (S) => e("pan-update", S),
|
|
572
|
+
onPanEnd: () => e("pan-end")
|
|
573
|
+
}, O = (e) => {
|
|
574
|
+
if (e[GESTURE_HANDLED]) return;
|
|
575
|
+
e[GESTURE_HANDLED] = !0;
|
|
576
|
+
let C = Date.now();
|
|
577
|
+
C - S.value < 300 ? (D.onDoubleTap?.(), S.value = 0) : (D.onTap?.(), D.onClick?.(e), S.value = C);
|
|
578
|
+
}, k = (e) => {
|
|
579
|
+
e[GESTURE_HANDLED] || (e[GESTURE_HANDLED] = !0, I(), R(e.clientX, e.clientY), window.addEventListener("mousemove", A), window.addEventListener("mouseup", j));
|
|
580
|
+
}, A = (e) => {
|
|
581
|
+
(Math.abs(e.clientX - T.value.x) > 5 || Math.abs(e.clientY - T.value.y) > 5) && L(), z(e.clientX, e.clientY);
|
|
582
|
+
}, j = () => {
|
|
583
|
+
L(), B(), window.removeEventListener("mousemove", A), window.removeEventListener("mouseup", j);
|
|
584
|
+
}, M = (e) => {
|
|
585
|
+
if (e[GESTURE_HANDLED] || (e[GESTURE_HANDLED] = !0, e.touches.length > 1)) return;
|
|
586
|
+
let S = e.touches[0];
|
|
587
|
+
I(), R(S.clientX, S.clientY);
|
|
588
|
+
}, N = (e) => {
|
|
589
|
+
if (e[GESTURE_HANDLED]) return;
|
|
590
|
+
e[GESTURE_HANDLED] = !0;
|
|
591
|
+
let S = e.touches[0];
|
|
592
|
+
(Math.abs(S.clientX - T.value.x) > 5 || Math.abs(S.clientY - T.value.y) > 5) && L(), z(S.clientX, S.clientY);
|
|
593
|
+
}, P = (e) => {
|
|
594
|
+
e[GESTURE_HANDLED] || (e[GESTURE_HANDLED] = !0, L(), B());
|
|
595
|
+
}, F = (e) => {
|
|
596
|
+
e[GESTURE_HANDLED] || (e[GESTURE_HANDLED] = !0, L(), B());
|
|
597
|
+
}, I = () => {
|
|
598
|
+
L(), C.value = window.setTimeout(() => {
|
|
599
|
+
D.onLongPress?.();
|
|
595
600
|
}, 500);
|
|
596
|
-
},
|
|
597
|
-
|
|
598
|
-
},
|
|
599
|
-
|
|
600
|
-
x:
|
|
601
|
-
y:
|
|
602
|
-
},
|
|
603
|
-
x:
|
|
604
|
-
y:
|
|
605
|
-
},
|
|
606
|
-
x:
|
|
607
|
-
y:
|
|
601
|
+
}, L = () => {
|
|
602
|
+
C.value &&= (clearTimeout(C.value), null);
|
|
603
|
+
}, R = (e, S) => {
|
|
604
|
+
T.value = {
|
|
605
|
+
x: e,
|
|
606
|
+
y: S
|
|
607
|
+
}, E.value = {
|
|
608
|
+
x: e,
|
|
609
|
+
y: S
|
|
610
|
+
}, w.value = !0, D.onPanStart?.({ globalPosition: {
|
|
611
|
+
x: e,
|
|
612
|
+
y: S
|
|
608
613
|
} });
|
|
609
|
-
},
|
|
610
|
-
if (!
|
|
611
|
-
let
|
|
612
|
-
|
|
614
|
+
}, z = (e, S) => {
|
|
615
|
+
if (!w.value) return;
|
|
616
|
+
let C = e - E.value.x, T = S - E.value.y;
|
|
617
|
+
C === 0 && T === 0 || (D.onPanUpdate?.({
|
|
613
618
|
delta: {
|
|
614
|
-
x:
|
|
615
|
-
y:
|
|
619
|
+
x: C,
|
|
620
|
+
y: T
|
|
616
621
|
},
|
|
617
622
|
globalPosition: {
|
|
618
|
-
x:
|
|
619
|
-
y:
|
|
623
|
+
x: e,
|
|
624
|
+
y: S
|
|
620
625
|
}
|
|
621
|
-
}),
|
|
622
|
-
x:
|
|
623
|
-
y:
|
|
626
|
+
}), E.value = {
|
|
627
|
+
x: e,
|
|
628
|
+
y: S
|
|
624
629
|
});
|
|
625
|
-
},
|
|
626
|
-
|
|
630
|
+
}, B = () => {
|
|
631
|
+
w.value && (w.value = !1, D.onPanEnd?.());
|
|
627
632
|
};
|
|
628
633
|
return {
|
|
629
|
-
onClick:
|
|
630
|
-
onMousedown:
|
|
631
|
-
onMouseup:
|
|
632
|
-
onMousemove:
|
|
633
|
-
onTouchstart:
|
|
634
|
-
onTouchmove:
|
|
635
|
-
onTouchend:
|
|
636
|
-
onTouchcancel:
|
|
634
|
+
onClick: O,
|
|
635
|
+
onMousedown: k,
|
|
636
|
+
onMouseup: j,
|
|
637
|
+
onMousemove: A,
|
|
638
|
+
onTouchstart: M,
|
|
639
|
+
onTouchmove: N,
|
|
640
|
+
onTouchend: P,
|
|
641
|
+
onTouchcancel: F
|
|
637
642
|
};
|
|
638
643
|
}
|
|
639
644
|
var S_EVENTS = Symbol("events"), S_BEHAVIOR = Symbol("behavior");
|
|
640
645
|
function useGestureStyle() {
|
|
641
|
-
let
|
|
642
|
-
return (
|
|
646
|
+
let e = inject(S_BEHAVIOR, "deferToChild"), S = {};
|
|
647
|
+
return (e === "opaque" || e === "translucent") && (S.cursor = "pointer", S.userSelect = "none"), S;
|
|
643
648
|
}
|
|
644
649
|
function useGestureEvents() {
|
|
645
650
|
return inject(S_EVENTS, void 0);
|
|
646
651
|
}
|
|
647
|
-
function provideGesture(
|
|
648
|
-
provide(S_EVENTS,
|
|
652
|
+
function provideGesture(e, S) {
|
|
653
|
+
provide(S_EVENTS, e), provide(S_BEHAVIOR, S);
|
|
649
654
|
}
|
|
650
655
|
function useSafeAttrs() {
|
|
651
|
-
let
|
|
656
|
+
let e = useAttrs();
|
|
652
657
|
return computed(() => {
|
|
653
|
-
let { class:
|
|
654
|
-
return
|
|
658
|
+
let { class: S, style: C, ...w } = e ?? {};
|
|
659
|
+
return w;
|
|
655
660
|
});
|
|
656
661
|
}
|
|
657
662
|
var StyleInjectionKey = Symbol("fluekit-style-provider"), Injector = defineComponent({
|
|
@@ -661,8 +666,8 @@ var StyleInjectionKey = Symbol("fluekit-style-provider"), Injector = defineCompo
|
|
|
661
666
|
type: Object,
|
|
662
667
|
default: () => ({})
|
|
663
668
|
} },
|
|
664
|
-
setup(
|
|
665
|
-
return provide(StyleInjectionKey, computed(() =>
|
|
669
|
+
setup(e, { slots: S }) {
|
|
670
|
+
return provide(StyleInjectionKey, computed(() => e.style)), () => S.default?.() || null;
|
|
666
671
|
}
|
|
667
672
|
});
|
|
668
673
|
function useStyles() {
|
|
@@ -680,21 +685,21 @@ const StyleProvider = defineComponent({
|
|
|
680
685
|
default: () => ({})
|
|
681
686
|
}
|
|
682
687
|
},
|
|
683
|
-
setup(
|
|
688
|
+
setup(e, { slots: S }) {
|
|
684
689
|
return () => {
|
|
685
|
-
let
|
|
686
|
-
return
|
|
690
|
+
let C = S.default?.() ?? [];
|
|
691
|
+
return C.length <= 0 ? null : cloneAndMergeStyles(C, e.style, e.attrs);
|
|
687
692
|
};
|
|
688
693
|
}
|
|
689
694
|
});
|
|
690
|
-
function cloneAndMergeStyles(
|
|
691
|
-
return
|
|
692
|
-
...
|
|
693
|
-
...
|
|
695
|
+
function cloneAndMergeStyles(T, E, D) {
|
|
696
|
+
return T.map((T) => T && (T.type === Fragment ? Array.isArray(T.children) ? h(Fragment, cloneAndMergeStyles(T.children, E, D)) : T : T.type === Comment || T.type === Text ? T : isHtmlTag(T) ? cloneVNode(T, { style: {
|
|
697
|
+
...T.props?.style || {},
|
|
698
|
+
...E
|
|
694
699
|
} }) : h(Injector, {
|
|
695
|
-
...
|
|
696
|
-
style:
|
|
697
|
-
}, { default: () =>
|
|
700
|
+
...D,
|
|
701
|
+
style: E
|
|
702
|
+
}, { default: () => T })));
|
|
698
703
|
}
|
|
699
704
|
var AnimatedContainer_default = /* @__PURE__ */ defineComponent({
|
|
700
705
|
inheritAttrs: !1,
|
|
@@ -715,54 +720,54 @@ var AnimatedContainer_default = /* @__PURE__ */ defineComponent({
|
|
|
715
720
|
duration: { default: 300 },
|
|
716
721
|
curve: { default: "linear" }
|
|
717
722
|
},
|
|
718
|
-
setup(
|
|
719
|
-
let
|
|
720
|
-
...
|
|
721
|
-
...
|
|
722
|
-
}),
|
|
723
|
-
let
|
|
724
|
-
...sizeToStyle(
|
|
725
|
-
...paddingToStyle(
|
|
726
|
-
...marginToStyle(
|
|
727
|
-
...boxDecorationToStyle(
|
|
728
|
-
...alignmentToStyle(
|
|
729
|
-
...boxConstraintsToStyle(
|
|
730
|
-
...
|
|
731
|
-
transition:
|
|
723
|
+
setup(e) {
|
|
724
|
+
let S = useStyles(), C = useSafeAttrs(), w = useGestureEvents(), E = computed(() => S.value.pointerEvents == "none" ? C.value : {
|
|
725
|
+
...C.value,
|
|
726
|
+
...w || {}
|
|
727
|
+
}), k = useGestureStyle(), A = e, j = computed(() => `all ${A.duration}ms ${A.curve}`), M = computed(() => {
|
|
728
|
+
let e = {
|
|
729
|
+
...sizeToStyle(A),
|
|
730
|
+
...paddingToStyle(A.padding),
|
|
731
|
+
...marginToStyle(A.margin),
|
|
732
|
+
...boxDecorationToStyle(A.decoration),
|
|
733
|
+
...alignmentToStyle(A.alignment, "column"),
|
|
734
|
+
...boxConstraintsToStyle(A.constraints),
|
|
735
|
+
...k,
|
|
736
|
+
transition: j.value
|
|
732
737
|
};
|
|
733
|
-
if (
|
|
738
|
+
if (A.color && !A.decoration && (e.backgroundColor = A.color), A.transform && (e.transform = A.transform, A.transformAlignment && (e.transformOrigin = alignmentToOrigin(A.transformAlignment))), A.clipBehavior !== "none") switch (A.clipBehavior) {
|
|
734
739
|
case "hardEdge":
|
|
735
|
-
|
|
740
|
+
e.overflow = "hidden";
|
|
736
741
|
break;
|
|
737
742
|
case "antiAlias":
|
|
738
|
-
|
|
743
|
+
e.overflow = "hidden";
|
|
739
744
|
break;
|
|
740
745
|
default: break;
|
|
741
746
|
}
|
|
742
747
|
return {
|
|
743
|
-
...
|
|
748
|
+
...e,
|
|
744
749
|
display: "flex",
|
|
745
750
|
flexDirection: "column",
|
|
746
751
|
flexShrink: 0,
|
|
747
752
|
boxSizing: "border-box",
|
|
748
753
|
position: "relative"
|
|
749
754
|
};
|
|
750
|
-
}),
|
|
751
|
-
...boxDecorationToStyle(
|
|
755
|
+
}), N = computed(() => ({
|
|
756
|
+
...boxDecorationToStyle(A.foregroundDecoration),
|
|
752
757
|
position: "absolute",
|
|
753
758
|
top: 0,
|
|
754
759
|
left: 0,
|
|
755
760
|
right: 0,
|
|
756
761
|
bottom: 0,
|
|
757
762
|
pointerEvents: "none",
|
|
758
|
-
transition:
|
|
763
|
+
transition: j.value
|
|
759
764
|
}));
|
|
760
|
-
return (
|
|
765
|
+
return (e, S) => (openBlock(), createElementBlock("div", mergeProps({
|
|
761
766
|
class: "animated-container",
|
|
762
|
-
style:
|
|
763
|
-
},
|
|
767
|
+
style: M.value
|
|
768
|
+
}, E.value), [renderSlot(e.$slots, "default"), A.foregroundDecoration ? (openBlock(), createElementBlock("div", {
|
|
764
769
|
key: 0,
|
|
765
|
-
style: normalizeStyle(
|
|
770
|
+
style: normalizeStyle(N.value)
|
|
766
771
|
}, null, 4)) : createCommentVNode("", !0)], 16));
|
|
767
772
|
}
|
|
768
773
|
}), AnimatedOpacity_default = defineComponent({
|
|
@@ -782,27 +787,109 @@ var AnimatedContainer_default = /* @__PURE__ */ defineComponent({
|
|
|
782
787
|
default: "linear"
|
|
783
788
|
}
|
|
784
789
|
},
|
|
785
|
-
setup(
|
|
786
|
-
let
|
|
787
|
-
transition: `opacity ${
|
|
788
|
-
opacity:
|
|
790
|
+
setup(e, { slots: S }) {
|
|
791
|
+
let C = computed(() => e.opacity === void 0 ? {} : {
|
|
792
|
+
transition: `opacity ${e.duration}ms ${e.curve}`,
|
|
793
|
+
opacity: e.opacity
|
|
789
794
|
});
|
|
790
|
-
return () => h(StyleProvider, { style:
|
|
795
|
+
return () => h(StyleProvider, { style: C.value }, S);
|
|
791
796
|
}
|
|
792
|
-
})
|
|
797
|
+
});
|
|
798
|
+
const ButtonStyle = (e) => e;
|
|
799
|
+
function buttonStyleToStyle(e) {
|
|
800
|
+
if (!e) return {};
|
|
801
|
+
let S = {};
|
|
802
|
+
if (e.backgroundColor && (S.backgroundColor = e.backgroundColor), e.foregroundColor && (S.color = e.foregroundColor), e.padding && Object.assign(S, paddingToStyle(e.padding)), e.minimumSize) {
|
|
803
|
+
let { width: C, height: w } = sizeToStyle(e.minimumSize) || {};
|
|
804
|
+
C && (S.minWidth = C), w && (S.minHeight = w);
|
|
805
|
+
}
|
|
806
|
+
if (e.maximumSize) {
|
|
807
|
+
let { width: C, height: w } = sizeToStyle(e.maximumSize) || {};
|
|
808
|
+
C && (S.maxWidth = C), w && (S.maxHeight = w);
|
|
809
|
+
}
|
|
810
|
+
if (e.fixedSize) {
|
|
811
|
+
let { width: C, height: w } = sizeToStyle(e.fixedSize) || {};
|
|
812
|
+
C && (S.width = C, S.minWidth = C, S.maxWidth = C), w && (S.height = w, S.minHeight = w, S.maxHeight = w);
|
|
813
|
+
}
|
|
814
|
+
return e.side && Object.assign(S, borderSideToStyle(e.side)), e.shape && Object.assign(S, borderRadiusToStyle(e.shape)), e.elevation && (S.boxShadow = `0px ${px2vw(e.elevation)} ${px2vw(e.elevation * 2)} ${e.shadowColor || "rgba(0,0,0,0.2)"}`), e.alignment && (S.display = "flex", S.flexDirection = "column", Object.assign(S, alignmentToFlex(e.alignment, "column"))), S;
|
|
815
|
+
}
|
|
816
|
+
function useChildren(w) {
|
|
817
|
+
if (!w) return [];
|
|
818
|
+
let T = w();
|
|
819
|
+
return T ? T.filter((w) => !(w.type === Comment || w.type === Text && typeof w.children == "string" && !w.children.trim() || w.type === Fragment && Array.isArray(w.children) && w.children.length === 0)) : [];
|
|
820
|
+
}
|
|
821
|
+
function useChild(e) {
|
|
822
|
+
let S = useChildren(e);
|
|
823
|
+
return S.length === 0 ? null : S[0];
|
|
824
|
+
}
|
|
825
|
+
var GestureDetector_default = defineComponent({
|
|
826
|
+
name: "GestureDetector",
|
|
827
|
+
inheritAttrs: !1,
|
|
828
|
+
props: { behavior: {
|
|
829
|
+
type: String,
|
|
830
|
+
default: "deferToChild"
|
|
831
|
+
} },
|
|
832
|
+
emits: events,
|
|
833
|
+
setup(e, { slots: S, emit: T }) {
|
|
834
|
+
let E = useGestures({ emit: T });
|
|
835
|
+
return provideGesture(E, e.behavior), () => {
|
|
836
|
+
let e = useChild(S.default);
|
|
837
|
+
return e ? e.type === Text ? h("span", E, [e]) : isHtmlTag(e) ? cloneVNode(e, E) : e : null;
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
}), _hoisted_1$3 = ["disabled"], Button_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
841
|
+
inheritAttrs: !1,
|
|
842
|
+
__name: "Button",
|
|
843
|
+
props: {
|
|
844
|
+
disabled: {
|
|
845
|
+
type: Boolean,
|
|
846
|
+
default: !1
|
|
847
|
+
},
|
|
848
|
+
style: {}
|
|
849
|
+
},
|
|
850
|
+
emits: ["pressed", "long-press"],
|
|
851
|
+
setup(e, { emit: S }) {
|
|
852
|
+
let C = e, w = S, D = useStyles(), O = useSafeAttrs(), A = useGestureEvents(), j = computed(() => D.value.pointerEvents == "none" ? O.value : {
|
|
853
|
+
...O.value,
|
|
854
|
+
...A || {}
|
|
855
|
+
}), M = useGestureStyle(), N = computed(() => {
|
|
856
|
+
let e = { position: "relative" };
|
|
857
|
+
return Object.assign(e, D.value), Object.assign(e, buttonStyleToStyle(C.style)), Object.assign(e, M), e;
|
|
858
|
+
}), P = () => {
|
|
859
|
+
C.disabled || w("pressed");
|
|
860
|
+
}, I = () => {
|
|
861
|
+
C.disabled || w("long-press");
|
|
862
|
+
};
|
|
863
|
+
return (S, C) => (openBlock(), createBlock(GestureDetector_default, {
|
|
864
|
+
onTap: P,
|
|
865
|
+
onLongPress: I
|
|
866
|
+
}, {
|
|
867
|
+
default: withCtx(() => [createElementVNode("button", mergeProps({
|
|
868
|
+
class: "fluekit-button",
|
|
869
|
+
style: N.value,
|
|
870
|
+
disabled: e.disabled
|
|
871
|
+
}, j.value), [renderSlot(S.$slots, "default", {}, void 0, !0)], 16, _hoisted_1$3)]),
|
|
872
|
+
_: 3
|
|
873
|
+
}));
|
|
874
|
+
}
|
|
875
|
+
}), __plugin_vue_export_helper_default = (e, S) => {
|
|
876
|
+
let C = e.__vccOpts || e;
|
|
877
|
+
for (let [e, w] of S) C[e] = w;
|
|
878
|
+
return C;
|
|
879
|
+
}, Button_default = /* @__PURE__ */ __plugin_vue_export_helper_default(Button_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-a5efef4c"]]), Center_default = /* @__PURE__ */ defineComponent({
|
|
793
880
|
inheritAttrs: !1,
|
|
794
881
|
__name: "Center",
|
|
795
882
|
props: {
|
|
796
883
|
widthFactor: {},
|
|
797
884
|
heightFactor: {}
|
|
798
885
|
},
|
|
799
|
-
setup(
|
|
800
|
-
return (
|
|
886
|
+
setup(e) {
|
|
887
|
+
return (S, C) => (openBlock(), createBlock(Align_default, {
|
|
801
888
|
alignment: "center",
|
|
802
|
-
"width-factor":
|
|
803
|
-
"height-factor":
|
|
889
|
+
"width-factor": e.widthFactor,
|
|
890
|
+
"height-factor": e.heightFactor
|
|
804
891
|
}, {
|
|
805
|
-
default: withCtx(() => [renderSlot(
|
|
892
|
+
default: withCtx(() => [renderSlot(S.$slots, "default")]),
|
|
806
893
|
_: 3
|
|
807
894
|
}, 8, ["width-factor", "height-factor"]));
|
|
808
895
|
}
|
|
@@ -826,23 +913,23 @@ var AnimatedContainer_default = /* @__PURE__ */ defineComponent({
|
|
|
826
913
|
as: { default: "div" },
|
|
827
914
|
constraints: {}
|
|
828
915
|
},
|
|
829
|
-
setup(
|
|
830
|
-
let
|
|
831
|
-
let
|
|
832
|
-
return
|
|
833
|
-
}),
|
|
834
|
-
let
|
|
916
|
+
setup(e) {
|
|
917
|
+
let S = e, C = useSafeAttrs(), w = computed(() => {
|
|
918
|
+
let e = ["flex-box", `flex-box-${S.direction}`];
|
|
919
|
+
return S.expanded && e.push("flex-expanded"), e.join(" ");
|
|
920
|
+
}), D = computed(() => {
|
|
921
|
+
let e = S.mainAxisAlignment, C = S.crossAxisAlignment, w = {
|
|
835
922
|
display: "flex",
|
|
836
|
-
flexDirection:
|
|
837
|
-
flexWrap:
|
|
923
|
+
flexDirection: S.direction,
|
|
924
|
+
flexWrap: S.wrap ? "wrap" : "nowrap"
|
|
838
925
|
};
|
|
839
|
-
return
|
|
926
|
+
return w.justifyContent = FlexBoxJustifyMap[e] || e, w.alignItems = FlexBoxAlignMap[C] || C, w.gap = px2vw(S.gap), S.expanded && (w.flex = "1", w.width = "100%", w.height = "100%"), S.constraints && Object.assign(w, boxConstraintsToStyle(S.constraints)), w;
|
|
840
927
|
});
|
|
841
|
-
return (
|
|
842
|
-
class:
|
|
843
|
-
style:
|
|
844
|
-
}, unref(
|
|
845
|
-
default: withCtx(() => [renderSlot(
|
|
928
|
+
return (S, T) => (openBlock(), createBlock(resolveDynamicComponent(e.as), mergeProps({
|
|
929
|
+
class: w.value,
|
|
930
|
+
style: D.value
|
|
931
|
+
}, unref(C)), {
|
|
932
|
+
default: withCtx(() => [renderSlot(S.$slots, "default")]),
|
|
846
933
|
_: 3
|
|
847
934
|
}, 16, ["class", "style"]));
|
|
848
935
|
}
|
|
@@ -859,16 +946,16 @@ var AnimatedContainer_default = /* @__PURE__ */ defineComponent({
|
|
|
859
946
|
as: {},
|
|
860
947
|
constraints: {}
|
|
861
948
|
},
|
|
862
|
-
setup(
|
|
863
|
-
return (
|
|
949
|
+
setup(e) {
|
|
950
|
+
return (S, C) => (openBlock(), createBlock(FlexBox_default, {
|
|
864
951
|
direction: "column",
|
|
865
|
-
"main-axis-alignment":
|
|
866
|
-
"cross-axis-alignment":
|
|
867
|
-
wrap:
|
|
868
|
-
gap:
|
|
869
|
-
expanded:
|
|
952
|
+
"main-axis-alignment": e.mainAxisAlignment,
|
|
953
|
+
"cross-axis-alignment": e.crossAxisAlignment,
|
|
954
|
+
wrap: e.wrap,
|
|
955
|
+
gap: e.gap,
|
|
956
|
+
expanded: e.expanded
|
|
870
957
|
}, {
|
|
871
|
-
default: withCtx(() => [renderSlot(
|
|
958
|
+
default: withCtx(() => [renderSlot(S.$slots, "default")]),
|
|
872
959
|
_: 3
|
|
873
960
|
}, 8, [
|
|
874
961
|
"main-axis-alignment",
|
|
@@ -895,39 +982,39 @@ var AnimatedContainer_default = /* @__PURE__ */ defineComponent({
|
|
|
895
982
|
transformAlignment: {},
|
|
896
983
|
constraints: {}
|
|
897
984
|
},
|
|
898
|
-
setup(
|
|
899
|
-
let
|
|
900
|
-
...
|
|
901
|
-
...
|
|
902
|
-
}),
|
|
903
|
-
let
|
|
904
|
-
backgroundColor:
|
|
905
|
-
transform:
|
|
906
|
-
transformOrigin:
|
|
907
|
-
overflow:
|
|
985
|
+
setup(e) {
|
|
986
|
+
let S = useStyles(), C = useSafeAttrs(), w = useGestureEvents(), E = computed(() => S.value.pointerEvents == "none" ? C.value : {
|
|
987
|
+
...C.value,
|
|
988
|
+
...w || {}
|
|
989
|
+
}), k = useGestureStyle(), A = e, j = computed(() => {
|
|
990
|
+
let e = {
|
|
991
|
+
backgroundColor: A.decoration ? void 0 : A.color,
|
|
992
|
+
transform: A.transform,
|
|
993
|
+
transformOrigin: A.transformAlignment ? alignmentToOrigin(A.transformAlignment) : "center",
|
|
994
|
+
overflow: A.clipBehavior === "none" ? void 0 : "hidden",
|
|
908
995
|
position: "relative"
|
|
909
996
|
};
|
|
910
|
-
Object.assign(
|
|
997
|
+
Object.assign(e, S.value), A.alignment && (Object.assign(e, {
|
|
911
998
|
display: "flex",
|
|
912
999
|
flexDirection: "column"
|
|
913
|
-
}), Object.assign(
|
|
914
|
-
let
|
|
915
|
-
return isDefined(
|
|
916
|
-
}),
|
|
917
|
-
let
|
|
1000
|
+
}), Object.assign(e, alignmentToFlex(A.alignment, "column"))), Object.assign(e, sizeToStyle(A));
|
|
1001
|
+
let C = boxConstraintsToStyle(A.constraints);
|
|
1002
|
+
return isDefined(A.width) && (delete C.minWidth, delete C.maxWidth), isDefined(A.height) && (delete C.minHeight, delete C.maxHeight), Object.assign(e, C), Object.assign(e, paddingToStyle(A.padding)), Object.assign(e, marginToStyle(A.margin)), Object.assign(e, boxDecorationToStyle(A.decoration)), Object.assign(e, k), A.clipBehavior === "antiAlias" && (e.borderRadius = e.borderRadius || "inherit"), e;
|
|
1003
|
+
}), M = computed(() => {
|
|
1004
|
+
let e = {
|
|
918
1005
|
position: "absolute",
|
|
919
1006
|
pointerEvents: "none",
|
|
920
1007
|
zIndex: 1,
|
|
921
1008
|
inset: 0
|
|
922
1009
|
};
|
|
923
|
-
return Object.assign(
|
|
1010
|
+
return Object.assign(e, boxDecorationToStyle(A.foregroundDecoration)), e;
|
|
924
1011
|
});
|
|
925
|
-
return (
|
|
1012
|
+
return (e, S) => (openBlock(), createElementBlock("div", mergeProps({
|
|
926
1013
|
class: "container-box",
|
|
927
|
-
style:
|
|
928
|
-
},
|
|
1014
|
+
style: j.value
|
|
1015
|
+
}, E.value), [renderSlot(e.$slots, "default"), A.foregroundDecoration ? (openBlock(), createElementBlock("div", {
|
|
929
1016
|
key: 0,
|
|
930
|
-
style: normalizeStyle(
|
|
1017
|
+
style: normalizeStyle(M.value)
|
|
931
1018
|
}, null, 4)) : createCommentVNode("", !0)], 16));
|
|
932
1019
|
}
|
|
933
1020
|
}), FlexItem_default = /* @__PURE__ */ defineComponent({
|
|
@@ -947,23 +1034,23 @@ var AnimatedContainer_default = /* @__PURE__ */ defineComponent({
|
|
|
947
1034
|
minSize: {},
|
|
948
1035
|
maxSize: {}
|
|
949
1036
|
},
|
|
950
|
-
setup(
|
|
951
|
-
let
|
|
952
|
-
let
|
|
953
|
-
if (
|
|
954
|
-
let
|
|
955
|
-
|
|
1037
|
+
setup(e) {
|
|
1038
|
+
let S = e, C = useSafeAttrs(), w = computed(() => {
|
|
1039
|
+
let e = {};
|
|
1040
|
+
if (S.expanded ? e.flex = "1 1 0%" : (S.flexible && (e.flex = "0 1 auto"), S.flex > 0 && (e.flex = `${S.flex} 1 0%`)), S.alignSelf !== "auto" && (e.alignSelf = FlexBoxAlignMap[S.alignSelf] || S.alignSelf), S.minSize) {
|
|
1041
|
+
let C = px2vw(S.minSize);
|
|
1042
|
+
e.minWidth = C, e.minHeight = C;
|
|
956
1043
|
}
|
|
957
|
-
if (
|
|
958
|
-
let
|
|
959
|
-
|
|
1044
|
+
if (S.maxSize) {
|
|
1045
|
+
let C = px2vw(S.maxSize);
|
|
1046
|
+
e.maxWidth = C, e.maxHeight = C;
|
|
960
1047
|
}
|
|
961
|
-
return
|
|
1048
|
+
return e;
|
|
962
1049
|
});
|
|
963
|
-
return (
|
|
1050
|
+
return (e, S) => (openBlock(), createElementBlock("div", mergeProps({
|
|
964
1051
|
class: "flex-item",
|
|
965
|
-
style:
|
|
966
|
-
}, unref(
|
|
1052
|
+
style: w.value
|
|
1053
|
+
}, unref(C)), [renderSlot(e.$slots, "default")], 16));
|
|
967
1054
|
}
|
|
968
1055
|
}), Expanded_default = /* @__PURE__ */ defineComponent({
|
|
969
1056
|
inheritAttrs: !1,
|
|
@@ -974,15 +1061,15 @@ var AnimatedContainer_default = /* @__PURE__ */ defineComponent({
|
|
|
974
1061
|
minSize: {},
|
|
975
1062
|
maxSize: {}
|
|
976
1063
|
},
|
|
977
|
-
setup(
|
|
978
|
-
return (
|
|
979
|
-
flex:
|
|
1064
|
+
setup(e) {
|
|
1065
|
+
return (S, C) => (openBlock(), createBlock(FlexItem_default, {
|
|
1066
|
+
flex: e.flex,
|
|
980
1067
|
expanded: "",
|
|
981
|
-
"align-self":
|
|
982
|
-
"min-size":
|
|
983
|
-
"max-size":
|
|
1068
|
+
"align-self": e.alignSelf,
|
|
1069
|
+
"min-size": e.minSize,
|
|
1070
|
+
"max-size": e.maxSize
|
|
984
1071
|
}, {
|
|
985
|
-
default: withCtx(() => [renderSlot(
|
|
1072
|
+
default: withCtx(() => [renderSlot(S.$slots, "default")]),
|
|
986
1073
|
_: 3
|
|
987
1074
|
}, 8, [
|
|
988
1075
|
"flex",
|
|
@@ -992,16 +1079,16 @@ var AnimatedContainer_default = /* @__PURE__ */ defineComponent({
|
|
|
992
1079
|
]));
|
|
993
1080
|
}
|
|
994
1081
|
});
|
|
995
|
-
function usePositionStyle(
|
|
1082
|
+
function usePositionStyle(e, S = "absolute") {
|
|
996
1083
|
return computed(() => {
|
|
997
|
-
let
|
|
998
|
-
position:
|
|
1084
|
+
let C = {
|
|
1085
|
+
position: S,
|
|
999
1086
|
boxSizing: "border-box"
|
|
1000
1087
|
};
|
|
1001
|
-
return
|
|
1088
|
+
return C.top = px2vw(e.top), C.bottom = px2vw(e.bottom), C.left = px2vw(e.left), C.right = px2vw(e.right), C.width = px2vw(e.width), C.height = px2vw(e.height), C.zIndex = e.zIndex, C;
|
|
1002
1089
|
});
|
|
1003
1090
|
}
|
|
1004
|
-
var
|
|
1091
|
+
var Fixed_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
1005
1092
|
inheritAttrs: !1,
|
|
1006
1093
|
__name: "Fixed",
|
|
1007
1094
|
props: {
|
|
@@ -1013,43 +1100,14 @@ var Fixed_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
1013
1100
|
height: {},
|
|
1014
1101
|
zIndex: { default: 100 }
|
|
1015
1102
|
},
|
|
1016
|
-
setup(
|
|
1017
|
-
let
|
|
1018
|
-
return (
|
|
1103
|
+
setup(e) {
|
|
1104
|
+
let S = usePositionStyle(e, "fixed");
|
|
1105
|
+
return (e, C) => (openBlock(), createElementBlock("div", {
|
|
1019
1106
|
class: "flutter-fixed",
|
|
1020
|
-
style: normalizeStyle(unref(
|
|
1021
|
-
}, [renderSlot(
|
|
1022
|
-
}
|
|
1023
|
-
}), __plugin_vue_export_helper_default = (o, F) => {
|
|
1024
|
-
let I = o.__vccOpts || o;
|
|
1025
|
-
for (let [o, L] of F) I[o] = L;
|
|
1026
|
-
return I;
|
|
1027
|
-
}, Fixed_default = /* @__PURE__ */ __plugin_vue_export_helper_default(Fixed_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-b47757ec"]]);
|
|
1028
|
-
function useChildren(L) {
|
|
1029
|
-
if (!L) return [];
|
|
1030
|
-
let R = L();
|
|
1031
|
-
return R ? R.filter((L) => !(L.type === Comment || L.type === Text && typeof L.children == "string" && !L.children.trim() || L.type === Fragment && Array.isArray(L.children) && L.children.length === 0)) : [];
|
|
1032
|
-
}
|
|
1033
|
-
function useChild(o) {
|
|
1034
|
-
let F = useChildren(o);
|
|
1035
|
-
return F.length === 0 ? null : F[0];
|
|
1036
|
-
}
|
|
1037
|
-
var GestureDetector_default = defineComponent({
|
|
1038
|
-
name: "GestureDetector",
|
|
1039
|
-
inheritAttrs: !1,
|
|
1040
|
-
props: { behavior: {
|
|
1041
|
-
type: String,
|
|
1042
|
-
default: "deferToChild"
|
|
1043
|
-
} },
|
|
1044
|
-
emits: events,
|
|
1045
|
-
setup(o, { slots: F, emit: R }) {
|
|
1046
|
-
let z = useGestures({ emit: R });
|
|
1047
|
-
return provideGesture(z, o.behavior), () => {
|
|
1048
|
-
let o = useChild(F.default);
|
|
1049
|
-
return o ? o.type === Text ? h("span", z, [o]) : isHtmlTag(o) ? cloneVNode(o, z) : o : null;
|
|
1050
|
-
};
|
|
1107
|
+
style: normalizeStyle(unref(S))
|
|
1108
|
+
}, [renderSlot(e.$slots, "default", {}, void 0, !0)], 4));
|
|
1051
1109
|
}
|
|
1052
|
-
}), ScrollView_default = /* @__PURE__ */ defineComponent({
|
|
1110
|
+
}), [["__scopeId", "data-v-b47757ec"]]), ScrollView_default = /* @__PURE__ */ defineComponent({
|
|
1053
1111
|
inheritAttrs: !1,
|
|
1054
1112
|
__name: "ScrollView",
|
|
1055
1113
|
props: {
|
|
@@ -1067,9 +1125,9 @@ var GestureDetector_default = defineComponent({
|
|
|
1067
1125
|
"scrollStart",
|
|
1068
1126
|
"scrollEnd"
|
|
1069
1127
|
],
|
|
1070
|
-
setup(
|
|
1071
|
-
let
|
|
1072
|
-
let
|
|
1128
|
+
setup(e, { expose: S, emit: C }) {
|
|
1129
|
+
let w = e, E = C, D = ref(), A = !1, j = null, M = computed(() => {
|
|
1130
|
+
let e = {
|
|
1073
1131
|
width: "100%",
|
|
1074
1132
|
height: "100%",
|
|
1075
1133
|
position: "relative",
|
|
@@ -1077,39 +1135,39 @@ var GestureDetector_default = defineComponent({
|
|
|
1077
1135
|
scrollbarWidth: "none",
|
|
1078
1136
|
WebkitOverflowScrolling: "touch"
|
|
1079
1137
|
};
|
|
1080
|
-
return
|
|
1081
|
-
}),
|
|
1082
|
-
let
|
|
1083
|
-
minWidth:
|
|
1084
|
-
minHeight:
|
|
1138
|
+
return w.physics === "never" ? e.overflow = "hidden" : (w.scrollDirection === "vertical" ? (e.overflowX = "hidden", e.overflowY = "auto") : (e.overflowX = "auto", e.overflowY = "hidden"), w.physics === "clamping" ? e.overscrollBehavior = "none" : w.physics === "bouncing" && (e.overscrollBehavior = "auto")), w.clipBehavior === "none" && w.physics === "never" && (e.overflow = "visible"), e;
|
|
1139
|
+
}), N = computed(() => {
|
|
1140
|
+
let e = {
|
|
1141
|
+
minWidth: w.scrollDirection === "horizontal" ? "max-content" : "100%",
|
|
1142
|
+
minHeight: w.scrollDirection === "vertical" ? "fit-content" : "100%",
|
|
1085
1143
|
boxSizing: "border-box",
|
|
1086
1144
|
display: "flow-root"
|
|
1087
1145
|
};
|
|
1088
|
-
return
|
|
1089
|
-
}),
|
|
1090
|
-
let
|
|
1091
|
-
|
|
1092
|
-
scrollTop:
|
|
1093
|
-
scrollLeft:
|
|
1094
|
-
scrollHeight:
|
|
1095
|
-
scrollWidth:
|
|
1096
|
-
}),
|
|
1097
|
-
|
|
1146
|
+
return w.padding && Object.assign(e, paddingToStyle(w.padding)), e;
|
|
1147
|
+
}), P = (e) => {
|
|
1148
|
+
let S = e.target;
|
|
1149
|
+
A || (A = !0, E("scrollStart")), E("scroll", {
|
|
1150
|
+
scrollTop: S.scrollTop,
|
|
1151
|
+
scrollLeft: S.scrollLeft,
|
|
1152
|
+
scrollHeight: S.scrollHeight,
|
|
1153
|
+
scrollWidth: S.scrollWidth
|
|
1154
|
+
}), j && clearTimeout(j), j = window.setTimeout(() => {
|
|
1155
|
+
A = !1, E("scrollEnd");
|
|
1098
1156
|
}, 150);
|
|
1099
1157
|
};
|
|
1100
|
-
return
|
|
1101
|
-
scrollRef:
|
|
1102
|
-
scrollTo: (
|
|
1103
|
-
|
|
1158
|
+
return S({
|
|
1159
|
+
scrollRef: D,
|
|
1160
|
+
scrollTo: (e) => {
|
|
1161
|
+
D.value?.scrollTo(e);
|
|
1104
1162
|
}
|
|
1105
1163
|
}), onUnmounted(() => {
|
|
1106
|
-
|
|
1107
|
-
}), (
|
|
1164
|
+
j && clearTimeout(j);
|
|
1165
|
+
}), (e, S) => (openBlock(), createElementBlock("div", {
|
|
1108
1166
|
ref_key: "scrollRef",
|
|
1109
|
-
ref:
|
|
1110
|
-
style: normalizeStyle(
|
|
1111
|
-
onScroll:
|
|
1112
|
-
}, [createElementVNode("div", { style: normalizeStyle(
|
|
1167
|
+
ref: D,
|
|
1168
|
+
style: normalizeStyle(M.value),
|
|
1169
|
+
onScroll: P
|
|
1170
|
+
}, [createElementVNode("div", { style: normalizeStyle(N.value) }, [renderSlot(e.$slots, "default")], 4)], 36));
|
|
1113
1171
|
}
|
|
1114
1172
|
}), GridView_default = /* @__PURE__ */ defineComponent({
|
|
1115
1173
|
inheritAttrs: !1,
|
|
@@ -1129,37 +1187,37 @@ var GestureDetector_default = defineComponent({
|
|
|
1129
1187
|
childAspectRatio: { default: 1 },
|
|
1130
1188
|
itemCount: {}
|
|
1131
1189
|
},
|
|
1132
|
-
setup(
|
|
1133
|
-
let
|
|
1134
|
-
height:
|
|
1135
|
-
width:
|
|
1136
|
-
})),
|
|
1137
|
-
let
|
|
1190
|
+
setup(e) {
|
|
1191
|
+
let C = e, w = computed(() => ({
|
|
1192
|
+
height: C.shrinkWrap ? "auto" : "100%",
|
|
1193
|
+
width: C.shrinkWrap ? "auto" : "100%"
|
|
1194
|
+
})), D = computed(() => {
|
|
1195
|
+
let e = C.scrollDirection === "vertical", S = typeof C.mainAxisSpacing == "number" ? px2vw(C.mainAxisSpacing) : C.mainAxisSpacing, w = typeof C.crossAxisSpacing == "number" ? px2vw(C.crossAxisSpacing) : C.crossAxisSpacing;
|
|
1138
1196
|
return {
|
|
1139
1197
|
display: "grid",
|
|
1140
|
-
gridTemplateColumns:
|
|
1141
|
-
gridTemplateRows:
|
|
1142
|
-
gridAutoFlow:
|
|
1143
|
-
gap:
|
|
1144
|
-
minWidth:
|
|
1145
|
-
minHeight:
|
|
1198
|
+
gridTemplateColumns: e ? `repeat(${C.crossAxisCount}, 1fr)` : "none",
|
|
1199
|
+
gridTemplateRows: e ? "none" : `repeat(${C.crossAxisCount}, 1fr)`,
|
|
1200
|
+
gridAutoFlow: e ? "row" : "column",
|
|
1201
|
+
gap: e ? `${S} ${w}` : `${w} ${S}`,
|
|
1202
|
+
minWidth: e ? "100%" : "max-content",
|
|
1203
|
+
minHeight: e ? "max-content" : "100%"
|
|
1146
1204
|
};
|
|
1147
1205
|
});
|
|
1148
|
-
return (
|
|
1149
|
-
"scroll-direction":
|
|
1150
|
-
padding:
|
|
1151
|
-
physics:
|
|
1152
|
-
"clip-behavior":
|
|
1206
|
+
return (C, T) => (openBlock(), createBlock(ScrollView_default, {
|
|
1207
|
+
"scroll-direction": e.scrollDirection,
|
|
1208
|
+
padding: e.padding,
|
|
1209
|
+
physics: e.physics,
|
|
1210
|
+
"clip-behavior": e.clipBehavior,
|
|
1153
1211
|
class: "flutter-grid-view",
|
|
1154
|
-
style: normalizeStyle(
|
|
1212
|
+
style: normalizeStyle(w.value)
|
|
1155
1213
|
}, {
|
|
1156
1214
|
default: withCtx(() => [createElementVNode("div", {
|
|
1157
1215
|
class: "grid-view-content",
|
|
1158
|
-
style: normalizeStyle(
|
|
1159
|
-
}, [
|
|
1160
|
-
key:
|
|
1161
|
-
index:
|
|
1162
|
-
})), 128)) : renderSlot(
|
|
1216
|
+
style: normalizeStyle(D.value)
|
|
1217
|
+
}, [e.itemCount ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(e.itemCount, (e) => renderSlot(C.$slots, "item", {
|
|
1218
|
+
key: e - 1,
|
|
1219
|
+
index: e - 1
|
|
1220
|
+
})), 128)) : renderSlot(C.$slots, "default", { key: 0 })], 4)]),
|
|
1163
1221
|
_: 3
|
|
1164
1222
|
}, 8, [
|
|
1165
1223
|
"scroll-direction",
|
|
@@ -1182,13 +1240,107 @@ var GestureDetector_default = defineComponent({
|
|
|
1182
1240
|
default: !1
|
|
1183
1241
|
}
|
|
1184
1242
|
},
|
|
1185
|
-
setup(
|
|
1186
|
-
return () => !
|
|
1187
|
-
style: { pointerEvents:
|
|
1188
|
-
attrs: { "aria-hidden":
|
|
1189
|
-
},
|
|
1243
|
+
setup(e, { slots: S }) {
|
|
1244
|
+
return () => !e.ignoring && !e.ignoringSemantics ? S.default?.() : h(StyleProvider, {
|
|
1245
|
+
style: { pointerEvents: e.ignoring ? "none" : void 0 },
|
|
1246
|
+
attrs: { "aria-hidden": e.ignoringSemantics ? "true" : void 0 }
|
|
1247
|
+
}, S);
|
|
1248
|
+
}
|
|
1249
|
+
}), IMAGE_PROVIDER_SYMBOL = Symbol("ImageProvider");
|
|
1250
|
+
function isImageProvider(e) {
|
|
1251
|
+
return e && e[IMAGE_PROVIDER_SYMBOL] === !0;
|
|
1252
|
+
}
|
|
1253
|
+
function NetworkImage(e) {
|
|
1254
|
+
return {
|
|
1255
|
+
src: e,
|
|
1256
|
+
[IMAGE_PROVIDER_SYMBOL]: !0
|
|
1257
|
+
};
|
|
1258
|
+
}
|
|
1259
|
+
function MemoryImage(e) {
|
|
1260
|
+
let S = "";
|
|
1261
|
+
return typeof e == "string" ? S = e : e instanceof Blob ? S = URL.createObjectURL(e) : console.warn("[MemoryImage] Unsupported data type. Expected string (base64) or Blob."), {
|
|
1262
|
+
src: S,
|
|
1263
|
+
[IMAGE_PROVIDER_SYMBOL]: !0
|
|
1264
|
+
};
|
|
1265
|
+
}
|
|
1266
|
+
var _assetBaseUrl = "/";
|
|
1267
|
+
function setAssetBaseURL(e) {
|
|
1268
|
+
_assetBaseUrl = e;
|
|
1269
|
+
}
|
|
1270
|
+
function AssetImage(e, S = {}) {
|
|
1271
|
+
let C = S.package ? `${S.package}/${e}` : e;
|
|
1272
|
+
return /^(https?:|file:|blob:|data:|\/\/)/i.test(C) || _assetBaseUrl && (C = (_assetBaseUrl.endsWith("/") ? _assetBaseUrl : _assetBaseUrl + "/") + (C.startsWith("/") ? C.slice(1) : C)), {
|
|
1273
|
+
src: C,
|
|
1274
|
+
[IMAGE_PROVIDER_SYMBOL]: !0
|
|
1275
|
+
};
|
|
1276
|
+
}
|
|
1277
|
+
function createAssetImage(e) {
|
|
1278
|
+
return (S, C = {}) => AssetImage(S, {
|
|
1279
|
+
...e,
|
|
1280
|
+
...C
|
|
1281
|
+
});
|
|
1282
|
+
}
|
|
1283
|
+
var _hoisted_1$2 = ["src", "alt"], Image_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
1284
|
+
inheritAttrs: !1,
|
|
1285
|
+
__name: "Image",
|
|
1286
|
+
props: {
|
|
1287
|
+
image: {},
|
|
1288
|
+
width: {},
|
|
1289
|
+
height: {},
|
|
1290
|
+
color: {},
|
|
1291
|
+
colorBlendMode: {},
|
|
1292
|
+
fit: { default: "contain" },
|
|
1293
|
+
alignment: { default: "center" },
|
|
1294
|
+
repeat: { default: "no-repeat" },
|
|
1295
|
+
opacity: { default: 1 },
|
|
1296
|
+
filterQuality: { default: "medium" },
|
|
1297
|
+
alt: { default: "" }
|
|
1298
|
+
},
|
|
1299
|
+
emits: ["load", "error"],
|
|
1300
|
+
setup(e, { emit: S }) {
|
|
1301
|
+
let C = e, w = S, E = useSafeAttrs(), D = computed(() => {
|
|
1302
|
+
let e = {
|
|
1303
|
+
position: "relative",
|
|
1304
|
+
display: "inline-block",
|
|
1305
|
+
overflow: "hidden",
|
|
1306
|
+
lineHeight: 0
|
|
1307
|
+
};
|
|
1308
|
+
return Object.assign(e, sizeToStyle({
|
|
1309
|
+
width: C.width,
|
|
1310
|
+
height: C.height
|
|
1311
|
+
})), e;
|
|
1312
|
+
}), A = {
|
|
1313
|
+
fill: "fill",
|
|
1314
|
+
contain: "contain",
|
|
1315
|
+
cover: "cover",
|
|
1316
|
+
fitWidth: "contain",
|
|
1317
|
+
fitHeight: "contain",
|
|
1318
|
+
none: "none",
|
|
1319
|
+
scaleDown: "scale-down"
|
|
1320
|
+
}, j = computed(() => alignmentToOrigin(C.alignment)), M = computed(() => {
|
|
1321
|
+
let e = {
|
|
1322
|
+
width: "100%",
|
|
1323
|
+
height: "100%",
|
|
1324
|
+
objectFit: A[C.fit],
|
|
1325
|
+
objectPosition: j.value,
|
|
1326
|
+
opacity: C.opacity,
|
|
1327
|
+
imageRendering: C.filterQuality === "low" ? "pixelated" : "auto"
|
|
1328
|
+
};
|
|
1329
|
+
return C.color, e;
|
|
1330
|
+
}), N = (e) => w("load", e), P = (e) => w("error", e);
|
|
1331
|
+
return (S, w) => (openBlock(), createElementBlock("div", mergeProps({
|
|
1332
|
+
class: "fluekit-image-container",
|
|
1333
|
+
style: D.value
|
|
1334
|
+
}, unref(E)), [createElementVNode("img", {
|
|
1335
|
+
src: C.image.src,
|
|
1336
|
+
class: "fluekit-image",
|
|
1337
|
+
style: normalizeStyle(M.value),
|
|
1338
|
+
alt: e.alt,
|
|
1339
|
+
onLoad: N,
|
|
1340
|
+
onError: P
|
|
1341
|
+
}, null, 44, _hoisted_1$2)], 16));
|
|
1190
1342
|
}
|
|
1191
|
-
}), _hoisted_1 = {
|
|
1343
|
+
}), [["__scopeId", "data-v-9d37b792"]]), _hoisted_1$1 = {
|
|
1192
1344
|
key: 0,
|
|
1193
1345
|
class: "list-view-separator"
|
|
1194
1346
|
}, ListView_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -1210,31 +1362,31 @@ var GestureDetector_default = defineComponent({
|
|
|
1210
1362
|
},
|
|
1211
1363
|
clipBehavior: { default: "hardEdge" }
|
|
1212
1364
|
},
|
|
1213
|
-
setup(
|
|
1214
|
-
let
|
|
1215
|
-
height:
|
|
1216
|
-
width:
|
|
1217
|
-
})),
|
|
1218
|
-
let
|
|
1365
|
+
setup(e) {
|
|
1366
|
+
let C = e, w = computed(() => ({
|
|
1367
|
+
height: C.shrinkWrap ? "auto" : "100%",
|
|
1368
|
+
width: C.shrinkWrap ? "auto" : "100%"
|
|
1369
|
+
})), A = computed(() => {
|
|
1370
|
+
let e = C.scrollDirection === "vertical";
|
|
1219
1371
|
return {
|
|
1220
1372
|
display: "flex",
|
|
1221
|
-
flexDirection:
|
|
1373
|
+
flexDirection: e ? "column" : "row",
|
|
1222
1374
|
gap: "0px",
|
|
1223
|
-
minWidth:
|
|
1375
|
+
minWidth: e ? "100%" : "max-content"
|
|
1224
1376
|
};
|
|
1225
1377
|
});
|
|
1226
|
-
return (
|
|
1227
|
-
"scroll-direction":
|
|
1228
|
-
padding:
|
|
1229
|
-
physics:
|
|
1230
|
-
"clip-behavior":
|
|
1231
|
-
class: normalizeClass(["flutter-list-view", { "list-view-shrink-wrap":
|
|
1232
|
-
style: normalizeStyle(
|
|
1378
|
+
return (C, T) => (openBlock(), createBlock(ScrollView_default, {
|
|
1379
|
+
"scroll-direction": e.scrollDirection,
|
|
1380
|
+
padding: e.padding,
|
|
1381
|
+
physics: e.physics,
|
|
1382
|
+
"clip-behavior": e.clipBehavior,
|
|
1383
|
+
class: normalizeClass(["flutter-list-view", { "list-view-shrink-wrap": e.shrinkWrap }]),
|
|
1384
|
+
style: normalizeStyle(w.value)
|
|
1233
1385
|
}, {
|
|
1234
1386
|
default: withCtx(() => [createElementVNode("div", {
|
|
1235
1387
|
class: "list-view-content",
|
|
1236
|
-
style: normalizeStyle(
|
|
1237
|
-
}, [
|
|
1388
|
+
style: normalizeStyle(A.value)
|
|
1389
|
+
}, [e.itemCount ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(e.itemCount, (w) => (openBlock(), createElementBlock(Fragment, { key: w - 1 }, [renderSlot(C.$slots, "item", { index: w - 1 }, void 0, !0), e.separator && w < e.itemCount ? (openBlock(), createElementBlock("div", _hoisted_1$1, [renderSlot(C.$slots, "separator", { index: w - 1 }, void 0, !0)])) : createCommentVNode("", !0)], 64))), 128)) : renderSlot(C.$slots, "default", { key: 0 }, void 0, !0)], 4)]),
|
|
1238
1390
|
_: 3
|
|
1239
1391
|
}, 8, [
|
|
1240
1392
|
"scroll-direction",
|
|
@@ -1252,9 +1404,9 @@ var GestureDetector_default = defineComponent({
|
|
|
1252
1404
|
type: Number,
|
|
1253
1405
|
default: void 0
|
|
1254
1406
|
} },
|
|
1255
|
-
setup(
|
|
1256
|
-
let
|
|
1257
|
-
return () => h(StyleProvider, { style:
|
|
1407
|
+
setup(e, { slots: S }) {
|
|
1408
|
+
let C = computed(() => e.opacity === void 0 ? {} : { opacity: Math.max(0, Math.min(1, e.opacity)) });
|
|
1409
|
+
return () => h(StyleProvider, { style: C.value }, S);
|
|
1258
1410
|
}
|
|
1259
1411
|
}), Padding_default = defineComponent({
|
|
1260
1412
|
name: "Padding",
|
|
@@ -1285,10 +1437,10 @@ var GestureDetector_default = defineComponent({
|
|
|
1285
1437
|
default: void 0
|
|
1286
1438
|
}
|
|
1287
1439
|
},
|
|
1288
|
-
setup(
|
|
1440
|
+
setup(e, { slots: S }) {
|
|
1289
1441
|
return () => {
|
|
1290
|
-
let
|
|
1291
|
-
return
|
|
1442
|
+
let C = useChild(S.default);
|
|
1443
|
+
return C ? cloneVNode(C, { style: edgeInsetsToStyle("padding", e) }) : null;
|
|
1292
1444
|
};
|
|
1293
1445
|
}
|
|
1294
1446
|
}), STACK_CONTEXT_KEY = "stackContext";
|
|
@@ -1307,16 +1459,16 @@ var Positioned_default = /* @__PURE__ */ defineComponent({
|
|
|
1307
1459
|
width: {},
|
|
1308
1460
|
height: {}
|
|
1309
1461
|
},
|
|
1310
|
-
setup(
|
|
1311
|
-
let
|
|
1462
|
+
setup(e) {
|
|
1463
|
+
let S = e, C = useStackContext();
|
|
1312
1464
|
onMounted(() => {
|
|
1313
|
-
|
|
1465
|
+
C || warn("[Positioned] Positioned widget must be a descendant of a Stack. ");
|
|
1314
1466
|
});
|
|
1315
|
-
let
|
|
1316
|
-
return (
|
|
1467
|
+
let w = usePositionStyle(S, "absolute");
|
|
1468
|
+
return (e, S) => (openBlock(), createElementBlock("div", {
|
|
1317
1469
|
class: "positioned",
|
|
1318
|
-
style: normalizeStyle(unref(
|
|
1319
|
-
}, [renderSlot(
|
|
1470
|
+
style: normalizeStyle(unref(w))
|
|
1471
|
+
}, [renderSlot(e.$slots, "default")], 4));
|
|
1320
1472
|
}
|
|
1321
1473
|
}), Row_default = /* @__PURE__ */ defineComponent({
|
|
1322
1474
|
inheritAttrs: !1,
|
|
@@ -1337,17 +1489,17 @@ var Positioned_default = /* @__PURE__ */ defineComponent({
|
|
|
1337
1489
|
as: {},
|
|
1338
1490
|
constraints: {}
|
|
1339
1491
|
},
|
|
1340
|
-
setup(
|
|
1341
|
-
return (
|
|
1492
|
+
setup(e) {
|
|
1493
|
+
return (S, C) => (openBlock(), createBlock(FlexBox_default, {
|
|
1342
1494
|
direction: "row",
|
|
1343
|
-
"main-axis-alignment":
|
|
1344
|
-
"cross-axis-alignment":
|
|
1345
|
-
wrap:
|
|
1346
|
-
gap:
|
|
1347
|
-
as:
|
|
1348
|
-
expanded:
|
|
1495
|
+
"main-axis-alignment": e.mainAxisAlignment,
|
|
1496
|
+
"cross-axis-alignment": e.crossAxisAlignment,
|
|
1497
|
+
wrap: e.wrap,
|
|
1498
|
+
gap: e.gap,
|
|
1499
|
+
as: e.as,
|
|
1500
|
+
expanded: e.expanded
|
|
1349
1501
|
}, {
|
|
1350
|
-
default: withCtx(() => [renderSlot(
|
|
1502
|
+
default: withCtx(() => [renderSlot(S.$slots, "default")]),
|
|
1351
1503
|
_: 3
|
|
1352
1504
|
}, 8, [
|
|
1353
1505
|
"main-axis-alignment",
|
|
@@ -1384,20 +1536,20 @@ var Positioned_default = /* @__PURE__ */ defineComponent({
|
|
|
1384
1536
|
default: !1
|
|
1385
1537
|
}
|
|
1386
1538
|
},
|
|
1387
|
-
setup(
|
|
1388
|
-
let
|
|
1389
|
-
let
|
|
1539
|
+
setup(e) {
|
|
1540
|
+
let S = e, C = computed(() => {
|
|
1541
|
+
let e = {
|
|
1390
1542
|
display: "flex",
|
|
1391
1543
|
flexDirection: "column",
|
|
1392
1544
|
width: "100%",
|
|
1393
1545
|
height: "100%"
|
|
1394
1546
|
};
|
|
1395
|
-
return
|
|
1547
|
+
return S.top && [].push("env(safe-area-inset-top)"), S.right && [].push("env(safe-area-inset-right)"), S.bottom && [].push("env(safe-area-inset-bottom)"), S.left && [].push("env(safe-area-inset-left)"), S.top && (e.paddingTop = "env(safe-area-inset-top)"), S.right && (e.paddingRight = "env(safe-area-inset-right)"), S.bottom && (e.paddingBottom = "env(safe-area-inset-bottom)"), S.left && (e.paddingLeft = "env(safe-area-inset-left)"), S.minimum, e;
|
|
1396
1548
|
});
|
|
1397
|
-
return (
|
|
1549
|
+
return (e, S) => (openBlock(), createElementBlock("div", {
|
|
1398
1550
|
class: "flutter-safe-area",
|
|
1399
|
-
style: normalizeStyle(
|
|
1400
|
-
}, [renderSlot(
|
|
1551
|
+
style: normalizeStyle(C.value)
|
|
1552
|
+
}, [renderSlot(e.$slots, "default")], 4));
|
|
1401
1553
|
}
|
|
1402
1554
|
}), SizedBox_default = /* @__PURE__ */ defineComponent({
|
|
1403
1555
|
inheritAttrs: !1,
|
|
@@ -1406,18 +1558,18 @@ var Positioned_default = /* @__PURE__ */ defineComponent({
|
|
|
1406
1558
|
width: {},
|
|
1407
1559
|
height: {}
|
|
1408
1560
|
},
|
|
1409
|
-
setup(
|
|
1410
|
-
let
|
|
1411
|
-
let
|
|
1561
|
+
setup(e) {
|
|
1562
|
+
let S = e, C = useSafeAttrs(), w = useSlots(), E = computed(() => {
|
|
1563
|
+
let e = {
|
|
1412
1564
|
boxSizing: "border-box",
|
|
1413
1565
|
position: "relative"
|
|
1414
1566
|
};
|
|
1415
|
-
return Object.assign(
|
|
1567
|
+
return Object.assign(e, sizeToStyle(S)), w.default && (e.display = "flex", e.flexDirection = "column", e.flexShrink = 0), e;
|
|
1416
1568
|
});
|
|
1417
|
-
return (
|
|
1569
|
+
return (e, S) => (openBlock(), createElementBlock("div", mergeProps({
|
|
1418
1570
|
class: "sized-box",
|
|
1419
|
-
style:
|
|
1420
|
-
}, unref(
|
|
1571
|
+
style: E.value
|
|
1572
|
+
}, unref(C)), [renderSlot(e.$slots, "default")], 16));
|
|
1421
1573
|
}
|
|
1422
1574
|
}), Stack_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
1423
1575
|
inheritAttrs: !1,
|
|
@@ -1428,29 +1580,29 @@ var Positioned_default = /* @__PURE__ */ defineComponent({
|
|
|
1428
1580
|
textDirection: { default: "ltr" },
|
|
1429
1581
|
fit: { default: StackFit.loose }
|
|
1430
1582
|
},
|
|
1431
|
-
setup(
|
|
1432
|
-
let
|
|
1583
|
+
setup(e) {
|
|
1584
|
+
let S = e, C = {
|
|
1433
1585
|
clip: "hidden",
|
|
1434
1586
|
hardEdge: "hidden",
|
|
1435
1587
|
antiAlias: "hidden",
|
|
1436
1588
|
none: "visible"
|
|
1437
|
-
},
|
|
1438
|
-
let
|
|
1589
|
+
}, w = computed(() => {
|
|
1590
|
+
let e = {
|
|
1439
1591
|
position: "relative",
|
|
1440
1592
|
display: "grid",
|
|
1441
1593
|
gridTemplateColumns: "1fr",
|
|
1442
1594
|
gridTemplateRows: "1fr",
|
|
1443
|
-
...alignmentToGrid(
|
|
1444
|
-
overflow:
|
|
1445
|
-
direction:
|
|
1595
|
+
...alignmentToGrid(S.alignment),
|
|
1596
|
+
overflow: C[S.clipBehavior],
|
|
1597
|
+
direction: S.textDirection,
|
|
1446
1598
|
boxSizing: "border-box"
|
|
1447
1599
|
};
|
|
1448
|
-
return
|
|
1600
|
+
return S.fit === StackFit.expand && (e.width = "100%", e.height = "100%"), e;
|
|
1449
1601
|
});
|
|
1450
|
-
return provideStackContext(), (
|
|
1602
|
+
return provideStackContext(), (e, S) => (openBlock(), createElementBlock("div", {
|
|
1451
1603
|
class: "flutter-stack",
|
|
1452
|
-
style: normalizeStyle(
|
|
1453
|
-
}, [renderSlot(
|
|
1604
|
+
style: normalizeStyle(w.value)
|
|
1605
|
+
}, [renderSlot(e.$slots, "default", {}, void 0, !0)], 4));
|
|
1454
1606
|
}
|
|
1455
1607
|
}), [["__scopeId", "data-v-aefe47c2"]]), Sticky_default = /* @__PURE__ */ defineComponent({
|
|
1456
1608
|
inheritAttrs: !1,
|
|
@@ -1464,68 +1616,68 @@ var Positioned_default = /* @__PURE__ */ defineComponent({
|
|
|
1464
1616
|
height: {},
|
|
1465
1617
|
zIndex: { default: 10 }
|
|
1466
1618
|
},
|
|
1467
|
-
setup(
|
|
1468
|
-
let
|
|
1469
|
-
return (
|
|
1619
|
+
setup(e) {
|
|
1620
|
+
let S = usePositionStyle(e, "sticky");
|
|
1621
|
+
return (e, C) => (openBlock(), createElementBlock("div", {
|
|
1470
1622
|
class: "flutter-sticky",
|
|
1471
|
-
style: normalizeStyle(unref(
|
|
1472
|
-
}, [renderSlot(
|
|
1623
|
+
style: normalizeStyle(unref(S))
|
|
1624
|
+
}, [renderSlot(e.$slots, "default")], 4));
|
|
1473
1625
|
}
|
|
1474
1626
|
});
|
|
1475
|
-
let FontWeight = /* @__PURE__ */ function(
|
|
1476
|
-
return
|
|
1477
|
-
}({}), FontStyle = /* @__PURE__ */ function(
|
|
1478
|
-
return
|
|
1479
|
-
}({}), TextDecoration = /* @__PURE__ */ function(
|
|
1480
|
-
return
|
|
1481
|
-
}({}), TextDecorationStyle = /* @__PURE__ */ function(
|
|
1482
|
-
return
|
|
1483
|
-
}({}), TextAlign = /* @__PURE__ */ function(
|
|
1484
|
-
return
|
|
1485
|
-
}({}), TextOverflow = /* @__PURE__ */ function(
|
|
1486
|
-
return
|
|
1487
|
-
}({}), TextBaseline = /* @__PURE__ */ function(
|
|
1488
|
-
return
|
|
1489
|
-
}({}), TextDirection = /* @__PURE__ */ function(
|
|
1490
|
-
return
|
|
1627
|
+
let FontWeight = /* @__PURE__ */ function(e) {
|
|
1628
|
+
return e.w100 = "100", e.w200 = "200", e.w300 = "300", e.w400 = "400", e.w500 = "500", e.w600 = "600", e.w700 = "700", e.w800 = "800", e.w900 = "900", e.normal = "normal", e.bold = "bold", e.bolder = "bolder", e;
|
|
1629
|
+
}({}), FontStyle = /* @__PURE__ */ function(e) {
|
|
1630
|
+
return e.normal = "normal", e.italic = "italic", e;
|
|
1631
|
+
}({}), TextDecoration = /* @__PURE__ */ function(e) {
|
|
1632
|
+
return e.none = "none", e.underline = "underline", e.overline = "overline", e.lineThrough = "line-through", e;
|
|
1633
|
+
}({}), TextDecorationStyle = /* @__PURE__ */ function(e) {
|
|
1634
|
+
return e.solid = "solid", e.double = "double", e.dotted = "dotted", e.dashed = "dashed", e.wavy = "wavy", e;
|
|
1635
|
+
}({}), TextAlign = /* @__PURE__ */ function(e) {
|
|
1636
|
+
return e.left = "left", e.right = "right", e.center = "center", e.justify = "justify", e.start = "start", e.end = "end", e;
|
|
1637
|
+
}({}), TextOverflow = /* @__PURE__ */ function(e) {
|
|
1638
|
+
return e.clip = "clip", e.fade = "fade", e.ellipsis = "ellipsis", e.visible = "visible", e;
|
|
1639
|
+
}({}), TextBaseline = /* @__PURE__ */ function(e) {
|
|
1640
|
+
return e.alphabetic = "alphabetic", e.ideographic = "ideographic", e;
|
|
1641
|
+
}({}), TextDirection = /* @__PURE__ */ function(e) {
|
|
1642
|
+
return e.rtl = "rtl", e.ltr = "ltr", e;
|
|
1491
1643
|
}({});
|
|
1492
1644
|
var TEXT_STYLE_SYMBOL = Symbol("textStyle");
|
|
1493
|
-
function buildFontFamily(
|
|
1494
|
-
let
|
|
1495
|
-
return
|
|
1496
|
-
}
|
|
1497
|
-
function toCSSStyle(
|
|
1498
|
-
let
|
|
1499
|
-
|
|
1500
|
-
let
|
|
1501
|
-
if (
|
|
1645
|
+
function buildFontFamily(e, S, C) {
|
|
1646
|
+
let w = e;
|
|
1647
|
+
return S && w && (w = `packages/${S}/${w}`), C && C.length > 0 ? [w, ...C].filter(Boolean).join(", ") : w;
|
|
1648
|
+
}
|
|
1649
|
+
function toCSSStyle(e = {}) {
|
|
1650
|
+
let S = {};
|
|
1651
|
+
S.margin = 0, S.padding = 0, S.border = "none", S.fontSmooth = "antialiased", S.MozOsxFontSmoothing = "grayscale", S.textRendering = "optimizeLegibility", S.wordBreak = "break-word", S.overflowWrap = "break-word", S.transition = "all 0.2s ease-in-out", e.foreground ? Object.assign(S, e.foreground) : e.color && (S.color = e.color), e.background ? Object.assign(S, e.background) : e.backgroundColor && (S.backgroundColor = e.backgroundColor), e.fontSize && (S.fontSize = typeof e.fontSize == "number" ? px2vw(e.fontSize) : e.fontSize), e.fontWeight && (S.fontWeight = e.fontWeight.toString()), e.fontStyle && (S.fontStyle = e.fontStyle);
|
|
1652
|
+
let C = buildFontFamily(e.fontFamily, e.package, e.fontFamilyFallback);
|
|
1653
|
+
if (C && (S.fontFamily = C), e.letterSpacing && (S.letterSpacing = px2vw(e.letterSpacing)), e.wordSpacing && (S.wordSpacing = px2vw(e.wordSpacing)), e.height && (S.lineHeight = e.height.toString()), e.decoration && (S.textDecoration = e.decoration), e.decorationColor && (S.textDecorationColor = e.decorationColor), e.decorationStyle && (S.textDecorationStyle = e.decorationStyle), e.decorationThickness && (S.textDecorationThickness = px2vw(e.decorationThickness)), e.overflow) switch (e.overflow) {
|
|
1502
1654
|
case TextOverflow.ellipsis:
|
|
1503
|
-
|
|
1655
|
+
S.overflow = "hidden", S.textOverflow = "ellipsis", S.whiteSpace = "nowrap";
|
|
1504
1656
|
break;
|
|
1505
1657
|
case TextOverflow.clip:
|
|
1506
|
-
|
|
1658
|
+
S.overflow = "hidden";
|
|
1507
1659
|
break;
|
|
1508
1660
|
case TextOverflow.visible:
|
|
1509
|
-
|
|
1661
|
+
S.overflow = "visible";
|
|
1510
1662
|
break;
|
|
1511
1663
|
case TextOverflow.fade:
|
|
1512
|
-
|
|
1664
|
+
S.overflow = "hidden", S.whiteSpace = "nowrap", S.maskImage = "linear-gradient(to right, black 80%, transparent 100%)";
|
|
1513
1665
|
break;
|
|
1514
1666
|
}
|
|
1515
|
-
return
|
|
1516
|
-
let
|
|
1517
|
-
return `${px2vw(
|
|
1518
|
-
}).join(", ")),
|
|
1667
|
+
return e.shadows && e.shadows.length > 0 && (S.textShadow = e.shadows.map((e) => {
|
|
1668
|
+
let S = e.offsetX || 0, C = e.offsetY || 0, w = e.blurRadius || 0, T = e.color || "rgba(0,0,0,0.5)";
|
|
1669
|
+
return `${px2vw(S)} ${px2vw(C)} ${px2vw(w)} ${T}`;
|
|
1670
|
+
}).join(", ")), e.fontFeatures && (S.fontFeatureSettings = JSON.stringify(e.fontFeatures)), e.fontVariations && (S.fontVariationSettings = JSON.stringify(e.fontVariations)), S;
|
|
1519
1671
|
}
|
|
1520
|
-
function TextStyle(
|
|
1672
|
+
function TextStyle(e = {}, S = {}) {
|
|
1521
1673
|
return {
|
|
1522
|
-
...
|
|
1523
|
-
...
|
|
1674
|
+
...S,
|
|
1675
|
+
...e,
|
|
1524
1676
|
[TEXT_STYLE_SYMBOL]: !0
|
|
1525
1677
|
};
|
|
1526
1678
|
}
|
|
1527
|
-
function isTextStyle(
|
|
1528
|
-
return isPlainObject(
|
|
1679
|
+
function isTextStyle(e) {
|
|
1680
|
+
return isPlainObject(e) ? TEXT_STYLE_SYMBOL in e : !1;
|
|
1529
1681
|
}
|
|
1530
1682
|
var Text_default = /* @__PURE__ */ defineComponent({
|
|
1531
1683
|
inheritAttrs: !1,
|
|
@@ -1544,35 +1696,259 @@ var Text_default = /* @__PURE__ */ defineComponent({
|
|
|
1544
1696
|
semanticsLabel: {},
|
|
1545
1697
|
tag: { default: "span" }
|
|
1546
1698
|
},
|
|
1547
|
-
setup(
|
|
1548
|
-
let
|
|
1549
|
-
let
|
|
1550
|
-
return !isUndefined(
|
|
1551
|
-
}),
|
|
1552
|
-
let
|
|
1553
|
-
|
|
1554
|
-
let
|
|
1555
|
-
if (
|
|
1699
|
+
setup(e) {
|
|
1700
|
+
let S = useStyles(), C = e, w = useGestureEvents(), D = computed(() => S.value.pointerEvents == "none" ? {} : w || {}), O = computed(() => {
|
|
1701
|
+
let e = C.data;
|
|
1702
|
+
return !isUndefined(e) && e != null ? e.toString() : "";
|
|
1703
|
+
}), k = useGestureStyle(), A = computed(() => {
|
|
1704
|
+
let e = C.style ? toCSSStyle(C.style) : {};
|
|
1705
|
+
C.textAlign && (e.textAlign = C.textAlign), C.textDirection && (e.direction = C.textDirection), C.softWrap === !1 && (e.whiteSpace = "nowrap");
|
|
1706
|
+
let S = C.overflow ?? C.style?.overflow;
|
|
1707
|
+
if (S) switch (S) {
|
|
1556
1708
|
case TextOverflow.ellipsis:
|
|
1557
|
-
|
|
1709
|
+
e.textOverflow = "ellipsis", e.overflow = "hidden", C.softWrap === !1 && (e.whiteSpace = "nowrap");
|
|
1558
1710
|
break;
|
|
1559
1711
|
case TextOverflow.clip:
|
|
1560
|
-
|
|
1712
|
+
e.overflow = "hidden", e.textOverflow = "clip";
|
|
1561
1713
|
break;
|
|
1562
1714
|
case TextOverflow.visible:
|
|
1563
|
-
|
|
1715
|
+
e.overflow = "visible";
|
|
1564
1716
|
break;
|
|
1565
1717
|
case TextOverflow.fade:
|
|
1566
|
-
|
|
1718
|
+
e.overflow = "hidden", e.whiteSpace = "nowrap", e.maskImage = "linear-gradient(to right, black 80%, transparent 100%)", e.WebkitMaskImage = "linear-gradient(to right, black 80%, transparent 100%)";
|
|
1567
1719
|
break;
|
|
1568
1720
|
}
|
|
1569
|
-
return
|
|
1721
|
+
return C.maxLines && C.maxLines > 0 ? (e.overflow = "hidden", e.display = "-webkit-box", e.WebkitBoxOrient = "vertical", e.WebkitLineClamp = C.maxLines.toString(), C.softWrap !== !1 && (e.whiteSpace = "normal")) : e.display ||= C.tag === "span" ? "inline-block" : "block", Object.assign(e, k), e;
|
|
1570
1722
|
});
|
|
1571
|
-
return (
|
|
1572
|
-
default: withCtx(() => [renderSlot(
|
|
1723
|
+
return (S, C) => (openBlock(), createBlock(resolveDynamicComponent(e.tag), mergeProps({ style: A.value }, D.value), {
|
|
1724
|
+
default: withCtx(() => [renderSlot(S.$slots, "default", {}, () => [createTextVNode(toDisplayString(O.value), 1)])]),
|
|
1573
1725
|
_: 3
|
|
1574
1726
|
}, 16, ["style"]));
|
|
1575
1727
|
}
|
|
1728
|
+
});
|
|
1729
|
+
function OutlineInputBorder(e = {}) {
|
|
1730
|
+
return {
|
|
1731
|
+
borderSide: e.borderSide ?? BorderSide({
|
|
1732
|
+
color: "#000000",
|
|
1733
|
+
width: 1
|
|
1734
|
+
}),
|
|
1735
|
+
borderRadius: e.borderRadius ?? BorderRadius.all(4),
|
|
1736
|
+
isOutline: !0
|
|
1737
|
+
};
|
|
1738
|
+
}
|
|
1739
|
+
function UnderlineInputBorder(e = {}) {
|
|
1740
|
+
return {
|
|
1741
|
+
borderSide: e.borderSide ?? BorderSide({
|
|
1742
|
+
color: "#000000",
|
|
1743
|
+
width: 1
|
|
1744
|
+
}),
|
|
1745
|
+
borderRadius: e.borderRadius ?? BorderRadius.all(0),
|
|
1746
|
+
isOutline: !1
|
|
1747
|
+
};
|
|
1748
|
+
}
|
|
1749
|
+
var _hoisted_1 = {
|
|
1750
|
+
key: 1,
|
|
1751
|
+
class: "fluekit-input-suffix"
|
|
1752
|
+
}, _hoisted_2 = {
|
|
1753
|
+
key: 1,
|
|
1754
|
+
class: "fluekit-input-footer"
|
|
1755
|
+
}, _hoisted_3 = {
|
|
1756
|
+
key: 1,
|
|
1757
|
+
class: "fluekit-input-helper-spacer"
|
|
1758
|
+
}, _hoisted_4 = {
|
|
1759
|
+
key: 2,
|
|
1760
|
+
class: "fluekit-input-counter"
|
|
1761
|
+
}, TextField_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
1762
|
+
inheritAttrs: !1,
|
|
1763
|
+
__name: "TextField",
|
|
1764
|
+
props: {
|
|
1765
|
+
modelValue: { default: "" },
|
|
1766
|
+
decoration: {},
|
|
1767
|
+
enabled: {
|
|
1768
|
+
type: Boolean,
|
|
1769
|
+
default: !0
|
|
1770
|
+
},
|
|
1771
|
+
readOnly: {
|
|
1772
|
+
type: Boolean,
|
|
1773
|
+
default: !1
|
|
1774
|
+
},
|
|
1775
|
+
obscureText: {
|
|
1776
|
+
type: Boolean,
|
|
1777
|
+
default: !1
|
|
1778
|
+
},
|
|
1779
|
+
maxLines: { default: 1 },
|
|
1780
|
+
minLines: {},
|
|
1781
|
+
keyboardType: {},
|
|
1782
|
+
style: {},
|
|
1783
|
+
cursorColor: {},
|
|
1784
|
+
autofocus: { type: Boolean },
|
|
1785
|
+
autoGrow: {
|
|
1786
|
+
type: Boolean,
|
|
1787
|
+
default: !1
|
|
1788
|
+
},
|
|
1789
|
+
maxLength: {},
|
|
1790
|
+
textAlign: { default: "start" },
|
|
1791
|
+
textInputAction: {},
|
|
1792
|
+
textCapitalization: {},
|
|
1793
|
+
autocorrect: {
|
|
1794
|
+
type: Boolean,
|
|
1795
|
+
default: !0
|
|
1796
|
+
}
|
|
1797
|
+
},
|
|
1798
|
+
emits: [
|
|
1799
|
+
"update:modelValue",
|
|
1800
|
+
"focus",
|
|
1801
|
+
"blur",
|
|
1802
|
+
"submit"
|
|
1803
|
+
],
|
|
1804
|
+
setup(e, { emit: S }) {
|
|
1805
|
+
let C = e, w = S, A = ref(null), M = ref(!1), N = ref(null), P = ref(0), V = null, H = () => {
|
|
1806
|
+
let e = A.value;
|
|
1807
|
+
if (!e || !U.value) return;
|
|
1808
|
+
if (!C.autoGrow) {
|
|
1809
|
+
e.style.height = "", e.style.minHeight = "", e.style.maxHeight = "";
|
|
1810
|
+
return;
|
|
1811
|
+
}
|
|
1812
|
+
let S = window.getComputedStyle(e), w = parseFloat(S.lineHeight || "0") || parseFloat(S.fontSize || "16") * 1.2, T = (C.minLines || 1) * w;
|
|
1813
|
+
if (e.style.minHeight = `${Math.round(T)}px`, C.maxLines && C.maxLines > 1) {
|
|
1814
|
+
let S = C.maxLines * w;
|
|
1815
|
+
e.style.maxHeight = `${Math.round(S)}px`;
|
|
1816
|
+
} else e.style.maxHeight = "";
|
|
1817
|
+
e.style.height = "auto", e.style.height = `${Math.max(Math.round(T), e.scrollHeight)}px`;
|
|
1818
|
+
};
|
|
1819
|
+
onMounted(() => {
|
|
1820
|
+
N.value && (V = new ResizeObserver(() => {
|
|
1821
|
+
P.value = Math.round(N.value.getBoundingClientRect().width);
|
|
1822
|
+
}), V.observe(N.value), P.value = Math.round(N.value.getBoundingClientRect().width)), nextTick(H);
|
|
1823
|
+
}), onBeforeUnmount(() => {
|
|
1824
|
+
V &&= (V.disconnect(), null);
|
|
1825
|
+
});
|
|
1826
|
+
let U = computed(() => C.maxLines === null || C.maxLines > 1 || C.keyboardType === "multiline"), W = computed(() => {
|
|
1827
|
+
if (!U.value) return C.obscureText ? "password" : C.keyboardType === "number" ? "number" : "text";
|
|
1828
|
+
}), G = computed(() => M.value || C.modelValue !== "" && C.modelValue !== null && C.modelValue !== void 0), K = computed(() => C.decoration?.labelText && !G.value ? "" : C.decoration?.hintText || "");
|
|
1829
|
+
watch(() => C.modelValue, () => nextTick(H)), watch(U, (e) => e && nextTick(H)), watch(() => C.maxLines, () => nextTick(H)), watch(() => C.minLines, () => nextTick(H)), watch(() => C.autoGrow, () => nextTick(H));
|
|
1830
|
+
let q = computed(() => C.decoration?.errorText && C.decoration.errorBorder ? C.decoration.errorBorder : !C.enabled && C.decoration?.disabledBorder ? C.decoration.disabledBorder : M.value && C.decoration?.focusedBorder ? C.decoration.focusedBorder : C.enabled && C.decoration?.enabledBorder ? C.decoration.enabledBorder : C.decoration?.border), J = computed(() => {
|
|
1831
|
+
let e = {
|
|
1832
|
+
display: "flex",
|
|
1833
|
+
alignItems: U.value ? "flex-start" : "center",
|
|
1834
|
+
position: "relative",
|
|
1835
|
+
transition: "all 0.2s ease"
|
|
1836
|
+
}, S = q.value || UnderlineInputBorder();
|
|
1837
|
+
if (S.isOutline) {
|
|
1838
|
+
let C = S.borderSide || BorderSide({
|
|
1839
|
+
width: 1,
|
|
1840
|
+
color: "#888"
|
|
1841
|
+
}), w = S.borderRadius || BorderRadius.all(4);
|
|
1842
|
+
Object.assign(e, borderSideToStyle(C)), Object.assign(e, borderRadiusToStyle(w)), e.padding = "8px 12px";
|
|
1843
|
+
} else {
|
|
1844
|
+
let C = S.borderSide || BorderSide({
|
|
1845
|
+
width: 1,
|
|
1846
|
+
color: "#888"
|
|
1847
|
+
});
|
|
1848
|
+
e.borderBottom = `${C.width}px ${C.style || "solid"} ${C.color}`, e.borderRadius = "0", e.padding = "4px 0";
|
|
1849
|
+
}
|
|
1850
|
+
return C.decoration?.filled && (e.backgroundColor = C.decoration.fillColor || "#f0f0f0"), e;
|
|
1851
|
+
}), Y = computed(() => {
|
|
1852
|
+
let e = { ...toCSSStyle(C.style) };
|
|
1853
|
+
return C.cursorColor && (e.caretColor = C.cursorColor), C.textAlign && (e.textAlign = C.textAlign), e;
|
|
1854
|
+
}), X = computed(() => {
|
|
1855
|
+
let e = {
|
|
1856
|
+
position: "absolute",
|
|
1857
|
+
left: `${(q.value?.isOutline ? 12 : 0) + (P.value || 0)}px`,
|
|
1858
|
+
top: q.value?.isOutline ? "50%" : "0",
|
|
1859
|
+
transform: "translateY(-50%)",
|
|
1860
|
+
pointerEvents: "none",
|
|
1861
|
+
transition: "all 0.2s ease",
|
|
1862
|
+
color: "#666",
|
|
1863
|
+
...toCSSStyle(C.decoration?.labelStyle)
|
|
1864
|
+
};
|
|
1865
|
+
return G.value && (e.top = "0", e.transform = "translateY(-100%) scale(0.75)", e.transformOrigin = "left bottom", M.value && (e.color = "#2196F3")), e;
|
|
1866
|
+
}), Z = (e) => {
|
|
1867
|
+
let S = e.target;
|
|
1868
|
+
w("update:modelValue", S.value), nextTick(H);
|
|
1869
|
+
}, Q = (e) => {
|
|
1870
|
+
M.value = !0, w("focus", e);
|
|
1871
|
+
}, $ = (e) => {
|
|
1872
|
+
M.value = !1, w("blur", e);
|
|
1873
|
+
};
|
|
1874
|
+
return (S, C) => (openBlock(), createElementBlock("div", { class: normalizeClass(["fluekit-text-field", {
|
|
1875
|
+
"is-focused": M.value,
|
|
1876
|
+
"is-disabled": !e.enabled,
|
|
1877
|
+
"has-error": !!e.decoration?.errorText
|
|
1878
|
+
}]) }, [
|
|
1879
|
+
e.decoration?.labelText ? (openBlock(), createElementBlock("label", {
|
|
1880
|
+
key: 0,
|
|
1881
|
+
class: normalizeClass(["fluekit-input-label", { "is-floating": G.value }]),
|
|
1882
|
+
style: normalizeStyle(X.value)
|
|
1883
|
+
}, toDisplayString(e.decoration.labelText), 7)) : createCommentVNode("", !0),
|
|
1884
|
+
createElementVNode("div", {
|
|
1885
|
+
class: "fluekit-input-container",
|
|
1886
|
+
style: normalizeStyle(J.value)
|
|
1887
|
+
}, [
|
|
1888
|
+
S.$slots.prefix || e.decoration?.prefixText ? (openBlock(), createElementBlock("div", {
|
|
1889
|
+
key: 0,
|
|
1890
|
+
class: "fluekit-input-prefix",
|
|
1891
|
+
ref_key: "prefixRef",
|
|
1892
|
+
ref: N
|
|
1893
|
+
}, [renderSlot(S.$slots, "prefix", {}, () => [createTextVNode(toDisplayString(e.decoration?.prefixText), 1)], !0)], 512)) : createCommentVNode("", !0),
|
|
1894
|
+
(openBlock(), createBlock(resolveDynamicComponent(U.value ? "textarea" : "input"), mergeProps({
|
|
1895
|
+
ref_key: "inputRef",
|
|
1896
|
+
ref: A,
|
|
1897
|
+
class: "fluekit-input-element",
|
|
1898
|
+
value: e.modelValue,
|
|
1899
|
+
disabled: !e.enabled,
|
|
1900
|
+
readonly: e.readOnly,
|
|
1901
|
+
type: W.value,
|
|
1902
|
+
placeholder: K.value,
|
|
1903
|
+
rows: e.minLines || 1,
|
|
1904
|
+
style: Y.value,
|
|
1905
|
+
maxlength: e.maxLength,
|
|
1906
|
+
autocapitalize: e.textCapitalization,
|
|
1907
|
+
enterkeyhint: e.textInputAction,
|
|
1908
|
+
autocorrect: e.autocorrect ? "on" : "off"
|
|
1909
|
+
}, S.$attrs, {
|
|
1910
|
+
onInput: Z,
|
|
1911
|
+
onFocus: Q,
|
|
1912
|
+
onBlur: $
|
|
1913
|
+
}), null, 16, [
|
|
1914
|
+
"value",
|
|
1915
|
+
"disabled",
|
|
1916
|
+
"readonly",
|
|
1917
|
+
"type",
|
|
1918
|
+
"placeholder",
|
|
1919
|
+
"rows",
|
|
1920
|
+
"style",
|
|
1921
|
+
"maxlength",
|
|
1922
|
+
"autocapitalize",
|
|
1923
|
+
"enterkeyhint",
|
|
1924
|
+
"autocorrect"
|
|
1925
|
+
])),
|
|
1926
|
+
S.$slots.suffix || e.decoration?.suffixText ? (openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(S.$slots, "suffix", {}, () => [createTextVNode(toDisplayString(e.decoration?.suffixText), 1)], !0)])) : createCommentVNode("", !0)
|
|
1927
|
+
], 4),
|
|
1928
|
+
e.decoration?.errorText || e.decoration?.helperText || e.maxLength && e.maxLength > 0 ? (openBlock(), createElementBlock("div", _hoisted_2, [e.decoration?.errorText || e.decoration?.helperText ? (openBlock(), createElementBlock("div", {
|
|
1929
|
+
key: 0,
|
|
1930
|
+
class: normalizeClass(["fluekit-input-helper", { "is-error": !!e.decoration?.errorText }])
|
|
1931
|
+
}, toDisplayString(e.decoration?.errorText || e.decoration?.helperText), 3)) : (openBlock(), createElementBlock("div", _hoisted_3)), e.maxLength && e.maxLength > 0 ? (openBlock(), createElementBlock("div", _hoisted_4, toDisplayString(String(e.modelValue).length) + " / " + toDisplayString(e.maxLength), 1)) : createCommentVNode("", !0)])) : createCommentVNode("", !0)
|
|
1932
|
+
], 2));
|
|
1933
|
+
}
|
|
1934
|
+
}), [["__scopeId", "data-v-40723984"]]), TextArea_default = /* @__PURE__ */ defineComponent({
|
|
1935
|
+
inheritAttrs: !1,
|
|
1936
|
+
__name: "TextArea",
|
|
1937
|
+
props: { maxLines: { default: 4 } },
|
|
1938
|
+
setup(e) {
|
|
1939
|
+
return (S, C) => (openBlock(), createBlock(TextField_default, mergeProps(S.$attrs, {
|
|
1940
|
+
"max-lines": e.maxLines,
|
|
1941
|
+
"keyboard-type": "multiline"
|
|
1942
|
+
}), createSlots({ _: 2 }, [S.$slots.prefix ? {
|
|
1943
|
+
name: "prefix",
|
|
1944
|
+
fn: withCtx(() => [renderSlot(S.$slots, "prefix")]),
|
|
1945
|
+
key: "0"
|
|
1946
|
+
} : void 0, S.$slots.suffix ? {
|
|
1947
|
+
name: "suffix",
|
|
1948
|
+
fn: withCtx(() => [renderSlot(S.$slots, "suffix")]),
|
|
1949
|
+
key: "1"
|
|
1950
|
+
} : void 0]), 1040, ["max-lines"]));
|
|
1951
|
+
}
|
|
1576
1952
|
}), Transform_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
1577
1953
|
inheritAttrs: !1,
|
|
1578
1954
|
__name: "Transform",
|
|
@@ -1581,20 +1957,20 @@ var Text_default = /* @__PURE__ */ defineComponent({
|
|
|
1581
1957
|
alignment: { default: "center" },
|
|
1582
1958
|
origin: {}
|
|
1583
1959
|
},
|
|
1584
|
-
setup(
|
|
1585
|
-
let
|
|
1586
|
-
let
|
|
1587
|
-
transform:
|
|
1960
|
+
setup(e) {
|
|
1961
|
+
let S = e, C = computed(() => {
|
|
1962
|
+
let e = {
|
|
1963
|
+
transform: S.transform,
|
|
1588
1964
|
display: "flex",
|
|
1589
1965
|
flexDirection: "column",
|
|
1590
1966
|
flexShrink: 0
|
|
1591
1967
|
};
|
|
1592
|
-
return
|
|
1968
|
+
return S.origin ? e.transformOrigin = S.origin : S.alignment && (e.transformOrigin = alignmentToOrigin(S.alignment)), e;
|
|
1593
1969
|
});
|
|
1594
|
-
return (
|
|
1970
|
+
return (e, S) => (openBlock(), createElementBlock("div", {
|
|
1595
1971
|
class: "flutter-transform",
|
|
1596
|
-
style: normalizeStyle(
|
|
1597
|
-
}, [renderSlot(
|
|
1972
|
+
style: normalizeStyle(C.value)
|
|
1973
|
+
}, [renderSlot(e.$slots, "default", {}, void 0, !0)], 4));
|
|
1598
1974
|
}
|
|
1599
1975
|
}), [["__scopeId", "data-v-7e66ebaa"]]), Wrap_default = /* @__PURE__ */ defineComponent({
|
|
1600
1976
|
inheritAttrs: !1,
|
|
@@ -1609,33 +1985,33 @@ var Text_default = /* @__PURE__ */ defineComponent({
|
|
|
1609
1985
|
verticalDirection: { default: "down" },
|
|
1610
1986
|
clipBehavior: { default: "none" }
|
|
1611
1987
|
},
|
|
1612
|
-
setup(
|
|
1613
|
-
let
|
|
1988
|
+
setup(e) {
|
|
1989
|
+
let S = e, C = {
|
|
1614
1990
|
start: "flex-start",
|
|
1615
1991
|
end: "flex-end",
|
|
1616
1992
|
center: "center",
|
|
1617
1993
|
spaceBetween: "space-between",
|
|
1618
1994
|
spaceAround: "space-around",
|
|
1619
1995
|
spaceEvenly: "space-evenly"
|
|
1620
|
-
},
|
|
1996
|
+
}, w = {
|
|
1621
1997
|
start: "flex-start",
|
|
1622
1998
|
end: "flex-end",
|
|
1623
1999
|
center: "center"
|
|
1624
|
-
},
|
|
2000
|
+
}, E = computed(() => ({
|
|
1625
2001
|
display: "flex",
|
|
1626
2002
|
flexWrap: "wrap",
|
|
1627
|
-
flexDirection:
|
|
1628
|
-
justifyContent:
|
|
1629
|
-
alignContent:
|
|
1630
|
-
alignItems:
|
|
1631
|
-
gap: `${px2vw(
|
|
1632
|
-
overflow:
|
|
2003
|
+
flexDirection: S.direction === "horizontal" ? S.verticalDirection === "down" ? "row" : "row-reverse" : S.verticalDirection === "down" ? "column" : "column-reverse",
|
|
2004
|
+
justifyContent: C[S.alignment],
|
|
2005
|
+
alignContent: C[S.runAlignment],
|
|
2006
|
+
alignItems: w[S.crossAxisAlignment],
|
|
2007
|
+
gap: `${px2vw(S.runSpacing)} ${px2vw(S.spacing)}`,
|
|
2008
|
+
overflow: S.clipBehavior === "none" ? "visible" : "hidden"
|
|
1633
2009
|
}));
|
|
1634
|
-
return (
|
|
2010
|
+
return (e, S) => (openBlock(), createElementBlock("div", {
|
|
1635
2011
|
class: "flutter-wrap",
|
|
1636
|
-
style: normalizeStyle(
|
|
1637
|
-
}, [renderSlot(
|
|
2012
|
+
style: normalizeStyle(E.value)
|
|
2013
|
+
}, [renderSlot(e.$slots, "default")], 4));
|
|
1638
2014
|
}
|
|
1639
2015
|
});
|
|
1640
2016
|
setTransform(!1);
|
|
1641
|
-
export { Align_default as Align, Alignment, AnimatedContainer_default as AnimatedContainer, AnimatedOpacity_default as AnimatedOpacity, AssetImage, BlurStyle, Border, BorderRadius, BoxAlignment, BoxConstraints, BoxDecoration, BoxFit, BoxShadow, BoxShape, Center_default as Center, Clip, Column_default as Column, Container_default as Container,
|
|
2017
|
+
export { Align_default as Align, Alignment, AnimatedContainer_default as AnimatedContainer, AnimatedOpacity_default as AnimatedOpacity, AssetImage, BlurStyle, Border, BorderRadius, BorderSide, BoxAlignment, BoxConstraints, BoxDecoration, BoxFit, BoxShadow, BoxShape, Button_default as Button, ButtonStyle, Center_default as Center, Clip, Column_default as Column, Container_default as Container, DecorationImage, EdgeInsets, Expanded_default as Expanded, Fixed_default as Fixed, FontStyle, FontWeight, GestureDetector_default as GestureDetector, GridView_default as GridView, IgnorePointer_default as IgnorePointer, Image_default as Image, LinearGradient, ListView_default as ListView, MemoryImage, NetworkImage, Opacity_default as Opacity, OutlineInputBorder, Padding_default as Padding, Positioned_default as Positioned, RadialGradient, Row_default as Row, SafeArea_default as SafeArea, ScrollView_default as ScrollView, Size, SizedBox_default as SizedBox, Stack_default as Stack, Sticky_default as Sticky, Text_default as Text, TextAlign, TextArea_default as TextArea, TextBaseline, TextDecoration, TextDecorationStyle, TextDirection, TextField_default as TextField, TextOverflow, TextStyle, TileMode, Transform_default as Transform, UnderlineInputBorder, Wrap_default as Wrap, borderRadiusToStyle, borderSideToStyle, borderToStyle, boxConstraintsToStyle, boxDecorationToStyle, boxShadowToCSS, buttonStyleToStyle, createAssetImage, decorationImageToStyle, edgeInsetsToStyle, isBorderRadius, isBorderSide, isBorders, isBoxConstraints, isBoxDecoration, isBoxShadow, isEdgeInsets, isImageProvider, isTextStyle, marginToStyle, normalizeSrc, paddingToStyle, px2vw, setAssetBaseURL, setBaseUrl, setDefaultVW, setTransform, sizeToStyle, toCSSStyle as textStyleToCSSStyle, toCSSStyle };
|