vueless 0.0.612 → 0.0.613
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/package.json +1 -1
- package/ui.button-link/ULink.vue +2 -2
- package/ui.button-link/constants.ts +1 -1
- package/ui.button-toggle/UToggle.vue +2 -2
- package/ui.button-toggle/constants.ts +1 -1
- package/ui.button-toggle-item/UToggleItem.vue +9 -9
- package/ui.button-toggle-item/constants.ts +1 -1
- package/ui.container-accordion/UAccordion.vue +2 -2
- package/ui.container-accordion/constants.ts +1 -1
- package/ui.container-card/UCard.vue +2 -2
- package/ui.container-card/constants.ts +1 -1
- package/ui.container-col/UCol.vue +2 -2
- package/ui.container-col/constants.ts +1 -1
- package/ui.container-divider/UDivider.vue +2 -2
- package/ui.container-divider/constants.ts +1 -1
- package/ui.container-group/UGroup.vue +2 -2
- package/ui.container-group/constants.ts +1 -1
- package/ui.container-groups/UGroups.vue +2 -2
- package/ui.container-groups/constants.ts +1 -1
- package/ui.container-modal/UModal.vue +2 -2
- package/ui.container-modal/constants.ts +1 -1
- package/ui.container-modal-confirm/UModalConfirm.vue +3 -3
- package/ui.container-modal-confirm/constants.ts +1 -1
- package/ui.container-page/UPage.vue +2 -2
- package/ui.container-page/constants.ts +1 -1
- package/ui.container-row/URow.vue +2 -2
- package/ui.container-row/constants.ts +1 -1
- package/ui.data-list/UDataList.vue +3 -3
- package/ui.data-list/constants.ts +1 -1
- package/ui.data-table/UTable.vue +3 -3
- package/ui.data-table/constants.ts +1 -1
- package/ui.dropdown-badge/UDropdownBadge.vue +2 -2
- package/ui.dropdown-badge/constants.ts +1 -1
- package/ui.dropdown-button/UDropdownButton.vue +2 -2
- package/ui.dropdown-button/constants.ts +1 -1
- package/ui.dropdown-link/UDropdownLink.vue +2 -2
- package/ui.dropdown-link/constants.ts +1 -1
- package/ui.dropdown-list/UDropdownList.vue +3 -3
- package/ui.dropdown-list/constants.ts +1 -1
- package/ui.form-calendar/UCalendar.vue +3 -3
- package/ui.form-calendar/constants.ts +1 -1
- package/ui.form-calendar/storybook/stories.ts +4 -4
- package/ui.form-checkbox/UCheckbox.vue +2 -2
- package/ui.form-checkbox/constants.ts +1 -1
- package/ui.form-checkbox-group/UCheckboxGroup.vue +2 -2
- package/ui.form-checkbox-group/constants.ts +1 -1
- package/ui.form-checkbox-multi-state/UCheckboxMultiState.vue +2 -2
- package/ui.form-checkbox-multi-state/constants.ts +1 -1
- package/ui.form-color-picker/UColorPicker.vue +3 -3
- package/ui.form-color-picker/constants.ts +1 -1
- package/ui.form-date-picker/UDatePicker.vue +3 -3
- package/ui.form-date-picker/constants.ts +1 -1
- package/ui.form-date-picker/storybook/stories.ts +4 -4
- package/ui.form-date-picker-range/UDatePickerRange.vue +2 -2
- package/ui.form-date-picker-range/constants.ts +1 -1
- package/ui.form-date-picker-range/storybook/stories.ts +4 -4
- package/ui.form-date-picker-range/useLocale.ts +2 -2
- package/ui.form-input/UInput.vue +2 -2
- package/ui.form-input/constants.ts +1 -1
- package/ui.form-input-file/UInputFile.vue +3 -3
- package/ui.form-input-file/constants.ts +1 -1
- package/ui.form-input-money/UInputMoney.vue +2 -2
- package/ui.form-input-money/constants.ts +1 -1
- package/ui.form-input-number/UInputNumber.vue +2 -2
- package/ui.form-input-number/constants.ts +1 -1
- package/ui.form-input-rating/UInputRating.vue +2 -2
- package/ui.form-input-rating/constants.ts +1 -1
- package/ui.form-input-search/UInputSearch.vue +2 -2
- package/ui.form-input-search/constants.ts +1 -1
- package/ui.form-label/ULabel.vue +2 -2
- package/ui.form-label/constants.ts +1 -1
- package/ui.form-radio/URadio.vue +2 -2
- package/ui.form-radio/constants.ts +1 -1
- package/ui.form-radio-group/URadioGroup.vue +2 -2
- package/ui.form-radio-group/constants.ts +1 -1
- package/ui.form-select/USelect.vue +3 -3
- package/ui.form-select/constants.ts +1 -1
- package/ui.form-switch/USwitch.vue +3 -3
- package/ui.form-switch/constants.ts +1 -1
- package/ui.form-textarea/UTextarea.vue +2 -2
- package/ui.form-textarea/constants.ts +1 -1
- package/ui.image-avatar/UAvatar.vue +2 -2
- package/ui.image-avatar/constants.ts +1 -1
- package/ui.image-icon/UIcon.vue +2 -2
- package/ui.image-icon/constants.ts +1 -1
- package/ui.loader/ULoader.vue +2 -2
- package/ui.loader/constants.ts +1 -1
- package/ui.loader-overlay/ULoaderOverlay.vue +2 -2
- package/ui.loader-overlay/constants.ts +1 -1
- package/ui.loader-progress/ULoaderProgress.vue +2 -2
- package/ui.loader-progress/constants.ts +1 -1
- package/ui.navigation-pagination/UPagination.vue +2 -2
- package/ui.navigation-pagination/constants.ts +1 -1
- package/ui.navigation-progress/UProgress.vue +2 -2
- package/ui.navigation-progress/constants.ts +1 -1
- package/ui.navigation-tab/UTab.vue +3 -3
- package/ui.navigation-tab/constants.ts +1 -1
- package/ui.navigation-tabs/UTabs.vue +2 -2
- package/ui.navigation-tabs/constants.ts +1 -1
- package/ui.other-dot/UDot.vue +2 -2
- package/ui.other-dot/constants.ts +1 -1
- package/ui.text-alert/UAlert.vue +2 -2
- package/ui.text-alert/constants.ts +1 -1
- package/ui.text-badge/UBadge.vue +2 -2
- package/ui.text-badge/constants.ts +1 -1
- package/ui.text-block/UText.vue +2 -2
- package/ui.text-block/constants.ts +1 -1
- package/ui.text-empty/UEmpty.vue +2 -2
- package/ui.text-empty/constants.ts +1 -1
- package/ui.text-file/UFile.vue +2 -2
- package/ui.text-file/constants.ts +1 -1
- package/ui.text-files/UFiles.vue +2 -2
- package/ui.text-files/constants.ts +1 -1
- package/ui.text-header/UHeader.vue +2 -2
- package/ui.text-header/constants.ts +1 -1
- package/ui.text-money/UMoney.vue +2 -2
- package/ui.text-money/constants.ts +1 -1
- package/ui.text-notify/UNotify.vue +3 -3
- package/ui.text-notify/constants.ts +1 -1
- package/utils/ui.ts +2 -2
- package/web-types.json +1 -1
package/package.json
CHANGED
package/ui.button-link/ULink.vue
CHANGED
|
@@ -7,14 +7,14 @@ import { hasSlotContent } from "../utils/helper.ts";
|
|
|
7
7
|
import { getDefaults } from "../utils/ui.ts";
|
|
8
8
|
|
|
9
9
|
import defaultConfig from "./config.ts";
|
|
10
|
-
import {
|
|
10
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
11
11
|
|
|
12
12
|
import type { Props, Config } from "./types.ts";
|
|
13
13
|
|
|
14
14
|
defineOptions({ inheritAttrs: false });
|
|
15
15
|
|
|
16
16
|
const props = withDefaults(defineProps<Props>(), {
|
|
17
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
17
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
18
18
|
label: "",
|
|
19
19
|
to: undefined,
|
|
20
20
|
});
|
|
@@ -8,14 +8,14 @@ import useUI from "../composables/useUI.ts";
|
|
|
8
8
|
import { getDefaults } from "../utils/ui.ts";
|
|
9
9
|
|
|
10
10
|
import defaultConfig from "./config.ts";
|
|
11
|
-
import {
|
|
11
|
+
import { COMPONENT_NAME, TYPE_RADIO, TYPE_CHECKBOX } from "./constants.ts";
|
|
12
12
|
|
|
13
13
|
import type { Props, LabelSize, Config } from "./types.ts";
|
|
14
14
|
|
|
15
15
|
defineOptions({ inheritAttrs: false });
|
|
16
16
|
|
|
17
17
|
const props = withDefaults(defineProps<Props>(), {
|
|
18
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
18
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
19
19
|
options: () => [],
|
|
20
20
|
modelValue: "",
|
|
21
21
|
label: "",
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
This const is needed to prevent the issue in script setup:
|
|
3
3
|
`defineProps` is referencing locally declared variables. (vue/valid-define-props)
|
|
4
4
|
*/
|
|
5
|
-
export const
|
|
5
|
+
export const COMPONENT_NAME = "UToggle";
|
|
6
6
|
export const TYPE_RADIO = "radio";
|
|
7
7
|
export const TYPE_CHECKBOX = "checkbox";
|
|
@@ -9,7 +9,7 @@ import { getDefaults } from "../utils/ui.ts";
|
|
|
9
9
|
import { TYPE_RADIO } from "../ui.button-toggle/constants.ts";
|
|
10
10
|
|
|
11
11
|
import defaultConfig from "./config.ts";
|
|
12
|
-
import {
|
|
12
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
13
13
|
|
|
14
14
|
import type { Props, ToggleInjectValues, ToggleContextType, Config } from "./types.ts";
|
|
15
15
|
|
|
@@ -18,7 +18,7 @@ type ButtonSize = "2xs" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
|
18
18
|
defineOptions({ inheritAttrs: false });
|
|
19
19
|
|
|
20
20
|
const props = withDefaults(defineProps<Props>(), {
|
|
21
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
21
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
22
22
|
modelValue: "",
|
|
23
23
|
label: "",
|
|
24
24
|
});
|
|
@@ -34,26 +34,26 @@ const emit = defineEmits([
|
|
|
34
34
|
/* eslint-disable prettier/prettier */
|
|
35
35
|
const getToggleName = inject<() => string>("getToggleName", () => "toggle");
|
|
36
36
|
const getToggleType = inject<() => string>("getToggleType", () =>
|
|
37
|
-
getDefaults<ToggleInjectValues, Config>(defaultConfig,
|
|
37
|
+
getDefaults<ToggleInjectValues, Config>(defaultConfig, COMPONENT_NAME).type || TYPE_RADIO
|
|
38
38
|
);
|
|
39
39
|
const getToggleSize = inject<() => ButtonSize>("getToggleSize", () =>
|
|
40
|
-
(getDefaults<ToggleInjectValues, Config>(defaultConfig,
|
|
40
|
+
(getDefaults<ToggleInjectValues, Config>(defaultConfig, COMPONENT_NAME).size || "md") as ButtonSize
|
|
41
41
|
);
|
|
42
42
|
const getToggleRound = inject<() => boolean>("getToggleRound", () =>
|
|
43
|
-
getDefaults<ToggleInjectValues, Config>(defaultConfig,
|
|
43
|
+
getDefaults<ToggleInjectValues, Config>(defaultConfig, COMPONENT_NAME).round || false
|
|
44
44
|
);
|
|
45
45
|
const getToggleBlock = inject<() => boolean>("getToggleBlock", () =>
|
|
46
|
-
getDefaults<ToggleInjectValues, Config>(defaultConfig,
|
|
46
|
+
getDefaults<ToggleInjectValues, Config>(defaultConfig, COMPONENT_NAME).block || false
|
|
47
47
|
);
|
|
48
48
|
const getToggleSquare = inject<() => boolean>("getToggleSquare", () =>
|
|
49
|
-
getDefaults<ToggleInjectValues, Config>(defaultConfig,
|
|
49
|
+
getDefaults<ToggleInjectValues, Config>(defaultConfig, COMPONENT_NAME).square || false
|
|
50
50
|
);
|
|
51
51
|
const getToggleVariant = inject<string>("getToggleVariant",
|
|
52
|
-
getDefaults<ToggleInjectValues, Config>(defaultConfig,
|
|
52
|
+
getDefaults<ToggleInjectValues, Config>(defaultConfig, COMPONENT_NAME).variant || "secondary"
|
|
53
53
|
);
|
|
54
54
|
const getToggleSeparated = inject<boolean>("getToggleSeparated", true);
|
|
55
55
|
const getToggleDisabled = inject<() => boolean>("getToggleDisabled", () =>
|
|
56
|
-
props.disabled || getDefaults<ToggleInjectValues, Config>(defaultConfig,
|
|
56
|
+
props.disabled || getDefaults<ToggleInjectValues, Config>(defaultConfig, COMPONENT_NAME).disabled || false
|
|
57
57
|
);
|
|
58
58
|
/* eslint-enable prettier/prettier */
|
|
59
59
|
|
|
@@ -7,7 +7,7 @@ import { getDefaults } from "../utils/ui.ts";
|
|
|
7
7
|
import UIcon from "../ui.image-icon/UIcon.vue";
|
|
8
8
|
import UDivider from "../ui.container-divider/UDivider.vue";
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
11
11
|
import defaultConfig from "./config.ts";
|
|
12
12
|
|
|
13
13
|
import type { Props, DividerSize, Config } from "./types.ts";
|
|
@@ -15,7 +15,7 @@ import type { Props, DividerSize, Config } from "./types.ts";
|
|
|
15
15
|
defineOptions({ inheritAttrs: false });
|
|
16
16
|
|
|
17
17
|
const props = withDefaults(defineProps<Props>(), {
|
|
18
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
18
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
const emit = defineEmits([
|
|
@@ -9,14 +9,14 @@ import UHeader from "../ui.text-header/UHeader.vue";
|
|
|
9
9
|
import UDivider from "../ui.container-divider/UDivider.vue";
|
|
10
10
|
|
|
11
11
|
import defaultConfig from "./config.ts";
|
|
12
|
-
import {
|
|
12
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
13
13
|
|
|
14
14
|
import type { Props, Config } from "./types.ts";
|
|
15
15
|
|
|
16
16
|
defineOptions({ inheritAttrs: false });
|
|
17
17
|
|
|
18
18
|
const props = withDefaults(defineProps<Props>(), {
|
|
19
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
19
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
const slots = useSlots();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import useUI from "../composables/useUI.ts";
|
|
3
3
|
import { getDefaults } from "../utils/ui.ts";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
6
6
|
import defaultConfig from "./config.ts";
|
|
7
7
|
|
|
8
8
|
import type { Props, Config } from "./types.ts";
|
|
@@ -10,7 +10,7 @@ import type { Props, Config } from "./types.ts";
|
|
|
10
10
|
defineOptions({ inheritAttrs: false });
|
|
11
11
|
|
|
12
12
|
withDefaults(defineProps<Props>(), {
|
|
13
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
13
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -4,7 +4,7 @@ import { computed } from "vue";
|
|
|
4
4
|
import useUI from "../composables/useUI.ts";
|
|
5
5
|
import { getDefaults } from "../utils/ui.ts";
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
8
8
|
import defaultConfig from "./config.ts";
|
|
9
9
|
|
|
10
10
|
import type { Props, Config } from "./types.ts";
|
|
@@ -12,7 +12,7 @@ import type { Props, Config } from "./types.ts";
|
|
|
12
12
|
defineOptions({ inheritAttrs: false });
|
|
13
13
|
|
|
14
14
|
const props = withDefaults(defineProps<Props>(), {
|
|
15
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
15
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
16
16
|
label: "",
|
|
17
17
|
});
|
|
18
18
|
|
|
@@ -4,7 +4,7 @@ import { getDefaults } from "../utils/ui.ts";
|
|
|
4
4
|
import UDivider from "../ui.container-divider/UDivider.vue";
|
|
5
5
|
import UHeader from "../ui.text-header/UHeader.vue";
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
8
8
|
import defaultConfig from "./config.ts";
|
|
9
9
|
|
|
10
10
|
import type { Props, Config } from "./types.ts";
|
|
@@ -12,7 +12,7 @@ import type { Props, Config } from "./types.ts";
|
|
|
12
12
|
defineOptions({ inheritAttrs: false });
|
|
13
13
|
|
|
14
14
|
withDefaults(defineProps<Props>(), {
|
|
15
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
15
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import useUI from "../composables/useUI.ts";
|
|
3
3
|
import { getDefaults } from "../utils/ui.ts";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
6
6
|
import defaultConfig from "./config.ts";
|
|
7
7
|
|
|
8
8
|
import type { Props, Config } from "./types.ts";
|
|
@@ -10,7 +10,7 @@ import type { Props, Config } from "./types.ts";
|
|
|
10
10
|
defineOptions({ inheritAttrs: false });
|
|
11
11
|
|
|
12
12
|
withDefaults(defineProps<Props>(), {
|
|
13
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
13
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -11,14 +11,14 @@ import UHeader from "../ui.text-header/UHeader.vue";
|
|
|
11
11
|
import UDivider from "../ui.container-divider/UDivider.vue";
|
|
12
12
|
|
|
13
13
|
import defaultConfig from "./config.ts";
|
|
14
|
-
import {
|
|
14
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
15
15
|
|
|
16
16
|
import type { Props, Config } from "./types.ts";
|
|
17
17
|
|
|
18
18
|
defineOptions({ inheritAttrs: false });
|
|
19
19
|
|
|
20
20
|
const props = withDefaults(defineProps<Props>(), {
|
|
21
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
21
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
22
22
|
modelValue: false,
|
|
23
23
|
backTo: "",
|
|
24
24
|
backLabel: "",
|
|
@@ -10,7 +10,7 @@ import UButton from "../ui.button/UButton.vue";
|
|
|
10
10
|
import UModal from "../ui.container-modal/UModal.vue";
|
|
11
11
|
|
|
12
12
|
import defaultConfig from "./config.ts";
|
|
13
|
-
import {
|
|
13
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
14
14
|
import { useLocale } from "../composables/useLocale.ts";
|
|
15
15
|
|
|
16
16
|
import type { Props, Config } from "./types.ts";
|
|
@@ -18,7 +18,7 @@ import type { Props, Config } from "./types.ts";
|
|
|
18
18
|
defineOptions({ inheritAttrs: false });
|
|
19
19
|
|
|
20
20
|
const props = withDefaults(defineProps<Props>(), {
|
|
21
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
21
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
22
22
|
modelValue: false,
|
|
23
23
|
confirmLabel: "",
|
|
24
24
|
});
|
|
@@ -48,7 +48,7 @@ const isShownModal = computed({
|
|
|
48
48
|
set: (value) => emit("update:modelValue", value),
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
-
const i18nGlobal = tm(
|
|
51
|
+
const i18nGlobal = tm(COMPONENT_NAME);
|
|
52
52
|
const currentLocale = computed(() =>
|
|
53
53
|
merge({}, defaultConfig.i18n, i18nGlobal, props?.config?.i18n),
|
|
54
54
|
);
|
|
@@ -11,7 +11,7 @@ import UIcon from "../ui.image-icon/UIcon.vue";
|
|
|
11
11
|
import UHeader from "../ui.text-header/UHeader.vue";
|
|
12
12
|
|
|
13
13
|
import defaultConfig from "./config.ts";
|
|
14
|
-
import {
|
|
14
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
15
15
|
|
|
16
16
|
import type { Props, Config } from "./types.ts";
|
|
17
17
|
|
|
@@ -20,7 +20,7 @@ const slots = useSlots();
|
|
|
20
20
|
defineOptions({ inheritAttrs: false });
|
|
21
21
|
|
|
22
22
|
const props = withDefaults(defineProps<Props>(), {
|
|
23
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
23
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
24
24
|
backTo: "",
|
|
25
25
|
backLabel: "",
|
|
26
26
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import useUI from "../composables/useUI.ts";
|
|
3
3
|
import { getDefaults } from "../utils/ui.ts";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
6
6
|
import defaultConfig from "./config.ts";
|
|
7
7
|
|
|
8
8
|
import type { Props, Config } from "./types.ts";
|
|
@@ -10,7 +10,7 @@ import type { Props, Config } from "./types.ts";
|
|
|
10
10
|
defineOptions({ inheritAttrs: false });
|
|
11
11
|
|
|
12
12
|
withDefaults(defineProps<Props>(), {
|
|
13
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
13
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -10,7 +10,7 @@ import { hasSlotContent } from "../utils/helper.ts";
|
|
|
10
10
|
import UIcon from "../ui.image-icon/UIcon.vue";
|
|
11
11
|
import UEmpty from "../ui.text-empty/UEmpty.vue";
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
14
14
|
import defaultConfig from "./config.ts";
|
|
15
15
|
import { useLocale } from "../composables/useLocale.ts";
|
|
16
16
|
|
|
@@ -19,7 +19,7 @@ import type { Props, IconSize, DragMoveEvent, DataListItem, Config } from "./typ
|
|
|
19
19
|
defineOptions({ inheritAttrs: false });
|
|
20
20
|
|
|
21
21
|
const props = withDefaults(defineProps<Props>(), {
|
|
22
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
22
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
23
23
|
list: () => [],
|
|
24
24
|
});
|
|
25
25
|
|
|
@@ -47,7 +47,7 @@ const emit = defineEmits([
|
|
|
47
47
|
|
|
48
48
|
const { tm } = useLocale();
|
|
49
49
|
|
|
50
|
-
const i18nGlobal = tm(
|
|
50
|
+
const i18nGlobal = tm(COMPONENT_NAME);
|
|
51
51
|
const currentLocale = computed(() => merge({}, defaultConfig.i18n, i18nGlobal, props.config.i18n));
|
|
52
52
|
|
|
53
53
|
const iconSize = computed(() => {
|
package/ui.data-table/UTable.vue
CHANGED
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
addRowId,
|
|
36
36
|
} from "./utilTable.ts";
|
|
37
37
|
|
|
38
|
-
import {
|
|
38
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
39
39
|
|
|
40
40
|
import type { Cell, Row, RowId, UTableProps, UTableRowAttrs, Config } from "./types.ts";
|
|
41
41
|
import type { Ref, RendererElement, ComputedRef } from "vue";
|
|
@@ -43,7 +43,7 @@ import type { Ref, RendererElement, ComputedRef } from "vue";
|
|
|
43
43
|
defineOptions({ inheritAttrs: false });
|
|
44
44
|
|
|
45
45
|
const props = withDefaults(defineProps<UTableProps>(), {
|
|
46
|
-
...getDefaults<UTableProps, Config>(defaultConfig,
|
|
46
|
+
...getDefaults<UTableProps, Config>(defaultConfig, COMPONENT_NAME),
|
|
47
47
|
columns: () => [],
|
|
48
48
|
rows: () => [],
|
|
49
49
|
dateDivider: () => [],
|
|
@@ -95,7 +95,7 @@ const stickyHeaderRowRef = useTemplateRef<HTMLDivElement>("sticky-header-row");
|
|
|
95
95
|
const stickyActionHeaderRowRef = useTemplateRef<HTMLDivElement>("sticky-action-header-row");
|
|
96
96
|
const actionHeaderRowRef = useTemplateRef<HTMLDivElement>("action-header-row");
|
|
97
97
|
|
|
98
|
-
const i18nGlobal = tm(
|
|
98
|
+
const i18nGlobal = tm(COMPONENT_NAME);
|
|
99
99
|
const currentLocale = computed(() => merge({}, defaultConfig.i18n, i18nGlobal, props.config.i18n));
|
|
100
100
|
|
|
101
101
|
const sortedRows: ComputedRef<Row[]> = computed(() => {
|
|
@@ -11,7 +11,7 @@ import UDropdownList from "../ui.dropdown-list/UDropdownList.vue";
|
|
|
11
11
|
import { vClickOutside } from "../directives";
|
|
12
12
|
|
|
13
13
|
import defaultConfig from "./config.ts";
|
|
14
|
-
import {
|
|
14
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
15
15
|
|
|
16
16
|
import type { Props, Config } from "./types.ts";
|
|
17
17
|
import type { Option } from "../ui.dropdown-list/types.ts";
|
|
@@ -19,7 +19,7 @@ import type { Option } from "../ui.dropdown-list/types.ts";
|
|
|
19
19
|
defineOptions({ inheritAttrs: false });
|
|
20
20
|
|
|
21
21
|
const props = withDefaults(defineProps<Props>(), {
|
|
22
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
22
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
23
23
|
options: () => [],
|
|
24
24
|
label: "",
|
|
25
25
|
});
|
|
@@ -11,7 +11,7 @@ import UDropdownList from "../ui.dropdown-list/UDropdownList.vue";
|
|
|
11
11
|
import { vClickOutside } from "../directives";
|
|
12
12
|
|
|
13
13
|
import defaultConfig from "./config.ts";
|
|
14
|
-
import {
|
|
14
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
15
15
|
|
|
16
16
|
import type { Props, IconSize, DropdownSize, Config } from "./types.ts";
|
|
17
17
|
import type { Option } from "../ui.dropdown-list/types.ts";
|
|
@@ -19,7 +19,7 @@ import type { Option } from "../ui.dropdown-list/types.ts";
|
|
|
19
19
|
defineOptions({ inheritAttrs: false });
|
|
20
20
|
|
|
21
21
|
const props = withDefaults(defineProps<Props>(), {
|
|
22
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
22
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
23
23
|
options: () => [],
|
|
24
24
|
label: "",
|
|
25
25
|
});
|
|
@@ -10,7 +10,7 @@ import UDropdownList from "../ui.dropdown-list/UDropdownList.vue";
|
|
|
10
10
|
|
|
11
11
|
import { vClickOutside } from "../directives";
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
14
14
|
import defaultConfig from "./config.ts";
|
|
15
15
|
|
|
16
16
|
import type { Props, IconSize, Config } from "./types.ts";
|
|
@@ -19,7 +19,7 @@ import type { Option } from "../ui.dropdown-list/types.ts";
|
|
|
19
19
|
defineOptions({ inheritAttrs: false });
|
|
20
20
|
|
|
21
21
|
const props = withDefaults(defineProps<Props>(), {
|
|
22
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
22
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
23
23
|
options: () => [],
|
|
24
24
|
label: "",
|
|
25
25
|
});
|
|
@@ -13,7 +13,7 @@ import usePointer from "./usePointer.ts";
|
|
|
13
13
|
import { useLocale } from "../composables/useLocale.ts";
|
|
14
14
|
|
|
15
15
|
import defaultConfig from "./config.ts";
|
|
16
|
-
import {
|
|
16
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
17
17
|
|
|
18
18
|
import type { Option, Props, Config } from "./types.ts";
|
|
19
19
|
import type { UnknownObject } from "../types.ts";
|
|
@@ -24,7 +24,7 @@ defineOptions({ inheritAttrs: false });
|
|
|
24
24
|
const modelValue = defineModel<string | number | UnknownObject>({ default: "" });
|
|
25
25
|
|
|
26
26
|
const props = withDefaults(defineProps<Props>(), {
|
|
27
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
27
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
28
28
|
options: () => [],
|
|
29
29
|
});
|
|
30
30
|
|
|
@@ -53,7 +53,7 @@ const elementId = props.id || useId();
|
|
|
53
53
|
|
|
54
54
|
const { tm } = useLocale();
|
|
55
55
|
|
|
56
|
-
const i18nGlobal = tm(
|
|
56
|
+
const i18nGlobal = tm(COMPONENT_NAME);
|
|
57
57
|
const currentLocale = computed(() => merge({}, defaultConfig.i18n, i18nGlobal, props.config.i18n));
|
|
58
58
|
|
|
59
59
|
const addOptionKeyCombination = computed(() => {
|
|
@@ -21,7 +21,7 @@ import { getDateWithoutTime, addMonths, addDays, addYears, getSortedLocale } fro
|
|
|
21
21
|
import { useLocale } from "../composables/useLocale.ts";
|
|
22
22
|
|
|
23
23
|
import {
|
|
24
|
-
|
|
24
|
+
COMPONENT_NAME,
|
|
25
25
|
ARROW_KEYS,
|
|
26
26
|
YEARS_PER_VIEW,
|
|
27
27
|
MAX_HOURS,
|
|
@@ -55,7 +55,7 @@ defineOptions({ inheritAttrs: false });
|
|
|
55
55
|
type Props = UCalendarProps<TModelValue>;
|
|
56
56
|
const props = withDefaults(defineProps<Props>(), {
|
|
57
57
|
view: View.Day,
|
|
58
|
-
...getDefaults<Props, Config>(defaultConfig,
|
|
58
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
59
59
|
modelValue: undefined,
|
|
60
60
|
minDate: undefined,
|
|
61
61
|
maxDate: undefined,
|
|
@@ -126,7 +126,7 @@ const isCurrentView = computed(() => ({
|
|
|
126
126
|
year: currentView.value === View.Year,
|
|
127
127
|
}));
|
|
128
128
|
|
|
129
|
-
const i18nGlobal = tm<DefaultLocale>(
|
|
129
|
+
const i18nGlobal = tm<DefaultLocale>(COMPONENT_NAME);
|
|
130
130
|
|
|
131
131
|
const currentLocale: ComputedRef<Locale> = computed(() =>
|
|
132
132
|
merge({}, defaultConfig.i18n, i18nGlobal, props.config?.i18n),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
This const is needed to prevent the issue in script setup:
|
|
3
3
|
`defineProps` is referencing locally declared variables. (vue/valid-define-props)
|
|
4
4
|
*/
|
|
5
|
-
export const
|
|
5
|
+
export const COMPONENT_NAME = "UCalendar";
|
|
6
6
|
|
|
7
7
|
export const YEARS_PER_VIEW = 12;
|
|
8
8
|
export const MONTHS_PER_VIEW = 12;
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
|
|
9
9
|
import UCalendar from "../../ui.form-calendar/UCalendar.vue";
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { COMPONENT_NAME } from "../constants.ts";
|
|
12
12
|
|
|
13
13
|
import type { DateValue, UCalendarProps } from "../types.ts";
|
|
14
14
|
|
|
@@ -23,11 +23,11 @@ export default {
|
|
|
23
23
|
component: UCalendar,
|
|
24
24
|
args: {},
|
|
25
25
|
argTypes: {
|
|
26
|
-
...getArgTypes(
|
|
26
|
+
...getArgTypes(COMPONENT_NAME),
|
|
27
27
|
},
|
|
28
28
|
parameters: {
|
|
29
29
|
docs: {
|
|
30
|
-
...getDocsDescription(
|
|
30
|
+
...getDocsDescription(COMPONENT_NAME),
|
|
31
31
|
story: {
|
|
32
32
|
height: "380px",
|
|
33
33
|
},
|
|
@@ -38,7 +38,7 @@ export default {
|
|
|
38
38
|
const DefaultTemplate: StoryFn<UCalendarArgs> = (args: UCalendarArgs) => ({
|
|
39
39
|
components: { UCalendar },
|
|
40
40
|
setup() {
|
|
41
|
-
const slots = getSlotNames(
|
|
41
|
+
const slots = getSlotNames(COMPONENT_NAME);
|
|
42
42
|
|
|
43
43
|
return { args, slots };
|
|
44
44
|
},
|