@algorithm-shift/design-system 1.2.67 → 1.2.68

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/dist/index.mjs CHANGED
@@ -157,7 +157,7 @@ function TabList({
157
157
  }
158
158
 
159
159
  // src/components/Layout/TabGroup.tsx
160
- import { useEffect as useEffect2, useMemo } from "react";
160
+ import { useEffect as useEffect2, useMemo, useState as useState2 } from "react";
161
161
  import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
162
162
  function TabGroupComponent({
163
163
  children,
@@ -167,11 +167,13 @@ function TabGroupComponent({
167
167
  activeTab,
168
168
  onTabChange
169
169
  }) {
170
+ const [mounted, setMounted] = useState2(false);
170
171
  useEffect2(() => {
171
- if (list && list.length > 0 && !activeTab && onTabChange) {
172
+ if (list && list.length > 0 && !activeTab && onTabChange && !mounted) {
172
173
  onTabChange(list[0]?.tabId);
174
+ setMounted(true);
173
175
  }
174
- }, [list, activeTab, onTabChange]);
176
+ }, [list, activeTab, onTabChange, mounted]);
175
177
  const formatedList = useMemo(
176
178
  () => Array.isArray(list) ? [...list].sort((a, b) => (a.orderNumber ?? 0) - (b.orderNumber ?? 0)) : [],
177
179
  [list]
@@ -27304,7 +27306,7 @@ var RadioInput = ({
27304
27306
  var RadioInput_default = RadioInput;
27305
27307
 
27306
27308
  // src/components/Inputs/MultiCheckbox/MultiCheckbox.tsx
27307
- import { useCallback, useEffect as useEffect11, useState as useState2 } from "react";
27309
+ import { useCallback, useEffect as useEffect11, useState as useState3 } from "react";
27308
27310
  import { jsx as jsx31, jsxs as jsxs15 } from "react/jsx-runtime";
27309
27311
  var MultiCheckbox = ({
27310
27312
  className,
@@ -27318,7 +27320,7 @@ var MultiCheckbox = ({
27318
27320
  isDisabled = false
27319
27321
  }) => {
27320
27322
  const list = Array.isArray(data) ? data : [];
27321
- const [value, setValue] = useState2(propValue);
27323
+ const [value, setValue] = useState3(propValue);
27322
27324
  const options = (list || []).map((item) => ({
27323
27325
  value: item[dataKey || "value"],
27324
27326
  label: item[dataLabel || "label"]