@appscode/design-system 2.4.27-alpha1 → 2.4.27

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 (79) hide show
  1. package/package.json +4 -6
  2. package/vue-components/styles/base/utilities/_colors.scss +25 -9
  3. package/vue-components/styles/base/utilities/_global.scss +2 -2
  4. package/vue-components/styles/base/utilities/_typography.scss +74 -68
  5. package/vue-components/styles/components/_ac-calendar.scss +3 -3
  6. package/vue-components/styles/components/_ac-code-highlight.scss +1 -1
  7. package/vue-components/styles/components/_ac-drag.scss +1 -1
  8. package/vue-components/styles/components/_accordion.scss +1 -1
  9. package/vue-components/styles/components/_breadcrumb.scss +1 -1
  10. package/vue-components/styles/components/_card-body-wrapper.scss +3 -3
  11. package/vue-components/styles/components/_direct-deploy.scss +2 -2
  12. package/vue-components/styles/components/_dropdown.scss +1 -1
  13. package/vue-components/styles/components/_getkeeper.scss +1 -1
  14. package/vue-components/styles/components/_graph.scss +1 -1
  15. package/vue-components/styles/components/_options.scss +2 -2
  16. package/vue-components/styles/components/_pagination.scss +2 -2
  17. package/vue-components/styles/components/_table-of-content.scss +3 -3
  18. package/vue-components/styles/components/_table.scss +4 -4
  19. package/vue-components/styles/components/_tabs.scss +4 -4
  20. package/vue-components/styles/components/_terminal.scss +4 -4
  21. package/vue-components/styles/components/_widget-menu.scss +6 -6
  22. package/vue-components/styles/components/_wizard.scss +9 -9
  23. package/vue-components/styles/components/ac-toaster/_ac-toasted.scss +2 -2
  24. package/vue-components/styles/components/alert/_alert.scss +1 -1
  25. package/vue-components/styles/components/alert/_toast.scss +1 -1
  26. package/vue-components/styles/components/bbum/_card-team.scss +2 -2
  27. package/vue-components/styles/components/bbum/_left-sidebar.scss +2 -2
  28. package/vue-components/styles/components/bbum/_sign-up-notification.scss +2 -2
  29. package/vue-components/styles/components/bbum/_single-post-preview.scss +1 -1
  30. package/vue-components/styles/components/bbum/_user-profile.scss +3 -3
  31. package/vue-components/styles/components/cards/_cluster.scss +1 -1
  32. package/vue-components/styles/components/cards/_features.scss +1 -1
  33. package/vue-components/styles/components/cards/_info.scss +1 -1
  34. package/vue-components/styles/components/cards/_monitoring.scss +1 -1
  35. package/vue-components/styles/components/cards/_payment-card.scss +3 -3
  36. package/vue-components/styles/components/cards/_subscription-card.scss +2 -2
  37. package/vue-components/styles/components/cards/_vendor.scss +5 -5
  38. package/vue-components/styles/components/form-fields/_check-radio-switch.scss +4 -4
  39. package/vue-components/styles/components/form-fields/_image-upload.scss +1 -1
  40. package/vue-components/styles/components/form-fields/_input-card.scss +3 -3
  41. package/vue-components/styles/components/form-fields/_input.scss +16 -16
  42. package/vue-components/styles/components/inbox/all.scss +4 -19
  43. package/vue-components/styles/components/navbar/_menu-content.scss +11 -11
  44. package/vue-components/styles/components/select-box/_ac-select-box.scss +1 -1
  45. package/vue-components/styles/components/select-box/_multi-select.scss +23 -22
  46. package/vue-components/styles/components/sidebar/_left-sidebar.scss +2 -2
  47. package/vue-components/styles/components/ui-builder/_ui-builder.scss +3 -3
  48. package/vue-components/styles/components/ui-builder/_vue-open-api.scss +13 -13
  49. package/vue-components/styles/layouts/_code-preview.scss +1 -1
  50. package/vue-components/v3/accordion/Accordion.vue +3 -11
  51. package/vue-components/v3/alert/AlertMessage.vue +3 -11
  52. package/vue-components/v3/alert/Toast.vue +3 -10
  53. package/vue-components/v3/breadcrumbs/Breadcrumb.vue +2 -16
  54. package/vue-components/v3/cards/InfoCard.vue +6 -77
  55. package/vue-components/v3/cards/Monitoring.vue +3 -23
  56. package/vue-components/v3/form-fields/AcSelect.vue +2 -10
  57. package/vue-components/v3/form-fields/Accordion.vue +4 -4
  58. package/vue-components/v3/form-fields/CheckBox.vue +1 -1
  59. package/vue-components/v3/form-fields/CheckRadio.vue +2 -3
  60. package/vue-components/v3/form-fields/CustomSelect.vue +7 -12
  61. package/vue-components/v3/form-fields/FileUpload.vue +5 -14
  62. package/vue-components/v3/icons/BellIcon.vue +18 -0
  63. package/vue-components/v3/icons/CrossIcon.vue +12 -0
  64. package/vue-components/v3/icons/GridIcon.vue +32 -0
  65. package/vue-components/v3/icons/HomeIcon.vue +12 -0
  66. package/vue-components/v3/icons/MemoryIcon.vue +36 -4
  67. package/vue-components/v3/icons/MonitorIcon.vue +13 -0
  68. package/vue-components/v3/icons/StorageIcon.vue +32 -0
  69. package/vue-components/v3/icons/UploadIcon.vue +16 -0
  70. package/vue-components/v3/inbox/MessageList.vue +7 -6
  71. package/vue-components/v3/modal/DialogModal.vue +2 -10
  72. package/vue-components/v3/navbar/Appdrawer.vue +2 -30
  73. package/vue-components/v3/navbar/Notification.vue +6 -22
  74. package/vue-components/v3/pagination/Pagination.vue +1 -1
  75. package/vue-components/v3/searchbars/SearchBar.vue +2 -7
  76. package/vue-components/v3/table/InfoTable.vue +1 -1
  77. package/vue-components/v3/upcoming/SimpleSelect.vue +5 -5
  78. package/vue-components/plugins/time-convert.js +0 -45
  79. /package/vue-components/v3/icons/{ArrowDownIcon.vue → ArrowIcon.vue} +0 -0
@@ -1,5 +1,9 @@
1
1
  <script setup lang="ts">
2
- import { defineAsyncComponent } from "vue";
2
+ import ArrowIcon from "../icons/ArrowIcon.vue";
3
+ import RefreshIcon from "../icons/RefreshIcon.vue";
4
+ import CloseIcon from "../icons/CloseIcon.vue";
5
+ import AcButton from "../button/Button.vue";
6
+ import AcButtons from "../button/Buttons.vue";
3
7
 
4
8
  interface prop {
5
9
  multiselect?: boolean;
@@ -13,13 +17,6 @@ withDefaults(defineProps<prop>(), {
13
17
  custom: false,
14
18
  isOpen: false,
15
19
  });
16
-
17
- const AcButtons = defineAsyncComponent(() => import("../button/Buttons.vue"));
18
- const AcButton = defineAsyncComponent(() => import("../button/Button.vue"));
19
-
20
- const ArrowDownIcon = defineAsyncComponent(() => import("../icons/ArrowDownIcon.vue"));
21
- const RefreshIcon = defineAsyncComponent(() => import("../icons/RefreshIcon.vue"));
22
- const CloseIcon = defineAsyncComponent(() => import("../icons/CloseIcon.vue"));
23
20
  </script>
24
21
 
25
22
  <template>
@@ -30,9 +27,7 @@ const CloseIcon = defineAsyncComponent(() => import("../icons/CloseIcon.vue"));
30
27
 
31
28
  <!-- <input type="text" value="Select" /> -->
32
29
  <p class="custom-select-placeholder">
33
- <span class="is-ellipsis-1">
34
- Select Value Select ValueSelect ValueSelect ValueSelect ValueSelect ValueSelect Value
35
- </span>
30
+ <span class="is-ellipsis-1"> Select Value </span>
36
31
  </p>
37
32
 
38
33
  <div v-if="multiselect" class="ac-field field is-grouped is-clipped">
@@ -66,7 +61,7 @@ const CloseIcon = defineAsyncComponent(() => import("../icons/CloseIcon.vue"));
66
61
 
67
62
  <ac-buttons>
68
63
  <button class="button ac-button is-white">
69
- <ArrowDownIcon />
64
+ <ArrowIcon />
70
65
  </button>
71
66
 
72
67
  <ac-button modifier-classes="is-white">
@@ -1,22 +1,13 @@
1
+ <script setup lang="ts">
2
+ import UploadIcon from "../icons/UploadIcon.vue";
3
+ </script>
4
+
1
5
  <template>
2
6
  <div class="file-upload" data-testid="image-upload-drag-section">
3
7
  <label for="image-upload-with-cropping" class="has-text-centered" title="Click to upload new avatar">
4
8
  <div class="ms-upload-logo" title="Click to upload new avatar">
5
9
  <div class="upload-icon">
6
- <svg
7
- xmlns="http://www.w3.org/2000/svg"
8
- fill="none"
9
- viewBox="0 0 24 24"
10
- stroke-width="1"
11
- stroke="currentColor"
12
- class="w-6 h-6"
13
- >
14
- <path
15
- stroke-linecap="round"
16
- stroke-linejoin="round"
17
- d="M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5"
18
- />
19
- </svg>
10
+ <UploadIcon />
20
11
  </div>
21
12
  </div>
22
13
  <div class="ms-upload-description">
@@ -0,0 +1,18 @@
1
+ <template>
2
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <g clip-path="url(#clip0_534_14009)">
4
+ <path
5
+ d="M9.15331 14C9.03611 14.2021 8.86787 14.3698 8.66546 14.4864C8.46305 14.603 8.23357 14.6643 7.99998 14.6643C7.76639 14.6643 7.53691 14.603 7.3345 14.4864C7.13208 14.3698 6.96385 14.2021 6.84665 14M14.6666 11.3334H1.33331C1.86375 11.3334 2.37245 11.1227 2.74753 10.7476C3.1226 10.3725 3.33331 9.86381 3.33331 9.33337V6.00004C3.33331 4.76236 3.82498 3.57538 4.70015 2.70021C5.57532 1.82504 6.7623 1.33337 7.99998 1.33337C9.23766 1.33337 10.4246 1.82504 11.2998 2.70021C12.175 3.57538 12.6666 4.76236 12.6666 6.00004V9.33337C12.6666 9.86381 12.8774 10.3725 13.2524 10.7476C13.6275 11.1227 14.1362 11.3334 14.6666 11.3334Z"
6
+ stroke="#061B2D"
7
+ stroke-width="1.5"
8
+ stroke-linecap="round"
9
+ stroke-linejoin="round"
10
+ />
11
+ </g>
12
+ <defs>
13
+ <clipPath id="clip0_534_14009">
14
+ <rect width="16" height="16" fill="white" />
15
+ </clipPath>
16
+ </defs>
17
+ </svg>
18
+ </template>
@@ -0,0 +1,12 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ fill="none"
5
+ viewBox="0 0 24 24"
6
+ stroke-width="1.5"
7
+ stroke="currentColor"
8
+ class="w-6 h-6"
9
+ >
10
+ <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
11
+ </svg>
12
+ </template>
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path
4
+ d="M6.66667 2H2V6.66667H6.66667V2Z"
5
+ stroke="#061B2D"
6
+ stroke-width="1.5"
7
+ stroke-linecap="round"
8
+ stroke-linejoin="round"
9
+ />
10
+ <path
11
+ d="M14 2H9.33337V6.66667H14V2Z"
12
+ stroke="#061B2D"
13
+ stroke-width="1.5"
14
+ stroke-linecap="round"
15
+ stroke-linejoin="round"
16
+ />
17
+ <path
18
+ d="M14 9.33334H9.33337V14H14V9.33334Z"
19
+ stroke="#061B2D"
20
+ stroke-width="1.5"
21
+ stroke-linecap="round"
22
+ stroke-linejoin="round"
23
+ />
24
+ <path
25
+ d="M6.66667 9.33334H2V14H6.66667V9.33334Z"
26
+ stroke="#061B2D"
27
+ stroke-width="1.5"
28
+ stroke-linecap="round"
29
+ stroke-linejoin="round"
30
+ />
31
+ </svg>
32
+ </template>
@@ -0,0 +1,12 @@
1
+ <template>
2
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path
4
+ d="M1 4.5L5.5 1L10 4.5V10C10 10.2652 9.89464 10.5196 9.70711 10.7071C9.51957 10.8946 9.26522 11 9 11H2C1.73478 11 1.48043 10.8946 1.29289 10.7071C1.10536 10.5196 1 10.2652 1 10V4.5Z"
5
+ stroke="#666666"
6
+ stroke-width="1.5"
7
+ stroke-linecap="round"
8
+ stroke-linejoin="round"
9
+ />
10
+ <path d="M4 11V6H7V11" stroke="#666666" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
11
+ </svg>
12
+ </template>
@@ -1,8 +1,40 @@
1
1
  <template>
2
- <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256">
3
- <path
4
- fill="currentColor"
5
- d="M232 56H24A16 16 0 0 0 8 72v128a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0V72a16 16 0 0 0-16-16M24 72h208v96H24Zm88 80a8 8 0 0 0 8-8V96a8 8 0 0 0-8-8H48a8 8 0 0 0-8 8v48a8 8 0 0 0 8 8Zm-56-48h48v32H56Zm88 48h64a8 8 0 0 0 8-8V96a8 8 0 0 0-8-8h-64a8 8 0 0 0-8 8v48a8 8 0 0 0 8 8m8-48h48v32h-48Z"
2
+ <svg width="20" height="13" viewBox="0 0 20 13" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <rect
4
+ x="0.489721"
5
+ y="0.489721"
6
+ width="18.6094"
7
+ height="11.7533"
8
+ rx="1.46916"
9
+ stroke="#5C5C5C"
10
+ stroke-width="0.979443"
11
+ />
12
+ <rect
13
+ x="3.10105"
14
+ y="2.91453"
15
+ width="2.50302"
16
+ height="7.2059"
17
+ rx="1.25151"
18
+ stroke="#5C5C5C"
19
+ stroke-width="0.979443"
20
+ />
21
+ <rect
22
+ x="8.54246"
23
+ y="2.91453"
24
+ width="2.50302"
25
+ height="7.2059"
26
+ rx="1.25151"
27
+ stroke="#5C5C5C"
28
+ stroke-width="0.979443"
29
+ />
30
+ <rect
31
+ x="13.9839"
32
+ y="2.91453"
33
+ width="2.50302"
34
+ height="7.2059"
35
+ rx="1.25151"
36
+ stroke="#5C5C5C"
37
+ stroke-width="0.979443"
6
38
  />
7
39
  </svg>
8
40
  </template>
@@ -0,0 +1,13 @@
1
+ <template>
2
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path
4
+ d="M20 3H4C2.89543 3 2 3.89543 2 5V15C2 16.1046 2.89543 17 4 17H20C21.1046 17 22 16.1046 22 15V5C22 3.89543 21.1046 3 20 3Z"
5
+ stroke="#808080"
6
+ stroke-width="1.5"
7
+ stroke-linecap="round"
8
+ stroke-linejoin="round"
9
+ ></path>
10
+ <path d="M8 21H16" stroke="#808080" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
11
+ <path d="M12 17V21" stroke="#808080" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
12
+ </svg>
13
+ </template>
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <svg width="21" height="16" viewBox="0 0 21 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path
4
+ d="M20.3189 7.76208H1"
5
+ stroke="#5C5C5C"
6
+ stroke-width="0.979443"
7
+ stroke-linecap="round"
8
+ stroke-linejoin="round"
9
+ />
10
+ <path
11
+ d="M4.3325 1.93817L1 7.76161V12.8328C1 13.2811 1.20354 13.7111 1.56584 14.0281C1.92814 14.3451 2.41952 14.5232 2.93189 14.5232H18.387C18.8994 14.5232 19.3907 14.3451 19.753 14.0281C20.1153 13.7111 20.3189 13.2811 20.3189 12.8328V7.76161L16.9864 1.93817C16.8264 1.65654 16.5799 1.41953 16.2744 1.2538C15.969 1.08806 15.6167 1.00017 15.2573 1H6.06154C5.70213 1.00017 5.3499 1.08806 5.04445 1.2538C4.739 1.41953 4.49244 1.65654 4.3325 1.93817Z"
12
+ stroke="#5C5C5C"
13
+ stroke-width="0.979443"
14
+ stroke-linecap="round"
15
+ stroke-linejoin="round"
16
+ />
17
+ <path
18
+ d="M4.86426 11.1421H4.87333"
19
+ stroke="#5C5C5C"
20
+ stroke-width="1.27328"
21
+ stroke-linecap="round"
22
+ stroke-linejoin="round"
23
+ />
24
+ <path
25
+ d="M8.72754 11.1421H8.73661"
26
+ stroke="#5C5C5C"
27
+ stroke-width="1.27328"
28
+ stroke-linecap="round"
29
+ stroke-linejoin="round"
30
+ />
31
+ </svg>
32
+ </template>
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ fill="none"
5
+ viewBox="0 0 24 24"
6
+ stroke-width="1"
7
+ stroke="currentColor"
8
+ class="w-6 h-6"
9
+ >
10
+ <path
11
+ stroke-linecap="round"
12
+ stroke-linejoin="round"
13
+ d="M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5"
14
+ />
15
+ </svg>
16
+ </template>
@@ -1,11 +1,12 @@
1
1
  <script lang="ts" setup>
2
2
  import { defineAsyncComponent } from "vue";
3
- const Searchbar = defineAsyncComponent(() => import("@/components/vue-components/v3/form-fields/Searchbar.vue"));
4
3
 
5
- const ArrowDownIcon = defineAsyncComponent(() => import("../icons/ArrowDownIcon.vue"));
6
- const RefreshIcon = defineAsyncComponent(() => import("../icons/RefreshIcon.vue"));
7
- const StarIcon = defineAsyncComponent(() => import("../icons/StarIcon.vue"));
8
- const EllipsisVertical = defineAsyncComponent(() => import("../icons/EllipsisVertical.vue"));
4
+ import ArrowIcon from "../icons/ArrowIcon.vue";
5
+ import RefreshIcon from "../icons/RefreshIcon.vue";
6
+ import EllipsisVertical from "../icons/EllipsisVertical.vue";
7
+ import StarIcon from "../icons/StarIcon.vue";
8
+
9
+ const Searchbar = defineAsyncComponent(() => import("@/components/vue-components/v3/form-fields/Searchbar.vue"));
9
10
  </script>
10
11
 
11
12
  <template>
@@ -23,7 +24,7 @@ const EllipsisVertical = defineAsyncComponent(() => import("../icons/EllipsisVer
23
24
  </label>
24
25
  <button class="button ac-button is-white is-small" title="Filter">
25
26
  <span class="icon">
26
- <ArrowDownIcon />
27
+ <ArrowIcon />
27
28
  </span>
28
29
  </button>
29
30
  </div>
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { defineAsyncComponent, ref, watch, nextTick } from "vue";
3
+ import CrossIcon from "../icons/CrossIcon.vue";
3
4
 
4
5
  interface Props {
5
6
  title?: string;
@@ -89,16 +90,7 @@ const handleCancel = (event: Event) => {
89
90
  :disabled="disableModalClose"
90
91
  >
91
92
  <span class="icon">
92
- <svg
93
- xmlns="http://www.w3.org/2000/svg"
94
- fill="none"
95
- viewBox="0 0 24 24"
96
- stroke-width="1.5"
97
- stroke="currentColor"
98
- class="size-6"
99
- >
100
- <path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
101
- </svg>
93
+ <CrossIcon />
102
94
  </span>
103
95
  </button>
104
96
  </div>
@@ -1,6 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { setCookie } from "tiny-cookie";
3
3
  import { computed, defineAsyncComponent, ref } from "vue";
4
+ import GridIcon from "../icons/GridIcon.vue";
4
5
 
5
6
  interface Props {
6
7
  currentApp?: "console" | "db" | "platform" | "billing" | "selfhost" | "learn" | "grafana";
@@ -110,36 +111,7 @@ const handleClick = (name: string) => {
110
111
  <template>
111
112
  <navbar-item @on-is-active-change="handleIsActiveChange">
112
113
  <template #navbar-item>
113
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
114
- <path
115
- d="M6.66667 2H2V6.66667H6.66667V2Z"
116
- stroke="#061B2D"
117
- stroke-width="1.5"
118
- stroke-linecap="round"
119
- stroke-linejoin="round"
120
- />
121
- <path
122
- d="M14 2H9.33337V6.66667H14V2Z"
123
- stroke="#061B2D"
124
- stroke-width="1.5"
125
- stroke-linecap="round"
126
- stroke-linejoin="round"
127
- />
128
- <path
129
- d="M14 9.33334H9.33337V14H14V9.33334Z"
130
- stroke="#061B2D"
131
- stroke-width="1.5"
132
- stroke-linecap="round"
133
- stroke-linejoin="round"
134
- />
135
- <path
136
- d="M6.66667 9.33334H2V14H6.66667V9.33334Z"
137
- stroke="#061B2D"
138
- stroke-width="1.5"
139
- stroke-linecap="round"
140
- stroke-linejoin="round"
141
- />
142
- </svg>
114
+ <GridIcon />
143
115
  </template>
144
116
  <template #navbar-content>
145
117
  <transition>
@@ -1,7 +1,9 @@
1
1
  <script setup lang="ts">
2
2
  import { defineAsyncComponent, ref } from "vue";
3
- import TimeConvert from "../../plugins/time-convert";
4
3
  import type { Notification } from "../../types/notification";
4
+ import { useTimeAgo } from "@vueuse/core";
5
+
6
+ import BellIcon from "../icons/BellIcon.vue";
5
7
  const NavbarItem = defineAsyncComponent(() => import("./NavbarItem.vue"));
6
8
  const NavbarItemContent = defineAsyncComponent(() => import("./NavbarItemContent.vue"));
7
9
  withDefaults(
@@ -14,9 +16,7 @@ withDefaults(
14
16
  unreadNotification: 0,
15
17
  },
16
18
  );
17
- function notificationTime(time: number) {
18
- return TimeConvert.getDayDifferences({ past: time });
19
- }
19
+
20
20
  const emit = defineEmits(["isActive"]);
21
21
  const showNotification = ref(false);
22
22
  function handleIsActiveChange(isActive: string | any[]) {
@@ -27,23 +27,7 @@ function handleIsActiveChange(isActive: string | any[]) {
27
27
  <template>
28
28
  <navbar-item ref="notificationItem" @on-is-active-change="handleIsActiveChange">
29
29
  <template #navbar-item>
30
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
31
- <g clip-path="url(#clip0_534_14009)">
32
- <path
33
- d="M9.15331 14C9.03611 14.2021 8.86787 14.3698 8.66546 14.4864C8.46305 14.603 8.23357 14.6643 7.99998 14.6643C7.76639 14.6643 7.53691 14.603 7.3345 14.4864C7.13208 14.3698 6.96385 14.2021 6.84665 14M14.6666 11.3334H1.33331C1.86375 11.3334 2.37245 11.1227 2.74753 10.7476C3.1226 10.3725 3.33331 9.86381 3.33331 9.33337V6.00004C3.33331 4.76236 3.82498 3.57538 4.70015 2.70021C5.57532 1.82504 6.7623 1.33337 7.99998 1.33337C9.23766 1.33337 10.4246 1.82504 11.2998 2.70021C12.175 3.57538 12.6666 4.76236 12.6666 6.00004V9.33337C12.6666 9.86381 12.8774 10.3725 13.2524 10.7476C13.6275 11.1227 14.1362 11.3334 14.6666 11.3334Z"
34
- stroke="#061B2D"
35
- stroke-width="1.5"
36
- stroke-linecap="round"
37
- stroke-linejoin="round"
38
- />
39
- </g>
40
- <defs>
41
- <clipPath id="clip0_534_14009">
42
- <rect width="16" height="16" fill="white" />
43
- </clipPath>
44
- </defs>
45
- </svg>
46
-
30
+ <BellIcon />
47
31
  <span v-if="unreadNotification > 999" class="notification-count">999+</span>
48
32
  <span v-else-if="unreadNotification !== 0" class="notification-count">{{ unreadNotification }}</span>
49
33
  </template>
@@ -65,7 +49,7 @@ function handleIsActiveChange(isActive: string | any[]) {
65
49
  <h6>{{ data.msg }}</h6>
66
50
  <p>{{ data.status }}</p>
67
51
  </div>
68
- <span>{{ notificationTime(data.time) }}</span>
52
+ <span>{{ useTimeAgo(data.time) }}</span>
69
53
  </a>
70
54
 
71
55
  <a v-if="!notifications.length" href="#" class="single-notification">
@@ -170,7 +170,7 @@ watch(
170
170
  display: block;
171
171
  width: 20px;
172
172
  text-align: center;
173
- font-size: 13px;
173
+ font-size: 1rem;
174
174
  font-weight: 500;
175
175
  border-radius: 4px;
176
176
  border: 1px solid $color-border;
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { defineAsyncComponent, ref, watch } from "vue";
3
+ import SearchIcon from "../icons/SearchIcon.vue";
3
4
 
4
5
  const AcSingleInput = defineAsyncComponent(() => import("../form-fields/AcSingleInput.vue"));
5
6
 
@@ -26,13 +27,7 @@ watch(searchText, (n) => {
26
27
  <ac-single-input modifier-classes="is-extra-small width-auto">
27
28
  <template #button>
28
29
  <label class="ac-search-button" :for="acInputId">
29
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5">
30
- <path
31
- fill-rule="evenodd"
32
- 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"
33
- clip-rule="evenodd"
34
- />
35
- </svg>
30
+ <SearchIcon />
36
31
  </label>
37
32
  </template>
38
33
  <ac-input name="search" placeholder="Search" type="search" class="ac-search" :id="acInputId" v-model="searchText" />
@@ -103,7 +103,7 @@ const isFullTableLoaderActive = computed(() => {
103
103
  tr {
104
104
  td {
105
105
  border: none;
106
- font-size: 13px;
106
+ font-size: 1rem;
107
107
  color: $color-text;
108
108
  font-weight: 400;
109
109
  padding: 3px 0px;
@@ -1,13 +1,13 @@
1
1
  <script setup lang="ts">
2
- import { computed, defineAsyncComponent, ref, watch } from "vue";
2
+ import { computed, ref, watch } from "vue";
3
3
  import { onClickOutside, useFocus } from "@vueuse/core";
4
4
 
5
5
  import AcButton from "../button/Button.vue";
6
6
  import AcButtons from "../button/Buttons.vue";
7
7
 
8
- const ArrowDownIcon = defineAsyncComponent(() => import("../icons/ArrowDownIcon.vue"));
9
- const RefreshIcon = defineAsyncComponent(() => import("../icons/RefreshIcon.vue"));
10
- const CloseIcon = defineAsyncComponent(() => import("../icons/CloseIcon.vue"));
8
+ import ArrowIcon from "../icons/ArrowIcon.vue";
9
+ import RefreshIcon from "../icons/RefreshIcon.vue";
10
+ import CloseIcon from "../icons/CloseIcon.vue";
11
11
 
12
12
  type Option = { text: string; value: string };
13
13
  interface prop {
@@ -104,7 +104,7 @@ watch(isOpen, (n) => {
104
104
 
105
105
  <ac-buttons>
106
106
  <button class="button ac-button is-white" @click="handleClear">
107
- <ArrowDownIcon />
107
+ <ArrowIcon />
108
108
  </button>
109
109
 
110
110
  <ac-button modifier-classes="is-white" @click="$emit('onRefreshClick')">
@@ -1,45 +0,0 @@
1
- import moment from "moment";
2
- // import { useNow, useThrottleFn } from '@vueuse/core'
3
-
4
- const getTime = (option) => {
5
- if (parseInt(option.time, 10) < 0 || !option.time) {
6
- return undefined;
7
- }
8
- let time = option.time;
9
-
10
- // moment(option.time).valueOf('x') needs to convert pharmer's api date to epoch time
11
- time = moment(option.time).valueOf("x") ? moment(option.time).valueOf("x") : time * 1000;
12
-
13
- return moment(time).format("MMM DD YYYY, h:mm A");
14
- };
15
- const getDayDifferences = (options) => {
16
- const past = moment(options.past).isValid() ? moment(options.past).valueOf("x") / 1000 : options.past;
17
- const now = Date.now() / 1000;
18
- const diff = now - past;
19
- if (parseInt(options.past, 10) > 10) {
20
- let ret = Math.floor(diff / 86400);
21
- let unit = "";
22
- if (diff < 60) {
23
- ret = parseInt(diff, 10);
24
- unit = " Second";
25
- } else if (diff < 3600) {
26
- ret = parseInt(diff / 60, 10);
27
- unit = " Minute";
28
- } else if (diff < 86400) {
29
- ret = parseInt(diff / 3600, 10);
30
- unit = " Hour";
31
- } else {
32
- ret = parseInt(diff / 86400, 10);
33
- unit = " Day";
34
- }
35
- unit += ret > 1 ? "s" : "";
36
- return ret + unit;
37
- }
38
- return undefined;
39
- };
40
-
41
- export default {
42
- getTime,
43
- // formatMoment,
44
- getDayDifferences,
45
- };