@gobolt/genesis 0.0.8 → 0.0.9

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 (170) hide show
  1. package/README.md +10 -0
  2. package/dist/{AntdIcon-c395a1c4.js → AntdIcon-BoLh1dP8.js} +66 -68
  3. package/dist/CheckOutlined-CeTKr6II.js +13 -0
  4. package/dist/{CloseCircleFilled-ddc51e7e.js → CloseCircleFilled-DXCxlIQL.js} +8 -11
  5. package/dist/{CloseOutlined-14b8bba1.js → CloseOutlined-ClXDNn82.js} +9 -12
  6. package/dist/{Compact-c39ed20d.js → Compact-CGY560JF.js} +63 -65
  7. package/dist/ContextIsolator-D5x2Ih51.js +20 -0
  8. package/dist/{ExclamationCircleFilled-23ef9812.js → ExclamationCircleFilled-C0Kj5KQV.js} +16 -22
  9. package/dist/KeyCode-DM2sFh3-.js +517 -0
  10. package/dist/LoadingOutlined-8EnJdZ7I.js +13 -0
  11. package/dist/{Overflow-a570fa69.js → Overflow-PBZD-PFm.js} +63 -64
  12. package/dist/{DownOutlined-64a4732a.js → PurePanel-BqPLRtc2.js} +67 -70
  13. package/dist/{SearchOutlined-a9014e08.js → SearchOutlined-BP3Z2K6j.js} +8 -11
  14. package/dist/{TextArea-20825221.js → TextArea-DKwCct3i.js} +583 -588
  15. package/dist/Typography-aGoDUl4R.js +710 -0
  16. package/dist/bundle.css +1204 -0
  17. package/dist/{button-fa1c119c.js → button-CDQgO1OK.js} +274 -278
  18. package/dist/{collapse-345bc884.js → collapse-Dtpt-6W_.js} +2 -2
  19. package/dist/compact-item-DH13cl8A.js +61 -0
  20. package/dist/components/Badge/Badge.d.ts +2 -2
  21. package/dist/components/Badge/Badge.js +63 -62
  22. package/dist/components/Badge/__tests__/Badge.test.js +11 -65
  23. package/dist/components/Badge/index.js +2 -21
  24. package/dist/components/Badge/styles.js +7 -8
  25. package/dist/components/Breadcrumb/Breadcrumb.js +8 -24
  26. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +21 -7
  27. package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +13 -60
  28. package/dist/components/Breadcrumb/index.js +2 -25
  29. package/dist/components/Breadcrumb/styles.d.ts +10 -6
  30. package/dist/components/Breadcrumb/styles.js +787 -808
  31. package/dist/components/Button/Button.d.ts +6 -4
  32. package/dist/components/Button/Button.js +20 -40
  33. package/dist/components/Button/__tests__/Button.test.js +9 -54
  34. package/dist/components/Button/index.js +2 -20
  35. package/dist/components/Button/styles.d.ts +9 -5
  36. package/dist/components/Button/styles.js +19 -30
  37. package/dist/components/Checkbox/Checkbox.js +8 -38
  38. package/dist/components/Checkbox/__tests__/Checkbox.test.js +16 -62
  39. package/dist/components/Checkbox/index.js +2 -47
  40. package/dist/components/Checkbox/styles.d.ts +8 -1
  41. package/dist/components/Checkbox/styles.js +181 -188
  42. package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.d.ts +2 -4
  43. package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +19 -51
  44. package/dist/components/ErrorBoundaryFallback/index.d.ts +1 -0
  45. package/dist/components/ErrorBoundaryFallback/index.js +2 -49
  46. package/dist/components/ErrorBoundaryFallback/styles.d.ts +1 -3
  47. package/dist/components/ErrorBoundaryFallback/styles.js +34 -37
  48. package/dist/components/Form/Form.d.ts +18 -5
  49. package/dist/components/Form/Form.js +4 -45
  50. package/dist/components/Form/__stories__/FormStory.js +44 -81
  51. package/dist/components/Form/__tests__/form.test.d.ts +1 -0
  52. package/dist/components/Form/__tests__/form.test.js +18 -0
  53. package/dist/components/Form/index.js +2 -46
  54. package/dist/components/Form/styles.d.ts +3 -0
  55. package/dist/components/Form/styles.js +5 -0
  56. package/dist/components/Input/Input.js +6 -29
  57. package/dist/components/Input/__tests__/Input.test.js +21 -66
  58. package/dist/components/Input/index.js +2 -29
  59. package/dist/components/Input/styles.d.ts +5 -2
  60. package/dist/components/Input/styles.js +319 -332
  61. package/dist/components/Message/Message.d.ts +4 -4
  62. package/dist/components/Message/Message.js +53 -80
  63. package/dist/components/Message/__tests__/Message.test.js +24 -70
  64. package/dist/components/Message/index.js +2 -48
  65. package/dist/components/Message/styles.d.ts +4 -1
  66. package/dist/components/Message/styles.js +24 -18
  67. package/dist/components/Notification/Notification.d.ts +11 -10
  68. package/dist/components/Notification/Notification.js +306 -372
  69. package/dist/components/Notification/NotificationRightChevron.d.ts +2 -0
  70. package/dist/components/Notification/NotificationRightChevron.js +23 -0
  71. package/dist/components/Notification/__tests__/Notification.test.js +8 -69
  72. package/dist/components/Notification/index.js +2 -59
  73. package/dist/components/Notification/styles.d.ts +13 -3
  74. package/dist/components/Notification/styles.js +36 -20
  75. package/dist/components/Radio/Radio.js +20 -106
  76. package/dist/components/Radio/RadioGroup.js +18 -71
  77. package/dist/components/Radio/__stories__/RadioGroup.stories.d.ts +1 -1
  78. package/dist/components/Radio/__tests__/RadioGroup.test.js +15 -70
  79. package/dist/components/Radio/index.d.ts +1 -1
  80. package/dist/components/Radio/index.js +2 -56
  81. package/dist/components/Select/DropdownChevron.d.ts +2 -0
  82. package/dist/components/Select/DropdownChevron.js +23 -0
  83. package/dist/components/Select/Select.d.ts +9 -4
  84. package/dist/components/Select/Select.js +29 -41
  85. package/dist/components/Select/__tests__/Select.test.js +10752 -93
  86. package/dist/components/Select/index.js +2 -28
  87. package/dist/components/Select/styles.d.ts +20 -6
  88. package/dist/components/Select/styles.js +1381 -1370
  89. package/dist/components/Toast/Toast.d.ts +4 -4
  90. package/dist/components/Toast/Toast.js +8 -37
  91. package/dist/components/Toast/__stories__/Toast.stories.d.ts +1 -0
  92. package/dist/components/Toast/__tests__/Toast.test.js +10 -55
  93. package/dist/components/Toast/index.js +2 -46
  94. package/dist/components/Toast/styles.d.ts +6 -1
  95. package/dist/components/Toast/styles.js +36 -21
  96. package/dist/components/Typography/Typography.d.ts +7 -4
  97. package/dist/components/Typography/Typography.js +2 -42
  98. package/dist/components/Typography/__stories__/Typography.stories.d.ts +1 -0
  99. package/dist/components/Typography/__tests__/Typography.test.js +19 -56
  100. package/dist/components/Typography/index.js +2 -46
  101. package/dist/components/Typography/styles.d.ts +18 -4
  102. package/dist/components/Typography/styles.js +36 -43
  103. package/dist/components/index.d.ts +13 -5
  104. package/dist/components/index.js +24 -70
  105. package/dist/{context-3b8a39af.js → context-BMW3aJEf.js} +538 -548
  106. package/dist/genesis/GenesisThemeBreakdown.js +38 -55
  107. package/dist/genesis/GenesisThemeDemo.js +3 -53
  108. package/dist/genesis/styles.d.ts +6 -2
  109. package/dist/genesis/styles.js +496 -521
  110. package/dist/{index-e2b72ca8.js → index-1CBpubM3.js} +97 -102
  111. package/dist/index-BZAhCB_K.js +97 -0
  112. package/dist/{index-501fc13d.js → index-C0SmxWLS.js} +367 -392
  113. package/dist/index-C8haFnXI.js +1112 -0
  114. package/dist/index-CfDY25LP.js +873 -0
  115. package/dist/index-DPW8XdWj.js +952 -0
  116. package/dist/{index-8c8d2d0c.js → index-bKlRxQp4.js} +114 -114
  117. package/dist/index-oK7z6jnz.js +22795 -0
  118. package/dist/index.d.ts +1 -0
  119. package/dist/index.js +31 -77
  120. package/dist/{isVisible-729780f5.js → isVisible-A-IfeFoT.js} +67 -94
  121. package/dist/{magic-string.es-b7491176.js → magic-string.es-D2FWSwU3.js} +56 -103
  122. package/dist/{pickAttrs-00ba4687.js → pickAttrs-B0YTfcV1.js} +1 -1
  123. package/dist/providers/GenesisProvider.d.ts +0 -5
  124. package/dist/providers/GenesisProvider.js +9 -59
  125. package/dist/providers/ThemeProvider.d.ts +1 -2
  126. package/dist/providers/ThemeProvider.js +11 -13
  127. package/dist/providers/ToastProvider.d.ts +11 -4
  128. package/dist/providers/ToastProvider.js +10 -39
  129. package/dist/providers/index.d.ts +2 -3
  130. package/dist/providers/index.js +4 -51
  131. package/dist/providers/useGenesis.d.ts +7 -0
  132. package/dist/providers/useGenesis.js +6 -0
  133. package/dist/setup-BvfREoHl.js +33891 -0
  134. package/dist/{styled-components.browser.esm-02f500bc.js → styled-components.browser.esm-CZ1XM4o4.js} +72 -134
  135. package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +15 -45
  136. package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +15 -45
  137. package/dist/styles/design-tokens/{typography → typography-tokens}/TypographyTokens.stories.d.ts +1 -0
  138. package/dist/styles/design-tokens/variables.d.ts +10 -10
  139. package/dist/styles/design-tokens/variables.js +1 -1
  140. package/dist/styles/global-styles.d.ts +1 -0
  141. package/dist/styles/global-styles.js +14 -31
  142. package/dist/styles/theme/genesis-theme.js +257 -212
  143. package/dist/styles/theme/genesis-theme.types.d.ts +46 -0
  144. package/dist/styles/theme/index.js +4 -5
  145. package/dist/styles-CT_fyXBd.js +1808 -0
  146. package/dist/test/setup.js +3 -46
  147. package/dist/useLocale-DT-z_vQ6.js +16 -0
  148. package/dist/useVariants-DvhXfgJY.js +30 -0
  149. package/dist/utils/isAllEnglishString.js +1 -2
  150. package/dist/{presets-83ccb923.js → warning-C63HNL9U.js} +358 -356
  151. package/package.json +35 -35
  152. package/dist/CheckOutlined-52d9ac25.js +0 -29
  153. package/dist/ContextIsolator-b09b2c52.js +0 -20
  154. package/dist/EllipsisOutlined-60122660.js +0 -1115
  155. package/dist/InfoCircleFilled-c5f90c20.js +0 -16
  156. package/dist/RightOutlined-83515eb4.js +0 -16
  157. package/dist/compact-item-b8f85aa6.js +0 -75
  158. package/dist/index-0a886e53.js +0 -100
  159. package/dist/index-0b9ee239.js +0 -955
  160. package/dist/index-1a33c134.js +0 -1389
  161. package/dist/index-4003d75b.js +0 -3748
  162. package/dist/index-89035ea5.js +0 -3242
  163. package/dist/providers/ToastWrapper.d.ts +0 -7
  164. package/dist/providers/ToastWrapper.js +0 -56
  165. package/dist/setup-aaca7b6f.js +0 -21158
  166. package/dist/styles/theme/global-styles.d.ts +0 -1
  167. package/dist/styles/theme/global-styles.js +0 -36
  168. package/dist/useVariants-a0d64298.js +0 -30
  169. /package/dist/{presetColors-ccf8cb4c.js → presetColors-Cl8UP3Nw.js} +0 -0
  170. /package/dist/{reactNode-f4391605.js → reactNode-sKPeiqPL.js} +0 -0
@@ -1,94 +1,91 @@
1
1
  import * as r from "react";
2
- import $, { useContext as Z, useRef as ee } from "react";
3
- import { _ as te, d as ne, c as D } from "./presets-83ccb923.js";
4
- import { _ as k, a as E, i as oe } from "./isVisible-729780f5.js";
5
- import { x as re, y as se, z as ae, w as g, A as ie, q as A, C as I, B as ue, b as ce, s as le, j as de } from "./index-4003d75b.js";
6
- import { c as fe } from "./reactNode-f4391605.js";
7
- import * as U from "react-dom";
8
- var _ = te({}, U), pe = _.version, w = _.render, me = _.unmountComponentAtNode, C;
2
+ import L, { useContext as X, useRef as Z } from "react";
3
+ import { _ as ee, d as te, c as $ } from "./warning-C63HNL9U.js";
4
+ import { _ as k, a as E, i as ne } from "./isVisible-A-IfeFoT.js";
5
+ import { R as A, y as oe, z as re, A as se, w as g, B as ae, t as I, C as U, E as ue, b as ie, s as ce, h as le } from "./index-oK7z6jnz.js";
6
+ import { c as de } from "./reactNode-sKPeiqPL.js";
7
+ var _ = ee({}, A), fe = _.version, w = _.render, pe = _.unmountComponentAtNode, C;
9
8
  try {
10
- var ve = Number((pe || "").split(".")[0]);
11
- ve >= 18 && (C = _.createRoot);
9
+ var me = Number((fe || "").split(".")[0]);
10
+ me >= 18 && (C = _.createRoot);
12
11
  } catch {
13
12
  }
14
- function L(e) {
13
+ function D(e) {
15
14
  var t = _.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
16
- t && ne(t) === "object" && (t.usingClientEntryPoint = e);
15
+ t && te(t) === "object" && (t.usingClientEntryPoint = e);
17
16
  }
18
17
  var y = "__rc_react_root__";
19
- function be(e, t) {
20
- L(!0);
18
+ function ve(e, t) {
19
+ D(!0);
21
20
  var n = t[y] || C(t);
22
- L(!1), n.render(e), t[y] = n;
21
+ D(!1), n.render(e), t[y] = n;
23
22
  }
24
- function Re(e, t) {
23
+ function be(e, t) {
25
24
  w == null || w(e, t);
26
25
  }
27
- function _e(e, t) {
26
+ function Re(e, t) {
28
27
  if (C) {
29
- be(e, t);
28
+ ve(e, t);
30
29
  return;
31
30
  }
32
- Re(e, t);
31
+ be(e, t);
33
32
  }
34
- function he(e) {
33
+ function _e(e) {
35
34
  return W.apply(this, arguments);
36
35
  }
37
36
  function W() {
38
37
  return W = k(/* @__PURE__ */ E().mark(function e(t) {
39
38
  return E().wrap(function(o) {
40
- for (; ; )
41
- switch (o.prev = o.next) {
42
- case 0:
43
- return o.abrupt("return", Promise.resolve().then(function() {
44
- var s;
45
- (s = t[y]) === null || s === void 0 || s.unmount(), delete t[y];
46
- }));
47
- case 1:
48
- case "end":
49
- return o.stop();
50
- }
39
+ for (; ; ) switch (o.prev = o.next) {
40
+ case 0:
41
+ return o.abrupt("return", Promise.resolve().then(function() {
42
+ var s;
43
+ (s = t[y]) === null || s === void 0 || s.unmount(), delete t[y];
44
+ }));
45
+ case 1:
46
+ case "end":
47
+ return o.stop();
48
+ }
51
49
  }, e);
52
50
  })), W.apply(this, arguments);
53
51
  }
54
- function Ee(e) {
55
- me(e);
52
+ function he(e) {
53
+ pe(e);
56
54
  }
57
- function ge(e) {
55
+ function Ee(e) {
58
56
  return O.apply(this, arguments);
59
57
  }
60
58
  function O() {
61
59
  return O = k(/* @__PURE__ */ E().mark(function e(t) {
62
60
  return E().wrap(function(o) {
63
- for (; ; )
64
- switch (o.prev = o.next) {
65
- case 0:
66
- if (C === void 0) {
67
- o.next = 2;
68
- break;
69
- }
70
- return o.abrupt("return", he(t));
71
- case 2:
72
- Ee(t);
73
- case 3:
74
- case "end":
75
- return o.stop();
76
- }
61
+ for (; ; ) switch (o.prev = o.next) {
62
+ case 0:
63
+ if (C === void 0) {
64
+ o.next = 2;
65
+ break;
66
+ }
67
+ return o.abrupt("return", _e(t));
68
+ case 2:
69
+ he(t);
70
+ case 3:
71
+ case "end":
72
+ return o.stop();
73
+ }
77
74
  }, e);
78
75
  })), O.apply(this, arguments);
79
76
  }
80
- const ye = (e, t) => {
77
+ const ge = (e, t) => {
81
78
  if (process.env.NODE_ENV !== "production") {
82
- const n = parseInt(r.version.split(".")[0], 10), o = Object.keys(U);
83
- process.env.NODE_ENV !== "production" && re(n < 19 || o.includes("createRoot"), "compatible", "antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.");
79
+ const n = parseInt(r.version.split(".")[0], 10), o = Object.keys(A);
80
+ process.env.NODE_ENV !== "production" && oe(n < 19 || o.includes("createRoot"), "compatible", "antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.");
84
81
  }
85
- return _e(e, t), () => ge(t);
82
+ return Re(e, t), () => Ee(t);
86
83
  };
87
- let Ce = ye;
88
- function we() {
89
- return Ce;
84
+ let ye = ge;
85
+ function Ce() {
86
+ return ye;
90
87
  }
91
- const Se = (e) => {
88
+ const we = (e) => {
92
89
  const {
93
90
  componentCls: t,
94
91
  colorPrimary: n
@@ -115,12 +112,12 @@ const Se = (e) => {
115
112
  }
116
113
  }
117
114
  };
118
- }, Ne = se("Wave", (e) => [Se(e)]), j = `${ae}-wave-target`;
115
+ }, Se = re("Wave", (e) => [we(e)]), j = `${se}-wave-target`;
119
116
  function S(e) {
120
117
  return e && e !== "#fff" && e !== "#ffffff" && e !== "rgb(255, 255, 255)" && e !== "rgba(255, 255, 255, 1)" && !/rgba\((?:\d*, ){3}0\)/.test(e) && // any transparent rgba color
121
118
  e !== "transparent";
122
119
  }
123
- function We(e) {
120
+ function Ne(e) {
124
121
  const {
125
122
  borderTopColor: t,
126
123
  borderColor: n,
@@ -131,81 +128,81 @@ function We(e) {
131
128
  function N(e) {
132
129
  return Number.isNaN(e) ? 0 : e;
133
130
  }
134
- const Oe = (e) => {
131
+ const We = (e) => {
135
132
  const {
136
133
  className: t,
137
134
  target: n,
138
135
  component: o,
139
136
  registerUnmount: s
140
- } = e, u = r.useRef(null), c = r.useRef(null);
137
+ } = e, i = r.useRef(null), c = r.useRef(null);
141
138
  r.useEffect(() => {
142
139
  c.current = s();
143
140
  }, []);
144
- const [d, h] = r.useState(null), [f, a] = r.useState([]), [m, v] = r.useState(0), [V, P] = r.useState(0), [q, z] = r.useState(0), [F, M] = r.useState(0), [H, K] = r.useState(!1), T = {
141
+ const [d, h] = r.useState(null), [f, a] = r.useState([]), [m, v] = r.useState(0), [B, V] = r.useState(0), [P, z] = r.useState(0), [F, q] = r.useState(0), [M, H] = r.useState(!1), T = {
145
142
  left: m,
146
- top: V,
147
- width: q,
143
+ top: B,
144
+ width: P,
148
145
  height: F,
149
146
  borderRadius: f.map((l) => `${l}px`).join(" ")
150
147
  };
151
148
  d && (T["--wave-color"] = d);
152
149
  function x() {
153
150
  const l = getComputedStyle(n);
154
- h(We(n));
155
- const i = l.position === "static", {
151
+ h(Ne(n));
152
+ const u = l.position === "static", {
156
153
  borderLeftWidth: p,
157
154
  borderTopWidth: b
158
155
  } = l;
159
- v(i ? n.offsetLeft : N(-parseFloat(p))), P(i ? n.offsetTop : N(-parseFloat(b))), z(n.offsetWidth), M(n.offsetHeight);
156
+ v(u ? n.offsetLeft : N(-parseFloat(p))), V(u ? n.offsetTop : N(-parseFloat(b))), z(n.offsetWidth), q(n.offsetHeight);
160
157
  const {
161
158
  borderTopLeftRadius: R,
162
- borderTopRightRadius: Y,
163
- borderBottomLeftRadius: J,
164
- borderBottomRightRadius: Q
159
+ borderTopRightRadius: G,
160
+ borderBottomLeftRadius: Y,
161
+ borderBottomRightRadius: J
165
162
  } = l;
166
- a([R, Y, Q, J].map((X) => N(parseFloat(X))));
163
+ a([R, G, J, Y].map((Q) => N(parseFloat(Q))));
167
164
  }
168
165
  if (r.useEffect(() => {
169
166
  if (n) {
170
167
  const l = g(() => {
171
- x(), K(!0);
168
+ x(), H(!0);
172
169
  });
173
- let i;
174
- return typeof ResizeObserver < "u" && (i = new ResizeObserver(x), i.observe(n)), () => {
175
- g.cancel(l), i == null || i.disconnect();
170
+ let u;
171
+ return typeof ResizeObserver < "u" && (u = new ResizeObserver(x), u.observe(n)), () => {
172
+ g.cancel(l), u == null || u.disconnect();
176
173
  };
177
174
  }
178
- }, []), !H)
175
+ }, []), !M)
179
176
  return null;
180
- const G = (o === "Checkbox" || o === "Radio") && (n == null ? void 0 : n.classList.contains(j));
181
- return /* @__PURE__ */ r.createElement(ie, {
177
+ const K = (o === "Checkbox" || o === "Radio") && (n == null ? void 0 : n.classList.contains(j));
178
+ return /* @__PURE__ */ r.createElement(ae, {
182
179
  visible: !0,
183
180
  motionAppear: !0,
184
181
  motionName: "wave-motion",
185
182
  motionDeadline: 5e3,
186
- onAppearEnd: (l, i) => {
183
+ onAppearEnd: (l, u) => {
187
184
  var p, b;
188
- if (i.deadline || i.propertyName === "opacity") {
189
- const R = (p = u.current) === null || p === void 0 ? void 0 : p.parentElement;
185
+ if (u.deadline || u.propertyName === "opacity") {
186
+ const R = (p = i.current) === null || p === void 0 ? void 0 : p.parentElement;
190
187
  (b = c.current) === null || b === void 0 || b.call(c).then(() => {
191
188
  R == null || R.remove();
192
189
  });
193
190
  }
194
191
  return !1;
195
192
  }
196
- }, (l, i) => {
193
+ }, (l, u) => {
197
194
  let {
198
195
  className: p
199
196
  } = l;
200
197
  return /* @__PURE__ */ r.createElement("div", {
201
- ref: A(u, i),
202
- className: D(t, p, {
203
- "wave-quick": G
198
+ ref: I(i, u),
199
+ className: $(t, p, {
200
+ "wave-quick": K
204
201
  }),
205
202
  style: T
206
203
  });
207
204
  });
208
- }, Te = (e, t) => {
205
+ }, Oe = (e, t) => {
209
206
  var n;
210
207
  const {
211
208
  component: o
@@ -214,31 +211,31 @@ const Oe = (e) => {
214
211
  return;
215
212
  const s = document.createElement("div");
216
213
  s.style.position = "absolute", s.style.left = "0px", s.style.top = "0px", e == null || e.insertBefore(s, e == null ? void 0 : e.firstChild);
217
- const u = we();
214
+ const i = Ce();
218
215
  let c = null;
219
216
  function d() {
220
217
  return c;
221
218
  }
222
- c = u(/* @__PURE__ */ r.createElement(Oe, Object.assign({}, t, {
219
+ c = i(/* @__PURE__ */ r.createElement(We, Object.assign({}, t, {
223
220
  target: e,
224
221
  registerUnmount: d
225
222
  })), s);
226
- }, xe = Te, $e = (e, t, n) => {
223
+ }, Te = (e, t, n) => {
227
224
  const {
228
225
  wave: o
229
- } = r.useContext(I), [, s, u] = ue(), c = ce((f) => {
226
+ } = r.useContext(U), [, s, i] = ue(), c = ie((f) => {
230
227
  const a = e.current;
231
228
  if (o != null && o.disabled || !a)
232
229
  return;
233
230
  const m = a.querySelector(`.${j}`) || a, {
234
231
  showEffect: v
235
232
  } = o || {};
236
- (v || xe)(m, {
233
+ (v || Oe)(m, {
237
234
  className: t,
238
235
  token: s,
239
236
  component: n,
240
237
  event: f,
241
- hashId: u
238
+ hashId: i
242
239
  });
243
240
  }), d = r.useRef(null);
244
241
  return (f) => {
@@ -246,36 +243,34 @@ const Oe = (e) => {
246
243
  c(f);
247
244
  });
248
245
  };
249
- }, Le = $e, B = (e) => {
246
+ }, xe = (e) => {
250
247
  const {
251
248
  children: t,
252
249
  disabled: n,
253
250
  component: o
254
251
  } = e, {
255
252
  getPrefixCls: s
256
- } = Z(I), u = ee(null), c = s("wave"), [, d] = Ne(c), h = Le(u, D(c, d), o);
257
- if ($.useEffect(() => {
258
- const a = u.current;
253
+ } = X(U), i = Z(null), c = s("wave"), [, d] = Se(c), h = Te(i, $(c, d), o);
254
+ if (L.useEffect(() => {
255
+ const a = i.current;
259
256
  if (!a || a.nodeType !== 1 || n)
260
257
  return;
261
258
  const m = (v) => {
262
- !oe(v.target) || // No need wave
259
+ !ne(v.target) || // No need wave
263
260
  !a.getAttribute || a.getAttribute("disabled") || a.disabled || a.className.includes("disabled") || a.className.includes("-leave") || h(v);
264
261
  };
265
262
  return a.addEventListener("click", m, !0), () => {
266
263
  a.removeEventListener("click", m, !0);
267
264
  };
268
- }, [n]), !/* @__PURE__ */ $.isValidElement(t))
265
+ }, [n]), !/* @__PURE__ */ L.isValidElement(t))
269
266
  return t ?? null;
270
- const f = le(t) ? A(de(t), u) : u;
271
- return fe(t, {
267
+ const f = ce(t) ? I(le(t), i) : i;
268
+ return de(t, {
272
269
  ref: f
273
270
  });
274
271
  };
275
- process.env.NODE_ENV !== "production" && (B.displayName = "Wave");
276
- const je = B;
272
+ process.env.NODE_ENV !== "production" && (xe.displayName = "Wave");
277
273
  export {
278
274
  j as T,
279
- je as W,
280
- we as g
275
+ xe as W
281
276
  };
@@ -0,0 +1,97 @@
1
+ import * as l from "react";
2
+ import U from "react";
3
+ import { c as P } from "./warning-C63HNL9U.js";
4
+ import { t as X } from "./isVisible-A-IfeFoT.js";
5
+ import { C as Y } from "./index-oK7z6jnz.js";
6
+ import { C as Z, u as ee } from "./Compact-CGY560JF.js";
7
+ function w(e) {
8
+ return ["small", "middle", "large"].includes(e);
9
+ }
10
+ function E(e) {
11
+ return e ? typeof e == "number" && !Number.isNaN(e) : !1;
12
+ }
13
+ const h = /* @__PURE__ */ U.createContext({
14
+ latestIndex: 0
15
+ }), ne = h.Provider, te = (e) => {
16
+ let {
17
+ className: i,
18
+ index: a,
19
+ children: n,
20
+ split: s,
21
+ style: m
22
+ } = e;
23
+ const {
24
+ latestIndex: t
25
+ } = l.useContext(h);
26
+ return n == null ? null : /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement("div", {
27
+ className: i,
28
+ style: m
29
+ }, n), a < t && s && /* @__PURE__ */ l.createElement("span", {
30
+ className: `${i}-split`
31
+ }, s));
32
+ };
33
+ var se = function(e, i) {
34
+ var a = {};
35
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && i.indexOf(n) < 0 && (a[n] = e[n]);
36
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var s = 0, n = Object.getOwnPropertySymbols(e); s < n.length; s++)
37
+ i.indexOf(n[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[s]) && (a[n[s]] = e[n[s]]);
38
+ return a;
39
+ };
40
+ const le = /* @__PURE__ */ l.forwardRef((e, i) => {
41
+ var a, n, s;
42
+ const {
43
+ getPrefixCls: m,
44
+ space: t,
45
+ direction: V
46
+ } = l.useContext(Y), {
47
+ size: c = (a = t == null ? void 0 : t.size) !== null && a !== void 0 ? a : "small",
48
+ align: S,
49
+ className: I,
50
+ rootClassName: k,
51
+ children: A,
52
+ direction: b = "horizontal",
53
+ prefixCls: G,
54
+ split: R,
55
+ style: H,
56
+ wrap: D = !1,
57
+ classNames: p,
58
+ styles: y
59
+ } = e, F = se(e, ["size", "align", "className", "rootClassName", "children", "direction", "prefixCls", "split", "style", "wrap", "classNames", "styles"]), [d, u] = Array.isArray(c) ? c : [c, c], z = w(u), O = w(d), M = E(u), W = E(d), v = X(A, {
60
+ keepEmpty: !0
61
+ }), $ = S === void 0 && b === "horizontal" ? "center" : S, r = m("space", G), [q, B, J] = ee(r), K = P(r, t == null ? void 0 : t.className, B, `${r}-${b}`, {
62
+ [`${r}-rtl`]: V === "rtl",
63
+ [`${r}-align-${$}`]: $,
64
+ [`${r}-gap-row-${u}`]: z,
65
+ [`${r}-gap-col-${d}`]: O
66
+ }, I, k, J), _ = P(`${r}-item`, (n = p == null ? void 0 : p.item) !== null && n !== void 0 ? n : (s = t == null ? void 0 : t.classNames) === null || s === void 0 ? void 0 : s.item);
67
+ let C = 0;
68
+ const L = v.map((o, N) => {
69
+ var g, x;
70
+ o != null && (C = N);
71
+ const T = (o == null ? void 0 : o.key) || `${_}-${N}`;
72
+ return /* @__PURE__ */ l.createElement(te, {
73
+ className: _,
74
+ key: T,
75
+ index: N,
76
+ split: R,
77
+ style: (g = y == null ? void 0 : y.item) !== null && g !== void 0 ? g : (x = t == null ? void 0 : t.styles) === null || x === void 0 ? void 0 : x.item
78
+ }, o);
79
+ }), Q = l.useMemo(() => ({
80
+ latestIndex: C
81
+ }), [C]);
82
+ if (v.length === 0)
83
+ return null;
84
+ const f = {};
85
+ return D && (f.flexWrap = "wrap"), !O && W && (f.columnGap = d), !z && M && (f.rowGap = u), q(/* @__PURE__ */ l.createElement("div", Object.assign({
86
+ ref: i,
87
+ className: K,
88
+ style: Object.assign(Object.assign(Object.assign({}, f), t == null ? void 0 : t.style), H)
89
+ }, F), /* @__PURE__ */ l.createElement(ne, {
90
+ value: Q
91
+ }, L)));
92
+ }), j = le;
93
+ j.Compact = Z;
94
+ process.env.NODE_ENV !== "production" && (j.displayName = "Space");
95
+ export {
96
+ j as S
97
+ };