singularity-components 0.1.80 → 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 +43 -31
- package/dist/main.cjs.map +1 -1
- package/dist/main.css +349 -0
- package/dist/main.css.map +1 -1
- package/dist/main.d.cts +9 -7
- package/dist/main.d.ts +9 -7
- package/dist/main.js +44 -32
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
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
|
|
@@ -20024,7 +20036,7 @@ function AccordionItem({
|
|
|
20024
20036
|
AccordionPrimitive.Item,
|
|
20025
20037
|
{
|
|
20026
20038
|
"data-slot": "accordion-item",
|
|
20027
|
-
className: cn("sg:border-b last:
|
|
20039
|
+
className: cn("sg:border-b sg:last:border-b-0", className),
|
|
20028
20040
|
...props
|
|
20029
20041
|
}
|
|
20030
20042
|
);
|
|
@@ -20039,7 +20051,7 @@ function AccordionTrigger({
|
|
|
20039
20051
|
{
|
|
20040
20052
|
"data-slot": "accordion-trigger",
|
|
20041
20053
|
className: cn(
|
|
20042
|
-
"focus-visible:
|
|
20054
|
+
"sg:focus-visible:border-ring sg:focus-visible:ring-ring/50 sg:flex sg:flex-1 sg:items-start sg:justify-between sg:gap-4 sg:rounded-md sg:py-4 sg:text-left sg:text-sm sg:font-medium sg:transition-all sg:outline-none sg:hover:underline sg:focus-visible:ring-[3px] sg:disabled:pointer-events-none sg:disabled:opacity-50 sg:[&[data-state=open]>svg]:rotate-180",
|
|
20043
20055
|
className
|
|
20044
20056
|
),
|
|
20045
20057
|
...props,
|
|
@@ -20059,7 +20071,7 @@ function AccordionContent({
|
|
|
20059
20071
|
AccordionPrimitive.Content,
|
|
20060
20072
|
{
|
|
20061
20073
|
"data-slot": "accordion-content",
|
|
20062
|
-
className: "data-[state=closed]:
|
|
20074
|
+
className: "sg:data-[state=closed]:animate-accordion-up sg:data-[state=open]:animate-accordion-down sg:overflow-hidden sg:text-sm",
|
|
20063
20075
|
...props,
|
|
20064
20076
|
children: /* @__PURE__ */ jsx("div", { className: cn("sg:pt-0 sg:pb-4", className), children })
|
|
20065
20077
|
}
|
|
@@ -20124,14 +20136,14 @@ function AlertDescription({
|
|
|
20124
20136
|
);
|
|
20125
20137
|
}
|
|
20126
20138
|
var badgeVariants = cva(
|
|
20127
|
-
"sg:inline-flex sg:items-center sg:justify-center sg:rounded-md sg:border sg:px-2 sg:py-0.5 sg:text-xs sg:font-medium sg:w-fit sg:whitespace-nowrap sg:shrink-0 [&>svg]:
|
|
20139
|
+
"sg:inline-flex sg:items-center sg:justify-center sg:rounded-md sg:border sg:px-2 sg:py-0.5 sg:text-xs sg:font-medium sg:w-fit sg:whitespace-nowrap sg:shrink-0 sg:[&>svg]:size-3 sg:gap-1 sg:[&>svg]:pointer-events-none sg:focus-visible:border-ring sg:focus-visible:ring-ring/50 sg:focus-visible:ring-[3px] sg:aria-invalid:ring-destructive/20 sg:dark:aria-invalid:ring-destructive/40 sg:aria-invalid:border-destructive sg:transition-[color,box-shadow] sg:overflow-hidden",
|
|
20128
20140
|
{
|
|
20129
20141
|
variants: {
|
|
20130
20142
|
variant: {
|
|
20131
|
-
default: "sg:border-transparent sg:bg-primary sg:text-primary-foreground [a&]:hover:
|
|
20132
|
-
secondary: "sg:border-transparent sg:bg-secondary sg:text-secondary-foreground [a&]:hover:
|
|
20133
|
-
destructive: "sg:border-transparent sg:bg-destructive sg:text-white [a&]:hover:
|
|
20134
|
-
outline: "sg:text-foreground [a&]:hover:
|
|
20143
|
+
default: "sg:border-transparent sg:bg-primary sg:text-primary-foreground sg:[a&]:hover:bg-primary/90",
|
|
20144
|
+
secondary: "sg:border-transparent sg:bg-secondary sg:text-secondary-foreground sg:[a&]:hover:bg-secondary/90",
|
|
20145
|
+
destructive: "sg:border-transparent sg:bg-destructive sg:text-white sg:[a&]:hover:bg-destructive/90 sg:focus-visible:ring-destructive/20 sg:dark:focus-visible:ring-destructive/40 sg:dark:bg-destructive/60",
|
|
20146
|
+
outline: "sg:text-foreground sg:[a&]:hover:bg-accent sg:[a&]:hover:text-accent-foreground"
|
|
20135
20147
|
}
|
|
20136
20148
|
},
|
|
20137
20149
|
defaultVariants: {
|
|
@@ -20156,21 +20168,21 @@ function Badge2({
|
|
|
20156
20168
|
);
|
|
20157
20169
|
}
|
|
20158
20170
|
var buttonVariants = cva(
|
|
20159
|
-
"sg:inline-flex sg:items-center sg:justify-center sg:gap-2 sg:whitespace-nowrap sg:rounded-md sg:text-sm sg:font-medium sg:transition-all disabled:
|
|
20171
|
+
"sg:inline-flex sg:items-center sg:justify-center sg:gap-2 sg:whitespace-nowrap sg:cursor-pointer sg:rounded-md sg:text-sm sg:font-medium sg:transition-all sg:disabled:pointer-events-none sg:disabled:opacity-50 sg:[&_svg]:pointer-events-none sg:[&_svg:not([class*=size-])]:size-4 sg:shrink-0 sg:[&_svg]:shrink-0 sg:outline-none sg:focus-visible:border-ring sg:focus-visible:ring-ring/50 sg:focus-visible:ring-[3px] sg:aria-invalid:ring-destructive/20 sg:dark:aria-invalid:ring-destructive/40 sg:aria-invalid:border-destructive",
|
|
20160
20172
|
{
|
|
20161
20173
|
variants: {
|
|
20162
20174
|
variant: {
|
|
20163
|
-
default: "sg:bg-primary sg:text-primary-foreground sg:shadow-xs hover:
|
|
20164
|
-
destructive: "sg:bg-destructive sg:text-white sg:shadow-xs hover:
|
|
20165
|
-
outline: "sg:border sg:bg-background sg:shadow-xs hover:
|
|
20166
|
-
secondary: "sg:bg-secondary sg:text-secondary-foreground sg:shadow-xs hover:
|
|
20167
|
-
ghost: "hover:
|
|
20168
|
-
link: "sg:text-primary sg:underline-offset-4 hover:
|
|
20175
|
+
default: "sg:bg-primary sg:text-primary-foreground sg:shadow-xs sg:hover:bg-primary/90",
|
|
20176
|
+
destructive: "sg:bg-destructive sg:text-white sg:shadow-xs sg:hover:bg-destructive/90 sg:focus-visible:ring-destructive/20 sg:dark:focus-visible:ring-destructive/40 sg:dark:bg-destructive/60",
|
|
20177
|
+
outline: "sg:border sg:bg-background sg:shadow-xs sg:hover:bg-accent sg:hover:text-accent-foreground sg:dark:bg-input/30 sg:dark:border-input sg:dark:hover:bg-input/50",
|
|
20178
|
+
secondary: "sg:bg-secondary sg:text-secondary-foreground sg:shadow-xs sg:hover:bg-secondary/80",
|
|
20179
|
+
ghost: "sg:hover:bg-accent sg:hover:text-accent-foreground sg:dark:hover:bg-accent/50",
|
|
20180
|
+
link: "sg:text-primary sg:underline-offset-4 sg:hover:underline"
|
|
20169
20181
|
},
|
|
20170
20182
|
size: {
|
|
20171
|
-
default: "sg:h-9 sg:px-4 sg:py-2 has-[>svg]:
|
|
20172
|
-
sm: "sg:h-8 sg:rounded-md sg:gap-1.5 sg:px-3 has-[>svg]:
|
|
20173
|
-
lg: "sg:h-10 sg:rounded-md sg:px-6 has-[>svg]:
|
|
20183
|
+
default: "sg:h-9 sg:px-4 sg:py-2 sg:has-[>svg]:px-3",
|
|
20184
|
+
sm: "sg:h-8 sg:rounded-md sg:gap-1.5 sg:px-3 sg:has-[>svg]:px-2.5",
|
|
20185
|
+
lg: "sg:h-10 sg:rounded-md sg:px-6 sg:has-[>svg]:px-4",
|
|
20174
20186
|
icon: "sg:size-9"
|
|
20175
20187
|
}
|
|
20176
20188
|
},
|
|
@@ -20293,9 +20305,9 @@ function Input({ className, type, ...props }) {
|
|
|
20293
20305
|
type,
|
|
20294
20306
|
"data-slot": "input",
|
|
20295
20307
|
className: cn(
|
|
20296
|
-
"file:
|
|
20297
|
-
"focus-visible:
|
|
20298
|
-
"aria-invalid:
|
|
20308
|
+
"sg:file:text-foreground sg:placeholder:text-muted-foreground sg:selection:bg-primary sg:selection:text-primary-foreground sg:dark:bg-input/30 sg:border-input sg:flex sg:h-9 sg:w-full sg:min-w-0 sg:rounded-md sg:border sg:bg-transparent sg:px-3 sg:py-1 sg:text-base sg:shadow-xs sg:transition-[color,box-shadow] sg:outline-none sg:file:inline-flex sg:file:h-7 sg:file:border-0 sg:file:bg-transparent sg:file:text-sm sg:file:font-medium sg:disabled:pointer-events-none sg:disabled:cursor-not-allowed sg:disabled:opacity-50 sg:md:text-sm",
|
|
20309
|
+
"sg:focus-visible:border-ring sg:focus-visible:ring-ring/50 sg:focus-visible:ring-[3px]",
|
|
20310
|
+
"sg:aria-invalid:ring-destructive/20 sg:dark:aria-invalid:ring-destructive/40 sg:aria-invalid:border-destructive",
|
|
20299
20311
|
className
|
|
20300
20312
|
),
|
|
20301
20313
|
...props
|
|
@@ -20440,7 +20452,7 @@ function TableHeader({ className, ...props }) {
|
|
|
20440
20452
|
"thead",
|
|
20441
20453
|
{
|
|
20442
20454
|
"data-slot": "table-header",
|
|
20443
|
-
className: cn("[&_tr]:
|
|
20455
|
+
className: cn("sg:[&_tr]:border-b", className),
|
|
20444
20456
|
...props
|
|
20445
20457
|
}
|
|
20446
20458
|
);
|
|
@@ -20450,7 +20462,7 @@ function TableBody({ className, ...props }) {
|
|
|
20450
20462
|
"tbody",
|
|
20451
20463
|
{
|
|
20452
20464
|
"data-slot": "table-body",
|
|
20453
|
-
className: cn("[&_tr:last-child]:
|
|
20465
|
+
className: cn("sg:[&_tr:last-child]:border-0", className),
|
|
20454
20466
|
...props
|
|
20455
20467
|
}
|
|
20456
20468
|
);
|
|
@@ -20461,7 +20473,7 @@ function TableFooter({ className, ...props }) {
|
|
|
20461
20473
|
{
|
|
20462
20474
|
"data-slot": "table-footer",
|
|
20463
20475
|
className: cn(
|
|
20464
|
-
"sg:bg-muted/50 sg:border-t sg:font-medium [&>tr]:last:
|
|
20476
|
+
"sg:bg-muted/50 sg:border-t sg:font-medium sg:[&>tr]:last:border-b-0",
|
|
20465
20477
|
className
|
|
20466
20478
|
),
|
|
20467
20479
|
...props
|
|
@@ -20474,7 +20486,7 @@ function TableRow({ className, ...props }) {
|
|
|
20474
20486
|
{
|
|
20475
20487
|
"data-slot": "table-row",
|
|
20476
20488
|
className: cn(
|
|
20477
|
-
"hover:
|
|
20489
|
+
"sg:hover:bg-muted/50 sg:data-[state=selected]:bg-muted sg:border-b sg:transition-colors",
|
|
20478
20490
|
className
|
|
20479
20491
|
),
|
|
20480
20492
|
...props
|
|
@@ -20487,7 +20499,7 @@ function TableHead({ className, ...props }) {
|
|
|
20487
20499
|
{
|
|
20488
20500
|
"data-slot": "table-head",
|
|
20489
20501
|
className: cn(
|
|
20490
|
-
"sg:text-foreground sg:h-10 sg:px-2 sg:text-left sg:align-middle sg:font-medium sg:whitespace-nowrap [&:has([role=checkbox])]:
|
|
20502
|
+
"sg:text-foreground sg:h-10 sg:px-2 sg:text-left sg:align-middle sg:font-medium sg:whitespace-nowrap sg:[&:has([role=checkbox])]:pr-0 sg:[&>[role=checkbox]]:translate-y-[2px]",
|
|
20491
20503
|
className
|
|
20492
20504
|
),
|
|
20493
20505
|
...props
|
|
@@ -20500,7 +20512,7 @@ function TableCell({ className, ...props }) {
|
|
|
20500
20512
|
{
|
|
20501
20513
|
"data-slot": "table-cell",
|
|
20502
20514
|
className: cn(
|
|
20503
|
-
"sg:p-2 sg:align-middle sg:whitespace-nowrap [&:has([role=checkbox])]:
|
|
20515
|
+
"sg:p-2 sg:align-middle sg:whitespace-nowrap sg:[&:has([role=checkbox])]:pr-0 sg:[&>[role=checkbox]]:translate-y-[2px]",
|
|
20504
20516
|
className
|
|
20505
20517
|
),
|
|
20506
20518
|
...props
|