@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,5 +1,6 @@
1
- import { f as a } from "../../styled-components.browser.esm-CZ1XM4o4.js";
2
- const e = a`
1
+ import { f as r } from "../../styled-components.browser.esm-02f500bc.js";
2
+ import "react";
3
+ const i = r`
3
4
  h1, h2, h3, h4, h5, h6 {
4
5
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
5
6
  font-weight: 700;
@@ -31,5 +32,5 @@ const e = a`
31
32
  }
32
33
  `;
33
34
  export {
34
- e as GlobalStyles
35
+ i as GlobalStyles
35
36
  };
@@ -1,9 +1,10 @@
1
- import { TypographySizeKey as o, baseTokens as r, breakpoints as a, darkTheme as h, lightTheme as p, sizing as s } from "./genesis-theme.js";
1
+ import { TypographySizeKey as r, baseTokens as p, breakpoints as a, darkTheme as h, lightTheme as m, sizing as s } from "./genesis-theme.js";
2
+ import "../design-tokens/variables.js";
2
3
  export {
3
- o as TypographySizeKey,
4
- r as baseTokens,
4
+ r as TypographySizeKey,
5
+ p as baseTokens,
5
6
  a as breakpoints,
6
7
  h as darkTheme,
7
- p as lightTheme,
8
+ m as lightTheme,
8
9
  s as sizing
9
10
  };
@@ -1,7 +1,51 @@
1
1
  import "react/jsx-runtime";
2
- import { a as e } from "../setup-CMYVZCPF.js";
2
+ import { c as X } from "../setup-aaca7b6f.js";
3
+ import "@testing-library/react";
3
4
  import "../providers/GenesisProvider.js";
4
5
  import "../providers/ThemeProvider.js";
6
+ import "../index-89035ea5.js";
7
+ import "../presets-83ccb923.js";
8
+ import "react";
9
+ import "../styled-components.browser.esm-02f500bc.js";
10
+ import "../styles/theme/genesis-theme.js";
11
+ import "../styles/design-tokens/variables.js";
12
+ import "../constants/index.js";
13
+ import "../components/Button/styles.js";
14
+ import "../button-fa1c119c.js";
15
+ import "../isVisible-729780f5.js";
16
+ import "../index-4003d75b.js";
17
+ import "react-dom";
18
+ import "../index-e2b72ca8.js";
19
+ import "../reactNode-f4391605.js";
20
+ import "../Compact-c39ed20d.js";
21
+ import "../presetColors-ccf8cb4c.js";
22
+ import "../compact-item-b8f85aa6.js";
23
+ import "../AntdIcon-c395a1c4.js";
24
+ import "../components/Checkbox/styles.js";
25
+ import "../context-3b8a39af.js";
26
+ import "../components/ErrorBoundaryFallback/styles.js";
27
+ import "../ExclamationCircleFilled-23ef9812.js";
28
+ import "../CloseCircleFilled-ddc51e7e.js";
29
+ import "../components/Input/styles.js";
30
+ import "../TextArea-20825221.js";
31
+ import "../index-8c8d2d0c.js";
32
+ import "../useVariants-a0d64298.js";
33
+ import "../ContextIsolator-b09b2c52.js";
34
+ import "../pickAttrs-00ba4687.js";
35
+ import "../SearchOutlined-a9014e08.js";
36
+ import "../components/Select/styles.js";
37
+ import "../index-1a33c134.js";
38
+ import "../Overflow-a570fa69.js";
39
+ import "../DownOutlined-64a4732a.js";
40
+ import "../CheckOutlined-52d9ac25.js";
41
+ import "../CloseOutlined-14b8bba1.js";
42
+ import "../components/Typography/styles.js";
43
+ import "../index-501fc13d.js";
44
+ import "../index-0b9ee239.js";
45
+ import "../components/Badge/styles.js";
46
+ import "../InfoCircleFilled-c5f90c20.js";
47
+ import "../components/Toast/styles.js";
48
+ import "../collapse-345bc884.js";
5
49
  export {
6
- e as customRender
50
+ X as customRender
7
51
  };
@@ -0,0 +1,30 @@
1
+ import { c as g } from "./presets-83ccb923.js";
2
+ import * as u from "react";
3
+ import { V as m } from "./context-3b8a39af.js";
4
+ import { C as f, V } from "./index-4003d75b.js";
5
+ function p(n, t, e) {
6
+ return g({
7
+ [`${n}-status-success`]: t === "success",
8
+ [`${n}-status-warning`]: t === "warning",
9
+ [`${n}-status-error`]: t === "error",
10
+ [`${n}-status-validating`]: t === "validating",
11
+ [`${n}-has-feedback`]: e
12
+ });
13
+ }
14
+ const h = (n, t) => t || n, v = function(n, t) {
15
+ let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0;
16
+ var s, o;
17
+ const {
18
+ variant: c,
19
+ [n]: r
20
+ } = u.useContext(f), i = u.useContext(m), d = r == null ? void 0 : r.variant;
21
+ let a;
22
+ typeof t < "u" ? a = t : e === !1 ? a = "borderless" : a = (o = (s = i ?? d) !== null && s !== void 0 ? s : c) !== null && o !== void 0 ? o : "outlined";
23
+ const l = V.includes(a);
24
+ return [a, l];
25
+ }, w = v;
26
+ export {
27
+ p as a,
28
+ h as g,
29
+ w as u
30
+ };
@@ -1,5 +1,6 @@
1
1
  const i = (t) => {
2
- if (typeof t != "string" || !t || !t.trim()) return !1;
2
+ if (typeof t != "string" || !t || !t.trim())
3
+ return !1;
3
4
  const e = /[\x00-\x80]+/;
4
5
  return t.split("").every((n) => e.test(n));
5
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobolt/genesis",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "genesis design system",
5
5
  "author": "gobolt",
6
6
  "license": "MIT",
@@ -11,24 +11,9 @@
11
11
  "files": [
12
12
  "dist"
13
13
  ],
14
- "scripts": {
15
- "dev": "vite",
16
- "build": "tsc --extendedDiagnostics --p ./tsconfig-build.json && vite build",
17
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
18
- "preview": "vite preview",
19
- "prepublishOnly": "npm run build",
20
- "start": "storybook dev -p 6006",
21
- "storybook": "storybook dev -p 6006",
22
- "build-storybook": "storybook build",
23
- "test": "vitest run",
24
- "coverage": "vitest run --coverage",
25
- "generate": "tsx ./lab/generate/generate-component",
26
- "generate:story": "tsx ./lab/generate/generate-story",
27
- "test:watch": "vitest"
28
- },
29
14
  "peerDependencies": {
30
- "react": "^18.0.0",
31
- "react-dom": "^18.0.0"
15
+ "react": "^17.0.2",
16
+ "react-dom": "^17.0.2"
32
17
  },
33
18
  "devDependencies": {
34
19
  "@changesets/cli": "^2.27.8",
@@ -44,11 +29,11 @@
44
29
  "@storybook/test": "^8.5.0",
45
30
  "@storybook/test-runner": "^0.19.1",
46
31
  "@types/jest": "^29.5.11",
47
- "@types/react": "^18.2.37",
48
- "@types/react-dom": "^18.2.15",
32
+ "@types/react": "^17.0.38",
33
+ "@types/react-dom": "^17.0.11",
49
34
  "@typescript-eslint/eslint-plugin": "^6.10.0",
50
35
  "@typescript-eslint/parser": "^6.10.0",
51
- "@vitejs/plugin-react": "^4.2.1",
36
+ "@vitejs/plugin-react": "^4.0.0",
52
37
  "@vitest/browser": "^2.0.2",
53
38
  "eslint": "^8.57.1",
54
39
  "eslint-plugin-react-hooks": "^4.6.0",
@@ -57,16 +42,19 @@
57
42
  "glob": "^10.3.10",
58
43
  "jest": "^29.7.0",
59
44
  "jsdom": "^23.0.1",
60
- "react": "^18.2.0",
61
- "react-dom": "^18.2.0",
45
+ "react": "^17.0.2",
46
+ "react-dom": "^17.0.2",
62
47
  "rollup-plugin-dts": "^6.1.1",
63
48
  "storybook": "8.5.0",
64
49
  "tsx": "^4.19.2",
65
50
  "typescript": "^5.2.2",
66
- "vite": "^5.0.0",
51
+ "vite": "^4.3.9",
67
52
  "vite-plugin-dts": "^3.6.4",
68
53
  "vite-plugin-lib-inject-css": "^1.3.0",
69
- "vitest": "^2.1.8"
54
+ "vitest": "^2.1.8",
55
+ "@testing-library/react": "^12.1.5",
56
+ "@testing-library/dom": "^8.0.0",
57
+ "@testing-library/user-event": "^13.5.0"
70
58
  },
71
59
  "dependencies": {
72
60
  "@ant-design/icons": "^5.5.2",
@@ -80,13 +68,17 @@
80
68
  "@testing-library/react": "^14.1.2",
81
69
  "@testing-library/user-event": "^14.6.0",
82
70
  "antd": "^5.23.1",
71
+ "chalk": "^5.4.1",
83
72
  "clsx": "^1.1.0",
84
73
  "date-fns": "^3.6.0",
74
+ "rc-notification": "^5.6.2",
85
75
  "react-error-boundary": "^4.0.11",
86
76
  "rollup-plugin-css-only": "^4.5.2",
87
77
  "styled-components": "^6.1.14",
88
78
  "vite-plugin-css-injected-by-js": "^3.3.0",
89
- "vite-tsconfig-paths": "^5.1.4"
79
+ "vite-tsconfig-paths": "^5.1.4",
80
+ "react": "^17.0.2",
81
+ "react-dom": "^17.0.2"
90
82
  },
91
83
  "sideEffects": [
92
84
  "**/*.css"
@@ -111,5 +103,19 @@
111
103
  "bugs": {
112
104
  "url": "https://github.com/SecondCloset/genesis/issues"
113
105
  },
114
- "homepage": "https://github.com/SecondCloset/genesis#readme"
115
- }
106
+ "homepage": "https://github.com/SecondCloset/genesis#readme",
107
+ "scripts": {
108
+ "dev": "vite",
109
+ "build": "tsc --extendedDiagnostics --p ./tsconfig-build.json && vite build",
110
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
111
+ "preview": "vite preview",
112
+ "start": "storybook dev -p 6006",
113
+ "storybook": "storybook dev -p 6006",
114
+ "build-storybook": "storybook build",
115
+ "test": "vitest run",
116
+ "coverage": "vitest run --coverage",
117
+ "generate": "tsx ./lab/generate/generate-component",
118
+ "generate:story": "tsx ./lab/generate/generate-story",
119
+ "test:watch": "vitest"
120
+ }
121
+ }
@@ -1,200 +0,0 @@
1
- import { w as L, b, a as c, g as U, I, u as W, d as N, e as R, f as q, c as F, h, _ as G } from "./index-BWys7dkb.js";
2
- import * as f from "react";
3
- import x, { useContext as H, useEffect as J } from "react";
4
- function S(n) {
5
- var o;
6
- return n == null || (o = n.getRootNode) === null || o === void 0 ? void 0 : o.call(n);
7
- }
8
- function K(n) {
9
- return S(n) instanceof ShadowRoot;
10
- }
11
- function M(n) {
12
- return K(n) ? S(n) : null;
13
- }
14
- function Q(n) {
15
- return n.replace(/-(.)/g, function(o, e) {
16
- return e.toUpperCase();
17
- });
18
- }
19
- function V(n, o) {
20
- L(n, "[@ant-design/icons] ".concat(o));
21
- }
22
- function _(n) {
23
- return b(n) === "object" && typeof n.name == "string" && typeof n.theme == "string" && (b(n.icon) === "object" || typeof n.icon == "function");
24
- }
25
- function k() {
26
- var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
27
- return Object.keys(n).reduce(function(o, e) {
28
- var r = n[e];
29
- switch (e) {
30
- case "class":
31
- o.className = r, delete o.class;
32
- break;
33
- default:
34
- delete o[e], o[Q(e)] = r;
35
- }
36
- return o;
37
- }, {});
38
- }
39
- function T(n, o, e) {
40
- return e ? /* @__PURE__ */ x.createElement(n.tag, c(c({
41
- key: o
42
- }, k(n.attrs)), e), (n.children || []).map(function(r, t) {
43
- return T(r, "".concat(o, "-").concat(n.tag, "-").concat(t));
44
- })) : /* @__PURE__ */ x.createElement(n.tag, c({
45
- key: o
46
- }, k(n.attrs)), (n.children || []).map(function(r, t) {
47
- return T(r, "".concat(o, "-").concat(n.tag, "-").concat(t));
48
- }));
49
- }
50
- function z(n) {
51
- return U(n)[0];
52
- }
53
- function E(n) {
54
- return n ? Array.isArray(n) ? n : [n] : [];
55
- }
56
- var X = `
57
- .anticon {
58
- display: inline-flex;
59
- align-items: center;
60
- color: inherit;
61
- font-style: normal;
62
- line-height: 0;
63
- text-align: center;
64
- text-transform: none;
65
- vertical-align: -0.125em;
66
- text-rendering: optimizeLegibility;
67
- -webkit-font-smoothing: antialiased;
68
- -moz-osx-font-smoothing: grayscale;
69
- }
70
-
71
- .anticon > * {
72
- line-height: 1;
73
- }
74
-
75
- .anticon svg {
76
- display: inline-block;
77
- }
78
-
79
- .anticon::before {
80
- display: none;
81
- }
82
-
83
- .anticon .anticon-icon {
84
- display: block;
85
- }
86
-
87
- .anticon[tabindex] {
88
- cursor: pointer;
89
- }
90
-
91
- .anticon-spin::before,
92
- .anticon-spin {
93
- display: inline-block;
94
- -webkit-animation: loadingCircle 1s infinite linear;
95
- animation: loadingCircle 1s infinite linear;
96
- }
97
-
98
- @-webkit-keyframes loadingCircle {
99
- 100% {
100
- -webkit-transform: rotate(360deg);
101
- transform: rotate(360deg);
102
- }
103
- }
104
-
105
- @keyframes loadingCircle {
106
- 100% {
107
- -webkit-transform: rotate(360deg);
108
- transform: rotate(360deg);
109
- }
110
- }
111
- `, Y = function(o) {
112
- var e = H(I), r = e.csp, t = e.prefixCls, i = X;
113
- t && (i = i.replace(/anticon/g, t)), J(function() {
114
- var l = o.current, s = M(l);
115
- W(i, "@ant-design-icons", {
116
- prepend: !0,
117
- csp: r,
118
- attachTo: s
119
- });
120
- }, []);
121
- }, Z = ["icon", "className", "onClick", "style", "primaryColor", "secondaryColor"], m = {
122
- primaryColor: "#333",
123
- secondaryColor: "#E6E6E6",
124
- calculated: !1
125
- };
126
- function nn(n) {
127
- var o = n.primaryColor, e = n.secondaryColor;
128
- m.primaryColor = o, m.secondaryColor = e || z(o), m.calculated = !!e;
129
- }
130
- function on() {
131
- return c({}, m);
132
- }
133
- var d = function(o) {
134
- var e = o.icon, r = o.className, t = o.onClick, i = o.style, l = o.primaryColor, s = o.secondaryColor, y = N(o, Z), C = f.useRef(), u = m;
135
- if (l && (u = {
136
- primaryColor: l,
137
- secondaryColor: s || z(l)
138
- }), Y(C), V(_(e), "icon should be icon definiton, but got ".concat(e)), !_(e))
139
- return null;
140
- var a = e;
141
- return a && typeof a.icon == "function" && (a = c(c({}, a), {}, {
142
- icon: a.icon(u.primaryColor, u.secondaryColor)
143
- })), T(a.icon, "svg-".concat(a.name), c(c({
144
- className: r,
145
- onClick: t,
146
- style: i,
147
- "data-icon": a.name,
148
- width: "1em",
149
- height: "1em",
150
- fill: "currentColor",
151
- "aria-hidden": "true"
152
- }, y), {}, {
153
- ref: C
154
- }));
155
- };
156
- d.displayName = "IconReact";
157
- d.getTwoToneColors = on;
158
- d.setTwoToneColors = nn;
159
- function $(n) {
160
- var o = E(n), e = R(o, 2), r = e[0], t = e[1];
161
- return d.setTwoToneColors({
162
- primaryColor: r,
163
- secondaryColor: t
164
- });
165
- }
166
- function en() {
167
- var n = d.getTwoToneColors();
168
- return n.calculated ? [n.primaryColor, n.secondaryColor] : n.primaryColor;
169
- }
170
- var rn = ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "twoToneColor"];
171
- $(q.primary);
172
- var v = /* @__PURE__ */ f.forwardRef(function(n, o) {
173
- var e = n.className, r = n.icon, t = n.spin, i = n.rotate, l = n.tabIndex, s = n.onClick, y = n.twoToneColor, C = N(n, rn), u = f.useContext(I), a = u.prefixCls, g = a === void 0 ? "anticon" : a, j = u.rootClassName, A = F(j, g, h(h({}, "".concat(g, "-").concat(r.name), !!r.name), "".concat(g, "-spin"), !!t || r.name === "loading"), e), p = l;
174
- p === void 0 && s && (p = -1);
175
- var P = i ? {
176
- msTransform: "rotate(".concat(i, "deg)"),
177
- transform: "rotate(".concat(i, "deg)")
178
- } : void 0, B = E(y), w = R(B, 2), O = w[0], D = w[1];
179
- return /* @__PURE__ */ f.createElement("span", G({
180
- role: "img",
181
- "aria-label": r.name
182
- }, C, {
183
- ref: o,
184
- tabIndex: p,
185
- onClick: s,
186
- className: A
187
- }), /* @__PURE__ */ f.createElement(d, {
188
- icon: r,
189
- primaryColor: O,
190
- secondaryColor: D,
191
- style: P
192
- }));
193
- });
194
- v.displayName = "AntdIcon";
195
- v.getTwoToneColor = en;
196
- v.setTwoToneColor = $;
197
- export {
198
- v as I,
199
- M as g
200
- };