@finema/core 1.3.38 → 1.3.40

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/README.md CHANGED
@@ -2,34 +2,6 @@
2
2
 
3
3
  [✨  Release Notes](/CHANGELOG.md)
4
4
 
5
- ## Todos
6
-
7
- - [ ] Loader
8
- - [ ] Button
9
- - [ ] Table
10
- - [ ] Icon
11
- - [ ] Badge
12
- - [ ] Status
13
- - Form
14
- - [ ] Static
15
- - [ ] Input
16
- - [ ] Textarea
17
- - [ ] Select
18
- - [ ] Select multi
19
- - [ ] Checkbox
20
- - [ ] radio
21
- - [ ] toggle
22
- - [ ] datetime
23
- - [ ] upload
24
- - [ ] upload multi
25
- - [ ] Modal
26
- - [ ] Notification
27
- - [ ] Card
28
- - [ ] Tab
29
- - [ ] Alert
30
- - [ ] Container
31
- - [ ] Dropdown
32
-
33
5
  ## Features
34
6
 
35
7
  - UI components
@@ -65,24 +37,24 @@ That's it! You can now use @finema/core in your Nuxt app ✨
65
37
 
66
38
  ```bash
67
39
  # Install dependencies
68
- npm install
40
+ pnpm install
69
41
 
70
42
  # Generate type stubs
71
- npm run dev:prepare
43
+ pnpm dev:prepare
72
44
 
73
45
  # Develop with the playground
74
- npm run dev
46
+ pnpm dev
75
47
 
76
48
  # Build the playground
77
- npm run dev:build
49
+ pnpm dev:build
78
50
 
79
51
  # Run ESLint
80
- npm run lint
52
+ pnpm lint
81
53
 
82
54
  # Run Vitest
83
- npm run test
84
- npm run test:watch
55
+ pnpm test
56
+ pnpm test:watch
85
57
 
86
58
  # Release new version
87
- npm run release
59
+ pnpm release
88
60
  ```
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "1.3.38",
3
+ "version": "1.3.40",
4
4
  "configKey": "core",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.7.4"
package/dist/module.mjs CHANGED
@@ -2,7 +2,7 @@ import { defineNuxtModule, createResolver, installModule, addPlugin, addComponen
2
2
  import { merge } from 'lodash-es';
3
3
 
4
4
  const name = "@finema/core";
5
- const version = "1.3.38";
5
+ const version = "1.3.40";
6
6
 
7
7
  const colors = {
8
8
  black: "#20243E",
@@ -43,7 +43,7 @@ const colors = {
43
43
  },
44
44
  danger: {
45
45
  DEFAULT: "#F25555",
46
- 50: "#FEF2F2",
46
+ 50: "#FF808E",
47
47
  100: "#FF808E",
48
48
  400: "#FF808E",
49
49
  500: "#F25555",
@@ -51,7 +51,7 @@ const colors = {
51
51
  },
52
52
  success: {
53
53
  DEFAULT: "#3FB061",
54
- 50: "#F0FDF4",
54
+ 50: "#E7F8D7",
55
55
  100: "#C6F2D3",
56
56
  400: "#C6F2D3",
57
57
  500: "#3FB061",
@@ -59,7 +59,7 @@ const colors = {
59
59
  },
60
60
  warning: {
61
61
  DEFAULT: "#FF9A35",
62
- 50: "#FFF3D2",
62
+ 50: "#FFC061",
63
63
  100: "#FFC061",
64
64
  400: "#FFC061",
65
65
  500: "#FF9A35",
@@ -164,6 +164,13 @@ const table = {
164
164
  }
165
165
  };
166
166
 
167
+ const alert = {
168
+ default: {
169
+ variant: "soft",
170
+ color: "primary"
171
+ }
172
+ };
173
+
167
174
  const module = defineNuxtModule({
168
175
  meta: {
169
176
  name,
@@ -195,10 +202,13 @@ const module = defineNuxtModule({
195
202
  ...colors
196
203
  };
197
204
  });
198
- await installModule("@nuxt/ui");
205
+ await installModule("@nuxt/ui", {
206
+ safelistColors: ["success", "secondary", "info", "danger", "warning"]
207
+ });
199
208
  nuxt.options.appConfig.ui = _merge(nuxt.options.appConfig.ui || {}, {
200
209
  table,
201
- pagination
210
+ pagination,
211
+ alert
202
212
  });
203
213
  nuxt.options.appConfig.ui.strategy = "override";
204
214
  nuxt.options.runtimeConfig = _deepMerge(
@@ -265,6 +275,14 @@ const module = defineNuxtModule({
265
275
  },
266
276
  nuxt.options.app
267
277
  );
278
+ nuxt.options.colorMode = _deepMerge(
279
+ {},
280
+ {
281
+ preference: "light"
282
+ },
283
+ nuxt.options.colorMode
284
+ );
285
+ nuxt.options.devtools = _deepMerge({}, { enabled: true }, nuxt.options.devtools);
268
286
  await installModule("@pinia/nuxt");
269
287
  await installModule("@vee-validate/nuxt", {
270
288
  // disable or enable auto imports
@@ -0,0 +1,61 @@
1
+ <template>
2
+ <UAlert v-bind="$props">
3
+ <template #title><slot name="title" /></template>
4
+ <template #description><slot name="description" /></template>
5
+ </UAlert>
6
+ </template>
7
+ <script lang="ts" setup>
8
+ import { type PropType } from 'vue'
9
+ import { type AlertColor, type AlertVariant, type Avatar, type Button } from '#ui/types'
10
+ import type { Strategy } from '#core/types/utils'
11
+ import { alert } from '#ui/ui.config'
12
+ // @ts-expect-error
13
+ import appConfig from '#build/app.config'
14
+
15
+ defineProps({
16
+ title: {
17
+ type: String,
18
+ required: true,
19
+ },
20
+ description: {
21
+ type: String,
22
+ default: null,
23
+ },
24
+ icon: {
25
+ type: String,
26
+ },
27
+ avatar: {
28
+ type: Object as PropType<Avatar>,
29
+ default: null,
30
+ },
31
+ closeButton: {
32
+ type: Object as PropType<Button>,
33
+ },
34
+ actions: {
35
+ // eslint-disable-next-line @typescript-eslint/ban-types
36
+ type: Array as PropType<Array<Button & { click?: Function }>>,
37
+ },
38
+ color: {
39
+ type: String as PropType<AlertColor>,
40
+ validator(value: string) {
41
+ return [...appConfig.ui.colors, ...Object.keys(alert.color)].includes(value)
42
+ },
43
+ },
44
+ variant: {
45
+ type: String as PropType<AlertVariant>,
46
+ validator(value: string) {
47
+ return [
48
+ ...Object.keys(alert.variant),
49
+ ...Object.values(alert.color).flatMap((value) => Object.keys(value)),
50
+ ].includes(value)
51
+ },
52
+ },
53
+ class: {
54
+ type: [String, Object, Array] as PropType<any>,
55
+ },
56
+ ui: {
57
+ type: Object as PropType<Partial<typeof alert> & { strategy?: Strategy }>,
58
+ default: () => ({}),
59
+ },
60
+ })
61
+ </script>
@@ -0,0 +1,3 @@
1
+ import type * as config from '#ui/ui.config';
2
+ import type { DeepPartial } from '#ui/types';
3
+ export declare const alert: DeepPartial<(typeof config)['alert']>;
@@ -0,0 +1,6 @@
1
+ export const alert = {
2
+ default: {
3
+ variant: "soft",
4
+ color: "primary"
5
+ }
6
+ };
package/dist/types.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
 
2
- import { ModuleOptions } from './module'
2
+ import type { ModuleOptions } from './module'
3
+
3
4
 
4
5
  declare module '@nuxt/schema' {
5
6
  interface NuxtConfig { ['core']?: Partial<ModuleOptions> }
@@ -12,4 +13,4 @@ declare module 'nuxt/schema' {
12
13
  }
13
14
 
14
15
 
15
- export { core } from './module'
16
+ export type { core } from './module'
package/dist/types.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
 
2
- import { ModuleOptions } from './module'
2
+ import type { ModuleOptions } from './module'
3
+
3
4
 
4
5
  declare module '@nuxt/schema' {
5
6
  interface NuxtConfig { ['core']?: Partial<ModuleOptions> }
@@ -12,4 +13,4 @@ declare module 'nuxt/schema' {
12
13
  }
13
14
 
14
15
 
15
- export { core } from './module'
16
+ export type { core } from './module'
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "1.3.38",
3
+ "version": "1.3.40",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
- "author": "Finema Development Team",
6
+ "author": "Finema Dev Core Team",
7
7
  "type": "module",
8
8
  "exports": {
9
9
  ".": {
@@ -33,21 +33,18 @@
33
33
  "prepare": "husky install"
34
34
  },
35
35
  "dependencies": {
36
- "@headlessui/vue": "^1.7.16",
37
- "@iconify-json/mdi": "^1.1.54",
38
- "@iconify-json/simple-icons": "^1.1.76",
39
36
  "@nuxt/kit": "^3.7.4",
40
37
  "@nuxt/ui": "^2.11.1",
41
- "@pinia/nuxt": "^0.4.11",
42
- "@vee-validate/nuxt": "^4.11.8",
43
- "@vee-validate/zod": "^4.11.8",
38
+ "@pinia/nuxt": "^0.5.1",
39
+ "@vee-validate/nuxt": "^4.12.3",
40
+ "@vee-validate/zod": "^4.12.3",
44
41
  "@vuepic/vue-datepicker": "^7.4.0",
45
42
  "axios": "^1.5.1",
46
- "date-fns": "^3.0.0",
43
+ "date-fns": "^3.0.6",
47
44
  "i18next": "^23.7.11",
48
45
  "lodash-es": "^4.17.21",
49
- "nuxt-security": "^0.14.4",
50
- "pinia": "^2.1.6",
46
+ "nuxt-security": "^1.0.0",
47
+ "pinia": "^2.1.7",
51
48
  "url-join": "^5.0.0",
52
49
  "zod": "^3.22.4",
53
50
  "zod-i18n-map": "^2.23.0"
@@ -56,24 +53,24 @@
56
53
  "@finema/eslint-config": "^1.2.0",
57
54
  "@nuxt/devtools": "latest",
58
55
  "@nuxt/eslint-config": "^0.2.0",
59
- "@nuxt/module-builder": "^0.5.2",
56
+ "@nuxt/module-builder": "^0.5.4",
60
57
  "@nuxt/schema": "^3.7.4",
61
- "@nuxt/test-utils": "^3.7.4",
62
- "@release-it/conventional-changelog": "^7.0.2",
58
+ "@nuxt/test-utils": "^3.9.0",
59
+ "@release-it/conventional-changelog": "^8.0.1",
63
60
  "@types/lodash-es": "^4.17.12",
64
61
  "@types/node": "^18.18.1",
65
62
  "changelogen": "^0.5.5",
66
- "eslint": "^8.50.0",
63
+ "eslint": "^8.56.0",
67
64
  "husky": "^8.0.3",
68
- "lint-staged": "^14.0.1",
65
+ "lint-staged": "^15.2.0",
69
66
  "nuxt": "^3.7.4",
70
- "prettier": "^3.0.3",
71
- "release-it": "^16.2.1",
67
+ "prettier": "^3.1.1",
68
+ "release-it": "^17.0.1",
72
69
  "sass": "^1.69.5",
73
- "stylelint": "^15.10.3",
70
+ "stylelint": "^16.0.2",
74
71
  "stylelint-config-prettier-scss": "^1.0.0",
75
- "stylelint-config-standard-scss": "^11.0.0",
76
- "vitest": "^0.33.0"
72
+ "stylelint-config-standard-scss": "^12.0.0",
73
+ "vitest": "^1.1.0"
77
74
  },
78
75
  "lint-staged": {
79
76
  "*.{ts,vue,tsx,js}": "eslint --fix",