@vaneui/ui 0.2.1-alpha.20250830140007.8b4cce3 → 0.2.1-alpha.20250901145552.64cbaea

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.
@@ -6,6 +6,7 @@ export declare const backgroundAppearanceClasses: Record<AppearanceKey | Transpa
6
6
  export declare const hoverBackgroundAppearanceClasses: Record<AppearanceKey | TransparentKey | LinkKey, string>;
7
7
  export declare const activeBackgroundAppearanceClasses: Record<AppearanceKey | TransparentKey | LinkKey, string>;
8
8
  export declare const layoutBackgroundAppearanceClasses: Record<AppearanceKey | TransparentKey | LinkKey, string>;
9
+ export declare const layoutFilledBackgroundAppearanceClasses: Record<AppearanceKey | TransparentKey | LinkKey, string>;
9
10
  export declare const bgBorderAppearanceClasses: Record<AppearanceKey | TransparentKey | LinkKey, string>;
10
11
  export declare const borderAppearanceClasses: Record<AppearanceKey | TransparentKey | LinkKey, string>;
11
12
  export declare const filledBorderAppearanceClasses: Record<AppearanceKey | TransparentKey | LinkKey, string>;
@@ -8,5 +8,4 @@ export declare class AppearanceTheme extends BaseTheme {
8
8
  private constructor();
9
9
  getClasses(extractedKeys: CategoryProps): string[];
10
10
  static createTheme(src?: Partial<Record<ModeKey, Partial<Record<AppearanceKey, string>>>>): AppearanceTheme;
11
- static createLayoutBgTheme(): AppearanceTheme;
12
11
  }
@@ -21,4 +21,5 @@ export declare class GenericVariantTheme<T extends BaseTheme> extends BaseTheme
21
21
  static createSimpleUIElementBgAppearanceTheme(): GenericVariantTheme<AppearanceTheme>;
22
22
  static createAccentColorAppearanceTheme(): GenericVariantTheme<AppearanceTheme>;
23
23
  static createCheckedAppearanceTheme(): GenericVariantTheme<AppearanceTheme>;
24
+ static createLayoutBgAppearanceTheme(): GenericVariantTheme<AppearanceTheme>;
24
25
  }
package/dist/index.esm.js CHANGED
@@ -3420,6 +3420,78 @@ class PyTheme extends PaddingTheme {
3420
3420
  }
3421
3421
  }
3422
3422
 
3423
+ class AppearanceTheme extends BaseTheme {
3424
+ constructor(config, transparentClasses) {
3425
+ super();
3426
+ Object.assign(this, config);
3427
+ this.transparentClasses = transparentClasses;
3428
+ }
3429
+ getClasses(extractedKeys) {
3430
+ var _a;
3431
+ // Check for specific transparent styles first
3432
+ if (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.transparent) {
3433
+ const transparentClass = ((_a = this.transparentClasses) === null || _a === void 0 ? void 0 : _a[extractedKeys.transparent]) || '';
3434
+ return [transparentClass];
3435
+ }
3436
+ // Use appearance (now includes link as an appearance option)
3437
+ const pickedAppearanceKey = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.appearance;
3438
+ if (pickedAppearanceKey) {
3439
+ const modes = this[pickedAppearanceKey];
3440
+ if (modes) {
3441
+ return ComponentKeys.mode.map(mode => modes[mode] || '');
3442
+ }
3443
+ }
3444
+ return [];
3445
+ }
3446
+ static createTheme(src = {}) {
3447
+ const config = Object.fromEntries(ComponentKeys.appearance.map(textKey => [
3448
+ textKey,
3449
+ Object.fromEntries(ComponentKeys.mode.map(modeKey => {
3450
+ var _a;
3451
+ return [
3452
+ modeKey,
3453
+ ((_a = src[modeKey]) === null || _a === void 0 ? void 0 : _a[textKey]) || ''
3454
+ ];
3455
+ })),
3456
+ ]));
3457
+ return new AppearanceTheme(config, src.base);
3458
+ }
3459
+ }
3460
+
3461
+ const filledTextAppearanceClasses = {
3462
+ default: "text-(--filled-text-color-default)",
3463
+ primary: "text-(--filled-text-color-primary)",
3464
+ secondary: "text-(--filled-text-color-secondary)",
3465
+ tertiary: "text-(--filled-text-color-tertiary)",
3466
+ link: "text-(--filled-text-color-link)",
3467
+ accent: "text-(--filled-text-color-accent)",
3468
+ success: "text-(--filled-text-color-success)",
3469
+ danger: "text-(--filled-text-color-danger)",
3470
+ warning: "text-(--filled-text-color-warning)",
3471
+ info: "text-(--filled-text-color-info)",
3472
+ transparent: "text-(--filled-text-color-transparent)",
3473
+ };
3474
+ const textAppearanceClasses = {
3475
+ default: "text-(--text-color-default)",
3476
+ primary: "text-(--text-color-primary)",
3477
+ secondary: "text-(--text-color-secondary)",
3478
+ tertiary: "text-(--text-color-tertiary)",
3479
+ link: "text-(--text-color-link)",
3480
+ accent: "text-(--text-color-accent)",
3481
+ success: "text-(--text-color-success)",
3482
+ danger: "text-(--text-color-danger)",
3483
+ warning: "text-(--text-color-warning)",
3484
+ info: "text-(--text-color-info)",
3485
+ transparent: "text-transparent",
3486
+ };
3487
+ const textSizeClasses = {
3488
+ xs: "text-xs",
3489
+ sm: "text-sm",
3490
+ md: "text-base",
3491
+ lg: "text-lg",
3492
+ xl: "text-xl",
3493
+ };
3494
+
3423
3495
  const filledBackgroundAppearanceClasses = {
3424
3496
  default: "bg-(--filled-background-color-default)",
3425
3497
  primary: "bg-(--filled-background-color-primary)",
@@ -3511,6 +3583,19 @@ const layoutBackgroundAppearanceClasses = {
3511
3583
  transparent: "bg-transparent",
3512
3584
  link: "bg-(--layout-background-link)",
3513
3585
  };
3586
+ const layoutFilledBackgroundAppearanceClasses = {
3587
+ default: "bg-(--layout-filled-background-color-default)",
3588
+ primary: "bg-(--layout-filled-background-color-primary)",
3589
+ secondary: "bg-(--layout-filled-background-color-secondary)",
3590
+ tertiary: "bg-(--layout-filled-background-color-tertiary)",
3591
+ accent: "bg-(--layout-filled-background-color-accent)",
3592
+ success: "bg-(--layout-filled-background-color-success)",
3593
+ danger: "bg-(--layout-filled-background-color-danger)",
3594
+ warning: "bg-(--layout-filled-background-color-warning)",
3595
+ info: "bg-(--layout-filled-background-color-info)",
3596
+ transparent: "bg-transparent",
3597
+ link: "bg-(--layout-filled-background-color-link)",
3598
+ };
3514
3599
  const bgBorderAppearanceClasses = {
3515
3600
  default: "bg-(--border-color-default)",
3516
3601
  primary: "bg-(--border-color-primary)",
@@ -3629,90 +3714,6 @@ const filledCheckedBackgroundAppearanceClasses = {
3629
3714
  link: "checked:bg-(--filled-background-color-link)",
3630
3715
  };
3631
3716
 
3632
- class AppearanceTheme extends BaseTheme {
3633
- constructor(config, transparentClasses) {
3634
- super();
3635
- Object.assign(this, config);
3636
- this.transparentClasses = transparentClasses;
3637
- }
3638
- getClasses(extractedKeys) {
3639
- var _a;
3640
- // Check for specific transparent styles first
3641
- if (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.transparent) {
3642
- const transparentClass = ((_a = this.transparentClasses) === null || _a === void 0 ? void 0 : _a[extractedKeys.transparent]) || '';
3643
- return [transparentClass];
3644
- }
3645
- // Use appearance (now includes link as an appearance option)
3646
- const pickedAppearanceKey = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.appearance;
3647
- if (pickedAppearanceKey) {
3648
- const modes = this[pickedAppearanceKey];
3649
- if (modes) {
3650
- return ComponentKeys.mode.map(mode => modes[mode] || '');
3651
- }
3652
- }
3653
- return [];
3654
- }
3655
- static createTheme(src = {}) {
3656
- const config = Object.fromEntries(ComponentKeys.appearance.map(textKey => [
3657
- textKey,
3658
- Object.fromEntries(ComponentKeys.mode.map(modeKey => {
3659
- var _a;
3660
- return [
3661
- modeKey,
3662
- ((_a = src[modeKey]) === null || _a === void 0 ? void 0 : _a[textKey]) || ''
3663
- ];
3664
- })),
3665
- ]));
3666
- return new AppearanceTheme(config, src.base);
3667
- }
3668
- static createLayoutBgTheme() {
3669
- // Creates a theme for layout backgrounds, replacing BgAppearanceTheme
3670
- const config = Object.fromEntries(ComponentKeys.appearance.map(key => [
3671
- key,
3672
- {
3673
- base: layoutBackgroundAppearanceClasses[key] || '',
3674
- hover: '',
3675
- active: '',
3676
- }
3677
- ]));
3678
- return new AppearanceTheme(config, layoutBackgroundAppearanceClasses);
3679
- }
3680
- }
3681
-
3682
- const filledTextAppearanceClasses = {
3683
- default: "text-white",
3684
- primary: "text-white",
3685
- secondary: "text-white",
3686
- tertiary: "text-white",
3687
- link: "text-white",
3688
- accent: "text-white",
3689
- success: "text-white",
3690
- danger: "text-white",
3691
- warning: "text-white",
3692
- info: "text-white",
3693
- transparent: "text-transparent",
3694
- };
3695
- const textAppearanceClasses = {
3696
- default: "text-(--text-color-default)",
3697
- primary: "text-(--text-color-primary)",
3698
- secondary: "text-(--text-color-secondary)",
3699
- tertiary: "text-(--text-color-tertiary)",
3700
- link: "text-(--text-color-link)",
3701
- accent: "text-(--text-color-accent)",
3702
- success: "text-(--text-color-success)",
3703
- danger: "text-(--text-color-danger)",
3704
- warning: "text-(--text-color-warning)",
3705
- info: "text-(--text-color-info)",
3706
- transparent: "text-transparent",
3707
- };
3708
- const textSizeClasses = {
3709
- xs: "text-xs",
3710
- sm: "text-sm",
3711
- md: "text-base",
3712
- lg: "text-lg",
3713
- xl: "text-xl",
3714
- };
3715
-
3716
3717
  class ShadowAppearanceTheme extends BaseTheme {
3717
3718
  constructor(initial) {
3718
3719
  super();
@@ -3902,6 +3903,16 @@ class GenericVariantTheme extends BaseTheme {
3902
3903
  })
3903
3904
  });
3904
3905
  }
3906
+ static createLayoutBgAppearanceTheme() {
3907
+ return new GenericVariantTheme({
3908
+ outline: AppearanceTheme.createTheme({
3909
+ base: layoutBackgroundAppearanceClasses
3910
+ }),
3911
+ filled: AppearanceTheme.createTheme({
3912
+ base: layoutFilledBackgroundAppearanceClasses
3913
+ })
3914
+ });
3915
+ }
3905
3916
  }
3906
3917
 
3907
3918
  class WrapTheme extends BaseTheme {
@@ -4522,7 +4533,7 @@ const defaultCardTheme = new ComponentTheme("div", "", {
4522
4533
  shadow: ShadowAppearanceTheme.createLayoutTheme(),
4523
4534
  },
4524
4535
  appearance: {
4525
- background: GenericVariantTheme.createSimpleBgAppearanceTheme(),
4536
+ background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
4526
4537
  text: GenericVariantTheme.createUIElementTextTheme(),
4527
4538
  border: GenericVariantTheme.createUIElementBorderTheme(),
4528
4539
  ring: GenericVariantTheme.createUIElementRingTheme(),
@@ -4546,7 +4557,7 @@ const defaultRowTheme = new ComponentTheme("div", "", {
4546
4557
  radius: RadiusTheme.createLayoutTheme(),
4547
4558
  },
4548
4559
  appearance: {
4549
- background: GenericVariantTheme.createSimpleBgAppearanceTheme(),
4560
+ background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
4550
4561
  text: GenericVariantTheme.createUIElementTextTheme(),
4551
4562
  border: GenericVariantTheme.createUIElementBorderTheme(),
4552
4563
  ring: GenericVariantTheme.createUIElementRingTheme(),
@@ -4589,7 +4600,7 @@ const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full
4589
4600
  radius: RadiusTheme.createLayoutTheme(),
4590
4601
  },
4591
4602
  appearance: {
4592
- background: GenericVariantTheme.createSimpleBgAppearanceTheme(),
4603
+ background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
4593
4604
  text: GenericVariantTheme.createUIElementTextTheme(),
4594
4605
  border: GenericVariantTheme.createUIElementBorderTheme(),
4595
4606
  ring: GenericVariantTheme.createUIElementRingTheme(),
@@ -4612,7 +4623,7 @@ const defaultColTheme = new ComponentTheme("div", "", {
4612
4623
  radius: RadiusTheme.createLayoutTheme(),
4613
4624
  },
4614
4625
  appearance: {
4615
- background: GenericVariantTheme.createSimpleBgAppearanceTheme(),
4626
+ background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
4616
4627
  text: GenericVariantTheme.createUIElementTextTheme(),
4617
4628
  border: GenericVariantTheme.createUIElementBorderTheme(),
4618
4629
  ring: GenericVariantTheme.createUIElementRingTheme(),
@@ -4638,7 +4649,7 @@ const defaultStackTheme = new ComponentTheme("div", "", {
4638
4649
  radius: RadiusTheme.createLayoutTheme(),
4639
4650
  },
4640
4651
  appearance: {
4641
- background: GenericVariantTheme.createSimpleBgAppearanceTheme(),
4652
+ background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
4642
4653
  text: GenericVariantTheme.createUIElementTextTheme(),
4643
4654
  border: GenericVariantTheme.createUIElementBorderTheme(),
4644
4655
  ring: GenericVariantTheme.createUIElementRingTheme(),
@@ -4668,7 +4679,7 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full flex-col", {
4668
4679
  breakpoint: new BreakpointTheme(),
4669
4680
  },
4670
4681
  appearance: {
4671
- background: GenericVariantTheme.createSimpleBgAppearanceTheme(),
4682
+ background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
4672
4683
  text: GenericVariantTheme.createUIElementTextTheme(),
4673
4684
  border: GenericVariantTheme.createUIElementBorderTheme(),
4674
4685
  ring: GenericVariantTheme.createUIElementRingTheme(),
@@ -4697,7 +4708,7 @@ const gridSubThemes = {
4697
4708
  }),
4698
4709
  },
4699
4710
  appearance: {
4700
- background: GenericVariantTheme.createSimpleBgAppearanceTheme(),
4711
+ background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
4701
4712
  text: GenericVariantTheme.createUIElementTextTheme(),
4702
4713
  },
4703
4714
  layout: {