From 416d7ddb3bd0ef5187c151807f10a0cfa721e0c1 Mon Sep 17 00:00:00 2001 From: Dave Rupert Date: Wed, 4 Sep 2024 09:04:15 -0500 Subject: [PATCH] chore(web-components): add missing export for textarea (#32450) --- ...-fbe83ca6-95b0-48ac-a8c5-dcdd07033e4d.json | 7 ++ packages/web-components/docs/api-report.md | 72 ++++++++++++++++++- packages/web-components/src/index.ts | 1 + packages/web-components/src/textarea/index.ts | 3 - .../src/textarea/textarea.options.ts | 21 ++---- .../web-components/src/textarea/textarea.ts | 9 ++- 6 files changed, 90 insertions(+), 23 deletions(-) create mode 100644 change/@fluentui-web-components-fbe83ca6-95b0-48ac-a8c5-dcdd07033e4d.json diff --git a/change/@fluentui-web-components-fbe83ca6-95b0-48ac-a8c5-dcdd07033e4d.json b/change/@fluentui-web-components-fbe83ca6-95b0-48ac-a8c5-dcdd07033e4d.json new file mode 100644 index 00000000000000..6ee2eb780eb24a --- /dev/null +++ b/change/@fluentui-web-components-fbe83ca6-95b0-48ac-a8c5-dcdd07033e4d.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "chore: add missing export for textarea", + "packageName": "@fluentui/web-components", + "email": "rupertdavid@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/web-components/docs/api-report.md b/packages/web-components/docs/api-report.md index ddf4a45380af48..b177d5c72369ed 100644 --- a/packages/web-components/docs/api-report.md +++ b/packages/web-components/docs/api-report.md @@ -2277,7 +2277,6 @@ export const DividerAppearance: { readonly strong: "strong"; readonly brand: "brand"; readonly subtle: "subtle"; - readonly default: "default"; }; // @public @@ -2544,7 +2543,6 @@ export const ImageFit: { readonly center: "center"; readonly contain: "contain"; readonly cover: "cover"; - readonly default: "default"; }; // @public @@ -2667,6 +2665,11 @@ export type LinkAppearance = ValuesOf; // @public (undocumented) export const LinkDefinition: FASTElementDefinition; +// Warning: (ae-missing-release-tag) "styles" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const LinkStyles: ElementStyles; + // @public export const LinkTarget: { readonly _self: "_self"; @@ -2892,6 +2895,66 @@ export const MenuStyles: ElementStyles; // @public (undocumented) export const MenuTemplate: ElementViewTemplate; +// @public +export class MessageBar extends FASTElement { + constructor(); + dismissMessageBar: () => void; + // @internal + elementInternals: ElementInternals; + intent?: MessageBarIntent; + intentChanged(prev: MessageBarIntent | undefined, next: MessageBarIntent | undefined): void; + layout?: MessageBarLayout; + layoutChanged(prev: MessageBarLayout | undefined, next: MessageBarLayout | undefined): void; + shape?: MessageBarShape; + shapeChanged(prev: MessageBarShape | undefined, next: MessageBarShape | undefined): void; +} + +// @public +export const MessageBarDefinition: FASTElementDefinition; + +// Warning: (ae-missing-release-tag) "MessageBarIntent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const MessageBarIntent: { + readonly success: "success"; + readonly warning: "warning"; + readonly error: "error"; + readonly info: "info"; +}; + +// @public (undocumented) +export type MessageBarIntent = ValuesOf; + +// Warning: (ae-missing-release-tag) "MessageBarLayout" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const MessageBarLayout: { + readonly multiline: "multiline"; + readonly singleline: "singleline"; +}; + +// @public (undocumented) +export type MessageBarLayout = ValuesOf; + +// Warning: (ae-missing-release-tag) "MessageBarShape" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const MessageBarShape: { + readonly rounded: "rounded"; + readonly square: "square"; +}; + +// @public (undocumented) +export type MessageBarShape = ValuesOf; + +// @public +export const MessageBarStyles: ElementStyles; + +// Warning: (ae-missing-release-tag) "template" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const MessageBarTemplate: ElementViewTemplate; + // @public class ProgressBar_2 extends BaseProgressBar { shape?: ProgressBarShape; @@ -3739,6 +3802,11 @@ export const TextAreaAppearance: { // @public (undocumented) export type TextAreaAppearance = ValuesOf; +// Warning: (ae-missing-release-tag) "TextAreaAppearancesForDisplayShadow" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const TextAreaAppearancesForDisplayShadow: Partial; + // Warning: (ae-missing-release-tag) "TextAreaAutocomplete" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public diff --git a/packages/web-components/src/index.ts b/packages/web-components/src/index.ts index 06057175845b1c..a9f17079839060 100644 --- a/packages/web-components/src/index.ts +++ b/packages/web-components/src/index.ts @@ -254,6 +254,7 @@ export { BaseTextArea, TextArea, TextAreaAppearance, + TextAreaAppearancesForDisplayShadow, TextAreaAutocomplete, TextAreaDefinition, TextAreaResize, diff --git a/packages/web-components/src/textarea/index.ts b/packages/web-components/src/textarea/index.ts index bd8a71874feb12..b53b04c70cbb08 100644 --- a/packages/web-components/src/textarea/index.ts +++ b/packages/web-components/src/textarea/index.ts @@ -4,9 +4,6 @@ export { TextAreaAppearance, TextAreaAppearancesForDisplayShadow, TextAreaAutocomplete, - TextAreaResizableResize, - TextAreaHorizontallyResizableResize, - TextAreaVerticallyResizableResize, TextAreaResize, TextAreaSize, } from './textarea.options.js'; diff --git a/packages/web-components/src/textarea/textarea.options.ts b/packages/web-components/src/textarea/textarea.options.ts index 62c609c73fe6e8..8a8de566fd84b0 100644 --- a/packages/web-components/src/textarea/textarea.options.ts +++ b/packages/web-components/src/textarea/textarea.options.ts @@ -26,6 +26,11 @@ export const TextAreaAppearance = { export type TextAreaAppearance = ValuesOf; +/** + * Allowed values for `appearance` when `display-shadow` is set to true. + * + * @public + */ export const TextAreaAppearancesForDisplayShadow: Partial = [ TextAreaAppearance.filledLighter, TextAreaAppearance.filledDarker, @@ -54,19 +59,3 @@ export const TextAreaResize = { } as const; export type TextAreaResize = ValuesOf; - -export const TextAreaResizableResize: Partial = [ - TextAreaResize.both, - TextAreaResize.horizontal, - TextAreaResize.vertical, -]; - -export const TextAreaVerticallyResizableResize: Partial = [ - TextAreaResize.both, - TextAreaResize.vertical, -]; - -export const TextAreaHorizontallyResizableResize: Partial = [ - TextAreaResize.both, - TextAreaResize.horizontal, -]; diff --git a/packages/web-components/src/textarea/textarea.ts b/packages/web-components/src/textarea/textarea.ts index a275be98df5fc3..f574f3c3f52b23 100644 --- a/packages/web-components/src/textarea/textarea.ts +++ b/packages/web-components/src/textarea/textarea.ts @@ -5,7 +5,6 @@ import { TextAreaAppearance, TextAreaAppearancesForDisplayShadow, TextAreaAutocomplete, - TextAreaResizableResize, TextAreaResize, TextAreaSize, } from './textarea.options.js'; @@ -275,7 +274,13 @@ export class BaseTextArea extends FASTElement { toggleState(this.elementInternals, `resize-${next}`, true); } - toggleState(this.elementInternals, `resize`, TextAreaResizableResize.includes(this.resize)); + toggleState( + this.elementInternals, + `resize`, + ([TextAreaResize.both, TextAreaResize.horizontal, TextAreaResize.vertical] as Partial).includes( + this.resize, + ), + ); } /**