@fluentui/react-alert 9.0.0-beta.40 → 9.0.0-beta.41

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.
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","react_avatar_1","react_button_1","react_icons_1","react_utilities_1","useAlert_unstable","props","ref","appearance","intent","defaultIcon","defaultRole","createElement","CheckmarkCircleFilled","DismissCircleFilled","WarningFilled","InfoFilled","action","resolveShorthand","defaultProps","avatar","icon","children","required","components","root","Button","Avatar","getNativeElementProps","role","exports"],"sources":["../src/packages/react-components/react-alert/src/components/Alert/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 { getNativeElementProps, resolveShorthand } 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 = resolveShorthand(props.action, { defaultProps: { appearance: 'transparent' } });\n const avatar = resolveShorthand(props.avatar);\n let icon;\n /** Avatar prop takes precedence over the icon or intent prop */\n if (!avatar) {\n icon = resolveShorthand(props.icon, {\n defaultProps: {\n children: defaultIcon,\n },\n required: !!props.intent,\n });\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: getNativeElementProps('div', {\n ref,\n role: defaultRole,\n children: props.children,\n ...props,\n }),\n };\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AAEA,MAAAC,cAAA,gBAAAD,OAAA;AACA,MAAAE,cAAA,gBAAAF,OAAA;AACA,MAAAG,aAAA,gBAAAH,OAAA;AACA,MAAAI,iBAAA,gBAAAJ,OAAA;AAIA;;;;;;;;;AASO,MAAMK,iBAAiB,GAAGA,CAACC,KAAiB,EAAEC,GAA2B,KAAgB;EAC9F,MAAM;IAAEC,UAAU,GAAG,SAAS;IAAEC;EAAM,CAAE,GAAGH,KAAK;EAEhD;EACA,IAAII,WAAW;EACf,IAAIC,WAAW,GAAG,QAAQ;EAC1B,QAAQF,MAAM;IACZ,KAAK,SAAS;MACZC,WAAW,GAAGX,KAAA,CAAAa,aAAA,CAACT,aAAA,CAAAU,qBAAqB,OAAG;MACvC;IACF,KAAK,OAAO;MACVH,WAAW,GAAGX,KAAA,CAAAa,aAAA,CAACT,aAAA,CAAAW,mBAAmB,OAAG;MACrCH,WAAW,GAAG,OAAO;MACrB;IACF,KAAK,SAAS;MACZD,WAAW,GAAGX,KAAA,CAAAa,aAAA,CAACT,aAAA,CAAAY,aAAa,OAAG;MAC/BJ,WAAW,GAAG,OAAO;MACrB;IACF,KAAK,MAAM;MACTD,WAAW,GAAGX,KAAA,CAAAa,aAAA,CAACT,aAAA,CAAAa,UAAU,OAAG;MAC5B;EAAM;EAGV,MAAMC,MAAM,GAAGb,iBAAA,CAAAc,gBAAgB,CAACZ,KAAK,CAACW,MAAM,EAAE;IAAEE,YAAY,EAAE;MAAEX,UAAU,EAAE;IAAa;EAAE,CAAE,CAAC;EAC9F,MAAMY,MAAM,GAAGhB,iBAAA,CAAAc,gBAAgB,CAACZ,KAAK,CAACc,MAAM,CAAC;EAC7C,IAAIC,IAAI;EACR;EACA,IAAI,CAACD,MAAM,EAAE;IACXC,IAAI,GAAGjB,iBAAA,CAAAc,gBAAgB,CAACZ,KAAK,CAACe,IAAI,EAAE;MAClCF,YAAY,EAAE;QACZG,QAAQ,EAAEZ;OACX;MACDa,QAAQ,EAAE,CAAC,CAACjB,KAAK,CAACG;KACnB,CAAC;;EAGJ,OAAO;IACLQ,MAAM;IACNT,UAAU;IACVY,MAAM;IACNI,UAAU,EAAE;MACVC,IAAI,EAAE,KAAK;MACXJ,IAAI,EAAE,MAAM;MACZJ,MAAM,EAAEf,cAAA,CAAAwB,MAAM;MACdN,MAAM,EAAEnB,cAAA,CAAA0B;KACT;IACDN,IAAI;IACJZ,MAAM;IACNgB,IAAI,EAAErB,iBAAA,CAAAwB,qBAAqB,CAAC,KAAK,EAAE;MACjCrB,GAAG;MACHsB,IAAI,EAAElB,WAAW;MACjBW,QAAQ,EAAEhB,KAAK,CAACgB,QAAQ;MACxB,GAAGhB;KACJ;GACF;AACH,CAAC;AAvDYwB,OAAA,CAAAzB,iBAAiB,GAAAA,iBAAA"}
1
+ {"version":3,"sources":["../../../lib/components/Alert/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 { getNativeElementProps, resolveShorthand } 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 */\nexport const useAlert_unstable = (props, ref) => {\n const {\n appearance = 'primary',\n intent\n } = props;\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 = /*#__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 = resolveShorthand(props.action, {\n defaultProps: {\n appearance: 'transparent'\n }\n });\n const avatar = resolveShorthand(props.avatar);\n let icon;\n /** Avatar prop takes precedence over the icon or intent prop */\n if (!avatar) {\n icon = resolveShorthand(props.icon, {\n defaultProps: {\n children: defaultIcon\n },\n required: !!props.intent\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: getNativeElementProps('div', {\n ref,\n role: defaultRole,\n children: props.children,\n ...props\n })\n };\n};\n//# sourceMappingURL=useAlert.js.map"],"names":["useAlert_unstable","props","ref","appearance","intent","defaultIcon","defaultRole","React","createElement","CheckmarkCircleFilled","DismissCircleFilled","WarningFilled","InfoFilled","action","resolveShorthand","defaultProps","avatar","icon","children","required","components","root","Button","Avatar","getNativeElementProps","role"],"mappings":";;;;+BAcaA;;aAAAA;;;6DAdU;6BACA;6BACA;4BAC+D;gCAC9B;AAUjD,MAAMA,oBAAoB,CAACC,OAAOC,MAAQ;IAC/C,MAAM,EACJC,YAAa,UAAS,EACtBC,OAAM,EACP,GAAGH;IACJ,8DAA8D,GAC9D,IAAII;IACJ,IAAIC,cAAc;IAClB,OAAQF;QACN,KAAK;YACHC,cAAc,WAAW,GAAEE,OAAMC,aAAa,CAACC,iCAAqB,EAAE,IAAI;YAC1E,KAAM;QACR,KAAK;YACHJ,cAAc,WAAW,GAAEE,OAAMC,aAAa,CAACE,+BAAmB,EAAE,IAAI;YACxEJ,cAAc;YACd,KAAM;QACR,KAAK;YACHD,cAAc,WAAW,GAAEE,OAAMC,aAAa,CAACG,yBAAa,EAAE,IAAI;YAClEL,cAAc;YACd,KAAM;QACR,KAAK;YACHD,cAAc,WAAW,GAAEE,OAAMC,aAAa,CAACI,sBAAU,EAAE,IAAI;YAC/D,KAAM;IACV;IACA,MAAMC,SAASC,IAAAA,gCAAgB,EAACb,MAAMY,MAAM,EAAE;QAC5CE,cAAc;YACZZ,YAAY;QACd;IACF;IACA,MAAMa,SAASF,IAAAA,gCAAgB,EAACb,MAAMe,MAAM;IAC5C,IAAIC;IACJ,8DAA8D,GAC9D,IAAI,CAACD,QAAQ;QACXC,OAAOH,IAAAA,gCAAgB,EAACb,MAAMgB,IAAI,EAAE;YAClCF,cAAc;gBACZG,UAAUb;YACZ;YACAc,UAAU,CAAC,CAAClB,MAAMG,MAAM;QAC1B;IACF,CAAC;IACD,OAAO;QACLS;QACAV;QACAa;QACAI,YAAY;YACVC,MAAM;YACNJ,MAAM;YACNJ,QAAQS,mBAAM;YACdN,QAAQO,mBAAM;QAChB;QACAN;QACAb;QACAiB,MAAMG,IAAAA,qCAAqB,EAAC,OAAO;YACjCtB;YACAuB,MAAMnB;YACNY,UAAUjB,MAAMiB,QAAQ;YACxB,GAAGjB,KAAK;QACV;IACF;AACF,GACA,oCAAoC"}
@@ -1,144 +1,278 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ alertClassNames: ()=>alertClassNames,
13
+ useAlertStyles_unstable: ()=>useAlertStyles_unstable
5
14
  });
6
- exports.useAlertStyles_unstable = exports.alertClassNames = void 0;
7
- const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
8
- const react_1 = /*#__PURE__*/require("@griffel/react");
9
- const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
10
- exports.alertClassNames = {
11
- root: 'fui-Alert',
12
- icon: 'fui-Alert__icon',
13
- action: 'fui-Alert__action',
14
- avatar: 'fui-Alert__avatar'
15
+ const _react = require("@griffel/react");
16
+ const alertClassNames = {
17
+ root: 'fui-Alert',
18
+ icon: 'fui-Alert__icon',
19
+ action: 'fui-Alert__action',
20
+ avatar: 'fui-Alert__avatar'
15
21
  };
16
- const useStyles = /*#__PURE__*/react_1.__styles({
17
- root: {
18
- mc9l5x: "f22iagw",
19
- Bt984gj: "f122n59",
20
- sshi5w: "f5pgtk9",
21
- z8tnut: "f1g0x7ka",
22
- z189sj: ["f11qrl6u", "fjlbh76"],
23
- Byoj8tv: "f1qch9an",
24
- uwmqm3: ["fjlbh76", "f11qrl6u"],
25
- Bbmb7ep: ["fff7au0", "f1bjk9e1"],
26
- Beyfa6y: ["f1bjk9e1", "fff7au0"],
27
- B7oj6ja: ["fwsfkhu", "f8wkphi"],
28
- Btl43ni: ["f8wkphi", "fwsfkhu"],
29
- B4j52fo: "f5ogflp",
30
- Bekrc4i: ["f1hqa2wf", "finvdd3"],
31
- Bn0qgzm: "f1f09k3d",
32
- ibv6hh: ["finvdd3", "f1hqa2wf"],
33
- icvyot: "fzkkow9",
34
- vrafjx: ["fcdblym", "fjik90z"],
35
- oivjwe: "fg706s2",
36
- wvpqe5: ["fjik90z", "fcdblym"],
37
- g2u3we: "fghlq4f",
38
- h3c5rm: ["f1gn591s", "fjscplz"],
39
- B9xav0g: "fb073pr",
40
- zhjwy3: ["fjscplz", "f1gn591s"],
41
- E5pizo: "fz58gqq",
42
- Be2twd7: "fkhj508",
43
- Bhrd7zp: "fl43uef",
44
- sj55zd: "f19n0e5",
45
- De3pzq: "fxugw4r"
46
- },
47
- inverted: {
48
- sj55zd: "f1w7i9ko",
49
- De3pzq: "f5pduvr"
50
- },
51
- icon: {
52
- Bqenvij: "fd461yt",
53
- Be2twd7: "f4ybsrx",
54
- z8tnut: "f1g0x7ka",
55
- z189sj: ["f19lj068", "f177v4lu"],
56
- Byoj8tv: "f1qch9an",
57
- uwmqm3: ["f1cnd47f", "fhxju0i"]
58
- },
59
- avatar: {
60
- B6of3ja: "f1hu3pq6",
61
- t21cq0: ["f1phki43", "ff9s3yw"],
62
- jrapky: "f19f4twv",
63
- Frg6f3: ["f1tyq0we", "f11qmguv"]
64
- },
65
- action: {
66
- z8tnut: "f1sbtcvk",
67
- z189sj: ["f81rol6", "frdkuqy"],
68
- Byoj8tv: "fdghr9",
69
- uwmqm3: ["frdkuqy", "f81rol6"],
70
- Bf4jedk: "fy77jfu",
71
- Frg6f3: ["fcgxt0o", "f1ujusj6"],
72
- sj55zd: "f16muhyy"
73
- }
22
+ const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
23
+ root: {
24
+ mc9l5x: "f22iagw",
25
+ Bt984gj: "f122n59",
26
+ sshi5w: "f5pgtk9",
27
+ z8tnut: "f1g0x7ka",
28
+ z189sj: [
29
+ "f11qrl6u",
30
+ "fjlbh76"
31
+ ],
32
+ Byoj8tv: "f1qch9an",
33
+ uwmqm3: [
34
+ "fjlbh76",
35
+ "f11qrl6u"
36
+ ],
37
+ Bbmb7ep: [
38
+ "fff7au0",
39
+ "f1bjk9e1"
40
+ ],
41
+ Beyfa6y: [
42
+ "f1bjk9e1",
43
+ "fff7au0"
44
+ ],
45
+ B7oj6ja: [
46
+ "fwsfkhu",
47
+ "f8wkphi"
48
+ ],
49
+ Btl43ni: [
50
+ "f8wkphi",
51
+ "fwsfkhu"
52
+ ],
53
+ B4j52fo: "f5ogflp",
54
+ Bekrc4i: [
55
+ "f1hqa2wf",
56
+ "finvdd3"
57
+ ],
58
+ Bn0qgzm: "f1f09k3d",
59
+ ibv6hh: [
60
+ "finvdd3",
61
+ "f1hqa2wf"
62
+ ],
63
+ icvyot: "fzkkow9",
64
+ vrafjx: [
65
+ "fcdblym",
66
+ "fjik90z"
67
+ ],
68
+ oivjwe: "fg706s2",
69
+ wvpqe5: [
70
+ "fjik90z",
71
+ "fcdblym"
72
+ ],
73
+ g2u3we: "fghlq4f",
74
+ h3c5rm: [
75
+ "f1gn591s",
76
+ "fjscplz"
77
+ ],
78
+ B9xav0g: "fb073pr",
79
+ zhjwy3: [
80
+ "fjscplz",
81
+ "f1gn591s"
82
+ ],
83
+ E5pizo: "fz58gqq",
84
+ Be2twd7: "fkhj508",
85
+ Bhrd7zp: "fl43uef",
86
+ sj55zd: "f19n0e5",
87
+ De3pzq: "fxugw4r"
88
+ },
89
+ inverted: {
90
+ sj55zd: "f1w7i9ko",
91
+ De3pzq: "f5pduvr"
92
+ },
93
+ icon: {
94
+ Bqenvij: "fd461yt",
95
+ Be2twd7: "f4ybsrx",
96
+ z8tnut: "f1g0x7ka",
97
+ z189sj: [
98
+ "f19lj068",
99
+ "f177v4lu"
100
+ ],
101
+ Byoj8tv: "f1qch9an",
102
+ uwmqm3: [
103
+ "f1cnd47f",
104
+ "fhxju0i"
105
+ ]
106
+ },
107
+ avatar: {
108
+ B6of3ja: "f1hu3pq6",
109
+ t21cq0: [
110
+ "f1phki43",
111
+ "ff9s3yw"
112
+ ],
113
+ jrapky: "f19f4twv",
114
+ Frg6f3: [
115
+ "f1tyq0we",
116
+ "f11qmguv"
117
+ ]
118
+ },
119
+ action: {
120
+ z8tnut: "f1sbtcvk",
121
+ z189sj: [
122
+ "f81rol6",
123
+ "frdkuqy"
124
+ ],
125
+ Byoj8tv: "fdghr9",
126
+ uwmqm3: [
127
+ "frdkuqy",
128
+ "f81rol6"
129
+ ],
130
+ Bf4jedk: "fy77jfu",
131
+ Frg6f3: [
132
+ "fcgxt0o",
133
+ "f1ujusj6"
134
+ ],
135
+ sj55zd: "f16muhyy"
136
+ }
74
137
  }, {
75
- d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;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);}"]
138
+ d: [
139
+ ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}",
140
+ ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}",
141
+ ".f5pgtk9{min-height:44px;}",
142
+ ".f1g0x7ka{padding-top:0;}",
143
+ ".f11qrl6u{padding-right:12px;}",
144
+ ".fjlbh76{padding-left:12px;}",
145
+ ".f1qch9an{padding-bottom:0;}",
146
+ ".fff7au0{border-bottom-right-radius:4px;}",
147
+ ".f1bjk9e1{border-bottom-left-radius:4px;}",
148
+ ".fwsfkhu{border-top-right-radius:4px;}",
149
+ ".f8wkphi{border-top-left-radius:4px;}",
150
+ ".f5ogflp{border-top-width:1px;}",
151
+ ".f1hqa2wf{border-right-width:1px;}",
152
+ ".finvdd3{border-left-width:1px;}",
153
+ ".f1f09k3d{border-bottom-width:1px;}",
154
+ ".fzkkow9{border-top-style:solid;}",
155
+ ".fcdblym{border-right-style:solid;}",
156
+ ".fjik90z{border-left-style:solid;}",
157
+ ".fg706s2{border-bottom-style:solid;}",
158
+ ".fghlq4f{border-top-color:var(--colorTransparentStroke);}",
159
+ ".f1gn591s{border-right-color:var(--colorTransparentStroke);}",
160
+ ".fjscplz{border-left-color:var(--colorTransparentStroke);}",
161
+ ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}",
162
+ ".fz58gqq{box-shadow:var(--shadow8);}",
163
+ ".fkhj508{font-size:var(--fontSizeBase300);}",
164
+ ".fl43uef{font-weight:var(--fontWeightSemibold);}",
165
+ ".f19n0e5{color:var(--colorNeutralForeground1);}",
166
+ ".fxugw4r{background-color:var(--colorNeutralBackground1);}",
167
+ ".f1w7i9ko{color:var(--colorNeutralForegroundInverted2);}",
168
+ ".f5pduvr{background-color:var(--colorNeutralBackgroundInverted);}",
169
+ ".fd461yt{height:16px;}",
170
+ ".f4ybsrx{font-size:16px;}",
171
+ ".f19lj068{padding-right:8px;}",
172
+ ".f177v4lu{padding-left:8px;}",
173
+ ".f1cnd47f{padding-left:0;}",
174
+ ".fhxju0i{padding-right:0;}",
175
+ ".f1hu3pq6{margin-top:0;}",
176
+ ".f1phki43{margin-right:8px;}",
177
+ ".ff9s3yw{margin-left:8px;}",
178
+ ".f19f4twv{margin-bottom:0;}",
179
+ ".f1tyq0we{margin-left:0;}",
180
+ ".f11qmguv{margin-right:0;}",
181
+ ".f1sbtcvk{padding-top:5px;}",
182
+ ".f81rol6{padding-right:10px;}",
183
+ ".frdkuqy{padding-left:10px;}",
184
+ ".fdghr9{padding-bottom:5px;}",
185
+ ".fy77jfu{min-width:0;}",
186
+ ".fcgxt0o{margin-left:auto;}",
187
+ ".f1ujusj6{margin-right:auto;}",
188
+ ".f16muhyy{color:var(--colorBrandForeground1);}"
189
+ ]
76
190
  });
77
- const useIntentIconStyles = /*#__PURE__*/react_1.__styles({
78
- success: {
79
- sj55zd: "f1m7fhi8"
80
- },
81
- error: {
82
- sj55zd: "f1whyuy6"
83
- },
84
- warning: {
85
- sj55zd: "fpti2h4"
86
- },
87
- info: {
88
- sj55zd: "fkfq4zb"
89
- }
191
+ const useIntentIconStyles = /*#__PURE__*/ (0, _react["__styles"])({
192
+ success: {
193
+ sj55zd: "f1m7fhi8"
194
+ },
195
+ error: {
196
+ sj55zd: "f1whyuy6"
197
+ },
198
+ warning: {
199
+ sj55zd: "fpti2h4"
200
+ },
201
+ info: {
202
+ sj55zd: "fkfq4zb"
203
+ }
90
204
  }, {
91
- d: [".f1m7fhi8{color:var(--colorPaletteGreenForeground3);}", ".f1whyuy6{color:var(--colorPaletteRedForeground3);}", ".fpti2h4{color:var(--colorPaletteYellowForeground2);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}"]
205
+ d: [
206
+ ".f1m7fhi8{color:var(--colorPaletteGreenForeground3);}",
207
+ ".f1whyuy6{color:var(--colorPaletteRedForeground3);}",
208
+ ".fpti2h4{color:var(--colorPaletteYellowForeground2);}",
209
+ ".fkfq4zb{color:var(--colorNeutralForeground2);}"
210
+ ]
92
211
  });
93
- const useIntentIconStylesInverted = /*#__PURE__*/react_1.__styles({
94
- success: {
95
- sj55zd: "f1pvjcpr"
96
- },
97
- error: {
98
- sj55zd: "fcrp5ll"
99
- },
100
- warning: {
101
- sj55zd: "f1r8f1cl"
102
- },
103
- info: {
104
- sj55zd: "f1w7i9ko"
105
- }
212
+ const useIntentIconStylesInverted = /*#__PURE__*/ (0, _react["__styles"])({
213
+ success: {
214
+ sj55zd: "f1pvjcpr"
215
+ },
216
+ error: {
217
+ sj55zd: "fcrp5ll"
218
+ },
219
+ warning: {
220
+ sj55zd: "f1r8f1cl"
221
+ },
222
+ info: {
223
+ sj55zd: "f1w7i9ko"
224
+ }
106
225
  }, {
107
- d: [".f1pvjcpr{color:var(--colorPaletteGreenForegroundInverted);}", ".fcrp5ll{color:var(--colorPaletteRedForegroundInverted);}", ".f1r8f1cl{color:var(--colorPaletteYellowForegroundInverted);}", ".f1w7i9ko{color:var(--colorNeutralForegroundInverted2);}"]
226
+ d: [
227
+ ".f1pvjcpr{color:var(--colorPaletteGreenForegroundInverted);}",
228
+ ".fcrp5ll{color:var(--colorPaletteRedForegroundInverted);}",
229
+ ".f1r8f1cl{color:var(--colorPaletteYellowForegroundInverted);}",
230
+ ".f1w7i9ko{color:var(--colorNeutralForegroundInverted2);}"
231
+ ]
108
232
  });
109
- const useActionButtonColorInverted = /*#__PURE__*/react_1.__styles({
110
- action: {
111
- sj55zd: "f1qz2gb0",
112
- B8q5s1w: "fa5e339",
113
- Bci5o5g: ["fk4svks", "fqzoz0o"],
114
- n8qw10: "fw8q0i0",
115
- Bdrgwmp: ["fqzoz0o", "fk4svks"],
116
- Bfpq7zp: "f1dlk4fq"
117
- }
233
+ const useActionButtonColorInverted = /*#__PURE__*/ (0, _react["__styles"])({
234
+ action: {
235
+ sj55zd: "f1qz2gb0",
236
+ B8q5s1w: "fa5e339",
237
+ Bci5o5g: [
238
+ "fk4svks",
239
+ "fqzoz0o"
240
+ ],
241
+ n8qw10: "fw8q0i0",
242
+ Bdrgwmp: [
243
+ "fqzoz0o",
244
+ "fk4svks"
245
+ ],
246
+ Bfpq7zp: "f1dlk4fq"
247
+ }
118
248
  }, {
119
- 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);}"]
249
+ d: [
250
+ ".f1qz2gb0{color:var(--colorBrandForegroundInverted);}",
251
+ ".fa5e339[data-fui-focus-visible]{border-top-color:var(--colorTransparentStrokeInteractive);}",
252
+ ".fk4svks[data-fui-focus-visible]{border-right-color:var(--colorTransparentStrokeInteractive);}",
253
+ ".fqzoz0o[data-fui-focus-visible]{border-left-color:var(--colorTransparentStrokeInteractive);}",
254
+ ".fw8q0i0[data-fui-focus-visible]{border-bottom-color:var(--colorTransparentStrokeInteractive);}",
255
+ ".f1dlk4fq[data-fui-focus-visible]{outline-color:var(--colorNeutralBackground5Pressed);}"
256
+ ]
120
257
  });
121
- /**
122
- * Apply styling to the Alert slots based on the state
123
- */
124
- const useAlertStyles_unstable = state => {
125
- const inverted = state.appearance === 'inverted';
126
- const styles = useStyles();
127
- const intentIconStylesPrimary = useIntentIconStyles();
128
- const intentIconStylesInverted = useIntentIconStylesInverted();
129
- const actionStylesInverted = useActionButtonColorInverted();
130
- state.root.className = react_1.mergeClasses(exports.alertClassNames.root, styles.root, inverted && styles.inverted, state.root.className);
131
- if (state.icon) {
132
- state.icon.className = react_1.mergeClasses(exports.alertClassNames.icon, styles.icon, state.intent && (inverted ? intentIconStylesInverted[state.intent] : intentIconStylesPrimary[state.intent]), state.icon.className);
133
- }
134
- if (state.avatar) {
135
- state.avatar.className = react_1.mergeClasses(exports.alertClassNames.avatar, styles.avatar, state.avatar.className);
136
- }
137
- if (state.action) {
138
- // Note: inverted && actionStylesInverted.action has the highest piority and must be merged last
139
- state.action.className = react_1.mergeClasses(exports.alertClassNames.action, styles.action, inverted && actionStylesInverted.action, state.action.className);
140
- }
141
- return state;
142
- };
143
- exports.useAlertStyles_unstable = useAlertStyles_unstable;
258
+ const useAlertStyles_unstable = (state)=>{
259
+ const inverted = state.appearance === 'inverted';
260
+ const styles = useStyles();
261
+ const intentIconStylesPrimary = useIntentIconStyles();
262
+ const intentIconStylesInverted = useIntentIconStylesInverted();
263
+ const actionStylesInverted = useActionButtonColorInverted();
264
+ state.root.className = (0, _react.mergeClasses)(alertClassNames.root, styles.root, inverted && styles.inverted, state.root.className);
265
+ if (state.icon) {
266
+ state.icon.className = (0, _react.mergeClasses)(alertClassNames.icon, styles.icon, state.intent && (inverted ? intentIconStylesInverted[state.intent] : intentIconStylesPrimary[state.intent]), state.icon.className);
267
+ }
268
+ if (state.avatar) {
269
+ state.avatar.className = (0, _react.mergeClasses)(alertClassNames.avatar, styles.avatar, state.avatar.className);
270
+ }
271
+ if (state.action) {
272
+ // Note: inverted && actionStylesInverted.action has the highest piority and must be merged last
273
+ state.action.className = (0, _react.mergeClasses)(alertClassNames.action, styles.action, inverted && actionStylesInverted.action, state.action.className);
274
+ }
275
+ return state;
276
+ }; //# sourceMappingURL=useAlertStyles.js.map
277
+
144
278
  //# sourceMappingURL=useAlertStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["react_theme_1","require","react_1","react_tabster_1","exports","alertClassNames","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","useAlertStyles_unstable","state","appearance","styles","intentIconStylesPrimary","intentIconStylesInverted","actionStylesInverted","className","mergeClasses","intent"],"sources":["../src/packages/react-components/react-alert/src/components/Alert/useAlertStyles.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport type { AlertSlots, AlertState } from './Alert.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const alertClassNames: SlotClassNames<AlertSlots> = {\n root: 'fui-Alert',\n icon: 'fui-Alert__icon',\n action: 'fui-Alert__action',\n avatar: 'fui-Alert__avatar',\n};\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});\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});\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});\n\nconst useActionButtonColorInverted = makeStyles({\n action: {\n color: tokens.colorBrandForegroundInverted,\n ...createCustomFocusIndicatorStyle(\n {\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n outlineColor: tokens.colorNeutralBackground5Pressed,\n },\n { enableOutline: true },\n ),\n },\n});\n\n/**\n * Apply styling to the Alert slots based on the state\n */\nexport const useAlertStyles_unstable = (state: AlertState): AlertState => {\n const inverted = state.appearance === 'inverted';\n const styles = useStyles();\n const intentIconStylesPrimary = useIntentIconStyles();\n const intentIconStylesInverted = useIntentIconStylesInverted();\n const actionStylesInverted = useActionButtonColorInverted();\n\n state.root.className = mergeClasses(\n alertClassNames.root,\n styles.root,\n inverted && styles.inverted,\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n alertClassNames.icon,\n styles.icon,\n state.intent && (inverted ? intentIconStylesInverted[state.intent] : intentIconStylesPrimary[state.intent]),\n state.icon.className,\n );\n }\n\n if (state.avatar) {\n state.avatar.className = mergeClasses(alertClassNames.avatar, styles.avatar, state.avatar.className);\n }\n\n if (state.action) {\n // Note: inverted && actionStylesInverted.action has the highest piority and must be merged last\n state.action.className = mergeClasses(\n alertClassNames.action,\n styles.action,\n inverted && actionStylesInverted.action,\n state.action.className,\n );\n }\n\n return state;\n};\n"],"mappings":";;;;;;AAAA,MAAAA,aAAA,gBAAAC,OAAA;AACA,MAAAC,OAAA,gBAAAD,OAAA;AACA,MAAAE,eAAA,gBAAAF,OAAA;AAIaG,OAAA,CAAAC,eAAe,GAA+B;EACzDC,IA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,CAAC0D,SAAS,GAAGjE,OAAA,CAAAkE,YAAY,CAAChE,OAAA,CAAAC,eAAe,CAACI,MAAM,EAAEsD,MAAM,CAACtD,MAAM,EAAEoD,KAAK,CAACpD,MAAM,CAAC0D,SAAS,CAAC;;EAGtG,IAAIN,KAAK,CAACrD,MAAM,EAAE;IAChB;IACAqD,KAAK,CAACrD,MAAM,CAAC2D,SAAS,GAAGjE,OAAA,CAAAkE,YAAY,CACnChE,OAAA,CAAAC,eAAe,CAACG,MAAM,EACtBuD,MAAM,CAACvD,MAAM,EACbgC,QAAQ,IAAI0B,oBAAoB,CAAC1D,MAAM,EACvCqD,KAAK,CAACrD,MAAM,CAAC2D,SAAS,CACvB;;EAGH,OAAON,KAAK;AACd,CAAC;AAtCYzD,OAAA,CAAAwD,uBAAuB,GAAAA,uBAAA"}
1
+ {"version":3,"sources":["../../../lib/components/Alert/useAlertStyles.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:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}\", \".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;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.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,MAAfA;IAkHAC,uBAAuB,MAAvBA;;uBApHsC;AAE5C,MAAMD,kBAAkB;IAC7BE,MAAM;IACNC,MAAM;IACNC,QAAQ;IACRC,QAAQ;AACV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;IAC7BM,MAAMtD,IAAI,CAAC4D,SAAS,GAAGC,IAAAA,mBAAY,EAAC/D,gBAAgBE,IAAI,EAAEwD,OAAOxD,IAAI,EAAEkC,YAAYsB,OAAOtB,QAAQ,EAAEoB,MAAMtD,IAAI,CAAC4D,SAAS;IACxH,IAAIN,MAAMrD,IAAI,EAAE;QACdqD,MAAMrD,IAAI,CAAC2D,SAAS,GAAGC,IAAAA,mBAAY,EAAC/D,gBAAgBG,IAAI,EAAEuD,OAAOvD,IAAI,EAAEqD,MAAMQ,MAAM,IAAK5B,CAAAA,WAAWwB,wBAAwB,CAACJ,MAAMQ,MAAM,CAAC,GAAGL,uBAAuB,CAACH,MAAMQ,MAAM,CAAC,AAAD,GAAIR,MAAMrD,IAAI,CAAC2D,SAAS;IAC1M,CAAC;IACD,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,CAAC;IACD,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,CAAC;IACD,OAAON;AACT,GACA,0CAA0C"}
@@ -1,38 +1,21 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useAlert_unstable = exports.useAlertStyles_unstable = exports.renderAlert_unstable = exports.alertClassNames = exports.Alert = void 0;
7
- var Alert_1 = /*#__PURE__*/require("./Alert");
8
- Object.defineProperty(exports, "Alert", {
9
- enumerable: true,
10
- get: function () {
11
- return Alert_1.Alert;
12
- }
13
- });
14
- Object.defineProperty(exports, "alertClassNames", {
15
- enumerable: true,
16
- get: function () {
17
- return Alert_1.alertClassNames;
18
- }
3
+ value: true
19
4
  });
20
- Object.defineProperty(exports, "renderAlert_unstable", {
21
- enumerable: true,
22
- get: function () {
23
- return Alert_1.renderAlert_unstable;
24
- }
25
- });
26
- Object.defineProperty(exports, "useAlertStyles_unstable", {
27
- enumerable: true,
28
- get: function () {
29
- return Alert_1.useAlertStyles_unstable;
30
- }
31
- });
32
- Object.defineProperty(exports, "useAlert_unstable", {
33
- enumerable: true,
34
- get: function () {
35
- return Alert_1.useAlert_unstable;
36
- }
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ Alert: ()=>_alert.Alert,
13
+ alertClassNames: ()=>_alert.alertClassNames,
14
+ renderAlert_unstable: ()=>_alert.renderAlert_unstable,
15
+ useAlertStyles_unstable: ()=>_alert.useAlertStyles_unstable,
16
+ useAlert_unstable: ()=>_alert.useAlert_unstable
37
17
  });
18
+ const _alert = require("./Alert");
19
+ //# sourceMappingURL=index.js.map
20
+
38
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Alert_1","require","Object","defineProperty","exports","enumerable","get","Alert","alertClassNames","renderAlert_unstable","useAlertStyles_unstable","useAlert_unstable"],"sources":["../src/packages/react-components/react-alert/src/index.ts"],"sourcesContent":["export { Alert, alertClassNames, renderAlert_unstable, useAlertStyles_unstable, useAlert_unstable } from './Alert';\nexport type { AlertProps, AlertSlots, AlertState } from './Alert';\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,gBAAAC,OAAA;AAASC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAO,KAAK;EAAA;AAAA;AAAEL,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAQ,eAAe;EAAA;AAAA;AAAEN,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAS,oBAAoB;EAAA;AAAA;AAAEP,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAU,uBAAuB;EAAA;AAAA;AAAER,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAW,iBAAiB;EAAA;AAAA"}
1
+ {"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { Alert, alertClassNames, renderAlert_unstable, useAlertStyles_unstable, useAlert_unstable } from './Alert';\n//# sourceMappingURL=index.js.map"],"names":["Alert","alertClassNames","renderAlert_unstable","useAlertStyles_unstable","useAlert_unstable"],"mappings":";;;;;;;;;;;IAASA,KAAK,MAALA,YAAK;IAAEC,eAAe,MAAfA,sBAAe;IAAEC,oBAAoB,MAApBA,2BAAoB;IAAEC,uBAAuB,MAAvBA,8BAAuB;IAAEC,iBAAiB,MAAjBA,wBAAiB;;uBAAQ;CACzG,iCAAiC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-alert",
3
- "version": "9.0.0-beta.40",
3
+ "version": "9.0.0-beta.41",
4
4
  "description": "An alert component to display brief messages",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -22,24 +22,24 @@
22
22
  "test": "jest --passWithNoTests",
23
23
  "storybook": "start-storybook",
24
24
  "type-check": "tsc -b tsconfig.json",
25
- "generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
25
+ "generate-api": "just-scripts generate-api"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@fluentui/eslint-plugin": "*",
29
29
  "@fluentui/react-conformance": "*",
30
- "@fluentui/react-conformance-griffel": "9.0.0-beta.19",
30
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.20",
31
31
  "@fluentui/scripts-api-extractor": "*",
32
32
  "@fluentui/scripts-tasks": "*"
33
33
  },
34
34
  "dependencies": {
35
- "@fluentui/react-avatar": "^9.4.4",
36
- "@fluentui/react-button": "^9.3.4",
37
- "@fluentui/react-icons": "^2.0.175",
38
- "@fluentui/react-tabster": "^9.6.0",
39
- "@fluentui/react-theme": "^9.1.6",
40
- "@fluentui/react-utilities": "^9.7.1",
35
+ "@fluentui/react-avatar": "^9.4.5",
36
+ "@fluentui/react-button": "^9.3.5",
37
+ "@fluentui/react-icons": "^2.0.196",
38
+ "@fluentui/react-tabster": "^9.6.1",
39
+ "@fluentui/react-theme": "^9.1.7",
40
+ "@fluentui/react-utilities": "^9.7.2",
41
41
  "@griffel/react": "^1.5.2",
42
- "tslib": "^2.1.0"
42
+ "@swc/helpers": "^0.4.14"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@types/react": ">=16.8.0 <19.0.0",
@@ -57,6 +57,7 @@
57
57
  "exports": {
58
58
  ".": {
59
59
  "types": "./dist/index.d.ts",
60
+ "node": "./lib-commonjs/index.js",
60
61
  "import": "./lib/index.js",
61
62
  "require": "./lib-commonjs/index.js"
62
63
  },