bianic-ui 1.5.0 → 1.5.1-beta

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.
@@ -18,6 +18,12 @@ export declare const sizeConfig: {
18
18
  sm: string;
19
19
  tn: string;
20
20
  };
21
+ export declare const sidePaddingConfig: {
22
+ lg: string;
23
+ md: string;
24
+ sm: string;
25
+ tn: string;
26
+ };
21
27
  export declare const minWidthConfig: {
22
28
  lg: string;
23
29
  md: string;
@@ -11,5 +11,7 @@ interface LiveSearchProps extends Omit<ComponentPropsWithoutRef<'input'>, 'size'
11
11
  setValue?: any;
12
12
  value?: any;
13
13
  readOnly?: boolean;
14
+ onChangeText?: (value: any) => void;
15
+ onClickDropdown?: (event: React.MouseEvent<HTMLDivElement>) => void;
14
16
  }
15
17
  export default LiveSearchProps;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import LiveSearchProps from './PropsInterface';
3
- declare function LiveSearch({ descText, disabled, id, size, label, placeholder, required, options, setValue, value, readOnly, }: LiveSearchProps): React.JSX.Element;
3
+ declare function LiveSearch({ descText, disabled, id, size, label, placeholder, required, options, setValue, value, readOnly, onChangeText, onClickDropdown, }: LiveSearchProps): React.JSX.Element;
4
4
  declare namespace LiveSearch {
5
5
  var defaultProps: {
6
6
  descText: string;
@@ -11,5 +11,6 @@ interface SelectInputProps extends Omit<ComponentPropsWithoutRef<'input'>, 'size
11
11
  label: string | null;
12
12
  };
13
13
  setSelected?: any;
14
+ onClickDropdown?: (event: React.MouseEvent<HTMLDivElement>) => void;
14
15
  }
15
16
  export default SelectInputProps;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import SelectInputProps from './PropsInterface';
3
- declare function SelectInput({ descText, disabled, size, id, label, options, required, selected, setSelected, ...props }: SelectInputProps): React.JSX.Element;
3
+ declare function SelectInput({ descText, disabled, size, id, label, options, required, selected, setSelected, onClickDropdown, ...props }: SelectInputProps): React.JSX.Element;
4
4
  declare namespace SelectInput {
5
5
  var defaultProps: {
6
6
  descText: string;
@@ -4,7 +4,7 @@ export interface TabMenuProps extends ComponentPropsWithoutRef<'div'> {
4
4
  rounded?: 'none' | 'all' | 'top' | 'right' | 'left';
5
5
  text?: string;
6
6
  onClose?: () => void;
7
- isActive: boolean;
7
+ isActive?: boolean;
8
8
  }
9
9
  declare const TabMenu: ({ variant, text, rounded, isActive, onClose, ...rest }: TabMenuProps) => React.JSX.Element;
10
10
  export default TabMenu;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const TabMenuSimulation: () => React.JSX.Element;
3
+ export default TabMenuSimulation;
@@ -5,7 +5,7 @@ export { default as Badge } from './Badge/Badge';
5
5
  export { default as Banner } from './Banner';
6
6
  export { default as Brand } from './Brand/Brand';
7
7
  export { default as Breadcrumb } from './Breadcrumb/Breadcrumb';
8
- export { Button, ButtonApp } from './Button';
8
+ export { Button, ButtonApp, ContextualButton } from './Button';
9
9
  export { default as Color } from './Color';
10
10
  export { default as Divider } from './Divider/Divider';
11
11
  export { default as FileTree } from './FileTree';
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import type { StoryObj } from '@storybook/react/*';
3
+ declare const meta: {
4
+ title: string;
5
+ component: () => import("react").JSX.Element;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ args: {};
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const TabMenuDemo: Story;
package/dist/esm/index.js CHANGED
@@ -198,26 +198,26 @@ var AlertConfig = {
198
198
 
199
199
  function Display(_a) {
200
200
  var children = _a.children;
201
- return (React$1.createElement("h1", { className: "display text-[144px] texts leading-[120%] font-bold font-humnst777" }, children));
201
+ return (React$1.createElement("h1", { className: "bianic-display text-[144px] texts leading-[120%] font-bold font-humnst777" }, children));
202
202
  }
203
203
 
204
204
  function Heading(_a) {
205
205
  var _b = _a.variant, variant = _b === void 0 ? '1' : _b, className = _a.className, children = _a.children;
206
206
  switch (variant) {
207
207
  case '1':
208
- return (React$1.createElement("h1", { className: "header-".concat(variant, " text-heading-1 font-bold font-humnst777 flex ").concat(className) }, children));
208
+ return (React$1.createElement("h1", { className: "bianic-header-".concat(variant, " text-heading-1 font-bold font-humnst777 flex ").concat(className) }, children));
209
209
  case '2':
210
- return (React$1.createElement("h2", { className: "header-".concat(variant, " text-heading-2 font-bold font-humnst777 flex ").concat(className) }, children));
210
+ return (React$1.createElement("h2", { className: "bianic-header-".concat(variant, " text-heading-2 font-bold font-humnst777 flex ").concat(className) }, children));
211
211
  case '3':
212
- return (React$1.createElement("h3", { className: "header-".concat(variant, " text-heading-3 font-bold font-humnst777 flex ").concat(className) }, children));
212
+ return (React$1.createElement("h3", { className: "bianic-header-".concat(variant, " text-heading-3 font-bold font-humnst777 flex ").concat(className) }, children));
213
213
  case '4':
214
- return (React$1.createElement("h4", { className: "header-".concat(variant, " text-heading-4 font-bold font-humnst777 flex ").concat(className) }, children));
214
+ return (React$1.createElement("h4", { className: "bianic-header-".concat(variant, " text-heading-4 font-bold font-humnst777 flex ").concat(className) }, children));
215
215
  case '5':
216
- return (React$1.createElement("h5", { className: "header-".concat(variant, " text-heading-5 font-bold font-humnst777 flex ").concat(className) }, children));
216
+ return (React$1.createElement("h5", { className: "bianic-header-".concat(variant, " text-heading-5 font-bold font-humnst777 flex ").concat(className) }, children));
217
217
  case '6':
218
- return (React$1.createElement("h6", { className: "header-".concat(variant, " text-heading-6 font-bold font-humnst777 flex ").concat(className) }, children));
218
+ return (React$1.createElement("h6", { className: "bianic-header-".concat(variant, " text-heading-6 font-bold font-humnst777 flex ").concat(className) }, children));
219
219
  default:
220
- return (React$1.createElement("h1", { className: "header-".concat(variant, " text-heading-1 font-bold font-humnst777 flex ").concat(className) }, children));
220
+ return (React$1.createElement("h1", { className: "bianic-header-".concat(variant, " text-heading-1 font-bold font-humnst777 flex ").concat(className) }, children));
221
221
  }
222
222
  }
223
223
  Heading.defaultProps = {
@@ -284,7 +284,7 @@ var variantUnion$2 = [
284
284
  function Text(_a) {
285
285
  var _b = _a.extended, extended = _b === void 0 ? '' : _b, variant = _a.variant, children = _a.children;
286
286
  var validatedVariant = validUnion(variant, variantUnion$2);
287
- return (React$1.createElement("span", { className: "text ".concat(textClasses[validatedVariant], " ").concat(extended) }, childrenElement(children)));
287
+ return (React$1.createElement("span", { className: "bianic-text ".concat(textClasses[validatedVariant], " ").concat(extended) }, childrenElement(children)));
288
288
  }
289
289
  Text.defaultProps = {
290
290
  extended: '',
@@ -337,7 +337,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
337
337
 
338
338
  function Link(_a) {
339
339
  var _b = _a.extended, extended = _b === void 0 ? '' : _b, children = _a.children, rest = __rest(_a, ["extended", "children"]);
340
- return (React$1.createElement("a", __assign({ className: "text ".concat(textClasses.link, " ").concat(extended) }, rest), children));
340
+ return (React$1.createElement("a", __assign({ className: "bianic-text ".concat(textClasses.link, " ").concat(extended) }, rest), children));
341
341
  }
342
342
  Link.defaultProps = {
343
343
  extended: '',
@@ -395,10 +395,16 @@ var radiusConfig$1 = {
395
395
  },
396
396
  };
397
397
  var sizeConfig$c = {
398
- lg: 'py-[10.5px] px-[13px] h-[48px] flex items-center justify-center gap-[10px] text-size-md ',
399
- md: ' px-[11px] py-[9px] h-[40px] flex items-center justify-center gap-[5px] text-size-base ',
400
- sm: 'px-[8px] py-[6px] h-[30px] flex items-center justify-center gap-[5px] text-size-sm ',
401
- tn: 'px-[4px] py-[2px] h-[22px] flex items-center justify-center gap-[3px] text-size-tiny ',
398
+ lg: 'py-[10.5px] h-[48px] flex items-center justify-center gap-[10px] text-size-md ',
399
+ md: 'py-[9px] h-[40px] flex items-center justify-center gap-[5px] text-size-base ',
400
+ sm: 'py-[6px] h-[30px] flex items-center justify-center gap-[5px] text-size-sm ',
401
+ tn: 'py-[2px] h-[22px] flex items-center justify-center gap-[3px] text-size-tiny ',
402
+ };
403
+ var sidePaddingConfig = {
404
+ lg: 'px-[13px]',
405
+ md: 'px-[11px]',
406
+ sm: 'px-[8px]',
407
+ tn: 'px-[4px]',
402
408
  };
403
409
  var minWidthConfig$1 = {
404
410
  lg: 'min-w-[112px]',
@@ -455,9 +461,22 @@ function Button(_a) {
455
461
  var validatedVariant = validUnion(variant, variantUnion$1);
456
462
  var validatedSize = validUnion(size, sizeUnion$4);
457
463
  var validatedRadius = validUnion(radius, radiusUnion);
458
- var minWidthRules = minWidth === undefined ? minWidthConfig$1[size] : "min-w-[".concat(minWidth, "px]");
464
+ var minWidthRules = minWidthConfig$1[size];
465
+ if (minWidth) {
466
+ minWidthRules = "min-w-[".concat(minWidth, "px]");
467
+ }
468
+ else if (variant.includes('link')) {
469
+ minWidthRules = '';
470
+ }
471
+ var sizingRules;
472
+ if (variant.includes('subtle')) {
473
+ sizingRules = "".concat(sizeConfig$c[validatedSize]);
474
+ }
475
+ else {
476
+ sizingRules = "".concat(sizeConfig$c[validatedSize], " ").concat(sidePaddingConfig[validatedSize]);
477
+ }
459
478
  var sizeClass = label
460
- ? "".concat(sizeConfig$c[validatedSize], " ").concat(minWidthRules)
479
+ ? " ".concat(minWidthRules, " ").concat(sizingRules)
461
480
  : iconOnlySizeConfig$1[validatedSize];
462
481
  var classString = "\n ".concat(variantConfig$2[validatedVariant], " \n ").concat(sizeClass, " \n ").concat(radiusConfig$1[validatedRadius][validatedSize], " \n ").concat(className, "\n ");
463
482
  return (React$1.createElement("button", __assign({ type: "button", className: "button flex items-center justify-center font-semibold ".concat(classString), disabled: disabled }, props),
@@ -1453,6 +1472,28 @@ var ButtonApp = function (_a) {
1453
1472
  return (React$1.createElement("button", __assign({ className: "button-app px-[10px] pb-[8.8px] pt-[8px] text-size-tiny ".concat(colorConfig$1[color][buttonState], " "), type: "button", disabled: disabled }, rest), label));
1454
1473
  };
1455
1474
 
1475
+ var textColorConfig = {
1476
+ dark: 'text-primary-black disabled:text-bia-coolgrey-disabled',
1477
+ light: 'text-primary-white disabled:opacity-30',
1478
+ };
1479
+ var stateColorConfig = {
1480
+ selected: 'bg-black/15 cursor-default',
1481
+ default: 'enabled:hover:bg-black/10 enabled:focus-visible:border-bia-blue-disabled enabled:focus-visible:outline-2 enabled:focus-visible:-outline-offset-1 enabled:focus-visible:outline-bia-blue-disabled enabled:active:bg-black/15',
1482
+ };
1483
+
1484
+ var ContextualButton = function (_a) {
1485
+ var label = _a.label, icon = _a.icon, _b = _a.variant, variant = _b === void 0 ? 'dark' : _b, disabled = _a.disabled; _a.isNotified; var _d = _a.isSelected, isSelected = _d === void 0 ? false : _d, props = __rest(_a, ["label", "icon", "variant", "disabled", "isNotified", "isSelected"]);
1486
+ var textColor = isSelected
1487
+ ? variant === 'dark'
1488
+ ? 'text-primary-black'
1489
+ : 'text-primary-white'
1490
+ : textColorConfig[variant];
1491
+ var stateColor = stateColorConfig[isSelected ? 'selected' : 'default'];
1492
+ return (React$1.createElement("button", __assign({ className: "contextual-button box-border flex flex-row items-center rounded-radius-sm border border-transparent p-[1px] outline-none ".concat(stateColor, " ").concat(textColor) }, props, { disabled: disabled }),
1493
+ icon,
1494
+ label && (React$1.createElement("div", { className: "label max-h-[46px] px-[5px] text-[12px] leading-none" }, label))));
1495
+ };
1496
+
1456
1497
  function Color() {
1457
1498
  var colorList = [
1458
1499
  'bg-bia-red',
@@ -1687,8 +1728,9 @@ function TextInput(_a) {
1687
1728
  iconElement = (React$1.createElement(PasswordIcon, { isShow: isShow, showHandler: setIsShow, iconSize: iconSize, disabled: disabled }));
1688
1729
  }
1689
1730
  var extendedInputClassName = "".concat(fieldStyle, " ").concat(fieldSize, " ").concat(bottomBorderColor, " ").concat(inputClassName, " ").concat(borderStyle);
1731
+ var labelStatus = readOnly ? 'read-only:pointer-events-none' : '';
1690
1732
  return (React$1.createElement("div", { className: "field-group flex w-full flex-col gap-y-2 text-bia-black" },
1691
- React$1.createElement("label", { htmlFor: id, className: "label text-xs font-semibold read-only:pointer-events-none" },
1733
+ React$1.createElement("label", { htmlFor: id, className: "label text-xs font-semibold ".concat(labelStatus) },
1692
1734
  label,
1693
1735
  required && React$1.createElement("span", { className: "p-1 text-bia-red" }, "*")),
1694
1736
  React$1.createElement("div", { className: "relative w-full" },
@@ -1820,12 +1862,12 @@ function Checkbox(_a) {
1820
1862
  var _b = _a.disabled, disabled = _b === void 0 ? false : _b, id = _a.id, _c = _a.size, size = _c === void 0 ? 'md' : _c, label = _a.label, _d = _a.onChange, onChange = _d === void 0 ? function () { } : _d, props = __rest(_a, ["disabled", "id", "size", "label", "onChange"]);
1821
1863
  var _e = sizeConfig$8[validUnion(size, sizeUnion$2)], checkClass = _e.checkClass, labelClass = _e.labelClass;
1822
1864
  return (React$1.createElement("div", { className: "flex items-center" },
1823
- React$1.createElement("div", { className: "bg-white rounded-full flex flex-shrink-0 justify-center items-center relative ".concat(checkClass) },
1824
- React$1.createElement("input", __assign({ id: id, type: "checkbox", className: "peer checkbox box-content appearance-none focus-visible:opacity-100 focus-visible:ring-1 focus-visible:ring-offset-2 focus-visible:ring-bia-blue focus-visible:outline-none rounded-full border-bia-coolgrey-light-50 checked:border-bia-blue disabled:border-bia-coolgrey-light-50 hover:border-bia-blue-hover disabled:checked:border-bia-blue-light-50 border-2 absolute cursor-pointer w-full h-full", onChange: function (e) { return onChange(e); }, disabled: disabled }, props)),
1825
- React$1.createElement("div", { className: "check-icon flex text-bia-grey group justify-center peer-checked:border-2 peer-checked:border-primary-white peer-checked:hover:border-bia-blue-hover peer-checked:bg-bia-blue peer-checked:peer-hover:bg-bia-blue-hover outline-2 peer-checked:hover:outline-bia-blue-hover outline-bia-blue peer-disabled:bg-bia-grey-light-80 peer-disabled:peer-checked:outline-bia-blue-light-50 peer-disabled:peer-checked:bg-bia-blue-light-50 rounded-full w-full h-full z-1" },
1826
- React$1.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: " fill-bia-grey-dark-10 peer-checked:group-[]:fill-primary-white peer-checked:peer-hover:group-[]:fill-primary-white peer-hover:group-[]:fill-bia-blue-hover peer-disabled:group-[]:fill-bia-grey-dark-10 peer-disabled:peer-checked:group-[]:fill-primary-white", viewBox: "-5 -7 24 24", width: "24" },
1865
+ React$1.createElement("div", { className: "relative flex flex-shrink-0 items-center justify-center rounded-full bg-white ".concat(checkClass) },
1866
+ React$1.createElement("input", __assign({ id: id, type: "checkbox", className: "checkbox peer absolute box-content h-full w-full cursor-pointer appearance-none rounded-full border-2 border-bia-coolgrey-light-50 checked:border-bia-blue hover:border-bia-blue-hover focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-bia-blue focus-visible:ring-offset-2 disabled:border-bia-coolgrey-light-50 disabled:checked:border-bia-blue-light-50", onChange: function (e) { return onChange(e); }, disabled: disabled }, props)),
1867
+ React$1.createElement("div", { className: "check-icon z-1 group flex h-full w-full justify-center rounded-full text-bia-grey outline-2 outline-bia-blue peer-checked:border-2 peer-checked:border-primary-white peer-checked:bg-bia-blue peer-checked:hover:border-bia-blue-hover peer-checked:hover:outline-bia-blue-hover peer-checked:peer-hover:bg-bia-blue-hover peer-disabled:bg-bia-grey-light-80 peer-disabled:peer-checked:bg-bia-blue-light-50 peer-disabled:peer-checked:outline-bia-blue-light-50" },
1868
+ React$1.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: " fill-bia-grey-dark-10 peer-checked:group-[]:fill-primary-white peer-hover:group-[]:fill-bia-blue-hover peer-checked:peer-hover:group-[]:fill-primary-white peer-disabled:group-[]:fill-bia-grey-dark-10 peer-disabled:peer-checked:group-[]:fill-primary-white", viewBox: "-5 -7 24 24", width: "24" },
1827
1869
  React$1.createElement("path", { d: "M5.486 9.73a.997.997 0 0 1-.707-.292L.537 5.195A1 1 0 1 1 1.95 3.78l3.535 3.535L11.85.952a1 1 0 0 1 1.415 1.414L6.193 9.438a.997.997 0 0 1-.707.292z" })))),
1828
- React$1.createElement("label", { htmlFor: id, className: "ml-2 leading-4 text-grey-800 ".concat(labelClass), style: { color: disabled ? '#8C8CA6' : '' } }, childrenElement(label))));
1870
+ React$1.createElement("label", { htmlFor: id, className: "ml-2 leading-4 text-primary-black ".concat(labelClass), style: { color: disabled ? '#8C8CA6' : '' } }, childrenElement(label))));
1829
1871
  }
1830
1872
  Checkbox.defaultProps = {
1831
1873
  disabled: false,
@@ -1916,10 +1958,10 @@ DefaultDropdownItem.defaultProps = {
1916
1958
 
1917
1959
  var sizeUnion$1 = ['md', 'sm'];
1918
1960
  function SelectInput(_a) {
1919
- var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 'md' : _c, id = _a.id, label = _a.label, options = _a.options, _d = _a.required, required = _d === void 0 ? false : _d, selected = _a.selected, setSelected = _a.setSelected, props = __rest(_a, ["descText", "disabled", "size", "id", "label", "options", "required", "selected", "setSelected"]);
1920
- var _e = useState(false), isOpen = _e[0], setIsOpen = _e[1];
1961
+ var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 'md' : _c, id = _a.id, label = _a.label, options = _a.options, _d = _a.required, required = _d === void 0 ? false : _d, selected = _a.selected, setSelected = _a.setSelected, _e = _a.onClickDropdown, onClickDropdown = _e === void 0 ? function () { } : _e, props = __rest(_a, ["descText", "disabled", "size", "id", "label", "options", "required", "selected", "setSelected", "onClickDropdown"]);
1962
+ var _f = useState(false), isOpen = _f[0], setIsOpen = _f[1];
1921
1963
  var validatedSize = validUnion(size, sizeUnion$1);
1922
- var _f = sizeConfig$7[validatedSize], searchSize = _f.searchSize, iconSize = _f.iconSize;
1964
+ var _g = sizeConfig$7[validatedSize], searchSize = _g.searchSize, iconSize = _g.iconSize;
1923
1965
  var inputRef = useRef(null);
1924
1966
  var handleOutsideClick = function (e) {
1925
1967
  if (inputRef.current && !inputRef.current.contains(e.target)) {
@@ -1958,7 +2000,7 @@ function SelectInput(_a) {
1958
2000
  React$1.createElement("div", { className: "group relative w-full" },
1959
2001
  React$1.createElement("input", __assign({ className: "field peer w-full cursor-pointer rounded border border-bia-grey-dark-10 bg-primary-white pe-8 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:bg-bia-grey-light-80 disabled:text-bia-coolgrey ".concat(searchSize), onClick: function () { return setIsOpen(!isOpen); }, value: selectedLabel, readOnly: true, id: id, disabled: disabled }, props)),
1960
2002
  React$1.createElement("div", { className: "pointer-events-none absolute inset-y-0 flex items-center pl-3 text-bia-coolgrey peer-disabled:text-bia-coolgrey-light-50 ".concat(iconSize) }, isOpen ? React$1.createElement(TbChevronUp, null) : React$1.createElement(TbChevronDown, null)),
1961
- isOpen && (React$1.createElement("div", { className: "absolute z-10 w-full overflow-y-auto rounded-b-md border border-bia-grey-dark-10 bg-primary-white shadow-lg", ref: optionsRef }, options.map(function (option) {
2003
+ isOpen && (React$1.createElement("div", { className: "absolute z-10 w-full overflow-y-auto rounded-b-md border border-bia-grey-dark-10 bg-primary-white shadow-lg", ref: optionsRef, onClick: onClickDropdown }, options.map(function (option) {
1962
2004
  var isSelected = JSON.stringify(option) === JSON.stringify(selected);
1963
2005
  var optionLabel = isObjectOptionItem ? option.label : option;
1964
2006
  var optionCaption = isObjectOptionItem ? option.caption : '';
@@ -2000,9 +2042,9 @@ var sizeConfig$5 = {
2000
2042
 
2001
2043
  /* eslint-disable @typescript-eslint/no-explicit-any */
2002
2044
  function LiveSearch(_a) {
2003
- 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;
2004
- var _f = useState(false), isOpen = _f[0], setIsOpen = _f[1];
2005
- var _g = sizeConfig$5[size], iconClass = _g.iconClass, iconSize = _g.iconSize, inputClass = _g.inputClass;
2045
+ 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;
2046
+ var _h = useState(false), isOpen = _h[0], setIsOpen = _h[1];
2047
+ var _j = sizeConfig$5[size], iconClass = _j.iconClass, iconSize = _j.iconSize, inputClass = _j.inputClass;
2006
2048
  var inputRef = useRef(null);
2007
2049
  var handleOutsideClick = function (e) {
2008
2050
  if (inputRef.current && !inputRef.current.contains(e.target)) {
@@ -2023,10 +2065,13 @@ function LiveSearch(_a) {
2023
2065
  label,
2024
2066
  required && React$1.createElement("span", { className: "p-1 text-bia-red" }, "*")),
2025
2067
  React$1.createElement("div", { className: "group relative w-full" },
2026
- React$1.createElement("input", { className: "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: value.label, required: required, disabled: disabled, id: id, placeholder: placeholder, onChange: function (e) { return setValue({ id: null, label: e.target.value }); }, type: "search", readOnly: readOnly }),
2068
+ React$1.createElement("input", { className: "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: value.label, required: required, disabled: disabled, id: id, placeholder: placeholder, onChange: function (e) {
2069
+ onChangeText(e);
2070
+ setValue({ id: null, label: e.target.value });
2071
+ }, type: "search", readOnly: readOnly }),
2027
2072
  React$1.createElement("div", { className: "absolute inset-y-0 flex items-center pl-3 peer-hover:hidden peer-focus:hidden ".concat(iconClass) },
2028
2073
  React$1.createElement(TbZoom, { className: "text-primary-black", style: { fontSize: iconSize } })),
2029
- isOpen && (React$1.createElement("div", { className: "border-grey-100 absolute z-10 max-h-60 w-full overflow-y-auto rounded-b-md border bg-primary-white shadow-lg" }, filteredOptions.map(function (option) {
2074
+ isOpen && (React$1.createElement("div", { className: "border-grey-100 absolute z-10 max-h-60 w-full overflow-y-auto rounded-b-md border bg-primary-white shadow-lg", onClick: onClickDropdown }, filteredOptions.map(function (option) {
2030
2075
  var isSelected = value && value.id && option.id === value.id;
2031
2076
  return option.custom ? (React$1.createElement(CustomDropdownItem, { size: size, isSelected: isSelected, onClick: function () {
2032
2077
  setValue(option);
@@ -2509,7 +2554,7 @@ var radiusConfig = {
2509
2554
  };
2510
2555
  var variantConfig = {
2511
2556
  default: 'pb-[7.5px] pt-[8.5px] ps-[15px] pe-[10px] gap-[10px]',
2512
- alternative: 'pt-[4.42px] pb-[4.4px] px-[20px] relative',
2557
+ alternative: 'pt-[4.8px] pb-[4.0px] px-[20px] relative',
2513
2558
  };
2514
2559
  var defaultConfigs = {
2515
2560
  true: 'cursor-default bg-bia-grey-light-80 hover:bg-bia-coolgrey-light-90 text-primary-black ',
@@ -5402,4 +5447,4 @@ function Window(_a) {
5402
5447
  return null;
5403
5448
  }
5404
5449
 
5405
- export { Accordions, Alert, Avatar, Badge, Banner, Brand, Breadcrumb, Button, ButtonApp, Checkbox, Color, Display, Divider, FileTree, Heading, Link, LiveSearch, MenuContainer, MenuItem, Modal, P, PaginationBar, Piils as Pills, Popover, ProgressBar, ProgressCircle, Radio, ResizeableDiv, SegmentButtonGroup, SegmentButtonItem, SelectInput, Slider, Spinner, Tab, TabMenu, TableCell, TagLabel, Text, TextArea, TextInput, Toggle, Tooltip, Window };
5450
+ export { Accordions, Alert, Avatar, Badge, Banner, Brand, Breadcrumb, Button, ButtonApp, Checkbox, Color, ContextualButton, Display, Divider, FileTree, Heading, Link, LiveSearch, MenuContainer, MenuItem, Modal, P, PaginationBar, Piils as Pills, Popover, ProgressBar, ProgressCircle, Radio, ResizeableDiv, SegmentButtonGroup, SegmentButtonItem, SelectInput, Slider, Spinner, Tab, TabMenu, TableCell, TagLabel, Text, TextArea, TextInput, Toggle, Tooltip, Window };