fluekit 2.7.0 → 2.7.1

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/Fixed.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Props } from './usePosition';
1
+ import { PositionProps } from './usePosition';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
@@ -8,7 +8,7 @@ declare function __VLS_template(): {
8
8
  rootEl: any;
9
9
  };
10
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_component: import('vue').DefineComponent<PositionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PositionProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
12
12
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
13
13
  export default _default;
14
14
  type __VLS_WithTemplateSlots<T, S> = T & {
package/dist/Modal.d.ts CHANGED
@@ -1,12 +1,15 @@
1
1
  import { Alignment } from './Alignment';
2
2
  interface Props {
3
- visible: boolean;
4
3
  barrierDismissible?: boolean;
5
4
  barrierColor?: string;
6
5
  alignment?: Alignment;
7
6
  zIndex?: number;
8
- transition?: string;
9
7
  }
8
+ declare const visible: import('vue').ModelRef<boolean, string, boolean, boolean>;
9
+ type __VLS_Props = Props;
10
+ type __VLS_PublicProps = {
11
+ "visible"?: typeof visible['value'];
12
+ } & __VLS_Props;
10
13
  declare function __VLS_template(): {
11
14
  attrs: Partial<{}>;
12
15
  slots: {
@@ -16,16 +19,15 @@ declare function __VLS_template(): {
16
19
  rootEl: any;
17
20
  };
18
21
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
20
- close: () => any;
22
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
23
  "update:visible": (value: boolean) => any;
22
- }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
24
+ } & {
25
+ close: () => any;
26
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
23
27
  onClose?: (() => any) | undefined;
24
28
  "onUpdate:visible"?: ((value: boolean) => any) | undefined;
25
29
  }>, {
26
30
  alignment: Alignment;
27
- visible: boolean;
28
- transition: string;
29
31
  zIndex: number;
30
32
  barrierDismissible: boolean;
31
33
  barrierColor: string;
@@ -1,4 +1,4 @@
1
- import { Props } from './usePosition';
1
+ import { PositionProps } from './usePosition';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
@@ -8,7 +8,7 @@ declare function __VLS_template(): {
8
8
  rootEl: any;
9
9
  };
10
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_component: import('vue').DefineComponent<PositionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PositionProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
12
12
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
13
13
  export default _default;
14
14
  type __VLS_WithTemplateSlots<T, S> = T & {
package/dist/Sticky.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Props } from './usePosition';
1
+ import { PositionProps } from './usePosition';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
@@ -8,7 +8,7 @@ declare function __VLS_template(): {
8
8
  rootEl: any;
9
9
  };
10
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_component: import('vue').DefineComponent<PositionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PositionProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
12
12
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
13
13
  export default _default;
14
14
  type __VLS_WithTemplateSlots<T, S> = T & {
package/dist/index.js CHANGED
@@ -2451,45 +2451,46 @@ var CupertinoActivityIndicator_default = /* @__PURE__ */ defineComponent({
2451
2451
  }), Modal_default = /* @__PURE__ */ defineComponent({
2452
2452
  inheritAttrs: !1,
2453
2453
  __name: "Modal",
2454
- props: {
2455
- visible: {
2456
- type: Boolean,
2457
- default: !1
2458
- },
2454
+ props: /* @__PURE__ */ mergeModels({
2459
2455
  barrierDismissible: {
2460
2456
  type: Boolean,
2461
2457
  default: !0
2462
2458
  },
2463
2459
  barrierColor: { default: "rgba(0, 0, 0, 0.5)" },
2464
2460
  alignment: { default: Alignment.center },
2465
- zIndex: { default: 1e3 },
2466
- transition: { default: "fluekit-modal-fade" }
2467
- },
2468
- emits: ["update:visible", "close"],
2461
+ zIndex: { default: () => useZIndex() }
2462
+ }, {
2463
+ visible: {
2464
+ type: Boolean,
2465
+ default: !1
2466
+ },
2467
+ visibleModifiers: {}
2468
+ }),
2469
+ emits: /* @__PURE__ */ mergeModels(["close"], ["update:visible"]),
2469
2470
  setup(e, { emit: i }) {
2470
- let a = e, s = i, c = () => {
2471
- s("update:visible", !1), s("close");
2472
- }, l = () => {
2473
- a.barrierDismissible && c();
2474
- }, u = (e, r) => {
2475
- let i = e;
2476
- i.animate([{ opacity: 0 }, { opacity: 1 }], {
2471
+ let a = useModel(e, "visible"), s = e, c = i, l = () => {
2472
+ a.value = !1, c("close");
2473
+ }, u = () => {
2474
+ s.barrierDismissible && l();
2475
+ }, m = (e, r) => {
2476
+ let i = e.animate([{ opacity: 0 }, { opacity: 1 }], {
2477
2477
  duration: 300,
2478
2478
  easing: "ease"
2479
- }).onfinish = r;
2480
- }, m = (e, r) => {
2481
- let i = e;
2482
- i.animate([{ opacity: 1 }, { opacity: 0 }], {
2479
+ });
2480
+ i.onfinish = r;
2481
+ }, g = (e, r) => {
2482
+ let i = e.animate([{ opacity: 1 }, { opacity: 0 }], {
2483
2483
  duration: 300,
2484
2484
  easing: "ease"
2485
- }).onfinish = r;
2485
+ });
2486
+ i.onfinish = r;
2486
2487
  };
2487
- return (i, a) => (openBlock(), createElementBlock(Fragment, null, [createVNode(Transition, {
2488
+ return (i, s) => (openBlock(), createElementBlock(Fragment, null, [createVNode(Transition, {
2488
2489
  css: !1,
2489
- onEnter: u,
2490
- onLeave: m
2490
+ onEnter: m,
2491
+ onLeave: g
2491
2492
  }, {
2492
- default: withCtx(() => [e.visible ? (openBlock(), createBlock(Fixed_default, {
2493
+ default: withCtx(() => [a.value ? (openBlock(), createBlock(Fixed_default, {
2493
2494
  key: 0,
2494
2495
  "z-index": e.zIndex,
2495
2496
  top: 0,
@@ -2509,9 +2510,9 @@ var CupertinoActivityIndicator_default = /* @__PURE__ */ defineComponent({
2509
2510
  }, 8, ["z-index"])) : createCommentVNode("", !0)]),
2510
2511
  _: 3
2511
2512
  }), createVNode(Overlay_default, {
2512
- visible: e.visible,
2513
+ visible: a.value,
2513
2514
  position: "fixed",
2514
- onTap: l,
2515
+ onTap: u,
2515
2516
  "z-index": e.zIndex - 1
2516
2517
  }, null, 8, ["visible", "z-index"])], 64));
2517
2518
  }
@@ -3337,8 +3338,10 @@ var _hoisted_1$8 = { style: {
3337
3338
  ],
3338
3339
  setup(e, { expose: a, emit: s }) {
3339
3340
  let c = e, u = computed(() => c.actions.length == 2 ? "row" : "column"), g = computed(() => {
3341
+ if (isMacOS) return "16px";
3342
+ if (isIPad || isIOS) return "12px";
3340
3343
  let e = C.size.width;
3341
- return isMacOS ? "16PX" : isIPad ? "12PX" : isIOS ? "8PX" : e >= 1024 ? "16PX" : e >= 600 ? "12PX" : "8PX";
3344
+ return e >= 1024 || e >= 600 ? "12px" : "8px";
3342
3345
  }), y = s, b = () => {
3343
3346
  y("update:modelValue", !1), y("close");
3344
3347
  };
@@ -3372,10 +3375,10 @@ var _hoisted_1$8 = { style: {
3372
3375
  });
3373
3376
  }), T = computed(() => {
3374
3377
  let e = C.size.width, r;
3375
- return r = isMacOS || isIOS || isIPad ? 13 : e >= 1024 ? 16 : e >= 600 ? 15 : 13, TextStyle({
3378
+ return r = isMacOS || isIOS || isIPad ? 14 : e >= 1024 ? 16 : e >= 600 ? 15 : 13, TextStyle({
3376
3379
  fontSize: r + "PX",
3377
3380
  fontWeight: 600,
3378
- height: `${1.35 * r}PX`,
3381
+ height: `${1.35 * r}px`,
3379
3382
  letterSpacing: "-0.4PX",
3380
3383
  color: C.platformBrightness === "dark" ? "#a1a1a6" : "#6b6b6b"
3381
3384
  });
@@ -3392,8 +3395,8 @@ var _hoisted_1$8 = { style: {
3392
3395
  }
3393
3396
  let a = C.size.width, o, s = "12PX", c = "16PX";
3394
3397
  if (isMacOS) o = 14, s = "10PX", c = "14PX";
3395
- else if (isIPad) o = 17, s = "14PX", c = "20PX";
3396
- else if (isIOS) o = 17, s = "12PX", c = "16PX";
3398
+ else if (isIPad) o = 15, s = "14PX", c = "20PX";
3399
+ else if (isIOS) o = 15, s = "12PX", c = "16PX";
3397
3400
  else {
3398
3401
  let e = u.value == "row" ? 15 : 16;
3399
3402
  o = a >= 1024 ? e + 3 : a >= 600 ? e + 2 : e, s = a >= 1024 ? "14PX" : a >= 600 ? "13PX" : "12PX", c = a >= 1024 ? "20PX" : a >= 600 ? "18PX" : "16PX";
@@ -3409,7 +3412,7 @@ var _hoisted_1$8 = { style: {
3409
3412
  }),
3410
3413
  textStyle: TextStyle({
3411
3414
  fontSize: o + "PX",
3412
- height: `${1.4 * o}PX`,
3415
+ height: `${1.35 * o}PX`,
3413
3416
  color: i,
3414
3417
  fontWeight: l
3415
3418
  }),
@@ -3457,8 +3460,26 @@ var _hoisted_1$8 = { style: {
3457
3460
  }
3458
3461
  });
3459
3462
  let O = useZIndex(), k = computed(() => {
3460
- let e = C.size.width, r = "40px 20px";
3461
- return isIOS ? r = "40px 20px" : isIPad ? r = "80px 32px" : isMacOS ? r = "64px 32px" : e >= 600 && e < 1024 ? r = "64px 24px" : e >= 1024 && (r = "80px 32px"), {
3463
+ let e = C.size.width, r = {};
3464
+ return r = paddingToStyle(isIOS ? {
3465
+ vertical: 40,
3466
+ horizontal: 20
3467
+ } : isIPad ? {
3468
+ vertical: 80,
3469
+ horizontal: 32
3470
+ } : isMacOS ? {
3471
+ vertical: 64,
3472
+ horizontal: 32
3473
+ } : e >= 600 && e < 1024 ? {
3474
+ vertical: 64,
3475
+ horizontal: 24
3476
+ } : e >= 1024 ? {
3477
+ vertical: 80,
3478
+ horizontal: 32
3479
+ } : {
3480
+ vertical: 40,
3481
+ horizontal: 20
3482
+ }), {
3462
3483
  position: "fixed",
3463
3484
  inset: 0,
3464
3485
  zIndex: O,
@@ -3469,16 +3490,16 @@ var _hoisted_1$8 = { style: {
3469
3490
  justifyContent: "center",
3470
3491
  background: "rgba(0, 0, 0, 0.25)",
3471
3492
  backdropFilter: "blur(3px)",
3472
- padding: r,
3493
+ ...r,
3473
3494
  width: "100%",
3474
3495
  height: "100%"
3475
3496
  };
3476
3497
  }), A = computed(() => {
3477
3498
  let e = C.size.width, r = "400px", i = "32px";
3478
- return isIOS ? (r = "400px", i = "32px") : isIPad ? (r = "560px", i = "36px") : isMacOS ? (r = "520px", i = "24px") : e >= 600 && e < 1024 ? (r = "560px", i = "32px") : e >= 1024 && (r = "640px", i = "28px"), {
3499
+ return isIOS ? (r = "400px", i = "32px") : isIPad ? (r = "560px", i = "36px") : isMacOS ? (r = "520px", i = "24px") : e >= 600 && e < 1024 ? (r = "560px", i = "32px") : e >= 1024 ? (r = "640px", i = "28px") : (r = "400px", i = "32px"), {
3479
3500
  position: "relative",
3480
- maxWidth: r,
3481
- borderRadius: i,
3501
+ maxWidth: px2vw$1(r),
3502
+ borderRadius: px2vw$1(i),
3482
3503
  overflow: "hidden",
3483
3504
  width: "100%",
3484
3505
  animation: "liquid-glass-dialog-enter 0.35s cubic-bezier(0.32, 0.72, 0, 1)"
@@ -1,7 +1,7 @@
1
1
  import { CSSProperties } from 'vue';
2
2
  import { SizeType } from './Size';
3
3
  export declare function useZIndex(): number;
4
- export interface Props {
4
+ export interface PositionProps {
5
5
  /** 距离顶部的距离 */
6
6
  top?: number | string;
7
7
  /** 距离底部的距离 */
@@ -20,4 +20,4 @@ export interface Props {
20
20
  inset?: number | string;
21
21
  size?: SizeType;
22
22
  }
23
- export declare function usePositionStyle(props: Props, position?: "absolute" | "fixed" | "sticky" | "relative"): import('vue').ComputedRef<CSSProperties>;
23
+ export declare function usePositionStyle(props: PositionProps, position?: "absolute" | "fixed" | "sticky" | "relative"): import('vue').ComputedRef<CSSProperties>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluekit",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "description": "A Flutter-style Layout UI kit for Vue",
5
5
  "homepage": "https://fi2zz.github.io/fluekit/",
6
6
  "repository": {