@globalbrain/sefirot 4.20.0 → 4.21.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.
@@ -4,6 +4,7 @@ import SPagination, { type Size } from './SPagination.vue'
4
4
 
5
5
  defineProps<{
6
6
  size?: Size
7
+ disabled?: boolean
7
8
  total: number
8
9
  page: number
9
10
  perPage: number
@@ -22,6 +23,7 @@ const position = useControlPosition()
22
23
  <div class="SControlPagination">
23
24
  <SPagination
24
25
  :size
26
+ :disabled
25
27
  :align="position"
26
28
  :total
27
29
  :page
@@ -11,16 +11,18 @@ export type Align = 'left' | 'center' | 'right'
11
11
 
12
12
  const props = withDefaults(defineProps<{
13
13
  size?: Size
14
+ disabled?: boolean
14
15
  align?: Align
15
16
  total: number
16
17
  page: number
17
18
  perPage: number
18
19
  }>(), {
19
20
  size: 'medium',
21
+ disabled: false,
20
22
  align: 'center'
21
23
  })
22
24
 
23
- const emit = defineEmits<{
25
+ defineEmits<{
24
26
  prev: []
25
27
  next: []
26
28
  }>()
@@ -47,14 +49,6 @@ const hasPrev = computed(() => {
47
49
  const hasNext = computed(() => {
48
50
  return to.value < props.total
49
51
  })
50
-
51
- function prev() {
52
- hasPrev.value && emit('prev')
53
- }
54
-
55
- function next() {
56
- hasNext.value && emit('next')
57
- }
58
52
  </script>
59
53
 
60
54
  <template>
@@ -66,8 +60,8 @@ function next() {
66
60
  :size
67
61
  :lead-icon="IconCaretLeft"
68
62
  :label="t.prev"
69
- :disabled="!hasPrev"
70
- @click="prev"
63
+ :disabled="disabled || !hasPrev"
64
+ @click="$emit('prev')"
71
65
  />
72
66
  </div>
73
67
  <div class="text">
@@ -80,8 +74,8 @@ function next() {
80
74
  :size
81
75
  :trail-icon="IconCaretRight"
82
76
  :label="t.next"
83
- :disabled="!hasNext"
84
- @click="next"
77
+ :disabled="disabled || !hasNext"
78
+ @click="$emit('next')"
85
79
  />
86
80
  </div>
87
81
  </div>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@globalbrain/sefirot",
3
3
  "type": "module",
4
- "version": "4.20.0",
4
+ "version": "4.21.0",
5
5
  "packageManager": "pnpm@9.15.4",
6
6
  "description": "Vue Components for Global Brain Design System.",
7
7
  "author": "Kia Ishii <ka.ishii@globalbrains.com>",