@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.
- package/README.md +10 -0
- package/dist/{AntdIcon-c395a1c4.js → AntdIcon-BoLh1dP8.js} +66 -68
- package/dist/CheckOutlined-CeTKr6II.js +13 -0
- package/dist/{CloseCircleFilled-ddc51e7e.js → CloseCircleFilled-DXCxlIQL.js} +8 -11
- package/dist/{CloseOutlined-14b8bba1.js → CloseOutlined-ClXDNn82.js} +9 -12
- package/dist/{Compact-c39ed20d.js → Compact-CGY560JF.js} +63 -65
- package/dist/ContextIsolator-D5x2Ih51.js +20 -0
- package/dist/{ExclamationCircleFilled-23ef9812.js → ExclamationCircleFilled-C0Kj5KQV.js} +16 -22
- package/dist/KeyCode-DM2sFh3-.js +517 -0
- package/dist/LoadingOutlined-8EnJdZ7I.js +13 -0
- package/dist/{Overflow-a570fa69.js → Overflow-PBZD-PFm.js} +63 -64
- package/dist/{DownOutlined-64a4732a.js → PurePanel-BqPLRtc2.js} +67 -70
- package/dist/{SearchOutlined-a9014e08.js → SearchOutlined-BP3Z2K6j.js} +8 -11
- package/dist/{TextArea-20825221.js → TextArea-DKwCct3i.js} +583 -588
- package/dist/Typography-aGoDUl4R.js +710 -0
- package/dist/bundle.css +1204 -0
- package/dist/{button-fa1c119c.js → button-CDQgO1OK.js} +274 -278
- package/dist/{collapse-345bc884.js → collapse-Dtpt-6W_.js} +2 -2
- package/dist/compact-item-DH13cl8A.js +61 -0
- package/dist/components/Badge/Badge.d.ts +2 -2
- package/dist/components/Badge/Badge.js +63 -62
- package/dist/components/Badge/__tests__/Badge.test.js +11 -65
- package/dist/components/Badge/index.js +2 -21
- package/dist/components/Badge/styles.js +7 -8
- package/dist/components/Breadcrumb/Breadcrumb.js +8 -24
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +21 -7
- package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +13 -60
- package/dist/components/Breadcrumb/index.js +2 -25
- package/dist/components/Breadcrumb/styles.d.ts +10 -6
- package/dist/components/Breadcrumb/styles.js +787 -808
- package/dist/components/Button/Button.d.ts +6 -4
- package/dist/components/Button/Button.js +20 -40
- package/dist/components/Button/__tests__/Button.test.js +9 -54
- package/dist/components/Button/index.js +2 -20
- package/dist/components/Button/styles.d.ts +9 -5
- package/dist/components/Button/styles.js +19 -30
- package/dist/components/Checkbox/Checkbox.js +8 -38
- package/dist/components/Checkbox/__tests__/Checkbox.test.js +16 -62
- package/dist/components/Checkbox/index.js +2 -47
- package/dist/components/Checkbox/styles.d.ts +8 -1
- package/dist/components/Checkbox/styles.js +181 -188
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.d.ts +2 -4
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +19 -51
- package/dist/components/ErrorBoundaryFallback/index.d.ts +1 -0
- package/dist/components/ErrorBoundaryFallback/index.js +2 -49
- package/dist/components/ErrorBoundaryFallback/styles.d.ts +1 -3
- package/dist/components/ErrorBoundaryFallback/styles.js +34 -37
- package/dist/components/Form/Form.d.ts +18 -5
- package/dist/components/Form/Form.js +4 -45
- package/dist/components/Form/__stories__/FormStory.js +44 -81
- package/dist/components/Form/__tests__/form.test.d.ts +1 -0
- package/dist/components/Form/__tests__/form.test.js +18 -0
- package/dist/components/Form/index.js +2 -46
- package/dist/components/Form/styles.d.ts +3 -0
- package/dist/components/Form/styles.js +5 -0
- package/dist/components/Input/Input.js +6 -29
- package/dist/components/Input/__tests__/Input.test.js +21 -66
- package/dist/components/Input/index.js +2 -29
- package/dist/components/Input/styles.d.ts +5 -2
- package/dist/components/Input/styles.js +319 -332
- package/dist/components/Message/Message.d.ts +4 -4
- package/dist/components/Message/Message.js +53 -80
- package/dist/components/Message/__tests__/Message.test.js +24 -70
- package/dist/components/Message/index.js +2 -48
- package/dist/components/Message/styles.d.ts +4 -1
- package/dist/components/Message/styles.js +24 -18
- package/dist/components/Notification/Notification.d.ts +11 -10
- package/dist/components/Notification/Notification.js +306 -372
- package/dist/components/Notification/NotificationRightChevron.d.ts +2 -0
- package/dist/components/Notification/NotificationRightChevron.js +23 -0
- package/dist/components/Notification/__tests__/Notification.test.js +8 -69
- package/dist/components/Notification/index.js +2 -59
- package/dist/components/Notification/styles.d.ts +13 -3
- package/dist/components/Notification/styles.js +36 -20
- package/dist/components/Radio/Radio.js +20 -106
- package/dist/components/Radio/RadioGroup.js +18 -71
- package/dist/components/Radio/__stories__/RadioGroup.stories.d.ts +1 -1
- package/dist/components/Radio/__tests__/RadioGroup.test.js +15 -70
- package/dist/components/Radio/index.d.ts +1 -1
- package/dist/components/Radio/index.js +2 -56
- package/dist/components/Select/DropdownChevron.d.ts +2 -0
- package/dist/components/Select/DropdownChevron.js +23 -0
- package/dist/components/Select/Select.d.ts +9 -4
- package/dist/components/Select/Select.js +29 -41
- package/dist/components/Select/__tests__/Select.test.js +10752 -93
- package/dist/components/Select/index.js +2 -28
- package/dist/components/Select/styles.d.ts +20 -6
- package/dist/components/Select/styles.js +1381 -1370
- package/dist/components/Toast/Toast.d.ts +4 -4
- package/dist/components/Toast/Toast.js +8 -37
- package/dist/components/Toast/__stories__/Toast.stories.d.ts +1 -0
- package/dist/components/Toast/__tests__/Toast.test.js +10 -55
- package/dist/components/Toast/index.js +2 -46
- package/dist/components/Toast/styles.d.ts +6 -1
- package/dist/components/Toast/styles.js +36 -21
- package/dist/components/Typography/Typography.d.ts +7 -4
- package/dist/components/Typography/Typography.js +2 -42
- package/dist/components/Typography/__stories__/Typography.stories.d.ts +1 -0
- package/dist/components/Typography/__tests__/Typography.test.js +19 -56
- package/dist/components/Typography/index.js +2 -46
- package/dist/components/Typography/styles.d.ts +18 -4
- package/dist/components/Typography/styles.js +36 -43
- package/dist/components/index.d.ts +13 -5
- package/dist/components/index.js +24 -70
- package/dist/{context-3b8a39af.js → context-BMW3aJEf.js} +538 -548
- package/dist/genesis/GenesisThemeBreakdown.js +38 -55
- package/dist/genesis/GenesisThemeDemo.js +3 -53
- package/dist/genesis/styles.d.ts +6 -2
- package/dist/genesis/styles.js +496 -521
- package/dist/{index-e2b72ca8.js → index-1CBpubM3.js} +97 -102
- package/dist/index-BZAhCB_K.js +97 -0
- package/dist/{index-501fc13d.js → index-C0SmxWLS.js} +367 -392
- package/dist/index-C8haFnXI.js +1112 -0
- package/dist/index-CfDY25LP.js +873 -0
- package/dist/index-DPW8XdWj.js +952 -0
- package/dist/{index-8c8d2d0c.js → index-bKlRxQp4.js} +114 -114
- package/dist/index-oK7z6jnz.js +22795 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +31 -77
- package/dist/{isVisible-729780f5.js → isVisible-A-IfeFoT.js} +67 -94
- package/dist/{magic-string.es-b7491176.js → magic-string.es-D2FWSwU3.js} +56 -103
- package/dist/{pickAttrs-00ba4687.js → pickAttrs-B0YTfcV1.js} +1 -1
- package/dist/providers/GenesisProvider.d.ts +0 -5
- package/dist/providers/GenesisProvider.js +9 -59
- package/dist/providers/ThemeProvider.d.ts +1 -2
- package/dist/providers/ThemeProvider.js +11 -13
- package/dist/providers/ToastProvider.d.ts +11 -4
- package/dist/providers/ToastProvider.js +10 -39
- package/dist/providers/index.d.ts +2 -3
- package/dist/providers/index.js +4 -51
- package/dist/providers/useGenesis.d.ts +7 -0
- package/dist/providers/useGenesis.js +6 -0
- package/dist/setup-BvfREoHl.js +33891 -0
- package/dist/{styled-components.browser.esm-02f500bc.js → styled-components.browser.esm-CZ1XM4o4.js} +72 -134
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +15 -45
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +15 -45
- package/dist/styles/design-tokens/{typography → typography-tokens}/TypographyTokens.stories.d.ts +1 -0
- package/dist/styles/design-tokens/variables.d.ts +10 -10
- package/dist/styles/design-tokens/variables.js +1 -1
- package/dist/styles/global-styles.d.ts +1 -0
- package/dist/styles/global-styles.js +14 -31
- package/dist/styles/theme/genesis-theme.js +257 -212
- package/dist/styles/theme/genesis-theme.types.d.ts +46 -0
- package/dist/styles/theme/index.js +4 -5
- package/dist/styles-CT_fyXBd.js +1808 -0
- package/dist/test/setup.js +3 -46
- package/dist/useLocale-DT-z_vQ6.js +16 -0
- package/dist/useVariants-DvhXfgJY.js +30 -0
- package/dist/utils/isAllEnglishString.js +1 -2
- package/dist/{presets-83ccb923.js → warning-C63HNL9U.js} +358 -356
- package/package.json +35 -35
- package/dist/CheckOutlined-52d9ac25.js +0 -29
- package/dist/ContextIsolator-b09b2c52.js +0 -20
- package/dist/EllipsisOutlined-60122660.js +0 -1115
- package/dist/InfoCircleFilled-c5f90c20.js +0 -16
- package/dist/RightOutlined-83515eb4.js +0 -16
- package/dist/compact-item-b8f85aa6.js +0 -75
- package/dist/index-0a886e53.js +0 -100
- package/dist/index-0b9ee239.js +0 -955
- package/dist/index-1a33c134.js +0 -1389
- package/dist/index-4003d75b.js +0 -3748
- package/dist/index-89035ea5.js +0 -3242
- package/dist/providers/ToastWrapper.d.ts +0 -7
- package/dist/providers/ToastWrapper.js +0 -56
- package/dist/setup-aaca7b6f.js +0 -21158
- package/dist/styles/theme/global-styles.d.ts +0 -1
- package/dist/styles/theme/global-styles.js +0 -36
- package/dist/useVariants-a0d64298.js +0 -30
- /package/dist/{presetColors-ccf8cb4c.js → presetColors-Cl8UP3Nw.js} +0 -0
- /package/dist/{reactNode-f4391605.js → reactNode-sKPeiqPL.js} +0 -0
|
@@ -1,34 +1,32 @@
|
|
|
1
|
-
import { d as
|
|
2
|
-
import * as
|
|
3
|
-
import X, { forwardRef as
|
|
4
|
-
import { e as
|
|
5
|
-
import { u as
|
|
6
|
-
import { w as W, g as
|
|
7
|
-
import { T as
|
|
8
|
-
import { F as
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
}), _ =
|
|
15
|
-
|
|
12
|
+
}), _ = ce(a, 2), N = _[0], A = _[1];
|
|
13
|
+
oe(r, function() {
|
|
16
14
|
return {
|
|
17
15
|
focus: function(i) {
|
|
18
|
-
var
|
|
19
|
-
(
|
|
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 =
|
|
21
|
+
(i = m.current) === null || i === void 0 || i.blur();
|
|
24
22
|
},
|
|
25
|
-
input:
|
|
23
|
+
input: m.current,
|
|
26
24
|
nativeElement: u.current
|
|
27
25
|
};
|
|
28
26
|
});
|
|
29
|
-
var b =
|
|
30
|
-
|
|
31
|
-
target:
|
|
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__ */
|
|
42
|
+
return /* @__PURE__ */ t.createElement("span", {
|
|
45
43
|
className: b,
|
|
46
44
|
title: P,
|
|
47
45
|
style: C,
|
|
48
46
|
ref: u
|
|
49
|
-
}, /* @__PURE__ */
|
|
50
|
-
className: "".concat(
|
|
51
|
-
ref:
|
|
47
|
+
}, /* @__PURE__ */ t.createElement("input", te({}, E, {
|
|
48
|
+
className: "".concat(o, "-input"),
|
|
49
|
+
ref: m,
|
|
52
50
|
onChange: p,
|
|
53
|
-
disabled:
|
|
51
|
+
disabled: h,
|
|
54
52
|
checked: !!N,
|
|
55
53
|
type: S
|
|
56
|
-
})), /* @__PURE__ */
|
|
57
|
-
className: "".concat(
|
|
54
|
+
})), /* @__PURE__ */ t.createElement("span", {
|
|
55
|
+
className: "".concat(o, "-inner")
|
|
58
56
|
}));
|
|
59
57
|
});
|
|
60
|
-
function
|
|
61
|
-
const
|
|
62
|
-
W.cancel(
|
|
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
|
-
|
|
66
|
-
|
|
63
|
+
n(), r.current = W(() => {
|
|
64
|
+
r.current = null;
|
|
67
65
|
});
|
|
68
66
|
}, (C) => {
|
|
69
|
-
|
|
67
|
+
r.current && (C.stopPropagation(), n()), e == null || e(C);
|
|
70
68
|
}];
|
|
71
69
|
}
|
|
72
|
-
const
|
|
70
|
+
const ve = (e) => {
|
|
73
71
|
const {
|
|
74
|
-
checkboxCls:
|
|
75
|
-
} = e,
|
|
72
|
+
checkboxCls: r
|
|
73
|
+
} = e, n = `${r}-wrapper`;
|
|
76
74
|
return [
|
|
77
75
|
// ===================== Basic =====================
|
|
78
76
|
{
|
|
79
77
|
// Group
|
|
80
|
-
[`${
|
|
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
|
-
[
|
|
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
|
-
[`& + ${
|
|
100
|
+
[`& + ${n}`]: {
|
|
103
101
|
marginInlineStart: 0
|
|
104
102
|
},
|
|
105
|
-
[`&${
|
|
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
|
-
[
|
|
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
|
-
[`${
|
|
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 + ${
|
|
133
|
+
[`&:focus-visible + ${r}-inner`]: Object.assign({}, ue(e))
|
|
136
134
|
},
|
|
137
135
|
// Wrapper > Checkbox > inner
|
|
138
|
-
[`${
|
|
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
|
-
${
|
|
178
|
-
${
|
|
175
|
+
${n}:not(${n}-disabled),
|
|
176
|
+
${r}:not(${r}-disabled)
|
|
179
177
|
`]: {
|
|
180
|
-
[`&:hover ${
|
|
178
|
+
[`&:hover ${r}-inner`]: {
|
|
181
179
|
borderColor: e.colorPrimary
|
|
182
180
|
}
|
|
183
181
|
},
|
|
184
|
-
[`${
|
|
185
|
-
[`&:hover ${
|
|
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 ${
|
|
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
|
-
[`${
|
|
198
|
-
[`${
|
|
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
|
-
${
|
|
210
|
-
${
|
|
207
|
+
${n}-checked:not(${n}-disabled),
|
|
208
|
+
${r}-checked:not(${r}-disabled)
|
|
211
209
|
`]: {
|
|
212
|
-
[`&:hover ${
|
|
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
|
-
[
|
|
218
|
+
[r]: {
|
|
221
219
|
"&-indeterminate": {
|
|
222
220
|
// Wrapper > Checkbox > inner
|
|
223
|
-
[`${
|
|
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 ${
|
|
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
|
-
[`${
|
|
247
|
+
[`${n}-disabled`]: {
|
|
250
248
|
cursor: "not-allowed"
|
|
251
249
|
},
|
|
252
250
|
// Wrapper > Checkbox
|
|
253
|
-
[`${
|
|
251
|
+
[`${r}-disabled`]: {
|
|
254
252
|
// Wrapper > Checkbox > input
|
|
255
|
-
[`&, ${
|
|
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
|
-
[`${
|
|
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
|
-
[`&${
|
|
273
|
+
[`&${r}-indeterminate ${r}-inner::after`]: {
|
|
276
274
|
background: e.colorTextDisabled
|
|
277
275
|
}
|
|
278
276
|
}
|
|
279
277
|
}
|
|
280
278
|
];
|
|
281
279
|
};
|
|
282
|
-
function
|
|
283
|
-
const
|
|
280
|
+
function $e(e, r) {
|
|
281
|
+
const n = de(r, {
|
|
284
282
|
checkboxCls: `.${e}`,
|
|
285
|
-
checkboxSize:
|
|
283
|
+
checkboxSize: r.controlInteractiveSize
|
|
286
284
|
});
|
|
287
|
-
return [
|
|
285
|
+
return [ve(n)];
|
|
288
286
|
}
|
|
289
|
-
const J =
|
|
287
|
+
const J = se("Checkbox", (e, r) => {
|
|
290
288
|
let {
|
|
291
|
-
prefixCls:
|
|
292
|
-
} =
|
|
293
|
-
return [
|
|
294
|
-
}),
|
|
295
|
-
var
|
|
296
|
-
var
|
|
297
|
-
for (var
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
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
|
|
305
|
-
var
|
|
300
|
+
const Se = (e, r) => {
|
|
301
|
+
var n;
|
|
306
302
|
const {
|
|
307
|
-
prefixCls:
|
|
303
|
+
prefixCls: o,
|
|
308
304
|
className: s,
|
|
309
305
|
rootClassName: C,
|
|
310
306
|
children: $,
|
|
311
|
-
indeterminate:
|
|
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 =
|
|
313
|
+
} = e, l = ye(e, ["prefixCls", "className", "rootClassName", "children", "indeterminate", "style", "onMouseEnter", "onMouseLeave", "skipGroup", "disabled"]), {
|
|
318
314
|
getPrefixCls: E,
|
|
319
|
-
direction:
|
|
315
|
+
direction: m,
|
|
320
316
|
checkbox: u
|
|
321
|
-
} =
|
|
317
|
+
} = t.useContext(K), a = t.useContext(Q), {
|
|
322
318
|
isFormItemInput: _
|
|
323
|
-
} =
|
|
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 =
|
|
326
|
-
process.env.NODE_ENV !== "production" && x("checked" in l || !!
|
|
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
|
-
|
|
329
|
-
|
|
330
|
-
}, []),
|
|
324
|
+
t.useEffect(() => {
|
|
325
|
+
a == null || a.registerValue(l.value);
|
|
326
|
+
}, []), t.useEffect(() => {
|
|
331
327
|
if (!S)
|
|
332
|
-
return l.value !== b.current && (
|
|
333
|
-
}, [l.value]),
|
|
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 =
|
|
336
|
-
}, [
|
|
337
|
-
const i = E("checkbox",
|
|
338
|
-
|
|
339
|
-
l.onChange && l.onChange.apply(l, arguments),
|
|
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 =
|
|
344
|
-
const
|
|
345
|
-
[`${i}-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,
|
|
350
|
-
[`${i}-indeterminate`]:
|
|
351
|
-
},
|
|
352
|
-
return
|
|
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__ */
|
|
356
|
-
className:
|
|
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:
|
|
361
|
-
}, /* @__PURE__ */
|
|
362
|
-
onClick:
|
|
356
|
+
onClick: k
|
|
357
|
+
}, /* @__PURE__ */ t.createElement(ge, Object.assign({}, g, {
|
|
358
|
+
onClick: v,
|
|
363
359
|
prefixCls: i,
|
|
364
|
-
className:
|
|
360
|
+
className: c,
|
|
365
361
|
disabled: A,
|
|
366
362
|
ref: w
|
|
367
|
-
})), $ !== void 0 && /* @__PURE__ */
|
|
368
|
-
},
|
|
369
|
-
process.env.NODE_ENV !== "production" && (
|
|
370
|
-
|
|
371
|
-
var
|
|
372
|
-
var r =
|
|
373
|
-
for (var
|
|
374
|
-
Object.prototype.
|
|
375
|
-
|
|
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
|
|
373
|
+
const we = /* @__PURE__ */ t.forwardRef((e, r) => {
|
|
381
374
|
const {
|
|
382
|
-
defaultValue:
|
|
383
|
-
children:
|
|
375
|
+
defaultValue: n,
|
|
376
|
+
children: o,
|
|
384
377
|
options: s = [],
|
|
385
378
|
prefixCls: C,
|
|
386
379
|
className: $,
|
|
387
|
-
rootClassName:
|
|
380
|
+
rootClassName: h,
|
|
388
381
|
style: O,
|
|
389
382
|
onChange: y
|
|
390
|
-
} = e, d =
|
|
383
|
+
} = e, d = Ae(e, ["defaultValue", "children", "options", "prefixCls", "className", "rootClassName", "style", "onChange"]), {
|
|
391
384
|
getPrefixCls: S,
|
|
392
385
|
direction: P
|
|
393
|
-
} =
|
|
394
|
-
|
|
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
|
|
398
|
-
label:
|
|
399
|
-
value:
|
|
400
|
-
} :
|
|
401
|
-
u((
|
|
402
|
-
}, N = (
|
|
403
|
-
u((
|
|
404
|
-
}, A = (
|
|
405
|
-
const
|
|
406
|
-
|
|
407
|
-
const
|
|
408
|
-
return
|
|
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,
|
|
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:
|
|
413
|
-
disabled: "disabled" in
|
|
414
|
-
value:
|
|
415
|
-
checked: l.includes(
|
|
416
|
-
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:
|
|
419
|
-
title:
|
|
420
|
-
id:
|
|
421
|
-
required:
|
|
422
|
-
},
|
|
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
|
-
},
|
|
423
|
+
}, D = F(p, {
|
|
431
424
|
[`${p}-rtl`]: P === "rtl"
|
|
432
|
-
}, $,
|
|
433
|
-
return i(/* @__PURE__ */
|
|
434
|
-
className:
|
|
425
|
+
}, $, h, V, w, f);
|
|
426
|
+
return i(/* @__PURE__ */ t.createElement("div", Object.assign({
|
|
427
|
+
className: D,
|
|
435
428
|
style: O
|
|
436
|
-
},
|
|
437
|
-
ref:
|
|
438
|
-
}), /* @__PURE__ */
|
|
429
|
+
}, R, {
|
|
430
|
+
ref: r
|
|
431
|
+
}), /* @__PURE__ */ t.createElement(Q.Provider, {
|
|
439
432
|
value: g
|
|
440
|
-
},
|
|
441
|
-
}),
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
process.env.NODE_ENV !== "production" && (
|
|
445
|
-
const
|
|
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[
|
|
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[
|
|
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[
|
|
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: ${
|
|
541
|
-
border-color: ${
|
|
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: ${
|
|
546
|
-
border-color: ${
|
|
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[
|
|
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[
|
|
566
|
-
border-radius: ${
|
|
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[
|
|
565
|
+
border-color: ${e[n].hover.borderColor};
|
|
573
566
|
}
|
|
574
567
|
|
|
575
568
|
&:focus-visible {
|
|
576
569
|
outline: none;
|
|
577
|
-
color: ${e[
|
|
578
|
-
background-color: ${e[
|
|
579
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${e[
|
|
580
|
-
border-radius: ${
|
|
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
|
-
`,
|
|
585
|
-
${({ theme: e, type:
|
|
577
|
+
`, Ve = re(I)`
|
|
578
|
+
${({ theme: e, type: r, state: n }) => Oe(e, r, n)}
|
|
586
579
|
`;
|
|
587
580
|
export {
|
|
588
|
-
|
|
589
|
-
|
|
581
|
+
Ve as StyledCheckbox,
|
|
582
|
+
Oe as getGenesisClass
|
|
590
583
|
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
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:
|
|
7
|
+
declare const ErrorBoundaryFallback: (props: ErrorBoundaryFallbackProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
8
|
export default ErrorBoundaryFallback;
|