@dataloop-ai/components 0.16.50 → 0.16.52

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": "@dataloop-ai/components",
3
- "version": "0.16.50",
3
+ "version": "0.16.52",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -3,13 +3,13 @@
3
3
  v-if="split"
4
4
  :id="uuid"
5
5
  :class="identifierClass"
6
- class="dl-btn-dropdown dl-btn-dropdown--split no-wrap dl-btn-item"
6
+ class="dl-button-dropdown dl-button-dropdown--split no-wrap dl-button-item"
7
7
  :outlined="outlined"
8
8
  :flat="flat"
9
9
  :stretch="stretch"
10
10
  >
11
11
  <dl-button
12
- class="dl-btn-dropdown--current"
12
+ class="dl-button-dropdown--current"
13
13
  :style="mainBtnStyle"
14
14
  :label="label"
15
15
  :outlined="outlined"
@@ -34,7 +34,7 @@
34
34
  @click="onClickHide"
35
35
  />
36
36
  <dl-button
37
- class="dl-btn-dropdown__arrow-container"
37
+ class="dl-button-dropdown__arrow-container"
38
38
  :style="btnCSSStyles"
39
39
  :disabled="disabled === true || disableDropdown === true"
40
40
  :outlined="outlined"
@@ -54,7 +54,7 @@
54
54
  :tooltip="tooltip"
55
55
  >
56
56
  <div
57
- class="dl-btn-dropdown--separator"
57
+ class="dl-button-dropdown--separator"
58
58
  :style="`
59
59
  background-color: ${
60
60
  disabled
@@ -104,7 +104,7 @@
104
104
  </button-group>
105
105
  <dl-button
106
106
  v-else
107
- class="dl-btn-dropdown dl-btn-dropdown--simple"
107
+ class="dl-button-dropdown dl-button-dropdown--simple"
108
108
  v-bind="$props"
109
109
  label=""
110
110
  :aria-expanded="showing"
@@ -121,7 +121,7 @@
121
121
  :max-width="maxWidth"
122
122
  @click="onClick"
123
123
  >
124
- <div class="dl-btn-dropdown--simple__title">
124
+ <div class="dl-button-dropdown--simple__title">
125
125
  <span
126
126
  :class="{
127
127
  'dl-button-no-wrap': noWrap
@@ -292,19 +292,19 @@ export default defineComponent({
292
292
 
293
293
  const iconClass = computed(() => {
294
294
  return (
295
- 'dl-btn-dropdown__arrow' +
295
+ 'dl-button-dropdown__arrow' +
296
296
  (showing.value === true && props.noIconAnimation === false
297
297
  ? ' rotate-180'
298
298
  : '') +
299
299
  (props.split === false
300
- ? ' dl-btn-dropdown__arrow-container'
300
+ ? ' dl-button-dropdown__arrow-container'
301
301
  : '')
302
302
  )
303
303
  })
304
304
 
305
305
  const btnCSSStyles = computed(() => {
306
306
  return {
307
- '--dl-btn-border-left': props.outlined
307
+ '--dl-button-border-left': props.outlined
308
308
  ? 'none'
309
309
  : 'var(--dl-color-white)'
310
310
  }
@@ -423,9 +423,9 @@ export default defineComponent({
423
423
  overflow: hidden;
424
424
  text-overflow: ellipsis;
425
425
  }
426
- .dl-btn-dropdown {
427
- padding-right: var(--dl-btn-padding-right) !important;
428
- &--split .dl-btn-dropdown__arrow-container {
426
+ .dl-button-dropdown {
427
+ padding-right: var(--dl-button-padding-right) !important;
428
+ &--split .dl-button-dropdown__arrow-container {
429
429
  // padding: 0 4px;
430
430
  ::v-deep .dl-button {
431
431
  border-top-left-radius: 0 !important;
@@ -513,8 +513,8 @@ export default defineComponent({
513
513
  }
514
514
  </style>
515
515
  <style lang="scss">
516
- .dl-btn-dropdown {
517
- .dl-btn-content {
516
+ .dl-button-dropdown {
517
+ .dl-button-content {
518
518
  line-height: unset;
519
519
  }
520
520
  }
@@ -1,34 +1,108 @@
1
1
  <template>
2
- <div style="width: 700px">
3
- <dl-pagination
4
- v-model="page"
5
- :max="max"
6
- :boundary-numbers="boundaryNumbers"
7
- :boundary-links="boundaryLinks"
8
- :direction-links="directionLinks"
9
- :max-pages="maxPages"
10
- :disabled="disabled"
11
- :with-legend="withLegend"
12
- :total-items="total"
13
- :items-name="itemsName"
14
- :with-quick-navigation="withQuickNavigation"
15
- :with-rows-per-page="withRowsPerPage"
16
- />
2
+ <div style="align-items: stretch">
3
+ <div class="row">
4
+ <dl-input
5
+ v-model="rowsPerPage"
6
+ title="rowsPerPage"
7
+ />
8
+ <dl-input
9
+ v-model="total"
10
+ title="total items"
11
+ />
12
+ <dl-input
13
+ v-model="max"
14
+ title="max"
15
+ />
16
+ <dl-input
17
+ v-model="maxPages"
18
+ title="maxPages"
19
+ />
20
+ <dl-input
21
+ v-model="itemsName"
22
+ title="itemsName"
23
+ />
24
+ </div>
25
+ <div class="row">
26
+ <dl-checkbox
27
+ v-model="boundaryNumbers"
28
+ label="boundaryNumbers"
29
+ />
30
+ <dl-checkbox
31
+ v-model="boundaryLinks"
32
+ label="boundaryLinks"
33
+ />
34
+ <dl-checkbox
35
+ v-model="directionLinks"
36
+ label="directionLinks"
37
+ />
38
+ <dl-checkbox
39
+ v-model="disabled"
40
+ label="disabled"
41
+ />
42
+ <dl-checkbox
43
+ v-model="withLegend"
44
+ label="withLegend"
45
+ />
46
+ <dl-checkbox
47
+ v-model="withQuickNavigation"
48
+ label="withQuickNavigation"
49
+ />
50
+ <dl-checkbox
51
+ v-model="withRowsPerPage"
52
+ label="withRowsPerPage"
53
+ />
54
+ </div>
55
+ <div style="width: 700px">
56
+ <dl-pagination
57
+ v-model="page"
58
+ :max="max"
59
+ :rows-per-page="rowsPerPage"
60
+ :boundary-numbers="boundaryNumbers"
61
+ :boundary-links="boundaryLinks"
62
+ :direction-links="directionLinks"
63
+ :max-pages="maxPages"
64
+ :disabled="disabled"
65
+ :with-legend="withLegend"
66
+ :total-items="total"
67
+ :items-name="itemsName"
68
+ :with-quick-navigation="withQuickNavigation"
69
+ :with-rows-per-page="withRowsPerPage"
70
+ />
71
+ </div>
72
+ <div>
73
+ <h4>case 1</h4>
74
+ <p>with exactly 30 items, 15 per row. should be exactly 2 pages</p>
75
+ <dl-pagination
76
+ v-model="page"
77
+ :total-items="30"
78
+ :rows-per-page="15"
79
+ />
80
+ <h4>case 2</h4>
81
+ <p>with 31 items, 15 per row. should be exactly 3 pages</p>
82
+ <dl-pagination
83
+ v-model="page"
84
+ :total-items="31"
85
+ :rows-per-page="15"
86
+ />
87
+ </div>
17
88
  </div>
18
89
  </template>
19
90
 
20
91
  <script lang="ts">
21
92
  import { defineComponent } from 'vue-demi'
22
93
  import { DlPagination } from '../components'
94
+ import DlInput from '../components/compound/DlInput/DlInput.vue'
95
+ import DlCheckbox from '../components/essential/DlCheckbox/DlCheckbox.vue'
23
96
 
24
97
  export default defineComponent({
25
98
  name: 'DlPaginationDemo',
26
- components: { DlPagination },
99
+ components: { DlCheckbox, DlInput, DlPagination },
27
100
  data() {
28
101
  return {
29
102
  page: 18,
30
103
  max: 119,
31
104
  maxPages: 6,
105
+ rowsPerPage: 10,
32
106
  boundaryNumbers: true,
33
107
  boundaryLinks: true,
34
108
  directionLinks: true,