gd-design-library 0.0.3 → 0.0.5
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/assets/icons/chevron-left.d.ts +7 -0
- package/assets/icons/minus.d.ts +7 -0
- package/assets/icons/plus.d.ts +7 -0
- package/assets/index.d.ts +12 -0
- package/components/core/Button/Button.types.d.ts +0 -5
- package/components/core/Icon/constants.d.ts +83 -1
- package/components/core/Select/Select.types.d.ts +4 -3
- package/components/core/Select/constants.d.ts +1 -0
- package/components/core/Typography/Typography.types.d.ts +1 -1
- package/components/core/index.d.ts +15 -15
- package/components/domainSpecific/Card/Card.d.ts +4 -0
- package/components/domainSpecific/Card/Card.types.d.ts +18 -0
- package/components/domainSpecific/Card/StyledCard.d.ts +2 -0
- package/components/domainSpecific/Card/constants.d.ts +1 -0
- package/components/domainSpecific/Card/index.d.ts +2 -0
- package/components/domainSpecific/Carousel/Carousel.d.ts +15 -0
- package/components/domainSpecific/Carousel/Carousel.types.d.ts +35 -0
- package/components/domainSpecific/Carousel/StyledCarousel.d.ts +27 -0
- package/components/domainSpecific/Carousel/constants.d.ts +1 -0
- package/components/domainSpecific/Carousel/index.d.ts +2 -0
- package/components/domainSpecific/Carousel/utils.d.ts +2 -0
- package/components/domainSpecific/Counter/Counter.d.ts +3 -0
- package/components/domainSpecific/Counter/Counter.types.d.ts +9 -0
- package/components/domainSpecific/Counter/StyledCounter.d.ts +13 -0
- package/components/domainSpecific/Counter/constants.d.ts +5 -0
- package/components/domainSpecific/Counter/index.d.ts +2 -0
- package/components/domainSpecific/index.d.ts +5 -2
- package/components/index.types.d.ts +18 -0
- package/components/layout/utils.d.ts +2 -2
- package/hooks/index.d.ts +2 -0
- package/hooks/useCarousel/index.d.ts +1 -0
- package/hooks/useCarousel/useCarousel.d.ts +20 -0
- package/hooks/useKeyControls/index.d.ts +1 -0
- package/hooks/useKeyControls/useKeyControls.d.ts +2 -0
- package/index.mjs +6401 -8087
- package/package.json +1 -1
- package/tokens/button.d.ts +2 -3
- package/tokens/card.d.ts +46 -0
- package/tokens/carousel.d.ts +110 -0
- package/tokens/counter.d.ts +31 -0
- package/tokens/defaultTheme.d.ts +224 -38
- package/tokens/header.d.ts +2 -2
- package/tokens/index.d.ts +221 -35
- package/tokens/link.d.ts +9 -9
- package/tokens/list.d.ts +6 -6
- package/tokens/modal.d.ts +4 -4
- package/tokens/select.d.ts +3 -3
- package/tokens/shadow.d.ts +3 -0
- package/tokens/snackbar.d.ts +11 -11
- package/tokens/spacing.d.ts +1 -1
- package/tokens/values.d.ts +3 -0
- package/types/carousel.d.ts +1 -0
- package/types/index.d.ts +2 -1
- package/types/keys.d.ts +8 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const ChevronLeftIcon: ({ width, height, fillSvg, fill, ...rest }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
width?: number | undefined;
|
|
4
|
+
height?: number | undefined;
|
|
5
|
+
fillSvg?: string | undefined;
|
|
6
|
+
fill?: string | undefined;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const MinusIcon: ({ width, height, fillSvg, fill, ...rest }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
width?: number | undefined;
|
|
4
|
+
height?: number | undefined;
|
|
5
|
+
fillSvg?: string | undefined;
|
|
6
|
+
fill?: string | undefined;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
package/assets/index.d.ts
CHANGED
|
@@ -8,4 +8,16 @@ export { DotIcon } from './icons/dot';
|
|
|
8
8
|
export { CheckIcon } from './icons/check';
|
|
9
9
|
export { ArrowDownIcon } from './icons/arrow-down';
|
|
10
10
|
export { ChevronRightIcon } from './icons/chevron-right';
|
|
11
|
+
export { ChevronLeftIcon } from './icons/chevron-left';
|
|
11
12
|
export { MobileMenuIcon } from './icons/mobile_menu_button';
|
|
13
|
+
export { HomeIcon } from './icons/home';
|
|
14
|
+
export { SlashIcon } from './icons/slash';
|
|
15
|
+
export { ArrowForwardIcon } from './icons/arrow-forward';
|
|
16
|
+
export { LocalShippingIcon } from './icons/local_shipping';
|
|
17
|
+
export { FavoriteIcon } from './icons/favorite';
|
|
18
|
+
export { AccountCircleIcon } from './icons/account_circle';
|
|
19
|
+
export { ShoppingBagIcon } from './icons/shopping_bag';
|
|
20
|
+
export { ErrorOutlineIcon } from './icons/error_outline';
|
|
21
|
+
export { StarOutlinedIcon } from './icons/starOutlined';
|
|
22
|
+
export { MinusIcon } from './icons/minus';
|
|
23
|
+
export { PlusIcon } from './icons/plus';
|
|
@@ -11,10 +11,6 @@ export declare enum ButtonColorVariant {
|
|
|
11
11
|
Primary = "primary",
|
|
12
12
|
Secondary = "secondary"
|
|
13
13
|
}
|
|
14
|
-
export declare enum IconPosition {
|
|
15
|
-
Left = "left",
|
|
16
|
-
Right = "right"
|
|
17
|
-
}
|
|
18
14
|
export declare enum ButtonTypes {
|
|
19
15
|
Button = "button",
|
|
20
16
|
Submit = "submit",
|
|
@@ -36,7 +32,6 @@ export declare enum ButtonRole {
|
|
|
36
32
|
export interface ButtonProps extends CommonCoreComponentProps<ButtonVariant, ButtonColorVariant> {
|
|
37
33
|
iconStart?: ReactNode;
|
|
38
34
|
iconEnd?: ReactNode;
|
|
39
|
-
iconPosition?: IconPosition;
|
|
40
35
|
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
41
36
|
type?: ButtonTypes | `${ButtonTypes}`;
|
|
42
37
|
disabled?: boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare const COMPONENT_NAME = "CustomIcon";
|
|
2
1
|
export declare const IconsList: {
|
|
3
2
|
cross: ({ width, height, fillSvg, fill, ...rest }: {
|
|
4
3
|
[x: string]: any;
|
|
@@ -65,6 +64,13 @@ export declare const IconsList: {
|
|
|
65
64
|
fillSvg?: string | undefined;
|
|
66
65
|
fill?: string | undefined;
|
|
67
66
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
arrowLeft: ({ width, height, fillSvg, fill, ...rest }: {
|
|
68
|
+
[x: string]: any;
|
|
69
|
+
width?: number | undefined;
|
|
70
|
+
height?: number | undefined;
|
|
71
|
+
fillSvg?: string | undefined;
|
|
72
|
+
fill?: string | undefined;
|
|
73
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
68
74
|
mobileMenu: ({ width, height, fillSvg, fill, ...rest }: {
|
|
69
75
|
[x: string]: any;
|
|
70
76
|
width?: number | undefined;
|
|
@@ -72,4 +78,80 @@ export declare const IconsList: {
|
|
|
72
78
|
fillSvg?: string | undefined;
|
|
73
79
|
fill?: string | undefined;
|
|
74
80
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
home: ({ width, height, fillSvg, fill, ...rest }: {
|
|
82
|
+
[x: string]: any;
|
|
83
|
+
width?: number | undefined;
|
|
84
|
+
height?: number | undefined;
|
|
85
|
+
fillSvg?: string | undefined;
|
|
86
|
+
fill?: string | undefined;
|
|
87
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
88
|
+
slash: ({ width, height, fillSvg, fill, ...rest }: {
|
|
89
|
+
[x: string]: any;
|
|
90
|
+
width?: number | undefined;
|
|
91
|
+
height?: number | undefined;
|
|
92
|
+
fillSvg?: string | undefined;
|
|
93
|
+
fill?: string | undefined;
|
|
94
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
95
|
+
arrowForward: ({ width, height, fillSvg, fill, ...rest }: {
|
|
96
|
+
[x: string]: any;
|
|
97
|
+
width?: number | undefined;
|
|
98
|
+
height?: number | undefined;
|
|
99
|
+
fillSvg?: string | undefined;
|
|
100
|
+
fill?: string | undefined;
|
|
101
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
102
|
+
localShipping: ({ width, height, fillSvg, fill, ...rest }: {
|
|
103
|
+
[x: string]: any;
|
|
104
|
+
width?: number | undefined;
|
|
105
|
+
height?: number | undefined;
|
|
106
|
+
fillSvg?: string | undefined;
|
|
107
|
+
fill?: string | undefined;
|
|
108
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
109
|
+
favorite: ({ width, height, fillSvg, fill, ...rest }: {
|
|
110
|
+
[x: string]: any;
|
|
111
|
+
width?: number | undefined;
|
|
112
|
+
height?: number | undefined;
|
|
113
|
+
fillSvg?: string | undefined;
|
|
114
|
+
fill?: string | undefined;
|
|
115
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
116
|
+
accountCircle: ({ width, height, fillSvg, fill, ...rest }: {
|
|
117
|
+
[x: string]: any;
|
|
118
|
+
width?: number | undefined;
|
|
119
|
+
height?: number | undefined;
|
|
120
|
+
fillSvg?: string | undefined;
|
|
121
|
+
fill?: string | undefined;
|
|
122
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
123
|
+
shoppingBag: ({ width, height, fillSvg, fill, ...rest }: {
|
|
124
|
+
[x: string]: any;
|
|
125
|
+
width?: number | undefined;
|
|
126
|
+
height?: number | undefined;
|
|
127
|
+
fillSvg?: string | undefined;
|
|
128
|
+
fill?: string | undefined;
|
|
129
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
130
|
+
errorOutline: ({ width, height, color, ...rest }: {
|
|
131
|
+
[x: string]: any;
|
|
132
|
+
width?: number | undefined;
|
|
133
|
+
height?: number | undefined;
|
|
134
|
+
color?: string | undefined;
|
|
135
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
136
|
+
starOutlined: ({ width, height, fillSvg, fill, }: {
|
|
137
|
+
width?: number | undefined;
|
|
138
|
+
height?: number | undefined;
|
|
139
|
+
fillSvg?: string | undefined;
|
|
140
|
+
fill?: string | undefined;
|
|
141
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
142
|
+
minus: ({ width, height, fillSvg, fill, ...rest }: {
|
|
143
|
+
[x: string]: any;
|
|
144
|
+
width?: number | undefined;
|
|
145
|
+
height?: number | undefined;
|
|
146
|
+
fillSvg?: string | undefined;
|
|
147
|
+
fill?: string | undefined;
|
|
148
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
149
|
+
plus: ({ width, height, fillSvg, fill, ...rest }: {
|
|
150
|
+
[x: string]: any;
|
|
151
|
+
width?: number | undefined;
|
|
152
|
+
height?: number | undefined;
|
|
153
|
+
fillSvg?: string | undefined;
|
|
154
|
+
fill?: string | undefined;
|
|
155
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
75
156
|
};
|
|
157
|
+
export declare const COMPONENT_NAME = "Icon";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, MouseEvent } from 'react';
|
|
2
|
-
import { Theme } from '../../../hooks';
|
|
2
|
+
import { Theme } from '../../../hooks/useTheme';
|
|
3
3
|
import { CommonCoreComponentProps, CommonCoreStyledComponentProps } from '..';
|
|
4
4
|
import { OnSelectProps } from '../types/events.types';
|
|
5
5
|
export interface Option {
|
|
@@ -26,8 +26,9 @@ export interface SelectProps<T extends HTMLElement = HTMLDivElement> extends Exc
|
|
|
26
26
|
initiator?: ReactNode;
|
|
27
27
|
width?: number | string;
|
|
28
28
|
emptyItemsResult?: string;
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
selectedItem?: string;
|
|
30
|
+
renderOption?: (value: renderOptionType) => ReactNode;
|
|
31
|
+
renderDropdownHeader?: (theme: Theme, dropdownParams?: DropdownParams) => ReactNode;
|
|
31
32
|
autoOpen?: boolean;
|
|
32
33
|
activeIndex?: string | number;
|
|
33
34
|
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
+
export * from './Breadcrumbs';
|
|
1
2
|
export * from './Button';
|
|
2
|
-
export * from './
|
|
3
|
+
export * from './Dropdown';
|
|
4
|
+
export * from './DropdownItem';
|
|
5
|
+
export * from './Form';
|
|
6
|
+
export * from './Icon';
|
|
7
|
+
export * from './Image';
|
|
3
8
|
export * from './Input';
|
|
4
|
-
export { Textarea } from './Textarea';
|
|
5
9
|
export * from './Label';
|
|
6
|
-
export * from './Loader';
|
|
7
|
-
export * from './Form';
|
|
8
|
-
export * from './Wrapper';
|
|
9
10
|
export * from './Link';
|
|
11
|
+
export * from './List';
|
|
12
|
+
export * from './Loader';
|
|
13
|
+
export * from './Modal';
|
|
10
14
|
export * from './Portal';
|
|
15
|
+
export * from './Select';
|
|
16
|
+
export * from './Skeleton';
|
|
17
|
+
export * from './Snackbar';
|
|
11
18
|
export * from './Switch';
|
|
12
19
|
export * from './Tooltip';
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './Icon';
|
|
16
|
-
export * from './Skeleton';
|
|
17
|
-
export * from './List';
|
|
18
|
-
export * from './Dropdown';
|
|
19
|
-
export * from './DropdownItem';
|
|
20
|
-
export * from './Select';
|
|
21
|
-
export * from './Breadcrumbs';
|
|
22
|
-
export * from './Image';
|
|
20
|
+
export * from './Typography';
|
|
21
|
+
export * from './Wrapper';
|
|
23
22
|
export * from './types/index.types';
|
|
23
|
+
export { Textarea } from './Textarea';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BoxComponentProps, BoxStyledComponentProps } from '../..';
|
|
2
|
+
import { TabIndex } from '../../../types';
|
|
3
|
+
export declare enum CardVariants {
|
|
4
|
+
Vertical = "Vertical",
|
|
5
|
+
Horizontal = "horizontal"
|
|
6
|
+
}
|
|
7
|
+
export interface CardProps extends Exclude<BoxComponentProps, 'minWidth' | 'minHeight'> {
|
|
8
|
+
variant?: CardVariants;
|
|
9
|
+
isBordered?: boolean;
|
|
10
|
+
tabIndex?: TabIndex;
|
|
11
|
+
isHighlighted?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface CardStyledProps extends Exclude<BoxStyledComponentProps, '$minWidth' | '$minHeight'> {
|
|
14
|
+
$variant: CardVariants;
|
|
15
|
+
$isBordered?: boolean;
|
|
16
|
+
$isHighlighted?: boolean;
|
|
17
|
+
tabIndex?: TabIndex;
|
|
18
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { CardStyledProps } from './Card.types';
|
|
2
|
+
export declare const StyledCard: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, CardStyledProps>> & string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const COMPONENT_NAME = "Card";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { TypographyProps } from '../../core/Typography/Typography.types';
|
|
3
|
+
import { CarouselProps, CarouselRef } from './Carousel.types';
|
|
4
|
+
type ExtractedCarousel = {
|
|
5
|
+
images: ReactElement[];
|
|
6
|
+
content: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export declare function extractCarouselNodes(children: ReactNode): ExtractedCarousel;
|
|
9
|
+
export declare const Carousel: import('react').ForwardRefExoticComponent<CarouselProps & import('react').RefAttributes<CarouselRef>> & {
|
|
10
|
+
Slide: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
11
|
+
Image: ({ id, src, alt, width, height, className, placeholder, caption, onClick, objectFit, styles, }: import('../../core/Image').ImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
Title: (props: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
Description: (props: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { EmblaOptionsType } from 'embla-carousel';
|
|
3
|
+
import { CommonComponentProps, CommonStyledComponentProps } from '../..';
|
|
4
|
+
export declare enum CarouselVariantTypes {
|
|
5
|
+
Cards = "cards",
|
|
6
|
+
Single = "single"
|
|
7
|
+
}
|
|
8
|
+
export declare enum LayoutType {
|
|
9
|
+
Horizontal = "horizontal",
|
|
10
|
+
Vertical = "vertical"
|
|
11
|
+
}
|
|
12
|
+
export type KeyboardHandler = () => void;
|
|
13
|
+
export type KeyboardConfig = Record<string, KeyboardHandler>;
|
|
14
|
+
export interface CarouselProps extends CommonComponentProps {
|
|
15
|
+
options?: EmblaOptionsType;
|
|
16
|
+
layout?: LayoutType;
|
|
17
|
+
showArrows?: boolean;
|
|
18
|
+
showDots?: boolean;
|
|
19
|
+
showThumbs?: boolean;
|
|
20
|
+
variant?: CarouselVariantTypes;
|
|
21
|
+
className?: string;
|
|
22
|
+
keyboardConfig?: KeyboardConfig;
|
|
23
|
+
isFocusable?: boolean;
|
|
24
|
+
children: ReactNode[];
|
|
25
|
+
}
|
|
26
|
+
export interface CarouselRef {
|
|
27
|
+
scrollPrev: () => void;
|
|
28
|
+
scrollNext: () => void;
|
|
29
|
+
scrollTo: (index: number) => void;
|
|
30
|
+
selectedIndex: number;
|
|
31
|
+
}
|
|
32
|
+
export interface CarouselStyledProps extends CommonStyledComponentProps {
|
|
33
|
+
layout: LayoutType;
|
|
34
|
+
variant: CarouselVariantTypes;
|
|
35
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CarouselStyledProps } from './Carousel.types';
|
|
2
|
+
export declare const CarouselContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, CarouselStyledProps>> & string;
|
|
3
|
+
export declare const CarouselViewport: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
+
export declare const CarouselViewportSlideWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
|
+
export declare const CarouselSlide: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
|
+
export declare const CarouselControlsWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
7
|
+
export declare const CarouselControls: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
8
|
+
export declare const CarouselControlsButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<Omit<import('../../core/Button').ButtonProps & {
|
|
9
|
+
children?: import('react').ReactNode | undefined;
|
|
10
|
+
} & import('react').RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
11
|
+
ref?: ((instance: HTMLButtonElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLButtonElement> | null | undefined;
|
|
12
|
+
}, Omit<import('../../core/Button').ButtonProps & {
|
|
13
|
+
children?: import('react').ReactNode | undefined;
|
|
14
|
+
} & import('react').RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
15
|
+
ref?: ((instance: HTMLButtonElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLButtonElement> | null | undefined;
|
|
16
|
+
}>, never>, never>> & string & Omit<import('react').ForwardRefExoticComponent<import('../../core/Button').ButtonProps & {
|
|
17
|
+
children?: import('react').ReactNode | undefined;
|
|
18
|
+
} & import('react').RefAttributes<HTMLButtonElement>>, keyof import('react').Component<any, {}, any>>;
|
|
19
|
+
export declare const CarouselArrowButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
20
|
+
export declare const CarouselDots: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
21
|
+
export declare const CarouselDot: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
22
|
+
active: boolean;
|
|
23
|
+
}>> & string;
|
|
24
|
+
export declare const CarouselThumbs: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
25
|
+
export declare const CarouselThumb: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
26
|
+
active: boolean;
|
|
27
|
+
}>> & string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const COMPONENT_NAME = "Carousel";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CommonComponentProps, CommonStyledComponentProps } from '../..';
|
|
2
|
+
export interface CounterProps extends CommonComponentProps {
|
|
3
|
+
min?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
initial?: number;
|
|
6
|
+
inputDebounceMs?: number;
|
|
7
|
+
onCounterChange?: (qty: number) => void;
|
|
8
|
+
}
|
|
9
|
+
export type CounterStyledProps = CommonStyledComponentProps;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export declare const StyledCounter: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, PropsWithChildren<import('../..').CommonStyledComponentProps>>> & string;
|
|
3
|
+
export declare const StylesNavButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<Omit<import('../..').ButtonProps & {
|
|
4
|
+
children?: import('react').ReactNode | undefined;
|
|
5
|
+
} & import('react').RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
6
|
+
ref?: ((instance: HTMLButtonElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLButtonElement> | null | undefined;
|
|
7
|
+
}, Omit<import('../..').ButtonProps & {
|
|
8
|
+
children?: import('react').ReactNode | undefined;
|
|
9
|
+
} & import('react').RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
10
|
+
ref?: ((instance: HTMLButtonElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLButtonElement> | null | undefined;
|
|
11
|
+
}>, never>, never>> & string & Omit<import('react').ForwardRefExoticComponent<import('../..').ButtonProps & {
|
|
12
|
+
children?: import('react').ReactNode | undefined;
|
|
13
|
+
} & import('react').RefAttributes<HTMLButtonElement>>, keyof import('react').Component<any, {}, any>>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
export * from './Carousel';
|
|
2
|
+
export * from './Card';
|
|
3
|
+
export * from './Counter';
|
|
1
4
|
export * from './Header';
|
|
2
|
-
export * from './Tabs';
|
|
3
|
-
export * from './Stepper';
|
|
4
5
|
export * from './Price';
|
|
5
6
|
export * from './Rating';
|
|
6
7
|
export * from './Search';
|
|
8
|
+
export * from './Stepper';
|
|
9
|
+
export * from './Tabs';
|
|
7
10
|
export * from './Templates';
|
|
@@ -9,6 +9,24 @@ export interface CommonStyledComponentProps {
|
|
|
9
9
|
$styles?: CSSObject;
|
|
10
10
|
theme: typeof defaultTheme;
|
|
11
11
|
}
|
|
12
|
+
export interface BoxComponentProps extends CommonComponentProps {
|
|
13
|
+
overflow?: string;
|
|
14
|
+
minWidth?: string;
|
|
15
|
+
width?: string;
|
|
16
|
+
maxWidth?: string;
|
|
17
|
+
minHeight?: string;
|
|
18
|
+
height?: string;
|
|
19
|
+
maxHeight?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface BoxStyledComponentProps extends CommonStyledComponentProps {
|
|
22
|
+
$overflow?: string;
|
|
23
|
+
$minWidth?: string;
|
|
24
|
+
$width?: string;
|
|
25
|
+
$maxWidth?: string;
|
|
26
|
+
$minHeight?: string;
|
|
27
|
+
$height?: string;
|
|
28
|
+
$maxHeight?: string;
|
|
29
|
+
}
|
|
12
30
|
export type AlignType = 'start' | 'center' | 'end' | 'stretch';
|
|
13
31
|
export type JustifyType = 'start' | 'center' | 'end' | 'between' | 'around';
|
|
14
32
|
export declare enum SizeVariant {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AlignType, JustifyType } from '../index.types';
|
|
2
|
-
export declare const calculateAlign: (align: AlignType) => "
|
|
3
|
-
export declare const calculateJustify: (justify: JustifyType) => "
|
|
2
|
+
export declare const calculateAlign: (align: AlignType) => "center" | "flex-end" | "flex-start" | "stretch";
|
|
3
|
+
export declare const calculateJustify: (justify: JustifyType) => "center" | "flex-end" | "space-between" | "space-around" | "flex-start";
|
|
4
4
|
export declare const calculateGutter: (gutter?: number | string) => string;
|
package/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useCarousel';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EmblaOptionsType } from 'embla-carousel';
|
|
2
|
+
type KeyboardHandler = (() => void) | undefined;
|
|
3
|
+
type KeyboardConfig = Record<string, KeyboardHandler>;
|
|
4
|
+
interface UseCarouselParams {
|
|
5
|
+
options?: EmblaOptionsType;
|
|
6
|
+
keyboardConfig?: KeyboardConfig;
|
|
7
|
+
targetRef?: React.RefObject<HTMLElement>;
|
|
8
|
+
}
|
|
9
|
+
export declare const useCarousel: ({ options, keyboardConfig, targetRef }: UseCarouselParams) => {
|
|
10
|
+
carouselRef: import('embla-carousel-react').EmblaViewportRefType;
|
|
11
|
+
carouselApi: import('embla-carousel').EmblaCarouselType | undefined;
|
|
12
|
+
activeIndex: number;
|
|
13
|
+
scrollTo: (index: number) => void;
|
|
14
|
+
scrollPrev: () => void;
|
|
15
|
+
scrollNext: () => void;
|
|
16
|
+
canScrollPrev: boolean;
|
|
17
|
+
canScrollNext: boolean;
|
|
18
|
+
slidesCount: number;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useKeyControls';
|