@bigbinary/neetoui 5.2.26 → 5.2.28

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.js CHANGED
@@ -1678,7 +1678,7 @@ const PresenceContext = createContext(null);
1678
1678
 
1679
1679
  const isBrowser$6 = typeof document !== "undefined";
1680
1680
 
1681
- const useIsomorphicLayoutEffect$2 = isBrowser$6 ? useLayoutEffect : useEffect;
1681
+ const useIsomorphicLayoutEffect$1 = isBrowser$6 ? useLayoutEffect : useEffect;
1682
1682
 
1683
1683
  const LazyContext = createContext({ strict: false });
1684
1684
 
@@ -1713,7 +1713,7 @@ function useVisualElement(Component, visualState, props, createVisualElement) {
1713
1713
  * was present on initial render - it will be deleted after this.
1714
1714
  */
1715
1715
  const canHandoff = useRef(Boolean(window.HandoffAppearAnimations));
1716
- useIsomorphicLayoutEffect$2(() => {
1716
+ useIsomorphicLayoutEffect$1(() => {
1717
1717
  if (!visualElement)
1718
1718
  return;
1719
1719
  visualElement.render();
@@ -6339,11 +6339,11 @@ class AnimationFeature extends Feature {
6339
6339
  unmount() { }
6340
6340
  }
6341
6341
 
6342
- let id$2 = 0;
6342
+ let id$1 = 0;
6343
6343
  class ExitAnimationFeature extends Feature {
6344
6344
  constructor() {
6345
6345
  super(...arguments);
6346
- this.id = id$2++;
6346
+ this.id = id$1++;
6347
6347
  }
6348
6348
  update() {
6349
6349
  if (!this.node.presenceContext)
@@ -8013,7 +8013,7 @@ const transformAxes = ["", "X", "Y", "Z"];
8013
8013
  * which has a noticeable difference in spring animations
8014
8014
  */
8015
8015
  const animationTarget = 1000;
8016
- let id$1 = 0;
8016
+ let id = 0;
8017
8017
  /**
8018
8018
  * Use a mutable data object for debug data so as to not create a new
8019
8019
  * object every frame.
@@ -8030,7 +8030,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
8030
8030
  /**
8031
8031
  * A unique ID generated for every projection node.
8032
8032
  */
8033
- this.id = id$1++;
8033
+ this.id = id++;
8034
8034
  /**
8035
8035
  * An id that represents a unique session instigated by startUpdate.
8036
8036
  */
@@ -10521,7 +10521,7 @@ const motion = /*@__PURE__*/ createMotionProxy((Component, config) => createDomM
10521
10521
 
10522
10522
  function useIsMounted() {
10523
10523
  const isMounted = useRef(false);
10524
- useIsomorphicLayoutEffect$2(() => {
10524
+ useIsomorphicLayoutEffect$1(() => {
10525
10525
  isMounted.current = true;
10526
10526
  return () => {
10527
10527
  isMounted.current = false;
@@ -10731,7 +10731,7 @@ const AnimatePresence = ({ children, custom, initial = true, onExitComplete, exi
10731
10731
  // If this is the initial component render, just deal with logic surrounding whether
10732
10732
  // we play onMount animations or not.
10733
10733
  const isInitialRender = useRef(true);
10734
- useIsomorphicLayoutEffect$2(() => {
10734
+ useIsomorphicLayoutEffect$1(() => {
10735
10735
  isInitialRender.current = false;
10736
10736
  updateChildLookup(filteredChildren, allChildren);
10737
10737
  presentChildren.current = childrenToRender;
@@ -14536,7 +14536,7 @@ function deepPreserveProps(instanceProps, componentProps) {
14536
14536
  });
14537
14537
  }
14538
14538
 
14539
- var useIsomorphicLayoutEffect$1 = isBrowser$4 ? useLayoutEffect : useEffect;
14539
+ var useIsomorphicLayoutEffect = isBrowser$4 ? useLayoutEffect : useEffect;
14540
14540
  function useMutableBox(initialValue) {
14541
14541
  // Using refs instead of state as it's recommended to not store imperative
14542
14542
  // values in state due to memory problems in React(?)
@@ -14675,7 +14675,7 @@ function TippyGenerator(tippy) {
14675
14675
 
14676
14676
  var deps = [reference].concat(children ? [children.type] : []); // CREATE
14677
14677
 
14678
- useIsomorphicLayoutEffect$1(function () {
14678
+ useIsomorphicLayoutEffect(function () {
14679
14679
  var element = reference;
14680
14680
 
14681
14681
  if (reference && reference.hasOwnProperty('current')) {
@@ -14710,7 +14710,7 @@ function TippyGenerator(tippy) {
14710
14710
  };
14711
14711
  }, deps); // UPDATE
14712
14712
 
14713
- useIsomorphicLayoutEffect$1(function () {
14713
+ useIsomorphicLayoutEffect(function () {
14714
14714
  var _instance$popperInsta;
14715
14715
 
14716
14716
  // Prevent this effect from running on 1st render
@@ -14746,7 +14746,7 @@ function TippyGenerator(tippy) {
14746
14746
  });
14747
14747
  }
14748
14748
  });
14749
- useIsomorphicLayoutEffect$1(function () {
14749
+ useIsomorphicLayoutEffect(function () {
14750
14750
  var _instance$props$poppe;
14751
14751
 
14752
14752
  if (!render) {
@@ -16632,6 +16632,11 @@ SwitchTransition.defaultProps = {
16632
16632
  mode: modes.out
16633
16633
  };
16634
16634
 
16635
+ var useId = function useId(defaultId) {
16636
+ var id = useId$1();
16637
+ return defaultId || id;
16638
+ };
16639
+
16635
16640
  var useNavPrompt = function useNavPrompt(_ref) {
16636
16641
  var _ref$shouldBlock = _ref.shouldBlock,
16637
16642
  shouldBlock = _ref$shouldBlock === void 0 ? true : _ref$shouldBlock;
@@ -18075,147 +18080,6 @@ var BlockNavigation = function BlockNavigation(_ref) {
18075
18080
  }, otherProps));
18076
18081
  };
18077
18082
 
18078
- function canUseDOM$1() {
18079
- return !!(typeof window !== "undefined" && window.document && window.document.createElement);
18080
- }
18081
-
18082
- /**
18083
- * React currently throws a warning when using useLayoutEffect on the server. To
18084
- * get around it, we can conditionally useEffect on the server (no-op) and
18085
- * useLayoutEffect in the browser. We occasionally need useLayoutEffect to
18086
- * ensure we don't get a render flash for certain operations, but we may also
18087
- * need affected components to render on the server. One example is when setting
18088
- * a component's descendants to retrieve their index values.
18089
- *
18090
- * Important to note that using this hook as an escape hatch will break the
18091
- * eslint dependency warnings unless you rename the import to `useLayoutEffect`.
18092
- * Use sparingly only when the effect won't effect the rendered HTML to avoid
18093
- * any server/client mismatch.
18094
- *
18095
- * If a useLayoutEffect is needed and the result would create a mismatch, it's
18096
- * likely that the component in question shouldn't be rendered on the server at
18097
- * all, so a better approach would be to lazily render those in a parent
18098
- * component after client-side hydration.
18099
- *
18100
- * https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
18101
- * https://github.com/reduxjs/react-redux/blob/master/src/utils/useIsomorphicLayoutEffect.js
18102
- *
18103
- * @param effect
18104
- * @param deps
18105
- */
18106
-
18107
- var useIsomorphicLayoutEffect = /*#__PURE__*/canUseDOM$1() ? useLayoutEffect : useEffect;
18108
-
18109
- /*
18110
- * Welcome to @reach/auto-id!
18111
-
18112
- * Let's see if we can make sense of why this hook exists and its
18113
- * implementation.
18114
- *
18115
- * Some background:
18116
- * 1. Accessibiliy APIs rely heavily on element IDs
18117
- * 2. Requiring developers to put IDs on every element in Reach UI is both
18118
- * cumbersome and error-prone
18119
- * 3. With a component model, we can generate IDs for them!
18120
- *
18121
- * Solution 1: Generate random IDs.
18122
- *
18123
- * This works great as long as you don't server render your app. When React (in
18124
- * the client) tries to reuse the markup from the server, the IDs won't match
18125
- * and React will then recreate the entire DOM tree.
18126
- *
18127
- * Solution 2: Increment an integer
18128
- *
18129
- * This sounds great. Since we're rendering the exact same tree on the server
18130
- * and client, we can increment a counter and get a deterministic result between
18131
- * client and server. Also, JS integers can go up to nine-quadrillion. I'm
18132
- * pretty sure the tab will be closed before an app never needs
18133
- * 10 quadrillion IDs!
18134
- *
18135
- * Problem solved, right?
18136
- *
18137
- * Ah, but there's a catch! React's concurrent rendering makes this approach
18138
- * non-deterministic. While the client and server will end up with the same
18139
- * elements in the end, depending on suspense boundaries (and possibly some user
18140
- * input during the initial render) the incrementing integers won't always match
18141
- * up.
18142
- *
18143
- * Solution 3: Don't use IDs at all on the server; patch after first render.
18144
- *
18145
- * What we've done here is solution 2 with some tricks. With this approach, the
18146
- * ID returned is an empty string on the first render. This way the server and
18147
- * client have the same markup no matter how wild the concurrent rendering may
18148
- * have gotten.
18149
- *
18150
- * After the render, we patch up the components with an incremented ID. This
18151
- * causes a double render on any components with `useId`. Shouldn't be a problem
18152
- * since the components using this hook should be small, and we're only updating
18153
- * the ID attribute on the DOM, nothing big is happening.
18154
- *
18155
- * It doesn't have to be an incremented number, though--we could do generate
18156
- * random strings instead, but incrementing a number is probably the cheapest
18157
- * thing we can do.
18158
- *
18159
- * Additionally, we only do this patchup on the very first client render ever.
18160
- * Any calls to `useId` that happen dynamically in the client will be
18161
- * populated immediately with a value. So, we only get the double render after
18162
- * server hydration and never again, SO BACK OFF ALRIGHT?
18163
- */
18164
- var serverHandoffComplete = false;
18165
- var id = 0;
18166
-
18167
- var genId = function genId() {
18168
- return ++id;
18169
- };
18170
- /**
18171
- * useId
18172
- *
18173
- * Autogenerate IDs to facilitate WAI-ARIA and server rendering.
18174
- *
18175
- * Note: The returned ID will initially be `null` and will update after a
18176
- * component mounts. Users may need to supply their own ID if they need
18177
- * consistent values for SSR.
18178
- *
18179
- * @see Docs https://reach.tech/auto-id
18180
- */
18181
-
18182
-
18183
- function useId(idFromProps) {
18184
- /*
18185
- * If this instance isn't part of the initial render, we don't have to do the
18186
- * double render/patch-up dance. We can just generate the ID and return it.
18187
- */
18188
- var initialId = idFromProps || (serverHandoffComplete ? genId() : null);
18189
-
18190
- var _React$useState = useState(initialId),
18191
- id = _React$useState[0],
18192
- setId = _React$useState[1];
18193
-
18194
- useIsomorphicLayoutEffect(function () {
18195
- if (id === null) {
18196
- /*
18197
- * Patch the ID after render. We do this in `useLayoutEffect` to avoid any
18198
- * rendering flicker, though it'll make the first render slower (unlikely
18199
- * to matter, but you're welcome to measure your app and let us know if
18200
- * it's a problem).
18201
- */
18202
- setId(genId());
18203
- } // eslint-disable-next-line react-hooks/exhaustive-deps
18204
-
18205
- }, []);
18206
- useEffect(function () {
18207
- if (serverHandoffComplete === false) {
18208
- /*
18209
- * Flag all future uses of `useId` to skip the update dance. This is in
18210
- * `useEffect` because it goes after `useLayoutEffect`, ensuring we don't
18211
- * accidentally bail out of the patch-up dance prematurely.
18212
- */
18213
- serverHandoffComplete = true;
18214
- }
18215
- }, []);
18216
- return id != null ? String(id) : undefined;
18217
- }
18218
-
18219
18083
  var _excluded$r = ["children", "className", "required", "helpIconProps"],
18220
18084
  _excluded2$1 = ["onClick", "icon", "tooltipProps", "className"];
18221
18085
  var Label = function Label(_ref) {
@@ -26656,8 +26520,7 @@ var Slider = function Slider(_ref) {
26656
26520
  error = _ref.error,
26657
26521
  helpText = _ref.helpText,
26658
26522
  otherProps = _objectWithoutProperties$1(_ref, _excluded$7);
26659
- var _id = useId$1();
26660
- var id = otherProps.id || _id;
26523
+ var id = useId(otherProps.id);
26661
26524
  var errorId = "error_".concat(id);
26662
26525
  var helpTextId = "helpText_".concat(id);
26663
26526
  return /*#__PURE__*/React__default.createElement(_ConfigProvider, {