tera-system-ui 0.0.24 → 0.0.26
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/avatar/Avatar.svelte +43 -43
- 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/Command.svelte.d.ts +1 -1
- package/dist/components/command/components/CommandEmpty.svelte +30 -30
- package/dist/components/command/components/CommandEmpty.svelte.d.ts +1 -1
- package/dist/components/command/components/CommandGroup.svelte +110 -110
- package/dist/components/command/components/CommandGroup.svelte.d.ts +1 -1
- package/dist/components/command/components/CommandInput.svelte +92 -92
- package/dist/components/command/components/CommandInput.svelte.d.ts +1 -1
- package/dist/components/command/components/CommandItem.svelte +110 -110
- package/dist/components/command/components/CommandItem.svelte.d.ts +1 -1
- package/dist/components/command/components/CommandList.svelte +56 -56
- package/dist/components/command/components/CommandLoading.svelte +28 -28
- package/dist/components/command/components/CommandLoading.svelte.d.ts +1 -1
- package/dist/components/command/components/CommandSeparator.svelte +21 -21
- package/dist/components/command/components/CommandSeparator.svelte.d.ts +1 -1
- package/dist/components/dialog/Dialog.astro +64 -64
- package/dist/components/dialog/Dialog.svelte +109 -109
- package/dist/components/dialog/dialog.scss +115 -115
- package/dist/components/dropdown-menu/components/DropdownMenu.svelte +33 -33
- package/dist/components/dropdown-menu/components/DropdownMenuGroup.svelte +11 -11
- package/dist/components/dropdown-menu/components/DropdownMenuHeader.svelte +11 -11
- package/dist/components/dropdown-menu/components/DropdownMenuItem.svelte +30 -30
- package/dist/components/dropdown-menu/components/DropdownMenuSeparator.svelte +10 -10
- 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/IconLogout.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/IconSettings.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 +159 -159
- 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/slider/Slider.svelte +181 -181
- package/dist/components/star-rating/StarRating.d.ts +52 -0
- package/dist/components/star-rating/StarRating.js +15 -0
- package/dist/components/star-rating/StarRating.svelte +101 -0
- package/dist/components/star-rating/StarRating.svelte.d.ts +3 -0
- package/dist/components/star-rating/index.d.ts +1 -0
- package/dist/components/star-rating/index.js +1 -0
- package/dist/components/tabs/components/Tabs.svelte +47 -47
- package/dist/components/tabs/components/TabsContent.svelte +34 -34
- package/dist/components/tabs/components/TabsItem.svelte +29 -29
- package/dist/components/tabs/components/TabsList.svelte +41 -41
- package/dist/components/tera-ui-context/TeraUiContext.svelte +28 -28
- package/dist/components/text-area/TextArea.svelte +88 -88
- package/dist/components/user-avatar-with-menu/UserAvatarWithMenu.svelte +67 -67
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/themes/scrollbar.scss +37 -37
- package/dist/themes/tera-ui-base.css +208 -208
- package/dist/themes/tw-preset.cjs +153 -153
- package/package.json +98 -98
- package/scripts/add-component-template.js +120 -120
- package/scripts/generate-ts-index.js +138 -138
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
SCREEN_BREAK_POINTS,
|
|
4
|
-
mainLayout,
|
|
5
|
-
setSideNavState,
|
|
6
|
-
type SideNavigationProps,
|
|
7
|
-
toggleSideNavigation
|
|
8
|
-
} from "./SideNavigation";
|
|
9
|
-
import {clickOutside} from "../../actions/clickOutside"
|
|
10
|
-
import {Button} from "../button";
|
|
11
|
-
import {IconHamburger} from "../icons";
|
|
12
|
-
import {BrandLogo} from "../brand-logo";
|
|
13
|
-
import SideNavItem from "./SideNavigationItem.svelte";
|
|
14
|
-
import IconBook from "../icons/IconBook.svelte";
|
|
15
|
-
import IconTransform from "../icons/IconTransform.svelte";
|
|
16
|
-
import IconCalculator from "../icons/IconCalculator.svelte";
|
|
17
|
-
import {LightDarkToggle} from "../light-dark-toggle";
|
|
18
|
-
import * as m from '../../paraglide/messages
|
|
19
|
-
|
|
20
|
-
import {getGlobalContext} from "../tera-ui-context/global-context";
|
|
21
|
-
|
|
22
|
-
let {children, ...props}: SideNavigationProps = $props();
|
|
23
|
-
|
|
24
|
-
let temporaryExpand: any = undefined
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
function handleClickOutside() {
|
|
28
|
-
let screenWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0)
|
|
29
|
-
if (screenWidth < SCREEN_BREAK_POINTS.md) {
|
|
30
|
-
setSideNavState(undefined)
|
|
31
|
-
} else if (screenWidth >= SCREEN_BREAK_POINTS.md && screenWidth < SCREEN_BREAK_POINTS.xl) {
|
|
32
|
-
setSideNavState(undefined)
|
|
33
|
-
} else if (screenWidth >= SCREEN_BREAK_POINTS.xl) {
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function handleHover(isHover: boolean) {
|
|
39
|
-
temporaryExpand = isHover ? true : undefined
|
|
40
|
-
|
|
41
|
-
if (temporaryExpand) {
|
|
42
|
-
mainLayout()?.setAttribute('data-side-nav-temporary-expand', temporaryExpand)
|
|
43
|
-
} else {
|
|
44
|
-
mainLayout()?.removeAttribute('data-side-nav-temporary-expand')
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
let globalContext = getGlobalContext()
|
|
49
|
-
|
|
50
|
-
console.log('SideNavigation get global context', globalContext)
|
|
51
|
-
|
|
52
|
-
function isSelected(href: string) {
|
|
53
|
-
const pathname = globalContext?.sideNavHref
|
|
54
|
-
return pathname?.startsWith(href)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const NAV_ITEM = [
|
|
60
|
-
{
|
|
61
|
-
href: '/calculator',
|
|
62
|
-
icon: IconCalculator,
|
|
63
|
-
title: m.text_calces_scientific_calculator(),
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
href: '/convert',
|
|
67
|
-
icon: IconTransform,
|
|
68
|
-
title: m.text_unit_converter(),
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
href: '/docs/calculator-usages/calces',
|
|
72
|
-
icon: IconBook,
|
|
73
|
-
title: m.text_calces_documentation(),
|
|
74
|
-
},
|
|
75
|
-
]
|
|
76
|
-
</script>
|
|
77
|
-
|
|
78
|
-
<nav class="side-nav_main-side-bar grid grid-rows-[auto_1fr_auto]"
|
|
79
|
-
use:clickOutside
|
|
80
|
-
onclick_outside={handleClickOutside}
|
|
81
|
-
>
|
|
82
|
-
<div class="flex mt-2 gap-1 items-center">
|
|
83
|
-
<Button variant="ghost" ring={false}
|
|
84
|
-
onclick={toggleSideNavigation}
|
|
85
|
-
>
|
|
86
|
-
<IconHamburger/>
|
|
87
|
-
</Button>
|
|
88
|
-
<div class="sm-hidden">
|
|
89
|
-
<BrandLogo/>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
<ul class="mt-12"
|
|
93
|
-
onmouseenter={() => {
|
|
94
|
-
handleHover(true)
|
|
95
|
-
}}
|
|
96
|
-
onmouseleave={() => {
|
|
97
|
-
handleHover(false)
|
|
98
|
-
}}
|
|
99
|
-
>
|
|
100
|
-
{#each NAV_ITEM as item}
|
|
101
|
-
<SideNavItem href={item.href} class={isSelected(item.href) ? 'selected' : ''}>
|
|
102
|
-
{#snippet icon()}
|
|
103
|
-
<item.icon/>
|
|
104
|
-
{/snippet}
|
|
105
|
-
{item.title}
|
|
106
|
-
</SideNavItem>
|
|
107
|
-
{/each}
|
|
108
|
-
</ul>
|
|
109
|
-
<div>
|
|
110
|
-
<div class="w-[3rem] mb-8 flex justify-center">
|
|
111
|
-
<LightDarkToggle/>
|
|
112
|
-
</div>
|
|
113
|
-
</div>
|
|
114
|
-
</nav>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
SCREEN_BREAK_POINTS,
|
|
4
|
+
mainLayout,
|
|
5
|
+
setSideNavState,
|
|
6
|
+
type SideNavigationProps,
|
|
7
|
+
toggleSideNavigation
|
|
8
|
+
} from "./SideNavigation";
|
|
9
|
+
import {clickOutside} from "../../actions/clickOutside"
|
|
10
|
+
import {Button} from "../button";
|
|
11
|
+
import {IconHamburger} from "../icons";
|
|
12
|
+
import {BrandLogo} from "../brand-logo";
|
|
13
|
+
import SideNavItem from "./SideNavigationItem.svelte";
|
|
14
|
+
import IconBook from "../icons/IconBook.svelte";
|
|
15
|
+
import IconTransform from "../icons/IconTransform.svelte";
|
|
16
|
+
import IconCalculator from "../icons/IconCalculator.svelte";
|
|
17
|
+
import {LightDarkToggle} from "../light-dark-toggle";
|
|
18
|
+
import * as m from '../../paraglide/messages'
|
|
19
|
+
|
|
20
|
+
import {getGlobalContext} from "../tera-ui-context/global-context";
|
|
21
|
+
|
|
22
|
+
let {children, ...props}: SideNavigationProps = $props();
|
|
23
|
+
|
|
24
|
+
let temporaryExpand: any = undefined
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
function handleClickOutside() {
|
|
28
|
+
let screenWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0)
|
|
29
|
+
if (screenWidth < SCREEN_BREAK_POINTS.md) {
|
|
30
|
+
setSideNavState(undefined)
|
|
31
|
+
} else if (screenWidth >= SCREEN_BREAK_POINTS.md && screenWidth < SCREEN_BREAK_POINTS.xl) {
|
|
32
|
+
setSideNavState(undefined)
|
|
33
|
+
} else if (screenWidth >= SCREEN_BREAK_POINTS.xl) {
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function handleHover(isHover: boolean) {
|
|
39
|
+
temporaryExpand = isHover ? true : undefined
|
|
40
|
+
|
|
41
|
+
if (temporaryExpand) {
|
|
42
|
+
mainLayout()?.setAttribute('data-side-nav-temporary-expand', temporaryExpand)
|
|
43
|
+
} else {
|
|
44
|
+
mainLayout()?.removeAttribute('data-side-nav-temporary-expand')
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
let globalContext = getGlobalContext()
|
|
49
|
+
|
|
50
|
+
console.log('SideNavigation get global context', globalContext)
|
|
51
|
+
|
|
52
|
+
function isSelected(href: string) {
|
|
53
|
+
const pathname = globalContext?.sideNavHref
|
|
54
|
+
return pathname?.startsWith(href)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
const NAV_ITEM = [
|
|
60
|
+
{
|
|
61
|
+
href: '/calculator',
|
|
62
|
+
icon: IconCalculator,
|
|
63
|
+
title: m.text_calces_scientific_calculator(),
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
href: '/convert',
|
|
67
|
+
icon: IconTransform,
|
|
68
|
+
title: m.text_unit_converter(),
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
href: '/docs/calculator-usages/calces',
|
|
72
|
+
icon: IconBook,
|
|
73
|
+
title: m.text_calces_documentation(),
|
|
74
|
+
},
|
|
75
|
+
]
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<nav class="side-nav_main-side-bar grid grid-rows-[auto_1fr_auto]"
|
|
79
|
+
use:clickOutside
|
|
80
|
+
onclick_outside={handleClickOutside}
|
|
81
|
+
>
|
|
82
|
+
<div class="flex mt-2 gap-1 items-center">
|
|
83
|
+
<Button variant="ghost" ring={false}
|
|
84
|
+
onclick={toggleSideNavigation}
|
|
85
|
+
>
|
|
86
|
+
<IconHamburger/>
|
|
87
|
+
</Button>
|
|
88
|
+
<div class="sm-hidden">
|
|
89
|
+
<BrandLogo/>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
<ul class="mt-12"
|
|
93
|
+
onmouseenter={() => {
|
|
94
|
+
handleHover(true)
|
|
95
|
+
}}
|
|
96
|
+
onmouseleave={() => {
|
|
97
|
+
handleHover(false)
|
|
98
|
+
}}
|
|
99
|
+
>
|
|
100
|
+
{#each NAV_ITEM as item}
|
|
101
|
+
<SideNavItem href={item.href} class={isSelected(item.href) ? 'selected' : ''}>
|
|
102
|
+
{#snippet icon()}
|
|
103
|
+
<item.icon/>
|
|
104
|
+
{/snippet}
|
|
105
|
+
{item.title}
|
|
106
|
+
</SideNavItem>
|
|
107
|
+
{/each}
|
|
108
|
+
</ul>
|
|
109
|
+
<div>
|
|
110
|
+
<div class="w-[3rem] mb-8 flex justify-center">
|
|
111
|
+
<LightDarkToggle/>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
</nav>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
const {class: className, href, children, icon} = $props()
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<li class="{className + ' side-nav_item'}">
|
|
6
|
-
<a href="{href || '#'}" class="">
|
|
7
|
-
<div class="min-w-icon-sm z-10">
|
|
8
|
-
{@render icon?.()}
|
|
9
|
-
</div>
|
|
10
|
-
<div class="sm-hidden z-10 truncate">
|
|
11
|
-
{@render children?.()}
|
|
12
|
-
</div>
|
|
13
|
-
</a>
|
|
14
|
-
</li>
|
|
15
|
-
|
|
16
|
-
<style>
|
|
17
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
const {class: className, href, children, icon} = $props()
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<li class="{className + ' side-nav_item'}">
|
|
6
|
+
<a href="{href || '#'}" class="">
|
|
7
|
+
<div class="min-w-icon-sm z-10">
|
|
8
|
+
{@render icon?.()}
|
|
9
|
+
</div>
|
|
10
|
+
<div class="sm-hidden z-10 truncate">
|
|
11
|
+
{@render children?.()}
|
|
12
|
+
</div>
|
|
13
|
+
</a>
|
|
14
|
+
</li>
|
|
15
|
+
|
|
16
|
+
<style>
|
|
17
|
+
|
|
18
18
|
</style>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {SideNavigation} from "./";
|
|
3
|
-
import './sidenav.scss'
|
|
4
|
-
|
|
5
|
-
let {children} = $props()
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<main
|
|
9
|
-
id="side-nav_main-layout"
|
|
10
|
-
class="side-nav_main-layout relative"
|
|
11
|
-
data-side-nav-state="compact"
|
|
12
|
-
>
|
|
13
|
-
<SideNavigation/>
|
|
14
|
-
|
|
15
|
-
<section class="side-nav_main-content">
|
|
16
|
-
{@render children?.()}
|
|
17
|
-
</section>
|
|
18
|
-
</main>
|
|
19
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {SideNavigation} from "./";
|
|
3
|
+
import './sidenav.scss'
|
|
4
|
+
|
|
5
|
+
let {children} = $props()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<main
|
|
9
|
+
id="side-nav_main-layout"
|
|
10
|
+
class="side-nav_main-layout relative"
|
|
11
|
+
data-side-nav-state="compact"
|
|
12
|
+
>
|
|
13
|
+
<SideNavigation/>
|
|
14
|
+
|
|
15
|
+
<section class="side-nav_main-content">
|
|
16
|
+
{@render children?.()}
|
|
17
|
+
</section>
|
|
18
|
+
</main>
|
|
19
|
+
|
|
@@ -1,149 +1,149 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--sidebar-width: 0;
|
|
3
|
-
--sidebar-transition-duration: 0.2s;
|
|
4
|
-
--sidebar-main-margin-left: 0;
|
|
5
|
-
--sidebar-border-width: 0;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.side-nav_main-layout {
|
|
9
|
-
transition: padding-left var(--sidebar-transition-duration);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.side-nav_main-side-bar {
|
|
13
|
-
container-type: inline-size;
|
|
14
|
-
z-index: 50;
|
|
15
|
-
width: var(--sidebar-width);
|
|
16
|
-
overflow-x: hidden;
|
|
17
|
-
border-right: var(--sidebar-border-width) solid theme('colors.neutral.token.5');
|
|
18
|
-
height: 100dvh;
|
|
19
|
-
position: fixed;
|
|
20
|
-
top: 0;
|
|
21
|
-
left: 0;
|
|
22
|
-
bottom: 0;
|
|
23
|
-
|
|
24
|
-
transition: width var(--sidebar-transition-duration);
|
|
25
|
-
background: theme('colors.neutral.token.1');
|
|
26
|
-
|
|
27
|
-
ul {
|
|
28
|
-
width: var(--sidebar-width);
|
|
29
|
-
transition: width var(--sidebar-transition-duration);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
.sm-hidden {
|
|
36
|
-
opacity: 0;
|
|
37
|
-
transition: opacity var(--sidebar-transition-duration);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@container (min-width: 3rem) {
|
|
41
|
-
.sm-hidden {
|
|
42
|
-
opacity: 1;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.side-nav_main-content {
|
|
47
|
-
margin-left: var(--sidebar-main-margin-left);
|
|
48
|
-
transition: margin-left var(--sidebar-transition-duration);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
.side-nav_main-layout {
|
|
53
|
-
&[data-side-nav-state="expand"], &[data-side-nav-temporary-expand="true"] {
|
|
54
|
-
--sidebar-width: 16.5rem;
|
|
55
|
-
--sidebar-border-width: 1px;
|
|
56
|
-
.header-brand-logo {
|
|
57
|
-
display: none;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@media (min-width: theme('screens.md')) {
|
|
63
|
-
:root {
|
|
64
|
-
--sidebar-main-margin-left: 3rem;
|
|
65
|
-
--sidebar-border-width: 1px;
|
|
66
|
-
--sidebar-width: 3rem;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@media (min-width: theme('screens.xl')) {
|
|
71
|
-
:root {
|
|
72
|
-
--sidebar-main-margin-left: var(--sidebar-width);
|
|
73
|
-
--sidebar-width: 16.5rem;
|
|
74
|
-
}
|
|
75
|
-
.header-brand-logo {
|
|
76
|
-
display: none;
|
|
77
|
-
}
|
|
78
|
-
.side-nav_main-layout {
|
|
79
|
-
&[data-side-nav-state="compact"] {
|
|
80
|
-
--sidebar-main-margin-left: 3rem;
|
|
81
|
-
--sidebar-width: 3rem;
|
|
82
|
-
.header-brand-logo {
|
|
83
|
-
display: block;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&[data-side-nav-temporary-expand="true"] {
|
|
88
|
-
--sidebar-width: 16.5rem;
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
.side-nav_item {
|
|
96
|
-
color: theme('colors.neutral.token.13');
|
|
97
|
-
|
|
98
|
-
a {
|
|
99
|
-
display: flex;
|
|
100
|
-
gap: 0.5rem;
|
|
101
|
-
align-items: center;
|
|
102
|
-
width: 100%;
|
|
103
|
-
position: relative;
|
|
104
|
-
white-space: nowrap;
|
|
105
|
-
@apply px-3 py-3 font-semibold;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
svg {
|
|
109
|
-
&.icon {
|
|
110
|
-
min-width: 24px;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
&.selected a {
|
|
115
|
-
//background-color: theme('colors.neutral.token.11');
|
|
116
|
-
color: theme('colors.neutral.token.1');
|
|
117
|
-
//@apply rounded-full;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
&.selected {
|
|
121
|
-
a::after {
|
|
122
|
-
content: '';
|
|
123
|
-
position: absolute;
|
|
124
|
-
inset-inline: 0.25rem;
|
|
125
|
-
inset-block: 0.2rem;
|
|
126
|
-
background: theme('colors.neutral.token.11');
|
|
127
|
-
border-radius: theme('borderRadius.DEFAULT');
|
|
128
|
-
z-index: 0;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
//&.selected {
|
|
133
|
-
// a::after {
|
|
134
|
-
// content: '';
|
|
135
|
-
// position: absolute;
|
|
136
|
-
// left: 0;
|
|
137
|
-
// top: 0;
|
|
138
|
-
// bottom: 0;
|
|
139
|
-
// width: 4px;
|
|
140
|
-
// height: 100%;
|
|
141
|
-
// background: theme('colors.primary.token.4');
|
|
142
|
-
// border-radius: 4px 0 0 4px;
|
|
143
|
-
// }
|
|
144
|
-
//}
|
|
145
|
-
|
|
146
|
-
&:hover {
|
|
147
|
-
background-color: theme('colors.neutral.token.3');
|
|
148
|
-
}
|
|
149
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
--sidebar-width: 0;
|
|
3
|
+
--sidebar-transition-duration: 0.2s;
|
|
4
|
+
--sidebar-main-margin-left: 0;
|
|
5
|
+
--sidebar-border-width: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.side-nav_main-layout {
|
|
9
|
+
transition: padding-left var(--sidebar-transition-duration);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.side-nav_main-side-bar {
|
|
13
|
+
container-type: inline-size;
|
|
14
|
+
z-index: 50;
|
|
15
|
+
width: var(--sidebar-width);
|
|
16
|
+
overflow-x: hidden;
|
|
17
|
+
border-right: var(--sidebar-border-width) solid theme('colors.neutral.token.5');
|
|
18
|
+
height: 100dvh;
|
|
19
|
+
position: fixed;
|
|
20
|
+
top: 0;
|
|
21
|
+
left: 0;
|
|
22
|
+
bottom: 0;
|
|
23
|
+
|
|
24
|
+
transition: width var(--sidebar-transition-duration);
|
|
25
|
+
background: theme('colors.neutral.token.1');
|
|
26
|
+
|
|
27
|
+
ul {
|
|
28
|
+
width: var(--sidebar-width);
|
|
29
|
+
transition: width var(--sidebar-transition-duration);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
.sm-hidden {
|
|
36
|
+
opacity: 0;
|
|
37
|
+
transition: opacity var(--sidebar-transition-duration);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@container (min-width: 3rem) {
|
|
41
|
+
.sm-hidden {
|
|
42
|
+
opacity: 1;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.side-nav_main-content {
|
|
47
|
+
margin-left: var(--sidebar-main-margin-left);
|
|
48
|
+
transition: margin-left var(--sidebar-transition-duration);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
.side-nav_main-layout {
|
|
53
|
+
&[data-side-nav-state="expand"], &[data-side-nav-temporary-expand="true"] {
|
|
54
|
+
--sidebar-width: 16.5rem;
|
|
55
|
+
--sidebar-border-width: 1px;
|
|
56
|
+
.header-brand-logo {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@media (min-width: theme('screens.md')) {
|
|
63
|
+
:root {
|
|
64
|
+
--sidebar-main-margin-left: 3rem;
|
|
65
|
+
--sidebar-border-width: 1px;
|
|
66
|
+
--sidebar-width: 3rem;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@media (min-width: theme('screens.xl')) {
|
|
71
|
+
:root {
|
|
72
|
+
--sidebar-main-margin-left: var(--sidebar-width);
|
|
73
|
+
--sidebar-width: 16.5rem;
|
|
74
|
+
}
|
|
75
|
+
.header-brand-logo {
|
|
76
|
+
display: none;
|
|
77
|
+
}
|
|
78
|
+
.side-nav_main-layout {
|
|
79
|
+
&[data-side-nav-state="compact"] {
|
|
80
|
+
--sidebar-main-margin-left: 3rem;
|
|
81
|
+
--sidebar-width: 3rem;
|
|
82
|
+
.header-brand-logo {
|
|
83
|
+
display: block;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&[data-side-nav-temporary-expand="true"] {
|
|
88
|
+
--sidebar-width: 16.5rem;
|
|
89
|
+
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
.side-nav_item {
|
|
96
|
+
color: theme('colors.neutral.token.13');
|
|
97
|
+
|
|
98
|
+
a {
|
|
99
|
+
display: flex;
|
|
100
|
+
gap: 0.5rem;
|
|
101
|
+
align-items: center;
|
|
102
|
+
width: 100%;
|
|
103
|
+
position: relative;
|
|
104
|
+
white-space: nowrap;
|
|
105
|
+
@apply px-3 py-3 font-semibold;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
svg {
|
|
109
|
+
&.icon {
|
|
110
|
+
min-width: 24px;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&.selected a {
|
|
115
|
+
//background-color: theme('colors.neutral.token.11');
|
|
116
|
+
color: theme('colors.neutral.token.1');
|
|
117
|
+
//@apply rounded-full;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&.selected {
|
|
121
|
+
a::after {
|
|
122
|
+
content: '';
|
|
123
|
+
position: absolute;
|
|
124
|
+
inset-inline: 0.25rem;
|
|
125
|
+
inset-block: 0.2rem;
|
|
126
|
+
background: theme('colors.neutral.token.11');
|
|
127
|
+
border-radius: theme('borderRadius.DEFAULT');
|
|
128
|
+
z-index: 0;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
//&.selected {
|
|
133
|
+
// a::after {
|
|
134
|
+
// content: '';
|
|
135
|
+
// position: absolute;
|
|
136
|
+
// left: 0;
|
|
137
|
+
// top: 0;
|
|
138
|
+
// bottom: 0;
|
|
139
|
+
// width: 4px;
|
|
140
|
+
// height: 100%;
|
|
141
|
+
// background: theme('colors.primary.token.4');
|
|
142
|
+
// border-radius: 4px 0 0 4px;
|
|
143
|
+
// }
|
|
144
|
+
//}
|
|
145
|
+
|
|
146
|
+
&:hover {
|
|
147
|
+
background-color: theme('colors.neutral.token.3');
|
|
148
|
+
}
|
|
149
|
+
}
|