ui-svelte 0.2.3 → 0.2.5
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/dist/assets/country-flags.d.ts +1 -0
- package/dist/assets/country-flags.js +1612 -0
- package/dist/charts/ArcChart.svelte +291 -48
- package/dist/charts/ArcChart.svelte.d.ts +32 -1
- package/dist/charts/Candlestick.svelte +663 -115
- package/dist/charts/Candlestick.svelte.d.ts +40 -0
- package/dist/charts/css/arc-chart.css +76 -6
- package/dist/charts/css/candlestick.css +234 -11
- package/dist/control/Audio.svelte +8 -12
- package/dist/control/Button.svelte +3 -1
- package/dist/control/Button.svelte.d.ts +1 -0
- package/dist/control/IconButton.svelte +3 -1
- package/dist/control/IconButton.svelte.d.ts +1 -0
- package/dist/control/ToggleGroup.svelte +82 -0
- package/dist/control/ToggleGroup.svelte.d.ts +20 -0
- package/dist/control/css/btn.css +1 -1
- package/dist/control/css/toggle-group.css +85 -0
- package/dist/css/base.css +23 -15
- package/dist/css/utilities.css +45 -0
- package/dist/display/AvatarGroup.svelte +59 -0
- package/dist/display/AvatarGroup.svelte.d.ts +17 -0
- package/dist/display/Code.svelte +9 -2
- package/dist/display/Code.svelte.d.ts +1 -0
- package/dist/display/Section.svelte +1 -1
- package/dist/display/css/avatar-group.css +46 -0
- package/dist/display/css/avatar.css +1 -10
- package/dist/display/css/card.css +0 -10
- package/dist/form/ComboBox.svelte.d.ts +1 -1
- package/dist/form/PhoneField.svelte +8 -4
- package/dist/form/Select.svelte.d.ts +1 -1
- package/dist/index.css +43 -21
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/layout/AppBar.svelte +28 -1
- package/dist/layout/AppBar.svelte.d.ts +2 -0
- package/dist/layout/Footer.svelte +25 -1
- package/dist/layout/Footer.svelte.d.ts +1 -0
- package/dist/layout/Sidebar.svelte +33 -3
- package/dist/layout/Sidebar.svelte.d.ts +1 -0
- package/dist/layout/css/app-bar.css +63 -0
- package/dist/layout/css/bottom-bar.css +63 -0
- package/dist/layout/css/footer.css +63 -0
- package/dist/layout/css/sidebar.css +63 -0
- package/dist/navigation/NavMenu.svelte +3 -9
- package/dist/navigation/SideNav.svelte +0 -9
- package/dist/navigation/SideNav.svelte.d.ts +0 -1
- package/dist/navigation/css/footer-group.css +3 -4
- package/dist/navigation/css/nav-menu.css +90 -30
- package/dist/navigation/css/side-nav.css +127 -66
- package/dist/overlay/css/modal.css +2 -2
- package/package.json +2 -2
- /package/dist/{form/js → assets}/countries.d.ts +0 -0
- /package/dist/{form/js → assets}/countries.js +0 -0
- /package/dist/{form/js → assets}/phone-examples.d.ts +0 -0
- /package/dist/{form/js → assets}/phone-examples.js +0 -0
|
@@ -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
|
-
|
|
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 {
|
|
16
|
-
|
|
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,
|
|
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',
|
|
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')}>
|
|
@@ -206,6 +199,7 @@
|
|
|
206
199
|
<div
|
|
207
200
|
class={cn(
|
|
208
201
|
'navmenu-popover',
|
|
202
|
+
sizeClasses[size],
|
|
209
203
|
openSubmenuIndex !== null && 'is-active',
|
|
210
204
|
position.isMegamenu && 'is-megamenu'
|
|
211
205
|
)}
|
|
@@ -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',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.footer-group {
|
|
3
|
-
@apply flex flex-col gap-
|
|
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
|
|
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-
|
|
23
|
+
@apply flex flex-col gap-2;
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
}
|