@vaneui/ui 0.3.0-alpha.20250914103012.c204dad → 0.3.1-alpha.20250914202143.38eda80

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.
Files changed (34) hide show
  1. package/dist/components/ui/card.d.ts +6 -0
  2. package/dist/components/ui/card.d.ts.map +1 -1
  3. package/dist/components/ui/checkbox.d.ts +6 -0
  4. package/dist/components/ui/checkbox.d.ts.map +1 -1
  5. package/dist/components/ui/code.d.ts +6 -0
  6. package/dist/components/ui/code.d.ts.map +1 -1
  7. package/dist/components/ui/col.d.ts +6 -0
  8. package/dist/components/ui/col.d.ts.map +1 -1
  9. package/dist/components/ui/container.d.ts +6 -0
  10. package/dist/components/ui/container.d.ts.map +1 -1
  11. package/dist/components/ui/img.d.ts +6 -0
  12. package/dist/components/ui/img.d.ts.map +1 -1
  13. package/dist/components/ui/input.d.ts +6 -0
  14. package/dist/components/ui/input.d.ts.map +1 -1
  15. package/dist/components/ui/props/border.d.ts +36 -2
  16. package/dist/components/ui/props/border.d.ts.map +1 -1
  17. package/dist/components/ui/props/keys.d.ts +7 -5
  18. package/dist/components/ui/props/keys.d.ts.map +1 -1
  19. package/dist/components/ui/row.d.ts +6 -0
  20. package/dist/components/ui/row.d.ts.map +1 -1
  21. package/dist/components/ui/section.d.ts +6 -0
  22. package/dist/components/ui/section.d.ts.map +1 -1
  23. package/dist/components/ui/stack.d.ts +6 -0
  24. package/dist/components/ui/stack.d.ts.map +1 -1
  25. package/dist/components/ui/theme/appearance/appearanceTheme.d.ts.map +1 -1
  26. package/dist/components/ui/theme/common/ComponentTheme.d.ts.map +1 -1
  27. package/dist/components/ui/theme/layout/borderTheme.d.ts +9 -7
  28. package/dist/components/ui/theme/layout/borderTheme.d.ts.map +1 -1
  29. package/dist/index.esm.js +78 -22
  30. package/dist/index.esm.js.map +1 -1
  31. package/dist/index.js +92 -21
  32. package/dist/index.js.map +1 -1
  33. package/dist/ui.css +24 -0
  34. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -35,11 +35,41 @@ const LINK = 'link';
35
35
  const APPEARANCE_VALUES = [DEFAULT, ACCENT, PRIMARY, SECONDARY, TERTIARY, SUCCESS, DANGER, WARNING, INFO, LINK];
36
36
 
37
37
  /** Show border - adds appearance-based border styling */
38
- const BORDER = 'border';
38
+ const BORDER$1 = 'border';
39
+ /** Show top border */
40
+ const BORDER_T = 'borderT';
41
+ /** Show bottom border */
42
+ const BORDER_B = 'borderB';
43
+ /** Show left border */
44
+ const BORDER_L = 'borderL';
45
+ /** Show right border */
46
+ const BORDER_R = 'borderR';
47
+ /** Show horizontal borders (left and right) */
48
+ const BORDER_X = 'borderX';
49
+ /** Show vertical borders (top and bottom) */
50
+ const BORDER_Y = 'borderY';
39
51
  /** Hide border - removes border styling (overrides appearance colors) */
40
52
  const NO_BORDER = 'noBorder';
41
- /** All border property values */
42
- const BORDER_VALUES = [BORDER, NO_BORDER];
53
+ /** All border property values - includes all border variations and noBorder */
54
+ const BORDER_VALUES = [BORDER$1, BORDER_T, BORDER_B, BORDER_L, BORDER_R, BORDER_X, BORDER_Y, NO_BORDER];
55
+ /** All borderT property values */
56
+ const BORDER_T_VALUES = [BORDER_T];
57
+ /** All borderB property values */
58
+ const BORDER_B_VALUES = [BORDER_B];
59
+ /** All borderL property values */
60
+ const BORDER_L_VALUES = [BORDER_L];
61
+ /** All borderR property values */
62
+ const BORDER_R_VALUES = [BORDER_R];
63
+ /** All borderX property values */
64
+ const BORDER_X_VALUES = [BORDER_X];
65
+ /** All borderY property values */
66
+ const BORDER_Y_VALUES = [BORDER_Y];
67
+ /** All noBorder property values */
68
+ const NO_BORDER_VALUES = [NO_BORDER];
69
+ /** All border side keys (excluding noBorder since it doesn't have a CSS class) */
70
+ const BORDER_KEYS = [BORDER$1, BORDER_T, BORDER_B, BORDER_L, BORDER_R, BORDER_X, BORDER_Y];
71
+ /** All border keys including noBorder for category purposes */
72
+ const ALL_BORDER_KEYS = [...BORDER_KEYS, NO_BORDER];
43
73
 
44
74
  /** Extra-small column breakpoint - responsive grid column sizing for xs screens */
45
75
  const XS_COL = 'xsCol';
@@ -374,10 +404,12 @@ const PADDING = ['padding'];
374
404
  const BREAKPOINT = ['breakpoint'];
375
405
  /** Core visual properties including appearance colors and transparency */
376
406
  const VISUAL_CORE = ['appearance', 'transparent'];
377
- /** Visual decoration properties for borders, shadows, and focus rings */
378
- const VISUAL_DECORATION = ['border', 'shadow', 'ring', 'focusVisible'];
407
+ /** Border properties for visual decoration */
408
+ const BORDER = ['border'];
409
+ /** Visual decoration properties for shadows and focus rings */
410
+ const VISUAL_DECORATION = ['shadow', 'ring', 'focusVisible'];
379
411
  /** Layout-specific visual decoration (excluding focusVisible for non-interactive elements) */
380
- const VISUAL_DECORATION_LAYOUT = ['border', 'shadow', 'ring'];
412
+ const VISUAL_DECORATION_LAYOUT = ['shadow', 'ring'];
381
413
  /** Shape properties for border radius and corner rounding */
382
414
  const SHAPE = ['shape'];
383
415
  /** Typography styling properties for text appearance and formatting */
@@ -395,6 +427,7 @@ const COMPONENT_PROPS_CATEGORY = [
395
427
  ...LAYOUT_CORE,
396
428
  ...BREAKPOINT,
397
429
  ...PADDING,
430
+ ...BORDER,
398
431
  ...VISUAL_DECORATION,
399
432
  ...SHAPE,
400
433
  ...VARIANT,
@@ -408,7 +441,7 @@ const APPEARANCE_CATEGORY = ['text', 'border', 'ring', 'shadow', 'bg', 'accent',
408
441
  const ComponentKeys = {
409
442
  /** Color appearance options */
410
443
  appearance: APPEARANCE_VALUES,
411
- /** Border visibility: border (show) or noBorder (hide) */
444
+ /** Border visibility: includes all border variations and noBorder (border, borderT, borderB, etc., noBorder) */
412
445
  border: BORDER_VALUES,
413
446
  /** Column breakpoints for responsive grid layouts */
414
447
  breakpoint: BREAKPOINT_VALUES,
@@ -467,9 +500,9 @@ const ComponentKeys = {
467
500
  /** Complete layout category including core and flex properties */
468
501
  const LAYOUT_FULL = [...LAYOUT_CORE, ...LAYOUT_FLEX];
469
502
  /** Complete visual category including core, decoration, and shape properties */
470
- const VISUAL_FULL = [...VISUAL_CORE, ...VISUAL_DECORATION, ...SHAPE];
503
+ const VISUAL_FULL = [...VISUAL_CORE, ...BORDER, ...VISUAL_DECORATION, ...SHAPE];
471
504
  /** Layout-specific visual category (excludes focusVisible for non-interactive elements) */
472
- const VISUAL_LAYOUT = [...VISUAL_CORE, ...VISUAL_DECORATION_LAYOUT, ...SHAPE];
505
+ const VISUAL_LAYOUT = [...VISUAL_CORE, ...BORDER, ...VISUAL_DECORATION_LAYOUT, ...SHAPE];
473
506
  /** Complete typography category for text styling */
474
507
  const TYPOGRAPHY_FULL = [...TYPOGRAPHY_STYLE];
475
508
  /** Categories for interactive components like buttons, badges, chips */
@@ -506,14 +539,14 @@ const DIVIDER_CATEGORIES = [...LAYOUT_CORE, ...VISUAL_CORE, ...PADDING];
506
539
  const SECTION_CATEGORIES = [...LAYOUT_FULL, ...VISUAL_LAYOUT, ...PADDING, ...BREAKPOINT, ...VARIANT];
507
540
  /** Form component categories */
508
541
  /** Categories for checkbox form components */
509
- const CHECKBOX_CATEGORIES = [...LAYOUT_CORE, ...VISUAL_CORE, ...VISUAL_DECORATION, ...SHAPE, ...VARIANT];
542
+ const CHECKBOX_CATEGORIES = [...LAYOUT_CORE, ...VISUAL_CORE, ...BORDER, ...VISUAL_DECORATION, ...SHAPE, ...VARIANT];
510
543
  /** Categories for label form components with typography support */
511
544
  const LABEL_CATEGORIES = [...TYPOGRAPHY_FULL, ...LAYOUT_FULL, ...VISUAL_CORE, ...VARIANT];
512
545
  /** Categories for input form components with interactive and form-specific properties */
513
546
  const INPUT_CATEGORIES = [...INTERACTIVE_CATEGORIES];
514
547
  /** Media component categories */
515
548
  /** Categories for image media components */
516
- const IMG_CATEGORIES = [...LAYOUT_CORE, ...VISUAL_CORE, ...VISUAL_DECORATION, ...SHAPE, ...VARIANT];
549
+ const IMG_CATEGORIES = [...LAYOUT_CORE, ...VISUAL_CORE, ...BORDER, ...VISUAL_DECORATION, ...SHAPE, ...VARIANT];
517
550
  /** All available component names in the library */
518
551
  const COMPONENT = ['button', 'badge', 'chip', 'code', 'card', 'divider', 'container', 'row', 'col', 'stack', 'section',
519
552
  'grid2', 'grid3', 'grid4', 'grid5', 'grid6', 'pageTitle', 'sectionTitle', 'title', 'text', 'link', 'list', 'listItem', 'checkbox', 'label', 'img', 'input'];
@@ -3506,6 +3539,9 @@ class ComponentTheme {
3506
3539
  extractedKeys[category] = key;
3507
3540
  }
3508
3541
  }
3542
+ // No need for border/noBorder mutual exclusion logic anymore
3543
+ // since noBorder is now part of the border category and
3544
+ // pickFirstTruthyKeyByCategory handles the priority naturally
3509
3545
  const walk = (map) => {
3510
3546
  for (const key of Object.keys(map)) {
3511
3547
  const node = map[key];
@@ -3655,16 +3691,27 @@ class RadiusTheme extends BaseTheme {
3655
3691
  class BorderTheme extends BaseTheme {
3656
3692
  constructor() {
3657
3693
  super(...arguments);
3658
- this.base = "border";
3659
- this.hover = "";
3660
- this.active = "";
3661
- this.focus = "";
3662
- this.focusVisible = "";
3694
+ this.border = "border";
3695
+ this.borderT = "border-t";
3696
+ this.borderB = "border-b";
3697
+ this.borderL = "border-l";
3698
+ this.borderR = "border-r";
3699
+ this.borderX = "border-x";
3700
+ this.borderY = "border-y";
3663
3701
  }
3664
3702
  getClasses(extractedKeys) {
3665
- return (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.border) === "border"
3666
- ? ModeKeys.mode.map((mode) => this[mode])
3667
- : [];
3703
+ const classes = [];
3704
+ // Now all border variations and noBorder come through the 'border' category
3705
+ const borderValue = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.border;
3706
+ // If noBorder is selected, don't apply any border classes
3707
+ if (borderValue === "noBorder") {
3708
+ return [];
3709
+ }
3710
+ // Check if the border value matches any of our border keys (BORDER_KEYS excludes noBorder)
3711
+ if (borderValue && BORDER_KEYS.includes(borderValue)) {
3712
+ classes.push(this[borderValue]);
3713
+ }
3714
+ return classes;
3668
3715
  }
3669
3716
  }
3670
3717
 
@@ -3764,8 +3811,17 @@ class AppearanceTheme extends BaseTheme {
3764
3811
  }
3765
3812
  getClasses(extractedKeys) {
3766
3813
  var _a;
3767
- if (this.category === 'border' && (extractedKeys.border === 'noBorder' || extractedKeys.border === undefined)) {
3768
- return [];
3814
+ if (this.category === 'border') {
3815
+ // If noBorder is selected from the border category, don't apply appearance colors
3816
+ if (extractedKeys.border === NO_BORDER) {
3817
+ return [];
3818
+ }
3819
+ // Only apply appearance colors if any border prop is set (and not noBorder)
3820
+ const hasBorderProps = extractedKeys.border !== undefined && extractedKeys.border !== NO_BORDER;
3821
+ // If no border props are set, don't apply appearance colors
3822
+ if (!hasBorderProps) {
3823
+ return [];
3824
+ }
3769
3825
  }
3770
3826
  if (this.category === 'ring' && (extractedKeys.ring === 'noRing' || extractedKeys.ring === undefined)) {
3771
3827
  return [];
@@ -5522,6 +5578,7 @@ const List = react.forwardRef(function List(props, ref) {
5522
5578
  exports.ABSOLUTE = ABSOLUTE;
5523
5579
  exports.ACCENT = ACCENT;
5524
5580
  exports.ACTIVE = ACTIVE;
5581
+ exports.ALL_BORDER_KEYS = ALL_BORDER_KEYS;
5525
5582
  exports.APPEARANCE_CATEGORY = APPEARANCE_CATEGORY;
5526
5583
  exports.APPEARANCE_VALUES = APPEARANCE_VALUES;
5527
5584
  exports.BADGE_CATEGORIES = BADGE_CATEGORIES;
@@ -5530,7 +5587,20 @@ exports.BLACK = BLACK;
5530
5587
  exports.BLOCK = BLOCK;
5531
5588
  exports.BOLD = BOLD;
5532
5589
  exports.BORDER = BORDER;
5590
+ exports.BORDER_B = BORDER_B;
5591
+ exports.BORDER_B_VALUES = BORDER_B_VALUES;
5592
+ exports.BORDER_KEYS = BORDER_KEYS;
5593
+ exports.BORDER_L = BORDER_L;
5594
+ exports.BORDER_L_VALUES = BORDER_L_VALUES;
5595
+ exports.BORDER_R = BORDER_R;
5596
+ exports.BORDER_R_VALUES = BORDER_R_VALUES;
5597
+ exports.BORDER_T = BORDER_T;
5598
+ exports.BORDER_T_VALUES = BORDER_T_VALUES;
5533
5599
  exports.BORDER_VALUES = BORDER_VALUES;
5600
+ exports.BORDER_X = BORDER_X;
5601
+ exports.BORDER_X_VALUES = BORDER_X_VALUES;
5602
+ exports.BORDER_Y = BORDER_Y;
5603
+ exports.BORDER_Y_VALUES = BORDER_Y_VALUES;
5534
5604
  exports.BREAKPOINT = BREAKPOINT;
5535
5605
  exports.BREAKPOINT_VALUES = BREAKPOINT_VALUES;
5536
5606
  exports.BUTTON_CATEGORIES = BUTTON_CATEGORIES;
@@ -5646,6 +5716,7 @@ exports.NORMAL = NORMAL;
5646
5716
  exports.NORMAL_CASE = NORMAL_CASE;
5647
5717
  exports.NOT_ITALIC = NOT_ITALIC;
5648
5718
  exports.NO_BORDER = NO_BORDER;
5719
+ exports.NO_BORDER_VALUES = NO_BORDER_VALUES;
5649
5720
  exports.NO_FOCUS_VISIBLE_OUTLINE = NO_FOCUS_VISIBLE_OUTLINE;
5650
5721
  exports.NO_GAP = NO_GAP;
5651
5722
  exports.NO_PADDING = NO_PADDING;