@unsource/ui 1.0.1 → 1.1.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/module.json +1 -1
- package/dist/module.mjs +3 -1
- package/dist/runtime/components/Un/Button.d.vue.ts +15 -0
- package/dist/runtime/components/Un/Button.vue +52 -0
- package/dist/runtime/components/Un/Button.vue.d.ts +15 -0
- package/dist/runtime/components/Un/Card.d.vue.ts +21 -0
- package/dist/runtime/components/Un/Card.vue +55 -0
- package/dist/runtime/components/Un/Card.vue.d.ts +21 -0
- package/dist/runtime/components/Un/Chart.d.vue.ts +18 -0
- package/dist/runtime/components/Un/Chart.vue +149 -0
- package/dist/runtime/components/Un/Chart.vue.d.ts +18 -0
- package/dist/runtime/components/Un/Checkbox.d.vue.ts +15 -0
- package/dist/runtime/components/Un/Checkbox.vue +40 -0
- package/dist/runtime/components/Un/Checkbox.vue.d.ts +15 -0
- package/dist/runtime/components/Un/CodeInput.d.vue.ts +6 -0
- package/dist/runtime/components/Un/CodeInput.vue +31 -0
- package/dist/runtime/components/Un/CodeInput.vue.d.ts +6 -0
- package/dist/runtime/components/Un/DiscountCode.d.vue.ts +15 -0
- package/dist/runtime/components/Un/DiscountCode.vue +29 -0
- package/dist/runtime/components/Un/DiscountCode.vue.d.ts +15 -0
- package/dist/runtime/components/Un/Dropdown.d.vue.ts +33 -0
- package/dist/runtime/components/Un/Dropdown.vue +82 -0
- package/dist/runtime/components/Un/Dropdown.vue.d.ts +33 -0
- package/dist/runtime/components/Un/DropdownModal.d.vue.ts +17 -0
- package/dist/runtime/components/Un/DropdownModal.vue +29 -0
- package/dist/runtime/components/Un/DropdownModal.vue.d.ts +17 -0
- package/dist/runtime/components/Un/EmptyData.d.vue.ts +6 -0
- package/dist/runtime/components/Un/EmptyData.vue +13 -0
- package/dist/runtime/components/Un/EmptyData.vue.d.ts +6 -0
- package/dist/runtime/components/Un/IRDatePicker.d.vue.ts +15 -0
- package/dist/runtime/components/Un/IRDatePicker.vue +85 -0
- package/dist/runtime/components/Un/IRDatePicker.vue.d.ts +15 -0
- package/dist/runtime/components/Un/Input.d.vue.ts +51 -0
- package/dist/runtime/components/Un/Input.vue +55 -0
- package/dist/runtime/components/Un/Input.vue.d.ts +51 -0
- package/dist/runtime/components/Un/Label.d.vue.ts +16 -0
- package/dist/runtime/components/Un/Label.vue +19 -0
- package/dist/runtime/components/Un/Label.vue.d.ts +16 -0
- package/dist/runtime/components/Un/Log.d.vue.ts +11 -0
- package/dist/runtime/components/Un/Log.vue +28 -0
- package/dist/runtime/components/Un/Log.vue.d.ts +11 -0
- package/dist/runtime/components/Un/Map.d.vue.ts +17 -0
- package/dist/runtime/components/Un/Map.vue +153 -0
- package/dist/runtime/components/Un/Map.vue.d.ts +17 -0
- package/dist/runtime/components/Un/MultiUploader.d.vue.ts +20 -0
- package/dist/runtime/components/Un/MultiUploader.vue +126 -0
- package/dist/runtime/components/Un/MultiUploader.vue.d.ts +20 -0
- package/dist/runtime/components/Un/NewPWA.d.vue.ts +3 -0
- package/dist/runtime/components/Un/NewPWA.vue +40 -0
- package/dist/runtime/components/Un/NewPWA.vue.d.ts +3 -0
- package/dist/runtime/components/Un/NumberInput.d.vue.ts +16 -0
- package/dist/runtime/components/Un/NumberInput.vue +36 -0
- package/dist/runtime/components/Un/NumberInput.vue.d.ts +16 -0
- package/dist/runtime/components/Un/NuxtIcon.d.vue.ts +9 -0
- package/dist/runtime/components/Un/NuxtIcon.vue +29 -0
- package/dist/runtime/components/Un/NuxtIcon.vue.d.ts +9 -0
- package/dist/runtime/components/Un/PWA.d.vue.ts +3 -0
- package/dist/runtime/components/Un/PWA.vue +17 -0
- package/dist/runtime/components/Un/PWA.vue.d.ts +3 -0
- package/dist/runtime/components/Un/QRCode.d.vue.ts +6 -0
- package/dist/runtime/components/Un/QRCode.vue +10 -0
- package/dist/runtime/components/Un/QRCode.vue.d.ts +6 -0
- package/dist/runtime/components/Un/Range.d.vue.ts +13 -0
- package/dist/runtime/components/Un/Range.vue +56 -0
- package/dist/runtime/components/Un/Range.vue.d.ts +13 -0
- package/dist/runtime/components/Un/Rate.d.vue.ts +10 -0
- package/dist/runtime/components/Un/Rate.vue +9 -0
- package/dist/runtime/components/Un/Rate.vue.d.ts +10 -0
- package/dist/runtime/components/Un/Search.d.vue.ts +21 -0
- package/dist/runtime/components/Un/Search.vue +28 -0
- package/dist/runtime/components/Un/Search.vue.d.ts +21 -0
- package/dist/runtime/components/Un/Searchbar.d.vue.ts +13 -0
- package/dist/runtime/components/Un/Searchbar.vue +35 -0
- package/dist/runtime/components/Un/Searchbar.vue.d.ts +13 -0
- package/dist/runtime/components/Un/Slider.d.vue.ts +9 -0
- package/dist/runtime/components/Un/Slider.vue +18 -0
- package/dist/runtime/components/Un/Slider.vue.d.ts +9 -0
- package/dist/runtime/components/Un/Tab.d.vue.ts +15 -0
- package/dist/runtime/components/Un/Tab.vue +47 -0
- package/dist/runtime/components/Un/Tab.vue.d.ts +15 -0
- package/dist/runtime/components/Un/TableCard.d.vue.ts +22 -0
- package/dist/runtime/components/Un/TableCard.vue +46 -0
- package/dist/runtime/components/Un/TableCard.vue.d.ts +22 -0
- package/dist/runtime/components/Un/TextIcon.d.vue.ts +3 -0
- package/dist/runtime/components/Un/TextIcon.vue +10 -0
- package/dist/runtime/components/Un/TextIcon.vue.d.ts +3 -0
- package/dist/runtime/components/Un/Timer.d.vue.ts +23 -0
- package/dist/runtime/components/Un/Timer.vue +29 -0
- package/dist/runtime/components/Un/Timer.vue.d.ts +23 -0
- package/dist/runtime/components/Un/Toggle/Button.d.vue.ts +11 -0
- package/dist/runtime/components/Un/Toggle/Button.vue +22 -0
- package/dist/runtime/components/Un/Toggle/Button.vue.d.ts +11 -0
- package/dist/runtime/components/Un/Toggle/index.d.vue.ts +11 -0
- package/dist/runtime/components/Un/Toggle/index.vue +22 -0
- package/dist/runtime/components/Un/Toggle/index.vue.d.ts +11 -0
- package/dist/runtime/components/Un/UploadFile.d.vue.ts +24 -0
- package/dist/runtime/components/Un/UploadFile.vue +83 -0
- package/dist/runtime/components/Un/UploadFile.vue.d.ts +24 -0
- package/dist/runtime/components/UnCard.d.vue.ts +28 -5
- package/dist/runtime/components/UnCard.vue +56 -22
- package/dist/runtime/components/UnCard.vue.d.ts +28 -5
- package/dist/runtime/components/UnChips.vue +1 -0
- package/dist/runtime/components/UnNuxtIcon.vue +1 -1
- package/dist/runtime/components/UnSwiperControl.d.vue.ts +8 -0
- package/dist/runtime/components/UnSwiperControl.vue +15 -0
- package/dist/runtime/components/UnSwiperControl.vue.d.ts +8 -0
- package/dist/runtime/components/UnSwiperSlider.d.vue.ts +26 -0
- package/dist/runtime/components/UnSwiperSlider.vue +82 -0
- package/dist/runtime/components/UnSwiperSlider.vue.d.ts +26 -0
- package/package.json +6 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_ModelProps = {
|
|
2
|
+
modelValue?: number;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
"update:modelValue": (value: number | undefined) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
7
|
+
"onUpdate:modelValue"?: ((value: number | undefined) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex gap-2 items-center" dir="ltr">
|
|
3
|
+
<TheNuxtIcon name="solar:star-bold-duotone" :class="value >= n ? 'text-primary-500' : 'text-gray-500'" v-for="n in 5" @click="value = n" />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup>
|
|
8
|
+
const value = defineModel({ type: Number });
|
|
9
|
+
</script>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_ModelProps = {
|
|
2
|
+
modelValue?: number;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
"update:modelValue": (value: number | undefined) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
7
|
+
"onUpdate:modelValue"?: ((value: number | undefined) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
placeholder: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: import("vue").PropType<any>;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
placeholder: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
modelValue: {
|
|
15
|
+
type: import("vue").PropType<any>;
|
|
16
|
+
};
|
|
17
|
+
}>> & Readonly<{}>, {
|
|
18
|
+
placeholder: string;
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<form
|
|
3
|
+
class="h-10 rounded-2xl flex flex-row gap-1 items-center p-1 relative select-none"
|
|
4
|
+
@submit.prevent="emit('submit')">
|
|
5
|
+
<input
|
|
6
|
+
class="outline-none bg-transparent flex-grow text-base px2"
|
|
7
|
+
v-model="value"
|
|
8
|
+
:placeholder="placeholder"/>
|
|
9
|
+
<div
|
|
10
|
+
class="flex items-center justify-center svg:(w-6 h-6)"
|
|
11
|
+
@click="emit('submit')">
|
|
12
|
+
<TheNuxtIcon icon-type="svg" name="search-normal"/>
|
|
13
|
+
</div>
|
|
14
|
+
</form>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script setup>
|
|
18
|
+
const emit = defineEmits(["submit", "input"]);
|
|
19
|
+
defineProps(
|
|
20
|
+
{
|
|
21
|
+
placeholder: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "\u0639\u0646\u0648\u0627\u0646..."
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
const value = defineModel();
|
|
28
|
+
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
placeholder: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: import("vue").PropType<any>;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
placeholder: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
modelValue: {
|
|
15
|
+
type: import("vue").PropType<any>;
|
|
16
|
+
};
|
|
17
|
+
}>> & Readonly<{}>, {
|
|
18
|
+
placeholder: string;
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
placeholder: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
inputMode?: string;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_ModelProps = {
|
|
8
|
+
modelValue?: string;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex justify-center items-center px-3 py-2 gap-2 rounded-2xl bg-white relative">
|
|
3
|
+
<input dir="rtl"
|
|
4
|
+
@keyup.enter="$emit('search')"
|
|
5
|
+
v-model="value"
|
|
6
|
+
:type="inputMode"
|
|
7
|
+
class="search flex-grow bg-transparent placeholder-gray-600 text-xs" :disabled="disabled"
|
|
8
|
+
:placeholder="' '"/>
|
|
9
|
+
<p class="flex gap-1 items-center absolute right-3 top-1/2 transform -translate-y-1/2 text-xs pointer-events-none">
|
|
10
|
+
{{placeholder}} <b class="text-primary-500">{{title}}</b>
|
|
11
|
+
</p>
|
|
12
|
+
<TheNuxtIcon name="solar:rounded-magnifer-line-duotone" @click="$emit('search')"/>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup>
|
|
17
|
+
defineProps({
|
|
18
|
+
placeholder: { type: String, required: true },
|
|
19
|
+
title: { type: String, required: false },
|
|
20
|
+
disabled: { type: Boolean, required: false },
|
|
21
|
+
inputMode: { type: String, required: false }
|
|
22
|
+
});
|
|
23
|
+
defineEmits(["search"]);
|
|
24
|
+
const value = defineModel({ type: String });
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<style>
|
|
28
|
+
.search + p {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.search:placeholder-shown + p {
|
|
33
|
+
display: flex;
|
|
34
|
+
}
|
|
35
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
placeholder: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
inputMode?: string;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_ModelProps = {
|
|
8
|
+
modelValue?: string;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
4
|
+
$props: Partial<typeof __VLS_props>;
|
|
5
|
+
slider?: unknown[] | undefined;
|
|
6
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
|
+
declare const __VLS_props: {
|
|
8
|
+
readonly slider?: unknown[] | undefined;
|
|
9
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-2">
|
|
3
|
+
<TheNuxtIcon name="Content.png" icon-type="img" class="!w-full !h-auto b-rd-2"/>
|
|
4
|
+
<div class="flex gap-1 self-center">
|
|
5
|
+
<TheNuxtIcon name="Ellipse7" icon-type="svg" class="c-primary-500 w-2"/>
|
|
6
|
+
<TheNuxtIcon name="Ellipse7" icon-type="svg" class="c-gray-200 w-2"/>
|
|
7
|
+
<TheNuxtIcon name="Ellipse7" icon-type="svg" class="c-gray-200 w-2"/>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
defineProps({
|
|
14
|
+
slider: {
|
|
15
|
+
type: Array
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
</script>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
4
|
+
$props: Partial<typeof __VLS_props>;
|
|
5
|
+
slider?: unknown[] | undefined;
|
|
6
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
|
+
declare const __VLS_props: {
|
|
8
|
+
readonly slider?: unknown[] | undefined;
|
|
9
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
4
|
+
$props: Partial<typeof props>;
|
|
5
|
+
mini: boolean;
|
|
6
|
+
items: unknown[];
|
|
7
|
+
routable: boolean;
|
|
8
|
+
label?: string | undefined;
|
|
9
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
declare const props: {
|
|
11
|
+
readonly mini: boolean;
|
|
12
|
+
readonly items: unknown[];
|
|
13
|
+
readonly routable: boolean;
|
|
14
|
+
readonly label?: string | undefined;
|
|
15
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex items-stretch text-(base gray-600) font-semibold bg-transparent p-1 h-13">
|
|
3
|
+
<label v-for="item in items"
|
|
4
|
+
:class="[[item?.value === ( value ) ? 'text-primary-500 cursor-default border-primary-500 border-2' : 'border-1 border-gray-400' ] , [mini ? 'px-3' : ' px-4']]"
|
|
5
|
+
class="flex justify-center items-center flex-grow basis-1 border-b-(solid) cursor-pointer p-3 text-sm"
|
|
6
|
+
@click="addToQuery(item.key , item.value)">
|
|
7
|
+
<input v-model="value" type="radio" :value="item.value" hidden>
|
|
8
|
+
<span class="whitespace-nowrap">
|
|
9
|
+
{{ item.label }}
|
|
10
|
+
</span>
|
|
11
|
+
</label>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup>
|
|
16
|
+
const props = defineProps({
|
|
17
|
+
items: {
|
|
18
|
+
type: Array,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
mini: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false
|
|
24
|
+
},
|
|
25
|
+
routable: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true
|
|
28
|
+
},
|
|
29
|
+
label: {
|
|
30
|
+
type: String
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
const value = defineModel();
|
|
34
|
+
const route = useRoute();
|
|
35
|
+
const router = useRouter();
|
|
36
|
+
const addToQuery = (key, v) => {
|
|
37
|
+
value.value = v;
|
|
38
|
+
if (props.routable) {
|
|
39
|
+
router.replace({
|
|
40
|
+
query: {
|
|
41
|
+
...route.query,
|
|
42
|
+
[props.label]: v
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
4
|
+
$props: Partial<typeof props>;
|
|
5
|
+
mini: boolean;
|
|
6
|
+
items: unknown[];
|
|
7
|
+
routable: boolean;
|
|
8
|
+
label?: string | undefined;
|
|
9
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
declare const props: {
|
|
11
|
+
readonly mini: boolean;
|
|
12
|
+
readonly items: unknown[];
|
|
13
|
+
readonly routable: boolean;
|
|
14
|
+
readonly label?: string | undefined;
|
|
15
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
4
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
|
+
$slots: S;
|
|
6
|
+
});
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {
|
|
8
|
+
$props: Partial<typeof __VLS_props>;
|
|
9
|
+
items: unknown[];
|
|
10
|
+
cols: unknown[];
|
|
11
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
type __VLS_Slots = {
|
|
13
|
+
[x: string]: ((props: {
|
|
14
|
+
col: any;
|
|
15
|
+
item: any;
|
|
16
|
+
items: any;
|
|
17
|
+
}) => any) | undefined;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_props: {
|
|
20
|
+
readonly items: unknown[];
|
|
21
|
+
readonly cols: unknown[];
|
|
22
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col children:(p-4)">
|
|
3
|
+
<table class="flex-grow">
|
|
4
|
+
<thead>
|
|
5
|
+
<tr class="border-b-2 border-gray-100 children:(text-center p-4) rounded-2xl <md:children:p-1">
|
|
6
|
+
<th v-for="col in cols"
|
|
7
|
+
:class="{'<md:hidden':col.isDesktop,'hidden <md:table-cell':col.isMobile}"
|
|
8
|
+
class="text-xs text-gray-400 font-medium first:text-right last:text-left">
|
|
9
|
+
{{ col.title }}
|
|
10
|
+
</th>
|
|
11
|
+
</tr>
|
|
12
|
+
</thead>
|
|
13
|
+
<tbody >
|
|
14
|
+
<tr v-for="item in items"
|
|
15
|
+
@click="$emit('click:row',item)"
|
|
16
|
+
class="children:p-3 <md:children:p-1 text-center children:(border-b border-gray-100) hover:children:(bg-gray-100)">
|
|
17
|
+
<td v-for="col in cols"
|
|
18
|
+
class="text-gray-400 text-sm first:text-right last:text-left text-center first:rounded-r-lg last:rounded-l-lg"
|
|
19
|
+
:class="[col.class,{'<md:hidden':col.isDesktop,'hidden <md:table-cell':col.isMobile}]" :dir="col.dir">
|
|
20
|
+
<slot :name="col.name" :col="col" :item="item" :items="_at(item,col.key)">
|
|
21
|
+
{{ _at(item, col.key).join(' ') }}
|
|
22
|
+
</slot>
|
|
23
|
+
</td>
|
|
24
|
+
</tr>
|
|
25
|
+
</tbody>
|
|
26
|
+
</table>
|
|
27
|
+
<div v-if="!items.length" class="flex justify-center items-center p-24 font-bold text-sm text-text">
|
|
28
|
+
{{ $t('هیچ موردی برای این جستجو یافت نشد') }}
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script setup>
|
|
35
|
+
defineProps({
|
|
36
|
+
cols: {
|
|
37
|
+
type: Array,
|
|
38
|
+
default: () => []
|
|
39
|
+
},
|
|
40
|
+
items: {
|
|
41
|
+
type: Array,
|
|
42
|
+
default: () => []
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
const { isDesktop, isMobile } = useDevice();
|
|
46
|
+
</script>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
4
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
|
+
$slots: S;
|
|
6
|
+
});
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {
|
|
8
|
+
$props: Partial<typeof __VLS_props>;
|
|
9
|
+
items: unknown[];
|
|
10
|
+
cols: unknown[];
|
|
11
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
type __VLS_Slots = {
|
|
13
|
+
[x: string]: ((props: {
|
|
14
|
+
col: any;
|
|
15
|
+
item: any;
|
|
16
|
+
items: any;
|
|
17
|
+
}) => any) | undefined;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_props: {
|
|
20
|
+
readonly items: unknown[];
|
|
21
|
+
readonly cols: unknown[];
|
|
22
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
time: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
};
|
|
5
|
+
modelValue: {
|
|
6
|
+
type: import("vue").PropType<any>;
|
|
7
|
+
};
|
|
8
|
+
}>, {
|
|
9
|
+
timestamp: any;
|
|
10
|
+
pause: any;
|
|
11
|
+
resume: any;
|
|
12
|
+
diff: any;
|
|
13
|
+
isExpired: any;
|
|
14
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
time: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
18
|
+
modelValue: {
|
|
19
|
+
type: import("vue").PropType<any>;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<time dir="ltr" class="text-center font-black text-base text-primary-500 ">
|
|
3
|
+
{{diff > d ? Math.floor(diff / d) + ":" : ""}}
|
|
4
|
+
{{diff > h ? Math.floor(diff % d / h) + ":" : ""}}
|
|
5
|
+
{{diff > m ? Math.floor(diff % h / m) + ":" : ""}}
|
|
6
|
+
{{Math.floor(diff % m)}}
|
|
7
|
+
</time>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup>
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
time: {
|
|
13
|
+
type: String
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
const m = 60;
|
|
17
|
+
const h = 60 * m;
|
|
18
|
+
const d = 24 * h;
|
|
19
|
+
const emit = defineEmits(["complete"]);
|
|
20
|
+
const value = defineModel();
|
|
21
|
+
const { timestamp, pause, resume } = useTimestamp({ controls: true, interval: 330 });
|
|
22
|
+
const diff = computed(() => (moment(props.time).valueOf() - timestamp.value) / 1e3);
|
|
23
|
+
const isExpired = computed(() => diff.value <= 0);
|
|
24
|
+
value.value = isExpired.value;
|
|
25
|
+
watch(isExpired, () => {
|
|
26
|
+
value.value = isExpired.value;
|
|
27
|
+
});
|
|
28
|
+
defineExpose({ timestamp, pause, resume, diff, isExpired });
|
|
29
|
+
</script>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
time: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
};
|
|
5
|
+
modelValue: {
|
|
6
|
+
type: import("vue").PropType<any>;
|
|
7
|
+
};
|
|
8
|
+
}>, {
|
|
9
|
+
timestamp: any;
|
|
10
|
+
pause: any;
|
|
11
|
+
resume: any;
|
|
12
|
+
diff: any;
|
|
13
|
+
isExpired: any;
|
|
14
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
time: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
18
|
+
modelValue: {
|
|
19
|
+
type: import("vue").PropType<any>;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
4
|
+
$props: Partial<typeof __VLS_props>;
|
|
5
|
+
value: number | boolean;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
declare const __VLS_props: {
|
|
9
|
+
readonly value: number | boolean;
|
|
10
|
+
readonly disabled: boolean;
|
|
11
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="w-9 h-5 relative flex items-center rounded-full transition-bg duration-200"
|
|
4
|
+
:class="[value && !disabled ? 'bg-primary-500' : 'bg-border']">
|
|
5
|
+
<div
|
|
6
|
+
class="absolute bg-white h-4 w-4 rounded-1/2 shadow-toggle transform transition-all duration-200"
|
|
7
|
+
:class="[ value ? 'left-full -translate-x-18px ' : 'left-0 translate-x-0.5',]"/>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
defineProps({
|
|
13
|
+
value: {
|
|
14
|
+
type: [Boolean, Number],
|
|
15
|
+
default: false
|
|
16
|
+
},
|
|
17
|
+
disabled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
4
|
+
$props: Partial<typeof __VLS_props>;
|
|
5
|
+
value: number | boolean;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
declare const __VLS_props: {
|
|
9
|
+
readonly value: number | boolean;
|
|
10
|
+
readonly disabled: boolean;
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label: string;
|
|
3
|
+
disabled: boolean;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_ModelProps = {
|
|
6
|
+
modelValue?: any;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="h-12 w-full flex flex-row gap-1 items-center cursor-pointer text-black-1 select-none"
|
|
4
|
+
@click="!disabled && changeValue()">
|
|
5
|
+
<div class="flex-grow truncate text-sm">
|
|
6
|
+
{{ label }}
|
|
7
|
+
</div>
|
|
8
|
+
<TheToggleButton :value="value" :disabled="disabled"/>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
const emit = defineEmits(["input"]);
|
|
14
|
+
defineProps({
|
|
15
|
+
label: { type: String, required: true },
|
|
16
|
+
disabled: { type: Boolean, required: true }
|
|
17
|
+
});
|
|
18
|
+
const value = defineModel();
|
|
19
|
+
const changeValue = () => {
|
|
20
|
+
value.value = !value.value;
|
|
21
|
+
};
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label: string;
|
|
3
|
+
disabled: boolean;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_ModelProps = {
|
|
6
|
+
modelValue?: any;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
4
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
|
+
$slots: S;
|
|
6
|
+
});
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {
|
|
8
|
+
$props: Partial<typeof props>;
|
|
9
|
+
label: string;
|
|
10
|
+
icon: string;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
accept: string;
|
|
13
|
+
edit: boolean;
|
|
14
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
type __VLS_Slots = {
|
|
16
|
+
icon?: ((props: {}) => any) | undefined;
|
|
17
|
+
};
|
|
18
|
+
declare const props: {
|
|
19
|
+
readonly label: string;
|
|
20
|
+
readonly icon: string;
|
|
21
|
+
readonly disabled: boolean;
|
|
22
|
+
readonly accept: string;
|
|
23
|
+
readonly edit: boolean;
|
|
24
|
+
};
|