@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
@@ -0,0 +1,69 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { screen as i } from "@testing-library/react";
3
+ import { d as n, i as r, c as p, g as m } from "../../../setup-aaca7b6f.js";
4
+ import e from "../Input.js";
5
+ import { STATE as a } from "../../../constants/index.js";
6
+ import "../../../presets-83ccb923.js";
7
+ import "react";
8
+ import "../../../providers/GenesisProvider.js";
9
+ import "../../../providers/ThemeProvider.js";
10
+ import "../../../styled-components.browser.esm-02f500bc.js";
11
+ import "../../../styles/theme/genesis-theme.js";
12
+ import "../../../styles/design-tokens/variables.js";
13
+ import "../../../index-89035ea5.js";
14
+ import "../../Button/styles.js";
15
+ import "../../../button-fa1c119c.js";
16
+ import "../../../isVisible-729780f5.js";
17
+ import "../../../index-4003d75b.js";
18
+ import "react-dom";
19
+ import "../../../index-e2b72ca8.js";
20
+ import "../../../reactNode-f4391605.js";
21
+ import "../../../Compact-c39ed20d.js";
22
+ import "../../../presetColors-ccf8cb4c.js";
23
+ import "../../../compact-item-b8f85aa6.js";
24
+ import "../../../AntdIcon-c395a1c4.js";
25
+ import "../../Checkbox/styles.js";
26
+ import "../../../context-3b8a39af.js";
27
+ import "../../ErrorBoundaryFallback/styles.js";
28
+ import "../../../ExclamationCircleFilled-23ef9812.js";
29
+ import "../../../CloseCircleFilled-ddc51e7e.js";
30
+ import "../styles.js";
31
+ import "../../../TextArea-20825221.js";
32
+ import "../../../index-8c8d2d0c.js";
33
+ import "../../../useVariants-a0d64298.js";
34
+ import "../../../ContextIsolator-b09b2c52.js";
35
+ import "../../../pickAttrs-00ba4687.js";
36
+ import "../../../SearchOutlined-a9014e08.js";
37
+ import "../../Select/styles.js";
38
+ import "../../../index-1a33c134.js";
39
+ import "../../../Overflow-a570fa69.js";
40
+ import "../../../DownOutlined-64a4732a.js";
41
+ import "../../../CheckOutlined-52d9ac25.js";
42
+ import "../../../CloseOutlined-14b8bba1.js";
43
+ import "../../Typography/styles.js";
44
+ import "../../../index-501fc13d.js";
45
+ import "../../../index-0b9ee239.js";
46
+ import "../../Badge/styles.js";
47
+ import "../../../InfoCircleFilled-c5f90c20.js";
48
+ import "../../Toast/styles.js";
49
+ import "../../../collapse-345bc884.js";
50
+ n("Input Component", () => {
51
+ r("customRenders input with default props", () => {
52
+ p(/* @__PURE__ */ o(e, {}));
53
+ const t = i.getByRole("textbox");
54
+ m(t).toBeInTheDocument();
55
+ }), r("customRenders input with active state", () => {
56
+ p(/* @__PURE__ */ o(e, { state: a.active }));
57
+ const t = i.getByRole("textbox");
58
+ m(t).toBeEnabled();
59
+ }), r("passes through additional props", () => {
60
+ const t = "Enter text";
61
+ p(/* @__PURE__ */ o(e, { placeholder: t }));
62
+ const s = i.getByPlaceholderText(t);
63
+ m(s).toBeInTheDocument();
64
+ }), r("handles disabled state", () => {
65
+ p(/* @__PURE__ */ o(e, { disabled: !0 }));
66
+ const t = i.getByRole("textbox");
67
+ m(t).toBeDisabled();
68
+ });
69
+ });
@@ -0,0 +1,31 @@
1
+ import { default as D } from "./Input.js";
2
+ import "react/jsx-runtime";
3
+ import "./styles.js";
4
+ import "../../styled-components.browser.esm-02f500bc.js";
5
+ import "react";
6
+ import "../../constants/index.js";
7
+ import "../../presets-83ccb923.js";
8
+ import "../../index-4003d75b.js";
9
+ import "react-dom";
10
+ import "../../context-3b8a39af.js";
11
+ import "../../isVisible-729780f5.js";
12
+ import "../../TextArea-20825221.js";
13
+ import "../../index-8c8d2d0c.js";
14
+ import "../../CloseCircleFilled-ddc51e7e.js";
15
+ import "../../AntdIcon-c395a1c4.js";
16
+ import "../../useVariants-a0d64298.js";
17
+ import "../../Compact-c39ed20d.js";
18
+ import "../../ContextIsolator-b09b2c52.js";
19
+ import "../../compact-item-b8f85aa6.js";
20
+ import "../../pickAttrs-00ba4687.js";
21
+ import "../../SearchOutlined-a9014e08.js";
22
+ import "../../reactNode-f4391605.js";
23
+ import "../../button-fa1c119c.js";
24
+ import "../../index-e2b72ca8.js";
25
+ import "../../presetColors-ccf8cb4c.js";
26
+ import "../../providers/ThemeProvider.js";
27
+ import "../../styles/theme/genesis-theme.js";
28
+ import "../../styles/design-tokens/variables.js";
29
+ export {
30
+ D as default
31
+ };
@@ -1,10 +1,9 @@
1
1
  import { InputProps as AntInputProps } from 'antd';
2
2
 
3
3
  interface InputStyledProps extends AntInputProps {
4
+ state?: "error" | "success" | "default";
4
5
  }
5
- export declare const Input: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Omit<AntInputProps & import('react').RefAttributes<import('antd').InputRef>, "ref"> & {
6
- ref?: import('react').Ref<import('antd').InputRef>;
7
- }, InputStyledProps>> & string & Omit<import('react').ForwardRefExoticComponent<AntInputProps & import('react').RefAttributes<import('antd').InputRef>> & {
6
+ export declare const Input: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<AntInputProps & import('react').RefAttributes<import('antd').InputRef>, InputStyledProps>> & string & Omit<import('react').ForwardRefExoticComponent<AntInputProps & import('react').RefAttributes<import('antd').InputRef>> & {
8
7
  Group: import('react').FC<import('antd/es/input').GroupProps>;
9
8
  Search: import('react').ForwardRefExoticComponent<import('antd/es/input').SearchProps & import('react').RefAttributes<import('antd').InputRef>>;
10
9
  TextArea: import('react').ForwardRefExoticComponent<import('antd/es/input').TextAreaProps & import('react').RefAttributes<import('antd/es/input/TextArea').TextAreaRef>>;
@@ -0,0 +1,542 @@
1
+ import { d as pe } from "../../styled-components.browser.esm-02f500bc.js";
2
+ import { TYPE as Z, STATE as D } from "../../constants/index.js";
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) => {
25
+ 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, {
32
+ [`${a}-lg`]: e.size === "large",
33
+ [`${a}-sm`]: e.size === "small",
34
+ [`${a}-compact`]: e.compact,
35
+ [`${a}-rtl`]: o === "rtl"
36
+ }, b, n), y = te(X), f = me(() => Object.assign(Object.assign({}, y), {
37
+ 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,
41
+ style: e.style,
42
+ onMouseEnter: e.onMouseEnter,
43
+ onMouseLeave: e.onMouseLeave,
44
+ onFocus: e.onFocus,
45
+ onBlur: e.onBlur
46
+ }, /* @__PURE__ */ s.createElement(X.Provider, {
47
+ value: f
48
+ }, e.children)));
49
+ }, Re = Me, Ae = (e) => {
50
+ const {
51
+ componentCls: r,
52
+ paddingXS: o
53
+ } = e;
54
+ return {
55
+ [r]: {
56
+ display: "inline-flex",
57
+ alignItems: "center",
58
+ flexWrap: "nowrap",
59
+ columnGap: o,
60
+ "&-rtl": {
61
+ direction: "rtl"
62
+ },
63
+ [`${r}-input`]: {
64
+ textAlign: "center",
65
+ paddingInline: e.paddingXXS
66
+ },
67
+ // ================= Size =================
68
+ [`&${r}-sm ${r}-input`]: {
69
+ paddingInline: e.calc(e.paddingXXS).div(2).equal()
70
+ },
71
+ [`&${r}-lg ${r}-input`]: {
72
+ paddingInline: e.paddingXS
73
+ }
74
+ }
75
+ };
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;
88
+ };
89
+ const De = /* @__PURE__ */ s.forwardRef((e, r) => {
90
+ const {
91
+ value: o,
92
+ onChange: t,
93
+ onActiveChange: n,
94
+ 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();
105
+ });
106
+ }, $ = (p) => {
107
+ 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();
115
+ };
116
+ 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
127
+ }));
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;
137
+ };
138
+ function U(e) {
139
+ return (e || "").split("");
140
+ }
141
+ const Le = /* @__PURE__ */ s.forwardRef((e, r) => {
142
+ const {
143
+ prefixCls: o,
144
+ length: t = 6,
145
+ size: n,
146
+ 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"]);
159
+ if (process.env.NODE_ENV !== "production") {
160
+ 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.");
162
+ }
163
+ const {
164
+ getPrefixCls: P,
165
+ direction: _
166
+ } = s.useContext(Q), w = P("otp", o), F = Pe(M, {
167
+ aria: !0,
168
+ data: !0,
169
+ 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), {
171
+ status: N,
172
+ hasFeedback: !1,
173
+ feedbackIcon: null
174
+ }), [z, N]), E = s.useRef(null), O = s.useRef({});
175
+ s.useImperativeHandle(r, () => ({
176
+ focus: () => {
177
+ var i;
178
+ (i = O.current[0]) === null || i === void 0 || i.focus();
179
+ },
180
+ blur: () => {
181
+ var i;
182
+ for (let c = 0; c < t; c += 1)
183
+ (i = O.current[c]) === null || i === void 0 || i.blur();
184
+ },
185
+ nativeElement: E.current
186
+ }));
187
+ const K = (i) => b ? b(i) : i, [G, q] = s.useState(U(K(a || "")));
188
+ s.useEffect(() => {
189
+ d !== void 0 && q(U(d));
190
+ }, [d]);
191
+ 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) => {
207
+ var c;
208
+ (c = O.current[i]) === null || c === void 0 || c.focus();
209
+ }, j = {
210
+ variant: C,
211
+ disabled: y,
212
+ status: N,
213
+ mask: I,
214
+ type: p,
215
+ inputMode: T
216
+ };
217
+ return R(/* @__PURE__ */ s.createElement("div", Object.assign({}, F, {
218
+ ref: E,
219
+ className: H(w, {
220
+ [`${w}-sm`]: x === "small",
221
+ [`${w}-lg`]: x === "large",
222
+ [`${w}-rtl`]: _ === "rtl"
223
+ }, A, L)
224
+ }), /* @__PURE__ */ s.createElement(X.Provider, {
225
+ value: k
226
+ }, 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;
233
+ },
234
+ key: u,
235
+ index: c,
236
+ size: x,
237
+ htmlSize: 1,
238
+ className: `${w}-input`,
239
+ onChange: l,
240
+ value: B,
241
+ onActiveChange: m,
242
+ autoFocus: c === 0 && $
243
+ }, j));
244
+ }))));
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;
274
+ };
275
+ const Ze = (e) => e ? /* @__PURE__ */ s.createElement(Ye, null) : /* @__PURE__ */ s.createElement(Xe, null), et = {
276
+ click: "onClick",
277
+ hover: "onMouseOver"
278
+ }, de = /* @__PURE__ */ s.forwardRef((e, r) => {
279
+ 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);
285
+ s.useEffect(() => {
286
+ b && y(n.visible);
287
+ }, [b, n]);
288
+ const $ = Se(f), I = () => {
289
+ var x;
290
+ if (v)
291
+ 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`,
299
+ key: "passwordIcon",
300
+ onMouseDown: (E) => {
301
+ E.preventDefault();
302
+ },
303
+ onMouseUp: (E) => {
304
+ E.preventDefault();
305
+ }
306
+ };
307
+ return /* @__PURE__ */ s.cloneElement(/* @__PURE__ */ s.isValidElement(N) ? N : /* @__PURE__ */ s.createElement("span", null, N), k);
308
+ }, {
309
+ className: h,
310
+ prefixCls: T,
311
+ inputPrefixCls: M,
312
+ size: P
313
+ } = e, _ = Je(e, ["className", "prefixCls", "inputPrefixCls", "size"]), {
314
+ 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
317
+ }), A = Object.assign(Object.assign({}, Ne(_, ["suffix", "iconRender", "visibilityToggle"])), {
318
+ type: C ? "text" : "password",
319
+ className: L,
320
+ prefixCls: F,
321
+ suffix: R
322
+ });
323
+ return P && (A.size = P), /* @__PURE__ */ s.createElement(W, Object.assign({
324
+ ref: ie(r, f)
325
+ }, A));
326
+ });
327
+ 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;
337
+ };
338
+ const fe = /* @__PURE__ */ s.forwardRef((e, r) => {
339
+ const {
340
+ prefixCls: o,
341
+ inputPrefixCls: t,
342
+ className: n,
343
+ 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), {
357
+ 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, {
363
+ 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, {
371
+ source: "input"
372
+ });
373
+ }, z = (l) => {
374
+ P.current || C || x(l);
375
+ }, N = typeof v == "boolean" ? /* @__PURE__ */ s.createElement(je, null) : null, k = `${_}-button`;
376
+ let E;
377
+ const O = v || {}, K = O.type && O.type.__ANT_BUTTON === !0;
378
+ K || O.type === "button" ? E = oe(O, Object.assign({
379
+ 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);
383
+ },
384
+ key: "enterButton"
385
+ }, 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,
393
+ key: "enterButton",
394
+ onMouseDown: A,
395
+ onClick: x,
396
+ loading: C,
397
+ icon: N
398
+ }, v), b && (E = [E, oe(b, {
399
+ key: "addonAfter"
400
+ })]);
401
+ const G = H(_, {
402
+ [`${_}-rtl`]: M === "rtl",
403
+ [`${_}-${S}`]: !!S,
404
+ [`${_}-with-button`]: !!v
405
+ }, n), q = Object.assign(Object.assign({}, h), {
406
+ className: G,
407
+ prefixCls: w,
408
+ type: "search"
409
+ }), Y = (l) => {
410
+ P.current = !0, I == null || I(l);
411
+ }, J = (l) => {
412
+ P.current = !1, p == null || p(l);
413
+ };
414
+ return /* @__PURE__ */ s.createElement(W, Object.assign({
415
+ ref: ie(R, r),
416
+ onPressEnter: z
417
+ }, q, {
418
+ size: S,
419
+ onCompositionStart: Y,
420
+ onCompositionEnd: J,
421
+ addonAfter: E,
422
+ suffix: d,
423
+ onChange: L,
424
+ disabled: y
425
+ }));
426
+ });
427
+ 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 = {
440
+ color: e.status.success.default,
441
+ borderColor: e.status.success.default,
442
+ ringColor: e.status.success.ringColor
443
+ }, a = {
444
+ color: e.status.error.default,
445
+ borderColor: e.status.error.default,
446
+ ringColor: e.status.error.ringColor
447
+ }, d = o !== D.error && o !== D.success && o !== D.filled ? {
448
+ color: e.inputs.onsurface.active,
449
+ backgroundColor: e.inputs.surface.active,
450
+ borderColor: e.inputs.surface.border,
451
+ ringColor: e[r][o].ringColor
452
+ } : null;
453
+ return {
454
+ filled: t,
455
+ 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";
461
+ return `
462
+ &.ant-input {
463
+ font-family: 'Inter', sans-serif;
464
+ color: ${d.color};
465
+ border-color: ${d.borderColor};
466
+ }
467
+
468
+ .ant-input-group & {
469
+ &:focus-within {
470
+ outline: none;
471
+ color: ${d.color};
472
+ box-shadow: none;
473
+ border-color: ${e[o].focussed.borderColor};
474
+ }
475
+ }
476
+
477
+ .ant-input-group:focus-within {
478
+ outline: none;
479
+ box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[o].focussed.ringColor};
480
+ border-radius: ${r.BorderRadiusMd}px;
481
+ transition: box-shadow 0.2s ease-in-out;
482
+
483
+ /* Hide focus styles on inner input when parent is focused */
484
+ .ant-input:focus-within {
485
+ box-shadow: none;
486
+ border-radius: 0;
487
+ border-radius: ${v(n, a)};
488
+ border-color: #ddd;
489
+ }
490
+ }
491
+
492
+ /* Remove inner input focus styles when in a group */
493
+ .ant-input-group .ant-input:focus,
494
+ .ant-input-group .ant-input:focus-visible,
495
+ .ant-input-group .ant-input:focus-within {
496
+ outline: none;
497
+ box-shadow: none;
498
+ border-color: ${e[o].focussed.borderColor};
499
+ }
500
+
501
+ /* Single focus ring on group */
502
+ .ant-input-group:focus-within {
503
+ outline: none;
504
+ box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[o].focussed.ringColor};
505
+ border-radius: ${r.BorderRadiusMd}px;
506
+ transition: box-shadow 0.2s ease-in-out;
507
+ }
508
+
509
+ /* Remove focus styles for standalone inputs */
510
+ &:not(.ant-input-group):focus-visible {
511
+ outline: none;
512
+ 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};
516
+ transition: box-shadow 0.2s ease-in-out;
517
+ }
518
+
519
+ &:not(.ant-input-group .ant-input):focus-visible {
520
+ outline: none;
521
+ 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};
525
+ transition: box-shadow 0.2s ease-in-out;
526
+ }
527
+ `;
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(
532
+ e,
533
+ o,
534
+ r,
535
+ n,
536
+ a
537
+ );
538
+ }}
539
+ `;
540
+ export {
541
+ _t as Input
542
+ };
@@ -0,0 +1,13 @@
1
+ import { STATE } from '../../constants';
2
+
3
+ export interface MessageProps {
4
+ state: keyof typeof STATE;
5
+ message: string;
6
+ action?: {
7
+ url?: string;
8
+ text: string;
9
+ };
10
+ size: "small" | "standard";
11
+ }
12
+ declare const Message: ({ state, message, action, size, }: MessageProps) => import("react/jsx-runtime").JSX.Element;
13
+ export default Message;