@vaneui/ui 0.1.4 → 0.1.6
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/dist/components/themeContext.d.ts +19 -19
- package/dist/components/ui/props/keys.d.ts +8 -10
- package/dist/components/ui/theme/appearance/bgAppearanceTheme.d.ts +8 -0
- package/dist/components/ui/theme/appearance/genericVariantTheme.d.ts +16 -0
- package/dist/components/ui/theme/appearance/shadowAppearanceTheme.d.ts +10 -0
- package/dist/components/ui/theme/appearance/textAppearanceTheme.d.ts +3 -4
- package/dist/components/ui/theme/badgeTheme.d.ts +12 -11
- package/dist/components/ui/theme/buttonTheme.d.ts +12 -11
- package/dist/components/ui/theme/cardTheme.d.ts +7 -7
- package/dist/components/ui/theme/chipTheme.d.ts +12 -11
- package/dist/components/ui/theme/colTheme.d.ts +3 -3
- package/dist/components/ui/theme/common/ComponentTheme.d.ts +10 -6
- package/dist/components/ui/theme/containerTheme.d.ts +5 -5
- package/dist/components/ui/theme/dividerTheme.d.ts +2 -2
- package/dist/components/ui/theme/gridTheme.d.ts +3 -3
- package/dist/components/ui/theme/rowTheme.d.ts +3 -3
- package/dist/components/ui/theme/sectionTheme.d.ts +12 -10
- package/dist/components/ui/theme/stackTheme.d.ts +3 -3
- package/dist/components/ui/theme/typographyComponentTheme.d.ts +11 -11
- package/dist/index.esm.js +264 -333
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +263 -333
- package/dist/index.js.map +1 -1
- package/dist/ui.css +44 -51
- package/package.json +2 -2
- package/dist/components/ui/theme/appearance/layoutAppearanceTheme.d.ts +0 -10
- package/dist/components/ui/theme/appearance/variantTheme.d.ts +0 -15
- package/dist/components/ui/theme/layout/shadowTheme.d.ts +0 -9
package/dist/index.esm.js
CHANGED
|
@@ -12,9 +12,8 @@ class BaseTheme {
|
|
|
12
12
|
const MODE_KEYS = ['base', 'hover', 'active'];
|
|
13
13
|
const SIZE_KEYS = ['xs', 'sm', 'md', 'lg', 'xl'];
|
|
14
14
|
const VARIANT_KEYS = ['filled', 'outline'];
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const TEXT_APPEARANCE_KEYS = [...UI_APPEARANCE_KEYS, 'muted', 'link'];
|
|
15
|
+
const BG_APPEARANCE_KEYS = ['default', 'accent', 'primary', 'secondary', 'tertiary', 'success', 'danger', 'warning', 'info', 'transparent'];
|
|
16
|
+
const TEXT_APPEARANCE_KEYS = [...BG_APPEARANCE_KEYS, 'muted', 'link'];
|
|
18
17
|
const FONT_FAMILY_KEYS = ['sans', 'serif', 'mono'];
|
|
19
18
|
const FONT_WEIGHT_KEYS = ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black'];
|
|
20
19
|
const FONT_STYLE_KEYS = ['italic', 'notItalic'];
|
|
@@ -45,7 +44,6 @@ const EXCLUSIVE_KEY_GROUPS = [
|
|
|
45
44
|
SIZE_KEYS,
|
|
46
45
|
TEXT_APPEARANCE_KEYS,
|
|
47
46
|
BG_APPEARANCE_KEYS,
|
|
48
|
-
UI_APPEARANCE_KEYS,
|
|
49
47
|
VARIANT_KEYS,
|
|
50
48
|
FONT_FAMILY_KEYS,
|
|
51
49
|
FONT_WEIGHT_KEYS,
|
|
@@ -439,75 +437,6 @@ TextAlignTheme.defaultClasses = {
|
|
|
439
437
|
textJustify: "text-justify",
|
|
440
438
|
};
|
|
441
439
|
|
|
442
|
-
const isObject = (item) => {
|
|
443
|
-
return item !== null && typeof item === 'object' && !Array.isArray(item);
|
|
444
|
-
};
|
|
445
|
-
const deepMerge = (target, source) => {
|
|
446
|
-
const output = Object.assign(Object.create(Object.getPrototypeOf(target)), target);
|
|
447
|
-
for (const key in source) {
|
|
448
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
449
|
-
const sourceValue = source[key];
|
|
450
|
-
const targetValue = output[key];
|
|
451
|
-
if (sourceValue === undefined) {
|
|
452
|
-
continue;
|
|
453
|
-
}
|
|
454
|
-
// Special case: If the key is 'defaults', use the contextual mergeDefaults function.
|
|
455
|
-
if (key === 'defaults' &&
|
|
456
|
-
isObject(targetValue) &&
|
|
457
|
-
isObject(sourceValue)) {
|
|
458
|
-
output[key] = mergeDefaults(targetValue, sourceValue);
|
|
459
|
-
}
|
|
460
|
-
// For all other objects, use the standard recursive deep merge.
|
|
461
|
-
else if (isObject(targetValue) && isObject(sourceValue)) {
|
|
462
|
-
output[key] = deepMerge(targetValue, sourceValue);
|
|
463
|
-
}
|
|
464
|
-
// For non-object values, just assign the value from the source.
|
|
465
|
-
else {
|
|
466
|
-
output[key] = sourceValue;
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
return output;
|
|
471
|
-
};
|
|
472
|
-
const deepClone = (source) => {
|
|
473
|
-
if (!isObject(source)) {
|
|
474
|
-
return source;
|
|
475
|
-
}
|
|
476
|
-
const output = Object.assign(Object.create(Object.getPrototypeOf(source)), source);
|
|
477
|
-
for (const key in output) {
|
|
478
|
-
if (Object.prototype.hasOwnProperty.call(output, key)) {
|
|
479
|
-
output[key] = deepClone(output[key]);
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
return output;
|
|
483
|
-
};
|
|
484
|
-
const findGroup = (key) => EXCLUSIVE_KEY_GROUPS.find(group => group.includes(key));
|
|
485
|
-
const mergeDefaults = (baseDefaults, overrideDefaults) => {
|
|
486
|
-
const finalDefaults = { ...baseDefaults };
|
|
487
|
-
// Iterate over the override keys to apply them.
|
|
488
|
-
for (const key in overrideDefaults) {
|
|
489
|
-
if (Object.prototype.hasOwnProperty.call(overrideDefaults, key)) {
|
|
490
|
-
const overrideValue = overrideDefaults[key];
|
|
491
|
-
// If the override is setting a key to true...
|
|
492
|
-
if (overrideValue) {
|
|
493
|
-
// Find the exclusive group this key belongs to (e.g., SIZE_KEYS).
|
|
494
|
-
const group = findGroup(key);
|
|
495
|
-
// If the key is part of an exclusive group...
|
|
496
|
-
if (group) {
|
|
497
|
-
// ...set all other keys in that group to false.
|
|
498
|
-
group.forEach(groupKey => {
|
|
499
|
-
if (groupKey !== key) {
|
|
500
|
-
finalDefaults[groupKey] = false;
|
|
501
|
-
}
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
finalDefaults[key] = overrideValue;
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
return finalDefaults;
|
|
509
|
-
};
|
|
510
|
-
|
|
511
440
|
class DisplayTheme extends BaseTheme {
|
|
512
441
|
constructor(initialConfig) {
|
|
513
442
|
super();
|
|
@@ -3246,29 +3175,27 @@ const getDefaultConfig = () => {
|
|
|
3246
3175
|
};
|
|
3247
3176
|
const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
|
|
3248
3177
|
|
|
3178
|
+
const defaultLayoutTheme = {
|
|
3179
|
+
hide: new HideTheme(),
|
|
3180
|
+
items: new ItemsTheme(),
|
|
3181
|
+
justify: new JustifyTheme(),
|
|
3182
|
+
position: new PositionTheme(),
|
|
3183
|
+
display: new DisplayTheme()
|
|
3184
|
+
};
|
|
3185
|
+
const defaultTypographyTheme = {
|
|
3186
|
+
fontFamily: new FontFamilyTheme(),
|
|
3187
|
+
fontWeight: new FontWeightTheme(),
|
|
3188
|
+
fontStyle: new FontStyleTheme(),
|
|
3189
|
+
textDecoration: new TextDecorationTheme(),
|
|
3190
|
+
textTransform: new TextTransformTheme(),
|
|
3191
|
+
textAlign: new TextAlignTheme()
|
|
3192
|
+
};
|
|
3249
3193
|
class ComponentTheme {
|
|
3250
3194
|
constructor(tag, base, subThemes, defaults = {}) {
|
|
3251
3195
|
this.tag = tag;
|
|
3252
3196
|
this.base = base;
|
|
3253
3197
|
this.defaults = defaults;
|
|
3254
|
-
|
|
3255
|
-
layout: {
|
|
3256
|
-
hide: new HideTheme(),
|
|
3257
|
-
items: new ItemsTheme(),
|
|
3258
|
-
justify: new JustifyTheme(),
|
|
3259
|
-
position: new PositionTheme(),
|
|
3260
|
-
display: new DisplayTheme()
|
|
3261
|
-
},
|
|
3262
|
-
typography: {
|
|
3263
|
-
fontFamily: new FontFamilyTheme(),
|
|
3264
|
-
fontWeight: new FontWeightTheme(),
|
|
3265
|
-
fontStyle: new FontStyleTheme(),
|
|
3266
|
-
textDecoration: new TextDecorationTheme(),
|
|
3267
|
-
textTransform: new TextTransformTheme(),
|
|
3268
|
-
textAlign: new TextAlignTheme()
|
|
3269
|
-
}
|
|
3270
|
-
};
|
|
3271
|
-
this.themes = deepMerge(defaultInternalThemes, subThemes);
|
|
3198
|
+
this.themes = subThemes;
|
|
3272
3199
|
}
|
|
3273
3200
|
getClasses(props, defaults = this.defaults) {
|
|
3274
3201
|
const user = props;
|
|
@@ -3381,57 +3308,6 @@ RadiusTheme.defaultClasses = {
|
|
|
3381
3308
|
}
|
|
3382
3309
|
};
|
|
3383
3310
|
|
|
3384
|
-
class ShadowTheme extends BaseTheme {
|
|
3385
|
-
constructor(initial) {
|
|
3386
|
-
super();
|
|
3387
|
-
SHADOW_KEYS.forEach((key) => {
|
|
3388
|
-
var _a;
|
|
3389
|
-
this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : ShadowTheme.defaultClasses[key];
|
|
3390
|
-
});
|
|
3391
|
-
}
|
|
3392
|
-
getClasses(props, defaults) {
|
|
3393
|
-
const size = pickFirstTruthyKey(props, defaults, SIZE_KEYS) || 'md';
|
|
3394
|
-
const key = pickFirstTruthyKey(props, defaults, SHADOW_KEYS);
|
|
3395
|
-
if (key === undefined) {
|
|
3396
|
-
return [];
|
|
3397
|
-
}
|
|
3398
|
-
const isModeStringMap = MODE_KEYS.every(m => typeof this[key][m] === "string");
|
|
3399
|
-
return MODE_KEYS.map(mode => isModeStringMap
|
|
3400
|
-
? this[key][mode]
|
|
3401
|
-
: this[key][mode][size]);
|
|
3402
|
-
}
|
|
3403
|
-
}
|
|
3404
|
-
ShadowTheme.defaultClasses = {
|
|
3405
|
-
shadow: {
|
|
3406
|
-
base: {
|
|
3407
|
-
xs: "shadow-2xs",
|
|
3408
|
-
sm: "shadow-xs",
|
|
3409
|
-
md: "shadow-sm",
|
|
3410
|
-
lg: "shadow-md",
|
|
3411
|
-
xl: "shadow-lg"
|
|
3412
|
-
},
|
|
3413
|
-
hover: {
|
|
3414
|
-
xs: "hover:shadow-xs",
|
|
3415
|
-
sm: "hover:shadow-sm",
|
|
3416
|
-
md: "hover:shadow-md",
|
|
3417
|
-
lg: "hover:shadow-lg",
|
|
3418
|
-
xl: "hover:shadow-xl"
|
|
3419
|
-
},
|
|
3420
|
-
active: {
|
|
3421
|
-
xs: "active:shadow-xs",
|
|
3422
|
-
sm: "active:shadow-sm",
|
|
3423
|
-
md: "active:shadow-md",
|
|
3424
|
-
lg: "active:shadow-lg",
|
|
3425
|
-
xl: "active:shadow-xl"
|
|
3426
|
-
},
|
|
3427
|
-
},
|
|
3428
|
-
noShadow: {
|
|
3429
|
-
base: "shadow-none",
|
|
3430
|
-
hover: "hover:shadow-none",
|
|
3431
|
-
active: "active:shadow-none",
|
|
3432
|
-
}
|
|
3433
|
-
};
|
|
3434
|
-
|
|
3435
3311
|
class BorderTheme extends BaseTheme {
|
|
3436
3312
|
constructor(initial) {
|
|
3437
3313
|
super();
|
|
@@ -3549,6 +3425,34 @@ PyTheme.defaultClasses = {
|
|
|
3549
3425
|
noPadding: "py-0"
|
|
3550
3426
|
};
|
|
3551
3427
|
|
|
3428
|
+
class TextAppearanceTheme extends BaseTheme {
|
|
3429
|
+
constructor(config) {
|
|
3430
|
+
super();
|
|
3431
|
+
Object.assign(this, config);
|
|
3432
|
+
}
|
|
3433
|
+
getClasses(props, defaults) {
|
|
3434
|
+
const pickedAppearanceKey = pickFirstTruthyKey(props, defaults, TEXT_APPEARANCE_KEYS) || 'default';
|
|
3435
|
+
const modesForAppearance = this[pickedAppearanceKey];
|
|
3436
|
+
if (!modesForAppearance) {
|
|
3437
|
+
return MODE_KEYS.map(() => '');
|
|
3438
|
+
}
|
|
3439
|
+
return MODE_KEYS.map(mode => modesForAppearance[mode] || '');
|
|
3440
|
+
}
|
|
3441
|
+
static createTheme(src = {}) {
|
|
3442
|
+
const finalConfig = Object.fromEntries(TEXT_APPEARANCE_KEYS.map(textKey => [
|
|
3443
|
+
textKey,
|
|
3444
|
+
Object.fromEntries(MODE_KEYS.map(modeKey => {
|
|
3445
|
+
var _a;
|
|
3446
|
+
return [
|
|
3447
|
+
modeKey,
|
|
3448
|
+
((_a = src[modeKey]) === null || _a === void 0 ? void 0 : _a[textKey]) || ''
|
|
3449
|
+
];
|
|
3450
|
+
})),
|
|
3451
|
+
]));
|
|
3452
|
+
return new TextAppearanceTheme(finalConfig);
|
|
3453
|
+
}
|
|
3454
|
+
}
|
|
3455
|
+
|
|
3552
3456
|
const filledTextAppearanceClasses = {
|
|
3553
3457
|
default: "text-white",
|
|
3554
3458
|
primary: "text-white",
|
|
@@ -3561,6 +3465,7 @@ const filledTextAppearanceClasses = {
|
|
|
3561
3465
|
danger: "text-white",
|
|
3562
3466
|
warning: "text-white",
|
|
3563
3467
|
info: "text-white",
|
|
3468
|
+
transparent: "text-transparent",
|
|
3564
3469
|
};
|
|
3565
3470
|
const textAppearanceClasses = {
|
|
3566
3471
|
default: "text-(--text-color-default)",
|
|
@@ -3574,6 +3479,7 @@ const textAppearanceClasses = {
|
|
|
3574
3479
|
danger: "text-(--text-color-danger)",
|
|
3575
3480
|
warning: "text-(--text-color-warning)",
|
|
3576
3481
|
info: "text-(--text-color-info)",
|
|
3482
|
+
transparent: "text-transparent",
|
|
3577
3483
|
};
|
|
3578
3484
|
const textSizeClasses = {
|
|
3579
3485
|
xs: "text-xs",
|
|
@@ -3583,58 +3489,6 @@ const textSizeClasses = {
|
|
|
3583
3489
|
xl: "text-xl",
|
|
3584
3490
|
};
|
|
3585
3491
|
|
|
3586
|
-
class TextAppearanceTheme extends BaseTheme {
|
|
3587
|
-
constructor(initialOverrides) {
|
|
3588
|
-
super();
|
|
3589
|
-
TEXT_APPEARANCE_KEYS.forEach((textKey) => {
|
|
3590
|
-
const defaultModesForKey = TextAppearanceTheme.defaultFullConfig[textKey];
|
|
3591
|
-
const overrideModesForKey = initialOverrides === null || initialOverrides === void 0 ? void 0 : initialOverrides[textKey];
|
|
3592
|
-
this[textKey] = {
|
|
3593
|
-
...defaultModesForKey,
|
|
3594
|
-
...(overrideModesForKey || {}),
|
|
3595
|
-
};
|
|
3596
|
-
});
|
|
3597
|
-
}
|
|
3598
|
-
getClasses(props, defaults) {
|
|
3599
|
-
const pickedAppearanceKey = pickFirstTruthyKey(props, defaults, TEXT_APPEARANCE_KEYS) || 'default';
|
|
3600
|
-
const modesForAppearance = this[pickedAppearanceKey];
|
|
3601
|
-
if (!modesForAppearance) {
|
|
3602
|
-
return MODE_KEYS.map(() => '');
|
|
3603
|
-
}
|
|
3604
|
-
return MODE_KEYS.map(mode => modesForAppearance[mode] || '');
|
|
3605
|
-
}
|
|
3606
|
-
static createDefaultStyle(src = {}) {
|
|
3607
|
-
const initialOverridesForConstructor = {};
|
|
3608
|
-
TEXT_APPEARANCE_KEYS.forEach((textKey) => {
|
|
3609
|
-
const modesForCurrentTextKey = {};
|
|
3610
|
-
let keyHasDataInSrc = false;
|
|
3611
|
-
MODE_KEYS.forEach((modeKey) => {
|
|
3612
|
-
var _a;
|
|
3613
|
-
const classValue = (_a = src[modeKey]) === null || _a === void 0 ? void 0 : _a[textKey];
|
|
3614
|
-
if (classValue !== undefined) {
|
|
3615
|
-
modesForCurrentTextKey[modeKey] = classValue;
|
|
3616
|
-
keyHasDataInSrc = true;
|
|
3617
|
-
}
|
|
3618
|
-
});
|
|
3619
|
-
if (keyHasDataInSrc) {
|
|
3620
|
-
initialOverridesForConstructor[textKey] = modesForCurrentTextKey;
|
|
3621
|
-
}
|
|
3622
|
-
});
|
|
3623
|
-
return new TextAppearanceTheme(initialOverridesForConstructor);
|
|
3624
|
-
}
|
|
3625
|
-
}
|
|
3626
|
-
TextAppearanceTheme.defaultFullConfig = (() => {
|
|
3627
|
-
const config = {};
|
|
3628
|
-
TEXT_APPEARANCE_KEYS.forEach((key) => {
|
|
3629
|
-
config[key] = {
|
|
3630
|
-
base: textAppearanceClasses[key] || '',
|
|
3631
|
-
hover: '',
|
|
3632
|
-
active: '',
|
|
3633
|
-
};
|
|
3634
|
-
});
|
|
3635
|
-
return config;
|
|
3636
|
-
})();
|
|
3637
|
-
|
|
3638
3492
|
const filledBackgroundAppearanceClasses = {
|
|
3639
3493
|
default: "bg-(--filled-background-color-default)",
|
|
3640
3494
|
primary: "bg-(--filled-background-color-primary)",
|
|
@@ -3731,6 +3585,7 @@ const bgBorderAppearanceClasses = {
|
|
|
3731
3585
|
info: "bg-(--border-color-info)",
|
|
3732
3586
|
muted: "bg-(--border-color-muted)",
|
|
3733
3587
|
link: "bg-(--border-color-link)",
|
|
3588
|
+
transparent: "bg-transparent",
|
|
3734
3589
|
};
|
|
3735
3590
|
const borderAppearanceClasses = {
|
|
3736
3591
|
default: "border-(--border-color-default)",
|
|
@@ -3744,6 +3599,7 @@ const borderAppearanceClasses = {
|
|
|
3744
3599
|
info: "border-(--border-color-info)",
|
|
3745
3600
|
muted: "border-(--border-color-muted)",
|
|
3746
3601
|
link: "border-(--border-color-link)",
|
|
3602
|
+
transparent: "border-transparent",
|
|
3747
3603
|
};
|
|
3748
3604
|
const filledBorderAppearanceClasses = {
|
|
3749
3605
|
default: "border-(--filled-border-color-default)",
|
|
@@ -3757,6 +3613,7 @@ const filledBorderAppearanceClasses = {
|
|
|
3757
3613
|
info: "border-(--filled-border-color-info)",
|
|
3758
3614
|
muted: "border-(--filled-border-color-muted)",
|
|
3759
3615
|
link: "border-(--filled-border-color-link)",
|
|
3616
|
+
transparent: "border-transparent",
|
|
3760
3617
|
};
|
|
3761
3618
|
const ringAppearanceClasses = {
|
|
3762
3619
|
default: "ring-(--border-color-default)",
|
|
@@ -3770,6 +3627,7 @@ const ringAppearanceClasses = {
|
|
|
3770
3627
|
info: "ring-(--border-color-info)",
|
|
3771
3628
|
muted: "ring-(--border-color-muted)",
|
|
3772
3629
|
link: "ring-(--border-color-link)",
|
|
3630
|
+
transparent: "ring-transparent",
|
|
3773
3631
|
};
|
|
3774
3632
|
const filledRingAppearanceClasses = {
|
|
3775
3633
|
default: "ring-(--filled-border-color-default)",
|
|
@@ -3783,67 +3641,109 @@ const filledRingAppearanceClasses = {
|
|
|
3783
3641
|
info: "ring-(--filled-border-color-info)",
|
|
3784
3642
|
muted: "ring-(--filled-border-color-muted)",
|
|
3785
3643
|
link: "ring-(--filled-border-color-link)",
|
|
3644
|
+
transparent: "ring-transparent",
|
|
3786
3645
|
};
|
|
3787
3646
|
|
|
3788
|
-
class
|
|
3789
|
-
constructor(
|
|
3647
|
+
class ShadowAppearanceTheme extends BaseTheme {
|
|
3648
|
+
constructor(initial) {
|
|
3649
|
+
super();
|
|
3650
|
+
TEXT_APPEARANCE_KEYS.forEach((key) => {
|
|
3651
|
+
var _a;
|
|
3652
|
+
this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : ShadowAppearanceTheme.defaultShadow;
|
|
3653
|
+
});
|
|
3654
|
+
}
|
|
3655
|
+
getClasses(props, defaults) {
|
|
3656
|
+
const appearance = pickFirstTruthyKey(props, defaults, TEXT_APPEARANCE_KEYS) || 'default';
|
|
3657
|
+
const size = pickFirstTruthyKey(props, defaults, SIZE_KEYS) || 'md';
|
|
3658
|
+
const key = pickFirstTruthyKey(props, defaults, SHADOW_KEYS);
|
|
3659
|
+
if (key === undefined || key === 'noShadow') {
|
|
3660
|
+
return [];
|
|
3661
|
+
}
|
|
3662
|
+
return MODE_KEYS.map(mode => { var _a, _b, _c; return (_c = (_b = (_a = this[appearance]) === null || _a === void 0 ? void 0 : _a[size]) === null || _b === void 0 ? void 0 : _b[mode]) !== null && _c !== void 0 ? _c : ""; });
|
|
3663
|
+
}
|
|
3664
|
+
static createTheme(src = {}) {
|
|
3665
|
+
return new ShadowAppearanceTheme(src);
|
|
3666
|
+
}
|
|
3667
|
+
}
|
|
3668
|
+
ShadowAppearanceTheme.defaultShadow = {
|
|
3669
|
+
xs: { base: "shadow-2xs", hover: "hover:shadow-xs", active: "" },
|
|
3670
|
+
sm: { base: "shadow-xs", hover: "hover:shadow-sm", active: "" },
|
|
3671
|
+
md: { base: "shadow-sm", hover: "hover:shadow-md", active: "" },
|
|
3672
|
+
lg: { base: "shadow-md", hover: "hover:shadow-lg", active: "" },
|
|
3673
|
+
xl: { base: "shadow-lg", hover: "hover:shadow-xl", active: "" }
|
|
3674
|
+
};
|
|
3675
|
+
|
|
3676
|
+
class GenericVariantTheme extends BaseTheme {
|
|
3677
|
+
constructor(variantInstances) {
|
|
3790
3678
|
super();
|
|
3791
3679
|
VARIANT_KEYS.forEach((variantKey) => {
|
|
3792
|
-
this[variantKey] = variantInstances[variantKey]
|
|
3680
|
+
this[variantKey] = variantInstances[variantKey];
|
|
3793
3681
|
});
|
|
3794
3682
|
}
|
|
3795
3683
|
getClasses(props, defaults) {
|
|
3796
|
-
const
|
|
3797
|
-
const activeTextAppearanceTheme = this[
|
|
3684
|
+
const variantKey = pickFirstTruthyKey(props, defaults, VARIANT_KEYS) || 'outline';
|
|
3685
|
+
const activeTextAppearanceTheme = this[variantKey];
|
|
3798
3686
|
if (!activeTextAppearanceTheme) {
|
|
3799
3687
|
return [];
|
|
3800
3688
|
}
|
|
3801
3689
|
return activeTextAppearanceTheme.getClasses(props, defaults);
|
|
3802
3690
|
}
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3691
|
+
// used for button, bages, chips, etc
|
|
3692
|
+
static createUIElementTextTheme() {
|
|
3693
|
+
//transparent UI elements have a default text color
|
|
3694
|
+
return new GenericVariantTheme({
|
|
3695
|
+
outline: TextAppearanceTheme.createTheme({
|
|
3696
|
+
base: { ...textAppearanceClasses, transparent: textAppearanceClasses.default }
|
|
3697
|
+
}),
|
|
3698
|
+
filled: TextAppearanceTheme.createTheme({
|
|
3699
|
+
base: { ...filledTextAppearanceClasses, transparent: textAppearanceClasses.default }
|
|
3700
|
+
})
|
|
3701
|
+
});
|
|
3809
3702
|
}
|
|
3810
|
-
static
|
|
3811
|
-
|
|
3812
|
-
|
|
3703
|
+
static createUIElementShadowTheme() {
|
|
3704
|
+
//transparent UI elements won't have a shadow
|
|
3705
|
+
return new GenericVariantTheme({
|
|
3706
|
+
outline: ShadowAppearanceTheme.createTheme({ transparent: undefined, link: undefined }),
|
|
3707
|
+
filled: ShadowAppearanceTheme.createTheme({ transparent: undefined, link: undefined })
|
|
3708
|
+
});
|
|
3709
|
+
}
|
|
3710
|
+
static createBorderAppearanceTheme() {
|
|
3711
|
+
return new GenericVariantTheme({
|
|
3712
|
+
outline: TextAppearanceTheme.createTheme({ base: borderAppearanceClasses }),
|
|
3713
|
+
filled: TextAppearanceTheme.createTheme({ base: filledBorderAppearanceClasses })
|
|
3714
|
+
});
|
|
3715
|
+
}
|
|
3716
|
+
static createRingAppearanceTheme() {
|
|
3717
|
+
return new GenericVariantTheme({
|
|
3718
|
+
outline: TextAppearanceTheme.createTheme({ base: ringAppearanceClasses }),
|
|
3719
|
+
filled: TextAppearanceTheme.createTheme({ base: filledRingAppearanceClasses })
|
|
3720
|
+
});
|
|
3721
|
+
}
|
|
3722
|
+
static createBgAppearanceTheme() {
|
|
3723
|
+
return new GenericVariantTheme({
|
|
3724
|
+
outline: TextAppearanceTheme.createTheme({
|
|
3813
3725
|
base: backgroundAppearanceClasses,
|
|
3814
3726
|
hover: hoverBackgroundAppearanceClasses,
|
|
3815
3727
|
active: activeBackgroundAppearanceClasses
|
|
3816
3728
|
}),
|
|
3817
|
-
filled: TextAppearanceTheme.
|
|
3729
|
+
filled: TextAppearanceTheme.createTheme({
|
|
3818
3730
|
base: filledBackgroundAppearanceClasses,
|
|
3819
3731
|
hover: filledHoverBackgroundAppearanceClasses,
|
|
3820
3732
|
active: filledActiveBackgroundAppearanceClasses
|
|
3821
3733
|
})
|
|
3822
3734
|
});
|
|
3823
3735
|
}
|
|
3824
|
-
static
|
|
3825
|
-
return
|
|
3826
|
-
outline: TextAppearanceTheme.
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
outline: TextAppearanceTheme.createDefaultStyle({ base: borderAppearanceClasses }),
|
|
3833
|
-
filled: TextAppearanceTheme.createDefaultStyle({ base: filledBorderAppearanceClasses })
|
|
3834
|
-
});
|
|
3835
|
-
}
|
|
3836
|
-
static createDefaultRing() {
|
|
3837
|
-
return this.createDefault({
|
|
3838
|
-
outline: TextAppearanceTheme.createDefaultStyle({ base: ringAppearanceClasses }),
|
|
3839
|
-
filled: TextAppearanceTheme.createDefaultStyle({ base: filledRingAppearanceClasses })
|
|
3736
|
+
static createSimpleBgAppearanceTheme() {
|
|
3737
|
+
return new GenericVariantTheme({
|
|
3738
|
+
outline: TextAppearanceTheme.createTheme({
|
|
3739
|
+
base: backgroundAppearanceClasses,
|
|
3740
|
+
}),
|
|
3741
|
+
filled: TextAppearanceTheme.createTheme({
|
|
3742
|
+
base: filledBackgroundAppearanceClasses,
|
|
3743
|
+
})
|
|
3840
3744
|
});
|
|
3841
3745
|
}
|
|
3842
3746
|
}
|
|
3843
|
-
VariantTheme.defaultInstances = Object.fromEntries(VARIANT_KEYS.map(variantKey => [
|
|
3844
|
-
variantKey,
|
|
3845
|
-
new TextAppearanceTheme()
|
|
3846
|
-
]));
|
|
3847
3747
|
|
|
3848
3748
|
const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-pointer transition-all duration-200 whitespace-nowrap", {
|
|
3849
3749
|
size: {
|
|
@@ -3881,15 +3781,16 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
|
|
|
3881
3781
|
lg: 'text-lg',
|
|
3882
3782
|
xl: 'text-xl',
|
|
3883
3783
|
}),
|
|
3884
|
-
shadow: new ShadowTheme(),
|
|
3885
3784
|
},
|
|
3886
3785
|
appearance: {
|
|
3887
|
-
background:
|
|
3888
|
-
text:
|
|
3889
|
-
border:
|
|
3890
|
-
ring:
|
|
3786
|
+
background: GenericVariantTheme.createBgAppearanceTheme(),
|
|
3787
|
+
text: GenericVariantTheme.createUIElementTextTheme(),
|
|
3788
|
+
border: GenericVariantTheme.createBorderAppearanceTheme(),
|
|
3789
|
+
ring: GenericVariantTheme.createRingAppearanceTheme(),
|
|
3790
|
+
shadow: GenericVariantTheme.createUIElementShadowTheme()
|
|
3891
3791
|
},
|
|
3892
3792
|
layout: {
|
|
3793
|
+
...defaultLayoutTheme,
|
|
3893
3794
|
border: new BorderTheme(),
|
|
3894
3795
|
ring: new RingTheme(),
|
|
3895
3796
|
radius: new RadiusTheme({
|
|
@@ -3902,6 +3803,7 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
|
|
|
3902
3803
|
}
|
|
3903
3804
|
}),
|
|
3904
3805
|
},
|
|
3806
|
+
typography: defaultTypographyTheme,
|
|
3905
3807
|
}, {
|
|
3906
3808
|
md: true,
|
|
3907
3809
|
inlineFlex: true,
|
|
@@ -3955,23 +3857,17 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
3955
3857
|
md: 'text-base',
|
|
3956
3858
|
lg: 'text-lg',
|
|
3957
3859
|
xl: 'text-xl',
|
|
3958
|
-
})
|
|
3959
|
-
shadow: new ShadowTheme(),
|
|
3860
|
+
})
|
|
3960
3861
|
},
|
|
3961
3862
|
appearance: {
|
|
3962
|
-
background:
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
base: filledBackgroundAppearanceClasses,
|
|
3968
|
-
})
|
|
3969
|
-
}),
|
|
3970
|
-
text: VariantTheme.createDefaultText(),
|
|
3971
|
-
border: VariantTheme.createDefaultBorder(),
|
|
3972
|
-
ring: VariantTheme.createDefaultRing(),
|
|
3863
|
+
background: GenericVariantTheme.createSimpleBgAppearanceTheme(),
|
|
3864
|
+
text: GenericVariantTheme.createUIElementTextTheme(),
|
|
3865
|
+
border: GenericVariantTheme.createBorderAppearanceTheme(),
|
|
3866
|
+
ring: GenericVariantTheme.createRingAppearanceTheme(),
|
|
3867
|
+
shadow: GenericVariantTheme.createUIElementShadowTheme()
|
|
3973
3868
|
},
|
|
3974
3869
|
layout: {
|
|
3870
|
+
...defaultLayoutTheme,
|
|
3975
3871
|
border: new BorderTheme(),
|
|
3976
3872
|
ring: new RingTheme(),
|
|
3977
3873
|
radius: new RadiusTheme({
|
|
@@ -3984,6 +3880,7 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
3984
3880
|
}
|
|
3985
3881
|
}),
|
|
3986
3882
|
},
|
|
3883
|
+
typography: defaultTypographyTheme,
|
|
3987
3884
|
}, {
|
|
3988
3885
|
md: true,
|
|
3989
3886
|
inlineFlex: true,
|
|
@@ -4034,23 +3931,17 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
4034
3931
|
lg: 'gap-2.5',
|
|
4035
3932
|
xl: 'gap-3',
|
|
4036
3933
|
}
|
|
4037
|
-
})
|
|
4038
|
-
shadow: new ShadowTheme(),
|
|
3934
|
+
})
|
|
4039
3935
|
},
|
|
4040
3936
|
appearance: {
|
|
4041
|
-
background:
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
base: filledBackgroundAppearanceClasses,
|
|
4047
|
-
})
|
|
4048
|
-
}),
|
|
4049
|
-
text: VariantTheme.createDefaultText(),
|
|
4050
|
-
border: VariantTheme.createDefaultBorder(),
|
|
4051
|
-
ring: VariantTheme.createDefaultRing(),
|
|
3937
|
+
background: GenericVariantTheme.createSimpleBgAppearanceTheme(),
|
|
3938
|
+
text: GenericVariantTheme.createUIElementTextTheme(),
|
|
3939
|
+
border: GenericVariantTheme.createBorderAppearanceTheme(),
|
|
3940
|
+
ring: GenericVariantTheme.createRingAppearanceTheme(),
|
|
3941
|
+
shadow: GenericVariantTheme.createUIElementShadowTheme()
|
|
4052
3942
|
},
|
|
4053
3943
|
layout: {
|
|
3944
|
+
...defaultLayoutTheme,
|
|
4054
3945
|
radius: new RadiusTheme({
|
|
4055
3946
|
rounded: {
|
|
4056
3947
|
xs: 'rounded-sm',
|
|
@@ -4063,6 +3954,7 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
4063
3954
|
border: new BorderTheme(),
|
|
4064
3955
|
ring: new RingTheme(),
|
|
4065
3956
|
},
|
|
3957
|
+
typography: defaultTypographyTheme,
|
|
4066
3958
|
}, {
|
|
4067
3959
|
md: true,
|
|
4068
3960
|
inlineFlex: true,
|
|
@@ -4078,6 +3970,75 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
4078
3970
|
ring: true,
|
|
4079
3971
|
});
|
|
4080
3972
|
|
|
3973
|
+
const isObject = (item) => {
|
|
3974
|
+
return item !== null && typeof item === 'object' && !Array.isArray(item);
|
|
3975
|
+
};
|
|
3976
|
+
const deepMerge = (target, source) => {
|
|
3977
|
+
const output = Object.assign(Object.create(Object.getPrototypeOf(target)), target);
|
|
3978
|
+
for (const key in source) {
|
|
3979
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
3980
|
+
const sourceValue = source[key];
|
|
3981
|
+
const targetValue = output[key];
|
|
3982
|
+
if (sourceValue === undefined) {
|
|
3983
|
+
continue;
|
|
3984
|
+
}
|
|
3985
|
+
// Special case: If the key is 'defaults', use the contextual mergeDefaults function.
|
|
3986
|
+
if (key === 'defaults' &&
|
|
3987
|
+
isObject(targetValue) &&
|
|
3988
|
+
isObject(sourceValue)) {
|
|
3989
|
+
output[key] = mergeDefaults(targetValue, sourceValue);
|
|
3990
|
+
}
|
|
3991
|
+
// For all other objects, use the standard recursive deep merge.
|
|
3992
|
+
else if (isObject(targetValue) && isObject(sourceValue)) {
|
|
3993
|
+
output[key] = deepMerge(targetValue, sourceValue);
|
|
3994
|
+
}
|
|
3995
|
+
// For non-object values, just assign the value from the source.
|
|
3996
|
+
else {
|
|
3997
|
+
output[key] = sourceValue;
|
|
3998
|
+
}
|
|
3999
|
+
}
|
|
4000
|
+
}
|
|
4001
|
+
return output;
|
|
4002
|
+
};
|
|
4003
|
+
const deepClone = (source) => {
|
|
4004
|
+
if (!isObject(source)) {
|
|
4005
|
+
return source;
|
|
4006
|
+
}
|
|
4007
|
+
const output = Object.assign(Object.create(Object.getPrototypeOf(source)), source);
|
|
4008
|
+
for (const key in output) {
|
|
4009
|
+
if (Object.prototype.hasOwnProperty.call(output, key)) {
|
|
4010
|
+
output[key] = deepClone(output[key]);
|
|
4011
|
+
}
|
|
4012
|
+
}
|
|
4013
|
+
return output;
|
|
4014
|
+
};
|
|
4015
|
+
const findGroup = (key) => EXCLUSIVE_KEY_GROUPS.find(group => group.includes(key));
|
|
4016
|
+
const mergeDefaults = (baseDefaults, overrideDefaults) => {
|
|
4017
|
+
const finalDefaults = { ...baseDefaults };
|
|
4018
|
+
// Iterate over the override keys to apply them.
|
|
4019
|
+
for (const key in overrideDefaults) {
|
|
4020
|
+
if (Object.prototype.hasOwnProperty.call(overrideDefaults, key)) {
|
|
4021
|
+
const overrideValue = overrideDefaults[key];
|
|
4022
|
+
// If the override is setting a key to true...
|
|
4023
|
+
if (overrideValue) {
|
|
4024
|
+
// Find the exclusive group this key belongs to (e.g., SIZE_KEYS).
|
|
4025
|
+
const group = findGroup(key);
|
|
4026
|
+
// If the key is part of an exclusive group...
|
|
4027
|
+
if (group) {
|
|
4028
|
+
// ...set all other keys in that group to false.
|
|
4029
|
+
group.forEach(groupKey => {
|
|
4030
|
+
if (groupKey !== key) {
|
|
4031
|
+
finalDefaults[groupKey] = false;
|
|
4032
|
+
}
|
|
4033
|
+
});
|
|
4034
|
+
}
|
|
4035
|
+
}
|
|
4036
|
+
finalDefaults[key] = overrideValue;
|
|
4037
|
+
}
|
|
4038
|
+
}
|
|
4039
|
+
return finalDefaults;
|
|
4040
|
+
};
|
|
4041
|
+
|
|
4081
4042
|
const typographyThemeDefaults = {
|
|
4082
4043
|
md: true,
|
|
4083
4044
|
default: true,
|
|
@@ -4090,8 +4051,9 @@ const createTypographyComponentTheme = (tag, base = "text-balance", textSizeMap
|
|
|
4090
4051
|
text: new SizeTheme(textSizeMap),
|
|
4091
4052
|
},
|
|
4092
4053
|
appearance: {
|
|
4093
|
-
text: TextAppearanceTheme.
|
|
4094
|
-
}
|
|
4054
|
+
text: TextAppearanceTheme.createTheme({ base: textAppearanceClasses }),
|
|
4055
|
+
},
|
|
4056
|
+
typography: defaultTypographyTheme,
|
|
4095
4057
|
}, defaults);
|
|
4096
4058
|
};
|
|
4097
4059
|
// Page title specific theme
|
|
@@ -4184,15 +4146,14 @@ const commonGaps = {
|
|
|
4184
4146
|
xl: 'gap-6',
|
|
4185
4147
|
};
|
|
4186
4148
|
|
|
4187
|
-
class
|
|
4188
|
-
constructor(
|
|
4149
|
+
class BgAppearanceTheme extends BaseTheme {
|
|
4150
|
+
constructor() {
|
|
4189
4151
|
super();
|
|
4190
|
-
BG_APPEARANCE_KEYS.forEach(
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
...(overrideModesForKey || {}),
|
|
4152
|
+
BG_APPEARANCE_KEYS.forEach(key => {
|
|
4153
|
+
this[key] = {
|
|
4154
|
+
base: layoutBackgroundAppearanceClasses[key] || '',
|
|
4155
|
+
hover: '',
|
|
4156
|
+
active: '',
|
|
4196
4157
|
};
|
|
4197
4158
|
});
|
|
4198
4159
|
}
|
|
@@ -4204,37 +4165,7 @@ class LayoutAppearanceTheme extends BaseTheme {
|
|
|
4204
4165
|
}
|
|
4205
4166
|
return MODE_KEYS.map(mode => modesForAppearance[mode] || '');
|
|
4206
4167
|
}
|
|
4207
|
-
static createDefaultStyle(src = {}) {
|
|
4208
|
-
const initialOverridesForConstructor = {};
|
|
4209
|
-
BG_APPEARANCE_KEYS.forEach((textKey) => {
|
|
4210
|
-
const modesForCurrentTextKey = {};
|
|
4211
|
-
let keyHasDataInSrc = false;
|
|
4212
|
-
MODE_KEYS.forEach((modeKey) => {
|
|
4213
|
-
var _a;
|
|
4214
|
-
const classValue = (_a = src[modeKey]) === null || _a === void 0 ? void 0 : _a[textKey];
|
|
4215
|
-
if (classValue !== undefined) {
|
|
4216
|
-
modesForCurrentTextKey[modeKey] = classValue;
|
|
4217
|
-
keyHasDataInSrc = true;
|
|
4218
|
-
}
|
|
4219
|
-
});
|
|
4220
|
-
if (keyHasDataInSrc) {
|
|
4221
|
-
initialOverridesForConstructor[textKey] = modesForCurrentTextKey;
|
|
4222
|
-
}
|
|
4223
|
-
});
|
|
4224
|
-
return new LayoutAppearanceTheme(initialOverridesForConstructor);
|
|
4225
|
-
}
|
|
4226
4168
|
}
|
|
4227
|
-
LayoutAppearanceTheme.defaultFullConfig = (() => {
|
|
4228
|
-
const config = {};
|
|
4229
|
-
BG_APPEARANCE_KEYS.forEach((key) => {
|
|
4230
|
-
config[key] = {
|
|
4231
|
-
base: backgroundAppearanceClasses[key] || '',
|
|
4232
|
-
hover: '',
|
|
4233
|
-
active: '',
|
|
4234
|
-
};
|
|
4235
|
-
});
|
|
4236
|
-
return config;
|
|
4237
|
-
})();
|
|
4238
4169
|
|
|
4239
4170
|
class BreakpointTheme extends BaseTheme {
|
|
4240
4171
|
constructor(initial) {
|
|
@@ -4259,30 +4190,30 @@ BreakpointTheme.defaultClasses = {
|
|
|
4259
4190
|
xlCol: "max-xl:flex-col"
|
|
4260
4191
|
};
|
|
4261
4192
|
|
|
4262
|
-
const defaultCardTheme = new ComponentTheme("div", "
|
|
4193
|
+
const defaultCardTheme = new ComponentTheme("div", "", {
|
|
4263
4194
|
size: {
|
|
4264
4195
|
px: new PxTheme({
|
|
4265
4196
|
padding: {
|
|
4266
|
-
xs:
|
|
4267
|
-
sm:
|
|
4268
|
-
md:
|
|
4269
|
-
lg:
|
|
4270
|
-
xl:
|
|
4197
|
+
xs: "px-2",
|
|
4198
|
+
sm: "px-3 max-lg:px-2",
|
|
4199
|
+
md: "px-4 max-lg:px-3",
|
|
4200
|
+
lg: "px-5 max-lg:px-4 max-md:px-3",
|
|
4201
|
+
xl: "px-6 max-lg:px-5 max-md:px-4"
|
|
4271
4202
|
}
|
|
4272
4203
|
}),
|
|
4273
4204
|
py: new PyTheme({
|
|
4274
4205
|
padding: {
|
|
4275
|
-
xs:
|
|
4276
|
-
sm:
|
|
4277
|
-
md:
|
|
4278
|
-
lg:
|
|
4279
|
-
xl:
|
|
4206
|
+
xs: "py-2",
|
|
4207
|
+
sm: "py-3 max-lg:py-2",
|
|
4208
|
+
md: "py-4 max-lg:py-3",
|
|
4209
|
+
lg: "py-5 max-lg:py-4 max-md:py-3",
|
|
4210
|
+
xl: "py-6 max-lg:py-5 max-md:py-4"
|
|
4280
4211
|
}
|
|
4281
4212
|
}),
|
|
4282
4213
|
gap: new GapTheme({ gap: commonGaps }),
|
|
4283
|
-
shadow: new ShadowTheme(),
|
|
4284
4214
|
},
|
|
4285
4215
|
layout: {
|
|
4216
|
+
...defaultLayoutTheme,
|
|
4286
4217
|
border: new BorderTheme(),
|
|
4287
4218
|
ring: new RingTheme(),
|
|
4288
4219
|
radius: new RadiusTheme({
|
|
@@ -4297,14 +4228,13 @@ const defaultCardTheme = new ComponentTheme("div", "overflow-hidden", {
|
|
|
4297
4228
|
wrap: new WrapTheme(),
|
|
4298
4229
|
direction: new DirectionTheme(),
|
|
4299
4230
|
breakpoint: new BreakpointTheme(),
|
|
4231
|
+
shadow: ShadowAppearanceTheme.createTheme(),
|
|
4300
4232
|
},
|
|
4301
4233
|
appearance: {
|
|
4302
|
-
background:
|
|
4303
|
-
|
|
4304
|
-
}),
|
|
4305
|
-
|
|
4306
|
-
border: TextAppearanceTheme.createDefaultStyle({ base: borderAppearanceClasses }),
|
|
4307
|
-
ring: TextAppearanceTheme.createDefaultStyle({ base: ringAppearanceClasses }),
|
|
4234
|
+
background: new BgAppearanceTheme(),
|
|
4235
|
+
text: TextAppearanceTheme.createTheme({ base: textAppearanceClasses }),
|
|
4236
|
+
border: TextAppearanceTheme.createTheme({ base: borderAppearanceClasses }),
|
|
4237
|
+
ring: TextAppearanceTheme.createTheme({ base: ringAppearanceClasses }),
|
|
4308
4238
|
}
|
|
4309
4239
|
}, {
|
|
4310
4240
|
md: true,
|
|
@@ -4324,6 +4254,7 @@ const defaultRowTheme = new ComponentTheme("div", "flex-row", {
|
|
|
4324
4254
|
breakpoint: new BreakpointTheme(),
|
|
4325
4255
|
},
|
|
4326
4256
|
layout: {
|
|
4257
|
+
...defaultLayoutTheme,
|
|
4327
4258
|
wrap: new WrapTheme(),
|
|
4328
4259
|
},
|
|
4329
4260
|
}, {
|
|
@@ -4336,7 +4267,7 @@ const defaultRowTheme = new ComponentTheme("div", "flex-row", {
|
|
|
4336
4267
|
|
|
4337
4268
|
const defaultDividerTheme = new ComponentTheme("div", "h-px w-full", {
|
|
4338
4269
|
appearance: {
|
|
4339
|
-
background: TextAppearanceTheme.
|
|
4270
|
+
background: TextAppearanceTheme.createTheme({
|
|
4340
4271
|
base: bgBorderAppearanceClasses,
|
|
4341
4272
|
}),
|
|
4342
4273
|
}
|
|
@@ -4365,6 +4296,7 @@ const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full
|
|
|
4365
4296
|
}),
|
|
4366
4297
|
},
|
|
4367
4298
|
layout: {
|
|
4299
|
+
...defaultLayoutTheme,
|
|
4368
4300
|
border: new BorderTheme(),
|
|
4369
4301
|
ring: new RingTheme(),
|
|
4370
4302
|
wrap: new WrapTheme(),
|
|
@@ -4380,12 +4312,10 @@ const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full
|
|
|
4380
4312
|
}),
|
|
4381
4313
|
},
|
|
4382
4314
|
appearance: {
|
|
4383
|
-
background:
|
|
4384
|
-
|
|
4385
|
-
}),
|
|
4386
|
-
|
|
4387
|
-
border: TextAppearanceTheme.createDefaultStyle({ base: borderAppearanceClasses }),
|
|
4388
|
-
ring: TextAppearanceTheme.createDefaultStyle({ base: ringAppearanceClasses }),
|
|
4315
|
+
background: new BgAppearanceTheme(),
|
|
4316
|
+
text: TextAppearanceTheme.createTheme({ base: textAppearanceClasses }),
|
|
4317
|
+
border: TextAppearanceTheme.createTheme({ base: borderAppearanceClasses }),
|
|
4318
|
+
ring: TextAppearanceTheme.createTheme({ base: ringAppearanceClasses }),
|
|
4389
4319
|
}
|
|
4390
4320
|
}, {
|
|
4391
4321
|
transparent: true,
|
|
@@ -4402,6 +4332,7 @@ const defaultColTheme = new ComponentTheme("div", "flex-col", {
|
|
|
4402
4332
|
gap: new GapTheme({ gap: commonGaps }),
|
|
4403
4333
|
},
|
|
4404
4334
|
layout: {
|
|
4335
|
+
...defaultLayoutTheme,
|
|
4405
4336
|
wrap: new WrapTheme(),
|
|
4406
4337
|
direction: new DirectionTheme(),
|
|
4407
4338
|
},
|
|
@@ -4437,6 +4368,7 @@ const defaultStackTheme = new ComponentTheme("div", "", {
|
|
|
4437
4368
|
}),
|
|
4438
4369
|
},
|
|
4439
4370
|
layout: {
|
|
4371
|
+
...defaultLayoutTheme,
|
|
4440
4372
|
wrap: new WrapTheme(),
|
|
4441
4373
|
direction: new DirectionTheme(),
|
|
4442
4374
|
},
|
|
@@ -4479,17 +4411,16 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full flex-col", {
|
|
|
4479
4411
|
xl: 'gap-16',
|
|
4480
4412
|
}
|
|
4481
4413
|
}),
|
|
4482
|
-
shadow: new ShadowTheme(),
|
|
4483
4414
|
},
|
|
4484
4415
|
appearance: {
|
|
4485
|
-
background:
|
|
4486
|
-
|
|
4487
|
-
}),
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
ring: TextAppearanceTheme.createDefaultStyle({ base: ringAppearanceClasses }),
|
|
4416
|
+
background: new BgAppearanceTheme(),
|
|
4417
|
+
text: TextAppearanceTheme.createTheme({ base: textAppearanceClasses }),
|
|
4418
|
+
border: TextAppearanceTheme.createTheme({ base: borderAppearanceClasses }),
|
|
4419
|
+
ring: TextAppearanceTheme.createTheme({ base: ringAppearanceClasses }),
|
|
4420
|
+
shadow: ShadowAppearanceTheme.createTheme(),
|
|
4491
4421
|
},
|
|
4492
4422
|
layout: {
|
|
4423
|
+
...defaultLayoutTheme,
|
|
4493
4424
|
wrap: new WrapTheme(),
|
|
4494
4425
|
direction: new DirectionTheme(),
|
|
4495
4426
|
border: new BorderTheme(),
|
|
@@ -4686,5 +4617,5 @@ const List = (props) => {
|
|
|
4686
4617
|
return jsx(ThemedComponent, { theme: theme.list, propsToOmit: TYPOGRAPHY_COMPONENT_KEYS, ...props });
|
|
4687
4618
|
};
|
|
4688
4619
|
|
|
4689
|
-
export { BADGE_KEYS, BASE_COMPONENT_KEYS, BG_APPEARANCE_KEYS, BORDER_KEYS, BREAKPOINT_KEYS, BUTTON_KEYS, Badge, Button, CARD_KEYS, CHIP_KEYS, COL_KEYS, COMPONENT_KEYS, CONTAINER_KEYS, Card, Chip, Col, Container, DIRECTION_REVERSE_KEYS, DISPLAY_KEYS, DIVIDER_KEYS, Divider, EXCLUSIVE_KEY_GROUPS, FLEX_DIRECTION_KEYS, FONT_FAMILY_KEYS, FONT_KEYS, FONT_STYLE_KEYS, FONT_WEIGHT_KEYS, GAP_KEYS, GRID_KEYS, Grid3, Grid4, HIDE_KEYS, ITEMS_KEYS, JUSTIFY_KEYS, Link, List, ListItem, MODE_KEYS, PADDING_KEYS, PILL_KEYS, POSITION_KEYS, PageTitle, RING_KEYS, ROUNDED_KEYS, ROW_KEYS, Row, SECTION_KEYS, SHADOW_KEYS, SHAPE_KEYS, SHARP_KEYS, SIZE_KEYS, STACK_KEYS, Section, SectionTitle, Stack, TEXT_ALIGN_KEYS, TEXT_APPEARANCE_KEYS, TEXT_DECORATION_KEYS, TEXT_TRANSFORM_KEYS, TYPOGRAPHY_COMPONENT_KEYS, Text, ThemeProvider, Title,
|
|
4620
|
+
export { BADGE_KEYS, BASE_COMPONENT_KEYS, BG_APPEARANCE_KEYS, BORDER_KEYS, BREAKPOINT_KEYS, BUTTON_KEYS, Badge, Button, CARD_KEYS, CHIP_KEYS, COL_KEYS, COMPONENT_KEYS, CONTAINER_KEYS, Card, Chip, Col, Container, DIRECTION_REVERSE_KEYS, DISPLAY_KEYS, DIVIDER_KEYS, Divider, EXCLUSIVE_KEY_GROUPS, FLEX_DIRECTION_KEYS, FONT_FAMILY_KEYS, FONT_KEYS, FONT_STYLE_KEYS, FONT_WEIGHT_KEYS, GAP_KEYS, GRID_KEYS, Grid3, Grid4, HIDE_KEYS, ITEMS_KEYS, JUSTIFY_KEYS, Link, List, ListItem, MODE_KEYS, PADDING_KEYS, PILL_KEYS, POSITION_KEYS, PageTitle, RING_KEYS, ROUNDED_KEYS, ROW_KEYS, Row, SECTION_KEYS, SHADOW_KEYS, SHAPE_KEYS, SHARP_KEYS, SIZE_KEYS, STACK_KEYS, Section, SectionTitle, Stack, TEXT_ALIGN_KEYS, TEXT_APPEARANCE_KEYS, TEXT_DECORATION_KEYS, TEXT_TRANSFORM_KEYS, TYPOGRAPHY_COMPONENT_KEYS, Text, ThemeProvider, Title, VARIANT_KEYS, WRAP_KEYS, defaultTheme, useTheme };
|
|
4690
4621
|
//# sourceMappingURL=index.esm.js.map
|