@hexure/ui 1.3.3 → 1.3.5
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 +213 -61
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Field/Field.d.ts +1 -1
- package/dist/cjs/types/components/FileUpload/FileUpload.d.ts +23 -0
- package/dist/cjs/types/components/FileUpload/index.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +2 -0
- package/dist/esm/index.js +213 -63
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Field/Field.d.ts +1 -1
- package/dist/esm/types/components/FileUpload/FileUpload.d.ts +23 -0
- package/dist/esm/types/components/FileUpload/index.d.ts +1 -0
- package/dist/esm/types/index.d.ts +2 -0
- package/dist/index.d.ts +29 -2
- package/package.json +90 -90
- package/dist/cjs/types/components/Accordion/Accordion.stories.d.ts +0 -5
- package/dist/cjs/types/components/ActionDialog/ActionDialog.stories.d.ts +0 -5
- package/dist/cjs/types/components/ActionDialog/ActionDialog.test.d.ts +0 -1
- package/dist/cjs/types/components/Alert/Alert.stories.d.ts +0 -5
- package/dist/cjs/types/components/BulkActionBar/BulkActionBar.stories.d.ts +0 -5
- package/dist/cjs/types/components/Button/Button.stories.d.ts +0 -5
- package/dist/cjs/types/components/Checkbox/Checkbox.stories.d.ts +0 -5
- package/dist/cjs/types/components/Checklist/Checklist.stories.d.ts +0 -5
- package/dist/cjs/types/components/Copy/Copy.stories.d.ts +0 -5
- package/dist/cjs/types/components/DatePicker/DatePicker.stories.d.ts +0 -5
- package/dist/cjs/types/components/Drawer/Drawer.stories.d.ts +0 -5
- package/dist/cjs/types/components/Field/Field.stories.d.ts +0 -5
- package/dist/cjs/types/components/Heading/Heading.stories.d.ts +0 -5
- package/dist/cjs/types/components/Input/Input.stories.d.ts +0 -5
- package/dist/cjs/types/components/Logo/Logo.stories.d.ts +0 -5
- package/dist/cjs/types/components/Modal/Modal.stories.d.ts +0 -5
- package/dist/cjs/types/components/MoreMenu/MoreMenu.stories.d.ts +0 -5
- package/dist/cjs/types/components/Multiselect/MultiSelect.stories.d.ts +0 -5
- package/dist/cjs/types/components/Pagination/Pagination.stories.d.ts +0 -5
- package/dist/cjs/types/components/Radio/Radio.stories.d.ts +0 -5
- package/dist/cjs/types/components/RadioList/RadioList.stories.d.ts +0 -5
- package/dist/cjs/types/components/Select/Select.stories.d.ts +0 -5
- package/dist/cjs/types/components/Table/Table.stories.d.ts +0 -5
- package/dist/cjs/types/components/Tabs/Tabs.stories.d.ts +0 -5
- package/dist/cjs/types/components/Tag/Tag.stories.d.ts +0 -5
- package/dist/cjs/types/components/Toggle/Toggle.stories.d.ts +0 -5
- package/dist/cjs/types/components/ZeroState/ZeroState.stories.d.ts +0 -5
- package/dist/esm/types/components/Accordion/Accordion.stories.d.ts +0 -5
- package/dist/esm/types/components/ActionDialog/ActionDialog.stories.d.ts +0 -5
- package/dist/esm/types/components/ActionDialog/ActionDialog.test.d.ts +0 -1
- package/dist/esm/types/components/Alert/Alert.stories.d.ts +0 -5
- package/dist/esm/types/components/BulkActionBar/BulkActionBar.stories.d.ts +0 -5
- package/dist/esm/types/components/Button/Button.stories.d.ts +0 -5
- package/dist/esm/types/components/Checkbox/Checkbox.stories.d.ts +0 -5
- package/dist/esm/types/components/Checklist/Checklist.stories.d.ts +0 -5
- package/dist/esm/types/components/Copy/Copy.stories.d.ts +0 -5
- package/dist/esm/types/components/DatePicker/DatePicker.stories.d.ts +0 -5
- package/dist/esm/types/components/Drawer/Drawer.stories.d.ts +0 -5
- package/dist/esm/types/components/Field/Field.stories.d.ts +0 -5
- package/dist/esm/types/components/Heading/Heading.stories.d.ts +0 -5
- package/dist/esm/types/components/Input/Input.stories.d.ts +0 -5
- package/dist/esm/types/components/Logo/Logo.stories.d.ts +0 -5
- package/dist/esm/types/components/Modal/Modal.stories.d.ts +0 -5
- package/dist/esm/types/components/MoreMenu/MoreMenu.stories.d.ts +0 -5
- package/dist/esm/types/components/Multiselect/MultiSelect.stories.d.ts +0 -5
- package/dist/esm/types/components/Pagination/Pagination.stories.d.ts +0 -5
- package/dist/esm/types/components/Radio/Radio.stories.d.ts +0 -5
- package/dist/esm/types/components/RadioList/RadioList.stories.d.ts +0 -5
- package/dist/esm/types/components/Select/Select.stories.d.ts +0 -5
- package/dist/esm/types/components/Table/Table.stories.d.ts +0 -5
- package/dist/esm/types/components/Tabs/Tabs.stories.d.ts +0 -5
- package/dist/esm/types/components/Tag/Tag.stories.d.ts +0 -5
- package/dist/esm/types/components/Toggle/Toggle.stories.d.ts +0 -5
- package/dist/esm/types/components/ZeroState/ZeroState.stories.d.ts +0 -5
- /package/dist/cjs/types/components/{Multiselect → MultiSelect}/MultiSelect.d.ts +0 -0
- /package/dist/cjs/types/components/{Multiselect → MultiSelect}/index.d.ts +0 -0
- /package/dist/esm/types/components/{Multiselect → MultiSelect}/MultiSelect.d.ts +0 -0
- /package/dist/esm/types/components/{Multiselect → MultiSelect}/index.d.ts +0 -0
package/dist/cjs/index.js
CHANGED
|
@@ -40,6 +40,15 @@ function __rest(s, e) {
|
|
|
40
40
|
}
|
|
41
41
|
return t;
|
|
42
42
|
}
|
|
43
|
+
function __spreadArray(to, from, pack) {
|
|
44
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
45
|
+
if (ar || !(i in from)) {
|
|
46
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
47
|
+
ar[i] = from[i];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
51
|
+
}
|
|
43
52
|
function __makeTemplateObject(cooked, raw) {
|
|
44
53
|
if (Object.defineProperty) {
|
|
45
54
|
Object.defineProperty(cooked, "raw", {
|
|
@@ -2025,8 +2034,8 @@ var FontSizes = {
|
|
|
2025
2034
|
SMALL: '13px',
|
|
2026
2035
|
};
|
|
2027
2036
|
|
|
2028
|
-
var Header$3 = styled.div(templateObject_1$
|
|
2029
|
-
var Title$1 = styled.div(templateObject_2$
|
|
2037
|
+
var Header$3 = styled.div(templateObject_1$n || (templateObject_1$n = __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"])));
|
|
2038
|
+
var Title$1 = styled.div(templateObject_2$l || (templateObject_2$l = __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);
|
|
2030
2039
|
var Accordion = function (_a) {
|
|
2031
2040
|
var title = _a.title, children = _a.children, open = _a.open, onClick = _a.onClick, accessibleProps = __rest(_a, ["title", "children", "open", "onClick"]);
|
|
2032
2041
|
return (React.createElement(React.Fragment, null,
|
|
@@ -2035,7 +2044,7 @@ var Accordion = function (_a) {
|
|
|
2035
2044
|
React.createElement(Icon, { color: Colors.BLACK.Hex, path: open ? js.mdiChevronUp : js.mdiChevronDown, size: '24px' })),
|
|
2036
2045
|
open ? children : null));
|
|
2037
2046
|
};
|
|
2038
|
-
var templateObject_1$
|
|
2047
|
+
var templateObject_1$n, templateObject_2$l;
|
|
2039
2048
|
|
|
2040
2049
|
var button_type_mapping = {
|
|
2041
2050
|
primary: {
|
|
@@ -2060,7 +2069,7 @@ var button_type_mapping = {
|
|
|
2060
2069
|
badge_content_color: Colors.RED.Hex,
|
|
2061
2070
|
},
|
|
2062
2071
|
};
|
|
2063
|
-
var StyledButton = styled.button(templateObject_1$
|
|
2072
|
+
var StyledButton = styled.button(templateObject_1$m || (templateObject_1$m = __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) {
|
|
2064
2073
|
if (props.$hasChildren) {
|
|
2065
2074
|
if (props.$small) {
|
|
2066
2075
|
return '0 10px';
|
|
@@ -2083,9 +2092,9 @@ var StyledButton = styled.button(templateObject_1$l || (templateObject_1$l = __m
|
|
|
2083
2092
|
}, function (props) { return (props.$disabled ? 'default' : 'pointer'); }, function (props) { return (props.$disabled ? 0.6 : 0.9); }, function (props) {
|
|
2084
2093
|
return props.$format ? button_type_mapping[props.$format].border_color : Colors.PRIMARY.Hex;
|
|
2085
2094
|
}, function (props) { return (props.$disabled ? 0.6 : 1); });
|
|
2086
|
-
var Label$4 = styled.span(templateObject_2$
|
|
2087
|
-
var StyledIcon$
|
|
2088
|
-
var Badge = styled.span(templateObject_4$
|
|
2095
|
+
var Label$4 = styled.span(templateObject_2$k || (templateObject_2$k = __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'); });
|
|
2096
|
+
var StyledIcon$2 = styled.span(templateObject_3$h || (templateObject_3$h = __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'); });
|
|
2097
|
+
var Badge = 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) {
|
|
2089
2098
|
return props.$format ? button_type_mapping[props.$format].badge_bg_color : '#fff';
|
|
2090
2099
|
}, function (props) {
|
|
2091
2100
|
return props.$format ? button_type_mapping[props.$format].badge_content_color : Colors.PRIMARY.Hex;
|
|
@@ -2095,13 +2104,13 @@ var Button = function (_a) {
|
|
|
2095
2104
|
var has_children = children && children.length > 0;
|
|
2096
2105
|
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),
|
|
2097
2106
|
children ? (React.createElement(Label$4, { "$format": format, "$small": small }, children)) : null,
|
|
2098
|
-
icon && !badge ? (React.createElement(StyledIcon$
|
|
2107
|
+
icon && !badge ? (React.createElement(StyledIcon$2, { "$hasChildren": !!has_children },
|
|
2099
2108
|
React.createElement(Icon, { color: format ? button_type_mapping[format].content_color : '#fff', path: icon, size: small ? '20px' : '24px' }))) : null,
|
|
2100
2109
|
badge && !icon ? (React.createElement(Badge, { "$format": format, "$small": small }, badge)) : null));
|
|
2101
2110
|
};
|
|
2102
|
-
var templateObject_1$
|
|
2111
|
+
var templateObject_1$m, templateObject_2$k, templateObject_3$h, templateObject_4$9;
|
|
2103
2112
|
|
|
2104
|
-
var StyledComponent = styled.p(templateObject_1$
|
|
2113
|
+
var StyledComponent = styled.p(templateObject_1$l || (templateObject_1$l = __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) {
|
|
2105
2114
|
return ['underline', 'line-through'].includes(props.$type) ? props.$type : 'none';
|
|
2106
2115
|
}, function (props) { return props.$margin || '0px'; }, function (props) { return props.$padding || '0px'; }, function (props) { return props.$align || 'left'; });
|
|
2107
2116
|
var Copy = function (_a) {
|
|
@@ -2111,11 +2120,11 @@ var Copy = function (_a) {
|
|
|
2111
2120
|
Copy.defaultProps = {
|
|
2112
2121
|
type: 'default',
|
|
2113
2122
|
};
|
|
2114
|
-
var templateObject_1$
|
|
2123
|
+
var templateObject_1$l;
|
|
2115
2124
|
|
|
2116
|
-
var H1 = styled.h1(templateObject_1$
|
|
2117
|
-
var H2 = styled.h2(templateObject_2$
|
|
2118
|
-
var H3 = styled.h3(templateObject_3$
|
|
2125
|
+
var H1 = styled.h1(templateObject_1$k || (templateObject_1$k = __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'; });
|
|
2126
|
+
var H2 = styled.h2(templateObject_2$j || (templateObject_2$j = __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'; });
|
|
2127
|
+
var H3 = styled.h3(templateObject_3$g || (templateObject_3$g = __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'; });
|
|
2119
2128
|
var Heading = function (_a) {
|
|
2120
2129
|
var bold = _a.bold, children = _a.children, margin = _a.margin, padding = _a.padding, type = _a.type, accessibleProps = __rest(_a, ["bold", "children", "margin", "padding", "type"]);
|
|
2121
2130
|
switch (type) {
|
|
@@ -2134,11 +2143,11 @@ Heading.defaultProps = {
|
|
|
2134
2143
|
bold: false,
|
|
2135
2144
|
type: 'primary',
|
|
2136
2145
|
};
|
|
2137
|
-
var templateObject_1$
|
|
2146
|
+
var templateObject_1$k, templateObject_2$j, templateObject_3$g;
|
|
2138
2147
|
|
|
2139
|
-
var Wrapper$
|
|
2140
|
-
var Container$3 = styled.dialog(templateObject_2$
|
|
2141
|
-
var Buttons = styled.div(templateObject_3$
|
|
2148
|
+
var Wrapper$e = styled.div(templateObject_1$j || (templateObject_1$j = __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"])));
|
|
2149
|
+
var Container$3 = styled.dialog(templateObject_2$i || (templateObject_2$i = __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"])));
|
|
2150
|
+
var Buttons = styled.div(templateObject_3$f || (templateObject_3$f = __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"])));
|
|
2142
2151
|
var ActionDialog = function (_a) {
|
|
2143
2152
|
var description = _a.description, title = _a.title, onClose = _a.onClose, primaryButton = _a.primaryButton, secondaryButton = _a.secondaryButton, accessibleProps = __rest(_a, ["description", "title", "onClose", "primaryButton", "secondaryButton"]);
|
|
2144
2153
|
React.useEffect(function () {
|
|
@@ -2151,7 +2160,7 @@ var ActionDialog = function (_a) {
|
|
|
2151
2160
|
document.onkeydown = null;
|
|
2152
2161
|
};
|
|
2153
2162
|
}, []);
|
|
2154
|
-
return (React.createElement(Wrapper$
|
|
2163
|
+
return (React.createElement(Wrapper$e, __assign({}, accessibleProps),
|
|
2155
2164
|
React.createElement(Container$3, { open: true },
|
|
2156
2165
|
title ? (React.createElement(Heading, { margin: '0px 0px 20px 0px', type: 'secondary' }, title)) : null,
|
|
2157
2166
|
description ? React.createElement(Copy, { align: 'center' }, description) : null,
|
|
@@ -2159,11 +2168,11 @@ var ActionDialog = function (_a) {
|
|
|
2159
2168
|
secondaryButton ? (React.createElement(Button, __assign({}, secondaryButton, { format: 'secondary', margin: '0px 5px' }))) : null,
|
|
2160
2169
|
primaryButton ? React.createElement(Button, __assign({}, primaryButton, { format: 'primary', margin: '0px 5px' })) : null)) : null)));
|
|
2161
2170
|
};
|
|
2162
|
-
var templateObject_1$
|
|
2171
|
+
var templateObject_1$j, templateObject_2$i, templateObject_3$f;
|
|
2163
2172
|
|
|
2164
|
-
var Wrapper$
|
|
2165
|
-
var Content$1 = styled.div(templateObject_2$
|
|
2166
|
-
var Action$1 = styled.div(templateObject_3$
|
|
2173
|
+
var Wrapper$d = styled.div(templateObject_1$i || (templateObject_1$i = __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"])));
|
|
2174
|
+
var Content$1 = styled.div(templateObject_2$h || (templateObject_2$h = __makeTemplateObject(["\n margin-left: 20px;\n"], ["\n margin-left: 20px;\n"])));
|
|
2175
|
+
var Action$1 = styled.div(templateObject_3$e || (templateObject_3$e = __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);
|
|
2167
2176
|
var Alert = function (_a) {
|
|
2168
2177
|
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"]);
|
|
2169
2178
|
var type_mapping = {
|
|
@@ -2184,7 +2193,7 @@ var Alert = function (_a) {
|
|
|
2184
2193
|
icon: js.mdiCheckboxMarkedCircleOutline,
|
|
2185
2194
|
},
|
|
2186
2195
|
};
|
|
2187
|
-
return (React.createElement(Wrapper$
|
|
2196
|
+
return (React.createElement(Wrapper$d, __assign({}, accessibleProps, { style: { borderLeftColor: type_mapping[type].color } }),
|
|
2188
2197
|
React.createElement("div", { style: { flexShrink: 0 } },
|
|
2189
2198
|
React.createElement(Icon, { color: type_mapping[type].color, path: type_mapping[type].icon, size: '30px' })),
|
|
2190
2199
|
React.createElement(Content$1, null,
|
|
@@ -2192,19 +2201,19 @@ var Alert = function (_a) {
|
|
|
2192
2201
|
description ? React.createElement(Copy, { margin: '6px 0 0 0 !important' }, description) : null,
|
|
2193
2202
|
action ? React.createElement(Action$1, { onClick: action.onClick }, action.label) : null)));
|
|
2194
2203
|
};
|
|
2195
|
-
var templateObject_1$
|
|
2196
|
-
|
|
2197
|
-
var Wrapper$
|
|
2198
|
-
var Left = styled.div(templateObject_2$
|
|
2199
|
-
var Info = styled.div(templateObject_3$
|
|
2200
|
-
var Selected = styled.span(templateObject_4$
|
|
2201
|
-
var Clear = styled.span(templateObject_5$
|
|
2202
|
-
var Actions = styled.div(templateObject_6$
|
|
2204
|
+
var templateObject_1$i, templateObject_2$h, templateObject_3$e;
|
|
2205
|
+
|
|
2206
|
+
var Wrapper$c = styled.div(templateObject_1$h || (templateObject_1$h = __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);
|
|
2207
|
+
var Left = styled.div(templateObject_2$g || (templateObject_2$g = __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"])));
|
|
2208
|
+
var Info = styled.div(templateObject_3$d || (templateObject_3$d = __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"])));
|
|
2209
|
+
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);
|
|
2210
|
+
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);
|
|
2211
|
+
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"])));
|
|
2203
2212
|
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);
|
|
2204
|
-
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);
|
|
2213
|
+
var ErrorMsg = styled.span(templateObject_8$1 || (templateObject_8$1 = __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);
|
|
2205
2214
|
var BulkActionBar = function (_a) {
|
|
2206
2215
|
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"]);
|
|
2207
|
-
return (React.createElement(Wrapper$
|
|
2216
|
+
return (React.createElement(Wrapper$c, __assign({}, accessibleProps),
|
|
2208
2217
|
React.createElement(Left, null,
|
|
2209
2218
|
React.createElement(Info, null,
|
|
2210
2219
|
React.createElement(Selected, null,
|
|
@@ -2216,21 +2225,21 @@ var BulkActionBar = function (_a) {
|
|
|
2216
2225
|
React.createElement(Icon, { color: Colors.RED.Hex, path: js.mdiInformationOutline, size: '20px' }),
|
|
2217
2226
|
React.createElement(ErrorMsg, null, errorMsg))) : null));
|
|
2218
2227
|
};
|
|
2219
|
-
var templateObject_1$
|
|
2228
|
+
var templateObject_1$h, templateObject_2$g, templateObject_3$d, templateObject_4$8, templateObject_5$6, templateObject_6$4, templateObject_7$2, templateObject_8$1;
|
|
2220
2229
|
|
|
2221
|
-
var Wrapper$
|
|
2222
|
-
var Input$2 = styled.input(templateObject_2$
|
|
2223
|
-
var Label$3 = styled.span(templateObject_3$
|
|
2230
|
+
var Wrapper$b = styled.label(templateObject_1$g || (templateObject_1$g = __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);
|
|
2231
|
+
var Input$2 = styled.input(templateObject_2$f || (templateObject_2$f = __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"])));
|
|
2232
|
+
var Label$3 = styled.span(templateObject_3$c || (templateObject_3$c = __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);
|
|
2224
2233
|
var Checkbox = function (_a) {
|
|
2225
2234
|
var children = _a.children, disabled = _a.disabled, checked = _a.checked, onChange = _a.onChange, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange"]);
|
|
2226
|
-
return (React.createElement(Wrapper$
|
|
2235
|
+
return (React.createElement(Wrapper$b, __assign({}, accessibleProps),
|
|
2227
2236
|
React.createElement(Input$2, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'checkbox' }),
|
|
2228
2237
|
children ? React.createElement(Label$3, null, children) : null));
|
|
2229
2238
|
};
|
|
2230
|
-
var templateObject_1$
|
|
2239
|
+
var templateObject_1$g, templateObject_2$f, templateObject_3$c;
|
|
2231
2240
|
|
|
2232
|
-
var SelectAll = styled.div(templateObject_1$
|
|
2233
|
-
var Options$1 = styled.div(templateObject_2$
|
|
2241
|
+
var SelectAll = styled.div(templateObject_1$f || (templateObject_1$f = __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);
|
|
2242
|
+
var Options$1 = styled.div(templateObject_2$e || (templateObject_2$e = __makeTemplateObject(["\n padding: 12px;\n box-sizing: border-box;\n"], ["\n padding: 12px;\n box-sizing: border-box;\n"])));
|
|
2234
2243
|
var Checklist = function (_a) {
|
|
2235
2244
|
var disabled = _a.disabled, onChange = _a.onChange, options = _a.options, selected = _a.selected, showSelectAll = _a.showSelectAll, accessibleProps = __rest(_a, ["disabled", "onChange", "options", "selected", "showSelectAll"]);
|
|
2236
2245
|
var values = options.map(function (option) { return option.value; });
|
|
@@ -2258,20 +2267,20 @@ var Checklist = function (_a) {
|
|
|
2258
2267
|
return (React.createElement(Checkbox, __assign({ key: i }, accessibleProps, { checked: checked, disabled: disabled, onChange: handleChange.bind(null, option) }), label));
|
|
2259
2268
|
}))));
|
|
2260
2269
|
};
|
|
2261
|
-
var templateObject_1$
|
|
2270
|
+
var templateObject_1$f, templateObject_2$e;
|
|
2262
2271
|
|
|
2263
|
-
var Scrim$1 = styled.div(templateObject_1$
|
|
2272
|
+
var Scrim$1 = styled.div(templateObject_1$e || (templateObject_1$e = __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) {
|
|
2264
2273
|
var $scrim = _a.$scrim;
|
|
2265
2274
|
return ($scrim === 'dark' ? 'rgba(0,0,0,0.8)' : 'transparent');
|
|
2266
2275
|
});
|
|
2267
|
-
var Container$2 = styled.div(templateObject_2$
|
|
2276
|
+
var Container$2 = styled.div(templateObject_2$d || (templateObject_2$d = __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) {
|
|
2268
2277
|
var $width = _a.$width;
|
|
2269
2278
|
return $width || '400px';
|
|
2270
2279
|
});
|
|
2271
|
-
var Header$2 = styled.div(templateObject_3$
|
|
2272
|
-
var Close$1 = styled.div(templateObject_4$
|
|
2273
|
-
var ContentWrapper$1 = styled.div(templateObject_5$
|
|
2274
|
-
var ButtonBar$1 = styled.div(templateObject_6$
|
|
2280
|
+
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"])));
|
|
2281
|
+
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"])));
|
|
2282
|
+
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"])));
|
|
2283
|
+
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"])));
|
|
2275
2284
|
var Drawer = function (_a) {
|
|
2276
2285
|
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"]);
|
|
2277
2286
|
React.useEffect(function () {
|
|
@@ -2299,18 +2308,18 @@ var Drawer = function (_a) {
|
|
|
2299
2308
|
primaryButton ? React.createElement(Button, __assign({}, primaryButton, { format: 'primary' })) : null)) : null),
|
|
2300
2309
|
scrim ? React.createElement(Scrim$1, { "$scrim": scrim, onClick: onClose }) : null));
|
|
2301
2310
|
};
|
|
2302
|
-
var templateObject_1$
|
|
2303
|
-
|
|
2304
|
-
var Wrapper$
|
|
2305
|
-
var LabelRow = styled.div(
|
|
2306
|
-
var Label$2 = styled.label(
|
|
2307
|
-
var Required = styled.span(
|
|
2308
|
-
var Action = styled.span(
|
|
2309
|
-
var Description = styled.div(
|
|
2310
|
-
var Validation = styled.div(
|
|
2311
|
+
var templateObject_1$e, templateObject_2$d, templateObject_3$b, templateObject_4$7, templateObject_5$5, templateObject_6$3;
|
|
2312
|
+
|
|
2313
|
+
var Wrapper$a = styled.div(function (props) { return (__assign({ margin: '0px 0px 15px 0px' }, props.style)); });
|
|
2314
|
+
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"])));
|
|
2315
|
+
var Label$2 = styled.label(templateObject_2$c || (templateObject_2$c = __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);
|
|
2316
|
+
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);
|
|
2317
|
+
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);
|
|
2318
|
+
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);
|
|
2319
|
+
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);
|
|
2311
2320
|
var Field = function (_a) {
|
|
2312
|
-
var action = _a.action, children = _a.children, validationText = _a.validationText, label = _a.label,
|
|
2313
|
-
return (React.createElement(Wrapper$
|
|
2321
|
+
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, accessibleProps = __rest(_a, ["action", "children", "validationText", "label", "description", "required", "htmlFor", "style"]);
|
|
2322
|
+
return (React.createElement(Wrapper$a, __assign({ style: style }, accessibleProps),
|
|
2314
2323
|
React.createElement(LabelRow, null,
|
|
2315
2324
|
React.createElement(Label$2, { htmlFor: htmlFor },
|
|
2316
2325
|
label,
|
|
@@ -2320,7 +2329,106 @@ var Field = function (_a) {
|
|
|
2320
2329
|
children,
|
|
2321
2330
|
validationText ? React.createElement(Validation, null, validationText) : null));
|
|
2322
2331
|
};
|
|
2323
|
-
var templateObject_1$
|
|
2332
|
+
var templateObject_1$d, templateObject_2$c, templateObject_3$a, templateObject_4$6, templateObject_5$4, templateObject_6$2;
|
|
2333
|
+
|
|
2334
|
+
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) {
|
|
2335
|
+
var $isDragOver = _a.$isDragOver;
|
|
2336
|
+
return ($isDragOver ? "".concat(Colors.PRIMARY.Hex) : '#ccc');
|
|
2337
|
+
}, function (_a) {
|
|
2338
|
+
var $isDragOver = _a.$isDragOver;
|
|
2339
|
+
return $isDragOver ? "rgba(".concat(Colors.PRIMARY.Rgb, ", 0.05)") : '#ffffff';
|
|
2340
|
+
});
|
|
2341
|
+
var StyledIcon$1 = styled.div(templateObject_2$b || (templateObject_2$b = __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) {
|
|
2342
|
+
var $isDragOver = _a.$isDragOver;
|
|
2343
|
+
return ($isDragOver ? '#fff' : '#f5f5f5');
|
|
2344
|
+
});
|
|
2345
|
+
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"])));
|
|
2346
|
+
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"])));
|
|
2347
|
+
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) {
|
|
2348
|
+
var $fileState = _a.$fileState;
|
|
2349
|
+
return ($fileState ? '20px 0px' : '');
|
|
2350
|
+
}, function (_a) {
|
|
2351
|
+
var $fileState = _a.$fileState;
|
|
2352
|
+
return ($fileState ? '' : '16px');
|
|
2353
|
+
});
|
|
2354
|
+
var IconWrapper$2 = styled.div(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n cursor: pointer;\n"], ["\n cursor: pointer;\n"])));
|
|
2355
|
+
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"])));
|
|
2356
|
+
var Progress = styled.div(templateObject_8 || (templateObject_8 = __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) {
|
|
2357
|
+
var $width = _a.$width;
|
|
2358
|
+
return "".concat($width, "%");
|
|
2359
|
+
}, Colors.GREEN.Hex);
|
|
2360
|
+
var FileUpload = function (_a) {
|
|
2361
|
+
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"]);
|
|
2362
|
+
var MAX_FILE_SIZE = maxFileSize * 1024 * 1024;
|
|
2363
|
+
var _e = React.useState([]), files = _e[0], setFiles = _e[1];
|
|
2364
|
+
var _f = React.useState(false), dragOver = _f[0], setDragOver = _f[1];
|
|
2365
|
+
var inputField = React.useRef(null);
|
|
2366
|
+
React.useEffect(function () {
|
|
2367
|
+
if (UploadProgress) {
|
|
2368
|
+
var updatedFiles = files.map(function (file, index) {
|
|
2369
|
+
if (index === UploadProgress.index) {
|
|
2370
|
+
return __assign(__assign({}, file), { uploadUpdate: UploadProgress.progress });
|
|
2371
|
+
}
|
|
2372
|
+
else {
|
|
2373
|
+
return file;
|
|
2374
|
+
}
|
|
2375
|
+
});
|
|
2376
|
+
setFiles(updatedFiles);
|
|
2377
|
+
}
|
|
2378
|
+
}, [UploadProgress]);
|
|
2379
|
+
React.useEffect(function () {
|
|
2380
|
+
onChange(files);
|
|
2381
|
+
}, [files]);
|
|
2382
|
+
var assignFiles = function (newFiles) {
|
|
2383
|
+
var _loop_1 = function (i) {
|
|
2384
|
+
if (newFiles[i].size < MAX_FILE_SIZE) {
|
|
2385
|
+
setFiles(function (files) { return __spreadArray(__spreadArray([], files, true), [{ file: newFiles[i], uploadProgress: 0 }], false); });
|
|
2386
|
+
}
|
|
2387
|
+
};
|
|
2388
|
+
for (var i = 0; i < newFiles.length; i++) {
|
|
2389
|
+
_loop_1(i);
|
|
2390
|
+
}
|
|
2391
|
+
};
|
|
2392
|
+
var onFileSelect = function (e) {
|
|
2393
|
+
assignFiles(Array.from(e.target.files || []));
|
|
2394
|
+
};
|
|
2395
|
+
var handleDrop = function (e) {
|
|
2396
|
+
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
2397
|
+
assignFiles(Array.from(e.dataTransfer.files || []));
|
|
2398
|
+
};
|
|
2399
|
+
var handleDragOver = function (e) {
|
|
2400
|
+
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
2401
|
+
setDragOver(true);
|
|
2402
|
+
};
|
|
2403
|
+
var handleDragLeave = function (e) {
|
|
2404
|
+
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
2405
|
+
setDragOver(false);
|
|
2406
|
+
};
|
|
2407
|
+
var removeItem = function (index) {
|
|
2408
|
+
var newArray = __spreadArray([], files, true);
|
|
2409
|
+
newArray.splice(index, 1);
|
|
2410
|
+
setFiles(newArray);
|
|
2411
|
+
onFileDelete(files[index]);
|
|
2412
|
+
};
|
|
2413
|
+
return (React.createElement(React.Fragment, null,
|
|
2414
|
+
React.createElement(Wrapper$9, __assign({ "$isDragOver": dragOver, onDragLeave: handleDragLeave, onDragOver: handleDragOver, onDrop: handleDrop }, accessibleProps),
|
|
2415
|
+
files.length > 0 && (React.createElement(Files, null, Array.from(files).map(function (singleFile, index) {
|
|
2416
|
+
var _a;
|
|
2417
|
+
return (React.createElement(File, { key: index },
|
|
2418
|
+
React.createElement(Copy, { children: (_a = singleFile.file) === null || _a === void 0 ? void 0 : _a.name, type: 'bold' }),
|
|
2419
|
+
singleFile.uploadUpdate === 100 || !progress ? (React.createElement(IconWrapper$2, { onClick: function () { return removeItem(index); } },
|
|
2420
|
+
React.createElement(Icon, { color: 'red', path: js.mdiMinusCircle, size: 1 }))) : (React.createElement(ProgressBar, null,
|
|
2421
|
+
React.createElement(Progress, { "$width": (singleFile === null || singleFile === void 0 ? void 0 : singleFile.uploadUpdate) || 0, role: 'progressbar' })))));
|
|
2422
|
+
}))),
|
|
2423
|
+
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(); } },
|
|
2424
|
+
!(files.length > 0) && (React.createElement(StyledIcon$1, { "$isDragOver": dragOver },
|
|
2425
|
+
React.createElement(Icon, { color: dragOver ? "".concat(Colors.PRIMARY.Hex) : "".concat(Colors.GRAY.Hex), path: js.mdiFolderPlusOutline, size: 1.667 }))),
|
|
2426
|
+
React.createElement("input", { accept: acceptFiles, hidden: true, multiple: multiple, onChange: onFileSelect, ref: inputField, type: 'file' }),
|
|
2427
|
+
React.createElement(CopyWrapper, { "$fileState": files.length > 0 },
|
|
2428
|
+
React.createElement(Copy, { align: 'center', children: 'Drag & drop files here or click to choose', type: 'bold' }),
|
|
2429
|
+
React.createElement(Copy, { align: 'center', children: "".concat(maxFileSize, " MB max file size"), color: 'GRAY' }))))));
|
|
2430
|
+
};
|
|
2431
|
+
var templateObject_1$c, templateObject_2$b, templateObject_3$9, templateObject_4$5, templateObject_5$3, templateObject_6$1, templateObject_7$1, templateObject_8;
|
|
2324
2432
|
|
|
2325
2433
|
var formatAsPhone = function (number) {
|
|
2326
2434
|
var formatted_value = "".concat(number).replace(/[^0-9.]/g, '');
|
|
@@ -2399,6 +2507,48 @@ var Input$1 = function (_a) {
|
|
|
2399
2507
|
};
|
|
2400
2508
|
var templateObject_1$b, templateObject_2$a, templateObject_3$8, templateObject_4$4;
|
|
2401
2509
|
|
|
2510
|
+
var colorMapping = {
|
|
2511
|
+
black: {
|
|
2512
|
+
fill_1: '#000000',
|
|
2513
|
+
fill_2: '#000000',
|
|
2514
|
+
fill_3: '#000000',
|
|
2515
|
+
},
|
|
2516
|
+
white: {
|
|
2517
|
+
fill_1: '#ffffff',
|
|
2518
|
+
fill_2: '#ffffff',
|
|
2519
|
+
fill_3: '#ffffff',
|
|
2520
|
+
},
|
|
2521
|
+
full: {
|
|
2522
|
+
fill_1: '#000000',
|
|
2523
|
+
fill_2: '#E82425',
|
|
2524
|
+
fill_3: '#E82425',
|
|
2525
|
+
},
|
|
2526
|
+
reversed: {
|
|
2527
|
+
fill_1: '#ffffff',
|
|
2528
|
+
fill_2: '#E82425',
|
|
2529
|
+
fill_3: '#E82425',
|
|
2530
|
+
},
|
|
2531
|
+
};
|
|
2532
|
+
var Logo = function (_a) {
|
|
2533
|
+
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"]);
|
|
2534
|
+
var type_parts = type.split('_');
|
|
2535
|
+
switch (type_parts[0]) {
|
|
2536
|
+
case 'mark':
|
|
2537
|
+
return (React.createElement("svg", __assign({ fill: 'none', height: height, viewBox: '0 0 58 51', width: '100%', xmlns: 'http://www.w3.org/2000/svg' }, accessibleProps),
|
|
2538
|
+
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] })));
|
|
2539
|
+
default:
|
|
2540
|
+
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),
|
|
2541
|
+
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 }),
|
|
2542
|
+
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 }),
|
|
2543
|
+
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 }),
|
|
2544
|
+
React.createElement("path", { d: 'M131.392 50C135.884 50 139.753 48.4076 142.893 45.2676C146.033 42.1269 147.626 38.2581 147.626 33.7668V18.1124L144.782 16.4964L141.827 18.0251V33.7668C141.827 36.6932 140.792 39.1936 138.745 41.2034C136.684 43.1927 134.128 44.2013 131.151 44.2013L131.01 44.2002H131.81L131.669 44.2013C128.692 44.2013 126.136 43.1927 124.074 41.2034C122.028 39.1936 120.993 36.6932 120.993 33.7668V18.0251L118.038 16.4964L115.194 18.1124V33.7668C115.194 38.2581 116.786 42.1269 119.926 45.2676C123.067 48.4076 126.936 50 131.427 50H131.392Z', fill: colorMapping[type_parts[1]].fill_1 }),
|
|
2545
|
+
React.createElement("path", { d: 'M93.8353 26.9933L97.8468 31.2421L100.788 28.1521L107.791 20.4534L106.753 17.3567L103.584 16.5678', fill: colorMapping[type_parts[1]].fill_2 }),
|
|
2546
|
+
React.createElement("path", { d: 'M80.7509 16.5677L77.5821 17.3564L76.5441 20.4534L83.5514 28.1568L88.1484 32.9862L76.5412 45.2133L77.5187 48.3175C79.525 48.9571 80.359 49.1805 80.6985 49.2584L92.195 37.238L103.636 49.2584C103.976 49.1805 104.81 48.9571 106.817 48.3175L107.794 45.2133L80.7509 16.5677', fill: colorMapping[type_parts[1]].fill_1 }),
|
|
2547
|
+
React.createElement("path", { d: 'M67.8498 45.479C67.5109 44.893 66.7322 43.5486 66.2043 42.6319H55.1965C52.3299 42.6319 49.8532 41.6095 47.8364 39.5923C45.819 37.5755 44.7966 35.0985 44.7966 32.2321C44.7966 29.3656 45.819 26.8886 47.8364 24.8718C49.8388 22.8332 52.316 21.7975 55.1965 21.7975C58.0632 21.7975 60.5398 22.8199 62.5565 24.8374C63.6038 25.8847 64.3824 27.093 64.9357 28.5312L65.2435 29.3327H53.8141C53.231 30.2171 52.5673 31.6476 52.303 32.2354L53.912 35.0969H67.474L71.0059 28.6192C70.2872 25.5702 68.8261 22.9293 66.6625 20.7657C63.5219 17.6257 59.6649 16.0333 55.1965 16.0333C50.7283 16.0333 46.8708 17.6257 43.7303 20.7657C40.546 23.9501 38.9979 27.7011 38.9979 32.2321C38.9979 36.7001 40.5903 40.5577 43.7303 43.6981C46.8708 46.8384 50.7283 48.4308 55.1965 48.4308H66.0873C66.9322 47.0737 67.5668 45.977 67.8498 45.479', fill: colorMapping[type_parts[1]].fill_1 }),
|
|
2548
|
+
React.createElement("path", { d: 'M27.6655 20.7443C26.9235 20.002 26.2307 19.4097 25.608 18.9831C22.7338 17.0113 19.5684 16.0117 16.1992 16.0117C13.6229 16.0117 11.1676 16.5943 8.9002 17.7442C8.1016 18.1264 7.38657 18.6118 6.73074 19.0799L5.88805 19.6819C5.85364 19.711 5.81716 19.7449 5.78223 19.7749L5.77618 17.9067C5.78246 17.9022 5.7892 17.8965 5.79554 17.8921L5.72168 1.52402L2.84058 1.54784e-05L0 1.6145V24.9966V30.8918C0.0184614 30.8508 0.0393993 30.8108 0.0580857 30.7698C0.0216133 31.2417 0 31.7206 0 32.2105V47.6757L2.84688 49.2499C4.7412 48.3293 5.4988 47.9164 5.79866 47.7385V32.2105C5.79866 29.3439 6.82128 26.8672 8.83853 24.8504C10.8415 22.8118 13.319 21.7759 16.1992 21.7759C19.0796 21.7759 21.557 22.8118 23.5635 24.8538C25.3441 26.6351 26.3374 28.7976 26.5963 31.4625C26.6263 31.6669 26.6339 40.3058 26.6339 47.6694C27.2825 48.0147 28.6127 48.8167 29.5141 49.3059C29.9448 49.0814 32.0589 47.8425 32.3979 47.6669V32.2105C32.3979 27.6795 30.8499 23.9285 27.6655 20.7443Z', fill: colorMapping[type_parts[1]].fill_1 })));
|
|
2549
|
+
}
|
|
2550
|
+
};
|
|
2551
|
+
|
|
2402
2552
|
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"])));
|
|
2403
2553
|
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'; });
|
|
2404
2554
|
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"])));
|
|
@@ -2650,8 +2800,10 @@ exports.Checklist = Checklist;
|
|
|
2650
2800
|
exports.Copy = Copy;
|
|
2651
2801
|
exports.Drawer = Drawer;
|
|
2652
2802
|
exports.Field = Field;
|
|
2803
|
+
exports.FileUpload = FileUpload;
|
|
2653
2804
|
exports.Heading = Heading;
|
|
2654
2805
|
exports.Input = Input$1;
|
|
2806
|
+
exports.Logo = Logo;
|
|
2655
2807
|
exports.Modal = Modal;
|
|
2656
2808
|
exports.MoreMenu = MoreMenu;
|
|
2657
2809
|
exports.MultiSelect = MultiSelect;
|