@usevyre/react 0.1.0

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.
Files changed (36) hide show
  1. package/LICENSE +21 -0
  2. package/dist/components/Accordion/Accordion.d.ts +38 -0
  3. package/dist/components/Alert/Alert.d.ts +73 -0
  4. package/dist/components/Avatar/Avatar.d.ts +21 -0
  5. package/dist/components/Badge/Badge.d.ts +27 -0
  6. package/dist/components/Breadcrumb/Breadcrumb.d.ts +38 -0
  7. package/dist/components/Button/Button.d.ts +53 -0
  8. package/dist/components/Calendar/Calendar.d.ts +64 -0
  9. package/dist/components/Card/Card.d.ts +51 -0
  10. package/dist/components/Checkbox/Checkbox.d.ts +22 -0
  11. package/dist/components/Command/Command.d.ts +96 -0
  12. package/dist/components/DropdownMenu/DropdownMenu.d.ts +122 -0
  13. package/dist/components/Input/Input.d.ts +53 -0
  14. package/dist/components/Label/Label.d.ts +16 -0
  15. package/dist/components/Modal/Modal.d.ts +59 -0
  16. package/dist/components/Pagination/Pagination.d.ts +45 -0
  17. package/dist/components/Popover/Popover.d.ts +46 -0
  18. package/dist/components/Progress/Progress.d.ts +21 -0
  19. package/dist/components/Select/Select.d.ts +55 -0
  20. package/dist/components/Separator/Separator.d.ts +16 -0
  21. package/dist/components/Sheet/Sheet.d.ts +54 -0
  22. package/dist/components/Sidebar/Sidebar.d.ts +140 -0
  23. package/dist/components/Skeleton/Skeleton.d.ts +17 -0
  24. package/dist/components/Slider/Slider.d.ts +26 -0
  25. package/dist/components/Switch/Switch.d.ts +21 -0
  26. package/dist/components/Table/Table.d.ts +75 -0
  27. package/dist/components/Tabs/Tabs.d.ts +64 -0
  28. package/dist/components/Toast/Toast.d.ts +54 -0
  29. package/dist/components/Tooltip/Tooltip.d.ts +40 -0
  30. package/dist/components/Typography/Typography.d.ts +67 -0
  31. package/dist/index.cjs +1 -0
  32. package/dist/index.d.ts +101 -0
  33. package/dist/index.js +2864 -0
  34. package/dist/types.d.ts +58 -0
  35. package/dist/utils/cn.d.ts +7 -0
  36. package/package.json +54 -0
@@ -0,0 +1,58 @@
1
+ /**
2
+ * useVyre — Core type utilities
3
+ *
4
+ * AI CONTEXT:
5
+ * These types define the valid prop values for ALL useVyre components.
6
+ * When generating component code, use these types for variant/size props.
7
+ */
8
+ /**
9
+ * Visual style variants available on interactive components.
10
+ * Maps directly to --vyre-color-semantic-* tokens.
11
+ *
12
+ * - primary: High contrast, default CTA
13
+ * - secondary: Subtle, bordered
14
+ * - ghost: No background or border
15
+ * - accent: Brand amber color — primary marketing CTA
16
+ * - teal: Secondary accent — confirm, info
17
+ * - danger: Destructive actions — delete, remove
18
+ */
19
+ export type Variant = "primary" | "secondary" | "ghost" | "accent" | "teal" | "danger";
20
+ /**
21
+ * Size scale used across Button, Input, Badge, etc.
22
+ *
23
+ * - sm: Compact UI, toolbars, dense layouts
24
+ * - md: Default (omit for default)
25
+ * - lg: Hero sections, prominent CTAs
26
+ * - icon: Square, icon-only buttons
27
+ */
28
+ export type Size = "sm" | "md" | "lg" | "icon";
29
+ /**
30
+ * Form/input validation states.
31
+ * Apply to .field wrapper, not the input itself.
32
+ */
33
+ export type FieldState = "idle" | "error" | "success" | "warning";
34
+ /**
35
+ * Badge-specific variants — extends color semantic tokens.
36
+ */
37
+ export type BadgeVariant = "default" | "accent" | "teal" | "success" | "warning" | "danger";
38
+ /**
39
+ * Makes a component polymorphic via `as` prop.
40
+ *
41
+ * @example
42
+ * <Button as="a" href="/docs">Link Button</Button>
43
+ * <Button as="div" role="button">Div Button</Button>
44
+ */
45
+ export type AsProps<T extends React.ElementType> = {
46
+ as?: T;
47
+ } & React.ComponentPropsWithoutRef<T>;
48
+ export type PolymorphicProps<T extends React.ElementType, Props = object> = Props & AsProps<T> & {
49
+ ref?: React.Ref<React.ElementRef<T>>;
50
+ };
51
+ export interface BaseProps {
52
+ /** Additional CSS class names */
53
+ className?: string;
54
+ /** Additional inline styles — use sparingly, prefer tokens */
55
+ style?: React.CSSProperties;
56
+ /** Test ID for automated testing */
57
+ "data-testid"?: string;
58
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * useVyre — className utility
3
+ * Lightweight alternative to clsx/classnames — zero dependency.
4
+ */
5
+ type ClassValue = string | undefined | null | false | Record<string, boolean | undefined | null> | ClassValue[];
6
+ export declare function cn(...inputs: ClassValue[]): string;
7
+ export {};
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@usevyre/react",
3
+ "version": "0.1.0",
4
+ "description": "useVyre React components — AI-native, accessible, zero-runtime styling",
5
+ "keywords": [
6
+ "design-system",
7
+ "react",
8
+ "components",
9
+ "ai-native",
10
+ "vyre"
11
+ ],
12
+ "homepage": "https://usevyre.com/docs/react",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/gapra/usevyre"
16
+ },
17
+ "license": "MIT",
18
+ "type": "module",
19
+ "main": "./dist/index.cjs",
20
+ "module": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "import": "./dist/index.js",
25
+ "require": "./dist/index.cjs",
26
+ "types": "./dist/index.d.ts"
27
+ },
28
+ "./styles": "./src/styles/components.css"
29
+ },
30
+ "files": [
31
+ "dist"
32
+ ],
33
+ "peerDependencies": {
34
+ "react": ">=18.0.0",
35
+ "react-dom": ">=18.0.0"
36
+ },
37
+ "devDependencies": {
38
+ "@types/react": "^18.3.0",
39
+ "@types/react-dom": "^18.3.0",
40
+ "@vitejs/plugin-react": "^4.3.0",
41
+ "react": "^18.3.0",
42
+ "typescript": "^5.4.0",
43
+ "vite": "^5.4.0"
44
+ },
45
+ "dependencies": {
46
+ "@usevyre/tokens": "0.1.0"
47
+ },
48
+ "scripts": {
49
+ "build": "vite build && tsc --project tsconfig.build.json",
50
+ "dev": "vite build --watch",
51
+ "typecheck": "tsc --noEmit",
52
+ "clean": "rm -rf dist"
53
+ }
54
+ }