@appscode/design-system 2.0.0 → 2.0.2-alpha.1

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 (82) hide show
  1. package/main.scss +4 -4
  2. package/package.json +1 -1
  3. package/{base → vue-components/styles/base}/utilities/_grid.scss +1 -1
  4. package/{components → vue-components/styles/components}/_all.scss +3 -1
  5. package/vue-components/styles/components/_button.scss +59 -0
  6. package/{components → vue-components/styles/components}/ui-builder/_ui-builder.scss +17 -17
  7. package/{components → vue-components/styles/components}/ui-builder/_vue-open-api.scss +35 -35
  8. package/vue-components/v3/button/Button.vue +1 -59
  9. package/vue-components/v3/form-fields/AcSingleInput.vue +3 -1
  10. package/vue-components/v3/modal/Modal.vue +7 -2
  11. package/vue-components/v3/navbar/Notification.vue +1 -1
  12. package/vue-components/v3/navbar/User.vue +67 -31
  13. /package/{base → vue-components/styles/base}/_video-player.scss +0 -0
  14. /package/{base → vue-components/styles/base}/utilities/_all.scss +0 -0
  15. /package/{base → vue-components/styles/base}/utilities/_colors.scss +0 -0
  16. /package/{base → vue-components/styles/base}/utilities/_customize-bulma.scss +0 -0
  17. /package/{base → vue-components/styles/base}/utilities/_extended.scss +0 -0
  18. /package/{base → vue-components/styles/base}/utilities/_global.scss +0 -0
  19. /package/{base → vue-components/styles/base}/utilities/_layouts.scss +0 -0
  20. /package/{base → vue-components/styles/base}/utilities/_mixin.scss +0 -0
  21. /package/{base → vue-components/styles/base}/utilities/_spacing.scss +0 -0
  22. /package/{base → vue-components/styles/base}/utilities/_typography.scss +0 -0
  23. /package/{components → vue-components/styles/components}/_ac-alert-box.scss +0 -0
  24. /package/{components → vue-components/styles/components}/_ac-calendar.scss +0 -0
  25. /package/{components → vue-components/styles/components}/_ac-code-highlight.scss +0 -0
  26. /package/{components → vue-components/styles/components}/_ac-content-layout.scss +0 -0
  27. /package/{components → vue-components/styles/components}/_ac-drag.scss +0 -0
  28. /package/{components → vue-components/styles/components}/_ac-modal.scss +0 -0
  29. /package/{components → vue-components/styles/components}/_ac-options.scss +0 -0
  30. /package/{components → vue-components/styles/components}/_ac-select-box.scss +0 -0
  31. /package/{components → vue-components/styles/components}/_ac-table.scss +0 -0
  32. /package/{components → vue-components/styles/components}/_ac-tabs.scss +0 -0
  33. /package/{components → vue-components/styles/components}/_ac-tags.scss +0 -0
  34. /package/{components → vue-components/styles/components}/_accordion.scss +0 -0
  35. /package/{components → vue-components/styles/components}/_add-card.scss +0 -0
  36. /package/{components → vue-components/styles/components}/_app-drawer.scss +0 -0
  37. /package/{components → vue-components/styles/components}/_breadcumb.scss +0 -0
  38. /package/{components → vue-components/styles/components}/_buttons.scss +0 -0
  39. /package/{components → vue-components/styles/components}/_card-body-wrapper.scss +0 -0
  40. /package/{components → vue-components/styles/components}/_dashboard-header.scss +0 -0
  41. /package/{components → vue-components/styles/components}/_direct-deploy.scss +0 -0
  42. /package/{components → vue-components/styles/components}/_getkeeper.scss +0 -0
  43. /package/{components → vue-components/styles/components}/_go-to-top.scss +0 -0
  44. /package/{components → vue-components/styles/components}/_graph.scss +0 -0
  45. /package/{components → vue-components/styles/components}/_image-upload.scss +0 -0
  46. /package/{components → vue-components/styles/components}/_input-card.scss +0 -0
  47. /package/{components → vue-components/styles/components}/_input.scss +0 -0
  48. /package/{components → vue-components/styles/components}/_left-sidebar-menu.scss +0 -0
  49. /package/{components → vue-components/styles/components}/_monaco-editor.scss +0 -0
  50. /package/{components → vue-components/styles/components}/_multi-select.scss +0 -0
  51. /package/{components → vue-components/styles/components}/_navbar.scss +0 -0
  52. /package/{components → vue-components/styles/components}/_nested-list.scss +0 -0
  53. /package/{components → vue-components/styles/components}/_overview-info.scss +0 -0
  54. /package/{components → vue-components/styles/components}/_overview-page.scss +0 -0
  55. /package/{components → vue-components/styles/components}/_pagination.scss +0 -0
  56. /package/{components → vue-components/styles/components}/_payment-card.scss +0 -0
  57. /package/{components → vue-components/styles/components}/_preloader.scss +0 -0
  58. /package/{components → vue-components/styles/components}/_preview-modal.scss +0 -0
  59. /package/{components → vue-components/styles/components}/_pricing-table.scss +0 -0
  60. /package/{components → vue-components/styles/components}/_progress-bar.scss +0 -0
  61. /package/{components → vue-components/styles/components}/_report.scss +0 -0
  62. /package/{components → vue-components/styles/components}/_subscription-card.scss +0 -0
  63. /package/{components → vue-components/styles/components}/_table-of-content.scss +0 -0
  64. /package/{components → vue-components/styles/components}/_terminal.scss +0 -0
  65. /package/{components → vue-components/styles/components}/_tfa.scss +0 -0
  66. /package/{components → vue-components/styles/components}/_transitions.scss +0 -0
  67. /package/{components → vue-components/styles/components}/_widget-menu.scss +0 -0
  68. /package/{components → vue-components/styles/components}/_wizard.scss +0 -0
  69. /package/{components → vue-components/styles/components}/ac-toaster/_ac-toasted.scss +0 -0
  70. /package/{components → vue-components/styles/components}/bbum/_activities-header.scss +0 -0
  71. /package/{components → vue-components/styles/components}/bbum/_all.scss +0 -0
  72. /package/{components → vue-components/styles/components}/bbum/_card-team.scss +0 -0
  73. /package/{components → vue-components/styles/components}/bbum/_information-center.scss +0 -0
  74. /package/{components → vue-components/styles/components}/bbum/_left-sidebar.scss +0 -0
  75. /package/{components → vue-components/styles/components}/bbum/_mobile-desktop.scss +0 -0
  76. /package/{components → vue-components/styles/components}/bbum/_post.scss +0 -0
  77. /package/{components → vue-components/styles/components}/bbum/_sign-up-notification.scss +0 -0
  78. /package/{components → vue-components/styles/components}/bbum/_single-post-preview.scss +0 -0
  79. /package/{components → vue-components/styles/components}/bbum/_user-profile.scss +0 -0
  80. /package/{layouts → vue-components/styles/layouts}/_404.scss +0 -0
  81. /package/{layouts → vue-components/styles/layouts}/_all.scss +0 -0
  82. /package/{layouts → vue-components/styles/layouts}/_code-preview.scss +0 -0
package/main.scss CHANGED
@@ -1,6 +1,6 @@
1
1
  @charset "utf-8";
2
2
  // customize bulma css
3
- @import "@/assets/design-system/base/utilities/_customize-bulma.scss";
3
+ @import "@/components/vue-components/styles/base/utilities/_customize-bulma.scss";
4
4
 
5
5
  // Third party CSS
6
6
  @import "../node_modules/bulma/bulma.sass";
@@ -11,13 +11,13 @@
11
11
  @import "vue-multiselect/dist/vue-multiselect.css";
12
12
 
13
13
  // BASE
14
- @import "./base/utilities/all";
14
+ @import "@/components/vue-components/styles/base/utilities/all";
15
15
 
16
16
  // LAYOUTS
17
- @import "./layouts/all";
17
+ @import "@/components/vue-components/styles/layouts/all";
18
18
 
19
19
  // COMPONENTS
20
- @import "./components/all";
20
+ @import "@/components/vue-components/styles/components/all";
21
21
 
22
22
  // //BASE - Base styles, variables, mixins
23
23
  // @import "base/video-player";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appscode/design-system",
3
- "version": "2.0.0",
3
+ "version": "2.0.2-alpha.1",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -22,7 +22,7 @@
22
22
  grid-column: auto;
23
23
  }
24
24
 
25
- @for $i from 0 through 30 {
25
+ @for $i from 0 through 32 {
26
26
  .gap-#{$i} {
27
27
  gap: #{$i}px;
28
28
  }
@@ -26,8 +26,10 @@
26
26
  // @import "bbum/all";
27
27
  // @import "wizard";
28
28
 
29
+ // @import "button";
30
+
29
31
  @import "terminal";
30
- @import "input";
32
+ // @import "input";
31
33
  @import "multi-select";
32
34
  @import "report";
33
35
  @import "getkeeper";
@@ -0,0 +1,59 @@
1
+ .button {
2
+ &.ac-button {
3
+ padding: 8px 16px;
4
+ font-weight: 500;
5
+ line-height: 1;
6
+
7
+ &.is-primary {
8
+ &.is-light {
9
+ color: $primary;
10
+ &:focus:not(:hover) {
11
+ color: inherit;
12
+ }
13
+ }
14
+ }
15
+ &.is-warning {
16
+ &.is-light {
17
+ color: $yellow-30;
18
+ &:focus:not(:hover) {
19
+ color: inherit;
20
+ }
21
+ }
22
+ }
23
+
24
+ &.is-success {
25
+ &.is-light {
26
+ color: $green-30;
27
+ &:focus:not(:hover) {
28
+ color: inherit;
29
+ }
30
+ }
31
+ }
32
+ &.is-light {
33
+ &.is-loading {
34
+ &::after {
35
+ border-color: transparent transparent $primary-5 $primary-5 !important;
36
+ }
37
+ }
38
+ &.is-outlined {
39
+ &:hover {
40
+ border-color: inherit;
41
+ }
42
+ }
43
+ }
44
+
45
+ &.is-small {
46
+ padding: 4px 12px;
47
+ &:not(.is-rounded) {
48
+ border-radius: 4px;
49
+ }
50
+ }
51
+ &.is-medium {
52
+ font-size: 1rem;
53
+ height: 36px;
54
+ }
55
+ }
56
+ }
57
+ button.is-primary {
58
+ background-color: $primary;
59
+ }
@@ -403,24 +403,24 @@
403
403
  }
404
404
  }
405
405
  // buttons
406
- .button {
407
- &.ac-button {
408
- &.is-medium {
409
- font-size: 1rem;
410
- height: 36px;
411
- }
412
- &.is-tinny {
413
- height: 24px;
414
- padding: 0 8px;
415
- }
416
- }
417
- }
406
+ // .button {
407
+ // &.ac-button {
408
+ // &.is-medium {
409
+ // font-size: 1rem;
410
+ // height: 36px;
411
+ // }
412
+ // &.is-tinny {
413
+ // height: 24px;
414
+ // padding: 0 8px;
415
+ // }
416
+ // }
417
+ // }
418
418
 
419
- .button[disabled] {
420
- &.is-ghost {
421
- border-color: transparent !important;
422
- }
423
- }
419
+ // .button[disabled] {
420
+ // &.is-ghost {
421
+ // border-color: transparent !important;
422
+ // }
423
+ // }
424
424
 
425
425
  p.is-error,
426
426
  span.is-error {
@@ -619,41 +619,41 @@
619
619
  }
620
620
 
621
621
  // button scss
622
- .button {
623
- &.ac-button {
624
- padding: 8px 16px;
625
- font-weight: 500;
626
- line-height: 1;
627
-
628
- &.is-light {
629
- &.is-loading {
630
- &::after {
631
- border-color: transparent transparent #1c1c1c #1c1c1c !important;
632
- }
633
- }
634
- }
635
- &.is-ghost {
636
- border-color: transparent !important;
637
- }
638
- &.is-square {
639
- border: 1px solid $primary-95;
640
- }
641
- &.is-small {
642
- padding: 4px 9px;
643
- }
644
- &.is-medium {
645
- font-size: 1rem;
646
- height: 36px;
647
- }
648
- }
649
- &:focus {
650
- outline: none;
651
- box-shadow: none;
652
- }
653
- }
654
- button.is-primary {
655
- background-color: $primary;
656
- }
622
+ // .button {
623
+ // &.ac-button {
624
+ // padding: 8px 16px;
625
+ // font-weight: 500;
626
+ // line-height: 1;
627
+
628
+ // &.is-light {
629
+ // &.is-loading {
630
+ // &::after {
631
+ // border-color: transparent transparent #1c1c1c #1c1c1c !important;
632
+ // }
633
+ // }
634
+ // }
635
+ // &.is-ghost {
636
+ // border-color: transparent !important;
637
+ // }
638
+ // &.is-square {
639
+ // border: 1px solid $primary-95;
640
+ // }
641
+ // &.is-small {
642
+ // padding: 4px 9px;
643
+ // }
644
+ // &.is-medium {
645
+ // font-size: 1rem;
646
+ // height: 36px;
647
+ // }
648
+ // }
649
+ // &:focus {
650
+ // outline: none;
651
+ // box-shadow: none;
652
+ // }
653
+ // }
654
+ // button.is-primary {
655
+ // background-color: $primary;
656
+ // }
657
657
 
658
658
  .is-refresh {
659
659
  i.fa {
@@ -69,63 +69,5 @@ const showUnpluginIcon = computed(() => {
69
69
  </template>
70
70
 
71
71
  <style lang="scss" scoped>
72
- .button {
73
- &.ac-button {
74
- padding: 8px 16px;
75
- font-weight: 500;
76
- line-height: 1;
77
-
78
- &.is-primary {
79
- &.is-light {
80
- color: $primary;
81
- &:focus:not(:hover) {
82
- color: inherit;
83
- }
84
- }
85
- }
86
- &.is-warning {
87
- &.is-light {
88
- color: $yellow-30;
89
- &:focus:not(:hover) {
90
- color: inherit;
91
- }
92
- }
93
- }
94
-
95
- &.is-success {
96
- &.is-light {
97
- color: $green-30;
98
- &:focus:not(:hover) {
99
- color: inherit;
100
- }
101
- }
102
- }
103
- &.is-light {
104
- &.is-loading {
105
- &::after {
106
- border-color: transparent transparent #1c1c1c #1c1c1c !important;
107
- }
108
- }
109
- &.is-outlined {
110
- &:hover {
111
- border-color: inherit;
112
- }
113
- }
114
- }
115
-
116
- &.is-small {
117
- padding: 4px 12px;
118
- &:not(.is-rounded) {
119
- border-radius: 4px;
120
- }
121
- }
122
- &.is-medium {
123
- font-size: 1rem;
124
- height: 36px;
125
- }
126
- }
127
- }
128
- button.is-primary {
129
- background-color: $primary;
130
- }
72
+ @import "../../../vue-components/styles/components/button";
131
73
  </style>
@@ -18,4 +18,6 @@ withDefaults(defineProps<Props>(), {
18
18
  </div>
19
19
  </template>
20
20
 
21
- <style lang="scss"></style>
21
+ <style lang="scss">
22
+ @import "../../../vue-components/styles/components/input";
23
+ </style>
@@ -101,10 +101,10 @@ watch(
101
101
  <header-item>
102
102
  <ac-button
103
103
  v-if="!isCloseOptionDisabled"
104
- modifier-classes="is-square is-transparent"
104
+ modifier-classes="is-white"
105
105
  :icon-image="crossIcon"
106
- @click.stop="destroyModal"
107
106
  data-testid="modal-generic-close-icon"
107
+ @click.stop="destroyModal"
108
108
  />
109
109
  </header-item>
110
110
  </header-items>
@@ -152,6 +152,11 @@ watch(
152
152
  left: 0;
153
153
  top: 0;
154
154
  z-index: 9999;
155
+ .ac-button {
156
+ &.is-white {
157
+ margin-right: -10px;
158
+ }
159
+ }
155
160
 
156
161
  &:after {
157
162
  position: absolute;
@@ -170,7 +170,7 @@ function notificationTime(time: number) {
170
170
  }
171
171
 
172
172
  .notification-content {
173
- width: calc(100% - 100px);
173
+ width: calc(100% - 60px);
174
174
  h6 {
175
175
  font-size: 14px;
176
176
  font-weight: 500;
@@ -14,13 +14,14 @@ interface FormatedOrgs extends User {
14
14
  }
15
15
 
16
16
  interface Props {
17
- user: User;
17
+ user: FormatedOrgs;
18
18
  serverDomain?: string;
19
19
  accountsDomain?: string;
20
20
  showAccountSwitcher?: boolean;
21
21
  organizations?: Array<FormatedOrgs>;
22
22
  showThemeMode?: boolean;
23
23
  isPlatformDomain?: boolean;
24
+ isLoggedinUserAdmin?: boolean;
24
25
  }
25
26
 
26
27
  const props = withDefaults(defineProps<Props>(), {
@@ -30,6 +31,7 @@ const props = withDefaults(defineProps<Props>(), {
30
31
  organizations: () => [],
31
32
  showThemeMode: false,
32
33
  isPlatformDomain: false,
34
+ isLoggedinUserAdmin: false,
33
35
  });
34
36
 
35
37
  const emit = defineEmits(["set:theme", "on-logout", "activeorg$set"]);
@@ -83,6 +85,8 @@ const setTheme = (val: string) => {
83
85
  emit("set:theme", val);
84
86
  };
85
87
 
88
+ const pathName = window.location.origin;
89
+
86
90
  watch(dropDownStatus, (n) => {
87
91
  if (n === "open") {
88
92
  nextTick(() => {
@@ -116,45 +120,71 @@ watch(dropDownStatus, (n) => {
116
120
  class="user-profile-wrapper"
117
121
  @mouseleave="onMouseLeave()"
118
122
  >
119
- <div class="profile-area">
120
- <div class="profile-photo">
121
- <img
122
- :src="user.avatar_url"
123
- alt="User Photo"
124
- class="width-32 height-32"
125
- />
126
- <button class="camera-icon"></button>
123
+ <a
124
+ :href="`${serverDomain}/${user.username}`"
125
+ :title="user.username.toUpperCase()"
126
+ data-testid="user-profile-link"
127
+ class="line-break-anywhere is-ellipsis-1 has-text-weight-medium"
128
+ >
129
+ <div class="profile-area">
130
+ <div class="profile-photo">
131
+ <img
132
+ :src="user.avatar_url"
133
+ alt="User Photo"
134
+ class="width-32 height-32"
135
+ />
136
+ <button class="camera-icon"></button>
137
+ </div>
138
+ <div class="profile-info" style="width: calc(100% - 60px)">
139
+ <strong> {{ user.username }} </strong>
140
+ <p>
141
+ {{
142
+ user.isPersonalAccount || user.is_admin
143
+ ? "Personal Account"
144
+ : "Organization"
145
+ }}
146
+ </p>
147
+ </div>
127
148
  </div>
128
- <div class="profile-info" style="width: calc(100% - 60px)">
149
+ </a>
150
+ <transition-group name="list" tag="ul" class="list-items py-2">
151
+ <li key="settings" v-if="serverDomain !== pathName">
129
152
  <a
130
- :href="`${serverDomain}/${user.username}`"
131
- :title="user.username.toUpperCase()"
132
- data-testid="user-profile-link"
133
- class="line-break-anywhere is-ellipsis-1 has-text-weight-medium"
134
- >{{ user.username }}</a
153
+ v-if="user.isPersonalAccount"
154
+ data-testid="user-settings-link"
155
+ :href="`${serverDomain}/user/settings/`"
135
156
  >
136
- <a :href="`mailto:${user.email}`"> {{ user.email }}</a>
137
- </div>
138
- </div>
139
- <transition-group
140
- name="list"
141
- tag="ul"
142
- class="list-items py-2 ac-scrollbar px-0"
143
- >
144
- <li key="settings">
157
+ <span class="icon"><HeroiconsCog6Tooth /></span>
158
+ <span>Settings</span>
159
+ </a>
145
160
  <a
161
+ v-else
146
162
  data-testid="user-settings-link"
147
- :href="`${serverDomain}/user/settings/`"
148
- ><span class="icon"><HeroiconsCog6Tooth /></span
149
- ><span>Settings</span></a
163
+ :href="`${serverDomain}/${user.username}/settings`"
150
164
  >
165
+ <span class="icon"><HeroiconsCog6Tooth /></span
166
+ ><span>Settings</span>
167
+ </a>
151
168
  </li>
152
- <li v-if="user.is_admin" key="site-admin">
153
- <a data-testid="site-admin-link" :href="`${accountsDomain}/admin`"
154
- ><span class="icon"><HeroiconsWrenchScrewdriver /></span
155
- ><span>Site Administration</span></a
169
+ <li key="settings-platform" v-else>
170
+ <NuxtLink
171
+ v-if="user.isPersonalAccount"
172
+ data-testid="user-settings-link"
173
+ :to="`/user/settings/`"
156
174
  >
175
+ <span class="icon"><HeroiconsCog6Tooth /></span>
176
+ <span>Settings</span>
177
+ </NuxtLink>
178
+ <NuxtLink
179
+ v-else
180
+ data-testid="user-settings-link"
181
+ :to="`/${user.username}/settings`"
182
+ >
183
+ <span class="icon"><HeroiconsCog6Tooth /></span
184
+ ><span>Settings</span>
185
+ </NuxtLink>
157
186
  </li>
187
+
158
188
  <li
159
189
  v-if="showAccountSwitcher"
160
190
  :class="`is-${dropDownStatus}`"
@@ -226,6 +256,12 @@ watch(dropDownStatus, (n) => {
226
256
  </li>
227
257
  </transition-group>
228
258
  </li>
259
+ <li v-if="isLoggedinUserAdmin || user.is_admin" key="site-admin">
260
+ <a data-testid="site-admin-link" :href="`${accountsDomain}/admin`"
261
+ ><span class="icon"><HeroiconsWrenchScrewdriver /></span
262
+ ><span>Site Administration</span></a
263
+ >
264
+ </li>
229
265
  <li key="signout" @click="$emit('on-logout')">
230
266
  <a
231
267
  data-testid="user-logout-link"