@mptw/skylens-ui 1.4.41 → 1.4.43

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.
@@ -9,7 +9,7 @@
9
9
  SLLink.sider-toggle(
10
10
  v-if="icon !== ''"
11
11
  :class="`${toggleColor !== '' ? `sider-toggle-${toggleColor}` : ''}`"
12
- :style="`margin-top: ${123 + order * (44 + 4)}px`"
12
+ :style="`margin-top: ${146 + order * (44 + 4)}px`"
13
13
  :title="toggleTitle"
14
14
  @mouseenter="onMouseEnteredToggle"
15
15
  @mouseleave="onMouseLeavedToggle"
@@ -407,13 +407,13 @@ export default defineComponent({
407
407
  @apply s('hover:bg-primary-600') s('hover:text-white') s('hover:font-bold')
408
408
 
409
409
  &-left
410
- @apply flex-grow-0 flex-shrink-0
410
+ @apply flex-grow-0 flex-shrink-0 inline-flex
411
411
 
412
412
  &-right
413
- @apply flex-grow flex items-center flex-nowrap space-x-1
413
+ @apply flex-grow flex items-center justify-between flex-nowrap space-x-1
414
414
 
415
415
  .sidebar-nav-group-section-title
416
- @apply flex-grow pl-1 whitespace-nowrap
416
+ @apply flex-grow inline-flex items-center h-6 pl-1 whitespace-nowrap
417
417
 
418
418
  .sidebar-nav-group-item-section-status
419
419
  @apply flex-grow-0 flex-shrink-0
@@ -10,12 +10,26 @@ NuxtLink.sidebar-nav-link-item(
10
10
  @mouseenter='onIconMouseEnter',
11
11
  @mouseleave='onIconMouseLeave'
12
12
  )
13
- SLIcon(
14
- :icon='itemConfig.preIcon'
13
+ .item-pre-icon
14
+ SLIcon(
15
+ :icon='itemConfig.preIcon'
16
+ )
17
+ .item-status(
18
+ v-if='itemConfig.status !== "normal" && itemConfig.status !== "lock"'
19
+ :class='{ "status--new": itemConfig.status === "new" }'
15
20
  )
21
+ SLIcon(
22
+ v-if='itemConfig.status === "new"',
23
+ icon='new-circle'
24
+ )
25
+ .inline-flex.items-center.justify-center.w-4.h-4(v-else-if='itemConfig.status === "badge"')
26
+ .bg-danger.rounded-full(class='w-1.5 h-1.5')
16
27
  .sidebar-nav-link-item-right
17
28
  .item-title {{ itemConfig.title }}
18
- .item-post-icon(v-if='itemConfig.status !== "normal"')
29
+ .item-post-icon(
30
+ v-if='itemConfig.status !== "normal"'
31
+ :class='{ "status--new": itemConfig.status === "new" }'
32
+ )
19
33
  SLIcon(
20
34
  v-if='itemConfig.status === "lock"',
21
35
  icon='lock'
@@ -24,7 +38,7 @@ NuxtLink.sidebar-nav-link-item(
24
38
  v-else-if='itemConfig.status === "new"',
25
39
  icon='new-circle'
26
40
  )
27
- .inline-flex.items-center.justify-center.w-4.h-4(v-else)
41
+ .inline-flex.items-center.justify-center.w-4.h-4(v-else-if='itemConfig.status === "badge"')
28
42
  .bg-danger.rounded-full(class='w-1.5 h-1.5')
29
43
  ClientOnly
30
44
  Teleport(to='#nav')
@@ -224,6 +238,9 @@ export default defineComponent({
224
238
  &-left
225
239
  @apply s('lg:inline-flex')
226
240
 
241
+ .item-status
242
+ @apply s('lg:inline-flex')
243
+
227
244
  &-right
228
245
  @apply s('lg:hidden')
229
246
 
@@ -261,13 +278,38 @@ export default defineComponent({
261
278
  @apply s('hover:bg-primary-600') s('hover:text-white') s('hover:font-bold')
262
279
 
263
280
  &-left
264
- @apply flex-grow-0 flex-shrink-0
281
+ @apply relative flex-grow-0 flex-shrink-0
282
+
283
+ .item-pre-icon
284
+ @apply inline-flex
285
+
286
+ .item-status
287
+ @apply absolute s('-top-2.5') s('-left-2.5') text-base hidden
288
+
289
+ &.status--new
290
+ &:before
291
+ content ''
292
+ @apply block absolute s('top-1/2') s('left-1/2') w-2 h-2 s('-translate-x-1/2') s('-translate-y-1/2') bg-white
293
+
294
+ .icon
295
+ @apply relative text-highlight-500
265
296
 
266
297
  &-right
267
- @apply flex-grow flex items-center justify-start flex-nowrap s('space-x-1.5')
298
+ @apply flex-grow flex items-center flex-nowrap s('space-x-1.5')
268
299
 
269
300
  .item-title
270
- @apply pl-1 whitespace-nowrap
301
+ @apply flex-grow inline-flex items-center h-6 pl-1 whitespace-nowrap
302
+
303
+ .item-post-icon
304
+ @apply flex-grow-0 flex-shrink-0 relative inline-flex
305
+
306
+ &.status--new
307
+ &:before
308
+ content ''
309
+ @apply block absolute s('top-1/2') s('left-1/2') w-2 h-2 s('-translate-x-1/2') s('-translate-y-1/2') bg-white
310
+
311
+ .icon
312
+ @apply relative text-highlight-500
271
313
 
272
314
  .sidebar-nav-link-item + .sidebar-nav-link-item
273
315
  @apply mt-1
@@ -17,7 +17,7 @@ export enum NavItemStatus {
17
17
  Plus = 'plus',
18
18
  Lock = 'lock',
19
19
  New = 'new',
20
- Notice = 'notice',
20
+ Badge = 'badge',
21
21
  }
22
22
 
23
23
  export type NavItemDivide = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mptw/skylens-ui",
3
3
  "type": "module",
4
- "version": "1.4.41",
4
+ "version": "1.4.43",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",