@unsource/ui 1.9.9 → 1.9.11
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/runtime/components/UnCheckboxItem.vue +1 -1
- package/dist/runtime/components/UnRadioItem.vue +1 -1
- package/package.json +1 -1
- package/dist/runtime/components/The/Button.d.vue.ts +0 -15
- package/dist/runtime/components/The/Button.vue +0 -52
- package/dist/runtime/components/The/Button.vue.d.ts +0 -15
- package/dist/runtime/components/The/Card.d.vue.ts +0 -21
- package/dist/runtime/components/The/Card.vue +0 -55
- package/dist/runtime/components/The/Card.vue.d.ts +0 -21
- package/dist/runtime/components/The/Chart.d.vue.ts +0 -18
- package/dist/runtime/components/The/Chart.vue +0 -149
- package/dist/runtime/components/The/Chart.vue.d.ts +0 -18
- package/dist/runtime/components/The/Checkbox.d.vue.ts +0 -15
- package/dist/runtime/components/The/Checkbox.vue +0 -40
- package/dist/runtime/components/The/Checkbox.vue.d.ts +0 -15
- package/dist/runtime/components/The/CodeInput.d.vue.ts +0 -6
- package/dist/runtime/components/The/CodeInput.vue +0 -31
- package/dist/runtime/components/The/CodeInput.vue.d.ts +0 -6
- package/dist/runtime/components/The/DiscountCode.d.vue.ts +0 -15
- package/dist/runtime/components/The/DiscountCode.vue +0 -29
- package/dist/runtime/components/The/DiscountCode.vue.d.ts +0 -15
- package/dist/runtime/components/The/Dropdown.d.vue.ts +0 -33
- package/dist/runtime/components/The/Dropdown.vue +0 -82
- package/dist/runtime/components/The/Dropdown.vue.d.ts +0 -33
- package/dist/runtime/components/The/DropdownModal.d.vue.ts +0 -17
- package/dist/runtime/components/The/DropdownModal.vue +0 -29
- package/dist/runtime/components/The/DropdownModal.vue.d.ts +0 -17
- package/dist/runtime/components/The/EmptyData.d.vue.ts +0 -6
- package/dist/runtime/components/The/EmptyData.vue +0 -13
- package/dist/runtime/components/The/EmptyData.vue.d.ts +0 -6
- package/dist/runtime/components/The/IRDatePicker.d.vue.ts +0 -15
- package/dist/runtime/components/The/IRDatePicker.vue +0 -85
- package/dist/runtime/components/The/IRDatePicker.vue.d.ts +0 -15
- package/dist/runtime/components/The/Input.d.vue.ts +0 -51
- package/dist/runtime/components/The/Input.vue +0 -55
- package/dist/runtime/components/The/Input.vue.d.ts +0 -51
- package/dist/runtime/components/The/Label.d.vue.ts +0 -16
- package/dist/runtime/components/The/Label.vue +0 -19
- package/dist/runtime/components/The/Label.vue.d.ts +0 -16
- package/dist/runtime/components/The/Log.d.vue.ts +0 -11
- package/dist/runtime/components/The/Log.vue +0 -28
- package/dist/runtime/components/The/Log.vue.d.ts +0 -11
- package/dist/runtime/components/The/Map.d.vue.ts +0 -17
- package/dist/runtime/components/The/Map.vue +0 -153
- package/dist/runtime/components/The/Map.vue.d.ts +0 -17
- package/dist/runtime/components/The/MultiUploader.d.vue.ts +0 -20
- package/dist/runtime/components/The/MultiUploader.vue +0 -126
- package/dist/runtime/components/The/MultiUploader.vue.d.ts +0 -20
- package/dist/runtime/components/The/NewPWA.d.vue.ts +0 -3
- package/dist/runtime/components/The/NewPWA.vue +0 -40
- package/dist/runtime/components/The/NewPWA.vue.d.ts +0 -3
- package/dist/runtime/components/The/NumberInput.d.vue.ts +0 -16
- package/dist/runtime/components/The/NumberInput.vue +0 -36
- package/dist/runtime/components/The/NumberInput.vue.d.ts +0 -16
- package/dist/runtime/components/The/NuxtIcon.d.vue.ts +0 -9
- package/dist/runtime/components/The/NuxtIcon.vue +0 -29
- package/dist/runtime/components/The/NuxtIcon.vue.d.ts +0 -9
- package/dist/runtime/components/The/PWA.d.vue.ts +0 -3
- package/dist/runtime/components/The/PWA.vue +0 -17
- package/dist/runtime/components/The/PWA.vue.d.ts +0 -3
- package/dist/runtime/components/The/QRCode.d.vue.ts +0 -6
- package/dist/runtime/components/The/QRCode.vue +0 -10
- package/dist/runtime/components/The/QRCode.vue.d.ts +0 -6
- package/dist/runtime/components/The/Range.d.vue.ts +0 -13
- package/dist/runtime/components/The/Range.vue +0 -56
- package/dist/runtime/components/The/Range.vue.d.ts +0 -13
- package/dist/runtime/components/The/Rate.d.vue.ts +0 -10
- package/dist/runtime/components/The/Rate.vue +0 -9
- package/dist/runtime/components/The/Rate.vue.d.ts +0 -10
- package/dist/runtime/components/The/Search.d.vue.ts +0 -21
- package/dist/runtime/components/The/Search.vue +0 -28
- package/dist/runtime/components/The/Search.vue.d.ts +0 -21
- package/dist/runtime/components/The/Searchbar.d.vue.ts +0 -13
- package/dist/runtime/components/The/Searchbar.vue +0 -35
- package/dist/runtime/components/The/Searchbar.vue.d.ts +0 -13
- package/dist/runtime/components/The/Slider.d.vue.ts +0 -9
- package/dist/runtime/components/The/Slider.vue +0 -18
- package/dist/runtime/components/The/Slider.vue.d.ts +0 -9
- package/dist/runtime/components/The/TableCard.d.vue.ts +0 -22
- package/dist/runtime/components/The/TableCard.vue +0 -46
- package/dist/runtime/components/The/TableCard.vue.d.ts +0 -22
- package/dist/runtime/components/The/TextIcon.d.vue.ts +0 -3
- package/dist/runtime/components/The/TextIcon.vue +0 -10
- package/dist/runtime/components/The/TextIcon.vue.d.ts +0 -3
- package/dist/runtime/components/The/Timer.d.vue.ts +0 -23
- package/dist/runtime/components/The/Timer.vue +0 -29
- package/dist/runtime/components/The/Timer.vue.d.ts +0 -23
- package/dist/runtime/components/The/Toggle/Button.d.vue.ts +0 -11
- package/dist/runtime/components/The/Toggle/Button.vue +0 -22
- package/dist/runtime/components/The/Toggle/Button.vue.d.ts +0 -11
- package/dist/runtime/components/The/Toggle/index.d.vue.ts +0 -11
- package/dist/runtime/components/The/Toggle/index.vue +0 -22
- package/dist/runtime/components/The/Toggle/index.vue.d.ts +0 -11
- package/dist/runtime/components/The/UploadFile.d.vue.ts +0 -24
- package/dist/runtime/components/The/UploadFile.vue +0 -83
- package/dist/runtime/components/The/UploadFile.vue.d.ts +0 -24
package/dist/module.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
/>
|
|
16
16
|
</div>
|
|
17
17
|
<UnCard
|
|
18
|
-
class="!bg-transparent"
|
|
18
|
+
class="!bg-transparent grow-1"
|
|
19
19
|
:class="[customClass.card, customClass[selected ? 'selected' : 'notSelected']?.card]"
|
|
20
20
|
:custom-class="_mergeWith(customClass.item, customClass[selected ? 'selected' : 'notSelected']?.item, merge)"
|
|
21
21
|
:item
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</div>
|
|
17
17
|
<UnCard
|
|
18
18
|
:item="item"
|
|
19
|
-
class="!bg-transparent"
|
|
19
|
+
class="!bg-transparent grow-1"
|
|
20
20
|
:class="[customClass.card, customClass[selected ? 'selected' : 'notSelected']?.card]"
|
|
21
21
|
:custom-class="_mergeWith(customClass.item, customClass[selected ? 'selected' : 'notSelected']?.item, merge)"
|
|
22
22
|
/>
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
icon?: string;
|
|
3
|
-
appendIcon?: string;
|
|
4
|
-
label?: string;
|
|
5
|
-
disable?: boolean;
|
|
6
|
-
size?: 'sm' | 'md' | 'lg';
|
|
7
|
-
mini?: boolean;
|
|
8
|
-
color?: string;
|
|
9
|
-
badge?: number;
|
|
10
|
-
loading?: boolean;
|
|
11
|
-
variant?: string;
|
|
12
|
-
};
|
|
13
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
-
declare const _default: typeof __VLS_export;
|
|
15
|
-
export default _default;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<button
|
|
3
|
-
:disabled="disable"
|
|
4
|
-
class="flex justify-center items-center rounded-2xl gap-2 cursor-pointer relative border-(1 solid)"
|
|
5
|
-
:class="[
|
|
6
|
-
disable ? 'bg-gray-100 cursor-not-allowed' : classVariant,
|
|
7
|
-
mini || size === 'sm' ? 'px-4 py-1.5' : size === 'md' ? 'py-2.5 px-7' : 'py-3.5 px-10 '
|
|
8
|
-
]">
|
|
9
|
-
<TheNuxtIcon
|
|
10
|
-
v-show="loading"
|
|
11
|
-
name="loading"
|
|
12
|
-
icon-type="svg"
|
|
13
|
-
:class="mini || size === 'sm' ? 'text-base' : size === 'md' ? 'text-lg' : 'text-2xl'"/>
|
|
14
|
-
<TheNuxtIcon
|
|
15
|
-
v-show="icon && !loading"
|
|
16
|
-
:name="icon"
|
|
17
|
-
:class="mini || size === 'sm' ? 'text-base' : size === 'md' ? 'text-lg' : 'text-2xl'"/>
|
|
18
|
-
<p v-if="label || loading" class="font-medium whitespace-nowrap" :class="mini || size === 'sm' ? 'text-sm' : size === 'md' ? 'text-lg' : 'text-base'">
|
|
19
|
-
{{ loading ? "" : label }}
|
|
20
|
-
</p>
|
|
21
|
-
<TheNuxtIcon
|
|
22
|
-
v-show="appendIcon && !loading"
|
|
23
|
-
:name="appendIcon"
|
|
24
|
-
:class="mini || size === 'sm' ? 'text-base' : size === 'md' ? 'text-lg' : 'text-2xl'"/>
|
|
25
|
-
<span v-show="badge"
|
|
26
|
-
class="bg-secondary-500 rounded-1/2 absolute w-3 h-3 left-0 top-0 transform -translate-x-1/3 -translate-y-1/3 shadow-2xl"/>
|
|
27
|
-
</button>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<script setup>
|
|
31
|
-
const { variant = "" } = defineProps({
|
|
32
|
-
icon: { type: String, required: false },
|
|
33
|
-
appendIcon: { type: String, required: false },
|
|
34
|
-
label: { type: String, required: false },
|
|
35
|
-
disable: { type: Boolean, required: false },
|
|
36
|
-
size: { type: String, required: false },
|
|
37
|
-
mini: { type: Boolean, required: false },
|
|
38
|
-
color: { type: String, required: false },
|
|
39
|
-
badge: { type: Number, required: false },
|
|
40
|
-
loading: { type: Boolean, required: false },
|
|
41
|
-
variant: { type: String, required: false }
|
|
42
|
-
});
|
|
43
|
-
const variants = {
|
|
44
|
-
"danger": "bg-danger/10 text-danger border-danger",
|
|
45
|
-
"primary": "bg-primary-500/10 text-primary-500 border-primary-500",
|
|
46
|
-
"primary-fill": "bg-primary-500 text-white border-transparent",
|
|
47
|
-
"secondary": "bg-gray-600/10 text-gray-600 border-transparent",
|
|
48
|
-
"secondary-fill": "bg-gray-600 text-white border-transparent",
|
|
49
|
-
"secondary-bordered": "bg-transparent border-gray-400 text-gray-400"
|
|
50
|
-
};
|
|
51
|
-
const classVariant = computed(() => variants[variant]);
|
|
52
|
-
</script>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
icon?: string;
|
|
3
|
-
appendIcon?: string;
|
|
4
|
-
label?: string;
|
|
5
|
-
disable?: boolean;
|
|
6
|
-
size?: 'sm' | 'md' | 'lg';
|
|
7
|
-
mini?: boolean;
|
|
8
|
-
color?: string;
|
|
9
|
-
badge?: number;
|
|
10
|
-
loading?: boolean;
|
|
11
|
-
variant?: string;
|
|
12
|
-
};
|
|
13
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
-
declare const _default: typeof __VLS_export;
|
|
15
|
-
export default _default;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
direction?: 'column' | 'row' | 'row-reverse' | 'column-reverse';
|
|
3
|
-
customClass?: Record<'main' | 'body' | 'title' | 'tags' | 'tag' | 'description' | 'footer' | 'image' | 'avatar', string>;
|
|
4
|
-
};
|
|
5
|
-
declare var __VLS_22: {}, __VLS_24: {}, __VLS_26: {};
|
|
6
|
-
type __VLS_Slots = {} & {
|
|
7
|
-
header?: (props: typeof __VLS_22) => any;
|
|
8
|
-
} & {
|
|
9
|
-
footerStart?: (props: typeof __VLS_24) => any;
|
|
10
|
-
} & {
|
|
11
|
-
footerEnd?: (props: typeof __VLS_26) => any;
|
|
12
|
-
};
|
|
13
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
-
declare const _default: typeof __VLS_export;
|
|
16
|
-
export default _default;
|
|
17
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
-
new (): {
|
|
19
|
-
$slots: S;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<NuxtLink class="flex items-stretch bg-white rounded-2xl overflow-hidden"
|
|
3
|
-
:class="headerClass[direction]" to="#">
|
|
4
|
-
<TheNuxtIcon class="grow-1 basis-1" :class="customClass.image" name="https://picsum.photos/400/200" icon-type="img"/>
|
|
5
|
-
<div :class="customClass.main" class="flex flex-col items-stretch grow-2.5 basis-2.5">
|
|
6
|
-
<div :class="customClass.body" class="flex gap-2 items-stretch p-3">
|
|
7
|
-
<TheNuxtIcon
|
|
8
|
-
:class="customClass.avatar"
|
|
9
|
-
:name="`https://s3.parand.app/files/parand/images/shop-logo.png`"
|
|
10
|
-
icon-type="img"
|
|
11
|
-
class="!object-cover shrink-0 w-14 h-14 aspect-square rounded-full border-(2 solid primary-500)"/>
|
|
12
|
-
<div class="flex justify-start flex-col gap-1 grow-1">
|
|
13
|
-
<h3 :class="customClass.title" class="text-(lg gray-600) font-medium">{{ item.title }}</h3>
|
|
14
|
-
<small :class="customClass.description" class="text-(base gray-500)">{{ item.description }}</small>
|
|
15
|
-
<div :class="customClass.tags" class="flex items-center justify-start gap-2">
|
|
16
|
-
<TheChips :class="customClass.tag" v-for="tag in item.tags" :label="tag.value" :icon="tag.icon"
|
|
17
|
-
:variant="tag.variant || 'secondary'"
|
|
18
|
-
:mini="true" class="!px-1"/>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
<slot name="header"/>
|
|
22
|
-
</div>
|
|
23
|
-
<div :class="customClass.footer" v-if="$slots.footerStart || $slots.footerEnd"
|
|
24
|
-
class="flex justify-between items-stretch border-t-(2 dashed border) p-3">
|
|
25
|
-
<slot name="footerStart"/>
|
|
26
|
-
<slot name="footerEnd"/>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</NuxtLink>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<script setup>
|
|
33
|
-
const { direction = "row-reverse", customClass = {} } = defineProps({
|
|
34
|
-
direction: { type: String, required: false },
|
|
35
|
-
customClass: { type: Object, required: false }
|
|
36
|
-
});
|
|
37
|
-
const headerClass = {
|
|
38
|
-
column: "flex-col",
|
|
39
|
-
row: "flex-row",
|
|
40
|
-
"row-reverse": "flex-row-reverse",
|
|
41
|
-
"column-reverse": "flex-col-reverse"
|
|
42
|
-
};
|
|
43
|
-
const item = {
|
|
44
|
-
title: "\u062A\u0633\u062A",
|
|
45
|
-
description: "\u0644\u0648\u0631\u0645 \u0627\u06CC\u067E\u0633\u0648\u0645 \u0645\u062A\u0646 \u0633\u0627\u062E\u062A\u06AF\u06CC \u0628\u0627 \u062A\u0648\u0644\u06CC\u062F \u0633\u0627\u062F\u06AF\u06CC \u0646\u0627\u0645\u0641\u0647\u0648\u0645 \u0627\u0632 \u0635\u0646\u0639\u062A \u0686\u0627\u067E \u0648 \u0628\u0627 \u0627\u0633\u062A\u0641\u0627\u062F\u0647 \u0627\u0632 \u0637\u0631\u0627\u062D\u0627\u0646 \u06AF\u0631\u0627\u0641\u06CC\u06A9 \u0627\u0633\u062A ",
|
|
46
|
-
tags: [
|
|
47
|
-
{
|
|
48
|
-
value: "\u062A\u0633\u062A"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
value: "\u062A\u0633\u062A"
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
};
|
|
55
|
-
</script>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
direction?: 'column' | 'row' | 'row-reverse' | 'column-reverse';
|
|
3
|
-
customClass?: Record<'main' | 'body' | 'title' | 'tags' | 'tag' | 'description' | 'footer' | 'image' | 'avatar', string>;
|
|
4
|
-
};
|
|
5
|
-
declare var __VLS_22: {}, __VLS_24: {}, __VLS_26: {};
|
|
6
|
-
type __VLS_Slots = {} & {
|
|
7
|
-
header?: (props: typeof __VLS_22) => any;
|
|
8
|
-
} & {
|
|
9
|
-
footerStart?: (props: typeof __VLS_24) => any;
|
|
10
|
-
} & {
|
|
11
|
-
footerEnd?: (props: typeof __VLS_26) => any;
|
|
12
|
-
};
|
|
13
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
-
declare const _default: typeof __VLS_export;
|
|
16
|
-
export default _default;
|
|
17
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
-
new (): {
|
|
19
|
-
$slots: S;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
dataList?: any[][];
|
|
3
|
-
background?: String;
|
|
4
|
-
xLabels?: any[];
|
|
5
|
-
chartLabels?: any[];
|
|
6
|
-
yDecimal?: number;
|
|
7
|
-
minValue?: number;
|
|
8
|
-
yLabelsTextFormatter?: (e: any) => string;
|
|
9
|
-
xLabelsTextFormatter?: (e: any) => string;
|
|
10
|
-
interactive?: boolean;
|
|
11
|
-
};
|
|
12
|
-
type __VLS_ModelProps = {
|
|
13
|
-
'duration'?: any;
|
|
14
|
-
};
|
|
15
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
16
|
-
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>;
|
|
17
|
-
declare const _default: typeof __VLS_export;
|
|
18
|
-
export default _default;
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex flex-col gap-2 items-stretch" v-on-click-outside="() => chartHover(null)">
|
|
3
|
-
<TrendChart
|
|
4
|
-
v-if="dataset?.length && dataset[0]?.data?.length > 1"
|
|
5
|
-
id="history-chart"
|
|
6
|
-
:class="[background ? background : 'bg-primary-super-light']"
|
|
7
|
-
:datasets="dataset"
|
|
8
|
-
:grid="grid"
|
|
9
|
-
:interactive="interactive"
|
|
10
|
-
:labels="labels"
|
|
11
|
-
:min="minValue"
|
|
12
|
-
padding="0 5"
|
|
13
|
-
class="font-semibold w-full grow"
|
|
14
|
-
@mouse-move="chartHover">
|
|
15
|
-
</TrendChart>
|
|
16
|
-
<div v-if="chartLabels?.length" class="flex flex-wrap gap-3 justify-center">
|
|
17
|
-
<label v-for="(item,index) in chartLabels" class="flex items-center gap-2 cursor-pointer">
|
|
18
|
-
<input class="peer" type="checkbox" :value="index" v-model="selected" hidden/>
|
|
19
|
-
<span class="w-3.5 h-3.5 rounded-1 peer-checked:bg-primary-500 outline-(1 solid gray-8 offset-1)"/>
|
|
20
|
-
<b class="text-sm" :class="`text${index}`">
|
|
21
|
-
{{ item }}
|
|
22
|
-
</b>
|
|
23
|
-
</label>
|
|
24
|
-
</div>
|
|
25
|
-
<div v-if="duration" class="flex items-center gap-2 bg-white rounded-full py-1.5 px-3 justify-between">
|
|
26
|
-
<label v-for="n in ['1 h', '1 w', '1 M', '6 M', '1 y']" class="flex items-center">
|
|
27
|
-
<input v-model="duration" class="peer" type="radio" :value="n" hidden>
|
|
28
|
-
<small
|
|
29
|
-
class="rounded-full border-(1 solid transparent) bg-gray-200 text-gray-7 uppercase px-4 py-0.5 text-xs cursor-pointer peer-checked:(bg-primary-300 border-primary-400 text-primary-500 cursor-default font-bold)">
|
|
30
|
-
{{ n }}
|
|
31
|
-
</small>
|
|
32
|
-
</label>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</template>
|
|
36
|
-
|
|
37
|
-
<script setup>
|
|
38
|
-
import { vOnClickOutside } from "@vueuse/components";
|
|
39
|
-
const props = defineProps({
|
|
40
|
-
dataList: { type: Array, required: false },
|
|
41
|
-
background: { type: null, required: false },
|
|
42
|
-
xLabels: { type: Array, required: false },
|
|
43
|
-
chartLabels: { type: Array, required: false },
|
|
44
|
-
yDecimal: { type: Number, required: false },
|
|
45
|
-
minValue: { type: Number, required: false },
|
|
46
|
-
yLabelsTextFormatter: { type: Function, required: false },
|
|
47
|
-
xLabelsTextFormatter: { type: Function, required: false },
|
|
48
|
-
interactive: { type: Boolean, required: false }
|
|
49
|
-
});
|
|
50
|
-
const emit = defineEmits(["hover"]);
|
|
51
|
-
const selected = ref([]);
|
|
52
|
-
const duration = defineModel("duration");
|
|
53
|
-
const dataset = computed(() => props.dataList?.map((e, i) => ({
|
|
54
|
-
data: e || [0],
|
|
55
|
-
smooth: true,
|
|
56
|
-
showPoints: false,
|
|
57
|
-
fill: true,
|
|
58
|
-
className: `curve${i}`
|
|
59
|
-
}))?.filter((_, i) => selected.value.includes(i)));
|
|
60
|
-
const grid = {
|
|
61
|
-
verticalLines: false,
|
|
62
|
-
horizontalLines: true
|
|
63
|
-
};
|
|
64
|
-
const labels = computed(() => ({
|
|
65
|
-
xLabels: props.xLabels || [],
|
|
66
|
-
yLabels: props.yDecimal || 3,
|
|
67
|
-
yLabelsTextFormatter: props.yLabelsTextFormatter,
|
|
68
|
-
xLabelsTextFormatter: props.xLabelsTextFormatter
|
|
69
|
-
}));
|
|
70
|
-
const chartHover = (params) => {
|
|
71
|
-
emit("hover", params);
|
|
72
|
-
};
|
|
73
|
-
onMounted(() => {
|
|
74
|
-
selected.value = Array.from(props.dataList?.keys());
|
|
75
|
-
});
|
|
76
|
-
</script>
|
|
77
|
-
|
|
78
|
-
<style>
|
|
79
|
-
.text0 {
|
|
80
|
-
@apply text-primary-500;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.text1 {
|
|
84
|
-
@apply text-red;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.text2 {
|
|
88
|
-
@apply text-orange;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.text3 {
|
|
92
|
-
@apply text-green-500;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
#history-chart {
|
|
96
|
-
@apply text-xs;
|
|
97
|
-
}
|
|
98
|
-
#history-chart .curve0 .stroke {
|
|
99
|
-
@apply stroke-2 stroke-primary-500;
|
|
100
|
-
}
|
|
101
|
-
#history-chart .curve0 .fill {
|
|
102
|
-
@apply fill-primary-500 opacity-10;
|
|
103
|
-
}
|
|
104
|
-
#history-chart .curve0 .point {
|
|
105
|
-
@apply fill-primary-500 stroke-primary-500 stroke-0;
|
|
106
|
-
}
|
|
107
|
-
#history-chart .curve1 .stroke {
|
|
108
|
-
@apply stroke-2 stroke-red;
|
|
109
|
-
}
|
|
110
|
-
#history-chart .curve1 .fill {
|
|
111
|
-
@apply fill-red opacity-5;
|
|
112
|
-
}
|
|
113
|
-
#history-chart .curve1 .point {
|
|
114
|
-
@apply fill-red stroke-red stroke-1;
|
|
115
|
-
}
|
|
116
|
-
#history-chart .curve2 .stroke {
|
|
117
|
-
@apply stroke-2 stroke-orange;
|
|
118
|
-
}
|
|
119
|
-
#history-chart .curve2 .fill {
|
|
120
|
-
@apply fill-orange opacity-5;
|
|
121
|
-
}
|
|
122
|
-
#history-chart .curve2 .point {
|
|
123
|
-
@apply fill-orange stroke-orange stroke-1;
|
|
124
|
-
}
|
|
125
|
-
#history-chart .curve3 .stroke {
|
|
126
|
-
@apply stroke-2 stroke-green-500;
|
|
127
|
-
}
|
|
128
|
-
#history-chart .curve3 .fill {
|
|
129
|
-
@apply fill-green-500 opacity-5;
|
|
130
|
-
}
|
|
131
|
-
#history-chart .curve3 .point {
|
|
132
|
-
@apply fill-green-500 stroke-green-500 stroke-1;
|
|
133
|
-
}
|
|
134
|
-
#history-chart .labels .y-labels, #history-chart .labels .x-labels {
|
|
135
|
-
@apply fill-gray-5 stroke-0 text-2xs;
|
|
136
|
-
}
|
|
137
|
-
#history-chart .labels .x-labels {
|
|
138
|
-
@apply fill-gray-5 stroke-0 text-2;
|
|
139
|
-
}
|
|
140
|
-
#history-chart .active-line {
|
|
141
|
-
@apply stroke-gray-9/50;
|
|
142
|
-
}
|
|
143
|
-
#history-chart .point {
|
|
144
|
-
@apply stroke-2 transition-all duration-200;
|
|
145
|
-
}
|
|
146
|
-
#history-chart .point.is-active {
|
|
147
|
-
@apply stroke-5;
|
|
148
|
-
}
|
|
149
|
-
</style>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
dataList?: any[][];
|
|
3
|
-
background?: String;
|
|
4
|
-
xLabels?: any[];
|
|
5
|
-
chartLabels?: any[];
|
|
6
|
-
yDecimal?: number;
|
|
7
|
-
minValue?: number;
|
|
8
|
-
yLabelsTextFormatter?: (e: any) => string;
|
|
9
|
-
xLabelsTextFormatter?: (e: any) => string;
|
|
10
|
-
interactive?: boolean;
|
|
11
|
-
};
|
|
12
|
-
type __VLS_ModelProps = {
|
|
13
|
-
'duration'?: any;
|
|
14
|
-
};
|
|
15
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
16
|
-
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>;
|
|
17
|
-
declare const _default: typeof __VLS_export;
|
|
18
|
-
export default _default;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
declare const _default: typeof __VLS_export;
|
|
2
|
-
export default _default;
|
|
3
|
-
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
4
|
-
$emit: typeof emit;
|
|
5
|
-
$props: Partial<typeof props>;
|
|
6
|
-
options: unknown[];
|
|
7
|
-
multiple: boolean;
|
|
8
|
-
value?: unknown;
|
|
9
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
10
|
-
declare const emit: (event: "input", ...args: any[]) => void;
|
|
11
|
-
declare const props: {
|
|
12
|
-
readonly options: unknown[];
|
|
13
|
-
readonly multiple: boolean;
|
|
14
|
-
readonly value?: unknown;
|
|
15
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="h-12 w-full flex flex-row gap-2 items-stretch text-black-1 select-none text-sm children:(flex-grow flex justify-center items-center cursor-pointer rounded-lg border-1)">
|
|
4
|
-
<div
|
|
5
|
-
v-for="option in options"
|
|
6
|
-
:key="option.value"
|
|
7
|
-
:class="[checked(option.value) ? 'border-danger text-danger' : 'border-border',]"
|
|
8
|
-
@click="toggle(option.value)">
|
|
9
|
-
{{ option.label }}
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script setup>
|
|
15
|
-
const emit = defineEmits(["input"]);
|
|
16
|
-
const props = defineProps({
|
|
17
|
-
options: {
|
|
18
|
-
type: Array,
|
|
19
|
-
required: true
|
|
20
|
-
},
|
|
21
|
-
multiple: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: false
|
|
24
|
-
},
|
|
25
|
-
value: {}
|
|
26
|
-
});
|
|
27
|
-
const checked = computed((e) => {
|
|
28
|
-
props.multiple ? !!props.value?.includes(e) : props.value === e;
|
|
29
|
-
});
|
|
30
|
-
const toggle = (e) => {
|
|
31
|
-
if (!props.multiple) {
|
|
32
|
-
emit("input", e);
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
let newValues = [...props.value];
|
|
36
|
-
if (checked(e)) newValues = props.value.filter((a) => a !== e);
|
|
37
|
-
else newValues.push(e);
|
|
38
|
-
emit("input", newValues);
|
|
39
|
-
};
|
|
40
|
-
</script>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
declare const _default: typeof __VLS_export;
|
|
2
|
-
export default _default;
|
|
3
|
-
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
4
|
-
$emit: typeof emit;
|
|
5
|
-
$props: Partial<typeof props>;
|
|
6
|
-
options: unknown[];
|
|
7
|
-
multiple: boolean;
|
|
8
|
-
value?: unknown;
|
|
9
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
10
|
-
declare const emit: (event: "input", ...args: any[]) => void;
|
|
11
|
-
declare const props: {
|
|
12
|
-
readonly options: unknown[];
|
|
13
|
-
readonly multiple: boolean;
|
|
14
|
-
readonly value?: unknown;
|
|
15
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
declare const _default: typeof __VLS_export;
|
|
2
|
-
export default _default;
|
|
3
|
-
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
4
|
-
$emit: typeof emit;
|
|
5
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
-
declare const emit: (event: "change" | "complete", ...args: any[]) => void;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-otp-input
|
|
3
|
-
:value="value"
|
|
4
|
-
id="code-input"
|
|
5
|
-
dir="ltr"
|
|
6
|
-
ref="otpInput"
|
|
7
|
-
input-classes="otp-input"
|
|
8
|
-
separator=""
|
|
9
|
-
:num-inputs="6"
|
|
10
|
-
:should-auto-focus="true"
|
|
11
|
-
:is-input-num="true"
|
|
12
|
-
@on-change="onChange"
|
|
13
|
-
@on-complete="emit('complete',$event)"
|
|
14
|
-
/>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script setup>
|
|
18
|
-
import VOtpInput from "vue3-otp-input";
|
|
19
|
-
const emit = defineEmits(["complete", "change"]);
|
|
20
|
-
const value = defineModel();
|
|
21
|
-
const onChange = ($event) => {
|
|
22
|
-
value.value = $event;
|
|
23
|
-
emit("change");
|
|
24
|
-
};
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<style>
|
|
28
|
-
#code-input .otp-input {
|
|
29
|
-
@apply w-15 h-15 bg-gray-200 b-rd-2 text-center gap-2 <md:(w-12 h-12);
|
|
30
|
-
}
|
|
31
|
-
</style>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
declare const _default: typeof __VLS_export;
|
|
2
|
-
export default _default;
|
|
3
|
-
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
4
|
-
$emit: typeof emit;
|
|
5
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
-
declare const emit: (event: "change" | "complete", ...args: any[]) => void;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Shop } from "~/types/models";
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
shop?: Shop | null;
|
|
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, {
|
|
10
|
-
"update:modelValue": (value: any) => any;
|
|
11
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
12
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
13
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
-
declare const _default: typeof __VLS_export;
|
|
15
|
-
export default _default;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex gap-4 items-stretch bg-white p-3 rounded-2xl flex-wrap">
|
|
3
|
-
<p class="basis-full text-(kg gray-600) font-semibold">کد تخفیف</p>
|
|
4
|
-
<TheInput class="grow" v-model="discountCode"
|
|
5
|
-
append-icon-type="icon" :append-icon="modelValue ? 'solar:close-circle-line-duotone' : ''"
|
|
6
|
-
icon-color="text-danger"
|
|
7
|
-
@append="modelValue = null;
|
|
8
|
-
discountCode = ''"
|
|
9
|
-
/>
|
|
10
|
-
<TheButton :loading :disable="!discountCode" :mini="true" label="بررسی کد" variant="primary" @click="check"/>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script setup>
|
|
15
|
-
const discountCode = ref();
|
|
16
|
-
const loading = ref(false);
|
|
17
|
-
const modelValue = defineModel();
|
|
18
|
-
const { shop } = defineProps({
|
|
19
|
-
shop: { type: null, required: false }
|
|
20
|
-
});
|
|
21
|
-
const check = async () => {
|
|
22
|
-
loading.value = true;
|
|
23
|
-
const res = await getDiscountInfo(discountCode.value?.toLowerCase(), shop);
|
|
24
|
-
if (res) {
|
|
25
|
-
modelValue.value = res;
|
|
26
|
-
}
|
|
27
|
-
loading.value = false;
|
|
28
|
-
};
|
|
29
|
-
</script>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Shop } from "~/types/models";
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
shop?: Shop | null;
|
|
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, {
|
|
10
|
-
"update:modelValue": (value: any) => any;
|
|
11
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
12
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
13
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
-
declare const _default: typeof __VLS_export;
|
|
15
|
-
export default _default;
|
|
@@ -1,33 +0,0 @@
|
|
|
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
|
-
icon: string;
|
|
6
|
-
appendIcon: string;
|
|
7
|
-
label: string;
|
|
8
|
-
title: string;
|
|
9
|
-
appendText: string;
|
|
10
|
-
data: unknown[];
|
|
11
|
-
disabled: boolean;
|
|
12
|
-
bgColor: string;
|
|
13
|
-
textColor: string;
|
|
14
|
-
prependIcon: string;
|
|
15
|
-
height: string;
|
|
16
|
-
width: string;
|
|
17
|
-
px: string;
|
|
18
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
19
|
-
declare const props: {
|
|
20
|
-
readonly icon: string;
|
|
21
|
-
readonly appendIcon: string;
|
|
22
|
-
readonly label: string;
|
|
23
|
-
readonly title: string;
|
|
24
|
-
readonly appendText: string;
|
|
25
|
-
readonly data: unknown[];
|
|
26
|
-
readonly disabled: boolean;
|
|
27
|
-
readonly bgColor: string;
|
|
28
|
-
readonly textColor: string;
|
|
29
|
-
readonly prependIcon: string;
|
|
30
|
-
readonly height: string;
|
|
31
|
-
readonly width: string;
|
|
32
|
-
readonly px: string;
|
|
33
|
-
};
|