@finema/core 2.33.0 → 2.35.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 (36) hide show
  1. package/dist/module.d.mts +2 -0
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +7 -5
  4. package/dist/runtime/components/Form/FieldWrapper.vue +13 -13
  5. package/dist/runtime/components/Form/Fields.vue +18 -13
  6. package/dist/runtime/components/Form/InputCheckbox/index.vue +18 -18
  7. package/dist/runtime/components/Form/InputComponent/index.vue +1 -1
  8. package/dist/runtime/components/Form/InputDateTime/index.vue +3 -3
  9. package/dist/runtime/components/Form/InputDateTimeRange/index.vue +3 -3
  10. package/dist/runtime/components/Form/InputMonth/index.vue +105 -0
  11. package/dist/runtime/components/Form/InputMonth/index.vue.d.ts +6 -0
  12. package/dist/runtime/components/Form/InputMonth/types.d.ts +9 -0
  13. package/dist/runtime/components/Form/InputMonth/types.js +0 -0
  14. package/dist/runtime/components/Form/InputNumber/index.vue +20 -20
  15. package/dist/runtime/components/Form/InputSelectMultiple/index.vue +43 -43
  16. package/dist/runtime/components/Form/InputTextarea/index.vue +18 -18
  17. package/dist/runtime/components/Form/InputTime/index.vue +37 -37
  18. package/dist/runtime/components/Form/InputToggle/index.vue +17 -17
  19. package/dist/runtime/components/Form/InputUploadDropzone/index.vue +30 -30
  20. package/dist/runtime/components/Form/fileState/EmptyState.vue +21 -21
  21. package/dist/runtime/components/Form/fileState/FailedState.vue +33 -33
  22. package/dist/runtime/components/Form/fileState/LoadingState.vue +24 -24
  23. package/dist/runtime/components/Form/fileState/PreviewModal.vue +23 -23
  24. package/dist/runtime/components/Form/index.vue +5 -5
  25. package/dist/runtime/components/Form/types.d.ts +3 -1
  26. package/dist/runtime/components/Form/types.js +1 -0
  27. package/dist/runtime/components/Image.vue +28 -28
  28. package/dist/runtime/components/Log/index.vue +17 -17
  29. package/dist/runtime/components/Table/Base.vue +67 -67
  30. package/dist/runtime/components/Table/ColumnDate.vue +1 -1
  31. package/dist/runtime/components/Table/ColumnDateTime.vue +1 -1
  32. package/dist/runtime/components/Table/ColumnImage.vue +4 -4
  33. package/dist/runtime/components/Table/ColumnText.vue +1 -1
  34. package/dist/runtime/components/Table/Simple.vue +20 -20
  35. package/dist/runtime/server/tsconfig.json +3 -3
  36. package/package.json +2 -2
package/dist/module.d.mts CHANGED
@@ -5,6 +5,7 @@ declare const core: {
5
5
  default_primary_key: string;
6
6
  time_format: string;
7
7
  date_format: string;
8
+ month_format: string;
8
9
  date_time_format: string;
9
10
  date_format_system: string;
10
11
  date_time_format_system: string;
@@ -13,6 +14,7 @@ declare const core: {
13
14
  site_name: string;
14
15
  color: string;
15
16
  time_zone: string;
17
+ locale: string;
16
18
  };
17
19
 
18
20
  interface ModuleOptions {
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "2.33.0",
3
+ "version": "2.35.0",
4
4
  "configKey": "core",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
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.33.0";
7
+ const version = "2.35.0";
8
8
 
9
9
  const nuxtAppOptions = {
10
10
  head: {
@@ -52,15 +52,17 @@ const core = {
52
52
  limit_per_page: 30,
53
53
  default_primary_key: "id",
54
54
  time_format: "HH:mm",
55
- date_format: "dd-MM-yyyy",
56
- date_time_format: "dd-MM-yyyy HH:mm",
57
- date_format_system: "yyyy-MM-dd",
55
+ date_format: "dd-MMM-yyyy",
56
+ month_format: "MMM-yyyy",
57
+ date_time_format: "dd-MMM-yyyy HH:mm",
58
+ date_format_system: "yyyy-MMM-dd",
58
59
  date_time_format_system: "yyyy-MM-dd HH:mm",
59
60
  is_thai_year: false,
60
61
  is_thai_month: false,
61
62
  site_name: "",
62
63
  color: "#3675FB",
63
- time_zone: "Asia/Bangkok"
64
+ time_zone: "Asia/Bangkok",
65
+ locale: "th"
64
66
  };
65
67
 
66
68
  const module = defineNuxtModule({
@@ -1,17 +1,17 @@
1
1
  <template>
2
- <FormField
3
- :label="label"
4
- :name="name"
5
- :description="description"
6
- :hint="hint"
7
- :data-testid="name"
8
- :help="help"
9
- :error="errorMessage"
10
- :required="!!required"
11
- :ui="containerUi"
12
- >
13
- <slot />
14
- </FormField>
2
+ <FormField
3
+ :label="label"
4
+ :name="name"
5
+ :description="description"
6
+ :hint="hint"
7
+ :data-testid="name"
8
+ :help="help"
9
+ :error="errorMessage"
10
+ :required="!!required"
11
+ :ui="containerUi"
12
+ >
13
+ <slot />
14
+ </FormField>
15
15
  </template>
16
16
 
17
17
  <script setup>
@@ -1,22 +1,22 @@
1
1
  <template>
2
- <div
2
+ <div
3
3
  :class="[theme.base({
4
4
  class: [$props.class, ui?.base]
5
- })]"
6
- >
7
- <component
8
- :is="componentMap[option.type]?.component"
9
- v-for="option in options.filter((item) => !item.isHide)"
10
- :key="option.props.name"
11
- :class="option.class"
12
- :form="form"
5
+ })]"
6
+ >
7
+ <component
8
+ :is="componentMap[option.type]?.component"
9
+ v-for="option in options.filter((item) => !item.isHide)"
10
+ :key="option.props.name"
11
+ :class="option.class"
12
+ :form="form"
13
13
  v-bind="{
14
14
  ...getFieldBinding(option),
15
15
  ...componentMap[option.type]?.props
16
- }"
17
- v-on="option.on ?? {}"
18
- />
19
- </div>
16
+ }"
17
+ v-on="option.on ?? {}"
18
+ />
19
+ </div>
20
20
  </template>
21
21
 
22
22
  <script setup>
@@ -33,6 +33,7 @@ import FormInputComponent from "./InputComponent/index.vue";
33
33
  import FormInputRadio from "./InputRadio/index.vue";
34
34
  import FormInputDateTime from "./InputDateTime/index.vue";
35
35
  import FormInputTime from "./InputTime/index.vue";
36
+ import FormInputMonth from "./InputMonth/index.vue";
36
37
  import FormInputDateTimeRange from "./InputDateTimeRange/index.vue";
37
38
  import FormInputUploadDropzoneAuto from "./InputUploadDropzoneAuto/index.vue";
38
39
  import FormInputUploadDropzone from "./InputUploadDropzone/index.vue";
@@ -118,6 +119,10 @@ const componentMap = {
118
119
  disabledTime: true
119
120
  }
120
121
  },
122
+ [INPUT_TYPES.MONTH]: {
123
+ component: FormInputMonth,
124
+ props: {}
125
+ },
121
126
  [INPUT_TYPES.DATE_RANGE]: {
122
127
  component: FormInputDateTimeRange,
123
128
  props: {
@@ -1,22 +1,22 @@
1
1
  <template>
2
- <FieldWrapper
3
- v-bind="wrapperProps"
4
- label=""
5
- description=""
6
- >
7
- <Checkbox
8
- :model-value="value"
9
- :disabled="wrapperProps.disabled"
10
- :name="name"
11
- :label="label"
12
- :description="description"
13
- :required="required"
14
- :variant="variant"
15
- :indicator="indicator"
16
- :ui="ui"
17
- @update:modelValue="onChange"
18
- />
19
- </FieldWrapper>
2
+ <FieldWrapper
3
+ v-bind="wrapperProps"
4
+ label=""
5
+ description=""
6
+ >
7
+ <Checkbox
8
+ :model-value="value"
9
+ :disabled="wrapperProps.disabled"
10
+ :name="name"
11
+ :label="label"
12
+ :description="description"
13
+ :required="required"
14
+ :variant="variant"
15
+ :indicator="indicator"
16
+ :ui="ui"
17
+ @update:modelValue="onChange"
18
+ />
19
+ </FieldWrapper>
20
20
  </template>
21
21
 
22
22
  <script setup>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <component :is="props.component" :value="value" v-bind="props"/>
2
+ <component :is="props.component" :value="value" v-bind="props"/>
3
3
  </template>
4
4
 
5
5
  <script setup>
@@ -4,9 +4,9 @@
4
4
  :teleport="true"
5
5
  :model-value="innerValue"
6
6
  :disabled="wrapperProps.disabled"
7
- cancel-text="ยกเลิก"
8
- select-text="เลือก"
9
- locale="th"
7
+ :cancel-text="appConfig.core?.locale === 'th' ? '\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01' : 'Cancel'"
8
+ :select-text="appConfig.core?.locale === 'th' ? '\u0E15\u0E01\u0E25\u0E07' : 'Select'"
9
+ :locale="appConfig.core?.locale"
10
10
  :enable-time-picker="!disabledTime"
11
11
  :placeholder="wrapperProps.placeholder"
12
12
  :format="format"
@@ -5,9 +5,9 @@
5
5
  v-model="innerValueRef"
6
6
  :teleport="true"
7
7
  :disabled="wrapperProps.disabled"
8
- cancel-text="ยกเลิก"
9
- select-text="เลือก"
10
- locale="th"
8
+ :cancel-text="appConfig.core?.locale === 'th' ? '\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01' : 'Cancel'"
9
+ :select-text="appConfig.core?.locale === 'th' ? '\u0E15\u0E01\u0E25\u0E07' : 'Select'"
10
+ :locale="appConfig.core?.locale"
11
11
  :format="format"
12
12
  :enable-time-picker="!disabledTime"
13
13
  :placeholder="wrapperProps.placeholder"
@@ -0,0 +1,105 @@
1
+ <template>
2
+ <FieldWrapper v-bind="wrapperProps">
3
+ <Datepicker
4
+ v-model="value"
5
+ :teleport="true"
6
+ :disabled="wrapperProps.disabled"
7
+ :cancel-text="appConfig.core?.locale === 'th' ? '\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01' : 'Cancel'"
8
+ :select-text="appConfig.core?.locale === 'th' ? '\u0E15\u0E01\u0E25\u0E07' : 'Select'"
9
+ :locale="appConfig.core?.locale"
10
+ :format="appConfig.core?.month_format"
11
+ month-picker
12
+ :placeholder="wrapperProps.placeholder"
13
+ :min-date="minDate"
14
+ :max-date="maxDate"
15
+ :required="wrapperProps.required"
16
+ :clearable="true"
17
+ :always-clearable="true"
18
+ >
19
+ <template
20
+ v-if="appConfig.core?.is_thai_year"
21
+ #year="{ year }"
22
+ >
23
+ {{ year + 543 }}
24
+ </template>
25
+ <template
26
+ v-if="appConfig.core?.is_thai_year"
27
+ #year-overlay-value="{ value }"
28
+ >
29
+ {{ value + 543 }}
30
+ </template>
31
+ <template #dp-input>
32
+ <Input
33
+ :trailing-icon="!wrapperProps.required && value ? void 0 : 'i-heroicons-calendar-days'"
34
+ type="text"
35
+ :disabled="wrapperProps.disabled"
36
+ :model-value="formatDisplay(value)"
37
+ :placeholder="wrapperProps.placeholder"
38
+ :readonly="true"
39
+ :ui="{
40
+ base: 'cursor-pointer select-none',
41
+ trailingIcon: 'cursor-pointer'
42
+ }"
43
+ />
44
+ </template>
45
+ <template #clear-icon="{ clear }">
46
+ <Icon
47
+ v-if="value && !wrapperProps.disabled && !wrapperProps.required"
48
+ :name="clearIcon"
49
+ :class="theme.clearIcon({
50
+ class: [ui?.clearIcon]
51
+ })"
52
+ @click.stop="clear"
53
+ />
54
+ </template>
55
+ </Datepicker>
56
+ </FieldWrapper>
57
+ </template>
58
+
59
+ <script setup>
60
+ import Datepicker from "@vuepic/vue-datepicker";
61
+ import FieldWrapper from "#core/components/Form/FieldWrapper.vue";
62
+ import { computed, useAppConfig, useFieldHOC, useUiConfig } from "#imports";
63
+ import "@vuepic/vue-datepicker/dist/main.css";
64
+ import { dateTimeTheme } from "#core/theme/dateTime";
65
+ import { format } from "date-fns-tz";
66
+ import * as locales from "date-fns/locale";
67
+ import { addYears } from "date-fns";
68
+ const props = defineProps({
69
+ clearIcon: { type: String, required: false, default: "ph:x-circle-fill" },
70
+ minDate: { type: [Date, String], required: false },
71
+ maxDate: { type: [Date, String], required: false },
72
+ form: { type: Object, required: false },
73
+ name: { type: String, required: true },
74
+ errorMessage: { type: String, required: false },
75
+ label: { type: null, required: false },
76
+ description: { type: String, required: false },
77
+ hint: { type: String, required: false },
78
+ rules: { type: null, required: false },
79
+ autoFocus: { type: Boolean, required: false },
80
+ placeholder: { type: String, required: false },
81
+ disabled: { type: Boolean, required: false },
82
+ readonly: { type: Boolean, required: false },
83
+ required: { type: Boolean, required: false },
84
+ help: { type: String, required: false },
85
+ ui: { type: null, required: false }
86
+ });
87
+ const appConfig = useAppConfig();
88
+ const theme = computed(() => useUiConfig(dateTimeTheme, "dateTime")());
89
+ const {
90
+ value,
91
+ wrapperProps
92
+ } = useFieldHOC(props);
93
+ const formatDisplay = (date) => {
94
+ if (!date) return "";
95
+ let newDateStr = new Date(date.year, date.month);
96
+ const options = {};
97
+ if (appConfig.core?.is_thai_year) {
98
+ newDateStr = addYears(newDateStr, 543);
99
+ }
100
+ if (appConfig.core?.is_thai_month) {
101
+ options.locale = locales.th;
102
+ }
103
+ return format(newDateStr, appConfig.core?.month_format, options);
104
+ };
105
+ </script>
@@ -0,0 +1,6 @@
1
+ import '@vuepic/vue-datepicker/dist/main.css';
2
+ import type { IMonthFieldProps } from '#core/components/Form/InputMonth/types';
3
+ declare const _default: import("vue").DefineComponent<IMonthFieldProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IMonthFieldProps> & Readonly<{}>, {
4
+ clearIcon: string;
5
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import type { IFieldProps, IFormFieldBase, INPUT_TYPES } from '#core/components/Form/types';
2
+ export interface IMonthFieldProps extends IFieldProps {
3
+ clearIcon?: string;
4
+ minDate?: Date | string;
5
+ maxDate?: Date | string;
6
+ }
7
+ export type IMonthField = IFormFieldBase<INPUT_TYPES.MONTH, IMonthFieldProps, {
8
+ change: (value: string) => void;
9
+ }>;
@@ -1,24 +1,24 @@
1
1
  <template>
2
- <FieldWrapper v-bind="wrapperProps">
3
- <InputNumber
4
- :model-value="value"
5
- :disabled="wrapperProps.disabled"
6
- :name="name"
7
- :placeholder="wrapperProps.placeholder"
8
- :autofocus="!!autoFocus"
9
- :readonly="readonly"
10
- :orientation="orientation"
11
- :increment-disabled="incrementDisabled"
12
- :decrement-disabled="decrementDisabled"
13
- :min="min"
14
- :max="max"
15
- :step="step"
16
- :disable-wheel-change="disableWheelChange"
17
- :format-options="formatOptions"
18
- :ui="ui"
19
- @update:model-value="onChange"
20
- />
21
- </FieldWrapper>
2
+ <FieldWrapper v-bind="wrapperProps">
3
+ <InputNumber
4
+ :model-value="value"
5
+ :disabled="wrapperProps.disabled"
6
+ :name="name"
7
+ :placeholder="wrapperProps.placeholder"
8
+ :autofocus="!!autoFocus"
9
+ :readonly="readonly"
10
+ :orientation="orientation"
11
+ :increment-disabled="incrementDisabled"
12
+ :decrement-disabled="decrementDisabled"
13
+ :min="min"
14
+ :max="max"
15
+ :step="step"
16
+ :disable-wheel-change="disableWheelChange"
17
+ :format-options="formatOptions"
18
+ :ui="ui"
19
+ @update:model-value="onChange"
20
+ />
21
+ </FieldWrapper>
22
22
  </template>
23
23
 
24
24
  <script setup>
@@ -1,57 +1,57 @@
1
1
  <template>
2
- <FieldWrapper v-bind="wrapperProps">
3
- <SelectMenu
4
- :model-value="value"
5
- :items="options"
6
- multiple
7
- :placeholder="wrapperProps.placeholder"
8
- :disabled="wrapperProps.disabled"
9
- :loading="loading"
10
- :search-input="searchInput"
11
- :selected-icon="selectedIcon"
12
- value-key="value"
13
- label-key="label"
14
- :icon="icon"
15
- :ui="ui"
16
- :ignore-filter="!!$attrs.onSearch"
17
- @update:model-value="onChange"
18
- @update:searchTerm="onSearch"
19
- >
20
- <template #default="{ modelValue }">
21
- <div
22
- v-if="!ArrayHelper.isEmpty(value)"
2
+ <FieldWrapper v-bind="wrapperProps">
3
+ <SelectMenu
4
+ :model-value="value"
5
+ :items="options"
6
+ multiple
7
+ :placeholder="wrapperProps.placeholder"
8
+ :disabled="wrapperProps.disabled"
9
+ :loading="loading"
10
+ :search-input="searchInput"
11
+ :selected-icon="selectedIcon"
12
+ value-key="value"
13
+ label-key="label"
14
+ :icon="icon"
15
+ :ui="ui"
16
+ :ignore-filter="!!$attrs.onSearch"
17
+ @update:model-value="onChange"
18
+ @update:searchTerm="onSearch"
19
+ >
20
+ <template #default="{ modelValue }">
21
+ <div
22
+ v-if="!ArrayHelper.isEmpty(value)"
23
23
  :class="theme.tagsWrapper({
24
24
  class: [ui?.tagsWrapper]
25
- })"
26
- >
27
- <div
28
- v-for="_value in ArrayHelper.toArray(modelValue)"
29
- :key="_value"
25
+ })"
26
+ >
27
+ <div
28
+ v-for="_value in ArrayHelper.toArray(modelValue)"
29
+ :key="_value"
30
30
  :class="theme.tagsItem({
31
31
  class: [ui?.tagsItem]
32
- })"
33
- >
34
- <div
32
+ })"
33
+ >
34
+ <div
35
35
  :class="theme.tagsItemText({
36
36
  class: [ui?.tagsItemText]
37
- })"
38
- >
39
- {{ options.find((item) => item.value === _value)?.label || _value }}
40
- <Icon
37
+ })"
38
+ >
39
+ {{ options.find((item) => item.value === _value)?.label || _value }}
40
+ <Icon
41
41
  :name="theme.tagsItemDeleteIcon({
42
42
  class: [ui?.tagsItemDeleteIcon]
43
- })"
43
+ })"
44
44
  :class="theme.tagsItemDelete({
45
45
  class: [ui?.tagsItemDelete]
46
- })"
47
- @click.stop="handleDelete(_value)"
48
- />
49
- </div>
50
- </div>
51
- </div>
52
- </template>
53
- </SelectMenu>
54
- </FieldWrapper>
46
+ })"
47
+ @click.stop="handleDelete(_value)"
48
+ />
49
+ </div>
50
+ </div>
51
+ </div>
52
+ </template>
53
+ </SelectMenu>
54
+ </FieldWrapper>
55
55
  </template>
56
56
 
57
57
  <script setup>
@@ -1,22 +1,22 @@
1
1
  <template>
2
- <FieldWrapper v-bind="wrapperProps">
3
- <Textarea
4
- :model-value="value"
5
- :disabled="wrapperProps.disabled"
6
- :name="name"
7
- :resize="resize"
8
- :placeholder="wrapperProps.placeholder"
9
- :autofocus="!!autoFocus"
10
- :autoresize="autoresize"
11
- :rows="rows"
12
- :maxrows="maxrows"
13
- :loading="loading"
14
- :loading-icon="loadingIcon"
15
- :readonly="readonly"
16
- :ui="ui"
17
- @update:model-value="onChange"
18
- />
19
- </FieldWrapper>
2
+ <FieldWrapper v-bind="wrapperProps">
3
+ <Textarea
4
+ :model-value="value"
5
+ :disabled="wrapperProps.disabled"
6
+ :name="name"
7
+ :resize="resize"
8
+ :placeholder="wrapperProps.placeholder"
9
+ :autofocus="!!autoFocus"
10
+ :autoresize="autoresize"
11
+ :rows="rows"
12
+ :maxrows="maxrows"
13
+ :loading="loading"
14
+ :loading-icon="loadingIcon"
15
+ :readonly="readonly"
16
+ :ui="ui"
17
+ @update:model-value="onChange"
18
+ />
19
+ </FieldWrapper>
20
20
  </template>
21
21
 
22
22
  <script setup>
@@ -1,46 +1,46 @@
1
1
  <template>
2
- <FieldWrapper v-bind="wrapperProps">
3
- <Datepicker
4
- v-model="innerValue"
5
- :disabled="wrapperProps.disabled"
6
- cancel-text="ยกเลิก"
7
- select-text="เลือก"
8
- locale="th"
9
- time-picker
10
- :placeholder="wrapperProps.placeholder"
11
- :format="format"
12
- :min-time="minTime"
13
- :max-time="maxTime"
14
- :start-time="startTime"
15
- :required="required"
16
- :enable-seconds="enableSeconds"
17
- @update:model-value="onChange"
18
- >
19
- <template #dp-input="{ value: innerValue }">
20
- <Input
21
- :trailing-icon="innerValue ? void 0 : 'i-heroicons-clock'"
22
- type="text"
23
- :disabled="wrapperProps.disabled"
24
- :model-value="innerValue"
25
- :placeholder="wrapperProps.placeholder"
26
- :readonly="true"
2
+ <FieldWrapper v-bind="wrapperProps">
3
+ <Datepicker
4
+ v-model="innerValue"
5
+ :disabled="wrapperProps.disabled"
6
+ cancel-text="ยกเลิก"
7
+ select-text="เลือก"
8
+ locale="th"
9
+ time-picker
10
+ :placeholder="wrapperProps.placeholder"
11
+ :format="format"
12
+ :min-time="minTime"
13
+ :max-time="maxTime"
14
+ :start-time="startTime"
15
+ :required="required"
16
+ :enable-seconds="enableSeconds"
17
+ @update:model-value="onChange"
18
+ >
19
+ <template #dp-input="{ value: innerValue }">
20
+ <Input
21
+ :trailing-icon="innerValue ? void 0 : 'i-heroicons-clock'"
22
+ type="text"
23
+ :disabled="wrapperProps.disabled"
24
+ :model-value="innerValue"
25
+ :placeholder="wrapperProps.placeholder"
26
+ :readonly="true"
27
27
  :ui="{
28
28
  base: 'cursor-pointer select-none',
29
29
  trailingIcon: 'cursor-pointer'
30
- }"
31
- />
32
- </template>
33
- <template #clear-icon="{ clear }">
34
- <Icon
35
- :name="clearIcon"
30
+ }"
31
+ />
32
+ </template>
33
+ <template #clear-icon="{ clear }">
34
+ <Icon
35
+ :name="clearIcon"
36
36
  :class="theme.clearIcon({
37
37
  class: [ui?.clearIcon]
38
- })"
39
- @click.stop="clear"
40
- />
41
- </template>
42
- </Datepicker>
43
- </FieldWrapper>
38
+ })"
39
+ @click.stop="clear"
40
+ />
41
+ </template>
42
+ </Datepicker>
43
+ </FieldWrapper>
44
44
  </template>
45
45
 
46
46
  <script setup>
@@ -1,21 +1,21 @@
1
1
  <template>
2
- <FieldWrapper
3
- v-bind="wrapperProps"
4
- label=""
5
- description=""
6
- >
7
- <Switch
8
- :model-value="value"
9
- :disabled="wrapperProps.disabled"
10
- :name="name"
11
- :ui="ui"
12
- :label="label"
13
- :description="description"
14
- :loading="loading"
15
- :loading-icon="loadingIcon"
16
- @update:modelValue="onChange"
17
- />
18
- </FieldWrapper>
2
+ <FieldWrapper
3
+ v-bind="wrapperProps"
4
+ label=""
5
+ description=""
6
+ >
7
+ <Switch
8
+ :model-value="value"
9
+ :disabled="wrapperProps.disabled"
10
+ :name="name"
11
+ :ui="ui"
12
+ :label="label"
13
+ :description="description"
14
+ :loading="loading"
15
+ :loading-icon="loadingIcon"
16
+ @update:modelValue="onChange"
17
+ />
18
+ </FieldWrapper>
19
19
  </template>
20
20
 
21
21
  <script setup>