@vaneui/ui 0.3.1-alpha.20250930162311.b66aed0 → 0.3.1-alpha.20251001131502.03a0ce2

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 (37) hide show
  1. package/dist/components/ui/theme/badgeTheme.d.ts +4 -2
  2. package/dist/components/ui/theme/badgeTheme.d.ts.map +1 -1
  3. package/dist/components/ui/theme/buttonTheme.d.ts +4 -2
  4. package/dist/components/ui/theme/buttonTheme.d.ts.map +1 -1
  5. package/dist/components/ui/theme/cardTheme.d.ts +2 -0
  6. package/dist/components/ui/theme/cardTheme.d.ts.map +1 -1
  7. package/dist/components/ui/theme/checkboxTheme.d.ts +2 -1
  8. package/dist/components/ui/theme/checkboxTheme.d.ts.map +1 -1
  9. package/dist/components/ui/theme/chipTheme.d.ts +4 -2
  10. package/dist/components/ui/theme/chipTheme.d.ts.map +1 -1
  11. package/dist/components/ui/theme/codeTheme.d.ts +4 -2
  12. package/dist/components/ui/theme/codeTheme.d.ts.map +1 -1
  13. package/dist/components/ui/theme/common/ComponentTheme.d.ts +0 -2
  14. package/dist/components/ui/theme/common/ComponentTheme.d.ts.map +1 -1
  15. package/dist/components/ui/theme/inputTheme.d.ts +4 -2
  16. package/dist/components/ui/theme/inputTheme.d.ts.map +1 -1
  17. package/dist/components/ui/theme/labelTheme.d.ts +4 -2
  18. package/dist/components/ui/theme/labelTheme.d.ts.map +1 -1
  19. package/dist/components/ui/theme/sectionTheme.d.ts.map +1 -1
  20. package/dist/components/ui/theme/size/fontSizeTheme.d.ts +21 -0
  21. package/dist/components/ui/theme/size/fontSizeTheme.d.ts.map +1 -0
  22. package/dist/components/ui/theme/{typography → size}/lineHeightTheme.d.ts +1 -0
  23. package/dist/components/ui/theme/size/lineHeightTheme.d.ts.map +1 -0
  24. package/dist/components/ui/theme/size/pxTheme.d.ts +1 -1
  25. package/dist/components/ui/theme/size/pxTheme.d.ts.map +1 -1
  26. package/dist/components/ui/theme/size/sizeTheme.d.ts +1 -2
  27. package/dist/components/ui/theme/size/sizeTheme.d.ts.map +1 -1
  28. package/dist/components/ui/theme/typographyTheme.d.ts +6 -6
  29. package/dist/components/ui/theme/typographyTheme.d.ts.map +1 -1
  30. package/dist/index.esm.js +190 -143
  31. package/dist/index.esm.js.map +1 -1
  32. package/dist/index.js +190 -143
  33. package/dist/index.js.map +1 -1
  34. package/dist/ui.css +62 -75
  35. package/dist/vars.css +12 -4
  36. package/package.json +1 -1
  37. package/dist/components/ui/theme/typography/lineHeightTheme.d.ts.map +0 -1
package/dist/index.esm.js CHANGED
@@ -751,64 +751,6 @@ class TextAlignTheme extends BaseTheme {
751
751
  }
752
752
  }
753
753
 
754
- class LineHeightTheme extends BaseTheme {
755
- constructor(customMapping) {
756
- super();
757
- /** Extra-small line height - matches text-xs default line height */
758
- this.xs = "[--lh-unit:1.333]"; // calc(1 / 0.75) ≈ 1.333
759
- /** Small line height - matches text-sm default line height */
760
- this.sm = "[--lh-unit:1.429]"; // calc(1.25 / 0.875) ≈ 1.429
761
- /** Medium line height - matches text-base default line height */
762
- this.md = "[--lh-unit:1.5]"; // calc(1.5 / 1) = 1.5
763
- /** Large line height - matches text-lg default line height */
764
- this.lg = "[--lh-unit:1.556]"; // calc(1.75 / 1.125) ≈ 1.556
765
- /** Extra-large line height - matches text-xl default line height */
766
- this.xl = "[--lh-unit:1.4]"; // calc(1.75 / 1.25) = 1.4
767
- if (customMapping) {
768
- this.xs = customMapping.xs || this.xs;
769
- this.sm = customMapping.sm || this.sm;
770
- this.md = customMapping.md || this.md;
771
- this.lg = customMapping.lg || this.lg;
772
- this.xl = customMapping.xl || this.xl;
773
- }
774
- }
775
- getClasses(extractedKeys) {
776
- if (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) {
777
- const lhUnitClass = this[extractedKeys.size];
778
- return lhUnitClass ? [lhUnitClass, "leading-(--lh)"] : [];
779
- }
780
- return [this.md, "leading-(--lh)"];
781
- }
782
- // Static factory methods for different text size ranges
783
- static createForSectionTitle() {
784
- return new LineHeightTheme({
785
- xs: "[--lh-unit:1.333]", // text-2xl: calc(2 / 1.5) ≈ 1.333
786
- sm: "[--lh-unit:1.2]", // text-3xl: calc(2.25 / 1.875) = 1.2
787
- md: "[--lh-unit:1.111]", // text-4xl: calc(2.5 / 2.25) ≈ 1.111
788
- lg: "[--lh-unit:1]", // text-5xl: 1
789
- xl: "[--lh-unit:1]" // text-6xl+: 1
790
- });
791
- }
792
- static createForPageTitle() {
793
- return new LineHeightTheme({
794
- xs: "[--lh-unit:1.2]", // text-3xl: calc(2.25 / 1.875) = 1.2
795
- sm: "[--lh-unit:1.111]", // text-4xl: calc(2.5 / 2.25) ≈ 1.111
796
- md: "[--lh-unit:1]", // text-5xl: 1
797
- lg: "[--lh-unit:1]", // text-6xl: 1
798
- xl: "[--lh-unit:1]" // text-7xl: 1
799
- });
800
- }
801
- static createForTitle() {
802
- return new LineHeightTheme({
803
- xs: "[--lh-unit:1.556]", // text-lg: calc(1.75 / 1.125) ≈ 1.556
804
- sm: "[--lh-unit:1.4]", // text-xl: calc(1.75 / 1.25) = 1.4
805
- md: "[--lh-unit:1.333]", // text-2xl: calc(2 / 1.5) ≈ 1.333
806
- lg: "[--lh-unit:1.2]", // text-3xl: calc(2.25 / 1.875) = 1.2
807
- xl: "[--lh-unit:1.111]" // text-4xl: calc(2.5 / 2.25) ≈ 1.111
808
- });
809
- }
810
- }
811
-
812
754
  class DisplayTheme extends BaseTheme {
813
755
  constructor() {
814
756
  super(...arguments);
@@ -3627,8 +3569,7 @@ const defaultTypographyThemes = {
3627
3569
  fontStyle: new FontStyleTheme(),
3628
3570
  textDecoration: new TextDecorationTheme(),
3629
3571
  textTransform: new TextTransformTheme(),
3630
- textAlign: new TextAlignTheme(),
3631
- lineHeight: new LineHeightTheme()
3572
+ textAlign: new TextAlignTheme()
3632
3573
  };
3633
3574
  class ComponentTheme {
3634
3575
  constructor(tag, base, themes, defaults = {}, categories, tagFunction) {
@@ -3710,29 +3651,122 @@ class ComponentTheme {
3710
3651
  }
3711
3652
  }
3712
3653
 
3713
- class SizeTheme extends BaseTheme {
3714
- constructor(sizeMap, useDefaultKey = true) {
3654
+ class FontSizeTheme extends BaseTheme {
3655
+ constructor(customMapping) {
3715
3656
  super();
3716
- /** Extra-small size variant */
3717
- this.xs = "";
3718
- /** Small size variant */
3719
- this.sm = "";
3720
- /** Medium size variant (default) */
3721
- this.md = "";
3722
- /** Large size variant */
3723
- this.lg = "";
3724
- /** Extra-large size variant */
3725
- this.xl = "";
3726
- this.useDefaultKey = useDefaultKey;
3727
- ComponentKeys.size.forEach((key) => {
3728
- var _a;
3729
- this[key] = (_a = sizeMap === null || sizeMap === void 0 ? void 0 : sizeMap[key]) !== null && _a !== void 0 ? _a : "";
3657
+ /** Extra-small font size - text-xs (0.75rem = 6 * 0.125rem) */
3658
+ this.xs = "[--fs-unit:6]";
3659
+ /** Small font size - text-sm (0.875rem = 7 * 0.125rem) */
3660
+ this.sm = "[--fs-unit:7]";
3661
+ /** Medium font size - text-base (1rem = 8 * 0.125rem) */
3662
+ this.md = "[--fs-unit:8]";
3663
+ /** Large font size - text-lg (1.125rem = 9 * 0.125rem) */
3664
+ this.lg = "[--fs-unit:9]";
3665
+ /** Extra-large font size - text-xl (1.25rem = 10 * 0.125rem) */
3666
+ this.xl = "[--fs-unit:10]";
3667
+ if (customMapping) {
3668
+ this.xs = customMapping.xs || this.xs;
3669
+ this.sm = customMapping.sm || this.sm;
3670
+ this.md = customMapping.md || this.md;
3671
+ this.lg = customMapping.lg || this.lg;
3672
+ this.xl = customMapping.xl || this.xl;
3673
+ }
3674
+ }
3675
+ getClasses(extractedKeys) {
3676
+ if (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) {
3677
+ const fsUnitClass = this[extractedKeys.size];
3678
+ return fsUnitClass ? [fsUnitClass, "text-(length:--fs)"] : [];
3679
+ }
3680
+ return [this.md, "text-(length:--fs)"];
3681
+ }
3682
+ // Static factory methods for different text size ranges
3683
+ static createForPageTitle() {
3684
+ return new FontSizeTheme({
3685
+ xs: "[--fs-unit:15]", // text-3xl: 1.875rem = 15 * 0.125rem
3686
+ sm: "[--fs-unit:18]", // text-4xl: 2.25rem = 18 * 0.125rem
3687
+ md: "[--fs-unit:24]", // text-5xl: 3rem = 24 * 0.125rem
3688
+ lg: "[--fs-unit:30]", // text-6xl: 3.75rem = 30 * 0.125rem
3689
+ xl: "[--fs-unit:36]" // text-7xl: 4.5rem = 36 * 0.125rem
3690
+ });
3691
+ }
3692
+ static createForSectionTitle() {
3693
+ return new FontSizeTheme({
3694
+ xs: "[--fs-unit:12]", // text-2xl: 1.5rem = 12 * 0.125rem
3695
+ sm: "[--fs-unit:15]", // text-3xl: 1.875rem = 15 * 0.125rem
3696
+ md: "[--fs-unit:18]", // text-4xl: 2.25rem = 18 * 0.125rem
3697
+ lg: "[--fs-unit:24]", // text-5xl: 3rem = 24 * 0.125rem
3698
+ xl: "[--fs-unit:30]" // text-6xl: 3.75rem = 30 * 0.125rem
3730
3699
  });
3731
3700
  }
3701
+ static createForTitle() {
3702
+ return new FontSizeTheme({
3703
+ xs: "[--fs-unit:9]", // text-lg: 1.125rem = 9 * 0.125rem
3704
+ sm: "[--fs-unit:10]", // text-xl: 1.25rem = 10 * 0.125rem
3705
+ md: "[--fs-unit:12]", // text-2xl: 1.5rem = 12 * 0.125rem
3706
+ lg: "[--fs-unit:15]", // text-3xl: 1.875rem = 15 * 0.125rem
3707
+ xl: "[--fs-unit:18]" // text-4xl: 2.25rem = 18 * 0.125rem
3708
+ });
3709
+ }
3710
+ }
3711
+
3712
+ class LineHeightTheme extends BaseTheme {
3713
+ constructor(customMapping) {
3714
+ super();
3715
+ /** Extra-small line height - matches text-xs default line height */
3716
+ this.xs = "[--lh-unit:1.333]"; // calc(1 / 0.75) ≈ 1.333
3717
+ /** Small line height - matches text-sm default line height */
3718
+ this.sm = "[--lh-unit:1.429]"; // calc(1.25 / 0.875) ≈ 1.429
3719
+ /** Medium line height - matches text-base default line height */
3720
+ this.md = "[--lh-unit:1.5]"; // calc(1.5 / 1) = 1.5
3721
+ /** Large line height - matches text-lg default line height */
3722
+ this.lg = "[--lh-unit:1.556]"; // calc(1.75 / 1.125) ≈ 1.556
3723
+ /** Extra-large line height - matches text-xl default line height */
3724
+ this.xl = "[--lh-unit:1.4]"; // calc(1.75 / 1.25) = 1.4
3725
+ if (customMapping) {
3726
+ this.xs = customMapping.xs || this.xs;
3727
+ this.sm = customMapping.sm || this.sm;
3728
+ this.md = customMapping.md || this.md;
3729
+ this.lg = customMapping.lg || this.lg;
3730
+ this.xl = customMapping.xl || this.xl;
3731
+ }
3732
+ }
3732
3733
  getClasses(extractedKeys) {
3733
- var _a;
3734
- const size = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : (this.useDefaultKey ? 'md' : undefined);
3735
- return size ? [this[size]] : [''];
3734
+ if (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) {
3735
+ const lhUnitClass = this[extractedKeys.size];
3736
+ return lhUnitClass ? [lhUnitClass, "leading-(--lh)"] : [];
3737
+ }
3738
+ return [this.md, "leading-(--lh)"];
3739
+ }
3740
+ static createDefault() {
3741
+ return new LineHeightTheme();
3742
+ }
3743
+ // Static factory methods for different text size ranges
3744
+ static createForSectionTitle() {
3745
+ return new LineHeightTheme({
3746
+ xs: "[--lh-unit:1.333]", // text-2xl: calc(2 / 1.5) ≈ 1.333
3747
+ sm: "[--lh-unit:1.2]", // text-3xl: calc(2.25 / 1.875) = 1.2
3748
+ md: "[--lh-unit:1.111]", // text-4xl: calc(2.5 / 2.25) ≈ 1.111
3749
+ lg: "[--lh-unit:1]", // text-5xl: 1
3750
+ xl: "[--lh-unit:1]" // text-6xl+: 1
3751
+ });
3752
+ }
3753
+ static createForPageTitle() {
3754
+ return new LineHeightTheme({
3755
+ xs: "[--lh-unit:1.2]", // text-3xl: calc(2.25 / 1.875) = 1.2
3756
+ sm: "[--lh-unit:1.111]", // text-4xl: calc(2.5 / 2.25) ≈ 1.111
3757
+ md: "[--lh-unit:1]", // text-5xl: 1
3758
+ lg: "[--lh-unit:1]", // text-6xl: 1
3759
+ xl: "[--lh-unit:1]" // text-7xl: 1
3760
+ });
3761
+ }
3762
+ static createForTitle() {
3763
+ return new LineHeightTheme({
3764
+ xs: "[--lh-unit:1.556]", // text-lg: calc(1.75 / 1.125) ≈ 1.556
3765
+ sm: "[--lh-unit:1.4]", // text-xl: calc(1.75 / 1.25) = 1.4
3766
+ md: "[--lh-unit:1.333]", // text-2xl: calc(2 / 1.5) ≈ 1.333
3767
+ lg: "[--lh-unit:1.2]", // text-3xl: calc(2.25 / 1.875) = 1.2
3768
+ xl: "[--lh-unit:1.111]" // text-4xl: calc(2.5 / 2.25) ≈ 1.111
3769
+ });
3736
3770
  }
3737
3771
  }
3738
3772
 
@@ -3809,11 +3843,11 @@ class RadiusTheme extends BaseTheme {
3809
3843
  }
3810
3844
  static createUITheme() {
3811
3845
  return new RadiusTheme({
3812
- xs: '[--br-unit:1]',
3813
- sm: '[--br-unit:2]',
3814
- md: '[--br-unit:3]',
3815
- lg: '[--br-unit:4]',
3816
- xl: '[--br-unit:5]'
3846
+ xs: '[--br-unit:2]',
3847
+ sm: '[--br-unit:3]',
3848
+ md: '[--br-unit:4]',
3849
+ lg: '[--br-unit:5]',
3850
+ xl: '[--br-unit:6]'
3817
3851
  }, true);
3818
3852
  }
3819
3853
  static createLayoutTheme() {
@@ -3955,9 +3989,9 @@ class PaddingTheme extends BaseTheme {
3955
3989
 
3956
3990
  /** Horizontal padding theme - controls left and right padding */
3957
3991
  class PxTheme extends PaddingTheme {
3958
- constructor(aspectRatioMap, isUIComponent = false) {
3992
+ constructor(aspectRatio, isUIComponent = false) {
3959
3993
  super();
3960
- this.aspectRatioMap = aspectRatioMap;
3994
+ this.aspectRatioMap = aspectRatio;
3961
3995
  this.isUIComponent = isUIComponent;
3962
3996
  // PxTheme should not set any padding classes - that's PyTheme's job
3963
3997
  // PxTheme only handles aspect-ratio
@@ -4093,13 +4127,6 @@ const textAppearanceClasses = {
4093
4127
  info: "text-(--color-text-info)",
4094
4128
  transparent: "text-transparent",
4095
4129
  };
4096
- const textSizeClasses = {
4097
- xs: "text-xs",
4098
- sm: "text-sm",
4099
- md: "text-base",
4100
- lg: "text-lg",
4101
- xl: "text-xl",
4102
- };
4103
4130
 
4104
4131
  const filledBackgroundAppearanceClasses = {
4105
4132
  default: "bg-(--color-bg-filled-default)",
@@ -4842,7 +4869,6 @@ const themeDefaults = {
4842
4869
  },
4843
4870
  };
4844
4871
 
4845
- // Button-specific aspect ratios (px-2,3,4,5,6 vs py-1,1.5,2,2.5,3)
4846
4872
  const buttonAspectRatioClasses = {
4847
4873
  xs: "[--aspect-ratio:2]", // px-2 vs py-1 = 2
4848
4874
  sm: "[--aspect-ratio:2]", // px-3 vs py-1.5 = 2
@@ -4855,7 +4881,14 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
4855
4881
  px: new PxTheme(buttonAspectRatioClasses, true),
4856
4882
  py: new PyTheme(uiPaddingClasses, true),
4857
4883
  gap: new GapTheme(true),
4858
- text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' }),
4884
+ text: new FontSizeTheme(),
4885
+ lineHeight: new LineHeightTheme({
4886
+ xs: "[--lh-unit:1.3]",
4887
+ sm: "[--lh-unit:1.3]",
4888
+ md: "[--lh-unit:1.3]",
4889
+ lg: "[--lh-unit:1.3]",
4890
+ xl: "[--lh-unit:1.3]"
4891
+ }),
4859
4892
  },
4860
4893
  appearance: {
4861
4894
  background: GenericVariantTheme.createBgAppearanceTheme(),
@@ -4893,7 +4926,8 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all
4893
4926
  px: new PxTheme(badgeAspectRatioClasses, true),
4894
4927
  py: new PyTheme(uiPaddingClasses, true),
4895
4928
  gap: new GapTheme(true),
4896
- text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' })
4929
+ text: new FontSizeTheme(),
4930
+ lineHeight: LineHeightTheme.createDefault()
4897
4931
  },
4898
4932
  appearance: {
4899
4933
  background: GenericVariantTheme.createSimpleUIElementBgAppearanceTheme(),
@@ -4935,7 +4969,8 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all
4935
4969
  size: {
4936
4970
  px: new PxTheme(chipAspectRatioClasses, true),
4937
4971
  py: new PyTheme(chipPyClasses, true),
4938
- text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' }),
4972
+ text: new FontSizeTheme(),
4973
+ lineHeight: LineHeightTheme.createDefault(),
4939
4974
  gap: new GapTheme(true)
4940
4975
  },
4941
4976
  appearance: {
@@ -4978,7 +5013,8 @@ const defaultCodeTheme = new ComponentTheme("code", "", {
4978
5013
  size: {
4979
5014
  px: new PxTheme(codeAspectRatioClasses, true),
4980
5015
  py: new PyTheme(codePyClasses, true),
4981
- text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-sm', lg: 'text-base', xl: 'text-lg' }),
5016
+ text: new FontSizeTheme(),
5017
+ lineHeight: LineHeightTheme.createDefault(),
4982
5018
  gap: new GapTheme(true)
4983
5019
  },
4984
5020
  appearance: {
@@ -5111,18 +5147,16 @@ class ListStyleTheme extends BaseTheme {
5111
5147
  }
5112
5148
  }
5113
5149
 
5114
- const createTypographyComponentTheme = (tag, base = "text-balance", textSizeMap = textSizeClasses, defaults = {}, lineHeightTheme) => {
5115
- const typographyThemes = lineHeightTheme
5116
- ? { ...defaultTypographyThemes, lineHeight: lineHeightTheme }
5117
- : defaultTypographyThemes;
5150
+ const createTypographyComponentTheme = (tag, base = "text-balance", fontSizeTheme = new FontSizeTheme(), defaults = {}, lineHeightTheme = LineHeightTheme.createDefault()) => {
5118
5151
  return new ComponentTheme(tag, base, {
5119
5152
  size: {
5120
- text: new SizeTheme(textSizeMap),
5153
+ text: fontSizeTheme,
5154
+ lineHeight: lineHeightTheme,
5121
5155
  },
5122
5156
  appearance: {
5123
5157
  text: GenericVariantTheme.createTypographyTextTheme(),
5124
5158
  },
5125
- typography: typographyThemes,
5159
+ typography: defaultTypographyThemes,
5126
5160
  layout: defaultLayoutsThemes,
5127
5161
  }, defaults, TYPOGRAPHY_CATEGORIES, (props) => {
5128
5162
  // Determine tag based on href prop
@@ -5130,29 +5164,17 @@ const createTypographyComponentTheme = (tag, base = "text-balance", textSizeMap
5130
5164
  });
5131
5165
  };
5132
5166
  // Page title specific theme
5133
- const pageTitleTheme = createTypographyComponentTheme("h1", "text-balance tracking-tight w-fit", {
5134
- xs: "text-3xl max-lg:text-2xl max-md:text-xl",
5135
- sm: "text-4xl max-lg:text-3xl max-md:text-2xl",
5136
- md: "text-5xl max-lg:text-4xl max-md:text-3xl",
5137
- lg: "text-6xl max-lg:text-5xl max-md:text-4xl",
5138
- xl: "text-7xl max-lg:text-6xl max-md:text-5xl"
5139
- }, mergeDefaults(themeDefaults.pageTitle, { semibold: true }), LineHeightTheme.createForPageTitle());
5167
+ const pageTitleTheme = createTypographyComponentTheme("h1", "text-balance tracking-tight w-fit", FontSizeTheme.createForPageTitle(), mergeDefaults(themeDefaults.pageTitle, { semibold: true }), LineHeightTheme.createForPageTitle());
5140
5168
  // Section title specific theme
5141
- const sectionTitleTheme = createTypographyComponentTheme("h2", "text-balance w-fit", {
5142
- xs: "text-2xl max-lg:text-xl max-md:text-lg",
5143
- sm: "text-3xl max-lg:text-2xl max-md:text-xl",
5144
- md: "text-4xl max-lg:text-3xl max-md:text-2xl",
5145
- lg: "text-5xl max-lg:text-4xl max-md:text-3xl",
5146
- xl: "text-6xl max-lg:text-5xl max-md:text-4xl"
5147
- }, mergeDefaults(themeDefaults.sectionTitle, { semibold: true }), LineHeightTheme.createForSectionTitle());
5169
+ const sectionTitleTheme = createTypographyComponentTheme("h2", "text-balance w-fit", FontSizeTheme.createForSectionTitle(), mergeDefaults(themeDefaults.sectionTitle, { semibold: true }), LineHeightTheme.createForSectionTitle());
5148
5170
  // Title specific theme
5149
- 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());
5171
+ const titleTheme = createTypographyComponentTheme("h3", "text-balance w-fit", FontSizeTheme.createForTitle(), mergeDefaults(themeDefaults.title, { semibold: true }), LineHeightTheme.createForTitle());
5150
5172
  // Text specific theme
5151
- const textTheme = createTypographyComponentTheme("p", "p-0 m-0 w-fit", textSizeClasses, themeDefaults.text);
5173
+ const textTheme = createTypographyComponentTheme("p", "p-0 m-0 w-fit", new FontSizeTheme(), themeDefaults.text);
5152
5174
  // Link specific theme
5153
5175
  const linkTheme = new ComponentTheme("a", "hover:underline w-fit cursor-pointer", {
5154
5176
  size: {
5155
- text: new SizeTheme(textSizeClasses, false),
5177
+ text: new FontSizeTheme(),
5156
5178
  },
5157
5179
  appearance: {
5158
5180
  text: GenericVariantTheme.createTypographyTextTheme(),
@@ -5163,7 +5185,7 @@ const linkTheme = new ComponentTheme("a", "hover:underline w-fit cursor-pointer"
5163
5185
  // List specific theme
5164
5186
  const listItemTheme = new ComponentTheme("li", "", {
5165
5187
  size: {
5166
- text: new SizeTheme(textSizeClasses, false),
5188
+ text: new FontSizeTheme(),
5167
5189
  },
5168
5190
  appearance: {
5169
5191
  text: GenericVariantTheme.createTypographyTextTheme(),
@@ -5174,7 +5196,7 @@ const listItemTheme = new ComponentTheme("li", "", {
5174
5196
  // List specific theme
5175
5197
  const listTheme = new ComponentTheme("ul", "list-inside", {
5176
5198
  size: {
5177
- text: new SizeTheme(textSizeClasses),
5199
+ text: new FontSizeTheme(),
5178
5200
  paddingLeft: new PlTheme(),
5179
5201
  },
5180
5202
  appearance: {
@@ -5214,6 +5236,7 @@ const defaultCardTheme = new ComponentTheme("div", "", {
5214
5236
  size: {
5215
5237
  px: new PxTheme(),
5216
5238
  py: new PyTheme(),
5239
+ lineHeight: LineHeightTheme.createDefault(),
5217
5240
  gap: new GapTheme(true),
5218
5241
  },
5219
5242
  layout: {
@@ -5269,6 +5292,31 @@ const defaultDividerTheme = new ComponentTheme("div", "h-px w-full", {
5269
5292
  layout: defaultLayoutsThemes,
5270
5293
  }, themeDefaults.divider, DIVIDER_CATEGORIES);
5271
5294
 
5295
+ class SizeTheme extends BaseTheme {
5296
+ constructor(sizeMap) {
5297
+ super();
5298
+ /** Extra-small size variant */
5299
+ this.xs = "";
5300
+ /** Small size variant */
5301
+ this.sm = "";
5302
+ /** Medium size variant (default) */
5303
+ this.md = "";
5304
+ /** Large size variant */
5305
+ this.lg = "";
5306
+ /** Extra-large size variant */
5307
+ this.xl = "";
5308
+ ComponentKeys.size.forEach((key) => {
5309
+ var _a;
5310
+ this[key] = (_a = sizeMap === null || sizeMap === void 0 ? void 0 : sizeMap[key]) !== null && _a !== void 0 ? _a : "";
5311
+ });
5312
+ }
5313
+ getClasses(extractedKeys) {
5314
+ var _a;
5315
+ const size = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md';
5316
+ return size ? [this[size]] : [''];
5317
+ }
5318
+ }
5319
+
5272
5320
  const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full", {
5273
5321
  size: {
5274
5322
  gap: new GapTheme(),
@@ -5336,16 +5384,15 @@ const defaultStackTheme = new ComponentTheme("div", "", {
5336
5384
  }
5337
5385
  }, themeDefaults.stack, STACK_CATEGORIES);
5338
5386
 
5339
- const sectionAspectRatioClasses = {
5340
- xs: "[--aspect-ratio:2.5]",
5341
- sm: "[--aspect-ratio:2]",
5342
- md: "[--aspect-ratio:1.75]",
5343
- lg: "[--aspect-ratio:1.6]",
5344
- xl: "[--aspect-ratio:1.5]",
5345
- };
5346
5387
  const defaultSectionTheme = new ComponentTheme("div", "w-full", {
5347
5388
  size: {
5348
- px: new PxTheme(sectionAspectRatioClasses),
5389
+ px: new PxTheme({
5390
+ xs: "[--aspect-ratio:2.5]",
5391
+ sm: "[--aspect-ratio:2]",
5392
+ md: "[--aspect-ratio:1.75]",
5393
+ lg: "[--aspect-ratio:1.6]",
5394
+ xl: "[--aspect-ratio:1.5]",
5395
+ }),
5349
5396
  py: new PyTheme({
5350
5397
  xs: "[--py-unit:4]",
5351
5398
  sm: "[--py-unit:8]",
@@ -5403,7 +5450,7 @@ const defaultCheckboxTheme = new ComponentTheme("input", "peer col-start-1 row-s
5403
5450
  lg: 'h-4.5 w-4.5',
5404
5451
  xl: 'h-5 w-5'
5405
5452
  }),
5406
- text: new SizeTheme(textSizeClasses)
5453
+ text: new FontSizeTheme()
5407
5454
  },
5408
5455
  layout: {
5409
5456
  ...defaultLayoutsThemes,
@@ -5455,7 +5502,8 @@ const defaultCheckboxWrapperTheme = new ComponentTheme("span", "", {
5455
5502
 
5456
5503
  const defaultLabelTheme = new ComponentTheme("label", "has-[input]:cursor-pointer cursor-default", {
5457
5504
  size: {
5458
- text: new SizeTheme(textSizeClasses),
5505
+ text: new FontSizeTheme(),
5506
+ lineHeight: LineHeightTheme.createDefault(),
5459
5507
  gap: new GapTheme(true),
5460
5508
  },
5461
5509
  appearance: {
@@ -5487,20 +5535,19 @@ const defaultImgTheme = new ComponentTheme("img", "object-cover", // Default to
5487
5535
  }
5488
5536
  }, themeDefaults.img, IMG_CATEGORIES);
5489
5537
 
5490
- // Input aspect ratios (same as button)
5491
- const inputAspectRatioClasses = {
5492
- xs: "[--aspect-ratio:2]",
5493
- sm: "[--aspect-ratio:2]",
5494
- md: "[--aspect-ratio:2]",
5495
- lg: "[--aspect-ratio:2]",
5496
- xl: "[--aspect-ratio:2]",
5497
- };
5498
5538
  const defaultInputTheme = new ComponentTheme("input", "w-full transition-all duration-200", {
5499
5539
  size: {
5500
- px: new PxTheme(inputAspectRatioClasses, true),
5540
+ px: new PxTheme({
5541
+ xs: "[--aspect-ratio:2]",
5542
+ sm: "[--aspect-ratio:2]",
5543
+ md: "[--aspect-ratio:2]",
5544
+ lg: "[--aspect-ratio:2]",
5545
+ xl: "[--aspect-ratio:2]",
5546
+ }, true),
5501
5547
  py: new PyTheme(uiPaddingClasses, true),
5502
5548
  gap: new GapTheme(true),
5503
- text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' }),
5549
+ text: new FontSizeTheme(),
5550
+ lineHeight: LineHeightTheme.createDefault(),
5504
5551
  },
5505
5552
  appearance: {
5506
5553
  background: GenericVariantTheme.createSimpleUIElementBgAppearanceTheme(),