@oruga-ui/theme-oruga 0.2.1 → 0.3.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.
Files changed (113) hide show
  1. package/README.md +6 -14
  2. package/dist/oruga.css +1728 -206
  3. package/dist/oruga.min.css +1 -1
  4. package/dist/scss/components/_autocomplete.scss +1 -54
  5. package/dist/scss/components/_button.scss +56 -88
  6. package/dist/scss/components/_carousel.scss +70 -97
  7. package/dist/scss/components/_checkbox.scss +57 -83
  8. package/dist/scss/components/_datepicker.scss +141 -242
  9. package/dist/scss/components/_dropdown.scss +71 -157
  10. package/dist/scss/components/_field.scss +16 -38
  11. package/dist/scss/components/_icon.scss +6 -8
  12. package/dist/scss/components/_input.scss +41 -52
  13. package/dist/scss/components/_loading.scss +5 -13
  14. package/dist/scss/components/_menu.scss +28 -64
  15. package/dist/scss/components/_modal.scss +25 -34
  16. package/dist/scss/components/_notification.scss +35 -72
  17. package/dist/scss/components/_pagination.scss +43 -86
  18. package/dist/scss/components/_radio.scss +45 -60
  19. package/dist/scss/components/_select.scss +45 -73
  20. package/dist/scss/components/_sidebar.scss +34 -108
  21. package/dist/scss/components/_skeleton.scss +10 -23
  22. package/dist/scss/components/_slider.scss +56 -110
  23. package/dist/scss/components/_steps.scss +138 -310
  24. package/dist/scss/components/_switch.scss +52 -87
  25. package/dist/scss/components/_table.scss +77 -139
  26. package/dist/scss/components/_tabs.scss +93 -151
  27. package/dist/scss/components/_taginput.scss +34 -103
  28. package/dist/scss/components/_timepicker.scss +26 -50
  29. package/dist/scss/components/_tooltip.scss +120 -216
  30. package/dist/scss/components/_upload.scss +17 -22
  31. package/dist/scss/oruga-build.scss +9 -0
  32. package/dist/scss/oruga.scss +39 -190
  33. package/dist/scss/utils/_animations.scss +11 -9
  34. package/dist/scss/utils/_base.scss +4 -4
  35. package/dist/scss/utils/_helpers.scss +4 -104
  36. package/dist/scss/utils/_root.scss +34 -18
  37. package/dist/scss/utils/_variables.scss +5 -7
  38. package/package.json +35 -37
  39. package/src/assets/scss/components/_autocomplete.scss +1 -54
  40. package/src/assets/scss/components/_button.scss +56 -88
  41. package/src/assets/scss/components/_carousel.scss +70 -97
  42. package/src/assets/scss/components/_checkbox.scss +57 -83
  43. package/src/assets/scss/components/_datepicker.scss +141 -242
  44. package/src/assets/scss/components/_dropdown.scss +71 -157
  45. package/src/assets/scss/components/_field.scss +16 -38
  46. package/src/assets/scss/components/_icon.scss +6 -8
  47. package/src/assets/scss/components/_input.scss +41 -52
  48. package/src/assets/scss/components/_loading.scss +5 -13
  49. package/src/assets/scss/components/_menu.scss +28 -64
  50. package/src/assets/scss/components/_modal.scss +25 -34
  51. package/src/assets/scss/components/_notification.scss +35 -72
  52. package/src/assets/scss/components/_pagination.scss +43 -86
  53. package/src/assets/scss/components/_radio.scss +45 -60
  54. package/src/assets/scss/components/_select.scss +45 -73
  55. package/src/assets/scss/components/_sidebar.scss +34 -108
  56. package/src/assets/scss/components/_skeleton.scss +10 -23
  57. package/src/assets/scss/components/_slider.scss +56 -110
  58. package/src/assets/scss/components/_steps.scss +138 -310
  59. package/src/assets/scss/components/_switch.scss +52 -87
  60. package/src/assets/scss/components/_table.scss +77 -139
  61. package/src/assets/scss/components/_tabs.scss +93 -151
  62. package/src/assets/scss/components/_taginput.scss +34 -103
  63. package/src/assets/scss/components/_timepicker.scss +26 -50
  64. package/src/assets/scss/components/_tooltip.scss +120 -216
  65. package/src/assets/scss/components/_upload.scss +17 -22
  66. package/src/assets/scss/oruga-build.scss +9 -0
  67. package/src/assets/scss/oruga.scss +39 -190
  68. package/src/assets/scss/utils/_animations.scss +11 -9
  69. package/src/assets/scss/utils/_base.scss +4 -4
  70. package/src/assets/scss/utils/_helpers.scss +4 -104
  71. package/src/assets/scss/utils/_root.scss +34 -18
  72. package/src/assets/scss/utils/_variables.scss +5 -7
  73. package/dist/oruga-full.css +0 -3919
  74. package/dist/oruga-full.min.css +0 -1
  75. package/dist/scss/oruga-common.scss +0 -37
  76. package/dist/scss/oruga-full.scss +0 -9
  77. package/src/App.vue +0 -105
  78. package/src/assets/scss/oruga-common.scss +0 -37
  79. package/src/assets/scss/oruga-full.scss +0 -9
  80. package/src/components/Autocomplete.vue +0 -606
  81. package/src/components/Button.vue +0 -80
  82. package/src/components/Carousel.vue +0 -295
  83. package/src/components/Checkbox.vue +0 -135
  84. package/src/components/Collapse.vue +0 -134
  85. package/src/components/Datepicker.vue +0 -282
  86. package/src/components/Datetimepicker.vue +0 -127
  87. package/src/components/Dropdown.vue +0 -329
  88. package/src/components/Field.vue +0 -235
  89. package/src/components/Icon.vue +0 -66
  90. package/src/components/Input.vue +0 -129
  91. package/src/components/Loading.vue +0 -70
  92. package/src/components/Menu.vue +0 -42
  93. package/src/components/Modal.vue +0 -230
  94. package/src/components/Notification.vue +0 -136
  95. package/src/components/Pagination.vue +0 -96
  96. package/src/components/Radio.vue +0 -111
  97. package/src/components/Select.vue +0 -155
  98. package/src/components/Sidebar.vue +0 -73
  99. package/src/components/Skeleton.vue +0 -75
  100. package/src/components/Slider.vue +0 -226
  101. package/src/components/Steps.vue +0 -233
  102. package/src/components/Switch.vue +0 -137
  103. package/src/components/Table.vue +0 -278
  104. package/src/components/Tabs.vue +0 -209
  105. package/src/components/Taginput.vue +0 -507
  106. package/src/components/Timepicker.vue +0 -122
  107. package/src/components/Tooltip.vue +0 -187
  108. package/src/components/Upload.vue +0 -66
  109. package/src/main.ts +0 -29
  110. package/src/plugins/theme.ts +0 -1
  111. package/src/router/index.ts +0 -39
  112. package/src/views/Home.vue +0 -24
  113. package/types/index.d.ts +0 -1
@@ -1,233 +0,0 @@
1
- <script setup lang="ts">
2
- import { ref } from "vue";
3
-
4
- const activeStep = ref("0");
5
-
6
- const showSocial = ref(false);
7
- const isAnimated = ref(true);
8
- const isVertical = ref(false);
9
- const isRounded = ref(true);
10
- const isStepsClickable = ref(false);
11
-
12
- const hasNavigation = ref(true);
13
- const customNavigation = ref(false);
14
- const isProfileSuccess = ref(false);
15
-
16
- const prevIcon = ref("chevron-left");
17
- const nextIcon = ref("chevron-right");
18
- const labelPosition = ref("bottom");
19
- const stepsPosition = ref("left");
20
- const position = ref(null);
21
- const size = ref(null);
22
- </script>
23
-
24
- <template>
25
- <section>
26
- <h2>Steps Demo</h2>
27
- <hr />
28
- </section>
29
-
30
- <section>
31
- <h3>Base</h3>
32
-
33
- <o-field grouped group-multiline>
34
- <o-field>
35
- <o-switch v-model="showSocial" label="Show Social step" />
36
- </o-field>
37
- <o-field>
38
- <o-switch v-model="isAnimated" label="Animated" />
39
- </o-field>
40
- <o-field>
41
- <o-switch v-model="isRounded" label="Rounded" />
42
- </o-field>
43
- <o-field>
44
- <o-switch v-model="isVertical" label="Vertical" />
45
- </o-field>
46
- <o-field>
47
- <o-switch v-model="isStepsClickable" label="Clickable Marker" />
48
- </o-field>
49
- </o-field>
50
- <o-field grouped group-multiline>
51
- <o-field>
52
- <o-switch v-model="hasNavigation" label="Navigation Buttons" />
53
- </o-field>
54
- <o-field>
55
- <o-switch v-model="customNavigation" label="Custom Navigation" />
56
- </o-field>
57
- <o-field>
58
- <o-switch v-model="isProfileSuccess">
59
- Set <code>success</code> for profile
60
- </o-switch>
61
- </o-field>
62
- </o-field>
63
- <o-field v-if="hasNavigation" grouped group-multiline>
64
- <o-field label="Prev icon">
65
- <o-select v-model="prevIcon">
66
- <option value="chevron-left">Chevron</option>
67
- <option value="arrow-left">Arrow</option>
68
- </o-select>
69
- </o-field>
70
- <o-field label="Next icon">
71
- <o-select v-model="nextIcon">
72
- <option value="chevron-right">Chevron</option>
73
- <option value="arrow-right">Arrow</option>
74
- </o-select>
75
- </o-field>
76
- <o-field label="Label position">
77
- <o-select v-model="labelPosition">
78
- <option value="bottom">Bottom</option>
79
- <option value="right">Right</option>
80
- <option value="left">Left</option>
81
- </o-select>
82
- </o-field>
83
- <o-field label="steps position">
84
- <o-select v-model="stepsPosition">
85
- <option value="right">Right</option>
86
- <option value="left">Left</option>
87
- </o-select>
88
- </o-field>
89
- </o-field>
90
-
91
- <o-steps
92
- v-model="activeStep"
93
- :vertical="isVertical"
94
- :position="stepsPosition"
95
- :animated="isAnimated"
96
- :rounded="isRounded"
97
- :has-navigation="hasNavigation"
98
- :icon-prev="prevIcon"
99
- :icon-next="nextIcon"
100
- :label-position="labelPosition">
101
- <o-step-item step="1" label="Account" :clickable="isStepsClickable">
102
- <h1 class="title text-center">Account</h1>
103
- Lorem ipsum dolor sit amet.
104
- </o-step-item>
105
-
106
- <o-step-item
107
- step="2"
108
- label="Profile"
109
- :clickable="isStepsClickable"
110
- :variant="isProfileSuccess ? 'success' : ''">
111
- <h1 class="title text-center">Profile</h1>
112
- Lorem ipsum dolor sit amet.
113
- </o-step-item>
114
-
115
- <o-step-item
116
- step="3"
117
- :visible="showSocial"
118
- label="Social"
119
- :clickable="isStepsClickable">
120
- <h1 class="title text-center">Social</h1>
121
- Lorem ipsum dolor sit amet.
122
- </o-step-item>
123
-
124
- <o-step-item
125
- :step="showSocial ? '4' : '3'"
126
- label="Finish"
127
- :clickable="isStepsClickable"
128
- disabled>
129
- <h1 class="title text-center">Finish</h1>
130
- Lorem ipsum dolor sit amet.
131
- </o-step-item>
132
-
133
- <template v-if="customNavigation" #navigation="{ previous, next }">
134
- <o-button
135
- outlined
136
- variant="danger"
137
- icon-pack="fas"
138
- icon-left="backward"
139
- :disabled="previous.disabled"
140
- label="Previous"
141
- @click.prevent="previous.action" />
142
-
143
- <o-button
144
- outlined
145
- variant="success"
146
- icon-pack="fas"
147
- icon-right="forward"
148
- :disabled="next.disabled"
149
- label="Next"
150
- @click.prevent="next.action" />
151
- </template>
152
- </o-steps>
153
- </section>
154
-
155
- <section>
156
- <h3>Variants</h3>
157
-
158
- Warning
159
- <o-steps variant="warning">
160
- <o-step-item label="Account" icon="user-lock">empty</o-step-item>
161
- <o-step-item label="Profile" icon="user">empty</o-step-item>
162
- <o-step-item label="Social" icon="user-plus">empty</o-step-item>
163
- </o-steps>
164
-
165
- Info
166
- <o-steps variant="info">
167
- <o-step-item label="Account" icon="user-lock">empty</o-step-item>
168
- <o-step-item label="Profile" icon="user">empty</o-step-item>
169
- <o-step-item label="Social" icon="user-plus">empty</o-step-item>
170
- </o-steps>
171
-
172
- Success
173
- <o-steps variant="success">
174
- <o-step-item label="Account" icon="user-lock">empty</o-step-item>
175
- <o-step-item label="Profile" icon="user">empty</o-step-item>
176
- <o-step-item label="Social" icon="user-plus">empty</o-step-item>
177
- </o-steps>
178
- </section>
179
-
180
- <section>
181
- <h3>Vertical</h3>
182
-
183
- <o-field grouped group-multiline>
184
- <o-field>
185
- <o-switch v-model="position" true-value="right">
186
- Right position</o-switch
187
- >
188
- </o-field>
189
- <o-field label="Size">
190
- <o-select v-model="size" placeholder="Size">
191
- <option :value="null">Default</option>
192
- <option value="small">Small</option>
193
- <option value="medium">Medium</option>
194
- <option value="large">Large</option>
195
- </o-select>
196
- </o-field>
197
- <o-field label="Label position">
198
- <o-select v-model="labelPosition">
199
- <option value="bottom">Bottom</option>
200
- <option value="right">Right</option>
201
- <option value="left">Left</option>
202
- </o-select>
203
- </o-field>
204
- </o-field>
205
-
206
- <o-steps
207
- :position="position"
208
- :label-position="labelPosition"
209
- :size="size"
210
- vertical>
211
- <o-step-item label="Account" icon="user-lock">
212
- Account: Lorem ipsum dolor sit amet. <br />
213
- Account: Lorem ipsum dolor sit amet. <br />
214
- Account: Lorem ipsum dolor sit amet.
215
- </o-step-item>
216
-
217
- <o-step-item label="Profile" icon="user">
218
- Profile: Lorem ipsum dolor sit amet. <br />
219
- Profile: Lorem ipsum dolor sit amet.? <br />
220
- Profile: Lorem ipsum dolor sit amet. <br />
221
- Profile: Lorem ipsum dolor sit amet.
222
- </o-step-item>
223
-
224
- <o-step-item label="Social" icon="user-plus" disabled>
225
- Social: Lorem ipsum dolor sit amet. <br />
226
- Social: Lorem ipsum dolor sit amet. <br />
227
- Social: Lorem ipsum dolor sit amet. <br />
228
- Social: Lorem ipsum dolor sit amet. <br />
229
- Social: Lorem ipsum dolor sit amet.
230
- </o-step-item>
231
- </o-steps>
232
- </section>
233
- </template>
@@ -1,137 +0,0 @@
1
- <script setup lang="ts">
2
- import { ref } from "vue";
3
-
4
- const isSwitched = ref(false);
5
- const isSwitchedCustom = ref("Yes");
6
- const isRounded = ref(false);
7
- const position = ref("right");
8
- const size = ref("");
9
- const variant = ref(null);
10
- const passive = ref(null);
11
- </script>
12
-
13
- <template>
14
- <section>
15
- <h2>Switch Demo</h2>
16
- <hr />
17
- </section>
18
-
19
- <section>
20
- <h3>Base</h3>
21
-
22
- <o-field>
23
- <o-switch label="Default" />
24
- </o-field>
25
- <o-field>
26
- <o-switch v-model="isSwitched">
27
- {{ isSwitched }}
28
- </o-switch>
29
- </o-field>
30
- <o-field>
31
- <o-switch v-model="isSwitchedCustom" true-value="Yes" false-value="No">
32
- {{ isSwitchedCustom }}
33
- </o-switch>
34
- </o-field>
35
- <o-field>
36
- <o-switch disabled label="Disabled" />
37
- </o-field>
38
- </section>
39
-
40
- <section>
41
- <h3>Variant</h3>
42
-
43
- <o-field>
44
- <o-switch :model-value="true" label="Default" />
45
- </o-field>
46
- <o-field>
47
- <o-switch :model-value="true" variant="primary" label="Primary" />
48
- </o-field>
49
- <o-field>
50
- <o-switch :model-value="true" variant="secondary" label="Secondary" />
51
- </o-field>
52
- <o-field>
53
- <o-switch :model-value="true" variant="info" label="Info" />
54
- </o-field>
55
- <o-field>
56
- <o-switch :model-value="true" variant="success" label="Success" />
57
- </o-field>
58
- <o-field>
59
- <o-switch :model-value="true" variant="danger" label="Danger" />
60
- </o-field>
61
- <o-field>
62
- <o-switch :model-value="true" variant="warning" label="Warning" />
63
- </o-field>
64
- </section>
65
-
66
- <section>
67
- <h3>Size</h3>
68
-
69
- <o-field>
70
- <o-switch size="small" label="Small" />
71
- </o-field>
72
- <o-field>
73
- <o-switch label="Default" />
74
- </o-field>
75
- <o-field>
76
- <o-switch size="medium" label="Medium" />
77
- </o-field>
78
- <o-field>
79
- <o-switch size="large" label="Large" />
80
- </o-field>
81
- </section>
82
-
83
- <section>
84
- <h3>Style variants</h3>
85
-
86
- <o-field grouped>
87
- <o-switch v-model="isRounded" label="Rounded" />
88
- <o-switch
89
- v-model="position"
90
- true-value="left"
91
- false-value="right"
92
- label="
93
- Label on left
94
- " />
95
- </o-field>
96
- <o-field grouped>
97
- <o-field label="Variant">
98
- <o-select v-model="variant" expanded placeholder="Variant">
99
- <option value="null">Default</option>
100
- <option value="primary">Primary</option>
101
- <option value="secondary">Secondary</option>
102
- <option value="success">Success</option>
103
- <option value="info">Info</option>
104
- <option value="warning">Warning</option>
105
- <option value="danger">Danger</option>
106
- </o-select>
107
- </o-field>
108
- <o-field label="Passive Variant">
109
- <o-select v-model="passive" expanded placeholder="Passive Variant">
110
- <option value="null">Default</option>
111
- <option value="primary">Primary</option>
112
- <option value="secondary">Secondary</option>
113
- <option value="success">Success</option>
114
- <option value="info">Info</option>
115
- <option value="warning">Warning</option>
116
- <option value="danger">Danger</option>
117
- </o-select>
118
- </o-field>
119
- <o-field label="Size">
120
- <o-select v-model="size" expanded>
121
- <option value="">Default</option>
122
- <option value="small">small</option>
123
- <option value="medium">medium</option>
124
- <option value="large">large</option>
125
- </o-select>
126
- </o-field>
127
- </o-field>
128
-
129
- <o-switch
130
- :rounded="isRounded"
131
- :position="position"
132
- :size="size"
133
- :variant="variant"
134
- :passive-variant="passive"
135
- label="Sample" />
136
- </section>
137
- </template>
@@ -1,278 +0,0 @@
1
- <script setup lang="ts">
2
- import { ref } from "vue";
3
-
4
- const columns = ref([
5
- {
6
- field: "id",
7
- label: "ID",
8
- width: "40",
9
- numeric: true,
10
- sticky: "true",
11
- },
12
- {
13
- field: "first_name",
14
- label: "First Name",
15
- sortable: true,
16
- },
17
- {
18
- field: "last_name",
19
- label: "Last Name",
20
- sortable: true,
21
- },
22
- {
23
- field: "date",
24
- label: "Date",
25
- position: "centered",
26
- sortable: false,
27
- display: (v: string) => new Date(v).toLocaleDateString(),
28
- },
29
- {
30
- field: "gender",
31
- label: "Gender",
32
- position: "right",
33
- sortable: true,
34
- component: (v: string) => ({
35
- is: "o-icon",
36
- pack: "fas",
37
- icon: v === "Male" ? "mars" : "venus",
38
- }),
39
- },
40
- ]);
41
-
42
- const dataTable = ref([
43
- {
44
- id: 1,
45
- first_name: "Jesse",
46
- last_name: "Simmons",
47
- date: "2016/10/15 13:43:27",
48
- gender: "Male",
49
- },
50
- {
51
- id: 2,
52
- first_name: "John",
53
- last_name: "Jacobs",
54
- date: "2016/12/15 06:00:53",
55
- gender: "Male",
56
- },
57
- {
58
- id: 3,
59
- first_name: "Tina",
60
- last_name: "Gilbert",
61
- date: "2016/04/26 06:26:28",
62
- gender: "Female",
63
- },
64
- {
65
- id: 4,
66
- first_name: "Clarence",
67
- last_name: "Flores",
68
- date: "2016/04/10 10:28:46",
69
- gender: "Male",
70
- },
71
- {
72
- id: 5,
73
- first_name: "Anne",
74
- last_name: "Lee",
75
- date: "2016/12/06 14:38:38",
76
- gender: "Female",
77
- },
78
- {
79
- id: 6,
80
- first_name: "Sara",
81
- last_name: "Armstrong",
82
- date: "2016/09/23 18:50:04",
83
- gender: "Female",
84
- },
85
- {
86
- id: 7,
87
- first_name: "Anthony",
88
- last_name: "Webb",
89
- date: "2016/08/30 23:49:38",
90
- gender: "Male",
91
- },
92
- {
93
- id: 8,
94
- first_name: "Andrew",
95
- last_name: "Greene",
96
- date: "2016/11/20 14:57:47",
97
- gender: "Male",
98
- },
99
- {
100
- id: 9,
101
- first_name: "Russell",
102
- last_name: "White",
103
- date: "2016/07/13 09:29:49",
104
- gender: "Male",
105
- },
106
- {
107
- id: 10,
108
- first_name: "Lori",
109
- last_name: "Hunter",
110
- date: "2016/12/09 01:44:05",
111
- gender: "Female",
112
- },
113
- ]);
114
-
115
- const isEmpty = ref(false);
116
- const isBordered = ref(false);
117
- const isStriped = ref(false);
118
- const isNarrowed = ref(false);
119
- const isHoverable = ref(false);
120
- const isFocusable = ref(false);
121
- const isLoading = ref(false);
122
- const hasMobileCards = ref(true);
123
-
124
- const currentPage = ref(1);
125
- const isPaginated = ref(true);
126
- const isPaginationSimple = ref(false);
127
- const paginationPosition = ref("bottom");
128
- const perPage = ref(3);
129
-
130
- const checkedRows = ref([]);
131
- const selected = ref(null);
132
- </script>
133
-
134
- <template>
135
- <section>
136
- <h2>Table Demo</h2>
137
- <hr />
138
- </section>
139
-
140
- <section>
141
- <h3>Sandbox</h3>
142
-
143
- <o-field grouped group-multiline>
144
- <o-switch v-model="isBordered" :rounded="true" label="Bordered" />
145
- <o-switch v-model="isStriped" :rounded="true" label="Striped" />
146
- <o-switch v-model="isNarrowed" :rounded="true" label="Narrowed" />
147
- <o-switch v-model="isHoverable" :rounded="true" label="Hoverable" />
148
- <o-switch v-model="isFocusable" :rounded="true" label="Focusable" />
149
- <o-switch v-model="isLoading" :rounded="true" label="Loading state" />
150
- <o-switch v-model="isEmpty" :rounded="true" label="Empty" />
151
- <o-switch v-model="hasMobileCards" :rounded="true">
152
- Mobile cards
153
- <small>(collapsed rows)</small>
154
- </o-switch>
155
- </o-field>
156
-
157
- <o-table
158
- v-model:checked-rows="checkedRows"
159
- :paginated="false"
160
- :data="isEmpty ? [] : dataTable"
161
- :bordered="isBordered"
162
- :striped="isStriped"
163
- :narrowed="isNarrowed"
164
- :hoverable="isHoverable"
165
- :loading="isLoading"
166
- :focusable="isFocusable"
167
- :mobile-cards="hasMobileCards"
168
- checkable
169
- detailed>
170
- <o-table-column
171
- v-for="(column, idx) in columns"
172
- :key="idx"
173
- v-slot="{ row }"
174
- v-bind="column">
175
- <component
176
- :is="column.component(row[column.field]).is"
177
- v-if="column.component"
178
- v-bind="column.component(row[column.field])" />
179
- {{
180
- column.display ? column.display(row[column.field]) : row[column.field]
181
- }}
182
- </o-table-column>
183
-
184
- <template #detail="props">
185
- <tr>
186
- <td>{{ props.row.id }}</td>
187
- <td>{{ props.row.first_name }}</td>
188
- <td>{{ props.row.last_name }}</td>
189
- <td>{{ props.row.gender }}</td>
190
- </tr>
191
- </template>
192
-
193
- <template #bottom-left>
194
- <b>Total checked</b>: {{ checkedRows.length }}
195
- </template>
196
- </o-table>
197
- </section>
198
-
199
- <section>
200
- <h3>Paginated</h3>
201
-
202
- <o-field grouped group-multiline>
203
- <o-switch v-model="isPaginated" :rounded="true" label="Paginated " />
204
- <o-switch
205
- v-model="isPaginationSimple"
206
- :rounded="true"
207
- label="Simple Paginated" />
208
- <o-select v-model="perPage" :disabled="!isPaginated">
209
- <option value="3">3 per page</option>
210
- <option value="5">5 per page</option>
211
- <option value="10">10 per page</option>
212
- <option value="15">15 per page</option>
213
- <option value="20">20 per page</option>
214
- </o-select>
215
- <o-select v-model="paginationPosition" :disabled="!isPaginated">
216
- <option value="bottom">bottom pagination</option>
217
- <option value="top">top pagination</option>
218
- <option value="both">both</option>
219
- </o-select>
220
- </o-field>
221
- <p><b>Page:</b> {{ currentPage }}</p>
222
-
223
- <o-table
224
- v-model:current-page="currentPage"
225
- :data="dataTable"
226
- :paginated="isPaginated"
227
- :per-page="perPage"
228
- :pagination-simple="isPaginationSimple"
229
- :pagination-position="paginationPosition">
230
- <o-table-column
231
- v-for="(column, idx) in columns"
232
- :key="idx"
233
- v-slot="{ row }"
234
- v-bind="column">
235
- <component
236
- :is="column.component(row[column.field]).is"
237
- v-if="column.component"
238
- v-bind="column.component(row[column.field])" />
239
- {{
240
- column.display ? column.display(row[column.field]) : row[column.field]
241
- }}
242
- </o-table-column>
243
- </o-table>
244
- </section>
245
-
246
- <section>
247
- <h3>Selection</h3>
248
-
249
- <o-button
250
- variant="danger"
251
- :disabled="!selected"
252
- icon-left="times"
253
- label="Clear selected"
254
- @click="selected = null" />
255
-
256
- <p><b>Selected:</b> {{ selected }}</p>
257
-
258
- <o-table v-model:selected="selected" :data="dataTable" focusable>
259
- <o-table-column
260
- v-for="(column, idx) in columns"
261
- :key="idx"
262
- v-slot="{ row }"
263
- v-bind="column">
264
- <span>
265
- <component
266
- :is="column.component(row[column.field]).is"
267
- v-if="column.component"
268
- v-bind="column.component(row[column.field])" />
269
- {{
270
- column.display
271
- ? column.display(row[column.field])
272
- : row[column.field]
273
- }}
274
- </span>
275
- </o-table-column>
276
- </o-table>
277
- </section>
278
- </template>