@nadicodeai/ui 12.1.83 → 12.1.85
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.
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
|
-
declare const
|
|
3
|
+
declare const buttonClasses: (props?: ({
|
|
4
4
|
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "brandGhost" | "brandSolid" | "destructive" | null | undefined;
|
|
5
5
|
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* The button classes for an element that is not a `Button`, such as a link
|
|
9
|
+
* drawn as one. They pass through `cn` as `Button`'s do, so a variant's
|
|
10
|
+
* border, fill or text replaces the base one instead of losing to it in the
|
|
11
|
+
* stylesheet: unmerged, the base `border-transparent` hides every outline edge.
|
|
12
|
+
*/
|
|
13
|
+
declare function buttonVariants(props?: Parameters<typeof buttonClasses>[0]): string;
|
|
14
|
+
declare function Button({ className, variant, size, ...props }: ButtonPrimitive.Props & VariantProps<typeof buttonClasses>): import("react").JSX.Element;
|
|
8
15
|
export { Button, buttonVariants };
|
|
9
16
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,aAAa;;;8EAsClB,CAAC;AAEF;;;;;GAKG;AACH,iBAAS,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAE3E;AAED,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,+BAQ5D;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { cn } from "../lib/utils.js";
|
|
5
|
-
const
|
|
5
|
+
const buttonClasses = cva("group/button inline-flex min-h-touch-target min-w-touch-target shrink-0 items-center justify-center rounded-sm border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-[background-color,border-color,color,scale] duration-[var(--nc-duration-confirm)] ease-[var(--nc-ease-out-strong)] select-none motion-safe:active:not-aria-[haspopup]:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [@media(hover:hover)_and_(pointer:fine)]:min-w-0 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
8
|
default: "bg-primary text-primary-foreground hover:bg-primary-hover active:bg-primary-active",
|
|
@@ -30,7 +30,16 @@ const buttonVariants = cva("group/button inline-flex min-h-touch-target min-w-to
|
|
|
30
30
|
size: "default",
|
|
31
31
|
},
|
|
32
32
|
});
|
|
33
|
+
/**
|
|
34
|
+
* The button classes for an element that is not a `Button`, such as a link
|
|
35
|
+
* drawn as one. They pass through `cn` as `Button`'s do, so a variant's
|
|
36
|
+
* border, fill or text replaces the base one instead of losing to it in the
|
|
37
|
+
* stylesheet: unmerged, the base `border-transparent` hides every outline edge.
|
|
38
|
+
*/
|
|
39
|
+
function buttonVariants(props) {
|
|
40
|
+
return cn(buttonClasses(props));
|
|
41
|
+
}
|
|
33
42
|
function Button({ className, variant = "default", size = "default", ...props }) {
|
|
34
|
-
return (_jsx(ButtonPrimitive, { "data-slot": "button", className:
|
|
43
|
+
return (_jsx(ButtonPrimitive, { "data-slot": "button", className: buttonVariants({ variant, size, className }), ...props }));
|
|
35
44
|
}
|
|
36
45
|
export { Button, buttonVariants };
|
|
@@ -343,6 +343,7 @@
|
|
|
343
343
|
width: 100%;
|
|
344
344
|
max-width: 20rem;
|
|
345
345
|
text-align: center;
|
|
346
|
+
text-wrap-style: balance;
|
|
346
347
|
}
|
|
347
348
|
|
|
348
349
|
.nc-entry-body:empty {
|
|
@@ -359,7 +360,6 @@
|
|
|
359
360
|
font-weight: var(--nc-type-body-md-font-weight);
|
|
360
361
|
line-height: var(--nc-type-body-md-line-height);
|
|
361
362
|
letter-spacing: var(--nc-type-body-md-letter-spacing);
|
|
362
|
-
text-wrap: balance;
|
|
363
363
|
color: var(--nc-dark-ink);
|
|
364
364
|
}
|
|
365
365
|
|
|
@@ -643,6 +643,7 @@
|
|
|
643
643
|
gap: var(--nc-md);
|
|
644
644
|
width: min(20rem, 80vw);
|
|
645
645
|
text-align: center;
|
|
646
|
+
text-wrap-style: balance;
|
|
646
647
|
}
|
|
647
648
|
|
|
648
649
|
.nc-hive-title {
|
|
@@ -652,7 +653,6 @@
|
|
|
652
653
|
font-weight: var(--nc-type-heading-md-font-weight);
|
|
653
654
|
line-height: var(--nc-type-heading-md-line-height);
|
|
654
655
|
letter-spacing: var(--nc-type-heading-md-letter-spacing);
|
|
655
|
-
text-wrap: balance;
|
|
656
656
|
overflow-wrap: break-word;
|
|
657
657
|
}
|
|
658
658
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.85",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@base-ui/react": "^1.9.0",
|
|
76
76
|
"@iconify-icons/logos": "^2.0.2",
|
|
77
77
|
"@iconify/react": "^6.0.2",
|
|
78
|
-
"@nadicodeai/design-system": "12.1.
|
|
78
|
+
"@nadicodeai/design-system": "12.1.85",
|
|
79
79
|
"@tanstack/react-table": "^9.2.8",
|
|
80
80
|
"class-variance-authority": "^0.7.1",
|
|
81
81
|
"clsx": "^2.1.1",
|