vunor 0.0.3 → 0.0.5
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/nuxt.d.ts +0 -0
- package/dist/nuxt.mjs +52 -0
- package/dist/theme.d.ts +8 -127
- package/package.json +8 -3
- package/src/components/Button/Button.vue +1 -0
- package/src/components/Input/InputShell.vue +5 -3
package/dist/nuxt.d.ts
ADDED
|
File without changes
|
package/dist/nuxt.mjs
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineNuxtModule as a, addComponent as r } from "@nuxt/kit";
|
|
2
|
+
var u = [
|
|
3
|
+
"AppLayout",
|
|
4
|
+
"Button",
|
|
5
|
+
"ButtonBase",
|
|
6
|
+
"Card",
|
|
7
|
+
"CardHeader",
|
|
8
|
+
"CardInner",
|
|
9
|
+
"Checkbox",
|
|
10
|
+
"Combobox",
|
|
11
|
+
"Icon",
|
|
12
|
+
"Input",
|
|
13
|
+
"InputShell",
|
|
14
|
+
"Label",
|
|
15
|
+
"LoadingIndicator",
|
|
16
|
+
"Menu",
|
|
17
|
+
"MenuItem",
|
|
18
|
+
"OverflowContainer",
|
|
19
|
+
"Pagination",
|
|
20
|
+
"Popover",
|
|
21
|
+
"RadioGroup",
|
|
22
|
+
"Select",
|
|
23
|
+
"SelectBase",
|
|
24
|
+
"Slider"
|
|
25
|
+
];
|
|
26
|
+
const o = u, d = a({
|
|
27
|
+
meta: {
|
|
28
|
+
name: "vunor/nuxt",
|
|
29
|
+
configKey: "vunor",
|
|
30
|
+
compatibility: {
|
|
31
|
+
nuxt: ">=3.0.0"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
defaults: {
|
|
35
|
+
// prefix: '',
|
|
36
|
+
components: !0
|
|
37
|
+
},
|
|
38
|
+
setup(n) {
|
|
39
|
+
if (n.components) {
|
|
40
|
+
const t = Array.isArray(n.components) ? o.filter((e) => n.components.includes(e)) : o;
|
|
41
|
+
for (const e of t)
|
|
42
|
+
r({
|
|
43
|
+
name: `Vu${e}`,
|
|
44
|
+
export: "default",
|
|
45
|
+
filePath: `vunor/${e}.vue`
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
d as default
|
|
52
|
+
};
|
package/dist/theme.d.ts
CHANGED
|
@@ -1,133 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { presetVunor } from './theme/preset-vunor';
|
|
2
|
+
import { scFromObject } from './theme/utils/shortcut-obj';
|
|
3
|
+
import { shortcuts } from './components/shortcuts';
|
|
4
|
+
import { TVunorTheme } from './theme/theme';
|
|
5
5
|
|
|
6
|
-
export
|
|
7
|
-
palette?: TPaletteOptions;
|
|
8
|
-
}>;
|
|
6
|
+
export { presetVunor }
|
|
9
7
|
|
|
10
|
-
export
|
|
8
|
+
export { scFromObject }
|
|
11
9
|
|
|
12
|
-
export
|
|
13
|
-
btn: string;
|
|
14
|
-
'btn-square': string;
|
|
15
|
-
'btn-label': string;
|
|
16
|
-
'btn-icon': string;
|
|
17
|
-
} | {
|
|
18
|
-
card: string;
|
|
19
|
-
} | {
|
|
20
|
-
'checkbox-root': string;
|
|
21
|
-
checkbox: string;
|
|
22
|
-
'checkbox-indicator': string;
|
|
23
|
-
'checkbox-icon': string;
|
|
24
|
-
'checkbox-label': string;
|
|
25
|
-
} | {
|
|
26
|
-
'combobox-multi-input': string;
|
|
27
|
-
'combobox-multi-items': string;
|
|
28
|
-
'combobox-embedded-input': string;
|
|
29
|
-
'combobox-c8-icon': string;
|
|
30
|
-
} | {
|
|
31
|
-
'loading-indicator': string;
|
|
32
|
-
'loading-indicator-ring': string;
|
|
33
|
-
} | {
|
|
34
|
-
'menu-root': string;
|
|
35
|
-
'menu-item': string;
|
|
36
|
-
} | {
|
|
37
|
-
'rb-container': string;
|
|
38
|
-
'rb-label': string;
|
|
39
|
-
'rb-root': string;
|
|
40
|
-
'rb-item-wrapper': string;
|
|
41
|
-
'rb-item': string;
|
|
42
|
-
'rb-item-indicator': string;
|
|
43
|
-
'rb-item-label': string;
|
|
44
|
-
} | {
|
|
45
|
-
'select-content': string;
|
|
46
|
-
'select-scroll-btn': string;
|
|
47
|
-
'select-grp-label': string;
|
|
48
|
-
'select-item': string;
|
|
49
|
-
'select-separator': string;
|
|
50
|
-
} | {
|
|
51
|
-
slider: string;
|
|
52
|
-
'slider-track': string;
|
|
53
|
-
'slider-range': string;
|
|
54
|
-
'slider-thumb': string;
|
|
55
|
-
})[];
|
|
10
|
+
export { shortcuts }
|
|
56
11
|
|
|
57
|
-
|
|
58
|
-
palette?: TPaletteOptions;
|
|
59
|
-
}) => {
|
|
60
|
-
colors: {
|
|
61
|
-
[x: string]: string;
|
|
62
|
-
};
|
|
63
|
-
surfaces: Record<string, [string, string, string, string, string, string]>;
|
|
64
|
-
borderColor: string;
|
|
65
|
-
reverseLightLayers: boolean;
|
|
66
|
-
reverseDarkLayers: boolean;
|
|
67
|
-
lineHeight: {
|
|
68
|
-
fingertip: string;
|
|
69
|
-
'fingertip-half': string;
|
|
70
|
-
'fingertip-xs': string;
|
|
71
|
-
'fingertip-s': string;
|
|
72
|
-
'fingertip-m': string;
|
|
73
|
-
'fingertip-l': string;
|
|
74
|
-
'fingertip-xl': string;
|
|
75
|
-
};
|
|
76
|
-
spacing: Record<string, string>;
|
|
77
|
-
fontWeight: Record<string, string>;
|
|
78
|
-
actualFontHeightFactor: number;
|
|
79
|
-
cardSpacingFactor: {
|
|
80
|
-
regular: number;
|
|
81
|
-
dense: number;
|
|
82
|
-
};
|
|
83
|
-
fontSize: Record<string, [TTypographyNames, Record<string, string>]>;
|
|
84
|
-
width: Record<string, string>;
|
|
85
|
-
height: Record<string, string>;
|
|
86
|
-
maxWidth: Record<string, string>;
|
|
87
|
-
maxHeight: Record<string, string>;
|
|
88
|
-
minWidth: Record<string, string>;
|
|
89
|
-
minHeight: Record<string, string>;
|
|
90
|
-
borderRadius: {
|
|
91
|
-
base: string;
|
|
92
|
-
};
|
|
93
|
-
animation: {
|
|
94
|
-
durations: {
|
|
95
|
-
'slide-down-and-fade': string;
|
|
96
|
-
'slide-left-and-fade': string;
|
|
97
|
-
'slide-up-and-fade': string;
|
|
98
|
-
'slide-right-and-fade': string;
|
|
99
|
-
'zoom-fade-in': string;
|
|
100
|
-
};
|
|
101
|
-
keyframes: {
|
|
102
|
-
'slide-down-and-fade': string;
|
|
103
|
-
'slide-left-and-fade': string;
|
|
104
|
-
'slide-up-and-fade': string;
|
|
105
|
-
'slide-right-and-fade': string;
|
|
106
|
-
'zoom-fade-in': string;
|
|
107
|
-
'loading-dashoffset': string;
|
|
108
|
-
'cb-appear': string;
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
declare interface TPaletteOptions {
|
|
114
|
-
colors?: {
|
|
115
|
-
primary?: string;
|
|
116
|
-
secondary?: string;
|
|
117
|
-
grey?: string;
|
|
118
|
-
neutral?: string;
|
|
119
|
-
good?: string;
|
|
120
|
-
warn?: string;
|
|
121
|
-
error?: string;
|
|
122
|
-
};
|
|
123
|
-
lightest?: number;
|
|
124
|
-
darkest?: number;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
declare type TScString = string | string[];
|
|
128
|
-
|
|
129
|
-
declare type TShortcutObject = Record<string, Record<string, Record<string, TScString | undefined> | TScString | undefined> | TScString | undefined>;
|
|
130
|
-
|
|
131
|
-
export declare type TVunorTheme = ReturnType<typeof themeFactory> & Theme;
|
|
12
|
+
export { TVunorTheme }
|
|
132
13
|
|
|
133
14
|
export { }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vunor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite",
|
|
@@ -33,6 +33,10 @@
|
|
|
33
33
|
"import": "./dist/vite.mjs",
|
|
34
34
|
"types": "./dist/vite.d.ts"
|
|
35
35
|
},
|
|
36
|
+
"./nuxt": {
|
|
37
|
+
"import": "./dist/nuxt.mjs",
|
|
38
|
+
"types": "./dist/nuxt.d.ts"
|
|
39
|
+
},
|
|
36
40
|
"./Input.vue": "./src/components/Input/Input.vue",
|
|
37
41
|
"./InputBase.vue": "./src/components/Input/InputBase.vue",
|
|
38
42
|
"./Button.vue": "./src/components/Button/Button.vue",
|
|
@@ -59,6 +63,7 @@
|
|
|
59
63
|
"./utils": "./src/components/utils/index.ts"
|
|
60
64
|
},
|
|
61
65
|
"devDependencies": {
|
|
66
|
+
"@nuxt/kit": "^3.12.4",
|
|
62
67
|
"@iconify/utils": "^2.1.23",
|
|
63
68
|
"@prostojs/palitra": "^0.0.3",
|
|
64
69
|
"@tsconfig/node20": "^20.1.4",
|
|
@@ -75,8 +80,8 @@
|
|
|
75
80
|
"unocss-preset-scrollbar": "^0.3.1",
|
|
76
81
|
"unplugin-auto-import": "^0.17.6",
|
|
77
82
|
"unplugin-vue-components": "^0.27.0",
|
|
78
|
-
"vite": "^5.
|
|
79
|
-
"vite-plugin-dts": "^
|
|
83
|
+
"vite": "^5.3.5",
|
|
84
|
+
"vite-plugin-dts": "^4.0.0-beta.2",
|
|
80
85
|
"vitest": "^1.6.0",
|
|
81
86
|
"vue-tsc": "^2.0.11"
|
|
82
87
|
}
|
|
@@ -47,6 +47,8 @@ function focusInput(event: MouseEvent) {
|
|
|
47
47
|
input.focus()
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
+
|
|
51
|
+
const hasValue = computed(() => (modelValue.value ? '' : undefined))
|
|
50
52
|
</script>
|
|
51
53
|
|
|
52
54
|
<template>
|
|
@@ -60,7 +62,7 @@ function focusInput(event: MouseEvent) {
|
|
|
60
62
|
'segmented': groupItem,
|
|
61
63
|
}"
|
|
62
64
|
v-bind="attrs"
|
|
63
|
-
:data-has-value="
|
|
65
|
+
:data-has-value="hasValue"
|
|
64
66
|
:data-active="focused || active"
|
|
65
67
|
>
|
|
66
68
|
<span class="i8-underline" />
|
|
@@ -75,7 +77,7 @@ function focusInput(event: MouseEvent) {
|
|
|
75
77
|
'i8-icon-clickable': !!onPrependClick,
|
|
76
78
|
}"
|
|
77
79
|
>
|
|
78
|
-
<slot name="prepend" v-bind="attrs" :data-has-value="
|
|
80
|
+
<slot name="prepend" v-bind="attrs" :data-has-value="hasValue">
|
|
79
81
|
<VuIcon :name="iconPrepend!" @click="emit('prependClick', $event)" />
|
|
80
82
|
</slot>
|
|
81
83
|
</div>
|
|
@@ -124,7 +126,7 @@ function focusInput(event: MouseEvent) {
|
|
|
124
126
|
<slot
|
|
125
127
|
name="append"
|
|
126
128
|
v-bind="attrs"
|
|
127
|
-
:data-has-value="
|
|
129
|
+
:data-has-value="hasValue"
|
|
128
130
|
:emitClick="(event: MouseEvent) => emit('appendClick', event)"
|
|
129
131
|
:iconAppend
|
|
130
132
|
>
|