@fluentui/react-text 9.3.41 → 9.3.42

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 CHANGED
@@ -2,7 +2,28 @@
2
2
  "name": "@fluentui/react-text",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 11 Oct 2023 13:50:07 GMT",
5
+ "date": "Thu, 12 Oct 2023 14:52:34 GMT",
6
+ "tag": "@fluentui/react-text_v9.3.42",
7
+ "version": "9.3.42",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "bernardo.sunderhus@gmail.com",
12
+ "package": "@fluentui/react-text",
13
+ "commit": "355fd5631311dc163f32ba79655a132376089f95",
14
+ "comment": "chore: migrate from getNativeElementProps for getIntrinsicElementProps"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-text",
19
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.17",
20
+ "commit": "1a52f5b27e2f71f7257c470bc9c7552ea5e07867"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Wed, 11 Oct 2023 13:54:26 GMT",
6
27
  "tag": "@fluentui/react-text_v9.3.41",
7
28
  "version": "9.3.41",
8
29
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,22 @@
1
1
  # Change Log - @fluentui/react-text
2
2
 
3
- This log was last generated on Wed, 11 Oct 2023 13:50:07 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 12 Oct 2023 14:52:34 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.3.42](https://github.com/microsoft/fluentui/tree/@fluentui/react-text_v9.3.42)
8
+
9
+ Thu, 12 Oct 2023 14:52:34 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-text_v9.3.41..@fluentui/react-text_v9.3.42)
11
+
12
+ ### Patches
13
+
14
+ - chore: migrate from getNativeElementProps for getIntrinsicElementProps ([PR #29498](https://github.com/microsoft/fluentui/pull/29498) by bernardo.sunderhus@gmail.com)
15
+ - Bump @fluentui/react-jsx-runtime to v9.0.17 ([PR #29488](https://github.com/microsoft/fluentui/pull/29488) by beachball)
16
+
7
17
  ## [9.3.41](https://github.com/microsoft/fluentui/tree/@fluentui/react-text_v9.3.41)
8
18
 
9
- Wed, 11 Oct 2023 13:50:07 GMT
19
+ Wed, 11 Oct 2023 13:54:26 GMT
10
20
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-text_v9.3.40..@fluentui/react-text_v9.3.41)
11
21
 
12
22
  ### Patches
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps, slot } from '@fluentui/react-utilities';
2
+ import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Create the state required to render Text.
5
5
  *
@@ -10,8 +10,6 @@ import { getNativeElementProps, slot } from '@fluentui/react-utilities';
10
10
  * @param ref - reference to root HTMLElement of Text
11
11
  */ export const useText_unstable = (props, ref)=>{
12
12
  const { wrap, truncate, block, italic, underline, strikethrough, size, font, weight, align } = props;
13
- var _props_as;
14
- const as = (_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : 'span';
15
13
  const state = {
16
14
  align: align !== null && align !== void 0 ? align : 'start',
17
15
  block: block !== null && block !== void 0 ? block : false,
@@ -26,10 +24,12 @@ import { getNativeElementProps, slot } from '@fluentui/react-utilities';
26
24
  components: {
27
25
  root: 'span'
28
26
  },
29
- root: slot.always(getNativeElementProps(as, {
30
- ref,
31
- ...props,
32
- as
27
+ root: slot.always(getIntrinsicElementProps('span', {
28
+ // FIXME:
29
+ // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLHeadingElement & HTMLPreElement`
30
+ // but since it would be a breaking change to fix it, we are casting ref to it's proper type
31
+ ref: ref,
32
+ ...props
33
33
  }), {
34
34
  elementType: 'span'
35
35
  })
@@ -1 +1 @@
1
- {"version":3,"sources":["useText.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } 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: slot.always(\n getNativeElementProps(as, {\n ref,\n ...props,\n as,\n }),\n { elementType: 'span' },\n ),\n };\n\n return state;\n};\n"],"names":["React","getNativeElementProps","slot","useText_unstable","props","ref","wrap","truncate","block","italic","underline","strikethrough","size","font","weight","align","as","state","components","root","always","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AAGxE;;;;;;;;CAQC,GACD,OAAO,MAAMC,mBAAmB,CAACC,OAAkBC;IACjD,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,MAAM,EAAEC,SAAS,EAAEC,aAAa,EAAEC,IAAI,EAAEC,IAAI,EAAEC,MAAM,EAAEC,KAAK,EAAE,GAAGX;QACpFA;IAAX,MAAMY,KAAKZ,CAAAA,YAAAA,MAAMY,EAAE,cAARZ,uBAAAA,YAAY;IAEvB,MAAMa,QAAmB;QACvBF,OAAOA,kBAAAA,mBAAAA,QAAS;QAChBP,OAAOA,kBAAAA,mBAAAA,QAAS;QAChBK,MAAMA,iBAAAA,kBAAAA,OAAQ;QACdJ,QAAQA,mBAAAA,oBAAAA,SAAU;QAClBG,MAAMA,iBAAAA,kBAAAA,OAAQ;QACdD,eAAeA,0BAAAA,2BAAAA,gBAAiB;QAChCJ,UAAUA,qBAAAA,sBAAAA,WAAY;QACtBG,WAAWA,sBAAAA,uBAAAA,YAAa;QACxBI,QAAQA,mBAAAA,oBAAAA,SAAU;QAClBR,MAAMA,iBAAAA,kBAAAA,OAAQ;QAEdY,YAAY;YAAEC,MAAM;QAAO;QAE3BA,MAAMjB,KAAKkB,MAAM,CACfnB,sBAAsBe,IAAI;YACxBX;YACA,GAAGD,KAAK;YACRY;QACF,IACA;YAAEK,aAAa;QAAO;IAE1B;IAEA,OAAOJ;AACT,EAAE"}
1
+ {"version":3,"sources":["useText.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } 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\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: slot.always(\n getIntrinsicElementProps('span', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLHeadingElement & HTMLPreElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLHeadingElement & HTMLPreElement>,\n ...props,\n }),\n { elementType: 'span' },\n ),\n };\n\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","slot","useText_unstable","props","ref","wrap","truncate","block","italic","underline","strikethrough","size","font","weight","align","state","components","root","always","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAG3E;;;;;;;;CAQC,GACD,OAAO,MAAMC,mBAAmB,CAACC,OAAkBC;IACjD,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,MAAM,EAAEC,SAAS,EAAEC,aAAa,EAAEC,IAAI,EAAEC,IAAI,EAAEC,MAAM,EAAEC,KAAK,EAAE,GAAGX;IAE/F,MAAMY,QAAmB;QACvBD,OAAOA,kBAAAA,mBAAAA,QAAS;QAChBP,OAAOA,kBAAAA,mBAAAA,QAAS;QAChBK,MAAMA,iBAAAA,kBAAAA,OAAQ;QACdJ,QAAQA,mBAAAA,oBAAAA,SAAU;QAClBG,MAAMA,iBAAAA,kBAAAA,OAAQ;QACdD,eAAeA,0BAAAA,2BAAAA,gBAAiB;QAChCJ,UAAUA,qBAAAA,sBAAAA,WAAY;QACtBG,WAAWA,sBAAAA,uBAAAA,YAAa;QACxBI,QAAQA,mBAAAA,oBAAAA,SAAU;QAClBR,MAAMA,iBAAAA,kBAAAA,OAAQ;QAEdW,YAAY;YAAEC,MAAM;QAAO;QAE3BA,MAAMhB,KAAKiB,MAAM,CACflB,yBAAyB,QAAQ;YAC/B,SAAS;YACT,iGAAiG;YACjG,4FAA4F;YAC5FI,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAEgB,aAAa;QAAO;IAE1B;IAEA,OAAOJ;AACT,EAAE"}
@@ -13,8 +13,6 @@ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
13
  const _reactutilities = require("@fluentui/react-utilities");
14
14
  const useText_unstable = (props, ref)=>{
15
15
  const { wrap, truncate, block, italic, underline, strikethrough, size, font, weight, align } = props;
16
- var _props_as;
17
- const as = (_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : 'span';
18
16
  const state = {
19
17
  align: align !== null && align !== void 0 ? align : 'start',
20
18
  block: block !== null && block !== void 0 ? block : false,
@@ -29,10 +27,12 @@ const useText_unstable = (props, ref)=>{
29
27
  components: {
30
28
  root: 'span'
31
29
  },
32
- root: _reactutilities.slot.always((0, _reactutilities.getNativeElementProps)(as, {
33
- ref,
34
- ...props,
35
- as
30
+ root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('span', {
31
+ // FIXME:
32
+ // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLHeadingElement & HTMLPreElement`
33
+ // but since it would be a breaking change to fix it, we are casting ref to it's proper type
34
+ ref: ref,
35
+ ...props
36
36
  }), {
37
37
  elementType: 'span'
38
38
  })
@@ -1 +1 @@
1
- {"version":3,"sources":["useText.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\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 */ export const useText_unstable = (props, ref)=>{\n const { wrap, truncate, block, italic, underline, strikethrough, size, font, weight, align } = props;\n var _props_as;\n const as = (_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : 'span';\n const state = {\n align: align !== null && align !== void 0 ? align : 'start',\n block: block !== null && block !== void 0 ? block : false,\n font: font !== null && font !== void 0 ? font : 'base',\n italic: italic !== null && italic !== void 0 ? italic : false,\n size: size !== null && size !== void 0 ? size : 300,\n strikethrough: strikethrough !== null && strikethrough !== void 0 ? strikethrough : false,\n truncate: truncate !== null && truncate !== void 0 ? truncate : false,\n underline: underline !== null && underline !== void 0 ? underline : false,\n weight: weight !== null && weight !== void 0 ? weight : 'regular',\n wrap: wrap !== null && wrap !== void 0 ? wrap : true,\n components: {\n root: 'span'\n },\n root: slot.always(getNativeElementProps(as, {\n ref,\n ...props,\n as\n }), {\n elementType: 'span'\n })\n };\n return state;\n};\n"],"names":["useText_unstable","props","ref","wrap","truncate","block","italic","underline","strikethrough","size","font","weight","align","_props_as","as","state","components","root","slot","always","getNativeElementProps","elementType"],"mappings":";;;;+BAUiBA;;;eAAAA;;;;iEAVM;gCACqB;AASjC,MAAMA,mBAAmB,CAACC,OAAOC;IACxC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,MAAM,EAAEC,SAAS,EAAEC,aAAa,EAAEC,IAAI,EAAEC,IAAI,EAAEC,MAAM,EAAEC,KAAK,EAAE,GAAGX;IAC/F,IAAIY;IACJ,MAAMC,KAAK,AAACD,CAAAA,YAAYZ,MAAMa,EAAE,AAAD,MAAO,QAAQD,cAAc,KAAK,IAAIA,YAAY;IACjF,MAAME,QAAQ;QACVH,OAAOA,UAAU,QAAQA,UAAU,KAAK,IAAIA,QAAQ;QACpDP,OAAOA,UAAU,QAAQA,UAAU,KAAK,IAAIA,QAAQ;QACpDK,MAAMA,SAAS,QAAQA,SAAS,KAAK,IAAIA,OAAO;QAChDJ,QAAQA,WAAW,QAAQA,WAAW,KAAK,IAAIA,SAAS;QACxDG,MAAMA,SAAS,QAAQA,SAAS,KAAK,IAAIA,OAAO;QAChDD,eAAeA,kBAAkB,QAAQA,kBAAkB,KAAK,IAAIA,gBAAgB;QACpFJ,UAAUA,aAAa,QAAQA,aAAa,KAAK,IAAIA,WAAW;QAChEG,WAAWA,cAAc,QAAQA,cAAc,KAAK,IAAIA,YAAY;QACpEI,QAAQA,WAAW,QAAQA,WAAW,KAAK,IAAIA,SAAS;QACxDR,MAAMA,SAAS,QAAQA,SAAS,KAAK,IAAIA,OAAO;QAChDa,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAACN,IAAI;YACxCZ;YACA,GAAGD,KAAK;YACRa;QACJ,IAAI;YACAO,aAAa;QACjB;IACJ;IACA,OAAON;AACX"}
1
+ {"version":3,"sources":["useText.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\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 */ export const useText_unstable = (props, ref)=>{\n const { wrap, truncate, block, italic, underline, strikethrough, size, font, weight, align } = props;\n const state = {\n align: align !== null && align !== void 0 ? align : 'start',\n block: block !== null && block !== void 0 ? block : false,\n font: font !== null && font !== void 0 ? font : 'base',\n italic: italic !== null && italic !== void 0 ? italic : false,\n size: size !== null && size !== void 0 ? size : 300,\n strikethrough: strikethrough !== null && strikethrough !== void 0 ? strikethrough : false,\n truncate: truncate !== null && truncate !== void 0 ? truncate : false,\n underline: underline !== null && underline !== void 0 ? underline : false,\n weight: weight !== null && weight !== void 0 ? weight : 'regular',\n wrap: wrap !== null && wrap !== void 0 ? wrap : true,\n components: {\n root: 'span'\n },\n root: slot.always(getIntrinsicElementProps('span', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLHeadingElement & HTMLPreElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref,\n ...props\n }), {\n elementType: 'span'\n })\n };\n return state;\n};\n"],"names":["useText_unstable","props","ref","wrap","truncate","block","italic","underline","strikethrough","size","font","weight","align","state","components","root","slot","always","getIntrinsicElementProps","elementType"],"mappings":";;;;+BAUiBA;;;eAAAA;;;;iEAVM;gCACwB;AASpC,MAAMA,mBAAmB,CAACC,OAAOC;IACxC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,MAAM,EAAEC,SAAS,EAAEC,aAAa,EAAEC,IAAI,EAAEC,IAAI,EAAEC,MAAM,EAAEC,KAAK,EAAE,GAAGX;IAC/F,MAAMY,QAAQ;QACVD,OAAOA,UAAU,QAAQA,UAAU,KAAK,IAAIA,QAAQ;QACpDP,OAAOA,UAAU,QAAQA,UAAU,KAAK,IAAIA,QAAQ;QACpDK,MAAMA,SAAS,QAAQA,SAAS,KAAK,IAAIA,OAAO;QAChDJ,QAAQA,WAAW,QAAQA,WAAW,KAAK,IAAIA,SAAS;QACxDG,MAAMA,SAAS,QAAQA,SAAS,KAAK,IAAIA,OAAO;QAChDD,eAAeA,kBAAkB,QAAQA,kBAAkB,KAAK,IAAIA,gBAAgB;QACpFJ,UAAUA,aAAa,QAAQA,aAAa,KAAK,IAAIA,WAAW;QAChEG,WAAWA,cAAc,QAAQA,cAAc,KAAK,IAAIA,YAAY;QACpEI,QAAQA,WAAW,QAAQA,WAAW,KAAK,IAAIA,SAAS;QACxDR,MAAMA,SAAS,QAAQA,SAAS,KAAK,IAAIA,OAAO;QAChDW,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAAC,QAAQ;YAC/C,SAAS;YACT,iGAAiG;YACjG,4FAA4F;YAC5FhB,KAAKA;YACL,GAAGD,KAAK;QACZ,IAAI;YACAkB,aAAa;QACjB;IACJ;IACA,OAAON;AACX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-text",
3
- "version": "9.3.41",
3
+ "version": "9.3.42",
4
4
  "description": "Text is a typography and styling abstraction component that can be used to ensure the consistency of all text across your application.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -36,7 +36,7 @@
36
36
  "@fluentui/react-shared-contexts": "^9.10.0",
37
37
  "@fluentui/react-theme": "^9.1.14",
38
38
  "@fluentui/react-utilities": "^9.15.0",
39
- "@fluentui/react-jsx-runtime": "^9.0.16",
39
+ "@fluentui/react-jsx-runtime": "^9.0.17",
40
40
  "@griffel/react": "^1.5.14",
41
41
  "@swc/helpers": "^0.5.1"
42
42
  },