@fluentui/react-text 9.0.0-nightly.f81b28ceb3.1 → 9.0.0-rc.11
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/CHANGELOG.json +542 -16
- package/CHANGELOG.md +206 -52
- package/MIGRATION.md +153 -103
- package/README.md +4 -4
- package/dist/index.d.ts +188 -0
- package/{lib → dist}/tsdoc-metadata.json +0 -0
- package/lib/Body1.js +2 -0
- package/lib/Body1.js.map +1 -0
- package/lib/Caption1.js +2 -0
- package/lib/Caption1.js.map +1 -0
- package/lib/Caption2.js +2 -0
- package/lib/Caption2.js.map +1 -0
- package/lib/Display.js.map +1 -1
- package/lib/LargeTitle.js.map +1 -1
- package/lib/Subtitle1.js +2 -0
- package/lib/Subtitle1.js.map +1 -0
- package/lib/Subtitle2.js +2 -0
- package/lib/Subtitle2.js.map +1 -0
- package/lib/Text.js.map +1 -1
- package/lib/Title1.js.map +1 -1
- package/lib/Title2.js.map +1 -1
- package/lib/Title3.js.map +1 -1
- package/lib/components/Body1/Body1.js +31 -0
- package/lib/components/Body1/Body1.js.map +1 -0
- package/lib/components/Body1/index.js +2 -0
- package/lib/components/Body1/index.js.map +1 -0
- package/lib/components/Caption1/Caption1.js +31 -0
- package/lib/components/Caption1/Caption1.js.map +1 -0
- package/lib/components/Caption1/index.js +2 -0
- package/lib/components/Caption1/index.js.map +1 -0
- package/lib/components/Caption2/Caption2.js +31 -0
- package/lib/components/Caption2/Caption2.js.map +1 -0
- package/lib/components/Caption2/index.js +2 -0
- package/lib/components/Caption2/index.js.map +1 -0
- package/lib/components/Display/Display.js +12 -8
- package/lib/components/Display/Display.js.map +1 -1
- package/lib/components/Display/index.js.map +1 -1
- package/lib/components/LargeTitle/LargeTitle.js +12 -8
- package/lib/components/LargeTitle/LargeTitle.js.map +1 -1
- package/lib/components/LargeTitle/index.js.map +1 -1
- package/lib/components/Subtitle1/Subtitle1.js +31 -0
- package/lib/components/Subtitle1/Subtitle1.js.map +1 -0
- package/lib/components/Subtitle1/index.js +2 -0
- package/lib/components/Subtitle1/index.js.map +1 -0
- package/lib/components/Subtitle2/Subtitle2.js +31 -0
- package/lib/components/Subtitle2/Subtitle2.js.map +1 -0
- package/lib/components/Subtitle2/index.js +2 -0
- package/lib/components/Subtitle2/index.js.map +1 -0
- package/lib/components/Text/Text.js +7 -7
- package/lib/components/Text/Text.js.map +1 -1
- package/lib/components/Text/Text.types.js.map +1 -1
- package/lib/components/Text/index.js.map +1 -1
- package/lib/components/Text/renderText.js +7 -7
- package/lib/components/Text/renderText.js.map +1 -1
- package/lib/components/Text/useText.js +28 -27
- package/lib/components/Text/useText.js.map +1 -1
- package/lib/components/Text/useTextStyles.js +17 -11
- package/lib/components/Text/useTextStyles.js.map +1 -1
- package/lib/components/Title1/Title1.js +12 -8
- package/lib/components/Title1/Title1.js.map +1 -1
- package/lib/components/Title1/index.js.map +1 -1
- package/lib/components/Title2/Title2.js +12 -8
- package/lib/components/Title2/Title2.js.map +1 -1
- package/lib/components/Title2/index.js.map +1 -1
- package/lib/components/Title3/Title3.js +12 -8
- package/lib/components/Title3/Title3.js.map +1 -1
- package/lib/components/Title3/index.js.map +1 -1
- package/lib/components/wrapper.js +13 -10
- package/lib/components/wrapper.js.map +1 -1
- package/lib/index.js +11 -10
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Body1.js +10 -0
- package/lib-commonjs/Body1.js.map +1 -0
- package/lib-commonjs/Caption1.js +10 -0
- package/lib-commonjs/Caption1.js.map +1 -0
- package/lib-commonjs/Caption2.js +10 -0
- package/lib-commonjs/Caption2.js.map +1 -0
- package/lib-commonjs/Display.js +1 -1
- package/lib-commonjs/Display.js.map +1 -1
- package/lib-commonjs/LargeTitle.js +1 -1
- package/lib-commonjs/LargeTitle.js.map +1 -1
- package/lib-commonjs/Subtitle1.js +10 -0
- package/lib-commonjs/Subtitle1.js.map +1 -0
- package/lib-commonjs/Subtitle2.js +10 -0
- package/lib-commonjs/Subtitle2.js.map +1 -0
- package/lib-commonjs/Text.js +1 -1
- package/lib-commonjs/Text.js.map +1 -1
- package/lib-commonjs/Title1.js +1 -1
- package/lib-commonjs/Title1.js.map +1 -1
- package/lib-commonjs/Title2.js +1 -1
- package/lib-commonjs/Title2.js.map +1 -1
- package/lib-commonjs/Title3.js +1 -1
- package/lib-commonjs/Title3.js.map +1 -1
- package/lib-commonjs/components/Body1/Body1.js +41 -0
- package/lib-commonjs/components/Body1/Body1.js.map +1 -0
- package/lib-commonjs/components/Body1/index.js +10 -0
- package/lib-commonjs/components/Body1/index.js.map +1 -0
- package/lib-commonjs/components/Caption1/Caption1.js +41 -0
- package/lib-commonjs/components/Caption1/Caption1.js.map +1 -0
- package/lib-commonjs/components/Caption1/index.js +10 -0
- package/lib-commonjs/components/Caption1/index.js.map +1 -0
- package/lib-commonjs/components/Caption2/Caption2.js +41 -0
- package/lib-commonjs/components/Caption2/Caption2.js.map +1 -0
- package/lib-commonjs/components/Caption2/index.js +10 -0
- package/lib-commonjs/components/Caption2/index.js.map +1 -0
- package/lib-commonjs/components/Display/Display.js +20 -9
- package/lib-commonjs/components/Display/Display.js.map +1 -1
- package/lib-commonjs/components/Display/index.js +1 -1
- package/lib-commonjs/components/Display/index.js.map +1 -1
- package/lib-commonjs/components/LargeTitle/LargeTitle.js +20 -9
- package/lib-commonjs/components/LargeTitle/LargeTitle.js.map +1 -1
- package/lib-commonjs/components/LargeTitle/index.js +1 -1
- package/lib-commonjs/components/LargeTitle/index.js.map +1 -1
- package/lib-commonjs/components/Subtitle1/Subtitle1.js +41 -0
- package/lib-commonjs/components/Subtitle1/Subtitle1.js.map +1 -0
- package/lib-commonjs/components/Subtitle1/index.js +10 -0
- package/lib-commonjs/components/Subtitle1/index.js.map +1 -0
- package/lib-commonjs/components/Subtitle2/Subtitle2.js +41 -0
- package/lib-commonjs/components/Subtitle2/Subtitle2.js.map +1 -0
- package/lib-commonjs/components/Subtitle2/index.js +10 -0
- package/lib-commonjs/components/Subtitle2/index.js.map +1 -0
- package/lib-commonjs/components/Text/Text.js +8 -8
- package/lib-commonjs/components/Text/Text.js.map +1 -1
- package/lib-commonjs/components/Text/Text.types.js.map +1 -1
- package/lib-commonjs/components/Text/index.js +1 -1
- package/lib-commonjs/components/Text/index.js.map +1 -1
- package/lib-commonjs/components/Text/renderText.js +11 -12
- package/lib-commonjs/components/Text/renderText.js.map +1 -1
- package/lib-commonjs/components/Text/useText.js +31 -31
- package/lib-commonjs/components/Text/useText.js.map +1 -1
- package/lib-commonjs/components/Text/useTextStyles.js +21 -14
- package/lib-commonjs/components/Text/useTextStyles.js.map +1 -1
- package/lib-commonjs/components/Title1/Title1.js +20 -9
- package/lib-commonjs/components/Title1/Title1.js.map +1 -1
- package/lib-commonjs/components/Title1/index.js +1 -1
- package/lib-commonjs/components/Title1/index.js.map +1 -1
- package/lib-commonjs/components/Title2/Title2.js +20 -9
- package/lib-commonjs/components/Title2/Title2.js.map +1 -1
- package/lib-commonjs/components/Title2/index.js +1 -1
- package/lib-commonjs/components/Title2/index.js.map +1 -1
- package/lib-commonjs/components/Title3/Title3.js +20 -9
- package/lib-commonjs/components/Title3/Title3.js.map +1 -1
- package/lib-commonjs/components/Title3/index.js +1 -1
- package/lib-commonjs/components/Title3/index.js.map +1 -1
- package/lib-commonjs/components/wrapper.js +14 -11
- package/lib-commonjs/components/wrapper.js.map +1 -1
- package/lib-commonjs/index.js +173 -11
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +18 -22
- package/dist/react-text.d.ts +0 -163
- package/lib/Body.d.ts +0 -1
- package/lib/Body.js +0 -2
- package/lib/Body.js.map +0 -1
- package/lib/Caption.d.ts +0 -1
- package/lib/Caption.js +0 -2
- package/lib/Caption.js.map +0 -1
- package/lib/Display.d.ts +0 -1
- package/lib/Headline.d.ts +0 -1
- package/lib/Headline.js +0 -2
- package/lib/Headline.js.map +0 -1
- package/lib/LargeTitle.d.ts +0 -1
- package/lib/Subheadline.d.ts +0 -1
- package/lib/Subheadline.js +0 -2
- package/lib/Subheadline.js.map +0 -1
- package/lib/Text.d.ts +0 -1
- package/lib/Title1.d.ts +0 -1
- package/lib/Title2.d.ts +0 -1
- package/lib/Title3.d.ts +0 -1
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -16
- package/lib/common/isConformant.js.map +0 -1
- package/lib/components/Body/Body.d.ts +0 -6
- package/lib/components/Body/Body.js +0 -27
- package/lib/components/Body/Body.js.map +0 -1
- package/lib/components/Body/index.d.ts +0 -1
- package/lib/components/Body/index.js +0 -2
- package/lib/components/Body/index.js.map +0 -1
- package/lib/components/Caption/Caption.d.ts +0 -6
- package/lib/components/Caption/Caption.js +0 -27
- package/lib/components/Caption/Caption.js.map +0 -1
- package/lib/components/Caption/index.d.ts +0 -1
- package/lib/components/Caption/index.js +0 -2
- package/lib/components/Caption/index.js.map +0 -1
- package/lib/components/Display/Display.d.ts +0 -6
- package/lib/components/Display/index.d.ts +0 -1
- package/lib/components/Headline/Headline.d.ts +0 -6
- package/lib/components/Headline/Headline.js +0 -27
- package/lib/components/Headline/Headline.js.map +0 -1
- package/lib/components/Headline/index.d.ts +0 -1
- package/lib/components/Headline/index.js +0 -2
- package/lib/components/Headline/index.js.map +0 -1
- package/lib/components/LargeTitle/LargeTitle.d.ts +0 -6
- package/lib/components/LargeTitle/index.d.ts +0 -1
- package/lib/components/Subheadline/Subheadline.d.ts +0 -6
- package/lib/components/Subheadline/Subheadline.js +0 -27
- package/lib/components/Subheadline/Subheadline.js.map +0 -1
- package/lib/components/Subheadline/index.d.ts +0 -1
- package/lib/components/Subheadline/index.js +0 -2
- package/lib/components/Subheadline/index.js.map +0 -1
- package/lib/components/Text/Text.d.ts +0 -6
- package/lib/components/Text/Text.types.d.ts +0 -77
- package/lib/components/Text/index.d.ts +0 -5
- package/lib/components/Text/renderText.d.ts +0 -5
- package/lib/components/Text/useText.d.ts +0 -12
- package/lib/components/Text/useTextStyles.d.ts +0 -5
- package/lib/components/Title1/Title1.d.ts +0 -6
- package/lib/components/Title1/index.d.ts +0 -1
- package/lib/components/Title2/Title2.d.ts +0 -6
- package/lib/components/Title2/index.d.ts +0 -1
- package/lib/components/Title3/Title3.d.ts +0 -6
- package/lib/components/Title3/index.d.ts +0 -1
- package/lib/components/wrapper.d.ts +0 -7
- package/lib/index.d.ts +0 -10
- package/lib/typographyStyles/index.d.ts +0 -2
- package/lib/typographyStyles/index.js +0 -3
- package/lib/typographyStyles/index.js.map +0 -1
- package/lib/typographyStyles/typographyStyles.d.ts +0 -14
- package/lib/typographyStyles/typographyStyles.js +0 -76
- package/lib/typographyStyles/typographyStyles.js.map +0 -1
- package/lib-commonjs/Body.d.ts +0 -1
- package/lib-commonjs/Body.js +0 -10
- package/lib-commonjs/Body.js.map +0 -1
- package/lib-commonjs/Caption.d.ts +0 -1
- package/lib-commonjs/Caption.js +0 -10
- package/lib-commonjs/Caption.js.map +0 -1
- package/lib-commonjs/Display.d.ts +0 -1
- package/lib-commonjs/Headline.d.ts +0 -1
- package/lib-commonjs/Headline.js +0 -10
- package/lib-commonjs/Headline.js.map +0 -1
- package/lib-commonjs/LargeTitle.d.ts +0 -1
- package/lib-commonjs/Subheadline.d.ts +0 -1
- package/lib-commonjs/Subheadline.js +0 -10
- package/lib-commonjs/Subheadline.js.map +0 -1
- package/lib-commonjs/Text.d.ts +0 -1
- package/lib-commonjs/Title1.d.ts +0 -1
- package/lib-commonjs/Title2.d.ts +0 -1
- package/lib-commonjs/Title3.d.ts +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -27
- package/lib-commonjs/common/isConformant.js.map +0 -1
- package/lib-commonjs/components/Body/Body.d.ts +0 -6
- package/lib-commonjs/components/Body/Body.js +0 -30
- package/lib-commonjs/components/Body/Body.js.map +0 -1
- package/lib-commonjs/components/Body/index.d.ts +0 -1
- package/lib-commonjs/components/Body/index.js +0 -10
- package/lib-commonjs/components/Body/index.js.map +0 -1
- package/lib-commonjs/components/Caption/Caption.d.ts +0 -6
- package/lib-commonjs/components/Caption/Caption.js +0 -30
- package/lib-commonjs/components/Caption/Caption.js.map +0 -1
- package/lib-commonjs/components/Caption/index.d.ts +0 -1
- package/lib-commonjs/components/Caption/index.js +0 -10
- package/lib-commonjs/components/Caption/index.js.map +0 -1
- package/lib-commonjs/components/Display/Display.d.ts +0 -6
- package/lib-commonjs/components/Display/index.d.ts +0 -1
- package/lib-commonjs/components/Headline/Headline.d.ts +0 -6
- package/lib-commonjs/components/Headline/Headline.js +0 -30
- package/lib-commonjs/components/Headline/Headline.js.map +0 -1
- package/lib-commonjs/components/Headline/index.d.ts +0 -1
- package/lib-commonjs/components/Headline/index.js +0 -10
- package/lib-commonjs/components/Headline/index.js.map +0 -1
- package/lib-commonjs/components/LargeTitle/LargeTitle.d.ts +0 -6
- package/lib-commonjs/components/LargeTitle/index.d.ts +0 -1
- package/lib-commonjs/components/Subheadline/Subheadline.d.ts +0 -6
- package/lib-commonjs/components/Subheadline/Subheadline.js +0 -30
- package/lib-commonjs/components/Subheadline/Subheadline.js.map +0 -1
- package/lib-commonjs/components/Subheadline/index.d.ts +0 -1
- package/lib-commonjs/components/Subheadline/index.js +0 -10
- package/lib-commonjs/components/Subheadline/index.js.map +0 -1
- package/lib-commonjs/components/Text/Text.d.ts +0 -6
- package/lib-commonjs/components/Text/Text.types.d.ts +0 -77
- package/lib-commonjs/components/Text/index.d.ts +0 -5
- package/lib-commonjs/components/Text/renderText.d.ts +0 -5
- package/lib-commonjs/components/Text/useText.d.ts +0 -12
- package/lib-commonjs/components/Text/useTextStyles.d.ts +0 -5
- package/lib-commonjs/components/Title1/Title1.d.ts +0 -6
- package/lib-commonjs/components/Title1/index.d.ts +0 -1
- package/lib-commonjs/components/Title2/Title2.d.ts +0 -6
- package/lib-commonjs/components/Title2/index.d.ts +0 -1
- package/lib-commonjs/components/Title3/Title3.d.ts +0 -6
- package/lib-commonjs/components/Title3/index.d.ts +0 -1
- package/lib-commonjs/components/wrapper.d.ts +0 -7
- package/lib-commonjs/index.d.ts +0 -10
- package/lib-commonjs/typographyStyles/index.d.ts +0 -2
- package/lib-commonjs/typographyStyles/index.js +0 -11
- package/lib-commonjs/typographyStyles/index.js.map +0 -1
- package/lib-commonjs/typographyStyles/typographyStyles.d.ts +0 -14
- package/lib-commonjs/typographyStyles/typographyStyles.js +0 -109
- package/lib-commonjs/typographyStyles/typographyStyles.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Text.types.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"Text.types.js","sourceRoot":"../src/","sources":["components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Text slots\n */\nexport type TextSlots = {\n root: Slot<'span', 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'pre'>;\n};\n\n/**\n * Text Props\n */\nexport type TextProps = ComponentProps<TextSlots> & {\n /**\n * Aligns text based on the parent container.\n *\n * @default start\n */\n align?: 'start' | 'center' | 'end' | 'justify';\n\n /**\n * Applies a block display for the content.\n *\n * @default false\n */\n block?: boolean;\n\n /**\n * Applies the font family to the content.\n *\n * @default base\n */\n font?: 'base' | 'monospace' | 'numeric';\n\n /**\n * Applies the italic font style to the content.\n *\n * @default false\n */\n italic?: boolean;\n\n /**\n * Applies font size and line height based on the theme tokens.\n *\n * @default 300\n */\n size?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000;\n\n /**\n * Applies the strikethrough text decoration to the content.\n *\n * @default false\n */\n strikethrough?: boolean;\n\n /**\n * Truncate overflowing text for block displays.\n *\n * @default false\n */\n\n truncate?: boolean;\n\n /**\n * Applies the underline text decoration to the content.\n *\n * @default false\n */\n underline?: boolean;\n\n /**\n * Applies font weight to the content.\n *\n * @default regular\n */\n weight?: 'regular' | 'medium' | 'semibold';\n\n /**\n * Wraps the text content on white spaces.\n *\n * @default true\n */\n wrap?: boolean;\n};\n\n/**\n * State used in rendering Text\n */\nexport type TextState = ComponentState<TextSlots> &\n Required<\n Pick<\n TextProps,\n 'align' | 'block' | 'font' | 'italic' | 'size' | 'strikethrough' | 'truncate' | 'underline' | 'weight' | 'wrap'\n >\n >;\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Text/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './Text';\nexport * from './Text.types';\nexport * from './renderText';\nexport * from './useText';\nexport * from './useTextStyles';\n"]}
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { __assign } from "tslib";
|
2
1
|
import * as React from 'react';
|
3
2
|
import { getSlots } from '@fluentui/react-utilities';
|
4
3
|
/**
|
5
4
|
* Render the final JSX of Text
|
6
5
|
*/
|
7
6
|
|
8
|
-
export
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
return /*#__PURE__*/React.createElement(slots.root,
|
7
|
+
export const renderText_unstable = state => {
|
8
|
+
const {
|
9
|
+
slots,
|
10
|
+
slotProps
|
11
|
+
} = getSlots(state);
|
12
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
13
|
+
});
|
14
14
|
};
|
15
15
|
//# sourceMappingURL=renderText.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/Text/renderText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,mBAAmB,GAAI,KAAD,IAAqB;AACtD,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAY,KAAZ,CAArC;AAEA,sBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAAP;AACD,CAJM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TextSlots, TextState } from './Text.types';\n\n/**\n * Render the final JSX of Text\n */\nexport const renderText_unstable = (state: TextState) => {\n const { slots, slotProps } = getSlots<TextSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,48 +1,49 @@
|
|
1
|
-
import { __assign } from "tslib";
|
2
1
|
import { getNativeElementProps } from '@fluentui/react-utilities';
|
3
2
|
/**
|
4
3
|
* Create the state required to render Text.
|
5
4
|
*
|
6
|
-
* The returned state can be modified with hooks such as
|
7
|
-
* before being passed to
|
5
|
+
* The returned state can be modified with hooks such as useTextStyles_unstable,
|
6
|
+
* before being passed to renderText_unstable.
|
8
7
|
*
|
9
8
|
* @param props - props from this instance of Text
|
10
9
|
* @param ref - reference to root HTMLElement of Text
|
11
10
|
*/
|
12
11
|
|
13
|
-
export
|
12
|
+
export const useText_unstable = (props, ref) => {
|
14
13
|
var _a;
|
15
14
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
15
|
+
const {
|
16
|
+
wrap,
|
17
|
+
truncate,
|
18
|
+
block,
|
19
|
+
italic,
|
20
|
+
underline,
|
21
|
+
strikethrough,
|
22
|
+
size,
|
23
|
+
font,
|
24
|
+
weight,
|
25
|
+
align
|
26
|
+
} = props;
|
27
|
+
const as = (_a = props.as) !== null && _a !== void 0 ? _a : 'span';
|
28
|
+
const state = {
|
29
|
+
align: align !== null && align !== void 0 ? align : 'start',
|
30
30
|
block: block !== null && block !== void 0 ? block : false,
|
31
|
+
font: font !== null && font !== void 0 ? font : 'base',
|
31
32
|
italic: italic !== null && italic !== void 0 ? italic : false,
|
32
|
-
underline: underline !== null && underline !== void 0 ? underline : false,
|
33
|
-
strikethrough: strikethrough !== null && strikethrough !== void 0 ? strikethrough : false,
|
34
33
|
size: size !== null && size !== void 0 ? size : 300,
|
35
|
-
|
34
|
+
strikethrough: strikethrough !== null && strikethrough !== void 0 ? strikethrough : false,
|
35
|
+
truncate: truncate !== null && truncate !== void 0 ? truncate : false,
|
36
|
+
underline: underline !== null && underline !== void 0 ? underline : false,
|
36
37
|
weight: weight !== null && weight !== void 0 ? weight : 'regular',
|
37
|
-
|
38
|
+
wrap: wrap !== null && wrap !== void 0 ? wrap : true,
|
38
39
|
components: {
|
39
40
|
root: 'span'
|
40
41
|
},
|
41
|
-
root: getNativeElementProps(as,
|
42
|
-
ref
|
43
|
-
|
44
|
-
as
|
45
|
-
})
|
42
|
+
root: getNativeElementProps(as, {
|
43
|
+
ref,
|
44
|
+
...props,
|
45
|
+
as
|
46
|
+
})
|
46
47
|
};
|
47
48
|
return state;
|
48
49
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/Text/useText.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,gBAAgB,GAAG,CAAC,KAAD,EAAmB,GAAnB,KAA6D;;;AAC3F,QAAM;AAAE,IAAA,IAAF;AAAQ,IAAA,QAAR;AAAkB,IAAA,KAAlB;AAAyB,IAAA,MAAzB;AAAiC,IAAA,SAAjC;AAA4C,IAAA,aAA5C;AAA2D,IAAA,IAA3D;AAAiE,IAAA,IAAjE;AAAuE,IAAA,MAAvE;AAA+E,IAAA;AAA/E,MAAyF,KAA/F;AACA,QAAM,EAAE,GAAG,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,MAAvB;AAEA,QAAM,KAAK,GAAc;AACvB,IAAA,KAAK,EAAE,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAA,KAAA,GAAS,OADO;AAEvB,IAAA,KAAK,EAAE,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAA,KAAA,GAAS,KAFO;AAGvB,IAAA,IAAI,EAAE,IAAI,KAAA,IAAJ,IAAA,IAAI,KAAA,KAAA,CAAJ,GAAA,IAAA,GAAQ,MAHS;AAIvB,IAAA,MAAM,EAAE,MAAM,KAAA,IAAN,IAAA,MAAM,KAAA,KAAA,CAAN,GAAA,MAAA,GAAU,KAJK;AAKvB,IAAA,IAAI,EAAE,IAAI,KAAA,IAAJ,IAAA,IAAI,KAAA,KAAA,CAAJ,GAAA,IAAA,GAAQ,GALS;AAMvB,IAAA,aAAa,EAAE,aAAa,KAAA,IAAb,IAAA,aAAa,KAAA,KAAA,CAAb,GAAA,aAAA,GAAiB,KANT;AAOvB,IAAA,QAAQ,EAAE,QAAQ,KAAA,IAAR,IAAA,QAAQ,KAAA,KAAA,CAAR,GAAA,QAAA,GAAY,KAPC;AAQvB,IAAA,SAAS,EAAE,SAAS,KAAA,IAAT,IAAA,SAAS,KAAA,KAAA,CAAT,GAAA,SAAA,GAAa,KARD;AASvB,IAAA,MAAM,EAAE,MAAM,KAAA,IAAN,IAAA,MAAM,KAAA,KAAA,CAAN,GAAA,MAAA,GAAU,SATK;AAUvB,IAAA,IAAI,EAAE,IAAI,KAAA,IAAJ,IAAA,IAAI,KAAA,KAAA,CAAJ,GAAA,IAAA,GAAQ,IAVS;AAYvB,IAAA,UAAU,EAAE;AAAE,MAAA,IAAI,EAAE;AAAR,KAZW;AAcvB,IAAA,IAAI,EAAE,qBAAqB,CAAC,EAAD,EAAK;AAC9B,MAAA,GAD8B;AAE9B,SAAG,KAF2B;AAG9B,MAAA;AAH8B,KAAL;AAdJ,GAAzB;AAqBA,SAAO,KAAP;AACD,CA1BM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TextProps, TextState } from './Text.types';\n\n/**\n * Create the state required to render Text.\n *\n * The returned state can be modified with hooks such as useTextStyles_unstable,\n * before being passed to renderText_unstable.\n *\n * @param props - props from this instance of Text\n * @param ref - reference to root HTMLElement of Text\n */\nexport const useText_unstable = (props: TextProps, ref: React.Ref<HTMLElement>): TextState => {\n const { wrap, truncate, block, italic, underline, strikethrough, size, font, weight, align } = props;\n const as = props.as ?? 'span';\n\n const state: TextState = {\n align: align ?? 'start',\n block: block ?? false,\n font: font ?? 'base',\n italic: italic ?? false,\n size: size ?? 300,\n strikethrough: strikethrough ?? false,\n truncate: truncate ?? false,\n underline: underline ?? false,\n weight: weight ?? 'regular',\n wrap: wrap ?? true,\n\n components: { root: 'span' },\n\n root: getNativeElementProps(as, {\n ref,\n ...props,\n as,\n }),\n };\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,9 +1,13 @@
|
|
1
|
-
import { __styles, mergeClasses } from '@
|
1
|
+
import { __styles, mergeClasses, shorthands } from '@griffel/react';
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
3
|
+
export const textClassNames = {
|
4
|
+
root: 'fui-Text'
|
5
|
+
};
|
2
6
|
/**
|
3
7
|
* Styles for the root slot
|
4
8
|
*/
|
5
9
|
|
6
|
-
|
10
|
+
const useStyles = /*#__PURE__*/__styles({
|
7
11
|
"root": {
|
8
12
|
"Bahqtrf": "fk6fouc",
|
9
13
|
"Be2twd7": "fkhj508",
|
@@ -12,12 +16,14 @@ var useStyles = /*#__PURE__*/__styles({
|
|
12
16
|
"fsow6f": "fpgzoln",
|
13
17
|
"mc9l5x": "f1w7gpdv",
|
14
18
|
"Huce71": "f6juhto",
|
15
|
-
"
|
19
|
+
"B68tc82": "f1mtd64y",
|
20
|
+
"Bmxbyg5": "f1y7q3j9",
|
16
21
|
"ygn44y": "f2jf649"
|
17
22
|
},
|
18
23
|
"nowrap": {
|
19
24
|
"Huce71": "fz5stix",
|
20
|
-
"
|
25
|
+
"B68tc82": "f1p9o1ba",
|
26
|
+
"Bmxbyg5": "f1sil6mw"
|
21
27
|
},
|
22
28
|
"truncate": {
|
23
29
|
"ygn44y": "f1cmbuwj"
|
@@ -29,13 +35,13 @@ var useStyles = /*#__PURE__*/__styles({
|
|
29
35
|
"B80ckks": "f1j4dglz"
|
30
36
|
},
|
31
37
|
"underline": {
|
32
|
-
"
|
38
|
+
"w71qe1": "f13mvf36"
|
33
39
|
},
|
34
40
|
"strikethrough": {
|
35
|
-
"
|
41
|
+
"w71qe1": "fv5q2k7"
|
36
42
|
},
|
37
43
|
"strikethroughUnderline": {
|
38
|
-
"
|
44
|
+
"w71qe1": "f1drk4o6"
|
39
45
|
},
|
40
46
|
"base100": {
|
41
47
|
"Be2twd7": "f13mqy1h",
|
@@ -95,16 +101,16 @@ var useStyles = /*#__PURE__*/__styles({
|
|
95
101
|
"fsow6f": "f1j59e10"
|
96
102
|
}
|
97
103
|
}, {
|
98
|
-
"d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fpgzoln{text-align:start;}", ".f1w7gpdv{display:inline;}", ".f6juhto{white-space:normal;}", ".
|
104
|
+
"d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fpgzoln{text-align:start;}", ".f1w7gpdv{display:inline;}", ".f6juhto{white-space:normal;}", ".f1mtd64y{overflow-x:visible;}", ".f1y7q3j9{overflow-y:visible;}", ".f2jf649{text-overflow:clip;}", ".fz5stix{white-space:nowrap;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f1cmbuwj{text-overflow:ellipsis;}", ".ftgm304{display:block;}", ".f1j4dglz{font-style:italic;}", ".f13mvf36{text-decoration-line:underline;}", ".fv5q2k7{text-decoration-line:line-through;}", ".f1drk4o6{text-decoration-line:line-through underline;}", ".f13mqy1h{font-size:var(--fontSizeBase100);}", ".fcpl73t{line-height:var(--lineHeightBase100);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".f1pp30po{font-size:var(--fontSizeBase500);}", ".f106mvju{line-height:var(--lineHeightBase500);}", ".f1x0m3f5{font-size:var(--fontSizeBase600);}", ".fb86gi6{line-height:var(--lineHeightBase600);}", ".fojgt09{font-size:var(--fontSizeHero700);}", ".fcen8rp{line-height:var(--lineHeightHero700);}", ".fccw675{font-size:var(--fontSizeHero800);}", ".f1ebx5kk{line-height:var(--lineHeightHero800);}", ".f15afnhw{font-size:var(--fontSizeHero900);}", ".fr3w3wp{line-height:var(--lineHeightHero900);}", ".fpyltcb{font-size:var(--fontSizeHero1000);}", ".f1ivgwrt{line-height:var(--lineHeightHero1000);}", ".f1fedwem{font-family:var(--fontFamilyMonospace);}", ".f1uq0ln5{font-family:var(--fontFamilyNumeric);}", ".fdj6btp{font-weight:var(--fontWeightMedium);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f17mccla{text-align:center;}", ".f12ymhq5{text-align:end;}", ".f1j59e10{text-align:justify;}"]
|
99
105
|
});
|
100
106
|
/**
|
101
107
|
* Apply styling to the Text slots based on the state
|
102
108
|
*/
|
103
109
|
|
104
110
|
|
105
|
-
export
|
106
|
-
|
107
|
-
state.root.className = mergeClasses(styles.root, state.wrap === false && styles.nowrap, state.truncate && styles.truncate, state.block && styles.block, state.italic && styles.italic, state.underline && styles.underline, state.strikethrough && styles.strikethrough, state.underline && state.strikethrough && styles.strikethroughUnderline, state.size === 100 && styles.base100, state.size === 200 && styles.base200, state.size === 400 && styles.base400, state.size === 500 && styles.base500, state.size === 600 && styles.base600, state.size === 700 && styles.hero700, state.size === 800 && styles.hero800, state.size === 900 && styles.hero900, state.size === 1000 && styles.hero1000, state.font === 'monospace' && styles.monospace, state.font === 'numeric' && styles.numeric, state.weight === 'medium' && styles.weightMedium, state.weight === 'semibold' && styles.weightSemibold, state.align === 'center' && styles.alignCenter, state.align === 'end' && styles.alignEnd, state.align === 'justify' && styles.alignJustify, state.root.className);
|
111
|
+
export const useTextStyles_unstable = state => {
|
112
|
+
const styles = useStyles();
|
113
|
+
state.root.className = mergeClasses(textClassNames.root, styles.root, state.wrap === false && styles.nowrap, state.truncate && styles.truncate, state.block && styles.block, state.italic && styles.italic, state.underline && styles.underline, state.strikethrough && styles.strikethrough, state.underline && state.strikethrough && styles.strikethroughUnderline, state.size === 100 && styles.base100, state.size === 200 && styles.base200, state.size === 400 && styles.base400, state.size === 500 && styles.base500, state.size === 600 && styles.base600, state.size === 700 && styles.hero700, state.size === 800 && styles.hero800, state.size === 900 && styles.hero900, state.size === 1000 && styles.hero1000, state.font === 'monospace' && styles.monospace, state.font === 'numeric' && styles.numeric, state.weight === 'medium' && styles.weightMedium, state.weight === 'semibold' && styles.weightSemibold, state.align === 'center' && styles.alignCenter, state.align === 'end' && styles.alignEnd, state.align === 'justify' && styles.alignJustify, state.root.className);
|
108
114
|
return state;
|
109
115
|
};
|
110
116
|
//# sourceMappingURL=useTextStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/Text/useTextStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAIA,OAAO,MAAM,cAAc,GAA8B;AACvD,EAAA,IAAI,EAAE;AADiD,CAAlD;AAIP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AA6FA;;AAEG;;;AACH,OAAO,MAAM,sBAAsB,GAAI,KAAD,IAAgC;AACpE,QAAM,MAAM,GAAG,SAAS,EAAxB;AAEA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,cAAc,CAAC,IADkB,EAEjC,MAAM,CAAC,IAF0B,EAGjC,KAAK,CAAC,IAAN,KAAe,KAAf,IAAwB,MAAM,CAAC,MAHE,EAIjC,KAAK,CAAC,QAAN,IAAkB,MAAM,CAAC,QAJQ,EAKjC,KAAK,CAAC,KAAN,IAAe,MAAM,CAAC,KALW,EAMjC,KAAK,CAAC,MAAN,IAAgB,MAAM,CAAC,MANU,EAOjC,KAAK,CAAC,SAAN,IAAmB,MAAM,CAAC,SAPO,EAQjC,KAAK,CAAC,aAAN,IAAuB,MAAM,CAAC,aARG,EASjC,KAAK,CAAC,SAAN,IAAmB,KAAK,CAAC,aAAzB,IAA0C,MAAM,CAAC,sBAThB,EAUjC,KAAK,CAAC,IAAN,KAAe,GAAf,IAAsB,MAAM,CAAC,OAVI,EAWjC,KAAK,CAAC,IAAN,KAAe,GAAf,IAAsB,MAAM,CAAC,OAXI,EAYjC,KAAK,CAAC,IAAN,KAAe,GAAf,IAAsB,MAAM,CAAC,OAZI,EAajC,KAAK,CAAC,IAAN,KAAe,GAAf,IAAsB,MAAM,CAAC,OAbI,EAcjC,KAAK,CAAC,IAAN,KAAe,GAAf,IAAsB,MAAM,CAAC,OAdI,EAejC,KAAK,CAAC,IAAN,KAAe,GAAf,IAAsB,MAAM,CAAC,OAfI,EAgBjC,KAAK,CAAC,IAAN,KAAe,GAAf,IAAsB,MAAM,CAAC,OAhBI,EAiBjC,KAAK,CAAC,IAAN,KAAe,GAAf,IAAsB,MAAM,CAAC,OAjBI,EAkBjC,KAAK,CAAC,IAAN,KAAe,IAAf,IAAuB,MAAM,CAAC,QAlBG,EAmBjC,KAAK,CAAC,IAAN,KAAe,WAAf,IAA8B,MAAM,CAAC,SAnBJ,EAoBjC,KAAK,CAAC,IAAN,KAAe,SAAf,IAA4B,MAAM,CAAC,OApBF,EAqBjC,KAAK,CAAC,MAAN,KAAiB,QAAjB,IAA6B,MAAM,CAAC,YArBH,EAsBjC,KAAK,CAAC,MAAN,KAAiB,UAAjB,IAA+B,MAAM,CAAC,cAtBL,EAuBjC,KAAK,CAAC,KAAN,KAAgB,QAAhB,IAA4B,MAAM,CAAC,WAvBF,EAwBjC,KAAK,CAAC,KAAN,KAAgB,KAAhB,IAAyB,MAAM,CAAC,QAxBC,EAyBjC,KAAK,CAAC,KAAN,KAAgB,SAAhB,IAA6B,MAAM,CAAC,YAzBH,EA0BjC,KAAK,CAAC,IAAN,CAAW,SA1BsB,CAAnC;AA6BA,SAAO,KAAP;AACD,CAjCM","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TextSlots, TextState } from './Text.types';\nimport { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const textClassNames: SlotClassNames<TextSlots> = {\n root: 'fui-Text',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n fontWeight: tokens.fontWeightRegular,\n textAlign: 'start',\n display: 'inline',\n whiteSpace: 'normal',\n ...shorthands.overflow('visible'),\n textOverflow: 'clip',\n },\n nowrap: {\n whiteSpace: 'nowrap',\n ...shorthands.overflow('hidden'),\n },\n truncate: {\n textOverflow: 'ellipsis',\n },\n block: {\n display: 'block',\n },\n italic: {\n fontStyle: 'italic',\n },\n underline: {\n textDecorationLine: 'underline',\n },\n strikethrough: {\n textDecorationLine: 'line-through',\n },\n strikethroughUnderline: {\n textDecorationLine: 'line-through underline',\n },\n base100: {\n fontSize: tokens.fontSizeBase100,\n lineHeight: tokens.lineHeightBase100,\n },\n base200: {\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200,\n },\n base400: {\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n },\n base500: {\n fontSize: tokens.fontSizeBase500,\n lineHeight: tokens.lineHeightBase500,\n },\n base600: {\n fontSize: tokens.fontSizeBase600,\n lineHeight: tokens.lineHeightBase600,\n },\n hero700: {\n fontSize: tokens.fontSizeHero700,\n lineHeight: tokens.lineHeightHero700,\n },\n hero800: {\n fontSize: tokens.fontSizeHero800,\n lineHeight: tokens.lineHeightHero800,\n },\n hero900: {\n fontSize: tokens.fontSizeHero900,\n lineHeight: tokens.lineHeightHero900,\n },\n hero1000: {\n fontSize: tokens.fontSizeHero1000,\n lineHeight: tokens.lineHeightHero1000,\n },\n monospace: {\n fontFamily: tokens.fontFamilyMonospace,\n },\n numeric: {\n fontFamily: tokens.fontFamilyNumeric,\n },\n weightMedium: {\n fontWeight: tokens.fontWeightMedium,\n },\n weightSemibold: {\n fontWeight: tokens.fontWeightSemibold,\n },\n alignCenter: {\n textAlign: 'center',\n },\n alignEnd: {\n textAlign: 'end',\n },\n alignJustify: {\n textAlign: 'justify',\n },\n});\n\n/**\n * Apply styling to the Text slots based on the state\n */\nexport const useTextStyles_unstable = (state: TextState): TextState => {\n const styles = useStyles();\n\n state.root.className = mergeClasses(\n textClassNames.root,\n styles.root,\n state.wrap === false && styles.nowrap,\n state.truncate && styles.truncate,\n state.block && styles.block,\n state.italic && styles.italic,\n state.underline && styles.underline,\n state.strikethrough && styles.strikethrough,\n state.underline && state.strikethrough && styles.strikethroughUnderline,\n state.size === 100 && styles.base100,\n state.size === 200 && styles.base200,\n state.size === 400 && styles.base400,\n state.size === 500 && styles.base500,\n state.size === 600 && styles.base600,\n state.size === 700 && styles.hero700,\n state.size === 800 && styles.hero800,\n state.size === 900 && styles.hero900,\n state.size === 1000 && styles.hero1000,\n state.font === 'monospace' && styles.monospace,\n state.font === 'numeric' && styles.numeric,\n state.weight === 'medium' && styles.weightMedium,\n state.weight === 'semibold' && styles.weightSemibold,\n state.align === 'center' && styles.alignCenter,\n state.align === 'end' && styles.alignEnd,\n state.align === 'justify' && styles.alignJustify,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,27 +1,31 @@
|
|
1
|
-
import { __styles } from '@
|
2
|
-
import { typographyStyles } from '../../typographyStyles/index';
|
1
|
+
import { __styles } from '@griffel/react';
|
3
2
|
import { createWrapper } from '../wrapper';
|
3
|
+
import { typographyStyles } from '@fluentui/react-theme';
|
4
|
+
export const title1ClassNames = {
|
5
|
+
root: 'fui-Title1'
|
6
|
+
};
|
4
7
|
/**
|
5
8
|
* Styles for the root slot
|
6
9
|
*/
|
7
10
|
|
8
|
-
|
11
|
+
const useStyles = /*#__PURE__*/__styles({
|
9
12
|
"root": {
|
10
13
|
"Bahqtrf": "fk6fouc",
|
11
14
|
"Be2twd7": "fccw675",
|
12
|
-
"
|
13
|
-
"
|
15
|
+
"Bhrd7zp": "fl43uef",
|
16
|
+
"Bg96gwp": "f1ebx5kk"
|
14
17
|
}
|
15
18
|
}, {
|
16
|
-
"d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fccw675{font-size:var(--fontSizeHero800);}", ".
|
19
|
+
"d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fccw675{font-size:var(--fontSizeHero800);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f1ebx5kk{line-height:var(--lineHeightHero800);}"]
|
17
20
|
});
|
18
21
|
/**
|
19
22
|
* Text wrapper component for the Title 1 typography variant
|
20
23
|
*/
|
21
24
|
|
22
25
|
|
23
|
-
export
|
24
|
-
useStyles
|
26
|
+
export const Title1 = /*#__PURE__*/createWrapper({
|
27
|
+
useStyles,
|
28
|
+
className: title1ClassNames.root,
|
25
29
|
displayName: 'Title1'
|
26
30
|
});
|
27
31
|
//# sourceMappingURL=Title1.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/Title1/Title1.tsx"],"names":[],"mappings":"AACA,yBAA2B,gBAA3B;AACA,SAAS,aAAT,QAAgD,YAAhD;AAGA,SAAS,gBAAT,QAAiC,uBAAjC;AAEA,OAAO,MAAM,gBAAgB,GAA8B;AACzD,EAAA,IAAI,EAAE;AADmD,CAApD;AAIP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,MAAM,MAAM,gBAAwC,aAAa,CAAC;AACvE,EAAA,SADuE;AAEvE,EAAA,SAAS,EAAE,gBAAgB,CAAC,IAF2C;AAGvE,EAAA,WAAW,EAAE;AAH0D,CAAD,CAAjE","sourcesContent":["import type { FunctionComponent } from 'react';\nimport { makeStyles } from '@griffel/react';\nimport { createWrapper, TextWrapperProps } from '../wrapper';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport { TextSlots } from '../Text/Text.types';\nimport { typographyStyles } from '@fluentui/react-theme';\n\nexport const title1ClassNames: SlotClassNames<TextSlots> = {\n root: 'fui-Title1',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: typographyStyles.title1,\n});\n\n/**\n * Text wrapper component for the Title 1 typography variant\n */\nexport const Title1: FunctionComponent<TextWrapperProps> = createWrapper({\n useStyles,\n className: title1ClassNames.root,\n displayName: 'Title1',\n});\n"],"sourceRoot":"../src/"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Title1/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC","sourcesContent":["export * from './Title1';\n"]}
|
@@ -1,27 +1,31 @@
|
|
1
|
-
import { __styles } from '@
|
2
|
-
import { typographyStyles } from '../../typographyStyles/index';
|
1
|
+
import { __styles } from '@griffel/react';
|
3
2
|
import { createWrapper } from '../wrapper';
|
3
|
+
import { typographyStyles } from '@fluentui/react-theme';
|
4
|
+
export const title2ClassNames = {
|
5
|
+
root: 'fui-Title2'
|
6
|
+
};
|
4
7
|
/**
|
5
8
|
* Styles for the root slot
|
6
9
|
*/
|
7
10
|
|
8
|
-
|
11
|
+
const useStyles = /*#__PURE__*/__styles({
|
9
12
|
"root": {
|
10
13
|
"Bahqtrf": "fk6fouc",
|
11
14
|
"Be2twd7": "fojgt09",
|
12
|
-
"
|
13
|
-
"
|
15
|
+
"Bhrd7zp": "fl43uef",
|
16
|
+
"Bg96gwp": "fcen8rp"
|
14
17
|
}
|
15
18
|
}, {
|
16
|
-
"d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fojgt09{font-size:var(--fontSizeHero700);}", ".
|
19
|
+
"d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fojgt09{font-size:var(--fontSizeHero700);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fcen8rp{line-height:var(--lineHeightHero700);}"]
|
17
20
|
});
|
18
21
|
/**
|
19
22
|
* Text wrapper component for the Title 2 typography variant
|
20
23
|
*/
|
21
24
|
|
22
25
|
|
23
|
-
export
|
24
|
-
useStyles
|
26
|
+
export const Title2 = /*#__PURE__*/createWrapper({
|
27
|
+
useStyles,
|
28
|
+
className: title2ClassNames.root,
|
25
29
|
displayName: 'Title2'
|
26
30
|
});
|
27
31
|
//# sourceMappingURL=Title2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/Title2/Title2.tsx"],"names":[],"mappings":"AACA,yBAA2B,gBAA3B;AACA,SAAS,aAAT,QAAgD,YAAhD;AAGA,SAAS,gBAAT,QAAiC,uBAAjC;AAEA,OAAO,MAAM,gBAAgB,GAA8B;AACzD,EAAA,IAAI,EAAE;AADmD,CAApD;AAIP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,MAAM,MAAM,gBAAwC,aAAa,CAAC;AACvE,EAAA,SADuE;AAEvE,EAAA,SAAS,EAAE,gBAAgB,CAAC,IAF2C;AAGvE,EAAA,WAAW,EAAE;AAH0D,CAAD,CAAjE","sourcesContent":["import type { FunctionComponent } from 'react';\nimport { makeStyles } from '@griffel/react';\nimport { createWrapper, TextWrapperProps } from '../wrapper';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport { TextSlots } from '../Text/Text.types';\nimport { typographyStyles } from '@fluentui/react-theme';\n\nexport const title2ClassNames: SlotClassNames<TextSlots> = {\n root: 'fui-Title2',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: typographyStyles.title2,\n});\n\n/**\n * Text wrapper component for the Title 2 typography variant\n */\nexport const Title2: FunctionComponent<TextWrapperProps> = createWrapper({\n useStyles,\n className: title2ClassNames.root,\n displayName: 'Title2',\n});\n"],"sourceRoot":"../src/"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Title2/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC","sourcesContent":["export * from './Title2';\n"]}
|
@@ -1,27 +1,31 @@
|
|
1
|
-
import { __styles } from '@
|
2
|
-
import { typographyStyles } from '../../typographyStyles/index';
|
1
|
+
import { __styles } from '@griffel/react';
|
3
2
|
import { createWrapper } from '../wrapper';
|
3
|
+
import { typographyStyles } from '@fluentui/react-theme';
|
4
|
+
export const title3ClassNames = {
|
5
|
+
root: 'fui-Title3'
|
6
|
+
};
|
4
7
|
/**
|
5
8
|
* Styles for the root slot
|
6
9
|
*/
|
7
10
|
|
8
|
-
|
11
|
+
const useStyles = /*#__PURE__*/__styles({
|
9
12
|
"root": {
|
10
13
|
"Bahqtrf": "fk6fouc",
|
11
14
|
"Be2twd7": "f1x0m3f5",
|
12
|
-
"
|
13
|
-
"
|
15
|
+
"Bhrd7zp": "fl43uef",
|
16
|
+
"Bg96gwp": "fb86gi6"
|
14
17
|
}
|
15
18
|
}, {
|
16
|
-
"d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1x0m3f5{font-size:var(--fontSizeBase600);}", ".
|
19
|
+
"d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1x0m3f5{font-size:var(--fontSizeBase600);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fb86gi6{line-height:var(--lineHeightBase600);}"]
|
17
20
|
});
|
18
21
|
/**
|
19
22
|
* Text wrapper component for the Title 3 typography variant
|
20
23
|
*/
|
21
24
|
|
22
25
|
|
23
|
-
export
|
24
|
-
useStyles
|
26
|
+
export const Title3 = /*#__PURE__*/createWrapper({
|
27
|
+
useStyles,
|
28
|
+
className: title3ClassNames.root,
|
25
29
|
displayName: 'Title3'
|
26
30
|
});
|
27
31
|
//# sourceMappingURL=Title3.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/Title3/Title3.tsx"],"names":[],"mappings":"AACA,yBAA2B,gBAA3B;AACA,SAAS,aAAT,QAAgD,YAAhD;AAGA,SAAS,gBAAT,QAAiC,uBAAjC;AAEA,OAAO,MAAM,gBAAgB,GAA8B;AACzD,EAAA,IAAI,EAAE;AADmD,CAApD;AAIP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,MAAM,MAAM,gBAAwC,aAAa,CAAC;AACvE,EAAA,SADuE;AAEvE,EAAA,SAAS,EAAE,gBAAgB,CAAC,IAF2C;AAGvE,EAAA,WAAW,EAAE;AAH0D,CAAD,CAAjE","sourcesContent":["import type { FunctionComponent } from 'react';\nimport { makeStyles } from '@griffel/react';\nimport { createWrapper, TextWrapperProps } from '../wrapper';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport { TextSlots } from '../Text/Text.types';\nimport { typographyStyles } from '@fluentui/react-theme';\n\nexport const title3ClassNames: SlotClassNames<TextSlots> = {\n root: 'fui-Title3',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: typographyStyles.title3,\n});\n\n/**\n * Text wrapper component for the Title 3 typography variant\n */\nexport const Title3: FunctionComponent<TextWrapperProps> = createWrapper({\n useStyles,\n className: title3ClassNames.root,\n displayName: 'Title3',\n});\n"],"sourceRoot":"../src/"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Title3/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC","sourcesContent":["export * from './Title3';\n"]}
|
@@ -1,15 +1,18 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { mergeClasses } from '@
|
3
|
-
import {
|
2
|
+
import { mergeClasses } from '@griffel/react';
|
3
|
+
import { renderText_unstable, useText_unstable, useTextStyles_unstable } from '../Text';
|
4
4
|
export function createWrapper(options) {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
const {
|
6
|
+
useStyles,
|
7
|
+
className,
|
8
|
+
displayName
|
9
|
+
} = options;
|
10
|
+
const Wrapper = /*#__PURE__*/React.forwardRef((props, ref) => {
|
11
|
+
const styles = useStyles();
|
12
|
+
const state = useText_unstable(props, ref);
|
13
|
+
useTextStyles_unstable(state);
|
14
|
+
state.root.className = mergeClasses(className, state.root.className, styles.root, props.className);
|
15
|
+
return renderText_unstable(state);
|
13
16
|
});
|
14
17
|
Wrapper.displayName = displayName;
|
15
18
|
return Wrapper;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,YAAT,QAA6B,gBAA7B;AACA,SAAS,mBAAT,EAA8B,gBAA9B,EAAgD,sBAAhD,QAA8E,SAA9E;AAMA,OAAM,SAAU,aAAV,CAAwB,OAAxB,EAIL;AACC,QAAM;AAAE,IAAA,SAAF;AAAa,IAAA,SAAb;AAAwB,IAAA;AAAxB,MAAwC,OAA9C;AACA,QAAM,OAAO,gBAA0C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACrF,UAAM,MAAM,GAAG,SAAS,EAAxB;AACA,UAAM,KAAK,GAAG,gBAAgB,CAAC,KAAD,EAAqB,GAArB,CAA9B;AAEA,IAAA,sBAAsB,CAAC,KAAD,CAAtB;AAEA,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,SAAD,EAAY,KAAK,CAAC,IAAN,CAAW,SAAvB,EAAkC,MAAM,CAAC,IAAzC,EAA+C,KAAK,CAAC,SAArD,CAAnC;AAEA,WAAO,mBAAmB,CAAC,KAAD,CAA1B;AACD,GATsD,CAAvD;AAUA,EAAA,OAAO,CAAC,WAAR,GAAsB,WAAtB;AAEA,SAAO,OAAP;AACD","sourcesContent":["import * as React from 'react';\nimport { mergeClasses } from '@griffel/react';\nimport { renderText_unstable, useText_unstable, useTextStyles_unstable } from '../Text';\nimport type { TextProps } from '../Text';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\nexport type TextWrapperProps = Omit<TextProps, 'font' | 'size'>;\n\nexport function createWrapper(options: {\n className: string;\n displayName: string;\n useStyles: () => Record<'root', string>;\n}): React.FunctionComponent<TextWrapperProps> {\n const { useStyles, className, displayName } = options;\n const Wrapper: ForwardRefComponent<TextWrapperProps> = React.forwardRef((props, ref) => {\n const styles = useStyles();\n const state = useText_unstable(props as TextProps, ref);\n\n useTextStyles_unstable(state);\n\n state.root.className = mergeClasses(className, state.root.className, styles.root, props.className);\n\n return renderText_unstable(state);\n });\n Wrapper.displayName = displayName;\n\n return Wrapper;\n}\n"],"sourceRoot":"../src/"}
|
package/lib/index.js
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
-
export
|
2
|
-
export
|
3
|
-
export
|
4
|
-
export
|
5
|
-
export
|
6
|
-
export
|
7
|
-
export
|
8
|
-
export
|
9
|
-
export
|
10
|
-
export
|
1
|
+
export { Text, renderText_unstable, textClassNames, useTextStyles_unstable, useText_unstable } from './Text';
|
2
|
+
export { Display, displayClassNames } from './Display';
|
3
|
+
export { LargeTitle, largeTitleClassNames } from './LargeTitle';
|
4
|
+
export { Title1, title1ClassNames } from './Title1';
|
5
|
+
export { Title2, title2ClassNames } from './Title2';
|
6
|
+
export { Title3, title3ClassNames } from './Title3';
|
7
|
+
export { Subtitle1, subtitle1ClassNames } from './Subtitle1';
|
8
|
+
export { Subtitle2, subtitle2ClassNames } from './Subtitle2';
|
9
|
+
export { Body1, body1ClassNames } from './Body1';
|
10
|
+
export { Caption1, caption1ClassNames } from './Caption1';
|
11
|
+
export { Caption2, caption2ClassNames } from './Caption2';
|
11
12
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,cAAc,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE7G,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC","sourcesContent":["export { Text, renderText_unstable, textClassNames, useTextStyles_unstable, useText_unstable } from './Text';\nexport type { TextProps, TextSlots, TextState } from './Text';\nexport { Display, displayClassNames } from './Display';\nexport { LargeTitle, largeTitleClassNames } from './LargeTitle';\nexport { Title1, title1ClassNames } from './Title1';\nexport { Title2, title2ClassNames } from './Title2';\nexport { Title3, title3ClassNames } from './Title3';\nexport { Subtitle1, subtitle1ClassNames } from './Subtitle1';\nexport { Subtitle2, subtitle2ClassNames } from './Subtitle2';\nexport { Body1, body1ClassNames } from './Body1';\nexport { Caption1, caption1ClassNames } from './Caption1';\nexport { Caption2, caption2ClassNames } from './Caption2';\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["Body1.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Body1/index';\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["Caption1.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Caption1/index';\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["Caption2.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Caption2/index';\n"],"sourceRoot":"../src/"}
|
package/lib-commonjs/Display.js
CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
|
7
|
-
|
7
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
8
8
|
|
9
9
|
tslib_1.__exportStar(require("./components/Display/index"), exports);
|
10
10
|
//# sourceMappingURL=Display.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["Display.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,4BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Display/index';\n"],"sourceRoot":"../src/"}
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
|
7
|
-
|
7
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
8
8
|
|
9
9
|
tslib_1.__exportStar(require("./components/LargeTitle/index"), exports);
|
10
10
|
//# sourceMappingURL=LargeTitle.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["LargeTitle.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,+BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/LargeTitle/index';\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["Subtitle1.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,8BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Subtitle1/index';\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["Subtitle2.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,8BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Subtitle2/index';\n"],"sourceRoot":"../src/"}
|
package/lib-commonjs/Text.js
CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
|
7
|
-
|
7
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
8
8
|
|
9
9
|
tslib_1.__exportStar(require("./components/Text/index"), exports);
|
10
10
|
//# sourceMappingURL=Text.js.map
|