@appscode/design-system 2.6.22-alpha-0.0.5 → 2.6.22-alpha-0.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appscode/design-system",
3
- "version": "2.6.22-alpha-0.0.5",
3
+ "version": "2.6.22-alpha-0.0.6",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -1,20 +1,169 @@
1
- <script setup>
2
- import { defineProps } from "vue";
3
- const props = defineProps({
4
- title: {
5
- type: String,
6
- default: "Appscodelabs",
7
- },
8
- logo: {
9
- type: String,
10
- default: "https://placehold.co/100x100",
11
- },
12
- url: {
13
- type: String,
14
- default: "#",
15
- },
1
+ <script setup lang="ts">
2
+ import Avatar from "../avatar/Avatar.vue";
3
+
4
+ interface RightSidebar {
5
+ title?: string;
6
+ logo?: string;
7
+ url?: string;
8
+ viewType?: string;
9
+ members?: Array<{
10
+ name: string;
11
+ avatar: string;
12
+ profileUrl: string;
13
+ }>;
14
+ teams?: Array<{
15
+ name: string;
16
+ color: string;
17
+ }>;
18
+ }
19
+
20
+ withDefaults(defineProps<RightSidebar>(), {
21
+ title: "Appscodelabs",
22
+ logo: "https://placehold.co/100x100",
23
+ url: "#",
24
+ viewType: "",
25
+ members: () => [
26
+ { name: "Alice", avatar: "https://randomuser.me/api/portraits/women/1.jpg", profileUrl: "#" },
27
+ { name: "Bob", avatar: "https://randomuser.me/api/portraits/men/1.jpg", profileUrl: "#" },
28
+ { name: "Charlie", avatar: "https://randomuser.me/api/portraits/women/2.jpg", profileUrl: "#" },
29
+ { name: "Dave", avatar: "https://randomuser.me/api/portraits/men/2.jpg", profileUrl: "#" },
30
+ { name: "Emma", avatar: "https://randomuser.me/api/portraits/women/3.jpg", profileUrl: "#" },
31
+ { name: "Frank", avatar: "https://randomuser.me/api/portraits/men/3.jpg", profileUrl: "#" },
32
+ { name: "Grace", avatar: "https://randomuser.me/api/portraits/women/4.jpg", profileUrl: "#" },
33
+ ],
34
+ teams: () => [
35
+ { name: "Frontend", color: "green" },
36
+ { name: "Backend", color: "purple" },
37
+ { name: "UI", color: "green-light" },
38
+ { name: "Database", color: "blue" },
39
+ { name: "Socialmedia", color: "gray" },
40
+ ],
16
41
  });
17
42
  </script>
43
+
18
44
  <template>
19
- <a :href="props.url" class="org-thumb" :title="props.title"><img :src="props.logo" :alt="props.title" /></a>
45
+ <div class="teams-members-container">
46
+ <!-- Organization Thumbnail -->
47
+ <div v-if="viewType === 'organization'" class="org-section">
48
+ <h5>Organizations</h5>
49
+ <ul class="org-list">
50
+ <li v-for="i in 8" :key="i">
51
+ <a :href="url" class="org-thumb" :title="title">
52
+ <img :src="logo" :alt="title" />
53
+ </a>
54
+ </li>
55
+ </ul>
56
+ </div>
57
+
58
+ <!-- Teams Section -->
59
+ <div v-if="viewType === 'team-member'" class="teams-section">
60
+ <h5>Teams ({{ teams.length }})</h5>
61
+ <div class="teams-list">
62
+ <span v-for="(team, index) in teams" :key="index" :class="['team-tag', team.color]">
63
+ <a :href="url" :title="title" class="team-name">
64
+ {{ team.name }}
65
+ </a>
66
+ </span>
67
+ </div>
68
+ </div>
69
+
70
+ <!-- Members Section -->
71
+ <div v-if="viewType === 'team-member'" class="members-section">
72
+ <h5>Members ({{ members.length }})</h5>
73
+ <div class="members-list">
74
+ <a v-for="(member, idx) in members" :key="idx" :href="member.profileUrl" target="_blank" class="member-link">
75
+ <Avatar :rounded="true" size="24x24" :imgUrl="member.avatar" />
76
+ </a>
77
+ </div>
78
+ </div>
79
+ </div>
20
80
  </template>
81
+
82
+ <style lang="scss">
83
+ .teams-members-container {
84
+ display: flex;
85
+ flex-direction: column;
86
+ gap: 16px;
87
+ }
88
+
89
+ /* Organization Thumbnail */
90
+ .org-list {
91
+ display: flex;
92
+ gap: 8px;
93
+ flex-wrap: wrap;
94
+ }
95
+ .org-thumb {
96
+ border: 1px solid $color-border;
97
+ border-radius: 4px;
98
+ padding: 6px;
99
+ height: 48px;
100
+ width: 48px;
101
+ display: flex;
102
+ align-items: center;
103
+ justify-content: center;
104
+ img {
105
+ height: 32px;
106
+ width: auto;
107
+ background-color: #ddd;
108
+ }
109
+ }
110
+
111
+ /* Teams Section */
112
+ h5 {
113
+ font-size: 1.1rem;
114
+ font-weight: 600;
115
+ }
116
+
117
+ .teams-list {
118
+ display: flex;
119
+ flex-wrap: wrap;
120
+ gap: 8px;
121
+ }
122
+
123
+ .team-tag {
124
+ padding: 6px 12px;
125
+ border-radius: 8px;
126
+ font-size: 0.9rem;
127
+ font-weight: 500;
128
+ color: white;
129
+ a {
130
+ color: white;
131
+ text-decoration: none;
132
+ }
133
+ }
134
+
135
+ /* Team Colors */
136
+ .green {
137
+ background-color: #28a745;
138
+ }
139
+ .purple {
140
+ background-color: #6f42c1;
141
+ }
142
+ .green-light {
143
+ background-color: #17a2b8;
144
+ }
145
+ .blue {
146
+ background-color: #007bff;
147
+ }
148
+ .gray {
149
+ background-color: #6c757d;
150
+ }
151
+
152
+ /* Members Section */
153
+ .members-list {
154
+ display: flex;
155
+ flex-wrap: wrap;
156
+ gap: 8px;
157
+ }
158
+
159
+ .member-link {
160
+ text-decoration: none;
161
+ }
162
+
163
+ .member-avatar {
164
+ width: 40px;
165
+ height: 40px;
166
+ border-radius: 50%;
167
+ object-fit: cover;
168
+ }
169
+ </style>