@vaneui/ui 0.2.1-alpha.20250813194307.2bb87da → 0.2.1-alpha.20250820170702.e0272da
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/README.md +125 -10
- package/dist/components/ui/theme/appearance/genericVariantTheme.d.ts +1 -0
- package/dist/components/ui/theme/appearance/shadowAppearanceTheme.d.ts +2 -0
- package/dist/components/ui/theme/common/ComponentTheme.d.ts +2 -2
- package/dist/components/ui/theme/defaults.d.ts +5 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +287 -200
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +287 -199
- package/dist/index.js.map +1 -1
- package/dist/ui.css +19 -0
- package/package.json +1 -1
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
|
-
|
|
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
|
-
|
|
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);
|
|
@@ -3769,6 +3776,15 @@ class ShadowAppearanceTheme extends BaseTheme {
|
|
|
3769
3776
|
static createTheme(src = {}) {
|
|
3770
3777
|
return new ShadowAppearanceTheme(src);
|
|
3771
3778
|
}
|
|
3779
|
+
static createLayoutTheme(src = {}) {
|
|
3780
|
+
const theme = new ShadowAppearanceTheme(src);
|
|
3781
|
+
ComponentKeys.appearance.forEach((key) => {
|
|
3782
|
+
if (theme[key] === ShadowAppearanceTheme.defaultShadow) {
|
|
3783
|
+
theme[key] = ShadowAppearanceTheme.layoutShadow;
|
|
3784
|
+
}
|
|
3785
|
+
});
|
|
3786
|
+
return theme;
|
|
3787
|
+
}
|
|
3772
3788
|
}
|
|
3773
3789
|
ShadowAppearanceTheme.defaultShadow = {
|
|
3774
3790
|
xs: { base: "shadow-2xs", hover: "hover:shadow-xs", active: "" },
|
|
@@ -3777,6 +3793,13 @@ ShadowAppearanceTheme.defaultShadow = {
|
|
|
3777
3793
|
lg: { base: "shadow-md", hover: "hover:shadow-lg", active: "" },
|
|
3778
3794
|
xl: { base: "shadow-lg", hover: "hover:shadow-xl", active: "" }
|
|
3779
3795
|
};
|
|
3796
|
+
ShadowAppearanceTheme.layoutShadow = {
|
|
3797
|
+
xs: { base: "shadow-2xs", hover: "", active: "" },
|
|
3798
|
+
sm: { base: "shadow-xs", hover: "", active: "" },
|
|
3799
|
+
md: { base: "shadow-sm", hover: "", active: "" },
|
|
3800
|
+
lg: { base: "shadow-md", hover: "", active: "" },
|
|
3801
|
+
xl: { base: "shadow-lg", hover: "", active: "" }
|
|
3802
|
+
};
|
|
3780
3803
|
|
|
3781
3804
|
class GenericVariantTheme extends BaseTheme {
|
|
3782
3805
|
constructor(variantInstances) {
|
|
@@ -3811,6 +3834,12 @@ class GenericVariantTheme extends BaseTheme {
|
|
|
3811
3834
|
filled: ShadowAppearanceTheme.createTheme({})
|
|
3812
3835
|
});
|
|
3813
3836
|
}
|
|
3837
|
+
static createLayoutShadowTheme() {
|
|
3838
|
+
return new GenericVariantTheme({
|
|
3839
|
+
outline: ShadowAppearanceTheme.createLayoutTheme({}),
|
|
3840
|
+
filled: ShadowAppearanceTheme.createLayoutTheme({})
|
|
3841
|
+
});
|
|
3842
|
+
}
|
|
3814
3843
|
static createBorderAppearanceTheme() {
|
|
3815
3844
|
return new GenericVariantTheme({
|
|
3816
3845
|
outline: AppearanceTheme.createTheme({ base: borderAppearanceClasses }),
|
|
@@ -3966,6 +3995,223 @@ DirectionTheme.defaultClasses = {
|
|
|
3966
3995
|
columnReverse: "flex-col-reverse",
|
|
3967
3996
|
};
|
|
3968
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
|
+
|
|
3969
4215
|
const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-pointer transition-all duration-200 whitespace-nowrap", {
|
|
3970
4216
|
size: {
|
|
3971
4217
|
px: new PxTheme({
|
|
@@ -3991,23 +4237,7 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
|
|
|
3991
4237
|
flexDirection: new DirectionTheme(),
|
|
3992
4238
|
},
|
|
3993
4239
|
typography: defaultTypographyTheme,
|
|
3994
|
-
}, {
|
|
3995
|
-
md: true,
|
|
3996
|
-
inlineFlex: true,
|
|
3997
|
-
itemsCenter: true,
|
|
3998
|
-
justifyCenter: true,
|
|
3999
|
-
outline: true,
|
|
4000
|
-
default: true,
|
|
4001
|
-
rounded: true,
|
|
4002
|
-
sans: true,
|
|
4003
|
-
semibold: true,
|
|
4004
|
-
textCenter: true,
|
|
4005
|
-
noBorder: true,
|
|
4006
|
-
gap: true,
|
|
4007
|
-
padding: true,
|
|
4008
|
-
ring: true,
|
|
4009
|
-
shadow: true,
|
|
4010
|
-
}, BUTTON_CATEGORIES, (props, defaults) => {
|
|
4240
|
+
}, themeDefaults.button, BUTTON_CATEGORIES, (props, defaults) => {
|
|
4011
4241
|
// Determine tag based on href prop
|
|
4012
4242
|
return props.href ? "a" : "button";
|
|
4013
4243
|
});
|
|
@@ -4024,7 +4254,7 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
4024
4254
|
text: GenericVariantTheme.createUIElementTextTheme(),
|
|
4025
4255
|
border: GenericVariantTheme.createUIElementBorderTheme(),
|
|
4026
4256
|
ring: GenericVariantTheme.createUIElementRingTheme(),
|
|
4027
|
-
shadow: GenericVariantTheme.
|
|
4257
|
+
shadow: GenericVariantTheme.createLayoutShadowTheme()
|
|
4028
4258
|
},
|
|
4029
4259
|
layout: {
|
|
4030
4260
|
...defaultLayoutTheme,
|
|
@@ -4035,21 +4265,7 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
4035
4265
|
flexDirection: new DirectionTheme(),
|
|
4036
4266
|
},
|
|
4037
4267
|
typography: defaultTypographyTheme,
|
|
4038
|
-
}, {
|
|
4039
|
-
md: true,
|
|
4040
|
-
default: true,
|
|
4041
|
-
inlineFlex: true,
|
|
4042
|
-
outline: true,
|
|
4043
|
-
pill: true,
|
|
4044
|
-
sans: true,
|
|
4045
|
-
semibold: true,
|
|
4046
|
-
uppercase: true,
|
|
4047
|
-
noShadow: true,
|
|
4048
|
-
itemsCenter: true,
|
|
4049
|
-
padding: true,
|
|
4050
|
-
gap: true,
|
|
4051
|
-
ring: true,
|
|
4052
|
-
}, BADGE_CATEGORIES, (props, defaults) => {
|
|
4268
|
+
}, themeDefaults.badge, BADGE_CATEGORIES, (props, defaults) => {
|
|
4053
4269
|
return props.href ? "a" : "span";
|
|
4054
4270
|
});
|
|
4055
4271
|
|
|
@@ -4065,7 +4281,7 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
4065
4281
|
text: GenericVariantTheme.createUIElementTextTheme(),
|
|
4066
4282
|
border: GenericVariantTheme.createUIElementBorderTheme(),
|
|
4067
4283
|
ring: GenericVariantTheme.createUIElementRingTheme(),
|
|
4068
|
-
shadow: GenericVariantTheme.
|
|
4284
|
+
shadow: GenericVariantTheme.createLayoutShadowTheme()
|
|
4069
4285
|
},
|
|
4070
4286
|
layout: {
|
|
4071
4287
|
...defaultLayoutTheme,
|
|
@@ -4076,20 +4292,7 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
4076
4292
|
flexDirection: new DirectionTheme(),
|
|
4077
4293
|
},
|
|
4078
4294
|
typography: defaultTypographyTheme,
|
|
4079
|
-
}, {
|
|
4080
|
-
md: true,
|
|
4081
|
-
inlineFlex: true,
|
|
4082
|
-
itemsCenter: true,
|
|
4083
|
-
outline: true,
|
|
4084
|
-
secondary: true,
|
|
4085
|
-
rounded: true,
|
|
4086
|
-
mono: true,
|
|
4087
|
-
normal: true,
|
|
4088
|
-
noShadow: true,
|
|
4089
|
-
padding: true,
|
|
4090
|
-
gap: true,
|
|
4091
|
-
ring: true,
|
|
4092
|
-
}, CHIP_CATEGORIES, (props, defaults) => {
|
|
4295
|
+
}, themeDefaults.chip, CHIP_CATEGORIES, (props, defaults) => {
|
|
4093
4296
|
return props.href ? "a" : "span";
|
|
4094
4297
|
});
|
|
4095
4298
|
|
|
@@ -4105,7 +4308,7 @@ const defaultCodeTheme = new ComponentTheme("code", "", {
|
|
|
4105
4308
|
text: GenericVariantTheme.createUIElementTextTheme(),
|
|
4106
4309
|
border: GenericVariantTheme.createUIElementBorderTheme(),
|
|
4107
4310
|
ring: GenericVariantTheme.createUIElementRingTheme(),
|
|
4108
|
-
shadow: GenericVariantTheme.
|
|
4311
|
+
shadow: GenericVariantTheme.createLayoutShadowTheme()
|
|
4109
4312
|
},
|
|
4110
4313
|
layout: {
|
|
4111
4314
|
...defaultLayoutTheme,
|
|
@@ -4116,16 +4319,7 @@ const defaultCodeTheme = new ComponentTheme("code", "", {
|
|
|
4116
4319
|
flexDirection: new DirectionTheme(),
|
|
4117
4320
|
},
|
|
4118
4321
|
typography: defaultTypographyTheme,
|
|
4119
|
-
},
|
|
4120
|
-
inline: true,
|
|
4121
|
-
outline: true,
|
|
4122
|
-
default: true,
|
|
4123
|
-
rounded: true,
|
|
4124
|
-
mono: true,
|
|
4125
|
-
padding: true,
|
|
4126
|
-
gap: true,
|
|
4127
|
-
ring: true,
|
|
4128
|
-
}, CODE_CATEGORIES);
|
|
4322
|
+
}, themeDefaults.code, CODE_CATEGORIES);
|
|
4129
4323
|
|
|
4130
4324
|
const isObject = (item) => {
|
|
4131
4325
|
return item !== null && typeof item === 'object' && !Array.isArray(item);
|
|
@@ -4244,12 +4438,7 @@ class ListStyleTheme extends BaseTheme {
|
|
|
4244
4438
|
}
|
|
4245
4439
|
}
|
|
4246
4440
|
|
|
4247
|
-
const
|
|
4248
|
-
md: true,
|
|
4249
|
-
default: true,
|
|
4250
|
-
sans: true,
|
|
4251
|
-
};
|
|
4252
|
-
const createTypographyComponentTheme = (tag, base = "text-balance", textSizeMap = textSizeClasses, defaults = typographyThemeDefaults) => {
|
|
4441
|
+
const createTypographyComponentTheme = (tag, base = "text-balance", textSizeMap = textSizeClasses, defaults = {}) => {
|
|
4253
4442
|
return new ComponentTheme(tag, base, {
|
|
4254
4443
|
size: {
|
|
4255
4444
|
text: new SizeTheme(textSizeMap),
|
|
@@ -4271,7 +4460,7 @@ const pageTitleTheme = createTypographyComponentTheme("h1", "text-balance tracki
|
|
|
4271
4460
|
md: "text-5xl max-lg:text-4xl max-md:text-3xl",
|
|
4272
4461
|
lg: "text-6xl max-lg:text-5xl max-md:text-4xl",
|
|
4273
4462
|
xl: "text-7xl max-lg:text-6xl max-md:text-5xl"
|
|
4274
|
-
}, mergeDefaults(
|
|
4463
|
+
}, mergeDefaults(themeDefaults.pageTitle, { semibold: true }));
|
|
4275
4464
|
// Section title specific theme
|
|
4276
4465
|
const sectionTitleTheme = createTypographyComponentTheme("h2", "text-balance w-fit", {
|
|
4277
4466
|
xs: "text-2xl max-lg:text-xl max-md:text-lg",
|
|
@@ -4279,11 +4468,11 @@ const sectionTitleTheme = createTypographyComponentTheme("h2", "text-balance w-f
|
|
|
4279
4468
|
md: "text-4xl max-lg:text-3xl max-md:text-2xl",
|
|
4280
4469
|
lg: "text-5xl max-lg:text-4xl max-md:text-3xl",
|
|
4281
4470
|
xl: "text-6xl max-lg:text-5xl max-md:text-4xl"
|
|
4282
|
-
}, mergeDefaults(
|
|
4471
|
+
}, mergeDefaults(themeDefaults.sectionTitle, { semibold: true }));
|
|
4283
4472
|
// Title specific theme
|
|
4284
|
-
const titleTheme = createTypographyComponentTheme("h3", "text-balance w-fit", { xs: "text-lg", sm: "text-xl", md: "text-2xl", lg: "text-3xl", xl: "text-4xl" }, mergeDefaults(
|
|
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 }));
|
|
4285
4474
|
// Text specific theme
|
|
4286
|
-
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);
|
|
4287
4476
|
// Link specific theme
|
|
4288
4477
|
const linkTheme = new ComponentTheme("a", "hover:underline w-fit cursor-pointer", {
|
|
4289
4478
|
size: {
|
|
@@ -4294,10 +4483,7 @@ const linkTheme = new ComponentTheme("a", "hover:underline w-fit cursor-pointer"
|
|
|
4294
4483
|
},
|
|
4295
4484
|
typography: defaultTypographyTheme,
|
|
4296
4485
|
layout: defaultLayoutTheme,
|
|
4297
|
-
},
|
|
4298
|
-
link: true,
|
|
4299
|
-
sans: true,
|
|
4300
|
-
}, TYPOGRAPHY_CATEGORIES);
|
|
4486
|
+
}, themeDefaults.link, TYPOGRAPHY_CATEGORIES);
|
|
4301
4487
|
// List specific theme
|
|
4302
4488
|
const listItemTheme = new ComponentTheme("li", "", {
|
|
4303
4489
|
size: {
|
|
@@ -4307,8 +4493,7 @@ const listItemTheme = new ComponentTheme("li", "", {
|
|
|
4307
4493
|
text: AppearanceTheme.createTheme({ base: textAppearanceClasses }),
|
|
4308
4494
|
},
|
|
4309
4495
|
typography: defaultTypographyTheme,
|
|
4310
|
-
},
|
|
4311
|
-
TYPOGRAPHY_CATEGORIES);
|
|
4496
|
+
}, themeDefaults.listItem, TYPOGRAPHY_CATEGORIES);
|
|
4312
4497
|
// List specific theme
|
|
4313
4498
|
const listTheme = new ComponentTheme("ul", "list-inside", {
|
|
4314
4499
|
size: {
|
|
@@ -4321,14 +4506,7 @@ const listTheme = new ComponentTheme("ul", "list-inside", {
|
|
|
4321
4506
|
typography: defaultTypographyTheme,
|
|
4322
4507
|
layout: defaultLayoutTheme,
|
|
4323
4508
|
listStyle: new ListStyleTheme(),
|
|
4324
|
-
}, {
|
|
4325
|
-
md: true,
|
|
4326
|
-
default: true,
|
|
4327
|
-
sans: true,
|
|
4328
|
-
normal: true,
|
|
4329
|
-
padding: true,
|
|
4330
|
-
disc: true,
|
|
4331
|
-
}, LIST_CATEGORIES, (props, defaults) => {
|
|
4509
|
+
}, themeDefaults.list, LIST_CATEGORIES, (props, defaults) => {
|
|
4332
4510
|
// Determine tag based on list style from props and defaults
|
|
4333
4511
|
const componentProps = props;
|
|
4334
4512
|
const defaultsRecord = defaults;
|
|
@@ -4386,7 +4564,7 @@ const defaultCardTheme = new ComponentTheme("div", "", {
|
|
|
4386
4564
|
wrap: new WrapTheme(),
|
|
4387
4565
|
direction: new DirectionTheme(),
|
|
4388
4566
|
breakpoint: new BreakpointTheme(),
|
|
4389
|
-
shadow: ShadowAppearanceTheme.
|
|
4567
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
4390
4568
|
},
|
|
4391
4569
|
appearance: {
|
|
4392
4570
|
background: AppearanceTheme.createLayoutBgTheme(),
|
|
@@ -4395,17 +4573,7 @@ const defaultCardTheme = new ComponentTheme("div", "", {
|
|
|
4395
4573
|
ring: AppearanceTheme.createTheme({ base: ringAppearanceClasses }),
|
|
4396
4574
|
},
|
|
4397
4575
|
typography: defaultTypographyTheme,
|
|
4398
|
-
}, {
|
|
4399
|
-
md: true,
|
|
4400
|
-
flex: true,
|
|
4401
|
-
default: true,
|
|
4402
|
-
rounded: true,
|
|
4403
|
-
normal: true,
|
|
4404
|
-
column: true,
|
|
4405
|
-
border: true,
|
|
4406
|
-
gap: true,
|
|
4407
|
-
padding: true,
|
|
4408
|
-
}, CARD_CATEGORIES, (props, defaults) => {
|
|
4576
|
+
}, themeDefaults.card, CARD_CATEGORIES, (props, defaults) => {
|
|
4409
4577
|
return props.href ? "a" : "div";
|
|
4410
4578
|
});
|
|
4411
4579
|
|
|
@@ -4426,18 +4594,9 @@ const defaultRowTheme = new ComponentTheme("div", "", {
|
|
|
4426
4594
|
background: AppearanceTheme.createLayoutBgTheme(),
|
|
4427
4595
|
border: GenericVariantTheme.createUIElementBorderTheme(),
|
|
4428
4596
|
ring: GenericVariantTheme.createUIElementRingTheme(),
|
|
4429
|
-
shadow: GenericVariantTheme.
|
|
4597
|
+
shadow: GenericVariantTheme.createLayoutShadowTheme(),
|
|
4430
4598
|
}
|
|
4431
|
-
}, {
|
|
4432
|
-
row: true,
|
|
4433
|
-
md: true,
|
|
4434
|
-
flex: true,
|
|
4435
|
-
itemsCenter: true,
|
|
4436
|
-
gap: true,
|
|
4437
|
-
noBorder: true,
|
|
4438
|
-
noRing: true,
|
|
4439
|
-
sharp: true,
|
|
4440
|
-
}, ROW_CATEGORIES, (props, defaults) => {
|
|
4599
|
+
}, themeDefaults.row, ROW_CATEGORIES, (props, defaults) => {
|
|
4441
4600
|
// Determine tag based on href prop
|
|
4442
4601
|
return props.href ? "a" : "div";
|
|
4443
4602
|
});
|
|
@@ -4452,11 +4611,7 @@ const defaultDividerTheme = new ComponentTheme("div", "h-px w-full", {
|
|
|
4452
4611
|
}),
|
|
4453
4612
|
},
|
|
4454
4613
|
layout: defaultLayoutTheme,
|
|
4455
|
-
},
|
|
4456
|
-
md: true,
|
|
4457
|
-
default: true,
|
|
4458
|
-
noPadding: true,
|
|
4459
|
-
}, DIVIDER_CATEGORIES);
|
|
4614
|
+
}, themeDefaults.divider, DIVIDER_CATEGORIES);
|
|
4460
4615
|
|
|
4461
4616
|
const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full", {
|
|
4462
4617
|
size: {
|
|
@@ -4482,16 +4637,9 @@ const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full
|
|
|
4482
4637
|
text: AppearanceTheme.createTheme({ base: textAppearanceClasses }),
|
|
4483
4638
|
border: AppearanceTheme.createTheme({ base: borderAppearanceClasses }),
|
|
4484
4639
|
ring: AppearanceTheme.createTheme({ base: ringAppearanceClasses }),
|
|
4485
|
-
shadow: GenericVariantTheme.
|
|
4640
|
+
shadow: GenericVariantTheme.createLayoutShadowTheme(),
|
|
4486
4641
|
}
|
|
4487
|
-
}, {
|
|
4488
|
-
noRing: true,
|
|
4489
|
-
flex: true,
|
|
4490
|
-
md: true,
|
|
4491
|
-
itemsCenter: true,
|
|
4492
|
-
gap: true,
|
|
4493
|
-
sharp: true,
|
|
4494
|
-
}, CONTAINER_CATEGORIES, (props, defaults) => {
|
|
4642
|
+
}, themeDefaults.container, CONTAINER_CATEGORIES, (props, defaults) => {
|
|
4495
4643
|
return props.href ? "a" : "div";
|
|
4496
4644
|
});
|
|
4497
4645
|
|
|
@@ -4511,17 +4659,9 @@ const defaultColTheme = new ComponentTheme("div", "", {
|
|
|
4511
4659
|
background: AppearanceTheme.createLayoutBgTheme(),
|
|
4512
4660
|
border: GenericVariantTheme.createUIElementBorderTheme(),
|
|
4513
4661
|
ring: GenericVariantTheme.createUIElementRingTheme(),
|
|
4514
|
-
shadow: GenericVariantTheme.
|
|
4662
|
+
shadow: GenericVariantTheme.createLayoutShadowTheme(),
|
|
4515
4663
|
}
|
|
4516
|
-
}, {
|
|
4517
|
-
column: true,
|
|
4518
|
-
md: true,
|
|
4519
|
-
flex: true,
|
|
4520
|
-
gap: true,
|
|
4521
|
-
noBorder: true,
|
|
4522
|
-
noRing: true,
|
|
4523
|
-
sharp: true,
|
|
4524
|
-
}, COL_CATEGORIES, (props, defaults) => {
|
|
4664
|
+
}, themeDefaults.col, COL_CATEGORIES, (props, defaults) => {
|
|
4525
4665
|
return props.href ? "a" : "div";
|
|
4526
4666
|
});
|
|
4527
4667
|
|
|
@@ -4544,19 +4684,9 @@ const defaultStackTheme = new ComponentTheme("div", "", {
|
|
|
4544
4684
|
background: AppearanceTheme.createLayoutBgTheme(),
|
|
4545
4685
|
border: GenericVariantTheme.createUIElementBorderTheme(),
|
|
4546
4686
|
ring: GenericVariantTheme.createUIElementRingTheme(),
|
|
4547
|
-
shadow: GenericVariantTheme.
|
|
4687
|
+
shadow: GenericVariantTheme.createLayoutShadowTheme(),
|
|
4548
4688
|
}
|
|
4549
|
-
}, {
|
|
4550
|
-
md: true,
|
|
4551
|
-
flex: true,
|
|
4552
|
-
column: true,
|
|
4553
|
-
flexWrap: true,
|
|
4554
|
-
gap: true,
|
|
4555
|
-
padding: true,
|
|
4556
|
-
noBorder: true,
|
|
4557
|
-
noRing: true,
|
|
4558
|
-
sharp: true,
|
|
4559
|
-
}, STACK_CATEGORIES, (props, defaults) => {
|
|
4689
|
+
}, themeDefaults.stack, STACK_CATEGORIES, (props, defaults) => {
|
|
4560
4690
|
return props.href ? "a" : "div";
|
|
4561
4691
|
});
|
|
4562
4692
|
|
|
@@ -4584,7 +4714,7 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full flex-col", {
|
|
|
4584
4714
|
text: AppearanceTheme.createTheme({ base: textAppearanceClasses }),
|
|
4585
4715
|
border: AppearanceTheme.createTheme({ base: borderAppearanceClasses }),
|
|
4586
4716
|
ring: AppearanceTheme.createTheme({ base: ringAppearanceClasses }),
|
|
4587
|
-
shadow: ShadowAppearanceTheme.
|
|
4717
|
+
shadow: ShadowAppearanceTheme.createLayoutTheme(),
|
|
4588
4718
|
},
|
|
4589
4719
|
layout: {
|
|
4590
4720
|
...defaultLayoutTheme,
|
|
@@ -4594,26 +4724,10 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full flex-col", {
|
|
|
4594
4724
|
ring: new RingTheme(),
|
|
4595
4725
|
radius: RadiusTheme.createLayoutTheme(),
|
|
4596
4726
|
},
|
|
4597
|
-
}, {
|
|
4598
|
-
md: true,
|
|
4599
|
-
flex: true,
|
|
4600
|
-
default: true,
|
|
4601
|
-
itemsStart: true,
|
|
4602
|
-
gap: true,
|
|
4603
|
-
padding: true,
|
|
4604
|
-
noBorder: true,
|
|
4605
|
-
noRing: true,
|
|
4606
|
-
noShadow: true,
|
|
4607
|
-
sharp: true,
|
|
4608
|
-
}, SECTION_CATEGORIES, (props, defaults) => {
|
|
4727
|
+
}, themeDefaults.section, SECTION_CATEGORIES, (props, defaults) => {
|
|
4609
4728
|
return props.href ? "a" : "div";
|
|
4610
4729
|
});
|
|
4611
4730
|
|
|
4612
|
-
const gridDefaults = {
|
|
4613
|
-
md: true,
|
|
4614
|
-
gap: true,
|
|
4615
|
-
grid: true,
|
|
4616
|
-
};
|
|
4617
4731
|
const gridSubThemes = {
|
|
4618
4732
|
size: {
|
|
4619
4733
|
gap: new GapTheme({
|
|
@@ -4633,16 +4747,17 @@ const gridSubThemes = {
|
|
|
4633
4747
|
flexDirection: new DirectionTheme(),
|
|
4634
4748
|
},
|
|
4635
4749
|
};
|
|
4636
|
-
const defaultGrid2Theme = new ComponentTheme("div", "grid-cols-1 md:grid-cols-2", gridSubThemes,
|
|
4750
|
+
const defaultGrid2Theme = new ComponentTheme("div", "grid-cols-1 md:grid-cols-2", gridSubThemes, themeDefaults.grid2, GRID_CATEGORIES, (props, defaults) => {
|
|
4637
4751
|
return props.href ? "a" : "div";
|
|
4638
4752
|
});
|
|
4639
|
-
const defaultGrid3Theme = new ComponentTheme("div", "grid-cols-1 md:grid-cols-3", gridSubThemes,
|
|
4753
|
+
const defaultGrid3Theme = new ComponentTheme("div", "grid-cols-1 md:grid-cols-3", gridSubThemes, themeDefaults.grid3, GRID_CATEGORIES, (props, defaults) => {
|
|
4640
4754
|
return props.href ? "a" : "div";
|
|
4641
4755
|
});
|
|
4642
|
-
const defaultGrid4Theme = new ComponentTheme("div", "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4", gridSubThemes,
|
|
4756
|
+
const defaultGrid4Theme = new ComponentTheme("div", "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4", gridSubThemes, themeDefaults.grid4, GRID_CATEGORIES, (props, defaults) => {
|
|
4643
4757
|
return props.href ? "a" : "div";
|
|
4644
4758
|
});
|
|
4645
4759
|
|
|
4760
|
+
var _a, _b, _c;
|
|
4646
4761
|
const defaultCheckboxTheme = new ComponentTheme("input", "peer col-start-1 row-start-1 cursor-pointer appearance-none ring-transparent", {
|
|
4647
4762
|
size: {
|
|
4648
4763
|
size: new SizeTheme({
|
|
@@ -4674,25 +4789,14 @@ const defaultCheckboxTheme = new ComponentTheme("input", "peer col-start-1 row-s
|
|
|
4674
4789
|
check: GenericVariantTheme.createCheckedAppearanceTheme(),
|
|
4675
4790
|
shadow: GenericVariantTheme.createUIElementShadowTheme(),
|
|
4676
4791
|
}
|
|
4677
|
-
}, {
|
|
4678
|
-
md: true,
|
|
4679
|
-
default: true,
|
|
4680
|
-
border: true,
|
|
4681
|
-
rounded: true,
|
|
4682
|
-
noRing: true,
|
|
4683
|
-
noShadow: true,
|
|
4684
|
-
filled: true,
|
|
4685
|
-
}, CHECKBOX_CATEGORIES);
|
|
4792
|
+
}, ((_a = themeDefaults.checkbox) === null || _a === void 0 ? void 0 : _a.input) || {}, CHECKBOX_CATEGORIES);
|
|
4686
4793
|
const defaultCheckTheme = new ComponentTheme("span", "invisible col-start-1 row-start-1 peer-checked:visible", {
|
|
4687
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" }) }),
|
|
4688
4795
|
appearance: {
|
|
4689
4796
|
color: GenericVariantTheme.createUIElementTextTheme()
|
|
4690
4797
|
},
|
|
4691
4798
|
layout: defaultLayoutTheme,
|
|
4692
|
-
}, {
|
|
4693
|
-
default: true,
|
|
4694
|
-
filled: true,
|
|
4695
|
-
}, CHECKBOX_CATEGORIES);
|
|
4799
|
+
}, ((_b = themeDefaults.checkbox) === null || _b === void 0 ? void 0 : _b.check) || {}, CHECKBOX_CATEGORIES);
|
|
4696
4800
|
const defaultCheckboxWrapperTheme = new ComponentTheme("span", "", {
|
|
4697
4801
|
size: {
|
|
4698
4802
|
height: new SizeTheme({
|
|
@@ -4704,12 +4808,7 @@ const defaultCheckboxWrapperTheme = new ComponentTheme("span", "", {
|
|
|
4704
4808
|
})
|
|
4705
4809
|
},
|
|
4706
4810
|
layout: defaultLayoutTheme,
|
|
4707
|
-
}, {
|
|
4708
|
-
md: true,
|
|
4709
|
-
inlineGrid: true,
|
|
4710
|
-
itemsCenter: true,
|
|
4711
|
-
justifyCenter: true,
|
|
4712
|
-
}, CHECKBOX_CATEGORIES);
|
|
4811
|
+
}, ((_c = themeDefaults.checkbox) === null || _c === void 0 ? void 0 : _c.wrapper) || {}, CHECKBOX_CATEGORIES);
|
|
4713
4812
|
|
|
4714
4813
|
const defaultLabelTheme = new ComponentTheme("label", "has-[input]:cursor-pointer cursor-default", {
|
|
4715
4814
|
size: {
|
|
@@ -4725,14 +4824,7 @@ const defaultLabelTheme = new ComponentTheme("label", "has-[input]:cursor-pointe
|
|
|
4725
4824
|
wrap: new WrapTheme(),
|
|
4726
4825
|
flexDirection: new DirectionTheme(),
|
|
4727
4826
|
},
|
|
4728
|
-
},
|
|
4729
|
-
md: true,
|
|
4730
|
-
flex: true,
|
|
4731
|
-
gap: true,
|
|
4732
|
-
default: true,
|
|
4733
|
-
sans: true,
|
|
4734
|
-
medium: true,
|
|
4735
|
-
}, LABEL_CATEGORIES);
|
|
4827
|
+
}, themeDefaults.label, LABEL_CATEGORIES);
|
|
4736
4828
|
|
|
4737
4829
|
const defaultImgTheme = new ComponentTheme("img", "object-cover", // Default to cover for better image display
|
|
4738
4830
|
{
|
|
@@ -4745,14 +4837,9 @@ const defaultImgTheme = new ComponentTheme("img", "object-cover", // Default to
|
|
|
4745
4837
|
appearance: {
|
|
4746
4838
|
border: GenericVariantTheme.createUIElementBorderTheme(),
|
|
4747
4839
|
ring: GenericVariantTheme.createUIElementRingTheme(),
|
|
4748
|
-
shadow: GenericVariantTheme.
|
|
4840
|
+
shadow: GenericVariantTheme.createLayoutShadowTheme()
|
|
4749
4841
|
}
|
|
4750
|
-
},
|
|
4751
|
-
rounded: true,
|
|
4752
|
-
noShadow: true,
|
|
4753
|
-
noBorder: true,
|
|
4754
|
-
noRing: true,
|
|
4755
|
-
}, IMG_CATEGORIES);
|
|
4842
|
+
}, themeDefaults.img, IMG_CATEGORIES);
|
|
4756
4843
|
|
|
4757
4844
|
const defaultTheme = {
|
|
4758
4845
|
button: defaultButtonTheme,
|
|
@@ -5021,5 +5108,5 @@ const List = forwardRef(function List(props, ref) {
|
|
|
5021
5108
|
return jsx(ThemedComponent, { ref: ref, theme: theme.list, ...props });
|
|
5022
5109
|
});
|
|
5023
5110
|
|
|
5024
|
-
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 };
|
|
5025
5112
|
//# sourceMappingURL=index.esm.js.map
|