@fluentui/react-alert 9.0.0-beta.40 → 9.0.0-beta.42
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/.swcrc +30 -0
- package/CHANGELOG.json +97 -1
- package/CHANGELOG.md +31 -2
- package/lib/Alert.js.map +1 -1
- package/lib/components/Alert/Alert.js.map +1 -1
- package/lib/components/Alert/Alert.types.js.map +1 -1
- package/lib/components/Alert/index.js.map +1 -1
- package/lib/components/Alert/renderAlert.js +1 -9
- package/lib/components/Alert/renderAlert.js.map +1 -1
- package/lib/components/Alert/useAlert.js.map +1 -1
- package/lib/components/Alert/useAlertStyles.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Alert.js +5 -4
- package/lib-commonjs/Alert.js.map +1 -1
- package/lib-commonjs/components/Alert/Alert.js +16 -16
- package/lib-commonjs/components/Alert/Alert.js.map +1 -1
- package/lib-commonjs/components/Alert/Alert.types.js +3 -2
- package/lib-commonjs/components/Alert/Alert.types.js.map +1 -1
- package/lib-commonjs/components/Alert/index.js +9 -8
- package/lib-commonjs/components/Alert/index.js.map +1 -1
- package/lib-commonjs/components/Alert/renderAlert.js +13 -21
- package/lib-commonjs/components/Alert/renderAlert.js.map +1 -1
- package/lib-commonjs/components/Alert/useAlert.js +65 -76
- package/lib-commonjs/components/Alert/useAlert.js.map +1 -1
- package/lib-commonjs/components/Alert/useAlertStyles.js +265 -131
- package/lib-commonjs/components/Alert/useAlertStyles.js.map +1 -1
- package/lib-commonjs/index.js +16 -33
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +11 -10
|
@@ -1,82 +1,71 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useAlert_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>useAlert_unstable
|
|
5
8
|
});
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
defaultIcon = React.createElement(react_icons_1.CheckmarkCircleFilled, null);
|
|
32
|
-
break;
|
|
33
|
-
case 'error':
|
|
34
|
-
defaultIcon = React.createElement(react_icons_1.DismissCircleFilled, null);
|
|
35
|
-
defaultRole = 'alert';
|
|
36
|
-
break;
|
|
37
|
-
case 'warning':
|
|
38
|
-
defaultIcon = React.createElement(react_icons_1.WarningFilled, null);
|
|
39
|
-
defaultRole = 'alert';
|
|
40
|
-
break;
|
|
41
|
-
case 'info':
|
|
42
|
-
defaultIcon = React.createElement(react_icons_1.InfoFilled, null);
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
const action = react_utilities_1.resolveShorthand(props.action, {
|
|
46
|
-
defaultProps: {
|
|
47
|
-
appearance: 'transparent'
|
|
9
|
+
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
|
10
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
11
|
+
const _reactAvatar = require("@fluentui/react-avatar");
|
|
12
|
+
const _reactButton = require("@fluentui/react-button");
|
|
13
|
+
const _reactIcons = require("@fluentui/react-icons");
|
|
14
|
+
const _reactUtilities = require("@fluentui/react-utilities");
|
|
15
|
+
const useAlert_unstable = (props, ref)=>{
|
|
16
|
+
const { appearance ='primary' , intent } = props;
|
|
17
|
+
/** Determine the role and icon to render based on the intent */ let defaultIcon;
|
|
18
|
+
let defaultRole = 'status';
|
|
19
|
+
switch(intent){
|
|
20
|
+
case 'success':
|
|
21
|
+
defaultIcon = /*#__PURE__*/ _react.createElement(_reactIcons.CheckmarkCircleFilled, null);
|
|
22
|
+
break;
|
|
23
|
+
case 'error':
|
|
24
|
+
defaultIcon = /*#__PURE__*/ _react.createElement(_reactIcons.DismissCircleFilled, null);
|
|
25
|
+
defaultRole = 'alert';
|
|
26
|
+
break;
|
|
27
|
+
case 'warning':
|
|
28
|
+
defaultIcon = /*#__PURE__*/ _react.createElement(_reactIcons.WarningFilled, null);
|
|
29
|
+
defaultRole = 'alert';
|
|
30
|
+
break;
|
|
31
|
+
case 'info':
|
|
32
|
+
defaultIcon = /*#__PURE__*/ _react.createElement(_reactIcons.InfoFilled, null);
|
|
33
|
+
break;
|
|
48
34
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if (!avatar) {
|
|
54
|
-
icon = react_utilities_1.resolveShorthand(props.icon, {
|
|
55
|
-
defaultProps: {
|
|
56
|
-
children: defaultIcon
|
|
57
|
-
},
|
|
58
|
-
required: !!props.intent
|
|
35
|
+
const action = (0, _reactUtilities.resolveShorthand)(props.action, {
|
|
36
|
+
defaultProps: {
|
|
37
|
+
appearance: 'transparent'
|
|
38
|
+
}
|
|
59
39
|
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
40
|
+
const avatar = (0, _reactUtilities.resolveShorthand)(props.avatar);
|
|
41
|
+
let icon;
|
|
42
|
+
/** Avatar prop takes precedence over the icon or intent prop */ if (!avatar) {
|
|
43
|
+
icon = (0, _reactUtilities.resolveShorthand)(props.icon, {
|
|
44
|
+
defaultProps: {
|
|
45
|
+
children: defaultIcon
|
|
46
|
+
},
|
|
47
|
+
required: !!props.intent
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
action,
|
|
52
|
+
appearance,
|
|
53
|
+
avatar,
|
|
54
|
+
components: {
|
|
55
|
+
root: 'div',
|
|
56
|
+
icon: 'span',
|
|
57
|
+
action: _reactButton.Button,
|
|
58
|
+
avatar: _reactAvatar.Avatar
|
|
59
|
+
},
|
|
60
|
+
icon,
|
|
61
|
+
intent,
|
|
62
|
+
root: (0, _reactUtilities.getNativeElementProps)('div', {
|
|
63
|
+
ref,
|
|
64
|
+
role: defaultRole,
|
|
65
|
+
children: props.children,
|
|
66
|
+
...props
|
|
67
|
+
})
|
|
68
|
+
};
|
|
69
|
+
}; //# sourceMappingURL=useAlert.js.map
|
|
70
|
+
|
|
82
71
|
//# sourceMappingURL=useAlert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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
|
-
|
|
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
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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__*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
-
|
|
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__*/
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
|
|
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__*/
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
-
|
|
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__*/
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
-
|
|
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
|
-
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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
|