@gobolt/genesis 0.0.7

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 (142) hide show
  1. package/README.md +86 -0
  2. package/dist/AntdIcon-Bsnbyy6g.js +200 -0
  3. package/dist/CheckOutlined-DAynWe12.js +527 -0
  4. package/dist/CloseCircleFilled-ZIY-u-27.js +13 -0
  5. package/dist/Compact-CJBo3f0u.js +185 -0
  6. package/dist/ContextIsolator-CGkdKtc3.js +20 -0
  7. package/dist/ExclamationCircleFilled-BICVVQIg.js +21 -0
  8. package/dist/Form-Cylpi4M4.js +1815 -0
  9. package/dist/Overflow-CP1M4Z0s.js +369 -0
  10. package/dist/SearchOutlined-DuzJkIiQ.js +52 -0
  11. package/dist/TextArea-3MOYYuAQ.js +1680 -0
  12. package/dist/bundle.css +1 -0
  13. package/dist/button-BNV2qdrP.js +1392 -0
  14. package/dist/compact-item-DH13cl8A.js +61 -0
  15. package/dist/components/atoms/button/Button.d.ts +12 -0
  16. package/dist/components/atoms/button/Button.js +27 -0
  17. package/dist/components/atoms/button/__stories__/Button.stories.d.ts +13 -0
  18. package/dist/components/atoms/button/index.d.ts +2 -0
  19. package/dist/components/atoms/button/index.js +4 -0
  20. package/dist/components/atoms/button/styles.d.ts +12 -0
  21. package/dist/components/atoms/button/styles.js +71 -0
  22. package/dist/components/atoms/checkbox/Checkbox.d.ts +10 -0
  23. package/dist/components/atoms/checkbox/Checkbox.js +13 -0
  24. package/dist/components/atoms/checkbox/__stories__/Checkbox.stories.d.ts +8 -0
  25. package/dist/components/atoms/checkbox/__tests__/Checkbox.test.d.ts +1 -0
  26. package/dist/components/atoms/checkbox/__tests__/Checkbox.test.js +18 -0
  27. package/dist/components/atoms/checkbox/index.d.ts +2 -0
  28. package/dist/components/atoms/checkbox/index.js +4 -0
  29. package/dist/components/atoms/checkbox/styles.d.ts +11 -0
  30. package/dist/components/atoms/checkbox/styles.js +582 -0
  31. package/dist/components/atoms/index.d.ts +1 -0
  32. package/dist/components/atoms/index.js +3 -0
  33. package/dist/components/atoms/input/Input.d.ts +11 -0
  34. package/dist/components/atoms/input/Input.js +12 -0
  35. package/dist/components/atoms/input/__stories__/Input.stories.d.ts +10 -0
  36. package/dist/components/atoms/input/__tests__/Input.test.d.ts +1 -0
  37. package/dist/components/atoms/input/__tests__/Input.test.js +28 -0
  38. package/dist/components/atoms/input/index.d.ts +2 -0
  39. package/dist/components/atoms/input/index.js +4 -0
  40. package/dist/components/atoms/input/styles.d.ts +14 -0
  41. package/dist/components/atoms/input/styles.js +415 -0
  42. package/dist/components/atoms/select/Select.d.ts +11 -0
  43. package/dist/components/atoms/select/Select.js +24 -0
  44. package/dist/components/atoms/select/__stories__/Select.stories.d.ts +8 -0
  45. package/dist/components/atoms/select/__tests__/Select.test.d.ts +1 -0
  46. package/dist/components/atoms/select/__tests__/Select.test.js +10735 -0
  47. package/dist/components/atoms/select/index.d.ts +2 -0
  48. package/dist/components/atoms/select/index.js +4 -0
  49. package/dist/components/atoms/select/styles.d.ts +15 -0
  50. package/dist/components/atoms/select/styles.js +3868 -0
  51. package/dist/components/atoms/typography/Typography.d.ts +11 -0
  52. package/dist/components/atoms/typography/Typography.js +44 -0
  53. package/dist/components/atoms/typography/__stories__/Typography.stories.d.ts +12 -0
  54. package/dist/components/atoms/typography/__tests__/Typography.test.d.ts +1 -0
  55. package/dist/components/atoms/typography/__tests__/Typography.test.js +16 -0
  56. package/dist/components/atoms/typography/index.d.ts +2 -0
  57. package/dist/components/atoms/typography/index.js +4 -0
  58. package/dist/components/atoms/typography/styles.d.ts +11 -0
  59. package/dist/components/atoms/typography/styles.js +28 -0
  60. package/dist/components/index.d.js +1 -0
  61. package/dist/components/index.d.ts +14 -0
  62. package/dist/components/index.js +16 -0
  63. package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.d.ts +10 -0
  64. package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.js +35 -0
  65. package/dist/components/molecules/error-boundary-fallback/__stories__/ErrorBoundaryFallback.stories.d.ts +8 -0
  66. package/dist/components/molecules/error-boundary-fallback/index.d.ts +1 -0
  67. package/dist/components/molecules/error-boundary-fallback/index.js +4 -0
  68. package/dist/components/molecules/error-boundary-fallback/styles.d.ts +1 -0
  69. package/dist/components/molecules/error-boundary-fallback/styles.js +930 -0
  70. package/dist/components/molecules/form/Form.d.ts +15 -0
  71. package/dist/components/molecules/form/Form.js +7 -0
  72. package/dist/components/molecules/form/__stories__/Form.stories.d.ts +7 -0
  73. package/dist/components/molecules/form/__stories__/FormStory.d.ts +1 -0
  74. package/dist/components/molecules/form/__stories__/FormStory.js +90 -0
  75. package/dist/components/molecules/form/index.d.ts +2 -0
  76. package/dist/components/molecules/form/index.js +4 -0
  77. package/dist/constants/index.d.ts +51 -0
  78. package/dist/constants/index.js +54 -0
  79. package/dist/context-CZsFJmh6.js +2093 -0
  80. package/dist/declaration.d.js +1 -0
  81. package/dist/genesis/GenesisThemeBreakdown.d.ts +4 -0
  82. package/dist/genesis/GenesisThemeBreakdown.js +56 -0
  83. package/dist/genesis/GenesisThemeDemo.d.ts +8 -0
  84. package/dist/genesis/GenesisThemeDemo.js +8 -0
  85. package/dist/genesis/GenesisThemeDemo.stories.d.ts +7 -0
  86. package/dist/genesis/styles.d.ts +12 -0
  87. package/dist/genesis/styles.js +4038 -0
  88. package/dist/index-3MWkSVA1.js +96 -0
  89. package/dist/index-BPtFqhcp.js +19110 -0
  90. package/dist/index-BQO27mgE.js +402 -0
  91. package/dist/index-BWys7dkb.js +4462 -0
  92. package/dist/index-C7kFNqp2.js +276 -0
  93. package/dist/index-D1v_7IIx.js +1057 -0
  94. package/dist/index-SAAXFt-P.js +946 -0
  95. package/dist/index-VDH3iLaC.js +884 -0
  96. package/dist/index.d.ts +2 -0
  97. package/dist/index.js +20 -0
  98. package/dist/isVisible-CNQjrJPN.js +366 -0
  99. package/dist/magic-string.es-BkUFmFT4.js +858 -0
  100. package/dist/presetColors-Cl8UP3Nw.js +4 -0
  101. package/dist/providers/GenesisProvider.d.ts +8 -0
  102. package/dist/providers/GenesisProvider.js +7 -0
  103. package/dist/providers/ThemeProvider.d.ts +9 -0
  104. package/dist/providers/ThemeProvider.js +18 -0
  105. package/dist/providers/index.d.ts +2 -0
  106. package/dist/providers/index.js +6 -0
  107. package/dist/reactNode-sKPeiqPL.js +12 -0
  108. package/dist/setup-CMYVZCPF.js +33883 -0
  109. package/dist/styled-components.browser.esm-CZ1XM4o4.js +1144 -0
  110. package/dist/styles/design-tokens/border-tokens/BorderTokenList.d.ts +1 -0
  111. package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +37 -0
  112. package/dist/styles/design-tokens/border-tokens/BorderTokens.stories.d.ts +6 -0
  113. package/dist/styles/design-tokens/color-tokens/ColorTokens.stories.d.ts +7 -0
  114. package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.d.ts +3 -0
  115. package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +36 -0
  116. package/dist/styles/design-tokens/sizing-tokens/index.stories.d.ts +7 -0
  117. package/dist/styles/design-tokens/typography/TypographyTokens.stories.d.ts +7 -0
  118. package/dist/styles/design-tokens/variables.d.ts +704 -0
  119. package/dist/styles/design-tokens/variables.js +697 -0
  120. package/dist/styles/global-styles.d.ts +1 -0
  121. package/dist/styles/global-styles.js +35 -0
  122. package/dist/styles/theme/genesis-theme.d.ts +75 -0
  123. package/dist/styles/theme/genesis-theme.js +896 -0
  124. package/dist/styles/theme/genesis-theme.types.d.ts +162 -0
  125. package/dist/styles/theme/genesis-theme.types.js +4 -0
  126. package/dist/styles/theme/global-styles.d.ts +1 -0
  127. package/dist/styles/theme/global-styles.js +35 -0
  128. package/dist/styles/theme/index.d.ts +1 -0
  129. package/dist/styles/theme/index.js +9 -0
  130. package/dist/test/setup.d.ts +5 -0
  131. package/dist/test/setup.js +7 -0
  132. package/dist/useVariants-CEpw6Ww6.js +29 -0
  133. package/dist/utils/getAppointmentColor.d.ts +4 -0
  134. package/dist/utils/getAppointmentColor.js +91 -0
  135. package/dist/utils/isAllEnglishString.d.ts +1 -0
  136. package/dist/utils/isAllEnglishString.js +8 -0
  137. package/dist/utils/isAllEnglishString.test.d.ts +1 -0
  138. package/dist/utils/isAllEnglishString.test.js +8 -0
  139. package/dist/utils/parseAddress.d.ts +3 -0
  140. package/dist/utils/parseAddress.js +19 -0
  141. package/dist/vite-env.d.js +1 -0
  142. package/package.json +115 -0
@@ -0,0 +1,415 @@
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
+ };
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { TYPE, STATE } from '../../../constants';
3
+ import { SelectProps as AntSelectProps } from 'antd/es/button';
4
+
5
+ export type GenesisSelectType = keyof typeof TYPE;
6
+ export interface SelectProps extends AntSelectProps {
7
+ type?: GenesisSelectType;
8
+ state?: keyof typeof STATE;
9
+ }
10
+ declare const Select: React.FC<SelectProps>;
11
+ export default Select;
@@ -0,0 +1,24 @@
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
+ };
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { default as Select } from '../Select';
3
+
4
+ declare const meta: Meta<typeof Select>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof Select>;
7
+ export declare const Default: Story;
8
+ export declare const DefaultValue: Story;