@vaneui/md 0.3.1-alpha.20251228133323.630b220 → 0.3.1-alpha.20260104125946.4a6b7b2
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 +465 -1058
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +465 -1058
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +1499 -1230
- 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 */
|
|
@@ -8585,7 +8587,7 @@ const ComponentKeys = {
|
|
|
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,19 @@ 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,
|
|
12810
12271
|
},
|
|
12811
12272
|
section: {
|
|
12812
12273
|
md: true,
|
|
12813
12274
|
flex: true,
|
|
12814
12275
|
column: true,
|
|
12276
|
+
outline: true,
|
|
12815
12277
|
primary: true,
|
|
12816
12278
|
itemsStart: true,
|
|
12817
12279
|
gap: true,
|
|
@@ -12819,6 +12281,7 @@ const themeDefaults = {
|
|
|
12819
12281
|
noBorder: true,
|
|
12820
12282
|
noRing: true,
|
|
12821
12283
|
noShadow: true,
|
|
12284
|
+
responsive: true,
|
|
12822
12285
|
},
|
|
12823
12286
|
stack: {
|
|
12824
12287
|
md: true,
|
|
@@ -12829,6 +12292,7 @@ const themeDefaults = {
|
|
|
12829
12292
|
padding: true,
|
|
12830
12293
|
noBorder: true,
|
|
12831
12294
|
noRing: true,
|
|
12295
|
+
outline: true,
|
|
12832
12296
|
},
|
|
12833
12297
|
row: {
|
|
12834
12298
|
row: true,
|
|
@@ -12838,6 +12302,7 @@ const themeDefaults = {
|
|
|
12838
12302
|
gap: true,
|
|
12839
12303
|
noBorder: true,
|
|
12840
12304
|
noRing: true,
|
|
12305
|
+
outline: true,
|
|
12841
12306
|
},
|
|
12842
12307
|
col: {
|
|
12843
12308
|
column: true,
|
|
@@ -12846,34 +12311,46 @@ const themeDefaults = {
|
|
|
12846
12311
|
gap: true,
|
|
12847
12312
|
noBorder: true,
|
|
12848
12313
|
noRing: true,
|
|
12314
|
+
outline: true,
|
|
12849
12315
|
},
|
|
12850
12316
|
grid2: {
|
|
12851
12317
|
md: true,
|
|
12852
12318
|
grid: true,
|
|
12853
12319
|
gap: true,
|
|
12320
|
+
sharp: true,
|
|
12321
|
+
outline: true,
|
|
12854
12322
|
},
|
|
12855
12323
|
grid3: {
|
|
12856
12324
|
md: true,
|
|
12857
12325
|
grid: true,
|
|
12858
12326
|
gap: true,
|
|
12327
|
+
sharp: true,
|
|
12328
|
+
outline: true,
|
|
12859
12329
|
},
|
|
12860
12330
|
grid4: {
|
|
12861
12331
|
md: true,
|
|
12862
12332
|
grid: true,
|
|
12863
12333
|
gap: true,
|
|
12334
|
+
sharp: true,
|
|
12335
|
+
outline: true,
|
|
12864
12336
|
},
|
|
12865
12337
|
grid5: {
|
|
12866
12338
|
md: true,
|
|
12867
12339
|
grid: true,
|
|
12868
12340
|
gap: true,
|
|
12341
|
+
sharp: true,
|
|
12342
|
+
outline: true,
|
|
12869
12343
|
},
|
|
12870
12344
|
grid6: {
|
|
12871
12345
|
md: true,
|
|
12872
12346
|
grid: true,
|
|
12873
12347
|
gap: true,
|
|
12348
|
+
sharp: true,
|
|
12349
|
+
outline: true,
|
|
12874
12350
|
},
|
|
12875
12351
|
divider: {
|
|
12876
12352
|
md: true,
|
|
12353
|
+
outline: true,
|
|
12877
12354
|
primary: true,
|
|
12878
12355
|
noPadding: true,
|
|
12879
12356
|
},
|
|
@@ -12883,8 +12360,10 @@ const themeDefaults = {
|
|
|
12883
12360
|
gap: true,
|
|
12884
12361
|
sans: true,
|
|
12885
12362
|
medium: true,
|
|
12363
|
+
outline: true,
|
|
12886
12364
|
},
|
|
12887
12365
|
img: {
|
|
12366
|
+
md: true,
|
|
12888
12367
|
rounded: true,
|
|
12889
12368
|
},
|
|
12890
12369
|
code: {
|
|
@@ -12894,6 +12373,7 @@ const themeDefaults = {
|
|
|
12894
12373
|
rounded: true,
|
|
12895
12374
|
inline: true,
|
|
12896
12375
|
padding: true,
|
|
12376
|
+
outline: true,
|
|
12897
12377
|
primary: true,
|
|
12898
12378
|
ring: true,
|
|
12899
12379
|
},
|
|
@@ -12901,31 +12381,42 @@ const themeDefaults = {
|
|
|
12901
12381
|
md: true,
|
|
12902
12382
|
sans: true,
|
|
12903
12383
|
textLeft: true,
|
|
12384
|
+
outline: true,
|
|
12904
12385
|
},
|
|
12905
12386
|
title: {
|
|
12906
12387
|
md: true,
|
|
12907
12388
|
sans: true,
|
|
12908
12389
|
semibold: true,
|
|
12909
12390
|
textLeft: true,
|
|
12391
|
+
responsive: true,
|
|
12392
|
+
outline: true,
|
|
12910
12393
|
},
|
|
12911
12394
|
pageTitle: {
|
|
12912
12395
|
md: true,
|
|
12913
12396
|
sans: true,
|
|
12914
12397
|
semibold: true,
|
|
12915
12398
|
textLeft: true,
|
|
12399
|
+
responsive: true,
|
|
12400
|
+
outline: true,
|
|
12916
12401
|
},
|
|
12917
12402
|
sectionTitle: {
|
|
12918
12403
|
md: true,
|
|
12919
12404
|
sans: true,
|
|
12920
12405
|
semibold: true,
|
|
12921
12406
|
textLeft: true,
|
|
12407
|
+
responsive: true,
|
|
12408
|
+
outline: true,
|
|
12922
12409
|
},
|
|
12923
12410
|
link: {
|
|
12411
|
+
md: true,
|
|
12924
12412
|
underline: true,
|
|
12925
12413
|
sans: true,
|
|
12414
|
+
outline: true,
|
|
12926
12415
|
},
|
|
12927
12416
|
listItem: {
|
|
12417
|
+
md: true,
|
|
12928
12418
|
sans: true,
|
|
12419
|
+
outline: true,
|
|
12929
12420
|
},
|
|
12930
12421
|
list: {
|
|
12931
12422
|
md: true,
|
|
@@ -12933,6 +12424,7 @@ const themeDefaults = {
|
|
|
12933
12424
|
normal: true,
|
|
12934
12425
|
padding: true,
|
|
12935
12426
|
disc: true,
|
|
12427
|
+
outline: true,
|
|
12936
12428
|
},
|
|
12937
12429
|
checkbox: {
|
|
12938
12430
|
input: {
|
|
@@ -12972,41 +12464,53 @@ const themeDefaults = {
|
|
|
12972
12464
|
},
|
|
12973
12465
|
};
|
|
12974
12466
|
|
|
12975
|
-
|
|
12976
|
-
|
|
12977
|
-
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
|
|
12981
|
-
|
|
12982
|
-
const
|
|
12467
|
+
/* ==========================================
|
|
12468
|
+
CSS VARIABLE CONSUMER CLASSES
|
|
12469
|
+
These classes consume component-level CSS variables
|
|
12470
|
+
that are set by CSS rules in vars.css based on
|
|
12471
|
+
data-appearance and data-variant attributes.
|
|
12472
|
+
========================================== */
|
|
12473
|
+
/** Background consumer classes - consume --bg-color, --bg-hover-color, --bg-active-color */
|
|
12474
|
+
const bgConsumerClasses = {
|
|
12475
|
+
base: "[background:var(--bg-color)]",
|
|
12476
|
+
hover: "hover:[background:var(--bg-hover-color)]",
|
|
12477
|
+
active: "active:[background:var(--bg-active-color)]",
|
|
12478
|
+
};
|
|
12479
|
+
/** Text color consumer class - consumes --text-color */
|
|
12480
|
+
const textConsumerClass = "text-(--text-color)";
|
|
12481
|
+
/** Border consumer class - consumes --border-color */
|
|
12482
|
+
const borderConsumerClass = "border-(--border-color)";
|
|
12483
|
+
/** Ring consumer class - consumes --ring-color */
|
|
12484
|
+
const ringConsumerClass = "ring-(--ring-color)";
|
|
12485
|
+
/** Focus visible outline consumer class - consumes --ring-color */
|
|
12486
|
+
const focusVisibleConsumerClass = "focus-visible:outline-(--ring-color)";
|
|
12487
|
+
/** Accent color consumer class - consumes --accent-color */
|
|
12488
|
+
const accentConsumerClass = "accent-(--accent-color)";
|
|
12489
|
+
/** Checked background consumer class - consumes --checked-bg-color */
|
|
12490
|
+
const checkedBgConsumerClass = "checked:[background:var(--checked-bg-color)]";
|
|
12491
|
+
|
|
12492
|
+
const defaultButtonTheme = new ComponentTheme("button", "vane-button w-fit h-fit cursor-pointer transition-all duration-200 whitespace-nowrap", {
|
|
12983
12493
|
size: {
|
|
12984
|
-
px: new PxTheme(
|
|
12985
|
-
py: PyTheme
|
|
12986
|
-
gap: GapTheme
|
|
12494
|
+
px: new PxTheme(),
|
|
12495
|
+
py: new PyTheme(),
|
|
12496
|
+
gap: new GapTheme(),
|
|
12987
12497
|
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
|
-
}),
|
|
12498
|
+
lineHeight: new LineHeightTheme(),
|
|
12995
12499
|
},
|
|
12996
12500
|
appearance: {
|
|
12997
|
-
background:
|
|
12998
|
-
text:
|
|
12999
|
-
border:
|
|
13000
|
-
ring:
|
|
13001
|
-
focusVisible:
|
|
13002
|
-
shadow:
|
|
12501
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base, hover: bgConsumerClasses.hover, active: bgConsumerClasses.active }, 'bg'),
|
|
12502
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12503
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12504
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12505
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
|
|
12506
|
+
shadow: ShadowAppearanceTheme.createUITheme()
|
|
13003
12507
|
},
|
|
13004
12508
|
layout: {
|
|
13005
12509
|
...defaultLayoutsThemes,
|
|
13006
12510
|
border: new BorderTheme(),
|
|
13007
12511
|
ring: new RingTheme(),
|
|
13008
12512
|
focusVisible: new FocusVisibleTheme(),
|
|
13009
|
-
radius: RadiusTheme
|
|
12513
|
+
radius: new RadiusTheme(),
|
|
13010
12514
|
wrap: new WrapTheme(),
|
|
13011
12515
|
flexDirection: new DirectionTheme(),
|
|
13012
12516
|
},
|
|
@@ -13016,36 +12520,28 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
|
|
|
13016
12520
|
return props.href ? "a" : "button";
|
|
13017
12521
|
});
|
|
13018
12522
|
|
|
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", {
|
|
12523
|
+
const defaultBadgeTheme = new ComponentTheme("span", "vane-badge w-fit h-fit transition-all duration-200 whitespace-nowrap", {
|
|
13028
12524
|
size: {
|
|
13029
|
-
px: new PxTheme(
|
|
13030
|
-
py: PyTheme
|
|
13031
|
-
gap: GapTheme
|
|
12525
|
+
px: new PxTheme(),
|
|
12526
|
+
py: new PyTheme(),
|
|
12527
|
+
gap: new GapTheme(),
|
|
13032
12528
|
text: new FontSizeTheme(),
|
|
13033
|
-
lineHeight: LineHeightTheme
|
|
12529
|
+
lineHeight: new LineHeightTheme()
|
|
13034
12530
|
},
|
|
13035
12531
|
appearance: {
|
|
13036
|
-
background:
|
|
13037
|
-
text:
|
|
13038
|
-
border:
|
|
13039
|
-
ring:
|
|
13040
|
-
focusVisible:
|
|
13041
|
-
shadow:
|
|
12532
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12533
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12534
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12535
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12536
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
|
|
12537
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme()
|
|
13042
12538
|
},
|
|
13043
12539
|
layout: {
|
|
13044
12540
|
...defaultLayoutsThemes,
|
|
13045
12541
|
border: new BorderTheme(),
|
|
13046
12542
|
ring: new RingTheme(),
|
|
13047
12543
|
focusVisible: new FocusVisibleTheme(),
|
|
13048
|
-
radius: RadiusTheme
|
|
12544
|
+
radius: new RadiusTheme(),
|
|
13049
12545
|
wrap: new WrapTheme(),
|
|
13050
12546
|
flexDirection: new DirectionTheme(),
|
|
13051
12547
|
},
|
|
@@ -13054,43 +12550,25 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
13054
12550
|
return props.href ? "a" : "span";
|
|
13055
12551
|
});
|
|
13056
12552
|
|
|
13057
|
-
const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all duration-200 whitespace-nowrap", {
|
|
12553
|
+
const defaultChipTheme = new ComponentTheme("span", "vane-chip w-fit h-fit transition-all duration-200 whitespace-nowrap", {
|
|
13058
12554
|
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),
|
|
12555
|
+
px: new PxTheme(),
|
|
12556
|
+
py: new PyTheme(),
|
|
13073
12557
|
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()
|
|
12558
|
+
lineHeight: new LineHeightTheme(),
|
|
12559
|
+
gap: new GapTheme()
|
|
13082
12560
|
},
|
|
13083
12561
|
appearance: {
|
|
13084
|
-
background:
|
|
13085
|
-
text:
|
|
13086
|
-
border:
|
|
13087
|
-
ring:
|
|
13088
|
-
focusVisible:
|
|
13089
|
-
shadow:
|
|
12562
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12563
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12564
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12565
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12566
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
|
|
12567
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme()
|
|
13090
12568
|
},
|
|
13091
12569
|
layout: {
|
|
13092
12570
|
...defaultLayoutsThemes,
|
|
13093
|
-
radius: RadiusTheme
|
|
12571
|
+
radius: new RadiusTheme(),
|
|
13094
12572
|
border: new BorderTheme(),
|
|
13095
12573
|
ring: new RingTheme(),
|
|
13096
12574
|
focusVisible: new FocusVisibleTheme(),
|
|
@@ -13102,55 +12580,25 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
13102
12580
|
return props.href ? "a" : "span";
|
|
13103
12581
|
});
|
|
13104
12582
|
|
|
13105
|
-
const defaultCodeTheme = new ComponentTheme("code", "", {
|
|
12583
|
+
const defaultCodeTheme = new ComponentTheme("code", "vane-code", {
|
|
13106
12584
|
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()
|
|
12585
|
+
px: new PxTheme(),
|
|
12586
|
+
py: new PyTheme(),
|
|
12587
|
+
text: new FontSizeTheme(),
|
|
12588
|
+
lineHeight: new LineHeightTheme(),
|
|
12589
|
+
gap: new GapTheme()
|
|
13136
12590
|
},
|
|
13137
12591
|
appearance: {
|
|
13138
|
-
background:
|
|
13139
|
-
text:
|
|
13140
|
-
border:
|
|
13141
|
-
ring:
|
|
13142
|
-
focusVisible:
|
|
13143
|
-
shadow:
|
|
12592
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12593
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12594
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12595
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12596
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
|
|
12597
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme()
|
|
13144
12598
|
},
|
|
13145
12599
|
layout: {
|
|
13146
12600
|
...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),
|
|
12601
|
+
radius: new RadiusTheme(),
|
|
13154
12602
|
border: new BorderTheme(),
|
|
13155
12603
|
ring: new RingTheme(),
|
|
13156
12604
|
focusVisible: new FocusVisibleTheme(),
|
|
@@ -13162,25 +12610,23 @@ const defaultCodeTheme = new ComponentTheme("code", "", {
|
|
|
13162
12610
|
|
|
13163
12611
|
/**
|
|
13164
12612
|
* Link-specific variant theme that handles text colors
|
|
13165
|
-
* using
|
|
12613
|
+
* using CSS consumer class approach.
|
|
13166
12614
|
*
|
|
13167
|
-
*
|
|
13168
|
-
*
|
|
12615
|
+
* Link defaults to "link" appearance which provides link-specific colors
|
|
12616
|
+
* via CSS variable rules in vars.css.
|
|
13169
12617
|
*/
|
|
13170
12618
|
class LinkVariantTheme extends BaseTheme {
|
|
13171
12619
|
constructor() {
|
|
13172
12620
|
super(...arguments);
|
|
13173
|
-
/**
|
|
13174
|
-
this.outline = "text-(--
|
|
13175
|
-
/**
|
|
13176
|
-
this.filled = "text-(--
|
|
12621
|
+
/** CSS consumer class for outline variant */
|
|
12622
|
+
this.outline = "text-(--text-color)";
|
|
12623
|
+
/** CSS consumer class for filled variant */
|
|
12624
|
+
this.filled = "text-(--text-color)";
|
|
13177
12625
|
}
|
|
13178
12626
|
getClasses(extractedKeys) {
|
|
13179
12627
|
var _a;
|
|
13180
|
-
//
|
|
13181
|
-
|
|
13182
|
-
return ['text-transparent'];
|
|
13183
|
-
}
|
|
12628
|
+
// CSS-based approach: consumer class always outputs
|
|
12629
|
+
// Transparent is handled via data-transparent attribute
|
|
13184
12630
|
const variant = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.variant) !== null && _a !== void 0 ? _a : 'outline';
|
|
13185
12631
|
return [this[variant] || ''];
|
|
13186
12632
|
}
|
|
@@ -13220,18 +12666,19 @@ const mergeDefaults = (baseDefaults, overrideDefaults) => {
|
|
|
13220
12666
|
return finalDefaults;
|
|
13221
12667
|
};
|
|
13222
12668
|
|
|
13223
|
-
/**
|
|
13224
|
-
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
|
|
13228
|
-
|
|
13229
|
-
|
|
13230
|
-
|
|
13231
|
-
|
|
13232
|
-
|
|
13233
|
-
|
|
13234
|
-
|
|
12669
|
+
/**
|
|
12670
|
+
* Left padding theme - only outputs the consumer class pl-(--pl).
|
|
12671
|
+
* CSS variable values (--pl-unit) are now set via CSS rules
|
|
12672
|
+
* in vars.css using semantic classes and data attributes.
|
|
12673
|
+
*/
|
|
12674
|
+
class PlTheme extends BaseTheme {
|
|
12675
|
+
constructor() {
|
|
12676
|
+
super(...arguments);
|
|
12677
|
+
/** Consumer class for left padding */
|
|
12678
|
+
this.pl = "pl-(--pl)";
|
|
12679
|
+
}
|
|
12680
|
+
getClasses(_extractedKeys) {
|
|
12681
|
+
return [this.pl];
|
|
13235
12682
|
}
|
|
13236
12683
|
}
|
|
13237
12684
|
|
|
@@ -13253,14 +12700,14 @@ class ListStyleTheme extends BaseTheme {
|
|
|
13253
12700
|
}
|
|
13254
12701
|
}
|
|
13255
12702
|
|
|
13256
|
-
const createTypographyComponentTheme = (tag, base = "text-balance", fontSizeTheme = new FontSizeTheme(), defaults = {}, lineHeightTheme = LineHeightTheme
|
|
12703
|
+
const createTypographyComponentTheme = (tag, base = "text-balance", fontSizeTheme = new FontSizeTheme(), defaults = {}, lineHeightTheme = new LineHeightTheme()) => {
|
|
13257
12704
|
return new ComponentTheme(tag, base, {
|
|
13258
12705
|
size: {
|
|
13259
12706
|
text: fontSizeTheme,
|
|
13260
12707
|
lineHeight: lineHeightTheme,
|
|
13261
12708
|
},
|
|
13262
12709
|
appearance: {
|
|
13263
|
-
text:
|
|
12710
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
13264
12711
|
},
|
|
13265
12712
|
typography: defaultTypographyThemes,
|
|
13266
12713
|
layout: defaultLayoutsThemes,
|
|
@@ -13269,19 +12716,19 @@ const createTypographyComponentTheme = (tag, base = "text-balance", fontSizeThem
|
|
|
13269
12716
|
return props.href ? "a" : tag;
|
|
13270
12717
|
});
|
|
13271
12718
|
};
|
|
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
|
|
12719
|
+
// Page title specific theme - uses responsive font size
|
|
12720
|
+
const pageTitleTheme = createTypographyComponentTheme("h1", "vane-page-title text-balance tracking-tight w-fit", new FontSizeTheme(), mergeDefaults(themeDefaults.pageTitle, { semibold: true }), new LineHeightTheme());
|
|
12721
|
+
// Section title specific theme - uses responsive font size
|
|
12722
|
+
const sectionTitleTheme = createTypographyComponentTheme("h2", "vane-section-title text-balance w-fit", new FontSizeTheme(), mergeDefaults(themeDefaults.sectionTitle, { semibold: true }), new LineHeightTheme());
|
|
12723
|
+
// Title specific theme - uses responsive font size
|
|
12724
|
+
const titleTheme = createTypographyComponentTheme("h3", "vane-title text-balance w-fit", new FontSizeTheme(), mergeDefaults(themeDefaults.title, { semibold: true }), new LineHeightTheme());
|
|
13278
12725
|
// Text specific theme
|
|
13279
|
-
const textTheme = createTypographyComponentTheme("p", "p-0 m-0 w-fit", new FontSizeTheme(), themeDefaults.text);
|
|
12726
|
+
const textTheme = createTypographyComponentTheme("p", "vane-text p-0 m-0 w-fit", new FontSizeTheme(), themeDefaults.text);
|
|
13280
12727
|
// Link specific theme - uses LinkVariantTheme for link-specific colors
|
|
13281
|
-
const linkTheme = new ComponentTheme("a", "hover:underline w-fit cursor-pointer", {
|
|
12728
|
+
const linkTheme = new ComponentTheme("a", "vane-link hover:underline w-fit cursor-pointer", {
|
|
13282
12729
|
size: {
|
|
13283
12730
|
text: new FontSizeTheme(),
|
|
13284
|
-
lineHeight: LineHeightTheme
|
|
12731
|
+
lineHeight: new LineHeightTheme(),
|
|
13285
12732
|
},
|
|
13286
12733
|
appearance: {
|
|
13287
12734
|
text: new LinkVariantTheme(),
|
|
@@ -13290,26 +12737,26 @@ const linkTheme = new ComponentTheme("a", "hover:underline w-fit cursor-pointer"
|
|
|
13290
12737
|
layout: defaultLayoutsThemes,
|
|
13291
12738
|
}, themeDefaults.link, TYPOGRAPHY_CATEGORIES);
|
|
13292
12739
|
// ListItem specific theme
|
|
13293
|
-
const listItemTheme = new ComponentTheme("li", "", {
|
|
12740
|
+
const listItemTheme = new ComponentTheme("li", "vane-list-item", {
|
|
13294
12741
|
size: {
|
|
13295
12742
|
text: new FontSizeTheme(),
|
|
13296
|
-
lineHeight: LineHeightTheme
|
|
12743
|
+
lineHeight: new LineHeightTheme(),
|
|
13297
12744
|
},
|
|
13298
12745
|
appearance: {
|
|
13299
|
-
text:
|
|
12746
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
13300
12747
|
},
|
|
13301
12748
|
typography: defaultTypographyThemes,
|
|
13302
12749
|
layout: defaultLayoutsThemes,
|
|
13303
12750
|
}, themeDefaults.listItem, TYPOGRAPHY_CATEGORIES);
|
|
13304
12751
|
// List specific theme
|
|
13305
|
-
const listTheme = new ComponentTheme("ul", "list-inside", {
|
|
12752
|
+
const listTheme = new ComponentTheme("ul", "vane-list list-inside", {
|
|
13306
12753
|
size: {
|
|
13307
12754
|
text: new FontSizeTheme(),
|
|
13308
|
-
lineHeight: LineHeightTheme
|
|
12755
|
+
lineHeight: new LineHeightTheme(),
|
|
13309
12756
|
paddingLeft: new PlTheme(),
|
|
13310
12757
|
},
|
|
13311
12758
|
appearance: {
|
|
13312
|
-
text:
|
|
12759
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
13313
12760
|
},
|
|
13314
12761
|
typography: defaultTypographyThemes,
|
|
13315
12762
|
layout: defaultLayoutsThemes,
|
|
@@ -13325,12 +12772,10 @@ const listTheme = new ComponentTheme("ul", "list-inside", {
|
|
|
13325
12772
|
class BreakpointTheme extends BaseTheme {
|
|
13326
12773
|
constructor() {
|
|
13327
12774
|
super(...arguments);
|
|
13328
|
-
/** Switch to column layout on mobile devices and below (max-mobile:
|
|
12775
|
+
/** Switch to column layout on mobile devices and below (max-mobile: 48rem) */
|
|
13329
12776
|
this.mobileCol = "max-mobile:flex-col";
|
|
13330
|
-
/** Switch to column layout on tablet devices and below (max-tablet:
|
|
12777
|
+
/** Switch to column layout on tablet devices and below (max-tablet: 64rem) */
|
|
13331
12778
|
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
12779
|
/** Switch to column layout on desktop devices and below (max-desktop: 80rem) */
|
|
13335
12780
|
this.desktopCol = "max-desktop:flex-col";
|
|
13336
12781
|
}
|
|
@@ -13339,47 +12784,35 @@ class BreakpointTheme extends BaseTheme {
|
|
|
13339
12784
|
}
|
|
13340
12785
|
}
|
|
13341
12786
|
|
|
13342
|
-
const defaultCardTheme = new ComponentTheme("div", "", {
|
|
12787
|
+
const defaultCardTheme = new ComponentTheme("div", "vane-card", {
|
|
13343
12788
|
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(),
|
|
12789
|
+
px: new PxTheme(),
|
|
12790
|
+
py: new PyTheme(),
|
|
12791
|
+
lineHeight: new LineHeightTheme(),
|
|
12792
|
+
gap: new GapTheme(),
|
|
13360
12793
|
},
|
|
13361
12794
|
layout: {
|
|
13362
12795
|
...defaultLayoutsThemes,
|
|
13363
12796
|
border: new BorderTheme(),
|
|
13364
12797
|
ring: new RingTheme(),
|
|
13365
|
-
radius: RadiusTheme
|
|
12798
|
+
radius: new RadiusTheme(),
|
|
13366
12799
|
wrap: new WrapTheme(),
|
|
13367
12800
|
direction: new DirectionTheme(),
|
|
13368
12801
|
breakpoint: new BreakpointTheme(),
|
|
13369
12802
|
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
13370
12803
|
},
|
|
13371
12804
|
appearance: {
|
|
13372
|
-
background:
|
|
13373
|
-
text:
|
|
13374
|
-
border:
|
|
13375
|
-
ring:
|
|
12805
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12806
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12807
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12808
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
13376
12809
|
},
|
|
13377
12810
|
typography: defaultTypographyThemes,
|
|
13378
12811
|
}, themeDefaults.card, CARD_CATEGORIES);
|
|
13379
12812
|
|
|
13380
|
-
const defaultRowTheme = new ComponentTheme("div", "", {
|
|
12813
|
+
const defaultRowTheme = new ComponentTheme("div", "vane-row", {
|
|
13381
12814
|
size: {
|
|
13382
|
-
gap: GapTheme
|
|
12815
|
+
gap: new GapTheme(),
|
|
13383
12816
|
breakpoint: new BreakpointTheme(),
|
|
13384
12817
|
},
|
|
13385
12818
|
layout: {
|
|
@@ -13388,29 +12821,33 @@ const defaultRowTheme = new ComponentTheme("div", "", {
|
|
|
13388
12821
|
direction: new DirectionTheme(),
|
|
13389
12822
|
border: new BorderTheme(),
|
|
13390
12823
|
ring: new RingTheme(),
|
|
13391
|
-
radius: RadiusTheme
|
|
12824
|
+
radius: new RadiusTheme(),
|
|
13392
12825
|
},
|
|
13393
12826
|
appearance: {
|
|
13394
|
-
background:
|
|
13395
|
-
text:
|
|
13396
|
-
border:
|
|
13397
|
-
ring:
|
|
13398
|
-
shadow:
|
|
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'),
|
|
12831
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
13399
12832
|
}
|
|
13400
12833
|
}, themeDefaults.row, ROW_CATEGORIES);
|
|
13401
12834
|
|
|
13402
|
-
const defaultDividerTheme = new ComponentTheme("div", "h-
|
|
12835
|
+
const defaultDividerTheme = new ComponentTheme("div", "vane-divider h-(--bw) w-full", {
|
|
13403
12836
|
size: {
|
|
13404
12837
|
py: new PyTheme(), // Uses layout spacing by default
|
|
13405
12838
|
},
|
|
13406
12839
|
appearance: {
|
|
13407
|
-
|
|
13408
|
-
|
|
13409
|
-
}, 'bg'),
|
|
12840
|
+
// CSS-based approach: uses --border-color variable for divider background
|
|
12841
|
+
background: new SimpleConsumerTheme({ base: '[background:var(--border-color)]' }, 'bg'),
|
|
13410
12842
|
},
|
|
13411
12843
|
layout: defaultLayoutsThemes,
|
|
13412
12844
|
}, themeDefaults.divider, DIVIDER_CATEGORIES);
|
|
13413
12845
|
|
|
12846
|
+
/**
|
|
12847
|
+
* Size theme - can operate in two modes:
|
|
12848
|
+
* 1. Default mode: outputs consumer class size-(--size), with CSS variable values set in vars.css
|
|
12849
|
+
* 2. Custom mode: outputs custom classes for each size (e.g., max-width classes)
|
|
12850
|
+
*/
|
|
13414
12851
|
class SizeTheme extends BaseTheme {
|
|
13415
12852
|
constructor(sizeMap) {
|
|
13416
12853
|
super();
|
|
@@ -13424,22 +12861,31 @@ class SizeTheme extends BaseTheme {
|
|
|
13424
12861
|
this.lg = "";
|
|
13425
12862
|
/** Extra-large size variant */
|
|
13426
12863
|
this.xl = "";
|
|
13427
|
-
|
|
13428
|
-
|
|
13429
|
-
|
|
13430
|
-
|
|
12864
|
+
/** Consumer class for size (used in default mode) */
|
|
12865
|
+
this.size = "size-(--size)";
|
|
12866
|
+
this.useCustomClasses = !!sizeMap;
|
|
12867
|
+
if (sizeMap) {
|
|
12868
|
+
ComponentKeys.size.forEach((key) => {
|
|
12869
|
+
var _a;
|
|
12870
|
+
this[key] = (_a = sizeMap[key]) !== null && _a !== void 0 ? _a : "";
|
|
12871
|
+
});
|
|
12872
|
+
}
|
|
13431
12873
|
}
|
|
13432
12874
|
getClasses(extractedKeys) {
|
|
13433
12875
|
var _a;
|
|
13434
|
-
|
|
13435
|
-
|
|
12876
|
+
if (this.useCustomClasses) {
|
|
12877
|
+
const size = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md';
|
|
12878
|
+
return this[size] ? [this[size]] : [];
|
|
12879
|
+
}
|
|
12880
|
+
// Default: use CSS variable consumer class
|
|
12881
|
+
return [this.size];
|
|
13436
12882
|
}
|
|
13437
12883
|
}
|
|
13438
12884
|
|
|
13439
|
-
const defaultContainerTheme = new ComponentTheme("div", "mx-auto w-full", {
|
|
12885
|
+
const defaultContainerTheme = new ComponentTheme("div", "vane-container mx-auto w-full", {
|
|
13440
12886
|
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' }),
|
|
12887
|
+
gap: new GapTheme(),
|
|
12888
|
+
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
12889
|
},
|
|
13444
12890
|
layout: {
|
|
13445
12891
|
...defaultLayoutsThemes,
|
|
@@ -13447,20 +12893,20 @@ const defaultContainerTheme = new ComponentTheme("div", "mx-auto w-full", {
|
|
|
13447
12893
|
ring: new RingTheme(),
|
|
13448
12894
|
wrap: new WrapTheme(),
|
|
13449
12895
|
direction: new DirectionTheme(),
|
|
13450
|
-
radius: RadiusTheme
|
|
12896
|
+
radius: new RadiusTheme(),
|
|
13451
12897
|
},
|
|
13452
12898
|
appearance: {
|
|
13453
|
-
background:
|
|
13454
|
-
text:
|
|
13455
|
-
border:
|
|
13456
|
-
ring:
|
|
13457
|
-
shadow:
|
|
12899
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12900
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12901
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12902
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12903
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
13458
12904
|
}
|
|
13459
12905
|
}, themeDefaults.container, CONTAINER_CATEGORIES);
|
|
13460
12906
|
|
|
13461
|
-
const defaultColTheme = new ComponentTheme("div", "", {
|
|
12907
|
+
const defaultColTheme = new ComponentTheme("div", "vane-col", {
|
|
13462
12908
|
size: {
|
|
13463
|
-
gap: GapTheme
|
|
12909
|
+
gap: new GapTheme(),
|
|
13464
12910
|
},
|
|
13465
12911
|
layout: {
|
|
13466
12912
|
...defaultLayoutsThemes,
|
|
@@ -13468,28 +12914,22 @@ const defaultColTheme = new ComponentTheme("div", "", {
|
|
|
13468
12914
|
direction: new DirectionTheme(),
|
|
13469
12915
|
border: new BorderTheme(),
|
|
13470
12916
|
ring: new RingTheme(),
|
|
13471
|
-
radius: RadiusTheme
|
|
12917
|
+
radius: new RadiusTheme(),
|
|
13472
12918
|
},
|
|
13473
12919
|
appearance: {
|
|
13474
|
-
background:
|
|
13475
|
-
text:
|
|
13476
|
-
border:
|
|
13477
|
-
ring:
|
|
13478
|
-
shadow:
|
|
12920
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12921
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12922
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12923
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12924
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
13479
12925
|
}
|
|
13480
12926
|
}, themeDefaults.col, COL_CATEGORIES);
|
|
13481
12927
|
|
|
13482
|
-
const defaultStackTheme = new ComponentTheme("div", "", {
|
|
12928
|
+
const defaultStackTheme = new ComponentTheme("div", "vane-stack", {
|
|
13483
12929
|
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
|
-
}),
|
|
12930
|
+
px: new PxTheme(),
|
|
13491
12931
|
py: new PyTheme(),
|
|
13492
|
-
gap: GapTheme
|
|
12932
|
+
gap: new GapTheme(),
|
|
13493
12933
|
breakpoint: new BreakpointTheme(),
|
|
13494
12934
|
},
|
|
13495
12935
|
layout: {
|
|
@@ -13498,47 +12938,29 @@ const defaultStackTheme = new ComponentTheme("div", "", {
|
|
|
13498
12938
|
direction: new DirectionTheme(),
|
|
13499
12939
|
border: new BorderTheme(),
|
|
13500
12940
|
ring: new RingTheme(),
|
|
13501
|
-
radius: RadiusTheme
|
|
12941
|
+
radius: new RadiusTheme(),
|
|
13502
12942
|
},
|
|
13503
12943
|
appearance: {
|
|
13504
|
-
background:
|
|
13505
|
-
text:
|
|
13506
|
-
border:
|
|
13507
|
-
ring:
|
|
13508
|
-
shadow:
|
|
12944
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12945
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12946
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12947
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
12948
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
13509
12949
|
}
|
|
13510
12950
|
}, themeDefaults.stack, STACK_CATEGORIES);
|
|
13511
12951
|
|
|
13512
|
-
const defaultSectionTheme = new ComponentTheme("div", "w-full", {
|
|
12952
|
+
const defaultSectionTheme = new ComponentTheme("div", "vane-section w-full", {
|
|
13513
12953
|
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
|
-
}),
|
|
12954
|
+
px: new PxTheme(),
|
|
12955
|
+
py: new PyTheme(),
|
|
12956
|
+
gap: new GapTheme(),
|
|
13535
12957
|
breakpoint: new BreakpointTheme(),
|
|
13536
12958
|
},
|
|
13537
12959
|
appearance: {
|
|
13538
|
-
background:
|
|
13539
|
-
text:
|
|
13540
|
-
border:
|
|
13541
|
-
ring:
|
|
12960
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12961
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12962
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
12963
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
13542
12964
|
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
13543
12965
|
},
|
|
13544
12966
|
layout: {
|
|
@@ -13547,40 +12969,37 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full", {
|
|
|
13547
12969
|
direction: new DirectionTheme(),
|
|
13548
12970
|
border: new BorderTheme(),
|
|
13549
12971
|
ring: new RingTheme(),
|
|
13550
|
-
radius: RadiusTheme
|
|
12972
|
+
radius: new RadiusTheme(),
|
|
13551
12973
|
},
|
|
13552
12974
|
}, themeDefaults.section, SECTION_CATEGORIES);
|
|
13553
12975
|
|
|
13554
12976
|
const gridSubThemes = {
|
|
13555
12977
|
size: {
|
|
13556
|
-
gap: GapTheme
|
|
12978
|
+
gap: new GapTheme(),
|
|
13557
12979
|
},
|
|
13558
12980
|
appearance: {
|
|
13559
|
-
background:
|
|
13560
|
-
text:
|
|
12981
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
12982
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
12983
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
13561
12984
|
},
|
|
13562
12985
|
layout: {
|
|
13563
12986
|
...defaultLayoutsThemes,
|
|
13564
12987
|
wrap: new WrapTheme(),
|
|
13565
12988
|
flexDirection: new DirectionTheme(),
|
|
12989
|
+
radius: new RadiusTheme(),
|
|
12990
|
+
border: new BorderTheme(),
|
|
13566
12991
|
},
|
|
13567
12992
|
};
|
|
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);
|
|
12993
|
+
const defaultGrid2Theme = new ComponentTheme("div", "vane-grid vane-grid-2 grid-cols-1 md:grid-cols-2", gridSubThemes, themeDefaults.grid2, GRID_CATEGORIES);
|
|
12994
|
+
const defaultGrid3Theme = new ComponentTheme("div", "vane-grid vane-grid-3 grid-cols-1 md:grid-cols-3", gridSubThemes, themeDefaults.grid3, GRID_CATEGORIES);
|
|
12995
|
+
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);
|
|
12996
|
+
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);
|
|
12997
|
+
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
12998
|
|
|
13574
12999
|
var _a, _b, _c;
|
|
13575
|
-
const defaultCheckboxTheme = new ComponentTheme("input", "peer col-start-1 row-start-1 cursor-pointer appearance-none ring-transparent size-(--
|
|
13000
|
+
const defaultCheckboxTheme = new ComponentTheme("input", "vane-checkbox peer col-start-1 row-start-1 cursor-pointer appearance-none ring-transparent size-(--size)", {
|
|
13576
13001
|
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
|
-
}),
|
|
13002
|
+
size: new SizeTheme(),
|
|
13584
13003
|
text: new FontSizeTheme()
|
|
13585
13004
|
},
|
|
13586
13005
|
layout: {
|
|
@@ -13588,29 +13007,23 @@ const defaultCheckboxTheme = new ComponentTheme("input", "peer col-start-1 row-s
|
|
|
13588
13007
|
border: new BorderTheme(),
|
|
13589
13008
|
ring: new RingTheme(),
|
|
13590
13009
|
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),
|
|
13010
|
+
radius: new RadiusTheme(),
|
|
13598
13011
|
},
|
|
13599
13012
|
appearance: {
|
|
13600
|
-
accent:
|
|
13601
|
-
border:
|
|
13602
|
-
background:
|
|
13603
|
-
ring:
|
|
13604
|
-
focusVisible:
|
|
13605
|
-
check:
|
|
13606
|
-
shadow:
|
|
13013
|
+
accent: new SimpleConsumerTheme({ base: accentConsumerClass }, 'accent'),
|
|
13014
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
13015
|
+
background: new SimpleConsumerTheme({ base: 'bg-white' }, 'bg'),
|
|
13016
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
13017
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
|
|
13018
|
+
check: new SimpleConsumerTheme({ base: checkedBgConsumerClass }, 'bg'),
|
|
13019
|
+
shadow: ShadowAppearanceTheme.createUITheme(),
|
|
13607
13020
|
}
|
|
13608
13021
|
}, ((_a = themeDefaults.checkbox) === null || _a === void 0 ? void 0 : _a.input) || {}, CHECKBOX_CATEGORIES);
|
|
13609
13022
|
const defaultCheckTheme = new ComponentTheme("span", "invisible col-start-1 row-start-1 peer-checked:visible", {
|
|
13610
13023
|
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
13024
|
appearance: {
|
|
13612
|
-
color:
|
|
13613
|
-
focusVisible:
|
|
13025
|
+
color: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
13026
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible')
|
|
13614
13027
|
},
|
|
13615
13028
|
layout: {
|
|
13616
13029
|
...defaultLayoutsThemes,
|
|
@@ -13625,26 +13038,26 @@ const defaultCheckboxWrapperTheme = new ComponentTheme("span", "", {
|
|
|
13625
13038
|
md: 'h-[calc(var(--lh)*var(--fs))]',
|
|
13626
13039
|
lg: 'h-[calc(var(--lh)*var(--fs))]',
|
|
13627
13040
|
xl: 'h-[calc(var(--lh)*var(--fs))]'
|
|
13628
|
-
})
|
|
13041
|
+
}) // Uses custom mode for calculated height
|
|
13629
13042
|
},
|
|
13630
13043
|
layout: {
|
|
13631
13044
|
...defaultLayoutsThemes,
|
|
13632
13045
|
focusVisible: new FocusVisibleTheme()
|
|
13633
13046
|
},
|
|
13634
13047
|
appearance: {
|
|
13635
|
-
variant:
|
|
13636
|
-
focusVisible:
|
|
13048
|
+
variant: new SimpleConsumerTheme({ base: '' }, 'bg'),
|
|
13049
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible')
|
|
13637
13050
|
}
|
|
13638
13051
|
}, ((_c = themeDefaults.checkbox) === null || _c === void 0 ? void 0 : _c.wrapper) || {}, CHECKBOX_CATEGORIES);
|
|
13639
13052
|
|
|
13640
|
-
const defaultLabelTheme = new ComponentTheme("label", "has-[input]:cursor-pointer cursor-default", {
|
|
13053
|
+
const defaultLabelTheme = new ComponentTheme("label", "vane-label has-[input]:cursor-pointer cursor-default", {
|
|
13641
13054
|
size: {
|
|
13642
13055
|
text: new FontSizeTheme(),
|
|
13643
|
-
lineHeight: LineHeightTheme
|
|
13644
|
-
gap: GapTheme
|
|
13056
|
+
lineHeight: new LineHeightTheme(),
|
|
13057
|
+
gap: new GapTheme(),
|
|
13645
13058
|
},
|
|
13646
13059
|
appearance: {
|
|
13647
|
-
text:
|
|
13060
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
13648
13061
|
},
|
|
13649
13062
|
typography: defaultTypographyThemes,
|
|
13650
13063
|
layout: {
|
|
@@ -13654,52 +13067,46 @@ const defaultLabelTheme = new ComponentTheme("label", "has-[input]:cursor-pointe
|
|
|
13654
13067
|
},
|
|
13655
13068
|
}, themeDefaults.label, LABEL_CATEGORIES);
|
|
13656
13069
|
|
|
13657
|
-
const defaultImgTheme = new ComponentTheme("img", "object-cover", // Default to cover for better image display
|
|
13070
|
+
const defaultImgTheme = new ComponentTheme("img", "vane-img object-cover", // Default to cover for better image display
|
|
13658
13071
|
{
|
|
13659
13072
|
layout: {
|
|
13660
13073
|
...defaultLayoutsThemes,
|
|
13661
13074
|
border: new BorderTheme(),
|
|
13662
13075
|
ring: new RingTheme(),
|
|
13663
13076
|
focusVisible: new FocusVisibleTheme(),
|
|
13664
|
-
radius: RadiusTheme
|
|
13077
|
+
radius: new RadiusTheme(),
|
|
13665
13078
|
},
|
|
13666
13079
|
appearance: {
|
|
13667
|
-
background:
|
|
13668
|
-
border:
|
|
13669
|
-
ring:
|
|
13670
|
-
focusVisible:
|
|
13671
|
-
shadow:
|
|
13080
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
|
|
13081
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
13082
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
13083
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
|
|
13084
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme()
|
|
13672
13085
|
}
|
|
13673
13086
|
}, themeDefaults.img, IMG_CATEGORIES);
|
|
13674
13087
|
|
|
13675
|
-
const defaultInputTheme = new ComponentTheme("input", "w-full transition-all duration-200", {
|
|
13088
|
+
const defaultInputTheme = new ComponentTheme("input", "vane-input w-full transition-all duration-200", {
|
|
13676
13089
|
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(),
|
|
13090
|
+
px: new PxTheme(),
|
|
13091
|
+
py: new PyTheme(),
|
|
13092
|
+
gap: new GapTheme(),
|
|
13686
13093
|
text: new FontSizeTheme(),
|
|
13687
|
-
lineHeight: LineHeightTheme
|
|
13094
|
+
lineHeight: new LineHeightTheme(),
|
|
13688
13095
|
},
|
|
13689
13096
|
appearance: {
|
|
13690
|
-
background:
|
|
13691
|
-
text:
|
|
13692
|
-
border:
|
|
13693
|
-
ring:
|
|
13694
|
-
focusVisible:
|
|
13695
|
-
shadow:
|
|
13097
|
+
background: new SimpleConsumerTheme({ base: bgConsumerClasses.base, hover: bgConsumerClasses.hover }, 'bg'),
|
|
13098
|
+
text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
|
|
13099
|
+
border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
|
|
13100
|
+
ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
|
|
13101
|
+
focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
|
|
13102
|
+
shadow: ShadowAppearanceTheme.createUITheme()
|
|
13696
13103
|
},
|
|
13697
13104
|
layout: {
|
|
13698
13105
|
...defaultLayoutsThemes,
|
|
13699
13106
|
border: new BorderTheme(),
|
|
13700
13107
|
ring: new RingTheme(),
|
|
13701
13108
|
focusVisible: new FocusVisibleTheme(),
|
|
13702
|
-
radius: RadiusTheme
|
|
13109
|
+
radius: new RadiusTheme(),
|
|
13703
13110
|
wrap: new WrapTheme(),
|
|
13704
13111
|
flexDirection: new DirectionTheme(),
|
|
13705
13112
|
},
|