@vaneui/ui 0.3.1-alpha.20250930203841.cec91ca → 0.3.1-alpha.20251001142553.9da86c7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/card.d.ts +8 -10
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/checkbox.d.ts +4 -5
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/code.d.ts +4 -5
- package/dist/components/ui/code.d.ts.map +1 -1
- package/dist/components/ui/col.d.ts +4 -5
- package/dist/components/ui/col.d.ts.map +1 -1
- package/dist/components/ui/container.d.ts +4 -5
- package/dist/components/ui/container.d.ts.map +1 -1
- package/dist/components/ui/divider.d.ts +4 -5
- package/dist/components/ui/divider.d.ts.map +1 -1
- package/dist/components/ui/grid.d.ts +20 -25
- package/dist/components/ui/grid.d.ts.map +1 -1
- package/dist/components/ui/img.d.ts +4 -5
- package/dist/components/ui/img.d.ts.map +1 -1
- package/dist/components/ui/input.d.ts +4 -5
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/label.d.ts +4 -5
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/props/breakpoint.d.ts +9 -11
- package/dist/components/ui/props/breakpoint.d.ts.map +1 -1
- package/dist/components/ui/props/hide.d.ts +9 -11
- package/dist/components/ui/props/hide.d.ts.map +1 -1
- package/dist/components/ui/props/keys.d.ts +2 -2
- package/dist/components/ui/row.d.ts +8 -10
- package/dist/components/ui/row.d.ts.map +1 -1
- package/dist/components/ui/section.d.ts +8 -10
- package/dist/components/ui/section.d.ts.map +1 -1
- package/dist/components/ui/stack.d.ts +8 -10
- package/dist/components/ui/stack.d.ts.map +1 -1
- package/dist/components/ui/theme/badgeTheme.d.ts +4 -2
- package/dist/components/ui/theme/badgeTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/buttonTheme.d.ts +4 -2
- package/dist/components/ui/theme/buttonTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/cardTheme.d.ts +2 -0
- package/dist/components/ui/theme/cardTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/checkboxTheme.d.ts +1 -1
- package/dist/components/ui/theme/checkboxTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/chipTheme.d.ts +4 -2
- package/dist/components/ui/theme/chipTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/codeTheme.d.ts +4 -2
- package/dist/components/ui/theme/codeTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/common/ComponentTheme.d.ts +0 -2
- package/dist/components/ui/theme/common/ComponentTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/defaults.d.ts.map +1 -1
- package/dist/components/ui/theme/inputTheme.d.ts +4 -2
- package/dist/components/ui/theme/inputTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/labelTheme.d.ts +3 -1
- package/dist/components/ui/theme/labelTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/layout/hideTheme.d.ts +8 -10
- package/dist/components/ui/theme/layout/hideTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/sectionTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/size/breakpointTheme.d.ts +8 -10
- package/dist/components/ui/theme/size/breakpointTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/size/fontSizeTheme.d.ts.map +1 -0
- package/dist/components/ui/theme/size/gapTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/{typography → size}/lineHeightTheme.d.ts +1 -0
- package/dist/components/ui/theme/size/lineHeightTheme.d.ts.map +1 -0
- package/dist/components/ui/theme/size/pxTheme.d.ts +1 -1
- package/dist/components/ui/theme/size/pxTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/size/sizeTheme.d.ts +1 -4
- package/dist/components/ui/theme/size/sizeTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/typographyTheme.d.ts +3 -2
- package/dist/components/ui/theme/typographyTheme.d.ts.map +1 -1
- package/dist/components/ui/typography.d.ts +4 -5
- package/dist/components/ui/typography.d.ts.map +1 -1
- package/dist/index.esm.js +175 -173
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +182 -182
- package/dist/index.js.map +1 -1
- package/dist/ui.css +72 -16
- package/dist/vars.css +10 -6
- package/package.json +1 -1
- package/dist/components/ui/theme/typography/fontSizeTheme.d.ts.map +0 -1
- package/dist/components/ui/theme/typography/lineHeightTheme.d.ts.map +0 -1
- /package/dist/components/ui/theme/{typography → size}/fontSizeTheme.d.ts +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -53,18 +53,16 @@ const BORDER_VALUES = [BORDER$1, BORDER_T, BORDER_B, BORDER_L, BORDER_R, BORDER_
|
|
|
53
53
|
/** All border side keys (excluding noBorder since it doesn't have a CSS class) */
|
|
54
54
|
const BORDER_KEYS = [BORDER$1, BORDER_T, BORDER_B, BORDER_L, BORDER_R, BORDER_X, BORDER_Y];
|
|
55
55
|
|
|
56
|
-
/**
|
|
57
|
-
const
|
|
58
|
-
/**
|
|
59
|
-
const
|
|
60
|
-
/**
|
|
61
|
-
const
|
|
62
|
-
/**
|
|
63
|
-
const
|
|
64
|
-
/** Extra-large column breakpoint - responsive grid column sizing for xl screens */
|
|
65
|
-
const XL_COL = 'xlCol';
|
|
56
|
+
/** Mobile column breakpoint - switch to column layout on mobile devices (max-mobile: 20rem) */
|
|
57
|
+
const MOBILE_COL = 'mobileCol';
|
|
58
|
+
/** Tablet column breakpoint - switch to column layout on tablet devices (max-tablet: 40rem) */
|
|
59
|
+
const TABLET_COL = 'tabletCol';
|
|
60
|
+
/** Laptop column breakpoint - switch to column layout on laptop devices (max-laptop: 64rem) */
|
|
61
|
+
const LAPTOP_COL = 'laptopCol';
|
|
62
|
+
/** Desktop column breakpoint - switch to column layout on desktop devices (max-desktop: 80rem) */
|
|
63
|
+
const DESKTOP_COL = 'desktopCol';
|
|
66
64
|
/** All breakpoint property values */
|
|
67
|
-
const BREAKPOINT_VALUES = [
|
|
65
|
+
const BREAKPOINT_VALUES = [MOBILE_COL, TABLET_COL, LAPTOP_COL, DESKTOP_COL];
|
|
68
66
|
|
|
69
67
|
/** Inline display - flows with text */
|
|
70
68
|
const INLINE = 'inline';
|
|
@@ -146,18 +144,16 @@ const NO_GAP = 'noGap';
|
|
|
146
144
|
/** All gap property values */
|
|
147
145
|
const GAP_VALUES = [GAP, NO_GAP];
|
|
148
146
|
|
|
149
|
-
/** Hide element on
|
|
150
|
-
const
|
|
151
|
-
/** Hide element on
|
|
152
|
-
const
|
|
153
|
-
/** Hide element on
|
|
154
|
-
const
|
|
155
|
-
/** Hide element on
|
|
156
|
-
const
|
|
157
|
-
/** Hide element on extra-large screens and up - visible only on large screens and below */
|
|
158
|
-
const XL_HIDE = 'xlHide';
|
|
147
|
+
/** Hide element on mobile devices and below (max-mobile: 20rem) */
|
|
148
|
+
const MOBILE_HIDE = 'mobileHide';
|
|
149
|
+
/** Hide element on tablet devices and below (max-tablet: 40rem) */
|
|
150
|
+
const TABLET_HIDE = 'tabletHide';
|
|
151
|
+
/** Hide element on laptop devices and below (max-laptop: 64rem) */
|
|
152
|
+
const LAPTOP_HIDE = 'laptopHide';
|
|
153
|
+
/** Hide element on desktop devices and below (max-desktop: 80rem) */
|
|
154
|
+
const DESKTOP_HIDE = 'desktopHide';
|
|
159
155
|
/** All hide property values */
|
|
160
|
-
const HIDE_VALUES = [
|
|
156
|
+
const HIDE_VALUES = [MOBILE_HIDE, TABLET_HIDE, LAPTOP_HIDE, DESKTOP_HIDE];
|
|
161
157
|
|
|
162
158
|
/** Align items to the start of the cross axis */
|
|
163
159
|
const ITEMS_START = 'itemsStart';
|
|
@@ -566,16 +562,14 @@ const ComponentCategories = {
|
|
|
566
562
|
class HideTheme extends BaseTheme {
|
|
567
563
|
constructor() {
|
|
568
564
|
super(...arguments);
|
|
569
|
-
/** Hide element on
|
|
570
|
-
this.
|
|
571
|
-
/** Hide element on
|
|
572
|
-
this.
|
|
573
|
-
/** Hide element on
|
|
574
|
-
this.
|
|
575
|
-
/** Hide element on
|
|
576
|
-
this.
|
|
577
|
-
/** Hide element on extra-large screens and below */
|
|
578
|
-
this.xlHide = "max-xl:hidden";
|
|
565
|
+
/** Hide element on mobile devices and below (max-mobile: 20rem) */
|
|
566
|
+
this.mobileHide = "max-mobile:hidden";
|
|
567
|
+
/** Hide element on tablet devices and below (max-tablet: 40rem) */
|
|
568
|
+
this.tabletHide = "max-tablet:hidden";
|
|
569
|
+
/** Hide element on laptop devices and below (max-laptop: 64rem) */
|
|
570
|
+
this.laptopHide = "max-laptop:hidden";
|
|
571
|
+
/** Hide element on desktop devices and below (max-desktop: 80rem) */
|
|
572
|
+
this.desktopHide = "max-desktop:hidden";
|
|
579
573
|
}
|
|
580
574
|
getClasses(extractedKeys) {
|
|
581
575
|
return [(extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.hide) ? this[extractedKeys.hide] : ''];
|
|
@@ -751,64 +745,6 @@ class TextAlignTheme extends BaseTheme {
|
|
|
751
745
|
}
|
|
752
746
|
}
|
|
753
747
|
|
|
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
748
|
class DisplayTheme extends BaseTheme {
|
|
813
749
|
constructor() {
|
|
814
750
|
super(...arguments);
|
|
@@ -3627,8 +3563,7 @@ const defaultTypographyThemes = {
|
|
|
3627
3563
|
fontStyle: new FontStyleTheme(),
|
|
3628
3564
|
textDecoration: new TextDecorationTheme(),
|
|
3629
3565
|
textTransform: new TextTransformTheme(),
|
|
3630
|
-
textAlign: new TextAlignTheme()
|
|
3631
|
-
lineHeight: new LineHeightTheme()
|
|
3566
|
+
textAlign: new TextAlignTheme()
|
|
3632
3567
|
};
|
|
3633
3568
|
class ComponentTheme {
|
|
3634
3569
|
constructor(tag, base, themes, defaults = {}, categories, tagFunction) {
|
|
@@ -3734,9 +3669,9 @@ class FontSizeTheme extends BaseTheme {
|
|
|
3734
3669
|
getClasses(extractedKeys) {
|
|
3735
3670
|
if (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) {
|
|
3736
3671
|
const fsUnitClass = this[extractedKeys.size];
|
|
3737
|
-
return fsUnitClass ? [fsUnitClass, "text-(
|
|
3672
|
+
return fsUnitClass ? [fsUnitClass, "text-(length:--fs)"] : [];
|
|
3738
3673
|
}
|
|
3739
|
-
return [this.md, "text-(
|
|
3674
|
+
return [this.md, "text-(length:--fs)"];
|
|
3740
3675
|
}
|
|
3741
3676
|
// Static factory methods for different text size ranges
|
|
3742
3677
|
static createForPageTitle() {
|
|
@@ -3768,40 +3703,64 @@ class FontSizeTheme extends BaseTheme {
|
|
|
3768
3703
|
}
|
|
3769
3704
|
}
|
|
3770
3705
|
|
|
3771
|
-
class
|
|
3772
|
-
constructor(
|
|
3706
|
+
class LineHeightTheme extends BaseTheme {
|
|
3707
|
+
constructor(customMapping) {
|
|
3773
3708
|
super();
|
|
3774
|
-
/** Extra-small
|
|
3775
|
-
this.xs = "";
|
|
3776
|
-
/** Small
|
|
3777
|
-
this.sm = "";
|
|
3778
|
-
/** Medium
|
|
3779
|
-
this.md = "";
|
|
3780
|
-
/** Large
|
|
3781
|
-
this.lg = "";
|
|
3782
|
-
/** Extra-large
|
|
3783
|
-
this.xl = "";
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
this.
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
}
|
|
3791
|
-
else {
|
|
3792
|
-
ComponentKeys.size.forEach((key) => {
|
|
3793
|
-
var _a;
|
|
3794
|
-
this[key] = (_a = sizeMap === null || sizeMap === void 0 ? void 0 : sizeMap[key]) !== null && _a !== void 0 ? _a : "";
|
|
3795
|
-
});
|
|
3709
|
+
/** Extra-small line height - matches text-xs default line height */
|
|
3710
|
+
this.xs = "[--lh-unit:1.333]"; // calc(1 / 0.75) ≈ 1.333
|
|
3711
|
+
/** Small line height - matches text-sm default line height */
|
|
3712
|
+
this.sm = "[--lh-unit:1.429]"; // calc(1.25 / 0.875) ≈ 1.429
|
|
3713
|
+
/** Medium line height - matches text-base default line height */
|
|
3714
|
+
this.md = "[--lh-unit:1.5]"; // calc(1.5 / 1) = 1.5
|
|
3715
|
+
/** Large line height - matches text-lg default line height */
|
|
3716
|
+
this.lg = "[--lh-unit:1.556]"; // calc(1.75 / 1.125) ≈ 1.556
|
|
3717
|
+
/** Extra-large line height - matches text-xl default line height */
|
|
3718
|
+
this.xl = "[--lh-unit:1.4]"; // calc(1.75 / 1.25) = 1.4
|
|
3719
|
+
if (customMapping) {
|
|
3720
|
+
this.xs = customMapping.xs || this.xs;
|
|
3721
|
+
this.sm = customMapping.sm || this.sm;
|
|
3722
|
+
this.md = customMapping.md || this.md;
|
|
3723
|
+
this.lg = customMapping.lg || this.lg;
|
|
3724
|
+
this.xl = customMapping.xl || this.xl;
|
|
3796
3725
|
}
|
|
3797
3726
|
}
|
|
3798
3727
|
getClasses(extractedKeys) {
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
return
|
|
3728
|
+
if (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) {
|
|
3729
|
+
const lhUnitClass = this[extractedKeys.size];
|
|
3730
|
+
return lhUnitClass ? [lhUnitClass, "leading-(--lh)"] : [];
|
|
3802
3731
|
}
|
|
3803
|
-
|
|
3804
|
-
|
|
3732
|
+
return [this.md, "leading-(--lh)"];
|
|
3733
|
+
}
|
|
3734
|
+
static createDefault() {
|
|
3735
|
+
return new LineHeightTheme();
|
|
3736
|
+
}
|
|
3737
|
+
// Static factory methods for different text size ranges
|
|
3738
|
+
static createForSectionTitle() {
|
|
3739
|
+
return new LineHeightTheme({
|
|
3740
|
+
xs: "[--lh-unit:1.333]", // text-2xl: calc(2 / 1.5) ≈ 1.333
|
|
3741
|
+
sm: "[--lh-unit:1.2]", // text-3xl: calc(2.25 / 1.875) = 1.2
|
|
3742
|
+
md: "[--lh-unit:1.111]", // text-4xl: calc(2.5 / 2.25) ≈ 1.111
|
|
3743
|
+
lg: "[--lh-unit:1]", // text-5xl: 1
|
|
3744
|
+
xl: "[--lh-unit:1]" // text-6xl+: 1
|
|
3745
|
+
});
|
|
3746
|
+
}
|
|
3747
|
+
static createForPageTitle() {
|
|
3748
|
+
return new LineHeightTheme({
|
|
3749
|
+
xs: "[--lh-unit:1.2]", // text-3xl: calc(2.25 / 1.875) = 1.2
|
|
3750
|
+
sm: "[--lh-unit:1.111]", // text-4xl: calc(2.5 / 2.25) ≈ 1.111
|
|
3751
|
+
md: "[--lh-unit:1]", // text-5xl: 1
|
|
3752
|
+
lg: "[--lh-unit:1]", // text-6xl: 1
|
|
3753
|
+
xl: "[--lh-unit:1]" // text-7xl: 1
|
|
3754
|
+
});
|
|
3755
|
+
}
|
|
3756
|
+
static createForTitle() {
|
|
3757
|
+
return new LineHeightTheme({
|
|
3758
|
+
xs: "[--lh-unit:1.556]", // text-lg: calc(1.75 / 1.125) ≈ 1.556
|
|
3759
|
+
sm: "[--lh-unit:1.4]", // text-xl: calc(1.75 / 1.25) = 1.4
|
|
3760
|
+
md: "[--lh-unit:1.333]", // text-2xl: calc(2 / 1.5) ≈ 1.333
|
|
3761
|
+
lg: "[--lh-unit:1.2]", // text-3xl: calc(2.25 / 1.875) = 1.2
|
|
3762
|
+
xl: "[--lh-unit:1.111]" // text-4xl: calc(2.5 / 2.25) ≈ 1.111
|
|
3763
|
+
});
|
|
3805
3764
|
}
|
|
3806
3765
|
}
|
|
3807
3766
|
|
|
@@ -4024,9 +3983,9 @@ class PaddingTheme extends BaseTheme {
|
|
|
4024
3983
|
|
|
4025
3984
|
/** Horizontal padding theme - controls left and right padding */
|
|
4026
3985
|
class PxTheme extends PaddingTheme {
|
|
4027
|
-
constructor(
|
|
3986
|
+
constructor(aspectRatio, isUIComponent = false) {
|
|
4028
3987
|
super();
|
|
4029
|
-
this.aspectRatioMap =
|
|
3988
|
+
this.aspectRatioMap = aspectRatio;
|
|
4030
3989
|
this.isUIComponent = isUIComponent;
|
|
4031
3990
|
// PxTheme should not set any padding classes - that's PyTheme's job
|
|
4032
3991
|
// PxTheme only handles aspect-ratio
|
|
@@ -4730,6 +4689,7 @@ const themeDefaults = {
|
|
|
4730
4689
|
container: {
|
|
4731
4690
|
noRing: true,
|
|
4732
4691
|
flex: true,
|
|
4692
|
+
column: true,
|
|
4733
4693
|
md: true,
|
|
4734
4694
|
itemsCenter: true,
|
|
4735
4695
|
gap: true,
|
|
@@ -4904,7 +4864,6 @@ const themeDefaults = {
|
|
|
4904
4864
|
},
|
|
4905
4865
|
};
|
|
4906
4866
|
|
|
4907
|
-
// Button-specific aspect ratios (px-2,3,4,5,6 vs py-1,1.5,2,2.5,3)
|
|
4908
4867
|
const buttonAspectRatioClasses = {
|
|
4909
4868
|
xs: "[--aspect-ratio:2]", // px-2 vs py-1 = 2
|
|
4910
4869
|
sm: "[--aspect-ratio:2]", // px-3 vs py-1.5 = 2
|
|
@@ -4917,7 +4876,14 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
|
|
|
4917
4876
|
px: new PxTheme(buttonAspectRatioClasses, true),
|
|
4918
4877
|
py: new PyTheme(uiPaddingClasses, true),
|
|
4919
4878
|
gap: new GapTheme(true),
|
|
4920
|
-
text: new
|
|
4879
|
+
text: new FontSizeTheme(),
|
|
4880
|
+
lineHeight: new LineHeightTheme({
|
|
4881
|
+
xs: "[--lh-unit:1.3]",
|
|
4882
|
+
sm: "[--lh-unit:1.3]",
|
|
4883
|
+
md: "[--lh-unit:1.3]",
|
|
4884
|
+
lg: "[--lh-unit:1.3]",
|
|
4885
|
+
xl: "[--lh-unit:1.3]"
|
|
4886
|
+
}),
|
|
4921
4887
|
},
|
|
4922
4888
|
appearance: {
|
|
4923
4889
|
background: GenericVariantTheme.createBgAppearanceTheme(),
|
|
@@ -4955,7 +4921,8 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
4955
4921
|
px: new PxTheme(badgeAspectRatioClasses, true),
|
|
4956
4922
|
py: new PyTheme(uiPaddingClasses, true),
|
|
4957
4923
|
gap: new GapTheme(true),
|
|
4958
|
-
text: new
|
|
4924
|
+
text: new FontSizeTheme(),
|
|
4925
|
+
lineHeight: LineHeightTheme.createDefault()
|
|
4959
4926
|
},
|
|
4960
4927
|
appearance: {
|
|
4961
4928
|
background: GenericVariantTheme.createSimpleUIElementBgAppearanceTheme(),
|
|
@@ -4997,7 +4964,8 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
4997
4964
|
size: {
|
|
4998
4965
|
px: new PxTheme(chipAspectRatioClasses, true),
|
|
4999
4966
|
py: new PyTheme(chipPyClasses, true),
|
|
5000
|
-
text: new
|
|
4967
|
+
text: new FontSizeTheme(),
|
|
4968
|
+
lineHeight: LineHeightTheme.createDefault(),
|
|
5001
4969
|
gap: new GapTheme(true)
|
|
5002
4970
|
},
|
|
5003
4971
|
appearance: {
|
|
@@ -5040,7 +5008,8 @@ const defaultCodeTheme = new ComponentTheme("code", "", {
|
|
|
5040
5008
|
size: {
|
|
5041
5009
|
px: new PxTheme(codeAspectRatioClasses, true),
|
|
5042
5010
|
py: new PyTheme(codePyClasses, true),
|
|
5043
|
-
text: new
|
|
5011
|
+
text: new FontSizeTheme(),
|
|
5012
|
+
lineHeight: LineHeightTheme.createDefault(),
|
|
5044
5013
|
gap: new GapTheme(true)
|
|
5045
5014
|
},
|
|
5046
5015
|
appearance: {
|
|
@@ -5173,18 +5142,16 @@ class ListStyleTheme extends BaseTheme {
|
|
|
5173
5142
|
}
|
|
5174
5143
|
}
|
|
5175
5144
|
|
|
5176
|
-
const createTypographyComponentTheme = (tag, base = "text-balance", fontSizeTheme = new FontSizeTheme(), defaults = {}, lineHeightTheme) => {
|
|
5177
|
-
const typographyThemes = lineHeightTheme
|
|
5178
|
-
? { ...defaultTypographyThemes, lineHeight: lineHeightTheme }
|
|
5179
|
-
: defaultTypographyThemes;
|
|
5145
|
+
const createTypographyComponentTheme = (tag, base = "text-balance", fontSizeTheme = new FontSizeTheme(), defaults = {}, lineHeightTheme = LineHeightTheme.createDefault()) => {
|
|
5180
5146
|
return new ComponentTheme(tag, base, {
|
|
5181
5147
|
size: {
|
|
5182
5148
|
text: fontSizeTheme,
|
|
5149
|
+
lineHeight: lineHeightTheme,
|
|
5183
5150
|
},
|
|
5184
5151
|
appearance: {
|
|
5185
5152
|
text: GenericVariantTheme.createTypographyTextTheme(),
|
|
5186
5153
|
},
|
|
5187
|
-
typography:
|
|
5154
|
+
typography: defaultTypographyThemes,
|
|
5188
5155
|
layout: defaultLayoutsThemes,
|
|
5189
5156
|
}, defaults, TYPOGRAPHY_CATEGORIES, (props) => {
|
|
5190
5157
|
// Determine tag based on href prop
|
|
@@ -5244,16 +5211,14 @@ const listTheme = new ComponentTheme("ul", "list-inside", {
|
|
|
5244
5211
|
class BreakpointTheme extends BaseTheme {
|
|
5245
5212
|
constructor() {
|
|
5246
5213
|
super(...arguments);
|
|
5247
|
-
/** Switch to column layout on
|
|
5248
|
-
this.
|
|
5249
|
-
/** Switch to column layout on
|
|
5250
|
-
this.
|
|
5251
|
-
/** Switch to column layout on
|
|
5252
|
-
this.
|
|
5253
|
-
/** Switch to column layout on
|
|
5254
|
-
this.
|
|
5255
|
-
/** Switch to column layout on extra-large screens and below */
|
|
5256
|
-
this.xlCol = "max-xl:flex-col";
|
|
5214
|
+
/** Switch to column layout on mobile devices and below (max-mobile: 20rem) */
|
|
5215
|
+
this.mobileCol = "max-mobile:flex-col";
|
|
5216
|
+
/** Switch to column layout on tablet devices and below (max-tablet: 40rem) */
|
|
5217
|
+
this.tabletCol = "max-tablet:flex-col";
|
|
5218
|
+
/** Switch to column layout on laptop devices and below (max-laptop: 64rem) */
|
|
5219
|
+
this.laptopCol = "max-laptop:flex-col";
|
|
5220
|
+
/** Switch to column layout on desktop devices and below (max-desktop: 80rem) */
|
|
5221
|
+
this.desktopCol = "max-desktop:flex-col";
|
|
5257
5222
|
}
|
|
5258
5223
|
getClasses(extractedKeys) {
|
|
5259
5224
|
return (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.breakpoint) ? [this[extractedKeys.breakpoint] || ''] : [];
|
|
@@ -5262,9 +5227,22 @@ class BreakpointTheme extends BaseTheme {
|
|
|
5262
5227
|
|
|
5263
5228
|
const defaultCardTheme = new ComponentTheme("div", "", {
|
|
5264
5229
|
size: {
|
|
5265
|
-
px: new PxTheme(
|
|
5266
|
-
|
|
5267
|
-
|
|
5230
|
+
px: new PxTheme({
|
|
5231
|
+
xs: "[--aspect-ratio:1]",
|
|
5232
|
+
sm: "[--aspect-ratio:1]",
|
|
5233
|
+
md: "[--aspect-ratio:1]",
|
|
5234
|
+
lg: "[--aspect-ratio:1]",
|
|
5235
|
+
xl: "[--aspect-ratio:1]",
|
|
5236
|
+
}),
|
|
5237
|
+
py: new PyTheme({
|
|
5238
|
+
xs: "[--py-unit:2]",
|
|
5239
|
+
sm: "[--py-unit:4]",
|
|
5240
|
+
md: "[--py-unit:6]",
|
|
5241
|
+
lg: "[--py-unit:8]",
|
|
5242
|
+
xl: "[--py-unit:10]",
|
|
5243
|
+
}),
|
|
5244
|
+
lineHeight: LineHeightTheme.createDefault(),
|
|
5245
|
+
gap: new GapTheme(false),
|
|
5268
5246
|
},
|
|
5269
5247
|
layout: {
|
|
5270
5248
|
...defaultLayoutsThemes,
|
|
@@ -5319,7 +5297,32 @@ const defaultDividerTheme = new ComponentTheme("div", "h-px w-full", {
|
|
|
5319
5297
|
layout: defaultLayoutsThemes,
|
|
5320
5298
|
}, themeDefaults.divider, DIVIDER_CATEGORIES);
|
|
5321
5299
|
|
|
5322
|
-
|
|
5300
|
+
class SizeTheme extends BaseTheme {
|
|
5301
|
+
constructor(sizeMap) {
|
|
5302
|
+
super();
|
|
5303
|
+
/** Extra-small size variant */
|
|
5304
|
+
this.xs = "";
|
|
5305
|
+
/** Small size variant */
|
|
5306
|
+
this.sm = "";
|
|
5307
|
+
/** Medium size variant (default) */
|
|
5308
|
+
this.md = "";
|
|
5309
|
+
/** Large size variant */
|
|
5310
|
+
this.lg = "";
|
|
5311
|
+
/** Extra-large size variant */
|
|
5312
|
+
this.xl = "";
|
|
5313
|
+
ComponentKeys.size.forEach((key) => {
|
|
5314
|
+
var _a;
|
|
5315
|
+
this[key] = (_a = sizeMap === null || sizeMap === void 0 ? void 0 : sizeMap[key]) !== null && _a !== void 0 ? _a : "";
|
|
5316
|
+
});
|
|
5317
|
+
}
|
|
5318
|
+
getClasses(extractedKeys) {
|
|
5319
|
+
var _a;
|
|
5320
|
+
const size = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md';
|
|
5321
|
+
return size ? [this[size]] : [''];
|
|
5322
|
+
}
|
|
5323
|
+
}
|
|
5324
|
+
|
|
5325
|
+
const defaultContainerTheme = new ComponentTheme("div", "mx-auto w-full", {
|
|
5323
5326
|
size: {
|
|
5324
5327
|
gap: new GapTheme(),
|
|
5325
5328
|
maxWidth: new SizeTheme({ xs: 'max-w-3xl', sm: 'max-w-4xl', md: 'max-w-5xl', lg: 'max-w-6xl', xl: 'max-w-7xl' }),
|
|
@@ -5386,22 +5389,21 @@ const defaultStackTheme = new ComponentTheme("div", "", {
|
|
|
5386
5389
|
}
|
|
5387
5390
|
}, themeDefaults.stack, STACK_CATEGORIES);
|
|
5388
5391
|
|
|
5389
|
-
const sectionAspectRatioClasses = {
|
|
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
|
-
};
|
|
5396
5392
|
const defaultSectionTheme = new ComponentTheme("div", "w-full", {
|
|
5397
5393
|
size: {
|
|
5398
|
-
px: new PxTheme(
|
|
5394
|
+
px: new PxTheme({
|
|
5395
|
+
xs: "[--aspect-ratio:2.5]",
|
|
5396
|
+
sm: "[--aspect-ratio:2]",
|
|
5397
|
+
md: "[--aspect-ratio:1.75]",
|
|
5398
|
+
lg: "[--aspect-ratio:1.6]",
|
|
5399
|
+
xl: "[--aspect-ratio:1.5]",
|
|
5400
|
+
}),
|
|
5399
5401
|
py: new PyTheme({
|
|
5400
|
-
xs: "[--py-unit:4]",
|
|
5401
|
-
sm: "[--py-unit:8]",
|
|
5402
|
-
md: "[--py-unit:12]",
|
|
5403
|
-
lg: "[--py-unit:16]",
|
|
5404
|
-
xl: "[--py-unit:20]",
|
|
5402
|
+
xs: "[--py-unit:4] max-laptop:[--py-unit:3] max-tablet:[--py-unit:2]",
|
|
5403
|
+
sm: "[--py-unit:8] max-laptop:[--py-unit:4] max-tablet:[--py-unit:2]",
|
|
5404
|
+
md: "[--py-unit:12] max-laptop:[--py-unit:6] max-tablet:[--py-unit:2]",
|
|
5405
|
+
lg: "[--py-unit:16] max-laptop:[--py-unit:8] max-tablet:[--py-unit:2]",
|
|
5406
|
+
xl: "[--py-unit:20] max-laptop:[--py-unit:10] max-tablet:[--py-unit:4]",
|
|
5405
5407
|
}),
|
|
5406
5408
|
gap: new GapTheme(),
|
|
5407
5409
|
breakpoint: new BreakpointTheme(),
|
|
@@ -5506,6 +5508,7 @@ const defaultCheckboxWrapperTheme = new ComponentTheme("span", "", {
|
|
|
5506
5508
|
const defaultLabelTheme = new ComponentTheme("label", "has-[input]:cursor-pointer cursor-default", {
|
|
5507
5509
|
size: {
|
|
5508
5510
|
text: new FontSizeTheme(),
|
|
5511
|
+
lineHeight: LineHeightTheme.createDefault(),
|
|
5509
5512
|
gap: new GapTheme(true),
|
|
5510
5513
|
},
|
|
5511
5514
|
appearance: {
|
|
@@ -5537,20 +5540,19 @@ const defaultImgTheme = new ComponentTheme("img", "object-cover", // Default to
|
|
|
5537
5540
|
}
|
|
5538
5541
|
}, themeDefaults.img, IMG_CATEGORIES);
|
|
5539
5542
|
|
|
5540
|
-
// Input aspect ratios (same as button)
|
|
5541
|
-
const inputAspectRatioClasses = {
|
|
5542
|
-
xs: "[--aspect-ratio:2]",
|
|
5543
|
-
sm: "[--aspect-ratio:2]",
|
|
5544
|
-
md: "[--aspect-ratio:2]",
|
|
5545
|
-
lg: "[--aspect-ratio:2]",
|
|
5546
|
-
xl: "[--aspect-ratio:2]",
|
|
5547
|
-
};
|
|
5548
5543
|
const defaultInputTheme = new ComponentTheme("input", "w-full transition-all duration-200", {
|
|
5549
5544
|
size: {
|
|
5550
|
-
px: new PxTheme(
|
|
5545
|
+
px: new PxTheme({
|
|
5546
|
+
xs: "[--aspect-ratio:2]",
|
|
5547
|
+
sm: "[--aspect-ratio:2]",
|
|
5548
|
+
md: "[--aspect-ratio:2]",
|
|
5549
|
+
lg: "[--aspect-ratio:2]",
|
|
5550
|
+
xl: "[--aspect-ratio:2]",
|
|
5551
|
+
}, true),
|
|
5551
5552
|
py: new PyTheme(uiPaddingClasses, true),
|
|
5552
5553
|
gap: new GapTheme(true),
|
|
5553
|
-
text: new
|
|
5554
|
+
text: new FontSizeTheme(),
|
|
5555
|
+
lineHeight: LineHeightTheme.createDefault(),
|
|
5554
5556
|
},
|
|
5555
5557
|
appearance: {
|
|
5556
5558
|
background: GenericVariantTheme.createSimpleUIElementBgAppearanceTheme(),
|
|
@@ -5865,5 +5867,5 @@ const List = forwardRef(function List(props, ref) {
|
|
|
5865
5867
|
return jsx(ThemedComponent, { ref: ref, theme: theme.list, ...props });
|
|
5866
5868
|
});
|
|
5867
5869
|
|
|
5868
|
-
export { ABSOLUTE, ACCENT, ACTIVE, APPEARANCE_CATEGORY, APPEARANCE_VALUES, BADGE_CATEGORIES, BASE, BLACK, BLOCK, BOLD, BORDER, BORDER_B, BORDER_KEYS, BORDER_L, BORDER_R, BORDER_T, BORDER_VALUES, BORDER_X, BORDER_Y, BREAKPOINT, BREAKPOINT_VALUES, BUTTON_CATEGORIES, Badge, Button, CAPITALIZE, CARD_CATEGORIES, CHECKBOX_CATEGORIES, CHIP_CATEGORIES, CODE_CATEGORIES, COLUMN, COLUMN_REVERSE, COL_CATEGORIES, COMPONENT, COMPONENT_PROPS_CATEGORY, CONTAINER_CATEGORIES, CONTENTS, Card, Checkbox, Chip, Code, Col, ComponentCategories, ComponentKeys, Container, DANGER, DECIMAL, DEFAULT, DISC, DISPLAY_VALUES, DIVIDER_CATEGORIES, Divider, EXTRABOLD, EXTRALIGHT, FILLED, FIXED, FLEX, FLEX_DIRECTION_VALUES, FLEX_NO_WRAP, FLEX_WRAP, FLEX_WRAP_REVERSE, FOCUS, FOCUS_VISIBLE, FOCUS_VISIBLE_OUTLINE, FOCUS_VISIBLE_VALUES, FONT_FAMILY_VALUES, FONT_STYLE_VALUES, FONT_WEIGHT_VALUES, GAP, GAP_VALUES, GRID, GRID_CATEGORIES, Grid2, Grid3, Grid4, Grid5, Grid6, HIDDEN, HIDE_VALUES, HOVER, IMG_CATEGORIES, INFO, INLINE, INLINE_BLOCK, INLINE_FLEX, INLINE_GRID, INPUT_CATEGORIES, INTERACTIVE_CATEGORIES, ITALIC, ITEMS_BASELINE, ITEMS_CENTER, ITEMS_END, ITEMS_START, ITEMS_STRETCH, ITEMS_VALUES, Img, Input, JUSTIFY_AROUND, JUSTIFY_BASELINE, JUSTIFY_BETWEEN, JUSTIFY_CENTER, JUSTIFY_END, JUSTIFY_EVENLY, JUSTIFY_START, JUSTIFY_STRETCH, JUSTIFY_VALUES, LABEL_CATEGORIES, LAYOUT_CORE, LAYOUT_FLEX, LAYOUT_FULL, LG,
|
|
5870
|
+
export { ABSOLUTE, ACCENT, ACTIVE, APPEARANCE_CATEGORY, APPEARANCE_VALUES, BADGE_CATEGORIES, BASE, BLACK, BLOCK, BOLD, BORDER, BORDER_B, BORDER_KEYS, BORDER_L, BORDER_R, BORDER_T, BORDER_VALUES, BORDER_X, BORDER_Y, BREAKPOINT, BREAKPOINT_VALUES, BUTTON_CATEGORIES, Badge, Button, CAPITALIZE, CARD_CATEGORIES, CHECKBOX_CATEGORIES, CHIP_CATEGORIES, CODE_CATEGORIES, COLUMN, COLUMN_REVERSE, COL_CATEGORIES, COMPONENT, COMPONENT_PROPS_CATEGORY, CONTAINER_CATEGORIES, CONTENTS, Card, Checkbox, Chip, Code, Col, ComponentCategories, ComponentKeys, Container, DANGER, DECIMAL, DEFAULT, DESKTOP_COL, DESKTOP_HIDE, DISC, DISPLAY_VALUES, DIVIDER_CATEGORIES, Divider, EXTRABOLD, EXTRALIGHT, FILLED, FIXED, FLEX, FLEX_DIRECTION_VALUES, FLEX_NO_WRAP, FLEX_WRAP, FLEX_WRAP_REVERSE, FOCUS, FOCUS_VISIBLE, FOCUS_VISIBLE_OUTLINE, FOCUS_VISIBLE_VALUES, FONT_FAMILY_VALUES, FONT_STYLE_VALUES, FONT_WEIGHT_VALUES, GAP, GAP_VALUES, GRID, GRID_CATEGORIES, Grid2, Grid3, Grid4, Grid5, Grid6, HIDDEN, HIDE_VALUES, HOVER, IMG_CATEGORIES, INFO, INLINE, INLINE_BLOCK, INLINE_FLEX, INLINE_GRID, INPUT_CATEGORIES, INTERACTIVE_CATEGORIES, ITALIC, ITEMS_BASELINE, ITEMS_CENTER, ITEMS_END, ITEMS_START, ITEMS_STRETCH, ITEMS_VALUES, Img, Input, JUSTIFY_AROUND, JUSTIFY_BASELINE, JUSTIFY_BETWEEN, JUSTIFY_CENTER, JUSTIFY_END, JUSTIFY_EVENLY, JUSTIFY_START, JUSTIFY_STRETCH, JUSTIFY_VALUES, LABEL_CATEGORIES, LAPTOP_COL, LAPTOP_HIDE, LAYOUT_CORE, LAYOUT_FLEX, LAYOUT_FULL, LG, LIGHT, LINE_THROUGH, LINK, LIST_CATEGORIES, LIST_STYLE, LIST_STYLE_VALUES, LOWERCASE, Label, Link, List, ListItem, MD, MEDIUM, MOBILE_COL, MOBILE_HIDE, MODE_VALUES, MONO, ModeKeys, NORMAL, NORMAL_CASE, NOT_ITALIC, NO_BORDER, NO_FOCUS_VISIBLE_OUTLINE, NO_GAP, NO_PADDING, NO_RING, NO_SHADOW, NO_UNDERLINE, OUTLINE, OVERFLOW_AUTO, OVERFLOW_CLIP, OVERFLOW_HIDDEN, OVERFLOW_SCROLL, OVERFLOW_VALUES, OVERFLOW_VISIBLE, OVERFLOW_X_AUTO, OVERFLOW_X_CLIP, OVERFLOW_X_HIDDEN, OVERFLOW_X_SCROLL, OVERFLOW_X_VISIBLE, OVERFLOW_Y_AUTO, OVERFLOW_Y_CLIP, OVERFLOW_Y_HIDDEN, OVERFLOW_Y_SCROLL, OVERFLOW_Y_VISIBLE, OVERLINE, PADDING, PADDING_VALUES, PILL, POSITION_VALUES, PRIMARY, PageTitle, RELATIVE, REVERSE, REVERSE_VALUES, RING, RING_VALUES, ROUNDED, ROW, ROW_CATEGORIES, ROW_REVERSE, Row, SANS, SECONDARY, SECTION_CATEGORIES, SEMIBOLD, SERIF, SHADOW, SHADOW_VALUES, SHAPE, SHAPE_VALUES, SHARP, SIZE_VALUES, SM, STACK_CATEGORIES, STATIC, STICKY, SUCCESS, Section, SectionTitle, Stack, TABLE, TABLET_COL, TABLET_HIDE, TABLE_CELL, TERTIARY, TEXT_ALIGN_VALUES, TEXT_CENTER, TEXT_DECORATION_VALUES, TEXT_JUSTIFY, TEXT_LEFT, TEXT_RIGHT, TEXT_TRANSFORM_VALUES, THIN, TRANSPARENT, TRANSPARENT_VALUES, TYPOGRAPHY_CATEGORIES, TYPOGRAPHY_FULL, TYPOGRAPHY_STYLE, Text, ThemeProvider, Title, UNDERLINE, UPPERCASE, VARIANT, VARIANT_VALUES, VISUAL_CORE, VISUAL_DECORATION, VISUAL_DECORATION_LAYOUT, VISUAL_FULL, VISUAL_LAYOUT, WARNING, WRAP_VALUES, XL, XS, defaultTheme, themeDefaults, useTheme };
|
|
5869
5871
|
//# sourceMappingURL=index.esm.js.map
|