@citizenplane/pimp 18.9.33 → 18.9.35

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citizenplane/pimp",
3
- "version": "18.9.33",
3
+ "version": "18.9.35",
4
4
  "scripts": {
5
5
  "dev": "storybook dev -p 8081",
6
6
  "build-storybook": "storybook build --output-dir ./docs",
@@ -73,9 +73,9 @@ const emit = defineEmits<Emits>()
73
73
  const numberOfPages = computed(() => Math.ceil(props.numberOfResults / props.rowsPerPageLimit))
74
74
  const activePage = computed(() => (props.isServerSidePagination ? props.serverActivePage + 1 : props.pageNumber + 1))
75
75
  const hasRemainingPages = computed(() => numberOfPages.value > activePage.value)
76
- const hasPreviousPages = computed(() =>
77
- props.isServerSidePagination ? props.serverActivePage > 0 : props.pageNumber > 0,
78
- )
76
+ const hasPreviousPages = computed(() => {
77
+ return props.isServerSidePagination ? props.serverActivePage > 0 : props.pageNumber > 0
78
+ })
79
79
 
80
80
  const isNextEnabled = computed(() => hasRemainingPages.value && !props.isLoading)
81
81
  const isPreviousEnabled = computed(() => hasPreviousPages.value && !props.isLoading)
@@ -85,9 +85,9 @@ const pagesEndIndex = computed(() => props.rowsPerPageLimit * (1 + props.pageNum
85
85
  const serverPagesStartIndex = computed(() => props.serverActivePage * props.rowsPerPageLimit + 1)
86
86
  const serverPagesEndIndex = computed(() => props.rowsPerPageLimit * (1 + props.serverActivePage))
87
87
 
88
- const pageFirstResultIndex = computed(() =>
89
- props.isServerSidePagination ? serverPagesStartIndex.value : pagesStartIndex.value + 1,
90
- )
88
+ const pageFirstResultIndex = computed(() => {
89
+ return props.isServerSidePagination ? serverPagesStartIndex.value : pagesStartIndex.value + 1
90
+ })
91
91
 
92
92
  const pageLastResultIndex = computed(() => {
93
93
  const endIndex = props.isServerSidePagination ? serverPagesEndIndex.value : pagesEndIndex.value
@@ -97,7 +97,8 @@ const pageLastResultIndex = computed(() => {
97
97
 
98
98
  <style scoped lang="scss">
99
99
  .cpTableFooter {
100
- padding: 0 var(--cp-spacing-xl) 0;
100
+ z-index: auto;
101
+ padding: var(--cp-spacing-xl) var(--cp-spacing-lg) 0;
101
102
 
102
103
  &__loader {
103
104
  display: inline-flex;
@@ -109,11 +110,11 @@ const pageLastResultIndex = computed(() => {
109
110
  }
110
111
 
111
112
  &__desktop {
112
- display: none;
113
+ display: flex;
113
114
  }
114
115
 
115
116
  &__mobile {
116
- display: flex;
117
+ display: none;
117
118
  margin-block: var(--cp-spacing-lg);
118
119
 
119
120
  .cpTableFooter__loader {
@@ -123,17 +124,16 @@ const pageLastResultIndex = computed(() => {
123
124
  }
124
125
  }
125
126
 
126
- @media (min-width: 769px) {
127
+ @media (max-width: 768px) {
127
128
  .cpTableFooter {
128
- z-index: auto;
129
- padding: var(--cp-spacing-xl) var(--cp-spacing-lg) 0;
129
+ padding: 0 var(--cp-spacing-lg) 0;
130
130
 
131
131
  &__desktop {
132
- display: flex;
132
+ display: none;
133
133
  }
134
134
 
135
135
  &__mobile {
136
- display: none;
136
+ display: flex;
137
137
  }
138
138
  }
139
139
  }
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <div class="cpTableFooterDesktop">
3
3
  <div class="cpTableFooterDesktop__details">
4
- <p class="cpTableFooterDesktop__results">
4
+ <div class="cpTableFooterDesktop__results">
5
5
  <slot name="footer-details" />
6
- </p>
6
+ </div>
7
7
  </div>
8
8
  <div class="cpTableFooterDesktop__pagination">
9
9
  <cp-button
@@ -12,9 +12,9 @@
12
12
  <cp-icon size="16" type="arrow-left" />
13
13
  </template>
14
14
  </cp-button>
15
- <p class="cpTableFooterMobile__results">
15
+ <div class="cpTableFooterMobile__results">
16
16
  <slot name="footer-details" />
17
- </p>
17
+ </div>
18
18
  <cp-button
19
19
  appearance="tertiary"
20
20
  color="neutral"