@hexure/ui 1.13.14 → 1.13.16

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.
@@ -1,9 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  import { AccessibleProps } from '../../utils/Accessibility';
3
3
  export interface OptionProps {
4
- /** It is used to give label to option. */
5
4
  label?: string;
6
- /** It is used to give value to option. */
7
5
  value: string | number;
8
6
  color?: string;
9
7
  }
@@ -17,21 +15,15 @@ export interface styleProps {
17
15
  width?: number | string;
18
16
  }
19
17
  export interface SelectProps extends AccessibleProps {
20
- /** It is used to give options from which value is selected. */
21
18
  options?: OptionProps[];
22
19
  optionGroups?: OptionGroupProps[];
23
20
  placeholder?: string;
24
21
  searchable?: boolean;
25
- /** If it's value is true then select is disabled. */
26
22
  readOnly?: boolean;
27
- /** It is used to show error messages when it's value is false. */
28
23
  invalid?: boolean;
29
- /** It is used to read value for selected option. */
30
- value: string;
31
- /** It is used to read value for border rasius & flex grow */
24
+ value?: string;
32
25
  style?: styleProps;
33
- /** It is used to change value when an option is clicked. */
34
- onChange: (e: any) => void;
26
+ onChange?: (e: any) => void;
35
27
  onSearch?: (searchTerm: string) => void;
36
28
  }
37
29
  declare const Select: FC<SelectProps>;
package/dist/esm/index.js CHANGED
@@ -736,14 +736,11 @@ const MoreMenu = (_a) => {
736
736
  };
737
737
 
738
738
  const MenuWrapper = styled.div `
739
- position: relative;
739
+ position: relative; // Ensure this is relative
740
740
  display: inline-block;
741
741
  `;
742
742
  const StyledMoreMenu = styled(MoreMenu) `
743
- position: fixed;
744
- top: ${props => props.$top};
745
- left: ${props => props.$left};
746
- position: fixed;
743
+ position: absolute; // Changed from fixed to absolute
747
744
  top: ${props => props.$top};
748
745
  left: ${props => props.$left};
749
746
  width: ${props => props.$menuWidth};
@@ -776,44 +773,44 @@ const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = '
776
773
  if (showMenu && menuWrapperRef.current) {
777
774
  const wrapperRect = menuWrapperRef.current.getBoundingClientRect();
778
775
  const menuWidthInt = parseInt(menuWidth, 10);
779
- let top = wrapperRect.top;
780
- let left = wrapperRect.left;
776
+ let top = 0;
777
+ let left = 0;
781
778
  switch (position) {
782
779
  case 'top':
783
- top = wrapperRect.top - 142; // Menu above the wrapper
784
- left = wrapperRect.left;
780
+ top = -142; // Menu above the wrapper
781
+ left = 0;
785
782
  break;
786
783
  case 'bottom':
787
- top = wrapperRect.bottom; // Menu below the wrapper
788
- left = wrapperRect.left;
784
+ top = wrapperRect.height; // Menu below the wrapper
785
+ left = 0;
789
786
  break;
790
787
  case 'left':
791
- top = wrapperRect.top;
792
- left = wrapperRect.left - menuWidthInt; // Menu to the left of the wrapper
788
+ top = 0;
789
+ left = -menuWidthInt; // Menu to the left of the wrapper
793
790
  break;
794
791
  case 'right':
795
- top = wrapperRect.top;
796
- left = wrapperRect.right; // Menu to the right of the wrapper
792
+ top = 0;
793
+ left = wrapperRect.width; // Menu to the right of the wrapper
797
794
  break;
798
795
  case 'bottomLeft':
799
- top = wrapperRect.bottom;
800
- left = wrapperRect.right - menuWidthInt;
796
+ top = wrapperRect.height;
797
+ left = wrapperRect.width - menuWidthInt;
801
798
  break;
802
799
  case 'bottomRight':
803
- top = wrapperRect.bottom;
804
- left = wrapperRect.left;
800
+ top = wrapperRect.height;
801
+ left = 0;
805
802
  break;
806
803
  case 'topRight':
807
- top = wrapperRect.top - 142;
808
- left = wrapperRect.right - 24;
804
+ top = -142;
805
+ left = wrapperRect.width - 24;
809
806
  break;
810
807
  case 'topLeft':
811
- top = wrapperRect.top - 142;
812
- left = wrapperRect.left - 188;
808
+ top = -142;
809
+ left = -188;
813
810
  break;
814
811
  default:
815
- top = wrapperRect.bottom;
816
- left = wrapperRect.left;
812
+ top = wrapperRect.height;
813
+ left = 0;
817
814
  break;
818
815
  }
819
816
  setMenuPosition({ top: `${top}px`, left: `${left}px` });
@@ -1008,102 +1005,96 @@ const Checklist = (_a) => {
1008
1005
  }))));
1009
1006
  };
1010
1007
 
1011
- const Wrapper$a = styled.div `
1012
- border-radius: 4px;
1013
- height: 40px;
1014
- background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
1015
- position: relative;
1016
- cursor: ${props => (props.$readOnly ? 'default' : 'pointer')};
1017
- border-width: 1px;
1018
- border-style: solid;
1019
- border-color: ${props => (props.$invalid ? Colors.RED.Hex : '#cccccc')};
1020
- border-radius: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.borderRadius) || '4px'};
1021
- flex-grow: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.flexGrow) || 0};
1022
- box-sizing: border-box;
1023
- padding: 10px 0px;
1024
- display: flex;
1025
- align-items: center;
1026
- width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
1027
-
1028
- &:focus-within {
1029
- border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
1030
- }
1008
+ const Wrapper$a = styled.div `
1009
+ border-radius: 4px;
1010
+ height: 40px;
1011
+ background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
1012
+ position: relative;
1013
+ cursor: ${props => (props.$readOnly ? 'default' : 'pointer')};
1014
+ border-width: 1px;
1015
+ border-style: solid;
1016
+ border-color: ${props => (props.$invalid ? Colors.RED.Hex : '#cccccc')};
1017
+ border-radius: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.borderRadius) || '4px'};
1018
+ flex-grow: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.flexGrow) || 0};
1019
+ box-sizing: border-box;
1020
+ padding: 10px 0px;
1021
+ display: flex;
1022
+ align-items: center;
1023
+ width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
1024
+
1025
+ &:focus-within {
1026
+ border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
1027
+ }
1031
1028
  `;
1032
1029
  Wrapper$a.defaultProps = { theme: EditableTheme };
1033
- const Trigger$1 = styled.select `
1034
- appearance: none;
1035
- box-shadow: none;
1036
- outline: none;
1037
- border: none;
1038
- color: ${Colors.BLACK.Hex};
1039
- font-size: ${FontSizes.DEFAULT};
1040
- font-weight: 400;
1041
- font-family: ${FontStyles.DEFAULT};
1042
- line-height: 2.9em;
1043
- background-color: transparent;
1044
- background-image: none;
1045
- width: 100%;
1046
- box-sizing: border-box;
1047
- padding: 0px 30px 0px 10px;
1048
- box-sizing: border-box;
1049
- position: relative;
1050
- z-index: 2;
1030
+ const Trigger$1 = styled.select `
1031
+ appearance: none;
1032
+ box-shadow: none;
1033
+ outline: none;
1034
+ border: none;
1035
+ color: ${Colors.BLACK.Hex};
1036
+ font-size: ${FontSizes.DEFAULT};
1037
+ font-weight: 400;
1038
+ font-family: ${FontStyles.DEFAULT};
1039
+ line-height: 2.9em;
1040
+ background-color: transparent;
1041
+ background-image: none;
1042
+ width: 100%;
1043
+ box-sizing: border-box;
1044
+ padding: 0px 30px 0px 10px;
1045
+ box-sizing: border-box;
1046
+ position: relative;
1047
+ z-index: 2;
1051
1048
  `;
1052
- const IconWrapper$2 = styled(Icon) `
1053
- position: absolute;
1054
- right: 9px;
1055
- z-index: 1;
1049
+ const IconWrapper$2 = styled(Icon) `
1050
+ position: absolute;
1051
+ right: 9px;
1052
+ z-index: 1;
1056
1053
  `;
1057
- const SearchInput$1 = styled.input `
1058
- position: absolute;
1059
- left: 2px;
1060
- top: 2px;
1061
- z-index: 999;
1062
- width: 90%;
1063
- height: 30px;
1064
- border: none;
1065
- outline: none;
1066
- color: ${Colors.BLACK.Hex};
1067
- font-family: ${FontStyles.DEFAULT};
1068
- font-size: ${FontSizes.DEFAULT};
1069
- font-weight: 400;
1070
- line-height: 2.9em;
1071
- overflow: hidden;
1072
- white-space: nowrap;
1054
+ const SearchInput$1 = styled.input `
1055
+ position: absolute;
1056
+ left: 2px;
1057
+ top: 2px;
1058
+ z-index: 999;
1059
+ width: 90%;
1060
+ height: 30px;
1061
+ border: none;
1062
+ outline: none;
1063
+ color: ${Colors.BLACK.Hex};
1064
+ font-family: ${FontStyles.DEFAULT};
1065
+ font-size: ${FontSizes.DEFAULT};
1066
+ font-weight: 400;
1067
+ line-height: 2.9em;
1068
+ overflow: hidden;
1069
+ white-space: nowrap;
1073
1070
  `;
1074
1071
  const Select = (_a) => {
1075
- var { options, optionGroups, placeholder, readOnly, invalid, searchable = false, value, onChange, style } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style"]);
1072
+ var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style"]);
1076
1073
  const [searchTerm, setSearchTerm] = useState('');
1074
+ const [value, setValue] = useState(propValue || '');
1077
1075
  const handleSearch = (event) => {
1078
1076
  setSearchTerm(event.target.value);
1079
1077
  };
1080
- const filteredOptions = 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()); });
1081
- const filteredOptionGroups = 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()); }) })));
1078
+ const handleChange = (event) => {
1079
+ setValue(event.target.value);
1080
+ if (onChange) {
1081
+ onChange(event);
1082
+ }
1083
+ };
1084
+ const filteredOptions = searchable
1085
+ ? 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()); })
1086
+ : options;
1087
+ const filteredOptionGroups = searchable
1088
+ ? 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()); }) })))
1089
+ : optionGroups;
1082
1090
  return (React.createElement(Wrapper$a, { "$invalid": invalid, "$readOnly": readOnly, "$style": style },
1083
- searchable && (React.createElement(SearchInput$1, Object.assign({ onChange: handleSearch, placeholder: '--Select-One-', type: 'text', value: searchTerm }, accessibleProps))),
1084
- searchable ? (React.createElement(Trigger$1, Object.assign({ disabled: readOnly, onChange: onChange, placeholder: placeholder, value: value }, accessibleProps),
1085
- placeholder ? (React.createElement("option", { disabled: true, value: '' }, placeholder)) : null,
1091
+ searchable && (React.createElement(SearchInput$1, Object.assign({ onChange: handleSearch, placeholder: placeholder, type: 'text', value: searchTerm }, accessibleProps))),
1092
+ React.createElement(Trigger$1, Object.assign({ disabled: readOnly, onChange: handleChange, placeholder: placeholder, value: value }, accessibleProps),
1093
+ placeholder && !value && (React.createElement("option", { disabled: true, value: '' }, placeholder)),
1086
1094
  filteredOptionGroups &&
1087
- filteredOptionGroups.map((group, i) => {
1088
- return (React.createElement("optgroup", { key: i, label: group.label || `Group ${i}` }, group.options.map((option, i) => {
1089
- return (option.label && (React.createElement("option", { key: i, style: { color: option.color }, value: option.value }, option.label || option.value)));
1090
- })));
1091
- }),
1095
+ filteredOptionGroups.map((group, i) => (React.createElement("optgroup", { key: i, label: group.label || `Group ${i}` }, group.options.map((option, i) => (React.createElement("option", { key: i, style: { color: option.color }, value: option.value }, option.label || option.value)))))),
1092
1096
  filteredOptions &&
1093
- filteredOptions.map((option, i) => {
1094
- return (option.label && (React.createElement("option", { key: i, style: { color: option.color }, value: option.value }, option.label || option.value)));
1095
- }))) : (React.createElement(Trigger$1, Object.assign({ disabled: readOnly, onChange: onChange, placeholder: placeholder, value: value }, accessibleProps),
1096
- placeholder ? (React.createElement("option", { disabled: true, value: '' }, placeholder)) : null,
1097
- optionGroups &&
1098
- optionGroups.map((group, i) => {
1099
- return (React.createElement("optgroup", { key: i, label: group.label || `Group ${i}` }, group.options.map((option, i) => {
1100
- return (React.createElement("option", { key: i, value: option.value }, option.label || option.value));
1101
- })));
1102
- }),
1103
- options &&
1104
- options.map((option, i) => {
1105
- return (React.createElement("option", { key: i, value: option.value }, option.label || option.value));
1106
- }))),
1097
+ filteredOptions.map((option, i) => (React.createElement("option", { key: i, style: { color: option.color }, value: option.value }, option.label || option.value)))),
1107
1098
  React.createElement(IconWrapper$2, { color: Colors.BLACK.Hex, path: mdiChevronDown, size: '22px' })));
1108
1099
  };
1109
1100
 
@@ -1682,7 +1673,7 @@ const StyledTextArea = styled.textarea `
1682
1673
  margin: 0px;
1683
1674
  text-indent: 0px;
1684
1675
  --webkit-appearance: none;
1685
- text-wrap: break-word;
1676
+ overflow-wrap: break-word;
1686
1677
  box-sizing: border-box;
1687
1678
  display: block;
1688
1679
  width: 100%;
@@ -1709,7 +1700,7 @@ const StyledSuffix = styled.div `
1709
1700
  font-style: normal;
1710
1701
  font-weight: 400;
1711
1702
  font-size: ${FontSizes.DEFAULT};
1712
- color: Colors.BLACK.Hex;
1703
+ color: ${Colors.BLACK.Hex};
1713
1704
  `;
1714
1705
  const StyledWrapper = styled.div `
1715
1706
  display: flex;
@@ -1738,7 +1729,7 @@ const SuggestedValues = styled.div `
1738
1729
  position: absolute;
1739
1730
  right: -1px;
1740
1731
  top: 39px;
1741
- z-index: 10;
1732
+ z-index: 9999;
1742
1733
  max-height: 220px;
1743
1734
  overflow: auto;
1744
1735
  `;
@@ -1756,7 +1747,6 @@ const SuggestedSummary = styled.div `
1756
1747
  position: sticky;
1757
1748
  top: 0px;
1758
1749
  `;
1759
- //styles for textarea
1760
1750
  const SuggestedValue = styled.div `
1761
1751
  cursor: pointer;
1762
1752
  padding: 8px 12px;
@@ -1787,6 +1777,8 @@ const Input$1 = (_a) => {
1787
1777
  // eslint-disable-next-line @typescript-eslint/no-empty-function
1788
1778
  onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, type = 'text', value = '' } = _a, accessibleProps = __rest(_a, ["format", "suffix", "height", "invalid", "loading", "max", "maxLength", "min", "onBlur", "onChange", "onFocus", "onKeyDown", "onSuggestedSelect", "placeholder", "readOnly", "showCharCount", "step", "style", "suggestedValues", "type", "value"]);
1789
1779
  const [show_options, setShowOptions] = useState(false);
1780
+ const [internalValue, setInternalValue] = useState(value);
1781
+ const [internalSuggestedValues, setInternalSuggestedValues] = useState(suggestedValues || []);
1790
1782
  const formatCurrencyDecimal = (value) => {
1791
1783
  const parts = value.toString().split('.');
1792
1784
  const integerPart = parts[0];
@@ -1795,47 +1787,55 @@ const Input$1 = (_a) => {
1795
1787
  return `${formattedIntegerPart}${decimalPart}`;
1796
1788
  };
1797
1789
  const handleInputChange = (e) => {
1790
+ const newValue = e.target.value;
1798
1791
  if (format === 'currency' || format === 'currency_decimal') {
1799
- e.target.value = e.target.value.replace(/[^0-9.]/g, '');
1792
+ e.target.value = newValue.replace(/[^0-9.]/g, '');
1800
1793
  }
1801
1794
  if (format === 'phone') {
1802
- e.target.value = e.target.value.replace(/[^0-9.]/g, '').substring(0, 10);
1795
+ e.target.value = newValue.replace(/[^0-9.]/g, '').substring(0, 10);
1803
1796
  }
1804
1797
  if (format === 'ssn') {
1805
- e.target.value = e.target.value.replace(/[^0-9]/g, '').substring(0, 9);
1798
+ e.target.value = newValue.replace(/[^0-9]/g, '').substring(0, 9);
1806
1799
  }
1807
1800
  if (type === 'email') {
1808
- e.target.value = e.target.value.toLowerCase();
1801
+ e.target.value = newValue.toLowerCase();
1809
1802
  }
1810
- if (type === 'number' && max && parseInt(e.target.value, 10) > parseInt(max, 10)) {
1803
+ if (type === 'number' && max && parseInt(newValue, 10) > parseInt(max, 10)) {
1811
1804
  e.target.value = `${max}`;
1812
1805
  }
1813
- if (!readOnly && onChange)
1806
+ setInternalValue(e.target.value);
1807
+ if (onChange)
1814
1808
  onChange(e);
1809
+ if (newValue === null || newValue === void 0 ? void 0 : newValue.length) {
1810
+ const newSuggestions = (suggestedValues || []).filter(s => s.toLowerCase().includes(newValue.toLowerCase()));
1811
+ setInternalSuggestedValues(newSuggestions);
1812
+ }
1813
+ else {
1814
+ setInternalSuggestedValues(suggestedValues || []);
1815
+ }
1815
1816
  };
1816
- let formatted_value = value;
1817
+ let formatted_value = internalValue;
1817
1818
  if (format === 'phone') {
1818
- formatted_value = formatAsPhone(value);
1819
+ formatted_value = formatAsPhone(internalValue);
1819
1820
  }
1820
1821
  if (format === 'currency') {
1821
- if (`${value}`.length) {
1822
- formatted_value = Numeral(value).format('$0,0');
1822
+ if (`${internalValue}`.length) {
1823
+ formatted_value = Numeral(internalValue).format('$0,0');
1823
1824
  }
1824
1825
  }
1825
1826
  if (format === 'currency_decimal') {
1826
1827
  formatted_value = formatCurrencyDecimal(formatted_value);
1828
+ formatted_value = formatCurrencyDecimal(formatted_value);
1827
1829
  }
1828
1830
  if (format === 'ssn' && type !== 'password') {
1829
- formatted_value = formatAsSsn(value);
1831
+ formatted_value = formatAsSsn(internalValue);
1830
1832
  }
1831
- return type === 'textarea' ? (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!(suggestedValues === null || suggestedValues === void 0 ? void 0 : suggestedValues.length) },
1833
+ return type === 'textarea' ? (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length },
1832
1834
  React.createElement(StyledTextArea, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, maxLength: maxLength, onBlur: readOnly
1833
1835
  ? e => e.preventDefault()
1834
1836
  : e => {
1835
1837
  if (onBlur)
1836
1838
  onBlur(e);
1837
- // The blur was causing issues with the suggested select event
1838
- // This makes sure the select if fired before the blur
1839
1839
  setTimeout(() => {
1840
1840
  setShowOptions(false);
1841
1841
  }, 100);
@@ -1849,15 +1849,13 @@ const Input$1 = (_a) => {
1849
1849
  loading ? (React.createElement(Loader$1, null,
1850
1850
  React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: mdiLoading, size: '20px', spin: true }))) : null,
1851
1851
  showCharCount ? (React.createElement(CharacterCount, null,
1852
- value.length,
1853
- maxLength ? ` / ${maxLength}` : null)) : null)) : (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!(suggestedValues === null || suggestedValues === void 0 ? void 0 : suggestedValues.length) },
1852
+ internalValue.length,
1853
+ maxLength ? ` / ${maxLength}` : null)) : null)) : (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length },
1854
1854
  React.createElement(StyledInput, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, max: max, maxLength: maxLength, min: min, onBlur: readOnly
1855
1855
  ? e => e.preventDefault()
1856
1856
  : e => {
1857
1857
  if (onBlur)
1858
1858
  onBlur(e);
1859
- // The blur was causing issues with the suggested select event
1860
- // This makes sure the select if fired before the blur
1861
1859
  setTimeout(() => {
1862
1860
  setShowOptions(false);
1863
1861
  }, 100);
@@ -1867,22 +1865,22 @@ const Input$1 = (_a) => {
1867
1865
  setShowOptions(true);
1868
1866
  if (onFocus)
1869
1867
  onFocus(e);
1870
- }, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, placeholder: placeholder, step: step, type: type, value: format === 'currency_decimal' && value ? `$${formatted_value}` : formatted_value }, accessibleProps)),
1868
+ }, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, placeholder: placeholder, step: step, type: type, value: format === 'currency_decimal' && internalValue ? `$${formatted_value}` : formatted_value }, accessibleProps)),
1871
1869
  loading ? (React.createElement(Loader$1, null,
1872
1870
  React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: mdiLoading, size: '20px', spin: true }))) : null,
1873
1871
  showCharCount ? (React.createElement(CharacterCount, null,
1874
- value.length,
1872
+ internalValue.length,
1875
1873
  maxLength ? ` / ${maxLength}` : null)) : null,
1876
1874
  suffix && React.createElement(StyledSuffix, null, suffix),
1877
- show_options && (suggestedValues === null || suggestedValues === void 0 ? void 0 : suggestedValues.length) ? (React.createElement(SuggestedValues, null,
1875
+ show_options && internalSuggestedValues.length ? (React.createElement(SuggestedValues, null,
1878
1876
  React.createElement(SuggestedSummary, null,
1879
- suggestedValues.length,
1877
+ internalSuggestedValues.length,
1880
1878
  " Results Match \"",
1881
- value,
1879
+ internalValue,
1882
1880
  "\""),
1883
- suggestedValues.map((suggestedValue, index) => (React.createElement(SuggestedValue, { key: index, onClick: () => {
1881
+ internalSuggestedValues.map((suggestedValue, index) => (React.createElement(SuggestedValue, { key: index, onClick: () => {
1884
1882
  handleInputChange({ target: { value: suggestedValue } });
1885
- onSuggestedSelect(suggestedValue);
1883
+ onSuggestedSelect();
1886
1884
  setShowOptions(false);
1887
1885
  } }, suggestedValue))))) : null));
1888
1886
  };
@@ -2000,76 +1998,76 @@ const ProgressBar = ({ steps, showStepLine = false }) => {
2000
1998
  })));
2001
1999
  };
2002
2000
 
2003
- const Wrapper$6 = styled.div `
2004
- position: fixed;
2005
- top: 0;
2006
- right: 0;
2007
- bottom: 0;
2008
- left: 0;
2009
- z-index: 9999;
2010
- background: rgba(0, 0, 0, 0.8);
2011
- display: flex;
2012
- align-items: center;
2013
- justify-content: center;
2001
+ const Wrapper$6 = styled.div `
2002
+ position: fixed;
2003
+ top: 0;
2004
+ right: 0;
2005
+ bottom: 0;
2006
+ left: 0;
2007
+ z-index: 9999;
2008
+ background: rgba(0, 0, 0, 0.8);
2009
+ display: flex;
2010
+ align-items: center;
2011
+ justify-content: center;
2014
2012
  `;
2015
- const Container$1 = styled.dialog `
2016
- width: ${props => (props.$fullscreen ? 'calc(100vw - 80px)' : props.$maxWidth || '900px')};
2017
- max-width: calc(100vw - 80px);
2018
- height: ${props => (props.$fullscreen ? 'calc(100vh - 80px)' : 'auto')};
2019
- max-height: calc(100vh - 80px);
2020
- border-radius: 8px;
2021
- overflow: hidden;
2022
- box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
2023
- outline: none;
2024
- border: none;
2025
- position: relative;
2026
- padding: 0px;
2027
- box-sizing: border-box;
2028
- display: flex;
2029
- flex-direction: column;
2013
+ const Container$1 = styled.dialog `
2014
+ width: ${props => (props.$fullscreen ? 'calc(100vw - 80px)' : props.$maxWidth || '900px')};
2015
+ max-width: calc(100vw - 80px);
2016
+ height: ${props => (props.$fullscreen ? 'calc(100vh - 80px)' : 'auto')};
2017
+ max-height: calc(100vh - 80px);
2018
+ border-radius: 8px;
2019
+ overflow: hidden;
2020
+ box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
2021
+ outline: none;
2022
+ border: none;
2023
+ position: relative;
2024
+ padding: 0px;
2025
+ box-sizing: border-box;
2026
+ display: flex;
2027
+ flex-direction: column;
2030
2028
  `;
2031
- const Header$1 = styled.div `
2032
- flex-shrink: 0;
2033
- padding: 20px;
2034
- border-bottom: 1px solid #e7e6e6;
2035
- display: flex;
2036
- align-items: center;
2037
- background: #ffffff;
2038
- box-sizing: border-box;
2029
+ const Header$1 = styled.div `
2030
+ flex-shrink: 0;
2031
+ padding: 20px;
2032
+ border-bottom: 1px solid #e7e6e6;
2033
+ display: flex;
2034
+ align-items: center;
2035
+ background: #ffffff;
2036
+ box-sizing: border-box;
2039
2037
  `;
2040
- const Close = styled.div `
2041
- margin-left: auto;
2042
- display: flex;
2043
- align-items: center;
2044
- padding-left: 20px;
2045
- cursor: pointer;
2038
+ const Close = styled.div `
2039
+ margin-left: auto;
2040
+ display: flex;
2041
+ align-items: center;
2042
+ padding-left: 20px;
2043
+ cursor: pointer;
2046
2044
  `;
2047
- const CloseMsg = styled.span `
2048
- font-size: ${FontSizes.SMALL};
2049
- font-weight: 400;
2050
- font-family: ${FontStyles.DEFAULT};
2051
- line-height: 1em;
2052
- color: ${Colors.MEDIUM_GRAY.Hex};
2045
+ const CloseMsg = styled.span `
2046
+ font-size: ${FontSizes.SMALL};
2047
+ font-weight: 400;
2048
+ font-family: ${FontStyles.DEFAULT};
2049
+ line-height: 1em;
2050
+ color: ${Colors.MEDIUM_GRAY.Hex};
2053
2051
  `;
2054
- const ContentWrapper = styled.div `
2055
- overflow-x: hidden;
2056
- overflow-y: auto;
2057
- background: #ffffff;
2058
- flex: 1;
2059
- box-sizing: border-box;
2052
+ const ContentWrapper = styled.div `
2053
+ overflow-x: hidden;
2054
+ overflow-y: auto;
2055
+ background: #ffffff;
2056
+ flex: 1;
2057
+ box-sizing: border-box;
2060
2058
  `;
2061
- const ButtonBar = styled.div `
2062
- flex-shrink: 0;
2063
- background: #ffffff;
2064
- padding: 20px;
2065
- border-top: 1px solid #e7e6e6;
2066
- display: flex;
2067
- align-items: center;
2068
- justify-self: flex-end;
2069
- box-sizing: border-box;
2059
+ const ButtonBar = styled.div `
2060
+ flex-shrink: 0;
2061
+ background: #ffffff;
2062
+ padding: 20px;
2063
+ border-top: 1px solid #e7e6e6;
2064
+ display: flex;
2065
+ align-items: center;
2066
+ justify-self: flex-end;
2067
+ box-sizing: border-box;
2070
2068
  `;
2071
2069
  const Modal = (_a) => {
2072
- var { children, title, onClose, maxWidth, fullscreen, steps, primaryButton, secondaryButton, tertiaryButton } = _a, accessibleProps = __rest(_a, ["children", "title", "onClose", "maxWidth", "fullscreen", "steps", "primaryButton", "secondaryButton", "tertiaryButton"]);
2070
+ var { children, title, onClose, maxWidth, fullscreen, steps, primaryButton, secondaryButton, tertiaryButton, quarternaryButton } = _a, accessibleProps = __rest(_a, ["children", "title", "onClose", "maxWidth", "fullscreen", "steps", "primaryButton", "secondaryButton", "tertiaryButton", "quarternaryButton"]);
2073
2071
  useEffect(() => {
2074
2072
  document.onkeydown = e => {
2075
2073
  if (e.key === 'Escape') {
@@ -2089,8 +2087,15 @@ const Modal = (_a) => {
2089
2087
  React.createElement(Icon, { color: Colors.BLACK.Hex, path: mdiClose, size: '24px' }))),
2090
2088
  steps ? React.createElement(ProgressBar, { steps: steps }) : null,
2091
2089
  React.createElement(ContentWrapper, null, children),
2092
- primaryButton || secondaryButton || tertiaryButton ? (React.createElement(ButtonBar, null,
2093
- tertiaryButton ? React.createElement(Button, Object.assign({}, tertiaryButton, { format: 'secondary' })) : null,
2090
+ primaryButton || secondaryButton || tertiaryButton || quarternaryButton ? (React.createElement(ButtonBar, null,
2091
+ tertiaryButton || quarternaryButton ? (React.createElement("div", { style: {
2092
+ marginRight: 'auto',
2093
+ paddingRight: 40,
2094
+ display: 'flex',
2095
+ alignItems: 'center',
2096
+ } },
2097
+ tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { format: tertiaryButton.format || 'secondary' }))) : null,
2098
+ quarternaryButton ? (React.createElement(Button, Object.assign({}, quarternaryButton, { format: quarternaryButton.format || 'secondary' }))) : null)) : null,
2094
2099
  primaryButton || secondaryButton ? (React.createElement("div", { style: {
2095
2100
  marginLeft: 'auto',
2096
2101
  paddingLeft: 40,