@finema/core 2.43.2 → 2.44.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.
- package/dist/module.json +1 -1
- package/dist/module.mjs +8 -1
- package/dist/runtime/components/FlexDeck/index.vue +1 -1
- package/dist/runtime/components/Form/InputUploadDropzone/index.vue +1 -1
- package/dist/runtime/components/Form/InputUploadDropzoneAuto/index.vue +1 -1
- package/dist/runtime/components/Form/InputWYSIWYG/UploadImageForm.vue +1 -1
- package/dist/runtime/components/Form/fileState/EmptyState.vue +1 -1
- package/dist/runtime/components/Form/fileState/FailedState.vue +1 -1
- package/dist/runtime/components/Form/fileState/PreviewModal.vue +1 -1
- package/dist/runtime/components/Form/fileState/SuccessState.vue +1 -1
- package/dist/runtime/components/Image.vue +1 -1
- package/dist/runtime/components/Loader.vue +1 -1
- package/dist/runtime/components/Loader.vue.d.ts +3 -3
- package/dist/runtime/components/Table/Base.vue +7 -7
- package/dist/runtime/components/Table/Simple.vue +1 -1
- package/dist/runtime/components/Table/index.vue +6 -6
- package/dist/runtime/components/Table/index.vue.d.ts +4 -4
- package/dist/runtime/styles/main.css +1 -1
- package/dist/runtime/theme/breadcrumb.d.ts +9 -0
- package/dist/runtime/theme/breadcrumb.js +9 -0
- package/dist/runtime/theme/button.d.ts +15 -0
- package/dist/runtime/theme/button.js +18 -1
- package/dist/runtime/theme/card.d.ts +13 -0
- package/dist/runtime/theme/card.js +13 -0
- package/dist/runtime/theme/dateTime.js +1 -1
- package/dist/runtime/theme/dialog.d.ts +5 -1
- package/dist/runtime/theme/dialog.js +25 -18
- package/dist/runtime/theme/dropdownMenu.d.ts +17 -0
- package/dist/runtime/theme/dropdownMenu.js +17 -0
- package/dist/runtime/theme/formField.d.ts +5 -0
- package/dist/runtime/theme/formField.js +5 -0
- package/dist/runtime/theme/index.d.ts +12 -0
- package/dist/runtime/theme/index.js +12 -0
- package/dist/runtime/theme/input.d.ts +7 -0
- package/dist/runtime/theme/input.js +8 -1
- package/dist/runtime/theme/inputNumber.d.ts +5 -0
- package/dist/runtime/theme/inputNumber.js +6 -1
- package/dist/runtime/theme/inputTags.d.ts +13 -0
- package/dist/runtime/theme/inputTags.js +13 -0
- package/dist/runtime/theme/modal.d.ts +16 -0
- package/dist/runtime/theme/modal.js +19 -0
- package/dist/runtime/theme/pagination.d.ts +8 -0
- package/dist/runtime/theme/pagination.js +8 -0
- package/dist/runtime/theme/selectMenu.d.ts +8 -0
- package/dist/runtime/theme/selectMenu.js +11 -3
- package/dist/runtime/theme/slideover.d.ts +5 -0
- package/dist/runtime/theme/slideover.js +5 -0
- package/dist/runtime/theme/stepper.d.ts +16 -0
- package/dist/runtime/theme/stepper.js +16 -0
- package/dist/runtime/theme/switch.d.ts +6 -0
- package/dist/runtime/theme/switch.js +6 -0
- package/dist/runtime/theme/table.d.ts +18 -0
- package/dist/runtime/theme/table.js +21 -3
- package/dist/runtime/theme/tabs.d.ts +10 -0
- package/dist/runtime/theme/tabs.js +10 -0
- package/dist/runtime/theme/textarea.d.ts +10 -0
- package/dist/runtime/theme/textarea.js +10 -0
- package/dist/runtime/theme/toast.d.ts +6 -0
- package/dist/runtime/theme/toast.js +6 -0
- package/package.json +3 -5
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import * as lodash from 'lodash-es';
|
|
|
4
4
|
import * as theme from '../dist/runtime/theme/index.js';
|
|
5
5
|
|
|
6
6
|
const name = "@finema/core";
|
|
7
|
-
const version = "2.
|
|
7
|
+
const version = "2.44.0";
|
|
8
8
|
|
|
9
9
|
const nuxtAppOptions = {
|
|
10
10
|
head: {
|
|
@@ -90,6 +90,13 @@ const module = defineNuxtModule({
|
|
|
90
90
|
_nuxt.options.appConfig.core || {},
|
|
91
91
|
core
|
|
92
92
|
);
|
|
93
|
+
_nuxt.options.ui = defu(_nuxt.options.ui || {}, {
|
|
94
|
+
theme: {
|
|
95
|
+
colors: [
|
|
96
|
+
"white"
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
});
|
|
93
100
|
_nuxt.options.colorMode = {
|
|
94
101
|
preference: "light"
|
|
95
102
|
};
|
|
@@ -86,7 +86,6 @@ import { NumberHelper } from "#core/utils/NumberHelper";
|
|
|
86
86
|
import { _debounce, useRouter, useWatchChange, useWatchTrue } from "#imports";
|
|
87
87
|
import { useCoreConfig } from "#core/composables/useConfig";
|
|
88
88
|
import Empty from "#core/components/Empty.vue";
|
|
89
|
-
defineSlots();
|
|
90
89
|
const emits = defineEmits(["pageChange", "search"]);
|
|
91
90
|
const props = defineProps({
|
|
92
91
|
options: {
|
|
@@ -98,6 +97,7 @@ const props = defineProps({
|
|
|
98
97
|
default: ""
|
|
99
98
|
}
|
|
100
99
|
});
|
|
100
|
+
defineSlots();
|
|
101
101
|
const coreConfig = useCoreConfig();
|
|
102
102
|
const router = useRouter();
|
|
103
103
|
const q = ref(props.options?.pageOptions.search ?? "");
|
|
@@ -40,6 +40,7 @@ import FieldWrapper from "#core/components/Form/FieldWrapper.vue";
|
|
|
40
40
|
import { useFieldHOC } from "#core/composables/useForm";
|
|
41
41
|
import { uploadFileDropzoneTheme } from "#core/theme/uploadFileDropzone";
|
|
42
42
|
import { useUiConfig } from "#core/composables/useConfig";
|
|
43
|
+
const emits = defineEmits(["change", "delete"]);
|
|
43
44
|
const props = defineProps({
|
|
44
45
|
accept: { type: [Array, String], required: false },
|
|
45
46
|
maxSize: { type: Number, required: false },
|
|
@@ -60,7 +61,6 @@ const props = defineProps({
|
|
|
60
61
|
help: { type: String, required: false },
|
|
61
62
|
ui: { type: null, required: false }
|
|
62
63
|
});
|
|
63
|
-
const emits = defineEmits(["change", "delete"]);
|
|
64
64
|
const {
|
|
65
65
|
wrapperProps,
|
|
66
66
|
handleChange: onChange,
|
|
@@ -63,6 +63,7 @@ import { useFieldHOC } from "#core/composables/useForm";
|
|
|
63
63
|
import { uploadFileDropzoneTheme } from "#core/theme/uploadFileDropzone";
|
|
64
64
|
import { useUiConfig } from "#core/composables/useConfig";
|
|
65
65
|
import { downloadFileFromURL } from "#core/helpers/componentHelper";
|
|
66
|
+
const emits = defineEmits(["change", "success", "delete"]);
|
|
66
67
|
const props = defineProps({
|
|
67
68
|
requestOptions: { type: Object, required: true },
|
|
68
69
|
uploadPathURL: { type: String, required: false },
|
|
@@ -94,7 +95,6 @@ const props = defineProps({
|
|
|
94
95
|
help: { type: String, required: false },
|
|
95
96
|
ui: { type: null, required: false }
|
|
96
97
|
});
|
|
97
|
-
const emits = defineEmits(["change", "success", "delete"]);
|
|
98
98
|
const {
|
|
99
99
|
wrapperProps,
|
|
100
100
|
handleChange: onChange,
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
|
|
18
18
|
<script setup>
|
|
19
19
|
import { ref } from "vue";
|
|
20
|
+
const emit = defineEmits(["submit"]);
|
|
20
21
|
const props = defineProps({
|
|
21
22
|
options: { type: Object, required: false }
|
|
22
23
|
});
|
|
23
|
-
const emit = defineEmits(["submit"]);
|
|
24
24
|
const fileInput = ref();
|
|
25
25
|
const selectedFile = ref(null);
|
|
26
26
|
const handleFileSelect = (event) => {
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
|
|
25
25
|
<script setup>
|
|
26
26
|
import { useUiIconConfig } from "#core/composables/useConfig";
|
|
27
|
+
defineEmits(["openFile"]);
|
|
27
28
|
defineProps({
|
|
28
29
|
theme: { type: null, required: true },
|
|
29
30
|
selectFileLabel: { type: String, required: true },
|
|
30
31
|
selectFileSubLabel: { type: String, required: true },
|
|
31
32
|
placeholder: { type: String, required: false }
|
|
32
33
|
});
|
|
33
|
-
defineEmits(["openFile"]);
|
|
34
34
|
const icons = useUiIconConfig("uploadFileDropzone");
|
|
35
35
|
</script>
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
<script setup>
|
|
38
38
|
import { isImage } from "#core/helpers/componentHelper";
|
|
39
39
|
import { useUiIconConfig } from "#core/composables/useConfig";
|
|
40
|
+
defineEmits(["retry", "delete"]);
|
|
40
41
|
const props = defineProps({
|
|
41
42
|
theme: { type: null, required: true },
|
|
42
43
|
selectedFile: { type: null, required: true },
|
|
43
44
|
uploadFailedLabel: { type: String, required: true },
|
|
44
45
|
retryLabel: { type: String, required: true }
|
|
45
46
|
});
|
|
46
|
-
defineEmits(["retry", "delete"]);
|
|
47
47
|
const icons = useUiIconConfig("uploadFileDropzone");
|
|
48
48
|
const getFileIcon = (file) => {
|
|
49
49
|
if (isImage(file)) {
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
|
|
29
29
|
<script setup>
|
|
30
30
|
import { isImageFromPath, isVideoFromPath } from "#core/helpers/componentHelper";
|
|
31
|
+
const emits = defineEmits(["close"]);
|
|
31
32
|
defineProps({
|
|
32
33
|
value: { type: Object, required: false }
|
|
33
34
|
});
|
|
34
|
-
const emits = defineEmits(["close"]);
|
|
35
35
|
</script>
|
|
@@ -80,13 +80,13 @@ import {
|
|
|
80
80
|
useFileSize
|
|
81
81
|
} from "#core/helpers/componentHelper";
|
|
82
82
|
import { useUiIconConfig } from "#core/composables/useConfig";
|
|
83
|
+
defineEmits(["preview", "download", "delete"]);
|
|
83
84
|
defineProps({
|
|
84
85
|
theme: { type: null, required: true },
|
|
85
86
|
value: { type: Object, required: true },
|
|
86
87
|
disabled: { type: Boolean, required: false },
|
|
87
88
|
readonly: { type: Boolean, required: false }
|
|
88
89
|
});
|
|
89
|
-
defineEmits(["preview", "download", "delete"]);
|
|
90
90
|
const icons = useUiIconConfig("uploadFileDropzone");
|
|
91
91
|
const getFileSizeFromValue = (fileValue) => {
|
|
92
92
|
const allocate = useFileSize(fileValue.size || 0);
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
|
|
32
32
|
<script setup>
|
|
33
33
|
import { UseImage } from "@vueuse/components";
|
|
34
|
-
defineSlots();
|
|
35
34
|
defineProps({
|
|
36
35
|
src: { type: String, required: true },
|
|
37
36
|
srcset: { type: String, required: false },
|
|
@@ -48,4 +47,5 @@ defineProps({
|
|
|
48
47
|
ismap: { type: null, required: false },
|
|
49
48
|
usemap: { type: null, required: false }
|
|
50
49
|
});
|
|
50
|
+
defineSlots();
|
|
51
51
|
</script>
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
import { computed } from "vue";
|
|
25
25
|
import { loaderTheme } from "#core/theme/loader";
|
|
26
26
|
import { useUiConfig } from "#core/composables/useConfig";
|
|
27
|
-
defineSlots();
|
|
28
27
|
const props = defineProps({
|
|
29
28
|
loading: { type: Boolean, required: false, default: true },
|
|
30
29
|
icon: { type: String, required: false, default: "i-svg-spinners:180-ring-with-bg" },
|
|
31
30
|
ui: { type: null, required: false },
|
|
32
31
|
class: { type: null, required: false }
|
|
33
32
|
});
|
|
33
|
+
defineSlots();
|
|
34
34
|
const theme = computed(() => useUiConfig(loaderTheme, "loader")());
|
|
35
35
|
</script>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { loaderTheme } from '#core/theme/loader';
|
|
2
|
-
type __VLS_Slots = {
|
|
3
|
-
loading: () => any;
|
|
4
|
-
};
|
|
5
2
|
type __VLS_Props = {
|
|
6
3
|
loading?: boolean;
|
|
7
4
|
icon?: string;
|
|
8
5
|
ui?: typeof loaderTheme['slots'];
|
|
9
6
|
class?: any;
|
|
10
7
|
};
|
|
8
|
+
type __VLS_Slots = {
|
|
9
|
+
loading: () => any;
|
|
10
|
+
};
|
|
11
11
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
12
12
|
loading: boolean;
|
|
13
13
|
icon: string;
|
|
@@ -82,13 +82,6 @@ import ColumnText from "#core/components/Table/ColumnText.vue";
|
|
|
82
82
|
import { useWatchChange } from "#core/composables/useWatch";
|
|
83
83
|
import UTable from "#ui/components/Table";
|
|
84
84
|
import { tableTheme } from "#core/theme/table";
|
|
85
|
-
const columnTypeComponents = {
|
|
86
|
-
[COLUMN_TYPES.NUMBER]: ColumnNumber,
|
|
87
|
-
[COLUMN_TYPES.IMAGE]: ColumnImage,
|
|
88
|
-
[COLUMN_TYPES.DATE_TIME]: ColumnDateTime,
|
|
89
|
-
[COLUMN_TYPES.DATE]: ColumnDate,
|
|
90
|
-
[COLUMN_TYPES.TEXT]: ColumnText
|
|
91
|
-
};
|
|
92
85
|
const emits = defineEmits(["pageChange"]);
|
|
93
86
|
const props = defineProps({
|
|
94
87
|
status: {
|
|
@@ -117,6 +110,13 @@ const props = defineProps({
|
|
|
117
110
|
default: false
|
|
118
111
|
}
|
|
119
112
|
});
|
|
113
|
+
const columnTypeComponents = {
|
|
114
|
+
[COLUMN_TYPES.NUMBER]: ColumnNumber,
|
|
115
|
+
[COLUMN_TYPES.IMAGE]: ColumnImage,
|
|
116
|
+
[COLUMN_TYPES.DATE_TIME]: ColumnDateTime,
|
|
117
|
+
[COLUMN_TYPES.DATE]: ColumnDate,
|
|
118
|
+
[COLUMN_TYPES.TEXT]: ColumnText
|
|
119
|
+
};
|
|
120
120
|
const page = ref(props.pageOptions?.currentPage || 1);
|
|
121
121
|
const theme = computed(() => useUiConfig(tableTheme, "table")());
|
|
122
122
|
const uTableCompatibleColumns = computed(
|
|
@@ -26,13 +26,13 @@ import { computed, ref } from "vue";
|
|
|
26
26
|
import Base from "#core/components/Table/Base.vue";
|
|
27
27
|
import { initPageOptions } from "#core/composables/loaderPage";
|
|
28
28
|
import { useCoreConfig } from "#core/composables/useConfig";
|
|
29
|
-
defineSlots();
|
|
30
29
|
const props = defineProps({
|
|
31
30
|
options: {
|
|
32
31
|
type: Object,
|
|
33
32
|
required: true
|
|
34
33
|
}
|
|
35
34
|
});
|
|
35
|
+
defineSlots();
|
|
36
36
|
const currentPage = ref(1);
|
|
37
37
|
const coreConfig = useCoreConfig();
|
|
38
38
|
const pageOptions = computed(() => {
|
|
@@ -110,6 +110,12 @@ import ColumnText from "#core/components/Table/ColumnText.vue";
|
|
|
110
110
|
import ColumnNumber from "#core/components/Table/ColumnNumber.vue";
|
|
111
111
|
import { tableTheme } from "#core/theme/table";
|
|
112
112
|
import UTable from "#ui/components/Table";
|
|
113
|
+
const emits = defineEmits(["pageChange", "search"]);
|
|
114
|
+
const props = defineProps({
|
|
115
|
+
options: { type: Object, required: true },
|
|
116
|
+
ui: { type: null, required: false }
|
|
117
|
+
});
|
|
118
|
+
defineSlots();
|
|
113
119
|
const columnTypeComponents = {
|
|
114
120
|
[COLUMN_TYPES.NUMBER]: ColumnNumber,
|
|
115
121
|
[COLUMN_TYPES.IMAGE]: ColumnImage,
|
|
@@ -117,12 +123,6 @@ const columnTypeComponents = {
|
|
|
117
123
|
[COLUMN_TYPES.DATE]: ColumnDate,
|
|
118
124
|
[COLUMN_TYPES.TEXT]: ColumnText
|
|
119
125
|
};
|
|
120
|
-
defineSlots();
|
|
121
|
-
const emits = defineEmits(["pageChange", "search"]);
|
|
122
|
-
const props = defineProps({
|
|
123
|
-
options: { type: Object, required: true },
|
|
124
|
-
ui: { type: null, required: false }
|
|
125
|
-
});
|
|
126
126
|
const page = ref(props.options?.pageOptions?.currentPage || 1);
|
|
127
127
|
const tableContainer = ref();
|
|
128
128
|
const router = useRouter();
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { TableSlots } from '@nuxt/ui';
|
|
2
2
|
import type { ITableOptions } from '#core/components/Table/types';
|
|
3
3
|
import { tableTheme } from '#core/theme/table';
|
|
4
|
-
type Slot = TableSlots<any> & {
|
|
5
|
-
error: (props?: Record<string, any>) => any;
|
|
6
|
-
};
|
|
7
|
-
type __VLS_Slots = Slot;
|
|
8
4
|
type __VLS_Props = {
|
|
9
5
|
options: ITableOptions<any>;
|
|
10
6
|
ui?: typeof tableTheme['slots'];
|
|
11
7
|
};
|
|
8
|
+
type __VLS_Slots = Slot;
|
|
9
|
+
type Slot = TableSlots<any> & {
|
|
10
|
+
error: (props?: Record<string, any>) => any;
|
|
11
|
+
};
|
|
12
12
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
13
|
search: (q: string) => any;
|
|
14
14
|
pageChange: (page: number) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "tailwindcss";@import "@nuxt/ui";@plugin "@tailwindcss/typography";@source inline("prose");@theme{--font-sans:"Noto Sans Thai","Noto Sans Thai Looped","Public Sans",sans-serif}@theme static{--color-main:#
|
|
1
|
+
@import "tailwindcss";@import "@nuxt/ui";@plugin "@tailwindcss/typography";@source inline("prose");@theme{--font-sans:"Noto Sans Thai","Noto Sans Thai Looped","Public Sans",sans-serif;--font-display:"Noto Sans Thai","Noto Sans Thai Looped","Public Sans",sans-serif}@theme static{--ui-text:var(--ui-color-neutral-800);--color-main:#1570ef;--color-main-50:#ebeeff;--color-main-100:#d1e9ff;--color-main-200:#b2ddff;--color-main-300:#84caff;--color-main-400:#53b1fd;--color-main-500:#1570ef;--color-main-600:#1570ef;--color-main-700:#175cd3;--color-main-800:#1849a9;--color-main-900:#194185;--color-main-950:#102a56;--color-warning:#f79009;--color-warning-50:#fffaeb;--color-warning-100:#fef0c7;--color-warning-200:#fedf89;--color-warning-300:#fec84b;--color-warning-400:#fdb022;--color-warning-500:#f79009;--color-warning-600:#dc6803;--color-warning-700:#b54708;--color-warning-800:#93370d;--color-warning-900:#7a2e0e;--color-warning-950:#4e1d09;--color-success:#17b26a;--color-success-50:#ecfdf3;--color-success-100:#dcfae6;--color-success-200:#abefc6;--color-success-300:#75e0a7;--color-success-400:#47cd89;--color-success-500:#17b26a;--color-success-600:#079455;--color-success-700:#067647;--color-success-800:#085d3a;--color-success-900:#074d31;--color-success-950:#053321;--color-error:#e11d48;--color-error-50:#fef2f2;--color-error-100:#fee2e2;--color-error-200:#f0899f;--color-error-300:#eb6582;--color-error-400:#e64065;--color-error-500:#e11d48;--color-error-600:#af1738;--color-error-700:#7e1028;--color-error-800:#4c0a18;--color-error-900:#1a0308;--color-error-950:#010000;--color-info:#2563eb;--color-info-50:#dde9ff;--color-info-100:#c8dfff;--color-info-200:#a1c4ff;--color-info-300:#7aa9ff;--color-info-400:#538eff;--color-info-500:#2563eb;--color-info-600:#1a4aaf;--color-info-700:#0f318a;--color-info-800:#081f65;--color-info-900:#020b3a;--color-info-950:#000;--color-white:#fff;--color-white-50:#fff;--color-white-100:#fff;--color-white-200:#fff;--color-white-300:#fff;--color-white-400:#fff;--color-white-500:#fff;--color-white-600:#e3e3e3;--color-white-700:#c7c7c7;--color-white-800:#ababab;--color-white-900:#8f8f8f;--color-white-950:#818181}html{@apply text-sm lg:text-base;font-family:Noto Sans Thai,Noto Sans Thai Looped,Public Sans,sans-serif}::-webkit-scrollbar{-webkit-appearance:none;height:10px;width:10px}::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.3);border-radius:4px;box-shadow:0 0 1px hsla(0,0%,100%,.5)}:root{--dp-font-family:inherit!important}.dp__theme_light{--dp-primary-color:var(--color-main)!important;--dp-primary-disabled-color:var(--color-main-200)!important}.dp__outer_menu_wrap{@apply ring-1 ring-gray-200}[role=dialog]{pointer-events:auto!important}#__nuxt,body,html{@apply w-full h-full}.dp__main{display:block!important}.dp__menu{border:none!important}.dp__pointer{height:44px!important}.dp__outer_menu_wrap{box-shadow:none!important}.dp--menu-wrapper{@apply ring-1 ring-slate-300}
|
|
@@ -2,4 +2,19 @@ export declare const buttonTheme: {
|
|
|
2
2
|
slots: {
|
|
3
3
|
base: string[];
|
|
4
4
|
};
|
|
5
|
+
variants: {
|
|
6
|
+
size: {
|
|
7
|
+
xl: {
|
|
8
|
+
base: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
compoundVariants: {
|
|
13
|
+
color: string;
|
|
14
|
+
variant: string;
|
|
15
|
+
class: string;
|
|
16
|
+
}[];
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
size: string;
|
|
19
|
+
};
|
|
5
20
|
};
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
export const buttonTheme = {
|
|
2
2
|
slots: {
|
|
3
|
-
base: ["cursor-pointer"]
|
|
3
|
+
base: ["rounded-lg cursor-pointer"]
|
|
4
|
+
},
|
|
5
|
+
variants: {
|
|
6
|
+
size: {
|
|
7
|
+
xl: {
|
|
8
|
+
base: "py-2.5 font-semibold"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
compoundVariants: [
|
|
13
|
+
{
|
|
14
|
+
color: "white",
|
|
15
|
+
variant: "solid",
|
|
16
|
+
class: "text-black"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
size: "xl"
|
|
4
21
|
}
|
|
5
22
|
};
|
|
@@ -8,7 +8,7 @@ export declare const dialogTheme: {
|
|
|
8
8
|
iconLoading: string;
|
|
9
9
|
};
|
|
10
10
|
slots: {
|
|
11
|
-
base: string;
|
|
11
|
+
base: string[];
|
|
12
12
|
overlay: string;
|
|
13
13
|
iconWrapper: string;
|
|
14
14
|
icon: string;
|
|
@@ -24,15 +24,19 @@ export declare const dialogTheme: {
|
|
|
24
24
|
color: {
|
|
25
25
|
success: {
|
|
26
26
|
icon: string;
|
|
27
|
+
iconWrapper: string;
|
|
27
28
|
};
|
|
28
29
|
info: {
|
|
29
30
|
icon: string;
|
|
31
|
+
iconWrapper: string;
|
|
30
32
|
};
|
|
31
33
|
warning: {
|
|
32
34
|
icon: string;
|
|
35
|
+
iconWrapper: string;
|
|
33
36
|
};
|
|
34
37
|
error: {
|
|
35
38
|
icon: string;
|
|
39
|
+
iconWrapper: string;
|
|
36
40
|
};
|
|
37
41
|
loading: {
|
|
38
42
|
icon: string;
|
|
@@ -1,42 +1,49 @@
|
|
|
1
1
|
export const dialogTheme = {
|
|
2
2
|
icons: {
|
|
3
3
|
iconSuccess: "i-heroicons-check-circle",
|
|
4
|
-
iconInfo: "
|
|
4
|
+
iconInfo: "material-symbols:info-outline",
|
|
5
5
|
iconWarning: "i-heroicons-exclamation-circle",
|
|
6
6
|
iconError: "i-heroicons-x-circle",
|
|
7
|
-
iconConfirm: "
|
|
7
|
+
iconConfirm: "material-symbols:info-outline",
|
|
8
8
|
iconLoading: "i-svg-spinners:180-ring-with-bg"
|
|
9
9
|
},
|
|
10
10
|
slots: {
|
|
11
|
-
base:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
base: [
|
|
12
|
+
"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]",
|
|
13
|
+
"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"
|
|
14
|
+
],
|
|
15
|
+
overlay: "bg-black/50 backdrop-blur",
|
|
16
|
+
iconWrapper: "rounded-full size-[48px] flex justify-center items-center",
|
|
17
|
+
icon: "size-6",
|
|
18
|
+
wrapper: "justify-start items-start",
|
|
16
19
|
confirmColor: "info",
|
|
17
|
-
title: "
|
|
18
|
-
description: "
|
|
19
|
-
buttonGroup: "
|
|
20
|
-
confirmButton: "",
|
|
21
|
-
cancelButton: ""
|
|
20
|
+
title: "mt-4",
|
|
21
|
+
description: "whitespace-pre-line",
|
|
22
|
+
buttonGroup: "justify-center w-full mt-6",
|
|
23
|
+
confirmButton: "w-full justify-center",
|
|
24
|
+
cancelButton: "w-full justify-center"
|
|
22
25
|
},
|
|
23
26
|
variants: {
|
|
24
27
|
color: {
|
|
25
28
|
success: {
|
|
26
|
-
icon: "text-success"
|
|
29
|
+
icon: "text-success",
|
|
30
|
+
iconWrapper: "bg-success/10"
|
|
27
31
|
},
|
|
28
32
|
info: {
|
|
29
|
-
icon: "text-info"
|
|
33
|
+
icon: "text-info",
|
|
34
|
+
iconWrapper: "bg-info/10"
|
|
30
35
|
},
|
|
31
36
|
warning: {
|
|
32
|
-
icon: "text-warning"
|
|
37
|
+
icon: "text-warning",
|
|
38
|
+
iconWrapper: "bg-warning/10"
|
|
33
39
|
},
|
|
34
40
|
error: {
|
|
35
|
-
icon: "text-error"
|
|
41
|
+
icon: "text-error",
|
|
42
|
+
iconWrapper: "bg-error/10"
|
|
36
43
|
},
|
|
37
44
|
loading: {
|
|
38
|
-
icon: "text-primary",
|
|
39
|
-
base: "max-w-[400px]",
|
|
45
|
+
icon: "text-primary size-10",
|
|
46
|
+
base: "max-w-[400px] bg-none",
|
|
40
47
|
wrapper: "justify-center"
|
|
41
48
|
}
|
|
42
49
|
},
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const dropdownMenuTheme = {
|
|
2
|
+
slots: {
|
|
3
|
+
content: "cursor-pointer w-full",
|
|
4
|
+
item: "cursor-pointer max-sm:h-14",
|
|
5
|
+
clearIcon: "size-6"
|
|
6
|
+
},
|
|
7
|
+
variants: {
|
|
8
|
+
size: {
|
|
9
|
+
lg: {
|
|
10
|
+
content: "text-sm py-2.5 disabled:bg-[#F5F5F5] disabled:text-[#737373] disabled:cursor-not-allowed"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
size: "lg"
|
|
16
|
+
}
|
|
17
|
+
};
|
|
@@ -13,3 +13,15 @@ export { uploadFileDropzoneTheme as uploadFileDropzone } from './uploadFileDropz
|
|
|
13
13
|
export { dateTimeTheme as dateTime } from './dateTime.js';
|
|
14
14
|
export { radioGroupTheme as radioGroup } from './radioGroup.js';
|
|
15
15
|
export { wysiwygTheme as wysiwyg } from './wysiwyg.js';
|
|
16
|
+
export { slideoverTheme as slideover } from './slideover.js';
|
|
17
|
+
export { toastTheme as toast } from './toast.js';
|
|
18
|
+
export { cardTheme as card } from './card.js';
|
|
19
|
+
export { switchTheme as switch } from './switch.js';
|
|
20
|
+
export { breadcrumbTheme as breadcrumb } from './breadcrumb.js';
|
|
21
|
+
export { tabsTheme as tabs } from './tabs.js';
|
|
22
|
+
export { modalTheme as modal } from './modal.js';
|
|
23
|
+
export { paginationTheme as pagination } from './pagination.js';
|
|
24
|
+
export { formFieldTheme as formField } from './formField.js';
|
|
25
|
+
export { inputTagsTheme as inputTags } from './inputTags.js';
|
|
26
|
+
export { stepperTheme as stepper } from './stepper.js';
|
|
27
|
+
export { dropdownMenuTheme as dropdownMenu } from './dropdownMenu.js';
|
|
@@ -13,3 +13,15 @@ export { uploadFileDropzoneTheme as uploadFileDropzone } from "./uploadFileDropz
|
|
|
13
13
|
export { dateTimeTheme as dateTime } from "./dateTime.js";
|
|
14
14
|
export { radioGroupTheme as radioGroup } from "./radioGroup.js";
|
|
15
15
|
export { wysiwygTheme as wysiwyg } from "./wysiwyg.js";
|
|
16
|
+
export { slideoverTheme as slideover } from "./slideover.js";
|
|
17
|
+
export { toastTheme as toast } from "./toast.js";
|
|
18
|
+
export { cardTheme as card } from "./card.js";
|
|
19
|
+
export { switchTheme as switch } from "./switch.js";
|
|
20
|
+
export { breadcrumbTheme as breadcrumb } from "./breadcrumb.js";
|
|
21
|
+
export { tabsTheme as tabs } from "./tabs.js";
|
|
22
|
+
export { modalTheme as modal } from "./modal.js";
|
|
23
|
+
export { paginationTheme as pagination } from "./pagination.js";
|
|
24
|
+
export { formFieldTheme as formField } from "./formField.js";
|
|
25
|
+
export { inputTagsTheme as inputTags } from "./inputTags.js";
|
|
26
|
+
export { stepperTheme as stepper } from "./stepper.js";
|
|
27
|
+
export { dropdownMenuTheme as dropdownMenu } from "./dropdownMenu.js";
|
|
@@ -5,7 +5,14 @@ export const inputTheme = {
|
|
|
5
5
|
suggestionItem: "px-3 py-3 text-sm cursor-pointer hover:bg-(--ui-color-primary-100) truncate",
|
|
6
6
|
suggestionItemActive: "bg-(--ui-color-primary-100)"
|
|
7
7
|
},
|
|
8
|
+
variants: {
|
|
9
|
+
size: {
|
|
10
|
+
xl: {
|
|
11
|
+
base: "py-2.5 disabled:bg-[#F5F5F5] disabled:text-[#737373] disabled:cursor-not-allowed"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
8
15
|
defaultVariants: {
|
|
9
|
-
size: "
|
|
16
|
+
size: "xl"
|
|
10
17
|
}
|
|
11
18
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const inputTagsTheme = {
|
|
2
|
+
variants: {
|
|
3
|
+
size: {
|
|
4
|
+
xl: {
|
|
5
|
+
base: "py-2.5 min-h-[100px] items-start disabled:bg-[#F5F5F5] disabled:text-[#737373] disabled:cursor-not-allowed w-full",
|
|
6
|
+
item: "bg-white"
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
defaultVariants: {
|
|
11
|
+
size: "xl"
|
|
12
|
+
}
|
|
13
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const modalTheme = {
|
|
2
|
+
slots: {
|
|
3
|
+
overlay: "bg-[#0C111D]/60 backdrop-blur",
|
|
4
|
+
title: "text-xl font-bold",
|
|
5
|
+
content: [
|
|
6
|
+
"divide-none overflow-visible flex flex-col",
|
|
7
|
+
"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"
|
|
8
|
+
],
|
|
9
|
+
body: "!pt-0 overflow-y-auto flex-1 overflow-x-visible",
|
|
10
|
+
footer: "w-full"
|
|
11
|
+
},
|
|
12
|
+
variants: {
|
|
13
|
+
fullscreen: {
|
|
14
|
+
false: {
|
|
15
|
+
content: "overflow-visible"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
@@ -5,12 +5,20 @@ export declare const selectMenuTheme: {
|
|
|
5
5
|
selectedWrapper: string;
|
|
6
6
|
selectedLabel: string;
|
|
7
7
|
clearIcon: string;
|
|
8
|
+
item: string;
|
|
8
9
|
tagsWrapper: string;
|
|
9
10
|
tagsItem: string;
|
|
10
11
|
tagsItemText: string;
|
|
11
12
|
tagsItemDelete: string[];
|
|
12
13
|
tagsItemDeleteIcon: string;
|
|
13
14
|
};
|
|
15
|
+
variants: {
|
|
16
|
+
size: {
|
|
17
|
+
xl: {
|
|
18
|
+
base: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
14
22
|
defaultVariants: {
|
|
15
23
|
size: string;
|
|
16
24
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export const selectMenuTheme = {
|
|
2
2
|
slots: {
|
|
3
|
-
base: "w-full",
|
|
3
|
+
base: "cursor-pointer w-full",
|
|
4
4
|
trailingIcon: "group-data-[state=open]:rotate-180 transition-transform duration-200",
|
|
5
5
|
selectedWrapper: "flex w-full items-center justify-between",
|
|
6
6
|
selectedLabel: "truncate",
|
|
7
|
-
clearIcon: "size-
|
|
7
|
+
clearIcon: "size-6",
|
|
8
|
+
item: "cursor-pointer max-sm:h-14",
|
|
8
9
|
tagsWrapper: "flex flex-wrap gap-x-2 gap-y-1",
|
|
9
10
|
tagsItem: "px-1.5 py-0.5 rounded-sm inline-flex items-center gap-0.5 bg-primary text-white data-disabled:cursor-not-allowed data-disabled:opacity-75",
|
|
10
11
|
tagsItemText: "flex items-center gap-x-1 text-sm",
|
|
@@ -14,7 +15,14 @@ export const selectMenuTheme = {
|
|
|
14
15
|
],
|
|
15
16
|
tagsItemDeleteIcon: "ph:x"
|
|
16
17
|
},
|
|
18
|
+
variants: {
|
|
19
|
+
size: {
|
|
20
|
+
xl: {
|
|
21
|
+
base: "py-2.5 disabled:bg-[#F5F5F5] disabled:text-[#737373] disabled:cursor-not-allowed"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
17
25
|
defaultVariants: {
|
|
18
|
-
size: "
|
|
26
|
+
size: "xl"
|
|
19
27
|
}
|
|
20
28
|
};
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
export declare const tableTheme: {
|
|
2
2
|
slots: {
|
|
3
|
+
root: string;
|
|
3
4
|
searchContainer: string;
|
|
4
5
|
captionContainer: string;
|
|
5
6
|
captionBoldText: string;
|
|
6
7
|
errorMessage: string;
|
|
7
8
|
paginationContainer: string;
|
|
8
9
|
paginationInfo: string;
|
|
10
|
+
thead: string;
|
|
11
|
+
th: string;
|
|
12
|
+
td: string;
|
|
13
|
+
};
|
|
14
|
+
variants: {
|
|
15
|
+
pinned: {
|
|
16
|
+
true: {
|
|
17
|
+
th: string;
|
|
18
|
+
td: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
sticky: {
|
|
22
|
+
true: {
|
|
23
|
+
thead: string;
|
|
24
|
+
tfoot: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
9
27
|
};
|
|
10
28
|
};
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
export const tableTheme = {
|
|
2
2
|
slots: {
|
|
3
|
+
root: "rounded-t-md rounded-b-md bg-white",
|
|
3
4
|
searchContainer: "mb-4 flex justify-end",
|
|
4
|
-
captionContainer: "
|
|
5
|
+
captionContainer: "hidden",
|
|
5
6
|
captionBoldText: "font-bold",
|
|
6
7
|
errorMessage: "text-error-400 text-2xl h-[200px] flex justify-center items-center",
|
|
7
|
-
paginationContainer: "
|
|
8
|
-
paginationInfo: "text-
|
|
8
|
+
paginationContainer: "items-center flex-col lg:flex-row gap-4",
|
|
9
|
+
paginationInfo: "text-gray-600",
|
|
10
|
+
thead: "bg-primary",
|
|
11
|
+
th: "text-[#222222] bg-white whitespace-nowrap",
|
|
12
|
+
td: "text-[#222222]"
|
|
13
|
+
},
|
|
14
|
+
variants: {
|
|
15
|
+
pinned: {
|
|
16
|
+
true: {
|
|
17
|
+
th: "sticky bg-gray-100 data-[pinned=left]:left-0 data-[pinned=right]:right-0 z-[100] ",
|
|
18
|
+
td: "sticky bg-gray-50 data-[pinned=left]:left-0 data-[pinned=right]:right-0 "
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
sticky: {
|
|
22
|
+
true: {
|
|
23
|
+
thead: "sticky top-0 inset-x-0 bg-primary z-[1] backdrop-blur",
|
|
24
|
+
tfoot: "sticky bottom-0 inset-x-0 bg-white z-[1] backdrop-blur"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
9
27
|
}
|
|
10
28
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const tabsTheme = {
|
|
2
|
+
slots: {
|
|
3
|
+
label: "whitespace-nowrap",
|
|
4
|
+
list: "relative flex p-1 group overflow-x-auto overflow-y-hidden scrollbar-hide",
|
|
5
|
+
trigger: "data-[state=active]:font-bold cursor-pointer whitespace-nowrap shrink-0"
|
|
6
|
+
},
|
|
7
|
+
defaultVariants: {
|
|
8
|
+
size: "xl"
|
|
9
|
+
}
|
|
10
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finema/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.44.0",
|
|
4
4
|
"repository": "https://gitlab.finema.co/finema/ui-kit",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Finema Dev Core Team",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@eslint/js": "^9.26.0",
|
|
75
|
+
"@finema/eslint-config": "^2.0.3",
|
|
75
76
|
"@nuxt/devtools": "^2.6.0",
|
|
76
77
|
"@nuxt/eslint-config": "^1.4.1",
|
|
77
78
|
"@nuxt/module-builder": "^1.0.2",
|
|
@@ -79,9 +80,6 @@
|
|
|
79
80
|
"@nuxt/test-utils": "^3.19.0",
|
|
80
81
|
"@types/node": "latest",
|
|
81
82
|
"changelogen": "^0.6.1",
|
|
82
|
-
"eslint": "^9.26.0",
|
|
83
|
-
"eslint-plugin-unused-imports": "^4.1.4",
|
|
84
|
-
"eslint-plugin-better-tailwindcss": "^3.3.0",
|
|
85
83
|
"husky": "^9.1.7",
|
|
86
84
|
"lint-staged": "^16.0.0",
|
|
87
85
|
"nuxt": "^4.0.2",
|
|
@@ -93,4 +91,4 @@
|
|
|
93
91
|
"lint-staged": {
|
|
94
92
|
"*": "eslint --fix --quiet"
|
|
95
93
|
}
|
|
96
|
-
}
|
|
94
|
+
}
|