@vaneui/md 0.3.1-alpha.20251228133323.630b220 → 0.3.1-alpha.20260104192853.8b57fd2
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 +488 -1059
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +488 -1059
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +1544 -1233
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -8562,6 +8562,8 @@ const LAYOUT_FLEX = ['wrap', 'gap', 'flexDirection', 'reverse'];
|
|
|
8562
8562
|
const PADDING = ['padding'];
|
|
8563
8563
|
/** Responsive breakpoint properties for different screen sizes */
|
|
8564
8564
|
const BREAKPOINT = ['breakpoint'];
|
|
8565
|
+
/** Responsive CSS variable switching for automatic breakpoint adaptation */
|
|
8566
|
+
const RESPONSIVE = ['responsive'];
|
|
8565
8567
|
/** Core visual properties including appearance colors and transparency */
|
|
8566
8568
|
const VISUAL_CORE = ['appearance', 'transparent'];
|
|
8567
8569
|
/** Border properties for visual decoration */
|
|
@@ -8581,11 +8583,11 @@ const VARIANT = ['variant'];
|
|
|
8581
8583
|
/** Component property keys mapping categories to their available values */
|
|
8582
8584
|
const ComponentKeys = {
|
|
8583
8585
|
/** Color appearance options */
|
|
8584
|
-
appearance: ['primary', 'brand', 'accent', 'secondary', 'tertiary', 'success', 'danger', 'warning', 'info'],
|
|
8586
|
+
appearance: ['primary', 'brand', 'accent', 'secondary', 'tertiary', 'success', 'danger', 'warning', 'info', 'link'],
|
|
8585
8587
|
/** Border visibility: includes all border variations and noBorder (border, borderT, borderB, etc., noBorder) */
|
|
8586
8588
|
border: ['border', 'borderT', 'borderB', 'borderL', 'borderR', 'borderX', 'borderY', 'noBorder'],
|
|
8587
8589
|
/** Column breakpoints for responsive grid layouts */
|
|
8588
|
-
breakpoint: ['mobileCol', 'tabletCol', '
|
|
8590
|
+
breakpoint: ['mobileCol', 'tabletCol', 'desktopCol'],
|
|
8589
8591
|
/** CSS display property values for element layout behavior */
|
|
8590
8592
|
display: ['inline', 'block', 'inlineBlock', 'flex', 'inlineFlex', 'grid', 'inlineGrid', 'contents', 'table', 'tableCell', 'hidden'],
|
|
8591
8593
|
/** Flex direction: row (horizontal), column (vertical), or reversed variants */
|
|
@@ -8599,7 +8601,7 @@ const ComponentKeys = {
|
|
|
8599
8601
|
/** Spacing between flex/grid items: gap (enabled) or noGap (disabled) */
|
|
8600
8602
|
gap: ['gap', 'noGap'],
|
|
8601
8603
|
/** Hide elements at specific breakpoint sizes */
|
|
8602
|
-
hide: ['mobileHide', 'tabletHide', '
|
|
8604
|
+
hide: ['mobileHide', 'tabletHide', 'desktopHide'],
|
|
8603
8605
|
/** Cross-axis alignment for flex items (align-items) */
|
|
8604
8606
|
items: ['itemsStart', 'itemsEnd', 'itemsCenter', 'itemsBaseline', 'itemsStretch'],
|
|
8605
8607
|
/** Main-axis alignment for flex items (justify-content) */
|
|
@@ -8617,6 +8619,8 @@ const ComponentKeys = {
|
|
|
8617
8619
|
padding: ['padding', 'noPadding'],
|
|
8618
8620
|
/** CSS positioning: relative, absolute, fixed, sticky, static */
|
|
8619
8621
|
position: ['relative', 'absolute', 'fixed', 'sticky', 'static'],
|
|
8622
|
+
/** Responsive CSS variable switching: responsive (enabled) */
|
|
8623
|
+
responsive: ['responsive'],
|
|
8620
8624
|
/** Reverse the order of flex items */
|
|
8621
8625
|
reverse: ['reverse'],
|
|
8622
8626
|
/** Focus ring visibility: ring (show) or noRing (hide) */
|
|
@@ -8665,12 +8669,12 @@ const CHIP_CATEGORIES = INTERACTIVE_CATEGORIES;
|
|
|
8665
8669
|
const CODE_CATEGORIES = INTERACTIVE_CATEGORIES;
|
|
8666
8670
|
/** Typography component categories */
|
|
8667
8671
|
/** Categories for typography components like Text, Title, Link */
|
|
8668
|
-
const TYPOGRAPHY_CATEGORIES = [...TYPOGRAPHY_FULL, ...LAYOUT_CORE, ...VISUAL_CORE, ...VARIANT];
|
|
8672
|
+
const TYPOGRAPHY_CATEGORIES = [...TYPOGRAPHY_FULL, ...LAYOUT_CORE, ...VISUAL_CORE, ...VARIANT, ...RESPONSIVE];
|
|
8669
8673
|
/** Categories for list components with typography and list-specific styling */
|
|
8670
8674
|
const LIST_CATEGORIES = [...TYPOGRAPHY_FULL, ...LIST_STYLE, ...LAYOUT_CORE, ...VISUAL_CORE, ...PADDING, ...VARIANT];
|
|
8671
8675
|
/** Layout component categories */
|
|
8672
8676
|
/** Categories for grid layout components */
|
|
8673
|
-
const GRID_CATEGORIES = [...LAYOUT_FULL, ...
|
|
8677
|
+
const GRID_CATEGORIES = [...LAYOUT_FULL, ...VISUAL_LAYOUT, ...VARIANT];
|
|
8674
8678
|
/** Categories for container layout components */
|
|
8675
8679
|
const CONTAINER_CATEGORIES = [...LAYOUT_FULL, ...VISUAL_LAYOUT, ...VARIANT];
|
|
8676
8680
|
/** Categories for column layout components */
|
|
@@ -8682,9 +8686,9 @@ const STACK_CATEGORIES = [...LAYOUT_FULL, ...BREAKPOINT, ...PADDING, ...VISUAL_L
|
|
|
8682
8686
|
/** Categories for card components with full typography and layout support */
|
|
8683
8687
|
const CARD_CATEGORIES = [...TYPOGRAPHY_FULL, ...LAYOUT_FULL, ...BREAKPOINT, ...VISUAL_LAYOUT, ...PADDING, ...VARIANT];
|
|
8684
8688
|
/** Categories for divider components with basic layout and visual properties */
|
|
8685
|
-
const DIVIDER_CATEGORIES = [...LAYOUT_CORE, ...VISUAL_CORE, ...PADDING];
|
|
8689
|
+
const DIVIDER_CATEGORIES = [...LAYOUT_CORE, ...VISUAL_CORE, ...PADDING, ...VARIANT];
|
|
8686
8690
|
/** Categories for section layout components with full responsive support */
|
|
8687
|
-
const SECTION_CATEGORIES = [...LAYOUT_FULL, ...VISUAL_LAYOUT, ...PADDING, ...BREAKPOINT, ...VARIANT];
|
|
8691
|
+
const SECTION_CATEGORIES = [...LAYOUT_FULL, ...VISUAL_LAYOUT, ...PADDING, ...BREAKPOINT, ...VARIANT, ...RESPONSIVE];
|
|
8688
8692
|
/** Form component categories */
|
|
8689
8693
|
/** Categories for checkbox form components */
|
|
8690
8694
|
const CHECKBOX_CATEGORIES = [...LAYOUT_CORE, ...VISUAL_CORE, ...BORDER, ...VISUAL_DECORATION, ...SHAPE, ...VARIANT];
|
|
@@ -8699,12 +8703,10 @@ const IMG_CATEGORIES = [...LAYOUT_CORE, ...VISUAL_CORE, ...BORDER, ...VISUAL_DEC
|
|
|
8699
8703
|
class HideTheme extends BaseTheme {
|
|
8700
8704
|
constructor() {
|
|
8701
8705
|
super(...arguments);
|
|
8702
|
-
/** Hide element on mobile devices and below (max-mobile:
|
|
8706
|
+
/** Hide element on mobile devices and below (max-mobile: 48rem) */
|
|
8703
8707
|
this.mobileHide = "max-mobile:hidden";
|
|
8704
|
-
/** Hide element on tablet devices and below (max-tablet:
|
|
8708
|
+
/** Hide element on tablet devices and below (max-tablet: 64rem) */
|
|
8705
8709
|
this.tabletHide = "max-tablet:hidden";
|
|
8706
|
-
/** Hide element on laptop devices and below (max-laptop: 64rem) */
|
|
8707
|
-
this.laptopHide = "max-laptop:hidden";
|
|
8708
8710
|
/** Hide element on desktop devices and below (max-desktop: 80rem) */
|
|
8709
8711
|
this.desktopHide = "max-desktop:hidden";
|
|
8710
8712
|
}
|
|
@@ -11763,6 +11765,16 @@ class ComponentTheme {
|
|
|
11763
11765
|
getComponentConfig(props) {
|
|
11764
11766
|
var _a;
|
|
11765
11767
|
const cleanProps = { ...props };
|
|
11768
|
+
const componentProps = props;
|
|
11769
|
+
const defaults = this.defaults;
|
|
11770
|
+
// Extract keys for data attributes
|
|
11771
|
+
const extractedKeys = {};
|
|
11772
|
+
for (const category of this.categories) {
|
|
11773
|
+
const key = pickFirstTruthyKeyByCategory(componentProps, defaults, category);
|
|
11774
|
+
if (key !== undefined) {
|
|
11775
|
+
extractedKeys[category] = key;
|
|
11776
|
+
}
|
|
11777
|
+
}
|
|
11766
11778
|
const keysToOmit = this.categories.flatMap(category => ComponentKeys[category]);
|
|
11767
11779
|
for (const k of keysToOmit) {
|
|
11768
11780
|
delete cleanProps[k];
|
|
@@ -11774,203 +11786,131 @@ class ComponentTheme {
|
|
|
11774
11786
|
const originalProps = props;
|
|
11775
11787
|
const themeGeneratedClasses = this.getClasses(originalProps);
|
|
11776
11788
|
const finalClasses = twMerge(...themeGeneratedClasses, className);
|
|
11789
|
+
// Build data attributes for key categories
|
|
11790
|
+
const dataAttributes = {};
|
|
11791
|
+
if (extractedKeys.size) {
|
|
11792
|
+
dataAttributes['data-size'] = extractedKeys.size;
|
|
11793
|
+
}
|
|
11794
|
+
if (extractedKeys.appearance) {
|
|
11795
|
+
dataAttributes['data-appearance'] = extractedKeys.appearance;
|
|
11796
|
+
}
|
|
11797
|
+
if (extractedKeys.variant) {
|
|
11798
|
+
dataAttributes['data-variant'] = extractedKeys.variant;
|
|
11799
|
+
}
|
|
11800
|
+
if (extractedKeys.transparent) {
|
|
11801
|
+
dataAttributes['data-transparent'] = 'true';
|
|
11802
|
+
}
|
|
11777
11803
|
return {
|
|
11778
11804
|
Tag: componentTag,
|
|
11779
11805
|
finalClasses,
|
|
11780
|
-
finalProps: other,
|
|
11806
|
+
finalProps: { ...other, ...dataAttributes },
|
|
11781
11807
|
};
|
|
11782
11808
|
}
|
|
11783
11809
|
}
|
|
11784
11810
|
|
|
11811
|
+
/**
|
|
11812
|
+
* Font size theme - outputs the consumer class text-(length:--fs).
|
|
11813
|
+
* CSS variable values (--fs-unit) are set via CSS rules in vars.css
|
|
11814
|
+
* using semantic classes and data attributes.
|
|
11815
|
+
*
|
|
11816
|
+
* When the 'responsive' prop is set, adds Tailwind classes to switch
|
|
11817
|
+
* between breakpoint-specific variables for automatic size adaptation.
|
|
11818
|
+
*/
|
|
11785
11819
|
class FontSizeTheme extends BaseTheme {
|
|
11786
|
-
constructor(
|
|
11787
|
-
super();
|
|
11788
|
-
/**
|
|
11789
|
-
this.
|
|
11790
|
-
/**
|
|
11791
|
-
this.
|
|
11792
|
-
/**
|
|
11793
|
-
this.
|
|
11794
|
-
/**
|
|
11795
|
-
this.
|
|
11796
|
-
/** Extra-large font size - text-xl (1.25rem = 10 * 0.125rem) */
|
|
11797
|
-
this.xl = "[--fs-unit:10]";
|
|
11798
|
-
if (customMapping) {
|
|
11799
|
-
this.xs = customMapping.xs || this.xs;
|
|
11800
|
-
this.sm = customMapping.sm || this.sm;
|
|
11801
|
-
this.md = customMapping.md || this.md;
|
|
11802
|
-
this.lg = customMapping.lg || this.lg;
|
|
11803
|
-
this.xl = customMapping.xl || this.xl;
|
|
11804
|
-
}
|
|
11820
|
+
constructor() {
|
|
11821
|
+
super(...arguments);
|
|
11822
|
+
/** Consumer class for font size */
|
|
11823
|
+
this.fontSize = "text-(length:--fs)";
|
|
11824
|
+
/** Responsive desktop unit class */
|
|
11825
|
+
this.responsiveDesktop = "[--fs-unit:var(--fs-unit-desktop)]";
|
|
11826
|
+
/** Responsive laptop unit class */
|
|
11827
|
+
this.responsiveTablet = "max-tablet:[--fs-unit:var(--fs-unit-tablet)]";
|
|
11828
|
+
/** Responsive tablet unit class */
|
|
11829
|
+
this.responsiveMobile = "max-mobile:[--fs-unit:var(--fs-unit-mobile)]";
|
|
11805
11830
|
}
|
|
11806
11831
|
getClasses(extractedKeys) {
|
|
11807
|
-
if (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.
|
|
11808
|
-
|
|
11809
|
-
|
|
11810
|
-
|
|
11811
|
-
|
|
11812
|
-
|
|
11813
|
-
|
|
11814
|
-
|
|
11815
|
-
return
|
|
11816
|
-
xs: "[--fs-unit:15] max-laptop:[--fs-unit:12] max-tablet:[--fs-unit:9]", // text-3xl: 1.875rem = 15 * 0.125rem
|
|
11817
|
-
sm: "[--fs-unit:18] max-laptop:[--fs-unit:15] max-tablet:[--fs-unit:12]", // text-4xl: 2.25rem = 18 * 0.125rem
|
|
11818
|
-
md: "[--fs-unit:24] max-laptop:[--fs-unit:21] max-tablet:[--fs-unit:18]", // text-5xl: 3rem = 24 * 0.125rem
|
|
11819
|
-
lg: "[--fs-unit:30] max-laptop:[--fs-unit:27] max-tablet:[--fs-unit:24]", // text-6xl: 3.75rem = 30 * 0.125rem
|
|
11820
|
-
xl: "[--fs-unit:36] max-laptop:[--fs-unit:33] max-tablet:[--fs-unit:30]" // text-7xl: 4.5rem = 36 * 0.125rem
|
|
11821
|
-
});
|
|
11822
|
-
}
|
|
11823
|
-
static createForSectionTitle() {
|
|
11824
|
-
return new FontSizeTheme({
|
|
11825
|
-
xs: "[--fs-unit:12] max-laptop:[--fs-unit:10] max-tablet:[--fs-unit:8]", // text-2xl: 1.5rem = 12 * 0.125rem
|
|
11826
|
-
sm: "[--fs-unit:15] max-laptop:[--fs-unit:13] max-tablet:[--fs-unit:11]", // text-3xl: 1.875rem = 15 * 0.125rem
|
|
11827
|
-
md: "[--fs-unit:18] max-laptop:[--fs-unit:16] max-tablet:[--fs-unit:14]", // text-4xl: 2.25rem = 18 * 0.125rem
|
|
11828
|
-
lg: "[--fs-unit:24] max-laptop:[--fs-unit:22] max-tablet:[--fs-unit:20]", // text-5xl: 3rem = 24 * 0.125rem
|
|
11829
|
-
xl: "[--fs-unit:30] max-laptop:[--fs-unit:28] max-tablet:[--fs-unit:26]" // text-6xl: 3.75rem = 30 * 0.125rem
|
|
11830
|
-
});
|
|
11831
|
-
}
|
|
11832
|
-
static createForTitle() {
|
|
11833
|
-
return new FontSizeTheme({
|
|
11834
|
-
xs: "[--fs-unit:9] max-laptop:[--fs-unit:8] max-tablet:[--fs-unit:7]", // text-lg: 1.125rem = 9 * 0.125rem
|
|
11835
|
-
sm: "[--fs-unit:10] max-laptop:[--fs-unit:9] max-tablet:[--fs-unit:8]", // text-xl: 1.25rem = 10 * 0.125rem
|
|
11836
|
-
md: "[--fs-unit:12] max-laptop:[--fs-unit:11] max-tablet:[--fs-unit:10]", // text-2xl: 1.5rem = 12 * 0.125rem
|
|
11837
|
-
lg: "[--fs-unit:15] max-laptop:[--fs-unit:14] max-tablet:[--fs-unit:13]", // text-3xl: 1.875rem = 15 * 0.125rem
|
|
11838
|
-
xl: "[--fs-unit:18] max-laptop:[--fs-unit:17] max-tablet:[--fs-unit:16]" // text-4xl: 2.25rem = 18 * 0.125rem
|
|
11839
|
-
});
|
|
11832
|
+
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.responsive) === 'responsive') {
|
|
11833
|
+
return [
|
|
11834
|
+
this.responsiveDesktop,
|
|
11835
|
+
this.responsiveTablet,
|
|
11836
|
+
this.responsiveMobile,
|
|
11837
|
+
this.fontSize
|
|
11838
|
+
];
|
|
11839
|
+
}
|
|
11840
|
+
return [this.fontSize];
|
|
11840
11841
|
}
|
|
11841
11842
|
}
|
|
11842
11843
|
|
|
11844
|
+
/**
|
|
11845
|
+
* Line height theme - only outputs the consumer class leading-(--lh).
|
|
11846
|
+
* CSS variable values (--lh) are set via CSS rules in vars.css
|
|
11847
|
+
* using semantic classes and data attributes.
|
|
11848
|
+
*/
|
|
11843
11849
|
class LineHeightTheme extends BaseTheme {
|
|
11844
|
-
constructor(
|
|
11845
|
-
super();
|
|
11846
|
-
/**
|
|
11847
|
-
this.
|
|
11848
|
-
/** Small line height - matches text-sm default line height */
|
|
11849
|
-
this.sm = "[--lh:1.6]"; // calc(1.25 / 0.875) ≈ 1.429
|
|
11850
|
-
/** Medium line height - matches text-base default line height */
|
|
11851
|
-
this.md = "[--lh:1.6]"; // calc(1.5 / 1) = 1.5
|
|
11852
|
-
/** Large line height - matches text-lg default line height */
|
|
11853
|
-
this.lg = "[--lh:1.6]"; // calc(1.75 / 1.125) ≈ 1.556
|
|
11854
|
-
/** Extra-large line height - matches text-xl default line height */
|
|
11855
|
-
this.xl = "[--lh:1.6]"; // calc(1.75 / 1.25) = 1.4
|
|
11856
|
-
if (customMapping) {
|
|
11857
|
-
this.xs = customMapping.xs || this.xs;
|
|
11858
|
-
this.sm = customMapping.sm || this.sm;
|
|
11859
|
-
this.md = customMapping.md || this.md;
|
|
11860
|
-
this.lg = customMapping.lg || this.lg;
|
|
11861
|
-
this.xl = customMapping.xl || this.xl;
|
|
11862
|
-
}
|
|
11863
|
-
}
|
|
11864
|
-
getClasses(extractedKeys) {
|
|
11865
|
-
if (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) {
|
|
11866
|
-
const lhUnitClass = this[extractedKeys.size];
|
|
11867
|
-
return lhUnitClass ? [lhUnitClass, "leading-(--lh)"] : [];
|
|
11868
|
-
}
|
|
11869
|
-
return [this.md, "leading-(--lh)"];
|
|
11870
|
-
}
|
|
11871
|
-
static createDefault() {
|
|
11872
|
-
return new LineHeightTheme();
|
|
11873
|
-
}
|
|
11874
|
-
// Static factory methods for different text size ranges
|
|
11875
|
-
static createForSectionTitle() {
|
|
11876
|
-
return new LineHeightTheme({
|
|
11877
|
-
xs: "[--lh:1.333]", // text-2xl: calc(2 / 1.5) ≈ 1.333
|
|
11878
|
-
sm: "[--lh:1.2]", // text-3xl: calc(2.25 / 1.875) = 1.2
|
|
11879
|
-
md: "[--lh:1.111]", // text-4xl: calc(2.5 / 2.25) ≈ 1.111
|
|
11880
|
-
lg: "[--lh:1]", // text-5xl: 1
|
|
11881
|
-
xl: "[--lh:1]" // text-6xl+: 1
|
|
11882
|
-
});
|
|
11883
|
-
}
|
|
11884
|
-
static createForPageTitle() {
|
|
11885
|
-
return new LineHeightTheme({
|
|
11886
|
-
xs: "[--lh:1.2]", // text-3xl: calc(2.25 / 1.875) = 1.2
|
|
11887
|
-
sm: "[--lh:1.111]", // text-4xl: calc(2.5 / 2.25) ≈ 1.111
|
|
11888
|
-
md: "[--lh:1]", // text-5xl: 1
|
|
11889
|
-
lg: "[--lh:1]", // text-6xl: 1
|
|
11890
|
-
xl: "[--lh:1]" // text-7xl: 1
|
|
11891
|
-
});
|
|
11850
|
+
constructor() {
|
|
11851
|
+
super(...arguments);
|
|
11852
|
+
/** Consumer class for line height */
|
|
11853
|
+
this.lineHeight = "leading-(--lh)";
|
|
11892
11854
|
}
|
|
11893
|
-
|
|
11894
|
-
return
|
|
11895
|
-
xs: "[--lh:1.556]", // text-lg: calc(1.75 / 1.125) ≈ 1.556
|
|
11896
|
-
sm: "[--lh:1.4]", // text-xl: calc(1.75 / 1.25) = 1.4
|
|
11897
|
-
md: "[--lh:1.333]", // text-2xl: calc(2 / 1.5) ≈ 1.333
|
|
11898
|
-
lg: "[--lh:1.2]", // text-3xl: calc(2.25 / 1.875) = 1.2
|
|
11899
|
-
xl: "[--lh:1.111]" // text-4xl: calc(2.5 / 2.25) ≈ 1.111
|
|
11900
|
-
});
|
|
11855
|
+
getClasses(_extractedKeys) {
|
|
11856
|
+
return [this.lineHeight];
|
|
11901
11857
|
}
|
|
11902
11858
|
}
|
|
11903
11859
|
|
|
11860
|
+
/**
|
|
11861
|
+
* Gap theme - outputs the consumer class gap-(--gap).
|
|
11862
|
+
* CSS variable values (--gap-unit) are set via CSS rules in vars.css
|
|
11863
|
+
* using semantic classes and data attributes.
|
|
11864
|
+
*
|
|
11865
|
+
* When the 'responsive' prop is set, adds Tailwind classes to switch
|
|
11866
|
+
* between breakpoint-specific variables for automatic size adaptation.
|
|
11867
|
+
*/
|
|
11904
11868
|
class GapTheme extends BaseTheme {
|
|
11905
|
-
constructor(
|
|
11906
|
-
super();
|
|
11907
|
-
|
|
11908
|
-
this.
|
|
11909
|
-
|
|
11910
|
-
this.
|
|
11911
|
-
|
|
11912
|
-
this.
|
|
11869
|
+
constructor() {
|
|
11870
|
+
super(...arguments);
|
|
11871
|
+
/** Consumer class for gap spacing */
|
|
11872
|
+
this.gap = "gap-(--gap)";
|
|
11873
|
+
/** Responsive desktop unit class */
|
|
11874
|
+
this.responsiveDesktop = "[--gap-unit:var(--gap-unit-desktop)]";
|
|
11875
|
+
/** Responsive laptop unit class */
|
|
11876
|
+
this.responsiveTablet = "max-tablet:[--gap-unit:var(--gap-unit-tablet)]";
|
|
11877
|
+
/** Responsive tablet unit class */
|
|
11878
|
+
this.responsiveMobile = "max-mobile:[--gap-unit:var(--gap-unit-mobile)]";
|
|
11913
11879
|
}
|
|
11914
11880
|
getClasses(extractedKeys) {
|
|
11915
|
-
var _a;
|
|
11916
11881
|
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.gap) === 'gap') {
|
|
11917
|
-
|
|
11918
|
-
|
|
11882
|
+
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.responsive) === 'responsive') {
|
|
11883
|
+
return [
|
|
11884
|
+
this.responsiveDesktop,
|
|
11885
|
+
this.responsiveTablet,
|
|
11886
|
+
this.responsiveMobile,
|
|
11887
|
+
this.gap
|
|
11888
|
+
];
|
|
11889
|
+
}
|
|
11890
|
+
return [this.gap];
|
|
11919
11891
|
}
|
|
11920
11892
|
return [];
|
|
11921
11893
|
}
|
|
11922
|
-
static createForUI() {
|
|
11923
|
-
return new GapTheme({
|
|
11924
|
-
xs: "[--gap-unit:1]",
|
|
11925
|
-
sm: "[--gap-unit:1.5]",
|
|
11926
|
-
md: "[--gap-unit:2]",
|
|
11927
|
-
lg: "[--gap-unit:2.5]",
|
|
11928
|
-
xl: "[--gap-unit:3]",
|
|
11929
|
-
}, true);
|
|
11930
|
-
}
|
|
11931
|
-
static createForLayout() {
|
|
11932
|
-
return new GapTheme({
|
|
11933
|
-
xs: "[--gap-unit:2]",
|
|
11934
|
-
sm: "[--gap-unit:3]",
|
|
11935
|
-
md: "[--gap-unit:4]",
|
|
11936
|
-
lg: "[--gap-unit:5]",
|
|
11937
|
-
xl: "[--gap-unit:6]",
|
|
11938
|
-
}, false);
|
|
11939
|
-
}
|
|
11940
11894
|
}
|
|
11941
11895
|
|
|
11896
|
+
/**
|
|
11897
|
+
* Border radius theme - outputs consumer class rounded-(--br) for rounded shapes.
|
|
11898
|
+
* CSS variable values (--br-unit) are now set via CSS rules
|
|
11899
|
+
* in vars.css using semantic classes and data attributes.
|
|
11900
|
+
*
|
|
11901
|
+
* pill and sharp shapes use fixed Tailwind classes.
|
|
11902
|
+
*/
|
|
11942
11903
|
class RadiusTheme extends BaseTheme {
|
|
11943
|
-
constructor(
|
|
11944
|
-
super();
|
|
11904
|
+
constructor() {
|
|
11905
|
+
super(...arguments);
|
|
11945
11906
|
/** Pill shape - fully rounded corners */
|
|
11946
11907
|
this.pill = "rounded-full";
|
|
11947
11908
|
/** Sharp shape - no rounded corners */
|
|
11948
11909
|
this.sharp = "rounded-none";
|
|
11949
|
-
|
|
11950
|
-
this.
|
|
11951
|
-
}
|
|
11952
|
-
static createUITheme() {
|
|
11953
|
-
return new RadiusTheme({
|
|
11954
|
-
xs: '[--br-unit:2]',
|
|
11955
|
-
sm: '[--br-unit:3]',
|
|
11956
|
-
md: '[--br-unit:4]',
|
|
11957
|
-
lg: '[--br-unit:5]',
|
|
11958
|
-
xl: '[--br-unit:6]'
|
|
11959
|
-
}, true);
|
|
11960
|
-
}
|
|
11961
|
-
static createLayoutTheme() {
|
|
11962
|
-
const brUnitClasses = {
|
|
11963
|
-
xs: '[--br-unit:3]',
|
|
11964
|
-
sm: '[--br-unit:4]',
|
|
11965
|
-
md: '[--br-unit:5]',
|
|
11966
|
-
lg: '[--br-unit:6]',
|
|
11967
|
-
xl: '[--br-unit:7]'
|
|
11968
|
-
};
|
|
11969
|
-
return new RadiusTheme(brUnitClasses, false);
|
|
11910
|
+
/** Rounded shape - dynamic border radius from CSS variable */
|
|
11911
|
+
this.rounded = "rounded-(--br)";
|
|
11970
11912
|
}
|
|
11971
11913
|
getClasses(extractedKeys) {
|
|
11972
|
-
var _a;
|
|
11973
|
-
const size = (_a = extractedKeys.size) !== null && _a !== void 0 ? _a : 'md';
|
|
11974
11914
|
const shape = extractedKeys.shape;
|
|
11975
11915
|
if (shape) {
|
|
11976
11916
|
switch (shape) {
|
|
@@ -11978,11 +11918,8 @@ class RadiusTheme extends BaseTheme {
|
|
|
11978
11918
|
return [this.pill];
|
|
11979
11919
|
case 'sharp':
|
|
11980
11920
|
return [this.sharp];
|
|
11981
|
-
case 'rounded':
|
|
11982
|
-
|
|
11983
|
-
const roundedVar = this.isUIComponent ? "rounded-(--ui-br)" : "rounded-(--br)";
|
|
11984
|
-
return brUnitClass ? [brUnitClass, roundedVar] : [];
|
|
11985
|
-
}
|
|
11921
|
+
case 'rounded':
|
|
11922
|
+
return [this.rounded];
|
|
11986
11923
|
default:
|
|
11987
11924
|
return [];
|
|
11988
11925
|
}
|
|
@@ -12067,126 +12004,90 @@ class FocusVisibleTheme extends BaseTheme {
|
|
|
12067
12004
|
}
|
|
12068
12005
|
}
|
|
12069
12006
|
|
|
12070
|
-
|
|
12071
|
-
|
|
12072
|
-
|
|
12073
|
-
|
|
12074
|
-
|
|
12075
|
-
|
|
12076
|
-
|
|
12077
|
-
|
|
12078
|
-
|
|
12079
|
-
|
|
12080
|
-
this.lg = "";
|
|
12081
|
-
/** Extra-large padding - varies by component implementation */
|
|
12082
|
-
this.xl = "";
|
|
12083
|
-
if (initial) {
|
|
12084
|
-
ComponentKeys.size.forEach((key) => {
|
|
12085
|
-
if (initial[key] !== undefined) {
|
|
12086
|
-
this[key] = initial[key];
|
|
12087
|
-
}
|
|
12088
|
-
});
|
|
12089
|
-
}
|
|
12090
|
-
}
|
|
12091
|
-
getClasses(extractedKeys) {
|
|
12092
|
-
var _a;
|
|
12093
|
-
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === 'padding' || (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === undefined) {
|
|
12094
|
-
const paddingClass = this[(_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md'];
|
|
12095
|
-
return paddingClass ? [paddingClass] : [];
|
|
12096
|
-
}
|
|
12097
|
-
return [];
|
|
12098
|
-
}
|
|
12099
|
-
}
|
|
12100
|
-
|
|
12101
|
-
/** Horizontal padding theme - controls left and right padding via aspect ratio */
|
|
12102
|
-
class PxTheme extends PaddingTheme {
|
|
12103
|
-
constructor(aspectRatio, isUIComponent = false) {
|
|
12104
|
-
super(aspectRatio);
|
|
12105
|
-
this.isUIComponent = isUIComponent;
|
|
12106
|
-
// Override with PxTheme's default aspect ratio classes if no custom map provided
|
|
12107
|
-
if (!aspectRatio) {
|
|
12108
|
-
ComponentKeys.size.forEach((key) => {
|
|
12109
|
-
this[key] = "[--aspect-ratio:1]";
|
|
12110
|
-
});
|
|
12111
|
-
}
|
|
12007
|
+
/**
|
|
12008
|
+
* Horizontal padding theme - only outputs the consumer class px-(--px).
|
|
12009
|
+
* CSS variable values (--aspect-ratio, --py-unit) are now set via CSS rules
|
|
12010
|
+
* in vars.css using semantic classes and data attributes.
|
|
12011
|
+
*/
|
|
12012
|
+
class PxTheme extends BaseTheme {
|
|
12013
|
+
constructor() {
|
|
12014
|
+
super(...arguments);
|
|
12015
|
+
/** Consumer class for horizontal padding */
|
|
12016
|
+
this.px = "px-(--px)";
|
|
12112
12017
|
}
|
|
12113
12018
|
getClasses(extractedKeys) {
|
|
12114
|
-
var _a;
|
|
12115
12019
|
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === 'padding' || (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === undefined) {
|
|
12116
|
-
|
|
12117
|
-
const aspectRatioClass = this[size];
|
|
12118
|
-
const classes = [];
|
|
12119
|
-
// Only add aspect-ratio class - no padding classes
|
|
12120
|
-
if (aspectRatioClass)
|
|
12121
|
-
classes.push(aspectRatioClass);
|
|
12122
|
-
// Use UI or layout CSS variables based on component type
|
|
12123
|
-
const cssVar = this.isUIComponent ? "px-(--ui-px)" : "px-(--px)";
|
|
12124
|
-
classes.push(cssVar);
|
|
12125
|
-
return classes;
|
|
12020
|
+
return [this.px];
|
|
12126
12021
|
}
|
|
12127
12022
|
return [];
|
|
12128
12023
|
}
|
|
12129
12024
|
}
|
|
12130
12025
|
|
|
12131
|
-
/**
|
|
12132
|
-
|
|
12133
|
-
|
|
12134
|
-
|
|
12135
|
-
|
|
12136
|
-
|
|
12137
|
-
|
|
12138
|
-
|
|
12139
|
-
|
|
12140
|
-
|
|
12141
|
-
|
|
12142
|
-
|
|
12143
|
-
|
|
12144
|
-
|
|
12145
|
-
|
|
12146
|
-
|
|
12147
|
-
|
|
12026
|
+
/**
|
|
12027
|
+
* Vertical padding theme - outputs the consumer class py-(--py).
|
|
12028
|
+
* CSS variable values (--py-unit) are set via CSS rules in vars.css
|
|
12029
|
+
* using semantic classes and data attributes.
|
|
12030
|
+
*
|
|
12031
|
+
* When the 'responsive' prop is set, adds Tailwind classes to switch
|
|
12032
|
+
* between breakpoint-specific variables for automatic size adaptation.
|
|
12033
|
+
*/
|
|
12034
|
+
class PyTheme extends BaseTheme {
|
|
12035
|
+
constructor() {
|
|
12036
|
+
super(...arguments);
|
|
12037
|
+
/** Consumer class for vertical padding */
|
|
12038
|
+
this.py = "py-(--py)";
|
|
12039
|
+
/** Responsive desktop unit class */
|
|
12040
|
+
this.responsiveDesktop = "[--py-unit:var(--py-unit-desktop)]";
|
|
12041
|
+
/** Responsive laptop unit class */
|
|
12042
|
+
this.responsiveTablet = "max-tablet:[--py-unit:var(--py-unit-tablet)]";
|
|
12043
|
+
/** Responsive tablet unit class */
|
|
12044
|
+
this.responsiveMobile = "max-mobile:[--py-unit:var(--py-unit-mobile)]";
|
|
12148
12045
|
}
|
|
12149
12046
|
getClasses(extractedKeys) {
|
|
12150
|
-
var _a;
|
|
12151
12047
|
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === 'padding' || (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === undefined) {
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
|
|
12048
|
+
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.responsive) === 'responsive') {
|
|
12049
|
+
return [
|
|
12050
|
+
this.responsiveDesktop,
|
|
12051
|
+
this.responsiveTablet,
|
|
12052
|
+
this.responsiveMobile,
|
|
12053
|
+
this.py
|
|
12054
|
+
];
|
|
12055
|
+
}
|
|
12056
|
+
return [this.py];
|
|
12158
12057
|
}
|
|
12159
12058
|
return [];
|
|
12160
12059
|
}
|
|
12161
|
-
static createForUI() {
|
|
12162
|
-
return new PyTheme({
|
|
12163
|
-
xs: "[--py-unit:1]",
|
|
12164
|
-
sm: "[--py-unit:1.5]",
|
|
12165
|
-
md: "[--py-unit:2]",
|
|
12166
|
-
lg: "[--py-unit:2.5]",
|
|
12167
|
-
xl: "[--py-unit:3]",
|
|
12168
|
-
}, true);
|
|
12169
|
-
}
|
|
12170
12060
|
}
|
|
12171
12061
|
|
|
12172
|
-
|
|
12173
|
-
|
|
12062
|
+
/**
|
|
12063
|
+
* A simplified appearance theme that outputs consumer classes
|
|
12064
|
+
* referencing component-level CSS variables (like --bg-color, --text-color).
|
|
12065
|
+
*
|
|
12066
|
+
* Used for components that have CSS rules in vars.css that set these
|
|
12067
|
+
* variables based on data-appearance and data-variant attributes.
|
|
12068
|
+
*
|
|
12069
|
+
* Unlike AppearanceTheme which outputs different classes for each appearance,
|
|
12070
|
+
* this theme outputs the same consumer classes regardless of appearance,
|
|
12071
|
+
* since the CSS rules handle the appearance-specific logic.
|
|
12072
|
+
*
|
|
12073
|
+
* Properties are public to allow theme overrides via ThemeProvider.
|
|
12074
|
+
*/
|
|
12075
|
+
class SimpleConsumerTheme extends BaseTheme {
|
|
12076
|
+
constructor(config, category) {
|
|
12174
12077
|
super();
|
|
12175
|
-
|
|
12078
|
+
this.base = config.base;
|
|
12079
|
+
this.hover = config.hover || '';
|
|
12080
|
+
this.active = config.active || '';
|
|
12081
|
+
this.focusVisible = config.focusVisible || '';
|
|
12176
12082
|
this.category = category;
|
|
12177
|
-
this.transparentClasses = transparentClasses;
|
|
12178
|
-
this.ignoreTransparent = ignoreTransparent;
|
|
12179
12083
|
}
|
|
12180
12084
|
getClasses(extractedKeys) {
|
|
12181
|
-
|
|
12085
|
+
// Handle conditional categories - only output if the feature is enabled
|
|
12182
12086
|
if (this.category === 'border') {
|
|
12183
|
-
// If noBorder is selected from the border category, don't apply appearance colors
|
|
12184
12087
|
if (extractedKeys.border === 'noBorder') {
|
|
12185
12088
|
return [];
|
|
12186
12089
|
}
|
|
12187
|
-
// Only apply appearance colors if any border prop is set (and not noBorder)
|
|
12188
12090
|
const hasBorderProps = extractedKeys.border !== undefined && extractedKeys.border !== 'noBorder';
|
|
12189
|
-
// If no border props are set, don't apply appearance colors
|
|
12190
12091
|
if (!hasBorderProps) {
|
|
12191
12092
|
return [];
|
|
12192
12093
|
}
|
|
@@ -12200,290 +12101,27 @@ class AppearanceTheme extends BaseTheme {
|
|
|
12200
12101
|
if (this.category === 'focusVisible' && (extractedKeys.focusVisible === 'noFocusVisible' || extractedKeys.focusVisible === undefined)) {
|
|
12201
12102
|
return [];
|
|
12202
12103
|
}
|
|
12203
|
-
//
|
|
12204
|
-
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.
|
|
12205
|
-
|
|
12206
|
-
return [transparentClass];
|
|
12207
|
-
}
|
|
12208
|
-
// Use appearance (now includes link as an appearance option)
|
|
12209
|
-
const pickedAppearanceKey = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.appearance;
|
|
12210
|
-
if (pickedAppearanceKey) {
|
|
12211
|
-
const modes = this[pickedAppearanceKey];
|
|
12212
|
-
if (modes) {
|
|
12213
|
-
return ModeKeys.mode.map(mode => modes[mode] || '');
|
|
12214
|
-
}
|
|
12104
|
+
// Only output classes if an appearance or transparent is set
|
|
12105
|
+
if (!(extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.appearance) && !(extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.transparent)) {
|
|
12106
|
+
return [];
|
|
12215
12107
|
}
|
|
12216
|
-
|
|
12217
|
-
|
|
12218
|
-
|
|
12219
|
-
|
|
12220
|
-
|
|
12221
|
-
|
|
12222
|
-
|
|
12223
|
-
|
|
12224
|
-
|
|
12225
|
-
|
|
12226
|
-
|
|
12227
|
-
|
|
12228
|
-
|
|
12229
|
-
return
|
|
12108
|
+
const classes = [];
|
|
12109
|
+
if (this.base) {
|
|
12110
|
+
classes.push(this.base);
|
|
12111
|
+
}
|
|
12112
|
+
if (this.hover) {
|
|
12113
|
+
classes.push(this.hover);
|
|
12114
|
+
}
|
|
12115
|
+
if (this.active) {
|
|
12116
|
+
classes.push(this.active);
|
|
12117
|
+
}
|
|
12118
|
+
if (this.focusVisible) {
|
|
12119
|
+
classes.push(this.focusVisible);
|
|
12120
|
+
}
|
|
12121
|
+
return classes;
|
|
12230
12122
|
}
|
|
12231
12123
|
}
|
|
12232
12124
|
|
|
12233
|
-
const filledTextAppearanceClasses = {
|
|
12234
|
-
brand: "text-(--color-text-filled-brand)",
|
|
12235
|
-
primary: "text-(--color-text-filled-primary)",
|
|
12236
|
-
secondary: "text-(--color-text-filled-secondary)",
|
|
12237
|
-
tertiary: "text-(--color-text-filled-tertiary)",
|
|
12238
|
-
accent: "text-(--color-text-filled-accent)",
|
|
12239
|
-
success: "text-(--color-text-filled-success)",
|
|
12240
|
-
danger: "text-(--color-text-filled-danger)",
|
|
12241
|
-
warning: "text-(--color-text-filled-warning)",
|
|
12242
|
-
info: "text-(--color-text-filled-info)",
|
|
12243
|
-
transparent: "text-transparent",
|
|
12244
|
-
};
|
|
12245
|
-
const textAppearanceClasses = {
|
|
12246
|
-
brand: "text-(--color-text-brand)",
|
|
12247
|
-
primary: "text-(--color-text-primary)",
|
|
12248
|
-
secondary: "text-(--color-text-secondary)",
|
|
12249
|
-
tertiary: "text-(--color-text-tertiary)",
|
|
12250
|
-
accent: "text-(--color-text-accent)",
|
|
12251
|
-
success: "text-(--color-text-success)",
|
|
12252
|
-
danger: "text-(--color-text-danger)",
|
|
12253
|
-
warning: "text-(--color-text-warning)",
|
|
12254
|
-
info: "text-(--color-text-info)",
|
|
12255
|
-
transparent: "text-transparent",
|
|
12256
|
-
};
|
|
12257
|
-
|
|
12258
|
-
const filledBackgroundAppearanceClasses = {
|
|
12259
|
-
brand: "[background:var(--color-bg-filled-brand)]",
|
|
12260
|
-
primary: "[background:var(--color-bg-filled-primary)]",
|
|
12261
|
-
secondary: "[background:var(--color-bg-filled-secondary)]",
|
|
12262
|
-
tertiary: "[background:var(--color-bg-filled-tertiary)]",
|
|
12263
|
-
accent: "[background:var(--color-bg-filled-accent)]",
|
|
12264
|
-
success: "[background:var(--color-bg-filled-success)]",
|
|
12265
|
-
danger: "[background:var(--color-bg-filled-danger)]",
|
|
12266
|
-
warning: "[background:var(--color-bg-filled-warning)]",
|
|
12267
|
-
info: "[background:var(--color-bg-filled-info)]",
|
|
12268
|
-
transparent: "[background:transparent]",
|
|
12269
|
-
};
|
|
12270
|
-
const filledHoverBackgroundAppearanceClasses = {
|
|
12271
|
-
brand: "hover:[background:var(--color-bg-filled-hover-brand)]",
|
|
12272
|
-
primary: "hover:[background:var(--color-bg-filled-hover-primary)]",
|
|
12273
|
-
secondary: "hover:[background:var(--color-bg-filled-hover-secondary)]",
|
|
12274
|
-
tertiary: "hover:[background:var(--color-bg-filled-hover-tertiary)]",
|
|
12275
|
-
accent: "hover:[background:var(--color-bg-filled-hover-accent)]",
|
|
12276
|
-
success: "hover:[background:var(--color-bg-filled-hover-success)]",
|
|
12277
|
-
danger: "hover:[background:var(--color-bg-filled-hover-danger)]",
|
|
12278
|
-
warning: "hover:[background:var(--color-bg-filled-hover-warning)]",
|
|
12279
|
-
info: "hover:[background:var(--color-bg-filled-hover-info)]",
|
|
12280
|
-
transparent: "hover:[background:transparent]",
|
|
12281
|
-
};
|
|
12282
|
-
const filledActiveBackgroundAppearanceClasses = {
|
|
12283
|
-
brand: "active:[background:var(--color-bg-filled-active-brand)]",
|
|
12284
|
-
primary: "active:[background:var(--color-bg-filled-active-primary)]",
|
|
12285
|
-
secondary: "active:[background:var(--color-bg-filled-active-secondary)]",
|
|
12286
|
-
tertiary: "active:[background:var(--color-bg-filled-active-tertiary)]",
|
|
12287
|
-
accent: "active:[background:var(--color-bg-filled-active-accent)]",
|
|
12288
|
-
success: "active:[background:var(--color-bg-filled-active-success)]",
|
|
12289
|
-
danger: "active:[background:var(--color-bg-filled-active-danger)]",
|
|
12290
|
-
warning: "active:[background:var(--color-bg-filled-active-warning)]",
|
|
12291
|
-
info: "active:[background:var(--color-bg-filled-active-info)]",
|
|
12292
|
-
transparent: "active:[background:transparent]",
|
|
12293
|
-
};
|
|
12294
|
-
const backgroundAppearanceClasses = {
|
|
12295
|
-
brand: "[background:var(--color-bg-brand)]",
|
|
12296
|
-
primary: "[background:var(--color-bg-primary)]",
|
|
12297
|
-
secondary: "[background:var(--color-bg-secondary)]",
|
|
12298
|
-
tertiary: "[background:var(--color-bg-tertiary)]",
|
|
12299
|
-
accent: "[background:var(--color-bg-accent)]",
|
|
12300
|
-
success: "[background:var(--color-bg-success)]",
|
|
12301
|
-
danger: "[background:var(--color-bg-danger)]",
|
|
12302
|
-
warning: "[background:var(--color-bg-warning)]",
|
|
12303
|
-
info: "[background:var(--color-bg-info)]",
|
|
12304
|
-
transparent: "[background:transparent]",
|
|
12305
|
-
};
|
|
12306
|
-
const hoverBackgroundAppearanceClasses = {
|
|
12307
|
-
brand: "hover:[background:var(--color-bg-hover-brand)]",
|
|
12308
|
-
primary: "hover:[background:var(--color-bg-hover-primary)]",
|
|
12309
|
-
secondary: "hover:[background:var(--color-bg-hover-secondary)]",
|
|
12310
|
-
tertiary: "hover:[background:var(--color-bg-hover-tertiary)]",
|
|
12311
|
-
accent: "hover:[background:var(--color-bg-hover-accent)]",
|
|
12312
|
-
success: "hover:[background:var(--color-bg-hover-success)]",
|
|
12313
|
-
danger: "hover:[background:var(--color-bg-hover-danger)]",
|
|
12314
|
-
warning: "hover:[background:var(--color-bg-hover-warning)]",
|
|
12315
|
-
info: "hover:[background:var(--color-bg-hover-info)]",
|
|
12316
|
-
transparent: "hover:[background:transparent]",
|
|
12317
|
-
};
|
|
12318
|
-
const activeBackgroundAppearanceClasses = {
|
|
12319
|
-
brand: "active:[background:var(--color-bg-active-brand)]",
|
|
12320
|
-
primary: "active:[background:var(--color-bg-active-primary)]",
|
|
12321
|
-
secondary: "active:[background:var(--color-bg-active-secondary)]",
|
|
12322
|
-
tertiary: "active:[background:var(--color-bg-active-tertiary)]",
|
|
12323
|
-
accent: "active:[background:var(--color-bg-active-accent)]",
|
|
12324
|
-
success: "active:[background:var(--color-bg-active-success)]",
|
|
12325
|
-
danger: "active:[background:var(--color-bg-active-danger)]",
|
|
12326
|
-
warning: "active:[background:var(--color-bg-active-warning)]",
|
|
12327
|
-
info: "active:[background:var(--color-bg-active-info)]",
|
|
12328
|
-
transparent: "active:[background:transparent]",
|
|
12329
|
-
};
|
|
12330
|
-
const layoutBackgroundAppearanceClasses = {
|
|
12331
|
-
brand: "[background:var(--color-bg-layout-brand)]",
|
|
12332
|
-
primary: "[background:var(--color-bg-layout-primary)]",
|
|
12333
|
-
secondary: "[background:var(--color-bg-layout-secondary)]",
|
|
12334
|
-
tertiary: "[background:var(--color-bg-layout-tertiary)]",
|
|
12335
|
-
accent: "[background:var(--color-bg-layout-accent)]",
|
|
12336
|
-
success: "[background:var(--color-bg-layout-success)]",
|
|
12337
|
-
danger: "[background:var(--color-bg-layout-danger)]",
|
|
12338
|
-
warning: "[background:var(--color-bg-layout-warning)]",
|
|
12339
|
-
info: "[background:var(--color-bg-layout-info)]",
|
|
12340
|
-
transparent: "[background:transparent]",
|
|
12341
|
-
};
|
|
12342
|
-
const layoutFilledBackgroundAppearanceClasses = {
|
|
12343
|
-
brand: "[background:var(--color-bg-filled-layout-brand)]",
|
|
12344
|
-
primary: "[background:var(--color-bg-filled-layout-primary)]",
|
|
12345
|
-
secondary: "[background:var(--color-bg-filled-layout-secondary)]",
|
|
12346
|
-
tertiary: "[background:var(--color-bg-filled-layout-tertiary)]",
|
|
12347
|
-
accent: "[background:var(--color-bg-filled-layout-accent)]",
|
|
12348
|
-
success: "[background:var(--color-bg-filled-layout-success)]",
|
|
12349
|
-
danger: "[background:var(--color-bg-filled-layout-danger)]",
|
|
12350
|
-
warning: "[background:var(--color-bg-filled-layout-warning)]",
|
|
12351
|
-
info: "[background:var(--color-bg-filled-layout-info)]",
|
|
12352
|
-
transparent: "[background:transparent]",
|
|
12353
|
-
};
|
|
12354
|
-
const bgBorderAppearanceClasses = {
|
|
12355
|
-
brand: "[background:var(--color-border-brand)]",
|
|
12356
|
-
primary: "[background:var(--color-border-primary)]",
|
|
12357
|
-
secondary: "[background:var(--color-border-secondary)]",
|
|
12358
|
-
tertiary: "[background:var(--color-border-tertiary)]",
|
|
12359
|
-
accent: "[background:var(--color-border-accent)]",
|
|
12360
|
-
success: "[background:var(--color-border-success)]",
|
|
12361
|
-
danger: "[background:var(--color-border-danger)]",
|
|
12362
|
-
warning: "[background:var(--color-border-warning)]",
|
|
12363
|
-
info: "[background:var(--color-border-info)]",
|
|
12364
|
-
transparent: "[background:transparent]",
|
|
12365
|
-
};
|
|
12366
|
-
const borderAppearanceClasses = {
|
|
12367
|
-
brand: "border-(--color-border-brand)",
|
|
12368
|
-
primary: "border-(--color-border-primary)",
|
|
12369
|
-
secondary: "border-(--color-border-secondary)",
|
|
12370
|
-
tertiary: "border-(--color-border-tertiary)",
|
|
12371
|
-
accent: "border-(--color-border-accent)",
|
|
12372
|
-
success: "border-(--color-border-success)",
|
|
12373
|
-
danger: "border-(--color-border-danger)",
|
|
12374
|
-
warning: "border-(--color-border-warning)",
|
|
12375
|
-
info: "border-(--color-border-info)",
|
|
12376
|
-
transparent: "border-transparent",
|
|
12377
|
-
};
|
|
12378
|
-
const filledBorderAppearanceClasses = {
|
|
12379
|
-
brand: "border-(--color-border-filled-brand)",
|
|
12380
|
-
primary: "border-(--color-border-filled-primary)",
|
|
12381
|
-
secondary: "border-(--color-border-filled-secondary)",
|
|
12382
|
-
tertiary: "border-(--color-border-filled-tertiary)",
|
|
12383
|
-
accent: "border-(--color-border-filled-accent)",
|
|
12384
|
-
success: "border-(--color-border-filled-success)",
|
|
12385
|
-
danger: "border-(--color-border-filled-danger)",
|
|
12386
|
-
warning: "border-(--color-border-filled-warning)",
|
|
12387
|
-
info: "border-(--color-border-filled-info)",
|
|
12388
|
-
transparent: "border-transparent",
|
|
12389
|
-
};
|
|
12390
|
-
const ringAppearanceClasses = {
|
|
12391
|
-
brand: "ring-(--color-border-brand)",
|
|
12392
|
-
primary: "ring-(--color-border-primary)",
|
|
12393
|
-
secondary: "ring-(--color-border-secondary)",
|
|
12394
|
-
tertiary: "ring-(--color-border-tertiary)",
|
|
12395
|
-
accent: "ring-(--color-border-accent)",
|
|
12396
|
-
success: "ring-(--color-border-success)",
|
|
12397
|
-
danger: "ring-(--color-border-danger)",
|
|
12398
|
-
warning: "ring-(--color-border-warning)",
|
|
12399
|
-
info: "ring-(--color-border-info)",
|
|
12400
|
-
transparent: "ring-transparent",
|
|
12401
|
-
};
|
|
12402
|
-
const filledRingAppearanceClasses = {
|
|
12403
|
-
brand: "ring-(--color-border-filled-brand)",
|
|
12404
|
-
primary: "ring-(--color-border-filled-primary)",
|
|
12405
|
-
secondary: "ring-(--color-border-filled-secondary)",
|
|
12406
|
-
tertiary: "ring-(--color-border-filled-tertiary)",
|
|
12407
|
-
accent: "ring-(--color-border-filled-accent)",
|
|
12408
|
-
success: "ring-(--color-border-filled-success)",
|
|
12409
|
-
danger: "ring-(--color-border-filled-danger)",
|
|
12410
|
-
warning: "ring-(--color-border-filled-warning)",
|
|
12411
|
-
info: "ring-(--color-border-filled-info)",
|
|
12412
|
-
transparent: "ring-transparent",
|
|
12413
|
-
};
|
|
12414
|
-
const focusVisibleOutlineAppearanceClasses = {
|
|
12415
|
-
brand: "focus-visible:outline-(--color-border-brand)",
|
|
12416
|
-
primary: "focus-visible:outline-(--color-border-primary)",
|
|
12417
|
-
secondary: "focus-visible:outline-(--color-border-secondary)",
|
|
12418
|
-
tertiary: "focus-visible:outline-(--color-border-tertiary)",
|
|
12419
|
-
accent: "focus-visible:outline-(--color-border-accent)",
|
|
12420
|
-
success: "focus-visible:outline-(--color-border-success)",
|
|
12421
|
-
danger: "focus-visible:outline-(--color-border-danger)",
|
|
12422
|
-
warning: "focus-visible:outline-(--color-border-warning)",
|
|
12423
|
-
info: "focus-visible:outline-(--color-border-info)",
|
|
12424
|
-
transparent: "focus-visible:outline-transparent",
|
|
12425
|
-
};
|
|
12426
|
-
const filledFocusVisibleOutlineAppearanceClasses = {
|
|
12427
|
-
brand: "focus-visible:outline-(--color-border-filled-brand)",
|
|
12428
|
-
primary: "focus-visible:outline-(--color-border-filled-primary)",
|
|
12429
|
-
secondary: "focus-visible:outline-(--color-border-filled-secondary)",
|
|
12430
|
-
tertiary: "focus-visible:outline-(--color-border-filled-tertiary)",
|
|
12431
|
-
accent: "focus-visible:outline-(--color-border-filled-accent)",
|
|
12432
|
-
success: "focus-visible:outline-(--color-border-filled-success)",
|
|
12433
|
-
danger: "focus-visible:outline-(--color-border-filled-danger)",
|
|
12434
|
-
warning: "focus-visible:outline-(--color-border-filled-warning)",
|
|
12435
|
-
info: "focus-visible:outline-(--color-border-filled-info)",
|
|
12436
|
-
transparent: "focus-visible:outline-transparent",
|
|
12437
|
-
};
|
|
12438
|
-
const accentColorAppearanceClasses = {
|
|
12439
|
-
brand: "accent-(--color-bg-brand)",
|
|
12440
|
-
primary: "accent-(--color-bg-primary)",
|
|
12441
|
-
secondary: "accent-(--color-bg-secondary)",
|
|
12442
|
-
tertiary: "accent-(--color-bg-tertiary)",
|
|
12443
|
-
accent: "accent-(--color-bg-accent)",
|
|
12444
|
-
success: "accent-(--color-bg-success)",
|
|
12445
|
-
danger: "accent-(--color-bg-danger)",
|
|
12446
|
-
warning: "accent-(--color-bg-warning)",
|
|
12447
|
-
info: "accent-(--color-bg-info)",
|
|
12448
|
-
transparent: "accent-transparent",
|
|
12449
|
-
};
|
|
12450
|
-
const filledAccentColorAppearanceClasses = {
|
|
12451
|
-
brand: "accent-(--color-bg-filled-brand)",
|
|
12452
|
-
primary: "accent-(--color-bg-filled-primary)",
|
|
12453
|
-
secondary: "accent-(--color-bg-filled-secondary)",
|
|
12454
|
-
tertiary: "accent-(--color-bg-filled-tertiary)",
|
|
12455
|
-
accent: "accent-(--color-bg-filled-accent)",
|
|
12456
|
-
success: "accent-(--color-bg-filled-success)",
|
|
12457
|
-
danger: "accent-(--color-bg-filled-danger)",
|
|
12458
|
-
warning: "accent-(--color-bg-filled-warning)",
|
|
12459
|
-
info: "accent-(--color-bg-filled-info)",
|
|
12460
|
-
transparent: "accent-transparent",
|
|
12461
|
-
};
|
|
12462
|
-
const checkedBackgroundAppearanceClasses = {
|
|
12463
|
-
brand: "checked:[background:var(--color-bg-brand)]",
|
|
12464
|
-
primary: "checked:[background:var(--color-bg-primary)]",
|
|
12465
|
-
secondary: "checked:[background:var(--color-bg-secondary)]",
|
|
12466
|
-
tertiary: "checked:[background:var(--color-bg-tertiary)]",
|
|
12467
|
-
accent: "checked:[background:var(--color-bg-accent)]",
|
|
12468
|
-
success: "checked:[background:var(--color-bg-success)]",
|
|
12469
|
-
danger: "checked:[background:var(--color-bg-danger)]",
|
|
12470
|
-
warning: "checked:[background:var(--color-bg-warning)]",
|
|
12471
|
-
info: "checked:[background:var(--color-bg-info)]",
|
|
12472
|
-
transparent: "checked:[background:transparent]",
|
|
12473
|
-
};
|
|
12474
|
-
const filledCheckedBackgroundAppearanceClasses = {
|
|
12475
|
-
brand: "checked:[background:var(--color-bg-filled-brand)]",
|
|
12476
|
-
primary: "checked:[background:var(--color-bg-filled-primary)]",
|
|
12477
|
-
secondary: "checked:[background:var(--color-bg-filled-secondary)]",
|
|
12478
|
-
tertiary: "checked:[background:var(--color-bg-filled-tertiary)]",
|
|
12479
|
-
accent: "checked:[background:var(--color-bg-filled-accent)]",
|
|
12480
|
-
success: "checked:[background:var(--color-bg-filled-success)]",
|
|
12481
|
-
danger: "checked:[background:var(--color-bg-filled-danger)]",
|
|
12482
|
-
warning: "checked:[background:var(--color-bg-filled-warning)]",
|
|
12483
|
-
info: "checked:[background:var(--color-bg-filled-info)]",
|
|
12484
|
-
transparent: "checked:[background:transparent]",
|
|
12485
|
-
};
|
|
12486
|
-
|
|
12487
12125
|
class ShadowAppearanceTheme extends BaseTheme {
|
|
12488
12126
|
constructor(initial) {
|
|
12489
12127
|
super();
|
|
@@ -12522,185 +12160,6 @@ ShadowAppearanceTheme.defaultLayoutShadow = {
|
|
|
12522
12160
|
xl: { base: "shadow-lg", hover: "", active: "", focus: "", focusVisible: "" }
|
|
12523
12161
|
};
|
|
12524
12162
|
|
|
12525
|
-
class GenericVariantTheme extends BaseTheme {
|
|
12526
|
-
constructor(variantInstances) {
|
|
12527
|
-
super();
|
|
12528
|
-
ComponentKeys.variant.forEach((variantKey) => {
|
|
12529
|
-
this[variantKey] = variantInstances[variantKey];
|
|
12530
|
-
});
|
|
12531
|
-
}
|
|
12532
|
-
getClasses(extractedKeys) {
|
|
12533
|
-
var _a;
|
|
12534
|
-
const variantKey = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.variant) !== null && _a !== void 0 ? _a : 'outline';
|
|
12535
|
-
return this[variantKey].getClasses(extractedKeys);
|
|
12536
|
-
}
|
|
12537
|
-
// used for button, badges, chips, etc - UI elements where transparent affects background
|
|
12538
|
-
static createUIElementTextTheme() {
|
|
12539
|
-
return new GenericVariantTheme({
|
|
12540
|
-
outline: AppearanceTheme.createTheme({
|
|
12541
|
-
base: textAppearanceClasses
|
|
12542
|
-
}, 'text', true), // Layout/UI components: text themes should ignore transparent
|
|
12543
|
-
filled: AppearanceTheme.createTheme({
|
|
12544
|
-
base: filledTextAppearanceClasses
|
|
12545
|
-
}, 'text', true)
|
|
12546
|
-
});
|
|
12547
|
-
}
|
|
12548
|
-
// used for typography components where transparent affects text color
|
|
12549
|
-
static createTypographyTextTheme() {
|
|
12550
|
-
return new GenericVariantTheme({
|
|
12551
|
-
outline: AppearanceTheme.createTheme({
|
|
12552
|
-
base: textAppearanceClasses
|
|
12553
|
-
}, 'text', false), // Typography components: text themes should respect transparent
|
|
12554
|
-
filled: AppearanceTheme.createTheme({
|
|
12555
|
-
base: filledTextAppearanceClasses
|
|
12556
|
-
}, 'text', false)
|
|
12557
|
-
});
|
|
12558
|
-
}
|
|
12559
|
-
// used for typography components where transparent should NOT affect background
|
|
12560
|
-
static createTypographyBgTheme() {
|
|
12561
|
-
return new GenericVariantTheme({
|
|
12562
|
-
outline: AppearanceTheme.createTheme({
|
|
12563
|
-
base: backgroundAppearanceClasses,
|
|
12564
|
-
hover: hoverBackgroundAppearanceClasses,
|
|
12565
|
-
active: activeBackgroundAppearanceClasses
|
|
12566
|
-
}, 'bg', true), // Typography components: bg themes should ignore transparent
|
|
12567
|
-
filled: AppearanceTheme.createTheme({
|
|
12568
|
-
base: filledBackgroundAppearanceClasses,
|
|
12569
|
-
hover: filledHoverBackgroundAppearanceClasses,
|
|
12570
|
-
active: filledActiveBackgroundAppearanceClasses
|
|
12571
|
-
}, 'bg', true)
|
|
12572
|
-
});
|
|
12573
|
-
}
|
|
12574
|
-
// used for typography components where transparent should NOT affect border
|
|
12575
|
-
static createTypographyBorderTheme() {
|
|
12576
|
-
return new GenericVariantTheme({
|
|
12577
|
-
outline: AppearanceTheme.createTheme({
|
|
12578
|
-
base: borderAppearanceClasses
|
|
12579
|
-
}, 'border', true), // Typography components: border themes should ignore transparent
|
|
12580
|
-
filled: AppearanceTheme.createTheme({
|
|
12581
|
-
base: filledBorderAppearanceClasses
|
|
12582
|
-
}, 'border', true)
|
|
12583
|
-
});
|
|
12584
|
-
}
|
|
12585
|
-
// used for layout/UI components where transparent should NOT affect text
|
|
12586
|
-
static createUIElementTextThemeIgnoreTransparent() {
|
|
12587
|
-
return new GenericVariantTheme({
|
|
12588
|
-
outline: AppearanceTheme.createTheme({
|
|
12589
|
-
base: textAppearanceClasses
|
|
12590
|
-
}, 'text', true), // Layout/UI components: text themes should ignore transparent
|
|
12591
|
-
filled: AppearanceTheme.createTheme({
|
|
12592
|
-
base: filledTextAppearanceClasses
|
|
12593
|
-
}, 'text', true)
|
|
12594
|
-
});
|
|
12595
|
-
}
|
|
12596
|
-
static createUIElementShadowTheme() {
|
|
12597
|
-
return new GenericVariantTheme({
|
|
12598
|
-
outline: ShadowAppearanceTheme.createUITheme(),
|
|
12599
|
-
filled: ShadowAppearanceTheme.createUITheme()
|
|
12600
|
-
});
|
|
12601
|
-
}
|
|
12602
|
-
static createLayoutShadowTheme() {
|
|
12603
|
-
return new GenericVariantTheme({
|
|
12604
|
-
outline: ShadowAppearanceTheme.createLayoutTheme(),
|
|
12605
|
-
filled: ShadowAppearanceTheme.createLayoutTheme()
|
|
12606
|
-
});
|
|
12607
|
-
}
|
|
12608
|
-
static createUIElementBorderTheme() {
|
|
12609
|
-
return new GenericVariantTheme({
|
|
12610
|
-
outline: AppearanceTheme.createTheme({
|
|
12611
|
-
base: borderAppearanceClasses
|
|
12612
|
-
}, 'border', true), // Layout/UI components: border themes should ignore transparent
|
|
12613
|
-
filled: AppearanceTheme.createTheme({
|
|
12614
|
-
base: filledBorderAppearanceClasses
|
|
12615
|
-
}, 'border', true)
|
|
12616
|
-
});
|
|
12617
|
-
}
|
|
12618
|
-
static createUIElementRingTheme() {
|
|
12619
|
-
return new GenericVariantTheme({
|
|
12620
|
-
outline: AppearanceTheme.createTheme({
|
|
12621
|
-
base: ringAppearanceClasses
|
|
12622
|
-
}, 'ring', true), // Layout/UI components: ring themes should ignore transparent
|
|
12623
|
-
filled: AppearanceTheme.createTheme({
|
|
12624
|
-
base: filledRingAppearanceClasses
|
|
12625
|
-
}, 'ring', true)
|
|
12626
|
-
});
|
|
12627
|
-
}
|
|
12628
|
-
static createCheckboxBgAppearanceTheme() {
|
|
12629
|
-
return new GenericVariantTheme({
|
|
12630
|
-
outline: AppearanceTheme.createTheme({
|
|
12631
|
-
base: backgroundAppearanceClasses,
|
|
12632
|
-
}, 'bg', false), // Layout/UI components: bg themes should respect transparent
|
|
12633
|
-
filled: AppearanceTheme.createTheme({
|
|
12634
|
-
base: backgroundAppearanceClasses,
|
|
12635
|
-
}, 'bg', false)
|
|
12636
|
-
});
|
|
12637
|
-
}
|
|
12638
|
-
static createBgAppearanceTheme() {
|
|
12639
|
-
return new GenericVariantTheme({
|
|
12640
|
-
outline: AppearanceTheme.createTheme({
|
|
12641
|
-
base: backgroundAppearanceClasses,
|
|
12642
|
-
hover: hoverBackgroundAppearanceClasses,
|
|
12643
|
-
active: activeBackgroundAppearanceClasses
|
|
12644
|
-
}, 'bg', false), // Layout/UI components: bg themes should respect transparent
|
|
12645
|
-
filled: AppearanceTheme.createTheme({
|
|
12646
|
-
base: filledBackgroundAppearanceClasses,
|
|
12647
|
-
hover: filledHoverBackgroundAppearanceClasses,
|
|
12648
|
-
active: filledActiveBackgroundAppearanceClasses
|
|
12649
|
-
}, 'bg', false)
|
|
12650
|
-
});
|
|
12651
|
-
}
|
|
12652
|
-
static createSimpleUIElementBgAppearanceTheme() {
|
|
12653
|
-
return new GenericVariantTheme({
|
|
12654
|
-
outline: AppearanceTheme.createTheme({
|
|
12655
|
-
base: backgroundAppearanceClasses,
|
|
12656
|
-
}, 'bg', false), // Layout/UI components: bg themes should respect transparent
|
|
12657
|
-
filled: AppearanceTheme.createTheme({
|
|
12658
|
-
base: filledBackgroundAppearanceClasses,
|
|
12659
|
-
}, 'bg', false)
|
|
12660
|
-
});
|
|
12661
|
-
}
|
|
12662
|
-
static createAccentColorAppearanceTheme() {
|
|
12663
|
-
return new GenericVariantTheme({
|
|
12664
|
-
outline: AppearanceTheme.createTheme({
|
|
12665
|
-
base: accentColorAppearanceClasses
|
|
12666
|
-
}, 'accent', true), // Layout/UI components: accent themes should ignore transparent
|
|
12667
|
-
filled: AppearanceTheme.createTheme({
|
|
12668
|
-
base: filledAccentColorAppearanceClasses
|
|
12669
|
-
}, 'accent', true)
|
|
12670
|
-
});
|
|
12671
|
-
}
|
|
12672
|
-
static createCheckedAppearanceTheme() {
|
|
12673
|
-
return new GenericVariantTheme({
|
|
12674
|
-
outline: AppearanceTheme.createTheme({
|
|
12675
|
-
base: checkedBackgroundAppearanceClasses
|
|
12676
|
-
}, 'bg', false), // Layout/UI components: bg themes should respect transparent
|
|
12677
|
-
filled: AppearanceTheme.createTheme({
|
|
12678
|
-
base: filledCheckedBackgroundAppearanceClasses
|
|
12679
|
-
}, 'bg', false)
|
|
12680
|
-
});
|
|
12681
|
-
}
|
|
12682
|
-
static createLayoutBgAppearanceTheme() {
|
|
12683
|
-
return new GenericVariantTheme({
|
|
12684
|
-
outline: AppearanceTheme.createTheme({
|
|
12685
|
-
base: layoutBackgroundAppearanceClasses
|
|
12686
|
-
}, 'bg', false), // Layout components: bg themes should respect transparent
|
|
12687
|
-
filled: AppearanceTheme.createTheme({
|
|
12688
|
-
base: layoutFilledBackgroundAppearanceClasses
|
|
12689
|
-
}, 'bg', false)
|
|
12690
|
-
});
|
|
12691
|
-
}
|
|
12692
|
-
static createUIElementFocusVisibleTheme() {
|
|
12693
|
-
return new GenericVariantTheme({
|
|
12694
|
-
outline: AppearanceTheme.createTheme({
|
|
12695
|
-
focusVisible: focusVisibleOutlineAppearanceClasses
|
|
12696
|
-
}, 'focusVisible', true), // UI components: focusVisible themes should ignore transparent
|
|
12697
|
-
filled: AppearanceTheme.createTheme({
|
|
12698
|
-
focusVisible: filledFocusVisibleOutlineAppearanceClasses
|
|
12699
|
-
}, 'focusVisible', true)
|
|
12700
|
-
});
|
|
12701
|
-
}
|
|
12702
|
-
}
|
|
12703
|
-
|
|
12704
12163
|
class WrapTheme extends BaseTheme {
|
|
12705
12164
|
constructor() {
|
|
12706
12165
|
super(...arguments);
|
|
@@ -12763,6 +12222,7 @@ const themeDefaults = {
|
|
|
12763
12222
|
card: {
|
|
12764
12223
|
md: true,
|
|
12765
12224
|
flex: true,
|
|
12225
|
+
outline: true,
|
|
12766
12226
|
primary: true,
|
|
12767
12227
|
rounded: true,
|
|
12768
12228
|
normal: true,
|
|
@@ -12801,17 +12261,21 @@ const themeDefaults = {
|
|
|
12801
12261
|
ring: true,
|
|
12802
12262
|
},
|
|
12803
12263
|
container: {
|
|
12264
|
+
md: true,
|
|
12804
12265
|
noRing: true,
|
|
12805
12266
|
flex: true,
|
|
12806
12267
|
column: true,
|
|
12807
|
-
md: true,
|
|
12808
12268
|
itemsCenter: true,
|
|
12809
12269
|
gap: true,
|
|
12270
|
+
outline: true,
|
|
12271
|
+
primary: true,
|
|
12272
|
+
sharp: true,
|
|
12810
12273
|
},
|
|
12811
12274
|
section: {
|
|
12812
12275
|
md: true,
|
|
12813
12276
|
flex: true,
|
|
12814
12277
|
column: true,
|
|
12278
|
+
outline: true,
|
|
12815
12279
|
primary: true,
|
|
12816
12280
|
itemsStart: true,
|
|
12817
12281
|
gap: true,
|
|
@@ -12819,6 +12283,8 @@ const themeDefaults = {
|
|
|
12819
12283
|
noBorder: true,
|
|
12820
12284
|
noRing: true,
|
|
12821
12285
|
noShadow: true,
|
|
12286
|
+
responsive: true,
|
|
12287
|
+
sharp: true,
|
|
12822
12288
|
},
|
|
12823
12289
|
stack: {
|
|
12824
12290
|
md: true,
|
|
@@ -12829,6 +12295,9 @@ const themeDefaults = {
|
|
|
12829
12295
|
padding: true,
|
|
12830
12296
|
noBorder: true,
|
|
12831
12297
|
noRing: true,
|
|
12298
|
+
outline: true,
|
|
12299
|
+
primary: true,
|
|
12300
|
+
sharp: true,
|
|
12832
12301
|
},
|
|
12833
12302
|
row: {
|
|
12834
12303
|
row: true,
|
|
@@ -12838,6 +12307,9 @@ const themeDefaults = {
|
|
|
12838
12307
|
gap: true,
|
|
12839
12308
|
noBorder: true,
|
|
12840
12309
|
noRing: true,
|
|
12310
|
+
outline: true,
|
|
12311
|
+
primary: true,
|
|
12312
|
+
sharp: true,
|
|
12841
12313
|
},
|
|
12842
12314
|
col: {
|
|
12843
12315
|
column: true,
|
|
@@ -12846,34 +12318,53 @@ const themeDefaults = {
|
|
|
12846
12318
|
gap: true,
|
|
12847
12319
|
noBorder: true,
|
|
12848
12320
|
noRing: true,
|
|
12321
|
+
outline: true,
|
|
12322
|
+
primary: true,
|
|
12323
|
+
sharp: true,
|
|
12849
12324
|
},
|
|
12850
12325
|
grid2: {
|
|
12851
12326
|
md: true,
|
|
12852
12327
|
grid: true,
|
|
12853
12328
|
gap: true,
|
|
12329
|
+
sharp: true,
|
|
12330
|
+
outline: true,
|
|
12331
|
+
primary: true,
|
|
12854
12332
|
},
|
|
12855
12333
|
grid3: {
|
|
12856
12334
|
md: true,
|
|
12857
12335
|
grid: true,
|
|
12858
12336
|
gap: true,
|
|
12337
|
+
sharp: true,
|
|
12338
|
+
outline: true,
|
|
12339
|
+
primary: true,
|
|
12859
12340
|
},
|
|
12860
12341
|
grid4: {
|
|
12861
12342
|
md: true,
|
|
12862
12343
|
grid: true,
|
|
12863
12344
|
gap: true,
|
|
12345
|
+
sharp: true,
|
|
12346
|
+
outline: true,
|
|
12347
|
+
primary: true,
|
|
12864
12348
|
},
|
|
12865
12349
|
grid5: {
|
|
12866
12350
|
md: true,
|
|
12867
12351
|
grid: true,
|
|
12868
12352
|
gap: true,
|
|
12353
|
+
sharp: true,
|
|
12354
|
+
outline: true,
|
|
12355
|
+
primary: true,
|
|
12869
12356
|
},
|
|
12870
12357
|
grid6: {
|
|
12871
12358
|
md: true,
|
|
12872
12359
|
grid: true,
|
|
12873
12360
|
gap: true,
|
|
12361
|
+
sharp: true,
|
|
12362
|
+
outline: true,
|
|
12363
|
+
primary: true,
|
|
12874
12364
|
},
|
|
12875
12365
|
divider: {
|
|
12876
12366
|
md: true,
|
|
12367
|
+
outline: true,
|
|
12877
12368
|
primary: true,
|
|
12878
12369
|
noPadding: true,
|
|
12879
12370
|
},
|
|
@@ -12883,8 +12374,11 @@ const themeDefaults = {
|
|
|
12883
12374
|
gap: true,
|
|
12884
12375
|
sans: true,
|
|
12885
12376
|
medium: true,
|
|
12377
|
+
outline: true,
|
|
12378
|
+
primary: true,
|
|
12886
12379
|
},
|
|
12887
12380
|
img: {
|
|
12381
|
+
md: true,
|
|
12888
12382
|
rounded: true,
|
|
12889
12383
|
},
|
|
12890
12384
|
code: {
|
|
@@ -12894,6 +12388,7 @@ const themeDefaults = {
|
|
|
12894
12388
|
rounded: true,
|
|
12895
12389
|
inline: true,
|
|
12896
12390
|
padding: true,
|
|
12391
|
+
outline: true,
|
|
12897
12392
|
primary: true,
|
|
12898
12393
|
ring: true,
|
|
12899
12394
|
},
|
|
@@ -12901,31 +12396,48 @@ const themeDefaults = {
|
|
|
12901
12396
|
md: true,
|
|
12902
12397
|
sans: true,
|
|
12903
12398
|
textLeft: true,
|
|
12399
|
+
outline: true,
|
|
12400
|
+
primary: true,
|
|
12904
12401
|
},
|
|
12905
12402
|
title: {
|
|
12906
12403
|
md: true,
|
|
12907
12404
|
sans: true,
|
|
12908
12405
|
semibold: true,
|
|
12909
12406
|
textLeft: true,
|
|
12407
|
+
responsive: true,
|
|
12408
|
+
outline: true,
|
|
12409
|
+
primary: true,
|
|
12910
12410
|
},
|
|
12911
12411
|
pageTitle: {
|
|
12912
12412
|
md: true,
|
|
12913
12413
|
sans: true,
|
|
12914
12414
|
semibold: true,
|
|
12915
12415
|
textLeft: true,
|
|
12416
|
+
responsive: true,
|
|
12417
|
+
outline: true,
|
|
12418
|
+
primary: true,
|
|
12916
12419
|
},
|
|
12917
12420
|
sectionTitle: {
|
|
12918
12421
|
md: true,
|
|
12919
12422
|
sans: true,
|
|
12920
12423
|
semibold: true,
|
|
12921
12424
|
textLeft: true,
|
|
12425
|
+
responsive: true,
|
|
12426
|
+
outline: true,
|
|
12427
|
+
primary: true,
|
|
12922
12428
|
},
|
|
12923
12429
|
link: {
|
|
12430
|
+
md: true,
|
|
12924
12431
|
underline: true,
|
|
12925
12432
|
sans: true,
|
|
12433
|
+
outline: true,
|
|
12434
|
+
link: true,
|
|
12926
12435
|
},
|
|
12927
12436
|
listItem: {
|
|
12437
|
+
md: true,
|
|
12928
12438
|
sans: true,
|
|
12439
|
+
outline: true,
|
|
12440
|
+
primary: true,
|
|
12929
12441
|
},
|
|
12930
12442
|
list: {
|
|
12931
12443
|
md: true,
|
|
@@ -12933,6 +12445,8 @@ const themeDefaults = {
|
|
|
12933
12445
|
normal: true,
|
|
12934
12446
|
padding: true,
|
|
12935
12447
|
disc: true,
|
|
12448
|
+
outline: true,
|
|
12449
|
+
primary: true,
|
|
12936
12450
|
},
|
|
12937
12451
|
checkbox: {
|
|
12938
12452
|
input: {
|
|
@@ -12972,41 +12486,53 @@ const themeDefaults = {
|
|
|
12972
12486
|
},
|
|
12973
12487
|
};
|
|
12974
12488
|
|
|
12975
|
-
|
|
12976
|
-
|
|
12977
|
-
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
|
|
12981
|
-
|
|
12982
|
-
const
|
|
12489
|
+
/* ==========================================
|
|
12490
|
+
CSS VARIABLE CONSUMER CLASSES
|
|
12491
|
+
These classes consume component-level CSS variables
|
|
12492
|
+
that are set by CSS rules in vars.css based on
|
|
12493
|
+
data-appearance and data-variant attributes.
|
|
12494
|
+
========================================== */
|
|
12495
|
+
/** Background consumer classes - consume --bg-color, --bg-hover-color, --bg-active-color */
|
|
12496
|
+
const bgConsumerClasses = {
|
|
12497
|
+
base: "[background:var(--bg-color)]",
|
|
12498
|
+
hover: "hover:[background:var(--bg-hover-color)]",
|
|
12499
|
+
active: "active:[background:var(--bg-active-color)]",
|
|
12500
|
+
};
|
|
12501
|
+
/** Text color consumer class - consumes --text-color */
|
|
12502
|
+
const textConsumerClass = "text-(--text-color)";
|
|
12503
|
+
/** Border consumer class - consumes --border-color */
|
|
12504
|
+
const borderConsumerClass = "border-(--border-color)";
|
|
12505
|
+
/** Ring consumer class - consumes --ring-color */
|
|
12506
|
+
const ringConsumerClass = "ring-(--ring-color)";
|
|
12507
|
+
/** Focus visible outline consumer class - consumes --ring-color */
|
|
12508
|
+
const focusVisibleConsumerClass = "focus-visible:outline-(--ring-color)";
|
|
12509
|
+
/** Accent color consumer class - consumes --accent-color */
|
|
12510
|
+
const accentConsumerClass = "accent-(--accent-color)";
|
|
12511
|
+
/** Checked background consumer class - consumes --checked-bg-color */
|
|
12512
|
+
const checkedBgConsumerClass = "checked:[background:var(--checked-bg-color)]";
|
|
12513
|
+
|
|
12514
|
+
const defaultButtonTheme = new ComponentTheme("button", "vane-button w-fit h-fit cursor-pointer transition-all duration-200 whitespace-nowrap", {
|
|
12983
12515
|
size: {
|
|
12984
|
-
px: new PxTheme(
|
|
12985
|
-
py: PyTheme
|
|
12986
|
-
gap: GapTheme
|
|
12516
|
+
px: new PxTheme(),
|
|
12517
|
+
py: new PyTheme(),
|
|
12518
|
+
gap: new GapTheme(),
|
|
12987
12519
|
text: new FontSizeTheme(),
|
|
12988
|
-
lineHeight: new LineHeightTheme(
|
|
12989
|
-
xs: "[--lh:1.3]",
|
|
12990
|
-
sm: "[--lh:1.3]",
|
|
12991
|
-
md: "[--lh:1.3]",
|
|
12992
|
-
lg: "[--lh:1.3]",
|
|
12993
|
-
xl: "[--lh:1.3]"
|
|
12994
|
-
}),
|
|
12520
|
+
lineHeight: new LineHeightTheme(),
|
|
12995
12521
|
},
|
|
12996
12522
|
appearance: {
|
|
12997
|
-
background:
|
|
12998
|
-
text:
|
|
12999
|
-
border:
|
|
13000
|
-
ring:
|
|
13001
|
-
focusVisible:
|
|
13002
|
-
shadow:
|
|
12523
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base, hover: bgConsumerClasses.hover, active: bgConsumerClasses.active }, 'bg'),
|
|
12524
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12525
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12526
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12527
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
|
|
12528
|
+
shadow: ShadowAppearanceTheme.createUITheme()
|
|
13003
12529
|
},
|
|
13004
12530
|
layout: {
|
|
13005
12531
|
...defaultLayoutsThemes,
|
|
13006
12532
|
border: new BorderTheme(),
|
|
13007
12533
|
ring: new RingTheme(),
|
|
13008
12534
|
focusVisible: new FocusVisibleTheme(),
|
|
13009
|
-
radius: RadiusTheme
|
|
12535
|
+
radius: new RadiusTheme(),
|
|
13010
12536
|
wrap: new WrapTheme(),
|
|
13011
12537
|
flexDirection: new DirectionTheme(),
|
|
13012
12538
|
},
|
|
@@ -13016,36 +12542,28 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
|
|
|
13016
12542
|
return props.href ? "a" : "button";
|
|
13017
12543
|
});
|
|
13018
12544
|
|
|
13019
|
-
|
|
13020
|
-
const badgeAspectRatioClasses = {
|
|
13021
|
-
xs: "[--aspect-ratio:2]",
|
|
13022
|
-
sm: "[--aspect-ratio:2]",
|
|
13023
|
-
md: "[--aspect-ratio:2]",
|
|
13024
|
-
lg: "[--aspect-ratio:2]",
|
|
13025
|
-
xl: "[--aspect-ratio:2]",
|
|
13026
|
-
};
|
|
13027
|
-
const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all duration-200 whitespace-nowrap", {
|
|
12545
|
+
const defaultBadgeTheme = new ComponentTheme("span", "vane-badge w-fit h-fit transition-all duration-200 whitespace-nowrap", {
|
|
13028
12546
|
size: {
|
|
13029
|
-
px: new PxTheme(
|
|
13030
|
-
py: PyTheme
|
|
13031
|
-
gap: GapTheme
|
|
12547
|
+
px: new PxTheme(),
|
|
12548
|
+
py: new PyTheme(),
|
|
12549
|
+
gap: new GapTheme(),
|
|
13032
12550
|
text: new FontSizeTheme(),
|
|
13033
|
-
lineHeight: LineHeightTheme
|
|
12551
|
+
lineHeight: new LineHeightTheme()
|
|
13034
12552
|
},
|
|
13035
12553
|
appearance: {
|
|
13036
|
-
background:
|
|
13037
|
-
text:
|
|
13038
|
-
border:
|
|
13039
|
-
ring:
|
|
13040
|
-
focusVisible:
|
|
13041
|
-
shadow:
|
|
12554
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12555
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12556
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12557
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12558
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
|
|
12559
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme()
|
|
13042
12560
|
},
|
|
13043
12561
|
layout: {
|
|
13044
12562
|
...defaultLayoutsThemes,
|
|
13045
12563
|
border: new BorderTheme(),
|
|
13046
12564
|
ring: new RingTheme(),
|
|
13047
12565
|
focusVisible: new FocusVisibleTheme(),
|
|
13048
|
-
radius: RadiusTheme
|
|
12566
|
+
radius: new RadiusTheme(),
|
|
13049
12567
|
wrap: new WrapTheme(),
|
|
13050
12568
|
flexDirection: new DirectionTheme(),
|
|
13051
12569
|
},
|
|
@@ -13054,43 +12572,25 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
13054
12572
|
return props.href ? "a" : "span";
|
|
13055
12573
|
});
|
|
13056
12574
|
|
|
13057
|
-
const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all duration-200 whitespace-nowrap", {
|
|
12575
|
+
const defaultChipTheme = new ComponentTheme("span", "vane-chip w-fit h-fit transition-all duration-200 whitespace-nowrap", {
|
|
13058
12576
|
size: {
|
|
13059
|
-
px: new PxTheme(
|
|
13060
|
-
|
|
13061
|
-
sm: "[--aspect-ratio:2]",
|
|
13062
|
-
md: "[--aspect-ratio:2]",
|
|
13063
|
-
lg: "[--aspect-ratio:2]",
|
|
13064
|
-
xl: "[--aspect-ratio:2]",
|
|
13065
|
-
}, true),
|
|
13066
|
-
py: new PyTheme({
|
|
13067
|
-
xs: "[--py-unit:0.5]",
|
|
13068
|
-
sm: "[--py-unit:1]",
|
|
13069
|
-
md: "[--py-unit:1.5]",
|
|
13070
|
-
lg: "[--py-unit:2]",
|
|
13071
|
-
xl: "[--py-unit:2.5]",
|
|
13072
|
-
}, true),
|
|
12577
|
+
px: new PxTheme(),
|
|
12578
|
+
py: new PyTheme(),
|
|
13073
12579
|
text: new FontSizeTheme(),
|
|
13074
|
-
lineHeight: new LineHeightTheme(
|
|
13075
|
-
|
|
13076
|
-
sm: "[--lh:1.2]",
|
|
13077
|
-
md: "[--lh:1.2]",
|
|
13078
|
-
lg: "[--lh:1.2]",
|
|
13079
|
-
xl: "[--lh:1.2]"
|
|
13080
|
-
}),
|
|
13081
|
-
gap: GapTheme.createForUI()
|
|
12580
|
+
lineHeight: new LineHeightTheme(),
|
|
12581
|
+
gap: new GapTheme()
|
|
13082
12582
|
},
|
|
13083
12583
|
appearance: {
|
|
13084
|
-
background:
|
|
13085
|
-
text:
|
|
13086
|
-
border:
|
|
13087
|
-
ring:
|
|
13088
|
-
focusVisible:
|
|
13089
|
-
shadow:
|
|
12584
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12585
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12586
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12587
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12588
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
|
|
12589
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme()
|
|
13090
12590
|
},
|
|
13091
12591
|
layout: {
|
|
13092
12592
|
...defaultLayoutsThemes,
|
|
13093
|
-
radius: RadiusTheme
|
|
12593
|
+
radius: new RadiusTheme(),
|
|
13094
12594
|
border: new BorderTheme(),
|
|
13095
12595
|
ring: new RingTheme(),
|
|
13096
12596
|
focusVisible: new FocusVisibleTheme(),
|
|
@@ -13102,55 +12602,25 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
13102
12602
|
return props.href ? "a" : "span";
|
|
13103
12603
|
});
|
|
13104
12604
|
|
|
13105
|
-
const defaultCodeTheme = new ComponentTheme("code", "", {
|
|
12605
|
+
const defaultCodeTheme = new ComponentTheme("code", "vane-code", {
|
|
13106
12606
|
size: {
|
|
13107
|
-
px: new PxTheme(
|
|
13108
|
-
|
|
13109
|
-
|
|
13110
|
-
|
|
13111
|
-
|
|
13112
|
-
xl: "[--aspect-ratio:1.8]",
|
|
13113
|
-
}, true),
|
|
13114
|
-
py: new PyTheme({
|
|
13115
|
-
xs: "[--py-unit:0.4]",
|
|
13116
|
-
sm: "[--py-unit:0.6]",
|
|
13117
|
-
md: "[--py-unit:0.8]",
|
|
13118
|
-
lg: "[--py-unit:1]",
|
|
13119
|
-
xl: "[--py-unit:1.2]",
|
|
13120
|
-
}, true),
|
|
13121
|
-
text: new FontSizeTheme({
|
|
13122
|
-
xs: "[--fs-unit:5]",
|
|
13123
|
-
sm: "[--fs-unit:6]",
|
|
13124
|
-
md: "[--fs-unit:7]",
|
|
13125
|
-
lg: "[--fs-unit:8]",
|
|
13126
|
-
xl: "[--fs-unit:9]",
|
|
13127
|
-
}),
|
|
13128
|
-
lineHeight: new LineHeightTheme({
|
|
13129
|
-
xs: "[--lh:1]",
|
|
13130
|
-
sm: "[--lh:1]",
|
|
13131
|
-
md: "[--lh:1]",
|
|
13132
|
-
lg: "[--lh:1]",
|
|
13133
|
-
xl: "[--lh:1]"
|
|
13134
|
-
}),
|
|
13135
|
-
gap: GapTheme.createForUI()
|
|
12607
|
+
px: new PxTheme(),
|
|
12608
|
+
py: new PyTheme(),
|
|
12609
|
+
text: new FontSizeTheme(),
|
|
12610
|
+
lineHeight: new LineHeightTheme(),
|
|
12611
|
+
gap: new GapTheme()
|
|
13136
12612
|
},
|
|
13137
12613
|
appearance: {
|
|
13138
|
-
background:
|
|
13139
|
-
text:
|
|
13140
|
-
border:
|
|
13141
|
-
ring:
|
|
13142
|
-
focusVisible:
|
|
13143
|
-
shadow:
|
|
12614
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12615
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12616
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12617
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12618
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
|
|
12619
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme()
|
|
13144
12620
|
},
|
|
13145
12621
|
layout: {
|
|
13146
12622
|
...defaultLayoutsThemes,
|
|
13147
|
-
radius: new RadiusTheme(
|
|
13148
|
-
xs: '[--br-unit:1]',
|
|
13149
|
-
sm: '[--br-unit:2]',
|
|
13150
|
-
md: '[--br-unit:3]',
|
|
13151
|
-
lg: '[--br-unit:4]',
|
|
13152
|
-
xl: '[--br-unit:5]'
|
|
13153
|
-
}, true),
|
|
12623
|
+
radius: new RadiusTheme(),
|
|
13154
12624
|
border: new BorderTheme(),
|
|
13155
12625
|
ring: new RingTheme(),
|
|
13156
12626
|
focusVisible: new FocusVisibleTheme(),
|
|
@@ -13162,25 +12632,23 @@ const defaultCodeTheme = new ComponentTheme("code", "", {
|
|
|
13162
12632
|
|
|
13163
12633
|
/**
|
|
13164
12634
|
* Link-specific variant theme that handles text colors
|
|
13165
|
-
* using
|
|
12635
|
+
* using CSS consumer class approach.
|
|
13166
12636
|
*
|
|
13167
|
-
*
|
|
13168
|
-
*
|
|
12637
|
+
* Link defaults to "link" appearance which provides link-specific colors
|
|
12638
|
+
* via CSS variable rules in vars.css.
|
|
13169
12639
|
*/
|
|
13170
12640
|
class LinkVariantTheme extends BaseTheme {
|
|
13171
12641
|
constructor() {
|
|
13172
12642
|
super(...arguments);
|
|
13173
|
-
/**
|
|
13174
|
-
this.outline = "text-(--
|
|
13175
|
-
/**
|
|
13176
|
-
this.filled = "text-(--
|
|
12643
|
+
/** CSS consumer class for outline variant */
|
|
12644
|
+
this.outline = "text-(--text-color)";
|
|
12645
|
+
/** CSS consumer class for filled variant */
|
|
12646
|
+
this.filled = "text-(--text-color)";
|
|
13177
12647
|
}
|
|
13178
12648
|
getClasses(extractedKeys) {
|
|
13179
12649
|
var _a;
|
|
13180
|
-
//
|
|
13181
|
-
|
|
13182
|
-
return ['text-transparent'];
|
|
13183
|
-
}
|
|
12650
|
+
// CSS-based approach: consumer class always outputs
|
|
12651
|
+
// Transparent is handled via data-transparent attribute
|
|
13184
12652
|
const variant = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.variant) !== null && _a !== void 0 ? _a : 'outline';
|
|
13185
12653
|
return [this[variant] || ''];
|
|
13186
12654
|
}
|
|
@@ -13220,18 +12688,19 @@ const mergeDefaults = (baseDefaults, overrideDefaults) => {
|
|
|
13220
12688
|
return finalDefaults;
|
|
13221
12689
|
};
|
|
13222
12690
|
|
|
13223
|
-
/**
|
|
13224
|
-
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
|
|
13228
|
-
|
|
13229
|
-
|
|
13230
|
-
|
|
13231
|
-
|
|
13232
|
-
|
|
13233
|
-
|
|
13234
|
-
|
|
12691
|
+
/**
|
|
12692
|
+
* Left padding theme - only outputs the consumer class pl-(--pl).
|
|
12693
|
+
* CSS variable values (--pl-unit) are now set via CSS rules
|
|
12694
|
+
* in vars.css using semantic classes and data attributes.
|
|
12695
|
+
*/
|
|
12696
|
+
class PlTheme extends BaseTheme {
|
|
12697
|
+
constructor() {
|
|
12698
|
+
super(...arguments);
|
|
12699
|
+
/** Consumer class for left padding */
|
|
12700
|
+
this.pl = "pl-(--pl)";
|
|
12701
|
+
}
|
|
12702
|
+
getClasses(_extractedKeys) {
|
|
12703
|
+
return [this.pl];
|
|
13235
12704
|
}
|
|
13236
12705
|
}
|
|
13237
12706
|
|
|
@@ -13253,14 +12722,14 @@ class ListStyleTheme extends BaseTheme {
|
|
|
13253
12722
|
}
|
|
13254
12723
|
}
|
|
13255
12724
|
|
|
13256
|
-
const createTypographyComponentTheme = (tag, base = "text-balance", fontSizeTheme = new FontSizeTheme(), defaults = {}, lineHeightTheme = LineHeightTheme
|
|
12725
|
+
const createTypographyComponentTheme = (tag, base = "text-balance", fontSizeTheme = new FontSizeTheme(), defaults = {}, lineHeightTheme = new LineHeightTheme()) => {
|
|
13257
12726
|
return new ComponentTheme(tag, base, {
|
|
13258
12727
|
size: {
|
|
13259
12728
|
text: fontSizeTheme,
|
|
13260
12729
|
lineHeight: lineHeightTheme,
|
|
13261
12730
|
},
|
|
13262
12731
|
appearance: {
|
|
13263
|
-
text:
|
|
12732
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
13264
12733
|
},
|
|
13265
12734
|
typography: defaultTypographyThemes,
|
|
13266
12735
|
layout: defaultLayoutsThemes,
|
|
@@ -13269,19 +12738,19 @@ const createTypographyComponentTheme = (tag, base = "text-balance", fontSizeThem
|
|
|
13269
12738
|
return props.href ? "a" : tag;
|
|
13270
12739
|
});
|
|
13271
12740
|
};
|
|
13272
|
-
// Page title specific theme
|
|
13273
|
-
const pageTitleTheme = createTypographyComponentTheme("h1", "text-balance tracking-tight w-fit", FontSizeTheme
|
|
13274
|
-
// Section title specific theme
|
|
13275
|
-
const sectionTitleTheme = createTypographyComponentTheme("h2", "text-balance w-fit", FontSizeTheme
|
|
13276
|
-
// Title specific theme
|
|
13277
|
-
const titleTheme = createTypographyComponentTheme("h3", "text-balance w-fit", FontSizeTheme
|
|
12741
|
+
// Page title specific theme - uses responsive font size
|
|
12742
|
+
const pageTitleTheme = createTypographyComponentTheme("h1", "vane-page-title text-balance tracking-tight w-fit", new FontSizeTheme(), mergeDefaults(themeDefaults.pageTitle, { semibold: true }), new LineHeightTheme());
|
|
12743
|
+
// Section title specific theme - uses responsive font size
|
|
12744
|
+
const sectionTitleTheme = createTypographyComponentTheme("h2", "vane-section-title text-balance w-fit", new FontSizeTheme(), mergeDefaults(themeDefaults.sectionTitle, { semibold: true }), new LineHeightTheme());
|
|
12745
|
+
// Title specific theme - uses responsive font size
|
|
12746
|
+
const titleTheme = createTypographyComponentTheme("h3", "vane-title text-balance w-fit", new FontSizeTheme(), mergeDefaults(themeDefaults.title, { semibold: true }), new LineHeightTheme());
|
|
13278
12747
|
// Text specific theme
|
|
13279
|
-
const textTheme = createTypographyComponentTheme("p", "p-0 m-0 w-fit", new FontSizeTheme(), themeDefaults.text);
|
|
12748
|
+
const textTheme = createTypographyComponentTheme("p", "vane-text p-0 m-0 w-fit", new FontSizeTheme(), themeDefaults.text);
|
|
13280
12749
|
// Link specific theme - uses LinkVariantTheme for link-specific colors
|
|
13281
|
-
const linkTheme = new ComponentTheme("a", "hover:underline w-fit cursor-pointer", {
|
|
12750
|
+
const linkTheme = new ComponentTheme("a", "vane-link hover:underline w-fit cursor-pointer", {
|
|
13282
12751
|
size: {
|
|
13283
12752
|
text: new FontSizeTheme(),
|
|
13284
|
-
lineHeight: LineHeightTheme
|
|
12753
|
+
lineHeight: new LineHeightTheme(),
|
|
13285
12754
|
},
|
|
13286
12755
|
appearance: {
|
|
13287
12756
|
text: new LinkVariantTheme(),
|
|
@@ -13290,26 +12759,26 @@ const linkTheme = new ComponentTheme("a", "hover:underline w-fit cursor-pointer"
|
|
|
13290
12759
|
layout: defaultLayoutsThemes,
|
|
13291
12760
|
}, themeDefaults.link, TYPOGRAPHY_CATEGORIES);
|
|
13292
12761
|
// ListItem specific theme
|
|
13293
|
-
const listItemTheme = new ComponentTheme("li", "", {
|
|
12762
|
+
const listItemTheme = new ComponentTheme("li", "vane-list-item", {
|
|
13294
12763
|
size: {
|
|
13295
12764
|
text: new FontSizeTheme(),
|
|
13296
|
-
lineHeight: LineHeightTheme
|
|
12765
|
+
lineHeight: new LineHeightTheme(),
|
|
13297
12766
|
},
|
|
13298
12767
|
appearance: {
|
|
13299
|
-
text:
|
|
12768
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
13300
12769
|
},
|
|
13301
12770
|
typography: defaultTypographyThemes,
|
|
13302
12771
|
layout: defaultLayoutsThemes,
|
|
13303
12772
|
}, themeDefaults.listItem, TYPOGRAPHY_CATEGORIES);
|
|
13304
12773
|
// List specific theme
|
|
13305
|
-
const listTheme = new ComponentTheme("ul", "list-inside", {
|
|
12774
|
+
const listTheme = new ComponentTheme("ul", "vane-list list-inside", {
|
|
13306
12775
|
size: {
|
|
13307
12776
|
text: new FontSizeTheme(),
|
|
13308
|
-
lineHeight: LineHeightTheme
|
|
12777
|
+
lineHeight: new LineHeightTheme(),
|
|
13309
12778
|
paddingLeft: new PlTheme(),
|
|
13310
12779
|
},
|
|
13311
12780
|
appearance: {
|
|
13312
|
-
text:
|
|
12781
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
13313
12782
|
},
|
|
13314
12783
|
typography: defaultTypographyThemes,
|
|
13315
12784
|
layout: defaultLayoutsThemes,
|
|
@@ -13325,12 +12794,10 @@ const listTheme = new ComponentTheme("ul", "list-inside", {
|
|
|
13325
12794
|
class BreakpointTheme extends BaseTheme {
|
|
13326
12795
|
constructor() {
|
|
13327
12796
|
super(...arguments);
|
|
13328
|
-
/** Switch to column layout on mobile devices and below (max-mobile:
|
|
12797
|
+
/** Switch to column layout on mobile devices and below (max-mobile: 48rem) */
|
|
13329
12798
|
this.mobileCol = "max-mobile:flex-col";
|
|
13330
|
-
/** Switch to column layout on tablet devices and below (max-tablet:
|
|
12799
|
+
/** Switch to column layout on tablet devices and below (max-tablet: 64rem) */
|
|
13331
12800
|
this.tabletCol = "max-tablet:flex-col";
|
|
13332
|
-
/** Switch to column layout on laptop devices and below (max-laptop: 64rem) */
|
|
13333
|
-
this.laptopCol = "max-laptop:flex-col";
|
|
13334
12801
|
/** Switch to column layout on desktop devices and below (max-desktop: 80rem) */
|
|
13335
12802
|
this.desktopCol = "max-desktop:flex-col";
|
|
13336
12803
|
}
|
|
@@ -13339,47 +12806,35 @@ class BreakpointTheme extends BaseTheme {
|
|
|
13339
12806
|
}
|
|
13340
12807
|
}
|
|
13341
12808
|
|
|
13342
|
-
const defaultCardTheme = new ComponentTheme("div", "", {
|
|
12809
|
+
const defaultCardTheme = new ComponentTheme("div", "vane-card", {
|
|
13343
12810
|
size: {
|
|
13344
|
-
px: new PxTheme(
|
|
13345
|
-
|
|
13346
|
-
|
|
13347
|
-
|
|
13348
|
-
lg: "[--aspect-ratio:1]",
|
|
13349
|
-
xl: "[--aspect-ratio:1]",
|
|
13350
|
-
}),
|
|
13351
|
-
py: new PyTheme({
|
|
13352
|
-
xs: "[--py-unit:2]",
|
|
13353
|
-
sm: "[--py-unit:4]",
|
|
13354
|
-
md: "[--py-unit:6]",
|
|
13355
|
-
lg: "[--py-unit:8]",
|
|
13356
|
-
xl: "[--py-unit:10]",
|
|
13357
|
-
}),
|
|
13358
|
-
lineHeight: LineHeightTheme.createDefault(),
|
|
13359
|
-
gap: GapTheme.createForLayout(),
|
|
12811
|
+
px: new PxTheme(),
|
|
12812
|
+
py: new PyTheme(),
|
|
12813
|
+
lineHeight: new LineHeightTheme(),
|
|
12814
|
+
gap: new GapTheme(),
|
|
13360
12815
|
},
|
|
13361
12816
|
layout: {
|
|
13362
12817
|
...defaultLayoutsThemes,
|
|
13363
12818
|
border: new BorderTheme(),
|
|
13364
12819
|
ring: new RingTheme(),
|
|
13365
|
-
radius: RadiusTheme
|
|
12820
|
+
radius: new RadiusTheme(),
|
|
13366
12821
|
wrap: new WrapTheme(),
|
|
13367
12822
|
direction: new DirectionTheme(),
|
|
13368
12823
|
breakpoint: new BreakpointTheme(),
|
|
13369
12824
|
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
13370
12825
|
},
|
|
13371
12826
|
appearance: {
|
|
13372
|
-
background:
|
|
13373
|
-
text:
|
|
13374
|
-
border:
|
|
13375
|
-
ring:
|
|
12827
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12828
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12829
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12830
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
13376
12831
|
},
|
|
13377
12832
|
typography: defaultTypographyThemes,
|
|
13378
12833
|
}, themeDefaults.card, CARD_CATEGORIES);
|
|
13379
12834
|
|
|
13380
|
-
const defaultRowTheme = new ComponentTheme("div", "", {
|
|
12835
|
+
const defaultRowTheme = new ComponentTheme("div", "vane-row", {
|
|
13381
12836
|
size: {
|
|
13382
|
-
gap: GapTheme
|
|
12837
|
+
gap: new GapTheme(),
|
|
13383
12838
|
breakpoint: new BreakpointTheme(),
|
|
13384
12839
|
},
|
|
13385
12840
|
layout: {
|
|
@@ -13388,29 +12843,33 @@ const defaultRowTheme = new ComponentTheme("div", "", {
|
|
|
13388
12843
|
direction: new DirectionTheme(),
|
|
13389
12844
|
border: new BorderTheme(),
|
|
13390
12845
|
ring: new RingTheme(),
|
|
13391
|
-
radius: RadiusTheme
|
|
12846
|
+
radius: new RadiusTheme(),
|
|
13392
12847
|
},
|
|
13393
12848
|
appearance: {
|
|
13394
|
-
background:
|
|
13395
|
-
text:
|
|
13396
|
-
border:
|
|
13397
|
-
ring:
|
|
13398
|
-
shadow:
|
|
12849
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12850
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12851
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12852
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12853
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
13399
12854
|
}
|
|
13400
12855
|
}, themeDefaults.row, ROW_CATEGORIES);
|
|
13401
12856
|
|
|
13402
|
-
const defaultDividerTheme = new ComponentTheme("div", "h-
|
|
12857
|
+
const defaultDividerTheme = new ComponentTheme("div", "vane-divider h-(--bw) w-full", {
|
|
13403
12858
|
size: {
|
|
13404
12859
|
py: new PyTheme(), // Uses layout spacing by default
|
|
13405
12860
|
},
|
|
13406
12861
|
appearance: {
|
|
13407
|
-
|
|
13408
|
-
|
|
13409
|
-
}, 'bg'),
|
|
12862
|
+
// CSS-based approach: uses --border-color variable for divider background
|
|
12863
|
+
background: new SimpleConsumerTheme({ base: '[background:var(--border-color)]' }, 'bg'),
|
|
13410
12864
|
},
|
|
13411
12865
|
layout: defaultLayoutsThemes,
|
|
13412
12866
|
}, themeDefaults.divider, DIVIDER_CATEGORIES);
|
|
13413
12867
|
|
|
12868
|
+
/**
|
|
12869
|
+
* Size theme - can operate in two modes:
|
|
12870
|
+
* 1. Default mode: outputs consumer class size-(--size), with CSS variable values set in vars.css
|
|
12871
|
+
* 2. Custom mode: outputs custom classes for each size (e.g., max-width classes)
|
|
12872
|
+
*/
|
|
13414
12873
|
class SizeTheme extends BaseTheme {
|
|
13415
12874
|
constructor(sizeMap) {
|
|
13416
12875
|
super();
|
|
@@ -13424,22 +12883,31 @@ class SizeTheme extends BaseTheme {
|
|
|
13424
12883
|
this.lg = "";
|
|
13425
12884
|
/** Extra-large size variant */
|
|
13426
12885
|
this.xl = "";
|
|
13427
|
-
|
|
13428
|
-
|
|
13429
|
-
|
|
13430
|
-
|
|
12886
|
+
/** Consumer class for size (used in default mode) */
|
|
12887
|
+
this.size = "size-(--size)";
|
|
12888
|
+
this.useCustomClasses = !!sizeMap;
|
|
12889
|
+
if (sizeMap) {
|
|
12890
|
+
ComponentKeys.size.forEach((key) => {
|
|
12891
|
+
var _a;
|
|
12892
|
+
this[key] = (_a = sizeMap[key]) !== null && _a !== void 0 ? _a : "";
|
|
12893
|
+
});
|
|
12894
|
+
}
|
|
13431
12895
|
}
|
|
13432
12896
|
getClasses(extractedKeys) {
|
|
13433
12897
|
var _a;
|
|
13434
|
-
|
|
13435
|
-
|
|
12898
|
+
if (this.useCustomClasses) {
|
|
12899
|
+
const size = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md';
|
|
12900
|
+
return this[size] ? [this[size]] : [];
|
|
12901
|
+
}
|
|
12902
|
+
// Default: use CSS variable consumer class
|
|
12903
|
+
return [this.size];
|
|
13436
12904
|
}
|
|
13437
12905
|
}
|
|
13438
12906
|
|
|
13439
|
-
const defaultContainerTheme = new ComponentTheme("div", "mx-auto w-full", {
|
|
12907
|
+
const defaultContainerTheme = new ComponentTheme("div", "vane-container mx-auto w-full", {
|
|
13440
12908
|
size: {
|
|
13441
|
-
gap: GapTheme
|
|
13442
|
-
maxWidth: new SizeTheme({ xs: 'max-w-3xl', sm: 'max-w-4xl', md: 'max-w-5xl', lg: 'max-w-6xl', xl: 'max-w-7xl' }),
|
|
12909
|
+
gap: new GapTheme(),
|
|
12910
|
+
maxWidth: new SizeTheme({ xs: 'max-w-3xl', sm: 'max-w-4xl', md: 'max-w-5xl', lg: 'max-w-6xl', xl: 'max-w-7xl' }), // Uses custom mode for max-width
|
|
13443
12911
|
},
|
|
13444
12912
|
layout: {
|
|
13445
12913
|
...defaultLayoutsThemes,
|
|
@@ -13447,20 +12915,20 @@ const defaultContainerTheme = new ComponentTheme("div", "mx-auto w-full", {
|
|
|
13447
12915
|
ring: new RingTheme(),
|
|
13448
12916
|
wrap: new WrapTheme(),
|
|
13449
12917
|
direction: new DirectionTheme(),
|
|
13450
|
-
radius: RadiusTheme
|
|
12918
|
+
radius: new RadiusTheme(),
|
|
13451
12919
|
},
|
|
13452
12920
|
appearance: {
|
|
13453
|
-
background:
|
|
13454
|
-
text:
|
|
13455
|
-
border:
|
|
13456
|
-
ring:
|
|
13457
|
-
shadow:
|
|
12921
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12922
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12923
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12924
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12925
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
13458
12926
|
}
|
|
13459
12927
|
}, themeDefaults.container, CONTAINER_CATEGORIES);
|
|
13460
12928
|
|
|
13461
|
-
const defaultColTheme = new ComponentTheme("div", "", {
|
|
12929
|
+
const defaultColTheme = new ComponentTheme("div", "vane-col", {
|
|
13462
12930
|
size: {
|
|
13463
|
-
gap: GapTheme
|
|
12931
|
+
gap: new GapTheme(),
|
|
13464
12932
|
},
|
|
13465
12933
|
layout: {
|
|
13466
12934
|
...defaultLayoutsThemes,
|
|
@@ -13468,28 +12936,22 @@ const defaultColTheme = new ComponentTheme("div", "", {
|
|
|
13468
12936
|
direction: new DirectionTheme(),
|
|
13469
12937
|
border: new BorderTheme(),
|
|
13470
12938
|
ring: new RingTheme(),
|
|
13471
|
-
radius: RadiusTheme
|
|
12939
|
+
radius: new RadiusTheme(),
|
|
13472
12940
|
},
|
|
13473
12941
|
appearance: {
|
|
13474
|
-
background:
|
|
13475
|
-
text:
|
|
13476
|
-
border:
|
|
13477
|
-
ring:
|
|
13478
|
-
shadow:
|
|
12942
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12943
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12944
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12945
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12946
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
13479
12947
|
}
|
|
13480
12948
|
}, themeDefaults.col, COL_CATEGORIES);
|
|
13481
12949
|
|
|
13482
|
-
const defaultStackTheme = new ComponentTheme("div", "", {
|
|
12950
|
+
const defaultStackTheme = new ComponentTheme("div", "vane-stack", {
|
|
13483
12951
|
size: {
|
|
13484
|
-
px: new PxTheme(
|
|
13485
|
-
xs: "[--aspect-ratio:1]",
|
|
13486
|
-
sm: "[--aspect-ratio:1]",
|
|
13487
|
-
md: "[--aspect-ratio:1]",
|
|
13488
|
-
lg: "[--aspect-ratio:1]",
|
|
13489
|
-
xl: "[--aspect-ratio:1]",
|
|
13490
|
-
}),
|
|
12952
|
+
px: new PxTheme(),
|
|
13491
12953
|
py: new PyTheme(),
|
|
13492
|
-
gap: GapTheme
|
|
12954
|
+
gap: new GapTheme(),
|
|
13493
12955
|
breakpoint: new BreakpointTheme(),
|
|
13494
12956
|
},
|
|
13495
12957
|
layout: {
|
|
@@ -13498,47 +12960,29 @@ const defaultStackTheme = new ComponentTheme("div", "", {
|
|
|
13498
12960
|
direction: new DirectionTheme(),
|
|
13499
12961
|
border: new BorderTheme(),
|
|
13500
12962
|
ring: new RingTheme(),
|
|
13501
|
-
radius: RadiusTheme
|
|
12963
|
+
radius: new RadiusTheme(),
|
|
13502
12964
|
},
|
|
13503
12965
|
appearance: {
|
|
13504
|
-
background:
|
|
13505
|
-
text:
|
|
13506
|
-
border:
|
|
13507
|
-
ring:
|
|
13508
|
-
shadow:
|
|
12966
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12967
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12968
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12969
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12970
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
13509
12971
|
}
|
|
13510
12972
|
}, themeDefaults.stack, STACK_CATEGORIES);
|
|
13511
12973
|
|
|
13512
|
-
const defaultSectionTheme = new ComponentTheme("div", "w-full", {
|
|
12974
|
+
const defaultSectionTheme = new ComponentTheme("div", "vane-section w-full", {
|
|
13513
12975
|
size: {
|
|
13514
|
-
px: new PxTheme(
|
|
13515
|
-
|
|
13516
|
-
|
|
13517
|
-
md: "[--aspect-ratio:1.75]",
|
|
13518
|
-
lg: "[--aspect-ratio:1.6]",
|
|
13519
|
-
xl: "[--aspect-ratio:1.5]",
|
|
13520
|
-
}),
|
|
13521
|
-
py: new PyTheme({
|
|
13522
|
-
xs: "[--py-unit:4] max-laptop:[--py-unit:3] max-tablet:[--py-unit:2]",
|
|
13523
|
-
sm: "[--py-unit:8] max-laptop:[--py-unit:4] max-tablet:[--py-unit:2]",
|
|
13524
|
-
md: "[--py-unit:12] max-laptop:[--py-unit:6] max-tablet:[--py-unit:2]",
|
|
13525
|
-
lg: "[--py-unit:16] max-laptop:[--py-unit:8] max-tablet:[--py-unit:2]",
|
|
13526
|
-
xl: "[--py-unit:20] max-laptop:[--py-unit:10] max-tablet:[--py-unit:4]",
|
|
13527
|
-
}),
|
|
13528
|
-
gap: new GapTheme({
|
|
13529
|
-
xs: "[--gap-unit:4] max-laptop:[--gap-unit:3] max-tablet:[--gap-unit:2]",
|
|
13530
|
-
sm: "[--gap-unit:6] max-laptop:[--gap-unit:5] max-tablet:[--gap-unit:4]",
|
|
13531
|
-
md: "[--gap-unit:8] max-laptop:[--gap-unit:6] max-tablet:[--gap-unit:4]",
|
|
13532
|
-
lg: "[--gap-unit:10] max-laptop:[--gap-unit:8] max-tablet:[--gap-unit:6]",
|
|
13533
|
-
xl: "[--gap-unit:12] max-laptop:[--gap-unit:10] max-tablet:[--gap-unit:8]",
|
|
13534
|
-
}),
|
|
12976
|
+
px: new PxTheme(),
|
|
12977
|
+
py: new PyTheme(),
|
|
12978
|
+
gap: new GapTheme(),
|
|
13535
12979
|
breakpoint: new BreakpointTheme(),
|
|
13536
12980
|
},
|
|
13537
12981
|
appearance: {
|
|
13538
|
-
background:
|
|
13539
|
-
text:
|
|
13540
|
-
border:
|
|
13541
|
-
ring:
|
|
12982
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12983
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12984
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12985
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
13542
12986
|
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
13543
12987
|
},
|
|
13544
12988
|
layout: {
|
|
@@ -13547,40 +12991,37 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full", {
|
|
|
13547
12991
|
direction: new DirectionTheme(),
|
|
13548
12992
|
border: new BorderTheme(),
|
|
13549
12993
|
ring: new RingTheme(),
|
|
13550
|
-
radius: RadiusTheme
|
|
12994
|
+
radius: new RadiusTheme(),
|
|
13551
12995
|
},
|
|
13552
12996
|
}, themeDefaults.section, SECTION_CATEGORIES);
|
|
13553
12997
|
|
|
13554
12998
|
const gridSubThemes = {
|
|
13555
12999
|
size: {
|
|
13556
|
-
gap: GapTheme
|
|
13000
|
+
gap: new GapTheme(),
|
|
13557
13001
|
},
|
|
13558
13002
|
appearance: {
|
|
13559
|
-
background:
|
|
13560
|
-
text:
|
|
13003
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
13004
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
13005
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
13561
13006
|
},
|
|
13562
13007
|
layout: {
|
|
13563
13008
|
...defaultLayoutsThemes,
|
|
13564
13009
|
wrap: new WrapTheme(),
|
|
13565
13010
|
flexDirection: new DirectionTheme(),
|
|
13011
|
+
radius: new RadiusTheme(),
|
|
13012
|
+
border: new BorderTheme(),
|
|
13566
13013
|
},
|
|
13567
13014
|
};
|
|
13568
|
-
const defaultGrid2Theme = new ComponentTheme("div", "grid-cols-1 md:grid-cols-2", gridSubThemes, themeDefaults.grid2, GRID_CATEGORIES);
|
|
13569
|
-
const defaultGrid3Theme = new ComponentTheme("div", "grid-cols-1 md:grid-cols-3", gridSubThemes, themeDefaults.grid3, GRID_CATEGORIES);
|
|
13570
|
-
const defaultGrid4Theme = new ComponentTheme("div", "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4", gridSubThemes, themeDefaults.grid4, GRID_CATEGORIES);
|
|
13571
|
-
const defaultGrid5Theme = new ComponentTheme("div", "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5", gridSubThemes, themeDefaults.grid5, GRID_CATEGORIES);
|
|
13572
|
-
const defaultGrid6Theme = new ComponentTheme("div", "grid-cols-1 sm:grid-cols-2 md:grid-cols-4 lg:grid-cols-6", gridSubThemes, themeDefaults.grid6, GRID_CATEGORIES);
|
|
13015
|
+
const defaultGrid2Theme = new ComponentTheme("div", "vane-grid vane-grid-2 grid-cols-1 md:grid-cols-2", gridSubThemes, themeDefaults.grid2, GRID_CATEGORIES);
|
|
13016
|
+
const defaultGrid3Theme = new ComponentTheme("div", "vane-grid vane-grid-3 grid-cols-1 md:grid-cols-3", gridSubThemes, themeDefaults.grid3, GRID_CATEGORIES);
|
|
13017
|
+
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);
|
|
13018
|
+
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);
|
|
13019
|
+
const defaultGrid6Theme = new ComponentTheme("div", "vane-grid vane-grid-6 grid-cols-1 sm:grid-cols-2 md:grid-cols-4 lg:grid-cols-6", gridSubThemes, themeDefaults.grid6, GRID_CATEGORIES);
|
|
13573
13020
|
|
|
13574
13021
|
var _a, _b, _c;
|
|
13575
|
-
const defaultCheckboxTheme = new ComponentTheme("input", "peer col-start-1 row-start-1 cursor-pointer appearance-none ring-transparent size-(--
|
|
13022
|
+
const defaultCheckboxTheme = new ComponentTheme("input", "vane-checkbox peer col-start-1 row-start-1 cursor-pointer appearance-none ring-transparent size-(--size)", {
|
|
13576
13023
|
size: {
|
|
13577
|
-
size: new SizeTheme(
|
|
13578
|
-
xs: '[--size-unit:3]',
|
|
13579
|
-
sm: '[--size-unit:3.5]',
|
|
13580
|
-
md: '[--size-unit:4]',
|
|
13581
|
-
lg: '[--size-unit:4.5]',
|
|
13582
|
-
xl: '[--size-unit:5]'
|
|
13583
|
-
}),
|
|
13024
|
+
size: new SizeTheme(),
|
|
13584
13025
|
text: new FontSizeTheme()
|
|
13585
13026
|
},
|
|
13586
13027
|
layout: {
|
|
@@ -13588,29 +13029,23 @@ const defaultCheckboxTheme = new ComponentTheme("input", "peer col-start-1 row-s
|
|
|
13588
13029
|
border: new BorderTheme(),
|
|
13589
13030
|
ring: new RingTheme(),
|
|
13590
13031
|
focusVisible: new FocusVisibleTheme(),
|
|
13591
|
-
radius: new RadiusTheme(
|
|
13592
|
-
xs: '[--br-unit:1]',
|
|
13593
|
-
sm: '[--br-unit:1.5]',
|
|
13594
|
-
md: '[--br-unit:2]',
|
|
13595
|
-
lg: '[--br-unit:2.5]',
|
|
13596
|
-
xl: '[--br-unit:3]'
|
|
13597
|
-
}, true),
|
|
13032
|
+
radius: new RadiusTheme(),
|
|
13598
13033
|
},
|
|
13599
13034
|
appearance: {
|
|
13600
|
-
accent:
|
|
13601
|
-
border:
|
|
13602
|
-
background:
|
|
13603
|
-
ring:
|
|
13604
|
-
focusVisible:
|
|
13605
|
-
check:
|
|
13606
|
-
shadow:
|
|
13035
|
+
accent: new SimpleConsumerTheme({ base: accentConsumerClass }, 'accent'),
|
|
13036
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
13037
|
+
background: new SimpleConsumerTheme({ base: 'bg-white' }, 'bg'),
|
|
13038
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
13039
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
|
|
13040
|
+
check: new SimpleConsumerTheme({ base: checkedBgConsumerClass }, 'bg'),
|
|
13041
|
+
shadow: ShadowAppearanceTheme.createUITheme(),
|
|
13607
13042
|
}
|
|
13608
13043
|
}, ((_a = themeDefaults.checkbox) === null || _a === void 0 ? void 0 : _a.input) || {}, CHECKBOX_CATEGORIES);
|
|
13609
13044
|
const defaultCheckTheme = new ComponentTheme("span", "invisible col-start-1 row-start-1 peer-checked:visible", {
|
|
13610
13045
|
checkElement: () => jsxRuntime.jsx("svg", { viewBox: "0 0 14 14", fill: "none", children: jsxRuntime.jsx("path", { d: "M3 8L6 11L11 3.5", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", fill: "none", stroke: "currentColor" }) }),
|
|
13611
13046
|
appearance: {
|
|
13612
|
-
color:
|
|
13613
|
-
focusVisible:
|
|
13047
|
+
color: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
13048
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible')
|
|
13614
13049
|
},
|
|
13615
13050
|
layout: {
|
|
13616
13051
|
...defaultLayoutsThemes,
|
|
@@ -13625,26 +13060,26 @@ const defaultCheckboxWrapperTheme = new ComponentTheme("span", "", {
|
|
|
13625
13060
|
md: 'h-[calc(var(--lh)*var(--fs))]',
|
|
13626
13061
|
lg: 'h-[calc(var(--lh)*var(--fs))]',
|
|
13627
13062
|
xl: 'h-[calc(var(--lh)*var(--fs))]'
|
|
13628
|
-
})
|
|
13063
|
+
}) // Uses custom mode for calculated height
|
|
13629
13064
|
},
|
|
13630
13065
|
layout: {
|
|
13631
13066
|
...defaultLayoutsThemes,
|
|
13632
13067
|
focusVisible: new FocusVisibleTheme()
|
|
13633
13068
|
},
|
|
13634
13069
|
appearance: {
|
|
13635
|
-
variant:
|
|
13636
|
-
focusVisible:
|
|
13070
|
+
variant: new SimpleConsumerTheme({ base: '' }, 'bg'),
|
|
13071
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible')
|
|
13637
13072
|
}
|
|
13638
13073
|
}, ((_c = themeDefaults.checkbox) === null || _c === void 0 ? void 0 : _c.wrapper) || {}, CHECKBOX_CATEGORIES);
|
|
13639
13074
|
|
|
13640
|
-
const defaultLabelTheme = new ComponentTheme("label", "has-[input]:cursor-pointer cursor-default", {
|
|
13075
|
+
const defaultLabelTheme = new ComponentTheme("label", "vane-label has-[input]:cursor-pointer cursor-default", {
|
|
13641
13076
|
size: {
|
|
13642
13077
|
text: new FontSizeTheme(),
|
|
13643
|
-
lineHeight: LineHeightTheme
|
|
13644
|
-
gap: GapTheme
|
|
13078
|
+
lineHeight: new LineHeightTheme(),
|
|
13079
|
+
gap: new GapTheme(),
|
|
13645
13080
|
},
|
|
13646
13081
|
appearance: {
|
|
13647
|
-
text:
|
|
13082
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
13648
13083
|
},
|
|
13649
13084
|
typography: defaultTypographyThemes,
|
|
13650
13085
|
layout: {
|
|
@@ -13654,52 +13089,46 @@ const defaultLabelTheme = new ComponentTheme("label", "has-[input]:cursor-pointe
|
|
|
13654
13089
|
},
|
|
13655
13090
|
}, themeDefaults.label, LABEL_CATEGORIES);
|
|
13656
13091
|
|
|
13657
|
-
const defaultImgTheme = new ComponentTheme("img", "object-cover", // Default to cover for better image display
|
|
13092
|
+
const defaultImgTheme = new ComponentTheme("img", "vane-img object-cover", // Default to cover for better image display
|
|
13658
13093
|
{
|
|
13659
13094
|
layout: {
|
|
13660
13095
|
...defaultLayoutsThemes,
|
|
13661
13096
|
border: new BorderTheme(),
|
|
13662
13097
|
ring: new RingTheme(),
|
|
13663
13098
|
focusVisible: new FocusVisibleTheme(),
|
|
13664
|
-
radius: RadiusTheme
|
|
13099
|
+
radius: new RadiusTheme(),
|
|
13665
13100
|
},
|
|
13666
13101
|
appearance: {
|
|
13667
|
-
background:
|
|
13668
|
-
border:
|
|
13669
|
-
ring:
|
|
13670
|
-
focusVisible:
|
|
13671
|
-
shadow:
|
|
13102
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
13103
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
13104
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
13105
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
|
|
13106
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme()
|
|
13672
13107
|
}
|
|
13673
13108
|
}, themeDefaults.img, IMG_CATEGORIES);
|
|
13674
13109
|
|
|
13675
|
-
const defaultInputTheme = new ComponentTheme("input", "w-full transition-all duration-200", {
|
|
13110
|
+
const defaultInputTheme = new ComponentTheme("input", "vane-input w-full transition-all duration-200", {
|
|
13676
13111
|
size: {
|
|
13677
|
-
px: new PxTheme(
|
|
13678
|
-
|
|
13679
|
-
|
|
13680
|
-
md: "[--aspect-ratio:2]",
|
|
13681
|
-
lg: "[--aspect-ratio:2]",
|
|
13682
|
-
xl: "[--aspect-ratio:2]",
|
|
13683
|
-
}, true),
|
|
13684
|
-
py: PyTheme.createForUI(),
|
|
13685
|
-
gap: GapTheme.createForUI(),
|
|
13112
|
+
px: new PxTheme(),
|
|
13113
|
+
py: new PyTheme(),
|
|
13114
|
+
gap: new GapTheme(),
|
|
13686
13115
|
text: new FontSizeTheme(),
|
|
13687
|
-
lineHeight: LineHeightTheme
|
|
13116
|
+
lineHeight: new LineHeightTheme(),
|
|
13688
13117
|
},
|
|
13689
13118
|
appearance: {
|
|
13690
|
-
background:
|
|
13691
|
-
text:
|
|
13692
|
-
border:
|
|
13693
|
-
ring:
|
|
13694
|
-
focusVisible:
|
|
13695
|
-
shadow:
|
|
13119
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base, hover: bgConsumerClasses.hover }, 'bg'),
|
|
13120
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
13121
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
13122
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
13123
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
|
|
13124
|
+
shadow: ShadowAppearanceTheme.createUITheme()
|
|
13696
13125
|
},
|
|
13697
13126
|
layout: {
|
|
13698
13127
|
...defaultLayoutsThemes,
|
|
13699
13128
|
border: new BorderTheme(),
|
|
13700
13129
|
ring: new RingTheme(),
|
|
13701
13130
|
focusVisible: new FocusVisibleTheme(),
|
|
13702
|
-
radius: RadiusTheme
|
|
13131
|
+
radius: new RadiusTheme(),
|
|
13703
13132
|
wrap: new WrapTheme(),
|
|
13704
13133
|
flexDirection: new DirectionTheme(),
|
|
13705
13134
|
},
|