@elliemae/ds-typography 3.35.0-rc.0 → 3.35.0-rc.1
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/cjs/config/useDefaultProps.js +16 -0
- package/dist/cjs/config/useDefaultProps.js.map +2 -2
- package/dist/cjs/constants/index.js +17 -1
- package/dist/cjs/constants/index.js.map +2 -2
- package/dist/cjs/parts/variants/body.js +34 -0
- package/dist/cjs/parts/variants/body.js.map +2 -2
- package/dist/cjs/parts/variants/button.js +72 -0
- package/dist/cjs/parts/variants/button.js.map +2 -2
- package/dist/cjs/parts/variants/feedback.js +52 -0
- package/dist/cjs/parts/variants/feedback.js.map +7 -0
- package/dist/cjs/parts/variants/header.js +31 -1
- package/dist/cjs/parts/variants/header.js.map +2 -2
- package/dist/cjs/parts/variants/highlight.js +4 -4
- package/dist/cjs/parts/variants/highlight.js.map +2 -2
- package/dist/cjs/parts/variants/index.js +5 -1
- package/dist/cjs/parts/variants/index.js.map +3 -3
- package/dist/cjs/parts/variants/link.js +66 -0
- package/dist/cjs/parts/variants/link.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +16 -0
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/esm/config/useDefaultProps.js +16 -0
- package/dist/esm/config/useDefaultProps.js.map +2 -2
- package/dist/esm/constants/index.js +17 -1
- package/dist/esm/constants/index.js.map +2 -2
- package/dist/esm/parts/variants/body.js +34 -0
- package/dist/esm/parts/variants/body.js.map +2 -2
- package/dist/esm/parts/variants/button.js +72 -0
- package/dist/esm/parts/variants/button.js.map +2 -2
- package/dist/esm/parts/variants/feedback.js +22 -0
- package/dist/esm/parts/variants/feedback.js.map +7 -0
- package/dist/esm/parts/variants/header.js +31 -1
- package/dist/esm/parts/variants/header.js.map +2 -2
- package/dist/esm/parts/variants/highlight.js +4 -4
- package/dist/esm/parts/variants/highlight.js.map +2 -2
- package/dist/esm/parts/variants/index.js +5 -1
- package/dist/esm/parts/variants/index.js.map +3 -3
- package/dist/esm/parts/variants/link.js +66 -0
- package/dist/esm/parts/variants/link.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +16 -0
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/types/config/useDefaultProps.d.ts +0 -1
- package/dist/types/parts/variants/feedback.d.ts +7 -0
- package/dist/types/parts/variants/index.d.ts +1 -0
- package/dist/types/react-desc-prop-types.d.ts +6 -5
- package/package.json +9 -6
|
@@ -57,6 +57,72 @@ const VARIANTS_LINK = {
|
|
|
57
57
|
&:focus {
|
|
58
58
|
color: ${(props) => props.theme.colors.brand[700]};
|
|
59
59
|
}
|
|
60
|
+
`,
|
|
61
|
+
[import_constants.TYPOGRAPHY_VARIANTS.LINK_SML_TITLE]: import_ds_system.css`
|
|
62
|
+
font-size: ${(props) => props.fontSize ?? "0.875rem"};
|
|
63
|
+
line-height: ${(props) => props.lineHeight ?? "1.503125rem"};
|
|
64
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
65
|
+
font-size: ${(props) => props.fontSize ?? "1.077rem"};
|
|
66
|
+
line-height: ${(props) => props.lineHeight ?? "1.85rem"};
|
|
67
|
+
}
|
|
68
|
+
text-decoration: underline;
|
|
69
|
+
color: ${(props) => props.theme.colors.brand[600]};
|
|
70
|
+
display: inline-block;
|
|
71
|
+
text-align: left;
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
&:hover {
|
|
74
|
+
color: ${(props) => props.theme.colors.brand[700]};
|
|
75
|
+
}
|
|
76
|
+
&:active {
|
|
77
|
+
color: ${(props) => props.theme.colors.brand[800]};
|
|
78
|
+
}
|
|
79
|
+
&:focus {
|
|
80
|
+
color: ${(props) => props.theme.colors.brand[700]};
|
|
81
|
+
}
|
|
82
|
+
`,
|
|
83
|
+
[import_constants.TYPOGRAPHY_VARIANTS.LINK_MED_TITLE]: import_ds_system.css`
|
|
84
|
+
font-size: ${(props) => props.fontSize ?? "1rem"};
|
|
85
|
+
line-height: ${(props) => props.lineHeight ?? "1.503125rem"};
|
|
86
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
87
|
+
font-size: ${(props) => props.fontSize ?? "1.231rem"};
|
|
88
|
+
line-height: ${(props) => props.lineHeight ?? "1.85rem"};
|
|
89
|
+
}
|
|
90
|
+
text-decoration: underline;
|
|
91
|
+
color: ${(props) => props.theme.colors.brand[600]};
|
|
92
|
+
display: inline-block;
|
|
93
|
+
text-align: left;
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
&:hover {
|
|
96
|
+
color: ${(props) => props.theme.colors.brand[700]};
|
|
97
|
+
}
|
|
98
|
+
&:active {
|
|
99
|
+
color: ${(props) => props.theme.colors.brand[800]};
|
|
100
|
+
}
|
|
101
|
+
&:focus {
|
|
102
|
+
color: ${(props) => props.theme.colors.brand[700]};
|
|
103
|
+
}
|
|
104
|
+
`,
|
|
105
|
+
[import_constants.TYPOGRAPHY_VARIANTS.LINK_LRG_TITLE]: import_ds_system.css`
|
|
106
|
+
font-size: ${(props) => props.fontSize ?? "1.125rem"};
|
|
107
|
+
line-height: ${(props) => props.lineHeight ?? "1.503125rem"};
|
|
108
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
109
|
+
font-size: ${(props) => props.fontSize ?? "1.385rem"};
|
|
110
|
+
line-height: ${(props) => props.lineHeight ?? "1.85rem"};
|
|
111
|
+
}
|
|
112
|
+
text-decoration: underline;
|
|
113
|
+
color: ${(props) => props.theme.colors.brand[600]};
|
|
114
|
+
display: inline-block;
|
|
115
|
+
text-align: left;
|
|
116
|
+
cursor: pointer;
|
|
117
|
+
&:hover {
|
|
118
|
+
color: ${(props) => props.theme.colors.brand[700]};
|
|
119
|
+
}
|
|
120
|
+
&:active {
|
|
121
|
+
color: ${(props) => props.theme.colors.brand[800]};
|
|
122
|
+
}
|
|
123
|
+
&:focus {
|
|
124
|
+
color: ${(props) => props.theme.colors.brand[700]};
|
|
125
|
+
}
|
|
60
126
|
`
|
|
61
127
|
};
|
|
62
128
|
//# sourceMappingURL=link.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/variants/link.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { css } from '@elliemae/ds-system';\nimport type { DSTypographyT } from '../../react-desc-prop-types.js';\nimport { TYPOGRAPHY_VARIANTS } from '../../constants/index.js';\n\n// typescript \"hack\" to infer the ReturnType of a generic function (css) with a generic argument (DSTypographyT.StyledPropsInterface)\n// as of 14/november/2023 I was not able to find a better way to do this.\nconst typedCss = () => css<DSTypographyT.StyledPropsInterface>``;\ntype LinkCSSMap = {\n [key in DSTypographyT.LinkVariants]: ReturnType<typeof typedCss>;\n};\n\n// as of 14/november/2023\n// mobile -> font-size: 16px\n// desktop -> font-size: 13px\n// the \"magic values\" of the rem units are the result of the following formula:\n// (variant's requirement px/RT value / 16px) for mobile\n// (variant's requirement px/RT value / 13px) for desktop\nexport const VARIANTS_LINK: LinkCSSMap = {\n [TYPOGRAPHY_VARIANTS.LINK]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '0.8125rem'};\n line-height: ${(props) => props.lineHeight ?? '1.503125rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '1rem'};\n line-height: ${(props) => props.lineHeight ?? '1.85rem'};\n }\n text-decoration: underline;\n color: ${(props) => props.theme.colors.brand[600]};\n display: inline-block;\n text-align: left;\n cursor: pointer;\n &:hover {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n &:active {\n color: ${(props) => props.theme.colors.brand[800]};\n }\n &:focus {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n `,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAoB;AAEpB,uBAAoC;AAIpC,MAAM,WAAW,MAAM;AAWhB,MAAM,gBAA4B;AAAA,EACvC,CAAC,qCAAoB,IAAI,GAAG;AAAA,iBACb,CAAC,UAAU,MAAM,YAAY;AAAA,mBAC3B,CAAC,UAAU,MAAM,cAAc;AAAA,yBACzB,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,mBACvC,CAAC,UAAU,MAAM,YAAY;AAAA,qBAC3B,CAAC,UAAU,MAAM,cAAc;AAAA;AAAA;AAAA,aAGvC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,eAKrC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,eAGvC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,eAGvC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAGtD;",
|
|
4
|
+
"sourcesContent": ["import { css } from '@elliemae/ds-system';\nimport type { DSTypographyT } from '../../react-desc-prop-types.js';\nimport { TYPOGRAPHY_VARIANTS } from '../../constants/index.js';\n\n// typescript \"hack\" to infer the ReturnType of a generic function (css) with a generic argument (DSTypographyT.StyledPropsInterface)\n// as of 14/november/2023 I was not able to find a better way to do this.\nconst typedCss = () => css<DSTypographyT.StyledPropsInterface>``;\ntype LinkCSSMap = {\n [key in DSTypographyT.LinkVariants]: ReturnType<typeof typedCss>;\n};\n\n// as of 14/november/2023\n// mobile -> font-size: 16px\n// desktop -> font-size: 13px\n// the \"magic values\" of the rem units are the result of the following formula:\n// (variant's requirement px/RT value / 16px) for mobile\n// (variant's requirement px/RT value / 13px) for desktop\nexport const VARIANTS_LINK: LinkCSSMap = {\n [TYPOGRAPHY_VARIANTS.LINK]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '0.8125rem'};\n line-height: ${(props) => props.lineHeight ?? '1.503125rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '1rem'};\n line-height: ${(props) => props.lineHeight ?? '1.85rem'};\n }\n text-decoration: underline;\n color: ${(props) => props.theme.colors.brand[600]};\n display: inline-block;\n text-align: left;\n cursor: pointer;\n &:hover {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n &:active {\n color: ${(props) => props.theme.colors.brand[800]};\n }\n &:focus {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n `,\n [TYPOGRAPHY_VARIANTS.LINK_SML_TITLE]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '0.875rem'};\n line-height: ${(props) => props.lineHeight ?? '1.503125rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '1.077rem'};\n line-height: ${(props) => props.lineHeight ?? '1.85rem'};\n }\n text-decoration: underline;\n color: ${(props) => props.theme.colors.brand[600]};\n display: inline-block;\n text-align: left;\n cursor: pointer;\n &:hover {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n &:active {\n color: ${(props) => props.theme.colors.brand[800]};\n }\n &:focus {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n `,\n [TYPOGRAPHY_VARIANTS.LINK_MED_TITLE]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '1rem'};\n line-height: ${(props) => props.lineHeight ?? '1.503125rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '1.231rem'};\n line-height: ${(props) => props.lineHeight ?? '1.85rem'};\n }\n text-decoration: underline;\n color: ${(props) => props.theme.colors.brand[600]};\n display: inline-block;\n text-align: left;\n cursor: pointer;\n &:hover {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n &:active {\n color: ${(props) => props.theme.colors.brand[800]};\n }\n &:focus {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n `,\n [TYPOGRAPHY_VARIANTS.LINK_LRG_TITLE]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '1.125rem'};\n line-height: ${(props) => props.lineHeight ?? '1.503125rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '1.385rem'};\n line-height: ${(props) => props.lineHeight ?? '1.85rem'};\n }\n text-decoration: underline;\n color: ${(props) => props.theme.colors.brand[600]};\n display: inline-block;\n text-align: left;\n cursor: pointer;\n &:hover {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n &:active {\n color: ${(props) => props.theme.colors.brand[800]};\n }\n &:focus {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n `,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAoB;AAEpB,uBAAoC;AAIpC,MAAM,WAAW,MAAM;AAWhB,MAAM,gBAA4B;AAAA,EACvC,CAAC,qCAAoB,IAAI,GAAG;AAAA,iBACb,CAAC,UAAU,MAAM,YAAY;AAAA,mBAC3B,CAAC,UAAU,MAAM,cAAc;AAAA,yBACzB,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,mBACvC,CAAC,UAAU,MAAM,YAAY;AAAA,qBAC3B,CAAC,UAAU,MAAM,cAAc;AAAA;AAAA;AAAA,aAGvC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,eAKrC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,eAGvC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,eAGvC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,EAGpD,CAAC,qCAAoB,cAAc,G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AY;AAAA,qBAC3B,CAAC,UAAU,MAAM,cAAc;AAAA;AAAA;AAAA,aAGvC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,eAKrC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,eAGvC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,eAGvC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAGtD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -43,18 +43,34 @@ const DSTypographyPropTypes = {
|
|
|
43
43
|
"h3",
|
|
44
44
|
"h4",
|
|
45
45
|
"h5",
|
|
46
|
+
"h3-strong",
|
|
47
|
+
"h4-strong",
|
|
48
|
+
"h5-strong",
|
|
46
49
|
"b1",
|
|
47
50
|
"b2",
|
|
48
51
|
"b3",
|
|
49
52
|
"b4",
|
|
53
|
+
"b1-light",
|
|
54
|
+
"b2-light",
|
|
55
|
+
"b3-light",
|
|
50
56
|
"button",
|
|
57
|
+
"button-sml-title",
|
|
58
|
+
"button-med-title",
|
|
59
|
+
"button-lrg-title",
|
|
51
60
|
"link",
|
|
61
|
+
"link-sml-title",
|
|
62
|
+
"link-med-title",
|
|
63
|
+
"link-lrg-title",
|
|
52
64
|
"quote-brand",
|
|
53
65
|
"quote-neutral",
|
|
54
66
|
"highlight-neutral",
|
|
55
67
|
"highlight-brand",
|
|
56
68
|
"highlight-important",
|
|
57
69
|
"highlight-critical",
|
|
70
|
+
"feedback-neutral",
|
|
71
|
+
"feedback-brand",
|
|
72
|
+
"feedback-important",
|
|
73
|
+
"feedback-critical",
|
|
58
74
|
"h1-article",
|
|
59
75
|
"h2-article",
|
|
60
76
|
"h3-article",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type {} from '@elliemae/ds-utilities';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { FontSizeProps, LineHeightProps, ColorProps } from '@elliemae/ds-system';\nimport type { WeakValidationMap } from 'react';\n\nexport declare namespace DSTypographyT {\n export type HeadingVariants = 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n export type BodyVariants = 'b1' | 'b2' | 'b3' | 'b4';\n export type ButtonVariants = 'button';\n export type LinkVariants = 'link';\n export type QuoteVariants = 'quote-brand' | 'quote-neutral';\n export type HighlightVariants =\n | 'highlight-neutral'\n | 'highlight-brand'\n | 'highlight-important'\n | 'highlight-critical';\n export type ArticleHeadingVariants = 'h1-article' | 'h2-article' | 'h3-article' | 'h4-article' | 'h5-article';\n export type ArticleBodyVariants = 'b1-article' | 'b2-article' | 'b3-article';\n\n export type Variant =\n | HeadingVariants\n | BodyVariants\n | ButtonVariants\n | LinkVariants\n | QuoteVariants\n | HighlightVariants\n | ArticleHeadingVariants\n | ArticleBodyVariants;\n\n export type VariantsMap = {\n [key in Uppercase<TypescriptHelpersT.KebabToSnakeCase<Variant>>]: Lowercase<\n TypescriptHelpersT.SnakeToKebabCase<key>\n >;\n };\n\n export type StyledPropsInterface = FontSizeProps &\n LineHeightProps &\n ColorProps & {\n children: DSTypographyT.InternalProps['children'];\n variant: DSTypographyT.Variant;\n $truncateWithEllipsis?: boolean;\n $truncateWithReadMore?: DSTypographyT.InternalProps['truncateWithReadMore'];\n };\n\n export interface RequiredProps {\n variant: Variant;\n children: React.ReactNode | React.ReactNode[];\n }\n\n export interface OptionalProps {\n as?: keyof JSX.IntrinsicElements;\n component?: keyof JSX.IntrinsicElements;\n innerRef?: React.MutableRefObject<HTMLDivElement | null> | React.RefCallback<HTMLDivElement>;\n truncateWithReadMore?: {\n lines: number;\n expanded: boolean;\n };\n }\n\n export interface DefaultProps {\n truncateWithEllipsis: boolean;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | 'color'>,\n XstyledProps,\n FontSizeProps,\n LineHeightProps,\n ColorProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | 'color'>,\n XstyledProps,\n FontSizeProps,\n LineHeightProps,\n ColorProps,\n RequiredProps {}\n}\n\nexport const DSTypographyPropTypes: DSPropTypesSchema<DSTypographyT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n variant: PropTypes.oneOf([\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'b1',\n 'b2',\n 'b3',\n 'b4',\n 'button',\n 'link',\n 'quote-brand',\n 'quote-neutral',\n 'highlight-neutral',\n 'highlight-brand',\n 'highlight-important',\n 'highlight-critical',\n 'h1-article',\n 'h2-article',\n 'h3-article',\n 'h4-article',\n 'h5-article',\n 'b1-article',\n 'b2-article',\n 'b3-article',\n ]).description(\n `render the default style based on the variant and the default mapping HTML tag:\n Variant to HTML Tag\n h1 => <h1 />,\n h2 => <h2 />,\n h3 => <h3 />,\n h4 => <h4 />,\n h5 => <h5 />,\n b1 => <p />,\n b2 => <p />,\n b3 => <p />,\n b4 => <p />,\n button => <button />,\n link => <a />,\n 'quote-brand' => <pre />,\n 'quote-neutral' => <pre />,\n 'highlight-neutral' => <span />,\n 'highlight-brand' => <span />,\n 'highlight-important' => <span />,\n 'highlight-critical' => <span />,\n 'h1-article' => <h1 />,\n 'h2-article' => <h2 />,\n 'h3-article' => <h3 />,\n 'h4-article' => <h4 />,\n 'h5-article' => <h5 />,\n 'b1-article' => <p />,\n 'b2-article' => <p />,\n 'b3-article' => <p />,\n `,\n ).isRequired,\n children: PropTypes.node.description('Children element').isRequired,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to font component.'),\n fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.bool])\n .description('Applies to the root container. For more info read xstyled docs')\n .xstyled(),\n lineHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.bool])\n .description('Applies to the root container. For more info read xstyled docs')\n .xstyled(),\n as: PropTypes.string.description('Use to override the printed HTML tag, ex: `span` or `strong`'),\n component: PropTypes.string.description(\n 'Same as `as` for internal use. Use to override the printed HTML tag, ex: `span` or `strong`',\n ),\n truncateWithEllipsis: PropTypes.bool\n .description('If true, the text will not wrap, but instead will truncate with a text overflow ellipsis.')\n .defaultValue(false),\n truncateWithReadMore: PropTypes.shape({\n lines: PropTypes.number.description('Number of lines to truncate to.'),\n expanded: PropTypes.bool.description('If true, the text will be expanded.'),\n }).description(\n 'Ammount of lines to truncate to. If expanded, the text will be expanded. Use in conjunction with useReadMoreTruncate hook',\n ),\n};\n\nexport const DSTypographyPropTypesSchema = DSTypographyPropTypes as unknown as WeakValidationMap<DSTypographyT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAAuE;
|
|
4
|
+
"sourcesContent": ["import type {} from '@elliemae/ds-utilities';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { FontSizeProps, LineHeightProps, ColorProps } from '@elliemae/ds-system';\nimport type { WeakValidationMap } from 'react';\n\nexport declare namespace DSTypographyT {\n export type HeadingVariants = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h3-strong' | 'h4-strong' | 'h5-strong';\n export type BodyVariants = 'b1' | 'b2' | 'b3' | 'b4' | 'b1-light' | 'b2-light' | 'b3-light';\n export type ButtonVariants = 'button' | 'button-sml-title' | 'button-med-title' | 'button-lrg-title';\n export type LinkVariants = 'link' | 'link-sml-title' | 'link-med-title' | 'link-lrg-title';\n export type QuoteVariants = 'quote-brand' | 'quote-neutral';\n export type HighlightVariants =\n | 'highlight-neutral'\n | 'highlight-brand'\n | 'highlight-important'\n | 'highlight-critical';\n export type FeedbackVariants = 'feedback-neutral' | 'feedback-brand' | 'feedback-important' | 'feedback-critical';\n export type ArticleHeadingVariants = 'h1-article' | 'h2-article' | 'h3-article' | 'h4-article' | 'h5-article';\n export type ArticleBodyVariants = 'b1-article' | 'b2-article' | 'b3-article';\n\n export type Variant =\n | HeadingVariants\n | BodyVariants\n | ButtonVariants\n | LinkVariants\n | QuoteVariants\n | HighlightVariants\n | ArticleHeadingVariants\n | ArticleBodyVariants\n | FeedbackVariants;\n\n export type VariantsMap = {\n [key in Uppercase<TypescriptHelpersT.KebabToSnakeCase<Variant>>]: Lowercase<\n TypescriptHelpersT.SnakeToKebabCase<key>\n >;\n };\n\n export type StyledPropsInterface = FontSizeProps &\n LineHeightProps &\n ColorProps & {\n children: DSTypographyT.InternalProps['children'];\n variant: DSTypographyT.Variant;\n $truncateWithEllipsis?: boolean;\n $truncateWithReadMore?: DSTypographyT.InternalProps['truncateWithReadMore'];\n };\n\n export interface RequiredProps {\n variant: Variant;\n children: React.ReactNode | React.ReactNode[];\n }\n\n export interface OptionalProps {\n as?: keyof JSX.IntrinsicElements;\n component?: keyof JSX.IntrinsicElements;\n innerRef?: React.MutableRefObject<HTMLDivElement | null> | React.RefCallback<HTMLDivElement>;\n truncateWithReadMore?: {\n lines: number;\n expanded: boolean;\n };\n }\n\n export interface DefaultProps {\n truncateWithEllipsis: boolean;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | 'color'>,\n XstyledProps,\n FontSizeProps,\n LineHeightProps,\n ColorProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | 'color'>,\n XstyledProps,\n FontSizeProps,\n LineHeightProps,\n ColorProps,\n RequiredProps {}\n}\n\nexport const DSTypographyPropTypes: DSPropTypesSchema<DSTypographyT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n variant: PropTypes.oneOf([\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h3-strong',\n 'h4-strong',\n 'h5-strong',\n 'b1',\n 'b2',\n 'b3',\n 'b4',\n 'b1-light',\n 'b2-light',\n 'b3-light',\n 'button',\n 'button-sml-title',\n 'button-med-title',\n 'button-lrg-title',\n 'link',\n 'link-sml-title',\n 'link-med-title',\n 'link-lrg-title',\n 'quote-brand',\n 'quote-neutral',\n 'highlight-neutral',\n 'highlight-brand',\n 'highlight-important',\n 'highlight-critical',\n 'feedback-neutral',\n 'feedback-brand',\n 'feedback-important',\n 'feedback-critical',\n 'h1-article',\n 'h2-article',\n 'h3-article',\n 'h4-article',\n 'h5-article',\n 'b1-article',\n 'b2-article',\n 'b3-article',\n ]).description(\n `render the default style based on the variant and the default mapping HTML tag:\n Variant to HTML Tag\n h1 => <h1 />,\n h2 => <h2 />,\n h3 => <h3 />,\n h4 => <h4 />,\n h5 => <h5 />,\n b1 => <p />,\n b2 => <p />,\n b3 => <p />,\n b4 => <p />,\n button => <button />,\n link => <a />,\n 'quote-brand' => <pre />,\n 'quote-neutral' => <pre />,\n 'highlight-neutral' => <span />,\n 'highlight-brand' => <span />,\n 'highlight-important' => <span />,\n 'highlight-critical' => <span />,\n 'h1-article' => <h1 />,\n 'h2-article' => <h2 />,\n 'h3-article' => <h3 />,\n 'h4-article' => <h4 />,\n 'h5-article' => <h5 />,\n 'b1-article' => <p />,\n 'b2-article' => <p />,\n 'b3-article' => <p />,\n `,\n ).isRequired,\n children: PropTypes.node.description('Children element').isRequired,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to font component.'),\n fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.bool])\n .description('Applies to the root container. For more info read xstyled docs')\n .xstyled(),\n lineHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.bool])\n .description('Applies to the root container. For more info read xstyled docs')\n .xstyled(),\n as: PropTypes.string.description('Use to override the printed HTML tag, ex: `span` or `strong`'),\n component: PropTypes.string.description(\n 'Same as `as` for internal use. Use to override the printed HTML tag, ex: `span` or `strong`',\n ),\n truncateWithEllipsis: PropTypes.bool\n .description('If true, the text will not wrap, but instead will truncate with a text overflow ellipsis.')\n .defaultValue(false),\n truncateWithReadMore: PropTypes.shape({\n lines: PropTypes.number.description('Number of lines to truncate to.'),\n expanded: PropTypes.bool.description('If true, the text will be expanded.'),\n }).description(\n 'Ammount of lines to truncate to. If expanded, the text will be expanded. Use in conjunction with useReadMoreTruncate hook',\n ),\n};\n\nexport const DSTypographyPropTypesSchema = DSTypographyPropTypes as unknown as WeakValidationMap<DSTypographyT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAAuE;AAqFhE,MAAM,wBAAgE;AAAA,EAC3E,GAAG;AAAA,EACH,GAAG;AAAA,EACH,SAAS,kCAAU,MAAM;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAA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U,kCAAU,KAAK,YAAY,qCAAqC;AAAA,EAC5E,CAAC,EAAE;AAAA,IACD;AAAA,EACF;AACF;AAEO,MAAM,8BAA8B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -6,18 +6,34 @@ const VariantToAsMap = {
|
|
|
6
6
|
h3: "h3",
|
|
7
7
|
h4: "h4",
|
|
8
8
|
h5: "h5",
|
|
9
|
+
"h3-strong": "h3",
|
|
10
|
+
"h4-strong": "h4",
|
|
11
|
+
"h5-strong": "h5",
|
|
9
12
|
b1: "p",
|
|
10
13
|
b2: "p",
|
|
11
14
|
b3: "p",
|
|
12
15
|
b4: "p",
|
|
16
|
+
"b1-light": "p",
|
|
17
|
+
"b2-light": "p",
|
|
18
|
+
"b3-light": "p",
|
|
13
19
|
button: "button",
|
|
20
|
+
"button-sml-title": "button",
|
|
21
|
+
"button-med-title": "button",
|
|
22
|
+
"button-lrg-title": "button",
|
|
14
23
|
link: "a",
|
|
24
|
+
"link-sml-title": "a",
|
|
25
|
+
"link-med-title": "a",
|
|
26
|
+
"link-lrg-title": "a",
|
|
15
27
|
"quote-brand": "pre",
|
|
16
28
|
"quote-neutral": "pre",
|
|
17
29
|
"highlight-neutral": "span",
|
|
18
30
|
"highlight-brand": "span",
|
|
19
31
|
"highlight-important": "span",
|
|
20
32
|
"highlight-critical": "span",
|
|
33
|
+
"feedback-neutral": "span",
|
|
34
|
+
"feedback-brand": "span",
|
|
35
|
+
"feedback-important": "span",
|
|
36
|
+
"feedback-critical": "span",
|
|
21
37
|
"h1-article": "h1",
|
|
22
38
|
"h2-article": "h2",
|
|
23
39
|
"h3-article": "h3",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useDefaultProps.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport type { DSTypographyT } from '../react-desc-prop-types.js';\n\nconst VariantToAsMap: Record<DSTypographyT.Variant, keyof JSX.IntrinsicElements> = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n b1: 'p',\n b2: 'p',\n b3: 'p',\n b4: 'p',\n button: 'button',\n link: 'a',\n 'quote-brand': 'pre',\n 'quote-neutral': 'pre',\n 'highlight-neutral': 'span',\n 'highlight-brand': 'span',\n 'highlight-important': 'span',\n 'highlight-critical': 'span',\n 'h1-article': 'h1',\n 'h2-article': 'h2',\n 'h3-article': 'h3',\n 'h4-article': 'h4',\n 'h5-article': 'h5',\n 'b1-article': 'p',\n 'b2-article': 'p',\n 'b3-article': 'p',\n};\nexport const useDefaultProps = ({\n variant,\n component,\n as: userAs,\n}: DSTypographyT.Props): { as: keyof JSX.IntrinsicElements } => {\n // component prop has higher priority than as prop and variant prop\n const defaultAs = component || userAs || VariantToAsMap[variant];\n const defaultProps = React.useMemo(() => ({ as: defaultAs }), [defaultAs]);\n return defaultProps;\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAGlB,MAAM,iBAA6E;AAAA,EACjF,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,sBAAsB;AAAA,EACtB,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAChB;AACO,MAAM,kBAAkB,CAAC;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,IAAI;AACN,MAAgE;AAE9D,QAAM,YAAY,aAAa,UAAU,eAAe,OAAO;AAC/D,QAAM,eAAeA,OAAM,QAAQ,OAAO,EAAE,IAAI,UAAU,IAAI,CAAC,SAAS,CAAC;AACzE,SAAO;AACT;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport type { DSTypographyT } from '../react-desc-prop-types.js';\n\nconst VariantToAsMap: Record<DSTypographyT.Variant, keyof JSX.IntrinsicElements> = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n 'h3-strong': 'h3',\n 'h4-strong': 'h4',\n 'h5-strong': 'h5',\n b1: 'p',\n b2: 'p',\n b3: 'p',\n b4: 'p',\n 'b1-light': 'p',\n 'b2-light': 'p',\n 'b3-light': 'p',\n button: 'button',\n 'button-sml-title': 'button',\n 'button-med-title': 'button',\n 'button-lrg-title': 'button',\n link: 'a',\n 'link-sml-title': 'a',\n 'link-med-title': 'a',\n 'link-lrg-title': 'a',\n 'quote-brand': 'pre',\n 'quote-neutral': 'pre',\n 'highlight-neutral': 'span',\n 'highlight-brand': 'span',\n 'highlight-important': 'span',\n 'highlight-critical': 'span',\n 'feedback-neutral': 'span',\n 'feedback-brand': 'span',\n 'feedback-important': 'span',\n 'feedback-critical': 'span',\n 'h1-article': 'h1',\n 'h2-article': 'h2',\n 'h3-article': 'h3',\n 'h4-article': 'h4',\n 'h5-article': 'h5',\n 'b1-article': 'p',\n 'b2-article': 'p',\n 'b3-article': 'p',\n};\nexport const useDefaultProps = ({\n variant,\n component,\n as: userAs,\n}: DSTypographyT.Props): { as: keyof JSX.IntrinsicElements } => {\n // component prop has higher priority than as prop and variant prop\n const defaultAs = component || userAs || VariantToAsMap[variant];\n const defaultProps = React.useMemo(() => ({ as: defaultAs }), [defaultAs]);\n return defaultProps;\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAGlB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+
H5_STRONG: "h5-strong",
|
|
30
33
|
B1: "b1",
|
|
31
34
|
B2: "b2",
|
|
32
35
|
B3: "b3",
|
|
33
36
|
B4: "b4",
|
|
37
|
+
B1_LIGHT: "b1-light",
|
|
38
|
+
B2_LIGHT: "b2-light",
|
|
39
|
+
B3_LIGHT: "b3-light",
|
|
34
40
|
H1_ARTICLE: "h1-article",
|
|
35
41
|
H2_ARTICLE: "h2-article",
|
|
36
42
|
H3_ARTICLE: "h3-article",
|
|
@@ -45,8 +51,18 @@ const TYPOGRAPHY_VARIANTS = {
|
|
|
45
51
|
HIGHLIGHT_BRAND: "highlight-brand",
|
|
46
52
|
HIGHLIGHT_IMPORTANT: "highlight-important",
|
|
47
53
|
HIGHLIGHT_CRITICAL: "highlight-critical",
|
|
54
|
+
FEEDBACK_BRAND: "feedback-brand",
|
|
55
|
+
FEEDBACK_NEUTRAL: "feedback-neutral",
|
|
56
|
+
FEEDBACK_IMPORTANT: "feedback-important",
|
|
57
|
+
FEEDBACK_CRITICAL: "feedback-critical",
|
|
48
58
|
BUTTON: "button",
|
|
49
|
-
|
|
59
|
+
BUTTON_SML_TITLE: "button-sml-title",
|
|
60
|
+
BUTTON_MED_TITLE: "button-med-title",
|
|
61
|
+
BUTTON_LRG_TITLE: "button-lrg-title",
|
|
62
|
+
LINK: "link",
|
|
63
|
+
LINK_SML_TITLE: "link-sml-title",
|
|
64
|
+
LINK_MED_TITLE: "link-med-title",
|
|
65
|
+
LINK_LRG_TITLE: "link-lrg-title"
|
|
50
66
|
};
|
|
51
67
|
export {
|
|
52
68
|
DSTypographyName,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\nimport type { DSTypographyT } from '../react-desc-prop-types.js';\n\nexport const DSTypographyName = 'DSTypography' as const;\n\nexport const TYPOGRAPHY_SLOTS = {\n // this is the only slot that was present before the slotObjectToDataTestIds function was created\n // since we have splitted the data-testid and the slot responsabilities in the styled helpers,\n // we can now freely change the \"values\" of this constant without implying breakign changes\n // if a user get a breaking change it's because they hardcoded the slot instead of using the constant.\n TYPOGRAPHY_ELEMENT: 'root',\n} as const;\n\n// this component was created before the slotObjectToDataTestIds function was created\n// to avoid breaking change we overwrite the slots that for legacy reason where not using the slotObjectToDataTestIds\nexport const LEGACY_DATA_TESTID = {\n // the new \"slot\" value -> 'root' need to point to the \"old\" data-testid value -> 'ds-typography-element'\n [TYPOGRAPHY_SLOTS.TYPOGRAPHY_ELEMENT]: 'ds-typography-element',\n // the old \"slot\" value -> 'typography-element' need to point to the \"old\" data-testid value -> 'ds-typography-element'\n // we are hardcoding this \"typography-element\" for legacy reason,\n // people that were using this constant doesn't expect us to change the `keys` arbitrarily,\n // having constant keys and changing value is literally the point of this kind of constants\n 'typography-element': 'ds-typography-element',\n};\n\nexport const TYPOGRAPHY_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSTypographyName, TYPOGRAPHY_SLOTS),\n ...LEGACY_DATA_TESTID,\n};\n\nexport const TYPOGRAPHY_VARIANTS: DSTypographyT.VariantsMap = {\n H1: 'h1',\n H2: 'h2',\n H3: 'h3',\n H4: 'h4',\n H5: 'h5',\n B1: 'b1',\n B2: 'b2',\n B3: 'b3',\n B4: 'b4',\n H1_ARTICLE: 'h1-article',\n H2_ARTICLE: 'h2-article',\n H3_ARTICLE: 'h3-article',\n H4_ARTICLE: 'h4-article',\n H5_ARTICLE: 'h5-article',\n B1_ARTICLE: 'b1-article',\n B2_ARTICLE: 'b2-article',\n B3_ARTICLE: 'b3-article',\n QUOTE_BRAND: 'quote-brand',\n QUOTE_NEUTRAL: 'quote-neutral',\n HIGHLIGHT_NEUTRAL: 'highlight-neutral',\n HIGHLIGHT_BRAND: 'highlight-brand',\n HIGHLIGHT_IMPORTANT: 'highlight-important',\n HIGHLIGHT_CRITICAL: 'highlight-critical',\n BUTTON: 'button',\n LINK: 'link',\n} as const;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAGjC,MAAM,mBAAmB;AAEzB,MAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA,EAK9B,oBAAoB;AACtB;AAIO,MAAM,qBAAqB;AAAA;AAAA,EAEhC,CAAC,iBAAiB,kBAAkB,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,EAKvC,sBAAsB;AACxB;AAEO,MAAM,yBAAyB;AAAA,EACpC,GAAG,wBAAwB,kBAAkB,gBAAgB;AAAA,EAC7D,GAAG;AACL;AAEO,MAAM,sBAAiD;AAAA,EAC5D,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,QAAQ;AAAA,EACR,MAAM;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\nimport type { DSTypographyT } from '../react-desc-prop-types.js';\n\nexport const DSTypographyName = 'DSTypography' as const;\n\nexport const TYPOGRAPHY_SLOTS = {\n // this is the only slot that was present before the slotObjectToDataTestIds function was created\n // since we have splitted the data-testid and the slot responsabilities in the styled helpers,\n // we can now freely change the \"values\" of this constant without implying breakign changes\n // if a user get a breaking change it's because they hardcoded the slot instead of using the constant.\n TYPOGRAPHY_ELEMENT: 'root',\n} as const;\n\n// this component was created before the slotObjectToDataTestIds function was created\n// to avoid breaking change we overwrite the slots that for legacy reason where not using the slotObjectToDataTestIds\nexport const LEGACY_DATA_TESTID = {\n // the new \"slot\" value -> 'root' need to point to the \"old\" data-testid value -> 'ds-typography-element'\n [TYPOGRAPHY_SLOTS.TYPOGRAPHY_ELEMENT]: 'ds-typography-element',\n // the old \"slot\" value -> 'typography-element' need to point to the \"old\" data-testid value -> 'ds-typography-element'\n // we are hardcoding this \"typography-element\" for legacy reason,\n // people that were using this constant doesn't expect us to change the `keys` arbitrarily,\n // having constant keys and changing value is literally the point of this kind of constants\n 'typography-element': 'ds-typography-element',\n};\n\nexport const TYPOGRAPHY_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSTypographyName, TYPOGRAPHY_SLOTS),\n ...LEGACY_DATA_TESTID,\n};\n\nexport const TYPOGRAPHY_VARIANTS: DSTypographyT.VariantsMap = {\n H1: 'h1',\n H2: 'h2',\n H3: 'h3',\n H4: 'h4',\n H5: 'h5',\n H3_STRONG: 'h3-strong',\n H4_STRONG: 'h4-strong',\n H5_STRONG: 'h5-strong',\n B1: 'b1',\n B2: 'b2',\n B3: 'b3',\n B4: 'b4',\n B1_LIGHT: 'b1-light',\n B2_LIGHT: 'b2-light',\n B3_LIGHT: 'b3-light',\n H1_ARTICLE: 'h1-article',\n H2_ARTICLE: 'h2-article',\n H3_ARTICLE: 'h3-article',\n H4_ARTICLE: 'h4-article',\n H5_ARTICLE: 'h5-article',\n B1_ARTICLE: 'b1-article',\n B2_ARTICLE: 'b2-article',\n B3_ARTICLE: 'b3-article',\n QUOTE_BRAND: 'quote-brand',\n QUOTE_NEUTRAL: 'quote-neutral',\n HIGHLIGHT_NEUTRAL: 'highlight-neutral',\n HIGHLIGHT_BRAND: 'highlight-brand',\n HIGHLIGHT_IMPORTANT: 'highlight-important',\n HIGHLIGHT_CRITICAL: 'highlight-critical',\n FEEDBACK_BRAND: 'feedback-brand',\n FEEDBACK_NEUTRAL: 'feedback-neutral',\n FEEDBACK_IMPORTANT: 'feedback-important',\n FEEDBACK_CRITICAL: 'feedback-critical',\n BUTTON: 'button',\n BUTTON_SML_TITLE: 'button-sml-title',\n BUTTON_MED_TITLE: 'button-med-title',\n BUTTON_LRG_TITLE: 'button-lrg-title',\n LINK: 'link',\n LINK_SML_TITLE: 'link-sml-title',\n LINK_MED_TITLE: 'link-med-title',\n LINK_LRG_TITLE: 'link-lrg-title',\n} as const;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAGjC,MAAM,mBAAmB;AAEzB,MAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA,EAK9B,oBAAoB;AACtB;AAIO,MAAM,qBAAqB;AAAA;AAAA,EAEhC,CAAC,iBAAiB,kBAAkB,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,EAKvC,sBAAsB;AACxB;AAEO,MAAM,yBAAyB;AAAA,EACpC,GAAG,wBAAwB,kBAAkB,gBAAgB;AAAA,EAC7D,GAAG;AACL;AAEO,MAAM,sBAAiD;AAAA,EAC5D,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,gBAAgB;AAClB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -10,6 +10,7 @@ const VARIANTS_CSS_BODY = {
|
|
|
10
10
|
font-size: ${(props) => props.fontSize ?? "1.08rem"};
|
|
11
11
|
line-height: ${(props) => props.lineHeight ?? "1.38rem"};
|
|
12
12
|
}
|
|
13
|
+
font-weight: 400;
|
|
13
14
|
`,
|
|
14
15
|
[TYPOGRAPHY_VARIANTS.B2]: css`
|
|
15
16
|
font-size: ${(props) => props.fontSize ?? "0.8125rem"};
|
|
@@ -18,6 +19,7 @@ const VARIANTS_CSS_BODY = {
|
|
|
18
19
|
font-size: ${(props) => props.fontSize ?? "1rem"};
|
|
19
20
|
line-height: ${(props) => props.lineHeight ?? "1.31rem"};
|
|
20
21
|
}
|
|
22
|
+
font-weight: 400;
|
|
21
23
|
`,
|
|
22
24
|
[TYPOGRAPHY_VARIANTS.B3]: css`
|
|
23
25
|
font-size: ${(props) => props.fontSize ?? "0.7475rem"};
|
|
@@ -26,6 +28,7 @@ const VARIANTS_CSS_BODY = {
|
|
|
26
28
|
font-size: ${(props) => props.fontSize ?? "0.92rem"};
|
|
27
29
|
line-height: ${(props) => props.lineHeight ?? "1.23rem"};
|
|
28
30
|
}
|
|
31
|
+
font-weight: 400;
|
|
29
32
|
`,
|
|
30
33
|
[TYPOGRAPHY_VARIANTS.B4]: css`
|
|
31
34
|
font-size: ${(props) => props.fontSize ?? "0.6906249999999999rem"};
|
|
@@ -34,6 +37,37 @@ const VARIANTS_CSS_BODY = {
|
|
|
34
37
|
font-size: ${(props) => props.fontSize ?? "0.85rem"};
|
|
35
38
|
line-height: ${(props) => props.lineHeight ?? "1rem"};
|
|
36
39
|
}
|
|
40
|
+
font-weight: 400;
|
|
41
|
+
`,
|
|
42
|
+
[TYPOGRAPHY_VARIANTS.B1_LIGHT]: css`
|
|
43
|
+
font-size: ${(props) => props.fontSize ?? "0.8775000000000001rem"};
|
|
44
|
+
line-height: ${(props) => props.lineHeight ?? "1.1212499999999999rem"};
|
|
45
|
+
color: ${(props) => props.theme.colors.neutral[600]};
|
|
46
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
47
|
+
font-size: ${(props) => props.fontSize ?? "1.08rem"};
|
|
48
|
+
line-height: ${(props) => props.lineHeight ?? "1.38rem"};
|
|
49
|
+
}
|
|
50
|
+
font-weight: 400;
|
|
51
|
+
`,
|
|
52
|
+
[TYPOGRAPHY_VARIANTS.B2_LIGHT]: css`
|
|
53
|
+
font-size: ${(props) => props.fontSize ?? "0.8125rem"};
|
|
54
|
+
line-height: ${(props) => props.lineHeight ?? "1.064375rem"};
|
|
55
|
+
color: ${(props) => props.theme.colors.neutral[600]};
|
|
56
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
57
|
+
font-size: ${(props) => props.fontSize ?? "1rem"};
|
|
58
|
+
line-height: ${(props) => props.lineHeight ?? "1.31rem"};
|
|
59
|
+
}
|
|
60
|
+
font-weight: 400;
|
|
61
|
+
`,
|
|
62
|
+
[TYPOGRAPHY_VARIANTS.B3_LIGHT]: css`
|
|
63
|
+
font-size: ${(props) => props.fontSize ?? "0.7475rem"};
|
|
64
|
+
line-height: ${(props) => props.lineHeight ?? "0.999375rem"};
|
|
65
|
+
color: ${(props) => props.theme.colors.neutral[600]};
|
|
66
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
67
|
+
font-size: ${(props) => props.fontSize ?? "0.92rem"};
|
|
68
|
+
line-height: ${(props) => props.lineHeight ?? "1.23rem"};
|
|
69
|
+
}
|
|
70
|
+
font-weight: 400;
|
|
37
71
|
`
|
|
38
72
|
};
|
|
39
73
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/variants/body.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { css } from '@elliemae/ds-system';\nimport { TYPOGRAPHY_VARIANTS } from '../../constants/index.js';\nimport type { DSTypographyT } from '../../react-desc-prop-types.js';\n\n// typescript \"hack\" to infer the ReturnType of a generic function (css) with a generic argument (DSTypographyT.StyledPropsInterface)\n// as of 14/november/2023 I was not able to find a better way to do this.\nconst typedCss = () => css<DSTypographyT.StyledPropsInterface>``;\ntype BodyCSSMap = {\n [key in DSTypographyT.BodyVariants]: ReturnType<typeof typedCss>;\n};\n\n// as of 14/november/2023\n// mobile -> font-size: 16px\n// desktop -> font-size: 13px\n// the \"magic values\" of the rem units are the result of the following formula:\n// (variant's requirement px/RT value / 16px) for mobile\n// (variant's requirement px/RT value / 13px) for desktop\nexport const VARIANTS_CSS_BODY: BodyCSSMap = {\n [TYPOGRAPHY_VARIANTS.B1]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '0.8775000000000001rem'};\n line-height: ${(props) => props.lineHeight ?? '1.1212499999999999rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '1.08rem'};\n line-height: ${(props) => props.lineHeight ?? '1.38rem'};\n }\n `,\n [TYPOGRAPHY_VARIANTS.B2]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '0.8125rem'};\n line-height: ${(props) => props.lineHeight ?? '1.064375rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '1rem'};\n line-height: ${(props) => props.lineHeight ?? '1.31rem'};\n }\n `,\n [TYPOGRAPHY_VARIANTS.B3]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '0.7475rem'};\n line-height: ${(props) => props.lineHeight ?? '0.999375rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '0.92rem'};\n line-height: ${(props) => props.lineHeight ?? '1.23rem'};\n }\n `,\n [TYPOGRAPHY_VARIANTS.B4]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '0.6906249999999999rem'};\n line-height: ${(props) => props.lineHeight ?? '0.8125rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '0.85rem'};\n line-height: ${(props) => props.lineHeight ?? '1rem'};\n }\n `,\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAW;AACpB,SAAS,2BAA2B;AAKpC,MAAM,WAAW,MAAM;AAWhB,MAAM,oBAAgC;AAAA,EAC3C,CAAC,oBAAoB,EAAE,GAAG;AAAA,iBACX,CAAC,UAAU,MAAM,YAAY;AAAA,mBAC3B,CAAC,UAAU,MAAM,cAAc;AAAA,yBACzB,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,mBACvC,CAAC,UAAU,MAAM,YAAY;AAAA,qBAC3B,CAAC,UAAU,MAAM,cAAc;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { css } from '@elliemae/ds-system';\nimport { TYPOGRAPHY_VARIANTS } from '../../constants/index.js';\nimport type { DSTypographyT } from '../../react-desc-prop-types.js';\n\n// typescript \"hack\" to infer the ReturnType of a generic function (css) with a generic argument (DSTypographyT.StyledPropsInterface)\n// as of 14/november/2023 I was not able to find a better way to do this.\nconst typedCss = () => css<DSTypographyT.StyledPropsInterface>``;\ntype BodyCSSMap = {\n [key in DSTypographyT.BodyVariants]: ReturnType<typeof typedCss>;\n};\n\n// as of 14/november/2023\n// mobile -> font-size: 16px\n// desktop -> font-size: 13px\n// the \"magic values\" of the rem units are the result of the following formula:\n// (variant's requirement px/RT value / 16px) for mobile\n// (variant's requirement px/RT value / 13px) for desktop\nexport const VARIANTS_CSS_BODY: BodyCSSMap = {\n [TYPOGRAPHY_VARIANTS.B1]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '0.8775000000000001rem'};\n line-height: ${(props) => props.lineHeight ?? '1.1212499999999999rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '1.08rem'};\n line-height: ${(props) => props.lineHeight ?? '1.38rem'};\n }\n font-weight: 400;\n `,\n [TYPOGRAPHY_VARIANTS.B2]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '0.8125rem'};\n line-height: ${(props) => props.lineHeight ?? '1.064375rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '1rem'};\n line-height: ${(props) => props.lineHeight ?? '1.31rem'};\n }\n font-weight: 400;\n `,\n [TYPOGRAPHY_VARIANTS.B3]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '0.7475rem'};\n line-height: ${(props) => props.lineHeight ?? '0.999375rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '0.92rem'};\n line-height: ${(props) => props.lineHeight ?? '1.23rem'};\n }\n font-weight: 400;\n `,\n [TYPOGRAPHY_VARIANTS.B4]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '0.6906249999999999rem'};\n line-height: ${(props) => props.lineHeight ?? '0.8125rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '0.85rem'};\n line-height: ${(props) => props.lineHeight ?? '1rem'};\n }\n font-weight: 400;\n `,\n [TYPOGRAPHY_VARIANTS.B1_LIGHT]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '0.8775000000000001rem'};\n line-height: ${(props) => props.lineHeight ?? '1.1212499999999999rem'};\n color: ${(props) => props.theme.colors.neutral[600]};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '1.08rem'};\n line-height: ${(props) => props.lineHeight ?? '1.38rem'};\n }\n font-weight: 400;\n `,\n [TYPOGRAPHY_VARIANTS.B2_LIGHT]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '0.8125rem'};\n line-height: ${(props) => props.lineHeight ?? '1.064375rem'};\n color: ${(props) => props.theme.colors.neutral[600]};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '1rem'};\n line-height: ${(props) => props.lineHeight ?? '1.31rem'};\n }\n font-weight: 400;\n `,\n [TYPOGRAPHY_VARIANTS.B3_LIGHT]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '0.7475rem'};\n line-height: ${(props) => props.lineHeight ?? '0.999375rem'};\n color: ${(props) => props.theme.colors.neutral[600]};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '0.92rem'};\n line-height: ${(props) => props.lineHeight ?? '1.23rem'};\n }\n font-weight: 400;\n `,\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAW;AACpB,SAAS,2BAA2B;AAKpC,MAAM,WAAW,MAAM;AAWhB,MAAM,oBAAgC;AAAA,EAC3C,CAAC,oBAAoB,EAAE,GAAG;AAAA,iBACX,CAAC,UAAU,MAAM,YAAY;AAAA,mBAC3B,CAAC,UAAU,MAAM,cAAc;AAAA,yBACzB,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,mBACvC,CAAC,UAAU,MAAM,YAAY;AAAA,qBAC3B,CAAC,UAAU,MAAM,cAAc;AAA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CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA,yBAC7B,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,mBACvC,CAAC,UAAU,MAAM,YAAY;AAAA,qBAC3B,CAAC,UAAU,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA,EAIlD,CAAC,oBAAoB,QAAQ,GAAG;AAAA,iBACjB,CAAC,UAAU,MAAM,YAAY;AAAA,mBAC3B,CAAC,UAAU,MAAM,cAAc;AAAA,aACrC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA,yBAC7B,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,mBACvC,CAAC,UAAU,MAAM,YAAY;AAAA,qBAC3B,CAAC,UAAU,MAAM,cAAc;AAAA;AAAA;AAAA;AAIpD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -26,6 +26,78 @@ const VARIANTS_BUTTON = {
|
|
|
26
26
|
&:focus {
|
|
27
27
|
color: ${(props) => props.theme.colors.brand[700]};
|
|
28
28
|
}
|
|
29
|
+
`,
|
|
30
|
+
[TYPOGRAPHY_VARIANTS.BUTTON_SML_TITLE]: css`
|
|
31
|
+
font-size: ${(props) => props.fontSize ?? "0.875rem"};
|
|
32
|
+
line-height: ${(props) => props.lineHeight ?? "1.503125rem"};
|
|
33
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
34
|
+
font-size: ${(props) => props.fontSize ?? "1.077rem"};
|
|
35
|
+
line-height: ${(props) => props.lineHeight ?? "1.85rem"};
|
|
36
|
+
}
|
|
37
|
+
text-decoration: underline;
|
|
38
|
+
color: ${(props) => props.theme.colors.brand[600]};
|
|
39
|
+
background: none;
|
|
40
|
+
border: none;
|
|
41
|
+
display: inline-block;
|
|
42
|
+
text-align: left;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
&:hover {
|
|
45
|
+
color: ${(props) => props.theme.colors.brand[700]};
|
|
46
|
+
}
|
|
47
|
+
&:active {
|
|
48
|
+
color: ${(props) => props.theme.colors.brand[800]};
|
|
49
|
+
}
|
|
50
|
+
&:focus {
|
|
51
|
+
color: ${(props) => props.theme.colors.brand[700]};
|
|
52
|
+
}
|
|
53
|
+
`,
|
|
54
|
+
[TYPOGRAPHY_VARIANTS.BUTTON_MED_TITLE]: css`
|
|
55
|
+
font-size: ${(props) => props.fontSize ?? "1rem"};
|
|
56
|
+
line-height: ${(props) => props.lineHeight ?? "1.503125rem"};
|
|
57
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
58
|
+
font-size: ${(props) => props.fontSize ?? "1.231rem"};
|
|
59
|
+
line-height: ${(props) => props.lineHeight ?? "1.85rem"};
|
|
60
|
+
}
|
|
61
|
+
text-decoration: underline;
|
|
62
|
+
color: ${(props) => props.theme.colors.brand[600]};
|
|
63
|
+
background: none;
|
|
64
|
+
border: none;
|
|
65
|
+
display: inline-block;
|
|
66
|
+
text-align: left;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
&:hover {
|
|
69
|
+
color: ${(props) => props.theme.colors.brand[700]};
|
|
70
|
+
}
|
|
71
|
+
&:active {
|
|
72
|
+
color: ${(props) => props.theme.colors.brand[800]};
|
|
73
|
+
}
|
|
74
|
+
&:focus {
|
|
75
|
+
color: ${(props) => props.theme.colors.brand[700]};
|
|
76
|
+
}
|
|
77
|
+
`,
|
|
78
|
+
[TYPOGRAPHY_VARIANTS.BUTTON_LRG_TITLE]: css`
|
|
79
|
+
font-size: ${(props) => props.fontSize ?? "1.125rem"};
|
|
80
|
+
line-height: ${(props) => props.lineHeight ?? "1.503125rem"};
|
|
81
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
82
|
+
font-size: ${(props) => props.fontSize ?? "1.385rem"};
|
|
83
|
+
line-height: ${(props) => props.lineHeight ?? "1.85rem"};
|
|
84
|
+
}
|
|
85
|
+
text-decoration: underline;
|
|
86
|
+
color: ${(props) => props.theme.colors.brand[600]};
|
|
87
|
+
background: none;
|
|
88
|
+
border: none;
|
|
89
|
+
display: inline-block;
|
|
90
|
+
text-align: left;
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
&:hover {
|
|
93
|
+
color: ${(props) => props.theme.colors.brand[700]};
|
|
94
|
+
}
|
|
95
|
+
&:active {
|
|
96
|
+
color: ${(props) => props.theme.colors.brand[800]};
|
|
97
|
+
}
|
|
98
|
+
&:focus {
|
|
99
|
+
color: ${(props) => props.theme.colors.brand[700]};
|
|
100
|
+
}
|
|
29
101
|
`
|
|
30
102
|
};
|
|
31
103
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/variants/button.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { css } from '@elliemae/ds-system';\nimport type { DSTypographyT } from '../../react-desc-prop-types.js';\nimport { TYPOGRAPHY_VARIANTS } from '../../constants/index.js';\n\n// typescript \"hack\" to infer the ReturnType of a generic function (css) with a generic argument (DSTypographyT.StyledPropsInterface)\n// as of 14/november/2023 I was not able to find a better way to do this.\nconst typedCss = () => css<DSTypographyT.StyledPropsInterface>``;\ntype ButtonCSSMap = {\n [key in DSTypographyT.ButtonVariants]: ReturnType<typeof typedCss>;\n};\n\n// as of 14/november/2023\n// mobile -> font-size: 16px\n// desktop -> font-size: 13px\n// the \"magic values\" of the rem units are the result of the following formula:\n// (variant's requirement px/RT value / 16px) for mobile\n// (variant's requirement px/RT value / 13px) for desktop\nexport const VARIANTS_BUTTON: ButtonCSSMap = {\n [TYPOGRAPHY_VARIANTS.BUTTON]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '0.8125rem'};\n line-height: ${(props) => props.lineHeight ?? '1.503125rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '1rem'};\n line-height: ${(props) => props.lineHeight ?? '1.85rem'};\n }\n text-decoration: underline;\n color: ${(props) => props.theme.colors.brand[600]};\n background: none;\n border: none;\n display: inline-block;\n text-align: left;\n cursor: pointer;\n &:hover {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n &:active {\n color: ${(props) => props.theme.colors.brand[800]};\n }\n &:focus {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n `,\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAW;AAEpB,SAAS,2BAA2B;AAIpC,MAAM,WAAW,MAAM;AAWhB,MAAM,kBAAgC;AAAA,EAC3C,CAAC,oBAAoB,MAAM,GAAG;AAAA,iBACf,CAAC,UAAU,MAAM,YAAY;AAAA,mBAC3B,CAAC,UAAU,MAAM,cAAc;AAAA,yBACzB,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,mBACvC,CAAC,UAAU,MAAM,YAAY;AAAA,qBAC3B,CAAC,UAAU,MAAM,cAAc;AAAA;AAAA;AAAA,aAGvC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAOrC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,eAGvC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,eAGvC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAGtD;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { css } from '@elliemae/ds-system';\nimport type { DSTypographyT } from '../../react-desc-prop-types.js';\nimport { TYPOGRAPHY_VARIANTS } from '../../constants/index.js';\n\n// typescript \"hack\" to infer the ReturnType of a generic function (css) with a generic argument (DSTypographyT.StyledPropsInterface)\n// as of 14/november/2023 I was not able to find a better way to do this.\nconst typedCss = () => css<DSTypographyT.StyledPropsInterface>``;\ntype ButtonCSSMap = {\n [key in DSTypographyT.ButtonVariants]: ReturnType<typeof typedCss>;\n};\n\n// as of 14/november/2023\n// mobile -> font-size: 16px\n// desktop -> font-size: 13px\n// the \"magic values\" of the rem units are the result of the following formula:\n// (variant's requirement px/RT value / 16px) for mobile\n// (variant's requirement px/RT value / 13px) for desktop\nexport const VARIANTS_BUTTON: ButtonCSSMap = {\n [TYPOGRAPHY_VARIANTS.BUTTON]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '0.8125rem'};\n line-height: ${(props) => props.lineHeight ?? '1.503125rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '1rem'};\n line-height: ${(props) => props.lineHeight ?? '1.85rem'};\n }\n text-decoration: underline;\n color: ${(props) => props.theme.colors.brand[600]};\n background: none;\n border: none;\n display: inline-block;\n text-align: left;\n cursor: pointer;\n &:hover {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n &:active {\n color: ${(props) => props.theme.colors.brand[800]};\n }\n &:focus {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n `,\n [TYPOGRAPHY_VARIANTS.BUTTON_SML_TITLE]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '0.875rem'};\n line-height: ${(props) => props.lineHeight ?? '1.503125rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '1.077rem'};\n line-height: ${(props) => props.lineHeight ?? '1.85rem'};\n }\n text-decoration: underline;\n color: ${(props) => props.theme.colors.brand[600]};\n background: none;\n border: none;\n display: inline-block;\n text-align: left;\n cursor: pointer;\n &:hover {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n &:active {\n color: ${(props) => props.theme.colors.brand[800]};\n }\n &:focus {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n `,\n [TYPOGRAPHY_VARIANTS.BUTTON_MED_TITLE]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '1rem'};\n line-height: ${(props) => props.lineHeight ?? '1.503125rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '1.231rem'};\n line-height: ${(props) => props.lineHeight ?? '1.85rem'};\n }\n text-decoration: underline;\n color: ${(props) => props.theme.colors.brand[600]};\n background: none;\n border: none;\n display: inline-block;\n text-align: left;\n cursor: pointer;\n &:hover {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n &:active {\n color: ${(props) => props.theme.colors.brand[800]};\n }\n &:focus {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n `,\n [TYPOGRAPHY_VARIANTS.BUTTON_LRG_TITLE]: css<DSTypographyT.StyledPropsInterface>`\n font-size: ${(props) => props.fontSize ?? '1.125rem'};\n line-height: ${(props) => props.lineHeight ?? '1.503125rem'};\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => props.fontSize ?? '1.385rem'};\n line-height: ${(props) => props.lineHeight ?? '1.85rem'};\n }\n text-decoration: underline;\n color: ${(props) => props.theme.colors.brand[600]};\n background: none;\n border: none;\n display: inline-block;\n text-align: left;\n cursor: pointer;\n &:hover {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n &:active {\n color: ${(props) => props.theme.colors.brand[800]};\n }\n &:focus {\n color: ${(props) => props.theme.colors.brand[700]};\n }\n `,\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAW;AAEpB,SAAS,2BAA2B;AAIpC,MAAM,WAAW,MAAM;AAWhB,MAAM,kBAAgC;AAAA,EAC3C,CAAC,oBAAoB,MAAM,GAAG;AAAA,iBACf,CAAC,UAAU,MAAM,YAAY;AAAA,mBAC3B,CAAC,UAAU,MAAM,cAAc;AAAA,yBACzB,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,mBACvC,CAAC,UAAU,MAAM,YAAY;AAAA,qBAC3B,CAAC,UAAU,MAAM,cAAc;AA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AM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,eAGvC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,eAGvC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,EAGpD,CAAC,oBAAoB,gBAAgB,GAAG;AAAA,iBACzB,CAAC,UAAU,MAAM,YAAY;AAAA,mBAC3B,CAAC,UAAU,MAAM,cAAc;AAAA,yBACzB,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,mBACvC,CAAC,UAAU,MAAM,YAAY;AAAA,qBAC3B,CAAC,UAAU,MAAM,cAAc;AAAA;AAAA;AAAA,aAGvC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAOrC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,eAGvC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,eAGvC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAGtD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { css } from "@elliemae/ds-system";
|
|
3
|
+
import { TYPOGRAPHY_VARIANTS } from "../../constants/index.js";
|
|
4
|
+
const typedCss = () => css``;
|
|
5
|
+
const VARIANTS_CSS_FEEDBACK = {
|
|
6
|
+
[TYPOGRAPHY_VARIANTS.FEEDBACK_NEUTRAL]: css`
|
|
7
|
+
color: ${(props) => props.theme.colors.neutral[600]};
|
|
8
|
+
`,
|
|
9
|
+
[TYPOGRAPHY_VARIANTS.FEEDBACK_BRAND]: css`
|
|
10
|
+
color: ${(props) => props.theme.colors.brand[800]};
|
|
11
|
+
`,
|
|
12
|
+
[TYPOGRAPHY_VARIANTS.FEEDBACK_IMPORTANT]: css`
|
|
13
|
+
color: ${(props) => props.theme.colors.warning[950]};
|
|
14
|
+
`,
|
|
15
|
+
[TYPOGRAPHY_VARIANTS.FEEDBACK_CRITICAL]: css`
|
|
16
|
+
color: ${(props) => props.theme.colors.danger[950]};
|
|
17
|
+
`
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
VARIANTS_CSS_FEEDBACK
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=feedback.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/variants/feedback.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { css } from '@elliemae/ds-system';\nimport { TYPOGRAPHY_VARIANTS } from '../../constants/index.js';\nimport type { DSTypographyT } from '../../react-desc-prop-types.js';\n\n// typescript \"hack\" to infer the ReturnType of a generic function (css) with a generic argument (DSTypographyT.StyledPropsInterface)\n// as of 14/november/2023 I was not able to find a better way to do this.\nconst typedCss = () => css<DSTypographyT.StyledPropsInterface>``;\ntype FeedbackCSSMap = {\n [key in DSTypographyT.FeedbackVariants]: ReturnType<typeof typedCss>;\n};\n\nexport const VARIANTS_CSS_FEEDBACK: FeedbackCSSMap = {\n [TYPOGRAPHY_VARIANTS.FEEDBACK_NEUTRAL]: css<DSTypographyT.StyledPropsInterface>`\n color: ${(props) => props.theme.colors.neutral[600]};\n `,\n [TYPOGRAPHY_VARIANTS.FEEDBACK_BRAND]: css<DSTypographyT.StyledPropsInterface>`\n color: ${(props) => props.theme.colors.brand[800]};\n `,\n [TYPOGRAPHY_VARIANTS.FEEDBACK_IMPORTANT]: css<DSTypographyT.StyledPropsInterface>`\n color: ${(props) => props.theme.colors.warning[950]};\n `,\n [TYPOGRAPHY_VARIANTS.FEEDBACK_CRITICAL]: css<DSTypographyT.StyledPropsInterface>`\n color: ${(props) => props.theme.colors.danger[950]};\n `,\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAW;AACpB,SAAS,2BAA2B;AAKpC,MAAM,WAAW,MAAM;AAKhB,MAAM,wBAAwC;AAAA,EACnD,CAAC,oBAAoB,gBAAgB,GAAG;AAAA,aAC7B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA,EAEpD,CAAC,oBAAoB,cAAc,GAAG;AAAA,aAC3B,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA,EAElD,CAAC,oBAAoB,kBAAkB,GAAG;AAAA,aAC/B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA,EAEpD,CAAC,oBAAoB,iBAAiB,GAAG;AAAA,aAC9B,CAAC,UAAU,MAAM,MAAM,OAAO,OAAO,GAAG;AAAA;AAErD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -19,6 +19,7 @@ const VARIANTS_CSS_HEADER = {
|
|
|
19
19
|
font-size: ${(props) => props.fontSize ?? "1.85rem"};
|
|
20
20
|
line-height: ${(props) => props.lineHeight ?? "2.38rem"};
|
|
21
21
|
}
|
|
22
|
+
font-weight: 400;
|
|
22
23
|
`,
|
|
23
24
|
[TYPOGRAPHY_VARIANTS.H3]: css`
|
|
24
25
|
font-size: ${(props) => props.fontSize ?? "1.1212499999999999rem"};
|
|
@@ -27,6 +28,7 @@ const VARIANTS_CSS_HEADER = {
|
|
|
27
28
|
font-size: ${(props) => props.fontSize ?? "1.38rem"};
|
|
28
29
|
line-height: ${(props) => props.lineHeight ?? "1.69rem"};
|
|
29
30
|
}
|
|
31
|
+
font-weight: 400;
|
|
30
32
|
`,
|
|
31
33
|
[TYPOGRAPHY_VARIANTS.H4]: css`
|
|
32
34
|
font-size: ${(props) => props.fontSize ?? "0.999375rem"};
|
|
@@ -35,7 +37,7 @@ const VARIANTS_CSS_HEADER = {
|
|
|
35
37
|
font-size: ${(props) => props.fontSize ?? "1.23rem"};
|
|
36
38
|
line-height: ${(props) => props.lineHeight ?? "1.54rem"};
|
|
37
39
|
}
|
|
38
|
-
font-weight:
|
|
40
|
+
font-weight: 400;
|
|
39
41
|
`,
|
|
40
42
|
[TYPOGRAPHY_VARIANTS.H5]: css`
|
|
41
43
|
font-size: ${(props) => props.fontSize ?? "0.8775000000000001rem"};
|
|
@@ -44,6 +46,34 @@ const VARIANTS_CSS_HEADER = {
|
|
|
44
46
|
font-size: ${(props) => props.fontSize ?? "1.08rem"};
|
|
45
47
|
line-height: ${(props) => props.lineHeight ?? "1.31rem"};
|
|
46
48
|
}
|
|
49
|
+
font-weight: 400;
|
|
50
|
+
`,
|
|
51
|
+
[TYPOGRAPHY_VARIANTS.H5_STRONG]: css`
|
|
52
|
+
font-size: ${(props) => props.fontSize ?? "0.8775000000000001rem"};
|
|
53
|
+
line-height: ${(props) => props.lineHeight ?? "1.064375rem"};
|
|
54
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
55
|
+
font-size: ${(props) => props.fontSize ?? "1.08rem"};
|
|
56
|
+
line-height: ${(props) => props.lineHeight ?? "1.31rem"};
|
|
57
|
+
}
|
|
58
|
+
font-weight: 600;
|
|
59
|
+
`,
|
|
60
|
+
[TYPOGRAPHY_VARIANTS.H4_STRONG]: css`
|
|
61
|
+
font-size: ${(props) => props.fontSize ?? "0.999375rem"};
|
|
62
|
+
line-height: ${(props) => props.lineHeight ?? "1.25125rem"};
|
|
63
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
64
|
+
font-size: ${(props) => props.fontSize ?? "1.23rem"};
|
|
65
|
+
line-height: ${(props) => props.lineHeight ?? "1.54rem"};
|
|
66
|
+
}
|
|
67
|
+
font-weight: 600;
|
|
68
|
+
`,
|
|
69
|
+
[TYPOGRAPHY_VARIANTS.H3_STRONG]: css`
|
|
70
|
+
font-size: ${(props) => props.fontSize ?? "1.1212499999999999rem"};
|
|
71
|
+
line-height: ${(props) => props.lineHeight ?? "1.373125rem"};
|
|
72
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
73
|
+
font-size: ${(props) => props.fontSize ?? "1.38rem"};
|
|
74
|
+
line-height: ${(props) => props.lineHeight ?? "1.69rem"};
|
|
75
|
+
}
|
|
76
|
+
font-weight: 600;
|
|
47
77
|
`
|
|
48
78
|
};
|
|
49
79
|
export {
|