@notificationapi/react 0.0.30 → 0.0.32

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,256 +1,258 @@
1
- import { jsxs as ae, Fragment as G, jsx as B } from "react/jsx-runtime";
2
- import { NotificationAPIContext as oe } from "../Provider/index.js";
3
- import * as O from "react";
4
- import b, { useContext as ie } from "react";
5
- import { PreferenceInput as L } from "./PreferenceInput.js";
6
- import { R as re } from "../../assets/RightOutlined.js";
7
- import { e as F, c as D, h as k, d as U, a as T, w as le, b as ce } from "../../assets/index3.js";
8
- import { d as se, _ as de, e as J, a as Q, g as ue, m as fe, u as R, r as me, f as pe, c as V } from "../../assets/colors.js";
9
- import { K as W, t as Y, u as ve, e as ge, f as Ce, o as X } from "../../assets/index4.js";
10
- import { p as be } from "../../assets/pickAttrs.js";
11
- const he = (e) => ({
12
- [e.componentCls]: {
13
- // For common/openAnimation
14
- [`${e.antCls}-motion-collapse-legacy`]: {
15
- overflow: "hidden",
16
- "&-active": {
17
- transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
18
- opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
19
- }
20
- },
21
- [`${e.antCls}-motion-collapse`]: {
22
- overflow: "hidden",
23
- transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
24
- opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
25
- }
26
- }
27
- });
28
- var Z = /* @__PURE__ */ b.forwardRef(function(e, n) {
29
- var t = e.prefixCls, o = e.forceRender, i = e.className, c = e.style, f = e.children, r = e.isActive, s = e.role, a = b.useState(r || o), v = F(a, 2), d = v[0], m = v[1];
30
- return b.useEffect(function() {
31
- (o || r) && m(!0);
32
- }, [o, r]), d ? /* @__PURE__ */ b.createElement("div", {
1
+ import { jsxs as re, Fragment as V, jsx as z } from "react/jsx-runtime";
2
+ import { NotificationAPIContext as le } from "../Provider/index.js";
3
+ import * as M from "react";
4
+ import h, { useContext as se } from "react";
5
+ import { PreferenceInput as W } from "./PreferenceInput.js";
6
+ import { R as ce } from "../../assets/RightOutlined.js";
7
+ import { e as J, c as D, f as K, d as Q, a as T, w as de, b as ue } from "../../assets/presets.js";
8
+ import { d as fe, _ as me, e as Y, a as Z, g as ve, m as pe, u as _, r as ge, f as Ce, c as X } from "../../assets/colors.js";
9
+ import { K as q, t as ee, u as be, e as ye, f as he, o as F } from "../../assets/index3.js";
10
+ import { p as xe } from "../../assets/pickAttrs.js";
11
+ var ne = /* @__PURE__ */ h.forwardRef(function(e, n) {
12
+ var a = e.prefixCls, t = e.forceRender, o = e.className, c = e.style, v = e.children, l = e.isActive, u = e.role, i = e.classNames, C = e.styles, f = h.useState(l || t), d = J(f, 2), r = d[0], g = d[1];
13
+ return h.useEffect(function() {
14
+ (t || l) && g(!0);
15
+ }, [t, l]), r ? /* @__PURE__ */ h.createElement("div", {
33
16
  ref: n,
34
- className: D("".concat(t, "-content"), k(k({}, "".concat(t, "-content-active"), r), "".concat(t, "-content-inactive"), !r), i),
17
+ className: D("".concat(a, "-content"), K(K({}, "".concat(a, "-content-active"), l), "".concat(a, "-content-inactive"), !l), o),
35
18
  style: c,
36
- role: s
37
- }, /* @__PURE__ */ b.createElement("div", {
38
- className: "".concat(t, "-content-box")
39
- }, f)) : null;
19
+ role: u
20
+ }, /* @__PURE__ */ h.createElement("div", {
21
+ className: D("".concat(a, "-content-box"), i == null ? void 0 : i.body),
22
+ style: C == null ? void 0 : C.body
23
+ }, v)) : null;
40
24
  });
41
- Z.displayName = "PanelContent";
42
- var ye = ["showArrow", "headerClass", "isActive", "onItemClick", "forceRender", "className", "prefixCls", "collapsible", "accordion", "panelKey", "extra", "header", "expandIcon", "openMotion", "destroyInactivePanel", "children"], ee = /* @__PURE__ */ b.forwardRef(function(e, n) {
43
- var t = e.showArrow, o = t === void 0 ? !0 : t, i = e.headerClass, c = e.isActive, f = e.onItemClick, r = e.forceRender, s = e.className, a = e.prefixCls, v = e.collapsible, d = e.accordion, m = e.panelKey, g = e.extra, S = e.header, h = e.expandIcon, l = e.openMotion, x = e.destroyInactivePanel, I = e.children, $ = U(e, ye), u = v === "disabled", N = v === "header", C = v === "icon", E = g != null && typeof g != "boolean", y = function() {
44
- f == null || f(m);
45
- }, P = function(K) {
46
- (K.key === "Enter" || K.keyCode === W.ENTER || K.which === W.ENTER) && y();
47
- }, A = typeof h == "function" ? h(e) : /* @__PURE__ */ b.createElement("i", {
25
+ ne.displayName = "PanelContent";
26
+ var Ie = ["showArrow", "headerClass", "isActive", "onItemClick", "forceRender", "className", "classNames", "styles", "prefixCls", "collapsible", "accordion", "panelKey", "extra", "header", "expandIcon", "openMotion", "destroyInactivePanel", "children"], ae = /* @__PURE__ */ h.forwardRef(function(e, n) {
27
+ var a = e.showArrow, t = a === void 0 ? !0 : a, o = e.headerClass, c = e.isActive, v = e.onItemClick, l = e.forceRender, u = e.className, i = e.classNames, C = i === void 0 ? {} : i, f = e.styles, d = f === void 0 ? {} : f, r = e.prefixCls, g = e.collapsible, x = e.accordion, s = e.panelKey, b = e.extra, $ = e.header, N = e.expandIcon, p = e.openMotion, S = e.destroyInactivePanel, y = e.children, E = Q(e, Ie), P = g === "disabled", w = g === "header", A = g === "icon", m = b != null && typeof b != "boolean", I = function() {
28
+ v == null || v(s);
29
+ }, O = function(B) {
30
+ (B.key === "Enter" || B.keyCode === q.ENTER || B.which === q.ENTER) && I();
31
+ }, R = typeof N == "function" ? N(e) : /* @__PURE__ */ h.createElement("i", {
48
32
  className: "arrow"
49
33
  });
50
- A && (A = /* @__PURE__ */ b.createElement("div", {
51
- className: "".concat(a, "-expand-icon"),
52
- onClick: ["header", "icon"].includes(v) ? y : void 0
53
- }, A));
54
- var p = D(k(k(k({}, "".concat(a, "-item"), !0), "".concat(a, "-item-active"), c), "".concat(a, "-item-disabled"), u), s), w = D(i, k(k(k({}, "".concat(a, "-header"), !0), "".concat(a, "-header-collapsible-only"), N), "".concat(a, "-icon-collapsible-only"), C)), M = {
55
- className: w,
34
+ R && (R = /* @__PURE__ */ h.createElement("div", {
35
+ className: "".concat(r, "-expand-icon"),
36
+ onClick: ["header", "icon"].includes(g) ? I : void 0
37
+ }, R));
38
+ var H = D(K(K(K({}, "".concat(r, "-item"), !0), "".concat(r, "-item-active"), c), "".concat(r, "-item-disabled"), P), u), G = D(o, K(K(K({}, "".concat(r, "-header"), !0), "".concat(r, "-header-collapsible-only"), w), "".concat(r, "-icon-collapsible-only"), A), C.header), k = {
39
+ className: G,
56
40
  "aria-expanded": c,
57
- "aria-disabled": u,
58
- onKeyDown: P
41
+ "aria-disabled": P,
42
+ onKeyDown: O,
43
+ style: d.header
59
44
  };
60
- return !N && !C && (M.onClick = y, M.role = d ? "tab" : "button", M.tabIndex = u ? -1 : 0), /* @__PURE__ */ b.createElement("div", T({}, $, {
45
+ return !w && !A && (k.onClick = I, k.role = x ? "tab" : "button", k.tabIndex = P ? -1 : 0), /* @__PURE__ */ h.createElement("div", T({}, E, {
61
46
  ref: n,
62
- className: p
63
- }), /* @__PURE__ */ b.createElement("div", M, o && A, /* @__PURE__ */ b.createElement("span", {
64
- className: "".concat(a, "-header-text"),
65
- onClick: v === "header" ? y : void 0
66
- }, S), E && /* @__PURE__ */ b.createElement("div", {
67
- className: "".concat(a, "-extra")
68
- }, g)), /* @__PURE__ */ b.createElement(se, T({
47
+ className: H
48
+ }), /* @__PURE__ */ h.createElement("div", k, t && R, /* @__PURE__ */ h.createElement("span", {
49
+ className: "".concat(r, "-header-text"),
50
+ onClick: g === "header" ? I : void 0
51
+ }, $), m && /* @__PURE__ */ h.createElement("div", {
52
+ className: "".concat(r, "-extra")
53
+ }, b)), /* @__PURE__ */ h.createElement(fe, T({
69
54
  visible: c,
70
- leavedClassName: "".concat(a, "-content-hidden")
71
- }, l, {
72
- forceRender: r,
73
- removeOnLeave: x
74
- }), function(_, K) {
75
- var H = _.className, j = _.style;
76
- return /* @__PURE__ */ b.createElement(Z, {
77
- ref: K,
78
- prefixCls: a,
79
- className: H,
80
- style: j,
55
+ leavedClassName: "".concat(r, "-content-hidden")
56
+ }, p, {
57
+ forceRender: l,
58
+ removeOnLeave: S
59
+ }), function(j, B) {
60
+ var oe = j.className, ie = j.style;
61
+ return /* @__PURE__ */ h.createElement(ne, {
62
+ ref: B,
63
+ prefixCls: r,
64
+ className: oe,
65
+ classNames: C,
66
+ style: ie,
67
+ styles: d,
81
68
  isActive: c,
82
- forceRender: r,
83
- role: d ? "tabpanel" : void 0
84
- }, I);
69
+ forceRender: l,
70
+ role: x ? "tabpanel" : void 0
71
+ }, y);
85
72
  }));
86
- }), Ie = ["children", "label", "key", "collapsible", "onItemClick", "destroyInactivePanel"], xe = function(n, t) {
87
- var o = t.prefixCls, i = t.accordion, c = t.collapsible, f = t.destroyInactivePanel, r = t.onItemClick, s = t.activeKey, a = t.openMotion, v = t.expandIcon;
88
- return n.map(function(d, m) {
89
- var g = d.children, S = d.label, h = d.key, l = d.collapsible, x = d.onItemClick, I = d.destroyInactivePanel, $ = U(d, Ie), u = String(h ?? m), N = l ?? c, C = I ?? f, E = function(A) {
90
- N !== "disabled" && (r(A), x == null || x(A));
91
- }, y = !1;
92
- return i ? y = s[0] === u : y = s.indexOf(u) > -1, /* @__PURE__ */ b.createElement(ee, T({}, $, {
93
- prefixCls: o,
94
- key: u,
95
- panelKey: u,
96
- isActive: y,
97
- accordion: i,
98
- openMotion: a,
99
- expandIcon: v,
100
- header: S,
101
- collapsible: N,
73
+ }), $e = ["children", "label", "key", "collapsible", "onItemClick", "destroyInactivePanel"], Ne = function(n, a) {
74
+ var t = a.prefixCls, o = a.accordion, c = a.collapsible, v = a.destroyInactivePanel, l = a.onItemClick, u = a.activeKey, i = a.openMotion, C = a.expandIcon;
75
+ return n.map(function(f, d) {
76
+ var r = f.children, g = f.label, x = f.key, s = f.collapsible, b = f.onItemClick, $ = f.destroyInactivePanel, N = Q(f, $e), p = String(x ?? d), S = s ?? c, y = $ ?? v, E = function(A) {
77
+ S !== "disabled" && (l(A), b == null || b(A));
78
+ }, P = !1;
79
+ return o ? P = u[0] === p : P = u.indexOf(p) > -1, /* @__PURE__ */ h.createElement(ae, T({}, N, {
80
+ prefixCls: t,
81
+ key: p,
82
+ panelKey: p,
83
+ isActive: P,
84
+ accordion: o,
85
+ openMotion: i,
86
+ expandIcon: C,
87
+ header: g,
88
+ collapsible: S,
102
89
  onItemClick: E,
103
- destroyInactivePanel: C
104
- }), g);
90
+ destroyInactivePanel: y
91
+ }), r);
105
92
  });
106
- }, $e = function(n, t, o) {
107
- if (!n)
108
- return null;
109
- var i = o.prefixCls, c = o.accordion, f = o.collapsible, r = o.destroyInactivePanel, s = o.onItemClick, a = o.activeKey, v = o.openMotion, d = o.expandIcon, m = n.key || String(t), g = n.props, S = g.header, h = g.headerClass, l = g.destroyInactivePanel, x = g.collapsible, I = g.onItemClick, $ = !1;
110
- c ? $ = a[0] === m : $ = a.indexOf(m) > -1;
111
- var u = x ?? f, N = function(y) {
112
- u !== "disabled" && (s(y), I == null || I(y));
113
- }, C = {
114
- key: m,
115
- panelKey: m,
116
- header: S,
117
- headerClass: h,
118
- isActive: $,
119
- prefixCls: i,
120
- destroyInactivePanel: l ?? r,
121
- openMotion: v,
93
+ }, Pe = function(n, a, t) {
94
+ if (!n) return null;
95
+ var o = t.prefixCls, c = t.accordion, v = t.collapsible, l = t.destroyInactivePanel, u = t.onItemClick, i = t.activeKey, C = t.openMotion, f = t.expandIcon, d = n.key || String(a), r = n.props, g = r.header, x = r.headerClass, s = r.destroyInactivePanel, b = r.collapsible, $ = r.onItemClick, N = !1;
96
+ c ? N = i[0] === d : N = i.indexOf(d) > -1;
97
+ var p = b ?? v, S = function(P) {
98
+ p !== "disabled" && (u(P), $ == null || $(P));
99
+ }, y = {
100
+ key: d,
101
+ panelKey: d,
102
+ header: g,
103
+ headerClass: x,
104
+ isActive: N,
105
+ prefixCls: o,
106
+ destroyInactivePanel: s ?? l,
107
+ openMotion: C,
122
108
  accordion: c,
123
109
  children: n.props.children,
124
- onItemClick: N,
125
- expandIcon: d,
126
- collapsible: u
110
+ onItemClick: S,
111
+ expandIcon: f,
112
+ collapsible: p
127
113
  };
128
- return typeof n.type == "string" ? n : (Object.keys(C).forEach(function(E) {
129
- typeof C[E] > "u" && delete C[E];
130
- }), /* @__PURE__ */ b.cloneElement(n, C));
114
+ return typeof n.type == "string" ? n : (Object.keys(y).forEach(function(E) {
115
+ typeof y[E] > "u" && delete y[E];
116
+ }), /* @__PURE__ */ h.cloneElement(n, y));
131
117
  };
132
- function Ne(e, n, t) {
133
- return Array.isArray(e) ? xe(e, t) : Y(n).map(function(o, i) {
134
- return $e(o, i, t);
118
+ function we(e, n, a) {
119
+ return Array.isArray(e) ? Ne(e, a) : ee(n).map(function(t, o) {
120
+ return Pe(t, o, a);
135
121
  });
136
122
  }
137
- function Pe(e) {
123
+ function Se(e) {
138
124
  var n = e;
139
125
  if (!Array.isArray(n)) {
140
- var t = ce(n);
141
- n = t === "number" || t === "string" ? [n] : [];
126
+ var a = ue(n);
127
+ n = a === "number" || a === "string" ? [n] : [];
142
128
  }
143
- return n.map(function(o) {
144
- return String(o);
129
+ return n.map(function(t) {
130
+ return String(t);
145
131
  });
146
132
  }
147
- var we = /* @__PURE__ */ b.forwardRef(function(e, n) {
148
- var t = e.prefixCls, o = t === void 0 ? "rc-collapse" : t, i = e.destroyInactivePanel, c = i === void 0 ? !1 : i, f = e.style, r = e.accordion, s = e.className, a = e.children, v = e.collapsible, d = e.openMotion, m = e.expandIcon, g = e.activeKey, S = e.defaultActiveKey, h = e.onChange, l = e.items, x = D(o, s), I = ve([], {
149
- value: g,
150
- onChange: function(P) {
151
- return h == null ? void 0 : h(P);
133
+ var Ee = /* @__PURE__ */ h.forwardRef(function(e, n) {
134
+ var a = e.prefixCls, t = a === void 0 ? "rc-collapse" : a, o = e.destroyInactivePanel, c = o === void 0 ? !1 : o, v = e.style, l = e.accordion, u = e.className, i = e.children, C = e.collapsible, f = e.openMotion, d = e.expandIcon, r = e.activeKey, g = e.defaultActiveKey, x = e.onChange, s = e.items, b = D(t, u), $ = be([], {
135
+ value: r,
136
+ onChange: function(w) {
137
+ return x == null ? void 0 : x(w);
152
138
  },
153
- defaultValue: S,
154
- postState: Pe
155
- }), $ = F(I, 2), u = $[0], N = $[1], C = function(P) {
156
- return N(function() {
157
- if (r)
158
- return u[0] === P ? [] : [P];
159
- var A = u.indexOf(P), p = A > -1;
160
- return p ? u.filter(function(w) {
161
- return w !== P;
162
- }) : [].concat(de(u), [P]);
139
+ defaultValue: g,
140
+ postState: Se
141
+ }), N = J($, 2), p = N[0], S = N[1], y = function(w) {
142
+ return S(function() {
143
+ if (l)
144
+ return p[0] === w ? [] : [w];
145
+ var A = p.indexOf(w), m = A > -1;
146
+ return m ? p.filter(function(I) {
147
+ return I !== w;
148
+ }) : [].concat(me(p), [w]);
163
149
  });
164
150
  };
165
- le(!a, "[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");
166
- var E = Ne(l, a, {
167
- prefixCls: o,
168
- accordion: r,
169
- openMotion: d,
170
- expandIcon: m,
171
- collapsible: v,
151
+ de(!i, "[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");
152
+ var E = we(s, i, {
153
+ prefixCls: t,
154
+ accordion: l,
155
+ openMotion: f,
156
+ expandIcon: d,
157
+ collapsible: C,
172
158
  destroyInactivePanel: c,
173
- onItemClick: C,
174
- activeKey: u
159
+ onItemClick: y,
160
+ activeKey: p
175
161
  });
176
- return /* @__PURE__ */ b.createElement("div", T({
162
+ return /* @__PURE__ */ h.createElement("div", T({
177
163
  ref: n,
178
- className: x,
179
- style: f,
180
- role: r ? "tablist" : void 0
181
- }, be(e, {
164
+ className: b,
165
+ style: v,
166
+ role: l ? "tablist" : void 0
167
+ }, xe(e, {
182
168
  aria: !0,
183
169
  data: !0
184
170
  })), E);
185
171
  });
186
- const z = Object.assign(we, {
172
+ const L = Object.assign(Ee, {
187
173
  /**
188
174
  * @deprecated use `items` instead, will be removed in `v4.0.0`
189
175
  */
190
- Panel: ee
176
+ Panel: ae
191
177
  });
192
- z.Panel;
193
- const Se = /* @__PURE__ */ O.forwardRef((e, n) => {
194
- process.env.NODE_ENV !== "production" && J("Collapse.Panel").deprecated(!("disabled" in e), "disabled", 'collapsible="disabled"');
178
+ L.Panel;
179
+ const Ae = /* @__PURE__ */ M.forwardRef((e, n) => {
180
+ process.env.NODE_ENV !== "production" && Y("Collapse.Panel").deprecated(!("disabled" in e), "disabled", 'collapsible="disabled"');
195
181
  const {
196
- getPrefixCls: t
197
- } = O.useContext(Q), {
198
- prefixCls: o,
199
- className: i,
182
+ getPrefixCls: a
183
+ } = M.useContext(Z), {
184
+ prefixCls: t,
185
+ className: o,
200
186
  showArrow: c = !0
201
- } = e, f = t("collapse", o), r = D({
202
- [`${f}-no-arrow`]: !c
203
- }, i);
204
- return /* @__PURE__ */ O.createElement(z.Panel, Object.assign({
187
+ } = e, v = a("collapse", t), l = D({
188
+ [`${v}-no-arrow`]: !c
189
+ }, o);
190
+ return /* @__PURE__ */ M.createElement(L.Panel, Object.assign({
205
191
  ref: n
206
192
  }, e, {
207
- prefixCls: f,
208
- className: r
193
+ prefixCls: v,
194
+ className: l
209
195
  }));
210
- }), Ee = (e) => {
196
+ }), Me = (e) => ({
197
+ [e.componentCls]: {
198
+ // For common/openAnimation
199
+ [`${e.antCls}-motion-collapse-legacy`]: {
200
+ overflow: "hidden",
201
+ "&-active": {
202
+ transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
203
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
204
+ }
205
+ },
206
+ [`${e.antCls}-motion-collapse`]: {
207
+ overflow: "hidden",
208
+ transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
209
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
210
+ }
211
+ }
212
+ }), Oe = (e) => {
211
213
  const {
212
214
  componentCls: n,
213
- contentBg: t,
214
- padding: o,
215
- headerBg: i,
215
+ contentBg: a,
216
+ padding: t,
217
+ headerBg: o,
216
218
  headerPadding: c,
217
- collapseHeaderPaddingSM: f,
218
- collapseHeaderPaddingLG: r,
219
- collapsePanelBorderRadius: s,
220
- lineWidth: a,
221
- lineType: v,
222
- colorBorder: d,
223
- colorText: m,
224
- colorTextHeading: g,
225
- colorTextDisabled: S,
226
- fontSizeLG: h,
227
- lineHeight: l,
228
- lineHeightLG: x,
229
- marginSM: I,
230
- paddingSM: $,
231
- paddingLG: u,
232
- paddingXS: N,
233
- motionDurationSlow: C,
219
+ collapseHeaderPaddingSM: v,
220
+ collapseHeaderPaddingLG: l,
221
+ collapsePanelBorderRadius: u,
222
+ lineWidth: i,
223
+ lineType: C,
224
+ colorBorder: f,
225
+ colorText: d,
226
+ colorTextHeading: r,
227
+ colorTextDisabled: g,
228
+ fontSizeLG: x,
229
+ lineHeight: s,
230
+ lineHeightLG: b,
231
+ marginSM: $,
232
+ paddingSM: N,
233
+ paddingLG: p,
234
+ paddingXS: S,
235
+ motionDurationSlow: y,
234
236
  fontSizeIcon: E,
235
- contentPadding: y,
236
- fontHeight: P,
237
+ contentPadding: P,
238
+ fontHeight: w,
237
239
  fontHeightLG: A
238
- } = e, p = `${R(a)} ${v} ${d}`;
240
+ } = e, m = `${_(i)} ${C} ${f}`;
239
241
  return {
240
- [n]: Object.assign(Object.assign({}, me(e)), {
241
- backgroundColor: i,
242
- border: p,
243
- borderRadius: s,
242
+ [n]: Object.assign(Object.assign({}, ge(e)), {
243
+ backgroundColor: o,
244
+ border: m,
245
+ borderRadius: u,
244
246
  "&-rtl": {
245
247
  direction: "rtl"
246
248
  },
247
249
  [`& > ${n}-item`]: {
248
- borderBottom: p,
250
+ borderBottom: m,
249
251
  "&:last-child": {
250
252
  [`
251
253
  &,
252
254
  & > ${n}-header`]: {
253
- borderRadius: `0 0 ${R(s)} ${R(s)}`
255
+ borderRadius: `0 0 ${_(u)} ${_(u)}`
254
256
  }
255
257
  },
256
258
  [`> ${n}-header`]: {
@@ -260,10 +262,10 @@ const Se = /* @__PURE__ */ O.forwardRef((e, n) => {
260
262
  flexWrap: "nowrap",
261
263
  alignItems: "flex-start",
262
264
  padding: c,
263
- color: g,
264
- lineHeight: l,
265
+ color: r,
266
+ lineHeight: s,
265
267
  cursor: "pointer",
266
- transition: `all ${C}, visibility 0s`,
268
+ transition: `all ${y}, visibility 0s`,
267
269
  [`> ${n}-header-text`]: {
268
270
  flex: "auto"
269
271
  },
@@ -272,18 +274,18 @@ const Se = /* @__PURE__ */ O.forwardRef((e, n) => {
272
274
  },
273
275
  // >>>>> Arrow
274
276
  [`${n}-expand-icon`]: {
275
- height: P,
277
+ height: w,
276
278
  display: "flex",
277
279
  alignItems: "center",
278
- paddingInlineEnd: I
280
+ paddingInlineEnd: $
279
281
  },
280
- [`${n}-arrow`]: Object.assign(Object.assign({}, pe()), {
282
+ [`${n}-arrow`]: Object.assign(Object.assign({}, Ce()), {
281
283
  fontSize: E,
282
284
  // when `transform: rotate()` is applied to icon's root element
283
- transition: `transform ${C}`,
285
+ transition: `transform ${y}`,
284
286
  // when `transform: rotate()` is applied to icon's child element
285
287
  svg: {
286
- transition: `transform ${C}`
288
+ transition: `transform ${y}`
287
289
  }
288
290
  }),
289
291
  // >>>>> Text
@@ -299,11 +301,11 @@ const Se = /* @__PURE__ */ O.forwardRef((e, n) => {
299
301
  }
300
302
  },
301
303
  [`${n}-content`]: {
302
- color: m,
303
- backgroundColor: t,
304
- borderTop: p,
304
+ color: d,
305
+ backgroundColor: a,
306
+ borderTop: m,
305
307
  [`& > ${n}-content-box`]: {
306
- padding: y
308
+ padding: P
307
309
  },
308
310
  "&-hidden": {
309
311
  display: "none"
@@ -312,45 +314,45 @@ const Se = /* @__PURE__ */ O.forwardRef((e, n) => {
312
314
  "&-small": {
313
315
  [`> ${n}-item`]: {
314
316
  [`> ${n}-header`]: {
315
- padding: f,
316
- paddingInlineStart: N,
317
+ padding: v,
318
+ paddingInlineStart: S,
317
319
  [`> ${n}-expand-icon`]: {
318
320
  // Arrow offset
319
- marginInlineStart: e.calc($).sub(N).equal()
321
+ marginInlineStart: e.calc(N).sub(S).equal()
320
322
  }
321
323
  },
322
324
  [`> ${n}-content > ${n}-content-box`]: {
323
- padding: $
325
+ padding: N
324
326
  }
325
327
  }
326
328
  },
327
329
  "&-large": {
328
330
  [`> ${n}-item`]: {
329
- fontSize: h,
330
- lineHeight: x,
331
+ fontSize: x,
332
+ lineHeight: b,
331
333
  [`> ${n}-header`]: {
332
- padding: r,
333
- paddingInlineStart: o,
334
+ padding: l,
335
+ paddingInlineStart: t,
334
336
  [`> ${n}-expand-icon`]: {
335
337
  height: A,
336
338
  // Arrow offset
337
- marginInlineStart: e.calc(u).sub(o).equal()
339
+ marginInlineStart: e.calc(p).sub(t).equal()
338
340
  }
339
341
  },
340
342
  [`> ${n}-content > ${n}-content-box`]: {
341
- padding: u
343
+ padding: p
342
344
  }
343
345
  }
344
346
  },
345
347
  [`${n}-item:last-child`]: {
346
348
  borderBottom: 0,
347
349
  [`> ${n}-content`]: {
348
- borderRadius: `0 0 ${R(s)} ${R(s)}`
350
+ borderRadius: `0 0 ${_(u)} ${_(u)}`
349
351
  }
350
352
  },
351
353
  [`& ${n}-item-disabled > ${n}-header`]: {
352
354
  "\n &,\n & > .arrow\n ": {
353
- color: S,
355
+ color: g,
354
356
  cursor: "not-allowed"
355
357
  }
356
358
  },
@@ -361,37 +363,37 @@ const Se = /* @__PURE__ */ O.forwardRef((e, n) => {
361
363
  [`${n}-expand-icon`]: {
362
364
  order: 1,
363
365
  paddingInlineEnd: 0,
364
- paddingInlineStart: I
366
+ paddingInlineStart: $
365
367
  }
366
368
  }
367
369
  }
368
370
  }
369
371
  })
370
372
  };
371
- }, Ae = (e) => {
373
+ }, _e = (e) => {
372
374
  const {
373
375
  componentCls: n
374
- } = e, t = `> ${n}-item > ${n}-header ${n}-arrow`;
376
+ } = e, a = `> ${n}-item > ${n}-header ${n}-arrow`;
375
377
  return {
376
378
  [`${n}-rtl`]: {
377
- [t]: {
379
+ [a]: {
378
380
  transform: "rotate(180deg)"
379
381
  }
380
382
  }
381
383
  };
382
- }, Me = (e) => {
384
+ }, Re = (e) => {
383
385
  const {
384
386
  componentCls: n,
385
- headerBg: t,
386
- paddingXXS: o,
387
- colorBorder: i
387
+ headerBg: a,
388
+ paddingXXS: t,
389
+ colorBorder: o
388
390
  } = e;
389
391
  return {
390
392
  [`${n}-borderless`]: {
391
- backgroundColor: t,
393
+ backgroundColor: a,
392
394
  border: 0,
393
395
  [`> ${n}-item`]: {
394
- borderBottom: `1px solid ${i}`
396
+ borderBottom: `1px solid ${o}`
395
397
  },
396
398
  [`
397
399
  > ${n}-item:last-child,
@@ -407,14 +409,14 @@ const Se = /* @__PURE__ */ O.forwardRef((e, n) => {
407
409
  borderTop: 0
408
410
  },
409
411
  [`> ${n}-item > ${n}-content > ${n}-content-box`]: {
410
- paddingTop: o
412
+ paddingTop: t
411
413
  }
412
414
  }
413
415
  };
414
- }, Oe = (e) => {
416
+ }, ke = (e) => {
415
417
  const {
416
418
  componentCls: n,
417
- paddingSM: t
419
+ paddingSM: a
418
420
  } = e;
419
421
  return {
420
422
  [`${n}-ghost`]: {
@@ -426,156 +428,157 @@ const Se = /* @__PURE__ */ O.forwardRef((e, n) => {
426
428
  backgroundColor: "transparent",
427
429
  border: 0,
428
430
  [`> ${n}-content-box`]: {
429
- paddingBlock: t
431
+ paddingBlock: a
430
432
  }
431
433
  }
432
434
  }
433
435
  }
434
436
  };
435
- }, Re = (e) => ({
437
+ }, Ke = (e) => ({
436
438
  headerPadding: `${e.paddingSM}px ${e.padding}px`,
437
439
  headerBg: e.colorFillAlter,
438
440
  contentPadding: `${e.padding}px 16px`,
439
441
  // Fixed Value
440
442
  contentBg: e.colorBgContainer
441
- }), _e = ue("Collapse", (e) => {
442
- const n = fe(e, {
443
- collapseHeaderPaddingSM: `${R(e.paddingXS)} ${R(e.paddingSM)}`,
444
- collapseHeaderPaddingLG: `${R(e.padding)} ${R(e.paddingLG)}`,
443
+ }), De = ve("Collapse", (e) => {
444
+ const n = pe(e, {
445
+ collapseHeaderPaddingSM: `${_(e.paddingXS)} ${_(e.paddingSM)}`,
446
+ collapseHeaderPaddingLG: `${_(e.padding)} ${_(e.paddingLG)}`,
445
447
  collapsePanelBorderRadius: e.borderRadiusLG
446
448
  });
447
- return [Ee(n), Me(n), Oe(n), Ae(n), he(n)];
448
- }, Re), ne = /* @__PURE__ */ O.forwardRef((e, n) => {
449
+ return [Oe(n), Re(n), ke(n), _e(n), Me(n)];
450
+ }, Ke), te = /* @__PURE__ */ M.forwardRef((e, n) => {
449
451
  const {
450
- getPrefixCls: t,
451
- direction: o,
452
- collapse: i
453
- } = O.useContext(Q), {
452
+ getPrefixCls: a,
453
+ direction: t,
454
+ collapse: o
455
+ } = M.useContext(Z), {
454
456
  prefixCls: c,
455
- className: f,
456
- rootClassName: r,
457
- style: s,
458
- bordered: a = !0,
459
- ghost: v,
460
- size: d,
461
- expandIconPosition: m = "start",
462
- children: g,
463
- expandIcon: S
464
- } = e, h = ge((p) => {
465
- var w;
466
- return (w = d ?? p) !== null && w !== void 0 ? w : "middle";
467
- }), l = t("collapse", c), x = t(), [I, $, u] = _e(l);
457
+ className: v,
458
+ rootClassName: l,
459
+ style: u,
460
+ bordered: i = !0,
461
+ ghost: C,
462
+ size: f,
463
+ expandIconPosition: d = "start",
464
+ children: r,
465
+ expandIcon: g
466
+ } = e, x = ye((m) => {
467
+ var I;
468
+ return (I = f ?? m) !== null && I !== void 0 ? I : "middle";
469
+ }), s = a("collapse", c), b = a(), [$, N, p] = De(s);
468
470
  if (process.env.NODE_ENV !== "production") {
469
- const p = J("Collapse");
470
- process.env.NODE_ENV !== "production" && p(m !== "left" && m !== "right", "deprecated", "`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead.");
471
+ const m = Y("Collapse");
472
+ process.env.NODE_ENV !== "production" && m(d !== "left" && d !== "right", "deprecated", "`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead.");
471
473
  }
472
- const N = O.useMemo(() => m === "left" ? "start" : m === "right" ? "end" : m, [m]), C = S ?? (i == null ? void 0 : i.expandIcon), E = O.useCallback(function() {
473
- let p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
474
- const w = typeof C == "function" ? C(p) : /* @__PURE__ */ O.createElement(re, {
475
- rotate: p.isActive ? 90 : void 0
474
+ const S = M.useMemo(() => d === "left" ? "start" : d === "right" ? "end" : d, [d]), y = g ?? (o == null ? void 0 : o.expandIcon), E = M.useCallback(function() {
475
+ let m = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
476
+ const I = typeof y == "function" ? y(m) : /* @__PURE__ */ M.createElement(ce, {
477
+ rotate: m.isActive ? 90 : void 0,
478
+ "aria-label": m.isActive ? "expanded" : "collapsed"
476
479
  });
477
- return V(w, () => {
478
- var M;
480
+ return X(I, () => {
481
+ var O;
479
482
  return {
480
- className: D((M = w == null ? void 0 : w.props) === null || M === void 0 ? void 0 : M.className, `${l}-arrow`)
483
+ className: D((O = I == null ? void 0 : I.props) === null || O === void 0 ? void 0 : O.className, `${s}-arrow`)
481
484
  };
482
485
  });
483
- }, [C, l]), y = D(`${l}-icon-position-${N}`, {
484
- [`${l}-borderless`]: !a,
485
- [`${l}-rtl`]: o === "rtl",
486
- [`${l}-ghost`]: !!v,
487
- [`${l}-${h}`]: h !== "middle"
488
- }, i == null ? void 0 : i.className, f, r, $, u), P = Object.assign(Object.assign({}, Ce(x)), {
486
+ }, [y, s]), P = D(`${s}-icon-position-${S}`, {
487
+ [`${s}-borderless`]: !i,
488
+ [`${s}-rtl`]: t === "rtl",
489
+ [`${s}-ghost`]: !!C,
490
+ [`${s}-${x}`]: x !== "middle"
491
+ }, o == null ? void 0 : o.className, v, l, N, p), w = Object.assign(Object.assign({}, he(b)), {
489
492
  motionAppear: !1,
490
- leavedClassName: `${l}-content-hidden`
491
- }), A = O.useMemo(() => g ? Y(g).map((p, w) => {
492
- var M, _;
493
- if (!((M = p.props) === null || M === void 0) && M.disabled) {
494
- const K = (_ = p.key) !== null && _ !== void 0 ? _ : String(w), {
495
- disabled: H,
496
- collapsible: j
497
- } = p.props, te = Object.assign(Object.assign({}, X(p.props, ["disabled"])), {
498
- key: K,
499
- collapsible: j ?? (H ? "disabled" : void 0)
493
+ leavedClassName: `${s}-content-hidden`
494
+ }), A = M.useMemo(() => r ? ee(r).map((m, I) => {
495
+ var O, R;
496
+ if (!((O = m.props) === null || O === void 0) && O.disabled) {
497
+ const H = (R = m.key) !== null && R !== void 0 ? R : String(I), {
498
+ disabled: G,
499
+ collapsible: k
500
+ } = m.props, j = Object.assign(Object.assign({}, F(m.props, ["disabled"])), {
501
+ key: H,
502
+ collapsible: k ?? (G ? "disabled" : void 0)
500
503
  });
501
- return V(p, te);
504
+ return X(m, j);
502
505
  }
503
- return p;
504
- }) : null, [g]);
505
- return I(
506
+ return m;
507
+ }) : null, [r]);
508
+ return $(
506
509
  // @ts-ignore
507
- /* @__PURE__ */ O.createElement(z, Object.assign({
510
+ /* @__PURE__ */ M.createElement(L, Object.assign({
508
511
  ref: n,
509
- openMotion: P
510
- }, X(e, ["rootClassName"]), {
512
+ openMotion: w
513
+ }, F(e, ["rootClassName"]), {
511
514
  expandIcon: E,
512
- prefixCls: l,
513
- className: y,
514
- style: Object.assign(Object.assign({}, i == null ? void 0 : i.style), s)
515
+ prefixCls: s,
516
+ className: P,
517
+ style: Object.assign(Object.assign({}, o == null ? void 0 : o.style), u)
515
518
  }), A)
516
519
  );
517
520
  });
518
- process.env.NODE_ENV !== "production" && (ne.displayName = "Collapse");
519
- const q = Object.assign(ne, {
520
- Panel: Se
521
+ process.env.NODE_ENV !== "production" && (te.displayName = "Collapse");
522
+ const U = Object.assign(te, {
523
+ Panel: Ae
521
524
  });
522
- function Le() {
523
- const e = ie(oe);
525
+ function Xe() {
526
+ const e = se(le);
524
527
  if (!e || !e.preferences)
525
528
  return null;
526
- const n = e.preferences.notifications.sort((t, o) => t.title.localeCompare(o.title)).map((t) => {
527
- var f, r, s;
528
- const o = (f = e.preferences) == null ? void 0 : f.preferences.filter(
529
- (a) => a.notificationId === t.notificationId && !a.subNotificationId
530
- ), i = (r = e.preferences) == null ? void 0 : r.preferences.filter(
531
- (a) => a.notificationId === t.notificationId && a.subNotificationId
532
- ), c = (s = e.preferences) == null ? void 0 : s.subNotifications.filter(
533
- (a) => i == null ? void 0 : i.find(
534
- (v) => v.subNotificationId === a.subNotificationId
529
+ const n = e.preferences.notifications.sort((a, t) => a.title.localeCompare(t.title)).map((a) => {
530
+ var v, l, u;
531
+ const t = (v = e.preferences) == null ? void 0 : v.preferences.filter(
532
+ (i) => i.notificationId === a.notificationId && !i.subNotificationId
533
+ ), o = (l = e.preferences) == null ? void 0 : l.preferences.filter(
534
+ (i) => i.notificationId === a.notificationId && i.subNotificationId
535
+ ), c = (u = e.preferences) == null ? void 0 : u.subNotifications.filter(
536
+ (i) => o == null ? void 0 : o.find(
537
+ (C) => C.subNotificationId === i.subNotificationId
535
538
  )
536
539
  );
537
540
  return {
538
- label: t.title,
539
- key: t.notificationId,
540
- children: /* @__PURE__ */ ae(G, { children: [
541
- /* @__PURE__ */ B(
542
- L,
541
+ label: a.title,
542
+ key: a.notificationId,
543
+ children: /* @__PURE__ */ re(V, { children: [
544
+ /* @__PURE__ */ z(
545
+ W,
543
546
  {
544
- notification: t,
545
- preferences: o || [],
547
+ notification: a,
548
+ preferences: t || [],
546
549
  updateDelivery: e.updateDelivery
547
550
  },
548
- t.notificationId
551
+ a.notificationId
549
552
  ),
550
- c == null ? void 0 : c.map((a) => /* @__PURE__ */ B(
551
- q,
553
+ c == null ? void 0 : c.map((i) => /* @__PURE__ */ z(
554
+ U,
552
555
  {
553
556
  bordered: !1,
554
557
  items: [
555
558
  {
556
- label: a.title,
557
- key: a.subNotificationId,
558
- children: /* @__PURE__ */ B(
559
- L,
559
+ label: i.title,
560
+ key: i.subNotificationId,
561
+ children: /* @__PURE__ */ z(
562
+ W,
560
563
  {
561
- notification: t,
562
- preferences: i || [],
564
+ notification: a,
565
+ preferences: o || [],
563
566
  updateDelivery: e.updateDelivery,
564
- subNotificationId: a.subNotificationId
567
+ subNotificationId: i.subNotificationId
565
568
  },
566
- a.subNotificationId
569
+ i.subNotificationId
567
570
  )
568
571
  }
569
572
  ],
570
573
  defaultActiveKey: []
571
574
  },
572
- a.subNotificationId
575
+ i.subNotificationId
573
576
  ))
574
577
  ] })
575
578
  };
576
579
  });
577
- return /* @__PURE__ */ B(G, { children: /* @__PURE__ */ B(q, { items: n, defaultActiveKey: [] }) });
580
+ return /* @__PURE__ */ z(V, { children: /* @__PURE__ */ z(U, { items: n, defaultActiveKey: [] }) });
578
581
  }
579
582
  export {
580
- Le as Preferences
583
+ Xe as Preferences
581
584
  };