@cloudron/pankow 4.2.2 → 4.2.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/components/MenuItem.vue +2 -2
- package/components/MenuItemLink.vue +1 -1
- package/components/{Radiobutton.vue → RadioButton.vue} +12 -28
- package/components/SectionItem.vue +113 -0
- package/index.js +12 -6
- package/package.json +2 -2
- package/types/index.d.ts +1 -1
- /package/components/{Breadcrumb.vue → BreadCrumb.vue} +0 -0
- /package/components/{Checkbox.vue → CheckBox.vue} +0 -0
package/components/MenuItem.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
|
|
3
3
|
import { computed } from 'vue';
|
|
4
|
-
import
|
|
4
|
+
import CheckBox from './CheckBox.vue';
|
|
5
5
|
import Icon from './Icon.vue';
|
|
6
6
|
|
|
7
7
|
const emit = defineEmits(['activated']);
|
|
@@ -43,7 +43,7 @@ function onActivated() {
|
|
|
43
43
|
|
|
44
44
|
<template>
|
|
45
45
|
<div class="pankow-menu-item" :class="{'pankow-menu-item-disabled': isDisabled }" @click.stop="onActivated" :separator="item.separator" v-if="isVisible" tabindex="0" @keydown.enter.stop="onActivated" @keydown.space.stop="onActivated">
|
|
46
|
-
<
|
|
46
|
+
<CheckBox v-model="item.checked" v-if="item.checkbox" style="margin-right: 4px; display: inline-flex;"/>
|
|
47
47
|
<span v-if="!item.separator" :style="{ width: (hasIcons && !item.checkbox) ? '29px' : 0 }"><Icon v-show="hasIcons" :icon="item.icon"/></span>{{ item.label }}
|
|
48
48
|
<div class="pankow-menu-item-separator-line" v-if="item.separator"></div>
|
|
49
49
|
</div>
|
|
@@ -7,37 +7,21 @@
|
|
|
7
7
|
</span>
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
|
-
<script>
|
|
10
|
+
<script setup>
|
|
11
11
|
|
|
12
12
|
import { uuidv4 } from '../utils.js';
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
computed: {
|
|
26
|
-
internalValue: {
|
|
27
|
-
get() {
|
|
28
|
-
return this.modelValue
|
|
29
|
-
},
|
|
30
|
-
set(internalValue) {
|
|
31
|
-
this.$emit('update:modelValue', internalValue)
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
data () {
|
|
36
|
-
return {
|
|
37
|
-
internalId: uuidv4()
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
};
|
|
14
|
+
defineProps({
|
|
15
|
+
value: String,
|
|
16
|
+
label: String,
|
|
17
|
+
id: String,
|
|
18
|
+
name: String,
|
|
19
|
+
disabled: null
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const internalValue = defineModel({ type: String });
|
|
23
|
+
|
|
24
|
+
const internalId = uuidv4();
|
|
41
25
|
|
|
42
26
|
</script>
|
|
43
27
|
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
|
|
3
|
+
import { useTemplateRef, ref, onMounted, onUnmounted } from 'vue';
|
|
4
|
+
|
|
5
|
+
const mobileFilterBar = useTemplateRef('mobileFilterBar');
|
|
6
|
+
|
|
7
|
+
const isMobile = ref(false);
|
|
8
|
+
|
|
9
|
+
defineProps({
|
|
10
|
+
title: String,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
function checkForMobile() {
|
|
14
|
+
isMobile.value = window.innerWidth <= 576;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
onMounted(() => {
|
|
18
|
+
checkForMobile();
|
|
19
|
+
window.addEventListener('resize', checkForMobile);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
onUnmounted(() => {
|
|
23
|
+
window.removeEventListener('resize', checkForMobile);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<div class="pankow-section-item">
|
|
30
|
+
<h2 class="pankow-section-item-header">
|
|
31
|
+
<div>
|
|
32
|
+
<div class="pankow-section-item-header-title-text">
|
|
33
|
+
<slot name="header-title">{{ title }}</slot>
|
|
34
|
+
<slot name="header-title-extra"></slot>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
<div>
|
|
38
|
+
<Teleport :disabled="!isMobile" :to="mobileFilterBar">
|
|
39
|
+
<slot name="filter-bar"></slot>
|
|
40
|
+
</Teleport>
|
|
41
|
+
<slot name="header-buttons"></slot>
|
|
42
|
+
</div>
|
|
43
|
+
</h2>
|
|
44
|
+
<div class="pankow-section-item-mobile-filter-bar" v-show="isMobile && $slots['filter-bar']" ref="mobileFilterBar"></div>
|
|
45
|
+
<hr class="pankow-section-item-divider"/>
|
|
46
|
+
<div class="pankow-section-item-body">
|
|
47
|
+
<slot></slot>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<style>
|
|
53
|
+
|
|
54
|
+
.pankow-section-item {
|
|
55
|
+
margin-bottom: 20px;
|
|
56
|
+
position: relative;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.pankow-section-item-header {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
justify-content: space-between;
|
|
63
|
+
align-items: center;
|
|
64
|
+
gap: 5px;
|
|
65
|
+
padding-left: 15px;
|
|
66
|
+
padding-right: 15px;
|
|
67
|
+
padding-top: 5px;
|
|
68
|
+
margin-top: 0;
|
|
69
|
+
margin-bottom: 0;
|
|
70
|
+
font-size: 24px;
|
|
71
|
+
font-weight: var(--pankow-font-weight-bold);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.pankow-section-item-header > div {
|
|
75
|
+
display: flex;
|
|
76
|
+
gap: 6px;
|
|
77
|
+
flex-wrap: wrap;
|
|
78
|
+
align-items: center;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.pankow-section-item-header-title-text {
|
|
82
|
+
display: flex;
|
|
83
|
+
gap: 6px;
|
|
84
|
+
align-items: baseline;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.pankow-section-item-divider {
|
|
88
|
+
border: 0;
|
|
89
|
+
border-top: 1px solid #d8dee4;
|
|
90
|
+
margin-top: 10px;
|
|
91
|
+
margin-bottom: 5px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@media (prefers-color-scheme: dark) {
|
|
95
|
+
.pankow-section-item-divider {
|
|
96
|
+
border-top-color: #495057;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.pankow-section-item-body {
|
|
101
|
+
position: relative;
|
|
102
|
+
margin-bottom: 15px;
|
|
103
|
+
padding: 10px 15px 25px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.pankow-section-item-mobile-filter-bar {
|
|
107
|
+
display: flex;
|
|
108
|
+
gap: 6px;
|
|
109
|
+
flex-wrap: wrap;
|
|
110
|
+
margin: 10px 15px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
</style>
|
package/index.js
CHANGED
|
@@ -7,12 +7,12 @@ import './style.css';
|
|
|
7
7
|
|
|
8
8
|
// Order of import matters due to css rule matching!
|
|
9
9
|
import BottomBar from './components/BottomBar.vue';
|
|
10
|
-
import
|
|
10
|
+
import BreadCrumb from './components/BreadCrumb.vue';
|
|
11
11
|
import Button from './components/Button.vue';
|
|
12
12
|
import ButtonGroup from './components/ButtonGroup.vue';
|
|
13
13
|
import ClipboardAction from './components/ClipboardAction.vue';
|
|
14
14
|
import ClipboardButton from './components/ClipboardButton.vue';
|
|
15
|
-
import
|
|
15
|
+
import CheckBox from './components/CheckBox.vue';
|
|
16
16
|
import DateTimeInput from './components/DateTimeInput.vue';
|
|
17
17
|
import Dialog from './components/Dialog.vue';
|
|
18
18
|
import DirectoryView from './components/DirectoryView.vue';
|
|
@@ -34,7 +34,8 @@ import OfflineBanner from './components/OfflineBanner.vue';
|
|
|
34
34
|
import PasswordInput from './components/PasswordInput.vue';
|
|
35
35
|
import Popover from './components/Popover.vue';
|
|
36
36
|
import ProgressBar from './components/ProgressBar.vue';
|
|
37
|
-
import
|
|
37
|
+
import RadioButton from './components/RadioButton.vue';
|
|
38
|
+
import SectionItem from './components/SectionItem.vue';
|
|
38
39
|
import SideBar from './components/SideBar.vue';
|
|
39
40
|
import SplitLayout from './components/SplitLayout.vue';
|
|
40
41
|
import Spinner from './components/Spinner.vue';
|
|
@@ -57,12 +58,12 @@ import fallbackImage from './fallbackImage.js';
|
|
|
57
58
|
|
|
58
59
|
export {
|
|
59
60
|
BottomBar,
|
|
60
|
-
|
|
61
|
+
BreadCrumb,
|
|
61
62
|
Button,
|
|
62
63
|
ButtonGroup,
|
|
63
64
|
ClipboardAction,
|
|
64
65
|
ClipboardButton,
|
|
65
|
-
|
|
66
|
+
CheckBox,
|
|
66
67
|
DateTimeInput,
|
|
67
68
|
Dialog,
|
|
68
69
|
DirectoryView,
|
|
@@ -85,7 +86,8 @@ export {
|
|
|
85
86
|
PasswordInput,
|
|
86
87
|
Popover,
|
|
87
88
|
ProgressBar,
|
|
88
|
-
|
|
89
|
+
RadioButton,
|
|
90
|
+
SectionItem,
|
|
89
91
|
SideBar,
|
|
90
92
|
SplitLayout,
|
|
91
93
|
Spinner,
|
|
@@ -105,3 +107,7 @@ export {
|
|
|
105
107
|
fallbackImage,
|
|
106
108
|
utils,
|
|
107
109
|
};
|
|
110
|
+
|
|
111
|
+
export { CheckBox as Checkbox }; /* deprecated */
|
|
112
|
+
export { RadioButton as Radiobutton }; /* deprecated */
|
|
113
|
+
export { BreadCrumb as Breadcrumb }; /* deprecated */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudron/pankow",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "4.2.
|
|
4
|
+
"version": "4.2.3",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"types": "types/index.d.ts",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
34
34
|
"highlight.js": "^11.11.1",
|
|
35
35
|
"typescript": "^6.0.3",
|
|
36
|
-
"vite": "^8.1.
|
|
36
|
+
"vite": "^8.1.3",
|
|
37
37
|
"vue": "^3.5.39",
|
|
38
38
|
"vue-router": "^5.1.0"
|
|
39
39
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ import gestures from './gestures.js';
|
|
|
3
3
|
import tooltip from './tooltip.js';
|
|
4
4
|
import fallbackImage from './fallbackImage.js';
|
|
5
5
|
import utils from './utils.js';
|
|
6
|
-
export { BottomBar,
|
|
6
|
+
export { BottomBar, BreadCrumb, Button, ButtonGroup, ClipboardAction, ClipboardButton, CheckBox, DateTimeInput, Dialog, DirectoryView, EmailInput, FileUploader, FormGroup, InputGroup, Icon, InputDialog, LoginView, MainLayout, MaskedInput, Menu, MenuItem, SingleSelect, MultiSelect, Notification, NumberInput, OfflineBanner, PasswordInput, Popover, ProgressBar, RadioButton, SectionItem, SideBar, SplitLayout, Spinner, Switch, TableView, TableViewActionBar, TabView, TagInput, TextInput, TextInputRaw, TopBar, TreeView, fetcher, gestures, tooltip, fallbackImage, utils, CheckBox as Checkbox, RadioButton as Radiobutton, BreadCrumb as Breadcrumb };
|
|
File without changes
|
|
File without changes
|