@sakoa/ui 0.1.0
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 +171 -0
- package/dist/App.d.ts +2 -0
- package/dist/cli/index.js +9243 -0
- package/dist/components/DemoSection.d.ts +30 -0
- package/dist/components/SApiKeyboard.d.ts +22 -0
- package/dist/components/SApiSection.d.ts +21 -0
- package/dist/components/SApiTable.d.ts +46 -0
- package/dist/components/STableOfContents.d.ts +2 -0
- package/dist/components/ui/SAlert.d.ts +76 -0
- package/dist/components/ui/SBadge.d.ts +56 -0
- package/dist/components/ui/SButton.d.ts +67 -0
- package/dist/components/ui/SCheckbox.d.ts +64 -0
- package/dist/components/ui/SChip.d.ts +43 -0
- package/dist/components/ui/SDatePicker.d.ts +77 -0
- package/dist/components/ui/SGlassButton.d.ts +70 -0
- package/dist/components/ui/SIcon.d.ts +29 -0
- package/dist/components/ui/SInput.d.ts +129 -0
- package/dist/components/ui/SKbd.d.ts +24 -0
- package/dist/components/ui/SKbdShortcut.d.ts +14 -0
- package/dist/components/ui/SSelect.d.ts +148 -0
- package/dist/components/ui/SSkeleton.d.ts +37 -0
- package/dist/components/ui/SSwitch.d.ts +61 -0
- package/dist/components/ui/STooltip.d.ts +82 -0
- package/dist/components/ui/accordion/SAccordionContent.d.ts +23 -0
- package/dist/components/ui/accordion/SAccordionItem.d.ts +70 -0
- package/dist/components/ui/accordion/SAccordionTrigger.d.ts +37 -0
- package/dist/components/ui/accordion/index.d.ts +4 -0
- package/dist/components/ui/avatar/SAvatar.d.ts +36 -0
- package/dist/components/ui/avatar/SAvatarFallback.d.ts +26 -0
- package/dist/components/ui/avatar/SAvatarGroup.d.ts +30 -0
- package/dist/components/ui/avatar/SAvatarImage.d.ts +23 -0
- package/dist/components/ui/avatar/index.d.ts +4 -0
- package/dist/components/ui/breadcrumb/SBreadcrumb.d.ts +22 -0
- package/dist/components/ui/breadcrumb/SBreadcrumbEllipsis.d.ts +17 -0
- package/dist/components/ui/breadcrumb/SBreadcrumbItem.d.ts +17 -0
- package/dist/components/ui/breadcrumb/SBreadcrumbLink.d.ts +26 -0
- package/dist/components/ui/breadcrumb/SBreadcrumbList.d.ts +17 -0
- package/dist/components/ui/breadcrumb/SBreadcrumbPage.d.ts +17 -0
- package/dist/components/ui/breadcrumb/SBreadcrumbSeparator.d.ts +17 -0
- package/dist/components/ui/breadcrumb/index.d.ts +7 -0
- package/dist/components/ui/card/SCard.d.ts +103 -0
- package/dist/components/ui/card/SCardActions.d.ts +44 -0
- package/dist/components/ui/card/SCardContent.d.ts +35 -0
- package/dist/components/ui/card/SCardFooter.d.ts +38 -0
- package/dist/components/ui/card/SCardHeader.d.ts +53 -0
- package/dist/components/ui/card/SCardMedia.d.ts +83 -0
- package/dist/components/ui/card/SGlassCard.d.ts +103 -0
- package/dist/components/ui/card/SMorphingCardContent.d.ts +18 -0
- package/dist/components/ui/card/index.d.ts +24 -0
- package/dist/components/ui/carousel/SCarousel.d.ts +166 -0
- package/dist/components/ui/carousel/index.d.ts +2 -0
- package/dist/components/ui/color-picker/SColorPickerAlphaSlider.d.ts +4 -0
- package/dist/components/ui/color-picker/SColorPickerCopy.d.ts +19 -0
- package/dist/components/ui/color-picker/SColorPickerEyeDropper.d.ts +17 -0
- package/dist/components/ui/color-picker/SColorPickerHueSlider.d.ts +4 -0
- package/dist/components/ui/color-picker/SColorPickerInputs.d.ts +2 -0
- package/dist/components/ui/color-picker/SColorPickerPresets.d.ts +9 -0
- package/dist/components/ui/color-picker/SColorPickerPreview.d.ts +2 -0
- package/dist/components/ui/color-picker/SColorPickerRecent.d.ts +7 -0
- package/dist/components/ui/color-picker/SColorPickerSpectrum.d.ts +4 -0
- package/dist/components/ui/color-picker/index.d.ts +11 -0
- package/dist/components/ui/drawer/index.d.ts +11 -0
- package/dist/components/ui/dropdown/SDropdownDivider.d.ts +8 -0
- package/dist/components/ui/dropdown/SDropdownGroup.d.ts +25 -0
- package/dist/components/ui/dropdown/SDropdownItem.d.ts +56 -0
- package/dist/components/ui/dropdown/index.d.ts +4 -0
- package/dist/components/ui/form/SForm.d.ts +38 -0
- package/dist/components/ui/form/SFormField.d.ts +31 -0
- package/dist/components/ui/form/index.d.ts +5 -0
- package/dist/components/ui/modal/index.d.ts +19 -0
- package/dist/components/ui/option/SOption.d.ts +32 -0
- package/dist/components/ui/option/SOptionGroup.d.ts +28 -0
- package/dist/components/ui/option/index.d.ts +2 -0
- package/dist/components/ui/otp/SOTP.d.ts +122 -0
- package/dist/components/ui/otp/SOTPGroup.d.ts +23 -0
- package/dist/components/ui/otp/SOTPSeparator.d.ts +17 -0
- package/dist/components/ui/otp/SOTPSlot.d.ts +49 -0
- package/dist/components/ui/otp/index.d.ts +7 -0
- package/dist/components/ui/otp/types.d.ts +26 -0
- package/dist/components/ui/otp/useOTPContext.d.ts +42 -0
- package/dist/components/ui/pagination/SPagination.d.ts +151 -0
- package/dist/components/ui/pagination/index.d.ts +2 -0
- package/dist/components/ui/progress/SProgress.d.ts +62 -0
- package/dist/components/ui/progress/SProgressRange.d.ts +91 -0
- package/dist/components/ui/progress/index.d.ts +4 -0
- package/dist/components/ui/radio/SRadio.d.ts +58 -0
- package/dist/components/ui/radio/SRadioGroup.d.ts +52 -0
- package/dist/components/ui/radio/index.d.ts +2 -0
- package/dist/components/ui/stepper/SStepper.d.ts +83 -0
- package/dist/components/ui/stepper/SStepperContent.d.ts +24 -0
- package/dist/components/ui/stepper/SStepperDescription.d.ts +20 -0
- package/dist/components/ui/stepper/SStepperIndicator.d.ts +37 -0
- package/dist/components/ui/stepper/SStepperItem.d.ts +37 -0
- package/dist/components/ui/stepper/SStepperSeparator.d.ts +5 -0
- package/dist/components/ui/stepper/SStepperTitle.d.ts +20 -0
- package/dist/components/ui/stepper/SStepperTrigger.d.ts +22 -0
- package/dist/components/ui/stepper/index.d.ts +11 -0
- package/dist/components/ui/table/STableBody.d.ts +27 -0
- package/dist/components/ui/table/STableCell.d.ts +55 -0
- package/dist/components/ui/table/STableColumn.d.ts +87 -0
- package/dist/components/ui/table/STableEmpty.d.ts +54 -0
- package/dist/components/ui/table/STableHeader.d.ts +25 -0
- package/dist/components/ui/table/STableRow.d.ts +38 -0
- package/dist/components/ui/table/STableSkeleton.d.ts +29 -0
- package/dist/components/ui/table/index.d.ts +98 -0
- package/dist/components/ui/table/useDataTable.d.ts +80 -0
- package/dist/components/ui/tabs/STabPane.d.ts +31 -0
- package/dist/components/ui/tabs/STabsContent.d.ts +21 -0
- package/dist/components/ui/tabs/STabsIndicator.d.ts +9 -0
- package/dist/components/ui/tabs/STabsTrigger.d.ts +28 -0
- package/dist/components/ui/tabs/index.d.ts +6 -0
- package/dist/components/ui/toast/SToast.d.ts +49 -0
- package/dist/components/ui/toast/SToastContainer.d.ts +21 -0
- package/dist/components/ui/toast/index.d.ts +2 -0
- package/dist/composables/useAsync.d.ts +134 -0
- package/dist/composables/useClickOutside.d.ts +69 -0
- package/dist/composables/useClipboard.d.ts +46 -0
- package/dist/composables/useDebounce.d.ts +150 -0
- package/dist/composables/useDialog.d.ts +118 -0
- package/dist/composables/useForm.d.ts +204 -0
- package/dist/composables/useHotkey.d.ts +128 -0
- package/dist/composables/useIntersectionObserver.d.ts +156 -0
- package/dist/composables/useLocalStorage.d.ts +120 -0
- package/dist/composables/useMediaQuery.d.ts +115 -0
- package/dist/composables/useTheme.d.ts +8 -0
- package/dist/composables/useToast.d.ts +1619 -0
- package/dist/index.d.ts +71 -0
- package/dist/layouts/UILayout.d.ts +2 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/main.d.ts +0 -0
- package/dist/router.d.ts +2 -0
- package/dist/saka-ui.css +1 -0
- package/dist/saka-ui.js +18513 -0
- package/dist/saka-ui.umd.cjs +38 -0
- package/dist/views/docs/CustomizationView.d.ts +2 -0
- package/dist/views/docs/FormValidationView.d.ts +2 -0
- package/dist/views/docs/StylingGuideView.d.ts +2 -0
- package/dist/views/docs/UseAsyncView.d.ts +2 -0
- package/dist/views/docs/UseClickOutsideView.d.ts +124 -0
- package/dist/views/docs/UseClipboardView.d.ts +4 -0
- package/dist/views/docs/UseDebounceView.d.ts +2 -0
- package/dist/views/docs/UseHotkeyView.d.ts +205 -0
- package/dist/views/docs/UseIntersectionObserverView.d.ts +5 -0
- package/dist/views/docs/UseLocalStorageView.d.ts +2 -0
- package/dist/views/docs/UseMediaQueryView.d.ts +2 -0
- package/dist/views/docs/UseThemeView.d.ts +2 -0
- package/dist/views/examples/AuthFormView.d.ts +2 -0
- package/dist/views/examples/CreditCardFormView.d.ts +6 -0
- package/dist/views/examples/FormFieldExampleView.d.ts +2 -0
- package/dist/views/examples/ProjectFormView.d.ts +2 -0
- package/dist/views/ui/AccordionView.d.ts +2 -0
- package/dist/views/ui/AlertView.d.ts +2 -0
- package/dist/views/ui/AvatarView.d.ts +2 -0
- package/dist/views/ui/BadgeView.d.ts +2 -0
- package/dist/views/ui/BreadcrumbView.d.ts +2 -0
- package/dist/views/ui/ButtonView.d.ts +2 -0
- package/dist/views/ui/CardView.d.ts +2 -0
- package/dist/views/ui/CarouselView.d.ts +274 -0
- package/dist/views/ui/CheckboxView.d.ts +2 -0
- package/dist/views/ui/ChipView.d.ts +2 -0
- package/dist/views/ui/ColorPickerView.d.ts +2 -0
- package/dist/views/ui/DatePickerView.d.ts +2 -0
- package/dist/views/ui/DialogView.d.ts +2 -0
- package/dist/views/ui/DrawerView.d.ts +2 -0
- package/dist/views/ui/DropdownView.d.ts +2 -0
- package/dist/views/ui/GlassButtonView.d.ts +2 -0
- package/dist/views/ui/GlassCardView.d.ts +2 -0
- package/dist/views/ui/HomeView.d.ts +2 -0
- package/dist/views/ui/IconsView.d.ts +2 -0
- package/dist/views/ui/InputView.d.ts +2 -0
- package/dist/views/ui/KbdView.d.ts +2 -0
- package/dist/views/ui/ModalView.d.ts +2 -0
- package/dist/views/ui/MorphingCardView.d.ts +2 -0
- package/dist/views/ui/MorphingModalView.d.ts +2 -0
- package/dist/views/ui/OTPView.d.ts +206 -0
- package/dist/views/ui/PaginationView.d.ts +2 -0
- package/dist/views/ui/ProgressView.d.ts +2 -0
- package/dist/views/ui/RadioView.d.ts +2 -0
- package/dist/views/ui/SelectView.d.ts +2 -0
- package/dist/views/ui/SkeletonView.d.ts +2 -0
- package/dist/views/ui/StepperView.d.ts +2 -0
- package/dist/views/ui/SwitchView.d.ts +2 -0
- package/dist/views/ui/TableView.d.ts +2 -0
- package/dist/views/ui/TabsView.d.ts +2 -0
- package/dist/views/ui/ToastView.d.ts +2 -0
- package/dist/views/ui/TooltipView.d.ts +2 -0
- package/dist/vite.svg +1 -0
- package/package.json +64 -0
- package/registry/components/accordion.json +19 -0
- package/registry/components/alert.json +17 -0
- package/registry/components/avatar.json +18 -0
- package/registry/components/badge.json +14 -0
- package/registry/components/breadcrumb.json +24 -0
- package/registry/components/button.json +17 -0
- package/registry/components/card.json +23 -0
- package/registry/components/carousel.json +19 -0
- package/registry/components/checkbox.json +17 -0
- package/registry/components/chip.json +17 -0
- package/registry/components/color-picker.json +24 -0
- package/registry/components/date-picker.json +17 -0
- package/registry/components/drawer.json +26 -0
- package/registry/components/dropdown.json +21 -0
- package/registry/components/form.json +16 -0
- package/registry/components/glass-button.json +17 -0
- package/registry/components/icon.json +17 -0
- package/registry/components/input.json +17 -0
- package/registry/components/kbd.json +16 -0
- package/registry/components/modal.json +32 -0
- package/registry/components/option.json +16 -0
- package/registry/components/otp.json +23 -0
- package/registry/components/pagination.json +18 -0
- package/registry/components/progress.json +16 -0
- package/registry/components/radio.json +19 -0
- package/registry/components/select.json +17 -0
- package/registry/components/skeleton.json +14 -0
- package/registry/components/switch.json +17 -0
- package/registry/components/table.json +26 -0
- package/registry/components/tabs.json +19 -0
- package/registry/components/toast.json +19 -0
- package/registry/components/tooltip.json +14 -0
- package/registry/index.json +4 -0
- package/registry/source/components/ui/SAlert.vue +388 -0
- package/registry/source/components/ui/SBadge.vue +243 -0
- package/registry/source/components/ui/SButton.vue +387 -0
- package/registry/source/components/ui/SCheckbox.vue +310 -0
- package/registry/source/components/ui/SChip.vue +130 -0
- package/registry/source/components/ui/SDatePicker.vue +1290 -0
- package/registry/source/components/ui/SGlassButton.vue +547 -0
- package/registry/source/components/ui/SIcon.vue +78 -0
- package/registry/source/components/ui/SInput.vue +1054 -0
- package/registry/source/components/ui/SKbd.vue +96 -0
- package/registry/source/components/ui/SKbdShortcut.vue +36 -0
- package/registry/source/components/ui/SSelect.vue +1290 -0
- package/registry/source/components/ui/SSkeleton.vue +185 -0
- package/registry/source/components/ui/SSwitch.vue +275 -0
- package/registry/source/components/ui/STooltip.vue +491 -0
- package/registry/source/components/ui/accordion/SAccordion.vue +248 -0
- package/registry/source/components/ui/accordion/SAccordionItem.vue +353 -0
- package/registry/source/components/ui/accordion/index.ts +5 -0
- package/registry/source/components/ui/avatar/SAvatar.vue +169 -0
- package/registry/source/components/ui/avatar/SAvatarFallback.vue +66 -0
- package/registry/source/components/ui/avatar/SAvatarGroup.vue +69 -0
- package/registry/source/components/ui/avatar/SAvatarImage.vue +92 -0
- package/registry/source/components/ui/avatar/index.ts +5 -0
- package/registry/source/components/ui/breadcrumb/SBreadcrumb.vue +23 -0
- package/registry/source/components/ui/breadcrumb/SBreadcrumbEllipsis.vue +17 -0
- package/registry/source/components/ui/breadcrumb/SBreadcrumbItem.vue +14 -0
- package/registry/source/components/ui/breadcrumb/SBreadcrumbLink.vue +46 -0
- package/registry/source/components/ui/breadcrumb/SBreadcrumbList.vue +17 -0
- package/registry/source/components/ui/breadcrumb/SBreadcrumbPage.vue +15 -0
- package/registry/source/components/ui/breadcrumb/SBreadcrumbSeparator.vue +18 -0
- package/registry/source/components/ui/breadcrumb/index.ts +7 -0
- package/registry/source/components/ui/card/SCard.vue +517 -0
- package/registry/source/components/ui/card/SCardActions.vue +129 -0
- package/registry/source/components/ui/card/SCardContent.vue +117 -0
- package/registry/source/components/ui/card/SCardFooter.vue +103 -0
- package/registry/source/components/ui/card/SCardHeader.vue +163 -0
- package/registry/source/components/ui/card/SCardMedia.vue +312 -0
- package/registry/source/components/ui/card/index.ts +34 -0
- package/registry/source/components/ui/carousel/SCarousel.vue +1069 -0
- package/registry/source/components/ui/carousel/SCarouselSlide.vue +107 -0
- package/registry/source/components/ui/carousel/index.ts +3 -0
- package/registry/source/components/ui/color-picker/SColorPicker.vue +772 -0
- package/registry/source/components/ui/color-picker/SColorPickerAlphaSlider.vue +158 -0
- package/registry/source/components/ui/color-picker/SColorPickerCopy.vue +76 -0
- package/registry/source/components/ui/color-picker/SColorPickerEyeDropper.vue +68 -0
- package/registry/source/components/ui/color-picker/SColorPickerHueSlider.vue +138 -0
- package/registry/source/components/ui/color-picker/SColorPickerInputs.vue +227 -0
- package/registry/source/components/ui/color-picker/SColorPickerPresets.vue +87 -0
- package/registry/source/components/ui/color-picker/SColorPickerPreview.vue +46 -0
- package/registry/source/components/ui/color-picker/SColorPickerRecent.vue +74 -0
- package/registry/source/components/ui/color-picker/SColorPickerSpectrum.vue +149 -0
- package/registry/source/components/ui/color-picker/index.ts +11 -0
- package/registry/source/components/ui/drawer/SDrawer.vue +797 -0
- package/registry/source/components/ui/drawer/SDrawerClose.vue +64 -0
- package/registry/source/components/ui/drawer/SDrawerContent.vue +81 -0
- package/registry/source/components/ui/drawer/SDrawerDescription.vue +40 -0
- package/registry/source/components/ui/drawer/SDrawerFooter.vue +97 -0
- package/registry/source/components/ui/drawer/SDrawerHandle.vue +79 -0
- package/registry/source/components/ui/drawer/SDrawerHeader.vue +117 -0
- package/registry/source/components/ui/drawer/SDrawerTitle.vue +40 -0
- package/registry/source/components/ui/drawer/SDrawerTrigger.vue +51 -0
- package/registry/source/components/ui/drawer/index.ts +20 -0
- package/registry/source/components/ui/dropdown/SDropdown.vue +843 -0
- package/registry/source/components/ui/dropdown/SDropdownDivider.vue +23 -0
- package/registry/source/components/ui/dropdown/SDropdownGroup.vue +53 -0
- package/registry/source/components/ui/dropdown/SDropdownItem.vue +179 -0
- package/registry/source/components/ui/dropdown/index.ts +5 -0
- package/registry/source/components/ui/form/SForm.vue +84 -0
- package/registry/source/components/ui/form/SFormField.vue +78 -0
- package/registry/source/components/ui/form/index.ts +8 -0
- package/registry/source/components/ui/modal/SModal.vue +648 -0
- package/registry/source/components/ui/modal/SModalClose.vue +49 -0
- package/registry/source/components/ui/modal/SModalContent.vue +74 -0
- package/registry/source/components/ui/modal/SModalDescription.vue +39 -0
- package/registry/source/components/ui/modal/SModalFooter.vue +84 -0
- package/registry/source/components/ui/modal/SModalHeader.vue +107 -0
- package/registry/source/components/ui/modal/SModalTitle.vue +39 -0
- package/registry/source/components/ui/modal/SModalTrigger.vue +61 -0
- package/registry/source/components/ui/modal/SMorphingModal.vue +429 -0
- package/registry/source/components/ui/modal/SMorphingModalClose.vue +42 -0
- package/registry/source/components/ui/modal/SMorphingModalDescription.vue +49 -0
- package/registry/source/components/ui/modal/SMorphingModalImage.vue +44 -0
- package/registry/source/components/ui/modal/SMorphingModalSubtitle.vue +29 -0
- package/registry/source/components/ui/modal/SMorphingModalTitle.vue +34 -0
- package/registry/source/components/ui/modal/SMorphingModalTrigger.vue +95 -0
- package/registry/source/components/ui/modal/index.ts +32 -0
- package/registry/source/components/ui/option/SOption.vue +180 -0
- package/registry/source/components/ui/option/SOptionGroup.vue +77 -0
- package/registry/source/components/ui/option/index.ts +3 -0
- package/registry/source/components/ui/otp/SOTP.vue +843 -0
- package/registry/source/components/ui/otp/SOTPGroup.vue +29 -0
- package/registry/source/components/ui/otp/SOTPSeparator.vue +15 -0
- package/registry/source/components/ui/otp/SOTPSlot.vue +462 -0
- package/registry/source/components/ui/otp/index.ts +7 -0
- package/registry/source/components/ui/otp/types.ts +27 -0
- package/registry/source/components/ui/otp/useOTPContext.ts +62 -0
- package/registry/source/components/ui/pagination/SPagination.vue +923 -0
- package/registry/source/components/ui/pagination/index.ts +8 -0
- package/registry/source/components/ui/progress/SProgress.vue +635 -0
- package/registry/source/components/ui/progress/SProgressRange.vue +715 -0
- package/registry/source/components/ui/progress/index.ts +4 -0
- package/registry/source/components/ui/radio/SRadio.vue +407 -0
- package/registry/source/components/ui/radio/SRadioGroup.vue +200 -0
- package/registry/source/components/ui/radio/index.ts +3 -0
- package/registry/source/components/ui/table/SDataTable.vue +828 -0
- package/registry/source/components/ui/table/STableBody.vue +70 -0
- package/registry/source/components/ui/table/STableCell.vue +147 -0
- package/registry/source/components/ui/table/STableColumn.vue +120 -0
- package/registry/source/components/ui/table/STableEmpty.vue +159 -0
- package/registry/source/components/ui/table/STableHeader.vue +132 -0
- package/registry/source/components/ui/table/STableRow.vue +106 -0
- package/registry/source/components/ui/table/STableSkeleton.vue +208 -0
- package/registry/source/components/ui/table/index.ts +126 -0
- package/registry/source/components/ui/table/useDataTable.ts +519 -0
- package/registry/source/components/ui/tabs/STabPane.vue +130 -0
- package/registry/source/components/ui/tabs/STabs.vue +467 -0
- package/registry/source/components/ui/tabs/index.ts +7 -0
- package/registry/source/components/ui/toast/SToast.vue +261 -0
- package/registry/source/components/ui/toast/SToastContainer.vue +209 -0
- package/registry/source/components/ui/toast/index.ts +2 -0
- package/registry/source/composables/useForm.ts +960 -0
- package/registry/source/composables/useTheme.ts +86 -0
- package/registry/source/composables/useToast.ts +440 -0
- package/registry/source/lib/utils.ts +6 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
|
|
4
|
+
import { provide, reactive, computed } from 'vue'
|
|
5
|
+
import { cn } from '../../../lib/utils'
|
|
6
|
+
|
|
7
|
+
export interface AvatarProps {
|
|
8
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | number
|
|
9
|
+
shape?: 'circle' | 'square' | 'rounded'
|
|
10
|
+
bordered?: boolean
|
|
11
|
+
borderColor?: string
|
|
12
|
+
ring?: boolean
|
|
13
|
+
ringColor?: string
|
|
14
|
+
status?: 'online' | 'offline' | 'busy' | 'away' | null
|
|
15
|
+
statusPosition?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const props = withDefaults(defineProps<AvatarProps>(), {
|
|
19
|
+
size: 'md',
|
|
20
|
+
shape: 'circle',
|
|
21
|
+
bordered: false,
|
|
22
|
+
borderColor: 'var(--s-border)',
|
|
23
|
+
ring: false,
|
|
24
|
+
ringColor: 'var(--s-primary)',
|
|
25
|
+
status: null,
|
|
26
|
+
statusPosition: 'bottom-right'
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
// Provide context for child components
|
|
30
|
+
const avatarState = reactive({
|
|
31
|
+
imageLoaded: false,
|
|
32
|
+
imageFailed: false
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
provide('avatarContext', {
|
|
36
|
+
state: avatarState,
|
|
37
|
+
setImageLoaded: (loaded: boolean) => {
|
|
38
|
+
avatarState.imageLoaded = loaded
|
|
39
|
+
},
|
|
40
|
+
setImageFailed: (failed: boolean) => {
|
|
41
|
+
avatarState.imageFailed = failed
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
// Size mapping
|
|
46
|
+
const sizeValue = computed(() => {
|
|
47
|
+
if (typeof props.size === 'number') {
|
|
48
|
+
return `${props.size}px`
|
|
49
|
+
}
|
|
50
|
+
const sizes: Record<string, string> = {
|
|
51
|
+
xs: '1.5rem',
|
|
52
|
+
sm: '2rem',
|
|
53
|
+
md: '2.5rem',
|
|
54
|
+
lg: '3rem',
|
|
55
|
+
xl: '4rem',
|
|
56
|
+
'2xl': '5rem'
|
|
57
|
+
}
|
|
58
|
+
return sizes[props.size] || sizes.md
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
// Font size for fallback
|
|
62
|
+
const fontSizeValue = computed(() => {
|
|
63
|
+
if (typeof props.size === 'number') {
|
|
64
|
+
return `${props.size * 0.4}px`
|
|
65
|
+
}
|
|
66
|
+
const sizes: Record<string, string> = {
|
|
67
|
+
xs: '0.625rem',
|
|
68
|
+
sm: '0.75rem',
|
|
69
|
+
md: '0.875rem',
|
|
70
|
+
lg: '1rem',
|
|
71
|
+
xl: '1.25rem',
|
|
72
|
+
'2xl': '1.5rem'
|
|
73
|
+
}
|
|
74
|
+
return sizes[props.size] || sizes.md
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
// Shape classes
|
|
78
|
+
const shapeClasses = computed(() => {
|
|
79
|
+
const shapes: Record<string, string> = {
|
|
80
|
+
circle: 'rounded-full',
|
|
81
|
+
square: 'rounded-none',
|
|
82
|
+
rounded: 'rounded-lg'
|
|
83
|
+
}
|
|
84
|
+
return shapes[props.shape]
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
// Status dot size
|
|
88
|
+
const statusSize = computed(() => {
|
|
89
|
+
if (typeof props.size === 'number') {
|
|
90
|
+
return `${Math.max(props.size * 0.25, 8)}px`
|
|
91
|
+
}
|
|
92
|
+
const sizes: Record<string, string> = {
|
|
93
|
+
xs: '0.375rem',
|
|
94
|
+
sm: '0.5rem',
|
|
95
|
+
md: '0.5rem',
|
|
96
|
+
lg: '0.625rem',
|
|
97
|
+
xl: '0.75rem',
|
|
98
|
+
'2xl': '0.875rem'
|
|
99
|
+
}
|
|
100
|
+
return sizes[props.size] || sizes.md
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
// Status colors
|
|
104
|
+
const statusColors: Record<string, string> = {
|
|
105
|
+
online: '#22c55e',
|
|
106
|
+
offline: '#6b7280',
|
|
107
|
+
busy: '#ef4444',
|
|
108
|
+
away: '#f59e0b'
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Status position classes
|
|
112
|
+
const statusPositionClasses = computed(() => {
|
|
113
|
+
const positions: Record<string, string> = {
|
|
114
|
+
'top-right': 'top-0 right-0',
|
|
115
|
+
'top-left': 'top-0 left-0',
|
|
116
|
+
'bottom-right': 'bottom-0 right-0',
|
|
117
|
+
'bottom-left': 'bottom-0 left-0'
|
|
118
|
+
}
|
|
119
|
+
return positions[props.statusPosition]
|
|
120
|
+
})
|
|
121
|
+
</script>
|
|
122
|
+
|
|
123
|
+
<template>
|
|
124
|
+
<div
|
|
125
|
+
v-bind="$attrs"
|
|
126
|
+
:class="cn('s-avatar relative inline-flex shrink-0 select-none', $attrs.class ?? '')"
|
|
127
|
+
:style="{
|
|
128
|
+
width: sizeValue,
|
|
129
|
+
height: sizeValue,
|
|
130
|
+
fontSize: fontSizeValue
|
|
131
|
+
}"
|
|
132
|
+
>
|
|
133
|
+
<!-- Inner container for image/fallback with overflow hidden -->
|
|
134
|
+
<div
|
|
135
|
+
class="s-avatar-inner relative w-full h-full flex items-center justify-center overflow-hidden bg-accent text-muted-foreground"
|
|
136
|
+
:class="[
|
|
137
|
+
shapeClasses,
|
|
138
|
+
{
|
|
139
|
+
'ring-2': bordered,
|
|
140
|
+
'ring-3 ring-offset-2 ring-offset-background': ring
|
|
141
|
+
}
|
|
142
|
+
]"
|
|
143
|
+
:style="{
|
|
144
|
+
'--tw-ring-color': bordered ? borderColor : ringColor
|
|
145
|
+
}"
|
|
146
|
+
>
|
|
147
|
+
<slot />
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<!-- Status indicator (outside overflow container) -->
|
|
151
|
+
<span
|
|
152
|
+
v-if="status"
|
|
153
|
+
class="absolute z-10 rounded-full ring-2 ring-background"
|
|
154
|
+
:class="statusPositionClasses"
|
|
155
|
+
:style="{
|
|
156
|
+
width: statusSize,
|
|
157
|
+
height: statusSize,
|
|
158
|
+
backgroundColor: statusColors[status]
|
|
159
|
+
}"
|
|
160
|
+
/>
|
|
161
|
+
</div>
|
|
162
|
+
</template>
|
|
163
|
+
|
|
164
|
+
<style scoped>
|
|
165
|
+
.s-avatar {
|
|
166
|
+
line-height: 1;
|
|
167
|
+
font-weight: 500;
|
|
168
|
+
}
|
|
169
|
+
</style>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
|
|
4
|
+
import { inject, computed, ref, watchEffect } from 'vue'
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
delayMs?: number
|
|
8
|
+
color?: string
|
|
9
|
+
bgColor?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
13
|
+
delayMs: 0,
|
|
14
|
+
color: undefined,
|
|
15
|
+
bgColor: undefined
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
// Inject avatar context
|
|
19
|
+
const avatarContext = inject<{
|
|
20
|
+
state: { imageLoaded: boolean; imageFailed: boolean }
|
|
21
|
+
setImageLoaded: (loaded: boolean) => void
|
|
22
|
+
setImageFailed: (failed: boolean) => void
|
|
23
|
+
}>('avatarContext')
|
|
24
|
+
|
|
25
|
+
const canRender = ref(props.delayMs === 0)
|
|
26
|
+
|
|
27
|
+
// Show fallback logic
|
|
28
|
+
const shouldShow = computed(() => {
|
|
29
|
+
if (!avatarContext) return canRender.value
|
|
30
|
+
// Show fallback if image failed OR if image hasn't loaded yet
|
|
31
|
+
return canRender.value && (!avatarContext.state.imageLoaded || avatarContext.state.imageFailed)
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
// Handle delay
|
|
35
|
+
watchEffect(() => {
|
|
36
|
+
if (props.delayMs > 0 && !canRender.value) {
|
|
37
|
+
const timer = setTimeout(() => {
|
|
38
|
+
canRender.value = true
|
|
39
|
+
}, props.delayMs)
|
|
40
|
+
|
|
41
|
+
return () => clearTimeout(timer)
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
// Custom styles
|
|
46
|
+
const customStyles = computed(() => {
|
|
47
|
+
const styles: Record<string, string> = {}
|
|
48
|
+
if (props.color) styles.color = props.color
|
|
49
|
+
if (props.bgColor) styles.backgroundColor = props.bgColor
|
|
50
|
+
return styles
|
|
51
|
+
})
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<template>
|
|
55
|
+
<span
|
|
56
|
+
v-if="shouldShow"
|
|
57
|
+
v-bind="$attrs"
|
|
58
|
+
class="flex items-center justify-center w-full h-full uppercase font-medium"
|
|
59
|
+
:style="customStyles"
|
|
60
|
+
>
|
|
61
|
+
<slot>
|
|
62
|
+
<!-- Default fallback icon -->
|
|
63
|
+
<span class="mdi mdi-account text-[1.2em]" />
|
|
64
|
+
</slot>
|
|
65
|
+
</span>
|
|
66
|
+
</template>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
|
|
4
|
+
import { computed, provide } from 'vue'
|
|
5
|
+
import { cn } from '../../../lib/utils'
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
max?: number
|
|
9
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | number
|
|
10
|
+
spacing?: 'tight' | 'normal' | 'loose' | number
|
|
11
|
+
bordered?: boolean
|
|
12
|
+
borderColor?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
16
|
+
max: undefined,
|
|
17
|
+
size: 'md',
|
|
18
|
+
spacing: 'normal',
|
|
19
|
+
bordered: true,
|
|
20
|
+
borderColor: 'var(--s-background)'
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
// Provide group context to children
|
|
24
|
+
provide('avatarGroupContext', {
|
|
25
|
+
size: props.size,
|
|
26
|
+
bordered: props.bordered,
|
|
27
|
+
borderColor: props.borderColor
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
// Spacing value
|
|
31
|
+
const spacingValue = computed(() => {
|
|
32
|
+
if (typeof props.spacing === 'number') {
|
|
33
|
+
return `-${props.spacing}px`
|
|
34
|
+
}
|
|
35
|
+
const spacings: Record<string, string> = {
|
|
36
|
+
tight: '-0.75rem',
|
|
37
|
+
normal: '-0.5rem',
|
|
38
|
+
loose: '-0.25rem'
|
|
39
|
+
}
|
|
40
|
+
return spacings[props.spacing] || spacings.normal
|
|
41
|
+
})
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<div
|
|
46
|
+
v-bind="$attrs"
|
|
47
|
+
:class="cn('s-avatar-group flex items-center flex-row-reverse justify-end', $attrs.class ?? '')"
|
|
48
|
+
:style="{ '--avatar-spacing': spacingValue }"
|
|
49
|
+
>
|
|
50
|
+
<slot />
|
|
51
|
+
</div>
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
<style scoped>
|
|
55
|
+
.s-avatar-group :deep(.s-avatar) {
|
|
56
|
+
margin-left: var(--avatar-spacing);
|
|
57
|
+
box-shadow: 0 0 0 2px var(--s-background);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.s-avatar-group :deep(.s-avatar:first-child) {
|
|
61
|
+
margin-left: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.s-avatar-group :deep(.s-avatar:hover) {
|
|
65
|
+
z-index: 10;
|
|
66
|
+
transform: translateY(-2px);
|
|
67
|
+
transition: transform 0.2s ease;
|
|
68
|
+
}
|
|
69
|
+
</style>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
|
|
4
|
+
import { ref, inject, onMounted, watch } from 'vue'
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
src?: string
|
|
8
|
+
alt?: string
|
|
9
|
+
loading?: 'eager' | 'lazy'
|
|
10
|
+
crossorigin?: 'anonymous' | 'use-credentials' | ''
|
|
11
|
+
referrerpolicy?: 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url'
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
15
|
+
src: undefined,
|
|
16
|
+
alt: 'Avatar',
|
|
17
|
+
loading: 'eager',
|
|
18
|
+
crossorigin: undefined,
|
|
19
|
+
referrerpolicy: undefined
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const emit = defineEmits<{
|
|
23
|
+
load: [event: Event]
|
|
24
|
+
error: [event: Event]
|
|
25
|
+
}>()
|
|
26
|
+
|
|
27
|
+
// Inject avatar context
|
|
28
|
+
const avatarContext = inject<{
|
|
29
|
+
state: { imageLoaded: boolean; imageFailed: boolean }
|
|
30
|
+
setImageLoaded: (loaded: boolean) => void
|
|
31
|
+
setImageFailed: (failed: boolean) => void
|
|
32
|
+
}>('avatarContext')
|
|
33
|
+
|
|
34
|
+
const imageRef = ref<HTMLImageElement | null>(null)
|
|
35
|
+
const isLoaded = ref(false)
|
|
36
|
+
const hasError = ref(false)
|
|
37
|
+
|
|
38
|
+
const handleLoad = (event: Event) => {
|
|
39
|
+
isLoaded.value = true
|
|
40
|
+
hasError.value = false
|
|
41
|
+
avatarContext?.setImageLoaded(true)
|
|
42
|
+
avatarContext?.setImageFailed(false)
|
|
43
|
+
emit('load', event)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const handleError = (event: Event) => {
|
|
47
|
+
isLoaded.value = false
|
|
48
|
+
hasError.value = true
|
|
49
|
+
avatarContext?.setImageLoaded(false)
|
|
50
|
+
avatarContext?.setImageFailed(true)
|
|
51
|
+
emit('error', event)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Reset state when src changes
|
|
55
|
+
watch(() => props.src, () => {
|
|
56
|
+
isLoaded.value = false
|
|
57
|
+
hasError.value = false
|
|
58
|
+
avatarContext?.setImageLoaded(false)
|
|
59
|
+
avatarContext?.setImageFailed(false)
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
// Check if image is already cached
|
|
63
|
+
onMounted(() => {
|
|
64
|
+
if (imageRef.value?.complete && imageRef.value?.naturalWidth > 0) {
|
|
65
|
+
isLoaded.value = true
|
|
66
|
+
avatarContext?.setImageLoaded(true)
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<template>
|
|
72
|
+
<img
|
|
73
|
+
v-if="src && !hasError"
|
|
74
|
+
v-bind="$attrs"
|
|
75
|
+
ref="imageRef"
|
|
76
|
+
:src="src"
|
|
77
|
+
:alt="alt"
|
|
78
|
+
:loading="loading"
|
|
79
|
+
:crossorigin="crossorigin"
|
|
80
|
+
:referrerpolicy="referrerpolicy"
|
|
81
|
+
class="absolute inset-0 w-full h-full object-cover"
|
|
82
|
+
:class="{ 'opacity-0': !isLoaded }"
|
|
83
|
+
@load="handleLoad"
|
|
84
|
+
@error="handleError"
|
|
85
|
+
/>
|
|
86
|
+
</template>
|
|
87
|
+
|
|
88
|
+
<style scoped>
|
|
89
|
+
img {
|
|
90
|
+
transition: opacity 0.2s ease-in-out;
|
|
91
|
+
}
|
|
92
|
+
</style>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Re-export components for convenience
|
|
2
|
+
export { default as SAvatar } from './SAvatar.vue'
|
|
3
|
+
export { default as SAvatarFallback } from './SAvatarFallback.vue'
|
|
4
|
+
export { default as SAvatarGroup } from './SAvatarGroup.vue'
|
|
5
|
+
export { default as SAvatarImage } from './SAvatarImage.vue'
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
|
|
4
|
+
defineOptions({ inheritAttrs: false })
|
|
5
|
+
|
|
6
|
+
export interface Props {
|
|
7
|
+
label?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
11
|
+
label: 'Breadcrumb'
|
|
12
|
+
})
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<nav
|
|
17
|
+
v-bind="{ ...$attrs, class: undefined }"
|
|
18
|
+
:class="cn('s-breadcrumb w-full', ($attrs.class as string))"
|
|
19
|
+
:aria-label="label"
|
|
20
|
+
>
|
|
21
|
+
<slot />
|
|
22
|
+
</nav>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
|
|
4
|
+
defineOptions({ inheritAttrs: false })
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<span
|
|
9
|
+
v-bind="{ ...$attrs, class: undefined }"
|
|
10
|
+
:class="cn('s-breadcrumb-ellipsis inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground/70', ($attrs.class as string))"
|
|
11
|
+
>
|
|
12
|
+
<slot>
|
|
13
|
+
<span class="mdi mdi-dots-horizontal" aria-hidden="true"></span>
|
|
14
|
+
<span class="sr-only">More breadcrumb items</span>
|
|
15
|
+
</slot>
|
|
16
|
+
</span>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
|
|
4
|
+
defineOptions({ inheritAttrs: false })
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<li
|
|
9
|
+
v-bind="{ ...$attrs, class: undefined }"
|
|
10
|
+
:class="cn('s-breadcrumb-item inline-flex min-w-0 items-center gap-1.5', ($attrs.class as string))"
|
|
11
|
+
>
|
|
12
|
+
<slot />
|
|
13
|
+
</li>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
|
|
5
|
+
defineOptions({ inheritAttrs: false })
|
|
6
|
+
|
|
7
|
+
export interface Props {
|
|
8
|
+
tag?: string
|
|
9
|
+
href?: string
|
|
10
|
+
to?: string | object
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
14
|
+
tag: 'a',
|
|
15
|
+
href: undefined,
|
|
16
|
+
to: undefined
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const componentTag = computed(() => {
|
|
20
|
+
if (props.to) return 'router-link'
|
|
21
|
+
if (props.href) return 'a'
|
|
22
|
+
return props.tag
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const componentBindings = computed(() => {
|
|
26
|
+
const bindings: Record<string, unknown> = {}
|
|
27
|
+
|
|
28
|
+
if (props.to) bindings.to = props.to
|
|
29
|
+
if (props.href) bindings.href = props.href
|
|
30
|
+
|
|
31
|
+
return bindings
|
|
32
|
+
})
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<component
|
|
37
|
+
:is="componentTag"
|
|
38
|
+
v-bind="{ ...componentBindings, ...$attrs, class: undefined }"
|
|
39
|
+
:class="cn(
|
|
40
|
+
's-breadcrumb-link inline-flex items-center gap-1 rounded-md text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2',
|
|
41
|
+
($attrs.class as string)
|
|
42
|
+
)"
|
|
43
|
+
>
|
|
44
|
+
<slot />
|
|
45
|
+
</component>
|
|
46
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
|
|
4
|
+
defineOptions({ inheritAttrs: false })
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<ol
|
|
9
|
+
v-bind="{ ...$attrs, class: undefined }"
|
|
10
|
+
:class="cn(
|
|
11
|
+
's-breadcrumb-list m-0 flex list-none flex-wrap items-center gap-1.5 break-words p-0 text-sm text-muted-foreground sm:gap-2.5',
|
|
12
|
+
($attrs.class as string)
|
|
13
|
+
)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</ol>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
|
|
4
|
+
defineOptions({ inheritAttrs: false })
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<span
|
|
9
|
+
v-bind="{ ...$attrs, class: undefined }"
|
|
10
|
+
:class="cn('s-breadcrumb-page inline-flex items-center gap-1 rounded-md font-medium text-foreground', ($attrs.class as string))"
|
|
11
|
+
aria-current="page"
|
|
12
|
+
>
|
|
13
|
+
<slot />
|
|
14
|
+
</span>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
|
|
4
|
+
defineOptions({ inheritAttrs: false })
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<li
|
|
9
|
+
v-bind="{ ...$attrs, class: undefined }"
|
|
10
|
+
:class="cn('s-breadcrumb-separator inline-flex items-center justify-center text-muted-foreground/70', ($attrs.class as string))"
|
|
11
|
+
role="presentation"
|
|
12
|
+
aria-hidden="true"
|
|
13
|
+
>
|
|
14
|
+
<slot>
|
|
15
|
+
<span class="mdi mdi-chevron-right text-sm"></span>
|
|
16
|
+
</slot>
|
|
17
|
+
</li>
|
|
18
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as SBreadcrumb } from './SBreadcrumb.vue'
|
|
2
|
+
export { default as SBreadcrumbList } from './SBreadcrumbList.vue'
|
|
3
|
+
export { default as SBreadcrumbItem } from './SBreadcrumbItem.vue'
|
|
4
|
+
export { default as SBreadcrumbLink } from './SBreadcrumbLink.vue'
|
|
5
|
+
export { default as SBreadcrumbPage } from './SBreadcrumbPage.vue'
|
|
6
|
+
export { default as SBreadcrumbSeparator } from './SBreadcrumbSeparator.vue'
|
|
7
|
+
export { default as SBreadcrumbEllipsis } from './SBreadcrumbEllipsis.vue'
|