@gobolt/genesis 0.0.7 → 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 +18 -2
- package/dist/{AntdIcon-Bsnbyy6g.js → AntdIcon-BoLh1dP8.js} +37 -35
- package/dist/CheckOutlined-CeTKr6II.js +13 -0
- package/dist/{CloseCircleFilled-ZIY-u-27.js → CloseCircleFilled-DXCxlIQL.js} +2 -2
- package/dist/CloseOutlined-ClXDNn82.js +13 -0
- package/dist/{Compact-CJBo3f0u.js → Compact-CGY560JF.js} +45 -53
- package/dist/{ContextIsolator-CGkdKtc3.js → ContextIsolator-D5x2Ih51.js} +2 -2
- package/dist/{ExclamationCircleFilled-BICVVQIg.js → ExclamationCircleFilled-C0Kj5KQV.js} +2 -2
- package/dist/{CheckOutlined-DAynWe12.js → KeyCode-DM2sFh3-.js} +10 -20
- package/dist/LoadingOutlined-8EnJdZ7I.js +13 -0
- package/dist/Overflow-PBZD-PFm.js +360 -0
- package/dist/PurePanel-BqPLRtc2.js +203 -0
- package/dist/SearchOutlined-BP3Z2K6j.js +13 -0
- package/dist/{TextArea-3MOYYuAQ.js → TextArea-DKwCct3i.js} +26 -16
- package/dist/Typography-aGoDUl4R.js +710 -0
- package/dist/bundle.css +1204 -0
- package/dist/{button-BNV2qdrP.js → button-CDQgO1OK.js} +200 -197
- package/dist/collapse-Dtpt-6W_.js +20 -0
- package/dist/components/Badge/Badge.d.ts +6 -0
- package/dist/components/Badge/Badge.js +103 -0
- package/dist/components/Badge/__stories__/Badge.stories.d.ts +13 -0
- package/dist/components/Badge/__tests__/Badge.test.js +18 -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 +4 -0
- package/dist/components/Badge/styles.d.ts +3 -0
- package/dist/components/Badge/styles.js +34 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +8 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +11 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +22 -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 +23 -0
- package/dist/components/Breadcrumb/index.d.ts +3 -0
- package/dist/components/Breadcrumb/index.js +4 -0
- package/dist/components/Breadcrumb/styles.d.ts +27 -0
- package/dist/components/Breadcrumb/styles.js +2436 -0
- package/dist/components/Button/Button.d.ts +14 -0
- package/dist/components/Button/Button.js +22 -0
- package/dist/components/Button/__tests__/Button.test.js +16 -0
- package/dist/components/Button/styles.d.ts +16 -0
- package/dist/components/{atoms/button → Button}/styles.js +12 -12
- package/dist/components/{atoms/checkbox → Checkbox}/Checkbox.d.ts +2 -1
- package/dist/components/Checkbox/Checkbox.js +40 -0
- package/dist/components/{atoms/checkbox → Checkbox}/__tests__/Checkbox.test.js +1 -1
- package/dist/components/{atoms/checkbox → Checkbox}/styles.d.ts +5 -0
- package/dist/components/{atoms/checkbox → Checkbox}/styles.js +97 -96
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.d.ts +8 -0
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +40 -0
- package/dist/components/ErrorBoundaryFallback/index.d.ts +2 -0
- package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/styles.js +22 -21
- package/dist/components/Form/Form.d.ts +26 -0
- package/dist/components/Form/Form.js +8 -0
- package/dist/components/Form/__stories__/FormStory.js +93 -0
- 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 +4 -0
- package/dist/components/Form/styles.d.ts +3 -0
- package/dist/components/Form/styles.js +5 -0
- package/dist/components/{atoms/input → Input}/Input.d.ts +1 -3
- package/dist/components/Input/Input.js +19 -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 +24 -0
- package/dist/components/{atoms/input → Input}/styles.d.ts +2 -0
- package/dist/components/Input/styles.js +529 -0
- package/dist/components/Message/Message.d.ts +13 -0
- package/dist/components/Message/Message.js +78 -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 +42 -0
- package/dist/components/Message/index.d.ts +2 -0
- package/dist/components/Message/index.js +4 -0
- package/dist/components/Message/styles.d.ts +8 -0
- package/dist/components/Message/styles.js +41 -0
- package/dist/components/Notification/Notification.d.ts +17 -0
- package/dist/components/Notification/Notification.js +1370 -0
- package/dist/components/Notification/NotificationRightChevron.d.ts +2 -0
- package/dist/components/Notification/NotificationRightChevron.js +23 -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 +15 -0
- package/dist/components/Notification/index.d.ts +2 -0
- package/dist/components/Notification/index.js +4 -0
- package/dist/components/Notification/styles.d.ts +16 -0
- package/dist/components/Notification/styles.js +65 -0
- package/dist/components/Radio/Radio.d.ts +14 -0
- package/dist/components/Radio/Radio.js +28 -0
- package/dist/components/Radio/RadioGroup.d.ts +12 -0
- package/dist/components/Radio/RadioGroup.js +33 -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 +30 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Radio/index.js +4 -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/Select/DropdownChevron.d.ts +2 -0
- package/dist/components/Select/DropdownChevron.js +23 -0
- package/dist/components/Select/Select.d.ts +16 -0
- package/dist/components/Select/Select.js +36 -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/{atoms/select → Select}/__tests__/Select.test.js +1165 -1140
- package/dist/components/Select/styles.d.ts +32 -0
- package/dist/components/{atoms/select → Select}/styles.js +1517 -1651
- package/dist/components/Toast/Toast.d.ts +14 -0
- package/dist/components/Toast/Toast.js +19 -0
- package/dist/components/Toast/__stories__/Toast.stories.d.ts +16 -0
- package/dist/components/Toast/__tests__/Toast.test.d.ts +1 -0
- package/dist/components/Toast/__tests__/Toast.test.js +18 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Toast/index.js +4 -0
- package/dist/components/Toast/styles.d.ts +10 -0
- package/dist/components/Toast/styles.js +54 -0
- package/dist/components/Typography/Typography.d.ts +15 -0
- package/dist/components/Typography/Typography.js +8 -0
- package/dist/components/{atoms/typography → Typography}/__stories__/Typography.stories.d.ts +1 -0
- package/dist/components/Typography/__tests__/Typography.test.d.ts +1 -0
- package/dist/components/Typography/__tests__/Typography.test.js +23 -0
- package/dist/components/Typography/index.js +4 -0
- package/dist/components/Typography/styles.d.ts +21 -0
- package/dist/components/Typography/styles.js +48 -0
- package/dist/components/index.d.ts +26 -14
- package/dist/components/index.js +23 -13
- package/dist/constants/index.d.ts +104 -0
- package/dist/constants/index.js +41 -7
- package/dist/{context-CZsFJmh6.js → context-BMW3aJEf.js} +162 -161
- package/dist/genesis/GenesisThemeBreakdown.js +54 -24
- package/dist/genesis/GenesisThemeDemo.d.ts +0 -2
- package/dist/genesis/GenesisThemeDemo.js +3 -4
- package/dist/genesis/styles.js +1095 -2186
- package/dist/{index-C7kFNqp2.js → index-1CBpubM3.js} +36 -36
- package/dist/{index-3MWkSVA1.js → index-BZAhCB_K.js} +6 -5
- package/dist/{index-D1v_7IIx.js → index-C0SmxWLS.js} +95 -94
- package/dist/index-C8haFnXI.js +1112 -0
- package/dist/{index-VDH3iLaC.js → index-CfDY25LP.js} +298 -309
- package/dist/{index-SAAXFt-P.js → index-DPW8XdWj.js} +255 -249
- package/dist/{index-BQO27mgE.js → index-bKlRxQp4.js} +52 -51
- package/dist/index-oK7z6jnz.js +22795 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +31 -18
- package/dist/{isVisible-CNQjrJPN.js → isVisible-A-IfeFoT.js} +34 -33
- package/dist/{magic-string.es-BkUFmFT4.js → magic-string.es-D2FWSwU3.js} +1 -1
- package/dist/{SearchOutlined-DuzJkIiQ.js → pickAttrs-B0YTfcV1.js} +16 -26
- package/dist/providers/GenesisProvider.js +9 -5
- package/dist/providers/ThemeProvider.d.ts +2 -2
- package/dist/providers/ThemeProvider.js +4 -1
- package/dist/providers/ToastProvider.d.ts +13 -0
- package/dist/providers/ToastProvider.js +20 -0
- package/dist/providers/__stories__/GenesisProvider.stories.d.ts +6 -0
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.js +4 -4
- package/dist/providers/useGenesis.d.ts +7 -0
- package/dist/providers/useGenesis.js +6 -0
- package/dist/{setup-CMYVZCPF.js → setup-BvfREoHl.js} +6948 -6940
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +22 -16
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +21 -15
- package/dist/styles/design-tokens/{typography → typography-tokens}/TypographyTokens.stories.d.ts +1 -0
- package/dist/styles/design-tokens/variables.d.ts +17 -17
- package/dist/styles/design-tokens/variables.js +48 -48
- package/dist/styles/global-styles.d.ts +1 -0
- package/dist/styles/global-styles.js +13 -29
- package/dist/styles/theme/genesis-theme.d.ts +3 -0
- package/dist/styles/theme/genesis-theme.js +461 -277
- package/dist/styles/theme/genesis-theme.types.d.ts +46 -0
- package/dist/{Form-Cylpi4M4.js → styles-CT_fyXBd.js} +417 -424
- package/dist/test/setup.js +2 -1
- package/dist/useLocale-DT-z_vQ6.js +16 -0
- package/dist/{useVariants-CEpw6Ww6.js → useVariants-DvhXfgJY.js} +9 -8
- package/dist/warning-C63HNL9U.js +789 -0
- package/package.json +10 -4
- package/dist/Overflow-CP1M4Z0s.js +0 -369
- package/dist/components/atoms/button/Button.d.ts +0 -12
- package/dist/components/atoms/button/Button.js +0 -27
- package/dist/components/atoms/button/styles.d.ts +0 -12
- package/dist/components/atoms/checkbox/Checkbox.js +0 -13
- 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/styles.js +0 -415
- package/dist/components/atoms/select/Select.d.ts +0 -11
- package/dist/components/atoms/select/Select.js +0 -24
- package/dist/components/atoms/select/styles.d.ts +0 -15
- package/dist/components/atoms/typography/Typography.d.ts +0 -11
- 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.d.ts +0 -10
- package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.js +0 -35
- package/dist/components/molecules/error-boundary-fallback/index.d.ts +0 -1
- package/dist/components/molecules/form/Form.d.ts +0 -15
- 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-BPtFqhcp.js +0 -19110
- package/dist/index-BWys7dkb.js +0 -4462
- package/dist/styles/theme/global-styles.d.ts +0 -1
- package/dist/styles/theme/global-styles.js +0 -35
- /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}/__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}/index.js +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/{atoms/checkbox → Checkbox}/index.js +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.js +0 -0
- /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/styles.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/input → Input}/index.js +0 -0
- /package/dist/components/{atoms/select → Select}/index.d.ts +0 -0
- /package/dist/components/{atoms/select → Select}/index.js +0 -0
- /package/dist/components/{atoms/typography → Typography}/index.d.ts +0 -0
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as k, d as U, j as H, a as Z } from "./warning-C63HNL9U.js";
|
|
2
2
|
import * as a from "react";
|
|
3
|
-
import { t as
|
|
3
|
+
import { t as ee } from "./isVisible-A-IfeFoT.js";
|
|
4
|
+
import { _ as te, d as ne, e as re, f as ie, s as oe, h as se, j as ae, k as E } from "./index-oK7z6jnz.js";
|
|
4
5
|
var O = /* @__PURE__ */ a.createContext(null);
|
|
5
6
|
function ue(e) {
|
|
6
|
-
var t = e.children, n = e.onBatchResize, r = a.useRef(0), i = a.useRef([]), o = a.useContext(O), s = a.useCallback(function(
|
|
7
|
+
var t = e.children, n = e.onBatchResize, r = a.useRef(0), i = a.useRef([]), o = a.useContext(O), s = a.useCallback(function(f, u, c) {
|
|
7
8
|
r.current += 1;
|
|
8
9
|
var l = r.current;
|
|
9
10
|
i.current.push({
|
|
10
|
-
size:
|
|
11
|
+
size: f,
|
|
11
12
|
element: u,
|
|
12
|
-
data:
|
|
13
|
+
data: c
|
|
13
14
|
}), Promise.resolve().then(function() {
|
|
14
15
|
l === r.current && (n == null || n(i.current), i.current = []);
|
|
15
|
-
}), o == null || o(
|
|
16
|
+
}), o == null || o(f, u, c);
|
|
16
17
|
}, [n, o]);
|
|
17
18
|
return /* @__PURE__ */ a.createElement(O.Provider, {
|
|
18
19
|
value: s
|
|
@@ -64,34 +65,34 @@ var I = function() {
|
|
|
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
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(
|
|
70
|
+
}(), fe = function() {
|
|
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
|
+
}(), ce = 2;
|
|
76
77
|
function he(e, t) {
|
|
77
78
|
var n = !1, r = !1, i = 0;
|
|
78
79
|
function o() {
|
|
79
|
-
n && (n = !1, e()), r &&
|
|
80
|
+
n && (n = !1, e()), r && f();
|
|
80
81
|
}
|
|
81
82
|
function s() {
|
|
82
|
-
|
|
83
|
+
fe(o);
|
|
83
84
|
}
|
|
84
|
-
function
|
|
85
|
+
function f() {
|
|
85
86
|
var u = Date.now();
|
|
86
87
|
if (n) {
|
|
87
|
-
if (u - i <
|
|
88
|
+
if (u - i < ce)
|
|
88
89
|
return;
|
|
89
90
|
r = !0;
|
|
90
91
|
} else
|
|
91
92
|
n = !0, r = !1, setTimeout(s, t);
|
|
92
93
|
i = u;
|
|
93
94
|
}
|
|
94
|
-
return
|
|
95
|
+
return f;
|
|
95
96
|
}
|
|
96
97
|
var de = 20, le = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], ve = typeof MutationObserver < "u", pe = (
|
|
97
98
|
/** @class */
|
|
@@ -145,12 +146,12 @@ 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
|
+
function P(e) {
|
|
154
155
|
for (var t = [], n = 1; n < arguments.length; n++)
|
|
155
156
|
t[n - 1] = arguments[n];
|
|
156
157
|
return t.reduce(function(r, i) {
|
|
@@ -165,20 +166,20 @@ function be(e) {
|
|
|
165
166
|
}
|
|
166
167
|
return n;
|
|
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
|
+
function _e(e) {
|
|
173
174
|
var t = e.clientWidth, n = e.clientHeight;
|
|
174
175
|
if (!t && !n)
|
|
175
176
|
return V;
|
|
176
|
-
var r = p(e).getComputedStyle(e), i = be(r), o = i.left + i.right, s = i.top + i.bottom,
|
|
177
|
-
if (r.boxSizing === "border-box" && (Math.round(
|
|
178
|
-
var
|
|
179
|
-
Math.abs(
|
|
177
|
+
var r = p(e).getComputedStyle(e), i = be(r), o = i.left + i.right, s = i.top + i.bottom, f = g(r.width), u = g(r.height);
|
|
178
|
+
if (r.boxSizing === "border-box" && (Math.round(f + o) !== t && (f -= P(r, "left", "right") + o), Math.round(u + s) !== n && (u -= P(r, "top", "bottom") + s)), !ye(e)) {
|
|
179
|
+
var c = Math.round(f + o) - t, l = Math.round(u + s) - n;
|
|
180
|
+
Math.abs(c) !== 1 && (f -= c), Math.abs(l) !== 1 && (u -= l);
|
|
180
181
|
}
|
|
181
|
-
return y(i.left, i.top,
|
|
182
|
+
return y(i.left, i.top, f, u);
|
|
182
183
|
}
|
|
183
184
|
var ge = /* @__PURE__ */ function() {
|
|
184
185
|
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
@@ -191,7 +192,7 @@ 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
198
|
var t = e.x, n = e.y, r = e.width, i = e.height, o = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, s = Object.create(o.prototype);
|
|
@@ -278,7 +279,7 @@ 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
|
/* @__PURE__ */ function() {
|
|
284
285
|
function e(t) {
|
|
@@ -287,7 +288,7 @@ var Ee = (
|
|
|
287
288
|
if (!arguments.length)
|
|
288
289
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
289
290
|
var n = pe.getInstance(), r = new ze(t, n, this);
|
|
290
|
-
|
|
291
|
+
j.set(this, r);
|
|
291
292
|
}
|
|
292
293
|
return e;
|
|
293
294
|
}()
|
|
@@ -297,13 +298,13 @@ 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) {
|
|
@@ -323,12 +324,12 @@ 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 =
|
|
327
|
+
te(n, e);
|
|
328
|
+
var t = ne(n);
|
|
328
329
|
function n() {
|
|
329
|
-
return
|
|
330
|
+
return re(this, n), t.apply(this, arguments);
|
|
330
331
|
}
|
|
331
|
-
return
|
|
332
|
+
return ie(n, [{
|
|
332
333
|
key: "render",
|
|
333
334
|
value: function() {
|
|
334
335
|
return this.props.children;
|
|
@@ -336,15 +337,15 @@ var Ae = /* @__PURE__ */ function(e) {
|
|
|
336
337
|
}]), n;
|
|
337
338
|
}(a.Component);
|
|
338
339
|
function De(e, t) {
|
|
339
|
-
var n = e.children, r = e.disabled, i = a.useRef(null), o = a.useRef(null), s = a.useContext(O),
|
|
340
|
+
var n = e.children, r = e.disabled, i = a.useRef(null), o = a.useRef(null), s = a.useContext(O), f = typeof n == "function", u = f ? n(i) : n, c = a.useRef({
|
|
340
341
|
width: -1,
|
|
341
342
|
height: -1,
|
|
342
343
|
offsetWidth: -1,
|
|
343
344
|
offsetHeight: -1
|
|
344
|
-
}), l = !
|
|
345
|
+
}), l = !f && /* @__PURE__ */ a.isValidElement(u) && oe(u), K = l ? se(u) : null, Y = ae(K, i), C = function() {
|
|
345
346
|
var v;
|
|
346
347
|
return E(i.current) || // Support `nativeElement` format
|
|
347
|
-
(i.current &&
|
|
348
|
+
(i.current && U(i.current) === "object" ? E((v = i.current) === null || v === void 0 ? void 0 : v.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 v = M.current, A = v.onResize, X = v.data, D = h.getBoundingClientRect(), R = D.width, w = D.height, b = h.offsetWidth,
|
|
356
|
-
if (
|
|
356
|
+
var v = M.current, A = v.onResize, X = v.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 (c.current.width !== N || c.current.height !== S || c.current.offsetWidth !== b || c.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
|
-
var J = b === Math.round(R) ? R : b, Q =
|
|
364
|
+
c.current = T;
|
|
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
|
});
|
|
@@ -381,22 +382,22 @@ function De(e, t) {
|
|
|
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 n = e.children, r = typeof n == "function" ? [n] :
|
|
389
|
-
return process.env.NODE_ENV !== "production" && (r.length > 1 ?
|
|
389
|
+
var n = e.children, r = typeof n == "function" ? [n] : ee(n);
|
|
390
|
+
return process.env.NODE_ENV !== "production" && (r.length > 1 ? H(!1, "Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead.") : r.length === 0 && H(!1, "`children` of ResizeObserver is empty. Nothing is in observe.")), r.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
|
};
|