@hexure/ui 1.7.0 → 1.8.1

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/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import React, { useRef, useDebugValue, useContext, createElement, useState, useEffect } from 'react';
2
- import Icon from '@mdi/react';
3
- import { mdiChevronUp, mdiChevronDown, mdiLoading, mdiInformationOutline, mdiAlertOctagonOutline, mdiAlertOutline, mdiCheckboxMarkedCircleOutline, mdiClose, mdiMinusCircle, mdiFolderPlusOutline, mdiChevronLeft, mdiChevronRight, mdiCheck } from '@mdi/js';
2
+ import Icon, { Icon as Icon$1 } from '@mdi/react';
3
+ import { mdiChevronUp, mdiChevronDown, mdiLoading, mdiInformationOutline, mdiAlertOctagonOutline, mdiAlertOutline, mdiCheckboxMarkedCircleOutline, mdiDotsHorizontal, mdiClose, mdiMinusCircle, mdiFolderPlusOutline, mdiChevronRight, mdiChevronLeft, mdiCheck } from '@mdi/js';
4
4
  import Numeral from 'numeral';
5
5
  import 'moment';
6
6
 
@@ -20,16 +20,6 @@ PERFORMANCE OF THIS SOFTWARE.
20
20
  ***************************************************************************** */
21
21
  /* global Reflect, Promise */
22
22
 
23
- var __assign = function () {
24
- __assign = Object.assign || function __assign(t) {
25
- for (var s, i = 1, n = arguments.length; i < n; i++) {
26
- s = arguments[i];
27
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
28
- }
29
- return t;
30
- };
31
- return __assign.apply(this, arguments);
32
- };
33
23
  function __rest(s, e) {
34
24
  var t = {};
35
25
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
@@ -38,25 +28,6 @@ function __rest(s, e) {
38
28
  }
39
29
  return t;
40
30
  }
41
- function __spreadArray(to, from, pack) {
42
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
43
- if (ar || !(i in from)) {
44
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
45
- ar[i] = from[i];
46
- }
47
- }
48
- return to.concat(ar || Array.prototype.slice.call(from));
49
- }
50
- function __makeTemplateObject(cooked, raw) {
51
- if (Object.defineProperty) {
52
- Object.defineProperty(cooked, "raw", {
53
- value: raw
54
- });
55
- } else {
56
- cooked.raw = raw;
57
- }
58
- return cooked;
59
- }
60
31
 
61
32
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
62
33
 
@@ -1991,7 +1962,7 @@ var qe = function (e) {
1991
1962
  "production" !== process.env.NODE_ENV && "undefined" != typeof navigator && "ReactNative" === navigator.product && console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native"), "production" !== process.env.NODE_ENV && "test" !== process.env.NODE_ENV && "undefined" != typeof window && (window["__styled-components-init__"] = window["__styled-components-init__"] || 0, 1 === window["__styled-components-init__"] && console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."), window["__styled-components-init__"] += 1);
1992
1963
  var styled = qe;
1993
1964
 
1994
- var Colors = {
1965
+ const Colors = {
1995
1966
  PRIMARY: {
1996
1967
  Hex: '#0193D7',
1997
1968
  Rgb: '1, 147, 215',
@@ -2029,28 +2000,44 @@ var Colors = {
2029
2000
  Rgb: '245, 245, 245',
2030
2001
  },
2031
2002
  };
2032
- var FontStyles = {
2003
+ const FontStyles = {
2033
2004
  DEFAULT: '"Roboto", Helvetica, Arial, sans-serif',
2034
2005
  HEADING: '"Roboto Slab", "Roboto", Helvetica, Arial, sans-serif',
2035
2006
  };
2036
- var FontSizes = {
2007
+ const FontSizes = {
2037
2008
  DEFAULT: '14px',
2038
2009
  SMALL: '13px',
2039
2010
  };
2040
2011
 
2041
- var Header$3 = styled.div(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n box-sizing: border-box;\n background: #f5f5f5;\n border: 1px solid #e5e5e5;\n padding: 14px 20px;\n height: 50px;\n cursor: pointer;\n"], ["\n display: flex;\n align-items: center;\n justify-content: space-between;\n box-sizing: border-box;\n background: #f5f5f5;\n border: 1px solid #e5e5e5;\n padding: 14px 20px;\n height: 50px;\n cursor: pointer;\n"])));
2042
- var Title$1 = styled.div(templateObject_2$n || (templateObject_2$n = __makeTemplateObject(["\n font-size: ", ";\n font-weight: 400;\n color: ", ";\n line-height: 1.6em;\n font-family: ", ";\n box-sizing: border-box;\n"], ["\n font-size: ", ";\n font-weight: 400;\n color: ", ";\n line-height: 1.6em;\n font-family: ", ";\n box-sizing: border-box;\n"])), FontSizes.DEFAULT, Colors.BLACK.Hex, FontStyles.DEFAULT);
2043
- var Accordion = function (_a) {
2044
- var title = _a.title, children = _a.children, open = _a.open, onClick = _a.onClick, accessibleProps = __rest(_a, ["title", "children", "open", "onClick"]);
2012
+ const Header$3 = styled.div `
2013
+ display: flex;
2014
+ align-items: center;
2015
+ justify-content: space-between;
2016
+ box-sizing: border-box;
2017
+ background: #f5f5f5;
2018
+ border: 1px solid #e5e5e5;
2019
+ padding: 14px 20px;
2020
+ height: 50px;
2021
+ cursor: pointer;
2022
+ `;
2023
+ const Title$1 = styled.div `
2024
+ font-size: ${FontSizes.DEFAULT};
2025
+ font-weight: 400;
2026
+ color: ${Colors.BLACK.Hex};
2027
+ line-height: 1.6em;
2028
+ font-family: ${FontStyles.DEFAULT};
2029
+ box-sizing: border-box;
2030
+ `;
2031
+ const Accordion = (_a) => {
2032
+ var { title, children, open, onClick } = _a, accessibleProps = __rest(_a, ["title", "children", "open", "onClick"]);
2045
2033
  return (React.createElement(React.Fragment, null,
2046
- React.createElement(Header$3, __assign({ onClick: onClick }, accessibleProps),
2034
+ React.createElement(Header$3, Object.assign({ onClick: onClick }, accessibleProps),
2047
2035
  React.createElement(Title$1, null, title),
2048
2036
  React.createElement(Icon, { color: Colors.BLACK.Hex, path: open ? mdiChevronUp : mdiChevronDown, size: '24px' })),
2049
2037
  open ? children : null));
2050
- };
2051
- var templateObject_1$q, templateObject_2$n;
2038
+ };
2052
2039
 
2053
- var button_type_mapping = {
2040
+ const button_type_mapping = {
2054
2041
  primary: {
2055
2042
  background_color: Colors.PRIMARY.Hex,
2056
2043
  border_color: Colors.PRIMARY.Hex,
@@ -2073,7 +2060,12 @@ var button_type_mapping = {
2073
2060
  badge_content_color: Colors.RED.Hex,
2074
2061
  },
2075
2062
  };
2076
- var StyledButton = styled.button(templateObject_1$p || (templateObject_1$p = __makeTemplateObject(["\n height: ", ";\n line-height: 1em;\n border-radius: ", ";\n margin: ", ";\n padding: ", ";\n outline: none;\n background: ", ";\n width: ", ";\n cursor: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: ", ";\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n box-sizing: border-box;\n &:hover {\n opacity: ", ";\n }\n"], ["\n height: ", ";\n line-height: 1em;\n border-radius: ", ";\n margin: ", ";\n padding: ", ";\n outline: none;\n background: ", ";\n width: ", ";\n cursor: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: ", ";\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n box-sizing: border-box;\n &:hover {\n opacity: ", ";\n }\n"])), function (props) { return (props.$small ? '30px' : '40px'); }, function (props) { return (props.$small ? '15px' : '20px'); }, function (props) { return props.$margin || '0px'; }, function (props) {
2063
+ const StyledButton = styled.button `
2064
+ height: ${props => (props.$small ? '30px' : '40px')};
2065
+ line-height: 1em;
2066
+ border-radius: ${props => (props.$small ? '15px' : '20px')};
2067
+ margin: ${props => props.$margin || '0px'};
2068
+ padding: ${props => {
2077
2069
  if (props.$hasChildren) {
2078
2070
  if (props.$small) {
2079
2071
  return '0 10px';
@@ -2083,9 +2075,10 @@ var StyledButton = styled.button(templateObject_1$p || (templateObject_1$p = __m
2083
2075
  }
2084
2076
  }
2085
2077
  return '0px';
2086
- }, function (props) {
2087
- return props.$format ? button_type_mapping[props.$format].background_color : Colors.PRIMARY.Hex;
2088
- }, function (props) {
2078
+ }};
2079
+ outline: none;
2080
+ background: ${props => props.$format ? button_type_mapping[props.$format].background_color : Colors.PRIMARY.Hex};
2081
+ width: ${props => {
2089
2082
  if (props.$hasChildren) {
2090
2083
  return 'auto';
2091
2084
  }
@@ -2093,84 +2086,201 @@ var StyledButton = styled.button(templateObject_1$p || (templateObject_1$p = __m
2093
2086
  return '30px';
2094
2087
  }
2095
2088
  return '40px';
2096
- }, function (props) { return (props.$disabled ? 'default' : 'pointer'); }, function (props) { return (props.$disabled ? 0.6 : 0.9); }, function (props) {
2097
- return props.$format ? button_type_mapping[props.$format].border_color : Colors.PRIMARY.Hex;
2098
- }, function (props) { return (props.$disabled ? 0.6 : 1); });
2099
- var Label$4 = styled.span(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-family: ", ";\n font-weight: 500;\n line-height: 1;\n"], ["\n color: ", ";\n font-size: ", ";\n font-family: ", ";\n font-weight: 500;\n line-height: 1;\n"])), function (props) { return (props.$format ? button_type_mapping[props.$format].content_color : '#fff'); }, function (props) { return (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT); }, FontStyles.DEFAULT);
2100
- var StyledIcon$3 = styled.span(templateObject_3$i || (templateObject_3$i = __makeTemplateObject(["\n margin-left: ", ";\n margin-right: ", ";\n display: flex;\n align-items: center;\n box-sizing: border-box;\n"], ["\n margin-left: ", ";\n margin-right: ", ";\n display: flex;\n align-items: center;\n box-sizing: border-box;\n"])), function (props) { return (props.$hasChildren ? '6px' : '0px'); }, function (props) { return (props.$hasChildren ? '-4px' : '0px'); });
2101
- var Badge$1 = styled.span(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n line-height: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 100%;\n background-color: ", ";\n color: ", ";\n font-size: ", ";\n font-weight: 600;\n font-family: ", ";\n letter-spacing: -1px;\n margin-left: ", ";\n margin-right: ", ";\n"], ["\n width: ", ";\n height: ", ";\n line-height: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 100%;\n background-color: ", ";\n color: ", ";\n font-size: ", ";\n font-weight: 600;\n font-family: ", ";\n letter-spacing: -1px;\n margin-left: ", ";\n margin-right: ", ";\n"])), function (props) { return (props.$small ? '20px' : '24px'); }, function (props) { return (props.$small ? '20px' : '24px'); }, function (props) {
2102
- return props.$format ? button_type_mapping[props.$format].badge_bg_color : '#fff';
2103
- }, function (props) {
2104
- return props.$format ? button_type_mapping[props.$format].badge_content_color : Colors.PRIMARY.Hex;
2105
- }, function (props) { return (props.$small ? '10px' : '12px'); }, FontStyles.DEFAULT, function (props) { return (props.$small ? '5px' : '10px'); }, function (props) { return (props.$small ? '-5px' : '-10px'); });
2106
- var Button = function (_a) {
2107
- var badge = _a.badge, children = _a.children, _b = _a.disabled, disabled = _b === void 0 ? false : _b, icon = _a.icon, _c = _a.isForm, isForm = _c === void 0 ? false : _c, _d = _a.loading, loading = _d === void 0 ? false : _d, _e = _a.margin, margin = _e === void 0 ? '' : _e, onClick = _a.onClick, _f = _a.small, small = _f === void 0 ? false : _f, _g = _a.format, format = _g === void 0 ? 'primary' : _g, accessibleProps = __rest(_a, ["badge", "children", "disabled", "icon", "isForm", "loading", "margin", "onClick", "small", "format"]);
2108
- var has_children = children && children.length > 0;
2109
- return (React.createElement(StyledButton, __assign({ "$disabled": disabled || loading, "$format": format, "$hasChildren": !!has_children, "$margin": margin, "$small": small, onClick: disabled || loading ? undefined : onClick, type: isForm ? 'submit' : undefined }, accessibleProps),
2089
+ }};
2090
+ cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
2091
+ display: flex;
2092
+ align-items: center;
2093
+ justify-content: center;
2094
+ opacity: ${props => (props.$disabled ? 0.6 : 0.9)};
2095
+ border-width: 1px;
2096
+ border-style: solid;
2097
+ border-color: ${props => props.$format ? button_type_mapping[props.$format].border_color : Colors.PRIMARY.Hex};
2098
+ box-sizing: border-box;
2099
+ &:hover {
2100
+ opacity: ${props => (props.$disabled ? 0.6 : 1)};
2101
+ }
2102
+ `;
2103
+ const Label$4 = styled.span `
2104
+ color: ${props => (props.$format ? button_type_mapping[props.$format].content_color : '#fff')};
2105
+ font-size: ${props => (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT)};
2106
+ font-family: ${FontStyles.DEFAULT};
2107
+ font-weight: 500;
2108
+ line-height: 1;
2109
+ `;
2110
+ const StyledIcon$3 = styled.span `
2111
+ margin-left: ${props => (props.$hasChildren ? '6px' : '0px')};
2112
+ margin-right: ${props => (props.$hasChildren ? '-4px' : '0px')};
2113
+ display: flex;
2114
+ align-items: center;
2115
+ box-sizing: border-box;
2116
+ `;
2117
+ const Badge$1 = styled.span `
2118
+ width: ${props => (props.$small ? '20px' : '24px')};
2119
+ height: ${props => (props.$small ? '20px' : '24px')};
2120
+ line-height: 1;
2121
+ display: flex;
2122
+ align-items: center;
2123
+ justify-content: center;
2124
+ border-radius: 100%;
2125
+ background-color: ${props => props.$format ? button_type_mapping[props.$format].badge_bg_color : '#fff'};
2126
+ color: ${props => props.$format ? button_type_mapping[props.$format].badge_content_color : Colors.PRIMARY.Hex};
2127
+ font-size: ${props => (props.$small ? '10px' : '12px')};
2128
+ font-weight: 600;
2129
+ font-family: ${FontStyles.DEFAULT};
2130
+ letter-spacing: -1px;
2131
+ margin-left: ${props => (props.$small ? '5px' : '10px')};
2132
+ margin-right: ${props => (props.$small ? '-5px' : '-10px')};
2133
+ `;
2134
+ const Button = (_a) => {
2135
+ var { badge, children, disabled = false, icon, isForm = false, loading = false, margin = '', onClick, small = false, format = 'primary' } = _a, accessibleProps = __rest(_a, ["badge", "children", "disabled", "icon", "isForm", "loading", "margin", "onClick", "small", "format"]);
2136
+ const has_children = children && children.length > 0;
2137
+ return (React.createElement(StyledButton, Object.assign({ "$disabled": disabled || loading, "$format": format, "$hasChildren": !!has_children, "$margin": margin, "$small": small, onClick: disabled || loading ? undefined : onClick, type: isForm ? 'submit' : undefined }, accessibleProps),
2110
2138
  children ? (React.createElement(Label$4, { "$format": format, "$small": small }, children)) : null,
2111
2139
  icon && !badge ? (React.createElement(StyledIcon$3, { "$hasChildren": !!has_children },
2112
2140
  React.createElement(Icon, { color: format ? button_type_mapping[format].content_color : '#fff', path: loading ? mdiLoading : icon, size: small ? '20px' : '24px', spin: loading }))) : null,
2113
2141
  badge && !icon ? (React.createElement(Badge$1, { "$format": format, "$small": small }, badge)) : null));
2114
- };
2115
- var templateObject_1$p, templateObject_2$m, templateObject_3$i, templateObject_4$9;
2142
+ };
2116
2143
 
2117
- var StyledComponent = styled.p(templateObject_1$o || (templateObject_1$o = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n font-weight: ", ";\n font-style: ", ";\n text-decoration: ", ";\n font-family: 'Roboto', Helvetica, Arial, sans-serif;\n margin: ", ";\n padding: ", ";\n text-align: ", ";\n box-sizing: border-box;\n"], ["\n color: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n font-weight: ", ";\n font-style: ", ";\n text-decoration: ", ";\n font-family: 'Roboto', Helvetica, Arial, sans-serif;\n margin: ", ";\n padding: ", ";\n text-align: ", ";\n box-sizing: border-box;\n"])), function (props) { return Colors[props.$color || 'BLACK'].Hex; }, function (props) { return (props.$type === 'small' ? FontSizes.SMALL : FontSizes.DEFAULT); }, function (props) { return (props.$type === 'small' ? '1.5em' : '1.6em'); }, function (props) { return (props.$type === 'small' ? '1px' : '0px'); }, function (props) { return (props.$type === 'bold' ? '500' : '400'); }, function (props) { return (props.$type === 'italic' ? 'italic' : 'normal'); }, function (props) {
2118
- return ['underline', 'line-through'].includes(props.$type) ? props.$type : 'none';
2119
- }, function (props) { return props.$margin || '0px'; }, function (props) { return props.$padding || '0px'; }, function (props) { return props.$align || 'left'; });
2120
- var Copy = function (_a) {
2121
- var children = _a.children, _b = _a.align, align = _b === void 0 ? '' : _b, _c = _a.margin, margin = _c === void 0 ? '' : _c, _d = _a.padding, padding = _d === void 0 ? '' : _d, _e = _a.type, type = _e === void 0 ? 'default' : _e, _f = _a.color, color = _f === void 0 ? 'BLACK' : _f;
2144
+ const StyledComponent = styled.p `
2145
+ color: ${props => Colors[props.$color || 'BLACK'].Hex};
2146
+ font-size: ${props => (props.$type === 'small' ? FontSizes.SMALL : FontSizes.DEFAULT)};
2147
+ line-height: ${props => (props.$type === 'small' ? '1.5em' : '1.6em')};
2148
+ letter-spacing: ${props => (props.$type === 'small' ? '1px' : '0px')};
2149
+ font-weight: ${props => (props.$type === 'bold' ? '500' : '400')};
2150
+ font-style: ${props => (props.$type === 'italic' ? 'italic' : 'normal')};
2151
+ text-decoration: ${props => ['underline', 'line-through'].includes(props.$type) ? props.$type : 'none'};
2152
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
2153
+ margin: ${props => props.$margin || '0px'};
2154
+ padding: ${props => props.$padding || '0px'};
2155
+ text-align: ${props => props.$align || 'left'};
2156
+ box-sizing: border-box;
2157
+ `;
2158
+ const Copy = ({ children, align = '', margin = '', padding = '', type = 'default', color = 'BLACK', }) => {
2122
2159
  return (React.createElement(StyledComponent, { "$align": align, "$color": color, "$margin": margin, "$padding": padding, "$type": type }, children));
2123
2160
  };
2124
2161
  Copy.defaultProps = {
2125
2162
  type: 'default',
2126
- };
2127
- var templateObject_1$o;
2163
+ };
2128
2164
 
2129
- var H1 = styled.h1(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n color: ", ";\n font-size: 30px;\n font-weight: ", ";\n line-height: 1.4em;\n font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;\n margin: ", ";\n padding: ", ";\n box-sizing: border-box;\n"], ["\n color: ", ";\n font-size: 30px;\n font-weight: ", ";\n line-height: 1.4em;\n font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;\n margin: ", ";\n padding: ", ";\n box-sizing: border-box;\n"])), Colors.BLACK.Hex, function (props) { return (props.$bold ? '500' : '400'); }, function (props) { return props.$margin || '0px'; }, function (props) { return props.$padding || '0px'; });
2130
- var H2 = styled.h2(templateObject_2$l || (templateObject_2$l = __makeTemplateObject(["\n color: ", ";\n font-size: 24px;\n font-weight: ", ";\n line-height: 1.33em;\n font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;\n margin: ", ";\n padding: ", ";\n box-sizing: border-box;\n"], ["\n color: ", ";\n font-size: 24px;\n font-weight: ", ";\n line-height: 1.33em;\n font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;\n margin: ", ";\n padding: ", ";\n box-sizing: border-box;\n"])), Colors.BLACK.Hex, function (props) { return (props.$bold ? '500' : '400'); }, function (props) { return props.$margin || '0px'; }, function (props) { return props.$padding || '0px'; });
2131
- var H3 = styled.h3(templateObject_3$h || (templateObject_3$h = __makeTemplateObject(["\n color: ", ";\n font-size: 18px;\n font-weight: ", ";\n line-height: 1.33em;\n font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;\n margin: ", ";\n padding: ", ";\n box-sizing: border-box;\n"], ["\n color: ", ";\n font-size: 18px;\n font-weight: ", ";\n line-height: 1.33em;\n font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;\n margin: ", ";\n padding: ", ";\n box-sizing: border-box;\n"])), Colors.BLACK.Hex, function (props) { return (props.$bold ? '500' : '400'); }, function (props) { return props.$margin || '0px'; }, function (props) { return props.$padding || '0px'; });
2132
- var Heading = function (_a) {
2133
- var bold = _a.bold, children = _a.children, margin = _a.margin, padding = _a.padding, type = _a.type, accessibleProps = __rest(_a, ["bold", "children", "margin", "padding", "type"]);
2165
+ const H1 = styled.h1 `
2166
+ color: ${Colors.BLACK.Hex};
2167
+ font-size: 30px;
2168
+ font-weight: ${props => (props.$bold ? '500' : '400')};
2169
+ line-height: 1.4em;
2170
+ font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;
2171
+ margin: ${props => props.$margin || '0px'};
2172
+ padding: ${props => props.$padding || '0px'};
2173
+ box-sizing: border-box;
2174
+ `;
2175
+ const H2 = styled.h2 `
2176
+ color: ${Colors.BLACK.Hex};
2177
+ font-size: 24px;
2178
+ font-weight: ${props => (props.$bold ? '500' : '400')};
2179
+ line-height: 1.33em;
2180
+ font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;
2181
+ margin: ${props => props.$margin || '0px'};
2182
+ padding: ${props => props.$padding || '0px'};
2183
+ box-sizing: border-box;
2184
+ `;
2185
+ const H3 = styled.h3 `
2186
+ color: ${Colors.BLACK.Hex};
2187
+ font-size: 18px;
2188
+ font-weight: ${props => (props.$bold ? '500' : '400')};
2189
+ line-height: 1.33em;
2190
+ font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;
2191
+ margin: ${props => props.$margin || '0px'};
2192
+ padding: ${props => props.$padding || '0px'};
2193
+ box-sizing: border-box;
2194
+ `;
2195
+ const Heading = (_a) => {
2196
+ var { bold, children, margin, padding, type } = _a, accessibleProps = __rest(_a, ["bold", "children", "margin", "padding", "type"]);
2134
2197
  switch (type) {
2135
2198
  case 'secondary': {
2136
- return (React.createElement(H2, __assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps), children));
2199
+ return (React.createElement(H2, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps), children));
2137
2200
  }
2138
2201
  case 'tertiary': {
2139
- return (React.createElement(H3, __assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps), children));
2202
+ return (React.createElement(H3, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps), children));
2140
2203
  }
2141
2204
  default: {
2142
- return (React.createElement(H1, __assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps), children));
2205
+ return (React.createElement(H1, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps), children));
2143
2206
  }
2144
2207
  }
2145
2208
  };
2146
2209
  Heading.defaultProps = {
2147
2210
  bold: false,
2148
2211
  type: 'primary',
2149
- };
2150
- var templateObject_1$n, templateObject_2$l, templateObject_3$h;
2151
-
2152
- var Wrapper$g = styled.div(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 9999;\n background: rgba(0, 0, 0, 0.8);\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n"], ["\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 9999;\n background: rgba(0, 0, 0, 0.8);\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n"])));
2153
- var Container$3 = styled.dialog(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\n max-width: 600px;\n width: auto;\n border-radius: 8px;\n overflow: hidden;\n box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);\n outline: none;\n border: none;\n position: relative;\n padding: 40px;\n text-align: center;\n box-sizing: border-box;\n"], ["\n max-width: 600px;\n width: auto;\n border-radius: 8px;\n overflow: hidden;\n box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);\n outline: none;\n border: none;\n position: relative;\n padding: 40px;\n text-align: center;\n box-sizing: border-box;\n"])));
2154
- var Buttons = styled.div(templateObject_3$g || (templateObject_3$g = __makeTemplateObject(["\n display: flex;\n gap: 10px;\n align-items: center;\n justify-content: center;\n margin-top: 30px;\n box-sizing: border-box;\n"], ["\n display: flex;\n gap: 10px;\n align-items: center;\n justify-content: center;\n margin-top: 30px;\n box-sizing: border-box;\n"])));
2155
- var ActionDialog = function (_a) {
2156
- var description = _a.description, title = _a.title, primaryButton = _a.primaryButton, secondaryButton = _a.secondaryButton, tertiaryButton = _a.tertiaryButton, accessibleProps = __rest(_a, ["description", "title", "primaryButton", "secondaryButton", "tertiaryButton"]);
2157
- return (React.createElement(Wrapper$g, __assign({}, accessibleProps),
2212
+ };
2213
+
2214
+ const Wrapper$h = styled.div `
2215
+ position: fixed;
2216
+ top: 0;
2217
+ right: 0;
2218
+ bottom: 0;
2219
+ left: 0;
2220
+ z-index: 9999;
2221
+ background: rgba(0, 0, 0, 0.8);
2222
+ display: flex;
2223
+ align-items: center;
2224
+ justify-content: center;
2225
+ box-sizing: border-box;
2226
+ `;
2227
+ const Container$3 = styled.dialog `
2228
+ max-width: 600px;
2229
+ width: auto;
2230
+ border-radius: 8px;
2231
+ overflow: hidden;
2232
+ box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
2233
+ outline: none;
2234
+ border: none;
2235
+ position: relative;
2236
+ padding: 40px;
2237
+ text-align: center;
2238
+ box-sizing: border-box;
2239
+ `;
2240
+ const Buttons = styled.div `
2241
+ display: flex;
2242
+ gap: 10px;
2243
+ align-items: center;
2244
+ justify-content: center;
2245
+ margin-top: 30px;
2246
+ box-sizing: border-box;
2247
+ `;
2248
+ const ActionDialog = (_a) => {
2249
+ var { description, title, primaryButton, secondaryButton, tertiaryButton } = _a, accessibleProps = __rest(_a, ["description", "title", "primaryButton", "secondaryButton", "tertiaryButton"]);
2250
+ return (React.createElement(Wrapper$h, Object.assign({}, accessibleProps),
2158
2251
  React.createElement(Container$3, { open: true },
2159
2252
  title ? (React.createElement(Heading, { margin: '0px 0px 20px 0px', type: 'secondary' }, title)) : null,
2160
2253
  description ? React.createElement(Copy, { align: 'center' }, description) : null,
2161
2254
  primaryButton || secondaryButton || tertiaryButton ? (React.createElement(Buttons, null,
2162
- tertiaryButton ? React.createElement(Button, __assign({}, tertiaryButton, { format: 'secondary' })) : null,
2163
- secondaryButton ? React.createElement(Button, __assign({}, secondaryButton, { format: 'secondary' })) : null,
2164
- primaryButton ? (React.createElement(Button, __assign({}, primaryButton, { format: primaryButton.format === 'red' ? 'red' : 'primary' }))) : null)) : null)));
2165
- };
2166
- var templateObject_1$m, templateObject_2$k, templateObject_3$g;
2167
-
2168
- var Wrapper$f = styled.div(templateObject_1$l || (templateObject_1$l = __makeTemplateObject(["\n border: 1px solid #f1f1f1;\n border-radius: 4px;\n border-left-width: 4px;\n box-shadow: 0px 4px 12px -6px rgba(0, 0, 0, 0.2);\n display: flex;\n align-items: flex-start;\n padding: 20px;\n box-sizing: border-box;\n"], ["\n border: 1px solid #f1f1f1;\n border-radius: 4px;\n border-left-width: 4px;\n box-shadow: 0px 4px 12px -6px rgba(0, 0, 0, 0.2);\n display: flex;\n align-items: flex-start;\n padding: 20px;\n box-sizing: border-box;\n"])));
2169
- var Content$2 = styled.div(templateObject_2$j || (templateObject_2$j = __makeTemplateObject(["\n margin-left: 20px;\n"], ["\n margin-left: 20px;\n"])));
2170
- var Action$1 = styled.div(templateObject_3$f || (templateObject_3$f = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-family: ", ";\n font-weight: 500;\n cursor: pointer;\n margin-top: 6px;\n"], ["\n color: ", ";\n font-size: ", ";\n font-family: ", ";\n font-weight: 500;\n cursor: pointer;\n margin-top: 6px;\n"])), Colors.PRIMARY.Hex, FontSizes.DEFAULT, FontStyles.DEFAULT);
2171
- var Alert = function (_a) {
2172
- var action = _a.action, _b = _a.type, type = _b === void 0 ? 'info' : _b, title = _a.title, description = _a.description, accessibleProps = __rest(_a, ["action", "type", "title", "description"]);
2173
- var type_mapping = {
2255
+ tertiaryButton ? React.createElement(Button, Object.assign({}, tertiaryButton, { format: 'secondary' })) : null,
2256
+ secondaryButton ? React.createElement(Button, Object.assign({}, secondaryButton, { format: 'secondary' })) : null,
2257
+ primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format === 'red' ? 'red' : 'primary' }))) : null)) : null)));
2258
+ };
2259
+
2260
+ const Wrapper$g = styled.div `
2261
+ border: 1px solid #f1f1f1;
2262
+ border-radius: 4px;
2263
+ border-left-width: 4px;
2264
+ box-shadow: 0px 4px 12px -6px rgba(0, 0, 0, 0.2);
2265
+ display: flex;
2266
+ align-items: flex-start;
2267
+ padding: 20px;
2268
+ box-sizing: border-box;
2269
+ `;
2270
+ const Content$3 = styled.div `
2271
+ margin-left: 20px;
2272
+ `;
2273
+ const Action$1 = styled.div `
2274
+ color: ${Colors.PRIMARY.Hex};
2275
+ font-size: ${FontSizes.DEFAULT};
2276
+ font-family: ${FontStyles.DEFAULT};
2277
+ font-weight: 500;
2278
+ cursor: pointer;
2279
+ margin-top: 6px;
2280
+ `;
2281
+ const Alert = (_a) => {
2282
+ var { action, type = 'info', title, description } = _a, accessibleProps = __rest(_a, ["action", "type", "title", "description"]);
2283
+ const type_mapping = {
2174
2284
  info: {
2175
2285
  color: Colors.PRIMARY.Hex,
2176
2286
  icon: mdiInformationOutline,
@@ -2188,90 +2298,237 @@ var Alert = function (_a) {
2188
2298
  icon: mdiCheckboxMarkedCircleOutline,
2189
2299
  },
2190
2300
  };
2191
- return (React.createElement(Wrapper$f, __assign({}, accessibleProps, { style: { borderLeftColor: type_mapping[type].color } }),
2301
+ return (React.createElement(Wrapper$g, Object.assign({}, accessibleProps, { style: { borderLeftColor: type_mapping[type].color } }),
2192
2302
  React.createElement("div", { style: { flexShrink: 0 } },
2193
2303
  React.createElement(Icon, { color: type_mapping[type].color, path: type_mapping[type].icon, size: '30px' })),
2194
- React.createElement(Content$2, null,
2304
+ React.createElement(Content$3, null,
2195
2305
  title ? (React.createElement(Heading, { bold: true, margin: '2px 0 0 0', type: 'tertiary' }, title)) : null,
2196
2306
  description ? React.createElement(Copy, { margin: '6px 0 0 0 !important' }, description) : null,
2197
2307
  action ? React.createElement(Action$1, { onClick: action.onClick }, action.label) : null)));
2198
- };
2199
- var templateObject_1$l, templateObject_2$j, templateObject_3$f;
2200
-
2201
- var Wrapper$e = styled.div(templateObject_1$k || (templateObject_1$k = __makeTemplateObject(["\n border: 1px solid ", ";\n border-radius: 8px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n"], ["\n border: 1px solid ", ";\n border-radius: 8px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n"])), Colors.PRIMARY.Hex);
2202
- var Left = styled.div(templateObject_2$i || (templateObject_2$i = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n"], ["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n"])));
2203
- var Info = styled.div(templateObject_3$e || (templateObject_3$e = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n margin-right: 30px;\n"], ["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n margin-right: 30px;\n"])));
2204
- var Selected = styled.span(templateObject_4$8 || (templateObject_4$8 = __makeTemplateObject(["\n font-size: 14px;\n font-weight: 400;\n font-family: ", ";\n color: ", ";\n line-height: 1;\n"], ["\n font-size: 14px;\n font-weight: 400;\n font-family: ", ";\n color: ", ";\n line-height: 1;\n"])), FontStyles.DEFAULT, Colors.BLACK.Hex);
2205
- var Clear = styled.span(templateObject_5$6 || (templateObject_5$6 = __makeTemplateObject(["\n font-size: 14px;\n font-weight: 400;\n font-family: ", ";\n color: ", ";\n line-height: 1;\n cursor: pointer;\n padding-left: 10px;\n margin-left: 10px;\n border-left: 1px solid #ccc;\n"], ["\n font-size: 14px;\n font-weight: 400;\n font-family: ", ";\n color: ", ";\n line-height: 1;\n cursor: pointer;\n padding-left: 10px;\n margin-left: 10px;\n border-left: 1px solid #ccc;\n"])), FontStyles.DEFAULT, Colors.PRIMARY.Hex);
2206
- var Actions = styled.div(templateObject_6$4 || (templateObject_6$4 = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n column-gap: 10px;\n"], ["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n column-gap: 10px;\n"])));
2207
- var Error$1 = styled.div(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n background: rgba(", ", 0.1);\n border-radius: 4px;\n padding: 6px 8px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n margin-left: 30px;\n"], ["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n background: rgba(", ", 0.1);\n border-radius: 4px;\n padding: 6px 8px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n margin-left: 30px;\n"])), Colors.RED.Rgb);
2208
- var ErrorMsg = styled.span(templateObject_8$2 || (templateObject_8$2 = __makeTemplateObject(["\n font-size: 14px;\n font-weight: 500;\n font-family: ", ";\n line-height: 1em;\n color: ", ";\n margin-left: 8px;\n"], ["\n font-size: 14px;\n font-weight: 500;\n font-family: ", ";\n line-height: 1em;\n color: ", ";\n margin-left: 8px;\n"])), FontStyles.DEFAULT, Colors.RED.Hex);
2209
- var BulkActionBar = function (_a) {
2210
- var _b = _a.actions, actions = _b === void 0 ? [] : _b, errorMsg = _a.errorMsg, onClear = _a.onClear, _c = _a.selectedCount, selectedCount = _c === void 0 ? 0 : _c, accessibleProps = __rest(_a, ["actions", "errorMsg", "onClear", "selectedCount"]);
2211
- return (React.createElement(Wrapper$e, __assign({}, accessibleProps),
2308
+ };
2309
+
2310
+ const Wrapper$f = styled.div `
2311
+ border: 1px solid ${Colors.PRIMARY.Hex};
2312
+ border-radius: 8px;
2313
+ box-sizing: border-box;
2314
+ display: flex;
2315
+ align-items: center;
2316
+ justify-content: space-between;
2317
+ padding: 16px 20px;
2318
+ `;
2319
+ const Left = styled.div `
2320
+ box-sizing: border-box;
2321
+ display: flex;
2322
+ align-items: center;
2323
+ justify-content: space-between;
2324
+ flex-shrink: 0;
2325
+ `;
2326
+ const Info$1 = styled.div `
2327
+ box-sizing: border-box;
2328
+ display: flex;
2329
+ align-items: center;
2330
+ margin-right: 30px;
2331
+ `;
2332
+ const Selected = styled.span `
2333
+ font-size: 14px;
2334
+ font-weight: 400;
2335
+ font-family: ${FontStyles.DEFAULT};
2336
+ color: ${Colors.BLACK.Hex};
2337
+ line-height: 1;
2338
+ `;
2339
+ const Clear = styled.span `
2340
+ font-size: 14px;
2341
+ font-weight: 400;
2342
+ font-family: ${FontStyles.DEFAULT};
2343
+ color: ${Colors.PRIMARY.Hex};
2344
+ line-height: 1;
2345
+ cursor: pointer;
2346
+ padding-left: 10px;
2347
+ margin-left: 10px;
2348
+ border-left: 1px solid #ccc;
2349
+ `;
2350
+ const Actions$1 = styled.div `
2351
+ box-sizing: border-box;
2352
+ display: flex;
2353
+ align-items: center;
2354
+ column-gap: 10px;
2355
+ `;
2356
+ const Error$1 = styled.div `
2357
+ box-sizing: border-box;
2358
+ display: flex;
2359
+ align-items: center;
2360
+ background: rgba(${Colors.RED.Rgb}, 0.1);
2361
+ border-radius: 4px;
2362
+ padding: 6px 8px;
2363
+ text-overflow: ellipsis;
2364
+ white-space: nowrap;
2365
+ overflow: hidden;
2366
+ margin-left: 30px;
2367
+ `;
2368
+ const ErrorMsg = styled.span `
2369
+ font-size: 14px;
2370
+ font-weight: 500;
2371
+ font-family: ${FontStyles.DEFAULT};
2372
+ line-height: 1em;
2373
+ color: ${Colors.RED.Hex};
2374
+ margin-left: 8px;
2375
+ `;
2376
+ const BulkActionBar = (_a) => {
2377
+ var { actions = [], errorMsg, onClear, selectedCount = 0 } = _a, accessibleProps = __rest(_a, ["actions", "errorMsg", "onClear", "selectedCount"]);
2378
+ return (React.createElement(Wrapper$f, Object.assign({}, accessibleProps),
2212
2379
  React.createElement(Left, null,
2213
- React.createElement(Info, null,
2380
+ React.createElement(Info$1, null,
2214
2381
  React.createElement(Selected, null,
2215
2382
  selectedCount,
2216
2383
  " Selected"),
2217
2384
  onClear ? React.createElement(Clear, { onClick: onClear }, "Clear") : null),
2218
- React.createElement(Actions, null, actions.map(function (action) { return (React.createElement(Button, __assign({}, action, { small: true }))); }))),
2385
+ React.createElement(Actions$1, null, actions.map(action => (React.createElement(Button, Object.assign({}, action, { small: true })))))),
2219
2386
  errorMsg ? (React.createElement(Error$1, null,
2220
2387
  React.createElement(Icon, { color: Colors.RED.Hex, path: mdiInformationOutline, size: '20px' }),
2221
2388
  React.createElement(ErrorMsg, null, errorMsg))) : null));
2222
- };
2223
- var templateObject_1$k, templateObject_2$i, templateObject_3$e, templateObject_4$8, templateObject_5$6, templateObject_6$4, templateObject_7$2, templateObject_8$2;
2224
-
2225
- var Wrapper$d = styled.label(templateObject_1$j || (templateObject_1$j = __makeTemplateObject(["\n padding: 4px 0;\n cursor: ", ";\n display: flex;\n align-items: flex-start;\n font-size: ", ";\n line-height: 1.6em;\n box-sizing: border-box;\n"], ["\n padding: 4px 0;\n cursor: ", ";\n display: flex;\n align-items: flex-start;\n font-size: ", ";\n line-height: 1.6em;\n box-sizing: border-box;\n"])), function (props) { return (props.$disabled ? 'default' : 'pointer'); }, FontSizes.DEFAULT);
2226
- var Input$2 = styled.input(templateObject_2$h || (templateObject_2$h = __makeTemplateObject(["\n font-size: 20px;\n margin: 5px 0px 0px 0px;\n line-height: 1.1em;\n box-sizing: border-box;\n"], ["\n font-size: 20px;\n margin: 5px 0px 0px 0px;\n line-height: 1.1em;\n box-sizing: border-box;\n"])));
2227
- var Label$3 = styled.span(templateObject_3$d || (templateObject_3$d = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n line-height: 1.6em;\n color: ", ";\n margin-left: 6px;\n box-sizing: border-box;\n"], ["\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n line-height: 1.6em;\n color: ", ";\n margin-left: 6px;\n box-sizing: border-box;\n"])), FontStyles.DEFAULT, FontSizes.DEFAULT, Colors.BLACK.Hex);
2228
- var Checkbox = function (_a) {
2229
- var children = _a.children, disabled = _a.disabled, checked = _a.checked, onChange = _a.onChange, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange"]);
2230
- return (React.createElement(Wrapper$d, __assign({}, accessibleProps),
2389
+ };
2390
+
2391
+ const Wrapper$e = styled.div `
2392
+ background: #fff;
2393
+ border-radius: 8px;
2394
+ box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
2395
+ display: flex;
2396
+ flex-direction: column;
2397
+ gap: 4px;
2398
+ max-height: ${props => props.$maxHeight || '312px'};
2399
+ padding: 10px;
2400
+ width: 200px;
2401
+ `;
2402
+ const MenuItem = styled.div `
2403
+ align-items: center;
2404
+ border-radius: 8px;
2405
+ border: 1px solid transparent;
2406
+ display: flex;
2407
+ gap: 8px;
2408
+ height: 38px;
2409
+ padding: 8px;
2410
+ &:hover {
2411
+ background: rgba(1, 147, 215, 0.1);
2412
+ cursor: pointer;
2413
+
2414
+ svg,
2415
+ path {
2416
+ fill: ${Colors.PRIMARY.Hex} !important;
2417
+ }
2418
+ }
2419
+ `;
2420
+ const Title = styled.span `
2421
+ font-family: Roboto;
2422
+ font-size: 14px;
2423
+ font-weight: 400;
2424
+ height: auto;
2425
+ letter-spacing: 0px;
2426
+ line-height: 22px;
2427
+ text-align: left;
2428
+ `;
2429
+ const MoreMenu = (_a) => {
2430
+ var { maxHeight, menuItems = [] } = _a, accessibleProps = __rest(_a, ["maxHeight", "menuItems"]);
2431
+ return (React.createElement(Wrapper$e, Object.assign({ "$maxHeight": maxHeight }, accessibleProps), menuItems.map((item) => {
2432
+ return (React.createElement(MenuItem, { onClick: item.onClick },
2433
+ item.icon ? (React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: item.icon, size: '20px' })) : null,
2434
+ React.createElement(Title, null, item.label)));
2435
+ })));
2436
+ };
2437
+
2438
+ const Wrapper$d = styled.div `
2439
+ position: relative;
2440
+ display: inline-block;
2441
+ `;
2442
+ const StyledMoreMenu = styled(MoreMenu) `
2443
+ position: absolute;
2444
+ right: ${props => (props.$position === 'right' ? '0px' : 'auto')};
2445
+ left: ${props => (props.$position === 'left' ? '0px' : 'auto')};
2446
+ top: ${props => (props.$small ? '30px' : '40px')};
2447
+ z-index: 10;
2448
+ `;
2449
+ const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = 'right', }) => {
2450
+ const [show_menu, toggleMenu] = useState(false);
2451
+ return (React.createElement(Wrapper$d, { onMouseEnter: disabled ? undefined : toggleMenu.bind(null, true), onMouseLeave: disabled ? undefined : toggleMenu.bind(null, false) },
2452
+ React.createElement(Button, { disabled: disabled, format: 'primary', icon: mdiDotsHorizontal, small: small }, label),
2453
+ show_menu ? (React.createElement(StyledMoreMenu, { "$position": position, "$small": small, maxHeight: maxHeight, menuItems: menuItems })) : null));
2454
+ };
2455
+
2456
+ const Wrapper$c = styled.label `
2457
+ padding: 4px 0;
2458
+ cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
2459
+ display: flex;
2460
+ align-items: flex-start;
2461
+ font-size: ${FontSizes.DEFAULT};
2462
+ line-height: 1.6em;
2463
+ box-sizing: border-box;
2464
+ `;
2465
+ const Input$2 = styled.input `
2466
+ font-size: 20px;
2467
+ margin: 5px 0px 0px 0px;
2468
+ line-height: 1.1em;
2469
+ box-sizing: border-box;
2470
+ `;
2471
+ const Label$3 = styled.span `
2472
+ font-family: ${FontStyles.DEFAULT};
2473
+ font-size: ${FontSizes.DEFAULT};
2474
+ font-weight: 400;
2475
+ line-height: 1.6em;
2476
+ color: ${Colors.BLACK.Hex};
2477
+ margin-left: 6px;
2478
+ box-sizing: border-box;
2479
+ `;
2480
+ const Checkbox = (_a) => {
2481
+ var { children, disabled, checked, onChange } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange"]);
2482
+ return (React.createElement(Wrapper$c, Object.assign({}, accessibleProps),
2231
2483
  React.createElement(Input$2, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'checkbox' }),
2232
2484
  children ? React.createElement(Label$3, null, children) : null));
2233
- };
2234
- var templateObject_1$j, templateObject_2$h, templateObject_3$d;
2235
-
2236
- var SelectAll = styled.div(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n padding: 8px 12px;\n border-bottom: 1px solid ", ";\n box-sizing: border-box;\n"], ["\n padding: 8px 12px;\n border-bottom: 1px solid ", ";\n box-sizing: border-box;\n"])), Colors.LIGHT_GRAY.Hex);
2237
- var Options$1 = styled.div(templateObject_2$g || (templateObject_2$g = __makeTemplateObject(["\n padding: 12px;\n box-sizing: border-box;\n"], ["\n padding: 12px;\n box-sizing: border-box;\n"])));
2238
- var Checklist = function (_a) {
2239
- var disabled = _a.disabled, onChange = _a.onChange, options = _a.options, _b = _a.selected, selected = _b === void 0 ? [] : _b, showSelectAll = _a.showSelectAll, accessibleProps = __rest(_a, ["disabled", "onChange", "options", "selected", "showSelectAll"]);
2240
- var values = options.map(function (option) { return option.value; });
2241
- var selected_options = options.filter(function (o) { return selected.includes(o.value); });
2242
- var handleToggleAll = function () {
2485
+ };
2486
+
2487
+ const SelectAll = styled.div `
2488
+ padding: 8px 12px;
2489
+ border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
2490
+ box-sizing: border-box;
2491
+ `;
2492
+ const Options$1 = styled.div `
2493
+ padding: 12px;
2494
+ box-sizing: border-box;
2495
+ `;
2496
+ const Checklist = (_a) => {
2497
+ var { disabled, onChange, options, selected = [], showSelectAll } = _a, accessibleProps = __rest(_a, ["disabled", "onChange", "options", "selected", "showSelectAll"]);
2498
+ const values = options.map((option) => option.value);
2499
+ const selected_options = options.filter(o => selected.includes(o.value));
2500
+ const handleToggleAll = () => {
2243
2501
  if (selected_options.length === options.length) {
2244
2502
  triggerChange([]);
2245
2503
  }
2246
2504
  else {
2247
- triggerChange(options.map(function (option) { return option.value; }));
2505
+ triggerChange(options.map((option) => option.value));
2248
2506
  }
2249
2507
  };
2250
- var handleChange = function (option) {
2251
- var new_selected = selected_options.filter(function (o) { return o.value !== option.value; }).map(function (o) { return o.value; });
2508
+ const handleChange = (option) => {
2509
+ const new_selected = selected_options.filter(o => o.value !== option.value).map(o => o.value);
2252
2510
  if (!selected.includes(option.value)) {
2253
2511
  new_selected.push(option.value);
2254
2512
  }
2255
2513
  // Mimic input event so it's easier to share onChange methods
2256
2514
  triggerChange(new_selected);
2257
2515
  };
2258
- var triggerChange = function (value) {
2516
+ const triggerChange = (value) => {
2259
2517
  onChange({
2260
2518
  target: {
2261
- value: value,
2519
+ value,
2262
2520
  },
2263
2521
  });
2264
2522
  };
2265
2523
  return (React.createElement(React.Fragment, null,
2266
2524
  showSelectAll && values.length ? (React.createElement(SelectAll, null,
2267
2525
  React.createElement(Checkbox, { checked: selected.length === values.length, disabled: disabled, onChange: handleToggleAll }, "Select All"))) : null,
2268
- React.createElement(Options$1, null, options.map(function (option, i) {
2269
- var label = "".concat(option.label || option.value);
2270
- var checked = selected.includes(option.value);
2271
- return (React.createElement(Checkbox, __assign({ key: i }, accessibleProps, { checked: checked, disabled: disabled, onChange: handleChange.bind(null, option) }), label));
2526
+ React.createElement(Options$1, null, options.map((option, i) => {
2527
+ const label = `${option.label || option.value}`;
2528
+ const checked = selected.includes(option.value);
2529
+ return (React.createElement(Checkbox, Object.assign({ key: i }, accessibleProps, { checked: checked, disabled: disabled, onChange: handleChange.bind(null, option) }), label));
2272
2530
  }))));
2273
- };
2274
- var templateObject_1$i, templateObject_2$g;
2531
+ };
2275
2532
 
2276
2533
  var dayjs_min = {exports: {}};
2277
2534
 
@@ -2591,51 +2848,82 @@ var dayjs_min = {exports: {}};
2591
2848
  var dayjs_minExports = dayjs_min.exports;
2592
2849
  var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
2593
2850
 
2594
- var Wrapper$c = styled.div(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n border-radius: 4px;\n height: 40px;\n background-color: ", ";\n position: relative;\n cursor: pointer;\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n border-radius: ", ";\n flex-grow: ", ";\n box-sizing: border-box;\n padding: 10px 0px;\n display: flex;\n align-items: center;\n width: ", ";\n"], ["\n border-radius: 4px;\n height: 40px;\n background-color: ", ";\n position: relative;\n cursor: pointer;\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n border-radius: ", ";\n flex-grow: ", ";\n box-sizing: border-box;\n padding: 10px 0px;\n display: flex;\n align-items: center;\n width: ", ";\n"])), function (props) { return (props.$readOnly ? '#f5f5f5' : '#ffffff'); }, function (props) { return (props.$invalid ? Colors.RED.Hex : '#cccccc'); }, function (_a) {
2595
- var $style = _a.$style;
2596
- return ($style === null || $style === void 0 ? void 0 : $style.borderRadius) || '4px';
2597
- }, function (_a) {
2598
- var $style = _a.$style;
2599
- return ($style === null || $style === void 0 ? void 0 : $style.flexGrow) || 0;
2600
- }, function (_a) {
2601
- var $style = _a.$style;
2602
- return ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto';
2603
- });
2604
- var Trigger$1 = styled.select(templateObject_2$f || (templateObject_2$f = __makeTemplateObject(["\n appearance: none;\n box-shadow: none;\n outline: none;\n border: none;\n color: ", ";\n font-size: ", ";\n font-weight: 400;\n font-family: ", ";\n line-height: 2.9em;\n background-color: transparent;\n background-image: none;\n cursor: pointer;\n width: 100%;\n box-sizing: border-box;\n padding: 0px 30px 0px 10px;\n box-sizing: border-box;\n position: relative;\n z-index: 2;\n"], ["\n appearance: none;\n box-shadow: none;\n outline: none;\n border: none;\n color: ", ";\n font-size: ", ";\n font-weight: 400;\n font-family: ", ";\n line-height: 2.9em;\n background-color: transparent;\n background-image: none;\n cursor: pointer;\n width: 100%;\n box-sizing: border-box;\n padding: 0px 30px 0px 10px;\n box-sizing: border-box;\n position: relative;\n z-index: 2;\n"])), Colors.BLACK.Hex, FontSizes.DEFAULT, FontStyles.DEFAULT);
2605
- var IconWrapper$2 = styled(Icon)(templateObject_3$c || (templateObject_3$c = __makeTemplateObject(["\n position: absolute;\n right: 9px;\n z-index: 1;\n"], ["\n position: absolute;\n right: 9px;\n z-index: 1;\n"])));
2606
- var Select = function (_a) {
2607
- var options = _a.options, optionGroups = _a.optionGroups, placeholder = _a.placeholder, readOnly = _a.readOnly, invalid = _a.invalid, value = _a.value, onChange = _a.onChange, style = _a.style, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "value", "onChange", "style"]);
2608
- return (React.createElement(Wrapper$c, { "$invalid": invalid, "$readOnly": readOnly, "$style": style },
2609
- React.createElement(Trigger$1, __assign({ disabled: readOnly, onChange: onChange, placeholder: placeholder, value: value }, accessibleProps),
2851
+ const Wrapper$b = styled.div `
2852
+ border-radius: 4px;
2853
+ height: 40px;
2854
+ background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
2855
+ position: relative;
2856
+ cursor: pointer;
2857
+ border-width: 1px;
2858
+ border-style: solid;
2859
+ border-color: ${props => (props.$invalid ? Colors.RED.Hex : '#cccccc')};
2860
+ border-radius: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.borderRadius) || '4px'};
2861
+ flex-grow: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.flexGrow) || 0};
2862
+ box-sizing: border-box;
2863
+ padding: 10px 0px;
2864
+ display: flex;
2865
+ align-items: center;
2866
+ width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
2867
+ `;
2868
+ const Trigger$1 = styled.select `
2869
+ appearance: none;
2870
+ box-shadow: none;
2871
+ outline: none;
2872
+ border: none;
2873
+ color: ${Colors.BLACK.Hex};
2874
+ font-size: ${FontSizes.DEFAULT};
2875
+ font-weight: 400;
2876
+ font-family: ${FontStyles.DEFAULT};
2877
+ line-height: 2.9em;
2878
+ background-color: transparent;
2879
+ background-image: none;
2880
+ cursor: pointer;
2881
+ width: 100%;
2882
+ box-sizing: border-box;
2883
+ padding: 0px 30px 0px 10px;
2884
+ box-sizing: border-box;
2885
+ position: relative;
2886
+ z-index: 2;
2887
+ `;
2888
+ const IconWrapper$2 = styled(Icon) `
2889
+ position: absolute;
2890
+ right: 9px;
2891
+ z-index: 1;
2892
+ `;
2893
+ const Select = (_a) => {
2894
+ var { options, optionGroups, placeholder, readOnly, invalid, value, onChange, style } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "value", "onChange", "style"]);
2895
+ return (React.createElement(Wrapper$b, { "$invalid": invalid, "$readOnly": readOnly, "$style": style },
2896
+ React.createElement(Trigger$1, Object.assign({ disabled: readOnly, onChange: onChange, placeholder: placeholder, value: value }, accessibleProps),
2610
2897
  placeholder ? (React.createElement("option", { disabled: true, value: '' }, placeholder)) : null,
2611
2898
  optionGroups &&
2612
- optionGroups.map(function (group, i) {
2613
- return (React.createElement("optgroup", { key: i, label: group.label || "Group ".concat(i) }, group.options.map(function (option, i) {
2899
+ optionGroups.map((group, i) => {
2900
+ return (React.createElement("optgroup", { key: i, label: group.label || `Group ${i}` }, group.options.map((option, i) => {
2614
2901
  return (React.createElement("option", { key: i, value: option.value }, option.label || option.value));
2615
2902
  })));
2616
2903
  }),
2617
2904
  options &&
2618
- options.map(function (option, i) {
2905
+ options.map((option, i) => {
2619
2906
  return (React.createElement("option", { key: i, value: option.value }, option.label || option.value));
2620
2907
  })),
2621
2908
  React.createElement(IconWrapper$2, { color: Colors.BLACK.Hex, path: mdiChevronDown, size: '22px' })));
2622
- };
2623
- var templateObject_1$h, templateObject_2$f, templateObject_3$c;
2624
-
2625
- var DatePickerWrapper = styled.div(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n display: flex;\n width: ", ";\n"], ["\n display: flex;\n width: ", ";\n"])), function (_a) {
2626
- var $style = _a.$style;
2627
- return ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto';
2628
- });
2629
- var Middle = styled.div(templateObject_2$e || (templateObject_2$e = __makeTemplateObject(["\n margin: 0px -1px;\n flex-grow: 1;\n"], ["\n margin: 0px -1px;\n flex-grow: 1;\n"])));
2630
- var DatePicker = function (_a) {
2631
- var _b = _a.readOnly, readOnly = _b === void 0 ? false : _b, _c = _a.invalid, invalid = _c === void 0 ? false : _c, _d = _a.maxDate, maxDate = _d === void 0 ? null : _d, _e = _a.minDate, minDate = _e === void 0 ? null : _e, date = _a.date, onChange = _a.onChange, style = _a.style;
2632
- var dMaxDate = maxDate ? dayjs(maxDate) : dayjs();
2633
- var dMinDate = minDate ? dayjs(minDate) : dMaxDate.subtract(100, 'year');
2634
- var _f = useState(dayjs(date)), dDate = _f[0], setDate = _f[1];
2635
- var _g = useState(Array.from({ length: dDate.daysInMonth() - 1 }, function (_, i) { return ({
2909
+ };
2910
+
2911
+ const DatePickerWrapper = styled.div `
2912
+ display: flex;
2913
+ width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
2914
+ `;
2915
+ const Middle = styled.div `
2916
+ margin: 0px -1px;
2917
+ flex-grow: 1;
2918
+ `;
2919
+ const DatePicker = ({ readOnly = false, invalid = false, maxDate = null, minDate = null, date, onChange, style, }) => {
2920
+ const dMaxDate = maxDate ? dayjs(maxDate) : dayjs();
2921
+ const dMinDate = minDate ? dayjs(minDate) : dMaxDate.subtract(100, 'year');
2922
+ const [dDate, setDate] = useState(dayjs(date));
2923
+ const [dayOptions, setDayOptions] = useState(Array.from({ length: dDate.daysInMonth() - 1 }, (_, i) => ({
2636
2924
  value: i + 1,
2637
- }); })), dayOptions = _g[0], setDayOptions = _g[1];
2638
- var months = [
2925
+ })));
2926
+ const months = [
2639
2927
  { label: 'January', value: 1 },
2640
2928
  { label: 'Feburary', value: 2 },
2641
2929
  { label: 'March', value: 3 },
@@ -2649,14 +2937,14 @@ var DatePicker = function (_a) {
2649
2937
  { label: 'November', value: 11 },
2650
2938
  { label: 'December', value: 12 },
2651
2939
  ];
2652
- var years = Array.from({ length: dMaxDate.year() - dMinDate.year() + 1 }, function (_, i) { return ({
2940
+ const years = Array.from({ length: dMaxDate.year() - dMinDate.year() + 1 }, (_, i) => ({
2653
2941
  label: (dMinDate.year() + i).toString(),
2654
2942
  value: dMinDate.year() + i,
2655
- }); });
2656
- useEffect(function () {
2657
- setDayOptions(Array.from({ length: dDate.daysInMonth() }, function (_, i) { return ({
2943
+ }));
2944
+ useEffect(() => {
2945
+ setDayOptions(Array.from({ length: dDate.daysInMonth() }, (_, i) => ({
2658
2946
  value: i + 1,
2659
- }); }));
2947
+ })));
2660
2948
  // Mimicing browser event structure
2661
2949
  onChange({
2662
2950
  target: {
@@ -2664,19 +2952,19 @@ var DatePicker = function (_a) {
2664
2952
  },
2665
2953
  });
2666
2954
  }, [dDate]);
2667
- var handleDayChange = function (e) {
2668
- var date = parseInt(e.target.value, 10);
2669
- var new_date = dDate.date(date);
2955
+ const handleDayChange = (e) => {
2956
+ const date = parseInt(e.target.value, 10);
2957
+ const new_date = dDate.date(date);
2670
2958
  setDate(new_date);
2671
2959
  };
2672
- var handleMonthChange = function (e) {
2673
- var month = parseInt(e.target.value, 10);
2674
- var new_date = dDate.month(month - 1); // dayjs month is zero based
2960
+ const handleMonthChange = (e) => {
2961
+ const month = parseInt(e.target.value, 10);
2962
+ const new_date = dDate.month(month - 1); // dayjs month is zero based
2675
2963
  setDate(new_date);
2676
2964
  };
2677
- var handleYearChange = function (e) {
2678
- var year = parseInt(e.target.value, 10);
2679
- var new_date = dDate.year(year);
2965
+ const handleYearChange = (e) => {
2966
+ const year = parseInt(e.target.value, 10);
2967
+ const new_date = dDate.year(year);
2680
2968
  setDate(new_date);
2681
2969
  };
2682
2970
  return (React.createElement(React.Fragment, null,
@@ -2685,37 +2973,71 @@ var DatePicker = function (_a) {
2685
2973
  React.createElement(Middle, null,
2686
2974
  React.createElement(Select, { invalid: invalid, onChange: handleDayChange, options: dayOptions, readOnly: readOnly, style: { borderRadius: '0px' }, value: dDate.format('D') })),
2687
2975
  React.createElement(Select, { invalid: invalid, onChange: handleYearChange, options: years, readOnly: readOnly, style: { borderRadius: '0px 4px 4px 0px', flexGrow: 2 }, value: dDate.format('YYYY') }))));
2688
- };
2689
- var templateObject_1$g, templateObject_2$e;
2690
-
2691
- var Scrim$1 = styled.div(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n position: ", ";\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ", ";\n background: ", ";\n"], ["\n position: ", ";\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ", ";\n background: ", ";\n"])), function (_a) {
2692
- var $position = _a.$position;
2693
- return $position;
2694
- }, function (_a) {
2695
- var $position = _a.$position;
2696
- return ($position === 'fixed' ? 9998 : 10);
2697
- }, function (_a) {
2698
- var $scrim = _a.$scrim;
2699
- return ($scrim === 'dark' ? 'rgba(0,0,0,0.8)' : 'transparent');
2700
- });
2701
- var Container$2 = styled.div(templateObject_2$d || (templateObject_2$d = __makeTemplateObject(["\n z-index: ", ";\n min-width: 400px;\n width: ", ";\n overflow: hidden;\n box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);\n outline: none;\n border: none;\n position: ", ";\n top: 0;\n right: 0;\n bottom: 0;\n padding: 0px;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n background: #fff;\n"], ["\n z-index: ", ";\n min-width: 400px;\n width: ", ";\n overflow: hidden;\n box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);\n outline: none;\n border: none;\n position: ", ";\n top: 0;\n right: 0;\n bottom: 0;\n padding: 0px;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n background: #fff;\n"])), function (_a) {
2702
- var $position = _a.$position;
2703
- return ($position === 'fixed' ? 9999 : 11);
2704
- }, function (_a) {
2705
- var $width = _a.$width;
2706
- return $width || '400px';
2707
- }, function (_a) {
2708
- var $position = _a.$position;
2709
- return $position;
2710
- });
2711
- var Header$2 = styled.div(templateObject_3$b || (templateObject_3$b = __makeTemplateObject(["\n padding: 30px 20px;\n display: flex;\n align-items: flex-start;\n box-sizing: border-box;\n flex-shrink: 0;\n background: #fff;\n"], ["\n padding: 30px 20px;\n display: flex;\n align-items: flex-start;\n box-sizing: border-box;\n flex-shrink: 0;\n background: #fff;\n"])));
2712
- var Close$1 = styled.div(templateObject_4$7 || (templateObject_4$7 = __makeTemplateObject(["\n margin-left: auto;\n display: flex;\n align-items: center;\n padding-left: 20px;\n cursor: pointer;\n"], ["\n margin-left: auto;\n display: flex;\n align-items: center;\n padding-left: 20px;\n cursor: pointer;\n"])));
2713
- var ContentWrapper$1 = styled.div(templateObject_5$5 || (templateObject_5$5 = __makeTemplateObject(["\n overflow-x: hidden;\n overflow-y: auto;\n box-sizing: border-box;\n flex: 1;\n background: #fff;\n"], ["\n overflow-x: hidden;\n overflow-y: auto;\n box-sizing: border-box;\n flex: 1;\n background: #fff;\n"])));
2714
- var ButtonBar$1 = styled.div(templateObject_6$3 || (templateObject_6$3 = __makeTemplateObject(["\n padding: 20px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n box-sizing: border-box;\n gap: 10px;\n flex-shrink: 0;\n background: #fff;\n"], ["\n padding: 20px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n box-sizing: border-box;\n gap: 10px;\n flex-shrink: 0;\n background: #fff;\n"])));
2715
- var Drawer = function (_a) {
2716
- var children = _a.children, description = _a.description, title = _a.title, onClose = _a.onClose, primaryButton = _a.primaryButton, _b = _a.position, position = _b === void 0 ? 'fixed' : _b, secondaryButton = _a.secondaryButton, tertiaryButton = _a.tertiaryButton, _c = _a.scrim, scrim = _c === void 0 ? 'dark' : _c, width = _a.width, accessibleProps = __rest(_a, ["children", "description", "title", "onClose", "primaryButton", "position", "secondaryButton", "tertiaryButton", "scrim", "width"]);
2717
- useEffect(function () {
2718
- document.onkeydown = function (e) {
2976
+ };
2977
+
2978
+ const Scrim$1 = styled.div `
2979
+ position: ${({ $position }) => $position};
2980
+ top: 0;
2981
+ right: 0;
2982
+ bottom: 0;
2983
+ left: 0;
2984
+ z-index: ${({ $position }) => ($position === 'fixed' ? 9998 : 10)};
2985
+ background: ${({ $scrim }) => ($scrim === 'dark' ? 'rgba(0,0,0,0.8)' : 'transparent')};
2986
+ `;
2987
+ const Container$2 = styled.div `
2988
+ z-index: ${({ $position }) => ($position === 'fixed' ? 9999 : 11)};
2989
+ min-width: 400px;
2990
+ width: ${({ $width }) => $width || '400px'};
2991
+ overflow: hidden;
2992
+ box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
2993
+ outline: none;
2994
+ border: none;
2995
+ position: ${({ $position }) => $position};
2996
+ top: 0;
2997
+ right: 0;
2998
+ bottom: 0;
2999
+ padding: 0px;
3000
+ display: flex;
3001
+ flex-direction: column;
3002
+ box-sizing: border-box;
3003
+ background: #fff;
3004
+ `;
3005
+ const Header$2 = styled.div `
3006
+ padding: 30px 20px;
3007
+ display: flex;
3008
+ align-items: flex-start;
3009
+ box-sizing: border-box;
3010
+ flex-shrink: 0;
3011
+ background: #fff;
3012
+ `;
3013
+ const Close$1 = styled.div `
3014
+ margin-left: auto;
3015
+ display: flex;
3016
+ align-items: center;
3017
+ padding-left: 20px;
3018
+ cursor: pointer;
3019
+ `;
3020
+ const ContentWrapper$1 = styled.div `
3021
+ overflow-x: hidden;
3022
+ overflow-y: auto;
3023
+ box-sizing: border-box;
3024
+ flex: 1;
3025
+ background: #fff;
3026
+ `;
3027
+ const ButtonBar$1 = styled.div `
3028
+ padding: 20px;
3029
+ display: flex;
3030
+ align-items: center;
3031
+ justify-content: flex-end;
3032
+ box-sizing: border-box;
3033
+ gap: 10px;
3034
+ flex-shrink: 0;
3035
+ background: #fff;
3036
+ `;
3037
+ const Drawer = (_a) => {
3038
+ var { children, description, title, onClose, primaryButton, position = 'fixed', secondaryButton, tertiaryButton, scrim = 'dark', width } = _a, accessibleProps = __rest(_a, ["children", "description", "title", "onClose", "primaryButton", "position", "secondaryButton", "tertiaryButton", "scrim", "width"]);
3039
+ useEffect(() => {
3040
+ document.onkeydown = e => {
2719
3041
  if (e.key === 'Escape') {
2720
3042
  onClose();
2721
3043
  }
@@ -2725,7 +3047,7 @@ var Drawer = function (_a) {
2725
3047
  };
2726
3048
  }, []);
2727
3049
  return (React.createElement(React.Fragment, null,
2728
- React.createElement(Container$2, __assign({}, accessibleProps, { "$position": position, "$width": width }),
3050
+ React.createElement(Container$2, Object.assign({}, accessibleProps, { "$position": position, "$width": width }),
2729
3051
  React.createElement(Header$2, null,
2730
3052
  React.createElement("div", null,
2731
3053
  title ? React.createElement(Heading, { type: 'secondary' }, title) : null,
@@ -2734,16 +3056,25 @@ var Drawer = function (_a) {
2734
3056
  React.createElement(Button, { format: 'secondary', icon: mdiClose, small: true }))),
2735
3057
  React.createElement(ContentWrapper$1, null, children),
2736
3058
  primaryButton || secondaryButton || tertiaryButton ? (React.createElement(ButtonBar$1, null,
2737
- tertiaryButton ? React.createElement(Button, __assign({}, tertiaryButton, { format: 'secondary' })) : null,
2738
- secondaryButton ? React.createElement(Button, __assign({}, secondaryButton, { format: 'secondary' })) : null,
2739
- primaryButton ? React.createElement(Button, __assign({}, primaryButton, { format: 'primary' })) : null)) : null),
3059
+ tertiaryButton ? React.createElement(Button, Object.assign({}, tertiaryButton, { format: 'secondary' })) : null,
3060
+ secondaryButton ? React.createElement(Button, Object.assign({}, secondaryButton, { format: 'secondary' })) : null,
3061
+ primaryButton ? React.createElement(Button, Object.assign({}, primaryButton, { format: 'primary' })) : null)) : null),
2740
3062
  scrim ? React.createElement(Scrim$1, { "$position": position, "$scrim": scrim, onClick: onClose }) : null));
2741
- };
2742
- var templateObject_1$f, templateObject_2$d, templateObject_3$b, templateObject_4$7, templateObject_5$5, templateObject_6$3;
3063
+ };
2743
3064
 
2744
- var Wrapper$b = styled.div(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n display: inline-block;\n position: relative;\n height: 16px;\n"], ["\n display: inline-block;\n position: relative;\n height: 16px;\n"])));
2745
- var StyledIcon$2 = styled(Icon)(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n width: 16px;\n height: 16px;\n padding: 0px 6px;\n color: ", ";\n cursor: pointer;\n"], ["\n width: 16px;\n height: 16px;\n padding: 0px 6px;\n color: ", ";\n cursor: pointer;\n"])), Colors.PRIMARY.Hex);
2746
- var positions = {
3065
+ const Wrapper$a = styled.div `
3066
+ display: inline-block;
3067
+ position: relative;
3068
+ height: 16px;
3069
+ `;
3070
+ const StyledIcon$2 = styled(Icon) `
3071
+ width: 16px;
3072
+ height: 16px;
3073
+ padding: 0px 6px;
3074
+ color: ${Colors.PRIMARY.Hex};
3075
+ cursor: pointer;
3076
+ `;
3077
+ const positions = {
2747
3078
  'right-top': {
2748
3079
  top: '0px',
2749
3080
  left: '28px',
@@ -2771,177 +3102,357 @@ var positions = {
2771
3102
  transform: 'translateY(-50%)',
2772
3103
  },
2773
3104
  };
2774
- var Content$1 = styled.div(function (props) { return (__assign({ position: 'absolute', borderRadius: '4px', borderWidth: '1px', borderStyle: 'solid', borderColor: Colors.PRIMARY.Hex, background: '#ffffff', boxShadow: '0px 5px 30px -10px rgba(0, 0, 0, 0.5)', width: props.$width || '240px', padding: '10px 12px', zIndex: 10 }, positions[props.$position])); });
2775
- var Tooltip = function (_a) {
2776
- var children = _a.children, _b = _a.position, position = _b === void 0 ? 'right-top' : _b, _c = _a.width, width = _c === void 0 ? '240px' : _c;
2777
- var _d = useState(false), show_content = _d[0], toggleContent = _d[1];
2778
- return (React.createElement(Wrapper$b, { onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
3105
+ const Content$2 = styled.div(props => (Object.assign({ position: 'absolute', borderRadius: '4px', borderWidth: '1px', borderStyle: 'solid', borderColor: Colors.PRIMARY.Hex, background: '#ffffff', boxShadow: '0px 5px 30px -10px rgba(0, 0, 0, 0.5)', width: props.$width || '240px', padding: '10px 12px', zIndex: 10 }, positions[props.$position])));
3106
+ const Tooltip = ({ children, position = 'right-top', width = '240px' }) => {
3107
+ const [show_content, toggleContent] = useState(false);
3108
+ return (React.createElement(Wrapper$a, { onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
2779
3109
  React.createElement(StyledIcon$2, { path: mdiInformationOutline }),
2780
- show_content ? (React.createElement(Content$1, { "$position": position, "$width": width }, children && React.createElement(Copy, { type: 'small' }, children))) : null));
2781
- };
2782
- var templateObject_1$e, templateObject_2$c;
2783
-
2784
- var Wrapper$a = styled.div(function (props) { return (__assign({ margin: '0px 0px 18px 0px' }, props.style)); });
2785
- var LabelRow = styled.div(templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0 0 4px 0;\n box-sizing: border-box;\n"], ["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0 0 4px 0;\n box-sizing: border-box;\n"])));
2786
- var Label$2 = styled.label(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n font-size: ", ";\n font-weight: 500;\n line-height: 1em;\n font-family: ", ";\n color: ", ";\n display: flex;\n align-items: center;\n"], ["\n font-size: ", ";\n font-weight: 500;\n line-height: 1em;\n font-family: ", ";\n color: ", ";\n display: flex;\n align-items: center;\n"])), FontSizes.DEFAULT, FontStyles.DEFAULT, Colors.BLACK.Hex);
2787
- var Required = styled.span(templateObject_3$a || (templateObject_3$a = __makeTemplateObject(["\n color: ", ";\n margin-left: 4px;\n"], ["\n color: ", ";\n margin-left: 4px;\n"])), Colors.RED.Hex);
2788
- var Action = styled.span(templateObject_4$6 || (templateObject_4$6 = __makeTemplateObject(["\n font-size: ", ";\n font-weight: 500;\n line-height: 1em;\n font-family: ", ";\n color: ", ";\n cursor: pointer;\n"], ["\n font-size: ", ";\n font-weight: 500;\n line-height: 1em;\n font-family: ", ";\n color: ", ";\n cursor: pointer;\n"])), FontSizes.DEFAULT, FontStyles.DEFAULT, Colors.PRIMARY.Hex);
2789
- var Description = styled.div(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject(["\n font-size: ", ";\n font-weight: 400;\n line-height: 1.3em;\n font-family: ", ";\n color: ", ";\n margin: 0 0 8px 0;\n box-sizing: border-box;\n"], ["\n font-size: ", ";\n font-weight: 400;\n line-height: 1.3em;\n font-family: ", ";\n color: ", ";\n margin: 0 0 8px 0;\n box-sizing: border-box;\n"])), FontSizes.SMALL, FontStyles.DEFAULT, Colors.BLACK.Hex);
2790
- var Validation = styled.div(templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject(["\n font-size: ", ";\n font-weight: 400;\n line-height: 1.3em;\n font-family: ", ";\n color: ", ";\n margin: 4px 0 0 0;\n box-sizing: border-box;\n"], ["\n font-size: ", ";\n font-weight: 400;\n line-height: 1.3em;\n font-family: ", ";\n color: ", ";\n margin: 4px 0 0 0;\n box-sizing: border-box;\n"])), FontSizes.SMALL, FontStyles.DEFAULT, Colors.RED.Hex);
2791
- var Field = function (_a) {
2792
- var action = _a.action, children = _a.children, validationText = _a.validationText, label = _a.label, description = _a.description, required = _a.required, htmlFor = _a.htmlFor, style = _a.style, tooltip = _a.tooltip, accessibleProps = __rest(_a, ["action", "children", "validationText", "label", "description", "required", "htmlFor", "style", "tooltip"]);
2793
- return (React.createElement(Wrapper$a, __assign({ style: style }, accessibleProps),
3110
+ show_content ? (React.createElement(Content$2, { "$position": position, "$width": width }, children && React.createElement(Copy, { type: 'small' }, children))) : null));
3111
+ };
3112
+
3113
+ const Wrapper$9 = styled.div(props => (Object.assign({ margin: '0px 0px 18px 0px' }, props.style)));
3114
+ const LabelRow = styled.div `
3115
+ display: flex;
3116
+ align-items: center;
3117
+ justify-content: space-between;
3118
+ margin: 0 0 4px 0;
3119
+ box-sizing: border-box;
3120
+ `;
3121
+ const Label$2 = styled.label `
3122
+ font-size: ${FontSizes.DEFAULT};
3123
+ font-weight: 500;
3124
+ line-height: 1em;
3125
+ font-family: ${FontStyles.DEFAULT};
3126
+ color: ${Colors.BLACK.Hex};
3127
+ display: flex;
3128
+ align-items: center;
3129
+ `;
3130
+ const Required = styled.span `
3131
+ color: ${Colors.RED.Hex};
3132
+ margin-left: 4px;
3133
+ `;
3134
+ const Action = styled.span `
3135
+ font-size: ${FontSizes.DEFAULT};
3136
+ font-weight: 500;
3137
+ line-height: 1em;
3138
+ font-family: ${FontStyles.DEFAULT};
3139
+ color: ${Colors.PRIMARY.Hex};
3140
+ cursor: pointer;
3141
+ `;
3142
+ const Description = styled.div `
3143
+ font-size: ${FontSizes.SMALL};
3144
+ font-weight: 400;
3145
+ line-height: 1.3em;
3146
+ font-family: ${FontStyles.DEFAULT};
3147
+ color: ${Colors.BLACK.Hex};
3148
+ margin: 0 0 8px 0;
3149
+ box-sizing: border-box;
3150
+ `;
3151
+ const Validation = styled.div `
3152
+ font-size: ${FontSizes.SMALL};
3153
+ font-weight: 400;
3154
+ line-height: 1.3em;
3155
+ font-family: ${FontStyles.DEFAULT};
3156
+ color: ${Colors.RED.Hex};
3157
+ margin: 4px 0 0 0;
3158
+ box-sizing: border-box;
3159
+ `;
3160
+ const Field = (_a) => {
3161
+ var { action, children, validationText, label, description, required, htmlFor, style, tooltip } = _a, accessibleProps = __rest(_a, ["action", "children", "validationText", "label", "description", "required", "htmlFor", "style", "tooltip"]);
3162
+ return (React.createElement(Wrapper$9, Object.assign({ style: style }, accessibleProps),
2794
3163
  React.createElement(LabelRow, null,
2795
3164
  React.createElement(Label$2, { htmlFor: htmlFor },
2796
3165
  label,
2797
3166
  required ? React.createElement(Required, null, "*") : null,
2798
- tooltip ? React.createElement(Tooltip, __assign({}, tooltip)) : null),
3167
+ tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null),
2799
3168
  action ? React.createElement(Action, { onClick: action.onClick }, action.label) : null),
2800
3169
  description ? React.createElement(Description, null, description) : null,
2801
3170
  children,
2802
3171
  validationText ? React.createElement(Validation, null, validationText) : null));
2803
- };
2804
- var templateObject_1$d, templateObject_2$b, templateObject_3$a, templateObject_4$6, templateObject_5$4, templateObject_6$2;
2805
-
2806
- var Wrapper$9 = styled.div(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n display: flex;\n gap: 16px;\n padding: 20px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n border-radius: 8px;\n border: 1px dashed ", ";\n background-color: ", ";\n"], ["\n display: flex;\n gap: 16px;\n padding: 20px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n border-radius: 8px;\n border: 1px dashed ", ";\n background-color: ", ";\n"])), function (_a) {
2807
- var $isDragOver = _a.$isDragOver;
2808
- return ($isDragOver ? "".concat(Colors.PRIMARY.Hex) : '#ccc');
2809
- }, function (_a) {
2810
- var $isDragOver = _a.$isDragOver;
2811
- return $isDragOver ? "rgba(".concat(Colors.PRIMARY.Rgb, ", 0.05)") : '#ffffff';
2812
- });
2813
- var StyledIcon$1 = styled.div(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n width: 80px;\n height: 80px;\n cursor: pointer;\n flex-shrink: 0;\n background-color: ", ";\n border-radius: 80px;\n display: flex;\n margin: auto;\n justify-content: center;\n align-items: center;\n"], ["\n width: 80px;\n height: 80px;\n cursor: pointer;\n flex-shrink: 0;\n background-color: ", ";\n border-radius: 80px;\n display: flex;\n margin: auto;\n justify-content: center;\n align-items: center;\n"])), function (_a) {
2814
- var $isDragOver = _a.$isDragOver;
2815
- return ($isDragOver ? '#fff' : '#f5f5f5');
2816
- });
2817
- var Files = styled.div(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 10px;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 10px;\n"])));
2818
- var File = styled.div(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n width: 300px;\n padding: 10px;\n align-items: center;\n gap: 2px;\n list-style-type: none;\n border-radius: 4px;\n border: 1px solid #ccc;\n"], ["\n display: flex;\n justify-content: space-between;\n width: 300px;\n padding: 10px;\n align-items: center;\n gap: 2px;\n list-style-type: none;\n border-radius: 4px;\n border: 1px solid #ccc;\n"])));
2819
- var CopyWrapper = styled.div(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n padding: ", ";\n margin-top: ", ";\n"], ["\n padding: ", ";\n margin-top: ", ";\n"])), function (_a) {
2820
- var $fileState = _a.$fileState;
2821
- return ($fileState ? '20px 0px' : '');
2822
- }, function (_a) {
2823
- var $fileState = _a.$fileState;
2824
- return ($fileState ? '' : '16px');
2825
- });
2826
- var IconWrapper$1 = styled.div(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n cursor: pointer;\n"], ["\n cursor: pointer;\n"])));
2827
- var ProgressBar = styled.div(templateObject_7$1 || (templateObject_7$1 = __makeTemplateObject(["\n width: 100px;\n height: 14px;\n border-radius: 4px;\n background: #f5f5f5;\n overflow-x: hidden;\n"], ["\n width: 100px;\n height: 14px;\n border-radius: 4px;\n background: #f5f5f5;\n overflow-x: hidden;\n"])));
2828
- var Progress = styled.div(templateObject_8$1 || (templateObject_8$1 = __makeTemplateObject(["\n width: ", ";\n height: 100%;\n border-radius: 4px 0px 0px 4px;\n background: ", ";\n"], ["\n width: ", ";\n height: 100%;\n border-radius: 4px 0px 0px 4px;\n background: ", ";\n"])), function (_a) {
2829
- var $width = _a.$width;
2830
- return "".concat($width, "%");
2831
- }, Colors.GREEN.Hex);
2832
- var FileUpload = function (_a) {
2833
- var acceptFiles = _a.acceptFiles, onChange = _a.onChange, onFileDelete = _a.onFileDelete, _b = _a.maxFileSize, maxFileSize = _b === void 0 ? 10 : _b, _c = _a.multiple, multiple = _c === void 0 ? false : _c, _d = _a.progress, progress = _d === void 0 ? false : _d, UploadProgress = _a.UploadProgress, accessibleProps = __rest(_a, ["acceptFiles", "onChange", "onFileDelete", "maxFileSize", "multiple", "progress", "UploadProgress"]);
2834
- var MAX_FILE_SIZE = maxFileSize * 1024 * 1024;
2835
- var _e = useState([]), files = _e[0], setFiles = _e[1];
2836
- var _f = useState(false), dragOver = _f[0], setDragOver = _f[1];
2837
- var inputField = useRef(null);
2838
- useEffect(function () {
2839
- if (UploadProgress) {
2840
- var updatedFiles = files.map(function (file, index) {
2841
- if (index === UploadProgress.index) {
2842
- return __assign(__assign({}, file), { uploadUpdate: UploadProgress.progress });
2843
- }
2844
- else {
2845
- return file;
3172
+ };
3173
+
3174
+ const Dropzone = styled.div `
3175
+ border-radius: 8px;
3176
+ border-width: 1px;
3177
+ border-style: dashed;
3178
+ border-color: ${props => (props.$dragging ? Colors.PRIMARY.Hex : '#cccccc')};
3179
+ background: ${props => (props.$dragging ? `rgba(${Colors.PRIMARY.Rgb}, 0.05)` : '#ffffff')};
3180
+ cursor: copy;
3181
+ `;
3182
+ const IconWrapper$1 = styled.div `
3183
+ width: 80px;
3184
+ height: 80px;
3185
+ border-radius: 40px;
3186
+ background: ${props => (props.$dragging ? '#ffffff' : '#f5f5f5')};
3187
+ display: flex;
3188
+ align-items: center;
3189
+ justify-content: center;
3190
+ `;
3191
+ const StyledIcon$1 = styled(Icon) `
3192
+ width: 40px !important;
3193
+ height: 40px !important;
3194
+
3195
+ > path {
3196
+ fill: ${Colors.GRAY.Hex} !important;
3197
+ }
3198
+ `;
3199
+ const ClickZone = styled.div `
3200
+ margin: 40px 20px;
3201
+ display: flex;
3202
+ flex-direction: column;
3203
+ align-items: center;
3204
+ gap: 16px;
3205
+ `;
3206
+ const Content$1 = styled.div `
3207
+ display: flex;
3208
+ flex-direction: column;
3209
+ align-items: center;
3210
+ gap: 2px;
3211
+ `;
3212
+ const Files = styled.div `
3213
+ display: flex;
3214
+ flex-direction: column;
3215
+ align-self: stretch;
3216
+ gap: 10px;
3217
+ margin: 20px;
3218
+ `;
3219
+ const File = styled.div `
3220
+ display: flex;
3221
+ padding: 10px;
3222
+ align-items: center;
3223
+ justify-content: space-between;
3224
+ gap: 10px;
3225
+ border-radius: 4px;
3226
+ border: 1px solid #cccccc;
3227
+ background: #ffffff;
3228
+ `;
3229
+ const Remove$1 = styled(Icon) `
3230
+ width: 24px;
3231
+ height: 24px;
3232
+ cursor: pointer;
3233
+
3234
+ > path {
3235
+ fill: ${Colors.RED.Hex} !important;
3236
+ }
3237
+ `;
3238
+ const FileUpload = ({ accept, onChange, onError, maxFiles = 10, maxSize = 2, message, validateFile, }) => {
3239
+ const inputRef = useRef(null);
3240
+ const [files, setFiles] = useState([]);
3241
+ const [dragging, setDragging] = useState(false);
3242
+ const [allowMoreFiles, setAllowMoreFiles] = useState(true);
3243
+ const handleDrag = (e) => {
3244
+ e.preventDefault();
3245
+ e.stopPropagation();
3246
+ if (e.type === 'dragenter' || e.type === 'dragover') {
3247
+ setDragging(true);
3248
+ }
3249
+ else if (e.type === 'dragleave') {
3250
+ setDragging(false);
3251
+ }
3252
+ };
3253
+ const handleDrop = (e) => {
3254
+ var _a, _b;
3255
+ e.preventDefault();
3256
+ e.stopPropagation();
3257
+ setDragging(true);
3258
+ if ((_a = e.dataTransfer) === null || _a === void 0 ? void 0 : _a.items) {
3259
+ const newFiles = [];
3260
+ [...e.dataTransfer.items].forEach(file => {
3261
+ if (file.kind === 'file') {
3262
+ const f = file.getAsFile();
3263
+ if (f) {
3264
+ newFiles.push(f);
3265
+ }
2846
3266
  }
2847
3267
  });
2848
- setFiles(updatedFiles);
3268
+ addFiles(newFiles);
2849
3269
  }
2850
- }, [UploadProgress]);
2851
- useEffect(function () {
2852
- onChange(files);
2853
- }, [files]);
2854
- var assignFiles = function (newFiles) {
2855
- var _loop_1 = function (i) {
2856
- if (newFiles[i].size < MAX_FILE_SIZE) {
2857
- setFiles(function (files) { return __spreadArray(__spreadArray([], files, true), [{ file: newFiles[i], uploadProgress: 0 }], false); });
2858
- }
2859
- };
2860
- for (var i = 0; i < newFiles.length; i++) {
2861
- _loop_1(i);
3270
+ else if ((_b = e.dataTransfer) === null || _b === void 0 ? void 0 : _b.files) {
3271
+ addFiles([...e.dataTransfer.files]);
2862
3272
  }
3273
+ setDragging(false);
2863
3274
  };
2864
- var onFileSelect = function (e) {
2865
- assignFiles(Array.from(e.target.files || []));
2866
- };
2867
- var handleDrop = function (e) {
2868
- e === null || e === void 0 ? void 0 : e.preventDefault();
2869
- assignFiles(Array.from(e.dataTransfer.files || []));
3275
+ const handleChange = (e) => {
3276
+ const input = e.target;
3277
+ if (input.files) {
3278
+ addFiles([...input.files]);
3279
+ }
2870
3280
  };
2871
- var handleDragOver = function (e) {
2872
- e === null || e === void 0 ? void 0 : e.preventDefault();
2873
- setDragOver(true);
3281
+ const addFiles = (addedFiles) => {
3282
+ const newFiles = [];
3283
+ const errors = [];
3284
+ addedFiles.forEach(file => {
3285
+ let valid = true;
3286
+ if (accept) {
3287
+ if (!accept.includes(file.type)) {
3288
+ valid = false;
3289
+ errors.push({
3290
+ file,
3291
+ message: 'File type is not permitted.',
3292
+ });
3293
+ }
3294
+ }
3295
+ if (file.size > maxSize * 1000000 || files.length + newFiles.length === maxFiles) {
3296
+ valid = false;
3297
+ errors.push({
3298
+ file,
3299
+ message: 'File size exceeds limit.',
3300
+ });
3301
+ }
3302
+ if (validateFile && !validateFile(file)) {
3303
+ valid = false;
3304
+ }
3305
+ if (valid) {
3306
+ newFiles.push(file);
3307
+ }
3308
+ });
3309
+ if (errors.length && onError) {
3310
+ onError(errors);
3311
+ }
3312
+ setFiles([...files, ...newFiles]);
2874
3313
  };
2875
- var handleDragLeave = function (e) {
2876
- e === null || e === void 0 ? void 0 : e.preventDefault();
2877
- setDragOver(false);
3314
+ const triggerFileExplorer = () => {
3315
+ if (inputRef.current) {
3316
+ inputRef.current.click();
3317
+ }
2878
3318
  };
2879
- var removeItem = function (index) {
2880
- var newArray = __spreadArray([], files, true);
2881
- newArray.splice(index, 1);
2882
- setFiles(newArray);
2883
- onFileDelete(files[index]);
3319
+ const handleRemove = (file) => {
3320
+ setFiles(files.filter(f => f !== file));
2884
3321
  };
3322
+ useEffect(() => {
3323
+ if (onChange) {
3324
+ onChange(files);
3325
+ }
3326
+ if (files.length < maxFiles) {
3327
+ setAllowMoreFiles(true);
3328
+ }
3329
+ else {
3330
+ setAllowMoreFiles(false);
3331
+ }
3332
+ }, [files]);
2885
3333
  return (React.createElement(React.Fragment, null,
2886
- React.createElement(Wrapper$9, __assign({ "$isDragOver": dragOver, onDragLeave: handleDragLeave, onDragOver: handleDragOver, onDrop: handleDrop }, accessibleProps),
2887
- files.length > 0 && (React.createElement(Files, null, Array.from(files).map(function (singleFile, index) {
2888
- var _a;
2889
- return (React.createElement(File, { key: index },
2890
- React.createElement(Copy, { children: (_a = singleFile.file) === null || _a === void 0 ? void 0 : _a.name, type: 'bold' }),
2891
- singleFile.uploadUpdate === 100 || !progress ? (React.createElement(IconWrapper$1, { onClick: function () { return removeItem(index); } },
2892
- React.createElement(Icon, { color: 'red', path: mdiMinusCircle, size: 1 }))) : (React.createElement(ProgressBar, null,
2893
- React.createElement(Progress, { "$width": (singleFile === null || singleFile === void 0 ? void 0 : singleFile.uploadUpdate) || 0, role: 'progressbar' })))));
2894
- }))),
2895
- React.createElement("div", { onClick: function () { var _a; return (_a = inputField === null || inputField === void 0 ? void 0 : inputField.current) === null || _a === void 0 ? void 0 : _a.click(); } },
2896
- !(files.length > 0) && (React.createElement(StyledIcon$1, { "$isDragOver": dragOver },
2897
- React.createElement(Icon, { color: dragOver ? "".concat(Colors.PRIMARY.Hex) : "".concat(Colors.GRAY.Hex), path: mdiFolderPlusOutline, size: 1.667 }))),
2898
- React.createElement("input", { accept: acceptFiles, hidden: true, multiple: multiple, onChange: onFileSelect, ref: inputField, type: 'file' }),
2899
- React.createElement(CopyWrapper, { "$fileState": files.length > 0 },
2900
- React.createElement(Copy, { align: 'center', children: 'Drag & drop files here or click to choose', type: 'bold' }),
2901
- React.createElement(Copy, { align: 'center', children: "".concat(maxFileSize, " MB max file size"), color: 'GRAY' }))))));
2902
- };
2903
- var templateObject_1$c, templateObject_2$a, templateObject_3$9, templateObject_4$5, templateObject_5$3, templateObject_6$1, templateObject_7$1, templateObject_8$1;
3334
+ React.createElement("input", { accept: accept, multiple: true, onChange: allowMoreFiles ? handleChange : undefined, ref: inputRef, style: { display: 'none' }, type: 'file' }),
3335
+ React.createElement(Dropzone, { "$dragging": dragging, onDragEnter: allowMoreFiles ? handleDrag : undefined, onDragLeave: allowMoreFiles ? handleDrag : undefined, onDragOver: allowMoreFiles ? handleDrag : undefined, onDrop: allowMoreFiles ? handleDrop : undefined },
3336
+ files.length ? (React.createElement(Files, null, files.map(file => {
3337
+ return (React.createElement(File, { key: file.name },
3338
+ React.createElement(Copy, { type: 'bold' }, file.name),
3339
+ React.createElement(Remove$1, { onClick: handleRemove.bind(null, file), path: mdiMinusCircle })));
3340
+ }))) : null,
3341
+ allowMoreFiles ? (React.createElement(ClickZone, { onClick: triggerFileExplorer },
3342
+ files.length ? null : (React.createElement(IconWrapper$1, { "$dragging": dragging },
3343
+ React.createElement(StyledIcon$1, { path: mdiFolderPlusOutline }))),
3344
+ React.createElement(Content$1, null,
3345
+ React.createElement(Copy, { align: 'center', type: 'bold' }, "Drag & drop files here or click to select files"),
3346
+ message ? (React.createElement(Copy, { align: 'center', color: 'GRAY' }, message)) : null))) : null)));
3347
+ };
2904
3348
 
2905
- var formatAsPhone = function (number) {
2906
- var formatted_value = "".concat(number).replace(/[^0-9.]/g, '');
2907
- var size = formatted_value.length;
3349
+ const formatAsPhone = (number) => {
3350
+ let formatted_value = `${number}`.replace(/[^0-9.]/g, '');
3351
+ const size = formatted_value.length;
2908
3352
  if (size < 1) ;
2909
3353
  else if (size < 4) {
2910
- formatted_value = "(".concat(formatted_value);
3354
+ formatted_value = `(${formatted_value}`;
2911
3355
  }
2912
3356
  else if (size < 7) {
2913
- formatted_value = "(".concat(formatted_value.substring(0, 3), ") ").concat(formatted_value.substring(3, 6));
3357
+ formatted_value = `(${formatted_value.substring(0, 3)}) ${formatted_value.substring(3, 6)}`;
2914
3358
  }
2915
3359
  else {
2916
- formatted_value = "(".concat(formatted_value.substring(0, 3), ") ").concat(formatted_value.substring(3, 6), "-").concat(formatted_value.substring(6, 10));
3360
+ formatted_value = `(${formatted_value.substring(0, 3)}) ${formatted_value.substring(3, 6)}-${formatted_value.substring(6, 10)}`;
2917
3361
  }
2918
3362
  return formatted_value;
2919
3363
  };
2920
- var formatAsSsn = function (number) {
2921
- var formatted_value = "".concat(number).replace(/[^0-9.]/g, '');
2922
- var size = formatted_value.length;
3364
+ const formatAsSsn = (number) => {
3365
+ let formatted_value = `${number}`.replace(/[^0-9.]/g, '');
3366
+ const size = formatted_value.length;
2923
3367
  if (size > 3 && size < 6) {
2924
- formatted_value = "".concat(formatted_value.substring(0, 3), "-").concat(formatted_value.substring(3, 5));
3368
+ formatted_value = `${formatted_value.substring(0, 3)}-${formatted_value.substring(3, 5)}`;
2925
3369
  }
2926
3370
  else if (size > 5) {
2927
- formatted_value = "".concat(formatted_value.substring(0, 3), "-").concat(formatted_value.substring(3, 5), "-").concat(formatted_value.substring(5, 9));
3371
+ formatted_value = `${formatted_value.substring(0, 3)}-${formatted_value.substring(3, 5)}-${formatted_value.substring(5, 9)}`;
2928
3372
  }
2929
3373
  return formatted_value;
2930
3374
  };
2931
3375
 
2932
- var StyledInput = styled.input(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n background-color: ", ";\n border-radius: ", ";\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n font-size: ", ";\n font-weight: 400;\n font-family: ", ";\n line-height: 1.28em;\n color: ", ";\n position: relative;\n height: auto;\n padding: 10px;\n opacity: ", ";\n box-shadow: none;\n outline: none;\n margin: 0px;\n text-indent: 0px;\n --webkit-appearance: none;\n box-sizing: border-box;\n display: block;\n width: 100%;\n &:focus {\n border-color: ", ";\n }\n"], ["\n background-color: ", ";\n border-radius: ", ";\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n font-size: ", ";\n font-weight: 400;\n font-family: ", ";\n line-height: 1.28em;\n color: ", ";\n position: relative;\n height: auto;\n padding: 10px;\n opacity: ", ";\n box-shadow: none;\n outline: none;\n margin: 0px;\n text-indent: 0px;\n --webkit-appearance: none;\n box-sizing: border-box;\n display: block;\n width: 100%;\n &:focus {\n border-color: ", ";\n }\n"])), function (props) { return (props.$readOnly ? '#f5f5f5' : '#ffffff'); }, function (props) { return (props.$suffix ? '4px 0px 0px 4px' : '4px'); }, function (props) { return (props.$invalid && !props.$readOnly ? Colors.RED.Hex : '#cccccc'); }, FontSizes.DEFAULT, FontStyles.DEFAULT, function (props) { return (props.$invalid && !props.$readOnly ? Colors.RED.Hex : Colors.BLACK.Hex); }, function (props) { return (props.$readOnly ? 0.6 : 1); }, function (props) { return (props.$readOnly ? '#cccccc' : Colors.PRIMARY.Hex); });
2933
- var StyledSuffix = styled.div(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 10px;\n height: auto;\n background: #f5f5f5;\n border-width: 1px 1px 1px 0px;\n border-style: solid;\n border-color: #cccccc;\n border-radius: 0px 4px 4px 0px;\n font-family: ", ";\n font-style: normal;\n font-weight: 400;\n font-size: ", ";\n color: Colors.BLACK.Hex;\n"], ["\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 10px;\n height: auto;\n background: #f5f5f5;\n border-width: 1px 1px 1px 0px;\n border-style: solid;\n border-color: #cccccc;\n border-radius: 0px 4px 4px 0px;\n font-family: ", ";\n font-style: normal;\n font-weight: 400;\n font-size: ", ";\n color: Colors.BLACK.Hex;\n"])), FontStyles.DEFAULT, FontSizes.DEFAULT);
2934
- var StyledWrapper = styled.div(templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject(["\n display: flex;\n width: ", ";\n"], ["\n display: flex;\n width: ", ";\n"])), function (_a) {
2935
- var $style = _a.$style;
2936
- return ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto';
2937
- });
2938
- var StyledTextarea = styled.textarea(templateObject_4$4 || (templateObject_4$4 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 4px;\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n font-size: ", ";\n font-weight: 400;\n font-family: ", ";\n line-height: 1.6em;\n color: ", ";\n position: relative;\n height: ", ";\n padding: 10px;\n opacity: ", ";\n box-shadow: none;\n outline: none;\n padding: 10px,\n margin: 0px,\n text-indent: 0px,\n --webkit-appearance: none;\n box-sizing: border-box;\n display: block;\n width: ", ";\n &:focus {\n border-color: ", ";\n }\n"], ["\n background-color: ", ";\n border-radius: 4px;\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n font-size: ", ";\n font-weight: 400;\n font-family: ", ";\n line-height: 1.6em;\n color: ", ";\n position: relative;\n height: ", ";\n padding: 10px;\n opacity: ", ";\n box-shadow: none;\n outline: none;\n padding: 10px,\n margin: 0px,\n text-indent: 0px,\n --webkit-appearance: none;\n box-sizing: border-box;\n display: block;\n width: ", ";\n &:focus {\n border-color: ", ";\n }\n"])), function (props) { return (props.$readOnly ? '#f5f5f5' : '#ffffff'); }, function (props) { return (props.$invalid && !props.$readOnly ? Colors.RED.Hex : '#cccccc'); }, FontSizes.DEFAULT, FontStyles.DEFAULT, function (props) { return (props.$invalid && !props.$readOnly ? Colors.RED.Hex : Colors.BLACK.Hex); }, function (props) { return props.$height || '40px'; }, function (props) { return (props.$readOnly ? 0.6 : 1); }, function (_a) {
2939
- var $style = _a.$style;
2940
- return ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto';
2941
- }, function (props) { return (props.$readOnly ? '#cccccc' : Colors.PRIMARY.Hex); });
2942
- var Input$1 = function (_a) {
2943
- var format = _a.format, suffix = _a.suffix, height = _a.height, invalid = _a.invalid, max = _a.max, maxLength = _a.maxLength, min = _a.min, onBlur = _a.onBlur, onChange = _a.onChange, onKeyDown = _a.onKeyDown, placeholder = _a.placeholder, readOnly = _a.readOnly, step = _a.step, style = _a.style, _b = _a.type, type = _b === void 0 ? 'text' : _b, _c = _a.value, value = _c === void 0 ? '' : _c, accessibleProps = __rest(_a, ["format", "suffix", "height", "invalid", "max", "maxLength", "min", "onBlur", "onChange", "onKeyDown", "placeholder", "readOnly", "step", "style", "type", "value"]);
2944
- var handleInputChange = function (e) {
3376
+ const StyledInput = styled.input `
3377
+ background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
3378
+ border-radius: ${props => (props.$suffix ? '4px 0px 0px 4px' : '4px')};
3379
+ border-width: 1px;
3380
+ border-style: solid;
3381
+ border-color: ${props => (props.$invalid && !props.$readOnly ? Colors.RED.Hex : '#cccccc')};
3382
+ font-size: ${FontSizes.DEFAULT};
3383
+ font-weight: 400;
3384
+ font-family: ${FontStyles.DEFAULT};
3385
+ line-height: 1.28em;
3386
+ color: ${props => (props.$invalid && !props.$readOnly ? Colors.RED.Hex : Colors.BLACK.Hex)};
3387
+ position: relative;
3388
+ height: auto;
3389
+ padding: 10px;
3390
+ opacity: ${props => (props.$readOnly ? 0.6 : 1)};
3391
+ box-shadow: none;
3392
+ outline: none;
3393
+ margin: 0px;
3394
+ text-indent: 0px;
3395
+ --webkit-appearance: none;
3396
+ box-sizing: border-box;
3397
+ display: block;
3398
+ width: 100%;
3399
+ &:focus {
3400
+ border-color: ${props => (props.$readOnly ? '#cccccc' : Colors.PRIMARY.Hex)};
3401
+ }
3402
+ `;
3403
+ const StyledSuffix = styled.div `
3404
+ box-sizing: border-box;
3405
+ display: flex;
3406
+ justify-content: center;
3407
+ align-items: center;
3408
+ padding: 10px;
3409
+ height: auto;
3410
+ background: #f5f5f5;
3411
+ border-width: 1px 1px 1px 0px;
3412
+ border-style: solid;
3413
+ border-color: #cccccc;
3414
+ border-radius: 0px 4px 4px 0px;
3415
+ font-family: ${FontStyles.DEFAULT};
3416
+ font-style: normal;
3417
+ font-weight: 400;
3418
+ font-size: ${FontSizes.DEFAULT};
3419
+ color: Colors.BLACK.Hex;
3420
+ `;
3421
+ const StyledWrapper = styled.div `
3422
+ display: flex;
3423
+ width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
3424
+ `;
3425
+ const StyledTextarea = styled.textarea `
3426
+ background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
3427
+ border-radius: 4px;
3428
+ border-width: 1px;
3429
+ border-style: solid;
3430
+ border-color: ${props => (props.$invalid && !props.$readOnly ? Colors.RED.Hex : '#cccccc')};
3431
+ font-size: ${FontSizes.DEFAULT};
3432
+ font-weight: 400;
3433
+ font-family: ${FontStyles.DEFAULT};
3434
+ line-height: 1.6em;
3435
+ color: ${props => (props.$invalid && !props.$readOnly ? Colors.RED.Hex : Colors.BLACK.Hex)};
3436
+ position: relative;
3437
+ height: ${props => props.$height || '40px'};
3438
+ padding: 10px;
3439
+ opacity: ${props => (props.$readOnly ? 0.6 : 1)};
3440
+ box-shadow: none;
3441
+ outline: none;
3442
+ padding: 10px,
3443
+ margin: 0px,
3444
+ text-indent: 0px,
3445
+ --webkit-appearance: none;
3446
+ box-sizing: border-box;
3447
+ display: block;
3448
+ width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
3449
+ &:focus {
3450
+ border-color: ${props => (props.$readOnly ? '#cccccc' : Colors.PRIMARY.Hex)};
3451
+ }
3452
+ `;
3453
+ const Input$1 = (_a) => {
3454
+ var { format, suffix, height, invalid, max, maxLength, min, onBlur, onChange, onKeyDown, placeholder, readOnly, step, style, type = 'text', value = '' } = _a, accessibleProps = __rest(_a, ["format", "suffix", "height", "invalid", "max", "maxLength", "min", "onBlur", "onChange", "onKeyDown", "placeholder", "readOnly", "step", "style", "type", "value"]);
3455
+ const handleInputChange = (e) => {
2945
3456
  if (format === 'currency' || format === 'currency_decimal') {
2946
3457
  e.target.value = e.target.value.replace(/[^0-9.]/g, '');
2947
3458
  }
@@ -2955,44 +3466,55 @@ var Input$1 = function (_a) {
2955
3466
  e.target.value = e.target.value.toLowerCase();
2956
3467
  }
2957
3468
  if (type === 'number' && max && parseInt(e.target.value, 10) > parseInt(max, 10)) {
2958
- e.target.value = "".concat(max);
3469
+ e.target.value = `${max}`;
2959
3470
  }
2960
3471
  if (!readOnly && onChange)
2961
3472
  onChange(e);
2962
3473
  };
2963
- var handleTextareaChange = function (e) {
3474
+ const handleTextareaChange = (e) => {
2964
3475
  if (!readOnly && onChange)
2965
3476
  onChange(e);
2966
3477
  };
2967
- var formatted_value = value;
3478
+ let formatted_value = value;
2968
3479
  if (format === 'phone') {
2969
3480
  formatted_value = formatAsPhone(value);
2970
3481
  }
2971
3482
  if (format === 'currency') {
2972
- if ("".concat(value).length) {
3483
+ if (`${value}`.length) {
2973
3484
  formatted_value = Numeral(value).format('$0,0');
2974
3485
  }
2975
3486
  }
2976
3487
  if (format === 'currency_decimal') {
2977
- formatted_value = "$".concat(formatted_value);
3488
+ formatted_value = `$${formatted_value}`;
2978
3489
  }
2979
3490
  if (format === 'ssn' && type !== 'password') {
2980
3491
  formatted_value = formatAsSsn(value);
2981
3492
  }
2982
- return type === 'textarea' ? (React.createElement(StyledTextarea, __assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$style": style, maxLength: maxLength, onBlur: onBlur, onChange: handleTextareaChange, placeholder: placeholder, value: value }, accessibleProps))) : (React.createElement(StyledWrapper, { "$style": style },
2983
- React.createElement(StyledInput, __assign({ "$invalid": invalid, "$readOnly": readOnly, "$suffix": suffix, max: max, maxLength: maxLength, min: min, onBlur: onBlur, onChange: handleInputChange, onKeyDown: onKeyDown, placeholder: placeholder, step: step, type: type, value: formatted_value }, accessibleProps)),
3493
+ return type === 'textarea' ? (React.createElement(StyledTextarea, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$style": style, maxLength: maxLength, onBlur: onBlur, onChange: handleTextareaChange, placeholder: placeholder, value: value }, accessibleProps))) : (React.createElement(StyledWrapper, { "$style": style },
3494
+ React.createElement(StyledInput, Object.assign({ "$invalid": invalid, "$readOnly": readOnly, "$suffix": suffix, max: max, maxLength: maxLength, min: min, onBlur: onBlur, onChange: handleInputChange, onKeyDown: onKeyDown, placeholder: placeholder, step: step, type: type, value: formatted_value }, accessibleProps)),
2984
3495
  suffix && React.createElement(StyledSuffix, null, suffix)));
2985
- };
2986
- var templateObject_1$b, templateObject_2$9, templateObject_3$8, templateObject_4$4;
3496
+ };
2987
3497
 
2988
- var Wrapper$8 = styled.a(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n font-weight: 500;\n font-style: normal;\n text-decoration: 'none';\n font-family: 'Roboto', Helvetica, Arial, sans-serif;\n margin: 0px;\n padding: 0px;\n box-sizing: border-box;\n cursor: pointer;\n"], ["\n color: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n font-weight: 500;\n font-style: normal;\n text-decoration: 'none';\n font-family: 'Roboto', Helvetica, Arial, sans-serif;\n margin: 0px;\n padding: 0px;\n box-sizing: border-box;\n cursor: pointer;\n"])), Colors.PRIMARY.Hex, function (props) { return (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT); }, function (props) { return (props.$small ? '1.5em' : '1.6em'); }, function (props) { return (props.$small ? '1px' : '0px'); });
2989
- var Link = function (_a) {
2990
- var children = _a.children, onClick = _a.onClick, small = _a.small, accessibleProps = __rest(_a, ["children", "onClick", "small"]);
2991
- return (React.createElement(Wrapper$8, __assign({ "$small": small, onClick: onClick }, accessibleProps), children));
2992
- };
2993
- var templateObject_1$a;
3498
+ const Wrapper$8 = styled.a `
3499
+ color: ${Colors.PRIMARY.Hex};
3500
+ font-size: ${props => (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT)};
3501
+ line-height: ${props => (props.$small ? '1.5em' : '1.6em')};
3502
+ letter-spacing: ${props => (props.$small ? '1px' : '0px')};
3503
+ font-weight: 500;
3504
+ font-style: normal;
3505
+ text-decoration: 'none';
3506
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
3507
+ margin: 0px;
3508
+ padding: 0px;
3509
+ box-sizing: border-box;
3510
+ cursor: pointer;
3511
+ `;
3512
+ const Link = (_a) => {
3513
+ var { children, onClick, small } = _a, accessibleProps = __rest(_a, ["children", "onClick", "small"]);
3514
+ return (React.createElement(Wrapper$8, Object.assign({ "$small": small, onClick: onClick }, accessibleProps), children));
3515
+ };
2994
3516
 
2995
- var colorMapping = {
3517
+ const colorMapping = {
2996
3518
  black: {
2997
3519
  fill_1: '#000000',
2998
3520
  fill_2: '#000000',
@@ -3014,15 +3536,15 @@ var colorMapping = {
3014
3536
  fill_3: '#E82425',
3015
3537
  },
3016
3538
  };
3017
- var Logo = function (_a) {
3018
- var _b = _a.type, type = _b === void 0 ? 'standard_full' : _b, _c = _a.height, height = _c === void 0 ? '50px' : _c, accessibleProps = __rest(_a, ["type", "height"]);
3019
- var type_parts = type.split('_');
3539
+ const Logo = (_a) => {
3540
+ var { type = 'standard_full', height = '50px' } = _a, accessibleProps = __rest(_a, ["type", "height"]);
3541
+ const type_parts = type.split('_');
3020
3542
  switch (type_parts[0]) {
3021
3543
  case 'mark':
3022
- return (React.createElement("svg", __assign({ fill: 'none', height: height, viewBox: '0 0 58 51', width: '100%', xmlns: 'http://www.w3.org/2000/svg' }, accessibleProps),
3544
+ return (React.createElement("svg", Object.assign({ fill: 'none', height: height, viewBox: '0 0 58 51', width: '100%', xmlns: 'http://www.w3.org/2000/svg' }, accessibleProps),
3023
3545
  React.createElement("path", { d: 'M43.9348 -1.14441e-05H13.3724L0 25.2376L7.27148 38.0136L14.1215 50.0487H43.1856L57.3077 25.2376L43.9348 -1.14441e-05ZM38.206 9.49903L46.459 25.0743L37.6507 40.5497H19.6567L15.5417 33.3199L10.8487 25.0743L19.1013 9.49903H38.206Z', fill: type_parts[1] })));
3024
3546
  default:
3025
- return (React.createElement("svg", __assign({ fill: 'none', height: height, preserveAspectRatio: 'xMidYMid meet', viewBox: '0 0 236 50', width: '100%', xmlns: 'http://www.w3.org/2000/svg' }, accessibleProps),
3547
+ return (React.createElement("svg", Object.assign({ fill: 'none', height: height, preserveAspectRatio: 'xMidYMid meet', viewBox: '0 0 236 50', width: '100%', xmlns: 'http://www.w3.org/2000/svg' }, accessibleProps),
3026
3548
  React.createElement("path", { d: 'M230.794 29.59H219.306L214.279 39.0907L217.012 43.9001L219.587 48.4308H230.512L235.821 39.0907L230.794 29.59V29.59ZM228.641 33.1659L231.743 39.0292L228.432 44.8549H221.668L220.121 42.1332L218.356 39.0292L221.459 33.1659H228.641Z', fill: colorMapping[type_parts[1]].fill_3 }),
3027
3549
  React.createElement("path", { d: 'M211.662 42.6033L199.206 42.6319C196.339 42.6319 193.862 41.6095 191.846 39.5923C189.828 37.5755 188.805 35.0985 188.805 32.2321C188.805 29.3656 189.828 26.8886 191.846 24.8718C193.848 22.8332 196.325 21.7975 199.206 21.7975C202.072 21.7975 204.549 22.8199 206.566 24.8374C207.613 25.8847 208.391 27.093 208.944 28.5312L209.253 29.3327H197.87L196.325 32.2579L197.921 35.0969H211.458L215.015 28.6192C214.296 25.5702 212.835 22.9293 210.672 20.7657C207.531 17.6257 203.674 16.0333 199.206 16.0333C194.737 16.0333 190.88 17.6257 187.739 20.7657C184.555 23.9501 183.007 27.7011 183.007 32.2321C183.007 36.7001 184.599 40.5577 187.739 43.6981C190.88 46.8384 194.737 48.4308 199.206 48.4308H210.095L214.745 48.3297L211.662 42.6033', fill: colorMapping[type_parts[1]].fill_1 }),
3028
3550
  React.createElement("path", { d: 'M160.945 19.133L158.826 20.8384C155.734 23.9359 154.141 27.8058 154.141 32.2967L154.141 47.7903L156.985 49.407L159.939 47.8778L159.94 32.2967C159.94 29.6632 160.778 27.3706 162.432 25.4846C162.615 25.2739 162.811 25.0666 163.018 24.8639C163.074 24.8155 164.138 24.0061 164.811 23.5592C166.321 22.5576 168.076 21.9876 170.024 21.8632L170.166 21.8621C172.923 21.8621 175.32 22.7325 177.301 24.4494L180.146 23.0088L180.246 19.3426C177.44 17.1664 174.132 16.0633 170.408 16.0633C166.909 16.0633 163.725 17.0962 160.945 19.133', fill: colorMapping[type_parts[1]].fill_1 }),
@@ -3034,21 +3556,111 @@ var Logo = function (_a) {
3034
3556
  }
3035
3557
  };
3036
3558
 
3037
- var Wrapper$7 = styled.div(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject(["\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 9999;\n background: rgba(0, 0, 0, 0.8);\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 9999;\n background: rgba(0, 0, 0, 0.8);\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
3038
- var Container$1 = styled.dialog(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject(["\n max-width: ", ";\n width: auto;\n border-radius: 8px;\n overflow: hidden;\n box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);\n outline: none;\n border: none;\n position: relative;\n padding: 0px;\n box-sizing: border-box;\n"], ["\n max-width: ", ";\n width: auto;\n border-radius: 8px;\n overflow: hidden;\n box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);\n outline: none;\n border: none;\n position: relative;\n padding: 0px;\n box-sizing: border-box;\n"])), function (props) { return props.$maxWidth || '90vw'; });
3039
- var Header$1 = styled.div(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject(["\n position: sticky;\n top: 0;\n padding: 20px;\n border-bottom: 1px solid #e7e6e6;\n display: flex;\n align-items: center;\n background: #ffffff;\n box-sizing: border-box;\n"], ["\n position: sticky;\n top: 0;\n padding: 20px;\n border-bottom: 1px solid #e7e6e6;\n display: flex;\n align-items: center;\n background: #ffffff;\n box-sizing: border-box;\n"])));
3040
- var Close = styled.div(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject(["\n margin-left: auto;\n display: flex;\n align-items: center;\n padding-left: 20px;\n cursor: pointer;\n"], ["\n margin-left: auto;\n display: flex;\n align-items: center;\n padding-left: 20px;\n cursor: pointer;\n"])));
3041
- var CloseMsg = styled.span(templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject(["\n font-size: ", ";\n font-weight: 400;\n font-family: ", ";\n line-height: 1em;\n color: ", ";\n"], ["\n font-size: ", ";\n font-weight: 400;\n font-family: ", ";\n line-height: 1em;\n color: ", ";\n"])), FontSizes.SMALL, FontStyles.DEFAULT, Colors.MEDIUM_GRAY.Hex);
3042
- var Steps = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n padding: 20px;\n border-bottom: 1px solid #e7e6e6;\n background: #f5f5f5;\n display: flex;\n gap: 30px;\n align-items: center;\n"], ["\n padding: 20px;\n border-bottom: 1px solid #e7e6e6;\n background: #f5f5f5;\n display: flex;\n gap: 30px;\n align-items: center;\n"])));
3043
- var Step = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 8px;\n"], ["\n display: flex;\n align-items: center;\n gap: 8px;\n"])));
3044
- var StepIndicator = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n width: 30px;\n height: 30px;\n border-radius: 15px;\n background: ", ";\n color: ", ";\n font-family: 'Roboto', Helvetica, Arial, sans-serif;\n font-size: 14px;\n font-weight: 500;\n line-height: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n"], ["\n width: 30px;\n height: 30px;\n border-radius: 15px;\n background: ", ";\n color: ", ";\n font-family: 'Roboto', Helvetica, Arial, sans-serif;\n font-size: 14px;\n font-weight: 500;\n line-height: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n"])), function (props) { return (props.$active ? Colors.PRIMARY.Hex : Colors.LIGHT_GRAY.Hex); }, function (props) { return (props.$active ? '#fff' : Colors.MEDIUM_GRAY.Hex); });
3045
- var StepLabel = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n color: #000;\n font-family: 'Roboto', Helvetica, Arial, sans-serif;\n font-size: 14px;\n font-weight: 500;\n line-height: 1;\n"], ["\n color: #000;\n font-family: 'Roboto', Helvetica, Arial, sans-serif;\n font-size: 14px;\n font-weight: 500;\n line-height: 1;\n"])));
3046
- var ContentWrapper = styled.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n overflow-x: hidden;\n overflow-y: auto;\n background: #ffffff;\n max-height: calc(100vh - 260px);\n box-sizing: border-box;\n"], ["\n overflow-x: hidden;\n overflow-y: auto;\n background: #ffffff;\n max-height: calc(100vh - 260px);\n box-sizing: border-box;\n"])));
3047
- var ButtonBar = styled.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n position: sticky;\n bottom: 0;\n background: #ffffff;\n padding: 20px;\n border-top: 1px solid #e7e6e6;\n display: flex;\n align-items: center;\n justify-self: flex-end;\n box-sizing: border-box;\n"], ["\n position: sticky;\n bottom: 0;\n background: #ffffff;\n padding: 20px;\n border-top: 1px solid #e7e6e6;\n display: flex;\n align-items: center;\n justify-self: flex-end;\n box-sizing: border-box;\n"])));
3048
- var Modal = function (_a) {
3049
- var children = _a.children, title = _a.title, onClose = _a.onClose, maxWidth = _a.maxWidth, steps = _a.steps, primaryButton = _a.primaryButton, secondaryButton = _a.secondaryButton, tertiaryButton = _a.tertiaryButton, accessibleProps = __rest(_a, ["children", "title", "onClose", "maxWidth", "steps", "primaryButton", "secondaryButton", "tertiaryButton"]);
3050
- useEffect(function () {
3051
- document.onkeydown = function (e) {
3559
+ const Wrapper$7 = styled.div `
3560
+ position: fixed;
3561
+ top: 0;
3562
+ right: 0;
3563
+ bottom: 0;
3564
+ left: 0;
3565
+ z-index: 9999;
3566
+ background: rgba(0, 0, 0, 0.8);
3567
+ display: flex;
3568
+ align-items: center;
3569
+ justify-content: center;
3570
+ `;
3571
+ const Container$1 = styled.dialog `
3572
+ max-width: ${props => props.$maxWidth || '90vw'};
3573
+ width: auto;
3574
+ border-radius: 8px;
3575
+ overflow: hidden;
3576
+ box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
3577
+ outline: none;
3578
+ border: none;
3579
+ position: relative;
3580
+ padding: 0px;
3581
+ box-sizing: border-box;
3582
+ `;
3583
+ const Header$1 = styled.div `
3584
+ position: sticky;
3585
+ top: 0;
3586
+ padding: 20px;
3587
+ border-bottom: 1px solid #e7e6e6;
3588
+ display: flex;
3589
+ align-items: center;
3590
+ background: #ffffff;
3591
+ box-sizing: border-box;
3592
+ `;
3593
+ const Close = styled.div `
3594
+ margin-left: auto;
3595
+ display: flex;
3596
+ align-items: center;
3597
+ padding-left: 20px;
3598
+ cursor: pointer;
3599
+ `;
3600
+ const CloseMsg = styled.span `
3601
+ font-size: ${FontSizes.SMALL};
3602
+ font-weight: 400;
3603
+ font-family: ${FontStyles.DEFAULT};
3604
+ line-height: 1em;
3605
+ color: ${Colors.MEDIUM_GRAY.Hex};
3606
+ `;
3607
+ const Steps = styled.div `
3608
+ padding: 20px;
3609
+ border-bottom: 1px solid #e7e6e6;
3610
+ background: #f5f5f5;
3611
+ display: flex;
3612
+ gap: 30px;
3613
+ align-items: center;
3614
+ `;
3615
+ const Step = styled.div `
3616
+ display: flex;
3617
+ align-items: center;
3618
+ gap: 8px;
3619
+ `;
3620
+ const StepIndicator = styled.div `
3621
+ width: 30px;
3622
+ height: 30px;
3623
+ border-radius: 15px;
3624
+ background: ${props => (props.$active ? Colors.PRIMARY.Hex : Colors.LIGHT_GRAY.Hex)};
3625
+ color: ${props => (props.$active ? '#fff' : Colors.MEDIUM_GRAY.Hex)};
3626
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
3627
+ font-size: 14px;
3628
+ font-weight: 500;
3629
+ line-height: 1;
3630
+ display: flex;
3631
+ align-items: center;
3632
+ justify-content: center;
3633
+ flex-shrink: 0;
3634
+ `;
3635
+ const StepLabel = styled.div `
3636
+ color: #000;
3637
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
3638
+ font-size: 14px;
3639
+ font-weight: 500;
3640
+ line-height: 1;
3641
+ `;
3642
+ const ContentWrapper = styled.div `
3643
+ overflow-x: hidden;
3644
+ overflow-y: auto;
3645
+ background: #ffffff;
3646
+ max-height: calc(100vh - 260px);
3647
+ box-sizing: border-box;
3648
+ `;
3649
+ const ButtonBar = styled.div `
3650
+ position: sticky;
3651
+ bottom: 0;
3652
+ background: #ffffff;
3653
+ padding: 20px;
3654
+ border-top: 1px solid #e7e6e6;
3655
+ display: flex;
3656
+ align-items: center;
3657
+ justify-self: flex-end;
3658
+ box-sizing: border-box;
3659
+ `;
3660
+ const Modal = (_a) => {
3661
+ var { children, title, onClose, maxWidth, steps, primaryButton, secondaryButton, tertiaryButton } = _a, accessibleProps = __rest(_a, ["children", "title", "onClose", "maxWidth", "steps", "primaryButton", "secondaryButton", "tertiaryButton"]);
3662
+ useEffect(() => {
3663
+ document.onkeydown = e => {
3052
3664
  if (e.key === 'Escape') {
3053
3665
  onClose();
3054
3666
  }
@@ -3058,49 +3670,44 @@ var Modal = function (_a) {
3058
3670
  };
3059
3671
  }, []);
3060
3672
  return (React.createElement(Wrapper$7, null,
3061
- React.createElement(Container$1, __assign({ "$maxWidth": maxWidth, open: true }, accessibleProps),
3673
+ React.createElement(Container$1, Object.assign({ "$maxWidth": maxWidth, open: true }, accessibleProps),
3062
3674
  React.createElement(Header$1, null,
3063
3675
  title ? React.createElement(Heading, { type: 'secondary' }, title) : null,
3064
3676
  React.createElement(Close, { onClick: onClose },
3065
3677
  React.createElement(CloseMsg, null, "(Esc)"),
3066
3678
  React.createElement(Icon, { color: Colors.BLACK.Hex, path: mdiClose, size: '24px' }))),
3067
- steps ? (React.createElement(Steps, null, steps.map(function (step, i) {
3679
+ steps ? (React.createElement(Steps, null, steps.map((step, i) => {
3068
3680
  return (React.createElement(Step, { key: i },
3069
3681
  step.complete ? (React.createElement(Icon, { color: Colors.PRIMARY.Hex, path: mdiCheckboxMarkedCircleOutline, size: '32px' })) : (React.createElement(StepIndicator, { "$active": step.active }, i + 1)),
3070
3682
  React.createElement(StepLabel, null, step.label)));
3071
3683
  }))) : null,
3072
3684
  React.createElement(ContentWrapper, null, children),
3073
3685
  primaryButton || secondaryButton || tertiaryButton ? (React.createElement(ButtonBar, null,
3074
- tertiaryButton ? React.createElement(Button, __assign({}, tertiaryButton, { format: 'secondary' })) : null,
3686
+ tertiaryButton ? React.createElement(Button, Object.assign({}, tertiaryButton, { format: 'secondary' })) : null,
3075
3687
  primaryButton || secondaryButton ? (React.createElement("div", { style: {
3076
3688
  marginLeft: 'auto',
3077
3689
  paddingLeft: 40,
3078
3690
  display: 'flex',
3079
3691
  alignItems: 'center',
3080
3692
  } },
3081
- secondaryButton ? React.createElement(Button, __assign({}, secondaryButton, { format: 'secondary' })) : null,
3082
- primaryButton ? (React.createElement(Button, __assign({}, primaryButton, { format: 'primary', margin: '0px 0px 0px 10px' }))) : null)) : null)) : null)));
3083
- };
3084
- var templateObject_1$9, templateObject_2$8, templateObject_3$7, templateObject_4$3, templateObject_5$2, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
3085
-
3086
- var Wrapper$6 = styled.div(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n background: #fff;\n border-radius: 8px;\n box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);\n display: flex;\n flex-direction: column;\n gap: 4px;\n max-height: ", ";\n padding: 10px;\n width: 200px;\n"], ["\n background: #fff;\n border-radius: 8px;\n box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);\n display: flex;\n flex-direction: column;\n gap: 4px;\n max-height: ", ";\n padding: 10px;\n width: 200px;\n"])), function (props) { return props.$maxHeight || '312px'; });
3087
- var MenuItem = styled.div(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n align-items: center;\n border-radius: 8px;\n border: 1px solid transparent;\n display: flex;\n gap: 8px;\n height: 38px;\n padding: 8px;\n &:hover {\n background: rgba(1, 147, 215, 0.1);\n cursor: pointer;\n\n svg,\n path {\n fill: ", " !important;\n }\n }\n"], ["\n align-items: center;\n border-radius: 8px;\n border: 1px solid transparent;\n display: flex;\n gap: 8px;\n height: 38px;\n padding: 8px;\n &:hover {\n background: rgba(1, 147, 215, 0.1);\n cursor: pointer;\n\n svg,\n path {\n fill: ", " !important;\n }\n }\n"])), Colors.PRIMARY.Hex);
3088
- var Title = styled.span(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n font-family: Roboto;\n font-size: 14px;\n font-weight: 400;\n height: auto;\n letter-spacing: 0px;\n line-height: 22px;\n text-align: left;\n"], ["\n font-family: Roboto;\n font-size: 14px;\n font-weight: 400;\n height: auto;\n letter-spacing: 0px;\n line-height: 22px;\n text-align: left;\n"])));
3089
- var MoreMenu = function (_a) {
3090
- var maxHeight = _a.maxHeight, _b = _a.menuItems, menuItems = _b === void 0 ? [] : _b, accessibleProps = __rest(_a, ["maxHeight", "menuItems"]);
3091
- return (React.createElement(Wrapper$6, __assign({ "$maxHeight": maxHeight }, accessibleProps), menuItems.map(function (item) {
3092
- return (React.createElement(MenuItem, { onClick: item.onClick },
3093
- item.icon ? (React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: item.icon, size: '20px' })) : null,
3094
- React.createElement(Title, null, item.label)));
3095
- })));
3096
- };
3097
- var templateObject_1$8, templateObject_2$7, templateObject_3$6;
3693
+ secondaryButton ? React.createElement(Button, Object.assign({}, secondaryButton, { format: 'secondary' })) : null,
3694
+ primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: 'primary', margin: '0px 0px 0px 10px' }))) : null)) : null)) : null)));
3695
+ };
3098
3696
 
3099
- var Wrapper$5 = styled.div(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n position: relative;\n width: ", ";\n"], ["\n position: relative;\n width: ", ";\n"])), function (_a) {
3100
- var $style = _a.$style;
3101
- return ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto';
3102
- });
3103
- var Trigger = styled.div(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject(["\n box-sizing: border-box;\n border-radius: ", ";\n height: 40px;\n padding: 0 10px;\n position: relative;\n cursor: pointer;\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n background-color: ", ";\n background-image: none;\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: space-between;\n z-index: 1;\n"], ["\n box-sizing: border-box;\n border-radius: ", ";\n height: 40px;\n padding: 0 10px;\n position: relative;\n cursor: pointer;\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n background-color: ", ";\n background-image: none;\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: space-between;\n z-index: 1;\n"])), function (props) { return (props.$showOptions ? '4px 4px 0px 0px' : '4px'); }, function (props) {
3697
+ const Wrapper$6 = styled.div `
3698
+ position: relative;
3699
+ width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
3700
+ `;
3701
+ const Trigger = styled.div `
3702
+ box-sizing: border-box;
3703
+ border-radius: ${props => (props.$showOptions ? '4px 4px 0px 0px' : '4px')};
3704
+ height: 40px;
3705
+ padding: 0 10px;
3706
+ position: relative;
3707
+ cursor: pointer;
3708
+ border-width: 1px;
3709
+ border-style: solid;
3710
+ border-color: ${props => {
3104
3711
  if (props.$invalid) {
3105
3712
  return Colors.RED.Hex;
3106
3713
  }
@@ -3110,156 +3717,408 @@ var Trigger = styled.div(templateObject_2$6 || (templateObject_2$6 = __makeTempl
3110
3717
  else {
3111
3718
  return '#cccccc';
3112
3719
  }
3113
- }, function (props) { return (props.$readOnly ? '#f5f5f5' : '#ffffff'); });
3114
- var Value = styled.div(templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n line-height: 2.9em;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n"], ["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n line-height: 2.9em;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n"])), Colors.BLACK.Hex, FontStyles.DEFAULT, FontSizes.DEFAULT);
3115
- var Options = styled.div(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n background: #fff;\n box-shadow: 0px 5px 30px -15px rgba(0, 0, 0, 0.2);\n border-color: ", ";\n border-radius: 0px 0px 4px 4px;\n border-style: solid;\n border-top: none;\n border-width: 1px;\n left: 0;\n position: absolute;\n right: 0;\n z-index: 10;\n max-height: 220px;\n overflow: auto;\n"], ["\n background: #fff;\n box-shadow: 0px 5px 30px -15px rgba(0, 0, 0, 0.2);\n border-color: ", ";\n border-radius: 0px 0px 4px 4px;\n border-style: solid;\n border-top: none;\n border-width: 1px;\n left: 0;\n position: absolute;\n right: 0;\n z-index: 10;\n max-height: 220px;\n overflow: auto;\n"])), Colors.PRIMARY.Hex);
3116
- var Scrim = styled.div(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n bottom: 0;\n left: 0;\n position: fixed;\n right: 0;\n top: 0;\n z-index: 9;\n"], ["\n bottom: 0;\n left: 0;\n position: fixed;\n right: 0;\n top: 0;\n z-index: 9;\n"])));
3117
- var MultiSelect = function (_a) {
3118
- var readOnly = _a.readOnly, _b = _a.displayCount, displayCount = _b === void 0 ? 3 : _b, invalid = _a.invalid, onChange = _a.onChange, _c = _a.options, options = _c === void 0 ? [] : _c, _d = _a.selected, selected = _d === void 0 ? [] : _d, showSelectAll = _a.showSelectAll, style = _a.style, accessibleProps = __rest(_a, ["readOnly", "displayCount", "invalid", "onChange", "options", "selected", "showSelectAll", "style"]);
3119
- var _e = useState(false), showOptions = _e[0], setShowOptions = _e[1];
3120
- var selected_options = options.filter(function (o) { return selected.includes(o.value); });
3121
- return (React.createElement(Wrapper$5, { "$style": style },
3122
- React.createElement(Trigger, __assign({ "$invalid": invalid, "$readOnly": readOnly, "$showOptions": showOptions, onClick: readOnly ? undefined : setShowOptions.bind(null, !showOptions) }, accessibleProps),
3720
+ }};
3721
+ background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
3722
+ background-image: none;
3723
+ display: flex;
3724
+ width: 100%;
3725
+ align-items: center;
3726
+ justify-content: space-between;
3727
+ z-index: 1;
3728
+ `;
3729
+ const Value = styled.div `
3730
+ color: ${Colors.BLACK.Hex};
3731
+ font-family: ${FontStyles.DEFAULT};
3732
+ font-size: ${FontSizes.DEFAULT};
3733
+ font-weight: 400;
3734
+ line-height: 2.9em;
3735
+ overflow: hidden;
3736
+ text-overflow: ellipsis;
3737
+ white-space: nowrap;
3738
+ width: 100%;
3739
+ `;
3740
+ const Options = styled.div `
3741
+ background: #fff;
3742
+ box-shadow: 0px 5px 30px -15px rgba(0, 0, 0, 0.2);
3743
+ border-color: ${Colors.PRIMARY.Hex};
3744
+ border-radius: 0px 0px 4px 4px;
3745
+ border-style: solid;
3746
+ border-top: none;
3747
+ border-width: 1px;
3748
+ left: 0;
3749
+ position: absolute;
3750
+ right: 0;
3751
+ z-index: 10;
3752
+ max-height: 220px;
3753
+ overflow: auto;
3754
+ `;
3755
+ const Scrim = styled.div `
3756
+ bottom: 0;
3757
+ left: 0;
3758
+ position: fixed;
3759
+ right: 0;
3760
+ top: 0;
3761
+ z-index: 9;
3762
+ `;
3763
+ const MultiSelect = (_a) => {
3764
+ var { readOnly, displayCount = 3, invalid, onChange, options = [], selected = [], showSelectAll, style } = _a, accessibleProps = __rest(_a, ["readOnly", "displayCount", "invalid", "onChange", "options", "selected", "showSelectAll", "style"]);
3765
+ const [showOptions, setShowOptions] = useState(false);
3766
+ const selected_options = options.filter(o => selected.includes(o.value));
3767
+ return (React.createElement(Wrapper$6, { "$style": style },
3768
+ React.createElement(Trigger, Object.assign({ "$invalid": invalid, "$readOnly": readOnly, "$showOptions": showOptions, onClick: readOnly ? undefined : setShowOptions.bind(null, !showOptions) }, accessibleProps),
3123
3769
  React.createElement(Value, null, selected.length > 0 && selected.length <= displayCount
3124
- ? selected_options.map(function (o) { return o.label || o.value; }).join(', ')
3125
- : "".concat(selected_options.length, " Selected")),
3770
+ ? selected_options.map(o => o.label || o.value).join(', ')
3771
+ : `${selected_options.length} Selected`),
3126
3772
  React.createElement(Icon, { color: Colors.BLACK.Hex, path: showOptions ? mdiChevronUp : mdiChevronDown, size: '22px' })),
3127
3773
  showOptions ? (React.createElement(Options, null,
3128
3774
  React.createElement(Checklist, { onChange: onChange, options: options, selected: selected, showSelectAll: showSelectAll }))) : null,
3129
3775
  showOptions ? React.createElement(Scrim, { onClick: setShowOptions.bind(null, !showOptions) }) : null));
3130
- };
3131
- var templateObject_1$7, templateObject_2$6, templateObject_3$5, templateObject_4$2, templateObject_5$1;
3132
-
3133
- var Wrapper$4 = styled.nav(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n column-gap: 10px;\n"], ["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n column-gap: 10px;\n"])));
3134
- var Pagination = function (_a) {
3135
- var _b = _a.currentPage, currentPage = _b === void 0 ? 1 : _b, onClick = _a.onClick, _c = _a.pageCount, pageCount = _c === void 0 ? 0 : _c, accessibleProps = __rest(_a, ["currentPage", "onClick", "pageCount"]);
3136
- var is_first_page = currentPage === 1;
3137
- var is_last_page = currentPage === pageCount;
3138
- var handlePrevClick = function () {
3776
+ };
3777
+
3778
+ const Wrapper$5 = styled.div `
3779
+ display: flex;
3780
+ padding: 16px 30px;
3781
+ align-items: center;
3782
+ gap: 20px;
3783
+ align-self: stretch;
3784
+ border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
3785
+ `;
3786
+ const Info = styled.div `
3787
+ display: flex;
3788
+ flex-direction: column;
3789
+ align-items: flex-start;
3790
+ gap: 4px;
3791
+ flex: 1 0 0;
3792
+ `;
3793
+ const Breadcrumbs = styled.div `
3794
+ display: flex;
3795
+ align-items: center;
3796
+ gap: 4px;
3797
+ `;
3798
+ const Actions = styled.div `
3799
+ display: flex;
3800
+ align-items: center;
3801
+ gap: 8px;
3802
+ `;
3803
+ const PageHeader = ({ title = '', breadcrumbs, actions, buttonMenu }) => {
3804
+ const { menuItems = [], label = '', } = buttonMenu || {};
3805
+ return (React.createElement(Wrapper$5, null,
3806
+ React.createElement(Info, null,
3807
+ React.createElement(Heading, { type: 'secondary' }, title),
3808
+ breadcrumbs ? (React.createElement(Breadcrumbs, null, breadcrumbs.map((crumb, i) => {
3809
+ return (React.createElement(React.Fragment, null,
3810
+ crumb.onClick ? (React.createElement(Link, { onClick: crumb.onClick, small: true }, crumb.label)) : (React.createElement(Copy, { type: 'small' }, crumb.label)),
3811
+ i + 1 < breadcrumbs.length ? React.createElement(Icon$1, { path: mdiChevronRight, size: '14px' }) : null));
3812
+ }))) : null),
3813
+ actions ? (React.createElement(Actions, null,
3814
+ actions.map(action => {
3815
+ const { label } = action, buttonProps = __rest(action, ["label"]);
3816
+ return (React.createElement(Button, Object.assign({}, buttonProps, { small: true }), label));
3817
+ }),
3818
+ menuItems.length ? (React.createElement(ButtonMenu, { label: label, menuItems: menuItems, small: true })) : null)) : null));
3819
+ };
3820
+
3821
+ const Wrapper$4 = styled.nav `
3822
+ box-sizing: border-box;
3823
+ display: flex;
3824
+ align-items: center;
3825
+ column-gap: 10px;
3826
+ `;
3827
+ const Pagination = (_a) => {
3828
+ var { currentPage = 1, onClick, pageCount = 0 } = _a, accessibleProps = __rest(_a, ["currentPage", "onClick", "pageCount"]);
3829
+ const is_first_page = currentPage === 1;
3830
+ const is_last_page = currentPage === pageCount;
3831
+ const handlePrevClick = () => {
3139
3832
  if (!is_first_page) {
3140
3833
  onClick(currentPage - 1);
3141
3834
  }
3142
3835
  };
3143
- var handleNextClick = function () {
3836
+ const handleNextClick = () => {
3144
3837
  if (!is_last_page) {
3145
3838
  onClick(currentPage + 1);
3146
3839
  }
3147
3840
  };
3148
- var handlePageChange = function (e) {
3149
- var new_page = parseInt(e.target.value, 10);
3841
+ const handlePageChange = (e) => {
3842
+ const new_page = parseInt(e.target.value, 10);
3150
3843
  if (new_page !== currentPage) {
3151
3844
  onClick(new_page);
3152
3845
  }
3153
3846
  };
3154
- return (React.createElement(Wrapper$4, __assign({}, accessibleProps),
3847
+ return (React.createElement(Wrapper$4, Object.assign({}, accessibleProps),
3155
3848
  React.createElement(Button, { disabled: is_first_page, icon: mdiChevronLeft, onClick: handlePrevClick, small: true }),
3156
- React.createElement(Select, { onChange: handlePageChange, options: Array.from(Array(pageCount).keys(), function (p) { return p + 1; }).map(function (p) { return ({
3157
- label: "Page ".concat(p),
3158
- value: "".concat(p),
3159
- }); }), value: "".concat(currentPage) }),
3849
+ React.createElement(Select, { onChange: handlePageChange, options: Array.from(Array(pageCount).keys(), p => p + 1).map(p => ({
3850
+ label: `Page ${p}`,
3851
+ value: `${p}`,
3852
+ })), value: `${currentPage}` }),
3160
3853
  React.createElement(Button, { disabled: is_last_page, icon: mdiChevronRight, onClick: handleNextClick, small: true })));
3161
- };
3162
- var templateObject_1$6;
3163
-
3164
- var Wrapper$3 = styled.label(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n padding: 4px 0;\n cursor: ", ";\n display: flex;\n align-items: center;\n font-size: ", ";\n line-height: 1.6rm;\n box-sizing: border-box;\n"], ["\n padding: 4px 0;\n cursor: ", ";\n display: flex;\n align-items: center;\n font-size: ", ";\n line-height: 1.6rm;\n box-sizing: border-box;\n"])), function (props) { return (props.$disabled ? 'default' : 'pointer'); }, FontSizes.DEFAULT);
3165
- var Input = styled.input(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n font-size: 20px;\n margin: 0px 0px 2px 0px;\n line-height: 1.1em;\n"], ["\n font-size: 20px;\n margin: 0px 0px 2px 0px;\n line-height: 1.1em;\n"])));
3166
- var Label$1 = styled.span(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n color: ", ";\n line-height: 1.6em;\n margin-left: 6px;\n"], ["\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n color: ", ";\n line-height: 1.6em;\n margin-left: 6px;\n"])), FontStyles.DEFAULT, FontSizes.DEFAULT, Colors.BLACK.Hex);
3167
- var Radio = function (_a) {
3168
- var children = _a.children, disabled = _a.disabled, checked = _a.checked, onChange = _a.onChange, value = _a.value, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value"]);
3169
- return (React.createElement(Wrapper$3, __assign({ "$disabled": disabled }, accessibleProps),
3854
+ };
3855
+
3856
+ const Wrapper$3 = styled.label `
3857
+ padding: 4px 0;
3858
+ cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
3859
+ display: flex;
3860
+ align-items: center;
3861
+ font-size: ${FontSizes.DEFAULT};
3862
+ line-height: 1.6rm;
3863
+ box-sizing: border-box;
3864
+ `;
3865
+ const Input = styled.input `
3866
+ font-size: 20px;
3867
+ margin: 0px 0px 2px 0px;
3868
+ line-height: 1.1em;
3869
+ `;
3870
+ const Label$1 = styled.span `
3871
+ font-family: ${FontStyles.DEFAULT};
3872
+ font-size: ${FontSizes.DEFAULT};
3873
+ font-weight: 400;
3874
+ color: ${Colors.BLACK.Hex};
3875
+ line-height: 1.6em;
3876
+ margin-left: 6px;
3877
+ `;
3878
+ const Radio = (_a) => {
3879
+ var { children, disabled, checked, onChange, value } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value"]);
3880
+ return (React.createElement(Wrapper$3, Object.assign({ "$disabled": disabled }, accessibleProps),
3170
3881
  React.createElement(Input, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'radio', value: value }),
3171
3882
  React.createElement(Label$1, null, children)));
3172
- };
3173
- var templateObject_1$5, templateObject_2$5, templateObject_3$4;
3883
+ };
3174
3884
 
3175
- var RadioList = function (_a) {
3176
- var disabled = _a.disabled, onChange = _a.onChange, options = _a.options, value = _a.value, accessibleProps = __rest(_a, ["disabled", "onChange", "options", "value"]);
3177
- return (React.createElement(React.Fragment, null, options.map(function (option) {
3178
- var label = option.label || option.value;
3179
- return (React.createElement(Radio, __assign({ checked: value === option.value, disabled: disabled, onChange: onChange, value: option.value }, accessibleProps), label));
3885
+ const RadioList = (_a) => {
3886
+ var { disabled, onChange, options, value } = _a, accessibleProps = __rest(_a, ["disabled", "onChange", "options", "value"]);
3887
+ return (React.createElement(React.Fragment, null, options.map((option) => {
3888
+ const label = option.label || option.value;
3889
+ return (React.createElement(Radio, Object.assign({ checked: value === option.value, disabled: disabled, onChange: onChange, value: option.value }, accessibleProps), label));
3180
3890
  })));
3181
3891
  };
3182
3892
 
3183
- var StyledTable = styled.table(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n width: 100%;\n margin-top: 1px;\n table-layout: ", ";\n border-collapse: collapse;\n text-indent: 0px;\n border-spacing: 0px;\n border-color: none;\n box-sizing: border-box;\n"], ["\n width: 100%;\n margin-top: 1px;\n table-layout: ", ";\n border-collapse: collapse;\n text-indent: 0px;\n border-spacing: 0px;\n border-color: none;\n box-sizing: border-box;\n"])), function (props) { return props.$tableLayout || 'auto'; });
3184
- var Header = styled.th(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n padding: 12px !important;\n text-align: left;\n font-weight: 500;\n border-bottom: 1px solid #e5e5e5;\n border-top: 1px solid #e5e5e5;\n text-transform: uppercase;\n font-size: 12px;\n font-family: ", ";\n letter-spacing: 1px;\n white-space: nowrap;\n line-height: 1;\n position: relative;\n box-sizing: border-box;\n width: ", ";\n cursor: ", ";\n color: ", ";\n"], ["\n padding: 12px !important;\n text-align: left;\n font-weight: 500;\n border-bottom: 1px solid #e5e5e5;\n border-top: 1px solid #e5e5e5;\n text-transform: uppercase;\n font-size: 12px;\n font-family: ", ";\n letter-spacing: 1px;\n white-space: nowrap;\n line-height: 1;\n position: relative;\n box-sizing: border-box;\n width: ", ";\n cursor: ", ";\n color: ", ";\n"])), FontStyles.DEFAULT, function (props) { return props.$width || 'auto'; }, function (props) { return (props.$isSortable ? 'pointer' : 'default'); }, function (props) { return (props.$isSortable ? Colors.PRIMARY.Hex : Colors.BLACK.Hex); });
3185
- var Row = styled.tr(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n cursor: ", ";\n transition: all 0.2s;\n background-color: ", ";\n box-sizing: border-box;\n &:hover {\n background-color: ", ";\n }\n"], ["\n cursor: ", ";\n transition: all 0.2s;\n background-color: ", ";\n box-sizing: border-box;\n &:hover {\n background-color: ", ";\n }\n"])), function (props) { return (props.$isClickable ? 'pointer' : 'default'); }, function (props) { return props.$bgColor; }, function (props) {
3186
- return props.$isClickable ? "rgba(".concat(Colors.PRIMARY.Rgb, ", 0.1)") : props.$bgColor;
3187
- });
3188
- var Column = styled.td(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n padding: 16px 12px !important;\n font-size: ", " !important;\n font-weight: 400 !important;\n font-family: ", ";\n border: none !important;\n word-break: break-word;\n line-height: 1.4em;\n box-sizing: border-box;\n width: ", ";\n"], ["\n padding: 16px 12px !important;\n font-size: ", " !important;\n font-weight: 400 !important;\n font-family: ", ";\n border: none !important;\n word-break: break-word;\n line-height: 1.4em;\n box-sizing: border-box;\n width: ", ";\n"])), FontSizes.DEFAULT, FontStyles.DEFAULT, function (props) { return props.$width || 'auto'; });
3189
- var IconWrapper = styled.span(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n margin-left: 2px;\n"], ["\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n margin-left: 2px;\n"])));
3190
- var Table = function (_a) {
3191
- var _b = _a.columns, columns = _b === void 0 ? [] : _b, _c = _a.data, data = _c === void 0 ? [] : _c, sortBy = _a.sortBy, sortDirection = _a.sortDirection, hideHeaders = _a.hideHeaders, onRowClick = _a.onRowClick, onSortChange = _a.onSortChange, tableLayout = _a.tableLayout, accessibleProps = __rest(_a, ["columns", "data", "sortBy", "sortDirection", "hideHeaders", "onRowClick", "onSortChange", "tableLayout"]);
3192
- return (React.createElement(StyledTable, __assign({ "$tableLayout": tableLayout }, accessibleProps),
3893
+ const StyledTable = styled.table `
3894
+ width: 100%;
3895
+ margin-top: 1px;
3896
+ table-layout: ${props => props.$tableLayout || 'auto'};
3897
+ border-collapse: collapse;
3898
+ text-indent: 0px;
3899
+ border-spacing: 0px;
3900
+ border-color: none;
3901
+ box-sizing: border-box;
3902
+ `;
3903
+ const Header = styled.th `
3904
+ padding: 12px !important;
3905
+ text-align: left;
3906
+ font-weight: 500;
3907
+ border-bottom: 1px solid #e5e5e5;
3908
+ border-top: 1px solid #e5e5e5;
3909
+ text-transform: uppercase;
3910
+ font-size: 12px;
3911
+ font-family: ${FontStyles.DEFAULT};
3912
+ letter-spacing: 1px;
3913
+ white-space: nowrap;
3914
+ line-height: 1;
3915
+ position: relative;
3916
+ box-sizing: border-box;
3917
+ width: ${props => props.$width || 'auto'};
3918
+ cursor: ${props => (props.$isSortable ? 'pointer' : 'default')};
3919
+ color: ${props => (props.$isSortable ? Colors.PRIMARY.Hex : Colors.BLACK.Hex)};
3920
+ `;
3921
+ const Row = styled.tr `
3922
+ cursor: ${props => (props.$isClickable ? 'pointer' : 'default')};
3923
+ transition: all 0.2s;
3924
+ background-color: ${props => props.$bgColor};
3925
+ box-sizing: border-box;
3926
+ &:hover {
3927
+ background-color: ${props => props.$isClickable ? `rgba(${Colors.PRIMARY.Rgb}, 0.1)` : props.$bgColor};
3928
+ }
3929
+ `;
3930
+ const Column = styled.td `
3931
+ padding: 16px 12px !important;
3932
+ font-size: ${FontSizes.DEFAULT} !important;
3933
+ font-weight: 400 !important;
3934
+ font-family: ${FontStyles.DEFAULT};
3935
+ border: none !important;
3936
+ word-break: break-word;
3937
+ line-height: 1.4em;
3938
+ box-sizing: border-box;
3939
+ width: ${props => props.$width || 'auto'};
3940
+ `;
3941
+ const IconWrapper = styled.span `
3942
+ position: absolute;
3943
+ top: 50%;
3944
+ transform: translateY(-50%);
3945
+ margin-left: 2px;
3946
+ `;
3947
+ const Table = (_a) => {
3948
+ var { columns = [], data = [], sortBy, sortDirection, hideHeaders, onRowClick, onSortChange, tableLayout } = _a, accessibleProps = __rest(_a, ["columns", "data", "sortBy", "sortDirection", "hideHeaders", "onRowClick", "onSortChange", "tableLayout"]);
3949
+ return (React.createElement(StyledTable, Object.assign({ "$tableLayout": tableLayout }, accessibleProps),
3193
3950
  hideHeaders ? null : (React.createElement("thead", null,
3194
- React.createElement("tr", null, columns.map(function (column, i) {
3951
+ React.createElement("tr", null, columns.map((column, i) => {
3195
3952
  return (React.createElement(Header, { "$isSortable": column.isSortable, "$width": column.width, key: i, onClick: onSortChange === null || onSortChange === void 0 ? void 0 : onSortChange.bind(null, column.id) },
3196
3953
  column.label,
3197
3954
  column.isSortable && sortBy === column.id ? (React.createElement(IconWrapper, null,
3198
3955
  React.createElement(Icon, { color: Colors.PRIMARY.Hex, path: sortDirection === 'asc' ? mdiChevronUp : mdiChevronDown, size: '20px' }))) : null));
3199
3956
  })))),
3200
- data.length ? (React.createElement("tbody", null, data.map(function (row, i) {
3201
- return (React.createElement(Row, { "$bgColor": i % 2 === 0 ? '#ffffff' : '#f9f9f9', "$isClickable": !!onRowClick, key: i, onClick: onRowClick ? onRowClick.bind(null, row) : undefined }, columns.map(function (column, i) {
3957
+ data.length ? (React.createElement("tbody", null, data.map((row, i) => {
3958
+ return (React.createElement(Row, { "$bgColor": i % 2 === 0 ? '#ffffff' : '#f9f9f9', "$isClickable": !!onRowClick, key: i, onClick: onRowClick ? onRowClick.bind(null, row) : undefined }, columns.map((column, i) => {
3202
3959
  return (React.createElement(Column, { "$width": columns[i].width, key: i }, column.render ? column.render(row) : row[column.id] || 'N/A'));
3203
3960
  })));
3204
3961
  }))) : null));
3205
- };
3206
- var templateObject_1$4, templateObject_2$4, templateObject_3$3, templateObject_4$1, templateObject_5;
3207
-
3208
- var Wrapper$2 = styled.div(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n display: flex;\n box-sizing: border-box;\n align-items: flex-end;\n border-top: 1px solid #e5e5e5;\n border-bottom: 1px solid #e5e5e5;\n flex-shrink: 0;\n align-self: stretch;\n padding: 0;\n margin: 0;\n"], ["\n display: flex;\n box-sizing: border-box;\n align-items: flex-end;\n border-top: 1px solid #e5e5e5;\n border-bottom: 1px solid #e5e5e5;\n flex-shrink: 0;\n align-self: stretch;\n padding: 0;\n margin: 0;\n"])));
3209
- var Tab = styled.div(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: ", ";\n font-family: ", ";\n font-weight: ", ";\n color: ", ";\n line-height: 1em;\n padding: 16px 30px 12px;\n margin: 0 0 -1px 0;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n border-bottom-color: ", ";\n cursor: ", ";\n box-sizing: border-box;\n &:hover {\n color: ", ";\n font-weight: 500;\n }\n"], ["\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: ", ";\n font-family: ", ";\n font-weight: ", ";\n color: ", ";\n line-height: 1em;\n padding: 16px 30px 12px;\n margin: 0 0 -1px 0;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n border-bottom-color: ", ";\n cursor: ", ";\n box-sizing: border-box;\n &:hover {\n color: ", ";\n font-weight: 500;\n }\n"])), FontSizes.DEFAULT, FontStyles.DEFAULT, function (props) { return (props.$isActive ? 500 : 400); }, function (props) { return (props.$isActive ? Colors.BLACK.Hex : Colors.MEDIUM_GRAY.Hex); }, function (props) { return (props.$isActive ? Colors.PRIMARY.Hex : 'transparent'); }, function (props) { return (props.$isActive ? 'default' : 'pointer'); }, function (props) { return (props.$isActive ? Colors.BLACK.Hex : Colors.PRIMARY.Hex); });
3210
- var Badge = styled.div(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n display: flex;\n width: 18px;\n height: 18px;\n justify-content: center;\n align-items: center;\n border-radius: 9px;\n background: ", ";\n color: #fff;\n font-family: ", ";\n font-size: 12px;\n font-weight: 500;\n line-height: 1;\n letter-spacing: 1px;\n"], ["\n display: flex;\n width: 18px;\n height: 18px;\n justify-content: center;\n align-items: center;\n border-radius: 9px;\n background: ", ";\n color: #fff;\n font-family: ", ";\n font-size: 12px;\n font-weight: 500;\n line-height: 1;\n letter-spacing: 1px;\n"])), function (props) { return (props.$isError ? Colors.RED.Hex : Colors.PRIMARY.Hex); }, FontStyles.DEFAULT);
3211
- var Tabs = function (_a) {
3212
- var tabs = _a.tabs, accessibleProps = __rest(_a, ["tabs"]);
3213
- return (React.createElement(Wrapper$2, __assign({}, accessibleProps), tabs.map(function (_a, i) {
3214
- var isActive = _a.isActive, label = _a.label, badgeCount = _a.badgeCount, errorBadge = _a.errorBadge, onClick = _a.onClick, accessibleProps = __rest(_a, ["isActive", "label", "badgeCount", "errorBadge", "onClick"]);
3215
- return (React.createElement(Tab, __assign({ "$isActive": isActive || false, key: i, onClick: isActive ? undefined : onClick }, accessibleProps),
3962
+ };
3963
+
3964
+ const Wrapper$2 = styled.div `
3965
+ display: flex;
3966
+ box-sizing: border-box;
3967
+ align-items: flex-end;
3968
+ border-top: 1px solid #e5e5e5;
3969
+ border-bottom: 1px solid #e5e5e5;
3970
+ flex-shrink: 0;
3971
+ align-self: stretch;
3972
+ padding: 0;
3973
+ margin: 0;
3974
+ `;
3975
+ const Tab = styled.div `
3976
+ display: flex;
3977
+ align-items: center;
3978
+ gap: 6px;
3979
+ font-size: ${FontSizes.DEFAULT};
3980
+ font-family: ${FontStyles.DEFAULT};
3981
+ font-weight: ${props => (props.$isActive ? 500 : 400)};
3982
+ color: ${props => (props.$isActive ? Colors.BLACK.Hex : Colors.MEDIUM_GRAY.Hex)};
3983
+ line-height: 1em;
3984
+ padding: 16px 30px 12px;
3985
+ margin: 0 0 -1px 0;
3986
+ border-bottom-width: 4px;
3987
+ border-bottom-style: solid;
3988
+ border-bottom-color: ${props => (props.$isActive ? Colors.PRIMARY.Hex : 'transparent')};
3989
+ cursor: ${props => (props.$isActive ? 'default' : 'pointer')};
3990
+ box-sizing: border-box;
3991
+ &:hover {
3992
+ color: ${props => (props.$isActive ? Colors.BLACK.Hex : Colors.PRIMARY.Hex)};
3993
+ font-weight: 500;
3994
+ }
3995
+ `;
3996
+ const Badge = styled.div `
3997
+ display: flex;
3998
+ width: 18px;
3999
+ height: 18px;
4000
+ justify-content: center;
4001
+ align-items: center;
4002
+ border-radius: 9px;
4003
+ background: ${props => (props.$isError ? Colors.RED.Hex : Colors.PRIMARY.Hex)};
4004
+ color: #fff;
4005
+ font-family: ${FontStyles.DEFAULT};
4006
+ font-size: 12px;
4007
+ font-weight: 500;
4008
+ line-height: 1;
4009
+ letter-spacing: 1px;
4010
+ `;
4011
+ const Tabs = (_a) => {
4012
+ var { tabs } = _a, accessibleProps = __rest(_a, ["tabs"]);
4013
+ return (React.createElement(Wrapper$2, Object.assign({}, accessibleProps), tabs.map((_a, i) => {
4014
+ var { isActive, label, badgeCount, errorBadge, onClick } = _a, accessibleProps = __rest(_a, ["isActive", "label", "badgeCount", "errorBadge", "onClick"]);
4015
+ return (React.createElement(Tab, Object.assign({ "$isActive": isActive || false, key: i, onClick: isActive ? undefined : onClick }, accessibleProps),
3216
4016
  badgeCount ? React.createElement(Badge, { "$isError": errorBadge || false }, badgeCount) : null,
3217
4017
  label));
3218
4018
  })));
3219
4019
  };
3220
- Tabs.defaultProps = {};
3221
- var templateObject_1$3, templateObject_2$3, templateObject_3$2;
3222
-
3223
- var Wrapper$1 = styled.div(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n display: inline-block;\n border-radius: 4px;\n padding: 4px 6px;\n background: ", ";\n color: #ffffff;\n box-sizing: border-box;\n cursor: ", ";\n"], ["\n display: inline-block;\n border-radius: 4px;\n padding: 4px 6px;\n background: ", ";\n color: #ffffff;\n box-sizing: border-box;\n cursor: ", ";\n"])), function (props) { return Colors[props.$color].Hex; }, function (props) { return (props.$removable ? 'pointer' : 'default'); });
3224
- var Content = styled.div(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"])));
3225
- var Label = styled.div(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: 500;\n font-family: ", ";\n line-height: 1.2em;\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: 500;\n font-family: ", ";\n line-height: 1.2em;\n"])), function (props) { return (props.$color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff'); }, FontSizes.SMALL, FontStyles.DEFAULT);
3226
- var Remove = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-left: 10px;\n display: flex;\n align-items: center;\n"], ["\n margin-left: 10px;\n display: flex;\n align-items: center;\n"])));
3227
- var Tag = function (_a) {
3228
- var children = _a.children, _b = _a.color, color = _b === void 0 ? 'PRIMARY' : _b, removable = _a.removable, onClick = _a.onClick, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick"]);
3229
- return (React.createElement(Wrapper$1, __assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps),
4020
+ Tabs.defaultProps = {};
4021
+
4022
+ const Wrapper$1 = styled.div `
4023
+ display: inline-block;
4024
+ border-radius: 4px;
4025
+ padding: 4px 6px;
4026
+ background: ${props => Colors[props.$color].Hex};
4027
+ color: #ffffff;
4028
+ box-sizing: border-box;
4029
+ cursor: ${props => (props.$removable ? 'pointer' : 'default')};
4030
+ `;
4031
+ const Content = styled.div `
4032
+ display: flex;
4033
+ align-items: center;
4034
+ `;
4035
+ const Label = styled.div `
4036
+ color: ${props => (props.$color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff')};
4037
+ font-size: ${FontSizes.SMALL};
4038
+ font-weight: 500;
4039
+ font-family: ${FontStyles.DEFAULT};
4040
+ line-height: 1.2em;
4041
+ `;
4042
+ const Remove = styled.div `
4043
+ margin-left: 10px;
4044
+ display: flex;
4045
+ align-items: center;
4046
+ `;
4047
+ const Tag = (_a) => {
4048
+ var { children, color = 'PRIMARY', removable, onClick } = _a, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick"]);
4049
+ return (React.createElement(Wrapper$1, Object.assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps),
3230
4050
  React.createElement(Content, null,
3231
4051
  React.createElement(Label, { "$color": color }, children),
3232
4052
  removable ? (React.createElement(Remove, null,
3233
4053
  React.createElement(Icon, { color: color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff', path: mdiClose, size: '15px' }))) : null)));
3234
- };
3235
- var templateObject_1$2, templateObject_2$2, templateObject_3$1, templateObject_4;
4054
+ };
3236
4055
 
3237
- var Track = styled.div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n height: 24px;\n border-radius: 12px;\n background: ", ";\n display: flex;\n align-items: center;\n cursor: pointer;\n width: 40px;\n padding: 2px;\n box-sizing: border-box;\n"], ["\n height: 24px;\n border-radius: 12px;\n background: ", ";\n display: flex;\n align-items: center;\n cursor: pointer;\n width: 40px;\n padding: 2px;\n box-sizing: border-box;\n"])), function (props) { return (props.$on ? Colors.GREEN.Hex : Colors.BLACK.Hex); });
3238
- var Handle = styled.div(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n width: 20px;\n height: 20px;\n border-radius: 10px;\n background: #ffffff;\n margin-left: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n"], ["\n width: 20px;\n height: 20px;\n border-radius: 10px;\n background: #ffffff;\n margin-left: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n"])), function (props) { return (props.$on ? 'auto' : '0px'); });
3239
- var Toggle = function (_a) {
3240
- var onClick = _a.onClick, on = _a.on, accessibleProps = __rest(_a, ["onClick", "on"]);
3241
- return (React.createElement(Track, __assign({ "$on": on, onClick: onClick }, accessibleProps),
4056
+ const Track = styled.div `
4057
+ height: 24px;
4058
+ border-radius: 12px;
4059
+ background: ${props => (props.$on ? Colors.GREEN.Hex : Colors.BLACK.Hex)};
4060
+ display: flex;
4061
+ align-items: center;
4062
+ cursor: pointer;
4063
+ width: 40px;
4064
+ padding: 2px;
4065
+ box-sizing: border-box;
4066
+ `;
4067
+ const Handle = styled.div `
4068
+ width: 20px;
4069
+ height: 20px;
4070
+ border-radius: 10px;
4071
+ background: #ffffff;
4072
+ margin-left: ${props => (props.$on ? 'auto' : '0px')};
4073
+ display: flex;
4074
+ align-items: center;
4075
+ justify-content: center;
4076
+ box-sizing: border-box;
4077
+ `;
4078
+ const Toggle = (_a) => {
4079
+ var { onClick, on } = _a, accessibleProps = __rest(_a, ["onClick", "on"]);
4080
+ return (React.createElement(Track, Object.assign({ "$on": on, onClick: onClick }, accessibleProps),
3242
4081
  React.createElement("input", { checked: on, name: accessibleProps.name, type: 'hidden' }),
3243
4082
  React.createElement(Handle, { "$on": on },
3244
4083
  React.createElement(Icon, { color: on ? Colors.GREEN.Hex : Colors.BLACK.Hex, path: on ? mdiCheck : mdiClose, size: '16px' }))));
3245
4084
  };
3246
- Toggle.defaultProps = {};
3247
- var templateObject_1$1, templateObject_2$1;
3248
-
3249
- var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n padding: 40px auto;\n gap: 20px;\n display: flex;\n flex-direction: column;\n justify-items: center;\n align-items: center;\n"], ["\n width: 100%;\n padding: 40px auto;\n gap: 20px;\n display: flex;\n flex-direction: column;\n justify-items: center;\n align-items: center;\n"])));
3250
- var Wrapper = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n gap: 10px;\n display: flex;\n flex-direction: column;\n justify-items: center;\n align-items: center;\n"], ["\n gap: 10px;\n display: flex;\n flex-direction: column;\n justify-items: center;\n align-items: center;\n"])));
3251
- var StyledIcon = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 80px;\n height: 80px;\n border-radius: 40px;\n background: #f5f5f5;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 80px;\n height: 80px;\n border-radius: 40px;\n background: #f5f5f5;\n"])));
3252
- var ZeroState = function (_a) {
3253
- var icon = _a.icon, title = _a.title, description = _a.description, action = _a.action, accessibleProps = __rest(_a, ["icon", "title", "description", "action"]);
3254
- return (React.createElement(Container, __assign({}, accessibleProps),
4085
+ Toggle.defaultProps = {};
4086
+
4087
+ const Container = styled.div `
4088
+ width: 100%;
4089
+ padding: 40px auto;
4090
+ gap: 20px;
4091
+ display: flex;
4092
+ flex-direction: column;
4093
+ justify-items: center;
4094
+ align-items: center;
4095
+ `;
4096
+ const Wrapper = styled.div `
4097
+ gap: 10px;
4098
+ display: flex;
4099
+ flex-direction: column;
4100
+ justify-items: center;
4101
+ align-items: center;
4102
+ `;
4103
+ const StyledIcon = styled.div `
4104
+ display: flex;
4105
+ align-items: center;
4106
+ justify-content: center;
4107
+ width: 80px;
4108
+ height: 80px;
4109
+ border-radius: 40px;
4110
+ background: #f5f5f5;
4111
+ `;
4112
+ const ZeroState = (_a) => {
4113
+ var { icon, title, description, action } = _a, accessibleProps = __rest(_a, ["icon", "title", "description", "action"]);
4114
+ return (React.createElement(Container, Object.assign({}, accessibleProps),
3255
4115
  React.createElement(StyledIcon, null,
3256
4116
  React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: icon, size: '40px' })),
3257
4117
  React.createElement(Wrapper, null,
3258
4118
  React.createElement(Heading, { children: title, type: 'tertiary' }),
3259
4119
  description && React.createElement(Copy, { align: 'center', children: description, color: 'GRAY', type: 'default' })),
3260
4120
  action && (React.createElement(Button, { children: action === null || action === void 0 ? void 0 : action.children, icon: action === null || action === void 0 ? void 0 : action.icon, onClick: action === null || action === void 0 ? void 0 : action.onClick }))));
3261
- };
3262
- var templateObject_1, templateObject_2, templateObject_3;
4121
+ };
3263
4122
 
3264
- export { Accordion, ActionDialog, Alert, BulkActionBar, Button, Checkbox, Checklist, Copy, DatePicker, Drawer, Field, FileUpload, Heading, Input$1 as Input, Link, Logo, Modal, MoreMenu, MultiSelect, Pagination, Radio, RadioList, Select, Table, Tabs, Tag, Toggle, Tooltip, ZeroState };
4123
+ export { Accordion, ActionDialog, Alert, BulkActionBar, Button, ButtonMenu, Checkbox, Checklist, Copy, DatePicker, Drawer, Field, FileUpload, Heading, Input$1 as Input, Link, Logo, Modal, MoreMenu, MultiSelect, PageHeader, Pagination, Radio, RadioList, Select, Table, Tabs, Tag, Toggle, Tooltip, ZeroState };
3265
4124
  //# sourceMappingURL=index.js.map