ui-svelte 0.2.3 → 0.2.4

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.
@@ -194,18 +194,14 @@
194
194
  aria-valuemin="0"
195
195
  aria-valuemax="100"
196
196
  >
197
- {#if isAnalyzing}
198
- <div class="media-loading">Analizando...</div>
199
- {:else}
200
- <div class="media-bars">
201
- {#each waveformData as height, i}
202
- {@const progress = duration > 0 ? currentTime / duration : 0}
203
- {@const barPosition = (i + 0.5) / waveformData.length}
204
- {@const isPlayed = barPosition <= progress}
205
- <div class="media-bar" class:active={isPlayed} style="height: {height * 100}%"></div>
206
- {/each}
207
- </div>
208
- {/if}
197
+ <div class="media-bars">
198
+ {#each waveformData as height, i}
199
+ {@const progress = duration > 0 ? currentTime / duration : 0}
200
+ {@const barPosition = (i + 0.5) / waveformData.length}
201
+ {@const isPlayed = barPosition <= progress}
202
+ <div class="media-bar" class:active={isPlayed} style="height: {height * 100}%"></div>
203
+ {/each}
204
+ </div>
209
205
  </div>
210
206
 
211
207
  <span class="media-time">{duration > 0 ? formatTime(duration - currentTime) : '0:00'}</span>
@@ -194,7 +194,7 @@
194
194
  }
195
195
 
196
196
  .btn-close {
197
- @apply absolute right-1 top-1;
197
+ @apply absolute right-2 top-2;
198
198
  }
199
199
  .btn-close-icon {
200
200
  @apply h-4 w-4 cursor-pointer;
@@ -72,16 +72,6 @@
72
72
  @apply bg-surface text-on-surface;
73
73
  }
74
74
 
75
- .card.is-surface.has-divider {
76
- .card-header {
77
- @apply border-on-surface;
78
- }
79
-
80
- .card-footer {
81
- @apply border-on-surface;
82
- }
83
- }
84
-
85
75
  .card.is-ghost {
86
76
  @apply bg-transparent;
87
77
  }
@@ -14,9 +14,20 @@
14
14
  endClass?: string;
15
15
  isBlurred?: boolean;
16
16
  isBordered?: boolean;
17
+ borderOnScrollOnly?: boolean;
17
18
  hideOnScroll?: boolean;
18
19
  isSticky?: boolean;
19
20
  isBoxed?: boolean;
21
+ variant?:
22
+ | 'primary'
23
+ | 'secondary'
24
+ | 'muted'
25
+ | 'success'
26
+ | 'info'
27
+ | 'warning'
28
+ | 'danger'
29
+ | 'surface'
30
+ | 'ghost';
20
31
  };
21
32
 
22
33
  const {
@@ -29,9 +40,11 @@
29
40
  centerClass,
30
41
  endClass,
31
42
  isBordered,
43
+ borderOnScrollOnly = false,
32
44
  isBlurred,
33
45
  isSticky,
34
46
  isBoxed,
47
+ variant = 'ghost',
35
48
  hideOnScroll
36
49
  }: Props = $props();
37
50
 
@@ -42,6 +55,18 @@
42
55
 
43
56
  const scroll = useScroll();
44
57
 
58
+ const variantClasses = {
59
+ primary: 'is-primary',
60
+ secondary: 'is-secondary',
61
+ muted: 'is-muted',
62
+ success: 'is-success',
63
+ info: 'is-info',
64
+ warning: 'is-warning',
65
+ danger: 'is-danger',
66
+ surface: 'is-surface',
67
+ ghost: 'is-ghost'
68
+ };
69
+
45
70
  $effect(() => {
46
71
  if (headerElement) {
47
72
  headerHeight = headerElement.offsetHeight;
@@ -70,13 +95,15 @@
70
95
  });
71
96
 
72
97
  const shouldBlur = $derived(isBlurred && scroll.isScrolled);
98
+ const shouldShowBorder = $derived(isBordered && (!borderOnScrollOnly || scroll.isScrolled));
73
99
  </script>
74
100
 
75
101
  <header
76
102
  bind:this={headerElement}
77
103
  class={cn(
78
104
  'appbar',
79
- isBordered && 'is-bordered',
105
+ variantClasses[variant],
106
+ shouldShowBorder && 'is-bordered',
80
107
  shouldBlur && 'is-blurred',
81
108
  isHidden && 'is-hidden',
82
109
  isSticky && 'is-sticky',
@@ -10,9 +10,11 @@ type Props = {
10
10
  endClass?: string;
11
11
  isBlurred?: boolean;
12
12
  isBordered?: boolean;
13
+ borderOnScrollOnly?: boolean;
13
14
  hideOnScroll?: boolean;
14
15
  isSticky?: boolean;
15
16
  isBoxed?: boolean;
17
+ variant?: 'primary' | 'secondary' | 'muted' | 'success' | 'info' | 'warning' | 'danger' | 'surface' | 'ghost';
16
18
  };
17
19
  declare const AppBar: import("svelte").Component<Props, {}, "">;
18
20
  type AppBar = ReturnType<typeof AppBar>;
@@ -16,6 +16,16 @@
16
16
  isBordered?: boolean;
17
17
  isBoxed?: boolean;
18
18
  hideOnScroll?: boolean;
19
+ variant?:
20
+ | 'primary'
21
+ | 'secondary'
22
+ | 'muted'
23
+ | 'success'
24
+ | 'info'
25
+ | 'warning'
26
+ | 'danger'
27
+ | 'surface'
28
+ | 'ghost';
19
29
  };
20
30
 
21
31
  const {
@@ -30,7 +40,8 @@
30
40
  isBordered,
31
41
  isBlurred,
32
42
  isBoxed,
33
- hideOnScroll
43
+ hideOnScroll,
44
+ variant = 'ghost'
34
45
  }: Props = $props();
35
46
 
36
47
  let footerElement = $state<HTMLElement | null>(null);
@@ -40,6 +51,18 @@
40
51
 
41
52
  const scroll = useScroll();
42
53
 
54
+ const variantClasses = {
55
+ primary: 'is-primary',
56
+ secondary: 'is-secondary',
57
+ muted: 'is-muted',
58
+ success: 'is-success',
59
+ info: 'is-info',
60
+ warning: 'is-warning',
61
+ danger: 'is-danger',
62
+ surface: 'is-surface',
63
+ ghost: 'is-ghost'
64
+ };
65
+
43
66
  $effect(() => {
44
67
  if (footerElement) {
45
68
  footerHeight = footerElement.offsetHeight;
@@ -70,6 +93,7 @@
70
93
  bind:this={footerElement}
71
94
  class={cn(
72
95
  'footer',
96
+ variantClasses[variant],
73
97
  isBordered && 'is-bordered',
74
98
  shouldBlur && 'is-blurred',
75
99
  isHidden && 'is-hidden',
@@ -12,6 +12,7 @@ type Props = {
12
12
  isBordered?: boolean;
13
13
  isBoxed?: boolean;
14
14
  hideOnScroll?: boolean;
15
+ variant?: 'primary' | 'secondary' | 'muted' | 'success' | 'info' | 'warning' | 'danger' | 'surface' | 'ghost';
15
16
  };
16
17
  declare const Footer: import("svelte").Component<Props, {}, "">;
17
18
  type Footer = ReturnType<typeof Footer>;
@@ -10,13 +10,43 @@
10
10
  contentClass?: string;
11
11
  headerClass?: string;
12
12
  footerClass?: string;
13
+ variant?:
14
+ | 'primary'
15
+ | 'secondary'
16
+ | 'muted'
17
+ | 'success'
18
+ | 'info'
19
+ | 'warning'
20
+ | 'danger'
21
+ | 'surface'
22
+ | 'ghost';
13
23
  };
14
24
 
15
- const { children, header, footer, rootClass, contentClass, headerClass, footerClass }: Props =
16
- $props();
25
+ const {
26
+ children,
27
+ header,
28
+ footer,
29
+ rootClass,
30
+ contentClass,
31
+ headerClass,
32
+ footerClass,
33
+ variant = 'ghost'
34
+ }: Props = $props();
35
+
36
+ const variantClasses = {
37
+ primary: 'is-primary',
38
+ secondary: 'is-secondary',
39
+ muted: 'is-muted',
40
+ success: 'is-success',
41
+ info: 'is-info',
42
+ warning: 'is-warning',
43
+ danger: 'is-danger',
44
+ surface: 'is-surface',
45
+ ghost: 'is-ghost'
46
+ };
17
47
  </script>
18
48
 
19
- <aside class={cn('sidebar', rootClass)}>
49
+ <aside class={cn('sidebar', variantClasses[variant], rootClass)}>
20
50
  {#if header}
21
51
  <div class={cn('sidebar-header', headerClass)}>
22
52
  {@render header()}
@@ -7,6 +7,7 @@ type Props = {
7
7
  contentClass?: string;
8
8
  headerClass?: string;
9
9
  footerClass?: string;
10
+ variant?: 'primary' | 'secondary' | 'muted' | 'success' | 'info' | 'warning' | 'danger' | 'surface' | 'ghost';
10
11
  };
11
12
  declare const Sidebar: import("svelte").Component<Props, {}, "">;
12
13
  type Sidebar = ReturnType<typeof Sidebar>;
@@ -35,4 +35,67 @@
35
35
  }
36
36
  }
37
37
  }
38
+ .appbar.is-primary {
39
+ @apply bg-on-primary text-primary;
40
+ }
41
+
42
+ .appbar.is-primary.is-solid {
43
+ @apply bg-primary text-on-primary;
44
+ }
45
+
46
+ .appbar.is-secondary {
47
+ @apply bg-on-secondary text-secondary;
48
+ }
49
+
50
+ .appbar.is-secondary.is-solid {
51
+ @apply bg-secondary text-on-secondary;
52
+ }
53
+
54
+ .appbar.is-success {
55
+ @apply bg-on-success text-success;
56
+ }
57
+
58
+ .appbar.is-success.is-solid {
59
+ @apply bg-success text-on-success;
60
+ }
61
+
62
+ .appbar.is-info {
63
+ @apply bg-on-info text-info;
64
+ }
65
+
66
+ .appbar.is-info.is-solid {
67
+ @apply bg-info text-on-info;
68
+ }
69
+
70
+ .appbar.is-warning {
71
+ @apply bg-on-warning text-warning;
72
+ }
73
+
74
+ .appbar.is-warning.is-solid {
75
+ @apply bg-warning text-on-warning;
76
+ }
77
+
78
+ .appbar.is-danger {
79
+ @apply bg-on-danger text-danger;
80
+ }
81
+
82
+ .appbar.is-danger.is-solid {
83
+ @apply bg-danger text-on-danger;
84
+ }
85
+
86
+ .appbar.is-muted {
87
+ @apply bg-muted text-on-muted;
88
+ }
89
+
90
+ .appbar.is-muted.is-solid {
91
+ @apply bg-on-muted text-muted;
92
+ }
93
+
94
+ .appbar.is-ghost {
95
+ @apply bg-background text-on-background;
96
+ }
97
+
98
+ .appbar.is-surface {
99
+ @apply bg-surface text-on-surface;
100
+ }
38
101
  }
@@ -9,4 +9,67 @@
9
9
  @apply overflow-hidden;
10
10
  }
11
11
  }
12
+ .dock.is-primary {
13
+ @apply bg-on-primary text-primary;
14
+ }
15
+
16
+ .dock.is-primary.is-solid {
17
+ @apply bg-primary text-on-primary;
18
+ }
19
+
20
+ .dock.is-secondary {
21
+ @apply bg-on-secondary text-secondary;
22
+ }
23
+
24
+ .dock.is-secondary.is-solid {
25
+ @apply bg-secondary text-on-secondary;
26
+ }
27
+
28
+ .dock.is-success {
29
+ @apply bg-on-success text-success;
30
+ }
31
+
32
+ .dock.is-success.is-solid {
33
+ @apply bg-success text-on-success;
34
+ }
35
+
36
+ .dock.is-info {
37
+ @apply bg-on-info text-info;
38
+ }
39
+
40
+ .dock.is-info.is-solid {
41
+ @apply bg-info text-on-info;
42
+ }
43
+
44
+ .dock.is-warning {
45
+ @apply bg-on-warning text-warning;
46
+ }
47
+
48
+ .dock.is-warning.is-solid {
49
+ @apply bg-warning text-on-warning;
50
+ }
51
+
52
+ .dock.is-danger {
53
+ @apply bg-on-danger text-danger;
54
+ }
55
+
56
+ .dock.is-danger.is-solid {
57
+ @apply bg-danger text-on-danger;
58
+ }
59
+
60
+ .dock.is-muted {
61
+ @apply bg-muted text-on-muted;
62
+ }
63
+
64
+ .dock.is-muted.is-solid {
65
+ @apply bg-on-muted text-muted;
66
+ }
67
+
68
+ .dock.is-ghost {
69
+ @apply bg-background text-on-background;
70
+ }
71
+
72
+ .dock.is-surface {
73
+ @apply bg-surface text-on-surface;
74
+ }
12
75
  }
@@ -32,4 +32,67 @@
32
32
  }
33
33
  }
34
34
  }
35
+ .footer.is-primary {
36
+ @apply bg-on-primary text-primary;
37
+ }
38
+
39
+ .footer.is-primary.is-solid {
40
+ @apply bg-primary text-on-primary;
41
+ }
42
+
43
+ .footer.is-secondary {
44
+ @apply bg-on-secondary text-secondary;
45
+ }
46
+
47
+ .footer.is-secondary.is-solid {
48
+ @apply bg-secondary text-on-secondary;
49
+ }
50
+
51
+ .footer.is-success {
52
+ @apply bg-on-success text-success;
53
+ }
54
+
55
+ .footer.is-success.is-solid {
56
+ @apply bg-success text-on-success;
57
+ }
58
+
59
+ .footer.is-info {
60
+ @apply bg-on-info text-info;
61
+ }
62
+
63
+ .footer.is-info.is-solid {
64
+ @apply bg-info text-on-info;
65
+ }
66
+
67
+ .footer.is-warning {
68
+ @apply bg-on-warning text-warning;
69
+ }
70
+
71
+ .footer.is-warning.is-solid {
72
+ @apply bg-warning text-on-warning;
73
+ }
74
+
75
+ .footer.is-danger {
76
+ @apply bg-on-danger text-danger;
77
+ }
78
+
79
+ .footer.is-danger.is-solid {
80
+ @apply bg-danger text-on-danger;
81
+ }
82
+
83
+ .footer.is-muted {
84
+ @apply bg-muted text-on-muted;
85
+ }
86
+
87
+ .footer.is-muted.is-solid {
88
+ @apply bg-on-muted text-muted;
89
+ }
90
+
91
+ .footer.is-ghost {
92
+ @apply bg-background text-on-background;
93
+ }
94
+
95
+ .footer.is-surface {
96
+ @apply bg-surface text-on-surface;
97
+ }
35
98
  }
@@ -14,4 +14,67 @@
14
14
  @apply relative flex min-h-0 w-full flex-col gap-3 p-3 overflow-hidden hover:overflow-y-auto;
15
15
  }
16
16
  }
17
+ .sidebar.is-primary {
18
+ @apply bg-on-primary text-primary;
19
+ }
20
+
21
+ .sidebar.is-primary.is-solid {
22
+ @apply bg-primary text-on-primary;
23
+ }
24
+
25
+ .sidebar.is-secondary {
26
+ @apply bg-on-secondary text-secondary;
27
+ }
28
+
29
+ .sidebar.is-secondary.is-solid {
30
+ @apply bg-secondary text-on-secondary;
31
+ }
32
+
33
+ .sidebar.is-success {
34
+ @apply bg-on-success text-success;
35
+ }
36
+
37
+ .sidebar.is-success.is-solid {
38
+ @apply bg-success text-on-success;
39
+ }
40
+
41
+ .sidebar.is-info {
42
+ @apply bg-on-info text-info;
43
+ }
44
+
45
+ .sidebar.is-info.is-solid {
46
+ @apply bg-info text-on-info;
47
+ }
48
+
49
+ .sidebar.is-warning {
50
+ @apply bg-on-warning text-warning;
51
+ }
52
+
53
+ .sidebar.is-warning.is-solid {
54
+ @apply bg-warning text-on-warning;
55
+ }
56
+
57
+ .sidebar.is-danger {
58
+ @apply bg-on-danger text-danger;
59
+ }
60
+
61
+ .sidebar.is-danger.is-solid {
62
+ @apply bg-danger text-on-danger;
63
+ }
64
+
65
+ .sidebar.is-muted {
66
+ @apply bg-muted text-on-muted;
67
+ }
68
+
69
+ .sidebar.is-muted.is-solid {
70
+ @apply bg-on-muted text-muted;
71
+ }
72
+
73
+ .sidebar.is-ghost {
74
+ @apply bg-background text-on-background;
75
+ }
76
+
77
+ .sidebar.is-surface {
78
+ @apply bg-surface text-on-surface;
79
+ }
17
80
  }
@@ -25,12 +25,11 @@
25
25
 
26
26
  type Props = {
27
27
  items: MenuItem[];
28
- variant?: 'primary' | 'secondary' | 'muted';
29
28
  size?: 'sm' | 'md' | 'lg';
30
29
  class?: string;
31
30
  };
32
31
 
33
- const { items = [], class: className, variant = 'primary', size = 'md' }: Props = $props();
32
+ const { items = [], class: className, size = 'md' }: Props = $props();
34
33
 
35
34
  let openSubmenuIndex = $state<number | null>(null);
36
35
  let triggerElements = $state<Record<number, HTMLElement>>({});
@@ -43,12 +42,6 @@
43
42
  isMegamenu: false
44
43
  });
45
44
 
46
- const variantClasses = {
47
- primary: 'navmenu-primary',
48
- secondary: 'navmenu-secondary',
49
- muted: 'navmenu-muted'
50
- };
51
-
52
45
  const sizeClasses = {
53
46
  sm: 'is-sm',
54
47
  md: 'is-md',
@@ -172,7 +165,7 @@
172
165
  });
173
166
  </script>
174
167
 
175
- <nav class={cn('navmenu', variantClasses[variant], sizeClasses[size], className)}>
168
+ <nav class={cn('navmenu', sizeClasses[size], className)}>
176
169
  {#each items as item, index}
177
170
  {#if item.href && !item.subitems && !item.megamenu}
178
171
  <a href={item.href} class={cn('navmenu-item', isItemActive(item.href) && 'is-active')}>
@@ -31,7 +31,6 @@
31
31
 
32
32
  type Props = {
33
33
  items: SideNavItem[];
34
- variant?: 'primary' | 'secondary' | 'muted';
35
34
  size?: 'sm' | 'md' | 'lg';
36
35
  class?: string;
37
36
  isWide?: boolean;
@@ -42,7 +41,6 @@
42
41
  const {
43
42
  items = [],
44
43
  class: className,
45
- variant = 'primary',
46
44
  size = 'md',
47
45
  isWide,
48
46
  isCompact,
@@ -70,12 +68,6 @@
70
68
  isExpanded = !isCollapsible;
71
69
  });
72
70
 
73
- const variantClasses = {
74
- primary: 'sidenav-primary',
75
- secondary: 'sidenav-secondary',
76
- muted: 'sidenav-muted'
77
- };
78
-
79
71
  const sizeClasses = {
80
72
  sm: 'is-sm',
81
73
  md: 'is-md',
@@ -119,7 +111,6 @@
119
111
  <nav
120
112
  class={cn(
121
113
  'sidenav',
122
- variantClasses[variant],
123
114
  sizeClasses[size],
124
115
  isCompact && 'is-compact',
125
116
  isCollapsible && 'is-collapsible',
@@ -21,7 +21,6 @@ import { type IconData } from '../index.js';
21
21
  import type { Snippet } from 'svelte';
22
22
  type Props = {
23
23
  items: SideNavItem[];
24
- variant?: 'primary' | 'secondary' | 'muted';
25
24
  size?: 'sm' | 'md' | 'lg';
26
25
  class?: string;
27
26
  isWide?: boolean;
@@ -1,6 +1,6 @@
1
1
  @layer components {
2
2
  .footer-group {
3
- @apply flex flex-col gap-4;
3
+ @apply flex flex-col gap-2;
4
4
 
5
5
  .footer-group-title {
6
6
  @apply text-base font-semibold;
@@ -12,16 +12,15 @@
12
12
  @apply list-none p-0 m-0;
13
13
 
14
14
  .footer-group-link {
15
- @apply text-sm text-on-muted;
15
+ @apply text-sm;
16
16
  @apply transition-colors duration-200;
17
17
  @apply hover:underline;
18
- @apply focus:outline-none;
19
18
  @apply inline-flex items-center gap-1;
20
19
  }
21
20
  }
22
21
 
23
22
  .footer-group-content {
24
- @apply flex flex-col gap-3;
23
+ @apply flex flex-col gap-2;
25
24
  }
26
25
  }
27
26
  }
@@ -1,19 +1,19 @@
1
1
  @layer components {
2
2
  .navmenu {
3
- @apply flex items-center gap-1 text-on-background;
3
+ @apply flex items-center gap-1;
4
4
 
5
5
  .navmenu-item {
6
6
  @apply relative flex items-center gap-2 rounded-ui px-4 py-2;
7
7
  @apply cursor-pointer select-none outline-none;
8
8
  @apply transition-all duration-200;
9
- @apply hover:bg-muted;
10
9
 
11
10
  .navmenu-icon {
12
11
  @apply h-5 w-5 shrink-0;
13
12
  }
14
13
 
15
14
  .navmenu-label {
16
- @apply font-medium text-sm whitespace-nowrap;
15
+ @apply text-sm whitespace-nowrap;
16
+ @apply font-light hover:font-semibold;
17
17
  }
18
18
 
19
19
  .navmenu-arrow {
@@ -24,8 +24,8 @@
24
24
  }
25
25
  }
26
26
 
27
- &.is-active {
28
- @apply bg-muted;
27
+ &.is-active .navmenu-label {
28
+ @apply font-semibold;
29
29
  }
30
30
  }
31
31
 
@@ -76,43 +76,13 @@
76
76
  }
77
77
  }
78
78
  }
79
-
80
- &.navmenu-primary {
81
- .navmenu-item.is-active {
82
- @apply bg-on-primary text-primary;
83
-
84
- .navmenu-icon {
85
- @apply text-primary;
86
- }
87
- }
88
- }
89
-
90
- &.navmenu-secondary {
91
- .navmenu-item.is-active {
92
- @apply bg-on-secondary text-secondary;
93
-
94
- .navmenu-icon {
95
- @apply text-secondary;
96
- }
97
- }
98
- }
99
-
100
- &.navmenu-muted {
101
- .navmenu-item.is-active {
102
- @apply bg-muted text-on-muted;
103
-
104
- .navmenu-icon {
105
- @apply text-on-muted;
106
- }
107
- }
108
- }
109
79
  }
110
80
 
111
81
  .navmenu-popover {
112
82
  @apply flex flex-col gap-2 p-2 my-1;
113
83
  @apply bg-background text-on-background rounded-ui;
114
84
  @apply invisible opacity-0 transition-opacity duration-300 ease-in-out;
115
- @apply shadow-sm shadow-muted border border-muted;
85
+ @apply shadow-sm shadow-muted;
116
86
  position: fixed;
117
87
  z-index: 9999;
118
88
  max-height: 80vh;
@@ -134,7 +104,7 @@
134
104
  @apply flex items-center gap-2 rounded-ui px-3 py-2;
135
105
  @apply cursor-pointer select-none outline-none;
136
106
  @apply transition-all duration-200;
137
- @apply hover:bg-muted;
107
+ @apply font-light hover:font-medium;
138
108
 
139
109
  .navmenu-submenu-icon {
140
110
  @apply h-5 w-5 shrink-0;
@@ -153,7 +123,7 @@
153
123
  }
154
124
 
155
125
  &.is-active {
156
- @apply bg-muted;
126
+ @apply font-medium;
157
127
  }
158
128
  }
159
129
 
@@ -162,7 +132,7 @@
162
132
  }
163
133
 
164
134
  .navmenu-header {
165
- @apply px-3 py-2 text-xs font-semibold text-on-muted/70 uppercase tracking-wide;
135
+ @apply px-3 py-2 text-xs font-semibold uppercase tracking-wide;
166
136
  }
167
137
  }
168
138
  }
@@ -1,38 +1,38 @@
1
1
  @layer components {
2
2
  .sidenav {
3
- @apply flex w-full min-w-0 flex-col gap-0.5 text-on-muted;
3
+ @apply flex w-full min-w-0 flex-col gap-0.5;
4
4
 
5
5
  .sidenav-divider {
6
6
  @apply my-2 h-px w-full bg-muted;
7
7
  }
8
8
 
9
9
  .sidenav-header {
10
- @apply flex items-center gap-2 px-3 py-3 text-sm font-bold text-on-surface;
10
+ @apply flex items-center gap-2 px-3 py-3;
11
11
  @apply mt-4 mb-1 first:mt-0;
12
12
  @apply justify-start;
13
13
 
14
14
  .icon {
15
- @apply h-5 w-5 shrink-0 text-on-surface;
15
+ @apply shrink-0;
16
16
  }
17
17
 
18
18
  .sidenav-header-content {
19
19
  @apply flex flex-1 flex-col overflow-hidden;
20
20
 
21
21
  .sidenav-header-label {
22
- @apply truncate font-bold uppercase text-xs tracking-wider text-left;
22
+ @apply text-sm truncate font-semibold tracking-wide text-left;
23
+ @apply opacity-75;
23
24
  }
24
25
 
25
26
  .sidenav-header-description {
26
- @apply truncate text-xs font-normal text-on-muted/70 text-left;
27
+ @apply truncate font-light text-left;
27
28
  }
28
29
  }
29
30
 
30
- &.sidenav-header-link {
31
- @apply cursor-pointer rounded-ui outline-none;
32
- @apply hover:bg-muted/50;
31
+ &.sidenav-header-link .sidenav-header-content {
32
+ @apply cursor-pointer;
33
33
 
34
- &.is-active {
35
- @apply bg-muted;
34
+ .sidenav-header-label {
35
+ @apply font-bold;
36
36
  }
37
37
  }
38
38
 
@@ -40,7 +40,7 @@
40
40
  @apply flex shrink-0 items-center justify-center ml-auto;
41
41
 
42
42
  .sidenav-arrow {
43
- @apply h-4 w-4 transition-transform duration-200;
43
+ @apply transition-transform duration-200;
44
44
 
45
45
  &.is-open {
46
46
  @apply rotate-90;
@@ -52,7 +52,6 @@
52
52
  .sidenav-item {
53
53
  @apply relative flex w-fit items-center gap-2 rounded-ui px-3 py-2;
54
54
  @apply cursor-pointer select-none outline-none;
55
- @apply hover:bg-muted;
56
55
 
57
56
  &.is-wide {
58
57
  @apply w-full;
@@ -60,21 +59,17 @@
60
59
 
61
60
  .sidenav-icon-wrapper {
62
61
  @apply flex shrink-0 items-center justify-center;
63
-
64
- .sidenav-icon {
65
- @apply h-5 w-5;
66
- }
67
62
  }
68
63
 
69
64
  .sidenav-content {
70
65
  @apply flex flex-1 flex-col overflow-hidden;
71
66
 
72
67
  .sidenav-label {
73
- @apply truncate font-medium text-sm;
68
+ @apply truncate font-light hover:font-semibold;
74
69
  }
75
70
 
76
71
  .sidenav-description {
77
- @apply truncate text-xs text-on-muted/70;
72
+ @apply truncate font-light;
78
73
  }
79
74
  }
80
75
 
@@ -82,7 +77,7 @@
82
77
  @apply flex shrink-0 items-center;
83
78
 
84
79
  .sidenav-status {
85
- @apply rounded-full bg-muted px-2 py-0.5 text-xs font-medium;
80
+ @apply rounded-full bg-muted px-2 py-0.5 font-medium;
86
81
  }
87
82
  }
88
83
 
@@ -90,7 +85,7 @@
90
85
  @apply flex shrink-0 items-center justify-center;
91
86
 
92
87
  .sidenav-arrow {
93
- @apply h-4 w-4 transition-transform duration-200;
88
+ @apply transition-transform duration-200;
94
89
 
95
90
  &.is-open {
96
91
  @apply rotate-90;
@@ -99,56 +94,156 @@
99
94
  }
100
95
  }
101
96
 
97
+ .sidenav-item.is-active .sidenav-label {
98
+ @apply font-semibold;
99
+ }
100
+
102
101
  &.is-sm {
103
102
  .sidenav-item {
104
- @apply gap-1.5 px-2 py-1.5 text-xs;
103
+ @apply gap-1.5 px-2 py-1.5;
105
104
 
106
105
  .sidenav-icon-wrapper .sidenav-icon {
107
106
  @apply h-4 w-4;
108
107
  }
108
+
109
+ .sidenav-content {
110
+ .sidenav-label {
111
+ @apply text-xs;
112
+ }
113
+
114
+ .sidenav-description {
115
+ @apply text-[10px];
116
+ }
117
+ }
118
+
119
+ .sidenav-status-wrapper .sidenav-status {
120
+ @apply text-[10px];
121
+ }
122
+
123
+ .sidenav-arrow-wrapper .sidenav-arrow {
124
+ @apply h-3 w-3;
125
+ }
109
126
  }
110
127
 
111
128
  .sidenav-header {
112
- @apply gap-1.5 px-2 py-1.5 text-xs;
129
+ @apply gap-1.5 px-2 py-1.5;
113
130
 
114
- .sidenav-header-icon {
131
+ .icon {
115
132
  @apply h-4 w-4;
116
133
  }
134
+
135
+ .sidenav-header-content {
136
+ .sidenav-header-label {
137
+ @apply text-xs;
138
+ }
139
+
140
+ .sidenav-header-description {
141
+ @apply text-[10px];
142
+ }
143
+ }
144
+
145
+ .sidenav-arrow-wrapper .sidenav-arrow {
146
+ @apply h-3 w-3;
147
+ }
117
148
  }
118
149
  }
119
150
 
120
151
  &.is-md {
121
152
  .sidenav-item {
122
- @apply gap-2 px-3 py-2 text-sm;
153
+ @apply gap-2 px-3 py-2;
123
154
 
124
155
  .sidenav-icon-wrapper .sidenav-icon {
125
156
  @apply h-5 w-5;
126
157
  }
158
+
159
+ .sidenav-content {
160
+ .sidenav-label {
161
+ @apply text-sm;
162
+ }
163
+
164
+ .sidenav-description {
165
+ @apply text-xs;
166
+ }
167
+ }
168
+
169
+ .sidenav-status-wrapper .sidenav-status {
170
+ @apply text-xs;
171
+ }
172
+
173
+ .sidenav-arrow-wrapper .sidenav-arrow {
174
+ @apply h-4 w-4;
175
+ }
127
176
  }
128
177
 
129
178
  .sidenav-header {
130
- @apply gap-2 px-3 py-2 text-sm;
179
+ @apply gap-2 px-3 py-2;
131
180
 
132
- .sidenav-header-icon {
181
+ .icon {
133
182
  @apply h-5 w-5;
134
183
  }
184
+
185
+ .sidenav-header-content {
186
+ .sidenav-header-label {
187
+ @apply text-sm;
188
+ }
189
+
190
+ .sidenav-header-description {
191
+ @apply text-xs;
192
+ }
193
+ }
194
+
195
+ .sidenav-arrow-wrapper .sidenav-arrow {
196
+ @apply h-4 w-4;
197
+ }
135
198
  }
136
199
  }
137
200
 
138
201
  &.is-lg {
139
202
  .sidenav-item {
140
- @apply gap-3 px-4 py-3 text-base;
203
+ @apply gap-3 px-4 py-3;
141
204
 
142
205
  .sidenav-icon-wrapper .sidenav-icon {
143
- @apply h-6 w-6;
206
+ @apply h-7 w-7;
207
+ }
208
+
209
+ .sidenav-content {
210
+ .sidenav-label {
211
+ @apply text-base;
212
+ }
213
+
214
+ .sidenav-description {
215
+ @apply text-sm;
216
+ }
217
+ }
218
+
219
+ .sidenav-status-wrapper .sidenav-status {
220
+ @apply text-sm;
221
+ }
222
+
223
+ .sidenav-arrow-wrapper .sidenav-arrow {
224
+ @apply h-5 w-5;
144
225
  }
145
226
  }
146
227
 
147
228
  .sidenav-header {
148
- @apply gap-3 px-4 py-3 text-base;
229
+ @apply gap-3 px-4 py-3;
230
+
231
+ .icon {
232
+ @apply h-7 w-7;
233
+ }
234
+
235
+ .sidenav-header-content {
236
+ .sidenav-header-label {
237
+ @apply text-base;
238
+ }
239
+
240
+ .sidenav-header-description {
241
+ @apply text-sm;
242
+ }
243
+ }
149
244
 
150
- .sidenav-header-icon {
151
- @apply h-6 w-6;
245
+ .sidenav-arrow-wrapper .sidenav-arrow {
246
+ @apply h-5 w-5;
152
247
  }
153
248
  }
154
249
  }
@@ -191,51 +286,17 @@
191
286
  }
192
287
  }
193
288
 
194
- &.sidenav-primary {
195
- .sidenav-item.is-active {
196
- @apply bg-on-primary text-primary;
197
-
198
- .sidenav-icon {
199
- @apply text-primary;
200
- }
201
- }
202
- }
203
-
204
- &.sidenav-secondary {
205
- .sidenav-item.is-active {
206
- @apply bg-on-secondary text-secondary;
207
-
208
- .sidenav-icon {
209
- @apply text-secondary;
210
- }
211
- }
212
- }
213
-
214
- &.sidenav-muted {
215
- .sidenav-item.is-active {
216
- @apply bg-muted text-on-muted;
217
-
218
- .sidenav-icon {
219
- @apply text-on-muted;
220
- }
221
- }
222
- }
223
-
224
289
  .sidenav-submenu-wrapper {
225
290
  @apply flex flex-col gap-0.5;
226
291
 
227
292
  .sidenav-submenu-trigger {
228
293
  @apply w-full cursor-pointer rounded-ui outline-none;
229
- @apply hover:bg-muted/50;
294
+ @apply hover:font-semibold;
230
295
  @apply justify-start;
231
296
  }
232
297
 
233
298
  .sidenav-submenu-content {
234
299
  @apply ml-5 flex flex-col gap-0.5 border-l border-muted pl-2;
235
-
236
- .sidenav-subitem {
237
- @apply text-sm;
238
- }
239
300
  }
240
301
  }
241
302
  }
@@ -6,7 +6,7 @@
6
6
  @apply absolute inset-0 bg-overlay;
7
7
  }
8
8
  .modal {
9
- @apply relative flex flex-col gap-4 md:gap-6 rounded-ui py-4 md:py-6 max-w-[95vw] max-h-[95vh] overflow-hidden overflow-y-auto;
9
+ @apply relative flex flex-col gap-4 md:gap-6 rounded-ui py-4 md:py-6 max-w-[95vw] max-h-[95vh];
10
10
 
11
11
  &.is-ghost {
12
12
  @apply bg-background text-on-background;
@@ -33,7 +33,7 @@
33
33
  @apply bg-on-muted text-muted;
34
34
  }
35
35
  .modal-content {
36
- @apply px-4 md:px-6;
36
+ @apply px-4 md:px-6 overflow-hidden overflow-y-auto;
37
37
  }
38
38
 
39
39
  .modal-header {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-svelte",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "author": {
5
5
  "name": "SappsDev",
6
6
  "email": "info@sappsdev.com"