@vaneui/ui 0.3.1-alpha.20250925201320.8b6a424 → 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 (36) 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 +3 -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/size/pxTheme.d.ts +1 -1
  22. package/dist/components/ui/theme/size/pxTheme.d.ts.map +1 -1
  23. package/dist/components/ui/theme/stackTheme.d.ts.map +1 -1
  24. package/dist/components/ui/theme/typography/lineHeightTheme.d.ts +21 -0
  25. package/dist/components/ui/theme/typography/lineHeightTheme.d.ts.map +1 -0
  26. package/dist/components/ui/theme/typographyTheme.d.ts +2 -1
  27. package/dist/components/ui/theme/typographyTheme.d.ts.map +1 -1
  28. package/dist/index.esm.js +201 -189
  29. package/dist/index.esm.js.map +1 -1
  30. package/dist/index.js +201 -189
  31. package/dist/index.js.map +1 -1
  32. package/dist/ui.css +64 -109
  33. package/dist/vars.css +11 -1
  34. package/package.json +1 -1
  35. package/dist/components/ui/classes/radiusClasses.d.ts +0 -4
  36. 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,123 +3761,72 @@ 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
  }
3797
3791
  }
3798
3792
 
3799
- const uiBorderRadiusClasses = {
3800
- xs: "rounded-(--ui-br-xs)",
3801
- sm: "rounded-(--ui-br-sm)",
3802
- md: "rounded-(--ui-br-md)",
3803
- lg: "rounded-(--ui-br-lg)",
3804
- xl: "rounded-(--ui-br-xl)",
3805
- };
3806
- const layoutBorderRadiusClasses = {
3807
- xs: "rounded-(--layout-br-xs)",
3808
- sm: "rounded-(--layout-br-sm)",
3809
- md: "rounded-(--layout-br-md)",
3810
- lg: "rounded-(--layout-br-lg)",
3811
- xl: "rounded-(--layout-br-xl)",
3812
- };
3813
-
3814
3793
  class RadiusTheme extends BaseTheme {
3815
- constructor(roundedClasses) {
3794
+ constructor(roundedClasses, isUIComponent = false) {
3816
3795
  super();
3817
3796
  /** Pill shape - fully rounded corners */
3818
3797
  this.pill = "rounded-full";
3819
3798
  /** Sharp shape - no rounded corners */
3820
3799
  this.sharp = "rounded-none";
3821
3800
  this.rounded = roundedClasses;
3801
+ this.isUIComponent = isUIComponent;
3822
3802
  }
3823
- static createUITheme(customRounded) {
3824
- return new RadiusTheme(customRounded || uiBorderRadiusClasses);
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({
3814
+ xs: '[--br-unit:1]',
3815
+ sm: '[--br-unit:2]',
3816
+ md: '[--br-unit:3]',
3817
+ lg: '[--br-unit:4]',
3818
+ xl: '[--br-unit:5]'
3819
+ }, true);
3825
3820
  }
3826
3821
  static createLayoutTheme() {
3827
- return new RadiusTheme(layoutBorderRadiusClasses);
3822
+ const brUnitClasses = {
3823
+ xs: '[--br-unit:3]',
3824
+ sm: '[--br-unit:4]',
3825
+ md: '[--br-unit:5]',
3826
+ lg: '[--br-unit:6]',
3827
+ xl: '[--br-unit:7]'
3828
+ };
3829
+ return new RadiusTheme(brUnitClasses, false);
3828
3830
  }
3829
3831
  getClasses(extractedKeys) {
3830
3832
  var _a, _b;
@@ -3836,8 +3838,9 @@ class RadiusTheme extends BaseTheme {
3836
3838
  case 'sharp':
3837
3839
  return [this.sharp];
3838
3840
  case 'rounded': {
3839
- const roundedClass = this.rounded[size];
3840
- return roundedClass ? [roundedClass] : [];
3841
+ const brUnitClass = this.rounded[size];
3842
+ const roundedVar = this.isUIComponent ? "rounded-(--ui-br)" : "rounded-(--br)";
3843
+ return brUnitClass ? [brUnitClass, roundedVar] : [];
3841
3844
  }
3842
3845
  default:
3843
3846
  return [];
@@ -3954,32 +3957,26 @@ class PaddingTheme extends BaseTheme {
3954
3957
 
3955
3958
  /** Horizontal padding theme - controls left and right padding */
3956
3959
  class PxTheme extends PaddingTheme {
3957
- constructor(sizeMap, aspectRatioMap, isUIComponent = false) {
3958
- super(sizeMap);
3960
+ constructor(aspectRatioMap, isUIComponent = false) {
3961
+ super();
3959
3962
  this.aspectRatioMap = aspectRatioMap;
3960
3963
  this.isUIComponent = isUIComponent;
3961
- // Override with PxTheme's default classes if no custom sizeMap provided
3962
- if (!sizeMap) {
3963
- ComponentKeys.size.forEach((key) => {
3964
- this[key] = layoutPaddingClasses[key];
3965
- });
3966
- }
3964
+ // PxTheme should not set any padding classes - that's PyTheme's job
3965
+ // PxTheme only handles aspect-ratio
3967
3966
  }
3968
3967
  getClasses(extractedKeys) {
3969
3968
  var _a, _b;
3970
3969
  if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === 'padding' || (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === undefined) {
3971
3970
  const size = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md';
3972
- const paddingClass = this[size];
3973
3971
  const aspectRatioClass = (_b = this.aspectRatioMap) === null || _b === void 0 ? void 0 : _b[size];
3974
3972
  const classes = [];
3975
- if (paddingClass)
3976
- classes.push(paddingClass);
3973
+ // Only add aspect-ratio class - no padding classes
3977
3974
  if (aspectRatioClass)
3978
3975
  classes.push(aspectRatioClass);
3979
3976
  // Use UI or layout CSS variables based on component type
3980
3977
  const cssVar = this.isUIComponent ? "px-(--ui-px)" : "px-(--px)";
3981
3978
  classes.push(cssVar);
3982
- return classes.length > 1 ? classes : [];
3979
+ return classes;
3983
3980
  }
3984
3981
  return [];
3985
3982
  }
@@ -4847,11 +4844,19 @@ const themeDefaults = {
4847
4844
  },
4848
4845
  };
4849
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
+ };
4850
4855
  const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-pointer transition-all duration-200 whitespace-nowrap", {
4851
4856
  size: {
4852
- px: new PxTheme(uiPaddingClasses, buttonAspectRatioClasses, true),
4857
+ px: new PxTheme(buttonAspectRatioClasses, true),
4853
4858
  py: new PyTheme(uiPaddingClasses, true),
4854
- 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),
4855
4860
  text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' }),
4856
4861
  },
4857
4862
  appearance: {
@@ -4877,11 +4882,19 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
4877
4882
  return props.href ? "a" : "button";
4878
4883
  });
4879
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
+ };
4880
4893
  const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all duration-200 whitespace-nowrap", {
4881
4894
  size: {
4882
- px: new PxTheme(uiPaddingClasses, badgeAspectRatioClasses, true),
4895
+ px: new PxTheme(badgeAspectRatioClasses, true),
4883
4896
  py: new PyTheme(uiPaddingClasses, true),
4884
- 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),
4885
4898
  text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' })
4886
4899
  },
4887
4900
  appearance: {
@@ -4906,12 +4919,26 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all
4906
4919
  return props.href ? "a" : "span";
4907
4920
  });
4908
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
+ };
4909
4936
  const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all duration-200 whitespace-nowrap", {
4910
4937
  size: {
4911
- px: new PxTheme(chipPyClasses, chipAspectRatioClasses, true),
4938
+ px: new PxTheme(chipAspectRatioClasses, true),
4912
4939
  py: new PyTheme(chipPyClasses, true),
4913
4940
  text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' }),
4914
- 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)
4915
4942
  },
4916
4943
  appearance: {
4917
4944
  background: GenericVariantTheme.createSimpleUIElementBgAppearanceTheme(),
@@ -4935,12 +4962,26 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all
4935
4962
  return props.href ? "a" : "span";
4936
4963
  });
4937
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
+ };
4938
4979
  const defaultCodeTheme = new ComponentTheme("code", "", {
4939
4980
  size: {
4940
- px: new PxTheme(codePyClasses, codeAspectRatioClasses, true),
4981
+ px: new PxTheme(codeAspectRatioClasses, true),
4941
4982
  py: new PyTheme(codePyClasses, true),
4942
4983
  text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-sm', lg: 'text-base', xl: 'text-lg' }),
4943
- 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)
4944
4985
  },
4945
4986
  appearance: {
4946
4987
  background: GenericVariantTheme.createSimpleUIElementBgAppearanceTheme(),
@@ -5072,7 +5113,10 @@ class ListStyleTheme extends BaseTheme {
5072
5113
  }
5073
5114
  }
5074
5115
 
5075
- 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;
5076
5120
  return new ComponentTheme(tag, base, {
5077
5121
  size: {
5078
5122
  text: new SizeTheme(textSizeMap),
@@ -5080,7 +5124,7 @@ const createTypographyComponentTheme = (tag, base = "text-balance", textSizeMap
5080
5124
  appearance: {
5081
5125
  text: GenericVariantTheme.createTypographyTextTheme(),
5082
5126
  },
5083
- typography: defaultTypographyThemes,
5127
+ typography: typographyThemes,
5084
5128
  layout: defaultLayoutsThemes,
5085
5129
  }, defaults, TYPOGRAPHY_CATEGORIES, (props) => {
5086
5130
  // Determine tag based on href prop
@@ -5094,7 +5138,7 @@ const pageTitleTheme = createTypographyComponentTheme("h1", "text-balance tracki
5094
5138
  md: "text-5xl max-lg:text-4xl max-md:text-3xl",
5095
5139
  lg: "text-6xl max-lg:text-5xl max-md:text-4xl",
5096
5140
  xl: "text-7xl max-lg:text-6xl max-md:text-5xl"
5097
- }, mergeDefaults(themeDefaults.pageTitle, { semibold: true }));
5141
+ }, mergeDefaults(themeDefaults.pageTitle, { semibold: true }), LineHeightTheme.createForPageTitle());
5098
5142
  // Section title specific theme
5099
5143
  const sectionTitleTheme = createTypographyComponentTheme("h2", "text-balance w-fit", {
5100
5144
  xs: "text-2xl max-lg:text-xl max-md:text-lg",
@@ -5102,9 +5146,9 @@ const sectionTitleTheme = createTypographyComponentTheme("h2", "text-balance w-f
5102
5146
  md: "text-4xl max-lg:text-3xl max-md:text-2xl",
5103
5147
  lg: "text-5xl max-lg:text-4xl max-md:text-3xl",
5104
5148
  xl: "text-6xl max-lg:text-5xl max-md:text-4xl"
5105
- }, mergeDefaults(themeDefaults.sectionTitle, { semibold: true }));
5149
+ }, mergeDefaults(themeDefaults.sectionTitle, { semibold: true }), LineHeightTheme.createForSectionTitle());
5106
5150
  // Title specific theme
5107
- 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());
5108
5152
  // Text specific theme
5109
5153
  const textTheme = createTypographyComponentTheme("p", "p-0 m-0 w-fit", textSizeClasses, themeDefaults.text);
5110
5154
  // Link specific theme
@@ -5127,6 +5171,7 @@ const listItemTheme = new ComponentTheme("li", "", {
5127
5171
  text: GenericVariantTheme.createTypographyTextTheme(),
5128
5172
  },
5129
5173
  typography: defaultTypographyThemes,
5174
+ layout: defaultLayoutsThemes,
5130
5175
  }, themeDefaults.listItem, TYPOGRAPHY_CATEGORIES);
5131
5176
  // List specific theme
5132
5177
  const listTheme = new ComponentTheme("ul", "list-inside", {
@@ -5171,13 +5216,7 @@ const defaultCardTheme = new ComponentTheme("div", "", {
5171
5216
  size: {
5172
5217
  px: new PxTheme(),
5173
5218
  py: new PyTheme(),
5174
- gap: new GapTheme({
5175
- xs: "[--gap-unit:1]",
5176
- sm: "[--gap-unit:1.5]",
5177
- md: "[--gap-unit:2]",
5178
- lg: "[--gap-unit:2.5]",
5179
- xl: "[--gap-unit:3]",
5180
- }),
5219
+ gap: new GapTheme(true),
5181
5220
  },
5182
5221
  layout: {
5183
5222
  ...defaultLayoutsThemes,
@@ -5200,13 +5239,7 @@ const defaultCardTheme = new ComponentTheme("div", "", {
5200
5239
 
5201
5240
  const defaultRowTheme = new ComponentTheme("div", "", {
5202
5241
  size: {
5203
- gap: new GapTheme({
5204
- xs: "[--gap-unit:2]",
5205
- sm: "[--gap-unit:3]",
5206
- md: "[--gap-unit:4]",
5207
- lg: "[--gap-unit:5]",
5208
- xl: "[--gap-unit:6]",
5209
- }),
5242
+ gap: new GapTheme(),
5210
5243
  breakpoint: new BreakpointTheme(),
5211
5244
  },
5212
5245
  layout: {
@@ -5240,13 +5273,7 @@ const defaultDividerTheme = new ComponentTheme("div", "h-px w-full", {
5240
5273
 
5241
5274
  const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full", {
5242
5275
  size: {
5243
- gap: new GapTheme({
5244
- xs: "[--gap-unit:2]",
5245
- sm: "[--gap-unit:3]",
5246
- md: "[--gap-unit:4]",
5247
- lg: "[--gap-unit:5]",
5248
- xl: "[--gap-unit:6]",
5249
- }),
5276
+ gap: new GapTheme(),
5250
5277
  maxWidth: new SizeTheme({ xs: 'max-w-3xl', sm: 'max-w-4xl', md: 'max-w-5xl', lg: 'max-w-6xl', xl: 'max-w-7xl' }),
5251
5278
  },
5252
5279
  layout: {
@@ -5268,13 +5295,7 @@ const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full
5268
5295
 
5269
5296
  const defaultColTheme = new ComponentTheme("div", "", {
5270
5297
  size: {
5271
- gap: new GapTheme({
5272
- xs: "[--gap-unit:2]",
5273
- sm: "[--gap-unit:3]",
5274
- md: "[--gap-unit:4]",
5275
- lg: "[--gap-unit:5]",
5276
- xl: "[--gap-unit:6]",
5277
- }),
5298
+ gap: new GapTheme(),
5278
5299
  },
5279
5300
  layout: {
5280
5301
  ...defaultLayoutsThemes,
@@ -5297,13 +5318,7 @@ const defaultStackTheme = new ComponentTheme("div", "", {
5297
5318
  size: {
5298
5319
  px: new PxTheme(),
5299
5320
  py: new PyTheme(),
5300
- gap: new GapTheme({
5301
- xs: "[--gap-unit:2]",
5302
- sm: "[--gap-unit:3]",
5303
- md: "[--gap-unit:4]",
5304
- lg: "[--gap-unit:5]",
5305
- xl: "[--gap-unit:6]",
5306
- }),
5321
+ gap: new GapTheme(),
5307
5322
  breakpoint: new BreakpointTheme(),
5308
5323
  },
5309
5324
  layout: {
@@ -5323,9 +5338,16 @@ const defaultStackTheme = new ComponentTheme("div", "", {
5323
5338
  }
5324
5339
  }, themeDefaults.stack, STACK_CATEGORIES);
5325
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
+ };
5326
5348
  const defaultSectionTheme = new ComponentTheme("div", "w-full", {
5327
5349
  size: {
5328
- px: new PxTheme(layoutPaddingClasses, sectionAspectRatioClasses),
5350
+ px: new PxTheme(sectionAspectRatioClasses),
5329
5351
  py: new PyTheme({
5330
5352
  xs: "[--py-unit:4]",
5331
5353
  sm: "[--py-unit:8]",
@@ -5333,13 +5355,7 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full", {
5333
5355
  lg: "[--py-unit:16]",
5334
5356
  xl: "[--py-unit:20]",
5335
5357
  }),
5336
- gap: new GapTheme({
5337
- xs: "[--gap-unit:2]",
5338
- sm: "[--gap-unit:3]",
5339
- md: "[--gap-unit:4]",
5340
- lg: "[--gap-unit:5]",
5341
- xl: "[--gap-unit:6]",
5342
- }),
5358
+ gap: new GapTheme(),
5343
5359
  breakpoint: new BreakpointTheme(),
5344
5360
  },
5345
5361
  appearance: {
@@ -5361,13 +5377,7 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full", {
5361
5377
 
5362
5378
  const gridSubThemes = {
5363
5379
  size: {
5364
- gap: new GapTheme({
5365
- xs: "[--gap-unit:2]",
5366
- sm: "[--gap-unit:3]",
5367
- md: "[--gap-unit:4]",
5368
- lg: "[--gap-unit:5]",
5369
- xl: "[--gap-unit:6]",
5370
- }),
5380
+ gap: new GapTheme(),
5371
5381
  },
5372
5382
  appearance: {
5373
5383
  background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
@@ -5402,13 +5412,7 @@ const defaultCheckboxTheme = new ComponentTheme("input", "peer col-start-1 row-s
5402
5412
  border: new BorderTheme(),
5403
5413
  ring: new RingTheme(),
5404
5414
  focusVisible: new FocusVisibleTheme(),
5405
- radius: RadiusTheme.createUITheme({
5406
- xs: 'rounded-(--ui-br-xs)',
5407
- sm: 'rounded-(--ui-br-xs)',
5408
- md: 'rounded-(--ui-br-sm)',
5409
- lg: 'rounded-(--ui-br-sm)',
5410
- xl: 'rounded-(--ui-br-md)'
5411
- }),
5415
+ radius: RadiusTheme.createCheckboxTheme(),
5412
5416
  },
5413
5417
  appearance: {
5414
5418
  accent: GenericVariantTheme.createAccentColorAppearanceTheme(),
@@ -5454,7 +5458,7 @@ const defaultCheckboxWrapperTheme = new ComponentTheme("span", "", {
5454
5458
  const defaultLabelTheme = new ComponentTheme("label", "has-[input]:cursor-pointer cursor-default", {
5455
5459
  size: {
5456
5460
  text: new SizeTheme(textSizeClasses),
5457
- gap: new GapTheme({ xs: 'gap-1.5', sm: 'gap-2', md: 'gap-2.5', lg: 'gap-3', xl: 'gap-3' }),
5461
+ gap: new GapTheme(true),
5458
5462
  },
5459
5463
  appearance: {
5460
5464
  text: GenericVariantTheme.createTypographyTextTheme(),
@@ -5485,11 +5489,19 @@ const defaultImgTheme = new ComponentTheme("img", "object-cover", // Default to
5485
5489
  }
5486
5490
  }, themeDefaults.img, IMG_CATEGORIES);
5487
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
+ };
5488
5500
  const defaultInputTheme = new ComponentTheme("input", "w-full transition-all duration-200", {
5489
5501
  size: {
5490
- px: new PxTheme(uiPaddingClasses, inputAspectRatioClasses, true),
5502
+ px: new PxTheme(inputAspectRatioClasses, true),
5491
5503
  py: new PyTheme(uiPaddingClasses, true),
5492
- 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),
5493
5505
  text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' }),
5494
5506
  },
5495
5507
  appearance: {