@community-release/nx-ui 0.0.19 → 0.0.20
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.d.mts +5 -0
- package/dist/module.d.ts +5 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +5 -0
- package/dist/runtime/components/accordion/index.vue +73 -0
- package/dist/runtime/components/accordion/item.vue +191 -0
- package/dist/runtime/components/accordion/props.json +4 -0
- package/dist/runtime/components/button/index.vue.d.ts +100 -80
- package/dist/runtime/components/grid.vue.d.ts +66 -55
- package/dist/runtime/components/impulse-indicator.vue.d.ts +16 -19
- package/dist/runtime/components/map/store.d.ts +1 -25
- package/package.json +1 -1
- package/dist/runtime/components/accordion.vue +0 -221
package/dist/module.d.mts
CHANGED
|
@@ -192,6 +192,11 @@ var module = defineNuxtModule({
|
|
|
192
192
|
global: false,
|
|
193
193
|
extensions: ["vue"]
|
|
194
194
|
});
|
|
195
|
+
addComponent({
|
|
196
|
+
filePath: resolve("./runtime/components/accordion/item"),
|
|
197
|
+
name: "ui-accordion-item",
|
|
198
|
+
global: false
|
|
199
|
+
});
|
|
195
200
|
addComponent({
|
|
196
201
|
filePath: resolve("./runtime/components/map/zoom"),
|
|
197
202
|
name: "ui-map-zoom",
|
package/dist/module.d.ts
CHANGED
|
@@ -192,6 +192,11 @@ var module = defineNuxtModule({
|
|
|
192
192
|
global: false,
|
|
193
193
|
extensions: ["vue"]
|
|
194
194
|
});
|
|
195
|
+
addComponent({
|
|
196
|
+
filePath: resolve("./runtime/components/accordion/item"),
|
|
197
|
+
name: "ui-accordion-item",
|
|
198
|
+
global: false
|
|
199
|
+
});
|
|
195
200
|
addComponent({
|
|
196
201
|
filePath: resolve("./runtime/components/map/zoom"),
|
|
197
202
|
name: "ui-map-zoom",
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -192,6 +192,11 @@ const module = defineNuxtModule({
|
|
|
192
192
|
global: false,
|
|
193
193
|
extensions: ["vue"]
|
|
194
194
|
});
|
|
195
|
+
addComponent({
|
|
196
|
+
filePath: resolve("./runtime/components/accordion/item"),
|
|
197
|
+
name: "ui-accordion-item",
|
|
198
|
+
global: false
|
|
199
|
+
});
|
|
195
200
|
addComponent({
|
|
196
201
|
filePath: resolve("./runtime/components/map/zoom"),
|
|
197
202
|
name: "ui-map-zoom",
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="component-ui-accordion">
|
|
3
|
+
<ui-accordion-item v-if="list.length" v-for="item of list" :title="item.title">
|
|
4
|
+
{{ item.text }}
|
|
5
|
+
</ui-accordion-item>
|
|
6
|
+
<slot></slot>
|
|
7
|
+
</section>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup>
|
|
11
|
+
// Imports
|
|
12
|
+
import { ref, computed, provide } from 'vue';
|
|
13
|
+
import comProps from '#build/ui.accordion.mjs';
|
|
14
|
+
|
|
15
|
+
// Data
|
|
16
|
+
const props = defineProps({
|
|
17
|
+
/** Icon for light theme or light & dark theme*/
|
|
18
|
+
icon: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: comProps.icon
|
|
21
|
+
},
|
|
22
|
+
/** Icon for dark theme */
|
|
23
|
+
iconDark: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: comProps.iconDark
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* Accordion elements list, AccordionListItem = {title: '', text: ''}
|
|
29
|
+
* @values AccordionListItem[]
|
|
30
|
+
*/
|
|
31
|
+
list: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default: () => []
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* Slide that is active(open) by default, null = all closed
|
|
37
|
+
* @values 1, 2, 3, 1000, null
|
|
38
|
+
*/
|
|
39
|
+
active: {
|
|
40
|
+
type: [Number, null],
|
|
41
|
+
default: 0
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const activeItem = ref(props.active);
|
|
46
|
+
const itemCounter = ref(0);
|
|
47
|
+
|
|
48
|
+
const iconLightComputed = computed(() => {
|
|
49
|
+
return props.icon !== '' ? `url(${props.icon})` : 'none';
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const iconDarkComputed = computed(() => {
|
|
53
|
+
return props.iconDark !== '' ? `url(${props.iconDark})` : iconLightComputed.value;
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
provide('accordionData', {
|
|
57
|
+
itemCounter,
|
|
58
|
+
activeItem,
|
|
59
|
+
haveIcon: !!props.icon
|
|
60
|
+
});
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<style lang="less">
|
|
64
|
+
// Themes settings
|
|
65
|
+
.theme-light .component-ui-accordion .icon,
|
|
66
|
+
.theme-lowvision .component-ui-accordion .icon {
|
|
67
|
+
background-image: v-bind(iconLightComputed);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.theme-dark .component-ui-accordion .icon {
|
|
71
|
+
background-image: v-bind(iconDarkComputed);
|
|
72
|
+
}
|
|
73
|
+
</style>
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="component-ui-accordion-item"
|
|
3
|
+
:class="{'tag-active': accordionData.activeItem.value === id, 'tag-icon': accordionData.haveIcon}"
|
|
4
|
+
>
|
|
5
|
+
<div class="header" @click="accordionData.activeItem.value = id">
|
|
6
|
+
<i class="icon"></i>
|
|
7
|
+
<div class="title">{{ title }}</div>
|
|
8
|
+
<div class="btn-toggle"></div>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="text">
|
|
11
|
+
<div><slot /></div>
|
|
12
|
+
</div>
|
|
13
|
+
</section>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup>
|
|
17
|
+
// Import
|
|
18
|
+
import { inject } from 'vue'
|
|
19
|
+
|
|
20
|
+
// Data
|
|
21
|
+
const accordionData = inject('accordionData', null);
|
|
22
|
+
const props = defineProps({
|
|
23
|
+
title: String,
|
|
24
|
+
text: String,
|
|
25
|
+
});
|
|
26
|
+
const id = accordionData.itemCounter.value++;
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<style lang="less">
|
|
30
|
+
@import (less) '../styles/components.less';
|
|
31
|
+
|
|
32
|
+
// Misc
|
|
33
|
+
@com-icon-size: 30px;
|
|
34
|
+
@com-icon-size-small: 26px;
|
|
35
|
+
@com-btn-size: 20px;
|
|
36
|
+
@com-btn-width: 2px;
|
|
37
|
+
@com-btn-padding: 40px;
|
|
38
|
+
@com-btn-padding-small: 35px;
|
|
39
|
+
|
|
40
|
+
@com-ani-time: var(--ui-ani-time);
|
|
41
|
+
@com-ani-ease: var(--ui-ani-ease);
|
|
42
|
+
|
|
43
|
+
@com-text-line-height: var(--ui-text-line-height);
|
|
44
|
+
|
|
45
|
+
// Padding
|
|
46
|
+
@com-space-default: var(--ui-space-default);
|
|
47
|
+
@com-space-small: var(--ui-space-small);
|
|
48
|
+
@com-space-mini: var(--ui-space-mini);
|
|
49
|
+
|
|
50
|
+
// Colors
|
|
51
|
+
@com-color-border: var(--ui-color-border);
|
|
52
|
+
@com-color-header-text: var(--ui-color-header-text);
|
|
53
|
+
|
|
54
|
+
// Text
|
|
55
|
+
@com-text-medium: var(--ui-text-medium);
|
|
56
|
+
@com-text-default: var(--ui-text-default);
|
|
57
|
+
|
|
58
|
+
// Font
|
|
59
|
+
@com-font-header: var(--ui-font-header);
|
|
60
|
+
|
|
61
|
+
.component-ui-accordion-item {
|
|
62
|
+
--ui-accordion-icon-size: 0;
|
|
63
|
+
--ui-accordion-btn-padding: @com-btn-padding;
|
|
64
|
+
|
|
65
|
+
padding-bottom: @com-space-small;
|
|
66
|
+
margin-top: @com-space-small;
|
|
67
|
+
border-bottom: 1px solid @com-color-border;
|
|
68
|
+
font-size: @com-text-medium;
|
|
69
|
+
|
|
70
|
+
.header {
|
|
71
|
+
position: relative;
|
|
72
|
+
padding: @com-space-small var(--ui-accordion-btn-padding) @com-space-small calc(var(--ui-accordion-icon-size) + @com-space-default);
|
|
73
|
+
margin-bottom: @com-space-mini;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.icon,
|
|
78
|
+
.btn-toggle {
|
|
79
|
+
transform: translateY(-50%);
|
|
80
|
+
position: absolute;
|
|
81
|
+
top: 50%;
|
|
82
|
+
width: @com-icon-size;
|
|
83
|
+
height: @com-icon-size;
|
|
84
|
+
line-height: @com-icon-size;
|
|
85
|
+
text-align: center;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.icon {
|
|
89
|
+
left: 0;
|
|
90
|
+
background-position: center;
|
|
91
|
+
background-size: contain;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.title {
|
|
95
|
+
font-family: @com-font-header;
|
|
96
|
+
font-weight: 600;
|
|
97
|
+
color: @com-color-header-text;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.btn-toggle {
|
|
101
|
+
right: 0;
|
|
102
|
+
|
|
103
|
+
&:before,
|
|
104
|
+
&:after {
|
|
105
|
+
content: '';
|
|
106
|
+
|
|
107
|
+
transition: all @com-ani-time @com-ani-ease;
|
|
108
|
+
transform-origin: center;
|
|
109
|
+
position: absolute;
|
|
110
|
+
background: @com-color-header-text;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// |
|
|
114
|
+
&:before {
|
|
115
|
+
top: (@com-icon-size/2) - (@com-btn-size / 2);
|
|
116
|
+
left: (@com-icon-size/2) - (@com-btn-width / 2);
|
|
117
|
+
width: @com-btn-width;
|
|
118
|
+
height: @com-btn-size;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// —
|
|
122
|
+
&:after {
|
|
123
|
+
top: (@com-icon-size/2) - (@com-btn-width / 2);
|
|
124
|
+
left: (@com-icon-size/2) - (@com-btn-size / 2);
|
|
125
|
+
width: @com-btn-size;
|
|
126
|
+
height: @com-btn-width;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.text {
|
|
131
|
+
transition: grid-template-rows @com-ani-time @com-ani-ease;
|
|
132
|
+
display: grid;
|
|
133
|
+
grid-template-rows: 0fr;
|
|
134
|
+
line-height: @com-text-line-height;
|
|
135
|
+
font-size: @com-text-default;
|
|
136
|
+
|
|
137
|
+
div {
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
&:last-child {
|
|
144
|
+
border-bottom: none;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Active state
|
|
148
|
+
&.tag-active {
|
|
149
|
+
.text {
|
|
150
|
+
grid-template-rows: 1fr;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.btn-toggle {
|
|
154
|
+
&:before,
|
|
155
|
+
&:after {
|
|
156
|
+
transform: rotate(90deg);
|
|
157
|
+
}
|
|
158
|
+
&:after {
|
|
159
|
+
opacity: 0;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&.tag-icon {
|
|
165
|
+
// .header {
|
|
166
|
+
// position: relative;
|
|
167
|
+
// padding: @com-space-small var(--ui-accordion-btn-padding) @com-space-small calc(var(--ui-accordion-icon-size) + @com-space-default);
|
|
168
|
+
// margin-bottom: @com-space-mini;
|
|
169
|
+
// cursor: pointer;
|
|
170
|
+
// }
|
|
171
|
+
--ui-accordion-icon-size: @com-icon-size;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@media only screen and (max-width: 500px) {
|
|
176
|
+
.component-ui-accordion-item {
|
|
177
|
+
&.tag-icon {
|
|
178
|
+
--ui-accordion-icon-size: @com-icon-size-small;
|
|
179
|
+
}
|
|
180
|
+
//--ui-accordion-icon-size: @com-icon-size-small;
|
|
181
|
+
--ui-accordion-btn-padding: @com-btn-padding-small;
|
|
182
|
+
|
|
183
|
+
font-size: @com-text-default;
|
|
184
|
+
|
|
185
|
+
.icon {
|
|
186
|
+
width: 26px;
|
|
187
|
+
height: 26px;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
</style>
|
|
@@ -1,81 +1,101 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
color: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: any;
|
|
5
|
+
};
|
|
6
|
+
size: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: any;
|
|
9
|
+
};
|
|
10
|
+
variant: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: any;
|
|
13
|
+
};
|
|
14
|
+
shape: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: any;
|
|
17
|
+
};
|
|
18
|
+
href: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
type: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
block: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
loading: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
disabled: {
|
|
35
|
+
type: (BooleanConstructor | NumberConstructor)[];
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
}, any, {
|
|
39
|
+
impulse: boolean;
|
|
40
|
+
}, {
|
|
41
|
+
computedType(): any;
|
|
42
|
+
classes(): string[];
|
|
43
|
+
stylesHoverColor(): string;
|
|
44
|
+
styles(): {
|
|
45
|
+
background: string;
|
|
46
|
+
color: string;
|
|
47
|
+
};
|
|
48
|
+
buttonBgStyle(): {
|
|
49
|
+
background: string;
|
|
50
|
+
};
|
|
51
|
+
}, {
|
|
52
|
+
handleClick(e: any): void;
|
|
53
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
54
|
+
color: {
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
default: any;
|
|
57
|
+
};
|
|
58
|
+
size: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: any;
|
|
61
|
+
};
|
|
62
|
+
variant: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: any;
|
|
65
|
+
};
|
|
66
|
+
shape: {
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
default: any;
|
|
69
|
+
};
|
|
70
|
+
href: {
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
default: string;
|
|
73
|
+
};
|
|
74
|
+
type: {
|
|
75
|
+
type: StringConstructor;
|
|
76
|
+
default: string;
|
|
77
|
+
};
|
|
78
|
+
block: {
|
|
79
|
+
type: BooleanConstructor;
|
|
80
|
+
default: boolean;
|
|
81
|
+
};
|
|
82
|
+
loading: {
|
|
83
|
+
type: BooleanConstructor;
|
|
84
|
+
default: boolean;
|
|
85
|
+
};
|
|
86
|
+
disabled: {
|
|
87
|
+
type: (BooleanConstructor | NumberConstructor)[];
|
|
88
|
+
default: boolean;
|
|
89
|
+
};
|
|
90
|
+
}>>, {
|
|
91
|
+
type: string;
|
|
92
|
+
loading: boolean;
|
|
93
|
+
color: string;
|
|
94
|
+
size: string;
|
|
95
|
+
variant: string;
|
|
96
|
+
shape: string;
|
|
97
|
+
href: string;
|
|
98
|
+
block: boolean;
|
|
99
|
+
disabled: number | boolean;
|
|
100
|
+
}, {}>;
|
|
81
101
|
export default _default;
|
|
@@ -1,56 +1,67 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
textAlign: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
gap: {
|
|
7
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
gridTemplateColumns: {
|
|
11
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
gapTop: {
|
|
15
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
gapBottom: {
|
|
19
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
}, any, {
|
|
23
|
+
timeout: null;
|
|
24
|
+
windowWidth: number;
|
|
25
|
+
}, {
|
|
26
|
+
getClasses(): string[];
|
|
27
|
+
getStyle(): {
|
|
28
|
+
'grid-gap': any;
|
|
29
|
+
'grid-template-columns': any;
|
|
30
|
+
'padding-top': any;
|
|
31
|
+
'padding-bottom': any;
|
|
32
|
+
};
|
|
33
|
+
computedItemMaxWidth(): number;
|
|
34
|
+
computedGridTemplateColumns(): any;
|
|
35
|
+
computedGap(): any;
|
|
36
|
+
}, {
|
|
37
|
+
handleResize(): void;
|
|
38
|
+
onResize(): void;
|
|
39
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
40
|
+
textAlign: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
gap: {
|
|
45
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
gridTemplateColumns: {
|
|
49
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
gapTop: {
|
|
53
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
gapBottom: {
|
|
57
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
}>>, {
|
|
61
|
+
textAlign: string;
|
|
62
|
+
gap: string | Record<string, any>;
|
|
63
|
+
gridTemplateColumns: string | Record<string, any>;
|
|
64
|
+
gapTop: string | boolean;
|
|
65
|
+
gapBottom: string | boolean;
|
|
66
|
+
}, {}>;
|
|
56
67
|
export default _default;
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export let type: (ObjectConstructor | BooleanConstructor)[];
|
|
6
|
-
let _default: boolean;
|
|
7
|
-
export { _default as default };
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
function data(): {
|
|
11
|
-
impulseArray: never[];
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
impulse: {
|
|
3
|
+
type: (ObjectConstructor | BooleanConstructor)[];
|
|
4
|
+
default: boolean;
|
|
12
5
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
}, any, {
|
|
7
|
+
impulseArray: never[];
|
|
8
|
+
}, {}, {
|
|
9
|
+
addImpulse(options: any): void;
|
|
10
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
impulse: {
|
|
12
|
+
type: (ObjectConstructor | BooleanConstructor)[];
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
}>>, {
|
|
16
|
+
impulse: boolean | Record<string, any>;
|
|
17
|
+
}, {}>;
|
|
21
18
|
export default _default;
|
|
@@ -16,31 +16,7 @@ export const useMapStore: import("pinia").StoreDefinition<"map", {
|
|
|
16
16
|
* @param {string|number} id
|
|
17
17
|
* @returns MapMarker
|
|
18
18
|
*/
|
|
19
|
-
getMarker(state:
|
|
20
|
-
coord: never[];
|
|
21
|
-
zoom: number;
|
|
22
|
-
zoomMin: number;
|
|
23
|
-
zoomMax: number;
|
|
24
|
-
deviceZoom: boolean;
|
|
25
|
-
markerImage: string;
|
|
26
|
-
markerActiveImage: string;
|
|
27
|
-
markerDisabledImage: string;
|
|
28
|
-
markers: never[];
|
|
29
|
-
selectedMarker: null;
|
|
30
|
-
disabledMarkers: never[];
|
|
31
|
-
} & import("pinia").PiniaCustomStateProperties<{
|
|
32
|
-
coord: never[];
|
|
33
|
-
zoom: number;
|
|
34
|
-
zoomMin: number;
|
|
35
|
-
zoomMax: number;
|
|
36
|
-
deviceZoom: boolean;
|
|
37
|
-
markerImage: string;
|
|
38
|
-
markerActiveImage: string;
|
|
39
|
-
markerDisabledImage: string;
|
|
40
|
-
markers: never[];
|
|
41
|
-
selectedMarker: null;
|
|
42
|
-
disabledMarkers: never[];
|
|
43
|
-
}>): (id: any) => null;
|
|
19
|
+
getMarker(state: any): (id: any) => any;
|
|
44
20
|
}, {
|
|
45
21
|
/**
|
|
46
22
|
* Set map zoom
|
package/package.json
CHANGED
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section class="component-ui-accordion">
|
|
3
|
-
<div v-for="(item, index) of list" class="item" :class="{'tag-active': activeItem === index}">
|
|
4
|
-
<div class="header" @click="toggle(index)">
|
|
5
|
-
<i class="icon"></i>
|
|
6
|
-
<div class="title">{{ item.title }}</div>
|
|
7
|
-
<div class="btn-toggle"></div>
|
|
8
|
-
</div>
|
|
9
|
-
<div class="text">
|
|
10
|
-
<div v-html="item.text"></div>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
</section>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script setup>
|
|
17
|
-
// Imports
|
|
18
|
-
import { ref, computed } from 'vue'
|
|
19
|
-
|
|
20
|
-
// Data
|
|
21
|
-
const props = defineProps({
|
|
22
|
-
/** Icon for light theme */
|
|
23
|
-
iconLight: {
|
|
24
|
-
type: String,
|
|
25
|
-
},
|
|
26
|
-
/** Icon for dark theme */
|
|
27
|
-
iconDark: {
|
|
28
|
-
type: String,
|
|
29
|
-
},
|
|
30
|
-
/**
|
|
31
|
-
* Accordion elements list, AccordionListItem = {title: '', text: ''}
|
|
32
|
-
* @values AccordionListItem[]
|
|
33
|
-
*/
|
|
34
|
-
list: {
|
|
35
|
-
type: Array,
|
|
36
|
-
},
|
|
37
|
-
/**
|
|
38
|
-
* Slide that is active(open) by default, null = all closed
|
|
39
|
-
* @values 1, 2, 3, 1000, null
|
|
40
|
-
*/
|
|
41
|
-
active: {
|
|
42
|
-
type: [Number, null],
|
|
43
|
-
default: 0
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
const activeItem = ref(props.active);
|
|
48
|
-
|
|
49
|
-
const iconLightComputed = computed(() => {
|
|
50
|
-
return props.iconLight ? `url(${props.iconLight})` : 'none';
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
const iconDarkComputed = computed(() => {
|
|
54
|
-
return props.iconDark ? `url(${props.iconDark})` : 'none';
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
// Methods
|
|
58
|
-
function toggle(i) {
|
|
59
|
-
activeItem.value = activeItem.value === i ? null : i;
|
|
60
|
-
}
|
|
61
|
-
</script>
|
|
62
|
-
|
|
63
|
-
<style lang="less">
|
|
64
|
-
@import (less) './styles/components.less';
|
|
65
|
-
|
|
66
|
-
// Misc
|
|
67
|
-
@com-icon-size: 30px;
|
|
68
|
-
@com-btn-size: 20px;
|
|
69
|
-
@com-btn-width: 2px;
|
|
70
|
-
|
|
71
|
-
@com-ani-time: var(--ui-ani-time);
|
|
72
|
-
@com-ani-ease: var(--ui-ani-ease);
|
|
73
|
-
|
|
74
|
-
@com-text-line-height: var(--ui-text-line-height);
|
|
75
|
-
|
|
76
|
-
// Padding
|
|
77
|
-
@com-space-default: var(--ui-space-default);
|
|
78
|
-
@com-space-small: var(--ui-space-small);
|
|
79
|
-
@com-space-mini: var(--ui-space-mini);
|
|
80
|
-
|
|
81
|
-
// Colors
|
|
82
|
-
@com-color-border: var(--ui-color-border);
|
|
83
|
-
@com-color-header-text: var(--ui-color-header-text);
|
|
84
|
-
|
|
85
|
-
// Text
|
|
86
|
-
@com-text-medium: var(--ui-text-medium);
|
|
87
|
-
@com-text-default: var(--ui-text-default);
|
|
88
|
-
|
|
89
|
-
// Font
|
|
90
|
-
@com-font-header: var(--ui-font-header);
|
|
91
|
-
|
|
92
|
-
.component-ui-accordion {
|
|
93
|
-
.item {
|
|
94
|
-
padding-bottom: @com-space-small;
|
|
95
|
-
margin-top: @com-space-small;
|
|
96
|
-
border-bottom: 1px solid @com-color-border;
|
|
97
|
-
font-size: @com-text-medium;
|
|
98
|
-
|
|
99
|
-
&:last-child {
|
|
100
|
-
border-bottom: none;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// Active state
|
|
104
|
-
&.tag-active {
|
|
105
|
-
.text {
|
|
106
|
-
grid-template-rows: 1fr;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.btn-toggle {
|
|
110
|
-
&:before,
|
|
111
|
-
&:after {
|
|
112
|
-
transform: rotate(90deg);
|
|
113
|
-
}
|
|
114
|
-
&:after {
|
|
115
|
-
opacity: 0;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.header {
|
|
122
|
-
position: relative;
|
|
123
|
-
padding: @com-space-small 40px @com-space-small calc(@com-icon-size + @com-space-default);
|
|
124
|
-
margin-bottom: @com-space-mini;
|
|
125
|
-
cursor: pointer;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.icon,
|
|
129
|
-
.btn-toggle {
|
|
130
|
-
transform: translateY(-50%);
|
|
131
|
-
position: absolute;
|
|
132
|
-
top: 50%;
|
|
133
|
-
width: @com-icon-size;
|
|
134
|
-
height: @com-icon-size;
|
|
135
|
-
line-height: @com-icon-size;
|
|
136
|
-
text-align: center;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.icon {
|
|
140
|
-
left: 0;
|
|
141
|
-
background-position: center;
|
|
142
|
-
background-size: contain;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.title {
|
|
146
|
-
font-family: @com-font-header;
|
|
147
|
-
font-weight: 600;
|
|
148
|
-
color: @com-color-header-text;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.btn-toggle {
|
|
152
|
-
right: 0;
|
|
153
|
-
|
|
154
|
-
&:before,
|
|
155
|
-
&:after {
|
|
156
|
-
content: '';
|
|
157
|
-
|
|
158
|
-
transition: all @com-ani-time @com-ani-ease;
|
|
159
|
-
transform-origin: center;
|
|
160
|
-
position: absolute;
|
|
161
|
-
background: @com-color-header-text;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// |
|
|
165
|
-
&:before {
|
|
166
|
-
top: (@com-icon-size/2) - (@com-btn-size / 2);
|
|
167
|
-
left: (@com-icon-size/2) - (@com-btn-width / 2);
|
|
168
|
-
width: @com-btn-width;
|
|
169
|
-
height: @com-btn-size;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
// —
|
|
173
|
-
&:after {
|
|
174
|
-
top: (@com-icon-size/2) - (@com-btn-width / 2);
|
|
175
|
-
left: (@com-icon-size/2) - (@com-btn-size / 2);
|
|
176
|
-
width: @com-btn-size;
|
|
177
|
-
height: @com-btn-width;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.text {
|
|
182
|
-
transition: grid-template-rows @com-ani-time @com-ani-ease;
|
|
183
|
-
display: grid;
|
|
184
|
-
grid-template-rows: 0fr;
|
|
185
|
-
line-height: @com-text-line-height;
|
|
186
|
-
font-size: @com-text-default;
|
|
187
|
-
|
|
188
|
-
div {
|
|
189
|
-
overflow: hidden;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
// Themes settings
|
|
195
|
-
.theme-light .component-ui-accordion .icon,
|
|
196
|
-
.theme-lowvision .component-ui-accordion .icon {
|
|
197
|
-
background-image: v-bind(iconLightComputed);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.theme-dark .component-ui-accordion .icon {
|
|
201
|
-
background-image: v-bind(iconDarkComputed);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
@media only screen and (max-width: 500px) {
|
|
206
|
-
.component-ui-accordion {
|
|
207
|
-
.item {
|
|
208
|
-
font-size: @com-text-default;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.header {
|
|
212
|
-
padding: @com-space-small 35px @com-space-small calc(26 + @com-space-default);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.icon {
|
|
216
|
-
width: 26px;
|
|
217
|
-
height: 26px;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
</style>
|