@vaneui/ui 0.0.13 → 0.0.15

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.
Files changed (128) hide show
  1. package/README.md +144 -1
  2. package/dist/complex.css +2697 -3
  3. package/dist/components/theme/components/theme/index.d.ts +1 -0
  4. package/dist/components/theme/components/theme/themeContext.d.ts +46 -0
  5. package/dist/components/theme/components/ui/classes/appearanceClasses.d.ts +13 -0
  6. package/dist/components/theme/components/ui/classes/layoutClasses.d.ts +13 -0
  7. package/dist/components/theme/components/ui/classes/spacingClasses.d.ts +2 -0
  8. package/dist/components/theme/components/ui/classes/typographyClasses.d.ts +10 -0
  9. package/dist/components/theme/components/ui/props/keys.d.ts +79 -0
  10. package/dist/components/theme/components/ui/props/props.d.ts +42 -0
  11. package/dist/components/theme/components/ui/theme/appearance/layoutAppearanceTheme.d.ts +10 -0
  12. package/dist/components/theme/components/ui/theme/appearance/textAppearanceTheme.d.ts +10 -0
  13. package/dist/components/theme/components/ui/theme/appearance/variantTheme.d.ts +15 -0
  14. package/dist/components/theme/components/ui/theme/badgeTheme.d.ts +32 -0
  15. package/dist/components/theme/components/ui/theme/buttonTheme.d.ts +32 -0
  16. package/dist/components/theme/components/ui/theme/cardTheme.d.ts +37 -0
  17. package/dist/components/theme/components/ui/theme/chipTheme.d.ts +32 -0
  18. package/dist/components/theme/components/ui/theme/colTheme.d.ts +15 -0
  19. package/dist/components/theme/components/ui/theme/common/ComponentTheme.d.ts +44 -0
  20. package/dist/components/theme/components/ui/theme/common/baseTheme.d.ts +12 -0
  21. package/dist/components/theme/components/ui/theme/containerTheme.d.ts +29 -0
  22. package/dist/components/theme/components/ui/theme/dividerTheme.d.ts +9 -0
  23. package/dist/components/theme/components/ui/theme/gridTheme.d.ts +10 -0
  24. package/dist/components/theme/components/ui/theme/layout/borderTheme.d.ts +9 -0
  25. package/dist/components/theme/components/ui/theme/layout/directionTheme.d.ts +9 -0
  26. package/dist/components/theme/components/ui/theme/layout/hideTheme.d.ts +9 -0
  27. package/dist/components/theme/components/ui/theme/layout/itemsTheme.d.ts +9 -0
  28. package/dist/components/theme/components/ui/theme/layout/justifyTheme.d.ts +9 -0
  29. package/dist/components/theme/components/ui/theme/layout/positionTheme.d.ts +9 -0
  30. package/dist/components/theme/components/ui/theme/layout/radiusTheme.d.ts +9 -0
  31. package/dist/components/theme/components/ui/theme/layout/ringTheme.d.ts +9 -0
  32. package/dist/components/theme/components/ui/theme/layout/shadowTheme.d.ts +9 -0
  33. package/dist/components/theme/components/ui/theme/layout/wrapTheme.d.ts +9 -0
  34. package/dist/components/theme/components/ui/theme/rowTheme.d.ts +15 -0
  35. package/dist/components/theme/components/ui/theme/sectionTheme.d.ts +19 -0
  36. package/dist/components/theme/components/ui/theme/size/breakpointTheme.d.ts +9 -0
  37. package/dist/components/theme/components/ui/theme/size/gapTheme.d.ts +9 -0
  38. package/dist/components/theme/components/ui/theme/size/pxTheme.d.ts +9 -0
  39. package/dist/components/theme/components/ui/theme/size/pyTheme.d.ts +9 -0
  40. package/dist/components/theme/components/ui/theme/size/sizeTheme.d.ts +9 -0
  41. package/dist/components/theme/components/ui/theme/stackTheme.d.ts +19 -0
  42. package/dist/components/theme/components/ui/theme/typography/fontFamilyTheme.d.ts +9 -0
  43. package/dist/components/theme/components/ui/theme/typography/fontStyleTheme.d.ts +9 -0
  44. package/dist/components/theme/components/ui/theme/typography/fontWeightTheme.d.ts +9 -0
  45. package/dist/components/theme/components/ui/theme/typography/textAlignTheme.d.ts +9 -0
  46. package/dist/components/theme/components/ui/theme/typography/textDecorationTheme.d.ts +9 -0
  47. package/dist/components/theme/components/ui/theme/typography/textTransformTheme.d.ts +9 -0
  48. package/dist/components/theme/components/ui/theme/typographyComponentTheme.d.ts +22 -0
  49. package/dist/components/theme/components/utils/componentUtils.d.ts +4 -0
  50. package/dist/components/theme/components/utils/deepMerge.d.ts +4 -0
  51. package/dist/components/theme/components/utils/deepPartial.d.ts +3 -0
  52. package/dist/components/theme/index.d.ts +1 -0
  53. package/dist/components/theme/index.js +1827 -0
  54. package/dist/components/theme/index.js.map +1 -0
  55. package/dist/components/theme/themeContext.d.ts +46 -0
  56. package/dist/components/ui/badge.d.ts +3 -3
  57. package/dist/components/ui/button.d.ts +3 -3
  58. package/dist/components/ui/card.d.ts +3 -0
  59. package/dist/components/ui/chip.d.ts +3 -3
  60. package/dist/components/ui/classes/appearanceClasses.d.ts +13 -0
  61. package/dist/components/ui/classes/layoutClasses.d.ts +13 -0
  62. package/dist/components/ui/classes/spacingClasses.d.ts +2 -0
  63. package/dist/components/ui/classes/typographyClasses.d.ts +10 -0
  64. package/dist/components/ui/col.d.ts +10 -0
  65. package/dist/components/ui/container.d.ts +3 -0
  66. package/dist/components/ui/divider.d.ts +3 -3
  67. package/dist/components/ui/grid.d.ts +4 -0
  68. package/dist/components/ui/layout.d.ts +7 -8
  69. package/dist/components/ui/props/keys.d.ts +79 -0
  70. package/dist/components/ui/props/props.d.ts +41 -107
  71. package/dist/components/ui/row.d.ts +3 -0
  72. package/dist/components/ui/section.d.ts +3 -0
  73. package/dist/components/ui/stack.d.ts +3 -0
  74. package/dist/components/ui/theme/appearance/layoutAppearanceTheme.d.ts +10 -0
  75. package/dist/components/ui/theme/appearance/textAppearanceTheme.d.ts +10 -0
  76. package/dist/components/ui/theme/appearance/variantTheme.d.ts +15 -0
  77. package/dist/components/ui/theme/badgeTheme.d.ts +32 -0
  78. package/dist/components/ui/theme/buttonTheme.d.ts +32 -0
  79. package/dist/components/ui/theme/cardTheme.d.ts +37 -0
  80. package/dist/components/ui/theme/chipTheme.d.ts +32 -0
  81. package/dist/components/ui/theme/colTheme.d.ts +15 -0
  82. package/dist/components/ui/theme/common/ComponentTheme.d.ts +44 -0
  83. package/dist/components/ui/theme/common/baseTheme.d.ts +12 -0
  84. package/dist/components/ui/theme/containerTheme.d.ts +29 -0
  85. package/dist/components/ui/theme/dividerTheme.d.ts +9 -0
  86. package/dist/components/ui/theme/gridTheme.d.ts +10 -0
  87. package/dist/components/ui/theme/layout/borderTheme.d.ts +9 -0
  88. package/dist/components/ui/theme/layout/directionTheme.d.ts +9 -0
  89. package/dist/components/ui/theme/layout/hideTheme.d.ts +9 -0
  90. package/dist/components/ui/theme/layout/itemsTheme.d.ts +9 -0
  91. package/dist/components/ui/theme/layout/justifyTheme.d.ts +9 -0
  92. package/dist/components/ui/theme/layout/positionTheme.d.ts +9 -0
  93. package/dist/components/ui/theme/layout/radiusTheme.d.ts +9 -0
  94. package/dist/components/ui/theme/layout/ringTheme.d.ts +9 -0
  95. package/dist/components/ui/theme/layout/shadowTheme.d.ts +9 -0
  96. package/dist/components/ui/theme/layout/wrapTheme.d.ts +9 -0
  97. package/dist/components/ui/theme/rowTheme.d.ts +15 -0
  98. package/dist/components/ui/theme/sectionTheme.d.ts +19 -0
  99. package/dist/components/ui/theme/size/breakpointTheme.d.ts +9 -0
  100. package/dist/components/ui/theme/size/gapTheme.d.ts +9 -0
  101. package/dist/components/ui/theme/size/pxTheme.d.ts +9 -0
  102. package/dist/components/ui/theme/size/pyTheme.d.ts +9 -0
  103. package/dist/components/ui/theme/size/sizeTheme.d.ts +9 -0
  104. package/dist/components/ui/theme/stackTheme.d.ts +19 -0
  105. package/dist/components/ui/theme/typography/fontFamilyTheme.d.ts +9 -0
  106. package/dist/components/ui/theme/typography/fontStyleTheme.d.ts +9 -0
  107. package/dist/components/ui/theme/typography/fontWeightTheme.d.ts +9 -0
  108. package/dist/components/ui/theme/typography/textAlignTheme.d.ts +9 -0
  109. package/dist/components/ui/theme/typography/textDecorationTheme.d.ts +9 -0
  110. package/dist/components/ui/theme/typography/textTransformTheme.d.ts +9 -0
  111. package/dist/components/ui/theme/typographyComponentTheme.d.ts +22 -0
  112. package/dist/components/ui/typography.d.ts +9 -9
  113. package/dist/components/utils/buildComponent.d.ts +8 -0
  114. package/dist/components/utils/componentUtils.d.ts +4 -0
  115. package/dist/components/utils/deepMerge.d.ts +4 -0
  116. package/dist/components/utils/deepPartial.d.ts +3 -0
  117. package/dist/components/utils/tests/deepMerge.test.d.ts +1 -0
  118. package/dist/index.d.ts +3 -1
  119. package/dist/index.esm.js +1891 -323
  120. package/dist/index.esm.js.map +1 -1
  121. package/dist/index.js +1894 -322
  122. package/dist/index.js.map +1 -1
  123. package/dist/ui.css +2019 -100
  124. package/package.json +26 -15
  125. package/dist/all.css +0 -813
  126. package/dist/components/ui/props/commonValues.d.ts +0 -45
  127. package/dist/components/ui/settings.d.ts +0 -30
  128. package/dist/components/utils/componentBuilder.d.ts +0 -23
@@ -0,0 +1,32 @@
1
+ import { BaseComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
2
+ import { ChipProps } from "../props/props";
3
+ import { SizeTheme } from "./size/sizeTheme";
4
+ import { GapTheme } from "./size/gapTheme";
5
+ import { RadiusTheme } from "./layout/radiusTheme";
6
+ import { ShadowTheme } from "./layout/shadowTheme";
7
+ import { BorderTheme } from "./layout/borderTheme";
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 ChipTheme<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
+ radius: RadiusTheme;
28
+ border: BorderTheme;
29
+ ring: RingTheme;
30
+ };
31
+ }
32
+ export declare const defaultChipTheme: ComponentTheme<ChipProps, ChipTheme<ChipProps>>;
@@ -0,0 +1,15 @@
1
+ import { DirectionTheme } from "./layout/directionTheme";
2
+ import { BaseComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
3
+ import { ColProps } from "../props/props";
4
+ import { GapTheme } from "./size/gapTheme";
5
+ import { WrapTheme } from "./layout/wrapTheme";
6
+ export interface ColTheme<P> extends BaseComponentTheme<P> {
7
+ size: {
8
+ gap: GapTheme;
9
+ };
10
+ layout: DefaultLayoutThemes<P> & {
11
+ wrap: WrapTheme;
12
+ direction: DirectionTheme;
13
+ };
14
+ }
15
+ export declare const defaultColTheme: ComponentTheme<ColProps, ColTheme<ColProps>>;
@@ -0,0 +1,44 @@
1
+ import React from "react";
2
+ import { BaseTheme } from "./baseTheme";
3
+ import { HideTheme } from "../layout/hideTheme";
4
+ import { ItemsTheme } from "../layout/itemsTheme";
5
+ import { JustifyTheme } from "../layout/justifyTheme";
6
+ import { PositionTheme } from "../layout/positionTheme";
7
+ import { FontFamilyTheme } from "../typography/fontFamilyTheme";
8
+ import { FontWeightTheme } from "../typography/fontWeightTheme";
9
+ import { FontStyleTheme } from "../typography/fontStyleTheme";
10
+ import { TextDecorationTheme } from "../typography/textDecorationTheme";
11
+ import { TextTransformTheme } from "../typography/textTransformTheme";
12
+ import { TextAlignTheme } from "../typography/textAlignTheme";
13
+ import { DeepPartial } from "../../../utils/deepPartial";
14
+ type ThemeNode<P> = BaseTheme | ThemeMap<P>;
15
+ export type ThemeMap<P> = {
16
+ [key: string]: ThemeNode<P>;
17
+ };
18
+ export interface DefaultLayoutThemes<P> {
19
+ hide: HideTheme;
20
+ items: ItemsTheme;
21
+ justify: JustifyTheme;
22
+ position: PositionTheme;
23
+ }
24
+ export interface DefaultTypographyThemes<P> {
25
+ fontFamily: FontFamilyTheme;
26
+ fontWeight: FontWeightTheme;
27
+ fontStyle: FontStyleTheme;
28
+ textDecoration: TextDecorationTheme;
29
+ textTransform: TextTransformTheme;
30
+ textAlign: TextAlignTheme;
31
+ }
32
+ export interface BaseComponentTheme<P> {
33
+ layout: DefaultLayoutThemes<P>;
34
+ typography: DefaultTypographyThemes<P>;
35
+ }
36
+ export declare class ComponentTheme<P extends object, TThemes extends object> {
37
+ readonly tag: React.ElementType;
38
+ readonly base: string;
39
+ readonly defaults: Partial<P>;
40
+ readonly themes: TThemes;
41
+ constructor(tag: React.ElementType, base: string, subThemes: DeepPartial<TThemes>, defaults?: Partial<P>);
42
+ getClasses(props: P, defaults?: Partial<P>): string[];
43
+ }
44
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Base Theme class that all theme types will extend
3
+ */
4
+ export declare abstract class BaseTheme {
5
+ /**
6
+ * Get CSS classes based on props
7
+ * @param props Component props (only the real props the user passed)
8
+ * @param defaults Component-level defaults
9
+ * @returns CSS classes as an array of strings
10
+ */
11
+ abstract getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
12
+ }
@@ -0,0 +1,29 @@
1
+ import { DirectionTheme } from "./layout/directionTheme";
2
+ import { BaseComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
3
+ import { ContainerProps } from "../props/props";
4
+ import { GapTheme } from "./size/gapTheme";
5
+ import { SizeTheme } from "./size/sizeTheme";
6
+ import { WrapTheme } from "./layout/wrapTheme";
7
+ import { BorderTheme } from "./layout/borderTheme";
8
+ import { RingTheme } from "./layout/ringTheme";
9
+ import { LayoutAppearanceTheme } from "./appearance/layoutAppearanceTheme";
10
+ import { TextAppearanceTheme } from "./appearance/textAppearanceTheme";
11
+ export interface ContainerTheme<P> extends BaseComponentTheme<P> {
12
+ size: {
13
+ gap: GapTheme;
14
+ maxWidth: SizeTheme;
15
+ };
16
+ layout: DefaultLayoutThemes<P> & {
17
+ wrap: WrapTheme;
18
+ direction: DirectionTheme;
19
+ border: BorderTheme;
20
+ ring: RingTheme;
21
+ };
22
+ appearance: {
23
+ background: LayoutAppearanceTheme;
24
+ text: TextAppearanceTheme;
25
+ border: TextAppearanceTheme;
26
+ ring: TextAppearanceTheme;
27
+ };
28
+ }
29
+ export declare const defaultContainerTheme: ComponentTheme<ContainerProps, ContainerTheme<ContainerProps>>;
@@ -0,0 +1,9 @@
1
+ import { BaseComponentTheme, ComponentTheme } from "./common/ComponentTheme";
2
+ import { DividerProps } from "../props/props";
3
+ import { TextAppearanceTheme } from "./appearance/textAppearanceTheme";
4
+ export interface DividerTheme<P> extends BaseComponentTheme<P> {
5
+ appearance: {
6
+ background: TextAppearanceTheme;
7
+ };
8
+ }
9
+ export declare const defaultDividerTheme: ComponentTheme<DividerProps, DividerTheme<DividerProps>>;
@@ -0,0 +1,10 @@
1
+ import { BaseComponentTheme, ComponentTheme } from "./common/ComponentTheme";
2
+ import { GridProps } from "../props/props";
3
+ import { GapTheme } from "./size/gapTheme";
4
+ export interface GridTheme<P> extends BaseComponentTheme<P> {
5
+ size: {
6
+ gap: GapTheme;
7
+ };
8
+ }
9
+ export declare const defaultGrid3Theme: ComponentTheme<GridProps, GridTheme<GridProps>>;
10
+ export declare const defaultGrid4Theme: ComponentTheme<GridProps, GridTheme<GridProps>>;
@@ -0,0 +1,9 @@
1
+ import { BaseTheme } from "../common/baseTheme";
2
+ import { ModeKey, BorderKey } from "../../props/keys";
3
+ export interface BorderTheme extends Record<BorderKey, Record<ModeKey, string>> {
4
+ }
5
+ export declare class BorderTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<BorderKey, Record<ModeKey, string>>;
7
+ constructor(initial?: Partial<Record<BorderKey, Record<ModeKey, string>>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { FlexDirectionKey } from "../../props/keys";
2
+ import { BaseTheme } from "../common/baseTheme";
3
+ export interface DirectionTheme extends Record<FlexDirectionKey, string> {
4
+ }
5
+ export declare class DirectionTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<FlexDirectionKey, string>;
7
+ constructor(initial?: Partial<Record<FlexDirectionKey, string>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { HideKey } from "../../props/keys";
2
+ import { BaseTheme } from "../common/baseTheme";
3
+ export interface HideTheme extends Record<HideKey, string> {
4
+ }
5
+ export declare class HideTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<HideKey, string>;
7
+ constructor(initialConfig?: Partial<Record<HideKey, string>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { ItemsKey } from "../../props/keys";
2
+ import { BaseTheme } from "../common/baseTheme";
3
+ export interface ItemsTheme extends Record<ItemsKey, string> {
4
+ }
5
+ export declare class ItemsTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<ItemsKey, string>;
7
+ constructor(initialConfig?: Partial<Record<ItemsKey, string>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { JustifyKey } from "../../props/keys";
2
+ import { BaseTheme } from "../common/baseTheme";
3
+ export interface JustifyTheme extends Record<JustifyKey, string> {
4
+ }
5
+ export declare class JustifyTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<JustifyKey, string>;
7
+ constructor(initialConfig?: Partial<Record<JustifyKey, string>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { PositionKey } from "../../props/keys";
2
+ import { BaseTheme } from "../common/baseTheme";
3
+ export interface PositionTheme extends Record<PositionKey, string> {
4
+ }
5
+ export declare class PositionTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<PositionKey, string>;
7
+ constructor(initialConfig?: Partial<Record<PositionKey, string>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { ShapeKey, SizeKey } from "../../props/keys";
2
+ import { BaseTheme } from "../common/baseTheme";
3
+ export interface RadiusTheme extends Record<ShapeKey, string | Record<SizeKey, string>> {
4
+ }
5
+ export declare class RadiusTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<ShapeKey, string | Record<SizeKey, string>>;
7
+ constructor(initial?: Partial<Record<ShapeKey, string | Record<SizeKey, string>>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { BaseTheme } from "../common/baseTheme";
2
+ import { ModeKey, RingKey } from "../../props/keys";
3
+ export interface RingTheme extends Record<RingKey, Record<ModeKey, string>> {
4
+ }
5
+ export declare class RingTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<RingKey, Record<ModeKey, string>>;
7
+ constructor(initial?: Partial<Record<RingKey, Record<ModeKey, string>>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { SizeKey, ModeKey, ShadowKey } from "../../props/keys";
2
+ import { BaseTheme } from "../common/baseTheme";
3
+ export interface ShadowTheme extends Record<ShadowKey, Record<ModeKey, string | Record<SizeKey, string>>> {
4
+ }
5
+ export declare class ShadowTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<ShadowKey, Record<ModeKey, string | Record<SizeKey, string>>>;
7
+ constructor(initial?: Partial<Record<ShadowKey, Record<ModeKey, string | Record<SizeKey, string>>>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { WrapKey } from "../../props/keys";
2
+ import { BaseTheme } from "../common/baseTheme";
3
+ export interface WrapTheme extends Record<WrapKey, string> {
4
+ }
5
+ export declare class WrapTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<WrapKey, string>;
7
+ constructor(initialConfig?: Partial<Record<WrapKey, string>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,15 @@
1
+ import { GapTheme } from "./size/gapTheme";
2
+ import { WrapTheme } from "./layout/wrapTheme";
3
+ import { BaseComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
4
+ import { RowProps } from "../props/props";
5
+ import { BreakpointTheme } from "./size/breakpointTheme";
6
+ export interface RowTheme<P> extends BaseComponentTheme<P> {
7
+ size: {
8
+ gap: GapTheme;
9
+ breakpoint: BreakpointTheme;
10
+ };
11
+ layout: DefaultLayoutThemes<P> & {
12
+ wrap: WrapTheme;
13
+ };
14
+ }
15
+ export declare const defaultRowTheme: ComponentTheme<RowProps, RowTheme<RowProps>>;
@@ -0,0 +1,19 @@
1
+ import { BaseComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
2
+ import { DirectionTheme } from "./layout/directionTheme";
3
+ import { GapTheme } from "./size/gapTheme";
4
+ import { WrapTheme } from "./layout/wrapTheme";
5
+ import { SectionProps } from "../props/props";
6
+ import { PxTheme } from "./size/pxTheme";
7
+ import { PyTheme } from "./size/pyTheme";
8
+ export interface SectionTheme<P> extends BaseComponentTheme<P> {
9
+ size: {
10
+ px: PxTheme;
11
+ py: PyTheme;
12
+ gap: GapTheme;
13
+ };
14
+ layout: DefaultLayoutThemes<P> & {
15
+ wrap: WrapTheme;
16
+ direction: DirectionTheme;
17
+ };
18
+ }
19
+ export declare const defaultSectionTheme: ComponentTheme<SectionProps, SectionTheme<SectionProps>>;
@@ -0,0 +1,9 @@
1
+ import { BaseTheme } from "../common/baseTheme";
2
+ import { BreakpointKey } from "../../props/keys";
3
+ export interface BreakpointTheme extends Record<BreakpointKey, string> {
4
+ }
5
+ export declare class BreakpointTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<BreakpointKey, string>;
7
+ constructor(initial?: Partial<Record<BreakpointKey, string>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { SizeKey, GapKey } from "../../props/keys";
2
+ import { BaseTheme } from "../common/baseTheme";
3
+ export interface GapTheme extends Record<GapKey, string | Record<SizeKey, string>> {
4
+ }
5
+ export declare class GapTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<GapKey, string | Record<SizeKey, string>>;
7
+ constructor(initial?: Partial<Record<GapKey, string | Record<SizeKey, string>>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { SizeKey, PaddingKey } from "../../props/keys";
2
+ import { BaseTheme } from "../common/baseTheme";
3
+ export interface PxTheme extends Record<PaddingKey, string | Record<SizeKey, string>> {
4
+ }
5
+ export declare class PxTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<PaddingKey, string | Record<SizeKey, string>>;
7
+ constructor(initial?: Partial<Record<PaddingKey, string | Record<SizeKey, string>>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { SizeKey, PaddingKey } from "../../props/keys";
2
+ import { BaseTheme } from "../common/baseTheme";
3
+ export interface PyTheme extends Record<PaddingKey, string | Record<SizeKey, string>> {
4
+ }
5
+ export declare class PyTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<PaddingKey, string | Record<SizeKey, string>>;
7
+ constructor(initial?: Partial<Record<PaddingKey, string | Record<SizeKey, string>>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { BaseTheme } from "../common/baseTheme";
2
+ import { SizeKey } from "../../props/keys";
3
+ export interface SizeTheme extends Record<SizeKey, string> {
4
+ }
5
+ export declare class SizeTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<SizeKey, string>;
7
+ constructor(initial?: Partial<Record<SizeKey, string>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,19 @@
1
+ import { DirectionTheme } from "./layout/directionTheme";
2
+ import { WrapTheme } from "./layout/wrapTheme";
3
+ import { BaseComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
4
+ import { StackProps } from "../props/props";
5
+ import { GapTheme } from "./size/gapTheme";
6
+ import { PxTheme } from "./size/pxTheme";
7
+ import { PyTheme } from "./size/pyTheme";
8
+ export interface StackTheme<P> extends BaseComponentTheme<P> {
9
+ size: {
10
+ px: PxTheme;
11
+ py: PyTheme;
12
+ gap: GapTheme;
13
+ };
14
+ layout: DefaultLayoutThemes<P> & {
15
+ wrap: WrapTheme;
16
+ direction: DirectionTheme;
17
+ };
18
+ }
19
+ export declare const defaultStackTheme: ComponentTheme<StackProps, StackTheme<StackProps>>;
@@ -0,0 +1,9 @@
1
+ import { FontFamilyKey } from "../../props/keys";
2
+ import { BaseTheme } from "../common/baseTheme";
3
+ export interface FontFamilyTheme extends Record<FontFamilyKey, string> {
4
+ }
5
+ export declare class FontFamilyTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<FontFamilyKey, string>;
7
+ constructor(initial?: Partial<Record<FontFamilyKey, string>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { FontStyleKey } from "../../props/keys";
2
+ import { BaseTheme } from "../common/baseTheme";
3
+ export interface FontStyleTheme extends Record<FontStyleKey, string> {
4
+ }
5
+ export declare class FontStyleTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<FontStyleKey, string>;
7
+ constructor(initial?: Partial<Record<FontStyleKey, string>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { FontWeightKey } from "../../props/keys";
2
+ import { BaseTheme } from "../common/baseTheme";
3
+ export interface FontWeightTheme extends Record<FontWeightKey, string> {
4
+ }
5
+ export declare class FontWeightTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<FontWeightKey, string>;
7
+ constructor(initial?: Partial<Record<FontWeightKey, string>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { TextAlignKey } from "../../props/keys";
2
+ import { BaseTheme } from "../common/baseTheme";
3
+ export interface TextAlignTheme extends Record<TextAlignKey, string> {
4
+ }
5
+ export declare class TextAlignTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<TextAlignKey, string>;
7
+ constructor(initial?: Partial<Record<TextAlignKey, string>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { TextDecorationKey } from "../../props/keys";
2
+ import { BaseTheme } from "../common/baseTheme";
3
+ export interface TextDecorationTheme extends Record<TextDecorationKey, string> {
4
+ }
5
+ export declare class TextDecorationTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<TextDecorationKey, string>;
7
+ constructor(initial?: Partial<Record<TextDecorationKey, string>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { TextTransformKey } from "../../props/keys";
2
+ import { BaseTheme } from "../common/baseTheme";
3
+ export interface TextTransformTheme extends Record<TextTransformKey, string> {
4
+ }
5
+ export declare class TextTransformTheme extends BaseTheme {
6
+ static readonly defaultClasses: Record<TextTransformKey, string>;
7
+ constructor(initial?: Partial<Record<TextTransformKey, string>>);
8
+ getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
9
+ }
@@ -0,0 +1,22 @@
1
+ import { SizeKey } from "../props/keys";
2
+ import { TypographyComponentProps } from "../props/props";
3
+ import React from "react";
4
+ import { BaseComponentTheme, ComponentTheme } from "./common/ComponentTheme";
5
+ import { SizeTheme } from "./size/sizeTheme";
6
+ import { TextAppearanceTheme } from "./appearance/textAppearanceTheme";
7
+ export interface TypographyComponentTheme<P> extends BaseComponentTheme<P> {
8
+ size: {
9
+ text: SizeTheme;
10
+ };
11
+ appearance: {
12
+ text: TextAppearanceTheme;
13
+ };
14
+ }
15
+ export declare const createTypographyComponentTheme: (tag: React.ReactNode | string | any, base?: string, textSizeMap?: Record<SizeKey, string>, defaults?: Partial<TypographyComponentProps>) => ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
16
+ export declare const pageTitleTheme: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
17
+ export declare const sectionTitleTheme: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
18
+ export declare const titleTheme: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
19
+ export declare const textTheme: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
20
+ export declare const linkTheme: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
21
+ export declare const listItemTheme: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
22
+ export declare const listTheme: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
@@ -1,9 +1,9 @@
1
- import React from 'react';
2
- import { TypographyComponentProps } from "./props/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>;
1
+ import { JSX } from 'react';
2
+ import { TypographyComponentProps } from './props/props';
3
+ export declare const PageTitle: (props: TypographyComponentProps) => JSX.Element;
4
+ export declare const SectionTitle: (props: TypographyComponentProps) => JSX.Element;
5
+ export declare const Title: (props: TypographyComponentProps) => JSX.Element;
6
+ export declare const Text: (props: TypographyComponentProps) => JSX.Element;
7
+ export declare const Link: (props: TypographyComponentProps) => JSX.Element;
8
+ export declare const ListItem: (props: TypographyComponentProps) => JSX.Element;
9
+ export declare const List: (props: TypographyComponentProps) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { ComponentTheme } from "../ui/theme/common/ComponentTheme";
3
+ import { TagProps } from "../ui/props/props";
4
+ export interface BuildableComponentProps extends TagProps {
5
+ className?: string;
6
+ children?: React.ReactNode;
7
+ }
8
+ export declare function buildComponent<P extends BuildableComponentProps, TThemes extends object>(props: P, theme: ComponentTheme<P, TThemes>, propsToOmit?: readonly string[]): React.ReactElement;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Pick the first truthy key from props, then from defaults, then fallback.
3
+ */
4
+ export declare function pickKey<P, K extends keyof P>(props: Partial<P>, defaults: Partial<P>, keys: readonly K[], fallback?: K): K | undefined;
@@ -0,0 +1,4 @@
1
+ import { DeepPartial } from "./deepPartial";
2
+ export declare const deepMerge: <T extends object>(target: T, source: DeepPartial<T>) => T;
3
+ export declare const deepClone: <T extends object>(source: T) => T;
4
+ export declare const mergeDefaults: (baseDefaults: Record<string, boolean>, overrideDefaults: Record<string, boolean>) => Record<string, boolean>;
@@ -0,0 +1,3 @@
1
+ export type DeepPartial<T> = {
2
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
3
+ };
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.d.ts CHANGED
@@ -2,5 +2,7 @@ export { Button } from "./components/ui/button";
2
2
  export { Badge } from "./components/ui/badge";
3
3
  export { Divider } from "./components/ui/divider";
4
4
  export { Chip } from "./components/ui/chip";
5
- export { Section, Container, Col, Row, Grid3, Grid4 } from "./components/ui/layout";
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, ThemeProps, ThemeProviderProps, PartialTheme } from './components/theme/themeContext';
8
+ export { ModeKey } from "./components/ui/props/keys";