@gobolt/genesis 0.0.7 → 0.0.8

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 (258) hide show
  1. package/README.md +8 -2
  2. package/dist/AntdIcon-c395a1c4.js +204 -0
  3. package/dist/CheckOutlined-52d9ac25.js +29 -0
  4. package/dist/{CloseCircleFilled-ZIY-u-27.js → CloseCircleFilled-ddc51e7e.js} +11 -8
  5. package/dist/CloseOutlined-14b8bba1.js +16 -0
  6. package/dist/Compact-c39ed20d.js +179 -0
  7. package/dist/ContextIsolator-b09b2c52.js +20 -0
  8. package/dist/DownOutlined-64a4732a.js +206 -0
  9. package/dist/EllipsisOutlined-60122660.js +1115 -0
  10. package/dist/{ExclamationCircleFilled-BICVVQIg.js → ExclamationCircleFilled-23ef9812.js} +22 -16
  11. package/dist/InfoCircleFilled-c5f90c20.js +16 -0
  12. package/dist/Overflow-a570fa69.js +361 -0
  13. package/dist/RightOutlined-83515eb4.js +16 -0
  14. package/dist/SearchOutlined-a9014e08.js +16 -0
  15. package/dist/{TextArea-3MOYYuAQ.js → TextArea-20825221.js} +597 -582
  16. package/dist/{button-BNV2qdrP.js → button-fa1c119c.js} +287 -280
  17. package/dist/collapse-345bc884.js +20 -0
  18. package/dist/compact-item-b8f85aa6.js +75 -0
  19. package/dist/components/Badge/Badge.d.ts +6 -0
  20. package/dist/components/Badge/Badge.js +102 -0
  21. package/dist/components/Badge/__stories__/Badge.stories.d.ts +13 -0
  22. package/dist/components/Badge/__tests__/Badge.test.js +72 -0
  23. package/dist/components/Badge/icons/ASN.d.ts +2 -0
  24. package/dist/components/Badge/icons/ASN.js +23 -0
  25. package/dist/components/Badge/icons/Appointment.d.ts +2 -0
  26. package/dist/components/Badge/icons/Appointment.js +23 -0
  27. package/dist/components/Badge/icons/Inventory.d.ts +2 -0
  28. package/dist/components/Badge/icons/Inventory.js +23 -0
  29. package/dist/components/Badge/icons/Parcel.d.ts +2 -0
  30. package/dist/components/Badge/icons/Parcel.js +23 -0
  31. package/dist/components/Badge/icons/Product.d.ts +2 -0
  32. package/dist/components/Badge/icons/Product.js +23 -0
  33. package/dist/components/Badge/icons/Route.d.ts +2 -0
  34. package/dist/components/Badge/icons/Route.js +23 -0
  35. package/dist/components/Badge/icons/Shipment.d.ts +2 -0
  36. package/dist/components/Badge/icons/Shipment.js +23 -0
  37. package/dist/components/Badge/icons/ShoppingCart.d.ts +2 -0
  38. package/dist/components/Badge/icons/ShoppingCart.js +23 -0
  39. package/dist/components/Badge/icons/System.d.ts +2 -0
  40. package/dist/components/Badge/icons/System.js +23 -0
  41. package/dist/components/Badge/index.d.ts +2 -0
  42. package/dist/components/Badge/index.js +23 -0
  43. package/dist/components/Badge/styles.d.ts +3 -0
  44. package/dist/components/Badge/styles.js +35 -0
  45. package/dist/components/Breadcrumb/Breadcrumb.d.ts +8 -0
  46. package/dist/components/Breadcrumb/Breadcrumb.js +27 -0
  47. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +8 -0
  48. package/dist/components/Breadcrumb/Breadcrumb.types.js +1 -0
  49. package/dist/components/Breadcrumb/__stories__/Breadcrumb.stories.d.ts +10 -0
  50. package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +70 -0
  51. package/dist/components/Breadcrumb/index.d.ts +3 -0
  52. package/dist/components/Breadcrumb/index.js +27 -0
  53. package/dist/components/Breadcrumb/styles.d.ts +23 -0
  54. package/dist/components/Breadcrumb/styles.js +2457 -0
  55. package/dist/components/Button/Button.js +42 -0
  56. package/dist/components/Button/__tests__/Button.test.js +61 -0
  57. package/dist/components/Button/index.js +22 -0
  58. package/dist/components/{atoms/button → Button}/styles.js +30 -19
  59. package/dist/components/{atoms/checkbox → Checkbox}/Checkbox.d.ts +2 -1
  60. package/dist/components/Checkbox/Checkbox.js +70 -0
  61. package/dist/components/Checkbox/__tests__/Checkbox.test.js +64 -0
  62. package/dist/components/Checkbox/index.js +49 -0
  63. package/dist/components/{atoms/checkbox → Checkbox}/styles.d.ts +1 -3
  64. package/dist/components/{atoms/checkbox → Checkbox}/styles.js +165 -157
  65. package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +72 -0
  66. package/dist/components/ErrorBoundaryFallback/index.js +51 -0
  67. package/dist/components/ErrorBoundaryFallback/styles.d.ts +3 -0
  68. package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/styles.js +38 -34
  69. package/dist/components/{molecules/form → Form}/Form.d.ts +2 -4
  70. package/dist/components/Form/Form.js +49 -0
  71. package/dist/components/Form/__stories__/FormStory.js +130 -0
  72. package/dist/components/Form/index.js +48 -0
  73. package/dist/components/{atoms/input → Input}/Input.d.ts +1 -3
  74. package/dist/components/Input/Input.js +42 -0
  75. package/dist/components/{atoms/input → Input}/__stories__/Input.stories.d.ts +5 -1
  76. package/dist/components/Input/__tests__/Input.test.d.ts +1 -0
  77. package/dist/components/Input/__tests__/Input.test.js +69 -0
  78. package/dist/components/Input/index.js +31 -0
  79. package/dist/components/{atoms/input → Input}/styles.d.ts +2 -3
  80. package/dist/components/Input/styles.js +542 -0
  81. package/dist/components/Message/Message.d.ts +13 -0
  82. package/dist/components/Message/Message.js +105 -0
  83. package/dist/components/Message/__stories__/Message.stories.d.ts +15 -0
  84. package/dist/components/Message/__tests__/Message.test.d.ts +1 -0
  85. package/dist/components/Message/__tests__/Message.test.js +88 -0
  86. package/dist/components/Message/index.d.ts +2 -0
  87. package/dist/components/Message/index.js +50 -0
  88. package/dist/components/Message/styles.d.ts +5 -0
  89. package/dist/components/Message/styles.js +35 -0
  90. package/dist/components/Notification/Notification.d.ts +16 -0
  91. package/dist/components/Notification/Notification.js +1436 -0
  92. package/dist/components/Notification/__stories__/Notification.stories.d.ts +10 -0
  93. package/dist/components/Notification/__tests__/Notification.test.d.ts +1 -0
  94. package/dist/components/Notification/__tests__/Notification.test.js +76 -0
  95. package/dist/components/Notification/index.d.ts +2 -0
  96. package/dist/components/Notification/index.js +61 -0
  97. package/dist/components/Notification/styles.d.ts +6 -0
  98. package/dist/components/Notification/styles.js +49 -0
  99. package/dist/components/Radio/Radio.d.ts +14 -0
  100. package/dist/components/Radio/Radio.js +114 -0
  101. package/dist/components/Radio/RadioGroup.d.ts +12 -0
  102. package/dist/components/Radio/RadioGroup.js +86 -0
  103. package/dist/components/Radio/__stories__/RadioGroup.stories.d.ts +9 -0
  104. package/dist/components/Radio/__tests__/RadioGroup.test.d.ts +1 -0
  105. package/dist/components/Radio/__tests__/RadioGroup.test.js +85 -0
  106. package/dist/components/Radio/index.d.ts +2 -0
  107. package/dist/components/Radio/index.js +58 -0
  108. package/dist/components/Radio/states/RadioChecked.d.ts +2 -0
  109. package/dist/components/Radio/states/RadioChecked.js +18 -0
  110. package/dist/components/Radio/states/RadioCheckedDisabled.d.ts +2 -0
  111. package/dist/components/Radio/states/RadioCheckedDisabled.js +18 -0
  112. package/dist/components/Radio/states/RadioCheckedFocussed.d.ts +2 -0
  113. package/dist/components/Radio/states/RadioCheckedFocussed.js +30 -0
  114. package/dist/components/Radio/states/RadioCheckedHover.d.ts +2 -0
  115. package/dist/components/Radio/states/RadioCheckedHover.js +18 -0
  116. package/dist/components/Radio/states/RadioUnchecked.d.ts +2 -0
  117. package/dist/components/Radio/states/RadioUnchecked.js +15 -0
  118. package/dist/components/Radio/states/RadioUncheckedDisabled.d.ts +2 -0
  119. package/dist/components/Radio/states/RadioUncheckedDisabled.js +15 -0
  120. package/dist/components/Radio/states/RadioUncheckedFocussed.d.ts +2 -0
  121. package/dist/components/Radio/states/RadioUncheckedFocussed.js +29 -0
  122. package/dist/components/Radio/states/RadioUncheckedHover.d.ts +2 -0
  123. package/dist/components/Radio/states/RadioUncheckedHover.js +18 -0
  124. package/dist/components/{atoms/select → Select}/Select.d.ts +1 -1
  125. package/dist/components/Select/Select.js +48 -0
  126. package/dist/components/{atoms/select → Select}/__stories__/Select.stories.d.ts +3 -1
  127. package/dist/components/Select/__tests__/Select.test.d.ts +1 -0
  128. package/dist/components/Select/__tests__/Select.test.js +101 -0
  129. package/dist/components/Select/index.js +30 -0
  130. package/dist/components/{atoms/select → Select}/styles.d.ts +4 -1
  131. package/dist/components/Select/styles.js +3723 -0
  132. package/dist/components/Toast/Toast.d.ts +14 -0
  133. package/dist/components/Toast/Toast.js +48 -0
  134. package/dist/components/Toast/__stories__/Toast.stories.d.ts +15 -0
  135. package/dist/components/Toast/__tests__/Toast.test.d.ts +1 -0
  136. package/dist/components/Toast/__tests__/Toast.test.js +63 -0
  137. package/dist/components/Toast/index.d.ts +2 -0
  138. package/dist/components/Toast/index.js +48 -0
  139. package/dist/components/Toast/styles.d.ts +5 -0
  140. package/dist/components/Toast/styles.js +39 -0
  141. package/dist/components/{atoms/typography → Typography}/Typography.d.ts +2 -1
  142. package/dist/components/Typography/Typography.js +48 -0
  143. package/dist/components/Typography/__tests__/Typography.test.d.ts +1 -0
  144. package/dist/components/Typography/__tests__/Typography.test.js +60 -0
  145. package/dist/components/Typography/index.js +48 -0
  146. package/dist/components/Typography/styles.d.ts +7 -0
  147. package/dist/components/Typography/styles.js +55 -0
  148. package/dist/components/index.d.ts +18 -14
  149. package/dist/components/index.js +70 -14
  150. package/dist/constants/index.d.ts +104 -0
  151. package/dist/constants/index.js +41 -7
  152. package/dist/{context-CZsFJmh6.js → context-3b8a39af.js} +547 -536
  153. package/dist/genesis/GenesisThemeBreakdown.js +69 -22
  154. package/dist/genesis/GenesisThemeDemo.d.ts +0 -2
  155. package/dist/genesis/GenesisThemeDemo.js +53 -4
  156. package/dist/genesis/styles.d.ts +2 -6
  157. package/dist/genesis/styles.js +1144 -2210
  158. package/dist/index-0a886e53.js +100 -0
  159. package/dist/{index-SAAXFt-P.js → index-0b9ee239.js} +347 -338
  160. package/dist/index-1a33c134.js +1389 -0
  161. package/dist/index-4003d75b.js +3748 -0
  162. package/dist/{index-D1v_7IIx.js → index-501fc13d.js} +369 -343
  163. package/dist/index-89035ea5.js +3242 -0
  164. package/dist/{index-BQO27mgE.js → index-8c8d2d0c.js} +123 -122
  165. package/dist/{index-C7kFNqp2.js → index-e2b72ca8.js} +107 -102
  166. package/dist/index.d.ts +1 -0
  167. package/dist/index.js +77 -18
  168. package/dist/{isVisible-CNQjrJPN.js → isVisible-729780f5.js} +110 -82
  169. package/dist/{magic-string.es-BkUFmFT4.js → magic-string.es-b7491176.js} +103 -56
  170. package/dist/{SearchOutlined-DuzJkIiQ.js → pickAttrs-00ba4687.js} +16 -26
  171. package/dist/presets-83ccb923.js +787 -0
  172. package/dist/providers/GenesisProvider.d.ts +5 -0
  173. package/dist/providers/GenesisProvider.js +59 -5
  174. package/dist/providers/ThemeProvider.d.ts +2 -1
  175. package/dist/providers/ThemeProvider.js +16 -11
  176. package/dist/providers/ToastProvider.d.ts +6 -0
  177. package/dist/providers/ToastProvider.js +49 -0
  178. package/dist/providers/ToastWrapper.d.ts +7 -0
  179. package/dist/providers/ToastWrapper.js +56 -0
  180. package/dist/providers/__stories__/GenesisProvider.stories.d.ts +6 -0
  181. package/dist/providers/index.d.ts +3 -2
  182. package/dist/providers/index.js +51 -4
  183. package/dist/setup-aaca7b6f.js +21158 -0
  184. package/dist/{styled-components.browser.esm-CZ1XM4o4.js → styled-components.browser.esm-02f500bc.js} +134 -72
  185. package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +54 -18
  186. package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +51 -15
  187. package/dist/styles/design-tokens/variables.d.ts +7 -7
  188. package/dist/styles/design-tokens/variables.js +48 -48
  189. package/dist/styles/global-styles.js +4 -3
  190. package/dist/styles/theme/genesis-theme.d.ts +3 -0
  191. package/dist/styles/theme/genesis-theme.js +402 -263
  192. package/dist/styles/theme/global-styles.js +4 -3
  193. package/dist/styles/theme/index.js +5 -4
  194. package/dist/test/setup.js +46 -2
  195. package/dist/useVariants-a0d64298.js +30 -0
  196. package/dist/utils/isAllEnglishString.js +2 -1
  197. package/package.json +34 -28
  198. package/dist/AntdIcon-Bsnbyy6g.js +0 -200
  199. package/dist/CheckOutlined-DAynWe12.js +0 -527
  200. package/dist/Compact-CJBo3f0u.js +0 -185
  201. package/dist/ContextIsolator-CGkdKtc3.js +0 -20
  202. package/dist/Form-Cylpi4M4.js +0 -1815
  203. package/dist/Overflow-CP1M4Z0s.js +0 -369
  204. package/dist/compact-item-DH13cl8A.js +0 -61
  205. package/dist/components/atoms/button/Button.js +0 -27
  206. package/dist/components/atoms/button/index.js +0 -4
  207. package/dist/components/atoms/checkbox/Checkbox.js +0 -13
  208. package/dist/components/atoms/checkbox/__tests__/Checkbox.test.js +0 -18
  209. package/dist/components/atoms/checkbox/index.js +0 -4
  210. package/dist/components/atoms/index.d.ts +0 -1
  211. package/dist/components/atoms/index.js +0 -3
  212. package/dist/components/atoms/input/Input.js +0 -12
  213. package/dist/components/atoms/input/__tests__/Input.test.js +0 -28
  214. package/dist/components/atoms/input/index.js +0 -4
  215. package/dist/components/atoms/input/styles.js +0 -415
  216. package/dist/components/atoms/select/Select.js +0 -24
  217. package/dist/components/atoms/select/__tests__/Select.test.js +0 -10735
  218. package/dist/components/atoms/select/index.js +0 -4
  219. package/dist/components/atoms/select/styles.js +0 -3868
  220. package/dist/components/atoms/typography/Typography.js +0 -44
  221. package/dist/components/atoms/typography/__tests__/Typography.test.js +0 -16
  222. package/dist/components/atoms/typography/index.js +0 -4
  223. package/dist/components/atoms/typography/styles.d.ts +0 -11
  224. package/dist/components/atoms/typography/styles.js +0 -28
  225. package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.js +0 -35
  226. package/dist/components/molecules/error-boundary-fallback/index.js +0 -4
  227. package/dist/components/molecules/error-boundary-fallback/styles.d.ts +0 -1
  228. package/dist/components/molecules/form/Form.js +0 -7
  229. package/dist/components/molecules/form/__stories__/FormStory.js +0 -90
  230. package/dist/components/molecules/form/index.js +0 -4
  231. package/dist/index-3MWkSVA1.js +0 -96
  232. package/dist/index-BPtFqhcp.js +0 -19110
  233. package/dist/index-BWys7dkb.js +0 -4462
  234. package/dist/index-VDH3iLaC.js +0 -884
  235. package/dist/setup-CMYVZCPF.js +0 -33883
  236. package/dist/useVariants-CEpw6Ww6.js +0 -29
  237. /package/dist/components/{atoms/checkbox/__tests__/Checkbox.test.d.ts → Badge/__tests__/Badge.test.d.ts} +0 -0
  238. /package/dist/components/{atoms/input/__tests__/Input.test.d.ts → Breadcrumb/__tests__/Breadcrumb.test.d.ts} +0 -0
  239. /package/dist/components/{atoms/button → Button}/Button.d.ts +0 -0
  240. /package/dist/components/{atoms/button → Button}/__stories__/Button.stories.d.ts +0 -0
  241. /package/dist/components/{atoms/select/__tests__/Select.test.d.ts → Button/__tests__/Button.test.d.ts} +0 -0
  242. /package/dist/components/{atoms/button → Button}/index.d.ts +0 -0
  243. /package/dist/components/{atoms/button → Button}/styles.d.ts +0 -0
  244. /package/dist/components/{atoms/checkbox → Checkbox}/__stories__/Checkbox.stories.d.ts +0 -0
  245. /package/dist/components/{atoms/typography/__tests__/Typography.test.d.ts → Checkbox/__tests__/Checkbox.test.d.ts} +0 -0
  246. /package/dist/components/{atoms/checkbox → Checkbox}/index.d.ts +0 -0
  247. /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/ErrorBoundaryFallback.d.ts +0 -0
  248. /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/__stories__/ErrorBoundaryFallback.stories.d.ts +0 -0
  249. /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/index.d.ts +0 -0
  250. /package/dist/components/{molecules/form → Form}/__stories__/Form.stories.d.ts +0 -0
  251. /package/dist/components/{molecules/form → Form}/__stories__/FormStory.d.ts +0 -0
  252. /package/dist/components/{molecules/form → Form}/index.d.ts +0 -0
  253. /package/dist/components/{atoms/input → Input}/index.d.ts +0 -0
  254. /package/dist/components/{atoms/select → Select}/index.d.ts +0 -0
  255. /package/dist/components/{atoms/typography → Typography}/__stories__/Typography.stories.d.ts +0 -0
  256. /package/dist/components/{atoms/typography → Typography}/index.d.ts +0 -0
  257. /package/dist/{presetColors-Cl8UP3Nw.js → presetColors-ccf8cb4c.js} +0 -0
  258. /package/dist/{reactNode-sKPeiqPL.js → reactNode-f4391605.js} +0 -0
@@ -1,415 +0,0 @@
1
- import { d as fe } from "../../../styled-components.browser.esm-CZ1XM4o4.js";
2
- import * as o from "react";
3
- import { useContext as Z, useMemo as de, useState as pe, useRef as me } from "react";
4
- import { C as q, c as H, A as te, m as ge, n as Ce, B as ye, k as ee, H as ve, _ as oe, F as be, G as se } from "../../../index-BWys7dkb.js";
5
- import { F as X, u as Oe } from "../../../context-CZsFJmh6.js";
6
- import { u as he, i as xe, a as Ee, I as Q, b as Ie, T as Pe } from "../../../TextArea-3MOYYuAQ.js";
7
- import { p as Se, R as we } from "../../../SearchOutlined-DuzJkIiQ.js";
8
- import { g as _e } from "../../../useVariants-CEpw6Ww6.js";
9
- import { a as re, b as ze } from "../../../Compact-CJBo3f0u.js";
10
- import { I as ae } from "../../../AntdIcon-Bsnbyy6g.js";
11
- import { o as Ne } from "../../../isVisible-CNQjrJPN.js";
12
- import { c as ne } from "../../../reactNode-sKPeiqPL.js";
13
- import { B as je } from "../../../button-BNV2qdrP.js";
14
- const $e = (e) => {
15
- const {
16
- getPrefixCls: s,
17
- direction: r
18
- } = Z(q), {
19
- prefixCls: n,
20
- className: t
21
- } = e, u = s("input-group", n), v = s("input"), [g, b] = he(v), O = H(u, {
22
- [`${u}-lg`]: e.size === "large",
23
- [`${u}-sm`]: e.size === "small",
24
- [`${u}-compact`]: e.compact,
25
- [`${u}-rtl`]: r === "rtl"
26
- }, b, t), C = Z(X), m = de(() => Object.assign(Object.assign({}, C), {
27
- isFormItemInput: !1
28
- }), [C]);
29
- return process.env.NODE_ENV !== "production" && te("Input.Group").deprecated(!1, "Input.Group", "Space.Compact"), g(/* @__PURE__ */ o.createElement("span", {
30
- className: O,
31
- style: e.style,
32
- onMouseEnter: e.onMouseEnter,
33
- onMouseLeave: e.onMouseLeave,
34
- onFocus: e.onFocus,
35
- onBlur: e.onBlur
36
- }, /* @__PURE__ */ o.createElement(X.Provider, {
37
- value: m
38
- }, e.children)));
39
- }, Re = (e) => {
40
- const {
41
- componentCls: s,
42
- paddingXS: r
43
- } = e;
44
- return {
45
- [s]: {
46
- display: "inline-flex",
47
- alignItems: "center",
48
- flexWrap: "nowrap",
49
- columnGap: r,
50
- "&-rtl": {
51
- direction: "rtl"
52
- },
53
- [`${s}-input`]: {
54
- textAlign: "center",
55
- paddingInline: e.paddingXXS
56
- },
57
- // ================= Size =================
58
- [`&${s}-sm ${s}-input`]: {
59
- paddingInline: e.calc(e.paddingXXS).div(2).equal()
60
- },
61
- [`&${s}-lg ${s}-input`]: {
62
- paddingInline: e.paddingXS
63
- }
64
- }
65
- };
66
- }, ke = ge(["Input", "OTP"], (e) => {
67
- const s = Ce(e, xe(e));
68
- return [Re(s)];
69
- }, Ee);
70
- var Ae = function(e, s) {
71
- var r = {};
72
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && s.indexOf(n) < 0 && (r[n] = e[n]);
73
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, n = Object.getOwnPropertySymbols(e); t < n.length; t++)
74
- s.indexOf(n[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[t]) && (r[n[t]] = e[n[t]]);
75
- return r;
76
- };
77
- const Me = /* @__PURE__ */ o.forwardRef((e, s) => {
78
- const {
79
- value: r,
80
- onChange: n,
81
- onActiveChange: t,
82
- index: u,
83
- mask: v
84
- } = e, g = Ae(e, ["value", "onChange", "onActiveChange", "index", "mask"]), b = r && typeof v == "string" ? v : r, O = (f) => {
85
- n(u, f.target.value);
86
- }, C = o.useRef(null);
87
- o.useImperativeHandle(s, () => C.current);
88
- const m = () => {
89
- ye(() => {
90
- var f;
91
- const y = (f = C.current) === null || f === void 0 ? void 0 : f.input;
92
- document.activeElement === y && y && y.select();
93
- });
94
- }, w = (f) => {
95
- const {
96
- key: y,
97
- ctrlKey: R,
98
- metaKey: k
99
- } = f;
100
- y === "ArrowLeft" ? t(u - 1) : y === "ArrowRight" ? t(u + 1) : y === "z" && (R || k) && f.preventDefault(), m();
101
- }, P = (f) => {
102
- f.key === "Backspace" && !r && t(u - 1), m();
103
- };
104
- return /* @__PURE__ */ o.createElement(Q, Object.assign({
105
- type: v === !0 ? "password" : "text"
106
- }, g, {
107
- ref: C,
108
- value: b,
109
- onInput: O,
110
- onFocus: m,
111
- onKeyDown: w,
112
- onKeyUp: P,
113
- onMouseDown: m,
114
- onMouseUp: m
115
- }));
116
- });
117
- var Te = function(e, s) {
118
- var r = {};
119
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && s.indexOf(n) < 0 && (r[n] = e[n]);
120
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, n = Object.getOwnPropertySymbols(e); t < n.length; t++)
121
- s.indexOf(n[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[t]) && (r[n[t]] = e[n[t]]);
122
- return r;
123
- };
124
- function U(e) {
125
- return (e || "").split("");
126
- }
127
- const De = /* @__PURE__ */ o.forwardRef((e, s) => {
128
- const {
129
- prefixCls: r,
130
- length: n = 6,
131
- size: t,
132
- defaultValue: u,
133
- value: v,
134
- onChange: g,
135
- formatter: b,
136
- variant: O,
137
- disabled: C,
138
- status: m,
139
- autoFocus: w,
140
- mask: P,
141
- type: f,
142
- onInput: y,
143
- inputMode: R
144
- } = e, k = Te(e, ["prefixCls", "length", "size", "defaultValue", "value", "onChange", "formatter", "variant", "disabled", "status", "autoFocus", "mask", "type", "onInput", "inputMode"]);
145
- if (process.env.NODE_ENV !== "production") {
146
- const a = te("Input.OTP");
147
- process.env.NODE_ENV !== "production" && a(!(typeof P == "string" && P.length > 1), "usage", "`mask` prop should be a single character.");
148
- }
149
- const {
150
- getPrefixCls: _,
151
- direction: z
152
- } = o.useContext(q), E = _("otp", r), B = Se(k, {
153
- aria: !0,
154
- data: !0,
155
- attr: !0
156
- }), S = Oe(E), [A, F, M] = ke(E, S), h = re((a) => t ?? a), N = o.useContext(X), j = _e(N.status, m), T = o.useMemo(() => Object.assign(Object.assign({}, N), {
157
- status: j,
158
- hasFeedback: !1,
159
- feedbackIcon: null
160
- }), [N, j]), I = o.useRef(null), x = o.useRef({});
161
- o.useImperativeHandle(s, () => ({
162
- focus: () => {
163
- var a;
164
- (a = x.current[0]) === null || a === void 0 || a.focus();
165
- },
166
- blur: () => {
167
- var a;
168
- for (let l = 0; l < n; l += 1)
169
- (a = x.current[l]) === null || a === void 0 || a.blur();
170
- },
171
- nativeElement: I.current
172
- }));
173
- const L = (a) => b ? b(a) : a, [G, K] = o.useState(U(L(u || "")));
174
- o.useEffect(() => {
175
- v !== void 0 && K(U(v));
176
- }, [v]);
177
- const W = ee((a) => {
178
- K(a), y && y(a), g && a.length === n && a.every((l) => l) && a.some((l, c) => G[c] !== l) && g(a.join(""));
179
- }), J = ee((a, l) => {
180
- let c = ve(G);
181
- for (let p = 0; p < a; p += 1)
182
- c[p] || (c[p] = "");
183
- l.length <= 1 ? c[a] = l : c = c.slice(0, a).concat(U(l)), c = c.slice(0, n);
184
- for (let p = c.length - 1; p >= 0 && !c[p]; p -= 1)
185
- c.pop();
186
- const D = L(c.map((p) => p || " ").join(""));
187
- return c = U(D).map((p, Y) => p === " " && !c[Y] ? c[Y] : p), c;
188
- }), i = (a, l) => {
189
- var c;
190
- const D = J(a, l), p = Math.min(a + l.length, n - 1);
191
- p !== a && D[a] !== void 0 && ((c = x.current[p]) === null || c === void 0 || c.focus()), W(D);
192
- }, d = (a) => {
193
- var l;
194
- (l = x.current[a]) === null || l === void 0 || l.focus();
195
- }, $ = {
196
- variant: O,
197
- disabled: C,
198
- status: j,
199
- mask: P,
200
- type: f,
201
- inputMode: R
202
- };
203
- return A(/* @__PURE__ */ o.createElement("div", Object.assign({}, B, {
204
- ref: I,
205
- className: H(E, {
206
- [`${E}-sm`]: h === "small",
207
- [`${E}-lg`]: h === "large",
208
- [`${E}-rtl`]: z === "rtl"
209
- }, M, F)
210
- }), /* @__PURE__ */ o.createElement(X.Provider, {
211
- value: T
212
- }, Array.from({
213
- length: n
214
- }).map((a, l) => {
215
- const c = `otp-${l}`, D = G[l] || "";
216
- return /* @__PURE__ */ o.createElement(Me, Object.assign({
217
- ref: (p) => {
218
- x.current[l] = p;
219
- },
220
- key: c,
221
- index: l,
222
- size: h,
223
- htmlSize: 1,
224
- className: `${E}-input`,
225
- onChange: i,
226
- value: D,
227
- onActiveChange: d,
228
- autoFocus: l === 0 && w
229
- }, $));
230
- }))));
231
- });
232
- var Ve = { 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" }, Be = function(s, r) {
233
- return /* @__PURE__ */ o.createElement(ae, oe({}, s, {
234
- ref: r,
235
- icon: Ve
236
- }));
237
- }, ie = /* @__PURE__ */ o.forwardRef(Be);
238
- process.env.NODE_ENV !== "production" && (ie.displayName = "EyeInvisibleOutlined");
239
- var Fe = { 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" }, Le = function(s, r) {
240
- return /* @__PURE__ */ o.createElement(ae, oe({}, s, {
241
- ref: r,
242
- icon: Fe
243
- }));
244
- }, le = /* @__PURE__ */ o.forwardRef(Le);
245
- process.env.NODE_ENV !== "production" && (le.displayName = "EyeOutlined");
246
- var Ge = function(e, s) {
247
- var r = {};
248
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && s.indexOf(n) < 0 && (r[n] = e[n]);
249
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, n = Object.getOwnPropertySymbols(e); t < n.length; t++)
250
- s.indexOf(n[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[t]) && (r[n[t]] = e[n[t]]);
251
- return r;
252
- };
253
- const Ke = (e) => e ? /* @__PURE__ */ o.createElement(le, null) : /* @__PURE__ */ o.createElement(ie, null), Ue = {
254
- click: "onClick",
255
- hover: "onMouseOver"
256
- }, ce = /* @__PURE__ */ o.forwardRef((e, s) => {
257
- const {
258
- disabled: r,
259
- action: n = "click",
260
- visibilityToggle: t = !0,
261
- iconRender: u = Ke
262
- } = e, v = o.useContext(be), g = r ?? v, b = typeof t == "object" && t.visible !== void 0, [O, C] = pe(() => b ? t.visible : !1), m = me(null);
263
- o.useEffect(() => {
264
- b && C(t.visible);
265
- }, [b, t]);
266
- const w = Ie(m), P = () => {
267
- var h;
268
- if (g)
269
- return;
270
- O && w();
271
- const N = !O;
272
- C(N), typeof t == "object" && ((h = t.onVisibleChange) === null || h === void 0 || h.call(t, N));
273
- }, f = (h) => {
274
- const N = Ue[n] || "", j = u(O), T = {
275
- [N]: P,
276
- className: `${h}-icon`,
277
- key: "passwordIcon",
278
- onMouseDown: (I) => {
279
- I.preventDefault();
280
- },
281
- onMouseUp: (I) => {
282
- I.preventDefault();
283
- }
284
- };
285
- return /* @__PURE__ */ o.cloneElement(/* @__PURE__ */ o.isValidElement(j) ? j : /* @__PURE__ */ o.createElement("span", null, j), T);
286
- }, {
287
- className: y,
288
- prefixCls: R,
289
- inputPrefixCls: k,
290
- size: _
291
- } = e, z = Ge(e, ["className", "prefixCls", "inputPrefixCls", "size"]), {
292
- getPrefixCls: E
293
- } = o.useContext(q), B = E("input", k), S = E("input-password", R), A = t && f(S), F = H(S, y, {
294
- [`${S}-${_}`]: !!_
295
- }), M = Object.assign(Object.assign({}, Ne(z, ["suffix", "iconRender", "visibilityToggle"])), {
296
- type: O ? "text" : "password",
297
- className: F,
298
- prefixCls: B,
299
- suffix: A
300
- });
301
- return _ && (M.size = _), /* @__PURE__ */ o.createElement(Q, Object.assign({
302
- ref: se(s, m)
303
- }, M));
304
- });
305
- process.env.NODE_ENV !== "production" && (ce.displayName = "Input.Password");
306
- var Xe = function(e, s) {
307
- var r = {};
308
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && s.indexOf(n) < 0 && (r[n] = e[n]);
309
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, n = Object.getOwnPropertySymbols(e); t < n.length; t++)
310
- s.indexOf(n[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[t]) && (r[n[t]] = e[n[t]]);
311
- return r;
312
- };
313
- const ue = /* @__PURE__ */ o.forwardRef((e, s) => {
314
- const {
315
- prefixCls: r,
316
- inputPrefixCls: n,
317
- className: t,
318
- size: u,
319
- suffix: v,
320
- enterButton: g = !1,
321
- addonAfter: b,
322
- loading: O,
323
- disabled: C,
324
- onSearch: m,
325
- onChange: w,
326
- onCompositionStart: P,
327
- onCompositionEnd: f
328
- } = e, y = Xe(e, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"]), {
329
- getPrefixCls: R,
330
- direction: k
331
- } = o.useContext(q), _ = o.useRef(!1), z = R("input-search", r), E = R("input", n), {
332
- compactSize: B
333
- } = ze(z, k), S = re((i) => {
334
- var d;
335
- return (d = u ?? B) !== null && d !== void 0 ? d : i;
336
- }), A = o.useRef(null), F = (i) => {
337
- i != null && i.target && i.type === "click" && m && m(i.target.value, i, {
338
- source: "clear"
339
- }), w == null || w(i);
340
- }, M = (i) => {
341
- var d;
342
- document.activeElement === ((d = A.current) === null || d === void 0 ? void 0 : d.input) && i.preventDefault();
343
- }, h = (i) => {
344
- var d, $;
345
- m && m(($ = (d = A.current) === null || d === void 0 ? void 0 : d.input) === null || $ === void 0 ? void 0 : $.value, i, {
346
- source: "input"
347
- });
348
- }, N = (i) => {
349
- _.current || O || h(i);
350
- }, j = typeof g == "boolean" ? /* @__PURE__ */ o.createElement(we, null) : null, T = `${z}-button`;
351
- let I;
352
- const x = g || {}, L = x.type && x.type.__ANT_BUTTON === !0;
353
- L || x.type === "button" ? I = ne(x, Object.assign({
354
- onMouseDown: M,
355
- onClick: (i) => {
356
- var d, $;
357
- ($ = (d = x == null ? void 0 : x.props) === null || d === void 0 ? void 0 : d.onClick) === null || $ === void 0 || $.call(d, i), h(i);
358
- },
359
- key: "enterButton"
360
- }, L ? {
361
- className: T,
362
- size: S
363
- } : {})) : I = /* @__PURE__ */ o.createElement(je, {
364
- className: T,
365
- type: g ? "primary" : void 0,
366
- size: S,
367
- disabled: C,
368
- key: "enterButton",
369
- onMouseDown: M,
370
- onClick: h,
371
- loading: O,
372
- icon: j
373
- }, g), b && (I = [I, ne(b, {
374
- key: "addonAfter"
375
- })]);
376
- const G = H(z, {
377
- [`${z}-rtl`]: k === "rtl",
378
- [`${z}-${S}`]: !!S,
379
- [`${z}-with-button`]: !!g
380
- }, t), K = Object.assign(Object.assign({}, y), {
381
- className: G,
382
- prefixCls: E,
383
- type: "search"
384
- }), W = (i) => {
385
- _.current = !0, P == null || P(i);
386
- }, J = (i) => {
387
- _.current = !1, f == null || f(i);
388
- };
389
- return /* @__PURE__ */ o.createElement(Q, Object.assign({
390
- ref: se(A, s),
391
- onPressEnter: N
392
- }, K, {
393
- size: S,
394
- onCompositionStart: W,
395
- onCompositionEnd: J,
396
- addonAfter: I,
397
- suffix: v,
398
- onChange: F,
399
- disabled: C
400
- }));
401
- });
402
- process.env.NODE_ENV !== "production" && (ue.displayName = "Search");
403
- const V = Q;
404
- V.Group = $e;
405
- V.Search = ue;
406
- V.TextArea = Pe;
407
- V.Password = ce;
408
- V.OTP = De;
409
- const rn = fe(V)`
410
- ${({ theme: e, type: s, variant: r, state: n, breakpoint: t }) => {
411
- }}
412
- `;
413
- export {
414
- rn as Input
415
- };
@@ -1,24 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { Select as d, SelectDropdown as m, StyledMenuItem as i } from "./styles.js";
3
- import { useBreakpoint as p } from "../../../providers/ThemeProvider.js";
4
- import { TYPE as l, STATE as s } from "../../../constants/index.js";
5
- const D = ({
6
- type: o = l.primary,
7
- state: r = s.active,
8
- ...n
9
- }) => {
10
- const t = p();
11
- return /* @__PURE__ */ e(
12
- d,
13
- {
14
- type: o,
15
- state: r,
16
- breakpoint: t,
17
- dropdownRender: (c) => /* @__PURE__ */ e(m, { type: o, state: r, children: /* @__PURE__ */ e(i, { type: o, state: r, children: c }) }),
18
- ...n
19
- }
20
- );
21
- };
22
- export {
23
- D as default
24
- };