@vaneui/ui 0.3.1-alpha.20250926201820.1b8c4ca → 0.3.1-alpha.20250927164620.fec55bc

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 (34) hide show
  1. package/dist/components/ui/classes/layoutClasses.d.ts +1 -8
  2. package/dist/components/ui/classes/layoutClasses.d.ts.map +1 -1
  3. package/dist/components/ui/theme/badgeTheme.d.ts.map +1 -1
  4. package/dist/components/ui/theme/buttonTheme.d.ts.map +1 -1
  5. package/dist/components/ui/theme/cardTheme.d.ts.map +1 -1
  6. package/dist/components/ui/theme/checkboxTheme.d.ts.map +1 -1
  7. package/dist/components/ui/theme/chipTheme.d.ts.map +1 -1
  8. package/dist/components/ui/theme/codeTheme.d.ts.map +1 -1
  9. package/dist/components/ui/theme/colTheme.d.ts.map +1 -1
  10. package/dist/components/ui/theme/common/ComponentTheme.d.ts +2 -0
  11. package/dist/components/ui/theme/common/ComponentTheme.d.ts.map +1 -1
  12. package/dist/components/ui/theme/containerTheme.d.ts.map +1 -1
  13. package/dist/components/ui/theme/gridTheme.d.ts.map +1 -1
  14. package/dist/components/ui/theme/inputTheme.d.ts.map +1 -1
  15. package/dist/components/ui/theme/layout/radiusTheme.d.ts +2 -1
  16. package/dist/components/ui/theme/layout/radiusTheme.d.ts.map +1 -1
  17. package/dist/components/ui/theme/rowTheme.d.ts.map +1 -1
  18. package/dist/components/ui/theme/sectionTheme.d.ts.map +1 -1
  19. package/dist/components/ui/theme/size/gapTheme.d.ts +7 -7
  20. package/dist/components/ui/theme/size/gapTheme.d.ts.map +1 -1
  21. package/dist/components/ui/theme/stackTheme.d.ts.map +1 -1
  22. package/dist/components/ui/theme/typography/lineHeightTheme.d.ts +21 -0
  23. package/dist/components/ui/theme/typography/lineHeightTheme.d.ts.map +1 -0
  24. package/dist/components/ui/theme/typographyTheme.d.ts +2 -1
  25. package/dist/components/ui/theme/typographyTheme.d.ts.map +1 -1
  26. package/dist/index.esm.js +171 -154
  27. package/dist/index.esm.js.map +1 -1
  28. package/dist/index.js +171 -154
  29. package/dist/index.js.map +1 -1
  30. package/dist/ui.css +35 -100
  31. package/dist/vars.css +3 -0
  32. package/package.json +1 -1
  33. package/dist/components/ui/classes/radiusClasses.d.ts +0 -4
  34. package/dist/components/ui/classes/radiusClasses.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -753,6 +753,64 @@ class TextAlignTheme extends BaseTheme {
753
753
  }
754
754
  }
755
755
 
756
+ class LineHeightTheme extends BaseTheme {
757
+ constructor(customMapping) {
758
+ super();
759
+ /** Extra-small line height - matches text-xs default line height */
760
+ this.xs = "[--lh-unit:1.333]"; // calc(1 / 0.75) ≈ 1.333
761
+ /** Small line height - matches text-sm default line height */
762
+ this.sm = "[--lh-unit:1.429]"; // calc(1.25 / 0.875) ≈ 1.429
763
+ /** Medium line height - matches text-base default line height */
764
+ this.md = "[--lh-unit:1.5]"; // calc(1.5 / 1) = 1.5
765
+ /** Large line height - matches text-lg default line height */
766
+ this.lg = "[--lh-unit:1.556]"; // calc(1.75 / 1.125) ≈ 1.556
767
+ /** Extra-large line height - matches text-xl default line height */
768
+ this.xl = "[--lh-unit:1.4]"; // calc(1.75 / 1.25) = 1.4
769
+ if (customMapping) {
770
+ this.xs = customMapping.xs || this.xs;
771
+ this.sm = customMapping.sm || this.sm;
772
+ this.md = customMapping.md || this.md;
773
+ this.lg = customMapping.lg || this.lg;
774
+ this.xl = customMapping.xl || this.xl;
775
+ }
776
+ }
777
+ getClasses(extractedKeys) {
778
+ if (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) {
779
+ const lhUnitClass = this[extractedKeys.size];
780
+ return lhUnitClass ? [lhUnitClass, "leading-(--lh)"] : [];
781
+ }
782
+ return [this.md, "leading-(--lh)"];
783
+ }
784
+ // Static factory methods for different text size ranges
785
+ static createForSectionTitle() {
786
+ return new LineHeightTheme({
787
+ xs: "[--lh-unit:1.333]", // text-2xl: calc(2 / 1.5) ≈ 1.333
788
+ sm: "[--lh-unit:1.2]", // text-3xl: calc(2.25 / 1.875) = 1.2
789
+ md: "[--lh-unit:1.111]", // text-4xl: calc(2.5 / 2.25) ≈ 1.111
790
+ lg: "[--lh-unit:1]", // text-5xl: 1
791
+ xl: "[--lh-unit:1]" // text-6xl+: 1
792
+ });
793
+ }
794
+ static createForPageTitle() {
795
+ return new LineHeightTheme({
796
+ xs: "[--lh-unit:1.2]", // text-3xl: calc(2.25 / 1.875) = 1.2
797
+ sm: "[--lh-unit:1.111]", // text-4xl: calc(2.5 / 2.25) ≈ 1.111
798
+ md: "[--lh-unit:1]", // text-5xl: 1
799
+ lg: "[--lh-unit:1]", // text-6xl: 1
800
+ xl: "[--lh-unit:1]" // text-7xl: 1
801
+ });
802
+ }
803
+ static createForTitle() {
804
+ return new LineHeightTheme({
805
+ xs: "[--lh-unit:1.556]", // text-lg: calc(1.75 / 1.125) ≈ 1.556
806
+ sm: "[--lh-unit:1.4]", // text-xl: calc(1.75 / 1.25) = 1.4
807
+ md: "[--lh-unit:1.333]", // text-2xl: calc(2 / 1.5) ≈ 1.333
808
+ lg: "[--lh-unit:1.2]", // text-3xl: calc(2.25 / 1.875) = 1.2
809
+ xl: "[--lh-unit:1.111]" // text-4xl: calc(2.5 / 2.25) ≈ 1.111
810
+ });
811
+ }
812
+ }
813
+
756
814
  class DisplayTheme extends BaseTheme {
757
815
  constructor() {
758
816
  super(...arguments);
@@ -3571,7 +3629,8 @@ const defaultTypographyThemes = {
3571
3629
  fontStyle: new FontStyleTheme(),
3572
3630
  textDecoration: new TextDecorationTheme(),
3573
3631
  textTransform: new TextTransformTheme(),
3574
- textAlign: new TextAlignTheme()
3632
+ textAlign: new TextAlignTheme(),
3633
+ lineHeight: new LineHeightTheme()
3575
3634
  };
3576
3635
  class ComponentTheme {
3577
3636
  constructor(tag, base, themes, defaults = {}, categories, tagFunction) {
@@ -3679,6 +3738,7 @@ class SizeTheme extends BaseTheme {
3679
3738
  }
3680
3739
  }
3681
3740
 
3741
+ // Reusable layout classes used by multiple components
3682
3742
  const layoutGapClasses = {
3683
3743
  xs: "[--gap-unit:2]",
3684
3744
  sm: "[--gap-unit:3]",
@@ -3693,14 +3753,7 @@ const layoutPaddingClasses = {
3693
3753
  lg: "[--py-unit:5]",
3694
3754
  xl: "[--py-unit:6]",
3695
3755
  };
3696
- const sectionAspectRatioClasses = {
3697
- xs: "[--aspect-ratio:2.5]",
3698
- sm: "[--aspect-ratio:2]",
3699
- md: "[--aspect-ratio:1.75]",
3700
- lg: "[--aspect-ratio:1.6]",
3701
- xl: "[--aspect-ratio:1.5]",
3702
- };
3703
- // UI component classes
3756
+ // Reusable UI component classes used by multiple components
3704
3757
  const uiPaddingClasses = {
3705
3758
  xs: "[--py-unit:1]",
3706
3759
  sm: "[--py-unit:1.5]",
@@ -3708,89 +3761,30 @@ const uiPaddingClasses = {
3708
3761
  lg: "[--py-unit:2.5]",
3709
3762
  xl: "[--py-unit:3]",
3710
3763
  };
3711
- // Button-specific aspect ratios (px-2,3,4,5,6 vs py-1,1.5,2,2.5,3)
3712
- const buttonAspectRatioClasses = {
3713
- xs: "[--aspect-ratio:2]", // px-2 vs py-1 = 2
3714
- sm: "[--aspect-ratio:2]", // px-3 vs py-1.5 = 2
3715
- md: "[--aspect-ratio:2]", // px-4 vs py-2 = 2
3716
- lg: "[--aspect-ratio:2]", // px-5 vs py-2.5 = 2
3717
- xl: "[--aspect-ratio:2]", // px-6 vs py-3 = 2
3718
- };
3719
- // Badge aspect ratios (same as button)
3720
- const badgeAspectRatioClasses = {
3721
- xs: "[--aspect-ratio:2]",
3722
- sm: "[--aspect-ratio:2]",
3723
- md: "[--aspect-ratio:2]",
3724
- lg: "[--aspect-ratio:2]",
3725
- xl: "[--aspect-ratio:2]",
3726
- };
3727
- // Input aspect ratios (same as button)
3728
- const inputAspectRatioClasses = {
3729
- xs: "[--aspect-ratio:2]",
3730
- sm: "[--aspect-ratio:2]",
3731
- md: "[--aspect-ratio:2]",
3732
- lg: "[--aspect-ratio:2]",
3733
- xl: "[--aspect-ratio:2]",
3734
- };
3735
- // Code-specific classes (px-1,1.5,1.5,2,2 vs py-0,0.5,1,1,1)
3736
- const codeAspectRatioClasses = {
3737
- xs: "[--aspect-ratio:1]", // px-1 vs py-0 (but py-0 is 0, so use py-unit but ratio for px)
3738
- sm: "[--aspect-ratio:3]", // px-1.5 vs py-0.5 = 3
3739
- md: "[--aspect-ratio:1.5]", // px-1.5 vs py-1 = 1.5
3740
- lg: "[--aspect-ratio:2]", // px-2 vs py-1 = 2
3741
- xl: "[--aspect-ratio:2]", // px-2 vs py-1 = 2
3742
- };
3743
- const codePyClasses = {
3744
- xs: "[--py-unit:0]",
3745
- sm: "[--py-unit:0.5]",
3746
- md: "[--py-unit:1]",
3747
- lg: "[--py-unit:1]",
3748
- xl: "[--py-unit:1]",
3749
- };
3750
- // Chip-specific classes (px-2,2.5,3,3.5,4 vs py-0.5,1,1.5,2,2.5)
3751
- const chipAspectRatioClasses = {
3752
- xs: "[--aspect-ratio:4]", // px-2 vs py-0.5 = 4
3753
- sm: "[--aspect-ratio:2.5]", // px-2.5 vs py-1 = 2.5
3754
- md: "[--aspect-ratio:2]", // px-3 vs py-1.5 = 2
3755
- lg: "[--aspect-ratio:1.75]", // px-3.5 vs py-2 = 1.75
3756
- xl: "[--aspect-ratio:1.6]", // px-4 vs py-2.5 = 1.6
3757
- };
3758
- const chipPyClasses = {
3759
- xs: "[--py-unit:0.5]",
3760
- sm: "[--py-unit:1]",
3761
- md: "[--py-unit:1.5]",
3762
- lg: "[--py-unit:2]",
3763
- xl: "[--py-unit:2.5]",
3764
+ const uiGapClasses = {
3765
+ xs: "[--gap-unit:1]",
3766
+ sm: "[--gap-unit:1.5]",
3767
+ md: "[--gap-unit:2]",
3768
+ lg: "[--gap-unit:2.5]",
3769
+ xl: "[--gap-unit:3]",
3764
3770
  };
3765
3771
 
3766
3772
  class GapTheme extends BaseTheme {
3767
- constructor(sizeMap, isUIComponent = false) {
3773
+ constructor(isUIComponent = false) {
3768
3774
  super();
3769
- /** Extra-small gap - uses CSS variable --layout-gap-xs */
3770
- this.xs = layoutGapClasses.xs;
3771
- /** Small gap - uses CSS variable --layout-gap-sm */
3772
- this.sm = layoutGapClasses.sm;
3773
- /** Medium gap - uses CSS variable --layout-gap-md */
3774
- this.md = layoutGapClasses.md;
3775
- /** Large gap - uses CSS variable --layout-gap-lg */
3776
- this.lg = layoutGapClasses.lg;
3777
- /** Extra-large gap - uses CSS variable --layout-gap-xl */
3778
- this.xl = layoutGapClasses.xl;
3779
- this.isUIComponent = isUIComponent;
3780
- if (sizeMap) {
3781
- ComponentKeys.size.forEach((key) => {
3782
- if (sizeMap[key] !== undefined) {
3783
- this[key] = sizeMap[key];
3784
- }
3785
- });
3786
- }
3775
+ this.gapVarClass = isUIComponent ? "gap-(--ui-gap)" : "gap-(--gap)";
3776
+ const gapClasses = isUIComponent ? uiGapClasses : layoutGapClasses;
3777
+ this.xs = gapClasses.xs;
3778
+ this.sm = gapClasses.sm;
3779
+ this.md = gapClasses.md;
3780
+ this.lg = gapClasses.lg;
3781
+ this.xl = gapClasses.xl;
3787
3782
  }
3788
3783
  getClasses(extractedKeys) {
3789
3784
  var _a;
3790
3785
  if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.gap) === 'gap') {
3791
3786
  const gapClass = this[(_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md'];
3792
- const gapVar = this.isUIComponent ? "gap-(--ui-gap)" : "gap-(--gap)";
3793
- return gapClass ? [gapClass, gapVar] : [];
3787
+ return gapClass ? [gapClass, this.gapVarClass] : [];
3794
3788
  }
3795
3789
  return [];
3796
3790
  }
@@ -3806,15 +3800,23 @@ class RadiusTheme extends BaseTheme {
3806
3800
  this.rounded = roundedClasses;
3807
3801
  this.isUIComponent = isUIComponent;
3808
3802
  }
3809
- static createUITheme(customRounded) {
3810
- const brUnitClasses = {
3803
+ static createCheckboxTheme() {
3804
+ return new RadiusTheme({
3805
+ xs: '[--br-unit:1]',
3806
+ sm: '[--br-unit:1.5]',
3807
+ md: '[--br-unit:2]',
3808
+ lg: '[--br-unit:2.5]',
3809
+ xl: '[--br-unit:3]'
3810
+ }, true);
3811
+ }
3812
+ static createUITheme() {
3813
+ return new RadiusTheme({
3811
3814
  xs: '[--br-unit:1]',
3812
3815
  sm: '[--br-unit:2]',
3813
3816
  md: '[--br-unit:3]',
3814
3817
  lg: '[--br-unit:4]',
3815
3818
  xl: '[--br-unit:5]'
3816
- };
3817
- return new RadiusTheme(customRounded || brUnitClasses, true);
3819
+ }, true);
3818
3820
  }
3819
3821
  static createLayoutTheme() {
3820
3822
  const brUnitClasses = {
@@ -4842,11 +4844,19 @@ const themeDefaults = {
4842
4844
  },
4843
4845
  };
4844
4846
 
4847
+ // Button-specific aspect ratios (px-2,3,4,5,6 vs py-1,1.5,2,2.5,3)
4848
+ const buttonAspectRatioClasses = {
4849
+ xs: "[--aspect-ratio:2]", // px-2 vs py-1 = 2
4850
+ sm: "[--aspect-ratio:2]", // px-3 vs py-1.5 = 2
4851
+ md: "[--aspect-ratio:2]", // px-4 vs py-2 = 2
4852
+ lg: "[--aspect-ratio:2]", // px-5 vs py-2.5 = 2
4853
+ xl: "[--aspect-ratio:2]", // px-6 vs py-3 = 2
4854
+ };
4845
4855
  const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-pointer transition-all duration-200 whitespace-nowrap", {
4846
4856
  size: {
4847
4857
  px: new PxTheme(buttonAspectRatioClasses, true),
4848
4858
  py: new PyTheme(uiPaddingClasses, true),
4849
- gap: new GapTheme({ xs: '[--gap-unit:1]', sm: '[--gap-unit:1.5]', md: '[--gap-unit:2]', lg: '[--gap-unit:2.5]', xl: '[--gap-unit:3]' }, true),
4859
+ gap: new GapTheme(true),
4850
4860
  text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' }),
4851
4861
  },
4852
4862
  appearance: {
@@ -4872,11 +4882,19 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
4872
4882
  return props.href ? "a" : "button";
4873
4883
  });
4874
4884
 
4885
+ // Badge aspect ratios (same as button)
4886
+ const badgeAspectRatioClasses = {
4887
+ xs: "[--aspect-ratio:2]",
4888
+ sm: "[--aspect-ratio:2]",
4889
+ md: "[--aspect-ratio:2]",
4890
+ lg: "[--aspect-ratio:2]",
4891
+ xl: "[--aspect-ratio:2]",
4892
+ };
4875
4893
  const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all duration-200 whitespace-nowrap", {
4876
4894
  size: {
4877
4895
  px: new PxTheme(badgeAspectRatioClasses, true),
4878
4896
  py: new PyTheme(uiPaddingClasses, true),
4879
- gap: new GapTheme({ xs: '[--gap-unit:1]', sm: '[--gap-unit:1.5]', md: '[--gap-unit:2]', lg: '[--gap-unit:2.5]', xl: '[--gap-unit:3]' }, true),
4897
+ gap: new GapTheme(true),
4880
4898
  text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' })
4881
4899
  },
4882
4900
  appearance: {
@@ -4901,12 +4919,26 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all
4901
4919
  return props.href ? "a" : "span";
4902
4920
  });
4903
4921
 
4922
+ const chipAspectRatioClasses = {
4923
+ xs: "[--aspect-ratio:2]",
4924
+ sm: "[--aspect-ratio:2]",
4925
+ md: "[--aspect-ratio:2]",
4926
+ lg: "[--aspect-ratio:2]",
4927
+ xl: "[--aspect-ratio:2]",
4928
+ };
4929
+ const chipPyClasses = {
4930
+ xs: "[--py-unit:0.5]",
4931
+ sm: "[--py-unit:1]",
4932
+ md: "[--py-unit:1.5]",
4933
+ lg: "[--py-unit:2]",
4934
+ xl: "[--py-unit:2.5]",
4935
+ };
4904
4936
  const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all duration-200 whitespace-nowrap", {
4905
4937
  size: {
4906
4938
  px: new PxTheme(chipAspectRatioClasses, true),
4907
4939
  py: new PyTheme(chipPyClasses, true),
4908
4940
  text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' }),
4909
- gap: new GapTheme({ xs: '[--gap-unit:1]', sm: '[--gap-unit:1.5]', md: '[--gap-unit:2]', lg: '[--gap-unit:2.5]', xl: '[--gap-unit:3]' }, true)
4941
+ gap: new GapTheme(true)
4910
4942
  },
4911
4943
  appearance: {
4912
4944
  background: GenericVariantTheme.createSimpleUIElementBgAppearanceTheme(),
@@ -4930,12 +4962,26 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all
4930
4962
  return props.href ? "a" : "span";
4931
4963
  });
4932
4964
 
4965
+ const codeAspectRatioClasses = {
4966
+ xs: "[--aspect-ratio:1.5]",
4967
+ sm: "[--aspect-ratio:1.5]",
4968
+ md: "[--aspect-ratio:1.5]",
4969
+ lg: "[--aspect-ratio:1.5]",
4970
+ xl: "[--aspect-ratio:1.5]",
4971
+ };
4972
+ const codePyClasses = {
4973
+ xs: "[--py-unit:0.5]",
4974
+ sm: "[--py-unit:0.5]",
4975
+ md: "[--py-unit:1]",
4976
+ lg: "[--py-unit:1]",
4977
+ xl: "[--py-unit:1]",
4978
+ };
4933
4979
  const defaultCodeTheme = new ComponentTheme("code", "", {
4934
4980
  size: {
4935
4981
  px: new PxTheme(codeAspectRatioClasses, true),
4936
4982
  py: new PyTheme(codePyClasses, true),
4937
4983
  text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-sm', lg: 'text-base', xl: 'text-lg' }),
4938
- gap: new GapTheme({ xs: '[--gap-unit:0.5]', sm: '[--gap-unit:1]', md: '[--gap-unit:1.5]', lg: '[--gap-unit:2]', xl: '[--gap-unit:2.5]' }, true)
4984
+ gap: new GapTheme(true)
4939
4985
  },
4940
4986
  appearance: {
4941
4987
  background: GenericVariantTheme.createSimpleUIElementBgAppearanceTheme(),
@@ -5067,7 +5113,10 @@ class ListStyleTheme extends BaseTheme {
5067
5113
  }
5068
5114
  }
5069
5115
 
5070
- const createTypographyComponentTheme = (tag, base = "text-balance", textSizeMap = textSizeClasses, defaults = {}) => {
5116
+ const createTypographyComponentTheme = (tag, base = "text-balance", textSizeMap = textSizeClasses, defaults = {}, lineHeightTheme) => {
5117
+ const typographyThemes = lineHeightTheme
5118
+ ? { ...defaultTypographyThemes, lineHeight: lineHeightTheme }
5119
+ : defaultTypographyThemes;
5071
5120
  return new ComponentTheme(tag, base, {
5072
5121
  size: {
5073
5122
  text: new SizeTheme(textSizeMap),
@@ -5075,7 +5124,7 @@ const createTypographyComponentTheme = (tag, base = "text-balance", textSizeMap
5075
5124
  appearance: {
5076
5125
  text: GenericVariantTheme.createTypographyTextTheme(),
5077
5126
  },
5078
- typography: defaultTypographyThemes,
5127
+ typography: typographyThemes,
5079
5128
  layout: defaultLayoutsThemes,
5080
5129
  }, defaults, TYPOGRAPHY_CATEGORIES, (props) => {
5081
5130
  // Determine tag based on href prop
@@ -5089,7 +5138,7 @@ const pageTitleTheme = createTypographyComponentTheme("h1", "text-balance tracki
5089
5138
  md: "text-5xl max-lg:text-4xl max-md:text-3xl",
5090
5139
  lg: "text-6xl max-lg:text-5xl max-md:text-4xl",
5091
5140
  xl: "text-7xl max-lg:text-6xl max-md:text-5xl"
5092
- }, mergeDefaults(themeDefaults.pageTitle, { semibold: true }));
5141
+ }, mergeDefaults(themeDefaults.pageTitle, { semibold: true }), LineHeightTheme.createForPageTitle());
5093
5142
  // Section title specific theme
5094
5143
  const sectionTitleTheme = createTypographyComponentTheme("h2", "text-balance w-fit", {
5095
5144
  xs: "text-2xl max-lg:text-xl max-md:text-lg",
@@ -5097,9 +5146,9 @@ const sectionTitleTheme = createTypographyComponentTheme("h2", "text-balance w-f
5097
5146
  md: "text-4xl max-lg:text-3xl max-md:text-2xl",
5098
5147
  lg: "text-5xl max-lg:text-4xl max-md:text-3xl",
5099
5148
  xl: "text-6xl max-lg:text-5xl max-md:text-4xl"
5100
- }, mergeDefaults(themeDefaults.sectionTitle, { semibold: true }));
5149
+ }, mergeDefaults(themeDefaults.sectionTitle, { semibold: true }), LineHeightTheme.createForSectionTitle());
5101
5150
  // Title specific theme
5102
- const titleTheme = createTypographyComponentTheme("h3", "text-balance w-fit", { xs: "text-lg", sm: "text-xl", md: "text-2xl", lg: "text-3xl", xl: "text-4xl" }, mergeDefaults(themeDefaults.title, { semibold: true }));
5151
+ const titleTheme = createTypographyComponentTheme("h3", "text-balance w-fit", { xs: "text-lg", sm: "text-xl", md: "text-2xl", lg: "text-3xl", xl: "text-4xl" }, mergeDefaults(themeDefaults.title, { semibold: true }), LineHeightTheme.createForTitle());
5103
5152
  // Text specific theme
5104
5153
  const textTheme = createTypographyComponentTheme("p", "p-0 m-0 w-fit", textSizeClasses, themeDefaults.text);
5105
5154
  // Link specific theme
@@ -5122,6 +5171,7 @@ const listItemTheme = new ComponentTheme("li", "", {
5122
5171
  text: GenericVariantTheme.createTypographyTextTheme(),
5123
5172
  },
5124
5173
  typography: defaultTypographyThemes,
5174
+ layout: defaultLayoutsThemes,
5125
5175
  }, themeDefaults.listItem, TYPOGRAPHY_CATEGORIES);
5126
5176
  // List specific theme
5127
5177
  const listTheme = new ComponentTheme("ul", "list-inside", {
@@ -5166,13 +5216,7 @@ const defaultCardTheme = new ComponentTheme("div", "", {
5166
5216
  size: {
5167
5217
  px: new PxTheme(),
5168
5218
  py: new PyTheme(),
5169
- gap: new GapTheme({
5170
- xs: "[--gap-unit:1]",
5171
- sm: "[--gap-unit:1.5]",
5172
- md: "[--gap-unit:2]",
5173
- lg: "[--gap-unit:2.5]",
5174
- xl: "[--gap-unit:3]",
5175
- }),
5219
+ gap: new GapTheme(true),
5176
5220
  },
5177
5221
  layout: {
5178
5222
  ...defaultLayoutsThemes,
@@ -5195,13 +5239,7 @@ const defaultCardTheme = new ComponentTheme("div", "", {
5195
5239
 
5196
5240
  const defaultRowTheme = new ComponentTheme("div", "", {
5197
5241
  size: {
5198
- gap: new GapTheme({
5199
- xs: "[--gap-unit:2]",
5200
- sm: "[--gap-unit:3]",
5201
- md: "[--gap-unit:4]",
5202
- lg: "[--gap-unit:5]",
5203
- xl: "[--gap-unit:6]",
5204
- }),
5242
+ gap: new GapTheme(),
5205
5243
  breakpoint: new BreakpointTheme(),
5206
5244
  },
5207
5245
  layout: {
@@ -5235,13 +5273,7 @@ const defaultDividerTheme = new ComponentTheme("div", "h-px w-full", {
5235
5273
 
5236
5274
  const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full", {
5237
5275
  size: {
5238
- gap: new GapTheme({
5239
- xs: "[--gap-unit:2]",
5240
- sm: "[--gap-unit:3]",
5241
- md: "[--gap-unit:4]",
5242
- lg: "[--gap-unit:5]",
5243
- xl: "[--gap-unit:6]",
5244
- }),
5276
+ gap: new GapTheme(),
5245
5277
  maxWidth: new SizeTheme({ xs: 'max-w-3xl', sm: 'max-w-4xl', md: 'max-w-5xl', lg: 'max-w-6xl', xl: 'max-w-7xl' }),
5246
5278
  },
5247
5279
  layout: {
@@ -5263,13 +5295,7 @@ const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full
5263
5295
 
5264
5296
  const defaultColTheme = new ComponentTheme("div", "", {
5265
5297
  size: {
5266
- gap: new GapTheme({
5267
- xs: "[--gap-unit:2]",
5268
- sm: "[--gap-unit:3]",
5269
- md: "[--gap-unit:4]",
5270
- lg: "[--gap-unit:5]",
5271
- xl: "[--gap-unit:6]",
5272
- }),
5298
+ gap: new GapTheme(),
5273
5299
  },
5274
5300
  layout: {
5275
5301
  ...defaultLayoutsThemes,
@@ -5292,13 +5318,7 @@ const defaultStackTheme = new ComponentTheme("div", "", {
5292
5318
  size: {
5293
5319
  px: new PxTheme(),
5294
5320
  py: new PyTheme(),
5295
- gap: new GapTheme({
5296
- xs: "[--gap-unit:2]",
5297
- sm: "[--gap-unit:3]",
5298
- md: "[--gap-unit:4]",
5299
- lg: "[--gap-unit:5]",
5300
- xl: "[--gap-unit:6]",
5301
- }),
5321
+ gap: new GapTheme(),
5302
5322
  breakpoint: new BreakpointTheme(),
5303
5323
  },
5304
5324
  layout: {
@@ -5318,6 +5338,13 @@ const defaultStackTheme = new ComponentTheme("div", "", {
5318
5338
  }
5319
5339
  }, themeDefaults.stack, STACK_CATEGORIES);
5320
5340
 
5341
+ const sectionAspectRatioClasses = {
5342
+ xs: "[--aspect-ratio:2.5]",
5343
+ sm: "[--aspect-ratio:2]",
5344
+ md: "[--aspect-ratio:1.75]",
5345
+ lg: "[--aspect-ratio:1.6]",
5346
+ xl: "[--aspect-ratio:1.5]",
5347
+ };
5321
5348
  const defaultSectionTheme = new ComponentTheme("div", "w-full", {
5322
5349
  size: {
5323
5350
  px: new PxTheme(sectionAspectRatioClasses),
@@ -5328,13 +5355,7 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full", {
5328
5355
  lg: "[--py-unit:16]",
5329
5356
  xl: "[--py-unit:20]",
5330
5357
  }),
5331
- gap: new GapTheme({
5332
- xs: "[--gap-unit:2]",
5333
- sm: "[--gap-unit:3]",
5334
- md: "[--gap-unit:4]",
5335
- lg: "[--gap-unit:5]",
5336
- xl: "[--gap-unit:6]",
5337
- }),
5358
+ gap: new GapTheme(),
5338
5359
  breakpoint: new BreakpointTheme(),
5339
5360
  },
5340
5361
  appearance: {
@@ -5356,13 +5377,7 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full", {
5356
5377
 
5357
5378
  const gridSubThemes = {
5358
5379
  size: {
5359
- gap: new GapTheme({
5360
- xs: "[--gap-unit:2]",
5361
- sm: "[--gap-unit:3]",
5362
- md: "[--gap-unit:4]",
5363
- lg: "[--gap-unit:5]",
5364
- xl: "[--gap-unit:6]",
5365
- }),
5380
+ gap: new GapTheme(),
5366
5381
  },
5367
5382
  appearance: {
5368
5383
  background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
@@ -5397,13 +5412,7 @@ const defaultCheckboxTheme = new ComponentTheme("input", "peer col-start-1 row-s
5397
5412
  border: new BorderTheme(),
5398
5413
  ring: new RingTheme(),
5399
5414
  focusVisible: new FocusVisibleTheme(),
5400
- radius: RadiusTheme.createUITheme({
5401
- xs: 'rounded-(--ui-br-xs)',
5402
- sm: 'rounded-(--ui-br-xs)',
5403
- md: 'rounded-(--ui-br-sm)',
5404
- lg: 'rounded-(--ui-br-sm)',
5405
- xl: 'rounded-(--ui-br-md)'
5406
- }),
5415
+ radius: RadiusTheme.createCheckboxTheme(),
5407
5416
  },
5408
5417
  appearance: {
5409
5418
  accent: GenericVariantTheme.createAccentColorAppearanceTheme(),
@@ -5449,7 +5458,7 @@ const defaultCheckboxWrapperTheme = new ComponentTheme("span", "", {
5449
5458
  const defaultLabelTheme = new ComponentTheme("label", "has-[input]:cursor-pointer cursor-default", {
5450
5459
  size: {
5451
5460
  text: new SizeTheme(textSizeClasses),
5452
- gap: new GapTheme({ xs: '[--gap-unit:1.5]', sm: '[--gap-unit:2]', md: '[--gap-unit:2.5]', lg: '[--gap-unit:3]', xl: '[--gap-unit:3]' }, true),
5461
+ gap: new GapTheme(true),
5453
5462
  },
5454
5463
  appearance: {
5455
5464
  text: GenericVariantTheme.createTypographyTextTheme(),
@@ -5480,11 +5489,19 @@ const defaultImgTheme = new ComponentTheme("img", "object-cover", // Default to
5480
5489
  }
5481
5490
  }, themeDefaults.img, IMG_CATEGORIES);
5482
5491
 
5492
+ // Input aspect ratios (same as button)
5493
+ const inputAspectRatioClasses = {
5494
+ xs: "[--aspect-ratio:2]",
5495
+ sm: "[--aspect-ratio:2]",
5496
+ md: "[--aspect-ratio:2]",
5497
+ lg: "[--aspect-ratio:2]",
5498
+ xl: "[--aspect-ratio:2]",
5499
+ };
5483
5500
  const defaultInputTheme = new ComponentTheme("input", "w-full transition-all duration-200", {
5484
5501
  size: {
5485
5502
  px: new PxTheme(inputAspectRatioClasses, true),
5486
5503
  py: new PyTheme(uiPaddingClasses, true),
5487
- gap: new GapTheme({ xs: '[--gap-unit:1]', sm: '[--gap-unit:1.5]', md: '[--gap-unit:2]', lg: '[--gap-unit:2.5]', xl: '[--gap-unit:3]' }, true),
5504
+ gap: new GapTheme(true),
5488
5505
  text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' }),
5489
5506
  },
5490
5507
  appearance: {