@appscode/design-system 2.4.0 → 2.4.2

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.4.0",
3
+ "version": "2.4.2",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -19,6 +19,7 @@
19
19
  .is-checkradio.is-primary[type="radio"] + label:after {
20
20
  background: $ac-primary !important;
21
21
  }
22
+
22
23
  .is-checkradio.is-primary[type="checkbox"]:checked + label::before,
23
24
  .is-checkradio.is-primary[type="checkbox"]:checked + label:before,
24
25
  .is-checkradio.is-primary[type="radio"]:checked + label::before,
@@ -36,7 +37,186 @@
36
37
  .switch[type="checkbox"].is-primary:checked + label:before {
37
38
  background-color: $ac-primary;
38
39
  }
40
+
39
41
  .is-checkradio[type="radio"] + label::after,
40
42
  .is-checkradio[type="radio"] + label:after {
41
43
  background-color: $ac-primary;
42
44
  }
45
+
46
+ // 2024 AppsCode Custom Checkbox, Radio, Switch style
47
+ // checkbox
48
+ .ac-checkbox {
49
+ position: relative;
50
+ display: flex;
51
+ align-items: center;
52
+ gap: 8px;
53
+ cursor: pointer;
54
+ user-select: none;
55
+
56
+ input {
57
+ position: absolute;
58
+ width: 0;
59
+ height: 0;
60
+ opacity: 0;
61
+ cursor: pointer;
62
+ }
63
+
64
+ input:checked ~ .checkmark {
65
+ background: $ac-primary;
66
+ border: 1px solid $ac-primary;
67
+ }
68
+
69
+ input:checked ~ .checkmark::after {
70
+ opacity: 1;
71
+ transition: all 0.2s ease;
72
+ }
73
+
74
+ .checkmark {
75
+ position: relative;
76
+ display: block;
77
+ top: 0;
78
+ left: 1px;
79
+ width: 18px;
80
+ height: 18px;
81
+ background: white;
82
+ border-radius: 4px;
83
+ border: 1px solid $color-border-dark;
84
+ transition: all 0.2s ease;
85
+
86
+ &::after {
87
+ position: absolute;
88
+ display: block;
89
+ content: "";
90
+ left: 50%;
91
+ top: 45%;
92
+ width: 4px;
93
+ height: 8px;
94
+ border: solid white;
95
+ border-width: 0 2px 2px 0;
96
+ transform: translate(-50%, -50%) rotate(45deg);
97
+ opacity: 0;
98
+ transition: all 0.2s ease;
99
+ }
100
+ }
101
+ }
102
+
103
+ // radio button
104
+ .ac-radio {
105
+ &:not(:last-child) {
106
+ margin-bottom: 8px;
107
+ }
108
+
109
+ // Hide the actual radio inputs off-screen
110
+ [type="radio"] {
111
+ position: absolute;
112
+ left: -9999px;
113
+ }
114
+
115
+ // Style for labels associated with radio buttons
116
+ [type="radio"] + label {
117
+ position: relative;
118
+ padding-left: 24px;
119
+ cursor: pointer;
120
+ line-height: 20px;
121
+ display: inline-block;
122
+
123
+ // Base circle style
124
+ &::before {
125
+ content: "";
126
+ position: absolute;
127
+ left: 0;
128
+ top: 0;
129
+ width: 18px;
130
+ height: 18px;
131
+ border: 1px solid $color-border-dark;
132
+ border-radius: 50%; // Full circle
133
+ background: #fff;
134
+ }
135
+
136
+ // Inner dot for selected radio button
137
+ &::after {
138
+ content: "";
139
+ position: absolute;
140
+ top: 4px;
141
+ left: 4px;
142
+ width: 10px;
143
+ height: 10px;
144
+ background: $ac-primary;
145
+ border-radius: 50%;
146
+ opacity: 0;
147
+ transform: scale(0);
148
+ transition:
149
+ opacity 0.2s ease,
150
+ transform 0.2s ease;
151
+ }
152
+ }
153
+
154
+ // Checked state styles
155
+ [type="radio"]:checked + label::after {
156
+ opacity: 1;
157
+ transform: scale(1);
158
+ }
159
+ }
160
+
161
+ .ac-switch {
162
+ .switch {
163
+ position: relative;
164
+ display: inline-block;
165
+ width: 36px;
166
+ height: 18px;
167
+
168
+ input {
169
+ position: absolute;
170
+ opacity: 0;
171
+ width: 100%;
172
+ height: 100%;
173
+ z-index: 1; // Keeps input clickable
174
+ cursor: pointer;
175
+ }
176
+
177
+ .slider {
178
+ position: absolute;
179
+ top: 0;
180
+ left: 0;
181
+ right: 0;
182
+ bottom: 0;
183
+ background-color: #ccc;
184
+ transition:
185
+ background-color 0.4s,
186
+ box-shadow 0.4s;
187
+
188
+ &.round {
189
+ border-radius: 34px;
190
+
191
+ &::before {
192
+ border-radius: 50%;
193
+ }
194
+ }
195
+
196
+ &:before {
197
+ content: "";
198
+ position: absolute;
199
+ height: 12px;
200
+ width: 12px;
201
+ left: 4px;
202
+ bottom: 3px;
203
+ background-color: white;
204
+ transition:
205
+ transform 0.4s,
206
+ background-color 0.4s;
207
+ }
208
+ }
209
+
210
+ input:checked + .slider {
211
+ background-color: hsl(var(--primary-hue), var(--primary-saturation), var(--primary-light));
212
+ }
213
+
214
+ input:checked + .slider:before {
215
+ transform: translateX(16px);
216
+ }
217
+
218
+ input:focus-visible + .slider {
219
+ box-shadow: 0 0 3px hsl(var(--primary-hue), var(--primary-saturation), var(--primary-light));
220
+ }
221
+ }
222
+ }
@@ -6,7 +6,32 @@
6
6
  padding-right: 32px;
7
7
  }
8
8
 
9
+ .custom-select-placeholder {
10
+ border: 1px solid $color-border-dark;
11
+ padding: 8px 15px;
12
+ border-radius: 4px;
13
+ line-height: 1;
14
+ cursor: pointer;
15
+ display: flex;
16
+ align-items: center;
17
+ height: 36px;
18
+
19
+ &:hover {
20
+ border: 1px solid $ac-primary;
21
+ }
22
+ }
23
+
9
24
  &.is-extra-small {
25
+ height: 32px;
26
+
27
+ .custom-select-placeholder {
28
+ height: 32px;
29
+ }
30
+
31
+ .ac-field {
32
+ top: 5px;
33
+ }
34
+
10
35
  .buttons {
11
36
  .button {
12
37
  height: 28px;
@@ -34,6 +59,7 @@
34
59
  right: 2px;
35
60
  top: 2px;
36
61
  margin: 0;
62
+ z-index: 9;
37
63
 
38
64
  .button {
39
65
  margin: 0 !important;
@@ -54,7 +80,7 @@
54
80
  width: 100%;
55
81
  max-height: 500px;
56
82
  overflow-y: auto;
57
- transition: 0.3s ease-in-out;
83
+ transition: 0.2s ease-in-out;
58
84
  opacity: 0;
59
85
  visibility: hidden;
60
86
 
@@ -284,7 +284,7 @@
284
284
  color: $color-heading;
285
285
  position: absolute;
286
286
  z-index: 2;
287
- transition: 0.3s ease-in-out;
287
+ transition: 0.1s ease-in-out;
288
288
 
289
289
  .is-required {
290
290
  color: $danger;
@@ -27,7 +27,13 @@ const CloseIcon = defineAsyncComponent(() => import("../icons/CloseIcon.vue"));
27
27
  <div class="ac-single-input is-small is-selectbox" :class="[isOpen ? 'is-open' : '']" style="z-index: 2">
28
28
  <!-- add 'show-label' class for move top -->
29
29
  <label for="custom-select" class="ac-label show-label">Select Option</label>
30
- <input type="text" value="Select" />
30
+
31
+ <!-- <input type="text" value="Select" /> -->
32
+ <p class="custom-select-placeholder">
33
+ <span class="is-ellipsis-1">
34
+ Select Value Select ValueSelect ValueSelect ValueSelect ValueSelect ValueSelect Value
35
+ </span>
36
+ </p>
31
37
 
32
38
  <div v-if="multiselect" class="ac-field field is-grouped is-clipped">
33
39
  <div class="control">