@fluentui/react-textarea 9.3.3 → 9.3.5

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.
Files changed (63) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +73 -1
  3. package/CHANGELOG.md +27 -2
  4. package/lib/Textarea.js.map +1 -1
  5. package/lib/TextareaField.js.map +1 -1
  6. package/lib/components/Textarea/Textarea.js.map +1 -1
  7. package/lib/components/Textarea/Textarea.types.js +1 -1
  8. package/lib/components/Textarea/Textarea.types.js.map +1 -1
  9. package/lib/components/Textarea/index.js.map +1 -1
  10. package/lib/components/Textarea/renderTextarea.js +1 -5
  11. package/lib/components/Textarea/renderTextarea.js.map +1 -1
  12. package/lib/components/Textarea/useTextarea.js +3 -2
  13. package/lib/components/Textarea/useTextarea.js.map +1 -1
  14. package/lib/components/Textarea/useTextareaStyles.js.map +1 -1
  15. package/lib/components/TextareaField/TextareaField.js +1 -2
  16. package/lib/components/TextareaField/TextareaField.js.map +1 -1
  17. package/lib/components/TextareaField/index.js.map +1 -1
  18. package/lib/index.js.map +1 -1
  19. package/lib-commonjs/Textarea.js +5 -4
  20. package/lib-commonjs/Textarea.js.map +1 -1
  21. package/lib-commonjs/TextareaField.js +5 -4
  22. package/lib-commonjs/TextareaField.js.map +1 -1
  23. package/lib-commonjs/components/Textarea/Textarea.js +19 -20
  24. package/lib-commonjs/components/Textarea/Textarea.js.map +1 -1
  25. package/lib-commonjs/components/Textarea/Textarea.types.js +5 -2
  26. package/lib-commonjs/components/Textarea/Textarea.types.js.map +1 -1
  27. package/lib-commonjs/components/Textarea/index.js +9 -8
  28. package/lib-commonjs/components/Textarea/index.js.map +1 -1
  29. package/lib-commonjs/components/Textarea/renderTextarea.js +13 -20
  30. package/lib-commonjs/components/Textarea/renderTextarea.js.map +1 -1
  31. package/lib-commonjs/components/Textarea/useTextarea.js +61 -67
  32. package/lib-commonjs/components/Textarea/useTextarea.js.map +1 -1
  33. package/lib-commonjs/components/Textarea/useTextareaStyles.js +744 -314
  34. package/lib-commonjs/components/Textarea/useTextareaStyles.js.map +1 -1
  35. package/lib-commonjs/components/TextareaField/TextareaField.js +17 -11
  36. package/lib-commonjs/components/TextareaField/TextareaField.js.map +1 -1
  37. package/lib-commonjs/components/TextareaField/index.js +5 -4
  38. package/lib-commonjs/components/TextareaField/index.js.map +1 -1
  39. package/lib-commonjs/index.js +21 -49
  40. package/lib-commonjs/index.js.map +1 -1
  41. package/package.json +9 -8
  42. package/lib-amd/Textarea.js +0 -6
  43. package/lib-amd/Textarea.js.map +0 -1
  44. package/lib-amd/TextareaField.js +0 -6
  45. package/lib-amd/TextareaField.js.map +0 -1
  46. package/lib-amd/components/Textarea/Textarea.js +0 -17
  47. package/lib-amd/components/Textarea/Textarea.js.map +0 -1
  48. package/lib-amd/components/Textarea/Textarea.types.js +0 -5
  49. package/lib-amd/components/Textarea/Textarea.types.js.map +0 -1
  50. package/lib-amd/components/Textarea/index.js +0 -10
  51. package/lib-amd/components/Textarea/index.js.map +0 -1
  52. package/lib-amd/components/Textarea/renderTextarea.js +0 -15
  53. package/lib-amd/components/Textarea/renderTextarea.js.map +0 -1
  54. package/lib-amd/components/Textarea/useTextarea.js +0 -61
  55. package/lib-amd/components/Textarea/useTextarea.js.map +0 -1
  56. package/lib-amd/components/Textarea/useTextareaStyles.js +0 -131
  57. package/lib-amd/components/Textarea/useTextareaStyles.js.map +0 -1
  58. package/lib-amd/components/TextareaField/TextareaField.js +0 -10
  59. package/lib-amd/components/TextareaField/TextareaField.js.map +0 -1
  60. package/lib-amd/components/TextareaField/index.js +0 -6
  61. package/lib-amd/components/TextareaField/index.js.map +0 -1
  62. package/lib-amd/index.js +0 -13
  63. package/lib-amd/index.js.map +0 -1
package/.swcrc ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/swcrc",
3
+ "exclude": [
4
+ "/testing",
5
+ "/**/*.cy.ts",
6
+ "/**/*.cy.tsx",
7
+ "/**/*.spec.ts",
8
+ "/**/*.spec.tsx",
9
+ "/**/*.test.ts",
10
+ "/**/*.test.tsx"
11
+ ],
12
+ "jsc": {
13
+ "parser": {
14
+ "syntax": "typescript",
15
+ "tsx": true,
16
+ "decorators": false,
17
+ "dynamicImport": false
18
+ },
19
+ "externalHelpers": true,
20
+ "transform": {
21
+ "react": {
22
+ "runtime": "classic",
23
+ "useSpread": true
24
+ }
25
+ },
26
+ "target": "es2019"
27
+ },
28
+ "minify": false,
29
+ "sourceMaps": true
30
+ }
package/CHANGELOG.json CHANGED
@@ -2,7 +2,79 @@
2
2
  "name": "@fluentui/react-textarea",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 15 Mar 2023 10:17:05 GMT",
5
+ "date": "Tue, 21 Mar 2023 21:18:23 GMT",
6
+ "tag": "@fluentui/react-textarea_v9.3.5",
7
+ "version": "9.3.5",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "tristan.watanabe@gmail.com",
12
+ "package": "@fluentui/react-textarea",
13
+ "commit": "ead1c6d4c2ac3f3596b62b8cbc07b0a03041f11f",
14
+ "comment": "fix: add node field to package.json exports map."
15
+ },
16
+ {
17
+ "author": "tristan.watanabe@gmail.com",
18
+ "package": "@fluentui/react-textarea",
19
+ "commit": "2fac1a139149bd13b76b1306207bc988dca9c72c",
20
+ "comment": "chore: migrate to swc transpilation approach."
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-textarea",
25
+ "comment": "Bump @fluentui/react-field to v9.0.0-alpha.27",
26
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-textarea",
31
+ "comment": "Bump @fluentui/react-shared-contexts to v9.3.2",
32
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-textarea",
37
+ "comment": "Bump @fluentui/react-theme to v9.1.7",
38
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-textarea",
43
+ "comment": "Bump @fluentui/react-utilities to v9.7.2",
44
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui/react-textarea",
49
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.20",
50
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
51
+ }
52
+ ]
53
+ }
54
+ },
55
+ {
56
+ "date": "Thu, 16 Mar 2023 14:36:59 GMT",
57
+ "tag": "@fluentui/react-textarea_v9.3.4",
58
+ "version": "9.3.4",
59
+ "comments": {
60
+ "patch": [
61
+ {
62
+ "author": "beachball",
63
+ "package": "@fluentui/react-textarea",
64
+ "comment": "Bump @fluentui/react-field to v9.0.0-alpha.26",
65
+ "commit": "e7dcadf7cabae6bc6811ca04a630e7d850388f81"
66
+ },
67
+ {
68
+ "author": "beachball",
69
+ "package": "@fluentui/react-textarea",
70
+ "comment": "Bump @fluentui/react-utilities to v9.7.1",
71
+ "commit": "e7dcadf7cabae6bc6811ca04a630e7d850388f81"
72
+ }
73
+ ]
74
+ }
75
+ },
76
+ {
77
+ "date": "Wed, 15 Mar 2023 10:19:53 GMT",
6
78
  "tag": "@fluentui/react-textarea_v9.3.3",
7
79
  "version": "9.3.3",
8
80
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,37 @@
1
1
  # Change Log - @fluentui/react-textarea
2
2
 
3
- This log was last generated on Wed, 15 Mar 2023 10:17:05 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 21 Mar 2023 21:18:23 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.3.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.3.5)
8
+
9
+ Tue, 21 Mar 2023 21:18:23 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-textarea_v9.3.4..@fluentui/react-textarea_v9.3.5)
11
+
12
+ ### Patches
13
+
14
+ - fix: add node field to package.json exports map. ([PR #27154](https://github.com/microsoft/fluentui/pull/27154) by tristan.watanabe@gmail.com)
15
+ - chore: migrate to swc transpilation approach. ([PR #27250](https://github.com/microsoft/fluentui/pull/27250) by tristan.watanabe@gmail.com)
16
+ - Bump @fluentui/react-field to v9.0.0-alpha.27 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
17
+ - Bump @fluentui/react-shared-contexts to v9.3.2 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
18
+ - Bump @fluentui/react-theme to v9.1.7 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
19
+ - Bump @fluentui/react-utilities to v9.7.2 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
20
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.20 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
21
+
22
+ ## [9.3.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.3.4)
23
+
24
+ Thu, 16 Mar 2023 14:36:59 GMT
25
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-textarea_v9.3.3..@fluentui/react-textarea_v9.3.4)
26
+
27
+ ### Patches
28
+
29
+ - Bump @fluentui/react-field to v9.0.0-alpha.26 ([PR #27229](https://github.com/microsoft/fluentui/pull/27229) by beachball)
30
+ - Bump @fluentui/react-utilities to v9.7.1 ([PR #27229](https://github.com/microsoft/fluentui/pull/27229) by beachball)
31
+
7
32
  ## [9.3.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.3.3)
8
33
 
9
- Wed, 15 Mar 2023 10:17:05 GMT
34
+ Wed, 15 Mar 2023 10:19:53 GMT
10
35
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-textarea_v9.3.2..@fluentui/react-textarea_v9.3.3)
11
36
 
12
37
  ### Patches
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.js","sourceRoot":"../src/","sources":["packages/react-components/react-textarea/src/Textarea.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC","sourcesContent":["export * from './components/Textarea/index';\n"]}
1
+ {"version":3,"names":[],"sources":["../src/Textarea.ts"],"sourcesContent":["export * from './components/Textarea/index';\n"],"mappings":"AAAA,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextareaField.js","sourceRoot":"../src/","sources":["packages/react-components/react-textarea/src/TextareaField.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './components/TextareaField/index';\n"]}
1
+ {"version":3,"names":[],"sources":["../src/TextareaField.ts"],"sourcesContent":["export * from './components/TextareaField/index';\n"],"mappings":"AAAA,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","renderTextarea_unstable","useTextarea_unstable","useTextareaStyles_unstable","useCustomStyleHooks_unstable","Textarea","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../src/packages/react-components/react-textarea/src/components/Textarea/Textarea.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderTextarea_unstable } from './renderTextarea';\nimport { useTextarea_unstable } from './useTextarea';\nimport { useTextareaStyles_unstable } from './useTextareaStyles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { TextareaProps } from './Textarea.types';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The Textarea component allows the user to enter and edit text in multiple lines.\n */\nexport const Textarea: ForwardRefComponent<TextareaProps> = React.forwardRef((props, ref) => {\n const state = useTextarea_unstable(props, ref);\n\n useTextareaStyles_unstable(state);\n\n const { useTextareaStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderTextarea_unstable(state);\n});\n\nTextarea.displayName = 'Textarea';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,uBAAuB,QAAQ,kBAAkB;AAC1D,SAASC,oBAAoB,QAAQ,eAAe;AACpD,SAASC,0BAA0B,QAAQ,qBAAqB;AAGhE,SAASC,4BAA4B,QAAQ,iCAAiC;AAE9E;;;AAGA,OAAO,MAAMC,QAAQ,gBAAuCL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC1F,MAAMC,KAAK,GAAGP,oBAAoB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAE9CL,0BAA0B,CAACM,KAAK,CAAC;EAEjC,MAAM;IAAEN,0BAA0B,EAAEO;EAAe,CAAE,GAAGN,4BAA4B,EAAE;EACtFM,eAAe,CAACD,KAAK,CAAC;EAEtB,OAAOR,uBAAuB,CAACQ,KAAK,CAAC;AACvC,CAAC,CAAC;AAEFJ,QAAQ,CAACM,WAAW,GAAG,UAAU"}
1
+ {"version":3,"names":["React","renderTextarea_unstable","useTextarea_unstable","useTextareaStyles_unstable","useCustomStyleHooks_unstable","Textarea","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../../../src/components/Textarea/Textarea.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderTextarea_unstable } from './renderTextarea';\nimport { useTextarea_unstable } from './useTextarea';\nimport { useTextareaStyles_unstable } from './useTextareaStyles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { TextareaProps } from './Textarea.types';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The Textarea component allows the user to enter and edit text in multiple lines.\n */\nexport const Textarea: ForwardRefComponent<TextareaProps> = React.forwardRef((props, ref) => {\n const state = useTextarea_unstable(props, ref);\n\n useTextareaStyles_unstable(state);\n\n const { useTextareaStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderTextarea_unstable(state);\n});\n\nTextarea.displayName = 'Textarea';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,uBAAuB,QAAQ;AACxC,SAASC,oBAAoB,QAAQ;AACrC,SAASC,0BAA0B,QAAQ;AAG3C,SAASC,4BAA4B,QAAQ;AAE7C;;;AAGA,OAAO,MAAMC,QAAA,gBAA+CL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EAC3F,MAAMC,KAAA,GAAQP,oBAAA,CAAqBK,KAAA,EAAOC,GAAA;EAE1CL,0BAAA,CAA2BM,KAAA;EAE3B,MAAM;IAAEN,0BAAA,EAA4BO;EAAe,CAAE,GAAGN,4BAAA;EACxDM,eAAA,CAAgBD,KAAA;EAEhB,OAAOR,uBAAA,CAAwBQ,KAAA;AACjC;AAEAJ,QAAA,CAASM,WAAW,GAAG"}
@@ -1,2 +1,2 @@
1
- export {};
1
+ import * as React from 'react';
2
2
  //# sourceMappingURL=Textarea.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-textarea/src/components/Textarea/Textarea.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TextareaSlots = {\n /**\n * Wrapper element used for displaying the borders for Textarea. This wrapper is needed due to the focus\n * indicator border animation. For more information, see Spec.md\n *\n * The root only receives `className` and `style`. All other props are applied to the `textarea` slot.\n */\n root: NonNullable<Slot<'span'>>;\n\n /**\n * The `<textarea>` element. This is the primary slot, all native props and ref are applied to this slot.\n */\n textarea: NonNullable<Slot<'textarea'>>;\n};\n\n/**\n * Textarea Props\n */\nexport type TextareaProps = Omit<\n ComponentProps<Partial<TextareaSlots>, 'textarea'>,\n 'defaultValue' | 'onChange' | 'size' | 'value'\n> & {\n /**\n * Styling the Textarea should use.\n *\n * @default outline\n *\n * Note: 'filled-darker-shadow' and 'filled-lighter-shadow' are deprecated and will be removed in the future.\n */\n appearance?: 'outline' | 'filled-darker' | 'filled-lighter' | 'filled-darker-shadow' | 'filled-lighter-shadow';\n\n /**\n * The default value of the Textarea.\n */\n defaultValue?: string;\n\n /**\n * Callback for when the user changes the value.\n */\n onChange?: (ev: React.ChangeEvent<HTMLTextAreaElement>, data: TextareaOnChangeData) => void;\n\n /**\n * Which direction the Textarea is allowed to be resized.\n *\n * @default none\n */\n resize?: 'none' | 'horizontal' | 'vertical' | 'both';\n\n /**\n * Size of the Textarea.\n *\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * The value of the Textarea.\n */\n value?: string;\n};\n\n/**\n * State used in rendering Textarea\n */\nexport type TextareaState = ComponentState<TextareaSlots> &\n Required<Pick<TextareaProps, 'appearance' | 'resize' | 'size'>>;\n\n/**\n * Data passed to the `onChange` callback when the textarea's value changes.\n */\nexport type TextareaOnChangeData = {\n value: string;\n};\n"]}
1
+ {"version":3,"names":["React"],"sources":["../../../src/components/Textarea/Textarea.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TextareaSlots = {\n /**\n * Wrapper element used for displaying the borders for Textarea. This wrapper is needed due to the focus\n * indicator border animation. For more information, see Spec.md\n *\n * The root only receives `className` and `style`. All other props are applied to the `textarea` slot.\n */\n root: NonNullable<Slot<'span'>>;\n\n /**\n * The `<textarea>` element. This is the primary slot, all native props and ref are applied to this slot.\n */\n textarea: NonNullable<Slot<'textarea'>>;\n};\n\n/**\n * Textarea Props\n */\nexport type TextareaProps = Omit<\n ComponentProps<Partial<TextareaSlots>, 'textarea'>,\n 'defaultValue' | 'onChange' | 'size' | 'value'\n> & {\n /**\n * Styling the Textarea should use.\n *\n * @default outline\n *\n * Note: 'filled-darker-shadow' and 'filled-lighter-shadow' are deprecated and will be removed in the future.\n */\n appearance?: 'outline' | 'filled-darker' | 'filled-lighter' | 'filled-darker-shadow' | 'filled-lighter-shadow';\n\n /**\n * The default value of the Textarea.\n */\n defaultValue?: string;\n\n /**\n * Callback for when the user changes the value.\n */\n onChange?: (ev: React.ChangeEvent<HTMLTextAreaElement>, data: TextareaOnChangeData) => void;\n\n /**\n * Which direction the Textarea is allowed to be resized.\n *\n * @default none\n */\n resize?: 'none' | 'horizontal' | 'vertical' | 'both';\n\n /**\n * Size of the Textarea.\n *\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * The value of the Textarea.\n */\n value?: string;\n};\n\n/**\n * State used in rendering Textarea\n */\nexport type TextareaState = ComponentState<TextareaSlots> &\n Required<Pick<TextareaProps, 'appearance' | 'resize' | 'size'>>;\n\n/**\n * Data passed to the `onChange` callback when the textarea's value changes.\n */\nexport type TextareaOnChangeData = {\n value: string;\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-textarea/src/components/Textarea/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC","sourcesContent":["export * from './Textarea';\nexport * from './Textarea.types';\nexport * from './renderTextarea';\nexport * from './useTextarea';\nexport * from './useTextareaStyles';\n"]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/Textarea/index.ts"],"sourcesContent":["export * from './Textarea';\nexport * from './Textarea.types';\nexport * from './renderTextarea';\nexport * from './useTextarea';\nexport * from './useTextareaStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
@@ -8,10 +8,6 @@ export const renderTextarea_unstable = state => {
8
8
  slots,
9
9
  slotProps
10
10
  } = getSlots(state);
11
- return /*#__PURE__*/React.createElement(slots.root, {
12
- ...slotProps.root
13
- }, /*#__PURE__*/React.createElement(slots.textarea, {
14
- ...slotProps.textarea
15
- }));
11
+ return /*#__PURE__*/React.createElement(slots.root, slotProps.root, /*#__PURE__*/React.createElement(slots.textarea, slotProps.textarea));
16
12
  };
17
13
  //# sourceMappingURL=renderTextarea.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","getSlots","renderTextarea_unstable","state","slots","slotProps","createElement","root","textarea"],"sources":["../src/packages/react-components/react-textarea/src/components/Textarea/renderTextarea.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TextareaState, TextareaSlots } from './Textarea.types';\n\n/**\n * Render the final JSX of Textarea\n */\nexport const renderTextarea_unstable = (state: TextareaState) => {\n const { slots, slotProps } = getSlots<TextareaSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.textarea {...slotProps.textarea} />\n </slots.root>\n );\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,uBAAuB,GAAIC,KAAoB,IAAI;EAC9D,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAgBE,KAAK,CAAC;EAE3D,oBACEH,KAAA,CAAAM,aAAA,CAACF,KAAK,CAACG,IAAI;IAAA,GAAKF,SAAS,CAACE;EAAI,gBAC5BP,KAAA,CAAAM,aAAA,CAACF,KAAK,CAACI,QAAQ;IAAA,GAAKH,SAAS,CAACG;EAAQ,EAAI,CAC/B;AAEjB,CAAC"}
1
+ {"version":3,"names":["React","getSlots","renderTextarea_unstable","state","slots","slotProps","createElement","root","textarea"],"sources":["../../../src/components/Textarea/renderTextarea.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TextareaState, TextareaSlots } from './Textarea.types';\n\n/**\n * Render the final JSX of Textarea\n */\nexport const renderTextarea_unstable = (state: TextareaState) => {\n const { slots, slotProps } = getSlots<TextareaSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.textarea {...slotProps.textarea} />\n </slots.root>\n );\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,QAAQ,QAAQ;AAGzB;;;AAGA,OAAO,MAAMC,uBAAA,GAA2BC,KAAA,IAAyB;EAC/D,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGJ,QAAA,CAAwBE,KAAA;EAErD,oBACEH,KAAA,CAAAM,aAAA,CAACF,KAAA,CAAMG,IAAI,EAAKF,SAAA,CAAUE,IAAI,eAC5BP,KAAA,CAAAM,aAAA,CAACF,KAAA,CAAMI,QAAQ,EAAKH,SAAA,CAAUG,QAAQ;AAG5C"}
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  import { getPartitionedNativeProps, resolveShorthand, useControllableState, useEventCallback } from '@fluentui/react-utilities';
2
3
  import { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';
3
4
  /**
@@ -10,11 +11,11 @@ import { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-co
10
11
  * @param ref - reference to root HTMLElement of Textarea
11
12
  */
12
13
  export const useTextarea_unstable = (props, ref) => {
13
- var _a;
14
14
  const overrides = useOverrides();
15
+ var _overrides_inputDefaultAppearance;
15
16
  const {
16
17
  size = 'medium',
17
- appearance = (_a = overrides.inputDefaultAppearance) !== null && _a !== void 0 ? _a : 'outline',
18
+ appearance = (_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline',
18
19
  resize = 'none',
19
20
  onChange
20
21
  } = props;
@@ -1 +1 @@
1
- {"version":3,"names":["getPartitionedNativeProps","resolveShorthand","useControllableState","useEventCallback","useOverrides_unstable","useOverrides","useTextarea_unstable","props","ref","overrides","size","appearance","_a","inputDefaultAppearance","resize","onChange","process","env","NODE_ENV","console","error","value","setValue","state","defaultState","defaultValue","initialState","undefined","nativeProps","primarySlotTagName","excludedPropNames","components","root","textarea","required","defaultProps","primary","ev","newValue","target"],"sources":["../src/packages/react-components/react-textarea/src/components/Textarea/useTextarea.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getPartitionedNativeProps,\n resolveShorthand,\n useControllableState,\n useEventCallback,\n} from '@fluentui/react-utilities';\nimport type { TextareaProps, TextareaState } from './Textarea.types';\nimport { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';\n\n/**\n * Create the state required to render Textarea.\n *\n * The returned state can be modified with hooks such as useTextareaStyles_unstable,\n * before being passed to renderTextarea_unstable.\n *\n * @param props - props from this instance of Textarea\n * @param ref - reference to root HTMLElement of Textarea\n */\nexport const useTextarea_unstable = (props: TextareaProps, ref: React.Ref<HTMLTextAreaElement>): TextareaState => {\n const overrides = useOverrides();\n\n const {\n size = 'medium',\n appearance = overrides.inputDefaultAppearance ?? 'outline',\n resize = 'none',\n onChange,\n } = props;\n\n if (\n process.env.NODE_ENV !== 'production' &&\n (appearance === 'filled-darker-shadow' || appearance === 'filled-lighter-shadow')\n ) {\n // eslint-disable-next-line no-console\n console.error(\n \"The 'filled-darker-shadow' and 'filled-lighter-shadow' appearances are deprecated and will be removed in the\" +\n ' future.',\n );\n }\n\n const [value, setValue] = useControllableState({\n state: props.value,\n defaultState: props.defaultValue,\n initialState: undefined,\n });\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'textarea',\n excludedPropNames: ['onChange', 'value', 'defaultValue'],\n });\n\n const state: TextareaState = {\n size,\n appearance,\n resize,\n components: {\n root: 'span',\n textarea: 'textarea',\n },\n textarea: resolveShorthand(props.textarea, {\n required: true,\n defaultProps: {\n ref,\n ...nativeProps.primary,\n },\n }),\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: nativeProps.root,\n }),\n };\n\n state.textarea.value = value;\n state.textarea.onChange = useEventCallback(ev => {\n const newValue = ev.target.value;\n onChange?.(ev, { value: newValue });\n setValue(newValue);\n });\n\n return state;\n};\n"],"mappings":"AACA,SACEA,yBAAyB,EACzBC,gBAAgB,EAChBC,oBAAoB,EAC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B,gBAAgB,CAACM,KAAK,CAACyB,IAAI,EAAE;MACjCE,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAEP,WAAW,CAACI;KAC3B;GACF;EAEDT,KAAK,CAACU,QAAQ,CAACZ,KAAK,GAAGA,KAAK;EAC5BE,KAAK,CAACU,QAAQ,CAAClB,QAAQ,GAAGZ,gBAAgB,CAACkC,EAAE,IAAG;IAC9C,MAAMC,QAAQ,GAAGD,EAAE,CAACE,MAAM,CAAClB,KAAK;IAChCN,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAGsB,EAAE,EAAE;MAAEhB,KAAK,EAAEiB;IAAQ,CAAE,CAAC;IACnChB,QAAQ,CAACgB,QAAQ,CAAC;EACpB,CAAC,CAAC;EAEF,OAAOf,KAAK;AACd,CAAC"}
1
+ {"version":3,"names":["React","getPartitionedNativeProps","resolveShorthand","useControllableState","useEventCallback","useOverrides_unstable","useOverrides","useTextarea_unstable","props","ref","overrides","_overrides_inputDefaultAppearance","size","appearance","inputDefaultAppearance","resize","onChange","process","env","NODE_ENV","console","error","value","setValue","state","defaultState","defaultValue","initialState","undefined","nativeProps","primarySlotTagName","excludedPropNames","components","root","textarea","required","defaultProps","primary","ev","newValue","target"],"sources":["../../../src/components/Textarea/useTextarea.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getPartitionedNativeProps,\n resolveShorthand,\n useControllableState,\n useEventCallback,\n} from '@fluentui/react-utilities';\nimport type { TextareaProps, TextareaState } from './Textarea.types';\nimport { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';\n\n/**\n * Create the state required to render Textarea.\n *\n * The returned state can be modified with hooks such as useTextareaStyles_unstable,\n * before being passed to renderTextarea_unstable.\n *\n * @param props - props from this instance of Textarea\n * @param ref - reference to root HTMLElement of Textarea\n */\nexport const useTextarea_unstable = (props: TextareaProps, ref: React.Ref<HTMLTextAreaElement>): TextareaState => {\n const overrides = useOverrides();\n\n const {\n size = 'medium',\n appearance = overrides.inputDefaultAppearance ?? 'outline',\n resize = 'none',\n onChange,\n } = props;\n\n if (\n process.env.NODE_ENV !== 'production' &&\n (appearance === 'filled-darker-shadow' || appearance === 'filled-lighter-shadow')\n ) {\n // eslint-disable-next-line no-console\n console.error(\n \"The 'filled-darker-shadow' and 'filled-lighter-shadow' appearances are deprecated and will be removed in the\" +\n ' future.',\n );\n }\n\n const [value, setValue] = useControllableState({\n state: props.value,\n defaultState: props.defaultValue,\n initialState: undefined,\n });\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'textarea',\n excludedPropNames: ['onChange', 'value', 'defaultValue'],\n });\n\n const state: TextareaState = {\n size,\n appearance,\n resize,\n components: {\n root: 'span',\n textarea: 'textarea',\n },\n textarea: resolveShorthand(props.textarea, {\n required: true,\n defaultProps: {\n ref,\n ...nativeProps.primary,\n },\n }),\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: nativeProps.root,\n }),\n };\n\n state.textarea.value = value;\n state.textarea.onChange = useEventCallback(ev => {\n const newValue = ev.target.value;\n onChange?.(ev, { value: newValue });\n setValue(newValue);\n });\n\n return state;\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SACEC,yBAAyB,EACzBC,gBAAgB,EAChBC,oBAAoB,EACpBC,gBAAgB,QACX;AAEP,SAASC,qBAAA,IAAyBC,YAAY,QAAQ;AAEtD;;;;;;;;;AASA,OAAO,MAAMC,oBAAA,GAAuBA,CAACC,KAAA,EAAsBC,GAAA,KAAuD;EAChH,MAAMC,SAAA,GAAYJ,YAAA;MAIHK,iCAAA;EAFf,MAAM;IACJC,IAAA,GAAO;IACPC,UAAA,GAAa,CAAAF,iCAAA,GAAAD,SAAA,CAAUI,sBAAsB,cAAhCH,iCAAA,cAAAA,iCAAA,GAAoC,SAAS;IAC1DI,MAAA,GAAS;IACTC;EAAQ,CACT,GAAGR,KAAA;EAEJ,IACES,OAAA,CAAQC,GAAG,CAACC,QAAQ,KAAK,iBACxBN,UAAA,KAAe,0BAA0BA,UAAA,KAAe,uBAAsB,GAC/E;IACA;IACAO,OAAA,CAAQC,KAAK,CACX,iHACE;EAEN;EAEA,MAAM,CAACC,KAAA,EAAOC,QAAA,CAAS,GAAGpB,oBAAA,CAAqB;IAC7CqB,KAAA,EAAOhB,KAAA,CAAMc,KAAK;IAClBG,YAAA,EAAcjB,KAAA,CAAMkB,YAAY;IAChCC,YAAA,EAAcC;EAChB;EAEA,MAAMC,WAAA,GAAc5B,yBAAA,CAA0B;IAC5CO,KAAA;IACAsB,kBAAA,EAAoB;IACpBC,iBAAA,EAAmB,CAAC,YAAY,SAAS;EAC3C;EAEA,MAAMP,KAAA,GAAuB;IAC3BZ,IAAA;IACAC,UAAA;IACAE,MAAA;IACAiB,UAAA,EAAY;MACVC,IAAA,EAAM;MACNC,QAAA,EAAU;IACZ;IACAA,QAAA,EAAUhC,gBAAA,CAAiBM,KAAA,CAAM0B,QAAQ,EAAE;MACzCC,QAAA,EAAU,IAAI;MACdC,YAAA,EAAc;QACZ3B,GAAA;QACA,GAAGoB,WAAA,CAAYQ;MACjB;IACF;IACAJ,IAAA,EAAM/B,gBAAA,CAAiBM,KAAA,CAAMyB,IAAI,EAAE;MACjCE,QAAA,EAAU,IAAI;MACdC,YAAA,EAAcP,WAAA,CAAYI;IAC5B;EACF;EAEAT,KAAA,CAAMU,QAAQ,CAACZ,KAAK,GAAGA,KAAA;EACvBE,KAAA,CAAMU,QAAQ,CAAClB,QAAQ,GAAGZ,gBAAA,CAAiBkC,EAAA,IAAM;IAC/C,MAAMC,QAAA,GAAWD,EAAA,CAAGE,MAAM,CAAClB,KAAK;IAChCN,QAAA,aAAAA,QAAA,uBAAAA,QAAA,CAAWsB,EAAA,EAAI;MAAEhB,KAAA,EAAOiB;IAAS;IACjChB,QAAA,CAASgB,QAAA;EACX;EAEA,OAAOf,KAAA;AACT"}
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","textareaClassNames","root","textarea","textareaHeight","small","medium","large","useRootStyles","base","mc9l5x","B7ck84d","qhf8xq","z8tnut","z189sj","Byoj8tv","uwmqm3","B6of3ja","t21cq0","jrapky","Frg6f3","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","disabled","De3pzq","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","luzg7z","B1sv8sq","Bjwas2f","Bn1d65q","Bxeuatn","n51gp8","interactive","li1rpt","Bsft5z2","E3zdtr","Eqx8gd","By385i5","B1piin3","Dlnsje","d9w3h3","B3778ie","Bcgy8vk","Bw17bha","B1q35kw","Gjdm7m","b1kco5","Ba2ppi3","F2fol1","lck23g","df92cz","I188md","umuwi5","Blcqepd","nplu4u","Bioka5o","H713fs","B9ooomg","Bercvud","Bbr2w1p","Bduesf4","Bpq79vn","filled","q7v0qe","kmh5ft","nagaa4","B1yhkcb","E5pizo","outline","outlineInteractive","ckks6v","B2zwrfe","xv9156","dt87k2","Bf40cpq","Bop6t4b","gvrnp0","Beu9t3s","Bgoe8wy","Bwzppfd","oetu4i","gg5e9n","uqwnxt","Bvecx4l","Bs0cc2w","e1hlit","e2sjt0","Bbcopvn","Bj33j0h","f7epvg","B6oc9vd","ak43y8","wmxk5l","B50zh58","Bbs6y8j","rexu52","B7pmvfx","Belqbek","Bawrxx6","r7b1zc","Bt3ojkv","t1ykpo","Bvq3b66","Brahy3i","zoxjo1","an54nd","invalid","tvckwq","gk2u95","hhx65j","Bxowmz0","d","m","w","h","a","useTextareaStyles","sj55zd","Bh6795r","Bahqtrf","Bqenvij","Bxyxcbc","yvdlaj","B3o7kgh","B4brmom","Brrnbx2","oeaueh","sshi5w","Be2twd7","Bhrd7zp","Bg96gwp","useTextareaResizeStyles","none","B3rzk8w","both","horizontal","vertical","useTextareaStyles_unstable","state","size","appearance","resize","startsWith","rootStyles","className","textareaStyles","textareaResizeStyles"],"sources":["../src/packages/react-components/react-textarea/src/components/Textarea/useTextareaStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport type { TextareaSlots, TextareaState } from './Textarea.types';\n\nexport const textareaClassNames: SlotClassNames<TextareaSlots> = {\n root: 'fui-Textarea',\n textarea: 'fui-Textarea__textarea',\n};\n\nconst textareaHeight = {\n small: '24px',\n medium: '32px',\n large: '40px',\n};\n\n/**\n * Styles for the root(wrapper) slot\n */\nconst useRootStyles = makeStyles({\n base: {\n display: 'inline-flex',\n boxSizing: 'border-box',\n position: 'relative',\n // Padding needed so the focus indicator does not overlap the resize handle, this should match focus indicator size.\n ...shorthands.padding('0', '0', tokens.strokeWidthThick, '0'),\n ...shorthands.margin('0'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n\n disabled: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStrokeDisabled),\n [`& > textarea`]: {\n cursor: 'not-allowed',\n '::placeholder': {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n\n interactive: {\n // This is all for the bottom focus border.\n // It's supposed to be 2px flat all the way across and match the radius of the field's corners.\n '::after': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n left: '-1px',\n bottom: '-1px',\n right: '-1px',\n\n // Maintaining the correct corner radius:\n // Use the whole border-radius as the height and only put radii on the bottom corners.\n // (Otherwise the radius would be automatically reduced to fit available space.)\n // max() ensures the focus border still shows up even if someone sets tokens.borderRadiusMedium to 0.\n height: `max(${tokens.strokeWidthThick}, ${tokens.borderRadiusMedium})`,\n borderBottomLeftRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n\n // Flat 2px border:\n // By default borderBottom will cause little \"horns\" on the ends. The clipPath trims them off.\n // (This could be done without trimming using `background: linear-gradient(...)`, but using\n // borderBottom makes it easier for people to override the color if needed.)\n ...shorthands.borderBottom(tokens.strokeWidthThick, 'solid', tokens.colorCompoundBrandStroke),\n clipPath: `inset(calc(100% - ${tokens.strokeWidthThick}) 0 0 0)`,\n\n // Animation for focus OUT\n transform: 'scaleX(0)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationUltraFast,\n transitionDelay: tokens.curveAccelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n ':focus-within::after': {\n // Animation for focus IN\n transform: 'scaleX(1)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationNormal,\n transitionDelay: tokens.curveDecelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n ':focus-within:active::after': {\n // This is if the user clicks the field again while it's already focused\n borderBottomColor: tokens.colorCompoundBrandStrokePressed,\n },\n ':focus-within': {\n outlineWidth: tokens.strokeWidthThick,\n outlineStyle: 'solid',\n outlineColor: 'transparent',\n },\n },\n\n filled: {\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorTransparentStroke),\n ':hover,:focus-within': {\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n },\n 'filled-darker-shadow': {\n backgroundColor: tokens.colorNeutralBackground3,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorTransparentStrokeInteractive),\n boxShadow: tokens.shadow2,\n },\n 'filled-lighter-shadow': {\n backgroundColor: tokens.colorNeutralBackground1,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorTransparentStrokeInteractive),\n boxShadow: tokens.shadow2,\n },\n\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n outlineInteractive: {\n ':hover': {\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessibleHover,\n },\n\n ':active': {\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n\n ':focus-within': {\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1),\n borderBottomColor: tokens.colorCompoundBrandStroke,\n },\n },\n\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\n },\n },\n});\n\n/**\n * Styles for the textarea slot\n */\nconst useTextareaStyles = makeStyles({\n base: {\n ...shorthands.borderStyle('none'),\n ...shorthands.margin('0'),\n backgroundColor: 'transparent',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n flexGrow: 1,\n fontFamily: tokens.fontFamilyBase,\n height: '100%',\n maxHeight: '100%',\n\n '::placeholder': {\n color: tokens.colorNeutralForeground4,\n opacity: 1,\n },\n\n '::selection': {\n color: tokens.colorNeutralForegroundInverted,\n backgroundColor: tokens.colorNeutralBackgroundInverted,\n },\n\n outlineStyle: 'none', // disable default browser outline\n },\n\n // The padding style adds both content and regular padding (from design spec), this is because the handle is not\n // affected by changing the padding of the root.\n small: {\n height: textareaHeight.small,\n minHeight: '40px',\n ...shorthands.padding(\n tokens.spacingVerticalXS,\n `calc(${tokens.spacingHorizontalSNudge} + ${tokens.spacingHorizontalXXS})`,\n ),\n ...typographyStyles.caption1,\n },\n medium: {\n height: textareaHeight.medium,\n minHeight: '52px',\n ...shorthands.padding(\n tokens.spacingVerticalSNudge,\n `calc(${tokens.spacingHorizontalMNudge} + ${tokens.spacingHorizontalXXS})`,\n ),\n ...typographyStyles.body1,\n },\n large: {\n height: textareaHeight.large,\n minHeight: '64px',\n ...shorthands.padding(\n tokens.spacingVerticalS,\n `calc(${tokens.spacingHorizontalM} + ${tokens.spacingHorizontalXXS})`,\n ),\n ...typographyStyles.body2,\n },\n});\n\n/**\n * Styles for the textarea's resize property\n */\nconst useTextareaResizeStyles = makeStyles({\n none: {\n resize: 'none',\n },\n both: {\n resize: 'both',\n },\n horizontal: {\n resize: 'horizontal',\n },\n vertical: {\n resize: 'vertical',\n },\n});\n\n/**\n * Apply styling to the Textarea slots based on the state\n */\nexport const useTextareaStyles_unstable = (state: TextareaState): TextareaState => {\n const { size, appearance, resize } = state;\n const disabled = state.textarea.disabled;\n const invalid = `${state.textarea['aria-invalid']}` === 'true';\n const filled = appearance.startsWith('filled');\n\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n textareaClassNames.root,\n rootStyles.base,\n rootStyles[appearance],\n filled && rootStyles.filled,\n disabled && rootStyles.disabled,\n !disabled && rootStyles.interactive,\n !disabled && appearance === 'outline' && rootStyles.outlineInteractive,\n !disabled && invalid && rootStyles.invalid,\n state.root.className,\n );\n\n const textareaStyles = useTextareaStyles();\n const textareaResizeStyles = useTextareaResizeStyles();\n state.textarea.className = mergeClasses(\n textareaClassNames.textarea,\n textareaStyles.base,\n textareaStyles[size],\n textareaResizeStyles[resize],\n state.textarea.className,\n );\n\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAIhE,OAAO,MAAMC,kBAAkB,GAAkC;EAC/DC,IAAI,EAAE,cAAc;EACpBC,QAAQ,EAAE;CACX;AAED,MAAMC,cAAc,GAAG;EACrBC,KAAK,EAAE,MAAM;EACbC,MAAM,EAAE,MAAM;EACdC,KAAK,EAAE;CACR;AAED;;;AAGA,MAAMC,aAAa,gBAAGZ,QAAA;EAAAa,IAAA;IAAAC,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EC,UAAU;IAAEC;EAAM,CAAE,GAAGH,KAAK;EAC1C,MAAM9H,QAAQ,GAAG8H,KAAK,CAACpJ,QAAQ,CAACsB,QAAQ;EACxC,MAAM8F,OAAO,GAAG,GAAGgC,KAAK,CAACpJ,QAAQ,CAAC,cAAc,CAAC,EAAE,KAAK,MAAM;EAC9D,MAAMwE,MAAM,GAAG8E,UAAU,CAACE,UAAU,CAAC,QAAQ,CAAC;EAE9C,MAAMC,UAAU,GAAGpJ,aAAa,EAAE;EAClC+I,KAAK,CAACrJ,IAAI,CAAC2J,SAAS,GAAGhK,YAAY,CACjCI,kBAAkB,CAACC,IAAI,EACvB0J,UAAU,CAACnJ,IAAI,EACfmJ,UAAU,CAACH,UAAU,CAAC,EACtB9E,MAAM,IAAIiF,UAAU,CAACjF,MAAM,EAC3BlD,QAAQ,IAAImI,UAAU,CAACnI,QAAQ,EAC/B,CAACA,QAAQ,IAAImI,UAAU,CAAC/G,WAAW,EACnC,CAACpB,QAAQ,IAAIgI,UAAU,KAAK,SAAS,IAAIG,UAAU,CAAC1E,kBAAkB,EACtE,CAACzD,QAAQ,IAAI8F,OAAO,IAAIqC,UAAU,CAACrC,OAAO,EAC1CgC,KAAK,CAACrJ,IAAI,CAAC2J,SAAS,CACrB;EAED,MAAMC,cAAc,GAAG7B,iBAAiB,EAAE;EAC1C,MAAM8B,oBAAoB,GAAGf,uBAAuB,EAAE;EACtDO,KAAK,CAACpJ,QAAQ,CAAC0J,SAAS,GAAGhK,YAAY,CACrCI,kBAAkB,CAACE,QAAQ,EAC3B2J,cAAc,CAACrJ,IAAI,EACnBqJ,cAAc,CAACN,IAAI,CAAC,EACpBO,oBAAoB,CAACL,MAAM,CAAC,EAC5BH,KAAK,CAACpJ,QAAQ,CAAC0J,SAAS,CACzB;EAED,OAAON,KAAK;AACd,CAAC"}
1
+ {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","textareaClassNames","root","textarea","textareaHeight","small","medium","large","useRootStyles","base","mc9l5x","B7ck84d","qhf8xq","z8tnut","z189sj","Byoj8tv","uwmqm3","B6of3ja","t21cq0","jrapky","Frg6f3","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","disabled","De3pzq","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","luzg7z","B1sv8sq","Bjwas2f","Bn1d65q","Bxeuatn","n51gp8","interactive","li1rpt","Bsft5z2","E3zdtr","Eqx8gd","By385i5","B1piin3","Dlnsje","d9w3h3","B3778ie","Bcgy8vk","Bw17bha","B1q35kw","Gjdm7m","b1kco5","Ba2ppi3","F2fol1","lck23g","df92cz","I188md","umuwi5","Blcqepd","nplu4u","Bioka5o","H713fs","B9ooomg","Bercvud","Bbr2w1p","Bduesf4","Bpq79vn","filled","q7v0qe","kmh5ft","nagaa4","B1yhkcb","E5pizo","outline","outlineInteractive","ckks6v","B2zwrfe","xv9156","dt87k2","Bf40cpq","Bop6t4b","gvrnp0","Beu9t3s","Bgoe8wy","Bwzppfd","oetu4i","gg5e9n","uqwnxt","Bvecx4l","Bs0cc2w","e1hlit","e2sjt0","Bbcopvn","Bj33j0h","f7epvg","B6oc9vd","ak43y8","wmxk5l","B50zh58","Bbs6y8j","rexu52","B7pmvfx","Belqbek","Bawrxx6","r7b1zc","Bt3ojkv","t1ykpo","Bvq3b66","Brahy3i","zoxjo1","an54nd","invalid","tvckwq","gk2u95","hhx65j","Bxowmz0","d","m","w","h","a","useTextareaStyles","sj55zd","Bh6795r","Bahqtrf","Bqenvij","Bxyxcbc","yvdlaj","B3o7kgh","B4brmom","Brrnbx2","oeaueh","sshi5w","Be2twd7","Bhrd7zp","Bg96gwp","useTextareaResizeStyles","none","B3rzk8w","both","horizontal","vertical","useTextareaStyles_unstable","state","size","appearance","resize","startsWith","rootStyles","className","textareaStyles","textareaResizeStyles"],"sources":["../../../src/components/Textarea/useTextareaStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport type { TextareaSlots, TextareaState } from './Textarea.types';\n\nexport const textareaClassNames: SlotClassNames<TextareaSlots> = {\n root: 'fui-Textarea',\n textarea: 'fui-Textarea__textarea',\n};\n\nconst textareaHeight = {\n small: '24px',\n medium: '32px',\n large: '40px',\n};\n\n/**\n * Styles for the root(wrapper) slot\n */\nconst useRootStyles = makeStyles({\n base: {\n display: 'inline-flex',\n boxSizing: 'border-box',\n position: 'relative',\n // Padding needed so the focus indicator does not overlap the resize handle, this should match focus indicator size.\n ...shorthands.padding('0', '0', tokens.strokeWidthThick, '0'),\n ...shorthands.margin('0'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n\n disabled: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStrokeDisabled),\n [`& > textarea`]: {\n cursor: 'not-allowed',\n '::placeholder': {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n\n interactive: {\n // This is all for the bottom focus border.\n // It's supposed to be 2px flat all the way across and match the radius of the field's corners.\n '::after': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n left: '-1px',\n bottom: '-1px',\n right: '-1px',\n\n // Maintaining the correct corner radius:\n // Use the whole border-radius as the height and only put radii on the bottom corners.\n // (Otherwise the radius would be automatically reduced to fit available space.)\n // max() ensures the focus border still shows up even if someone sets tokens.borderRadiusMedium to 0.\n height: `max(${tokens.strokeWidthThick}, ${tokens.borderRadiusMedium})`,\n borderBottomLeftRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n\n // Flat 2px border:\n // By default borderBottom will cause little \"horns\" on the ends. The clipPath trims them off.\n // (This could be done without trimming using `background: linear-gradient(...)`, but using\n // borderBottom makes it easier for people to override the color if needed.)\n ...shorthands.borderBottom(tokens.strokeWidthThick, 'solid', tokens.colorCompoundBrandStroke),\n clipPath: `inset(calc(100% - ${tokens.strokeWidthThick}) 0 0 0)`,\n\n // Animation for focus OUT\n transform: 'scaleX(0)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationUltraFast,\n transitionDelay: tokens.curveAccelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n ':focus-within::after': {\n // Animation for focus IN\n transform: 'scaleX(1)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationNormal,\n transitionDelay: tokens.curveDecelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n ':focus-within:active::after': {\n // This is if the user clicks the field again while it's already focused\n borderBottomColor: tokens.colorCompoundBrandStrokePressed,\n },\n ':focus-within': {\n outlineWidth: tokens.strokeWidthThick,\n outlineStyle: 'solid',\n outlineColor: 'transparent',\n },\n },\n\n filled: {\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorTransparentStroke),\n ':hover,:focus-within': {\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n },\n 'filled-darker-shadow': {\n backgroundColor: tokens.colorNeutralBackground3,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorTransparentStrokeInteractive),\n boxShadow: tokens.shadow2,\n },\n 'filled-lighter-shadow': {\n backgroundColor: tokens.colorNeutralBackground1,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorTransparentStrokeInteractive),\n boxShadow: tokens.shadow2,\n },\n\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n outlineInteractive: {\n ':hover': {\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessibleHover,\n },\n\n ':active': {\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n\n ':focus-within': {\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1),\n borderBottomColor: tokens.colorCompoundBrandStroke,\n },\n },\n\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\n },\n },\n});\n\n/**\n * Styles for the textarea slot\n */\nconst useTextareaStyles = makeStyles({\n base: {\n ...shorthands.borderStyle('none'),\n ...shorthands.margin('0'),\n backgroundColor: 'transparent',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n flexGrow: 1,\n fontFamily: tokens.fontFamilyBase,\n height: '100%',\n maxHeight: '100%',\n\n '::placeholder': {\n color: tokens.colorNeutralForeground4,\n opacity: 1,\n },\n\n '::selection': {\n color: tokens.colorNeutralForegroundInverted,\n backgroundColor: tokens.colorNeutralBackgroundInverted,\n },\n\n outlineStyle: 'none', // disable default browser outline\n },\n\n // The padding style adds both content and regular padding (from design spec), this is because the handle is not\n // affected by changing the padding of the root.\n small: {\n height: textareaHeight.small,\n minHeight: '40px',\n ...shorthands.padding(\n tokens.spacingVerticalXS,\n `calc(${tokens.spacingHorizontalSNudge} + ${tokens.spacingHorizontalXXS})`,\n ),\n ...typographyStyles.caption1,\n },\n medium: {\n height: textareaHeight.medium,\n minHeight: '52px',\n ...shorthands.padding(\n tokens.spacingVerticalSNudge,\n `calc(${tokens.spacingHorizontalMNudge} + ${tokens.spacingHorizontalXXS})`,\n ),\n ...typographyStyles.body1,\n },\n large: {\n height: textareaHeight.large,\n minHeight: '64px',\n ...shorthands.padding(\n tokens.spacingVerticalS,\n `calc(${tokens.spacingHorizontalM} + ${tokens.spacingHorizontalXXS})`,\n ),\n ...typographyStyles.body2,\n },\n});\n\n/**\n * Styles for the textarea's resize property\n */\nconst useTextareaResizeStyles = makeStyles({\n none: {\n resize: 'none',\n },\n both: {\n resize: 'both',\n },\n horizontal: {\n resize: 'horizontal',\n },\n vertical: {\n resize: 'vertical',\n },\n});\n\n/**\n * Apply styling to the Textarea slots based on the state\n */\nexport const useTextareaStyles_unstable = (state: TextareaState): TextareaState => {\n const { size, appearance, resize } = state;\n const disabled = state.textarea.disabled;\n const invalid = `${state.textarea['aria-invalid']}` === 'true';\n const filled = appearance.startsWith('filled');\n\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n textareaClassNames.root,\n rootStyles.base,\n rootStyles[appearance],\n filled && rootStyles.filled,\n disabled && rootStyles.disabled,\n !disabled && rootStyles.interactive,\n !disabled && appearance === 'outline' && rootStyles.outlineInteractive,\n !disabled && invalid && rootStyles.invalid,\n state.root.className,\n );\n\n const textareaStyles = useTextareaStyles();\n const textareaResizeStyles = useTextareaResizeStyles();\n state.textarea.className = mergeClasses(\n textareaClassNames.textarea,\n textareaStyles.base,\n textareaStyles[size],\n textareaResizeStyles[resize],\n state.textarea.className,\n );\n\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AACrD,SAASC,MAAM,EAAEC,gBAAgB,QAAQ;AAIzC,OAAO,MAAMC,kBAAA,GAAoD;EAC/DC,IAAA,EAAM;EACNC,QAAA,EAAU;AACZ;AAEA,MAAMC,cAAA,GAAiB;EACrBC,KAAA,EAAO;EACPC,MAAA,EAAQ;EACRC,KAAA,EAAO;AACT;AAEA;;;AAGA,MAAMC,aAAA,gBAAgBZ,QAAA;EAAAa,IAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OA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AAA,CAAMpJ,QAAQ,CAACsB,QAAQ;EACxC,MAAM8F,OAAA,GAAW,GAAEgC,KAAA,CAAMpJ,QAAQ,CAAC,eAAgB,EAAC,KAAK;EACxD,MAAMwE,MAAA,GAAS8E,UAAA,CAAWE,UAAU,CAAC;EAErC,MAAMC,UAAA,GAAapJ,aAAA;EACnB+I,KAAA,CAAMrJ,IAAI,CAAC2J,SAAS,GAAGhK,YAAA,CACrBI,kBAAA,CAAmBC,IAAI,EACvB0J,UAAA,CAAWnJ,IAAI,EACfmJ,UAAU,CAACH,UAAA,CAAW,EACtB9E,MAAA,IAAUiF,UAAA,CAAWjF,MAAM,EAC3BlD,QAAA,IAAYmI,UAAA,CAAWnI,QAAQ,EAC/B,CAACA,QAAA,IAAYmI,UAAA,CAAW/G,WAAW,EACnC,CAACpB,QAAA,IAAYgI,UAAA,KAAe,aAAaG,UAAA,CAAW1E,kBAAkB,EACtE,CAACzD,QAAA,IAAY8F,OAAA,IAAWqC,UAAA,CAAWrC,OAAO,EAC1CgC,KAAA,CAAMrJ,IAAI,CAAC2J,SAAS;EAGtB,MAAMC,cAAA,GAAiB7B,iBAAA;EACvB,MAAM8B,oBAAA,GAAuBf,uBAAA;EAC7BO,KAAA,CAAMpJ,QAAQ,CAAC0J,SAAS,GAAGhK,YAAA,CACzBI,kBAAA,CAAmBE,QAAQ,EAC3B2J,cAAA,CAAerJ,IAAI,EACnBqJ,cAAc,CAACN,IAAA,CAAK,EACpBO,oBAAoB,CAACL,MAAA,CAAO,EAC5BH,KAAA,CAAMpJ,QAAQ,CAAC0J,SAAS;EAG1B,OAAON,KAAA;AACT"}
@@ -1,5 +1,4 @@
1
- /* eslint-disable deprecation/deprecation */
2
- import { getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';
1
+ /* eslint-disable deprecation/deprecation */import { getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';
3
2
  import { Textarea, textareaClassNames } from '../../Textarea';
4
3
  /** @deprecated Use Field with Textarea: `<Field><Textarea /></Field>` */
5
4
  export const textareaFieldClassNames = /*#__PURE__*/getDeprecatedFieldClassNames(textareaClassNames.root);
@@ -1 +1 @@
1
- {"version":3,"names":["getDeprecatedFieldClassNames","makeDeprecatedField","Textarea","textareaClassNames","textareaFieldClassNames","root","TextareaField"],"sources":["../src/packages/react-components/react-textarea/src/components/TextareaField/TextareaField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport { DeprecatedFieldProps, getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { Textarea, textareaClassNames, TextareaProps } from '../../Textarea';\n\n/** @deprecated Use Field with Textarea: `<Field><Textarea /></Field>` */\nexport type TextareaFieldProps = DeprecatedFieldProps<TextareaProps>;\n/** @deprecated Use Field with Textarea: `<Field><Textarea /></Field>` */\nexport const textareaFieldClassNames = getDeprecatedFieldClassNames(textareaClassNames.root);\n/** @deprecated Use Field with Textarea: `<Field><Textarea /></Field>` */\nexport const TextareaField: ForwardRefComponent<TextareaFieldProps> = makeDeprecatedField(Textarea);\n"],"mappings":"AAAA;AACA,SAA+BA,4BAA4B,EAAEC,mBAAmB,QAAQ,uBAAuB;AAE/G,SAASC,QAAQ,EAAEC,kBAAkB,QAAuB,gBAAgB;AAI5E;AACA,OAAO,MAAMC,uBAAuB,gBAAGJ,4BAA4B,CAACG,kBAAkB,CAACE,IAAI,CAAC;AAC5F;AACA,OAAO,MAAMC,aAAa,gBAA4CL,mBAAmB,CAACC,QAAQ,CAAC"}
1
+ {"version":3,"names":["getDeprecatedFieldClassNames","makeDeprecatedField","Textarea","textareaClassNames","textareaFieldClassNames","root","TextareaField"],"sources":["../../../src/components/TextareaField/TextareaField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport { DeprecatedFieldProps, getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { Textarea, textareaClassNames, TextareaProps } from '../../Textarea';\n\n/** @deprecated Use Field with Textarea: `<Field><Textarea /></Field>` */\nexport type TextareaFieldProps = DeprecatedFieldProps<TextareaProps>;\n/** @deprecated Use Field with Textarea: `<Field><Textarea /></Field>` */\nexport const textareaFieldClassNames = getDeprecatedFieldClassNames(textareaClassNames.root);\n/** @deprecated Use Field with Textarea: `<Field><Textarea /></Field>` */\nexport const TextareaField: ForwardRefComponent<TextareaFieldProps> = makeDeprecatedField(Textarea);\n"],"mappings":"AAAA,4CACA,SAA+BA,4BAA4B,EAAEC,mBAAmB,QAAQ;AAExF,SAASC,QAAQ,EAAEC,kBAAkB,QAAuB;AAI5D;AACA,OAAO,MAAMC,uBAAA,gBAA0BJ,4BAAA,CAA6BG,kBAAA,CAAmBE,IAAI;AAC3F;AACA,OAAO,MAAMC,aAAA,gBAAyDL,mBAAA,CAAoBC,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-textarea/src/components/TextareaField/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './TextareaField';\n"]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/TextareaField/index.ts"],"sourcesContent":["export * from './TextareaField';\n"],"mappings":"AAAA,cAAc"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["Textarea","renderTextarea_unstable","textareaClassNames","useTextareaStyles_unstable","useTextarea_unstable","TextareaField","TextareaField_unstable","textareaFieldClassNames"],"sources":["../src/packages/react-components/react-textarea/src/index.ts"],"sourcesContent":["export {\n Textarea,\n renderTextarea_unstable,\n textareaClassNames,\n useTextareaStyles_unstable,\n useTextarea_unstable,\n} from './Textarea';\nexport type { TextareaOnChangeData, TextareaProps, TextareaSlots, TextareaState } from './Textarea';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { TextareaField as TextareaField_unstable, textareaFieldClassNames } from './TextareaField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { TextareaFieldProps as TextareaFieldProps_unstable } from './TextareaField';\n"],"mappings":"AAAA,SACEA,QAAQ,EACRC,uBAAuB,EACvBC,kBAAkB,EAClBC,0BAA0B,EAC1BC,oBAAoB,QACf,YAAY;AAGnB;AACA,SAASC,aAAa,IAAIC,sBAAsB,EAAEC,uBAAuB,QAAQ,iBAAiB"}
1
+ {"version":3,"names":["Textarea","renderTextarea_unstable","textareaClassNames","useTextareaStyles_unstable","useTextarea_unstable","TextareaField","TextareaField_unstable","textareaFieldClassNames"],"sources":["../src/index.ts"],"sourcesContent":["export {\n Textarea,\n renderTextarea_unstable,\n textareaClassNames,\n useTextareaStyles_unstable,\n useTextarea_unstable,\n} from './Textarea';\nexport type { TextareaOnChangeData, TextareaProps, TextareaSlots, TextareaState } from './Textarea';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { TextareaField as TextareaField_unstable, textareaFieldClassNames } from './TextareaField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { TextareaFieldProps as TextareaFieldProps_unstable } from './TextareaField';\n"],"mappings":"AAAA,SACEA,QAAQ,EACRC,uBAAuB,EACvBC,kBAAkB,EAClBC,0BAA0B,EAC1BC,oBAAoB,QACf;AAGP;AACA,SAASC,aAAA,IAAiBC,sBAAsB,EAAEC,uBAAuB,QAAQ"}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./components/Textarea/index"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./components/Textarea/index"), exports);
7
+ //# sourceMappingURL=Textarea.js.map
8
+
8
9
  //# sourceMappingURL=Textarea.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-textarea/src/Textarea.ts"],"sourcesContent":["export * from './components/Textarea/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,iCAAAC,OAAA"}
1
+ {"version":3,"sources":["../lib/Textarea.js"],"sourcesContent":["export * from './components/Textarea/index';\n//# sourceMappingURL=Textarea.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,oCAAoC"}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./components/TextareaField/index"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./components/TextareaField/index"), exports);
7
+ //# sourceMappingURL=TextareaField.js.map
8
+
8
9
  //# sourceMappingURL=TextareaField.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-textarea/src/TextareaField.ts"],"sourcesContent":["export * from './components/TextareaField/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,sCAAAC,OAAA"}
1
+ {"version":3,"sources":["../lib/TextareaField.js"],"sourcesContent":["export * from './components/TextareaField/index';\n//# sourceMappingURL=TextareaField.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,yCAAyC"}
@@ -1,25 +1,24 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Textarea", {
6
+ enumerable: true,
7
+ get: ()=>Textarea
5
8
  });
6
- exports.Textarea = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const renderTextarea_1 = /*#__PURE__*/require("./renderTextarea");
9
- const useTextarea_1 = /*#__PURE__*/require("./useTextarea");
10
- const useTextareaStyles_1 = /*#__PURE__*/require("./useTextareaStyles");
11
- const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
12
- /**
13
- * The Textarea component allows the user to enter and edit text in multiple lines.
14
- */
15
- exports.Textarea = /*#__PURE__*/React.forwardRef((props, ref) => {
16
- const state = useTextarea_1.useTextarea_unstable(props, ref);
17
- useTextareaStyles_1.useTextareaStyles_unstable(state);
18
- const {
19
- useTextareaStyles_unstable: useCustomStyles
20
- } = react_shared_contexts_1.useCustomStyleHooks_unstable();
21
- useCustomStyles(state);
22
- return renderTextarea_1.renderTextarea_unstable(state);
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _renderTextarea = require("./renderTextarea");
12
+ const _useTextarea = require("./useTextarea");
13
+ const _useTextareaStyles = require("./useTextareaStyles");
14
+ const _reactSharedContexts = require("@fluentui/react-shared-contexts");
15
+ const Textarea = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
16
+ const state = (0, _useTextarea.useTextarea_unstable)(props, ref);
17
+ (0, _useTextareaStyles.useTextareaStyles_unstable)(state);
18
+ const { useTextareaStyles_unstable: useCustomStyles } = (0, _reactSharedContexts.useCustomStyleHooks_unstable)();
19
+ useCustomStyles(state);
20
+ return (0, _renderTextarea.renderTextarea_unstable)(state);
23
21
  });
24
- exports.Textarea.displayName = 'Textarea';
22
+ Textarea.displayName = 'Textarea'; //# sourceMappingURL=Textarea.js.map
23
+
25
24
  //# sourceMappingURL=Textarea.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","renderTextarea_1","useTextarea_1","useTextareaStyles_1","react_shared_contexts_1","exports","Textarea","forwardRef","props","ref","state","useTextarea_unstable","useTextareaStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderTextarea_unstable","displayName"],"sources":["../src/packages/react-components/react-textarea/src/components/Textarea/Textarea.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderTextarea_unstable } from './renderTextarea';\nimport { useTextarea_unstable } from './useTextarea';\nimport { useTextareaStyles_unstable } from './useTextareaStyles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { TextareaProps } from './Textarea.types';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The Textarea component allows the user to enter and edit text in multiple lines.\n */\nexport const Textarea: ForwardRefComponent<TextareaProps> = React.forwardRef((props, ref) => {\n const state = useTextarea_unstable(props, ref);\n\n useTextareaStyles_unstable(state);\n\n const { useTextareaStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderTextarea_unstable(state);\n});\n\nTextarea.displayName = 'Textarea';\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,gBAAA,gBAAAD,OAAA;AACA,MAAAE,aAAA,gBAAAF,OAAA;AACA,MAAAG,mBAAA,gBAAAH,OAAA;AAGA,MAAAI,uBAAA,gBAAAJ,OAAA;AAEA;;;AAGaK,OAAA,CAAAC,QAAQ,gBAAuCP,KAAK,CAACQ,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC1F,MAAMC,KAAK,GAAGR,aAAA,CAAAS,oBAAoB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAE9CN,mBAAA,CAAAS,0BAA0B,CAACF,KAAK,CAAC;EAEjC,MAAM;IAAEE,0BAA0B,EAAEC;EAAe,CAAE,GAAGT,uBAAA,CAAAU,4BAA4B,EAAE;EACtFD,eAAe,CAACH,KAAK,CAAC;EAEtB,OAAOT,gBAAA,CAAAc,uBAAuB,CAACL,KAAK,CAAC;AACvC,CAAC,CAAC;AAEFL,OAAA,CAAAC,QAAQ,CAACU,WAAW,GAAG,UAAU"}
1
+ {"version":3,"sources":["../../../lib/components/Textarea/Textarea.js"],"sourcesContent":["import * as React from 'react';\nimport { renderTextarea_unstable } from './renderTextarea';\nimport { useTextarea_unstable } from './useTextarea';\nimport { useTextareaStyles_unstable } from './useTextareaStyles';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n/**\n * The Textarea component allows the user to enter and edit text in multiple lines.\n */\nexport const Textarea = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useTextarea_unstable(props, ref);\n useTextareaStyles_unstable(state);\n const {\n useTextareaStyles_unstable: useCustomStyles\n } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n return renderTextarea_unstable(state);\n});\nTextarea.displayName = 'Textarea';\n//# sourceMappingURL=Textarea.js.map"],"names":["Textarea","React","forwardRef","props","ref","state","useTextarea_unstable","useTextareaStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderTextarea_unstable","displayName"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;gCACiB;6BACH;mCACM;qCACE;AAItC,MAAMA,WAAW,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACpE,MAAMC,QAAQC,IAAAA,iCAAoB,EAACH,OAAOC;IAC1CG,IAAAA,6CAA0B,EAACF;IAC3B,MAAM,EACJE,4BAA4BC,gBAAe,EAC5C,GAAGC,IAAAA,iDAA4B;IAChCD,gBAAgBH;IAChB,OAAOK,IAAAA,uCAAuB,EAACL;AACjC;AACAL,SAASW,WAAW,GAAG,YACvB,oCAAoC"}
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
5
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
6
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
7
+ //# sourceMappingURL=Textarea.types.js.map
8
+
6
9
  //# sourceMappingURL=Textarea.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/packages/react-components/react-textarea/src/components/Textarea/Textarea.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TextareaSlots = {\n /**\n * Wrapper element used for displaying the borders for Textarea. This wrapper is needed due to the focus\n * indicator border animation. For more information, see Spec.md\n *\n * The root only receives `className` and `style`. All other props are applied to the `textarea` slot.\n */\n root: NonNullable<Slot<'span'>>;\n\n /**\n * The `<textarea>` element. This is the primary slot, all native props and ref are applied to this slot.\n */\n textarea: NonNullable<Slot<'textarea'>>;\n};\n\n/**\n * Textarea Props\n */\nexport type TextareaProps = Omit<\n ComponentProps<Partial<TextareaSlots>, 'textarea'>,\n 'defaultValue' | 'onChange' | 'size' | 'value'\n> & {\n /**\n * Styling the Textarea should use.\n *\n * @default outline\n *\n * Note: 'filled-darker-shadow' and 'filled-lighter-shadow' are deprecated and will be removed in the future.\n */\n appearance?: 'outline' | 'filled-darker' | 'filled-lighter' | 'filled-darker-shadow' | 'filled-lighter-shadow';\n\n /**\n * The default value of the Textarea.\n */\n defaultValue?: string;\n\n /**\n * Callback for when the user changes the value.\n */\n onChange?: (ev: React.ChangeEvent<HTMLTextAreaElement>, data: TextareaOnChangeData) => void;\n\n /**\n * Which direction the Textarea is allowed to be resized.\n *\n * @default none\n */\n resize?: 'none' | 'horizontal' | 'vertical' | 'both';\n\n /**\n * Size of the Textarea.\n *\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * The value of the Textarea.\n */\n value?: string;\n};\n\n/**\n * State used in rendering Textarea\n */\nexport type TextareaState = ComponentState<TextareaSlots> &\n Required<Pick<TextareaProps, 'appearance' | 'resize' | 'size'>>;\n\n/**\n * Data passed to the `onChange` callback when the textarea's value changes.\n */\nexport type TextareaOnChangeData = {\n value: string;\n};\n"],"mappings":""}
1
+ {"version":3,"sources":["../../../lib/components/Textarea/Textarea.types.js"],"sourcesContent":["import * as React from 'react';\n//# sourceMappingURL=Textarea.types.js.map"],"names":[],"mappings":";;;;;6DAAuB;CACvB,0CAA0C"}
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./Textarea"), exports);
8
- tslib_1.__exportStar(require("./Textarea.types"), exports);
9
- tslib_1.__exportStar(require("./renderTextarea"), exports);
10
- tslib_1.__exportStar(require("./useTextarea"), exports);
11
- tslib_1.__exportStar(require("./useTextareaStyles"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./Textarea"), exports);
7
+ _exportStar(require("./Textarea.types"), exports);
8
+ _exportStar(require("./renderTextarea"), exports);
9
+ _exportStar(require("./useTextarea"), exports);
10
+ _exportStar(require("./useTextareaStyles"), exports);
11
+ //# sourceMappingURL=index.js.map
12
+
12
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-textarea/src/components/Textarea/index.ts"],"sourcesContent":["export * from './Textarea';\nexport * from './Textarea.types';\nexport * from './renderTextarea';\nexport * from './useTextarea';\nexport * from './useTextareaStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,gBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,sBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,sBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,mBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,yBAAAC,OAAA"}
1
+ {"version":3,"sources":["../../../lib/components/Textarea/index.js"],"sourcesContent":["export * from './Textarea';\nexport * from './Textarea.types';\nexport * from './renderTextarea';\nexport * from './useTextarea';\nexport * from './useTextareaStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
@@ -1,24 +1,17 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderTextarea_unstable", {
6
+ enumerable: true,
7
+ get: ()=>renderTextarea_unstable
5
8
  });
6
- exports.renderTextarea_unstable = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
- /**
10
- * Render the final JSX of Textarea
11
- */
12
- const renderTextarea_unstable = state => {
13
- const {
14
- slots,
15
- slotProps
16
- } = react_utilities_1.getSlots(state);
17
- return React.createElement(slots.root, {
18
- ...slotProps.root
19
- }, React.createElement(slots.textarea, {
20
- ...slotProps.textarea
21
- }));
22
- };
23
- exports.renderTextarea_unstable = renderTextarea_unstable;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const renderTextarea_unstable = (state)=>{
13
+ const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
14
+ return /*#__PURE__*/ _react.createElement(slots.root, slotProps.root, /*#__PURE__*/ _react.createElement(slots.textarea, slotProps.textarea));
15
+ }; //# sourceMappingURL=renderTextarea.js.map
16
+
24
17
  //# sourceMappingURL=renderTextarea.js.map