@salutejs/plasma-new-hope 0.318.0-dev.0 → 0.320.0-dev.0
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/cjs/components/Checkbox/Checkbox.js +2 -2
- package/cjs/components/Checkbox/Checkbox.js.map +1 -1
- package/cjs/components/Typography/Body/Body.css +1 -1
- package/cjs/components/Typography/Typography.js +4 -4
- package/cjs/components/Typography/Typography.js.map +1 -1
- package/cjs/components/Typography/Typography.styles.js +1 -1
- package/cjs/components/Typography/Typography.styles.js.map +1 -1
- package/cjs/components/Typography/{Typography.styles_fa07dt.css → Typography.styles_c0qunc.css} +1 -1
- package/cjs/components/Typography/tokens.js +3 -1
- package/cjs/components/Typography/tokens.js.map +1 -1
- package/cjs/index.css +1 -1
- package/emotion/cjs/components/Checkbox/Checkbox.js +2 -2
- package/emotion/cjs/components/Checkbox/Checkbox.template-doc.mdx +13 -0
- package/emotion/cjs/components/Typography/Typography.js +4 -4
- package/emotion/cjs/components/Typography/Typography.styles.js +1 -1
- package/emotion/cjs/components/Typography/Typography.template-doc.mdx +26 -9
- package/emotion/cjs/components/Typography/tokens.js +3 -1
- package/emotion/cjs/examples/typography/components/Body/Body.config.js +5 -5
- package/emotion/cjs/examples/typography/components/Body/Body.stories.tsx +13 -0
- package/emotion/cjs/examples/typography/components/Dspl/Dspl.config.js +3 -3
- package/emotion/cjs/examples/typography/components/Dspl/Dspl.stories.tsx +13 -0
- package/emotion/cjs/examples/typography/components/Heading/Heading.config.js +5 -5
- package/emotion/cjs/examples/typography/components/Heading/Heading.stories.tsx +13 -0
- package/emotion/cjs/examples/typography/components/Text/Text.config.js +4 -4
- package/emotion/cjs/examples/typography/components/Text/Text.stories.tsx +13 -0
- package/emotion/es/components/Checkbox/Checkbox.js +2 -2
- package/emotion/es/components/Checkbox/Checkbox.template-doc.mdx +13 -0
- package/emotion/es/components/Typography/Typography.js +4 -4
- package/emotion/es/components/Typography/Typography.styles.js +1 -1
- package/emotion/es/components/Typography/Typography.template-doc.mdx +26 -9
- package/emotion/es/components/Typography/tokens.js +3 -1
- package/emotion/es/examples/typography/components/Body/Body.config.js +5 -5
- package/emotion/es/examples/typography/components/Body/Body.stories.tsx +13 -0
- package/emotion/es/examples/typography/components/Dspl/Dspl.config.js +3 -3
- package/emotion/es/examples/typography/components/Dspl/Dspl.stories.tsx +13 -0
- package/emotion/es/examples/typography/components/Heading/Heading.config.js +5 -5
- package/emotion/es/examples/typography/components/Heading/Heading.stories.tsx +13 -0
- package/emotion/es/examples/typography/components/Text/Text.config.js +4 -4
- package/emotion/es/examples/typography/components/Text/Text.stories.tsx +13 -0
- package/es/components/Checkbox/Checkbox.js +2 -2
- package/es/components/Checkbox/Checkbox.js.map +1 -1
- package/es/components/Typography/Body/Body.css +1 -1
- package/es/components/Typography/Typography.js +4 -4
- package/es/components/Typography/Typography.js.map +1 -1
- package/es/components/Typography/Typography.styles.js +1 -1
- package/es/components/Typography/Typography.styles.js.map +1 -1
- package/es/components/Typography/{Typography.styles_fa07dt.css → Typography.styles_c0qunc.css} +1 -1
- package/es/components/Typography/tokens.js +3 -1
- package/es/components/Typography/tokens.js.map +1 -1
- package/es/index.css +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Checkbox/Checkbox.js +2 -2
- package/styled-components/cjs/components/Checkbox/Checkbox.template-doc.mdx +13 -0
- package/styled-components/cjs/components/Typography/Typography.js +4 -4
- package/styled-components/cjs/components/Typography/Typography.styles.js +1 -1
- package/styled-components/cjs/components/Typography/Typography.template-doc.mdx +26 -9
- package/styled-components/cjs/components/Typography/tokens.js +3 -1
- package/styled-components/cjs/examples/typography/components/Body/Body.config.js +5 -5
- package/styled-components/cjs/examples/typography/components/Body/Body.stories.tsx +13 -0
- package/styled-components/cjs/examples/typography/components/Dspl/Dspl.config.js +3 -3
- package/styled-components/cjs/examples/typography/components/Dspl/Dspl.stories.tsx +13 -0
- package/styled-components/cjs/examples/typography/components/Heading/Heading.config.js +5 -5
- package/styled-components/cjs/examples/typography/components/Heading/Heading.stories.tsx +13 -0
- package/styled-components/cjs/examples/typography/components/Text/Text.config.js +4 -4
- package/styled-components/cjs/examples/typography/components/Text/Text.stories.tsx +13 -0
- package/styled-components/es/components/Checkbox/Checkbox.js +2 -2
- package/styled-components/es/components/Checkbox/Checkbox.template-doc.mdx +13 -0
- package/styled-components/es/components/Typography/Typography.js +4 -4
- package/styled-components/es/components/Typography/Typography.styles.js +1 -1
- package/styled-components/es/components/Typography/Typography.template-doc.mdx +26 -9
- package/styled-components/es/components/Typography/tokens.js +3 -1
- package/styled-components/es/examples/typography/components/Body/Body.config.js +5 -5
- package/styled-components/es/examples/typography/components/Body/Body.stories.tsx +13 -0
- package/styled-components/es/examples/typography/components/Dspl/Dspl.config.js +3 -3
- package/styled-components/es/examples/typography/components/Dspl/Dspl.stories.tsx +13 -0
- package/styled-components/es/examples/typography/components/Heading/Heading.config.js +5 -5
- package/styled-components/es/examples/typography/components/Heading/Heading.stories.tsx +13 -0
- package/styled-components/es/examples/typography/components/Text/Text.config.js +4 -4
- package/styled-components/es/examples/typography/components/Text/Text.stories.tsx +13 -0
- package/types/components/Typography/Body/Body.d.ts +2 -10
- package/types/components/Typography/Body/Body.d.ts.map +1 -1
- package/types/components/Typography/Dspl/Dspl.d.ts +2 -10
- package/types/components/Typography/Dspl/Dspl.d.ts.map +1 -1
- package/types/components/Typography/Heading/Heading.d.ts +2 -10
- package/types/components/Typography/Heading/Heading.d.ts.map +1 -1
- package/types/components/Typography/Text/Text.d.ts +2 -10
- package/types/components/Typography/Text/Text.d.ts.map +1 -1
- package/types/components/Typography/Typography.d.ts +1 -5
- package/types/components/Typography/Typography.d.ts.map +1 -1
- package/types/components/Typography/Typography.styles.d.ts.map +1 -1
- package/types/components/Typography/Typography.types.d.ts +22 -5
- package/types/components/Typography/Typography.types.d.ts.map +1 -1
- package/types/components/Typography/tokens.d.ts +2 -0
- package/types/components/Typography/tokens.d.ts.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useMemo, useRef } from 'react';\nimport { safeUseId, useForkRef, extractTextFrom } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../engines/types';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as focusedCSS } from './variations/_focused/base';\nimport { Done, Indeterminate } from './IconsSvg';\nimport {\n StyledContent,\n StyledContentWrapper,\n StyledDescription,\n StyledInput,\n StyledLabel,\n StyledTrigger,\n base,\n StyledTriggerWrapper,\n} from './Checkbox.styles';\nimport type { CheckboxProps } from './Checkbox.types';\nimport { classes } from './Checkbox.tokens';\n\nexport const checkboxRoot = (Root: RootProps<HTMLInputElement, CheckboxProps>) =>\n forwardRef<HTMLInputElement, CheckboxProps>((props, ref) => {\n const {\n size,\n view,\n focused,\n disabled,\n id,\n label,\n description,\n indeterminate,\n style,\n className,\n singleLine = false,\n 'aria-label': ariaLabelExternal,\n ...rest\n } = props;\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const forkRef = useForkRef(inputRef, ref);\n\n useEffect(() => {\n if (inputRef.current
|
1
|
+
{"version":3,"file":"Checkbox.js","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useMemo, useRef } from 'react';\nimport { safeUseId, useForkRef, extractTextFrom } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../engines/types';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as focusedCSS } from './variations/_focused/base';\nimport { Done, Indeterminate } from './IconsSvg';\nimport {\n StyledContent,\n StyledContentWrapper,\n StyledDescription,\n StyledInput,\n StyledLabel,\n StyledTrigger,\n base,\n StyledTriggerWrapper,\n} from './Checkbox.styles';\nimport type { CheckboxProps } from './Checkbox.types';\nimport { classes } from './Checkbox.tokens';\n\nexport const checkboxRoot = (Root: RootProps<HTMLInputElement, CheckboxProps>) =>\n forwardRef<HTMLInputElement, CheckboxProps>((props, ref) => {\n const {\n size,\n view,\n focused,\n disabled,\n id,\n label,\n description,\n indeterminate,\n style,\n className,\n singleLine = false,\n 'aria-label': ariaLabelExternal,\n ...rest\n } = props;\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const forkRef = useForkRef(inputRef, ref);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.indeterminate = Boolean(indeterminate);\n }\n }, [inputRef, indeterminate]);\n\n const uniqId = safeUseId();\n const uniqLabelId = `label-${uniqId}`;\n const uniqDescriptionId = `description-${uniqId}`;\n const checkboxId = id || `input-${uniqId}`;\n\n const ariaLabel = useMemo(() => ariaLabelExternal || extractTextFrom(label), [ariaLabelExternal, label]);\n const isLabelAriaHidden = typeof label === 'string';\n const canFocused = focused ? 0 : -1;\n const hasContent = label || description;\n const singleLineClass = singleLine ? classes.singleLine : undefined;\n const onlyDescriptionClass = !label && description ? classes.onlyDescription : undefined;\n\n return (\n <Root\n view={view}\n size={size}\n disabled={disabled}\n focused={focused}\n style={style}\n className={className}\n tabIndex={-1}\n >\n <StyledInput\n {...rest}\n id={checkboxId}\n ref={forkRef}\n type=\"checkbox\"\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={uniqDescriptionId}\n tabIndex={canFocused}\n />\n <StyledContentWrapper htmlFor={checkboxId} className={singleLineClass}>\n <StyledTriggerWrapper>\n <StyledTrigger className={classes.checkboxTrigger}>\n {indeterminate ? <Indeterminate /> : <Done />}\n </StyledTrigger>\n </StyledTriggerWrapper>\n {hasContent && (\n <StyledContent className={singleLineClass}>\n {label && (\n <StyledLabel\n className={singleLineClass}\n id={uniqLabelId}\n aria-hidden={isLabelAriaHidden}\n >\n {label}\n </StyledLabel>\n )}\n {description && (\n <StyledDescription\n className={cx(singleLineClass, onlyDescriptionClass)}\n id={uniqDescriptionId}\n >\n {description}\n </StyledDescription>\n )}\n </StyledContent>\n )}\n </StyledContentWrapper>\n </Root>\n );\n });\n\nexport const checkboxConfig = {\n name: 'Checkbox',\n tag: 'div',\n layout: checkboxRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n disabled: {\n css: disabledCSS,\n },\n focused: {\n css: focusedCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'accent',\n },\n};\n"],"names":["checkboxRoot","Root","forwardRef","props","ref","size","view","focused","disabled","id","label","description","indeterminate","style","className","_props$singleLine","singleLine","ariaLabelExternal","rest","_objectWithoutProperties","_excluded","inputRef","useRef","forkRef","useForkRef","useEffect","current","Boolean","uniqId","safeUseId","uniqLabelId","concat","uniqDescriptionId","checkboxId","ariaLabel","useMemo","extractTextFrom","isLabelAriaHidden","canFocused","hasContent","singleLineClass","classes","undefined","onlyDescriptionClass","onlyDescription","React","createElement","tabIndex","StyledInput","_extends","type","StyledContentWrapper","htmlFor","StyledTriggerWrapper","StyledTrigger","checkboxTrigger","_Indeterminate","Indeterminate","_Done","Done","StyledContent","StyledLabel","StyledDescription","cx","checkboxConfig","name","tag","layout","base","variations","css","sizeCSS","viewCSS","disabledCSS","focusedCSS","defaults"],"mappings":"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"}
|
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
.Typography_styles_c0qunc_b1ru04lg__3658e3b6{font-family:var(--typo-font-family);font-size:var(--typo-font-size);font-style:var(--typo-font-style);-webkit-letter-spacing:var(--typo-font-letter-spacing);-moz-letter-spacing:var(--typo-font-letter-spacing);-ms-letter-spacing:var(--typo-font-letter-spacing);letter-spacing:var(--typo-font-letter-spacing);line-height:var(--typo-font-line-height);font-weight:var(--typo-font-weight);overflow-wrap:normal;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual;hyphens:manual;}.Typography_styles_c0qunc_b1ru04lg__3658e3b6.Typography_styles_c0qunc_typographyBold__3658e3b6{font-weight:var(--typo-font-weight-bold);}.Typography_styles_c0qunc_b1ru04lg__3658e3b6.Typography_styles_c0qunc_typographyMedium__3658e3b6{font-weight:var(--typo-font-weight-medium);}.Typography_styles_c0qunc_b1ru04lg__3658e3b6.Typography_styles_c0qunc_withNoWrap__3658e3b6{white-space:nowrap;}.Typography_styles_c0qunc_b1ru04lg__3658e3b6.Typography_styles_c0qunc_withBreakWord__3658e3b6{overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
|
@@ -4,7 +4,7 @@ import { applySpacing } from '../../mixins/applySpacing.js';
|
|
4
4
|
import { cx } from '../../utils/index.js';
|
5
5
|
import { classes } from './tokens.js';
|
6
6
|
|
7
|
-
var _excluded = ["size", "children", "breakWord", "noWrap", "bold", "color", "className", "style"];
|
7
|
+
var _excluded = ["size", "children", "breakWord", "noWrap", "bold", "medium", "color", "className", "style"];
|
8
8
|
var typographyRootCompose = function typographyRootCompose(defaultArgs) {
|
9
9
|
return function (Root) {
|
10
10
|
return /*#__PURE__*/forwardRef(function (props, ref) {
|
@@ -14,6 +14,7 @@ var typographyRootCompose = function typographyRootCompose(defaultArgs) {
|
|
14
14
|
noWrap = props.noWrap,
|
15
15
|
_props$bold = props.bold,
|
16
16
|
bold = _props$bold === void 0 ? defaultArgs === null || defaultArgs === void 0 ? void 0 : defaultArgs.defaultBold : _props$bold,
|
17
|
+
medium = props.medium,
|
17
18
|
color = props.color,
|
18
19
|
className = props.className,
|
19
20
|
style = props.style,
|
@@ -21,11 +22,10 @@ var typographyRootCompose = function typographyRootCompose(defaultArgs) {
|
|
21
22
|
return /*#__PURE__*/React.createElement(Root, _extends({
|
22
23
|
size: size,
|
23
24
|
ref: ref,
|
24
|
-
className: cx(noWrap && classes.typoWithNoWrap, breakWord && classes.typoWithBreakWord, bold && classes.typoBold, className),
|
25
|
+
className: cx(noWrap && classes.typoWithNoWrap, breakWord && classes.typoWithBreakWord, bold && classes.typoBold, medium && classes.typoMedium, className),
|
25
26
|
style: _objectSpread2(_objectSpread2({
|
26
27
|
color: color
|
27
|
-
}, style), applySpacing(rest))
|
28
|
-
bold: bold
|
28
|
+
}, style), applySpacing(rest))
|
29
29
|
}, rest), children);
|
30
30
|
});
|
31
31
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Typography.js","sources":["../../../src/components/Typography/Typography.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { applySpacing } from '../../mixins/applySpacing';\nimport type { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport { classes } from './tokens';\nimport { FontProps } from './Typography.types';\n\nexport const typographyRootCompose = (defaultArgs?: { defaultBold?: boolean }) => (\n Root: RootProps<HTMLDivElement, FontProps>,\n) =>\n forwardRef<HTMLDivElement, FontProps>((props, ref) => {\n const {\n size,\n children,\n breakWord,\n noWrap,\n bold = defaultArgs?.defaultBold,\n color,\n className,\n style,\n ...rest\n } = props;\n\n return (\n <Root\n size={size}\n ref={ref}\n className={cx(\n noWrap && classes.typoWithNoWrap,\n breakWord && classes.typoWithBreakWord,\n bold && classes.typoBold,\n className,\n )}\n style={{ color, ...style, ...applySpacing(rest) }}\n
|
1
|
+
{"version":3,"file":"Typography.js","sources":["../../../src/components/Typography/Typography.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { applySpacing } from '../../mixins/applySpacing';\nimport type { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport { classes } from './tokens';\nimport { FontProps } from './Typography.types';\n\nexport const typographyRootCompose = (defaultArgs?: { defaultBold?: boolean }) => (\n Root: RootProps<HTMLDivElement, FontProps>,\n) =>\n forwardRef<HTMLDivElement, FontProps>((props, ref) => {\n const {\n size,\n children,\n breakWord,\n noWrap,\n bold = defaultArgs?.defaultBold,\n medium,\n color,\n className,\n style,\n ...rest\n } = props;\n\n return (\n <Root\n size={size}\n ref={ref}\n className={cx(\n noWrap && classes.typoWithNoWrap,\n breakWord && classes.typoWithBreakWord,\n bold && classes.typoBold,\n medium && classes.typoMedium,\n className,\n )}\n style={{ color, ...style, ...applySpacing(rest) }}\n {...rest}\n >\n {children}\n </Root>\n );\n });\n"],"names":["typographyRootCompose","defaultArgs","Root","forwardRef","props","ref","size","children","breakWord","noWrap","_props$bold","bold","defaultBold","medium","color","className","style","rest","_objectWithoutProperties","_excluded","React","createElement","_extends","cx","classes","typoWithNoWrap","typoWithBreakWord","typoBold","typoMedium","_objectSpread","applySpacing"],"mappings":";;;;;;;IASaA,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAIC,WAAuC,EAAA;AAAA,EAAA,OAAK,UAC9EC,IAA0C,EAAA;AAAA,IAAA,oBAE1CC,UAAU,CAA4B,UAACC,KAAK,EAAEC,GAAG,EAAK;AAClD,MAAA,IACIC,IAAI,GAUJF,KAAK,CAVLE,IAAI;QACJC,QAAQ,GASRH,KAAK,CATLG,QAAQ;QACRC,SAAS,GAQTJ,KAAK,CARLI,SAAS;QACTC,MAAM,GAONL,KAAK,CAPLK,MAAM;QAAAC,WAAA,GAONN,KAAK,CANLO,IAAI;QAAJA,IAAI,GAAAD,WAAA,KAAA,KAAA,CAAA,GAAGT,WAAW,KAAA,IAAA,IAAXA,WAAW,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAXA,WAAW,CAAEW,WAAW,GAAAF,WAAA;QAC/BG,MAAM,GAKNT,KAAK,CALLS,MAAM;QACNC,KAAK,GAILV,KAAK,CAJLU,KAAK;QACLC,SAAS,GAGTX,KAAK,CAHLW,SAAS;QACTC,KAAK,GAELZ,KAAK,CAFLY,KAAK;AACFC,QAAAA,IAAI,GAAAC,wBAAA,CACPd,KAAK,EAAAe,SAAA,CAAA,CAAA;AAET,MAAA,oBACIC,KAAA,CAAAC,aAAA,CAACnB,IAAI,EAAAoB,QAAA,CAAA;AACDhB,QAAAA,IAAI,EAAEA,IAAK;AACXD,QAAAA,GAAG,EAAEA,GAAI;AACTU,QAAAA,SAAS,EAAEQ,EAAE,CACTd,MAAM,IAAIe,OAAO,CAACC,cAAc,EAChCjB,SAAS,IAAIgB,OAAO,CAACE,iBAAiB,EACtCf,IAAI,IAAIa,OAAO,CAACG,QAAQ,EACxBd,MAAM,IAAIW,OAAO,CAACI,UAAU,EAC5Bb,SACJ,CAAE;QACFC,KAAK,EAAAa,cAAA,CAAAA,cAAA,CAAA;AAAIf,UAAAA,KAAK,EAALA,KAAAA;AAAK,SAAA,EAAKE,KAAK,CAAA,EAAKc,YAAY,CAACb,IAAI,CAAC,CAAA;OAC3CA,EAAAA,IAAI,CAEPV,EAAAA,QACC,CAAC,CAAA;AAEf,KAAC,CAAC,CAAA;AAAA,GAAA,CAAA;AAAA;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Typography.styles.js","sources":["../../../src/components/Typography/Typography.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { applyHyphens, applyHyphensNormal } from '../../mixins';\n\nimport { classes, tokens } from './tokens';\n\nexport const base = css`\n font-family: var(${tokens.typoFontFamily});\n font-size: var(${tokens.typoFontSize});\n font-style: var(${tokens.typoFontStyle});\n letter-spacing: var(${tokens.typoFontLetterSpacing});\n line-height: var(${tokens.typoFontLineHeight});\n font-weight: var(${tokens.typoFontWeight});\n\n &.${classes.typoBold} {\n font-weight: var(${tokens.typoFontWeightBold});\n }\n\n &.${classes.typoWithNoWrap} {\n white-space: nowrap;\n }\n\n ${applyHyphensNormal};\n\n &.${classes.typoWithBreakWord} {\n ${applyHyphens};\n }\n`;\n"],"names":["base"],"mappings":"AAMO,IAAMA,IAAI,
|
1
|
+
{"version":3,"file":"Typography.styles.js","sources":["../../../src/components/Typography/Typography.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { applyHyphens, applyHyphensNormal } from '../../mixins';\n\nimport { classes, tokens } from './tokens';\n\nexport const base = css`\n font-family: var(${tokens.typoFontFamily});\n font-size: var(${tokens.typoFontSize});\n font-style: var(${tokens.typoFontStyle});\n letter-spacing: var(${tokens.typoFontLetterSpacing});\n line-height: var(${tokens.typoFontLineHeight});\n font-weight: var(${tokens.typoFontWeight});\n\n &.${classes.typoBold} {\n font-weight: var(${tokens.typoFontWeightBold});\n }\n\n &.${classes.typoMedium} {\n font-weight: var(${tokens.typoFontWeightMedium});\n }\n\n &.${classes.typoWithNoWrap} {\n white-space: nowrap;\n }\n\n ${applyHyphensNormal};\n\n &.${classes.typoWithBreakWord} {\n ${applyHyphens};\n }\n`;\n"],"names":["base"],"mappings":"AAMO,IAAMA,IAAI,GAyBhB;;;;"}
|
package/es/components/Typography/{Typography.styles_fa07dt.css → Typography.styles_c0qunc.css}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
.b1ru04lg{font-family:var(--typo-font-family);font-size:var(--typo-font-size);font-style:var(--typo-font-style);-webkit-letter-spacing:var(--typo-font-letter-spacing);-moz-letter-spacing:var(--typo-font-letter-spacing);-ms-letter-spacing:var(--typo-font-letter-spacing);letter-spacing:var(--typo-font-letter-spacing);line-height:var(--typo-font-line-height);font-weight:var(--typo-font-weight);overflow-wrap:normal;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual;hyphens:manual;}.b1ru04lg.typography-bold{font-weight:var(--typo-font-weight-bold);}.b1ru04lg.with-no-wrap{white-space:nowrap;}.b1ru04lg.with-break-word{overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
|
1
|
+
.b1ru04lg{font-family:var(--typo-font-family);font-size:var(--typo-font-size);font-style:var(--typo-font-style);-webkit-letter-spacing:var(--typo-font-letter-spacing);-moz-letter-spacing:var(--typo-font-letter-spacing);-ms-letter-spacing:var(--typo-font-letter-spacing);letter-spacing:var(--typo-font-letter-spacing);line-height:var(--typo-font-line-height);font-weight:var(--typo-font-weight);overflow-wrap:normal;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual;hyphens:manual;}.b1ru04lg.typography-bold{font-weight:var(--typo-font-weight-bold);}.b1ru04lg.typography-medium{font-weight:var(--typo-font-weight-medium);}.b1ru04lg.with-no-wrap{white-space:nowrap;}.b1ru04lg.with-break-word{overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
var classes = {
|
2
2
|
typoWithNoWrap: 'with-no-wrap',
|
3
3
|
typoWithBreakWord: 'with-break-word',
|
4
|
-
typoBold: 'typography-bold'
|
4
|
+
typoBold: 'typography-bold',
|
5
|
+
typoMedium: 'typography-medium'
|
5
6
|
};
|
6
7
|
var tokens = {
|
7
8
|
typoFontFamily: '--typo-font-family',
|
@@ -9,6 +10,7 @@ var tokens = {
|
|
9
10
|
typoFontStyle: '--typo-font-style',
|
10
11
|
typoFontWeight: '--typo-font-weight',
|
11
12
|
typoFontWeightBold: '--typo-font-weight-bold',
|
13
|
+
typoFontWeightMedium: '--typo-font-weight-medium',
|
12
14
|
typoFontLetterSpacing: '--typo-font-letter-spacing',
|
13
15
|
typoFontLineHeight: '--typo-font-line-height'
|
14
16
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tokens.js","sources":["../../../src/components/Typography/tokens.ts"],"sourcesContent":["export const classes = {\n typoWithNoWrap: 'with-no-wrap',\n typoWithBreakWord: 'with-break-word',\n typoBold: 'typography-bold',\n};\n\nexport const tokens = {\n typoFontFamily: '--typo-font-family',\n typoFontSize: '--typo-font-size',\n typoFontStyle: '--typo-font-style',\n typoFontWeight: '--typo-font-weight',\n typoFontWeightBold: '--typo-font-weight-bold',\n typoFontLetterSpacing: '--typo-font-letter-spacing',\n typoFontLineHeight: '--typo-font-line-height',\n};\n"],"names":["classes","typoWithNoWrap","typoWithBreakWord","typoBold","tokens","typoFontFamily","typoFontSize","typoFontStyle","typoFontWeight","typoFontWeightBold","typoFontLetterSpacing","typoFontLineHeight"],"mappings":"AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,cAAc,EAAE,cAAc;AAC9BC,EAAAA,iBAAiB,EAAE,iBAAiB;AACpCC,EAAAA,QAAQ,EAAE,
|
1
|
+
{"version":3,"file":"tokens.js","sources":["../../../src/components/Typography/tokens.ts"],"sourcesContent":["export const classes = {\n typoWithNoWrap: 'with-no-wrap',\n typoWithBreakWord: 'with-break-word',\n typoBold: 'typography-bold',\n typoMedium: 'typography-medium',\n};\n\nexport const tokens = {\n typoFontFamily: '--typo-font-family',\n typoFontSize: '--typo-font-size',\n typoFontStyle: '--typo-font-style',\n typoFontWeight: '--typo-font-weight',\n typoFontWeightBold: '--typo-font-weight-bold',\n typoFontWeightMedium: '--typo-font-weight-medium',\n typoFontLetterSpacing: '--typo-font-letter-spacing',\n typoFontLineHeight: '--typo-font-line-height',\n};\n"],"names":["classes","typoWithNoWrap","typoWithBreakWord","typoBold","typoMedium","tokens","typoFontFamily","typoFontSize","typoFontStyle","typoFontWeight","typoFontWeightBold","typoFontWeightMedium","typoFontLetterSpacing","typoFontLineHeight"],"mappings":"AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,cAAc,EAAE,cAAc;AAC9BC,EAAAA,iBAAiB,EAAE,iBAAiB;AACpCC,EAAAA,QAAQ,EAAE,iBAAiB;AAC3BC,EAAAA,UAAU,EAAE,mBAAA;AAChB,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,cAAc,EAAE,oBAAoB;AACpCC,EAAAA,YAAY,EAAE,kBAAkB;AAChCC,EAAAA,aAAa,EAAE,mBAAmB;AAClCC,EAAAA,cAAc,EAAE,oBAAoB;AACpCC,EAAAA,kBAAkB,EAAE,yBAAyB;AAC7CC,EAAAA,oBAAoB,EAAE,2BAA2B;AACjDC,EAAAA,qBAAqB,EAAE,4BAA4B;AACnDC,EAAAA,kBAAkB,EAAE,yBAAA;AACxB;;;;"}
|
package/es/index.css
CHANGED
@@ -337,7 +337,7 @@
|
|
337
337
|
.CalendarDouble_styles_e9ada0_s1y1gz42__d395f1d3{background-color:var(--plasma-calendar-separator-background);min-width:0.063rem;margin:0.5rem 1rem 0 1rem;}
|
338
338
|
.CalendarDouble_styles_e9ada0_s7fv2hn__d395f1d3{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}
|
339
339
|
|
340
|
-
.
|
340
|
+
.Typography_styles_c0qunc_b1ru04lg__3658e3b6{font-family:var(--typo-font-family);font-size:var(--typo-font-size);font-style:var(--typo-font-style);-webkit-letter-spacing:var(--typo-font-letter-spacing);-moz-letter-spacing:var(--typo-font-letter-spacing);-ms-letter-spacing:var(--typo-font-letter-spacing);letter-spacing:var(--typo-font-letter-spacing);line-height:var(--typo-font-line-height);font-weight:var(--typo-font-weight);overflow-wrap:normal;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual;hyphens:manual;}.Typography_styles_c0qunc_b1ru04lg__3658e3b6.Typography_styles_c0qunc_typographyBold__3658e3b6{font-weight:var(--typo-font-weight-bold);}.Typography_styles_c0qunc_b1ru04lg__3658e3b6.Typography_styles_c0qunc_typographyMedium__3658e3b6{font-weight:var(--typo-font-weight-medium);}.Typography_styles_c0qunc_b1ru04lg__3658e3b6.Typography_styles_c0qunc_withNoWrap__3658e3b6{white-space:nowrap;}.Typography_styles_c0qunc_b1ru04lg__3658e3b6.Typography_styles_c0qunc_withBreakWord__3658e3b6{overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
|
341
341
|
|
342
342
|
.TypographyOld_styles_168abbx_b9p5ato__094dcd73{font-family:var(--typo-font-family);font-size:var(--typo-font-size);font-style:var(--typo-font-style);-webkit-letter-spacing:var(--typo-font-letter-spacing);-moz-letter-spacing:var(--typo-font-letter-spacing);-ms-letter-spacing:var(--typo-font-letter-spacing);letter-spacing:var(--typo-font-letter-spacing);line-height:var(--typo-font-line-height);font-weight:var(--typo-font-weight);overflow-wrap:normal;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual;hyphens:manual;}.TypographyOld_styles_168abbx_b9p5ato__094dcd73.TypographyOld_styles_168abbx_withNoWrap__094dcd73{white-space:nowrap;}.TypographyOld_styles_168abbx_b9p5ato__094dcd73.TypographyOld_styles_168abbx_withBreakWord__094dcd73{overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
|
343
343
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/plasma-new-hope",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.320.0-dev.0",
|
4
4
|
"description": "Salute Design System blueprint",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "es/index.js",
|
@@ -135,5 +135,5 @@
|
|
135
135
|
"sideEffects": [
|
136
136
|
"*.css"
|
137
137
|
],
|
138
|
-
"gitHead": "
|
138
|
+
"gitHead": "d679083c4f928c155b04e84dab590e866f37ab8c"
|
139
139
|
}
|
@@ -41,8 +41,8 @@ var checkboxRoot = exports.checkboxRoot = function checkboxRoot(Root) {
|
|
41
41
|
var inputRef = (0, _react.useRef)(null);
|
42
42
|
var forkRef = (0, _plasmaCore.useForkRef)(inputRef, ref);
|
43
43
|
(0, _react.useEffect)(function () {
|
44
|
-
if (inputRef.current
|
45
|
-
inputRef.current.indeterminate =
|
44
|
+
if (inputRef.current) {
|
45
|
+
inputRef.current.indeterminate = Boolean(indeterminate);
|
46
46
|
}
|
47
47
|
}, [inputRef, indeterminate]);
|
48
48
|
var uniqId = (0, _plasmaCore.safeUseId)();
|
@@ -48,3 +48,16 @@ export function App() {
|
|
48
48
|
);
|
49
49
|
}
|
50
50
|
```
|
51
|
+
|
52
|
+
Состояние `indeterminate` имеет приоритет и не зависит от свойства `checked`
|
53
|
+
|
54
|
+
```tsx live
|
55
|
+
import React from 'react';
|
56
|
+
import { Checkbox } from '@salutejs/{{ package }}';
|
57
|
+
|
58
|
+
export function App() {
|
59
|
+
return (
|
60
|
+
<Checkbox label="Чекбокс" description="Описание" defaultChecked indeterminate checked={false} />
|
61
|
+
);
|
62
|
+
}
|
63
|
+
```
|
@@ -9,7 +9,7 @@ var _react = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("react"))
|
|
9
9
|
var _applySpacing = /*#__PURE__*/require("../../mixins/applySpacing");
|
10
10
|
var _utils = /*#__PURE__*/require("../../utils");
|
11
11
|
var _tokens = /*#__PURE__*/require("./tokens");
|
12
|
-
var _excluded = ["size", "children", "breakWord", "noWrap", "bold", "color", "className", "style"];
|
12
|
+
var _excluded = ["size", "children", "breakWord", "noWrap", "bold", "medium", "color", "className", "style"];
|
13
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
14
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
15
15
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
@@ -29,6 +29,7 @@ var typographyRootCompose = exports.typographyRootCompose = function typographyR
|
|
29
29
|
noWrap = props.noWrap,
|
30
30
|
_props$bold = props.bold,
|
31
31
|
bold = _props$bold === void 0 ? defaultArgs === null || defaultArgs === void 0 ? void 0 : defaultArgs.defaultBold : _props$bold,
|
32
|
+
medium = props.medium,
|
32
33
|
color = props.color,
|
33
34
|
className = props.className,
|
34
35
|
style = props.style,
|
@@ -36,11 +37,10 @@ var typographyRootCompose = exports.typographyRootCompose = function typographyR
|
|
36
37
|
return /*#__PURE__*/_react["default"].createElement(Root, _extends({
|
37
38
|
size: size,
|
38
39
|
ref: ref,
|
39
|
-
className: (0, _utils.cx)(noWrap && _tokens.classes.typoWithNoWrap, breakWord && _tokens.classes.typoWithBreakWord, bold && _tokens.classes.typoBold, className),
|
40
|
+
className: (0, _utils.cx)(noWrap && _tokens.classes.typoWithNoWrap, breakWord && _tokens.classes.typoWithBreakWord, bold && _tokens.classes.typoBold, medium && _tokens.classes.typoMedium, className),
|
40
41
|
style: _objectSpread(_objectSpread({
|
41
42
|
color: color
|
42
|
-
}, style), (0, _applySpacing.applySpacing)(rest))
|
43
|
-
bold: bold
|
43
|
+
}, style), (0, _applySpacing.applySpacing)(rest))
|
44
44
|
}, rest), children);
|
45
45
|
});
|
46
46
|
};
|
@@ -7,4 +7,4 @@ exports.base = void 0;
|
|
7
7
|
var _styledComponents = /*#__PURE__*/require("styled-components");
|
8
8
|
var _mixins = /*#__PURE__*/require("../../mixins");
|
9
9
|
var _tokens = /*#__PURE__*/require("./tokens");
|
10
|
-
var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["font-family:var(", ");font-size:var(", ");font-style:var(", ");letter-spacing:var(", ");line-height:var(", ");font-weight:var(", ");&.", "{font-weight:var(", ");}&.", "{white-space:nowrap;}", ";&.", "{", ";}"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight, _tokens.tokens.typoFontWeight, _tokens.classes.typoBold, _tokens.tokens.typoFontWeightBold, _tokens.classes.typoWithNoWrap, _mixins.applyHyphensNormal, _tokens.classes.typoWithBreakWord, _mixins.applyHyphens);
|
10
|
+
var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["font-family:var(", ");font-size:var(", ");font-style:var(", ");letter-spacing:var(", ");line-height:var(", ");font-weight:var(", ");&.", "{font-weight:var(", ");}&.", "{font-weight:var(", ");}&.", "{white-space:nowrap;}", ";&.", "{", ";}"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight, _tokens.tokens.typoFontWeight, _tokens.classes.typoBold, _tokens.tokens.typoFontWeightBold, _tokens.classes.typoMedium, _tokens.tokens.typoFontWeightMedium, _tokens.classes.typoWithNoWrap, _mixins.applyHyphensNormal, _tokens.classes.typoWithBreakWord, _mixins.applyHyphens);
|
@@ -52,12 +52,15 @@ export function App() {
|
|
52
52
|
<div style=\{{ display: 'block' }}>
|
53
53
|
<DsplL bold={false}>DsplL</DsplL>
|
54
54
|
<DsplL>DsplL Bold</DsplL>
|
55
|
+
<DsplL medium>DsplL Medium</DsplL>
|
55
56
|
|
56
57
|
<DsplM bold={false}>DsplM</DsplM>
|
57
58
|
<DsplM>DsplM Bold</DsplM>
|
59
|
+
<DsplM medium>DsplM Medium</DsplM>
|
58
60
|
|
59
61
|
<DsplS bold={false}>DsplS</DsplS>
|
60
62
|
<DsplS>DsplS Bold</DsplS>
|
63
|
+
<DsplS medium>DsplS Medium</DsplS>
|
61
64
|
</div>
|
62
65
|
);
|
63
66
|
}
|
@@ -74,18 +77,23 @@ export function App() {
|
|
74
77
|
<div style=\{{ display: 'block' }}>
|
75
78
|
<H1 bold={false}>H1</H1>
|
76
79
|
<H1>H1 Bold</H1>
|
80
|
+
<H1 medium>H1 Medium</H1>
|
77
81
|
|
78
82
|
<H2 bold={false}>H2</H2>
|
79
83
|
<H2>H2 Bold</H2>
|
84
|
+
<H2 medium>H2 Medium</H2>
|
80
85
|
|
81
86
|
<H3 bold={false}>H3</H3>
|
82
87
|
<H3>H3 Bold</H3>
|
88
|
+
<H3 medium>H3 Medium</H3>
|
83
89
|
|
84
90
|
<H4 bold={false}>H4</H4>
|
85
91
|
<H4>H4 Bold</H4>
|
92
|
+
<H4 medium>H4 Medium</H4>
|
86
93
|
|
87
94
|
<H5 bold={false}>H5</H5>
|
88
95
|
<H5>H5 Bold</H5>
|
96
|
+
<H5 medium>H5 Medium</H5>
|
89
97
|
</div>
|
90
98
|
);
|
91
99
|
}
|
@@ -102,19 +110,24 @@ export function App() {
|
|
102
110
|
return (
|
103
111
|
<div style=\{{ display: 'block' }}>
|
104
112
|
<BodyL>BodyL</BodyL>
|
105
|
-
<BodyL bold>BodyL
|
113
|
+
<BodyL bold>BodyL Bold</BodyL>
|
114
|
+
<BodyL medium>BodyL Medium</BodyL>
|
106
115
|
|
107
116
|
<BodyM>BodyM</BodyM>
|
108
|
-
<BodyM bold>BodyM
|
117
|
+
<BodyM bold>BodyM Bold</BodyM>
|
118
|
+
<BodyM medium>BodyM Medium</BodyM>
|
109
119
|
|
110
120
|
<BodyS>BodyS</BodyS>
|
111
|
-
<BodyS bold>BodyS
|
121
|
+
<BodyS bold>BodyS Bold</BodyS>
|
122
|
+
<BodyS medium>BodyS Medium</BodyS>
|
112
123
|
|
113
124
|
<BodyXS>BodyXS</BodyXS>
|
114
|
-
<BodyXS bold>BodyXS
|
125
|
+
<BodyXS bold>BodyXS Bold</BodyXS>
|
126
|
+
<BodyXS medium>BodyXS Medium</BodyXS>
|
115
127
|
|
116
128
|
<BodyXXS>BodyXXS</BodyXXS>
|
117
|
-
<BodyXXS bold>BodyXXS
|
129
|
+
<BodyXXS bold>BodyXXS Bold</BodyXXS>
|
130
|
+
<BodyXXS medium>BodyXXS Medium</BodyXXS>
|
118
131
|
</div>
|
119
132
|
);
|
120
133
|
}
|
@@ -131,16 +144,20 @@ export function App() {
|
|
131
144
|
return (
|
132
145
|
<div style=\{{ display: 'block' }}>
|
133
146
|
<TextL>TextL</TextL>
|
134
|
-
<TextL bold>TextL
|
147
|
+
<TextL bold>TextL Bold</TextL>
|
148
|
+
<TextL medium>TextL Medium</TextL>
|
135
149
|
|
136
150
|
<TextM>TextM</TextM>
|
137
|
-
<TextM bold>TextM
|
151
|
+
<TextM bold>TextM Bold</TextM>
|
152
|
+
<TextM medium>TextM Medium</TextM>
|
138
153
|
|
139
154
|
<TextS>TextS</TextS>
|
140
|
-
<TextS bold>TextS
|
155
|
+
<TextS bold>TextS Bold</TextS>
|
156
|
+
<TextS medium>TextS Medium</TextS>
|
141
157
|
|
142
158
|
<TextXS>TextXS</TextXS>
|
143
|
-
<TextXS bold>TextXS
|
159
|
+
<TextXS bold>TextXS Bold</TextXS>
|
160
|
+
<TextXS medium>TextXS Medium</TextXS>
|
144
161
|
</div>
|
145
162
|
);
|
146
163
|
}
|
@@ -7,7 +7,8 @@ exports.tokens = exports.classes = void 0;
|
|
7
7
|
var classes = exports.classes = {
|
8
8
|
typoWithNoWrap: 'with-no-wrap',
|
9
9
|
typoWithBreakWord: 'with-break-word',
|
10
|
-
typoBold: 'typography-bold'
|
10
|
+
typoBold: 'typography-bold',
|
11
|
+
typoMedium: 'typography-medium'
|
11
12
|
};
|
12
13
|
var tokens = exports.tokens = {
|
13
14
|
typoFontFamily: '--typo-font-family',
|
@@ -15,6 +16,7 @@ var tokens = exports.tokens = {
|
|
15
16
|
typoFontStyle: '--typo-font-style',
|
16
17
|
typoFontWeight: '--typo-font-weight',
|
17
18
|
typoFontWeightBold: '--typo-font-weight-bold',
|
19
|
+
typoFontWeightMedium: '--typo-font-weight-medium',
|
18
20
|
typoFontLetterSpacing: '--typo-font-letter-spacing',
|
19
21
|
typoFontLineHeight: '--typo-font-line-height'
|
20
22
|
};
|
@@ -12,11 +12,11 @@ var config = exports.config = {
|
|
12
12
|
},
|
13
13
|
variations: {
|
14
14
|
size: {
|
15
|
-
l: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-bold-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
16
|
-
m: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-bold-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
17
|
-
s: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
18
|
-
xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-bold-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
19
|
-
xxs: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-bold-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight)
|
15
|
+
l: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-bold-font-weight);", ":var(--plasma-typo-body-l-medium-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontWeightMedium, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
16
|
+
m: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-bold-font-weight);", ":var(--plasma-typo-body-m-medium-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontWeightMedium, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
17
|
+
s: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-medium-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontWeightMedium, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
18
|
+
xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-bold-font-weight);", ":var(--plasma-typo-body-xs-medium-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontWeightMedium, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
19
|
+
xxs: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-bold-font-weight);", ":var(--plasma-typo-body-xxs-medium-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontWeightMedium, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight)
|
20
20
|
}
|
21
21
|
}
|
22
22
|
};
|
@@ -22,11 +22,24 @@ const meta: Meta<typeof Body> = {
|
|
22
22
|
as: {
|
23
23
|
control: 'text',
|
24
24
|
},
|
25
|
+
bold: {
|
26
|
+
control: {
|
27
|
+
type: 'boolean',
|
28
|
+
},
|
29
|
+
if: { arg: 'medium', truthy: false },
|
30
|
+
},
|
31
|
+
medium: {
|
32
|
+
control: {
|
33
|
+
type: 'boolean',
|
34
|
+
},
|
35
|
+
if: { arg: 'bold', truthy: false },
|
36
|
+
},
|
25
37
|
},
|
26
38
|
args: {
|
27
39
|
noWrap: false,
|
28
40
|
breakWord: true,
|
29
41
|
bold: false,
|
42
|
+
medium: false,
|
30
43
|
},
|
31
44
|
};
|
32
45
|
|
@@ -12,9 +12,9 @@ var config = exports.config = {
|
|
12
12
|
},
|
13
13
|
variations: {
|
14
14
|
size: {
|
15
|
-
l: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-dspl-l-font-family);", ":var(--plasma-typo-dspl-l-font-size);", ":var(--plasma-typo-dspl-l-font-style);", ":var(--plasma-typo-dspl-l-font-weight);", ":var(--plasma-typo-dspl-l-bold-font-weight);", ":var(--plasma-typo-dspl-l-letter-spacing);", ":var(--plasma-typo-dspl-l-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
16
|
-
m: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-dspl-m-font-family);", ":var(--plasma-typo-dspl-m-font-size);", ":var(--plasma-typo-dspl-m-font-style);", ":var(--plasma-typo-dspl-m-font-weight);", ":var(--plasma-typo-dspl-m-bold-font-weight);", ":var(--plasma-typo-dspl-m-letter-spacing);", ":var(--plasma-typo-dspl-m-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
17
|
-
s: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-dspl-s-font-family);", ":var(--plasma-typo-dspl-s-font-size);", ":var(--plasma-typo-dspl-s-font-style);", ":var(--plasma-typo-dspl-s-font-weight);", ":var(--plasma-typo-dspl-s-bold-font-weight);", ":var(--plasma-typo-dspl-s-letter-spacing);", ":var(--plasma-typo-dspl-s-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight)
|
15
|
+
l: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-dspl-l-font-family);", ":var(--plasma-typo-dspl-l-font-size);", ":var(--plasma-typo-dspl-l-font-style);", ":var(--plasma-typo-dspl-l-font-weight);", ":var(--plasma-typo-dspl-l-bold-font-weight);", ":var(--plasma-typo-dspl-l-medium-font-weight);", ":var(--plasma-typo-dspl-l-letter-spacing);", ":var(--plasma-typo-dspl-l-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontWeightMedium, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
16
|
+
m: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-dspl-m-font-family);", ":var(--plasma-typo-dspl-m-font-size);", ":var(--plasma-typo-dspl-m-font-style);", ":var(--plasma-typo-dspl-m-font-weight);", ":var(--plasma-typo-dspl-m-bold-font-weight);", ":var(--plasma-typo-dspl-m-medium-font-weight);", ":var(--plasma-typo-dspl-m-letter-spacing);", ":var(--plasma-typo-dspl-m-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontWeightMedium, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
17
|
+
s: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-dspl-s-font-family);", ":var(--plasma-typo-dspl-s-font-size);", ":var(--plasma-typo-dspl-s-font-style);", ":var(--plasma-typo-dspl-s-font-weight);", ":var(--plasma-typo-dspl-s-bold-font-weight);", ":var(--plasma-typo-dspl-s-medium-font-weight);", ":var(--plasma-typo-dspl-s-letter-spacing);", ":var(--plasma-typo-dspl-s-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontWeightMedium, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight)
|
18
18
|
}
|
19
19
|
}
|
20
20
|
};
|
@@ -22,11 +22,24 @@ const meta: Meta<typeof Dspl> = {
|
|
22
22
|
as: {
|
23
23
|
control: 'text',
|
24
24
|
},
|
25
|
+
bold: {
|
26
|
+
control: {
|
27
|
+
type: 'boolean',
|
28
|
+
},
|
29
|
+
if: { arg: 'medium', truthy: false },
|
30
|
+
},
|
31
|
+
medium: {
|
32
|
+
control: {
|
33
|
+
type: 'boolean',
|
34
|
+
},
|
35
|
+
if: { arg: 'bold', truthy: false },
|
36
|
+
},
|
25
37
|
},
|
26
38
|
args: {
|
27
39
|
noWrap: false,
|
28
40
|
breakWord: true,
|
29
41
|
bold: false,
|
42
|
+
medium: false,
|
30
43
|
},
|
31
44
|
};
|
32
45
|
|
@@ -12,11 +12,11 @@ var config = exports.config = {
|
|
12
12
|
},
|
13
13
|
variations: {
|
14
14
|
size: {
|
15
|
-
h1: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-h1-font-family);", ":var(--plasma-typo-h1-font-size);", ":var(--plasma-typo-h1-font-style);", ":var(--plasma-typo-h1-font-weight);", ":var(--plasma-typo-h1-bold-font-weight);", ":var(--plasma-typo-h1-letter-spacing);", ":var(--plasma-typo-h1-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
16
|
-
h2: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-h2-font-family);", ":var(--plasma-typo-h2-font-size);", ":var(--plasma-typo-h2-font-style);", ":var(--plasma-typo-h2-font-weight);", ":var(--plasma-typo-h2-bold-font-weight);", ":var(--plasma-typo-h2-letter-spacing);", ":var(--plasma-typo-h2-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
17
|
-
h3: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-h3-font-family);", ":var(--plasma-typo-h3-font-size);", ":var(--plasma-typo-h3-font-style);", ":var(--plasma-typo-h3-font-weight);", ":var(--plasma-typo-h3-bold-font-weight);", ":var(--plasma-typo-h3-letter-spacing);", ":var(--plasma-typo-h3-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
18
|
-
h4: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-h4-font-family);", ":var(--plasma-typo-h4-font-size);", ":var(--plasma-typo-h4-font-style);", ":var(--plasma-typo-h4-font-weight);", ":var(--plasma-typo-h4-bold-font-weight);", ":var(--plasma-typo-h4-letter-spacing);", ":var(--plasma-typo-h4-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
19
|
-
h5: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-h5-font-family);", ":var(--plasma-typo-h5-font-size);", ":var(--plasma-typo-h5-font-style);", ":var(--plasma-typo-h5-font-weight);", ":var(--plasma-typo-h5-bold-font-weight);", ":var(--plasma-typo-h5-letter-spacing);", ":var(--plasma-typo-h5-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight)
|
15
|
+
h1: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-h1-font-family);", ":var(--plasma-typo-h1-font-size);", ":var(--plasma-typo-h1-font-style);", ":var(--plasma-typo-h1-font-weight);", ":var(--plasma-typo-h1-bold-font-weight);", ":var(--plasma-typo-h1-medium-font-weight);", ":var(--plasma-typo-h1-letter-spacing);", ":var(--plasma-typo-h1-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontWeightMedium, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
16
|
+
h2: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-h2-font-family);", ":var(--plasma-typo-h2-font-size);", ":var(--plasma-typo-h2-font-style);", ":var(--plasma-typo-h2-font-weight);", ":var(--plasma-typo-h2-bold-font-weight);", ":var(--plasma-typo-h2-medium-font-weight);", ":var(--plasma-typo-h2-letter-spacing);", ":var(--plasma-typo-h2-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontWeightMedium, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
17
|
+
h3: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-h3-font-family);", ":var(--plasma-typo-h3-font-size);", ":var(--plasma-typo-h3-font-style);", ":var(--plasma-typo-h3-font-weight);", ":var(--plasma-typo-h3-bold-font-weight);", ":var(--plasma-typo-h3-medium-font-weight);", ":var(--plasma-typo-h3-letter-spacing);", ":var(--plasma-typo-h3-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontWeightMedium, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
18
|
+
h4: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-h4-font-family);", ":var(--plasma-typo-h4-font-size);", ":var(--plasma-typo-h4-font-style);", ":var(--plasma-typo-h4-font-weight);", ":var(--plasma-typo-h4-bold-font-weight);", ":var(--plasma-typo-h4-medium-font-weight);", ":var(--plasma-typo-h4-letter-spacing);", ":var(--plasma-typo-h4-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontWeightMedium, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
19
|
+
h5: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-h5-font-family);", ":var(--plasma-typo-h5-font-size);", ":var(--plasma-typo-h5-font-style);", ":var(--plasma-typo-h5-font-weight);", ":var(--plasma-typo-h5-bold-font-weight);", ":var(--plasma-typo-h5-medium-font-weight);", ":var(--plasma-typo-h5-letter-spacing);", ":var(--plasma-typo-h5-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontWeightMedium, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight)
|
20
20
|
}
|
21
21
|
}
|
22
22
|
};
|
@@ -22,11 +22,24 @@ const meta: Meta<typeof Heading> = {
|
|
22
22
|
as: {
|
23
23
|
control: 'text',
|
24
24
|
},
|
25
|
+
bold: {
|
26
|
+
control: {
|
27
|
+
type: 'boolean',
|
28
|
+
},
|
29
|
+
if: { arg: 'medium', truthy: false },
|
30
|
+
},
|
31
|
+
medium: {
|
32
|
+
control: {
|
33
|
+
type: 'boolean',
|
34
|
+
},
|
35
|
+
if: { arg: 'bold', truthy: false },
|
36
|
+
},
|
25
37
|
},
|
26
38
|
args: {
|
27
39
|
noWrap: false,
|
28
40
|
breakWord: true,
|
29
41
|
bold: false,
|
42
|
+
medium: false,
|
30
43
|
},
|
31
44
|
};
|
32
45
|
|
@@ -12,10 +12,10 @@ var config = exports.config = {
|
|
12
12
|
},
|
13
13
|
variations: {
|
14
14
|
size: {
|
15
|
-
l: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-text-l-font-family);", ":var(--plasma-typo-text-l-font-size);", ":var(--plasma-typo-text-l-font-style);", ":var(--plasma-typo-text-l-font-weight);", ":var(--plasma-typo-text-l-bold-font-weight);", ":var(--plasma-typo-text-l-letter-spacing);", ":var(--plasma-typo-text-l-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
16
|
-
m: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-text-m-font-family);", ":var(--plasma-typo-text-m-font-size);", ":var(--plasma-typo-text-m-font-style);", ":var(--plasma-typo-text-m-font-weight);", ":var(--plasma-typo-text-m-bold-font-weight);", ":var(--plasma-typo-text-m-letter-spacing);", ":var(--plasma-typo-text-m-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
17
|
-
s: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-text-s-font-family);", ":var(--plasma-typo-text-s-font-size);", ":var(--plasma-typo-text-s-font-style);", ":var(--plasma-typo-text-s-font-weight);", ":var(--plasma-typo-text-s-bold-font-weight);", ":var(--plasma-typo-text-s-letter-spacing);", ":var(--plasma-typo-text-s-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
18
|
-
xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-text-xs-font-family);", ":var(--plasma-typo-text-xs-font-size);", ":var(--plasma-typo-text-xs-font-style);", ":var(--plasma-typo-text-xs-font-weight);", ":var(--plasma-typo-text-xs-bold-font-weight);", ":var(--plasma-typo-text-xs-letter-spacing);", ":var(--plasma-typo-text-xs-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight)
|
15
|
+
l: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-text-l-font-family);", ":var(--plasma-typo-text-l-font-size);", ":var(--plasma-typo-text-l-font-style);", ":var(--plasma-typo-text-l-font-weight);", ":var(--plasma-typo-text-l-bold-font-weight);", ":var(--plasma-typo-text-l-medium-font-weight);", ":var(--plasma-typo-text-l-letter-spacing);", ":var(--plasma-typo-text-l-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontWeightMedium, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
16
|
+
m: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-text-m-font-family);", ":var(--plasma-typo-text-m-font-size);", ":var(--plasma-typo-text-m-font-style);", ":var(--plasma-typo-text-m-font-weight);", ":var(--plasma-typo-text-m-bold-font-weight);", ":var(--plasma-typo-text-m-medium-font-weight);", ":var(--plasma-typo-text-m-letter-spacing);", ":var(--plasma-typo-text-m-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontWeightMedium, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
17
|
+
s: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-text-s-font-family);", ":var(--plasma-typo-text-s-font-size);", ":var(--plasma-typo-text-s-font-style);", ":var(--plasma-typo-text-s-font-weight);", ":var(--plasma-typo-text-s-bold-font-weight);", ":var(--plasma-typo-text-s-medium-font-weight);", ":var(--plasma-typo-text-s-letter-spacing);", ":var(--plasma-typo-text-s-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontWeightMedium, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight),
|
18
|
+
xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--plasma-typo-text-xs-font-family);", ":var(--plasma-typo-text-xs-font-size);", ":var(--plasma-typo-text-xs-font-style);", ":var(--plasma-typo-text-xs-font-weight);", ":var(--plasma-typo-text-xs-bold-font-weight);", ":var(--plasma-typo-text-xs-medium-font-weight);", ":var(--plasma-typo-text-xs-letter-spacing);", ":var(--plasma-typo-text-xs-line-height);"], _tokens.tokens.typoFontFamily, _tokens.tokens.typoFontSize, _tokens.tokens.typoFontStyle, _tokens.tokens.typoFontWeight, _tokens.tokens.typoFontWeightBold, _tokens.tokens.typoFontWeightMedium, _tokens.tokens.typoFontLetterSpacing, _tokens.tokens.typoFontLineHeight)
|
19
19
|
}
|
20
20
|
}
|
21
21
|
};
|
@@ -22,11 +22,24 @@ const meta: Meta<typeof Text> = {
|
|
22
22
|
as: {
|
23
23
|
control: 'text',
|
24
24
|
},
|
25
|
+
bold: {
|
26
|
+
control: {
|
27
|
+
type: 'boolean',
|
28
|
+
},
|
29
|
+
if: { arg: 'medium', truthy: false },
|
30
|
+
},
|
31
|
+
medium: {
|
32
|
+
control: {
|
33
|
+
type: 'boolean',
|
34
|
+
},
|
35
|
+
if: { arg: 'bold', truthy: false },
|
36
|
+
},
|
25
37
|
},
|
26
38
|
args: {
|
27
39
|
noWrap: false,
|
28
40
|
breakWord: true,
|
29
41
|
bold: false,
|
42
|
+
medium: false,
|
30
43
|
},
|
31
44
|
};
|
32
45
|
|
@@ -32,8 +32,8 @@ export var checkboxRoot = function checkboxRoot(Root) {
|
|
32
32
|
var inputRef = useRef(null);
|
33
33
|
var forkRef = useForkRef(inputRef, ref);
|
34
34
|
useEffect(function () {
|
35
|
-
if (inputRef.current
|
36
|
-
inputRef.current.indeterminate =
|
35
|
+
if (inputRef.current) {
|
36
|
+
inputRef.current.indeterminate = Boolean(indeterminate);
|
37
37
|
}
|
38
38
|
}, [inputRef, indeterminate]);
|
39
39
|
var uniqId = safeUseId();
|