@vaneui/md 0.3.1-alpha.20260104201635.7d81a8e → 0.9.0-alpha.20260105192120.1be78c6
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/index.esm.js +99 -135
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +99 -135
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +257 -425
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -8560,10 +8560,8 @@ const LAYOUT_FLEX = ['wrap', 'gap', 'flexDirection', 'reverse'];
|
|
|
8560
8560
|
const PADDING = ['padding'];
|
|
8561
8561
|
/** Responsive breakpoint properties for different screen sizes */
|
|
8562
8562
|
const BREAKPOINT = ['breakpoint'];
|
|
8563
|
-
/** Responsive CSS variable switching for automatic breakpoint adaptation */
|
|
8564
|
-
const RESPONSIVE = ['responsive'];
|
|
8565
8563
|
/** Core visual properties including appearance colors and transparency */
|
|
8566
|
-
const VISUAL_CORE = ['appearance'
|
|
8564
|
+
const VISUAL_CORE = ['appearance'];
|
|
8567
8565
|
/** Border properties for visual decoration */
|
|
8568
8566
|
const BORDER = ['border'];
|
|
8569
8567
|
/** Visual decoration properties for shadows and focus rings */
|
|
@@ -8617,8 +8615,6 @@ const ComponentKeys = {
|
|
|
8617
8615
|
padding: ['padding', 'noPadding'],
|
|
8618
8616
|
/** CSS positioning: relative, absolute, fixed, sticky, static */
|
|
8619
8617
|
position: ['relative', 'absolute', 'fixed', 'sticky', 'static'],
|
|
8620
|
-
/** Responsive CSS variable switching: responsive (enabled) */
|
|
8621
|
-
responsive: ['responsive'],
|
|
8622
8618
|
/** Reverse the order of flex items */
|
|
8623
8619
|
reverse: ['reverse'],
|
|
8624
8620
|
/** Focus ring visibility: ring (show) or noRing (hide) */
|
|
@@ -8637,8 +8633,6 @@ const ComponentKeys = {
|
|
|
8637
8633
|
textDecoration: ['underline', 'lineThrough', 'noUnderline', 'overline'],
|
|
8638
8634
|
/** Text case transformation: UPPERCASE, lowercase, Capitalize, normalCase */
|
|
8639
8635
|
textTransform: ['uppercase', 'lowercase', 'capitalize', 'normalCase'],
|
|
8640
|
-
/** Make background (layout/UI) or text (typography) transparent */
|
|
8641
|
-
transparent: ['transparent'],
|
|
8642
8636
|
/** Style variant: filled (solid background) or outline (border only) */
|
|
8643
8637
|
variant: ['filled', 'outline'],
|
|
8644
8638
|
/** Flex item wrapping behavior: wrap, no-wrap, or wrap-reverse */
|
|
@@ -8667,7 +8661,7 @@ const CHIP_CATEGORIES = INTERACTIVE_CATEGORIES;
|
|
|
8667
8661
|
const CODE_CATEGORIES = INTERACTIVE_CATEGORIES;
|
|
8668
8662
|
/** Typography component categories */
|
|
8669
8663
|
/** Categories for typography components like Text, Title, Link */
|
|
8670
|
-
const TYPOGRAPHY_CATEGORIES = [...TYPOGRAPHY_FULL, ...LAYOUT_CORE, ...VISUAL_CORE, ...VARIANT
|
|
8664
|
+
const TYPOGRAPHY_CATEGORIES = [...TYPOGRAPHY_FULL, ...LAYOUT_CORE, ...VISUAL_CORE, ...VARIANT];
|
|
8671
8665
|
/** Categories for list components with typography and list-specific styling */
|
|
8672
8666
|
const LIST_CATEGORIES = [...TYPOGRAPHY_FULL, ...LIST_STYLE, ...LAYOUT_CORE, ...VISUAL_CORE, ...PADDING, ...VARIANT];
|
|
8673
8667
|
/** Layout component categories */
|
|
@@ -8686,7 +8680,7 @@ const CARD_CATEGORIES = [...TYPOGRAPHY_FULL, ...LAYOUT_FULL, ...BREAKPOINT, ...V
|
|
|
8686
8680
|
/** Categories for divider components with basic layout and visual properties */
|
|
8687
8681
|
const DIVIDER_CATEGORIES = [...LAYOUT_CORE, ...VISUAL_CORE, ...PADDING, ...VARIANT];
|
|
8688
8682
|
/** Categories for section layout components with full responsive support */
|
|
8689
|
-
const SECTION_CATEGORIES = [...LAYOUT_FULL, ...VISUAL_LAYOUT, ...PADDING, ...BREAKPOINT, ...VARIANT
|
|
8683
|
+
const SECTION_CATEGORIES = [...LAYOUT_FULL, ...VISUAL_LAYOUT, ...PADDING, ...BREAKPOINT, ...VARIANT];
|
|
8690
8684
|
/** Form component categories */
|
|
8691
8685
|
/** Categories for checkbox form components */
|
|
8692
8686
|
const CHECKBOX_CATEGORIES = [...LAYOUT_CORE, ...VISUAL_CORE, ...BORDER, ...VISUAL_DECORATION, ...SHAPE, ...VARIANT];
|
|
@@ -11703,13 +11697,14 @@ const defaultTypographyThemes = {
|
|
|
11703
11697
|
textAlign: new TextAlignTheme()
|
|
11704
11698
|
};
|
|
11705
11699
|
class ComponentTheme {
|
|
11706
|
-
constructor(tag, base, themes, defaults = {}, categories, tagFunction) {
|
|
11700
|
+
constructor(tag, base, themes, defaults = {}, categories, tagFunction, vaneType) {
|
|
11707
11701
|
this.tag = tag;
|
|
11708
11702
|
this.base = base;
|
|
11709
11703
|
this.defaults = defaults;
|
|
11710
11704
|
this.extraClasses = {};
|
|
11711
11705
|
this.categories = categories;
|
|
11712
11706
|
this.tagFunction = tagFunction;
|
|
11707
|
+
this.vaneType = vaneType;
|
|
11713
11708
|
// Type assertion: we trust that all default themes provide complete objects
|
|
11714
11709
|
this.themes = themes;
|
|
11715
11710
|
}
|
|
@@ -11728,7 +11723,7 @@ class ComponentTheme {
|
|
|
11728
11723
|
}
|
|
11729
11724
|
}
|
|
11730
11725
|
// No need for border/noBorder mutual exclusion logic anymore
|
|
11731
|
-
// since noBorder is now part of the border category and
|
|
11726
|
+
// since noBorder is now part of the border category and
|
|
11732
11727
|
// pickFirstTruthyKeyByCategory handles the priority naturally
|
|
11733
11728
|
const walk = (map) => {
|
|
11734
11729
|
for (const key of Object.keys(map)) {
|
|
@@ -11786,6 +11781,9 @@ class ComponentTheme {
|
|
|
11786
11781
|
const finalClasses = twMerge(...themeGeneratedClasses, className);
|
|
11787
11782
|
// Build data attributes for key categories
|
|
11788
11783
|
const dataAttributes = {};
|
|
11784
|
+
if (this.vaneType) {
|
|
11785
|
+
dataAttributes['data-vane-type'] = this.vaneType;
|
|
11786
|
+
}
|
|
11789
11787
|
if (extractedKeys.size) {
|
|
11790
11788
|
dataAttributes['data-size'] = extractedKeys.size;
|
|
11791
11789
|
}
|
|
@@ -11795,9 +11793,6 @@ class ComponentTheme {
|
|
|
11795
11793
|
if (extractedKeys.variant) {
|
|
11796
11794
|
dataAttributes['data-variant'] = extractedKeys.variant;
|
|
11797
11795
|
}
|
|
11798
|
-
if (extractedKeys.transparent) {
|
|
11799
|
-
dataAttributes['data-transparent'] = 'true';
|
|
11800
|
-
}
|
|
11801
11796
|
return {
|
|
11802
11797
|
Tag: componentTag,
|
|
11803
11798
|
finalClasses,
|
|
@@ -11807,35 +11802,24 @@ class ComponentTheme {
|
|
|
11807
11802
|
}
|
|
11808
11803
|
|
|
11809
11804
|
/**
|
|
11810
|
-
* Font size theme -
|
|
11811
|
-
* CSS variable values (--fs-unit) are set
|
|
11812
|
-
*
|
|
11813
|
-
*
|
|
11814
|
-
* When the 'responsive' prop is set, adds Tailwind classes to switch
|
|
11815
|
-
* between breakpoint-specific variables for automatic size adaptation.
|
|
11805
|
+
* Font size theme - switches --fs-unit via breakpoint classes.
|
|
11806
|
+
* CSS variable values (--fs-unit-desktop/tablet/mobile) are set in vars.css.
|
|
11807
|
+
* The formula --fs = --fs-unit * --fs-base is computed once in CSS.
|
|
11816
11808
|
*/
|
|
11817
11809
|
class FontSizeTheme extends BaseTheme {
|
|
11818
11810
|
constructor() {
|
|
11819
11811
|
super(...arguments);
|
|
11820
|
-
/**
|
|
11812
|
+
/** Desktop breakpoint unit switch */
|
|
11813
|
+
this.desktop = "[--fs-unit:var(--fs-unit-desktop)]";
|
|
11814
|
+
/** Tablet breakpoint unit switch */
|
|
11815
|
+
this.tablet = "max-tablet:[--fs-unit:var(--fs-unit-tablet)]";
|
|
11816
|
+
/** Mobile breakpoint unit switch */
|
|
11817
|
+
this.mobile = "max-mobile:[--fs-unit:var(--fs-unit-mobile)]";
|
|
11818
|
+
/** Consumer class */
|
|
11821
11819
|
this.fontSize = "text-(length:--fs)";
|
|
11822
|
-
/** Responsive desktop unit class */
|
|
11823
|
-
this.responsiveDesktop = "[--fs-unit:var(--fs-unit-desktop)]";
|
|
11824
|
-
/** Responsive laptop unit class */
|
|
11825
|
-
this.responsiveTablet = "max-tablet:[--fs-unit:var(--fs-unit-tablet)]";
|
|
11826
|
-
/** Responsive tablet unit class */
|
|
11827
|
-
this.responsiveMobile = "max-mobile:[--fs-unit:var(--fs-unit-mobile)]";
|
|
11828
11820
|
}
|
|
11829
|
-
getClasses(
|
|
11830
|
-
|
|
11831
|
-
return [
|
|
11832
|
-
this.responsiveDesktop,
|
|
11833
|
-
this.responsiveTablet,
|
|
11834
|
-
this.responsiveMobile,
|
|
11835
|
-
this.fontSize
|
|
11836
|
-
];
|
|
11837
|
-
}
|
|
11838
|
-
return [this.fontSize];
|
|
11821
|
+
getClasses(_extractedKeys) {
|
|
11822
|
+
return [this.desktop, this.tablet, this.mobile, this.fontSize];
|
|
11839
11823
|
}
|
|
11840
11824
|
}
|
|
11841
11825
|
|
|
@@ -11856,36 +11840,25 @@ class LineHeightTheme extends BaseTheme {
|
|
|
11856
11840
|
}
|
|
11857
11841
|
|
|
11858
11842
|
/**
|
|
11859
|
-
* Gap theme -
|
|
11860
|
-
* CSS variable values (--gap-unit) are set
|
|
11861
|
-
*
|
|
11862
|
-
*
|
|
11863
|
-
* When the 'responsive' prop is set, adds Tailwind classes to switch
|
|
11864
|
-
* between breakpoint-specific variables for automatic size adaptation.
|
|
11843
|
+
* Gap theme - switches --gap-unit via breakpoint classes.
|
|
11844
|
+
* CSS variable values (--gap-unit-desktop/tablet/mobile) are set in vars.css.
|
|
11845
|
+
* The formula --gap = --gap-unit * --spacing is computed once in CSS.
|
|
11865
11846
|
*/
|
|
11866
11847
|
class GapTheme extends BaseTheme {
|
|
11867
11848
|
constructor() {
|
|
11868
11849
|
super(...arguments);
|
|
11869
|
-
/**
|
|
11850
|
+
/** Desktop breakpoint unit switch */
|
|
11851
|
+
this.desktop = "[--gap-unit:var(--gap-unit-desktop)]";
|
|
11852
|
+
/** Tablet breakpoint unit switch */
|
|
11853
|
+
this.tablet = "max-tablet:[--gap-unit:var(--gap-unit-tablet)]";
|
|
11854
|
+
/** Mobile breakpoint unit switch */
|
|
11855
|
+
this.mobile = "max-mobile:[--gap-unit:var(--gap-unit-mobile)]";
|
|
11856
|
+
/** Consumer class */
|
|
11870
11857
|
this.gap = "gap-(--gap)";
|
|
11871
|
-
/** Responsive desktop unit class */
|
|
11872
|
-
this.responsiveDesktop = "[--gap-unit:var(--gap-unit-desktop)]";
|
|
11873
|
-
/** Responsive laptop unit class */
|
|
11874
|
-
this.responsiveTablet = "max-tablet:[--gap-unit:var(--gap-unit-tablet)]";
|
|
11875
|
-
/** Responsive tablet unit class */
|
|
11876
|
-
this.responsiveMobile = "max-mobile:[--gap-unit:var(--gap-unit-mobile)]";
|
|
11877
11858
|
}
|
|
11878
11859
|
getClasses(extractedKeys) {
|
|
11879
11860
|
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.gap) === 'gap') {
|
|
11880
|
-
|
|
11881
|
-
return [
|
|
11882
|
-
this.responsiveDesktop,
|
|
11883
|
-
this.responsiveTablet,
|
|
11884
|
-
this.responsiveMobile,
|
|
11885
|
-
this.gap
|
|
11886
|
-
];
|
|
11887
|
-
}
|
|
11888
|
-
return [this.gap];
|
|
11861
|
+
return [this.desktop, this.tablet, this.mobile, this.gap];
|
|
11889
11862
|
}
|
|
11890
11863
|
return [];
|
|
11891
11864
|
}
|
|
@@ -12003,55 +11976,52 @@ class FocusVisibleTheme extends BaseTheme {
|
|
|
12003
11976
|
}
|
|
12004
11977
|
|
|
12005
11978
|
/**
|
|
12006
|
-
* Horizontal padding theme -
|
|
12007
|
-
*
|
|
12008
|
-
*
|
|
11979
|
+
* Horizontal padding theme - switches --py-unit via breakpoint classes.
|
|
11980
|
+
* The formula --px = --aspect-ratio * --py-unit * --spacing is computed in CSS.
|
|
11981
|
+
* Uses same --py-unit as PyTheme since px is derived from py.
|
|
12009
11982
|
*/
|
|
12010
11983
|
class PxTheme extends BaseTheme {
|
|
12011
11984
|
constructor() {
|
|
12012
11985
|
super(...arguments);
|
|
12013
|
-
/**
|
|
11986
|
+
/** Desktop breakpoint unit switch */
|
|
11987
|
+
this.desktop = "[--py-unit:var(--py-unit-desktop)]";
|
|
11988
|
+
/** Tablet breakpoint unit switch */
|
|
11989
|
+
this.tablet = "max-tablet:[--py-unit:var(--py-unit-tablet)]";
|
|
11990
|
+
/** Mobile breakpoint unit switch */
|
|
11991
|
+
this.mobile = "max-mobile:[--py-unit:var(--py-unit-mobile)]";
|
|
11992
|
+
/** Consumer class */
|
|
12014
11993
|
this.px = "px-(--px)";
|
|
12015
11994
|
}
|
|
12016
11995
|
getClasses(extractedKeys) {
|
|
12017
11996
|
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === 'padding' || (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === undefined) {
|
|
12018
|
-
|
|
11997
|
+
// Note: unit switching classes are same as py, but we still emit them
|
|
11998
|
+
// in case px is used without py. twMerge will dedupe if both are used.
|
|
11999
|
+
return [this.desktop, this.tablet, this.mobile, this.px];
|
|
12019
12000
|
}
|
|
12020
12001
|
return [];
|
|
12021
12002
|
}
|
|
12022
12003
|
}
|
|
12023
12004
|
|
|
12024
12005
|
/**
|
|
12025
|
-
* Vertical padding theme -
|
|
12026
|
-
* CSS variable values (--py-unit) are set
|
|
12027
|
-
*
|
|
12028
|
-
*
|
|
12029
|
-
* When the 'responsive' prop is set, adds Tailwind classes to switch
|
|
12030
|
-
* between breakpoint-specific variables for automatic size adaptation.
|
|
12006
|
+
* Vertical padding theme - switches --py-unit via breakpoint classes.
|
|
12007
|
+
* CSS variable values (--py-unit-desktop/tablet/mobile) are set in vars.css.
|
|
12008
|
+
* The formula --py = --py-unit * --spacing is computed once in CSS.
|
|
12031
12009
|
*/
|
|
12032
12010
|
class PyTheme extends BaseTheme {
|
|
12033
12011
|
constructor() {
|
|
12034
12012
|
super(...arguments);
|
|
12035
|
-
/**
|
|
12013
|
+
/** Desktop breakpoint unit switch */
|
|
12014
|
+
this.desktop = "[--py-unit:var(--py-unit-desktop)]";
|
|
12015
|
+
/** Tablet breakpoint unit switch */
|
|
12016
|
+
this.tablet = "max-tablet:[--py-unit:var(--py-unit-tablet)]";
|
|
12017
|
+
/** Mobile breakpoint unit switch */
|
|
12018
|
+
this.mobile = "max-mobile:[--py-unit:var(--py-unit-mobile)]";
|
|
12019
|
+
/** Consumer class */
|
|
12036
12020
|
this.py = "py-(--py)";
|
|
12037
|
-
/** Responsive desktop unit class */
|
|
12038
|
-
this.responsiveDesktop = "[--py-unit:var(--py-unit-desktop)]";
|
|
12039
|
-
/** Responsive laptop unit class */
|
|
12040
|
-
this.responsiveTablet = "max-tablet:[--py-unit:var(--py-unit-tablet)]";
|
|
12041
|
-
/** Responsive tablet unit class */
|
|
12042
|
-
this.responsiveMobile = "max-mobile:[--py-unit:var(--py-unit-mobile)]";
|
|
12043
12021
|
}
|
|
12044
12022
|
getClasses(extractedKeys) {
|
|
12045
12023
|
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === 'padding' || (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === undefined) {
|
|
12046
|
-
|
|
12047
|
-
return [
|
|
12048
|
-
this.responsiveDesktop,
|
|
12049
|
-
this.responsiveTablet,
|
|
12050
|
-
this.responsiveMobile,
|
|
12051
|
-
this.py
|
|
12052
|
-
];
|
|
12053
|
-
}
|
|
12054
|
-
return [this.py];
|
|
12024
|
+
return [this.desktop, this.tablet, this.mobile, this.py];
|
|
12055
12025
|
}
|
|
12056
12026
|
return [];
|
|
12057
12027
|
}
|
|
@@ -12100,8 +12070,8 @@ class SimpleConsumerTheme extends BaseTheme {
|
|
|
12100
12070
|
if (this.category === 'focusVisible' && (extractedKeys.focusVisible === 'noFocusVisible' || extractedKeys.focusVisible === undefined)) {
|
|
12101
12071
|
return [];
|
|
12102
12072
|
}
|
|
12103
|
-
// Only output classes if an appearance
|
|
12104
|
-
if (!this.alwaysOutput && !(extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.appearance)
|
|
12073
|
+
// Only output classes if an appearance is set (unless alwaysOutput is true)
|
|
12074
|
+
if (!this.alwaysOutput && !(extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.appearance)) {
|
|
12105
12075
|
return [];
|
|
12106
12076
|
}
|
|
12107
12077
|
const classes = [];
|
|
@@ -12121,43 +12091,42 @@ class SimpleConsumerTheme extends BaseTheme {
|
|
|
12121
12091
|
}
|
|
12122
12092
|
}
|
|
12123
12093
|
|
|
12094
|
+
/**
|
|
12095
|
+
* Shadow theme using CSS variables for customizable shadows.
|
|
12096
|
+
*
|
|
12097
|
+
* Shadow variables (--shadow-base, --shadow-hover) are set via CSS rules in vars.css
|
|
12098
|
+
* based on data-vane-type and data-size attributes.
|
|
12099
|
+
* This theme only outputs the consumer classes that use those variables.
|
|
12100
|
+
* - UI: shadow-(--shadow-base) + hover:shadow-(--shadow-hover) (interactive with hover)
|
|
12101
|
+
* - Layout: shadow-(--shadow-base) (static, no hover)
|
|
12102
|
+
*/
|
|
12124
12103
|
class ShadowAppearanceTheme extends BaseTheme {
|
|
12125
|
-
constructor(
|
|
12104
|
+
constructor(shadowClasses) {
|
|
12126
12105
|
super();
|
|
12127
|
-
|
|
12128
|
-
this[key] = initial;
|
|
12129
|
-
});
|
|
12106
|
+
this.shadowClasses = shadowClasses;
|
|
12130
12107
|
}
|
|
12131
12108
|
getClasses(extractedKeys) {
|
|
12132
|
-
var _a, _b;
|
|
12133
|
-
const appearance = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.appearance) !== null && _a !== void 0 ? _a : 'primary';
|
|
12134
|
-
const size = (_b = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _b !== void 0 ? _b : 'md';
|
|
12135
12109
|
const shadow = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.shadow;
|
|
12136
12110
|
return shadow === undefined || shadow === 'noShadow'
|
|
12137
12111
|
? []
|
|
12138
|
-
:
|
|
12112
|
+
: this.shadowClasses;
|
|
12139
12113
|
}
|
|
12140
12114
|
static createUITheme() {
|
|
12141
|
-
return new ShadowAppearanceTheme(ShadowAppearanceTheme.
|
|
12115
|
+
return new ShadowAppearanceTheme(ShadowAppearanceTheme.uiShadowClasses);
|
|
12142
12116
|
}
|
|
12143
12117
|
static createLayoutTheme() {
|
|
12144
|
-
return new ShadowAppearanceTheme(ShadowAppearanceTheme.
|
|
12118
|
+
return new ShadowAppearanceTheme(ShadowAppearanceTheme.layoutShadowClasses);
|
|
12145
12119
|
}
|
|
12146
12120
|
}
|
|
12147
|
-
|
|
12148
|
-
|
|
12149
|
-
|
|
12150
|
-
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
|
|
12156
|
-
sm: { base: "shadow-xs", hover: "", active: "", focus: "", focusVisible: "" },
|
|
12157
|
-
md: { base: "shadow-sm", hover: "", active: "", focus: "", focusVisible: "" },
|
|
12158
|
-
lg: { base: "shadow-md", hover: "", active: "", focus: "", focusVisible: "" },
|
|
12159
|
-
xl: { base: "shadow-lg", hover: "", active: "", focus: "", focusVisible: "" }
|
|
12160
|
-
};
|
|
12121
|
+
// UI shadows: consumer classes (CSS sets variables based on data-vane-type + data-size)
|
|
12122
|
+
ShadowAppearanceTheme.uiShadowClasses = [
|
|
12123
|
+
"shadow-(--shadow-base)",
|
|
12124
|
+
"hover:shadow-(--shadow-hover)"
|
|
12125
|
+
];
|
|
12126
|
+
// Layout shadows: consumer class only (no hover)
|
|
12127
|
+
ShadowAppearanceTheme.layoutShadowClasses = [
|
|
12128
|
+
"shadow-(--shadow-base)"
|
|
12129
|
+
];
|
|
12161
12130
|
|
|
12162
12131
|
class WrapTheme extends BaseTheme {
|
|
12163
12132
|
constructor() {
|
|
@@ -12282,7 +12251,6 @@ const themeDefaults = {
|
|
|
12282
12251
|
noBorder: true,
|
|
12283
12252
|
noRing: true,
|
|
12284
12253
|
noShadow: true,
|
|
12285
|
-
responsive: true,
|
|
12286
12254
|
sharp: true,
|
|
12287
12255
|
},
|
|
12288
12256
|
stack: {
|
|
@@ -12403,7 +12371,6 @@ const themeDefaults = {
|
|
|
12403
12371
|
sans: true,
|
|
12404
12372
|
semibold: true,
|
|
12405
12373
|
textLeft: true,
|
|
12406
|
-
responsive: true,
|
|
12407
12374
|
outline: true,
|
|
12408
12375
|
primary: true,
|
|
12409
12376
|
},
|
|
@@ -12412,7 +12379,6 @@ const themeDefaults = {
|
|
|
12412
12379
|
sans: true,
|
|
12413
12380
|
semibold: true,
|
|
12414
12381
|
textLeft: true,
|
|
12415
|
-
responsive: true,
|
|
12416
12382
|
outline: true,
|
|
12417
12383
|
primary: true,
|
|
12418
12384
|
},
|
|
@@ -12421,7 +12387,6 @@ const themeDefaults = {
|
|
|
12421
12387
|
sans: true,
|
|
12422
12388
|
semibold: true,
|
|
12423
12389
|
textLeft: true,
|
|
12424
|
-
responsive: true,
|
|
12425
12390
|
outline: true,
|
|
12426
12391
|
primary: true,
|
|
12427
12392
|
},
|
|
@@ -12462,7 +12427,6 @@ const themeDefaults = {
|
|
|
12462
12427
|
filled: true,
|
|
12463
12428
|
},
|
|
12464
12429
|
wrapper: {
|
|
12465
|
-
transparent: true,
|
|
12466
12430
|
md: true,
|
|
12467
12431
|
inlineGrid: true,
|
|
12468
12432
|
itemsCenter: true,
|
|
@@ -12538,7 +12502,7 @@ const defaultButtonTheme = new ComponentTheme("button", "vane-button w-fit h-fit
|
|
|
12538
12502
|
}, themeDefaults.button, BUTTON_CATEGORIES, (props) => {
|
|
12539
12503
|
// Determine tag based on href prop
|
|
12540
12504
|
return props.href ? "a" : "button";
|
|
12541
|
-
});
|
|
12505
|
+
}, 'ui');
|
|
12542
12506
|
|
|
12543
12507
|
const defaultBadgeTheme = new ComponentTheme("span", "vane-badge w-fit h-fit transition-all duration-200 whitespace-nowrap", {
|
|
12544
12508
|
size: {
|
|
@@ -12568,7 +12532,7 @@ const defaultBadgeTheme = new ComponentTheme("span", "vane-badge w-fit h-fit tra
|
|
|
12568
12532
|
typography: defaultTypographyThemes,
|
|
12569
12533
|
}, themeDefaults.badge, BADGE_CATEGORIES, (props) => {
|
|
12570
12534
|
return props.href ? "a" : "span";
|
|
12571
|
-
});
|
|
12535
|
+
}, 'ui');
|
|
12572
12536
|
|
|
12573
12537
|
const defaultChipTheme = new ComponentTheme("span", "vane-chip w-fit h-fit transition-all duration-200 whitespace-nowrap", {
|
|
12574
12538
|
size: {
|
|
@@ -12598,7 +12562,7 @@ const defaultChipTheme = new ComponentTheme("span", "vane-chip w-fit h-fit trans
|
|
|
12598
12562
|
typography: defaultTypographyThemes,
|
|
12599
12563
|
}, themeDefaults.chip, CHIP_CATEGORIES, (props) => {
|
|
12600
12564
|
return props.href ? "a" : "span";
|
|
12601
|
-
});
|
|
12565
|
+
}, 'ui');
|
|
12602
12566
|
|
|
12603
12567
|
const defaultCodeTheme = new ComponentTheme("code", "vane-code", {
|
|
12604
12568
|
size: {
|
|
@@ -12626,7 +12590,7 @@ const defaultCodeTheme = new ComponentTheme("code", "vane-code", {
|
|
|
12626
12590
|
flexDirection: new DirectionTheme(),
|
|
12627
12591
|
},
|
|
12628
12592
|
typography: defaultTypographyThemes,
|
|
12629
|
-
}, themeDefaults.code, CODE_CATEGORIES);
|
|
12593
|
+
}, themeDefaults.code, CODE_CATEGORIES, undefined, 'ui');
|
|
12630
12594
|
|
|
12631
12595
|
/**
|
|
12632
12596
|
* Link-specific variant theme that handles text colors
|
|
@@ -12828,7 +12792,7 @@ const defaultCardTheme = new ComponentTheme("div", "vane-card", {
|
|
|
12828
12792
|
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12829
12793
|
},
|
|
12830
12794
|
typography: defaultTypographyThemes,
|
|
12831
|
-
}, themeDefaults.card, CARD_CATEGORIES);
|
|
12795
|
+
}, themeDefaults.card, CARD_CATEGORIES, undefined, 'layout');
|
|
12832
12796
|
|
|
12833
12797
|
const defaultRowTheme = new ComponentTheme("div", "vane-row", {
|
|
12834
12798
|
size: {
|
|
@@ -12850,7 +12814,7 @@ const defaultRowTheme = new ComponentTheme("div", "vane-row", {
|
|
|
12850
12814
|
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12851
12815
|
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
12852
12816
|
}
|
|
12853
|
-
}, themeDefaults.row, ROW_CATEGORIES);
|
|
12817
|
+
}, themeDefaults.row, ROW_CATEGORIES, undefined, 'layout');
|
|
12854
12818
|
|
|
12855
12819
|
const defaultDividerTheme = new ComponentTheme("div", "vane-divider h-(--bw) w-full", {
|
|
12856
12820
|
size: {
|
|
@@ -12861,7 +12825,7 @@ const defaultDividerTheme = new ComponentTheme("div", "vane-divider h-(--bw) w-f
|
|
|
12861
12825
|
background: new SimpleConsumerTheme({ base: '[background:var(--border-color)]' }, 'bg'),
|
|
12862
12826
|
},
|
|
12863
12827
|
layout: defaultLayoutsThemes,
|
|
12864
|
-
}, themeDefaults.divider, DIVIDER_CATEGORIES);
|
|
12828
|
+
}, themeDefaults.divider, DIVIDER_CATEGORIES, undefined, 'layout');
|
|
12865
12829
|
|
|
12866
12830
|
/**
|
|
12867
12831
|
* Size theme - can operate in two modes:
|
|
@@ -12922,7 +12886,7 @@ const defaultContainerTheme = new ComponentTheme("div", "vane-container mx-auto
|
|
|
12922
12886
|
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12923
12887
|
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
12924
12888
|
}
|
|
12925
|
-
}, themeDefaults.container, CONTAINER_CATEGORIES);
|
|
12889
|
+
}, themeDefaults.container, CONTAINER_CATEGORIES, undefined, 'layout');
|
|
12926
12890
|
|
|
12927
12891
|
const defaultColTheme = new ComponentTheme("div", "vane-col", {
|
|
12928
12892
|
size: {
|
|
@@ -12943,7 +12907,7 @@ const defaultColTheme = new ComponentTheme("div", "vane-col", {
|
|
|
12943
12907
|
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12944
12908
|
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
12945
12909
|
}
|
|
12946
|
-
}, themeDefaults.col, COL_CATEGORIES);
|
|
12910
|
+
}, themeDefaults.col, COL_CATEGORIES, undefined, 'layout');
|
|
12947
12911
|
|
|
12948
12912
|
const defaultStackTheme = new ComponentTheme("div", "vane-stack", {
|
|
12949
12913
|
size: {
|
|
@@ -12967,7 +12931,7 @@ const defaultStackTheme = new ComponentTheme("div", "vane-stack", {
|
|
|
12967
12931
|
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12968
12932
|
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
12969
12933
|
}
|
|
12970
|
-
}, themeDefaults.stack, STACK_CATEGORIES);
|
|
12934
|
+
}, themeDefaults.stack, STACK_CATEGORIES, undefined, 'layout');
|
|
12971
12935
|
|
|
12972
12936
|
const defaultSectionTheme = new ComponentTheme("div", "vane-section w-full", {
|
|
12973
12937
|
size: {
|
|
@@ -12991,7 +12955,7 @@ const defaultSectionTheme = new ComponentTheme("div", "vane-section w-full", {
|
|
|
12991
12955
|
ring: new RingTheme(),
|
|
12992
12956
|
radius: new RadiusTheme(),
|
|
12993
12957
|
},
|
|
12994
|
-
}, themeDefaults.section, SECTION_CATEGORIES);
|
|
12958
|
+
}, themeDefaults.section, SECTION_CATEGORIES, undefined, 'layout');
|
|
12995
12959
|
|
|
12996
12960
|
const gridSubThemes = {
|
|
12997
12961
|
size: {
|
|
@@ -13010,7 +12974,7 @@ const gridSubThemes = {
|
|
|
13010
12974
|
border: new BorderTheme(),
|
|
13011
12975
|
},
|
|
13012
12976
|
};
|
|
13013
|
-
const defaultGrid2Theme = new ComponentTheme("div", "vane-grid vane-grid-2 grid-cols-1 md:grid-cols-2", gridSubThemes, themeDefaults.grid2, GRID_CATEGORIES);
|
|
12977
|
+
const defaultGrid2Theme = new ComponentTheme("div", "vane-grid vane-grid-2 grid-cols-1 md:grid-cols-2", gridSubThemes, themeDefaults.grid2, GRID_CATEGORIES, undefined, 'layout');
|
|
13014
12978
|
const defaultGrid3Theme = new ComponentTheme("div", "vane-grid vane-grid-3 grid-cols-1 md:grid-cols-3", gridSubThemes, themeDefaults.grid3, GRID_CATEGORIES);
|
|
13015
12979
|
const defaultGrid4Theme = new ComponentTheme("div", "vane-grid vane-grid-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-4", gridSubThemes, themeDefaults.grid4, GRID_CATEGORIES);
|
|
13016
12980
|
const defaultGrid5Theme = new ComponentTheme("div", "vane-grid vane-grid-5 grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5", gridSubThemes, themeDefaults.grid5, GRID_CATEGORIES);
|
|
@@ -13038,7 +13002,7 @@ const defaultCheckboxTheme = new ComponentTheme("input", "vane-checkbox peer col
|
|
|
13038
13002
|
check: new SimpleConsumerTheme({ base: checkedBgConsumerClass }, 'bg'),
|
|
13039
13003
|
shadow: ShadowAppearanceTheme.createUITheme(),
|
|
13040
13004
|
}
|
|
13041
|
-
}, ((_a = themeDefaults.checkbox) === null || _a === void 0 ? void 0 : _a.input) || {}, CHECKBOX_CATEGORIES);
|
|
13005
|
+
}, ((_a = themeDefaults.checkbox) === null || _a === void 0 ? void 0 : _a.input) || {}, CHECKBOX_CATEGORIES, undefined, 'ui');
|
|
13042
13006
|
const defaultCheckTheme = new ComponentTheme("span", "invisible col-start-1 row-start-1 peer-checked:visible", {
|
|
13043
13007
|
checkElement: () => jsx("svg", { viewBox: "0 0 14 14", fill: "none", children: jsx("path", { d: "M3 8L6 11L11 3.5", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", fill: "none", stroke: "currentColor" }) }),
|
|
13044
13008
|
appearance: {
|
|
@@ -13085,7 +13049,7 @@ const defaultLabelTheme = new ComponentTheme("label", "vane-label has-[input]:cu
|
|
|
13085
13049
|
wrap: new WrapTheme(),
|
|
13086
13050
|
flexDirection: new DirectionTheme(),
|
|
13087
13051
|
},
|
|
13088
|
-
}, themeDefaults.label, LABEL_CATEGORIES);
|
|
13052
|
+
}, themeDefaults.label, LABEL_CATEGORIES, undefined, 'ui');
|
|
13089
13053
|
|
|
13090
13054
|
const defaultImgTheme = new ComponentTheme("img", "vane-img object-cover", // Default to cover for better image display
|
|
13091
13055
|
{
|
|
@@ -13103,7 +13067,7 @@ const defaultImgTheme = new ComponentTheme("img", "vane-img object-cover", // De
|
|
|
13103
13067
|
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
|
|
13104
13068
|
shadow: ShadowAppearanceTheme.createLayoutTheme()
|
|
13105
13069
|
}
|
|
13106
|
-
}, themeDefaults.img, IMG_CATEGORIES);
|
|
13070
|
+
}, themeDefaults.img, IMG_CATEGORIES, undefined, 'layout');
|
|
13107
13071
|
|
|
13108
13072
|
const defaultInputTheme = new ComponentTheme("input", "vane-input w-full transition-all duration-200", {
|
|
13109
13073
|
size: {
|
|
@@ -13131,7 +13095,7 @@ const defaultInputTheme = new ComponentTheme("input", "vane-input w-full transit
|
|
|
13131
13095
|
flexDirection: new DirectionTheme(),
|
|
13132
13096
|
},
|
|
13133
13097
|
typography: defaultTypographyThemes,
|
|
13134
|
-
}, themeDefaults.input, INPUT_CATEGORIES, () => "input");
|
|
13098
|
+
}, themeDefaults.input, INPUT_CATEGORIES, () => "input", 'ui');
|
|
13135
13099
|
|
|
13136
13100
|
const defaultTheme = {
|
|
13137
13101
|
button: defaultButtonTheme,
|
|
@@ -13414,7 +13378,7 @@ const Checkbox = forwardRef(function Checkbox(props, ref) {
|
|
|
13414
13378
|
// Size props
|
|
13415
13379
|
xs, sm, md, lg, xl,
|
|
13416
13380
|
// Appearance props
|
|
13417
|
-
primary, brand, accent, secondary, tertiary, success, danger, warning, info,
|
|
13381
|
+
primary, brand, accent, secondary, tertiary, success, danger, warning, info,
|
|
13418
13382
|
// Variant props
|
|
13419
13383
|
filled, outline,
|
|
13420
13384
|
// Shape props
|
|
@@ -13425,7 +13389,7 @@ const Checkbox = forwardRef(function Checkbox(props, ref) {
|
|
|
13425
13389
|
id, className, tabIndex, 'aria-label': ariaLabel, ...remainingProps } = props;
|
|
13426
13390
|
const themeProps = {
|
|
13427
13391
|
xs, sm, md, lg, xl,
|
|
13428
|
-
primary, brand, accent, secondary, tertiary, success, danger, warning, info,
|
|
13392
|
+
primary, brand, accent, secondary, tertiary, success, danger, warning, info,
|
|
13429
13393
|
filled, outline,
|
|
13430
13394
|
pill, sharp, rounded
|
|
13431
13395
|
};
|