@fluentui/react-alert 9.0.0-beta.4 → 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.
Files changed (37) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +1252 -1
  3. package/CHANGELOG.md +441 -2
  4. package/README.md +1 -1
  5. package/dist/index.d.ts +11 -1
  6. package/lib/Alert.js.map +1 -1
  7. package/lib/components/Alert/Alert.js +0 -1
  8. package/lib/components/Alert/Alert.js.map +1 -1
  9. package/lib/components/Alert/Alert.types.js.map +1 -1
  10. package/lib/components/Alert/index.js.map +1 -1
  11. package/lib/components/Alert/renderAlert.js +1 -4
  12. package/lib/components/Alert/renderAlert.js.map +1 -1
  13. package/lib/components/Alert/useAlert.js +29 -17
  14. package/lib/components/Alert/useAlert.js.map +1 -1
  15. package/lib/components/Alert/useAlertStyles.js +106 -57
  16. package/lib/components/Alert/useAlertStyles.js.map +1 -1
  17. package/lib/index.js.map +1 -1
  18. package/lib-commonjs/Alert.js +4 -5
  19. package/lib-commonjs/Alert.js.map +1 -1
  20. package/lib-commonjs/components/Alert/Alert.js +16 -22
  21. package/lib-commonjs/components/Alert/Alert.js.map +1 -1
  22. package/lib-commonjs/components/Alert/Alert.types.js +3 -2
  23. package/lib-commonjs/components/Alert/Alert.types.js.map +1 -1
  24. package/lib-commonjs/components/Alert/index.js +8 -13
  25. package/lib-commonjs/components/Alert/index.js.map +1 -1
  26. package/lib-commonjs/components/Alert/renderAlert.js +12 -19
  27. package/lib-commonjs/components/Alert/renderAlert.js.map +1 -1
  28. package/lib-commonjs/components/Alert/useAlert.js +66 -71
  29. package/lib-commonjs/components/Alert/useAlert.js.map +1 -1
  30. package/lib-commonjs/components/Alert/useAlertStyles.js +268 -89
  31. package/lib-commonjs/components/Alert/useAlertStyles.js.map +1 -1
  32. package/lib-commonjs/index.js +16 -35
  33. package/lib-commonjs/index.js.map +1 -1
  34. package/package.json +30 -18
  35. package/Migration.md +0 -0
  36. package/Spec.md +0 -95
  37. package/dist/tsdoc-metadata.json +0 -11
@@ -1,76 +1,71 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- exports.useAlert_unstable = void 0;
7
-
8
- const React = /*#__PURE__*/require("react");
9
-
10
- const react_button_1 = /*#__PURE__*/require("@fluentui/react-button");
11
-
12
- const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
13
-
14
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
15
- /**
16
- * Create the state required to render Alert.
17
- *
18
- * The returned state can be modified with hooks such as useAlertStyles_unstable,
19
- * before being passed to renderAlert_unstable.
20
- *
21
- * @param props - props from this instance of Alert
22
- * @param ref - reference to root HTMLElement of Alert
23
- */
24
-
25
-
26
- const useAlert_unstable = (props, ref) => {
27
- const {
28
- intent
29
- } = props;
30
- /** Determine the icon to render based on the intent */
31
-
32
- let defaultIcon;
33
-
34
- switch (intent) {
35
- case 'success':
36
- defaultIcon = React.createElement(react_icons_1.CheckmarkCircleFilled, null);
37
- break;
38
-
39
- case 'error':
40
- defaultIcon = React.createElement(react_icons_1.DismissCircleFilled, null);
41
- break;
42
-
43
- case 'warning':
44
- defaultIcon = React.createElement(react_icons_1.WarningFilled, null);
45
- break;
46
-
47
- case 'info':
48
- defaultIcon = React.createElement(react_icons_1.InfoFilled, null);
49
- break;
50
- }
51
-
52
- const icon = react_utilities_1.resolveShorthand(props.icon, {
53
- defaultProps: {
54
- children: defaultIcon
55
- },
56
- required: !!props.intent
57
- });
58
- return {
59
- components: {
60
- root: 'div',
61
- icon: 'span',
62
- action: react_button_1.Button
63
- },
64
- root: react_utilities_1.getNativeElementProps('div', {
65
- ref,
66
- children: props.children,
67
- ...props
68
- }),
69
- icon,
70
- action: react_utilities_1.resolveShorthand(props.action),
71
- intent
72
- };
73
- };
5
+ Object.defineProperty(exports, "useAlert_unstable", {
6
+ enumerable: true,
7
+ get: ()=>useAlert_unstable
8
+ });
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;
34
+ }
35
+ const action = (0, _reactUtilities.resolveShorthand)(props.action, {
36
+ defaultProps: {
37
+ appearance: 'transparent'
38
+ }
39
+ });
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
74
70
 
75
- exports.useAlert_unstable = useAlert_unstable;
76
71
  //# sourceMappingURL=useAlert.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Alert/useAlert.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAEA,MAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAIA;;;;;;;;AAQG;;;AACI,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAAoB,GAApB,KAA+D;EAC9F,MAAM;IAAE;EAAF,IAAa,KAAnB;EAEA;;EACA,IAAI,WAAJ;;EACA,QAAQ,MAAR;IACE,KAAK,SAAL;MACE,WAAW,GAAG,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,qBAAD,EAAsB,IAAtB,CAAd;MACA;;IACF,KAAK,OAAL;MACE,WAAW,GAAG,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,mBAAD,EAAoB,IAApB,CAAd;MACA;;IACF,KAAK,SAAL;MACE,WAAW,GAAG,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,aAAD,EAAc,IAAd,CAAd;MACA;;IACF,KAAK,MAAL;MACE,WAAW,GAAG,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,UAAD,EAAW,IAAX,CAAd;MACA;EAZJ;;EAeA,MAAM,IAAI,GAAG,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,IAAvB,EAA6B;IACxC,YAAY,EAAE;MACZ,QAAQ,EAAE;IADE,CAD0B;IAIxC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC;EAJsB,CAA7B,CAAb;EAOA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE,KADI;MAEV,IAAI,EAAE,MAFI;MAGV,MAAM,EAAE,cAAA,CAAA;IAHE,CADP;IAML,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;MACjC,GADiC;MAEjC,QAAQ,EAAE,KAAK,CAAC,QAFiB;MAGjC,GAAG;IAH8B,CAA7B,CAND;IAWL,IAXK;IAYL,MAAM,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,MAAvB,CAZH;IAaL;EAbK,CAAP;AAeD,CA1CM;;AAAM,OAAA,CAAA,iBAAA,GAAiB,iBAAjB","sourcesContent":["import * as React from 'react';\n\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 { intent } = props;\n\n /** Determine the icon to render based on the intent */\n let defaultIcon;\n switch (intent) {\n case 'success':\n defaultIcon = <CheckmarkCircleFilled />;\n break;\n case 'error':\n defaultIcon = <DismissCircleFilled />;\n break;\n case 'warning':\n defaultIcon = <WarningFilled />;\n break;\n case 'info':\n defaultIcon = <InfoFilled />;\n break;\n }\n\n const icon = resolveShorthand(props.icon, {\n defaultProps: {\n children: defaultIcon,\n },\n required: !!props.intent,\n });\n\n return {\n components: {\n root: 'div',\n icon: 'span',\n action: Button,\n },\n root: getNativeElementProps('div', {\n ref,\n children: props.children,\n ...props,\n }),\n icon,\n action: resolveShorthand(props.action),\n intent,\n };\n};\n"],"sourceRoot":"../src/"}
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","getNativeElementPro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oC"}
@@ -1,99 +1,278 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- exports.useAlertStyles_unstable = exports.alertClassNames = void 0;
7
-
8
- const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
9
-
10
- const react_1 = /*#__PURE__*/require("@griffel/react");
11
-
12
- exports.alertClassNames = {
13
- root: 'fui-Alert',
14
- icon: 'fui-Alert__icon',
15
- action: 'fui-Alert__action'
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
14
+ });
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'
16
21
  };
17
-
18
- const useStyles = /*#__PURE__*/react_1.__styles({
19
- "root": {
20
- "mc9l5x": "f22iagw",
21
- "Bt984gj": "f122n59",
22
- "sshi5w": "f5pgtk9",
23
- "z8tnut": "f1g0x7ka",
24
- "z189sj": ["f11qrl6u", "fjlbh76"],
25
- "Byoj8tv": "f1qch9an",
26
- "uwmqm3": ["fjlbh76", "f11qrl6u"],
27
- "De3pzq": "fxugw4r",
28
- "g2u3we": "f1p3nwhy",
29
- "h3c5rm": ["f11589ue", "f1pdflbu"],
30
- "B9xav0g": "f1q5o8ev",
31
- "zhjwy3": ["f1pdflbu", "f11589ue"],
32
- "Bbmb7ep": ["fff7au0", "f1bjk9e1"],
33
- "Beyfa6y": ["f1bjk9e1", "fff7au0"],
34
- "B7oj6ja": ["fwsfkhu", "f8wkphi"],
35
- "Btl43ni": ["f8wkphi", "fwsfkhu"],
36
- "E5pizo": "fz58gqq",
37
- "Be2twd7": "fkhj508",
38
- "Bhrd7zp": "fl43uef"
39
- },
40
- "icon": {
41
- "Bqenvij": "fd461yt",
42
- "Be2twd7": "f4ybsrx",
43
- "z8tnut": "f1g0x7ka",
44
- "z189sj": ["f19lj068", "f177v4lu"],
45
- "Byoj8tv": "f1qch9an",
46
- "uwmqm3": ["f1cnd47f", "fhxju0i"]
47
- },
48
- "action": {
49
- "z8tnut": "f1g0x7ka",
50
- "z189sj": ["fhxju0i", "f1cnd47f"],
51
- "Byoj8tv": "f1qch9an",
52
- "uwmqm3": ["f1cnd47f", "fhxju0i"],
53
- "Bf4jedk": "fy77jfu",
54
- "Frg6f3": ["fcgxt0o", "f1ujusj6"],
55
- "sj55zd": "faj9fo0"
56
- }
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
+ }
57
137
  }, {
58
- "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;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f1p3nwhy{border-top-color:transparent;}", ".f11589ue{border-right-color:transparent;}", ".f1pdflbu{border-left-color:transparent;}", ".f1q5o8ev{border-bottom-color:transparent;}", ".fff7au0{border-bottom-right-radius:4px;}", ".f1bjk9e1{border-bottom-left-radius:4px;}", ".fwsfkhu{border-top-right-radius:4px;}", ".f8wkphi{border-top-left-radius:4px;}", ".fz58gqq{box-shadow:var(--shadow8);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fd461yt{height:16px;}", ".f4ybsrx{font-size:16px;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f1cnd47f{padding-left:0;}", ".fhxju0i{padding-right:0;}", ".fy77jfu{min-width:0;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}", ".faj9fo0{color:var(--colorBrandForeground2);}"]
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
+ ]
59
190
  });
60
-
61
- const useIntentIconStyles = /*#__PURE__*/react_1.__styles({
62
- "success": {
63
- "sj55zd": "ffb3rxr"
64
- },
65
- "error": {
66
- "sj55zd": "fvi85wt"
67
- },
68
- "warning": {
69
- "sj55zd": "fpti2h4"
70
- },
71
- "info": {
72
- "sj55zd": "fkfq4zb"
73
- }
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
+ }
74
204
  }, {
75
- "d": [".ffb3rxr{color:var(--colorPaletteGreenBackground3);}", ".fvi85wt{color:var(--colorPaletteRedBackground3);}", ".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
+ ]
76
211
  });
77
- /**
78
- * Apply styling to the Alert slots based on the state
79
- */
80
-
81
-
82
- const useAlertStyles_unstable = state => {
83
- const styles = useStyles();
84
- const intentIconStyles = useIntentIconStyles();
85
- state.root.className = react_1.mergeClasses(exports.alertClassNames.root, styles.root, state.root.className);
86
-
87
- if (state.icon) {
88
- state.icon.className = react_1.mergeClasses(exports.alertClassNames.icon, styles.icon, state.intent && intentIconStyles[state.intent], state.icon.className);
89
- }
90
-
91
- if (state.action) {
92
- state.action.className = react_1.mergeClasses(exports.alertClassNames.action, styles.action, state.action.className);
93
- }
94
-
95
- return state;
96
- };
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
+ }
225
+ }, {
226
+ d: [
227
+ ".f1pvjcpr{color:var(--colorPaletteGreenForegroundInverted);}",
228
+ ".fcrp5ll{color:var(--colorPaletteRedForegroundInverted);}",
229
+ ".f1r8f1cl{color:var(--colorPaletteYellowForegroundInverted);}",
230
+ ".f1w7i9ko{color:var(--colorNeutralForegroundInverted2);}"
231
+ ]
232
+ });
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
+ }
248
+ }, {
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
+ ]
257
+ });
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
97
277
 
98
- exports.useAlertStyles_unstable = useAlertStyles_unstable;
99
278
  //# sourceMappingURL=useAlertStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Alert/useAlertStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAKa,OAAA,CAAA,eAAA,GAA8C;EACzD,IAAI,EAAE,WADmD;EAEzD,IAAI,EAAE,iBAFmD;EAGzD,MAAM,EAAE;AAHiD,CAA9C;;AAMb,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;;AA0BA,MAAM,mBAAmB,gBAAG,OAAA,SAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA5B;AAeA;;AAEG;;;AACI,MAAM,uBAAuB,GAAI,KAAD,IAAkC;EACvE,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,MAAM,gBAAgB,GAAG,mBAAmB,EAA5C;EAEA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,eAAA,CAAgB,IAA7B,EAAmC,MAAM,CAAC,IAA1C,EAAgD,KAAK,CAAC,IAAN,CAAW,SAA3D,CAAvB;;EAEA,IAAI,KAAK,CAAC,IAAV,EAAgB;IACd,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,eAAA,CAAgB,IADK,EAErB,MAAM,CAAC,IAFc,EAGrB,KAAK,CAAC,MAAN,IAAgB,gBAAgB,CAAC,KAAK,CAAC,MAAP,CAHX,EAIrB,KAAK,CAAC,IAAN,CAAW,SAJU,CAAvB;EAMD;;EAED,IAAI,KAAK,CAAC,MAAV,EAAkB;IAChB,KAAK,CAAC,MAAN,CAAa,SAAb,GAAyB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,eAAA,CAAgB,MAA7B,EAAqC,MAAM,CAAC,MAA5C,EAAoD,KAAK,CAAC,MAAN,CAAa,SAAjE,CAAzB;EACD;;EAED,OAAO,KAAP;AACD,CApBM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\n\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};\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n minHeight: '44px',\n ...shorthands.padding('0', '12px'),\n backgroundColor: tokens.colorNeutralBackground1, // todo - there is no bg10, used bg1\n ...shorthands.borderColor('transparent'),\n ...shorthands.borderRadius('4px'),\n boxShadow: tokens.shadow8,\n fontSize: tokens.fontSizeBase300, // todo - lineheight in tokens\n fontWeight: tokens.fontWeightSemibold,\n },\n icon: {\n height: '16px',\n fontSize: '16px',\n ...shorthands.padding('0', '8px', '0', '0'),\n },\n action: {\n ...shorthands.padding('0'),\n minWidth: 0,\n marginLeft: 'auto',\n color: tokens.colorBrandForeground2, // todo - foreground3 doesn't exist\n },\n});\n\nconst useIntentIconStyles = makeStyles({\n success: {\n color: tokens.colorPaletteGreenBackground3,\n },\n error: {\n color: tokens.colorPaletteRedBackground3,\n },\n warning: {\n color: tokens.colorPaletteYellowForeground2,\n },\n info: {\n color: tokens.colorNeutralForeground2,\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 styles = useStyles();\n const intentIconStyles = useIntentIconStyles();\n\n state.root.className = mergeClasses(alertClassNames.root, styles.root, state.root.className);\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n alertClassNames.icon,\n styles.icon,\n state.intent && intentIconStyles[state.intent],\n state.icon.className,\n );\n }\n\n if (state.action) {\n state.action.className = mergeClasses(alertClassNames.action, styles.action, state.action.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
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;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,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;IACV;IACAhC,MAAM;QACJkC,SAAS;QACTL,SAAS;QACTrB,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAW;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAU;IACjC;IACAT,QAAQ;QACNiC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAW;IAClC;IACArC,QAAQ;QACNO,QAAQ;QACRC,QAAQ;YAAC;YAAW;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Module", {
4
- value: true
5
- });
6
- exports.useAlert_unstable = exports.useAlertStyles_unstable = exports.renderAlert_unstable = exports.alertClassNames = exports.Alert = void 0;
7
-
8
- var Alert_1 = /*#__PURE__*/require("./Alert");
9
-
10
- Object.defineProperty(exports, "Alert", {
11
- enumerable: true,
12
- get: function () {
13
- return Alert_1.Alert;
14
- }
3
+ value: true
15
4
  });
16
- Object.defineProperty(exports, "alertClassNames", {
17
- enumerable: true,
18
- get: function () {
19
- return Alert_1.alertClassNames;
20
- }
21
- });
22
- Object.defineProperty(exports, "renderAlert_unstable", {
23
- enumerable: true,
24
- get: function () {
25
- return Alert_1.renderAlert_unstable;
26
- }
27
- });
28
- Object.defineProperty(exports, "useAlertStyles_unstable", {
29
- enumerable: true,
30
- get: function () {
31
- return Alert_1.useAlertStyles_unstable;
32
- }
33
- });
34
- Object.defineProperty(exports, "useAlert_unstable", {
35
- enumerable: true,
36
- get: function () {
37
- return Alert_1.useAlert_unstable;
38
- }
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
39
17
  });
18
+ const _alert = require("./Alert");
19
+ //# sourceMappingURL=index.js.map
20
+
40
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,OAAA,gBAAA,OAAA,CAAA,SAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,OAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,KAAA;EAAK;AAAL,CAAA;AAAO,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,iBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,eAAA;EAAe;AAAf,CAAA;AAAiB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,sBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,oBAAA;EAAoB;AAApB,CAAA;AAAsB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,yBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,uBAAA;EAAuB;AAAvB,CAAA;AAAyB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,mBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,iBAAA;EAAiB;AAAjB,CAAA","sourcesContent":["export { Alert, alertClassNames, renderAlert_unstable, useAlertStyles_unstable, useAlert_unstable } from './Alert';\nexport type { AlertProps, AlertSlots, AlertState } from './Alert';\n"],"sourceRoot":"../src/"}
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"}