@hexure/ui 1.14.5 → 1.14.6

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/cjs/index.js CHANGED
@@ -2691,7 +2691,7 @@ const q = ({
2691
2691
  });
2692
2692
  });
2693
2693
 
2694
- const Wrapper$h = styled.div(props => ({
2694
+ const Wrapper$i = styled.div(props => ({
2695
2695
  display: 'inline-block',
2696
2696
  position: 'relative',
2697
2697
  height: props.$height || '16px',
@@ -2739,7 +2739,7 @@ const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, d
2739
2739
  const [show_content, toggleContent] = React.useState(false);
2740
2740
  const baseId = dataItemid || `tooltip-${Math.random().toString(36).slice(2, 9)}`;
2741
2741
  if (auto) {
2742
- return (React.createElement(Wrapper$h, { "data-itemid": `${baseId}-wrapper` },
2742
+ return (React.createElement(Wrapper$i, { "data-itemid": `${baseId}-wrapper` },
2743
2743
  React.createElement("style", null, `
2744
2744
  .custom-tooltip-arrow {
2745
2745
  box-shadow: 1px 1px 0 0 #0193D7; /* top border for arrow (matches border) */
@@ -2764,7 +2764,7 @@ const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, d
2764
2764
  React.createElement(TooltipPortal, null,
2765
2765
  React.createElement(M, { className: 'custom-tooltip', classNameArrow: 'custom-tooltip-arrow', "data-itemid": `${baseId}-content`, id: `${baseId}-auto-tooltip-data-html`, render: () => React.createElement("p", { "data-itemid": `${baseId}-text` }, children) }))));
2766
2766
  }
2767
- return (React.createElement(Wrapper$h, { "$height": height, "data-itemid": `${baseId}-wrapper`, onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
2767
+ return (React.createElement(Wrapper$i, { "$height": height, "data-itemid": `${baseId}-wrapper`, onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
2768
2768
  trigger || React.createElement(StyledIcon$6, { "data-itemid": `${baseId}-icon`, path: js.mdiInformationOutline }),
2769
2769
  show_content ? (React.createElement(Content$3, { "$position": position, "$width": width, "data-itemid": `${baseId}-content` }, children && (React.createElement(Copy, { "data-itemid": `${baseId}-text`, type: 'small' }, children)))) : null));
2770
2770
  };
@@ -2992,7 +2992,7 @@ Heading.defaultProps = {
2992
2992
  type: 'primary',
2993
2993
  };
2994
2994
 
2995
- const Wrapper$g = styled.div `
2995
+ const Wrapper$h = styled.div `
2996
2996
  position: fixed;
2997
2997
  top: 0;
2998
2998
  right: 0;
@@ -3017,7 +3017,7 @@ const Buttons$1 = styled.div `
3017
3017
  const ActionDialog = (_a) => {
3018
3018
  var { description, title, primaryButton, secondaryButton, tertiaryButton, style = {}, dataItemid } = _a, accessibleProps = __rest(_a, ["description", "title", "primaryButton", "secondaryButton", "tertiaryButton", "style", "dataItemid"]);
3019
3019
  const baseId = dataItemid || 'action-dialog';
3020
- return (React.createElement(Wrapper$g, Object.assign({}, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
3020
+ return (React.createElement(Wrapper$h, Object.assign({}, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
3021
3021
  React.createElement(Container$5, { "$customStyle": style, "data-itemid": `${baseId}-container`, open: true },
3022
3022
  title ? (React.createElement(Heading, { "data-itemid": `${baseId}-title`, margin: '0px 0px 20px 0px', type: 'secondary' }, title)) : null,
3023
3023
  description ? (React.createElement(Copy, { align: 'center', "data-itemid": `${baseId}-description` }, description)) : null,
@@ -3027,7 +3027,7 @@ const ActionDialog = (_a) => {
3027
3027
  primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { "data-itemid": primaryButton.children || `${baseId}-${primaryButton.children}`, dataItemid: primaryButton.children || `${baseId}-${primaryButton.children}`, format: primaryButton.format || 'primary' }))) : null)) : null)));
3028
3028
  };
3029
3029
 
3030
- const Wrapper$f = styled.div `
3030
+ const Wrapper$g = styled.div `
3031
3031
  border: 1px solid #f1f1f1;
3032
3032
  border-radius: 4px;
3033
3033
  border-left-width: 4px;
@@ -3072,7 +3072,7 @@ const Alert = (_a) => {
3072
3072
  icon: js.mdiCheckboxMarkedCircleOutline,
3073
3073
  },
3074
3074
  };
3075
- return (React.createElement(Wrapper$f, Object.assign({}, accessibleProps, { "$small": small, "data-itemid": `${baseId}-wrapper`, style: { borderLeftColor: type_mapping[type].color } }),
3075
+ return (React.createElement(Wrapper$g, Object.assign({}, accessibleProps, { "$small": small, "data-itemid": `${baseId}-wrapper`, style: { borderLeftColor: type_mapping[type].color } }),
3076
3076
  React.createElement(StyledIcon$4, { color: type_mapping[type].color, "data-itemid": `${baseId}-icon`, path: type_mapping[type].icon, size: small ? '20px' : '30px' }),
3077
3077
  React.createElement("div", { "data-itemid": `${baseId}-content` },
3078
3078
  title && !small ? (React.createElement(Heading, { bold: true, "data-itemid": `${baseId}-title`, margin: '2px 0 0 0', type: 'tertiary' }, title)) : null,
@@ -3157,7 +3157,7 @@ const AppHeader = ({ logoUrl, buttons = [], dataItemid }) => {
3157
3157
  React.createElement(Buttons, { "data-itemid": `${baseId}-buttons` }, buttons.map((b, i) => (React.createElement(Button, Object.assign({ key: i }, b, { "data-itemid": `${baseId}-button-${i}` })))))));
3158
3158
  };
3159
3159
 
3160
- const Wrapper$e = styled.div `
3160
+ const Wrapper$f = styled.div `
3161
3161
  display: inline-block;
3162
3162
  border-radius: 4px;
3163
3163
  padding: 4px 6px;
@@ -3194,7 +3194,7 @@ const Remove$1 = styled.div `
3194
3194
  const Tag = (_a) => {
3195
3195
  var { children, color = 'PRIMARY', removable, onClick, dataItemid, rotate, dataSectionName } = _a, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick", "dataItemid", "rotate", "dataSectionName"]);
3196
3196
  const baseId = dataItemid || 'tag';
3197
- return (React.createElement(Wrapper$e, Object.assign({ "$color": color, "$removable": removable, "$rotate": rotate, onClick: onClick }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
3197
+ return (React.createElement(Wrapper$f, Object.assign({ "$color": color, "$removable": removable, "$rotate": rotate, onClick: onClick }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
3198
3198
  React.createElement(Content$2, { "data-itemid": `${baseId}-content`, "data-section-name": dataSectionName },
3199
3199
  React.createElement(Label$4, { "$color": color, "data-itemid": `${baseId}-label` }, children),
3200
3200
  removable ? (React.createElement(Remove$1, { "data-itemid": `${baseId}-remove` },
@@ -3330,7 +3330,7 @@ const AppMenu = ({ menu, isCollapsed, footerTag, defaultWidth = '280px', dataIte
3330
3330
  }, small: true, type: 'button' }))));
3331
3331
  };
3332
3332
 
3333
- const Wrapper$d = styled.div `
3333
+ const Wrapper$e = styled.div `
3334
3334
  border: 1px solid ${props => props.theme.PRIMARY_COLOR.Hex};
3335
3335
  border-radius: 8px;
3336
3336
  box-sizing: border-box;
@@ -3339,7 +3339,7 @@ const Wrapper$d = styled.div `
3339
3339
  justify-content: space-between;
3340
3340
  padding: 16px 20px;
3341
3341
  `;
3342
- Wrapper$d.defaultProps = { theme: EditableTheme };
3342
+ Wrapper$e.defaultProps = { theme: EditableTheme };
3343
3343
  const Left = styled.div `
3344
3344
  box-sizing: border-box;
3345
3345
  display: flex;
@@ -3401,7 +3401,7 @@ const ErrorMsg = styled.span `
3401
3401
  const BulkActionBar = (_a) => {
3402
3402
  var { actions = [], errorMsg, onClear, selectedCount = 0, dataItemid } = _a, accessibleProps = __rest(_a, ["actions", "errorMsg", "onClear", "selectedCount", "dataItemid"]);
3403
3403
  const baseId = dataItemid || 'bulk-action-bar';
3404
- return (React.createElement(Wrapper$d, Object.assign({}, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
3404
+ return (React.createElement(Wrapper$e, Object.assign({}, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
3405
3405
  React.createElement(Left, { "data-itemid": `${baseId}-left` },
3406
3406
  React.createElement(Info$1, { "data-itemid": `${baseId}-info` },
3407
3407
  React.createElement(Selected, { "data-itemid": `${baseId}-selected` },
@@ -3414,7 +3414,7 @@ const BulkActionBar = (_a) => {
3414
3414
  React.createElement(ErrorMsg, { "data-itemid": `${baseId}-error-msg` }, errorMsg))) : null));
3415
3415
  };
3416
3416
 
3417
- const Wrapper$c = styled.div `
3417
+ const Wrapper$d = styled.div `
3418
3418
  background: #fff;
3419
3419
  border-radius: 8px;
3420
3420
  box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
@@ -3461,7 +3461,7 @@ Title$1.defaultProps = {
3461
3461
  const MoreMenu = (_a) => {
3462
3462
  var { maxHeight, menuItems = [], dataItemid } = _a, accessibleProps = __rest(_a, ["maxHeight", "menuItems", "dataItemid"]);
3463
3463
  const baseId = dataItemid || 'more-menu';
3464
- return (React.createElement(Wrapper$c, Object.assign({ "$maxHeight": maxHeight }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }), menuItems.map((item, i) => {
3464
+ return (React.createElement(Wrapper$d, Object.assign({ "$maxHeight": maxHeight }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }), menuItems.map((item, i) => {
3465
3465
  var _a;
3466
3466
  const itemId = `${baseId}`;
3467
3467
  return (React.createElement(MenuItem, { className: item === null || item === void 0 ? void 0 : item.className, "data-itemid": `${itemId}-menu-item`, key: i, onClick: item.onClick },
@@ -3557,7 +3557,7 @@ const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = '
3557
3557
  showMenu && (React.createElement(StyledMoreMenu, { "$left": menuPosition.left, "$menuWidth": menuWidth, "$top": menuPosition.top, dataItemid: `${baseId}-more-menu`, maxHeight: maxHeight, menuItems: menuItems }))));
3558
3558
  };
3559
3559
 
3560
- const Wrapper$b = styled.label `
3560
+ const Wrapper$c = styled.label `
3561
3561
  border-radius: 4px;
3562
3562
  padding: 4px 0px 4px 6px;
3563
3563
  margin-left: -6px;
@@ -3573,7 +3573,7 @@ const Wrapper$b = styled.label `
3573
3573
  background: ${props => `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)`};
3574
3574
  }
3575
3575
  `;
3576
- Wrapper$b.defaultProps = { theme: EditableTheme };
3576
+ Wrapper$c.defaultProps = { theme: EditableTheme };
3577
3577
  const Input$2 = styled.input `
3578
3578
  font-size: 20px;
3579
3579
  margin: 0px;
@@ -3600,7 +3600,7 @@ const Input$2 = styled.input `
3600
3600
  display: block;
3601
3601
  }
3602
3602
  `;
3603
- const getBackgroundColor$3 = (props) => {
3603
+ const getBackgroundColor$4 = (props) => {
3604
3604
  if (props.$isWarningError) {
3605
3605
  return '#fcf1c9';
3606
3606
  }
@@ -3611,7 +3611,7 @@ const getBackgroundColor$3 = (props) => {
3611
3611
  return '#ffffff';
3612
3612
  }
3613
3613
  };
3614
- const getBorderColor$3 = (props) => {
3614
+ const getBorderColor$4 = (props) => {
3615
3615
  if (props.$isWarningError) {
3616
3616
  return 'Orange';
3617
3617
  }
@@ -3629,8 +3629,8 @@ const Check$1 = styled.span `
3629
3629
  background-color: #fff;
3630
3630
  border-width: 2px;
3631
3631
  border-style: solid;
3632
- border-color: ${props => getBorderColor$3(props)};
3633
- background-color: ${props => getBackgroundColor$3(props)};
3632
+ border-color: ${props => getBorderColor$4(props)};
3633
+ background-color: ${props => getBackgroundColor$4(props)};
3634
3634
  box-sizing: border-box;
3635
3635
  position: relative;
3636
3636
  &:after {
@@ -3661,7 +3661,7 @@ const Label$3 = styled.span `
3661
3661
  const Checkbox = (_a) => {
3662
3662
  var { children, color, disabled, checked, onChange, invalid, tooltip, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false, dataSectionName, isLabelBold = false } = _a, accessibleProps = __rest(_a, ["children", "color", "disabled", "checked", "onChange", "invalid", "tooltip", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError", "dataSectionName", "isLabelBold"]);
3663
3663
  const baseId = dataItemid || 'checkbox';
3664
- return (React.createElement(Wrapper$b, Object.assign({ "$disabled": disabled }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
3664
+ return (React.createElement(Wrapper$c, Object.assign({ "$disabled": disabled }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
3665
3665
  React.createElement(Input$2, { "$invalid": invalid, checked: checked, "data-itemid": `${baseId}-input`, "data-section-name": dataSectionName, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'checkbox' }),
3666
3666
  React.createElement(Check$1, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "data-itemid": `${baseId}-check` }),
3667
3667
  children ? (React.createElement(Label$3, { "$isLabelBold": isLabelBold, color: color, "data-itemid": `${baseId}-label` },
@@ -3717,6 +3717,230 @@ const Checklist = (_a) => {
3717
3717
  }))));
3718
3718
  };
3719
3719
 
3720
+ const getBackgroundColor$3 = (props) => {
3721
+ if (props.$isWarningError) {
3722
+ return '#fcf1c9';
3723
+ }
3724
+ else if (props.$invalid && props.$isInvalidRedBackground) {
3725
+ return '#ffe5e5';
3726
+ }
3727
+ else {
3728
+ return props.$readOnly ? '#f5f5f5' : '#ffffff';
3729
+ }
3730
+ };
3731
+ const getBorderColor$3 = (props) => {
3732
+ if (props.$isWarningError) {
3733
+ return 'Orange';
3734
+ }
3735
+ else if (props.$invalid) {
3736
+ return Colors.RED.Hex;
3737
+ }
3738
+ else {
3739
+ return '#cccccc';
3740
+ }
3741
+ };
3742
+ const Wrapper$b = styled.div `
3743
+ border-radius: 4px;
3744
+ height: 40px;
3745
+ background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
3746
+ position: relative;
3747
+ cursor: ${props => (props.$readOnly ? 'default' : 'pointer')};
3748
+ border-width: 1px;
3749
+ border-style: solid;
3750
+ border-color: ${props => getBorderColor$3(props)};
3751
+ background-color: ${props => getBackgroundColor$3(props)};
3752
+ border-radius: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.borderRadius) || '4px'};
3753
+ flex-grow: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.flexGrow) || 0};
3754
+ box-sizing: border-box;
3755
+ padding: 10px 0px;
3756
+ display: flex;
3757
+ align-items: center;
3758
+ width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
3759
+
3760
+ &:focus-within {
3761
+ border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
3762
+ }
3763
+ `;
3764
+ Wrapper$b.defaultProps = { theme: EditableTheme };
3765
+ const Trigger$2 = styled.div `
3766
+ appearance: none;
3767
+ box-shadow: none;
3768
+ outline: none;
3769
+ border: none;
3770
+ color: ${props => (props.$searchableOpen ? 'transparent' : Colors.BLACK.Hex)};
3771
+ font-size: ${FontSizes.DEFAULT};
3772
+ font-weight: 400;
3773
+ font-family: ${FontStyles.DEFAULT};
3774
+ line-height: normal;
3775
+ background-color: transparent;
3776
+ background-image: none;
3777
+ width: 100%;
3778
+ box-sizing: border-box;
3779
+ padding: 0px 30px 0px 10px;
3780
+ box-sizing: border-box;
3781
+ position: relative;
3782
+ z-index: 2;
3783
+ cursor: ${props => (props.$readOnly ? 'default' : 'pointer')};
3784
+ user-select: none;
3785
+ overflow: hidden;
3786
+ text-overflow: ellipsis;
3787
+ white-space: nowrap;
3788
+ `;
3789
+ const IconWrapper$3 = styled(Icon) `
3790
+ position: absolute;
3791
+ right: 9px;
3792
+ z-index: 1;
3793
+ transition: transform 0.2s ease;
3794
+ transform: ${props => (props.$isOpen ? 'rotate(180deg)' : 'rotate(0deg)')};
3795
+ pointer-events: none;
3796
+ `;
3797
+ const SearchInput$2 = styled.input `
3798
+ position: absolute;
3799
+ left: 0;
3800
+ top: 0;
3801
+ z-index: 999;
3802
+ width: 100%;
3803
+ height: 100%;
3804
+ border: none;
3805
+ outline: none;
3806
+ background-color: transparent;
3807
+ color: ${Colors.BLACK.Hex};
3808
+ font-family: ${FontStyles.DEFAULT};
3809
+ font-size: ${FontSizes.DEFAULT};
3810
+ font-weight: 400;
3811
+ line-height: normal;
3812
+ padding: 0px 30px 0px 10px;
3813
+ box-sizing: border-box;
3814
+ overflow: hidden;
3815
+ white-space: nowrap;
3816
+ pointer-events: ${props => (props.$isOpen ? 'auto' : 'none')};
3817
+ opacity: ${props => (props.$isOpen ? 1 : 0)};
3818
+
3819
+ &::placeholder {
3820
+ color: #999999;
3821
+ opacity: 1;
3822
+ }
3823
+ `;
3824
+ const DropdownContainer = styled.div `
3825
+ position: absolute;
3826
+ top: 100%;
3827
+ left: 0;
3828
+ right: 0;
3829
+ margin-top: 4px;
3830
+ background: white;
3831
+ border: 1px solid #cccccc;
3832
+ border-radius: 4px;
3833
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
3834
+ max-height: 300px;
3835
+ overflow-y: auto;
3836
+ z-index: 1000;
3837
+ display: ${props => (props.$isOpen ? 'block' : 'none')};
3838
+ `;
3839
+ const OptionGroupLabel = styled.div `
3840
+ padding: 6px 10px;
3841
+ font-weight: 600;
3842
+ font-size: ${FontSizes.DEFAULT};
3843
+ font-family: ${FontStyles.DEFAULT};
3844
+ color: ${Colors.BLACK.Hex};
3845
+ `;
3846
+ const OptionItem = styled.span `
3847
+ display: block;
3848
+ padding: 8px 10px;
3849
+ padding-left: ${props => (props.$isGrouped ? '20px' : '10px')};
3850
+ font-size: ${FontSizes.DEFAULT};
3851
+ font-family: ${FontStyles.DEFAULT};
3852
+ color: ${props => props.$color || Colors.BLACK.Hex};
3853
+ cursor: ${props => (props.$disabled ? 'not-allowed' : 'pointer')};
3854
+ opacity: ${props => (props.$disabled ? 0.5 : 1)};
3855
+ background-color: ${props => (props.$isSelected ? '#e8f4fd' : 'transparent')};
3856
+ user-select: none;
3857
+ line-height: 1.3em;
3858
+
3859
+ &:hover {
3860
+ background-color: ${props => (props.$disabled ? 'transparent' : '#f5f5f5')};
3861
+ }
3862
+ `;
3863
+ const CustomSelect = (_a) => {
3864
+ var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false, innerRef = null } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError", "innerRef"]);
3865
+ const [searchTerm, setSearchTerm] = React.useState('');
3866
+ const [value, setValue] = React.useState(propValue || '');
3867
+ const [isOpen, setIsOpen] = React.useState(false);
3868
+ const wrapperRef = React.useRef(null);
3869
+ const baseId = dataItemid || 'custom-select';
3870
+ // Update the value when the prop changes
3871
+ React.useEffect(() => {
3872
+ setValue(propValue || '');
3873
+ }, [propValue]);
3874
+ // Close dropdown when clicking outside
3875
+ React.useEffect(() => {
3876
+ const handleClickOutside = (event) => {
3877
+ if (wrapperRef.current && !wrapperRef.current.contains(event.target)) {
3878
+ setIsOpen(false);
3879
+ }
3880
+ };
3881
+ document.addEventListener('mousedown', handleClickOutside);
3882
+ return () => {
3883
+ document.removeEventListener('mousedown', handleClickOutside);
3884
+ };
3885
+ }, []);
3886
+ const handleSearch = (event) => {
3887
+ setSearchTerm(event.target.value);
3888
+ setIsOpen(true);
3889
+ };
3890
+ const handleToggle = () => {
3891
+ if (!readOnly) {
3892
+ setIsOpen(!isOpen);
3893
+ }
3894
+ };
3895
+ const handleOptionClick = (optionValue, disabled) => {
3896
+ if (disabled || readOnly)
3897
+ return;
3898
+ setValue(optionValue.toString());
3899
+ setIsOpen(false);
3900
+ setSearchTerm('');
3901
+ if (onChange) {
3902
+ onChange(optionValue);
3903
+ }
3904
+ };
3905
+ const getSelectedLabel = () => {
3906
+ if (!value || value === '')
3907
+ return placeholder;
3908
+ // Check in options
3909
+ if (options) {
3910
+ const found = options.find(opt => opt.value.toString() === value.toString());
3911
+ if (found)
3912
+ return found.label || found.value;
3913
+ }
3914
+ // Check in optionGroups
3915
+ if (optionGroups) {
3916
+ for (const group of optionGroups) {
3917
+ const found = group.options.find(opt => opt.value.toString() === value.toString());
3918
+ if (found)
3919
+ return found.label || found.value;
3920
+ }
3921
+ }
3922
+ return value;
3923
+ };
3924
+ const filteredOptions = searchable
3925
+ ? options === null || options === void 0 ? void 0 : options.filter(option => { var _a; return (_a = option.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(searchTerm.toLowerCase()); })
3926
+ : options;
3927
+ const filteredOptionGroups = searchable
3928
+ ? optionGroups === null || optionGroups === void 0 ? void 0 : optionGroups.map(group => (Object.assign(Object.assign({}, group), { options: group.options.filter(option => { var _a; return (_a = option.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(searchTerm.toLowerCase()); }) })))
3929
+ : optionGroups;
3930
+ return (React.createElement(Wrapper$b, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "$readOnly": readOnly, "$style": style, "data-itemid": `${baseId}-wrapper`, ref: wrapperRef, style: style },
3931
+ searchable && (React.createElement(SearchInput$2, Object.assign({ "$isOpen": isOpen, autoFocus: isOpen, "data-itemid": `${baseId}-search-input`, onChange: handleSearch, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, type: 'text', value: searchTerm }, accessibleProps))),
3932
+ React.createElement(Trigger$2, Object.assign({ "$readOnly": readOnly, "$searchableOpen": searchable && isOpen, "data-itemid": `${baseId}-trigger`, id: `${baseId}-trigger`, onClick: handleToggle, ref: innerRef, tabIndex: readOnly ? -1 : tabIndex }, accessibleProps), getSelectedLabel()),
3933
+ React.createElement(IconWrapper$3, { "$isOpen": isOpen, color: Colors.BLACK.Hex, "data-itemid": `${baseId}-icon`, path: js.mdiChevronDown, size: '22px' }),
3934
+ React.createElement(DropdownContainer, { "$isOpen": isOpen, "data-itemid": `${baseId}-dropdown` },
3935
+ !value && placeholder && (React.createElement(OptionItem, { "$disabled": true, "$isSelected": false, "data-itemid": `${baseId}-placeholder` }, placeholder)),
3936
+ filteredOptionGroups &&
3937
+ filteredOptionGroups.map((group, i) => (React.createElement("div", { "data-itemid": `${baseId}-optgroup-${i}`, key: i },
3938
+ React.createElement(OptionGroupLabel, null, group.label || `Group ${i}`),
3939
+ group.options.map((option, j) => (React.createElement(OptionItem, { "$color": option.color, "$disabled": option.disabled, "$isGrouped": true, "$isSelected": !!(value && value !== '' && value.toString() === option.value.toString()), "data-itemid": `${baseId}-option-${i}-${j}`, key: j, onClick: () => handleOptionClick(option.value, option.disabled) }, option.label || option.value)))))),
3940
+ filteredOptions &&
3941
+ filteredOptions.map((option, i) => (React.createElement(OptionItem, { "$color": option.color, "$disabled": option.disabled, "$isSelected": !!(value && value !== '' && value.toString() === option.value.toString()), "data-itemid": `${baseId}-option-${i}`, key: i, onClick: () => handleOptionClick(option.value, option.disabled) }, option.label || option.value))))));
3942
+ };
3943
+
3720
3944
  const getBackgroundColor$2 = (props) => {
3721
3945
  if (props.$isWarningError) {
3722
3946
  return '#fcf1c9';
@@ -3804,7 +4028,7 @@ const SearchInput$1 = styled.input `
3804
4028
  white-space: nowrap;
3805
4029
  `;
3806
4030
  const Select = (_a) => {
3807
- var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false, innerRef = null } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError", "innerRef"]);
4031
+ var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false, innerRef = null, isCustomSelect = false } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError", "innerRef", "isCustomSelect"]);
3808
4032
  const [searchTerm, setSearchTerm] = React.useState('');
3809
4033
  const [value, setValue] = React.useState(propValue || '');
3810
4034
  const baseId = dataItemid || 'select';
@@ -3827,6 +4051,9 @@ const Select = (_a) => {
3827
4051
  const filteredOptionGroups = searchable
3828
4052
  ? optionGroups === null || optionGroups === void 0 ? void 0 : optionGroups.map(group => (Object.assign(Object.assign({}, group), { options: group.options.filter(option => { var _a; return (_a = option.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(searchTerm.toLowerCase()); }) })))
3829
4053
  : optionGroups;
4054
+ if (isCustomSelect) {
4055
+ return (React.createElement(CustomSelect, Object.assign({ dataItemid: dataItemid, innerRef: innerRef, invalid: invalid, isInvalidRedBackground: isInvalidRedBackground, isWarningError: isWarningError, onChange: onChange, optionGroups: optionGroups, options: options, placeholder: placeholder, readOnly: readOnly, searchable: searchable, style: style, tabIndex: tabIndex, value: propValue }, accessibleProps)));
4056
+ }
3830
4057
  return (React.createElement(Wrapper$a, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "$readOnly": readOnly, "$style": style, "data-itemid": `${baseId}-wrapper`, style: style },
3831
4058
  searchable && (React.createElement(SearchInput$1, Object.assign({ "data-itemid": `${baseId}-search-input`, onChange: handleSearch, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, type: 'text', value: searchTerm }, accessibleProps))),
3832
4059
  React.createElement(Trigger$1, Object.assign({ "data-itemid": `${baseId}-trigger`, disabled: readOnly, id: `${baseId}-trigger`, name: baseId, onChange: handleChange, placeholder: placeholder, ref: innerRef, tabIndex: readOnly ? -1 : tabIndex, value: value }, accessibleProps),