@tongfun/ui 0.0.0-alpha.2 → 0.0.0-alpha.3

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,6 +1,5 @@
1
1
  import type { VariantProps } from "class-variance-authority";
2
2
  export declare const buttonVariants: (props?: ({
3
- variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
4
3
  size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
5
4
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
5
  export type ButtonVariants = VariantProps<typeof buttonVariants>;
package/Button/index.js CHANGED
@@ -24,29 +24,16 @@ function useForwardedAttrs() {
24
24
 
25
25
  //#endregion
26
26
  //#region src/Button/button-variants.ts
27
- const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
28
- variants: {
29
- variant: {
30
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
31
- destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
32
- outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
33
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
34
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
35
- link: "text-primary underline-offset-4 hover:underline"
36
- },
37
- size: {
38
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
39
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
40
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
41
- icon: "size-9",
42
- "icon-sm": "size-8",
43
- "icon-lg": "size-10"
44
- }
45
- },
46
- defaultVariants: {
47
- variant: "default",
48
- size: "default"
49
- }
27
+ const buttonVariants = cva("bg-[var(--ui-primary)] ", {
28
+ variants: { size: {
29
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
30
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
31
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
32
+ icon: "size-9",
33
+ "icon-sm": "size-8",
34
+ "icon-lg": "size-10"
35
+ } },
36
+ defaultVariants: { size: "default" }
50
37
  });
51
38
 
52
39
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tongfun/ui",
3
- "version": "0.0.0-alpha.2",
3
+ "version": "0.0.0-alpha.3",
4
4
  "description": "UI components for ERP",
5
5
  "type": "module",
6
6
  "private": false,