@svadmin/ui 0.68.1 → 0.69.1
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 +52 -0
- package/dist/app.css +7627 -853
- package/dist/app.theme.css +7676 -850
- package/dist/components/AboutSettings.svelte +8 -8
- package/dist/components/ActivityFeed.svelte +25 -40
- package/dist/components/AdminApp.svelte +14 -14
- package/dist/components/AnomalyBadge.svelte +6 -5
- package/dist/components/ApiSettings.svelte +8 -8
- package/dist/components/AppearanceSettings.svelte +13 -13
- package/dist/components/ApprovalActionCard.svelte +35 -35
- package/dist/components/AuditLogDrawer.svelte +17 -17
- package/dist/components/AuditLogViewer.svelte +42 -42
- package/dist/components/AuthPageShell.svelte +11 -11
- package/dist/components/AutoForm.svelte +28 -28
- package/dist/components/AutoSaveIndicator.svelte +8 -8
- package/dist/components/AutoTable.svelte +141 -141
- package/dist/components/BatchActionBar.svelte +15 -15
- package/dist/components/Breadcrumbs.svelte +4 -4
- package/dist/components/CancelTaskButton.svelte +2 -2
- package/dist/components/CanvasAnnotation.svelte +27 -27
- package/dist/components/Cascader.svelte +20 -20
- package/dist/components/CatchAllNavigate.svelte +2 -2
- package/dist/components/ColumnHeaderFilter.svelte +21 -21
- package/dist/components/ColumnSettings.svelte +20 -20
- package/dist/components/ComboboxField.svelte +17 -17
- package/dist/components/CommandPalette.svelte +23 -23
- package/dist/components/ConfigErrorScreen.svelte +27 -27
- package/dist/components/ConfirmDialog.svelte +1 -1
- package/dist/components/CreateInferencer.svelte +1 -1
- package/dist/components/CreatePage.svelte +1 -1
- package/dist/components/DecisionTable.svelte +39 -39
- package/dist/components/DetailDrawer.svelte +9 -9
- package/dist/components/DevTools.svelte +96 -96
- package/dist/components/DraggableGrid.svelte +6 -6
- package/dist/components/DraggableHeader.svelte +1 -1
- package/dist/components/DraggableRowTable.svelte +13 -13
- package/dist/components/DrawerForm.svelte +10 -10
- package/dist/components/DynamicFormList.svelte +19 -19
- package/dist/components/EditInferencer.svelte +3 -3
- package/dist/components/EditInferencer.svelte.d.ts +1 -1
- package/dist/components/EditPage.svelte +1 -1
- package/dist/components/EditableTable.svelte +30 -30
- package/dist/components/EmptyState.svelte +6 -6
- package/dist/components/ErrorBoundary.svelte +8 -8
- package/dist/components/ErrorComponent.svelte +5 -5
- package/dist/components/FieldRenderer.svelte +30 -30
- package/dist/components/FilterBuilder.svelte +31 -31
- package/dist/components/FilterDropdown.svelte +26 -26
- package/dist/components/ForgotPasswordPage.svelte +14 -14
- package/dist/components/GanttChart.svelte +30 -30
- package/dist/components/Header.svelte +13 -13
- package/dist/components/ImageCropper.svelte +21 -21
- package/dist/components/ImportWizard.svelte +49 -49
- package/dist/components/InferencerPanel.svelte +35 -35
- package/dist/components/InfiniteList.svelte +8 -8
- package/dist/components/InlineEdit.svelte +5 -5
- package/dist/components/IntegrationsSettings.svelte +5 -5
- package/dist/components/JsonSchemaForm.svelte +18 -18
- package/dist/components/KanbanBoard.svelte +30 -30
- package/dist/components/KeyboardShortcuts.svelte +8 -8
- package/dist/components/Layout.svelte +22 -22
- package/dist/components/LazyPage.svelte +4 -4
- package/dist/components/ListInferencer.svelte +2 -2
- package/dist/components/ListPage.svelte +1 -1
- package/dist/components/LiveIndicator.svelte +11 -11
- package/dist/components/LoginPage.svelte +27 -27
- package/dist/components/MasterDetailView.svelte +24 -24
- package/dist/components/MediaLibraryModal.svelte +37 -37
- package/dist/components/MentionsInput.svelte +11 -11
- package/dist/components/MetricStrip.svelte +18 -58
- package/dist/components/ModalForm.svelte +8 -8
- package/dist/components/MultiTabKeepAlive.svelte +14 -14
- package/dist/components/NavigateToResource.svelte +3 -3
- package/dist/components/NotificationsSettings.svelte +4 -4
- package/dist/components/OfflineSyncBanner.svelte +28 -28
- package/dist/components/PageHeader.svelte +12 -13
- package/dist/components/PageSkeleton.svelte +26 -26
- package/dist/components/PasswordInput.svelte +11 -11
- package/dist/components/PdfDocumentViewer.svelte +45 -45
- package/dist/components/PermissionMatrix.svelte +48 -48
- package/dist/components/PivotTable.svelte +21 -21
- package/dist/components/PresenceAvatarGroup.svelte +11 -11
- package/dist/components/PrintableBill.svelte +43 -43
- package/dist/components/ProfilePage.svelte +34 -34
- package/dist/components/RecordDetailDrawer.svelte +15 -15
- package/dist/components/RegisterPage.svelte +9 -9
- package/dist/components/ResourceInferencer.svelte +3 -3
- package/dist/components/ResourceOperationsPage.svelte +44 -44
- package/dist/components/RetryTaskButton.svelte +2 -2
- package/dist/components/RolesSettings.svelte +4 -4
- package/dist/components/RowActions.svelte +10 -10
- package/dist/components/SecuritySettings.svelte +8 -8
- package/dist/components/SensitiveDataMask.svelte +8 -8
- package/dist/components/SettingsPage.svelte +17 -17
- package/dist/components/ShowInferencer.svelte +3 -3
- package/dist/components/ShowInferencer.svelte.d.ts +1 -1
- package/dist/components/ShowPage.svelte +24 -24
- package/dist/components/Sidebar.svelte +63 -63
- package/dist/components/SidebarItem.svelte +35 -35
- package/dist/components/SignaturePad.svelte +16 -16
- package/dist/components/SplitPaneLayout.svelte +10 -10
- package/dist/components/SpreadsheetView.svelte +35 -35
- package/dist/components/StatsCard.svelte +12 -25
- package/dist/components/StepForm.svelte +23 -23
- package/dist/components/StepsForm.svelte +17 -17
- package/dist/components/SvadminLogo.svelte +1 -1
- package/dist/components/SystemPageShell.svelte +6 -6
- package/dist/components/TableSummary.svelte +8 -8
- package/dist/components/TaskDetails.svelte +29 -29
- package/dist/components/TaskList.svelte +17 -17
- package/dist/components/TaskProgressBar.svelte +4 -4
- package/dist/components/TaskQueueDrawer.svelte +44 -44
- package/dist/components/TaskStatusBadge.svelte +5 -5
- package/dist/components/TenantSwitcher.svelte +17 -17
- package/dist/components/ThemedTitle.svelte +4 -4
- package/dist/components/Toast.svelte +2 -2
- package/dist/components/Transfer.svelte +40 -40
- package/dist/components/TreeSelect.svelte +32 -32
- package/dist/components/TreeTable.svelte +28 -28
- package/dist/components/TwoFactorAuthPage.svelte +15 -15
- package/dist/components/UndoableNotification.svelte +10 -10
- package/dist/components/UpdatePasswordPage.svelte +6 -6
- package/dist/components/VersionDiffViewer.svelte +38 -38
- package/dist/components/VirtualTable.svelte +9 -9
- package/dist/components/Watermark.svelte +2 -2
- package/dist/components/account/CompanyProfilePage.svelte +4 -4
- package/dist/components/account/GetStartedPage.svelte +19 -19
- package/dist/components/account/ImportMembersPage.svelte +42 -42
- package/dist/components/account/MembersStarterPage.svelte +18 -18
- package/dist/components/account/SecurityLogPage.svelte +1 -1
- package/dist/components/account/SettingsEnterprisePage.svelte +7 -7
- package/dist/components/account/SettingsPlainPage.svelte +3 -3
- package/dist/components/account/SettingsSidebarPage.svelte +5 -5
- package/dist/components/account/TeamMembersPage.svelte +2 -2
- package/dist/components/account/UserProfilePage.svelte +3 -3
- package/dist/components/buttons/CloneButton.svelte +2 -2
- package/dist/components/buttons/CreateButton.svelte +2 -2
- package/dist/components/buttons/DeleteButton.svelte +4 -4
- package/dist/components/buttons/EditButton.svelte +2 -2
- package/dist/components/buttons/ExportButton.svelte +2 -2
- package/dist/components/buttons/ImportButton.svelte +3 -3
- package/dist/components/buttons/ListButton.svelte +2 -2
- package/dist/components/buttons/RefreshButton.svelte +2 -2
- package/dist/components/buttons/SaveButton.svelte +3 -3
- package/dist/components/buttons/ShowButton.svelte +2 -2
- package/dist/components/charts/BarChart.svelte +3 -3
- package/dist/components/charts/LineChart.svelte +3 -3
- package/dist/components/charts/PieChart.svelte +7 -7
- package/dist/components/content/ApiKeyList.svelte +12 -12
- package/dist/components/content/AuditTimeline.svelte +18 -18
- package/dist/components/content/ContentPageHeader.svelte +9 -9
- package/dist/components/content/ContentPageShell.svelte +2 -2
- package/dist/components/content/DataState.svelte +8 -8
- package/dist/components/content/DescriptionList.svelte +25 -25
- package/dist/components/content/FeedbackNotice.svelte +11 -11
- package/dist/components/content/FileList.svelte +2 -2
- package/dist/components/content/FilterToolbar.svelte +15 -15
- package/dist/components/content/ImportDropzone.svelte +6 -6
- package/dist/components/content/IntegrationCard.svelte +4 -4
- package/dist/components/content/MediaThumbnail.svelte +16 -16
- package/dist/components/content/MemberList.svelte +2 -2
- package/dist/components/content/MetricBlock.svelte +7 -7
- package/dist/components/content/NetworkTable.svelte +1 -1
- package/dist/components/content/NetworkUserCard.svelte +12 -12
- package/dist/components/content/OtpInput.svelte +2 -2
- package/dist/components/content/PageToolbar.svelte +3 -3
- package/dist/components/content/ProjectCard.svelte +11 -11
- package/dist/components/content/SectionHeader.svelte +5 -5
- package/dist/components/content/SecurityEventTable.svelte +2 -2
- package/dist/components/content/SettingsFieldRow.svelte +5 -5
- package/dist/components/content/SettingsGroup.svelte +7 -7
- package/dist/components/content/StatusBadge.svelte +6 -6
- package/dist/components/content/StatusTabs.svelte +28 -28
- package/dist/components/content/SystemErrorState.svelte +2 -2
- package/dist/components/content/TeamCard.svelte +6 -6
- package/dist/components/content/TwoFactorStepper.svelte +3 -3
- package/dist/components/content/WorkspaceActionBar.svelte +12 -12
- package/dist/components/content/WorkspaceInspector.svelte +11 -11
- package/dist/components/content/WorkspaceLayout.svelte +5 -5
- package/dist/components/content/WorkspaceSplitPane.svelte +4 -4
- package/dist/components/content/WorkspaceStageStepper.svelte +16 -16
- package/dist/components/content/WorkspaceTabBar.svelte +16 -16
- package/dist/components/fields/ArrayField.svelte +12 -12
- package/dist/components/fields/AvatarField.svelte +15 -15
- package/dist/components/fields/BooleanField.svelte +14 -14
- package/dist/components/fields/CodeField.svelte +10 -10
- package/dist/components/fields/CopyField.svelte +6 -6
- package/dist/components/fields/CurrencyField.svelte +6 -6
- package/dist/components/fields/DateField.svelte +1 -1
- package/dist/components/fields/DateRangeField.svelte +2 -2
- package/dist/components/fields/EmailField.svelte +2 -2
- package/dist/components/fields/FileField.svelte +3 -3
- package/dist/components/fields/ImageField.svelte +1 -1
- package/dist/components/fields/JsonField.svelte +11 -11
- package/dist/components/fields/MarkdownField.svelte +2 -2
- package/dist/components/fields/MultiSelectField.svelte +3 -3
- package/dist/components/fields/NumberField.svelte +1 -1
- package/dist/components/fields/PercentField.svelte +9 -9
- package/dist/components/fields/PhoneField.svelte +8 -8
- package/dist/components/fields/RatingField.svelte +10 -10
- package/dist/components/fields/RelationField.svelte +3 -3
- package/dist/components/fields/RichTextField.svelte +4 -4
- package/dist/components/fields/TagField.svelte +11 -11
- package/dist/components/fields/TextField.svelte +2 -2
- package/dist/components/fields/UrlField.svelte +3 -3
- package/dist/components/network/TeamCrewTablePage.svelte +2 -2
- package/dist/components/network/UserCardsNFTPage.svelte +1 -1
- package/dist/components/profile/ActivityTimeline.svelte +8 -8
- package/dist/components/profile/ProfileCard.svelte +47 -47
- package/dist/components/profile/ProfileVariantSections.svelte +158 -158
- package/dist/components/profile/ProjectsGrid.svelte +6 -6
- package/dist/components/profile/PublicProfilePage.svelte +6 -6
- package/dist/components/profile/TeamsShowcase.svelte +3 -3
- package/dist/components/ui/alert/alert-description.svelte +1 -1
- package/dist/components/ui/alert/alert-title.svelte +1 -1
- package/dist/components/ui/alert/alert-variants.d.ts +7 -0
- package/dist/components/ui/alert/alert-variants.js +2 -0
- package/dist/components/ui/alert/alert.svelte +4 -15
- package/dist/components/ui/alert/alert.svelte.d.ts +7 -24
- package/dist/components/ui/alert-dialog/alert-dialog-content.svelte +2 -2
- package/dist/components/ui/alert-dialog/alert-dialog-description.svelte +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog-footer.svelte +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog-header.svelte +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog-overlay.svelte +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog-title.svelte +1 -1
- package/dist/components/ui/avatar/avatar-variants.d.ts +7 -0
- package/dist/components/ui/avatar/avatar-variants.js +2 -0
- package/dist/components/ui/avatar/avatar.svelte +11 -20
- package/dist/components/ui/avatar/avatar.svelte.d.ts +12 -28
- package/dist/components/ui/badge/badge-variants.d.ts +7 -0
- package/dist/components/ui/badge/badge-variants.js +2 -0
- package/dist/components/ui/badge/badge.svelte +4 -24
- package/dist/components/ui/badge/badge.svelte.d.ts +7 -45
- package/dist/components/ui/breadcrumb/breadcrumb-ellipsis.svelte +3 -3
- package/dist/components/ui/breadcrumb/breadcrumb-item.svelte +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb-link.svelte +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb-list.svelte +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb-page.svelte +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb-separator.svelte +2 -2
- package/dist/components/ui/button/button-variants.d.ts +9 -0
- package/dist/components/ui/button/button-variants.js +3 -0
- package/dist/components/ui/button/button.svelte +12 -31
- package/dist/components/ui/button/button.svelte.d.ts +9 -61
- package/dist/components/ui/card/card-action.svelte +1 -4
- package/dist/components/ui/card/card-content.svelte +1 -1
- package/dist/components/ui/card/card-description.svelte +1 -1
- package/dist/components/ui/card/card-footer.svelte +1 -1
- package/dist/components/ui/card/card-header.svelte +1 -4
- package/dist/components/ui/card/card-title.svelte +1 -1
- package/dist/components/ui/card/card.svelte +1 -1
- package/dist/components/ui/checkbox/checkbox.svelte +2 -5
- package/dist/components/ui/command/command-dialog.svelte +3 -3
- package/dist/components/ui/command/command-empty.svelte +1 -1
- package/dist/components/ui/command/command-group.svelte +2 -2
- package/dist/components/ui/command/command-input.svelte +1 -4
- package/dist/components/ui/command/command-item.svelte +1 -4
- package/dist/components/ui/command/command-list.svelte +1 -1
- package/dist/components/ui/command/command-separator.svelte +1 -1
- package/dist/components/ui/command/command.svelte +1 -4
- package/dist/components/ui/dialog/dialog-content.svelte +3 -3
- package/dist/components/ui/dialog/dialog-description.svelte +1 -1
- package/dist/components/ui/dialog/dialog-footer.svelte +1 -1
- package/dist/components/ui/dialog/dialog-header.svelte +1 -1
- package/dist/components/ui/dialog/dialog-overlay.svelte +1 -1
- package/dist/components/ui/dialog/dialog-title.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +2 -5
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +1 -6
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +3 -9
- package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.svelte +1 -1
- package/dist/components/ui/input/input.svelte +3 -2
- package/dist/components/ui/label/label.svelte +1 -4
- package/dist/components/ui/navigation-menu/navigation-menu-content.svelte +1 -5
- package/dist/components/ui/navigation-menu/navigation-menu-indicator.svelte +2 -5
- package/dist/components/ui/navigation-menu/navigation-menu-item.svelte +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu-link.svelte +1 -4
- package/dist/components/ui/navigation-menu/navigation-menu-list.svelte +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu-trigger.svelte +2 -5
- package/dist/components/ui/navigation-menu/navigation-menu-viewport.svelte +2 -5
- package/dist/components/ui/navigation-menu/navigation-menu.svelte +1 -1
- package/dist/components/ui/pagination/pagination-content.svelte +1 -1
- package/dist/components/ui/pagination/pagination-ellipsis.svelte +3 -3
- package/dist/components/ui/pagination/pagination-link.svelte +3 -0
- package/dist/components/ui/pagination/pagination-next.svelte +5 -2
- package/dist/components/ui/pagination/pagination-previous.svelte +5 -2
- package/dist/components/ui/pagination/pagination.svelte +1 -1
- package/dist/components/ui/popover/popover-content.svelte +1 -4
- package/dist/components/ui/progress/progress.svelte +2 -2
- package/dist/components/ui/scroll-area/scroll-area.svelte +3 -4
- package/dist/components/ui/select/select.svelte +1 -2
- package/dist/components/ui/separator/separator.svelte +1 -6
- package/dist/components/ui/sheet/sheet-content.svelte +1 -4
- package/dist/components/ui/sheet/sheet-description.svelte +1 -1
- package/dist/components/ui/sheet/sheet-footer.svelte +1 -1
- package/dist/components/ui/sheet/sheet-header.svelte +1 -1
- package/dist/components/ui/sheet/sheet-title.svelte +1 -1
- package/dist/components/ui/sheet/sheet.svelte +5 -10
- package/dist/components/ui/skeleton/skeleton.svelte +1 -1
- package/dist/components/ui/switch/switch.svelte +2 -9
- package/dist/components/ui/table/table-caption.svelte +1 -1
- package/dist/components/ui/table/table-cell.svelte +8 -11
- package/dist/components/ui/table/table-footer.svelte +1 -1
- package/dist/components/ui/table/table-head.svelte +1 -11
- package/dist/components/ui/table/table-header.svelte +1 -1
- package/dist/components/ui/table/table-row.svelte +2 -2
- package/dist/components/ui/table/table-row.svelte.d.ts +1 -1
- package/dist/components/ui/table/table.svelte +2 -2
- package/dist/components/ui/tabs/tabs-content.svelte +1 -1
- package/dist/components/ui/tabs/tabs-list.svelte +1 -4
- package/dist/components/ui/tabs/tabs-trigger.svelte +1 -7
- package/dist/components/ui/tabs/tabs.svelte +1 -1
- package/dist/components/ui/textarea/textarea.svelte +1 -4
- package/dist/components/ui/tooltip/tooltip-content.svelte +1 -1
- package/dist/page-chrome.css +228 -0
- package/package.json +13 -8
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
<ContentPageShell {pageId} width="wide">
|
|
38
38
|
<ContentPageHeader title={profileData.name} eyebrow={i18n.t('publicProfile.title')} description={profileData.tagline} />
|
|
39
39
|
{#if showSections}
|
|
40
|
-
<div class="
|
|
40
|
+
<div class="svadmin-u-f3c543ad5fe9 svadmin-u-0d304f904cb0 svadmin-u-bf1b5b54929e"><ProfileCard {...profileData} {variant} /><ProfileVariantSections {variant} /></div>
|
|
41
41
|
{:else if initialTab === 'projects'}
|
|
42
|
-
<div class="
|
|
43
|
-
<div class={columns === 2 ? '
|
|
42
|
+
<div class="svadmin-u-60fbb7713999 svadmin-u-1eb5c6df38c1 svadmin-u-3960ffc248d9 svadmin-u-8ef2268efbbc svadmin-u-1004c0c3954c svadmin-u-8b8196092091 svadmin-u-18049387f0af svadmin-u-1b2d54a3fd12"><div class="svadmin-u-60fbb7713999 svadmin-u-3960ffc248d9 svadmin-u-77a2a20e90d4"><Badge variant="outline">{columns} {columnLabel}</Badge><span class="svadmin-u-fc7473ca09eb svadmin-u-bfa603190748">{visibleProjects.length} {i18n.t('publicProfile.projects')}</span></div><div class="svadmin-u-60fbb7713999 svadmin-u-1004c0c3954c svadmin-u-fc7473ca09eb"><a class="svadmin-u-20aaf08a7ed1" href="#/public-profile/projects/2-columns">2 {columnLabel}</a><a class="svadmin-u-20aaf08a7ed1" href="#/public-profile/projects/3-columns">3 {columnLabel}</a></div></div>
|
|
43
|
+
<div class={columns === 2 ? 'svadmin-u-f3c543ad5fe9 svadmin-u-0d304f904cb0 svadmin-u-bf1b5b54929e' : 'svadmin-u-b43b4c086d9a'}>{#if columns === 2}<ProfileCard {...profileData} {variant} />{/if}<ProjectsGrid projects={visibleProjects} {columns} /></div>
|
|
44
44
|
{:else if initialTab === 'activity'}
|
|
45
|
-
<div class="
|
|
45
|
+
<div class="svadmin-u-f3c543ad5fe9 svadmin-u-0d304f904cb0 svadmin-u-bf1b5b54929e"><ProfileCard {...profileData} {variant} /><div class="svadmin-u-3e7ce58d64fa"><div class="svadmin-u-60fbb7713999 svadmin-u-3960ffc248d9 svadmin-u-8ef2268efbbc svadmin-u-65fdbade2025 svadmin-u-18049387f0af svadmin-u-7fcf9124b5df"><h2 class="svadmin-u-4ee734926ff6 svadmin-u-e83a7042bc91 svadmin-u-d4108abe6359">{i18n.t('publicProfile.activity')}</h2><Badge variant="outline">{activities.length}</Badge></div><ActivityTimeline activities={activities} /></div></div>
|
|
46
46
|
{:else}
|
|
47
|
-
<div class="
|
|
48
|
-
<div class="
|
|
47
|
+
<div class="svadmin-u-f3c543ad5fe9 svadmin-u-0c3bc98565dd svadmin-u-ab1b20c2292a">{#each profileData.stats as stat (stat.label)}<div class="svadmin-u-f57e7530965b svadmin-u-6cbc84dd9e1a svadmin-u-81976f3f2c63"><p class="svadmin-u-fc7473ca09eb svadmin-u-bfa603190748">{stat.label}</p><p class="svadmin-u-b6b02c0ebef6 svadmin-u-d5c9b0001e7e svadmin-u-e83a7042bc91 svadmin-u-d4108abe6359">{stat.value}</p></div>{/each}</div>
|
|
48
|
+
<div class="svadmin-u-f3c543ad5fe9 svadmin-u-0d304f904cb0 svadmin-u-956fcc198f22"><TeamsShowcase {teams} /><ProfileCard {...profileData} {variant} /></div>
|
|
49
49
|
{/if}
|
|
50
50
|
</ContentPageShell>
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
const filtered = $derived(query ? teams.filter((team) => `${team.name} ${team.description}`.toLowerCase().includes(query.toLowerCase())) : teams);
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
|
-
<section class="
|
|
14
|
-
<div class="
|
|
13
|
+
<section class="svadmin-u-3e7ce58d64fa">
|
|
14
|
+
<div class="svadmin-u-60fbb7713999 svadmin-u-8dddea0773ed svadmin-u-1004c0c3954c svadmin-u-020ba687fa12 svadmin-u-9f76a62f4f44 svadmin-u-3b9871a0bf93"><div><h2 class="svadmin-u-4ee734926ff6 svadmin-u-e83a7042bc91 svadmin-u-d4108abe6359">{i18n.t('publicProfile.teamsCount', { count: filtered.length })}</h2><p class="svadmin-u-b6b02c0ebef6 svadmin-u-fc7473ca09eb svadmin-u-bfa603190748">{i18n.t('publicProfile.searchTeams')}</p></div></div>
|
|
15
15
|
<FilterToolbar bind:query placeholder={i18n.t('publicProfile.searchTeams')} />
|
|
16
|
-
{#if filtered.length === 0}<DataState state="empty" title={i18n.t('publicProfile.noTeams')} />{:else}<div class="
|
|
16
|
+
{#if filtered.length === 0}<DataState state="empty" title={i18n.t('publicProfile.noTeams')} />{:else}<div class="svadmin-u-f3c543ad5fe9 svadmin-u-0c3bc98565dd svadmin-u-e4d6f343b9ff svadmin-u-b86f7f946cd8">{#each filtered as team (team.id)}<TeamCard {team} />{/each}</div>{/if}
|
|
17
17
|
</section>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type AlertVariant = "default" | "destructive" | "warning" | "success";
|
|
2
|
+
export declare const alertVariants: ({ variant, class: className, className: extraClassName, }?: {
|
|
3
|
+
variant?: AlertVariant | null;
|
|
4
|
+
class?: Parameters<typeof clsx>[number];
|
|
5
|
+
className?: Parameters<typeof clsx>[number];
|
|
6
|
+
}) => string;
|
|
7
|
+
import { clsx } from "cn/engine";
|
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
3
|
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
-
import {
|
|
4
|
+
import { alertVariants as variants, type AlertVariant as Variant } from "./alert-variants.js";
|
|
5
5
|
|
|
6
|
-
export const alertVariants =
|
|
7
|
-
|
|
8
|
-
variants: {
|
|
9
|
-
variant: {
|
|
10
|
-
default: "bg-card text-foreground",
|
|
11
|
-
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
|
|
12
|
-
warning: "border-warning/50 text-warning-foreground bg-warning/10 [&>svg]:text-current",
|
|
13
|
-
success: "border-success/50 text-success bg-success/10 [&>svg]:text-current",
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
defaultVariants: { variant: "default" },
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
export type AlertVariant = VariantProps<typeof alertVariants>["variant"];
|
|
6
|
+
export const alertVariants = variants;
|
|
7
|
+
export type AlertVariant = Variant;
|
|
20
8
|
</script>
|
|
21
9
|
|
|
22
10
|
<script lang="ts">
|
|
@@ -37,6 +25,7 @@
|
|
|
37
25
|
bind:this={ref}
|
|
38
26
|
data-slot="alert"
|
|
39
27
|
role="alert"
|
|
28
|
+
data-variant={variant}
|
|
40
29
|
class={cn(alertVariants({ variant }), className)}
|
|
41
30
|
{...restProps}
|
|
42
31
|
>
|
|
@@ -1,29 +1,12 @@
|
|
|
1
1
|
import { type WithElementRef } from "../../../utils.js";
|
|
2
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
-
import { type
|
|
4
|
-
export declare const alertVariants:
|
|
5
|
-
variant
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
}, undefined, "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", {
|
|
12
|
-
variant: {
|
|
13
|
-
default: "bg-card text-foreground";
|
|
14
|
-
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90";
|
|
15
|
-
warning: "border-warning/50 text-warning-foreground bg-warning/10 [&>svg]:text-current";
|
|
16
|
-
success: "border-success/50 text-success bg-success/10 [&>svg]:text-current";
|
|
17
|
-
};
|
|
18
|
-
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
19
|
-
variant: {
|
|
20
|
-
default: "bg-card text-foreground";
|
|
21
|
-
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90";
|
|
22
|
-
warning: "border-warning/50 text-warning-foreground bg-warning/10 [&>svg]:text-current";
|
|
23
|
-
success: "border-success/50 text-success bg-success/10 [&>svg]:text-current";
|
|
24
|
-
};
|
|
25
|
-
}, undefined>>;
|
|
26
|
-
export type AlertVariant = VariantProps<typeof alertVariants>["variant"];
|
|
3
|
+
import { type AlertVariant as Variant } from "./alert-variants.js";
|
|
4
|
+
export declare const alertVariants: ({ variant, class: className, className: extraClassName, }?: {
|
|
5
|
+
variant?: Variant | null;
|
|
6
|
+
class?: Parameters<(...inputs: import("cn").ClassValue[]) => string>[number];
|
|
7
|
+
className?: Parameters<(...inputs: import("cn").ClassValue[]) => string>[number];
|
|
8
|
+
}) => string;
|
|
9
|
+
export type AlertVariant = Variant;
|
|
27
10
|
type Props = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
28
11
|
variant?: AlertVariant;
|
|
29
12
|
};
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
|
|
15
15
|
<AlertDialogPrimitive.Portal>
|
|
16
16
|
<AlertDialogPrimitive.Overlay
|
|
17
|
-
class="
|
|
17
|
+
class="svadmin-alert-dialog-overlay"
|
|
18
18
|
/>
|
|
19
19
|
<AlertDialogPrimitive.Content
|
|
20
20
|
bind:ref
|
|
21
21
|
class={cn(
|
|
22
|
-
"
|
|
22
|
+
"svadmin-alert-dialog-content",
|
|
23
23
|
className,
|
|
24
24
|
)}
|
|
25
25
|
{...restProps}
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
let { class: className, children, ...restProps }: HTMLAttributes<HTMLDivElement> & { children?: Snippet } = $props();
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
|
-
<div class={cn("
|
|
9
|
+
<div class={cn("svadmin-alert-dialog-footer", className)} {...restProps}>
|
|
10
10
|
{@render children?.()}
|
|
11
11
|
</div>
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
let { class: className, children, ...restProps }: HTMLAttributes<HTMLDivElement> & { children?: Snippet } = $props();
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
|
-
<div class={cn("
|
|
9
|
+
<div class={cn("svadmin-alert-dialog-header", className)} {...restProps}>
|
|
10
10
|
{@render children?.()}
|
|
11
11
|
</div>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type AvatarSize = "default" | "sm" | "lg" | "xl";
|
|
2
|
+
export declare const avatarVariants: ({ size, class: className, className: extraClassName, }?: {
|
|
3
|
+
size?: AvatarSize | null;
|
|
4
|
+
class?: Parameters<typeof clsx>[number];
|
|
5
|
+
className?: Parameters<typeof clsx>[number];
|
|
6
|
+
}) => string;
|
|
7
|
+
import { clsx } from "cn/engine";
|
|
@@ -1,23 +1,13 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import { avatarVariants as variants, type AvatarSize as Size } from "./avatar-variants.js";
|
|
3
|
+
|
|
4
|
+
export const avatarVariants = variants;
|
|
5
|
+
export type AvatarSize = Size;
|
|
6
|
+
</script>
|
|
7
|
+
|
|
1
8
|
<script lang="ts">
|
|
2
9
|
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
10
|
import type { HTMLImgAttributes } from "svelte/elements";
|
|
4
|
-
import { type VariantProps, tv } from "tailwind-variants";
|
|
5
|
-
|
|
6
|
-
export const avatarVariants = tv({
|
|
7
|
-
base: "relative flex shrink-0 overflow-hidden rounded-full",
|
|
8
|
-
variants: {
|
|
9
|
-
size: {
|
|
10
|
-
default: "size-10",
|
|
11
|
-
sm: "size-8",
|
|
12
|
-
lg: "size-12",
|
|
13
|
-
xl: "size-16",
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
defaultVariants: { size: "default" },
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
// AvatarSize type is exported from the package index.ts
|
|
20
|
-
type AvatarSize = VariantProps<typeof avatarVariants>["size"];
|
|
21
11
|
|
|
22
12
|
type Props = WithElementRef<HTMLImgAttributes, HTMLImageElement> & {
|
|
23
13
|
size?: AvatarSize;
|
|
@@ -38,13 +28,13 @@
|
|
|
38
28
|
</script>
|
|
39
29
|
|
|
40
30
|
{#if src && !imgError}
|
|
41
|
-
<span class={cn(avatarVariants({ size }), className)}>
|
|
31
|
+
<span data-size={size} class={cn(avatarVariants({ size }), className)}>
|
|
42
32
|
<img
|
|
43
33
|
bind:this={ref}
|
|
44
34
|
data-slot="avatar"
|
|
45
35
|
{src}
|
|
46
36
|
{alt}
|
|
47
|
-
class="
|
|
37
|
+
class="svadmin-avatar-image"
|
|
48
38
|
onerror={() => { imgError = true; }}
|
|
49
39
|
{...restProps}
|
|
50
40
|
/>
|
|
@@ -52,9 +42,10 @@
|
|
|
52
42
|
{:else}
|
|
53
43
|
<span
|
|
54
44
|
data-slot="avatar-fallback"
|
|
45
|
+
data-size={size}
|
|
55
46
|
class={cn(
|
|
56
47
|
avatarVariants({ size }),
|
|
57
|
-
"
|
|
48
|
+
"svadmin-avatar-fallback",
|
|
58
49
|
className
|
|
59
50
|
)}
|
|
60
51
|
>
|
|
@@ -1,32 +1,16 @@
|
|
|
1
|
+
import { type AvatarSize as Size } from "./avatar-variants.js";
|
|
2
|
+
export declare const avatarVariants: ({ size, class: className, className: extraClassName, }?: {
|
|
3
|
+
size?: Size | null;
|
|
4
|
+
class?: Parameters<(...inputs: import("cn").ClassValue[]) => string>[number];
|
|
5
|
+
className?: Parameters<(...inputs: import("cn").ClassValue[]) => string>[number];
|
|
6
|
+
}) => string;
|
|
7
|
+
export type AvatarSize = Size;
|
|
8
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
1
9
|
import type { HTMLImgAttributes } from "svelte/elements";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} & {
|
|
5
|
-
size?: "default" | "sm" | "lg" | "xl" | undefined;
|
|
10
|
+
type Props = WithElementRef<HTMLImgAttributes, HTMLImageElement> & {
|
|
11
|
+
size?: AvatarSize;
|
|
6
12
|
fallback?: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
size: {
|
|
10
|
-
default: "size-10";
|
|
11
|
-
sm: "size-8";
|
|
12
|
-
lg: "size-12";
|
|
13
|
-
xl: "size-16";
|
|
14
|
-
};
|
|
15
|
-
}, undefined, "relative flex shrink-0 overflow-hidden rounded-full", {
|
|
16
|
-
size: {
|
|
17
|
-
default: "size-10";
|
|
18
|
-
sm: "size-8";
|
|
19
|
-
lg: "size-12";
|
|
20
|
-
xl: "size-16";
|
|
21
|
-
};
|
|
22
|
-
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
23
|
-
size: {
|
|
24
|
-
default: "size-10";
|
|
25
|
-
sm: "size-8";
|
|
26
|
-
lg: "size-12";
|
|
27
|
-
xl: "size-16";
|
|
28
|
-
};
|
|
29
|
-
}, undefined>>;
|
|
30
|
-
}, "ref">;
|
|
13
|
+
};
|
|
14
|
+
declare const Avatar: import("svelte").Component<Props, {}, "ref">;
|
|
31
15
|
type Avatar = ReturnType<typeof Avatar>;
|
|
32
16
|
export default Avatar;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type BadgeVariant = "default" | "secondary" | "destructive" | "subtle" | "subtle-success" | "subtle-warning" | "subtle-destructive" | "subtle-pill" | "outline" | "ghost" | "link";
|
|
2
|
+
export declare const badgeVariants: ({ variant, class: className, className: extraClassName, }?: {
|
|
3
|
+
variant?: BadgeVariant | null;
|
|
4
|
+
class?: Parameters<typeof clsx>[number];
|
|
5
|
+
className?: Parameters<typeof clsx>[number];
|
|
6
|
+
}) => string;
|
|
7
|
+
import { clsx } from "cn/engine";
|
|
@@ -1,29 +1,8 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
-
import {
|
|
2
|
+
import { badgeVariants as variants, type BadgeVariant as Variant } from "./badge-variants.js";
|
|
3
3
|
|
|
4
|
-
export const badgeVariants =
|
|
5
|
-
|
|
6
|
-
variants: {
|
|
7
|
-
variant: {
|
|
8
|
-
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
9
|
-
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
10
|
-
destructive: "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20",
|
|
11
|
-
subtle: "bg-primary/10 text-primary border-primary/20 [a]:hover:bg-primary/15",
|
|
12
|
-
"subtle-success": "bg-success/10 text-success border-success/20 [a]:hover:bg-success/15",
|
|
13
|
-
"subtle-warning": "bg-warning/10 text-warning border-warning/20 [a]:hover:bg-warning/15",
|
|
14
|
-
"subtle-destructive": "bg-destructive/10 text-destructive border-destructive/20 [a]:hover:bg-destructive/15",
|
|
15
|
-
"subtle-pill": "rounded-full bg-muted/70 text-muted-foreground border-border/80 font-medium",
|
|
16
|
-
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
17
|
-
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
18
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
defaultVariants: {
|
|
22
|
-
variant: "default",
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export type BadgeVariant = VariantProps<typeof badgeVariants>["variant"];
|
|
4
|
+
export const badgeVariants = variants;
|
|
5
|
+
export type BadgeVariant = Variant;
|
|
27
6
|
</script>
|
|
28
7
|
|
|
29
8
|
<script lang="ts">
|
|
@@ -46,6 +25,7 @@
|
|
|
46
25
|
this={href ? "a" : "span"}
|
|
47
26
|
bind:this={ref}
|
|
48
27
|
data-slot="badge"
|
|
28
|
+
data-variant={variant}
|
|
49
29
|
{href}
|
|
50
30
|
class={cn(badgeVariants({ variant }), className)}
|
|
51
31
|
{...restProps}
|
|
@@ -1,48 +1,10 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare const badgeVariants:
|
|
3
|
-
variant
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"subtle-success": "bg-success/10 text-success border-success/20 [a]:hover:bg-success/15";
|
|
9
|
-
"subtle-warning": "bg-warning/10 text-warning border-warning/20 [a]:hover:bg-warning/15";
|
|
10
|
-
"subtle-destructive": "bg-destructive/10 text-destructive border-destructive/20 [a]:hover:bg-destructive/15";
|
|
11
|
-
"subtle-pill": "rounded-full bg-muted/70 text-muted-foreground border-border/80 font-medium";
|
|
12
|
-
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground";
|
|
13
|
-
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50";
|
|
14
|
-
link: "text-primary underline-offset-4 hover:underline";
|
|
15
|
-
};
|
|
16
|
-
}, undefined, "h-5 gap-1 rounded-[min(var(--radius-sm),10px)] border border-transparent px-2.5 py-0.5 text-xs font-semibold transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap transition-colors focus-visible:ring-[3px] [&>svg]:pointer-events-none", {
|
|
17
|
-
variant: {
|
|
18
|
-
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80";
|
|
19
|
-
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80";
|
|
20
|
-
destructive: "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20";
|
|
21
|
-
subtle: "bg-primary/10 text-primary border-primary/20 [a]:hover:bg-primary/15";
|
|
22
|
-
"subtle-success": "bg-success/10 text-success border-success/20 [a]:hover:bg-success/15";
|
|
23
|
-
"subtle-warning": "bg-warning/10 text-warning border-warning/20 [a]:hover:bg-warning/15";
|
|
24
|
-
"subtle-destructive": "bg-destructive/10 text-destructive border-destructive/20 [a]:hover:bg-destructive/15";
|
|
25
|
-
"subtle-pill": "rounded-full bg-muted/70 text-muted-foreground border-border/80 font-medium";
|
|
26
|
-
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground";
|
|
27
|
-
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50";
|
|
28
|
-
link: "text-primary underline-offset-4 hover:underline";
|
|
29
|
-
};
|
|
30
|
-
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
31
|
-
variant: {
|
|
32
|
-
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80";
|
|
33
|
-
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80";
|
|
34
|
-
destructive: "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20";
|
|
35
|
-
subtle: "bg-primary/10 text-primary border-primary/20 [a]:hover:bg-primary/15";
|
|
36
|
-
"subtle-success": "bg-success/10 text-success border-success/20 [a]:hover:bg-success/15";
|
|
37
|
-
"subtle-warning": "bg-warning/10 text-warning border-warning/20 [a]:hover:bg-warning/15";
|
|
38
|
-
"subtle-destructive": "bg-destructive/10 text-destructive border-destructive/20 [a]:hover:bg-destructive/15";
|
|
39
|
-
"subtle-pill": "rounded-full bg-muted/70 text-muted-foreground border-border/80 font-medium";
|
|
40
|
-
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground";
|
|
41
|
-
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50";
|
|
42
|
-
link: "text-primary underline-offset-4 hover:underline";
|
|
43
|
-
};
|
|
44
|
-
}, undefined>>;
|
|
45
|
-
export type BadgeVariant = VariantProps<typeof badgeVariants>["variant"];
|
|
1
|
+
import { type BadgeVariant as Variant } from "./badge-variants.js";
|
|
2
|
+
export declare const badgeVariants: ({ variant, class: className, className: extraClassName, }?: {
|
|
3
|
+
variant?: Variant | null;
|
|
4
|
+
class?: Parameters<(...inputs: import("cn").ClassValue[]) => string>[number];
|
|
5
|
+
className?: Parameters<(...inputs: import("cn").ClassValue[]) => string>[number];
|
|
6
|
+
}) => string;
|
|
7
|
+
export type BadgeVariant = Variant;
|
|
46
8
|
import type { HTMLAnchorAttributes } from "svelte/elements";
|
|
47
9
|
import { type WithElementRef } from "../../../utils.js";
|
|
48
10
|
type $$ComponentProps = WithElementRef<HTMLAnchorAttributes> & {
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
role="presentation"
|
|
11
11
|
aria-hidden="true"
|
|
12
12
|
data-slot="breadcrumb-ellipsis"
|
|
13
|
-
class={cn("
|
|
13
|
+
class={cn("svadmin-breadcrumb-ellipsis", className)}
|
|
14
14
|
{...restProps}
|
|
15
15
|
>
|
|
16
|
-
<Ellipsis class="
|
|
17
|
-
<span class="sr-only">More</span>
|
|
16
|
+
<Ellipsis class="svadmin-breadcrumb-icon" />
|
|
17
|
+
<span class="svadmin-sr-only">More</span>
|
|
18
18
|
</span>
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
role="presentation"
|
|
12
12
|
aria-hidden="true"
|
|
13
13
|
data-slot="breadcrumb-separator"
|
|
14
|
-
class={cn("
|
|
14
|
+
class={cn("svadmin-breadcrumb-separator", className)}
|
|
15
15
|
{...restProps}
|
|
16
16
|
>
|
|
17
17
|
{#if children}
|
|
18
18
|
{@render children()}
|
|
19
19
|
{:else}
|
|
20
|
-
<ChevronRight />
|
|
20
|
+
<ChevronRight class="svadmin-breadcrumb-icon" />
|
|
21
21
|
{/if}
|
|
22
22
|
</li>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ButtonVariant = "default" | "outline" | "secondary" | "ghost" | "destructive" | "link";
|
|
2
|
+
export type ButtonSize = "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg";
|
|
3
|
+
export declare const buttonVariants: ({ variant, size, class: className, className: extraClassName, }?: {
|
|
4
|
+
variant?: ButtonVariant | null;
|
|
5
|
+
size?: ButtonSize | null;
|
|
6
|
+
class?: Parameters<typeof clsx>[number];
|
|
7
|
+
className?: Parameters<typeof clsx>[number];
|
|
8
|
+
}) => string;
|
|
9
|
+
import { clsx } from "cn/engine";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// Keep the public helper for composition, while styles are owned by app.css.
|
|
2
|
+
export const buttonVariants = ({ variant = "default", size = "default", class: className = "", className: extraClassName = "", } = {}) => clsx("svadmin-button", variant && `svadmin-button--${variant}`, size && `svadmin-button-size--${size}`, className, extraClassName);
|
|
3
|
+
import { clsx } from "cn/engine";
|
|
@@ -1,38 +1,15 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
3
|
import type { HTMLAnchorAttributes, HTMLButtonAttributes } from "svelte/elements";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
buttonVariants as variants,
|
|
6
|
+
type ButtonSize as Size,
|
|
7
|
+
type ButtonVariant as Variant,
|
|
8
|
+
} from "./button-variants.js";
|
|
5
9
|
|
|
6
|
-
export const buttonVariants =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
variant: {
|
|
10
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
11
|
-
outline: "border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
12
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
13
|
-
ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
14
|
-
destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",
|
|
15
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
16
|
-
},
|
|
17
|
-
size: {
|
|
18
|
-
default: "h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",
|
|
19
|
-
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
20
|
-
sm: "h-8 gap-1 rounded-[min(var(--radius-md),12px)] px-3 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3.5",
|
|
21
|
-
lg: "h-10 gap-2 px-4 has-data-[icon=inline-end]:pr-3.5 has-data-[icon=inline-start]:pl-3.5",
|
|
22
|
-
icon: "size-9",
|
|
23
|
-
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
24
|
-
"icon-sm": "size-8 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
25
|
-
"icon-lg": "size-10",
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
defaultVariants: {
|
|
29
|
-
variant: "default",
|
|
30
|
-
size: "default",
|
|
31
|
-
},
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
export type ButtonVariant = VariantProps<typeof buttonVariants>["variant"];
|
|
35
|
-
export type ButtonSize = VariantProps<typeof buttonVariants>["size"];
|
|
10
|
+
export const buttonVariants = variants;
|
|
11
|
+
export type ButtonSize = Size;
|
|
12
|
+
export type ButtonVariant = Variant;
|
|
36
13
|
|
|
37
14
|
export type ButtonProps = WithElementRef<HTMLButtonAttributes, HTMLButtonElement> &
|
|
38
15
|
WithElementRef<HTMLAnchorAttributes, HTMLAnchorElement> & {
|
|
@@ -68,6 +45,8 @@
|
|
|
68
45
|
<a
|
|
69
46
|
bind:this={anchorRef}
|
|
70
47
|
data-slot="button"
|
|
48
|
+
data-variant={variant}
|
|
49
|
+
data-size={size}
|
|
71
50
|
class={cn(buttonVariants({ variant, size }), className)}
|
|
72
51
|
href={disabled ? undefined : href}
|
|
73
52
|
aria-disabled={disabled}
|
|
@@ -81,6 +60,8 @@
|
|
|
81
60
|
<button
|
|
82
61
|
bind:this={buttonRef}
|
|
83
62
|
data-slot="button"
|
|
63
|
+
data-variant={variant}
|
|
64
|
+
data-size={size}
|
|
84
65
|
class={cn(buttonVariants({ variant, size }), className)}
|
|
85
66
|
{type}
|
|
86
67
|
{disabled}
|