nuxt-ignis 0.2.5 → 0.3.0

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.
Files changed (65) hide show
  1. package/.nuxt/app.config.mjs +18 -0
  2. package/.nuxt/component-chunk.mjs +1 -0
  3. package/.nuxt/components.d.ts +190 -0
  4. package/.nuxt/dev/index.mjs +2948 -0
  5. package/.nuxt/dev/index.mjs.map +1 -0
  6. package/.nuxt/dist/server/client.manifest.json +18 -0
  7. package/.nuxt/dist/server/client.manifest.mjs +1 -0
  8. package/.nuxt/dist/server/server.mjs +1 -0
  9. package/.nuxt/eslint-typegen.d.ts +9401 -0
  10. package/.nuxt/eslint.config.d.mts +9 -0
  11. package/.nuxt/eslint.config.mjs +53 -0
  12. package/.nuxt/imports.d.ts +66 -0
  13. package/.nuxt/manifest/latest.json +1 -0
  14. package/.nuxt/manifest/meta/dev.json +1 -0
  15. package/.nuxt/modules/@nuxt-scripts.d.ts +13 -0
  16. package/.nuxt/nitro.json +17 -0
  17. package/.nuxt/nuxt-fonts-global.css +0 -0
  18. package/.nuxt/nuxt.d.ts +34 -0
  19. package/.nuxt/nuxt.json +9 -0
  20. package/.nuxt/schema/nuxt.schema.d.ts +17 -0
  21. package/.nuxt/schema/nuxt.schema.json +3 -0
  22. package/.nuxt/tsconfig.json +223 -0
  23. package/.nuxt/tsconfig.server.json +152 -0
  24. package/.nuxt/types/app-defaults.d.ts +7 -0
  25. package/.nuxt/types/app.config.d.ts +31 -0
  26. package/.nuxt/types/build.d.ts +25 -0
  27. package/.nuxt/types/builder-env.d.ts +1 -0
  28. package/.nuxt/types/imports.d.ts +829 -0
  29. package/.nuxt/types/layouts.d.ts +7 -0
  30. package/.nuxt/types/middleware.d.ts +7 -0
  31. package/.nuxt/types/nitro-config.d.ts +14 -0
  32. package/.nuxt/types/nitro-imports.d.ts +143 -0
  33. package/.nuxt/types/nitro-middleware.d.ts +6 -0
  34. package/.nuxt/types/nitro-nuxt.d.ts +34 -0
  35. package/.nuxt/types/nitro-routes.d.ts +20 -0
  36. package/.nuxt/types/nitro.d.ts +3 -0
  37. package/.nuxt/types/plugins.d.ts +38 -0
  38. package/.nuxt/types/schema.d.ts +450 -0
  39. package/.nuxt/types/vue-shim.d.ts +0 -0
  40. package/app.vue +16 -36
  41. package/assets/css/nuxt-ui.css +16 -0
  42. package/assets/css/tailwind.css +10 -44
  43. package/components/AppFeature.vue +47 -3
  44. package/components/AppFeatureList.vue +86 -26
  45. package/components/CurrentTime.vue +9 -9
  46. package/components/ignis/IgnisFooter.vue +16 -0
  47. package/components/ignis/IgnisHeader.vue +48 -0
  48. package/components/ignis/IgnisInfo.vue +26 -0
  49. package/composables/useTranslation.ts +11 -4
  50. package/content/second.md +4 -0
  51. package/features.ts +115 -17
  52. package/i18n/i18n.config.ts +2 -2
  53. package/{assets/lang → i18n/locales}/en.json +6 -1
  54. package/i18n/locales/es.json +4 -0
  55. package/nuxt.config.ts +26 -2
  56. package/package.json +70 -79
  57. package/pages/ignis.vue +3 -0
  58. package/pages/index.vue +1 -12
  59. package/tailwind.config.ts +2 -1
  60. package/utils/i18n-sources.ts +20 -2
  61. package/vueform.config.ts +20 -0
  62. package/.gitattributes +0 -2
  63. package/CHANGELOG.md +0 -72
  64. package/LICENSE +0 -21
  65. package/README.md +0 -147
@@ -0,0 +1,450 @@
1
+ import { NuxtModule, RuntimeConfig } from '@nuxt/schema'
2
+ declare module '@nuxt/schema' {
3
+ interface NuxtOptions {
4
+ /**
5
+ * Configuration for `@nuxt/eslint`
6
+ */
7
+ ["eslint"]: typeof import("@nuxt/eslint").default extends NuxtModule<infer O> ? O : Record<string, any>
8
+ /**
9
+ * Configuration for `@nuxt/fonts`
10
+ */
11
+ ["fonts"]: typeof import("@nuxt/fonts").default extends NuxtModule<infer O> ? O : Record<string, any>
12
+ /**
13
+ * Configuration for `@nuxt/image`
14
+ */
15
+ ["image"]: typeof import("@nuxt/image").default extends NuxtModule<infer O> ? O : Record<string, any>
16
+ /**
17
+ * Configuration for `@pinia/nuxt`
18
+ */
19
+ ["pinia"]: typeof import("@pinia/nuxt").default extends NuxtModule<infer O> ? O : Record<string, any>
20
+ /**
21
+ * Configuration for `@nuxt/scripts`
22
+ */
23
+ ["scripts"]: typeof import("@nuxt/scripts").default extends NuxtModule<infer O> ? O : Record<string, any>
24
+ /**
25
+ * Configuration for `nuxt-security`
26
+ */
27
+ ["security"]: typeof import("nuxt-security").default extends NuxtModule<infer O> ? O : Record<string, any>
28
+ /**
29
+ * Configuration for `@vueuse/nuxt`
30
+ */
31
+ ["vueuse"]: typeof import("@vueuse/nuxt").default extends NuxtModule<infer O> ? O : Record<string, any>
32
+ /**
33
+ * Configuration for `@nuxt/test-utils/module`
34
+ */
35
+ ["testUtils"]: typeof import("@nuxt/test-utils/module").default extends NuxtModule<infer O> ? O : Record<string, any>
36
+ /**
37
+ * Configuration for `@nuxt/devtools`
38
+ */
39
+ ["devtools"]: typeof import("@nuxt/devtools").default extends NuxtModule<infer O> ? O : Record<string, any>
40
+ /**
41
+ * Configuration for `@nuxt/telemetry`
42
+ */
43
+ ["telemetry"]: typeof import("@nuxt/telemetry").default extends NuxtModule<infer O> ? O : Record<string, any>
44
+ }
45
+ interface NuxtConfig {
46
+ /**
47
+ * Configuration for `@nuxt/eslint`
48
+ */
49
+ ["eslint"]?: typeof import("@nuxt/eslint").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
50
+ /**
51
+ * Configuration for `@nuxt/fonts`
52
+ */
53
+ ["fonts"]?: typeof import("@nuxt/fonts").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
54
+ /**
55
+ * Configuration for `@nuxt/image`
56
+ */
57
+ ["image"]?: typeof import("@nuxt/image").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
58
+ /**
59
+ * Configuration for `@pinia/nuxt`
60
+ */
61
+ ["pinia"]?: typeof import("@pinia/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
62
+ /**
63
+ * Configuration for `@nuxt/scripts`
64
+ */
65
+ ["scripts"]?: typeof import("@nuxt/scripts").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
66
+ /**
67
+ * Configuration for `nuxt-security`
68
+ */
69
+ ["security"]?: typeof import("nuxt-security").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
70
+ /**
71
+ * Configuration for `@vueuse/nuxt`
72
+ */
73
+ ["vueuse"]?: typeof import("@vueuse/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
74
+ /**
75
+ * Configuration for `@nuxt/test-utils/module`
76
+ */
77
+ ["testUtils"]?: typeof import("@nuxt/test-utils/module").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
78
+ /**
79
+ * Configuration for `@nuxt/devtools`
80
+ */
81
+ ["devtools"]?: typeof import("@nuxt/devtools").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
82
+ /**
83
+ * Configuration for `@nuxt/telemetry`
84
+ */
85
+ ["telemetry"]?: typeof import("@nuxt/telemetry").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
86
+ modules?: (undefined | null | false | NuxtModule<any> | string | [NuxtModule | string, Record<string, any>] | ["@nuxt/eslint", Exclude<NuxtConfig["eslint"], boolean>] | ["@nuxt/fonts", Exclude<NuxtConfig["fonts"], boolean>] | ["@nuxt/image", Exclude<NuxtConfig["image"], boolean>] | ["@pinia/nuxt", Exclude<NuxtConfig["pinia"], boolean>] | ["@nuxt/scripts", Exclude<NuxtConfig["scripts"], boolean>] | ["nuxt-security", Exclude<NuxtConfig["security"], boolean>] | ["@vueuse/nuxt", Exclude<NuxtConfig["vueuse"], boolean>] | ["@nuxt/test-utils/module", Exclude<NuxtConfig["testUtils"], boolean>] | ["@nuxt/devtools", Exclude<NuxtConfig["devtools"], boolean>] | ["@nuxt/telemetry", Exclude<NuxtConfig["telemetry"], boolean>])[],
87
+ }
88
+ }
89
+ declare module 'nuxt/schema' {
90
+ interface NuxtOptions {
91
+ /**
92
+ * Configuration for `@nuxt/eslint`
93
+ * @see https://www.npmjs.com/package/@nuxt/eslint
94
+ */
95
+ ["eslint"]: typeof import("@nuxt/eslint").default extends NuxtModule<infer O> ? O : Record<string, any>
96
+ /**
97
+ * Configuration for `@nuxt/fonts`
98
+ * @see https://www.npmjs.com/package/@nuxt/fonts
99
+ */
100
+ ["fonts"]: typeof import("@nuxt/fonts").default extends NuxtModule<infer O> ? O : Record<string, any>
101
+ /**
102
+ * Configuration for `@nuxt/image`
103
+ * @see https://www.npmjs.com/package/@nuxt/image
104
+ */
105
+ ["image"]: typeof import("@nuxt/image").default extends NuxtModule<infer O> ? O : Record<string, any>
106
+ /**
107
+ * Configuration for `@pinia/nuxt`
108
+ * @see https://www.npmjs.com/package/@pinia/nuxt
109
+ */
110
+ ["pinia"]: typeof import("@pinia/nuxt").default extends NuxtModule<infer O> ? O : Record<string, any>
111
+ /**
112
+ * Configuration for `@nuxt/scripts`
113
+ * @see https://www.npmjs.com/package/@nuxt/scripts
114
+ */
115
+ ["scripts"]: typeof import("@nuxt/scripts").default extends NuxtModule<infer O> ? O : Record<string, any>
116
+ /**
117
+ * Configuration for `nuxt-security`
118
+ * @see https://www.npmjs.com/package/nuxt-security
119
+ */
120
+ ["security"]: typeof import("nuxt-security").default extends NuxtModule<infer O> ? O : Record<string, any>
121
+ /**
122
+ * Configuration for `@vueuse/nuxt`
123
+ * @see https://www.npmjs.com/package/@vueuse/nuxt
124
+ */
125
+ ["vueuse"]: typeof import("@vueuse/nuxt").default extends NuxtModule<infer O> ? O : Record<string, any>
126
+ /**
127
+ * Configuration for `@nuxt/test-utils/module`
128
+ * @see https://www.npmjs.com/package/@nuxt/test-utils/module
129
+ */
130
+ ["testUtils"]: typeof import("@nuxt/test-utils/module").default extends NuxtModule<infer O> ? O : Record<string, any>
131
+ /**
132
+ * Configuration for `@nuxt/devtools`
133
+ * @see https://www.npmjs.com/package/@nuxt/devtools
134
+ */
135
+ ["devtools"]: typeof import("@nuxt/devtools").default extends NuxtModule<infer O> ? O : Record<string, any>
136
+ /**
137
+ * Configuration for `@nuxt/telemetry`
138
+ * @see https://www.npmjs.com/package/@nuxt/telemetry
139
+ */
140
+ ["telemetry"]: typeof import("@nuxt/telemetry").default extends NuxtModule<infer O> ? O : Record<string, any>
141
+ }
142
+ interface NuxtConfig {
143
+ /**
144
+ * Configuration for `@nuxt/eslint`
145
+ * @see https://www.npmjs.com/package/@nuxt/eslint
146
+ */
147
+ ["eslint"]?: typeof import("@nuxt/eslint").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
148
+ /**
149
+ * Configuration for `@nuxt/fonts`
150
+ * @see https://www.npmjs.com/package/@nuxt/fonts
151
+ */
152
+ ["fonts"]?: typeof import("@nuxt/fonts").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
153
+ /**
154
+ * Configuration for `@nuxt/image`
155
+ * @see https://www.npmjs.com/package/@nuxt/image
156
+ */
157
+ ["image"]?: typeof import("@nuxt/image").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
158
+ /**
159
+ * Configuration for `@pinia/nuxt`
160
+ * @see https://www.npmjs.com/package/@pinia/nuxt
161
+ */
162
+ ["pinia"]?: typeof import("@pinia/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
163
+ /**
164
+ * Configuration for `@nuxt/scripts`
165
+ * @see https://www.npmjs.com/package/@nuxt/scripts
166
+ */
167
+ ["scripts"]?: typeof import("@nuxt/scripts").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
168
+ /**
169
+ * Configuration for `nuxt-security`
170
+ * @see https://www.npmjs.com/package/nuxt-security
171
+ */
172
+ ["security"]?: typeof import("nuxt-security").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
173
+ /**
174
+ * Configuration for `@vueuse/nuxt`
175
+ * @see https://www.npmjs.com/package/@vueuse/nuxt
176
+ */
177
+ ["vueuse"]?: typeof import("@vueuse/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
178
+ /**
179
+ * Configuration for `@nuxt/test-utils/module`
180
+ * @see https://www.npmjs.com/package/@nuxt/test-utils/module
181
+ */
182
+ ["testUtils"]?: typeof import("@nuxt/test-utils/module").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
183
+ /**
184
+ * Configuration for `@nuxt/devtools`
185
+ * @see https://www.npmjs.com/package/@nuxt/devtools
186
+ */
187
+ ["devtools"]?: typeof import("@nuxt/devtools").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
188
+ /**
189
+ * Configuration for `@nuxt/telemetry`
190
+ * @see https://www.npmjs.com/package/@nuxt/telemetry
191
+ */
192
+ ["telemetry"]?: typeof import("@nuxt/telemetry").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
193
+ modules?: (undefined | null | false | NuxtModule<any> | string | [NuxtModule | string, Record<string, any>] | ["@nuxt/eslint", Exclude<NuxtConfig["eslint"], boolean>] | ["@nuxt/fonts", Exclude<NuxtConfig["fonts"], boolean>] | ["@nuxt/image", Exclude<NuxtConfig["image"], boolean>] | ["@pinia/nuxt", Exclude<NuxtConfig["pinia"], boolean>] | ["@nuxt/scripts", Exclude<NuxtConfig["scripts"], boolean>] | ["nuxt-security", Exclude<NuxtConfig["security"], boolean>] | ["@vueuse/nuxt", Exclude<NuxtConfig["vueuse"], boolean>] | ["@nuxt/test-utils/module", Exclude<NuxtConfig["testUtils"], boolean>] | ["@nuxt/devtools", Exclude<NuxtConfig["devtools"], boolean>] | ["@nuxt/telemetry", Exclude<NuxtConfig["telemetry"], boolean>])[],
194
+ }
195
+ interface RuntimeConfig {
196
+ app: {
197
+ buildId: string,
198
+
199
+ baseURL: string,
200
+
201
+ buildAssetsDir: string,
202
+
203
+ cdnURL: string,
204
+ },
205
+
206
+ nitro: {
207
+ envPrefix: string,
208
+ },
209
+
210
+ "nuxt-scripts": {
211
+ version: string,
212
+ },
213
+
214
+ private: {
215
+ basicAuth: boolean,
216
+ },
217
+
218
+ security: {
219
+ strict: boolean,
220
+
221
+ headers: {
222
+ crossOriginResourcePolicy: string,
223
+
224
+ crossOriginOpenerPolicy: string,
225
+
226
+ crossOriginEmbedderPolicy: string,
227
+
228
+ contentSecurityPolicy: {
229
+ "base-uri": Array<string>,
230
+
231
+ "font-src": Array<string>,
232
+
233
+ "form-action": Array<string>,
234
+
235
+ "frame-ancestors": Array<string>,
236
+
237
+ "img-src": Array<string>,
238
+
239
+ "object-src": Array<string>,
240
+
241
+ "script-src-attr": Array<string>,
242
+
243
+ "style-src": Array<string>,
244
+
245
+ "script-src": Array<string>,
246
+
247
+ "upgrade-insecure-requests": boolean,
248
+ },
249
+
250
+ originAgentCluster: string,
251
+
252
+ referrerPolicy: string,
253
+
254
+ strictTransportSecurity: {
255
+ maxAge: number,
256
+
257
+ includeSubdomains: boolean,
258
+ },
259
+
260
+ xContentTypeOptions: string,
261
+
262
+ xDNSPrefetchControl: string,
263
+
264
+ xDownloadOptions: string,
265
+
266
+ xFrameOptions: string,
267
+
268
+ xPermittedCrossDomainPolicies: string,
269
+
270
+ xXSSProtection: string,
271
+
272
+ permissionsPolicy: {
273
+ camera: Array<any>,
274
+
275
+ "display-capture": Array<any>,
276
+
277
+ fullscreen: Array<any>,
278
+
279
+ geolocation: Array<any>,
280
+
281
+ microphone: Array<any>,
282
+ },
283
+ },
284
+
285
+ requestSizeLimiter: {
286
+ maxRequestSizeInBytes: number,
287
+
288
+ maxUploadFileRequestInBytes: number,
289
+
290
+ throwError: boolean,
291
+ },
292
+
293
+ rateLimiter: {
294
+ tokensPerInterval: number,
295
+
296
+ interval: number,
297
+
298
+ headers: boolean,
299
+
300
+ driver: {
301
+ name: string,
302
+ },
303
+
304
+ whiteList: any,
305
+
306
+ throwError: boolean,
307
+ },
308
+
309
+ xssValidator: {
310
+ methods: Array<string>,
311
+
312
+ throwError: boolean,
313
+ },
314
+
315
+ corsHandler: {
316
+ origin: string,
317
+
318
+ methods: Array<string>,
319
+
320
+ preflight: {
321
+ statusCode: number,
322
+ },
323
+ },
324
+
325
+ allowedMethodsRestricter: {
326
+ methods: string,
327
+
328
+ throwError: boolean,
329
+ },
330
+
331
+ hidePoweredBy: boolean,
332
+
333
+ enabled: boolean,
334
+
335
+ csrf: boolean,
336
+
337
+ nonce: boolean,
338
+
339
+ removeLoggers: boolean,
340
+
341
+ ssg: {
342
+ meta: boolean,
343
+
344
+ hashScripts: boolean,
345
+
346
+ hashStyles: boolean,
347
+
348
+ nitroHeaders: boolean,
349
+
350
+ exportToPresets: boolean,
351
+ },
352
+
353
+ sri: boolean,
354
+ },
355
+ }
356
+ interface PublicRuntimeConfig {
357
+ ignis: {
358
+ log: {
359
+ level: string,
360
+ },
361
+
362
+ ssr: boolean,
363
+
364
+ pages: boolean,
365
+
366
+ preset: {
367
+ ui: string,
368
+
369
+ db: string,
370
+
371
+ forms: string,
372
+ },
373
+
374
+ core: {
375
+ eslint: boolean,
376
+
377
+ fonts: boolean,
378
+
379
+ image: boolean,
380
+
381
+ pinia: boolean,
382
+
383
+ time: boolean,
384
+
385
+ scripts: boolean,
386
+
387
+ security: boolean,
388
+
389
+ vueuse: boolean,
390
+ },
391
+
392
+ ui: boolean,
393
+
394
+ tailwind: boolean,
395
+
396
+ neon: boolean,
397
+
398
+ supabase: boolean,
399
+
400
+ i18n: {
401
+ enabled: boolean,
402
+
403
+ default: string,
404
+
405
+ config: string,
406
+ },
407
+
408
+ formkit: {
409
+ enabled: boolean,
410
+
411
+ default: string,
412
+
413
+ config: string,
414
+ },
415
+
416
+ vueform: boolean,
417
+
418
+ content: boolean,
419
+
420
+ openprops: boolean,
421
+
422
+ pslo: {
423
+ enabled: boolean,
424
+
425
+ content: boolean,
426
+ },
427
+
428
+ seo: boolean,
429
+
430
+ auth: boolean,
431
+
432
+ warn: {
433
+ duplicates: boolean,
434
+ },
435
+ },
436
+
437
+ "nuxt-scripts": {
438
+ version: string,
439
+
440
+ defaultScriptOptions: {
441
+ trigger: string,
442
+ },
443
+ },
444
+ }
445
+ }
446
+ declare module 'vue' {
447
+ interface ComponentCustomProperties {
448
+ $config: RuntimeConfig
449
+ }
450
+ }
File without changes
package/app.vue CHANGED
@@ -1,59 +1,39 @@
1
1
  <template>
2
- <div class="p-3">
3
- <div class="ignis-header">
4
- <img src="/nuxt-ignis.png" class="ignis-logo" :title :alt>
5
- <h1 class="my-4 text-4xl text-amber-400 font-bold">
6
- {{ useT("title") }}
7
- </h1>
8
- <img src="/nuxt-ignis.png" class="ignis-logo" :title :alt>
9
- </div>
10
- <div>{{ useT("subtitle") }}</div>
2
+ <UApp v-if="ui">
11
3
  <NuxtPage v-if="pages" />
12
- <AppFeatureList v-else />
13
- <CurrentTime />
14
- <div class="link text-xs">
15
- <NuxtLink to="https://github.com/AloisSeckar/nuxt-ignis">
16
- https://github.com/AloisSeckar/nuxt-ignis
17
- </NuxtLink>
18
- </div>
4
+ <IgnisInfo v-else />
5
+ </UApp>
6
+ <div v-else>
7
+ <NuxtPage v-if="pages" />
8
+ <IgnisInfo v-else />
19
9
  </div>
20
10
  </template>
21
11
 
22
12
  <script setup lang="ts">
23
- import { useT } from '#imports' // requires explicit import for some reason
24
-
25
13
  useHead({
26
14
  title: useAppConfig().textTitle,
27
15
  htmlAttrs: {
28
16
  lang: 'en',
29
17
  },
30
18
  bodyAttrs: {
31
- class: 'bg-slate-900 m-auto text-center text-white',
19
+ class: 'ignis-body',
32
20
  },
33
21
  })
34
22
  initConsola()
35
23
 
36
24
  log.info('Nuxt Ignis was here!')
37
25
 
38
- const title = useT('title')
39
- const alt = title
40
-
41
- const pages = useRuntimeConfig().public.ignis.pages
26
+ const config = useRuntimeConfig().public.ignis
27
+ const pages = config.pages
28
+ const ui = config.ui || config.preset.ui
42
29
  </script>
43
30
 
44
31
  <style scoped>
45
- .ignis-header {
46
- display: flex;
47
- flex-direction: row;
48
- justify-content: center;
49
- margin-bottom: 10px;
50
- }
51
- .ignis-logo {
52
- display: inline;
53
- width: 64px;
54
- height: 64px;
55
- }
56
- .ignis-title {
57
- margin-top: 15px;
32
+ /* bg-slate-900 m-auto text-center text-white */
33
+ .ignis-body {
34
+ margin: auto;
35
+ background-color: #0f172a;
36
+ color: white;
37
+ text-align: center;
58
38
  }
59
39
  </style>
@@ -0,0 +1,16 @@
1
+ /*
2
+ This will import Tailwind CSS for Nuxt UI
3
+ https://ui.nuxt.com/getting-started/installation/nuxt#import-tailwind-css-and-nuxt-ui-in-your-css
4
+
5
+ NUXT_PUBLIC_IGNIS_PRESET_UI=nuxt-ui or NUXT_PUBLIC_IGNIS_UI=true is required for se this feature
6
+ */
7
+
8
+ @import "tailwindcss";
9
+ @import "@nuxt/ui";
10
+
11
+ /*
12
+ // Tailwind v4 way of defining custom classes
13
+ @utility <name> {
14
+ // css rules here
15
+ }
16
+ */
@@ -1,49 +1,15 @@
1
- /*
2
- This file is auto-imported when using Tailwind CSS
1
+ /*
2
+ This will import Tailwind CSS
3
+ https://tailwindcss.com/docs/installation/
3
4
 
4
- Use @apply if you don't want to define style for each element separately
5
-
6
- Read more at:
7
- https://tailwindcss.com/docs/reusing-styles#extracting-classes-with-apply
8
- https://tailwindcss.com/docs/functions-and-directives#apply
9
-
10
- Use correct @layer to keep your Tailwind CSS organized:
11
- https://bloggie.io/@kinopyo/organize-your-css-in-the-tailwind-style-with-layer-directive
12
-
13
- And most importantly: THINK TWICE before using this approach!
5
+ NUXT_PUBLIC_IGNIS_PRESET_UI=tailwind or NUXT_PUBLIC_IGNIS_TAILWIND=true is required for se this feature
14
6
  */
15
7
 
16
- @tailwind base;
17
- @tailwind components;
18
- @tailwind utilities;
19
-
20
- @layer base {
21
-
22
- /*
23
- Tailwind CSS classes might be auto-applied to all respective elements like this.
24
- However, I recommend NOT to use it like that, because this obsfucates code logic
25
- and makes maintaing harder (even you should soon forgot styles are defined here)
26
- */
27
-
28
- /* NOTE: For setting "body" tag attributes, it is better to use useHead() composable - @see `app.vue`*/
29
- /*
30
- body {
31
- @apply bg-slate-900;
32
- }
33
- */
8
+ @import "tailwindcss";
34
9
 
10
+ /*
11
+ // Tailwind v4 way of defining custom classes
12
+ @utility <name> {
13
+ // css rules here
35
14
  }
36
-
37
- @layer components {
38
-
39
- /*
40
- Following classes are available to use throughout the app as shorthands.
41
- Although still discouraged by Tailwind CSS authors, this usage makes more
42
- sense, because the class name is visible and trackable in SFC templates.
43
- */
44
-
45
- .link {
46
- @apply my-2 text-amber-400 hover:text-amber-200;
47
- }
48
-
49
- }
15
+ */
@@ -22,10 +22,13 @@
22
22
  -->
23
23
 
24
24
  <template>
25
- <div class="m-1 px-2 py-1 border border-amber-300 font-bold text-lg text-feature hover:bg-slate-700">
25
+ <div
26
+ class="feature"
27
+ :class="active ? '' : 'feature-disabled'"
28
+ :title="active ? 'Active' : 'Inactive'">
26
29
  {{ text }}
27
- <div v-if="showIcon" style="display: inline;">
28
- <Icon name="ic:sharp-add-reaction" style="color: yellow" />
30
+ <div v-if="active && showIcon" class="icon">
31
+ <Icon name="ic:sharp-add-reaction" class="icon-color" />
29
32
  </div>
30
33
  </div>
31
34
  </template>
@@ -43,6 +46,7 @@
43
46
  const props = defineProps({
44
47
  text: { type: String, required: true },
45
48
  optionalText: { type: String, default: 'default' },
49
+ active: { type: Boolean, default: true },
46
50
  })
47
51
 
48
52
  /**
@@ -61,3 +65,43 @@ const showIcon = config.preset.ui === 'nuxt-ui' || config.ui
61
65
  log.debug(props.text)
62
66
  log.debug(props.optionalText)
63
67
  </script>
68
+
69
+ <style scoped>
70
+ /* avoid Tailwind CSS styles here, because Tailwind may not be enabled */
71
+
72
+ /* m-1! px-2 py-1 border! border-amber-300 font-bold text-lg text-feature bg-emerald-700 hover:bg-slate-700 */
73
+ .feature {
74
+ margin: 4px;
75
+ padding: 4px 12px;
76
+ border: 2px solid #fcd34d;
77
+ font-weight: bold;
78
+ background-color: #047857;
79
+ color: #f1f5f9;
80
+ font-size: 1.125rem;
81
+ line-height: 1.75rem;
82
+ }
83
+ .feature:hover {
84
+ background-color: #334155;
85
+ color: #3CB371;
86
+ }
87
+
88
+ /* text-gray-700 bg-gray-300! hover:bg-slate-400! */
89
+ .feature-disabled {
90
+ background-color: #cbd5e1;
91
+ color: #334155;
92
+ }
93
+ .feature-disabled:hover {
94
+ background-color: #94a3b8;
95
+ color: #f1f5f9;
96
+ }
97
+
98
+ /* additional styles for displaying smiley icons */
99
+
100
+ .icon {
101
+ display: inline;
102
+ }
103
+
104
+ .icon-color {
105
+ color: yellow;
106
+ }
107
+ </style>