automoby-kit 1.0.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 (39) hide show
  1. package/README.md +172 -0
  2. package/dist/index.cjs.js +3022 -0
  3. package/dist/index.cjs.js.map +1 -0
  4. package/dist/index.esm.js +3006 -0
  5. package/dist/index.esm.js.map +1 -0
  6. package/dist/types/components/Accordion/Accordion.d.ts +25 -0
  7. package/dist/types/components/Accordion/Accordion.stories.d.ts +174 -0
  8. package/dist/types/components/Backdrop/Backdrop.d.ts +20 -0
  9. package/dist/types/components/Backdrop/Backdrop.stories.d.ts +9 -0
  10. package/dist/types/components/Breadcrumb/Breadcrumb.d.ts +13 -0
  11. package/dist/types/components/Breadcrumb/Breadcrumb.stories.d.ts +176 -0
  12. package/dist/types/components/Button/Button.d.ts +13 -0
  13. package/dist/types/components/Button/Button.stories.d.ts +100 -0
  14. package/dist/types/components/Chips/Chips.d.ts +37 -0
  15. package/dist/types/components/Chips/Chips.stories.d.ts +90 -0
  16. package/dist/types/components/Divider/Divider.d.ts +25 -0
  17. package/dist/types/components/Divider/Divider.stories.d.ts +88 -0
  18. package/dist/types/components/Drawer/Drawer.d.ts +12 -0
  19. package/dist/types/components/Drawer/Drawer.stories.d.ts +115 -0
  20. package/dist/types/components/Input/Input.d.ts +16 -0
  21. package/dist/types/components/Input/Input.stories.d.ts +130 -0
  22. package/dist/types/components/Menu/Menu.d.ts +39 -0
  23. package/dist/types/components/Menu/Menu.stories.d.ts +89 -0
  24. package/dist/types/components/Pagination/Pagination.d.ts +8 -0
  25. package/dist/types/components/Pagination/Pagination.stories.d.ts +61 -0
  26. package/dist/types/components/ProtectedComponent.d.ts +5 -0
  27. package/dist/types/components/RadioGroup/RadioGroup.d.ts +55 -0
  28. package/dist/types/components/RadioGroup/RadioGroup.stories.d.ts +86 -0
  29. package/dist/types/components/Tabs/Tabs.d.ts +43 -0
  30. package/dist/types/components/Tabs/Tabs.stories.d.ts +66 -0
  31. package/dist/types/components/Typography/Typography.d.ts +9 -0
  32. package/dist/types/components/Typography/Typography.stories.d.ts +57 -0
  33. package/dist/types/contexts/MobileContext.d.ts +13 -0
  34. package/dist/types/contexts/index.d.ts +2 -0
  35. package/dist/types/index.d.ts +33 -0
  36. package/dist/types/licensing/LicenseManager.d.ts +41 -0
  37. package/dist/types/licensing/index.d.ts +30 -0
  38. package/dist/types/utils/cn.d.ts +2 -0
  39. package/package.json +90 -0
@@ -0,0 +1,86 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.ForwardRefExoticComponent<import("@/components/RadioGroup/RadioGroup").RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
5
+ parameters: {
6
+ docs: {
7
+ description: {
8
+ component: string;
9
+ };
10
+ };
11
+ };
12
+ argTypes: {
13
+ value: {
14
+ name: string;
15
+ control: {
16
+ type: string;
17
+ };
18
+ description: string;
19
+ };
20
+ disabled: {
21
+ name: string;
22
+ control: {
23
+ type: string;
24
+ };
25
+ defaultValue: boolean;
26
+ description: string;
27
+ };
28
+ isMobile: {
29
+ name: string;
30
+ control: {
31
+ type: string;
32
+ };
33
+ defaultValue: boolean;
34
+ description: string;
35
+ };
36
+ direction: {
37
+ name: string;
38
+ control: {
39
+ type: string;
40
+ };
41
+ options: string[];
42
+ defaultValue: string;
43
+ description: string;
44
+ };
45
+ };
46
+ };
47
+ export default _default;
48
+ type StoryProps = {
49
+ value: string;
50
+ disabled: boolean;
51
+ isMobile: boolean;
52
+ direction: 'vertical' | 'horizontal';
53
+ };
54
+ export declare const Playground: {
55
+ ({ value: valueArg, disabled, isMobile, direction, }: StoryProps): import("react/jsx-runtime").JSX.Element;
56
+ storyName: string;
57
+ args: {
58
+ value: string;
59
+ disabled: boolean;
60
+ isMobile: boolean;
61
+ };
62
+ };
63
+ export declare const ResponsiveComparison: {
64
+ (): import("react/jsx-runtime").JSX.Element;
65
+ storyName: string;
66
+ };
67
+ export declare const WithoutIcons: {
68
+ (): import("react/jsx-runtime").JSX.Element;
69
+ storyName: string;
70
+ };
71
+ export declare const DisabledStates: {
72
+ (): import("react/jsx-runtime").JSX.Element;
73
+ storyName: string;
74
+ };
75
+ export declare const AutoResponsive: {
76
+ (): import("react/jsx-runtime").JSX.Element;
77
+ storyName: string;
78
+ };
79
+ export declare const InteractiveExample: {
80
+ (): import("react/jsx-runtime").JSX.Element;
81
+ storyName: string;
82
+ };
83
+ export declare const AllStates: {
84
+ (): import("react/jsx-runtime").JSX.Element;
85
+ storyName: string;
86
+ };
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ export interface TabItem {
3
+ /**
4
+ * Unique identifier for the tab
5
+ */
6
+ id: string;
7
+ /**
8
+ * Display label for the tab
9
+ */
10
+ label: string;
11
+ /**
12
+ * Badge count number (optional)
13
+ */
14
+ count?: number;
15
+ /**
16
+ * Whether the tab is disabled
17
+ */
18
+ disabled?: boolean;
19
+ }
20
+ export interface TabsProps extends React.HTMLAttributes<HTMLDivElement> {
21
+ /**
22
+ * Array of tab items
23
+ */
24
+ items: TabItem[];
25
+ /**
26
+ * Currently active tab ID
27
+ */
28
+ activeTab: string;
29
+ /**
30
+ * Callback when tab is clicked
31
+ */
32
+ onTabChange: (tabId: string) => void;
33
+ /**
34
+ * Custom class name
35
+ */
36
+ className?: string;
37
+ /**
38
+ * Override mobile detection for testing
39
+ */
40
+ isMobile?: boolean;
41
+ }
42
+ declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
43
+ export { Tabs };
@@ -0,0 +1,66 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.ForwardRefExoticComponent<import("@/components/Tabs/Tabs").TabsProps & React.RefAttributes<HTMLDivElement>>;
5
+ parameters: {
6
+ docs: {
7
+ description: {
8
+ component: string;
9
+ };
10
+ };
11
+ };
12
+ argTypes: {
13
+ activeTab: {
14
+ name: string;
15
+ control: {
16
+ type: string;
17
+ };
18
+ description: string;
19
+ };
20
+ isMobile: {
21
+ name: string;
22
+ control: {
23
+ type: string;
24
+ };
25
+ defaultValue: boolean;
26
+ description: string;
27
+ };
28
+ };
29
+ };
30
+ export default _default;
31
+ type StoryProps = {
32
+ activeTab: string;
33
+ isMobile: boolean;
34
+ };
35
+ export declare const Playground: {
36
+ ({ activeTab: activeTabArg, isMobile, }: StoryProps): import("react/jsx-runtime").JSX.Element;
37
+ storyName: string;
38
+ args: {
39
+ activeTab: string;
40
+ isMobile: boolean;
41
+ };
42
+ };
43
+ export declare const ResponsiveComparison: {
44
+ (): import("react/jsx-runtime").JSX.Element;
45
+ storyName: string;
46
+ };
47
+ export declare const WithoutBadges: {
48
+ (): import("react/jsx-runtime").JSX.Element;
49
+ storyName: string;
50
+ };
51
+ export declare const MixedCounts: {
52
+ (): import("react/jsx-runtime").JSX.Element;
53
+ storyName: string;
54
+ };
55
+ export declare const DisabledTabs: {
56
+ (): import("react/jsx-runtime").JSX.Element;
57
+ storyName: string;
58
+ };
59
+ export declare const AutoResponsive: {
60
+ (): import("react/jsx-runtime").JSX.Element;
61
+ storyName: string;
62
+ };
63
+ export declare const InteractiveExample: {
64
+ (): import("react/jsx-runtime").JSX.Element;
65
+ storyName: string;
66
+ };
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body-xl-heavy' | 'body-l-heavy' | 'body-l-bold' | 'body-l-medium' | 'body-m-heavy' | 'body-m-bold' | 'body-m-medium' | 'body-s-heavy' | 'body-s-bold' | 'body-s-medium' | 'body-ms-bold' | 'body-ms-medium' | 'body-xs-bold' | 'body-xs-medium' | 'body-t-bold' | 'body-t-medium' | 'body-ss-medium';
3
+ export interface TypographyProps extends React.HTMLAttributes<HTMLElement> {
4
+ variant?: TypographyVariant;
5
+ color?: 'primary' | 'secondary' | 'neutral-darker' | 'neutral-dark' | 'neutral-main' | 'white' | 'inherit';
6
+ as?: React.ElementType;
7
+ }
8
+ export declare const getTypographyClasses: (variant: TypographyVariant) => string;
9
+ export declare const Typography: React.ForwardRefExoticComponent<TypographyProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,57 @@
1
+ import { TypographyProps } from './Typography';
2
+ declare const _default: {
3
+ title: string;
4
+ component: import("react").ForwardRefExoticComponent<TypographyProps & import("react").RefAttributes<HTMLElement>>;
5
+ parameters: {
6
+ docs: {
7
+ description: {
8
+ component: string;
9
+ };
10
+ };
11
+ };
12
+ argTypes: {
13
+ variant: {
14
+ name: string;
15
+ control: {
16
+ type: string;
17
+ };
18
+ options: string[];
19
+ };
20
+ color: {
21
+ name: string;
22
+ control: {
23
+ type: string;
24
+ };
25
+ options: string[];
26
+ };
27
+ children: {
28
+ name: string;
29
+ control: {
30
+ type: string;
31
+ };
32
+ defaultValue: string;
33
+ };
34
+ };
35
+ };
36
+ export default _default;
37
+ export declare const Playground: {
38
+ (args: TypographyProps): import("react/jsx-runtime").JSX.Element;
39
+ storyName: string;
40
+ args: {
41
+ variant: string;
42
+ children: string;
43
+ color: string;
44
+ };
45
+ };
46
+ export declare const AllHeadings: {
47
+ (): import("react/jsx-runtime").JSX.Element;
48
+ storyName: string;
49
+ };
50
+ export declare const BodyCopyVariants: {
51
+ (): import("react/jsx-runtime").JSX.Element;
52
+ storyName: string;
53
+ };
54
+ export declare const ColorVariants: {
55
+ (): import("react/jsx-runtime").JSX.Element;
56
+ storyName: string;
57
+ };
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ interface MobileContextValue {
3
+ isMobile: boolean;
4
+ userAgent: string;
5
+ }
6
+ interface MobileProviderProps {
7
+ userAgent: string;
8
+ children: ReactNode;
9
+ }
10
+ declare const MobileContext: import("react").Context<MobileContextValue | undefined>;
11
+ export declare const MobileProvider: React.FC<MobileProviderProps>;
12
+ export declare const useMobile: (isMobile?: boolean) => MobileContextValue;
13
+ export default MobileContext;
@@ -0,0 +1,2 @@
1
+ export { MobileProvider, useMobile } from './MobileContext';
2
+ export { default as MobileContext } from './MobileContext';
@@ -0,0 +1,33 @@
1
+ export { initializeAutomobiKit } from './licensing';
2
+ export type { LicenseConfig } from './licensing';
3
+ export declare const Typography: import("react").ForwardRefExoticComponent<Omit<import("./components/Typography/Typography").TypographyProps & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<unknown>>;
4
+ export declare const Button: import("react").ForwardRefExoticComponent<Omit<import("./components/Button/Button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<unknown>>;
5
+ export declare const Input: import("react").ForwardRefExoticComponent<Omit<{
6
+ state?: "default" | "disabled" | "error";
7
+ label: string;
8
+ helperText?: string;
9
+ startIcon?: import("react").ReactNode;
10
+ endIcon?: import("react").ReactNode;
11
+ } & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "id"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<unknown>>;
12
+ export declare const Tabs: import("react").ForwardRefExoticComponent<Omit<import("./components/Tabs/Tabs").TabsProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<unknown>>;
13
+ export declare const Drawer: import("react").ForwardRefExoticComponent<Omit<import("./components/Drawer/Drawer").DrawerProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<unknown>>;
14
+ export declare const Backdrop: import("react").ForwardRefExoticComponent<Omit<import("./components/Backdrop/Backdrop").BackdropProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<unknown>>;
15
+ export declare const Breadcrumb: import("react").ForwardRefExoticComponent<Omit<import("./components/Breadcrumb/Breadcrumb").BreadcrumbProps & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<unknown>>;
16
+ export declare const Pagination: import("react").ForwardRefExoticComponent<import("./components/Pagination/Pagination").UnifiedPaginationProps & import("react").RefAttributes<unknown>>;
17
+ export declare const Accordion: import("react").ForwardRefExoticComponent<Omit<import("./components/Accordion/Accordion").AccordionProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<unknown>>;
18
+ export declare const Divider: import("react").ForwardRefExoticComponent<Omit<import("./components/Divider/Divider").DividerProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<unknown>>;
19
+ export declare const RadioGroup: import("react").ForwardRefExoticComponent<Omit<import("./components/RadioGroup/RadioGroup").RadioGroupProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<unknown>>;
20
+ export declare const Chips: import("react").ForwardRefExoticComponent<Omit<import("./components/Chips/Chips").ChipsProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<unknown>>;
21
+ export type { TypographyProps, TypographyVariant, } from './components/Typography/Typography';
22
+ export type { ButtonProps, ButtonVariant, ButtonSize, } from './components/Button/Button';
23
+ export type { InputProps } from './components/Input/Input';
24
+ export type { TabsProps, TabItem } from './components/Tabs/Tabs';
25
+ export type { DrawerProps, DrawerDirection } from './components/Drawer/Drawer';
26
+ export type { BackdropProps } from './components/Backdrop/Backdrop';
27
+ export type { BreadcrumbProps, BreadcrumbItem, } from './components/Breadcrumb/Breadcrumb';
28
+ export type { UnifiedPaginationProps as PaginationProps } from './components/Pagination/Pagination';
29
+ export type { AccordionProps } from './components/Accordion/Accordion';
30
+ export type { DividerProps } from './components/Divider/Divider';
31
+ export type { RadioGroupProps, RadioOption, } from './components/RadioGroup/RadioGroup';
32
+ export type { ChipsProps } from './components/Chips/Chips';
33
+ export { MobileProvider, useMobile } from './contexts/MobileContext';
@@ -0,0 +1,41 @@
1
+ /**
2
+ * License Manager for Automoby Kit
3
+ * Handles runtime key validation and component access control
4
+ */
5
+ export interface LicenseConfig {
6
+ key: string;
7
+ }
8
+ declare class LicenseManager {
9
+ private static instance;
10
+ private isInitialized;
11
+ private isValid;
12
+ private licenseKey;
13
+ private validKeys;
14
+ private constructor();
15
+ static getInstance(): LicenseManager;
16
+ /**
17
+ * Initialize the license with provided configuration
18
+ */
19
+ initialize(config: LicenseConfig): boolean;
20
+ /**
21
+ * Validate license key (in production, this would call your backend)
22
+ */
23
+ private validateLicense;
24
+ /**
25
+ * Check if the license is valid and components can be used
26
+ */
27
+ canUseComponents(): boolean;
28
+ /**
29
+ * Get current license status
30
+ */
31
+ getLicenseStatus(): {
32
+ initialized: boolean;
33
+ valid: boolean;
34
+ key: string | null;
35
+ };
36
+ /**
37
+ * Reset license state (useful for testing)
38
+ */
39
+ reset(): void;
40
+ }
41
+ export default LicenseManager;
@@ -0,0 +1,30 @@
1
+ import { LicenseConfig } from './LicenseManager';
2
+ /**
3
+ * Initialize Automoby Kit with your license key
4
+ * This function must be called before using any components
5
+ *
6
+ * @param config - License configuration
7
+ * @returns boolean indicating success
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * import { initializeAutomobiKit } from 'automoby-kit';
12
+ *
13
+ * // Initialize with your license key
14
+ * const success = initializeAutomobiKit({
15
+ * key: 'your-license-key-here',
16
+ * domain: 'yourdomain.com', // optional
17
+ * environment: 'production' // optional
18
+ * });
19
+ *
20
+ * if (success) {
21
+ * // Now you can use components
22
+ * }
23
+ * ```
24
+ */
25
+ export declare function initializeAutomobiKit(config: LicenseConfig): boolean;
26
+ /**
27
+ * Check if components can be used
28
+ */
29
+ export declare function canUseComponents(): boolean;
30
+ export type { LicenseConfig };
@@ -0,0 +1,2 @@
1
+ import { type ClassValue } from 'clsx';
2
+ export default function cn(...inputs: ClassValue[]): string;
package/package.json ADDED
@@ -0,0 +1,90 @@
1
+ {
2
+ "name": "automoby-kit",
3
+ "version": "1.0.0",
4
+ "description": "A comprehensive React UI component library with built-in licensing system - created in war 2025",
5
+ "main": "dist/index.cjs.js",
6
+ "module": "dist/index.esm.js",
7
+ "types": "dist/types/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "keywords": [
12
+ "react",
13
+ "ui",
14
+ "components",
15
+ "typescript",
16
+ "tailwind",
17
+ "kit"
18
+ ],
19
+ "scripts": {
20
+ "test": "echo \"Error: no test specified\" && exit 1",
21
+ "lint": "eslint \"src/**/*.{js,ts,jsx,tsx}\" --fix",
22
+ "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,md}\"",
23
+ "check-format": "prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css,md}\"",
24
+ "check-lint": "eslint \"src/**/*.{js,ts,jsx,tsx}\"",
25
+ "check-types": "tsc --noEmit",
26
+ "prepare": "husky",
27
+ "prepublishOnly": "npm run build",
28
+ "storybook": "storybook dev -p 6006",
29
+ "storybook:dev": "concurrently \"npm:build:storybook:css:watch\" \"storybook dev -p 6006\"",
30
+ "build-storybook": "storybook build",
31
+ "build:storybook:css:watch": "npx @tailwindcss/cli -i ./.storybook/tailwind.css -o ./tailwind-build/tailwind.build.css --watch",
32
+ "build:storybook:css": "npx @tailwindcss/cli -i ./.storybook/tailwind.css -o ./tailwind-build/tailwind.build.css",
33
+ "clean": "rimraf dist",
34
+ "build": "npm run clean && rollup -c"
35
+ },
36
+ "author": "Ghazal_kordi Alireza_mirzaee",
37
+ "license": "ISC",
38
+ "peerDependencies": {
39
+ "clsx": "^2.1.1",
40
+ "lucide-react": "^0.522.0",
41
+ "react": "^19.1.0",
42
+ "react-dom": "^19.1.0",
43
+ "tailwindcss": "^4.1.10",
44
+ "typescript": "^5.8.3",
45
+ "ua-parser-js": "^2.0.4"
46
+ },
47
+ "devDependencies": {
48
+ "@rollup/plugin-alias": "^5.1.1",
49
+ "@rollup/plugin-commonjs": "^28.0.6",
50
+ "@rollup/plugin-node-resolve": "^16.0.1",
51
+ "@rollup/plugin-typescript": "^12.1.3",
52
+ "@storybook/addon-docs": "^9.0.6",
53
+ "@storybook/addon-onboarding": "^9.0.6",
54
+ "@storybook/react-vite": "^9.0.6",
55
+ "@tailwindcss/cli": "^4.1.10",
56
+ "@tailwindcss/postcss": "^4.1.10",
57
+ "@types/node": "^24.0.3",
58
+ "@types/react": "^19.1.4",
59
+ "@types/react-dom": "^19.1.5",
60
+ "@typescript-eslint/eslint-plugin": "^7.18.0",
61
+ "@typescript-eslint/parser": "^7.18.0",
62
+ "autoprefixer": "^10.4.21",
63
+ "clsx": "^2.1.1",
64
+ "concurrently": "^9.2.0",
65
+ "eslint": "^8.57.0",
66
+ "eslint-config-airbnb": "^19.0.4",
67
+ "eslint-config-airbnb-typescript": "^18.0.0",
68
+ "eslint-config-prettier": "^10.1.5",
69
+ "eslint-import-resolver-typescript": "^4.4.3",
70
+ "eslint-plugin-import": "^2.32.0",
71
+ "eslint-plugin-jsx-a11y": "^6.10.2",
72
+ "eslint-plugin-prettier": "^5.5.0",
73
+ "eslint-plugin-react": "^7.37.5",
74
+ "eslint-plugin-storybook": "^9.0.6",
75
+ "husky": "^9.1.7",
76
+ "lucide-react": "^0.522.0",
77
+ "prettier": "^3.5.3",
78
+ "react": "^19.1.0",
79
+ "react-dom": "^19.1.0",
80
+ "rimraf": "^6.0.1",
81
+ "rollup": "^4.44.0",
82
+ "serve": "^14.2.4",
83
+ "storybook": "^9.0.6",
84
+ "tailwind-merge": "^3.3.1",
85
+ "tailwindcss": "^4.1.10",
86
+ "typescript": "^5.8.3",
87
+ "@types/ua-parser-js": "^0.7.39",
88
+ "ua-parser-js": "^2.0.4"
89
+ }
90
+ }