@finema/finework-layer 0.0.2
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/.editorconfig +12 -0
- package/.nuxtrc +1 -0
- package/.playground/app.config.ts +5 -0
- package/.playground/nuxt.config.ts +12 -0
- package/.release-it.json +20 -0
- package/CHANGELOG.md +3 -0
- package/README.md +73 -0
- package/app/app.config.ts +298 -0
- package/app/app.vue +10 -0
- package/app/error.vue +218 -0
- package/app.config.ts +14 -0
- package/app.vue +3 -0
- package/bun.lock +2660 -0
- package/eslint.config.js +3 -0
- package/nuxt.config.ts +42 -0
- package/package.json +29 -0
- package/tsconfig.json +3 -0
package/.editorconfig
ADDED
package/.nuxtrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
typescript.includeWorkspace = true
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { fileURLToPath } from 'node:url'
|
|
2
|
+
|
|
3
|
+
export default defineNuxtConfig({
|
|
4
|
+
extends: ['..'],
|
|
5
|
+
modules: ['@nuxt/eslint'],
|
|
6
|
+
eslint: {
|
|
7
|
+
config: {
|
|
8
|
+
// Use the generated ESLint config for lint root project as well
|
|
9
|
+
rootDir: fileURLToPath(new URL('..', import.meta.url))
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
})
|
package/.release-it.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"git": {
|
|
3
|
+
"commitMessage": "chore(release): ${version}"
|
|
4
|
+
},
|
|
5
|
+
"npm": {
|
|
6
|
+
"publish": true
|
|
7
|
+
},
|
|
8
|
+
"hooks": {
|
|
9
|
+
},
|
|
10
|
+
"plugins": {
|
|
11
|
+
"@release-it/conventional-changelog": {
|
|
12
|
+
"preset": {
|
|
13
|
+
"name": "conventionalcommits"
|
|
14
|
+
},
|
|
15
|
+
"infile": "CHANGELOG.md",
|
|
16
|
+
"header": "# Changelog",
|
|
17
|
+
"ignoreRecommendedBump": true
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
package/CHANGELOG.md
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Nuxt Layer Starter
|
|
2
|
+
|
|
3
|
+
Create Nuxt extendable layer with this GitHub template.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
Make sure to install the dependencies:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm install
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Working on your layer
|
|
14
|
+
|
|
15
|
+
Your layer is at the root of this repository, it is exactly like a regular Nuxt project, except you can publish it on NPM.
|
|
16
|
+
|
|
17
|
+
The `.playground` directory should help you on trying your layer during development.
|
|
18
|
+
|
|
19
|
+
Running `pnpm dev` will prepare and boot `.playground` directory, which imports your layer itself.
|
|
20
|
+
|
|
21
|
+
## Distributing your layer
|
|
22
|
+
|
|
23
|
+
Your Nuxt layer is shaped exactly the same as any other Nuxt project, except you can publish it on NPM.
|
|
24
|
+
|
|
25
|
+
To do so, you only have to check if `files` in `package.json` are valid, then run:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm publish --access public
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Once done, your users will only have to run:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install --save your-layer
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Then add the dependency to their `extends` in `nuxt.config`:
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
defineNuxtConfig({
|
|
41
|
+
extends: 'your-layer'
|
|
42
|
+
})
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Development Server
|
|
46
|
+
|
|
47
|
+
Start the development server on http://localhost:3000
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pnpm dev
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Production
|
|
54
|
+
|
|
55
|
+
Build the application for production:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pnpm build
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Or statically generate it with:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pnpm generate
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Locally preview production build:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pnpm preview
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Checkout the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
|
|
2
|
+
export default defineAppConfig({
|
|
3
|
+
core: {
|
|
4
|
+
is_thai_year: false,
|
|
5
|
+
is_thai_month: false,
|
|
6
|
+
date_format: 'dd MMM yyyy',
|
|
7
|
+
month_format: 'MMM yyyy',
|
|
8
|
+
date_time_format: 'dd/MM/yyyy HH:mm น.',
|
|
9
|
+
color: '#335AFF',
|
|
10
|
+
limit_per_page: 15,
|
|
11
|
+
locale: 'en',
|
|
12
|
+
},
|
|
13
|
+
ui: {
|
|
14
|
+
colors: {
|
|
15
|
+
white: 'white',
|
|
16
|
+
},
|
|
17
|
+
dialog: {
|
|
18
|
+
icons: {
|
|
19
|
+
iconInfo: 'material-symbols:info-outline',
|
|
20
|
+
iconConfirm: 'material-symbols:info-outline',
|
|
21
|
+
},
|
|
22
|
+
slots: {
|
|
23
|
+
iconWrapper: 'rounded-full size-[48px] flex justify-center items-center',
|
|
24
|
+
icon: 'size-6',
|
|
25
|
+
base: [
|
|
26
|
+
'rounded-xl flex-col justify-start items-start space-x-0 bg-[url(/dialog-bg.png)] bg-no-repeat bg-top-left bg-size-[220px]',
|
|
27
|
+
'max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:right-0 max-sm:translate-x-0 max-sm:translate-y-0 max-sm:w-full max-sm:max-w-full max-sm:rounded-b-none max-sm:rounded-t-xl',
|
|
28
|
+
],
|
|
29
|
+
overlay: 'bg-black/50 backdrop-blur',
|
|
30
|
+
description: 'whitespace-pre-line',
|
|
31
|
+
wrapper: 'justify-start items-start',
|
|
32
|
+
title: 'mt-4',
|
|
33
|
+
buttonGroup: 'justify-center w-full mt-6',
|
|
34
|
+
cancelButton: 'w-full justify-center',
|
|
35
|
+
confirmButton: 'w-full justify-center',
|
|
36
|
+
},
|
|
37
|
+
variants: {
|
|
38
|
+
color: {
|
|
39
|
+
success: {
|
|
40
|
+
icon: 'text-success',
|
|
41
|
+
iconWrapper: 'bg-success/10',
|
|
42
|
+
},
|
|
43
|
+
info: {
|
|
44
|
+
icon: 'text-info',
|
|
45
|
+
iconWrapper: 'bg-info/10',
|
|
46
|
+
},
|
|
47
|
+
warning: {
|
|
48
|
+
icon: 'text-warning',
|
|
49
|
+
iconWrapper: 'bg-warning/10',
|
|
50
|
+
},
|
|
51
|
+
error: {
|
|
52
|
+
icon: 'text-error',
|
|
53
|
+
iconWrapper: 'bg-error/10',
|
|
54
|
+
},
|
|
55
|
+
loading: {
|
|
56
|
+
icon: 'text-primary size-10',
|
|
57
|
+
base: 'max-w-[400px] bg-none',
|
|
58
|
+
wrapper: 'justify-center',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
confirm: {
|
|
62
|
+
true: {},
|
|
63
|
+
false: {},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
slideover: {
|
|
68
|
+
slots: {
|
|
69
|
+
overlay: 'bg-black/50 backdrop-blur',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
toast: {
|
|
73
|
+
slots: {
|
|
74
|
+
root: 'rounded-xl',
|
|
75
|
+
icon: 'size-8',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
card: {
|
|
79
|
+
slots: {
|
|
80
|
+
root: '!bg-white',
|
|
81
|
+
header: 'text-lg font-bold',
|
|
82
|
+
},
|
|
83
|
+
variants: {
|
|
84
|
+
variant: {
|
|
85
|
+
soft: {
|
|
86
|
+
root: 'bg-elevated/50 divide-y divide-default shadow-[0px_2px_14px_0px_rgba(0,0,0,0.06)]',
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
switch: {
|
|
92
|
+
slots: {
|
|
93
|
+
base: 'cursor-pointer',
|
|
94
|
+
label: 'cursor-pointer',
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
breadcrumb: {
|
|
98
|
+
variants: {
|
|
99
|
+
active: {
|
|
100
|
+
true: {
|
|
101
|
+
link: 'text-black font-semibold',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
tabs: {
|
|
107
|
+
slots: {
|
|
108
|
+
label: 'whitespace-nowrap',
|
|
109
|
+
list: 'relative flex p-1 group overflow-x-auto overflow-y-hidden scrollbar-hide',
|
|
110
|
+
trigger: 'data-[state=active]:font-bold cursor-pointer whitespace-nowrap shrink-0',
|
|
111
|
+
},
|
|
112
|
+
defaultVariants: {
|
|
113
|
+
size: 'xl',
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
modal: {
|
|
117
|
+
slots: {
|
|
118
|
+
overlay: 'bg-black/50 backdrop-blur',
|
|
119
|
+
title: 'text-xl font-bold',
|
|
120
|
+
content: [
|
|
121
|
+
'divide-none overflow-visible flex flex-col',
|
|
122
|
+
'max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:right-0 max-sm:translate-x-0 max-sm:translate-y-0 max-sm:w-full max-sm:max-w-full max-sm:h-auto max-sm:max-h-[90dvh] max-sm:rounded-b-none max-sm:rounded-t-lg',
|
|
123
|
+
],
|
|
124
|
+
body: 'sm:pt-0 pt-0 overflow-y-auto flex-1 overflow-x-visible',
|
|
125
|
+
footer: 'w-full',
|
|
126
|
+
},
|
|
127
|
+
variants: {
|
|
128
|
+
fullscreen: {
|
|
129
|
+
false: {
|
|
130
|
+
content: 'overflow-visible',
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
pagination: {
|
|
136
|
+
slots: {
|
|
137
|
+
first: 'disabled:hidden',
|
|
138
|
+
prev: 'disabled:hidden',
|
|
139
|
+
next: 'disabled:hidden',
|
|
140
|
+
last: 'disabled:hidden',
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
table: {
|
|
144
|
+
slots: {
|
|
145
|
+
root: 'rounded-t-md rounded-b-md bg-white',
|
|
146
|
+
captionContainer: 'hidden',
|
|
147
|
+
paginationInfo: 'text-gray-600',
|
|
148
|
+
paginationContainer: 'items-center flex-col lg:flex-row gap-4',
|
|
149
|
+
thead: 'bg-primary',
|
|
150
|
+
th: 'text-[#222222] bg-white whitespace-nowrap',
|
|
151
|
+
td: 'text-[#222222]',
|
|
152
|
+
},
|
|
153
|
+
variants: {
|
|
154
|
+
pinned: {
|
|
155
|
+
true: {
|
|
156
|
+
th: 'sticky bg-gray-100 data-[pinned=left]:left-0 data-[pinned=right]:right-0 z-[100] ',
|
|
157
|
+
td: 'sticky bg-gray-50 data-[pinned=left]:left-0 data-[pinned=right]:right-0 ',
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
sticky: {
|
|
161
|
+
true: {
|
|
162
|
+
thead: 'sticky top-0 inset-x-0 bg-primary z-[1] backdrop-blur',
|
|
163
|
+
tfoot: 'sticky bottom-0 inset-x-0 bg-white z-[1] backdrop-blur',
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
formField: {
|
|
169
|
+
slots: {
|
|
170
|
+
label: 'font-bold',
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
input: {
|
|
174
|
+
variants: {
|
|
175
|
+
size: {
|
|
176
|
+
xl: {
|
|
177
|
+
base: 'py-2.5 disabled:bg-[#F5F5F5] disabled:text-[#737373] disabled:cursor-not-allowed',
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
defaultVariants: {
|
|
182
|
+
size: 'xl',
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
inputNumber: {
|
|
186
|
+
variants: {
|
|
187
|
+
size: {
|
|
188
|
+
xl: 'py-2.5 disabled:bg-[#F5F5F5] disabled:text-[#737373] disabled:cursor-not-allowed',
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
defaultVariants: {
|
|
192
|
+
size: 'xl',
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
inputTags: {
|
|
196
|
+
variants: {
|
|
197
|
+
size: {
|
|
198
|
+
xl: {
|
|
199
|
+
base: 'py-2.5 disabled:bg-[#F5F5F5] disabled:text-[#737373] disabled:cursor-not-allowed w-full',
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
defaultVariants: {
|
|
204
|
+
size: 'xl',
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
dateTime: {
|
|
208
|
+
slots: {
|
|
209
|
+
clearIcon: 'size-6 mr-3',
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
selectMenu: {
|
|
213
|
+
slots: {
|
|
214
|
+
base: 'cursor-pointer w-full',
|
|
215
|
+
item: 'cursor-pointer max-sm:h-14',
|
|
216
|
+
clearIcon: 'size-6',
|
|
217
|
+
},
|
|
218
|
+
variants: {
|
|
219
|
+
size: {
|
|
220
|
+
xl: {
|
|
221
|
+
base: 'py-2.5 disabled:bg-[#F5F5F5] disabled:text-[#737373] disabled:cursor-not-allowed',
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
defaultVariants: {
|
|
226
|
+
size: 'xl',
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
textarea: {
|
|
230
|
+
variants: {
|
|
231
|
+
size: {
|
|
232
|
+
xl: {
|
|
233
|
+
base: 'py-2.5 disabled:bg-[#F5F5F5] disabled:text-[#737373] disabled:cursor-not-allowed',
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
defaultVariants: {
|
|
238
|
+
size: 'xl',
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
button: {
|
|
242
|
+
slots: {
|
|
243
|
+
base: ['rounded-lg cursor-pointer'],
|
|
244
|
+
},
|
|
245
|
+
variants: {
|
|
246
|
+
size: {
|
|
247
|
+
xl: {
|
|
248
|
+
base: 'py-2.5 font-semibold',
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
compoundVariants: [
|
|
253
|
+
{
|
|
254
|
+
color: 'white',
|
|
255
|
+
variant: 'solid',
|
|
256
|
+
class: 'text-black',
|
|
257
|
+
},
|
|
258
|
+
],
|
|
259
|
+
defaultVariants: {
|
|
260
|
+
size: 'xl',
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
stepper: {
|
|
264
|
+
variants: {
|
|
265
|
+
size: {
|
|
266
|
+
xs: {
|
|
267
|
+
trigger: 'size-8',
|
|
268
|
+
icon: 'size-6',
|
|
269
|
+
title: 'text-base font-bold',
|
|
270
|
+
description: 'text-sm',
|
|
271
|
+
wrapper: 'mt-1.5',
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
defaultVariants: {
|
|
276
|
+
size: 'xs',
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
dropdownMenu: {
|
|
280
|
+
slots: {
|
|
281
|
+
content: 'cursor-pointer w-full',
|
|
282
|
+
item: 'cursor-pointer max-sm:h-14',
|
|
283
|
+
clearIcon: 'size-6',
|
|
284
|
+
},
|
|
285
|
+
variants: {
|
|
286
|
+
size: {
|
|
287
|
+
lg: {
|
|
288
|
+
content: 'text-sm py-2.5 disabled:bg-[#F5F5F5] disabled:text-[#737373] disabled:cursor-not-allowed',
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
defaultVariants: {
|
|
293
|
+
size: 'lg',
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
|
|
297
|
+
},
|
|
298
|
+
})
|