@stubber/ui 1.0.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 +17 -0
- package/dist/Typography.svelte +129 -0
- package/dist/Typography.svelte.d.ts +23 -0
- package/dist/assets/docs-icon.svg +11 -0
- package/dist/assets/stubber-icon.svg +3 -0
- package/dist/atoms/Button.svelte +70 -0
- package/dist/atoms/Button.svelte.d.ts +24 -0
- package/dist/atoms/IconButton.svelte +0 -0
- package/dist/atoms/IconButton.svelte.d.ts +23 -0
- package/dist/atoms/SpinnerMessage.svelte +7 -0
- package/dist/atoms/SpinnerMessage.svelte.d.ts +16 -0
- package/dist/atoms/TextOnlyButton.svelte +70 -0
- package/dist/atoms/TextOnlyButton.svelte.d.ts +24 -0
- package/dist/components/Accordion.svelte +47 -0
- package/dist/components/Accordion.svelte.d.ts +14 -0
- package/dist/components/AdvancedSwitch.svelte +20 -0
- package/dist/components/AdvancedSwitch.svelte.d.ts +14 -0
- package/dist/components/Alert.svelte +34 -0
- package/dist/components/Alert.svelte.d.ts +25 -0
- package/dist/components/Breadcrumbs.svelte +64 -0
- package/dist/components/Breadcrumbs.svelte.d.ts +33 -0
- package/dist/components/Chip.svelte +53 -0
- package/dist/components/Chip.svelte.d.ts +33 -0
- package/dist/components/HorizontalTabs.svelte +32 -0
- package/dist/components/HorizontalTabs.svelte.d.ts +25 -0
- package/dist/components/IconButton.svelte +165 -0
- package/dist/components/IconButton.svelte.d.ts +43 -0
- package/dist/components/Inputs/PasswordInput.svelte +76 -0
- package/dist/components/Inputs/PasswordInput.svelte.d.ts +21 -0
- package/dist/components/Inputs/SelectInput.css +143 -0
- package/dist/components/Inputs/SelectInput.svelte +18 -0
- package/dist/components/Inputs/SelectInput.svelte.d.ts +22 -0
- package/dist/components/Inputs/TextInput.svelte +76 -0
- package/dist/components/Inputs/TextInput.svelte.d.ts +21 -0
- package/dist/components/Modal.svelte +25 -0
- package/dist/components/Modal.svelte.d.ts +31 -0
- package/dist/components/ModalIcon.svelte +19 -0
- package/dist/components/ModalIcon.svelte.d.ts +17 -0
- package/dist/components/NavProfile.svelte +70 -0
- package/dist/components/NavProfile.svelte.d.ts +29 -0
- package/dist/components/OrgSwitcher.svelte +193 -0
- package/dist/components/OrgSwitcher.svelte.d.ts +33 -0
- package/dist/components/PasswordStrengthItem.svelte +10 -0
- package/dist/components/PasswordStrengthItem.svelte.d.ts +17 -0
- package/dist/components/PasswordStrengthValidator.svelte +57 -0
- package/dist/components/PasswordStrengthValidator.svelte.d.ts +17 -0
- package/dist/components/PrimaryButton.svelte +182 -0
- package/dist/components/PrimaryButton.svelte.d.ts +47 -0
- package/dist/components/ProfileMenu.svelte +58 -0
- package/dist/components/ProfileMenu.svelte.d.ts +35 -0
- package/dist/components/SideNav/SideNavExample.svelte +47 -0
- package/dist/components/SideNav/SideNavExample.svelte.d.ts +23 -0
- package/dist/components/SideNav/SideNavItem.svelte +54 -0
- package/dist/components/SideNav/SideNavItem.svelte.d.ts +35 -0
- package/dist/components/SideNav/SideNavTitle.svelte +7 -0
- package/dist/components/SideNav/SideNavTitle.svelte.d.ts +23 -0
- package/dist/components/Tabs.svelte +102 -0
- package/dist/components/Tabs.svelte.d.ts +14 -0
- package/dist/components/Toast.svelte +49 -0
- package/dist/components/Toast.svelte.d.ts +18 -0
- package/dist/components/Tooltip.svelte +80 -0
- package/dist/components/Tooltip.svelte.d.ts +29 -0
- package/dist/components/alert-dialog/alert-dialog-action.svelte +16 -0
- package/dist/components/alert-dialog/alert-dialog-action.svelte.d.ts +23 -0
- package/dist/components/alert-dialog/alert-dialog-cancel.svelte +16 -0
- package/dist/components/alert-dialog/alert-dialog-cancel.svelte.d.ts +23 -0
- package/dist/components/alert-dialog/alert-dialog-content.svelte +23 -0
- package/dist/components/alert-dialog/alert-dialog-content.svelte.d.ts +17 -0
- package/dist/components/alert-dialog/alert-dialog-description.svelte +12 -0
- package/dist/components/alert-dialog/alert-dialog-description.svelte.d.ts +17 -0
- package/dist/components/alert-dialog/alert-dialog-footer.svelte +11 -0
- package/dist/components/alert-dialog/alert-dialog-footer.svelte.d.ts +17 -0
- package/dist/components/alert-dialog/alert-dialog-header.svelte +8 -0
- package/dist/components/alert-dialog/alert-dialog-header.svelte.d.ts +17 -0
- package/dist/components/alert-dialog/alert-dialog-overlay.svelte +17 -0
- package/dist/components/alert-dialog/alert-dialog-overlay.svelte.d.ts +15 -0
- package/dist/components/alert-dialog/alert-dialog-portal.svelte +6 -0
- package/dist/components/alert-dialog/alert-dialog-portal.svelte.d.ts +17 -0
- package/dist/components/alert-dialog/alert-dialog-title.svelte +10 -0
- package/dist/components/alert-dialog/alert-dialog-title.svelte.d.ts +17 -0
- package/dist/components/alert-dialog/index.d.ts +13 -0
- package/dist/components/alert-dialog/index.js +15 -0
- package/dist/components/badge/badge.svelte +16 -0
- package/dist/components/badge/badge.svelte.d.ts +22 -0
- package/dist/components/badge/index.d.ts +60 -0
- package/dist/components/badge/index.js +17 -0
- package/dist/components/breadcrumb/breadcrumb-ellipsis.svelte +16 -0
- package/dist/components/breadcrumb/breadcrumb-ellipsis.svelte.d.ts +17 -0
- package/dist/components/breadcrumb/breadcrumb-item.svelte +9 -0
- package/dist/components/breadcrumb/breadcrumb-item.svelte.d.ts +19 -0
- package/dist/components/breadcrumb/breadcrumb-link.svelte +22 -0
- package/dist/components/breadcrumb/breadcrumb-link.svelte.d.ts +22 -0
- package/dist/components/breadcrumb/breadcrumb-list.svelte +16 -0
- package/dist/components/breadcrumb/breadcrumb-list.svelte.d.ts +19 -0
- package/dist/components/breadcrumb/breadcrumb-page.svelte +16 -0
- package/dist/components/breadcrumb/breadcrumb-page.svelte.d.ts +21 -0
- package/dist/components/breadcrumb/breadcrumb-separator.svelte +17 -0
- package/dist/components/breadcrumb/breadcrumb-separator.svelte.d.ts +19 -0
- package/dist/components/breadcrumb/breadcrumb.svelte +8 -0
- package/dist/components/breadcrumb/breadcrumb.svelte.d.ts +19 -0
- package/dist/components/breadcrumb/index.d.ts +8 -0
- package/dist/components/breadcrumb/index.js +10 -0
- package/dist/components/button/button.svelte +20 -0
- package/dist/components/button/button.svelte.d.ts +16 -0
- package/dist/components/button/index.d.ts +110 -0
- package/dist/components/button/index.js +28 -0
- package/dist/components/card/card-content.svelte +8 -0
- package/dist/components/card/card-content.svelte.d.ts +17 -0
- package/dist/components/card/card-description.svelte +8 -0
- package/dist/components/card/card-description.svelte.d.ts +17 -0
- package/dist/components/card/card-footer.svelte +8 -0
- package/dist/components/card/card-footer.svelte.d.ts +17 -0
- package/dist/components/card/card-header.svelte +8 -0
- package/dist/components/card/card-header.svelte.d.ts +17 -0
- package/dist/components/card/card-title.svelte +13 -0
- package/dist/components/card/card-title.svelte.d.ts +20 -0
- package/dist/components/card/card.svelte +11 -0
- package/dist/components/card/card.svelte.d.ts +17 -0
- package/dist/components/card/index.d.ts +8 -0
- package/dist/components/card/index.js +9 -0
- package/dist/components/checkbox/checkbox.svelte +28 -0
- package/dist/components/checkbox/checkbox.svelte.d.ts +13 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.js +4 -0
- package/dist/components/dialog/dialog-content.svelte +31 -0
- package/dist/components/dialog/dialog-content.svelte.d.ts +17 -0
- package/dist/components/dialog/dialog-description.svelte +12 -0
- package/dist/components/dialog/dialog-description.svelte.d.ts +17 -0
- package/dist/components/dialog/dialog-footer.svelte +11 -0
- package/dist/components/dialog/dialog-footer.svelte.d.ts +17 -0
- package/dist/components/dialog/dialog-header.svelte +8 -0
- package/dist/components/dialog/dialog-header.svelte.d.ts +17 -0
- package/dist/components/dialog/dialog-overlay.svelte +17 -0
- package/dist/components/dialog/dialog-overlay.svelte.d.ts +15 -0
- package/dist/components/dialog/dialog-portal.svelte +6 -0
- package/dist/components/dialog/dialog-portal.svelte.d.ts +17 -0
- package/dist/components/dialog/dialog-title.svelte +12 -0
- package/dist/components/dialog/dialog-title.svelte.d.ts +17 -0
- package/dist/components/dialog/index.d.ts +12 -0
- package/dist/components/dialog/index.js +14 -0
- package/dist/components/fields/Checkbox.svelte +24 -0
- package/dist/components/fields/Checkbox.svelte.d.ts +27 -0
- package/dist/components/fields/Radio.svelte +30 -0
- package/dist/components/fields/Radio.svelte.d.ts +27 -0
- package/dist/components/fields/StandardInput.svelte +47 -0
- package/dist/components/fields/StandardInput.svelte.d.ts +31 -0
- package/dist/components/input/index.d.ts +23 -0
- package/dist/components/input/index.js +4 -0
- package/dist/components/input/input.svelte +33 -0
- package/dist/components/input/input.svelte.d.ts +14 -0
- package/dist/components/label/index.d.ts +2 -0
- package/dist/components/label/index.js +4 -0
- package/dist/components/label/label.svelte +16 -0
- package/dist/components/label/label.svelte.d.ts +15 -0
- package/dist/components/radio-group/index.d.ts +5 -0
- package/dist/components/radio-group/index.js +7 -0
- package/dist/components/radio-group/radio-group-item.svelte +22 -0
- package/dist/components/radio-group/radio-group-item.svelte.d.ts +13 -0
- package/dist/components/radio-group/radio-group.svelte +10 -0
- package/dist/components/radio-group/radio-group.svelte.d.ts +17 -0
- package/dist/components/scroll-area/index.d.ts +3 -0
- package/dist/components/scroll-area/index.js +5 -0
- package/dist/components/scroll-area/scroll-area-scrollbar.svelte +21 -0
- package/dist/components/scroll-area/scroll-area-scrollbar.svelte.d.ts +23 -0
- package/dist/components/scroll-area/scroll-area.svelte +24 -0
- package/dist/components/scroll-area/scroll-area.svelte.d.ts +27 -0
- package/dist/components/select/index.d.ts +11 -0
- package/dist/components/select/index.js +13 -0
- package/dist/components/select/select-content.svelte +33 -0
- package/dist/components/select/select-content.svelte.d.ts +15 -0
- package/dist/components/select/select-item.svelte +34 -0
- package/dist/components/select/select-item.svelte.d.ts +15 -0
- package/dist/components/select/select-label.svelte +12 -0
- package/dist/components/select/select-label.svelte.d.ts +17 -0
- package/dist/components/select/select-separator.svelte +7 -0
- package/dist/components/select/select-separator.svelte.d.ts +15 -0
- package/dist/components/select/select-trigger.svelte +21 -0
- package/dist/components/select/select-trigger.svelte.d.ts +31 -0
- package/dist/components/separator/index.d.ts +2 -0
- package/dist/components/separator/index.js +4 -0
- package/dist/components/separator/separator.svelte +18 -0
- package/dist/components/separator/separator.svelte.d.ts +15 -0
- package/dist/components/sheet/index.d.ts +114 -0
- package/dist/components/sheet/index.js +79 -0
- package/dist/components/sheet/sheet-content.svelte +38 -0
- package/dist/components/sheet/sheet-content.svelte.d.ts +29 -0
- package/dist/components/sheet/sheet-description.svelte +9 -0
- package/dist/components/sheet/sheet-description.svelte.d.ts +17 -0
- package/dist/components/sheet/sheet-footer.svelte +11 -0
- package/dist/components/sheet/sheet-footer.svelte.d.ts +17 -0
- package/dist/components/sheet/sheet-header.svelte +8 -0
- package/dist/components/sheet/sheet-header.svelte.d.ts +17 -0
- package/dist/components/sheet/sheet-overlay.svelte +23 -0
- package/dist/components/sheet/sheet-overlay.svelte.d.ts +15 -0
- package/dist/components/sheet/sheet-portal.svelte +9 -0
- package/dist/components/sheet/sheet-portal.svelte.d.ts +17 -0
- package/dist/components/sheet/sheet-title.svelte +12 -0
- package/dist/components/sheet/sheet-title.svelte.d.ts +17 -0
- package/dist/components/sonner/index.d.ts +1 -0
- package/dist/components/sonner/index.js +1 -0
- package/dist/components/sonner/sonner.svelte +16 -0
- package/dist/components/sonner/sonner.svelte.d.ts +15 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/index.js +4 -0
- package/dist/components/switch/switch.svelte +30 -0
- package/dist/components/switch/switch.svelte.d.ts +13 -0
- package/dist/components/tabs/index.d.ts +6 -0
- package/dist/components/tabs/index.js +8 -0
- package/dist/components/tabs/tabs-content.svelte +17 -0
- package/dist/components/tabs/tabs-content.svelte.d.ts +17 -0
- package/dist/components/tabs/tabs-list.svelte +15 -0
- package/dist/components/tabs/tabs-list.svelte.d.ts +17 -0
- package/dist/components/tabs/tabs-trigger.svelte +18 -0
- package/dist/components/tabs/tabs-trigger.svelte.d.ts +15 -0
- package/dist/components/textarea/index.d.ts +19 -0
- package/dist/components/textarea/index.js +4 -0
- package/dist/components/textarea/textarea.svelte +28 -0
- package/dist/components/textarea/textarea.svelte.d.ts +14 -0
- package/dist/components/tooltip/index.d.ts +5 -0
- package/dist/components/tooltip/index.js +7 -0
- package/dist/components/tooltip/tooltip-content.svelte +24 -0
- package/dist/components/tooltip/tooltip-content.svelte.d.ts +17 -0
- package/dist/decorators/DecoratorHorizontalTabs.svelte +3 -0
- package/dist/decorators/DecoratorHorizontalTabs.svelte.d.ts +27 -0
- package/dist/decorators/DecoratorTransparentButton.svelte +3 -0
- package/dist/decorators/DecoratorTransparentButton.svelte.d.ts +27 -0
- package/dist/decorators/FixedWidthDecorator.svelte +3 -0
- package/dist/decorators/FixedWidthDecorator.svelte.d.ts +27 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +29 -0
- package/dist/utils/actions.d.ts +4 -0
- package/dist/utils/actions.js +20 -0
- package/dist/utils/shadcn-utils.d.ts +13 -0
- package/dist/utils/shadcn-utils.js +119 -0
- package/package.json +68 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script>export let type = "default";
|
|
2
|
+
export let title;
|
|
3
|
+
export let label = "Note label";
|
|
4
|
+
const backgroundColors = {
|
|
5
|
+
default: "bg-surface-100",
|
|
6
|
+
primary: "bg-primary-500",
|
|
7
|
+
success: "bg-success-700",
|
|
8
|
+
danger: "bg-danger-500",
|
|
9
|
+
warning: "bg-warning-400"
|
|
10
|
+
};
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div class={`flex items-start p-4 shadow-6 rounded-md w-60 md:w-96 ${backgroundColors[type]} ${type === 'default' ? 'text-[#333333]' : 'text-white'}`}>
|
|
14
|
+
<div class="flex-shrink-0 mt-[0.2rem] flex items-center">
|
|
15
|
+
{#if type === 'default' || type === 'success'}
|
|
16
|
+
<i class="fa-sharp fa-regular fa-check w-5 h-5"></i>
|
|
17
|
+
{:else if type === 'primary'}
|
|
18
|
+
<svg class="w-5 h-5" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
19
|
+
<path opacity="0.4" fill-rule="evenodd" clip-rule="evenodd" d="M8.5 2C5.46243 2 3 4.46243 3 7.5C3 10.5376 5.46243 13 8.5 13C11.5376 13 14 10.5376 14 7.5C14 4.46243 11.5376 2 8.5 2ZM2 7.5C2 3.91015 4.91015 1 8.5 1C12.0899 1 15 3.91015 15 7.5C15 11.0899 12.0899 14 8.5 14C4.91015 14 2 11.0899 2 7.5Z" fill="#F5F5F5"/>
|
|
20
|
+
<path d="M8.5 6C9.05228 6 9.5 5.55228 9.5 5C9.5 4.44772 9.05228 4 8.5 4C7.94772 4 7.5 4.44772 7.5 5C7.5 5.55228 7.94772 6 8.5 6Z" fill="#F5F5F5"/>
|
|
21
|
+
<path d="M8.5 7H7V8H8V11H9V7.5C9 7.22386 8.77614 7 8.5 7Z" fill="#F5F5F5"/>
|
|
22
|
+
</svg>
|
|
23
|
+
{:else if type === 'danger'}
|
|
24
|
+
<svg class="w-5 h-5" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
25
|
+
<path opacity="0.4" fill-rule="evenodd" clip-rule="evenodd" d="M8.5 2C5.46243 2 3 4.46243 3 7.5C3 10.5376 5.46243 13 8.5 13C11.5376 13 14 10.5376 14 7.5C14 4.46243 11.5376 2 8.5 2ZM2 7.5C2 3.91015 4.91015 1 8.5 1C12.0899 1 15 3.91015 15 7.5C15 11.0899 12.0899 14 8.5 14C4.91015 14 2 11.0899 2 7.5Z" fill="#F5F5F5"/>
|
|
26
|
+
<path d="M8 4V8H9V4H8Z" fill="#D9D9D9"/>
|
|
27
|
+
<path d="M8.5 11C9.05228 11 9.5 10.5523 9.5 10C9.5 9.44772 9.05228 9 8.5 9C7.94772 9 7.5 9.44772 7.5 10C7.5 10.5523 7.94772 11 8.5 11Z" fill="#D9D9D9"/>
|
|
28
|
+
</svg>
|
|
29
|
+
{:else if type === 'warning'}
|
|
30
|
+
<svg class="w-5 h-5" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
31
|
+
<path d="M8 5V9H9V5H8Z" fill="white"/>
|
|
32
|
+
<path d="M8.5 12C9.05228 12 9.5 11.5523 9.5 11C9.5 10.4477 9.05228 10 8.5 10C7.94772 10 7.5 10.44772 7.5 11C7.5 11.5523 7.94772 12 8.5 12Z" fill="white"/>
|
|
33
|
+
<path opacity="0.4" fill-rule="evenodd" clip-rule="evenodd" d="M7.63514 2C8.02005 1.33333 8.9823 1.33333 9.36719 2L15.4294 12.5C15.8143 13.1667 15.3331 14 14.5633 14H2.43899C1.66919 14 1.18807 13.1667 1.57297 12.5L7.63514 2ZM8.50117 2.5L2.43899 13L14.5633 13L8.50117 2.5Z" fill="white"/>
|
|
34
|
+
</svg>
|
|
35
|
+
{/if}
|
|
36
|
+
</div>
|
|
37
|
+
<div class="ml-4 flex-grow">
|
|
38
|
+
{#if title}
|
|
39
|
+
<h3 class="font-bold text-lg">{title}</h3>
|
|
40
|
+
{/if}
|
|
41
|
+
<p class={`text-sm ${type === 'default' ? 'text-gray-600' : ''}`}>{label}</p>
|
|
42
|
+
</div>
|
|
43
|
+
<button aria-label="Close" class="flex-shrink-0">
|
|
44
|
+
<svg class="w-4 h-4" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
45
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.7091 4.99809L9.35555 1.35164L8.64844 0.644531L5.00199 4.29098L1.35554 0.644531L0.648438 1.35164L4.29488 4.99809L0.648438 8.64453L1.35554 9.35164L5.00199 5.70519L8.64844 9.35164L9.35555 8.64453L5.7091 4.99809Z" fill="{type === 'default' ? '#333333' : 'white'}"/>
|
|
46
|
+
</svg>
|
|
47
|
+
</button>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
type?: ("primary" | "success" | "warning" | "danger" | "default") | undefined;
|
|
5
|
+
title: string | undefined;
|
|
6
|
+
label?: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export type ToastProps = typeof __propDef.props;
|
|
14
|
+
export type ToastEvents = typeof __propDef.events;
|
|
15
|
+
export type ToastSlots = typeof __propDef.slots;
|
|
16
|
+
export default class Toast extends SvelteComponent<ToastProps, ToastEvents, ToastSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { createPopperActions } from "svelte-popperjs";
|
|
3
|
+
export let placement = "top";
|
|
4
|
+
|
|
5
|
+
let popperRef, popperContent;
|
|
6
|
+
|
|
7
|
+
$: {
|
|
8
|
+
[popperRef, popperContent] = createPopperActions({
|
|
9
|
+
placement: placement,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const extraOpts = {
|
|
14
|
+
modifiers: [{ name: "offset", options: { offset: [0, 8] } }],
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
let showTooltip = false;
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
21
|
+
<div
|
|
22
|
+
use:popperRef
|
|
23
|
+
on:mouseenter={() => (showTooltip = true)}
|
|
24
|
+
on:mouseleave={() => (showTooltip = false)}
|
|
25
|
+
on:click={() => {
|
|
26
|
+
showTooltip = false;
|
|
27
|
+
setTimeout(() => {
|
|
28
|
+
showTooltip = true;
|
|
29
|
+
}, 0);
|
|
30
|
+
}}
|
|
31
|
+
>
|
|
32
|
+
<slot name="subject" />
|
|
33
|
+
</div>
|
|
34
|
+
{#if showTooltip}
|
|
35
|
+
<div
|
|
36
|
+
id="tooltip"
|
|
37
|
+
class="z-10 bg-surface-900 rounded text-white p-1 px-3 drop-shadow-[0_3px_3px_rgba(0,0,0,0.4)]"
|
|
38
|
+
data-popper-placement={placement}
|
|
39
|
+
use:popperContent={extraOpts}
|
|
40
|
+
>
|
|
41
|
+
<span class="text-label">
|
|
42
|
+
<slot name="tooltip" />
|
|
43
|
+
</span>
|
|
44
|
+
<div id="arrow" class="arrow absolute w-0 h-0" />
|
|
45
|
+
</div>
|
|
46
|
+
{/if}
|
|
47
|
+
|
|
48
|
+
<style>
|
|
49
|
+
#tooltip[data-popper-placement^="top"] > .arrow {
|
|
50
|
+
border-left: 5px solid transparent;
|
|
51
|
+
border-right: 5px solid transparent;
|
|
52
|
+
border-top: 5px solid var(--surface-900);
|
|
53
|
+
bottom: -5px;
|
|
54
|
+
left: calc(50% - 5px);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
#tooltip[data-popper-placement^="bottom"] > .arrow {
|
|
58
|
+
border-left: 5px solid transparent;
|
|
59
|
+
border-right: 5px solid transparent;
|
|
60
|
+
border-bottom: 5px solid var(--surface-900);
|
|
61
|
+
top: -5px;
|
|
62
|
+
left: calc(50% - 5px);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
#tooltip[data-popper-placement^="left"] > .arrow {
|
|
66
|
+
border-top: 5px solid transparent;
|
|
67
|
+
border-bottom: 5px solid transparent;
|
|
68
|
+
border-left: 5px solid var(--surface-900);
|
|
69
|
+
right: -5px;
|
|
70
|
+
top: calc(50% - 5px);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
#tooltip[data-popper-placement^="right"] > .arrow {
|
|
74
|
+
border-top: 5px solid transparent;
|
|
75
|
+
border-bottom: 5px solid transparent;
|
|
76
|
+
border-right: 5px solid var(--surface-900);
|
|
77
|
+
left: -5px;
|
|
78
|
+
top: calc(50% - 5px);
|
|
79
|
+
}
|
|
80
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} TooltipProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} TooltipEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} TooltipSlots */
|
|
4
|
+
export default class Tooltip extends SvelteComponent<{
|
|
5
|
+
placement?: string | undefined;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {
|
|
9
|
+
subject: {};
|
|
10
|
+
tooltip: {};
|
|
11
|
+
}> {
|
|
12
|
+
}
|
|
13
|
+
export type TooltipProps = typeof __propDef.props;
|
|
14
|
+
export type TooltipEvents = typeof __propDef.events;
|
|
15
|
+
export type TooltipSlots = typeof __propDef.slots;
|
|
16
|
+
import { SvelteComponent } from "svelte";
|
|
17
|
+
declare const __propDef: {
|
|
18
|
+
props: {
|
|
19
|
+
placement?: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
events: {
|
|
22
|
+
[evt: string]: CustomEvent<any>;
|
|
23
|
+
};
|
|
24
|
+
slots: {
|
|
25
|
+
subject: {};
|
|
26
|
+
tooltip: {};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script>import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
2
|
+
import { buttonVariants } from "../button/index.js";
|
|
3
|
+
import { cn } from "../../utils/shadcn-utils.js";
|
|
4
|
+
let className = void 0;
|
|
5
|
+
export { className as class };
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<AlertDialogPrimitive.Action
|
|
9
|
+
class={cn(buttonVariants(), className)}
|
|
10
|
+
{...$$restProps}
|
|
11
|
+
on:click
|
|
12
|
+
on:keydown
|
|
13
|
+
let:builder
|
|
14
|
+
>
|
|
15
|
+
<slot {builder} />
|
|
16
|
+
</AlertDialogPrimitive.Action>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: AlertDialogPrimitive.ActionProps;
|
|
5
|
+
slots: {
|
|
6
|
+
default: {
|
|
7
|
+
builder: {
|
|
8
|
+
readonly type: "button";
|
|
9
|
+
} & {
|
|
10
|
+
[x: `data-melt-${string}`]: "";
|
|
11
|
+
} & {
|
|
12
|
+
action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<"click" | "keydown">;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
events: AlertDialogPrimitive.ActionEvents;
|
|
17
|
+
};
|
|
18
|
+
export type AlertDialogActionProps = typeof __propDef.props;
|
|
19
|
+
export type AlertDialogActionEvents = typeof __propDef.events;
|
|
20
|
+
export type AlertDialogActionSlots = typeof __propDef.slots;
|
|
21
|
+
export default class AlertDialogAction extends SvelteComponent<AlertDialogActionProps, AlertDialogActionEvents, AlertDialogActionSlots> {
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script>import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
2
|
+
import { buttonVariants } from "../button/index.js";
|
|
3
|
+
import { cn } from "../../utils/shadcn-utils.js";
|
|
4
|
+
let className = void 0;
|
|
5
|
+
export { className as class };
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<AlertDialogPrimitive.Cancel
|
|
9
|
+
class={cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className)}
|
|
10
|
+
{...$$restProps}
|
|
11
|
+
on:click
|
|
12
|
+
on:keydown
|
|
13
|
+
let:builder
|
|
14
|
+
>
|
|
15
|
+
<slot {builder} />
|
|
16
|
+
</AlertDialogPrimitive.Cancel>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: AlertDialogPrimitive.CancelProps;
|
|
5
|
+
slots: {
|
|
6
|
+
default: {
|
|
7
|
+
builder: {
|
|
8
|
+
readonly type: "button";
|
|
9
|
+
} & {
|
|
10
|
+
[x: `data-melt-${string}`]: "";
|
|
11
|
+
} & {
|
|
12
|
+
action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<"click" | "keydown">;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
events: AlertDialogPrimitive.CancelEvents;
|
|
17
|
+
};
|
|
18
|
+
export type AlertDialogCancelProps = typeof __propDef.props;
|
|
19
|
+
export type AlertDialogCancelEvents = typeof __propDef.events;
|
|
20
|
+
export type AlertDialogCancelSlots = typeof __propDef.slots;
|
|
21
|
+
export default class AlertDialogCancel extends SvelteComponent<AlertDialogCancelProps, AlertDialogCancelEvents, AlertDialogCancelSlots> {
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script>import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
2
|
+
import * as AlertDialog from "./index.js";
|
|
3
|
+
import { cn, flyAndScale } from "../../utils/shadcn-utils.js";
|
|
4
|
+
export let transition = flyAndScale;
|
|
5
|
+
export let transitionConfig = void 0;
|
|
6
|
+
let className = void 0;
|
|
7
|
+
export { className as class };
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<AlertDialog.Portal>
|
|
11
|
+
<AlertDialog.Overlay />
|
|
12
|
+
<AlertDialogPrimitive.Content
|
|
13
|
+
{transition}
|
|
14
|
+
{transitionConfig}
|
|
15
|
+
class={cn(
|
|
16
|
+
"bg-background fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg sm:rounded-lg md:w-full",
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...$$restProps}
|
|
20
|
+
>
|
|
21
|
+
<slot />
|
|
22
|
+
</AlertDialogPrimitive.Content>
|
|
23
|
+
</AlertDialog.Portal>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: AlertDialogPrimitive.ContentProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type AlertDialogContentProps = typeof __propDef.props;
|
|
13
|
+
export type AlertDialogContentEvents = typeof __propDef.events;
|
|
14
|
+
export type AlertDialogContentSlots = typeof __propDef.slots;
|
|
15
|
+
export default class AlertDialogContent extends SvelteComponent<AlertDialogContentProps, AlertDialogContentEvents, AlertDialogContentSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script>import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../utils/shadcn-utils.js";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<AlertDialogPrimitive.Description
|
|
8
|
+
class={cn("text-muted-foreground text-sm", className)}
|
|
9
|
+
{...$$restProps}
|
|
10
|
+
>
|
|
11
|
+
<slot />
|
|
12
|
+
</AlertDialogPrimitive.Description>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: AlertDialogPrimitive.DescriptionProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type AlertDialogDescriptionProps = typeof __propDef.props;
|
|
13
|
+
export type AlertDialogDescriptionEvents = typeof __propDef.events;
|
|
14
|
+
export type AlertDialogDescriptionSlots = typeof __propDef.slots;
|
|
15
|
+
export default class AlertDialogDescription extends SvelteComponent<AlertDialogDescriptionProps, AlertDialogDescriptionEvents, AlertDialogDescriptionSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script>import { cn } from "../../utils/shadcn-utils.js";
|
|
2
|
+
let className = void 0;
|
|
3
|
+
export { className as class };
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<div
|
|
7
|
+
class={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)}
|
|
8
|
+
{...$$restProps}
|
|
9
|
+
>
|
|
10
|
+
<slot />
|
|
11
|
+
</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: HTMLAttributes<HTMLDivElement>;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type AlertDialogFooterProps = typeof __propDef.props;
|
|
13
|
+
export type AlertDialogFooterEvents = typeof __propDef.events;
|
|
14
|
+
export type AlertDialogFooterSlots = typeof __propDef.slots;
|
|
15
|
+
export default class AlertDialogFooter extends SvelteComponent<AlertDialogFooterProps, AlertDialogFooterEvents, AlertDialogFooterSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: HTMLAttributes<HTMLDivElement>;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type AlertDialogHeaderProps = typeof __propDef.props;
|
|
13
|
+
export type AlertDialogHeaderEvents = typeof __propDef.events;
|
|
14
|
+
export type AlertDialogHeaderSlots = typeof __propDef.slots;
|
|
15
|
+
export default class AlertDialogHeader extends SvelteComponent<AlertDialogHeaderProps, AlertDialogHeaderEvents, AlertDialogHeaderSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script>import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
2
|
+
import { fade } from "svelte/transition";
|
|
3
|
+
import { cn } from "../../utils/shadcn-utils.js";
|
|
4
|
+
let className = void 0;
|
|
5
|
+
export let transition = fade;
|
|
6
|
+
export let transitionConfig = {
|
|
7
|
+
duration: 150
|
|
8
|
+
};
|
|
9
|
+
export { className as class };
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<AlertDialogPrimitive.Overlay
|
|
13
|
+
{transition}
|
|
14
|
+
{transitionConfig}
|
|
15
|
+
class={cn("bg-background/80 fixed inset-0 z-50 backdrop-blur-sm ", className)}
|
|
16
|
+
{...$$restProps}
|
|
17
|
+
/>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: AlertDialogPrimitive.OverlayProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {};
|
|
9
|
+
};
|
|
10
|
+
export type AlertDialogOverlayProps = typeof __propDef.props;
|
|
11
|
+
export type AlertDialogOverlayEvents = typeof __propDef.events;
|
|
12
|
+
export type AlertDialogOverlaySlots = typeof __propDef.slots;
|
|
13
|
+
export default class AlertDialogOverlay extends SvelteComponent<AlertDialogOverlayProps, AlertDialogOverlayEvents, AlertDialogOverlaySlots> {
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: AlertDialogPrimitive.PortalProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type AlertDialogPortalProps = typeof __propDef.props;
|
|
13
|
+
export type AlertDialogPortalEvents = typeof __propDef.events;
|
|
14
|
+
export type AlertDialogPortalSlots = typeof __propDef.slots;
|
|
15
|
+
export default class AlertDialogPortal extends SvelteComponent<AlertDialogPortalProps, AlertDialogPortalEvents, AlertDialogPortalSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script>import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../utils/shadcn-utils.js";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export let level = "h3";
|
|
5
|
+
export { className as class };
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<AlertDialogPrimitive.Title class={cn("text-lg font-semibold", className)} {level} {...$$restProps}>
|
|
9
|
+
<slot />
|
|
10
|
+
</AlertDialogPrimitive.Title>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: AlertDialogPrimitive.TitleProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type AlertDialogTitleProps = typeof __propDef.props;
|
|
13
|
+
export type AlertDialogTitleEvents = typeof __propDef.events;
|
|
14
|
+
export type AlertDialogTitleSlots = typeof __propDef.slots;
|
|
15
|
+
export default class AlertDialogTitle extends SvelteComponent<AlertDialogTitleProps, AlertDialogTitleEvents, AlertDialogTitleSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
2
|
+
import Title from "./alert-dialog-title.svelte";
|
|
3
|
+
import Action from "./alert-dialog-action.svelte";
|
|
4
|
+
import Cancel from "./alert-dialog-cancel.svelte";
|
|
5
|
+
import Portal from "./alert-dialog-portal.svelte";
|
|
6
|
+
import Footer from "./alert-dialog-footer.svelte";
|
|
7
|
+
import Header from "./alert-dialog-header.svelte";
|
|
8
|
+
import Overlay from "./alert-dialog-overlay.svelte";
|
|
9
|
+
import Content from "./alert-dialog-content.svelte";
|
|
10
|
+
import Description from "./alert-dialog-description.svelte";
|
|
11
|
+
declare const Root: typeof AlertDialogPrimitive.Root;
|
|
12
|
+
declare const Trigger: typeof AlertDialogPrimitive.Trigger;
|
|
13
|
+
export { Root, Title, Action, Cancel, Portal, Footer, Header, Trigger, Overlay, Content, Description, Root as AlertDialog, Title as AlertDialogTitle, Action as AlertDialogAction, Cancel as AlertDialogCancel, Portal as AlertDialogPortal, Footer as AlertDialogFooter, Header as AlertDialogHeader, Trigger as AlertDialogTrigger, Overlay as AlertDialogOverlay, Content as AlertDialogContent, Description as AlertDialogDescription, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
2
|
+
import Title from "./alert-dialog-title.svelte";
|
|
3
|
+
import Action from "./alert-dialog-action.svelte";
|
|
4
|
+
import Cancel from "./alert-dialog-cancel.svelte";
|
|
5
|
+
import Portal from "./alert-dialog-portal.svelte";
|
|
6
|
+
import Footer from "./alert-dialog-footer.svelte";
|
|
7
|
+
import Header from "./alert-dialog-header.svelte";
|
|
8
|
+
import Overlay from "./alert-dialog-overlay.svelte";
|
|
9
|
+
import Content from "./alert-dialog-content.svelte";
|
|
10
|
+
import Description from "./alert-dialog-description.svelte";
|
|
11
|
+
const Root = AlertDialogPrimitive.Root;
|
|
12
|
+
const Trigger = AlertDialogPrimitive.Trigger;
|
|
13
|
+
export { Root, Title, Action, Cancel, Portal, Footer, Header, Trigger, Overlay, Content, Description,
|
|
14
|
+
//
|
|
15
|
+
Root as AlertDialog, Title as AlertDialogTitle, Action as AlertDialogAction, Cancel as AlertDialogCancel, Portal as AlertDialogPortal, Footer as AlertDialogFooter, Header as AlertDialogHeader, Trigger as AlertDialogTrigger, Overlay as AlertDialogOverlay, Content as AlertDialogContent, Description as AlertDialogDescription, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script>import { badgeVariants } from "./index.js";
|
|
2
|
+
import { cn } from "../../utils/shadcn-utils.js";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export let href = void 0;
|
|
5
|
+
export let variant = "default";
|
|
6
|
+
export { className as class };
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<svelte:element
|
|
10
|
+
this={href ? "a" : "span"}
|
|
11
|
+
{href}
|
|
12
|
+
class={cn(badgeVariants({ variant, className }))}
|
|
13
|
+
{...$$restProps}
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</svelte:element>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { type Variant } from "./index.js";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
href?: string | undefined;
|
|
7
|
+
variant?: Variant;
|
|
8
|
+
class?: string | undefined | null;
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {
|
|
14
|
+
default: {};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type BadgeProps = typeof __propDef.props;
|
|
18
|
+
export type BadgeEvents = typeof __propDef.events;
|
|
19
|
+
export type BadgeSlots = typeof __propDef.slots;
|
|
20
|
+
export default class Badge extends SvelteComponent<BadgeProps, BadgeEvents, BadgeSlots> {
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
export { default as Badge } from "./badge.svelte";
|
|
3
|
+
export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
4
|
+
variant: {
|
|
5
|
+
default: string;
|
|
6
|
+
secondary: string;
|
|
7
|
+
destructive: string;
|
|
8
|
+
outline: string;
|
|
9
|
+
stubref: string;
|
|
10
|
+
};
|
|
11
|
+
}, undefined, "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2", import("tailwind-variants/dist/config").TVConfig<{
|
|
12
|
+
variant: {
|
|
13
|
+
default: string;
|
|
14
|
+
secondary: string;
|
|
15
|
+
destructive: string;
|
|
16
|
+
outline: string;
|
|
17
|
+
stubref: string;
|
|
18
|
+
};
|
|
19
|
+
}, {
|
|
20
|
+
variant: {
|
|
21
|
+
default: string;
|
|
22
|
+
secondary: string;
|
|
23
|
+
destructive: string;
|
|
24
|
+
outline: string;
|
|
25
|
+
stubref: string;
|
|
26
|
+
};
|
|
27
|
+
}>, {
|
|
28
|
+
variant: {
|
|
29
|
+
default: string;
|
|
30
|
+
secondary: string;
|
|
31
|
+
destructive: string;
|
|
32
|
+
outline: string;
|
|
33
|
+
stubref: string;
|
|
34
|
+
};
|
|
35
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
36
|
+
variant: {
|
|
37
|
+
default: string;
|
|
38
|
+
secondary: string;
|
|
39
|
+
destructive: string;
|
|
40
|
+
outline: string;
|
|
41
|
+
stubref: string;
|
|
42
|
+
};
|
|
43
|
+
}, undefined, "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2", import("tailwind-variants/dist/config").TVConfig<{
|
|
44
|
+
variant: {
|
|
45
|
+
default: string;
|
|
46
|
+
secondary: string;
|
|
47
|
+
destructive: string;
|
|
48
|
+
outline: string;
|
|
49
|
+
stubref: string;
|
|
50
|
+
};
|
|
51
|
+
}, {
|
|
52
|
+
variant: {
|
|
53
|
+
default: string;
|
|
54
|
+
secondary: string;
|
|
55
|
+
destructive: string;
|
|
56
|
+
outline: string;
|
|
57
|
+
stubref: string;
|
|
58
|
+
};
|
|
59
|
+
}>, unknown, unknown, undefined>>;
|
|
60
|
+
export type Variant = VariantProps<typeof badgeVariants>["variant"];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { tv } from "tailwind-variants";
|
|
2
|
+
export { default as Badge } from "./badge.svelte";
|
|
3
|
+
export const badgeVariants = tv({
|
|
4
|
+
base: "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2",
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80 border-transparent",
|
|
8
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent",
|
|
9
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/80 border-transparent",
|
|
10
|
+
outline: "text-foreground",
|
|
11
|
+
stubref: "border-primary text-primary",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
variant: "default",
|
|
16
|
+
},
|
|
17
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script>import { cn } from "../../utils/shadcn-utils.js";
|
|
2
|
+
export let el = void 0;
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<span
|
|
8
|
+
bind:this={el}
|
|
9
|
+
role="presentation"
|
|
10
|
+
aria-hidden="true"
|
|
11
|
+
class={cn("flex h-9 w-9 items-center justify-center", className)}
|
|
12
|
+
{...$$restProps}
|
|
13
|
+
>
|
|
14
|
+
<i class="fa-regular fa-ellipsis" />
|
|
15
|
+
<span class="sr-only">More</span>
|
|
16
|
+
</span>
|