@gobolt/genesis 0.0.8 → 0.0.9

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 (170) hide show
  1. package/README.md +10 -0
  2. package/dist/{AntdIcon-c395a1c4.js → AntdIcon-BoLh1dP8.js} +66 -68
  3. package/dist/CheckOutlined-CeTKr6II.js +13 -0
  4. package/dist/{CloseCircleFilled-ddc51e7e.js → CloseCircleFilled-DXCxlIQL.js} +8 -11
  5. package/dist/{CloseOutlined-14b8bba1.js → CloseOutlined-ClXDNn82.js} +9 -12
  6. package/dist/{Compact-c39ed20d.js → Compact-CGY560JF.js} +63 -65
  7. package/dist/ContextIsolator-D5x2Ih51.js +20 -0
  8. package/dist/{ExclamationCircleFilled-23ef9812.js → ExclamationCircleFilled-C0Kj5KQV.js} +16 -22
  9. package/dist/KeyCode-DM2sFh3-.js +517 -0
  10. package/dist/LoadingOutlined-8EnJdZ7I.js +13 -0
  11. package/dist/{Overflow-a570fa69.js → Overflow-PBZD-PFm.js} +63 -64
  12. package/dist/{DownOutlined-64a4732a.js → PurePanel-BqPLRtc2.js} +67 -70
  13. package/dist/{SearchOutlined-a9014e08.js → SearchOutlined-BP3Z2K6j.js} +8 -11
  14. package/dist/{TextArea-20825221.js → TextArea-DKwCct3i.js} +583 -588
  15. package/dist/Typography-aGoDUl4R.js +710 -0
  16. package/dist/bundle.css +1204 -0
  17. package/dist/{button-fa1c119c.js → button-CDQgO1OK.js} +274 -278
  18. package/dist/{collapse-345bc884.js → collapse-Dtpt-6W_.js} +2 -2
  19. package/dist/compact-item-DH13cl8A.js +61 -0
  20. package/dist/components/Badge/Badge.d.ts +2 -2
  21. package/dist/components/Badge/Badge.js +63 -62
  22. package/dist/components/Badge/__tests__/Badge.test.js +11 -65
  23. package/dist/components/Badge/index.js +2 -21
  24. package/dist/components/Badge/styles.js +7 -8
  25. package/dist/components/Breadcrumb/Breadcrumb.js +8 -24
  26. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +21 -7
  27. package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +13 -60
  28. package/dist/components/Breadcrumb/index.js +2 -25
  29. package/dist/components/Breadcrumb/styles.d.ts +10 -6
  30. package/dist/components/Breadcrumb/styles.js +787 -808
  31. package/dist/components/Button/Button.d.ts +6 -4
  32. package/dist/components/Button/Button.js +20 -40
  33. package/dist/components/Button/__tests__/Button.test.js +9 -54
  34. package/dist/components/Button/index.js +2 -20
  35. package/dist/components/Button/styles.d.ts +9 -5
  36. package/dist/components/Button/styles.js +19 -30
  37. package/dist/components/Checkbox/Checkbox.js +8 -38
  38. package/dist/components/Checkbox/__tests__/Checkbox.test.js +16 -62
  39. package/dist/components/Checkbox/index.js +2 -47
  40. package/dist/components/Checkbox/styles.d.ts +8 -1
  41. package/dist/components/Checkbox/styles.js +181 -188
  42. package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.d.ts +2 -4
  43. package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +19 -51
  44. package/dist/components/ErrorBoundaryFallback/index.d.ts +1 -0
  45. package/dist/components/ErrorBoundaryFallback/index.js +2 -49
  46. package/dist/components/ErrorBoundaryFallback/styles.d.ts +1 -3
  47. package/dist/components/ErrorBoundaryFallback/styles.js +34 -37
  48. package/dist/components/Form/Form.d.ts +18 -5
  49. package/dist/components/Form/Form.js +4 -45
  50. package/dist/components/Form/__stories__/FormStory.js +44 -81
  51. package/dist/components/Form/__tests__/form.test.d.ts +1 -0
  52. package/dist/components/Form/__tests__/form.test.js +18 -0
  53. package/dist/components/Form/index.js +2 -46
  54. package/dist/components/Form/styles.d.ts +3 -0
  55. package/dist/components/Form/styles.js +5 -0
  56. package/dist/components/Input/Input.js +6 -29
  57. package/dist/components/Input/__tests__/Input.test.js +21 -66
  58. package/dist/components/Input/index.js +2 -29
  59. package/dist/components/Input/styles.d.ts +5 -2
  60. package/dist/components/Input/styles.js +319 -332
  61. package/dist/components/Message/Message.d.ts +4 -4
  62. package/dist/components/Message/Message.js +53 -80
  63. package/dist/components/Message/__tests__/Message.test.js +24 -70
  64. package/dist/components/Message/index.js +2 -48
  65. package/dist/components/Message/styles.d.ts +4 -1
  66. package/dist/components/Message/styles.js +24 -18
  67. package/dist/components/Notification/Notification.d.ts +11 -10
  68. package/dist/components/Notification/Notification.js +306 -372
  69. package/dist/components/Notification/NotificationRightChevron.d.ts +2 -0
  70. package/dist/components/Notification/NotificationRightChevron.js +23 -0
  71. package/dist/components/Notification/__tests__/Notification.test.js +8 -69
  72. package/dist/components/Notification/index.js +2 -59
  73. package/dist/components/Notification/styles.d.ts +13 -3
  74. package/dist/components/Notification/styles.js +36 -20
  75. package/dist/components/Radio/Radio.js +20 -106
  76. package/dist/components/Radio/RadioGroup.js +18 -71
  77. package/dist/components/Radio/__stories__/RadioGroup.stories.d.ts +1 -1
  78. package/dist/components/Radio/__tests__/RadioGroup.test.js +15 -70
  79. package/dist/components/Radio/index.d.ts +1 -1
  80. package/dist/components/Radio/index.js +2 -56
  81. package/dist/components/Select/DropdownChevron.d.ts +2 -0
  82. package/dist/components/Select/DropdownChevron.js +23 -0
  83. package/dist/components/Select/Select.d.ts +9 -4
  84. package/dist/components/Select/Select.js +29 -41
  85. package/dist/components/Select/__tests__/Select.test.js +10752 -93
  86. package/dist/components/Select/index.js +2 -28
  87. package/dist/components/Select/styles.d.ts +20 -6
  88. package/dist/components/Select/styles.js +1381 -1370
  89. package/dist/components/Toast/Toast.d.ts +4 -4
  90. package/dist/components/Toast/Toast.js +8 -37
  91. package/dist/components/Toast/__stories__/Toast.stories.d.ts +1 -0
  92. package/dist/components/Toast/__tests__/Toast.test.js +10 -55
  93. package/dist/components/Toast/index.js +2 -46
  94. package/dist/components/Toast/styles.d.ts +6 -1
  95. package/dist/components/Toast/styles.js +36 -21
  96. package/dist/components/Typography/Typography.d.ts +7 -4
  97. package/dist/components/Typography/Typography.js +2 -42
  98. package/dist/components/Typography/__stories__/Typography.stories.d.ts +1 -0
  99. package/dist/components/Typography/__tests__/Typography.test.js +19 -56
  100. package/dist/components/Typography/index.js +2 -46
  101. package/dist/components/Typography/styles.d.ts +18 -4
  102. package/dist/components/Typography/styles.js +36 -43
  103. package/dist/components/index.d.ts +13 -5
  104. package/dist/components/index.js +24 -70
  105. package/dist/{context-3b8a39af.js → context-BMW3aJEf.js} +538 -548
  106. package/dist/genesis/GenesisThemeBreakdown.js +38 -55
  107. package/dist/genesis/GenesisThemeDemo.js +3 -53
  108. package/dist/genesis/styles.d.ts +6 -2
  109. package/dist/genesis/styles.js +496 -521
  110. package/dist/{index-e2b72ca8.js → index-1CBpubM3.js} +97 -102
  111. package/dist/index-BZAhCB_K.js +97 -0
  112. package/dist/{index-501fc13d.js → index-C0SmxWLS.js} +367 -392
  113. package/dist/index-C8haFnXI.js +1112 -0
  114. package/dist/index-CfDY25LP.js +873 -0
  115. package/dist/index-DPW8XdWj.js +952 -0
  116. package/dist/{index-8c8d2d0c.js → index-bKlRxQp4.js} +114 -114
  117. package/dist/index-oK7z6jnz.js +22795 -0
  118. package/dist/index.d.ts +1 -0
  119. package/dist/index.js +31 -77
  120. package/dist/{isVisible-729780f5.js → isVisible-A-IfeFoT.js} +67 -94
  121. package/dist/{magic-string.es-b7491176.js → magic-string.es-D2FWSwU3.js} +56 -103
  122. package/dist/{pickAttrs-00ba4687.js → pickAttrs-B0YTfcV1.js} +1 -1
  123. package/dist/providers/GenesisProvider.d.ts +0 -5
  124. package/dist/providers/GenesisProvider.js +9 -59
  125. package/dist/providers/ThemeProvider.d.ts +1 -2
  126. package/dist/providers/ThemeProvider.js +11 -13
  127. package/dist/providers/ToastProvider.d.ts +11 -4
  128. package/dist/providers/ToastProvider.js +10 -39
  129. package/dist/providers/index.d.ts +2 -3
  130. package/dist/providers/index.js +4 -51
  131. package/dist/providers/useGenesis.d.ts +7 -0
  132. package/dist/providers/useGenesis.js +6 -0
  133. package/dist/setup-BvfREoHl.js +33891 -0
  134. package/dist/{styled-components.browser.esm-02f500bc.js → styled-components.browser.esm-CZ1XM4o4.js} +72 -134
  135. package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +15 -45
  136. package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +15 -45
  137. package/dist/styles/design-tokens/{typography → typography-tokens}/TypographyTokens.stories.d.ts +1 -0
  138. package/dist/styles/design-tokens/variables.d.ts +10 -10
  139. package/dist/styles/design-tokens/variables.js +1 -1
  140. package/dist/styles/global-styles.d.ts +1 -0
  141. package/dist/styles/global-styles.js +14 -31
  142. package/dist/styles/theme/genesis-theme.js +257 -212
  143. package/dist/styles/theme/genesis-theme.types.d.ts +46 -0
  144. package/dist/styles/theme/index.js +4 -5
  145. package/dist/styles-CT_fyXBd.js +1808 -0
  146. package/dist/test/setup.js +3 -46
  147. package/dist/useLocale-DT-z_vQ6.js +16 -0
  148. package/dist/useVariants-DvhXfgJY.js +30 -0
  149. package/dist/utils/isAllEnglishString.js +1 -2
  150. package/dist/{presets-83ccb923.js → warning-C63HNL9U.js} +358 -356
  151. package/package.json +35 -35
  152. package/dist/CheckOutlined-52d9ac25.js +0 -29
  153. package/dist/ContextIsolator-b09b2c52.js +0 -20
  154. package/dist/EllipsisOutlined-60122660.js +0 -1115
  155. package/dist/InfoCircleFilled-c5f90c20.js +0 -16
  156. package/dist/RightOutlined-83515eb4.js +0 -16
  157. package/dist/compact-item-b8f85aa6.js +0 -75
  158. package/dist/index-0a886e53.js +0 -100
  159. package/dist/index-0b9ee239.js +0 -955
  160. package/dist/index-1a33c134.js +0 -1389
  161. package/dist/index-4003d75b.js +0 -3748
  162. package/dist/index-89035ea5.js +0 -3242
  163. package/dist/providers/ToastWrapper.d.ts +0 -7
  164. package/dist/providers/ToastWrapper.js +0 -56
  165. package/dist/setup-aaca7b6f.js +0 -21158
  166. package/dist/styles/theme/global-styles.d.ts +0 -1
  167. package/dist/styles/theme/global-styles.js +0 -36
  168. package/dist/useVariants-a0d64298.js +0 -30
  169. /package/dist/{presetColors-ccf8cb4c.js → presetColors-Cl8UP3Nw.js} +0 -0
  170. /package/dist/{reactNode-f4391605.js → reactNode-sKPeiqPL.js} +0 -0
@@ -1,34 +1,32 @@
1
- import { d as ne } from "../../styled-components.browser.esm-02f500bc.js";
2
- import * as c from "react";
3
- import X, { forwardRef as te, useRef as G, useImperativeHandle as ae } from "react";
4
- import { e as ce, f as le, c as I, h as M, a as ie, _ as L } from "../../presets-83ccb923.js";
5
- import { u as se, o as de } from "../../isVisible-729780f5.js";
6
- import { w as W, g as ue, m as be, r as z, o as he, p as q, C as K, D as fe, q as pe, t as xe, v as H } from "../../index-4003d75b.js";
7
- import { T as Ce, W as ve } from "../../index-e2b72ca8.js";
8
- import { F as ge, u as U } from "../../context-3b8a39af.js";
9
- import "react-dom";
10
- import "../../reactNode-f4391605.js";
11
- var me = ["prefixCls", "className", "style", "checked", "disabled", "defaultChecked", "type", "title", "onChange"], ke = /* @__PURE__ */ te(function(e, o) {
12
- var r = e.prefixCls, n = r === void 0 ? "rc-checkbox" : r, s = e.className, C = e.style, $ = e.checked, f = e.disabled, O = e.defaultChecked, y = O === void 0 ? !1 : O, d = e.type, S = d === void 0 ? "checkbox" : d, P = e.title, l = e.onChange, E = ce(e, me), v = G(null), u = G(null), t = se(y, {
1
+ import { d as re } from "../../styled-components.browser.esm-CZ1XM4o4.js";
2
+ import * as t from "react";
3
+ import X, { forwardRef as ne, useRef as L, useImperativeHandle as oe } from "react";
4
+ import { e as ae, f as ce, c as F, h as G, a as te, _ as T } from "../../warning-C63HNL9U.js";
5
+ import { u as le, o as ie } from "../../isVisible-A-IfeFoT.js";
6
+ import { w as W, g as se, m as de, o as z, p as ue, q, C as K, D as be, t as fe, v as he, x as H } from "../../index-oK7z6jnz.js";
7
+ import { T as pe, W as xe } from "../../index-1CBpubM3.js";
8
+ import { F as Ce, u as U } from "../../context-BMW3aJEf.js";
9
+ var me = ["prefixCls", "className", "style", "checked", "disabled", "defaultChecked", "type", "title", "onChange"], ge = /* @__PURE__ */ ne(function(e, r) {
10
+ var n = e.prefixCls, o = n === void 0 ? "rc-checkbox" : n, s = e.className, C = e.style, $ = e.checked, h = e.disabled, O = e.defaultChecked, y = O === void 0 ? !1 : O, d = e.type, S = d === void 0 ? "checkbox" : d, P = e.title, l = e.onChange, E = ae(e, me), m = L(null), u = L(null), a = le(y, {
13
11
  value: $
14
- }), _ = le(t, 2), N = _[0], A = _[1];
15
- ae(o, function() {
12
+ }), _ = ce(a, 2), N = _[0], A = _[1];
13
+ oe(r, function() {
16
14
  return {
17
15
  focus: function(i) {
18
- var h;
19
- (h = v.current) === null || h === void 0 || h.focus(i);
16
+ var f;
17
+ (f = m.current) === null || f === void 0 || f.focus(i);
20
18
  },
21
19
  blur: function() {
22
20
  var i;
23
- (i = v.current) === null || i === void 0 || i.blur();
21
+ (i = m.current) === null || i === void 0 || i.blur();
24
22
  },
25
- input: v.current,
23
+ input: m.current,
26
24
  nativeElement: u.current
27
25
  };
28
26
  });
29
- var b = I(n, s, M(M({}, "".concat(n, "-checked"), N), "".concat(n, "-disabled"), f)), p = function(i) {
30
- f || ("checked" in e || A(i.target.checked), l == null || l({
31
- target: L(L({}, e), {}, {
27
+ var b = F(o, s, G(G({}, "".concat(o, "-checked"), N), "".concat(o, "-disabled"), h)), p = function(i) {
28
+ h || ("checked" in e || A(i.target.checked), l == null || l({
29
+ target: T(T({}, e), {}, {
32
30
  type: S,
33
31
  checked: i.target.checked
34
32
  }),
@@ -41,43 +39,43 @@ var me = ["prefixCls", "className", "style", "checked", "disabled", "defaultChec
41
39
  nativeEvent: i.nativeEvent
42
40
  }));
43
41
  };
44
- return /* @__PURE__ */ c.createElement("span", {
42
+ return /* @__PURE__ */ t.createElement("span", {
45
43
  className: b,
46
44
  title: P,
47
45
  style: C,
48
46
  ref: u
49
- }, /* @__PURE__ */ c.createElement("input", ie({}, E, {
50
- className: "".concat(n, "-input"),
51
- ref: v,
47
+ }, /* @__PURE__ */ t.createElement("input", te({}, E, {
48
+ className: "".concat(o, "-input"),
49
+ ref: m,
52
50
  onChange: p,
53
- disabled: f,
51
+ disabled: h,
54
52
  checked: !!N,
55
53
  type: S
56
- })), /* @__PURE__ */ c.createElement("span", {
57
- className: "".concat(n, "-inner")
54
+ })), /* @__PURE__ */ t.createElement("span", {
55
+ className: "".concat(o, "-inner")
58
56
  }));
59
57
  });
60
- function $e(e) {
61
- const o = X.useRef(null), r = () => {
62
- W.cancel(o.current), o.current = null;
58
+ function ke(e) {
59
+ const r = X.useRef(null), n = () => {
60
+ W.cancel(r.current), r.current = null;
63
61
  };
64
62
  return [() => {
65
- r(), o.current = W(() => {
66
- o.current = null;
63
+ n(), r.current = W(() => {
64
+ r.current = null;
67
65
  });
68
66
  }, (C) => {
69
- o.current && (C.stopPropagation(), r()), e == null || e(C);
67
+ r.current && (C.stopPropagation(), n()), e == null || e(C);
70
68
  }];
71
69
  }
72
- const ye = (e) => {
70
+ const ve = (e) => {
73
71
  const {
74
- checkboxCls: o
75
- } = e, r = `${o}-wrapper`;
72
+ checkboxCls: r
73
+ } = e, n = `${r}-wrapper`;
76
74
  return [
77
75
  // ===================== Basic =====================
78
76
  {
79
77
  // Group
80
- [`${o}-group`]: Object.assign(Object.assign({}, z(e)), {
78
+ [`${r}-group`]: Object.assign(Object.assign({}, z(e)), {
81
79
  display: "inline-flex",
82
80
  flexWrap: "wrap",
83
81
  columnGap: e.marginXS,
@@ -87,7 +85,7 @@ const ye = (e) => {
87
85
  }
88
86
  }),
89
87
  // Wrapper
90
- [r]: Object.assign(Object.assign({}, z(e)), {
88
+ [n]: Object.assign(Object.assign({}, z(e)), {
91
89
  display: "inline-flex",
92
90
  alignItems: "baseline",
93
91
  cursor: "pointer",
@@ -99,10 +97,10 @@ const ye = (e) => {
99
97
  content: "'\\a0'"
100
98
  },
101
99
  // Checkbox near checkbox
102
- [`& + ${r}`]: {
100
+ [`& + ${n}`]: {
103
101
  marginInlineStart: 0
104
102
  },
105
- [`&${r}-in-form-item`]: {
103
+ [`&${n}-in-form-item`]: {
106
104
  'input[type="checkbox"]': {
107
105
  width: 14,
108
106
  // FIXME: magic
@@ -112,7 +110,7 @@ const ye = (e) => {
112
110
  }
113
111
  }),
114
112
  // Wrapper > Checkbox
115
- [o]: Object.assign(Object.assign({}, z(e)), {
113
+ [r]: Object.assign(Object.assign({}, z(e)), {
116
114
  position: "relative",
117
115
  whiteSpace: "nowrap",
118
116
  lineHeight: 1,
@@ -122,7 +120,7 @@ const ye = (e) => {
122
120
  // Ref: https://github.com/ant-design/ant-design/issues/41564
123
121
  alignSelf: "center",
124
122
  // Wrapper > Checkbox > input
125
- [`${o}-input`]: {
123
+ [`${r}-input`]: {
126
124
  position: "absolute",
127
125
  // Since baseline align will get additional space offset,
128
126
  // we need to move input to top to make it align with text.
@@ -132,10 +130,10 @@ const ye = (e) => {
132
130
  cursor: "pointer",
133
131
  opacity: 0,
134
132
  margin: 0,
135
- [`&:focus-visible + ${o}-inner`]: Object.assign({}, he(e))
133
+ [`&:focus-visible + ${r}-inner`]: Object.assign({}, ue(e))
136
134
  },
137
135
  // Wrapper > Checkbox > inner
138
- [`${o}-inner`]: {
136
+ [`${r}-inner`]: {
139
137
  boxSizing: "border-box",
140
138
  display: "block",
141
139
  width: e.checkboxSize,
@@ -174,19 +172,19 @@ const ye = (e) => {
174
172
  {
175
173
  // Wrapper & Wrapper > Checkbox
176
174
  [`
177
- ${r}:not(${r}-disabled),
178
- ${o}:not(${o}-disabled)
175
+ ${n}:not(${n}-disabled),
176
+ ${r}:not(${r}-disabled)
179
177
  `]: {
180
- [`&:hover ${o}-inner`]: {
178
+ [`&:hover ${r}-inner`]: {
181
179
  borderColor: e.colorPrimary
182
180
  }
183
181
  },
184
- [`${r}:not(${r}-disabled)`]: {
185
- [`&:hover ${o}-checked:not(${o}-disabled) ${o}-inner`]: {
182
+ [`${n}:not(${n}-disabled)`]: {
183
+ [`&:hover ${r}-checked:not(${r}-disabled) ${r}-inner`]: {
186
184
  backgroundColor: e.colorPrimaryHover,
187
185
  borderColor: "transparent"
188
186
  },
189
- [`&:hover ${o}-checked:not(${o}-disabled):after`]: {
187
+ [`&:hover ${r}-checked:not(${r}-disabled):after`]: {
190
188
  borderColor: e.colorPrimaryHover
191
189
  }
192
190
  }
@@ -194,8 +192,8 @@ const ye = (e) => {
194
192
  // ==================== Checked ====================
195
193
  {
196
194
  // Wrapper > Checkbox
197
- [`${o}-checked`]: {
198
- [`${o}-inner`]: {
195
+ [`${r}-checked`]: {
196
+ [`${r}-inner`]: {
199
197
  backgroundColor: e.colorPrimary,
200
198
  borderColor: e.colorPrimary,
201
199
  "&:after": {
@@ -206,10 +204,10 @@ const ye = (e) => {
206
204
  }
207
205
  },
208
206
  [`
209
- ${r}-checked:not(${r}-disabled),
210
- ${o}-checked:not(${o}-disabled)
207
+ ${n}-checked:not(${n}-disabled),
208
+ ${r}-checked:not(${r}-disabled)
211
209
  `]: {
212
- [`&:hover ${o}-inner`]: {
210
+ [`&:hover ${r}-inner`]: {
213
211
  backgroundColor: e.colorPrimaryHover,
214
212
  borderColor: "transparent"
215
213
  }
@@ -217,10 +215,10 @@ const ye = (e) => {
217
215
  },
218
216
  // ================= Indeterminate =================
219
217
  {
220
- [o]: {
218
+ [r]: {
221
219
  "&-indeterminate": {
222
220
  // Wrapper > Checkbox > inner
223
- [`${o}-inner`]: {
221
+ [`${r}-inner`]: {
224
222
  backgroundColor: `${e.colorBgContainer} !important`,
225
223
  borderColor: `${e.colorBorder} !important`,
226
224
  "&:after": {
@@ -236,7 +234,7 @@ const ye = (e) => {
236
234
  }
237
235
  },
238
236
  // https://github.com/ant-design/ant-design/issues/50074
239
- [`&:hover ${o}-inner`]: {
237
+ [`&:hover ${r}-inner`]: {
240
238
  backgroundColor: `${e.colorBgContainer} !important`,
241
239
  borderColor: `${e.colorPrimary} !important`
242
240
  }
@@ -246,20 +244,20 @@ const ye = (e) => {
246
244
  // ==================== Disable ====================
247
245
  {
248
246
  // Wrapper
249
- [`${r}-disabled`]: {
247
+ [`${n}-disabled`]: {
250
248
  cursor: "not-allowed"
251
249
  },
252
250
  // Wrapper > Checkbox
253
- [`${o}-disabled`]: {
251
+ [`${r}-disabled`]: {
254
252
  // Wrapper > Checkbox > input
255
- [`&, ${o}-input`]: {
253
+ [`&, ${r}-input`]: {
256
254
  cursor: "not-allowed",
257
255
  // Disabled for native input to enable Tooltip event handler
258
256
  // ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-1365075901
259
257
  pointerEvents: "none"
260
258
  },
261
259
  // Wrapper > Checkbox > inner
262
- [`${o}-inner`]: {
260
+ [`${r}-inner`]: {
263
261
  background: e.colorBgContainerDisabled,
264
262
  borderColor: e.colorBorder,
265
263
  "&:after": {
@@ -272,154 +270,149 @@ const ye = (e) => {
272
270
  "& + span": {
273
271
  color: e.colorTextDisabled
274
272
  },
275
- [`&${o}-indeterminate ${o}-inner::after`]: {
273
+ [`&${r}-indeterminate ${r}-inner::after`]: {
276
274
  background: e.colorTextDisabled
277
275
  }
278
276
  }
279
277
  }
280
278
  ];
281
279
  };
282
- function Se(e, o) {
283
- const r = be(o, {
280
+ function $e(e, r) {
281
+ const n = de(r, {
284
282
  checkboxCls: `.${e}`,
285
- checkboxSize: o.controlInteractiveSize
283
+ checkboxSize: r.controlInteractiveSize
286
284
  });
287
- return [ye(r)];
285
+ return [ve(n)];
288
286
  }
289
- const J = ue("Checkbox", (e, o) => {
287
+ const J = se("Checkbox", (e, r) => {
290
288
  let {
291
- prefixCls: r
292
- } = o;
293
- return [Se(r, e)];
294
- }), Ae = /* @__PURE__ */ X.createContext(null), Q = Ae;
295
- var we = globalThis && globalThis.__rest || function(e, o) {
296
- var r = {};
297
- for (var n in e)
298
- Object.prototype.hasOwnProperty.call(e, n) && o.indexOf(n) < 0 && (r[n] = e[n]);
299
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
300
- for (var s = 0, n = Object.getOwnPropertySymbols(e); s < n.length; s++)
301
- o.indexOf(n[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[s]) && (r[n[s]] = e[n[s]]);
302
- return r;
289
+ prefixCls: n
290
+ } = r;
291
+ return [$e(n, e)];
292
+ }), Q = /* @__PURE__ */ X.createContext(null);
293
+ var ye = function(e, r) {
294
+ var n = {};
295
+ for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && r.indexOf(o) < 0 && (n[o] = e[o]);
296
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var s = 0, o = Object.getOwnPropertySymbols(e); s < o.length; s++)
297
+ r.indexOf(o[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[s]) && (n[o[s]] = e[o[s]]);
298
+ return n;
303
299
  };
304
- const Oe = (e, o) => {
305
- var r;
300
+ const Se = (e, r) => {
301
+ var n;
306
302
  const {
307
- prefixCls: n,
303
+ prefixCls: o,
308
304
  className: s,
309
305
  rootClassName: C,
310
306
  children: $,
311
- indeterminate: f = !1,
307
+ indeterminate: h = !1,
312
308
  style: O,
313
309
  onMouseEnter: y,
314
310
  onMouseLeave: d,
315
311
  skipGroup: S = !1,
316
312
  disabled: P
317
- } = e, l = we(e, ["prefixCls", "className", "rootClassName", "children", "indeterminate", "style", "onMouseEnter", "onMouseLeave", "skipGroup", "disabled"]), {
313
+ } = e, l = ye(e, ["prefixCls", "className", "rootClassName", "children", "indeterminate", "style", "onMouseEnter", "onMouseLeave", "skipGroup", "disabled"]), {
318
314
  getPrefixCls: E,
319
- direction: v,
315
+ direction: m,
320
316
  checkbox: u
321
- } = c.useContext(K), t = c.useContext(Q), {
317
+ } = t.useContext(K), a = t.useContext(Q), {
322
318
  isFormItemInput: _
323
- } = c.useContext(ge), N = c.useContext(fe), A = (r = (t == null ? void 0 : t.disabled) || P) !== null && r !== void 0 ? r : N, b = c.useRef(l.value), p = c.useRef(null), w = pe(o, p);
319
+ } = t.useContext(Ce), N = t.useContext(be), A = (n = (a == null ? void 0 : a.disabled) || P) !== null && n !== void 0 ? n : N, b = t.useRef(l.value), p = t.useRef(null), w = fe(r, p);
324
320
  if (process.env.NODE_ENV !== "production") {
325
- const x = xe("Checkbox");
326
- process.env.NODE_ENV !== "production" && x("checked" in l || !!t || !("value" in l), "usage", "`value` is not a valid prop, do you mean `checked`?");
321
+ const x = he("Checkbox");
322
+ process.env.NODE_ENV !== "production" && x("checked" in l || !!a || !("value" in l), "usage", "`value` is not a valid prop, do you mean `checked`?");
327
323
  }
328
- c.useEffect(() => {
329
- t == null || t.registerValue(l.value);
330
- }, []), c.useEffect(() => {
324
+ t.useEffect(() => {
325
+ a == null || a.registerValue(l.value);
326
+ }, []), t.useEffect(() => {
331
327
  if (!S)
332
- return l.value !== b.current && (t == null || t.cancelValue(b.current), t == null || t.registerValue(l.value), b.current = l.value), () => t == null ? void 0 : t.cancelValue(l.value);
333
- }, [l.value]), c.useEffect(() => {
328
+ return l.value !== b.current && (a == null || a.cancelValue(b.current), a == null || a.registerValue(l.value), b.current = l.value), () => a == null ? void 0 : a.cancelValue(l.value);
329
+ }, [l.value]), t.useEffect(() => {
334
330
  var x;
335
- !((x = p.current) === null || x === void 0) && x.input && (p.current.input.indeterminate = f);
336
- }, [f]);
337
- const i = E("checkbox", n), h = U(i), [j, F, D] = J(i, h), g = Object.assign({}, l);
338
- t && !S && (g.onChange = function() {
339
- l.onChange && l.onChange.apply(l, arguments), t.toggleOption && t.toggleOption({
331
+ !((x = p.current) === null || x === void 0) && x.input && (p.current.input.indeterminate = h);
332
+ }, [h]);
333
+ const i = E("checkbox", o), f = U(i), [V, R, j] = J(i, f), g = Object.assign({}, l);
334
+ a && !S && (g.onChange = function() {
335
+ l.onChange && l.onChange.apply(l, arguments), a.toggleOption && a.toggleOption({
340
336
  label: $,
341
337
  value: l.value
342
338
  });
343
- }, g.name = t.name, g.checked = t.value.includes(l.value));
344
- const B = I(`${i}-wrapper`, {
345
- [`${i}-rtl`]: v === "rtl",
339
+ }, g.name = a.name, g.checked = a.value.includes(l.value));
340
+ const D = F(`${i}-wrapper`, {
341
+ [`${i}-rtl`]: m === "rtl",
346
342
  [`${i}-wrapper-checked`]: g.checked,
347
343
  [`${i}-wrapper-disabled`]: A,
348
344
  [`${i}-wrapper-in-form-item`]: _
349
- }, u == null ? void 0 : u.className, s, C, D, h, F), a = I({
350
- [`${i}-indeterminate`]: f
351
- }, Ce, F), [m, k] = $e(g.onClick);
352
- return j(/* @__PURE__ */ c.createElement(ve, {
345
+ }, u == null ? void 0 : u.className, s, C, j, f, R), c = F({
346
+ [`${i}-indeterminate`]: h
347
+ }, pe, R), [k, v] = ke(g.onClick);
348
+ return V(/* @__PURE__ */ t.createElement(xe, {
353
349
  component: "Checkbox",
354
350
  disabled: A
355
- }, /* @__PURE__ */ c.createElement("label", {
356
- className: B,
351
+ }, /* @__PURE__ */ t.createElement("label", {
352
+ className: D,
357
353
  style: Object.assign(Object.assign({}, u == null ? void 0 : u.style), O),
358
354
  onMouseEnter: y,
359
355
  onMouseLeave: d,
360
- onClick: m
361
- }, /* @__PURE__ */ c.createElement(ke, Object.assign({}, g, {
362
- onClick: k,
356
+ onClick: k
357
+ }, /* @__PURE__ */ t.createElement(ge, Object.assign({}, g, {
358
+ onClick: v,
363
359
  prefixCls: i,
364
- className: a,
360
+ className: c,
365
361
  disabled: A,
366
362
  ref: w
367
- })), $ !== void 0 && /* @__PURE__ */ c.createElement("span", null, $))));
368
- }, Y = /* @__PURE__ */ c.forwardRef(Oe);
369
- process.env.NODE_ENV !== "production" && (Y.displayName = "Checkbox");
370
- const Z = Y;
371
- var Ee = globalThis && globalThis.__rest || function(e, o) {
372
- var r = {};
373
- for (var n in e)
374
- Object.prototype.hasOwnProperty.call(e, n) && o.indexOf(n) < 0 && (r[n] = e[n]);
375
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
376
- for (var s = 0, n = Object.getOwnPropertySymbols(e); s < n.length; s++)
377
- o.indexOf(n[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[s]) && (r[n[s]] = e[n[s]]);
378
- return r;
363
+ })), $ !== void 0 && /* @__PURE__ */ t.createElement("span", null, $))));
364
+ }, M = /* @__PURE__ */ t.forwardRef(Se);
365
+ process.env.NODE_ENV !== "production" && (M.displayName = "Checkbox");
366
+ var Ae = function(e, r) {
367
+ var n = {};
368
+ for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && r.indexOf(o) < 0 && (n[o] = e[o]);
369
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var s = 0, o = Object.getOwnPropertySymbols(e); s < o.length; s++)
370
+ r.indexOf(o[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[s]) && (n[o[s]] = e[o[s]]);
371
+ return n;
379
372
  };
380
- const _e = /* @__PURE__ */ c.forwardRef((e, o) => {
373
+ const we = /* @__PURE__ */ t.forwardRef((e, r) => {
381
374
  const {
382
- defaultValue: r,
383
- children: n,
375
+ defaultValue: n,
376
+ children: o,
384
377
  options: s = [],
385
378
  prefixCls: C,
386
379
  className: $,
387
- rootClassName: f,
380
+ rootClassName: h,
388
381
  style: O,
389
382
  onChange: y
390
- } = e, d = Ee(e, ["defaultValue", "children", "options", "prefixCls", "className", "rootClassName", "style", "onChange"]), {
383
+ } = e, d = Ae(e, ["defaultValue", "children", "options", "prefixCls", "className", "rootClassName", "style", "onChange"]), {
391
384
  getPrefixCls: S,
392
385
  direction: P
393
- } = c.useContext(K), [l, E] = c.useState(d.value || r || []), [v, u] = c.useState([]);
394
- c.useEffect(() => {
386
+ } = t.useContext(K), [l, E] = t.useState(d.value || n || []), [m, u] = t.useState([]);
387
+ t.useEffect(() => {
395
388
  "value" in d && E(d.value || []);
396
389
  }, [d.value]);
397
- const t = c.useMemo(() => s.map((a) => typeof a == "string" || typeof a == "number" ? {
398
- label: a,
399
- value: a
400
- } : a), [s]), _ = (a) => {
401
- u((m) => m.filter((k) => k !== a));
402
- }, N = (a) => {
403
- u((m) => [].concat(H(m), [a]));
404
- }, A = (a) => {
405
- const m = l.indexOf(a.value), k = H(l);
406
- m === -1 ? k.push(a.value) : k.splice(m, 1), "value" in d || E(k), y == null || y(k.filter((x) => v.includes(x)).sort((x, ee) => {
407
- const oe = t.findIndex((T) => T.value === x), re = t.findIndex((T) => T.value === ee);
408
- return oe - re;
390
+ const a = t.useMemo(() => s.map((c) => typeof c == "string" || typeof c == "number" ? {
391
+ label: c,
392
+ value: c
393
+ } : c), [s]), _ = (c) => {
394
+ u((k) => k.filter((v) => v !== c));
395
+ }, N = (c) => {
396
+ u((k) => [].concat(H(k), [c]));
397
+ }, A = (c) => {
398
+ const k = l.indexOf(c.value), v = H(l);
399
+ k === -1 ? v.push(c.value) : v.splice(k, 1), "value" in d || E(v), y == null || y(v.filter((x) => m.includes(x)).sort((x, Y) => {
400
+ const Z = a.findIndex((B) => B.value === x), ee = a.findIndex((B) => B.value === Y);
401
+ return Z - ee;
409
402
  }));
410
- }, b = S("checkbox", C), p = `${b}-group`, w = U(b), [i, h, j] = J(b, w), F = de(d, ["value", "disabled"]), D = s.length ? t.map((a) => /* @__PURE__ */ c.createElement(Z, {
403
+ }, b = S("checkbox", C), p = `${b}-group`, w = U(b), [i, f, V] = J(b, w), R = ie(d, ["value", "disabled"]), j = s.length ? a.map((c) => /* @__PURE__ */ t.createElement(M, {
411
404
  prefixCls: b,
412
- key: a.value.toString(),
413
- disabled: "disabled" in a ? a.disabled : d.disabled,
414
- value: a.value,
415
- checked: l.includes(a.value),
416
- onChange: a.onChange,
405
+ key: c.value.toString(),
406
+ disabled: "disabled" in c ? c.disabled : d.disabled,
407
+ value: c.value,
408
+ checked: l.includes(c.value),
409
+ onChange: c.onChange,
417
410
  className: `${p}-item`,
418
- style: a.style,
419
- title: a.title,
420
- id: a.id,
421
- required: a.required
422
- }, a.label)) : n, g = {
411
+ style: c.style,
412
+ title: c.title,
413
+ id: c.id,
414
+ required: c.required
415
+ }, c.label)) : o, g = {
423
416
  toggleOption: A,
424
417
  value: l,
425
418
  disabled: d.disabled,
@@ -427,22 +420,22 @@ const _e = /* @__PURE__ */ c.forwardRef((e, o) => {
427
420
  // https://github.com/ant-design/ant-design/issues/16376
428
421
  registerValue: N,
429
422
  cancelValue: _
430
- }, B = I(p, {
423
+ }, D = F(p, {
431
424
  [`${p}-rtl`]: P === "rtl"
432
- }, $, f, j, w, h);
433
- return i(/* @__PURE__ */ c.createElement("div", Object.assign({
434
- className: B,
425
+ }, $, h, V, w, f);
426
+ return i(/* @__PURE__ */ t.createElement("div", Object.assign({
427
+ className: D,
435
428
  style: O
436
- }, F, {
437
- ref: o
438
- }), /* @__PURE__ */ c.createElement(Q.Provider, {
429
+ }, R, {
430
+ ref: r
431
+ }), /* @__PURE__ */ t.createElement(Q.Provider, {
439
432
  value: g
440
- }, D)));
441
- }), Ne = _e, V = Z;
442
- V.Group = Ne;
443
- V.__ANT_CHECKBOX = !0;
444
- process.env.NODE_ENV !== "production" && (V.displayName = "Checkbox");
445
- const Pe = V, R = "#384DF6", Fe = ({ colors: e, borderRadius: o }, r = "primary", n = "active") => `
433
+ }, j)));
434
+ }), I = M;
435
+ I.Group = we;
436
+ I.__ANT_CHECKBOX = !0;
437
+ process.env.NODE_ENV !== "production" && (I.displayName = "Checkbox");
438
+ const Oe = ({ colors: e, borderRadius: r }, n = "primary", o = "active") => `
446
439
  .ant-checkbox-inner {
447
440
  background-color: #FFFFFF;
448
441
  border-color: #9A9A9A;
@@ -451,7 +444,7 @@ const Pe = V, R = "#384DF6", Fe = ({ colors: e, borderRadius: o }, r = "primary"
451
444
 
452
445
  &::after {
453
446
  border-color: #9A9A9A;
454
- border: 2px solid ${e[r][n].color};
447
+ border: 2px solid ${e[n][o].color};
455
448
  border-top: 0;
456
449
  border-left: 0;
457
450
  content: "";
@@ -512,7 +505,7 @@ const Pe = V, R = "#384DF6", Fe = ({ colors: e, borderRadius: o }, r = "primary"
512
505
  }
513
506
 
514
507
  .ant-checkbox-checked .ant-checkbox-inner::after {
515
- border-color: ${e[r].active.color};
508
+ border-color: ${e[n].active.color};
516
509
  }
517
510
 
518
511
  &:hover .ant-checkbox-inner {
@@ -532,18 +525,18 @@ const Pe = V, R = "#384DF6", Fe = ({ colors: e, borderRadius: o }, r = "primary"
532
525
  }
533
526
 
534
527
  .ant-checkbox-checked .ant-checkbox-inner {
535
- background-color:${e[r].focussed.ringColor};
528
+ background-color:${e[n].focussed.ringColor};
536
529
  border-color: #6C6C6C;
537
530
  }
538
531
 
539
532
  .ant-checkbox-checked .ant-checkbox-inner {
540
- background-color: ${R};
541
- border-color: ${R};
533
+ background-color: ${e.inputs.surface.checked};
534
+ border-color: ${e.inputs.surface.checked};
542
535
  }
543
536
 
544
537
  &:hover .ant-checkbox-checked .ant-checkbox-inner {
545
- background-color: ${R};
546
- border-color: ${R};
538
+ background-color: ${e.inputs.surface.checked};
539
+ border-color: ${e.inputs.surface.checked};
547
540
  }
548
541
 
549
542
  &:hover .ant-checkbox-checked .ant-checkbox-inner::after {
@@ -555,36 +548,36 @@ const Pe = V, R = "#384DF6", Fe = ({ colors: e, borderRadius: o }, r = "primary"
555
548
  }
556
549
 
557
550
  &:hover .ant-checkbox-checked .ant-checkbox-inner {
558
- background-color: ${e[r].focussed.ringColor};
551
+ background-color: ${e[n].focussed.ringColor};
559
552
  border-color: #6C6C6C;
560
553
  }
561
554
 
562
555
  .ant-checkbox:focus-visible .ant-checkbox-inner,
563
556
  .ant-checkbox-input:focus-visible + .ant-checkbox-inner {
564
557
  outline: none;
565
- box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[r].focussed.ringColor};
566
- border-radius: ${o.BorderRadiusXs}px;
558
+ box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[n].focussed.ringColor};
559
+ border-radius: ${r.BorderRadiusXs}px;
567
560
  border-color: #9A9A9A;
568
561
  transition: box-shadow 0.2s ease-in-out;
569
562
  }
570
563
 
571
564
  .ant-checkbox-input:focus + .ant-checkbox-inner {
572
- border-color: ${e[r].hover.borderColor};
565
+ border-color: ${e[n].hover.borderColor};
573
566
  }
574
567
 
575
568
  &:focus-visible {
576
569
  outline: none;
577
- color: ${e[r].focussed.color};
578
- background-color: ${e[r].focussed.backgroundColor};
579
- box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[r].focussed.ringColor};
580
- border-radius: ${o.BorderRadiusXs}px;
570
+ color: ${e[n].focussed.color};
571
+ background-color: ${e[n].focussed.backgroundColor};
572
+ box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[n].focussed.ringColor};
573
+ border-radius: ${r.BorderRadiusXs}px;
581
574
  border-color: #9A9A9A;
582
575
  transition: box-shadow 0.2s ease-in-out;
583
576
  }
584
- `, Me = ne(Pe)`
585
- ${({ theme: e, type: o, state: r }) => Fe(e, o, r)}
577
+ `, Ve = re(I)`
578
+ ${({ theme: e, type: r, state: n }) => Oe(e, r, n)}
586
579
  `;
587
580
  export {
588
- Me as StyledCheckbox,
589
- Fe as getGenesisClass
581
+ Ve as StyledCheckbox,
582
+ Oe as getGenesisClass
590
583
  };
@@ -1,10 +1,8 @@
1
- import { default as React } from 'react';
2
-
3
- interface FallbackProps {
1
+ export interface ErrorBoundaryFallbackProps {
4
2
  error?: Error | null;
5
3
  componentStack?: string | null;
6
4
  eventId: string | null;
7
5
  resetError: () => void;
8
6
  }
9
- declare const ErrorBoundaryFallback: React.FC<FallbackProps>;
7
+ declare const ErrorBoundaryFallback: (props: ErrorBoundaryFallbackProps) => import("react/jsx-runtime").JSX.Element;
10
8
  export default ErrorBoundaryFallback;