fluekit 2.6.3 → 2.6.5

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.
@@ -18,6 +18,8 @@ interface Props {
18
18
  actionsAlignment?: MainAxisAlignment;
19
19
  titleAlignment?: Alignment;
20
20
  padding?: EdgeInsets;
21
+ contentStyle?: TextStyle;
22
+ contentColor?: string;
21
23
  titleStyle?: TextStyle;
22
24
  titleColor?: string;
23
25
  titleFontSize?: number;
package/dist/Fixed.d.ts CHANGED
@@ -9,7 +9,7 @@ declare function __VLS_template(): {
9
9
  };
10
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
11
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
12
- zIndex: number;
12
+ zIndex: number | string;
13
13
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
14
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
15
15
  export default _default;
package/dist/Icons.d.ts CHANGED
@@ -31,4 +31,16 @@ export declare const Icons: {
31
31
  monitor: string;
32
32
  warning: string;
33
33
  videoPlay: string;
34
+ videoPause: string;
35
+ poweroff: string;
36
+ signout: string;
37
+ chevronLeft: string;
38
+ chevronRight: string;
39
+ copy: string;
40
+ location: string;
41
+ camera: string;
42
+ mail: string;
43
+ lock: string;
44
+ download: string;
45
+ upload: string;
34
46
  };
package/dist/Sticky.d.ts CHANGED
@@ -9,7 +9,7 @@ declare function __VLS_template(): {
9
9
  };
10
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
11
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
12
- zIndex: number;
12
+ zIndex: number | string;
13
13
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
14
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
15
15
  export default _default;
package/dist/index.js CHANGED
@@ -1451,16 +1451,62 @@ var GestureDetector_default = defineComponent({
1451
1451
  "max-size"
1452
1452
  ]));
1453
1453
  }
1454
- });
1454
+ }), zIndexManager = {
1455
+ current: 2e3,
1456
+ next() {
1457
+ return ++this.current;
1458
+ }
1459
+ };
1455
1460
  function usePositionStyle(t, i = "absolute") {
1456
- return computed(() => {
1457
- let a = {
1461
+ let a = ref();
1462
+ return onMounted(() => a.value = zIndexManager.next()), computed(() => {
1463
+ let o = {
1458
1464
  position: i,
1459
- boxSizing: "border-box"
1465
+ boxSizing: "border-box",
1466
+ zIndex: t.zIndex ?? a.value
1460
1467
  };
1461
- return a.top = px2vw$1(t.top), a.bottom = px2vw$1(t.bottom), a.left = px2vw$1(t.left), a.right = px2vw$1(t.right), a.width = px2vw$1(t.width), a.height = px2vw$1(t.height), a.zIndex = t.zIndex, a;
1468
+ t.size === void 0 ? (o.width = px2vw$1(t.width), o.height = px2vw$1(t.height)) : Object.assign(o, sizeToStyle(t.size));
1469
+ let s = t.inset;
1470
+ if (s != null) {
1471
+ if (typeof s == "number") return o.top = px2vw$1(s), o.bottom = px2vw$1(s), o.left = px2vw$1(s), o.right = px2vw$1(s), o;
1472
+ typeof s == "string" && Object.assign(o, insetToStyle(s));
1473
+ } else o.top = px2vw$1(t.top), o.bottom = px2vw$1(t.bottom), o.left = px2vw$1(t.left), o.right = px2vw$1(t.right);
1474
+ return o;
1462
1475
  });
1463
1476
  }
1477
+ function insetToStyle(t) {
1478
+ if (!t) return {};
1479
+ let i = t.toString().trim().split(/\s+/), [a, o, s, c] = (() => {
1480
+ switch (i.length) {
1481
+ case 1: return [
1482
+ i[0],
1483
+ i[0],
1484
+ i[0],
1485
+ i[0]
1486
+ ];
1487
+ case 2: return [
1488
+ i[0],
1489
+ i[1],
1490
+ i[0],
1491
+ i[1]
1492
+ ];
1493
+ case 3: return [
1494
+ i[0],
1495
+ i[1],
1496
+ i[2],
1497
+ i[1]
1498
+ ];
1499
+ case 4: return i;
1500
+ default:
1501
+ }
1502
+ })();
1503
+ return {
1504
+ top: px2vw$1(a),
1505
+ right: px2vw$1(o),
1506
+ bottom: px2vw$1(s),
1507
+ left: px2vw$1(c)
1508
+ };
1509
+ }
1464
1510
  var Fixed_default = /* @__PURE__ */ defineComponent({
1465
1511
  inheritAttrs: !1,
1466
1512
  __name: "Fixed",
@@ -1471,7 +1517,9 @@ var Fixed_default = /* @__PURE__ */ defineComponent({
1471
1517
  right: {},
1472
1518
  width: {},
1473
1519
  height: {},
1474
- zIndex: { default: 100 }
1520
+ zIndex: { default: 100 },
1521
+ inset: {},
1522
+ size: {}
1475
1523
  },
1476
1524
  setup(t) {
1477
1525
  let i = usePositionStyle(t, "fixed");
@@ -2509,7 +2557,9 @@ var Positioned_default = /* @__PURE__ */ defineComponent({
2509
2557
  right: {},
2510
2558
  width: {},
2511
2559
  height: {},
2512
- zIndex: {}
2560
+ zIndex: {},
2561
+ inset: {},
2562
+ size: {}
2513
2563
  },
2514
2564
  setup(t) {
2515
2565
  let i = t, a = useStackContext();
@@ -2690,7 +2740,9 @@ var Positioned_default = /* @__PURE__ */ defineComponent({
2690
2740
  right: {},
2691
2741
  width: {},
2692
2742
  height: {},
2693
- zIndex: { default: 10 }
2743
+ zIndex: { default: 10 },
2744
+ inset: {},
2745
+ size: {}
2694
2746
  },
2695
2747
  setup(t) {
2696
2748
  let i = usePositionStyle(t, "sticky");
@@ -3152,7 +3204,19 @@ const Icons = {
3152
3204
  starHalf: "M19.65 9.04l-4.84-.42-1.89-4.45c-.34-.81-1.5-.81-1.84 0L9.19 8.63l-4.83.41c-.88.07-1.24 1.17-.57 1.75l3.67 3.18-1.1 4.72c-.2.86.73 1.54 1.49 1.08l4.15-2.5 4.15 2.51c.76.46 1.69-.22 1.49-1.08l-1.1-4.73 3.68-3.18c.67-.58.32-1.68-.56-1.75zM12 15.4V6.1l1.71 4.01 4.38.38-3.32 2.88 1 4.28L12 15.4z",
3153
3205
  monitor: "M20 3H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h3l-1 1v2h12v-2l-1-1h3c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 13H4V5h16v11z",
3154
3206
  warning: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z",
3155
- videoPlay: "M8 5v14l11-7z"
3207
+ videoPlay: "M8 5v14l11-7z",
3208
+ videoPause: "M6 19h4V5H6v14zm8-14v14h4V5h-4z",
3209
+ poweroff: "M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13",
3210
+ signout: "M14,17V14H7V10H14V7L19,12L14,17M4,19H10V21H4A2,2 0 0,1 2,19V5A2,2 0 0,1 4,3H10V5H4V19Z",
3211
+ chevronLeft: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",
3212
+ chevronRight: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",
3213
+ copy: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",
3214
+ location: "M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z",
3215
+ camera: "M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z",
3216
+ mail: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z",
3217
+ lock: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z",
3218
+ download: "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z",
3219
+ upload: "M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"
3156
3220
  };
3157
3221
  var Toast_default = /* @__PURE__ */ defineComponent({
3158
3222
  __name: "Toast",
@@ -4511,6 +4575,8 @@ var Radio_default = /* @__PURE__ */ defineComponent({
4511
4575
  actionsAlignment: { default: MainAxisAlignment.end },
4512
4576
  titleAlignment: {},
4513
4577
  padding: {},
4578
+ contentStyle: {},
4579
+ contentColor: {},
4514
4580
  titleStyle: {},
4515
4581
  titleColor: {},
4516
4582
  titleFontSize: {},
@@ -4569,14 +4635,14 @@ var Radio_default = /* @__PURE__ */ defineComponent({
4569
4635
  fontSize: a.titleFontSize || 20,
4570
4636
  fontWeight: FontWeight.bold,
4571
4637
  color: a.titleColor || "rgba(0,0,0,0.87)"
4572
- }, a.titleStyle))), S = computed(() => d.value ? TextStyle({
4638
+ }, a.titleStyle))), S = computed(() => d.value ? TextStyle(Object.assign({
4573
4639
  fontSize: 13,
4574
4640
  color: "#000000",
4575
4641
  fontFamily: "-apple-system, BlinkMacSystemFont, sans-serif"
4576
- }) : TextStyle({
4642
+ }, a.contentStyle)) : TextStyle(Object.assign({
4577
4643
  fontSize: 16,
4578
- color: "rgba(0,0,0,0.6)"
4579
- })), C = computed(() => BoxDecoration({ border: Border.only({ top: {
4644
+ color: a.contentColor || "rgba(0,0,0,0.6)"
4645
+ }, a.contentStyle))), C = computed(() => BoxDecoration({ border: Border.only({ top: {
4580
4646
  color: "rgba(60, 60, 67, 0.29)",
4581
4647
  width: .5,
4582
4648
  style: "solid"
@@ -1,4 +1,5 @@
1
1
  import { CSSProperties } from 'vue';
2
+ import { SizeType } from './Size';
2
3
  export interface Props {
3
4
  /** 距离顶部的距离 */
4
5
  top?: number | string;
@@ -12,7 +13,10 @@ export interface Props {
12
13
  width?: number | string;
13
14
  /** 高度 */
14
15
  height?: number | string;
15
- /** z-index 层级 */
16
- zIndex?: number;
16
+ /** z-index 层级 (如果不传会自动计算) */
17
+ zIndex?: number | string;
18
+ /** 距离四周的距离 */
19
+ inset?: number | string;
20
+ size?: SizeType;
17
21
  }
18
22
  export declare function usePositionStyle(props: Props, 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.6.3",
3
+ "version": "2.6.5",
4
4
  "description": "A Flutter-style Layout UI kit for Vue",
5
5
  "homepage": "https://fi2zz.github.io/fluekit/",
6
6
  "repository": {