tera-system-ui 0.0.20 → 0.0.21
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/components/brand-logo/BrandLogo.svelte +31 -31
- package/dist/components/button/Button.svelte +49 -49
- package/dist/components/combobox/Combobox.svelte +8 -8
- package/dist/components/command/command.scss +72 -72
- package/dist/components/command/components/Command.svelte +120 -120
- package/dist/components/command/components/CommandEmpty.svelte +30 -30
- package/dist/components/command/components/CommandGroup.svelte +110 -110
- package/dist/components/command/components/CommandInput.svelte +92 -92
- package/dist/components/command/components/CommandItem.svelte +110 -110
- package/dist/components/command/components/CommandList.svelte +56 -56
- package/dist/components/command/components/CommandLoading.svelte +28 -28
- package/dist/components/command/components/CommandSeparator.svelte +21 -21
- package/dist/components/dialog/Dialog.astro +63 -63
- package/dist/components/dialog/Dialog.svelte +109 -109
- package/dist/components/dialog/dialog.scss +115 -115
- package/dist/components/header/Header.svelte +36 -36
- package/dist/components/header/header.scss +19 -19
- package/dist/components/icons/IconArrowBigRightFilled.svelte +10 -10
- package/dist/components/icons/IconBook.svelte +10 -10
- package/dist/components/icons/IconBookmarkPlus.svelte +10 -10
- package/dist/components/icons/IconCalculator.svelte +10 -10
- package/dist/components/icons/IconCheck.svelte +10 -10
- package/dist/components/icons/IconChevronDown.svelte +10 -10
- package/dist/components/icons/IconCopy.svelte +10 -10
- package/dist/components/icons/IconCopyCheckFilled.svelte +10 -10
- package/dist/components/icons/IconHamburger.svelte +10 -10
- package/dist/components/icons/IconLanguage.svelte +10 -10
- package/dist/components/icons/IconLoader2.svelte +10 -10
- package/dist/components/icons/IconMoon.svelte +10 -10
- package/dist/components/icons/IconPointFilled.svelte +10 -10
- package/dist/components/icons/IconSearch.svelte +10 -10
- package/dist/components/icons/IconSun.svelte +10 -10
- package/dist/components/icons/IconSwitchHorizontal.svelte +10 -10
- package/dist/components/icons/IconSwitchVertical.svelte +10 -10
- package/dist/components/icons/IconTransform.svelte +10 -10
- package/dist/components/icons/IconX.svelte +10 -10
- package/dist/components/input/Input.svelte +24 -24
- package/dist/components/language-picker-button/LanguagePickerButton.svelte +109 -109
- package/dist/components/light-dark-toggle/LightDarkToggle.svelte +36 -36
- package/dist/components/popover/Popover.svelte +136 -136
- package/dist/components/popover-responsive/PopoverResponsive.svelte +87 -87
- package/dist/components/side-navigation/SideNavigation.svelte +114 -114
- package/dist/components/side-navigation/SideNavigationItem.svelte +17 -17
- package/dist/components/side-navigation/SideNavigationLayout.svelte +19 -19
- package/dist/components/side-navigation/sidenav.scss +149 -149
- package/dist/components/tera-ui-context/TeraUiContext.svelte +28 -28
- package/dist/themes/scrollbar.scss +37 -37
- package/dist/themes/tera-ui-base.css +210 -210
- package/dist/themes/tw-preset.cjs +153 -153
- package/package.json +97 -96
- package/scripts/add-component-template.js +121 -121
- package/scripts/generate-ts-index.js +136 -136
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {type DialogProps, styles} from "./Dialog";
|
|
3
|
-
import IconX from "../icons/IconX.svelte";
|
|
4
|
-
import {Button} from "../button";
|
|
5
|
-
import './dialog.scss'
|
|
6
|
-
import {sleep} from "../../internal/helpers/sleep";
|
|
7
|
-
|
|
8
|
-
let {
|
|
9
|
-
children, open = $bindable(),
|
|
10
|
-
closeOnClickOutside = true,
|
|
11
|
-
closeButton = true,
|
|
12
|
-
size = 'sm',
|
|
13
|
-
header,
|
|
14
|
-
footer,
|
|
15
|
-
class: className,
|
|
16
|
-
position = 'center',
|
|
17
|
-
padding,
|
|
18
|
-
staticRender = false,
|
|
19
|
-
triggerRef,
|
|
20
|
-
focusTriggerAfterClose,
|
|
21
|
-
...props
|
|
22
|
-
}: DialogProps = $props();
|
|
23
|
-
|
|
24
|
-
let dialog;
|
|
25
|
-
|
|
26
|
-
let hasOpened = $state(false);
|
|
27
|
-
|
|
28
|
-
// Watch for prop changes to open/close the dialog
|
|
29
|
-
$effect(() => {
|
|
30
|
-
if (open) {
|
|
31
|
-
stillAnimating = open
|
|
32
|
-
dialog?.showModal();
|
|
33
|
-
|
|
34
|
-
if (!hasOpened)
|
|
35
|
-
hasOpened = true
|
|
36
|
-
} else {
|
|
37
|
-
dialog?.close()
|
|
38
|
-
sleep(200).then(() => {
|
|
39
|
-
stillAnimating = open
|
|
40
|
-
console.log('stillAnimating', stillAnimating)
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
if (focusTriggerAfterClose && hasOpened && triggerRef) {
|
|
44
|
-
triggerRef.focus()
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
// Close dialog on clicking outside (optional)
|
|
50
|
-
function handleClickOutside(e) {
|
|
51
|
-
if (closeOnClickOutside && e.target === dialog) {
|
|
52
|
-
dialog?.close();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Emit close event when dialog is closed
|
|
57
|
-
function handleClose() {
|
|
58
|
-
open = false;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// onmousedown={closeOnClickOutside ? 'event.target==this && this.close()' : ''}
|
|
62
|
-
|
|
63
|
-
const {base, dialog: dialogStyle, dialogContainer, header: headerStyle, body, footer: footerStyle} = styles({
|
|
64
|
-
size,
|
|
65
|
-
padding
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
let stillAnimating = $state()
|
|
69
|
-
|
|
70
|
-
</script>
|
|
71
|
-
|
|
72
|
-
{#if staticRender || (!staticRender && (open || stillAnimating))}
|
|
73
|
-
<dialog class={dialogStyle() + ` ${className}`}
|
|
74
|
-
data-position={position}
|
|
75
|
-
bind:this={dialog}
|
|
76
|
-
onclose={handleClose}
|
|
77
|
-
onmousedown={handleClickOutside}
|
|
78
|
-
size={size}
|
|
79
|
-
|
|
80
|
-
{...props}
|
|
81
|
-
>
|
|
82
|
-
<button class=""></button>
|
|
83
|
-
{#if (closeButton)}
|
|
84
|
-
<form method="dialog">
|
|
85
|
-
<Button class="absolute right-1 top-1 [&>svg]:opacity-45 [&>svg]:hover:opacity-90 z-10" icon
|
|
86
|
-
variant="ghost"
|
|
87
|
-
size="sm">
|
|
88
|
-
<IconX/>
|
|
89
|
-
</Button>
|
|
90
|
-
</form>
|
|
91
|
-
{/if}
|
|
92
|
-
|
|
93
|
-
<div class={"dialog-box " + dialogContainer()}>
|
|
94
|
-
{#if header}
|
|
95
|
-
<header class={headerStyle()}>
|
|
96
|
-
{@render header?.()}
|
|
97
|
-
</header>
|
|
98
|
-
{/if}
|
|
99
|
-
|
|
100
|
-
<main class={body()}>
|
|
101
|
-
{@render children?.()}
|
|
102
|
-
</main>
|
|
103
|
-
{#if footer}
|
|
104
|
-
<footer class={footerStyle()}>
|
|
105
|
-
{@render footer?.()}
|
|
106
|
-
</footer>
|
|
107
|
-
{/if}
|
|
108
|
-
</div>
|
|
109
|
-
</dialog>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {type DialogProps, styles} from "./Dialog";
|
|
3
|
+
import IconX from "../icons/IconX.svelte";
|
|
4
|
+
import {Button} from "../button";
|
|
5
|
+
import './dialog.scss'
|
|
6
|
+
import {sleep} from "../../internal/helpers/sleep";
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
children, open = $bindable(),
|
|
10
|
+
closeOnClickOutside = true,
|
|
11
|
+
closeButton = true,
|
|
12
|
+
size = 'sm',
|
|
13
|
+
header,
|
|
14
|
+
footer,
|
|
15
|
+
class: className,
|
|
16
|
+
position = 'center',
|
|
17
|
+
padding,
|
|
18
|
+
staticRender = false,
|
|
19
|
+
triggerRef,
|
|
20
|
+
focusTriggerAfterClose,
|
|
21
|
+
...props
|
|
22
|
+
}: DialogProps = $props();
|
|
23
|
+
|
|
24
|
+
let dialog;
|
|
25
|
+
|
|
26
|
+
let hasOpened = $state(false);
|
|
27
|
+
|
|
28
|
+
// Watch for prop changes to open/close the dialog
|
|
29
|
+
$effect(() => {
|
|
30
|
+
if (open) {
|
|
31
|
+
stillAnimating = open
|
|
32
|
+
dialog?.showModal();
|
|
33
|
+
|
|
34
|
+
if (!hasOpened)
|
|
35
|
+
hasOpened = true
|
|
36
|
+
} else {
|
|
37
|
+
dialog?.close()
|
|
38
|
+
sleep(200).then(() => {
|
|
39
|
+
stillAnimating = open
|
|
40
|
+
console.log('stillAnimating', stillAnimating)
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
if (focusTriggerAfterClose && hasOpened && triggerRef) {
|
|
44
|
+
triggerRef.focus()
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
// Close dialog on clicking outside (optional)
|
|
50
|
+
function handleClickOutside(e) {
|
|
51
|
+
if (closeOnClickOutside && e.target === dialog) {
|
|
52
|
+
dialog?.close();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Emit close event when dialog is closed
|
|
57
|
+
function handleClose() {
|
|
58
|
+
open = false;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// onmousedown={closeOnClickOutside ? 'event.target==this && this.close()' : ''}
|
|
62
|
+
|
|
63
|
+
const {base, dialog: dialogStyle, dialogContainer, header: headerStyle, body, footer: footerStyle} = styles({
|
|
64
|
+
size,
|
|
65
|
+
padding
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
let stillAnimating = $state()
|
|
69
|
+
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
{#if staticRender || (!staticRender && (open || stillAnimating))}
|
|
73
|
+
<dialog class={dialogStyle() + ` ${className}`}
|
|
74
|
+
data-position={position}
|
|
75
|
+
bind:this={dialog}
|
|
76
|
+
onclose={handleClose}
|
|
77
|
+
onmousedown={handleClickOutside}
|
|
78
|
+
size={size}
|
|
79
|
+
|
|
80
|
+
{...props}
|
|
81
|
+
>
|
|
82
|
+
<button class=""></button>
|
|
83
|
+
{#if (closeButton)}
|
|
84
|
+
<form method="dialog">
|
|
85
|
+
<Button class="absolute right-1 top-1 [&>svg]:opacity-45 [&>svg]:hover:opacity-90 z-10" icon
|
|
86
|
+
variant="ghost"
|
|
87
|
+
size="sm">
|
|
88
|
+
<IconX/>
|
|
89
|
+
</Button>
|
|
90
|
+
</form>
|
|
91
|
+
{/if}
|
|
92
|
+
|
|
93
|
+
<div class={"dialog-box " + dialogContainer()}>
|
|
94
|
+
{#if header}
|
|
95
|
+
<header class={headerStyle()}>
|
|
96
|
+
{@render header?.()}
|
|
97
|
+
</header>
|
|
98
|
+
{/if}
|
|
99
|
+
|
|
100
|
+
<main class={body()}>
|
|
101
|
+
{@render children?.()}
|
|
102
|
+
</main>
|
|
103
|
+
{#if footer}
|
|
104
|
+
<footer class={footerStyle()}>
|
|
105
|
+
{@render footer?.()}
|
|
106
|
+
</footer>
|
|
107
|
+
{/if}
|
|
108
|
+
</div>
|
|
109
|
+
</dialog>
|
|
110
110
|
{/if}
|
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
.dialog-box {
|
|
2
|
-
max-height: min(calc(100svh - 1rem), 55rem);
|
|
3
|
-
overflow-y: auto;
|
|
4
|
-
overscroll-behavior: contain;
|
|
5
|
-
display: grid;
|
|
6
|
-
grid-template-rows: auto 1fr auto;
|
|
7
|
-
width: 100%;
|
|
8
|
-
@apply bg-neutral-token-1 relative top-0 left-0 bottom-0;
|
|
9
|
-
|
|
10
|
-
main {
|
|
11
|
-
overflow: auto;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
dialog, dialog:modal {
|
|
16
|
-
max-height: 100svh;
|
|
17
|
-
width: 100%;
|
|
18
|
-
height: fit-content;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
dialog {
|
|
22
|
-
&[size="xs"] {
|
|
23
|
-
width: 24rem;
|
|
24
|
-
max-width: min(calc(100vw - 1rem), 24rem);
|
|
25
|
-
}
|
|
26
|
-
&[size="sm"] {
|
|
27
|
-
width: 30rem;
|
|
28
|
-
max-width: min(calc(100vw - 1rem), 30rem);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&[size="md"] {
|
|
32
|
-
width: 40rem;
|
|
33
|
-
max-width: min(calc(100vw - 1rem), 40rem);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&[size="lg"] {
|
|
37
|
-
width: 50rem;
|
|
38
|
-
max-width: min(calc(100vw - 1rem), 50rem);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&[size="full"] {
|
|
42
|
-
width: 100vw;
|
|
43
|
-
max-width: 100vw;
|
|
44
|
-
@apply rounded-none;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
dialog[open] {
|
|
50
|
-
//@apply grid place-content-center grid-cols-1;
|
|
51
|
-
@apply inline-flex;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
dialog {
|
|
55
|
-
&[data-position="top"] {
|
|
56
|
-
position: fixed;
|
|
57
|
-
top: 0;
|
|
58
|
-
left: 50%;
|
|
59
|
-
transform: translateX(-50%) translateY(0.5rem);
|
|
60
|
-
margin: 0;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
--transition-duration: 0.2s;
|
|
65
|
-
transform: translateY(0px);
|
|
66
|
-
|
|
67
|
-
&, &::backdrop {
|
|
68
|
-
transition: display var(--transition-duration) allow-discrete, overlay var(--transition-duration) allow-discrete, opacity var(--transition-duration), transform var(--transition-duration) allow-discrete,;
|
|
69
|
-
opacity: 0;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&[open] {
|
|
73
|
-
opacity: 1;
|
|
74
|
-
&::backdrop {
|
|
75
|
-
opacity: 1;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&:not([open]) {
|
|
80
|
-
transform: translateX(0) translateY(-40px);
|
|
81
|
-
|
|
82
|
-
&[data-position="top"] {
|
|
83
|
-
top: 0;
|
|
84
|
-
left: 50%;
|
|
85
|
-
transform: translateX(-50%) translateY(-40px);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
opacity: 0;
|
|
89
|
-
|
|
90
|
-
&::backdrop {
|
|
91
|
-
opacity: 0; /* Fade-out backdrop */
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
@starting-style {
|
|
96
|
-
&[open] {
|
|
97
|
-
transform: translateX(0) translateY(-40px);
|
|
98
|
-
|
|
99
|
-
&[data-position="top"] {
|
|
100
|
-
top: 0;
|
|
101
|
-
left: 50%;
|
|
102
|
-
transform: translateX(-50%) translateY(-40px);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&[open],
|
|
107
|
-
&[open]::backdrop {
|
|
108
|
-
opacity: 0;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
dialog::backdrop {
|
|
115
|
-
@apply backdrop-blur-[0.2rem] bg-neutral-token-13/20;
|
|
1
|
+
.dialog-box {
|
|
2
|
+
max-height: min(calc(100svh - 1rem), 55rem);
|
|
3
|
+
overflow-y: auto;
|
|
4
|
+
overscroll-behavior: contain;
|
|
5
|
+
display: grid;
|
|
6
|
+
grid-template-rows: auto 1fr auto;
|
|
7
|
+
width: 100%;
|
|
8
|
+
@apply bg-neutral-token-1 relative top-0 left-0 bottom-0;
|
|
9
|
+
|
|
10
|
+
main {
|
|
11
|
+
overflow: auto;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
dialog, dialog:modal {
|
|
16
|
+
max-height: 100svh;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: fit-content;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
dialog {
|
|
22
|
+
&[size="xs"] {
|
|
23
|
+
width: 24rem;
|
|
24
|
+
max-width: min(calc(100vw - 1rem), 24rem);
|
|
25
|
+
}
|
|
26
|
+
&[size="sm"] {
|
|
27
|
+
width: 30rem;
|
|
28
|
+
max-width: min(calc(100vw - 1rem), 30rem);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&[size="md"] {
|
|
32
|
+
width: 40rem;
|
|
33
|
+
max-width: min(calc(100vw - 1rem), 40rem);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&[size="lg"] {
|
|
37
|
+
width: 50rem;
|
|
38
|
+
max-width: min(calc(100vw - 1rem), 50rem);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&[size="full"] {
|
|
42
|
+
width: 100vw;
|
|
43
|
+
max-width: 100vw;
|
|
44
|
+
@apply rounded-none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
dialog[open] {
|
|
50
|
+
//@apply grid place-content-center grid-cols-1;
|
|
51
|
+
@apply inline-flex;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
dialog {
|
|
55
|
+
&[data-position="top"] {
|
|
56
|
+
position: fixed;
|
|
57
|
+
top: 0;
|
|
58
|
+
left: 50%;
|
|
59
|
+
transform: translateX(-50%) translateY(0.5rem);
|
|
60
|
+
margin: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
--transition-duration: 0.2s;
|
|
65
|
+
transform: translateY(0px);
|
|
66
|
+
|
|
67
|
+
&, &::backdrop {
|
|
68
|
+
transition: display var(--transition-duration) allow-discrete, overlay var(--transition-duration) allow-discrete, opacity var(--transition-duration), transform var(--transition-duration) allow-discrete,;
|
|
69
|
+
opacity: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&[open] {
|
|
73
|
+
opacity: 1;
|
|
74
|
+
&::backdrop {
|
|
75
|
+
opacity: 1;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&:not([open]) {
|
|
80
|
+
transform: translateX(0) translateY(-40px);
|
|
81
|
+
|
|
82
|
+
&[data-position="top"] {
|
|
83
|
+
top: 0;
|
|
84
|
+
left: 50%;
|
|
85
|
+
transform: translateX(-50%) translateY(-40px);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
opacity: 0;
|
|
89
|
+
|
|
90
|
+
&::backdrop {
|
|
91
|
+
opacity: 0; /* Fade-out backdrop */
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@starting-style {
|
|
96
|
+
&[open] {
|
|
97
|
+
transform: translateX(0) translateY(-40px);
|
|
98
|
+
|
|
99
|
+
&[data-position="top"] {
|
|
100
|
+
top: 0;
|
|
101
|
+
left: 50%;
|
|
102
|
+
transform: translateX(-50%) translateY(-40px);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&[open],
|
|
107
|
+
&[open]::backdrop {
|
|
108
|
+
opacity: 0;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
dialog::backdrop {
|
|
115
|
+
@apply backdrop-blur-[0.2rem] bg-neutral-token-13/20;
|
|
116
116
|
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {type HeaderProps} from "./Header";
|
|
3
|
-
import {BrandLogo} from "../../components/brand-logo";
|
|
4
|
-
import './header.scss'
|
|
5
|
-
import {Button} from "../button";
|
|
6
|
-
import {IconHamburger} from "../icons";
|
|
7
|
-
|
|
8
|
-
let {children, onHamburgerClick, ...props}: HeaderProps & {} = $props();
|
|
9
|
-
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<!--add component here-->
|
|
13
|
-
<nav id="header-container"
|
|
14
|
-
class="flex z-40 w-full h-auto items-center justify-center sticky top-0 inset-x-0 backdrop-blur-lg data-[menu-open=true]:backdrop-blur-xl backdrop-saturate-150">
|
|
15
|
-
<header class="flex flex-wrap h-header-height w-full text-sm">
|
|
16
|
-
<nav class="w-full mx-auto px-4 pl-1 pr-2 md:pl-4 md:pe-4 flex items-center justify-between">
|
|
17
|
-
<div class="flex gap-1 items-center">
|
|
18
|
-
<Button class="md:hidden ring-0 focus:ring-0"
|
|
19
|
-
icon
|
|
20
|
-
variant="ghost"
|
|
21
|
-
|
|
22
|
-
onclick={onHamburgerClick}>
|
|
23
|
-
<IconHamburger/>
|
|
24
|
-
</Button>
|
|
25
|
-
<a href="/" class="header-brand-logo">
|
|
26
|
-
<BrandLogo class="hidden md:block !h-icon-md"/>
|
|
27
|
-
<BrandLogo class="md:hidden" shape="square"/>
|
|
28
|
-
</a>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
<div class="flex gap-2 sm:gap-4 items-center">
|
|
32
|
-
{@render children?.()}
|
|
33
|
-
</div>
|
|
34
|
-
</nav>
|
|
35
|
-
</header>
|
|
36
|
-
</nav>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {type HeaderProps} from "./Header";
|
|
3
|
+
import {BrandLogo} from "../../components/brand-logo";
|
|
4
|
+
import './header.scss'
|
|
5
|
+
import {Button} from "../button";
|
|
6
|
+
import {IconHamburger} from "../icons";
|
|
7
|
+
|
|
8
|
+
let {children, onHamburgerClick, ...props}: HeaderProps & {} = $props();
|
|
9
|
+
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<!--add component here-->
|
|
13
|
+
<nav id="header-container"
|
|
14
|
+
class="flex z-40 w-full h-auto items-center justify-center sticky top-0 inset-x-0 backdrop-blur-lg data-[menu-open=true]:backdrop-blur-xl backdrop-saturate-150">
|
|
15
|
+
<header class="flex flex-wrap h-header-height w-full text-sm">
|
|
16
|
+
<nav class="w-full mx-auto px-4 pl-1 pr-2 md:pl-4 md:pe-4 flex items-center justify-between">
|
|
17
|
+
<div class="flex gap-1 items-center">
|
|
18
|
+
<Button class="md:hidden ring-0 focus:ring-0"
|
|
19
|
+
icon
|
|
20
|
+
variant="ghost"
|
|
21
|
+
|
|
22
|
+
onclick={onHamburgerClick}>
|
|
23
|
+
<IconHamburger/>
|
|
24
|
+
</Button>
|
|
25
|
+
<a href="/" class="header-brand-logo">
|
|
26
|
+
<BrandLogo class="hidden md:block !h-icon-md"/>
|
|
27
|
+
<BrandLogo class="md:hidden" shape="square"/>
|
|
28
|
+
</a>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div class="flex gap-2 sm:gap-4 items-center">
|
|
32
|
+
{@render children?.()}
|
|
33
|
+
</div>
|
|
34
|
+
</nav>
|
|
35
|
+
</header>
|
|
36
|
+
</nav>
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
#header-container {
|
|
2
|
-
container-type: inline-size;
|
|
3
|
-
|
|
4
|
-
[data-name="brand-logo"] {
|
|
5
|
-
@apply h-icon-lg;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
@container (min-width: theme(screens.md)) {
|
|
11
|
-
#header-container {
|
|
12
|
-
header {
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
[data-name="brand-logo"] {
|
|
17
|
-
@apply h-icon-xl;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
1
|
+
#header-container {
|
|
2
|
+
container-type: inline-size;
|
|
3
|
+
|
|
4
|
+
[data-name="brand-logo"] {
|
|
5
|
+
@apply h-icon-lg;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@container (min-width: theme(screens.md)) {
|
|
11
|
+
#header-container {
|
|
12
|
+
header {
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
[data-name="brand-logo"] {
|
|
17
|
+
@apply h-icon-xl;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
20
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {type IconsProps, styles} from "./Icons";
|
|
3
|
-
import {IconArrowBigRightFilled} from "@tabler/icons-svelte";
|
|
4
|
-
|
|
5
|
-
let {children, ...props}: IconsProps = $props();
|
|
6
|
-
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<IconArrowBigRightFilled class={styles({...props})}/>
|
|
10
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {type IconsProps, styles} from "./Icons";
|
|
3
|
+
import {IconArrowBigRightFilled} from "@tabler/icons-svelte";
|
|
4
|
+
|
|
5
|
+
let {children, ...props}: IconsProps = $props();
|
|
6
|
+
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<IconArrowBigRightFilled class={styles({...props})}/>
|
|
10
|
+
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {type IconsProps, styles} from "./Icons";
|
|
3
|
-
import {IconBook} from "@tabler/icons-svelte";
|
|
4
|
-
|
|
5
|
-
let {children, ...props}: IconsProps = $props();
|
|
6
|
-
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<IconBook class={styles({...props})}/>
|
|
10
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {type IconsProps, styles} from "./Icons";
|
|
3
|
+
import {IconBook} from "@tabler/icons-svelte";
|
|
4
|
+
|
|
5
|
+
let {children, ...props}: IconsProps = $props();
|
|
6
|
+
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<IconBook class={styles({...props})}/>
|
|
10
|
+
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {type IconsProps, styles} from "./Icons";
|
|
3
|
-
import {IconBookmarkPlus} from "@tabler/icons-svelte";
|
|
4
|
-
|
|
5
|
-
let {children, ...props}: IconsProps = $props();
|
|
6
|
-
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<IconBookmarkPlus class={styles({...props})}/>
|
|
10
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {type IconsProps, styles} from "./Icons";
|
|
3
|
+
import {IconBookmarkPlus} from "@tabler/icons-svelte";
|
|
4
|
+
|
|
5
|
+
let {children, ...props}: IconsProps = $props();
|
|
6
|
+
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<IconBookmarkPlus class={styles({...props})}/>
|
|
10
|
+
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {type IconsProps, styles} from "./Icons";
|
|
3
|
-
import {IconCalculator} from "@tabler/icons-svelte";
|
|
4
|
-
|
|
5
|
-
let {children, ...props}: IconsProps = $props();
|
|
6
|
-
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<IconCalculator class={styles({...props})}/>
|
|
10
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {type IconsProps, styles} from "./Icons";
|
|
3
|
+
import {IconCalculator} from "@tabler/icons-svelte";
|
|
4
|
+
|
|
5
|
+
let {children, ...props}: IconsProps = $props();
|
|
6
|
+
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<IconCalculator class={styles({...props})}/>
|
|
10
|
+
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {type IconsProps, styles} from "./Icons";
|
|
3
|
-
import {IconCheck} from "@tabler/icons-svelte";
|
|
4
|
-
|
|
5
|
-
let {children, ...props}: IconsProps = $props();
|
|
6
|
-
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<IconCheck class={styles({...props})}/>
|
|
10
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {type IconsProps, styles} from "./Icons";
|
|
3
|
+
import {IconCheck} from "@tabler/icons-svelte";
|
|
4
|
+
|
|
5
|
+
let {children, ...props}: IconsProps = $props();
|
|
6
|
+
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<IconCheck class={styles({...props})}/>
|
|
10
|
+
|