singularity-components 0.1.81 → 0.1.82
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/main.cjs +16 -4
- package/dist/main.cjs.map +1 -1
- package/dist/main.d.cts +9 -7
- package/dist/main.d.ts +9 -7
- package/dist/main.js +17 -5
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.d.cts
CHANGED
|
@@ -39,17 +39,19 @@ type Props$2 = React$1.ComponentProps<"button"> & VariantProps<typeof buttonVari
|
|
|
39
39
|
};
|
|
40
40
|
declare function Button({ className, variant, size, asChild, iconStart, iconStartAnimate, iconEnd, iconEndAnimate, children, ...props }: Props$2): react_jsx_runtime.JSX.Element;
|
|
41
41
|
|
|
42
|
-
type
|
|
43
|
-
type
|
|
44
|
-
type
|
|
45
|
-
type
|
|
42
|
+
type Breakpoint = "" | "sm:" | "md:" | "lg:" | "xl:" | "2xl:";
|
|
43
|
+
type MarginDirection = "m-" | "mx-" | "my-" | "mt-" | "mr-" | "mb-" | "ml-";
|
|
44
|
+
type Size = "0" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | "px" | "auto";
|
|
45
|
+
type TailwindMarginClassValue = `${Breakpoint}${MarginDirection}${Size}`;
|
|
46
|
+
type TailwindMarginClass = TailwindMarginClassValue[];
|
|
46
47
|
type OmitClassProperty<T1, T2 extends string> = Omit<T1, T2>;
|
|
48
|
+
type OmitClassName<T> = OmitClassProperty<T, "className">;
|
|
47
49
|
|
|
48
50
|
declare const headingVariants: (props?: ({
|
|
49
51
|
variant?: "h1" | "h2" | "h3" | "h4" | null | undefined;
|
|
50
52
|
foreground?: "default" | "muted" | "primary" | null | undefined;
|
|
51
53
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
52
|
-
interface HeadingProps extends
|
|
54
|
+
interface HeadingProps extends OmitClassName<React__default.HTMLAttributes<HTMLHeadingElement>>, VariantProps<typeof headingVariants> {
|
|
53
55
|
as?: "h1" | "h2" | "h3" | "h4";
|
|
54
56
|
className?: TailwindMarginClass;
|
|
55
57
|
}
|
|
@@ -107,10 +109,10 @@ declare function TableCaption({ className, ...props }: React$1.ComponentProps<"c
|
|
|
107
109
|
|
|
108
110
|
declare const textVariants: (props?: ({
|
|
109
111
|
size?: "base" | "sm" | "lg" | "xs" | "xl" | null | undefined;
|
|
110
|
-
foreground?: "
|
|
112
|
+
foreground?: "default" | "destructive" | "secondary" | "muted" | "primary" | "accent" | null | undefined;
|
|
111
113
|
weight?: "bold" | "normal" | "medium" | "semibold" | null | undefined;
|
|
112
114
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
113
|
-
interface TextProps extends
|
|
115
|
+
interface TextProps extends OmitClassName<React__default.HTMLAttributes<HTMLDivElement>>, VariantProps<typeof textVariants> {
|
|
114
116
|
className?: TailwindMarginClass;
|
|
115
117
|
}
|
|
116
118
|
declare const Text: React__default.FC<TextProps>;
|
package/dist/main.d.ts
CHANGED
|
@@ -39,17 +39,19 @@ type Props$2 = React$1.ComponentProps<"button"> & VariantProps<typeof buttonVari
|
|
|
39
39
|
};
|
|
40
40
|
declare function Button({ className, variant, size, asChild, iconStart, iconStartAnimate, iconEnd, iconEndAnimate, children, ...props }: Props$2): react_jsx_runtime.JSX.Element;
|
|
41
41
|
|
|
42
|
-
type
|
|
43
|
-
type
|
|
44
|
-
type
|
|
45
|
-
type
|
|
42
|
+
type Breakpoint = "" | "sm:" | "md:" | "lg:" | "xl:" | "2xl:";
|
|
43
|
+
type MarginDirection = "m-" | "mx-" | "my-" | "mt-" | "mr-" | "mb-" | "ml-";
|
|
44
|
+
type Size = "0" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | "px" | "auto";
|
|
45
|
+
type TailwindMarginClassValue = `${Breakpoint}${MarginDirection}${Size}`;
|
|
46
|
+
type TailwindMarginClass = TailwindMarginClassValue[];
|
|
46
47
|
type OmitClassProperty<T1, T2 extends string> = Omit<T1, T2>;
|
|
48
|
+
type OmitClassName<T> = OmitClassProperty<T, "className">;
|
|
47
49
|
|
|
48
50
|
declare const headingVariants: (props?: ({
|
|
49
51
|
variant?: "h1" | "h2" | "h3" | "h4" | null | undefined;
|
|
50
52
|
foreground?: "default" | "muted" | "primary" | null | undefined;
|
|
51
53
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
52
|
-
interface HeadingProps extends
|
|
54
|
+
interface HeadingProps extends OmitClassName<React__default.HTMLAttributes<HTMLHeadingElement>>, VariantProps<typeof headingVariants> {
|
|
53
55
|
as?: "h1" | "h2" | "h3" | "h4";
|
|
54
56
|
className?: TailwindMarginClass;
|
|
55
57
|
}
|
|
@@ -107,10 +109,10 @@ declare function TableCaption({ className, ...props }: React$1.ComponentProps<"c
|
|
|
107
109
|
|
|
108
110
|
declare const textVariants: (props?: ({
|
|
109
111
|
size?: "base" | "sm" | "lg" | "xs" | "xl" | null | undefined;
|
|
110
|
-
foreground?: "
|
|
112
|
+
foreground?: "default" | "destructive" | "secondary" | "muted" | "primary" | "accent" | null | undefined;
|
|
111
113
|
weight?: "bold" | "normal" | "medium" | "semibold" | null | undefined;
|
|
112
114
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
113
|
-
interface TextProps extends
|
|
115
|
+
interface TextProps extends OmitClassName<React__default.HTMLAttributes<HTMLDivElement>>, VariantProps<typeof textVariants> {
|
|
114
116
|
className?: TailwindMarginClass;
|
|
115
117
|
}
|
|
116
118
|
declare const Text: React__default.FC<TextProps>;
|
package/dist/main.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { forwardRef, createElement } from 'react';
|
|
4
4
|
import clsx2, { clsx } from 'clsx';
|
|
5
|
-
import {
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
8
8
|
import { Slot } from '@radix-ui/react-slot';
|
|
@@ -20006,10 +20006,22 @@ var __iconNode1609 = [
|
|
|
20006
20006
|
];
|
|
20007
20007
|
var ZoomOut = createLucideIcon("zoom-out", __iconNode1609);
|
|
20008
20008
|
function cn(...inputs) {
|
|
20009
|
-
const
|
|
20010
|
-
|
|
20011
|
-
|
|
20012
|
-
|
|
20009
|
+
const classString = clsx(inputs);
|
|
20010
|
+
const allOriginalClasses = classString.split(/\s+/).filter(Boolean);
|
|
20011
|
+
const prefixedClasses = allOriginalClasses.filter((c) => c.startsWith("sg:"));
|
|
20012
|
+
const unprefixedClasses = allOriginalClasses.filter(
|
|
20013
|
+
(c) => !c.startsWith("sg:")
|
|
20014
|
+
);
|
|
20015
|
+
const allClassesWithRemovedPrefix = allOriginalClasses.map(
|
|
20016
|
+
(c) => c.replace("sg:", "")
|
|
20017
|
+
);
|
|
20018
|
+
const mergedClasses = twMerge(allClassesWithRemovedPrefix).split(/\s+/).filter(Boolean);
|
|
20019
|
+
return mergedClasses.map((c) => {
|
|
20020
|
+
if (prefixedClasses.includes("sg:" + c) && !unprefixedClasses.includes(c)) {
|
|
20021
|
+
return "sg:" + c;
|
|
20022
|
+
}
|
|
20023
|
+
return c;
|
|
20024
|
+
}).join(" ");
|
|
20013
20025
|
}
|
|
20014
20026
|
function Accordion({
|
|
20015
20027
|
...props
|