@appscode/design-system 2.1.2 → 2.1.3
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
CHANGED
|
@@ -16,8 +16,16 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
16
16
|
const emit = defineEmits(["pagination:pagechange", "pagination:countchange"]);
|
|
17
17
|
|
|
18
18
|
const activePageNo = ref(1);
|
|
19
|
+
|
|
19
20
|
const selectedItemCountPerPage = computed({
|
|
20
21
|
get() {
|
|
22
|
+
if (props.itemsPerPage > 5 && props.totalNoOfItems <= 5) return 5;
|
|
23
|
+
else if (props.itemsPerPage > 10 && props.totalNoOfItems <= 10) return 10;
|
|
24
|
+
else if (props.itemsPerPage > 15 && props.totalNoOfItems <= 15) return 15;
|
|
25
|
+
else if (props.itemsPerPage > 20 && props.totalNoOfItems <= 20) return 20;
|
|
26
|
+
else if (props.itemsPerPage > 25 && props.totalNoOfItems <= 25) return 25;
|
|
27
|
+
else if (props.itemsPerPage > 50 && props.totalNoOfItems <= 50) return 50;
|
|
28
|
+
|
|
21
29
|
return props.itemsPerPage;
|
|
22
30
|
},
|
|
23
31
|
set(n) {
|
|
@@ -102,7 +110,7 @@ watch(
|
|
|
102
110
|
<template>
|
|
103
111
|
<div class="level inner-table-pagination" v-show="showPagination">
|
|
104
112
|
<div class="pagination-filter level-left">
|
|
105
|
-
<div class="level-item" v-show="!hideRowsPerPageSelection">
|
|
113
|
+
<div class="level-item" v-show="!hideRowsPerPageSelection && totalNoOfItems > 5">
|
|
106
114
|
<label>Rows per page</label>
|
|
107
115
|
<select v-model="selectedItemCountPerPage" name="page" data-testid="rows-per-page-selector">
|
|
108
116
|
<option :value="5">5</option>
|
|
@@ -147,6 +155,7 @@ watch(
|
|
|
147
155
|
</nav>
|
|
148
156
|
</div>
|
|
149
157
|
</template>
|
|
158
|
+
|
|
150
159
|
<style lang="scss" scoped>
|
|
151
160
|
.inner-table-pagination {
|
|
152
161
|
padding: 4px 20px;
|
|
@@ -219,50 +228,4 @@ watch(
|
|
|
219
228
|
}
|
|
220
229
|
}
|
|
221
230
|
}
|
|
222
|
-
|
|
223
|
-
// .counting-page {
|
|
224
|
-
// color: $color-text;
|
|
225
|
-
// font-size: 12px;
|
|
226
|
-
|
|
227
|
-
// span {
|
|
228
|
-
// color: $color-heading;
|
|
229
|
-
// padding: 0 4px;
|
|
230
|
-
// font-weight: 500;
|
|
231
|
-
// }
|
|
232
|
-
// }
|
|
233
|
-
|
|
234
|
-
// .pagination-filter {
|
|
235
|
-
// border-radius: 4px;
|
|
236
|
-
// height: 20px;
|
|
237
|
-
// font-size: 11px;
|
|
238
|
-
// background-color: $white-100;
|
|
239
|
-
// color: $color-text;
|
|
240
|
-
// &:focus-visible {
|
|
241
|
-
// outline: none;
|
|
242
|
-
// }
|
|
243
|
-
// select {
|
|
244
|
-
// border: 1px solid
|
|
245
|
-
// hsla(
|
|
246
|
-
// var(--hsl-hue),
|
|
247
|
-
// var(--hsl-saturation),
|
|
248
|
-
// calc(var(--hsl-lightness) - 5%),
|
|
249
|
-
// 1
|
|
250
|
-
// );
|
|
251
|
-
// }
|
|
252
|
-
|
|
253
|
-
// label {
|
|
254
|
-
// color: $gray-40;
|
|
255
|
-
// padding-right: 5px;
|
|
256
|
-
// display: inline-block;
|
|
257
|
-
// font-size: 13px;
|
|
258
|
-
// }
|
|
259
|
-
// }
|
|
260
|
-
|
|
261
|
-
// .is-dark-theme {
|
|
262
|
-
// .pagination-filter {
|
|
263
|
-
// label {
|
|
264
|
-
// $gray-40: $primary-20;
|
|
265
|
-
// }
|
|
266
|
-
// }
|
|
267
|
-
// }
|
|
268
231
|
</style>
|