@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.
- package/README.md +8 -2
- package/dist/AntdIcon-c395a1c4.js +204 -0
- package/dist/CheckOutlined-52d9ac25.js +29 -0
- package/dist/{CloseCircleFilled-ZIY-u-27.js → CloseCircleFilled-ddc51e7e.js} +11 -8
- package/dist/CloseOutlined-14b8bba1.js +16 -0
- package/dist/Compact-c39ed20d.js +179 -0
- package/dist/ContextIsolator-b09b2c52.js +20 -0
- package/dist/DownOutlined-64a4732a.js +206 -0
- package/dist/EllipsisOutlined-60122660.js +1115 -0
- package/dist/{ExclamationCircleFilled-BICVVQIg.js → ExclamationCircleFilled-23ef9812.js} +22 -16
- package/dist/InfoCircleFilled-c5f90c20.js +16 -0
- package/dist/Overflow-a570fa69.js +361 -0
- package/dist/RightOutlined-83515eb4.js +16 -0
- package/dist/SearchOutlined-a9014e08.js +16 -0
- package/dist/{TextArea-3MOYYuAQ.js → TextArea-20825221.js} +597 -582
- package/dist/{button-BNV2qdrP.js → button-fa1c119c.js} +287 -280
- package/dist/collapse-345bc884.js +20 -0
- package/dist/compact-item-b8f85aa6.js +75 -0
- package/dist/components/Badge/Badge.d.ts +6 -0
- package/dist/components/Badge/Badge.js +102 -0
- package/dist/components/Badge/__stories__/Badge.stories.d.ts +13 -0
- package/dist/components/Badge/__tests__/Badge.test.js +72 -0
- package/dist/components/Badge/icons/ASN.d.ts +2 -0
- package/dist/components/Badge/icons/ASN.js +23 -0
- package/dist/components/Badge/icons/Appointment.d.ts +2 -0
- package/dist/components/Badge/icons/Appointment.js +23 -0
- package/dist/components/Badge/icons/Inventory.d.ts +2 -0
- package/dist/components/Badge/icons/Inventory.js +23 -0
- package/dist/components/Badge/icons/Parcel.d.ts +2 -0
- package/dist/components/Badge/icons/Parcel.js +23 -0
- package/dist/components/Badge/icons/Product.d.ts +2 -0
- package/dist/components/Badge/icons/Product.js +23 -0
- package/dist/components/Badge/icons/Route.d.ts +2 -0
- package/dist/components/Badge/icons/Route.js +23 -0
- package/dist/components/Badge/icons/Shipment.d.ts +2 -0
- package/dist/components/Badge/icons/Shipment.js +23 -0
- package/dist/components/Badge/icons/ShoppingCart.d.ts +2 -0
- package/dist/components/Badge/icons/ShoppingCart.js +23 -0
- package/dist/components/Badge/icons/System.d.ts +2 -0
- package/dist/components/Badge/icons/System.js +23 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Badge/index.js +23 -0
- package/dist/components/Badge/styles.d.ts +3 -0
- package/dist/components/Badge/styles.js +35 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +8 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +27 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +8 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.js +1 -0
- package/dist/components/Breadcrumb/__stories__/Breadcrumb.stories.d.ts +10 -0
- package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +70 -0
- package/dist/components/Breadcrumb/index.d.ts +3 -0
- package/dist/components/Breadcrumb/index.js +27 -0
- package/dist/components/Breadcrumb/styles.d.ts +23 -0
- package/dist/components/Breadcrumb/styles.js +2457 -0
- package/dist/components/Button/Button.js +42 -0
- package/dist/components/Button/__tests__/Button.test.js +61 -0
- package/dist/components/Button/index.js +22 -0
- package/dist/components/{atoms/button → Button}/styles.js +30 -19
- package/dist/components/{atoms/checkbox → Checkbox}/Checkbox.d.ts +2 -1
- package/dist/components/Checkbox/Checkbox.js +70 -0
- package/dist/components/Checkbox/__tests__/Checkbox.test.js +64 -0
- package/dist/components/Checkbox/index.js +49 -0
- package/dist/components/{atoms/checkbox → Checkbox}/styles.d.ts +1 -3
- package/dist/components/{atoms/checkbox → Checkbox}/styles.js +165 -157
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +72 -0
- package/dist/components/ErrorBoundaryFallback/index.js +51 -0
- package/dist/components/ErrorBoundaryFallback/styles.d.ts +3 -0
- package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/styles.js +38 -34
- package/dist/components/{molecules/form → Form}/Form.d.ts +2 -4
- package/dist/components/Form/Form.js +49 -0
- package/dist/components/Form/__stories__/FormStory.js +130 -0
- package/dist/components/Form/index.js +48 -0
- package/dist/components/{atoms/input → Input}/Input.d.ts +1 -3
- package/dist/components/Input/Input.js +42 -0
- package/dist/components/{atoms/input → Input}/__stories__/Input.stories.d.ts +5 -1
- package/dist/components/Input/__tests__/Input.test.d.ts +1 -0
- package/dist/components/Input/__tests__/Input.test.js +69 -0
- package/dist/components/Input/index.js +31 -0
- package/dist/components/{atoms/input → Input}/styles.d.ts +2 -3
- package/dist/components/Input/styles.js +542 -0
- package/dist/components/Message/Message.d.ts +13 -0
- package/dist/components/Message/Message.js +105 -0
- package/dist/components/Message/__stories__/Message.stories.d.ts +15 -0
- package/dist/components/Message/__tests__/Message.test.d.ts +1 -0
- package/dist/components/Message/__tests__/Message.test.js +88 -0
- package/dist/components/Message/index.d.ts +2 -0
- package/dist/components/Message/index.js +50 -0
- package/dist/components/Message/styles.d.ts +5 -0
- package/dist/components/Message/styles.js +35 -0
- package/dist/components/Notification/Notification.d.ts +16 -0
- package/dist/components/Notification/Notification.js +1436 -0
- package/dist/components/Notification/__stories__/Notification.stories.d.ts +10 -0
- package/dist/components/Notification/__tests__/Notification.test.d.ts +1 -0
- package/dist/components/Notification/__tests__/Notification.test.js +76 -0
- package/dist/components/Notification/index.d.ts +2 -0
- package/dist/components/Notification/index.js +61 -0
- package/dist/components/Notification/styles.d.ts +6 -0
- package/dist/components/Notification/styles.js +49 -0
- package/dist/components/Radio/Radio.d.ts +14 -0
- package/dist/components/Radio/Radio.js +114 -0
- package/dist/components/Radio/RadioGroup.d.ts +12 -0
- package/dist/components/Radio/RadioGroup.js +86 -0
- package/dist/components/Radio/__stories__/RadioGroup.stories.d.ts +9 -0
- package/dist/components/Radio/__tests__/RadioGroup.test.d.ts +1 -0
- package/dist/components/Radio/__tests__/RadioGroup.test.js +85 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Radio/index.js +58 -0
- package/dist/components/Radio/states/RadioChecked.d.ts +2 -0
- package/dist/components/Radio/states/RadioChecked.js +18 -0
- package/dist/components/Radio/states/RadioCheckedDisabled.d.ts +2 -0
- package/dist/components/Radio/states/RadioCheckedDisabled.js +18 -0
- package/dist/components/Radio/states/RadioCheckedFocussed.d.ts +2 -0
- package/dist/components/Radio/states/RadioCheckedFocussed.js +30 -0
- package/dist/components/Radio/states/RadioCheckedHover.d.ts +2 -0
- package/dist/components/Radio/states/RadioCheckedHover.js +18 -0
- package/dist/components/Radio/states/RadioUnchecked.d.ts +2 -0
- package/dist/components/Radio/states/RadioUnchecked.js +15 -0
- package/dist/components/Radio/states/RadioUncheckedDisabled.d.ts +2 -0
- package/dist/components/Radio/states/RadioUncheckedDisabled.js +15 -0
- package/dist/components/Radio/states/RadioUncheckedFocussed.d.ts +2 -0
- package/dist/components/Radio/states/RadioUncheckedFocussed.js +29 -0
- package/dist/components/Radio/states/RadioUncheckedHover.d.ts +2 -0
- package/dist/components/Radio/states/RadioUncheckedHover.js +18 -0
- package/dist/components/{atoms/select → Select}/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +48 -0
- package/dist/components/{atoms/select → Select}/__stories__/Select.stories.d.ts +3 -1
- package/dist/components/Select/__tests__/Select.test.d.ts +1 -0
- package/dist/components/Select/__tests__/Select.test.js +101 -0
- package/dist/components/Select/index.js +30 -0
- package/dist/components/{atoms/select → Select}/styles.d.ts +4 -1
- package/dist/components/Select/styles.js +3723 -0
- package/dist/components/Toast/Toast.d.ts +14 -0
- package/dist/components/Toast/Toast.js +48 -0
- package/dist/components/Toast/__stories__/Toast.stories.d.ts +15 -0
- package/dist/components/Toast/__tests__/Toast.test.d.ts +1 -0
- package/dist/components/Toast/__tests__/Toast.test.js +63 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Toast/index.js +48 -0
- package/dist/components/Toast/styles.d.ts +5 -0
- package/dist/components/Toast/styles.js +39 -0
- package/dist/components/{atoms/typography → Typography}/Typography.d.ts +2 -1
- package/dist/components/Typography/Typography.js +48 -0
- package/dist/components/Typography/__tests__/Typography.test.d.ts +1 -0
- package/dist/components/Typography/__tests__/Typography.test.js +60 -0
- package/dist/components/Typography/index.js +48 -0
- package/dist/components/Typography/styles.d.ts +7 -0
- package/dist/components/Typography/styles.js +55 -0
- package/dist/components/index.d.ts +18 -14
- package/dist/components/index.js +70 -14
- package/dist/constants/index.d.ts +104 -0
- package/dist/constants/index.js +41 -7
- package/dist/{context-CZsFJmh6.js → context-3b8a39af.js} +547 -536
- package/dist/genesis/GenesisThemeBreakdown.js +69 -22
- package/dist/genesis/GenesisThemeDemo.d.ts +0 -2
- package/dist/genesis/GenesisThemeDemo.js +53 -4
- package/dist/genesis/styles.d.ts +2 -6
- package/dist/genesis/styles.js +1144 -2210
- package/dist/index-0a886e53.js +100 -0
- package/dist/{index-SAAXFt-P.js → index-0b9ee239.js} +347 -338
- package/dist/index-1a33c134.js +1389 -0
- package/dist/index-4003d75b.js +3748 -0
- package/dist/{index-D1v_7IIx.js → index-501fc13d.js} +369 -343
- package/dist/index-89035ea5.js +3242 -0
- package/dist/{index-BQO27mgE.js → index-8c8d2d0c.js} +123 -122
- package/dist/{index-C7kFNqp2.js → index-e2b72ca8.js} +107 -102
- package/dist/index.d.ts +1 -0
- package/dist/index.js +77 -18
- package/dist/{isVisible-CNQjrJPN.js → isVisible-729780f5.js} +110 -82
- package/dist/{magic-string.es-BkUFmFT4.js → magic-string.es-b7491176.js} +103 -56
- package/dist/{SearchOutlined-DuzJkIiQ.js → pickAttrs-00ba4687.js} +16 -26
- package/dist/presets-83ccb923.js +787 -0
- package/dist/providers/GenesisProvider.d.ts +5 -0
- package/dist/providers/GenesisProvider.js +59 -5
- package/dist/providers/ThemeProvider.d.ts +2 -1
- package/dist/providers/ThemeProvider.js +16 -11
- package/dist/providers/ToastProvider.d.ts +6 -0
- package/dist/providers/ToastProvider.js +49 -0
- package/dist/providers/ToastWrapper.d.ts +7 -0
- package/dist/providers/ToastWrapper.js +56 -0
- package/dist/providers/__stories__/GenesisProvider.stories.d.ts +6 -0
- package/dist/providers/index.d.ts +3 -2
- package/dist/providers/index.js +51 -4
- package/dist/setup-aaca7b6f.js +21158 -0
- package/dist/{styled-components.browser.esm-CZ1XM4o4.js → styled-components.browser.esm-02f500bc.js} +134 -72
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +54 -18
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +51 -15
- package/dist/styles/design-tokens/variables.d.ts +7 -7
- package/dist/styles/design-tokens/variables.js +48 -48
- package/dist/styles/global-styles.js +4 -3
- package/dist/styles/theme/genesis-theme.d.ts +3 -0
- package/dist/styles/theme/genesis-theme.js +402 -263
- package/dist/styles/theme/global-styles.js +4 -3
- package/dist/styles/theme/index.js +5 -4
- package/dist/test/setup.js +46 -2
- package/dist/useVariants-a0d64298.js +30 -0
- package/dist/utils/isAllEnglishString.js +2 -1
- package/package.json +34 -28
- package/dist/AntdIcon-Bsnbyy6g.js +0 -200
- package/dist/CheckOutlined-DAynWe12.js +0 -527
- package/dist/Compact-CJBo3f0u.js +0 -185
- package/dist/ContextIsolator-CGkdKtc3.js +0 -20
- package/dist/Form-Cylpi4M4.js +0 -1815
- package/dist/Overflow-CP1M4Z0s.js +0 -369
- package/dist/compact-item-DH13cl8A.js +0 -61
- package/dist/components/atoms/button/Button.js +0 -27
- package/dist/components/atoms/button/index.js +0 -4
- package/dist/components/atoms/checkbox/Checkbox.js +0 -13
- package/dist/components/atoms/checkbox/__tests__/Checkbox.test.js +0 -18
- package/dist/components/atoms/checkbox/index.js +0 -4
- package/dist/components/atoms/index.d.ts +0 -1
- package/dist/components/atoms/index.js +0 -3
- package/dist/components/atoms/input/Input.js +0 -12
- package/dist/components/atoms/input/__tests__/Input.test.js +0 -28
- package/dist/components/atoms/input/index.js +0 -4
- package/dist/components/atoms/input/styles.js +0 -415
- package/dist/components/atoms/select/Select.js +0 -24
- package/dist/components/atoms/select/__tests__/Select.test.js +0 -10735
- package/dist/components/atoms/select/index.js +0 -4
- package/dist/components/atoms/select/styles.js +0 -3868
- package/dist/components/atoms/typography/Typography.js +0 -44
- package/dist/components/atoms/typography/__tests__/Typography.test.js +0 -16
- package/dist/components/atoms/typography/index.js +0 -4
- package/dist/components/atoms/typography/styles.d.ts +0 -11
- package/dist/components/atoms/typography/styles.js +0 -28
- package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.js +0 -35
- package/dist/components/molecules/error-boundary-fallback/index.js +0 -4
- package/dist/components/molecules/error-boundary-fallback/styles.d.ts +0 -1
- package/dist/components/molecules/form/Form.js +0 -7
- package/dist/components/molecules/form/__stories__/FormStory.js +0 -90
- package/dist/components/molecules/form/index.js +0 -4
- package/dist/index-3MWkSVA1.js +0 -96
- package/dist/index-BPtFqhcp.js +0 -19110
- package/dist/index-BWys7dkb.js +0 -4462
- package/dist/index-VDH3iLaC.js +0 -884
- package/dist/setup-CMYVZCPF.js +0 -33883
- package/dist/useVariants-CEpw6Ww6.js +0 -29
- /package/dist/components/{atoms/checkbox/__tests__/Checkbox.test.d.ts → Badge/__tests__/Badge.test.d.ts} +0 -0
- /package/dist/components/{atoms/input/__tests__/Input.test.d.ts → Breadcrumb/__tests__/Breadcrumb.test.d.ts} +0 -0
- /package/dist/components/{atoms/button → Button}/Button.d.ts +0 -0
- /package/dist/components/{atoms/button → Button}/__stories__/Button.stories.d.ts +0 -0
- /package/dist/components/{atoms/select/__tests__/Select.test.d.ts → Button/__tests__/Button.test.d.ts} +0 -0
- /package/dist/components/{atoms/button → Button}/index.d.ts +0 -0
- /package/dist/components/{atoms/button → Button}/styles.d.ts +0 -0
- /package/dist/components/{atoms/checkbox → Checkbox}/__stories__/Checkbox.stories.d.ts +0 -0
- /package/dist/components/{atoms/typography/__tests__/Typography.test.d.ts → Checkbox/__tests__/Checkbox.test.d.ts} +0 -0
- /package/dist/components/{atoms/checkbox → Checkbox}/index.d.ts +0 -0
- /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/ErrorBoundaryFallback.d.ts +0 -0
- /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/__stories__/ErrorBoundaryFallback.stories.d.ts +0 -0
- /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/index.d.ts +0 -0
- /package/dist/components/{molecules/form → Form}/__stories__/Form.stories.d.ts +0 -0
- /package/dist/components/{molecules/form → Form}/__stories__/FormStory.d.ts +0 -0
- /package/dist/components/{molecules/form → Form}/index.d.ts +0 -0
- /package/dist/components/{atoms/input → Input}/index.d.ts +0 -0
- /package/dist/components/{atoms/select → Select}/index.d.ts +0 -0
- /package/dist/components/{atoms/typography → Typography}/__stories__/Typography.stories.d.ts +0 -0
- /package/dist/components/{atoms/typography → Typography}/index.d.ts +0 -0
- /package/dist/{presetColors-Cl8UP3Nw.js → presetColors-ccf8cb4c.js} +0 -0
- /package/dist/{reactNode-sKPeiqPL.js → reactNode-f4391605.js} +0 -0
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as k, d as U, j as H, a as Z } from "./presets-83ccb923.js";
|
|
2
2
|
import * as a from "react";
|
|
3
|
-
import { t as
|
|
3
|
+
import { t as ee } from "./isVisible-729780f5.js";
|
|
4
|
+
import { _ as te, e as re, f as ne, h as ie, s as oe, j as se, k as ae, l as E } from "./index-4003d75b.js";
|
|
4
5
|
var O = /* @__PURE__ */ a.createContext(null);
|
|
5
6
|
function ue(e) {
|
|
6
|
-
var t = e.children,
|
|
7
|
-
|
|
8
|
-
var
|
|
7
|
+
var t = e.children, r = e.onBatchResize, n = a.useRef(0), i = a.useRef([]), o = a.useContext(O), s = a.useCallback(function(c, u, f) {
|
|
8
|
+
n.current += 1;
|
|
9
|
+
var v = n.current;
|
|
9
10
|
i.current.push({
|
|
10
11
|
size: c,
|
|
11
12
|
element: u,
|
|
12
13
|
data: f
|
|
13
14
|
}), Promise.resolve().then(function() {
|
|
14
|
-
|
|
15
|
+
v === n.current && (r == null || r(i.current), i.current = []);
|
|
15
16
|
}), o == null || o(c, u, f);
|
|
16
|
-
}, [
|
|
17
|
+
}, [r, o]);
|
|
17
18
|
return /* @__PURE__ */ a.createElement(O.Provider, {
|
|
18
19
|
value: s
|
|
19
20
|
}, t);
|
|
@@ -21,11 +22,11 @@ function ue(e) {
|
|
|
21
22
|
var I = function() {
|
|
22
23
|
if (typeof Map < "u")
|
|
23
24
|
return Map;
|
|
24
|
-
function e(t,
|
|
25
|
-
var
|
|
25
|
+
function e(t, r) {
|
|
26
|
+
var n = -1;
|
|
26
27
|
return t.some(function(i, o) {
|
|
27
|
-
return i[0] ===
|
|
28
|
-
}),
|
|
28
|
+
return i[0] === r ? (n = o, !0) : !1;
|
|
29
|
+
}), n;
|
|
29
30
|
}
|
|
30
31
|
return (
|
|
31
32
|
/** @class */
|
|
@@ -42,58 +43,58 @@ var I = function() {
|
|
|
42
43
|
},
|
|
43
44
|
enumerable: !0,
|
|
44
45
|
configurable: !0
|
|
45
|
-
}), t.prototype.get = function(
|
|
46
|
-
var
|
|
46
|
+
}), t.prototype.get = function(r) {
|
|
47
|
+
var n = e(this.__entries__, r), i = this.__entries__[n];
|
|
47
48
|
return i && i[1];
|
|
48
|
-
}, t.prototype.set = function(
|
|
49
|
-
var i = e(this.__entries__,
|
|
50
|
-
~i ? this.__entries__[i][1] =
|
|
51
|
-
}, t.prototype.delete = function(
|
|
52
|
-
var
|
|
53
|
-
~i &&
|
|
54
|
-
}, t.prototype.has = function(
|
|
55
|
-
return !!~e(this.__entries__,
|
|
49
|
+
}, t.prototype.set = function(r, n) {
|
|
50
|
+
var i = e(this.__entries__, r);
|
|
51
|
+
~i ? this.__entries__[i][1] = n : this.__entries__.push([r, n]);
|
|
52
|
+
}, t.prototype.delete = function(r) {
|
|
53
|
+
var n = this.__entries__, i = e(n, r);
|
|
54
|
+
~i && n.splice(i, 1);
|
|
55
|
+
}, t.prototype.has = function(r) {
|
|
56
|
+
return !!~e(this.__entries__, r);
|
|
56
57
|
}, t.prototype.clear = function() {
|
|
57
58
|
this.__entries__.splice(0);
|
|
58
|
-
}, t.prototype.forEach = function(
|
|
59
|
-
|
|
59
|
+
}, t.prototype.forEach = function(r, n) {
|
|
60
|
+
n === void 0 && (n = null);
|
|
60
61
|
for (var i = 0, o = this.__entries__; i < o.length; i++) {
|
|
61
62
|
var s = o[i];
|
|
62
|
-
|
|
63
|
+
r.call(n, s[1], s[0]);
|
|
63
64
|
}
|
|
64
65
|
}, t;
|
|
65
66
|
}()
|
|
66
67
|
);
|
|
67
|
-
}(), z = typeof window < "u" && typeof document < "u" && window.document === document,
|
|
68
|
+
}(), z = typeof window < "u" && typeof document < "u" && window.document === document, _ = function() {
|
|
68
69
|
return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
|
|
69
70
|
}(), ce = function() {
|
|
70
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(
|
|
71
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(_) : function(e) {
|
|
71
72
|
return setTimeout(function() {
|
|
72
73
|
return e(Date.now());
|
|
73
74
|
}, 1e3 / 60);
|
|
74
75
|
};
|
|
75
76
|
}(), fe = 2;
|
|
76
77
|
function he(e, t) {
|
|
77
|
-
var
|
|
78
|
+
var r = !1, n = !1, i = 0;
|
|
78
79
|
function o() {
|
|
79
|
-
|
|
80
|
+
r && (r = !1, e()), n && c();
|
|
80
81
|
}
|
|
81
82
|
function s() {
|
|
82
83
|
ce(o);
|
|
83
84
|
}
|
|
84
85
|
function c() {
|
|
85
86
|
var u = Date.now();
|
|
86
|
-
if (
|
|
87
|
+
if (r) {
|
|
87
88
|
if (u - i < fe)
|
|
88
89
|
return;
|
|
89
|
-
|
|
90
|
+
n = !0;
|
|
90
91
|
} else
|
|
91
|
-
|
|
92
|
+
r = !0, n = !1, setTimeout(s, t);
|
|
92
93
|
i = u;
|
|
93
94
|
}
|
|
94
95
|
return c;
|
|
95
96
|
}
|
|
96
|
-
var de = 20,
|
|
97
|
+
var de = 20, ve = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], le = typeof MutationObserver < "u", pe = (
|
|
97
98
|
/** @class */
|
|
98
99
|
function() {
|
|
99
100
|
function e() {
|
|
@@ -102,20 +103,20 @@ var de = 20, le = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
102
103
|
return e.prototype.addObserver = function(t) {
|
|
103
104
|
~this.observers_.indexOf(t) || this.observers_.push(t), this.connected_ || this.connect_();
|
|
104
105
|
}, e.prototype.removeObserver = function(t) {
|
|
105
|
-
var
|
|
106
|
-
~
|
|
106
|
+
var r = this.observers_, n = r.indexOf(t);
|
|
107
|
+
~n && r.splice(n, 1), !r.length && this.connected_ && this.disconnect_();
|
|
107
108
|
}, e.prototype.refresh = function() {
|
|
108
109
|
var t = this.updateObservers_();
|
|
109
110
|
t && this.refresh();
|
|
110
111
|
}, e.prototype.updateObservers_ = function() {
|
|
111
|
-
var t = this.observers_.filter(function(
|
|
112
|
-
return
|
|
112
|
+
var t = this.observers_.filter(function(r) {
|
|
113
|
+
return r.gatherActive(), r.hasActive();
|
|
113
114
|
});
|
|
114
|
-
return t.forEach(function(
|
|
115
|
-
return
|
|
115
|
+
return t.forEach(function(r) {
|
|
116
|
+
return r.broadcastActive();
|
|
116
117
|
}), t.length > 0;
|
|
117
118
|
}, e.prototype.connect_ = function() {
|
|
118
|
-
!z || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh),
|
|
119
|
+
!z || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), le ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
|
|
119
120
|
attributes: !0,
|
|
120
121
|
childList: !0,
|
|
121
122
|
characterData: !0,
|
|
@@ -124,8 +125,8 @@ var de = 20, le = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
124
125
|
}, e.prototype.disconnect_ = function() {
|
|
125
126
|
!z || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
|
|
126
127
|
}, e.prototype.onTransitionEnd_ = function(t) {
|
|
127
|
-
var
|
|
128
|
-
return !!~
|
|
128
|
+
var r = t.propertyName, n = r === void 0 ? "" : r, i = ve.some(function(o) {
|
|
129
|
+
return !!~n.indexOf(o);
|
|
129
130
|
});
|
|
130
131
|
i && this.refresh();
|
|
131
132
|
}, e.getInstance = function() {
|
|
@@ -133,8 +134,8 @@ var de = 20, le = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
133
134
|
}, e.instance_ = null, e;
|
|
134
135
|
}()
|
|
135
136
|
), L = function(e, t) {
|
|
136
|
-
for (var
|
|
137
|
-
var i = r
|
|
137
|
+
for (var r = 0, n = Object.keys(t); r < n.length; r++) {
|
|
138
|
+
var i = n[r];
|
|
138
139
|
Object.defineProperty(e, i, {
|
|
139
140
|
value: t[i],
|
|
140
141
|
enumerable: !1,
|
|
@@ -145,42 +146,42 @@ var de = 20, le = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
145
146
|
return e;
|
|
146
147
|
}, p = function(e) {
|
|
147
148
|
var t = e && e.ownerDocument && e.ownerDocument.defaultView;
|
|
148
|
-
return t ||
|
|
149
|
+
return t || _;
|
|
149
150
|
}, V = y(0, 0, 0, 0);
|
|
150
151
|
function g(e) {
|
|
151
152
|
return parseFloat(e) || 0;
|
|
152
153
|
}
|
|
153
|
-
function
|
|
154
|
-
for (var t = [],
|
|
155
|
-
t[
|
|
156
|
-
return t.reduce(function(
|
|
154
|
+
function P(e) {
|
|
155
|
+
for (var t = [], r = 1; r < arguments.length; r++)
|
|
156
|
+
t[r - 1] = arguments[r];
|
|
157
|
+
return t.reduce(function(n, i) {
|
|
157
158
|
var o = e["border-" + i + "-width"];
|
|
158
|
-
return
|
|
159
|
+
return n + g(o);
|
|
159
160
|
}, 0);
|
|
160
161
|
}
|
|
161
162
|
function be(e) {
|
|
162
|
-
for (var t = ["top", "right", "bottom", "left"],
|
|
163
|
-
var o = i[
|
|
164
|
-
|
|
163
|
+
for (var t = ["top", "right", "bottom", "left"], r = {}, n = 0, i = t; n < i.length; n++) {
|
|
164
|
+
var o = i[n], s = e["padding-" + o];
|
|
165
|
+
r[o] = g(s);
|
|
165
166
|
}
|
|
166
|
-
return
|
|
167
|
+
return r;
|
|
167
168
|
}
|
|
168
|
-
function
|
|
169
|
+
function me(e) {
|
|
169
170
|
var t = e.getBBox();
|
|
170
171
|
return y(0, 0, t.width, t.height);
|
|
171
172
|
}
|
|
172
|
-
function
|
|
173
|
-
var t = e.clientWidth,
|
|
174
|
-
if (!t && !
|
|
173
|
+
function _e(e) {
|
|
174
|
+
var t = e.clientWidth, r = e.clientHeight;
|
|
175
|
+
if (!t && !r)
|
|
175
176
|
return V;
|
|
176
|
-
var
|
|
177
|
-
if (
|
|
178
|
-
var f = Math.round(c + o) - t,
|
|
179
|
-
Math.abs(f) !== 1 && (c -= f), Math.abs(
|
|
177
|
+
var n = p(e).getComputedStyle(e), i = be(n), o = i.left + i.right, s = i.top + i.bottom, c = g(n.width), u = g(n.height);
|
|
178
|
+
if (n.boxSizing === "border-box" && (Math.round(c + o) !== t && (c -= P(n, "left", "right") + o), Math.round(u + s) !== r && (u -= P(n, "top", "bottom") + s)), !ye(e)) {
|
|
179
|
+
var f = Math.round(c + o) - t, v = Math.round(u + s) - r;
|
|
180
|
+
Math.abs(f) !== 1 && (c -= f), Math.abs(v) !== 1 && (u -= v);
|
|
180
181
|
}
|
|
181
182
|
return y(i.left, i.top, c, u);
|
|
182
183
|
}
|
|
183
|
-
var ge =
|
|
184
|
+
var ge = function() {
|
|
184
185
|
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
185
186
|
return e instanceof p(e).SVGGraphicsElement;
|
|
186
187
|
} : function(e) {
|
|
@@ -191,23 +192,23 @@ function ye(e) {
|
|
|
191
192
|
return e === p(e).document.documentElement;
|
|
192
193
|
}
|
|
193
194
|
function Re(e) {
|
|
194
|
-
return z ? ge(e) ?
|
|
195
|
+
return z ? ge(e) ? me(e) : _e(e) : V;
|
|
195
196
|
}
|
|
196
197
|
function we(e) {
|
|
197
|
-
var t = e.x,
|
|
198
|
+
var t = e.x, r = e.y, n = e.width, i = e.height, o = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, s = Object.create(o.prototype);
|
|
198
199
|
return L(s, {
|
|
199
200
|
x: t,
|
|
200
|
-
y:
|
|
201
|
-
width:
|
|
201
|
+
y: r,
|
|
202
|
+
width: n,
|
|
202
203
|
height: i,
|
|
203
|
-
top:
|
|
204
|
-
right: t +
|
|
205
|
-
bottom: i +
|
|
204
|
+
top: r,
|
|
205
|
+
right: t + n,
|
|
206
|
+
bottom: i + r,
|
|
206
207
|
left: t
|
|
207
208
|
}), s;
|
|
208
209
|
}
|
|
209
|
-
function y(e, t,
|
|
210
|
-
return { x: e, y: t, width:
|
|
210
|
+
function y(e, t, r, n) {
|
|
211
|
+
return { x: e, y: t, width: r, height: n };
|
|
211
212
|
}
|
|
212
213
|
var Ee = (
|
|
213
214
|
/** @class */
|
|
@@ -225,20 +226,20 @@ var Ee = (
|
|
|
225
226
|
}()
|
|
226
227
|
), Oe = (
|
|
227
228
|
/** @class */
|
|
228
|
-
|
|
229
|
-
function e(t,
|
|
230
|
-
var
|
|
231
|
-
L(this, { target: t, contentRect:
|
|
229
|
+
function() {
|
|
230
|
+
function e(t, r) {
|
|
231
|
+
var n = we(r);
|
|
232
|
+
L(this, { target: t, contentRect: n });
|
|
232
233
|
}
|
|
233
234
|
return e;
|
|
234
235
|
}()
|
|
235
236
|
), ze = (
|
|
236
237
|
/** @class */
|
|
237
238
|
function() {
|
|
238
|
-
function e(t,
|
|
239
|
+
function e(t, r, n) {
|
|
239
240
|
if (this.activeObservations_ = [], this.observations_ = new I(), typeof t != "function")
|
|
240
241
|
throw new TypeError("The callback provided as parameter 1 is not a function.");
|
|
241
|
-
this.callback_ = t, this.controller_ =
|
|
242
|
+
this.callback_ = t, this.controller_ = r, this.callbackCtx_ = n;
|
|
242
243
|
}
|
|
243
244
|
return e.prototype.observe = function(t) {
|
|
244
245
|
if (!arguments.length)
|
|
@@ -246,8 +247,8 @@ var Ee = (
|
|
|
246
247
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
247
248
|
if (!(t instanceof p(t).Element))
|
|
248
249
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
249
|
-
var
|
|
250
|
-
|
|
250
|
+
var r = this.observations_;
|
|
251
|
+
r.has(t) || (r.set(t, new Ee(t)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
251
252
|
}
|
|
252
253
|
}, e.prototype.unobserve = function(t) {
|
|
253
254
|
if (!arguments.length)
|
|
@@ -255,22 +256,22 @@ var Ee = (
|
|
|
255
256
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
256
257
|
if (!(t instanceof p(t).Element))
|
|
257
258
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
258
|
-
var
|
|
259
|
-
|
|
259
|
+
var r = this.observations_;
|
|
260
|
+
r.has(t) && (r.delete(t), r.size || this.controller_.removeObserver(this));
|
|
260
261
|
}
|
|
261
262
|
}, e.prototype.disconnect = function() {
|
|
262
263
|
this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
|
|
263
264
|
}, e.prototype.gatherActive = function() {
|
|
264
265
|
var t = this;
|
|
265
|
-
this.clearActive(), this.observations_.forEach(function(
|
|
266
|
-
|
|
266
|
+
this.clearActive(), this.observations_.forEach(function(r) {
|
|
267
|
+
r.isActive() && t.activeObservations_.push(r);
|
|
267
268
|
});
|
|
268
269
|
}, e.prototype.broadcastActive = function() {
|
|
269
270
|
if (this.hasActive()) {
|
|
270
|
-
var t = this.callbackCtx_,
|
|
271
|
-
return new Oe(
|
|
271
|
+
var t = this.callbackCtx_, r = this.activeObservations_.map(function(n) {
|
|
272
|
+
return new Oe(n.target, n.broadcastRect());
|
|
272
273
|
});
|
|
273
|
-
this.callback_.call(t,
|
|
274
|
+
this.callback_.call(t, r, t), this.clearActive();
|
|
274
275
|
}
|
|
275
276
|
}, e.prototype.clearActive = function() {
|
|
276
277
|
this.activeObservations_.splice(0);
|
|
@@ -278,16 +279,16 @@ var Ee = (
|
|
|
278
279
|
return this.activeObservations_.length > 0;
|
|
279
280
|
}, e;
|
|
280
281
|
}()
|
|
281
|
-
),
|
|
282
|
+
), j = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new I(), B = (
|
|
282
283
|
/** @class */
|
|
283
|
-
|
|
284
|
+
function() {
|
|
284
285
|
function e(t) {
|
|
285
286
|
if (!(this instanceof e))
|
|
286
287
|
throw new TypeError("Cannot call a class as a function.");
|
|
287
288
|
if (!arguments.length)
|
|
288
289
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
289
|
-
var
|
|
290
|
-
|
|
290
|
+
var r = pe.getInstance(), n = new ze(t, r, this);
|
|
291
|
+
j.set(this, n);
|
|
291
292
|
}
|
|
292
293
|
return e;
|
|
293
294
|
}()
|
|
@@ -297,19 +298,19 @@ var Ee = (
|
|
|
297
298
|
"unobserve",
|
|
298
299
|
"disconnect"
|
|
299
300
|
].forEach(function(e) {
|
|
300
|
-
|
|
301
|
+
B.prototype[e] = function() {
|
|
301
302
|
var t;
|
|
302
|
-
return (t =
|
|
303
|
+
return (t = j.get(this))[e].apply(t, arguments);
|
|
303
304
|
};
|
|
304
305
|
});
|
|
305
306
|
var Ce = function() {
|
|
306
|
-
return typeof
|
|
307
|
+
return typeof _.ResizeObserver < "u" ? _.ResizeObserver : B;
|
|
307
308
|
}(), d = /* @__PURE__ */ new Map();
|
|
308
309
|
function F(e) {
|
|
309
310
|
e.forEach(function(t) {
|
|
310
|
-
var
|
|
311
|
-
(
|
|
312
|
-
return i(
|
|
311
|
+
var r, n = t.target;
|
|
312
|
+
(r = d.get(n)) === null || r === void 0 || r.forEach(function(i) {
|
|
313
|
+
return i(n);
|
|
313
314
|
});
|
|
314
315
|
});
|
|
315
316
|
}
|
|
@@ -323,28 +324,28 @@ function xe(e, t) {
|
|
|
323
324
|
d.has(e) && (d.get(e).delete(t), d.get(e).size || (G.unobserve(e), d.delete(e)));
|
|
324
325
|
}
|
|
325
326
|
var Ae = /* @__PURE__ */ function(e) {
|
|
326
|
-
|
|
327
|
-
var t =
|
|
328
|
-
function
|
|
329
|
-
return
|
|
327
|
+
te(r, e);
|
|
328
|
+
var t = re(r);
|
|
329
|
+
function r() {
|
|
330
|
+
return ne(this, r), t.apply(this, arguments);
|
|
330
331
|
}
|
|
331
|
-
return
|
|
332
|
+
return ie(r, [{
|
|
332
333
|
key: "render",
|
|
333
334
|
value: function() {
|
|
334
335
|
return this.props.children;
|
|
335
336
|
}
|
|
336
|
-
}]),
|
|
337
|
+
}]), r;
|
|
337
338
|
}(a.Component);
|
|
338
339
|
function De(e, t) {
|
|
339
|
-
var
|
|
340
|
+
var r = e.children, n = e.disabled, i = a.useRef(null), o = a.useRef(null), s = a.useContext(O), c = typeof r == "function", u = c ? r(i) : r, f = a.useRef({
|
|
340
341
|
width: -1,
|
|
341
342
|
height: -1,
|
|
342
343
|
offsetWidth: -1,
|
|
343
344
|
offsetHeight: -1
|
|
344
|
-
}),
|
|
345
|
-
var
|
|
345
|
+
}), v = !c && /* @__PURE__ */ a.isValidElement(u) && oe(u), K = v ? se(u) : null, Y = ae(K, i), C = function() {
|
|
346
|
+
var l;
|
|
346
347
|
return E(i.current) || // Support `nativeElement` format
|
|
347
|
-
(i.current &&
|
|
348
|
+
(i.current && U(i.current) === "object" ? E((l = i.current) === null || l === void 0 ? void 0 : l.nativeElement) : null) || E(o.current);
|
|
348
349
|
};
|
|
349
350
|
a.useImperativeHandle(t, function() {
|
|
350
351
|
return C();
|
|
@@ -352,16 +353,16 @@ function De(e, t) {
|
|
|
352
353
|
var M = a.useRef(e);
|
|
353
354
|
M.current = e;
|
|
354
355
|
var x = a.useCallback(function(h) {
|
|
355
|
-
var
|
|
356
|
-
if (f.current.width !== N || f.current.height !== S || f.current.offsetWidth !== b || f.current.offsetHeight !==
|
|
356
|
+
var l = M.current, A = l.onResize, X = l.data, D = h.getBoundingClientRect(), R = D.width, w = D.height, b = h.offsetWidth, m = h.offsetHeight, N = Math.floor(R), S = Math.floor(w);
|
|
357
|
+
if (f.current.width !== N || f.current.height !== S || f.current.offsetWidth !== b || f.current.offsetHeight !== m) {
|
|
357
358
|
var T = {
|
|
358
359
|
width: N,
|
|
359
360
|
height: S,
|
|
360
361
|
offsetWidth: b,
|
|
361
|
-
offsetHeight:
|
|
362
|
+
offsetHeight: m
|
|
362
363
|
};
|
|
363
364
|
f.current = T;
|
|
364
|
-
var J = b === Math.round(R) ? R : b, Q =
|
|
365
|
+
var J = b === Math.round(R) ? R : b, Q = m === Math.round(w) ? w : m, W = k(k({}, T), {}, {
|
|
365
366
|
offsetWidth: J,
|
|
366
367
|
offsetHeight: Q
|
|
367
368
|
});
|
|
@@ -372,31 +373,31 @@ function De(e, t) {
|
|
|
372
373
|
}, []);
|
|
373
374
|
return a.useEffect(function() {
|
|
374
375
|
var h = C();
|
|
375
|
-
return h && !
|
|
376
|
+
return h && !n && Me(h, x), function() {
|
|
376
377
|
return xe(h, x);
|
|
377
378
|
};
|
|
378
|
-
}, [i.current,
|
|
379
|
+
}, [i.current, n]), /* @__PURE__ */ a.createElement(Ae, {
|
|
379
380
|
ref: o
|
|
380
|
-
},
|
|
381
|
+
}, v ? /* @__PURE__ */ a.cloneElement(u, {
|
|
381
382
|
ref: Y
|
|
382
383
|
}) : u);
|
|
383
384
|
}
|
|
384
|
-
var
|
|
385
|
-
process.env.NODE_ENV !== "production" && (
|
|
385
|
+
var $ = /* @__PURE__ */ a.forwardRef(De);
|
|
386
|
+
process.env.NODE_ENV !== "production" && ($.displayName = "SingleObserver");
|
|
386
387
|
var Ne = "rc-observer-key";
|
|
387
388
|
function Se(e, t) {
|
|
388
|
-
var
|
|
389
|
-
return process.env.NODE_ENV !== "production" && (
|
|
389
|
+
var r = e.children, n = typeof r == "function" ? [r] : ee(r);
|
|
390
|
+
return process.env.NODE_ENV !== "production" && (n.length > 1 ? H(!1, "Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead.") : n.length === 0 && H(!1, "`children` of ResizeObserver is empty. Nothing is in observe.")), n.map(function(i, o) {
|
|
390
391
|
var s = (i == null ? void 0 : i.key) || "".concat(Ne, "-").concat(o);
|
|
391
|
-
return /* @__PURE__ */ a.createElement(
|
|
392
|
+
return /* @__PURE__ */ a.createElement($, Z({}, e, {
|
|
392
393
|
key: s,
|
|
393
394
|
ref: o === 0 ? t : void 0
|
|
394
395
|
}), i);
|
|
395
396
|
});
|
|
396
397
|
}
|
|
397
|
-
var
|
|
398
|
-
process.env.NODE_ENV !== "production" && (
|
|
399
|
-
|
|
398
|
+
var q = /* @__PURE__ */ a.forwardRef(Se);
|
|
399
|
+
process.env.NODE_ENV !== "production" && (q.displayName = "ResizeObserver");
|
|
400
|
+
q.Collection = ue;
|
|
400
401
|
export {
|
|
401
|
-
|
|
402
|
+
q as R
|
|
402
403
|
};
|