@bigbinary/neetoui 5.2.26 → 5.2.27
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/formik.cjs.js +18 -155
- package/formik.cjs.js.map +1 -1
- package/formik.js +18 -155
- package/formik.js.map +1 -1
- package/index.cjs.js +19 -157
- package/index.cjs.js.map +1 -1
- package/index.js +19 -157
- package/index.js.map +1 -1
- package/package.json +1 -1
package/formik.cjs.js
CHANGED
|
@@ -1708,7 +1708,7 @@ const PresenceContext = React.createContext(null);
|
|
|
1708
1708
|
|
|
1709
1709
|
const isBrowser$6 = typeof document !== "undefined";
|
|
1710
1710
|
|
|
1711
|
-
const useIsomorphicLayoutEffect$
|
|
1711
|
+
const useIsomorphicLayoutEffect$1 = isBrowser$6 ? React.useLayoutEffect : React.useEffect;
|
|
1712
1712
|
|
|
1713
1713
|
const LazyContext = React.createContext({ strict: false });
|
|
1714
1714
|
|
|
@@ -1743,7 +1743,7 @@ function useVisualElement(Component, visualState, props, createVisualElement) {
|
|
|
1743
1743
|
* was present on initial render - it will be deleted after this.
|
|
1744
1744
|
*/
|
|
1745
1745
|
const canHandoff = React.useRef(Boolean(window.HandoffAppearAnimations));
|
|
1746
|
-
useIsomorphicLayoutEffect$
|
|
1746
|
+
useIsomorphicLayoutEffect$1(() => {
|
|
1747
1747
|
if (!visualElement)
|
|
1748
1748
|
return;
|
|
1749
1749
|
visualElement.render();
|
|
@@ -6369,11 +6369,11 @@ class AnimationFeature extends Feature {
|
|
|
6369
6369
|
unmount() { }
|
|
6370
6370
|
}
|
|
6371
6371
|
|
|
6372
|
-
let id$
|
|
6372
|
+
let id$1 = 0;
|
|
6373
6373
|
class ExitAnimationFeature extends Feature {
|
|
6374
6374
|
constructor() {
|
|
6375
6375
|
super(...arguments);
|
|
6376
|
-
this.id = id$
|
|
6376
|
+
this.id = id$1++;
|
|
6377
6377
|
}
|
|
6378
6378
|
update() {
|
|
6379
6379
|
if (!this.node.presenceContext)
|
|
@@ -8043,7 +8043,7 @@ const transformAxes = ["", "X", "Y", "Z"];
|
|
|
8043
8043
|
* which has a noticeable difference in spring animations
|
|
8044
8044
|
*/
|
|
8045
8045
|
const animationTarget = 1000;
|
|
8046
|
-
let id
|
|
8046
|
+
let id = 0;
|
|
8047
8047
|
/**
|
|
8048
8048
|
* Use a mutable data object for debug data so as to not create a new
|
|
8049
8049
|
* object every frame.
|
|
@@ -8060,7 +8060,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
8060
8060
|
/**
|
|
8061
8061
|
* A unique ID generated for every projection node.
|
|
8062
8062
|
*/
|
|
8063
|
-
this.id = id
|
|
8063
|
+
this.id = id++;
|
|
8064
8064
|
/**
|
|
8065
8065
|
* An id that represents a unique session instigated by startUpdate.
|
|
8066
8066
|
*/
|
|
@@ -10551,7 +10551,7 @@ const motion = /*@__PURE__*/ createMotionProxy((Component, config) => createDomM
|
|
|
10551
10551
|
|
|
10552
10552
|
function useIsMounted() {
|
|
10553
10553
|
const isMounted = React.useRef(false);
|
|
10554
|
-
useIsomorphicLayoutEffect$
|
|
10554
|
+
useIsomorphicLayoutEffect$1(() => {
|
|
10555
10555
|
isMounted.current = true;
|
|
10556
10556
|
return () => {
|
|
10557
10557
|
isMounted.current = false;
|
|
@@ -10761,7 +10761,7 @@ const AnimatePresence = ({ children, custom, initial = true, onExitComplete, exi
|
|
|
10761
10761
|
// If this is the initial component render, just deal with logic surrounding whether
|
|
10762
10762
|
// we play onMount animations or not.
|
|
10763
10763
|
const isInitialRender = React.useRef(true);
|
|
10764
|
-
useIsomorphicLayoutEffect$
|
|
10764
|
+
useIsomorphicLayoutEffect$1(() => {
|
|
10765
10765
|
isInitialRender.current = false;
|
|
10766
10766
|
updateChildLookup(filteredChildren, allChildren);
|
|
10767
10767
|
presentChildren.current = childrenToRender;
|
|
@@ -14566,7 +14566,7 @@ function deepPreserveProps(instanceProps, componentProps) {
|
|
|
14566
14566
|
});
|
|
14567
14567
|
}
|
|
14568
14568
|
|
|
14569
|
-
var useIsomorphicLayoutEffect
|
|
14569
|
+
var useIsomorphicLayoutEffect = isBrowser$4 ? React.useLayoutEffect : React.useEffect;
|
|
14570
14570
|
function useMutableBox(initialValue) {
|
|
14571
14571
|
// Using refs instead of state as it's recommended to not store imperative
|
|
14572
14572
|
// values in state due to memory problems in React(?)
|
|
@@ -14705,7 +14705,7 @@ function TippyGenerator(tippy) {
|
|
|
14705
14705
|
|
|
14706
14706
|
var deps = [reference].concat(children ? [children.type] : []); // CREATE
|
|
14707
14707
|
|
|
14708
|
-
useIsomorphicLayoutEffect
|
|
14708
|
+
useIsomorphicLayoutEffect(function () {
|
|
14709
14709
|
var element = reference;
|
|
14710
14710
|
|
|
14711
14711
|
if (reference && reference.hasOwnProperty('current')) {
|
|
@@ -14740,7 +14740,7 @@ function TippyGenerator(tippy) {
|
|
|
14740
14740
|
};
|
|
14741
14741
|
}, deps); // UPDATE
|
|
14742
14742
|
|
|
14743
|
-
useIsomorphicLayoutEffect
|
|
14743
|
+
useIsomorphicLayoutEffect(function () {
|
|
14744
14744
|
var _instance$popperInsta;
|
|
14745
14745
|
|
|
14746
14746
|
// Prevent this effect from running on 1st render
|
|
@@ -14776,7 +14776,7 @@ function TippyGenerator(tippy) {
|
|
|
14776
14776
|
});
|
|
14777
14777
|
}
|
|
14778
14778
|
});
|
|
14779
|
-
useIsomorphicLayoutEffect
|
|
14779
|
+
useIsomorphicLayoutEffect(function () {
|
|
14780
14780
|
var _instance$props$poppe;
|
|
14781
14781
|
|
|
14782
14782
|
if (!render) {
|
|
@@ -16662,6 +16662,11 @@ SwitchTransition.defaultProps = {
|
|
|
16662
16662
|
mode: modes.out
|
|
16663
16663
|
};
|
|
16664
16664
|
|
|
16665
|
+
var useId = function useId(defaultId) {
|
|
16666
|
+
var id = React.useId();
|
|
16667
|
+
return defaultId || id;
|
|
16668
|
+
};
|
|
16669
|
+
|
|
16665
16670
|
var useNavPrompt = function useNavPrompt(_ref) {
|
|
16666
16671
|
var _ref$shouldBlock = _ref.shouldBlock,
|
|
16667
16672
|
shouldBlock = _ref$shouldBlock === void 0 ? true : _ref$shouldBlock;
|
|
@@ -18105,147 +18110,6 @@ var BlockNavigation = function BlockNavigation(_ref) {
|
|
|
18105
18110
|
}, otherProps));
|
|
18106
18111
|
};
|
|
18107
18112
|
|
|
18108
|
-
function canUseDOM$1() {
|
|
18109
|
-
return !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
18110
|
-
}
|
|
18111
|
-
|
|
18112
|
-
/**
|
|
18113
|
-
* React currently throws a warning when using useLayoutEffect on the server. To
|
|
18114
|
-
* get around it, we can conditionally useEffect on the server (no-op) and
|
|
18115
|
-
* useLayoutEffect in the browser. We occasionally need useLayoutEffect to
|
|
18116
|
-
* ensure we don't get a render flash for certain operations, but we may also
|
|
18117
|
-
* need affected components to render on the server. One example is when setting
|
|
18118
|
-
* a component's descendants to retrieve their index values.
|
|
18119
|
-
*
|
|
18120
|
-
* Important to note that using this hook as an escape hatch will break the
|
|
18121
|
-
* eslint dependency warnings unless you rename the import to `useLayoutEffect`.
|
|
18122
|
-
* Use sparingly only when the effect won't effect the rendered HTML to avoid
|
|
18123
|
-
* any server/client mismatch.
|
|
18124
|
-
*
|
|
18125
|
-
* If a useLayoutEffect is needed and the result would create a mismatch, it's
|
|
18126
|
-
* likely that the component in question shouldn't be rendered on the server at
|
|
18127
|
-
* all, so a better approach would be to lazily render those in a parent
|
|
18128
|
-
* component after client-side hydration.
|
|
18129
|
-
*
|
|
18130
|
-
* https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
|
|
18131
|
-
* https://github.com/reduxjs/react-redux/blob/master/src/utils/useIsomorphicLayoutEffect.js
|
|
18132
|
-
*
|
|
18133
|
-
* @param effect
|
|
18134
|
-
* @param deps
|
|
18135
|
-
*/
|
|
18136
|
-
|
|
18137
|
-
var useIsomorphicLayoutEffect = /*#__PURE__*/canUseDOM$1() ? React.useLayoutEffect : React.useEffect;
|
|
18138
|
-
|
|
18139
|
-
/*
|
|
18140
|
-
* Welcome to @reach/auto-id!
|
|
18141
|
-
|
|
18142
|
-
* Let's see if we can make sense of why this hook exists and its
|
|
18143
|
-
* implementation.
|
|
18144
|
-
*
|
|
18145
|
-
* Some background:
|
|
18146
|
-
* 1. Accessibiliy APIs rely heavily on element IDs
|
|
18147
|
-
* 2. Requiring developers to put IDs on every element in Reach UI is both
|
|
18148
|
-
* cumbersome and error-prone
|
|
18149
|
-
* 3. With a component model, we can generate IDs for them!
|
|
18150
|
-
*
|
|
18151
|
-
* Solution 1: Generate random IDs.
|
|
18152
|
-
*
|
|
18153
|
-
* This works great as long as you don't server render your app. When React (in
|
|
18154
|
-
* the client) tries to reuse the markup from the server, the IDs won't match
|
|
18155
|
-
* and React will then recreate the entire DOM tree.
|
|
18156
|
-
*
|
|
18157
|
-
* Solution 2: Increment an integer
|
|
18158
|
-
*
|
|
18159
|
-
* This sounds great. Since we're rendering the exact same tree on the server
|
|
18160
|
-
* and client, we can increment a counter and get a deterministic result between
|
|
18161
|
-
* client and server. Also, JS integers can go up to nine-quadrillion. I'm
|
|
18162
|
-
* pretty sure the tab will be closed before an app never needs
|
|
18163
|
-
* 10 quadrillion IDs!
|
|
18164
|
-
*
|
|
18165
|
-
* Problem solved, right?
|
|
18166
|
-
*
|
|
18167
|
-
* Ah, but there's a catch! React's concurrent rendering makes this approach
|
|
18168
|
-
* non-deterministic. While the client and server will end up with the same
|
|
18169
|
-
* elements in the end, depending on suspense boundaries (and possibly some user
|
|
18170
|
-
* input during the initial render) the incrementing integers won't always match
|
|
18171
|
-
* up.
|
|
18172
|
-
*
|
|
18173
|
-
* Solution 3: Don't use IDs at all on the server; patch after first render.
|
|
18174
|
-
*
|
|
18175
|
-
* What we've done here is solution 2 with some tricks. With this approach, the
|
|
18176
|
-
* ID returned is an empty string on the first render. This way the server and
|
|
18177
|
-
* client have the same markup no matter how wild the concurrent rendering may
|
|
18178
|
-
* have gotten.
|
|
18179
|
-
*
|
|
18180
|
-
* After the render, we patch up the components with an incremented ID. This
|
|
18181
|
-
* causes a double render on any components with `useId`. Shouldn't be a problem
|
|
18182
|
-
* since the components using this hook should be small, and we're only updating
|
|
18183
|
-
* the ID attribute on the DOM, nothing big is happening.
|
|
18184
|
-
*
|
|
18185
|
-
* It doesn't have to be an incremented number, though--we could do generate
|
|
18186
|
-
* random strings instead, but incrementing a number is probably the cheapest
|
|
18187
|
-
* thing we can do.
|
|
18188
|
-
*
|
|
18189
|
-
* Additionally, we only do this patchup on the very first client render ever.
|
|
18190
|
-
* Any calls to `useId` that happen dynamically in the client will be
|
|
18191
|
-
* populated immediately with a value. So, we only get the double render after
|
|
18192
|
-
* server hydration and never again, SO BACK OFF ALRIGHT?
|
|
18193
|
-
*/
|
|
18194
|
-
var serverHandoffComplete = false;
|
|
18195
|
-
var id = 0;
|
|
18196
|
-
|
|
18197
|
-
var genId = function genId() {
|
|
18198
|
-
return ++id;
|
|
18199
|
-
};
|
|
18200
|
-
/**
|
|
18201
|
-
* useId
|
|
18202
|
-
*
|
|
18203
|
-
* Autogenerate IDs to facilitate WAI-ARIA and server rendering.
|
|
18204
|
-
*
|
|
18205
|
-
* Note: The returned ID will initially be `null` and will update after a
|
|
18206
|
-
* component mounts. Users may need to supply their own ID if they need
|
|
18207
|
-
* consistent values for SSR.
|
|
18208
|
-
*
|
|
18209
|
-
* @see Docs https://reach.tech/auto-id
|
|
18210
|
-
*/
|
|
18211
|
-
|
|
18212
|
-
|
|
18213
|
-
function useId(idFromProps) {
|
|
18214
|
-
/*
|
|
18215
|
-
* If this instance isn't part of the initial render, we don't have to do the
|
|
18216
|
-
* double render/patch-up dance. We can just generate the ID and return it.
|
|
18217
|
-
*/
|
|
18218
|
-
var initialId = idFromProps || (serverHandoffComplete ? genId() : null);
|
|
18219
|
-
|
|
18220
|
-
var _React$useState = React.useState(initialId),
|
|
18221
|
-
id = _React$useState[0],
|
|
18222
|
-
setId = _React$useState[1];
|
|
18223
|
-
|
|
18224
|
-
useIsomorphicLayoutEffect(function () {
|
|
18225
|
-
if (id === null) {
|
|
18226
|
-
/*
|
|
18227
|
-
* Patch the ID after render. We do this in `useLayoutEffect` to avoid any
|
|
18228
|
-
* rendering flicker, though it'll make the first render slower (unlikely
|
|
18229
|
-
* to matter, but you're welcome to measure your app and let us know if
|
|
18230
|
-
* it's a problem).
|
|
18231
|
-
*/
|
|
18232
|
-
setId(genId());
|
|
18233
|
-
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
18234
|
-
|
|
18235
|
-
}, []);
|
|
18236
|
-
React.useEffect(function () {
|
|
18237
|
-
if (serverHandoffComplete === false) {
|
|
18238
|
-
/*
|
|
18239
|
-
* Flag all future uses of `useId` to skip the update dance. This is in
|
|
18240
|
-
* `useEffect` because it goes after `useLayoutEffect`, ensuring we don't
|
|
18241
|
-
* accidentally bail out of the patch-up dance prematurely.
|
|
18242
|
-
*/
|
|
18243
|
-
serverHandoffComplete = true;
|
|
18244
|
-
}
|
|
18245
|
-
}, []);
|
|
18246
|
-
return id != null ? String(id) : undefined;
|
|
18247
|
-
}
|
|
18248
|
-
|
|
18249
18113
|
var _excluded$r = ["children", "className", "required", "helpIconProps"],
|
|
18250
18114
|
_excluded2$1 = ["onClick", "icon", "tooltipProps", "className"];
|
|
18251
18115
|
var Label = function Label(_ref) {
|
|
@@ -26686,8 +26550,7 @@ var Slider = function Slider(_ref) {
|
|
|
26686
26550
|
error = _ref.error,
|
|
26687
26551
|
helpText = _ref.helpText,
|
|
26688
26552
|
otherProps = _objectWithoutProperties$1(_ref, _excluded$7);
|
|
26689
|
-
var
|
|
26690
|
-
var id = otherProps.id || _id;
|
|
26553
|
+
var id = useId(otherProps.id);
|
|
26691
26554
|
var errorId = "error_".concat(id);
|
|
26692
26555
|
var helpTextId = "helpText_".concat(id);
|
|
26693
26556
|
return /*#__PURE__*/React__default["default"].createElement(_ConfigProvider__default["default"], {
|