@appscode/design-system 1.1.0 → 2.0.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.
- package/base/_video-player.scss +65 -0
- package/base/utilities/_all.scss +7 -5
- package/base/utilities/_colors.scss +377 -0
- package/base/utilities/_customize-bulma.scss +23 -27
- package/base/utilities/_extended.scss +39 -0
- package/base/utilities/{_default.scss → _global.scss} +192 -333
- package/base/utilities/_layouts.scss +19 -0
- package/base/utilities/_mixin.scss +11 -11
- package/base/utilities/_spacing.scss +96 -0
- package/base/utilities/_typography.scss +56 -24
- package/components/_ac-alert-box.scss +205 -263
- package/components/_ac-calendar.scss +4 -4
- package/components/_ac-code-highlight.scss +13 -16
- package/components/_ac-content-layout.scss +165 -165
- package/components/_ac-drag.scss +13 -13
- package/components/_ac-modal.scss +212 -212
- package/components/_ac-options.scss +122 -123
- package/components/_ac-select-box.scss +10 -10
- package/components/_ac-table.scss +503 -502
- package/components/_ac-tabs.scss +65 -61
- package/components/_ac-tags.scss +116 -116
- package/components/_accordion.scss +117 -0
- package/components/_add-card.scss +3 -3
- package/components/_all.scss +35 -28
- package/components/_app-drawer.scss +0 -134
- package/components/_breadcumb.scss +0 -71
- package/components/_buttons.scss +779 -779
- package/components/_card-body-wrapper.scss +5 -5
- package/components/_dashboard-header.scss +0 -115
- package/components/_direct-deploy.scss +8 -8
- package/components/_getkeeper.scss +110 -0
- package/components/_go-to-top.scss +1 -1
- package/components/_graph.scss +10 -10
- package/components/_image-upload.scss +9 -9
- package/components/_input-card.scss +232 -0
- package/components/_input.scss +573 -0
- package/components/_left-sidebar-menu.scss +452 -587
- package/components/_monaco-editor.scss +2 -2
- package/components/{_ac-multi-select.scss → _multi-select.scss} +89 -251
- package/components/_navbar.scss +786 -752
- package/components/_nested-list.scss +3 -3
- package/components/_overview-info.scss +10 -10
- package/components/_overview-page.scss +4 -4
- package/components/_pagination.scss +106 -124
- package/components/_payment-card.scss +21 -21
- package/components/_preloader.scss +1 -1
- package/components/_preview-modal.scss +18 -18
- package/components/_pricing-table.scss +14 -14
- package/components/_progress-bar.scss +73 -86
- package/components/_subscription-card.scss +22 -24
- package/components/_table-of-content.scss +8 -8
- package/components/{_ac-terminal.scss → _terminal.scss} +114 -81
- package/components/_tfa.scss +9 -9
- package/components/_transitions.scss +35 -0
- package/components/_widget-menu.scss +252 -257
- package/components/_wizard.scss +518 -793
- package/components/ac-toaster/_ac-toasted.scss +11 -16
- package/components/bbum/_activities-header.scss +1 -1
- package/components/bbum/_card-team.scss +12 -12
- package/components/bbum/_information-center.scss +21 -23
- package/components/bbum/_left-sidebar.scss +8 -8
- package/components/bbum/_mobile-desktop.scss +16 -21
- package/components/bbum/_post.scss +5 -5
- package/components/bbum/_sign-up-notification.scss +10 -10
- package/components/bbum/_single-post-preview.scss +29 -29
- package/components/bbum/_user-profile.scss +10 -10
- package/components/ui-builder/_ui-builder.scss +221 -31
- package/components/ui-builder/_vue-open-api.scss +565 -7
- package/icons/close-icon.svg +3 -0
- package/layouts/_code-preview.scss +17 -18
- package/main.scss +26 -10
- package/package.json +1 -1
- package/plugins/theme.js +11 -9
- package/plugins/vue-toaster.js +1 -1
- package/vue-components/images/icons/cluster-icon.svg +10 -0
- package/vue-components/images/icons/org-icon.svg +10 -0
- package/vue-components/plugins/time-convert.js +49 -0
- package/vue-components/types/cluster.ts +6 -0
- package/vue-components/types/importFlow.ts +16 -0
- package/vue-components/types/notification.ts +6 -0
- package/vue-components/types/previewYaml.ts +8 -0
- package/vue-components/types/table.ts +55 -0
- package/vue-components/types/theme.ts +10 -0
- package/vue-components/types/user.ts +22 -0
- package/vue-components/v2/banner/Banner.vue +1 -1
- package/vue-components/v2/button/Buttons.vue +1 -1
- package/vue-components/v2/card/Card.vue +1 -1
- package/vue-components/v2/card/OverviewCards.vue +17 -2
- package/vue-components/v2/content/ContentTable.vue +14 -9
- package/vue-components/v2/editor/FilteredFileEditor.vue +2 -2
- package/vue-components/v2/editor/ResourceKeyValueEditor.vue +21 -21
- package/vue-components/v2/icons/Ellipsis.vue +2 -1
- package/vue-components/v2/modal/Modal.vue +2 -6
- package/vue-components/v2/navbar/Appdrawer.vue +37 -12
- package/vue-components/v2/navbar/Navbar.vue +3 -3
- package/vue-components/v2/navbar/NavbarItem.vue +3 -1
- package/vue-components/v2/navbar/NavbarItemContent.vue +1 -1
- package/vue-components/v2/navbar/User.vue +5 -22
- package/vue-components/v2/pagination/Pagination.vue +66 -0
- package/vue-components/v2/sidebar/SidebarItem.vue +10 -7
- package/{components/_ac-accordion.scss → vue-components/v3/accordion/Accordion.vue} +40 -6
- package/vue-components/v3/alert/Alert.vue +238 -0
- package/vue-components/v3/alert/Toast.vue +79 -0
- package/vue-components/v3/banner/Banner.vue +10 -0
- package/vue-components/v3/breadcrumbs/Breadcrumb.vue +166 -0
- package/vue-components/v3/button/Button.vue +110 -57
- package/vue-components/v3/button/Buttons.vue +22 -0
- package/vue-components/v3/button/DownloadBtn.vue +31 -0
- package/vue-components/v3/cards/Card.vue +32 -0
- package/vue-components/v3/cards/CardContent.vue +7 -0
- package/vue-components/v3/cards/CardHeader.vue +14 -0
- package/vue-components/v3/cards/Cards.vue +7 -0
- package/vue-components/v3/cards/Cluster.vue +159 -0
- package/vue-components/v3/cards/Counter.vue +39 -0
- package/vue-components/v3/cards/FeatureCard.vue +67 -0
- package/vue-components/v3/cards/FeatureCards.vue +6 -0
- package/vue-components/v3/cards/InfoCard.vue +242 -0
- package/vue-components/v3/cards/Monitoring.vue +90 -0
- package/vue-components/v3/cards/OrgClusterCard.vue +86 -0
- package/vue-components/v3/cards/OverviewCard.vue +28 -0
- package/vue-components/v3/cards/OverviewCards.vue +39 -0
- package/vue-components/v3/cards/Payment.vue +62 -0
- package/vue-components/v3/cards/Vendor.vue +89 -0
- package/vue-components/v3/content/ContentHeader.vue +39 -30
- package/vue-components/v3/content/ContentLayout.vue +20 -0
- package/vue-components/v3/content/ContentTable.vue +44 -58
- package/vue-components/v3/dropdown/DropdownAction.vue +95 -0
- package/vue-components/v3/dropdown/DropdownDivider.vue +2 -0
- package/vue-components/v3/dropdown/DropdownItem.vue +2 -0
- package/vue-components/v3/dropdown/DropdownMenu.vue +85 -91
- package/vue-components/v3/editor/Editor.vue +117 -115
- package/vue-components/v3/editor/FilteredFileEditor.vue +325 -128
- package/vue-components/v3/editor/ResourceKeyValueEditor.vue +73 -94
- package/vue-components/v3/footer/FooterArea.vue +40 -0
- package/vue-components/v3/footer/FooterItem.vue +32 -0
- package/vue-components/v3/footer/FooterItems.vue +15 -0
- package/vue-components/v3/footer/Info.vue +25 -0
- package/vue-components/v3/footer/Status.vue +43 -0
- package/vue-components/v3/footer/Usage.vue +34 -0
- package/vue-components/v3/form/Form.vue +24 -36
- package/vue-components/v3/form/FormFooter.vue +24 -0
- package/vue-components/v3/form/FormFooterControl.vue +7 -0
- package/vue-components/v3/form/FormFooterControls.vue +7 -0
- package/vue-components/v3/form-fields/AcSingleInput.vue +21 -0
- package/vue-components/v3/form-fields/FileUpload.vue +89 -0
- package/vue-components/v3/form-fields/Input.vue +19 -15
- package/vue-components/v3/header/Header.vue +120 -26
- package/vue-components/v3/header/HeaderItem.vue +18 -0
- package/vue-components/v3/header/HeaderItems.vue +4 -0
- package/vue-components/v3/icons/Ellipsis.vue +2 -0
- package/vue-components/v3/loaders/ClusterSwitcherLoader.vue +13 -0
- package/vue-components/v3/loaders/InfoCardLoader.vue +19 -0
- package/vue-components/v3/loaders/ResourceLoader.vue +4 -12
- package/vue-components/v3/loaders/SidebarLoader.vue +4 -12
- package/vue-components/v3/loaders/SingleInfoCardLoader.vue +24 -0
- package/vue-components/v3/modal/Modal.vue +294 -95
- package/vue-components/v3/modals/DeleteConfirmationModal.vue +37 -50
- package/vue-components/v3/modals/JsonShowModal.vue +63 -68
- package/vue-components/v3/navbar/Appdrawer.vue +198 -51
- package/vue-components/v3/navbar/Navbar.vue +139 -0
- package/vue-components/v3/navbar/NavbarItem.vue +103 -0
- package/vue-components/v3/navbar/NavbarItemContent.vue +282 -0
- package/vue-components/v3/navbar/Notification.vue +207 -0
- package/vue-components/v3/navbar/ThemeMode.vue +128 -112
- package/vue-components/v3/navbar/User.vue +394 -267
- package/vue-components/v3/notification/AlertBox.vue +266 -39
- package/vue-components/v3/notification/Notification.vue +50 -44
- package/vue-components/v3/notification/NotificationItem.vue +51 -19
- package/vue-components/v3/option-dots/Options.vue +197 -0
- package/vue-components/v3/pagination/Pagination.vue +216 -102
- package/vue-components/v3/preloader/Preloader.vue +23 -0
- package/vue-components/v3/searchbars/SearchBar.vue +50 -34
- package/vue-components/v3/sidebar/AccentColorPicker.vue +97 -0
- package/vue-components/v3/sidebar/ClusterSwitcher.vue +71 -86
- package/vue-components/v3/sidebar/Sidebar.vue +239 -0
- package/vue-components/v3/sidebar/SidebarBody.vue +14 -0
- package/vue-components/v3/sidebar/SidebarFooter.vue +89 -0
- package/vue-components/v3/sidebar/SidebarHeader.vue +131 -0
- package/vue-components/v3/sidebar/SidebarItem.vue +62 -0
- package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +101 -104
- package/vue-components/v3/sidebar/SidebarMenuList.vue +9 -0
- package/vue-components/v3/sidebar/Steps.vue +152 -0
- package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabs.vue +204 -0
- package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabsLayout.vue +44 -0
- package/vue-components/v3/sidebar/sidebar-tabs/TabsContent.vue +99 -0
- package/vue-components/v3/tab/TabItem.vue +10 -12
- package/vue-components/v3/tab/Tabs.vue +36 -0
- package/vue-components/v3/tab/TabsBody.vue +7 -0
- package/vue-components/v3/table/EmptyTableInfo.vue +8 -0
- package/vue-components/v3/table/FakeTableCell.vue +22 -31
- package/vue-components/v3/table/InfoTable.vue +89 -61
- package/vue-components/v3/table/MultiInfoTable.vue +72 -95
- package/vue-components/v3/table/Table.vue +596 -157
- package/vue-components/v3/table/TableCell.vue +13 -24
- package/vue-components/v3/table/TableContainer.vue +50 -28
- package/vue-components/v3/table/TableRow.vue +65 -87
- package/vue-components/v3/table/table-cell/ArrayCell.vue +94 -103
- package/vue-components/v3/table/table-cell/CellValue.vue +74 -106
- package/vue-components/v3/table/table-cell/GenericCell.vue +43 -42
- package/vue-components/v3/table/table-cell/ObjectCell.vue +91 -101
- package/vue-components/v3/table/table-cell/ValueWithModal.vue +22 -31
- package/vue-components/v3/tabs/EditorTabs.vue +18 -24
- package/vue-components/v3/tag/Tag.vue +16 -12
- package/vue-components/v3/tag/Tags.vue +7 -0
- package/base/utilities/_derived-variables.scss +0 -25
- package/base/utilities/_initial-variables.scss +0 -215
- package/base/utilities/dark-theme.scss +0 -26
- package/components/_ac-card.scss +0 -597
- package/components/_ac-input.scss +0 -876
- package/mixins/stickyContent.js +0 -141
- package/plugins/caching.ts +0 -243
- package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +0 -92
- package/vue-components/v3/modals/LongRunningTasksModal.vue +0 -400
- package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +0 -148
- /package/components/{_ac-report.scss → _report.scss} +0 -0
|
@@ -1,12 +1,113 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, ref, watch } from "vue";
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
hideRowsPerPageSelection?: boolean;
|
|
6
|
+
totalNoOfItems?: number;
|
|
7
|
+
itemsPerPage?: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
11
|
+
hideRowsPerPageSelection: false,
|
|
12
|
+
totalNoOfItems: 0,
|
|
13
|
+
itemsPerPage: 5,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const emit = defineEmits(["pagination:pagechange", "pagination:countchange"]);
|
|
17
|
+
|
|
18
|
+
const activePageNo = ref(1);
|
|
19
|
+
const selectedItemCountPerPage = computed({
|
|
20
|
+
get() {
|
|
21
|
+
return props.itemsPerPage;
|
|
22
|
+
},
|
|
23
|
+
set(n) {
|
|
24
|
+
activePageNo.value = 1;
|
|
25
|
+
emit("pagination:countchange", n);
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const noOfPages = computed(() => {
|
|
30
|
+
return Math.ceil(props.totalNoOfItems / selectedItemCountPerPage.value);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const noOfPageNos = computed(() => {
|
|
34
|
+
return Math.min(noOfPages.value, 5);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const pageRange = computed(() => {
|
|
38
|
+
let o = { start: 1, end: 0 };
|
|
39
|
+
if (noOfPageNos.value < 5) {
|
|
40
|
+
o.start = 1;
|
|
41
|
+
o.end = noOfPageNos.value;
|
|
42
|
+
} else {
|
|
43
|
+
if (activePageNo.value < 3) {
|
|
44
|
+
o.start = 1;
|
|
45
|
+
o.end = 5;
|
|
46
|
+
} else if (activePageNo.value >= noOfPages.value - 2) {
|
|
47
|
+
o.start = noOfPages.value - 4;
|
|
48
|
+
o.end = noOfPages.value;
|
|
49
|
+
} else {
|
|
50
|
+
o.start = activePageNo.value - 2;
|
|
51
|
+
o.end = activePageNo.value + 2;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return o;
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const pages = computed(() => {
|
|
58
|
+
let ar = [];
|
|
59
|
+
let start = pageRange.value.start;
|
|
60
|
+
let end = pageRange.value.end;
|
|
61
|
+
for (let i = start; i <= end; i++) {
|
|
62
|
+
ar.push(i);
|
|
63
|
+
}
|
|
64
|
+
return ar;
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
const itemsRange = computed(() => {
|
|
68
|
+
let start = (activePageNo.value - 1) * selectedItemCountPerPage.value;
|
|
69
|
+
let end = Math.min(
|
|
70
|
+
activePageNo.value * selectedItemCountPerPage.value,
|
|
71
|
+
props.totalNoOfItems
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
return { start, end };
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
const showPagination = computed(() => {
|
|
78
|
+
return itemsRange.value.end > itemsRange.value.start;
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
const prevPage = () => {
|
|
82
|
+
activePageNo.value = Math.max(activePageNo.value - 1, 1);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const changePage = (page: number) => {
|
|
86
|
+
activePageNo.value = page;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const nextPage = () => {
|
|
90
|
+
activePageNo.value = Math.min(activePageNo.value + 1, noOfPages.value);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
watch(
|
|
94
|
+
itemsRange,
|
|
95
|
+
(n) => {
|
|
96
|
+
emit("pagination:pagechange", n);
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
deep: true,
|
|
100
|
+
immediate: true,
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
</script>
|
|
104
|
+
|
|
1
105
|
<template>
|
|
2
106
|
<div class="level inner-table-pagination" v-show="showPagination">
|
|
3
107
|
<div class="pagination-filter level-left">
|
|
4
108
|
<div
|
|
5
109
|
class="level-item"
|
|
6
|
-
v-show="
|
|
7
|
-
!hideRowsPerPageSelection &&
|
|
8
|
-
totalNoOfItems > preSelectedItemsCountPerPage
|
|
9
|
-
"
|
|
110
|
+
v-show="!hideRowsPerPageSelection && totalNoOfItems > itemsPerPage"
|
|
10
111
|
>
|
|
11
112
|
<label>Rows per page</label>
|
|
12
113
|
<select
|
|
@@ -64,109 +165,122 @@
|
|
|
64
165
|
</nav>
|
|
65
166
|
</div>
|
|
66
167
|
</template>
|
|
168
|
+
<style lang="scss" scoped>
|
|
169
|
+
.inner-table-pagination {
|
|
170
|
+
padding: 4px 20px;
|
|
171
|
+
}
|
|
67
172
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
props: {
|
|
73
|
-
hideRowsPerPageSelection: {
|
|
74
|
-
type: Boolean,
|
|
75
|
-
default: false,
|
|
76
|
-
},
|
|
77
|
-
totalNoOfItems: {
|
|
78
|
-
type: Number,
|
|
79
|
-
default: 0,
|
|
80
|
-
},
|
|
81
|
-
preSelectedItemsCountPerPage: {
|
|
82
|
-
type: Number,
|
|
83
|
-
default: 5,
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
emits: ["pagination:pagechange"],
|
|
173
|
+
.pagination-item {
|
|
174
|
+
ul {
|
|
175
|
+
li {
|
|
176
|
+
display: inline-block;
|
|
87
177
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
178
|
+
a {
|
|
179
|
+
display: block;
|
|
180
|
+
width: 20px;
|
|
181
|
+
text-align: center;
|
|
182
|
+
font-size: 13px;
|
|
183
|
+
font-weight: 500;
|
|
184
|
+
border-radius: 4px;
|
|
185
|
+
border: 1px solid $primary-90;
|
|
186
|
+
color: $primary;
|
|
187
|
+
margin-left: 4px;
|
|
94
188
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
o.start = this.noOfPages - 4;
|
|
113
|
-
o.end = this.noOfPages;
|
|
114
|
-
} else {
|
|
115
|
-
o.start = this.activePageNo - 2;
|
|
116
|
-
o.end = this.activePageNo + 2;
|
|
189
|
+
&:hover {
|
|
190
|
+
background-color: $primary !important;
|
|
191
|
+
color: $white-100;
|
|
192
|
+
border: 1px solid $primary-90;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&.previous {
|
|
196
|
+
background-color: $primary-97;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&.next {
|
|
200
|
+
background-color: $primary-97;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
&.is-current {
|
|
204
|
+
background-color: $primary;
|
|
205
|
+
color: $white-100;
|
|
117
206
|
}
|
|
118
207
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
let ar = [];
|
|
123
|
-
let start = this.pageRange.start;
|
|
124
|
-
let end = this.pageRange.end;
|
|
125
|
-
for (let i = start; i <= end; i++) {
|
|
126
|
-
ar.push(i);
|
|
127
|
-
}
|
|
128
|
-
return ar;
|
|
129
|
-
},
|
|
130
|
-
itemsRange() {
|
|
131
|
-
let start = (this.activePageNo - 1) * this.selectedItemCountPerPage;
|
|
132
|
-
let end = Math.min(
|
|
133
|
-
this.activePageNo * this.selectedItemCountPerPage,
|
|
134
|
-
this.totalNoOfItems
|
|
135
|
-
);
|
|
136
|
-
|
|
137
|
-
return { start, end };
|
|
138
|
-
},
|
|
139
|
-
showPagination() {
|
|
140
|
-
return this.itemsRange.end > this.itemsRange.start;
|
|
141
|
-
},
|
|
142
|
-
},
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
143
211
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
212
|
+
.counting-page,
|
|
213
|
+
.pagination-filter {
|
|
214
|
+
color: $primary-30;
|
|
215
|
+
font-size: 12px;
|
|
147
216
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
this.activePageNo = page;
|
|
154
|
-
},
|
|
155
|
-
nextPage() {
|
|
156
|
-
this.activePageNo = Math.min(this.activePageNo + 1, this.noOfPages);
|
|
157
|
-
},
|
|
158
|
-
},
|
|
217
|
+
span {
|
|
218
|
+
font-weight: 500;
|
|
219
|
+
padding: 0 4px;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
159
222
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
223
|
+
.pagination-filter {
|
|
224
|
+
select {
|
|
225
|
+
background-color: $primary-97;
|
|
226
|
+
border: 1px solid $primary-90;
|
|
227
|
+
border-radius: 2px;
|
|
228
|
+
margin-left: 4px;
|
|
229
|
+
height: 22px;
|
|
230
|
+
padding: 0 4px;
|
|
231
|
+
|
|
232
|
+
&:focus,
|
|
233
|
+
&:active,
|
|
234
|
+
&:focus-visible {
|
|
235
|
+
border: 1px solid $primary;
|
|
236
|
+
outline: none;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// .counting-page {
|
|
242
|
+
// color: $primary-20;
|
|
243
|
+
// font-size: 12px;
|
|
244
|
+
|
|
245
|
+
// span {
|
|
246
|
+
// color: $primary-10;
|
|
247
|
+
// padding: 0 4px;
|
|
248
|
+
// font-weight: 500;
|
|
249
|
+
// }
|
|
250
|
+
// }
|
|
251
|
+
|
|
252
|
+
// .pagination-filter {
|
|
253
|
+
// border-radius: 4px;
|
|
254
|
+
// height: 20px;
|
|
255
|
+
// font-size: 11px;
|
|
256
|
+
// background-color: $white-100;
|
|
257
|
+
// color: $primary-20;
|
|
258
|
+
// &:focus-visible {
|
|
259
|
+
// outline: none;
|
|
260
|
+
// }
|
|
261
|
+
// select {
|
|
262
|
+
// border: 1px solid
|
|
263
|
+
// hsla(
|
|
264
|
+
// var(--hsl-hue),
|
|
265
|
+
// var(--hsl-saturation),
|
|
266
|
+
// calc(var(--hsl-lightness) - 5%),
|
|
267
|
+
// 1
|
|
268
|
+
// );
|
|
269
|
+
// }
|
|
270
|
+
|
|
271
|
+
// label {
|
|
272
|
+
// color: $black-40;
|
|
273
|
+
// padding-right: 5px;
|
|
274
|
+
// display: inline-block;
|
|
275
|
+
// font-size: 13px;
|
|
276
|
+
// }
|
|
277
|
+
// }
|
|
278
|
+
|
|
279
|
+
// .is-dark-theme {
|
|
280
|
+
// .pagination-filter {
|
|
281
|
+
// label {
|
|
282
|
+
// $black-40: $primary-20;
|
|
283
|
+
// }
|
|
284
|
+
// }
|
|
285
|
+
// }
|
|
286
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
showSpinner?: boolean;
|
|
4
|
+
message?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
withDefaults(defineProps<Props>(), {
|
|
8
|
+
showSpinner: true,
|
|
9
|
+
message: "Loading ... ",
|
|
10
|
+
});
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div
|
|
15
|
+
class="is-flex is-justify-content-center is-align-items-center is-flex-direction-column ac-preloader page-loader"
|
|
16
|
+
style="height: calc(100vh - 200px)"
|
|
17
|
+
>
|
|
18
|
+
<span v-if="showSpinner" class="spinner"></span>
|
|
19
|
+
<p class="font-size-12 mt-10 pl-5">
|
|
20
|
+
{{ message }}
|
|
21
|
+
</p>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
@@ -1,47 +1,63 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineAsyncComponent, ref, watch } from "vue";
|
|
3
|
+
|
|
4
|
+
const AcSingleInput = defineAsyncComponent(
|
|
5
|
+
() => import("../form-fields/AcSingleInput.vue")
|
|
6
|
+
);
|
|
7
|
+
|
|
8
|
+
const AcInput = defineAsyncComponent(() => import("../form-fields/Input.vue"));
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
acInputId?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
withDefaults(defineProps<Props>(), {
|
|
15
|
+
acInputId: "search",
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const emit = defineEmits(["search"]);
|
|
19
|
+
|
|
20
|
+
const searchText = ref("");
|
|
21
|
+
|
|
22
|
+
watch(searchText, (n) => {
|
|
23
|
+
emit("search", n.trim());
|
|
24
|
+
});
|
|
25
|
+
</script>
|
|
26
|
+
|
|
1
27
|
<template>
|
|
2
|
-
<ac-single-input modifier-classes="is-extra-small width-
|
|
28
|
+
<ac-single-input modifier-classes="is-extra-small width-auto">
|
|
3
29
|
<template #button>
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
|
|
30
|
+
<label class="ac-search-button" :for="acInputId">
|
|
31
|
+
<svg
|
|
32
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
33
|
+
viewBox="0 0 20 20"
|
|
34
|
+
fill="currentColor"
|
|
35
|
+
class="w-5 h-5"
|
|
36
|
+
>
|
|
37
|
+
<path
|
|
38
|
+
fill-rule="evenodd"
|
|
39
|
+
d="M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z"
|
|
40
|
+
clip-rule="evenodd"
|
|
41
|
+
/>
|
|
42
|
+
</svg>
|
|
43
|
+
</label>
|
|
7
44
|
</template>
|
|
8
45
|
<ac-input
|
|
9
46
|
name="search"
|
|
10
47
|
placeholder="Search"
|
|
11
48
|
type="search"
|
|
12
49
|
class="ac-search"
|
|
50
|
+
:id="acInputId"
|
|
13
51
|
v-model="searchText"
|
|
14
52
|
/>
|
|
15
53
|
</ac-single-input>
|
|
16
54
|
</template>
|
|
17
55
|
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
)
|
|
27
|
-
),
|
|
28
|
-
AcInput: defineAsyncComponent(() =>
|
|
29
|
-
import("../form-fields/Input.vue").then((module) => module.default)
|
|
30
|
-
),
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
emits: ["search"],
|
|
34
|
-
|
|
35
|
-
data() {
|
|
36
|
-
return {
|
|
37
|
-
searchText: "",
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
watch: {
|
|
42
|
-
searchText(n) {
|
|
43
|
-
this.$emit("search", n);
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
});
|
|
47
|
-
</script>
|
|
56
|
+
<style lang="scss">
|
|
57
|
+
.header-item {
|
|
58
|
+
.ac-single-input {
|
|
59
|
+
width: 200px;
|
|
60
|
+
transition: 0.3s all;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
</style>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, computed, watch, nextTick } from "vue";
|
|
3
|
+
|
|
4
|
+
const accentColor = ref("#1971bd");
|
|
5
|
+
const fontColor = ref("#1c1c1c");
|
|
6
|
+
|
|
7
|
+
const convertToHsl = (H: string) => {
|
|
8
|
+
// Convert hex to RGB first
|
|
9
|
+
let r = 0,
|
|
10
|
+
g = 0,
|
|
11
|
+
b = 0;
|
|
12
|
+
if (H.length == 4) {
|
|
13
|
+
r = Number("0x" + H[1] + H[1]);
|
|
14
|
+
g = Number("0x" + H[2] + H[2]);
|
|
15
|
+
b = Number("0x" + H[3] + H[3]);
|
|
16
|
+
} else if (H.length == 7) {
|
|
17
|
+
r = Number("0x" + H[1] + H[2]);
|
|
18
|
+
g = Number("0x" + H[3] + H[4]);
|
|
19
|
+
b = Number("0x" + H[5] + H[6]);
|
|
20
|
+
}
|
|
21
|
+
// Then to HSL
|
|
22
|
+
r /= 255;
|
|
23
|
+
g /= 255;
|
|
24
|
+
b /= 255;
|
|
25
|
+
let cmin = Math.min(r, g, b),
|
|
26
|
+
cmax = Math.max(r, g, b),
|
|
27
|
+
delta = cmax - cmin,
|
|
28
|
+
h = 0,
|
|
29
|
+
s = 0,
|
|
30
|
+
l = 0;
|
|
31
|
+
|
|
32
|
+
if (delta == 0) h = 0;
|
|
33
|
+
else if (cmax == r) h = ((g - b) / delta) % 6;
|
|
34
|
+
else if (cmax == g) h = (b - r) / delta + 2;
|
|
35
|
+
else h = (r - g) / delta + 4;
|
|
36
|
+
|
|
37
|
+
h = Math.round(h * 60);
|
|
38
|
+
|
|
39
|
+
if (h < 0) h += 360;
|
|
40
|
+
|
|
41
|
+
l = (cmax + cmin) / 2;
|
|
42
|
+
s = delta == 0 ? 0 : delta / (1 - Math.abs(2 * l - 1));
|
|
43
|
+
s = +(s * 100).toFixed(1);
|
|
44
|
+
l = +(l * 100).toFixed(1);
|
|
45
|
+
|
|
46
|
+
return {
|
|
47
|
+
hue: `${h}`,
|
|
48
|
+
saturation: `${s}%`,
|
|
49
|
+
lightness: `${l}%`,
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const accentHsl = computed(() => convertToHsl(accentColor.value));
|
|
54
|
+
const fontHsl = computed(() => convertToHsl(fontColor.value));
|
|
55
|
+
|
|
56
|
+
watch(
|
|
57
|
+
accentHsl,
|
|
58
|
+
(n) => {
|
|
59
|
+
const { hue, saturation, lightness } = n || {};
|
|
60
|
+
nextTick(() => {
|
|
61
|
+
document.documentElement.style.setProperty("--hsl-hue", hue);
|
|
62
|
+
document.documentElement.style.setProperty(
|
|
63
|
+
"--hsl-saturation",
|
|
64
|
+
saturation
|
|
65
|
+
);
|
|
66
|
+
document.documentElement.style.setProperty("--hsl-lightness", lightness);
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
{ deep: true }
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
watch(
|
|
73
|
+
fontHsl,
|
|
74
|
+
(n) => {
|
|
75
|
+
const { hue, saturation, lightness } = n || {};
|
|
76
|
+
nextTick(() => {
|
|
77
|
+
document.documentElement.style.setProperty("--font-hsl-hue", hue);
|
|
78
|
+
document.documentElement.style.setProperty(
|
|
79
|
+
"--font-hsl-saturation",
|
|
80
|
+
saturation
|
|
81
|
+
);
|
|
82
|
+
document.documentElement.style.setProperty(
|
|
83
|
+
"--font-hsl-lightness",
|
|
84
|
+
lightness
|
|
85
|
+
);
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
{ deep: true }
|
|
89
|
+
);
|
|
90
|
+
</script>
|
|
91
|
+
|
|
92
|
+
<template>
|
|
93
|
+
<div class="is-flex is-align-items-center is-justify-content-flex-end mr-16">
|
|
94
|
+
<input title="Accent Color" type="color" v-model="accentColor" />
|
|
95
|
+
<input title="Font Color" type="color" v-model="fontColor" />
|
|
96
|
+
</div>
|
|
97
|
+
</template>
|