@appscode/design-system 2.6.22-alpha-0.0.8 → 2.6.22-alpha-0.0.10

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.8",
3
+ "version": "2.6.22-alpha-0.0.10",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -6,3 +6,4 @@
6
6
  @import "vendor";
7
7
  @import "payment-card";
8
8
  @import "subscription-card";
9
+ @import "usage-card";
@@ -0,0 +1,44 @@
1
+ .cards-bg {
2
+ background-color: $primary-light-gray;
3
+ border: 1px solid $color-border;
4
+ border-radius: 4px;
5
+ padding: 16px;
6
+ h5 {
7
+ margin-bottom: 8px;
8
+ }
9
+ }
10
+
11
+ .card.usage-card {
12
+ border: 1px solid $color-border;
13
+ border-radius: 4px;
14
+ background-color: #fff;
15
+ box-shadow: none;
16
+ flex-grow: 1;
17
+ flex-basis: 240px;
18
+ .card-heading {
19
+ padding: 8px 16px;
20
+ min-height: 40px;
21
+ display: flex;
22
+ justify-content: space-between;
23
+ align-items: center;
24
+ border-bottom: 1px solid $color-border;
25
+ }
26
+
27
+ .card-body {
28
+ padding: 8px 16px;
29
+ p {
30
+ margin-bottom: 8px;
31
+ strong {
32
+ font-size: 16px;
33
+ font-weight: 500;
34
+ color: $color-heading;
35
+ }
36
+
37
+ span {
38
+ font-size: 13px;
39
+ font-weight: 400;
40
+ color: $color-text;
41
+ }
42
+ }
43
+ }
44
+ }
@@ -176,6 +176,17 @@
176
176
  }
177
177
 
178
178
  .ac-switch {
179
+ &.is-fullwidth {
180
+ background-color: $primary-light-gray;
181
+ padding: 16px;
182
+ border-radius: 4px;
183
+ display: flex;
184
+ justify-content: space-between;
185
+ border: 1px solid $color-border;
186
+ label {
187
+ color: $color-heading;
188
+ }
189
+ }
179
190
  .switch {
180
191
  position: relative;
181
192
  display: inline-block;
@@ -1,10 +1,10 @@
1
1
  .mail-details {
2
2
  display: grid;
3
- grid-template-columns: 460px calc(100% - 460px);
3
+ grid-template-columns: 360px calc(100% - 360px);
4
4
  }
5
5
 
6
6
  .inbox-sidebar {
7
- width: 460px;
7
+ width: 360px;
8
8
  border-right: 1px solid $color-border;
9
9
  // padding: 20px;
10
10
  // box-shadow: 2px 0px 6px 2px rgba(0, 0, 0, 0.04);
@@ -33,7 +33,7 @@
33
33
  .single-message {
34
34
  transition: 0.2s ease-in-out;
35
35
  padding: 10px 20px;
36
- border-radius: 4px;
36
+ // border-radius: 4px;
37
37
  position: relative;
38
38
  z-index: 9;
39
39
  width: calc(100% + 40px);
@@ -41,7 +41,16 @@
41
41
  border-bottom: 1px solid $color-border;
42
42
 
43
43
  &.is-unread {
44
+ background-color: $secondary-light-gray;
45
+ }
46
+ &.is-active {
44
47
  background-color: $primary-light-gray;
48
+ border-top: 1px solid $ac-primary;
49
+ border-bottom: 1px solid $ac-primary;
50
+
51
+ h6 {
52
+ color: $ac-primary;
53
+ }
45
54
  }
46
55
  &:hover {
47
56
  background-color: hsla(var(--secondary-hue), 12%, 95%);
@@ -60,9 +69,9 @@
60
69
 
61
70
  .message-details {
62
71
  max-width: 768px;
63
- margin: 16px 64px 16px 64px;
72
+ margin: 0;
64
73
  @include until-widescreen {
65
- margin: 16px 32px 16px 64px;
74
+ margin: 0;
66
75
  }
67
76
  }
68
77
 
@@ -110,7 +119,7 @@ body:not(.message-details) .inbox-sidebar {
110
119
 
111
120
  body:has(.message-details) {
112
121
  .inbox-sidebar {
113
- width: 460px;
122
+ width: 360px;
114
123
  border-right: 1px solid #e2e8f0;
115
124
  }
116
125
  .ac-system-content {
@@ -124,9 +133,11 @@ body:has(.message-details) {
124
133
  overflow: hidden;
125
134
  transition: 0.2s ease-in-out;
126
135
  &.is-open {
127
- background-color: $primary-light-gray;
136
+ // background-color: $primary-light-gray;
128
137
  padding: 16px;
129
138
  border: 2px solid $ac-primary;
139
+ border-radius: 8px;
140
+ margin: 8px;
130
141
  }
131
142
  pre {
132
143
  max-width: 100%;
@@ -134,3 +145,15 @@ body:has(.message-details) {
134
145
  max-height: 300px;
135
146
  }
136
147
  }
148
+
149
+ // transition css
150
+ /* we will explain what these classes do next! */
151
+ .v-enter-active,
152
+ .v-leave-active {
153
+ transition: opacity 0.5s ease;
154
+ }
155
+
156
+ .v-enter-from,
157
+ .v-leave-to {
158
+ opacity: 0;
159
+ }
@@ -1,3 +1,7 @@
1
+ type SpecType = {
2
+ values: Record<string, unknown>;
3
+ };
4
+
1
5
  export interface PreviewYamlType {
2
6
  content: string;
3
7
  initContent: string;
@@ -7,4 +11,5 @@ export interface PreviewYamlType {
7
11
  uid: string;
8
12
  key?: string;
9
13
  gvr?: string;
14
+ spec?: SpecType;
10
15
  }
@@ -20,6 +20,7 @@ withDefaults(defineProps<Props>(), {
20
20
  <div class="overview-cards b-t-1">
21
21
  <slot />
22
22
  </div>
23
+ <slot name="body" />
23
24
  </div>
24
25
  </template>
25
26
  <style lang="scss" scoped>
@@ -0,0 +1,30 @@
1
+ <script setup lang="ts">
2
+ withDefaults(
3
+ defineProps<{
4
+ title: string;
5
+ usages: Array<{ value: unknown; unit: string }>;
6
+ }>(),
7
+ {
8
+ title: "title",
9
+ usages: () => [],
10
+ },
11
+ );
12
+ </script>
13
+ <template>
14
+ <div class="card usage-card">
15
+ <div class="card-heading">
16
+ <p>{{ title }}</p>
17
+ <slot name="icon" />
18
+ </div>
19
+ <div class="card-body">
20
+ <p v-for="(usage, idx) in usages" :key="idx">
21
+ <strong>{{ usage.value }}</strong
22
+ ><span>/{{ usage.unit }}</span>
23
+ </p>
24
+ </div>
25
+ </div>
26
+ </template>
27
+
28
+ <style lang="scss" scoped>
29
+ @import "../../styles/components/cards/usage-card";
30
+ </style>
@@ -0,0 +1,22 @@
1
+ <script setup lang="ts">
2
+ withDefaults(
3
+ defineProps<{
4
+ title?: string;
5
+ }>(),
6
+ {
7
+ title: "Total Usage Data",
8
+ },
9
+ );
10
+ </script>
11
+ <template>
12
+ <div class="cards-bg is-flex-wrap-wrap">
13
+ <h5>{{ title }}</h5>
14
+ <div class="is-flex gap-16">
15
+ <slot name="usage-card" />
16
+ </div>
17
+ </div>
18
+ </template>
19
+
20
+ <style lang="scss" scoped>
21
+ @import "../../styles/components/cards/usage-card";
22
+ </style>
@@ -24,7 +24,7 @@ const props = withDefaults(defineProps<prop>(), {
24
24
  optionType: "simple",
25
25
  });
26
26
 
27
- defineEmits(["onRefreshClick"]);
27
+ const emit = defineEmits(["select", "remove", "onRefreshClick"]);
28
28
 
29
29
  const selectedValue = ref<Option>();
30
30
  const labelHoisted = ref(false);
@@ -50,6 +50,7 @@ const filteredOptions = computed(() => {
50
50
  const onLabelClick = (op: Option) => {
51
51
  selectedValue.value = op;
52
52
  isOpen.value = false;
53
+ emit("select", op);
53
54
  };
54
55
 
55
56
  // handle label click
@@ -62,6 +63,7 @@ const selectClick = () => {
62
63
  const handleClear = () => {
63
64
  selectedValue.value = undefined;
64
65
  searchText.value = "";
66
+ emit("remove");
65
67
  };
66
68
 
67
69
  // handle depend on selected data
@@ -104,7 +106,7 @@ watch(isOpen, (n) => {
104
106
 
105
107
  <ac-buttons>
106
108
  <button class="button ac-button is-white" @click="handleClear">
107
- <ArrowIcon />
109
+ <CloseIcon />
108
110
  </button>
109
111
 
110
112
  <ac-button modifier-classes="is-white" @click="$emit('onRefreshClick')">
@@ -112,7 +114,7 @@ watch(isOpen, (n) => {
112
114
  </ac-button>
113
115
 
114
116
  <ac-button modifier-classes="is-white" @click="isOpen = !isOpen">
115
- <CloseIcon :direction="isOpen ? 'down' : 'up'" />
117
+ <ArrowIcon :direction="isOpen ? 'down' : 'up'" />
116
118
  </ac-button>
117
119
  </ac-buttons>
118
120
 
@@ -18,7 +18,7 @@ const model = defineModel({ type: Boolean });
18
18
  </script>
19
19
 
20
20
  <template>
21
- <div class="ac-switch is-flex is-align-items-center gap-8">
21
+ <div class="ac-switch is-flex is-align-items-center gap-8" :class="modifierClasses">
22
22
  <label :for="name">{{ label }}</label>
23
23
  <label class="switch">
24
24
  <input
@@ -27,7 +27,6 @@ const model = defineModel({ type: Boolean });
27
27
  type="checkbox"
28
28
  :name="name"
29
29
  class="switch is-rounded is-primary"
30
- :class="modifierClasses"
31
30
  :data-testid="dataTestId"
32
31
  />
33
32
  <span class="slider round"></span>