@vaneui/ui 0.3.1-alpha.20251001131502.03a0ce2 → 0.3.1-alpha.20251001144233.cfeb345

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 (47) hide show
  1. package/dist/components/ui/card.d.ts +8 -10
  2. package/dist/components/ui/card.d.ts.map +1 -1
  3. package/dist/components/ui/checkbox.d.ts +4 -5
  4. package/dist/components/ui/checkbox.d.ts.map +1 -1
  5. package/dist/components/ui/code.d.ts +4 -5
  6. package/dist/components/ui/code.d.ts.map +1 -1
  7. package/dist/components/ui/col.d.ts +4 -5
  8. package/dist/components/ui/col.d.ts.map +1 -1
  9. package/dist/components/ui/container.d.ts +4 -5
  10. package/dist/components/ui/container.d.ts.map +1 -1
  11. package/dist/components/ui/divider.d.ts +4 -5
  12. package/dist/components/ui/divider.d.ts.map +1 -1
  13. package/dist/components/ui/grid.d.ts +20 -25
  14. package/dist/components/ui/grid.d.ts.map +1 -1
  15. package/dist/components/ui/img.d.ts +4 -5
  16. package/dist/components/ui/img.d.ts.map +1 -1
  17. package/dist/components/ui/input.d.ts +4 -5
  18. package/dist/components/ui/input.d.ts.map +1 -1
  19. package/dist/components/ui/label.d.ts +4 -5
  20. package/dist/components/ui/label.d.ts.map +1 -1
  21. package/dist/components/ui/props/breakpoint.d.ts +9 -11
  22. package/dist/components/ui/props/breakpoint.d.ts.map +1 -1
  23. package/dist/components/ui/props/hide.d.ts +9 -11
  24. package/dist/components/ui/props/hide.d.ts.map +1 -1
  25. package/dist/components/ui/props/keys.d.ts +2 -2
  26. package/dist/components/ui/row.d.ts +8 -10
  27. package/dist/components/ui/row.d.ts.map +1 -1
  28. package/dist/components/ui/section.d.ts +8 -10
  29. package/dist/components/ui/section.d.ts.map +1 -1
  30. package/dist/components/ui/stack.d.ts +8 -10
  31. package/dist/components/ui/stack.d.ts.map +1 -1
  32. package/dist/components/ui/theme/cardTheme.d.ts.map +1 -1
  33. package/dist/components/ui/theme/defaults.d.ts.map +1 -1
  34. package/dist/components/ui/theme/layout/hideTheme.d.ts +8 -10
  35. package/dist/components/ui/theme/layout/hideTheme.d.ts.map +1 -1
  36. package/dist/components/ui/theme/size/breakpointTheme.d.ts +8 -10
  37. package/dist/components/ui/theme/size/breakpointTheme.d.ts.map +1 -1
  38. package/dist/components/ui/theme/size/gapTheme.d.ts.map +1 -1
  39. package/dist/components/ui/typography.d.ts +4 -5
  40. package/dist/components/ui/typography.d.ts.map +1 -1
  41. package/dist/index.esm.js +72 -67
  42. package/dist/index.esm.js.map +1 -1
  43. package/dist/index.js +79 -76
  44. package/dist/index.js.map +1 -1
  45. package/dist/ui.css +198 -17
  46. package/dist/vars.css +3 -3
  47. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -55,18 +55,16 @@ const BORDER_VALUES = [BORDER$1, BORDER_T, BORDER_B, BORDER_L, BORDER_R, BORDER_
55
55
  /** All border side keys (excluding noBorder since it doesn't have a CSS class) */
56
56
  const BORDER_KEYS = [BORDER$1, BORDER_T, BORDER_B, BORDER_L, BORDER_R, BORDER_X, BORDER_Y];
57
57
 
58
- /** Extra-small column breakpoint - responsive grid column sizing for xs screens */
59
- const XS_COL = 'xsCol';
60
- /** Small column breakpoint - responsive grid column sizing for sm screens */
61
- const SM_COL = 'smCol';
62
- /** Medium column breakpoint - responsive grid column sizing for md screens */
63
- const MD_COL = 'mdCol';
64
- /** Large column breakpoint - responsive grid column sizing for lg screens */
65
- const LG_COL = 'lgCol';
66
- /** Extra-large column breakpoint - responsive grid column sizing for xl screens */
67
- const XL_COL = 'xlCol';
58
+ /** Mobile column breakpoint - switch to column layout on mobile devices (max-mobile: 20rem) */
59
+ const MOBILE_COL = 'mobileCol';
60
+ /** Tablet column breakpoint - switch to column layout on tablet devices (max-tablet: 40rem) */
61
+ const TABLET_COL = 'tabletCol';
62
+ /** Laptop column breakpoint - switch to column layout on laptop devices (max-laptop: 64rem) */
63
+ const LAPTOP_COL = 'laptopCol';
64
+ /** Desktop column breakpoint - switch to column layout on desktop devices (max-desktop: 80rem) */
65
+ const DESKTOP_COL = 'desktopCol';
68
66
  /** All breakpoint property values */
69
- const BREAKPOINT_VALUES = [XS_COL, SM_COL, MD_COL, LG_COL, XL_COL];
67
+ const BREAKPOINT_VALUES = [MOBILE_COL, TABLET_COL, LAPTOP_COL, DESKTOP_COL];
70
68
 
71
69
  /** Inline display - flows with text */
72
70
  const INLINE = 'inline';
@@ -148,18 +146,16 @@ const NO_GAP = 'noGap';
148
146
  /** All gap property values */
149
147
  const GAP_VALUES = [GAP, NO_GAP];
150
148
 
151
- /** Hide element on extra-small screens and up - visible only on mobile */
152
- const XS_HIDE = 'xsHide';
153
- /** Hide element on small screens and up - visible only on extra-small mobile */
154
- const SM_HIDE = 'smHide';
155
- /** Hide element on medium screens and up - visible only on small screens and below */
156
- const MD_HIDE = 'mdHide';
157
- /** Hide element on large screens and up - visible only on medium screens and below */
158
- const LG_HIDE = 'lgHide';
159
- /** Hide element on extra-large screens and up - visible only on large screens and below */
160
- const XL_HIDE = 'xlHide';
149
+ /** Hide element on mobile devices and below (max-mobile: 20rem) */
150
+ const MOBILE_HIDE = 'mobileHide';
151
+ /** Hide element on tablet devices and below (max-tablet: 40rem) */
152
+ const TABLET_HIDE = 'tabletHide';
153
+ /** Hide element on laptop devices and below (max-laptop: 64rem) */
154
+ const LAPTOP_HIDE = 'laptopHide';
155
+ /** Hide element on desktop devices and below (max-desktop: 80rem) */
156
+ const DESKTOP_HIDE = 'desktopHide';
161
157
  /** All hide property values */
162
- const HIDE_VALUES = [XS_HIDE, SM_HIDE, MD_HIDE, LG_HIDE, XL_HIDE];
158
+ const HIDE_VALUES = [MOBILE_HIDE, TABLET_HIDE, LAPTOP_HIDE, DESKTOP_HIDE];
163
159
 
164
160
  /** Align items to the start of the cross axis */
165
161
  const ITEMS_START = 'itemsStart';
@@ -568,16 +564,14 @@ const ComponentCategories = {
568
564
  class HideTheme extends BaseTheme {
569
565
  constructor() {
570
566
  super(...arguments);
571
- /** Hide element on extra-small screens and below */
572
- this.xsHide = "max-xs:hidden";
573
- /** Hide element on small screens and below */
574
- this.smHide = "max-sm:hidden";
575
- /** Hide element on medium screens and below */
576
- this.mdHide = "max-md:hidden";
577
- /** Hide element on large screens and below */
578
- this.lgHide = "max-lg:hidden";
579
- /** Hide element on extra-large screens and below */
580
- this.xlHide = "max-xl:hidden";
567
+ /** Hide element on mobile devices and below (max-mobile: 20rem) */
568
+ this.mobileHide = "max-mobile:hidden";
569
+ /** Hide element on tablet devices and below (max-tablet: 40rem) */
570
+ this.tabletHide = "max-tablet:hidden";
571
+ /** Hide element on laptop devices and below (max-laptop: 64rem) */
572
+ this.laptopHide = "max-laptop:hidden";
573
+ /** Hide element on desktop devices and below (max-desktop: 80rem) */
574
+ this.desktopHide = "max-desktop:hidden";
581
575
  }
582
576
  getClasses(extractedKeys) {
583
577
  return [(extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.hide) ? this[extractedKeys.hide] : ''];
@@ -3684,29 +3678,29 @@ class FontSizeTheme extends BaseTheme {
3684
3678
  // Static factory methods for different text size ranges
3685
3679
  static createForPageTitle() {
3686
3680
  return new FontSizeTheme({
3687
- xs: "[--fs-unit:15]", // text-3xl: 1.875rem = 15 * 0.125rem
3688
- sm: "[--fs-unit:18]", // text-4xl: 2.25rem = 18 * 0.125rem
3689
- md: "[--fs-unit:24]", // text-5xl: 3rem = 24 * 0.125rem
3690
- lg: "[--fs-unit:30]", // text-6xl: 3.75rem = 30 * 0.125rem
3691
- xl: "[--fs-unit:36]" // text-7xl: 4.5rem = 36 * 0.125rem
3681
+ xs: "[--fs-unit:15] max-laptop:[--fs-unit:12] max-tablet:[--fs-unit:9]", // text-3xl: 1.875rem = 15 * 0.125rem
3682
+ sm: "[--fs-unit:18] max-laptop:[--fs-unit:15] max-tablet:[--fs-unit:12]", // text-4xl: 2.25rem = 18 * 0.125rem
3683
+ md: "[--fs-unit:24] max-laptop:[--fs-unit:21] max-tablet:[--fs-unit:18]", // text-5xl: 3rem = 24 * 0.125rem
3684
+ lg: "[--fs-unit:30] max-laptop:[--fs-unit:27] max-tablet:[--fs-unit:24]", // text-6xl: 3.75rem = 30 * 0.125rem
3685
+ xl: "[--fs-unit:36] max-laptop:[--fs-unit:33] max-tablet:[--fs-unit:30]" // text-7xl: 4.5rem = 36 * 0.125rem
3692
3686
  });
3693
3687
  }
3694
3688
  static createForSectionTitle() {
3695
3689
  return new FontSizeTheme({
3696
- xs: "[--fs-unit:12]", // text-2xl: 1.5rem = 12 * 0.125rem
3697
- sm: "[--fs-unit:15]", // text-3xl: 1.875rem = 15 * 0.125rem
3698
- md: "[--fs-unit:18]", // text-4xl: 2.25rem = 18 * 0.125rem
3699
- lg: "[--fs-unit:24]", // text-5xl: 3rem = 24 * 0.125rem
3700
- xl: "[--fs-unit:30]" // text-6xl: 3.75rem = 30 * 0.125rem
3690
+ xs: "[--fs-unit:12] max-laptop:[--fs-unit:10] max-tablet:[--fs-unit:8]", // text-2xl: 1.5rem = 12 * 0.125rem
3691
+ sm: "[--fs-unit:15] max-laptop:[--fs-unit:13] max-tablet:[--fs-unit:11]", // text-3xl: 1.875rem = 15 * 0.125rem
3692
+ md: "[--fs-unit:18] max-laptop:[--fs-unit:16] max-tablet:[--fs-unit:14]", // text-4xl: 2.25rem = 18 * 0.125rem
3693
+ lg: "[--fs-unit:24] max-laptop:[--fs-unit:22] max-tablet:[--fs-unit:20]", // text-5xl: 3rem = 24 * 0.125rem
3694
+ xl: "[--fs-unit:30] max-laptop:[--fs-unit:28] max-tablet:[--fs-unit:26]" // text-6xl: 3.75rem = 30 * 0.125rem
3701
3695
  });
3702
3696
  }
3703
3697
  static createForTitle() {
3704
3698
  return new FontSizeTheme({
3705
- xs: "[--fs-unit:9]", // text-lg: 1.125rem = 9 * 0.125rem
3706
- sm: "[--fs-unit:10]", // text-xl: 1.25rem = 10 * 0.125rem
3707
- md: "[--fs-unit:12]", // text-2xl: 1.5rem = 12 * 0.125rem
3708
- lg: "[--fs-unit:15]", // text-3xl: 1.875rem = 15 * 0.125rem
3709
- xl: "[--fs-unit:18]" // text-4xl: 2.25rem = 18 * 0.125rem
3699
+ xs: "[--fs-unit:9] max-laptop:[--fs-unit:8] max-tablet:[--fs-unit:7]", // text-lg: 1.125rem = 9 * 0.125rem
3700
+ sm: "[--fs-unit:10] max-laptop:[--fs-unit:9] max-tablet:[--fs-unit:8]", // text-xl: 1.25rem = 10 * 0.125rem
3701
+ md: "[--fs-unit:12] max-laptop:[--fs-unit:11] max-tablet:[--fs-unit:10]", // text-2xl: 1.5rem = 12 * 0.125rem
3702
+ lg: "[--fs-unit:15] max-laptop:[--fs-unit:14] max-tablet:[--fs-unit:13]", // text-3xl: 1.875rem = 15 * 0.125rem
3703
+ xl: "[--fs-unit:18] max-laptop:[--fs-unit:17] max-tablet:[--fs-unit:16]" // text-4xl: 2.25rem = 18 * 0.125rem
3710
3704
  });
3711
3705
  }
3712
3706
  }
@@ -4697,6 +4691,7 @@ const themeDefaults = {
4697
4691
  container: {
4698
4692
  noRing: true,
4699
4693
  flex: true,
4694
+ column: true,
4700
4695
  md: true,
4701
4696
  itemsCenter: true,
4702
4697
  gap: true,
@@ -5218,16 +5213,14 @@ const listTheme = new ComponentTheme("ul", "list-inside", {
5218
5213
  class BreakpointTheme extends BaseTheme {
5219
5214
  constructor() {
5220
5215
  super(...arguments);
5221
- /** Switch to column layout on extra-small screens and below */
5222
- this.xsCol = "max-xs:flex-col";
5223
- /** Switch to column layout on small screens and below */
5224
- this.smCol = "max-sm:flex-col";
5225
- /** Switch to column layout on medium screens and below */
5226
- this.mdCol = "max-md:flex-col";
5227
- /** Switch to column layout on large screens and below */
5228
- this.lgCol = "max-lg:flex-col";
5229
- /** Switch to column layout on extra-large screens and below */
5230
- this.xlCol = "max-xl:flex-col";
5216
+ /** Switch to column layout on mobile devices and below (max-mobile: 20rem) */
5217
+ this.mobileCol = "max-mobile:flex-col";
5218
+ /** Switch to column layout on tablet devices and below (max-tablet: 40rem) */
5219
+ this.tabletCol = "max-tablet:flex-col";
5220
+ /** Switch to column layout on laptop devices and below (max-laptop: 64rem) */
5221
+ this.laptopCol = "max-laptop:flex-col";
5222
+ /** Switch to column layout on desktop devices and below (max-desktop: 80rem) */
5223
+ this.desktopCol = "max-desktop:flex-col";
5231
5224
  }
5232
5225
  getClasses(extractedKeys) {
5233
5226
  return (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.breakpoint) ? [this[extractedKeys.breakpoint] || ''] : [];
@@ -5236,10 +5229,22 @@ class BreakpointTheme extends BaseTheme {
5236
5229
 
5237
5230
  const defaultCardTheme = new ComponentTheme("div", "", {
5238
5231
  size: {
5239
- px: new PxTheme(),
5240
- py: new PyTheme(),
5232
+ px: new PxTheme({
5233
+ xs: "[--aspect-ratio:1]",
5234
+ sm: "[--aspect-ratio:1]",
5235
+ md: "[--aspect-ratio:1]",
5236
+ lg: "[--aspect-ratio:1]",
5237
+ xl: "[--aspect-ratio:1]",
5238
+ }),
5239
+ py: new PyTheme({
5240
+ xs: "[--py-unit:2]",
5241
+ sm: "[--py-unit:4]",
5242
+ md: "[--py-unit:6]",
5243
+ lg: "[--py-unit:8]",
5244
+ xl: "[--py-unit:10]",
5245
+ }),
5241
5246
  lineHeight: LineHeightTheme.createDefault(),
5242
- gap: new GapTheme(true),
5247
+ gap: new GapTheme(false),
5243
5248
  },
5244
5249
  layout: {
5245
5250
  ...defaultLayoutsThemes,
@@ -5319,7 +5324,7 @@ class SizeTheme extends BaseTheme {
5319
5324
  }
5320
5325
  }
5321
5326
 
5322
- const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full", {
5327
+ const defaultContainerTheme = new ComponentTheme("div", "mx-auto w-full", {
5323
5328
  size: {
5324
5329
  gap: new GapTheme(),
5325
5330
  maxWidth: new SizeTheme({ xs: 'max-w-3xl', sm: 'max-w-4xl', md: 'max-w-5xl', lg: 'max-w-6xl', xl: 'max-w-7xl' }),
@@ -5396,11 +5401,11 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full", {
5396
5401
  xl: "[--aspect-ratio:1.5]",
5397
5402
  }),
5398
5403
  py: new PyTheme({
5399
- xs: "[--py-unit:4]",
5400
- sm: "[--py-unit:8]",
5401
- md: "[--py-unit:12]",
5402
- lg: "[--py-unit:16]",
5403
- xl: "[--py-unit:20]",
5404
+ xs: "[--py-unit:4] max-laptop:[--py-unit:3] max-tablet:[--py-unit:2]",
5405
+ sm: "[--py-unit:8] max-laptop:[--py-unit:4] max-tablet:[--py-unit:2]",
5406
+ md: "[--py-unit:12] max-laptop:[--py-unit:6] max-tablet:[--py-unit:2]",
5407
+ lg: "[--py-unit:16] max-laptop:[--py-unit:8] max-tablet:[--py-unit:2]",
5408
+ xl: "[--py-unit:20] max-laptop:[--py-unit:10] max-tablet:[--py-unit:4]",
5404
5409
  }),
5405
5410
  gap: new GapTheme(),
5406
5411
  breakpoint: new BreakpointTheme(),
@@ -5911,6 +5916,8 @@ exports.Container = Container;
5911
5916
  exports.DANGER = DANGER;
5912
5917
  exports.DECIMAL = DECIMAL;
5913
5918
  exports.DEFAULT = DEFAULT;
5919
+ exports.DESKTOP_COL = DESKTOP_COL;
5920
+ exports.DESKTOP_HIDE = DESKTOP_HIDE;
5914
5921
  exports.DISC = DISC;
5915
5922
  exports.DISPLAY_VALUES = DISPLAY_VALUES;
5916
5923
  exports.DIVIDER_CATEGORIES = DIVIDER_CATEGORIES;
@@ -5970,12 +5977,12 @@ exports.JUSTIFY_START = JUSTIFY_START;
5970
5977
  exports.JUSTIFY_STRETCH = JUSTIFY_STRETCH;
5971
5978
  exports.JUSTIFY_VALUES = JUSTIFY_VALUES;
5972
5979
  exports.LABEL_CATEGORIES = LABEL_CATEGORIES;
5980
+ exports.LAPTOP_COL = LAPTOP_COL;
5981
+ exports.LAPTOP_HIDE = LAPTOP_HIDE;
5973
5982
  exports.LAYOUT_CORE = LAYOUT_CORE;
5974
5983
  exports.LAYOUT_FLEX = LAYOUT_FLEX;
5975
5984
  exports.LAYOUT_FULL = LAYOUT_FULL;
5976
5985
  exports.LG = LG;
5977
- exports.LG_COL = LG_COL;
5978
- exports.LG_HIDE = LG_HIDE;
5979
5986
  exports.LIGHT = LIGHT;
5980
5987
  exports.LINE_THROUGH = LINE_THROUGH;
5981
5988
  exports.LINK = LINK;
@@ -5988,9 +5995,9 @@ exports.Link = Link;
5988
5995
  exports.List = List;
5989
5996
  exports.ListItem = ListItem;
5990
5997
  exports.MD = MD;
5991
- exports.MD_COL = MD_COL;
5992
- exports.MD_HIDE = MD_HIDE;
5993
5998
  exports.MEDIUM = MEDIUM;
5999
+ exports.MOBILE_COL = MOBILE_COL;
6000
+ exports.MOBILE_HIDE = MOBILE_HIDE;
5994
6001
  exports.MODE_VALUES = MODE_VALUES;
5995
6002
  exports.MONO = MONO;
5996
6003
  exports.ModeKeys = ModeKeys;
@@ -6050,8 +6057,6 @@ exports.SHAPE_VALUES = SHAPE_VALUES;
6050
6057
  exports.SHARP = SHARP;
6051
6058
  exports.SIZE_VALUES = SIZE_VALUES;
6052
6059
  exports.SM = SM;
6053
- exports.SM_COL = SM_COL;
6054
- exports.SM_HIDE = SM_HIDE;
6055
6060
  exports.STACK_CATEGORIES = STACK_CATEGORIES;
6056
6061
  exports.STATIC = STATIC;
6057
6062
  exports.STICKY = STICKY;
@@ -6060,6 +6065,8 @@ exports.Section = Section;
6060
6065
  exports.SectionTitle = SectionTitle;
6061
6066
  exports.Stack = Stack;
6062
6067
  exports.TABLE = TABLE;
6068
+ exports.TABLET_COL = TABLET_COL;
6069
+ exports.TABLET_HIDE = TABLET_HIDE;
6063
6070
  exports.TABLE_CELL = TABLE_CELL;
6064
6071
  exports.TERTIARY = TERTIARY;
6065
6072
  exports.TEXT_ALIGN_VALUES = TEXT_ALIGN_VALUES;
@@ -6090,11 +6097,7 @@ exports.VISUAL_LAYOUT = VISUAL_LAYOUT;
6090
6097
  exports.WARNING = WARNING;
6091
6098
  exports.WRAP_VALUES = WRAP_VALUES;
6092
6099
  exports.XL = XL;
6093
- exports.XL_COL = XL_COL;
6094
- exports.XL_HIDE = XL_HIDE;
6095
6100
  exports.XS = XS;
6096
- exports.XS_COL = XS_COL;
6097
- exports.XS_HIDE = XS_HIDE;
6098
6101
  exports.defaultTheme = defaultTheme;
6099
6102
  exports.themeDefaults = themeDefaults;
6100
6103
  exports.useTheme = useTheme;