@seresweb/website-component 2.2.1 → 2.3.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/README.md +5 -4
- package/dist/_icons-DtBTpiO2.cjs +11 -0
- package/dist/_icons-FW35XHO0.js +14 -0
- package/dist/_utils-B7LThWoT.js +26 -0
- package/dist/_utils-CtkVBTg-.cjs +1 -0
- package/dist/cjs/checkbox.cjs +1 -0
- package/dist/cjs/col.cjs +1 -0
- package/dist/cjs/config-provider.cjs +1 -0
- package/dist/cjs/date-picker.cjs +1 -0
- package/dist/cjs/date-select.cjs +1 -0
- package/dist/cjs/horizontal-viewer.cjs +1 -1
- package/dist/cjs/image-indicator.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/input.cjs +1 -1
- package/dist/cjs/layz-image.cjs +1 -1
- package/dist/cjs/locales.cjs +1 -0
- package/dist/cjs/parameter-box.cjs +1 -1
- package/dist/cjs/radio.cjs +1 -1
- package/dist/cjs/row.cjs +1 -0
- package/dist/cjs/select.cjs +1 -0
- package/dist/cjs/swiper-normal.cjs +1 -1
- package/dist/cjs/swiper-showcase.cjs +1 -1
- package/dist/cjs/tab-indicator.cjs +1 -1
- package/dist/css/checkbox.css +1 -0
- package/dist/css/col.css +1 -0
- package/dist/css/date-picker.css +1 -0
- package/dist/css/date-select.css +1 -0
- package/dist/css/input.css +1 -1
- package/dist/css/radio.css +1 -1
- package/dist/css/row.css +1 -0
- package/dist/css/select.css +1 -0
- package/dist/css/swiper-showcase.css +1 -1
- package/dist/en-US-BBTWftdk.js +35 -0
- package/dist/en-US-UkqgG0fb.cjs +1 -0
- package/dist/es/checkbox.mjs +82 -0
- package/dist/es/col.mjs +48 -0
- package/dist/es/config-provider.mjs +17 -0
- package/dist/es/date-picker.mjs +6 -0
- package/dist/es/date-select.mjs +113 -0
- package/dist/es/horizontal-viewer.mjs +1 -1
- package/dist/es/image-indicator.mjs +1 -1
- package/dist/es/index.mjs +61 -41
- package/dist/es/input.mjs +17 -16
- package/dist/es/layz-image.mjs +18 -17
- package/dist/es/locales.mjs +41 -0
- package/dist/es/parameter-box.mjs +123 -85
- package/dist/es/radio.mjs +27 -23
- package/dist/es/row.mjs +63 -0
- package/dist/es/select.mjs +210 -0
- package/dist/es/swiper-normal.mjs +1 -1
- package/dist/es/swiper-showcase.mjs +110 -95
- package/dist/es/tab-indicator.mjs +65 -79
- package/dist/global.d.ts +8 -0
- package/dist/index-B-sVxtkA.cjs +1 -0
- package/dist/{index-tkvNmWjy.js → index-BPX4w5Vn.js} +113 -106
- package/dist/index-Bc4wAl0z.js +644 -0
- package/dist/index-CEjz1ubF.cjs +1 -0
- package/dist/index.css +1 -1
- package/dist/scss/checkbox.scss +155 -0
- package/dist/scss/col.scss +16 -0
- package/dist/scss/date-picker.scss +226 -0
- package/dist/scss/date-select.scss +41 -0
- package/dist/scss/index.scss +6 -0
- package/dist/scss/input.scss +44 -4
- package/dist/scss/radio.scss +6 -6
- package/dist/scss/row.scss +10 -0
- package/dist/scss/select.scss +210 -0
- package/dist/scss/swiper-showcase.scss +54 -17
- package/dist/types/components/_icons.d.ts +4 -0
- package/dist/types/components/_utils.d.ts +4 -0
- package/dist/types/components/checkbox/checkbox.vue.d.ts +24 -0
- package/dist/types/components/checkbox/index.d.ts +6 -0
- package/dist/types/components/checkbox/type.d.ts +30 -0
- package/dist/types/components/col/col.vue.d.ts +21 -0
- package/dist/types/components/col/index.d.ts +6 -0
- package/dist/types/components/col/type.d.ts +24 -0
- package/dist/types/components/config-provider/config-provider.vue.d.ts +20 -0
- package/dist/types/components/config-provider/index.d.ts +27 -0
- package/dist/types/components/config-provider/type.d.ts +4 -0
- package/dist/types/components/date-picker/date-picker.vue.d.ts +16 -0
- package/dist/types/components/date-picker/index.d.ts +53 -0
- package/dist/types/components/date-picker/type.d.ts +12 -0
- package/dist/types/components/date-select/date-select.vue.d.ts +16 -0
- package/dist/types/components/date-select/index.d.ts +7 -0
- package/dist/types/components/date-select/type.d.ts +16 -0
- package/dist/types/components/index.d.ts +8 -0
- package/dist/types/components/input/input.vue.d.ts +1 -0
- package/dist/types/components/input/type.d.ts +1 -0
- package/dist/types/components/locales/ar-SA.d.ts +20 -0
- package/dist/types/components/locales/en-US.d.ts +20 -0
- package/dist/types/components/locales/index.d.ts +44 -0
- package/dist/types/components/radio/radio.vue.d.ts +2 -2
- package/dist/types/components/row/index.d.ts +6 -0
- package/dist/types/components/row/row.vue.d.ts +23 -0
- package/dist/types/components/row/type.d.ts +7 -0
- package/dist/types/components/select/index.d.ts +7 -0
- package/dist/types/components/select/select.vue.d.ts +48 -0
- package/dist/types/components/select/type.d.ts +20 -0
- package/dist/types/components/swiper-normal/swiper-normal.vue.d.ts +2 -2
- package/dist/types/components/swiper-showcase/type.d.ts +28 -0
- package/dist/types/components/swiper-vehicle/swiper-vehicle.vue.d.ts +2 -2
- package/dist/types/components/tab-indicator/tab-indicator.vue.d.ts +2 -2
- package/package.json +2 -1
- package/dist/index-BIPlvoY9.cjs +0 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export declare const ScDatePicker: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./type').DatePickerProps> & Readonly<{
|
|
3
|
+
onChange?: ((value: string | Date | null) => any) | undefined;
|
|
4
|
+
"onUpdate:modelValue"?: ((value: string | Date | null) => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
6
|
+
change: (value: string | Date | null) => any;
|
|
7
|
+
"update:modelValue": (value: string | Date | null) => any;
|
|
8
|
+
}, import('vue').PublicProps, {
|
|
9
|
+
format: string;
|
|
10
|
+
modelValue: Date | string | null;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
dark: boolean;
|
|
13
|
+
minDate: Date | string;
|
|
14
|
+
maxDate: Date | string;
|
|
15
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
16
|
+
P: {};
|
|
17
|
+
B: {};
|
|
18
|
+
D: {};
|
|
19
|
+
C: {};
|
|
20
|
+
M: {};
|
|
21
|
+
Defaults: {};
|
|
22
|
+
}, Readonly<import('./type').DatePickerProps> & Readonly<{
|
|
23
|
+
onChange?: ((value: string | Date | null) => any) | undefined;
|
|
24
|
+
"onUpdate:modelValue"?: ((value: string | Date | null) => any) | undefined;
|
|
25
|
+
}>, {}, {}, {}, {}, {
|
|
26
|
+
format: string;
|
|
27
|
+
modelValue: Date | string | null;
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
dark: boolean;
|
|
30
|
+
minDate: Date | string;
|
|
31
|
+
maxDate: Date | string;
|
|
32
|
+
}>;
|
|
33
|
+
__isFragment?: never;
|
|
34
|
+
__isTeleport?: never;
|
|
35
|
+
__isSuspense?: never;
|
|
36
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./type').DatePickerProps> & Readonly<{
|
|
37
|
+
onChange?: ((value: string | Date | null) => any) | undefined;
|
|
38
|
+
"onUpdate:modelValue"?: ((value: string | Date | null) => any) | undefined;
|
|
39
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
40
|
+
change: (value: string | Date | null) => any;
|
|
41
|
+
"update:modelValue": (value: string | Date | null) => any;
|
|
42
|
+
}, string, {
|
|
43
|
+
format: string;
|
|
44
|
+
modelValue: Date | string | null;
|
|
45
|
+
disabled: boolean;
|
|
46
|
+
dark: boolean;
|
|
47
|
+
minDate: Date | string;
|
|
48
|
+
maxDate: Date | string;
|
|
49
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
|
|
50
|
+
install(app: import('vue').App): void;
|
|
51
|
+
};
|
|
52
|
+
export default ScDatePicker;
|
|
53
|
+
export * from './type';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface DatePickerProps {
|
|
2
|
+
modelValue?: Date | string | null;
|
|
3
|
+
format?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
dark?: boolean;
|
|
6
|
+
minDate?: Date | string;
|
|
7
|
+
maxDate?: Date | string;
|
|
8
|
+
}
|
|
9
|
+
export interface DatePickerEmits {
|
|
10
|
+
(e: 'update:modelValue', value: Date | string | null): void;
|
|
11
|
+
(e: 'change', value: Date | string | null): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DateSelectProps } from './type';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<DateSelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
|
+
change: (value: string | Date | null) => any;
|
|
4
|
+
"update:modelValue": (value: string | Date | null) => any;
|
|
5
|
+
}, string, import('vue').PublicProps, Readonly<DateSelectProps> & Readonly<{
|
|
6
|
+
onChange?: ((value: string | Date | null) => any) | undefined;
|
|
7
|
+
"onUpdate:modelValue"?: ((value: string | Date | null) => any) | undefined;
|
|
8
|
+
}>, {
|
|
9
|
+
placeholder: string;
|
|
10
|
+
format: string;
|
|
11
|
+
modelValue: Date | string | null;
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
dark: boolean;
|
|
14
|
+
clearable: boolean;
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as Component } from './date-select.vue';
|
|
3
|
+
import { DateSelectProps, DateSelectEmits } from './type';
|
|
4
|
+
export declare const ScDateSelect: typeof Component & {
|
|
5
|
+
install: (app: App) => App;
|
|
6
|
+
};
|
|
7
|
+
export type { DateSelectProps, DateSelectEmits };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DatePickerProps } from '../date-picker/type';
|
|
2
|
+
export interface DateSelectProps {
|
|
3
|
+
modelValue?: Date | string | null;
|
|
4
|
+
format?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
dark?: boolean;
|
|
8
|
+
clearable?: boolean;
|
|
9
|
+
minDate?: Date | string;
|
|
10
|
+
maxDate?: Date | string;
|
|
11
|
+
}
|
|
12
|
+
export interface DateSelectEmits {
|
|
13
|
+
(e: 'update:modelValue', value: Date | string | null): void;
|
|
14
|
+
(e: 'change', value: Date | string | null): void;
|
|
15
|
+
}
|
|
16
|
+
export type DateSelectPickerProps = Pick<DatePickerProps, 'minDate' | 'maxDate' | 'format' | 'disabled'>;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
2
|
export * from './accordion-info-panel';
|
|
3
3
|
export * from './animated-number';
|
|
4
|
+
export * from './checkbox';
|
|
5
|
+
export * from './col';
|
|
6
|
+
export * from './config-provider';
|
|
7
|
+
export * from './date-picker';
|
|
8
|
+
export * from './date-select';
|
|
4
9
|
export * from './drawer';
|
|
5
10
|
export * from './dropdown';
|
|
6
11
|
export * from './gradual-highlight';
|
|
@@ -8,8 +13,11 @@ export * from './horizontal-viewer';
|
|
|
8
13
|
export * from './image-indicator';
|
|
9
14
|
export * from './input';
|
|
10
15
|
export * from './layz-image';
|
|
16
|
+
export * from './locales';
|
|
11
17
|
export * from './parameter-box';
|
|
12
18
|
export * from './radio';
|
|
19
|
+
export * from './row';
|
|
20
|
+
export * from './select';
|
|
13
21
|
export * from './swiper-normal';
|
|
14
22
|
export * from './swiper-showcase';
|
|
15
23
|
export * from './swiper-vehicle';
|
|
@@ -15,6 +15,7 @@ declare const __VLS_component: import('vue').DefineComponent<InputProps, {}, {},
|
|
|
15
15
|
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
17
|
type: "text" | "email" | "tel";
|
|
18
|
+
dark: boolean;
|
|
18
19
|
autocomplete: "on" | "off";
|
|
19
20
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
20
21
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
datePicker: {
|
|
3
|
+
months: string[];
|
|
4
|
+
weekdays: string[];
|
|
5
|
+
today: string;
|
|
6
|
+
clear: string;
|
|
7
|
+
confirm: string;
|
|
8
|
+
cancel: string;
|
|
9
|
+
selectDate: string;
|
|
10
|
+
selectTime: string;
|
|
11
|
+
selectDateTime: string;
|
|
12
|
+
year: string;
|
|
13
|
+
month: string;
|
|
14
|
+
startDate: string;
|
|
15
|
+
endDate: string;
|
|
16
|
+
startTime: string;
|
|
17
|
+
endTime: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
datePicker: {
|
|
3
|
+
months: string[];
|
|
4
|
+
weekdays: string[];
|
|
5
|
+
today: string;
|
|
6
|
+
clear: string;
|
|
7
|
+
confirm: string;
|
|
8
|
+
cancel: string;
|
|
9
|
+
selectDate: string;
|
|
10
|
+
selectTime: string;
|
|
11
|
+
selectDateTime: string;
|
|
12
|
+
year: string;
|
|
13
|
+
month: string;
|
|
14
|
+
startDate: string;
|
|
15
|
+
endDate: string;
|
|
16
|
+
startTime: string;
|
|
17
|
+
endTime: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { default as enUS } from './en-US';
|
|
2
|
+
import { default as arSA } from './ar-SA';
|
|
3
|
+
export type Locale = typeof enUS;
|
|
4
|
+
export { enUS, arSA };
|
|
5
|
+
export declare const ScLocales: {
|
|
6
|
+
enUS: {
|
|
7
|
+
datePicker: {
|
|
8
|
+
months: string[];
|
|
9
|
+
weekdays: string[];
|
|
10
|
+
today: string;
|
|
11
|
+
clear: string;
|
|
12
|
+
confirm: string;
|
|
13
|
+
cancel: string;
|
|
14
|
+
selectDate: string;
|
|
15
|
+
selectTime: string;
|
|
16
|
+
selectDateTime: string;
|
|
17
|
+
year: string;
|
|
18
|
+
month: string;
|
|
19
|
+
startDate: string;
|
|
20
|
+
endDate: string;
|
|
21
|
+
startTime: string;
|
|
22
|
+
endTime: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
arSA: {
|
|
26
|
+
datePicker: {
|
|
27
|
+
months: string[];
|
|
28
|
+
weekdays: string[];
|
|
29
|
+
today: string;
|
|
30
|
+
clear: string;
|
|
31
|
+
confirm: string;
|
|
32
|
+
cancel: string;
|
|
33
|
+
selectDate: string;
|
|
34
|
+
selectTime: string;
|
|
35
|
+
selectDateTime: string;
|
|
36
|
+
year: string;
|
|
37
|
+
month: string;
|
|
38
|
+
startDate: string;
|
|
39
|
+
endDate: string;
|
|
40
|
+
startTime: string;
|
|
41
|
+
endTime: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { RadioProps } from './type';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<RadioProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
-
"update:modelValue": (...args: any[]) => void;
|
|
4
3
|
change: (...args: any[]) => void;
|
|
4
|
+
"update:modelValue": (...args: any[]) => void;
|
|
5
5
|
}, string, import('vue').PublicProps, Readonly<RadioProps> & Readonly<{
|
|
6
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
7
6
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
7
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
8
8
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLabelElement>;
|
|
9
9
|
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { RowProps, GutterType } from './type';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {};
|
|
8
|
+
rootEl: HTMLDivElement;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<RowProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<RowProps> & Readonly<{}>, {
|
|
12
|
+
gutter: number | GutterType;
|
|
13
|
+
justify: "start" | "end" | "center" | "space-between" | "space-around" | "space-evenly";
|
|
14
|
+
align: "top" | "middle" | "bottom" | "stretch";
|
|
15
|
+
wrap: boolean;
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type GutterType = 'small' | 'medium' | 'large';
|
|
2
|
+
export interface RowProps {
|
|
3
|
+
gutter?: number | GutterType;
|
|
4
|
+
justify?: 'start' | 'end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
5
|
+
align?: 'top' | 'middle' | 'bottom' | 'stretch';
|
|
6
|
+
wrap?: boolean;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as Component } from './select.vue';
|
|
3
|
+
import { SelectProps, SelectEmits, SelectOption } from './type';
|
|
4
|
+
export declare const ScSelect: typeof Component & {
|
|
5
|
+
install: (app: App) => App;
|
|
6
|
+
};
|
|
7
|
+
export type { SelectProps, SelectEmits, SelectOption };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { SelectProps } from './type';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
selected?(_: {
|
|
6
|
+
value: string;
|
|
7
|
+
hasValue: boolean;
|
|
8
|
+
}): any;
|
|
9
|
+
option?(_: {
|
|
10
|
+
option: import('./type').SelectOption;
|
|
11
|
+
}): any;
|
|
12
|
+
default?(_: {
|
|
13
|
+
select: (option: any) => void;
|
|
14
|
+
close: (e?: MouseEvent) => void;
|
|
15
|
+
}): any;
|
|
16
|
+
};
|
|
17
|
+
refs: {
|
|
18
|
+
selectRef: HTMLDivElement;
|
|
19
|
+
};
|
|
20
|
+
rootEl: HTMLDivElement;
|
|
21
|
+
};
|
|
22
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
23
|
+
declare const __VLS_component: import('vue').DefineComponent<SelectProps, {
|
|
24
|
+
close: (e?: MouseEvent) => void;
|
|
25
|
+
selectOption: (option: any) => void;
|
|
26
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
27
|
+
change: (value: string | number | null) => any;
|
|
28
|
+
"update:modelValue": (value: string | number | null) => any;
|
|
29
|
+
}, string, import('vue').PublicProps, Readonly<SelectProps> & Readonly<{
|
|
30
|
+
onChange?: ((value: string | number | null) => any) | undefined;
|
|
31
|
+
"onUpdate:modelValue"?: ((value: string | number | null) => any) | undefined;
|
|
32
|
+
}>, {
|
|
33
|
+
placeholder: string;
|
|
34
|
+
modelValue: string | number | null;
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
dark: boolean;
|
|
37
|
+
options: import('./type').SelectOption[];
|
|
38
|
+
clearable: boolean;
|
|
39
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
40
|
+
selectRef: HTMLDivElement;
|
|
41
|
+
}, HTMLDivElement>;
|
|
42
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
43
|
+
export default _default;
|
|
44
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Select 组件的类型定义
|
|
3
|
+
*/
|
|
4
|
+
export interface SelectOption {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string | number;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface SelectProps {
|
|
10
|
+
modelValue: string | number | null;
|
|
11
|
+
options?: SelectOption[];
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
dark?: boolean;
|
|
15
|
+
clearable?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface SelectEmits {
|
|
18
|
+
(e: 'update:modelValue', value: string | number | null): void;
|
|
19
|
+
(e: 'change', value: string | number | null): void;
|
|
20
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SwiperNormalProps } from './type';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<SwiperNormalProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
-
"update:modelValue": (...args: any[]) => void;
|
|
4
3
|
change: (...args: any[]) => void;
|
|
4
|
+
"update:modelValue": (...args: any[]) => void;
|
|
5
5
|
}, string, import('vue').PublicProps, Readonly<SwiperNormalProps> & Readonly<{
|
|
6
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
7
6
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
7
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
8
8
|
}>, {
|
|
9
9
|
modelValue: number;
|
|
10
10
|
swiperOptions: import('swiper/types').SwiperOptions;
|
|
@@ -1,10 +1,38 @@
|
|
|
1
1
|
import { SwiperOptions } from 'swiper/types';
|
|
2
2
|
export interface SwiperShowcaseItem {
|
|
3
|
+
/**
|
|
4
|
+
* 标题
|
|
5
|
+
*/
|
|
3
6
|
title: string;
|
|
7
|
+
/**
|
|
8
|
+
* 描述文本(可选)
|
|
9
|
+
*/
|
|
4
10
|
desc?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 图片地址(可选)
|
|
13
|
+
*/
|
|
5
14
|
url?: string;
|
|
15
|
+
/**
|
|
16
|
+
* 图片 alt 文本(可选)
|
|
17
|
+
*/
|
|
6
18
|
alt?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 标签文本(可选)
|
|
21
|
+
*/
|
|
7
22
|
tag?: string;
|
|
23
|
+
/**
|
|
24
|
+
* 日期文本(可选)
|
|
25
|
+
*/
|
|
26
|
+
date?: string;
|
|
27
|
+
/**
|
|
28
|
+
* 链接地址(可选)
|
|
29
|
+
*/
|
|
30
|
+
link?: string;
|
|
31
|
+
/**
|
|
32
|
+
* 链接文本(可选)
|
|
33
|
+
* @default 'Read More'
|
|
34
|
+
*/
|
|
35
|
+
linkText?: string;
|
|
8
36
|
}
|
|
9
37
|
export interface SwiperShowcaseProps {
|
|
10
38
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SwiperVehicleProps } from './type';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<SwiperVehicleProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
-
"update:modelValue": (...args: any[]) => void;
|
|
4
3
|
change: (...args: any[]) => void;
|
|
4
|
+
"update:modelValue": (...args: any[]) => void;
|
|
5
5
|
}, string, import('vue').PublicProps, Readonly<SwiperVehicleProps> & Readonly<{
|
|
6
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
7
6
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
7
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
8
8
|
}>, {
|
|
9
9
|
modelValue: number;
|
|
10
10
|
swiperOptions: import('swiper/types').SwiperOptions;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TabIndicatorProps } from './type';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<TabIndicatorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
-
"update:modelValue": (...args: any[]) => void;
|
|
4
3
|
change: (...args: any[]) => void;
|
|
4
|
+
"update:modelValue": (...args: any[]) => void;
|
|
5
5
|
}, string, import('vue').PublicProps, Readonly<TabIndicatorProps> & Readonly<{
|
|
6
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
7
6
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
7
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
8
8
|
}>, {
|
|
9
9
|
modelValue: number;
|
|
10
10
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seresweb/website-component",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"author": "Seres",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "官方网站类的组件",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@vavt/util": "^2.1.0",
|
|
46
|
+
"dayjs": "^1.11.19",
|
|
46
47
|
"swiper": "^12.0.3"
|
|
47
48
|
}
|
|
48
49
|
}
|
package/dist/index-BIPlvoY9.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),H=require("./swiper-bundle-gkukcY4l.cjs"),r=require("./_vars-CyrPevgT.cjs");require("./cjs/accordion-info-panel.cjs");require("./cjs/animated-number.cjs");require("./cjs/drawer.cjs");require("./cjs/dropdown.cjs");require("./cjs/gradual-highlight.cjs");const X=require("@vavt/util");require("./cjs/input.cjs");const V=require("./cjs/layz-image.cjs");require("./cjs/parameter-box.cjs");require("./cjs/radio.cjs");require("./cjs/swiper-showcase.cjs");require("./cjs/swiper-vehicle.cjs");const q=require("./cjs/tab-indicator.cjs"),$=require("./cjs/video.cjs"),W=["innerHTML"],O=["innerHTML"],U=["innerHTML"],D=["innerHTML"],A=e.defineComponent({__name:"pc-viewer",props:{title:{},desc:{},dataList:{},extraTopSpacing:{default:0},extraBottomSpacing:{default:0}},setup(l){const p=l,a=e.ref(),v=e.ref(),o=e.ref(),d=e.ref(),f=e.ref(),i=e.ref(),h=e.reactive({container:"",root:"",item:""}),u=n=>typeof n!="number"||Number.isNaN(n)?0:n,g=(n,s,c)=>{const k=Math.min(Math.max(n,0),c),_=Math.min(Math.max(s,0),Math.max(c-k,0));return{safeTop:k,safeBottom:_}},B=()=>{var b;if(!o.value)return;const n=o.value.offsetHeight,s=window.innerHeight,c=((b=i.value)==null?void 0:b.offsetHeight)||0,k=m(i.value),_=u(p.extraTopSpacing),E=u(p.extraBottomSpacing),{safeTop:I,safeBottom:L}=g(_,E,s),C=Math.max(s-I-L,0),z=Math.max((C-c-n-k)/2,0),M=I+z,N=L+z;h.container=`padding-top: ${M}px; padding-bottom: ${N}px; min-height: ${s}px;`;const x=o.value.scrollWidth;h.root=`height: ${Math.max(x,s)}px`},t=()=>{const n=document.documentElement.getAttribute("dir")||"ltr",s=n==="rtl"?"right":"left";if(!a.value||!o.value||!d.value||!f.value)return;const k=a.value.clientHeight-window.innerHeight,{offsetTop:_}=X.getRootOffset(a.value),E=document.documentElement.scrollTop-_;if(E<0){o.value.scrollTo({left:0}),f.value.style[s]="0px";return}if(E>k){const z=o.value.scrollWidth-window.innerWidth;o.value.scrollTo({left:n==="rtl"?-z:z}),f.value.style[s]=d.value.clientWidth-f.value.clientWidth+"px";return}const I=E/k,L=I*(o.value.scrollWidth-window.innerWidth),C=I*(d.value.clientWidth*2/3);o.value.scrollTo({left:n==="rtl"?-L:L}),f.value.style[s]=`${C}px`},w=()=>{h.container="",B()},m=n=>{if(!(n instanceof HTMLElement))return 0;const s=window.getComputedStyle(n),c=parseFloat(s.marginTop)||0,k=parseFloat(s.marginBottom)||0;return c+k};let y;return e.watch(()=>[p.extraTopSpacing,p.extraBottomSpacing],()=>{h.container="",B()}),e.onMounted(()=>{y=new IntersectionObserver(n=>{n.forEach(s=>{s.isIntersecting&&(h.container="",B())})},{root:null,rootMargin:"200px 0px 200px 0px",threshold:0}),window.addEventListener("scroll",t),window.addEventListener("resize",w),a.value&&y.observe(a.value)}),e.onBeforeUnmount(()=>{window.removeEventListener("scroll",t),window.removeEventListener("resize",w),y&&y.disconnect()}),(n,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:a,class:e.normalizeClass(`${e.unref(r.PREFIX)}-horizontal-viewer`),style:e.normalizeStyle(h.root)},[e.createElementVNode("div",{ref_key:"containerRef",ref:v,class:e.normalizeClass([`${e.unref(r.PREFIX)}-horizontal-viewer__container`,(n.title||n.desc)&&"has-header"]),style:e.normalizeStyle(h.container)},[n.title||n.desc?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`${e.unref(r.PREFIX)}-horizontal-viewer__header`),ref_key:"headerRef",ref:i},[n.title?(e.openBlock(),e.createElementBlock("p",{key:0,innerHTML:n.title},null,8,W)):e.createCommentVNode("v-if",!0),n.desc?(e.openBlock(),e.createElementBlock("p",{key:1,innerHTML:n.desc},null,8,O)):e.createCommentVNode("v-if",!0)],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"scrollerRef",ref:o,class:e.normalizeClass(`${e.unref(r.PREFIX)}-horizontal-viewer__scroller`)},[e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(r.PREFIX)}-horizontal-viewer__content`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataList,c=>(e.openBlock(),e.createElementBlock("div",{key:c.title,class:e.normalizeClass(`${e.unref(r.PREFIX)}-horizontal-viewer__content-item`)},[c.type==="img"?(e.openBlock(),e.createBlock(e.unref(V.ScLayzImage),{key:0,src:c.url,alt:c.alt},null,8,["src","alt"])):(e.openBlock(),e.createBlock(e.unref($.ScVideo),{key:1,url:c.url,poster:c.poster,"auto-play":!1},null,8,["url","poster"])),e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(r.PREFIX)}-horizontal-viewer__content-item-footer`)},[e.createElementVNode("p",{innerHTML:c.title},null,8,U),e.createElementVNode("p",{innerHTML:c.desc},null,8,D)],2)],2))),128))],2)],2),e.createElementVNode("div",{ref_key:"paginationRef",ref:d,class:e.normalizeClass(`${e.unref(r.PREFIX)}-horizontal-viewer__pagination`)},[e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(r.PREFIX)}-horizontal-viewer__scrollbar`)},[e.createElementVNode("div",{ref_key:"scrollbarDragRef",ref:f,class:e.normalizeClass(`${e.unref(r.PREFIX)}-horizontal-viewer__scrollbar-drag`)},null,2)],2)],2)],6)],6))}}),Y=e.defineComponent({__name:"mb-viewer",props:{title:{},desc:{},isMobile:{type:Boolean},extraTopSpacing:{},extraBottomSpacing:{},modelValue:{},dataList:{},swiperOptions:{},effect:{},showIntro:{type:Boolean},videoProps:{},indicatorClass:{},tabIndicatorBottom:{},widthType:{},indicatorType:{},showIndicator:{type:Boolean},indicatorPosition:{}},setup(l){const p=l,a=e.ref();return(v,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:a,class:e.normalizeClass(`${e.unref(r.PREFIX)}-horizontal-viewer-mb`)},[e.createVNode(e.unref(F),e.mergeProps(p,{indicatorType:"image"}),null,16)],2))}}),R=e.defineComponent({__name:"horizontal-viewer",props:{title:{},desc:{},isMobile:{type:Boolean},extraTopSpacing:{},extraBottomSpacing:{},modelValue:{},dataList:{},swiperOptions:{},effect:{},showIntro:{type:Boolean},videoProps:{},indicatorClass:{},tabIndicatorBottom:{},widthType:{},indicatorType:{},showIndicator:{type:Boolean,default:!0},indicatorPosition:{}},setup(l){const p=l;return(a,v)=>a.isMobile?(e.openBlock(),e.createBlock(Y,e.normalizeProps(e.mergeProps({key:0},p)),null,16)):(e.openBlock(),e.createBlock(A,e.normalizeProps(e.mergeProps({key:1},p)),null,16))}});R.install=l=>(l.component("ScHorizontalViewer",R),l);const Z=R,j=["onClick"],G=["innerHTML"],J=["innerHTML"],P=e.defineComponent({__name:"image-indicator",props:{dataList:{},showIntro:{type:Boolean,default:!0}},emits:["change"],setup(l,{emit:p}){const a=p,v=e.ref(0),o=e.ref([]),d=e.computed(()=>{const i=o.value[v.value];return{height:`${i==null?void 0:i.offsetHeight}px`}}),f=i=>{v.value=i,a("change",i)};return(i,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`${e.unref(r.PREFIX)}-image-indicator`)},[e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(r.PREFIX)}-image-indicator__list`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.dataList,(u,g)=>(e.openBlock(),e.createElementBlock("div",{key:u.url,class:e.normalizeClass([`${e.unref(r.PREFIX)}-image-indicator__list-item`,v.value===g?`${e.unref(r.PREFIX)}-image-indicator__active`:""]),onClick:B=>f(g)},[e.createVNode(e.unref(V.ScLayzImage),{src:u.url,alt:u.alt},null,8,["src","alt"])],10,j))),128))],2),i.showIntro?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`${e.unref(r.PREFIX)}-image-indicator__intro`),style:e.normalizeStyle(d.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.dataList,(u,g)=>(e.openBlock(),e.createElementBlock("div",{key:u.url,ref_for:!0,ref_key:"introItemRef",ref:o,class:e.normalizeClass([`${e.unref(r.PREFIX)}-image-indicator__intro-item`,v.value===g&&`${e.unref(r.PREFIX)}-image-indicator__active`])},[u.title?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(`${e.unref(r.PREFIX)}-image-indicator__intro-title`),innerHTML:u.title},null,10,G)):e.createCommentVNode("v-if",!0),u.desc?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(`${e.unref(r.PREFIX)}-image-indicator__intro-desc`),innerHTML:u.desc},null,10,J)):e.createCommentVNode("v-if",!0)],2))),128))],6)):e.createCommentVNode("v-if",!0)],2))}});P.install=l=>(l.component("ScImageIndicator",P),l);const T=P,K={class:"swiper-wrapper"},S=e.defineComponent({__name:"swiper-normal",props:{modelValue:{default:0},dataList:{},swiperOptions:{default:()=>({})},effect:{},showIntro:{type:Boolean,default:!0},videoProps:{},indicatorClass:{},tabIndicatorBottom:{},widthType:{default:"full"},indicatorType:{default:"tab"},showIndicator:{type:Boolean,default:!0},indicatorPosition:{default:"relative"}},emits:["change","update:modelValue"],setup(l,{emit:p}){const a=l,v=p;let o=null;const d=e.ref(a.modelValue),f=e.ref(),i=e.computed(()=>{const t=[`${r.PREFIX}-swiper-main`];return a.widthType==="middle"?t.push(`${r.PREFIX}-swiper-main__middle`):t.push(`${r.PREFIX}-swiper-main__full`),t}),h=e.computed(()=>{const t={};return a.tabIndicatorBottom&&(t.position="absolute",t.zIndex=1,t.bottom=typeof a.tabIndicatorBottom=="number"?`${a.tabIndicatorBottom}px`:a.tabIndicatorBottom),t});e.watch(()=>a.modelValue,()=>{d.value=a.modelValue,g(d.value)});const u=e.computed(()=>a.dataList.map(t=>({...t,url:t.type==="img"?t.url||"":t.poster||""}))),g=t=>{o==null||o.slideTo(t)},B=()=>{o==null||o.destroy(),f.value&&(o=new H.Swiper(f.value,{slidesPerView:1,allowTouchMove:!1,effect:a.effect,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},...a.swiperOptions}),o.on("slideChange",t=>{d.value=t.activeIndex,v("change",t.activeIndex),v("update:modelValue",t.activeIndex)}))};return e.onMounted(()=>{B(),window.addEventListener("resize",B)}),e.onBeforeUnmount(()=>{o==null||o.destroy(),window.removeEventListener("resize",B)}),(t,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`${e.unref(r.PREFIX)}-swiper`)},[e.createElementVNode("div",{ref_key:"swiperRef",ref:f,class:e.normalizeClass(i.value)},[e.createElementVNode("div",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataList,(m,y)=>(e.openBlock(),e.createElementBlock("div",{key:m.title,class:"swiper-slide"},[m.type==="img"?(e.openBlock(),e.createBlock(e.unref(V.ScLayzImage),{key:0,src:m.url,alt:m.alt},null,8,["src","alt"])):(e.openBlock(),e.createBlock(e.unref($.ScVideo),e.mergeProps({key:1,ref_for:!0},t.videoProps,{url:m.url,poster:m.poster,playable:d.value===y}),null,16,["url","poster","playable"])),m.mask?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(`${e.unref(r.PREFIX)}-swiper-mask`)},null,2)):e.createCommentVNode("v-if",!0)]))),128))]),w[2]||(w[2]=e.createStaticVNode('<div class="swiper-button-next"><svg xmlns="http://www.w3.org/2000/svg" width="25" height="24" viewBox="0 0 25 24" fill="none"><path d="M9.64299 3.12871L9.51887 5.83301L15.6859 12L9.51887 18.167L9.64299 20.8713L18.5143 12L9.64299 3.12871Z" fill="white"></path></svg></div><div class="swiper-button-prev"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M15.1289 3.12871L15.2531 5.83301L9.08609 12L15.2531 18.167L15.1289 20.8713L6.25766 12L15.1289 3.12871Z" fill="white"></path></svg></div>',2))],2),t.showIndicator?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.indicatorType==="tab"?(e.openBlock(),e.createBlock(e.unref(q.ScTabIndicator),{key:0,modelValue:d.value,"onUpdate:modelValue":w[0]||(w[0]=m=>d.value=m),class:e.normalizeClass([t.indicatorClass,t.indicatorPosition==="absolute"&&`${e.unref(r.PREFIX)}-swiper-indicator-absolute`]),dataList:t.dataList,"show-intro":t.showIntro,style:e.normalizeStyle(h.value),onChange:g},null,8,["modelValue","class","dataList","show-intro","style"])):(e.openBlock(),e.createBlock(e.unref(T),{key:1,modelValue:d.value,"onUpdate:modelValue":w[1]||(w[1]=m=>d.value=m),dataList:u.value,onChange:g},null,8,["modelValue","dataList"]))],64)):e.createCommentVNode("v-if",!0)],2))}});S.install=l=>(l.component("ScSwiperNormal",S),l);const F=S;exports.ScHorizontalViewer=Z;exports.ScImageIndicator=T;exports.ScSwiperNormal=F;
|