@ichaingo/iconfont 1.3.4 → 1.3.5

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/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as b from "react";
2
- import { createContext as $e, useContext as je, useEffect as ne, version as Le, useState as Fe, createElement as ke } from "react";
3
- var re = /* @__PURE__ */ $e({});
2
+ import { createContext as Le, useContext as Fe, useEffect as te, version as ke, useState as De, createElement as Be } from "react";
3
+ var oe = /* @__PURE__ */ Le({});
4
4
  function x() {
5
5
  return x = Object.assign ? Object.assign.bind() : function(e) {
6
6
  for (var n = 1; n < arguments.length; n++) {
@@ -18,7 +18,7 @@ function R(e) {
18
18
  return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
19
19
  }, R(e);
20
20
  }
21
- function De(e, n) {
21
+ function Ye(e, n) {
22
22
  if (R(e) != "object" || !e) return e;
23
23
  var r = e[Symbol.toPrimitive];
24
24
  if (r !== void 0) {
@@ -28,19 +28,19 @@ function De(e, n) {
28
28
  }
29
29
  return (n === "string" ? String : Number)(e);
30
30
  }
31
- function Ye(e) {
32
- var n = De(e, "string");
31
+ function ze(e) {
32
+ var n = Ye(e, "string");
33
33
  return R(n) == "symbol" ? n : n + "";
34
34
  }
35
- function L(e, n, r) {
36
- return (n = Ye(n)) in e ? Object.defineProperty(e, n, {
35
+ function F(e, n, r) {
36
+ return (n = ze(n)) in e ? Object.defineProperty(e, n, {
37
37
  value: r,
38
38
  enumerable: !0,
39
39
  configurable: !0,
40
40
  writable: !0
41
41
  }) : e[n] = r, e;
42
42
  }
43
- function Be(e, n) {
43
+ function Ue(e, n) {
44
44
  if (e == null) return {};
45
45
  var r = {};
46
46
  for (var t in e) if ({}.hasOwnProperty.call(e, t)) {
@@ -49,33 +49,33 @@ function Be(e, n) {
49
49
  }
50
50
  return r;
51
51
  }
52
- function te(e, n) {
52
+ function ie(e, n) {
53
53
  if (e == null) return {};
54
- var r, t, c = Be(e, n);
54
+ var r, t, a = Ue(e, n);
55
55
  if (Object.getOwnPropertySymbols) {
56
56
  var o = Object.getOwnPropertySymbols(e);
57
- for (t = 0; t < o.length; t++) r = o[t], n.indexOf(r) === -1 && {}.propertyIsEnumerable.call(e, r) && (c[r] = e[r]);
57
+ for (t = 0; t < o.length; t++) r = o[t], n.indexOf(r) === -1 && {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
58
58
  }
59
- return c;
59
+ return a;
60
60
  }
61
61
  function Ve(e) {
62
62
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
63
63
  }
64
- var j = { exports: {} };
64
+ var L = { exports: {} };
65
65
  /*!
66
66
  Copyright (c) 2018 Jed Watson.
67
67
  Licensed under the MIT License (MIT), see
68
68
  http://jedwatson.github.io/classnames
69
69
  */
70
- var H;
70
+ var K;
71
71
  function qe() {
72
- return H || (H = 1, (function(e) {
72
+ return K || (K = 1, (function(e) {
73
73
  (function() {
74
74
  var n = {}.hasOwnProperty;
75
75
  function r() {
76
- for (var o = "", a = 0; a < arguments.length; a++) {
77
- var l = arguments[a];
78
- l && (o = c(o, t(l)));
76
+ for (var o = "", i = 0; i < arguments.length; i++) {
77
+ var f = arguments[i];
78
+ f && (o = a(o, t(f)));
79
79
  }
80
80
  return o;
81
81
  }
@@ -88,45 +88,45 @@ function qe() {
88
88
  return r.apply(null, o);
89
89
  if (o.toString !== Object.prototype.toString && !o.toString.toString().includes("[native code]"))
90
90
  return o.toString();
91
- var a = "";
92
- for (var l in o)
93
- n.call(o, l) && o[l] && (a = c(a, l));
94
- return a;
91
+ var i = "";
92
+ for (var f in o)
93
+ n.call(o, f) && o[f] && (i = a(i, f));
94
+ return i;
95
95
  }
96
- function c(o, a) {
97
- return a ? o ? o + " " + a : o + a : o;
96
+ function a(o, i) {
97
+ return i ? o ? o + " " + i : o + i : o;
98
98
  }
99
99
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
100
100
  })();
101
- })(j)), j.exports;
101
+ })(L)), L.exports;
102
102
  }
103
- var ze = qe();
104
- const U = /* @__PURE__ */ Ve(ze);
105
- function K(e, n) {
103
+ var We = qe();
104
+ const Q = /* @__PURE__ */ Ve(We);
105
+ function X(e, n) {
106
106
  var r = Object.keys(e);
107
107
  if (Object.getOwnPropertySymbols) {
108
108
  var t = Object.getOwnPropertySymbols(e);
109
- n && (t = t.filter(function(c) {
110
- return Object.getOwnPropertyDescriptor(e, c).enumerable;
109
+ n && (t = t.filter(function(a) {
110
+ return Object.getOwnPropertyDescriptor(e, a).enumerable;
111
111
  })), r.push.apply(r, t);
112
112
  }
113
113
  return r;
114
114
  }
115
- function A(e) {
115
+ function I(e) {
116
116
  for (var n = 1; n < arguments.length; n++) {
117
117
  var r = arguments[n] != null ? arguments[n] : {};
118
- n % 2 ? K(Object(r), !0).forEach(function(t) {
119
- L(e, t, r[t]);
120
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : K(Object(r)).forEach(function(t) {
118
+ n % 2 ? X(Object(r), !0).forEach(function(t) {
119
+ F(e, t, r[t]);
120
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : X(Object(r)).forEach(function(t) {
121
121
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
122
122
  });
123
123
  }
124
124
  return e;
125
125
  }
126
- function We() {
126
+ function He() {
127
127
  return !!(typeof window < "u" && window.document && window.document.createElement);
128
128
  }
129
- function He(e, n) {
129
+ function Ke(e, n) {
130
130
  if (!e)
131
131
  return !1;
132
132
  if (e.contains)
@@ -138,132 +138,132 @@ function He(e, n) {
138
138
  }
139
139
  return !1;
140
140
  }
141
- var Q = "data-rc-order", X = "data-rc-priority", Ue = "rc-util-key", F = /* @__PURE__ */ new Map();
142
- function oe() {
141
+ var Z = "data-rc-order", G = "data-rc-priority", Qe = "rc-util-key", k = /* @__PURE__ */ new Map();
142
+ function ae() {
143
143
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = e.mark;
144
- return n ? n.startsWith("data-") ? n : "data-".concat(n) : Ue;
144
+ return n ? n.startsWith("data-") ? n : "data-".concat(n) : Qe;
145
145
  }
146
- function D(e) {
146
+ function Y(e) {
147
147
  if (e.attachTo)
148
148
  return e.attachTo;
149
149
  var n = document.querySelector("head");
150
150
  return n || document.body;
151
151
  }
152
- function Ke(e) {
152
+ function Xe(e) {
153
153
  return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
154
154
  }
155
- function Y(e) {
156
- return Array.from((F.get(e) || e).children).filter(function(n) {
155
+ function z(e) {
156
+ return Array.from((k.get(e) || e).children).filter(function(n) {
157
157
  return n.tagName === "STYLE";
158
158
  });
159
159
  }
160
- function ie(e) {
160
+ function ce(e) {
161
161
  var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
162
- if (!We())
162
+ if (!He())
163
163
  return null;
164
- var r = n.csp, t = n.prepend, c = n.priority, o = c === void 0 ? 0 : c, a = Ke(t), l = a === "prependQueue", u = document.createElement("style");
165
- u.setAttribute(Q, a), l && o && u.setAttribute(X, "".concat(o)), r != null && r.nonce && (u.nonce = r == null ? void 0 : r.nonce), u.innerHTML = e;
166
- var f = D(n), v = f.firstChild;
164
+ var r = n.csp, t = n.prepend, a = n.priority, o = a === void 0 ? 0 : a, i = Xe(t), f = i === "prependQueue", s = document.createElement("style");
165
+ s.setAttribute(Z, i), f && o && s.setAttribute(G, "".concat(o)), r != null && r.nonce && (s.nonce = r == null ? void 0 : r.nonce), s.innerHTML = e;
166
+ var l = Y(n), p = l.firstChild;
167
167
  if (t) {
168
- if (l) {
169
- var g = (n.styles || Y(f)).filter(function(h) {
170
- if (!["prepend", "prependQueue"].includes(h.getAttribute(Q)))
168
+ if (f) {
169
+ var g = (n.styles || z(l)).filter(function(h) {
170
+ if (!["prepend", "prependQueue"].includes(h.getAttribute(Z)))
171
171
  return !1;
172
- var p = Number(h.getAttribute(X) || 0);
173
- return o >= p;
172
+ var v = Number(h.getAttribute(G) || 0);
173
+ return o >= v;
174
174
  });
175
175
  if (g.length)
176
- return f.insertBefore(u, g[g.length - 1].nextSibling), u;
176
+ return l.insertBefore(s, g[g.length - 1].nextSibling), s;
177
177
  }
178
- f.insertBefore(u, v);
178
+ l.insertBefore(s, p);
179
179
  } else
180
- f.appendChild(u);
181
- return u;
180
+ l.appendChild(s);
181
+ return s;
182
182
  }
183
- function Qe(e) {
184
- var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = D(n);
185
- return (n.styles || Y(r)).find(function(t) {
186
- return t.getAttribute(oe(n)) === e;
183
+ function Ze(e) {
184
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = Y(n);
185
+ return (n.styles || z(r)).find(function(t) {
186
+ return t.getAttribute(ae(n)) === e;
187
187
  });
188
188
  }
189
- function Xe(e, n) {
190
- var r = F.get(e);
191
- if (!r || !He(document, r)) {
192
- var t = ie("", n), c = t.parentNode;
193
- F.set(e, c), e.removeChild(t);
189
+ function Ge(e, n) {
190
+ var r = k.get(e);
191
+ if (!r || !Ke(document, r)) {
192
+ var t = ce("", n), a = t.parentNode;
193
+ k.set(e, a), e.removeChild(t);
194
194
  }
195
195
  }
196
- function Ge(e, n) {
197
- var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, t = D(r), c = Y(t), o = A(A({}, r), {}, {
198
- styles: c
196
+ function Je(e, n) {
197
+ var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, t = Y(r), a = z(t), o = I(I({}, r), {}, {
198
+ styles: a
199
199
  });
200
- Xe(t, o);
201
- var a = Qe(n, o);
202
- if (a) {
203
- var l, u;
204
- if ((l = o.csp) !== null && l !== void 0 && l.nonce && a.nonce !== ((u = o.csp) === null || u === void 0 ? void 0 : u.nonce)) {
205
- var f;
206
- a.nonce = (f = o.csp) === null || f === void 0 ? void 0 : f.nonce;
200
+ Ge(t, o);
201
+ var i = Ze(n, o);
202
+ if (i) {
203
+ var f, s;
204
+ if ((f = o.csp) !== null && f !== void 0 && f.nonce && i.nonce !== ((s = o.csp) === null || s === void 0 ? void 0 : s.nonce)) {
205
+ var l;
206
+ i.nonce = (l = o.csp) === null || l === void 0 ? void 0 : l.nonce;
207
207
  }
208
- return a.innerHTML !== e && (a.innerHTML = e), a;
208
+ return i.innerHTML !== e && (i.innerHTML = e), i;
209
209
  }
210
- var v = ie(e, o);
211
- return v.setAttribute(oe(o), n), v;
210
+ var p = ce(e, o);
211
+ return p.setAttribute(ae(o), n), p;
212
212
  }
213
- function ae(e) {
213
+ function ue(e) {
214
214
  var n;
215
215
  return e == null || (n = e.getRootNode) === null || n === void 0 ? void 0 : n.call(e);
216
216
  }
217
- function Je(e) {
218
- return ae(e) instanceof ShadowRoot;
217
+ function en(e) {
218
+ return ue(e) instanceof ShadowRoot;
219
219
  }
220
- function Ze(e) {
221
- return Je(e) ? ae(e) : null;
220
+ function nn(e) {
221
+ return en(e) ? ue(e) : null;
222
222
  }
223
- var k = {}, B = [], en = function(n) {
224
- B.push(n);
223
+ var D = {}, U = [], rn = function(n) {
224
+ U.push(n);
225
225
  };
226
- function nn(e, n) {
226
+ function tn(e, n) {
227
227
  if (process.env.NODE_ENV !== "production" && !e && console !== void 0) {
228
- var r = B.reduce(function(t, c) {
229
- return c(t ?? "", "warning");
228
+ var r = U.reduce(function(t, a) {
229
+ return a(t ?? "", "warning");
230
230
  }, n);
231
231
  r && console.error("Warning: ".concat(r));
232
232
  }
233
233
  }
234
- function rn(e, n) {
234
+ function on(e, n) {
235
235
  if (process.env.NODE_ENV !== "production" && !e && console !== void 0) {
236
- var r = B.reduce(function(t, c) {
237
- return c(t ?? "", "note");
236
+ var r = U.reduce(function(t, a) {
237
+ return a(t ?? "", "note");
238
238
  }, n);
239
239
  r && console.warn("Note: ".concat(r));
240
240
  }
241
241
  }
242
- function tn() {
243
- k = {};
242
+ function an() {
243
+ D = {};
244
244
  }
245
- function ce(e, n, r) {
246
- !n && !k[r] && (e(!1, r), k[r] = !0);
245
+ function se(e, n, r) {
246
+ !n && !D[r] && (e(!1, r), D[r] = !0);
247
247
  }
248
248
  function M(e, n) {
249
- ce(nn, e, n);
249
+ se(tn, e, n);
250
250
  }
251
- function on(e, n) {
252
- ce(rn, e, n);
251
+ function cn(e, n) {
252
+ se(on, e, n);
253
253
  }
254
- M.preMessage = en;
255
- M.resetWarned = tn;
256
- M.noteOnce = on;
257
- function G(e, n) {
254
+ M.preMessage = rn;
255
+ M.resetWarned = an;
256
+ M.noteOnce = cn;
257
+ function J(e, n) {
258
258
  M(e, "[@ant-design/icons] ".concat(n));
259
259
  }
260
- var an = {
260
+ var un = {
261
261
  width: "1em",
262
262
  height: "1em",
263
263
  fill: "currentColor",
264
264
  "aria-hidden": "true",
265
265
  focusable: "false"
266
- }, cn = `
266
+ }, sn = `
267
267
  .anticon {
268
268
  display: inline-flex;
269
269
  align-items: center;
@@ -318,16 +318,16 @@ var an = {
318
318
  transform: rotate(360deg);
319
319
  }
320
320
  }
321
- `, sn = function(n) {
322
- var r = je(re), t = r.csp, c = r.prefixCls, o = r.layer, a = cn;
323
- c && (a = a.replace(/anticon/g, c)), o && (a = "@layer ".concat(o, ` {
324
- `).concat(a, `
325
- }`)), ne(function() {
326
- var l = n.current, u = Ze(l);
327
- Ge(a, "@ant-design-icons", {
321
+ `, fn = function(n) {
322
+ var r = Fe(oe), t = r.csp, a = r.prefixCls, o = r.layer, i = sn;
323
+ a && (i = i.replace(/anticon/g, a)), o && (i = "@layer ".concat(o, ` {
324
+ `).concat(i, `
325
+ }`)), te(function() {
326
+ var f = n.current, s = nn(f);
327
+ Je(i, "@ant-design-icons", {
328
328
  prepend: !o,
329
329
  csp: t,
330
- attachTo: u
330
+ attachTo: s
331
331
  });
332
332
  }, []);
333
333
  }, O = { exports: {} }, d = {};
@@ -340,72 +340,72 @@ var an = {
340
340
  * This source code is licensed under the MIT license found in the
341
341
  * LICENSE file in the root directory of this source tree.
342
342
  */
343
- var J;
344
- function un() {
345
- if (J) return d;
346
- J = 1;
347
- var e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), t = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), a = Symbol.for("react.context"), l = Symbol.for("react.server_context"), u = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), E;
348
- E = Symbol.for("react.module.reference");
349
- function y(i) {
350
- if (typeof i == "object" && i !== null) {
351
- var C = i.$$typeof;
352
- switch (C) {
343
+ var ee;
344
+ function ln() {
345
+ if (ee) return d;
346
+ ee = 1;
347
+ var e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), t = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), i = Symbol.for("react.context"), f = Symbol.for("react.server_context"), s = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), C;
348
+ C = Symbol.for("react.module.reference");
349
+ function y(c) {
350
+ if (typeof c == "object" && c !== null) {
351
+ var E = c.$$typeof;
352
+ switch (E) {
353
353
  case e:
354
- switch (i = i.type, i) {
354
+ switch (c = c.type, c) {
355
355
  case r:
356
- case c:
356
+ case a:
357
357
  case t:
358
- case f:
359
- case v:
360
- return i;
358
+ case l:
359
+ case p:
360
+ return c;
361
361
  default:
362
- switch (i = i && i.$$typeof, i) {
363
- case l:
364
- case a:
365
- case u:
362
+ switch (c = c && c.$$typeof, c) {
363
+ case f:
364
+ case i:
365
+ case s:
366
366
  case h:
367
367
  case g:
368
368
  case o:
369
- return i;
369
+ return c;
370
370
  default:
371
- return C;
371
+ return E;
372
372
  }
373
373
  }
374
374
  case n:
375
- return C;
375
+ return E;
376
376
  }
377
377
  }
378
378
  }
379
- return d.ContextConsumer = a, d.ContextProvider = o, d.Element = e, d.ForwardRef = u, d.Fragment = r, d.Lazy = h, d.Memo = g, d.Portal = n, d.Profiler = c, d.StrictMode = t, d.Suspense = f, d.SuspenseList = v, d.isAsyncMode = function() {
379
+ return d.ContextConsumer = i, d.ContextProvider = o, d.Element = e, d.ForwardRef = s, d.Fragment = r, d.Lazy = h, d.Memo = g, d.Portal = n, d.Profiler = a, d.StrictMode = t, d.Suspense = l, d.SuspenseList = p, d.isAsyncMode = function() {
380
380
  return !1;
381
381
  }, d.isConcurrentMode = function() {
382
382
  return !1;
383
- }, d.isContextConsumer = function(i) {
384
- return y(i) === a;
385
- }, d.isContextProvider = function(i) {
386
- return y(i) === o;
387
- }, d.isElement = function(i) {
388
- return typeof i == "object" && i !== null && i.$$typeof === e;
389
- }, d.isForwardRef = function(i) {
390
- return y(i) === u;
391
- }, d.isFragment = function(i) {
392
- return y(i) === r;
393
- }, d.isLazy = function(i) {
394
- return y(i) === h;
395
- }, d.isMemo = function(i) {
396
- return y(i) === g;
397
- }, d.isPortal = function(i) {
398
- return y(i) === n;
399
- }, d.isProfiler = function(i) {
400
- return y(i) === c;
401
- }, d.isStrictMode = function(i) {
402
- return y(i) === t;
403
- }, d.isSuspense = function(i) {
404
- return y(i) === f;
405
- }, d.isSuspenseList = function(i) {
406
- return y(i) === v;
407
- }, d.isValidElementType = function(i) {
408
- return typeof i == "string" || typeof i == "function" || i === r || i === c || i === t || i === f || i === v || i === p || typeof i == "object" && i !== null && (i.$$typeof === h || i.$$typeof === g || i.$$typeof === o || i.$$typeof === a || i.$$typeof === u || i.$$typeof === E || i.getModuleId !== void 0);
383
+ }, d.isContextConsumer = function(c) {
384
+ return y(c) === i;
385
+ }, d.isContextProvider = function(c) {
386
+ return y(c) === o;
387
+ }, d.isElement = function(c) {
388
+ return typeof c == "object" && c !== null && c.$$typeof === e;
389
+ }, d.isForwardRef = function(c) {
390
+ return y(c) === s;
391
+ }, d.isFragment = function(c) {
392
+ return y(c) === r;
393
+ }, d.isLazy = function(c) {
394
+ return y(c) === h;
395
+ }, d.isMemo = function(c) {
396
+ return y(c) === g;
397
+ }, d.isPortal = function(c) {
398
+ return y(c) === n;
399
+ }, d.isProfiler = function(c) {
400
+ return y(c) === a;
401
+ }, d.isStrictMode = function(c) {
402
+ return y(c) === t;
403
+ }, d.isSuspense = function(c) {
404
+ return y(c) === l;
405
+ }, d.isSuspenseList = function(c) {
406
+ return y(c) === p;
407
+ }, d.isValidElementType = function(c) {
408
+ return typeof c == "string" || typeof c == "function" || c === r || c === a || c === t || c === l || c === p || c === v || typeof c == "object" && c !== null && (c.$$typeof === h || c.$$typeof === g || c.$$typeof === o || c.$$typeof === i || c.$$typeof === s || c.$$typeof === C || c.getModuleId !== void 0);
409
409
  }, d.typeOf = y, d;
410
410
  }
411
411
  var m = {};
@@ -418,41 +418,41 @@ var m = {};
418
418
  * This source code is licensed under the MIT license found in the
419
419
  * LICENSE file in the root directory of this source tree.
420
420
  */
421
- var Z;
422
- function fn() {
423
- return Z || (Z = 1, process.env.NODE_ENV !== "production" && (function() {
424
- var e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), t = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), a = Symbol.for("react.context"), l = Symbol.for("react.server_context"), u = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), E = !1, y = !1, i = !1, C = !1, I = !1, T;
421
+ var ne;
422
+ function dn() {
423
+ return ne || (ne = 1, process.env.NODE_ENV !== "production" && (function() {
424
+ var e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), t = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), i = Symbol.for("react.context"), f = Symbol.for("react.server_context"), s = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), C = !1, y = !1, c = !1, E = !1, j = !1, T;
425
425
  T = Symbol.for("react.module.reference");
426
- function w(s) {
427
- return !!(typeof s == "string" || typeof s == "function" || s === r || s === c || I || s === t || s === f || s === v || C || s === p || E || y || i || typeof s == "object" && s !== null && (s.$$typeof === h || s.$$typeof === g || s.$$typeof === o || s.$$typeof === a || s.$$typeof === u || // This needs to include all possible module reference object
426
+ function w(u) {
427
+ return !!(typeof u == "string" || typeof u == "function" || u === r || u === a || j || u === t || u === l || u === p || E || u === v || C || y || c || typeof u == "object" && u !== null && (u.$$typeof === h || u.$$typeof === g || u.$$typeof === o || u.$$typeof === i || u.$$typeof === s || // This needs to include all possible module reference object
428
428
  // types supported by any Flight configuration anywhere since
429
429
  // we don't know which Flight build this will end up being used
430
430
  // with.
431
- s.$$typeof === T || s.getModuleId !== void 0));
431
+ u.$$typeof === T || u.getModuleId !== void 0));
432
432
  }
433
- function S(s) {
434
- if (typeof s == "object" && s !== null) {
435
- var $ = s.$$typeof;
433
+ function S(u) {
434
+ if (typeof u == "object" && u !== null) {
435
+ var $ = u.$$typeof;
436
436
  switch ($) {
437
437
  case e:
438
- var _ = s.type;
438
+ var _ = u.type;
439
439
  switch (_) {
440
440
  case r:
441
- case c:
441
+ case a:
442
442
  case t:
443
- case f:
444
- case v:
443
+ case l:
444
+ case p:
445
445
  return _;
446
446
  default:
447
- var W = _ && _.$$typeof;
448
- switch (W) {
449
- case l:
450
- case a:
451
- case u:
447
+ var H = _ && _.$$typeof;
448
+ switch (H) {
449
+ case f:
450
+ case i:
451
+ case s:
452
452
  case h:
453
453
  case g:
454
454
  case o:
455
- return W;
455
+ return H;
456
456
  default:
457
457
  return $;
458
458
  }
@@ -462,176 +462,223 @@ function fn() {
462
462
  }
463
463
  }
464
464
  }
465
- var P = a, V = o, fe = e, le = u, de = r, me = h, ve = g, pe = n, ye = c, ge = t, be = f, he = v, q = !1, z = !1;
466
- function Se(s) {
465
+ var P = i, V = o, de = e, me = s, pe = r, ve = h, ye = g, ge = n, be = a, he = t, Se = l, Ce = p, q = !1, W = !1;
466
+ function Ee(u) {
467
467
  return q || (q = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
468
468
  }
469
- function Ee(s) {
470
- return z || (z = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
469
+ function Re(u) {
470
+ return W || (W = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
471
471
  }
472
- function Ce(s) {
473
- return S(s) === a;
472
+ function we(u) {
473
+ return S(u) === i;
474
474
  }
475
- function Re(s) {
476
- return S(s) === o;
475
+ function Pe(u) {
476
+ return S(u) === o;
477
477
  }
478
- function we(s) {
479
- return typeof s == "object" && s !== null && s.$$typeof === e;
478
+ function xe(u) {
479
+ return typeof u == "object" && u !== null && u.$$typeof === e;
480
480
  }
481
- function Pe(s) {
482
- return S(s) === u;
481
+ function Te(u) {
482
+ return S(u) === s;
483
483
  }
484
- function xe(s) {
485
- return S(s) === r;
484
+ function _e(u) {
485
+ return S(u) === r;
486
486
  }
487
- function Te(s) {
488
- return S(s) === h;
487
+ function Oe(u) {
488
+ return S(u) === h;
489
489
  }
490
- function _e(s) {
491
- return S(s) === g;
490
+ function Ae(u) {
491
+ return S(u) === g;
492
492
  }
493
- function Oe(s) {
494
- return S(s) === n;
493
+ function Ie(u) {
494
+ return S(u) === n;
495
495
  }
496
- function Ae(s) {
497
- return S(s) === c;
496
+ function Ne(u) {
497
+ return S(u) === a;
498
498
  }
499
- function Ne(s) {
500
- return S(s) === t;
499
+ function Me(u) {
500
+ return S(u) === t;
501
501
  }
502
- function Me(s) {
503
- return S(s) === f;
502
+ function je(u) {
503
+ return S(u) === l;
504
504
  }
505
- function Ie(s) {
506
- return S(s) === v;
505
+ function $e(u) {
506
+ return S(u) === p;
507
507
  }
508
- m.ContextConsumer = P, m.ContextProvider = V, m.Element = fe, m.ForwardRef = le, m.Fragment = de, m.Lazy = me, m.Memo = ve, m.Portal = pe, m.Profiler = ye, m.StrictMode = ge, m.Suspense = be, m.SuspenseList = he, m.isAsyncMode = Se, m.isConcurrentMode = Ee, m.isContextConsumer = Ce, m.isContextProvider = Re, m.isElement = we, m.isForwardRef = Pe, m.isFragment = xe, m.isLazy = Te, m.isMemo = _e, m.isPortal = Oe, m.isProfiler = Ae, m.isStrictMode = Ne, m.isSuspense = Me, m.isSuspenseList = Ie, m.isValidElementType = w, m.typeOf = S;
508
+ m.ContextConsumer = P, m.ContextProvider = V, m.Element = de, m.ForwardRef = me, m.Fragment = pe, m.Lazy = ve, m.Memo = ye, m.Portal = ge, m.Profiler = be, m.StrictMode = he, m.Suspense = Se, m.SuspenseList = Ce, m.isAsyncMode = Ee, m.isConcurrentMode = Re, m.isContextConsumer = we, m.isContextProvider = Pe, m.isElement = xe, m.isForwardRef = Te, m.isFragment = _e, m.isLazy = Oe, m.isMemo = Ae, m.isPortal = Ie, m.isProfiler = Ne, m.isStrictMode = Me, m.isSuspense = je, m.isSuspenseList = $e, m.isValidElementType = w, m.typeOf = S;
509
509
  })()), m;
510
510
  }
511
- var ee;
512
- function ln() {
513
- return ee || (ee = 1, process.env.NODE_ENV === "production" ? O.exports = un() : O.exports = fn()), O.exports;
511
+ var re;
512
+ function mn() {
513
+ return re || (re = 1, process.env.NODE_ENV === "production" ? O.exports = ln() : O.exports = dn()), O.exports;
514
514
  }
515
- ln();
516
- function dn(e, n, r) {
515
+ mn();
516
+ function pn(e, n, r) {
517
517
  var t = b.useRef({});
518
518
  return (!("value" in t.current) || r(t.current.condition, n)) && (t.current.value = e(), t.current.condition = n), t.current.value;
519
519
  }
520
- Number(Le.split(".")[0]);
521
- var mn = function(n, r) {
520
+ Number(ke.split(".")[0]);
521
+ var vn = function(n, r) {
522
522
  typeof n == "function" ? n(r) : R(n) === "object" && n && "current" in n && (n.current = r);
523
- }, vn = function() {
523
+ }, yn = function() {
524
524
  for (var n = arguments.length, r = new Array(n), t = 0; t < n; t++)
525
525
  r[t] = arguments[t];
526
- var c = r.filter(Boolean);
527
- return c.length <= 1 ? c[0] : function(o) {
528
- r.forEach(function(a) {
529
- mn(a, o);
526
+ var a = r.filter(Boolean);
527
+ return a.length <= 1 ? a[0] : function(o) {
528
+ r.forEach(function(i) {
529
+ vn(i, o);
530
530
  });
531
531
  };
532
- }, pn = function() {
532
+ }, gn = function() {
533
533
  for (var n = arguments.length, r = new Array(n), t = 0; t < n; t++)
534
534
  r[t] = arguments[t];
535
- return dn(function() {
536
- return vn.apply(void 0, r);
537
- }, r, function(c, o) {
538
- return c.length !== o.length || c.every(function(a, l) {
539
- return a !== o[l];
535
+ return pn(function() {
536
+ return yn.apply(void 0, r);
537
+ }, r, function(a, o) {
538
+ return a.length !== o.length || a.every(function(i, f) {
539
+ return i !== o[f];
540
540
  });
541
541
  });
542
- }, yn = ["className", "component", "viewBox", "spin", "rotate", "tabIndex", "onClick", "children"], se = /* @__PURE__ */ b.forwardRef(function(e, n) {
543
- var r = e.className, t = e.component, c = e.viewBox, o = e.spin, a = e.rotate, l = e.tabIndex, u = e.onClick, f = e.children, v = te(e, yn), g = b.useRef(), h = pn(g, n);
544
- G(!!(t || f), "Should have `component` prop or `children`."), sn(g);
545
- var p = b.useContext(re), E = p.prefixCls, y = E === void 0 ? "anticon" : E, i = p.rootClassName, C = U(i, y, L({}, "".concat(y, "-spin"), !!o && !!t), r), I = U(L({}, "".concat(y, "-spin"), !!o)), T = a ? {
546
- msTransform: "rotate(".concat(a, "deg)"),
547
- transform: "rotate(".concat(a, "deg)")
548
- } : void 0, w = A(A({}, an), {}, {
549
- className: I,
542
+ }, bn = ["className", "component", "viewBox", "spin", "rotate", "tabIndex", "onClick", "children"], fe = /* @__PURE__ */ b.forwardRef(function(e, n) {
543
+ var r = e.className, t = e.component, a = e.viewBox, o = e.spin, i = e.rotate, f = e.tabIndex, s = e.onClick, l = e.children, p = ie(e, bn), g = b.useRef(), h = gn(g, n);
544
+ J(!!(t || l), "Should have `component` prop or `children`."), fn(g);
545
+ var v = b.useContext(oe), C = v.prefixCls, y = C === void 0 ? "anticon" : C, c = v.rootClassName, E = Q(c, y, F({}, "".concat(y, "-spin"), !!o && !!t), r), j = Q(F({}, "".concat(y, "-spin"), !!o)), T = i ? {
546
+ msTransform: "rotate(".concat(i, "deg)"),
547
+ transform: "rotate(".concat(i, "deg)")
548
+ } : void 0, w = I(I({}, un), {}, {
549
+ className: j,
550
550
  style: T,
551
- viewBox: c
551
+ viewBox: a
552
552
  });
553
- c || delete w.viewBox;
553
+ a || delete w.viewBox;
554
554
  var S = function() {
555
- return t ? /* @__PURE__ */ b.createElement(t, w, f) : f ? (G(!!c || b.Children.count(f) === 1 && /* @__PURE__ */ b.isValidElement(f) && b.Children.only(f).type === "use", "Make sure that you provide correct `viewBox` prop (default `0 0 1024 1024`) to the icon."), /* @__PURE__ */ b.createElement("svg", x({}, w, {
556
- viewBox: c
557
- }), f)) : null;
558
- }, P = l;
559
- return P === void 0 && u && (P = -1), /* @__PURE__ */ b.createElement("span", x({
555
+ return t ? /* @__PURE__ */ b.createElement(t, w, l) : l ? (J(!!a || b.Children.count(l) === 1 && /* @__PURE__ */ b.isValidElement(l) && b.Children.only(l).type === "use", "Make sure that you provide correct `viewBox` prop (default `0 0 1024 1024`) to the icon."), /* @__PURE__ */ b.createElement("svg", x({}, w, {
556
+ viewBox: a
557
+ }), l)) : null;
558
+ }, P = f;
559
+ return P === void 0 && s && (P = -1), /* @__PURE__ */ b.createElement("span", x({
560
560
  role: "img"
561
- }, v, {
561
+ }, p, {
562
562
  ref: h,
563
563
  tabIndex: P,
564
- onClick: u,
565
- className: C
564
+ onClick: s,
565
+ className: E
566
566
  }), S());
567
567
  });
568
- se.displayName = "AntdIcon";
569
- var gn = ["type", "children"], ue = /* @__PURE__ */ new Set();
570
- function bn(e) {
571
- return !!(typeof e == "string" && e.length && !ue.has(e));
568
+ fe.displayName = "AntdIcon";
569
+ var hn = ["type", "children"], le = /* @__PURE__ */ new Set();
570
+ function Sn(e) {
571
+ return !!(typeof e == "string" && e.length && !le.has(e));
572
572
  }
573
573
  function N(e) {
574
574
  var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, r = e[n];
575
- if (bn(r)) {
575
+ if (Sn(r)) {
576
576
  var t = document.createElement("script");
577
577
  t.setAttribute("src", r), t.setAttribute("data-namespace", r), e.length > n + 1 && (t.onload = function() {
578
578
  N(e, n + 1);
579
579
  }, t.onerror = function() {
580
580
  N(e, n + 1);
581
- }), ue.add(r), document.body.appendChild(t);
581
+ }), le.add(r), document.body.appendChild(t);
582
582
  }
583
583
  }
584
- function hn() {
584
+ function Cn() {
585
585
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = e.scriptUrl, r = e.extraCommonProps, t = r === void 0 ? {} : r;
586
586
  n && typeof document < "u" && typeof window < "u" && typeof document.createElement == "function" && (Array.isArray(n) ? N(n.reverse()) : N([n]));
587
- var c = /* @__PURE__ */ b.forwardRef(function(o, a) {
588
- var l = o.type, u = o.children, f = te(o, gn), v = null;
589
- return o.type && (v = /* @__PURE__ */ b.createElement("use", {
590
- xlinkHref: "#".concat(l)
591
- })), u && (v = u), /* @__PURE__ */ b.createElement(se, x({}, t, f, {
592
- ref: a
593
- }), v);
587
+ var a = /* @__PURE__ */ b.forwardRef(function(o, i) {
588
+ var f = o.type, s = o.children, l = ie(o, hn), p = null;
589
+ return o.type && (p = /* @__PURE__ */ b.createElement("use", {
590
+ xlinkHref: "#".concat(f)
591
+ })), s && (p = s), /* @__PURE__ */ b.createElement(fe, x({}, t, l, {
592
+ ref: i
593
+ }), p);
594
594
  });
595
- return c.displayName = "Iconfont", c;
596
- }
597
- var Sn = (e, n, r, t, c, o, a, l) => {
598
- let u = document.documentElement, f = ["light", "dark"];
599
- function v(p) {
600
- (Array.isArray(e) ? e : [e]).forEach((E) => {
601
- let y = E === "class", i = y && o ? c.map((C) => o[C] || C) : c;
602
- y ? (u.classList.remove(...i), u.classList.add(o && o[p] ? o[p] : p)) : u.setAttribute(E, p);
603
- }), g(p);
595
+ return a.displayName = "Iconfont", a;
596
+ }
597
+ function A(e) {
598
+ for (var n = 1; n < arguments.length; n++) {
599
+ var r = arguments[n];
600
+ for (var t in r) e[t] = r[t];
604
601
  }
605
- function g(p) {
606
- l && f.includes(p) && (u.style.colorScheme = p);
602
+ return e;
603
+ }
604
+ var En = { read: function(e) {
605
+ return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
606
+ }, write: function(e) {
607
+ return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
608
+ } };
609
+ function B(e, n) {
610
+ function r(a, o, i) {
611
+ if (typeof document < "u") {
612
+ i = A({}, n, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), a = encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
613
+ var f = "";
614
+ for (var s in i) i[s] && (f += "; " + s, i[s] !== !0 && (f += "=" + i[s].split(";")[0]));
615
+ return document.cookie = a + "=" + e.write(o, a) + f;
616
+ }
617
+ }
618
+ function t(a) {
619
+ if (!(typeof document > "u" || arguments.length && !a)) {
620
+ for (var o = document.cookie ? document.cookie.split("; ") : [], i = {}, f = 0; f < o.length; f++) {
621
+ var s = o[f].split("="), l = s.slice(1).join("=");
622
+ try {
623
+ var p = decodeURIComponent(s[0]);
624
+ if (i[p] = e.read(l, p), a === p) break;
625
+ } catch {
626
+ }
627
+ }
628
+ return a ? i[a] : i;
629
+ }
630
+ }
631
+ return Object.create({ set: r, get: t, remove: function(a, o) {
632
+ r(a, "", A({}, o, { expires: -1 }));
633
+ }, withAttributes: function(a) {
634
+ return B(this.converter, A({}, this.attributes, a));
635
+ }, withConverter: function(a) {
636
+ return B(A({}, this.converter, a), this.attributes);
637
+ } }, { attributes: { value: Object.freeze(n) }, converter: { value: Object.freeze(e) } });
638
+ }
639
+ var Rn = B(En, { path: "/" }), wn = (e, n, r, t, a, o, i, f) => {
640
+ let s = document.documentElement, l = ["light", "dark"];
641
+ function p(v) {
642
+ (Array.isArray(e) ? e : [e]).forEach((C) => {
643
+ let y = C === "class", c = y && o ? a.map((E) => o[E] || E) : a;
644
+ y ? (s.classList.remove(...c), s.classList.add(o && o[v] ? o[v] : v)) : s.setAttribute(C, v);
645
+ }), g(v);
646
+ }
647
+ function g(v) {
648
+ f && l.includes(v) && (s.style.colorScheme = v);
607
649
  }
608
650
  function h() {
609
651
  return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
610
652
  }
611
- if (t) v(t);
653
+ if (t) p(t);
612
654
  else try {
613
- let p = localStorage.getItem(n) || r, E = a && p === "system" ? h() : p;
614
- v(E);
655
+ let v = Rn.get(n) || localStorage.getItem(n) || r, C = i && v === "system" ? h() : v;
656
+ p(C);
615
657
  } catch {
616
658
  }
617
- }, En = b.createContext(void 0), Cn = { setTheme: (e) => {
618
- }, themes: [] }, Rn = () => {
659
+ }, Pn = b.createContext(void 0), xn = { setTheme: (e) => {
660
+ }, themes: [] }, Tn = () => {
619
661
  var e;
620
- return (e = b.useContext(En)) != null ? e : Cn;
662
+ return (e = b.useContext(Pn)) != null ? e : xn;
621
663
  };
622
- b.memo(({ forcedTheme: e, storageKey: n, attribute: r, enableSystem: t, enableColorScheme: c, defaultTheme: o, value: a, themes: l, nonce: u, scriptProps: f }) => {
623
- let v = JSON.stringify([r, n, o, e, l, a, t, c]).slice(1, -1);
624
- return b.createElement("script", { ...f, suppressHydrationWarning: !0, nonce: typeof window > "u" ? u : "", dangerouslySetInnerHTML: { __html: `(${Sn.toString()})(${v})` } });
664
+ b.memo(({ forcedTheme: e, storageKey: n, attribute: r, enableSystem: t, enableColorScheme: a, defaultTheme: o, value: i, themes: f, nonce: s, scriptProps: l }) => {
665
+ let p = JSON.stringify([r, n, o, e, f, i, t, a]).slice(1, -1);
666
+ return b.createElement("script", { ...l, suppressHydrationWarning: !0, nonce: typeof window > "u" ? s : "", dangerouslySetInnerHTML: { __html: `(${wn.toString()})(${p})` } });
625
667
  });
626
- const wn = hn({
668
+ /*! Bundled license information:
669
+
670
+ js-cookie/dist/js.cookie.mjs:
671
+ (*! js-cookie v3.0.5 | MIT *)
672
+ */
673
+ const _n = Cn({
627
674
  scriptUrl: "//cdn.ichaingo.com/common/iconfont/20250925/iconfont.js"
628
675
  // 在 iconfont.cn 上生成
629
- }), xn = (e) => {
630
- const { type: n, lightType: r, darkType: t, ...c } = e, { resolvedTheme: o, theme: a } = Rn(), l = o || a, [u, f] = Fe(n);
631
- return ne(() => {
632
- f(l === "dark" ? t || n : r || n);
633
- }, [l]), /* @__PURE__ */ ke(wn, { ...c, type: u, key: u });
676
+ }), An = (e) => {
677
+ const { type: n, lightType: r, darkType: t, ...a } = e, { resolvedTheme: o, theme: i } = Tn(), f = o || i, [s, l] = De(n);
678
+ return te(() => {
679
+ l(f === "dark" ? t || n : r || n);
680
+ }, [f]), /* @__PURE__ */ Be(_n, { ...a, type: s, key: s });
634
681
  };
635
682
  export {
636
- xn as default
683
+ An as default
637
684
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ichaingo/iconfont",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -18,7 +18,7 @@
18
18
  "react-dom": "^19.1.0",
19
19
  "tailwind-merge": "^2.5.5",
20
20
  "next": "^15.1.6",
21
- "next-themes": "^0.4.4",
21
+ "@ichaingo/next-themes": "^0.4.0",
22
22
  "@ant-design/icons": "^5.5.2"
23
23
  }
24
24
  }
package/src/index.tsx CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { createFromIconfontCN } from '@ant-design/icons';
4
4
  import type { IconFontProps } from '@ant-design/icons/lib/components/IconFont';
5
- import { useTheme } from 'next-themes';
5
+ import { useTheme } from '@ichaingo/next-themes';
6
6
  import { useEffect, useState } from 'react';
7
7
 
8
8
  const Instance = createFromIconfontCN({