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