automoby-kit 1.0.12 → 1.0.13
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/README.md +7 -71
- package/dist/cjs/Accordion.js +59 -1
- package/dist/cjs/Backdrop.js +26 -1
- package/dist/cjs/Breadcrumb.js +61 -1
- package/dist/cjs/Button.js +48 -1
- package/dist/cjs/Chips.js +117 -1
- package/dist/cjs/Divider.js +23 -1
- package/dist/cjs/Drawer.js +112 -1
- package/dist/cjs/Input.js +84 -1
- package/dist/cjs/Menu.js +122 -1
- package/dist/cjs/Pagination.js +188 -1
- package/dist/cjs/RadioGroup.js +73 -1
- package/dist/cjs/Tabs.js +54 -1
- package/dist/cjs/Typography.js +63 -1
- package/dist/cjs/chevron-left-COj1qGVo.js +16 -0
- package/dist/{types → cjs}/components/Accordion/Accordion.d.ts +2 -2
- package/dist/{types → cjs}/components/Breadcrumb/Breadcrumb.d.ts +2 -2
- package/dist/{types → cjs}/components/Chips/Chips.d.ts +5 -5
- package/dist/{types → cjs}/components/Drawer/Drawer.d.ts +2 -2
- package/dist/{types → cjs}/components/Input/Input.d.ts +4 -4
- package/dist/{types → cjs}/components/Input/Input.stories.d.ts +1 -1
- package/dist/{types → cjs}/components/Pagination/Pagination.d.ts +2 -2
- package/dist/{types → cjs}/components/RadioGroup/RadioGroup.d.ts +2 -2
- package/dist/cjs/components/Select/Select.d.ts +17 -0
- package/dist/cjs/components/Select/Select.stories.d.ts +104 -0
- package/dist/{types → cjs}/components/Tabs/Tabs.d.ts +2 -2
- package/dist/{types → cjs}/contexts/MobileContext.d.ts +1 -0
- package/dist/cjs/contexts.js +1491 -1
- package/dist/cjs/createLucideIcon-BTjFFtDc.js +114 -0
- package/dist/cjs/index.d.ts +34 -0
- package/dist/cjs/index.js +52 -1
- package/dist/cjs/utils.js +9 -1
- package/dist/esm/Accordion.js +57 -1
- package/dist/esm/Backdrop.js +24 -1
- package/dist/esm/Breadcrumb.js +59 -1
- package/dist/esm/Button.js +46 -1
- package/dist/esm/Chips.js +112 -1
- package/dist/esm/Divider.js +21 -1
- package/dist/esm/Drawer.js +110 -1
- package/dist/esm/Input.js +82 -1
- package/dist/esm/Menu.js +120 -1
- package/dist/esm/Pagination.js +186 -1
- package/dist/esm/RadioGroup.js +71 -1
- package/dist/esm/Tabs.js +52 -1
- package/dist/esm/Typography.js +60 -1
- package/dist/esm/components/Accordion/Accordion.d.ts +25 -0
- package/dist/esm/components/Accordion/Accordion.stories.d.ts +175 -0
- package/dist/esm/components/Backdrop/Backdrop.d.ts +20 -0
- package/dist/esm/components/Backdrop/Backdrop.stories.d.ts +9 -0
- package/dist/esm/components/Breadcrumb/Breadcrumb.d.ts +16 -0
- package/dist/esm/components/Breadcrumb/Breadcrumb.stories.d.ts +177 -0
- package/dist/esm/components/Button/Button.d.ts +13 -0
- package/dist/esm/components/Button/Button.stories.d.ts +100 -0
- package/dist/esm/components/Chips/Chips.d.ts +37 -0
- package/dist/esm/components/Chips/Chips.stories.d.ts +90 -0
- package/dist/esm/components/Divider/Divider.d.ts +25 -0
- package/dist/esm/components/Divider/Divider.stories.d.ts +88 -0
- package/dist/esm/components/Drawer/Drawer.d.ts +16 -0
- package/dist/esm/components/Drawer/Drawer.stories.d.ts +128 -0
- package/dist/esm/components/Input/Input.d.ts +24 -0
- package/dist/esm/components/Input/Input.stories.d.ts +131 -0
- package/dist/esm/components/Menu/Menu.d.ts +39 -0
- package/dist/esm/components/Menu/Menu.stories.d.ts +89 -0
- package/dist/esm/components/Pagination/Pagination.d.ts +12 -0
- package/dist/esm/components/Pagination/Pagination.stories.d.ts +76 -0
- package/dist/esm/components/RadioGroup/RadioGroup.d.ts +55 -0
- package/dist/esm/components/RadioGroup/RadioGroup.stories.d.ts +86 -0
- package/dist/esm/components/Select/Select.d.ts +17 -0
- package/dist/esm/components/Select/Select.stories.d.ts +104 -0
- package/dist/esm/components/Tabs/Tabs.d.ts +43 -0
- package/dist/esm/components/Tabs/Tabs.stories.d.ts +66 -0
- package/dist/esm/components/Typography/Typography.d.ts +9 -0
- package/dist/esm/components/Typography/Typography.stories.d.ts +57 -0
- package/dist/esm/contexts/MobileContext.d.ts +13 -0
- package/dist/esm/contexts.js +1485 -1
- package/dist/esm/index.d.ts +34 -0
- package/dist/esm/index.js +37 -1
- package/dist/esm/utils/cn.d.ts +2 -0
- package/dist/esm/utils.js +7 -1
- package/package.json +2 -7
- package/dist/cjs/ProtectedComponent.js +0 -1
- package/dist/cjs/licensing.js +0 -1
- package/dist/esm/ProtectedComponent.js +0 -1
- package/dist/esm/licensing.js +0 -1
- package/dist/types/Accordion.js +0 -54
- package/dist/types/Backdrop.js +0 -24
- package/dist/types/Breadcrumb.js +0 -56
- package/dist/types/Button.js +0 -46
- package/dist/types/Chips.js +0 -109
- package/dist/types/Divider.js +0 -21
- package/dist/types/Drawer.js +0 -107
- package/dist/types/Input.js +0 -78
- package/dist/types/Menu.js +0 -120
- package/dist/types/Pagination.js +0 -183
- package/dist/types/ProtectedComponent.js +0 -33
- package/dist/types/RadioGroup.js +0 -68
- package/dist/types/Tabs.js +0 -49
- package/dist/types/Typography.js +0 -60
- package/dist/types/components/ProtectedComponent.d.ts +0 -5
- package/dist/types/contexts.js +0 -1478
- package/dist/types/index.d.ts +0 -36
- package/dist/types/index.js +0 -38
- package/dist/types/licensing/LicenseManager.d.ts +0 -41
- package/dist/types/licensing/index.d.ts +0 -30
- package/dist/types/licensing.js +0 -125
- package/dist/types/utils.js +0 -7
- /package/dist/{types → cjs}/components/Accordion/Accordion.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/Backdrop/Backdrop.d.ts +0 -0
- /package/dist/{types → cjs}/components/Backdrop/Backdrop.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/Breadcrumb/Breadcrumb.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/Button/Button.d.ts +0 -0
- /package/dist/{types → cjs}/components/Button/Button.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/Chips/Chips.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/Divider/Divider.d.ts +0 -0
- /package/dist/{types → cjs}/components/Divider/Divider.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/Drawer/Drawer.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/Menu/Menu.d.ts +0 -0
- /package/dist/{types → cjs}/components/Menu/Menu.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/Pagination/Pagination.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/RadioGroup/RadioGroup.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/Tabs/Tabs.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/Typography/Typography.d.ts +0 -0
- /package/dist/{types → cjs}/components/Typography/Typography.stories.d.ts +0 -0
- /package/dist/{types → cjs}/utils/cn.d.ts +0 -0
- /package/dist/{types → esm}/chevron-left-Ck6O99eF.js +0 -0
- /package/dist/{types → esm}/createLucideIcon-D-q73LTT.js +0 -0
package/dist/esm/Tabs.js
CHANGED
|
@@ -1 +1,52 @@
|
|
|
1
|
-
import{jsxs
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import cn from './utils.js';
|
|
4
|
+
import { useMobile } from './contexts.js';
|
|
5
|
+
|
|
6
|
+
// Helper functions moved outside component
|
|
7
|
+
const handleTabClick = (tabId, disabled, onTabChange) => {
|
|
8
|
+
if (!disabled) {
|
|
9
|
+
onTabChange(tabId);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
const handleKeyDown = (e, tabId, disabled, onTabChange) => {
|
|
13
|
+
if ((e.key === 'Enter' || e.key === ' ') && !disabled) {
|
|
14
|
+
e.preventDefault();
|
|
15
|
+
onTabChange(tabId);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const renderBadge = (count, isActive, disabled, isMobile) => {
|
|
19
|
+
if (count === undefined)
|
|
20
|
+
return null;
|
|
21
|
+
return (jsx("div", { className: cn('flex items-center justify-center rounded-[5px] font-sans font-bold text-white', 'transition-colors duration-200', isMobile
|
|
22
|
+
? 'size-6 text-[14px] pt-0.5'
|
|
23
|
+
: 'size-[25px] text-[14px] pt-[3px]', disabled ? 'bg-midnight' : isActive ? 'bg-primary' : 'bg-neutral-main'), children: jsx("p", { className: "leading-[24px] whitespace-pre", dir: "auto", children: count }) }));
|
|
24
|
+
};
|
|
25
|
+
const renderTabContent = (item, isActive, isMobile) => {
|
|
26
|
+
const hasCount = item.count !== undefined;
|
|
27
|
+
return (jsxs("div", { className: cn('flex flex-row items-center justify-start transition-colors duration-200', isMobile ? 'gap-1.5' : 'gap-1.5'), children: [hasCount && renderBadge(item.count, isActive, item.disabled, isMobile), jsx("div", { className: cn('font-sans text-nowrap text-right transition-colors duration-200', isMobile ? 'text-[14px]' : isActive ? 'text-[16px]' : 'text-[18px]', item.disabled
|
|
28
|
+
? 'font-normal text-midnight'
|
|
29
|
+
: isActive
|
|
30
|
+
? 'font-bold text-primary'
|
|
31
|
+
: 'font-normal text-neutral-main', isMobile
|
|
32
|
+
? 'leading-[24px]'
|
|
33
|
+
: isActive
|
|
34
|
+
? 'leading-normal'
|
|
35
|
+
: 'leading-[1.9]'), children: jsx("p", { className: "whitespace-pre", dir: "auto", children: item.label }) })] }));
|
|
36
|
+
};
|
|
37
|
+
const renderTab = (item, activeTab, isMobile, onTabChange) => {
|
|
38
|
+
const isActive = item.id === activeTab;
|
|
39
|
+
return (jsxs("div", { className: cn('box-border flex flex-col items-center justify-between relative shrink-0', 'cursor-pointer transition-all duration-200', isMobile ? 'h-12 px-3' : 'h-14 px-4', isActive
|
|
40
|
+
? isMobile
|
|
41
|
+
? 'pt-[11px] pb-0'
|
|
42
|
+
: 'pt-3.5 pb-0'
|
|
43
|
+
: 'py-0 justify-center', item.disabled && 'cursor-not-allowed opacity-50', !item.disabled && 'hover:opacity-80'), onClick: () => handleTabClick(item.id, item.disabled, onTabChange), onKeyDown: (e) => handleKeyDown(e, item.id, item.disabled, onTabChange), tabIndex: item.disabled ? -1 : 0, role: "tab", "aria-selected": isActive, "aria-disabled": item.disabled, children: [renderTabContent(item, isActive, isMobile), isActive && (jsx("div", { className: "bg-primary h-1 rounded-tl-[8px] rounded-tr-[8px] shrink-0 w-full" }))] }, item.id));
|
|
44
|
+
};
|
|
45
|
+
const Tabs = React.forwardRef(({ items, activeTab, onTabChange, className, isMobile, ...props }, ref) => {
|
|
46
|
+
const detectedIsMobile = useMobile();
|
|
47
|
+
const actualIsMobile = isMobile ?? detectedIsMobile;
|
|
48
|
+
return (jsxs("div", { ref: ref, className: cn('relative w-full', className), ...props, children: [jsx("div", { className: "box-border flex flex-row items-center justify-end p-0 relative w-full", children: items.map((item) => renderTab(item, activeTab, actualIsMobile, onTabChange)) }), jsx("div", { className: "absolute border-midnight-light border-[0px_0px_1px] border-solid bottom-[-0.5px] left-0 right-0 top-0 pointer-events-none" })] }));
|
|
49
|
+
});
|
|
50
|
+
Tabs.displayName = 'Tabs';
|
|
51
|
+
|
|
52
|
+
export { Tabs };
|
package/dist/esm/Typography.js
CHANGED
|
@@ -1 +1,60 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cn from './utils.js';
|
|
3
|
+
|
|
4
|
+
const variantClasses = {
|
|
5
|
+
// Headings with Fat weight (900)
|
|
6
|
+
h1: 'text-[36px] font-[var(--font-weight-fat)]',
|
|
7
|
+
h2: 'text-[32px] font-[var(--font-weight-fat)]',
|
|
8
|
+
h3: 'text-[28px] font-[var(--font-weight-fat)]',
|
|
9
|
+
h4: 'text-[24px] font-[var(--font-weight-heavy)]',
|
|
10
|
+
h5: 'text-[22px] font-[var(--font-weight-heavy)]',
|
|
11
|
+
h6: 'text-[20px] font-[var(--font-weight-heavy)]',
|
|
12
|
+
// Body Copy with specific weight variants
|
|
13
|
+
'body-xl-heavy': 'text-[20px] font-[var(--font-weight-heavy)]',
|
|
14
|
+
'body-l-heavy': 'text-[18px] font-[var(--font-weight-heavy)]',
|
|
15
|
+
'body-l-bold': 'text-[18px] font-[var(--font-weight-bold)]',
|
|
16
|
+
'body-l-medium': 'text-[18px] font-[var(--font-weight-medium)]',
|
|
17
|
+
'body-m-heavy': 'text-[16px] font-[var(--font-weight-heavy)]',
|
|
18
|
+
'body-m-bold': 'text-[16px] font-[var(--font-weight-bold)]',
|
|
19
|
+
'body-m-medium': 'text-[16px] font-[var(--font-weight-medium)]',
|
|
20
|
+
'body-s-heavy': 'text-[14px] font-[var(--font-weight-heavy)]',
|
|
21
|
+
'body-s-bold': 'text-[14px] font-[var(--font-weight-bold)]',
|
|
22
|
+
'body-s-medium': 'text-[14px] font-[var(--font-weight-medium)]',
|
|
23
|
+
'body-ms-bold': 'text-[13px] font-[var(--font-weight-bold)]',
|
|
24
|
+
'body-ms-medium': 'text-[13px] font-[var(--font-weight-medium)]',
|
|
25
|
+
'body-xs-bold': 'text-[12px] font-[var(--font-weight-bold)]',
|
|
26
|
+
'body-xs-medium': 'text-[12px] font-[var(--font-weight-medium)]',
|
|
27
|
+
'body-t-bold': 'text-[10px] font-[var(--font-weight-bold)]',
|
|
28
|
+
'body-t-medium': 'text-[10px] font-[var(--font-weight-medium)]',
|
|
29
|
+
'body-ss-medium': 'text-[9px] font-[var(--font-weight-medium)]',
|
|
30
|
+
};
|
|
31
|
+
// Export for reuse in other components
|
|
32
|
+
const getTypographyClasses = (variant) => {
|
|
33
|
+
return variantClasses[variant];
|
|
34
|
+
};
|
|
35
|
+
const colorClasses = {
|
|
36
|
+
primary: 'text-[var(--color-primary)]',
|
|
37
|
+
secondary: 'text-[var(--color-secondary)]',
|
|
38
|
+
'neutral-darker': 'text-[var(--color-neutral-darker)]',
|
|
39
|
+
'neutral-dark': 'text-[var(--color-neutral-dark)]',
|
|
40
|
+
'neutral-main': 'text-[var(--color-neutral-main)]',
|
|
41
|
+
white: 'text-[var(--color-white)]',
|
|
42
|
+
inherit: 'text-inherit',
|
|
43
|
+
};
|
|
44
|
+
const getDefaultElement = (variant) => {
|
|
45
|
+
if (variant.startsWith('h'))
|
|
46
|
+
return variant.split('-')[0]; // h1, h2, etc.
|
|
47
|
+
return 'p';
|
|
48
|
+
};
|
|
49
|
+
const Typography = React.forwardRef(({ variant = 'body-m-medium', color = 'inherit', as, className, children, ...props }, ref) => {
|
|
50
|
+
const Element = as || getDefaultElement(variant);
|
|
51
|
+
return React.createElement(Element, {
|
|
52
|
+
ref,
|
|
53
|
+
className: cn(variantClasses[variant], colorClasses[color], 'leading-[var(--leading-default)]', // 180% line height
|
|
54
|
+
className),
|
|
55
|
+
...props,
|
|
56
|
+
}, children);
|
|
57
|
+
});
|
|
58
|
+
Typography.displayName = 'Typography';
|
|
59
|
+
|
|
60
|
+
export { Typography, getTypographyClasses };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface AccordionProps {
|
|
3
|
+
/** The header text content */
|
|
4
|
+
title: string;
|
|
5
|
+
/** The body text content */
|
|
6
|
+
body: string;
|
|
7
|
+
/** Icon to display at the start of the header */
|
|
8
|
+
startIcon?: React.ReactNode;
|
|
9
|
+
/** Whether the accordion is expanded (controlled) */
|
|
10
|
+
isExpanded?: boolean;
|
|
11
|
+
/** Callback when the accordion state changes */
|
|
12
|
+
onToggle?: (isExpanded: boolean) => void;
|
|
13
|
+
/** Default expanded state (uncontrolled) */
|
|
14
|
+
defaultExpanded?: boolean;
|
|
15
|
+
/** Additional CSS classes for the root element */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** Unique identifier for the accordion */
|
|
18
|
+
id?: string;
|
|
19
|
+
/** Whether the accordion is disabled */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Whether the component is in mobile mode (optional, auto-detected if not provided) */
|
|
22
|
+
isMobile?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
export { Accordion };
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { type AccordionProps } from './Accordion';
|
|
2
|
+
type StoryArgs = AccordionProps & {
|
|
3
|
+
startIconType?: 'none' | 'number' | 'user' | 'help' | 'settings' | 'info';
|
|
4
|
+
};
|
|
5
|
+
declare const _default: {
|
|
6
|
+
title: string;
|
|
7
|
+
component: import("react").ForwardRefExoticComponent<AccordionProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
description: {
|
|
11
|
+
component: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
argTypes: {
|
|
16
|
+
title: {
|
|
17
|
+
name: string;
|
|
18
|
+
control: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
body: {
|
|
23
|
+
name: string;
|
|
24
|
+
control: {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
startIconType: {
|
|
29
|
+
name: string;
|
|
30
|
+
control: {
|
|
31
|
+
type: string;
|
|
32
|
+
};
|
|
33
|
+
options: string[];
|
|
34
|
+
};
|
|
35
|
+
defaultExpanded: {
|
|
36
|
+
name: string;
|
|
37
|
+
control: {
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
disabled: {
|
|
42
|
+
name: string;
|
|
43
|
+
control: {
|
|
44
|
+
type: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
isMobile: {
|
|
48
|
+
name: string;
|
|
49
|
+
control: {
|
|
50
|
+
type: string;
|
|
51
|
+
};
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
startIcon: {
|
|
55
|
+
table: {
|
|
56
|
+
disable: boolean;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
isExpanded: {
|
|
60
|
+
table: {
|
|
61
|
+
disable: boolean;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
onToggle: {
|
|
65
|
+
table: {
|
|
66
|
+
disable: boolean;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
export default _default;
|
|
72
|
+
export declare const Default: {
|
|
73
|
+
({ startIconType, ...args }: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
storyName: string;
|
|
75
|
+
args: {
|
|
76
|
+
title: string;
|
|
77
|
+
body: string;
|
|
78
|
+
startIconType: string;
|
|
79
|
+
defaultExpanded: boolean;
|
|
80
|
+
disabled: boolean;
|
|
81
|
+
isMobile: boolean;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
export declare const Mobile: {
|
|
85
|
+
({ startIconType, ...args }: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
86
|
+
storyName: string;
|
|
87
|
+
args: {
|
|
88
|
+
title: string;
|
|
89
|
+
body: string;
|
|
90
|
+
startIconType: string;
|
|
91
|
+
defaultExpanded: boolean;
|
|
92
|
+
disabled: boolean;
|
|
93
|
+
isMobile: boolean;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
export declare const Desktop: {
|
|
97
|
+
({ startIconType, ...args }: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
98
|
+
storyName: string;
|
|
99
|
+
args: {
|
|
100
|
+
defaultExpanded: boolean;
|
|
101
|
+
title: string;
|
|
102
|
+
body: string;
|
|
103
|
+
startIconType: string;
|
|
104
|
+
disabled: boolean;
|
|
105
|
+
isMobile: boolean;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
export declare const ExpandedByDefault: {
|
|
109
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
110
|
+
storyName: string;
|
|
111
|
+
args: {
|
|
112
|
+
defaultExpanded: boolean;
|
|
113
|
+
title: string;
|
|
114
|
+
body: string;
|
|
115
|
+
startIconType: string;
|
|
116
|
+
disabled: boolean;
|
|
117
|
+
isMobile: boolean;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
export declare const Disabled: {
|
|
121
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
122
|
+
storyName: string;
|
|
123
|
+
args: {
|
|
124
|
+
disabled: boolean;
|
|
125
|
+
title: string;
|
|
126
|
+
body: string;
|
|
127
|
+
startIconType: string;
|
|
128
|
+
defaultExpanded: boolean;
|
|
129
|
+
isMobile: boolean;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
export declare const WithDifferentIcons: {
|
|
133
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
134
|
+
storyName: string;
|
|
135
|
+
args: {
|
|
136
|
+
body: string;
|
|
137
|
+
title: string;
|
|
138
|
+
startIconType: string;
|
|
139
|
+
defaultExpanded: boolean;
|
|
140
|
+
disabled: boolean;
|
|
141
|
+
isMobile: boolean;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
export declare const MultipleAccordions: {
|
|
145
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
146
|
+
storyName: string;
|
|
147
|
+
};
|
|
148
|
+
export declare const MobileFAQ: {
|
|
149
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
150
|
+
storyName: string;
|
|
151
|
+
};
|
|
152
|
+
export declare const Controlled: {
|
|
153
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
154
|
+
storyName: string;
|
|
155
|
+
args: {
|
|
156
|
+
title: string;
|
|
157
|
+
body: string;
|
|
158
|
+
startIconType: string;
|
|
159
|
+
defaultExpanded: boolean;
|
|
160
|
+
disabled: boolean;
|
|
161
|
+
isMobile: boolean;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
export declare const LongContent: {
|
|
165
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
166
|
+
storyName: string;
|
|
167
|
+
args: {
|
|
168
|
+
title: string;
|
|
169
|
+
body: string;
|
|
170
|
+
startIconType: string;
|
|
171
|
+
defaultExpanded: boolean;
|
|
172
|
+
disabled: boolean;
|
|
173
|
+
isMobile: boolean;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BackdropProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the backdrop is visible
|
|
5
|
+
*/
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Callback function when backdrop is clicked
|
|
9
|
+
*/
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
/**
|
|
12
|
+
* Whether to show a blur effect
|
|
13
|
+
*/
|
|
14
|
+
blur?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Custom z-index (defaults to z-51 which is drawer z-index + 1)
|
|
17
|
+
*/
|
|
18
|
+
zIndex?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare const Backdrop: React.ForwardRefExoticComponent<BackdropProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Backdrop } from './Backdrop';
|
|
3
|
+
declare const meta: Meta<typeof Backdrop>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Basic: Story;
|
|
7
|
+
export declare const Interactive: Story;
|
|
8
|
+
export declare const WithBlur: Story;
|
|
9
|
+
export declare const WithContent: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BreadcrumbItem {
|
|
3
|
+
label: string;
|
|
4
|
+
href?: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface BreadcrumbProps {
|
|
8
|
+
items: BreadcrumbItem[];
|
|
9
|
+
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Whether the component is in mobile mode (optional, auto-detected if not provided)
|
|
12
|
+
*/
|
|
13
|
+
isMobile?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const Breadcrumb: React.ForwardRefExoticComponent<BreadcrumbProps & React.RefAttributes<HTMLElement>>;
|
|
16
|
+
export { Breadcrumb };
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { BreadcrumbProps } from './Breadcrumb';
|
|
2
|
+
type StoryArgs = BreadcrumbProps;
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<BreadcrumbProps & import("react").RefAttributes<HTMLElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
argTypes: {
|
|
14
|
+
items: {
|
|
15
|
+
name: string;
|
|
16
|
+
control: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
className: {
|
|
22
|
+
name: string;
|
|
23
|
+
control: {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
isMobile: {
|
|
29
|
+
name: string;
|
|
30
|
+
control: {
|
|
31
|
+
type: string;
|
|
32
|
+
};
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
args: {
|
|
37
|
+
items: ({
|
|
38
|
+
label: string;
|
|
39
|
+
href: string;
|
|
40
|
+
onClick: () => void;
|
|
41
|
+
} | {
|
|
42
|
+
label: string;
|
|
43
|
+
href?: undefined;
|
|
44
|
+
onClick?: undefined;
|
|
45
|
+
})[];
|
|
46
|
+
isMobile: boolean;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export default _default;
|
|
50
|
+
export declare const Default: {
|
|
51
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
storyName: string;
|
|
53
|
+
args: {
|
|
54
|
+
items: ({
|
|
55
|
+
label: string;
|
|
56
|
+
href: string;
|
|
57
|
+
onClick: () => void;
|
|
58
|
+
} | {
|
|
59
|
+
label: string;
|
|
60
|
+
href?: undefined;
|
|
61
|
+
onClick?: undefined;
|
|
62
|
+
})[];
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
export declare const ShortBreadcrumb: {
|
|
66
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
storyName: string;
|
|
68
|
+
args: {
|
|
69
|
+
items: ({
|
|
70
|
+
label: string;
|
|
71
|
+
href: string;
|
|
72
|
+
onClick: () => void;
|
|
73
|
+
} | {
|
|
74
|
+
label: string;
|
|
75
|
+
href?: undefined;
|
|
76
|
+
onClick?: undefined;
|
|
77
|
+
})[];
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export declare const LongBreadcrumb: {
|
|
81
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
storyName: string;
|
|
83
|
+
args: {
|
|
84
|
+
items: ({
|
|
85
|
+
label: string;
|
|
86
|
+
href: string;
|
|
87
|
+
onClick: () => void;
|
|
88
|
+
} | {
|
|
89
|
+
label: string;
|
|
90
|
+
href?: undefined;
|
|
91
|
+
onClick?: undefined;
|
|
92
|
+
})[];
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
export declare const WithClickHandlers: {
|
|
96
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
97
|
+
storyName: string;
|
|
98
|
+
args: {
|
|
99
|
+
items: ({
|
|
100
|
+
label: string;
|
|
101
|
+
onClick: () => void;
|
|
102
|
+
} | {
|
|
103
|
+
label: string;
|
|
104
|
+
onClick?: undefined;
|
|
105
|
+
})[];
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
export declare const WithMixedNavigation: {
|
|
109
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
110
|
+
storyName: string;
|
|
111
|
+
args: {
|
|
112
|
+
items: ({
|
|
113
|
+
label: string;
|
|
114
|
+
href: string;
|
|
115
|
+
onClick?: undefined;
|
|
116
|
+
} | {
|
|
117
|
+
label: string;
|
|
118
|
+
onClick: () => void;
|
|
119
|
+
href?: undefined;
|
|
120
|
+
} | {
|
|
121
|
+
label: string;
|
|
122
|
+
href: string;
|
|
123
|
+
onClick: () => void;
|
|
124
|
+
} | {
|
|
125
|
+
label: string;
|
|
126
|
+
href?: undefined;
|
|
127
|
+
onClick?: undefined;
|
|
128
|
+
})[];
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
export declare const EnglishContent: {
|
|
132
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
133
|
+
storyName: string;
|
|
134
|
+
args: {
|
|
135
|
+
items: ({
|
|
136
|
+
label: string;
|
|
137
|
+
href: string;
|
|
138
|
+
onClick: () => void;
|
|
139
|
+
} | {
|
|
140
|
+
label: string;
|
|
141
|
+
href?: undefined;
|
|
142
|
+
onClick?: undefined;
|
|
143
|
+
})[];
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
export declare const DesktopView: {
|
|
147
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
148
|
+
storyName: string;
|
|
149
|
+
args: {
|
|
150
|
+
isMobile: boolean;
|
|
151
|
+
items: ({
|
|
152
|
+
label: string;
|
|
153
|
+
onClick: () => void;
|
|
154
|
+
} | {
|
|
155
|
+
label: string;
|
|
156
|
+
onClick?: undefined;
|
|
157
|
+
})[];
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
export declare const MobileView: {
|
|
161
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
162
|
+
storyName: string;
|
|
163
|
+
args: {
|
|
164
|
+
isMobile: boolean;
|
|
165
|
+
items: ({
|
|
166
|
+
label: string;
|
|
167
|
+
onClick: () => void;
|
|
168
|
+
} | {
|
|
169
|
+
label: string;
|
|
170
|
+
onClick?: undefined;
|
|
171
|
+
})[];
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
export declare const ResponsiveComparison: {
|
|
175
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
176
|
+
storyName: string;
|
|
177
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TypographyVariant } from '../Typography/Typography';
|
|
3
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
|
|
4
|
+
export type ButtonSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
size?: ButtonSize;
|
|
8
|
+
textVariant?: TypographyVariant;
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
iconPosition?: 'left' | 'right';
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: import("react").ForwardRefExoticComponent<import("@/components/Button/Button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
parameters: {
|
|
5
|
+
docs: {
|
|
6
|
+
description: {
|
|
7
|
+
component: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
argTypes: {
|
|
12
|
+
variant: {
|
|
13
|
+
name: string;
|
|
14
|
+
control: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
options: string[];
|
|
18
|
+
defaultValue: string;
|
|
19
|
+
};
|
|
20
|
+
size: {
|
|
21
|
+
name: string;
|
|
22
|
+
control: {
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
options: string[];
|
|
26
|
+
defaultValue: string;
|
|
27
|
+
};
|
|
28
|
+
textVariant: {
|
|
29
|
+
name: string;
|
|
30
|
+
control: {
|
|
31
|
+
type: string;
|
|
32
|
+
};
|
|
33
|
+
options: string[];
|
|
34
|
+
};
|
|
35
|
+
disabled: {
|
|
36
|
+
name: string;
|
|
37
|
+
control: {
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
40
|
+
defaultValue: boolean;
|
|
41
|
+
};
|
|
42
|
+
loading: {
|
|
43
|
+
name: string;
|
|
44
|
+
control: {
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
defaultValue: boolean;
|
|
48
|
+
};
|
|
49
|
+
iconPosition: {
|
|
50
|
+
name: string;
|
|
51
|
+
control: {
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
options: string[];
|
|
55
|
+
defaultValue: string;
|
|
56
|
+
};
|
|
57
|
+
children: {
|
|
58
|
+
name: string;
|
|
59
|
+
control: {
|
|
60
|
+
type: string;
|
|
61
|
+
};
|
|
62
|
+
defaultValue: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export default _default;
|
|
67
|
+
type StoryProps = {
|
|
68
|
+
variant: 'primary' | 'secondary' | 'tertiary' | 'ghost';
|
|
69
|
+
size: 'sm' | 'md' | 'lg' | 'xl';
|
|
70
|
+
disabled: boolean;
|
|
71
|
+
loading: boolean;
|
|
72
|
+
children: string;
|
|
73
|
+
};
|
|
74
|
+
export declare const Playground: {
|
|
75
|
+
(args: StoryProps): import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
storyName: string;
|
|
77
|
+
args: {
|
|
78
|
+
variant: string;
|
|
79
|
+
size: string;
|
|
80
|
+
disabled: boolean;
|
|
81
|
+
loading: boolean;
|
|
82
|
+
children: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export declare const AllVariantsAndSizes: {
|
|
86
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
87
|
+
storyName: string;
|
|
88
|
+
};
|
|
89
|
+
export declare const WithIcon: {
|
|
90
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
91
|
+
storyName: string;
|
|
92
|
+
};
|
|
93
|
+
export declare const DisabledStates: {
|
|
94
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
95
|
+
storyName: string;
|
|
96
|
+
};
|
|
97
|
+
export declare const WithCustomTypography: {
|
|
98
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
99
|
+
storyName: string;
|
|
100
|
+
};
|