singularity-components 0.1.194 → 0.1.195
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/components/blocks/cards/blogpost-card.d.ts +2 -2
- package/dist/components/blocks/cards/card.d.ts +7 -8
- package/dist/components/blocks/empty-state/EmptyState.d.ts +2 -2
- package/dist/components/blocks/index.d.ts +1 -1
- package/dist/components/blocks/index.js +1 -0
- package/dist/components/blocks/index.js.map +1 -1
- package/dist/components/blocks/login/login.d.ts +78 -0
- package/dist/components/blocks/login/login.js +95 -0
- package/dist/components/blocks/login/login.js.map +1 -0
- package/dist/components/blocks/post-list/post-filters.d.ts +2 -2
- package/dist/components/blocks/post-list/post-list-with-filters.d.ts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/pages/admin/admin-page.d.ts +2 -2
- package/dist/components/pages/blogpost/blogpost.d.ts +2 -2
- package/dist/components/pages/category/category-page.d.ts +2 -2
- package/dist/components/pages/chat/chat-page.d.ts +2 -2
- package/dist/components/pages/index.d.ts +1 -1
- package/dist/components/pages/login/login-page.d.ts +2 -2
- package/dist/components/pages/login/login-page.js +19 -69
- package/dist/components/pages/login/login-page.js.map +1 -1
- package/dist/components/pages/maintenance/maintenance-page.d.ts +2 -2
- package/dist/components/pages/not-found/not-found.d.ts +2 -2
- package/dist/components/pages/privacy/privacy-page.d.ts +2 -2
- package/dist/components/pages/search/search-page.d.ts +2 -2
- package/dist/components/pages/startpage/startpage.d.ts +2 -2
- package/dist/components/pages/terms/terms-page.d.ts +2 -2
- package/dist/components/primitives/accordion/accordion.d.ts +5 -5
- package/dist/components/primitives/alert/alert.d.ts +4 -5
- package/dist/components/primitives/avatar/avatar.d.ts +6 -7
- package/dist/components/primitives/badge/badges.d.ts +1 -2
- package/dist/components/primitives/buttons/button.d.ts +2 -2
- package/dist/components/primitives/buttons/icon-button.d.ts +2 -2
- package/dist/components/primitives/buttons/link-button.d.ts +2 -3
- package/dist/components/primitives/collapsible/collapsible.d.ts +3 -4
- package/dist/components/primitives/dropdown-menu/dropdown-menu.d.ts +1 -2
- package/dist/components/primitives/forms/checkbox.d.ts +2 -2
- package/dist/components/primitives/forms/field.d.ts +11 -12
- package/dist/components/primitives/forms/input.d.ts +1 -2
- package/dist/components/primitives/forms/select.d.ts +7 -8
- package/dist/components/primitives/forms/textarea.d.ts +1 -2
- package/dist/components/primitives/icon/icon.d.ts +1 -2
- package/dist/components/primitives/index.d.ts +2 -3
- package/dist/components/primitives/label/label.d.ts +1 -2
- package/dist/components/primitives/layout/layout.d.ts +4 -3
- package/dist/components/primitives/layout/layout.js.map +1 -1
- package/dist/components/primitives/link/link.d.ts +2 -3
- package/dist/components/primitives/separator/separator.d.ts +2 -2
- package/dist/components/primitives/sheet/sheet.d.ts +2 -3
- package/dist/components/primitives/skeleton/skeleton.d.ts +2 -2
- package/dist/components/primitives/sonner/sonner.d.ts +2 -2
- package/dist/components/primitives/spinner/spinner.d.ts +2 -2
- package/dist/components/primitives/stack/stack.d.ts +45 -1
- package/dist/components/primitives/stack/stack.js +44 -42
- package/dist/components/primitives/stack/stack.js.map +1 -1
- package/dist/components/primitives/text/heading.d.ts +2 -3
- package/dist/components/primitives/text/internal/text-element.d.ts +1 -2
- package/dist/components/primitives/text/text-code.d.ts +2 -2
- package/dist/components/primitives/text/text-div.d.ts +2 -3
- package/dist/components/primitives/text/text-span.d.ts +2 -3
- package/dist/components/primitives/text/text-time.d.ts +2 -3
- package/dist/components/primitives/text/text.d.ts +2 -3
- package/dist/components/primitives/ui-image/ui-image.d.ts +2 -3
- package/dist/components/primitives/ui-link/ui-link.d.ts +2 -3
- package/dist/components/providers/SingularityContext.d.ts +0 -1
- package/dist/components/providers/auth-provider.d.ts +2 -2
- package/dist/components/providers/index.d.ts +0 -1
- package/dist/components/providers/theme-provider.d.ts +1 -2
- package/dist/components/templates/container/container.d.ts +4 -5
- package/dist/components/templates/footer/footer.d.ts +2 -2
- package/dist/components/templates/form/form.d.ts +2 -2
- package/dist/components/templates/hero/hero.d.ts +2 -2
- package/dist/components/templates/index.d.ts +0 -1
- package/dist/components/templates/navigation/header.d.ts +1 -2
- package/dist/components/templates/navigation/index.d.ts +0 -1
- package/dist/index.d.ts +2 -2
- package/dist/main.css +47 -31
- package/dist/main.css.map +1 -1
- package/package.json +52 -39
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { Avatar as Avatar$1 } from '@base-ui/react';
|
|
4
3
|
|
|
5
4
|
declare function Avatar({ className, size, ...props }: Avatar$1.Root.Props & {
|
|
6
5
|
size?: "default" | "sm" | "lg";
|
|
7
|
-
}):
|
|
8
|
-
declare function AvatarImage({ className, ...props }: Avatar$1.Image.Props):
|
|
9
|
-
declare function AvatarFallback({ className, ...props }: Avatar$1.Fallback.Props):
|
|
10
|
-
declare function AvatarBadge({ className, ...props }: React.ComponentProps<"span">):
|
|
11
|
-
declare function AvatarGroup({ className, ...props }: React.ComponentProps<"div">):
|
|
12
|
-
declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">):
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
declare function AvatarImage({ className, ...props }: Avatar$1.Image.Props): React.JSX.Element;
|
|
8
|
+
declare function AvatarFallback({ className, ...props }: Avatar$1.Fallback.Props): React.JSX.Element;
|
|
9
|
+
declare function AvatarBadge({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
10
|
+
declare function AvatarGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
+
declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
13
12
|
|
|
14
13
|
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
|
|
4
3
|
interface BadgesProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
4
|
}
|
|
6
|
-
declare const Badges: ({ children, className, ...props }: BadgesProps) =>
|
|
5
|
+
declare const Badges: ({ children, className, ...props }: BadgesProps) => React.JSX.Element;
|
|
7
6
|
|
|
8
7
|
export { Badges, type BadgesProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
3
|
import { Button as Button$1 } from '@base-ui/react/button';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -33,6 +33,6 @@ type Props = Button$1.Props & VariantProps<typeof buttonVariantsProps> & {
|
|
|
33
33
|
iconEndAnimate?: boolean;
|
|
34
34
|
iconEndFill?: boolean;
|
|
35
35
|
};
|
|
36
|
-
declare function Button({ className, variant, size, loading, iconStart, iconStartAnimate, iconStartFill, iconEnd, iconEndAnimate, iconEndFill, ...props }: Props):
|
|
36
|
+
declare function Button({ className, variant, size, loading, iconStart, iconStartAnimate, iconStartFill, iconEnd, iconEndAnimate, iconEndFill, ...props }: Props): React.JSX.Element;
|
|
37
37
|
|
|
38
38
|
export { Button, buttonVariants, buttonVariantsProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
3
|
import { Button } from '@base-ui/react/button';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -28,6 +28,6 @@ type Props = Button.Props & VariantProps<typeof iconButtonVariantsProps> & {
|
|
|
28
28
|
iconFill?: boolean;
|
|
29
29
|
"aria-label": string;
|
|
30
30
|
};
|
|
31
|
-
declare function IconButton({ className, variant, size, icon, iconFill, "aria-label": ariaLabel, ...props }: Props):
|
|
31
|
+
declare function IconButton({ className, variant, size, icon, iconFill, "aria-label": ariaLabel, ...props }: Props): React.JSX.Element;
|
|
32
32
|
|
|
33
33
|
export { IconButton, buttonIconVariants, iconButtonVariantsProps };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { BaseLinkProps } from '../../providers/LinkContext.js';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
import { buttonVariantsProps } from './button.js';
|
|
5
5
|
import { icons } from 'lucide-react';
|
|
6
|
-
import 'react';
|
|
7
6
|
import 'class-variance-authority/types';
|
|
8
7
|
import '@base-ui/react/button';
|
|
9
8
|
|
|
@@ -11,6 +10,6 @@ type Props = BaseLinkProps & VariantProps<typeof buttonVariantsProps> & {
|
|
|
11
10
|
iconStart?: keyof typeof icons;
|
|
12
11
|
iconEnd?: keyof typeof icons;
|
|
13
12
|
};
|
|
14
|
-
declare const LinkButton: ({ className, variant, size, iconStart, iconEnd, ...props }: Props) =>
|
|
13
|
+
declare const LinkButton: ({ className, variant, size, iconStart, iconEnd, ...props }: Props) => React.JSX.Element;
|
|
15
14
|
|
|
16
15
|
export { LinkButton };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
4
3
|
|
|
5
|
-
declare function Collapsible({ className, ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>):
|
|
6
|
-
declare function CollapsibleTrigger({ className, ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>):
|
|
7
|
-
declare function CollapsibleContent({ className, ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>):
|
|
4
|
+
declare function Collapsible({ className, ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): React.JSX.Element;
|
|
5
|
+
declare function CollapsibleTrigger({ className, ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): React.JSX.Element;
|
|
6
|
+
declare function CollapsibleContent({ className, ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): React.JSX.Element;
|
|
8
7
|
|
|
9
8
|
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
4
3
|
|
|
@@ -23,7 +22,7 @@ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMe
|
|
|
23
22
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
24
23
|
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
24
|
declare const DropdownMenuShortcut: {
|
|
26
|
-
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>):
|
|
25
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
|
|
27
26
|
displayName: string;
|
|
28
27
|
};
|
|
29
28
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { Checkbox as Checkbox$1 } from '@base-ui/react';
|
|
3
3
|
|
|
4
|
-
declare function Checkbox({ className, ...props }: Checkbox$1.Root.Props):
|
|
4
|
+
declare function Checkbox({ className, ...props }: Checkbox$1.Root.Props): React.JSX.Element;
|
|
5
5
|
|
|
6
6
|
export { Checkbox };
|
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
-
import * as
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
import { Label } from '../label/label.js';
|
|
5
|
-
import 'react';
|
|
6
5
|
|
|
7
|
-
declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">):
|
|
6
|
+
declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): React$1.JSX.Element;
|
|
8
7
|
declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
|
|
9
8
|
variant?: "legend" | "label";
|
|
10
|
-
}):
|
|
11
|
-
declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">):
|
|
9
|
+
}): React$1.JSX.Element;
|
|
10
|
+
declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
|
|
12
11
|
declare const fieldVariants: (props?: ({
|
|
13
12
|
orientation?: "vertical" | "horizontal" | "responsive" | null | undefined;
|
|
14
13
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
-
declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>):
|
|
16
|
-
declare function FieldContent({ className, ...props }: React.ComponentProps<"div">):
|
|
17
|
-
declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>):
|
|
18
|
-
declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">):
|
|
19
|
-
declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">):
|
|
14
|
+
declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): React$1.JSX.Element;
|
|
15
|
+
declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
|
|
16
|
+
declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): React$1.JSX.Element;
|
|
17
|
+
declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
|
|
18
|
+
declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): React$1.JSX.Element;
|
|
20
19
|
declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<"div"> & {
|
|
21
20
|
children?: React.ReactNode;
|
|
22
|
-
}):
|
|
21
|
+
}): React$1.JSX.Element;
|
|
23
22
|
declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<"div"> & {
|
|
24
23
|
errors?: Array<{
|
|
25
24
|
message?: string;
|
|
26
25
|
} | undefined>;
|
|
27
|
-
}):
|
|
26
|
+
}): React$1.JSX.Element | null;
|
|
28
27
|
|
|
29
28
|
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
|
|
4
|
-
declare function Input({ className, type, ...props }: React.ComponentProps<"input">):
|
|
3
|
+
declare function Input({ className, type, ...props }: React.ComponentProps<"input">): React.JSX.Element;
|
|
5
4
|
|
|
6
5
|
export { Input };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as _base_ui_react from '@base-ui/react';
|
|
3
2
|
import { Select as Select$1 } from '@base-ui/react';
|
|
4
3
|
import * as React from 'react';
|
|
@@ -8,15 +7,15 @@ declare const SelectGroup: React.ForwardRefExoticComponent<Omit<_base_ui_react.S
|
|
|
8
7
|
declare const SelectValue: React.ForwardRefExoticComponent<Omit<_base_ui_react.SelectValueProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
9
8
|
declare function SelectTrigger({ className, size, children, ...props }: Select$1.Trigger.Props & {
|
|
10
9
|
size?: "sm" | "default";
|
|
11
|
-
}):
|
|
10
|
+
}): React.JSX.Element;
|
|
12
11
|
declare namespace SelectTrigger {
|
|
13
12
|
var displayName: string | undefined;
|
|
14
13
|
}
|
|
15
|
-
declare function SelectContent({ className, children, side, sideOffset, align, alignOffset, alignItemWithTrigger, ...props }: Select$1.Popup.Props & Pick<Select$1.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger">):
|
|
16
|
-
declare function SelectLabel({ className, ...props }: Select$1.GroupLabel.Props):
|
|
17
|
-
declare function SelectItem({ className, children, ...props }: Select$1.Item.Props):
|
|
18
|
-
declare function SelectSeparator({ className, ...props }: Select$1.Separator.Props):
|
|
19
|
-
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof Select$1.ScrollUpArrow>):
|
|
20
|
-
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof Select$1.ScrollDownArrow>):
|
|
14
|
+
declare function SelectContent({ className, children, side, sideOffset, align, alignOffset, alignItemWithTrigger, ...props }: Select$1.Popup.Props & Pick<Select$1.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger">): React.JSX.Element;
|
|
15
|
+
declare function SelectLabel({ className, ...props }: Select$1.GroupLabel.Props): React.JSX.Element;
|
|
16
|
+
declare function SelectItem({ className, children, ...props }: Select$1.Item.Props): React.JSX.Element;
|
|
17
|
+
declare function SelectSeparator({ className, ...props }: Select$1.Separator.Props): React.JSX.Element;
|
|
18
|
+
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof Select$1.ScrollUpArrow>): React.JSX.Element;
|
|
19
|
+
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof Select$1.ScrollDownArrow>): React.JSX.Element;
|
|
21
20
|
|
|
22
21
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
|
|
4
|
-
declare function Textarea({ className, ...props }: React.ComponentProps<"textarea">):
|
|
3
|
+
declare function Textarea({ className, ...props }: React.ComponentProps<"textarea">): React.JSX.Element;
|
|
5
4
|
|
|
6
5
|
export { Textarea };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -34,6 +33,6 @@ type Props = Omit<React.ComponentProps<LucideIcon>, "size"> & VariantProps<typeo
|
|
|
34
33
|
icon: keyof typeof icons;
|
|
35
34
|
spin?: boolean;
|
|
36
35
|
};
|
|
37
|
-
declare function Icon({ className, size, color, icon, spin, ...props }: Props):
|
|
36
|
+
declare function Icon({ className, size, color, icon, spin, ...props }: Props): React.JSX.Element;
|
|
38
37
|
|
|
39
38
|
export { Icon, iconVariants, iconVariantsProps };
|
|
@@ -20,7 +20,7 @@ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHe
|
|
|
20
20
|
export { Skeleton } from './skeleton/skeleton.js';
|
|
21
21
|
export { Toaster } from './sonner/sonner.js';
|
|
22
22
|
export { Spinner } from './spinner/spinner.js';
|
|
23
|
-
export { Stack, StackProps, stackVariants } from './stack/stack.js';
|
|
23
|
+
export { Stack, StackProps, stackVariantOptions, stackVariants } from './stack/stack.js';
|
|
24
24
|
export { Heading, HeadingProps, headingVariants, headingVariantsProps } from './text/heading.js';
|
|
25
25
|
export { TextCode, TextCodeProps, textCodeVariants, textCodeVariantsProps } from './text/text-code.js';
|
|
26
26
|
export { TextDiv } from './text/text-div.js';
|
|
@@ -30,10 +30,9 @@ export { Text, textVariants, textVariantsProps } from './text/text.js';
|
|
|
30
30
|
export { UiImage } from './ui-image/ui-image.js';
|
|
31
31
|
export { UiLink } from './ui-link/ui-link.js';
|
|
32
32
|
export { toast } from 'sonner';
|
|
33
|
-
import 'react
|
|
33
|
+
import 'react';
|
|
34
34
|
import '@base-ui/react/accordion';
|
|
35
35
|
import 'class-variance-authority/types';
|
|
36
|
-
import 'react';
|
|
37
36
|
import 'class-variance-authority';
|
|
38
37
|
import '@base-ui/react/use-render';
|
|
39
38
|
import '@base-ui/react/button';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
|
|
4
|
-
declare function Label({ className, ...props }: React.ComponentProps<"label">):
|
|
3
|
+
declare function Label({ className, ...props }: React.ComponentProps<"label">): React.JSX.Element;
|
|
5
4
|
|
|
6
5
|
export { Label };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -37,9 +36,11 @@ declare const layoutVariantsProps: (props?: ({
|
|
|
37
36
|
bgColor?: "primary" | "secondary" | "muted" | "accent" | "transparent" | "background" | "gradient1" | "gradient2" | "gradient-masks-and-opacity" | "gradient-primary-primarymuted-secondary" | null | undefined;
|
|
38
37
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
39
38
|
interface LayoutProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof layoutVariantsProps> {
|
|
39
|
+
/** Semantic HTML element for the outer wrapper. Defaults to `div`. */
|
|
40
40
|
as?: "div" | "section" | "article" | "main" | "header" | "footer";
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
/** Grid layout with width constraints (`type`), column templates (`cols`), and background tokens (`bgColor`). */
|
|
43
|
+
declare function Layout({ children, className, type, cols, bgColor, as: Component, ...props }: React.PropsWithChildren<LayoutProps>): React.JSX.Element;
|
|
43
44
|
declare namespace Layout {
|
|
44
45
|
var Col1: typeof Col;
|
|
45
46
|
var Col2: typeof Col;
|
|
@@ -53,6 +54,6 @@ type colProp = {
|
|
|
53
54
|
as?: "div" | "section" | "article" | "main" | "header" | "footer";
|
|
54
55
|
centerContent?: boolean;
|
|
55
56
|
};
|
|
56
|
-
declare function Col({ children, hideDiv, className, as: Component, centerContent, }: colProp):
|
|
57
|
+
declare function Col({ children, hideDiv, className, as: Component, centerContent, }: colProp): React.JSX.Element;
|
|
57
58
|
|
|
58
59
|
export { Layout, type LayoutProps, layoutVariants, layoutVariantsProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/primitives/layout/layout.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport { cva, type VariantProps } from \"class-variance-authority\";\r\nimport { cn } from \"../../../utils/index\";\r\n\r\nconst bgColors = {\r\n transparent: \"sg:bg-transparent\",\r\n background: \"sg:bg-background sg:text-foreground\",\r\n primary: \"sg:bg-primary sg:text-primary-foreground\",\r\n secondary: \"sg:bg-secondary sg:text-secondary-foreground\",\r\n muted: \"sg:bg-muted sg:text-muted-foreground\",\r\n accent: \"sg:bg-accent sg:text-accent-foreground\",\r\n gradient1:\r\n \"sg:bg-[linear-gradient(135deg,var(--sg-primary)_0%,var(--sg-destructive)_50%,var(--sg-primary-dark)_100%)]\",\r\n gradient2:\r\n \"sg:bg-[radial-gradient(1200px_300px_at_10%_-20%,var(--sg-primary-20),transparent),radial-gradient(800px_200px_at_90%_-20%,var(--sg-primary-10),transparent)]\",\r\n \"gradient-masks-and-opacity\": \"bg-brand-mask\", //brand class defined in main.css\r\n \"gradient-primary-primarymuted-secondary\":\r\n \"sg:bg-[linear-gradient(135deg,var(--sg-primary)_0%,var(--sg-primary-muted)_50%,var(--sg-secondary)_100%)]\",\r\n};\r\n\r\nconst layoutVariants = {\r\n type: {\r\n container: \"sg:w-full\",\r\n full: \"sg:w-full sg:px-4\",\r\n wide: \"sg:mx-auto sg:max-w-[1024px] sg:px-4 sg:min-[1056px]:px-0\",\r\n col: \"sg:mx-auto sg:max-w-[768px] sg:px-4 sg:min-[800px]:px-0\",\r\n narrow: \"sg:mx-auto sg:max-w-[410px] sg:px-4 sg:min-[442px]:px-0\",\r\n },\r\n cols: {\r\n \"100\": \"\",\r\n \"66-33\": \"sg:md:grid-cols-[2fr_1fr] sg:gap-4\",\r\n \"50-50\": \"sg:md:grid-cols-2 sg:gap-4\",\r\n \"33-33-33\": \"sg:md:grid-cols-3 sg:gap-4\",\r\n \"25-25-25-25\": \"sg:md:grid-cols-4 sg:gap-4\",\r\n },\r\n bgColor: bgColors,\r\n};\r\n\r\nconst layoutVariantsProps = cva(\"sg:grid sg:grid-cols-1\", {\r\n variants: layoutVariants,\r\n defaultVariants: {\r\n type: \"col\",\r\n cols: \"100\",\r\n },\r\n});\r\n\r\nexport interface LayoutProps\r\n extends\r\n React.HTMLAttributes<HTMLElement>,\r\n VariantProps<typeof layoutVariantsProps> {\r\n as?: \"div\" | \"section\" | \"article\" | \"main\" | \"header\" | \"footer\";\r\n}\r\n\r\nfunction Layout({\r\n children,\r\n className,\r\n type,\r\n cols,\r\n bgColor,\r\n as: Component = \"div\",\r\n ...props\r\n}: React.PropsWithChildren<LayoutProps>) {\r\n const allowedInLayout = (\r\n content: React.ReactElement<any, string | React.JSXElementConstructor<any>>,\r\n ): boolean => {\r\n if (content.type === Layout.Col1) {\r\n return true;\r\n } else if (\r\n content.type === Layout.Col2 &&\r\n (cols === \"66-33\" ||\r\n cols === \"50-50\" ||\r\n cols === \"33-33-33\" ||\r\n cols === \"25-25-25-25\")\r\n ) {\r\n return true;\r\n } else if (\r\n content.type === Layout.Col3 &&\r\n (cols === \"33-33-33\" || cols === \"25-25-25-25\")\r\n ) {\r\n return true;\r\n } else if (content.type === Layout.Col4 && cols === \"25-25-25-25\") {\r\n return true;\r\n }\r\n\r\n console.error(\r\n \"Content not allowed in column for variant\",\r\n cols,\r\n content.type,\r\n );\r\n return false;\r\n };\r\n\r\n const renderColumn = (\r\n content: React.ReactElement<any, string | React.JSXElementConstructor<any>>,\r\n ) => {\r\n if (!allowedInLayout(content)) {\r\n return;\r\n }\r\n return content;\r\n };\r\n\r\n return (\r\n <Component\r\n {...props}\r\n className={cn(bgColors[bgColor ?? \"transparent\"], className)}\r\n >\r\n <div className={cn(layoutVariantsProps({ type, cols }))}>\r\n {React.Children.map(children, (child) =>\r\n React.isValidElement(child) ? renderColumn(child) : <></>,\r\n )}\r\n </div>\r\n </Component>\r\n );\r\n}\r\n\r\ntype colProp = {\r\n children?: React.ReactNode;\r\n hideDiv?: boolean;\r\n className?: string;\r\n as?: \"div\" | \"section\" | \"article\" | \"main\" | \"header\" | \"footer\";\r\n centerContent?: boolean;\r\n};\r\n\r\nfunction Col({\r\n children,\r\n hideDiv,\r\n className,\r\n as: Component = \"div\",\r\n centerContent,\r\n}: colProp) {\r\n return hideDiv ? (\r\n <>{children}</>\r\n ) : (\r\n <Component\r\n className={cn(\r\n centerContent &&\r\n \"sg:flex sg:flex-col sg:items-center sg:justify-center\",\r\n className,\r\n )}\r\n >\r\n {children}\r\n </Component>\r\n );\r\n}\r\n\r\nLayout.Col1 = Col;\r\nLayout.Col2 = Col;\r\nLayout.Col3 = Col;\r\nLayout.Col4 = Col;\r\n\r\nexport { Layout, layoutVariantsProps, layoutVariants };\r\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/primitives/layout/layout.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport { cva, type VariantProps } from \"class-variance-authority\";\r\nimport { cn } from \"../../../utils/index\";\r\n\r\nconst bgColors = {\r\n transparent: \"sg:bg-transparent\",\r\n background: \"sg:bg-background sg:text-foreground\",\r\n primary: \"sg:bg-primary sg:text-primary-foreground\",\r\n secondary: \"sg:bg-secondary sg:text-secondary-foreground\",\r\n muted: \"sg:bg-muted sg:text-muted-foreground\",\r\n accent: \"sg:bg-accent sg:text-accent-foreground\",\r\n gradient1:\r\n \"sg:bg-[linear-gradient(135deg,var(--sg-primary)_0%,var(--sg-destructive)_50%,var(--sg-primary-dark)_100%)]\",\r\n gradient2:\r\n \"sg:bg-[radial-gradient(1200px_300px_at_10%_-20%,var(--sg-primary-20),transparent),radial-gradient(800px_200px_at_90%_-20%,var(--sg-primary-10),transparent)]\",\r\n \"gradient-masks-and-opacity\": \"bg-brand-mask\", //brand class defined in main.css\r\n \"gradient-primary-primarymuted-secondary\":\r\n \"sg:bg-[linear-gradient(135deg,var(--sg-primary)_0%,var(--sg-primary-muted)_50%,var(--sg-secondary)_100%)]\",\r\n};\r\n\r\nconst layoutVariants = {\r\n type: {\r\n container: \"sg:w-full\",\r\n full: \"sg:w-full sg:px-4\",\r\n wide: \"sg:mx-auto sg:max-w-[1024px] sg:px-4 sg:min-[1056px]:px-0\",\r\n col: \"sg:mx-auto sg:max-w-[768px] sg:px-4 sg:min-[800px]:px-0\",\r\n narrow: \"sg:mx-auto sg:max-w-[410px] sg:px-4 sg:min-[442px]:px-0\",\r\n },\r\n cols: {\r\n \"100\": \"\",\r\n \"66-33\": \"sg:md:grid-cols-[2fr_1fr] sg:gap-4\",\r\n \"50-50\": \"sg:md:grid-cols-2 sg:gap-4\",\r\n \"33-33-33\": \"sg:md:grid-cols-3 sg:gap-4\",\r\n \"25-25-25-25\": \"sg:md:grid-cols-4 sg:gap-4\",\r\n },\r\n bgColor: bgColors,\r\n};\r\n\r\nconst layoutVariantsProps = cva(\"sg:grid sg:grid-cols-1\", {\r\n variants: layoutVariants,\r\n defaultVariants: {\r\n type: \"col\",\r\n cols: \"100\",\r\n },\r\n});\r\n\r\nexport interface LayoutProps\r\n extends\r\n React.HTMLAttributes<HTMLElement>,\r\n VariantProps<typeof layoutVariantsProps> {\r\n /** Semantic HTML element for the outer wrapper. Defaults to `div`. */\r\n as?: \"div\" | \"section\" | \"article\" | \"main\" | \"header\" | \"footer\";\r\n}\r\n\r\n/** Grid layout with width constraints (`type`), column templates (`cols`), and background tokens (`bgColor`). */\r\nfunction Layout({\r\n children,\r\n className,\r\n type,\r\n cols,\r\n bgColor,\r\n as: Component = \"div\",\r\n ...props\r\n}: React.PropsWithChildren<LayoutProps>) {\r\n const allowedInLayout = (\r\n content: React.ReactElement<any, string | React.JSXElementConstructor<any>>,\r\n ): boolean => {\r\n if (content.type === Layout.Col1) {\r\n return true;\r\n } else if (\r\n content.type === Layout.Col2 &&\r\n (cols === \"66-33\" ||\r\n cols === \"50-50\" ||\r\n cols === \"33-33-33\" ||\r\n cols === \"25-25-25-25\")\r\n ) {\r\n return true;\r\n } else if (\r\n content.type === Layout.Col3 &&\r\n (cols === \"33-33-33\" || cols === \"25-25-25-25\")\r\n ) {\r\n return true;\r\n } else if (content.type === Layout.Col4 && cols === \"25-25-25-25\") {\r\n return true;\r\n }\r\n\r\n console.error(\r\n \"Content not allowed in column for variant\",\r\n cols,\r\n content.type,\r\n );\r\n return false;\r\n };\r\n\r\n const renderColumn = (\r\n content: React.ReactElement<any, string | React.JSXElementConstructor<any>>,\r\n ) => {\r\n if (!allowedInLayout(content)) {\r\n return;\r\n }\r\n return content;\r\n };\r\n\r\n return (\r\n <Component\r\n {...props}\r\n className={cn(bgColors[bgColor ?? \"transparent\"], className)}\r\n >\r\n <div className={cn(layoutVariantsProps({ type, cols }))}>\r\n {React.Children.map(children, (child) =>\r\n React.isValidElement(child) ? renderColumn(child) : <></>,\r\n )}\r\n </div>\r\n </Component>\r\n );\r\n}\r\n\r\ntype colProp = {\r\n children?: React.ReactNode;\r\n hideDiv?: boolean;\r\n className?: string;\r\n as?: \"div\" | \"section\" | \"article\" | \"main\" | \"header\" | \"footer\";\r\n centerContent?: boolean;\r\n};\r\n\r\nfunction Col({\r\n children,\r\n hideDiv,\r\n className,\r\n as: Component = \"div\",\r\n centerContent,\r\n}: colProp) {\r\n return hideDiv ? (\r\n <>{children}</>\r\n ) : (\r\n <Component\r\n className={cn(\r\n centerContent &&\r\n \"sg:flex sg:flex-col sg:items-center sg:justify-center\",\r\n className,\r\n )}\r\n >\r\n {children}\r\n </Component>\r\n );\r\n}\r\n\r\nLayout.Col1 = Col;\r\nLayout.Col2 = Col;\r\nLayout.Col3 = Col;\r\nLayout.Col4 = Col;\r\n\r\nexport { Layout, layoutVariantsProps, layoutVariants };\r\n"],"mappings":"AA8G8D;AA9G9D,YAAY,WAAW;AACvB,SAAS,WAA8B;AACvC,SAAS,UAAU;AAEnB,MAAM,WAAW;AAAA,EACf,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,WAAW;AAAA,EACX,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,WACE;AAAA,EACF,WACE;AAAA,EACF,8BAA8B;AAAA;AAAA,EAC9B,2CACE;AACJ;AAEA,MAAM,iBAAiB;AAAA,EACrB,MAAM;AAAA,IACJ,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,KAAK;AAAA,IACL,QAAQ;AAAA,EACV;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,eAAe;AAAA,EACjB;AAAA,EACA,SAAS;AACX;AAEA,MAAM,sBAAsB,IAAI,0BAA0B;AAAA,EACxD,UAAU;AAAA,EACV,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,MAAM;AAAA,EACR;AACF,CAAC;AAWD,SAAS,OAAO;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,IAAI,YAAY;AAAA,EAChB,GAAG;AACL,GAAyC;AACvC,QAAM,kBAAkB,CACtB,YACY;AACZ,QAAI,QAAQ,SAAS,OAAO,MAAM;AAChC,aAAO;AAAA,IACT,WACE,QAAQ,SAAS,OAAO,SACvB,SAAS,WACR,SAAS,WACT,SAAS,cACT,SAAS,gBACX;AACA,aAAO;AAAA,IACT,WACE,QAAQ,SAAS,OAAO,SACvB,SAAS,cAAc,SAAS,gBACjC;AACA,aAAO;AAAA,IACT,WAAW,QAAQ,SAAS,OAAO,QAAQ,SAAS,eAAe;AACjE,aAAO;AAAA,IACT;AAEA,YAAQ;AAAA,MACN;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,IACV;AACA,WAAO;AAAA,EACT;AAEA,QAAM,eAAe,CACnB,YACG;AACH,QAAI,CAAC,gBAAgB,OAAO,GAAG;AAC7B;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,SAAS,WAAW,aAAa,GAAG,SAAS;AAAA,MAE3D,8BAAC,SAAI,WAAW,GAAG,oBAAoB,EAAE,MAAM,KAAK,CAAC,CAAC,GACnD,gBAAM,SAAS;AAAA,QAAI;AAAA,QAAU,CAAC,UAC7B,MAAM,eAAe,KAAK,IAAI,aAAa,KAAK,IAAI,gCAAE;AAAA,MACxD,GACF;AAAA;AAAA,EACF;AAEJ;AAUA,SAAS,IAAI;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA,IAAI,YAAY;AAAA,EAChB;AACF,GAAY;AACV,SAAO,UACL,gCAAG,UAAS,IAEZ;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT,iBACE;AAAA,QACF;AAAA,MACF;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;AAEA,OAAO,OAAO;AACd,OAAO,OAAO;AACd,OAAO,OAAO;AACd,OAAO,OAAO;","names":[]}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
3
|
import { BaseLinkProps } from '../../providers/LinkContext.js';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
import { icons } from 'lucide-react';
|
|
6
|
-
import 'react';
|
|
7
6
|
|
|
8
7
|
declare const linkVariants: {
|
|
9
8
|
variant: {
|
|
@@ -37,6 +36,6 @@ type Props = BaseLinkProps & VariantProps<typeof linkVariantsProps> & {
|
|
|
37
36
|
iconStart?: keyof typeof icons;
|
|
38
37
|
iconEnd?: keyof typeof icons;
|
|
39
38
|
};
|
|
40
|
-
declare const Link: ({ className, variant, size, iconStart, iconEnd, ...props }: Props) =>
|
|
39
|
+
declare const Link: ({ className, variant, size, iconStart, iconEnd, ...props }: Props) => React.JSX.Element;
|
|
41
40
|
|
|
42
41
|
export { Link, linkVariants };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { Separator as Separator$1 } from '@base-ui/react/separator';
|
|
3
3
|
|
|
4
|
-
declare function Separator({ className, orientation, ...props }: Separator$1.Props):
|
|
4
|
+
declare function Separator({ className, orientation, ...props }: Separator$1.Props): React.JSX.Element;
|
|
5
5
|
|
|
6
6
|
export { Separator };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
@@ -16,11 +15,11 @@ interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetP
|
|
|
16
15
|
}
|
|
17
16
|
declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
17
|
declare const SheetHeader: {
|
|
19
|
-
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>):
|
|
18
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
20
19
|
displayName: string;
|
|
21
20
|
};
|
|
22
21
|
declare const SheetFooter: {
|
|
23
|
-
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>):
|
|
22
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
24
23
|
displayName: string;
|
|
25
24
|
};
|
|
26
25
|
declare const SheetTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
2
|
|
|
3
|
-
declare function Skeleton({ className, ...props }: React.ComponentProps<"div">):
|
|
3
|
+
declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
|
|
4
4
|
|
|
5
5
|
export { Skeleton };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ToasterProps } from 'sonner';
|
|
3
3
|
export { toast } from 'sonner';
|
|
4
4
|
|
|
5
|
-
declare const Toaster: ({ ...props }: ToasterProps) =>
|
|
5
|
+
declare const Toaster: ({ ...props }: ToasterProps) => React.JSX.Element;
|
|
6
6
|
|
|
7
7
|
export { Toaster };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
2
|
|
|
3
|
-
declare function Spinner({ className, ...props }: React.ComponentProps<"svg">):
|
|
3
|
+
declare function Spinner({ className, ...props }: React.ComponentProps<"svg">): React$1.JSX.Element;
|
|
4
4
|
|
|
5
5
|
export { Spinner };
|
|
@@ -2,6 +2,48 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
|
|
5
|
+
declare const stackVariantOptions: {
|
|
6
|
+
gap: {
|
|
7
|
+
0: string;
|
|
8
|
+
1: string;
|
|
9
|
+
2: string;
|
|
10
|
+
3: string;
|
|
11
|
+
4: string;
|
|
12
|
+
5: string;
|
|
13
|
+
6: string;
|
|
14
|
+
7: string;
|
|
15
|
+
8: string;
|
|
16
|
+
9: string;
|
|
17
|
+
10: string;
|
|
18
|
+
11: string;
|
|
19
|
+
12: string;
|
|
20
|
+
13: string;
|
|
21
|
+
14: string;
|
|
22
|
+
15: string;
|
|
23
|
+
16: string;
|
|
24
|
+
};
|
|
25
|
+
direction: {
|
|
26
|
+
column: string;
|
|
27
|
+
row: string;
|
|
28
|
+
};
|
|
29
|
+
wrap: {
|
|
30
|
+
default: string;
|
|
31
|
+
wrap: string;
|
|
32
|
+
nowrap: string;
|
|
33
|
+
};
|
|
34
|
+
alignItems: {
|
|
35
|
+
default: string;
|
|
36
|
+
start: string;
|
|
37
|
+
center: string;
|
|
38
|
+
end: string;
|
|
39
|
+
};
|
|
40
|
+
justifyContent: {
|
|
41
|
+
default: string;
|
|
42
|
+
start: string;
|
|
43
|
+
center: string;
|
|
44
|
+
end: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
5
47
|
declare const stackVariants: (props?: ({
|
|
6
48
|
gap?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | null | undefined;
|
|
7
49
|
direction?: "row" | "column" | null | undefined;
|
|
@@ -10,8 +52,10 @@ declare const stackVariants: (props?: ({
|
|
|
10
52
|
justifyContent?: "center" | "default" | "end" | "start" | null | undefined;
|
|
11
53
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
54
|
interface StackProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof stackVariants> {
|
|
55
|
+
/** Merge props onto the child via Radix Slot instead of rendering a wrapper div. */
|
|
13
56
|
asChild?: boolean;
|
|
14
57
|
}
|
|
58
|
+
/** Flex stack with tokenized `gap`, `direction`, and alignment variants. Prefer `gap` over margin on children. */
|
|
15
59
|
declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
60
|
|
|
17
|
-
export { Stack, type StackProps, stackVariants };
|
|
61
|
+
export { Stack, type StackProps, stackVariantOptions, stackVariants };
|
|
@@ -3,49 +3,50 @@ import { Slot } from "@radix-ui/react-slot";
|
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { cn } from "../../../utils/index.js";
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
end: "sg:items-end"
|
|
41
|
-
},
|
|
42
|
-
justifyContent: {
|
|
43
|
-
default: "",
|
|
44
|
-
start: "sg:justify-start",
|
|
45
|
-
center: "sg:justify-center",
|
|
46
|
-
end: "sg:justify-end"
|
|
47
|
-
}
|
|
6
|
+
const stackVariantOptions = {
|
|
7
|
+
gap: {
|
|
8
|
+
0: "",
|
|
9
|
+
1: "sg:gap-1",
|
|
10
|
+
2: "sg:gap-2",
|
|
11
|
+
3: "sg:gap-3",
|
|
12
|
+
4: "sg:gap-4",
|
|
13
|
+
5: "sg:gap-5",
|
|
14
|
+
6: "sg:gap-6",
|
|
15
|
+
7: "sg:gap-7",
|
|
16
|
+
8: "sg:gap-8",
|
|
17
|
+
9: "sg:gap-9",
|
|
18
|
+
10: "sg:gap-10",
|
|
19
|
+
11: "sg:gap-11",
|
|
20
|
+
12: "sg:gap-12",
|
|
21
|
+
13: "sg:gap-13",
|
|
22
|
+
14: "sg:gap-14",
|
|
23
|
+
15: "sg:gap-15",
|
|
24
|
+
16: "sg:gap-16"
|
|
25
|
+
},
|
|
26
|
+
direction: {
|
|
27
|
+
column: "sg:flex-col",
|
|
28
|
+
row: "sg:flex-row"
|
|
29
|
+
},
|
|
30
|
+
wrap: {
|
|
31
|
+
default: "",
|
|
32
|
+
wrap: "sg:flex-wrap",
|
|
33
|
+
nowrap: "sg:flex-nowrap"
|
|
34
|
+
},
|
|
35
|
+
alignItems: {
|
|
36
|
+
default: "",
|
|
37
|
+
start: "sg:items-start",
|
|
38
|
+
center: "sg:items-center",
|
|
39
|
+
end: "sg:items-end"
|
|
48
40
|
},
|
|
41
|
+
justifyContent: {
|
|
42
|
+
default: "",
|
|
43
|
+
start: "sg:justify-start",
|
|
44
|
+
center: "sg:justify-center",
|
|
45
|
+
end: "sg:justify-end"
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const stackVariants = cva("sg:flex sg:flex-col", {
|
|
49
|
+
variants: stackVariantOptions,
|
|
49
50
|
defaultVariants: {
|
|
50
51
|
gap: 0,
|
|
51
52
|
direction: "column",
|
|
@@ -80,6 +81,7 @@ const Stack = React.forwardRef(
|
|
|
80
81
|
Stack.displayName = "Stack";
|
|
81
82
|
export {
|
|
82
83
|
Stack,
|
|
84
|
+
stackVariantOptions,
|
|
83
85
|
stackVariants
|
|
84
86
|
};
|
|
85
87
|
//# sourceMappingURL=stack.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/primitives/stack/stack.tsx"],"sourcesContent":["import { Slot } from \"@radix-ui/react-slot\";\r\nimport { cva, type VariantProps } from \"class-variance-authority\";\r\nimport * as React from \"react\";\r\nimport { cn } from \"../../../utils/index\";\r\n\r\nconst
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/primitives/stack/stack.tsx"],"sourcesContent":["import { Slot } from \"@radix-ui/react-slot\";\r\nimport { cva, type VariantProps } from \"class-variance-authority\";\r\nimport * as React from \"react\";\r\nimport { cn } from \"../../../utils/index\";\r\n\r\nconst stackVariantOptions = {\r\n gap: {\r\n 0: \"\",\r\n 1: \"sg:gap-1\",\r\n 2: \"sg:gap-2\",\r\n 3: \"sg:gap-3\",\r\n 4: \"sg:gap-4\",\r\n 5: \"sg:gap-5\",\r\n 6: \"sg:gap-6\",\r\n 7: \"sg:gap-7\",\r\n 8: \"sg:gap-8\",\r\n 9: \"sg:gap-9\",\r\n 10: \"sg:gap-10\",\r\n 11: \"sg:gap-11\",\r\n 12: \"sg:gap-12\",\r\n 13: \"sg:gap-13\",\r\n 14: \"sg:gap-14\",\r\n 15: \"sg:gap-15\",\r\n 16: \"sg:gap-16\",\r\n },\r\n direction: {\r\n column: \"sg:flex-col\",\r\n row: \"sg:flex-row\",\r\n },\r\n wrap: {\r\n default: \"\",\r\n wrap: \"sg:flex-wrap\",\r\n nowrap: \"sg:flex-nowrap\",\r\n },\r\n alignItems: {\r\n default: \"\",\r\n start: \"sg:items-start\",\r\n center: \"sg:items-center\",\r\n end: \"sg:items-end\",\r\n },\r\n justifyContent: {\r\n default: \"\",\r\n start: \"sg:justify-start\",\r\n center: \"sg:justify-center\",\r\n end: \"sg:justify-end\",\r\n },\r\n};\r\n\r\nconst stackVariants = cva(\"sg:flex sg:flex-col\", {\r\n variants: stackVariantOptions,\r\n defaultVariants: {\r\n gap: 0,\r\n direction: \"column\",\r\n wrap: \"default\",\r\n },\r\n});\r\n\r\nexport interface StackProps\r\n extends\r\n React.HTMLAttributes<HTMLDivElement>,\r\n VariantProps<typeof stackVariants> {\r\n /** Merge props onto the child via Radix Slot instead of rendering a wrapper div. */\r\n asChild?: boolean;\r\n}\r\n\r\n/** Flex stack with tokenized `gap`, `direction`, and alignment variants. Prefer `gap` over margin on children. */\r\nconst Stack = React.forwardRef<HTMLDivElement, StackProps>(\r\n (\r\n {\r\n className,\r\n gap,\r\n direction,\r\n wrap,\r\n alignItems,\r\n justifyContent,\r\n asChild = false,\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const Comp = asChild ? Slot : \"div\";\r\n return (\r\n <Comp\r\n className={cn(\r\n stackVariants({ gap, direction, wrap, alignItems, justifyContent }),\r\n className,\r\n )}\r\n ref={ref}\r\n {...props}\r\n />\r\n );\r\n },\r\n);\r\nStack.displayName = \"Stack\";\r\n\r\nexport { Stack, stackVariantOptions, stackVariants };\r\n"],"mappings":"AAkFM;AAlFN,SAAS,YAAY;AACrB,SAAS,WAA8B;AACvC,YAAY,WAAW;AACvB,SAAS,UAAU;AAEnB,MAAM,sBAAsB;AAAA,EAC1B,KAAK;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AAAA,EACA,WAAW;AAAA,IACT,QAAQ;AAAA,IACR,KAAK;AAAA,EACP;AAAA,EACA,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,MAAM;AAAA,IACN,QAAQ;AAAA,EACV;AAAA,EACA,YAAY;AAAA,IACV,SAAS;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,KAAK;AAAA,EACP;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,KAAK;AAAA,EACP;AACF;AAEA,MAAM,gBAAgB,IAAI,uBAAuB;AAAA,EAC/C,UAAU;AAAA,EACV,iBAAiB;AAAA,IACf,KAAK;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AACF,CAAC;AAWD,MAAM,QAAQ,MAAM;AAAA,EAClB,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,OAAO,UAAU,OAAO;AAC9B,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UACT,cAAc,EAAE,KAAK,WAAW,MAAM,YAAY,eAAe,CAAC;AAAA,UAClE;AAAA,QACF;AAAA,QACA;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;","names":[]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
2
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
import { textElementVariantsProps } from './internal/text-element.js';
|
|
5
|
-
import 'react';
|
|
6
5
|
|
|
7
6
|
declare const headingVariants: {
|
|
8
7
|
variant: {
|
|
@@ -21,6 +20,6 @@ interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement>, Variant
|
|
|
21
20
|
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
22
21
|
foreground?: VariantProps<typeof textElementVariantsProps>["foreground"];
|
|
23
22
|
}
|
|
24
|
-
declare const Heading: ({ children, as, variant, foreground, className, ...props }: HeadingProps) =>
|
|
23
|
+
declare const Heading: ({ children, as, variant, foreground, className, ...props }: HeadingProps) => React$1.JSX.Element;
|
|
25
24
|
|
|
26
25
|
export { Heading, type HeadingProps, headingVariants, headingVariantsProps };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
2
|
import React__default from 'react';
|
|
4
3
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -77,6 +76,6 @@ declare const textElementVariantsProps: (props?: ({
|
|
|
77
76
|
interface TextElementProps extends React__default.HTMLAttributes<HTMLElement>, VariantProps<typeof textElementVariantsProps> {
|
|
78
77
|
as?: "p" | "div" | "span" | "time" | "code";
|
|
79
78
|
}
|
|
80
|
-
declare const TextElement: ({ as, children, size, foreground, fontweight, className, ...props }: TextElementProps) =>
|
|
79
|
+
declare const TextElement: ({ as, children, size, foreground, fontweight, className, ...props }: TextElementProps) => React__default.JSX.Element;
|
|
81
80
|
|
|
82
81
|
export { TextElement, type TextElementProps, textElementForeground, textElementSize, textElementVariants, textElementVariantsProps };
|