@vaneui/ui 0.2.1-alpha.20250820100624.167a145 → 0.2.1-alpha.20250820172812.236c9ec

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.
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { BaseTheme } from "./baseTheme";
3
- import type { ComponentCategoryKey } from "../../props";
3
+ import { ComponentCategoryKey } from "../../props";
4
4
  import { HideTheme } from "../layout/hideTheme";
5
5
  import { ItemsTheme } from "../layout/itemsTheme";
6
6
  import { JustifyTheme } from "../layout/justifyTheme";
@@ -52,7 +52,7 @@ export declare class ComponentTheme<P extends ComponentProps, TTheme extends obj
52
52
  readonly base: string;
53
53
  readonly themes: TTheme;
54
54
  defaults: Partial<P>;
55
- extraClasses: Record<string, string>;
55
+ extraClasses: Partial<Record<keyof P, string>>;
56
56
  private readonly categories;
57
57
  private readonly tagFunction?;
58
58
  constructor(tag: React.ElementType, base: string, themes: DeepPartial<TTheme>, defaults: Partial<P> | undefined, categories: readonly ComponentCategoryKey[], tagFunction?: (props: P, defaults: Partial<P>) => React.ElementType);
@@ -0,0 +1,5 @@
1
+ import { ThemeDefaults } from '../../themeContext';
2
+ /**
3
+ * Default props for all components using the existing ThemeDefaults type
4
+ */
5
+ export declare const themeDefaults: ThemeDefaults;
package/dist/index.d.ts CHANGED
@@ -10,4 +10,5 @@ export { Section, Container, Col, Row, Stack, Grid2, Grid3, Grid4, Card } from "
10
10
  export { Text, Title, Link, List, ListItem, SectionTitle, PageTitle } from "./components/ui/typography";
11
11
  export { COMPONENT, ComponentKeys, ComponentCategories, type ComponentKey, } from "./components/ui/props/keys";
12
12
  export { ThemeProvider, useTheme, defaultTheme, type ThemeProps, type ThemeDefaults, type ThemeExtraClasses, type ThemeProviderProps, type PartialTheme, } from './components/themeContext';
13
+ export { themeDefaults } from './components/ui/theme/defaults';
13
14
  export * from "./components/ui/props/index";
package/dist/index.esm.js CHANGED
@@ -3158,7 +3158,10 @@ class ComponentTheme {
3158
3158
  const defaults = this.defaults;
3159
3159
  const extractedKeys = {};
3160
3160
  for (const category of this.categories) {
3161
- extractedKeys[category] = pickFirstTruthyKeyByCategory(componentProps, defaults, category);
3161
+ const key = pickFirstTruthyKeyByCategory(componentProps, defaults, category);
3162
+ if (key !== undefined) {
3163
+ extractedKeys[category] = key;
3164
+ }
3162
3165
  }
3163
3166
  const walk = (map) => {
3164
3167
  for (const key of Object.keys(map)) {
@@ -3175,7 +3178,11 @@ class ComponentTheme {
3175
3178
  // Apply extra classes based on extracted keys
3176
3179
  for (const [key, value] of Object.entries(extractedKeys)) {
3177
3180
  if (value && this.extraClasses[value]) {
3178
- classes.push(...this.extraClasses[value].split(/\s+/));
3181
+ const existingClasses = this.extraClasses[value];
3182
+ if (existingClasses !== undefined) {
3183
+ const cs = existingClasses.split(/\s+/);
3184
+ classes.push(...cs);
3185
+ }
3179
3186
  }
3180
3187
  }
3181
3188
  return classes.filter(Boolean);
@@ -3988,6 +3995,223 @@ DirectionTheme.defaultClasses = {
3988
3995
  columnReverse: "flex-col-reverse",
3989
3996
  };
3990
3997
 
3998
+ /**
3999
+ * Default props for all components using the existing ThemeDefaults type
4000
+ */
4001
+ const themeDefaults = {
4002
+ button: {
4003
+ md: true,
4004
+ inlineFlex: true,
4005
+ itemsCenter: true,
4006
+ justifyCenter: true,
4007
+ outline: true,
4008
+ default: true,
4009
+ rounded: true,
4010
+ sans: true,
4011
+ semibold: true,
4012
+ textCenter: true,
4013
+ noBorder: true,
4014
+ gap: true,
4015
+ padding: true,
4016
+ ring: true,
4017
+ shadow: true,
4018
+ },
4019
+ card: {
4020
+ md: true,
4021
+ flex: true,
4022
+ default: true,
4023
+ rounded: true,
4024
+ normal: true,
4025
+ column: true,
4026
+ border: true,
4027
+ gap: true,
4028
+ padding: true,
4029
+ },
4030
+ chip: {
4031
+ md: true,
4032
+ inlineFlex: true,
4033
+ itemsCenter: true,
4034
+ outline: true,
4035
+ secondary: true,
4036
+ rounded: true,
4037
+ mono: true,
4038
+ normal: true,
4039
+ noShadow: true,
4040
+ padding: true,
4041
+ gap: true,
4042
+ ring: true,
4043
+ },
4044
+ badge: {
4045
+ md: true,
4046
+ default: true,
4047
+ inlineFlex: true,
4048
+ outline: true,
4049
+ pill: true,
4050
+ sans: true,
4051
+ semibold: true,
4052
+ uppercase: true,
4053
+ noShadow: true,
4054
+ itemsCenter: true,
4055
+ padding: true,
4056
+ gap: true,
4057
+ ring: true,
4058
+ },
4059
+ container: {
4060
+ noRing: true,
4061
+ flex: true,
4062
+ md: true,
4063
+ itemsCenter: true,
4064
+ gap: true,
4065
+ sharp: true,
4066
+ },
4067
+ section: {
4068
+ md: true,
4069
+ flex: true,
4070
+ default: true,
4071
+ itemsStart: true,
4072
+ gap: true,
4073
+ padding: true,
4074
+ noBorder: true,
4075
+ noRing: true,
4076
+ noShadow: true,
4077
+ sharp: true,
4078
+ },
4079
+ stack: {
4080
+ md: true,
4081
+ flex: true,
4082
+ column: true,
4083
+ flexWrap: true,
4084
+ gap: true,
4085
+ padding: true,
4086
+ noBorder: true,
4087
+ noRing: true,
4088
+ sharp: true,
4089
+ },
4090
+ row: {
4091
+ row: true,
4092
+ md: true,
4093
+ flex: true,
4094
+ itemsCenter: true,
4095
+ gap: true,
4096
+ noBorder: true,
4097
+ noRing: true,
4098
+ sharp: true,
4099
+ },
4100
+ col: {
4101
+ column: true,
4102
+ md: true,
4103
+ flex: true,
4104
+ gap: true,
4105
+ noBorder: true,
4106
+ noRing: true,
4107
+ sharp: true,
4108
+ },
4109
+ grid2: {
4110
+ md: true,
4111
+ grid: true,
4112
+ gap: true,
4113
+ },
4114
+ grid3: {
4115
+ md: true,
4116
+ grid: true,
4117
+ gap: true,
4118
+ },
4119
+ grid4: {
4120
+ md: true,
4121
+ grid: true,
4122
+ gap: true,
4123
+ },
4124
+ divider: {
4125
+ md: true,
4126
+ default: true,
4127
+ noPadding: true,
4128
+ },
4129
+ label: {
4130
+ md: true,
4131
+ flex: true,
4132
+ gap: true,
4133
+ default: true,
4134
+ sans: true,
4135
+ medium: true,
4136
+ },
4137
+ img: {
4138
+ rounded: true,
4139
+ },
4140
+ code: {
4141
+ md: true,
4142
+ mono: true,
4143
+ semibold: true,
4144
+ rounded: true,
4145
+ inline: true,
4146
+ padding: true,
4147
+ default: true,
4148
+ ring: true,
4149
+ },
4150
+ text: {
4151
+ md: true,
4152
+ default: true,
4153
+ sans: true,
4154
+ textLeft: true,
4155
+ },
4156
+ title: {
4157
+ md: true,
4158
+ default: true,
4159
+ sans: true,
4160
+ semibold: true,
4161
+ textLeft: true,
4162
+ },
4163
+ pageTitle: {
4164
+ md: true,
4165
+ default: true,
4166
+ sans: true,
4167
+ semibold: true,
4168
+ textLeft: true,
4169
+ },
4170
+ sectionTitle: {
4171
+ md: true,
4172
+ default: true,
4173
+ sans: true,
4174
+ semibold: true,
4175
+ textLeft: true,
4176
+ },
4177
+ link: {
4178
+ underline: true,
4179
+ link: true,
4180
+ sans: true,
4181
+ },
4182
+ listItem: {
4183
+ sans: true,
4184
+ },
4185
+ list: {
4186
+ md: true,
4187
+ default: true,
4188
+ sans: true,
4189
+ normal: true,
4190
+ padding: true,
4191
+ disc: true,
4192
+ },
4193
+ checkbox: {
4194
+ input: {
4195
+ md: true,
4196
+ default: true,
4197
+ border: true,
4198
+ rounded: true,
4199
+ noRing: true,
4200
+ noShadow: true,
4201
+ filled: true,
4202
+ },
4203
+ check: {
4204
+ default: true,
4205
+ },
4206
+ wrapper: {
4207
+ md: true,
4208
+ inlineGrid: true,
4209
+ itemsCenter: true,
4210
+ justifyCenter: true,
4211
+ },
4212
+ },
4213
+ };
4214
+
3991
4215
  const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-pointer transition-all duration-200 whitespace-nowrap", {
3992
4216
  size: {
3993
4217
  px: new PxTheme({
@@ -4013,23 +4237,7 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
4013
4237
  flexDirection: new DirectionTheme(),
4014
4238
  },
4015
4239
  typography: defaultTypographyTheme,
4016
- }, {
4017
- md: true,
4018
- inlineFlex: true,
4019
- itemsCenter: true,
4020
- justifyCenter: true,
4021
- outline: true,
4022
- default: true,
4023
- rounded: true,
4024
- sans: true,
4025
- semibold: true,
4026
- textCenter: true,
4027
- noBorder: true,
4028
- gap: true,
4029
- padding: true,
4030
- ring: true,
4031
- shadow: true,
4032
- }, BUTTON_CATEGORIES, (props, defaults) => {
4240
+ }, themeDefaults.button, BUTTON_CATEGORIES, (props, defaults) => {
4033
4241
  // Determine tag based on href prop
4034
4242
  return props.href ? "a" : "button";
4035
4243
  });
@@ -4057,21 +4265,7 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all
4057
4265
  flexDirection: new DirectionTheme(),
4058
4266
  },
4059
4267
  typography: defaultTypographyTheme,
4060
- }, {
4061
- md: true,
4062
- default: true,
4063
- inlineFlex: true,
4064
- outline: true,
4065
- pill: true,
4066
- sans: true,
4067
- semibold: true,
4068
- uppercase: true,
4069
- noShadow: true,
4070
- itemsCenter: true,
4071
- padding: true,
4072
- gap: true,
4073
- ring: true,
4074
- }, BADGE_CATEGORIES, (props, defaults) => {
4268
+ }, themeDefaults.badge, BADGE_CATEGORIES, (props, defaults) => {
4075
4269
  return props.href ? "a" : "span";
4076
4270
  });
4077
4271
 
@@ -4098,20 +4292,7 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all
4098
4292
  flexDirection: new DirectionTheme(),
4099
4293
  },
4100
4294
  typography: defaultTypographyTheme,
4101
- }, {
4102
- md: true,
4103
- inlineFlex: true,
4104
- itemsCenter: true,
4105
- outline: true,
4106
- secondary: true,
4107
- rounded: true,
4108
- mono: true,
4109
- normal: true,
4110
- noShadow: true,
4111
- padding: true,
4112
- gap: true,
4113
- ring: true,
4114
- }, CHIP_CATEGORIES, (props, defaults) => {
4295
+ }, themeDefaults.chip, CHIP_CATEGORIES, (props, defaults) => {
4115
4296
  return props.href ? "a" : "span";
4116
4297
  });
4117
4298
 
@@ -4138,16 +4319,7 @@ const defaultCodeTheme = new ComponentTheme("code", "", {
4138
4319
  flexDirection: new DirectionTheme(),
4139
4320
  },
4140
4321
  typography: defaultTypographyTheme,
4141
- }, {
4142
- inline: true,
4143
- outline: true,
4144
- default: true,
4145
- rounded: true,
4146
- mono: true,
4147
- padding: true,
4148
- gap: true,
4149
- ring: true,
4150
- }, CODE_CATEGORIES);
4322
+ }, themeDefaults.code, CODE_CATEGORIES);
4151
4323
 
4152
4324
  const isObject = (item) => {
4153
4325
  return item !== null && typeof item === 'object' && !Array.isArray(item);
@@ -4266,12 +4438,7 @@ class ListStyleTheme extends BaseTheme {
4266
4438
  }
4267
4439
  }
4268
4440
 
4269
- const typographyThemeDefaults = {
4270
- md: true,
4271
- default: true,
4272
- sans: true,
4273
- };
4274
- const createTypographyComponentTheme = (tag, base = "text-balance", textSizeMap = textSizeClasses, defaults = typographyThemeDefaults) => {
4441
+ const createTypographyComponentTheme = (tag, base = "text-balance", textSizeMap = textSizeClasses, defaults = {}) => {
4275
4442
  return new ComponentTheme(tag, base, {
4276
4443
  size: {
4277
4444
  text: new SizeTheme(textSizeMap),
@@ -4293,7 +4460,7 @@ const pageTitleTheme = createTypographyComponentTheme("h1", "text-balance tracki
4293
4460
  md: "text-5xl max-lg:text-4xl max-md:text-3xl",
4294
4461
  lg: "text-6xl max-lg:text-5xl max-md:text-4xl",
4295
4462
  xl: "text-7xl max-lg:text-6xl max-md:text-5xl"
4296
- }, mergeDefaults(typographyThemeDefaults, { semibold: true }));
4463
+ }, mergeDefaults(themeDefaults.pageTitle, { semibold: true }));
4297
4464
  // Section title specific theme
4298
4465
  const sectionTitleTheme = createTypographyComponentTheme("h2", "text-balance w-fit", {
4299
4466
  xs: "text-2xl max-lg:text-xl max-md:text-lg",
@@ -4301,11 +4468,11 @@ const sectionTitleTheme = createTypographyComponentTheme("h2", "text-balance w-f
4301
4468
  md: "text-4xl max-lg:text-3xl max-md:text-2xl",
4302
4469
  lg: "text-5xl max-lg:text-4xl max-md:text-3xl",
4303
4470
  xl: "text-6xl max-lg:text-5xl max-md:text-4xl"
4304
- }, mergeDefaults(typographyThemeDefaults, { semibold: true }));
4471
+ }, mergeDefaults(themeDefaults.sectionTitle, { semibold: true }));
4305
4472
  // Title specific theme
4306
- const titleTheme = createTypographyComponentTheme("h3", "text-balance w-fit", { xs: "text-lg", sm: "text-xl", md: "text-2xl", lg: "text-3xl", xl: "text-4xl" }, mergeDefaults(typographyThemeDefaults, { semibold: true }));
4473
+ const titleTheme = createTypographyComponentTheme("h3", "text-balance w-fit", { xs: "text-lg", sm: "text-xl", md: "text-2xl", lg: "text-3xl", xl: "text-4xl" }, mergeDefaults(themeDefaults.title, { semibold: true }));
4307
4474
  // Text specific theme
4308
- const textTheme = createTypographyComponentTheme("p", "p-0 m-0 w-fit", textSizeClasses);
4475
+ const textTheme = createTypographyComponentTheme("p", "p-0 m-0 w-fit", textSizeClasses, themeDefaults.text);
4309
4476
  // Link specific theme
4310
4477
  const linkTheme = new ComponentTheme("a", "hover:underline w-fit cursor-pointer", {
4311
4478
  size: {
@@ -4316,10 +4483,7 @@ const linkTheme = new ComponentTheme("a", "hover:underline w-fit cursor-pointer"
4316
4483
  },
4317
4484
  typography: defaultTypographyTheme,
4318
4485
  layout: defaultLayoutTheme,
4319
- }, {
4320
- link: true,
4321
- sans: true,
4322
- }, TYPOGRAPHY_CATEGORIES);
4486
+ }, themeDefaults.link, TYPOGRAPHY_CATEGORIES);
4323
4487
  // List specific theme
4324
4488
  const listItemTheme = new ComponentTheme("li", "", {
4325
4489
  size: {
@@ -4329,8 +4493,7 @@ const listItemTheme = new ComponentTheme("li", "", {
4329
4493
  text: AppearanceTheme.createTheme({ base: textAppearanceClasses }),
4330
4494
  },
4331
4495
  typography: defaultTypographyTheme,
4332
- }, {}, //keep empty to apply parent style
4333
- TYPOGRAPHY_CATEGORIES);
4496
+ }, themeDefaults.listItem, TYPOGRAPHY_CATEGORIES);
4334
4497
  // List specific theme
4335
4498
  const listTheme = new ComponentTheme("ul", "list-inside", {
4336
4499
  size: {
@@ -4343,14 +4506,7 @@ const listTheme = new ComponentTheme("ul", "list-inside", {
4343
4506
  typography: defaultTypographyTheme,
4344
4507
  layout: defaultLayoutTheme,
4345
4508
  listStyle: new ListStyleTheme(),
4346
- }, {
4347
- md: true,
4348
- default: true,
4349
- sans: true,
4350
- normal: true,
4351
- padding: true,
4352
- disc: true,
4353
- }, LIST_CATEGORIES, (props, defaults) => {
4509
+ }, themeDefaults.list, LIST_CATEGORIES, (props, defaults) => {
4354
4510
  // Determine tag based on list style from props and defaults
4355
4511
  const componentProps = props;
4356
4512
  const defaultsRecord = defaults;
@@ -4417,17 +4573,7 @@ const defaultCardTheme = new ComponentTheme("div", "", {
4417
4573
  ring: AppearanceTheme.createTheme({ base: ringAppearanceClasses }),
4418
4574
  },
4419
4575
  typography: defaultTypographyTheme,
4420
- }, {
4421
- md: true,
4422
- flex: true,
4423
- default: true,
4424
- rounded: true,
4425
- normal: true,
4426
- column: true,
4427
- border: true,
4428
- gap: true,
4429
- padding: true,
4430
- }, CARD_CATEGORIES, (props, defaults) => {
4576
+ }, themeDefaults.card, CARD_CATEGORIES, (props, defaults) => {
4431
4577
  return props.href ? "a" : "div";
4432
4578
  });
4433
4579
 
@@ -4450,16 +4596,7 @@ const defaultRowTheme = new ComponentTheme("div", "", {
4450
4596
  ring: GenericVariantTheme.createUIElementRingTheme(),
4451
4597
  shadow: GenericVariantTheme.createLayoutShadowTheme(),
4452
4598
  }
4453
- }, {
4454
- row: true,
4455
- md: true,
4456
- flex: true,
4457
- itemsCenter: true,
4458
- gap: true,
4459
- noBorder: true,
4460
- noRing: true,
4461
- sharp: true,
4462
- }, ROW_CATEGORIES, (props, defaults) => {
4599
+ }, themeDefaults.row, ROW_CATEGORIES, (props, defaults) => {
4463
4600
  // Determine tag based on href prop
4464
4601
  return props.href ? "a" : "div";
4465
4602
  });
@@ -4474,11 +4611,7 @@ const defaultDividerTheme = new ComponentTheme("div", "h-px w-full", {
4474
4611
  }),
4475
4612
  },
4476
4613
  layout: defaultLayoutTheme,
4477
- }, {
4478
- md: true,
4479
- default: true,
4480
- noPadding: true,
4481
- }, DIVIDER_CATEGORIES);
4614
+ }, themeDefaults.divider, DIVIDER_CATEGORIES);
4482
4615
 
4483
4616
  const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full", {
4484
4617
  size: {
@@ -4506,14 +4639,7 @@ const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full
4506
4639
  ring: AppearanceTheme.createTheme({ base: ringAppearanceClasses }),
4507
4640
  shadow: GenericVariantTheme.createLayoutShadowTheme(),
4508
4641
  }
4509
- }, {
4510
- noRing: true,
4511
- flex: true,
4512
- md: true,
4513
- itemsCenter: true,
4514
- gap: true,
4515
- sharp: true,
4516
- }, CONTAINER_CATEGORIES, (props, defaults) => {
4642
+ }, themeDefaults.container, CONTAINER_CATEGORIES, (props, defaults) => {
4517
4643
  return props.href ? "a" : "div";
4518
4644
  });
4519
4645
 
@@ -4535,15 +4661,7 @@ const defaultColTheme = new ComponentTheme("div", "", {
4535
4661
  ring: GenericVariantTheme.createUIElementRingTheme(),
4536
4662
  shadow: GenericVariantTheme.createLayoutShadowTheme(),
4537
4663
  }
4538
- }, {
4539
- column: true,
4540
- md: true,
4541
- flex: true,
4542
- gap: true,
4543
- noBorder: true,
4544
- noRing: true,
4545
- sharp: true,
4546
- }, COL_CATEGORIES, (props, defaults) => {
4664
+ }, themeDefaults.col, COL_CATEGORIES, (props, defaults) => {
4547
4665
  return props.href ? "a" : "div";
4548
4666
  });
4549
4667
 
@@ -4568,17 +4686,7 @@ const defaultStackTheme = new ComponentTheme("div", "", {
4568
4686
  ring: GenericVariantTheme.createUIElementRingTheme(),
4569
4687
  shadow: GenericVariantTheme.createLayoutShadowTheme(),
4570
4688
  }
4571
- }, {
4572
- md: true,
4573
- flex: true,
4574
- column: true,
4575
- flexWrap: true,
4576
- gap: true,
4577
- padding: true,
4578
- noBorder: true,
4579
- noRing: true,
4580
- sharp: true,
4581
- }, STACK_CATEGORIES, (props, defaults) => {
4689
+ }, themeDefaults.stack, STACK_CATEGORIES, (props, defaults) => {
4582
4690
  return props.href ? "a" : "div";
4583
4691
  });
4584
4692
 
@@ -4616,26 +4724,10 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full flex-col", {
4616
4724
  ring: new RingTheme(),
4617
4725
  radius: RadiusTheme.createLayoutTheme(),
4618
4726
  },
4619
- }, {
4620
- md: true,
4621
- flex: true,
4622
- default: true,
4623
- itemsStart: true,
4624
- gap: true,
4625
- padding: true,
4626
- noBorder: true,
4627
- noRing: true,
4628
- noShadow: true,
4629
- sharp: true,
4630
- }, SECTION_CATEGORIES, (props, defaults) => {
4727
+ }, themeDefaults.section, SECTION_CATEGORIES, (props, defaults) => {
4631
4728
  return props.href ? "a" : "div";
4632
4729
  });
4633
4730
 
4634
- const gridDefaults = {
4635
- md: true,
4636
- gap: true,
4637
- grid: true,
4638
- };
4639
4731
  const gridSubThemes = {
4640
4732
  size: {
4641
4733
  gap: new GapTheme({
@@ -4655,16 +4747,17 @@ const gridSubThemes = {
4655
4747
  flexDirection: new DirectionTheme(),
4656
4748
  },
4657
4749
  };
4658
- const defaultGrid2Theme = new ComponentTheme("div", "grid-cols-1 md:grid-cols-2", gridSubThemes, gridDefaults, GRID_CATEGORIES, (props, defaults) => {
4750
+ const defaultGrid2Theme = new ComponentTheme("div", "grid-cols-1 md:grid-cols-2", gridSubThemes, themeDefaults.grid2, GRID_CATEGORIES, (props, defaults) => {
4659
4751
  return props.href ? "a" : "div";
4660
4752
  });
4661
- const defaultGrid3Theme = new ComponentTheme("div", "grid-cols-1 md:grid-cols-3", gridSubThemes, gridDefaults, GRID_CATEGORIES, (props, defaults) => {
4753
+ const defaultGrid3Theme = new ComponentTheme("div", "grid-cols-1 md:grid-cols-3", gridSubThemes, themeDefaults.grid3, GRID_CATEGORIES, (props, defaults) => {
4662
4754
  return props.href ? "a" : "div";
4663
4755
  });
4664
- const defaultGrid4Theme = new ComponentTheme("div", "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4", gridSubThemes, gridDefaults, GRID_CATEGORIES, (props, defaults) => {
4756
+ const defaultGrid4Theme = new ComponentTheme("div", "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4", gridSubThemes, themeDefaults.grid4, GRID_CATEGORIES, (props, defaults) => {
4665
4757
  return props.href ? "a" : "div";
4666
4758
  });
4667
4759
 
4760
+ var _a, _b, _c;
4668
4761
  const defaultCheckboxTheme = new ComponentTheme("input", "peer col-start-1 row-start-1 cursor-pointer appearance-none ring-transparent", {
4669
4762
  size: {
4670
4763
  size: new SizeTheme({
@@ -4696,25 +4789,14 @@ const defaultCheckboxTheme = new ComponentTheme("input", "peer col-start-1 row-s
4696
4789
  check: GenericVariantTheme.createCheckedAppearanceTheme(),
4697
4790
  shadow: GenericVariantTheme.createUIElementShadowTheme(),
4698
4791
  }
4699
- }, {
4700
- md: true,
4701
- default: true,
4702
- border: true,
4703
- rounded: true,
4704
- noRing: true,
4705
- noShadow: true,
4706
- filled: true,
4707
- }, CHECKBOX_CATEGORIES);
4792
+ }, ((_a = themeDefaults.checkbox) === null || _a === void 0 ? void 0 : _a.input) || {}, CHECKBOX_CATEGORIES);
4708
4793
  const defaultCheckTheme = new ComponentTheme("span", "invisible col-start-1 row-start-1 peer-checked:visible", {
4709
4794
  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" }) }),
4710
4795
  appearance: {
4711
4796
  color: GenericVariantTheme.createUIElementTextTheme()
4712
4797
  },
4713
4798
  layout: defaultLayoutTheme,
4714
- }, {
4715
- default: true,
4716
- filled: true,
4717
- }, CHECKBOX_CATEGORIES);
4799
+ }, ((_b = themeDefaults.checkbox) === null || _b === void 0 ? void 0 : _b.check) || {}, CHECKBOX_CATEGORIES);
4718
4800
  const defaultCheckboxWrapperTheme = new ComponentTheme("span", "", {
4719
4801
  size: {
4720
4802
  height: new SizeTheme({
@@ -4726,12 +4808,7 @@ const defaultCheckboxWrapperTheme = new ComponentTheme("span", "", {
4726
4808
  })
4727
4809
  },
4728
4810
  layout: defaultLayoutTheme,
4729
- }, {
4730
- md: true,
4731
- inlineGrid: true,
4732
- itemsCenter: true,
4733
- justifyCenter: true,
4734
- }, CHECKBOX_CATEGORIES);
4811
+ }, ((_c = themeDefaults.checkbox) === null || _c === void 0 ? void 0 : _c.wrapper) || {}, CHECKBOX_CATEGORIES);
4735
4812
 
4736
4813
  const defaultLabelTheme = new ComponentTheme("label", "has-[input]:cursor-pointer cursor-default", {
4737
4814
  size: {
@@ -4747,14 +4824,7 @@ const defaultLabelTheme = new ComponentTheme("label", "has-[input]:cursor-pointe
4747
4824
  wrap: new WrapTheme(),
4748
4825
  flexDirection: new DirectionTheme(),
4749
4826
  },
4750
- }, {
4751
- md: true,
4752
- flex: true,
4753
- gap: true,
4754
- default: true,
4755
- sans: true,
4756
- medium: true,
4757
- }, LABEL_CATEGORIES);
4827
+ }, themeDefaults.label, LABEL_CATEGORIES);
4758
4828
 
4759
4829
  const defaultImgTheme = new ComponentTheme("img", "object-cover", // Default to cover for better image display
4760
4830
  {
@@ -4769,12 +4839,7 @@ const defaultImgTheme = new ComponentTheme("img", "object-cover", // Default to
4769
4839
  ring: GenericVariantTheme.createUIElementRingTheme(),
4770
4840
  shadow: GenericVariantTheme.createLayoutShadowTheme()
4771
4841
  }
4772
- }, {
4773
- rounded: true,
4774
- noShadow: true,
4775
- noBorder: true,
4776
- noRing: true,
4777
- }, IMG_CATEGORIES);
4842
+ }, themeDefaults.img, IMG_CATEGORIES);
4778
4843
 
4779
4844
  const defaultTheme = {
4780
4845
  button: defaultButtonTheme,
@@ -5043,5 +5108,5 @@ const List = forwardRef(function List(props, ref) {
5043
5108
  return jsx(ThemedComponent, { ref: ref, theme: theme.list, ...props });
5044
5109
  });
5045
5110
 
5046
- export { BADGE_CATEGORIES, BREAKPOINT, BUTTON_CATEGORIES, Badge, Button, CARD_CATEGORIES, CHECKBOX_CATEGORIES, CHIP_CATEGORIES, CODE_CATEGORIES, COL_CATEGORIES, COMPONENT, COMPONENT_PROPS_CATEGORY, CONTAINER_CATEGORIES, Card, Checkbox, Chip, Code, Col, ComponentCategories, ComponentKeys, Container, DIVIDER_CATEGORIES, Divider, GRID_CATEGORIES, Grid2, Grid3, Grid4, IMG_CATEGORIES, INTERACTIVE_CATEGORIES, Img, LABEL_CATEGORIES, LAYOUT_CORE, LAYOUT_FLEX, LAYOUT_FULL, LIST_CATEGORIES, LIST_STYLE, Label, Link, List, ListItem, PADDING, PageTitle, ROW_CATEGORIES, Row, SECTION_CATEGORIES, SHAPE, STACK_CATEGORIES, Section, SectionTitle, Stack, TYPOGRAPHY_CATEGORIES, TYPOGRAPHY_FULL, TYPOGRAPHY_STYLE, Text, ThemeProvider, Title, VARIANT, VISUAL_CORE, VISUAL_DECORATION, VISUAL_FULL, defaultTheme, useTheme };
5111
+ export { BADGE_CATEGORIES, BREAKPOINT, BUTTON_CATEGORIES, Badge, Button, CARD_CATEGORIES, CHECKBOX_CATEGORIES, CHIP_CATEGORIES, CODE_CATEGORIES, COL_CATEGORIES, COMPONENT, COMPONENT_PROPS_CATEGORY, CONTAINER_CATEGORIES, Card, Checkbox, Chip, Code, Col, ComponentCategories, ComponentKeys, Container, DIVIDER_CATEGORIES, Divider, GRID_CATEGORIES, Grid2, Grid3, Grid4, IMG_CATEGORIES, INTERACTIVE_CATEGORIES, Img, LABEL_CATEGORIES, LAYOUT_CORE, LAYOUT_FLEX, LAYOUT_FULL, LIST_CATEGORIES, LIST_STYLE, Label, Link, List, ListItem, PADDING, PageTitle, ROW_CATEGORIES, Row, SECTION_CATEGORIES, SHAPE, STACK_CATEGORIES, Section, SectionTitle, Stack, TYPOGRAPHY_CATEGORIES, TYPOGRAPHY_FULL, TYPOGRAPHY_STYLE, Text, ThemeProvider, Title, VARIANT, VISUAL_CORE, VISUAL_DECORATION, VISUAL_FULL, defaultTheme, themeDefaults, useTheme };
5047
5112
  //# sourceMappingURL=index.esm.js.map