@community-release/nx-ui 0.0.18 → 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 +226 -5
- package/dist/module.d.ts +226 -5
- package/dist/module.json +1 -1
- package/dist/module.mjs +6 -2
- 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/dist/runtime/plugins/methods.mjs +23 -20
- package/dist/runtime/plugins/variables.mjs +21 -17
- package/dist/types.d.mts +2 -10
- package/dist/types.d.ts +2 -10
- package/package.json +10 -10
- package/dist/runtime/components/accordion.vue +0 -221
package/dist/types.d.ts
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import type {
|
|
2
|
+
import type { } from './module'
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
declare module '@nuxt/schema' {
|
|
6
|
-
interface NuxtConfig { ['ui']?: Partial<ModuleOptions> }
|
|
7
|
-
interface NuxtOptions { ['ui']?: ModuleOptions }
|
|
8
|
-
}
|
|
9
5
|
|
|
10
|
-
declare module 'nuxt/schema' {
|
|
11
|
-
interface NuxtConfig { ['ui']?: Partial<ModuleOptions> }
|
|
12
|
-
interface NuxtOptions { ['ui']?: ModuleOptions }
|
|
13
|
-
}
|
|
14
6
|
|
|
15
7
|
|
|
16
|
-
export type {
|
|
8
|
+
export type { default } from './module'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@community-release/nx-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"description": "nx-ui - Nuxt UI library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,13 +10,11 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
-
"types": "./dist/types.d.ts",
|
|
14
13
|
"import": "./dist/module.mjs",
|
|
15
14
|
"require": "./dist/module.cjs"
|
|
16
15
|
}
|
|
17
16
|
},
|
|
18
17
|
"main": "./dist/module.cjs",
|
|
19
|
-
"types": "./dist/types.d.ts",
|
|
20
18
|
"files": [
|
|
21
19
|
"dist"
|
|
22
20
|
],
|
|
@@ -26,34 +24,35 @@
|
|
|
26
24
|
"@nuxtjs/i18n": "^8.3.1",
|
|
27
25
|
"@pinia/nuxt": "^0.5.1",
|
|
28
26
|
"ol": "^9.1.0",
|
|
29
|
-
"pinia": "^2.1.7"
|
|
27
|
+
"pinia": "^2.1.7",
|
|
28
|
+
"vue": "^3.4.31"
|
|
30
29
|
},
|
|
31
30
|
"devDependencies": {
|
|
32
31
|
"@nuxt/devtools": "latest",
|
|
33
32
|
"@nuxt/module-builder": "^0.5.5",
|
|
34
33
|
"@nuxt/schema": "^3.11.2",
|
|
35
34
|
"@nuxt/test-utils": "^3.12.0",
|
|
36
|
-
"@types/node": "^20.12.4",
|
|
37
35
|
"@vitejs/plugin-vue": "^5.0.5",
|
|
38
36
|
"@vue/test-utils": "^2.4.6",
|
|
39
37
|
"@vuedoc/md": "^4.0.0-beta8",
|
|
40
38
|
"@vuedoc/parser": "^4.0.0-beta14",
|
|
41
39
|
"changelogen": "^0.5.5",
|
|
40
|
+
"cross-env": "^7.0.3",
|
|
42
41
|
"happy-dom": "^14.12.0",
|
|
43
42
|
"less": "^3.9.0",
|
|
44
43
|
"less-loader": "^5.0.0",
|
|
45
44
|
"nuxt": "^3.12.1",
|
|
46
|
-
"typescript": "^5.4.5",
|
|
47
45
|
"vite-raw-plugin": "^1.0.2",
|
|
48
46
|
"vitest": "^1.6.0",
|
|
49
|
-
"vue-docgen-cli": "^4.79.0"
|
|
47
|
+
"vue-docgen-cli": "^4.79.0",
|
|
48
|
+
"vue-tsc": "^2.0.24"
|
|
50
49
|
},
|
|
51
50
|
"resolutions": {
|
|
52
51
|
"string-width": "4.2.3"
|
|
53
52
|
},
|
|
54
53
|
"scripts": {
|
|
55
54
|
"prepack": "nuxt-module-build build",
|
|
56
|
-
"dev": "nuxi dev docs",
|
|
55
|
+
"dev": "nuxi dev docs --host",
|
|
57
56
|
"build": "nuxi build docs",
|
|
58
57
|
"prepare": "nuxt-module-build build && nuxt-module-build prepare && nuxi prepare docs",
|
|
59
58
|
"release": "npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
|
|
@@ -61,6 +60,7 @@
|
|
|
61
60
|
"test:watch": "vitest watch",
|
|
62
61
|
"test:com": "vitest components run",
|
|
63
62
|
"test:genmocks": "node ./src/utils/generateTestMocks.mjs",
|
|
64
|
-
"docs:components": "vue-docgen"
|
|
63
|
+
"docs:components": "vue-docgen",
|
|
64
|
+
"docs:generate": "npm run generate:production -prefix ./docs"
|
|
65
65
|
}
|
|
66
|
-
}
|
|
66
|
+
}
|
|
@@ -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>
|