@fluentui/react-textarea 9.74.9-experimental.menu-disable-autofocus.20261008-e9914a95c6.0 → 9.75.0-experimental.css-modules.20261031-810ab07afb.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +19 -9
  2. package/README.md +6 -0
  3. package/lib/components/Textarea/Textarea.js.map +1 -1
  4. package/lib/components/Textarea/Textarea.module.css +210 -0
  5. package/lib/components/Textarea/Textarea.types.js.map +1 -1
  6. package/lib/components/Textarea/index.js.map +1 -1
  7. package/lib/components/Textarea/renderTextarea.js +2 -2
  8. package/lib/components/Textarea/renderTextarea.js.map +1 -1
  9. package/lib/components/Textarea/useTextarea.js +2 -2
  10. package/lib/components/Textarea/useTextarea.js.map +1 -1
  11. package/lib/components/Textarea/useTextareaStyles.styles.css.js +11 -0
  12. package/lib/components/Textarea/useTextareaStyles.styles.css.js.map +1 -0
  13. package/lib/components/Textarea/useTextareaStyles.styles.raw.css.js +11 -0
  14. package/lib/components/Textarea/useTextareaStyles.styles.raw.css.js.map +1 -0
  15. package/lib/components/Textarea/useTextareaStyles.styles.raw.js.map +1 -1
  16. package/lib-commonjs/Textarea.cjs +7 -7
  17. package/lib-commonjs/components/Textarea/Textarea.cjs.map +1 -1
  18. package/lib-commonjs/components/Textarea/Textarea.module.css +210 -0
  19. package/lib-commonjs/components/Textarea/Textarea.types.cjs.map +1 -1
  20. package/lib-commonjs/components/Textarea/index.cjs +7 -7
  21. package/lib-commonjs/components/Textarea/index.cjs.map +1 -1
  22. package/lib-commonjs/components/Textarea/renderTextarea.cjs.map +1 -1
  23. package/lib-commonjs/components/Textarea/useTextarea.cjs +5 -5
  24. package/lib-commonjs/components/Textarea/useTextarea.cjs.map +1 -1
  25. package/lib-commonjs/components/Textarea/useTextareaStyles.styles.cjs +3 -3
  26. package/lib-commonjs/components/Textarea/useTextareaStyles.styles.cjs.map +1 -1
  27. package/lib-commonjs/components/Textarea/useTextareaStyles.styles.css.cjs +30 -0
  28. package/lib-commonjs/components/Textarea/useTextareaStyles.styles.css.cjs.map +1 -0
  29. package/lib-commonjs/components/Textarea/useTextareaStyles.styles.raw.cjs +3 -3
  30. package/lib-commonjs/components/Textarea/useTextareaStyles.styles.raw.cjs.map +1 -1
  31. package/lib-commonjs/components/Textarea/useTextareaStyles.styles.raw.css.cjs +30 -0
  32. package/lib-commonjs/components/Textarea/useTextareaStyles.styles.raw.css.cjs.map +1 -0
  33. package/lib-commonjs/index.cjs +7 -7
  34. package/package.json +11 -8
package/CHANGELOG.md CHANGED
@@ -1,21 +1,31 @@
1
1
  # Change Log - @fluentui/react-textarea
2
2
 
3
- <!-- This log was last generated on Thu, 08 Oct 2026 09:39:46 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Sat, 31 Oct 2026 11:08:39 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [9.74.9-experimental.menu-disable-autofocus.20261008-e9914a95c6.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.74.9-experimental.menu-disable-autofocus.20261008-e9914a95c6.0)
7
+ ## [9.75.0-experimental.css-modules.20261031-810ab07afb.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.75.0-experimental.css-modules.20261031-810ab07afb.0)
8
8
 
9
- Thu, 08 Oct 2026 09:39:46 GMT
9
+ Sat, 31 Oct 2026 11:08:39 GMT
10
10
 
11
11
  ### Changes
12
12
 
13
- - Release 9.74.9-experimental.menu-disable-autofocus.20261008-e9914a95c6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
14
- - Bump @fluentui/react-field to v9.74.9-experimental.menu-disable-autofocus.20261008-e9914a95c6.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
15
- - Bump @fluentui/react-jsx-runtime to v9.74.9-experimental.menu-disable-autofocus.20261008-e9914a95c6.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
16
- - Bump @fluentui/react-shared-contexts to v9.74.9-experimental.menu-disable-autofocus.20261008-e9914a95c6.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
17
- - Bump @fluentui/react-theme to v9.74.9-experimental.menu-disable-autofocus.20261008-e9914a95c6.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
- - Bump @fluentui/react-utilities to v9.74.9-experimental.menu-disable-autofocus.20261008-e9914a95c6.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
13
+ - Release 9.75.0-experimental.css-modules.20261031-810ab07afb ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
14
+ - Bump @fluentui/react-field to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
15
+ - Bump @fluentui/react-jsx-runtime to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
16
+ - Bump @fluentui/react-shared-contexts to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
17
+ - Bump @fluentui/react-theme to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
+ - Bump @fluentui/react-utilities to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
+
20
+ ## [9.7.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.7.8)
21
+
22
+ Mon, 19 Oct 2026 16:49:01 GMT
23
+
24
+ ### Patches
25
+
26
+ - Bump @fluentui/react-field to v9.5.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
27
+ - Bump @fluentui/react-jsx-runtime to v9.4.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
28
+ - Bump @fluentui/react-utilities to v9.27.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
29
 
20
30
  ## [9.7.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.7.7)
21
31
 
package/README.md CHANGED
@@ -18,3 +18,9 @@ import { Textarea } from '@fluentui/react-textarea';
18
18
  <Textarea placeholder="Enter text here..." />
19
19
  <Textarea defaultValue="Lorem ipsum dolor" />
20
20
  ```
21
+
22
+ ## Opt-in CSS Modules styles
23
+
24
+ CSS Modules alternatives are available for `Textarea`. The default exports and component imports continue to use Griffel.
25
+
26
+ To opt in, configure your bundler to replace each `use<Component>Styles.styles.js` module with its adjacent `use<Component>Styles.styles.css.js` alternative (or `.styles.ts` with `.styles.css.ts` for source builds). Apply the replacement consistently to client and server bundles. The CSS loader must provide a default class-name map and retain the adjacent `.module.css` asset, including CSS from dependencies. All component rules are in `@layer fluentui` and use the theme custom properties supplied by `FluentProvider`.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Textarea/Textarea.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { renderTextarea_unstable } from './renderTextarea';\nimport { useTextarea_unstable } from './useTextarea';\nimport { useTextareaStyles_unstable } from './useTextareaStyles.styles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { TextareaProps } from './Textarea.types';\nimport { useCustomStyleHook_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 useCustomStyleHook_unstable('useTextareaStyles_unstable')(state);\n\n return renderTextarea_unstable(state);\n});\n\nTextarea.displayName = 'Textarea';\n"],"names":["React","renderTextarea_unstable","useTextarea_unstable","useTextareaStyles_unstable","useCustomStyleHook_unstable","Textarea","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,oBAAoB,QAAQ,mBAAgB;AACrD,SAASC,0BAA0B,QAAQ,gCAA6B;AAGxE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,yBAA+CL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQP,qBAAqBK,OAAOC;IAE1CL,2BAA2BM;IAE3BL,4BAA4B,8BAA8BK;IAE1D,OAAOR,wBAAwBQ;AACjC,GAAG;AAEHJ,SAASK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/Textarea/Textarea.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { renderTextarea_unstable } from './renderTextarea';\nimport { useTextarea_unstable } from './useTextarea';\nimport { useTextareaStyles_unstable } from './useTextareaStyles.styles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { TextareaProps } from './Textarea.types';\nimport { useCustomStyleHook_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 useCustomStyleHook_unstable('useTextareaStyles_unstable')(state);\n\n return renderTextarea_unstable(state);\n});\n\nTextarea.displayName = 'Textarea';\n"],"names":["React","renderTextarea_unstable","useTextarea_unstable","useTextareaStyles_unstable","useCustomStyleHook_unstable","Textarea","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,oBAAoB,QAAQ,mBAAgB;AACrD,SAASC,0BAA0B,QAAQ,gCAA6B;AAGxE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,yBAA+CL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQP,qBAAqBK,OAAOC;IAE1CL,2BAA2BM;IAE3BL,4BAA4B,8BAA8BK;IAE1D,OAAOR,wBAAwBQ;AACjC,GAAG;AAEHJ,SAASK,WAAW,GAAG"}
@@ -0,0 +1,210 @@
1
+ @layer fluentui {
2
+ .root {
3
+ display: inline-flex;
4
+ box-sizing: border-box;
5
+ position: relative;
6
+ padding: 0 0 var(--strokeWidthThick) 0;
7
+ margin: 0;
8
+ border-radius: var(--borderRadiusMedium);
9
+ vertical-align: top;
10
+ }
11
+
12
+ .disabled {
13
+ background-color: var(--colorTransparentBackground);
14
+ border: var(--strokeWidthThin) solid var(--colorNeutralStrokeDisabled);
15
+ }
16
+
17
+ .filled:where(:not(.disabled)):hover,
18
+ .filled:where(:not(.disabled)):focus-within {
19
+ border-top-color: var(--colorTransparentStrokeInteractive);
20
+ border-inline-end-color: var(--colorTransparentStrokeInteractive);
21
+ border-bottom-color: var(--colorTransparentStrokeInteractive);
22
+ border-inline-start-color: var(--colorTransparentStrokeInteractive);
23
+ }
24
+
25
+ .filled:where(:not(.disabled)) {
26
+ border: var(--strokeWidthThin) solid var(--colorTransparentStroke);
27
+ }
28
+
29
+ .filled-darker:where(:not(.disabled)) {
30
+ background-color: var(--colorNeutralBackground3);
31
+ }
32
+
33
+ .filled-lighter:where(:not(.disabled)) {
34
+ background-color: var(--colorNeutralBackground1);
35
+ }
36
+
37
+ .filled-darker-shadow:where(:not(.disabled)) {
38
+ background-color: var(--colorNeutralBackground3);
39
+ border: var(--strokeWidthThin) solid var(--colorTransparentStrokeInteractive);
40
+ box-shadow: var(--shadow2);
41
+ }
42
+
43
+ .filled-lighter-shadow:where(:not(.disabled)) {
44
+ background-color: var(--colorNeutralBackground1);
45
+ border: var(--strokeWidthThin) solid var(--colorTransparentStrokeInteractive);
46
+ box-shadow: var(--shadow2);
47
+ }
48
+
49
+ .outline:where(:not(.disabled)) {
50
+ background-color: var(--colorNeutralBackground1);
51
+ border: var(--strokeWidthThin) solid var(--colorNeutralStroke1);
52
+ border-bottom-color: var(--colorNeutralStrokeAccessible);
53
+ }
54
+
55
+ .root:where(:not(.disabled))::after {
56
+ box-sizing: border-box;
57
+ content: '';
58
+ position: absolute;
59
+ inset-inline-start: calc(var(--strokeWidthThin) * -1);
60
+ bottom: calc(var(--strokeWidthThin) * -1);
61
+ inset-inline-end: calc(var(--strokeWidthThin) * -1);
62
+ height: max(var(--strokeWidthThick), var(--borderRadiusMedium));
63
+ border-end-start-radius: var(--borderRadiusMedium);
64
+ border-end-end-radius: var(--borderRadiusMedium);
65
+ border-bottom: var(--strokeWidthThick) solid var(--colorCompoundBrandStroke);
66
+ clip-path: inset(calc(100% - var(--strokeWidthThick)) 0 0 0);
67
+ transform: scaleX(0);
68
+ transition-property: transform;
69
+ transition-duration: var(--durationUltraFast);
70
+ transition-delay: var(--curveAccelerateMid);
71
+ }
72
+
73
+ .root:where(:not(.disabled)):focus-within::after {
74
+ transform: scaleX(1);
75
+ transition-property: transform;
76
+ transition-duration: var(--durationNormal);
77
+ transition-delay: var(--curveDecelerateMid);
78
+ }
79
+
80
+ .root:where(:not(.disabled)):focus-within:active::after {
81
+ border-bottom-color: var(--colorCompoundBrandStrokePressed);
82
+ }
83
+
84
+ .root:where(:not(.disabled)):focus-within {
85
+ outline-width: var(--strokeWidthThick);
86
+ outline-style: solid;
87
+ outline-color: transparent;
88
+ }
89
+
90
+ .outline:where(:not(.disabled)):focus-within {
91
+ border: var(--strokeWidthThin) solid var(--colorNeutralStroke1Pressed);
92
+ border-bottom-color: var(--colorCompoundBrandStroke);
93
+ }
94
+
95
+ .outline:where(:not(.disabled)):hover {
96
+ border: var(--strokeWidthThin) solid var(--colorNeutralStroke1Hover);
97
+ border-bottom-color: var(--colorNeutralStrokeAccessibleHover);
98
+ }
99
+
100
+ .outline:where(:not(.disabled)):active {
101
+ border: var(--strokeWidthThin) solid var(--colorNeutralStroke1Pressed);
102
+ border-bottom-color: var(--colorNeutralStrokeAccessiblePressed);
103
+ }
104
+
105
+ .invalid:where(:not(.disabled)):not(:focus-within),
106
+ .invalid:where(:not(.disabled)):hover:not(:focus-within) {
107
+ border-top-color: var(--colorPaletteRedBorder2);
108
+ border-inline-end-color: var(--colorPaletteRedBorder2);
109
+ border-bottom-color: var(--colorPaletteRedBorder2);
110
+ border-inline-start-color: var(--colorPaletteRedBorder2);
111
+ }
112
+
113
+ .textarea::placeholder {
114
+ color: var(--colorNeutralForeground4);
115
+ opacity: 1;
116
+ }
117
+
118
+ .textarea {
119
+ border-top-style: none;
120
+ border-inline-end-style: none;
121
+ border-bottom-style: none;
122
+ border-inline-start-style: none;
123
+ margin: 0;
124
+ background-color: transparent;
125
+ box-sizing: border-box;
126
+ color: var(--colorNeutralForeground1);
127
+ flex-grow: 1;
128
+ font-family: var(--fontFamilyBase);
129
+ height: 100%;
130
+ outline-style: none;
131
+ }
132
+
133
+ :where(.small) > .textarea {
134
+ min-height: calc(var(--spacingHorizontalXS) * 10);
135
+ padding: var(--spacingVerticalXS) calc(var(--spacingHorizontalSNudge) + var(--spacingHorizontalXXS));
136
+ max-height: calc(var(--spacingHorizontalXS) * 50);
137
+ font-family: var(--fontFamilyBase);
138
+ font-size: var(--fontSizeBase200);
139
+ font-weight: var(--fontWeightRegular);
140
+ line-height: var(--lineHeightBase200);
141
+ }
142
+
143
+ :where(.medium) > .textarea {
144
+ min-height: calc(var(--spacingHorizontalXS) * 13);
145
+ padding: var(--spacingVerticalSNudge) calc(var(--spacingHorizontalMNudge) + var(--spacingHorizontalXXS));
146
+ max-height: calc(var(--spacingHorizontalXS) * 65);
147
+ font-family: var(--fontFamilyBase);
148
+ font-size: var(--fontSizeBase300);
149
+ font-weight: var(--fontWeightRegular);
150
+ line-height: var(--lineHeightBase300);
151
+ }
152
+
153
+ :where(.large) > .textarea {
154
+ min-height: calc(var(--spacingHorizontalXS) * 16);
155
+ padding: var(--spacingVerticalS) calc(var(--spacingHorizontalM) + var(--spacingHorizontalXXS));
156
+ max-height: calc(var(--spacingHorizontalXS) * 80);
157
+ font-family: var(--fontFamilyBase);
158
+ font-size: var(--fontSizeBase400);
159
+ font-weight: var(--fontWeightRegular);
160
+ line-height: var(--lineHeightBase400);
161
+ }
162
+
163
+ :where(.none) > .textarea {
164
+ resize: none;
165
+ }
166
+
167
+ :where(.both) > .textarea {
168
+ resize: both;
169
+ }
170
+
171
+ :where(.horizontal) > .textarea {
172
+ resize: horizontal;
173
+ }
174
+
175
+ :where(.vertical) > .textarea {
176
+ resize: vertical;
177
+ }
178
+
179
+ :where(.disabled) > .textarea::placeholder {
180
+ color: var(--colorNeutralForegroundDisabled);
181
+ }
182
+
183
+ :where(.disabled) > .textarea {
184
+ color: var(--colorNeutralForegroundDisabled);
185
+ cursor: not-allowed;
186
+ }
187
+
188
+ @media (forced-colors: active) {
189
+ .disabled {
190
+ border-top-color: GrayText;
191
+ border-inline-end-color: GrayText;
192
+ border-bottom-color: GrayText;
193
+ border-inline-start-color: GrayText;
194
+ }
195
+ }
196
+
197
+ @media screen and (prefers-reduced-motion: reduce) {
198
+ .root:where(:not(.disabled))::after {
199
+ transition-duration: 0.01ms;
200
+ transition-delay: 0.01ms;
201
+ }
202
+ }
203
+
204
+ @media screen and (prefers-reduced-motion: reduce) {
205
+ .root:where(:not(.disabled)):focus-within::after {
206
+ transition-duration: 0.01ms;
207
+ transition-delay: 0.01ms;
208
+ }
209
+ }
210
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Textarea/Textarea.types.ts"],"sourcesContent":["import type * 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 // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\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 * Textarea base props, excluding design-related props like appearance and size.\n * Note: resize is kept as it is a structural/behavioral prop.\n */\nexport type TextareaBaseProps = Omit<TextareaProps, 'appearance' | 'size'>;\n\n/**\n * State used in rendering Textarea\n */\nexport type TextareaState = ComponentState<TextareaSlots> &\n Required<Pick<TextareaProps, 'appearance' | 'resize' | 'size'>>;\n\n/**\n * Textarea base state, excluding design-related state like appearance and size.\n */\nexport type TextareaBaseState = Omit<TextareaState, 'appearance' | '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"],"names":[],"mappings":"AAkFA;;CAEC,GACD,WAEE"}
1
+ {"version":3,"sources":["../../../src/components/Textarea/Textarea.types.ts"],"sourcesContent":["import type * 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 // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\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 * Textarea base props, excluding design-related props like appearance and size.\n * Note: resize is kept as it is a structural/behavioral prop.\n */\nexport type TextareaBaseProps = Omit<TextareaProps, 'appearance' | 'size'>;\n\n/**\n * State used in rendering Textarea\n */\nexport type TextareaState = ComponentState<TextareaSlots> &\n Required<Pick<TextareaProps, 'appearance' | 'resize' | 'size'>>;\n\n/**\n * Textarea base state, excluding design-related state like appearance and size.\n */\nexport type TextareaBaseState = Omit<TextareaState, 'appearance' | '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"],"names":[],"mappings":"AAkFA;;CAEC,GACD,WAEE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Textarea/index.ts"],"sourcesContent":["export { Textarea } from './Textarea';\nexport type {\n TextareaBaseProps,\n TextareaBaseState,\n TextareaOnChangeData,\n TextareaProps,\n TextareaSlots,\n TextareaState,\n} from './Textarea.types';\nexport { renderTextarea_unstable } from './renderTextarea';\nexport { useTextarea_unstable, useTextareaBase_unstable } from './useTextarea';\nexport { textareaClassNames, useTextareaStyles_unstable } from './useTextareaStyles.styles';\n"],"names":["Textarea","renderTextarea_unstable","useTextarea_unstable","useTextareaBase_unstable","textareaClassNames","useTextareaStyles_unstable"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAa;AAStC,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,oBAAoB,EAAEC,wBAAwB,QAAQ,mBAAgB;AAC/E,SAASC,kBAAkB,EAAEC,0BAA0B,QAAQ,gCAA6B"}
1
+ {"version":3,"sources":["../../../src/components/Textarea/index.ts"],"sourcesContent":["export { Textarea } from './Textarea';\nexport type {\n TextareaBaseProps,\n TextareaBaseState,\n TextareaOnChangeData,\n TextareaProps,\n TextareaSlots,\n TextareaState,\n} from './Textarea.types';\nexport { renderTextarea_unstable } from './renderTextarea';\nexport { useTextarea_unstable, useTextareaBase_unstable } from './useTextarea';\nexport { textareaClassNames, useTextareaStyles_unstable } from './useTextareaStyles.styles';\n"],"names":["Textarea","renderTextarea_unstable","useTextarea_unstable","useTextareaBase_unstable","textareaClassNames","useTextareaStyles_unstable"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAa;AAStC,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,oBAAoB,EAAEC,wBAAwB,QAAQ,mBAAgB;AAC/E,SAASC,kBAAkB,EAAEC,0BAA0B,QAAQ,gCAA6B"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from "@fluentui/react-utilities";
1
+ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from "@fluentui/react-utilities";
3
3
  /**
4
4
  * Render the final JSX of Textarea
5
5
  */ export const renderTextarea_unstable = (state)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Textarea/renderTextarea.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { TextareaBaseState, TextareaSlots } from './Textarea.types';\n\n/**\n * Render the final JSX of Textarea\n */\nexport const renderTextarea_unstable = (state: TextareaBaseState): JSXElement => {\n assertSlots<TextareaSlots>(state);\n\n return (\n <state.root>\n <state.textarea />\n </state.root>\n );\n};\n"],"names":["assertSlots","renderTextarea_unstable","state","root","textarea"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC;IACtCF,YAA2BE;IAE3B,qBACE,KAACA,MAAMC,IAAI;kBACT,cAAA,KAACD,MAAME,QAAQ;;AAGrB,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/Textarea/renderTextarea.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { TextareaBaseState, TextareaSlots } from './Textarea.types';\n\n/**\n * Render the final JSX of Textarea\n */\nexport const renderTextarea_unstable = (state: TextareaBaseState): JSXElement => {\n assertSlots<TextareaSlots>(state);\n\n return (\n <state.root>\n <state.textarea />\n </state.root>\n );\n};\n"],"names":["assertSlots","renderTextarea_unstable","state","root","textarea"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC;IACtCF,YAA2BE;IAE3B,qBACE,KAACA,MAAMC,IAAI;kBACT,cAAA,KAACD,MAAME,QAAQ;;AAGrB,EAAE"}
@@ -11,10 +11,10 @@ import { useOverrides_unstable as useOverrides } from "@fluentui/react-shared-co
11
11
  * @param props - props from this instance of Textarea
12
12
  * @param ref - reference to root HTMLElement of Textarea
13
13
  */ export const useTextarea_unstable = (props, ref)=>{
14
+ var _ref, _overrides_inputDefaultAppearance;
14
15
  const overrides = useOverrides();
15
16
  const fieldContext = useFieldContext_unstable();
16
- var _fieldContext_size, _overrides_inputDefaultAppearance;
17
- const { size = (_fieldContext_size = fieldContext === null || fieldContext === void 0 ? void 0 : fieldContext.size) !== null && _fieldContext_size !== void 0 ? _fieldContext_size : 'medium', appearance = (_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline', ...baseProps } = props;
17
+ const { size = (_ref = fieldContext === null || fieldContext === void 0 ? void 0 : fieldContext.size) !== null && _ref !== void 0 ? _ref : 'medium', appearance = (_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline', ...baseProps } = props;
18
18
  if (process.env.NODE_ENV !== 'production' && (appearance === 'filled-darker-shadow' || appearance === 'filled-lighter-shadow')) {
19
19
  // eslint-disable-next-line no-console
20
20
  console.error("The 'filled-darker-shadow' and 'filled-lighter-shadow' appearances are deprecated and will be removed in the" + ' future.');
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Textarea/useTextarea.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useFieldContext_unstable, useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getPartitionedNativeProps, useControllableState, useEventCallback, slot } from '@fluentui/react-utilities';\nimport type { TextareaBaseProps, TextareaBaseState, 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 const fieldContext = useFieldContext_unstable();\n\n const {\n size = fieldContext?.size ?? 'medium',\n appearance = overrides.inputDefaultAppearance ?? 'outline',\n ...baseProps\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 baseState = useTextareaBase_unstable(baseProps, ref);\n\n return {\n ...baseState,\n size,\n appearance,\n };\n};\n\n/**\n * Base hook for Textarea component, which manages state related to slots structure and\n * controlled/uncontrolled value state.\n *\n * @param props - User provided props to the Textarea component.\n * @param ref - User provided ref to be passed to the Textarea component.\n */\nexport const useTextareaBase_unstable = (\n props: TextareaBaseProps,\n ref?: React.Ref<HTMLTextAreaElement>,\n): TextareaBaseState => {\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, { supportsLabelFor: true, supportsRequired: true });\n\n const { resize = 'none', onChange } = props;\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: TextareaBaseState = {\n resize,\n components: {\n root: 'span',\n textarea: 'textarea',\n },\n textarea: slot.always(props.textarea, {\n defaultProps: {\n ref,\n ...nativeProps.primary,\n },\n elementType: 'textarea',\n }),\n root: slot.always(props.root, {\n defaultProps: nativeProps.root,\n elementType: 'span',\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"],"names":["useFieldContext_unstable","useFieldControlProps_unstable","getPartitionedNativeProps","useControllableState","useEventCallback","slot","useOverrides_unstable","useOverrides","useTextarea_unstable","props","ref","overrides","fieldContext","size","appearance","inputDefaultAppearance","baseProps","process","env","NODE_ENV","console","error","baseState","useTextareaBase_unstable","supportsLabelFor","supportsRequired","resize","onChange","value","setValue","state","defaultState","defaultValue","initialState","undefined","nativeProps","primarySlotTagName","excludedPropNames","components","root","textarea","always","defaultProps","primary","elementType","ev","newValue","target"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,EAAEC,6BAA6B,QAAQ,wBAAwB;AAChG,SAASC,yBAAyB,EAAEC,oBAAoB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,4BAA4B;AAEpH,SAASC,yBAAyBC,YAAY,QAAQ,kCAAkC;AAExF;;;;;;;;CAQC,GACD,OAAO,MAAMC,uBAAuB,CAACC,OAAsBC;IACzD,MAAMC,YAAYJ;IAClB,MAAMK,eAAeZ;QAGZY,oBACMD;IAFf,MAAM,EACJE,OAAOD,CAAAA,qBAAAA,yBAAAA,mCAAAA,aAAcC,IAAI,cAAlBD,gCAAAA,qBAAsB,QAAQ,EACrCE,aAAaH,CAAAA,oCAAAA,UAAUI,sBAAsB,cAAhCJ,+CAAAA,oCAAoC,SAAS,EAC1D,GAAGK,WACJ,GAAGP;IAEJ,IACEQ,QAAQC,GAAG,CAACC,QAAQ,KAAK,gBACxBL,CAAAA,eAAe,0BAA0BA,eAAe,uBAAsB,GAC/E;QACA,sCAAsC;QACtCM,QAAQC,KAAK,CACX,iHACE;IAEN;IAEA,MAAMC,YAAYC,yBAAyBP,WAAWN;IAEtD,OAAO;QACL,GAAGY,SAAS;QACZT;QACAC;IACF;AACF,EAAE;AAEF;;;;;;CAMC,GACD,OAAO,MAAMS,2BAA2B,CACtCd,OACAC;IAEA,+CAA+C;IAC/CD,QAAQR,8BAA8BQ,OAAO;QAAEe,kBAAkB;QAAMC,kBAAkB;IAAK;IAE9F,MAAM,EAAEC,SAAS,MAAM,EAAEC,QAAQ,EAAE,GAAGlB;IAEtC,MAAM,CAACmB,OAAOC,SAAS,GAAG1B,qBAAqB;QAC7C2B,OAAOrB,MAAMmB,KAAK;QAClBG,cAActB,MAAMuB,YAAY;QAChCC,cAAcC;IAChB;IAEA,MAAMC,cAAcjC,0BAA0B;QAC5CO;QACA2B,oBAAoB;QACpBC,mBAAmB;YAAC;YAAY;YAAS;SAAe;IAC1D;IAEA,MAAMP,QAA2B;QAC/BJ;QACAY,YAAY;YACVC,MAAM;YACNC,UAAU;QACZ;QACAA,UAAUnC,KAAKoC,MAAM,CAAChC,MAAM+B,QAAQ,EAAE;YACpCE,cAAc;gBACZhC;gBACA,GAAGyB,YAAYQ,OAAO;YACxB;YACAC,aAAa;QACf;QACAL,MAAMlC,KAAKoC,MAAM,CAAChC,MAAM8B,IAAI,EAAE;YAC5BG,cAAcP,YAAYI,IAAI;YAC9BK,aAAa;QACf;IACF;IAEAd,MAAMU,QAAQ,CAACZ,KAAK,GAAGA;IACvBE,MAAMU,QAAQ,CAACb,QAAQ,GAAGvB,iBAAiByC,CAAAA;QACzC,MAAMC,WAAWD,GAAGE,MAAM,CAACnB,KAAK;QAChCD,qBAAAA,+BAAAA,SAAWkB,IAAI;YAAEjB,OAAOkB;QAAS;QACjCjB,SAASiB;IACX;IAEA,OAAOhB;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/Textarea/useTextarea.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useFieldContext_unstable, useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getPartitionedNativeProps, useControllableState, useEventCallback, slot } from '@fluentui/react-utilities';\nimport type { TextareaBaseProps, TextareaBaseState, 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 const fieldContext = useFieldContext_unstable();\n\n const {\n size = fieldContext?.size ?? 'medium',\n appearance = overrides.inputDefaultAppearance ?? 'outline',\n ...baseProps\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 baseState = useTextareaBase_unstable(baseProps, ref);\n\n return {\n ...baseState,\n size,\n appearance,\n };\n};\n\n/**\n * Base hook for Textarea component, which manages state related to slots structure and\n * controlled/uncontrolled value state.\n *\n * @param props - User provided props to the Textarea component.\n * @param ref - User provided ref to be passed to the Textarea component.\n */\nexport const useTextareaBase_unstable = (\n props: TextareaBaseProps,\n ref?: React.Ref<HTMLTextAreaElement>,\n): TextareaBaseState => {\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, { supportsLabelFor: true, supportsRequired: true });\n\n const { resize = 'none', onChange } = props;\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: TextareaBaseState = {\n resize,\n components: {\n root: 'span',\n textarea: 'textarea',\n },\n textarea: slot.always(props.textarea, {\n defaultProps: {\n ref,\n ...nativeProps.primary,\n },\n elementType: 'textarea',\n }),\n root: slot.always(props.root, {\n defaultProps: nativeProps.root,\n elementType: 'span',\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"],"names":["useFieldContext_unstable","useFieldControlProps_unstable","getPartitionedNativeProps","useControllableState","useEventCallback","slot","useOverrides_unstable","useOverrides","useTextarea_unstable","props","ref","overrides","fieldContext","size","appearance","inputDefaultAppearance","baseProps","process","env","NODE_ENV","console","error","baseState","useTextareaBase_unstable","supportsLabelFor","supportsRequired","resize","onChange","value","setValue","state","defaultState","defaultValue","initialState","undefined","nativeProps","primarySlotTagName","excludedPropNames","components","root","textarea","always","defaultProps","primary","elementType","ev","newValue","target"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,EAAEC,6BAA6B,QAAQ,wBAAwB;AAChG,SAASC,yBAAyB,EAAEC,oBAAoB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,4BAA4B;AAEpH,SAASC,yBAAyBC,YAAY,QAAQ,kCAAkC;AAExF;;;;;;;;CAQC,GACD,OAAO,MAAMC,uBAAuB,CAACC,OAAsBC;cAM1CC;IALf,MAAMA,YAAYJ;IAClB,MAAMK,eAAeZ;IAErB,MAAM,EACJa,eAAOD,yBAAAA,mCAAAA,aAAcC,IAAI,uCAAI,QAAQ,EACrCC,cAAaH,oCAAAA,UAAUI,sBAAsB,cAAhCJ,+CAAAA,oCAAoC,SAAS,EAC1D,GAAGK,WACJ,GAAGP;IAEJ,IACEQ,QAAQC,GAAG,CAACC,QAAQ,KAAK,gBACxBL,CAAAA,eAAe,0BAA0BA,eAAe,uBAAsB,GAC/E;QACA,sCAAsC;QACtCM,QAAQC,KAAK,CACX,iHACE;IAEN;IAEA,MAAMC,YAAYC,yBAAyBP,WAAWN;IAEtD,OAAO;QACL,GAAGY,SAAS;QACZT;QACAC;IACF;AACF,EAAE;AAEF;;;;;;CAMC,GACD,OAAO,MAAMS,2BAA2B,CACtCd,OACAC;IAEA,+CAA+C;IAC/CD,QAAQR,8BAA8BQ,OAAO;QAAEe,kBAAkB;QAAMC,kBAAkB;IAAK;IAE9F,MAAM,EAAEC,SAAS,MAAM,EAAEC,QAAQ,EAAE,GAAGlB;IAEtC,MAAM,CAACmB,OAAOC,SAAS,GAAG1B,qBAAqB;QAC7C2B,OAAOrB,MAAMmB,KAAK;QAClBG,cAActB,MAAMuB,YAAY;QAChCC,cAAcC;IAChB;IAEA,MAAMC,cAAcjC,0BAA0B;QAC5CO;QACA2B,oBAAoB;QACpBC,mBAAmB;YAAC;YAAY;YAAS;SAAe;IAC1D;IAEA,MAAMP,QAA2B;QAC/BJ;QACAY,YAAY;YACVC,MAAM;YACNC,UAAU;QACZ;QACAA,UAAUnC,KAAKoC,MAAM,CAAChC,MAAM+B,QAAQ,EAAE;YACpCE,cAAc;gBACZhC;gBACA,GAAGyB,YAAYQ,OAAO;YACxB;YACAC,aAAa;QACf;QACAL,MAAMlC,KAAKoC,MAAM,CAAChC,MAAM8B,IAAI,EAAE;YAC5BG,cAAcP,YAAYI,IAAI;YAC9BK,aAAa;QACf;IACF;IAEAd,MAAMU,QAAQ,CAACZ,KAAK,GAAGA;IACvBE,MAAMU,QAAQ,CAACb,QAAQ,GAAGvB,iBAAiByC,CAAAA;QACzC,MAAMC,WAAWD,GAAGE,MAAM,CAACnB,KAAK;QAChCD,qBAAAA,+BAAAA,SAAWkB,IAAI;YAAEjB,OAAOkB;QAAS;QACjCjB,SAASiB;IACX;IAEA,OAAOhB;AACT,EAAE"}
@@ -0,0 +1,11 @@
1
+ import { clsx } from "clsx";
2
+ import styles from "./Textarea.module.css";
3
+ export const textareaClassNames = {
4
+ root: 'fui-Textarea',
5
+ textarea: 'fui-Textarea__textarea'
6
+ };
7
+ export const useTextareaStyles_unstable = (state)=>{
8
+ state.root.className = clsx(textareaClassNames.root, styles.root, styles[state.size], styles[state.appearance], styles[state.resize], state.appearance.startsWith('filled') && styles.filled, state.textarea.disabled && styles.disabled, String(state.textarea['aria-invalid']) === 'true' && styles.invalid, state.root.className);
9
+ state.textarea.className = clsx(textareaClassNames.textarea, styles.textarea, state.textarea.className);
10
+ return state;
11
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Textarea/useTextareaStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { TextareaState, TextareaSlots } from './Textarea.types';\nimport styles from './Textarea.module.css';\n\nexport const textareaClassNames: SlotClassNames<TextareaSlots> = {\n root: 'fui-Textarea',\n textarea: 'fui-Textarea__textarea',\n};\n\nexport const useTextareaStyles_unstable = (state: TextareaState): TextareaState => {\n state.root.className = clsx(\n textareaClassNames.root,\n styles.root,\n styles[state.size],\n styles[state.appearance],\n styles[state.resize],\n state.appearance.startsWith('filled') && styles.filled,\n state.textarea.disabled && styles.disabled,\n String(state.textarea['aria-invalid']) === 'true' && styles.invalid,\n state.root.className,\n );\n state.textarea.className = clsx(textareaClassNames.textarea, styles.textarea, state.textarea.className);\n return state;\n};\n"],"names":["clsx","styles","textareaClassNames","root","textarea","useTextareaStyles_unstable","state","className","size","appearance","resize","startsWith","filled","disabled","String","invalid"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,wBAAwB;AAE3C,OAAO,MAAMC,qBAAoD;IAC/DC,MAAM;IACNC,UAAU;AACZ,EAAE;AAEF,OAAO,MAAMC,6BAA6B,CAACC;IACzCA,MAAMH,IAAI,CAACI,SAAS,GAAGP,KACrBE,mBAAmBC,IAAI,EACvBF,OAAOE,IAAI,EACXF,MAAM,CAACK,MAAME,IAAI,CAAC,EAClBP,MAAM,CAACK,MAAMG,UAAU,CAAC,EACxBR,MAAM,CAACK,MAAMI,MAAM,CAAC,EACpBJ,MAAMG,UAAU,CAACE,UAAU,CAAC,aAAaV,OAAOW,MAAM,EACtDN,MAAMF,QAAQ,CAACS,QAAQ,IAAIZ,OAAOY,QAAQ,EAC1CC,OAAOR,MAAMF,QAAQ,CAAC,eAAe,MAAM,UAAUH,OAAOc,OAAO,EACnET,MAAMH,IAAI,CAACI,SAAS;IAEtBD,MAAMF,QAAQ,CAACG,SAAS,GAAGP,KAAKE,mBAAmBE,QAAQ,EAAEH,OAAOG,QAAQ,EAAEE,MAAMF,QAAQ,CAACG,SAAS;IACtG,OAAOD;AACT,EAAE"}
@@ -0,0 +1,11 @@
1
+ import { clsx } from "clsx";
2
+ import styles from "./Textarea.module.css";
3
+ export const textareaClassNames = {
4
+ root: 'fui-Textarea',
5
+ textarea: 'fui-Textarea__textarea'
6
+ };
7
+ export const useTextareaStyles_unstable = (state)=>{
8
+ state.root.className = clsx(textareaClassNames.root, styles.root, styles[state.size], styles[state.appearance], styles[state.resize], state.appearance.startsWith('filled') && styles.filled, state.textarea.disabled && styles.disabled, String(state.textarea['aria-invalid']) === 'true' && styles.invalid, state.root.className);
9
+ state.textarea.className = clsx(textareaClassNames.textarea, styles.textarea, state.textarea.className);
10
+ return state;
11
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Textarea/useTextareaStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { TextareaState, TextareaSlots } from './Textarea.types';\nimport styles from './Textarea.module.css';\n\nexport const textareaClassNames: SlotClassNames<TextareaSlots> = {\n root: 'fui-Textarea',\n textarea: 'fui-Textarea__textarea',\n};\n\nexport const useTextareaStyles_unstable = (state: TextareaState): TextareaState => {\n state.root.className = clsx(\n textareaClassNames.root,\n styles.root,\n styles[state.size],\n styles[state.appearance],\n styles[state.resize],\n state.appearance.startsWith('filled') && styles.filled,\n state.textarea.disabled && styles.disabled,\n String(state.textarea['aria-invalid']) === 'true' && styles.invalid,\n state.root.className,\n );\n state.textarea.className = clsx(textareaClassNames.textarea, styles.textarea, state.textarea.className);\n return state;\n};\n"],"names":["clsx","styles","textareaClassNames","root","textarea","useTextareaStyles_unstable","state","className","size","appearance","resize","startsWith","filled","disabled","String","invalid"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,wBAAwB;AAE3C,OAAO,MAAMC,qBAAoD;IAC/DC,MAAM;IACNC,UAAU;AACZ,EAAE;AAEF,OAAO,MAAMC,6BAA6B,CAACC;IACzCA,MAAMH,IAAI,CAACI,SAAS,GAAGP,KACrBE,mBAAmBC,IAAI,EACvBF,OAAOE,IAAI,EACXF,MAAM,CAACK,MAAME,IAAI,CAAC,EAClBP,MAAM,CAACK,MAAMG,UAAU,CAAC,EACxBR,MAAM,CAACK,MAAMI,MAAM,CAAC,EACpBJ,MAAMG,UAAU,CAACE,UAAU,CAAC,aAAaV,OAAOW,MAAM,EACtDN,MAAMF,QAAQ,CAACS,QAAQ,IAAIZ,OAAOY,QAAQ,EAC1CC,OAAOR,MAAMF,QAAQ,CAAC,eAAe,MAAM,UAAUH,OAAOc,OAAO,EACnET,MAAMH,IAAI,CAACI,SAAS;IAEtBD,MAAMF,QAAQ,CAACG,SAAS,GAAGP,KAAKE,mBAAmBE,QAAQ,EAAEH,OAAOG,QAAQ,EAAEE,MAAMF,QAAQ,CAACG,SAAS;IACtG,OAAOD;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Textarea/useTextareaStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { 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\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 padding: `0 0 ${tokens.strokeWidthThick} 0`,\n margin: '0',\n borderRadius: tokens.borderRadiusMedium,\n verticalAlign: 'top',\n },\n\n disabled: {\n backgroundColor: tokens.colorTransparentBackground,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStrokeDisabled}`,\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 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 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 border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStrokeInteractive}`,\n boxShadow: tokens.shadow2,\n },\n 'filled-lighter-shadow': {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStrokeInteractive}`,\n boxShadow: tokens.shadow2,\n },\n\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n outlineInteractive: {\n ':hover': {\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1Hover}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessibleHover,\n },\n\n ':active': {\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1Pressed}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n\n ':focus-within': {\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1Pressed}`,\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 margin: '0',\n backgroundColor: 'transparent',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n flexGrow: 1,\n fontFamily: tokens.fontFamilyBase,\n height: '100%',\n\n '::placeholder': {\n color: tokens.colorNeutralForeground4,\n opacity: 1,\n },\n\n outlineStyle: 'none', // disable default browser outline\n },\n\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n '::placeholder': {\n color: tokens.colorNeutralForegroundDisabled,\n },\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 minHeight: '40px',\n padding: `${tokens.spacingVerticalXS} calc(${tokens.spacingHorizontalSNudge} + ${tokens.spacingHorizontalXXS})`,\n maxHeight: '200px',\n ...typographyStyles.caption1,\n },\n medium: {\n minHeight: '52px',\n padding: `${tokens.spacingVerticalSNudge} calc(${tokens.spacingHorizontalMNudge} + ${tokens.spacingHorizontalXXS})`,\n maxHeight: '260px',\n ...typographyStyles.body1,\n },\n large: {\n minHeight: '64px',\n padding: `${tokens.spacingVerticalS} calc(${tokens.spacingHorizontalM} + ${tokens.spacingHorizontalXXS})`,\n maxHeight: '320px',\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 // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n textareaClassNames.root,\n rootStyles.base,\n disabled && rootStyles.disabled,\n !disabled && filled && rootStyles.filled,\n !disabled && rootStyles[appearance],\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 // eslint-disable-next-line react-hooks/immutability\n state.textarea.className = mergeClasses(\n textareaClassNames.textarea,\n textareaStyles.base,\n textareaStyles[size],\n textareaResizeStyles[resize],\n disabled && textareaStyles.disabled,\n state.textarea.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","textareaClassNames","root","textarea","useRootStyles","base","display","boxSizing","position","padding","strokeWidthThick","margin","borderRadius","borderRadiusMedium","verticalAlign","disabled","backgroundColor","colorTransparentBackground","border","strokeWidthThin","colorNeutralStrokeDisabled","borderColor","interactive","content","left","bottom","right","height","borderBottomLeftRadius","borderBottomRightRadius","borderBottom","colorCompoundBrandStroke","clipPath","transform","transitionProperty","transitionDuration","durationUltraFast","transitionDelay","curveAccelerateMid","durationNormal","curveDecelerateMid","borderBottomColor","colorCompoundBrandStrokePressed","outlineWidth","outlineStyle","outlineColor","filled","colorTransparentStroke","colorTransparentStrokeInteractive","colorNeutralBackground3","colorNeutralBackground1","boxShadow","shadow2","outline","colorNeutralStroke1","colorNeutralStrokeAccessible","outlineInteractive","colorNeutralStroke1Hover","colorNeutralStrokeAccessibleHover","colorNeutralStroke1Pressed","colorNeutralStrokeAccessiblePressed","invalid","colorPaletteRedBorder2","useTextareaStyles","borderStyle","color","colorNeutralForeground1","flexGrow","fontFamily","fontFamilyBase","colorNeutralForeground4","opacity","colorNeutralForegroundDisabled","cursor","small","minHeight","spacingVerticalXS","spacingHorizontalSNudge","spacingHorizontalXXS","maxHeight","caption1","medium","spacingVerticalSNudge","spacingHorizontalMNudge","body1","large","spacingVerticalS","spacingHorizontalM","body2","useTextareaResizeStyles","none","resize","both","horizontal","vertical","useTextareaStyles_unstable","state","size","appearance","startsWith","rootStyles","className","textareaStyles","textareaResizeStyles"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AACtE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AAIjE,OAAO,MAAMC,qBAAoD;IAC/DC,MAAM;IACNC,UAAU;AACZ,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAgBR,WAAW;IAC/BS,MAAM;QACJC,SAAS;QACTC,WAAW;QACXC,UAAU;QACV,oHAAoH;QACpHC,SAAS,CAAC,IAAI,EAAEV,OAAOW,gBAAgB,CAAC,EAAE,CAAC;QAC3CC,QAAQ;QACRC,cAAcb,OAAOc,kBAAkB;QACvCC,eAAe;IACjB;IAEAC,UAAU;QACRC,iBAAiBjB,OAAOkB,0BAA0B;QAClDC,QAAQ,GAAGnB,OAAOoB,eAAe,CAAC,OAAO,EAAEpB,OAAOqB,0BAA0B,EAAE;QAE9E,kCAAkC;YAChC,GAAGtB,WAAWuB,WAAW,CAAC,WAAW;QACvC;IACF;IAEAC,aAAa;QACX,2CAA2C;QAC3C,+FAA+F;QAC/F,WAAW;YACTf,WAAW;YACXgB,SAAS;YACTf,UAAU;YACVgB,MAAM;YACNC,QAAQ;YACRC,OAAO;YAEP,yCAAyC;YACzC,sFAAsF;YACtF,gFAAgF;YAChF,qGAAqG;YACrGC,QAAQ,CAAC,IAAI,EAAE5B,OAAOW,gBAAgB,CAAC,EAAE,EAAEX,OAAOc,kBAAkB,CAAC,CAAC,CAAC;YACvEe,wBAAwB7B,OAAOc,kBAAkB;YACjDgB,yBAAyB9B,OAAOc,kBAAkB;YAElD,mBAAmB;YACnB,8FAA8F;YAC9F,2FAA2F;YAC3F,4EAA4E;YAC5EiB,cAAc,GAAG/B,OAAOW,gBAAgB,CAAC,OAAO,EAAEX,OAAOgC,wBAA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EACnC,CAACnF,YAAYqF,WAAW9E,WAAW,EACnC,CAACP,YAAYmF,eAAe,aAAaE,WAAW5C,kBAAkB,EACtE,CAACzC,YAAY8C,WAAWuC,WAAWvC,OAAO,EAC1CmC,MAAM9F,IAAI,CAACmG,SAAS;IAGtB,MAAMC,iBAAiBvC;IACvB,MAAMwC,uBAAuBd;IAC7B,oDAAoD;IACpDO,MAAM7F,QAAQ,CAACkG,SAAS,GAAGxG,aACzBI,mBAAmBE,QAAQ,EAC3BmG,eAAejG,IAAI,EACnBiG,cAAc,CAACL,KAAK,EACpBM,oBAAoB,CAACZ,OAAO,EAC5B5E,YAAYuF,eAAevF,QAAQ,EACnCiF,MAAM7F,QAAQ,CAACkG,SAAS;IAG1B,OAAOL;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/Textarea/useTextareaStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { 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\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 padding: `0 0 ${tokens.strokeWidthThick} 0`,\n margin: '0',\n borderRadius: tokens.borderRadiusMedium,\n verticalAlign: 'top',\n },\n\n disabled: {\n backgroundColor: tokens.colorTransparentBackground,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStrokeDisabled}`,\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 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 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 border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStrokeInteractive}`,\n boxShadow: tokens.shadow2,\n },\n 'filled-lighter-shadow': {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStrokeInteractive}`,\n boxShadow: tokens.shadow2,\n },\n\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n outlineInteractive: {\n ':hover': {\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1Hover}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessibleHover,\n },\n\n ':active': {\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1Pressed}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n\n ':focus-within': {\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1Pressed}`,\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 margin: '0',\n backgroundColor: 'transparent',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n flexGrow: 1,\n fontFamily: tokens.fontFamilyBase,\n height: '100%',\n\n '::placeholder': {\n color: tokens.colorNeutralForeground4,\n opacity: 1,\n },\n\n outlineStyle: 'none', // disable default browser outline\n },\n\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n '::placeholder': {\n color: tokens.colorNeutralForegroundDisabled,\n },\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 minHeight: '40px',\n padding: `${tokens.spacingVerticalXS} calc(${tokens.spacingHorizontalSNudge} + ${tokens.spacingHorizontalXXS})`,\n maxHeight: '200px',\n ...typographyStyles.caption1,\n },\n medium: {\n minHeight: '52px',\n padding: `${tokens.spacingVerticalSNudge} calc(${tokens.spacingHorizontalMNudge} + ${tokens.spacingHorizontalXXS})`,\n maxHeight: '260px',\n ...typographyStyles.body1,\n },\n large: {\n minHeight: '64px',\n padding: `${tokens.spacingVerticalS} calc(${tokens.spacingHorizontalM} + ${tokens.spacingHorizontalXXS})`,\n maxHeight: '320px',\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 // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n textareaClassNames.root,\n rootStyles.base,\n disabled && rootStyles.disabled,\n !disabled && filled && rootStyles.filled,\n !disabled && rootStyles[appearance],\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 // eslint-disable-next-line react-hooks/immutability\n state.textarea.className = mergeClasses(\n textareaClassNames.textarea,\n textareaStyles.base,\n textareaStyles[size],\n textareaResizeStyles[resize],\n disabled && textareaStyles.disabled,\n state.textarea.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","textareaClassNames","root","textarea","useRootStyles","base","display","boxSizing","position","padding","strokeWidthThick","margin","borderRadius","borderRadiusMedium","verticalAlign","disabled","backgroundColor","colorTransparentBackground","border","strokeWidthThin","colorNeutralStrokeDisabled","borderColor","interactive","content","left","bottom","right","height","borderBottomLeftRadius","borderBottomRightRadius","borderBottom","colorCompoundBrandStroke","clipPath","transform","transitionProperty","transitionDuration","durationUltraFast","transitionDelay","curveAccelerateMid","durationNormal","curveDecelerateMid","borderBottomColor","colorCompoundBrandStrokePressed","outlineWidth","outlineStyle","outlineColor","filled","colorTransparentStroke","colorTransparentStrokeInteractive","colorNeutralBackground3","colorNeutralBackground1","boxShadow","shadow2","outline","colorNeutralStroke1","colorNeutralStrokeAccessible","outlineInteractive","colorNeutralStroke1Hover","colorNeutralStrokeAccessibleHover","colorNeutralStroke1Pressed","colorNeutralStrokeAccessiblePressed","invalid","colorPaletteRedBorder2","useTextareaStyles","borderStyle","color","colorNeutralForeground1","flexGrow","fontFamily","fontFamilyBase","colorNeutralForeground4","opacity","colorNeutralForegroundDisabled","cursor","small","minHeight","spacingVerticalXS","spacingHorizontalSNudge","spacingHorizontalXXS","maxHeight","caption1","medium","spacingVerticalSNudge","spacingHorizontalMNudge","body1","large","spacingVerticalS","spacingHorizontalM","body2","useTextareaResizeStyles","none","resize","both","horizontal","vertical","useTextareaStyles_unstable","state","size","appearance","startsWith","rootStyles","className","textareaStyles","textareaResizeStyles"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AACtE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AAIjE,OAAO,MAAMC,qBAAoD;IAC/DC,MAAM;IACNC,UAAU;AACZ,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAgBR,WAAW;IAC/BS,MAAM;QACJC,SAAS;QACTC,WAAW;QACXC,UAAU;QACV,o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AAQ,EACnCiF,MAAM7F,QAAQ,CAACkG,SAAS;IAG1B,OAAOL;AACT,EAAE"}
@@ -5,26 +5,26 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- Textarea: function() {
12
+ get Textarea () {
13
13
  return _index.Textarea;
14
14
  },
15
- renderTextarea_unstable: function() {
15
+ get renderTextarea_unstable () {
16
16
  return _index.renderTextarea_unstable;
17
17
  },
18
- textareaClassNames: function() {
18
+ get textareaClassNames () {
19
19
  return _index.textareaClassNames;
20
20
  },
21
- useTextareaBase_unstable: function() {
21
+ get useTextareaBase_unstable () {
22
22
  return _index.useTextareaBase_unstable;
23
23
  },
24
- useTextareaStyles_unstable: function() {
24
+ get useTextareaStyles_unstable () {
25
25
  return _index.useTextareaStyles_unstable;
26
26
  },
27
- useTextarea_unstable: function() {
27
+ get useTextarea_unstable () {
28
28
  return _index.useTextarea_unstable;
29
29
  }
30
30
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Textarea/Textarea.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { renderTextarea_unstable } from './renderTextarea';\nimport { useTextarea_unstable } from './useTextarea';\nimport { useTextareaStyles_unstable } from './useTextareaStyles.styles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { TextareaProps } from './Textarea.types';\nimport { useCustomStyleHook_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 useCustomStyleHook_unstable('useTextareaStyles_unstable')(state);\n\n return renderTextarea_unstable(state);\n});\n\nTextarea.displayName = 'Textarea';\n"],"names":["React","renderTextarea_unstable","useTextarea_unstable","useTextareaStyles_unstable","useCustomStyleHook_unstable","Textarea","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;gCACS,sBAAmB;6BACtB,mBAAgB;yCACV,gCAA6B;qCAG5B,kCAAkC;AAKvE,MAAMK,WAAAA,WAAAA,GAA+CL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,YAAQP,iCAAAA,EAAqBK,OAAOC;QAE1CL,mDAAAA,EAA2BM;QAE3BL,gDAAAA,EAA4B,8BAA8BK;IAE1D,WAAOR,uCAAAA,EAAwBQ;AACjC,GAAG;AAEHJ,SAASK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/Textarea/Textarea.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { renderTextarea_unstable } from './renderTextarea';\nimport { useTextarea_unstable } from './useTextarea';\nimport { useTextareaStyles_unstable } from './useTextareaStyles.styles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { TextareaProps } from './Textarea.types';\nimport { useCustomStyleHook_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 useCustomStyleHook_unstable('useTextareaStyles_unstable')(state);\n\n return renderTextarea_unstable(state);\n});\n\nTextarea.displayName = 'Textarea';\n"],"names":["React","renderTextarea_unstable","useTextarea_unstable","useTextareaStyles_unstable","useCustomStyleHook_unstable","Textarea","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;gCACS,sBAAmB;6BACtB,mBAAgB;yCACV,gCAA6B;qCAG5B,kCAAkC;AAKvE,MAAMK,WAAAA,WAAAA,GAA+CL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,YAAQP,iCAAAA,EAAqBK,OAAOC;QAE1CL,mDAAAA,EAA2BM;QAE3BL,gDAAAA,EAA4B,8BAA8BK;IAE1D,WAAOR,uCAAAA,EAAwBQ;AACjC,GAAG;AAEHJ,SAASK,WAAW,GAAG"}