@appscode/design-system 1.0.3-alpha.8 → 1.0.43-alpha.101

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 (114) hide show
  1. package/base/utilities/_default.scss +285 -23
  2. package/base/utilities/_derived-variables.scss +2 -15
  3. package/base/utilities/_initial-variables.scss +99 -64
  4. package/base/utilities/_mixin.scss +90 -10
  5. package/base/utilities/_typography.scss +23 -7
  6. package/base/utilities/dark-theme.scss +25 -0
  7. package/components/_ac-accordion.scss +1 -0
  8. package/components/_ac-alert-box.scss +47 -11
  9. package/components/_ac-card.scss +55 -20
  10. package/components/_ac-code-highlight.scss +7 -1
  11. package/components/_ac-content-layout.scss +4 -4
  12. package/components/_ac-drag.scss +6 -6
  13. package/components/_ac-input.scss +140 -38
  14. package/components/_ac-modal.scss +5 -4
  15. package/components/_ac-multi-select.scss +220 -18
  16. package/components/_ac-options.scss +31 -16
  17. package/components/_ac-select-box.scss +15 -5
  18. package/components/_ac-table.scss +88 -47
  19. package/components/_ac-tabs.scss +72 -23
  20. package/components/_ac-tags.scss +2 -2
  21. package/components/_ac-terminal.scss +272 -0
  22. package/components/_app-drawer.scss +6 -6
  23. package/components/_breadcumb.scss +8 -3
  24. package/components/_buttons.scss +86 -33
  25. package/components/_card-body-wrapper.scss +3 -3
  26. package/components/_dashboard-header.scss +1 -1
  27. package/components/_direct-deploy.scss +69 -0
  28. package/components/_go-to-top.scss +1 -1
  29. package/components/_graph.scss +45 -0
  30. package/components/_image-upload.scss +6 -4
  31. package/components/_left-sidebar-menu.scss +206 -46
  32. package/components/_monaco-editor.scss +1 -1
  33. package/components/_navbar.scss +104 -27
  34. package/components/_overview-info.scss +4 -4
  35. package/components/_overview-page.scss +1 -2
  36. package/components/_pagination.scss +45 -7
  37. package/components/_payment-card.scss +28 -12
  38. package/components/_preloader.scss +1 -1
  39. package/components/_preview-modal.scss +8 -8
  40. package/components/_pricing-table.scss +1 -1
  41. package/components/_progress-bar.scss +5 -5
  42. package/components/_subscription-card.scss +15 -8
  43. package/components/_table-of-content.scss +1 -1
  44. package/components/_tfa.scss +69 -0
  45. package/components/_widget-menu.scss +9 -9
  46. package/components/_wizard.scss +32 -20
  47. package/components/ac-toaster/_ac-toasted.scss +40 -8
  48. package/components/bbum/_card-team.scss +18 -10
  49. package/components/bbum/_information-center.scss +19 -5
  50. package/components/bbum/_mobile-desktop.scss +6 -6
  51. package/components/bbum/_post.scss +5 -4
  52. package/components/bbum/_sign-up-notification.scss +6 -6
  53. package/components/bbum/_single-post-preview.scss +9 -9
  54. package/components/bbum/_user-profile.scss +97 -90
  55. package/components/ui-builder/_ui-builder.scss +31 -12
  56. package/components/ui-builder/_vue-open-api.scss +98 -0
  57. package/layouts/_404.scss +2 -1
  58. package/layouts/_code-preview.scss +14 -6
  59. package/main.scss +4 -0
  60. package/package.json +2 -7
  61. package/plugins/theme.js +142 -0
  62. package/plugins/vue-toaster.js +7 -6
  63. package/vue-components/v2/breadcrumbs/Breadcrumb.vue +95 -0
  64. package/vue-components/v2/card/CardContent.vue +5 -0
  65. package/vue-components/v2/card/CardHeader.vue +12 -0
  66. package/vue-components/v2/card/OverviewCard.vue +10 -0
  67. package/vue-components/v2/card/OverviewCards.vue +5 -0
  68. package/vue-components/v2/card/PaymentCards.vue +16 -10
  69. package/vue-components/v2/content/ContentHeader.vue +1 -1
  70. package/vue-components/v2/editor/Editor.vue +37 -17
  71. package/vue-components/v2/editor/ResourceKeyValueEditor.vue +232 -0
  72. package/vue-components/v2/header/Header.vue +0 -1
  73. package/vue-components/v2/modal/Modal.vue +32 -14
  74. package/vue-components/v2/modals/JsonShowModal.vue +0 -1
  75. package/vue-components/v2/navbar/Appdrawer.vue +9 -6
  76. package/vue-components/v2/navbar/ThemeMode.vue +120 -0
  77. package/vue-components/v2/pagination/Pagination.vue +8 -1
  78. package/vue-components/v2/preloader/Preloader.vue +5 -5
  79. package/vue-components/v2/sidebar/ClusterSwitcher.vue +126 -0
  80. package/vue-components/v2/sidebar/SidebarItem.vue +24 -2
  81. package/vue-components/v2/table/InfoTable.vue +13 -3
  82. package/vue-components/v2/table/Table.vue +75 -5
  83. package/vue-components/v2/table/TableRow.vue +17 -8
  84. package/vue-components/v2/table/table-cell/CellValue.vue +10 -1
  85. package/vue-components/v2/tabs/EditorTabs.vue +1 -1
  86. package/vue-components/v3/button/Button.vue +73 -0
  87. package/vue-components/v3/content/ContentHeader.vue +54 -0
  88. package/vue-components/v3/content/ContentTable.vue +65 -0
  89. package/vue-components/v3/dropdown/DropdownDivider.vue +3 -0
  90. package/vue-components/v3/dropdown/DropdownItem.vue +5 -0
  91. package/vue-components/v3/dropdown/DropdownMenu.vue +111 -0
  92. package/vue-components/v3/editor/Editor.vue +157 -0
  93. package/vue-components/v3/form-fields/Input.vue +21 -0
  94. package/vue-components/v3/header/Header.vue +45 -0
  95. package/vue-components/v3/modal/Modal.vue +135 -0
  96. package/vue-components/v3/modals/JsonShowModal.vue +87 -0
  97. package/vue-components/v3/navbar/Appdrawer.vue +63 -0
  98. package/vue-components/v3/navbar/ThemeMode.vue +128 -0
  99. package/vue-components/v3/navbar/User.vue +64 -0
  100. package/vue-components/v3/pagination/Pagination.vue +159 -0
  101. package/vue-components/v3/searchbars/SearchBar.vue +47 -0
  102. package/vue-components/v3/sidebar/ClusterSwitcher.vue +133 -0
  103. package/vue-components/v3/tab/TabItem.vue +17 -0
  104. package/vue-components/v3/table/FakeTableCell.vue +39 -0
  105. package/vue-components/v3/table/InfoTable.vue +105 -0
  106. package/vue-components/v3/table/Table.vue +238 -0
  107. package/vue-components/v3/table/TableCell.vue +28 -0
  108. package/vue-components/v3/table/TableRow.vue +60 -0
  109. package/vue-components/v3/table/table-cell/ArrayCell.vue +111 -0
  110. package/vue-components/v3/table/table-cell/CellValue.vue +117 -0
  111. package/vue-components/v3/table/table-cell/ObjectCell.vue +105 -0
  112. package/vue-components/v3/table/table-cell/ValueWithModal.vue +43 -0
  113. package/vue-components/v3/tabs/EditorTabs.vue +36 -0
  114. package/vue-components/v3/tag/Tag.vue +17 -0
@@ -0,0 +1,159 @@
1
+ <template>
2
+ <div class="level inner-table-pagination" v-show="showPagination">
3
+ <div class="pagination-filter level-left">
4
+ <div
5
+ class="level-item"
6
+ v-show="
7
+ !hideRowsPerPageSelection &&
8
+ totalNoOfItems > preSelectedItemsCountPerPage
9
+ "
10
+ >
11
+ <label>Rows per page</label>
12
+ <select v-model="selectedItemCountPerPage" name="page">
13
+ <option :value="5">5</option>
14
+ <option :value="10" v-show="totalNoOfItems > 5">10</option>
15
+ <option :value="15" v-show="totalNoOfItems > 10">15</option>
16
+ <option :value="20" v-show="totalNoOfItems > 15">20</option>
17
+ <option :value="25" v-show="totalNoOfItems > 20">25</option>
18
+ <option :value="50" v-show="totalNoOfItems > 25">50</option>
19
+ </select>
20
+ </div>
21
+ </div>
22
+
23
+ <nav class="pagination-item level-right">
24
+ <p class="counting-page">
25
+ Showing
26
+ <span>{{ itemsRange.start + 1 }}</span
27
+ >to <span>{{ itemsRange.end }}</span
28
+ >of <span>{{ totalNoOfItems }}</span
29
+ >{{ totalNoOfItems > 1 ? "Items" : "Item" }}
30
+ </p>
31
+
32
+ <ul v-if="totalNoOfItems > selectedItemCountPerPage">
33
+ <li>
34
+ <a class="previous" @click.prevent="prevPage()">
35
+ <i class="fa fa-angle-left" aria-hidden="true"></i>
36
+ </a>
37
+ </li>
38
+ <li v-for="page in pages" :key="`page-${page}`">
39
+ <a
40
+ @click.prevent="changePage(page)"
41
+ :class="{ 'is-current': activePageNo === page }"
42
+ >{{ page }}</a
43
+ >
44
+ </li>
45
+ <li>
46
+ <a class="next" @click.prevent="nextPage()">
47
+ <i class="fa fa-angle-right" aria-hidden="true"></i>
48
+ </a>
49
+ </li>
50
+ </ul>
51
+ </nav>
52
+ </div>
53
+ </template>
54
+
55
+ <script>
56
+ import { defineComponent } from "vue";
57
+
58
+ export default defineComponent({
59
+ props: {
60
+ hideRowsPerPageSelection: {
61
+ type: Boolean,
62
+ default: false,
63
+ },
64
+ totalNoOfItems: {
65
+ type: Number,
66
+ default: 0,
67
+ },
68
+ preSelectedItemsCountPerPage: {
69
+ type: Number,
70
+ default: 5,
71
+ },
72
+ },
73
+ emits: ["pagination:pagechange"],
74
+
75
+ data() {
76
+ return {
77
+ activePageNo: 1,
78
+ selectedItemCountPerPage: 5,
79
+ };
80
+ },
81
+
82
+ computed: {
83
+ noOfPages() {
84
+ return Math.ceil(this.totalNoOfItems / this.selectedItemCountPerPage);
85
+ },
86
+ noOfPageNos() {
87
+ return Math.min(this.noOfPages, 5);
88
+ },
89
+ pageRange() {
90
+ let o = { start: 1, end: 0 };
91
+ if (this.noOfPageNos < 5) {
92
+ o.start = 1;
93
+ o.end = this.noOfPageNos;
94
+ } else {
95
+ if (this.activePageNo < 3) {
96
+ o.start = 1;
97
+ o.end = 5;
98
+ } else if (this.activePageNo > this.noOfPages - 2) {
99
+ o.start = this.noOfPages - 4;
100
+ o.end = this.noOfPages;
101
+ } else {
102
+ o.start = this.activePageNo - 2;
103
+ o.end = this.activePageNo + 2;
104
+ }
105
+ }
106
+ return o;
107
+ },
108
+ pages() {
109
+ let ar = [];
110
+ let start = this.pageRange.start;
111
+ let end = this.pageRange.end;
112
+ for (let i = start; i <= end; i++) {
113
+ ar.push(i);
114
+ }
115
+ return ar;
116
+ },
117
+ itemsRange() {
118
+ let start = (this.activePageNo - 1) * this.selectedItemCountPerPage;
119
+ let end = Math.min(
120
+ this.activePageNo * this.selectedItemCountPerPage,
121
+ this.totalNoOfItems
122
+ );
123
+
124
+ return { start, end };
125
+ },
126
+ showPagination() {
127
+ return this.itemsRange.end > this.itemsRange.start;
128
+ },
129
+ },
130
+
131
+ created() {
132
+ this.selectedItemCountPerPage = this.preSelectedItemsCountPerPage;
133
+ },
134
+
135
+ methods: {
136
+ prevPage() {
137
+ this.activePageNo = Math.max(this.activePageNo - 1, 1);
138
+ },
139
+ changePage(page) {
140
+ this.activePageNo = page;
141
+ },
142
+ nextPage() {
143
+ this.activePageNo = Math.min(this.activePageNo + 1, this.noOfPages);
144
+ },
145
+ },
146
+
147
+ watch: {
148
+ itemsRange: {
149
+ deep: true,
150
+ handler(n) {
151
+ this.$emit("pagination:pagechange", n);
152
+ },
153
+ },
154
+ selectedItemCountPerPage() {
155
+ this.activePageNo = 1;
156
+ },
157
+ },
158
+ });
159
+ </script>
@@ -0,0 +1,47 @@
1
+ <template>
2
+ <ac-single-input modifier-classes="is-extra-small width-200">
3
+ <template #button>
4
+ <button class="ac-search-button">
5
+ <i class="fa fa-search" aria-hidden="true"></i>
6
+ </button>
7
+ </template>
8
+ <ac-input
9
+ name="search"
10
+ placeholder="Search"
11
+ type="search"
12
+ class="ac-search"
13
+ v-model="searchText"
14
+ />
15
+ </ac-single-input>
16
+ </template>
17
+
18
+ <script>
19
+ import { defineComponent, defineAsyncComponent } from "vue";
20
+
21
+ export default defineComponent({
22
+ components: {
23
+ AcSingleInput: defineAsyncComponent(() =>
24
+ import("../../v2/form-fields/AcSingleInput.vue").then(
25
+ (module) => module.default
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>
@@ -0,0 +1,133 @@
1
+ <template>
2
+ <div v-if="sidebarCollapsed" class="is-cluster-logo">
3
+ <img
4
+ width="40"
5
+ :src="getProviderIcon(selectedCluster && selectedCluster.provider)"
6
+ onerror="this.onerror=null;this.src='https://cdn.appscode.com/images/cloud-provider-icons/Generic.png';"
7
+ alt="provider-icon"
8
+ />
9
+ </div>
10
+ <multiselect
11
+ v-else
12
+ v-model="selectedCluster"
13
+ placeholder="Selected Cluster"
14
+ label="name"
15
+ track-by="name"
16
+ :options="clusterOptions"
17
+ :allow-empty="false"
18
+ deselect-label=""
19
+ select-label=""
20
+ selected-label=""
21
+ >
22
+ <template #singleLabel="props">
23
+ <div class="is-flex is-align-items-center">
24
+ <img
25
+ :src="getProviderIcon(props.option.provider)"
26
+ onerror="this.onerror=null;this.src='https://cdn.appscode.com/images/cloud-provider-icons/Generic.png';"
27
+ alt="No cluster selected"
28
+ /><span
29
+ ><span>{{ props.option.displayName }}</span></span
30
+ >
31
+ </div>
32
+ </template>
33
+ <template #option="props">
34
+ <div class="is-flex is-align-items-center">
35
+ <img
36
+ class="mr-15"
37
+ :src="getProviderIcon(props.option.provider)"
38
+ onerror="this.onerror=null;this.src='https://cdn.appscode.com/images/cloud-provider-icons/Generic.png';"
39
+ alt="No cluster selected"
40
+ />
41
+ <div>
42
+ <p>{{ props.option.displayName }}</p>
43
+ <p class="location">{{ props.option.location }}</p>
44
+ </div>
45
+ </div>
46
+ </template>
47
+ </multiselect>
48
+ </template>
49
+
50
+ <script>
51
+ import { defineComponent, defineAsyncComponent } from 'vue'
52
+ export default defineComponent({
53
+ components: {
54
+ Multiselect: defineAsyncComponent(() =>
55
+ import('vue-multiselect').then((module) => module.default)
56
+ ),
57
+ },
58
+ props: {
59
+ sidebarCollapsed: {
60
+ type: Boolean,
61
+ default: false,
62
+ },
63
+ mouseHover: {
64
+ type: Boolean,
65
+ default: false,
66
+ },
67
+ clusterOptions: {
68
+ type: Array,
69
+ default: () => [],
70
+ },
71
+ modelValue: {
72
+ type: String,
73
+ default: '',
74
+ },
75
+ },
76
+
77
+ emits: ['update:modelValue'],
78
+
79
+ data() {
80
+ return {
81
+ selectedCluster: null,
82
+ selectedClusterName: null,
83
+ }
84
+ },
85
+
86
+ watch: {
87
+ modelValue: {
88
+ immediate: true,
89
+ handler(n) {
90
+ this.selectedClusterName = n
91
+ },
92
+ },
93
+ selectedCluster: {
94
+ deep: true,
95
+ handler(n) {
96
+ if (this.selectedClusterName !== n.name) {
97
+ this.selectedClusterName = n.name
98
+ }
99
+ },
100
+ },
101
+ selectedClusterName(n) {
102
+ if (n !== this.selectedCluster.name) {
103
+ this.clusterOptions.forEach((item) => {
104
+ if (this.selectedClusterName === item.name) {
105
+ this.selectedCluster = item
106
+ }
107
+ })
108
+ }
109
+
110
+ this.$emit('update:modelValue', n)
111
+ },
112
+ clusterOptions: {
113
+ deep: true,
114
+ immediate: true,
115
+ async handler(list) {
116
+ if (list) {
117
+ list.forEach((item) => {
118
+ if (this.selectedClusterName === item.name) {
119
+ this.selectedCluster = item
120
+ }
121
+ })
122
+ }
123
+ },
124
+ },
125
+ },
126
+
127
+ methods: {
128
+ getProviderIcon(provider) {
129
+ return `https://cdn.appscode.com/images/cloud-provider-icons/${provider}.png`
130
+ },
131
+ },
132
+ })
133
+ </script>
@@ -0,0 +1,17 @@
1
+ <template>
2
+ <li :class="{ 'is-active': isActive }">
3
+ <slot />
4
+ </li>
5
+ </template>
6
+
7
+ <script>
8
+ import { defineComponent } from "vue";
9
+ export default defineComponent({
10
+ props: {
11
+ isActive: {
12
+ type: Boolean,
13
+ default: false,
14
+ },
15
+ },
16
+ });
17
+ </script>
@@ -0,0 +1,39 @@
1
+ <template>
2
+ <th v-if="isHeaderCell" class="increase-width">
3
+ <div class="increase-innner" :style="dynamicColumnStyle" />
4
+ </th>
5
+ <table-cell v-else class="increase-width">
6
+ <div class="increase-innner" :style="dynamicColumnStyle" />
7
+ </table-cell>
8
+ </template>
9
+
10
+ <script>
11
+ import { defineComponent, defineAsyncComponent } from "vue";
12
+
13
+ export default defineComponent({
14
+ props: {
15
+ isHeaderCell: {
16
+ type: Boolean,
17
+ default: false,
18
+ },
19
+ fakeCellWidth: {
20
+ type: Number,
21
+ default: 0,
22
+ },
23
+ },
24
+
25
+ components: {
26
+ TableCell: defineAsyncComponent(() =>
27
+ import("./TableCell.vue").then((module) => module.default)
28
+ ),
29
+ },
30
+
31
+ computed: {
32
+ dynamicColumnStyle() {
33
+ return {
34
+ right: `-${this.fakeCellWidth}px`,
35
+ };
36
+ },
37
+ },
38
+ });
39
+ </script>
@@ -0,0 +1,105 @@
1
+ <template>
2
+ <table-container>
3
+ <table
4
+ class="table ac-info-table is-fullwidth"
5
+ :class="{ 'pl-0 pr-0': removeContentPadding }"
6
+ >
7
+ <tbody v-if="isFullTableLoaderActive">
8
+ <table-row v-for="i in loaderCols" :key="i">
9
+ <table-cell>
10
+ <cell-value :is-loader-active="true" />
11
+ </table-cell>
12
+ <table-cell>
13
+ <cell-value :is-loader-active="true" />
14
+ </table-cell>
15
+ </table-row>
16
+ </tbody>
17
+ <tbody
18
+ v-else
19
+ :class="{
20
+ 'no-data-available has-text-centered p-10': isTableEmpty,
21
+ 'pl-0 pr-0': removeContentPadding,
22
+ }"
23
+ >
24
+ <template v-if="!isTableEmpty">
25
+ <table-row
26
+ v-for="(tableHeader, idx) in tableHeaders"
27
+ :key="tableHeader"
28
+ >
29
+ <table-cell>
30
+ <slot :name="`table-cell-icon-${idx}`" />
31
+ {{ tableHeader }}
32
+ </table-cell>
33
+ <table-cell v-if="isLoaderActive">
34
+ <cell-value :is-loader-active="true" />
35
+ </table-cell>
36
+ <table-cell v-else>
37
+ <slot :name="`slot-${idx}`" />
38
+ </table-cell>
39
+ </table-row>
40
+ </template>
41
+
42
+ <empty-table-info v-else />
43
+ </tbody>
44
+ </table>
45
+ </table-container>
46
+ </template>
47
+
48
+ <script>
49
+ import { defineComponent, defineAsyncComponent } from "vue";
50
+
51
+ export default defineComponent({
52
+ props: {
53
+ isLoaderActive: {
54
+ type: Boolean,
55
+ default: false,
56
+ },
57
+ isTableEmpty: {
58
+ type: Boolean,
59
+ default: true,
60
+ },
61
+ tableHeaders: {
62
+ type: Array,
63
+ default: () => [],
64
+ },
65
+ removeContentPadding: {
66
+ type: Boolean,
67
+ default: false,
68
+ },
69
+ },
70
+
71
+ components: {
72
+ TableContainer: defineAsyncComponent(() =>
73
+ import("../../v2/table/TableContainer.vue").then(
74
+ (module) => module.default
75
+ )
76
+ ),
77
+ EmptyTableInfo: defineAsyncComponent(() =>
78
+ import("../../v2/table/EmptyTableInfo.vue").then(
79
+ (module) => module.default
80
+ )
81
+ ),
82
+ TableRow: defineAsyncComponent(() =>
83
+ import("./TableRow.vue").then((module) => module.default)
84
+ ),
85
+ TableCell: defineAsyncComponent(() =>
86
+ import("./TableCell.vue").then((module) => module.default)
87
+ ),
88
+ CellValue: defineAsyncComponent(() =>
89
+ import("./table-cell/CellValue.vue").then((module) => module.default)
90
+ ),
91
+ },
92
+
93
+ data() {
94
+ return {
95
+ loaderCols: 5,
96
+ };
97
+ },
98
+
99
+ computed: {
100
+ isFullTableLoaderActive() {
101
+ return !this.tableHeaders.length;
102
+ },
103
+ },
104
+ });
105
+ </script>