@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,301 +1,282 @@
1
- import { d as pe } from "../../styled-components.browser.esm-02f500bc.js";
2
- import { TYPE as Z, STATE as D } from "../../constants/index.js";
1
+ import { d as pe } from "../../styled-components.browser.esm-CZ1XM4o4.js";
2
+ import { TYPE as oe, STATE as V } from "../../constants/index.js";
3
3
  import * as s from "react";
4
- import { useContext as te, useMemo as me, useState as ge, useRef as ve } from "react";
5
- import { c as H, a as re } from "../../presets-83ccb923.js";
6
- import { C as Q, t as se, g as be, m as Ce, w as ye, b as ne, v as he, D as xe, q as ie } from "../../index-4003d75b.js";
7
- import { F as X, u as Oe } from "../../context-3b8a39af.js";
8
- import { u as we, i as Ee, a as Ie, I as W, b as Se, T as $e } from "../../TextArea-20825221.js";
9
- import { p as Pe } from "../../pickAttrs-00ba4687.js";
10
- import { g as _e } from "../../useVariants-a0d64298.js";
11
- import { a as ae, b as ze } from "../../Compact-c39ed20d.js";
12
- import { A as le } from "../../AntdIcon-c395a1c4.js";
13
- import { o as Ne } from "../../isVisible-729780f5.js";
14
- import { S as je } from "../../SearchOutlined-a9014e08.js";
15
- import { c as oe } from "../../reactNode-f4391605.js";
16
- import { B as Te } from "../../button-fa1c119c.js";
17
- import "react-dom";
18
- import "../../index-8c8d2d0c.js";
19
- import "../../CloseCircleFilled-ddc51e7e.js";
20
- import "../../ContextIsolator-b09b2c52.js";
21
- import "../../compact-item-b8f85aa6.js";
22
- import "../../index-e2b72ca8.js";
23
- import "../../presetColors-ccf8cb4c.js";
24
- const Me = (e) => {
4
+ import { useContext as ee, useMemo as me, useState as ge, useRef as Ce } from "react";
5
+ import { a as re, c as q } from "../../warning-C63HNL9U.js";
6
+ import { C as Q, v as se, g as be, m as ve, w as xe, b as ne, x as ye, D as he, t as ie } from "../../index-oK7z6jnz.js";
7
+ import { F as X, u as Oe } from "../../context-BMW3aJEf.js";
8
+ import { u as we, i as Ee, a as Pe, I as W, b as $e, T as Ie } from "../../TextArea-DKwCct3i.js";
9
+ import { p as Se } from "../../pickAttrs-B0YTfcV1.js";
10
+ import { g as _e } from "../../useVariants-DvhXfgJY.js";
11
+ import { a as ae, b as ze } from "../../Compact-CGY560JF.js";
12
+ import { I as ue } from "../../AntdIcon-BoLh1dP8.js";
13
+ import { o as Ne } from "../../isVisible-A-IfeFoT.js";
14
+ import { R as je } from "../../SearchOutlined-BP3Z2K6j.js";
15
+ import { c as te } from "../../reactNode-sKPeiqPL.js";
16
+ import { B as Me } from "../../button-CDQgO1OK.js";
17
+ var Re = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { tag: "path", attrs: { d: "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, name: "eye-invisible", theme: "outlined" }, ke = function(o, r) {
18
+ return /* @__PURE__ */ s.createElement(ue, re({}, o, {
19
+ ref: r,
20
+ icon: Re
21
+ }));
22
+ }, le = /* @__PURE__ */ s.forwardRef(ke);
23
+ process.env.NODE_ENV !== "production" && (le.displayName = "EyeInvisibleOutlined");
24
+ var Ae = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, name: "eye", theme: "outlined" }, Be = function(o, r) {
25
+ return /* @__PURE__ */ s.createElement(ue, re({}, o, {
26
+ ref: r,
27
+ icon: Ae
28
+ }));
29
+ }, ce = /* @__PURE__ */ s.forwardRef(Be);
30
+ process.env.NODE_ENV !== "production" && (ce.displayName = "EyeOutlined");
31
+ const Te = (e) => {
25
32
  const {
26
- getPrefixCls: r,
27
- direction: o
28
- } = te(Q), {
29
- prefixCls: t,
30
- className: n
31
- } = e, a = r("input-group", t), d = r("input"), [v, b] = we(d), C = H(a, {
33
+ getPrefixCls: o,
34
+ direction: r
35
+ } = ee(Q), {
36
+ prefixCls: n,
37
+ className: t
38
+ } = e, a = o("input-group", n), b = o("input"), [d, x] = we(b), v = q(a, {
32
39
  [`${a}-lg`]: e.size === "large",
33
40
  [`${a}-sm`]: e.size === "small",
34
41
  [`${a}-compact`]: e.compact,
35
- [`${a}-rtl`]: o === "rtl"
36
- }, b, n), y = te(X), f = me(() => Object.assign(Object.assign({}, y), {
42
+ [`${a}-rtl`]: r === "rtl"
43
+ }, x, t), f = ee(X), p = me(() => Object.assign(Object.assign({}, f), {
37
44
  isFormItemInput: !1
38
- }), [y]);
39
- return process.env.NODE_ENV !== "production" && se("Input.Group").deprecated(!1, "Input.Group", "Space.Compact"), v(/* @__PURE__ */ s.createElement("span", {
40
- className: C,
45
+ }), [f]);
46
+ return process.env.NODE_ENV !== "production" && se("Input.Group").deprecated(!1, "Input.Group", "Space.Compact"), d(/* @__PURE__ */ s.createElement("span", {
47
+ className: v,
41
48
  style: e.style,
42
49
  onMouseEnter: e.onMouseEnter,
43
50
  onMouseLeave: e.onMouseLeave,
44
51
  onFocus: e.onFocus,
45
52
  onBlur: e.onBlur
46
53
  }, /* @__PURE__ */ s.createElement(X.Provider, {
47
- value: f
54
+ value: p
48
55
  }, e.children)));
49
- }, Re = Me, Ae = (e) => {
56
+ }, Ve = (e) => {
50
57
  const {
51
- componentCls: r,
52
- paddingXS: o
58
+ componentCls: o,
59
+ paddingXS: r
53
60
  } = e;
54
61
  return {
55
- [r]: {
62
+ [o]: {
56
63
  display: "inline-flex",
57
64
  alignItems: "center",
58
65
  flexWrap: "nowrap",
59
- columnGap: o,
66
+ columnGap: r,
60
67
  "&-rtl": {
61
68
  direction: "rtl"
62
69
  },
63
- [`${r}-input`]: {
70
+ [`${o}-input`]: {
64
71
  textAlign: "center",
65
72
  paddingInline: e.paddingXXS
66
73
  },
67
74
  // ================= Size =================
68
- [`&${r}-sm ${r}-input`]: {
75
+ [`&${o}-sm ${o}-input`]: {
69
76
  paddingInline: e.calc(e.paddingXXS).div(2).equal()
70
77
  },
71
- [`&${r}-lg ${r}-input`]: {
78
+ [`&${o}-lg ${o}-input`]: {
72
79
  paddingInline: e.paddingXS
73
80
  }
74
81
  }
75
82
  };
76
- }, ke = be(["Input", "OTP"], (e) => {
77
- const r = Ce(e, Ee(e));
78
- return [Ae(r)];
79
- }, Ie);
80
- var Be = globalThis && globalThis.__rest || function(e, r) {
81
- var o = {};
82
- for (var t in e)
83
- Object.prototype.hasOwnProperty.call(e, t) && r.indexOf(t) < 0 && (o[t] = e[t]);
84
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
85
- for (var n = 0, t = Object.getOwnPropertySymbols(e); n < t.length; n++)
86
- r.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (o[t[n]] = e[t[n]]);
87
- return o;
83
+ }, De = be(["Input", "OTP"], (e) => {
84
+ const o = ve(e, Ee(e));
85
+ return [Ve(o)];
86
+ }, Pe);
87
+ var Fe = function(e, o) {
88
+ var r = {};
89
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && o.indexOf(n) < 0 && (r[n] = e[n]);
90
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, n = Object.getOwnPropertySymbols(e); t < n.length; t++)
91
+ o.indexOf(n[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[t]) && (r[n[t]] = e[n[t]]);
92
+ return r;
88
93
  };
89
- const De = /* @__PURE__ */ s.forwardRef((e, r) => {
94
+ const Le = /* @__PURE__ */ s.forwardRef((e, o) => {
90
95
  const {
91
- value: o,
92
- onChange: t,
93
- onActiveChange: n,
96
+ value: r,
97
+ onChange: n,
98
+ onActiveChange: t,
94
99
  index: a,
95
- mask: d
96
- } = e, v = Be(e, ["value", "onChange", "onActiveChange", "index", "mask"]), b = o && typeof d == "string" ? d : o, C = (p) => {
97
- t(a, p.target.value);
98
- }, y = s.useRef(null);
99
- s.useImperativeHandle(r, () => y.current);
100
- const f = () => {
101
- ye(() => {
102
- var p;
103
- const h = (p = y.current) === null || p === void 0 ? void 0 : p.input;
104
- document.activeElement === h && h && h.select();
100
+ mask: b
101
+ } = e, d = Fe(e, ["value", "onChange", "onActiveChange", "index", "mask"]), x = r && typeof b == "string" ? b : r, v = (m) => {
102
+ n(a, m.target.value);
103
+ }, f = s.useRef(null);
104
+ s.useImperativeHandle(o, () => f.current);
105
+ const p = () => {
106
+ xe(() => {
107
+ var m;
108
+ const y = (m = f.current) === null || m === void 0 ? void 0 : m.input;
109
+ document.activeElement === y && y && y.select();
105
110
  });
106
- }, $ = (p) => {
111
+ }, I = (m) => {
107
112
  const {
108
- key: h,
109
- ctrlKey: T,
110
- metaKey: M
111
- } = p;
112
- h === "ArrowLeft" ? n(a - 1) : h === "ArrowRight" ? n(a + 1) : h === "z" && (T || M) && p.preventDefault(), f();
113
- }, I = (p) => {
114
- p.key === "Backspace" && !o && n(a - 1), f();
113
+ key: y,
114
+ ctrlKey: M,
115
+ metaKey: R
116
+ } = m;
117
+ y === "ArrowLeft" ? t(a - 1) : y === "ArrowRight" ? t(a + 1) : y === "z" && (M || R) && m.preventDefault(), p();
118
+ }, P = (m) => {
119
+ m.key === "Backspace" && !r && t(a - 1), p();
115
120
  };
116
121
  return /* @__PURE__ */ s.createElement(W, Object.assign({
117
- type: d === !0 ? "password" : "text"
118
- }, v, {
119
- ref: y,
120
- value: b,
121
- onInput: C,
122
- onFocus: f,
123
- onKeyDown: $,
124
- onKeyUp: I,
125
- onMouseDown: f,
126
- onMouseUp: f
122
+ type: b === !0 ? "password" : "text"
123
+ }, d, {
124
+ ref: f,
125
+ value: x,
126
+ onInput: v,
127
+ onFocus: p,
128
+ onKeyDown: I,
129
+ onKeyUp: P,
130
+ onMouseDown: p,
131
+ onMouseUp: p
127
132
  }));
128
- }), Ve = De;
129
- var Fe = globalThis && globalThis.__rest || function(e, r) {
130
- var o = {};
131
- for (var t in e)
132
- Object.prototype.hasOwnProperty.call(e, t) && r.indexOf(t) < 0 && (o[t] = e[t]);
133
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
134
- for (var n = 0, t = Object.getOwnPropertySymbols(e); n < t.length; n++)
135
- r.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (o[t[n]] = e[t[n]]);
136
- return o;
133
+ });
134
+ var Ke = function(e, o) {
135
+ var r = {};
136
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && o.indexOf(n) < 0 && (r[n] = e[n]);
137
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, n = Object.getOwnPropertySymbols(e); t < n.length; t++)
138
+ o.indexOf(n[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[t]) && (r[n[t]] = e[n[t]]);
139
+ return r;
137
140
  };
138
141
  function U(e) {
139
142
  return (e || "").split("");
140
143
  }
141
- const Le = /* @__PURE__ */ s.forwardRef((e, r) => {
144
+ const Ge = /* @__PURE__ */ s.forwardRef((e, o) => {
142
145
  const {
143
- prefixCls: o,
144
- length: t = 6,
145
- size: n,
146
+ prefixCls: r,
147
+ length: n = 6,
148
+ size: t,
146
149
  defaultValue: a,
147
- value: d,
148
- onChange: v,
149
- formatter: b,
150
- variant: C,
151
- disabled: y,
152
- status: f,
153
- autoFocus: $,
154
- mask: I,
155
- type: p,
156
- onInput: h,
157
- inputMode: T
158
- } = e, M = Fe(e, ["prefixCls", "length", "size", "defaultValue", "value", "onChange", "formatter", "variant", "disabled", "status", "autoFocus", "mask", "type", "onInput", "inputMode"]);
150
+ value: b,
151
+ onChange: d,
152
+ formatter: x,
153
+ variant: v,
154
+ disabled: f,
155
+ status: p,
156
+ autoFocus: I,
157
+ mask: P,
158
+ type: m,
159
+ onInput: y,
160
+ inputMode: M
161
+ } = e, R = Ke(e, ["prefixCls", "length", "size", "defaultValue", "value", "onChange", "formatter", "variant", "disabled", "status", "autoFocus", "mask", "type", "onInput", "inputMode"]);
159
162
  if (process.env.NODE_ENV !== "production") {
160
163
  const i = se("Input.OTP");
161
- process.env.NODE_ENV !== "production" && i(!(typeof I == "string" && I.length > 1), "usage", "`mask` prop should be a single character.");
164
+ process.env.NODE_ENV !== "production" && i(!(typeof P == "string" && P.length > 1), "usage", "`mask` prop should be a single character.");
162
165
  }
163
166
  const {
164
- getPrefixCls: P,
167
+ getPrefixCls: S,
165
168
  direction: _
166
- } = s.useContext(Q), w = P("otp", o), F = Pe(M, {
169
+ } = s.useContext(Q), w = S("otp", r), F = Se(R, {
167
170
  aria: !0,
168
171
  data: !0,
169
172
  attr: !0
170
- }), S = Oe(w), [R, L, A] = ke(w, S), x = ae((i) => n ?? i), z = s.useContext(X), N = _e(z.status, f), k = s.useMemo(() => Object.assign(Object.assign({}, z), {
173
+ }), $ = Oe(w), [k, L, A] = De(w, $), h = ae((i) => t ?? i), z = s.useContext(X), N = _e(z.status, p), B = s.useMemo(() => Object.assign(Object.assign({}, z), {
171
174
  status: N,
172
175
  hasFeedback: !1,
173
176
  feedbackIcon: null
174
177
  }), [z, N]), E = s.useRef(null), O = s.useRef({});
175
- s.useImperativeHandle(r, () => ({
178
+ s.useImperativeHandle(o, () => ({
176
179
  focus: () => {
177
180
  var i;
178
181
  (i = O.current[0]) === null || i === void 0 || i.focus();
179
182
  },
180
183
  blur: () => {
181
184
  var i;
182
- for (let c = 0; c < t; c += 1)
183
- (i = O.current[c]) === null || i === void 0 || i.blur();
185
+ for (let l = 0; l < n; l += 1)
186
+ (i = O.current[l]) === null || i === void 0 || i.blur();
184
187
  },
185
188
  nativeElement: E.current
186
189
  }));
187
- const K = (i) => b ? b(i) : i, [G, q] = s.useState(U(K(a || "")));
190
+ const K = (i) => x ? x(i) : i, [G, H] = s.useState(U(K(a || "")));
188
191
  s.useEffect(() => {
189
- d !== void 0 && q(U(d));
190
- }, [d]);
192
+ b !== void 0 && H(U(b));
193
+ }, [b]);
191
194
  const Y = ne((i) => {
192
- q(i), h && h(i), v && i.length === t && i.every((c) => c) && i.some((c, u) => G[u] !== c) && v(i.join(""));
193
- }), J = ne((i, c) => {
194
- let u = he(G);
195
- for (let g = 0; g < i; g += 1)
196
- u[g] || (u[g] = "");
197
- c.length <= 1 ? u[i] = c : u = u.slice(0, i).concat(U(c)), u = u.slice(0, t);
198
- for (let g = u.length - 1; g >= 0 && !u[g]; g -= 1)
199
- u.pop();
200
- const B = K(u.map((g) => g || " ").join(""));
201
- return u = U(B).map((g, ee) => g === " " && !u[ee] ? u[ee] : g), u;
202
- }), l = (i, c) => {
203
- var u;
204
- const B = J(i, c), g = Math.min(i + c.length, t - 1);
205
- g !== i && B[i] !== void 0 && ((u = O.current[g]) === null || u === void 0 || u.focus()), Y(B);
206
- }, m = (i) => {
195
+ H(i), y && y(i), d && i.length === n && i.every((l) => l) && i.some((l, c) => G[c] !== l) && d(i.join(""));
196
+ }), J = ne((i, l) => {
197
+ let c = ye(G);
198
+ for (let C = 0; C < i; C += 1)
199
+ c[C] || (c[C] = "");
200
+ l.length <= 1 ? c[i] = l : c = c.slice(0, i).concat(U(l)), c = c.slice(0, n);
201
+ for (let C = c.length - 1; C >= 0 && !c[C]; C -= 1)
202
+ c.pop();
203
+ const T = K(c.map((C) => C || " ").join(""));
204
+ return c = U(T).map((C, Z) => C === " " && !c[Z] ? c[Z] : C), c;
205
+ }), u = (i, l) => {
207
206
  var c;
208
- (c = O.current[i]) === null || c === void 0 || c.focus();
207
+ const T = J(i, l), C = Math.min(i + l.length, n - 1);
208
+ C !== i && T[i] !== void 0 && ((c = O.current[C]) === null || c === void 0 || c.focus()), Y(T);
209
+ }, g = (i) => {
210
+ var l;
211
+ (l = O.current[i]) === null || l === void 0 || l.focus();
209
212
  }, j = {
210
- variant: C,
211
- disabled: y,
213
+ variant: v,
214
+ disabled: f,
212
215
  status: N,
213
- mask: I,
214
- type: p,
215
- inputMode: T
216
+ mask: P,
217
+ type: m,
218
+ inputMode: M
216
219
  };
217
- return R(/* @__PURE__ */ s.createElement("div", Object.assign({}, F, {
220
+ return k(/* @__PURE__ */ s.createElement("div", Object.assign({}, F, {
218
221
  ref: E,
219
- className: H(w, {
220
- [`${w}-sm`]: x === "small",
221
- [`${w}-lg`]: x === "large",
222
+ className: q(w, {
223
+ [`${w}-sm`]: h === "small",
224
+ [`${w}-lg`]: h === "large",
222
225
  [`${w}-rtl`]: _ === "rtl"
223
226
  }, A, L)
224
227
  }), /* @__PURE__ */ s.createElement(X.Provider, {
225
- value: k
228
+ value: B
226
229
  }, Array.from({
227
- length: t
228
- }).map((i, c) => {
229
- const u = `otp-${c}`, B = G[c] || "";
230
- return /* @__PURE__ */ s.createElement(Ve, Object.assign({
231
- ref: (g) => {
232
- O.current[c] = g;
230
+ length: n
231
+ }).map((i, l) => {
232
+ const c = `otp-${l}`, T = G[l] || "";
233
+ return /* @__PURE__ */ s.createElement(Le, Object.assign({
234
+ ref: (C) => {
235
+ O.current[l] = C;
233
236
  },
234
- key: u,
235
- index: c,
236
- size: x,
237
+ key: c,
238
+ index: l,
239
+ size: h,
237
240
  htmlSize: 1,
238
241
  className: `${w}-input`,
239
- onChange: l,
240
- value: B,
241
- onActiveChange: m,
242
- autoFocus: c === 0 && $
242
+ onChange: u,
243
+ value: T,
244
+ onActiveChange: g,
245
+ autoFocus: l === 0 && I
243
246
  }, j));
244
247
  }))));
245
- }), Ke = Le;
246
- var Ge = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { tag: "path", attrs: { d: "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, name: "eye-invisible", theme: "outlined" };
247
- const qe = Ge;
248
- var Ue = function(r, o) {
249
- return /* @__PURE__ */ s.createElement(le, re({}, r, {
250
- ref: o,
251
- icon: qe
252
- }));
253
- }, ce = /* @__PURE__ */ s.forwardRef(Ue);
254
- process.env.NODE_ENV !== "production" && (ce.displayName = "EyeInvisibleOutlined");
255
- const Xe = ce;
256
- var He = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, name: "eye", theme: "outlined" };
257
- const Qe = He;
258
- var We = function(r, o) {
259
- return /* @__PURE__ */ s.createElement(le, re({}, r, {
260
- ref: o,
261
- icon: Qe
262
- }));
263
- }, ue = /* @__PURE__ */ s.forwardRef(We);
264
- process.env.NODE_ENV !== "production" && (ue.displayName = "EyeOutlined");
265
- const Ye = ue;
266
- var Je = globalThis && globalThis.__rest || function(e, r) {
267
- var o = {};
268
- for (var t in e)
269
- Object.prototype.hasOwnProperty.call(e, t) && r.indexOf(t) < 0 && (o[t] = e[t]);
270
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
271
- for (var n = 0, t = Object.getOwnPropertySymbols(e); n < t.length; n++)
272
- r.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (o[t[n]] = e[t[n]]);
273
- return o;
248
+ });
249
+ var He = function(e, o) {
250
+ var r = {};
251
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && o.indexOf(n) < 0 && (r[n] = e[n]);
252
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, n = Object.getOwnPropertySymbols(e); t < n.length; t++)
253
+ o.indexOf(n[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[t]) && (r[n[t]] = e[n[t]]);
254
+ return r;
274
255
  };
275
- const Ze = (e) => e ? /* @__PURE__ */ s.createElement(Ye, null) : /* @__PURE__ */ s.createElement(Xe, null), et = {
256
+ const Ue = (e) => e ? /* @__PURE__ */ s.createElement(ce, null) : /* @__PURE__ */ s.createElement(le, null), Xe = {
276
257
  click: "onClick",
277
258
  hover: "onMouseOver"
278
- }, de = /* @__PURE__ */ s.forwardRef((e, r) => {
259
+ }, de = /* @__PURE__ */ s.forwardRef((e, o) => {
279
260
  const {
280
- disabled: o,
281
- action: t = "click",
282
- visibilityToggle: n = !0,
283
- iconRender: a = Ze
284
- } = e, d = s.useContext(xe), v = o ?? d, b = typeof n == "object" && n.visible !== void 0, [C, y] = ge(() => b ? n.visible : !1), f = ve(null);
261
+ disabled: r,
262
+ action: n = "click",
263
+ visibilityToggle: t = !0,
264
+ iconRender: a = Ue
265
+ } = e, b = s.useContext(he), d = r ?? b, x = typeof t == "object" && t.visible !== void 0, [v, f] = ge(() => x ? t.visible : !1), p = Ce(null);
285
266
  s.useEffect(() => {
286
- b && y(n.visible);
287
- }, [b, n]);
288
- const $ = Se(f), I = () => {
289
- var x;
290
- if (v)
267
+ x && f(t.visible);
268
+ }, [x, t]);
269
+ const I = $e(p), P = () => {
270
+ var h;
271
+ if (d)
291
272
  return;
292
- C && $();
293
- const z = !C;
294
- y(z), typeof n == "object" && ((x = n.onVisibleChange) === null || x === void 0 || x.call(n, z));
295
- }, p = (x) => {
296
- const z = et[t] || "", N = a(C), k = {
297
- [z]: I,
298
- className: `${x}-icon`,
273
+ v && I();
274
+ const z = !v;
275
+ f(z), typeof t == "object" && ((h = t.onVisibleChange) === null || h === void 0 || h.call(t, z));
276
+ }, m = (h) => {
277
+ const z = Xe[n] || "", N = a(v), B = {
278
+ [z]: P,
279
+ className: `${h}-icon`,
299
280
  key: "passwordIcon",
300
281
  onMouseDown: (E) => {
301
282
  E.preventDefault();
@@ -304,139 +285,136 @@ const Ze = (e) => e ? /* @__PURE__ */ s.createElement(Ye, null) : /* @__PURE__ *
304
285
  E.preventDefault();
305
286
  }
306
287
  };
307
- return /* @__PURE__ */ s.cloneElement(/* @__PURE__ */ s.isValidElement(N) ? N : /* @__PURE__ */ s.createElement("span", null, N), k);
288
+ return /* @__PURE__ */ s.cloneElement(/* @__PURE__ */ s.isValidElement(N) ? N : /* @__PURE__ */ s.createElement("span", null, N), B);
308
289
  }, {
309
- className: h,
310
- prefixCls: T,
311
- inputPrefixCls: M,
312
- size: P
313
- } = e, _ = Je(e, ["className", "prefixCls", "inputPrefixCls", "size"]), {
290
+ className: y,
291
+ prefixCls: M,
292
+ inputPrefixCls: R,
293
+ size: S
294
+ } = e, _ = He(e, ["className", "prefixCls", "inputPrefixCls", "size"]), {
314
295
  getPrefixCls: w
315
- } = s.useContext(Q), F = w("input", M), S = w("input-password", T), R = n && p(S), L = H(S, h, {
316
- [`${S}-${P}`]: !!P
296
+ } = s.useContext(Q), F = w("input", R), $ = w("input-password", M), k = t && m($), L = q($, y, {
297
+ [`${$}-${S}`]: !!S
317
298
  }), A = Object.assign(Object.assign({}, Ne(_, ["suffix", "iconRender", "visibilityToggle"])), {
318
- type: C ? "text" : "password",
299
+ type: v ? "text" : "password",
319
300
  className: L,
320
301
  prefixCls: F,
321
- suffix: R
302
+ suffix: k
322
303
  });
323
- return P && (A.size = P), /* @__PURE__ */ s.createElement(W, Object.assign({
324
- ref: ie(r, f)
304
+ return S && (A.size = S), /* @__PURE__ */ s.createElement(W, Object.assign({
305
+ ref: ie(o, p)
325
306
  }, A));
326
307
  });
327
308
  process.env.NODE_ENV !== "production" && (de.displayName = "Input.Password");
328
- const tt = de;
329
- var nt = globalThis && globalThis.__rest || function(e, r) {
330
- var o = {};
331
- for (var t in e)
332
- Object.prototype.hasOwnProperty.call(e, t) && r.indexOf(t) < 0 && (o[t] = e[t]);
333
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
334
- for (var n = 0, t = Object.getOwnPropertySymbols(e); n < t.length; n++)
335
- r.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (o[t[n]] = e[t[n]]);
336
- return o;
309
+ var qe = function(e, o) {
310
+ var r = {};
311
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && o.indexOf(n) < 0 && (r[n] = e[n]);
312
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, n = Object.getOwnPropertySymbols(e); t < n.length; t++)
313
+ o.indexOf(n[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[t]) && (r[n[t]] = e[n[t]]);
314
+ return r;
337
315
  };
338
- const fe = /* @__PURE__ */ s.forwardRef((e, r) => {
316
+ const fe = /* @__PURE__ */ s.forwardRef((e, o) => {
339
317
  const {
340
- prefixCls: o,
341
- inputPrefixCls: t,
342
- className: n,
318
+ prefixCls: r,
319
+ inputPrefixCls: n,
320
+ className: t,
343
321
  size: a,
344
- suffix: d,
345
- enterButton: v = !1,
346
- addonAfter: b,
347
- loading: C,
348
- disabled: y,
349
- onSearch: f,
350
- onChange: $,
351
- onCompositionStart: I,
352
- onCompositionEnd: p
353
- } = e, h = nt(e, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"]), {
354
- getPrefixCls: T,
355
- direction: M
356
- } = s.useContext(Q), P = s.useRef(!1), _ = T("input-search", o), w = T("input", t), {
322
+ suffix: b,
323
+ enterButton: d = !1,
324
+ addonAfter: x,
325
+ loading: v,
326
+ disabled: f,
327
+ onSearch: p,
328
+ onChange: I,
329
+ onCompositionStart: P,
330
+ onCompositionEnd: m
331
+ } = e, y = qe(e, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"]), {
332
+ getPrefixCls: M,
333
+ direction: R
334
+ } = s.useContext(Q), S = s.useRef(!1), _ = M("input-search", r), w = M("input", n), {
357
335
  compactSize: F
358
- } = ze(_, M), S = ae((l) => {
359
- var m;
360
- return (m = a ?? F) !== null && m !== void 0 ? m : l;
361
- }), R = s.useRef(null), L = (l) => {
362
- l != null && l.target && l.type === "click" && f && f(l.target.value, l, {
336
+ } = ze(_, R), $ = ae((u) => {
337
+ var g;
338
+ return (g = a ?? F) !== null && g !== void 0 ? g : u;
339
+ }), k = s.useRef(null), L = (u) => {
340
+ u != null && u.target && u.type === "click" && p && p(u.target.value, u, {
363
341
  source: "clear"
364
- }), $ == null || $(l);
365
- }, A = (l) => {
366
- var m;
367
- document.activeElement === ((m = R.current) === null || m === void 0 ? void 0 : m.input) && l.preventDefault();
368
- }, x = (l) => {
369
- var m, j;
370
- f && f((j = (m = R.current) === null || m === void 0 ? void 0 : m.input) === null || j === void 0 ? void 0 : j.value, l, {
342
+ }), I == null || I(u);
343
+ }, A = (u) => {
344
+ var g;
345
+ document.activeElement === ((g = k.current) === null || g === void 0 ? void 0 : g.input) && u.preventDefault();
346
+ }, h = (u) => {
347
+ var g, j;
348
+ p && p((j = (g = k.current) === null || g === void 0 ? void 0 : g.input) === null || j === void 0 ? void 0 : j.value, u, {
371
349
  source: "input"
372
350
  });
373
- }, z = (l) => {
374
- P.current || C || x(l);
375
- }, N = typeof v == "boolean" ? /* @__PURE__ */ s.createElement(je, null) : null, k = `${_}-button`;
351
+ }, z = (u) => {
352
+ S.current || v || h(u);
353
+ }, N = typeof d == "boolean" ? /* @__PURE__ */ s.createElement(je, null) : null, B = `${_}-button`;
376
354
  let E;
377
- const O = v || {}, K = O.type && O.type.__ANT_BUTTON === !0;
378
- K || O.type === "button" ? E = oe(O, Object.assign({
355
+ const O = d || {}, K = O.type && O.type.__ANT_BUTTON === !0;
356
+ K || O.type === "button" ? E = te(O, Object.assign({
379
357
  onMouseDown: A,
380
- onClick: (l) => {
381
- var m, j;
382
- (j = (m = O == null ? void 0 : O.props) === null || m === void 0 ? void 0 : m.onClick) === null || j === void 0 || j.call(m, l), x(l);
358
+ onClick: (u) => {
359
+ var g, j;
360
+ (j = (g = O == null ? void 0 : O.props) === null || g === void 0 ? void 0 : g.onClick) === null || j === void 0 || j.call(g, u), h(u);
383
361
  },
384
362
  key: "enterButton"
385
363
  }, K ? {
386
- className: k,
387
- size: S
388
- } : {})) : E = /* @__PURE__ */ s.createElement(Te, {
389
- className: k,
390
- type: v ? "primary" : void 0,
391
- size: S,
392
- disabled: y,
364
+ className: B,
365
+ size: $
366
+ } : {})) : E = /* @__PURE__ */ s.createElement(Me, {
367
+ className: B,
368
+ type: d ? "primary" : void 0,
369
+ size: $,
370
+ disabled: f,
393
371
  key: "enterButton",
394
372
  onMouseDown: A,
395
- onClick: x,
396
- loading: C,
373
+ onClick: h,
374
+ loading: v,
397
375
  icon: N
398
- }, v), b && (E = [E, oe(b, {
376
+ }, d), x && (E = [E, te(x, {
399
377
  key: "addonAfter"
400
378
  })]);
401
- const G = H(_, {
402
- [`${_}-rtl`]: M === "rtl",
403
- [`${_}-${S}`]: !!S,
404
- [`${_}-with-button`]: !!v
405
- }, n), q = Object.assign(Object.assign({}, h), {
379
+ const G = q(_, {
380
+ [`${_}-rtl`]: R === "rtl",
381
+ [`${_}-${$}`]: !!$,
382
+ [`${_}-with-button`]: !!d
383
+ }, t), H = Object.assign(Object.assign({}, y), {
406
384
  className: G,
407
385
  prefixCls: w,
408
386
  type: "search"
409
- }), Y = (l) => {
410
- P.current = !0, I == null || I(l);
411
- }, J = (l) => {
412
- P.current = !1, p == null || p(l);
387
+ }), Y = (u) => {
388
+ S.current = !0, P == null || P(u);
389
+ }, J = (u) => {
390
+ S.current = !1, m == null || m(u);
413
391
  };
414
392
  return /* @__PURE__ */ s.createElement(W, Object.assign({
415
- ref: ie(R, r),
393
+ ref: ie(k, o),
416
394
  onPressEnter: z
417
- }, q, {
418
- size: S,
395
+ }, H, {
396
+ size: $,
419
397
  onCompositionStart: Y,
420
398
  onCompositionEnd: J,
421
399
  addonAfter: E,
422
- suffix: d,
400
+ suffix: b,
423
401
  onChange: L,
424
- disabled: y
402
+ disabled: f
425
403
  }));
426
404
  });
427
405
  process.env.NODE_ENV !== "production" && (fe.displayName = "Search");
428
- const ot = fe, V = W;
429
- V.Group = Re;
430
- V.Search = ot;
431
- V.TextArea = $e;
432
- V.Password = tt;
433
- V.OTP = Ke;
434
- const rt = V, st = (e, r, o) => {
435
- const t = {
436
- color: e[Z.secondary].active.color,
437
- borderColor: e[Z.secondary].active.borderColor,
438
- ringColor: e[r].focussed.ringColor
439
- }, n = {
406
+ const D = W;
407
+ D.Group = Te;
408
+ D.Search = fe;
409
+ D.TextArea = Ie;
410
+ D.Password = de;
411
+ D.OTP = Ge;
412
+ const Qe = (e, o, r) => {
413
+ const n = {
414
+ color: e.inputs.onsurface.active,
415
+ borderColor: e[oe.secondary].active.borderColor,
416
+ ringColor: e[o].focussed.ringColor
417
+ }, t = {
440
418
  color: e.status.success.default,
441
419
  borderColor: e.status.success.default,
442
420
  ringColor: e.status.success.ringColor
@@ -444,20 +422,20 @@ const rt = V, st = (e, r, o) => {
444
422
  color: e.status.error.default,
445
423
  borderColor: e.status.error.default,
446
424
  ringColor: e.status.error.ringColor
447
- }, d = o !== D.error && o !== D.success && o !== D.filled ? {
425
+ }, b = r !== V.error && r !== V.success && r !== V.filled ? {
448
426
  color: e.inputs.onsurface.active,
449
427
  backgroundColor: e.inputs.surface.active,
450
428
  borderColor: e.inputs.surface.border,
451
- ringColor: e[r][o].ringColor
429
+ ringColor: e[o][r].ringColor
452
430
  } : null;
453
431
  return {
454
- filled: t,
432
+ filled: n,
455
433
  error: a,
456
- success: n,
457
- themeState: d
458
- }[((y) => [D.filled, D.error, D.success].includes(y) ? y : "themeState")(o)];
459
- }, it = ({ colors: e, borderRadius: r }, o, t, n, a) => {
460
- const d = st(e, o, t), v = (b, C) => C && !b ? `${r.BorderRadiusMd}px 0px 0px ${r.BorderRadiusMd}px` : b && !C ? `0px ${r.BorderRadiusMd}px ${r.BorderRadiusMd}px 0px` : "0px";
434
+ success: t,
435
+ themeState: b
436
+ }[((f) => [V.filled, V.error, V.success].includes(f) ? f : "themeState")(r)];
437
+ }, We = ({ colors: e, borderRadius: o, components: r }, n, t, a, b) => {
438
+ const d = Qe(e, n, t), x = (v, f) => f && !v ? `${o.BorderRadiusMd}px 0px 0px ${o.BorderRadiusMd}px` : v && !f ? `0px ${o.BorderRadiusMd}px ${o.BorderRadiusMd}px 0px` : "0px";
461
439
  return `
462
440
  &.ant-input {
463
441
  font-family: 'Inter', sans-serif;
@@ -470,21 +448,21 @@ const rt = V, st = (e, r, o) => {
470
448
  outline: none;
471
449
  color: ${d.color};
472
450
  box-shadow: none;
473
- border-color: ${e[o].focussed.borderColor};
451
+ border-color: ${e[n].focussed.borderColor};
474
452
  }
475
453
  }
476
454
 
477
455
  .ant-input-group:focus-within {
478
456
  outline: none;
479
- box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[o].focussed.ringColor};
480
- border-radius: ${r.BorderRadiusMd}px;
457
+ box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[n].focussed.ringColor};
458
+ border-radius: ${o.BorderRadiusMd}px;
481
459
  transition: box-shadow 0.2s ease-in-out;
482
460
 
483
461
  /* Hide focus styles on inner input when parent is focused */
484
462
  .ant-input:focus-within {
485
463
  box-shadow: none;
486
464
  border-radius: 0;
487
- border-radius: ${v(n, a)};
465
+ border-radius: ${x(a, b)};
488
466
  border-color: #ddd;
489
467
  }
490
468
  }
@@ -495,14 +473,14 @@ const rt = V, st = (e, r, o) => {
495
473
  .ant-input-group .ant-input:focus-within {
496
474
  outline: none;
497
475
  box-shadow: none;
498
- border-color: ${e[o].focussed.borderColor};
476
+ border-color: ${e[n].focussed.borderColor};
499
477
  }
500
478
 
501
479
  /* Single focus ring on group */
502
480
  .ant-input-group:focus-within {
503
481
  outline: none;
504
- box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[o].focussed.ringColor};
505
- border-radius: ${r.BorderRadiusMd}px;
482
+ box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[n].focussed.ringColor};
483
+ border-radius: ${o.BorderRadiusMd}px;
506
484
  transition: box-shadow 0.2s ease-in-out;
507
485
  }
508
486
 
@@ -510,33 +488,42 @@ const rt = V, st = (e, r, o) => {
510
488
  &:not(.ant-input-group):focus-visible {
511
489
  outline: none;
512
490
  color: ${d.color};
513
- box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[o].focussed.ringColor};
514
- border-radius: ${r.BorderRadiusMd}px;
515
- border-color: ${e[o].focussed.borderColor};
491
+ box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[n].focussed.ringColor};
492
+ border-radius: ${o.BorderRadiusMd}px;
493
+ border-color: ${e[n].focussed.borderColor};
516
494
  transition: box-shadow 0.2s ease-in-out;
517
495
  }
518
496
 
519
497
  &:not(.ant-input-group .ant-input):focus-visible {
520
498
  outline: none;
521
499
  color: ${d.color};
522
- box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[o].focussed.ringColor};
523
- border-radius: ${r.BorderRadiusMd}px;
524
- border-color: ${e[o].focussed.borderColor};
500
+ box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[n].focussed.ringColor};
501
+ border-radius: ${o.BorderRadiusMd}px;
502
+ border-color: ${e[n].focussed.borderColor};
525
503
  transition: box-shadow 0.2s ease-in-out;
526
- }
504
+ }
505
+
506
+ &.ant-input-group-wrapper {
507
+ .ant-input-group-addon {
508
+ padding-left: ${r.input.suffixPrefixHorPadding};
509
+ padding-right: ${r.input.suffixPrefixHorPadding};
510
+ padding-top: ${r.input.suffixPrefixVerPadding};
511
+ padding-bottom: ${r.input.suffixPrefixVerPadding};
512
+ }
513
+ }
527
514
  `;
528
- }, _t = pe(rt)`
529
- ${({ theme: e, state: r, type: o = Z.primary, ...t }) => {
530
- const n = !!t.addonBefore, a = !!t.addonAfter;
531
- return it(
515
+ }, pn = pe(D)`
516
+ ${({ theme: e, state: o, type: r = oe.primary, ...n }) => {
517
+ const t = !!n.addonBefore, a = !!n.addonAfter;
518
+ return We(
532
519
  e,
533
- o,
534
520
  r,
535
- n,
521
+ o,
522
+ t,
536
523
  a
537
524
  );
538
525
  }}
539
526
  `;
540
527
  export {
541
- _t as Input
528
+ pn as Input
542
529
  };