vueless 0.0.209 → 0.0.211

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 (80) hide show
  1. package/package.json +1 -1
  2. package/ui.container-group/configs/default.config.js +19 -1
  3. package/ui.container-group/index.vue +26 -1
  4. package/ui.container-row/configs/default.config.js +21 -3
  5. package/ui.container-row/index.vue +27 -2
  6. package/ui.data-list/composables/attrs.composable.js +39 -36
  7. package/ui.data-list/configs/default.config.js +6 -4
  8. package/ui.data-list/index.stories.js +2 -4
  9. package/ui.data-list/index.vue +34 -5
  10. package/ui.data-table/composables/attrs.composable.js +180 -245
  11. package/ui.data-table/configs/default.config.js +10 -10
  12. package/ui.data-table/index.vue +52 -12
  13. package/ui.form-checkbox/composables/attrs.composable.js +28 -43
  14. package/ui.form-checkbox/configs/default.config.js +2 -2
  15. package/ui.form-checkbox/index.stories.js +2 -4
  16. package/ui.form-checkbox/index.vue +16 -4
  17. package/ui.form-checkbox-group/composables/attrs.composable.js +24 -9
  18. package/ui.form-checkbox-group/configs/default.config.js +2 -2
  19. package/ui.form-checkbox-group/index.vue +8 -2
  20. package/ui.form-checkbox-multi-state/composables/attrs.composable.js +34 -12
  21. package/ui.form-checkbox-multi-state/configs/default.config.js +1 -1
  22. package/ui.form-checkbox-multi-state/index.vue +8 -2
  23. package/ui.form-input-file/composables/attrs.composable.js +19 -62
  24. package/ui.form-input-file/configs/default.config.js +7 -7
  25. package/ui.form-input-file/index.vue +15 -3
  26. package/ui.form-input-money/composables/attrs.composable.js +23 -4
  27. package/ui.form-input-money/configs/default.config.js +1 -1
  28. package/ui.form-input-money/index.stories.js +2 -4
  29. package/ui.form-input-number/composables/attrs.composable.js +22 -36
  30. package/ui.form-input-number/configs/default.config.js +4 -4
  31. package/ui.form-input-number/index.vue +8 -2
  32. package/ui.form-input-rating/composables/attrs.composable.js +10 -11
  33. package/ui.form-input-rating/index.vue +2 -2
  34. package/ui.form-input-search/composables/attrs.composable.js +26 -11
  35. package/ui.form-input-search/configs/default.config.js +4 -4
  36. package/ui.form-input-search/index.stories.js +2 -4
  37. package/ui.form-input-search/index.vue +21 -4
  38. package/ui.form-label/composables/attrs.composable.js +22 -49
  39. package/ui.form-label/index.vue +9 -2
  40. package/ui.form-radio/composables/attrs.composable.js +29 -22
  41. package/ui.form-radio/configs/default.config.js +1 -1
  42. package/ui.form-radio/index.stories.js +2 -4
  43. package/ui.form-radio/index.vue +8 -2
  44. package/ui.form-radio-group/composables/attrs.composable.js +20 -15
  45. package/ui.form-radio-group/configs/default.config.js +2 -1
  46. package/ui.form-radio-group/index.vue +8 -2
  47. package/ui.form-switch/composables/attrs.composable.js +25 -61
  48. package/ui.form-switch/configs/default.config.js +2 -2
  49. package/ui.form-switch/index.vue +8 -2
  50. package/ui.form-textarea/composables/attrs.composable.js +25 -36
  51. package/ui.form-textarea/configs/default.config.js +1 -1
  52. package/ui.form-textarea/index.stories.js +3 -5
  53. package/ui.form-textarea/index.vue +35 -4
  54. package/ui.loader/composables/attrs.composable.js +34 -37
  55. package/ui.loader/index.vue +1 -1
  56. package/ui.loader-rendering/composables/attrs.composable.js +27 -19
  57. package/ui.loader-rendering/configs/default.config.js +1 -0
  58. package/ui.loader-rendering/index.vue +8 -3
  59. package/ui.loader-top/composables/attrs.composable.js +28 -19
  60. package/ui.loader-top/index.vue +1 -1
  61. package/ui.navigation-pagination/composables/attrs.composable.js +41 -31
  62. package/ui.navigation-pagination/configs/default.config.js +2 -2
  63. package/ui.navigation-pagination/index.vue +22 -6
  64. package/ui.navigation-progress/components/StepperProgress.vue +1 -1
  65. package/ui.navigation-progress/composables/attrs.composable.js +19 -22
  66. package/ui.navigation-progress/index.vue +14 -1
  67. package/ui.navigation-tab/composables/attrs.composable.js +25 -20
  68. package/ui.navigation-tab/index.vue +1 -1
  69. package/ui.navigation-tabs/composables/attrs.composable.js +19 -13
  70. package/ui.navigation-tabs/configs/default.config.js +1 -1
  71. package/ui.navigation-tabs/index.vue +9 -2
  72. package/ui.other-dot/composables/attrs.composable.js +28 -20
  73. package/ui.other-dot/index.vue +1 -1
  74. package/ui.text-file/configs/default.config.js +3 -0
  75. package/ui.text-file/index.vue +36 -25
  76. package/ui.text-files/index.vue +8 -0
  77. package/ui.text-header/configs/default.config.js +1 -0
  78. package/ui.text-header/index.stories.js +2 -2
  79. package/ui.text-header/index.vue +16 -12
  80. package/web-types.json +383 -62
@@ -4,47 +4,36 @@ import { cva } from "../../service.ui";
4
4
  import defaultConfig from "../configs/default.config";
5
5
  import { computed } from "vue";
6
6
 
7
- export function useAttrs(props) {
8
- const { config, getAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
9
- const { textarea, textareaWrapper } = config.value;
10
-
11
- const cvaTextarea = cva({
12
- base: textarea.base,
13
- variants: textarea.variants,
14
- compoundVariants: textarea.compoundVariants,
15
- });
16
-
17
- const cvaTextareaWrapper = cva({
18
- base: textareaWrapper.base,
19
- variants: textareaWrapper.variants,
20
- compoundVariants: textareaWrapper.compoundVariants,
21
- });
22
-
23
- const textareaWrapperClasses = computed(() =>
24
- cvaTextareaWrapper({
25
- error: Boolean(props.error),
26
- size: props.size,
27
- readonly: props.readonly,
28
- disabled: props.disabled,
29
- labelAlign: props.labelAlign,
30
- label: Boolean(props.label),
31
- }),
7
+ export default function useAttrs(props) {
8
+ const { config, getAttrs, hasSlotContent, isSystemKey } = useUI(
9
+ defaultConfig,
10
+ () => props.config,
32
11
  );
12
+ const attrs = {};
33
13
 
34
- const textareaClasses = computed(() => cvaTextarea({ size: props.size }));
14
+ for (const key in defaultConfig) {
15
+ if (isSystemKey(key)) continue;
35
16
 
36
- const leftSlotAttrs = getAttrs("leftSlot");
37
- const rightSlotAttrs = getAttrs("rightSlot");
38
- const labelAttrs = getAttrs("label", { isComponent: true });
39
- const textareaWrapperAttrs = getAttrs("textareaWrapper", { classes: textareaWrapperClasses });
40
- const textareaAttrs = getAttrs("textarea", { classes: textareaClasses });
17
+ const classes = computed(() => {
18
+ const value = config.value[key];
19
+
20
+ if (value.variants || value.compoundVariants) {
21
+ return cva(value)({
22
+ ...props,
23
+ error: Boolean(props.error),
24
+ label: Boolean(props.label),
25
+ });
26
+ }
27
+
28
+ return "";
29
+ });
30
+
31
+ attrs[`${key}Attrs`] = getAttrs(key, { classes });
32
+ }
41
33
 
42
34
  return {
43
- textareaAttrs,
44
- labelAttrs,
45
- textareaWrapperAttrs,
46
- leftSlotAttrs,
47
- rightSlotAttrs,
35
+ ...attrs,
36
+ config,
48
37
  hasSlotContent,
49
38
  };
50
39
  }
@@ -1,5 +1,5 @@
1
1
  export default /*tw*/ {
2
- label: "relative w-full",
2
+ label: "{ULabel} relative w-full",
3
3
  leftSlot: "flex items-center justify-center h-full w-11 absolute left-0",
4
4
  rightSlot: "flex items-center justify-center h-full w-11 absolute right-0",
5
5
  textareaWrapper: {
@@ -1,4 +1,4 @@
1
- import { getArgTypes, getSlotNames } from "../service.storybook";
1
+ import { getArgTypes, getSlotNames, allSlotsFragment } from "../service.storybook";
2
2
 
3
3
  import UTextarea from "../ui.form-textarea";
4
4
  import UIcon from "../ui.image-icon";
@@ -32,9 +32,7 @@ const DefaultTemplate = (args) => ({
32
32
  <UTextarea
33
33
  v-bind="args"
34
34
  >
35
- <template v-for="(slot, index) of slots" :key="index" v-slot:[slot]>
36
- <template v-if="args[slot]">{{ args[slot] }}</template>
37
- </template>
35
+ ${allSlotsFragment}
38
36
  </UTextarea>
39
37
  `,
40
38
  });
@@ -140,7 +138,7 @@ slotLeft.args = {
140
138
  };
141
139
 
142
140
  export const slotRight = SlotTemplate.bind({});
143
- slotLeft.args = {
141
+ slotRight.args = {
144
142
  slotTemplate: `
145
143
  <template #right>
146
144
  <UIcon
@@ -17,7 +17,7 @@
17
17
  :for="id"
18
18
  v-bind="leftSlotAttrs"
19
19
  >
20
- <!-- @slot Use it to add some component before text. -->
20
+ <!-- @slot Use it to add something before the text. -->
21
21
  <slot name="left" />
22
22
  </label>
23
23
  <label ref="textareaWrapper" :for="id" v-bind="textareaWrapperAttrs">
@@ -42,7 +42,7 @@
42
42
  />
43
43
  </label>
44
44
  <label v-if="hasSlotContent($slots['right'])" :for="id" v-bind="rightSlotAttrs">
45
- <!-- @slot Use it to add some component after text. -->
45
+ <!-- @slot Use it to add something after the text. -->
46
46
  <slot name="right" />
47
47
  </label>
48
48
  </ULabel>
@@ -56,7 +56,7 @@ import UIService, { getRandomId } from "../service.ui";
56
56
 
57
57
  import { UTextarea } from "./constants";
58
58
  import defaultConfig from "./configs/default.config";
59
- import { useAttrs } from "./composables/attrs.composable";
59
+ import useAttrs from "./composables/attrs.composable";
60
60
 
61
61
  /* Should be a string for correct web-types gen */
62
62
  defineOptions({ name: "UTextarea", inheritAttrs: false });
@@ -187,7 +187,38 @@ const props = defineProps({
187
187
  },
188
188
  });
189
189
 
190
- const emit = defineEmits(["change", "click", "focus", "blur", "update:modelValue", "mousedown"]);
190
+ const emit = defineEmits([
191
+ /**
192
+ * Triggers when the textarea value changes.
193
+ * @property {string} value
194
+ */
195
+ "update:modelValue",
196
+
197
+ /**
198
+ * Triggers when the textarea value changes.
199
+ */
200
+ "change",
201
+
202
+ /**
203
+ * Triggers when the textarea is clicked.
204
+ */
205
+ "click",
206
+
207
+ /**
208
+ * Triggers when the textarea is focused.
209
+ */
210
+ "focus",
211
+
212
+ /**
213
+ * Triggers when the textarea loses focus.
214
+ */
215
+ "blur",
216
+
217
+ /**
218
+ * Triggers when mouse button is released over the element.
219
+ */
220
+ "mousedown",
221
+ ]);
191
222
 
192
223
  const slots = useSlots();
193
224
 
@@ -4,49 +4,46 @@ import { cva, cx } from "../../service.ui";
4
4
  import defaultConfig from "../configs/default.config";
5
5
  import { computed } from "vue";
6
6
 
7
- export function useAttrs(props) {
8
- const { config, getAttrs, getColor, setColor } = useUI(defaultConfig, () => props.config);
9
- const { loader, ellipse } = config.value;
10
-
11
- const cvaLoader = cva({
12
- base: loader.base,
13
- variants: loader.variants,
14
- compoundVariants: loader.compoundVariants,
15
- });
16
-
17
- const cvaEllipse = cva({
18
- base: ellipse.base,
19
- variants: ellipse.variants,
20
- compoundVariants: ellipse.compoundVariants,
21
- });
22
-
23
- const loaderClasses = computed(() =>
24
- cvaLoader({
25
- size: props.size,
26
- }),
7
+ export default function useAttrs(props) {
8
+ const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
9
+ defaultConfig,
10
+ () => props.config,
27
11
  );
12
+ const attrs = {};
28
13
 
29
- const ellipseClasses = computed(() =>
30
- setColor(
31
- cvaEllipse({
32
- size: props.size,
33
- color: getColor(props.color),
34
- }),
35
- props.color,
36
- ),
37
- );
14
+ for (const key in defaultConfig) {
15
+ if (isSystemKey(key)) continue;
16
+
17
+ const classes = computed(() => {
18
+ const value = config.value[key];
19
+
20
+ if (value.variants || value.compoundVariants) {
21
+ return setColor(
22
+ cva(value)({
23
+ ...props,
24
+ color: getColor(props.color),
25
+ }),
26
+ props.color,
27
+ );
28
+ }
29
+
30
+ return "";
31
+ });
32
+
33
+ attrs[`${key}Attrs`] = getAttrs(key, { classes });
38
34
 
39
- const loaderAttrs = getAttrs("loader", { classes: loaderClasses });
40
- const ellipseRaw = getAttrs("ellipse", { classes: ellipseClasses });
35
+ if (key === "ellipse") {
36
+ const ellipseAttrs = attrs[`${key}Attrs`];
41
37
 
42
- const ellipseAttrs = computed(() => (classes) => ({
43
- ...ellipseRaw.value,
44
- class: cx([ellipseRaw.value.class, classes]),
45
- }));
38
+ attrs[`${key}Attrs`] = computed(() => (classes) => ({
39
+ ...ellipseAttrs,
40
+ class: cx([ellipseAttrs.value.class, classes]),
41
+ }));
42
+ }
43
+ }
46
44
 
47
45
  return {
48
- loaderAttrs,
49
- ellipseAttrs,
46
+ ...attrs,
50
47
  config,
51
48
  };
52
49
  }
@@ -16,7 +16,7 @@ import UIService from "../service.ui";
16
16
 
17
17
  import { ULoader } from "./constants";
18
18
  import defaultConfig from "./configs/default.config";
19
- import { useAttrs } from "./composables/attrs.composable";
19
+ import useAttrs from "./composables/attrs.composable";
20
20
 
21
21
  /* Should be a string for correct web-types gen */
22
22
  defineOptions({ name: "ULoader", inheritAttrs: false });
@@ -4,29 +4,37 @@ import { cva } from "../../service.ui";
4
4
 
5
5
  import defaultConfig from "../configs/default.config";
6
6
 
7
- export function useAttrs(props) {
8
- const { config, getAttrs, getColor, setColor } = useUI(defaultConfig, () => props.config);
9
- const { wrapper } = config.value;
10
-
11
- const cvaWrapper = cva({
12
- base: wrapper.base,
13
- variants: wrapper.variants,
14
- compoundVariants: wrapper.compoundVariants,
15
- });
16
-
17
- const wrapperClasses = computed(() =>
18
- setColor(
19
- cvaWrapper({
20
- color: getColor(props.color),
21
- }),
22
- props.color,
23
- ),
7
+ export default function useAttrs(props) {
8
+ const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
9
+ defaultConfig,
10
+ () => props.config,
24
11
  );
12
+ const attrs = {};
25
13
 
26
- const wrapperAttrs = getAttrs("wrapper", { classes: wrapperClasses, isComponent: true });
14
+ for (const key in defaultConfig) {
15
+ if (isSystemKey(key)) continue;
16
+
17
+ const classes = computed(() => {
18
+ const value = config.value[key];
19
+
20
+ if (value.variants || value.compoundVariants) {
21
+ return setColor(
22
+ cva(value)({
23
+ ...props,
24
+ color: getColor(props.color),
25
+ }),
26
+ props.color,
27
+ );
28
+ }
29
+
30
+ return "";
31
+ });
32
+
33
+ attrs[`${key}Attrs`] = getAttrs(key, { classes });
34
+ }
27
35
 
28
36
  return {
29
- wrapperAttrs,
37
+ ...attrs,
30
38
  config,
31
39
  };
32
40
  }
@@ -14,6 +14,7 @@ export default /*tw*/ {
14
14
  },
15
15
  },
16
16
  },
17
+ loader: "{ULoader}",
17
18
  transition: {
18
19
  enterFromClass: "scale-110 transform",
19
20
  leaveActiveClass: "scale-110 transform",
@@ -1,7 +1,12 @@
1
1
  <template>
2
2
  <Transition v-bind="config.transition">
3
3
  <div v-if="showLoader" v-bind="wrapperAttrs">
4
- <ULoader :loading="showLoader" size="lg" :color="color === 'white' ? 'grayscale' : 'white'" />
4
+ <ULoader
5
+ :loading="showLoader"
6
+ size="lg"
7
+ :color="color === 'white' ? 'grayscale' : 'white'"
8
+ v-bind="loaderAttrs"
9
+ />
5
10
  </div>
6
11
  </Transition>
7
12
  </template>
@@ -14,7 +19,7 @@ import ULoader from "../ui.loader";
14
19
 
15
20
  import { ULoaderRendering } from "./constants";
16
21
  import defaultConfig from "./configs/default.config";
17
- import { useAttrs } from "./composables/attrs.composable";
22
+ import useAttrs from "./composables/attrs.composable";
18
23
  import { useLoaderRendering } from "./composables/useLoaderRendering";
19
24
 
20
25
  /* Should be a string for correct web-types gen */
@@ -39,7 +44,7 @@ const props = defineProps({
39
44
  },
40
45
  });
41
46
 
42
- const { wrapperAttrs, config } = useAttrs(props);
47
+ const { wrapperAttrs, loaderAttrs, config } = useAttrs(props);
43
48
  const { isLoading, loaderRenderingOn, loaderRenderingOff } = useLoaderRendering();
44
49
 
45
50
  onMounted(() => {
@@ -4,28 +4,37 @@ import { cva } from "../../service.ui";
4
4
  import defaultConfig from "../configs/default.config";
5
5
  import { computed } from "vue";
6
6
 
7
- export function useAttrs(props) {
8
- const { config, getAttrs, getColor, setColor } = useUI(defaultConfig, () => props.config);
9
- const { progress } = config.value;
10
-
11
- const cvaProgress = cva({
12
- base: progress.base,
13
- variants: progress.variants,
14
- compoundVariants: progress.compoundVariants,
15
- });
16
-
17
- const progressClasses = computed(() =>
18
- setColor(
19
- cvaProgress({
20
- color: getColor(props.color),
21
- }),
22
- props.color,
23
- ),
7
+ export default function useAttrs(props) {
8
+ const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
9
+ defaultConfig,
10
+ () => props.config,
24
11
  );
12
+ const attrs = {};
25
13
 
26
- const progressAttrs = getAttrs("progress", { classes: progressClasses.value });
14
+ for (const key in defaultConfig) {
15
+ if (isSystemKey(key)) continue;
16
+
17
+ const classes = computed(() => {
18
+ const value = config.value[key];
19
+
20
+ if (value.variants || value.compoundVariants) {
21
+ return setColor(
22
+ cva(value)({
23
+ ...props,
24
+ color: getColor(props.color),
25
+ }),
26
+ props.color,
27
+ );
28
+ }
29
+
30
+ return "";
31
+ });
32
+
33
+ attrs[`${key}Attrs`] = getAttrs(key, { classes });
34
+ }
27
35
 
28
36
  return {
29
- progressAttrs,
37
+ ...attrs,
38
+ config,
30
39
  };
31
40
  }
@@ -13,7 +13,7 @@ import { useLoaderTop } from "./composables/useLoaderTop";
13
13
 
14
14
  import { ULoaderTop, MAXIMUM, SPEED } from "./constants";
15
15
  import defaultConfig from "./configs/default.config";
16
- import { useAttrs } from "./composables/attrs.composable";
16
+ import useAttrs from "./composables/attrs.composable";
17
17
 
18
18
  /* Should be a string for correct web-types gen */
19
19
  defineOptions({ name: "ULoaderTop", inheritAttrs: false });
@@ -1,45 +1,55 @@
1
1
  import useUI from "../../composable.ui";
2
2
 
3
3
  import defaultConfig from "../configs/default.config";
4
- import { cx } from "../../service.ui";
4
+ import { cva, cx } from "../../service.ui";
5
5
  import { computed } from "vue";
6
6
 
7
- export function useAttrs(props) {
8
- const { config, getAttrs } = useUI(defaultConfig, () => props.config);
7
+ export default function useAttrs(props) {
8
+ const { config, getAttrs, isSystemKey } = useUI(defaultConfig, () => props.config);
9
+ const attrs = {};
9
10
 
10
- const listAttrs = getAttrs("list");
11
- const itemAttrsRaw = getAttrs("item");
12
- const itemEllipsisAttrs = getAttrs("itemEllipsis");
13
- const ellipsisAttrs = getAttrs("ellipsis");
14
- const navigationButtonAttrs = getAttrs("navigationButton", { isComponent: true });
15
- const navigationButtonTextAttrs = getAttrs("navigationButtonText");
16
- const pageButtonAttrsRaw = getAttrs("pageButton", { isComponent: true });
11
+ for (const key in defaultConfig) {
12
+ if (isSystemKey(key)) continue;
17
13
 
18
- const itemAttrs = computed(() => (page = 0) => {
19
- const itemClass = page && !isFinite(page.number) && ellipsisAttrs;
14
+ const classes = computed(() => {
15
+ const value = config.value[key];
20
16
 
21
- return {
22
- ...itemAttrsRaw.value,
23
- class: cx([itemAttrsRaw.value.class, itemClass]),
24
- };
25
- });
17
+ if (value.variants || value.compoundVariants) {
18
+ return cva(value)({
19
+ ...props,
20
+ });
21
+ }
26
22
 
27
- const pageButtonAttrs = computed(() => (page) => {
28
- const pageButtonActiveClasses = page.isActive && config.value.pageButtonActive;
23
+ return "";
24
+ });
29
25
 
30
- return {
31
- ...pageButtonAttrsRaw.value,
32
- class: cx([pageButtonAttrsRaw.value.class, pageButtonActiveClasses]),
33
- };
34
- });
26
+ attrs[`${key}Attrs`] = getAttrs(key, { classes });
27
+
28
+ if (key === "item") {
29
+ attrs.itemAttrs = computed(() => (page = 0) => {
30
+ const itemClass = page && !isFinite(page.number) && getAttrs("ellipsis");
31
+
32
+ return {
33
+ ...getAttrs("item"),
34
+ class: cx([getAttrs("item").value.class, itemClass]),
35
+ };
36
+ });
37
+ }
38
+
39
+ if (key === "pageButton") {
40
+ attrs.pageButtonAttrs = computed(() => (page) => {
41
+ const pageButtonActiveClasses = page.isActive && config.value.pageButtonActive;
42
+
43
+ return {
44
+ ...getAttrs("pageButton"),
45
+ class: cx([getAttrs("pageButton").value.class, pageButtonActiveClasses]),
46
+ };
47
+ });
48
+ }
49
+ }
35
50
 
36
51
  return {
37
- listAttrs,
38
- itemAttrs,
39
- itemEllipsisAttrs,
40
- navigationButtonAttrs,
41
- navigationButtonTextAttrs,
42
- pageButtonAttrs,
43
- ellipsisAttrs,
52
+ ...attrs,
53
+ config,
44
54
  };
45
55
  }
@@ -3,9 +3,9 @@ export default /*tw*/ {
3
3
  item: "h-9 min-w-9 flex items-center justify-center",
4
4
  ellipsis: "hidden md:flex",
5
5
  itemEllipsis: "leading-none",
6
- navigationButton: "size-full rounded font-normal disabled:hover:bg-transparent",
6
+ navigationButton: "{UButton} size-full rounded font-normal disabled:hover:bg-transparent",
7
7
  navigationButtonText: "h-9 min-w-9 leading-none",
8
- pageButton: "size-full rounded font-normal disabled:hover:bg-transparent",
8
+ pageButton: "{UButton} size-full rounded font-normal disabled:hover:bg-transparent",
9
9
  pageButtonActive: `
10
10
  rounded !bg-brand-900/15
11
11
  hover:!text-brand-900 !hover:bg-brand-900/15 disabled:hover:bg-brand-900/15
@@ -9,7 +9,8 @@
9
9
  v-bind="navigationButtonAttrs"
10
10
  @click="goToFirstPage"
11
11
  >
12
- <slot name="first-label">
12
+ <!-- @slot Use it to add something instead of the "first" label. -->
13
+ <slot name="first">
13
14
  <span v-bind="navigationButtonTextAttrs" v-html="firstLabel" />
14
15
  </slot>
15
16
  </UButton>
@@ -23,7 +24,8 @@
23
24
  v-bind="navigationButtonAttrs"
24
25
  @click="goToPrevPage"
25
26
  >
26
- <slot name="prev-label">
27
+ <!-- @slot Use it to add something instead of the "prev" label. -->
28
+ <slot name="prev">
27
29
  <span v-bind="navigationButtonTextAttrs" v-html="prevLabel" />
28
30
  </slot>
29
31
  </UButton>
@@ -54,7 +56,8 @@
54
56
  v-bind="navigationButtonAttrs"
55
57
  @click="goToNextPage"
56
58
  >
57
- <slot name="next-label">
59
+ <!-- @slot Use it to add something instead of the "next" label. -->
60
+ <slot name="next">
58
61
  <span v-bind="navigationButtonTextAttrs" v-html="nextLabel" />
59
62
  </slot>
60
63
  </UButton>
@@ -68,7 +71,8 @@
68
71
  v-bind="navigationButtonAttrs"
69
72
  @click="goToLastPage"
70
73
  >
71
- <slot name="next-label">
74
+ <!-- @slot Use it to add something instead of the "last" label. -->
75
+ <slot name="last">
72
76
  <span v-bind="navigationButtonTextAttrs" v-html="lastLabel" />
73
77
  </slot>
74
78
  </UButton>
@@ -85,7 +89,7 @@ import UIService from "../service.ui";
85
89
 
86
90
  import defaultConfig from "./configs/default.config";
87
91
  import { UPagination, ELLIPSIS_LABEL } from "./constants";
88
- import { useAttrs } from "./composables/attrs.composable";
92
+ import useAttrs from "./composables/attrs.composable";
89
93
 
90
94
  /* Should be a string for correct web-types gen */
91
95
  defineOptions({ name: "UPagination", inheritAttrs: false });
@@ -207,7 +211,19 @@ const props = defineProps({
207
211
  },
208
212
  });
209
213
 
210
- const emit = defineEmits(["change", "update:modelValue"]);
214
+ const emit = defineEmits([
215
+ /**
216
+ * Triggers when current page changes.
217
+ * @property {number} value
218
+ */
219
+ "change",
220
+
221
+ /**
222
+ * Triggers when current page changes.
223
+ * @property {number} value
224
+ */
225
+ "update:modelValue",
226
+ ]);
211
227
 
212
228
  const {
213
229
  listAttrs,
@@ -40,7 +40,7 @@ import { computed } from "vue";
40
40
 
41
41
  import { GRAY_COLORS } from "../../preset.tailwind/constants";
42
42
 
43
- import { useAttrs } from "../composables/attrs.composable";
43
+ import useAttrs from "../composables/attrs.composable";
44
44
 
45
45
  const props = defineProps({
46
46
  progressPercent: {