@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.
@@ -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>
@@ -0,0 +1,4 @@
1
+ {
2
+ "icon": "",
3
+ "iconDark": ""
4
+ }
@@ -1,81 +1,101 @@
1
- declare namespace _default {
2
- namespace components {
3
- export { UiImpulseIndicator };
4
- export { UiLoading };
5
- }
6
- namespace props {
7
- export namespace color {
8
- export let type: StringConstructor;
9
- let _default: any;
10
- export { _default as default };
11
- }
12
- export namespace size {
13
- let type_1: StringConstructor;
14
- export { type_1 as type };
15
- let _default_1: any;
16
- export { _default_1 as default };
17
- }
18
- export namespace variant {
19
- let type_2: StringConstructor;
20
- export { type_2 as type };
21
- let _default_2: any;
22
- export { _default_2 as default };
23
- }
24
- export namespace shape {
25
- let type_3: StringConstructor;
26
- export { type_3 as type };
27
- let _default_3: any;
28
- export { _default_3 as default };
29
- }
30
- export namespace href {
31
- let type_4: StringConstructor;
32
- export { type_4 as type };
33
- let _default_4: string;
34
- export { _default_4 as default };
35
- }
36
- export namespace type_5 {
37
- let type_6: StringConstructor;
38
- export { type_6 as type };
39
- let _default_5: string;
40
- export { _default_5 as default };
41
- }
42
- export { type_5 as type };
43
- export namespace block {
44
- let type_7: BooleanConstructor;
45
- export { type_7 as type };
46
- let _default_6: boolean;
47
- export { _default_6 as default };
48
- }
49
- export namespace loading {
50
- let type_8: BooleanConstructor;
51
- export { type_8 as type };
52
- let _default_7: boolean;
53
- export { _default_7 as default };
54
- }
55
- export namespace disabled {
56
- let type_9: (BooleanConstructor | NumberConstructor)[];
57
- export { type_9 as type };
58
- let _default_8: boolean;
59
- export { _default_8 as default };
60
- }
61
- }
62
- function data(): {
63
- impulse: boolean;
64
- };
65
- namespace computed {
66
- function computedType(): any;
67
- function classes(): string[];
68
- function stylesHoverColor(): string;
69
- function styles(): {
70
- background: string;
71
- color: string;
72
- };
73
- function buttonBgStyle(): {
74
- background: string;
75
- };
76
- }
77
- namespace methods {
78
- function handleClick(e: any): void;
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 namespace _default {
2
- namespace props {
3
- namespace textAlign {
4
- export let type: StringConstructor;
5
- let _default: string;
6
- export { _default as default };
7
- }
8
- namespace gap {
9
- let type_1: (StringConstructor | ObjectConstructor)[];
10
- export { type_1 as type };
11
- let _default_1: string;
12
- export { _default_1 as default };
13
- }
14
- namespace gridTemplateColumns {
15
- let type_2: (StringConstructor | ObjectConstructor)[];
16
- export { type_2 as type };
17
- let _default_2: string;
18
- export { _default_2 as default };
19
- }
20
- namespace gapTop {
21
- let type_3: (StringConstructor | BooleanConstructor)[];
22
- export { type_3 as type };
23
- let _default_3: boolean;
24
- export { _default_3 as default };
25
- }
26
- namespace gapBottom {
27
- let type_4: (StringConstructor | BooleanConstructor)[];
28
- export { type_4 as type };
29
- let _default_4: boolean;
30
- export { _default_4 as default };
31
- }
32
- }
33
- function data(): {
34
- timeout: null;
35
- windowWidth: number;
36
- };
37
- namespace computed {
38
- function getClasses(): string[];
39
- function getStyle(): {
40
- 'grid-gap': () => any;
41
- 'grid-template-columns': () => any;
42
- 'padding-top': any;
43
- 'padding-bottom': any;
44
- };
45
- function computedItemMaxWidth(): number;
46
- function computedGridTemplateColumns(): any;
47
- function computedGap(): any;
48
- }
49
- namespace methods {
50
- function handleResize(): void;
51
- function onResize(): void;
52
- }
53
- function mounted(): void;
54
- function beforeDestroy(): void;
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 namespace _default {
2
- let name: string;
3
- namespace props {
4
- namespace impulse {
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
- namespace watch {
14
- function impulse(options: any): void;
15
- }
16
- namespace methods {
17
- function addImpulse(options: any): void;
18
- }
19
- function mounted(): void;
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
@@ -1,20 +1,23 @@
1
- import { defineNuxtPlugin } from "#app";
2
- import { useUINoticeStore } from "../components/notice/store.mjs";
3
- export default defineNuxtPlugin(function(nuxt) {
4
- const noticeStore = useUINoticeStore();
5
- return {
6
- provide: {
7
- showNotice(duration, templateComponent, templateProps) {
8
- const id = noticeStore.add({
9
- duration,
10
- templateComponent,
11
- templateProps
12
- });
13
- return id;
14
- },
15
- hideNotice(id) {
16
- noticeStore.remove(id);
17
- }
18
- }
19
- };
20
- });
1
+ import { defineNuxtPlugin } from '#app';
2
+ import { useUINoticeStore } from '../components/notice/store.mjs';
3
+
4
+ export default defineNuxtPlugin(function (nuxt) {
5
+ const noticeStore = useUINoticeStore();
6
+
7
+ return {
8
+ provide: {
9
+ showNotice(duration = 8000, templateComponent, templateProps = {}) {
10
+ const id = noticeStore.add({
11
+ duration,
12
+ templateComponent,
13
+ templateProps
14
+ });
15
+
16
+ return id;
17
+ },
18
+ hideNotice(id) {
19
+ noticeStore.remove(id);
20
+ }
21
+ },
22
+ };
23
+ });
@@ -1,17 +1,21 @@
1
- import { computed } from "vue";
2
- import { defineNuxtPlugin } from "#app";
3
- import { useHead } from "#imports";
4
- import style from "#build/ui.style.mjs";
5
- export default defineNuxtPlugin(function(nuxt) {
6
- const computedStyle = computed(() => style);
7
- const headData = {
8
- style: [
9
- {
10
- innerHTML: () => computedStyle.value,
11
- tagPriority: -2,
12
- id: "nuxt-ui-style"
13
- }
14
- ]
15
- };
16
- useHead(headData);
17
- });
1
+ import { computed } from 'vue';
2
+ import { defineNuxtPlugin } from '#app';
3
+ import { useHead } from '#imports';
4
+
5
+ import style from '#build/ui.style.mjs';
6
+
7
+ export default defineNuxtPlugin(function(nuxt) {
8
+ const computedStyle = computed(() => style);
9
+
10
+ const headData = {
11
+ style: [
12
+ {
13
+ innerHTML: () => computedStyle.value,
14
+ tagPriority: -2,
15
+ id: 'nuxt-ui-style',
16
+ },
17
+ ],
18
+ };
19
+
20
+ useHead(headData);
21
+ });
package/dist/types.d.mts CHANGED
@@ -1,16 +1,8 @@
1
1
 
2
- import type { ModuleOptions } from './module.js'
2
+ import type { } from './module.js'
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 { ModuleOptions, default } from './module.js'
8
+ export type { default } from './module.js'