@vaneui/md 0.3.1-alpha.20251228133323.630b220 → 0.3.1-alpha.20260104192853.8b57fd2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js 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 */
@@ -8579,11 +8581,11 @@ const VARIANT = ['variant'];
8579
8581
  /** Component property keys mapping categories to their available values */
8580
8582
  const ComponentKeys = {
8581
8583
  /** Color appearance options */
8582
- appearance: ['primary', 'brand', 'accent', 'secondary', 'tertiary', 'success', 'danger', 'warning', 'info'],
8584
+ appearance: ['primary', 'brand', 'accent', 'secondary', 'tertiary', 'success', 'danger', 'warning', 'info', 'link'],
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,21 @@ 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,
12269
+ primary: true,
12270
+ sharp: true,
12808
12271
  },
12809
12272
  section: {
12810
12273
  md: true,
12811
12274
  flex: true,
12812
12275
  column: true,
12276
+ outline: true,
12813
12277
  primary: true,
12814
12278
  itemsStart: true,
12815
12279
  gap: true,
@@ -12817,6 +12281,8 @@ const themeDefaults = {
12817
12281
  noBorder: true,
12818
12282
  noRing: true,
12819
12283
  noShadow: true,
12284
+ responsive: true,
12285
+ sharp: true,
12820
12286
  },
12821
12287
  stack: {
12822
12288
  md: true,
@@ -12827,6 +12293,9 @@ const themeDefaults = {
12827
12293
  padding: true,
12828
12294
  noBorder: true,
12829
12295
  noRing: true,
12296
+ outline: true,
12297
+ primary: true,
12298
+ sharp: true,
12830
12299
  },
12831
12300
  row: {
12832
12301
  row: true,
@@ -12836,6 +12305,9 @@ const themeDefaults = {
12836
12305
  gap: true,
12837
12306
  noBorder: true,
12838
12307
  noRing: true,
12308
+ outline: true,
12309
+ primary: true,
12310
+ sharp: true,
12839
12311
  },
12840
12312
  col: {
12841
12313
  column: true,
@@ -12844,34 +12316,53 @@ const themeDefaults = {
12844
12316
  gap: true,
12845
12317
  noBorder: true,
12846
12318
  noRing: true,
12319
+ outline: true,
12320
+ primary: true,
12321
+ sharp: true,
12847
12322
  },
12848
12323
  grid2: {
12849
12324
  md: true,
12850
12325
  grid: true,
12851
12326
  gap: true,
12327
+ sharp: true,
12328
+ outline: true,
12329
+ primary: true,
12852
12330
  },
12853
12331
  grid3: {
12854
12332
  md: true,
12855
12333
  grid: true,
12856
12334
  gap: true,
12335
+ sharp: true,
12336
+ outline: true,
12337
+ primary: true,
12857
12338
  },
12858
12339
  grid4: {
12859
12340
  md: true,
12860
12341
  grid: true,
12861
12342
  gap: true,
12343
+ sharp: true,
12344
+ outline: true,
12345
+ primary: true,
12862
12346
  },
12863
12347
  grid5: {
12864
12348
  md: true,
12865
12349
  grid: true,
12866
12350
  gap: true,
12351
+ sharp: true,
12352
+ outline: true,
12353
+ primary: true,
12867
12354
  },
12868
12355
  grid6: {
12869
12356
  md: true,
12870
12357
  grid: true,
12871
12358
  gap: true,
12359
+ sharp: true,
12360
+ outline: true,
12361
+ primary: true,
12872
12362
  },
12873
12363
  divider: {
12874
12364
  md: true,
12365
+ outline: true,
12875
12366
  primary: true,
12876
12367
  noPadding: true,
12877
12368
  },
@@ -12881,8 +12372,11 @@ const themeDefaults = {
12881
12372
  gap: true,
12882
12373
  sans: true,
12883
12374
  medium: true,
12375
+ outline: true,
12376
+ primary: true,
12884
12377
  },
12885
12378
  img: {
12379
+ md: true,
12886
12380
  rounded: true,
12887
12381
  },
12888
12382
  code: {
@@ -12892,6 +12386,7 @@ const themeDefaults = {
12892
12386
  rounded: true,
12893
12387
  inline: true,
12894
12388
  padding: true,
12389
+ outline: true,
12895
12390
  primary: true,
12896
12391
  ring: true,
12897
12392
  },
@@ -12899,31 +12394,48 @@ const themeDefaults = {
12899
12394
  md: true,
12900
12395
  sans: true,
12901
12396
  textLeft: true,
12397
+ outline: true,
12398
+ primary: true,
12902
12399
  },
12903
12400
  title: {
12904
12401
  md: true,
12905
12402
  sans: true,
12906
12403
  semibold: true,
12907
12404
  textLeft: true,
12405
+ responsive: true,
12406
+ outline: true,
12407
+ primary: true,
12908
12408
  },
12909
12409
  pageTitle: {
12910
12410
  md: true,
12911
12411
  sans: true,
12912
12412
  semibold: true,
12913
12413
  textLeft: true,
12414
+ responsive: true,
12415
+ outline: true,
12416
+ primary: true,
12914
12417
  },
12915
12418
  sectionTitle: {
12916
12419
  md: true,
12917
12420
  sans: true,
12918
12421
  semibold: true,
12919
12422
  textLeft: true,
12423
+ responsive: true,
12424
+ outline: true,
12425
+ primary: true,
12920
12426
  },
12921
12427
  link: {
12428
+ md: true,
12922
12429
  underline: true,
12923
12430
  sans: true,
12431
+ outline: true,
12432
+ link: true,
12924
12433
  },
12925
12434
  listItem: {
12435
+ md: true,
12926
12436
  sans: true,
12437
+ outline: true,
12438
+ primary: true,
12927
12439
  },
12928
12440
  list: {
12929
12441
  md: true,
@@ -12931,6 +12443,8 @@ const themeDefaults = {
12931
12443
  normal: true,
12932
12444
  padding: true,
12933
12445
  disc: true,
12446
+ outline: true,
12447
+ primary: true,
12934
12448
  },
12935
12449
  checkbox: {
12936
12450
  input: {
@@ -12970,41 +12484,53 @@ const themeDefaults = {
12970
12484
  },
12971
12485
  };
12972
12486
 
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", {
12487
+ /* ==========================================
12488
+ CSS VARIABLE CONSUMER CLASSES
12489
+ These classes consume component-level CSS variables
12490
+ that are set by CSS rules in vars.css based on
12491
+ data-appearance and data-variant attributes.
12492
+ ========================================== */
12493
+ /** Background consumer classes - consume --bg-color, --bg-hover-color, --bg-active-color */
12494
+ const bgConsumerClasses = {
12495
+ base: "[background:var(--bg-color)]",
12496
+ hover: "hover:[background:var(--bg-hover-color)]",
12497
+ active: "active:[background:var(--bg-active-color)]",
12498
+ };
12499
+ /** Text color consumer class - consumes --text-color */
12500
+ const textConsumerClass = "text-(--text-color)";
12501
+ /** Border consumer class - consumes --border-color */
12502
+ const borderConsumerClass = "border-(--border-color)";
12503
+ /** Ring consumer class - consumes --ring-color */
12504
+ const ringConsumerClass = "ring-(--ring-color)";
12505
+ /** Focus visible outline consumer class - consumes --ring-color */
12506
+ const focusVisibleConsumerClass = "focus-visible:outline-(--ring-color)";
12507
+ /** Accent color consumer class - consumes --accent-color */
12508
+ const accentConsumerClass = "accent-(--accent-color)";
12509
+ /** Checked background consumer class - consumes --checked-bg-color */
12510
+ const checkedBgConsumerClass = "checked:[background:var(--checked-bg-color)]";
12511
+
12512
+ const defaultButtonTheme = new ComponentTheme("button", "vane-button w-fit h-fit cursor-pointer transition-all duration-200 whitespace-nowrap", {
12981
12513
  size: {
12982
- px: new PxTheme(buttonAspectRatioClasses, true),
12983
- py: PyTheme.createForUI(),
12984
- gap: GapTheme.createForUI(),
12514
+ px: new PxTheme(),
12515
+ py: new PyTheme(),
12516
+ gap: new GapTheme(),
12985
12517
  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
- }),
12518
+ lineHeight: new LineHeightTheme(),
12993
12519
  },
12994
12520
  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()
12521
+ background: new SimpleConsumerTheme({ base: bgConsumerClasses.base, hover: bgConsumerClasses.hover, active: bgConsumerClasses.active }, 'bg'),
12522
+ text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
12523
+ border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
12524
+ ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
12525
+ focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
12526
+ shadow: ShadowAppearanceTheme.createUITheme()
13001
12527
  },
13002
12528
  layout: {
13003
12529
  ...defaultLayoutsThemes,
13004
12530
  border: new BorderTheme(),
13005
12531
  ring: new RingTheme(),
13006
12532
  focusVisible: new FocusVisibleTheme(),
13007
- radius: RadiusTheme.createUITheme(),
12533
+ radius: new RadiusTheme(),
13008
12534
  wrap: new WrapTheme(),
13009
12535
  flexDirection: new DirectionTheme(),
13010
12536
  },
@@ -13014,36 +12540,28 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
13014
12540
  return props.href ? "a" : "button";
13015
12541
  });
13016
12542
 
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", {
12543
+ const defaultBadgeTheme = new ComponentTheme("span", "vane-badge w-fit h-fit transition-all duration-200 whitespace-nowrap", {
13026
12544
  size: {
13027
- px: new PxTheme(badgeAspectRatioClasses, true),
13028
- py: PyTheme.createForUI(),
13029
- gap: GapTheme.createForUI(),
12545
+ px: new PxTheme(),
12546
+ py: new PyTheme(),
12547
+ gap: new GapTheme(),
13030
12548
  text: new FontSizeTheme(),
13031
- lineHeight: LineHeightTheme.createDefault()
12549
+ lineHeight: new LineHeightTheme()
13032
12550
  },
13033
12551
  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()
12552
+ background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
12553
+ text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
12554
+ border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
12555
+ ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
12556
+ focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
12557
+ shadow: ShadowAppearanceTheme.createLayoutTheme()
13040
12558
  },
13041
12559
  layout: {
13042
12560
  ...defaultLayoutsThemes,
13043
12561
  border: new BorderTheme(),
13044
12562
  ring: new RingTheme(),
13045
12563
  focusVisible: new FocusVisibleTheme(),
13046
- radius: RadiusTheme.createUITheme(),
12564
+ radius: new RadiusTheme(),
13047
12565
  wrap: new WrapTheme(),
13048
12566
  flexDirection: new DirectionTheme(),
13049
12567
  },
@@ -13052,43 +12570,25 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all
13052
12570
  return props.href ? "a" : "span";
13053
12571
  });
13054
12572
 
13055
- const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all duration-200 whitespace-nowrap", {
12573
+ const defaultChipTheme = new ComponentTheme("span", "vane-chip w-fit h-fit transition-all duration-200 whitespace-nowrap", {
13056
12574
  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),
12575
+ px: new PxTheme(),
12576
+ py: new PyTheme(),
13071
12577
  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()
12578
+ lineHeight: new LineHeightTheme(),
12579
+ gap: new GapTheme()
13080
12580
  },
13081
12581
  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()
12582
+ background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
12583
+ text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
12584
+ border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
12585
+ ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
12586
+ focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
12587
+ shadow: ShadowAppearanceTheme.createLayoutTheme()
13088
12588
  },
13089
12589
  layout: {
13090
12590
  ...defaultLayoutsThemes,
13091
- radius: RadiusTheme.createUITheme(),
12591
+ radius: new RadiusTheme(),
13092
12592
  border: new BorderTheme(),
13093
12593
  ring: new RingTheme(),
13094
12594
  focusVisible: new FocusVisibleTheme(),
@@ -13100,55 +12600,25 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all
13100
12600
  return props.href ? "a" : "span";
13101
12601
  });
13102
12602
 
13103
- const defaultCodeTheme = new ComponentTheme("code", "", {
12603
+ const defaultCodeTheme = new ComponentTheme("code", "vane-code", {
13104
12604
  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()
12605
+ px: new PxTheme(),
12606
+ py: new PyTheme(),
12607
+ text: new FontSizeTheme(),
12608
+ lineHeight: new LineHeightTheme(),
12609
+ gap: new GapTheme()
13134
12610
  },
13135
12611
  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()
12612
+ background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
12613
+ text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
12614
+ border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
12615
+ ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
12616
+ focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
12617
+ shadow: ShadowAppearanceTheme.createLayoutTheme()
13142
12618
  },
13143
12619
  layout: {
13144
12620
  ...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),
12621
+ radius: new RadiusTheme(),
13152
12622
  border: new BorderTheme(),
13153
12623
  ring: new RingTheme(),
13154
12624
  focusVisible: new FocusVisibleTheme(),
@@ -13160,25 +12630,23 @@ const defaultCodeTheme = new ComponentTheme("code", "", {
13160
12630
 
13161
12631
  /**
13162
12632
  * Link-specific variant theme that handles text colors
13163
- * using link color variables directly (not through the appearance system).
12633
+ * using CSS consumer class approach.
13164
12634
  *
13165
- * This allows Link component colors to be customized independently
13166
- * from primary/secondary appearance colors.
12635
+ * Link defaults to "link" appearance which provides link-specific colors
12636
+ * via CSS variable rules in vars.css.
13167
12637
  */
13168
12638
  class LinkVariantTheme extends BaseTheme {
13169
12639
  constructor() {
13170
12640
  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)";
12641
+ /** CSS consumer class for outline variant */
12642
+ this.outline = "text-(--text-color)";
12643
+ /** CSS consumer class for filled variant */
12644
+ this.filled = "text-(--text-color)";
13175
12645
  }
13176
12646
  getClasses(extractedKeys) {
13177
12647
  var _a;
13178
- // Handle transparent override
13179
- if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.transparent) === 'transparent') {
13180
- return ['text-transparent'];
13181
- }
12648
+ // CSS-based approach: consumer class always outputs
12649
+ // Transparent is handled via data-transparent attribute
13182
12650
  const variant = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.variant) !== null && _a !== void 0 ? _a : 'outline';
13183
12651
  return [this[variant] || ''];
13184
12652
  }
@@ -13218,18 +12686,19 @@ const mergeDefaults = (baseDefaults, overrideDefaults) => {
13218
12686
  return finalDefaults;
13219
12687
  };
13220
12688
 
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
- }
12689
+ /**
12690
+ * Left padding theme - only outputs the consumer class pl-(--pl).
12691
+ * CSS variable values (--pl-unit) are now set via CSS rules
12692
+ * in vars.css using semantic classes and data attributes.
12693
+ */
12694
+ class PlTheme extends BaseTheme {
12695
+ constructor() {
12696
+ super(...arguments);
12697
+ /** Consumer class for left padding */
12698
+ this.pl = "pl-(--pl)";
12699
+ }
12700
+ getClasses(_extractedKeys) {
12701
+ return [this.pl];
13233
12702
  }
13234
12703
  }
13235
12704
 
@@ -13251,14 +12720,14 @@ class ListStyleTheme extends BaseTheme {
13251
12720
  }
13252
12721
  }
13253
12722
 
13254
- const createTypographyComponentTheme = (tag, base = "text-balance", fontSizeTheme = new FontSizeTheme(), defaults = {}, lineHeightTheme = LineHeightTheme.createDefault()) => {
12723
+ const createTypographyComponentTheme = (tag, base = "text-balance", fontSizeTheme = new FontSizeTheme(), defaults = {}, lineHeightTheme = new LineHeightTheme()) => {
13255
12724
  return new ComponentTheme(tag, base, {
13256
12725
  size: {
13257
12726
  text: fontSizeTheme,
13258
12727
  lineHeight: lineHeightTheme,
13259
12728
  },
13260
12729
  appearance: {
13261
- text: GenericVariantTheme.createTypographyTextTheme(),
12730
+ text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
13262
12731
  },
13263
12732
  typography: defaultTypographyThemes,
13264
12733
  layout: defaultLayoutsThemes,
@@ -13267,19 +12736,19 @@ const createTypographyComponentTheme = (tag, base = "text-balance", fontSizeThem
13267
12736
  return props.href ? "a" : tag;
13268
12737
  });
13269
12738
  };
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());
12739
+ // Page title specific theme - uses responsive font size
12740
+ const pageTitleTheme = createTypographyComponentTheme("h1", "vane-page-title text-balance tracking-tight w-fit", new FontSizeTheme(), mergeDefaults(themeDefaults.pageTitle, { semibold: true }), new LineHeightTheme());
12741
+ // Section title specific theme - uses responsive font size
12742
+ const sectionTitleTheme = createTypographyComponentTheme("h2", "vane-section-title text-balance w-fit", new FontSizeTheme(), mergeDefaults(themeDefaults.sectionTitle, { semibold: true }), new LineHeightTheme());
12743
+ // Title specific theme - uses responsive font size
12744
+ const titleTheme = createTypographyComponentTheme("h3", "vane-title text-balance w-fit", new FontSizeTheme(), mergeDefaults(themeDefaults.title, { semibold: true }), new LineHeightTheme());
13276
12745
  // Text specific theme
13277
- const textTheme = createTypographyComponentTheme("p", "p-0 m-0 w-fit", new FontSizeTheme(), themeDefaults.text);
12746
+ const textTheme = createTypographyComponentTheme("p", "vane-text p-0 m-0 w-fit", new FontSizeTheme(), themeDefaults.text);
13278
12747
  // Link specific theme - uses LinkVariantTheme for link-specific colors
13279
- const linkTheme = new ComponentTheme("a", "hover:underline w-fit cursor-pointer", {
12748
+ const linkTheme = new ComponentTheme("a", "vane-link hover:underline w-fit cursor-pointer", {
13280
12749
  size: {
13281
12750
  text: new FontSizeTheme(),
13282
- lineHeight: LineHeightTheme.createDefault(),
12751
+ lineHeight: new LineHeightTheme(),
13283
12752
  },
13284
12753
  appearance: {
13285
12754
  text: new LinkVariantTheme(),
@@ -13288,26 +12757,26 @@ const linkTheme = new ComponentTheme("a", "hover:underline w-fit cursor-pointer"
13288
12757
  layout: defaultLayoutsThemes,
13289
12758
  }, themeDefaults.link, TYPOGRAPHY_CATEGORIES);
13290
12759
  // ListItem specific theme
13291
- const listItemTheme = new ComponentTheme("li", "", {
12760
+ const listItemTheme = new ComponentTheme("li", "vane-list-item", {
13292
12761
  size: {
13293
12762
  text: new FontSizeTheme(),
13294
- lineHeight: LineHeightTheme.createDefault(),
12763
+ lineHeight: new LineHeightTheme(),
13295
12764
  },
13296
12765
  appearance: {
13297
- text: GenericVariantTheme.createTypographyTextTheme(),
12766
+ text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
13298
12767
  },
13299
12768
  typography: defaultTypographyThemes,
13300
12769
  layout: defaultLayoutsThemes,
13301
12770
  }, themeDefaults.listItem, TYPOGRAPHY_CATEGORIES);
13302
12771
  // List specific theme
13303
- const listTheme = new ComponentTheme("ul", "list-inside", {
12772
+ const listTheme = new ComponentTheme("ul", "vane-list list-inside", {
13304
12773
  size: {
13305
12774
  text: new FontSizeTheme(),
13306
- lineHeight: LineHeightTheme.createDefault(),
12775
+ lineHeight: new LineHeightTheme(),
13307
12776
  paddingLeft: new PlTheme(),
13308
12777
  },
13309
12778
  appearance: {
13310
- text: GenericVariantTheme.createTypographyTextTheme(),
12779
+ text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
13311
12780
  },
13312
12781
  typography: defaultTypographyThemes,
13313
12782
  layout: defaultLayoutsThemes,
@@ -13323,12 +12792,10 @@ const listTheme = new ComponentTheme("ul", "list-inside", {
13323
12792
  class BreakpointTheme extends BaseTheme {
13324
12793
  constructor() {
13325
12794
  super(...arguments);
13326
- /** Switch to column layout on mobile devices and below (max-mobile: 20rem) */
12795
+ /** Switch to column layout on mobile devices and below (max-mobile: 48rem) */
13327
12796
  this.mobileCol = "max-mobile:flex-col";
13328
- /** Switch to column layout on tablet devices and below (max-tablet: 40rem) */
12797
+ /** Switch to column layout on tablet devices and below (max-tablet: 64rem) */
13329
12798
  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
12799
  /** Switch to column layout on desktop devices and below (max-desktop: 80rem) */
13333
12800
  this.desktopCol = "max-desktop:flex-col";
13334
12801
  }
@@ -13337,47 +12804,35 @@ class BreakpointTheme extends BaseTheme {
13337
12804
  }
13338
12805
  }
13339
12806
 
13340
- const defaultCardTheme = new ComponentTheme("div", "", {
12807
+ const defaultCardTheme = new ComponentTheme("div", "vane-card", {
13341
12808
  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(),
12809
+ px: new PxTheme(),
12810
+ py: new PyTheme(),
12811
+ lineHeight: new LineHeightTheme(),
12812
+ gap: new GapTheme(),
13358
12813
  },
13359
12814
  layout: {
13360
12815
  ...defaultLayoutsThemes,
13361
12816
  border: new BorderTheme(),
13362
12817
  ring: new RingTheme(),
13363
- radius: RadiusTheme.createLayoutTheme(),
12818
+ radius: new RadiusTheme(),
13364
12819
  wrap: new WrapTheme(),
13365
12820
  direction: new DirectionTheme(),
13366
12821
  breakpoint: new BreakpointTheme(),
13367
12822
  shadow: ShadowAppearanceTheme.createLayoutTheme(),
13368
12823
  },
13369
12824
  appearance: {
13370
- background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
13371
- text: GenericVariantTheme.createUIElementTextThemeIgnoreTransparent(),
13372
- border: GenericVariantTheme.createUIElementBorderTheme(),
13373
- ring: GenericVariantTheme.createUIElementRingTheme(),
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'),
13374
12829
  },
13375
12830
  typography: defaultTypographyThemes,
13376
12831
  }, themeDefaults.card, CARD_CATEGORIES);
13377
12832
 
13378
- const defaultRowTheme = new ComponentTheme("div", "", {
12833
+ const defaultRowTheme = new ComponentTheme("div", "vane-row", {
13379
12834
  size: {
13380
- gap: GapTheme.createForLayout(),
12835
+ gap: new GapTheme(),
13381
12836
  breakpoint: new BreakpointTheme(),
13382
12837
  },
13383
12838
  layout: {
@@ -13386,29 +12841,33 @@ const defaultRowTheme = new ComponentTheme("div", "", {
13386
12841
  direction: new DirectionTheme(),
13387
12842
  border: new BorderTheme(),
13388
12843
  ring: new RingTheme(),
13389
- radius: RadiusTheme.createLayoutTheme(),
12844
+ radius: new RadiusTheme(),
13390
12845
  },
13391
12846
  appearance: {
13392
- background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
13393
- text: GenericVariantTheme.createUIElementTextThemeIgnoreTransparent(),
13394
- border: GenericVariantTheme.createUIElementBorderTheme(),
13395
- ring: GenericVariantTheme.createUIElementRingTheme(),
13396
- shadow: GenericVariantTheme.createLayoutShadowTheme(),
12847
+ background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
12848
+ text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
12849
+ border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
12850
+ ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
12851
+ shadow: ShadowAppearanceTheme.createLayoutTheme(),
13397
12852
  }
13398
12853
  }, themeDefaults.row, ROW_CATEGORIES);
13399
12854
 
13400
- const defaultDividerTheme = new ComponentTheme("div", "h-px w-full", {
12855
+ const defaultDividerTheme = new ComponentTheme("div", "vane-divider h-(--bw) w-full", {
13401
12856
  size: {
13402
12857
  py: new PyTheme(), // Uses layout spacing by default
13403
12858
  },
13404
12859
  appearance: {
13405
- background: AppearanceTheme.createTheme({
13406
- base: bgBorderAppearanceClasses,
13407
- }, 'bg'),
12860
+ // CSS-based approach: uses --border-color variable for divider background
12861
+ background: new SimpleConsumerTheme({ base: '[background:var(--border-color)]' }, 'bg'),
13408
12862
  },
13409
12863
  layout: defaultLayoutsThemes,
13410
12864
  }, themeDefaults.divider, DIVIDER_CATEGORIES);
13411
12865
 
12866
+ /**
12867
+ * Size theme - can operate in two modes:
12868
+ * 1. Default mode: outputs consumer class size-(--size), with CSS variable values set in vars.css
12869
+ * 2. Custom mode: outputs custom classes for each size (e.g., max-width classes)
12870
+ */
13412
12871
  class SizeTheme extends BaseTheme {
13413
12872
  constructor(sizeMap) {
13414
12873
  super();
@@ -13422,22 +12881,31 @@ class SizeTheme extends BaseTheme {
13422
12881
  this.lg = "";
13423
12882
  /** Extra-large size variant */
13424
12883
  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
- });
12884
+ /** Consumer class for size (used in default mode) */
12885
+ this.size = "size-(--size)";
12886
+ this.useCustomClasses = !!sizeMap;
12887
+ if (sizeMap) {
12888
+ ComponentKeys.size.forEach((key) => {
12889
+ var _a;
12890
+ this[key] = (_a = sizeMap[key]) !== null && _a !== void 0 ? _a : "";
12891
+ });
12892
+ }
13429
12893
  }
13430
12894
  getClasses(extractedKeys) {
13431
12895
  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]] : [''];
12896
+ if (this.useCustomClasses) {
12897
+ const size = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md';
12898
+ return this[size] ? [this[size]] : [];
12899
+ }
12900
+ // Default: use CSS variable consumer class
12901
+ return [this.size];
13434
12902
  }
13435
12903
  }
13436
12904
 
13437
- const defaultContainerTheme = new ComponentTheme("div", "mx-auto w-full", {
12905
+ const defaultContainerTheme = new ComponentTheme("div", "vane-container mx-auto w-full", {
13438
12906
  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' }),
12907
+ gap: new GapTheme(),
12908
+ 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
12909
  },
13442
12910
  layout: {
13443
12911
  ...defaultLayoutsThemes,
@@ -13445,20 +12913,20 @@ const defaultContainerTheme = new ComponentTheme("div", "mx-auto w-full", {
13445
12913
  ring: new RingTheme(),
13446
12914
  wrap: new WrapTheme(),
13447
12915
  direction: new DirectionTheme(),
13448
- radius: RadiusTheme.createLayoutTheme(),
12916
+ radius: new RadiusTheme(),
13449
12917
  },
13450
12918
  appearance: {
13451
- background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
13452
- text: GenericVariantTheme.createUIElementTextThemeIgnoreTransparent(),
13453
- border: GenericVariantTheme.createUIElementBorderTheme(),
13454
- ring: GenericVariantTheme.createUIElementRingTheme(),
13455
- shadow: GenericVariantTheme.createLayoutShadowTheme(),
12919
+ background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
12920
+ text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
12921
+ border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
12922
+ ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
12923
+ shadow: ShadowAppearanceTheme.createLayoutTheme(),
13456
12924
  }
13457
12925
  }, themeDefaults.container, CONTAINER_CATEGORIES);
13458
12926
 
13459
- const defaultColTheme = new ComponentTheme("div", "", {
12927
+ const defaultColTheme = new ComponentTheme("div", "vane-col", {
13460
12928
  size: {
13461
- gap: GapTheme.createForLayout(),
12929
+ gap: new GapTheme(),
13462
12930
  },
13463
12931
  layout: {
13464
12932
  ...defaultLayoutsThemes,
@@ -13466,28 +12934,22 @@ const defaultColTheme = new ComponentTheme("div", "", {
13466
12934
  direction: new DirectionTheme(),
13467
12935
  border: new BorderTheme(),
13468
12936
  ring: new RingTheme(),
13469
- radius: RadiusTheme.createLayoutTheme(),
12937
+ radius: new RadiusTheme(),
13470
12938
  },
13471
12939
  appearance: {
13472
- background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
13473
- text: GenericVariantTheme.createUIElementTextThemeIgnoreTransparent(),
13474
- border: GenericVariantTheme.createUIElementBorderTheme(),
13475
- ring: GenericVariantTheme.createUIElementRingTheme(),
13476
- shadow: GenericVariantTheme.createLayoutShadowTheme(),
12940
+ background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
12941
+ text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
12942
+ border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
12943
+ ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
12944
+ shadow: ShadowAppearanceTheme.createLayoutTheme(),
13477
12945
  }
13478
12946
  }, themeDefaults.col, COL_CATEGORIES);
13479
12947
 
13480
- const defaultStackTheme = new ComponentTheme("div", "", {
12948
+ const defaultStackTheme = new ComponentTheme("div", "vane-stack", {
13481
12949
  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
- }),
12950
+ px: new PxTheme(),
13489
12951
  py: new PyTheme(),
13490
- gap: GapTheme.createForLayout(),
12952
+ gap: new GapTheme(),
13491
12953
  breakpoint: new BreakpointTheme(),
13492
12954
  },
13493
12955
  layout: {
@@ -13496,47 +12958,29 @@ const defaultStackTheme = new ComponentTheme("div", "", {
13496
12958
  direction: new DirectionTheme(),
13497
12959
  border: new BorderTheme(),
13498
12960
  ring: new RingTheme(),
13499
- radius: RadiusTheme.createLayoutTheme(),
12961
+ radius: new RadiusTheme(),
13500
12962
  },
13501
12963
  appearance: {
13502
- background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
13503
- text: GenericVariantTheme.createUIElementTextThemeIgnoreTransparent(),
13504
- border: GenericVariantTheme.createUIElementBorderTheme(),
13505
- ring: GenericVariantTheme.createUIElementRingTheme(),
13506
- shadow: GenericVariantTheme.createLayoutShadowTheme(),
12964
+ background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
12965
+ text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
12966
+ border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
12967
+ ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
12968
+ shadow: ShadowAppearanceTheme.createLayoutTheme(),
13507
12969
  }
13508
12970
  }, themeDefaults.stack, STACK_CATEGORIES);
13509
12971
 
13510
- const defaultSectionTheme = new ComponentTheme("div", "w-full", {
12972
+ const defaultSectionTheme = new ComponentTheme("div", "vane-section w-full", {
13511
12973
  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
- }),
12974
+ px: new PxTheme(),
12975
+ py: new PyTheme(),
12976
+ gap: new GapTheme(),
13533
12977
  breakpoint: new BreakpointTheme(),
13534
12978
  },
13535
12979
  appearance: {
13536
- background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
13537
- text: GenericVariantTheme.createUIElementTextThemeIgnoreTransparent(),
13538
- border: GenericVariantTheme.createUIElementBorderTheme(),
13539
- ring: GenericVariantTheme.createUIElementRingTheme(),
12980
+ background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
12981
+ text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
12982
+ border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
12983
+ ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
13540
12984
  shadow: ShadowAppearanceTheme.createLayoutTheme(),
13541
12985
  },
13542
12986
  layout: {
@@ -13545,40 +12989,37 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full", {
13545
12989
  direction: new DirectionTheme(),
13546
12990
  border: new BorderTheme(),
13547
12991
  ring: new RingTheme(),
13548
- radius: RadiusTheme.createLayoutTheme(),
12992
+ radius: new RadiusTheme(),
13549
12993
  },
13550
12994
  }, themeDefaults.section, SECTION_CATEGORIES);
13551
12995
 
13552
12996
  const gridSubThemes = {
13553
12997
  size: {
13554
- gap: GapTheme.createForLayout(),
12998
+ gap: new GapTheme(),
13555
12999
  },
13556
13000
  appearance: {
13557
- background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
13558
- text: GenericVariantTheme.createUIElementTextThemeIgnoreTransparent(),
13001
+ background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
13002
+ text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
13003
+ border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
13559
13004
  },
13560
13005
  layout: {
13561
13006
  ...defaultLayoutsThemes,
13562
13007
  wrap: new WrapTheme(),
13563
13008
  flexDirection: new DirectionTheme(),
13009
+ radius: new RadiusTheme(),
13010
+ border: new BorderTheme(),
13564
13011
  },
13565
13012
  };
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);
13013
+ const defaultGrid2Theme = new ComponentTheme("div", "vane-grid vane-grid-2 grid-cols-1 md:grid-cols-2", gridSubThemes, themeDefaults.grid2, GRID_CATEGORIES);
13014
+ const defaultGrid3Theme = new ComponentTheme("div", "vane-grid vane-grid-3 grid-cols-1 md:grid-cols-3", gridSubThemes, themeDefaults.grid3, GRID_CATEGORIES);
13015
+ const defaultGrid4Theme = new ComponentTheme("div", "vane-grid vane-grid-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-4", gridSubThemes, themeDefaults.grid4, GRID_CATEGORIES);
13016
+ 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);
13017
+ 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
13018
 
13572
13019
  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)", {
13020
+ const defaultCheckboxTheme = new ComponentTheme("input", "vane-checkbox peer col-start-1 row-start-1 cursor-pointer appearance-none ring-transparent size-(--size)", {
13574
13021
  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
- }),
13022
+ size: new SizeTheme(),
13582
13023
  text: new FontSizeTheme()
13583
13024
  },
13584
13025
  layout: {
@@ -13586,29 +13027,23 @@ const defaultCheckboxTheme = new ComponentTheme("input", "peer col-start-1 row-s
13586
13027
  border: new BorderTheme(),
13587
13028
  ring: new RingTheme(),
13588
13029
  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),
13030
+ radius: new RadiusTheme(),
13596
13031
  },
13597
13032
  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(),
13033
+ accent: new SimpleConsumerTheme({ base: accentConsumerClass }, 'accent'),
13034
+ border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
13035
+ background: new SimpleConsumerTheme({ base: 'bg-white' }, 'bg'),
13036
+ ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
13037
+ focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
13038
+ check: new SimpleConsumerTheme({ base: checkedBgConsumerClass }, 'bg'),
13039
+ shadow: ShadowAppearanceTheme.createUITheme(),
13605
13040
  }
13606
13041
  }, ((_a = themeDefaults.checkbox) === null || _a === void 0 ? void 0 : _a.input) || {}, CHECKBOX_CATEGORIES);
13607
13042
  const defaultCheckTheme = new ComponentTheme("span", "invisible col-start-1 row-start-1 peer-checked:visible", {
13608
13043
  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
13044
  appearance: {
13610
- color: GenericVariantTheme.createUIElementTextThemeIgnoreTransparent(),
13611
- focusVisible: GenericVariantTheme.createUIElementFocusVisibleTheme()
13045
+ color: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
13046
+ focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible')
13612
13047
  },
13613
13048
  layout: {
13614
13049
  ...defaultLayoutsThemes,
@@ -13623,26 +13058,26 @@ const defaultCheckboxWrapperTheme = new ComponentTheme("span", "", {
13623
13058
  md: 'h-[calc(var(--lh)*var(--fs))]',
13624
13059
  lg: 'h-[calc(var(--lh)*var(--fs))]',
13625
13060
  xl: 'h-[calc(var(--lh)*var(--fs))]'
13626
- })
13061
+ }) // Uses custom mode for calculated height
13627
13062
  },
13628
13063
  layout: {
13629
13064
  ...defaultLayoutsThemes,
13630
13065
  focusVisible: new FocusVisibleTheme()
13631
13066
  },
13632
13067
  appearance: {
13633
- variant: GenericVariantTheme.createSimpleUIElementBgAppearanceTheme(),
13634
- focusVisible: GenericVariantTheme.createUIElementFocusVisibleTheme()
13068
+ variant: new SimpleConsumerTheme({ base: '' }, 'bg'),
13069
+ focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible')
13635
13070
  }
13636
13071
  }, ((_c = themeDefaults.checkbox) === null || _c === void 0 ? void 0 : _c.wrapper) || {}, CHECKBOX_CATEGORIES);
13637
13072
 
13638
- const defaultLabelTheme = new ComponentTheme("label", "has-[input]:cursor-pointer cursor-default", {
13073
+ const defaultLabelTheme = new ComponentTheme("label", "vane-label has-[input]:cursor-pointer cursor-default", {
13639
13074
  size: {
13640
13075
  text: new FontSizeTheme(),
13641
- lineHeight: LineHeightTheme.createDefault(),
13642
- gap: GapTheme.createForUI(),
13076
+ lineHeight: new LineHeightTheme(),
13077
+ gap: new GapTheme(),
13643
13078
  },
13644
13079
  appearance: {
13645
- text: GenericVariantTheme.createTypographyTextTheme(),
13080
+ text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
13646
13081
  },
13647
13082
  typography: defaultTypographyThemes,
13648
13083
  layout: {
@@ -13652,52 +13087,46 @@ const defaultLabelTheme = new ComponentTheme("label", "has-[input]:cursor-pointe
13652
13087
  },
13653
13088
  }, themeDefaults.label, LABEL_CATEGORIES);
13654
13089
 
13655
- const defaultImgTheme = new ComponentTheme("img", "object-cover", // Default to cover for better image display
13090
+ const defaultImgTheme = new ComponentTheme("img", "vane-img object-cover", // Default to cover for better image display
13656
13091
  {
13657
13092
  layout: {
13658
13093
  ...defaultLayoutsThemes,
13659
13094
  border: new BorderTheme(),
13660
13095
  ring: new RingTheme(),
13661
13096
  focusVisible: new FocusVisibleTheme(),
13662
- radius: RadiusTheme.createLayoutTheme(),
13097
+ radius: new RadiusTheme(),
13663
13098
  },
13664
13099
  appearance: {
13665
- background: GenericVariantTheme.createSimpleUIElementBgAppearanceTheme(),
13666
- border: GenericVariantTheme.createUIElementBorderTheme(),
13667
- ring: GenericVariantTheme.createUIElementRingTheme(),
13668
- focusVisible: GenericVariantTheme.createUIElementFocusVisibleTheme(),
13669
- shadow: GenericVariantTheme.createLayoutShadowTheme()
13100
+ background: new SimpleConsumerTheme({ base: bgConsumerClasses.base }, 'bg'),
13101
+ border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
13102
+ ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
13103
+ focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
13104
+ shadow: ShadowAppearanceTheme.createLayoutTheme()
13670
13105
  }
13671
13106
  }, themeDefaults.img, IMG_CATEGORIES);
13672
13107
 
13673
- const defaultInputTheme = new ComponentTheme("input", "w-full transition-all duration-200", {
13108
+ const defaultInputTheme = new ComponentTheme("input", "vane-input w-full transition-all duration-200", {
13674
13109
  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(),
13110
+ px: new PxTheme(),
13111
+ py: new PyTheme(),
13112
+ gap: new GapTheme(),
13684
13113
  text: new FontSizeTheme(),
13685
- lineHeight: LineHeightTheme.createDefault(),
13114
+ lineHeight: new LineHeightTheme(),
13686
13115
  },
13687
13116
  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()
13117
+ background: new SimpleConsumerTheme({ base: bgConsumerClasses.base, hover: bgConsumerClasses.hover }, 'bg'),
13118
+ text: new SimpleConsumerTheme({ base: textConsumerClass }, 'text'),
13119
+ border: new SimpleConsumerTheme({ base: borderConsumerClass }, 'border'),
13120
+ ring: new SimpleConsumerTheme({ base: ringConsumerClass }, 'ring'),
13121
+ focusVisible: new SimpleConsumerTheme({ base: focusVisibleConsumerClass }, 'focusVisible'),
13122
+ shadow: ShadowAppearanceTheme.createUITheme()
13694
13123
  },
13695
13124
  layout: {
13696
13125
  ...defaultLayoutsThemes,
13697
13126
  border: new BorderTheme(),
13698
13127
  ring: new RingTheme(),
13699
13128
  focusVisible: new FocusVisibleTheme(),
13700
- radius: RadiusTheme.createUITheme(),
13129
+ radius: new RadiusTheme(),
13701
13130
  wrap: new WrapTheme(),
13702
13131
  flexDirection: new DirectionTheme(),
13703
13132
  },