@hexure/ui 1.2.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +179 -124
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Alert/Alert.d.ts +6 -0
- package/dist/cjs/types/components/Button/Button.d.ts +7 -2
- package/dist/cjs/types/components/DatePicker/DatePicker.d.ts +27 -0
- package/dist/cjs/types/components/DatePicker/DatePicker.stories.d.ts +5 -0
- package/dist/cjs/types/components/DatePicker/index.d.ts +1 -0
- package/dist/cjs/types/components/Input/Input.d.ts +1 -0
- package/dist/cjs/types/components/Logo/Logo.d.ts +16 -0
- package/dist/cjs/types/components/Logo/Logo.stories.d.ts +5 -0
- package/dist/cjs/types/components/Logo/index.d.ts +1 -0
- package/dist/cjs/types/components/MoreMenu/MoreMenu.d.ts +13 -0
- package/dist/cjs/types/components/MoreMenu/MoreMenu.stories.d.ts +5 -0
- package/dist/cjs/types/components/MoreMenu/index.d.ts +1 -0
- package/dist/cjs/types/components/Select/Select.d.ts +9 -0
- package/dist/cjs/types/components/ZeroState/ZeroState.d.ts +18 -0
- package/dist/cjs/types/components/ZeroState/ZeroState.stories.d.ts +5 -0
- package/dist/cjs/types/components/ZeroState/index.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +2 -0
- package/dist/esm/index.js +178 -125
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Alert/Alert.d.ts +6 -0
- package/dist/esm/types/components/Button/Button.d.ts +7 -2
- package/dist/esm/types/components/DatePicker/DatePicker.d.ts +27 -0
- package/dist/esm/types/components/DatePicker/DatePicker.stories.d.ts +5 -0
- package/dist/esm/types/components/DatePicker/index.d.ts +1 -0
- package/dist/esm/types/components/Input/Input.d.ts +1 -0
- package/dist/esm/types/components/Logo/Logo.d.ts +16 -0
- package/dist/esm/types/components/Logo/Logo.stories.d.ts +5 -0
- package/dist/esm/types/components/Logo/index.d.ts +1 -0
- package/dist/esm/types/components/MoreMenu/MoreMenu.d.ts +13 -0
- package/dist/esm/types/components/MoreMenu/MoreMenu.stories.d.ts +5 -0
- package/dist/esm/types/components/MoreMenu/index.d.ts +1 -0
- package/dist/esm/types/components/Select/Select.d.ts +9 -0
- package/dist/esm/types/components/ZeroState/ZeroState.d.ts +18 -0
- package/dist/esm/types/components/ZeroState/ZeroState.stories.d.ts +5 -0
- package/dist/esm/types/components/ZeroState/index.d.ts +1 -0
- package/dist/esm/types/index.d.ts +2 -0
- package/dist/index.d.ts +47 -3
- package/package.json +6 -5
package/dist/esm/index.js
CHANGED
|
@@ -2023,36 +2023,42 @@ var FontSizes = {
|
|
|
2023
2023
|
SMALL: '13px',
|
|
2024
2024
|
};
|
|
2025
2025
|
|
|
2026
|
-
var Header$3 = styled.div(templateObject_1$
|
|
2027
|
-
var Title = styled.div(templateObject_2$
|
|
2026
|
+
var Header$3 = styled.div(templateObject_1$m || (templateObject_1$m = __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"])));
|
|
2027
|
+
var Title$1 = styled.div(templateObject_2$k || (templateObject_2$k = __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);
|
|
2028
2028
|
var Accordion = function (_a) {
|
|
2029
2029
|
var title = _a.title, children = _a.children, open = _a.open, onClick = _a.onClick, accessibleProps = __rest(_a, ["title", "children", "open", "onClick"]);
|
|
2030
2030
|
return (React.createElement(React.Fragment, null,
|
|
2031
2031
|
React.createElement(Header$3, __assign({ onClick: onClick }, accessibleProps),
|
|
2032
|
-
React.createElement(Title, null, title),
|
|
2032
|
+
React.createElement(Title$1, null, title),
|
|
2033
2033
|
React.createElement(Icon, { color: Colors.BLACK.Hex, path: open ? mdiChevronUp : mdiChevronDown, size: '24px' })),
|
|
2034
2034
|
open ? children : null));
|
|
2035
2035
|
};
|
|
2036
|
-
var templateObject_1$
|
|
2036
|
+
var templateObject_1$m, templateObject_2$k;
|
|
2037
2037
|
|
|
2038
2038
|
var button_type_mapping = {
|
|
2039
2039
|
primary: {
|
|
2040
2040
|
background_color: Colors.PRIMARY.Hex,
|
|
2041
2041
|
border_color: Colors.PRIMARY.Hex,
|
|
2042
2042
|
content_color: '#fff',
|
|
2043
|
+
badge_bg_color: '#fff',
|
|
2044
|
+
badge_content_color: Colors.PRIMARY.Hex,
|
|
2043
2045
|
},
|
|
2044
2046
|
secondary: {
|
|
2045
2047
|
background_color: 'transparent',
|
|
2046
2048
|
border_color: Colors.PRIMARY.Hex,
|
|
2047
2049
|
content_color: Colors.PRIMARY.Hex,
|
|
2050
|
+
badge_bg_color: Colors.PRIMARY.Hex,
|
|
2051
|
+
badge_content_color: '#fff',
|
|
2048
2052
|
},
|
|
2049
2053
|
red: {
|
|
2050
2054
|
background_color: Colors.RED.Hex,
|
|
2051
2055
|
border_color: Colors.RED.Hex,
|
|
2052
2056
|
content_color: '#fff',
|
|
2057
|
+
badge_bg_color: '#fff',
|
|
2058
|
+
badge_content_color: Colors.RED.Hex,
|
|
2053
2059
|
},
|
|
2054
2060
|
};
|
|
2055
|
-
var StyledButton = styled.button(templateObject_1$
|
|
2061
|
+
var StyledButton = styled.button(templateObject_1$l || (templateObject_1$l = __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) {
|
|
2056
2062
|
if (props.$hasChildren) {
|
|
2057
2063
|
if (props.$small) {
|
|
2058
2064
|
return '0 10px';
|
|
@@ -2063,7 +2069,7 @@ var StyledButton = styled.button(templateObject_1$j || (templateObject_1$j = __m
|
|
|
2063
2069
|
}
|
|
2064
2070
|
return '0px';
|
|
2065
2071
|
}, function (props) {
|
|
2066
|
-
return props.$
|
|
2072
|
+
return props.$format ? button_type_mapping[props.$format].background_color : Colors.PRIMARY.Hex;
|
|
2067
2073
|
}, function (props) {
|
|
2068
2074
|
if (props.$hasChildren) {
|
|
2069
2075
|
return 'auto';
|
|
@@ -2073,21 +2079,27 @@ var StyledButton = styled.button(templateObject_1$j || (templateObject_1$j = __m
|
|
|
2073
2079
|
}
|
|
2074
2080
|
return '40px';
|
|
2075
2081
|
}, function (props) { return (props.$disabled ? 'default' : 'pointer'); }, function (props) { return (props.$disabled ? 0.6 : 0.9); }, function (props) {
|
|
2076
|
-
return props.$
|
|
2082
|
+
return props.$format ? button_type_mapping[props.$format].border_color : Colors.PRIMARY.Hex;
|
|
2077
2083
|
}, function (props) { return (props.$disabled ? 0.6 : 1); });
|
|
2078
|
-
var Label$
|
|
2079
|
-
var StyledIcon = styled.span(templateObject_3$
|
|
2084
|
+
var Label$4 = styled.span(templateObject_2$j || (templateObject_2$j = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-family: ", ";\n font-weight: 500;\n line-height: ", ";\n"], ["\n color: ", ";\n font-size: ", ";\n font-family: ", ";\n font-weight: 500;\n line-height: ", ";\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, function (props) { return (props.$small ? '2.2em' : '2.9em'); });
|
|
2085
|
+
var StyledIcon$1 = styled.span(templateObject_3$g || (templateObject_3$g = __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'); });
|
|
2086
|
+
var Badge = styled.span(templateObject_4$8 || (templateObject_4$8 = __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) {
|
|
2087
|
+
return props.$format ? button_type_mapping[props.$format].badge_bg_color : '#fff';
|
|
2088
|
+
}, function (props) {
|
|
2089
|
+
return props.$format ? button_type_mapping[props.$format].badge_content_color : Colors.PRIMARY.Hex;
|
|
2090
|
+
}, function (props) { return (props.$small ? '10px' : '12px'); }, FontStyles.DEFAULT, function (props) { return (props.$small ? '5px' : '10px'); }, function (props) { return (props.$small ? '-5px' : '-10px'); });
|
|
2080
2091
|
var Button = function (_a) {
|
|
2081
|
-
var children = _a.children, _b = _a.disabled, disabled = _b === void 0 ? false : _b, icon = _a.icon, _c = _a.margin, margin =
|
|
2092
|
+
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.margin, margin = _d === void 0 ? '' : _d, onClick = _a.onClick, _e = _a.small, small = _e === void 0 ? false : _e, _f = _a.format, format = _f === void 0 ? 'primary' : _f, accessibleProps = __rest(_a, ["badge", "children", "disabled", "icon", "isForm", "margin", "onClick", "small", "format"]);
|
|
2082
2093
|
var has_children = children && children.length > 0;
|
|
2083
|
-
return (React.createElement(StyledButton, __assign({ "$disabled": disabled, "$hasChildren": !!has_children, "$margin": margin, "$small": small,
|
|
2084
|
-
children ? (React.createElement(Label$
|
|
2085
|
-
icon ? (React.createElement(StyledIcon, { "$hasChildren": !!has_children },
|
|
2086
|
-
React.createElement(Icon, { color:
|
|
2094
|
+
return (React.createElement(StyledButton, __assign({ "$disabled": disabled, "$format": format, "$hasChildren": !!has_children, "$margin": margin, "$small": small, onClick: disabled ? undefined : onClick, type: isForm ? 'submit' : undefined }, accessibleProps),
|
|
2095
|
+
children ? (React.createElement(Label$4, { "$format": format, "$small": small }, children)) : null,
|
|
2096
|
+
icon && !badge ? (React.createElement(StyledIcon$1, { "$hasChildren": !!has_children },
|
|
2097
|
+
React.createElement(Icon, { color: format ? button_type_mapping[format].content_color : '#fff', path: icon, size: small ? '20px' : '24px' }))) : null,
|
|
2098
|
+
badge && !icon ? (React.createElement(Badge, { "$format": format, "$small": small }, badge)) : null));
|
|
2087
2099
|
};
|
|
2088
|
-
var templateObject_1$
|
|
2100
|
+
var templateObject_1$l, templateObject_2$j, templateObject_3$g, templateObject_4$8;
|
|
2089
2101
|
|
|
2090
|
-
var StyledComponent = styled.p(templateObject_1$
|
|
2102
|
+
var StyledComponent = styled.p(templateObject_1$k || (templateObject_1$k = __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].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) {
|
|
2091
2103
|
return ['underline', 'line-through'].includes(props.$type) ? props.$type : 'none';
|
|
2092
2104
|
}, function (props) { return props.$margin || '0px'; }, function (props) { return props.$padding || '0px'; }, function (props) { return props.$align || 'left'; });
|
|
2093
2105
|
var Copy = function (_a) {
|
|
@@ -2097,11 +2109,11 @@ var Copy = function (_a) {
|
|
|
2097
2109
|
Copy.defaultProps = {
|
|
2098
2110
|
type: 'default',
|
|
2099
2111
|
};
|
|
2100
|
-
var templateObject_1$
|
|
2112
|
+
var templateObject_1$k;
|
|
2101
2113
|
|
|
2102
|
-
var H1 = styled.h1(templateObject_1$
|
|
2103
|
-
var H2 = styled.h2(templateObject_2$
|
|
2104
|
-
var H3 = styled.h3(templateObject_3$
|
|
2114
|
+
var H1 = styled.h1(templateObject_1$j || (templateObject_1$j = __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'; });
|
|
2115
|
+
var H2 = styled.h2(templateObject_2$i || (templateObject_2$i = __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'; });
|
|
2116
|
+
var H3 = styled.h3(templateObject_3$f || (templateObject_3$f = __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'; });
|
|
2105
2117
|
var Heading = function (_a) {
|
|
2106
2118
|
var bold = _a.bold, children = _a.children, margin = _a.margin, padding = _a.padding, type = _a.type, accessibleProps = __rest(_a, ["bold", "children", "margin", "padding", "type"]);
|
|
2107
2119
|
switch (type) {
|
|
@@ -2120,11 +2132,11 @@ Heading.defaultProps = {
|
|
|
2120
2132
|
bold: false,
|
|
2121
2133
|
type: 'primary',
|
|
2122
2134
|
};
|
|
2123
|
-
var templateObject_1$
|
|
2135
|
+
var templateObject_1$j, templateObject_2$i, templateObject_3$f;
|
|
2124
2136
|
|
|
2125
|
-
var Wrapper$
|
|
2126
|
-
var Container$
|
|
2127
|
-
var Buttons = styled.div(templateObject_3$
|
|
2137
|
+
var Wrapper$d = styled.div(templateObject_1$i || (templateObject_1$i = __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"])));
|
|
2138
|
+
var Container$3 = styled.dialog(templateObject_2$h || (templateObject_2$h = __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"])));
|
|
2139
|
+
var Buttons = styled.div(templateObject_3$e || (templateObject_3$e = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 30px;\n box-sizing: border-box;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 30px;\n box-sizing: border-box;\n"])));
|
|
2128
2140
|
var ActionDialog = function (_a) {
|
|
2129
2141
|
var description = _a.description, title = _a.title, onClose = _a.onClose, primaryButton = _a.primaryButton, secondaryButton = _a.secondaryButton, accessibleProps = __rest(_a, ["description", "title", "onClose", "primaryButton", "secondaryButton"]);
|
|
2130
2142
|
useEffect(function () {
|
|
@@ -2137,20 +2149,21 @@ var ActionDialog = function (_a) {
|
|
|
2137
2149
|
document.onkeydown = null;
|
|
2138
2150
|
};
|
|
2139
2151
|
}, []);
|
|
2140
|
-
return (React.createElement(Wrapper$
|
|
2141
|
-
React.createElement(Container$
|
|
2152
|
+
return (React.createElement(Wrapper$d, __assign({}, accessibleProps),
|
|
2153
|
+
React.createElement(Container$3, { open: true },
|
|
2142
2154
|
title ? (React.createElement(Heading, { margin: '0px 0px 20px 0px', type: 'secondary' }, title)) : null,
|
|
2143
2155
|
description ? React.createElement(Copy, { align: 'center' }, description) : null,
|
|
2144
2156
|
primaryButton || secondaryButton ? (React.createElement(Buttons, null,
|
|
2145
|
-
secondaryButton ? (React.createElement(Button, __assign({}, secondaryButton, {
|
|
2146
|
-
primaryButton ? React.createElement(Button, __assign({}, primaryButton, {
|
|
2157
|
+
secondaryButton ? (React.createElement(Button, __assign({}, secondaryButton, { format: 'secondary', margin: '0px 5px' }))) : null,
|
|
2158
|
+
primaryButton ? React.createElement(Button, __assign({}, primaryButton, { format: 'primary', margin: '0px 5px' })) : null)) : null)));
|
|
2147
2159
|
};
|
|
2148
|
-
var templateObject_1$
|
|
2160
|
+
var templateObject_1$i, templateObject_2$h, templateObject_3$e;
|
|
2149
2161
|
|
|
2150
|
-
var Wrapper$
|
|
2151
|
-
var Content$1 = styled.div(templateObject_2$
|
|
2162
|
+
var Wrapper$c = styled.div(templateObject_1$h || (templateObject_1$h = __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"])));
|
|
2163
|
+
var Content$1 = styled.div(templateObject_2$g || (templateObject_2$g = __makeTemplateObject(["\n margin-left: 20px;\n"], ["\n margin-left: 20px;\n"])));
|
|
2164
|
+
var Action$1 = styled.div(templateObject_3$d || (templateObject_3$d = __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);
|
|
2152
2165
|
var Alert = function (_a) {
|
|
2153
|
-
var _b = _a.type, type = _b === void 0 ? 'info' : _b, title = _a.title, description = _a.description, accessibleProps = __rest(_a, ["type", "title", "description"]);
|
|
2166
|
+
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"]);
|
|
2154
2167
|
var type_mapping = {
|
|
2155
2168
|
info: {
|
|
2156
2169
|
color: Colors.PRIMARY.Hex,
|
|
@@ -2169,26 +2182,27 @@ var Alert = function (_a) {
|
|
|
2169
2182
|
icon: mdiCheckboxMarkedCircleOutline,
|
|
2170
2183
|
},
|
|
2171
2184
|
};
|
|
2172
|
-
return (React.createElement(Wrapper$
|
|
2185
|
+
return (React.createElement(Wrapper$c, __assign({}, accessibleProps, { style: { borderLeftColor: type_mapping[type].color } }),
|
|
2173
2186
|
React.createElement("div", { style: { flexShrink: 0 } },
|
|
2174
2187
|
React.createElement(Icon, { color: type_mapping[type].color, path: type_mapping[type].icon, size: '30px' })),
|
|
2175
2188
|
React.createElement(Content$1, null,
|
|
2176
2189
|
title ? (React.createElement(Heading, { bold: true, margin: '2px 0 0 0', type: 'tertiary' }, title)) : null,
|
|
2177
|
-
description ? React.createElement(Copy, { margin: '
|
|
2190
|
+
description ? React.createElement(Copy, { margin: '6px 0 0 0 !important' }, description) : null,
|
|
2191
|
+
action ? React.createElement(Action$1, { onClick: action.onClick }, action.label) : null)));
|
|
2178
2192
|
};
|
|
2179
|
-
var templateObject_1$
|
|
2193
|
+
var templateObject_1$h, templateObject_2$g, templateObject_3$d;
|
|
2180
2194
|
|
|
2181
|
-
var Wrapper$
|
|
2182
|
-
var Left = styled.div(templateObject_2$
|
|
2183
|
-
var Info = styled.div(templateObject_3$
|
|
2184
|
-
var Selected = styled.span(templateObject_4$
|
|
2185
|
-
var Clear = styled.span(templateObject_5$
|
|
2195
|
+
var Wrapper$b = styled.div(templateObject_1$g || (templateObject_1$g = __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);
|
|
2196
|
+
var Left = styled.div(templateObject_2$f || (templateObject_2$f = __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"])));
|
|
2197
|
+
var Info = styled.div(templateObject_3$c || (templateObject_3$c = __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"])));
|
|
2198
|
+
var Selected = styled.span(templateObject_4$7 || (templateObject_4$7 = __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);
|
|
2199
|
+
var Clear = styled.span(templateObject_5$5 || (templateObject_5$5 = __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);
|
|
2186
2200
|
var Actions = styled.div(templateObject_6$3 || (templateObject_6$3 = __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"])));
|
|
2187
2201
|
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);
|
|
2188
2202
|
var ErrorMsg = styled.span(templateObject_8 || (templateObject_8 = __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);
|
|
2189
2203
|
var BulkActionBar = function (_a) {
|
|
2190
2204
|
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"]);
|
|
2191
|
-
return (React.createElement(Wrapper$
|
|
2205
|
+
return (React.createElement(Wrapper$b, __assign({}, accessibleProps),
|
|
2192
2206
|
React.createElement(Left, null,
|
|
2193
2207
|
React.createElement(Info, null,
|
|
2194
2208
|
React.createElement(Selected, null,
|
|
@@ -2200,19 +2214,21 @@ var BulkActionBar = function (_a) {
|
|
|
2200
2214
|
React.createElement(Icon, { color: Colors.RED.Hex, path: mdiInformationOutline, size: '20px' }),
|
|
2201
2215
|
React.createElement(ErrorMsg, null, errorMsg))) : null));
|
|
2202
2216
|
};
|
|
2203
|
-
var templateObject_1$
|
|
2217
|
+
var templateObject_1$g, templateObject_2$f, templateObject_3$c, templateObject_4$7, templateObject_5$5, templateObject_6$3, templateObject_7$2, templateObject_8;
|
|
2204
2218
|
|
|
2219
|
+
var Wrapper$a = styled.label(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n padding: 4px 0;\n cursor: ", ";\n display: flex;\n align-items: center;\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: center;\n font-size: ", ";\n line-height: 1.6em;\n box-sizing: border-box;\n"])), function (props) { return (props.$disabled ? 'default' : 'pointer'); }, FontSizes.DEFAULT);
|
|
2220
|
+
var Input$2 = styled.input(templateObject_2$e || (templateObject_2$e = __makeTemplateObject(["\n font-size: 20px;\n margin: 0px 0px 2px 0px;\n line-height: 1.1em;\n box-sizing: border-box;\n"], ["\n font-size: 20px;\n margin: 0px 0px 2px 0px;\n line-height: 1.1em;\n box-sizing: border-box;\n"])));
|
|
2221
|
+
var Label$3 = styled.span(templateObject_3$b || (templateObject_3$b = __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);
|
|
2205
2222
|
var Checkbox = function (_a) {
|
|
2206
2223
|
var children = _a.children, disabled = _a.disabled, checked = _a.checked, onChange = _a.onChange, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange"]);
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
return (React.createElement(Wrapper, __assign({}, accessibleProps, { onClick: disabled ? undefined : onChange }),
|
|
2211
|
-
React.createElement(Input, { checked: checked, disabled: disabled, name: accessibleProps.name, type: 'checkbox' }),
|
|
2212
|
-
children ? React.createElement(Label, null, children) : null));
|
|
2224
|
+
return (React.createElement(Wrapper$a, __assign({}, accessibleProps),
|
|
2225
|
+
React.createElement(Input$2, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'checkbox' }),
|
|
2226
|
+
children ? React.createElement(Label$3, null, children) : null));
|
|
2213
2227
|
};
|
|
2214
|
-
var templateObject_1$
|
|
2228
|
+
var templateObject_1$f, templateObject_2$e, templateObject_3$b;
|
|
2215
2229
|
|
|
2230
|
+
var SelectAll = styled.div(templateObject_1$e || (templateObject_1$e = __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);
|
|
2231
|
+
var Options$1 = styled.div(templateObject_2$d || (templateObject_2$d = __makeTemplateObject(["\n padding: 12px;\n box-sizing: border-box;\n"], ["\n padding: 12px;\n box-sizing: border-box;\n"])));
|
|
2216
2232
|
var Checklist = function (_a) {
|
|
2217
2233
|
var disabled = _a.disabled, onChange = _a.onChange, options = _a.options, selected = _a.selected, showSelectAll = _a.showSelectAll, accessibleProps = __rest(_a, ["disabled", "onChange", "options", "selected", "showSelectAll"]);
|
|
2218
2234
|
var values = options.map(function (option) { return option.value; });
|
|
@@ -2231,30 +2247,28 @@ var Checklist = function (_a) {
|
|
|
2231
2247
|
}
|
|
2232
2248
|
onChange(updated_selected);
|
|
2233
2249
|
};
|
|
2234
|
-
var SelectAll = styled.div(templateObject_1$c || (templateObject_1$c = __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);
|
|
2235
|
-
var Options = styled.div(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n padding: 12px;\n box-sizing: border-box;\n "], ["\n padding: 12px;\n box-sizing: border-box;\n "])));
|
|
2236
2250
|
return (React.createElement(React.Fragment, null,
|
|
2237
2251
|
showSelectAll && values.length ? (React.createElement(SelectAll, null,
|
|
2238
2252
|
React.createElement(Checkbox, { checked: selected.length === values.length, disabled: disabled, onChange: handleToggleAll }, "Select All"))) : null,
|
|
2239
|
-
React.createElement(Options, null, options.map(function (option) {
|
|
2253
|
+
React.createElement(Options$1, null, options.map(function (option, i) {
|
|
2240
2254
|
var label = "".concat(option.label || option.value);
|
|
2241
2255
|
var checked = selected.includes(option.value);
|
|
2242
|
-
return (React.createElement(Checkbox, __assign({}, accessibleProps, { checked: checked, disabled: disabled, onChange: handleChange.bind(null, option) }), label));
|
|
2256
|
+
return (React.createElement(Checkbox, __assign({ key: i }, accessibleProps, { checked: checked, disabled: disabled, onChange: handleChange.bind(null, option) }), label));
|
|
2243
2257
|
}))));
|
|
2244
2258
|
};
|
|
2245
|
-
var templateObject_1$
|
|
2259
|
+
var templateObject_1$e, templateObject_2$d;
|
|
2246
2260
|
|
|
2247
|
-
var Scrim$1 = styled.div(templateObject_1$
|
|
2261
|
+
var Scrim$1 = styled.div(templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 9998;\n background: ", ";\n"], ["\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 9998;\n background: ", ";\n"])), function (_a) {
|
|
2248
2262
|
var $scrim = _a.$scrim;
|
|
2249
2263
|
return ($scrim === 'dark' ? 'rgba(0,0,0,0.8)' : 'transparent');
|
|
2250
2264
|
});
|
|
2251
|
-
var Container$
|
|
2265
|
+
var Container$2 = styled.div(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n z-index: 9999;\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: fixed;\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: 9999;\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: fixed;\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) {
|
|
2252
2266
|
var $width = _a.$width;
|
|
2253
2267
|
return $width || '400px';
|
|
2254
2268
|
});
|
|
2255
|
-
var Header$2 = styled.div(templateObject_3$
|
|
2256
|
-
var Close$1 = styled.div(templateObject_4$
|
|
2257
|
-
var ContentWrapper$1 = styled.div(templateObject_5$
|
|
2269
|
+
var Header$2 = styled.div(templateObject_3$a || (templateObject_3$a = __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"])));
|
|
2270
|
+
var Close$1 = styled.div(templateObject_4$6 || (templateObject_4$6 = __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"])));
|
|
2271
|
+
var ContentWrapper$1 = styled.div(templateObject_5$4 || (templateObject_5$4 = __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"])));
|
|
2258
2272
|
var ButtonBar$1 = styled.div(templateObject_6$2 || (templateObject_6$2 = __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"])));
|
|
2259
2273
|
var Drawer = function (_a) {
|
|
2260
2274
|
var children = _a.children, description = _a.description, title = _a.title, onClose = _a.onClose, primaryButton = _a.primaryButton, secondaryButton = _a.secondaryButton, tertiaryButton = _a.tertiaryButton, scrim = _a.scrim, width = _a.width, accessibleProps = __rest(_a, ["children", "description", "title", "onClose", "primaryButton", "secondaryButton", "tertiaryButton", "scrim", "width"]);
|
|
@@ -2269,32 +2283,32 @@ var Drawer = function (_a) {
|
|
|
2269
2283
|
};
|
|
2270
2284
|
}, []);
|
|
2271
2285
|
return (React.createElement(React.Fragment, null,
|
|
2272
|
-
React.createElement(Container$
|
|
2286
|
+
React.createElement(Container$2, __assign({}, accessibleProps, { "$width": width }),
|
|
2273
2287
|
React.createElement(Header$2, null,
|
|
2274
2288
|
React.createElement("div", null,
|
|
2275
2289
|
title ? React.createElement(Heading, { type: 'secondary' }, title) : null,
|
|
2276
2290
|
description ? React.createElement(Copy, { color: 'GRAY' }, description) : null),
|
|
2277
2291
|
React.createElement(Close$1, { onClick: onClose },
|
|
2278
|
-
React.createElement(Button, { icon: mdiClose, small: true
|
|
2292
|
+
React.createElement(Button, { format: 'secondary', icon: mdiClose, small: true }))),
|
|
2279
2293
|
React.createElement(ContentWrapper$1, null, children),
|
|
2280
2294
|
primaryButton || secondaryButton || tertiaryButton ? (React.createElement(ButtonBar$1, null,
|
|
2281
|
-
tertiaryButton ? React.createElement(Button, __assign({}, tertiaryButton, {
|
|
2282
|
-
secondaryButton ? React.createElement(Button, __assign({}, secondaryButton, {
|
|
2283
|
-
primaryButton ? React.createElement(Button, __assign({}, primaryButton, {
|
|
2295
|
+
tertiaryButton ? React.createElement(Button, __assign({}, tertiaryButton, { format: 'secondary' })) : null,
|
|
2296
|
+
secondaryButton ? React.createElement(Button, __assign({}, secondaryButton, { format: 'secondary' })) : null,
|
|
2297
|
+
primaryButton ? React.createElement(Button, __assign({}, primaryButton, { format: 'primary' })) : null)) : null),
|
|
2284
2298
|
scrim ? React.createElement(Scrim$1, { "$scrim": scrim, onClick: onClose }) : null));
|
|
2285
2299
|
};
|
|
2286
|
-
var templateObject_1$
|
|
2300
|
+
var templateObject_1$d, templateObject_2$c, templateObject_3$a, templateObject_4$6, templateObject_5$4, templateObject_6$2;
|
|
2287
2301
|
|
|
2288
|
-
var Wrapper$
|
|
2289
|
-
var LabelRow = styled.div(templateObject_2$
|
|
2290
|
-
var Label$2 = styled.label(templateObject_3$
|
|
2291
|
-
var Required = styled.span(templateObject_4$
|
|
2292
|
-
var Action = styled.span(templateObject_5$
|
|
2302
|
+
var Wrapper$9 = styled.div(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n margin: ", ";\n"], ["\n margin: ", ";\n"])), function (props) { return props.$margin || '0px 0px 15px 0px'; });
|
|
2303
|
+
var LabelRow = styled.div(templateObject_2$b || (templateObject_2$b = __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"])));
|
|
2304
|
+
var Label$2 = styled.label(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\n font-size: ", ";\n font-weight: 500;\n line-height: 1em;\n font-family: ", ";\n color: ", ";\n"], ["\n font-size: ", ";\n font-weight: 500;\n line-height: 1em;\n font-family: ", ";\n color: ", ";\n"])), FontSizes.DEFAULT, FontStyles.DEFAULT, Colors.BLACK.Hex);
|
|
2305
|
+
var Required = styled.span(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n color: ", ";\n margin-left: 4px;\n"], ["\n color: ", ";\n margin-left: 4px;\n"])), Colors.RED.Hex);
|
|
2306
|
+
var Action = styled.span(templateObject_5$3 || (templateObject_5$3 = __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);
|
|
2293
2307
|
var Description = styled.div(templateObject_6$1 || (templateObject_6$1 = __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);
|
|
2294
2308
|
var Validation = styled.div(templateObject_7$1 || (templateObject_7$1 = __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);
|
|
2295
2309
|
var Field = function (_a) {
|
|
2296
2310
|
var action = _a.action, children = _a.children, validationText = _a.validationText, label = _a.label, margin = _a.margin, description = _a.description, required = _a.required, htmlFor = _a.htmlFor, accessibleProps = __rest(_a, ["action", "children", "validationText", "label", "margin", "description", "required", "htmlFor"]);
|
|
2297
|
-
return (React.createElement(Wrapper$
|
|
2311
|
+
return (React.createElement(Wrapper$9, __assign({ "$margin": margin }, accessibleProps),
|
|
2298
2312
|
React.createElement(LabelRow, null,
|
|
2299
2313
|
React.createElement(Label$2, { htmlFor: htmlFor },
|
|
2300
2314
|
label,
|
|
@@ -2304,7 +2318,7 @@ var Field = function (_a) {
|
|
|
2304
2318
|
children,
|
|
2305
2319
|
validationText ? React.createElement(Validation, null, validationText) : null));
|
|
2306
2320
|
};
|
|
2307
|
-
var templateObject_1$
|
|
2321
|
+
var templateObject_1$c, templateObject_2$b, templateObject_3$9, templateObject_4$5, templateObject_5$3, templateObject_6$1, templateObject_7$1;
|
|
2308
2322
|
|
|
2309
2323
|
var formatAsPhone = function (number) {
|
|
2310
2324
|
var formatted_value = "".concat(number).replace(/[^0-9.]/g, '');
|
|
@@ -2333,10 +2347,12 @@ var formatAsSsn = function (number) {
|
|
|
2333
2347
|
return formatted_value;
|
|
2334
2348
|
};
|
|
2335
2349
|
|
|
2336
|
-
var StyledInput = styled.input(templateObject_1$
|
|
2337
|
-
var
|
|
2350
|
+
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); });
|
|
2351
|
+
var StyledSuffix = styled.div(templateObject_2$a || (templateObject_2$a = __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);
|
|
2352
|
+
var StyledWrapper = styled.div(templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
2353
|
+
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: 100%;\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: 100%;\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 (props) { return (props.$readOnly ? '#cccccc' : Colors.PRIMARY.Hex); });
|
|
2338
2354
|
var Input$1 = function (_a) {
|
|
2339
|
-
var format = _a.format, 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, _b = _a.type, type = _b === void 0 ? 'text' : _b, _c = _a.value, value = _c === void 0 ? '' : _c, accessibleProps = __rest(_a, ["format", "height", "invalid", "max", "maxLength", "min", "onBlur", "onChange", "onKeyDown", "placeholder", "readOnly", "step", "type", "value"]);
|
|
2355
|
+
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, _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", "type", "value"]);
|
|
2340
2356
|
var handleInputChange = function (e) {
|
|
2341
2357
|
if (format === 'currency' || format === 'currency_decimal') {
|
|
2342
2358
|
e.target.value = e.target.value.replace(/[^0-9.]/g, '');
|
|
@@ -2375,15 +2391,17 @@ var Input$1 = function (_a) {
|
|
|
2375
2391
|
if (format === 'ssn' && type !== 'password') {
|
|
2376
2392
|
formatted_value = formatAsSsn(value);
|
|
2377
2393
|
}
|
|
2378
|
-
return type === 'textarea' ? (React.createElement(StyledTextarea, __assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, maxLength: maxLength, onBlur: onBlur, onChange: handleTextareaChange, placeholder: placeholder, value: value }, accessibleProps))) : (React.createElement(
|
|
2394
|
+
return type === 'textarea' ? (React.createElement(StyledTextarea, __assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, maxLength: maxLength, onBlur: onBlur, onChange: handleTextareaChange, placeholder: placeholder, value: value }, accessibleProps))) : (React.createElement(StyledWrapper, null,
|
|
2395
|
+
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)),
|
|
2396
|
+
suffix && React.createElement(StyledSuffix, null, suffix)));
|
|
2379
2397
|
};
|
|
2380
|
-
var templateObject_1$
|
|
2398
|
+
var templateObject_1$b, templateObject_2$a, templateObject_3$8, templateObject_4$4;
|
|
2381
2399
|
|
|
2382
|
-
var Wrapper$
|
|
2383
|
-
var Container = styled.dialog(templateObject_2$
|
|
2384
|
-
var Header$1 = styled.div(templateObject_3$
|
|
2400
|
+
var Wrapper$8 = styled.div(templateObject_1$a || (templateObject_1$a = __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"])));
|
|
2401
|
+
var Container$1 = styled.dialog(templateObject_2$9 || (templateObject_2$9 = __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'; });
|
|
2402
|
+
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 #e5e5e5;\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 #e5e5e5;\n display: flex;\n align-items: center;\n background: #ffffff;\n box-sizing: border-box;\n"])));
|
|
2385
2403
|
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"])));
|
|
2386
|
-
var CloseMsg = styled.span(templateObject_5$
|
|
2404
|
+
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);
|
|
2387
2405
|
var ContentWrapper = styled.div(templateObject_6 || (templateObject_6 = __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"])));
|
|
2388
2406
|
var ButtonBar = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n position: sticky;\n bottom: 0;\n background: #ffffff;\n padding: 20px;\n border-top: 1px solid #e5e5e5;\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 #e5e5e5;\n display: flex;\n align-items: center;\n justify-self: flex-end;\n box-sizing: border-box;\n"])));
|
|
2389
2407
|
var Modal = function (_a) {
|
|
@@ -2398,8 +2416,8 @@ var Modal = function (_a) {
|
|
|
2398
2416
|
document.onkeydown = null;
|
|
2399
2417
|
};
|
|
2400
2418
|
}, []);
|
|
2401
|
-
return (React.createElement(Wrapper$
|
|
2402
|
-
React.createElement(Container, __assign({ "$maxWidth": maxWidth, open: true }, accessibleProps),
|
|
2419
|
+
return (React.createElement(Wrapper$8, null,
|
|
2420
|
+
React.createElement(Container$1, __assign({ "$maxWidth": maxWidth, open: true }, accessibleProps),
|
|
2403
2421
|
React.createElement(Header$1, null,
|
|
2404
2422
|
title ? React.createElement(Heading, { type: 'secondary' }, title) : null,
|
|
2405
2423
|
React.createElement(Close, { onClick: onClose },
|
|
@@ -2407,19 +2425,33 @@ var Modal = function (_a) {
|
|
|
2407
2425
|
React.createElement(Icon, { color: Colors.BLACK.Hex, path: mdiClose, size: '24px' }))),
|
|
2408
2426
|
React.createElement(ContentWrapper, null, children),
|
|
2409
2427
|
primaryButton || secondaryButton || tertiaryButton ? (React.createElement(ButtonBar, null,
|
|
2410
|
-
tertiaryButton ? React.createElement(Button, __assign({}, tertiaryButton, {
|
|
2428
|
+
tertiaryButton ? React.createElement(Button, __assign({}, tertiaryButton, { format: 'secondary' })) : null,
|
|
2411
2429
|
primaryButton || secondaryButton ? (React.createElement("div", { style: {
|
|
2412
2430
|
marginLeft: 'auto',
|
|
2413
2431
|
paddingLeft: 40,
|
|
2414
2432
|
display: 'flex',
|
|
2415
2433
|
alignItems: 'center',
|
|
2416
2434
|
} },
|
|
2417
|
-
secondaryButton ? React.createElement(Button, __assign({}, secondaryButton, {
|
|
2418
|
-
primaryButton ? (React.createElement(Button, __assign({}, primaryButton, { margin: '0px 0px 0px 10px'
|
|
2435
|
+
secondaryButton ? React.createElement(Button, __assign({}, secondaryButton, { format: 'secondary' })) : null,
|
|
2436
|
+
primaryButton ? (React.createElement(Button, __assign({}, primaryButton, { format: 'primary', margin: '0px 0px 0px 10px' }))) : null)) : null)) : null)));
|
|
2437
|
+
};
|
|
2438
|
+
var templateObject_1$a, templateObject_2$9, templateObject_3$7, templateObject_4$3, templateObject_5$2, templateObject_6, templateObject_7;
|
|
2439
|
+
|
|
2440
|
+
var Wrapper$7 = styled.div(templateObject_1$9 || (templateObject_1$9 = __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'; });
|
|
2441
|
+
var MenuItem = styled.div(templateObject_2$8 || (templateObject_2$8 = __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"], ["\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"])));
|
|
2442
|
+
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"])));
|
|
2443
|
+
var MoreMenu = function (_a) {
|
|
2444
|
+
var maxHeight = _a.maxHeight, _b = _a.menuItems, menuItems = _b === void 0 ? [] : _b, accessibleProps = __rest(_a, ["maxHeight", "menuItems"]);
|
|
2445
|
+
return (React.createElement(Wrapper$7, __assign({ "$maxHeight": maxHeight }, accessibleProps), menuItems.map(function (item) {
|
|
2446
|
+
return (React.createElement(MenuItem, __assign({ onClick: item.onClick }, accessibleProps),
|
|
2447
|
+
item.icon ? (React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: item.icon, size: '20px' })) : null,
|
|
2448
|
+
React.createElement(Title, null, item.label)));
|
|
2449
|
+
})));
|
|
2419
2450
|
};
|
|
2420
|
-
var templateObject_1$
|
|
2451
|
+
var templateObject_1$9, templateObject_2$8, templateObject_3$6;
|
|
2421
2452
|
|
|
2422
|
-
var
|
|
2453
|
+
var Wrapper$6 = styled.div(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
|
2454
|
+
var Trigger$1 = styled.div(templateObject_2$7 || (templateObject_2$7 = __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 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 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) {
|
|
2423
2455
|
if (props.$invalid) {
|
|
2424
2456
|
return Colors.RED.Hex;
|
|
2425
2457
|
}
|
|
@@ -2430,14 +2462,14 @@ var Trigger$1 = styled.div(templateObject_1$7 || (templateObject_1$7 = __makeTem
|
|
|
2430
2462
|
return '#cccccc';
|
|
2431
2463
|
}
|
|
2432
2464
|
}, function (props) { return (props.$readOnly ? '#f5f5f5' : '#ffffff'); });
|
|
2433
|
-
var Value = styled.div(
|
|
2434
|
-
var Options = styled.div(
|
|
2435
|
-
var Scrim = styled.div(
|
|
2465
|
+
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);
|
|
2466
|
+
var Options = styled.div(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n background: #fff;\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: 2;\n"], ["\n background: #fff;\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: 2;\n"])), Colors.PRIMARY.Hex);
|
|
2467
|
+
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: 1;\n"], ["\n bottom: 0;\n left: 0;\n position: fixed;\n right: 0;\n top: 0;\n z-index: 1;\n"])));
|
|
2436
2468
|
var MultiSelect = function (_a) {
|
|
2437
2469
|
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, selected = _a.selected, showSelectAll = _a.showSelectAll, accessibleProps = __rest(_a, ["readOnly", "displayCount", "invalid", "onChange", "options", "selected", "showSelectAll"]);
|
|
2438
2470
|
var _d = useState(false), showOptions = _d[0], setShowOptions = _d[1];
|
|
2439
2471
|
var selected_options = options.filter(function (o) { return selected.includes(o.value); });
|
|
2440
|
-
return (React.createElement(
|
|
2472
|
+
return (React.createElement(Wrapper$6, null,
|
|
2441
2473
|
React.createElement(Trigger$1, __assign({ "$invalid": invalid, "$readOnly": readOnly, "$showOptions": showOptions, onClick: readOnly ? undefined : setShowOptions.bind(null, !showOptions) }, accessibleProps),
|
|
2442
2474
|
React.createElement(Value, null, selected.length > 0 && selected.length <= displayCount
|
|
2443
2475
|
? selected_options.map(function (o) { return o.label || o.value; }).join(', ')
|
|
@@ -2447,14 +2479,20 @@ var MultiSelect = function (_a) {
|
|
|
2447
2479
|
React.createElement(Checklist, { disabled: readOnly, onChange: onChange, options: options, selected: selected, showSelectAll: showSelectAll }))) : null,
|
|
2448
2480
|
showOptions ? React.createElement(Scrim, { onClick: setShowOptions.bind(null, !showOptions) }) : null));
|
|
2449
2481
|
};
|
|
2450
|
-
var templateObject_1$
|
|
2451
|
-
|
|
2452
|
-
var Wrapper$
|
|
2453
|
-
var
|
|
2454
|
-
|
|
2482
|
+
var templateObject_1$8, templateObject_2$7, templateObject_3$5, templateObject_4$2, templateObject_5$1;
|
|
2483
|
+
|
|
2484
|
+
var Wrapper$5 = styled.div(templateObject_1$7 || (templateObject_1$7 = __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"], ["\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"])), function (props) { return (props.$readOnly ? '#f5f5f5' : '#ffffff'); }, function (props) { return (props.$invalid ? Colors.RED.Hex : '#cccccc'); }, function (_a) {
|
|
2485
|
+
var $style = _a.$style;
|
|
2486
|
+
return ($style === null || $style === void 0 ? void 0 : $style.borderRadius) || '4px';
|
|
2487
|
+
}, function (_a) {
|
|
2488
|
+
var $style = _a.$style;
|
|
2489
|
+
return ($style === null || $style === void 0 ? void 0 : $style.flexGrow) || 0;
|
|
2490
|
+
});
|
|
2491
|
+
var Trigger = styled.select(templateObject_2$6 || (templateObject_2$6 = __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);
|
|
2492
|
+
var IconWrapper$1 = styled.span(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n position: absolute;\n right: 4px;\n height: 22px;\n z-index: 1;\n"], ["\n position: absolute;\n right: 4px;\n height: 22px;\n z-index: 1;\n"])));
|
|
2455
2493
|
var Select = function (_a) {
|
|
2456
|
-
var options = _a.options, optionGroups = _a.optionGroups, placeholder = _a.placeholder, readOnly = _a.readOnly, invalid = _a.invalid, value = _a.value, onChange = _a.onChange, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "value", "onChange"]);
|
|
2457
|
-
return (React.createElement(Wrapper$
|
|
2494
|
+
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"]);
|
|
2495
|
+
return (React.createElement(Wrapper$5, { "$invalid": invalid, "$readOnly": readOnly, "$style": style },
|
|
2458
2496
|
React.createElement(Trigger, __assign({ disabled: readOnly, onChange: onChange, placeholder: placeholder, value: value }, accessibleProps),
|
|
2459
2497
|
placeholder ? (React.createElement("option", { disabled: true, value: '' }, placeholder)) : null,
|
|
2460
2498
|
optionGroups &&
|
|
@@ -2470,9 +2508,9 @@ var Select = function (_a) {
|
|
|
2470
2508
|
React.createElement(IconWrapper$1, null,
|
|
2471
2509
|
React.createElement(Icon, { color: Colors.BLACK.Hex, path: mdiChevronDown, size: '22px' }))));
|
|
2472
2510
|
};
|
|
2473
|
-
var templateObject_1$
|
|
2511
|
+
var templateObject_1$7, templateObject_2$6, templateObject_3$4;
|
|
2474
2512
|
|
|
2475
|
-
var Wrapper$
|
|
2513
|
+
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"])));
|
|
2476
2514
|
var Pagination = function (_a) {
|
|
2477
2515
|
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"]);
|
|
2478
2516
|
var is_first_page = currentPage === 1;
|
|
@@ -2493,7 +2531,7 @@ var Pagination = function (_a) {
|
|
|
2493
2531
|
onClick(new_page);
|
|
2494
2532
|
}
|
|
2495
2533
|
};
|
|
2496
|
-
return (React.createElement(Wrapper$
|
|
2534
|
+
return (React.createElement(Wrapper$4, __assign({}, accessibleProps),
|
|
2497
2535
|
React.createElement(Button, { disabled: is_first_page, icon: mdiChevronLeft, onClick: handlePrevClick, small: true }),
|
|
2498
2536
|
React.createElement(Select, { onChange: handlePageChange, options: Array.from(Array(pageCount).keys(), function (p) { return p + 1; }).map(function (p) { return ({
|
|
2499
2537
|
label: "Page ".concat(p),
|
|
@@ -2501,18 +2539,18 @@ var Pagination = function (_a) {
|
|
|
2501
2539
|
}); }), value: "".concat(currentPage) }),
|
|
2502
2540
|
React.createElement(Button, { disabled: is_last_page, icon: mdiChevronRight, onClick: handleNextClick, small: true })));
|
|
2503
2541
|
};
|
|
2504
|
-
var templateObject_1$
|
|
2542
|
+
var templateObject_1$6;
|
|
2505
2543
|
|
|
2506
|
-
var Wrapper$
|
|
2507
|
-
var Input = styled.input(templateObject_2$
|
|
2508
|
-
var Label$1 = styled.span(templateObject_3$
|
|
2544
|
+
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);
|
|
2545
|
+
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"])));
|
|
2546
|
+
var Label$1 = styled.span(templateObject_3$3 || (templateObject_3$3 = __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);
|
|
2509
2547
|
var Radio = function (_a) {
|
|
2510
2548
|
var children = _a.children, disabled = _a.disabled, checked = _a.checked, onChange = _a.onChange, value = _a.value, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value"]);
|
|
2511
|
-
return (React.createElement(Wrapper$
|
|
2549
|
+
return (React.createElement(Wrapper$3, __assign({ "$disabled": disabled }, accessibleProps),
|
|
2512
2550
|
React.createElement(Input, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'radio', value: value }),
|
|
2513
2551
|
React.createElement(Label$1, null, children)));
|
|
2514
2552
|
};
|
|
2515
|
-
var templateObject_1$
|
|
2553
|
+
var templateObject_1$5, templateObject_2$5, templateObject_3$3;
|
|
2516
2554
|
|
|
2517
2555
|
var RadioList = function (_a) {
|
|
2518
2556
|
var disabled = _a.disabled, onChange = _a.onChange, options = _a.options, value = _a.value, accessibleProps = __rest(_a, ["disabled", "onChange", "options", "value"]);
|
|
@@ -2522,9 +2560,9 @@ var RadioList = function (_a) {
|
|
|
2522
2560
|
})));
|
|
2523
2561
|
};
|
|
2524
2562
|
|
|
2525
|
-
var StyledTable = styled.table(templateObject_1$
|
|
2526
|
-
var Header = styled.th(templateObject_2$
|
|
2527
|
-
var Row = styled.tr(templateObject_3$
|
|
2563
|
+
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'; });
|
|
2564
|
+
var Header = styled.th(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n padding: 12px;\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: 1em;\n position: relative;\n box-sizing: border-box;\n width: ", ";\n cursor: ", ";\n color: ", ";\n"], ["\n padding: 12px;\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: 1em;\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); });
|
|
2565
|
+
var Row = styled.tr(templateObject_3$2 || (templateObject_3$2 = __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) {
|
|
2528
2566
|
return props.$isClickable ? "rgba(".concat(Colors.PRIMARY.Rgb, ", 0.1)") : props.$bgColor;
|
|
2529
2567
|
});
|
|
2530
2568
|
var Column = styled.td(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n padding: 16px 12px;\n vertical-align: middle;\n word-break: break-word;\n line-height: 1.4em;\n box-sizing: border-box;\n width: ", ";\n"], ["\n padding: 16px 12px;\n vertical-align: middle;\n word-break: break-word;\n line-height: 1.4em;\n box-sizing: border-box;\n width: ", ";\n"])), function (props) { return props.$width || 'auto'; });
|
|
@@ -2545,36 +2583,36 @@ var Table = function (_a) {
|
|
|
2545
2583
|
})));
|
|
2546
2584
|
}))) : null));
|
|
2547
2585
|
};
|
|
2548
|
-
var templateObject_1$
|
|
2586
|
+
var templateObject_1$4, templateObject_2$4, templateObject_3$2, templateObject_4$1, templateObject_5;
|
|
2549
2587
|
|
|
2550
|
-
var Wrapper$
|
|
2551
|
-
var Tab = styled.div(templateObject_2$
|
|
2588
|
+
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"])));
|
|
2589
|
+
var Tab = styled.div(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\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 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); });
|
|
2552
2590
|
var Tabs = function (_a) {
|
|
2553
2591
|
var tabs = _a.tabs, accessibleProps = __rest(_a, ["tabs"]);
|
|
2554
|
-
return (React.createElement(Wrapper$
|
|
2592
|
+
return (React.createElement(Wrapper$2, __assign({}, accessibleProps), tabs.map(function (_a) {
|
|
2555
2593
|
var isActive = _a.isActive, label = _a.label, accessibleProps = __rest(_a, ["isActive", "label"]);
|
|
2556
2594
|
return (React.createElement(Tab, __assign({ "$isActive": isActive || false }, accessibleProps), label));
|
|
2557
2595
|
})));
|
|
2558
2596
|
};
|
|
2559
2597
|
Tabs.defaultProps = {};
|
|
2560
|
-
var templateObject_1$
|
|
2598
|
+
var templateObject_1$3, templateObject_2$3;
|
|
2561
2599
|
|
|
2562
|
-
var Wrapper = styled.div(templateObject_1$
|
|
2563
|
-
var Content = styled.div(templateObject_2$
|
|
2564
|
-
var Label = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: #ffffff;\n font-size: ", ";\n font-weight: 500;\n font-family: ", ";\n line-height: 1.2em;\n"], ["\n color: #ffffff;\n font-size: ", ";\n font-weight: 500;\n font-family: ", ";\n line-height: 1.2em;\n"])), FontSizes.SMALL, FontStyles.DEFAULT);
|
|
2600
|
+
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'); });
|
|
2601
|
+
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"])));
|
|
2602
|
+
var Label = styled.div(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n color: #ffffff;\n font-size: ", ";\n font-weight: 500;\n font-family: ", ";\n line-height: 1.2em;\n"], ["\n color: #ffffff;\n font-size: ", ";\n font-weight: 500;\n font-family: ", ";\n line-height: 1.2em;\n"])), FontSizes.SMALL, FontStyles.DEFAULT);
|
|
2565
2603
|
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"])));
|
|
2566
2604
|
var Tag = function (_a) {
|
|
2567
2605
|
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"]);
|
|
2568
|
-
return (React.createElement(Wrapper, __assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps),
|
|
2606
|
+
return (React.createElement(Wrapper$1, __assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps),
|
|
2569
2607
|
React.createElement(Content, null,
|
|
2570
2608
|
React.createElement(Label, null, children),
|
|
2571
2609
|
removable ? (React.createElement(Remove, null,
|
|
2572
2610
|
React.createElement(Icon, { color: '#ffffff', path: mdiClose, size: '15px' }))) : null)));
|
|
2573
2611
|
};
|
|
2574
|
-
var templateObject_1$
|
|
2612
|
+
var templateObject_1$2, templateObject_2$2, templateObject_3$1, templateObject_4;
|
|
2575
2613
|
|
|
2576
|
-
var Track = styled.div(templateObject_1 || (templateObject_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); });
|
|
2577
|
-
var Handle = styled.div(templateObject_2 || (templateObject_2 = __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'); });
|
|
2614
|
+
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); });
|
|
2615
|
+
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'); });
|
|
2578
2616
|
var Toggle = function (_a) {
|
|
2579
2617
|
var onClick = _a.onClick, on = _a.on, accessibleProps = __rest(_a, ["onClick", "on"]);
|
|
2580
2618
|
return (React.createElement(Track, __assign({ "$on": on, onClick: onClick }, accessibleProps),
|
|
@@ -2583,7 +2621,22 @@ var Toggle = function (_a) {
|
|
|
2583
2621
|
React.createElement(Icon, { color: on ? Colors.GREEN.Hex : Colors.BLACK.Hex, path: on ? mdiCheck : mdiClose, size: '16px' }))));
|
|
2584
2622
|
};
|
|
2585
2623
|
Toggle.defaultProps = {};
|
|
2586
|
-
var templateObject_1, templateObject_2;
|
|
2624
|
+
var templateObject_1$1, templateObject_2$1;
|
|
2625
|
+
|
|
2626
|
+
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"])));
|
|
2627
|
+
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"])));
|
|
2628
|
+
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"])));
|
|
2629
|
+
var ZeroState = function (_a) {
|
|
2630
|
+
var icon = _a.icon, title = _a.title, description = _a.description, action = _a.action, accessibleProps = __rest(_a, ["icon", "title", "description", "action"]);
|
|
2631
|
+
return (React.createElement(Container, __assign({}, accessibleProps),
|
|
2632
|
+
React.createElement(StyledIcon, null,
|
|
2633
|
+
React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: icon, size: '40px' })),
|
|
2634
|
+
React.createElement(Wrapper, null,
|
|
2635
|
+
React.createElement(Heading, { children: title, type: 'tertiary' }),
|
|
2636
|
+
description && React.createElement(Copy, { align: 'center', children: description, color: 'GRAY', type: 'default' })),
|
|
2637
|
+
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 }))));
|
|
2638
|
+
};
|
|
2639
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
2587
2640
|
|
|
2588
|
-
export { Accordion, ActionDialog, Alert, BulkActionBar, Button, Checkbox, Checklist, Copy, Drawer, Field, Heading, Input$1 as Input, Modal, MultiSelect, Pagination, Radio, RadioList, Select, Table, Tabs, Tag, Toggle };
|
|
2641
|
+
export { Accordion, ActionDialog, Alert, BulkActionBar, Button, Checkbox, Checklist, Copy, Drawer, Field, Heading, Input$1 as Input, Modal, MoreMenu, MultiSelect, Pagination, Radio, RadioList, Select, Table, Tabs, Tag, Toggle, ZeroState };
|
|
2589
2642
|
//# sourceMappingURL=index.js.map
|