negodesign 0.0.77 → 0.0.79
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 +133 -133
- package/dist/components/NegoDesign.svelte +21 -21
- package/dist/components/pages/admin/01/ui/AdminContent.svelte +14 -14
- package/dist/components/pages/admin/01/ui/AdminPanel.svelte +46 -46
- package/dist/components/pages/product-details/shared/ProductDetailFilesVertical.svelte +103 -103
- package/dist/components/pages/profile-user/shared/ProfileUserAddress.svelte +83 -83
- package/dist/components/pages/profile-user/shared/ProfileUserTabs.svelte +80 -80
- package/dist/components/pages/security/auth/PageAuth01.svelte +21 -24
- package/dist/components/pages/security/auth/PageAuth02.svelte +11 -16
- package/dist/components/pages/security/auth/PageAuth03.svelte +11 -16
- package/dist/components/pages/security/login/01/ui/FormLogin.svelte +7 -5
- package/dist/components/pages/security/login/01/ui/FormLogin.svelte.d.ts +2 -0
- package/dist/components/pages/security/login/01/ui/FormLoginEmailPassword.svelte +4 -2
- package/dist/components/pages/security/login/01/ui/FormLoginEmailPassword.svelte.d.ts +2 -0
- package/dist/components/pages/security/login/01/ui/FormLoginPhonePassword.svelte +4 -2
- package/dist/components/pages/security/login/01/ui/FormLoginPhonePassword.svelte.d.ts +2 -0
- package/dist/components/pages/security/login/01/ui/FormLoginUsernamePassword.svelte +4 -2
- package/dist/components/pages/security/login/01/ui/FormLoginUsernamePassword.svelte.d.ts +2 -0
- package/dist/components/pages/security/login/01/ui/{LoginCard.svelte → LoginCard01.svelte} +132 -109
- package/dist/components/pages/security/login/01/ui/{LoginCard.svelte.d.ts → LoginCard01.svelte.d.ts} +3 -3
- package/dist/components/pages/security/login/01/ui/PageLogin01.svelte +2 -2
- package/dist/components/pages/security/login/02/ui/FormLogin02.svelte +7 -5
- package/dist/components/pages/security/login/02/ui/FormLogin02.svelte.d.ts +2 -0
- package/dist/components/pages/security/login/02/ui/FormLoginEmailPassword02.svelte +4 -2
- package/dist/components/pages/security/login/02/ui/FormLoginEmailPassword02.svelte.d.ts +2 -0
- package/dist/components/pages/security/login/02/ui/FormLoginPhonePassword02.svelte +4 -2
- package/dist/components/pages/security/login/02/ui/FormLoginPhonePassword02.svelte.d.ts +2 -0
- package/dist/components/pages/security/login/02/ui/FormLoginUsernamePassword02.svelte +4 -2
- package/dist/components/pages/security/login/02/ui/FormLoginUsernamePassword02.svelte.d.ts +2 -0
- package/dist/components/pages/security/login/03/ui/FormLogin03.svelte +8 -4
- package/dist/components/pages/security/login/03/ui/FormLogin03.svelte.d.ts +2 -0
- package/dist/components/pages/security/login/03/ui/FormLoginEmailPassword03.svelte +4 -2
- package/dist/components/pages/security/login/03/ui/FormLoginEmailPassword03.svelte.d.ts +2 -0
- package/dist/components/pages/security/login/03/ui/FormLoginPhonePassword03.svelte +4 -2
- package/dist/components/pages/security/login/03/ui/FormLoginPhonePassword03.svelte.d.ts +2 -0
- package/dist/components/pages/security/login/03/ui/FormLoginUsernamePassword03.svelte +4 -2
- package/dist/components/pages/security/login/03/ui/FormLoginUsernamePassword03.svelte.d.ts +2 -0
- package/dist/components/pages/security/login/PageLogin.svelte +30 -30
- package/dist/components/pages/security/register/01/ui/PageRegister01.svelte +21 -9
- package/dist/components/pages/security/register/01/ui/PageRegister01.svelte.d.ts +1 -0
- package/dist/components/pages/security/register/01/ui/{RegisterCard.svelte → RegisterCard01.svelte} +26 -22
- package/dist/components/pages/security/register/01/ui/{RegisterCard.svelte.d.ts → RegisterCard01.svelte.d.ts} +3 -3
- package/dist/components/pages/security/register/FormRegister.svelte +40 -14
- package/dist/components/pages/security/register/FormRegister.svelte.d.ts +3 -0
- package/dist/components/ui/avatar/avatar-fallback.svelte +29 -29
- package/dist/components/ui/avatar/avatar-image.svelte +38 -38
- package/dist/components/ui/avatar/avatar.svelte +39 -39
- package/dist/components/ui/badge/badge.svelte +46 -46
- package/dist/components/ui/banner/AdCardBanner.svelte +74 -74
- package/dist/components/ui/banner/CtaCardBanner.svelte +118 -118
- package/dist/components/ui/banner/CtaCardImageBanner.svelte +94 -94
- package/dist/components/ui/breadcrumb/core/breadcrumb-list.svelte +31 -31
- package/dist/components/ui/button/ButtonBack.svelte +18 -18
- package/dist/components/ui/button/ButtonLogin.svelte +15 -15
- package/dist/components/ui/button/ButtonLoginWith.svelte +57 -57
- package/dist/components/ui/button/ButtonSend.svelte +15 -15
- package/dist/components/ui/button/button.svelte +85 -85
- package/dist/components/ui/card/core/highlight/01/CardHighlight01.svelte +103 -103
- package/dist/components/ui/card/core/highlight/02/CardHighlight02.svelte +99 -99
- package/dist/components/ui/card/core/highlight/CardHighlight.svelte +22 -22
- package/dist/components/ui/card/core/media/01/CardMedia01.svelte +133 -133
- package/dist/components/ui/card/core/media/02/CardMedia02.svelte +127 -127
- package/dist/components/ui/card/core/media/CardMedia.svelte +18 -18
- package/dist/components/ui/card/core/product/01/CardProduct01.svelte +136 -136
- package/dist/components/ui/card/core/product/02/CardProduct02.svelte +124 -124
- package/dist/components/ui/card/core/product/CardProduct.svelte +22 -22
- package/dist/components/ui/card/core/profile/01/CardProfile01.svelte +134 -134
- package/dist/components/ui/card/core/profile/02/CardProfile02.svelte +132 -132
- package/dist/components/ui/card/core/profile/CardProfile.svelte +18 -18
- package/dist/components/ui/card/core/promotion/CardPromotion.svelte +139 -139
- package/dist/components/ui/card/core/promotion/CardPromotionPrice.svelte +32 -32
- package/dist/components/ui/card/core/shared/CardButton.svelte +42 -42
- package/dist/components/ui/card/core/shared/CardCart.svelte +36 -36
- package/dist/components/ui/card/core/shared/CardDescription.svelte +41 -41
- package/dist/components/ui/card/core/shared/CardFavorite.svelte +33 -33
- package/dist/components/ui/card/core/shared/CardLogo.svelte +19 -19
- package/dist/components/ui/card/core/shared/CardPhoneOrWhatsapp.svelte +45 -45
- package/dist/components/ui/card/core/shared/CardStarRating.svelte +24 -24
- package/dist/components/ui/card/core/shared/CardTags.svelte +95 -95
- package/dist/components/ui/card/core/shared/CardThumbnailVideo.svelte +232 -232
- package/dist/components/ui/card/core/shared/CardTitlePrice.svelte +24 -24
- package/dist/components/ui/card/core/shared/TruncatableText.svelte +49 -49
- package/dist/components/ui/carousel/carousel-content.svelte +56 -56
- package/dist/components/ui/carousel/carousel-item.svelte +29 -29
- package/dist/components/ui/carousel/carousel-next.svelte +40 -40
- package/dist/components/ui/carousel/carousel-previous.svelte +40 -40
- package/dist/components/ui/carousel/carousel.svelte +225 -225
- package/dist/components/ui/carousel/core/badge/ui/CarouselBadge.svelte +108 -108
- package/dist/components/ui/carousel/core/grid/shared/ui/CarouselGridSlot.svelte +38 -38
- package/dist/components/ui/carousel/core/hero/ui/CarouselHero.svelte +181 -181
- package/dist/components/ui/carousel/core/highlights/ui/CarouselHighlights.svelte +67 -67
- package/dist/components/ui/carousel/core/product/ui/CarouselProduct.svelte +57 -57
- package/dist/components/ui/carousel/core/promotion/ui/CarouselPromotion.svelte +67 -67
- package/dist/components/ui/carousel/core/shared/ui/CarouselHeader.svelte +59 -59
- package/dist/components/ui/checkbox/checkbox.svelte +96 -96
- package/dist/components/ui/collapsible/collapsible-content.svelte +30 -30
- package/dist/components/ui/collapsible/collapsible-trigger.svelte +51 -51
- package/dist/components/ui/collapsible/collapsible.svelte +66 -66
- package/dist/components/ui/data-table/flex-render.svelte +40 -40
- package/dist/components/ui/datatable/ui/DataTableActions.svelte +28 -28
- package/dist/components/ui/datatable/ui/DataTableCheckbox.svelte +22 -22
- package/dist/components/ui/datatable/ui/DataTableContent.svelte +59 -59
- package/dist/components/ui/datatable/ui/DataTableCore.svelte +148 -148
- package/dist/components/ui/datatable/ui/DataTableDragHandle.svelte +8 -8
- package/dist/components/ui/datatable/ui/DataTableListFilter.svelte +60 -60
- package/dist/components/ui/datatable/ui/DataTableListPagination.svelte +35 -35
- package/dist/components/ui/drawer/drawer-close.svelte +41 -41
- package/dist/components/ui/drawer/drawer-content.svelte +81 -81
- package/dist/components/ui/drawer/drawer-description.svelte +19 -19
- package/dist/components/ui/drawer/drawer-footer.svelte +20 -20
- package/dist/components/ui/drawer/drawer-header.svelte +20 -20
- package/dist/components/ui/drawer/drawer-nested.svelte +34 -34
- package/dist/components/ui/drawer/drawer-overlay.svelte +25 -25
- package/dist/components/ui/drawer/drawer-portal.svelte +19 -19
- package/dist/components/ui/drawer/drawer-title.svelte +19 -19
- package/dist/components/ui/drawer/drawer-trigger.svelte +42 -42
- package/dist/components/ui/drawer/drawer.svelte +74 -74
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-group.svelte +25 -25
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +69 -69
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +106 -106
- package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +27 -27
- package/dist/components/ui/dropdown-menu/dropdown-menu-group.svelte +21 -21
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +60 -60
- package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte +27 -27
- package/dist/components/ui/dropdown-menu/dropdown-menu-portal.svelte +6 -6
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte +43 -43
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +70 -70
- package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte +20 -20
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +33 -33
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +57 -57
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub.svelte +76 -76
- package/dist/components/ui/dropdown-menu/dropdown-menu-trigger.svelte +68 -68
- package/dist/components/ui/dropdown-menu/dropdown-menu.svelte +53 -53
- package/dist/components/ui/empty/empty-content.svelte +19 -19
- package/dist/components/ui/empty/empty-description.svelte +19 -19
- package/dist/components/ui/empty/empty-header.svelte +19 -19
- package/dist/components/ui/empty/empty-media.svelte +41 -41
- package/dist/components/ui/empty/empty-title.svelte +19 -19
- package/dist/components/ui/empty/empty.svelte +19 -19
- package/dist/components/ui/footer/ui/Footer.svelte +18 -18
- package/dist/components/ui/form/data/InputIconDefault.svelte.js +2 -1
- package/dist/components/ui/form/data/InputLabel.svelte.d.ts +3 -0
- package/dist/components/ui/form/ui/calendar/Calendar.svelte +194 -0
- package/dist/components/ui/form/ui/calendar/Calendar.svelte.d.ts +15 -0
- package/dist/components/ui/form/ui/calendar/CalendarCard.svelte +90 -0
- package/dist/components/ui/form/ui/calendar/CalendarCard.svelte.d.ts +20 -0
- package/dist/components/ui/form/ui/calendar/DaysGrid.svelte +76 -0
- package/dist/components/ui/form/ui/calendar/DaysGrid.svelte.d.ts +17 -0
- package/dist/components/ui/form/ui/calendar/MonthSelect.svelte +50 -0
- package/dist/components/ui/form/ui/calendar/MonthSelect.svelte.d.ts +10 -0
- package/dist/components/ui/form/ui/calendar/YearSelect.svelte +117 -0
- package/dist/components/ui/form/ui/calendar/YearSelect.svelte.d.ts +15 -0
- package/dist/components/ui/form/ui/calendar/index.d.ts +5 -0
- package/dist/components/ui/form/ui/calendar/index.js +5 -0
- package/dist/components/ui/form/ui/calendar/utils.d.ts +26 -0
- package/dist/components/ui/form/ui/calendar/utils.js +89 -0
- package/dist/components/ui/form/ui/input-base.svelte +83 -81
- package/dist/components/ui/form/ui/input-calendar-interval.svelte +179 -0
- package/dist/components/ui/form/ui/input-calendar-interval.svelte.d.ts +14 -0
- package/dist/components/ui/form/ui/input-calendar.svelte +110 -0
- package/dist/components/ui/form/ui/input-calendar.svelte.d.ts +9 -0
- package/dist/components/ui/form/ui/input-email-or-phone.svelte +23 -23
- package/dist/components/ui/form/ui/input-email.svelte +23 -23
- package/dist/components/ui/form/ui/input-password-confirm.svelte +23 -23
- package/dist/components/ui/form/ui/input-password.svelte +23 -23
- package/dist/components/ui/form/ui/input-phone.svelte +37 -33
- package/dist/components/ui/form/ui/input-select.svelte +210 -158
- package/dist/components/ui/form/ui/input-select.svelte.d.ts +5 -9
- package/dist/components/ui/form/ui/input-username.svelte +22 -22
- package/dist/components/ui/grid/core/ui/01/Grid01.svelte +30 -30
- package/dist/components/ui/grid/core/ui/02/Grid02.svelte +30 -30
- package/dist/components/ui/grid/core/ui/ItemsPanel.svelte +26 -26
- package/dist/components/ui/grid/core/ui/ItemsPanelCarousel.svelte +37 -37
- package/dist/components/ui/grid/core/ui/ItemsPanelGrid.svelte +43 -43
- package/dist/components/ui/grid/core/ui/ItemsSimpleGrid.svelte +45 -45
- package/dist/components/ui/grid/core/ui/shared/DescriptionGrid.svelte +23 -23
- package/dist/components/ui/grid/core/ui/shared/IconRenderGrid.svelte +23 -23
- package/dist/components/ui/grid/core/ui/shared/TitleGrid.svelte +19 -19
- package/dist/components/ui/hero/SimpleHero.svelte +65 -65
- package/dist/components/ui/input-otp/input-otp-group.svelte +22 -22
- package/dist/components/ui/input-otp/input-otp-separator.svelte +27 -27
- package/dist/components/ui/input-otp/input-otp-slot.svelte +63 -63
- package/dist/components/ui/input-otp/input-otp.svelte +181 -181
- package/dist/components/ui/label/core/LabelOr.svelte +25 -25
- package/dist/components/ui/label/label.svelte +19 -19
- package/dist/components/ui/language-switcher/language-switcher.svelte +48 -48
- package/dist/components/ui/light-switch/light-switch.svelte +48 -48
- package/dist/components/ui/link/link-forget-password.svelte +12 -12
- package/dist/components/ui/link/link-privacy-polity.svelte +12 -12
- package/dist/components/ui/link/link-terms-of-service.svelte +12 -12
- package/dist/components/ui/modal/core/index.d.ts +1 -1
- package/dist/components/ui/modal/core/types.d.ts +2 -1
- package/dist/components/ui/modal/core/ui/ModalCore.svelte +132 -132
- package/dist/components/ui/modal/grid/types.d.ts +6 -5
- package/dist/components/ui/modal/grid/ui/02/ModalGridSelection02.svelte +146 -146
- package/dist/components/ui/modal/share/ui/ModalShareSelection.svelte +156 -156
- package/dist/components/ui/nav/ui/ComplexMenu.svelte +51 -51
- package/dist/components/ui/nav/ui/Menu.svelte +72 -72
- package/dist/components/ui/nav/ui/SimpleMenu.svelte +14 -14
- package/dist/components/ui/nav/ui/mobile/ComplexMenuMobile.svelte +125 -125
- package/dist/components/ui/nav/ui/mobile/MenuMobile.svelte +54 -54
- package/dist/components/ui/nav/ui/shared/MenuButton.svelte +51 -51
- package/dist/components/ui/nav/ui/shared/MenuLinks.svelte +40 -40
- package/dist/components/ui/nav/ui/shared/MenuListItem.svelte +44 -44
- package/dist/components/ui/nav/ui/shared/MenuLogo.svelte +13 -13
- package/dist/components/ui/nav/ui/shared/dropdown/DropdownNavigationMenuItemGrid.svelte +30 -30
- package/dist/components/ui/nav/ui/shared/navigation/NavDropdown.svelte +87 -87
- package/dist/components/ui/nav/ui/shared/navigation/NavigationMenuItem.svelte +17 -17
- package/dist/components/ui/nav/ui/shared/navigation/NavigationMenuItemCard.svelte +53 -53
- package/dist/components/ui/nav/ui/shared/navigation/NavigationMenuItemGrid.svelte +36 -36
- package/dist/components/ui/nav/ui/shared/navigation/NavigationMenuItemList.svelte +24 -24
- package/dist/components/ui/nav/ui/shared/navigation/NavigationMenuItems.svelte +21 -21
- package/dist/components/ui/panel/CarouselSlot.svelte +57 -57
- package/dist/components/ui/panel/LeftHero.svelte +114 -114
- package/dist/components/ui/panel/NotFoundEmpty.svelte +66 -66
- package/dist/components/ui/phone-input/country-selector.svelte +87 -87
- package/dist/components/ui/phone-input/country-selector.svelte.d.ts +2 -2
- package/dist/components/ui/phone-input/flag.svelte +11 -11
- package/dist/components/ui/phone-input/phone-input.svelte +163 -148
- package/dist/components/ui/phone-input/phone-input.svelte.d.ts +2 -2
- package/dist/components/ui/popover/popover-close.svelte +25 -25
- package/dist/components/ui/popover/popover-content.svelte +92 -92
- package/dist/components/ui/popover/popover-portal.svelte +6 -6
- package/dist/components/ui/popover/popover-trigger.svelte +68 -68
- package/dist/components/ui/popover/popover.svelte +53 -53
- package/dist/components/ui/search/SearchInput.svelte +32 -32
- package/dist/components/ui/search/shared/SearchInputCore.svelte +66 -66
- package/dist/components/ui/separator/separator.svelte +28 -28
- package/dist/components/ui/sidebar/core/MenuBarSidebar.svelte +70 -70
- package/dist/components/ui/sidebar/core/ui/navbar/NavMenuBarSidebar.svelte +97 -97
- package/dist/components/ui/sidebar/core/ui/navbar/NavMenuBottomSidebar.svelte +33 -33
- package/dist/components/ui/sidebar/core/ui/navbar/NavMenuTopBarSidebar.svelte +101 -101
- package/dist/components/ui/sidebar/core/ui/navbar/nav-menu-header-sidebar.svelte +77 -77
- package/dist/components/ui/sidebar/sidebar-content.svelte +24 -24
- package/dist/components/ui/sidebar/sidebar-footer.svelte +21 -21
- package/dist/components/ui/sidebar/sidebar-group-content.svelte +21 -21
- package/dist/components/ui/sidebar/sidebar-menu-action.svelte +38 -38
- package/dist/components/ui/sidebar/sidebar-menu-button.svelte +70 -70
- package/dist/components/ui/sidebar/sidebar-menu-sub-button.svelte +39 -39
- package/dist/components/ui/sidebar/sidebar-provider.svelte +62 -62
- package/dist/components/ui/sidebar/sidebar-rail.svelte +36 -36
- package/dist/components/ui/sidebar/sidebar-separator.svelte +21 -21
- package/dist/components/ui/sidebar/sidebar-trigger.svelte +36 -36
- package/dist/components/ui/sidebar/sidebar.svelte +118 -118
- package/dist/components/ui/skeleton/skeleton.svelte +19 -19
- package/dist/components/ui/star-rating/star-rating-star.svelte +66 -66
- package/dist/components/ui/star-rating/star-rating.svelte +149 -149
- package/dist/components/ui/table/table-body.svelte +15 -15
- package/dist/components/ui/table/table-caption.svelte +20 -20
- package/dist/components/ui/table/table-cell.svelte +15 -15
- package/dist/components/ui/table/table-footer.svelte +20 -20
- package/dist/components/ui/table/table-head.svelte +15 -15
- package/dist/components/ui/table/table-header.svelte +20 -20
- package/dist/components/ui/table/table-row.svelte +15 -15
- package/dist/components/ui/table/table.svelte +17 -17
- package/dist/components/ui/tabs/ui/tab-underline.svelte +43 -43
- package/dist/components/ui/underline-tabs/underline-tabs-content.svelte +33 -33
- package/dist/components/ui/underline-tabs/underline-tabs-list.svelte +40 -40
- package/dist/components/ui/underline-tabs/underline-tabs-trigger.svelte +91 -91
- package/dist/components/ui/underline-tabs/underline-tabs.svelte +61 -61
- package/dist/docs/ApiTable.svelte +42 -42
- package/dist/docs/CodeBlock.svelte +26 -26
- package/dist/docs/DocsHeader.svelte +25 -25
- package/dist/docs/DocsSidebar.svelte +108 -156
- package/dist/docs/components.js +638 -563
- package/dist/globals.css +68 -10
- package/dist/i18n/langs/en.d.ts +7 -0
- package/dist/i18n/langs/en.js +7 -0
- package/dist/i18n/langs/pt.d.ts +7 -0
- package/dist/i18n/langs/pt.js +7 -0
- package/dist/i18n/translations.d.ts +14 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +23 -0
- package/dist/styles/globals.css +283 -283
- package/dist/types/index.d.ts +3 -1
- package/package.json +81 -81
- package/dist/components/pages/security/login/01/ui/FormRegister.svelte +0 -28
- package/dist/components/pages/security/login/01/ui/FormRegister.svelte.d.ts +0 -3
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from "svelte";
|
|
3
|
-
import { cn } from "../../../utils.js";
|
|
4
|
-
import { useUnderlineTabsTrigger } from "./underline-tabs.svelte.js";
|
|
5
|
-
|
|
6
|
-
let {
|
|
7
|
-
ref = $bindable(null),
|
|
8
|
-
value,
|
|
9
|
-
class: className,
|
|
10
|
-
children,
|
|
11
|
-
...restProps
|
|
12
|
-
}: {
|
|
13
|
-
ref?: HTMLDivElement | null;
|
|
14
|
-
value: string;
|
|
15
|
-
class?: string;
|
|
16
|
-
children?: Snippet;
|
|
17
|
-
[key: string]: unknown;
|
|
18
|
-
} = $props();
|
|
19
|
-
|
|
20
|
-
const state = useUnderlineTabsTrigger();
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
{#if state.value === value}
|
|
24
|
-
<div
|
|
25
|
-
bind:this={ref}
|
|
26
|
-
data-slot="underline-tabs-content"
|
|
27
|
-
role="tabpanel"
|
|
28
|
-
data-state="active"
|
|
29
|
-
class={cn("flex-1 outline-none", className)}
|
|
30
|
-
{...restProps}
|
|
31
|
-
>
|
|
32
|
-
{@render children?.()}
|
|
33
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
import { useUnderlineTabsTrigger } from "./underline-tabs.svelte.js";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
value,
|
|
9
|
+
class: className,
|
|
10
|
+
children,
|
|
11
|
+
...restProps
|
|
12
|
+
}: {
|
|
13
|
+
ref?: HTMLDivElement | null;
|
|
14
|
+
value: string;
|
|
15
|
+
class?: string;
|
|
16
|
+
children?: Snippet;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
} = $props();
|
|
19
|
+
|
|
20
|
+
const state = useUnderlineTabsTrigger();
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
{#if state.value === value}
|
|
24
|
+
<div
|
|
25
|
+
bind:this={ref}
|
|
26
|
+
data-slot="underline-tabs-content"
|
|
27
|
+
role="tabpanel"
|
|
28
|
+
data-state="active"
|
|
29
|
+
class={cn("flex-1 outline-none", className)}
|
|
30
|
+
{...restProps}
|
|
31
|
+
>
|
|
32
|
+
{@render children?.()}
|
|
33
|
+
</div>
|
|
34
34
|
{/if}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from "svelte";
|
|
3
|
-
import { cn } from "../../../utils.js";
|
|
4
|
-
|
|
5
|
-
let {
|
|
6
|
-
ref = $bindable(null),
|
|
7
|
-
class: className,
|
|
8
|
-
children,
|
|
9
|
-
...restProps
|
|
10
|
-
}: {
|
|
11
|
-
ref?: HTMLDivElement | null;
|
|
12
|
-
class?: string;
|
|
13
|
-
children?: Snippet;
|
|
14
|
-
[key: string]: unknown;
|
|
15
|
-
} = $props();
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<div
|
|
19
|
-
bind:this={ref}
|
|
20
|
-
data-slot="underline-tabs-list"
|
|
21
|
-
role="tablist"
|
|
22
|
-
data-orientation="horizontal"
|
|
23
|
-
class={cn(
|
|
24
|
-
"text-muted-foreground border-border relative inline-flex h-9 w-full max-w-full items-center justify-start overflow-x-auto border-b",
|
|
25
|
-
className
|
|
26
|
-
)}
|
|
27
|
-
{...restProps}
|
|
28
|
-
>
|
|
29
|
-
{@render children?.()}
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<style>
|
|
33
|
-
:global([data-slot='underline-tabs-list']) {
|
|
34
|
-
-ms-overflow-style: none; /* IE and Edge */
|
|
35
|
-
scrollbar-width: none; /* Firefox */
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
:global([data-slot='underline-tabs-list']::-webkit-scrollbar) {
|
|
39
|
-
display: none;
|
|
40
|
-
}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: {
|
|
11
|
+
ref?: HTMLDivElement | null;
|
|
12
|
+
class?: string;
|
|
13
|
+
children?: Snippet;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
} = $props();
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<div
|
|
19
|
+
bind:this={ref}
|
|
20
|
+
data-slot="underline-tabs-list"
|
|
21
|
+
role="tablist"
|
|
22
|
+
data-orientation="horizontal"
|
|
23
|
+
class={cn(
|
|
24
|
+
"text-muted-foreground border-border relative inline-flex h-9 w-full max-w-full items-center justify-start overflow-x-auto border-b",
|
|
25
|
+
className
|
|
26
|
+
)}
|
|
27
|
+
{...restProps}
|
|
28
|
+
>
|
|
29
|
+
{@render children?.()}
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<style>
|
|
33
|
+
:global([data-slot='underline-tabs-list']) {
|
|
34
|
+
-ms-overflow-style: none; /* IE and Edge */
|
|
35
|
+
scrollbar-width: none; /* Firefox */
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:global([data-slot='underline-tabs-list']::-webkit-scrollbar) {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
41
|
</style>
|
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from "svelte";
|
|
3
|
-
import { cn } from "../../../utils.js";
|
|
4
|
-
import { useUnderlineTabsTrigger } from "./underline-tabs.svelte.js";
|
|
5
|
-
|
|
6
|
-
let {
|
|
7
|
-
ref = $bindable(null),
|
|
8
|
-
value,
|
|
9
|
-
class: className,
|
|
10
|
-
onclick,
|
|
11
|
-
onmouseenter,
|
|
12
|
-
onmouseleave,
|
|
13
|
-
onfocus,
|
|
14
|
-
onblur,
|
|
15
|
-
children,
|
|
16
|
-
...restProps
|
|
17
|
-
}: {
|
|
18
|
-
ref?: HTMLButtonElement | null;
|
|
19
|
-
value: string;
|
|
20
|
-
class?: string;
|
|
21
|
-
onclick?: (e: MouseEvent) => void;
|
|
22
|
-
onmouseenter?: (e: MouseEvent) => void;
|
|
23
|
-
onmouseleave?: (e: MouseEvent) => void;
|
|
24
|
-
onfocus?: (e: FocusEvent) => void;
|
|
25
|
-
onblur?: (e: FocusEvent) => void;
|
|
26
|
-
children?: Snippet;
|
|
27
|
-
[key: string]: unknown;
|
|
28
|
-
} = $props();
|
|
29
|
-
|
|
30
|
-
const state = useUnderlineTabsTrigger();
|
|
31
|
-
|
|
32
|
-
const isActive = $derived(state.value === value);
|
|
33
|
-
const isHovered = $derived(state.hovered === value);
|
|
34
|
-
|
|
35
|
-
function handleClick(e: MouseEvent) {
|
|
36
|
-
onclick?.(e);
|
|
37
|
-
state.select(value);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function handleMouseEnter(e: MouseEvent) {
|
|
41
|
-
onmouseenter?.(e);
|
|
42
|
-
state.setHovered(value);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function handleMouseLeave(e: MouseEvent) {
|
|
46
|
-
onmouseleave?.(e);
|
|
47
|
-
state.setHovered(null);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function handleFocus(e: FocusEvent) {
|
|
51
|
-
onfocus?.(e);
|
|
52
|
-
state.setHovered(value);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function handleBlur(e: FocusEvent) {
|
|
56
|
-
onblur?.(e);
|
|
57
|
-
state.setHovered(null);
|
|
58
|
-
}
|
|
59
|
-
</script>
|
|
60
|
-
|
|
61
|
-
<div class="relative h-full">
|
|
62
|
-
<button
|
|
63
|
-
bind:this={ref}
|
|
64
|
-
type="button"
|
|
65
|
-
role="tab"
|
|
66
|
-
data-slot="underline-tabs-trigger"
|
|
67
|
-
data-state={isActive ? "active" : "inactive"}
|
|
68
|
-
aria-selected={isActive}
|
|
69
|
-
tabindex={isActive ? 0 : -1}
|
|
70
|
-
class={cn(
|
|
71
|
-
"dark:data-[state=active]:text-foreground data-[state=active]:text-foreground text-muted-foreground relative z-2 inline-flex h-[calc(100%-3px)] flex-1 items-center justify-center gap-1.5 px-3 py-1 text-sm font-medium whitespace-nowrap transition-colors focus:outline-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
72
|
-
className
|
|
73
|
-
)}
|
|
74
|
-
onclick={handleClick}
|
|
75
|
-
onmouseenter={handleMouseEnter}
|
|
76
|
-
onmouseleave={handleMouseLeave}
|
|
77
|
-
onfocus={handleFocus}
|
|
78
|
-
onblur={handleBlur}
|
|
79
|
-
{...restProps}
|
|
80
|
-
>
|
|
81
|
-
{@render children?.()}
|
|
82
|
-
</button>
|
|
83
|
-
{#if isHovered}
|
|
84
|
-
<div
|
|
85
|
-
class="bg-accent absolute top-0 z-1 h-[calc(100%-3px)] w-full rounded-md opacity-100 transition-opacity duration-300"
|
|
86
|
-
aria-hidden="true"
|
|
87
|
-
></div>
|
|
88
|
-
{/if}
|
|
89
|
-
{#if isActive}
|
|
90
|
-
<div class="bg-primary absolute -bottom-px z-1 h-0.5 w-full" aria-hidden="true"></div>
|
|
91
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
import { useUnderlineTabsTrigger } from "./underline-tabs.svelte.js";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
value,
|
|
9
|
+
class: className,
|
|
10
|
+
onclick,
|
|
11
|
+
onmouseenter,
|
|
12
|
+
onmouseleave,
|
|
13
|
+
onfocus,
|
|
14
|
+
onblur,
|
|
15
|
+
children,
|
|
16
|
+
...restProps
|
|
17
|
+
}: {
|
|
18
|
+
ref?: HTMLButtonElement | null;
|
|
19
|
+
value: string;
|
|
20
|
+
class?: string;
|
|
21
|
+
onclick?: (e: MouseEvent) => void;
|
|
22
|
+
onmouseenter?: (e: MouseEvent) => void;
|
|
23
|
+
onmouseleave?: (e: MouseEvent) => void;
|
|
24
|
+
onfocus?: (e: FocusEvent) => void;
|
|
25
|
+
onblur?: (e: FocusEvent) => void;
|
|
26
|
+
children?: Snippet;
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
} = $props();
|
|
29
|
+
|
|
30
|
+
const state = useUnderlineTabsTrigger();
|
|
31
|
+
|
|
32
|
+
const isActive = $derived(state.value === value);
|
|
33
|
+
const isHovered = $derived(state.hovered === value);
|
|
34
|
+
|
|
35
|
+
function handleClick(e: MouseEvent) {
|
|
36
|
+
onclick?.(e);
|
|
37
|
+
state.select(value);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function handleMouseEnter(e: MouseEvent) {
|
|
41
|
+
onmouseenter?.(e);
|
|
42
|
+
state.setHovered(value);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function handleMouseLeave(e: MouseEvent) {
|
|
46
|
+
onmouseleave?.(e);
|
|
47
|
+
state.setHovered(null);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function handleFocus(e: FocusEvent) {
|
|
51
|
+
onfocus?.(e);
|
|
52
|
+
state.setHovered(value);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function handleBlur(e: FocusEvent) {
|
|
56
|
+
onblur?.(e);
|
|
57
|
+
state.setHovered(null);
|
|
58
|
+
}
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<div class="relative h-full">
|
|
62
|
+
<button
|
|
63
|
+
bind:this={ref}
|
|
64
|
+
type="button"
|
|
65
|
+
role="tab"
|
|
66
|
+
data-slot="underline-tabs-trigger"
|
|
67
|
+
data-state={isActive ? "active" : "inactive"}
|
|
68
|
+
aria-selected={isActive}
|
|
69
|
+
tabindex={isActive ? 0 : -1}
|
|
70
|
+
class={cn(
|
|
71
|
+
"dark:data-[state=active]:text-foreground data-[state=active]:text-foreground text-muted-foreground relative z-2 inline-flex h-[calc(100%-3px)] flex-1 items-center justify-center gap-1.5 px-3 py-1 text-sm font-medium whitespace-nowrap transition-colors focus:outline-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
72
|
+
className
|
|
73
|
+
)}
|
|
74
|
+
onclick={handleClick}
|
|
75
|
+
onmouseenter={handleMouseEnter}
|
|
76
|
+
onmouseleave={handleMouseLeave}
|
|
77
|
+
onfocus={handleFocus}
|
|
78
|
+
onblur={handleBlur}
|
|
79
|
+
{...restProps}
|
|
80
|
+
>
|
|
81
|
+
{@render children?.()}
|
|
82
|
+
</button>
|
|
83
|
+
{#if isHovered}
|
|
84
|
+
<div
|
|
85
|
+
class="bg-accent absolute top-0 z-1 h-[calc(100%-3px)] w-full rounded-md opacity-100 transition-opacity duration-300"
|
|
86
|
+
aria-hidden="true"
|
|
87
|
+
></div>
|
|
88
|
+
{/if}
|
|
89
|
+
{#if isActive}
|
|
90
|
+
<div class="bg-primary absolute -bottom-px z-1 h-0.5 w-full" aria-hidden="true"></div>
|
|
91
|
+
{/if}
|
|
92
92
|
</div>
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from "svelte";
|
|
3
|
-
import { cn } from "../../../utils.js";
|
|
4
|
-
import { useUnderlineTabs } from "./underline-tabs.svelte.js";
|
|
5
|
-
|
|
6
|
-
let {
|
|
7
|
-
ref = $bindable(null),
|
|
8
|
-
defaultValue = "",
|
|
9
|
-
value = $bindable(defaultValue),
|
|
10
|
-
onValueChange,
|
|
11
|
-
orientation = "horizontal",
|
|
12
|
-
id = "",
|
|
13
|
-
class: className,
|
|
14
|
-
children,
|
|
15
|
-
...restProps
|
|
16
|
-
}: {
|
|
17
|
-
ref?: HTMLDivElement | null;
|
|
18
|
-
defaultValue?: string;
|
|
19
|
-
value?: string;
|
|
20
|
-
onValueChange?: (value: string) => void;
|
|
21
|
-
orientation?: "horizontal" | "vertical";
|
|
22
|
-
id?: string;
|
|
23
|
-
class?: string;
|
|
24
|
-
children?: Snippet;
|
|
25
|
-
[key: string]: unknown;
|
|
26
|
-
} = $props();
|
|
27
|
-
|
|
28
|
-
let hovered = $state<string | null>(null);
|
|
29
|
-
|
|
30
|
-
function select(next: string) {
|
|
31
|
-
value = next;
|
|
32
|
-
onValueChange?.(next);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function setHovered(next: string | null) {
|
|
36
|
-
hovered = next;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
useUnderlineTabs({
|
|
40
|
-
get value() {
|
|
41
|
-
return value;
|
|
42
|
-
},
|
|
43
|
-
get hovered() {
|
|
44
|
-
return hovered;
|
|
45
|
-
},
|
|
46
|
-
get orientation() {
|
|
47
|
-
return orientation;
|
|
48
|
-
},
|
|
49
|
-
select,
|
|
50
|
-
setHovered
|
|
51
|
-
});
|
|
52
|
-
</script>
|
|
53
|
-
|
|
54
|
-
<div
|
|
55
|
-
bind:this={ref}
|
|
56
|
-
data-slot="underline-tabs"
|
|
57
|
-
data-orientation={orientation}
|
|
58
|
-
class={cn("flex flex-col gap-2", className)}
|
|
59
|
-
{...restProps}
|
|
60
|
-
>
|
|
61
|
-
{@render children?.()}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
import { useUnderlineTabs } from "./underline-tabs.svelte.js";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
defaultValue = "",
|
|
9
|
+
value = $bindable(defaultValue),
|
|
10
|
+
onValueChange,
|
|
11
|
+
orientation = "horizontal",
|
|
12
|
+
id = "",
|
|
13
|
+
class: className,
|
|
14
|
+
children,
|
|
15
|
+
...restProps
|
|
16
|
+
}: {
|
|
17
|
+
ref?: HTMLDivElement | null;
|
|
18
|
+
defaultValue?: string;
|
|
19
|
+
value?: string;
|
|
20
|
+
onValueChange?: (value: string) => void;
|
|
21
|
+
orientation?: "horizontal" | "vertical";
|
|
22
|
+
id?: string;
|
|
23
|
+
class?: string;
|
|
24
|
+
children?: Snippet;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
} = $props();
|
|
27
|
+
|
|
28
|
+
let hovered = $state<string | null>(null);
|
|
29
|
+
|
|
30
|
+
function select(next: string) {
|
|
31
|
+
value = next;
|
|
32
|
+
onValueChange?.(next);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function setHovered(next: string | null) {
|
|
36
|
+
hovered = next;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
useUnderlineTabs({
|
|
40
|
+
get value() {
|
|
41
|
+
return value;
|
|
42
|
+
},
|
|
43
|
+
get hovered() {
|
|
44
|
+
return hovered;
|
|
45
|
+
},
|
|
46
|
+
get orientation() {
|
|
47
|
+
return orientation;
|
|
48
|
+
},
|
|
49
|
+
select,
|
|
50
|
+
setHovered
|
|
51
|
+
});
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<div
|
|
55
|
+
bind:this={ref}
|
|
56
|
+
data-slot="underline-tabs"
|
|
57
|
+
data-orientation={orientation}
|
|
58
|
+
class={cn("flex flex-col gap-2", className)}
|
|
59
|
+
{...restProps}
|
|
60
|
+
>
|
|
61
|
+
{@render children?.()}
|
|
62
62
|
</div>
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { DocProp } from "./components";
|
|
3
|
-
import { CheckmarkCircle01Icon } from "@hugeicons/core-free-icons";
|
|
4
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
5
|
-
|
|
6
|
-
let { props }: { props: DocProp[] } = $props();
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<div class="overflow-x-auto">
|
|
10
|
-
<table class="min-w-full text-sm">
|
|
11
|
-
<thead>
|
|
12
|
-
<tr class="border-b border-border text-left">
|
|
13
|
-
<th class="px-3 py-2 font-semibold">Prop</th>
|
|
14
|
-
<th class="px-3 py-2 font-semibold">Type</th>
|
|
15
|
-
<th class="px-3 py-2 font-semibold">Default</th>
|
|
16
|
-
<th class="px-3 py-2 font-semibold">Description</th>
|
|
17
|
-
</tr>
|
|
18
|
-
</thead>
|
|
19
|
-
<tbody>
|
|
20
|
-
{#each props as prop (prop.name)}
|
|
21
|
-
<tr class="border-b border-border/60 align-top">
|
|
22
|
-
<td class="px-3 py-2 font-mono text-xs font-medium text-primary">
|
|
23
|
-
{prop.name}
|
|
24
|
-
{#if prop.required}
|
|
25
|
-
<HugeiconsIcon icon={CheckmarkCircle01Icon} class="inline size-3 text-destructive" />
|
|
26
|
-
{/if}
|
|
27
|
-
</td>
|
|
28
|
-
<td class="px-3 py-2 font-mono text-xs text-muted-foreground">{prop.type}</td>
|
|
29
|
-
<td class="px-3 py-2 font-mono text-xs text-muted-foreground">
|
|
30
|
-
{prop.default ?? "—"}
|
|
31
|
-
</td>
|
|
32
|
-
<td class="px-3 py-2 text-xs text-muted-foreground">
|
|
33
|
-
{prop.description}
|
|
34
|
-
{#if prop.required}
|
|
35
|
-
<span class="font-medium text-destructive"> (required)</span>
|
|
36
|
-
{/if}
|
|
37
|
-
</td>
|
|
38
|
-
</tr>
|
|
39
|
-
{/each}
|
|
40
|
-
</tbody>
|
|
41
|
-
</table>
|
|
42
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { DocProp } from "./components";
|
|
3
|
+
import { CheckmarkCircle01Icon } from "@hugeicons/core-free-icons";
|
|
4
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
5
|
+
|
|
6
|
+
let { props }: { props: DocProp[] } = $props();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<div class="overflow-x-auto">
|
|
10
|
+
<table class="min-w-full text-sm">
|
|
11
|
+
<thead>
|
|
12
|
+
<tr class="border-b border-border text-left">
|
|
13
|
+
<th class="px-3 py-2 font-semibold">Prop</th>
|
|
14
|
+
<th class="px-3 py-2 font-semibold">Type</th>
|
|
15
|
+
<th class="px-3 py-2 font-semibold">Default</th>
|
|
16
|
+
<th class="px-3 py-2 font-semibold">Description</th>
|
|
17
|
+
</tr>
|
|
18
|
+
</thead>
|
|
19
|
+
<tbody>
|
|
20
|
+
{#each props as prop (prop.name)}
|
|
21
|
+
<tr class="border-b border-border/60 align-top">
|
|
22
|
+
<td class="px-3 py-2 font-mono text-xs font-medium text-primary">
|
|
23
|
+
{prop.name}
|
|
24
|
+
{#if prop.required}
|
|
25
|
+
<HugeiconsIcon icon={CheckmarkCircle01Icon} class="inline size-3 text-destructive" />
|
|
26
|
+
{/if}
|
|
27
|
+
</td>
|
|
28
|
+
<td class="px-3 py-2 font-mono text-xs text-muted-foreground">{prop.type}</td>
|
|
29
|
+
<td class="px-3 py-2 font-mono text-xs text-muted-foreground">
|
|
30
|
+
{prop.default ?? "—"}
|
|
31
|
+
</td>
|
|
32
|
+
<td class="px-3 py-2 text-xs text-muted-foreground">
|
|
33
|
+
{prop.description}
|
|
34
|
+
{#if prop.required}
|
|
35
|
+
<span class="font-medium text-destructive"> (required)</span>
|
|
36
|
+
{/if}
|
|
37
|
+
</td>
|
|
38
|
+
</tr>
|
|
39
|
+
{/each}
|
|
40
|
+
</tbody>
|
|
41
|
+
</table>
|
|
42
|
+
</div>
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Copy01Icon } from "@hugeicons/core-free-icons";
|
|
3
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
4
|
-
import type { DocProp } from "./components";
|
|
5
|
-
|
|
6
|
-
let { code, title = "Example" }: { code: string; title?: string } = $props();
|
|
7
|
-
|
|
8
|
-
function copy() {
|
|
9
|
-
navigator.clipboard?.writeText(code);
|
|
10
|
-
}
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<div class="overflow-hidden rounded-lg border border-border">
|
|
14
|
-
<div class="flex items-center justify-between border-b border-border bg-muted/60 px-4 py-2">
|
|
15
|
-
<span class="text-xs font-medium text-muted-foreground">{title}</span>
|
|
16
|
-
<button
|
|
17
|
-
type="button"
|
|
18
|
-
onclick={copy}
|
|
19
|
-
class="inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted-foreground transition hover:bg-muted hover:text-foreground"
|
|
20
|
-
>
|
|
21
|
-
<HugeiconsIcon icon={Copy01Icon} class="size-3.5" />
|
|
22
|
-
Copy
|
|
23
|
-
</button>
|
|
24
|
-
</div>
|
|
25
|
-
<pre class="overflow-x-auto p-4 text-xs leading-relaxed"><code>{code}</code></pre>
|
|
26
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Copy01Icon } from "@hugeicons/core-free-icons";
|
|
3
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
4
|
+
import type { DocProp } from "./components";
|
|
5
|
+
|
|
6
|
+
let { code, title = "Example" }: { code: string; title?: string } = $props();
|
|
7
|
+
|
|
8
|
+
function copy() {
|
|
9
|
+
navigator.clipboard?.writeText(code);
|
|
10
|
+
}
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div class="overflow-hidden rounded-lg border border-border">
|
|
14
|
+
<div class="flex items-center justify-between border-b border-border bg-muted/60 px-4 py-2">
|
|
15
|
+
<span class="text-xs font-medium text-muted-foreground">{title}</span>
|
|
16
|
+
<button
|
|
17
|
+
type="button"
|
|
18
|
+
onclick={copy}
|
|
19
|
+
class="inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted-foreground transition hover:bg-muted hover:text-foreground"
|
|
20
|
+
>
|
|
21
|
+
<HugeiconsIcon icon={Copy01Icon} class="size-3.5" />
|
|
22
|
+
Copy
|
|
23
|
+
</button>
|
|
24
|
+
</div>
|
|
25
|
+
<pre class="overflow-x-auto p-4 text-xs leading-relaxed"><code>{code}</code></pre>
|
|
26
|
+
</div>
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { SidebarTrigger, useSidebar } from "../components/ui/sidebar";
|
|
3
|
-
import { Separator } from "../components/ui/separator";
|
|
4
|
-
import { LanguageSwitcher } from "../components/ui/language-switcher";
|
|
5
|
-
import { LightSwitch } from "../components/ui/light-switch";
|
|
6
|
-
|
|
7
|
-
let { title = "Components" }: { title?: string } = $props();
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<header class="sticky top-0 z-30 flex h-14 shrink-0 items-center gap-2 border-b border-border bg-background/95 px-4 backdrop-blur">
|
|
11
|
-
<SidebarTrigger class="-ms-1" />
|
|
12
|
-
<Separator orientation="vertical" class="mr-2 h-4" />
|
|
13
|
-
<nav class="hidden items-center gap-1 text-sm md:flex">
|
|
14
|
-
<a href="/docs" class="font-medium text-foreground">Docs</a>
|
|
15
|
-
<span class="text-muted-foreground">/</span>
|
|
16
|
-
<span class="font-medium text-foreground">{title}</span>
|
|
17
|
-
</nav>
|
|
18
|
-
<div class="ms-auto flex items-center gap-2">
|
|
19
|
-
<a href="/" class="rounded-md px-2 py-1 text-sm text-muted-foreground transition hover:bg-muted hover:text-foreground">
|
|
20
|
-
Demos
|
|
21
|
-
</a>
|
|
22
|
-
<LightSwitch />
|
|
23
|
-
<LanguageSwitcher />
|
|
24
|
-
</div>
|
|
25
|
-
</header>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { SidebarTrigger, useSidebar } from "../components/ui/sidebar";
|
|
3
|
+
import { Separator } from "../components/ui/separator";
|
|
4
|
+
import { LanguageSwitcher } from "../components/ui/language-switcher";
|
|
5
|
+
import { LightSwitch } from "../components/ui/light-switch";
|
|
6
|
+
|
|
7
|
+
let { title = "Components" }: { title?: string } = $props();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<header class="sticky top-0 z-30 flex h-14 shrink-0 items-center gap-2 border-b border-border bg-background/95 px-4 backdrop-blur">
|
|
11
|
+
<SidebarTrigger class="-ms-1" />
|
|
12
|
+
<Separator orientation="vertical" class="mr-2 h-4" />
|
|
13
|
+
<nav class="hidden items-center gap-1 text-sm md:flex">
|
|
14
|
+
<a href="/docs" class="font-medium text-foreground">Docs</a>
|
|
15
|
+
<span class="text-muted-foreground">/</span>
|
|
16
|
+
<span class="font-medium text-foreground">{title}</span>
|
|
17
|
+
</nav>
|
|
18
|
+
<div class="ms-auto flex items-center gap-2">
|
|
19
|
+
<a href="/" class="rounded-md px-2 py-1 text-sm text-muted-foreground transition hover:bg-muted hover:text-foreground">
|
|
20
|
+
Demos
|
|
21
|
+
</a>
|
|
22
|
+
<LightSwitch />
|
|
23
|
+
<LanguageSwitcher />
|
|
24
|
+
</div>
|
|
25
|
+
</header>
|