@vaneui/ui 0.1.2 → 0.1.3
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 +13 -1
- package/dist/components/complex/index.d.ts +1 -0
- package/dist/components/complex/index.js +132 -0
- package/dist/components/complex/index.js.map +1 -0
- package/dist/components/complex/sharer.d.ts +39 -0
- package/dist/components/themeContext.d.ts +50 -0
- package/dist/components/themedComponent.d.ts +7 -0
- package/dist/components/ui/badge.d.ts +3 -0
- package/dist/components/ui/button.d.ts +3 -0
- package/dist/components/ui/card.d.ts +3 -0
- package/dist/components/ui/chip.d.ts +3 -0
- package/dist/components/ui/classes/appearanceClasses.d.ts +13 -0
- package/dist/components/ui/classes/spacingClasses.d.ts +2 -0
- package/dist/components/ui/classes/typographyClasses.d.ts +4 -0
- package/dist/components/ui/col.d.ts +3 -0
- package/dist/components/ui/container.d.ts +3 -0
- package/dist/components/ui/divider.d.ts +3 -0
- package/dist/components/ui/grid.d.ts +4 -0
- package/dist/components/ui/layout.d.ts +7 -0
- package/dist/components/ui/props/index.d.ts +1 -0
- package/dist/components/ui/props/keys.d.ts +81 -0
- package/dist/components/ui/props/props.d.ts +43 -0
- package/dist/components/ui/row.d.ts +3 -0
- package/dist/components/ui/section.d.ts +3 -0
- package/dist/components/ui/stack.d.ts +3 -0
- package/dist/components/ui/theme/appearance/layoutAppearanceTheme.d.ts +10 -0
- package/dist/components/ui/theme/appearance/textAppearanceTheme.d.ts +10 -0
- package/dist/components/ui/theme/appearance/variantTheme.d.ts +15 -0
- package/dist/components/ui/theme/badgeTheme.d.ts +32 -0
- package/dist/components/ui/theme/buttonTheme.d.ts +32 -0
- package/dist/components/ui/theme/cardTheme.d.ts +37 -0
- package/dist/components/ui/theme/chipTheme.d.ts +32 -0
- package/dist/components/ui/theme/colTheme.d.ts +15 -0
- package/dist/components/ui/theme/common/ComponentTheme.d.ts +52 -0
- package/dist/components/ui/theme/common/baseTheme.d.ts +12 -0
- package/dist/components/ui/theme/containerTheme.d.ts +31 -0
- package/dist/components/ui/theme/dividerTheme.d.ts +9 -0
- package/dist/components/ui/theme/gridTheme.d.ts +10 -0
- package/dist/components/ui/theme/layout/borderTheme.d.ts +9 -0
- package/dist/components/ui/theme/layout/directionTheme.d.ts +9 -0
- package/dist/components/ui/theme/layout/displayTheme.d.ts +9 -0
- package/dist/components/ui/theme/layout/hideTheme.d.ts +9 -0
- package/dist/components/ui/theme/layout/itemsTheme.d.ts +9 -0
- package/dist/components/ui/theme/layout/justifyTheme.d.ts +9 -0
- package/dist/components/ui/theme/layout/positionTheme.d.ts +9 -0
- package/dist/components/ui/theme/layout/radiusTheme.d.ts +9 -0
- package/dist/components/ui/theme/layout/ringTheme.d.ts +9 -0
- package/dist/components/ui/theme/layout/shadowTheme.d.ts +9 -0
- package/dist/components/ui/theme/layout/wrapTheme.d.ts +9 -0
- package/dist/components/ui/theme/rowTheme.d.ts +15 -0
- package/dist/components/ui/theme/sectionTheme.d.ts +34 -0
- package/dist/components/ui/theme/size/breakpointTheme.d.ts +9 -0
- package/dist/components/ui/theme/size/gapTheme.d.ts +9 -0
- package/dist/components/ui/theme/size/pxTheme.d.ts +9 -0
- package/dist/components/ui/theme/size/pyTheme.d.ts +9 -0
- package/dist/components/ui/theme/size/sizeTheme.d.ts +9 -0
- package/dist/components/ui/theme/stackTheme.d.ts +19 -0
- package/dist/components/ui/theme/typography/fontFamilyTheme.d.ts +9 -0
- package/dist/components/ui/theme/typography/fontStyleTheme.d.ts +9 -0
- package/dist/components/ui/theme/typography/fontWeightTheme.d.ts +9 -0
- package/dist/components/ui/theme/typography/textAlignTheme.d.ts +9 -0
- package/dist/components/ui/theme/typography/textDecorationTheme.d.ts +9 -0
- package/dist/components/ui/theme/typography/textTransformTheme.d.ts +9 -0
- package/dist/components/ui/theme/typographyComponentTheme.d.ts +22 -0
- package/dist/components/ui/typography.d.ts +9 -0
- package/dist/components/utils/componentUtils.d.ts +4 -0
- package/dist/components/utils/deepMerge.d.ts +4 -0
- package/dist/components/utils/deepPartial.d.ts +3 -0
- package/dist/components/utils/tests/deepMerge.test.d.ts +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.esm.js +4717 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +4785 -0
- package/dist/index.js.map +1 -0
- package/dist/ui.css +2049 -0
- package/dist/vars.css +132 -0
- package/package.json +19 -5
package/README.md
CHANGED
|
@@ -116,6 +116,18 @@ npm run build
|
|
|
116
116
|
|
|
117
117
|
# Watch mode for development
|
|
118
118
|
npm run watch
|
|
119
|
+
|
|
120
|
+
# Verify package contents
|
|
121
|
+
npm run verify-package
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Publishing the Package
|
|
125
|
+
|
|
126
|
+
Before publishing, the package automatically runs the build process and verifies that all required files are present. This ensures that the published package contains all necessary files for users.
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Publish the package
|
|
130
|
+
npm publish
|
|
119
131
|
```
|
|
120
132
|
|
|
121
133
|
### Component Development Guidelines
|
|
@@ -144,4 +156,4 @@ When contributing to this project:
|
|
|
144
156
|
|
|
145
157
|
## License
|
|
146
158
|
|
|
147
|
-
This project is licensed under the ISC License.
|
|
159
|
+
This project is licensed under the ISC License.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SocialShare } from "./sharer";
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
const buildQueryString = (params) => {
|
|
4
|
+
const validKeys = Object.keys(params).filter(key => params[key] !== undefined && params[key] !== '');
|
|
5
|
+
return validKeys.length > 0
|
|
6
|
+
? '?' +
|
|
7
|
+
validKeys
|
|
8
|
+
.map(key => `${key}=${encodeURIComponent(String(params[key]))}`)
|
|
9
|
+
.join('&')
|
|
10
|
+
: '';
|
|
11
|
+
};
|
|
12
|
+
const SocialShare = ({ url = window.location.href, text = '', width = 600, height = 480, isLink = false, isBlank = true, platforms, containerComponent, buttonComponent, buttonComponents, facebookProps = {}, twitterProps = {}, emailProps = {}, whatsappProps = {}, }) => {
|
|
13
|
+
const shareConfigs = {
|
|
14
|
+
fb: {
|
|
15
|
+
shareUrl: 'https://www.facebook.com/sharer/sharer.php',
|
|
16
|
+
getParams: () => ({
|
|
17
|
+
u: url,
|
|
18
|
+
hashtag: facebookProps.hashtag
|
|
19
|
+
? facebookProps.hashtag.startsWith('#')
|
|
20
|
+
? facebookProps.hashtag
|
|
21
|
+
: `#${facebookProps.hashtag}`
|
|
22
|
+
: '',
|
|
23
|
+
quote: text,
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
li: {
|
|
27
|
+
shareUrl: 'https://www.linkedin.com/shareArticle',
|
|
28
|
+
getParams: () => ({
|
|
29
|
+
url,
|
|
30
|
+
}),
|
|
31
|
+
},
|
|
32
|
+
x: {
|
|
33
|
+
shareUrl: 'https://x.com/intent/tweet',
|
|
34
|
+
getParams: () => ({
|
|
35
|
+
text,
|
|
36
|
+
url,
|
|
37
|
+
hashtags: twitterProps.hashtags,
|
|
38
|
+
via: twitterProps.via,
|
|
39
|
+
related: twitterProps.related,
|
|
40
|
+
in_reply_to: twitterProps.inReplyTo,
|
|
41
|
+
}),
|
|
42
|
+
},
|
|
43
|
+
th: {
|
|
44
|
+
shareUrl: 'https://threads.net/intent/post',
|
|
45
|
+
getParams: () => ({
|
|
46
|
+
text: `${text} ${url}`,
|
|
47
|
+
}),
|
|
48
|
+
},
|
|
49
|
+
em: {
|
|
50
|
+
shareUrl: 'mailto:' + (emailProps.to || ''),
|
|
51
|
+
getParams: () => ({
|
|
52
|
+
subject: emailProps.title,
|
|
53
|
+
body: `${text}\n${url}`,
|
|
54
|
+
}),
|
|
55
|
+
},
|
|
56
|
+
wa: {
|
|
57
|
+
shareUrl: whatsappProps.web
|
|
58
|
+
? 'https://web.whatsapp.com/send'
|
|
59
|
+
: 'https://wa.me/',
|
|
60
|
+
getParams: () => ({
|
|
61
|
+
phone: whatsappProps.to,
|
|
62
|
+
text: `${text} ${url}`,
|
|
63
|
+
}),
|
|
64
|
+
},
|
|
65
|
+
tg: {
|
|
66
|
+
shareUrl: 'https://t.me/share',
|
|
67
|
+
getParams: () => ({
|
|
68
|
+
text,
|
|
69
|
+
url,
|
|
70
|
+
}),
|
|
71
|
+
},
|
|
72
|
+
re: {
|
|
73
|
+
shareUrl: 'https://www.reddit.com/submit',
|
|
74
|
+
getParams: () => ({
|
|
75
|
+
url,
|
|
76
|
+
title: text,
|
|
77
|
+
}),
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
const platformLabels = {
|
|
81
|
+
fb: 'Facebook',
|
|
82
|
+
li: 'LinkedIn',
|
|
83
|
+
x: 'X',
|
|
84
|
+
th: 'Threads',
|
|
85
|
+
em: 'Email',
|
|
86
|
+
wa: 'WhatsApp',
|
|
87
|
+
tg: 'Telegram',
|
|
88
|
+
re: 'Reddit',
|
|
89
|
+
};
|
|
90
|
+
const buildShareUrl = (config) => {
|
|
91
|
+
const params = config.getParams();
|
|
92
|
+
const queryString = buildQueryString(params);
|
|
93
|
+
return config.shareUrl + queryString;
|
|
94
|
+
};
|
|
95
|
+
const openShareWindow = (shareUrl) => {
|
|
96
|
+
if (isLink) {
|
|
97
|
+
if (isBlank) {
|
|
98
|
+
window.open(shareUrl, '_blank');
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
window.location.href = shareUrl;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
const left = window.innerWidth / 2 - width / 2 + window.screenX;
|
|
106
|
+
const top = window.innerHeight / 2 - height / 2 + window.screenY;
|
|
107
|
+
const popParams = `scrollbars=no, width=${width}, height=${height}, top=${top}, left=${left}`;
|
|
108
|
+
const newWindow = window.open(shareUrl, '', popParams);
|
|
109
|
+
if (newWindow) {
|
|
110
|
+
newWindow.focus();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const handleShare = (key) => {
|
|
115
|
+
const config = shareConfigs[key];
|
|
116
|
+
if (!config)
|
|
117
|
+
return;
|
|
118
|
+
const shareUrl = buildShareUrl(config);
|
|
119
|
+
openShareWindow(shareUrl);
|
|
120
|
+
};
|
|
121
|
+
const ContainerComponent = containerComponent || 'div';
|
|
122
|
+
const DefaultButton = buttonComponent || 'button';
|
|
123
|
+
const platformsToShow = platforms || Object.keys(shareConfigs);
|
|
124
|
+
return (jsx(ContainerComponent, { children: platformsToShow.map(key => {
|
|
125
|
+
const Button = (buttonComponents && buttonComponents[key]) || DefaultButton;
|
|
126
|
+
const label = platformLabels[key] || key;
|
|
127
|
+
return (jsx(Button, { onClick: () => handleShare(key), title: `Share on ${label}`, children: label }, key));
|
|
128
|
+
}) }));
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export { SocialShare };
|
|
132
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -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
|
+
export declare const SocialShare: React.FC<SocialShareProps>;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentTheme } from "./ui/theme/common/ComponentTheme";
|
|
3
|
+
import { ButtonTheme } from './ui/theme/buttonTheme';
|
|
4
|
+
import { BadgeTheme } from './ui/theme/badgeTheme';
|
|
5
|
+
import { ChipTheme } from './ui/theme/chipTheme';
|
|
6
|
+
import { TypographyComponentTheme } from './ui/theme/typographyComponentTheme';
|
|
7
|
+
import { CardTheme } from "./ui/theme/cardTheme";
|
|
8
|
+
import { RowTheme } from "./ui/theme/rowTheme";
|
|
9
|
+
import { DividerTheme } from './ui/theme/dividerTheme';
|
|
10
|
+
import { ContainerTheme } from './ui/theme/containerTheme';
|
|
11
|
+
import { ColTheme } from './ui/theme/colTheme';
|
|
12
|
+
import { StackTheme } from './ui/theme/stackTheme';
|
|
13
|
+
import { SectionTheme } from "./ui/theme/sectionTheme";
|
|
14
|
+
import { GridTheme } from "./ui/theme/gridTheme";
|
|
15
|
+
import { BadgeProps, ButtonProps, CardProps, ChipProps, ColProps, ContainerProps, DividerProps, GridProps, RowProps, SectionProps, StackProps, TypographyComponentProps } from "./ui/props/props";
|
|
16
|
+
import { DeepPartial } from "./utils/deepPartial";
|
|
17
|
+
export declare const COMPONENT_KEYS: readonly ["button", "badge", "chip", "card", "divider", "row", "col", "stack", "section", "grid3", "grid4", "pageTitle", "sectionTitle", "title", "text", "link", "list", "listItem"];
|
|
18
|
+
export type ComponentKey = typeof COMPONENT_KEYS[number];
|
|
19
|
+
export interface ThemeProps extends Record<ComponentKey, ComponentTheme<object, object>> {
|
|
20
|
+
button: ComponentTheme<ButtonProps, ButtonTheme<ButtonProps>>;
|
|
21
|
+
badge: ComponentTheme<BadgeProps, BadgeTheme<BadgeProps>>;
|
|
22
|
+
chip: ComponentTheme<ChipProps, ChipTheme<ChipProps>>;
|
|
23
|
+
card: ComponentTheme<CardProps, CardTheme<CardProps>>;
|
|
24
|
+
divider: ComponentTheme<DividerProps, DividerTheme<DividerProps>>;
|
|
25
|
+
container: ComponentTheme<ContainerProps, ContainerTheme<ContainerProps>>;
|
|
26
|
+
row: ComponentTheme<RowProps, RowTheme<RowProps>>;
|
|
27
|
+
col: ComponentTheme<ColProps, ColTheme<ColProps>>;
|
|
28
|
+
stack: ComponentTheme<StackProps, StackTheme<StackProps>>;
|
|
29
|
+
section: ComponentTheme<SectionProps, SectionTheme<SectionProps>>;
|
|
30
|
+
grid3: ComponentTheme<GridProps, GridTheme<GridProps>>;
|
|
31
|
+
grid4: ComponentTheme<GridProps, GridTheme<GridProps>>;
|
|
32
|
+
pageTitle: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
|
|
33
|
+
sectionTitle: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
|
|
34
|
+
title: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
|
|
35
|
+
text: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
|
|
36
|
+
link: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
|
|
37
|
+
list: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
|
|
38
|
+
listItem: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
|
|
39
|
+
}
|
|
40
|
+
export type PartialTheme = DeepPartial<ThemeProps>;
|
|
41
|
+
export declare const defaultTheme: ThemeProps;
|
|
42
|
+
export type ThemeDefaults = Partial<Record<ComponentKey, Record<string, boolean>>>;
|
|
43
|
+
export interface ThemeProviderProps {
|
|
44
|
+
children: React.ReactNode;
|
|
45
|
+
theme?: PartialTheme;
|
|
46
|
+
themeDefaults?: ThemeDefaults;
|
|
47
|
+
themeOverride?: (theme: ThemeProps) => ThemeProps;
|
|
48
|
+
}
|
|
49
|
+
export declare function ThemeProvider({ children, theme: themeObject, themeDefaults, themeOverride }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export declare function useTheme(): ThemeProps;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentTheme } from "./ui/theme/common/ComponentTheme";
|
|
2
|
+
import { ComponentProps } from "./ui/props/props";
|
|
3
|
+
export type ThemedComponentProps<P extends ComponentProps, T extends object> = P & {
|
|
4
|
+
theme: ComponentTheme<P, T>;
|
|
5
|
+
propsToOmit?: readonly string[];
|
|
6
|
+
};
|
|
7
|
+
export declare function ThemedComponent<P extends ComponentProps, T extends object>({ theme, propsToOmit, ...props }: ThemedComponentProps<P, T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AppearanceKey, TextAppearanceKey } from "../props/keys";
|
|
2
|
+
export declare const filledBackgroundAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
3
|
+
export declare const filledHoverBackgroundAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
4
|
+
export declare const filledActiveBackgroundAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
5
|
+
export declare const backgroundAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
6
|
+
export declare const hoverBackgroundAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
7
|
+
export declare const activeBackgroundAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
8
|
+
export declare const layoutBackgroundAppearanceClasses: Record<AppearanceKey, string>;
|
|
9
|
+
export declare const bgBorderAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
10
|
+
export declare const borderAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
11
|
+
export declare const filledBorderAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
12
|
+
export declare const ringAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
13
|
+
export declare const filledRingAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SizeKey, TextAppearanceKey } from "../props/keys";
|
|
2
|
+
export declare const filledTextAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
3
|
+
export declare const textAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
4
|
+
export declare const textSizeClasses: Record<SizeKey, string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './keys';
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export declare const MODE_KEYS: readonly ["base", "hover", "active"];
|
|
2
|
+
export declare const SIZE_KEYS: readonly ["xs", "sm", "md", "lg", "xl"];
|
|
3
|
+
export declare const VARIANT_KEYS: readonly ["filled", "outline"];
|
|
4
|
+
export declare const APPEARANCE_KEYS: readonly ["default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent"];
|
|
5
|
+
export declare const TEXT_APPEARANCE_KEYS: readonly ["default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent", "muted", "link"];
|
|
6
|
+
export declare const FONT_FAMILY_KEYS: readonly ["sans", "serif", "mono"];
|
|
7
|
+
export declare const FONT_WEIGHT_KEYS: readonly ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"];
|
|
8
|
+
export declare const FONT_STYLE_KEYS: readonly ["italic", "notItalic"];
|
|
9
|
+
export declare const TEXT_DECORATION_KEYS: readonly ["underline", "lineThrough", "noUnderline", "overline"];
|
|
10
|
+
export declare const TEXT_TRANSFORM_KEYS: readonly ["uppercase", "lowercase", "capitalize", "normalCase"];
|
|
11
|
+
export declare const TEXT_ALIGN_KEYS: readonly ["textLeft", "textCenter", "textRight", "textJustify"];
|
|
12
|
+
export declare const BORDER_KEYS: readonly ["border", "noBorder"];
|
|
13
|
+
export declare const SHADOW_KEYS: readonly ["shadow", "noShadow"];
|
|
14
|
+
export declare const RING_KEYS: readonly ["ring", "noRing"];
|
|
15
|
+
export declare const PADDING_KEYS: readonly ["padding", "noPadding"];
|
|
16
|
+
export declare const BREAKPOINT_KEYS: readonly ["xsCol", "smCol", "mdCol", "lgCol", "xlCol"];
|
|
17
|
+
export declare const HIDE_KEYS: readonly ["xsHide", "smHide", "mdHide", "lgHide", "xlHide"];
|
|
18
|
+
export declare const POSITION_KEYS: readonly ["relative", "absolute", "fixed", "sticky", "static"];
|
|
19
|
+
export declare const DIRECTION_REVERSE_KEYS: readonly ["reverse"];
|
|
20
|
+
export declare const GAP_KEYS: readonly ["gap", "noGap"];
|
|
21
|
+
export declare const PILL_KEYS: readonly ["pill"];
|
|
22
|
+
export declare const SHARP_KEYS: readonly ["sharp"];
|
|
23
|
+
export declare const ROUNDED_KEYS: readonly ["rounded"];
|
|
24
|
+
export declare const SHAPE_KEYS: readonly ["pill", "sharp", "rounded"];
|
|
25
|
+
export declare const FLEX_DIRECTION_KEYS: readonly ["row", "column", "rowReverse", "columnReverse"];
|
|
26
|
+
export declare const ITEMS_KEYS: readonly ["itemsStart", "itemsEnd", "itemsCenter", "itemsBaseline", "itemsStretch"];
|
|
27
|
+
export declare const JUSTIFY_KEYS: readonly ["justifyStart", "justifyEnd", "justifyCenter", "justifyBetween", "justifyAround", "justifyEvenly", "justifyStretch", "justifyBaseline"];
|
|
28
|
+
export declare const WRAP_KEYS: readonly ["flexWrap", "flexNoWrap", "flexWrapReverse"];
|
|
29
|
+
export declare const DISPLAY_KEYS: readonly ["inline", "block", "inlineBlock", "flex", "inlineFlex", "grid", "inlineGrid", "contents", "table", "tableCell", "hidden"];
|
|
30
|
+
export declare const EXCLUSIVE_KEY_GROUPS: (readonly ["base", "hover", "active"] | readonly ["xs", "sm", "md", "lg", "xl"] | readonly ["filled", "outline"] | readonly ["default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent", "muted", "link"] | readonly ["sans", "serif", "mono"] | readonly ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"] | readonly ["italic", "notItalic"] | readonly ["underline", "lineThrough", "noUnderline", "overline"] | readonly ["uppercase", "lowercase", "capitalize", "normalCase"] | readonly ["textLeft", "textCenter", "textRight", "textJustify"] | readonly ["border", "noBorder"] | readonly ["shadow", "noShadow"] | readonly ["ring", "noRing"] | readonly ["padding", "noPadding"] | readonly ["xsCol", "smCol", "mdCol", "lgCol", "xlCol"] | readonly ["xsHide", "smHide", "mdHide", "lgHide", "xlHide"] | readonly ["relative", "absolute", "fixed", "sticky", "static"] | readonly ["reverse"] | readonly ["gap", "noGap"] | readonly ["pill", "sharp", "rounded"] | readonly ["row", "column", "rowReverse", "columnReverse"] | readonly ["itemsStart", "itemsEnd", "itemsCenter", "itemsBaseline", "itemsStretch"] | readonly ["justifyStart", "justifyEnd", "justifyCenter", "justifyBetween", "justifyAround", "justifyEvenly", "justifyStretch", "justifyBaseline"] | readonly ["flexWrap", "flexNoWrap", "flexWrapReverse"] | readonly ["inline", "block", "inlineBlock", "flex", "inlineFlex", "grid", "inlineGrid", "contents", "table", "tableCell", "hidden"])[];
|
|
31
|
+
export type ModeKey = typeof MODE_KEYS[number];
|
|
32
|
+
export type SizeKey = typeof SIZE_KEYS[number];
|
|
33
|
+
export type RingKey = typeof RING_KEYS[number];
|
|
34
|
+
export type ShapeKey = typeof SHAPE_KEYS[number];
|
|
35
|
+
export type BorderKey = typeof BORDER_KEYS[number];
|
|
36
|
+
export type ShadowKey = typeof SHADOW_KEYS[number];
|
|
37
|
+
export type PaddingKey = typeof PADDING_KEYS[number];
|
|
38
|
+
export type GapKey = typeof GAP_KEYS[number];
|
|
39
|
+
export type VariantKey = typeof VARIANT_KEYS[number];
|
|
40
|
+
export type AppearanceKey = typeof APPEARANCE_KEYS[number];
|
|
41
|
+
export type TextAppearanceKey = typeof TEXT_APPEARANCE_KEYS[number];
|
|
42
|
+
export type FontFamilyKey = typeof FONT_FAMILY_KEYS[number];
|
|
43
|
+
export type FontWeightKey = typeof FONT_WEIGHT_KEYS[number];
|
|
44
|
+
export type FontStyleKey = typeof FONT_STYLE_KEYS[number];
|
|
45
|
+
export type TextDecorationKey = typeof TEXT_DECORATION_KEYS[number];
|
|
46
|
+
export type TextTransformKey = typeof TEXT_TRANSFORM_KEYS[number];
|
|
47
|
+
export type TextAlignKey = typeof TEXT_ALIGN_KEYS[number];
|
|
48
|
+
export type BreakpointKey = typeof BREAKPOINT_KEYS[number];
|
|
49
|
+
export type HideKey = typeof HIDE_KEYS[number];
|
|
50
|
+
export type PositionKey = typeof POSITION_KEYS[number];
|
|
51
|
+
export type FlexDirectionKey = typeof FLEX_DIRECTION_KEYS[number];
|
|
52
|
+
export type ItemsKey = typeof ITEMS_KEYS[number];
|
|
53
|
+
export type JustifyKey = typeof JUSTIFY_KEYS[number];
|
|
54
|
+
export type WrapKey = typeof WRAP_KEYS[number];
|
|
55
|
+
export type DisplayKey = typeof DISPLAY_KEYS[number];
|
|
56
|
+
export declare const BASE_COMPONENT_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "itemsStart", "itemsEnd", "itemsCenter", "itemsBaseline", "itemsStretch", "justifyStart", "justifyEnd", "justifyCenter", "justifyBetween", "justifyAround", "justifyEvenly", "justifyStretch", "justifyBaseline", "relative", "absolute", "fixed", "sticky", "static", "inline", "block", "inlineBlock", "flex", "inlineFlex", "grid", "inlineGrid", "contents", "table", "tableCell", "hidden"];
|
|
57
|
+
export declare const FONT_KEYS: readonly ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", "italic", "notItalic", "underline", "lineThrough", "noUnderline", "overline", "uppercase", "lowercase", "capitalize", "normalCase", "sans", "serif", "mono", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent", "muted", "link", "textLeft", "textCenter", "textRight", "textJustify"];
|
|
58
|
+
export declare const TYPOGRAPHY_COMPONENT_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "itemsStart", "itemsEnd", "itemsCenter", "itemsBaseline", "itemsStretch", "justifyStart", "justifyEnd", "justifyCenter", "justifyBetween", "justifyAround", "justifyEvenly", "justifyStretch", "justifyBaseline", "relative", "absolute", "fixed", "sticky", "static", "inline", "block", "inlineBlock", "flex", "inlineFlex", "grid", "inlineGrid", "contents", "table", "tableCell", "hidden", "thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", "italic", "notItalic", "underline", "lineThrough", "noUnderline", "overline", "uppercase", "lowercase", "capitalize", "normalCase", "sans", "serif", "mono", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent", "muted", "link", "textLeft", "textCenter", "textRight", "textJustify"];
|
|
59
|
+
export type TypographyComponentKey = typeof TYPOGRAPHY_COMPONENT_KEYS[number];
|
|
60
|
+
export declare const BUTTON_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "itemsStart", "itemsEnd", "itemsCenter", "itemsBaseline", "itemsStretch", "justifyStart", "justifyEnd", "justifyCenter", "justifyBetween", "justifyAround", "justifyEvenly", "justifyStretch", "justifyBaseline", "relative", "absolute", "fixed", "sticky", "static", "inline", "block", "inlineBlock", "flex", "inlineFlex", "grid", "inlineGrid", "contents", "table", "tableCell", "hidden", "thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", "italic", "notItalic", "underline", "lineThrough", "noUnderline", "overline", "uppercase", "lowercase", "capitalize", "normalCase", "sans", "serif", "mono", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent", "muted", "link", "textLeft", "textCenter", "textRight", "textJustify", "pill", "sharp", "rounded", "border", "noBorder", "shadow", "noShadow", "ring", "noRing", "gap", "noGap", "padding", "noPadding", "filled", "outline", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent"];
|
|
61
|
+
export type ButtonKey = typeof BUTTON_KEYS[number];
|
|
62
|
+
export declare const GRID_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "itemsStart", "itemsEnd", "itemsCenter", "itemsBaseline", "itemsStretch", "justifyStart", "justifyEnd", "justifyCenter", "justifyBetween", "justifyAround", "justifyEvenly", "justifyStretch", "justifyBaseline", "relative", "absolute", "fixed", "sticky", "static", "inline", "block", "inlineBlock", "flex", "inlineFlex", "grid", "inlineGrid", "contents", "table", "tableCell", "hidden", "gap", "noGap", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent"];
|
|
63
|
+
export type GridKey = typeof GRID_KEYS[number];
|
|
64
|
+
export declare const ROW_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "itemsStart", "itemsEnd", "itemsCenter", "itemsBaseline", "itemsStretch", "justifyStart", "justifyEnd", "justifyCenter", "justifyBetween", "justifyAround", "justifyEvenly", "justifyStretch", "justifyBaseline", "relative", "absolute", "fixed", "sticky", "static", "inline", "block", "inlineBlock", "flex", "inlineFlex", "grid", "inlineGrid", "contents", "table", "tableCell", "hidden", "flexWrap", "flexNoWrap", "flexWrapReverse", "gap", "noGap", "reverse", "xsCol", "smCol", "mdCol", "lgCol", "xlCol", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent"];
|
|
65
|
+
export type RowKey = typeof ROW_KEYS[number];
|
|
66
|
+
export declare const COL_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "itemsStart", "itemsEnd", "itemsCenter", "itemsBaseline", "itemsStretch", "justifyStart", "justifyEnd", "justifyCenter", "justifyBetween", "justifyAround", "justifyEvenly", "justifyStretch", "justifyBaseline", "relative", "absolute", "fixed", "sticky", "static", "inline", "block", "inlineBlock", "flex", "inlineFlex", "grid", "inlineGrid", "contents", "table", "tableCell", "hidden", "flexWrap", "flexNoWrap", "flexWrapReverse", "gap", "noGap", "reverse", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent"];
|
|
67
|
+
export type ColKey = typeof COL_KEYS[number];
|
|
68
|
+
export declare const CARD_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "itemsStart", "itemsEnd", "itemsCenter", "itemsBaseline", "itemsStretch", "justifyStart", "justifyEnd", "justifyCenter", "justifyBetween", "justifyAround", "justifyEvenly", "justifyStretch", "justifyBaseline", "relative", "absolute", "fixed", "sticky", "static", "inline", "block", "inlineBlock", "flex", "inlineFlex", "grid", "inlineGrid", "contents", "table", "tableCell", "hidden", "thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", "italic", "notItalic", "underline", "lineThrough", "noUnderline", "overline", "uppercase", "lowercase", "capitalize", "normalCase", "sans", "serif", "mono", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent", "muted", "link", "textLeft", "textCenter", "textRight", "textJustify", "gap", "noGap", "sharp", "rounded", "xsCol", "smCol", "mdCol", "lgCol", "xlCol", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent", "border", "noBorder", "ring", "noRing", "shadow", "noShadow", "padding", "noPadding", "row", "column", "rowReverse", "columnReverse", "reverse", "flexWrap", "flexNoWrap", "flexWrapReverse"];
|
|
69
|
+
export type CardKey = typeof CARD_KEYS[number];
|
|
70
|
+
export declare const STACK_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "itemsStart", "itemsEnd", "itemsCenter", "itemsBaseline", "itemsStretch", "justifyStart", "justifyEnd", "justifyCenter", "justifyBetween", "justifyAround", "justifyEvenly", "justifyStretch", "justifyBaseline", "relative", "absolute", "fixed", "sticky", "static", "inline", "block", "inlineBlock", "flex", "inlineFlex", "grid", "inlineGrid", "contents", "table", "tableCell", "hidden", "flexWrap", "flexNoWrap", "flexWrapReverse", "gap", "noGap", "reverse", "xsCol", "smCol", "mdCol", "lgCol", "xlCol", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent", "row", "column", "rowReverse", "columnReverse", "padding", "noPadding"];
|
|
71
|
+
export type StackKey = typeof STACK_KEYS[number];
|
|
72
|
+
export declare const BADGE_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "itemsStart", "itemsEnd", "itemsCenter", "itemsBaseline", "itemsStretch", "justifyStart", "justifyEnd", "justifyCenter", "justifyBetween", "justifyAround", "justifyEvenly", "justifyStretch", "justifyBaseline", "relative", "absolute", "fixed", "sticky", "static", "inline", "block", "inlineBlock", "flex", "inlineFlex", "grid", "inlineGrid", "contents", "table", "tableCell", "hidden", "thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", "italic", "notItalic", "underline", "lineThrough", "noUnderline", "overline", "uppercase", "lowercase", "capitalize", "normalCase", "sans", "serif", "mono", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent", "muted", "link", "textLeft", "textCenter", "textRight", "textJustify", "pill", "sharp", "rounded", "filled", "outline", "shadow", "noShadow", "border", "noBorder", "ring", "noRing", "gap", "noGap", "padding", "noPadding", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent"];
|
|
73
|
+
export type BadgeKey = typeof BADGE_KEYS[number];
|
|
74
|
+
export declare const CHIP_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "itemsStart", "itemsEnd", "itemsCenter", "itemsBaseline", "itemsStretch", "justifyStart", "justifyEnd", "justifyCenter", "justifyBetween", "justifyAround", "justifyEvenly", "justifyStretch", "justifyBaseline", "relative", "absolute", "fixed", "sticky", "static", "inline", "block", "inlineBlock", "flex", "inlineFlex", "grid", "inlineGrid", "contents", "table", "tableCell", "hidden", "thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", "italic", "notItalic", "underline", "lineThrough", "noUnderline", "overline", "uppercase", "lowercase", "capitalize", "normalCase", "sans", "serif", "mono", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent", "muted", "link", "textLeft", "textCenter", "textRight", "textJustify", "pill", "sharp", "rounded", "filled", "outline", "shadow", "noShadow", "border", "noBorder", "ring", "noRing", "gap", "noGap", "padding", "noPadding", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent"];
|
|
75
|
+
export type ChipKey = typeof CHIP_KEYS[number];
|
|
76
|
+
export declare const DIVIDER_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "itemsStart", "itemsEnd", "itemsCenter", "itemsBaseline", "itemsStretch", "justifyStart", "justifyEnd", "justifyCenter", "justifyBetween", "justifyAround", "justifyEvenly", "justifyStretch", "justifyBaseline", "relative", "absolute", "fixed", "sticky", "static", "inline", "block", "inlineBlock", "flex", "inlineFlex", "grid", "inlineGrid", "contents", "table", "tableCell", "hidden", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent"];
|
|
77
|
+
export type DividerKey = typeof DIVIDER_KEYS[number];
|
|
78
|
+
export declare const CONTAINER_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "itemsStart", "itemsEnd", "itemsCenter", "itemsBaseline", "itemsStretch", "justifyStart", "justifyEnd", "justifyCenter", "justifyBetween", "justifyAround", "justifyEvenly", "justifyStretch", "justifyBaseline", "relative", "absolute", "fixed", "sticky", "static", "inline", "block", "inlineBlock", "flex", "inlineFlex", "grid", "inlineGrid", "contents", "table", "tableCell", "hidden", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent", "border", "noBorder", "shadow", "noShadow", "ring", "noRing", "gap", "noGap", "pill", "sharp", "rounded"];
|
|
79
|
+
export type ContainerKey = typeof CONTAINER_KEYS[number];
|
|
80
|
+
export declare const SECTION_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "itemsStart", "itemsEnd", "itemsCenter", "itemsBaseline", "itemsStretch", "justifyStart", "justifyEnd", "justifyCenter", "justifyBetween", "justifyAround", "justifyEvenly", "justifyStretch", "justifyBaseline", "relative", "absolute", "fixed", "sticky", "static", "inline", "block", "inlineBlock", "flex", "inlineFlex", "grid", "inlineGrid", "contents", "table", "tableCell", "hidden", "row", "column", "rowReverse", "columnReverse", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent", "padding", "noPadding", "reverse", "flexWrap", "flexNoWrap", "flexWrapReverse", "xsCol", "smCol", "mdCol", "lgCol", "xlCol", "gap", "noGap", "border", "noBorder", "shadow", "noShadow", "ring", "noRing", "pill", "sharp", "rounded"];
|
|
81
|
+
export type SectionKey = typeof SECTION_KEYS[number];
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BadgeKey, ButtonKey, GridKey, RowKey, ColKey, CardKey, StackKey, ChipKey, DividerKey, ContainerKey, SectionKey, TypographyComponentKey } from "./keys";
|
|
3
|
+
export type ComponentProps = {
|
|
4
|
+
tag?: React.ReactNode | string | any;
|
|
5
|
+
className?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
} & React.HTMLProps<HTMLElement>;
|
|
8
|
+
export type TypographyComponentProps = {
|
|
9
|
+
[K in TypographyComponentKey]?: boolean;
|
|
10
|
+
} & ComponentProps;
|
|
11
|
+
export type ButtonProps = {
|
|
12
|
+
[K in ButtonKey]?: boolean;
|
|
13
|
+
} & ComponentProps;
|
|
14
|
+
export type BadgeProps = {
|
|
15
|
+
[K in BadgeKey]?: boolean;
|
|
16
|
+
} & ComponentProps;
|
|
17
|
+
export type ChipProps = {
|
|
18
|
+
[K in ChipKey]?: boolean;
|
|
19
|
+
} & ComponentProps;
|
|
20
|
+
export type GridProps = {
|
|
21
|
+
[K in GridKey]?: boolean;
|
|
22
|
+
} & ComponentProps;
|
|
23
|
+
export type RowProps = {
|
|
24
|
+
[K in RowKey]?: boolean;
|
|
25
|
+
} & ComponentProps;
|
|
26
|
+
export type ColProps = {
|
|
27
|
+
[K in ColKey]?: boolean;
|
|
28
|
+
} & ComponentProps;
|
|
29
|
+
export type CardProps = {
|
|
30
|
+
[K in CardKey]?: boolean;
|
|
31
|
+
} & ComponentProps;
|
|
32
|
+
export type StackProps = {
|
|
33
|
+
[K in StackKey]?: boolean;
|
|
34
|
+
} & ComponentProps;
|
|
35
|
+
export type SectionProps = {
|
|
36
|
+
[K in SectionKey]?: boolean;
|
|
37
|
+
} & ComponentProps;
|
|
38
|
+
export type DividerProps = {
|
|
39
|
+
[K in DividerKey]?: boolean;
|
|
40
|
+
} & ComponentProps;
|
|
41
|
+
export type ContainerProps = {
|
|
42
|
+
[K in ContainerKey]?: boolean;
|
|
43
|
+
} & ComponentProps;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseTheme } from "../common/baseTheme";
|
|
2
|
+
import { AppearanceKey, ModeKey } from "../../props/keys";
|
|
3
|
+
export interface LayoutAppearanceTheme extends Record<AppearanceKey, Record<ModeKey, string>> {
|
|
4
|
+
}
|
|
5
|
+
export declare class LayoutAppearanceTheme extends BaseTheme {
|
|
6
|
+
static readonly defaultFullConfig: Record<AppearanceKey, Record<ModeKey, string>>;
|
|
7
|
+
constructor(initialOverrides?: Partial<Record<AppearanceKey, Partial<Record<ModeKey, string>>>>);
|
|
8
|
+
getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
|
|
9
|
+
static createDefaultStyle(src?: Partial<Record<ModeKey, Partial<Record<AppearanceKey, string>>>>): LayoutAppearanceTheme;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseTheme } from "../common/baseTheme";
|
|
2
|
+
import { ModeKey, TextAppearanceKey } from "../../props/keys";
|
|
3
|
+
export interface TextAppearanceTheme extends Record<TextAppearanceKey, Record<ModeKey, string>> {
|
|
4
|
+
}
|
|
5
|
+
export declare class TextAppearanceTheme extends BaseTheme {
|
|
6
|
+
static readonly defaultFullConfig: Record<TextAppearanceKey, Record<ModeKey, string>>;
|
|
7
|
+
constructor(initialOverrides?: Partial<Record<TextAppearanceKey, Partial<Record<ModeKey, string>>>>);
|
|
8
|
+
getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
|
|
9
|
+
static createDefaultStyle(src?: Partial<Record<ModeKey, Partial<Record<TextAppearanceKey, string>>>>): TextAppearanceTheme;
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseTheme } from "../common/baseTheme";
|
|
2
|
+
import { VariantKey } from "../../props/keys";
|
|
3
|
+
import { TextAppearanceTheme } from "./textAppearanceTheme";
|
|
4
|
+
export interface VariantTheme extends Record<VariantKey, TextAppearanceTheme> {
|
|
5
|
+
}
|
|
6
|
+
export declare class VariantTheme extends BaseTheme {
|
|
7
|
+
static readonly defaultInstances: Record<VariantKey, TextAppearanceTheme>;
|
|
8
|
+
constructor(variantInstances?: Record<VariantKey, TextAppearanceTheme>);
|
|
9
|
+
getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
|
|
10
|
+
static createDefault(initialInstances?: Partial<Record<VariantKey, TextAppearanceTheme>>): VariantTheme;
|
|
11
|
+
static createDefaultBackground(): VariantTheme;
|
|
12
|
+
static createDefaultText(): VariantTheme;
|
|
13
|
+
static createDefaultBorder(): VariantTheme;
|
|
14
|
+
static createDefaultRing(): VariantTheme;
|
|
15
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BaseComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
|
|
2
|
+
import { BadgeProps } from "../props/props";
|
|
3
|
+
import { SizeTheme } from "./size/sizeTheme";
|
|
4
|
+
import { GapTheme } from "./size/gapTheme";
|
|
5
|
+
import { RadiusTheme } from "./layout/radiusTheme";
|
|
6
|
+
import { BorderTheme } from "./layout/borderTheme";
|
|
7
|
+
import { ShadowTheme } from "./layout/shadowTheme";
|
|
8
|
+
import { RingTheme } from "./layout/ringTheme";
|
|
9
|
+
import { PxTheme } from "./size/pxTheme";
|
|
10
|
+
import { PyTheme } from "./size/pyTheme";
|
|
11
|
+
import { VariantTheme } from "./appearance/variantTheme";
|
|
12
|
+
export interface BadgeTheme<P> extends BaseComponentTheme<P> {
|
|
13
|
+
size: {
|
|
14
|
+
px: PxTheme;
|
|
15
|
+
py: PyTheme;
|
|
16
|
+
text: SizeTheme;
|
|
17
|
+
gap: GapTheme;
|
|
18
|
+
shadow: ShadowTheme;
|
|
19
|
+
};
|
|
20
|
+
appearance: {
|
|
21
|
+
background: VariantTheme;
|
|
22
|
+
text: VariantTheme;
|
|
23
|
+
border: VariantTheme;
|
|
24
|
+
ring: VariantTheme;
|
|
25
|
+
};
|
|
26
|
+
layout: DefaultLayoutThemes<P> & {
|
|
27
|
+
border: BorderTheme;
|
|
28
|
+
ring: RingTheme;
|
|
29
|
+
radius: RadiusTheme;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export declare const defaultBadgeTheme: ComponentTheme<BadgeProps, BadgeTheme<BadgeProps>>;
|