@finema/core 1.3.28 → 1.3.30

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/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "1.3.28",
3
+ "version": "1.3.30",
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.28";
5
+ const version = "1.3.30";
6
6
 
7
7
  const colors = {
8
8
  black: "#20243E",
@@ -67,86 +67,84 @@ const colors = {
67
67
  }
68
68
  };
69
69
 
70
- const ui = {
71
- strategy: "override",
72
- pagination: {
73
- default: {
74
- activeButton: {
75
- color: "primary",
76
- class: "rounded-md px-3"
77
- },
78
- inactiveButton: {
79
- color: "primary",
80
- variant: "ghost",
81
- class: "rounded-md px-3 text-gray-500 hover:bg-primary-500 hover:text-white"
82
- },
83
- firstButton: {
84
- color: "primary",
85
- variant: "ghost",
86
- class: "rtl:[&_span:first-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
87
- },
88
- lastButton: {
89
- color: "primary",
90
- variant: "ghost",
91
- class: "rtl:[&_span:last-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
92
- },
93
- prevButton: {
94
- color: "primary",
95
- variant: "ghost",
96
- class: "rtl:[&_span:first-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
97
- },
98
- nextButton: {
99
- color: "primary",
100
- variant: "ghost",
101
- class: "rtl:[&_span:last-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
102
- }
103
- }
104
- },
105
- table: {
106
- wrapper: "relative overflow-x-auto bg-white rounded-lg",
107
- base: "min-w-full table-fixed",
108
- divide: "divide-y divide-y-2 divide-gray-300 dark:divide-gray-700",
109
- thead: "",
110
- tbody: "divide-y divide-gray-200 dark:divide-gray-800",
111
- tr: {
112
- base: "even:bg-gray-50",
113
- selected: "bg-gray-50 dark:bg-gray-800/50",
114
- active: "hover:bg-gray-50 dark:hover:bg-gray-800/50 cursor-pointer"
70
+ const _merge = merge;
71
+
72
+ const pagination = {
73
+ default: {
74
+ activeButton: {
75
+ color: "primary",
76
+ class: "rounded-md px-3"
115
77
  },
116
- th: {
117
- base: "text-left rtl:text-right",
118
- padding: "px-3 py-3.5",
119
- color: "text-gray-700 dark:text-white",
120
- font: "font-normal",
121
- size: "text-sm"
78
+ inactiveButton: {
79
+ color: "primary",
80
+ variant: "ghost",
81
+ class: "rounded-md px-3 text-gray-500 hover:bg-primary-500 hover:text-white"
122
82
  },
123
- td: {
124
- base: "whitespace-nowrap",
125
- padding: "px-3 py-4",
126
- color: "text-gray-500 dark:text-gray-400",
127
- font: "",
128
- size: "text-sm"
83
+ firstButton: {
84
+ color: "primary",
85
+ variant: "ghost",
86
+ class: "rtl:[&_span:first-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
129
87
  },
130
- default: {
131
- sortButton: {
132
- icon: "i-heroicons-arrows-up-down-20-solid",
133
- trailing: true,
134
- square: true,
135
- color: "gray",
136
- variant: "ghost",
137
- class: "-m-1.5 text-gray-700 font-normal"
138
- },
139
- loadingState: {
140
- label: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14..."
141
- },
142
- emptyState: {
143
- label: "\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"
144
- }
88
+ lastButton: {
89
+ color: "primary",
90
+ variant: "ghost",
91
+ class: "rtl:[&_span:last-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
92
+ },
93
+ prevButton: {
94
+ color: "primary",
95
+ variant: "ghost",
96
+ class: "rtl:[&_span:first-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
97
+ },
98
+ nextButton: {
99
+ color: "primary",
100
+ variant: "ghost",
101
+ class: "rtl:[&_span:last-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
145
102
  }
146
103
  }
147
104
  };
148
105
 
149
- const _merge = merge;
106
+ const table = {
107
+ wrapper: "relative overflow-x-auto bg-white rounded-lg",
108
+ base: "min-w-full table-fixed",
109
+ divide: "divide-y divide-y-2 divide-gray-300 dark:divide-gray-700",
110
+ thead: "",
111
+ tbody: "divide-y divide-gray-200 dark:divide-gray-800",
112
+ tr: {
113
+ base: "even:bg-gray-50",
114
+ selected: "bg-gray-50 dark:bg-gray-800/50",
115
+ active: "hover:bg-gray-50 dark:hover:bg-gray-800/50 cursor-pointer"
116
+ },
117
+ th: {
118
+ base: "text-left rtl:text-right",
119
+ padding: "px-3 py-3.5",
120
+ color: "text-gray-700 dark:text-white",
121
+ font: "font-normal",
122
+ size: "text-sm"
123
+ },
124
+ td: {
125
+ base: "whitespace-nowrap",
126
+ padding: "px-3 py-4",
127
+ color: "text-gray-500 dark:text-gray-400",
128
+ font: "",
129
+ size: "text-sm"
130
+ },
131
+ default: {
132
+ sortButton: {
133
+ icon: "i-heroicons-arrows-up-down-20-solid",
134
+ trailing: true,
135
+ square: true,
136
+ color: "gray",
137
+ variant: "ghost",
138
+ class: "-m-1.5 text-gray-700 font-normal"
139
+ },
140
+ loadingState: {
141
+ label: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14..."
142
+ },
143
+ emptyState: {
144
+ label: "\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"
145
+ }
146
+ }
147
+ };
150
148
 
151
149
  const module = defineNuxtModule({
152
150
  meta: {
@@ -165,17 +163,13 @@ const module = defineNuxtModule({
165
163
  nuxt.options.build.transpile.push(runtimeDir);
166
164
  nuxt.options.alias["#core"] = runtimeDir;
167
165
  nuxt.options.css.push(resolve(runtimeDir, "ui.css"));
168
- nuxt.options.appConfig.app = {
169
- strategy: "override"
170
- };
171
166
  nuxt.hook("tailwindcss:config", (tailwindConfig) => {
172
167
  tailwindConfig.content = {
173
168
  ...tailwindConfig.content,
174
169
  files: [
175
170
  ...tailwindConfig.content.files,
176
171
  resolve(runtimeDir, "components/**/*.{vue,mjs,ts}"),
177
- resolve(runtimeDir, "*.{mjs,js,ts}"),
178
- resolve("./*.{mjs,js,ts}")
172
+ resolve(runtimeDir, "ui.config/**/*.{mjs,js,ts}")
179
173
  ]
180
174
  };
181
175
  tailwindConfig.theme.extend.colors = {
@@ -184,7 +178,11 @@ const module = defineNuxtModule({
184
178
  };
185
179
  });
186
180
  await installModule("@nuxt/ui");
187
- nuxt.options.appConfig.ui = _merge(nuxt.options.appConfig.ui || {}, ui);
181
+ nuxt.options.appConfig.ui = _merge(nuxt.options.appConfig.ui || {}, {
182
+ table,
183
+ pagination
184
+ });
185
+ nuxt.options.appConfig.ui.strategy = "override";
188
186
  await installModule("@pinia/nuxt");
189
187
  await installModule("@vee-validate/nuxt", {
190
188
  // disable or enable auto imports
@@ -0,0 +1 @@
1
+ export declare const badge: any;
@@ -0,0 +1,9 @@
1
+ import { badge as inheritBadge } from "#ui/ui.config";
2
+ export const badge = {
3
+ ...inheritBadge,
4
+ default: {
5
+ size: "sm",
6
+ variant: "solid",
7
+ color: "primary"
8
+ }
9
+ };
@@ -0,0 +1 @@
1
+ export declare const breadcrumb: any;
@@ -0,0 +1,7 @@
1
+ import { breadcrumb as inheritBreadcrumb } from "#ui/ui.config";
2
+ export const breadcrumb = {
3
+ ...inheritBreadcrumb,
4
+ default: {
5
+ divider: "i-heroicons-chevron-right-20-solid rtl:i-heroicons-chevron-left-20-solid"
6
+ }
7
+ };
@@ -0,0 +1 @@
1
+ export declare const button: any;
@@ -0,0 +1,10 @@
1
+ import { button as inheritButton } from "#ui/ui.config";
2
+ export const button = {
3
+ ...inheritButton,
4
+ default: {
5
+ size: "md",
6
+ variant: "solid",
7
+ color: "primary",
8
+ loadingIcon: "i-heroicons-arrow-path-20-solid"
9
+ }
10
+ };
@@ -0,0 +1 @@
1
+ export declare const buttonGroup: any;
@@ -0,0 +1,8 @@
1
+ import { buttonGroup as inheritButtonGroup } from "#ui/ui.config";
2
+ export const buttonGroup = {
3
+ ...inheritButtonGroup,
4
+ default: {
5
+ size: "md",
6
+ orientation: "horizontal"
7
+ }
8
+ };
@@ -0,0 +1 @@
1
+ export declare const card: any;
@@ -0,0 +1,2 @@
1
+ import { card as inheritCard } from "#ui/ui.config";
2
+ export const card = { ...inheritCard };
@@ -0,0 +1,3 @@
1
+ export declare const icon: {
2
+ dynamic: boolean;
3
+ };
@@ -0,0 +1,3 @@
1
+ export const icon = {
2
+ dynamic: false
3
+ };
@@ -0,0 +1,11 @@
1
+ export { table } from './table';
2
+ export { pagination } from './pagination';
3
+ export { button } from './button';
4
+ export { badge } from './badge';
5
+ export { buttonGroup } from './buttonGroup';
6
+ export { card } from './card';
7
+ export { tabs } from './tabs';
8
+ export { icon } from './icon';
9
+ export { modal } from './modal';
10
+ export { slideover } from './slideover';
11
+ export { breadcrumb } from './breadcrumb';
@@ -0,0 +1,11 @@
1
+ export { table } from "./table.mjs";
2
+ export { pagination } from "./pagination.mjs";
3
+ export { button } from "./button.mjs";
4
+ export { badge } from "./badge.mjs";
5
+ export { buttonGroup } from "./buttonGroup.mjs";
6
+ export { card } from "./card.mjs";
7
+ export { tabs } from "./tabs.mjs";
8
+ export { icon } from "./icon.mjs";
9
+ export { modal } from "./modal.mjs";
10
+ export { slideover } from "./slideover.mjs";
11
+ export { breadcrumb } from "./breadcrumb.mjs";
@@ -0,0 +1 @@
1
+ export declare const modal: any;
@@ -0,0 +1,29 @@
1
+ import { modal as inheritModal } from "#ui/ui.config";
2
+ export const modal = {
3
+ ...inheritModal,
4
+ header: "px-4 py-2 border-b",
5
+ innerWrapper: "p-4",
6
+ size: {
7
+ sm: "sm:max-w-sm",
8
+ md: "sm:max-w-lg",
9
+ lg: "sm:max-w-2xl",
10
+ xl: "sm:max-w-4xl"
11
+ },
12
+ position: {
13
+ top: "flex min-h-full items-end sm:items-start justify-center text-center",
14
+ center: "flex min-h-full items-end sm:items-center justify-center text-center",
15
+ bottom: "flex min-h-full items-end sm:items-end justify-center text-center"
16
+ },
17
+ fixHeightSize: {
18
+ default: "max-h-[calc(100vh-4rem)]",
19
+ sm: "max-h-[256px]",
20
+ md: "max-h-[512px]",
21
+ lg: "max-h-[768px]",
22
+ xl: "max-h-[1024px]"
23
+ },
24
+ default: {
25
+ size: "md",
26
+ position: "center",
27
+ fixHeightSize: "default"
28
+ }
29
+ };
@@ -0,0 +1,3 @@
1
+ import type * as config from '#ui/ui.config';
2
+ import type { DeepPartial } from '#ui/types';
3
+ export declare const pagination: DeepPartial<(typeof config)['pagination']>;
@@ -0,0 +1,33 @@
1
+ export const pagination = {
2
+ default: {
3
+ activeButton: {
4
+ color: "primary",
5
+ class: "rounded-md px-3"
6
+ },
7
+ inactiveButton: {
8
+ color: "primary",
9
+ variant: "ghost",
10
+ class: "rounded-md px-3 text-gray-500 hover:bg-primary-500 hover:text-white"
11
+ },
12
+ firstButton: {
13
+ color: "primary",
14
+ variant: "ghost",
15
+ class: "rtl:[&_span:first-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
16
+ },
17
+ lastButton: {
18
+ color: "primary",
19
+ variant: "ghost",
20
+ class: "rtl:[&_span:last-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
21
+ },
22
+ prevButton: {
23
+ color: "primary",
24
+ variant: "ghost",
25
+ class: "rtl:[&_span:first-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
26
+ },
27
+ nextButton: {
28
+ color: "primary",
29
+ variant: "ghost",
30
+ class: "rtl:[&_span:last-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
31
+ }
32
+ }
33
+ };
@@ -0,0 +1 @@
1
+ export declare const slideover: any;
@@ -0,0 +1,16 @@
1
+ import { slideover as inheritSlideover } from "#ui/ui.config";
2
+ export const slideover = {
3
+ ...inheritSlideover,
4
+ bodyWrapper: "p-4",
5
+ size: {
6
+ sm: "w-screen max-w-xs",
7
+ md: "w-screen max-w-md",
8
+ lg: "w-screen max-w-xl",
9
+ xl: "w-screen max-w-2xl",
10
+ half: "w-screen max-w-[calc(100vw/2)]",
11
+ full: "w-screen max-w-full"
12
+ },
13
+ default: {
14
+ size: "md"
15
+ }
16
+ };
@@ -0,0 +1,3 @@
1
+ import type { DeepPartial } from '#ui/types';
2
+ import type * as config from '#ui/ui.config';
3
+ export declare const table: DeepPartial<(typeof config)['table']>;
@@ -0,0 +1,42 @@
1
+ export const table = {
2
+ wrapper: "relative overflow-x-auto bg-white rounded-lg",
3
+ base: "min-w-full table-fixed",
4
+ divide: "divide-y divide-y-2 divide-gray-300 dark:divide-gray-700",
5
+ thead: "",
6
+ tbody: "divide-y divide-gray-200 dark:divide-gray-800",
7
+ tr: {
8
+ base: "even:bg-gray-50",
9
+ selected: "bg-gray-50 dark:bg-gray-800/50",
10
+ active: "hover:bg-gray-50 dark:hover:bg-gray-800/50 cursor-pointer"
11
+ },
12
+ th: {
13
+ base: "text-left rtl:text-right",
14
+ padding: "px-3 py-3.5",
15
+ color: "text-gray-700 dark:text-white",
16
+ font: "font-normal",
17
+ size: "text-sm"
18
+ },
19
+ td: {
20
+ base: "whitespace-nowrap",
21
+ padding: "px-3 py-4",
22
+ color: "text-gray-500 dark:text-gray-400",
23
+ font: "",
24
+ size: "text-sm"
25
+ },
26
+ default: {
27
+ sortButton: {
28
+ icon: "i-heroicons-arrows-up-down-20-solid",
29
+ trailing: true,
30
+ square: true,
31
+ color: "gray",
32
+ variant: "ghost",
33
+ class: "-m-1.5 text-gray-700 font-normal"
34
+ },
35
+ loadingState: {
36
+ label: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14..."
37
+ },
38
+ emptyState: {
39
+ label: "\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"
40
+ }
41
+ }
42
+ };
@@ -0,0 +1 @@
1
+ export declare const tabs: any;
@@ -0,0 +1,4 @@
1
+ import { tabs as inheritTabs } from "#ui/ui.config";
2
+ export const tabs = {
3
+ ...inheritTabs
4
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "1.3.28",
3
+ "version": "1.3.30",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Development Team",
@@ -1,11 +0,0 @@
1
- export declare const icon: {
2
- dynamic: boolean;
3
- };
4
- export declare const card: any;
5
- export declare const breadcrumb: any;
6
- export declare const buttonGroup: any;
7
- export declare const button: any;
8
- export declare const modal: any;
9
- export declare const slideover: any;
10
- export declare const tabs: any;
11
- export declare const badge: any;
@@ -1,90 +0,0 @@
1
- import {
2
- modal as inheritModal,
3
- slideover as inheritSlideover,
4
- button as inheritButton,
5
- buttonGroup as inheritButtonGroup,
6
- tabs as inheritTabs,
7
- card as inheritCard,
8
- breadcrumb as inheritBreadcrumb,
9
- badge as inheritBadge
10
- } from "#ui/ui.config";
11
- export const icon = {
12
- dynamic: false
13
- };
14
- export const card = { ...inheritCard };
15
- export const breadcrumb = {
16
- ...inheritBreadcrumb,
17
- default: {
18
- divider: "i-heroicons-chevron-right-20-solid rtl:i-heroicons-chevron-left-20-solid"
19
- }
20
- };
21
- export const buttonGroup = {
22
- ...inheritButtonGroup,
23
- default: {
24
- size: "md",
25
- orientation: "horizontal"
26
- }
27
- };
28
- export const button = {
29
- ...inheritButton,
30
- default: {
31
- size: "md",
32
- variant: "solid",
33
- color: "primary",
34
- loadingIcon: "i-heroicons-arrow-path-20-solid"
35
- }
36
- };
37
- export const modal = {
38
- ...inheritModal,
39
- header: "px-4 py-2 border-b",
40
- innerWrapper: "p-4",
41
- size: {
42
- sm: "sm:max-w-sm",
43
- md: "sm:max-w-lg",
44
- lg: "sm:max-w-2xl",
45
- xl: "sm:max-w-4xl"
46
- },
47
- position: {
48
- top: "flex min-h-full items-end sm:items-start justify-center text-center",
49
- center: "flex min-h-full items-end sm:items-center justify-center text-center",
50
- bottom: "flex min-h-full items-end sm:items-end justify-center text-center"
51
- },
52
- fixHeightSize: {
53
- default: "max-h-[calc(100vh-4rem)]",
54
- sm: "max-h-[256px]",
55
- md: "max-h-[512px]",
56
- lg: "max-h-[768px]",
57
- xl: "max-h-[1024px]"
58
- },
59
- default: {
60
- size: "md",
61
- position: "center",
62
- fixHeightSize: "default"
63
- }
64
- };
65
- export const slideover = {
66
- ...inheritSlideover,
67
- bodyWrapper: "p-4",
68
- size: {
69
- sm: "w-screen max-w-xs",
70
- md: "w-screen max-w-md",
71
- lg: "w-screen max-w-xl",
72
- xl: "w-screen max-w-2xl",
73
- half: "w-screen max-w-[calc(100vw/2)]",
74
- full: "w-screen max-w-full"
75
- },
76
- default: {
77
- size: "md"
78
- }
79
- };
80
- export const tabs = {
81
- ...inheritTabs
82
- };
83
- export const badge = {
84
- ...inheritBadge,
85
- default: {
86
- size: "sm",
87
- variant: "solid",
88
- color: "primary"
89
- }
90
- };