@hexure/ui 1.13.51 → 1.13.53

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
@@ -1322,67 +1322,67 @@ const Drawer = (_a) => {
1322
1322
  };
1323
1323
 
1324
1324
  const Wrapper$9 = styled.div(props => (Object.assign({ margin: '0px 0px 18px 0px' }, props.$customStyle)));
1325
- const LabelRow = styled.div `
1326
- display: flex;
1327
- align-items: center;
1328
- justify-content: space-between;
1329
- margin: 0 0 4px 0;
1330
- box-sizing: border-box;
1331
- `;
1332
- const Label$2 = styled.label `
1333
- font-size: ${FontSizes.DEFAULT};
1334
- font-weight: 500;
1335
- line-height: 1.3em;
1336
- font-family: ${FontStyles.DEFAULT};
1337
- color: ${Colors.BLACK.Hex};
1338
- display: flex;
1339
- align-items: center;
1340
- `;
1341
- const Required = styled.span `
1342
- color: ${Colors.RED.Hex};
1343
- margin-left: 4px;
1344
- `;
1345
- const Action = styled.span `
1346
- font-size: ${FontSizes.DEFAULT};
1347
- font-weight: 500;
1348
- line-height: 1em;
1349
- font-family: ${FontStyles.DEFAULT};
1350
- color: ${props => props.theme.PRIMARY_COLOR.Hex};
1351
- cursor: pointer;
1325
+ const LabelRow = styled.div `
1326
+ display: flex;
1327
+ align-items: center;
1328
+ justify-content: space-between;
1329
+ margin: 0 0 4px 0;
1330
+ box-sizing: border-box;
1331
+ `;
1332
+ const Label$2 = styled.label `
1333
+ font-size: ${FontSizes.DEFAULT};
1334
+ font-weight: 500;
1335
+ line-height: 1.3em;
1336
+ font-family: ${FontStyles.DEFAULT};
1337
+ color: ${Colors.BLACK.Hex};
1338
+ display: flex;
1339
+ align-items: center;
1340
+ `;
1341
+ const Required = styled.span `
1342
+ color: ${Colors.RED.Hex};
1343
+ margin-left: 4px;
1344
+ `;
1345
+ const Action = styled.span `
1346
+ font-size: ${FontSizes.DEFAULT};
1347
+ font-weight: 500;
1348
+ line-height: 1em;
1349
+ font-family: ${FontStyles.DEFAULT};
1350
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
1351
+ cursor: pointer;
1352
1352
  `;
1353
1353
  Action.defaultProps = { theme: EditableTheme };
1354
- const Description = styled.div `
1355
- font-size: ${FontSizes.SMALL};
1356
- font-weight: 400;
1357
- line-height: 1.3em;
1358
- font-family: ${FontStyles.DEFAULT};
1359
- color: ${Colors.BLACK.Hex};
1360
- margin: 0 0 8px 0;
1361
- box-sizing: border-box;
1362
- `;
1363
- const Validation = styled.div `
1364
- font-size: ${FontSizes.SMALL};
1365
- font-weight: 400;
1366
- line-height: 1.3em;
1367
- font-family: ${FontStyles.DEFAULT};
1368
- color: ${Colors.RED.Hex};
1369
- margin: 4px 0 0 0;
1370
- box-sizing: border-box;
1371
- min-height: 19px;
1372
- `;
1373
- const ValidationNew = styled.span `
1374
- font-size: ${FontSizes.SMALL};
1375
- font-weight: 400;
1376
- line-height: 1.3em;
1377
- font-family: ${FontStyles.DEFAULT};
1378
- color: ${Colors.BLACK.Hex};
1379
- box-sizing: border-box;
1380
- align-items: center;
1381
- display: flex;
1382
- `;
1383
- const ValidationInnerIcon = styled.span `
1384
- padding-right: 5px;
1385
- display: flex;
1354
+ const Description = styled.div `
1355
+ font-size: ${FontSizes.SMALL};
1356
+ font-weight: 400;
1357
+ line-height: 1.3em;
1358
+ font-family: ${FontStyles.DEFAULT};
1359
+ color: ${Colors.BLACK.Hex};
1360
+ margin: 0 0 8px 0;
1361
+ box-sizing: border-box;
1362
+ `;
1363
+ const Validation = styled.div `
1364
+ font-size: ${FontSizes.SMALL};
1365
+ font-weight: 400;
1366
+ line-height: 1.3em;
1367
+ font-family: ${FontStyles.DEFAULT};
1368
+ color: ${Colors.RED.Hex};
1369
+ margin: 4px 0 0 0;
1370
+ box-sizing: border-box;
1371
+ min-height: 19px;
1372
+ `;
1373
+ const ValidationNew = styled.span `
1374
+ font-size: ${FontSizes.SMALL};
1375
+ font-weight: 400;
1376
+ line-height: 1.3em;
1377
+ font-family: ${FontStyles.DEFAULT};
1378
+ color: ${Colors.BLACK.Hex};
1379
+ box-sizing: border-box;
1380
+ align-items: center;
1381
+ display: flex;
1382
+ `;
1383
+ const ValidationInnerIcon = styled.span `
1384
+ padding-right: 5px;
1385
+ display: flex;
1386
1386
  `;
1387
1387
  const ValidationInnerMessage = styled.span ``;
1388
1388
  const MessageWrapper = message => (React.createElement(ValidationNew, null,
@@ -1708,154 +1708,181 @@ const formatAsSsn = (number) => {
1708
1708
  formatted_value = `${formatted_value.substring(0, 3)}-${formatted_value.substring(3, 5)}-${formatted_value.substring(5, 9)}`;
1709
1709
  }
1710
1710
  return formatted_value;
1711
+ };
1712
+ const formatAsMask = (number, mask) => {
1713
+ const formatted_value = `${number}`.replace(/[^0-9.]/g, '');
1714
+ let result = '';
1715
+ const size = formatted_value.length;
1716
+ let valueIndex = 0;
1717
+ if (size > 0) {
1718
+ // Loop through each character of the mask
1719
+ for (let i = 0; i < mask.length; i++) {
1720
+ // Only replace numbers (mask pattern) with the value
1721
+ if (mask[i].match(/\d/)) {
1722
+ // Check if there are still characters left in value to add
1723
+ if (valueIndex < size) {
1724
+ result += formatted_value[valueIndex];
1725
+ valueIndex++;
1726
+ }
1727
+ }
1728
+ else if (valueIndex < size) {
1729
+ // Add non-digit characters (like dashes or spaces) directly to the result
1730
+ result += mask[i];
1731
+ }
1732
+ }
1733
+ }
1734
+ else {
1735
+ result = formatted_value;
1736
+ }
1737
+ return result;
1711
1738
  };
1712
1739
 
1713
- const StyledInput = styled.input `
1714
- border: none !important;
1715
- background: none !important;
1716
- font-size: ${FontSizes.DEFAULT};
1717
- font-weight: 400;
1718
- font-family: ${FontStyles.DEFAULT};
1719
- line-height: 1.28em;
1740
+ const StyledInput = styled.input `
1741
+ border: none !important;
1742
+ background: none !important;
1743
+ font-size: ${FontSizes.DEFAULT};
1744
+ font-weight: 400;
1745
+ font-family: ${FontStyles.DEFAULT};
1746
+ line-height: 1.28em;
1720
1747
  color: ${props => props.$showErrorTextColor && props.$invalid && !props.$readOnly
1721
1748
  ? Colors.RED.Hex
1722
- : Colors.BLACK.Hex};
1723
- position: relative;
1724
- height: ${props => props.$height || 'auto'};
1725
- padding: 10px;
1726
- opacity: ${props => (props.$readOnly ? 0.6 : 1)};
1727
- box-shadow: none;
1728
- outline: none;
1729
- margin: 0px;
1730
- text-indent: 0px;
1731
- --webkit-appearance: none;
1732
- box-sizing: border-box;
1733
- display: block;
1734
- width: 100%;
1735
- `;
1736
- const StyledTextArea = styled.textarea `
1737
- border: none !important;
1738
- background: none !important;
1739
- overflow-y: scroll !important;
1740
- font-size: 14px;
1741
- font-weight: 400;
1742
- height: ${props => props.$height || 'auto'};
1743
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
1744
- line-height: 1.28em;
1749
+ : Colors.BLACK.Hex};
1750
+ position: relative;
1751
+ height: ${props => props.$height || 'auto'};
1752
+ padding: 10px;
1753
+ opacity: ${props => (props.$readOnly ? 0.6 : 1)};
1754
+ box-shadow: none;
1755
+ outline: none;
1756
+ margin: 0px;
1757
+ text-indent: 0px;
1758
+ --webkit-appearance: none;
1759
+ box-sizing: border-box;
1760
+ display: block;
1761
+ width: 100%;
1762
+ `;
1763
+ const StyledTextArea = styled.textarea `
1764
+ border: none !important;
1765
+ background: none !important;
1766
+ overflow-y: scroll !important;
1767
+ font-size: 14px;
1768
+ font-weight: 400;
1769
+ height: ${props => props.$height || 'auto'};
1770
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
1771
+ line-height: 1.28em;
1745
1772
  color: ${props => props.$showErrorTextColor && props.$invalid && !props.$readOnly
1746
1773
  ? Colors.RED.Hex
1747
- : Colors.BLACK.Hex};
1748
- position: relative;
1749
- padding: 10px;
1750
- opacity: 1;
1751
- box-shadow: none;
1752
- outline: none;
1753
- margin: 0px;
1754
- text-indent: 0px;
1755
- --webkit-appearance: none;
1756
- overflow-wrap: break-word;
1757
- box-sizing: border-box;
1758
- display: block;
1759
- width: 100%;
1774
+ : Colors.BLACK.Hex};
1775
+ position: relative;
1776
+ padding: 10px;
1777
+ opacity: 1;
1778
+ box-shadow: none;
1779
+ outline: none;
1780
+ margin: 0px;
1781
+ text-indent: 0px;
1782
+ --webkit-appearance: none;
1783
+ overflow-wrap: break-word;
1784
+ box-sizing: border-box;
1785
+ display: block;
1786
+ width: 100%;
1760
1787
  ${({ $readOnly }) => $readOnly &&
1761
- `
1762
- background-color: #f0f0f0;
1763
- color: #999999;
1764
- overflow-y: scroll;
1765
- `}
1766
- `;
1767
- const StyledSuffix = styled.div `
1768
- box-sizing: border-box;
1769
- border-radius: 0px 4px 4px 0px;
1770
- display: flex;
1771
- justify-content: center;
1772
- align-items: center;
1773
- padding: 10px;
1774
- height: auto;
1775
- background: #f5f5f5;
1776
- border-width: 0px 0px 0px 1px;
1777
- border-style: solid;
1778
- border-color: #cccccc;
1779
- font-family: ${FontStyles.DEFAULT};
1780
- font-style: normal;
1781
- font-weight: 400;
1782
- font-size: ${FontSizes.DEFAULT};
1783
- color: ${Colors.BLACK.Hex};
1784
- `;
1785
- const StyledWrapper = styled.div `
1786
- display: flex;
1787
- width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
1788
- background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
1789
- position: relative;
1790
- border-width: 1px;
1791
- border-style: solid;
1792
- border-color: ${props => (props.$invalid && !props.$readOnly ? Colors.RED.Hex : '#cccccc')};
1793
- border-radius: ${props => (props.$suggestions ? '4px 4px 0px 0px' : '4px')};
1794
-
1795
- &:focus-within {
1796
- border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
1797
- }
1788
+ `
1789
+ background-color: #f0f0f0;
1790
+ color: #999999;
1791
+ overflow-y: scroll;
1792
+ `}
1793
+ `;
1794
+ const StyledSuffix = styled.div `
1795
+ box-sizing: border-box;
1796
+ border-radius: 0px 4px 4px 0px;
1797
+ display: flex;
1798
+ justify-content: center;
1799
+ align-items: center;
1800
+ padding: 10px;
1801
+ height: auto;
1802
+ background: #f5f5f5;
1803
+ border-width: 0px 0px 0px 1px;
1804
+ border-style: solid;
1805
+ border-color: #cccccc;
1806
+ font-family: ${FontStyles.DEFAULT};
1807
+ font-style: normal;
1808
+ font-weight: 400;
1809
+ font-size: ${FontSizes.DEFAULT};
1810
+ color: ${Colors.BLACK.Hex};
1811
+ `;
1812
+ const StyledWrapper = styled.div `
1813
+ display: flex;
1814
+ width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
1815
+ background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
1816
+ position: relative;
1817
+ border-width: 1px;
1818
+ border-style: solid;
1819
+ border-color: ${props => (props.$invalid && !props.$readOnly ? Colors.RED.Hex : '#cccccc')};
1820
+ border-radius: ${props => (props.$suggestions ? '4px 4px 0px 0px' : '4px')};
1821
+
1822
+ &:focus-within {
1823
+ border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
1824
+ }
1798
1825
  `;
1799
1826
  StyledWrapper.defaultProps = { theme: EditableTheme };
1800
- const SuggestedValues = styled.div `
1801
- background: #fff;
1802
- box-shadow: 0px 5px 30px -15px rgba(0, 0, 0, 0.2);
1803
- border-color: ${props => props.theme.PRIMARY_COLOR.Hex};
1804
- border-radius: 0px 0px 4px 4px;
1805
- border-style: solid;
1806
- border-top: none;
1807
- border-width: 1px;
1808
- left: -1px;
1809
- position: absolute;
1810
- right: -1px;
1811
- top: 39px;
1812
- z-index: 9999;
1813
- max-height: 220px;
1814
- overflow: auto;
1827
+ const SuggestedValues = styled.div `
1828
+ background: #fff;
1829
+ box-shadow: 0px 5px 30px -15px rgba(0, 0, 0, 0.2);
1830
+ border-color: ${props => props.theme.PRIMARY_COLOR.Hex};
1831
+ border-radius: 0px 0px 4px 4px;
1832
+ border-style: solid;
1833
+ border-top: none;
1834
+ border-width: 1px;
1835
+ left: -1px;
1836
+ position: absolute;
1837
+ right: -1px;
1838
+ top: 39px;
1839
+ z-index: 9999;
1840
+ max-height: 220px;
1841
+ overflow: auto;
1815
1842
  `;
1816
1843
  SuggestedValues.defaultProps = { theme: EditableTheme };
1817
- const SuggestedSummary = styled.div `
1818
- color: ${Colors.MEDIUM_GRAY.Hex};
1819
- font-size: 12px;
1820
- font-family: ${FontStyles.DEFAULT};
1821
- font-weight: 500;
1822
- line-height: 18px;
1823
- padding: 10px 12px;
1824
- border-bottom: 1px solid #e5e5e5;
1825
- background: #fff;
1826
- z-index: 1;
1827
- position: sticky;
1828
- top: 0px;
1829
- `;
1830
- const SuggestedValue = styled.div `
1831
- cursor: pointer;
1832
- padding: 8px 12px;
1833
- font-size: ${FontSizes.DEFAULT};
1834
- font-family: ${FontStyles.DEFAULT};
1835
- font-weight: 400;
1836
- line-height: 1.6em;
1837
- color: ${Colors.BLACK.Hex};
1838
-
1839
- &:hover {
1840
- background: rgba(${props => props.theme.PRIMARY_COLOR.Rgb}, 0.05);
1841
- }
1844
+ const SuggestedSummary = styled.div `
1845
+ color: ${Colors.MEDIUM_GRAY.Hex};
1846
+ font-size: 12px;
1847
+ font-family: ${FontStyles.DEFAULT};
1848
+ font-weight: 500;
1849
+ line-height: 18px;
1850
+ padding: 10px 12px;
1851
+ border-bottom: 1px solid #e5e5e5;
1852
+ background: #fff;
1853
+ z-index: 1;
1854
+ position: sticky;
1855
+ top: 0px;
1856
+ `;
1857
+ const SuggestedValue = styled.div `
1858
+ cursor: pointer;
1859
+ padding: 8px 12px;
1860
+ font-size: ${FontSizes.DEFAULT};
1861
+ font-family: ${FontStyles.DEFAULT};
1862
+ font-weight: 400;
1863
+ line-height: 1.6em;
1864
+ color: ${Colors.BLACK.Hex};
1865
+
1866
+ &:hover {
1867
+ background: rgba(${props => props.theme.PRIMARY_COLOR.Rgb}, 0.05);
1868
+ }
1842
1869
  `;
1843
1870
  SuggestedValue.defaultProps = { theme: EditableTheme };
1844
- const CharacterCount = styled.div `
1845
- font-family: ${FontStyles.DEFAULT};
1846
- font-size: ${FontSizes.SMALL};
1847
- color: ${Colors.MEDIUM_GRAY.Hex};
1848
- padding: 10px;
1871
+ const CharacterCount = styled.div `
1872
+ font-family: ${FontStyles.DEFAULT};
1873
+ font-size: ${FontSizes.SMALL};
1874
+ color: ${Colors.MEDIUM_GRAY.Hex};
1875
+ padding: 10px;
1849
1876
  `;
1850
- const Loader$1 = styled.div `
1851
- padding: 0px 10px;
1852
- display: flex;
1853
- align-items: center;
1877
+ const Loader$1 = styled.div `
1878
+ padding: 0px 10px;
1879
+ display: flex;
1880
+ align-items: center;
1854
1881
  `;
1855
1882
  const Input$1 = (_a) => {
1856
1883
  var { format, suffix, height, invalid, loading, max, maxLength, min, onBlur, onChange, onFocus, onKeyDown,
1857
1884
  // eslint-disable-next-line @typescript-eslint/no-empty-function
1858
- onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, showErrorTextColor = false, type = 'text', value = '', innerRef = null, tabIndex, isAutoComplete = false, dataItemid } = _a, accessibleProps = __rest(_a, ["format", "suffix", "height", "invalid", "loading", "max", "maxLength", "min", "onBlur", "onChange", "onFocus", "onKeyDown", "onSuggestedSelect", "placeholder", "readOnly", "showCharCount", "step", "style", "suggestedValues", "showErrorTextColor", "type", "value", "innerRef", "tabIndex", "isAutoComplete", "dataItemid"]);
1885
+ onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, showErrorTextColor = false, type = 'text', value = '', innerRef = null, tabIndex, isAutoComplete = false, dataItemid, mask } = _a, accessibleProps = __rest(_a, ["format", "suffix", "height", "invalid", "loading", "max", "maxLength", "min", "onBlur", "onChange", "onFocus", "onKeyDown", "onSuggestedSelect", "placeholder", "readOnly", "showCharCount", "step", "style", "suggestedValues", "showErrorTextColor", "type", "value", "innerRef", "tabIndex", "isAutoComplete", "dataItemid", "mask"]);
1859
1886
  const [show_options, setShowOptions] = React.useState(false);
1860
1887
  const [internalValue, setInternalValue] = React.useState(value);
1861
1888
  const [internalSuggestedValues, setInternalSuggestedValues] = React.useState(suggestedValues || []);
@@ -1927,8 +1954,11 @@ const Input$1 = (_a) => {
1927
1954
  if (format === 'ssn' && type !== 'password') {
1928
1955
  formatted_value = formatAsSsn(internalValue);
1929
1956
  }
1957
+ if (mask && !format) {
1958
+ formatted_value = formatAsMask(internalValue, mask);
1959
+ }
1930
1960
  const baseId = dataItemid || 'input';
1931
- return type === 'textarea' ? (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper` },
1961
+ return type === 'textarea' ? (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper`, style: style },
1932
1962
  React.createElement(StyledTextArea, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, maxLength: maxLength, onBlur: readOnly
1933
1963
  ? e => e.preventDefault()
1934
1964
  : e => {
@@ -1948,7 +1978,7 @@ const Input$1 = (_a) => {
1948
1978
  React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: js.mdiLoading, size: '20px', spin: true }))) : null,
1949
1979
  showCharCount ? (React.createElement(CharacterCount, { "data-itemid": `${baseId}-char-count` },
1950
1980
  internalValue.length,
1951
- maxLength ? ` / ${maxLength}` : null)) : null)) : (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper` },
1981
+ maxLength ? ` / ${maxLength}` : null)) : null)) : (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper`, style: style },
1952
1982
  React.createElement(StyledInput, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, max: max, maxLength: maxLength, min: min, onBlur: readOnly
1953
1983
  ? e => e.preventDefault()
1954
1984
  : e => {
@@ -2042,86 +2072,86 @@ const Loader = ({ dataItemid }) => {
2042
2072
  React.createElement(Path, { d: 'M7.21487 1.2868C7.88431 0.9044 8.73031 0.9044 9.39974 1.2868L9.40283 1.28856L14.4613 4.20761C15.1684 4.598 15.5746 5.33558 15.5746 6.11465V8.99996V11.8853C15.5746 12.6507 15.1632 13.3848 14.4617 13.7721L9.37973 16.7132C8.71029 17.0956 7.86428 17.0956 7.19485 16.7132L7.19088 16.7109L2.11279 13.772C1.40602 13.3816 1 12.6441 1 11.8653V8.98995V6.11465C1 5.31458 1.44381 4.59039 2.10827 4.21051L7.21487 1.2868Z', "data-itemid": `${baseId}-path`, fill: 'none', strokeWidth: '2' })));
2043
2073
  };
2044
2074
 
2045
- const Steps = styled.div `
2046
- padding: 20px;
2047
- border-bottom: 1px solid #e7e6e6;
2048
- background: #f5f5f5;
2049
- display: flex;
2050
- gap: 30px;
2051
- align-items: center;
2052
- `;
2053
- const Step = styled.div `
2054
- display: flex;
2055
- align-items: center;
2056
- gap: 8px;
2057
- `;
2058
- const StyledIcon$2 = styled(Icon) `
2059
- > path {
2060
- fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
2061
- }
2075
+ const Steps = styled.div `
2076
+ padding: 20px;
2077
+ border-bottom: 1px solid #e7e6e6;
2078
+ background: #f5f5f5;
2079
+ display: flex;
2080
+ gap: 30px;
2081
+ align-items: center;
2082
+ `;
2083
+ const Step = styled.div `
2084
+ display: flex;
2085
+ align-items: center;
2086
+ gap: 8px;
2087
+ `;
2088
+ const StyledIcon$2 = styled(Icon) `
2089
+ > path {
2090
+ fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
2091
+ }
2062
2092
  `;
2063
2093
  StyledIcon$2.defaultProps = { theme: EditableTheme };
2064
- const StepIndicator = styled.div `
2065
- width: 30px;
2066
- height: 30px;
2067
- border-radius: 15px;
2068
- background: ${props => (props.$active ? props.theme.PRIMARY_COLOR.Hex : Colors.LIGHT_GRAY.Hex)};
2069
- color: ${props => (props.$active ? '#fff' : Colors.MEDIUM_GRAY.Hex)};
2070
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
2071
- font-size: 14px;
2072
- font-weight: 500;
2073
- line-height: 1;
2074
- display: flex;
2075
- align-items: center;
2076
- justify-content: center;
2077
- flex-shrink: 0;
2094
+ const StepIndicator = styled.div `
2095
+ width: 30px;
2096
+ height: 30px;
2097
+ border-radius: 15px;
2098
+ background: ${props => (props.$active ? props.theme.PRIMARY_COLOR.Hex : Colors.LIGHT_GRAY.Hex)};
2099
+ color: ${props => (props.$active ? '#fff' : Colors.MEDIUM_GRAY.Hex)};
2100
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
2101
+ font-size: 14px;
2102
+ font-weight: 500;
2103
+ line-height: 1;
2104
+ display: flex;
2105
+ align-items: center;
2106
+ justify-content: center;
2107
+ flex-shrink: 0;
2078
2108
  `;
2079
2109
  StepIndicator.defaultProps = { theme: EditableTheme };
2080
- const StepLabel = styled.div `
2081
- color: #000;
2082
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
2083
- font-size: 14px;
2084
- font-weight: 500;
2085
- line-height: 1;
2086
- `;
2087
- const StepLine = styled.div `
2088
- height: 2px;
2089
- flex-grow: 1;
2090
- background-color: ${props => (props.$active ? Colors.PRIMARY.Hex : Colors.MEDIUM_GRAY.Hex)};
2091
- transition: background-color 0.5s ease-in-out;
2092
- `;
2093
- const ProgressBarFill = styled.div `
2094
- width: 110px;
2095
- height: 8px;
2096
- margin-top: 4px;
2097
- background-color: #e7e6e6;
2098
- border-radius: 16px;
2099
- position: relative;
2100
- overflow: hidden;
2101
-
2102
- &::after {
2103
- content: '${props => (props.$percent === 0 ? '0' : props.$percent)}%';
2104
- position: absolute;
2105
- top: 55%;
2106
- left: ${props => props.$percent === 100 ? 'calc(100% - 20px)' : `calc(${props.$percent}% + 10px)`};
2107
- transform: translate(-50%, -50%);
2108
- color: ${props => (props.$percent === 100 ? '#fff' : '#757575')};
2109
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
2110
- font-size: 8px;
2111
- font-weight: 600;
2112
- transition: left 0.5s ease-in-out;
2113
- }
2114
-
2115
- &::before {
2116
- content: '';
2117
- position: absolute;
2118
- top: 0;
2119
- left: 0;
2120
- width: ${props => props.$percent}%;
2121
- height: 100%;
2122
- background-color: #1aa836;
2123
- transition: width 0.5s ease-in-out;
2124
- }
2110
+ const StepLabel = styled.div `
2111
+ color: #000;
2112
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
2113
+ font-size: 14px;
2114
+ font-weight: 500;
2115
+ line-height: 1;
2116
+ `;
2117
+ const StepLine = styled.div `
2118
+ height: 2px;
2119
+ flex-grow: 1;
2120
+ background-color: ${props => (props.$active ? Colors.PRIMARY.Hex : Colors.MEDIUM_GRAY.Hex)};
2121
+ transition: background-color 0.5s ease-in-out;
2122
+ `;
2123
+ const ProgressBarFill = styled.div `
2124
+ width: 110px;
2125
+ height: 8px;
2126
+ margin-top: 4px;
2127
+ background-color: #e7e6e6;
2128
+ border-radius: 16px;
2129
+ position: relative;
2130
+ overflow: hidden;
2131
+
2132
+ &::after {
2133
+ content: '${props => (props.$percent === 0 ? '0' : props.$percent)}%';
2134
+ position: absolute;
2135
+ top: 55%;
2136
+ left: ${props => props.$percent >= 83 ? 'calc(100% - 25px)' : `calc(${props.$percent}% + 10px)`};
2137
+ transform: translate(-50%, -50%);
2138
+ color: ${props => (props.$percent >= 83 ? '#fff' : '#757575')};
2139
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
2140
+ font-size: 8px;
2141
+ font-weight: 600;
2142
+ transition: left 0.5s ease-in-out;
2143
+ }
2144
+
2145
+ &::before {
2146
+ content: '';
2147
+ position: absolute;
2148
+ top: 0;
2149
+ left: 0;
2150
+ width: ${props => props.$percent}%;
2151
+ height: 100%;
2152
+ background-color: #1aa836;
2153
+ transition: width 0.5s ease-in-out;
2154
+ }
2125
2155
  `;
2126
2156
  const ProgressBar = ({ steps, showStepLine = false, dataItemid }) => {
2127
2157
  const baseId = dataItemid || 'progress-bar';
@@ -2796,6 +2826,7 @@ exports.Tag = Tag;
2796
2826
  exports.Toggle = Toggle;
2797
2827
  exports.Tooltip = Tooltip;
2798
2828
  exports.ZeroState = ZeroState;
2829
+ exports.formatAsMask = formatAsMask;
2799
2830
  exports.formatAsPhone = formatAsPhone;
2800
2831
  exports.formatAsSsn = formatAsSsn;
2801
2832
  exports.getAgesFromDob = getAgesFromDob;