ui-svelte 0.2.11 → 0.2.13
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/README.md +2 -2
- package/dist/charts/ArcChart.svelte +9 -14
- package/dist/charts/ArcChart.svelte.d.ts +3 -3
- package/dist/charts/AreaChart.svelte +347 -118
- package/dist/charts/AreaChart.svelte.d.ts +33 -4
- package/dist/charts/BarChart.svelte +288 -66
- package/dist/charts/BarChart.svelte.d.ts +26 -1
- package/dist/charts/Candlestick.svelte +53 -50
- package/dist/charts/Candlestick.svelte.d.ts +8 -8
- package/dist/charts/LineChart.svelte +391 -91
- package/dist/charts/LineChart.svelte.d.ts +26 -3
- package/dist/charts/PieChart.svelte +333 -92
- package/dist/charts/PieChart.svelte.d.ts +33 -5
- package/dist/charts/css/arc-chart.css +3 -3
- package/dist/charts/css/area-chart.css +127 -29
- package/dist/charts/css/bar-chart.css +114 -8
- package/dist/charts/css/candlestick.css +2 -0
- package/dist/charts/css/line-chart.css +111 -13
- package/dist/charts/css/pie-chart.css +92 -20
- package/dist/control/Audio.svelte +86 -44
- package/dist/control/Audio.svelte.d.ts +4 -1
- package/dist/control/Button.svelte +18 -27
- package/dist/control/Button.svelte.d.ts +3 -2
- package/dist/control/Fab.svelte +103 -0
- package/dist/control/Fab.svelte.d.ts +25 -0
- package/dist/control/IconButton.svelte +17 -27
- package/dist/control/IconButton.svelte.d.ts +3 -3
- package/dist/control/Image.svelte +123 -0
- package/dist/control/Image.svelte.d.ts +13 -0
- package/dist/control/Record.svelte +141 -98
- package/dist/control/Record.svelte.d.ts +2 -1
- package/dist/control/ToggleGroup.svelte +22 -8
- package/dist/control/ToggleGroup.svelte.d.ts +2 -1
- package/dist/control/ToggleTheme.svelte +13 -11
- package/dist/control/ToggleTheme.svelte.d.ts +3 -2
- package/dist/control/Video.svelte +57 -29
- package/dist/control/Video.svelte.d.ts +1 -0
- package/dist/control/css/btn.css +200 -152
- package/dist/control/css/fab.css +84 -0
- package/dist/control/css/image.css +56 -0
- package/dist/control/css/media.css +95 -30
- package/dist/control/css/toggle-group.css +253 -84
- package/dist/control/css/video.css +1 -14
- package/dist/css/animations.css +5 -9
- package/dist/css/base.css +13 -347
- package/dist/css/decorations.css +561 -0
- package/dist/css/rich-text.css +485 -0
- package/dist/css/transitions.css +158 -0
- package/dist/css/typography.css +291 -0
- package/dist/css/utilities.css +0 -4
- package/dist/display/Accordion.svelte +28 -4
- package/dist/display/Accordion.svelte.d.ts +2 -1
- package/dist/display/Alert.svelte +32 -12
- package/dist/display/Alert.svelte.d.ts +2 -3
- package/dist/display/Avatar.svelte +23 -18
- package/dist/display/Avatar.svelte.d.ts +4 -1
- package/dist/display/AvatarGroup.svelte +20 -18
- package/dist/display/AvatarGroup.svelte.d.ts +6 -3
- package/dist/display/Badge.svelte +11 -4
- package/dist/display/Badge.svelte.d.ts +2 -1
- package/dist/display/Card.svelte +15 -14
- package/dist/display/Card.svelte.d.ts +2 -3
- package/dist/display/Carousel.svelte +130 -99
- package/dist/display/Carousel.svelte.d.ts +6 -4
- package/dist/display/ChatBox.svelte +245 -106
- package/dist/display/ChatBox.svelte.d.ts +32 -5
- package/dist/display/Chip.svelte +31 -17
- package/dist/display/Chip.svelte.d.ts +3 -2
- package/dist/display/Code.svelte +7 -4
- package/dist/display/Code.svelte.d.ts +1 -0
- package/dist/display/Collapsible.svelte +30 -4
- package/dist/display/Collapsible.svelte.d.ts +2 -1
- package/dist/display/Countdown.svelte +169 -0
- package/dist/display/Countdown.svelte.d.ts +21 -0
- package/dist/display/Empty.svelte +37 -3
- package/dist/display/Empty.svelte.d.ts +3 -0
- package/dist/display/Item.svelte +42 -11
- package/dist/display/Item.svelte.d.ts +4 -2
- package/dist/display/Map.svelte +488 -0
- package/dist/display/Map.svelte.d.ts +44 -0
- package/dist/display/Marquee.svelte +0 -2
- package/dist/display/Section.svelte +14 -12
- package/dist/display/Section.svelte.d.ts +2 -3
- package/dist/display/Skeleton.svelte +32 -0
- package/dist/display/Skeleton.svelte.d.ts +10 -0
- package/dist/display/Table.svelte +94 -132
- package/dist/display/Table.svelte.d.ts +10 -1
- package/dist/display/css/accordion.css +349 -52
- package/dist/display/css/alert.css +38 -18
- package/dist/display/css/avatar-group.css +38 -75
- package/dist/display/css/avatar.css +139 -121
- package/dist/display/css/badge.css +50 -27
- package/dist/display/css/card.css +123 -71
- package/dist/display/css/carousel.css +25 -5
- package/dist/display/css/chat-box.css +158 -26
- package/dist/display/css/chip.css +142 -68
- package/dist/display/css/code.css +2 -6
- package/dist/display/css/collapsible.css +349 -45
- package/dist/display/css/countdown.css +206 -0
- package/dist/display/css/divider.css +8 -6
- package/dist/display/css/empty.css +7 -0
- package/dist/display/css/item.css +330 -84
- package/dist/display/css/map.css +164 -0
- package/dist/display/css/marquee.css +0 -3
- package/dist/display/css/section.css +89 -65
- package/dist/display/css/skeleton.css +58 -0
- package/dist/display/css/table.css +309 -193
- package/dist/form/Checkbox.svelte +11 -5
- package/dist/form/Checkbox.svelte.d.ts +2 -1
- package/dist/form/ColorField.svelte +601 -0
- package/dist/form/ColorField.svelte.d.ts +29 -0
- package/dist/form/ComboBox.svelte +24 -9
- package/dist/form/ComboBox.svelte.d.ts +2 -2
- package/dist/form/CsvField.svelte +62 -136
- package/dist/form/CsvField.svelte.d.ts +2 -2
- package/dist/form/DateField.svelte +33 -15
- package/dist/form/DateField.svelte.d.ts +2 -1
- package/dist/form/DateRange.svelte +436 -0
- package/dist/form/DateRange.svelte.d.ts +24 -0
- package/dist/form/DragDrop.svelte +578 -0
- package/dist/form/DragDrop.svelte.d.ts +33 -0
- package/dist/form/Dropzone.svelte +28 -8
- package/dist/form/Dropzone.svelte.d.ts +2 -2
- package/dist/form/Editor.svelte +626 -0
- package/dist/form/Editor.svelte.d.ts +50 -0
- package/dist/form/ImageCropper.svelte +422 -61
- package/dist/form/ImageCropper.svelte.d.ts +15 -1
- package/dist/form/{PasswordStrength.svelte → PasswordField.svelte} +58 -24
- package/dist/form/{PasswordStrength.svelte.d.ts → PasswordField.svelte.d.ts} +6 -5
- package/dist/form/PhoneField.svelte +26 -14
- package/dist/form/PhoneField.svelte.d.ts +4 -3
- package/dist/form/PinField.svelte +39 -31
- package/dist/form/PinField.svelte.d.ts +3 -3
- package/dist/form/RadioGroup.svelte +9 -5
- package/dist/form/RadioGroup.svelte.d.ts +1 -1
- package/dist/form/Select.svelte +20 -19
- package/dist/form/Select.svelte.d.ts +2 -2
- package/dist/form/Slider.svelte +10 -4
- package/dist/form/Slider.svelte.d.ts +2 -1
- package/dist/form/TextField.svelte +29 -11
- package/dist/form/TextField.svelte.d.ts +5 -4
- package/dist/form/Textarea.svelte +15 -6
- package/dist/form/Textarea.svelte.d.ts +2 -2
- package/dist/form/Toggle.svelte +7 -3
- package/dist/form/Toggle.svelte.d.ts +1 -1
- package/dist/form/css/checkbox.css +18 -2
- package/dist/form/css/color-field.css +141 -0
- package/dist/form/css/control.css +193 -82
- package/dist/form/css/csv-field.css +221 -0
- package/dist/form/css/date-range.css +122 -0
- package/dist/form/css/date.css +24 -2
- package/dist/form/css/drag-drop.css +234 -0
- package/dist/form/css/dropzone.css +153 -34
- package/dist/form/css/editor.css +367 -0
- package/dist/form/css/field.css +4 -0
- package/dist/form/css/image-cropper.css +242 -20
- package/dist/form/css/radio-group.css +26 -1
- package/dist/form/css/select.css +2 -2
- package/dist/form/css/slider.css +37 -0
- package/dist/form/css/textarea.css +178 -75
- package/dist/form/css/toggle.css +15 -3
- package/dist/hooks/use-chat.svelte.js +1 -1
- package/dist/hooks/use-form.svelte.js +3 -3
- package/dist/hooks/use-search.svelte.js +0 -3
- package/dist/hooks/use-table.svelte.d.ts +1 -0
- package/dist/hooks/use-table.svelte.js +6 -0
- package/dist/icons/index.d.ts +34 -2
- package/dist/icons/index.js +36 -4
- package/dist/index.css +44 -49
- package/dist/index.d.ts +14 -4
- package/dist/index.js +13 -3
- package/dist/layout/AppBar.svelte +22 -14
- package/dist/layout/AppBar.svelte.d.ts +2 -1
- package/dist/layout/Footer.svelte +19 -11
- package/dist/layout/Footer.svelte.d.ts +2 -1
- package/dist/layout/Provider.svelte +32 -9
- package/dist/layout/Provider.svelte.d.ts +3 -1
- package/dist/layout/Sidebar.svelte +17 -8
- package/dist/layout/Sidebar.svelte.d.ts +2 -1
- package/dist/layout/css/app-bar.css +63 -66
- package/dist/layout/css/footer.css +62 -65
- package/dist/layout/css/sidebar.css +120 -59
- package/dist/navigation/BottomNav.svelte +51 -14
- package/dist/navigation/FooterGroup.svelte +1 -1
- package/dist/navigation/NavMenu.svelte +47 -23
- package/dist/navigation/NavMenu.svelte.d.ts +29 -0
- package/dist/navigation/Pagination.svelte +158 -0
- package/dist/navigation/Pagination.svelte.d.ts +18 -0
- package/dist/navigation/SideNav.svelte +30 -25
- package/dist/navigation/SideNav.svelte.d.ts +2 -3
- package/dist/navigation/Tabs.svelte +17 -7
- package/dist/navigation/Tabs.svelte.d.ts +2 -2
- package/dist/navigation/css/bottom-nav.css +319 -257
- package/dist/navigation/css/footer-group.css +1 -1
- package/dist/navigation/css/footer-nav.css +1 -1
- package/dist/navigation/css/nav-menu.css +331 -106
- package/dist/navigation/css/pagination.css +74 -0
- package/dist/navigation/css/side-nav.css +514 -75
- package/dist/navigation/css/tabs.css +246 -52
- package/dist/overlay/AlertDialog.svelte +58 -0
- package/dist/overlay/AlertDialog.svelte.d.ts +14 -25
- package/dist/overlay/Command.svelte +347 -0
- package/dist/overlay/Command.svelte.d.ts +33 -25
- package/dist/overlay/Drawer.svelte +49 -21
- package/dist/overlay/Drawer.svelte.d.ts +2 -2
- package/dist/overlay/Dropdown.svelte +3 -3
- package/dist/overlay/Modal.svelte +51 -16
- package/dist/overlay/Modal.svelte.d.ts +3 -3
- package/dist/overlay/Toast.svelte +41 -17
- package/dist/overlay/Toast.svelte.d.ts +1 -1
- package/dist/overlay/Tooltip.svelte +36 -27
- package/dist/overlay/Tooltip.svelte.d.ts +2 -2
- package/dist/overlay/css/command.css +68 -0
- package/dist/overlay/css/drawer.css +63 -24
- package/dist/overlay/css/dropdown.css +1 -1
- package/dist/overlay/css/hovercard.css +1 -1
- package/dist/overlay/css/modal.css +79 -27
- package/dist/overlay/css/toast.css +40 -24
- package/dist/overlay/css/tooltip.css +110 -67
- package/dist/stores/theme.svelte.js +44 -12
- package/dist/stores/toast.svelte.d.ts +4 -4
- package/dist/stores/toast.svelte.js +2 -2
- package/package.json +1 -1
- package/dist/utils/charts.d.ts +0 -27
- package/dist/utils/charts.js +0 -140
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
&.is-transparent {
|
|
22
|
-
@apply bg-transparent border-transparent shadow-none;
|
|
22
|
+
@apply bg-transparent! border-transparent shadow-none;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
&.is-floating-enabled {
|
|
26
|
-
@apply left-1/2 -translate-x-1/2;
|
|
26
|
+
@apply fixed top-0 left-1/2 -translate-x-1/2;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
&.is-floating {
|
|
30
|
-
@apply mt-4 w-[calc(100%-2rem)] rounded-
|
|
30
|
+
@apply mt-4 w-[calc(100%-2rem)] rounded-box shadow-md shadow-muted border border-muted;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
&.is-floating-enabled:not(.is-floating) {
|
|
@@ -35,6 +35,66 @@
|
|
|
35
35
|
@apply border-b border-muted;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
&.is-soft {
|
|
39
|
+
&.is-primary {
|
|
40
|
+
@apply bg-soft-primary text-primary;
|
|
41
|
+
}
|
|
42
|
+
&.is-secondary {
|
|
43
|
+
@apply bg-soft-secondary text-secondary;
|
|
44
|
+
}
|
|
45
|
+
&.is-muted {
|
|
46
|
+
@apply bg-soft-muted text-on-muted;
|
|
47
|
+
}
|
|
48
|
+
&.is-success {
|
|
49
|
+
@apply bg-soft-success text-success;
|
|
50
|
+
}
|
|
51
|
+
&.is-info {
|
|
52
|
+
@apply bg-soft-info text-info;
|
|
53
|
+
}
|
|
54
|
+
&.is-warning {
|
|
55
|
+
@apply bg-soft-warning text-warning;
|
|
56
|
+
}
|
|
57
|
+
&.is-danger {
|
|
58
|
+
@apply bg-soft-danger text-danger;
|
|
59
|
+
}
|
|
60
|
+
&.is-default {
|
|
61
|
+
@apply bg-background text-on-background;
|
|
62
|
+
}
|
|
63
|
+
&.is-surface {
|
|
64
|
+
@apply bg-surface text-on-surface;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.is-solid {
|
|
69
|
+
&.is-primary {
|
|
70
|
+
@apply bg-primary text-on-primary;
|
|
71
|
+
}
|
|
72
|
+
&.is-secondary {
|
|
73
|
+
@apply bg-secondary text-on-secondary;
|
|
74
|
+
}
|
|
75
|
+
&.is-muted {
|
|
76
|
+
@apply bg-on-muted text-muted;
|
|
77
|
+
}
|
|
78
|
+
&.is-success {
|
|
79
|
+
@apply bg-success text-on-success;
|
|
80
|
+
}
|
|
81
|
+
&.is-info {
|
|
82
|
+
@apply bg-info text-on-info;
|
|
83
|
+
}
|
|
84
|
+
&.is-warning {
|
|
85
|
+
@apply bg-warning text-on-warning;
|
|
86
|
+
}
|
|
87
|
+
&.is-danger {
|
|
88
|
+
@apply bg-danger text-on-danger;
|
|
89
|
+
}
|
|
90
|
+
&.is-default {
|
|
91
|
+
@apply bg-background text-on-background;
|
|
92
|
+
}
|
|
93
|
+
&.is-surface {
|
|
94
|
+
@apply bg-surface text-on-surface;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
38
98
|
.appbar-content {
|
|
39
99
|
@apply flex flex-nowrap items-center justify-between relative;
|
|
40
100
|
@apply w-full px-2 h-full min-h-12;
|
|
@@ -52,67 +112,4 @@
|
|
|
52
112
|
}
|
|
53
113
|
}
|
|
54
114
|
}
|
|
55
|
-
.appbar.is-primary {
|
|
56
|
-
@apply bg-on-primary text-primary;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.appbar.is-primary.is-solid {
|
|
60
|
-
@apply bg-primary text-on-primary;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.appbar.is-secondary {
|
|
64
|
-
@apply bg-on-secondary text-secondary;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.appbar.is-secondary.is-solid {
|
|
68
|
-
@apply bg-secondary text-on-secondary;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.appbar.is-success {
|
|
72
|
-
@apply bg-on-success text-success;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.appbar.is-success.is-solid {
|
|
76
|
-
@apply bg-success text-on-success;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.appbar.is-info {
|
|
80
|
-
@apply bg-on-info text-info;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.appbar.is-info.is-solid {
|
|
84
|
-
@apply bg-info text-on-info;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.appbar.is-warning {
|
|
88
|
-
@apply bg-on-warning text-warning;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.appbar.is-warning.is-solid {
|
|
92
|
-
@apply bg-warning text-on-warning;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.appbar.is-danger {
|
|
96
|
-
@apply bg-on-danger text-danger;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.appbar.is-danger.is-solid {
|
|
100
|
-
@apply bg-danger text-on-danger;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.appbar.is-muted {
|
|
104
|
-
@apply bg-muted text-on-muted;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.appbar.is-muted.is-solid {
|
|
108
|
-
@apply bg-on-muted text-muted;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.appbar.is-ghost {
|
|
112
|
-
@apply bg-background text-on-background;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.appbar.is-surface {
|
|
116
|
-
@apply bg-surface text-on-surface;
|
|
117
|
-
}
|
|
118
115
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.footer {
|
|
3
|
-
@apply w-full
|
|
3
|
+
@apply w-full mt-auto;
|
|
4
4
|
@apply transition-all duration-300 ease-in-out;
|
|
5
5
|
|
|
6
6
|
&.is-blurred {
|
|
7
|
-
@apply backdrop-blur-lg
|
|
7
|
+
@apply backdrop-blur-lg;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
&.is-bordered {
|
|
@@ -15,6 +15,66 @@
|
|
|
15
15
|
@apply translate-y-full;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
&.is-soft {
|
|
19
|
+
&.is-primary {
|
|
20
|
+
@apply bg-soft-primary text-primary;
|
|
21
|
+
}
|
|
22
|
+
&.is-secondary {
|
|
23
|
+
@apply bg-soft-secondary text-secondary;
|
|
24
|
+
}
|
|
25
|
+
&.is-muted {
|
|
26
|
+
@apply bg-soft-muted text-on-muted;
|
|
27
|
+
}
|
|
28
|
+
&.is-success {
|
|
29
|
+
@apply bg-soft-success text-success;
|
|
30
|
+
}
|
|
31
|
+
&.is-info {
|
|
32
|
+
@apply bg-soft-info text-info;
|
|
33
|
+
}
|
|
34
|
+
&.is-warning {
|
|
35
|
+
@apply bg-soft-warning text-warning;
|
|
36
|
+
}
|
|
37
|
+
&.is-danger {
|
|
38
|
+
@apply bg-soft-danger text-danger;
|
|
39
|
+
}
|
|
40
|
+
&.is-default {
|
|
41
|
+
@apply bg-background text-on-background;
|
|
42
|
+
}
|
|
43
|
+
&.is-surface {
|
|
44
|
+
@apply bg-surface text-on-surface;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.is-solid {
|
|
49
|
+
&.is-primary {
|
|
50
|
+
@apply bg-primary text-on-primary;
|
|
51
|
+
}
|
|
52
|
+
&.is-secondary {
|
|
53
|
+
@apply bg-secondary text-on-secondary;
|
|
54
|
+
}
|
|
55
|
+
&.is-muted {
|
|
56
|
+
@apply bg-on-muted text-muted;
|
|
57
|
+
}
|
|
58
|
+
&.is-success {
|
|
59
|
+
@apply bg-success text-on-success;
|
|
60
|
+
}
|
|
61
|
+
&.is-info {
|
|
62
|
+
@apply bg-info text-on-info;
|
|
63
|
+
}
|
|
64
|
+
&.is-warning {
|
|
65
|
+
@apply bg-warning text-on-warning;
|
|
66
|
+
}
|
|
67
|
+
&.is-danger {
|
|
68
|
+
@apply bg-danger text-on-danger;
|
|
69
|
+
}
|
|
70
|
+
&.is-default {
|
|
71
|
+
@apply bg-background text-on-background;
|
|
72
|
+
}
|
|
73
|
+
&.is-surface {
|
|
74
|
+
@apply bg-surface text-on-surface;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
18
78
|
.footer-content {
|
|
19
79
|
@apply column md:row flex-nowrap items-center justify-between relative;
|
|
20
80
|
@apply w-full px-2 h-full min-h-12;
|
|
@@ -32,67 +92,4 @@
|
|
|
32
92
|
}
|
|
33
93
|
}
|
|
34
94
|
}
|
|
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
|
-
}
|
|
98
95
|
}
|
|
@@ -13,68 +13,129 @@
|
|
|
13
13
|
.sidebar-body {
|
|
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
|
-
}
|
|
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
16
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
17
|
+
&.is-soft {
|
|
18
|
+
&.is-primary {
|
|
19
|
+
@apply bg-soft-primary text-primary;
|
|
20
|
+
}
|
|
21
|
+
&.is-secondary {
|
|
22
|
+
@apply bg-soft-secondary text-secondary;
|
|
23
|
+
}
|
|
24
|
+
&.is-muted {
|
|
25
|
+
@apply bg-soft-muted text-on-muted;
|
|
26
|
+
}
|
|
27
|
+
&.is-background {
|
|
28
|
+
@apply bg-background text-on-background;
|
|
29
|
+
}
|
|
30
|
+
&.is-surface {
|
|
31
|
+
@apply bg-surface text-on-surface;
|
|
32
|
+
}
|
|
33
|
+
&.is-success {
|
|
34
|
+
@apply bg-soft-success text-success;
|
|
35
|
+
}
|
|
36
|
+
&.is-info {
|
|
37
|
+
@apply bg-soft-info text-info;
|
|
38
|
+
}
|
|
39
|
+
&.is-warning {
|
|
40
|
+
@apply bg-soft-warning text-warning;
|
|
41
|
+
}
|
|
42
|
+
&.is-danger {
|
|
43
|
+
@apply bg-soft-danger text-danger;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
68
46
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
47
|
+
&.is-solid {
|
|
48
|
+
&.is-primary {
|
|
49
|
+
@apply bg-primary text-on-primary;
|
|
50
|
+
}
|
|
51
|
+
&.is-secondary {
|
|
52
|
+
@apply bg-secondary text-on-secondary;
|
|
53
|
+
}
|
|
54
|
+
&.is-muted {
|
|
55
|
+
@apply bg-muted text-on-muted;
|
|
56
|
+
}
|
|
57
|
+
&.is-background {
|
|
58
|
+
@apply bg-background text-on-background;
|
|
59
|
+
}
|
|
60
|
+
&.is-surface {
|
|
61
|
+
@apply bg-surface text-on-surface;
|
|
62
|
+
}
|
|
63
|
+
&.is-success {
|
|
64
|
+
@apply bg-success text-on-success;
|
|
65
|
+
}
|
|
66
|
+
&.is-info {
|
|
67
|
+
@apply bg-info text-on-info;
|
|
68
|
+
}
|
|
69
|
+
&.is-warning {
|
|
70
|
+
@apply bg-warning text-on-warning;
|
|
71
|
+
}
|
|
72
|
+
&.is-danger {
|
|
73
|
+
@apply bg-danger text-on-danger;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
72
76
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
&.is-outlined {
|
|
78
|
+
@apply border;
|
|
79
|
+
|
|
80
|
+
&.is-primary {
|
|
81
|
+
@apply border-primary text-primary;
|
|
82
|
+
}
|
|
83
|
+
&.is-secondary {
|
|
84
|
+
@apply border-secondary text-secondary;
|
|
85
|
+
}
|
|
86
|
+
&.is-muted {
|
|
87
|
+
@apply border-muted text-on-muted;
|
|
88
|
+
}
|
|
89
|
+
&.is-background {
|
|
90
|
+
@apply border-on-background text-on-background;
|
|
91
|
+
}
|
|
92
|
+
&.is-surface {
|
|
93
|
+
@apply border-on-surface text-on-surface;
|
|
94
|
+
}
|
|
95
|
+
&.is-success {
|
|
96
|
+
@apply border-success text-success;
|
|
97
|
+
}
|
|
98
|
+
&.is-info {
|
|
99
|
+
@apply border-info text-info;
|
|
100
|
+
}
|
|
101
|
+
&.is-warning {
|
|
102
|
+
@apply border-warning text-warning;
|
|
103
|
+
}
|
|
104
|
+
&.is-danger {
|
|
105
|
+
@apply border-danger text-danger;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
76
108
|
|
|
77
|
-
|
|
78
|
-
|
|
109
|
+
&.is-ghost {
|
|
110
|
+
@apply bg-transparent;
|
|
111
|
+
|
|
112
|
+
&.is-primary {
|
|
113
|
+
@apply text-primary;
|
|
114
|
+
}
|
|
115
|
+
&.is-secondary {
|
|
116
|
+
@apply text-secondary;
|
|
117
|
+
}
|
|
118
|
+
&.is-muted {
|
|
119
|
+
@apply text-on-muted;
|
|
120
|
+
}
|
|
121
|
+
&.is-background {
|
|
122
|
+
@apply text-on-background;
|
|
123
|
+
}
|
|
124
|
+
&.is-surface {
|
|
125
|
+
@apply text-on-surface;
|
|
126
|
+
}
|
|
127
|
+
&.is-success {
|
|
128
|
+
@apply text-success;
|
|
129
|
+
}
|
|
130
|
+
&.is-info {
|
|
131
|
+
@apply text-info;
|
|
132
|
+
}
|
|
133
|
+
&.is-warning {
|
|
134
|
+
@apply text-warning;
|
|
135
|
+
}
|
|
136
|
+
&.is-danger {
|
|
137
|
+
@apply text-danger;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
79
140
|
}
|
|
80
141
|
}
|
|
@@ -14,29 +14,62 @@
|
|
|
14
14
|
isActive?: boolean;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
+
type Color =
|
|
18
|
+
| 'primary'
|
|
19
|
+
| 'secondary'
|
|
20
|
+
| 'muted'
|
|
21
|
+
| 'success'
|
|
22
|
+
| 'info'
|
|
23
|
+
| 'warning'
|
|
24
|
+
| 'danger'
|
|
25
|
+
| 'surface'
|
|
26
|
+
| 'background';
|
|
27
|
+
|
|
17
28
|
type Props = {
|
|
18
29
|
items: BottomNavItem[];
|
|
19
|
-
|
|
30
|
+
color?: Color;
|
|
31
|
+
fabColor?: Color;
|
|
32
|
+
variant?: 'solid' | 'soft' | 'blur';
|
|
33
|
+
activeStyle?: 'line' | 'pill';
|
|
20
34
|
size?: 'sm' | 'md' | 'lg';
|
|
21
|
-
isSolid?: boolean;
|
|
22
35
|
isBlock?: boolean;
|
|
36
|
+
isBordered?: boolean;
|
|
23
37
|
class?: string;
|
|
24
38
|
};
|
|
25
39
|
|
|
26
40
|
const {
|
|
27
41
|
items = [],
|
|
28
42
|
class: className,
|
|
29
|
-
|
|
43
|
+
color = 'surface',
|
|
44
|
+
fabColor = 'primary',
|
|
45
|
+
variant = 'solid',
|
|
46
|
+
activeStyle = 'line',
|
|
30
47
|
size = 'md',
|
|
31
|
-
|
|
32
|
-
|
|
48
|
+
isBlock = false,
|
|
49
|
+
isBordered = true
|
|
33
50
|
}: Props = $props();
|
|
34
51
|
|
|
35
|
-
const
|
|
52
|
+
const colors = {
|
|
36
53
|
primary: 'is-primary',
|
|
37
54
|
secondary: 'is-secondary',
|
|
38
|
-
|
|
39
|
-
|
|
55
|
+
muted: 'is-muted',
|
|
56
|
+
success: 'is-success',
|
|
57
|
+
info: 'is-info',
|
|
58
|
+
warning: 'is-warning',
|
|
59
|
+
danger: 'is-danger',
|
|
60
|
+
surface: 'is-surface',
|
|
61
|
+
background: 'is-background'
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const variants = {
|
|
65
|
+
solid: 'is-solid',
|
|
66
|
+
soft: 'is-soft',
|
|
67
|
+
blur: 'is-blur'
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const activeStyles = {
|
|
71
|
+
line: 'active-line',
|
|
72
|
+
pill: 'active-pill'
|
|
40
73
|
};
|
|
41
74
|
|
|
42
75
|
const sizeClasses = {
|
|
@@ -45,13 +78,10 @@
|
|
|
45
78
|
lg: 'is-lg'
|
|
46
79
|
};
|
|
47
80
|
|
|
48
|
-
// Determine if any item has a label
|
|
49
81
|
const hasLabels = $derived(items.some((item) => item.label));
|
|
50
82
|
|
|
51
83
|
function isItemActive(item: BottomNavItem): boolean {
|
|
52
|
-
// If item has explicit isActive, use that
|
|
53
84
|
if (item.isActive !== undefined) return item.isActive;
|
|
54
|
-
// Otherwise check against current URL
|
|
55
85
|
if (!item.href) return false;
|
|
56
86
|
return page.url.pathname === item.href || page.url.pathname.startsWith(item.href + '/');
|
|
57
87
|
}
|
|
@@ -66,17 +96,24 @@
|
|
|
66
96
|
<nav
|
|
67
97
|
class={cn(
|
|
68
98
|
'bottomnav',
|
|
69
|
-
|
|
99
|
+
colors[color],
|
|
100
|
+
variants[variant],
|
|
101
|
+
activeStyles[activeStyle],
|
|
70
102
|
sizeClasses[size],
|
|
71
|
-
isSolid && 'is-solid',
|
|
72
103
|
!hasLabels && 'is-icon-only',
|
|
73
104
|
!isBlock && 'is-fixed',
|
|
105
|
+
isBordered && 'is-bordered',
|
|
74
106
|
className
|
|
75
107
|
)}
|
|
76
108
|
>
|
|
77
109
|
{#each items as item}
|
|
78
110
|
{@const active = isItemActive(item)}
|
|
79
|
-
{@const itemClass = cn(
|
|
111
|
+
{@const itemClass = cn(
|
|
112
|
+
'bottomnav-item',
|
|
113
|
+
active && 'is-active',
|
|
114
|
+
item.isFab && 'is-fab',
|
|
115
|
+
item.isFab && colors[fabColor]
|
|
116
|
+
)}
|
|
80
117
|
|
|
81
118
|
{#if item.href}
|
|
82
119
|
<a href={item.href} class={itemClass}>
|