@gobolt/genesis 0.6.0 → 0.6.2
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.
|
@@ -12,6 +12,8 @@ export interface TypographyProps {
|
|
|
12
12
|
isFullWidth?: boolean;
|
|
13
13
|
style?: CSSProperties;
|
|
14
14
|
isDisabled?: boolean;
|
|
15
|
+
fontWeight?: number;
|
|
16
|
+
fontSize?: string;
|
|
15
17
|
}
|
|
16
|
-
declare const Typography: ({ children, themeType, variant, state, color, isText, isFullWidth, style, isDisabled, ...rest }: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare const Typography: ({ children, themeType, variant, state, color, isText, isFullWidth, style, fontSize, fontWeight, isDisabled, ...rest }: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
19
|
export default Typography;
|
|
@@ -7,6 +7,8 @@ interface TypographyStyledProperties {
|
|
|
7
7
|
state?: keyof typeof STATE;
|
|
8
8
|
breakpoint?: keyof GenesisTheme["typography"];
|
|
9
9
|
color?: string;
|
|
10
|
+
fontWeight?: number;
|
|
11
|
+
fontSize?: string;
|
|
10
12
|
$isFullWidth?: boolean;
|
|
11
13
|
}
|
|
12
14
|
export declare const Headline: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Omit<import('antd/es/typography/Title').TitleProps & import('react').RefAttributes<HTMLElement>, "ref"> & {
|
package/dist/index.cjs
CHANGED
|
@@ -59296,7 +59296,7 @@ const Avatar$1 = styled(Avatar$2)`
|
|
|
59296
59296
|
return getGenesisClass$d(theme, type4, state);
|
|
59297
59297
|
}}
|
|
59298
59298
|
`;
|
|
59299
|
-
const getVariant$2 = (typography2, variant, breakpoint) => {
|
|
59299
|
+
const getVariant$2 = (typography2, variant, breakpoint, fontSize, fontWeight) => {
|
|
59300
59300
|
const typeClass = typography2["medium"];
|
|
59301
59301
|
return `
|
|
59302
59302
|
font-size: ${typeClass}.fontSize}px !important;
|
|
@@ -59320,13 +59320,15 @@ const getFontFamily = (variant) => {
|
|
|
59320
59320
|
${variant.includes("digits") ? "'Roboto Mono', sans-serif" : "'Inter', sans-serif"} !important;
|
|
59321
59321
|
`;
|
|
59322
59322
|
};
|
|
59323
|
-
const getGenesisTypographyClass = ({ colors: colors2, typography: typography2 }, $themeType, variant, state, breakpoint, color2, $isFullWidth) => `
|
|
59323
|
+
const getGenesisTypographyClass = ({ colors: colors2, typography: typography2 }, $themeType, variant, state, breakpoint, color2, $isFullWidth, fontSize, fontWeight) => `
|
|
59324
59324
|
&.ant-typography {
|
|
59325
59325
|
font-family: ${getFontFamily(variant)};
|
|
59326
59326
|
color: ${getColor(color2, colors2, $themeType)} !important;
|
|
59327
59327
|
${getVariant$2(typography2)}
|
|
59328
59328
|
margin-bottom: 0 !important;
|
|
59329
59329
|
width: ${$isFullWidth ? "100%" : "auto"};
|
|
59330
|
+
font-weight: ${fontWeight} !important;
|
|
59331
|
+
font-size: ${fontSize} !important;
|
|
59330
59332
|
line-height: 1;
|
|
59331
59333
|
-webkit-font-smoothing: antialiased;
|
|
59332
59334
|
|
|
@@ -59345,6 +59347,8 @@ const Headline = styled(Typography$1.Title)`
|
|
|
59345
59347
|
state,
|
|
59346
59348
|
breakpoint,
|
|
59347
59349
|
color: color2,
|
|
59350
|
+
fontSize,
|
|
59351
|
+
fontWeight,
|
|
59348
59352
|
$isFullWidth
|
|
59349
59353
|
}) => {
|
|
59350
59354
|
return getGenesisTypographyClass(
|
|
@@ -59354,6 +59358,8 @@ const Headline = styled(Typography$1.Title)`
|
|
|
59354
59358
|
state,
|
|
59355
59359
|
breakpoint,
|
|
59356
59360
|
color2,
|
|
59361
|
+
fontSize,
|
|
59362
|
+
fontWeight,
|
|
59357
59363
|
$isFullWidth
|
|
59358
59364
|
);
|
|
59359
59365
|
}}
|
|
@@ -59368,7 +59374,9 @@ const Paragraph = styled(
|
|
|
59368
59374
|
state,
|
|
59369
59375
|
breakpoint,
|
|
59370
59376
|
color: color2,
|
|
59371
|
-
$isFullWidth
|
|
59377
|
+
$isFullWidth,
|
|
59378
|
+
fontSize,
|
|
59379
|
+
fontWeight
|
|
59372
59380
|
}) => {
|
|
59373
59381
|
return getGenesisTypographyClass(
|
|
59374
59382
|
theme,
|
|
@@ -59377,7 +59385,9 @@ const Paragraph = styled(
|
|
|
59377
59385
|
state,
|
|
59378
59386
|
breakpoint,
|
|
59379
59387
|
color2,
|
|
59380
|
-
$isFullWidth
|
|
59388
|
+
$isFullWidth,
|
|
59389
|
+
fontSize,
|
|
59390
|
+
fontWeight
|
|
59381
59391
|
);
|
|
59382
59392
|
}}
|
|
59383
59393
|
`;
|
|
@@ -59389,7 +59399,9 @@ const Text = styled(Typography$1.Text)`
|
|
|
59389
59399
|
state,
|
|
59390
59400
|
breakpoint,
|
|
59391
59401
|
color: color2,
|
|
59392
|
-
$isFullWidth
|
|
59402
|
+
$isFullWidth,
|
|
59403
|
+
fontSize,
|
|
59404
|
+
fontWeight
|
|
59393
59405
|
}) => {
|
|
59394
59406
|
return getGenesisTypographyClass(
|
|
59395
59407
|
theme,
|
|
@@ -59398,7 +59410,9 @@ const Text = styled(Typography$1.Text)`
|
|
|
59398
59410
|
state,
|
|
59399
59411
|
breakpoint,
|
|
59400
59412
|
color2,
|
|
59401
|
-
$isFullWidth
|
|
59413
|
+
$isFullWidth,
|
|
59414
|
+
fontSize,
|
|
59415
|
+
fontWeight
|
|
59402
59416
|
);
|
|
59403
59417
|
}}
|
|
59404
59418
|
`;
|
|
@@ -60368,6 +60382,8 @@ const Typography = ({
|
|
|
60368
60382
|
isText = false,
|
|
60369
60383
|
isFullWidth,
|
|
60370
60384
|
style: style2,
|
|
60385
|
+
fontSize,
|
|
60386
|
+
fontWeight,
|
|
60371
60387
|
isDisabled,
|
|
60372
60388
|
...rest
|
|
60373
60389
|
}) => {
|
|
@@ -60385,6 +60401,8 @@ const Typography = ({
|
|
|
60385
60401
|
level: Number.parseInt(level),
|
|
60386
60402
|
$isFullWidth: isFullWidth,
|
|
60387
60403
|
style: style2,
|
|
60404
|
+
fontSize,
|
|
60405
|
+
fontWeight,
|
|
60388
60406
|
disabled: isDisabled,
|
|
60389
60407
|
...rest,
|
|
60390
60408
|
children: children2
|
|
@@ -60404,6 +60422,8 @@ const Typography = ({
|
|
|
60404
60422
|
$isFullWidth: isFullWidth,
|
|
60405
60423
|
style: style2,
|
|
60406
60424
|
disabled: isDisabled,
|
|
60425
|
+
fontSize,
|
|
60426
|
+
fontWeight,
|
|
60407
60427
|
...rest,
|
|
60408
60428
|
children: children2
|
|
60409
60429
|
}
|
|
@@ -60420,6 +60440,8 @@ const Typography = ({
|
|
|
60420
60440
|
$isFullWidth: isFullWidth,
|
|
60421
60441
|
style: style2,
|
|
60422
60442
|
disabled: isDisabled,
|
|
60443
|
+
fontSize,
|
|
60444
|
+
fontWeight,
|
|
60423
60445
|
...rest,
|
|
60424
60446
|
children: children2
|
|
60425
60447
|
}
|
|
@@ -81723,10 +81745,18 @@ const Progress = ({
|
|
|
81723
81745
|
alignItems: "center",
|
|
81724
81746
|
width: percentDisplayWidth
|
|
81725
81747
|
},
|
|
81726
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
81727
|
-
|
|
81728
|
-
|
|
81729
|
-
|
|
81748
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
81749
|
+
Typography,
|
|
81750
|
+
{
|
|
81751
|
+
color: overrideTextColor ?? textColor,
|
|
81752
|
+
variant: "digits3",
|
|
81753
|
+
fontWeight: 700,
|
|
81754
|
+
children: [
|
|
81755
|
+
overallPercent,
|
|
81756
|
+
"%"
|
|
81757
|
+
]
|
|
81758
|
+
}
|
|
81759
|
+
)
|
|
81730
81760
|
}
|
|
81731
81761
|
)
|
|
81732
81762
|
] });
|
|
@@ -81785,10 +81815,18 @@ const Progress = ({
|
|
|
81785
81815
|
alignItems: "center",
|
|
81786
81816
|
width: percentDisplayWidth
|
|
81787
81817
|
},
|
|
81788
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
81789
|
-
|
|
81790
|
-
|
|
81791
|
-
|
|
81818
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
81819
|
+
Typography,
|
|
81820
|
+
{
|
|
81821
|
+
color: overrideTextColor ?? textColor,
|
|
81822
|
+
variant: "digits3",
|
|
81823
|
+
fontWeight: 700,
|
|
81824
|
+
children: [
|
|
81825
|
+
combinedPercent,
|
|
81826
|
+
"%"
|
|
81827
|
+
]
|
|
81828
|
+
}
|
|
81829
|
+
)
|
|
81792
81830
|
}
|
|
81793
81831
|
)
|
|
81794
81832
|
] });
|
package/dist/index.js
CHANGED
|
@@ -59278,7 +59278,7 @@ const Avatar$1 = styled(Avatar$2)`
|
|
|
59278
59278
|
return getGenesisClass$d(theme, type4, state);
|
|
59279
59279
|
}}
|
|
59280
59280
|
`;
|
|
59281
|
-
const getVariant$2 = (typography2, variant, breakpoint) => {
|
|
59281
|
+
const getVariant$2 = (typography2, variant, breakpoint, fontSize, fontWeight) => {
|
|
59282
59282
|
const typeClass = typography2["medium"];
|
|
59283
59283
|
return `
|
|
59284
59284
|
font-size: ${typeClass}.fontSize}px !important;
|
|
@@ -59302,13 +59302,15 @@ const getFontFamily = (variant) => {
|
|
|
59302
59302
|
${variant.includes("digits") ? "'Roboto Mono', sans-serif" : "'Inter', sans-serif"} !important;
|
|
59303
59303
|
`;
|
|
59304
59304
|
};
|
|
59305
|
-
const getGenesisTypographyClass = ({ colors: colors2, typography: typography2 }, $themeType, variant, state, breakpoint, color2, $isFullWidth) => `
|
|
59305
|
+
const getGenesisTypographyClass = ({ colors: colors2, typography: typography2 }, $themeType, variant, state, breakpoint, color2, $isFullWidth, fontSize, fontWeight) => `
|
|
59306
59306
|
&.ant-typography {
|
|
59307
59307
|
font-family: ${getFontFamily(variant)};
|
|
59308
59308
|
color: ${getColor(color2, colors2, $themeType)} !important;
|
|
59309
59309
|
${getVariant$2(typography2)}
|
|
59310
59310
|
margin-bottom: 0 !important;
|
|
59311
59311
|
width: ${$isFullWidth ? "100%" : "auto"};
|
|
59312
|
+
font-weight: ${fontWeight} !important;
|
|
59313
|
+
font-size: ${fontSize} !important;
|
|
59312
59314
|
line-height: 1;
|
|
59313
59315
|
-webkit-font-smoothing: antialiased;
|
|
59314
59316
|
|
|
@@ -59327,6 +59329,8 @@ const Headline = styled(Typography$1.Title)`
|
|
|
59327
59329
|
state,
|
|
59328
59330
|
breakpoint,
|
|
59329
59331
|
color: color2,
|
|
59332
|
+
fontSize,
|
|
59333
|
+
fontWeight,
|
|
59330
59334
|
$isFullWidth
|
|
59331
59335
|
}) => {
|
|
59332
59336
|
return getGenesisTypographyClass(
|
|
@@ -59336,6 +59340,8 @@ const Headline = styled(Typography$1.Title)`
|
|
|
59336
59340
|
state,
|
|
59337
59341
|
breakpoint,
|
|
59338
59342
|
color2,
|
|
59343
|
+
fontSize,
|
|
59344
|
+
fontWeight,
|
|
59339
59345
|
$isFullWidth
|
|
59340
59346
|
);
|
|
59341
59347
|
}}
|
|
@@ -59350,7 +59356,9 @@ const Paragraph = styled(
|
|
|
59350
59356
|
state,
|
|
59351
59357
|
breakpoint,
|
|
59352
59358
|
color: color2,
|
|
59353
|
-
$isFullWidth
|
|
59359
|
+
$isFullWidth,
|
|
59360
|
+
fontSize,
|
|
59361
|
+
fontWeight
|
|
59354
59362
|
}) => {
|
|
59355
59363
|
return getGenesisTypographyClass(
|
|
59356
59364
|
theme,
|
|
@@ -59359,7 +59367,9 @@ const Paragraph = styled(
|
|
|
59359
59367
|
state,
|
|
59360
59368
|
breakpoint,
|
|
59361
59369
|
color2,
|
|
59362
|
-
$isFullWidth
|
|
59370
|
+
$isFullWidth,
|
|
59371
|
+
fontSize,
|
|
59372
|
+
fontWeight
|
|
59363
59373
|
);
|
|
59364
59374
|
}}
|
|
59365
59375
|
`;
|
|
@@ -59371,7 +59381,9 @@ const Text = styled(Typography$1.Text)`
|
|
|
59371
59381
|
state,
|
|
59372
59382
|
breakpoint,
|
|
59373
59383
|
color: color2,
|
|
59374
|
-
$isFullWidth
|
|
59384
|
+
$isFullWidth,
|
|
59385
|
+
fontSize,
|
|
59386
|
+
fontWeight
|
|
59375
59387
|
}) => {
|
|
59376
59388
|
return getGenesisTypographyClass(
|
|
59377
59389
|
theme,
|
|
@@ -59380,7 +59392,9 @@ const Text = styled(Typography$1.Text)`
|
|
|
59380
59392
|
state,
|
|
59381
59393
|
breakpoint,
|
|
59382
59394
|
color2,
|
|
59383
|
-
$isFullWidth
|
|
59395
|
+
$isFullWidth,
|
|
59396
|
+
fontSize,
|
|
59397
|
+
fontWeight
|
|
59384
59398
|
);
|
|
59385
59399
|
}}
|
|
59386
59400
|
`;
|
|
@@ -60350,6 +60364,8 @@ const Typography = ({
|
|
|
60350
60364
|
isText = false,
|
|
60351
60365
|
isFullWidth,
|
|
60352
60366
|
style: style2,
|
|
60367
|
+
fontSize,
|
|
60368
|
+
fontWeight,
|
|
60353
60369
|
isDisabled,
|
|
60354
60370
|
...rest
|
|
60355
60371
|
}) => {
|
|
@@ -60367,6 +60383,8 @@ const Typography = ({
|
|
|
60367
60383
|
level: Number.parseInt(level),
|
|
60368
60384
|
$isFullWidth: isFullWidth,
|
|
60369
60385
|
style: style2,
|
|
60386
|
+
fontSize,
|
|
60387
|
+
fontWeight,
|
|
60370
60388
|
disabled: isDisabled,
|
|
60371
60389
|
...rest,
|
|
60372
60390
|
children: children2
|
|
@@ -60386,6 +60404,8 @@ const Typography = ({
|
|
|
60386
60404
|
$isFullWidth: isFullWidth,
|
|
60387
60405
|
style: style2,
|
|
60388
60406
|
disabled: isDisabled,
|
|
60407
|
+
fontSize,
|
|
60408
|
+
fontWeight,
|
|
60389
60409
|
...rest,
|
|
60390
60410
|
children: children2
|
|
60391
60411
|
}
|
|
@@ -60402,6 +60422,8 @@ const Typography = ({
|
|
|
60402
60422
|
$isFullWidth: isFullWidth,
|
|
60403
60423
|
style: style2,
|
|
60404
60424
|
disabled: isDisabled,
|
|
60425
|
+
fontSize,
|
|
60426
|
+
fontWeight,
|
|
60405
60427
|
...rest,
|
|
60406
60428
|
children: children2
|
|
60407
60429
|
}
|
|
@@ -81705,10 +81727,18 @@ const Progress = ({
|
|
|
81705
81727
|
alignItems: "center",
|
|
81706
81728
|
width: percentDisplayWidth
|
|
81707
81729
|
},
|
|
81708
|
-
children: /* @__PURE__ */ jsxs(
|
|
81709
|
-
|
|
81710
|
-
|
|
81711
|
-
|
|
81730
|
+
children: /* @__PURE__ */ jsxs(
|
|
81731
|
+
Typography,
|
|
81732
|
+
{
|
|
81733
|
+
color: overrideTextColor ?? textColor,
|
|
81734
|
+
variant: "digits3",
|
|
81735
|
+
fontWeight: 700,
|
|
81736
|
+
children: [
|
|
81737
|
+
overallPercent,
|
|
81738
|
+
"%"
|
|
81739
|
+
]
|
|
81740
|
+
}
|
|
81741
|
+
)
|
|
81712
81742
|
}
|
|
81713
81743
|
)
|
|
81714
81744
|
] });
|
|
@@ -81767,10 +81797,18 @@ const Progress = ({
|
|
|
81767
81797
|
alignItems: "center",
|
|
81768
81798
|
width: percentDisplayWidth
|
|
81769
81799
|
},
|
|
81770
|
-
children: /* @__PURE__ */ jsxs(
|
|
81771
|
-
|
|
81772
|
-
|
|
81773
|
-
|
|
81800
|
+
children: /* @__PURE__ */ jsxs(
|
|
81801
|
+
Typography,
|
|
81802
|
+
{
|
|
81803
|
+
color: overrideTextColor ?? textColor,
|
|
81804
|
+
variant: "digits3",
|
|
81805
|
+
fontWeight: 700,
|
|
81806
|
+
children: [
|
|
81807
|
+
combinedPercent,
|
|
81808
|
+
"%"
|
|
81809
|
+
]
|
|
81810
|
+
}
|
|
81811
|
+
)
|
|
81774
81812
|
}
|
|
81775
81813
|
)
|
|
81776
81814
|
] });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gobolt/genesis",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "genesis design system",
|
|
5
5
|
"author": "gobolt",
|
|
6
6
|
"license": "MIT",
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
},
|
|
151
151
|
"dependencies": {
|
|
152
152
|
"@ant-design/icons": "^5.5.2",
|
|
153
|
-
"@gobolt/genesis-tokens": "^0.0.
|
|
153
|
+
"@gobolt/genesis-tokens": "^0.0.10",
|
|
154
154
|
"@mdx-js/react": "^3.0.1",
|
|
155
155
|
"@secondcloset/types": "^3.4.6",
|
|
156
156
|
"@types/d3": "^7.4.3",
|