@vaneui/ui 0.3.1-alpha.20250927164620.fec55bc → 0.3.1-alpha.20250930203841.cec91ca
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/ui/theme/checkboxTheme.d.ts +2 -1
- package/dist/components/ui/theme/checkboxTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/labelTheme.d.ts +2 -2
- package/dist/components/ui/theme/labelTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/size/sizeTheme.d.ts +3 -1
- package/dist/components/ui/theme/size/sizeTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/typography/fontSizeTheme.d.ts +21 -0
- package/dist/components/ui/theme/typography/fontSizeTheme.d.ts.map +1 -0
- package/dist/components/ui/theme/typographyTheme.d.ts +4 -5
- package/dist/components/ui/theme/typographyTheme.d.ts.map +1 -1
- package/dist/index.esm.js +89 -39
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +89 -39
- package/dist/index.js.map +1 -1
- package/dist/ui.css +41 -77
- package/dist/vars.css +6 -21
- package/package.json +1 -1
|
@@ -6,13 +6,14 @@ import { RingTheme } from "./layout/ringTheme";
|
|
|
6
6
|
import { AppearanceTheme } from "./appearance/appearanceTheme";
|
|
7
7
|
import { GenericVariantTheme } from "./appearance/genericVariantTheme";
|
|
8
8
|
import { SizeTheme } from "./size/sizeTheme";
|
|
9
|
+
import { FontSizeTheme } from "./typography/fontSizeTheme";
|
|
9
10
|
import { ReactElement } from "react";
|
|
10
11
|
import { ShadowAppearanceTheme } from "./appearance/shadowAppearanceTheme";
|
|
11
12
|
import { FocusVisibleTheme } from "./layout/focusVisibleTheme";
|
|
12
13
|
export interface CheckboxTheme extends BaseComponentTheme {
|
|
13
14
|
size: {
|
|
14
15
|
size: SizeTheme;
|
|
15
|
-
text:
|
|
16
|
+
text: FontSizeTheme;
|
|
16
17
|
};
|
|
17
18
|
layout: DefaultLayoutThemes & {
|
|
18
19
|
border: BorderTheme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkboxTheme.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/theme/checkboxTheme.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,cAAc,EAEd,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"checkboxTheme.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/theme/checkboxTheme.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,cAAc,EAEd,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAAE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B,CAAC;IACF,MAAM,EAAE,mBAAmB,GAAG;QAC5B,YAAY,EAAE,iBAAiB,CAAC;KACjC,CAAC;IACF,UAAU,EAAE;QACV,OAAO,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;QAC9C,YAAY,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;KACpD,CAAC;CACH;AAED,eAAO,MAAM,2BAA2B,qDAwBvC,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { BaseTypographyComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
|
|
2
2
|
import { LabelProps } from "../props";
|
|
3
|
-
import { SizeTheme } from "./size/sizeTheme";
|
|
4
3
|
import { GapTheme } from "./size/gapTheme";
|
|
5
4
|
import { AppearanceTheme } from "./appearance/appearanceTheme";
|
|
5
|
+
import { FontSizeTheme } from "./typography/fontSizeTheme";
|
|
6
6
|
import { GenericVariantTheme } from "./appearance/genericVariantTheme";
|
|
7
7
|
import { WrapTheme } from "./layout/wrapTheme";
|
|
8
8
|
import { DirectionTheme } from "./layout/directionTheme";
|
|
9
9
|
export interface LabelTheme extends BaseTypographyComponentTheme {
|
|
10
10
|
size: {
|
|
11
|
-
text:
|
|
11
|
+
text: FontSizeTheme;
|
|
12
12
|
gap: GapTheme;
|
|
13
13
|
};
|
|
14
14
|
appearance: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labelTheme.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/theme/labelTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,cAAc,EAEd,mBAAmB,EAEpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"labelTheme.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/theme/labelTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,cAAc,EAEd,mBAAmB,EAEpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAGzD,MAAM,WAAW,UAAW,SAAQ,4BAA4B;IAC9D,IAAI,EAAE;QACJ,IAAI,EAAE,aAAa,CAAC;QACpB,GAAG,EAAE,QAAQ,CAAC;KACf,CAAC;IACF,UAAU,EAAE;QACV,IAAI,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;KAC5C,CAAC;IACF,MAAM,EAAE,mBAAmB,GAAG;QAC5B,IAAI,EAAE,SAAS,CAAC;QAChB,aAAa,EAAE,cAAc,CAAC;KAC/B,CAAC;CACH;AAED,eAAO,MAAM,iBAAiB,wCAoB7B,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseTheme } from "../common/baseTheme";
|
|
2
2
|
import type { CategoryProps } from "../../props";
|
|
3
3
|
import { SizeKey } from "../../props";
|
|
4
|
+
import { FontSizeTheme } from "../typography/fontSizeTheme";
|
|
4
5
|
export declare class SizeTheme extends BaseTheme implements Record<SizeKey, string> {
|
|
5
6
|
/** Extra-small size variant */
|
|
6
7
|
xs: string;
|
|
@@ -13,7 +14,8 @@ export declare class SizeTheme extends BaseTheme implements Record<SizeKey, stri
|
|
|
13
14
|
/** Extra-large size variant */
|
|
14
15
|
xl: string;
|
|
15
16
|
private readonly useDefaultKey;
|
|
16
|
-
|
|
17
|
+
private readonly fontSizeTheme?;
|
|
18
|
+
constructor(sizeMap?: Record<SizeKey, string> | FontSizeTheme, useDefaultKey?: boolean);
|
|
17
19
|
getClasses(extractedKeys: CategoryProps): string[];
|
|
18
20
|
}
|
|
19
21
|
//# sourceMappingURL=sizeTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sizeTheme.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/theme/size/sizeTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,OAAO,EAAiB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"sizeTheme.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/theme/size/sizeTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,OAAO,EAAiB,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,SAAU,SAAQ,SAAU,YAAW,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC;IACzE,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAM;IAChB,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAM;IAChB,oCAAoC;IACpC,EAAE,EAAE,MAAM,CAAM;IAChB,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAM;IAChB,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAM;IAEhB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAU;IACxC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAgB;gBAEnC,OAAO,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,aAAa,EAAE,aAAa,GAAE,OAAc;IAgB5F,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,EAAE;CAQnD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SizeKey } from "../../props";
|
|
2
|
+
import { BaseTheme } from "../common/baseTheme";
|
|
3
|
+
import type { CategoryProps } from "../../props";
|
|
4
|
+
export declare class FontSizeTheme extends BaseTheme implements Record<SizeKey, string> {
|
|
5
|
+
/** Extra-small font size - text-xs (0.75rem = 6 * 0.125rem) */
|
|
6
|
+
xs: string;
|
|
7
|
+
/** Small font size - text-sm (0.875rem = 7 * 0.125rem) */
|
|
8
|
+
sm: string;
|
|
9
|
+
/** Medium font size - text-base (1rem = 8 * 0.125rem) */
|
|
10
|
+
md: string;
|
|
11
|
+
/** Large font size - text-lg (1.125rem = 9 * 0.125rem) */
|
|
12
|
+
lg: string;
|
|
13
|
+
/** Extra-large font size - text-xl (1.25rem = 10 * 0.125rem) */
|
|
14
|
+
xl: string;
|
|
15
|
+
constructor(customMapping?: Record<SizeKey, string>);
|
|
16
|
+
getClasses(extractedKeys: CategoryProps): string[];
|
|
17
|
+
static createForPageTitle(): FontSizeTheme;
|
|
18
|
+
static createForSectionTitle(): FontSizeTheme;
|
|
19
|
+
static createForTitle(): FontSizeTheme;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=fontSizeTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fontSizeTheme.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/theme/typography/fontSizeTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,qBAAa,aAAc,SAAQ,SAAU,YAAW,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC;IAC7E,+DAA+D;IAC/D,EAAE,EAAE,MAAM,CAAmB;IAC7B,0DAA0D;IAC1D,EAAE,EAAE,MAAM,CAAmB;IAC7B,yDAAyD;IACzD,EAAE,EAAE,MAAM,CAAmB;IAC7B,0DAA0D;IAC1D,EAAE,EAAE,MAAM,CAAmB;IAC7B,gEAAgE;IAChE,EAAE,EAAE,MAAM,CAAoB;gBAElB,aAAa,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC;IAWnD,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,EAAE;IASlD,MAAM,CAAC,kBAAkB,IAAI,aAAa;IAU1C,MAAM,CAAC,qBAAqB,IAAI,aAAa;IAU7C,MAAM,CAAC,cAAc,IAAI,aAAa;CASvC"}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { ListProps, TypographyProps } from "../props";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { BaseTypographyComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
|
|
4
|
-
import { SizeTheme } from "./size/sizeTheme";
|
|
5
4
|
import { AppearanceTheme } from "./appearance/appearanceTheme";
|
|
6
5
|
import { GenericVariantTheme } from "./appearance/genericVariantTheme";
|
|
7
|
-
import { SizeKey } from "../props";
|
|
8
6
|
import { PlTheme } from "./size/plTheme";
|
|
9
7
|
import { ListStyleTheme } from "./list/listStyleTheme";
|
|
10
8
|
import { LineHeightTheme } from "./typography/lineHeightTheme";
|
|
9
|
+
import { FontSizeTheme } from "./typography/fontSizeTheme";
|
|
11
10
|
export interface TypographyTheme extends BaseTypographyComponentTheme {
|
|
12
11
|
size: {
|
|
13
|
-
text:
|
|
12
|
+
text: FontSizeTheme;
|
|
14
13
|
};
|
|
15
14
|
appearance: {
|
|
16
15
|
text: GenericVariantTheme<AppearanceTheme>;
|
|
17
16
|
};
|
|
18
17
|
layout: DefaultLayoutThemes;
|
|
19
18
|
}
|
|
20
|
-
export declare const createTypographyComponentTheme: (tag: React.ElementType, base?: string,
|
|
19
|
+
export declare const createTypographyComponentTheme: (tag: React.ElementType, base?: string, fontSizeTheme?: FontSizeTheme, defaults?: Partial<TypographyProps>, lineHeightTheme?: LineHeightTheme) => ComponentTheme<TypographyProps, TypographyTheme>;
|
|
21
20
|
export declare const pageTitleTheme: ComponentTheme<TypographyProps, TypographyTheme>;
|
|
22
21
|
export declare const sectionTitleTheme: ComponentTheme<TypographyProps, TypographyTheme>;
|
|
23
22
|
export declare const titleTheme: ComponentTheme<TypographyProps, TypographyTheme>;
|
|
@@ -26,7 +25,7 @@ export declare const linkTheme: ComponentTheme<TypographyProps, TypographyTheme>
|
|
|
26
25
|
export declare const listItemTheme: ComponentTheme<TypographyProps, TypographyTheme>;
|
|
27
26
|
export interface ListTheme extends BaseTypographyComponentTheme {
|
|
28
27
|
size: {
|
|
29
|
-
text:
|
|
28
|
+
text: FontSizeTheme;
|
|
30
29
|
paddingLeft: PlTheme;
|
|
31
30
|
};
|
|
32
31
|
appearance: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typographyTheme.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/theme/typographyTheme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"typographyTheme.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/theme/typographyTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEtD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,4BAA4B,EAC5B,cAAc,EACd,mBAAmB,EAEpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,8B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S,EAAE,cAAc,CAAC,SAAS,EAAE,SAAS,CA0B1D,CAAC"}
|
package/dist/index.esm.js
CHANGED
|
@@ -3710,6 +3710,64 @@ class ComponentTheme {
|
|
|
3710
3710
|
}
|
|
3711
3711
|
}
|
|
3712
3712
|
|
|
3713
|
+
class FontSizeTheme extends BaseTheme {
|
|
3714
|
+
constructor(customMapping) {
|
|
3715
|
+
super();
|
|
3716
|
+
/** Extra-small font size - text-xs (0.75rem = 6 * 0.125rem) */
|
|
3717
|
+
this.xs = "[--fs-unit:6]";
|
|
3718
|
+
/** Small font size - text-sm (0.875rem = 7 * 0.125rem) */
|
|
3719
|
+
this.sm = "[--fs-unit:7]";
|
|
3720
|
+
/** Medium font size - text-base (1rem = 8 * 0.125rem) */
|
|
3721
|
+
this.md = "[--fs-unit:8]";
|
|
3722
|
+
/** Large font size - text-lg (1.125rem = 9 * 0.125rem) */
|
|
3723
|
+
this.lg = "[--fs-unit:9]";
|
|
3724
|
+
/** Extra-large font size - text-xl (1.25rem = 10 * 0.125rem) */
|
|
3725
|
+
this.xl = "[--fs-unit:10]";
|
|
3726
|
+
if (customMapping) {
|
|
3727
|
+
this.xs = customMapping.xs || this.xs;
|
|
3728
|
+
this.sm = customMapping.sm || this.sm;
|
|
3729
|
+
this.md = customMapping.md || this.md;
|
|
3730
|
+
this.lg = customMapping.lg || this.lg;
|
|
3731
|
+
this.xl = customMapping.xl || this.xl;
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3734
|
+
getClasses(extractedKeys) {
|
|
3735
|
+
if (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) {
|
|
3736
|
+
const fsUnitClass = this[extractedKeys.size];
|
|
3737
|
+
return fsUnitClass ? [fsUnitClass, "text-(--fs)"] : [];
|
|
3738
|
+
}
|
|
3739
|
+
return [this.md, "text-(--fs)"];
|
|
3740
|
+
}
|
|
3741
|
+
// Static factory methods for different text size ranges
|
|
3742
|
+
static createForPageTitle() {
|
|
3743
|
+
return new FontSizeTheme({
|
|
3744
|
+
xs: "[--fs-unit:15]", // text-3xl: 1.875rem = 15 * 0.125rem
|
|
3745
|
+
sm: "[--fs-unit:18]", // text-4xl: 2.25rem = 18 * 0.125rem
|
|
3746
|
+
md: "[--fs-unit:24]", // text-5xl: 3rem = 24 * 0.125rem
|
|
3747
|
+
lg: "[--fs-unit:30]", // text-6xl: 3.75rem = 30 * 0.125rem
|
|
3748
|
+
xl: "[--fs-unit:36]" // text-7xl: 4.5rem = 36 * 0.125rem
|
|
3749
|
+
});
|
|
3750
|
+
}
|
|
3751
|
+
static createForSectionTitle() {
|
|
3752
|
+
return new FontSizeTheme({
|
|
3753
|
+
xs: "[--fs-unit:12]", // text-2xl: 1.5rem = 12 * 0.125rem
|
|
3754
|
+
sm: "[--fs-unit:15]", // text-3xl: 1.875rem = 15 * 0.125rem
|
|
3755
|
+
md: "[--fs-unit:18]", // text-4xl: 2.25rem = 18 * 0.125rem
|
|
3756
|
+
lg: "[--fs-unit:24]", // text-5xl: 3rem = 24 * 0.125rem
|
|
3757
|
+
xl: "[--fs-unit:30]" // text-6xl: 3.75rem = 30 * 0.125rem
|
|
3758
|
+
});
|
|
3759
|
+
}
|
|
3760
|
+
static createForTitle() {
|
|
3761
|
+
return new FontSizeTheme({
|
|
3762
|
+
xs: "[--fs-unit:9]", // text-lg: 1.125rem = 9 * 0.125rem
|
|
3763
|
+
sm: "[--fs-unit:10]", // text-xl: 1.25rem = 10 * 0.125rem
|
|
3764
|
+
md: "[--fs-unit:12]", // text-2xl: 1.5rem = 12 * 0.125rem
|
|
3765
|
+
lg: "[--fs-unit:15]", // text-3xl: 1.875rem = 15 * 0.125rem
|
|
3766
|
+
xl: "[--fs-unit:18]" // text-4xl: 2.25rem = 18 * 0.125rem
|
|
3767
|
+
});
|
|
3768
|
+
}
|
|
3769
|
+
}
|
|
3770
|
+
|
|
3713
3771
|
class SizeTheme extends BaseTheme {
|
|
3714
3772
|
constructor(sizeMap, useDefaultKey = true) {
|
|
3715
3773
|
super();
|
|
@@ -3724,13 +3782,24 @@ class SizeTheme extends BaseTheme {
|
|
|
3724
3782
|
/** Extra-large size variant */
|
|
3725
3783
|
this.xl = "";
|
|
3726
3784
|
this.useDefaultKey = useDefaultKey;
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3785
|
+
if (sizeMap instanceof FontSizeTheme) {
|
|
3786
|
+
this.fontSizeTheme = sizeMap;
|
|
3787
|
+
ComponentKeys.size.forEach((key) => {
|
|
3788
|
+
this[key] = sizeMap[key];
|
|
3789
|
+
});
|
|
3790
|
+
}
|
|
3791
|
+
else {
|
|
3792
|
+
ComponentKeys.size.forEach((key) => {
|
|
3793
|
+
var _a;
|
|
3794
|
+
this[key] = (_a = sizeMap === null || sizeMap === void 0 ? void 0 : sizeMap[key]) !== null && _a !== void 0 ? _a : "";
|
|
3795
|
+
});
|
|
3796
|
+
}
|
|
3731
3797
|
}
|
|
3732
3798
|
getClasses(extractedKeys) {
|
|
3733
3799
|
var _a;
|
|
3800
|
+
if (this.fontSizeTheme) {
|
|
3801
|
+
return this.fontSizeTheme.getClasses(extractedKeys);
|
|
3802
|
+
}
|
|
3734
3803
|
const size = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : (this.useDefaultKey ? 'md' : undefined);
|
|
3735
3804
|
return size ? [this[size]] : [''];
|
|
3736
3805
|
}
|
|
@@ -3809,11 +3878,11 @@ class RadiusTheme extends BaseTheme {
|
|
|
3809
3878
|
}
|
|
3810
3879
|
static createUITheme() {
|
|
3811
3880
|
return new RadiusTheme({
|
|
3812
|
-
xs: '[--br-unit:
|
|
3813
|
-
sm: '[--br-unit:
|
|
3814
|
-
md: '[--br-unit:
|
|
3815
|
-
lg: '[--br-unit:
|
|
3816
|
-
xl: '[--br-unit:
|
|
3881
|
+
xs: '[--br-unit:2]',
|
|
3882
|
+
sm: '[--br-unit:3]',
|
|
3883
|
+
md: '[--br-unit:4]',
|
|
3884
|
+
lg: '[--br-unit:5]',
|
|
3885
|
+
xl: '[--br-unit:6]'
|
|
3817
3886
|
}, true);
|
|
3818
3887
|
}
|
|
3819
3888
|
static createLayoutTheme() {
|
|
@@ -4093,13 +4162,6 @@ const textAppearanceClasses = {
|
|
|
4093
4162
|
info: "text-(--color-text-info)",
|
|
4094
4163
|
transparent: "text-transparent",
|
|
4095
4164
|
};
|
|
4096
|
-
const textSizeClasses = {
|
|
4097
|
-
xs: "text-xs",
|
|
4098
|
-
sm: "text-sm",
|
|
4099
|
-
md: "text-base",
|
|
4100
|
-
lg: "text-lg",
|
|
4101
|
-
xl: "text-xl",
|
|
4102
|
-
};
|
|
4103
4165
|
|
|
4104
4166
|
const filledBackgroundAppearanceClasses = {
|
|
4105
4167
|
default: "bg-(--color-bg-filled-default)",
|
|
@@ -5111,13 +5173,13 @@ class ListStyleTheme extends BaseTheme {
|
|
|
5111
5173
|
}
|
|
5112
5174
|
}
|
|
5113
5175
|
|
|
5114
|
-
const createTypographyComponentTheme = (tag, base = "text-balance",
|
|
5176
|
+
const createTypographyComponentTheme = (tag, base = "text-balance", fontSizeTheme = new FontSizeTheme(), defaults = {}, lineHeightTheme) => {
|
|
5115
5177
|
const typographyThemes = lineHeightTheme
|
|
5116
5178
|
? { ...defaultTypographyThemes, lineHeight: lineHeightTheme }
|
|
5117
5179
|
: defaultTypographyThemes;
|
|
5118
5180
|
return new ComponentTheme(tag, base, {
|
|
5119
5181
|
size: {
|
|
5120
|
-
text:
|
|
5182
|
+
text: fontSizeTheme,
|
|
5121
5183
|
},
|
|
5122
5184
|
appearance: {
|
|
5123
5185
|
text: GenericVariantTheme.createTypographyTextTheme(),
|
|
@@ -5130,29 +5192,17 @@ const createTypographyComponentTheme = (tag, base = "text-balance", textSizeMap
|
|
|
5130
5192
|
});
|
|
5131
5193
|
};
|
|
5132
5194
|
// Page title specific theme
|
|
5133
|
-
const pageTitleTheme = createTypographyComponentTheme("h1", "text-balance tracking-tight w-fit", {
|
|
5134
|
-
xs: "text-3xl max-lg:text-2xl max-md:text-xl",
|
|
5135
|
-
sm: "text-4xl max-lg:text-3xl max-md:text-2xl",
|
|
5136
|
-
md: "text-5xl max-lg:text-4xl max-md:text-3xl",
|
|
5137
|
-
lg: "text-6xl max-lg:text-5xl max-md:text-4xl",
|
|
5138
|
-
xl: "text-7xl max-lg:text-6xl max-md:text-5xl"
|
|
5139
|
-
}, mergeDefaults(themeDefaults.pageTitle, { semibold: true }), LineHeightTheme.createForPageTitle());
|
|
5195
|
+
const pageTitleTheme = createTypographyComponentTheme("h1", "text-balance tracking-tight w-fit", FontSizeTheme.createForPageTitle(), mergeDefaults(themeDefaults.pageTitle, { semibold: true }), LineHeightTheme.createForPageTitle());
|
|
5140
5196
|
// Section title specific theme
|
|
5141
|
-
const sectionTitleTheme = createTypographyComponentTheme("h2", "text-balance w-fit", {
|
|
5142
|
-
xs: "text-2xl max-lg:text-xl max-md:text-lg",
|
|
5143
|
-
sm: "text-3xl max-lg:text-2xl max-md:text-xl",
|
|
5144
|
-
md: "text-4xl max-lg:text-3xl max-md:text-2xl",
|
|
5145
|
-
lg: "text-5xl max-lg:text-4xl max-md:text-3xl",
|
|
5146
|
-
xl: "text-6xl max-lg:text-5xl max-md:text-4xl"
|
|
5147
|
-
}, mergeDefaults(themeDefaults.sectionTitle, { semibold: true }), LineHeightTheme.createForSectionTitle());
|
|
5197
|
+
const sectionTitleTheme = createTypographyComponentTheme("h2", "text-balance w-fit", FontSizeTheme.createForSectionTitle(), mergeDefaults(themeDefaults.sectionTitle, { semibold: true }), LineHeightTheme.createForSectionTitle());
|
|
5148
5198
|
// Title specific theme
|
|
5149
|
-
const titleTheme = createTypographyComponentTheme("h3", "text-balance w-fit",
|
|
5199
|
+
const titleTheme = createTypographyComponentTheme("h3", "text-balance w-fit", FontSizeTheme.createForTitle(), mergeDefaults(themeDefaults.title, { semibold: true }), LineHeightTheme.createForTitle());
|
|
5150
5200
|
// Text specific theme
|
|
5151
|
-
const textTheme = createTypographyComponentTheme("p", "p-0 m-0 w-fit",
|
|
5201
|
+
const textTheme = createTypographyComponentTheme("p", "p-0 m-0 w-fit", new FontSizeTheme(), themeDefaults.text);
|
|
5152
5202
|
// Link specific theme
|
|
5153
5203
|
const linkTheme = new ComponentTheme("a", "hover:underline w-fit cursor-pointer", {
|
|
5154
5204
|
size: {
|
|
5155
|
-
text: new
|
|
5205
|
+
text: new FontSizeTheme(),
|
|
5156
5206
|
},
|
|
5157
5207
|
appearance: {
|
|
5158
5208
|
text: GenericVariantTheme.createTypographyTextTheme(),
|
|
@@ -5163,7 +5213,7 @@ const linkTheme = new ComponentTheme("a", "hover:underline w-fit cursor-pointer"
|
|
|
5163
5213
|
// List specific theme
|
|
5164
5214
|
const listItemTheme = new ComponentTheme("li", "", {
|
|
5165
5215
|
size: {
|
|
5166
|
-
text: new
|
|
5216
|
+
text: new FontSizeTheme(),
|
|
5167
5217
|
},
|
|
5168
5218
|
appearance: {
|
|
5169
5219
|
text: GenericVariantTheme.createTypographyTextTheme(),
|
|
@@ -5174,7 +5224,7 @@ const listItemTheme = new ComponentTheme("li", "", {
|
|
|
5174
5224
|
// List specific theme
|
|
5175
5225
|
const listTheme = new ComponentTheme("ul", "list-inside", {
|
|
5176
5226
|
size: {
|
|
5177
|
-
text: new
|
|
5227
|
+
text: new FontSizeTheme(),
|
|
5178
5228
|
paddingLeft: new PlTheme(),
|
|
5179
5229
|
},
|
|
5180
5230
|
appearance: {
|
|
@@ -5403,7 +5453,7 @@ const defaultCheckboxTheme = new ComponentTheme("input", "peer col-start-1 row-s
|
|
|
5403
5453
|
lg: 'h-4.5 w-4.5',
|
|
5404
5454
|
xl: 'h-5 w-5'
|
|
5405
5455
|
}),
|
|
5406
|
-
text: new
|
|
5456
|
+
text: new FontSizeTheme()
|
|
5407
5457
|
},
|
|
5408
5458
|
layout: {
|
|
5409
5459
|
...defaultLayoutsThemes,
|
|
@@ -5455,7 +5505,7 @@ const defaultCheckboxWrapperTheme = new ComponentTheme("span", "", {
|
|
|
5455
5505
|
|
|
5456
5506
|
const defaultLabelTheme = new ComponentTheme("label", "has-[input]:cursor-pointer cursor-default", {
|
|
5457
5507
|
size: {
|
|
5458
|
-
text: new
|
|
5508
|
+
text: new FontSizeTheme(),
|
|
5459
5509
|
gap: new GapTheme(true),
|
|
5460
5510
|
},
|
|
5461
5511
|
appearance: {
|