fluekit 1.5.5 → 1.5.6
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/SegmentedControl.d.ts +9 -1
- package/dist/index.js +14 -9
- package/package.json +6 -6
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BoxDecoration } from './BoxDecoration';
|
|
1
2
|
import { EdgeInsets } from './EdgeInsets';
|
|
2
3
|
export interface SegmentedControlItem<T> {
|
|
3
4
|
value: T;
|
|
@@ -10,6 +11,7 @@ export interface SegmentedControlProps<T> {
|
|
|
10
11
|
unselectedColor?: string;
|
|
11
12
|
borderColor?: string;
|
|
12
13
|
padding?: EdgeInsets;
|
|
14
|
+
decoration?: BoxDecoration;
|
|
13
15
|
}
|
|
14
16
|
declare const _default: <T extends string | number | boolean>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
15
17
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
@@ -18,7 +20,13 @@ declare const _default: <T extends string | number | boolean>(__VLS_props: NonNu
|
|
|
18
20
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onChange" | "onUpdate:modelValue"> & SegmentedControlProps<T> & Partial<{}>> & import('vue').PublicProps;
|
|
19
21
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
20
22
|
attrs: any;
|
|
21
|
-
slots: {
|
|
23
|
+
slots: {
|
|
24
|
+
label?(_: {
|
|
25
|
+
item: SegmentedControlItem<T>;
|
|
26
|
+
selected: boolean;
|
|
27
|
+
index: number;
|
|
28
|
+
}): any;
|
|
29
|
+
};
|
|
22
30
|
emit: {
|
|
23
31
|
(e: "update:modelValue", value: T): void;
|
|
24
32
|
(e: "change", value: T): void;
|
package/dist/index.js
CHANGED
|
@@ -2877,13 +2877,14 @@ var Transform_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @_
|
|
|
2877
2877
|
padding: { default: () => EdgeInsets.symmetric({
|
|
2878
2878
|
vertical: 8,
|
|
2879
2879
|
horizontal: 16
|
|
2880
|
-
}) }
|
|
2880
|
+
}) },
|
|
2881
|
+
decoration: {}
|
|
2881
2882
|
},
|
|
2882
2883
|
emits: ["update:modelValue", "change"],
|
|
2883
2884
|
setup(e, { emit: w }) {
|
|
2884
2885
|
let T = e, O = w, A = (e) => {
|
|
2885
2886
|
e !== T.modelValue && (O("update:modelValue", e), O("change", e));
|
|
2886
|
-
}, j = computed(() => BoxDecoration({
|
|
2887
|
+
}, j = computed(() => T.decoration ? T.decoration : BoxDecoration({
|
|
2887
2888
|
border: Border.all({
|
|
2888
2889
|
color: T.borderColor,
|
|
2889
2890
|
width: 1
|
|
@@ -2907,26 +2908,30 @@ var Transform_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @_
|
|
|
2907
2908
|
"clip-behavior": "hardEdge"
|
|
2908
2909
|
}, {
|
|
2909
2910
|
default: withCtx(() => [createVNode(Row_default, null, {
|
|
2910
|
-
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.items, (C,
|
|
2911
|
-
key:
|
|
2911
|
+
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.items, (C, T) => (openBlock(), createBlock(GestureDetector_default, {
|
|
2912
|
+
key: T,
|
|
2912
2913
|
onTap: (e) => A(C.value)
|
|
2913
2914
|
}, {
|
|
2914
2915
|
default: withCtx(() => [createVNode(Container_default, {
|
|
2915
2916
|
padding: e.padding,
|
|
2916
|
-
decoration: P(C.value,
|
|
2917
|
+
decoration: P(C.value, T),
|
|
2917
2918
|
alignment: "center"
|
|
2918
2919
|
}, {
|
|
2919
|
-
default: withCtx(() => [
|
|
2920
|
+
default: withCtx(() => [renderSlot(w.$slots, "label", {
|
|
2921
|
+
item: C,
|
|
2922
|
+
selected: C.value === e.modelValue,
|
|
2923
|
+
index: T
|
|
2924
|
+
}, () => [createVNode(Text_default, { style: normalizeStyle(F(C.value)) }, {
|
|
2920
2925
|
default: withCtx(() => [createTextVNode(toDisplayString(C.label), 1)]),
|
|
2921
2926
|
_: 2
|
|
2922
|
-
}, 1032, ["style"])]),
|
|
2927
|
+
}, 1032, ["style"])])]),
|
|
2923
2928
|
_: 2
|
|
2924
2929
|
}, 1032, ["padding", "decoration"])]),
|
|
2925
2930
|
_: 2
|
|
2926
2931
|
}, 1032, ["onTap"]))), 128))]),
|
|
2927
|
-
_:
|
|
2932
|
+
_: 3
|
|
2928
2933
|
})]),
|
|
2929
|
-
_:
|
|
2934
|
+
_: 3
|
|
2930
2935
|
}, 8, ["decoration"]));
|
|
2931
2936
|
}
|
|
2932
2937
|
}), _hoisted_1 = { class: "snackbar-overlay" }, SnackBarComponent_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fluekit",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.6",
|
|
4
4
|
"description": "A Flutter-style Layout UI kit for Vue",
|
|
5
5
|
"homepage": "https://fi2zz.github.io/fluekit/",
|
|
6
6
|
"repository": {
|
|
@@ -20,10 +20,6 @@
|
|
|
20
20
|
"files": [
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
|
-
"scripts": {
|
|
24
|
-
"build": "vite build",
|
|
25
|
-
"test": "vitest"
|
|
26
|
-
},
|
|
27
23
|
"peerDependencies": {
|
|
28
24
|
"vue": "^3.5.0"
|
|
29
25
|
},
|
|
@@ -37,5 +33,9 @@
|
|
|
37
33
|
"vite-plugin-dts": "^4.5.4",
|
|
38
34
|
"vitest": "^4.0.16",
|
|
39
35
|
"vue-tsc": "^3.1.4"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "vite build",
|
|
39
|
+
"test": "vitest"
|
|
40
40
|
}
|
|
41
|
-
}
|
|
41
|
+
}
|