@sk-web-gui/core 0.1.71 → 0.1.72

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": "@sk-web-gui/core",
3
- "version": "0.1.71",
3
+ "version": "0.1.72",
4
4
  "license": "MIT",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -31,5 +31,5 @@
31
31
  "postcss-import": "^14.0.2",
32
32
  "tailwindcss": "^2.2.4"
33
33
  },
34
- "gitHead": "da5a8271e573b0d6fa137cb15ab1a8bffde0a467"
34
+ "gitHead": "117ee0f6d06650b88bbece69606efdcd4d8be836"
35
35
  }
@@ -59,6 +59,7 @@ function badgeOutline(colors) {
59
59
  },
60
60
  },
61
61
 
62
+
62
63
  "&[data-color='primary']": {
63
64
  '@apply border-primary': {},
64
65
  '@apply text-primary': {},
@@ -86,7 +87,7 @@ module.exports = badge = (colors) => ({
86
87
  '@apply relative': {},
87
88
  '@apply m-0': {},
88
89
  '@apply inline-flex items-center justify-center content-center align-middle': {},
89
- '@apply font-medium leading-none': {},
90
+ '@apply font-sans leading-none': {},
90
91
 
91
92
  '&-fullrounded': {
92
93
  '@apply rounded-full': {},
@@ -104,55 +105,103 @@ module.exports = badge = (colors) => ({
104
105
  // sizing
105
106
  '&-sm': {
106
107
  '@apply text-opacity-0 text-[0rem] overflow-hidden rounded-full': {},
107
- minHeight: '9px',
108
- maxHeight: '9px',
109
- minWidth: '9px',
108
+ minHeight: '10px',
109
+ maxHeight: '10px',
110
+ minWidth: '10px',
111
+
112
+ '&.noborder': {
113
+ '@apply border-none': {},
114
+ minHeight: '6px',
115
+ maxHeight: '6px',
116
+ minWidth: '6px',
117
+ }
110
118
  },
111
119
 
112
120
  '&-md': {
113
121
  '@apply text-xs font-bold': {},
114
- minHeight: '23px',
115
- maxHeight: '23px',
116
- minWidth: '23px',
122
+ minHeight: '24px',
123
+ maxHeight: '24px',
124
+ minWidth: '24px',
125
+
126
+ '&.noborder': {
127
+ '@apply border-none': {},
128
+ minHeight: '20px',
129
+ maxHeight: '20px',
130
+ minWidth: '20px',
131
+ }
117
132
 
118
133
  },
119
134
 
120
135
  '&-lg': {
121
136
  '@apply text-sm font-bold': {},
122
- minHeight: '27px',
123
- maxHeight: '27px',
124
- minWidth: '27px',
137
+ minHeight: '28px',
138
+ maxHeight: '28px',
139
+ minWidth: '28px',
140
+
141
+ '&.noborder': {
142
+ '@apply border-none': {},
143
+ minHeight: '24px',
144
+ maxHeight: '24px',
145
+ minWidth: '24px',
146
+ }
125
147
 
126
148
  },
127
149
 
128
150
  '&-standard-sm': {
129
151
  '@apply right-[-4px] self-center' : {},
152
+ '&.noborder': {
153
+ '@apply right-[-5px]': {},
154
+ }
130
155
  },
131
156
  '&-standard-md': {
132
157
  '@apply right-[-4px] self-center': {},
158
+ '&.noborder': {
159
+ '@apply right-[-5px]': {},
160
+ }
133
161
  },
134
162
  '&-standard-lg': {
135
163
  '@apply right-[-4px] self-center': {},
164
+ '&.noborder': {
165
+ '@apply right-[-5px]': {},
166
+ }
136
167
  },
137
168
 
138
169
  '&-super-sm': {
139
170
  '@apply right-[-2px] top-[-5px]': {},
171
+ '&.noborder': {
172
+ '@apply right-[-3px]': {},
173
+ }
140
174
  },
141
175
  '&-super-md': {
142
176
  '@apply right-[-3px] top-[-8px]': {},
177
+ '&.noborder': {
178
+ '@apply right-[-4px]': {},
179
+ }
143
180
  },
144
181
  '&-super-lg': {
145
182
  '@apply right-[-4px] top-[-8px]': {},
183
+ '&.noborder': {
184
+ '@apply right-[-5px]': {},
185
+ }
146
186
  },
147
187
 
148
188
  '&-superoverlap-sm': {
149
189
  '@apply right-[3px] top-[-5px]': {},
190
+ '&.noborder': {
191
+ '@apply right-[2px]': {},
192
+ }
150
193
  },
151
194
  '&-superoverlap-md': {
152
195
  '@apply right-[8px] top-[-6px]': {},
196
+ '&.noborder': {
197
+ '@apply right-[7px]': {},
198
+ }
153
199
  },
154
200
  '&-superoverlap-lg': {
155
201
  '@apply right-[8px] top-[-8px]': {},
202
+ '&.noborder': {
203
+ '@apply right-[7px]': {},
204
+ }
156
205
  },
157
206
 
158
207
 
@@ -260,9 +260,20 @@ module.exports = Forms = (colors) => ({
260
260
  },
261
261
 
262
262
  '.form-textarea': {
263
- //"@apply leading-tight": {},
264
- minHeight: '5rem',
263
+ maxHeight: 'none',
264
+ '&.form-field': {
265
+ '&-sm': {
266
+ '@apply py-[0.85rem] min-h-[4rem]': {},
267
+ },
268
+
269
+ '&-md': {
270
+ '@apply py-[0.9rem] min-h-[4.4rem]': {},
271
+ },
265
272
 
273
+ '&-lg': {
274
+ '@apply py-[1.1rem] min-h-[4.8rem]': {},
275
+ },
276
+ },
266
277
  '&-counter': {
267
278
  '@apply mt-xs text-right': {},
268
279
  },
@@ -0,0 +1,14 @@
1
+ module.exports = ProfilePicture = () => ({
2
+ '.profile-picture': {
3
+ '@apply relative overflow-hidden flex-shrink-0 text-xs leading-none flex items-center justify-center text-center w-[48px] h-[48px] mr-sm rounded-full border-2 border-primary':
4
+ {},
5
+
6
+ '.profile-picture-img': {
7
+ '@apply bg-cover absolute inset-0 bg-center text-xs leading-none': {},
8
+ },
9
+ '.icon': {
10
+ width: '3.8rem!important',
11
+ height: '3.8rem!important',
12
+ },
13
+ },
14
+ });
@@ -0,0 +1,33 @@
1
+ module.exports = Profile = () => ({
2
+ '.profile-container': {
3
+ '@apply flex items-center': {},
4
+
5
+ '.profile-title': {
6
+ '@apply font-bold text-base m-0': {},
7
+ },
8
+ '.profile-subtitle': {
9
+ '@apply text-sm leading-[20px] m-0': {},
10
+ },
11
+
12
+ '&.minimal': {
13
+ '.profile-title': {
14
+ overflow: 'hidden',
15
+ 'text-overflow': 'ellipsis',
16
+ display: '-webkit-box',
17
+ '-webkit-line-clamp': '1' /* number of lines to show */,
18
+ 'line-clamp': '1',
19
+ '-webkit-box-orient': 'vertical',
20
+ },
21
+ '.profile-subtitle': {
22
+ overflow: 'hidden',
23
+ 'text-overflow': 'ellipsis',
24
+ display: '-webkit-box',
25
+ '-webkit-line-clamp': '1' /* number of lines to show */,
26
+ 'line-clamp': '1',
27
+ '-webkit-box-orient': 'vertical',
28
+ },
29
+ },
30
+
31
+ // '&.truncate': { '@apply truncate pr-md': {} },
32
+ },
33
+ });
@@ -38,7 +38,7 @@ module.exports = Menu = () => ({
38
38
  },
39
39
 
40
40
  '&-label': {
41
- '@apply flex-grow select-none': {},
41
+ '@apply flex-grow select-none flex items-center': {},
42
42
  },
43
43
 
44
44
  '&.active': {
@@ -58,20 +58,20 @@ module.exports = Menu = () => ({
58
58
  '@apply min-h-[48px] max-h-[48px] relative flex flex-wrap items-center': {},
59
59
 
60
60
  '.menu-item-link': {
61
- '@apply flex-grow flex items-center text-base text-left justify-start py-sm pr-sm h-full': {},
61
+ '@apply flex-grow relative flex items-center text-base text-left justify-start py-sm pr-sm h-full': {},
62
62
  },
63
63
 
64
64
  '.expand': {
65
65
  '@apply w-[50px] h-full flex justify-center items-center ml-auto p-0': {},
66
66
 
67
- span: {
67
+ '&-button': {
68
68
  '@apply flex justify-center items-center border-l border-gray-stroke h-[24px] w-[45px]': {},
69
69
  },
70
70
  },
71
71
  },
72
72
 
73
73
  '&.open': {
74
- '&:not(.moved-away) + .menu-item:not(.new-item) > .wrapper': {
74
+ '& + .menu-item > .wrapper': {
75
75
  '@apply border-t': {},
76
76
  },
77
77
  },
@@ -96,7 +96,7 @@ module.exports = Menu = () => ({
96
96
  },
97
97
 
98
98
  '& .menu-item-move-button': {
99
- '@apply -translate-x-full text-gray-stroke absolute py-sm inset-y-0 my-auto': {},
99
+ '@apply -translate-x-full no-underline text-gray-stroke absolute py-sm inset-y-0 my-auto': {},
100
100
 
101
101
  svg: {
102
102
  '@apply h-full': {},
@@ -106,43 +106,7 @@ module.exports = Menu = () => ({
106
106
  },
107
107
  },
108
108
 
109
- '.menu-item-error': {
110
- '@apply text-error -ml-[5px] absolute -translate-x-full': {},
111
- },
112
-
113
- '&.moved-away': {
114
- '@apply text-gray pointer-events-none': {},
115
-
116
- '.menu-item-link': {
117
- '@apply opacity-[78%] relative': {},
118
-
119
- '&::before': {
120
- '@apply absolute -translate-x-full -ml-sm block w-[10px] h-[10px] rounded-full bg-warning': {},
121
- content: '""',
122
- },
123
- },
124
-
125
- '.menu-item-error, .menu-item-changes, .items': {
126
- '@apply hidden': {},
127
- },
128
-
129
- '.menu-item-changes': {
130
- '@apply bg-gray': {},
131
- },
132
-
133
- '.menu-item-move-button': {
134
- '@apply hidden': {},
135
- },
136
-
137
- '.expand': {
138
- '@apply opacity-[78%]': {},
139
- path: {
140
- '@apply fill-gray-stroke': {},
141
- },
142
- },
143
- },
144
-
145
- '&.movedHere': {
109
+ '&.moved-here': {
146
110
  "[draggable='true']": {
147
111
  '@apply text-warning': {},
148
112
  },
@@ -155,21 +119,6 @@ module.exports = Menu = () => ({
155
119
  '@apply h-[44px]': {},
156
120
  },
157
121
  },
158
-
159
- '&.new-item': {
160
- '.wrapper': {
161
- '@apply border-[3px] border-dashed border-[rgba(0,0,0,0.3)]': {},
162
- boxSizing: 'border-box',
163
-
164
- '.menu-item-move-button': {
165
- '@apply -ml-[3px]': {},
166
- },
167
- },
168
- },
169
-
170
- '& .menu-item-changes': {
171
- '@apply bg-warning rounded-full w-[24px] h-[24px] text-center text-sm font-bold text-white': {},
172
- },
173
122
  },
174
123
 
175
124
  '&-separator': {
@@ -207,7 +156,7 @@ module.exports = Menu = () => ({
207
156
  '@apply border-l border-r border-svartvik-200': {},
208
157
  },
209
158
 
210
- '&:last-child.open > .items': {
159
+ '&.open > .items': {
211
160
  '@apply border-b border-svartvik-200': {},
212
161
  },
213
162
 
@@ -223,13 +172,7 @@ module.exports = Menu = () => ({
223
172
  '@apply h-[56px] max-h-[56px]': {},
224
173
  },
225
174
 
226
- '&.new-item': {
227
- '> .wrapper .menu-item-link': {
228
- '@apply h-[50px] max-h-[50px]': {},
229
- },
230
- },
231
-
232
- '&.open:not(.new-item) > .wrapper': {
175
+ '&.open > .wrapper': {
233
176
  '@apply border-b border-svartvik-200': {},
234
177
  },
235
178
 
@@ -247,12 +190,6 @@ module.exports = Menu = () => ({
247
190
  },
248
191
  },
249
192
 
250
- '&.new-item, .new-item': {
251
- '> .wrapper .menu-item-link': {
252
- '@apply h-[42px] max-h-[42px]': {},
253
- },
254
- },
255
-
256
193
  '> .wrapper > .menu-item-link': {
257
194
  paddingLeft: '6.4rem',
258
195
  },
@@ -310,69 +247,4 @@ module.exports = Menu = () => ({
310
247
  },
311
248
  },
312
249
  },
313
-
314
- // Sparkle icon scss
315
- '.sparkle-icon': {
316
- '@apply inline-flex w-[25px] h-[18px] ml-md gap-[6px]': {},
317
- },
318
- '.sparkle-vert-lg': {
319
- '@apply relative w-0 h-0 border-b-[10px] border-b-primary border-x-[4px] border-x-transparent border-t-[4px] border-t-transparent top-[-4px]':
320
- {},
321
- '&::after': {
322
- '@apply content-[""] absolute left-[-4px] top-[12px] w-0 h-0 border-x-[4px] border-b-[4px] border-x-transparent border-b-transparent border-t-[10px] border-t-primary':
323
- {},
324
- },
325
- },
326
- '.sparkle-horizontal-lg': {
327
- '@apply relative w-0 h-0 border-b-[10px] border-b-primary border-x-[4px] border-x-transparent border-t-[4px] border-t-transparent right-[-7px] top-[-10px] rotate-[90deg]':
328
- {},
329
- '&::after': {
330
- '@apply content-[""] absolute left-[-4px] top-[10px] w-0 h-0 border-x-[4px] border-b-[4px] border-x-transparent border-b-transparent border-t-[10px] border-t-primary':
331
- {},
332
- },
333
- },
334
- '.sparkle-vert-sm': {
335
- '@apply relative w-0 h-0 border-b-[6px] border-b-primary border-x-[2px] border-x-transparent border-t-[2px] border-t-transparent top-[-2px]':
336
- {},
337
- '&::after': {
338
- '@apply content-[""] absolute left-[-1.8px] top-[6px] w-0 h-0 border-x-[2px] border-b-[2px] border-x-transparent border-b-transparent border-t-[6px] border-t-primary':
339
- {},
340
- },
341
- },
342
- '.sparkle-horizontal-sm': {
343
- '@apply relative w-0 h-0 border-b-[6px] border-b-primary border-x-[2px] border-x-transparent border-t-[6px] border-t-transparent right-[-5.5px] top-[-8px] rotate-[90deg]':
344
- {},
345
- '&::after': {
346
- '@apply content-[""] absolute left-[-2.2px] top-[5px] w-0 h-0 border-x-[2px] border-b-[6px] border-x-transparent border-b-transparent border-t-[6px] border-t-primary':
347
- {},
348
- },
349
- },
350
- '.twinkling-1': {
351
- '@apply animate-pulse delay-75': {},
352
- },
353
- '.twinkling-2': {
354
- '@apply animate-fast-pulse delay-75': {},
355
- },
356
- '.twinkling-3': {
357
- '@apply animate-slow-pulse delay-1000': {},
358
- },
359
-
360
- '@keyframes slow-pulse': {
361
- '75%': {
362
- opacity: 0,
363
- },
364
- },
365
- '@keyframes fast-pulse': {
366
- '65%': {
367
- opacity: 0,
368
- },
369
- },
370
-
371
- '.animate-slow-pulse': {
372
- animation: 'slow-pulse 2s cubic-bezier(0.1, 0.8, 0.2, 0.8) infinite',
373
- },
374
-
375
- '.animate-fast-pulse': {
376
- animation: 'fast-pulse 1.5s cubic-bezier(0.4, 0.8, 0.8, 1) infinite',
377
- },
378
250
  });
package/src/index.js CHANGED
@@ -47,6 +47,9 @@ const Header = require('./components/header');
47
47
 
48
48
  const SearchBar = require('./components/search-bar');
49
49
 
50
+ const ProfilePicture = require('./components/profile-picture');
51
+ const Profile = require('./components/profile');
52
+
50
53
  const components = [
51
54
  Alert,
52
55
  AlertBanner,
@@ -89,6 +92,9 @@ const components = [
89
92
  Pagination,
90
93
  Footer,
91
94
  Header,
95
+
96
+ ProfilePicture,
97
+ Profile,
92
98
  ];
93
99
 
94
100
  const defaultColors = ['primary', 'secondary'];