bianic-ui 1.16.0-beta.0 → 1.16.0-beta.2

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 (36) hide show
  1. package/dist/cjs/index.js +120 -101
  2. package/dist/cjs/lib.css +1 -1
  3. package/dist/cjs/types/components/Forms/DatePicker/DatePicker.d.ts +3 -2
  4. package/dist/cjs/types/components/Forms/Dropdown/DropdownContainer.d.ts +1 -1
  5. package/dist/cjs/types/components/Forms/LiveSearch/Example/CustomDropdown.d.ts +1 -2
  6. package/dist/cjs/types/components/Forms/LiveSearch/Example/DeprecatedSimulation.d.ts +4 -0
  7. package/dist/cjs/types/components/Forms/LiveSearch/hooks/useLiveSearch.d.ts +9 -0
  8. package/dist/cjs/types/components/Forms/LiveSearch/index.d.ts +2 -6
  9. package/dist/cjs/types/components/Forms/LiveSearch/types/index.d.ts +36 -0
  10. package/dist/cjs/types/components/Forms/LiveSearch/utils/dropdownUtils.d.ts +8 -0
  11. package/dist/cjs/types/components/Forms/LiveSearch/utils/searchUtils.d.ts +3 -0
  12. package/dist/cjs/types/components/InfoPanel/index.d.ts +3 -3
  13. package/dist/cjs/types/components/Tab/Tab.d.ts +2 -1
  14. package/dist/{esm/types/stories/Form/LiveSearch/LivesearchOld.stories.d.ts → cjs/types/stories/Form/LiveSearch/DeprecatedSimulation.stories.d.ts} +2 -2
  15. package/dist/cjs/types/stories/Form/LiveSearch/LivesearchCustomDropdownExample.stories.d.ts +7 -3
  16. package/dist/esm/index.js +121 -102
  17. package/dist/esm/lib.css +1 -1
  18. package/dist/esm/types/components/Forms/DatePicker/DatePicker.d.ts +3 -2
  19. package/dist/esm/types/components/Forms/Dropdown/DropdownContainer.d.ts +1 -1
  20. package/dist/esm/types/components/Forms/LiveSearch/Example/CustomDropdown.d.ts +1 -2
  21. package/dist/esm/types/components/Forms/LiveSearch/Example/DeprecatedSimulation.d.ts +4 -0
  22. package/dist/esm/types/components/Forms/LiveSearch/hooks/useLiveSearch.d.ts +9 -0
  23. package/dist/esm/types/components/Forms/LiveSearch/index.d.ts +2 -6
  24. package/dist/esm/types/components/Forms/LiveSearch/types/index.d.ts +36 -0
  25. package/dist/esm/types/components/Forms/LiveSearch/utils/dropdownUtils.d.ts +8 -0
  26. package/dist/esm/types/components/Forms/LiveSearch/utils/searchUtils.d.ts +3 -0
  27. package/dist/esm/types/components/InfoPanel/index.d.ts +3 -3
  28. package/dist/esm/types/components/Tab/Tab.d.ts +2 -1
  29. package/dist/{cjs/types/stories/Form/LiveSearch/LivesearchOld.stories.d.ts → esm/types/stories/Form/LiveSearch/DeprecatedSimulation.stories.d.ts} +2 -2
  30. package/dist/esm/types/stories/Form/LiveSearch/LivesearchCustomDropdownExample.stories.d.ts +7 -3
  31. package/dist/index.d.ts +24 -22
  32. package/package.json +1 -1
  33. package/dist/cjs/types/components/Forms/LiveSearch/PropsInterface.d.ts +0 -23
  34. package/dist/cjs/types/components/Forms/LiveSearch/Simulation.d.ts +0 -4
  35. package/dist/esm/types/components/Forms/LiveSearch/PropsInterface.d.ts +0 -23
  36. package/dist/esm/types/components/Forms/LiveSearch/Simulation.d.ts +0 -4
package/dist/cjs/index.js CHANGED
@@ -443,10 +443,10 @@ var minWidthConfig$1 = {
443
443
  tn: 'min-w-[64px]',
444
444
  };
445
445
  var iconOnlySizeConfig$1 = {
446
- lg: 'py-[13px] h-[48px] h-[48px] flex items-center justify-center gap-[10px]',
446
+ lg: 'py-[13px] h-[48px] w-[48px] flex items-center justify-center gap-[10px]',
447
447
  md: 'py-[11px] h-[40px] w-[40px] flex items-center justify-center gap-[5px]',
448
- sm: 'py-[8px] h-[30px] h-[30px] flex items-center justify-center gap-[5px] ',
449
- tn: 'py-[4px] h-[22px] h-[22px] flex items-center justify-center gap-[3px]',
448
+ sm: 'py-[8px] h-[30px] w-[30px] flex items-center justify-center gap-[5px] ',
449
+ tn: 'py-[4px] h-[22px] w-[22px] flex items-center justify-center gap-[3px]',
450
450
  };
451
451
  var shadow = 'shadow-[0px_6px_18px_1px_rgba(188,199,237,0.5)] disabled:shadow-none active:shadow-none';
452
452
  var variantConfig$2 = {
@@ -2401,10 +2401,11 @@ var getDropdownStyle = function (anchorRef, dropdownRef) {
2401
2401
  // AND space above is more than space below
2402
2402
  // then flip up
2403
2403
  if (spaceToBottom < dropdownHeight && spaceToTop > spaceToBottom) {
2404
- style.bottom = "".concat(window.innerHeight - anchorRect.top, "px");
2404
+ var topPositionForFlip = anchorRect.top + window.scrollY - dropdownHeight;
2405
+ style.bottom = "".concat(topPositionForFlip, "px");
2405
2406
  }
2406
2407
  else {
2407
- style.top = "".concat(anchorRect.bottom, "px");
2408
+ style.top = "".concat(anchorRect.bottom + window.scrollY, "px");
2408
2409
  }
2409
2410
  return style;
2410
2411
  };
@@ -2520,111 +2521,129 @@ var matchSearchTerm = function (content, term, variant) {
2520
2521
  return lowerContent.includes(lowerTerm);
2521
2522
  }
2522
2523
  };
2523
- function LiveSearch(_a) {
2524
- var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, id = _a.id, _c = _a.size, size = _c === void 0 ? 'md' : _c, label = _a.label, placeholder = _a.placeholder, _d = _a.required, required = _d === void 0 ? false : _d, options = _a.options, setValue = _a.setValue, value = _a.value, _e = _a.readOnly, readOnly = _e === void 0 ? false : _e, _f = _a.onChangeText, onChangeText = _f === void 0 ? function () { } : _f, _g = _a.onClickDropdown, onClickDropdown = _g === void 0 ? function () { } : _g, _h = _a.autoComplete, autoComplete = _h === void 0 ? 'off' : _h, _j = _a.children, children = _j === void 0 ? undefined : _j, _k = _a.dropContProps, dropContProps = _k === void 0 ? { className: undefined } : _k, _l = _a.searchVariant, searchVariant = _l === void 0 ? 'include' : _l;
2525
- var _m = React.useState(false), isOpen = _m[0], setIsOpen = _m[1];
2526
- var _o = React.useState(value.label || ''), searchTerm = _o[0], setSearchTerm = _o[1];
2527
- var _p = sizeConfig$6[size], iconClass = _p.iconClass, iconSize = _p.iconSize, inputClass = _p.inputClass;
2528
- var dropContClassName = dropContProps.className, dropContOnClickItem = dropContProps.onClickItem, restDropContProps = __rest(dropContProps, ["className", "onClickItem"]);
2529
- var isValueExist = value && value.label !== undefined && value.label !== '';
2530
- var inputRef = React.useRef(null);
2531
- var dropdownContRef = React.useRef(null);
2532
- // Will be used soon
2533
- // const handleOutsideClick = (e: MouseEvent) => {
2534
- // if (inputRef.current && !inputRef.current.contains(e.target as Node)) {
2535
- // setIsOpen(false)
2536
- // }
2537
- // }
2538
- // useEffect(() => {
2539
- // document.addEventListener('mousedown', handleOutsideClick)
2540
- // return () => {
2541
- // document.removeEventListener('mousedown', handleOutsideClick)
2542
- // }
2543
- // })
2544
- // Synchronize internal searchTerm with external value prop
2545
- React.useEffect(function () {
2546
- // Only update searchTerm if the label from the value prop differs from the current searchTerm
2547
- // This prevents infinite loops if searchTerm is already the same as value.label
2548
- if (value.label !== searchTerm) {
2549
- setSearchTerm(value.label || '');
2550
- }
2551
- }, [value.label, searchTerm]);
2552
- var filteredOptions = options === null || options === void 0 ? void 0 : options.filter(function (item) {
2553
- return item.label.toLowerCase().includes(value.label.toLowerCase());
2524
+ var filterOptions = function (options, searchTerm) {
2525
+ return options === null || options === void 0 ? void 0 : options.filter(function (item) {
2526
+ return item.label.toLowerCase().includes(searchTerm.toLowerCase());
2554
2527
  });
2555
- var handleInputChange = function (e) {
2556
- var newSearchTerm = e.target.value;
2557
- setSearchTerm(newSearchTerm);
2558
- setIsOpen(true); // Ensure dropdown opens when typing
2559
- };
2560
- var handleDropdownItemClick = React.useCallback(function (clickedValue) {
2561
- setSearchTerm(clickedValue.label); // Set input text to the selected label
2562
- setValue(clickedValue); // Update the value in the parent
2563
- setIsOpen(false);
2564
- }, [setValue]);
2565
- // Recursive function to filter and clone DropdownItems, including nested items
2566
- var processDropdownChildren = function (nodes, currentSearchTerm, includeAllIfNoSearch) {
2567
- return React.Children.map(nodes, function (child) {
2568
- if (!React.isValidElement(child) || child.type !== DropdownItem) {
2569
- return child;
2570
- }
2571
- var itemProps = child.props;
2572
- // Assume content is a string for filtering; otherwise, filtering won't work well
2573
- var itemContent = typeof itemProps.content === 'string' ? itemProps.content : '';
2574
- var itemValue = itemProps.value;
2575
- var isDisabled = itemProps.disabled;
2576
- // 2. Filtering Logic (Uses Global Search Variant)
2577
- if (!includeAllIfNoSearch) {
2578
- // Use the matchSearchTerm utility with the selected searchVariant
2579
- if (currentSearchTerm && !matchSearchTerm(itemValue, currentSearchTerm, searchVariant)) {
2580
- return null; // Item does not match the search criteria
2581
- }
2528
+ };
2529
+
2530
+ var getItemLabel = function (value) {
2531
+ var _a;
2532
+ return typeof value === 'object' && value !== null && 'label' in value
2533
+ ? (_a = value.label) !== null && _a !== void 0 ? _a : ''
2534
+ : String(value !== null && value !== void 0 ? value : '');
2535
+ };
2536
+ var processDropdownChildren = function (nodes, currentSearchTerm, includeAllIfNoSearch, searchVariant, handleDropdownItemClick) {
2537
+ if (searchVariant === void 0) { searchVariant = 'include'; }
2538
+ return React.Children.map(nodes, function (child) {
2539
+ if (!React.isValidElement(child) || child.type !== DropdownItem) {
2540
+ return child;
2541
+ }
2542
+ var itemProps = child.props;
2543
+ var itemContent = typeof itemProps.content === 'string' ? itemProps.content : '';
2544
+ var itemValue = itemProps.value;
2545
+ var isDisabled = itemProps.disabled;
2546
+ // Filtering Logic
2547
+ if (!includeAllIfNoSearch) {
2548
+ var itemValueStr = typeof itemValue === 'object'
2549
+ ? itemValue.label
2550
+ : String(itemValue || '');
2551
+ if (currentSearchTerm &&
2552
+ !matchSearchTerm(itemValueStr, currentSearchTerm, searchVariant)) {
2553
+ return null;
2582
2554
  }
2583
- // 3. Process Nested Children (Recursion)
2584
- var clonedChildren = itemProps.children
2585
- ? processDropdownChildren(itemProps.children, currentSearchTerm, includeAllIfNoSearch)
2586
- : null;
2587
- // 4. Clone and Inject Click Handler
2588
- return React.cloneElement(child, {
2589
- onClick: function (e) {
2590
- if (!isDisabled) {
2591
- handleDropdownItemClick({
2592
- id: itemValue !== undefined ? itemValue : itemContent,
2593
- label: itemValue !== undefined ? itemValue : itemContent
2594
- });
2595
- }
2596
- if (dropContOnClickItem) {
2597
- dropContOnClickItem(e, itemValue !== undefined ? itemValue : itemContent);
2555
+ }
2556
+ // Process Nested Children
2557
+ var clonedChildren = itemProps.children
2558
+ ? processDropdownChildren(itemProps.children, currentSearchTerm, includeAllIfNoSearch, searchVariant, handleDropdownItemClick)
2559
+ : null;
2560
+ // Clone and Inject Click Handler
2561
+ return React.cloneElement(child, {
2562
+ onClick: function (e) {
2563
+ if (!isDisabled) {
2564
+ if (itemValue === undefined &&
2565
+ typeof itemProps.content === 'string') {
2566
+ return handleDropdownItemClick(e, itemContent);
2598
2567
  }
2599
- if (itemProps.onClickItem) {
2600
- itemProps.onClickItem(e, itemValue !== undefined ? itemValue : itemContent);
2568
+ if (typeof itemValue === 'object' || itemValue !== undefined) {
2569
+ return handleDropdownItemClick(e, itemValue);
2601
2570
  }
2602
- },
2603
- children: clonedChildren
2604
- });
2571
+ }
2572
+ if (itemProps.onClickItem) {
2573
+ itemProps.onClickItem(e, itemValue !== undefined ? itemValue : itemContent);
2574
+ }
2575
+ },
2576
+ children: clonedChildren,
2605
2577
  });
2606
- };
2607
- // Determine which children to display
2578
+ });
2579
+ };
2580
+ var processRenderedChildren = function (children, searchTerm, searchVariant, handleDropdownItemClick) {
2608
2581
  var renderedChildren = null;
2609
2582
  var hasFilteredResults = false;
2610
2583
  if (searchTerm) {
2611
- // If there's a searchTerm, filter children
2612
- renderedChildren = processDropdownChildren(children, searchTerm, false);
2584
+ renderedChildren = processDropdownChildren(children, searchTerm, false, searchVariant, handleDropdownItemClick);
2613
2585
  hasFilteredResults =
2614
2586
  React.Children.toArray(renderedChildren).filter(Boolean).length > 0;
2615
2587
  }
2616
2588
  else {
2617
- // If searchTerm is empty, display all children without filtering (but with onClick injected)
2618
- renderedChildren = processDropdownChildren(children, '', true);
2589
+ renderedChildren = processDropdownChildren(children, '', true, searchVariant, handleDropdownItemClick);
2619
2590
  hasFilteredResults =
2620
- React.Children.toArray(renderedChildren).filter(Boolean).length > 0; // Should always be true if there are initial children
2591
+ React.Children.toArray(renderedChildren).filter(Boolean).length > 0;
2621
2592
  }
2593
+ return { renderedChildren: renderedChildren, hasFilteredResults: hasFilteredResults };
2594
+ };
2595
+
2596
+ var useLiveSearch = function (_a) {
2597
+ var value = _a.value, setValue = _a.setValue, onChangeText = _a.onChangeText, dropContOnClickItem = _a.dropContOnClickItem;
2598
+ var _b = React.useState(false), isOpen = _b[0], setIsOpen = _b[1];
2599
+ var _c = React.useState(String(value.label || '')), searchTerm = _c[0], setSearchTerm = _c[1];
2600
+ React.useEffect(function () {
2601
+ if (!isOpen && searchTerm !== '') {
2602
+ setSearchTerm(getItemLabel(value));
2603
+ }
2604
+ }, [isOpen]);
2605
+ var handleInputChange = function (e) {
2606
+ var newSearchTerm = e.target.value;
2607
+ setSearchTerm(newSearchTerm);
2608
+ setIsOpen(true);
2609
+ onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(e);
2610
+ };
2611
+ var handleDropdownItemClick = React.useCallback(function (event, clickedValue) {
2612
+ dropContOnClickItem === null || dropContOnClickItem === void 0 ? void 0 : dropContOnClickItem(event, clickedValue);
2613
+ var newLabel = getItemLabel(clickedValue);
2614
+ setSearchTerm(newLabel);
2615
+ setValue(clickedValue);
2616
+ setIsOpen(false);
2617
+ }, [setValue, dropContOnClickItem]);
2618
+ return {
2619
+ isOpen: isOpen,
2620
+ setIsOpen: setIsOpen,
2621
+ searchTerm: searchTerm,
2622
+ handleInputChange: handleInputChange,
2623
+ handleDropdownItemClick: handleDropdownItemClick,
2624
+ };
2625
+ };
2626
+
2627
+ function LiveSearch(_a) {
2628
+ var _b = _a.autoComplete, autoComplete = _b === void 0 ? 'off' : _b, _c = _a.children, children = _c === void 0 ? undefined : _c, descText = _a.descText, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.dropContProps, dropContProps = _e === void 0 ? { className: undefined } : _e, id = _a.id, label = _a.label, _f = _a.onChangeText, onChangeText = _f === void 0 ? function () { } : _f, _g = _a.onClickDropdown, onClickDropdown = _g === void 0 ? function () { } : _g, options = _a.options, placeholder = _a.placeholder, _h = _a.readOnly, readOnly = _h === void 0 ? false : _h, _j = _a.required, required = _j === void 0 ? false : _j, _k = _a.searchVariant, searchVariant = _k === void 0 ? 'include' : _k, setValue = _a.setValue, _l = _a.size, size = _l === void 0 ? 'md' : _l, value = _a.value;
2629
+ var inputRef = React.useRef(null);
2630
+ var dropdownContRef = React.useRef(null);
2631
+ var _m = useLiveSearch({
2632
+ value: value,
2633
+ setValue: setValue,
2634
+ onChangeText: onChangeText,
2635
+ dropContOnClickItem: dropContProps.onClickItem
2636
+ }), isOpen = _m.isOpen, setIsOpen = _m.setIsOpen, searchTerm = _m.searchTerm, handleInputChange = _m.handleInputChange, handleDropdownItemClick = _m.handleDropdownItemClick;
2637
+ var _o = sizeConfig$6[size], iconClass = _o.iconClass, iconSize = _o.iconSize, inputClass = _o.inputClass;
2638
+ var dropContClassName = dropContProps.className; dropContProps.onClickItem; var restDropContProps = __rest(dropContProps, ["className", "onClickItem"]);
2639
+ var isValueExist = value && value.label !== undefined && value.label !== '';
2640
+ var filteredOptions = filterOptions(options || [], value.label);
2641
+ var _p = processRenderedChildren(children, searchTerm, searchVariant, handleDropdownItemClick), renderedChildren = _p.renderedChildren, hasFilteredResults = _p.hasFilteredResults;
2622
2642
  return (React.createElement("div", { className: "bianic-livesearch field-group group/form flex w-full flex-col gap-y-2 " },
2623
2643
  label && (React.createElement(FormLabel, { htmlFor: id, required: required, readOnly: readOnly }, label)),
2624
2644
  React.createElement("div", { className: "group relative w-full" },
2625
2645
  React.createElement("input", { className: "bianic-livesearch-input field peer w-full rounded border border-bia-grey-dark-10 bg-primary-white read-only:pointer-events-none read-only:border-bia-grey-disabled focus-visible:outline-none enabled:hover:rounded-b-none enabled:hover:border-b-bia-blue enabled:focus:rounded-b-none enabled:focus:border-b-bia-blue disabled:border-bia-grey-dark-10 disabled:bg-bia-grey-light-10 disabled:text-bia-coolgrey ".concat(inputClass), onClick: function () { return setIsOpen(!isOpen); }, value: searchTerm, required: required, disabled: disabled, id: id, placeholder: placeholder, ref: inputRef, onChange: function (e) {
2626
2646
  onChangeText(e);
2627
- setValue({ id: null, label: e.target.value });
2628
2647
  handleInputChange(e);
2629
2648
  }, type: "text", readOnly: readOnly, autoComplete: autoComplete }),
2630
2649
  React.createElement("div", { className: "absolute inset-y-0 flex items-center pl-3 ".concat(iconClass) },
@@ -3134,15 +3153,15 @@ var displayDateFormatter = function (date) {
3134
3153
  };
3135
3154
 
3136
3155
  function DatePicker(_a) {
3137
- var className = _a.className, value = _a.value, onChange = _a.onChange, size = _a.size, disabled = _a.disabled; _a.placeholder; var label = _a.label, minDate = _a.minDate, maxDate = _a.maxDate, required = _a.required, nullDisplay = _a.nullDisplay;
3156
+ var value = _a.value, onChange = _a.onChange, size = _a.size, disabled = _a.disabled; _a.placeholder; var label = _a.label, minDate = _a.minDate, maxDate = _a.maxDate, required = _a.required, nullDisplay = _a.nullDisplay, inputclassName = _a.inputclassName, containerClassName = _a.containerClassName;
3138
3157
  // State and Ref
3139
3158
  var inputRef = React.useRef(null);
3140
3159
  var wrapperRef = React.useRef(null);
3141
3160
  var pickerRef = React.useRef(null);
3142
3161
  var _c = useDetectOutsideClick(wrapperRef, false, pickerRef), isPickerOpen = _c[0], setIsPickerOpen = _c[1];
3143
- return (React.createElement("div", { className: "bianic-datepicker-container relative", ref: wrapperRef },
3162
+ return (React.createElement("div", { className: "bianic-datepicker-container relative ".concat(containerClassName), ref: wrapperRef },
3144
3163
  React.createElement("div", { className: "bianic-datepicker-field-container" },
3145
- React.createElement(DateInputDisplay, { inputClassName: className, value: value, setValue: onChange, placeholder: "YYYY-MM-DD", nullDisplay: nullDisplay, size: size, label: label, required: required, buttonAction: function () { return setIsPickerOpen(!isPickerOpen); }, ref: inputRef, disabled: disabled })),
3164
+ React.createElement(DateInputDisplay, { inputClassName: inputclassName, value: value, setValue: onChange, placeholder: "YYYY-MM-DD", nullDisplay: nullDisplay, size: size, label: label, required: required, buttonAction: function () { return setIsPickerOpen(!isPickerOpen); }, ref: inputRef, disabled: disabled })),
3146
3165
  isPickerOpen && (React.createElement("div", { className: "bianic-datepicker-calendar-container absolute left-0 w-[250px] rounded-b-radius-sm bg-bia-white px-1.5 pb-[17px] pt-[15px] shadow-md" },
3147
3166
  React.createElement(PickerCalendar, { selectedDate: value, onDateChange: onChange, ref: pickerRef, minDate: minDate, maxDate: maxDate })))));
3148
3167
  }
@@ -3340,18 +3359,17 @@ var sizeConfig$3 = {
3340
3359
  };
3341
3360
 
3342
3361
  var InfoPanel = function (_a) {
3343
- var variant = _a.variant, color = _a.color, className = _a.className, textClassName = _a.textClassName;
3362
+ var variant = _a.variant, color = _a.color, className = _a.className, children = _a.children;
3344
3363
  var sizeClass = sizeConfig$3[variant || 'container'];
3345
3364
  var colorClass = colorConfig$1[color || 'yellow'];
3346
3365
  var allClasses = "".concat(sizeClass, " ").concat(colorClass, " ").concat(className);
3347
- return (React.createElement("div", { className: "flex items-center justify-center rounded-radius-md ".concat(allClasses) },
3348
- React.createElement(Text, { variant: "medium-text", extended: textClassName }, "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.")));
3366
+ return (React.createElement("div", { className: "flex items-center justify-center rounded-radius-md ".concat(allClasses) }, children));
3349
3367
  };
3350
3368
  InfoPanel.defaultProps = {
3351
3369
  variant: 'container',
3352
3370
  color: 'yellow',
3353
3371
  className: '',
3354
- textClassName: '',
3372
+ children: null,
3355
3373
  };
3356
3374
 
3357
3375
  function Modal(_a) {
@@ -3438,7 +3456,7 @@ function PaginationBar(_a) {
3438
3456
  return (React.createElement("div", { className: "flex ".concat(positionConfig[position], " gap-[5px]") },
3439
3457
  React.createElement(Button, { variant: "subtle-link", size: size, type: "button", onClick: function () { return handlePageChange(currentPage - 1); }, className: "cursor-pointer", iconLeft: React.createElement(TbChevronLeft, { size: iconSize }), disabled: currentPage === 1 }),
3440
3458
  showedPages.map(function (page) { return (React.createElement(Button, { key: page, variant: currentPage === page ? 'default' : 'subtle-link', size: size, type: "button", onClick: function () { return handlePageChange(page); }, className: "cursor-pointer ".concat(sizeConfig$2[size]), label: page.toString(), minWidth: buttonSizingStyle })); }),
3441
- React.createElement(Button, { variant: "subtle-link", size: "md", type: "button", onClick: function () { return handlePageChange(currentPage + 1); }, className: "cursor-pointer", iconLeft: React.createElement(TbChevronRight, { size: iconSize }), disabled: currentPage === totalPages })));
3459
+ React.createElement(Button, { variant: "subtle-link", size: size, type: "button", onClick: function () { return handlePageChange(currentPage + 1); }, className: "cursor-pointer", iconLeft: React.createElement(TbChevronRight, { size: iconSize }), disabled: currentPage === totalPages })));
3442
3460
  }
3443
3461
 
3444
3462
  var activeConfig = {
@@ -3756,7 +3774,7 @@ var configTab = {
3756
3774
  };
3757
3775
 
3758
3776
  function Tab(_a) {
3759
- var children = _a.children, active = _a.active, icon = _a.icon, disabled = _a.disabled, _b = _a.mode, mode = _b === void 0 ? 'horizontal' : _b, _c = _a.fit, fit = _c === void 0 ? 'fit-content' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, rest = __rest(_a, ["children", "active", "icon", "disabled", "mode", "fit", "size"]);
3777
+ var children = _a.children, active = _a.active, icon = _a.icon, disabled = _a.disabled, _b = _a.mode, mode = _b === void 0 ? 'horizontal' : _b, _c = _a.fit, fit = _c === void 0 ? 'fit-content' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, className = _a.className, rest = __rest(_a, ["children", "active", "icon", "disabled", "mode", "fit", "size", "className"]);
3760
3778
  var disabledKeyTab = disabled || active ? ' pointer-events-none' : '';
3761
3779
  var cursor;
3762
3780
  if (disabled) {
@@ -3777,8 +3795,9 @@ function Tab(_a) {
3777
3795
  var activeKeyTab = active
3778
3796
  ? 'group-disabled:text-bia-coolgrey-disabled text-primary-black'
3779
3797
  : 'text-bia-coolgrey group-hover:text-bia-coolgrey-hover group-active:text-bia-coolgrey-active group-disabled:text-bia-coolgrey-disabled';
3798
+ var buttonClassName = "".concat(horizontalButtonStyle, " ").concat(disabledKeyTab, " ").concat(fit, " ").concat(className ? className : '');
3780
3799
  return (React.createElement("div", { className: "".concat(mode === 'horizontal' ? 'h-full' : 'w-full', " ").concat(cursor) },
3781
- React.createElement("button", __assign({ type: "button", disabled: disabled }, rest, { className: "flex items-stretch justify-between ".concat(horizontalButtonStyle, " group relative outline-none ").concat(disabledKeyTab, " ").concat(fit) }),
3800
+ React.createElement("button", __assign({ type: "button", className: "flex items-stretch justify-between group relative outline-none ".concat(buttonClassName), disabled: disabled }, rest),
3782
3801
  React.createElement("div", { className: "flex items-center justify-center ".concat(buttonContentStyle) },
3783
3802
  React.createElement("div", { className: "flex items-center justify-center " },
3784
3803
  React.createElement("div", { className: "flex items-center space-x-1 text-nowrap ".concat(activeKeyTab, " ").concat(configTab[size].text) },