@sudobility/components 5.0.12 → 5.0.14
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/hooks/useClickOutside.d.ts +10 -0
- package/dist/hooks/useClickOutside.d.ts.map +1 -1
- package/dist/hooks/useCodeLoader.d.ts +13 -0
- package/dist/hooks/useCodeLoader.d.ts.map +1 -1
- package/dist/index.esm.js +3022 -2992
- package/dist/index.umd.js +13 -13
- package/dist/lib/utils.d.ts +10 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/platforms/web.d.ts +5 -1
- package/dist/platforms/web.d.ts.map +1 -1
- package/dist/ui/button.d.ts +22 -1
- package/dist/ui/button.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/lib/utils.d.ts
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
|
+
/**
|
|
3
|
+
* Merges class names using clsx and tailwind-merge.
|
|
4
|
+
*
|
|
5
|
+
* Combines conditional class names via clsx, then resolves Tailwind CSS
|
|
6
|
+
* class conflicts using tailwind-merge (e.g., `bg-red-500` + `bg-blue-500`
|
|
7
|
+
* yields `bg-blue-500`).
|
|
8
|
+
*
|
|
9
|
+
* @param inputs - Class values to merge (strings, arrays, objects, etc.)
|
|
10
|
+
* @returns A single merged class name string with conflicts resolved
|
|
11
|
+
*/
|
|
2
12
|
declare function cn(...inputs: ClassValue[]): string;
|
|
3
13
|
export { cn };
|
|
4
14
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C,iBAAS,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAElC;AAED,OAAO,EAAE,EAAE,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C;;;;;;;;;GASG;AACH,iBAAS,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAElC;AAED,OAAO,EAAE,EAAE,EAAE,CAAC"}
|
package/dist/platforms/web.d.ts
CHANGED
|
@@ -14,7 +14,11 @@ interface PlatformStyleGenerator {
|
|
|
14
14
|
generateAnimationStyles(animation: any): string;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* Web Platform Style Generator Implementation
|
|
17
|
+
* Web Platform Style Generator Implementation.
|
|
18
|
+
*
|
|
19
|
+
* Converts design system variant data (colors, spacing, typography, animations)
|
|
20
|
+
* into Tailwind CSS class strings for use in web React components. Handles
|
|
21
|
+
* hover/focus/disabled state classes and maps pixel values to Tailwind scale.
|
|
18
22
|
*/
|
|
19
23
|
export declare class WebStyleGenerator implements PlatformStyleGenerator {
|
|
20
24
|
generateComponentStyles(variant: any, size?: any): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../src/platforms/web.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;GAEG;AACH,UAAU,sBAAsB;IAC9B,uBAAuB,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC;IAC1D,wBAAwB,CAAC,WAAW,EAAE,GAAG,GAAG,MAAM,CAAC;IACnD,qBAAqB,CAAC,OAAO,EAAE,GAAG,GAAG,MAAM,CAAC;IAC5C,mBAAmB,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CAAC;IACzC,uBAAuB,CAAC,SAAS,EAAE,GAAG,GAAG,MAAM,CAAC;CACjD;AAqTD
|
|
1
|
+
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../src/platforms/web.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;GAEG;AACH,UAAU,sBAAsB;IAC9B,uBAAuB,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC;IAC1D,wBAAwB,CAAC,WAAW,EAAE,GAAG,GAAG,MAAM,CAAC;IACnD,qBAAqB,CAAC,OAAO,EAAE,GAAG,GAAG,MAAM,CAAC;IAC5C,mBAAmB,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CAAC;IACzC,uBAAuB,CAAC,SAAS,EAAE,GAAG,GAAG,MAAM,CAAC;CACjD;AAqTD;;;;;;GAMG;AACH,qBAAa,iBAAkB,YAAW,sBAAsB;IAC9D,uBAAuB,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,MAAM;IAgFzD,wBAAwB,CAAC,WAAW,EAAE,GAAG,GAAG,MAAM;IAkBlD,qBAAqB,CAAC,OAAO,EAAE,GAAG,GAAG,MAAM;IAI3C,mBAAmB,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM;IAgBxC,uBAAuB,CAAC,SAAS,EAAE,GAAG,GAAG,MAAM;IAc/C,OAAO,CAAC,kBAAkB;IAc1B,OAAO,CAAC,oBAAoB;IAY5B,OAAO,CAAC,oBAAoB;IAa5B,OAAO,CAAC,gBAAgB;IAYxB,OAAO,CAAC,oBAAoB;CAO7B;AAGD,eAAO,MAAM,iBAAiB,mBAA0B,CAAC"}
|
package/dist/ui/button.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare const buttonVariants: (props?: ({
|
|
|
5
5
|
size?: "sm" | "lg" | "default" | "icon" | null | undefined;
|
|
6
6
|
animation?: "none" | "scale" | "connect" | "disconnect" | "hover" | "lift" | "glow" | "shimmer" | "tap" | "transaction" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
-
/** Tracking event data
|
|
8
|
+
/** Tracking event data emitted on button interactions. */
|
|
9
9
|
export interface ButtonTrackingData {
|
|
10
10
|
/** Action performed */
|
|
11
11
|
action: 'click';
|
|
@@ -14,7 +14,14 @@ export interface ButtonTrackingData {
|
|
|
14
14
|
/** Optional component context */
|
|
15
15
|
componentName?: string;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Props for the Button component.
|
|
19
|
+
*
|
|
20
|
+
* Extends native button HTML attributes with CVA variant props,
|
|
21
|
+
* the Radix `asChild` polymorphic pattern, and optional analytics tracking.
|
|
22
|
+
*/
|
|
17
23
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
24
|
+
/** When true, renders the child element instead of a `<button>` using Radix Slot */
|
|
18
25
|
asChild?: boolean;
|
|
19
26
|
/** Optional callback for tracking button clicks */
|
|
20
27
|
onTrack?: (data: ButtonTrackingData) => void;
|
|
@@ -23,6 +30,20 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
23
30
|
/** Component name for tracking context */
|
|
24
31
|
componentName?: string;
|
|
25
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Button component with design system integration, variant support,
|
|
35
|
+
* animation presets, and optional click tracking.
|
|
36
|
+
*
|
|
37
|
+
* Supports the Radix `asChild` pattern for polymorphic rendering.
|
|
38
|
+
* Styling is composed from CVA variants, the design system, and user overrides.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* <Button variant="primary" size="lg" animation="lift">
|
|
43
|
+
* Get Started
|
|
44
|
+
* </Button>
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
26
47
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
27
48
|
export { Button, buttonVariants };
|
|
28
49
|
//# sourceMappingURL=button.d.ts.map
|
package/dist/ui/button.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,cAAc;;;;8EA8ClB,CAAC;AAEH,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,cAAc;;;;8EA8ClB,CAAC;AAEH,0DAA0D;AAC1D,MAAM,WAAW,kBAAkB;IACjC,uBAAuB;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iCAAiC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,oFAAoF;IACpF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mDAAmD;IACnD,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC7C,gCAAgC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,MAAM,uFAqFX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sudobility/components",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.14",
|
|
4
4
|
"description": "Reusable UI components and design system - Reorganized for better maintainability",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"@radix-ui/react-slot": ">=1.0.0",
|
|
57
57
|
"@radix-ui/react-switch": ">=1.0.0",
|
|
58
58
|
"@radix-ui/react-tabs": ">=1.0.0",
|
|
59
|
-
"@sudobility/design": "^1.1.
|
|
60
|
-
"@sudobility/types": "^1.9.
|
|
59
|
+
"@sudobility/design": "^1.1.20",
|
|
60
|
+
"@sudobility/types": "^1.9.54",
|
|
61
61
|
"class-variance-authority": ">=0.7.0",
|
|
62
62
|
"clsx": ">=2.0.0",
|
|
63
63
|
"i18next": ">=23.0.0",
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
"@radix-ui/react-slot": "^1.2.3",
|
|
79
79
|
"@radix-ui/react-switch": "^1.2.6",
|
|
80
80
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
81
|
-
"@sudobility/design": "^1.1.
|
|
82
|
-
"@sudobility/types": "^1.9.
|
|
81
|
+
"@sudobility/design": "^1.1.20",
|
|
82
|
+
"@sudobility/types": "^1.9.54",
|
|
83
83
|
"@testing-library/dom": "^10.4.1",
|
|
84
84
|
"@testing-library/jest-dom": "^6.9.1",
|
|
85
85
|
"@testing-library/react": "^16.3.0",
|