@community-release/nx-ui 0.0.28 → 0.0.30
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 +0 -5
- package/dist/module.d.ts +0 -5
- package/dist/module.json +1 -1
- package/dist/module.mjs +0 -5
- package/dist/runtime/components/accordion/index.vue +1 -0
- package/dist/runtime/components/animated-number/animateValue.mjs +2 -1
- package/dist/runtime/components/checkbox.vue +1 -1
- package/dist/runtime/components/notice/index.vue +1 -1
- package/dist/runtime/components/spoiler.vue +87 -0
- package/package.json +1 -1
- /package/dist/runtime/components/accordion/{item.vue → accordion-item.vue} +0 -0
- /package/dist/runtime/components/notice/{item.vue → notice-item.vue} +0 -0
package/dist/module.d.mts
CHANGED
|
@@ -192,11 +192,6 @@ 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
|
-
});
|
|
200
195
|
addComponent({
|
|
201
196
|
filePath: resolve("./runtime/components/map/zoom"),
|
|
202
197
|
name: "ui-map-zoom",
|
package/dist/module.d.ts
CHANGED
|
@@ -192,11 +192,6 @@ 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
|
-
});
|
|
200
195
|
addComponent({
|
|
201
196
|
filePath: resolve("./runtime/components/map/zoom"),
|
|
202
197
|
name: "ui-map-zoom",
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -192,11 +192,6 @@ 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
|
-
});
|
|
200
195
|
addComponent({
|
|
201
196
|
filePath: resolve("./runtime/components/map/zoom"),
|
|
202
197
|
name: "ui-map-zoom",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<script setup>
|
|
18
18
|
import { storeToRefs } from 'pinia';
|
|
19
19
|
import { useUINoticeStore } from './store';
|
|
20
|
-
import UiNoticeItem from './item.vue';
|
|
20
|
+
import UiNoticeItem from './notice-item.vue';
|
|
21
21
|
|
|
22
22
|
const store = useUINoticeStore();
|
|
23
23
|
const { items } = storeToRefs(store);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="component-ui-spoiler" :class="{'tag-active': isShown}">
|
|
3
|
+
<div class="content">
|
|
4
|
+
<div>
|
|
5
|
+
<slot></slot>
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="title" @click="handleClick">{{ isShown ? hideText : showText }}</div>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
import { watch, ref } from 'vue';
|
|
14
|
+
|
|
15
|
+
// Data
|
|
16
|
+
const emit = defineEmits(['update:modelValue']);
|
|
17
|
+
const props = defineProps({
|
|
18
|
+
showText: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: 'Show'
|
|
21
|
+
},
|
|
22
|
+
hideText: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: 'Hide'
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
modelValue: {
|
|
28
|
+
type: [Boolean, null],
|
|
29
|
+
default: null
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
let isShown = ref(false);
|
|
34
|
+
let hasModel = props.modelValue !== null;
|
|
35
|
+
|
|
36
|
+
if (hasModel) {
|
|
37
|
+
watch(() => props.modelValue, (v) => {
|
|
38
|
+
isShown.value = v;
|
|
39
|
+
}, { immediate: true });
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Methods
|
|
43
|
+
function handleClick() {
|
|
44
|
+
if (hasModel) {
|
|
45
|
+
emit('update:modelValue', !isShown.value);
|
|
46
|
+
} else {
|
|
47
|
+
isShown.value = !isShown.value;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<style lang="less">
|
|
53
|
+
.component-ui-spoiler {
|
|
54
|
+
@com-space-mini: var(--ui-space-mini);
|
|
55
|
+
@com-ani-ease: var(--ui-ani-ease);
|
|
56
|
+
@com-ani-time: var(--ui-ani-time);
|
|
57
|
+
@com-color-primary-text: var(--ui-color-primary-text);
|
|
58
|
+
@com-font-weight-medium: var(--ui-font-weight-medium);
|
|
59
|
+
|
|
60
|
+
> .title {
|
|
61
|
+
padding-top: @com-space-mini;
|
|
62
|
+
|
|
63
|
+
color: @com-color-primary-text;
|
|
64
|
+
font-weight: @com-font-weight-medium;
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
|
|
67
|
+
-webkit-user-select: none;
|
|
68
|
+
user-select: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
> .content {
|
|
72
|
+
transition: grid-template-rows @com-ani-time @com-ani-ease;
|
|
73
|
+
display: grid;
|
|
74
|
+
grid-template-rows: 0fr;
|
|
75
|
+
|
|
76
|
+
div {
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&.tag-active {
|
|
82
|
+
> .content {
|
|
83
|
+
grid-template-rows: 1fr;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
</style>
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|