@lumx/react 4.10.0-alpha.0 → 4.10.0-alpha.1

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.
Files changed (3) hide show
  1. package/index.js +17 -9
  2. package/index.js.map +1 -1
  3. package/package.json +3 -3
package/index.js CHANGED
@@ -14846,12 +14846,6 @@ Progress.displayName = COMPONENT_NAME$s;
14846
14846
  Progress.className = CLASSNAME$t;
14847
14847
  Progress.defaultProps = DEFAULT_PROPS$v;
14848
14848
 
14849
- /**
14850
- * SSR-safe version of `useLayoutEffect`.
14851
- * Uses `useLayoutEffect` on the client and `useEffect` on the server to avoid React SSR warnings.
14852
- */
14853
- const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
14854
-
14855
14849
  const INIT_STATE = {
14856
14850
  isLazy: true,
14857
14851
  shouldActivateOnFocus: false,
@@ -14930,7 +14924,7 @@ const useTabProviderContext = (type, originalId) => {
14930
14924
  // Current tab or tab panel id.
14931
14925
  const generatedId = useId();
14932
14926
  const id = originalId || generatedId;
14933
- useIsomorphicLayoutEffect(() => {
14927
+ useEffect(() => {
14934
14928
  // On mount: register tab or tab panel id.
14935
14929
  dispatch({
14936
14930
  type: 'register',
@@ -15030,6 +15024,12 @@ const ProgressTrackerProvider = props => {
15030
15024
  };
15031
15025
  ProgressTrackerProvider.defaultProps = DEFAULT_PROPS$u;
15032
15026
 
15027
+ /**
15028
+ * SSR-safe version of `useLayoutEffect`.
15029
+ * Uses `useLayoutEffect` on the client and `useEffect` on the server to avoid React SSR warnings.
15030
+ */
15031
+ const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
15032
+
15033
15033
  /**
15034
15034
  * Returns a stable callback that always calls the latest version of `fn`.
15035
15035
  * Useful to avoid re-running effects when a callback prop changes reference.
@@ -18240,7 +18240,11 @@ const TabProvider = props => {
18240
18240
  onChange,
18241
18241
  ...propState
18242
18242
  } = props;
18243
- const [state, dispatch] = useReducer(reducer, INIT_STATE);
18243
+ const [state, dispatch] = useReducer(reducer, {
18244
+ ...INIT_STATE,
18245
+ ...DEFAULT_PROPS$7,
18246
+ ...propState
18247
+ });
18244
18248
 
18245
18249
  // On prop state change => dispatch update.
18246
18250
  useEffect(() => {
@@ -18501,7 +18505,11 @@ const Tab = forwardRef((props, ref) => {
18501
18505
  onKeyPress,
18502
18506
  ...forwardedProps
18503
18507
  } = otherProps;
18504
- const state = useTabProviderContext('tab', id);
18508
+ const tabState = useTabProviderContext('tab', id);
18509
+ const {
18510
+ isLazy: _isLazy,
18511
+ ...state
18512
+ } = tabState ?? {};
18505
18513
  const isActive = propIsActive || state?.isActive;
18506
18514
  return Tab$1({
18507
18515
  id,