@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,276 @@
1
+ import * as r from "react";
2
+ import L, { useContext as X, useRef as Z } from "react";
3
+ import { a as ee, b as te, J as ne, K as oe, L as re, B as E, M as se, G as D, c as $, C as I, N as ae, k as ue, s as ie, t as ce } from "./index-BWys7dkb.js";
4
+ import { _ as A, a as g, i as le } from "./isVisible-CNQjrJPN.js";
5
+ import { c as de } from "./reactNode-sKPeiqPL.js";
6
+ import { R as U } from "./index-BPtFqhcp.js";
7
+ var _ = ee({}, U), fe = _.version, S = _.render, pe = _.unmountComponentAtNode, C;
8
+ try {
9
+ var me = Number((fe || "").split(".")[0]);
10
+ me >= 18 && (C = _.createRoot);
11
+ } catch {
12
+ }
13
+ function k(e) {
14
+ var t = _.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
15
+ t && te(t) === "object" && (t.usingClientEntryPoint = e);
16
+ }
17
+ var y = "__rc_react_root__";
18
+ function ve(e, t) {
19
+ k(!0);
20
+ var n = t[y] || C(t);
21
+ k(!1), n.render(e), t[y] = n;
22
+ }
23
+ function be(e, t) {
24
+ S == null || S(e, t);
25
+ }
26
+ function Re(e, t) {
27
+ if (C) {
28
+ ve(e, t);
29
+ return;
30
+ }
31
+ be(e, t);
32
+ }
33
+ function _e(e) {
34
+ return W.apply(this, arguments);
35
+ }
36
+ function W() {
37
+ return W = A(/* @__PURE__ */ g().mark(function e(t) {
38
+ return g().wrap(function(o) {
39
+ for (; ; ) switch (o.prev = o.next) {
40
+ case 0:
41
+ return o.abrupt("return", Promise.resolve().then(function() {
42
+ var s;
43
+ (s = t[y]) === null || s === void 0 || s.unmount(), delete t[y];
44
+ }));
45
+ case 1:
46
+ case "end":
47
+ return o.stop();
48
+ }
49
+ }, e);
50
+ })), W.apply(this, arguments);
51
+ }
52
+ function he(e) {
53
+ pe(e);
54
+ }
55
+ function Ee(e) {
56
+ return O.apply(this, arguments);
57
+ }
58
+ function O() {
59
+ return O = A(/* @__PURE__ */ g().mark(function e(t) {
60
+ return g().wrap(function(o) {
61
+ for (; ; ) switch (o.prev = o.next) {
62
+ case 0:
63
+ if (C === void 0) {
64
+ o.next = 2;
65
+ break;
66
+ }
67
+ return o.abrupt("return", _e(t));
68
+ case 2:
69
+ he(t);
70
+ case 3:
71
+ case "end":
72
+ return o.stop();
73
+ }
74
+ }, e);
75
+ })), O.apply(this, arguments);
76
+ }
77
+ const ge = (e, t) => {
78
+ if (process.env.NODE_ENV !== "production") {
79
+ const n = parseInt(r.version.split(".")[0], 10), o = Object.keys(U);
80
+ process.env.NODE_ENV !== "production" && ne(n < 19 || o.includes("createRoot"), "compatible", "antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.");
81
+ }
82
+ return Re(e, t), () => Ee(t);
83
+ };
84
+ let ye = ge;
85
+ function Ce() {
86
+ return ye;
87
+ }
88
+ const Se = (e) => {
89
+ const {
90
+ componentCls: t,
91
+ colorPrimary: n
92
+ } = e;
93
+ return {
94
+ [t]: {
95
+ position: "absolute",
96
+ background: "transparent",
97
+ pointerEvents: "none",
98
+ boxSizing: "border-box",
99
+ color: `var(--wave-color, ${n})`,
100
+ boxShadow: "0 0 0 0 currentcolor",
101
+ opacity: 0.2,
102
+ // =================== Motion ===================
103
+ "&.wave-motion-appear": {
104
+ transition: [`box-shadow 0.4s ${e.motionEaseOutCirc}`, `opacity 2s ${e.motionEaseOutCirc}`].join(","),
105
+ "&-active": {
106
+ boxShadow: "0 0 0 6px currentcolor",
107
+ opacity: 0
108
+ },
109
+ "&.wave-quick": {
110
+ transition: [`box-shadow ${e.motionDurationSlow} ${e.motionEaseInOut}`, `opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(",")
111
+ }
112
+ }
113
+ }
114
+ };
115
+ }, we = oe("Wave", (e) => [Se(e)]), j = `${re}-wave-target`;
116
+ function w(e) {
117
+ return e && e !== "#fff" && e !== "#ffffff" && e !== "rgb(255, 255, 255)" && e !== "rgba(255, 255, 255, 1)" && !/rgba\((?:\d*, ){3}0\)/.test(e) && // any transparent rgba color
118
+ e !== "transparent";
119
+ }
120
+ function Ne(e) {
121
+ const {
122
+ borderTopColor: t,
123
+ borderColor: n,
124
+ backgroundColor: o
125
+ } = getComputedStyle(e);
126
+ return w(t) ? t : w(n) ? n : w(o) ? o : null;
127
+ }
128
+ function N(e) {
129
+ return Number.isNaN(e) ? 0 : e;
130
+ }
131
+ const We = (e) => {
132
+ const {
133
+ className: t,
134
+ target: n,
135
+ component: o,
136
+ registerUnmount: s
137
+ } = e, i = r.useRef(null), c = r.useRef(null);
138
+ r.useEffect(() => {
139
+ c.current = s();
140
+ }, []);
141
+ const [d, h] = r.useState(null), [f, a] = r.useState([]), [m, v] = r.useState(0), [B, V] = r.useState(0), [P, F] = r.useState(0), [M, q] = r.useState(0), [z, K] = r.useState(!1), T = {
142
+ left: m,
143
+ top: B,
144
+ width: P,
145
+ height: M,
146
+ borderRadius: f.map((l) => `${l}px`).join(" ")
147
+ };
148
+ d && (T["--wave-color"] = d);
149
+ function x() {
150
+ const l = getComputedStyle(n);
151
+ h(Ne(n));
152
+ const u = l.position === "static", {
153
+ borderLeftWidth: p,
154
+ borderTopWidth: b
155
+ } = l;
156
+ v(u ? n.offsetLeft : N(-parseFloat(p))), V(u ? n.offsetTop : N(-parseFloat(b))), F(n.offsetWidth), q(n.offsetHeight);
157
+ const {
158
+ borderTopLeftRadius: R,
159
+ borderTopRightRadius: H,
160
+ borderBottomLeftRadius: Y,
161
+ borderBottomRightRadius: J
162
+ } = l;
163
+ a([R, H, J, Y].map((Q) => N(parseFloat(Q))));
164
+ }
165
+ if (r.useEffect(() => {
166
+ if (n) {
167
+ const l = E(() => {
168
+ x(), K(!0);
169
+ });
170
+ let u;
171
+ return typeof ResizeObserver < "u" && (u = new ResizeObserver(x), u.observe(n)), () => {
172
+ E.cancel(l), u == null || u.disconnect();
173
+ };
174
+ }
175
+ }, []), !z)
176
+ return null;
177
+ const G = (o === "Checkbox" || o === "Radio") && (n == null ? void 0 : n.classList.contains(j));
178
+ return /* @__PURE__ */ r.createElement(se, {
179
+ visible: !0,
180
+ motionAppear: !0,
181
+ motionName: "wave-motion",
182
+ motionDeadline: 5e3,
183
+ onAppearEnd: (l, u) => {
184
+ var p, b;
185
+ if (u.deadline || u.propertyName === "opacity") {
186
+ const R = (p = i.current) === null || p === void 0 ? void 0 : p.parentElement;
187
+ (b = c.current) === null || b === void 0 || b.call(c).then(() => {
188
+ R == null || R.remove();
189
+ });
190
+ }
191
+ return !1;
192
+ }
193
+ }, (l, u) => {
194
+ let {
195
+ className: p
196
+ } = l;
197
+ return /* @__PURE__ */ r.createElement("div", {
198
+ ref: D(i, u),
199
+ className: $(t, p, {
200
+ "wave-quick": G
201
+ }),
202
+ style: T
203
+ });
204
+ });
205
+ }, Oe = (e, t) => {
206
+ var n;
207
+ const {
208
+ component: o
209
+ } = t;
210
+ if (o === "Checkbox" && !(!((n = e.querySelector("input")) === null || n === void 0) && n.checked))
211
+ return;
212
+ const s = document.createElement("div");
213
+ s.style.position = "absolute", s.style.left = "0px", s.style.top = "0px", e == null || e.insertBefore(s, e == null ? void 0 : e.firstChild);
214
+ const i = Ce();
215
+ let c = null;
216
+ function d() {
217
+ return c;
218
+ }
219
+ c = i(/* @__PURE__ */ r.createElement(We, Object.assign({}, t, {
220
+ target: e,
221
+ registerUnmount: d
222
+ })), s);
223
+ }, Te = (e, t, n) => {
224
+ const {
225
+ wave: o
226
+ } = r.useContext(I), [, s, i] = ae(), c = ue((f) => {
227
+ const a = e.current;
228
+ if (o != null && o.disabled || !a)
229
+ return;
230
+ const m = a.querySelector(`.${j}`) || a, {
231
+ showEffect: v
232
+ } = o || {};
233
+ (v || Oe)(m, {
234
+ className: t,
235
+ token: s,
236
+ component: n,
237
+ event: f,
238
+ hashId: i
239
+ });
240
+ }), d = r.useRef(null);
241
+ return (f) => {
242
+ E.cancel(d.current), d.current = E(() => {
243
+ c(f);
244
+ });
245
+ };
246
+ }, xe = (e) => {
247
+ const {
248
+ children: t,
249
+ disabled: n,
250
+ component: o
251
+ } = e, {
252
+ getPrefixCls: s
253
+ } = X(I), i = Z(null), c = s("wave"), [, d] = we(c), h = Te(i, $(c, d), o);
254
+ if (L.useEffect(() => {
255
+ const a = i.current;
256
+ if (!a || a.nodeType !== 1 || n)
257
+ return;
258
+ const m = (v) => {
259
+ !le(v.target) || // No need wave
260
+ !a.getAttribute || a.getAttribute("disabled") || a.disabled || a.className.includes("disabled") || a.className.includes("-leave") || h(v);
261
+ };
262
+ return a.addEventListener("click", m, !0), () => {
263
+ a.removeEventListener("click", m, !0);
264
+ };
265
+ }, [n]), !/* @__PURE__ */ L.isValidElement(t))
266
+ return t ?? null;
267
+ const f = ie(t) ? D(ce(t), i) : i;
268
+ return de(t, {
269
+ ref: f
270
+ });
271
+ };
272
+ process.env.NODE_ENV !== "production" && (xe.displayName = "Wave");
273
+ export {
274
+ j as T,
275
+ xe as W
276
+ };