@stubber/ui 1.0.9 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Typography.svelte.d.ts +2 -0
- package/dist/atoms/Button.svelte +37 -41
- package/dist/atoms/Button.svelte.d.ts +8 -6
- package/dist/atoms/IconButton.svelte.d.ts +2 -0
- package/dist/atoms/SpinnerMessage.svelte.d.ts +2 -0
- package/dist/atoms/TextOnlyButton.svelte +37 -41
- package/dist/atoms/TextOnlyButton.svelte.d.ts +8 -6
- package/dist/components/Accordion.svelte.d.ts +2 -0
- package/dist/components/AdvancedSwitch.svelte.d.ts +2 -0
- package/dist/components/Alert.svelte.d.ts +2 -0
- package/dist/components/Breadcrumbs.svelte.d.ts +2 -0
- package/dist/components/Chip.svelte.d.ts +2 -0
- package/dist/components/HorizontalTabs.svelte.d.ts +2 -0
- package/dist/components/IconButton.svelte.d.ts +2 -0
- package/dist/components/Inputs/PasswordInput.svelte +14 -16
- package/dist/components/Inputs/PasswordInput.svelte.d.ts +4 -2
- package/dist/components/Inputs/SelectInput.svelte.d.ts +2 -0
- package/dist/components/Inputs/TextInput.svelte +14 -16
- package/dist/components/Inputs/TextInput.svelte.d.ts +4 -2
- package/dist/components/Modal.svelte.d.ts +2 -0
- package/dist/components/ModalIcon.svelte.d.ts +2 -0
- package/dist/components/NavProfile.svelte.d.ts +2 -0
- package/dist/components/OrgSwitcher.svelte.d.ts +2 -0
- package/dist/components/PasswordStrengthItem.svelte +9 -6
- package/dist/components/PasswordStrengthItem.svelte.d.ts +4 -2
- package/dist/components/PasswordStrengthValidator.svelte +28 -41
- package/dist/components/PasswordStrengthValidator.svelte.d.ts +4 -2
- package/dist/components/PrimaryButton.svelte.d.ts +2 -0
- package/dist/components/ProfileMenu.svelte.d.ts +2 -0
- package/dist/components/SideNav/SideNavExample.svelte.d.ts +2 -0
- package/dist/components/SideNav/SideNavItem.svelte.d.ts +2 -0
- package/dist/components/SideNav/SideNavTitle.svelte.d.ts +2 -0
- package/dist/components/Tabs.svelte.d.ts +2 -0
- package/dist/components/Toast.svelte.d.ts +4 -2
- package/dist/components/Tooltip.svelte.d.ts +2 -0
- package/dist/components/accordion/accordion-content.svelte +21 -0
- package/dist/components/accordion/accordion-content.svelte.d.ts +19 -0
- package/dist/components/accordion/accordion-item.svelte +10 -0
- package/dist/components/accordion/accordion-item.svelte.d.ts +19 -0
- package/dist/components/accordion/accordion-trigger.svelte +20 -0
- package/dist/components/accordion/accordion-trigger.svelte.d.ts +15 -0
- package/dist/components/accordion/index.d.ts +6 -0
- package/dist/components/accordion/index.js +8 -0
- package/dist/components/alert-dialog/alert-dialog-action.svelte.d.ts +1 -1
- package/dist/components/alert-dialog/alert-dialog-cancel.svelte.d.ts +1 -1
- package/dist/components/alert-dialog/alert-dialog-content.svelte.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-description.svelte.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-footer.svelte.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-header.svelte.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-overlay.svelte.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-portal.svelte.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-title.svelte.d.ts +2 -0
- package/dist/components/badge/badge.svelte +6 -3
- package/dist/components/badge/badge.svelte.d.ts +6 -4
- package/dist/components/badge/index.d.ts +2 -9
- package/dist/components/badge/index.js +0 -1
- package/dist/components/breadcrumb/breadcrumb-ellipsis.svelte.d.ts +3 -1
- package/dist/components/breadcrumb/breadcrumb-item.svelte.d.ts +3 -1
- package/dist/components/breadcrumb/breadcrumb-link.svelte +5 -6
- package/dist/components/breadcrumb/breadcrumb-link.svelte.d.ts +4 -2
- package/dist/components/breadcrumb/breadcrumb-list.svelte.d.ts +3 -1
- package/dist/components/breadcrumb/breadcrumb-page.svelte.d.ts +3 -1
- package/dist/components/breadcrumb/breadcrumb-separator.svelte.d.ts +3 -1
- package/dist/components/breadcrumb/breadcrumb.svelte.d.ts +3 -1
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/calendar/calendar-cell.svelte +17 -0
- package/dist/components/calendar/calendar-cell.svelte.d.ts +19 -0
- package/dist/components/calendar/calendar-day.svelte +37 -0
- package/dist/components/calendar/calendar-day.svelte.d.ts +38 -0
- package/dist/components/calendar/calendar-grid-body.svelte +9 -0
- package/dist/components/calendar/calendar-grid-body.svelte.d.ts +19 -0
- package/dist/components/calendar/calendar-grid-head.svelte +9 -0
- package/dist/components/calendar/calendar-grid-head.svelte.d.ts +19 -0
- package/dist/components/calendar/calendar-grid-row.svelte +9 -0
- package/dist/components/calendar/calendar-grid-row.svelte.d.ts +19 -0
- package/dist/components/calendar/calendar-grid.svelte +9 -0
- package/dist/components/calendar/calendar-grid.svelte.d.ts +19 -0
- package/dist/components/calendar/calendar-head-cell.svelte +12 -0
- package/dist/components/calendar/calendar-head-cell.svelte.d.ts +19 -0
- package/dist/components/calendar/calendar-header.svelte +12 -0
- package/dist/components/calendar/calendar-header.svelte.d.ts +19 -0
- package/dist/components/calendar/calendar-heading.svelte +15 -0
- package/dist/components/calendar/calendar-heading.svelte.d.ts +21 -0
- package/dist/components/calendar/calendar-months.svelte +11 -0
- package/dist/components/calendar/calendar-months.svelte.d.ts +19 -0
- package/dist/components/calendar/calendar-next-button.svelte +21 -0
- package/dist/components/calendar/calendar-next-button.svelte.d.ts +30 -0
- package/dist/components/calendar/calendar-prev-button.svelte +21 -0
- package/dist/components/calendar/calendar-prev-button.svelte.d.ts +30 -0
- package/dist/components/calendar/calendar.svelte +52 -0
- package/dist/components/calendar/calendar.svelte.d.ts +13 -0
- package/dist/components/calendar/index.d.ts +14 -0
- package/dist/components/calendar/index.js +16 -0
- package/dist/components/card/card-content.svelte.d.ts +2 -0
- package/dist/components/card/card-description.svelte.d.ts +2 -0
- package/dist/components/card/card-footer.svelte.d.ts +2 -0
- package/dist/components/card/card-header.svelte.d.ts +2 -0
- package/dist/components/card/card-title.svelte.d.ts +3 -1
- package/dist/components/card/card.svelte.d.ts +2 -0
- package/dist/components/context-menu/context-menu-content.svelte.d.ts +2 -0
- package/dist/components/context-menu/context-menu-item.svelte.d.ts +1 -1
- package/dist/components/context-menu/context-menu-label.svelte.d.ts +4 -2
- package/dist/components/context-menu/context-menu-radio-group.svelte.d.ts +2 -0
- package/dist/components/context-menu/context-menu-separator.svelte.d.ts +2 -0
- package/dist/components/context-menu/context-menu-shortcut.svelte.d.ts +2 -0
- package/dist/components/context-menu/context-menu-sub-content.svelte.d.ts +2 -0
- package/dist/components/context-menu/context-menu-sub-trigger.svelte.d.ts +3 -3
- package/dist/components/dialog/dialog-content.svelte +31 -9
- package/dist/components/dialog/dialog-content.svelte.d.ts +10 -0
- package/dist/components/dialog/dialog-description.svelte.d.ts +2 -0
- package/dist/components/dialog/dialog-footer.svelte.d.ts +2 -0
- package/dist/components/dialog/dialog-header.svelte.d.ts +2 -0
- package/dist/components/dialog/dialog-overlay.svelte.d.ts +2 -0
- package/dist/components/dialog/dialog-portal.svelte.d.ts +2 -0
- package/dist/components/dialog/dialog-title.svelte.d.ts +2 -0
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-item.svelte +29 -0
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts +15 -0
- package/dist/components/dropdown-menu/dropdown-menu-content.svelte +22 -0
- package/dist/components/dropdown-menu/dropdown-menu-content.svelte.d.ts +15 -0
- package/dist/components/dropdown-menu/dropdown-menu-item.svelte +24 -0
- package/dist/components/dropdown-menu/dropdown-menu-item.svelte.d.ts +17 -0
- package/dist/components/dropdown-menu/dropdown-menu-label.svelte +13 -0
- package/dist/components/dropdown-menu/dropdown-menu-label.svelte.d.ts +23 -0
- package/dist/components/dropdown-menu/dropdown-menu-radio-group.svelte +7 -0
- package/dist/components/dropdown-menu/dropdown-menu-radio-group.svelte.d.ts +19 -0
- package/dist/components/dropdown-menu/dropdown-menu-radio-item.svelte +29 -0
- package/dist/components/dropdown-menu/dropdown-menu-radio-item.svelte.d.ts +15 -0
- package/dist/components/dropdown-menu/dropdown-menu-separator.svelte +10 -0
- package/dist/components/dropdown-menu/dropdown-menu-separator.svelte.d.ts +17 -0
- package/dist/components/dropdown-menu/dropdown-menu-shortcut.svelte +8 -0
- package/dist/components/dropdown-menu/dropdown-menu-shortcut.svelte.d.ts +19 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub-content.svelte +25 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub-content.svelte.d.ts +15 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub-trigger.svelte +24 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub-trigger.svelte.d.ts +21 -0
- package/dist/components/dropdown-menu/index.d.ts +16 -0
- package/dist/components/dropdown-menu/index.js +18 -0
- package/dist/components/fields/Checkbox.svelte.d.ts +2 -0
- package/dist/components/fields/Radio.svelte.d.ts +2 -0
- package/dist/components/fields/StandardInput.svelte.d.ts +4 -2
- package/dist/components/input/input.svelte.d.ts +1 -1
- package/dist/components/popover/popover-content.svelte.d.ts +2 -0
- package/dist/components/radio-group/radio-group.svelte.d.ts +2 -0
- package/dist/components/range-calendar/index.d.ts +14 -0
- package/dist/components/range-calendar/index.js +16 -0
- package/dist/components/range-calendar/range-calendar-cell.svelte +17 -0
- package/dist/components/range-calendar/range-calendar-cell.svelte.d.ts +19 -0
- package/dist/components/range-calendar/range-calendar-day.svelte +38 -0
- package/dist/components/range-calendar/range-calendar-day.svelte.d.ts +40 -0
- package/dist/components/range-calendar/range-calendar-grid-body.svelte +9 -0
- package/dist/components/range-calendar/range-calendar-grid-body.svelte.d.ts +19 -0
- package/dist/components/range-calendar/range-calendar-grid-head.svelte +9 -0
- package/dist/components/range-calendar/range-calendar-grid-head.svelte.d.ts +19 -0
- package/dist/components/range-calendar/range-calendar-grid-row.svelte +9 -0
- package/dist/components/range-calendar/range-calendar-grid-row.svelte.d.ts +19 -0
- package/dist/components/range-calendar/range-calendar-grid.svelte +12 -0
- package/dist/components/range-calendar/range-calendar-grid.svelte.d.ts +19 -0
- package/dist/components/range-calendar/range-calendar-head-cell.svelte +12 -0
- package/dist/components/range-calendar/range-calendar-head-cell.svelte.d.ts +19 -0
- package/dist/components/range-calendar/range-calendar-header.svelte +12 -0
- package/dist/components/range-calendar/range-calendar-header.svelte.d.ts +19 -0
- package/dist/components/range-calendar/range-calendar-heading.svelte +15 -0
- package/dist/components/range-calendar/range-calendar-heading.svelte.d.ts +21 -0
- package/dist/components/range-calendar/range-calendar-months.svelte +11 -0
- package/dist/components/range-calendar/range-calendar-months.svelte.d.ts +19 -0
- package/dist/components/range-calendar/range-calendar-next-button.svelte +21 -0
- package/dist/components/range-calendar/range-calendar-next-button.svelte.d.ts +30 -0
- package/dist/components/range-calendar/range-calendar-prev-button.svelte +21 -0
- package/dist/components/range-calendar/range-calendar-prev-button.svelte.d.ts +30 -0
- package/dist/components/range-calendar/range-calendar.svelte +54 -0
- package/dist/components/range-calendar/range-calendar.svelte.d.ts +13 -0
- package/dist/components/scroll-area/scroll-area-scrollbar.svelte.d.ts +5 -3
- package/dist/components/scroll-area/scroll-area.svelte.d.ts +6 -4
- package/dist/components/select/select-label.svelte.d.ts +2 -0
- package/dist/components/select/select-separator.svelte.d.ts +2 -0
- package/dist/components/select/select-trigger.svelte.d.ts +1 -1
- package/dist/components/separator/separator.svelte.d.ts +2 -0
- package/dist/components/sheet/index.d.ts +2 -2
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sheet/sheet-content.svelte.d.ts +4 -2
- package/dist/components/sheet/sheet-description.svelte.d.ts +2 -0
- package/dist/components/sheet/sheet-footer.svelte.d.ts +2 -0
- package/dist/components/sheet/sheet-header.svelte.d.ts +2 -0
- package/dist/components/sheet/sheet-overlay.svelte.d.ts +2 -0
- package/dist/components/sheet/sheet-portal.svelte.d.ts +2 -0
- package/dist/components/sheet/sheet-title.svelte.d.ts +2 -0
- package/dist/components/sonner/sonner.svelte +1 -2
- package/dist/components/sonner/sonner.svelte.d.ts +3 -1
- package/dist/components/switch/index.d.ts +93 -1
- package/dist/components/switch/index.js +29 -1
- package/dist/components/switch/switch.svelte +3 -15
- package/dist/components/switch/switch.svelte.d.ts +2 -1
- package/dist/components/tabs/tabs-content.svelte +1 -0
- package/dist/components/tabs/tabs-content.svelte.d.ts +2 -0
- package/dist/components/tabs/tabs-list.svelte.d.ts +2 -0
- package/dist/components/textarea/textarea.svelte.d.ts +1 -1
- package/dist/components/tooltip/tooltip-content.svelte +2 -2
- package/dist/components/tooltip/tooltip-content.svelte.d.ts +2 -0
- package/dist/decorators/DecoratorHorizontalTabs.svelte.d.ts +2 -0
- package/dist/decorators/DecoratorTransparentButton.svelte.d.ts +2 -0
- package/dist/decorators/FixedWidthDecorator.svelte.d.ts +2 -0
- package/dist/index.d.ts +0 -6
- package/dist/index.js +7 -7
- package/dist/styles/stubber/typography.css +6 -1
- package/dist/utils/shadcn-utils.d.ts +0 -1
- package/package.json +27 -18
|
@@ -5,12 +5,12 @@ declare const __propDef: {
|
|
|
5
5
|
dir?: import("@melt-ui/svelte/internal/types").TextDirection | undefined;
|
|
6
6
|
hideDelay?: number | undefined;
|
|
7
7
|
} & {
|
|
8
|
-
asChild?: boolean | undefined;
|
|
8
|
+
asChild?: boolean | undefined | undefined;
|
|
9
9
|
el?: HTMLDivElement | undefined;
|
|
10
10
|
} & import("bits-ui/dist/internal/types.js").HTMLDivAttributes & {
|
|
11
|
-
orientation?: "vertical" | "horizontal" | "both"
|
|
12
|
-
scrollbarXClasses?: string
|
|
13
|
-
scrollbarYClasses?: string
|
|
11
|
+
orientation?: "vertical" | "horizontal" | "both";
|
|
12
|
+
scrollbarXClasses?: string;
|
|
13
|
+
scrollbarYClasses?: string;
|
|
14
14
|
};
|
|
15
15
|
events: {
|
|
16
16
|
[evt: string]: CustomEvent<any>;
|
|
@@ -18,6 +18,8 @@ declare const __propDef: {
|
|
|
18
18
|
slots: {
|
|
19
19
|
default: {};
|
|
20
20
|
};
|
|
21
|
+
exports?: {} | undefined;
|
|
22
|
+
bindings?: string | undefined;
|
|
21
23
|
};
|
|
22
24
|
export type ScrollAreaProps = typeof __propDef.props;
|
|
23
25
|
export type ScrollAreaEvents = typeof __propDef.events;
|
|
@@ -6,6 +6,8 @@ declare const __propDef: {
|
|
|
6
6
|
[evt: string]: CustomEvent<any>;
|
|
7
7
|
};
|
|
8
8
|
slots: {};
|
|
9
|
+
exports?: {} | undefined;
|
|
10
|
+
bindings?: string | undefined;
|
|
9
11
|
};
|
|
10
12
|
export type SelectSeparatorProps = typeof __propDef.props;
|
|
11
13
|
export type SelectSeparatorEvents = typeof __propDef.events;
|
|
@@ -17,7 +17,7 @@ declare const __propDef: {
|
|
|
17
17
|
} & {
|
|
18
18
|
[x: `data-melt-${string}`]: "";
|
|
19
19
|
} & {
|
|
20
|
-
action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<"
|
|
20
|
+
action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<"input" | "click" | "keydown">;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
};
|
|
@@ -18,7 +18,7 @@ export declare const sheetVariants: import("tailwind-variants").TVReturnType<{
|
|
|
18
18
|
left: string;
|
|
19
19
|
right: string;
|
|
20
20
|
};
|
|
21
|
-
}, undefined, "bg-background fixed z-50 gap-4 p-6 shadow-lg", import("tailwind-variants/dist/config").TVConfig<{
|
|
21
|
+
}, undefined, "bg-background fixed z-50 gap-4 p-6 shadow-lg", import("tailwind-variants/dist/config.d.ts").TVConfig<{
|
|
22
22
|
side: {
|
|
23
23
|
top: string;
|
|
24
24
|
bottom: string;
|
|
@@ -46,7 +46,7 @@ export declare const sheetVariants: import("tailwind-variants").TVReturnType<{
|
|
|
46
46
|
left: string;
|
|
47
47
|
right: string;
|
|
48
48
|
};
|
|
49
|
-
}, undefined, "bg-background fixed z-50 gap-4 p-6 shadow-lg", import("tailwind-variants/dist/config").TVConfig<{
|
|
49
|
+
}, undefined, "bg-background fixed z-50 gap-4 p-6 shadow-lg", import("tailwind-variants/dist/config.d.ts").TVConfig<{
|
|
50
50
|
side: {
|
|
51
51
|
top: string;
|
|
52
52
|
bottom: string;
|
|
@@ -19,7 +19,7 @@ export const sheetVariants = tv({
|
|
|
19
19
|
side: {
|
|
20
20
|
top: "inset-x-0 top-0 border-b",
|
|
21
21
|
bottom: "inset-x-0 bottom-0 border-t",
|
|
22
|
-
left: "inset-y-0 left-0 h-full
|
|
22
|
+
left: "inset-y-0 left-0 h-full border-r",
|
|
23
23
|
right: "inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
24
24
|
},
|
|
25
25
|
},
|
|
@@ -8,11 +8,11 @@ declare const __propDef: {
|
|
|
8
8
|
inTransitionConfig?: any;
|
|
9
9
|
outTransition?: import("bits-ui/dist/internal/types.js").Transition | undefined;
|
|
10
10
|
outTransitionConfig?: any;
|
|
11
|
-
asChild?: boolean | undefined;
|
|
11
|
+
asChild?: boolean | undefined | undefined;
|
|
12
12
|
el?: HTMLDivElement | undefined;
|
|
13
13
|
} & import("bits-ui/dist/internal/types.js").HTMLDivAttributes & {
|
|
14
14
|
side?: Side;
|
|
15
|
-
hasOverlay?: boolean
|
|
15
|
+
hasOverlay?: boolean;
|
|
16
16
|
};
|
|
17
17
|
events: {
|
|
18
18
|
[evt: string]: CustomEvent<any>;
|
|
@@ -20,6 +20,8 @@ declare const __propDef: {
|
|
|
20
20
|
slots: {
|
|
21
21
|
default: {};
|
|
22
22
|
};
|
|
23
|
+
exports?: {} | undefined;
|
|
24
|
+
bindings?: string | undefined;
|
|
23
25
|
};
|
|
24
26
|
export type SheetContentProps = typeof __propDef.props;
|
|
25
27
|
export type SheetContentEvents = typeof __propDef.events;
|
|
@@ -6,6 +6,8 @@ declare const __propDef: {
|
|
|
6
6
|
[evt: string]: CustomEvent<any>;
|
|
7
7
|
};
|
|
8
8
|
slots: {};
|
|
9
|
+
exports?: {} | undefined;
|
|
10
|
+
bindings?: string | undefined;
|
|
9
11
|
};
|
|
10
12
|
export type SheetOverlayProps = typeof __propDef.props;
|
|
11
13
|
export type SheetOverlayEvents = typeof __propDef.events;
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
class="toaster group"
|
|
6
6
|
toastOptions={{
|
|
7
7
|
classes: {
|
|
8
|
-
toast:
|
|
9
|
-
"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
8
|
+
toast: "group toast group-[.toaster]:shadow-lg",
|
|
10
9
|
description: "group-[.toast]:text-muted-foreground",
|
|
11
10
|
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
12
11
|
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
|
|
@@ -6,10 +6,12 @@ declare const __propDef: {
|
|
|
6
6
|
[evt: string]: CustomEvent<any>;
|
|
7
7
|
};
|
|
8
8
|
slots: {};
|
|
9
|
+
exports?: {} | undefined;
|
|
10
|
+
bindings?: string | undefined;
|
|
9
11
|
};
|
|
10
12
|
type SonnerProps_ = typeof __propDef.props;
|
|
11
13
|
export { SonnerProps_ as SonnerProps };
|
|
12
14
|
export type SonnerEvents = typeof __propDef.events;
|
|
13
15
|
export type SonnerSlots = typeof __propDef.slots;
|
|
14
|
-
export default class Sonner extends SvelteComponent<
|
|
16
|
+
export default class Sonner extends SvelteComponent<SonnerProps_, SonnerEvents, SonnerSlots> {
|
|
15
17
|
}
|
|
@@ -1,2 +1,94 @@
|
|
|
1
|
+
import { type VariantProps } from "tailwind-variants";
|
|
1
2
|
import Root from "./switch.svelte";
|
|
2
|
-
|
|
3
|
+
import { Switch as SwitchPrimitive } from "bits-ui";
|
|
4
|
+
declare const switchVariants: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
variant: {
|
|
6
|
+
default: string;
|
|
7
|
+
developer: string;
|
|
8
|
+
secondary: string;
|
|
9
|
+
};
|
|
10
|
+
}, undefined, "focus-visible:ring-ring focus-visible:ring-offset-background data-[state=unchecked]:bg-gray-200 peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-lg border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", import("tailwind-variants/dist/config.d.ts").TVConfig<{
|
|
11
|
+
variant: {
|
|
12
|
+
default: string;
|
|
13
|
+
developer: string;
|
|
14
|
+
secondary: string;
|
|
15
|
+
};
|
|
16
|
+
}, {
|
|
17
|
+
variant: {
|
|
18
|
+
default: string;
|
|
19
|
+
developer: string;
|
|
20
|
+
secondary: string;
|
|
21
|
+
};
|
|
22
|
+
}>, {
|
|
23
|
+
variant: {
|
|
24
|
+
default: string;
|
|
25
|
+
developer: string;
|
|
26
|
+
secondary: string;
|
|
27
|
+
};
|
|
28
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
29
|
+
variant: {
|
|
30
|
+
default: string;
|
|
31
|
+
developer: string;
|
|
32
|
+
secondary: string;
|
|
33
|
+
};
|
|
34
|
+
}, undefined, "focus-visible:ring-ring focus-visible:ring-offset-background data-[state=unchecked]:bg-gray-200 peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-lg border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", import("tailwind-variants/dist/config.d.ts").TVConfig<{
|
|
35
|
+
variant: {
|
|
36
|
+
default: string;
|
|
37
|
+
developer: string;
|
|
38
|
+
secondary: string;
|
|
39
|
+
};
|
|
40
|
+
}, {
|
|
41
|
+
variant: {
|
|
42
|
+
default: string;
|
|
43
|
+
developer: string;
|
|
44
|
+
secondary: string;
|
|
45
|
+
};
|
|
46
|
+
}>, unknown, unknown, undefined>>;
|
|
47
|
+
declare const thumbVariants: import("tailwind-variants").TVReturnType<{
|
|
48
|
+
variant: {
|
|
49
|
+
default: string;
|
|
50
|
+
developer: string;
|
|
51
|
+
secondary: string;
|
|
52
|
+
};
|
|
53
|
+
}, undefined, "bg-background pointer-events-none flex items-center justify-center h-5 w-5 rounded-lg shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0", import("tailwind-variants/dist/config.d.ts").TVConfig<{
|
|
54
|
+
variant: {
|
|
55
|
+
default: string;
|
|
56
|
+
developer: string;
|
|
57
|
+
secondary: string;
|
|
58
|
+
};
|
|
59
|
+
}, {
|
|
60
|
+
variant: {
|
|
61
|
+
default: string;
|
|
62
|
+
developer: string;
|
|
63
|
+
secondary: string;
|
|
64
|
+
};
|
|
65
|
+
}>, {
|
|
66
|
+
variant: {
|
|
67
|
+
default: string;
|
|
68
|
+
developer: string;
|
|
69
|
+
secondary: string;
|
|
70
|
+
};
|
|
71
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
72
|
+
variant: {
|
|
73
|
+
default: string;
|
|
74
|
+
developer: string;
|
|
75
|
+
secondary: string;
|
|
76
|
+
};
|
|
77
|
+
}, undefined, "bg-background pointer-events-none flex items-center justify-center h-5 w-5 rounded-lg shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0", import("tailwind-variants/dist/config.d.ts").TVConfig<{
|
|
78
|
+
variant: {
|
|
79
|
+
default: string;
|
|
80
|
+
developer: string;
|
|
81
|
+
secondary: string;
|
|
82
|
+
};
|
|
83
|
+
}, {
|
|
84
|
+
variant: {
|
|
85
|
+
default: string;
|
|
86
|
+
developer: string;
|
|
87
|
+
secondary: string;
|
|
88
|
+
};
|
|
89
|
+
}>, unknown, unknown, undefined>>;
|
|
90
|
+
type Variant = VariantProps<typeof switchVariants>["variant"];
|
|
91
|
+
type Props = SwitchPrimitive.Props & {
|
|
92
|
+
variant?: Variant;
|
|
93
|
+
};
|
|
94
|
+
export { Root, type Props, Root as Switch, type Props as SwitchProps, switchVariants, thumbVariants, };
|
|
@@ -1,4 +1,32 @@
|
|
|
1
|
+
import { tv } from "tailwind-variants";
|
|
1
2
|
import Root from "./switch.svelte";
|
|
3
|
+
import { Switch as SwitchPrimitive } from "bits-ui";
|
|
4
|
+
const switchVariants = tv({
|
|
5
|
+
base: "focus-visible:ring-ring focus-visible:ring-offset-background data-[state=unchecked]:bg-gray-200 peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-lg border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "data-[state=checked]:bg-primary-500",
|
|
9
|
+
developer: "data-[state=checked]:bg-info-600",
|
|
10
|
+
secondary: "data-[state=checked]:bg-gray-800",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
variant: "default",
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
const thumbVariants = tv({
|
|
18
|
+
base: "bg-background pointer-events-none flex items-center justify-center h-5 w-5 rounded-lg shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
|
19
|
+
variants: {
|
|
20
|
+
variant: {
|
|
21
|
+
default: "",
|
|
22
|
+
developer: "fa-regular fa-code text-[0.6rem]",
|
|
23
|
+
secondary: "",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
variant: "default",
|
|
28
|
+
},
|
|
29
|
+
});
|
|
2
30
|
export { Root,
|
|
3
31
|
//
|
|
4
|
-
Root as Switch, };
|
|
32
|
+
Root as Switch, switchVariants, thumbVariants, };
|
|
@@ -1,30 +1,18 @@
|
|
|
1
1
|
<script>import { Switch as SwitchPrimitive } from "bits-ui";
|
|
2
2
|
import { cn } from "../../utils/shadcn-utils.js";
|
|
3
|
+
import { switchVariants, thumbVariants } from "./index.js";
|
|
3
4
|
let className = void 0;
|
|
4
5
|
export let checked = void 0;
|
|
5
6
|
export let variant = "default";
|
|
6
7
|
export { className as class };
|
|
7
|
-
const variants = {
|
|
8
|
-
default: "data-[state=checked]:bg-primary-500 data-[state=unchecked]:bg-gray-200",
|
|
9
|
-
primary: "data-[state=checked]:bg-info-600 data-[state=unchecked]:bg-gray-200",
|
|
10
|
-
secondary: "data-[state=checked]:bg-gray-800 data-[state=unchecked]:bg-gray-200"
|
|
11
|
-
};
|
|
12
8
|
</script>
|
|
13
9
|
|
|
14
10
|
<SwitchPrimitive.Root
|
|
15
11
|
bind:checked
|
|
16
|
-
class={cn(
|
|
17
|
-
"focus-visible:ring-ring focus-visible:ring-offset-background peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-lg border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
18
|
-
variants[variant],
|
|
19
|
-
className
|
|
20
|
-
)}
|
|
12
|
+
class={cn(switchVariants({ variant, className }))}
|
|
21
13
|
{...$$restProps}
|
|
22
14
|
on:click
|
|
23
15
|
on:keydown
|
|
24
16
|
>
|
|
25
|
-
<SwitchPrimitive.Thumb
|
|
26
|
-
class={cn(
|
|
27
|
-
"bg-background pointer-events-none block h-5 w-5 rounded-lg shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
28
|
-
)}
|
|
29
|
-
/>
|
|
17
|
+
<SwitchPrimitive.Thumb class={cn(thumbVariants({ variant }))} />
|
|
30
18
|
</SwitchPrimitive.Root>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
import { Switch as SwitchPrimitive } from "bits-ui";
|
|
3
|
+
import { type Props } from "./index.js";
|
|
3
4
|
declare const __propDef: {
|
|
4
|
-
props:
|
|
5
|
+
props: Props;
|
|
5
6
|
slots: {};
|
|
6
7
|
events: SwitchPrimitive.Events;
|
|
7
8
|
};
|
|
@@ -8,6 +8,7 @@ export { className as class };
|
|
|
8
8
|
<TabsPrimitive.Content
|
|
9
9
|
class={cn(
|
|
10
10
|
"ring-offset-background focus-visible:ring-ring mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
11
|
+
"data-[state=active]:block data-[state=inactive]:hidden",
|
|
11
12
|
className
|
|
12
13
|
)}
|
|
13
14
|
{value}
|
|
@@ -10,5 +10,5 @@ export type TextareaProps = typeof __propDef.props;
|
|
|
10
10
|
type TextareaEvents_ = typeof __propDef.events;
|
|
11
11
|
export { TextareaEvents_ as TextareaEvents };
|
|
12
12
|
export type TextareaSlots = typeof __propDef.slots;
|
|
13
|
-
export default class Textarea extends SvelteComponent<TextareaProps,
|
|
13
|
+
export default class Textarea extends SvelteComponent<TextareaProps, TextareaEvents_, TextareaSlots> {
|
|
14
14
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script>import { Tooltip as TooltipPrimitive } from "bits-ui";
|
|
2
2
|
import { cn, flyAndScale } from "../../utils/shadcn-utils.js";
|
|
3
3
|
let className = void 0;
|
|
4
|
-
export let sideOffset =
|
|
4
|
+
export let sideOffset = 12;
|
|
5
5
|
export let transition = flyAndScale;
|
|
6
6
|
export let transitionConfig = {
|
|
7
7
|
y: 8,
|
|
8
|
-
duration:
|
|
8
|
+
duration: 80
|
|
9
9
|
};
|
|
10
10
|
export { className as class };
|
|
11
11
|
</script>
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export { default as PrimaryButton } from "./components/PrimaryButton.svelte";
|
|
2
|
-
export { default as IconButton } from "./components/IconButton.svelte";
|
|
3
|
-
export { default as Chip } from "./components/Chip.svelte";
|
|
4
1
|
export { default as HorizontalTabs } from "./components/HorizontalTabs.svelte";
|
|
5
2
|
export { default as ProfileMenu } from "./components/ProfileMenu.svelte";
|
|
6
3
|
export { default as Breadcrumbs } from "./components/Breadcrumbs.svelte";
|
|
@@ -13,9 +10,6 @@ export { default as Modal } from "./components/Modal.svelte";
|
|
|
13
10
|
export { default as Alert } from "./components/Alert.svelte";
|
|
14
11
|
export { default as StandardInput } from "./components/fields/StandardInput.svelte";
|
|
15
12
|
export { default as SpinnerMessage } from "./atoms/SpinnerMessage.svelte";
|
|
16
|
-
export { default as TextOnlyButton } from "./atoms/TextOnlyButton.svelte";
|
|
17
13
|
export { default as TextInput } from "./components/Inputs/TextInput.svelte";
|
|
18
14
|
export { default as PasswordInput } from "./components/Inputs/PasswordInput.svelte";
|
|
19
15
|
export { default as PasswordStrengthValidator } from "./components/PasswordStrengthValidator.svelte";
|
|
20
|
-
export { default as Tooltip } from "./components/Tooltip.svelte";
|
|
21
|
-
export * from "./components/button/index.js";
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Reexport your entry components here
|
|
2
2
|
|
|
3
|
-
export { default as PrimaryButton } from "./components/PrimaryButton.svelte";
|
|
4
|
-
export { default as IconButton } from "./components/IconButton.svelte";
|
|
5
|
-
export { default as Chip } from "./components/Chip.svelte";
|
|
3
|
+
// export { default as PrimaryButton } from "./components/PrimaryButton.svelte";
|
|
4
|
+
// export { default as IconButton } from "./components/IconButton.svelte";
|
|
5
|
+
// export { default as Chip } from "./components/Chip.svelte";
|
|
6
6
|
export { default as HorizontalTabs } from "./components/HorizontalTabs.svelte";
|
|
7
7
|
export { default as ProfileMenu } from "./components/ProfileMenu.svelte";
|
|
8
8
|
export { default as Breadcrumbs } from "./components/Breadcrumbs.svelte";
|
|
@@ -20,12 +20,12 @@ export { default as DocsIcon } from "./assets/docs-icon.svg";
|
|
|
20
20
|
|
|
21
21
|
//legacy components
|
|
22
22
|
export { default as SpinnerMessage } from "./atoms/SpinnerMessage.svelte";
|
|
23
|
-
export { default as TextOnlyButton } from "./atoms/TextOnlyButton.svelte";
|
|
23
|
+
// export { default as TextOnlyButton } from "./atoms/TextOnlyButton.svelte";
|
|
24
24
|
|
|
25
25
|
export { default as TextInput } from "./components/Inputs/TextInput.svelte";
|
|
26
26
|
export { default as PasswordInput } from "./components/Inputs/PasswordInput.svelte";
|
|
27
27
|
export { default as PasswordStrengthValidator } from "./components/PasswordStrengthValidator.svelte";
|
|
28
|
-
export { default as Tooltip } from "./components/Tooltip.svelte";
|
|
28
|
+
// export { default as Tooltip } from "./components/Tooltip.svelte";
|
|
29
29
|
|
|
30
|
-
// new base components using bits-ui
|
|
31
|
-
|
|
30
|
+
// new base components using bits-ui should all be imported from their own folder
|
|
31
|
+
// import { Button } from "@stubber/ui/button";
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
@import url("https://fonts.googleapis.com/css2?family=Inconsolata:wght@200..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
|
|
2
2
|
|
|
3
|
+
html,
|
|
4
|
+
body {
|
|
5
|
+
font-family: "Inter", Arial, Helvetica, sans-serif;
|
|
6
|
+
}
|
|
7
|
+
|
|
3
8
|
@layer base {
|
|
4
9
|
.text-heading-1,
|
|
5
10
|
.text-heading-2,
|
|
@@ -116,4 +121,4 @@
|
|
|
116
121
|
font-weight: 300;
|
|
117
122
|
}
|
|
118
123
|
}
|
|
119
|
-
}
|
|
124
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stubber/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
|
-
"build": "vite build &&
|
|
6
|
+
"build": "vite build && pnpm run package && node ./fix_dts_imports.js",
|
|
7
7
|
"preview": "vite preview",
|
|
8
8
|
"package": "svelte-kit sync && svelte-package && cp src/app.css dist/ && cp -r src/styles dist/ && cp tailwind.config.js dist/ && publint",
|
|
9
|
-
"prepublishOnly": "npm run package",
|
|
10
9
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
11
10
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
12
11
|
"storybook": "storybook dev -p 6006",
|
|
@@ -20,7 +19,11 @@
|
|
|
20
19
|
},
|
|
21
20
|
"./app.css": "./dist/app.css",
|
|
22
21
|
"./styles/*": "./dist/styles/*",
|
|
23
|
-
"./tailwind.config.js": "./dist/tailwind.config.js"
|
|
22
|
+
"./tailwind.config.js": "./dist/tailwind.config.js",
|
|
23
|
+
"./*": {
|
|
24
|
+
"types": "./dist/components/*/index.d.ts",
|
|
25
|
+
"svelte": "./dist/components/*/index.js"
|
|
26
|
+
}
|
|
24
27
|
},
|
|
25
28
|
"files": [
|
|
26
29
|
"dist"
|
|
@@ -29,32 +32,30 @@
|
|
|
29
32
|
"svelte": "^4.2.19"
|
|
30
33
|
},
|
|
31
34
|
"devDependencies": {
|
|
32
|
-
"@storybook/addon-essentials": "^
|
|
33
|
-
"@storybook/addon-interactions": "^
|
|
34
|
-
"@storybook/addon-links": "^
|
|
35
|
-
"@storybook/addon-postcss": "^2.0.0",
|
|
35
|
+
"@storybook/addon-essentials": "^8.4.7",
|
|
36
|
+
"@storybook/addon-interactions": "^8.4.7",
|
|
37
|
+
"@storybook/addon-links": "^8.4.7",
|
|
36
38
|
"@storybook/addon-svelte-csf": "^4.2.0",
|
|
37
|
-
"@storybook/blocks": "^
|
|
38
|
-
"@storybook/svelte": "^
|
|
39
|
-
"@storybook/sveltekit": "^
|
|
40
|
-
"@storybook/
|
|
41
|
-
"@sveltejs/adapter-
|
|
42
|
-
"@sveltejs/kit": "^
|
|
39
|
+
"@storybook/blocks": "^8.4.7",
|
|
40
|
+
"@storybook/svelte": "^8.4.7",
|
|
41
|
+
"@storybook/sveltekit": "^8.4.7",
|
|
42
|
+
"@storybook/test": "^8.4.7",
|
|
43
|
+
"@sveltejs/adapter-node": "^2.0.0",
|
|
44
|
+
"@sveltejs/kit": "^2.0.0",
|
|
43
45
|
"@sveltejs/package": "^2.0.0",
|
|
46
|
+
"@sveltejs/vite-plugin-svelte": "^3.0.0",
|
|
44
47
|
"autoprefixer": "^10.4.14",
|
|
45
48
|
"postcss": "^8.4.21",
|
|
46
49
|
"prettier": "^2.8.7",
|
|
47
50
|
"prettier-plugin-svelte": "^2.10.0",
|
|
48
51
|
"publint": "^0.1.9",
|
|
49
|
-
"
|
|
50
|
-
"react-dom": "^18.2.0",
|
|
51
|
-
"storybook": "^7.0.0-rc.9",
|
|
52
|
+
"storybook": "^8.4.7",
|
|
52
53
|
"svelte": "^4.2.19",
|
|
53
54
|
"svelte-check": "^3.0.1",
|
|
54
55
|
"tailwindcss": "^3.3.0",
|
|
55
56
|
"tslib": "^2.4.1",
|
|
56
57
|
"typescript": "^5.0.0",
|
|
57
|
-
"vite": "^
|
|
58
|
+
"vite": "^5.0.0"
|
|
58
59
|
},
|
|
59
60
|
"svelte": "./dist/index.js",
|
|
60
61
|
"types": "./dist/index.d.ts",
|
|
@@ -65,7 +66,15 @@
|
|
|
65
66
|
"svelte-popperjs": "^1.3.2",
|
|
66
67
|
"svelte-select": "^5.6.0",
|
|
67
68
|
"svelte-sonner": "^0.3.28",
|
|
69
|
+
"tailwind-merge": "^2.5.5",
|
|
68
70
|
"tailwind-variants": "^0.3.0",
|
|
69
71
|
"tippy.js": "^6.3.7"
|
|
72
|
+
},
|
|
73
|
+
"pnpm": {
|
|
74
|
+
"onlyBuiltDependencies": [
|
|
75
|
+
"@sveltejs/kit",
|
|
76
|
+
"esbuild",
|
|
77
|
+
"svelte-preprocess"
|
|
78
|
+
]
|
|
70
79
|
}
|
|
71
80
|
}
|