@cloudron/pankow 3.2.6 → 3.2.7
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/components/Dialog.vue +17 -2
- package/components/Menu.vue +31 -11
- package/components/ProgressBar.vue +1 -0
- package/components/SingleSelect.vue +24 -1
- package/package.json +8 -3
- package/types/fallbackImage.d.ts +5 -0
- package/types/fetcher.d.ts +35 -0
- package/types/gestures.d.ts +5 -0
- package/types/index.d.ts +6 -0
- package/types/tooltip.d.ts +9 -0
- package/types/utils.d.ts +57 -0
- package/.gitlab-ci.yml +0 -30
- package/.jshintrc +0 -8
- package/gallery/CustomMenuItem.vue +0 -40
- package/gallery/DirectoryViewDemo.vue +0 -73
- package/gallery/Index.vue +0 -792
- package/gallery/folder.svg +0 -151
- package/gallery/index.html +0 -25
- package/gallery/index.js +0 -10
- package/gallery/logo.png +0 -0
- package/gallery/vite.config.mjs +0 -9
- package/logo.png +0 -0
- package/logo.svg +0 -78
- package/style.css +0 -370
package/gallery/Index.vue
DELETED
|
@@ -1,792 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
|
|
3
|
-
import { ref, useTemplateRef, onMounted } from 'vue';
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
Button,
|
|
7
|
-
ButtonGroup,
|
|
8
|
-
Dialog,
|
|
9
|
-
EmailInput,
|
|
10
|
-
InputDialog,
|
|
11
|
-
MainLayout,
|
|
12
|
-
Notification,
|
|
13
|
-
NumberInput,
|
|
14
|
-
TextInput,
|
|
15
|
-
PasswordInput,
|
|
16
|
-
Icon,
|
|
17
|
-
Breadcrumb,
|
|
18
|
-
Checkbox,
|
|
19
|
-
Radiobutton,
|
|
20
|
-
OfflineBanner,
|
|
21
|
-
Popover,
|
|
22
|
-
ProgressBar,
|
|
23
|
-
SideBar,
|
|
24
|
-
TabView,
|
|
25
|
-
TableView,
|
|
26
|
-
TagInput,
|
|
27
|
-
Menu,
|
|
28
|
-
SingleSelect,
|
|
29
|
-
MultiSelect,
|
|
30
|
-
Spinner,
|
|
31
|
-
Switch,
|
|
32
|
-
FormGroup,
|
|
33
|
-
InputGroup,
|
|
34
|
-
} from '../index.js';
|
|
35
|
-
|
|
36
|
-
import { prettyDate, prettyLongDate } from '../utils.js';
|
|
37
|
-
|
|
38
|
-
import DirectoryViewDemo from './DirectoryViewDemo.vue';
|
|
39
|
-
import CustomMenuItem from './CustomMenuItem.vue';
|
|
40
|
-
|
|
41
|
-
const dateTime = ref('2024-05-01T01:13');
|
|
42
|
-
const buttonTypeToggle = ref(false);
|
|
43
|
-
const largeDialog = ref(false);
|
|
44
|
-
const checkbox1Enabled = ref(true);
|
|
45
|
-
const checkbox2Enabled = ref(false);
|
|
46
|
-
const switch1 = ref(true);
|
|
47
|
-
const switch2 = ref(false);
|
|
48
|
-
const offlineBannerActive = ref(false);
|
|
49
|
-
const textInputValue = ref('');
|
|
50
|
-
const textInputErrorValue = ref('');
|
|
51
|
-
const textInputDisabledValue = ref('do not edit');
|
|
52
|
-
const passwordInputValue = ref('');
|
|
53
|
-
const passwordInputDisabledValue = ref('something');
|
|
54
|
-
const emailInputValue = ref('');
|
|
55
|
-
const numberInputValue = ref(0);
|
|
56
|
-
const numberInputDisabledValue = ref(1337);
|
|
57
|
-
const tagInputValue = ref([ 'pecan', 'walnut' ]);
|
|
58
|
-
const radiobutton = ref('one');
|
|
59
|
-
const progressValue = ref(44);
|
|
60
|
-
|
|
61
|
-
const breadcrumbHomeItem = {
|
|
62
|
-
label: 'Home',
|
|
63
|
-
icon: 'fa-solid fa-house',
|
|
64
|
-
route: '#'
|
|
65
|
-
};
|
|
66
|
-
const breadcrumbItems = [{
|
|
67
|
-
icon: '',
|
|
68
|
-
label: 'Cloudron',
|
|
69
|
-
action: () => { console.log('Breadcrumb Cloudron'); }
|
|
70
|
-
}, {
|
|
71
|
-
icon: 'fa-solid fa-user-astronaut',
|
|
72
|
-
label: 'Founders',
|
|
73
|
-
action: () => { console.log('Breadcrumb Founders'); }
|
|
74
|
-
}, {
|
|
75
|
-
icon: 'fa-regular fa-file-pdf',
|
|
76
|
-
label: 'Documents',
|
|
77
|
-
action: () => { console.log('Breadcrumb Documents'); }
|
|
78
|
-
}, {
|
|
79
|
-
icon: '',
|
|
80
|
-
label: 'Tax',
|
|
81
|
-
action: () => { console.log('Breadcrumb Tax'); }
|
|
82
|
-
}];
|
|
83
|
-
const singleselectModel = [{
|
|
84
|
-
display: 'Pizza',
|
|
85
|
-
id: 'pizza'
|
|
86
|
-
}, {
|
|
87
|
-
display: 'Pasta',
|
|
88
|
-
id: 'pasta'
|
|
89
|
-
}, {
|
|
90
|
-
display: 'Pizza',
|
|
91
|
-
id: 'pizza2'
|
|
92
|
-
}, {
|
|
93
|
-
display: 'Falafel',
|
|
94
|
-
id: 'falafel'
|
|
95
|
-
}, {
|
|
96
|
-
display: 'Menemen',
|
|
97
|
-
id: 'menemen'
|
|
98
|
-
},{
|
|
99
|
-
display: 'Pizza',
|
|
100
|
-
id: 'pizza11'
|
|
101
|
-
}, {
|
|
102
|
-
display: 'Pasta',
|
|
103
|
-
id: 'pasta11'
|
|
104
|
-
}, {
|
|
105
|
-
display: 'Pizza',
|
|
106
|
-
id: 'pizza211'
|
|
107
|
-
}, {
|
|
108
|
-
display: 'Falafel',
|
|
109
|
-
id: 'falafel11'
|
|
110
|
-
}, {
|
|
111
|
-
display: 'Menemen',
|
|
112
|
-
id: 'menemen11'
|
|
113
|
-
},{
|
|
114
|
-
display: 'Pizza',
|
|
115
|
-
id: 'pizza22'
|
|
116
|
-
}, {
|
|
117
|
-
display: 'Pasta',
|
|
118
|
-
id: 'pasta22'
|
|
119
|
-
}, {
|
|
120
|
-
display: 'Pizza',
|
|
121
|
-
id: 'pizza222'
|
|
122
|
-
}, {
|
|
123
|
-
display: 'Falafel',
|
|
124
|
-
id: 'falafel22'
|
|
125
|
-
}, {
|
|
126
|
-
display: 'Menemen',
|
|
127
|
-
id: 'menemen22'
|
|
128
|
-
}];
|
|
129
|
-
const singleselectValue = ref({
|
|
130
|
-
display: 'Pasta',
|
|
131
|
-
id: 'pasta'
|
|
132
|
-
});
|
|
133
|
-
const singleselectValueWithKey = ref('falafel');
|
|
134
|
-
const singleselectValueNoInit = ref('');
|
|
135
|
-
const multiselectModel = [{
|
|
136
|
-
display: 'Pizza',
|
|
137
|
-
id: 'pizza'
|
|
138
|
-
}, {
|
|
139
|
-
display: 'Pasta',
|
|
140
|
-
id: 'pasta'
|
|
141
|
-
}, {
|
|
142
|
-
separator: true,
|
|
143
|
-
}, {
|
|
144
|
-
display: 'Pizza',
|
|
145
|
-
id: 'pizza2'
|
|
146
|
-
}, {
|
|
147
|
-
display: 'Falafel',
|
|
148
|
-
id: 'falafel'
|
|
149
|
-
}, {
|
|
150
|
-
display: 'Menemen',
|
|
151
|
-
id: 'menemen'
|
|
152
|
-
}];
|
|
153
|
-
const multiselectValue = ref([]);
|
|
154
|
-
const multiselectValueWithCustomLabel = ref([]);
|
|
155
|
-
const multiselectValueWithOptionKey = ref([ 'falafel' ]);
|
|
156
|
-
const multiselectValueWithSelectAll = ref([]);
|
|
157
|
-
const menuModelItemsSingle = [{
|
|
158
|
-
label: 'Single Item',
|
|
159
|
-
action: () => { console.log('Single Menu Item'); }
|
|
160
|
-
}];
|
|
161
|
-
const menuModelItems = [{
|
|
162
|
-
label: 'Item 1',
|
|
163
|
-
action: () => { console.log('Menu Item 1 clicked'); }
|
|
164
|
-
}, {
|
|
165
|
-
label: 'Item 2',
|
|
166
|
-
action: () => { console.log('Menu Item 2 clicked'); }
|
|
167
|
-
}, {
|
|
168
|
-
separator: true
|
|
169
|
-
}, {
|
|
170
|
-
label: 'Item 3',
|
|
171
|
-
action: () => { console.log('Menu Item 3 clicked'); }
|
|
172
|
-
}];
|
|
173
|
-
const menuModelItemsWithIcons = [{
|
|
174
|
-
icon: 'fa-solid fa-circle-notch fa-spin',
|
|
175
|
-
label: 'Item 1',
|
|
176
|
-
action: () => { console.log('Menu Item 1 clicked'); }
|
|
177
|
-
}, {
|
|
178
|
-
icon: '',
|
|
179
|
-
label: 'Item 2',
|
|
180
|
-
checkbox: true,
|
|
181
|
-
action: () => { console.log('Menu Item 2 clicked'); }
|
|
182
|
-
}, {
|
|
183
|
-
separator: true
|
|
184
|
-
}, {
|
|
185
|
-
href: 'https://cloudron.io',
|
|
186
|
-
target: '_blank',
|
|
187
|
-
label: 'Item as link',
|
|
188
|
-
}, {
|
|
189
|
-
separator: true
|
|
190
|
-
}, {
|
|
191
|
-
icon: 'fa-regular fa-file-pdf',
|
|
192
|
-
label: 'Item 3',
|
|
193
|
-
action: () => { console.log('Menu Item 3 clicked'); }
|
|
194
|
-
}];
|
|
195
|
-
const menuModelWithDOMElements = [{
|
|
196
|
-
label: 'Normal Item',
|
|
197
|
-
action: () => { console.log('Normal Item clicked'); }
|
|
198
|
-
}, {
|
|
199
|
-
type: CustomMenuItem,
|
|
200
|
-
action: () => { console.log('Large Item clicked'); }
|
|
201
|
-
}, {
|
|
202
|
-
label: 'This is a link',
|
|
203
|
-
href: 'https://cloudron.io',
|
|
204
|
-
target: '_blank',
|
|
205
|
-
}];
|
|
206
|
-
const notificationPosition = ref('top-center');
|
|
207
|
-
const tableColumns = {
|
|
208
|
-
status: {
|
|
209
|
-
label: 'Status',
|
|
210
|
-
sort(a, b) {
|
|
211
|
-
return a.index < b.index ? -1 : 1;
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
filename: {
|
|
215
|
-
label: 'File name',
|
|
216
|
-
icon: 'fa-solid fa-lock',
|
|
217
|
-
sort: true,
|
|
218
|
-
},
|
|
219
|
-
extra: {
|
|
220
|
-
label: 'Extra',
|
|
221
|
-
hideMobile: true,
|
|
222
|
-
},
|
|
223
|
-
action: {
|
|
224
|
-
label: 'Actions',
|
|
225
|
-
sort: false
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
const tableModel = ref([]);
|
|
229
|
-
const tabs = {
|
|
230
|
-
tab0: 'Fruit',
|
|
231
|
-
tab1: 'Veggies',
|
|
232
|
-
tab2: 'Meat',
|
|
233
|
-
tab3: 'Drinks',
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
const myDialog = useTemplateRef('myDialog');
|
|
237
|
-
function onButtonClick() {
|
|
238
|
-
myDialog.value.open();
|
|
239
|
-
console.log('Button clicked');
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
function onPopover(popover, event, elem = null) {
|
|
243
|
-
popover.open(event, elem);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
const myInputDialog = useTemplateRef('myInputDialog');
|
|
247
|
-
async function onAskForConfirmation() {
|
|
248
|
-
console.log('User answered with:', await myInputDialog.value.confirm({
|
|
249
|
-
message: 'Really delete this or that?',
|
|
250
|
-
confirmStyle: 'danger',
|
|
251
|
-
confirmLabel: 'yeah sure',
|
|
252
|
-
rejectLabel: 'hm no'
|
|
253
|
-
}) ? 'ok' : 'nay');
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
async function onAskForString() {
|
|
257
|
-
console.log('User answered with:', await myInputDialog.value.prompt({
|
|
258
|
-
message: 'New Filename',
|
|
259
|
-
value: 'newfile.txt',
|
|
260
|
-
confirmStyle: 'success',
|
|
261
|
-
confirmLabel: 'Save',
|
|
262
|
-
rejectLabel: 'Close'
|
|
263
|
-
}));
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
function onOpenMenu(menu, event, elem = null) {
|
|
267
|
-
menu.open(event, elem);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
const sideBar = useTemplateRef('sideBar');
|
|
271
|
-
function onSideBarEntry() {
|
|
272
|
-
sideBar.value.close();
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
function onRaiseNotification(text, type) {
|
|
276
|
-
if (type) window.pankow.notify({ text, type });
|
|
277
|
-
else window.pankow.notify(text);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
function onRaisePersistentNotification(text) {
|
|
281
|
-
window.pankow.notify({
|
|
282
|
-
text,
|
|
283
|
-
persistent: true
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
const tabview = useTemplateRef('tabview');
|
|
288
|
-
function onChangeTab(tab) {
|
|
289
|
-
tabview.value.open(tab);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
function onSwitchChange(value) {
|
|
293
|
-
console.log('switch changed to', value);
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
onMounted(async () => {
|
|
297
|
-
console.log('Pankow widget gallery');
|
|
298
|
-
|
|
299
|
-
for (let i = 0; i < 100; ++i) {
|
|
300
|
-
tableModel.value.push({
|
|
301
|
-
status: {
|
|
302
|
-
label: i + ' some state',
|
|
303
|
-
index: i
|
|
304
|
-
},
|
|
305
|
-
filename: `Test file ${i}.txt`,
|
|
306
|
-
extra: 'Only visible on desktop',
|
|
307
|
-
action: 'foo'
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
document.getElementById('borderRadiusInput').addEventListener('change', (event) => {
|
|
312
|
-
let root = document.documentElement;
|
|
313
|
-
root.style.setProperty('--pankow-border-radius', event.target.value + 'px');
|
|
314
|
-
});
|
|
315
|
-
|
|
316
|
-
setTimeout(() => {
|
|
317
|
-
radiobutton.value = 'two';
|
|
318
|
-
singleselectValueWithKey.value = 'pizza';
|
|
319
|
-
}, 2000 );
|
|
320
|
-
});
|
|
321
|
-
|
|
322
|
-
</script>
|
|
323
|
-
|
|
324
|
-
<template>
|
|
325
|
-
|
|
326
|
-
<Notification :position="notificationPosition"/>
|
|
327
|
-
|
|
328
|
-
<div class="main-content">
|
|
329
|
-
<SideBar ref="sideBar" class="side-bar">
|
|
330
|
-
<h2><img src="./logo.png" class="logo"/><span class="logo-text">ankow</span></h2>
|
|
331
|
-
<label>Border Radius</label>
|
|
332
|
-
<input id="borderRadiusInput" type="range" min="0" max="20" value="3"/>
|
|
333
|
-
<a @click="onSideBarEntry()" href="#button">Button</a>
|
|
334
|
-
<a @click="onSideBarEntry()" class="child" href="#button-outline">Outline</a>
|
|
335
|
-
<a @click="onSideBarEntry()" class="child" href="#button-small">Small</a>
|
|
336
|
-
<a @click="onSideBarEntry()" class="child" href="#button-plain">Plain</a>
|
|
337
|
-
<a @click="onSideBarEntry()" class="child" href="#button-tool">Toolbutton</a>
|
|
338
|
-
<a @click="onSideBarEntry()" class="child" href="#button-group">Button Groups</a>
|
|
339
|
-
<a @click="onSideBarEntry()" href="#tooltip">Tooltip</a>
|
|
340
|
-
<a @click="onSideBarEntry()" href="#menu">Menu</a>
|
|
341
|
-
<a @click="onSideBarEntry()" href="#icon">Icon</a>
|
|
342
|
-
<a @click="onSideBarEntry()" href="#spinner">Spinner</a>
|
|
343
|
-
<a @click="onSideBarEntry()" href="#form">Form</a>
|
|
344
|
-
<a @click="onSideBarEntry()" class="child" href="#form-textinput">Text Input</a>
|
|
345
|
-
<a @click="onSideBarEntry()" class="child" href="#form-passwordinput">Password Input</a>
|
|
346
|
-
<a @click="onSideBarEntry()" class="child" href="#form-emailinput">Email Input</a>
|
|
347
|
-
<a @click="onSideBarEntry()" class="child" href="#form-numberinput">Number Input</a>
|
|
348
|
-
<a @click="onSideBarEntry()" class="child" href="#form-taginput">Tag Input</a>
|
|
349
|
-
<a @click="onSideBarEntry()" class="child" href="#form-checkbox">Checkbox</a>
|
|
350
|
-
<a @click="onSideBarEntry()" class="child" href="#form-radiobutton">Radiobutton</a>
|
|
351
|
-
<a @click="onSideBarEntry()" class="child" href="#form-switch">Switch</a>
|
|
352
|
-
<a @click="onSideBarEntry()" class="child" href="#form-group">Form Group</a>
|
|
353
|
-
<a @click="onSideBarEntry()" class="child" href="#input-group">Input Group</a>
|
|
354
|
-
<a @click="onSideBarEntry()" href="#dialog">Dialog</a>
|
|
355
|
-
<a @click="onSideBarEntry()" href="#popover">Popover</a>
|
|
356
|
-
<a @click="onSideBarEntry()" href="#breadcrumb">Breadcrumb</a>
|
|
357
|
-
<a @click="onSideBarEntry()" href="#singleselect">Singleselect</a>
|
|
358
|
-
<a @click="onSideBarEntry()" href="#multiselect">Multiselect</a>
|
|
359
|
-
<a @click="onSideBarEntry()" href="#progressbar">Progressbar</a>
|
|
360
|
-
<a @click="onSideBarEntry()" href="#offlinebanner">Offline Banner</a>
|
|
361
|
-
<a @click="onSideBarEntry()" href="#notification">Notification</a>
|
|
362
|
-
<a @click="onSideBarEntry()" href="#tabview">Tab View</a>
|
|
363
|
-
<a @click="onSideBarEntry()" href="#tableview">Table View</a>
|
|
364
|
-
<a @click="onSideBarEntry()" href="#directoryview">Directory View</a>
|
|
365
|
-
</SideBar>
|
|
366
|
-
<MainLayout>
|
|
367
|
-
<template #dialogs>
|
|
368
|
-
<Dialog ref="myDialog" title="My Dialog" :show-x="true" rejectLabel="Done">
|
|
369
|
-
This is a dialog.
|
|
370
|
-
<Button @click="largeDialog = !largeDialog">Large/auto</Button>
|
|
371
|
-
<div :style="{ width: largeDialog ? '720px' : 'auto', height: largeDialog ? '400px' : 'auto' }"></div>
|
|
372
|
-
</Dialog>
|
|
373
|
-
|
|
374
|
-
<InputDialog ref="myInputDialog" />
|
|
375
|
-
</template>
|
|
376
|
-
<template #header>
|
|
377
|
-
<div style="text-align: center;">Header</div>
|
|
378
|
-
</template>
|
|
379
|
-
<template #body>
|
|
380
|
-
<div style="padding-left: 20px; padding-right: 20px;">
|
|
381
|
-
<h1>Pankow the Cloudron UI Toolkit</h1>
|
|
382
|
-
<p>
|
|
383
|
-
The <a href="https://vuejs.org">Vue.js</a> app needs to have <code>id="app"</code>
|
|
384
|
-
</p>
|
|
385
|
-
|
|
386
|
-
<div>
|
|
387
|
-
<h3>Z-index layers (wip)</h3>
|
|
388
|
-
<ul>
|
|
389
|
-
<li>Dialog 2000</li>
|
|
390
|
-
<li>SideBar 2000</li>
|
|
391
|
-
<li>Menu 3000</li>
|
|
392
|
-
<li>Tooltip 6000</li>
|
|
393
|
-
<li>OfflineBanner 30000</li>
|
|
394
|
-
<li>Notification 30001</li>
|
|
395
|
-
</ul>
|
|
396
|
-
</div>
|
|
397
|
-
|
|
398
|
-
<div>
|
|
399
|
-
<h2>utils pretty functions:</h2>
|
|
400
|
-
<input type="datetime-local" v-model="dateTime"/>
|
|
401
|
-
<p>prettyDate(): {{ prettyDate(dateTime) }}</p>
|
|
402
|
-
<p>prettyLongDate(): {{ prettyLongDate(dateTime) }}</p>
|
|
403
|
-
</div>
|
|
404
|
-
|
|
405
|
-
<h2 id="button">Button</h2>
|
|
406
|
-
<div style="display: flex; gap: 10px; flex-wrap: wrap;">
|
|
407
|
-
<Button>Regular</Button>
|
|
408
|
-
<Button danger>Danger</Button>
|
|
409
|
-
<Button secondary>Secondary</Button>
|
|
410
|
-
<Button success>Success</Button>
|
|
411
|
-
</div>
|
|
412
|
-
<br/>
|
|
413
|
-
<div style="display: flex; gap: 10px; flex-wrap: wrap;">
|
|
414
|
-
<Button danger :disabled="true">Disabled</Button>
|
|
415
|
-
<Button :success="buttonTypeToggle || null" @click="buttonTypeToggle = !buttonTypeToggle">Button type toggle</Button>
|
|
416
|
-
<Button href="https://cloudron.io">Link</Button>
|
|
417
|
-
<Button href="https://cloudron.io" disabled>Disabled link</Button>
|
|
418
|
-
<Button href="https://cloudron.io" target="_blank">Link with target</Button>
|
|
419
|
-
</div>
|
|
420
|
-
|
|
421
|
-
<h3 id="button-outline">Outline</h3>
|
|
422
|
-
<div style="display: flex; gap: 10px">
|
|
423
|
-
<Button outline >Regular</Button>
|
|
424
|
-
<Button outline danger>Danger</Button>
|
|
425
|
-
<Button outline secondary>Secondary</Button>
|
|
426
|
-
<Button outline secondary :disabled="true">Secondary</Button>
|
|
427
|
-
<Button outline success>Success</Button>
|
|
428
|
-
</div>
|
|
429
|
-
|
|
430
|
-
<h3 id="button-small">Small</h3>
|
|
431
|
-
<div style="display: flex; gap: 10px">
|
|
432
|
-
<Button small>Small</Button>
|
|
433
|
-
<Button small outline success>Small success outline</Button>
|
|
434
|
-
</div>
|
|
435
|
-
|
|
436
|
-
<h3 id="button-plain">Plain</h3>
|
|
437
|
-
<div style="display: flex; gap: 10px">
|
|
438
|
-
<Button plain >Regular</Button>
|
|
439
|
-
<Button plain danger>Danger</Button>
|
|
440
|
-
<Button plain secondary>Secondary</Button>
|
|
441
|
-
<Button plain success :disabled="true">Success</Button>
|
|
442
|
-
</div>
|
|
443
|
-
|
|
444
|
-
<h3 id="button-tool">Toolbuttons</h3>
|
|
445
|
-
<div style="display: flex; gap: 10px">
|
|
446
|
-
<Button tool icon="fa-solid fa-scissors"></Button>
|
|
447
|
-
<Button tool secondary>YaY</Button>
|
|
448
|
-
<Button tool outline danger :disabled="true" icon="fa-solid fa-paste"></Button>
|
|
449
|
-
</div>
|
|
450
|
-
<p>Toolbuttons do not have a min-width set</p>
|
|
451
|
-
|
|
452
|
-
<h3 id="button-group">Button Groups</h3>
|
|
453
|
-
<div style="display: flex; gap: 10px">
|
|
454
|
-
<ButtonGroup>
|
|
455
|
-
<Button>Regular</Button>
|
|
456
|
-
<Button danger icon="fa-solid fa-scissors">Danger</Button>
|
|
457
|
-
<Button tool secondary>YaY</Button>
|
|
458
|
-
<Button success href="https://cloudron.is">Success</Button>
|
|
459
|
-
</ButtonGroup>
|
|
460
|
-
|
|
461
|
-
<ButtonGroup>
|
|
462
|
-
<Button outline>Regular</Button>
|
|
463
|
-
<Button outline danger icon="fa-solid fa-scissors">Danger</Button>
|
|
464
|
-
<Button outline tool secondary>YaY</Button>
|
|
465
|
-
<Button outline secondary>Success</Button>
|
|
466
|
-
</ButtonGroup>
|
|
467
|
-
</div>
|
|
468
|
-
|
|
469
|
-
<h2 id="tooltip">Tooltip</h2>
|
|
470
|
-
<div style="display: flex; gap: 10px">
|
|
471
|
-
<Button v-tooltip.left="'Tooooooooltips'">left</Button>
|
|
472
|
-
<Button v-tooltip.top="'Tooooooooltips'">top</Button>
|
|
473
|
-
<Button v-tooltip.bottom="'Tooooooooltips'">bottom</Button>
|
|
474
|
-
<Button v-tooltip.right="'Tooooooooltips'">right</Button>
|
|
475
|
-
</div>
|
|
476
|
-
|
|
477
|
-
<h2 id="menu">Menu</h2>
|
|
478
|
-
<div style="display: flex; gap: 10px">
|
|
479
|
-
<Menu ref="menu1" :model="menuModelItems"></Menu>
|
|
480
|
-
<div @contextmenu="onOpenMenu($refs.menu1, $event)">Rightclick here</div>
|
|
481
|
-
<br/>
|
|
482
|
-
<Button :menu="menuModelItemsSingle">Single Menu Button</Button>
|
|
483
|
-
<Button :menu="menuModelItemsWithIcons">Menu Button</Button>
|
|
484
|
-
<Button :menu="menuModelWithDOMElements">Mixed content Menu</Button>
|
|
485
|
-
</div>
|
|
486
|
-
|
|
487
|
-
<h2 id="icon">Icon</h2>
|
|
488
|
-
<div style="display: flex; justify-content: space-around; width: 300px;">
|
|
489
|
-
<Icon icon="fa-solid fa-user" />
|
|
490
|
-
<Icon icon="fa-regular fa-folder" />
|
|
491
|
-
<Icon icon="fa-solid fa-tree" />
|
|
492
|
-
<Icon icon="fa-regular fa-file" />
|
|
493
|
-
</div>
|
|
494
|
-
<br/>
|
|
495
|
-
<Button success icon="fa-solid fa-user-plus">success</Button>
|
|
496
|
-
|
|
497
|
-
<h2 id="spinner">Spinner</h2>
|
|
498
|
-
<div>
|
|
499
|
-
<Spinner class="pankow-spinner-large"/>
|
|
500
|
-
<Spinner/>
|
|
501
|
-
<br/>
|
|
502
|
-
<br/>
|
|
503
|
-
<ButtonGroup>
|
|
504
|
-
<Button :loading="true">Regular</Button>
|
|
505
|
-
<Button plain :loading="true">Plain</Button>
|
|
506
|
-
<Button tool secondary :loading="false">Foo</Button>
|
|
507
|
-
<Button tool secondary :loading="true"/>
|
|
508
|
-
</ButtonGroup>
|
|
509
|
-
</div>
|
|
510
|
-
|
|
511
|
-
<h2 id="form">Form</h2>
|
|
512
|
-
<h3 id="form-textinput">Text Input</h3>
|
|
513
|
-
<FormGroup>
|
|
514
|
-
<label for="textInput">Label: |{{ textInputValue }}| (input gets trimmed)</label>
|
|
515
|
-
<TextInput id="textInput" v-model="textInputValue" placeholder="Some text input" style="width: 600px"/>
|
|
516
|
-
</FormGroup>
|
|
517
|
-
<FormGroup>
|
|
518
|
-
<label for="textInputError">Label: {{ textInputErrorValue }}</label>
|
|
519
|
-
<TextInput id="textInputError" v-model="textInputErrorValue" placeholder="Some error text input" class="has-error" style="width: 600px"/>
|
|
520
|
-
</FormGroup>
|
|
521
|
-
<FormGroup>
|
|
522
|
-
<label for="textDisabledInput">Disabled:</label>
|
|
523
|
-
<TextInput id="textDisabledInput" :disabled="true" v-model="textInputDisabledValue" style="width: 600px"/>
|
|
524
|
-
</FormGroup>
|
|
525
|
-
|
|
526
|
-
<h3 id="form-passwordinput">Password Input</h3>
|
|
527
|
-
<FormGroup>
|
|
528
|
-
<label for="passwordInput">Label: {{ passwordInputValue }}</label>
|
|
529
|
-
<PasswordInput id="passwordInput" v-model="passwordInputValue" placeholder="My password" style="width: 600px"/>
|
|
530
|
-
</FormGroup>
|
|
531
|
-
<FormGroup>
|
|
532
|
-
<label for="passwordDisabledInput">Disabled:</label>
|
|
533
|
-
<PasswordInput id="passwordDisabledInput" v-model="passwordInputDisabledValue" :disabled="true" style="width: 600px"/>
|
|
534
|
-
</FormGroup>
|
|
535
|
-
|
|
536
|
-
<h3 id="form-emailinput">Email Input</h3>
|
|
537
|
-
<FormGroup>
|
|
538
|
-
<label for="emailInput">Address: {{ emailInputValue }}</label>
|
|
539
|
-
<EmailInput id="emailInput" v-model="emailInputValue" placeholder="some@email.foo" style="width: 600px"/>
|
|
540
|
-
</FormGroup>
|
|
541
|
-
|
|
542
|
-
<h3 id="form-numberinput">Number Input</h3>
|
|
543
|
-
<FormGroup>
|
|
544
|
-
<label for="numberInput">Step 2 for min -10 and max unset: {{ numberInputValue }}</label>
|
|
545
|
-
<NumberInput id="numberInput" v-model="numberInputValue" placeholder="some number" step="2" min="-10" style="width: 600px"/>
|
|
546
|
-
</FormGroup>
|
|
547
|
-
<FormGroup>
|
|
548
|
-
<label for="numberDisabledInput">Disabled:</label>
|
|
549
|
-
<NumberInput id="numberDisabledInput" v-model="numberInputDisabledValue" :disabled="true" style="width: 600px"/>
|
|
550
|
-
</FormGroup>
|
|
551
|
-
|
|
552
|
-
<h3 id="form-taginput">Tag Input</h3>
|
|
553
|
-
<FormGroup>
|
|
554
|
-
<label for="tagInput">Tags: {{ tagInputValue.join(', ') }}</label>
|
|
555
|
-
<TagInput id="tagInput" v-model="tagInputValue" placeholder="some tags" style="width: 600px"/>
|
|
556
|
-
</FormGroup>
|
|
557
|
-
|
|
558
|
-
<h3 id="form-checkbox">Checkbox</h3>
|
|
559
|
-
<div>
|
|
560
|
-
<Checkbox v-model="checkbox1Enabled" :label="checkbox1Enabled ? 'Enabled' : 'Disabled'" :disabled="true"/>
|
|
561
|
-
<Checkbox v-model="checkbox2Enabled" :label="checkbox2Enabled ? 'Enabled' : 'Disabled'"/>
|
|
562
|
-
<Checkbox v-model="checkbox2Enabled" label="Same as above"/>
|
|
563
|
-
</div>
|
|
564
|
-
|
|
565
|
-
<h3 id="form-radiobutton">Radiobutton</h3>
|
|
566
|
-
<div>
|
|
567
|
-
<p>Selected: <b>{{ radiobutton }}</b></p>
|
|
568
|
-
<Radiobutton v-model="radiobutton" value="one" name="radiobutton" label="Radiobutton 1"/>
|
|
569
|
-
<Radiobutton v-model="radiobutton" value="two" name="radiobutton" label="Radiobutton 2"/>
|
|
570
|
-
<Radiobutton v-model="radiobutton" value="three" name="radiobutton" label="Radiobutton 3" :disabled="true"/>
|
|
571
|
-
</div>
|
|
572
|
-
|
|
573
|
-
<h3 id="form-switch">Switch</h3>
|
|
574
|
-
<div>
|
|
575
|
-
<Switch v-model="switch2" label="disabled" :disabled="true"/>
|
|
576
|
-
<Switch v-model="switch1" label="Same as big" :disabled="false" @change="onSwitchChange"/>
|
|
577
|
-
<h1 style="margin-top: 10px;"><Switch v-model="switch1" :label="switch1 ? 'yes' : 'no'"/></h1>
|
|
578
|
-
</div>
|
|
579
|
-
|
|
580
|
-
<h3 id="form-group">Form Group</h3>
|
|
581
|
-
<div>
|
|
582
|
-
<FormGroup>
|
|
583
|
-
<label for="formGroupInput">Some Label</label>
|
|
584
|
-
<TextInput id="formGroupInput" />
|
|
585
|
-
</FormGroup>
|
|
586
|
-
</div>
|
|
587
|
-
|
|
588
|
-
<h3 id="input-group">Input Group</h3>
|
|
589
|
-
<div style="display: flex; gap: 10px">
|
|
590
|
-
<InputGroup>
|
|
591
|
-
<Button danger>Left</Button>
|
|
592
|
-
<TextInput />
|
|
593
|
-
</InputGroup>
|
|
594
|
-
|
|
595
|
-
<InputGroup>
|
|
596
|
-
<Button tool success icon="fa-solid fa-clipboard" />
|
|
597
|
-
<TextInput />
|
|
598
|
-
<Button tool icon="fa-solid fa-scissors" />
|
|
599
|
-
</InputGroup>
|
|
600
|
-
|
|
601
|
-
<InputGroup>
|
|
602
|
-
<TextInput />
|
|
603
|
-
<SingleSelect v-model="singleselectValue" :options="singleselectModel" optionLabel="display"/>
|
|
604
|
-
</InputGroup>
|
|
605
|
-
</div>
|
|
606
|
-
|
|
607
|
-
<h2 id="dialog">Dialog</h2>
|
|
608
|
-
<div style="display: flex; gap: 10px">
|
|
609
|
-
<Button @click="onButtonClick()">Open Dialog</Button>
|
|
610
|
-
<Button @click="onAskForConfirmation()">Confirm</Button>
|
|
611
|
-
<Button @click="onAskForString()">Prompt</Button>
|
|
612
|
-
</div>
|
|
613
|
-
|
|
614
|
-
<h2 id="popover">Popover</h2>
|
|
615
|
-
<div style="display: flex; gap: 10px">
|
|
616
|
-
<Popover ref="popover">
|
|
617
|
-
<div style="padding: 20px">
|
|
618
|
-
<div>This is some popover</div>
|
|
619
|
-
<br/>
|
|
620
|
-
<Button>no action here</Button>
|
|
621
|
-
</div>
|
|
622
|
-
</Popover>
|
|
623
|
-
<Button ref="popoverButton" @click="onPopover($refs.popover, $event, $refs.popoverButton.$el)">Open Popover</Button>
|
|
624
|
-
</div>
|
|
625
|
-
|
|
626
|
-
<h2 id="breadcrumb">Breadcrumb</h2>
|
|
627
|
-
<Breadcrumb :home="breadcrumbHomeItem" :items="breadcrumbItems"/>
|
|
628
|
-
|
|
629
|
-
<h2 id="singleselect">Singleselect</h2>
|
|
630
|
-
<div>
|
|
631
|
-
<p>disabled</p>
|
|
632
|
-
<SingleSelect v-model="singleselectValue" :options="singleselectModel" optionLabel="display" :disabled="true"/>
|
|
633
|
-
<p>value is the selected object</p>
|
|
634
|
-
<SingleSelect v-model="singleselectValue" :options="singleselectModel" optionLabel="display" :search-threshold="2"/> {{ singleselectValue }}
|
|
635
|
-
<p>With explicit :option-key, result is the key value not the object:</p>
|
|
636
|
-
<SingleSelect v-model="singleselectValueWithKey" :options="singleselectModel" optionLabel="display" optionKey="id" /> {{ singleselectValueWithKey }}
|
|
637
|
-
<p>No initial value</p>
|
|
638
|
-
<SingleSelect v-model="singleselectValueNoInit" :options="singleselectModel" optionLabel="display" optionKey="id" placeholder="Nothing yet selected"/> {{ singleselectValueNoInit }}
|
|
639
|
-
</div>
|
|
640
|
-
|
|
641
|
-
<h2 id="multiselect">Multiselect</h2>
|
|
642
|
-
<MultiSelect v-model="multiselectValue" :options="multiselectModel" optionLabel="display"/> {{ multiselectValue }}
|
|
643
|
-
<br/>
|
|
644
|
-
<p>Custom button template:</p>
|
|
645
|
-
<MultiSelect v-model="multiselectValueWithCustomLabel" :options="multiselectModel" :search-threshold="2" optionLabel="display" selected-label="Selected %n items"/> {{ multiselectValueWithCustomLabel }}
|
|
646
|
-
<br/>
|
|
647
|
-
<p>With option key:</p>
|
|
648
|
-
<MultiSelect v-model="multiselectValueWithOptionKey" :options="multiselectModel" option-key="id" optionLabel="display"/> {{ multiselectValueWithOptionKey }}
|
|
649
|
-
<br/>
|
|
650
|
-
<p>With option selectAll:</p>
|
|
651
|
-
<MultiSelect v-model="multiselectValueWithSelectAll" :options="multiselectModel" select-all-label="Select All" :search-threshold="2" option-key="id" optionLabel="display"/> {{ multiselectValueWithSelectAll }}
|
|
652
|
-
|
|
653
|
-
<h2 id="progressbar">Progress</h2>
|
|
654
|
-
<div style="width: 100%; max-width: 720px;">
|
|
655
|
-
<NumberInput v-model="progressValue"/>
|
|
656
|
-
<br/><br/>
|
|
657
|
-
<ProgressBar :value="progressValue" />
|
|
658
|
-
<br/>
|
|
659
|
-
<ProgressBar :value="progressValue" :busy="true" />
|
|
660
|
-
<br/>
|
|
661
|
-
<ProgressBar :value="progressValue">Custom label with {{ progressValue }}</ProgressBar>
|
|
662
|
-
<br/>
|
|
663
|
-
<ProgressBar mode="indeterminate" :show-label="false"/>
|
|
664
|
-
<br/>
|
|
665
|
-
<div style="display: flex; align-items: center;">
|
|
666
|
-
<ProgressBar :value="progressValue" style="flex-grow: 1;"></ProgressBar>
|
|
667
|
-
<Button danger small tool icon="fa-solid fa-xmark"></Button>
|
|
668
|
-
</div>
|
|
669
|
-
</div>
|
|
670
|
-
|
|
671
|
-
<h2 id="offlinebanner">Offline Banner</h2>
|
|
672
|
-
<OfflineBanner :active="offlineBannerActive"/>
|
|
673
|
-
<Button @click="offlineBannerActive = !offlineBannerActive">Toggle Offline Banner</Button>
|
|
674
|
-
|
|
675
|
-
<h2 id="notification">Notification</h2>
|
|
676
|
-
<p>
|
|
677
|
-
Place a single <code>Notification</code> DOM node in the top section of the app and use <code>window.pankow.notify('message')</code>
|
|
678
|
-
</p>
|
|
679
|
-
|
|
680
|
-
<div style="display: flex; gap: 10px">
|
|
681
|
-
<Button @click="onRaiseNotification('Informational Notification')">Raise</Button>
|
|
682
|
-
<Button @click="onRaiseNotification('Danger!!!', 'danger')">Raise Danger</Button>
|
|
683
|
-
<Button @click="onRaiseNotification('All good', 'success')">Raise Success</Button>
|
|
684
|
-
<Button @click="onRaiseNotification('Mildly important', 'secondary')">Raise Secondary</Button>
|
|
685
|
-
<Button @click="onRaisePersistentNotification('This is persistent')">Persitent</Button>
|
|
686
|
-
</div>
|
|
687
|
-
|
|
688
|
-
<p>Position:</p>
|
|
689
|
-
<div style="display: flex; gap: 10px">
|
|
690
|
-
<Button outline @click="notificationPosition = 'top-left'">top-left</Button>
|
|
691
|
-
<Button outline @click="notificationPosition = 'top-center'">top-center</Button>
|
|
692
|
-
<Button outline @click="notificationPosition = 'top-right'">top-right</Button>
|
|
693
|
-
<Button outline @click="notificationPosition = 'bottom-left'">bottom-left</Button>
|
|
694
|
-
<Button outline @click="notificationPosition = 'bottom-center'">bottom-center</Button>
|
|
695
|
-
<Button outline @click="notificationPosition = 'bottom-right'">bottom-right</Button>
|
|
696
|
-
</div>
|
|
697
|
-
|
|
698
|
-
<h2 id="tabview">Tab View</h2>
|
|
699
|
-
<h3>Top</h3>
|
|
700
|
-
<TabView ref="tabview" style="height: 150px; width: 100%; max-width: 800px;" :tabs="tabs" :default-active="Object.keys(tabs)[3]">
|
|
701
|
-
<template #tab0>Here some fruit</template>
|
|
702
|
-
<template #tab1>Two veggies <Button @click="onChangeTab('tab0')">Change back to fruit</Button></template>
|
|
703
|
-
<template #tab2>No meat today</template>
|
|
704
|
-
<template #tab3>A whole lot of beverages<img src="./logo.png" class="logo"/><span class="logo-text">ankow</span></template>
|
|
705
|
-
</TabView>
|
|
706
|
-
|
|
707
|
-
<h3>Left</h3>
|
|
708
|
-
<TabView ref="tabview" tab-position="left" style="height: 150px; width: 100%; max-width: 800px;" :tabs="tabs" :default-active="Object.keys(tabs)[3]">
|
|
709
|
-
<template #tab0>Here some fruit</template>
|
|
710
|
-
<template #tab1>Two veggies <Button @click="onChangeTab('tab0')">Change back to fruit</Button></template>
|
|
711
|
-
<template #tab2>No meat today</template>
|
|
712
|
-
<template #tab3>A whole lot of beverages<img src="./logo.png" class="logo"/><span class="logo-text">ankow</span></template>
|
|
713
|
-
</TabView>
|
|
714
|
-
|
|
715
|
-
<h2 id="tableview">Table View</h2>
|
|
716
|
-
<TableView style="max-height: 200px; width: 100%; max-width: 800px;" :columns="tableColumns" :model="tableModel">
|
|
717
|
-
<template #status="slotProps">{{ slotProps.status.index }} status template</template>
|
|
718
|
-
<template #action="slotProps"><Button :disabled="!(slotProps.status.index%2)">{{ slotProps.action }}</Button></template>
|
|
719
|
-
</TableView>
|
|
720
|
-
|
|
721
|
-
<DirectoryViewDemo id="directoryview"/>
|
|
722
|
-
|
|
723
|
-
<br/>
|
|
724
|
-
<br/>
|
|
725
|
-
<br/>
|
|
726
|
-
<br/>
|
|
727
|
-
</div>
|
|
728
|
-
</template>
|
|
729
|
-
<template #footer>
|
|
730
|
-
<div style="text-align: center;">Footer</div>
|
|
731
|
-
</template>
|
|
732
|
-
</MainLayout>
|
|
733
|
-
</div>
|
|
734
|
-
|
|
735
|
-
</template>
|
|
736
|
-
|
|
737
|
-
<style>
|
|
738
|
-
|
|
739
|
-
#app {
|
|
740
|
-
height: 100%;
|
|
741
|
-
overflow: hidden;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
h2 {
|
|
745
|
-
margin-top: 50px;
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
.main-content {
|
|
749
|
-
display: flex;
|
|
750
|
-
width: 100%;
|
|
751
|
-
height: 100%;
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
.side-bar {
|
|
755
|
-
color: white;
|
|
756
|
-
background-color: var(--pankow-color-dark);
|
|
757
|
-
padding: 20px;
|
|
758
|
-
margin-right: 40px;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
.side-bar a {
|
|
762
|
-
padding: 10px;
|
|
763
|
-
color: white !important;
|
|
764
|
-
border-left: 2px transparent solid;
|
|
765
|
-
font-size: 16px;
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
.side-bar a.child {
|
|
769
|
-
padding-left: 15px;
|
|
770
|
-
font-size: 12px;
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
.side-bar a:hover {
|
|
774
|
-
border-left: 2px white solid;
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
.logo {
|
|
778
|
-
width: 100px;
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
.logo-text {
|
|
782
|
-
margin-left: -50px;
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
@media (prefers-color-scheme: dark) {
|
|
786
|
-
.main-content {
|
|
787
|
-
background-color: black;
|
|
788
|
-
color: var(--pankow-color-light-dark);
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
</style>
|