@vaneui/ui 0.0.19 → 0.1.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/dist/components/{theme/themeContext.d.ts → themeContext.d.ts} +15 -15
- package/dist/components/themedComponent.d.ts +7 -0
- package/dist/components/ui/classes/appearanceClasses.d.ts +1 -1
- package/dist/components/ui/col.d.ts +0 -7
- package/dist/components/ui/props/keys.d.ts +16 -14
- package/dist/components/ui/props/props.d.ts +4 -3
- package/dist/components/ui/theme/common/ComponentTheme.d.ts +11 -3
- package/dist/components/ui/theme/containerTheme.d.ts +2 -0
- package/dist/components/ui/theme/layout/displayTheme.d.ts +9 -0
- package/dist/components/utils/componentUtils.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +3327 -3311
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3326 -3310
- package/dist/index.js.map +1 -1
- package/dist/ui.css +24 -0
- package/dist/vars.css +121 -128
- package/package.json +7 -22
- package/dist/complex.css +0 -2025
- package/dist/components/theme/components/theme/index.d.ts +0 -1
- package/dist/components/theme/components/theme/themeContext.d.ts +0 -50
- package/dist/components/theme/components/ui/classes/appearanceClasses.d.ts +0 -13
- package/dist/components/theme/components/ui/classes/layoutClasses.d.ts +0 -13
- package/dist/components/theme/components/ui/classes/spacingClasses.d.ts +0 -2
- package/dist/components/theme/components/ui/classes/typographyClasses.d.ts +0 -10
- package/dist/components/theme/components/ui/props/keys.d.ts +0 -79
- package/dist/components/theme/components/ui/props/props.d.ts +0 -42
- package/dist/components/theme/components/ui/theme/appearance/layoutAppearanceTheme.d.ts +0 -10
- package/dist/components/theme/components/ui/theme/appearance/textAppearanceTheme.d.ts +0 -10
- package/dist/components/theme/components/ui/theme/appearance/variantTheme.d.ts +0 -15
- package/dist/components/theme/components/ui/theme/badgeTheme.d.ts +0 -32
- package/dist/components/theme/components/ui/theme/buttonTheme.d.ts +0 -32
- package/dist/components/theme/components/ui/theme/cardTheme.d.ts +0 -37
- package/dist/components/theme/components/ui/theme/chipTheme.d.ts +0 -32
- package/dist/components/theme/components/ui/theme/colTheme.d.ts +0 -15
- package/dist/components/theme/components/ui/theme/common/ComponentTheme.d.ts +0 -44
- package/dist/components/theme/components/ui/theme/common/baseTheme.d.ts +0 -12
- package/dist/components/theme/components/ui/theme/containerTheme.d.ts +0 -29
- package/dist/components/theme/components/ui/theme/dividerTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/gridTheme.d.ts +0 -10
- package/dist/components/theme/components/ui/theme/layout/borderTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/layout/directionTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/layout/hideTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/layout/itemsTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/layout/justifyTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/layout/positionTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/layout/radiusTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/layout/ringTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/layout/shadowTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/layout/wrapTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/rowTheme.d.ts +0 -15
- package/dist/components/theme/components/ui/theme/sectionTheme.d.ts +0 -34
- package/dist/components/theme/components/ui/theme/size/breakpointTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/size/gapTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/size/pxTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/size/pyTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/size/sizeTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/stackTheme.d.ts +0 -19
- package/dist/components/theme/components/ui/theme/typography/fontFamilyTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/typography/fontStyleTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/typography/fontWeightTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/typography/textAlignTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/typography/textDecorationTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/typography/textTransformTheme.d.ts +0 -9
- package/dist/components/theme/components/ui/theme/typographyComponentTheme.d.ts +0 -22
- package/dist/components/theme/components/utils/componentUtils.d.ts +0 -4
- package/dist/components/theme/components/utils/deepMerge.d.ts +0 -4
- package/dist/components/theme/components/utils/deepPartial.d.ts +0 -3
- package/dist/components/theme/index.d.ts +0 -1
- package/dist/components/theme/index.js +0 -1869
- package/dist/components/theme/index.js.map +0 -1
- package/dist/components/ui/classes/layoutClasses.d.ts +0 -13
- package/dist/components/utils/buildComponent.d.ts +0 -8
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ComponentTheme } from "
|
|
3
|
-
import { ButtonTheme } from '
|
|
4
|
-
import { BadgeTheme } from '
|
|
5
|
-
import { ChipTheme } from '
|
|
6
|
-
import { TypographyComponentTheme } from '
|
|
7
|
-
import { CardTheme } from "
|
|
8
|
-
import { RowTheme } from "
|
|
9
|
-
import { DividerTheme } from '
|
|
10
|
-
import { ContainerTheme } from '
|
|
11
|
-
import { ColTheme } from '
|
|
12
|
-
import { StackTheme } from '
|
|
13
|
-
import { SectionTheme } from "
|
|
14
|
-
import { GridTheme } from "
|
|
15
|
-
import { BadgeProps, ButtonProps, CardProps, ChipProps, ColProps, ContainerProps, DividerProps, GridProps, RowProps, SectionProps, StackProps, TypographyComponentProps } from "
|
|
16
|
-
import { DeepPartial } from "
|
|
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
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
18
|
export type ComponentKey = typeof COMPONENT_KEYS[number];
|
|
19
19
|
export interface ThemeProps extends Record<ComponentKey, ComponentTheme<object, object>> {
|
|
@@ -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;
|
|
@@ -6,7 +6,7 @@ export declare const backgroundAppearanceClasses: Record<TextAppearanceKey, stri
|
|
|
6
6
|
export declare const hoverBackgroundAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
7
7
|
export declare const activeBackgroundAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
8
8
|
export declare const layoutBackgroundAppearanceClasses: Record<AppearanceKey, string>;
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const bgBorderAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
10
10
|
export declare const borderAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
11
11
|
export declare const filledBorderAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
12
12
|
export declare const ringAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
2
|
import { ColProps } from './props/props';
|
|
3
|
-
/**
|
|
4
|
-
* Column component for vertical layouts.
|
|
5
|
-
* Supports flex-wrap properties for controlling how items wrap.
|
|
6
|
-
* @param props.wrap - Allows items to wrap (flex-wrap)
|
|
7
|
-
* @param props.nowrap - Prevents items from wrapping (flex-nowrap)
|
|
8
|
-
* @param props.wrapReverse - Wraps items onto multiple lines in reverse (flex-wrap-reverse)
|
|
9
|
-
*/
|
|
10
3
|
export declare const Col: (props: ColProps) => JSX.Element;
|
|
@@ -26,7 +26,8 @@ export declare const FLEX_DIRECTION_KEYS: readonly ["row", "column", "rowReverse
|
|
|
26
26
|
export declare const ITEMS_KEYS: readonly ["itemsStart", "itemsEnd", "itemsCenter", "itemsBaseline", "itemsStretch"];
|
|
27
27
|
export declare const JUSTIFY_KEYS: readonly ["justifyStart", "justifyEnd", "justifyCenter", "justifyBetween", "justifyAround", "justifyEvenly", "justifyStretch", "justifyBaseline"];
|
|
28
28
|
export declare const WRAP_KEYS: readonly ["flexWrap", "flexNoWrap", "flexWrapReverse"];
|
|
29
|
-
export declare const
|
|
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"])[];
|
|
30
31
|
export type ModeKey = typeof MODE_KEYS[number];
|
|
31
32
|
export type SizeKey = typeof SIZE_KEYS[number];
|
|
32
33
|
export type RingKey = typeof RING_KEYS[number];
|
|
@@ -51,29 +52,30 @@ export type FlexDirectionKey = typeof FLEX_DIRECTION_KEYS[number];
|
|
|
51
52
|
export type ItemsKey = typeof ITEMS_KEYS[number];
|
|
52
53
|
export type JustifyKey = typeof JUSTIFY_KEYS[number];
|
|
53
54
|
export type WrapKey = typeof WRAP_KEYS[number];
|
|
54
|
-
export
|
|
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"];
|
|
55
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"];
|
|
56
|
-
export declare const TYPOGRAPHY_COMPONENT_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "relative", "absolute", "fixed", "sticky", "static", "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"];
|
|
57
59
|
export type TypographyComponentKey = typeof TYPOGRAPHY_COMPONENT_KEYS[number];
|
|
58
|
-
export declare const BUTTON_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "relative", "absolute", "fixed", "sticky", "static", "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", "
|
|
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"];
|
|
59
61
|
export type ButtonKey = typeof BUTTON_KEYS[number];
|
|
60
|
-
export declare const GRID_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "relative", "absolute", "fixed", "sticky", "static", "gap", "noGap", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent"];
|
|
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"];
|
|
61
63
|
export type GridKey = typeof GRID_KEYS[number];
|
|
62
|
-
export declare const ROW_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "
|
|
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"];
|
|
63
65
|
export type RowKey = typeof ROW_KEYS[number];
|
|
64
|
-
export declare const COL_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "
|
|
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"];
|
|
65
67
|
export type ColKey = typeof COL_KEYS[number];
|
|
66
|
-
export declare const CARD_KEYS: readonly ["
|
|
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"];
|
|
67
69
|
export type CardKey = typeof CARD_KEYS[number];
|
|
68
|
-
export declare const STACK_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "
|
|
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"];
|
|
69
71
|
export type StackKey = typeof STACK_KEYS[number];
|
|
70
|
-
export declare const BADGE_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "relative", "absolute", "fixed", "sticky", "static", "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", "
|
|
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"];
|
|
71
73
|
export type BadgeKey = typeof BADGE_KEYS[number];
|
|
72
|
-
export declare const CHIP_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "relative", "absolute", "fixed", "sticky", "static", "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", "
|
|
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"];
|
|
73
75
|
export type ChipKey = typeof CHIP_KEYS[number];
|
|
74
|
-
export declare const DIVIDER_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "relative", "absolute", "fixed", "sticky", "static", "default", "accent", "primary", "secondary", "tertiary", "success", "danger", "warning", "info", "transparent"];
|
|
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"];
|
|
75
77
|
export type DividerKey = typeof DIVIDER_KEYS[number];
|
|
76
|
-
export declare const CONTAINER_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "relative", "absolute", "fixed", "sticky", "static", "
|
|
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"];
|
|
77
79
|
export type ContainerKey = typeof CONTAINER_KEYS[number];
|
|
78
|
-
export declare const SECTION_KEYS: readonly ["xs", "sm", "md", "lg", "xl", "xsHide", "smHide", "mdHide", "lgHide", "xlHide", "
|
|
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"];
|
|
79
81
|
export type SectionKey = typeof SECTION_KEYS[number];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BadgeKey, ButtonKey, GridKey, RowKey, ColKey, CardKey, StackKey, ChipKey, DividerKey, ContainerKey, SectionKey, TypographyComponentKey } from "./keys";
|
|
3
|
-
export
|
|
3
|
+
export type ComponentProps = {
|
|
4
4
|
tag?: React.ReactNode | string | any;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
className?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
} & React.HTMLProps<HTMLElement>;
|
|
7
8
|
export type TypographyComponentProps = {
|
|
8
9
|
[K in TypographyComponentKey]?: boolean;
|
|
9
10
|
} & ComponentProps;
|
|
@@ -11,6 +11,8 @@ import { TextDecorationTheme } from "../typography/textDecorationTheme";
|
|
|
11
11
|
import { TextTransformTheme } from "../typography/textTransformTheme";
|
|
12
12
|
import { TextAlignTheme } from "../typography/textAlignTheme";
|
|
13
13
|
import { DeepPartial } from "../../../utils/deepPartial";
|
|
14
|
+
import { DisplayTheme } from "../layout/displayTheme";
|
|
15
|
+
import { ComponentProps } from "../../props/props";
|
|
14
16
|
type ThemeNode<P> = BaseTheme | ThemeMap<P>;
|
|
15
17
|
export type ThemeMap<P> = {
|
|
16
18
|
[key: string]: ThemeNode<P>;
|
|
@@ -20,6 +22,7 @@ export interface DefaultLayoutThemes<P> {
|
|
|
20
22
|
items: ItemsTheme;
|
|
21
23
|
justify: JustifyTheme;
|
|
22
24
|
position: PositionTheme;
|
|
25
|
+
display: DisplayTheme;
|
|
23
26
|
}
|
|
24
27
|
export interface DefaultTypographyThemes<P> {
|
|
25
28
|
fontFamily: FontFamilyTheme;
|
|
@@ -33,12 +36,17 @@ export interface BaseComponentTheme<P> {
|
|
|
33
36
|
layout: DefaultLayoutThemes<P>;
|
|
34
37
|
typography: DefaultTypographyThemes<P>;
|
|
35
38
|
}
|
|
36
|
-
export declare class ComponentTheme<P extends
|
|
39
|
+
export declare class ComponentTheme<P extends ComponentProps, TTheme extends object> {
|
|
37
40
|
readonly tag: React.ElementType;
|
|
38
41
|
readonly base: string;
|
|
39
|
-
readonly themes:
|
|
42
|
+
readonly themes: TTheme;
|
|
40
43
|
defaults: Partial<P>;
|
|
41
|
-
constructor(tag: React.ElementType, base: string, subThemes: DeepPartial<
|
|
44
|
+
constructor(tag: React.ElementType, base: string, subThemes: DeepPartial<TTheme>, defaults?: Partial<P>);
|
|
42
45
|
getClasses(props: P, defaults?: Partial<P>): string[];
|
|
46
|
+
getComponentConfig(props: P, propsToOmit?: readonly string[]): {
|
|
47
|
+
Tag: React.ElementType<any, keyof React.JSX.IntrinsicElements>;
|
|
48
|
+
finalClasses: string;
|
|
49
|
+
finalProps: Omit<P, "tag" | "className">;
|
|
50
|
+
};
|
|
43
51
|
}
|
|
44
52
|
export {};
|
|
@@ -8,6 +8,7 @@ import { BorderTheme } from "./layout/borderTheme";
|
|
|
8
8
|
import { RingTheme } from "./layout/ringTheme";
|
|
9
9
|
import { LayoutAppearanceTheme } from "./appearance/layoutAppearanceTheme";
|
|
10
10
|
import { TextAppearanceTheme } from "./appearance/textAppearanceTheme";
|
|
11
|
+
import { RadiusTheme } from "./layout/radiusTheme";
|
|
11
12
|
export interface ContainerTheme<P> extends BaseComponentTheme<P> {
|
|
12
13
|
size: {
|
|
13
14
|
gap: GapTheme;
|
|
@@ -18,6 +19,7 @@ export interface ContainerTheme<P> extends BaseComponentTheme<P> {
|
|
|
18
19
|
direction: DirectionTheme;
|
|
19
20
|
border: BorderTheme;
|
|
20
21
|
ring: RingTheme;
|
|
22
|
+
radius: RadiusTheme;
|
|
21
23
|
};
|
|
22
24
|
appearance: {
|
|
23
25
|
background: LayoutAppearanceTheme;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DisplayKey } from "../../props/keys";
|
|
2
|
+
import { BaseTheme } from "../common/baseTheme";
|
|
3
|
+
export interface DisplayTheme extends Record<DisplayKey, string> {
|
|
4
|
+
}
|
|
5
|
+
export declare class DisplayTheme extends BaseTheme {
|
|
6
|
+
static readonly defaultClasses: Record<DisplayKey, string>;
|
|
7
|
+
constructor(initialConfig?: Partial<Record<DisplayKey, string>>);
|
|
8
|
+
getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
|
|
9
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Pick the first truthy key from props, then from defaults, then
|
|
2
|
+
* Pick the first truthy key from props, then from defaults, then undefined.
|
|
3
3
|
*/
|
|
4
4
|
export declare function pickFirstTruthyKey<P, K extends keyof P>(props: Partial<P>, defaults: Partial<P>, keys: readonly K[]): K | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export { Divider } from "./components/ui/divider";
|
|
|
4
4
|
export { Chip } from "./components/ui/chip";
|
|
5
5
|
export { Section, Container, Col, Row, Stack, Grid3, Grid4, Card } from "./components/ui/layout";
|
|
6
6
|
export { Text, Title, Link, List, ListItem, SectionTitle, PageTitle } from "./components/ui/typography";
|
|
7
|
-
export { ThemeProvider, useTheme, type ThemeProps, type ThemeDefaults, type ThemeProviderProps, type PartialTheme, defaultTheme, type ComponentKey, COMPONENT_KEYS } from './components/
|
|
7
|
+
export { ThemeProvider, useTheme, type ThemeProps, type ThemeDefaults, type ThemeProviderProps, type PartialTheme, defaultTheme, type ComponentKey, COMPONENT_KEYS } from './components/themeContext';
|
|
8
8
|
export { type ModeKey } from "./components/ui/props/keys";
|