@fluentui/react-alert 9.0.0-beta.87 → 9.0.0-beta.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,67 @@
2
2
  "name": "@fluentui/react-alert",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 18 Oct 2023 17:47:37 GMT",
5
+ "date": "Sat, 28 Oct 2023 23:32:01 GMT",
6
+ "tag": "@fluentui/react-alert_v9.0.0-beta.89",
7
+ "version": "9.0.0-beta.89",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "lingfan.gao@microsoft.com",
12
+ "package": "@fluentui/react-alert",
13
+ "commit": "d4ad8bc01ee253a6da6a2f7e0b8978ee900e7887",
14
+ "comment": "feat: deprecate component and utilities"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-alert",
19
+ "comment": "Bump @fluentui/react-avatar to v9.5.43",
20
+ "commit": "555b0fae3ec7f052e765557ae243c58000514f92"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-alert",
25
+ "comment": "Bump @fluentui/react-button to v9.3.52",
26
+ "commit": "555b0fae3ec7f052e765557ae243c58000514f92"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-alert",
31
+ "comment": "Bump @fluentui/react-tabster to v9.14.2",
32
+ "commit": "555b0fae3ec7f052e765557ae243c58000514f92"
33
+ }
34
+ ]
35
+ }
36
+ },
37
+ {
38
+ "date": "Mon, 23 Oct 2023 09:51:57 GMT",
39
+ "tag": "@fluentui/react-alert_v9.0.0-beta.88",
40
+ "version": "9.0.0-beta.88",
41
+ "comments": {
42
+ "prerelease": [
43
+ {
44
+ "author": "beachball",
45
+ "package": "@fluentui/react-alert",
46
+ "comment": "Bump @fluentui/react-avatar to v9.5.42",
47
+ "commit": "e4ef1febe8a185dddc10f8936944d177d50bc396"
48
+ },
49
+ {
50
+ "author": "beachball",
51
+ "package": "@fluentui/react-alert",
52
+ "comment": "Bump @fluentui/react-button to v9.3.51",
53
+ "commit": "e4ef1febe8a185dddc10f8936944d177d50bc396"
54
+ },
55
+ {
56
+ "author": "beachball",
57
+ "package": "@fluentui/react-alert",
58
+ "comment": "Bump @fluentui/react-tabster to v9.14.1",
59
+ "commit": "e4ef1febe8a185dddc10f8936944d177d50bc396"
60
+ }
61
+ ]
62
+ }
63
+ },
64
+ {
65
+ "date": "Wed, 18 Oct 2023 17:54:08 GMT",
6
66
  "tag": "@fluentui/react-alert_v9.0.0-beta.87",
7
67
  "version": "9.0.0-beta.87",
8
68
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,35 @@
1
1
  # Change Log - @fluentui/react-alert
2
2
 
3
- This log was last generated on Wed, 18 Oct 2023 17:47:37 GMT and should not be manually modified.
3
+ This log was last generated on Sat, 28 Oct 2023 23:32:01 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0-beta.89](https://github.com/microsoft/fluentui/tree/@fluentui/react-alert_v9.0.0-beta.89)
8
+
9
+ Sat, 28 Oct 2023 23:32:01 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-alert_v9.0.0-beta.88..@fluentui/react-alert_v9.0.0-beta.89)
11
+
12
+ ### Changes
13
+
14
+ - feat: deprecate component and utilities ([PR #29615](https://github.com/microsoft/fluentui/pull/29615) by lingfan.gao@microsoft.com)
15
+ - Bump @fluentui/react-avatar to v9.5.43 ([commit](https://github.com/microsoft/fluentui/commit/555b0fae3ec7f052e765557ae243c58000514f92) by beachball)
16
+ - Bump @fluentui/react-button to v9.3.52 ([commit](https://github.com/microsoft/fluentui/commit/555b0fae3ec7f052e765557ae243c58000514f92) by beachball)
17
+ - Bump @fluentui/react-tabster to v9.14.2 ([commit](https://github.com/microsoft/fluentui/commit/555b0fae3ec7f052e765557ae243c58000514f92) by beachball)
18
+
19
+ ## [9.0.0-beta.88](https://github.com/microsoft/fluentui/tree/@fluentui/react-alert_v9.0.0-beta.88)
20
+
21
+ Mon, 23 Oct 2023 09:51:57 GMT
22
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-alert_v9.0.0-beta.87..@fluentui/react-alert_v9.0.0-beta.88)
23
+
24
+ ### Changes
25
+
26
+ - Bump @fluentui/react-avatar to v9.5.42 ([commit](https://github.com/microsoft/fluentui/commit/e4ef1febe8a185dddc10f8936944d177d50bc396) by beachball)
27
+ - Bump @fluentui/react-button to v9.3.51 ([commit](https://github.com/microsoft/fluentui/commit/e4ef1febe8a185dddc10f8936944d177d50bc396) by beachball)
28
+ - Bump @fluentui/react-tabster to v9.14.1 ([commit](https://github.com/microsoft/fluentui/commit/e4ef1febe8a185dddc10f8936944d177d50bc396) by beachball)
29
+
7
30
  ## [9.0.0-beta.87](https://github.com/microsoft/fluentui/tree/@fluentui/react-alert_v9.0.0-beta.87)
8
31
 
9
- Wed, 18 Oct 2023 17:47:37 GMT
32
+ Wed, 18 Oct 2023 17:54:08 GMT
10
33
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-alert_v9.0.0-beta.86..@fluentui/react-alert_v9.0.0-beta.87)
11
34
 
12
35
  ### Changes
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # @fluentui/react-alert
2
2
 
3
- **React Alert component for [Fluent UI React](https://react.fluentui.dev)**
3
+ ## DEPRECATED
4
4
 
5
- > WIP 🚧 - These are not production-ready components as we are still in a Beta phase.
6
- > See the [spec.md](./Spec.md) for usage and component API details
5
+ This component is deprecated please use the following components instead:
6
+
7
+ - Toast - @fluentui/react-toast
8
+ - MessageBar - @fluentui/react-message-bar
package/dist/index.d.ts CHANGED
@@ -10,6 +10,7 @@ import type { Slot } from '@fluentui/react-utilities';
10
10
  import type { SlotClassNames } from '@fluentui/react-utilities';
11
11
 
12
12
  /**
13
+ * @deprecated please use the Toast or MessageBar component
13
14
  * An Alert component displays a brief, important message to attract a user's attention
14
15
  * without interrupting their current task.
15
16
  */
@@ -19,6 +20,7 @@ export declare const alertClassNames: SlotClassNames<AlertSlots>;
19
20
 
20
21
  /**
21
22
  * Alert Props
23
+ * @deprecated please use the Toast or MessageBar component
22
24
  */
23
25
  export declare type AlertProps = ComponentProps<AlertSlots> & {
24
26
  /**
@@ -33,6 +35,9 @@ export declare type AlertProps = ComponentProps<AlertSlots> & {
33
35
  appearance?: 'primary' | 'inverted';
34
36
  };
35
37
 
38
+ /**
39
+ * @deprecated please use the Toast or MessageBar component
40
+ */
36
41
  export declare type AlertSlots = {
37
42
  /**
38
43
  * The root slot is the top level container for the alert component
@@ -54,12 +59,17 @@ export declare type AlertSlots = {
54
59
 
55
60
  /**
56
61
  * State used in rendering Alert
62
+ * @deprecated please use the Toast or MessageBar component
57
63
  */
58
64
  export declare type AlertState = ComponentState<AlertSlots> & Pick<AlertProps, 'intent'> & Required<Pick<AlertProps, 'appearance'>>;
59
65
 
66
+ /**
67
+ * @deprecated please use the Toast or MessageBar component
68
+ */
60
69
  export declare const renderAlert_unstable: (state: AlertState) => JSX.Element;
61
70
 
62
71
  /**
72
+ * @deprecated please use the Toast or MessageBar component
63
73
  * Create the state required to render Alert.
64
74
  *
65
75
  * The returned state can be modified with hooks such as useAlertStyles_unstable,
@@ -71,6 +81,7 @@ export declare const renderAlert_unstable: (state: AlertState) => JSX.Element;
71
81
  export declare const useAlert_unstable: (props: AlertProps, ref: React_2.Ref<HTMLElement>) => AlertState;
72
82
 
73
83
  /**
84
+ * @deprecated please use the Toast or MessageBar component
74
85
  * Apply styling to the Alert slots based on the state
75
86
  */
76
87
  export declare const useAlertStyles_unstable: (state: AlertState) => AlertState;
@@ -3,11 +3,18 @@ import { renderAlert_unstable } from './renderAlert';
3
3
  import { useAlert_unstable } from './useAlert';
4
4
  import { useAlertStyles_unstable } from './useAlertStyles.styles';
5
5
  /**
6
+ * @deprecated please use the Toast or MessageBar component
6
7
  * An Alert component displays a brief, important message to attract a user's attention
7
8
  * without interrupting their current task.
8
- */ export const Alert = /*#__PURE__*/ React.forwardRef((props, ref)=>{
9
+ */ // eslint-disable-next-line deprecation/deprecation
10
+ export const Alert = /*#__PURE__*/ React.forwardRef((props, ref)=>{
11
+ // eslint-disable-next-line deprecation/deprecation
9
12
  const state = useAlert_unstable(props, ref);
13
+ // eslint-disable-next-line deprecation/deprecation
10
14
  useAlertStyles_unstable(state);
15
+ // eslint-disable-next-line deprecation/deprecation
11
16
  return renderAlert_unstable(state);
17
+ // eslint-disable-next-line deprecation/deprecation
12
18
  });
19
+ // eslint-disable-next-line deprecation/deprecation
13
20
  Alert.displayName = 'Alert';
@@ -1 +1 @@
1
- {"version":3,"sources":["Alert.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { renderAlert_unstable } from './renderAlert';\nimport { useAlert_unstable } from './useAlert';\nimport { useAlertStyles_unstable } from './useAlertStyles.styles';\n\nimport type { AlertProps } from './Alert.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * An Alert component displays a brief, important message to attract a user's attention\n * without interrupting their current task.\n */\nexport const Alert: ForwardRefComponent<AlertProps> = React.forwardRef((props, ref) => {\n const state = useAlert_unstable(props, ref);\n\n useAlertStyles_unstable(state);\n return renderAlert_unstable(state);\n}) as ForwardRefComponent<AlertProps>;\n\nAlert.displayName = 'Alert';\n"],"names":["React","renderAlert_unstable","useAlert_unstable","useAlertStyles_unstable","Alert","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,uBAAuB,QAAQ,0BAA0B;AAKlE;;;CAGC,GACD,OAAO,MAAMC,sBAAyCJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,QAAQN,kBAAkBI,OAAOC;IAEvCJ,wBAAwBK;IACxB,OAAOP,qBAAqBO;AAC9B,GAAsC;AAEtCJ,MAAMK,WAAW,GAAG"}
1
+ {"version":3,"sources":["Alert.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { renderAlert_unstable } from './renderAlert';\nimport { useAlert_unstable } from './useAlert';\nimport { useAlertStyles_unstable } from './useAlertStyles.styles';\n\nimport type { AlertProps } from './Alert.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * @deprecated please use the Toast or MessageBar component\n * An Alert component displays a brief, important message to attract a user's attention\n * without interrupting their current task.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport const Alert: ForwardRefComponent<AlertProps> = React.forwardRef((props, ref) => {\n // eslint-disable-next-line deprecation/deprecation\n const state = useAlert_unstable(props, ref);\n\n // eslint-disable-next-line deprecation/deprecation\n useAlertStyles_unstable(state);\n // eslint-disable-next-line deprecation/deprecation\n return renderAlert_unstable(state);\n // eslint-disable-next-line deprecation/deprecation\n}) as ForwardRefComponent<AlertProps>;\n\n// eslint-disable-next-line deprecation/deprecation\nAlert.displayName = 'Alert';\n"],"names":["React","renderAlert_unstable","useAlert_unstable","useAlertStyles_unstable","Alert","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,uBAAuB,QAAQ,0BAA0B;AAKlE;;;;CAIC,GACD,mDAAmD;AACnD,OAAO,MAAMC,sBAAyCJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IAC7E,mDAAmD;IACnD,MAAMC,QAAQN,kBAAkBI,OAAOC;IAEvC,mDAAmD;IACnDJ,wBAAwBK;IACxB,mDAAmD;IACnD,OAAOP,qBAAqBO;AAC5B,mDAAmD;AACrD,GAAsC;AAEtC,mDAAmD;AACnDJ,MAAMK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Alert.types.ts"],"sourcesContent":["import { Avatar } from '@fluentui/react-avatar';\nimport { Button } from '@fluentui/react-button';\n\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type AlertSlots = {\n /**\n * The root slot is the top level container for the alert component\n */\n root: NonNullable<Slot<'div'>>;\n /**\n * The icon slot renders the icon determined by the `icon` or `intent` prop\n */\n icon?: Slot<'span'>;\n /**\n * The action slot renders a button that prompts the user to take action on the alert\n */\n action?: Slot<typeof Button>;\n /**\n * The avatar slot renders an avatar before the contents of the alert\n */\n avatar?: Slot<typeof Avatar>;\n};\n\n/**\n * Alert Props\n */\nexport type AlertProps = ComponentProps<AlertSlots> & {\n /**\n * The intent prop, if present, determines the icon to be rendered in the icon slot. The icon prop\n * overrides the intent prop\n */\n intent?: 'info' | 'success' | 'error' | 'warning';\n /**\n * The appearance of the Alert.\n * @default 'primary'\n */\n appearance?: 'primary' | 'inverted';\n};\n\n/**\n * State used in rendering Alert\n */\nexport type AlertState = ComponentState<AlertSlots> &\n Pick<AlertProps, 'intent'> &\n Required<Pick<AlertProps, 'appearance'>>;\n"],"names":[],"mappings":"AAAA,WA6C2C"}
1
+ {"version":3,"sources":["Alert.types.ts"],"sourcesContent":["import { Avatar } from '@fluentui/react-avatar';\nimport { Button } from '@fluentui/react-button';\n\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * @deprecated please use the Toast or MessageBar component\n */\nexport type AlertSlots = {\n /**\n * The root slot is the top level container for the alert component\n */\n root: NonNullable<Slot<'div'>>;\n /**\n * The icon slot renders the icon determined by the `icon` or `intent` prop\n */\n icon?: Slot<'span'>;\n /**\n * The action slot renders a button that prompts the user to take action on the alert\n */\n action?: Slot<typeof Button>;\n /**\n * The avatar slot renders an avatar before the contents of the alert\n */\n avatar?: Slot<typeof Avatar>;\n};\n\n/**\n * Alert Props\n * @deprecated please use the Toast or MessageBar component\n */\n// eslint-disable-next-line deprecation/deprecation\nexport type AlertProps = ComponentProps<AlertSlots> & {\n /**\n * The intent prop, if present, determines the icon to be rendered in the icon slot. The icon prop\n * overrides the intent prop\n */\n intent?: 'info' | 'success' | 'error' | 'warning';\n /**\n * The appearance of the Alert.\n * @default 'primary'\n */\n appearance?: 'primary' | 'inverted';\n};\n\n/**\n * State used in rendering Alert\n * @deprecated please use the Toast or MessageBar component\n */\n// eslint-disable-next-line deprecation/deprecation\nexport type AlertState = ComponentState<AlertSlots> &\n // eslint-disable-next-line deprecation/deprecation\n Pick<AlertProps, 'intent'> &\n // eslint-disable-next-line deprecation/deprecation\n Required<Pick<AlertProps, 'appearance'>>;\n"],"names":[],"mappings":"AAAA,WAsD2C"}
@@ -1,6 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-utilities';
3
+ /**
4
+ * @deprecated please use the Toast or MessageBar component
5
+ */ // eslint-disable-next-line deprecation/deprecation
3
6
  export const renderAlert_unstable = (state)=>{
7
+ // eslint-disable-next-line deprecation/deprecation
4
8
  assertSlots(state);
5
9
  return /*#__PURE__*/ _jsxs(state.root, {
6
10
  children: [
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAlert.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\n\nimport type { AlertState, AlertSlots } from './Alert.types';\n\nexport const renderAlert_unstable = (state: AlertState) => {\n assertSlots<AlertSlots>(state);\n\n return (\n <state.root>\n {state.icon && <state.icon />}\n {state.avatar && <state.avatar />}\n {state.root.children}\n {state.action && <state.action />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderAlert_unstable","state","root","icon","avatar","children","action"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD,OAAO,MAAMC,uBAAuB,CAACC;IACnCF,YAAwBE;IAExB,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,IAAI,kBAAI,KAACF,MAAME,IAAI;YACzBF,MAAMG,MAAM,kBAAI,KAACH,MAAMG,MAAM;YAC7BH,MAAMC,IAAI,CAACG,QAAQ;YACnBJ,MAAMK,MAAM,kBAAI,KAACL,MAAMK,MAAM;;;AAGpC,EAAE"}
1
+ {"version":3,"sources":["renderAlert.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\n\nimport type { AlertState, AlertSlots } from './Alert.types';\n\n/**\n * @deprecated please use the Toast or MessageBar component\n */\n// eslint-disable-next-line deprecation/deprecation\nexport const renderAlert_unstable = (state: AlertState) => {\n // eslint-disable-next-line deprecation/deprecation\n assertSlots<AlertSlots>(state);\n\n return (\n <state.root>\n {state.icon && <state.icon />}\n {state.avatar && <state.avatar />}\n {state.root.children}\n {state.action && <state.action />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderAlert_unstable","state","root","icon","avatar","children","action"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,mDAAmD;AACnD,OAAO,MAAMC,uBAAuB,CAACC;IACnC,mDAAmD;IACnDF,YAAwBE;IAExB,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,IAAI,kBAAI,KAACF,MAAME,IAAI;YACzBF,MAAMG,MAAM,kBAAI,KAACH,MAAMG,MAAM;YAC7BH,MAAMC,IAAI,CAACG,QAAQ;YACnBJ,MAAMK,MAAM,kBAAI,KAACL,MAAMK,MAAM;;;AAGpC,EAAE"}
@@ -4,6 +4,7 @@ import { Button } from '@fluentui/react-button';
4
4
  import { CheckmarkCircleFilled, DismissCircleFilled, InfoFilled, WarningFilled } from '@fluentui/react-icons';
5
5
  import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
6
6
  /**
7
+ * @deprecated please use the Toast or MessageBar component
7
8
  * Create the state required to render Alert.
8
9
  *
9
10
  * The returned state can be modified with hooks such as useAlertStyles_unstable,
@@ -11,7 +12,8 @@ import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
11
12
  *
12
13
  * @param props - props from this instance of Alert
13
14
  * @param ref - reference to root HTMLElement of Alert
14
- */ export const useAlert_unstable = (props, ref)=>{
15
+ */ // eslint-disable-next-line deprecation/deprecation
16
+ export const useAlert_unstable = (props, ref)=>{
15
17
  const { appearance = 'primary', intent } = props;
16
18
  /** Determine the role and icon to render based on the intent */ let defaultIcon;
17
19
  let defaultRole = 'status';
@@ -1 +1 @@
1
- {"version":3,"sources":["useAlert.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Avatar } from '@fluentui/react-avatar';\nimport { Button } from '@fluentui/react-button';\nimport { CheckmarkCircleFilled, DismissCircleFilled, InfoFilled, WarningFilled } from '@fluentui/react-icons';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\n\nimport type { AlertProps, AlertState } from './Alert.types';\n\n/**\n * Create the state required to render Alert.\n *\n * The returned state can be modified with hooks such as useAlertStyles_unstable,\n * before being passed to renderAlert_unstable.\n *\n * @param props - props from this instance of Alert\n * @param ref - reference to root HTMLElement of Alert\n */\nexport const useAlert_unstable = (props: AlertProps, ref: React.Ref<HTMLElement>): AlertState => {\n const { appearance = 'primary', intent } = props;\n\n /** Determine the role and icon to render based on the intent */\n let defaultIcon;\n let defaultRole = 'status';\n switch (intent) {\n case 'success':\n defaultIcon = <CheckmarkCircleFilled />;\n break;\n case 'error':\n defaultIcon = <DismissCircleFilled />;\n defaultRole = 'alert';\n break;\n case 'warning':\n defaultIcon = <WarningFilled />;\n defaultRole = 'alert';\n break;\n case 'info':\n defaultIcon = <InfoFilled />;\n break;\n }\n\n const action = slot.optional(props.action, { defaultProps: { appearance: 'transparent' }, elementType: Button });\n const avatar = slot.optional(props.avatar, { elementType: Avatar });\n let icon;\n /** Avatar prop takes precedence over the icon or intent prop */ if (!avatar) {\n icon = slot.optional(props.icon, {\n defaultProps: { children: defaultIcon },\n renderByDefault: !!props.intent,\n elementType: 'span',\n });\n }\n return {\n action,\n appearance,\n avatar,\n components: { root: 'div', icon: 'span', action: Button, avatar: Avatar },\n icon,\n intent,\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role: defaultRole,\n children: props.children,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","Avatar","Button","CheckmarkCircleFilled","DismissCircleFilled","InfoFilled","WarningFilled","getIntrinsicElementProps","slot","useAlert_unstable","props","ref","appearance","intent","defaultIcon","defaultRole","action","optional","defaultProps","elementType","avatar","icon","children","renderByDefault","components","root","always","role"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,qBAAqB,EAAEC,mBAAmB,EAAEC,UAAU,EAAEC,aAAa,QAAQ,wBAAwB;AAC9G,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAI3E;;;;;;;;CAQC,GACD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC;IACnD,MAAM,EAAEC,aAAa,SAAS,EAAEC,MAAM,EAAE,GAAGH;IAE3C,8DAA8D,GAC9D,IAAII;IACJ,IAAIC,cAAc;IAClB,OAAQF;QACN,KAAK;YACHC,4BAAc,oBAACX;YACf;QACF,KAAK;YACHW,4BAAc,oBAACV;YACfW,cAAc;YACd;QACF,KAAK;YACHD,4BAAc,oBAACR;YACfS,cAAc;YACd;QACF,KAAK;YACHD,4BAAc,oBAACT;YACf;IACJ;IAEA,MAAMW,SAASR,KAAKS,QAAQ,CAACP,MAAMM,MAAM,EAAE;QAAEE,cAAc;YAAEN,YAAY;QAAc;QAAGO,aAAajB;IAAO;IAC9G,MAAMkB,SAASZ,KAAKS,QAAQ,CAACP,MAAMU,MAAM,EAAE;QAAED,aAAalB;IAAO;IACjE,IAAIoB;IACJ,8DAA8D,GAAG,IAAI,CAACD,QAAQ;QAC5EC,OAAOb,KAAKS,QAAQ,CAACP,MAAMW,IAAI,EAAE;YAC/BH,cAAc;gBAAEI,UAAUR;YAAY;YACtCS,iBAAiB,CAAC,CAACb,MAAMG,MAAM;YAC/BM,aAAa;QACf;IACF;IACA,OAAO;QACLH;QACAJ;QACAQ;QACAI,YAAY;YAAEC,MAAM;YAAOJ,MAAM;YAAQL,QAAQd;YAAQkB,QAAQnB;QAAO;QACxEoB;QACAR;QACAY,MAAMjB,KAAKkB,MAAM,CACfnB,yBAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FI,KAAKA;YACLgB,MAAMZ;YACNO,UAAUZ,MAAMY,QAAQ;YACxB,GAAGZ,KAAK;QACV,IACA;YAAES,aAAa;QAAM;IAEzB;AACF,EAAE"}
1
+ {"version":3,"sources":["useAlert.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Avatar } from '@fluentui/react-avatar';\nimport { Button } from '@fluentui/react-button';\nimport { CheckmarkCircleFilled, DismissCircleFilled, InfoFilled, WarningFilled } from '@fluentui/react-icons';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\n\nimport type { AlertProps, AlertState } from './Alert.types';\n\n/**\n * @deprecated please use the Toast or MessageBar component\n * Create the state required to render Alert.\n *\n * The returned state can be modified with hooks such as useAlertStyles_unstable,\n * before being passed to renderAlert_unstable.\n *\n * @param props - props from this instance of Alert\n * @param ref - reference to root HTMLElement of Alert\n */\n// eslint-disable-next-line deprecation/deprecation\nexport const useAlert_unstable = (props: AlertProps, ref: React.Ref<HTMLElement>): AlertState => {\n const { appearance = 'primary', intent } = props;\n\n /** Determine the role and icon to render based on the intent */\n let defaultIcon;\n let defaultRole = 'status';\n switch (intent) {\n case 'success':\n defaultIcon = <CheckmarkCircleFilled />;\n break;\n case 'error':\n defaultIcon = <DismissCircleFilled />;\n defaultRole = 'alert';\n break;\n case 'warning':\n defaultIcon = <WarningFilled />;\n defaultRole = 'alert';\n break;\n case 'info':\n defaultIcon = <InfoFilled />;\n break;\n }\n\n const action = slot.optional(props.action, { defaultProps: { appearance: 'transparent' }, elementType: Button });\n const avatar = slot.optional(props.avatar, { elementType: Avatar });\n let icon;\n /** Avatar prop takes precedence over the icon or intent prop */ if (!avatar) {\n icon = slot.optional(props.icon, {\n defaultProps: { children: defaultIcon },\n renderByDefault: !!props.intent,\n elementType: 'span',\n });\n }\n return {\n action,\n appearance,\n avatar,\n components: { root: 'div', icon: 'span', action: Button, avatar: Avatar },\n icon,\n intent,\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role: defaultRole,\n children: props.children,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","Avatar","Button","CheckmarkCircleFilled","DismissCircleFilled","InfoFilled","WarningFilled","getIntrinsicElementProps","slot","useAlert_unstable","props","ref","appearance","intent","defaultIcon","defaultRole","action","optional","defaultProps","elementType","avatar","icon","children","renderByDefault","components","root","always","role"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,qBAAqB,EAAEC,mBAAmB,EAAEC,UAAU,EAAEC,aAAa,QAAQ,wBAAwB;AAC9G,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAI3E;;;;;;;;;CASC,GACD,mDAAmD;AACnD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC;IACnD,MAAM,EAAEC,aAAa,SAAS,EAAEC,MAAM,EAAE,GAAGH;IAE3C,8DAA8D,GAC9D,IAAII;IACJ,IAAIC,cAAc;IAClB,OAAQF;QACN,KAAK;YACHC,4BAAc,oBAACX;YACf;QACF,KAAK;YACHW,4BAAc,oBAACV;YACfW,cAAc;YACd;QACF,KAAK;YACHD,4BAAc,oBAACR;YACfS,cAAc;YACd;QACF,KAAK;YACHD,4BAAc,oBAACT;YACf;IACJ;IAEA,MAAMW,SAASR,KAAKS,QAAQ,CAACP,MAAMM,MAAM,EAAE;QAAEE,cAAc;YAAEN,YAAY;QAAc;QAAGO,aAAajB;IAAO;IAC9G,MAAMkB,SAASZ,KAAKS,QAAQ,CAACP,MAAMU,MAAM,EAAE;QAAED,aAAalB;IAAO;IACjE,IAAIoB;IACJ,8DAA8D,GAAG,IAAI,CAACD,QAAQ;QAC5EC,OAAOb,KAAKS,QAAQ,CAACP,MAAMW,IAAI,EAAE;YAC/BH,cAAc;gBAAEI,UAAUR;YAAY;YACtCS,iBAAiB,CAAC,CAACb,MAAMG,MAAM;YAC/BM,aAAa;QACf;IACF;IACA,OAAO;QACLH;QACAJ;QACAQ;QACAI,YAAY;YAAEC,MAAM;YAAOJ,MAAM;YAAQL,QAAQd;YAAQkB,QAAQnB;QAAO;QACxEoB;QACAR;QACAY,MAAMjB,KAAKkB,MAAM,CACfnB,yBAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FI,KAAKA;YACLgB,MAAMZ;YACNO,UAAUZ,MAAMY,QAAQ;YACxB,GAAGZ,KAAK;QACV,IACA;YAAES,aAAa;QAAM;IAEzB;AACF,EAAE"}
@@ -1,6 +1,7 @@
1
1
  import { tokens } from '@fluentui/react-theme';
2
2
  import { __styles, mergeClasses, shorthands } from '@griffel/react';
3
3
  import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
4
+ // eslint-disable-next-line deprecation/deprecation
4
5
  export const alertClassNames = {
5
6
  root: 'fui-Alert',
6
7
  icon: 'fui-Alert__icon',
@@ -113,8 +114,9 @@ const useActionButtonColorInverted = /*#__PURE__*/__styles({
113
114
  d: [".f1qz2gb0{color:var(--colorBrandForegroundInverted);}", ".fa5e339[data-fui-focus-visible]{border-top-color:var(--colorTransparentStrokeInteractive);}", ".fk4svks[data-fui-focus-visible]{border-right-color:var(--colorTransparentStrokeInteractive);}", ".fqzoz0o[data-fui-focus-visible]{border-left-color:var(--colorTransparentStrokeInteractive);}", ".fw8q0i0[data-fui-focus-visible]{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".f1dlk4fq[data-fui-focus-visible]{outline-color:var(--colorNeutralBackground5Pressed);}"]
114
115
  });
115
116
  /**
117
+ * @deprecated please use the Toast or MessageBar component
116
118
  * Apply styling to the Alert slots based on the state
117
- */
119
+ */ // eslint-disable-next-line deprecation/deprecation
118
120
  export const useAlertStyles_unstable = state => {
119
121
  const inverted = state.appearance === 'inverted';
120
122
  const styles = useStyles();
@@ -1 +1 @@
1
- {"version":3,"names":["tokens","__styles","mergeClasses","shorthands","createCustomFocusIndicatorStyle","alertClassNames","root","icon","action","avatar","useStyles","mc9l5x","Bt984gj","sshi5w","z8tnut","z189sj","Byoj8tv","uwmqm3","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","E5pizo","Be2twd7","Bhrd7zp","sj55zd","De3pzq","inverted","Bqenvij","B6of3ja","t21cq0","jrapky","Frg6f3","Bf4jedk","d","useIntentIconStyles","success","error","warning","info","useIntentIconStylesInverted","useActionButtonColorInverted","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bfpq7zp","useAlertStyles_unstable","state","appearance","styles","intentIconStylesPrimary","intentIconStylesInverted","actionStylesInverted","className","intent"],"sources":["useAlertStyles.styles.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nexport const alertClassNames = {\n root: 'fui-Alert',\n icon: 'fui-Alert__icon',\n action: 'fui-Alert__action',\n avatar: 'fui-Alert__avatar'\n};\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n minHeight: '44px',\n ...shorthands.padding('0', '12px'),\n ...shorthands.borderRadius('4px'),\n ...shorthands.border('1px', 'solid', tokens.colorTransparentStroke),\n boxShadow: tokens.shadow8,\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1\n },\n inverted: {\n color: tokens.colorNeutralForegroundInverted2,\n backgroundColor: tokens.colorNeutralBackgroundInverted\n },\n icon: {\n height: '16px',\n fontSize: '16px',\n ...shorthands.padding('0', '8px', '0', '0')\n },\n avatar: {\n ...shorthands.margin('0', '8px', '0', '0')\n },\n action: {\n ...shorthands.padding('5px', '10px'),\n minWidth: 0,\n marginLeft: 'auto',\n color: tokens.colorBrandForeground1\n }\n});\nconst useIntentIconStyles = makeStyles({\n success: {\n color: tokens.colorPaletteGreenForeground3\n },\n error: {\n color: tokens.colorPaletteRedForeground3\n },\n warning: {\n color: tokens.colorPaletteYellowForeground2\n },\n info: {\n color: tokens.colorNeutralForeground2\n }\n});\nconst useIntentIconStylesInverted = makeStyles({\n success: {\n color: tokens.colorPaletteGreenForegroundInverted\n },\n error: {\n color: tokens.colorPaletteRedForegroundInverted\n },\n warning: {\n color: tokens.colorPaletteYellowForegroundInverted\n },\n info: {\n color: tokens.colorNeutralForegroundInverted2\n }\n});\nconst useActionButtonColorInverted = makeStyles({\n action: {\n color: tokens.colorBrandForegroundInverted,\n ...createCustomFocusIndicatorStyle({\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n outlineColor: tokens.colorNeutralBackground5Pressed\n }, {\n enableOutline: true\n })\n }\n});\n/**\n * Apply styling to the Alert slots based on the state\n */ export const useAlertStyles_unstable = (state)=>{\n const inverted = state.appearance === 'inverted';\n const styles = useStyles();\n const intentIconStylesPrimary = useIntentIconStyles();\n const intentIconStylesInverted = useIntentIconStylesInverted();\n const actionStylesInverted = useActionButtonColorInverted();\n state.root.className = mergeClasses(alertClassNames.root, styles.root, inverted && styles.inverted, state.root.className);\n if (state.icon) {\n state.icon.className = mergeClasses(alertClassNames.icon, styles.icon, state.intent && (inverted ? intentIconStylesInverted[state.intent] : intentIconStylesPrimary[state.intent]), state.icon.className);\n }\n if (state.avatar) {\n state.avatar.className = mergeClasses(alertClassNames.avatar, styles.avatar, state.avatar.className);\n }\n if (state.action) {\n // Note: inverted && actionStylesInverted.action has the highest piority and must be merged last\n state.action.className = mergeClasses(alertClassNames.action, styles.action, inverted && actionStylesInverted.action, state.action.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,uBAAuB;AAC9C,SAAAC,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,+BAA+B,QAAQ,yBAAyB;AACzE,OAAO,MAAMC,eAAe,GAAG;EAC3BC,IAAI,EAAE,WAAW;EACjBC,IAAI,EAAE,iBAAiB;EACvBC,MAAM,EAAE,mBAAmB;EAC3BC,MAAM,EAAE;AACZ,CAAC;AACD,MAAMC,SAAS,gBAAGT,QAAA;EAAAK,IAAA;IAAAK,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,QAAA;IAAAF,MAAA;IAAAC,MAAA;EAAA;EAAA/B,IAAA;IAAAiC,OAAA;IAAAL,OAAA;IAAArB,MAAA;IAAA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AAY,CAACG,eAAe,CAACC,IAAI,EAAEwD,MAAM,CAACxD,IAAI,EAAEiC,QAAQ,IAAIuB,MAAM,CAACvB,QAAQ,EAAEqB,KAAK,CAACtD,IAAI,CAAC4D,SAAS,CAAC;EACzH,IAAIN,KAAK,CAACrD,IAAI,EAAE;IACZqD,KAAK,CAACrD,IAAI,CAAC2D,SAAS,GAAGhE,YAAY,CAACG,eAAe,CAACE,IAAI,EAAEuD,MAAM,CAACvD,IAAI,EAAEqD,KAAK,CAACO,MAAM,KAAK5B,QAAQ,GAAGyB,wBAAwB,CAACJ,KAAK,CAACO,MAAM,CAAC,GAAGJ,uBAAuB,CAACH,KAAK,CAACO,MAAM,CAAC,CAAC,EAAEP,KAAK,CAACrD,IAAI,CAAC2D,SAAS,CAAC;EAC7M;EACA,IAAIN,KAAK,CAACnD,MAAM,EAAE;IACdmD,KAAK,CAACnD,MAAM,CAACyD,SAAS,GAAGhE,YAAY,CAACG,eAAe,CAACI,MAAM,EAAEqD,MAAM,CAACrD,MAAM,EAAEmD,KAAK,CAACnD,MAAM,CAACyD,SAAS,CAAC;EACxG;EACA,IAAIN,KAAK,CAACpD,MAAM,EAAE;IACd;IACAoD,KAAK,CAACpD,MAAM,CAAC0D,SAAS,GAAGhE,YAAY,CAACG,eAAe,CAACG,MAAM,EAAEsD,MAAM,CAACtD,MAAM,EAAE+B,QAAQ,IAAI0B,oBAAoB,CAACzD,MAAM,EAAEoD,KAAK,CAACpD,MAAM,CAAC0D,SAAS,CAAC;EACjJ;EACA,OAAON,KAAK;AAChB,CAAC"}
1
+ {"version":3,"names":["tokens","__styles","mergeClasses","shorthands","createCustomFocusIndicatorStyle","alertClassNames","root","icon","action","avatar","useStyles","mc9l5x","Bt984gj","sshi5w","z8tnut","z189sj","Byoj8tv","uwmqm3","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","E5pizo","Be2twd7","Bhrd7zp","sj55zd","De3pzq","inverted","Bqenvij","B6of3ja","t21cq0","jrapky","Frg6f3","Bf4jedk","d","useIntentIconStyles","success","error","warning","info","useIntentIconStylesInverted","useActionButtonColorInverted","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bfpq7zp","useAlertStyles_unstable","state","appearance","styles","intentIconStylesPrimary","intentIconStylesInverted","actionStylesInverted","className","intent"],"sources":["useAlertStyles.styles.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\n// eslint-disable-next-line deprecation/deprecation\nexport const alertClassNames = {\n root: 'fui-Alert',\n icon: 'fui-Alert__icon',\n action: 'fui-Alert__action',\n avatar: 'fui-Alert__avatar'\n};\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n minHeight: '44px',\n ...shorthands.padding('0', '12px'),\n ...shorthands.borderRadius('4px'),\n ...shorthands.border('1px', 'solid', tokens.colorTransparentStroke),\n boxShadow: tokens.shadow8,\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1\n },\n inverted: {\n color: tokens.colorNeutralForegroundInverted2,\n backgroundColor: tokens.colorNeutralBackgroundInverted\n },\n icon: {\n height: '16px',\n fontSize: '16px',\n ...shorthands.padding('0', '8px', '0', '0')\n },\n avatar: {\n ...shorthands.margin('0', '8px', '0', '0')\n },\n action: {\n ...shorthands.padding('5px', '10px'),\n minWidth: 0,\n marginLeft: 'auto',\n color: tokens.colorBrandForeground1\n }\n});\nconst useIntentIconStyles = makeStyles({\n success: {\n color: tokens.colorPaletteGreenForeground3\n },\n error: {\n color: tokens.colorPaletteRedForeground3\n },\n warning: {\n color: tokens.colorPaletteYellowForeground2\n },\n info: {\n color: tokens.colorNeutralForeground2\n }\n});\nconst useIntentIconStylesInverted = makeStyles({\n success: {\n color: tokens.colorPaletteGreenForegroundInverted\n },\n error: {\n color: tokens.colorPaletteRedForegroundInverted\n },\n warning: {\n color: tokens.colorPaletteYellowForegroundInverted\n },\n info: {\n color: tokens.colorNeutralForegroundInverted2\n }\n});\nconst useActionButtonColorInverted = makeStyles({\n action: {\n color: tokens.colorBrandForegroundInverted,\n ...createCustomFocusIndicatorStyle({\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n outlineColor: tokens.colorNeutralBackground5Pressed\n }, {\n enableOutline: true\n })\n }\n});\n/**\n * @deprecated please use the Toast or MessageBar component\n * Apply styling to the Alert slots based on the state\n */ // eslint-disable-next-line deprecation/deprecation\nexport const useAlertStyles_unstable = (state)=>{\n const inverted = state.appearance === 'inverted';\n const styles = useStyles();\n const intentIconStylesPrimary = useIntentIconStyles();\n const intentIconStylesInverted = useIntentIconStylesInverted();\n const actionStylesInverted = useActionButtonColorInverted();\n state.root.className = mergeClasses(alertClassNames.root, styles.root, inverted && styles.inverted, state.root.className);\n if (state.icon) {\n state.icon.className = mergeClasses(alertClassNames.icon, styles.icon, state.intent && (inverted ? intentIconStylesInverted[state.intent] : intentIconStylesPrimary[state.intent]), state.icon.className);\n }\n if (state.avatar) {\n state.avatar.className = mergeClasses(alertClassNames.avatar, styles.avatar, state.avatar.className);\n }\n if (state.action) {\n // Note: inverted && actionStylesInverted.action has the highest piority and must be merged last\n state.action.className = mergeClasses(alertClassNames.action, styles.action, inverted && actionStylesInverted.action, state.action.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,uBAAuB;AAC9C,SAAAC,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,+BAA+B,QAAQ,yBAAyB;AACzE;AACA,OAAO,MAAMC,eAAe,GAAG;EAC3BC,IAAI,EAAE,WAAW;EACjBC,IAAI,EAAE,iBAAiB;EACvBC,MAAM,EAAE,m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AK,CAACnD,MAAM,CAACyD,SAAS,CAAC;EACxG;EACA,IAAIN,KAAK,CAACpD,MAAM,EAAE;IACd;IACAoD,KAAK,CAACpD,MAAM,CAAC0D,SAAS,GAAGhE,YAAY,CAACG,eAAe,CAACG,MAAM,EAAEsD,MAAM,CAACtD,MAAM,EAAE+B,QAAQ,IAAI0B,oBAAoB,CAACzD,MAAM,EAAEoD,KAAK,CAACpD,MAAM,CAAC0D,SAAS,CAAC;EACjJ;EACA,OAAON,KAAK;AAChB,CAAC"}
package/lib/index.js CHANGED
@@ -1 +1,2 @@
1
+ // eslint-disable-next-line deprecation/deprecation
1
2
  export { Alert, alertClassNames, renderAlert_unstable, useAlertStyles_unstable, useAlert_unstable } from './Alert';
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export { Alert, alertClassNames, renderAlert_unstable, useAlertStyles_unstable, useAlert_unstable } from './Alert';\nexport type { AlertProps, AlertSlots, AlertState } from './Alert';\n"],"names":["Alert","alertClassNames","renderAlert_unstable","useAlertStyles_unstable","useAlert_unstable"],"mappings":"AAAA,SAASA,KAAK,EAAEC,eAAe,EAAEC,oBAAoB,EAAEC,uBAAuB,EAAEC,iBAAiB,QAAQ,UAAU"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["// eslint-disable-next-line deprecation/deprecation\nexport { Alert, alertClassNames, renderAlert_unstable, useAlertStyles_unstable, useAlert_unstable } from './Alert';\n// eslint-disable-next-line deprecation/deprecation\nexport type { AlertProps, AlertSlots, AlertState } from './Alert';\n"],"names":["Alert","alertClassNames","renderAlert_unstable","useAlertStyles_unstable","useAlert_unstable"],"mappings":"AAAA,mDAAmD;AACnD,SAASA,KAAK,EAAEC,eAAe,EAAEC,oBAAoB,EAAEC,uBAAuB,EAAEC,iBAAiB,QAAQ,UAAU"}
@@ -14,8 +14,13 @@ const _renderAlert = require("./renderAlert");
14
14
  const _useAlert = require("./useAlert");
15
15
  const _useAlertStylesstyles = require("./useAlertStyles.styles");
16
16
  const Alert = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
17
+ // eslint-disable-next-line deprecation/deprecation
17
18
  const state = (0, _useAlert.useAlert_unstable)(props, ref);
19
+ // eslint-disable-next-line deprecation/deprecation
18
20
  (0, _useAlertStylesstyles.useAlertStyles_unstable)(state);
21
+ // eslint-disable-next-line deprecation/deprecation
19
22
  return (0, _renderAlert.renderAlert_unstable)(state);
23
+ // eslint-disable-next-line deprecation/deprecation
20
24
  });
25
+ // eslint-disable-next-line deprecation/deprecation
21
26
  Alert.displayName = 'Alert';
@@ -1 +1 @@
1
- {"version":3,"sources":["Alert.js"],"sourcesContent":["import * as React from 'react';\nimport { renderAlert_unstable } from './renderAlert';\nimport { useAlert_unstable } from './useAlert';\nimport { useAlertStyles_unstable } from './useAlertStyles.styles';\n/**\n * An Alert component displays a brief, important message to attract a user's attention\n * without interrupting their current task.\n */ export const Alert = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useAlert_unstable(props, ref);\n useAlertStyles_unstable(state);\n return renderAlert_unstable(state);\n});\nAlert.displayName = 'Alert';\n"],"names":["Alert","React","forwardRef","props","ref","state","useAlert_unstable","useAlertStyles_unstable","renderAlert_unstable","displayName"],"mappings":";;;;+BAOiBA;;;eAAAA;;;;iEAPM;6BACc;0BACH;sCACM;AAI7B,MAAMA,QAAQ,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC5D,MAAMC,QAAQC,IAAAA,2BAAiB,EAACH,OAAOC;IACvCG,IAAAA,6CAAuB,EAACF;IACxB,OAAOG,IAAAA,iCAAoB,EAACH;AAChC;AACAL,MAAMS,WAAW,GAAG"}
1
+ {"version":3,"sources":["Alert.js"],"sourcesContent":["import * as React from 'react';\nimport { renderAlert_unstable } from './renderAlert';\nimport { useAlert_unstable } from './useAlert';\nimport { useAlertStyles_unstable } from './useAlertStyles.styles';\n/**\n * @deprecated please use the Toast or MessageBar component\n * An Alert component displays a brief, important message to attract a user's attention\n * without interrupting their current task.\n */ // eslint-disable-next-line deprecation/deprecation\nexport const Alert = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n // eslint-disable-next-line deprecation/deprecation\n const state = useAlert_unstable(props, ref);\n // eslint-disable-next-line deprecation/deprecation\n useAlertStyles_unstable(state);\n // eslint-disable-next-line deprecation/deprecation\n return renderAlert_unstable(state);\n// eslint-disable-next-line deprecation/deprecation\n});\n// eslint-disable-next-line deprecation/deprecation\nAlert.displayName = 'Alert';\n"],"names":["Alert","React","forwardRef","props","ref","state","useAlert_unstable","useAlertStyles_unstable","renderAlert_unstable","displayName"],"mappings":";;;;+BASaA;;;eAAAA;;;;iEATU;6BACc;0BACH;sCACM;AAMjC,MAAMA,QAAQ,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACxD,mDAAmD;IACnD,MAAMC,QAAQC,IAAAA,2BAAiB,EAACH,OAAOC;IACvC,mDAAmD;IACnDG,IAAAA,6CAAuB,EAACF;IACxB,mDAAmD;IACnD,OAAOG,IAAAA,iCAAoB,EAACH;AAChC,mDAAmD;AACnD;AACA,mDAAmD;AACnDL,MAAMS,WAAW,GAAG"}
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "renderAlert_unstable", {
11
11
  const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
12
  const _reactutilities = require("@fluentui/react-utilities");
13
13
  const renderAlert_unstable = (state)=>{
14
+ // eslint-disable-next-line deprecation/deprecation
14
15
  (0, _reactutilities.assertSlots)(state);
15
16
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
16
17
  children: [
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAlert.js"],"sourcesContent":[" import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\nexport const renderAlert_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsxs(state.root, {\n children: [\n state.icon && /*#__PURE__*/ _jsx(state.icon, {}),\n state.avatar && /*#__PURE__*/ _jsx(state.avatar, {}),\n state.root.children,\n state.action && /*#__PURE__*/ _jsx(state.action, {})\n ]\n });\n};\n"],"names":["renderAlert_unstable","state","assertSlots","_jsxs","root","children","icon","_jsx","avatar","action"],"mappings":";;;;+BAEaA;;;eAAAA;;;4BAFgC;gCACjB;AACrB,MAAMA,uBAAuB,CAACC;IACjCC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,gBAAK,EAACF,MAAMG,IAAI,EAAE;QACnCC,UAAU;YACNJ,MAAMK,IAAI,IAAI,WAAW,GAAGC,IAAAA,eAAI,EAACN,MAAMK,IAAI,EAAE,CAAC;YAC9CL,MAAMO,MAAM,IAAI,WAAW,GAAGD,IAAAA,eAAI,EAACN,MAAMO,MAAM,EAAE,CAAC;YAClDP,MAAMG,IAAI,CAACC,QAAQ;YACnBJ,MAAMQ,MAAM,IAAI,WAAW,GAAGF,IAAAA,eAAI,EAACN,MAAMQ,MAAM,EAAE,CAAC;SACrD;IACL;AACJ"}
1
+ {"version":3,"sources":["renderAlert.js"],"sourcesContent":[" import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * @deprecated please use the Toast or MessageBar component\n */ // eslint-disable-next-line deprecation/deprecation\nexport const renderAlert_unstable = (state)=>{\n // eslint-disable-next-line deprecation/deprecation\n assertSlots(state);\n return /*#__PURE__*/ _jsxs(state.root, {\n children: [\n state.icon && /*#__PURE__*/ _jsx(state.icon, {}),\n state.avatar && /*#__PURE__*/ _jsx(state.avatar, {}),\n state.root.children,\n state.action && /*#__PURE__*/ _jsx(state.action, {})\n ]\n });\n};\n"],"names":["renderAlert_unstable","state","assertSlots","_jsxs","root","children","icon","_jsx","avatar","action"],"mappings":";;;;+BAKaA;;;eAAAA;;;4BALgC;gCACjB;AAIrB,MAAMA,uBAAuB,CAACC;IACjC,mDAAmD;IACnDC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,gBAAK,EAACF,MAAMG,IAAI,EAAE;QACnCC,UAAU;YACNJ,MAAMK,IAAI,IAAI,WAAW,GAAGC,IAAAA,eAAI,EAACN,MAAMK,IAAI,EAAE,CAAC;YAC9CL,MAAMO,MAAM,IAAI,WAAW,GAAGD,IAAAA,eAAI,EAACN,MAAMO,MAAM,EAAE,CAAC;YAClDP,MAAMG,IAAI,CAACC,QAAQ;YACnBJ,MAAMQ,MAAM,IAAI,WAAW,GAAGF,IAAAA,eAAI,EAACN,MAAMQ,MAAM,EAAE,CAAC;SACrD;IACL;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useAlert.js"],"sourcesContent":["import * as React from 'react';\nimport { Avatar } from '@fluentui/react-avatar';\nimport { Button } from '@fluentui/react-button';\nimport { CheckmarkCircleFilled, DismissCircleFilled, InfoFilled, WarningFilled } from '@fluentui/react-icons';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\n/**\n * Create the state required to render Alert.\n *\n * The returned state can be modified with hooks such as useAlertStyles_unstable,\n * before being passed to renderAlert_unstable.\n *\n * @param props - props from this instance of Alert\n * @param ref - reference to root HTMLElement of Alert\n */ export const useAlert_unstable = (props, ref)=>{\n const { appearance = 'primary', intent } = props;\n /** Determine the role and icon to render based on the intent */ let defaultIcon;\n let defaultRole = 'status';\n switch(intent){\n case 'success':\n defaultIcon = /*#__PURE__*/ React.createElement(CheckmarkCircleFilled, null);\n break;\n case 'error':\n defaultIcon = /*#__PURE__*/ React.createElement(DismissCircleFilled, null);\n defaultRole = 'alert';\n break;\n case 'warning':\n defaultIcon = /*#__PURE__*/ React.createElement(WarningFilled, null);\n defaultRole = 'alert';\n break;\n case 'info':\n defaultIcon = /*#__PURE__*/ React.createElement(InfoFilled, null);\n break;\n }\n const action = slot.optional(props.action, {\n defaultProps: {\n appearance: 'transparent'\n },\n elementType: Button\n });\n const avatar = slot.optional(props.avatar, {\n elementType: Avatar\n });\n let icon;\n /** Avatar prop takes precedence over the icon or intent prop */ if (!avatar) {\n icon = slot.optional(props.icon, {\n defaultProps: {\n children: defaultIcon\n },\n renderByDefault: !!props.intent,\n elementType: 'span'\n });\n }\n return {\n action,\n appearance,\n avatar,\n components: {\n root: 'div',\n icon: 'span',\n action: Button,\n avatar: Avatar\n },\n icon,\n intent,\n root: slot.always(getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref,\n role: defaultRole,\n children: props.children,\n ...props\n }), {\n elementType: 'div'\n })\n };\n};\n"],"names":["useAlert_unstable","props","ref","appearance","intent","defaultIcon","defaultRole","React","createElement","CheckmarkCircleFilled","DismissCircleFilled","WarningFilled","InfoFilled","action","slot","optional","defaultProps","elementType","Button","avatar","Avatar","icon","children","renderByDefault","components","root","always","getIntrinsicElementProps","role"],"mappings":";;;;+BAaiBA;;;eAAAA;;;;iEAbM;6BACA;6BACA;4BAC+D;gCACvC;AASpC,MAAMA,oBAAoB,CAACC,OAAOC;IACzC,MAAM,EAAEC,aAAa,SAAS,EAAEC,MAAM,EAAE,GAAGH;IAC3C,8DAA8D,GAAG,IAAII;IACrE,IAAIC,cAAc;IAClB,OAAOF;QACH,KAAK;YACDC,cAAc,WAAW,GAAGE,OAAMC,aAAa,CAACC,iCAAqB,EAAE;YACvE;QACJ,KAAK;YACDJ,cAAc,WAAW,GAAGE,OAAMC,aAAa,CAACE,+BAAmB,EAAE;YACrEJ,cAAc;YACd;QACJ,KAAK;YACDD,cAAc,WAAW,GAAGE,OAAMC,aAAa,CAACG,yBAAa,EAAE;YAC/DL,cAAc;YACd;QACJ,KAAK;YACDD,cAAc,WAAW,GAAGE,OAAMC,aAAa,CAACI,sBAAU,EAAE;YAC5D;IACR;IACA,MAAMC,SAASC,oBAAI,CAACC,QAAQ,CAACd,MAAMY,MAAM,EAAE;QACvCG,cAAc;YACVb,YAAY;QAChB;QACAc,aAAaC,mBAAM;IACvB;IACA,MAAMC,SAASL,oBAAI,CAACC,QAAQ,CAACd,MAAMkB,MAAM,EAAE;QACvCF,aAAaG,mBAAM;IACvB;IACA,IAAIC;IACJ,8DAA8D,GAAG,IAAI,CAACF,QAAQ;QAC1EE,OAAOP,oBAAI,CAACC,QAAQ,CAACd,MAAMoB,IAAI,EAAE;YAC7BL,cAAc;gBACVM,UAAUjB;YACd;YACAkB,iBAAiB,CAAC,CAACtB,MAAMG,MAAM;YAC/Ba,aAAa;QACjB;IACJ;IACA,OAAO;QACHJ;QACAV;QACAgB;QACAK,YAAY;YACRC,MAAM;YACNJ,MAAM;YACNR,QAAQK,mBAAM;YACdC,QAAQC,mBAAM;QAClB;QACAC;QACAjB;QACAqB,MAAMX,oBAAI,CAACY,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;YAC9C,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FzB,KAAKA;YACL0B,MAAMtB;YACNgB,UAAUrB,MAAMqB,QAAQ;YACxB,GAAGrB,KAAK;QACZ,IAAI;YACAgB,aAAa;QACjB;IACJ;AACJ"}
1
+ {"version":3,"sources":["useAlert.js"],"sourcesContent":["import * as React from 'react';\nimport { Avatar } from '@fluentui/react-avatar';\nimport { Button } from '@fluentui/react-button';\nimport { CheckmarkCircleFilled, DismissCircleFilled, InfoFilled, WarningFilled } from '@fluentui/react-icons';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\n/**\n * @deprecated please use the Toast or MessageBar component\n * Create the state required to render Alert.\n *\n * The returned state can be modified with hooks such as useAlertStyles_unstable,\n * before being passed to renderAlert_unstable.\n *\n * @param props - props from this instance of Alert\n * @param ref - reference to root HTMLElement of Alert\n */ // eslint-disable-next-line deprecation/deprecation\nexport const useAlert_unstable = (props, ref)=>{\n const { appearance = 'primary', intent } = props;\n /** Determine the role and icon to render based on the intent */ let defaultIcon;\n let defaultRole = 'status';\n switch(intent){\n case 'success':\n defaultIcon = /*#__PURE__*/ React.createElement(CheckmarkCircleFilled, null);\n break;\n case 'error':\n defaultIcon = /*#__PURE__*/ React.createElement(DismissCircleFilled, null);\n defaultRole = 'alert';\n break;\n case 'warning':\n defaultIcon = /*#__PURE__*/ React.createElement(WarningFilled, null);\n defaultRole = 'alert';\n break;\n case 'info':\n defaultIcon = /*#__PURE__*/ React.createElement(InfoFilled, null);\n break;\n }\n const action = slot.optional(props.action, {\n defaultProps: {\n appearance: 'transparent'\n },\n elementType: Button\n });\n const avatar = slot.optional(props.avatar, {\n elementType: Avatar\n });\n let icon;\n /** Avatar prop takes precedence over the icon or intent prop */ if (!avatar) {\n icon = slot.optional(props.icon, {\n defaultProps: {\n children: defaultIcon\n },\n renderByDefault: !!props.intent,\n elementType: 'span'\n });\n }\n return {\n action,\n appearance,\n avatar,\n components: {\n root: 'div',\n icon: 'span',\n action: Button,\n avatar: Avatar\n },\n icon,\n intent,\n root: slot.always(getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref,\n role: defaultRole,\n children: props.children,\n ...props\n }), {\n elementType: 'div'\n })\n };\n};\n"],"names":["useAlert_unstable","props","ref","appearance","intent","defaultIcon","defaultRole","React","createElement","CheckmarkCircleFilled","DismissCircleFilled","WarningFilled","InfoFilled","action","slot","optional","defaultProps","elementType","Button","avatar","Avatar","icon","children","renderByDefault","components","root","always","getIntrinsicElementProps","role"],"mappings":";;;;+BAeaA;;;eAAAA;;;;iEAfU;6BACA;6BACA;4BAC+D;gCACvC;AAWxC,MAAMA,oBAAoB,CAACC,OAAOC;IACrC,MAAM,EAAEC,aAAa,SAAS,EAAEC,MAAM,EAAE,GAAGH;IAC3C,8DAA8D,GAAG,IAAII;IACrE,IAAIC,cAAc;IAClB,OAAOF;QACH,KAAK;YACDC,cAAc,WAAW,GAAGE,OAAMC,aAAa,CAACC,iCAAqB,EAAE;YACvE;QACJ,KAAK;YACDJ,cAAc,WAAW,GAAGE,OAAMC,aAAa,CAACE,+BAAmB,EAAE;YACrEJ,cAAc;YACd;QACJ,KAAK;YACDD,cAAc,WAAW,GAAGE,OAAMC,aAAa,CAACG,yBAAa,EAAE;YAC/DL,cAAc;YACd;QACJ,KAAK;YACDD,cAAc,WAAW,GAAGE,OAAMC,aAAa,CAACI,sBAAU,EAAE;YAC5D;IACR;IACA,MAAMC,SAASC,oBAAI,CAACC,QAAQ,CAACd,MAAMY,MAAM,EAAE;QACvCG,cAAc;YACVb,YAAY;QAChB;QACAc,aAAaC,mBAAM;IACvB;IACA,MAAMC,SAASL,oBAAI,CAACC,QAAQ,CAACd,MAAMkB,MAAM,EAAE;QACvCF,aAAaG,mBAAM;IACvB;IACA,IAAIC;IACJ,8DAA8D,GAAG,IAAI,CAACF,QAAQ;QAC1EE,OAAOP,oBAAI,CAACC,QAAQ,CAACd,MAAMoB,IAAI,EAAE;YAC7BL,cAAc;gBACVM,UAAUjB;YACd;YACAkB,iBAAiB,CAAC,CAACtB,MAAMG,MAAM;YAC/Ba,aAAa;QACjB;IACJ;IACA,OAAO;QACHJ;QACAV;QACAgB;QACAK,YAAY;YACRC,MAAM;YACNJ,MAAM;YACNR,QAAQK,mBAAM;YACdC,QAAQC,mBAAM;QAClB;QACAC;QACAjB;QACAqB,MAAMX,oBAAI,CAACY,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;YAC9C,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FzB,KAAKA;YACL0B,MAAMtB;YACNgB,UAAUrB,MAAMqB,QAAQ;YACxB,GAAGrB,KAAK;QACZ,IAAI;YACAgB,aAAa;QACjB;IACJ;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useAlertStyles.styles.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nexport const alertClassNames = {\n root: 'fui-Alert',\n icon: 'fui-Alert__icon',\n action: 'fui-Alert__action',\n avatar: 'fui-Alert__avatar'\n};\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"f22iagw\",\n Bt984gj: \"f122n59\",\n sshi5w: \"f5pgtk9\",\n z8tnut: \"f1g0x7ka\",\n z189sj: [\"f11qrl6u\", \"fjlbh76\"],\n Byoj8tv: \"f1qch9an\",\n uwmqm3: [\"fjlbh76\", \"f11qrl6u\"],\n Bbmb7ep: [\"fff7au0\", \"f1bjk9e1\"],\n Beyfa6y: [\"f1bjk9e1\", \"fff7au0\"],\n B7oj6ja: [\"fwsfkhu\", \"f8wkphi\"],\n Btl43ni: [\"f8wkphi\", \"fwsfkhu\"],\n B4j52fo: \"f5ogflp\",\n Bekrc4i: [\"f1hqa2wf\", \"finvdd3\"],\n Bn0qgzm: \"f1f09k3d\",\n ibv6hh: [\"finvdd3\", \"f1hqa2wf\"],\n icvyot: \"fzkkow9\",\n vrafjx: [\"fcdblym\", \"fjik90z\"],\n oivjwe: \"fg706s2\",\n wvpqe5: [\"fjik90z\", \"fcdblym\"],\n g2u3we: \"fghlq4f\",\n h3c5rm: [\"f1gn591s\", \"fjscplz\"],\n B9xav0g: \"fb073pr\",\n zhjwy3: [\"fjscplz\", \"f1gn591s\"],\n E5pizo: \"fz58gqq\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"fl43uef\",\n sj55zd: \"f19n0e5\",\n De3pzq: \"fxugw4r\"\n },\n inverted: {\n sj55zd: \"f1w7i9ko\",\n De3pzq: \"f5pduvr\"\n },\n icon: {\n Bqenvij: \"fd461yt\",\n Be2twd7: \"f4ybsrx\",\n z8tnut: \"f1g0x7ka\",\n z189sj: [\"f19lj068\", \"f177v4lu\"],\n Byoj8tv: \"f1qch9an\",\n uwmqm3: [\"f1cnd47f\", \"fhxju0i\"]\n },\n avatar: {\n B6of3ja: \"f1hu3pq6\",\n t21cq0: [\"f1phki43\", \"ff9s3yw\"],\n jrapky: \"f19f4twv\",\n Frg6f3: [\"f1tyq0we\", \"f11qmguv\"]\n },\n action: {\n z8tnut: \"f1sbtcvk\",\n z189sj: [\"f81rol6\", \"frdkuqy\"],\n Byoj8tv: \"fdghr9\",\n uwmqm3: [\"frdkuqy\", \"f81rol6\"],\n Bf4jedk: \"fy77jfu\",\n Frg6f3: [\"fcgxt0o\", \"f1ujusj6\"],\n sj55zd: \"f16muhyy\"\n }\n}, {\n d: [\".f22iagw{display:flex;}\", \".f122n59{align-items:center;}\", \".f5pgtk9{min-height:44px;}\", \".f1g0x7ka{padding-top:0;}\", \".f11qrl6u{padding-right:12px;}\", \".fjlbh76{padding-left:12px;}\", \".f1qch9an{padding-bottom:0;}\", \".fff7au0{border-bottom-right-radius:4px;}\", \".f1bjk9e1{border-bottom-left-radius:4px;}\", \".fwsfkhu{border-top-right-radius:4px;}\", \".f8wkphi{border-top-left-radius:4px;}\", \".f5ogflp{border-top-width:1px;}\", \".f1hqa2wf{border-right-width:1px;}\", \".finvdd3{border-left-width:1px;}\", \".f1f09k3d{border-bottom-width:1px;}\", \".fzkkow9{border-top-style:solid;}\", \".fcdblym{border-right-style:solid;}\", \".fjik90z{border-left-style:solid;}\", \".fg706s2{border-bottom-style:solid;}\", \".fghlq4f{border-top-color:var(--colorTransparentStroke);}\", \".f1gn591s{border-right-color:var(--colorTransparentStroke);}\", \".fjscplz{border-left-color:var(--colorTransparentStroke);}\", \".fb073pr{border-bottom-color:var(--colorTransparentStroke);}\", \".fz58gqq{box-shadow:var(--shadow8);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".fl43uef{font-weight:var(--fontWeightSemibold);}\", \".f19n0e5{color:var(--colorNeutralForeground1);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".f1w7i9ko{color:var(--colorNeutralForegroundInverted2);}\", \".f5pduvr{background-color:var(--colorNeutralBackgroundInverted);}\", \".fd461yt{height:16px;}\", \".f4ybsrx{font-size:16px;}\", \".f19lj068{padding-right:8px;}\", \".f177v4lu{padding-left:8px;}\", \".f1cnd47f{padding-left:0;}\", \".fhxju0i{padding-right:0;}\", \".f1hu3pq6{margin-top:0;}\", \".f1phki43{margin-right:8px;}\", \".ff9s3yw{margin-left:8px;}\", \".f19f4twv{margin-bottom:0;}\", \".f1tyq0we{margin-left:0;}\", \".f11qmguv{margin-right:0;}\", \".f1sbtcvk{padding-top:5px;}\", \".f81rol6{padding-right:10px;}\", \".frdkuqy{padding-left:10px;}\", \".fdghr9{padding-bottom:5px;}\", \".fy77jfu{min-width:0;}\", \".fcgxt0o{margin-left:auto;}\", \".f1ujusj6{margin-right:auto;}\", \".f16muhyy{color:var(--colorBrandForeground1);}\"]\n});\nconst useIntentIconStyles = /*#__PURE__*/__styles({\n success: {\n sj55zd: \"f1m7fhi8\"\n },\n error: {\n sj55zd: \"f1whyuy6\"\n },\n warning: {\n sj55zd: \"fpti2h4\"\n },\n info: {\n sj55zd: \"fkfq4zb\"\n }\n}, {\n d: [\".f1m7fhi8{color:var(--colorPaletteGreenForeground3);}\", \".f1whyuy6{color:var(--colorPaletteRedForeground3);}\", \".fpti2h4{color:var(--colorPaletteYellowForeground2);}\", \".fkfq4zb{color:var(--colorNeutralForeground2);}\"]\n});\nconst useIntentIconStylesInverted = /*#__PURE__*/__styles({\n success: {\n sj55zd: \"f1pvjcpr\"\n },\n error: {\n sj55zd: \"fcrp5ll\"\n },\n warning: {\n sj55zd: \"f1r8f1cl\"\n },\n info: {\n sj55zd: \"f1w7i9ko\"\n }\n}, {\n d: [\".f1pvjcpr{color:var(--colorPaletteGreenForegroundInverted);}\", \".fcrp5ll{color:var(--colorPaletteRedForegroundInverted);}\", \".f1r8f1cl{color:var(--colorPaletteYellowForegroundInverted);}\", \".f1w7i9ko{color:var(--colorNeutralForegroundInverted2);}\"]\n});\nconst useActionButtonColorInverted = /*#__PURE__*/__styles({\n action: {\n sj55zd: \"f1qz2gb0\",\n B8q5s1w: \"fa5e339\",\n Bci5o5g: [\"fk4svks\", \"fqzoz0o\"],\n n8qw10: \"fw8q0i0\",\n Bdrgwmp: [\"fqzoz0o\", \"fk4svks\"],\n Bfpq7zp: \"f1dlk4fq\"\n }\n}, {\n d: [\".f1qz2gb0{color:var(--colorBrandForegroundInverted);}\", \".fa5e339[data-fui-focus-visible]{border-top-color:var(--colorTransparentStrokeInteractive);}\", \".fk4svks[data-fui-focus-visible]{border-right-color:var(--colorTransparentStrokeInteractive);}\", \".fqzoz0o[data-fui-focus-visible]{border-left-color:var(--colorTransparentStrokeInteractive);}\", \".fw8q0i0[data-fui-focus-visible]{border-bottom-color:var(--colorTransparentStrokeInteractive);}\", \".f1dlk4fq[data-fui-focus-visible]{outline-color:var(--colorNeutralBackground5Pressed);}\"]\n});\n/**\n * Apply styling to the Alert slots based on the state\n */\nexport const useAlertStyles_unstable = state => {\n const inverted = state.appearance === 'inverted';\n const styles = useStyles();\n const intentIconStylesPrimary = useIntentIconStyles();\n const intentIconStylesInverted = useIntentIconStylesInverted();\n const actionStylesInverted = useActionButtonColorInverted();\n state.root.className = mergeClasses(alertClassNames.root, styles.root, inverted && styles.inverted, state.root.className);\n if (state.icon) {\n state.icon.className = mergeClasses(alertClassNames.icon, styles.icon, state.intent && (inverted ? intentIconStylesInverted[state.intent] : intentIconStylesPrimary[state.intent]), state.icon.className);\n }\n if (state.avatar) {\n state.avatar.className = mergeClasses(alertClassNames.avatar, styles.avatar, state.avatar.className);\n }\n if (state.action) {\n // Note: inverted && actionStylesInverted.action has the highest piority and must be merged last\n state.action.className = mergeClasses(alertClassNames.action, styles.action, inverted && actionStylesInverted.action, state.action.className);\n }\n return state;\n};\n//# sourceMappingURL=useAlertStyles.styles.js.map"],"names":["alertClassNames","useAlertStyles_unstable","root","icon","action","avatar","useStyles","__styles","mc9l5x","Bt984gj","sshi5w","z8tnut","z189sj","Byoj8tv","uwmqm3","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","E5pizo","Be2twd7","Bhrd7zp","sj55zd","De3pzq","inverted","Bqenvij","B6of3ja","t21cq0","jrapky","Frg6f3","Bf4jedk","d","useIntentIconStyles","success","error","warning","info","useIntentIconStylesInverted","useActionButtonColorInverted","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bfpq7zp","state","appearance","styles","intentIconStylesPrimary","intentIconStylesInverted","actionStylesInverted","className","mergeClasses","intent"],"mappings":";;;;;;;;;;;IAGaA,eAAe;eAAfA;;IAkHAC,uBAAuB;eAAvBA;;;uBApHsC;AAE5C,MAAMD,kBAAkB;IAC7BE,MAAM;IACNC,MAAM;IACNC,QAAQ;IACRC,QAAQ;AACV;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCL,MAAM;QACJM,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,SAAS;YAAC;YAAW;SAAW;QAChCC,SAAS;YAAC;YAAY;SAAU;QAChCC,SAAS;YAAC;YAAW;SAAU;QAC/BC,SAAS;YAAC;YAAW;SAAU;QAC/BC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAU;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,QAAQ;QACRC,QAAQ;YAAC;YAAW;SAAU;QAC9BC,QAAQ;QACRC,QAAQ;YAAC;YAAW;SAAU;QAC9BC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,QAAQ;IACV;IACAC,UAAU;QACRF,QAAQ;QACRC,QAAQ;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oD,MAAMpD,MAAM,CAAC0D,SAAS,GAAGC,IAAAA,mBAAY,EAAC/D,gBAAgBI,MAAM,EAAEsD,OAAOtD,MAAM,EAAEgC,YAAYyB,qBAAqBzD,MAAM,EAAEoD,MAAMpD,MAAM,CAAC0D,SAAS;IAC9I;IACA,OAAON;AACT,GACA,iDAAiD"}
1
+ {"version":3,"sources":["useAlertStyles.styles.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\n// eslint-disable-next-line deprecation/deprecation\nexport const alertClassNames = {\n root: 'fui-Alert',\n icon: 'fui-Alert__icon',\n action: 'fui-Alert__action',\n avatar: 'fui-Alert__avatar'\n};\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"f22iagw\",\n Bt984gj: \"f122n59\",\n sshi5w: \"f5pgtk9\",\n z8tnut: \"f1g0x7ka\",\n z189sj: [\"f11qrl6u\", \"fjlbh76\"],\n Byoj8tv: \"f1qch9an\",\n uwmqm3: [\"fjlbh76\", \"f11qrl6u\"],\n Bbmb7ep: [\"fff7au0\", \"f1bjk9e1\"],\n Beyfa6y: [\"f1bjk9e1\", \"fff7au0\"],\n B7oj6ja: [\"fwsfkhu\", \"f8wkphi\"],\n Btl43ni: [\"f8wkphi\", \"fwsfkhu\"],\n B4j52fo: \"f5ogflp\",\n Bekrc4i: [\"f1hqa2wf\", \"finvdd3\"],\n Bn0qgzm: \"f1f09k3d\",\n ibv6hh: [\"finvdd3\", \"f1hqa2wf\"],\n icvyot: \"fzkkow9\",\n vrafjx: [\"fcdblym\", \"fjik90z\"],\n oivjwe: \"fg706s2\",\n wvpqe5: [\"fjik90z\", \"fcdblym\"],\n g2u3we: \"fghlq4f\",\n h3c5rm: [\"f1gn591s\", \"fjscplz\"],\n B9xav0g: \"fb073pr\",\n zhjwy3: [\"fjscplz\", \"f1gn591s\"],\n E5pizo: \"fz58gqq\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"fl43uef\",\n sj55zd: \"f19n0e5\",\n De3pzq: \"fxugw4r\"\n },\n inverted: {\n sj55zd: \"f1w7i9ko\",\n De3pzq: \"f5pduvr\"\n },\n icon: {\n Bqenvij: \"fd461yt\",\n Be2twd7: \"f4ybsrx\",\n z8tnut: \"f1g0x7ka\",\n z189sj: [\"f19lj068\", \"f177v4lu\"],\n Byoj8tv: \"f1qch9an\",\n uwmqm3: [\"f1cnd47f\", \"fhxju0i\"]\n },\n avatar: {\n B6of3ja: \"f1hu3pq6\",\n t21cq0: [\"f1phki43\", \"ff9s3yw\"],\n jrapky: \"f19f4twv\",\n Frg6f3: [\"f1tyq0we\", \"f11qmguv\"]\n },\n action: {\n z8tnut: \"f1sbtcvk\",\n z189sj: [\"f81rol6\", \"frdkuqy\"],\n Byoj8tv: \"fdghr9\",\n uwmqm3: [\"frdkuqy\", \"f81rol6\"],\n Bf4jedk: \"fy77jfu\",\n Frg6f3: [\"fcgxt0o\", \"f1ujusj6\"],\n sj55zd: \"f16muhyy\"\n }\n}, {\n d: [\".f22iagw{display:flex;}\", \".f122n59{align-items:center;}\", \".f5pgtk9{min-height:44px;}\", \".f1g0x7ka{padding-top:0;}\", \".f11qrl6u{padding-right:12px;}\", \".fjlbh76{padding-left:12px;}\", \".f1qch9an{padding-bottom:0;}\", \".fff7au0{border-bottom-right-radius:4px;}\", \".f1bjk9e1{border-bottom-left-radius:4px;}\", \".fwsfkhu{border-top-right-radius:4px;}\", \".f8wkphi{border-top-left-radius:4px;}\", \".f5ogflp{border-top-width:1px;}\", \".f1hqa2wf{border-right-width:1px;}\", \".finvdd3{border-left-width:1px;}\", \".f1f09k3d{border-bottom-width:1px;}\", \".fzkkow9{border-top-style:solid;}\", \".fcdblym{border-right-style:solid;}\", \".fjik90z{border-left-style:solid;}\", \".fg706s2{border-bottom-style:solid;}\", \".fghlq4f{border-top-color:var(--colorTransparentStroke);}\", \".f1gn591s{border-right-color:var(--colorTransparentStroke);}\", \".fjscplz{border-left-color:var(--colorTransparentStroke);}\", \".fb073pr{border-bottom-color:var(--colorTransparentStroke);}\", \".fz58gqq{box-shadow:var(--shadow8);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".fl43uef{font-weight:var(--fontWeightSemibold);}\", \".f19n0e5{color:var(--colorNeutralForeground1);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".f1w7i9ko{color:var(--colorNeutralForegroundInverted2);}\", \".f5pduvr{background-color:var(--colorNeutralBackgroundInverted);}\", \".fd461yt{height:16px;}\", \".f4ybsrx{font-size:16px;}\", \".f19lj068{padding-right:8px;}\", \".f177v4lu{padding-left:8px;}\", \".f1cnd47f{padding-left:0;}\", \".fhxju0i{padding-right:0;}\", \".f1hu3pq6{margin-top:0;}\", \".f1phki43{margin-right:8px;}\", \".ff9s3yw{margin-left:8px;}\", \".f19f4twv{margin-bottom:0;}\", \".f1tyq0we{margin-left:0;}\", \".f11qmguv{margin-right:0;}\", \".f1sbtcvk{padding-top:5px;}\", \".f81rol6{padding-right:10px;}\", \".frdkuqy{padding-left:10px;}\", \".fdghr9{padding-bottom:5px;}\", \".fy77jfu{min-width:0;}\", \".fcgxt0o{margin-left:auto;}\", \".f1ujusj6{margin-right:auto;}\", \".f16muhyy{color:var(--colorBrandForeground1);}\"]\n});\nconst useIntentIconStyles = /*#__PURE__*/__styles({\n success: {\n sj55zd: \"f1m7fhi8\"\n },\n error: {\n sj55zd: \"f1whyuy6\"\n },\n warning: {\n sj55zd: \"fpti2h4\"\n },\n info: {\n sj55zd: \"fkfq4zb\"\n }\n}, {\n d: [\".f1m7fhi8{color:var(--colorPaletteGreenForeground3);}\", \".f1whyuy6{color:var(--colorPaletteRedForeground3);}\", \".fpti2h4{color:var(--colorPaletteYellowForeground2);}\", \".fkfq4zb{color:var(--colorNeutralForeground2);}\"]\n});\nconst useIntentIconStylesInverted = /*#__PURE__*/__styles({\n success: {\n sj55zd: \"f1pvjcpr\"\n },\n error: {\n sj55zd: \"fcrp5ll\"\n },\n warning: {\n sj55zd: \"f1r8f1cl\"\n },\n info: {\n sj55zd: \"f1w7i9ko\"\n }\n}, {\n d: [\".f1pvjcpr{color:var(--colorPaletteGreenForegroundInverted);}\", \".fcrp5ll{color:var(--colorPaletteRedForegroundInverted);}\", \".f1r8f1cl{color:var(--colorPaletteYellowForegroundInverted);}\", \".f1w7i9ko{color:var(--colorNeutralForegroundInverted2);}\"]\n});\nconst useActionButtonColorInverted = /*#__PURE__*/__styles({\n action: {\n sj55zd: \"f1qz2gb0\",\n B8q5s1w: \"fa5e339\",\n Bci5o5g: [\"fk4svks\", \"fqzoz0o\"],\n n8qw10: \"fw8q0i0\",\n Bdrgwmp: [\"fqzoz0o\", \"fk4svks\"],\n Bfpq7zp: \"f1dlk4fq\"\n }\n}, {\n d: [\".f1qz2gb0{color:var(--colorBrandForegroundInverted);}\", \".fa5e339[data-fui-focus-visible]{border-top-color:var(--colorTransparentStrokeInteractive);}\", \".fk4svks[data-fui-focus-visible]{border-right-color:var(--colorTransparentStrokeInteractive);}\", \".fqzoz0o[data-fui-focus-visible]{border-left-color:var(--colorTransparentStrokeInteractive);}\", \".fw8q0i0[data-fui-focus-visible]{border-bottom-color:var(--colorTransparentStrokeInteractive);}\", \".f1dlk4fq[data-fui-focus-visible]{outline-color:var(--colorNeutralBackground5Pressed);}\"]\n});\n/**\n * @deprecated please use the Toast or MessageBar component\n * Apply styling to the Alert slots based on the state\n */ // eslint-disable-next-line deprecation/deprecation\nexport const useAlertStyles_unstable = state => {\n const inverted = state.appearance === 'inverted';\n const styles = useStyles();\n const intentIconStylesPrimary = useIntentIconStyles();\n const intentIconStylesInverted = useIntentIconStylesInverted();\n const actionStylesInverted = useActionButtonColorInverted();\n state.root.className = mergeClasses(alertClassNames.root, styles.root, inverted && styles.inverted, state.root.className);\n if (state.icon) {\n state.icon.className = mergeClasses(alertClassNames.icon, styles.icon, state.intent && (inverted ? intentIconStylesInverted[state.intent] : intentIconStylesPrimary[state.intent]), state.icon.className);\n }\n if (state.avatar) {\n state.avatar.className = mergeClasses(alertClassNames.avatar, styles.avatar, state.avatar.className);\n }\n if (state.action) {\n // Note: inverted && actionStylesInverted.action has the highest piority and must be merged last\n state.action.className = mergeClasses(alertClassNames.action, styles.action, inverted && actionStylesInverted.action, state.action.className);\n }\n return state;\n};\n//# sourceMappingURL=useAlertStyles.styles.js.map"],"names":["alertClassNames","useAlertStyles_unstable","root","icon","action","avatar","useStyles","__styles","mc9l5x","Bt984gj","sshi5w","z8tnut","z189sj","Byoj8tv","uwmqm3","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","E5pizo","Be2twd7","Bhrd7zp","sj55zd","De3pzq","inverted","Bqenvij","B6of3ja","t21cq0","jrapky","Frg6f3","Bf4jedk","d","useIntentIconStyles","success","error","warning","info","useIntentIconStylesInverted","useActionButtonColorInverted","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bfpq7zp","state","appearance","styles","intentIconStylesPrimary","intentIconStylesInverted","actionStylesInverted","className","mergeClasses","intent"],"mappings":";;;;;;;;;;;IAIaA,eAAe;eAAfA;;IAmHAC,uBAAuB;eAAvBA;;;uBAtHsC;AAG5C,MAAMD,kBAAkB;IAC7BE,MAAM;IACNC,MAAM;IACNC,QAAQ;IACRC,QAAQ;AACV;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCL,MAAM;QACJM,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,SAAS;YAAC;YAAW;SAAW;QAChCC,SAAS;YAAC;YAAY;SAAU;QAChCC,SAAS;YAAC;YAAW;SAAU;QAC/BC,SAAS;YA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qD,MAAMQ,MAAM,IAAK5B,CAAAA,WAAWwB,wBAAwB,CAACJ,MAAMQ,MAAM,CAAC,GAAGL,uBAAuB,CAACH,MAAMQ,MAAM,CAAC,AAAD,GAAIR,MAAMrD,IAAI,CAAC2D,SAAS;IAC1M;IACA,IAAIN,MAAMnD,MAAM,EAAE;QAChBmD,MAAMnD,MAAM,CAACyD,SAAS,GAAGC,IAAAA,mBAAY,EAAC/D,gBAAgBK,MAAM,EAAEqD,OAAOrD,MAAM,EAAEmD,MAAMnD,MAAM,CAACyD,SAAS;IACrG;IACA,IAAIN,MAAMpD,MAAM,EAAE;QAChB,gGAAgG;QAChGoD,MAAMpD,MAAM,CAAC0D,SAAS,GAAGC,IAAAA,mBAAY,EAAC/D,gBAAgBI,MAAM,EAAEsD,OAAOtD,MAAM,EAAEgC,YAAYyB,qBAAqBzD,MAAM,EAAEoD,MAAMpD,MAAM,CAAC0D,SAAS;IAC9I;IACA,OAAON;AACT,GACA,iDAAiD"}
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line deprecation/deprecation
1
2
  "use strict";
2
3
  Object.defineProperty(exports, "__esModule", {
3
4
  value: true
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export { Alert, alertClassNames, renderAlert_unstable, useAlertStyles_unstable, useAlert_unstable } from './Alert';\n"],"names":["Alert","alertClassNames","renderAlert_unstable","useAlertStyles_unstable","useAlert_unstable"],"mappings":";;;;;;;;;;;IAASA,KAAK;eAALA,YAAK;;IAAEC,eAAe;eAAfA,sBAAe;;IAAEC,oBAAoB;eAApBA,2BAAoB;;IAAEC,uBAAuB;eAAvBA,8BAAuB;;IAAEC,iBAAiB;eAAjBA,wBAAiB;;;uBAAQ"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["// eslint-disable-next-line deprecation/deprecation\nexport { Alert, alertClassNames, renderAlert_unstable, useAlertStyles_unstable, useAlert_unstable } from './Alert';\n"],"names":["Alert","alertClassNames","renderAlert_unstable","useAlertStyles_unstable","useAlert_unstable"],"mappings":"AAAA,mDAAmD;;;;;;;;;;;;IAC1CA,KAAK;eAALA,YAAK;;IAAEC,eAAe;eAAfA,sBAAe;;IAAEC,oBAAoB;eAApBA,2BAAoB;;IAAEC,uBAAuB;eAAvBA,8BAAuB;;IAAEC,iBAAiB;eAAjBA,wBAAiB;;;uBAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-alert",
3
- "version": "9.0.0-beta.87",
3
+ "version": "9.0.0-beta.89",
4
4
  "description": "An alert component to display brief messages",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -33,10 +33,10 @@
33
33
  "@fluentui/scripts-tasks": "*"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui/react-avatar": "^9.5.41",
37
- "@fluentui/react-button": "^9.3.50",
36
+ "@fluentui/react-avatar": "^9.5.43",
37
+ "@fluentui/react-button": "^9.3.52",
38
38
  "@fluentui/react-icons": "^2.0.217",
39
- "@fluentui/react-tabster": "^9.14.0",
39
+ "@fluentui/react-tabster": "^9.14.2",
40
40
  "@fluentui/react-theme": "^9.1.14",
41
41
  "@fluentui/react-utilities": "^9.15.1",
42
42
  "@fluentui/react-jsx-runtime": "^9.0.18",