@vaneui/ui 0.0.1

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 ADDED
@@ -0,0 +1 @@
1
+ # vaneui
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ type Platform = 'fb' | 'li' | 'x' | 'th' | 'em' | 'wa' | 'tg' | 're';
3
+ interface SocialShareCommonProps {
4
+ url?: string;
5
+ text?: string;
6
+ width?: number;
7
+ height?: number;
8
+ isLink?: boolean;
9
+ isBlank?: boolean;
10
+ platforms?: Platform[];
11
+ containerComponent?: React.ElementType;
12
+ buttonComponent?: React.ElementType;
13
+ buttonComponents?: Partial<Record<Platform, React.ElementType>>;
14
+ }
15
+ interface FacebookShareProps {
16
+ hashtag?: string;
17
+ }
18
+ interface TwitterShareProps {
19
+ hashtags?: string;
20
+ via?: string;
21
+ related?: string;
22
+ inReplyTo?: string;
23
+ }
24
+ interface EmailShareProps {
25
+ title?: string;
26
+ to?: string;
27
+ }
28
+ interface WhatsAppShareProps {
29
+ to?: string;
30
+ web?: boolean;
31
+ }
32
+ interface SocialShareProps extends SocialShareCommonProps {
33
+ facebookProps?: FacebookShareProps;
34
+ twitterProps?: TwitterShareProps;
35
+ emailProps?: EmailShareProps;
36
+ whatsappProps?: WhatsAppShareProps;
37
+ }
38
+ declare const SocialShare: React.FC<SocialShareProps>;
39
+ export default SocialShare;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { TypographyComponentProps } from "./props";
3
+ export declare const Badge: React.FC<TypographyComponentProps>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { TypographyComponentProps } from "./props";
3
+ export declare const Button: React.FC<TypographyComponentProps>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { TypographyComponentProps } from "./props";
3
+ export declare const Chip: React.FC<TypographyComponentProps>;
@@ -0,0 +1,45 @@
1
+ export declare const fontWeightClasses: {
2
+ thin: string;
3
+ extralight: string;
4
+ light: string;
5
+ normal: string;
6
+ medium: string;
7
+ semibold: string;
8
+ bold: string;
9
+ extrabold: string;
10
+ black: string;
11
+ };
12
+ export declare const fontStyleClasses: {
13
+ italic: string;
14
+ notItalic: string;
15
+ };
16
+ export declare const fontFamilyClasses: {
17
+ sans: string;
18
+ serif: string;
19
+ mono: string;
20
+ };
21
+ export declare const textDecorationClasses: {
22
+ underline: string;
23
+ lineThrough: string;
24
+ noUnderline: string;
25
+ overline: string;
26
+ };
27
+ export declare const textTransformClasses: {
28
+ uppercase: string;
29
+ lowercase: string;
30
+ capitalize: string;
31
+ normalCase: string;
32
+ };
33
+ export declare const textAppearanceClasses: {
34
+ default: string;
35
+ primary: string;
36
+ secondary: string;
37
+ tertiary: string;
38
+ muted: string;
39
+ link: string;
40
+ accent: string;
41
+ success: string;
42
+ danger: string;
43
+ warning: string;
44
+ info: string;
45
+ };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { BaseComponentProps } from "./props";
3
+ export declare const Divider: React.FC<BaseComponentProps>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { GridProps, LayoutComponentProps, ColProps, RowProps } from "./props";
3
+ export declare const Section: React.FC<LayoutComponentProps>;
4
+ export declare const Container: React.FC<LayoutComponentProps>;
5
+ export declare const Col: React.FC<ColProps>;
6
+ export declare const Row: React.FC<RowProps>;
7
+ export declare const Grid3: React.FC<GridProps>;
8
+ export declare const Grid4: React.FC<GridProps>;
@@ -0,0 +1,106 @@
1
+ export interface SizeProps {
2
+ xs?: boolean;
3
+ sm?: boolean;
4
+ md?: boolean;
5
+ lg?: boolean;
6
+ xl?: boolean;
7
+ }
8
+ export interface FontFamilyProps {
9
+ sans?: boolean;
10
+ serif?: boolean;
11
+ mono?: boolean;
12
+ }
13
+ export interface FontWeightProps {
14
+ thin?: boolean;
15
+ extralight?: boolean;
16
+ light?: boolean;
17
+ normal?: boolean;
18
+ medium?: boolean;
19
+ semibold?: boolean;
20
+ bold?: boolean;
21
+ extrabold?: boolean;
22
+ black?: boolean;
23
+ }
24
+ export interface FontStyleProps {
25
+ italic?: boolean;
26
+ notItalic?: boolean;
27
+ }
28
+ export interface TextDecorationProps {
29
+ underline?: boolean;
30
+ lineThrough?: boolean;
31
+ noUnderline?: boolean;
32
+ overline?: boolean;
33
+ }
34
+ export interface TextTransformProps {
35
+ uppercase?: boolean;
36
+ lowercase?: boolean;
37
+ capitalize?: boolean;
38
+ normalCase?: boolean;
39
+ }
40
+ export interface TextAppearanceProps {
41
+ muted?: boolean;
42
+ link?: boolean;
43
+ }
44
+ export interface CommonAppearanceProps {
45
+ default?: boolean;
46
+ accent?: boolean;
47
+ primary?: boolean;
48
+ secondary?: boolean;
49
+ tertiary?: boolean;
50
+ success?: boolean;
51
+ danger?: boolean;
52
+ warning?: boolean;
53
+ info?: boolean;
54
+ }
55
+ export interface BreakpointProps {
56
+ xsCol?: boolean;
57
+ smCol?: boolean;
58
+ mdCol?: boolean;
59
+ lgCol?: boolean;
60
+ xlCol?: boolean;
61
+ }
62
+ export interface HideProps {
63
+ xsHide?: boolean;
64
+ smHide?: boolean;
65
+ mdHide?: boolean;
66
+ lgHide?: boolean;
67
+ xlHide?: boolean;
68
+ }
69
+ export interface PositionProps {
70
+ relative?: boolean;
71
+ absolute?: boolean;
72
+ fixed?: boolean;
73
+ sticky?: boolean;
74
+ static?: boolean;
75
+ }
76
+ export interface TagProps {
77
+ tag?: React.ElementType | string;
78
+ }
79
+ export interface ReverseProps {
80
+ reverse?: boolean;
81
+ }
82
+ export interface GapProps {
83
+ noGap?: boolean;
84
+ }
85
+ export interface CenteredProps {
86
+ centered?: boolean;
87
+ vCentered?: boolean;
88
+ hCentered?: boolean;
89
+ }
90
+ export interface JustifyProps {
91
+ justifyStart?: boolean;
92
+ justifyEnd?: boolean;
93
+ justifyCenter?: boolean;
94
+ justifyBetween?: boolean;
95
+ justifyAround?: boolean;
96
+ justifyEvenly?: boolean;
97
+ justifyStretch?: boolean;
98
+ justifyBaseline?: boolean;
99
+ }
100
+ export type BaseComponentProps = TagProps & Partial<SizeProps & HideProps & PositionProps> & React.HTMLProps<HTMLElement>;
101
+ export type LayoutComponentProps = BaseComponentProps & ReverseProps & CenteredProps;
102
+ export type FontProps = FontWeightProps & FontStyleProps & TextDecorationProps & TextTransformProps & FontFamilyProps & TextAppearanceProps & CommonAppearanceProps;
103
+ export type TypographyComponentProps = BaseComponentProps & FontProps;
104
+ export type GridProps = BaseComponentProps & GapProps;
105
+ export type RowProps = BaseComponentProps & GapProps & ReverseProps & CenteredProps & BreakpointProps & JustifyProps;
106
+ export type ColProps = BaseComponentProps & GapProps & ReverseProps & CenteredProps;
@@ -0,0 +1,30 @@
1
+ import { CommonAppearanceProps, FontFamilyProps, FontStyleProps, FontWeightProps, TextAppearanceProps, TextDecorationProps, TextTransformProps } from "./props";
2
+ export type CommonAppearanceSettings = {
3
+ [key in keyof CommonAppearanceProps]: boolean;
4
+ };
5
+ export type FontFamilySettings = {
6
+ [key in keyof FontFamilyProps]: boolean;
7
+ };
8
+ export type FontWeightSettings = {
9
+ [key in keyof FontWeightProps]: boolean;
10
+ };
11
+ export type FontStyleSettings = {
12
+ [key in keyof FontStyleProps]: boolean;
13
+ };
14
+ export type TextAppearanceSettings = {
15
+ [key in keyof TextAppearanceProps & CommonAppearanceProps]: boolean;
16
+ };
17
+ export type TextDecorationSettings = {
18
+ [key in keyof TextDecorationProps]: boolean;
19
+ };
20
+ export type TextTransformSettings = {
21
+ [key in keyof TextTransformProps]: boolean;
22
+ };
23
+ export type TypographySettings = {
24
+ fontFamily?: FontFamilySettings;
25
+ fontWeight?: FontWeightSettings;
26
+ fontStyle?: FontStyleSettings;
27
+ textAppearance?: TextAppearanceSettings;
28
+ textDecoration?: TextDecorationSettings;
29
+ textTransform?: TextTransformSettings;
30
+ };
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { TypographyComponentProps } from "./props";
3
+ export declare const PageTitle: React.FC<TypographyComponentProps>;
4
+ export declare const SectionTitle: React.FC<TypographyComponentProps>;
5
+ export declare const Title: React.FC<TypographyComponentProps>;
6
+ export declare const Text: React.FC<TypographyComponentProps>;
7
+ export declare const Link: React.FC<TypographyComponentProps>;
8
+ export declare const ListItem: React.FC<TypographyComponentProps>;
9
+ export declare const List: React.FC<TypographyComponentProps>;
@@ -0,0 +1,23 @@
1
+ import { BaseComponentProps, BreakpointProps, CenteredProps, CommonAppearanceProps, FontFamilyProps, FontStyleProps, FontWeightProps, GapProps, HideProps, PositionProps, ReverseProps, TextAppearanceProps, TextDecorationProps, TextTransformProps, SizeProps } from "./props";
2
+ import { CommonAppearanceSettings, FontFamilySettings, FontStyleSettings, FontWeightSettings, TextAppearanceSettings, TextDecorationSettings, TextTransformSettings, TypographySettings } from "./settings";
3
+ export declare function componentBuilder(baseProps: BaseComponentProps, defaultTag: string, baseClasses?: string): {
4
+ withBooleanProps: <T extends Record<string, string>>(propMap: Record<keyof T, string>, fallbackKey?: keyof T, settings?: {
5
+ [key: string]: boolean;
6
+ }) => /*elided*/ any;
7
+ withSizes: (sizeMap: Record<keyof SizeProps, string>) => /*elided*/ any;
8
+ withBreakpoints: (breakpointMap: Record<keyof BreakpointProps, string>) => /*elided*/ any;
9
+ withReverse: (reverseMap: Record<keyof ReverseProps, string>) => /*elided*/ any;
10
+ withCentered: (centeredMap: Record<keyof CenteredProps, string>) => /*elided*/ any;
11
+ withHide: (hideMap: Record<keyof HideProps, string>) => /*elided*/ any;
12
+ withPosition: (positionMap: Record<keyof PositionProps, string>) => /*elided*/ any;
13
+ withFontWeight: (fontWeight: Record<keyof FontWeightProps, string>, settings: FontWeightSettings) => /*elided*/ any;
14
+ withFontStyle: (fontStyle: Record<keyof FontStyleProps, string>, settings: FontStyleSettings) => /*elided*/ any;
15
+ withFontFamily: (fontFamily: Record<keyof FontFamilyProps, string>, settings: FontFamilySettings) => /*elided*/ any;
16
+ withTextDecoration: (textDecoration: Record<keyof TextDecorationProps, string>, settings: TextDecorationSettings) => /*elided*/ any;
17
+ withTextTransform: (textTransform: Record<keyof TextTransformProps, string>, settings: TextTransformSettings) => /*elided*/ any;
18
+ withTextAppearance: (appearance: Record<keyof TextAppearanceProps & CommonAppearanceProps, string>, settings: TextAppearanceSettings) => /*elided*/ any;
19
+ withGaps: (gapMap: Record<keyof GapProps, string>, sizeMap: Record<keyof SizeProps, string>) => /*elided*/ any;
20
+ withTypography: (settings: TypographySettings) => /*elided*/ any;
21
+ withAppearance: (appearance: Record<keyof CommonAppearanceProps, string>, settings: CommonAppearanceSettings) => /*elided*/ any;
22
+ build(): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
23
+ };
@@ -0,0 +1,6 @@
1
+ export { Button } from "./components/ui/button";
2
+ export { Badge } from "./components/ui/badge";
3
+ export { Divider } from "./components/ui/divider";
4
+ export { Chip } from "./components/ui/chip";
5
+ export { Section, Container, Col, Row, Grid3, Grid4 } from "./components/ui/layout";
6
+ export { Text, Title, Link, List, ListItem, SectionTitle, PageTitle } from "./components/ui/typography";