automoby-kit 1.0.2 → 1.0.4

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 (82) hide show
  1. package/dist/cjs/Accordion.js +1 -0
  2. package/dist/cjs/Backdrop.js +1 -0
  3. package/dist/cjs/Breadcrumb.js +1 -0
  4. package/dist/cjs/Button.js +1 -0
  5. package/dist/cjs/Chips.js +1 -0
  6. package/dist/cjs/Divider.js +1 -0
  7. package/dist/cjs/Drawer.js +1 -0
  8. package/dist/cjs/Input.js +1 -0
  9. package/dist/cjs/Menu.js +1 -0
  10. package/dist/cjs/Pagination.js +1 -0
  11. package/dist/cjs/ProtectedComponent.js +1 -0
  12. package/dist/cjs/RadioGroup.js +1 -0
  13. package/dist/cjs/Tabs.js +1 -0
  14. package/dist/cjs/Typography.js +1 -0
  15. package/dist/cjs/chunks/MobileContext-Cmx8hQxY.js +1 -0
  16. package/dist/cjs/chunks/chevron-left-Do__K6cA.js +1 -0
  17. package/dist/cjs/chunks/createLucideIcon-BqJVOzoK.js +1 -0
  18. package/dist/cjs/chunks/jsx-runtime-Bgd4cJfV.js +1 -0
  19. package/dist/cjs/contexts.js +1 -0
  20. package/dist/cjs/index.js +1 -0
  21. package/dist/cjs/licensing.js +1 -0
  22. package/dist/cjs/utils.js +1 -0
  23. package/dist/esm/Accordion.js +1 -0
  24. package/dist/esm/Backdrop.js +1 -0
  25. package/dist/esm/Breadcrumb.js +1 -0
  26. package/dist/esm/Button.js +1 -0
  27. package/dist/esm/Chips.js +1 -0
  28. package/dist/esm/Divider.js +1 -0
  29. package/dist/esm/Drawer.js +1 -0
  30. package/dist/esm/Input.js +1 -0
  31. package/dist/esm/Menu.js +1 -0
  32. package/dist/esm/Pagination.js +1 -0
  33. package/dist/esm/ProtectedComponent.js +1 -0
  34. package/dist/esm/RadioGroup.js +1 -0
  35. package/dist/esm/Tabs.js +1 -0
  36. package/dist/esm/Typography.js +1 -0
  37. package/dist/esm/chunks/MobileContext-BtGMRo2b.js +1 -0
  38. package/dist/esm/chunks/chevron-left-4HSuTes3.js +1 -0
  39. package/dist/esm/chunks/createLucideIcon-DGp0SoUT.js +1 -0
  40. package/dist/esm/chunks/jsx-runtime-DZXOD2H9.js +1 -0
  41. package/dist/esm/contexts.js +1 -0
  42. package/dist/esm/index.js +1 -0
  43. package/dist/esm/licensing.js +1 -0
  44. package/dist/esm/utils.js +1 -0
  45. package/dist/types/Accordion.js +54 -0
  46. package/dist/types/Backdrop.js +24 -0
  47. package/dist/types/Breadcrumb.js +56 -0
  48. package/dist/types/Button.js +46 -0
  49. package/dist/types/Chips.js +109 -0
  50. package/dist/types/Divider.js +21 -0
  51. package/dist/types/Drawer.js +107 -0
  52. package/dist/types/Input.js +78 -0
  53. package/dist/types/Menu.js +120 -0
  54. package/dist/{index.esm.js → types/MobileContext-D-Cbqeno.js} +3 -1519
  55. package/dist/types/Pagination.js +183 -0
  56. package/dist/types/ProtectedComponent.js +33 -0
  57. package/dist/types/RadioGroup.js +68 -0
  58. package/dist/types/Tabs.js +49 -0
  59. package/dist/types/Typography.js +60 -0
  60. package/dist/types/chevron-left-Ck6O99eF.js +14 -0
  61. package/dist/types/components/Accordion/Accordion.d.ts +2 -2
  62. package/dist/types/components/Accordion/Accordion.stories.d.ts +10 -9
  63. package/dist/types/components/Breadcrumb/Breadcrumb.d.ts +4 -1
  64. package/dist/types/components/Breadcrumb/Breadcrumb.stories.d.ts +4 -3
  65. package/dist/types/components/Chips/Chips.d.ts +2 -2
  66. package/dist/types/components/Drawer/Drawer.d.ts +4 -0
  67. package/dist/types/components/Drawer/Drawer.stories.d.ts +21 -8
  68. package/dist/types/components/Input/Input.d.ts +8 -0
  69. package/dist/types/components/Input/Input.stories.d.ts +1 -0
  70. package/dist/types/components/Pagination/Pagination.d.ts +4 -0
  71. package/dist/types/components/Pagination/Pagination.stories.d.ts +17 -2
  72. package/dist/types/components/RadioGroup/RadioGroup.d.ts +2 -2
  73. package/dist/types/components/Tabs/Tabs.d.ts +2 -2
  74. package/dist/types/contexts.js +3 -0
  75. package/dist/types/createLucideIcon-D-q73LTT.js +112 -0
  76. package/dist/types/index.d.ts +3 -0
  77. package/dist/types/index.js +38 -0
  78. package/dist/types/jsx-runtime-BiC2V0nk.js +430 -0
  79. package/dist/types/licensing.js +125 -0
  80. package/dist/types/utils.js +7 -0
  81. package/package.json +93 -4
  82. package/dist/index.cjs.js +0 -3019
@@ -32,6 +32,14 @@ declare const _default: {
32
32
  type: string;
33
33
  };
34
34
  };
35
+ isMobile: {
36
+ name: string;
37
+ control: {
38
+ type: string;
39
+ };
40
+ defaultValue: boolean;
41
+ description: string;
42
+ };
35
43
  children: {
36
44
  table: {
37
45
  disable: boolean;
@@ -51,12 +59,11 @@ declare const _default: {
51
59
  };
52
60
  export default _default;
53
61
  export declare const Default: {
54
- ({ triggerButtonText, ...args }: StoryArgs): import("react/jsx-runtime").JSX.Element;
62
+ ({ triggerButtonText, isMobile, ...args }: StoryArgs): import("react/jsx-runtime").JSX.Element;
55
63
  storyName: string;
56
64
  args: {
57
65
  direction: string;
58
- fullScreen: boolean;
59
- triggerButtonText: string;
66
+ isMobile: boolean;
60
67
  };
61
68
  };
62
69
  export declare const TopDirection: {
@@ -65,7 +72,7 @@ export declare const TopDirection: {
65
72
  args: {
66
73
  direction: string;
67
74
  triggerButtonText: string;
68
- fullScreen: boolean;
75
+ isMobile: boolean;
69
76
  };
70
77
  };
71
78
  export declare const LeftDirection: {
@@ -74,7 +81,7 @@ export declare const LeftDirection: {
74
81
  args: {
75
82
  direction: string;
76
83
  triggerButtonText: string;
77
- fullScreen: boolean;
84
+ isMobile: boolean;
78
85
  };
79
86
  };
80
87
  export declare const RightDirection: {
@@ -83,7 +90,7 @@ export declare const RightDirection: {
83
90
  args: {
84
91
  direction: string;
85
92
  triggerButtonText: string;
86
- fullScreen: boolean;
93
+ isMobile: boolean;
87
94
  };
88
95
  };
89
96
  export declare const FullScreenDrawer: {
@@ -93,15 +100,17 @@ export declare const FullScreenDrawer: {
93
100
  fullScreen: boolean;
94
101
  triggerButtonText: string;
95
102
  direction: string;
103
+ isMobile: boolean;
96
104
  };
97
105
  };
98
106
  export declare const NavigationDrawer: {
99
- ({ triggerButtonText, ...args }: StoryArgs): import("react/jsx-runtime").JSX.Element;
107
+ ({ triggerButtonText, isMobile, ...args }: StoryArgs): import("react/jsx-runtime").JSX.Element;
100
108
  storyName: string;
101
109
  args: {
102
110
  direction: string;
103
111
  fullScreen: boolean;
104
112
  triggerButtonText: string;
113
+ isMobile: boolean;
105
114
  };
106
115
  };
107
116
  export declare const MobileVersion: {
@@ -110,6 +119,10 @@ export declare const MobileVersion: {
110
119
  args: {
111
120
  direction: string;
112
121
  triggerButtonText: string;
113
- fullScreen: boolean;
122
+ isMobile: boolean;
114
123
  };
115
124
  };
125
+ export declare const ResponsiveComparison: {
126
+ (): import("react/jsx-runtime").JSX.Element;
127
+ storyName: string;
128
+ };
@@ -5,6 +5,10 @@ export type InputProps = {
5
5
  helperText?: string;
6
6
  startIcon?: ReactNode;
7
7
  endIcon?: ReactNode;
8
+ /**
9
+ * Whether the component is in mobile mode
10
+ */
11
+ isMobile: boolean;
8
12
  } & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'id'>;
9
13
  declare const Input: React.ForwardRefExoticComponent<{
10
14
  state?: "default" | "disabled" | "error";
@@ -12,5 +16,9 @@ declare const Input: React.ForwardRefExoticComponent<{
12
16
  helperText?: string;
13
17
  startIcon?: ReactNode;
14
18
  endIcon?: ReactNode;
19
+ /**
20
+ * Whether the component is in mobile mode
21
+ */
22
+ isMobile: boolean;
15
23
  } & Omit<React.InputHTMLAttributes<HTMLInputElement>, "id"> & React.RefAttributes<HTMLInputElement>>;
16
24
  export { Input };
@@ -10,6 +10,7 @@ declare const _default: {
10
10
  helperText?: string;
11
11
  startIcon?: import("react").ReactNode;
12
12
  endIcon?: import("react").ReactNode;
13
+ isMobile: boolean;
13
14
  } & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "id"> & import("react").RefAttributes<HTMLInputElement>>;
14
15
  parameters: {
15
16
  docs: {
@@ -4,5 +4,9 @@ export interface UnifiedPaginationProps {
4
4
  defaultPage?: number;
5
5
  onPageChange?: (page: number) => void;
6
6
  className?: string;
7
+ /**
8
+ * Whether the component is in mobile mode
9
+ */
10
+ isMobile: boolean;
7
11
  }
8
12
  export declare const Pagination: React.FC<UnifiedPaginationProps>;
@@ -36,26 +36,41 @@ declare const _default: {
36
36
  };
37
37
  defaultValue: undefined;
38
38
  };
39
+ isMobile: {
40
+ name: string;
41
+ control: {
42
+ type: string;
43
+ };
44
+ defaultValue: boolean;
45
+ description: string;
46
+ };
39
47
  };
40
48
  };
41
49
  export default _default;
42
50
  type StoryProps = {
43
51
  pageCount: number;
44
52
  defaultPage: number;
53
+ isMobile: boolean;
45
54
  };
46
55
  export declare const Uncontrolled: {
47
- ({ pageCount, defaultPage }: StoryProps): import("react/jsx-runtime").JSX.Element;
56
+ ({ pageCount, defaultPage, isMobile, }: StoryProps): import("react/jsx-runtime").JSX.Element;
48
57
  storyName: string;
49
58
  args: {
50
59
  pageCount: number;
51
60
  defaultPage: number;
61
+ isMobile: boolean;
52
62
  };
53
63
  };
54
64
  export declare const Controlled: {
55
- ({ pageCount, defaultPage }: StoryProps): import("react/jsx-runtime").JSX.Element;
65
+ ({ pageCount, defaultPage, isMobile, }: StoryProps): import("react/jsx-runtime").JSX.Element;
56
66
  storyName: string;
57
67
  args: {
58
68
  pageCount: number;
59
69
  defaultPage: number;
70
+ isMobile: boolean;
60
71
  };
61
72
  };
73
+ export declare const ResponsiveComparison: {
74
+ (): import("react/jsx-runtime").JSX.Element;
75
+ storyName: string;
76
+ };
@@ -43,9 +43,9 @@ export interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLDivElemen
43
43
  */
44
44
  className?: string;
45
45
  /**
46
- * Override mobile detection for testing
46
+ * Whether the component is in mobile mode
47
47
  */
48
- isMobile?: boolean;
48
+ isMobile: boolean;
49
49
  /**
50
50
  * Layout direction of radio options
51
51
  */
@@ -35,9 +35,9 @@ export interface TabsProps extends React.HTMLAttributes<HTMLDivElement> {
35
35
  */
36
36
  className?: string;
37
37
  /**
38
- * Override mobile detection for testing
38
+ * Whether the component is in mobile mode
39
39
  */
40
- isMobile?: boolean;
40
+ isMobile: boolean;
41
41
  }
42
42
  declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
43
43
  export { Tabs };
@@ -0,0 +1,3 @@
1
+ export { a as MobileContext, M as MobileProvider, u as useMobile } from './MobileContext-D-Cbqeno.js';
2
+ import './jsx-runtime-BiC2V0nk.js';
3
+ import 'react';
@@ -0,0 +1,112 @@
1
+ import { forwardRef, createElement } from 'react';
2
+
3
+ /**
4
+ * @license lucide-react v0.522.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
11
+ const toCamelCase = (string) => string.replace(
12
+ /^([A-Z])|[\s-_]+(\w)/g,
13
+ (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
14
+ );
15
+ const toPascalCase = (string) => {
16
+ const camelCase = toCamelCase(string);
17
+ return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
18
+ };
19
+ const mergeClasses = (...classes) => classes.filter((className, index, array) => {
20
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
21
+ }).join(" ").trim();
22
+ const hasA11yProp = (props) => {
23
+ for (const prop in props) {
24
+ if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
25
+ return true;
26
+ }
27
+ }
28
+ };
29
+
30
+ /**
31
+ * @license lucide-react v0.522.0 - ISC
32
+ *
33
+ * This source code is licensed under the ISC license.
34
+ * See the LICENSE file in the root directory of this source tree.
35
+ */
36
+
37
+ var defaultAttributes = {
38
+ xmlns: "http://www.w3.org/2000/svg",
39
+ width: 24,
40
+ height: 24,
41
+ viewBox: "0 0 24 24",
42
+ fill: "none",
43
+ stroke: "currentColor",
44
+ strokeWidth: 2,
45
+ strokeLinecap: "round",
46
+ strokeLinejoin: "round"
47
+ };
48
+
49
+ /**
50
+ * @license lucide-react v0.522.0 - ISC
51
+ *
52
+ * This source code is licensed under the ISC license.
53
+ * See the LICENSE file in the root directory of this source tree.
54
+ */
55
+
56
+
57
+ const Icon = forwardRef(
58
+ ({
59
+ color = "currentColor",
60
+ size = 24,
61
+ strokeWidth = 2,
62
+ absoluteStrokeWidth,
63
+ className = "",
64
+ children,
65
+ iconNode,
66
+ ...rest
67
+ }, ref) => createElement(
68
+ "svg",
69
+ {
70
+ ref,
71
+ ...defaultAttributes,
72
+ width: size,
73
+ height: size,
74
+ stroke: color,
75
+ strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
76
+ className: mergeClasses("lucide", className),
77
+ ...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
78
+ ...rest
79
+ },
80
+ [
81
+ ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
82
+ ...Array.isArray(children) ? children : [children]
83
+ ]
84
+ )
85
+ );
86
+
87
+ /**
88
+ * @license lucide-react v0.522.0 - ISC
89
+ *
90
+ * This source code is licensed under the ISC license.
91
+ * See the LICENSE file in the root directory of this source tree.
92
+ */
93
+
94
+
95
+ const createLucideIcon = (iconName, iconNode) => {
96
+ const Component = forwardRef(
97
+ ({ className, ...props }, ref) => createElement(Icon, {
98
+ ref,
99
+ iconNode,
100
+ className: mergeClasses(
101
+ `lucide-${toKebabCase(toPascalCase(iconName))}`,
102
+ `lucide-${iconName}`,
103
+ className
104
+ ),
105
+ ...props
106
+ })
107
+ );
108
+ Component.displayName = toPascalCase(iconName);
109
+ return Component;
110
+ };
111
+
112
+ export { createLucideIcon as c };
@@ -8,6 +8,7 @@ export declare const Input: import("react").ForwardRefExoticComponent<Omit<{
8
8
  helperText?: string;
9
9
  startIcon?: import("react").ReactNode;
10
10
  endIcon?: import("react").ReactNode;
11
+ isMobile: boolean;
11
12
  } & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "id"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<unknown>>;
12
13
  export declare const Tabs: import("react").ForwardRefExoticComponent<Omit<import("./components/Tabs/Tabs").TabsProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<unknown>>;
13
14
  export declare const Drawer: import("react").ForwardRefExoticComponent<Omit<import("./components/Drawer/Drawer").DrawerProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<unknown>>;
@@ -18,6 +19,7 @@ export declare const Accordion: import("react").ForwardRefExoticComponent<Omit<i
18
19
  export declare const Divider: import("react").ForwardRefExoticComponent<Omit<import("./components/Divider/Divider").DividerProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<unknown>>;
19
20
  export declare const RadioGroup: import("react").ForwardRefExoticComponent<Omit<import("./components/RadioGroup/RadioGroup").RadioGroupProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<unknown>>;
20
21
  export declare const Chips: import("react").ForwardRefExoticComponent<Omit<import("./components/Chips/Chips").ChipsProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<unknown>>;
22
+ export declare const Menu: import("react").ForwardRefExoticComponent<Omit<import("./components/Menu/Menu").MenuProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<unknown>>;
21
23
  export type { TypographyProps, TypographyVariant, } from './components/Typography/Typography';
22
24
  export type { ButtonProps, ButtonVariant, ButtonSize, } from './components/Button/Button';
23
25
  export type { InputProps } from './components/Input/Input';
@@ -30,4 +32,5 @@ export type { AccordionProps } from './components/Accordion/Accordion';
30
32
  export type { DividerProps } from './components/Divider/Divider';
31
33
  export type { RadioGroupProps, RadioOption, } from './components/RadioGroup/RadioGroup';
32
34
  export type { ChipsProps } from './components/Chips/Chips';
35
+ export type { MenuProps, MenuItem } from './components/Menu/Menu';
33
36
  export { MobileProvider, useMobile } from './contexts/MobileContext';
@@ -0,0 +1,38 @@
1
+ import { withLicenseProtection } from './ProtectedComponent.js';
2
+ import { Typography as Typography$1 } from './Typography.js';
3
+ import { Button as Button$1 } from './Button.js';
4
+ import { Input as Input$1 } from './Input.js';
5
+ import { Tabs as Tabs$1 } from './Tabs.js';
6
+ import { Drawer as Drawer$1 } from './Drawer.js';
7
+ import { Backdrop as Backdrop$1 } from './Backdrop.js';
8
+ import { Breadcrumb as Breadcrumb$1 } from './Breadcrumb.js';
9
+ import { Pagination as Pagination$1 } from './Pagination.js';
10
+ import { Accordion as Accordion$1 } from './Accordion.js';
11
+ import { Divider as Divider$1 } from './Divider.js';
12
+ import { RadioGroup as RadioGroup$1 } from './RadioGroup.js';
13
+ import { Chips as Chips$1 } from './Chips.js';
14
+ import { Menu as Menu$1 } from './Menu.js';
15
+ export { initializeAutomobiKit } from './licensing.js';
16
+ export { M as MobileProvider, u as useMobile } from './MobileContext-D-Cbqeno.js';
17
+ import './jsx-runtime-BiC2V0nk.js';
18
+ import 'react';
19
+ import './utils.js';
20
+ import './chevron-left-Ck6O99eF.js';
21
+ import './createLucideIcon-D-q73LTT.js';
22
+
23
+ // Protected Components (license-wrapped)
24
+ const Typography = withLicenseProtection(Typography$1, 'Typography');
25
+ const Button = withLicenseProtection(Button$1, 'Button');
26
+ const Input = withLicenseProtection(Input$1, 'Input');
27
+ const Tabs = withLicenseProtection(Tabs$1, 'Tabs');
28
+ const Drawer = withLicenseProtection(Drawer$1, 'Drawer');
29
+ const Backdrop = withLicenseProtection(Backdrop$1, 'Backdrop');
30
+ const Breadcrumb = withLicenseProtection(Breadcrumb$1, 'Breadcrumb');
31
+ const Pagination = withLicenseProtection(Pagination$1, 'Pagination');
32
+ const Accordion = withLicenseProtection(Accordion$1, 'Accordion');
33
+ const Divider = withLicenseProtection(Divider$1, 'Divider');
34
+ const RadioGroup = withLicenseProtection(RadioGroup$1, 'RadioGroup');
35
+ const Chips = withLicenseProtection(Chips$1, 'Chips');
36
+ const Menu = withLicenseProtection(Menu$1, 'Menu');
37
+
38
+ export { Accordion, Backdrop, Breadcrumb, Button, Chips, Divider, Drawer, Input, Menu, Pagination, RadioGroup, Tabs, Typography };