@getmicdrop/svelte-components 5.8.1 → 5.8.2
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/calendar/AboutShow/AboutShow.svelte +172 -172
- package/dist/calendar/Calendar/MiniMonthCalendar.svelte +782 -782
- package/dist/calendar/FAQs/FAQs.svelte +75 -75
- package/dist/calendar/MonthSwitcher/MonthSwitcher.svelte +126 -126
- package/dist/calendar/OrderSummary/OrderSummary.svelte +367 -367
- package/dist/calendar/PublicCard/PublicCard.svelte +134 -134
- package/dist/calendar/ShowCard/ShowCard.svelte +157 -157
- package/dist/calendar/ShowTimeCard/ShowTimeCard.svelte +61 -61
- package/dist/components/Heading.svelte +60 -58
- package/dist/components/Heading.svelte.d.ts +1 -0
- package/dist/components/Heading.svelte.d.ts.map +1 -1
- package/dist/components/Layout/AppShell.svelte +104 -104
- package/dist/components/Layout/ContentSection.svelte +80 -80
- package/dist/components/Layout/Grid.svelte +4 -4
- package/dist/components/Layout/Heading.svelte +81 -81
- package/dist/components/Layout/PageContainer.svelte +69 -69
- package/dist/components/Layout/Responsive.svelte +75 -75
- package/dist/components/Layout/Section.svelte +80 -80
- package/dist/components/Layout/ShowOnDesktop.svelte +37 -37
- package/dist/components/Layout/ShowOnMobile.svelte +37 -37
- package/dist/components/Layout/Sidebar.svelte +108 -108
- package/dist/components/Layout/Stack.spec.js +1 -1
- package/dist/components/Layout/Stack.svelte +6 -6
- package/dist/components/Layout/Text.svelte +87 -87
- package/dist/components/Layout/TwoColumn.svelte +108 -108
- package/dist/components/Text.svelte +53 -53
- package/dist/constants/validation.js +91 -91
- package/dist/constants/validation.spec.js +64 -64
- package/dist/datetime/__tests__/format.test.js +1 -1
- package/dist/datetime/__tests__/parse.test.js +1 -1
- package/dist/datetime/__tests__/timezone.test.js +1 -1
- package/dist/datetime/parse.js +1 -1
- package/dist/forms/createFormStore.svelte.js +1 -0
- package/dist/index.js +50 -50
- package/dist/patterns/data/DataGrid.svelte +45 -45
- package/dist/patterns/data/DataList.svelte +24 -24
- package/dist/patterns/data/DataTable.svelte +36 -36
- package/dist/patterns/forms/FormActions.spec.js +95 -95
- package/dist/patterns/forms/FormActions.stories.svelte +97 -97
- package/dist/patterns/forms/FormActions.svelte +46 -46
- package/dist/patterns/forms/FormGrid.svelte +33 -33
- package/dist/patterns/forms/FormSection.svelte +32 -32
- package/dist/patterns/forms/FormValidationSummary.stories.svelte +83 -83
- package/dist/patterns/forms/FormValidationSummary.svelte +74 -74
- package/dist/patterns/layout/Sidebar.svelte +39 -39
- package/dist/patterns/layout/index.js +29 -29
- package/dist/patterns/navigation/BottomNav.stories.svelte +117 -117
- package/dist/patterns/navigation/BottomNav.svelte +74 -74
- package/dist/patterns/navigation/Header.stories.svelte +77 -77
- package/dist/patterns/navigation/Header.svelte +193 -193
- package/dist/patterns/page/PageHeader.svelte +18 -18
- package/dist/patterns/page/PageLayout.svelte +40 -40
- package/dist/patterns/page/PageLoader.spec.js +57 -57
- package/dist/patterns/page/PageLoader.stories.svelte +137 -137
- package/dist/patterns/page/PageLoader.svelte +24 -24
- package/dist/patterns/page/SectionHeader.svelte +29 -29
- package/dist/presets/badges.js +112 -112
- package/dist/presets/buttons.js +76 -76
- package/dist/presets/index.js +9 -9
- package/dist/primitives/Accordion/Accordion.stories.svelte +75 -75
- package/dist/primitives/Accordion/Accordion.svelte +42 -42
- package/dist/primitives/Accordion/AccordionItem.svelte +95 -95
- package/dist/primitives/Alert/Alert.spec.js +173 -173
- package/dist/primitives/Alert/Alert.stories.svelte +88 -88
- package/dist/primitives/Alert/Alert.svelte +27 -27
- package/dist/primitives/Avatar/Avatar.stories.svelte +94 -94
- package/dist/primitives/Avatar/Avatar.svelte +66 -66
- package/dist/primitives/Badges/Badge.spec.js +144 -144
- package/dist/primitives/Badges/Badge.stories.svelte +86 -86
- package/dist/primitives/Badges/Badge.svelte +79 -79
- package/dist/primitives/BottomSheet/BottomSheet.spec.js +136 -136
- package/dist/primitives/BottomSheet/BottomSheet.stories.svelte +83 -83
- package/dist/primitives/BottomSheet/BottomSheet.svelte +100 -100
- package/dist/primitives/Breadcrumb/Breadcrumb.spec.js +122 -122
- package/dist/primitives/Breadcrumb/Breadcrumb.stories.svelte +23 -23
- package/dist/primitives/Breadcrumb/Breadcrumb.svelte +89 -89
- package/dist/primitives/Button/Button.spec.js +223 -223
- package/dist/primitives/Button/Button.stories.svelte +76 -76
- package/dist/primitives/Button/Button.svelte +270 -270
- package/dist/primitives/Button/ButtonSaveDemo.spec.js +146 -146
- package/dist/primitives/Button/ButtonSaveDemo.svelte +25 -25
- package/dist/primitives/Button/ButtonVariantShowcase.svelte +129 -129
- package/dist/primitives/Card.spec.js +49 -49
- package/dist/primitives/Card.stories.svelte +22 -22
- package/dist/primitives/Card.svelte +28 -28
- package/dist/primitives/Checkbox/Checkbox.stories.svelte +84 -84
- package/dist/primitives/Checkbox/Checkbox.svelte +88 -88
- package/dist/primitives/DarkModeToggle.spec.js +390 -390
- package/dist/primitives/DarkModeToggle.stories.svelte +57 -57
- package/dist/primitives/DarkModeToggle.svelte +136 -136
- package/dist/primitives/Drawer/Drawer.stories.svelte +80 -80
- package/dist/primitives/Drawer/Drawer.svelte +120 -120
- package/dist/primitives/Dropdown/Dropdown.stories.svelte +137 -137
- package/dist/primitives/Dropdown/Dropdown.svelte +14 -14
- package/dist/primitives/Dropdown/DropdownDivider.svelte +9 -9
- package/dist/primitives/Dropdown/DropdownItem.svelte +80 -80
- package/dist/primitives/Helper/Helper.svelte +33 -33
- package/dist/primitives/Icons/ArrowLeft.svelte +8 -8
- package/dist/primitives/Icons/ArrowRight.svelte +8 -8
- package/dist/primitives/Icons/Availability.svelte +14 -14
- package/dist/primitives/Icons/Back.svelte +14 -14
- package/dist/primitives/Icons/CheckCircle.svelte +6 -6
- package/dist/primitives/Icons/CheckCircleOutline.svelte +15 -15
- package/dist/primitives/Icons/ChevronLeft.svelte +4 -4
- package/dist/primitives/Icons/ChevronRight.svelte +4 -4
- package/dist/primitives/Icons/Copy.svelte +15 -15
- package/dist/primitives/Icons/Cross.svelte +5 -5
- package/dist/primitives/Icons/DownArrow.svelte +8 -8
- package/dist/primitives/Icons/ErrorCircle.svelte +6 -6
- package/dist/primitives/Icons/FacebookIcon.svelte +2 -2
- package/dist/primitives/Icons/Home.svelte +15 -15
- package/dist/primitives/Icons/Icon.spec.js +169 -169
- package/dist/primitives/Icons/Icon.stories.svelte +100 -100
- package/dist/primitives/Icons/Icon.svelte +52 -52
- package/dist/primitives/Icons/IconGallery.stories.svelte +235 -235
- package/dist/primitives/Icons/Info.svelte +7 -7
- package/dist/primitives/Icons/InstagramIcon.svelte +4 -4
- package/dist/primitives/Icons/LogoInstagram.svelte +2 -2
- package/dist/primitives/Icons/Message.svelte +15 -15
- package/dist/primitives/Icons/MoonIcon.svelte +5 -5
- package/dist/primitives/Icons/More.svelte +21 -21
- package/dist/primitives/Icons/MoreHori.spec.js +61 -61
- package/dist/primitives/Icons/MoreHori.svelte +22 -22
- package/dist/primitives/Icons/Notification.svelte +14 -14
- package/dist/primitives/Icons/Payment.svelte +14 -14
- package/dist/primitives/Icons/Profile.svelte +21 -21
- package/dist/primitives/Icons/Reload.svelte +29 -29
- package/dist/primitives/Icons/Shows.svelte +21 -21
- package/dist/primitives/Icons/Signout.svelte +21 -21
- package/dist/primitives/Icons/SunIcon.svelte +8 -8
- package/dist/primitives/Icons/TiktokIcon.svelte +2 -2
- package/dist/primitives/Icons/TwitterIcon.svelte +2 -2
- package/dist/primitives/Icons/WarningIcon.spec.js +18 -18
- package/dist/primitives/Icons/WarningIcon.svelte +5 -5
- package/dist/primitives/Input/Input.spec.js +573 -573
- package/dist/primitives/Input/Input.stories.svelte +139 -139
- package/dist/primitives/Input/Select.spec.js +212 -212
- package/dist/primitives/Input/Select.stories.svelte +112 -112
- package/dist/primitives/Input/Select.svelte +128 -128
- package/dist/primitives/Input/Textarea.stories.svelte +137 -137
- package/dist/primitives/Input/Textarea.svelte +35 -35
- package/dist/primitives/Label/Label.svelte +37 -37
- package/dist/primitives/Modal/Modal.spec.js +99 -99
- package/dist/primitives/Modal/Modal.stories.svelte +86 -86
- package/dist/primitives/Pagination/Pagination.stories.svelte +76 -76
- package/dist/primitives/Pagination/Pagination.svelte +261 -261
- package/dist/primitives/Radio/Radio.stories.svelte +80 -80
- package/dist/primitives/Radio/Radio.svelte +67 -67
- package/dist/primitives/Skeleton/CardPlaceholder.svelte +87 -87
- package/dist/primitives/Skeleton/ImagePlaceholder.svelte +59 -59
- package/dist/primitives/Skeleton/ListPlaceholder.svelte +76 -76
- package/dist/primitives/Skeleton/Skeleton.stories.svelte +151 -151
- package/dist/primitives/Skeleton/Skeleton.svelte +26 -26
- package/dist/primitives/Spinner/Spinner.spec.js +71 -71
- package/dist/primitives/Spinner/Spinner.stories.svelte +29 -29
- package/dist/primitives/Spinner/Spinner.svelte +20 -20
- package/dist/primitives/Tabs/TabItem.svelte +49 -49
- package/dist/primitives/Tabs/Tabs.stories.svelte +112 -112
- package/dist/primitives/Tabs/Tabs.svelte +123 -123
- package/dist/primitives/Toggle.spec.js +143 -143
- package/dist/primitives/Toggle.stories.svelte +92 -92
- package/dist/primitives/Tooltip/Tooltip.svelte +83 -83
- package/dist/primitives/Typography/Typography.svelte +53 -53
- package/dist/primitives/ValidationError.spec.js +103 -103
- package/dist/primitives/ValidationError.stories.svelte +69 -69
- package/dist/primitives/ValidationError.svelte +29 -29
- package/dist/primitives/index.js +91 -91
- package/dist/recipes/CropImage/CropImage.spec.js +208 -208
- package/dist/recipes/CropImage/CropImage.stories.svelte +104 -104
- package/dist/recipes/CropImage/CropImage.svelte +238 -238
- package/dist/recipes/ImageUploader/ImageUploader.stories.svelte +125 -125
- package/dist/recipes/ImageUploader/ImageUploader.svelte +804 -804
- package/dist/recipes/Toaster/Toaster.stories.svelte +62 -62
- package/dist/recipes/feedback/EmptyState/EmptyState.svelte +1 -1
- package/dist/recipes/feedback/ErrorDisplay.spec.js +69 -69
- package/dist/recipes/feedback/ErrorDisplay.stories.svelte +101 -101
- package/dist/recipes/feedback/ErrorDisplay.svelte +1 -1
- package/dist/recipes/feedback/StatusIndicator/StatusIndicator.spec.js +133 -133
- package/dist/recipes/feedback/StatusIndicator/StatusIndicator.svelte +157 -157
- package/dist/recipes/fields/CheckboxField.svelte +85 -85
- package/dist/recipes/fields/FormField.svelte +58 -58
- package/dist/recipes/fields/RadioGroup.svelte +95 -95
- package/dist/recipes/fields/SelectField.svelte +80 -80
- package/dist/recipes/fields/TextareaField.svelte +97 -97
- package/dist/recipes/fields/ToggleField.svelte +60 -60
- package/dist/recipes/fields/index.js +7 -7
- package/dist/recipes/inputs/MultiSelect.spec.js +258 -258
- package/dist/recipes/inputs/MultiSelect.stories.svelte +133 -133
- package/dist/recipes/inputs/OTPInput.spec.js +251 -251
- package/dist/recipes/inputs/OTPInput.stories.svelte +162 -162
- package/dist/recipes/inputs/OTPInput.svelte +29 -29
- package/dist/recipes/inputs/PasswordInput.svelte +22 -22
- package/dist/recipes/inputs/PasswordStrengthIndicator/PasswordStrengthIndicator.svelte +117 -117
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.stories.svelte +123 -123
- package/dist/recipes/inputs/Search.svelte +37 -37
- package/dist/recipes/inputs/SelectDropdown.svelte +57 -57
- package/dist/recipes/modals/AlertModal.svelte +130 -130
- package/dist/recipes/modals/ConfirmationModal.spec.js +206 -206
- package/dist/recipes/modals/ConfirmationModal.stories.svelte +119 -119
- package/dist/recipes/modals/ConfirmationModal.svelte +152 -152
- package/dist/recipes/modals/InputModal.svelte +182 -182
- package/dist/recipes/modals/ModalStateManager.spec.js +100 -100
- package/dist/recipes/modals/ModalStateManager.svelte +77 -77
- package/dist/recipes/modals/ModalTestWrapper.svelte +65 -65
- package/dist/recipes/modals/StatusModal.svelte +206 -206
- package/dist/services/EventService.js +75 -75
- package/dist/services/EventService.spec.js +217 -217
- package/dist/services/ShowService.spec.js +345 -345
- package/dist/stores/toaster.js +13 -13
- package/dist/stories/ButtonAuditReview.stories.svelte +14 -14
- package/dist/stories/ButtonAuditReview.svelte +427 -427
- package/dist/stories/PatternsGallery.stories.svelte +19 -19
- package/dist/stories/PatternsGallery.svelte +206 -206
- package/dist/stories/PrimitivesGallery.stories.svelte +19 -19
- package/dist/stories/PrimitivesGallery.svelte +725 -725
- package/dist/stories/RecipesGallery.stories.svelte +19 -19
- package/dist/stories/RecipesGallery.svelte +271 -271
- package/dist/stories/button-audit-manifest.json +11186 -11186
- package/dist/tailwind/preset.cjs +82 -82
- package/dist/telemetry.js +405 -405
- package/dist/telemetry.spec.js +1169 -1169
- package/dist/tokens/tokens.css +87 -87
- package/dist/tokens/typography-base.css +163 -163
- package/dist/tokens/utilities.css +353 -0
- package/dist/utils/apiConfig.spec.js +219 -219
- package/dist/utils/transitions.js +62 -62
- package/dist/utils/utils.js +354 -354
- package/package.json +296 -295
|
@@ -1,744 +1,744 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
// ============================================================================
|
|
3
|
-
// PRIMITIVES VISUAL GALLERY
|
|
4
|
-
// Displays ALL primitive components with variants and states
|
|
5
|
-
// ============================================================================
|
|
6
|
-
|
|
7
|
-
// Accordion
|
|
8
|
-
import Accordion from '../primitives/Accordion/Accordion.svelte';
|
|
9
|
-
import AccordionItem from '../primitives/Accordion/AccordionItem.svelte';
|
|
10
|
-
|
|
11
|
-
// Alert
|
|
12
|
-
import Alert from '../primitives/Alert/Alert.svelte';
|
|
13
|
-
|
|
14
|
-
// Avatar
|
|
15
|
-
import Avatar from '../primitives/Avatar/Avatar.svelte';
|
|
16
|
-
|
|
17
|
-
// Badge
|
|
18
|
-
import Badge from '../primitives/Badges/Badge.svelte';
|
|
19
|
-
|
|
20
|
-
// BottomSheet
|
|
21
|
-
import BottomSheet from '../primitives/BottomSheet/BottomSheet.svelte';
|
|
22
|
-
|
|
23
|
-
// Breadcrumb
|
|
24
|
-
import Breadcrumb from '../primitives/Breadcrumb/Breadcrumb.svelte';
|
|
25
|
-
|
|
26
|
-
// Button
|
|
27
|
-
import Button from '../primitives/Button/Button.svelte';
|
|
28
|
-
|
|
29
|
-
// Card
|
|
30
|
-
import Card from '../primitives/Card.svelte';
|
|
31
|
-
|
|
32
|
-
// Checkbox
|
|
33
|
-
import Checkbox from '../primitives/Checkbox/Checkbox.svelte';
|
|
34
|
-
|
|
35
|
-
// DarkModeToggle
|
|
36
|
-
import DarkModeToggle from '../primitives/DarkModeToggle.svelte';
|
|
37
|
-
|
|
38
|
-
// Drawer
|
|
39
|
-
import Drawer from '../primitives/Drawer/Drawer.svelte';
|
|
40
|
-
|
|
41
|
-
// Dropdown
|
|
42
|
-
import Dropdown from '../primitives/Dropdown/Dropdown.svelte';
|
|
43
|
-
import DropdownItem from '../primitives/Dropdown/DropdownItem.svelte';
|
|
44
|
-
|
|
45
|
-
// Input
|
|
46
|
-
import Input from '../primitives/Input/Input.svelte';
|
|
47
|
-
import Select from '../primitives/Input/Select.svelte';
|
|
48
|
-
import Textarea from '../primitives/Input/Textarea.svelte';
|
|
49
|
-
|
|
50
|
-
// Label
|
|
51
|
-
import Label from '../primitives/Label/Label.svelte';
|
|
52
|
-
|
|
53
|
-
// Modal
|
|
54
|
-
import Modal from '../primitives/Modal/Modal.svelte';
|
|
55
|
-
|
|
56
|
-
// Pagination
|
|
57
|
-
import Pagination from '../primitives/Pagination/Pagination.svelte';
|
|
58
|
-
|
|
59
|
-
// Radio
|
|
60
|
-
import Radio from '../primitives/Radio/Radio.svelte';
|
|
61
|
-
|
|
62
|
-
// Skeleton
|
|
63
|
-
import Skeleton from '../primitives/Skeleton/Skeleton.svelte';
|
|
64
|
-
import ImagePlaceholder from '../primitives/Skeleton/ImagePlaceholder.svelte';
|
|
65
|
-
import CardPlaceholder from '../primitives/Skeleton/CardPlaceholder.svelte';
|
|
66
|
-
import ListPlaceholder from '../primitives/Skeleton/ListPlaceholder.svelte';
|
|
67
|
-
|
|
68
|
-
// Spinner
|
|
69
|
-
import Spinner from '../primitives/Spinner/Spinner.svelte';
|
|
70
|
-
|
|
71
|
-
// Tabs
|
|
72
|
-
import Tabs from '../primitives/Tabs/Tabs.svelte';
|
|
73
|
-
import TabItem from '../primitives/Tabs/TabItem.svelte';
|
|
74
|
-
|
|
75
|
-
// Toggle
|
|
76
|
-
import Toggle from '../primitives/Toggle.svelte';
|
|
77
|
-
|
|
78
|
-
// Typography
|
|
79
|
-
import Typography from '../primitives/Typography/Typography.svelte';
|
|
80
|
-
|
|
81
|
-
// ValidationError
|
|
82
|
-
import ValidationError from '../primitives/ValidationError.svelte';
|
|
83
|
-
|
|
84
|
-
// Icons
|
|
85
|
-
import Icon from '../primitives/Icons/Icon.svelte';
|
|
86
|
-
import Home from '../primitives/Icons/Home.svelte';
|
|
87
|
-
import Profile from '../primitives/Icons/Profile.svelte';
|
|
88
|
-
import Notification from '../primitives/Icons/Notification.svelte';
|
|
89
|
-
import Message from '../primitives/Icons/Message.svelte';
|
|
90
|
-
import Cross from '../primitives/Icons/Cross.svelte';
|
|
91
|
-
import CheckCircle from '../primitives/Icons/CheckCircle.svelte';
|
|
92
|
-
import ErrorCircle from '../primitives/Icons/ErrorCircle.svelte';
|
|
93
|
-
import Info from '../primitives/Icons/Info.svelte';
|
|
94
|
-
import WarningIcon from '../primitives/Icons/WarningIcon.svelte';
|
|
95
|
-
|
|
96
|
-
// State
|
|
97
|
-
let isDark = $state(false);
|
|
98
|
-
let showModal = $state(false);
|
|
99
|
-
let showDrawer = $state(false);
|
|
100
|
-
let showBottomSheet = $state(false);
|
|
101
|
-
let dropdownOpen = $state(false);
|
|
102
|
-
let checkboxChecked = $state(false);
|
|
103
|
-
let toggleChecked = $state(false);
|
|
104
|
-
let radioValue = $state('option1');
|
|
105
|
-
let inputValue = $state('');
|
|
106
|
-
let textareaValue = $state('');
|
|
107
|
-
let selectValue = $state('');
|
|
108
|
-
let currentPage = $state(1);
|
|
109
|
-
let activeTab = $state(0);
|
|
110
|
-
|
|
111
|
-
function toggleDark() {
|
|
112
|
-
isDark = !isDark;
|
|
113
|
-
document.documentElement.classList.toggle('dark', isDark);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// Section component for consistent styling
|
|
117
|
-
const sectionClass = (dark: boolean) =>
|
|
118
|
-
`rounded-xl p-6 ${dark ? 'bg-gray-800 border-gray-700' : 'bg-white border-gray-200'} border`;
|
|
119
|
-
|
|
120
|
-
const headingClass = (dark: boolean) =>
|
|
121
|
-
`text-xl font-semibold mb-1 ${dark ? 'text-white' : 'text-gray-900'}`;
|
|
122
|
-
|
|
123
|
-
const subheadingClass = (dark: boolean) =>
|
|
124
|
-
`text-sm mb-4 ${dark ? 'text-gray-400' : 'text-gray-500'}`;
|
|
125
|
-
</script>
|
|
126
|
-
|
|
127
|
-
<div class="min-h-screen p-6 space-y-8 {isDark ? 'bg-gray-900' : 'bg-gray-50'}">
|
|
128
|
-
<!-- Header -->
|
|
129
|
-
<div class="flex items-center justify-between mb-8">
|
|
130
|
-
<div>
|
|
131
|
-
<h1 class="text-3xl font-bold {isDark ? 'text-white' : 'text-gray-900'}">Primitives Gallery</h1>
|
|
132
|
-
<p class="{isDark ? 'text-gray-400' : 'text-gray-600'}">All primitive components with variants and states</p>
|
|
133
|
-
</div>
|
|
134
|
-
<button
|
|
135
|
-
onclick={toggleDark}
|
|
136
|
-
class="px-4 py-2 rounded-lg font-medium {isDark ? 'bg-yellow-500 text-black' : 'bg-gray-800 text-white'}"
|
|
137
|
-
>
|
|
138
|
-
{isDark ? '☀️ Light' : '🌙 Dark'}
|
|
139
|
-
</button>
|
|
140
|
-
</div>
|
|
141
|
-
|
|
142
|
-
<!-- ========== BUTTONS ========== -->
|
|
143
|
-
<section class={sectionClass(isDark)}>
|
|
144
|
-
<h2 class={headingClass(isDark)}>Button</h2>
|
|
145
|
-
<p class={subheadingClass(isDark)}>Primary action component with multiple variants</p>
|
|
146
|
-
|
|
147
|
-
<div class="space-y-4">
|
|
148
|
-
<div>
|
|
149
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Variants</p>
|
|
150
|
-
<div class="flex flex-wrap gap-3 items-center">
|
|
151
|
-
<Button variant="default">Primary</Button>
|
|
152
|
-
<Button variant="alternative">Secondary</Button>
|
|
153
|
-
<Button variant="outline">Outline</Button>
|
|
154
|
-
<Button variant="ghost">Ghost</Button>
|
|
155
|
-
<Button variant="link">Link</Button>
|
|
156
|
-
<Button variant="red">Destructive</Button>
|
|
157
|
-
<Button variant="red-outline">Red Outline</Button>
|
|
158
|
-
<Button variant="ghost-red">Ghost Red</Button>
|
|
159
|
-
<Button variant="toggle">Toggle</Button>
|
|
160
|
-
<Button variant="toggle" active={true}>Toggle Active</Button>
|
|
161
|
-
</div>
|
|
162
|
-
</div>
|
|
163
|
-
|
|
164
|
-
<div>
|
|
165
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Nav Variant (Mobile Navigation)</p>
|
|
166
|
-
<div class="flex gap-6 items-end bg-gray-100 dark:bg-gray-800 p-4 rounded-lg">
|
|
167
|
-
<Button variant="nav">
|
|
168
|
-
<Home class="w-5 h-5" />
|
|
169
|
-
<span>Home</span>
|
|
170
|
-
</Button>
|
|
171
|
-
<Button variant="nav" active={true}>
|
|
172
|
-
<Notification class="w-5 h-5" />
|
|
173
|
-
<span>Events</span>
|
|
174
|
-
</Button>
|
|
175
|
-
<Button variant="nav">
|
|
176
|
-
<Profile class="w-5 h-5" />
|
|
177
|
-
<span>Profile</span>
|
|
178
|
-
</Button>
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
|
|
182
|
-
<div>
|
|
183
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Avatar, Menu & Card Variants</p>
|
|
184
|
-
<div class="flex gap-6 items-start">
|
|
185
|
-
<div class="flex flex-col items-center gap-2">
|
|
186
|
-
<Button variant="avatar">
|
|
187
|
-
<Avatar src="https://api.dicebear.com/7.x/avataaars/svg?seed=PrimitivesGallery" rounded size="md" />
|
|
188
|
-
</Button>
|
|
189
|
-
<span class="text-xs text-gray-500">Avatar trigger</span>
|
|
190
|
-
</div>
|
|
191
|
-
<div class="w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg overflow-hidden">
|
|
192
|
-
<Button variant="menu-item">Settings</Button>
|
|
193
|
-
<Button variant="menu-item">Profile</Button>
|
|
194
|
-
<div class="h-px bg-gray-200 dark:bg-gray-700"></div>
|
|
195
|
-
<Button variant="menu-item-danger">Sign out</Button>
|
|
196
|
-
</div>
|
|
197
|
-
<div class="w-64 space-y-2">
|
|
198
|
-
<Button variant="card">
|
|
199
|
-
<span class="flex flex-col">
|
|
200
|
-
<span class="font-medium">Select this option</span>
|
|
201
|
-
<span class="text-sm text-gray-500">Description text here</span>
|
|
202
|
-
</span>
|
|
203
|
-
</Button>
|
|
204
|
-
<Button variant="card">
|
|
205
|
-
<span class="flex flex-col">
|
|
206
|
-
<span class="font-medium">Another option</span>
|
|
207
|
-
<span class="text-sm text-gray-500">More description</span>
|
|
208
|
-
</span>
|
|
209
|
-
</Button>
|
|
210
|
-
</div>
|
|
211
|
-
</div>
|
|
212
|
-
</div>
|
|
213
|
-
|
|
214
|
-
<div>
|
|
215
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Sizes</p>
|
|
216
|
-
<div class="flex flex-wrap gap-3 items-end">
|
|
217
|
-
<Button size="xs">Extra Small</Button>
|
|
218
|
-
<Button size="sm">Small</Button>
|
|
219
|
-
<Button size="md">Medium</Button>
|
|
220
|
-
<Button size="lg">Large</Button>
|
|
221
|
-
<Button size="xl">Extra Large</Button>
|
|
222
|
-
</div>
|
|
223
|
-
</div>
|
|
224
|
-
|
|
225
|
-
<div>
|
|
226
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">States</p>
|
|
227
|
-
<div class="flex flex-wrap gap-3 items-center">
|
|
228
|
-
<Button disabled>Disabled</Button>
|
|
229
|
-
<Button loading>Loading</Button>
|
|
230
|
-
<Button success successText="Saved!">Success</Button>
|
|
231
|
-
</div>
|
|
232
|
-
</div>
|
|
233
|
-
</div>
|
|
234
|
-
</section>
|
|
235
|
-
|
|
236
|
-
<!-- ========== INPUTS ========== -->
|
|
237
|
-
<section class={sectionClass(isDark)}>
|
|
238
|
-
<h2 class={headingClass(isDark)}>Input, Select, Textarea</h2>
|
|
239
|
-
<p class={subheadingClass(isDark)}>Form input primitives</p>
|
|
240
|
-
|
|
241
|
-
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
242
|
-
<div>
|
|
243
|
-
<Input
|
|
244
|
-
label="Text Input"
|
|
245
|
-
placeholder="Enter text..."
|
|
246
|
-
bind:value={inputValue}
|
|
247
|
-
/>
|
|
248
|
-
</div>
|
|
249
|
-
|
|
250
|
-
<div>
|
|
251
|
-
<Input
|
|
252
|
-
type="email"
|
|
253
|
-
label="Email Input"
|
|
254
|
-
placeholder="email@example.com"
|
|
255
|
-
/>
|
|
256
|
-
</div>
|
|
257
|
-
|
|
258
|
-
<div>
|
|
259
|
-
<Input
|
|
260
|
-
type="password"
|
|
261
|
-
label="Password"
|
|
262
|
-
placeholder="••••••••"
|
|
263
|
-
/>
|
|
264
|
-
</div>
|
|
265
|
-
|
|
266
|
-
<div>
|
|
267
|
-
<Input
|
|
268
|
-
label="With Error"
|
|
269
|
-
placeholder="Invalid input"
|
|
270
|
-
errorText="This field is required"
|
|
271
|
-
/>
|
|
272
|
-
</div>
|
|
273
|
-
|
|
274
|
-
<div>
|
|
275
|
-
<Input
|
|
276
|
-
label="Disabled"
|
|
277
|
-
placeholder="Can't edit this"
|
|
278
|
-
disabled
|
|
279
|
-
/>
|
|
280
|
-
</div>
|
|
281
|
-
|
|
282
|
-
<div>
|
|
283
|
-
<Input
|
|
284
|
-
label="With Helper Text"
|
|
285
|
-
placeholder="Enter something"
|
|
286
|
-
helperText="This is helper text"
|
|
287
|
-
/>
|
|
288
|
-
</div>
|
|
289
|
-
</div>
|
|
290
|
-
|
|
291
|
-
<div class="mt-6 grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
292
|
-
<div>
|
|
293
|
-
<Textarea
|
|
294
|
-
label="Textarea"
|
|
295
|
-
placeholder="Write your message..."
|
|
296
|
-
bind:value={textareaValue}
|
|
297
|
-
/>
|
|
298
|
-
</div>
|
|
299
|
-
|
|
300
|
-
<div>
|
|
301
|
-
<Select
|
|
302
|
-
label="Select"
|
|
303
|
-
bind:value={selectValue}
|
|
304
|
-
>
|
|
305
|
-
<option value="">Choose an option</option>
|
|
306
|
-
<option value="1">Option 1</option>
|
|
307
|
-
<option value="2">Option 2</option>
|
|
308
|
-
<option value="3">Option 3</option>
|
|
309
|
-
</Select>
|
|
310
|
-
</div>
|
|
311
|
-
</div>
|
|
312
|
-
</section>
|
|
313
|
-
|
|
314
|
-
<!-- ========== CHECKBOX, RADIO, TOGGLE ========== -->
|
|
315
|
-
<section class={sectionClass(isDark)}>
|
|
316
|
-
<h2 class={headingClass(isDark)}>Checkbox, Radio, Toggle</h2>
|
|
317
|
-
<p class={subheadingClass(isDark)}>Selection controls</p>
|
|
318
|
-
|
|
319
|
-
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
|
|
320
|
-
<div>
|
|
321
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-3">Checkbox</p>
|
|
322
|
-
<div class="space-y-3">
|
|
323
|
-
<Checkbox bind:checked={checkboxChecked}>Default checkbox</Checkbox>
|
|
324
|
-
<Checkbox checked={true}>Checked by default</Checkbox>
|
|
325
|
-
<Checkbox disabled>Disabled</Checkbox>
|
|
326
|
-
<Checkbox disabled checked={true}>Disabled checked</Checkbox>
|
|
327
|
-
</div>
|
|
328
|
-
</div>
|
|
329
|
-
|
|
330
|
-
<div>
|
|
331
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-3">Radio</p>
|
|
332
|
-
<div class="space-y-3">
|
|
333
|
-
<Radio name="demo" value="option1" bind:group={radioValue}>Option 1</Radio>
|
|
334
|
-
<Radio name="demo" value="option2" bind:group={radioValue}>Option 2</Radio>
|
|
335
|
-
<Radio name="demo" value="option3" bind:group={radioValue}>Option 3</Radio>
|
|
336
|
-
<Radio name="demo-disabled" value="disabled" disabled>Disabled</Radio>
|
|
337
|
-
</div>
|
|
338
|
-
</div>
|
|
339
|
-
|
|
340
|
-
<div>
|
|
341
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-3">Toggle</p>
|
|
342
|
-
<div class="space-y-3">
|
|
343
|
-
<Toggle bind:checked={toggleChecked}>Default toggle</Toggle>
|
|
344
|
-
<Toggle checked={true}>On by default</Toggle>
|
|
345
|
-
<Toggle disabled>Disabled off</Toggle>
|
|
346
|
-
<Toggle disabled checked={true}>Disabled on</Toggle>
|
|
347
|
-
</div>
|
|
348
|
-
</div>
|
|
349
|
-
</div>
|
|
350
|
-
</section>
|
|
351
|
-
|
|
352
|
-
<!-- ========== BADGE ========== -->
|
|
353
|
-
<section class={sectionClass(isDark)}>
|
|
354
|
-
<h2 class={headingClass(isDark)}>Badge</h2>
|
|
355
|
-
<p class={subheadingClass(isDark)}>Status indicators and labels</p>
|
|
356
|
-
|
|
357
|
-
<div class="space-y-4">
|
|
358
|
-
<div>
|
|
359
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Colors</p>
|
|
360
|
-
<div class="flex flex-wrap gap-3">
|
|
361
|
-
<Badge variant="blue">Blue</Badge>
|
|
362
|
-
<Badge variant="gray">Gray</Badge>
|
|
363
|
-
<Badge variant="red">Red</Badge>
|
|
364
|
-
<Badge variant="green">Green</Badge>
|
|
365
|
-
<Badge variant="yellow">Yellow</Badge>
|
|
366
|
-
<Badge variant="indigo">Indigo</Badge>
|
|
367
|
-
<Badge variant="purple">Purple</Badge>
|
|
368
|
-
<Badge variant="pink">Pink</Badge>
|
|
369
|
-
</div>
|
|
370
|
-
</div>
|
|
371
|
-
|
|
372
|
-
<div>
|
|
373
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Sizes</p>
|
|
374
|
-
<div class="flex flex-wrap gap-3 items-center">
|
|
375
|
-
<Badge size="xs">Extra Small</Badge>
|
|
376
|
-
<Badge size="sm">Small</Badge>
|
|
377
|
-
</div>
|
|
378
|
-
</div>
|
|
379
|
-
</div>
|
|
380
|
-
</section>
|
|
381
|
-
|
|
382
|
-
<!-- ========== ALERT ========== -->
|
|
383
|
-
<section class={sectionClass(isDark)}>
|
|
384
|
-
<h2 class={headingClass(isDark)}>Alert</h2>
|
|
385
|
-
<p class={subheadingClass(isDark)}>Contextual feedback messages</p>
|
|
386
|
-
|
|
387
|
-
<div class="space-y-4">
|
|
388
|
-
<Alert color="info">
|
|
389
|
-
<span class="font-medium">Info!</span> This is an informational alert.
|
|
390
|
-
</Alert>
|
|
391
|
-
<Alert color="success">
|
|
392
|
-
<span class="font-medium">Success!</span> Your changes have been saved.
|
|
393
|
-
</Alert>
|
|
394
|
-
<Alert color="warning">
|
|
395
|
-
<span class="font-medium">Warning!</span> Please review before proceeding.
|
|
396
|
-
</Alert>
|
|
397
|
-
<Alert color="error">
|
|
398
|
-
<span class="font-medium">Error!</span> Something went wrong.
|
|
399
|
-
</Alert>
|
|
400
|
-
</div>
|
|
401
|
-
</section>
|
|
402
|
-
|
|
403
|
-
<!-- ========== CARD ========== -->
|
|
404
|
-
<section class={sectionClass(isDark)}>
|
|
405
|
-
<h2 class={headingClass(isDark)}>Card</h2>
|
|
406
|
-
<p class={subheadingClass(isDark)}>Container component for content</p>
|
|
407
|
-
|
|
408
|
-
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
|
409
|
-
<Card>
|
|
410
|
-
<h3 class="text-lg font-semibold mb-2">Default Card</h3>
|
|
411
|
-
<p class="text-gray-600">Basic card with default styling.</p>
|
|
412
|
-
</Card>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// ============================================================================
|
|
3
|
+
// PRIMITIVES VISUAL GALLERY
|
|
4
|
+
// Displays ALL primitive components with variants and states
|
|
5
|
+
// ============================================================================
|
|
6
|
+
|
|
7
|
+
// Accordion
|
|
8
|
+
import Accordion from '../primitives/Accordion/Accordion.svelte';
|
|
9
|
+
import AccordionItem from '../primitives/Accordion/AccordionItem.svelte';
|
|
10
|
+
|
|
11
|
+
// Alert
|
|
12
|
+
import Alert from '../primitives/Alert/Alert.svelte';
|
|
13
|
+
|
|
14
|
+
// Avatar
|
|
15
|
+
import Avatar from '../primitives/Avatar/Avatar.svelte';
|
|
16
|
+
|
|
17
|
+
// Badge
|
|
18
|
+
import Badge from '../primitives/Badges/Badge.svelte';
|
|
19
|
+
|
|
20
|
+
// BottomSheet
|
|
21
|
+
import BottomSheet from '../primitives/BottomSheet/BottomSheet.svelte';
|
|
22
|
+
|
|
23
|
+
// Breadcrumb
|
|
24
|
+
import Breadcrumb from '../primitives/Breadcrumb/Breadcrumb.svelte';
|
|
25
|
+
|
|
26
|
+
// Button
|
|
27
|
+
import Button from '../primitives/Button/Button.svelte';
|
|
28
|
+
|
|
29
|
+
// Card
|
|
30
|
+
import Card from '../primitives/Card.svelte';
|
|
31
|
+
|
|
32
|
+
// Checkbox
|
|
33
|
+
import Checkbox from '../primitives/Checkbox/Checkbox.svelte';
|
|
34
|
+
|
|
35
|
+
// DarkModeToggle
|
|
36
|
+
import DarkModeToggle from '../primitives/DarkModeToggle.svelte';
|
|
37
|
+
|
|
38
|
+
// Drawer
|
|
39
|
+
import Drawer from '../primitives/Drawer/Drawer.svelte';
|
|
40
|
+
|
|
41
|
+
// Dropdown
|
|
42
|
+
import Dropdown from '../primitives/Dropdown/Dropdown.svelte';
|
|
43
|
+
import DropdownItem from '../primitives/Dropdown/DropdownItem.svelte';
|
|
44
|
+
|
|
45
|
+
// Input
|
|
46
|
+
import Input from '../primitives/Input/Input.svelte';
|
|
47
|
+
import Select from '../primitives/Input/Select.svelte';
|
|
48
|
+
import Textarea from '../primitives/Input/Textarea.svelte';
|
|
49
|
+
|
|
50
|
+
// Label
|
|
51
|
+
import Label from '../primitives/Label/Label.svelte';
|
|
52
|
+
|
|
53
|
+
// Modal
|
|
54
|
+
import Modal from '../primitives/Modal/Modal.svelte';
|
|
55
|
+
|
|
56
|
+
// Pagination
|
|
57
|
+
import Pagination from '../primitives/Pagination/Pagination.svelte';
|
|
58
|
+
|
|
59
|
+
// Radio
|
|
60
|
+
import Radio from '../primitives/Radio/Radio.svelte';
|
|
61
|
+
|
|
62
|
+
// Skeleton
|
|
63
|
+
import Skeleton from '../primitives/Skeleton/Skeleton.svelte';
|
|
64
|
+
import ImagePlaceholder from '../primitives/Skeleton/ImagePlaceholder.svelte';
|
|
65
|
+
import CardPlaceholder from '../primitives/Skeleton/CardPlaceholder.svelte';
|
|
66
|
+
import ListPlaceholder from '../primitives/Skeleton/ListPlaceholder.svelte';
|
|
67
|
+
|
|
68
|
+
// Spinner
|
|
69
|
+
import Spinner from '../primitives/Spinner/Spinner.svelte';
|
|
70
|
+
|
|
71
|
+
// Tabs
|
|
72
|
+
import Tabs from '../primitives/Tabs/Tabs.svelte';
|
|
73
|
+
import TabItem from '../primitives/Tabs/TabItem.svelte';
|
|
74
|
+
|
|
75
|
+
// Toggle
|
|
76
|
+
import Toggle from '../primitives/Toggle.svelte';
|
|
77
|
+
|
|
78
|
+
// Typography
|
|
79
|
+
import Typography from '../primitives/Typography/Typography.svelte';
|
|
80
|
+
|
|
81
|
+
// ValidationError
|
|
82
|
+
import ValidationError from '../primitives/ValidationError.svelte';
|
|
83
|
+
|
|
84
|
+
// Icons
|
|
85
|
+
import Icon from '../primitives/Icons/Icon.svelte';
|
|
86
|
+
import Home from '../primitives/Icons/Home.svelte';
|
|
87
|
+
import Profile from '../primitives/Icons/Profile.svelte';
|
|
88
|
+
import Notification from '../primitives/Icons/Notification.svelte';
|
|
89
|
+
import Message from '../primitives/Icons/Message.svelte';
|
|
90
|
+
import Cross from '../primitives/Icons/Cross.svelte';
|
|
91
|
+
import CheckCircle from '../primitives/Icons/CheckCircle.svelte';
|
|
92
|
+
import ErrorCircle from '../primitives/Icons/ErrorCircle.svelte';
|
|
93
|
+
import Info from '../primitives/Icons/Info.svelte';
|
|
94
|
+
import WarningIcon from '../primitives/Icons/WarningIcon.svelte';
|
|
95
|
+
|
|
96
|
+
// State
|
|
97
|
+
let isDark = $state(false);
|
|
98
|
+
let showModal = $state(false);
|
|
99
|
+
let showDrawer = $state(false);
|
|
100
|
+
let showBottomSheet = $state(false);
|
|
101
|
+
let dropdownOpen = $state(false);
|
|
102
|
+
let checkboxChecked = $state(false);
|
|
103
|
+
let toggleChecked = $state(false);
|
|
104
|
+
let radioValue = $state('option1');
|
|
105
|
+
let inputValue = $state('');
|
|
106
|
+
let textareaValue = $state('');
|
|
107
|
+
let selectValue = $state('');
|
|
108
|
+
let currentPage = $state(1);
|
|
109
|
+
let activeTab = $state(0);
|
|
110
|
+
|
|
111
|
+
function toggleDark() {
|
|
112
|
+
isDark = !isDark;
|
|
113
|
+
document.documentElement.classList.toggle('dark', isDark);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Section component for consistent styling
|
|
117
|
+
const sectionClass = (dark: boolean) =>
|
|
118
|
+
`rounded-xl p-6 ${dark ? 'bg-gray-800 border-gray-700' : 'bg-white border-gray-200'} border`;
|
|
119
|
+
|
|
120
|
+
const headingClass = (dark: boolean) =>
|
|
121
|
+
`text-xl font-semibold mb-1 ${dark ? 'text-white' : 'text-gray-900'}`;
|
|
122
|
+
|
|
123
|
+
const subheadingClass = (dark: boolean) =>
|
|
124
|
+
`text-sm mb-4 ${dark ? 'text-gray-400' : 'text-gray-500'}`;
|
|
125
|
+
</script>
|
|
126
|
+
|
|
127
|
+
<div class="min-h-screen p-6 space-y-8 {isDark ? 'bg-gray-900' : 'bg-gray-50'}">
|
|
128
|
+
<!-- Header -->
|
|
129
|
+
<div class="flex items-center justify-between mb-8">
|
|
130
|
+
<div>
|
|
131
|
+
<h1 class="text-3xl font-bold {isDark ? 'text-white' : 'text-gray-900'}">Primitives Gallery</h1>
|
|
132
|
+
<p class="{isDark ? 'text-gray-400' : 'text-gray-600'}">All primitive components with variants and states</p>
|
|
133
|
+
</div>
|
|
134
|
+
<button
|
|
135
|
+
onclick={toggleDark}
|
|
136
|
+
class="px-4 py-2 rounded-lg font-medium {isDark ? 'bg-yellow-500 text-black' : 'bg-gray-800 text-white'}"
|
|
137
|
+
>
|
|
138
|
+
{isDark ? '☀️ Light' : '🌙 Dark'}
|
|
139
|
+
</button>
|
|
140
|
+
</div>
|
|
141
|
+
|
|
142
|
+
<!-- ========== BUTTONS ========== -->
|
|
143
|
+
<section class={sectionClass(isDark)}>
|
|
144
|
+
<h2 class={headingClass(isDark)}>Button</h2>
|
|
145
|
+
<p class={subheadingClass(isDark)}>Primary action component with multiple variants</p>
|
|
146
|
+
|
|
147
|
+
<div class="space-y-4">
|
|
148
|
+
<div>
|
|
149
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Variants</p>
|
|
150
|
+
<div class="flex flex-wrap gap-3 items-center">
|
|
151
|
+
<Button variant="default">Primary</Button>
|
|
152
|
+
<Button variant="alternative">Secondary</Button>
|
|
153
|
+
<Button variant="outline">Outline</Button>
|
|
154
|
+
<Button variant="ghost">Ghost</Button>
|
|
155
|
+
<Button variant="link">Link</Button>
|
|
156
|
+
<Button variant="red">Destructive</Button>
|
|
157
|
+
<Button variant="red-outline">Red Outline</Button>
|
|
158
|
+
<Button variant="ghost-red">Ghost Red</Button>
|
|
159
|
+
<Button variant="toggle">Toggle</Button>
|
|
160
|
+
<Button variant="toggle" active={true}>Toggle Active</Button>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
<div>
|
|
165
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Nav Variant (Mobile Navigation)</p>
|
|
166
|
+
<div class="flex gap-6 items-end bg-gray-100 dark:bg-gray-800 p-4 rounded-lg">
|
|
167
|
+
<Button variant="nav">
|
|
168
|
+
<Home class="w-5 h-5" />
|
|
169
|
+
<span>Home</span>
|
|
170
|
+
</Button>
|
|
171
|
+
<Button variant="nav" active={true}>
|
|
172
|
+
<Notification class="w-5 h-5" />
|
|
173
|
+
<span>Events</span>
|
|
174
|
+
</Button>
|
|
175
|
+
<Button variant="nav">
|
|
176
|
+
<Profile class="w-5 h-5" />
|
|
177
|
+
<span>Profile</span>
|
|
178
|
+
</Button>
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
|
|
182
|
+
<div>
|
|
183
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Avatar, Menu & Card Variants</p>
|
|
184
|
+
<div class="flex gap-6 items-start">
|
|
185
|
+
<div class="flex flex-col items-center gap-2">
|
|
186
|
+
<Button variant="avatar">
|
|
187
|
+
<Avatar src="https://api.dicebear.com/7.x/avataaars/svg?seed=PrimitivesGallery" rounded size="md" />
|
|
188
|
+
</Button>
|
|
189
|
+
<span class="text-xs text-gray-500">Avatar trigger</span>
|
|
190
|
+
</div>
|
|
191
|
+
<div class="w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg overflow-hidden">
|
|
192
|
+
<Button variant="menu-item">Settings</Button>
|
|
193
|
+
<Button variant="menu-item">Profile</Button>
|
|
194
|
+
<div class="h-px bg-gray-200 dark:bg-gray-700"></div>
|
|
195
|
+
<Button variant="menu-item-danger">Sign out</Button>
|
|
196
|
+
</div>
|
|
197
|
+
<div class="w-64 space-y-2">
|
|
198
|
+
<Button variant="card">
|
|
199
|
+
<span class="flex flex-col">
|
|
200
|
+
<span class="font-medium">Select this option</span>
|
|
201
|
+
<span class="text-sm text-gray-500">Description text here</span>
|
|
202
|
+
</span>
|
|
203
|
+
</Button>
|
|
204
|
+
<Button variant="card">
|
|
205
|
+
<span class="flex flex-col">
|
|
206
|
+
<span class="font-medium">Another option</span>
|
|
207
|
+
<span class="text-sm text-gray-500">More description</span>
|
|
208
|
+
</span>
|
|
209
|
+
</Button>
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
<div>
|
|
215
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Sizes</p>
|
|
216
|
+
<div class="flex flex-wrap gap-3 items-end">
|
|
217
|
+
<Button size="xs">Extra Small</Button>
|
|
218
|
+
<Button size="sm">Small</Button>
|
|
219
|
+
<Button size="md">Medium</Button>
|
|
220
|
+
<Button size="lg">Large</Button>
|
|
221
|
+
<Button size="xl">Extra Large</Button>
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
|
|
225
|
+
<div>
|
|
226
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">States</p>
|
|
227
|
+
<div class="flex flex-wrap gap-3 items-center">
|
|
228
|
+
<Button disabled>Disabled</Button>
|
|
229
|
+
<Button loading>Loading</Button>
|
|
230
|
+
<Button success successText="Saved!">Success</Button>
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
</section>
|
|
235
|
+
|
|
236
|
+
<!-- ========== INPUTS ========== -->
|
|
237
|
+
<section class={sectionClass(isDark)}>
|
|
238
|
+
<h2 class={headingClass(isDark)}>Input, Select, Textarea</h2>
|
|
239
|
+
<p class={subheadingClass(isDark)}>Form input primitives</p>
|
|
240
|
+
|
|
241
|
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
242
|
+
<div>
|
|
243
|
+
<Input
|
|
244
|
+
label="Text Input"
|
|
245
|
+
placeholder="Enter text..."
|
|
246
|
+
bind:value={inputValue}
|
|
247
|
+
/>
|
|
248
|
+
</div>
|
|
249
|
+
|
|
250
|
+
<div>
|
|
251
|
+
<Input
|
|
252
|
+
type="email"
|
|
253
|
+
label="Email Input"
|
|
254
|
+
placeholder="email@example.com"
|
|
255
|
+
/>
|
|
256
|
+
</div>
|
|
257
|
+
|
|
258
|
+
<div>
|
|
259
|
+
<Input
|
|
260
|
+
type="password"
|
|
261
|
+
label="Password"
|
|
262
|
+
placeholder="••••••••"
|
|
263
|
+
/>
|
|
264
|
+
</div>
|
|
265
|
+
|
|
266
|
+
<div>
|
|
267
|
+
<Input
|
|
268
|
+
label="With Error"
|
|
269
|
+
placeholder="Invalid input"
|
|
270
|
+
errorText="This field is required"
|
|
271
|
+
/>
|
|
272
|
+
</div>
|
|
273
|
+
|
|
274
|
+
<div>
|
|
275
|
+
<Input
|
|
276
|
+
label="Disabled"
|
|
277
|
+
placeholder="Can't edit this"
|
|
278
|
+
disabled
|
|
279
|
+
/>
|
|
280
|
+
</div>
|
|
281
|
+
|
|
282
|
+
<div>
|
|
283
|
+
<Input
|
|
284
|
+
label="With Helper Text"
|
|
285
|
+
placeholder="Enter something"
|
|
286
|
+
helperText="This is helper text"
|
|
287
|
+
/>
|
|
288
|
+
</div>
|
|
289
|
+
</div>
|
|
290
|
+
|
|
291
|
+
<div class="mt-6 grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
292
|
+
<div>
|
|
293
|
+
<Textarea
|
|
294
|
+
label="Textarea"
|
|
295
|
+
placeholder="Write your message..."
|
|
296
|
+
bind:value={textareaValue}
|
|
297
|
+
/>
|
|
298
|
+
</div>
|
|
299
|
+
|
|
300
|
+
<div>
|
|
301
|
+
<Select
|
|
302
|
+
label="Select"
|
|
303
|
+
bind:value={selectValue}
|
|
304
|
+
>
|
|
305
|
+
<option value="">Choose an option</option>
|
|
306
|
+
<option value="1">Option 1</option>
|
|
307
|
+
<option value="2">Option 2</option>
|
|
308
|
+
<option value="3">Option 3</option>
|
|
309
|
+
</Select>
|
|
310
|
+
</div>
|
|
311
|
+
</div>
|
|
312
|
+
</section>
|
|
313
|
+
|
|
314
|
+
<!-- ========== CHECKBOX, RADIO, TOGGLE ========== -->
|
|
315
|
+
<section class={sectionClass(isDark)}>
|
|
316
|
+
<h2 class={headingClass(isDark)}>Checkbox, Radio, Toggle</h2>
|
|
317
|
+
<p class={subheadingClass(isDark)}>Selection controls</p>
|
|
318
|
+
|
|
319
|
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
|
|
320
|
+
<div>
|
|
321
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-3">Checkbox</p>
|
|
322
|
+
<div class="space-y-3">
|
|
323
|
+
<Checkbox bind:checked={checkboxChecked}>Default checkbox</Checkbox>
|
|
324
|
+
<Checkbox checked={true}>Checked by default</Checkbox>
|
|
325
|
+
<Checkbox disabled>Disabled</Checkbox>
|
|
326
|
+
<Checkbox disabled checked={true}>Disabled checked</Checkbox>
|
|
327
|
+
</div>
|
|
328
|
+
</div>
|
|
329
|
+
|
|
330
|
+
<div>
|
|
331
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-3">Radio</p>
|
|
332
|
+
<div class="space-y-3">
|
|
333
|
+
<Radio name="demo" value="option1" bind:group={radioValue}>Option 1</Radio>
|
|
334
|
+
<Radio name="demo" value="option2" bind:group={radioValue}>Option 2</Radio>
|
|
335
|
+
<Radio name="demo" value="option3" bind:group={radioValue}>Option 3</Radio>
|
|
336
|
+
<Radio name="demo-disabled" value="disabled" disabled>Disabled</Radio>
|
|
337
|
+
</div>
|
|
338
|
+
</div>
|
|
339
|
+
|
|
340
|
+
<div>
|
|
341
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-3">Toggle</p>
|
|
342
|
+
<div class="space-y-3">
|
|
343
|
+
<Toggle bind:checked={toggleChecked}>Default toggle</Toggle>
|
|
344
|
+
<Toggle checked={true}>On by default</Toggle>
|
|
345
|
+
<Toggle disabled>Disabled off</Toggle>
|
|
346
|
+
<Toggle disabled checked={true}>Disabled on</Toggle>
|
|
347
|
+
</div>
|
|
348
|
+
</div>
|
|
349
|
+
</div>
|
|
350
|
+
</section>
|
|
351
|
+
|
|
352
|
+
<!-- ========== BADGE ========== -->
|
|
353
|
+
<section class={sectionClass(isDark)}>
|
|
354
|
+
<h2 class={headingClass(isDark)}>Badge</h2>
|
|
355
|
+
<p class={subheadingClass(isDark)}>Status indicators and labels</p>
|
|
356
|
+
|
|
357
|
+
<div class="space-y-4">
|
|
358
|
+
<div>
|
|
359
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Colors</p>
|
|
360
|
+
<div class="flex flex-wrap gap-3">
|
|
361
|
+
<Badge variant="blue">Blue</Badge>
|
|
362
|
+
<Badge variant="gray">Gray</Badge>
|
|
363
|
+
<Badge variant="red">Red</Badge>
|
|
364
|
+
<Badge variant="green">Green</Badge>
|
|
365
|
+
<Badge variant="yellow">Yellow</Badge>
|
|
366
|
+
<Badge variant="indigo">Indigo</Badge>
|
|
367
|
+
<Badge variant="purple">Purple</Badge>
|
|
368
|
+
<Badge variant="pink">Pink</Badge>
|
|
369
|
+
</div>
|
|
370
|
+
</div>
|
|
371
|
+
|
|
372
|
+
<div>
|
|
373
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Sizes</p>
|
|
374
|
+
<div class="flex flex-wrap gap-3 items-center">
|
|
375
|
+
<Badge size="xs">Extra Small</Badge>
|
|
376
|
+
<Badge size="sm">Small</Badge>
|
|
377
|
+
</div>
|
|
378
|
+
</div>
|
|
379
|
+
</div>
|
|
380
|
+
</section>
|
|
381
|
+
|
|
382
|
+
<!-- ========== ALERT ========== -->
|
|
383
|
+
<section class={sectionClass(isDark)}>
|
|
384
|
+
<h2 class={headingClass(isDark)}>Alert</h2>
|
|
385
|
+
<p class={subheadingClass(isDark)}>Contextual feedback messages</p>
|
|
386
|
+
|
|
387
|
+
<div class="space-y-4">
|
|
388
|
+
<Alert color="info">
|
|
389
|
+
<span class="font-medium">Info!</span> This is an informational alert.
|
|
390
|
+
</Alert>
|
|
391
|
+
<Alert color="success">
|
|
392
|
+
<span class="font-medium">Success!</span> Your changes have been saved.
|
|
393
|
+
</Alert>
|
|
394
|
+
<Alert color="warning">
|
|
395
|
+
<span class="font-medium">Warning!</span> Please review before proceeding.
|
|
396
|
+
</Alert>
|
|
397
|
+
<Alert color="error">
|
|
398
|
+
<span class="font-medium">Error!</span> Something went wrong.
|
|
399
|
+
</Alert>
|
|
400
|
+
</div>
|
|
401
|
+
</section>
|
|
402
|
+
|
|
403
|
+
<!-- ========== CARD ========== -->
|
|
404
|
+
<section class={sectionClass(isDark)}>
|
|
405
|
+
<h2 class={headingClass(isDark)}>Card</h2>
|
|
406
|
+
<p class={subheadingClass(isDark)}>Container component for content</p>
|
|
407
|
+
|
|
408
|
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
|
409
|
+
<Card>
|
|
410
|
+
<h3 class="text-lg font-semibold mb-2">Default Card</h3>
|
|
411
|
+
<p class="text-gray-600">Basic card with default styling.</p>
|
|
412
|
+
</Card>
|
|
413
413
|
<Card class="p-8">
|
|
414
414
|
<h3 class="text-lg font-semibold mb-2">Large Padding</h3>
|
|
415
415
|
<p class="text-gray-600">Card with larger padding.</p>
|
|
416
416
|
</Card>
|
|
417
|
-
<Card hover>
|
|
418
|
-
<h3 class="text-lg font-semibold mb-2">Hoverable</h3>
|
|
419
|
-
<p class="text-gray-600">Hover to see the effect.</p>
|
|
420
|
-
</Card>
|
|
421
|
-
</div>
|
|
422
|
-
</section>
|
|
423
|
-
|
|
424
|
-
<!-- ========== ACCORDION ========== -->
|
|
425
|
-
<section class={sectionClass(isDark)}>
|
|
426
|
-
<h2 class={headingClass(isDark)}>Accordion</h2>
|
|
427
|
-
<p class={subheadingClass(isDark)}>Collapsible content sections</p>
|
|
428
|
-
|
|
429
|
-
<div class="max-w-2xl">
|
|
430
|
-
<Accordion>
|
|
431
|
-
<AccordionItem>
|
|
432
|
-
{#snippet header()}What is this component?{/snippet}
|
|
433
|
-
<p class="text-gray-600">This is an accordion component that allows you to show and hide content sections.</p>
|
|
434
|
-
</AccordionItem>
|
|
435
|
-
<AccordionItem>
|
|
436
|
-
{#snippet header()}How do I use it?{/snippet}
|
|
437
|
-
<p class="text-gray-600">Wrap AccordionItem components inside an Accordion component. Each item uses a header snippet.</p>
|
|
438
|
-
</AccordionItem>
|
|
439
|
-
<AccordionItem>
|
|
440
|
-
{#snippet header()}Is it accessible?{/snippet}
|
|
441
|
-
<p class="text-gray-600">Yes! It includes proper ARIA attributes and keyboard navigation.</p>
|
|
442
|
-
</AccordionItem>
|
|
443
|
-
</Accordion>
|
|
444
|
-
</div>
|
|
445
|
-
</section>
|
|
446
|
-
|
|
447
|
-
<!-- ========== TABS ========== -->
|
|
448
|
-
<section class={sectionClass(isDark)}>
|
|
449
|
-
<h2 class={headingClass(isDark)}>Tabs</h2>
|
|
450
|
-
<p class={subheadingClass(isDark)}>Tabbed content navigation</p>
|
|
451
|
-
|
|
417
|
+
<Card hover>
|
|
418
|
+
<h3 class="text-lg font-semibold mb-2">Hoverable</h3>
|
|
419
|
+
<p class="text-gray-600">Hover to see the effect.</p>
|
|
420
|
+
</Card>
|
|
421
|
+
</div>
|
|
422
|
+
</section>
|
|
423
|
+
|
|
424
|
+
<!-- ========== ACCORDION ========== -->
|
|
425
|
+
<section class={sectionClass(isDark)}>
|
|
426
|
+
<h2 class={headingClass(isDark)}>Accordion</h2>
|
|
427
|
+
<p class={subheadingClass(isDark)}>Collapsible content sections</p>
|
|
428
|
+
|
|
429
|
+
<div class="max-w-2xl">
|
|
430
|
+
<Accordion>
|
|
431
|
+
<AccordionItem>
|
|
432
|
+
{#snippet header()}What is this component?{/snippet}
|
|
433
|
+
<p class="text-gray-600">This is an accordion component that allows you to show and hide content sections.</p>
|
|
434
|
+
</AccordionItem>
|
|
435
|
+
<AccordionItem>
|
|
436
|
+
{#snippet header()}How do I use it?{/snippet}
|
|
437
|
+
<p class="text-gray-600">Wrap AccordionItem components inside an Accordion component. Each item uses a header snippet.</p>
|
|
438
|
+
</AccordionItem>
|
|
439
|
+
<AccordionItem>
|
|
440
|
+
{#snippet header()}Is it accessible?{/snippet}
|
|
441
|
+
<p class="text-gray-600">Yes! It includes proper ARIA attributes and keyboard navigation.</p>
|
|
442
|
+
</AccordionItem>
|
|
443
|
+
</Accordion>
|
|
444
|
+
</div>
|
|
445
|
+
</section>
|
|
446
|
+
|
|
447
|
+
<!-- ========== TABS ========== -->
|
|
448
|
+
<section class={sectionClass(isDark)}>
|
|
449
|
+
<h2 class={headingClass(isDark)}>Tabs</h2>
|
|
450
|
+
<p class={subheadingClass(isDark)}>Tabbed content navigation</p>
|
|
451
|
+
|
|
452
452
|
<div class="max-w-2xl">
|
|
453
453
|
<Tabs bind:activeTabValue={activeTab}>
|
|
454
454
|
<TabItem title="Profile">
|
|
455
|
-
<div class="p-4">
|
|
456
|
-
<p class="text-gray-600">This is the Profile tab content.</p>
|
|
457
|
-
</div>
|
|
458
|
-
</TabItem>
|
|
459
|
-
<TabItem title="Settings">
|
|
460
|
-
<div class="p-4">
|
|
461
|
-
<p class="text-gray-600">This is the Settings tab content.</p>
|
|
462
|
-
</div>
|
|
463
|
-
</TabItem>
|
|
464
|
-
<TabItem title="Messages">
|
|
465
|
-
<div class="p-4">
|
|
466
|
-
<p class="text-gray-600">This is the Messages tab content.</p>
|
|
467
|
-
</div>
|
|
468
|
-
</TabItem>
|
|
469
|
-
</Tabs>
|
|
470
|
-
</div>
|
|
471
|
-
</section>
|
|
472
|
-
|
|
473
|
-
<!-- ========== PAGINATION ========== -->
|
|
474
|
-
<section class={sectionClass(isDark)}>
|
|
475
|
-
<h2 class={headingClass(isDark)}>Pagination</h2>
|
|
476
|
-
<p class={subheadingClass(isDark)}>Page navigation control</p>
|
|
477
|
-
|
|
478
|
-
<Pagination
|
|
479
|
-
totalPages={10}
|
|
480
|
-
bind:currentPage={currentPage}
|
|
481
|
-
/>
|
|
482
|
-
<p class="text-sm {isDark ? 'text-gray-400' : 'text-gray-500'} mt-3">Current page: {currentPage}</p>
|
|
483
|
-
</section>
|
|
484
|
-
|
|
485
|
-
<!-- ========== SKELETON ========== -->
|
|
486
|
-
<section class={sectionClass(isDark)}>
|
|
487
|
-
<h2 class={headingClass(isDark)}>Skeleton</h2>
|
|
488
|
-
<p class={subheadingClass(isDark)}>Loading placeholder components</p>
|
|
489
|
-
|
|
490
|
-
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
|
491
|
-
<div>
|
|
492
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Basic Skeleton</p>
|
|
493
|
-
<div class="space-y-2">
|
|
494
|
-
<Skeleton class="h-4 w-full" />
|
|
495
|
-
<Skeleton class="h-4 w-3/4" />
|
|
496
|
-
<Skeleton class="h-4 w-1/2" />
|
|
497
|
-
</div>
|
|
498
|
-
</div>
|
|
499
|
-
|
|
500
|
-
<div>
|
|
501
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Image Placeholder</p>
|
|
502
|
-
<ImagePlaceholder />
|
|
503
|
-
</div>
|
|
504
|
-
|
|
505
|
-
<div>
|
|
506
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Card Placeholder</p>
|
|
507
|
-
<CardPlaceholder />
|
|
508
|
-
</div>
|
|
509
|
-
</div>
|
|
510
|
-
|
|
511
|
-
<div class="mt-6">
|
|
512
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">List Placeholder</p>
|
|
513
|
-
<ListPlaceholder />
|
|
514
|
-
</div>
|
|
515
|
-
</section>
|
|
516
|
-
|
|
517
|
-
<!-- ========== SPINNER ========== -->
|
|
518
|
-
<section class={sectionClass(isDark)}>
|
|
519
|
-
<h2 class={headingClass(isDark)}>Spinner</h2>
|
|
520
|
-
<p class={subheadingClass(isDark)}>Loading indicator</p>
|
|
521
|
-
|
|
522
|
-
<div class="flex flex-wrap gap-6 items-center">
|
|
523
|
-
<div class="text-center">
|
|
524
|
-
<Spinner size="sm" />
|
|
525
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">Small</p>
|
|
526
|
-
</div>
|
|
527
|
-
<div class="text-center">
|
|
528
|
-
<Spinner size="md" />
|
|
529
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">Medium</p>
|
|
530
|
-
</div>
|
|
531
|
-
<div class="text-center">
|
|
532
|
-
<Spinner size="lg" />
|
|
533
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">Large</p>
|
|
534
|
-
</div>
|
|
535
|
-
</div>
|
|
536
|
-
</section>
|
|
537
|
-
|
|
538
|
-
<!-- ========== AVATAR ========== -->
|
|
539
|
-
<section class={sectionClass(isDark)}>
|
|
540
|
-
<h2 class={headingClass(isDark)}>Avatar</h2>
|
|
541
|
-
<p class={subheadingClass(isDark)}>User profile pictures</p>
|
|
542
|
-
|
|
543
|
-
<div class="flex flex-wrap gap-4 items-end">
|
|
544
|
-
<div class="text-center">
|
|
545
|
-
<Avatar size="xs" />
|
|
546
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">XS</p>
|
|
547
|
-
</div>
|
|
548
|
-
<div class="text-center">
|
|
549
|
-
<Avatar size="sm" />
|
|
550
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">SM</p>
|
|
551
|
-
</div>
|
|
552
|
-
<div class="text-center">
|
|
553
|
-
<Avatar size="md" />
|
|
554
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">MD</p>
|
|
555
|
-
</div>
|
|
556
|
-
<div class="text-center">
|
|
557
|
-
<Avatar size="lg" />
|
|
558
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">LG</p>
|
|
559
|
-
</div>
|
|
560
|
-
<div class="text-center">
|
|
561
|
-
<Avatar size="xl" />
|
|
562
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">XL</p>
|
|
563
|
-
</div>
|
|
564
|
-
<div class="text-center">
|
|
565
|
-
<Avatar size="md" initials="JD" />
|
|
566
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">Initials</p>
|
|
567
|
-
</div>
|
|
568
|
-
</div>
|
|
569
|
-
</section>
|
|
570
|
-
|
|
571
|
-
<!-- ========== BREADCRUMB ========== -->
|
|
572
|
-
<section class={sectionClass(isDark)}>
|
|
573
|
-
<h2 class={headingClass(isDark)}>Breadcrumb</h2>
|
|
574
|
-
<p class={subheadingClass(isDark)}>Navigation path indicator</p>
|
|
575
|
-
|
|
455
|
+
<div class="p-4">
|
|
456
|
+
<p class="text-gray-600">This is the Profile tab content.</p>
|
|
457
|
+
</div>
|
|
458
|
+
</TabItem>
|
|
459
|
+
<TabItem title="Settings">
|
|
460
|
+
<div class="p-4">
|
|
461
|
+
<p class="text-gray-600">This is the Settings tab content.</p>
|
|
462
|
+
</div>
|
|
463
|
+
</TabItem>
|
|
464
|
+
<TabItem title="Messages">
|
|
465
|
+
<div class="p-4">
|
|
466
|
+
<p class="text-gray-600">This is the Messages tab content.</p>
|
|
467
|
+
</div>
|
|
468
|
+
</TabItem>
|
|
469
|
+
</Tabs>
|
|
470
|
+
</div>
|
|
471
|
+
</section>
|
|
472
|
+
|
|
473
|
+
<!-- ========== PAGINATION ========== -->
|
|
474
|
+
<section class={sectionClass(isDark)}>
|
|
475
|
+
<h2 class={headingClass(isDark)}>Pagination</h2>
|
|
476
|
+
<p class={subheadingClass(isDark)}>Page navigation control</p>
|
|
477
|
+
|
|
478
|
+
<Pagination
|
|
479
|
+
totalPages={10}
|
|
480
|
+
bind:currentPage={currentPage}
|
|
481
|
+
/>
|
|
482
|
+
<p class="text-sm {isDark ? 'text-gray-400' : 'text-gray-500'} mt-3">Current page: {currentPage}</p>
|
|
483
|
+
</section>
|
|
484
|
+
|
|
485
|
+
<!-- ========== SKELETON ========== -->
|
|
486
|
+
<section class={sectionClass(isDark)}>
|
|
487
|
+
<h2 class={headingClass(isDark)}>Skeleton</h2>
|
|
488
|
+
<p class={subheadingClass(isDark)}>Loading placeholder components</p>
|
|
489
|
+
|
|
490
|
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
|
491
|
+
<div>
|
|
492
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Basic Skeleton</p>
|
|
493
|
+
<div class="space-y-2">
|
|
494
|
+
<Skeleton class="h-4 w-full" />
|
|
495
|
+
<Skeleton class="h-4 w-3/4" />
|
|
496
|
+
<Skeleton class="h-4 w-1/2" />
|
|
497
|
+
</div>
|
|
498
|
+
</div>
|
|
499
|
+
|
|
500
|
+
<div>
|
|
501
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Image Placeholder</p>
|
|
502
|
+
<ImagePlaceholder />
|
|
503
|
+
</div>
|
|
504
|
+
|
|
505
|
+
<div>
|
|
506
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">Card Placeholder</p>
|
|
507
|
+
<CardPlaceholder />
|
|
508
|
+
</div>
|
|
509
|
+
</div>
|
|
510
|
+
|
|
511
|
+
<div class="mt-6">
|
|
512
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mb-2">List Placeholder</p>
|
|
513
|
+
<ListPlaceholder />
|
|
514
|
+
</div>
|
|
515
|
+
</section>
|
|
516
|
+
|
|
517
|
+
<!-- ========== SPINNER ========== -->
|
|
518
|
+
<section class={sectionClass(isDark)}>
|
|
519
|
+
<h2 class={headingClass(isDark)}>Spinner</h2>
|
|
520
|
+
<p class={subheadingClass(isDark)}>Loading indicator</p>
|
|
521
|
+
|
|
522
|
+
<div class="flex flex-wrap gap-6 items-center">
|
|
523
|
+
<div class="text-center">
|
|
524
|
+
<Spinner size="sm" />
|
|
525
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">Small</p>
|
|
526
|
+
</div>
|
|
527
|
+
<div class="text-center">
|
|
528
|
+
<Spinner size="md" />
|
|
529
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">Medium</p>
|
|
530
|
+
</div>
|
|
531
|
+
<div class="text-center">
|
|
532
|
+
<Spinner size="lg" />
|
|
533
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">Large</p>
|
|
534
|
+
</div>
|
|
535
|
+
</div>
|
|
536
|
+
</section>
|
|
537
|
+
|
|
538
|
+
<!-- ========== AVATAR ========== -->
|
|
539
|
+
<section class={sectionClass(isDark)}>
|
|
540
|
+
<h2 class={headingClass(isDark)}>Avatar</h2>
|
|
541
|
+
<p class={subheadingClass(isDark)}>User profile pictures</p>
|
|
542
|
+
|
|
543
|
+
<div class="flex flex-wrap gap-4 items-end">
|
|
544
|
+
<div class="text-center">
|
|
545
|
+
<Avatar size="xs" />
|
|
546
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">XS</p>
|
|
547
|
+
</div>
|
|
548
|
+
<div class="text-center">
|
|
549
|
+
<Avatar size="sm" />
|
|
550
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">SM</p>
|
|
551
|
+
</div>
|
|
552
|
+
<div class="text-center">
|
|
553
|
+
<Avatar size="md" />
|
|
554
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">MD</p>
|
|
555
|
+
</div>
|
|
556
|
+
<div class="text-center">
|
|
557
|
+
<Avatar size="lg" />
|
|
558
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">LG</p>
|
|
559
|
+
</div>
|
|
560
|
+
<div class="text-center">
|
|
561
|
+
<Avatar size="xl" />
|
|
562
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">XL</p>
|
|
563
|
+
</div>
|
|
564
|
+
<div class="text-center">
|
|
565
|
+
<Avatar size="md" initials="JD" />
|
|
566
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-2">Initials</p>
|
|
567
|
+
</div>
|
|
568
|
+
</div>
|
|
569
|
+
</section>
|
|
570
|
+
|
|
571
|
+
<!-- ========== BREADCRUMB ========== -->
|
|
572
|
+
<section class={sectionClass(isDark)}>
|
|
573
|
+
<h2 class={headingClass(isDark)}>Breadcrumb</h2>
|
|
574
|
+
<p class={subheadingClass(isDark)}>Navigation path indicator</p>
|
|
575
|
+
|
|
576
576
|
<Breadcrumb data={[
|
|
577
577
|
{ name: 'Home', href: '/' },
|
|
578
578
|
{ name: 'Products', href: '/products' },
|
|
579
579
|
{ name: 'Category', href: '/products/category' },
|
|
580
580
|
{ name: 'Current Page', href: '#' }
|
|
581
581
|
]} />
|
|
582
|
-
</section>
|
|
583
|
-
|
|
584
|
-
<!-- ========== LABEL ========== -->
|
|
585
|
-
<section class={sectionClass(isDark)}>
|
|
586
|
-
<h2 class={headingClass(isDark)}>Label</h2>
|
|
587
|
-
<p class={subheadingClass(isDark)}>Form field labels</p>
|
|
588
|
-
|
|
589
|
-
<div class="flex flex-wrap gap-6">
|
|
590
|
-
<Label>Default Label</Label>
|
|
591
|
-
<Label required>Required Label</Label>
|
|
592
|
-
<Label optional>Optional Label</Label>
|
|
593
|
-
</div>
|
|
594
|
-
</section>
|
|
595
|
-
|
|
596
|
-
<!-- ========== VALIDATION ERROR ========== -->
|
|
597
|
-
<section class={sectionClass(isDark)}>
|
|
598
|
-
<h2 class={headingClass(isDark)}>ValidationError</h2>
|
|
599
|
-
<p class={subheadingClass(isDark)}>Form validation error messages</p>
|
|
600
|
-
|
|
582
|
+
</section>
|
|
583
|
+
|
|
584
|
+
<!-- ========== LABEL ========== -->
|
|
585
|
+
<section class={sectionClass(isDark)}>
|
|
586
|
+
<h2 class={headingClass(isDark)}>Label</h2>
|
|
587
|
+
<p class={subheadingClass(isDark)}>Form field labels</p>
|
|
588
|
+
|
|
589
|
+
<div class="flex flex-wrap gap-6">
|
|
590
|
+
<Label>Default Label</Label>
|
|
591
|
+
<Label required>Required Label</Label>
|
|
592
|
+
<Label optional>Optional Label</Label>
|
|
593
|
+
</div>
|
|
594
|
+
</section>
|
|
595
|
+
|
|
596
|
+
<!-- ========== VALIDATION ERROR ========== -->
|
|
597
|
+
<section class={sectionClass(isDark)}>
|
|
598
|
+
<h2 class={headingClass(isDark)}>ValidationError</h2>
|
|
599
|
+
<p class={subheadingClass(isDark)}>Form validation error messages</p>
|
|
600
|
+
|
|
601
601
|
<div class="space-y-2">
|
|
602
602
|
<ValidationError error="This field is required" />
|
|
603
603
|
<ValidationError error="Email format is invalid" />
|
|
604
604
|
<ValidationError error="Password must be at least 8 characters" />
|
|
605
605
|
</div>
|
|
606
|
-
</section>
|
|
607
|
-
|
|
608
|
-
<!-- ========== ICONS ========== -->
|
|
609
|
-
<section class={sectionClass(isDark)}>
|
|
610
|
-
<h2 class={headingClass(isDark)}>Icons</h2>
|
|
611
|
-
<p class={subheadingClass(isDark)}>SVG icon components</p>
|
|
612
|
-
|
|
613
|
-
<div class="flex flex-wrap gap-6">
|
|
614
|
-
<div class="text-center">
|
|
615
|
-
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
616
|
-
<Home />
|
|
617
|
-
</div>
|
|
618
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">Home</p>
|
|
619
|
-
</div>
|
|
620
|
-
<div class="text-center">
|
|
621
|
-
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
622
|
-
<Profile />
|
|
623
|
-
</div>
|
|
624
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">Profile</p>
|
|
625
|
-
</div>
|
|
626
|
-
<div class="text-center">
|
|
627
|
-
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
628
|
-
<Notification />
|
|
629
|
-
</div>
|
|
630
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">Notification</p>
|
|
631
|
-
</div>
|
|
632
|
-
<div class="text-center">
|
|
633
|
-
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
634
|
-
<Message />
|
|
635
|
-
</div>
|
|
636
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">Message</p>
|
|
637
|
-
</div>
|
|
638
|
-
<div class="text-center">
|
|
639
|
-
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
640
|
-
<CheckCircle />
|
|
641
|
-
</div>
|
|
642
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">CheckCircle</p>
|
|
643
|
-
</div>
|
|
644
|
-
<div class="text-center">
|
|
645
|
-
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
646
|
-
<ErrorCircle />
|
|
647
|
-
</div>
|
|
648
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">ErrorCircle</p>
|
|
649
|
-
</div>
|
|
650
|
-
<div class="text-center">
|
|
651
|
-
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
652
|
-
<Info />
|
|
653
|
-
</div>
|
|
654
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">Info</p>
|
|
655
|
-
</div>
|
|
656
|
-
<div class="text-center">
|
|
657
|
-
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
658
|
-
<WarningIcon />
|
|
659
|
-
</div>
|
|
660
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">Warning</p>
|
|
661
|
-
</div>
|
|
662
|
-
<div class="text-center">
|
|
663
|
-
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
664
|
-
<Cross />
|
|
665
|
-
</div>
|
|
666
|
-
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">Cross</p>
|
|
667
|
-
</div>
|
|
668
|
-
</div>
|
|
669
|
-
<p class="text-sm {isDark ? 'text-gray-400' : 'text-gray-500'} mt-4">
|
|
670
|
-
See <strong>IconGallery</strong> story for complete icon reference (30+ icons)
|
|
671
|
-
</p>
|
|
672
|
-
</section>
|
|
673
|
-
|
|
674
|
-
<!-- ========== DARK MODE TOGGLE ========== -->
|
|
675
|
-
<section class={sectionClass(isDark)}>
|
|
676
|
-
<h2 class={headingClass(isDark)}>DarkModeToggle</h2>
|
|
677
|
-
<p class={subheadingClass(isDark)}>Theme switcher component</p>
|
|
678
|
-
|
|
679
|
-
<DarkModeToggle />
|
|
680
|
-
</section>
|
|
681
|
-
|
|
682
|
-
<!-- ========== INTERACTIVE COMPONENTS ========== -->
|
|
683
|
-
<section class={sectionClass(isDark)}>
|
|
684
|
-
<h2 class={headingClass(isDark)}>Modal, Drawer, BottomSheet, Dropdown</h2>
|
|
685
|
-
<p class={subheadingClass(isDark)}>Overlay and dropdown components</p>
|
|
686
|
-
|
|
687
|
-
<div class="flex flex-wrap gap-4">
|
|
688
|
-
<Button onclick={() => showModal = true}>Open Modal</Button>
|
|
689
|
-
<Button variant="alternative" onclick={() => showDrawer = true}>Open Drawer</Button>
|
|
690
|
-
<Button variant="outline" onclick={() => showBottomSheet = true}>Open BottomSheet</Button>
|
|
691
|
-
|
|
692
|
-
<div class="relative inline-block">
|
|
693
|
-
<Button variant="ghost" onclick={() => dropdownOpen = !dropdownOpen}>
|
|
694
|
-
Toggle Dropdown ▼
|
|
695
|
-
</Button>
|
|
696
|
-
<Dropdown bind:open={dropdownOpen} class="left-0 top-full mt-1">
|
|
697
|
-
<DropdownItem onclick={() => dropdownOpen = false}>Option 1</DropdownItem>
|
|
698
|
-
<DropdownItem onclick={() => dropdownOpen = false}>Option 2</DropdownItem>
|
|
699
|
-
<DropdownItem onclick={() => dropdownOpen = false}>Option 3</DropdownItem>
|
|
700
|
-
</Dropdown>
|
|
701
|
-
</div>
|
|
702
|
-
</div>
|
|
703
|
-
</section>
|
|
704
|
-
|
|
705
|
-
<!-- Modal -->
|
|
706
|
-
<Modal bind:show={showModal}>
|
|
707
|
-
{#snippet header()}
|
|
708
|
-
<h3 class="text-lg font-semibold">Example Modal</h3>
|
|
709
|
-
{/snippet}
|
|
710
|
-
{#snippet body()}
|
|
711
|
-
<p class="text-gray-600">This is the modal content. Click outside or press ESC to close.</p>
|
|
712
|
-
{/snippet}
|
|
713
|
-
{#snippet footer()}
|
|
714
|
-
<Button variant="ghost" onclick={() => showModal = false}>Cancel</Button>
|
|
715
|
-
<Button onclick={() => showModal = false}>Confirm</Button>
|
|
716
|
-
{/snippet}
|
|
717
|
-
</Modal>
|
|
718
|
-
|
|
719
|
-
<!-- Drawer -->
|
|
720
|
-
<Drawer bind:show={showDrawer} placement="right">
|
|
721
|
-
<div class="p-6">
|
|
722
|
-
<h3 class="text-lg font-semibold mb-4">Drawer Content</h3>
|
|
723
|
-
<p class="text-gray-600">This drawer slides in from the right.</p>
|
|
724
|
-
<Button class="mt-4" onclick={() => showDrawer = false}>Close</Button>
|
|
725
|
-
</div>
|
|
726
|
-
</Drawer>
|
|
727
|
-
|
|
728
|
-
<!-- BottomSheet -->
|
|
729
|
-
<BottomSheet show={showBottomSheet} onclose={() => showBottomSheet = false}>
|
|
730
|
-
<div class="p-6">
|
|
731
|
-
<h3 class="text-lg font-semibold mb-4">Bottom Sheet</h3>
|
|
732
|
-
<p class="text-gray-600">This sheet slides up from the bottom on mobile.</p>
|
|
733
|
-
<Button class="mt-4" onclick={() => showBottomSheet = false}>Close</Button>
|
|
734
|
-
</div>
|
|
735
|
-
</BottomSheet>
|
|
736
|
-
|
|
737
|
-
<!-- ========== TYPOGRAPHY ========== -->
|
|
738
|
-
<section class={sectionClass(isDark)}>
|
|
739
|
-
<h2 class={headingClass(isDark)}>Typography</h2>
|
|
740
|
-
<p class={subheadingClass(isDark)}>Text styling component</p>
|
|
741
|
-
|
|
606
|
+
</section>
|
|
607
|
+
|
|
608
|
+
<!-- ========== ICONS ========== -->
|
|
609
|
+
<section class={sectionClass(isDark)}>
|
|
610
|
+
<h2 class={headingClass(isDark)}>Icons</h2>
|
|
611
|
+
<p class={subheadingClass(isDark)}>SVG icon components</p>
|
|
612
|
+
|
|
613
|
+
<div class="flex flex-wrap gap-6">
|
|
614
|
+
<div class="text-center">
|
|
615
|
+
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
616
|
+
<Home />
|
|
617
|
+
</div>
|
|
618
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">Home</p>
|
|
619
|
+
</div>
|
|
620
|
+
<div class="text-center">
|
|
621
|
+
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
622
|
+
<Profile />
|
|
623
|
+
</div>
|
|
624
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">Profile</p>
|
|
625
|
+
</div>
|
|
626
|
+
<div class="text-center">
|
|
627
|
+
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
628
|
+
<Notification />
|
|
629
|
+
</div>
|
|
630
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">Notification</p>
|
|
631
|
+
</div>
|
|
632
|
+
<div class="text-center">
|
|
633
|
+
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
634
|
+
<Message />
|
|
635
|
+
</div>
|
|
636
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">Message</p>
|
|
637
|
+
</div>
|
|
638
|
+
<div class="text-center">
|
|
639
|
+
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
640
|
+
<CheckCircle />
|
|
641
|
+
</div>
|
|
642
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">CheckCircle</p>
|
|
643
|
+
</div>
|
|
644
|
+
<div class="text-center">
|
|
645
|
+
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
646
|
+
<ErrorCircle />
|
|
647
|
+
</div>
|
|
648
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">ErrorCircle</p>
|
|
649
|
+
</div>
|
|
650
|
+
<div class="text-center">
|
|
651
|
+
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
652
|
+
<Info />
|
|
653
|
+
</div>
|
|
654
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">Info</p>
|
|
655
|
+
</div>
|
|
656
|
+
<div class="text-center">
|
|
657
|
+
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
658
|
+
<WarningIcon />
|
|
659
|
+
</div>
|
|
660
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">Warning</p>
|
|
661
|
+
</div>
|
|
662
|
+
<div class="text-center">
|
|
663
|
+
<div class="w-12 h-12 flex items-center justify-center bg-gray-100 rounded-lg">
|
|
664
|
+
<Cross />
|
|
665
|
+
</div>
|
|
666
|
+
<p class="text-xs {isDark ? 'text-gray-500' : 'text-gray-400'} mt-1">Cross</p>
|
|
667
|
+
</div>
|
|
668
|
+
</div>
|
|
669
|
+
<p class="text-sm {isDark ? 'text-gray-400' : 'text-gray-500'} mt-4">
|
|
670
|
+
See <strong>IconGallery</strong> story for complete icon reference (30+ icons)
|
|
671
|
+
</p>
|
|
672
|
+
</section>
|
|
673
|
+
|
|
674
|
+
<!-- ========== DARK MODE TOGGLE ========== -->
|
|
675
|
+
<section class={sectionClass(isDark)}>
|
|
676
|
+
<h2 class={headingClass(isDark)}>DarkModeToggle</h2>
|
|
677
|
+
<p class={subheadingClass(isDark)}>Theme switcher component</p>
|
|
678
|
+
|
|
679
|
+
<DarkModeToggle />
|
|
680
|
+
</section>
|
|
681
|
+
|
|
682
|
+
<!-- ========== INTERACTIVE COMPONENTS ========== -->
|
|
683
|
+
<section class={sectionClass(isDark)}>
|
|
684
|
+
<h2 class={headingClass(isDark)}>Modal, Drawer, BottomSheet, Dropdown</h2>
|
|
685
|
+
<p class={subheadingClass(isDark)}>Overlay and dropdown components</p>
|
|
686
|
+
|
|
687
|
+
<div class="flex flex-wrap gap-4">
|
|
688
|
+
<Button onclick={() => showModal = true}>Open Modal</Button>
|
|
689
|
+
<Button variant="alternative" onclick={() => showDrawer = true}>Open Drawer</Button>
|
|
690
|
+
<Button variant="outline" onclick={() => showBottomSheet = true}>Open BottomSheet</Button>
|
|
691
|
+
|
|
692
|
+
<div class="relative inline-block">
|
|
693
|
+
<Button variant="ghost" onclick={() => dropdownOpen = !dropdownOpen}>
|
|
694
|
+
Toggle Dropdown ▼
|
|
695
|
+
</Button>
|
|
696
|
+
<Dropdown bind:open={dropdownOpen} class="left-0 top-full mt-1">
|
|
697
|
+
<DropdownItem onclick={() => dropdownOpen = false}>Option 1</DropdownItem>
|
|
698
|
+
<DropdownItem onclick={() => dropdownOpen = false}>Option 2</DropdownItem>
|
|
699
|
+
<DropdownItem onclick={() => dropdownOpen = false}>Option 3</DropdownItem>
|
|
700
|
+
</Dropdown>
|
|
701
|
+
</div>
|
|
702
|
+
</div>
|
|
703
|
+
</section>
|
|
704
|
+
|
|
705
|
+
<!-- Modal -->
|
|
706
|
+
<Modal bind:show={showModal}>
|
|
707
|
+
{#snippet header()}
|
|
708
|
+
<h3 class="text-lg font-semibold">Example Modal</h3>
|
|
709
|
+
{/snippet}
|
|
710
|
+
{#snippet body()}
|
|
711
|
+
<p class="text-gray-600">This is the modal content. Click outside or press ESC to close.</p>
|
|
712
|
+
{/snippet}
|
|
713
|
+
{#snippet footer()}
|
|
714
|
+
<Button variant="ghost" onclick={() => showModal = false}>Cancel</Button>
|
|
715
|
+
<Button onclick={() => showModal = false}>Confirm</Button>
|
|
716
|
+
{/snippet}
|
|
717
|
+
</Modal>
|
|
718
|
+
|
|
719
|
+
<!-- Drawer -->
|
|
720
|
+
<Drawer bind:show={showDrawer} placement="right">
|
|
721
|
+
<div class="p-6">
|
|
722
|
+
<h3 class="text-lg font-semibold mb-4">Drawer Content</h3>
|
|
723
|
+
<p class="text-gray-600">This drawer slides in from the right.</p>
|
|
724
|
+
<Button class="mt-4" onclick={() => showDrawer = false}>Close</Button>
|
|
725
|
+
</div>
|
|
726
|
+
</Drawer>
|
|
727
|
+
|
|
728
|
+
<!-- BottomSheet -->
|
|
729
|
+
<BottomSheet show={showBottomSheet} onclose={() => showBottomSheet = false}>
|
|
730
|
+
<div class="p-6">
|
|
731
|
+
<h3 class="text-lg font-semibold mb-4">Bottom Sheet</h3>
|
|
732
|
+
<p class="text-gray-600">This sheet slides up from the bottom on mobile.</p>
|
|
733
|
+
<Button class="mt-4" onclick={() => showBottomSheet = false}>Close</Button>
|
|
734
|
+
</div>
|
|
735
|
+
</BottomSheet>
|
|
736
|
+
|
|
737
|
+
<!-- ========== TYPOGRAPHY ========== -->
|
|
738
|
+
<section class={sectionClass(isDark)}>
|
|
739
|
+
<h2 class={headingClass(isDark)}>Typography</h2>
|
|
740
|
+
<p class={subheadingClass(isDark)}>Text styling component</p>
|
|
741
|
+
|
|
742
742
|
<div class="space-y-4">
|
|
743
743
|
<Typography variant="h1">Heading 1</Typography>
|
|
744
744
|
<Typography variant="h2">Heading 2</Typography>
|
|
@@ -748,5 +748,5 @@
|
|
|
748
748
|
<Typography variant="h6">Small text - Secondary information</Typography>
|
|
749
749
|
<Typography variant="p" class="text-xs">Caption text - Meta information</Typography>
|
|
750
750
|
</div>
|
|
751
|
-
</section>
|
|
752
|
-
</div>
|
|
751
|
+
</section>
|
|
752
|
+
</div>
|