odaptos_design_system 2.0.152 → 2.0.154

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.
@@ -16228,7 +16228,7 @@ const TabsUnderline = ({
16228
16228
  className,
16229
16229
  isArrowIconDisplay = false
16230
16230
  }) => {
16231
- const [internalValue, setInternalValue] = React.useState(value !== undefined ? value : defaultValue ?? 0);
16231
+ const [internalValue, setInternalValue] = React.useState(value !== undefined ? value : defaultValue ?? tabs[0].value);
16232
16232
  React.useEffect(() => {
16233
16233
  if (value !== undefined) {
16234
16234
  setInternalValue(value);
@@ -16264,6 +16264,9 @@ const TabsUnderline = ({
16264
16264
  }
16265
16265
  }
16266
16266
  }, tabs.map((item, index) => {
16267
+ console.log('item---', item);
16268
+ console.log('tabs---', tabs);
16269
+ console.log('internalValue---', internalValue);
16267
16270
  let renderTab = /*#__PURE__*/React__default.createElement(Tab, {
16268
16271
  key: `tab#${index}`,
16269
16272
  className: !isArrowIconDisplay ? styles$T.tab_label : styles$T.tab_label_icon,
@@ -16274,7 +16277,7 @@ const TabsUnderline = ({
16274
16277
  textTransform: 'none'
16275
16278
  },
16276
16279
  label: /*#__PURE__*/React__default.createElement("div", {
16277
- className: `${styles$T.tab_label_content} ${internalValue === index ? styles$T.selected : ''}`,
16280
+ className: `${styles$T.tab_label_content} ${internalValue === item.value ? styles$T.selected : ''}`,
16278
16281
  id: item.id,
16279
16282
  onClick: e => onClickTab(e, index)
16280
16283
  }, /*#__PURE__*/React__default.createElement(Title, {
@@ -16384,12 +16387,12 @@ const TabsUnderline = ({
16384
16387
  textTransform: 'none'
16385
16388
  },
16386
16389
  label: /*#__PURE__*/React__default.createElement("div", {
16387
- className: `${styles$T.tab_label_content} ${item.disabled ? styles$T.tab_label_disabled : ''} ${internalValue === index ? styles$T.selected : ''}`,
16390
+ className: `${styles$T.tab_label_content} ${item.disabled ? styles$T.tab_label_disabled : ''} ${internalValue === item.value ? styles$T.selected : ''}`,
16388
16391
  id: item.id
16389
16392
  }, /*#__PURE__*/React__default.createElement(TextForButton, {
16390
16393
  text: item.label,
16391
16394
  size: "base",
16392
- color: internalValue === index ? 'black' : 'gray'
16395
+ color: internalValue === item.value ? 'black' : 'gray'
16393
16396
  }), item.betaIconDescription === undefined || item.betaIconDescription === '' ? null : /*#__PURE__*/React__default.createElement(PopoverBeta, {
16394
16397
  description: item.betaIconDescription,
16395
16398
  placement: "bottom",
@@ -16405,7 +16408,7 @@ const TabsUnderline = ({
16405
16408
  className: `${!isArrowIconDisplay ? styles$T.tab_label_replacement : styles$T.tab_label_replacement_icon} ${styles$T.disabled}`,
16406
16409
  size: "base",
16407
16410
  text: item.label,
16408
- color: internalValue === index ? 'black' : 'gray'
16411
+ color: internalValue === item.value ? 'black' : 'gray'
16409
16412
  }), item.betaIconDescription === undefined || item.betaIconDescription === '' ? null : /*#__PURE__*/React__default.createElement(PopoverBeta, {
16410
16413
  description: item.betaIconDescription,
16411
16414
  placement: "bottom",
@@ -16433,7 +16436,7 @@ const TabsUnderline = ({
16433
16436
  className: `${!isArrowIconDisplay ? styles$T.tab_label_replacement : styles$T.tab_label_replacement_icon} ${styles$T.disabled}`,
16434
16437
  size: "base",
16435
16438
  text: item.label,
16436
- color: internalValue === index ? 'black' : 'gray'
16439
+ color: internalValue === item.value ? 'black' : 'gray'
16437
16440
  }), item.betaIconDescription === undefined || item.betaIconDescription === '' ? null : /*#__PURE__*/React__default.createElement(PopoverBeta, {
16438
16441
  description: item.betaIconDescription,
16439
16442
  placement: "bottom",