fuse-importer 0.0.8-testing → 0.0.9-testing

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.
Files changed (158) hide show
  1. package/lib/esm/Importer/ImporterWithContext.js +63 -0
  2. package/lib/esm/Importer/Matcher/EnumFieldsMatchers/EnumFieldMatcher/index.js +68 -0
  3. package/lib/esm/Importer/Matcher/EnumFieldsMatchers/EnumFieldMatcher/tableColumns.js +58 -0
  4. package/lib/esm/Importer/Matcher/EnumFieldsMatchers/EnumFieldMatcherContext.js +21 -0
  5. package/lib/esm/Importer/Matcher/EnumFieldsMatchers/index.js +23 -0
  6. package/lib/esm/Importer/Matcher/HeaderMatcher/index.js +61 -0
  7. package/lib/esm/Importer/Matcher/HeaderMatcher/tableColumns.js +55 -0
  8. package/lib/esm/Importer/Matcher/common/icons/index.js +14 -0
  9. package/lib/esm/Importer/Matcher/common/index.js +39 -0
  10. package/lib/esm/Importer/Matcher/common/types.js +9 -0
  11. package/lib/esm/Importer/Matcher/index.js +22 -0
  12. package/lib/esm/Importer/PreviewFirstTime.js +81 -0
  13. package/lib/esm/Importer/PreviewModeBanner.js +19 -0
  14. package/lib/esm/Importer/Review/AppResponseModal.js +35 -0
  15. package/lib/esm/Importer/Review/ReviewContextProvider.js +315 -0
  16. package/lib/esm/Importer/Review/ReviewWithContext.js +33 -0
  17. package/lib/esm/Importer/Review/index.js +4 -0
  18. package/lib/esm/Importer/Stepper/ConfirmCloseModal.js +24 -0
  19. package/lib/esm/Importer/Stepper/Step.js +19 -0
  20. package/lib/esm/Importer/Stepper/StepIndex.js +27 -0
  21. package/lib/esm/Importer/Stepper/StepperSubmitModal.js +24 -0
  22. package/lib/esm/Importer/Stepper/UnmatchedHeadersModal.js +31 -0
  23. package/lib/esm/Importer/Stepper/common/getEnumFieldValueMatchingsInitialValue.js +33 -0
  24. package/lib/esm/Importer/Stepper/common/icons.js +18 -0
  25. package/lib/esm/Importer/Stepper/index.js +118 -0
  26. package/lib/esm/Importer/TrialModeBanner.js +22 -0
  27. package/lib/esm/Importer/Uploader/DragAndDropImporter/DragAndDropImporter.styles.js +11 -0
  28. package/lib/esm/Importer/Uploader/DragAndDropImporter/ImporterDropzone.js +123 -0
  29. package/lib/esm/Importer/Uploader/DragAndDropImporter/ImporterSectionHeader/ImporterSectionHeader.styles.js +11 -0
  30. package/lib/esm/Importer/Uploader/DragAndDropImporter/ImporterSectionHeader/index.js +44 -0
  31. package/lib/esm/Importer/Uploader/DragAndDropImporter/backgrounds.js +14 -0
  32. package/lib/esm/Importer/Uploader/DragAndDropImporter/index.js +45 -0
  33. package/lib/esm/Importer/Uploader/HeaderButtons.js +28 -0
  34. package/lib/esm/Importer/Uploader/HeadersPreview.js +44 -0
  35. package/lib/esm/Importer/Uploader/UploaderContextProvider.js +27 -0
  36. package/lib/esm/Importer/Uploader/index.js +13 -0
  37. package/lib/esm/Importer/common/AppLoading.js +24 -0
  38. package/lib/esm/Importer/common/Footer.js +17 -0
  39. package/lib/esm/Importer/common/FuseApi.js +48 -0
  40. package/lib/esm/Importer/common/GlobalStyle.js +7 -0
  41. package/lib/esm/Importer/common/ImporterFonts.js +5 -0
  42. package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/filterMethods.js +56 -0
  43. package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/index.js +176 -0
  44. package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/useSpreadsheetFilter.js +45 -0
  45. package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/utils.js +14 -0
  46. package/lib/esm/Importer/common/Spreadsheet/common/index.js +63 -0
  47. package/lib/esm/Importer/common/Spreadsheet/common/types.js +5 -0
  48. package/lib/esm/Importer/common/Spreadsheet/components/FieldHeader.js +66 -0
  49. package/lib/esm/Importer/common/Spreadsheet/components/GlobalStyle.js +9 -0
  50. package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetData.js +110 -0
  51. package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetRowCheckboxes.js +186 -0
  52. package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetRowNumbers.js +55 -0
  53. package/lib/esm/Importer/common/Spreadsheet/components/ValidationProgress.js +19 -0
  54. package/lib/esm/Importer/common/Spreadsheet/components/fields/SpeadsheetAutocomplete.js +43 -0
  55. package/lib/esm/Importer/common/Spreadsheet/components/fields/SpreadsheetInput.js +70 -0
  56. package/lib/esm/Importer/common/Spreadsheet/components/fields/index.js +108 -0
  57. package/lib/esm/Importer/common/Spreadsheet/components/inputs/Boolean.js +18 -0
  58. package/lib/esm/Importer/common/Spreadsheet/components/inputs/EmailInput.js +14 -0
  59. package/lib/esm/Importer/common/Spreadsheet/components/inputs/EnumInput.js +30 -0
  60. package/lib/esm/Importer/common/Spreadsheet/components/inputs/FloatInput.js +16 -0
  61. package/lib/esm/Importer/common/Spreadsheet/components/inputs/IntegerInput.js +16 -0
  62. package/lib/esm/Importer/common/Spreadsheet/components/inputs/StringInput.js +14 -0
  63. package/lib/esm/Importer/common/Spreadsheet/components/inputs/index.d.ts +1 -0
  64. package/lib/esm/Importer/common/Spreadsheet/components/inputs/index.js +20 -0
  65. package/lib/esm/Importer/common/Spreadsheet/hooks.js +245 -0
  66. package/lib/esm/Importer/common/Spreadsheet/index.js +119 -0
  67. package/lib/esm/Importer/common/Spreadsheet/styles.js +16 -0
  68. package/lib/esm/Importer/common/Spreadsheet/transformation/index.js +47 -0
  69. package/lib/esm/Importer/common/Spreadsheet/transformation/transformators.js +204 -0
  70. package/lib/esm/Importer/common/Spreadsheet/validation/index.js +202 -0
  71. package/lib/esm/Importer/common/Spreadsheet/validation/validators.js +181 -0
  72. package/lib/esm/Importer/common/icons/index.js +18 -0
  73. package/lib/esm/Importer/common/index.js +13 -0
  74. package/lib/esm/Importer/common/theme.js +19 -0
  75. package/lib/esm/Importer/common/utils.js +100 -0
  76. package/lib/esm/Importer/contexts/ImporterContextProvider.js +247 -0
  77. package/lib/esm/Importer/data/index.js +152 -0
  78. package/lib/esm/Importer/index.js +28 -0
  79. package/lib/esm/api/index.js +93 -0
  80. package/lib/esm/api/responseHandlers.js +49 -0
  81. package/lib/esm/common/AppLoadingContextProvider/AppLoadingUI.js +26 -0
  82. package/lib/esm/common/AppLoadingContextProvider/index.js +25 -0
  83. package/lib/esm/common/ConfirmationModal.js +19 -0
  84. package/lib/esm/common/Modal.js +31 -0
  85. package/lib/esm/common/Spinner.js +41 -0
  86. package/lib/esm/common/Table/Pagination/icons.js +42 -0
  87. package/lib/esm/common/Table/Pagination/index.js +32 -0
  88. package/lib/esm/common/Table/TableActions/DeleteSelectedRows.js +50 -0
  89. package/lib/esm/common/Table/TableActions/ExportData.js +23 -0
  90. package/lib/esm/common/Table/TableActions/FilterByErrors/FilterByErrors.js +47 -0
  91. package/lib/esm/common/Table/TableActions/FilterByErrors/FilterByErrors.styles.js +24 -0
  92. package/lib/esm/common/Table/TableActions/FilterByErrors/functions.js +35 -0
  93. package/lib/esm/common/Table/TableActions/FilterByErrors/index.js +1 -0
  94. package/lib/esm/common/Table/TableActions/RowFilters.js +42 -0
  95. package/lib/esm/common/Table/TableActions/SearchRows.js +72 -0
  96. package/lib/esm/common/Table/TableActions/TableActions.js +35 -0
  97. package/lib/esm/common/Table/TableActions/TableActions.styles.js +18 -0
  98. package/lib/esm/common/Table/TableActions/TransformedRecordsCount.js +71 -0
  99. package/lib/esm/common/Table/TableActions/common.js +1 -0
  100. package/lib/esm/common/Table/TableActions/hooks.js +41 -0
  101. package/lib/esm/common/Table/TableActions/icons.js +17 -0
  102. package/lib/esm/common/Table/TableActions/index.js +1 -0
  103. package/lib/esm/common/Table/TableDataProvider.js +127 -0
  104. package/lib/esm/common/Table/TableView/TableHeaders.js +69 -0
  105. package/lib/esm/common/Table/TableView/TableRows/TableRow.js +57 -0
  106. package/lib/esm/common/Table/TableView/TableRows/index.js +48 -0
  107. package/lib/esm/common/Table/TableView/common/index.js +37 -0
  108. package/lib/esm/common/Table/TableView/index.js +132 -0
  109. package/lib/esm/common/Table/TableView/types.js +1 -0
  110. package/lib/esm/common/Table/icons.js +15 -0
  111. package/lib/esm/common/Table/index.js +140 -0
  112. package/lib/esm/common/Table/useReorderRows.js +83 -0
  113. package/lib/esm/common/Toast.js +69 -0
  114. package/lib/esm/common/TooltipProvider.js +57 -0
  115. package/lib/esm/common/buttons.js +97 -0
  116. package/lib/esm/common/columnsTransformations.js +94 -0
  117. package/lib/esm/common/columnsValidations.d.ts +1 -1
  118. package/lib/esm/common/columnsValidations.js +687 -0
  119. package/lib/esm/common/icons/index.js +30 -0
  120. package/lib/esm/common/index.js +45 -0
  121. package/lib/esm/common/inputs/Autocomplete.js +110 -0
  122. package/lib/esm/common/inputs/Checkbox.js +53 -0
  123. package/lib/esm/common/inputs/SelectMenu.js +67 -0
  124. package/lib/esm/common/inputs/TextInput.js +89 -0
  125. package/lib/esm/common/inputs/index.js +5 -0
  126. package/lib/esm/common/inputs/tooltip.js +38 -0
  127. package/lib/esm/common/logo.js +13 -0
  128. package/lib/esm/hooks/index.d.ts +1 -0
  129. package/lib/esm/hooks/index.js +16 -0
  130. package/lib/esm/index.js +218 -0
  131. package/lib/esm/locales/de.js +126 -0
  132. package/lib/esm/locales/en.js +126 -0
  133. package/lib/esm/locales/es.js +126 -0
  134. package/lib/esm/locales/fr.js +126 -0
  135. package/lib/esm/locales/index.js +4 -0
  136. package/lib/esm/styled/fontsURL.js +27 -0
  137. package/lib/esm/styled/index.js +3 -0
  138. package/lib/esm/styled/theme/animations.js +9 -0
  139. package/lib/esm/styled/theme/colorPalette.js +109 -0
  140. package/lib/esm/styled/theme/debugCss.js +16 -0
  141. package/lib/esm/styled/theme/dimensionsCss.js +20 -0
  142. package/lib/esm/styled/theme/fontCss.js +17 -0
  143. package/lib/esm/styled/theme/globalCss.js +26 -0
  144. package/lib/esm/styled/theme/index.js +33 -0
  145. package/lib/esm/styled/theme/layoutCss.js +26 -0
  146. package/lib/esm/styled/theme/mediaQueries.js +4 -0
  147. package/lib/esm/styled/theme/positionCss.js +27 -0
  148. package/lib/esm/styled/theme/textCss.js +18 -0
  149. package/lib/esm/styled/theme/textStyles.js +27 -0
  150. package/lib/esm/styled/themeType.js +6 -0
  151. package/lib/esm/styled/utils.js +17 -0
  152. package/lib/esm/types.d.ts +2 -2
  153. package/lib/esm/types.js +65 -0
  154. package/lib/esm/utils/hooks/useWindowSize.js +23 -0
  155. package/lib/esm/utils/hooks.js +1 -0
  156. package/lib/esm/utils/index.js +37 -0
  157. package/lib/main.js +1 -1
  158. package/package.json +1 -1
@@ -0,0 +1,30 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { useTheme } from "styled-components";
14
+ export var closeIcon = (_jsxs("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M6 6.00003L18.7742 18.7742", stroke: "black", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M6 18.7742L18.7742 6.00001", stroke: "black", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })] })));
15
+ export var closeIconCondensed = (_jsxs("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M6 6.00003L18.7742 18.7742", stroke: "#333333", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M6 18.7742L18.7742 6.00001", stroke: "#333333", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })] })));
16
+ export var checkIcon = (_jsx("svg", __assign({ width: "12", height: "10", viewBox: "0 0 12 10", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M1.37805 5.80142L3.94469 8.28708L10.6827 1.52003", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })));
17
+ export var greenCheckIcon = (_jsx("svg", __assign({ width: "22", height: "22", viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11 22C17.0751 22 22 17.0751 22 11C22 4.92487 17.0751 0 11 0C4.92487 0 0 4.92487 0 11C0 17.0751 4.92487 22 11 22ZM8.70711 10.2426C8.31658 9.85208 7.68342 9.85208 7.29289 10.2426C6.90237 10.6331 6.90237 11.2663 7.29289 11.6568L9.41421 13.7781L10.1213 14.4852L10.8284 13.7781L15.0711 9.53549C15.4616 9.14497 15.4616 8.5118 15.0711 8.12128C14.6805 7.73076 14.0474 7.73076 13.6569 8.12128L10.1213 11.6568L8.70711 10.2426Z", fill: "#00D085" }) })));
18
+ export var redXIcon = (_jsxs("svg", __assign({ width: "19", height: "18", viewBox: "0 0 19 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("circle", { cx: "9.49967", cy: "8.99992", r: "7.79167", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { d: "M7.375 6.875L11.625 11.125", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M7.375 11.125L11.625 6.875", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] })));
19
+ export var defaultCheckIcon = (_jsxs("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("circle", { cx: "12", cy: "12", r: "11", stroke: "currentColor", strokeWidth: "2" }), _jsx("path", { d: "M9 11.9497L11.1213 14.071L15.364 9.82839", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })] })));
20
+ export var WhiteCheckIcon = function () {
21
+ var theme = useTheme();
22
+ return (_jsx("svg", __assign({ width: "22", height: "22", viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11 22C17.0751 22 22 17.0751 22 11C22 4.92487 17.0751 0 11 0C4.92487 0 0 4.92487 0 11C0 17.0751 4.92487 22 11 22ZM8.70711 10.2426C8.31658 9.85208 7.68342 9.85208 7.29289 10.2426C6.90237 10.6331 6.90237 11.2663 7.29289 11.6568L9.41421 13.7781L10.1213 14.4852L10.8284 13.7781L15.0711 9.53549C15.4616 9.14497 15.4616 8.5118 15.0711 8.12128C14.6805 7.73076 14.0474 7.73076 13.6569 8.12128L10.1213 11.6568L8.70711 10.2426Z", fill: theme.colors.blue500 }) })));
23
+ };
24
+ export var chevronLeftIcon = (_jsx("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "8", height: "14", viewBox: "0 0 8 14", fill: "none" }, { children: _jsx("path", { d: "M6.22266 1.75L1.00028 6.97238L6.22266 12.1948", stroke: "#000000", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })));
25
+ export var ChevronRightIcon = function () {
26
+ var theme = useTheme();
27
+ return (_jsx("svg", __assign({ width: "9", height: "16", viewBox: "0 0 9 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M1 1L7.96317 7.96317L1 14.9263", stroke: theme.colors.black || "#3333", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })));
28
+ };
29
+ export var weatherStarsIcon = (_jsxs("svg", __assign({ width: "22", height: "22", viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M13.0159 4.5609C13.1442 4.0594 13.8565 4.0594 13.9847 4.5609L14.3163 5.85753C14.8596 7.98189 16.5184 9.64072 18.6428 10.184L19.9394 10.5155C20.4409 10.6438 20.4409 11.3561 19.9394 11.4844L18.6428 11.816C16.5184 12.3592 14.8596 14.018 14.3163 16.1424L13.9847 17.439C13.8565 17.9405 13.1442 17.9405 13.0159 17.439L12.6843 16.1424C12.1411 14.018 10.4823 12.3592 8.3579 11.816L7.06127 11.4844C6.55977 11.3561 6.55977 10.6438 7.06127 10.5155L8.3579 10.184C10.4823 9.64072 12.1411 7.98189 12.6843 5.85754L13.0159 4.5609Z", stroke: "white", strokeWidth: "2" }), _jsx("path", { d: "M3.5 1.83337V5.16671", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M5.16634 3.5H1.83301", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M4.33301 16.8334V20.1667", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M6.00033 18.5H2.66699", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })] })));
30
+ export var chevronDownIcon = (_jsx("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M18.9258 10L11.9626 16.9632L4.99944 10", stroke: "black", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })));
@@ -0,0 +1,45 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
+ import styled, { css } from "styled-components";
18
+ import { Div, themeProps, Label } from "../styled/utils";
19
+ import { colors } from "../styled/theme/colorPalette";
20
+ export var fuseImporterId = "fuse-importer-root";
21
+ export var MenuItem = styled(Div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-radius: 8px;\n padding: 12px 16px;\n display: flex;\n align-items: center;\n background: ", ";\n color: ", ";\n ", "\n ", ";\n ", "\n :hover {\n background: ", ";\n cursor: pointer;\n }\n"], ["\n border-radius: 8px;\n padding: 12px 16px;\n display: flex;\n align-items: center;\n background: ", ";\n color: ", ";\n ", "\n ", ";\n ", "\n :hover {\n background: ", ";\n cursor: pointer;\n }\n"])), function (props) { return props.theme.colors.white; }, function (props) { return props.color || props.theme.colors.text; }, function (props) { return props.theme.css.body1; }, function (p) { return p.theme.css.selectNone; }, function (p) {
22
+ return p.isSelected && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), function (p) { return p.theme.colors.blue500; });
23
+ }, function (props) { return props.theme.colors.blue100; });
24
+ export var FormInputLabel = styled(Label)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", ";\n color: ", ";\n ", "\n display: block;\n"], ["\n ", ";\n color: ", ";\n ", "\n display: block;\n"])), function (props) { return props.theme.css.body4; }, function (props) { return props.theme.colors.text; }, function (props) {
25
+ return props.isDisabled && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), function (props) { return props.theme.colors.gray500; });
26
+ });
27
+ export var InfoDivider = function (_a) {
28
+ var msg = _a.msg;
29
+ return (_jsxs(Div, __assign({ dflex: true, alignCenter: true, mt: 7, mb: 7 }, { children: [_jsx(Div, { w100: true, h: 1, bg: colors.gray300 }), _jsx(Div, __assign({ w100: true, textAlignCenter: true, c: colors.gray700, body1: true, centered: true, p: 20 }, { children: msg })), _jsx(Div, { w100: true, h: 1, bg: colors.gray300 })] })));
30
+ };
31
+ export var Avatar = styled.img(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", ";\n border-radius: 100%;\n height: 36px;\n width: 36px;\n"], ["\n ", ";\n border-radius: 100%;\n height: 36px;\n width: 36px;\n"])), themeProps);
32
+ export var Divider = styled(Div)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: 100%;\n height: 1px;\n background: ", ";\n"], ["\n width: 100%;\n height: 1px;\n background: ", ";\n"])), colors.black);
33
+ export * from "./icons";
34
+ export * from "./inputs";
35
+ export * from "./Table";
36
+ export * from "./buttons";
37
+ export * from "./Toast";
38
+ export * from "./logo";
39
+ export * from "./Modal";
40
+ export * from "./Spinner";
41
+ export * from "./TooltipProvider";
42
+ export * from "./ConfirmationModal";
43
+ export * from "./columnsValidations";
44
+ export * from "./columnsTransformations";
45
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
@@ -0,0 +1,110 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ var __rest = (this && this.__rest) || function (s, e) {
17
+ var t = {};
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
+ t[p] = s[p];
20
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
+ t[p[i]] = s[p[i]];
24
+ }
25
+ return t;
26
+ };
27
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
+ import { useEffect, useMemo, useState } from "react";
29
+ import styled, { css } from "styled-components";
30
+ import { MenuItem } from "..";
31
+ import { Div } from "../../styled/utils";
32
+ import { SelectMenu } from "./SelectMenu";
33
+ import { TextInput as TextInputBase } from "./TextInput";
34
+ import { useTranslation } from "react-i18next";
35
+ var TextInput = styled(TextInputBase)(function (_a) {
36
+ var _b = _a.theme, colors = _b.colors, c = _b.css;
37
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), function (props) {
38
+ return props.isDisabled && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n cursor: not-allowed;\n pointer-events: none;\n "], ["\n cursor: not-allowed;\n pointer-events: none;\n "])));
39
+ });
40
+ });
41
+ var ClearIcon = styled(Div)(function (_a) {
42
+ var _b = _a.theme, colors = _b.colors, c = _b.css;
43
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n pointer-events: auto;\n "], ["\n pointer-events: auto;\n "])));
44
+ });
45
+ var ClickableArea = styled(Div)(function (_a) {
46
+ var _b = _a.theme, colors = _b.colors, c = _b.css, isInputDisabled = _a.isInputDisabled;
47
+ return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), isInputDisabled && css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n :hover {\n cursor: pointer;\n opacity: 0.9;\n }\n "], ["\n :hover {\n cursor: pointer;\n opacity: 0.9;\n }\n "]))));
48
+ });
49
+ var Autocomplete = function (_a) {
50
+ var _b = _a.label, label = _b === void 0 ? null : _b, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isInputDisabled, isInputDisabled = _d === void 0 ? false : _d, _e = _a.placeholder, placeholder = _e === void 0 ? "general:autocomplete.placeholder" : _e, value = _a.value, icon = _a.icon, onChange = _a.onChange, placement = _a.placement, options = _a.options, onToggle = _a.onToggle, id = _a.id, labelTooltip = _a.labelTooltip, prefix = _a.prefix, props = __rest(_a, ["label", "isDisabled", "isInputDisabled", "placeholder", "value", "icon", "onChange", "placement", "options", "onToggle", "id", "labelTooltip", "prefix"]);
51
+ var _f = useState(false), updatedText = _f[0], setUpdatedText = _f[1];
52
+ var selectedLabel = useMemo(function () { var _a; return ((_a = options === null || options === void 0 ? void 0 : options.find(function (o) { return (o === null || o === void 0 ? void 0 : o.value) === value; })) === null || _a === void 0 ? void 0 : _a.label) || ""; }, [value]);
53
+ var _g = useState(selectedLabel), text = _g[0], setText = _g[1];
54
+ var _h = useState(false), isMenuOpen = _h[0], setIsMenuOpen = _h[1];
55
+ var _j = useState(null), referenceElement = _j[0], setReferenceElement = _j[1];
56
+ var _k = useState(false), isTyping = _k[0], setIsTyping = _k[1];
57
+ var t = useTranslation().t;
58
+ useEffect(function () {
59
+ if (value)
60
+ setText(selectedLabel);
61
+ else
62
+ setText("");
63
+ }, [value]);
64
+ useEffect(function () {
65
+ setUpdatedText(true);
66
+ }, [text]);
67
+ useEffect(function () {
68
+ setUpdatedText(false);
69
+ setText(selectedLabel);
70
+ if (onToggle)
71
+ onToggle(isMenuOpen);
72
+ }, [isMenuOpen]);
73
+ var onSelect = function (v) {
74
+ var _a;
75
+ setText((_a = options.find(function (o) { return (o === null || o === void 0 ? void 0 : o.value) === v; })) === null || _a === void 0 ? void 0 : _a.label);
76
+ onChange(v);
77
+ setIsMenuOpen(false);
78
+ };
79
+ var filteredOptions = useMemo(function () {
80
+ return updatedText
81
+ ? options.filter(function (o) {
82
+ return o.label.toLowerCase().includes(text.toLowerCase());
83
+ })
84
+ : options;
85
+ }, [updatedText, text, options]);
86
+ var inputIconUI = text ? (_jsx(ClearIcon, __assign({ clickable: true, dim: 24, centered: true, id: id ? "".concat(id, "-clear") : null, onClick: function (evt) {
87
+ evt.preventDefault();
88
+ evt.stopPropagation();
89
+ onChange(undefined);
90
+ } }, { children: clearIcon }))) : (_jsx(Div, __assign({ centered: true, dim: 24 }, { children: icon || chevronDownIcon })));
91
+ var textWithPrefix = "".concat(prefix).concat(text);
92
+ var shouldShowPrefix = prefix && !isTyping && !isMenuOpen;
93
+ var inputValue = shouldShowPrefix ? textWithPrefix : text;
94
+ return (_jsxs(Div, __assign({ w100: true }, props, { children: [_jsx(ClickableArea, __assign({ isInputDisabled: isDisabled || isInputDisabled, onClick: function () { return setIsMenuOpen(true); } }, { children: _jsx(TextInput, { setInputRef: setReferenceElement, id: id, onBlur: function () {
95
+ if (isTyping && prefix)
96
+ setIsTyping(false);
97
+ if (filteredOptions.length === 0) {
98
+ setText(selectedLabel);
99
+ setIsMenuOpen(false);
100
+ }
101
+ }, label: label, isDisabled: isDisabled || isInputDisabled, placeholder: t(placeholder), value: inputValue, onChange: function (v) {
102
+ if (!isTyping && prefix)
103
+ setIsTyping(true);
104
+ setText(v);
105
+ }, icon: isDisabled ? null : inputIconUI, labelTooltip: labelTooltip }) })), !isDisabled && filteredOptions.length > 0 && (_jsx(SelectMenu, __assign({ referenceElement: referenceElement, placement: placement, isOpen: isMenuOpen, onClose: function () { return setIsMenuOpen(false); } }, { children: filteredOptions.map(function (o, index) { return (_jsx(Div, __assign({ "data-test-id": "autocomplete-menu-item" }, { children: _jsx(MenuItem, __assign({ id: id ? "".concat(id, "-option-").concat(o.label) : null, isSelected: value === (o === null || o === void 0 ? void 0 : o.value), onClick: function () { return onSelect(o === null || o === void 0 ? void 0 : o.value); } }, { children: o.label })) }), index)); }) })))] })));
106
+ };
107
+ var chevronDownIcon = (_jsx("svg", __assign({ width: "16", height: "9", viewBox: "0 0 16 9", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M14.9263 1L7.9631 7.96317L0.999928 1", stroke: "black", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })));
108
+ var clearIcon = (_jsxs("svg", __assign({ width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M4 4L12.5161 12.5161", stroke: "#333333", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M4 12.5161L12.5161 3.99998", stroke: "#333333", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })] })));
109
+ export { Autocomplete };
110
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -0,0 +1,53 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ var __rest = (this && this.__rest) || function (s, e) {
17
+ var t = {};
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
+ t[p] = s[p];
20
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
+ t[p[i]] = s[p[i]];
24
+ }
25
+ return t;
26
+ };
27
+ import { jsx as _jsx } from "react/jsx-runtime";
28
+ import styled, { css } from "styled-components";
29
+ import { Div } from "../../styled/utils";
30
+ var Container = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 20px;\n width: 20px;\n border: 1px solid ", ";\n background-color: ", ";\n border-radius: 4px;\n ", ";\n\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n\n ", "\n"], ["\n height: 20px;\n width: 20px;\n border: 1px solid ", ";\n background-color: ", ";\n border-radius: 4px;\n ", ";\n\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n\n ", "\n"])), function (props) { return props.theme.colors.gray400; }, function (props) { return props.theme.colors.white; }, function (props) {
31
+ return (props.isChecked || props.isIndeterminate) && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: 1px solid white;\n background-color: ", ";\n "], ["\n border: 1px solid white;\n background-color: ", ";\n "])), props.theme.colors.pink500);
32
+ }, function (_a) {
33
+ var isDisabled = _a.isDisabled;
34
+ return isDisabled && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n opacity: 0.6;\n\n :hover {\n cursor: not-allowed;\n }\n "], ["\n opacity: 0.6;\n\n :hover {\n cursor: not-allowed;\n }\n "])));
35
+ });
36
+ var Checkbox = function (_a) {
37
+ var isChecked = _a.isChecked, isIndeterminate = _a.isIndeterminate, _b = _a.icon, icon = _b === void 0 ? null : _b, onChange = _a.onChange, onShiftKeyPressed = _a.onShiftKeyPressed, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, props = __rest(_a, ["isChecked", "isIndeterminate", "icon", "onChange", "onShiftKeyPressed", "isDisabled"]);
38
+ var handleOnChange = function (event) {
39
+ if (!onChange)
40
+ return;
41
+ if ((event.shiftKey || event.nativeEvent.metaKey) && onShiftKeyPressed) {
42
+ onShiftKeyPressed();
43
+ return;
44
+ }
45
+ var newValue = !isChecked || isIndeterminate;
46
+ onChange(newValue);
47
+ };
48
+ return (_jsx(Container, __assign({}, __assign({ isChecked: isChecked, isDisabled: isDisabled, isIndeterminate: isIndeterminate, onClick: handleOnChange }, props), { "data-test-id": "checkbox" }, { children: isIndeterminate ? (_jsx(IndeterminateIcon, {})) : (_jsx(Div, __assign({ centered: true }, { children: isChecked && (icon || checkIcon) }))) })));
49
+ };
50
+ var checkIcon = (_jsx("svg", __assign({ width: "14", height: "10", viewBox: "0 0 14 10", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M1.10254 4.74355L5.2051 8.84612L12.8974 1.15381", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })));
51
+ var IndeterminateIcon = function () { return (_jsx("svg", __assign({ width: "14", height: "2", viewBox: "0 0 14 2", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M1 1H13", stroke: "white", strokeWidth: "2", strokeLinecap: "round" }) }))); };
52
+ export { Checkbox };
53
+ var templateObject_1, templateObject_2, templateObject_3;
@@ -0,0 +1,67 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ var __rest = (this && this.__rest) || function (s, e) {
17
+ var t = {};
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
+ t[p] = s[p];
20
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
+ t[p[i]] = s[p[i]];
24
+ }
25
+ return t;
26
+ };
27
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
28
+ import { useEffect, useLayoutEffect, useState } from "react";
29
+ import { usePopper } from "react-popper";
30
+ import styled, { css } from "styled-components";
31
+ import { Div } from "../../styled/utils";
32
+ export var SelectMenuBackdrop = styled(Div)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: fixed;\n top: 0px;\n left: 0px;\n margin: 0px;\n width: 100vw;\n height: 100vh;\n z-index: 99999999;\n display: flex;\n"], ["\n position: fixed;\n top: 0px;\n left: 0px;\n margin: 0px;\n width: 100vw;\n height: 100vh;\n z-index: 99999999;\n display: flex;\n"])));
33
+ export var SelectMenuDiv = styled(Div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: white;\n border: solid 1px ", ";\n position: absolute;\n border-radius: 16px;\n overflow: hidden;\n z-index: 10000000000;\n box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.12);\n"], ["\n background-color: white;\n border: solid 1px ", ";\n position: absolute;\n border-radius: 16px;\n overflow: hidden;\n z-index: 10000000000;\n box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.12);\n"])), function (p) { return p.theme.colors.gray5; });
34
+ export var SelectMenuScrollArea = styled(Div)(function (_a) {
35
+ var _b = _a.theme, colors = _b.colors, c = _b.css;
36
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding: 16px;\n overflow-y: auto;\n max-height: 250px;\n ", ";\n "], ["\n padding: 16px;\n overflow-y: auto;\n max-height: 250px;\n ", ";\n "])), function (p) { return p.theme.css.scrollbarDark; });
37
+ });
38
+ export var SelectMenu = function (_a) {
39
+ var _b;
40
+ var _c = _a.isOpen, isOpen = _c === void 0 ? false : _c, _d = _a.onClose, onClose = _d === void 0 ? null : _d, _e = _a.placement, placement = _e === void 0 ? "auto" : _e, referenceElement = _a.referenceElement, children = _a.children, props = __rest(_a, ["isOpen", "onClose", "placement", "referenceElement", "children"]);
41
+ var _f = useState(null), popperElement = _f[0], setPopperElement = _f[1];
42
+ var _g = useState(null), width = _g[0], setWidth = _g[1];
43
+ var options = {
44
+ placement: placement,
45
+ strategy: "absolute",
46
+ modifiers: [
47
+ {
48
+ name: "offset",
49
+ options: {
50
+ offset: [2, 3],
51
+ },
52
+ },
53
+ ],
54
+ };
55
+ var _h = usePopper(referenceElement, popperElement, options), styles = _h.styles, attributes = _h.attributes, update = _h.update;
56
+ useEffect(function () {
57
+ if (update)
58
+ update();
59
+ }, [isOpen]);
60
+ var referenceElementWidth = (_b = referenceElement === null || referenceElement === void 0 ? void 0 : referenceElement.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width;
61
+ useLayoutEffect(function () {
62
+ if (referenceElement)
63
+ setWidth(referenceElementWidth);
64
+ }, [referenceElementWidth]);
65
+ return (_jsx(_Fragment, { children: isOpen && (_jsxs(Div, __assign({ pRelative: true }, props, { children: [_jsx(SelectMenuBackdrop, { onClick: onClose }), _jsx(SelectMenuDiv, __assign({ ref: setPopperElement, style: __assign(__assign({}, styles.popper), { width: width }) }, attributes.popper, { children: _jsx(SelectMenuScrollArea, { children: children }) }))] }))) }));
66
+ };
67
+ var templateObject_1, templateObject_2, templateObject_3;
@@ -0,0 +1,89 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ var __rest = (this && this.__rest) || function (s, e) {
17
+ var t = {};
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
+ t[p] = s[p];
20
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
+ t[p[i]] = s[p[i]];
24
+ }
25
+ return t;
26
+ };
27
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
+ import { useState } from "react";
29
+ import styled, { css } from "styled-components";
30
+ import { FormInputLabel } from "..";
31
+ import { useDebounce } from "../../hooks";
32
+ import { Div } from "../../styled/utils";
33
+ import Tooltip from "./tooltip";
34
+ export var HTMLInput = styled.input(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n\n padding: ", ";\n height: 68px;\n margin: 0px;\n box-shadow: none;\n\n outline: none;\n\n border: 1px solid ", ";\n box-sizing: border-box;\n border-radius: 8px;\n width: 100%;\n\n ::-webkit-outer-spin-button,\n ::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n /* Firefox */\n -moz-appearance: textfield;\n\n ", ";\n\n ::placeholder {\n color: ", ";\n }\n\n :focus {\n border: 2px solid ", ";\n\n /* 3d at the end adds .24 opacity (using 8 digit hex)*/\n box-shadow: 0px 0px 8px ", "3d;\n }\n\n :hover {\n box-shadow: none;\n background: transparent;\n }\n\n ", "\n ", "\n"], ["\n position: relative;\n\n padding: ", ";\n height: 68px;\n margin: 0px;\n box-shadow: none;\n\n outline: none;\n\n border: 1px solid ", ";\n box-sizing: border-box;\n border-radius: 8px;\n width: 100%;\n\n ::-webkit-outer-spin-button,\n ::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n /* Firefox */\n -moz-appearance: textfield;\n\n ", ";\n\n ::placeholder {\n color: ", ";\n }\n\n :focus {\n border: 2px solid ", ";\n\n /* 3d at the end adds .24 opacity (using 8 digit hex)*/\n box-shadow: 0px 0px 8px ", "3d;\n }\n\n :hover {\n box-shadow: none;\n background: transparent;\n }\n\n ", "\n ", "\n"])), function (_a) {
35
+ var padding = _a.padding;
36
+ return (padding ? padding : "20px 16px");
37
+ }, function (props) { return props.theme.colors.gray300; }, function (props) { return props.theme.css.body1; }, function (props) { return props.theme.colors.placeholder; }, function (props) { return props.theme.colors.blue500; }, function (props) { return props.theme.colors.blue500; }, function (props) {
38
+ return props.isDisabled && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n cursor: not-allowed;\n opacity: 0.7;\n pointer-events: none;\n "], ["\n cursor: not-allowed;\n opacity: 0.7;\n pointer-events: none;\n "])));
39
+ }, function (props) {
40
+ return props.hasError && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-right: 50px;\n border: solid 2px ", ";\n "], ["\n padding-right: 50px;\n border: solid 2px ", ";\n "])), function (props) { return props.theme.colors.error; });
41
+ });
42
+ export var TextInputIcon = styled(Div)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: absolute;\n right: 11px;\n top: 0;\n height: 100%;\n"], ["\n position: absolute;\n right: 11px;\n top: 0;\n height: 100%;\n"])));
43
+ var TextInput = function (_a) {
44
+ var label = _a.label, _b = _a.icon, icon = _b === void 0 ? null : _b, _c = _a.labelTooltip, labelTooltip = _c === void 0 ? null : _c, _d = _a.placeholder, placeholder = _d === void 0 ? "" : _d, value = _a.value, _e = _a.type, type = _e === void 0 ? "text" : _e, onChange = _a.onChange, _f = _a.onBlur, onBlur = _f === void 0 ? null : _f, _g = _a.isDisabled, isDisabled = _g === void 0 ? false : _g, _h = _a.hasError, hasError = _h === void 0 ? false : _h, _j = _a.onFocus, onFocus = _j === void 0 ? null : _j, _k = _a.withDebounce, withDebounce = _k === void 0 ? true : _k, _l = _a.autoFocus, autoFocus = _l === void 0 ? false : _l, id = _a.id, setInputRef = _a.setInputRef, name = _a.name, inputPadding = _a.inputPadding, props = __rest(_a, ["label", "icon", "labelTooltip", "placeholder", "value", "type", "onChange", "onBlur", "isDisabled", "hasError", "onFocus", "withDebounce", "autoFocus", "id", "setInputRef", "name", "inputPadding"]);
45
+ var _m = useDebounce(value, onChange, withDebounce ? 0 : 300), _value = _m._value, set_Value = _m.set_Value;
46
+ var res = usePasswordVisibleIcon(type);
47
+ var passwordVisibleIcon = res.passwordVisibleIcon, isPasswordVisible = res.isPasswordVisible;
48
+ var _icon = passwordVisibleIcon || icon;
49
+ var showLabel = label || labelTooltip;
50
+ var isPasswordField = name === "password";
51
+ var padding = inputPadding
52
+ ? inputPadding
53
+ : isPasswordField || icon
54
+ ? "20px 35px 20px 16px"
55
+ : null;
56
+ return (_jsxs(Div, __assign({ w100: true }, props, { children: [showLabel ? (_jsx(FormInputLabel, __assign({ isDisabled: isDisabled, mb: 8, htmlFor: id, h: 20 }, { children: _jsxs(Div, __assign({ dflex: true }, { children: [_jsx(Div, __assign({ centered: true }, { children: label })), labelTooltip ? _jsx(Tooltip, { ml: 4, tooltip: labelTooltip }) : null] })) }))) : null, _jsxs(Div, __assign({ pRelative: true }, { children: [_jsx(HTMLInput, __assign({}, {
57
+ placeholder: placeholder,
58
+ isDisabled: isDisabled,
59
+ onFocus: onFocus,
60
+ hasError: hasError,
61
+ autoFocus: autoFocus,
62
+ disabled: isDisabled,
63
+ id: id,
64
+ padding: padding,
65
+ name: name,
66
+ }, { type: isPasswordVisible ? "text" : type, value: _value || "", onChange: function (_a) {
67
+ var value = _a.target.value;
68
+ return set_Value(value);
69
+ }, ref: setInputRef, onBlur: function () {
70
+ if (onBlur)
71
+ onBlur(_value);
72
+ } })), _jsx(TextInputIcon, __assign({ centered: true }, { children: hasError ? errorIcon : _icon }))] }))] })));
73
+ };
74
+ var PIcon = styled(Div)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), function (props) {
75
+ var c = props.theme.css;
76
+ return [c.alignCenter, c.clickable];
77
+ });
78
+ var usePasswordVisibleIcon = function (type) {
79
+ var _a = useState(false), isPasswordVisible = _a[0], setIsPasswordVisible = _a[1];
80
+ if (type !== "password")
81
+ return { passwordVisibleIcon: null, isPasswordVisible: null };
82
+ var passwordVisibleIcon = isPasswordVisible ? (_jsx(PIcon, __assign({ title: "Hide", mt: -2, onClick: function () { return setIsPasswordVisible(false); } }, { children: hideIcon }))) : (_jsx(PIcon, __assign({ title: "Show", onClick: function () { return setIsPasswordVisible(true); } }, { children: viewIcon })));
83
+ return { isPasswordVisible: isPasswordVisible, passwordVisibleIcon: passwordVisibleIcon };
84
+ };
85
+ var errorIcon = (_jsx("svg", __assign({ width: "22", height: "22", viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11 22C17.0751 22 22 17.0751 22 11C22 4.92487 17.0751 0 11 0C4.92487 0 0 4.92487 0 11C0 17.0751 4.92487 22 11 22ZM11 5C11.5523 5 12 5.44772 12 6V11C12 11.5523 11.5523 12 11 12C10.4477 12 10 11.5523 10 11V6C10 5.44772 10.4477 5 11 5ZM11 14C11.5523 14 12 14.4477 12 15V15.5C12 16.0523 11.5523 16.5 11 16.5C10.4477 16.5 10 16.0523 10 15.5V15C10 14.4477 10.4477 14 11 14Z", fill: "#CF4520" }) })));
86
+ var hideIcon = (_jsxs("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M5.67969 3L21.6797 19", stroke: "#333333", strokeWidth: "2", strokeLinecap: "round" }), _jsx("path", { d: "M22.2679 13.2302C22.4458 12.5885 22.3647 11.8927 22.0246 11.3003C20.3114 8.31648 17.8496 6.09905 15 5.11633M19.6278 16.9999C17.4379 19.2279 14.6784 20.5564 11.6798 20.5564C7.44377 20.5564 3.68497 17.9054 1.33497 13.8124C0.888345 13.0345 0.888342 12.0783 1.33497 11.3004C2.93979 8.50518 5.20165 6.38253 7.82381 5.31743", stroke: "#333333", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M14.5892 11.8251C14.748 12.457 14.6968 13.1233 14.4434 13.7235C14.1899 14.3236 13.748 14.825 13.1844 15.1517C12.6208 15.4785 11.9662 15.6129 11.3194 15.5347C10.6726 15.4564 10.0689 15.1698 9.59949 14.7181C9.13007 14.2663 8.82045 13.6741 8.71743 13.0308C8.61441 12.3875 8.7236 11.7282 9.02848 11.1524C9.33337 10.5767 9.81738 10.1159 10.4074 9.83956C10.9973 9.56327 11.6612 9.48653 12.2987 9.62095", stroke: "#333333", strokeWidth: "2" })] })));
87
+ var viewIcon = (_jsxs("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M1.33497 13.2561C0.888345 12.4782 0.888342 11.522 1.33497 10.7441C3.68496 6.65097 7.44378 4 11.6798 4C15.9158 4 19.6746 6.65094 22.0246 10.744C22.4712 11.5219 22.4712 12.4781 22.0246 13.256C19.6746 17.3491 15.9158 20 11.6798 20C7.44377 20 3.68497 17.3491 1.33497 13.2561Z", stroke: "#333333", strokeWidth: "2" }), _jsx("circle", { cx: "11.6797", cy: "12", r: "3", stroke: "#333333", strokeWidth: "2" })] })));
88
+ export { TextInput };
89
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -0,0 +1,5 @@
1
+ export * from "./Autocomplete";
2
+ export * from "./SelectMenu";
3
+ export * from "./TextInput";
4
+ export * from "./tooltip";
5
+ export * from "./Checkbox";
@@ -0,0 +1,38 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ var __rest = (this && this.__rest) || function (s, e) {
17
+ var t = {};
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
+ t[p] = s[p];
20
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
+ t[p[i]] = s[p[i]];
24
+ }
25
+ return t;
26
+ };
27
+ import { jsx as _jsx } from "react/jsx-runtime";
28
+ import { Div } from "../../styled/index";
29
+ import { TooltipProvider } from "../index";
30
+ import styled from "styled-components";
31
+ export var TooltipButton = styled(Div)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: 4px;\n :hover {\n cursor: pointer;\n }\n"], ["\n border-radius: 4px;\n :hover {\n cursor: pointer;\n }\n"])));
32
+ export var Tooltip = function (_a) {
33
+ var tooltip = _a.tooltip, placement = _a.placement, centered = _a.centered, _b = _a.tooltipMaxWidth, tooltipMaxWidth = _b === void 0 ? 300 : _b, tooltipMinWidth = _a.tooltipMinWidth, divProps = __rest(_a, ["tooltip", "placement", "centered", "tooltipMaxWidth", "tooltipMinWidth"]);
34
+ return (_jsx(Div, __assign({ alignCenter: true }, divProps, { children: _jsx(TooltipProvider, __assign({ tooltip: tooltip, placement: placement, centered: centered, tooltipMaxWidth: tooltipMaxWidth, tooltipMinWidth: tooltipMinWidth }, { children: _jsx(TooltipButton, __assign({ clickable: true, centered: true }, { children: tooltipIcon })) })) })));
35
+ };
36
+ export default Tooltip;
37
+ var tooltipIcon = (_jsx("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM12.4818 6C11.6149 5.99984 10.8274 6.31882 10.3038 6.59014C10.0325 6.7307 9.80855 6.8709 9.65073 6.97706C9.57143 7.03041 9.50776 7.07589 9.46203 7.10952C9.43914 7.12635 9.42066 7.14028 9.40688 7.1508L9.38974 7.164L9.38386 7.16859L9.38161 7.17037L9.38065 7.17112L9.38021 7.17146C9.38001 7.17163 9.37981 7.17178 10 7.95623L9.37981 7.17178C8.94657 7.51431 8.87303 8.14319 9.21555 8.57643C9.55736 9.00876 10.1843 9.0829 10.6175 8.74283L10.6209 8.74018C10.6255 8.7367 10.6342 8.73007 10.6469 8.72076C10.6723 8.70208 10.7131 8.67283 10.7671 8.63652C10.8758 8.56335 11.0338 8.46444 11.2239 8.36591C11.6231 8.15906 12.0765 7.99992 12.4814 8C13.3769 8.00017 13.8894 8.48905 13.974 9.05964C14.0504 9.57477 13.9484 9.91665 13.8027 10.1614C13.6461 10.4244 13.3957 10.6453 13.0845 10.8261C12.1445 11.372 10.9853 12.4174 10.9853 13.9151V14.1739C10.9853 14.7262 11.433 15.1739 11.9853 15.1739C12.5376 15.1739 12.9853 14.7262 12.9853 14.1739V13.9151C12.9853 13.5131 13.3403 12.9903 14.0889 12.5556C14.5928 12.2629 15.139 11.8265 15.5212 11.1846C15.9141 10.5246 16.0929 9.71422 15.9524 8.76635C15.69 6.99666 14.1299 6.00031 12.4818 6ZM12.9853 17.5217C12.9853 16.9695 12.5376 16.5217 11.9853 16.5217C11.433 16.5217 10.9853 16.9695 10.9853 17.5217V18C10.9853 18.5523 11.433 19 11.9853 19C12.5376 19 12.9853 18.5523 12.9853 18V17.5217Z", fill: "black" }) })));
38
+ var templateObject_1;
@@ -0,0 +1,13 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ export var logo = (_jsxs("svg", __assign({ width: "220", height: "32", viewBox: "0 0 220 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M3.96044 28.355L19.3937 28.355C19.5463 28.355 19.6898 28.2803 19.7803 28.1537L28.2598 16.2897C28.3833 16.117 28.3845 15.882 28.2628 15.708L19.827 3.64491L3.76198 27.9689C3.65363 28.133 3.76776 28.355 3.96044 28.355Z", fill: "#FD395E" }), _jsx("path", { d: "M3.76198 4.03111L11.667 16L19.827 3.64507L3.96044 3.64507C3.76775 3.64507 3.65363 3.86706 3.76198 4.03111Z", fill: "url(#paint0_linear_1502_38864)" }), _jsx("path", { d: "M15.0273 3.64506L11.6673 16L19.8273 3.64506L15.0273 3.64506Z", fill: "#8A0E25" }), _jsx("path", { d: "M39.3532 22.7756H42.8606V17.3201H47.9331V14.7574H42.8606V11.7869H48.1593V9.22419H39.3532V22.7756Z", fill: "black" }), _jsx("path", { d: "M52.1884 22.7756H61.1265V20.0964H55.6957V9.22419H52.1884V22.7756Z", fill: "black" }), _jsx("path", { d: "M63.8544 22.7756H67.4183L68.4554 19.8828H73.3959L74.3765 22.7756H78.2233L73.1508 9.22419H68.8514L63.8544 22.7756ZM72.5662 17.3201H69.2663L70.9634 12.0199H71.0011L72.5662 17.3201Z", fill: "black" }), _jsx("path", { d: "M82.8424 22.7756H86.3498V11.9034H89.5932V9.22419H79.5991V11.9034H82.8424V22.7756Z", fill: "black" }), _jsx("path", { d: "M93.4902 22.7756H96.9976V9.22419H93.4902V22.7756Z", fill: "black" }), _jsx("path", { d: "M101.787 22.7756H105.294V17.4172H106.03C107.331 17.4172 107.783 17.9996 108.5 20.3294L109.254 22.7756H112.912L111.63 19.0868C110.97 17.4366 110.895 16.4076 109.763 16.097V16.0581C111.46 15.6504 112.29 14.4467 112.29 12.6412C112.29 10.3114 110.386 9.22419 108.047 9.22419H101.787V22.7756ZM105.294 11.7869H106.218C107.557 11.7869 108.783 12.0199 108.783 13.2818C108.783 14.8156 107.35 14.8544 106.218 14.8544H105.294V11.7869Z", fill: "black" }), _jsx("path", { d: "M116.231 15.9999C116.231 20.31 118.532 23.0086 122.831 23.0086C127.13 23.0086 129.431 20.31 129.431 15.9999C129.431 11.651 127.168 8.99121 122.831 8.99121C118.494 8.99121 116.231 11.651 116.231 15.9999ZM119.852 15.9999C119.852 13.6507 120.7 11.6704 122.831 11.6704C124.962 11.6704 125.81 13.6507 125.81 15.9999C125.81 18.2326 124.962 20.3294 122.831 20.3294C120.7 20.3294 119.852 18.2326 119.852 15.9999Z", fill: "black" }), _jsx("path", { d: "M133.717 22.7756H136.942L136.829 13.5148H136.866L141.468 22.7756H145.823V9.22419H142.618L142.674 18.4267H142.637L138.186 9.22419H133.717V22.7756Z", fill: "black" }), _jsx("path", { d: "M150.336 22.4262C151.505 22.8144 153.033 23.0086 154.258 23.0086C157.181 23.0086 160.047 22.0573 160.047 18.5432C160.047 13.6507 153.825 15.1262 153.825 12.9324C153.825 11.7481 155.296 11.6704 156.182 11.6704C157.181 11.6704 158.2 11.8646 159.105 12.2917L159.331 9.49599C158.445 9.18536 157.2 8.99121 155.937 8.99121C153.297 8.99121 150.204 9.88428 150.204 13.1459C150.204 18.0773 156.427 16.4853 156.427 19.0092C156.427 20.0964 155.371 20.3294 154.258 20.3294C152.806 20.3294 151.543 19.9411 150.638 19.4363L150.336 22.4262Z", fill: "black" }), _jsx("path", { d: "M164.392 22.7756H167.9V17.3201H172.972V14.7574H167.9V11.7869H173.198V9.22419H164.392V22.7756Z", fill: "#FD395E" }), _jsx("path", { d: "M188.579 9.22419H185.072V17.0289C185.072 18.815 184.6 20.3294 182.809 20.3294C181.018 20.3294 180.546 18.815 180.546 17.0289V9.22419H177.039V17.6307C177.039 21.3389 179.377 23.0086 182.809 23.0086C186.241 23.0086 188.579 21.3389 188.579 17.6307V9.22419Z", fill: "#FD395E" }), _jsx("path", { d: "M192.835 22.4262C194.004 22.8144 195.531 23.0086 196.757 23.0086C199.68 23.0086 202.546 22.0573 202.546 18.5432C202.546 13.6507 196.323 15.1262 196.323 12.9324C196.323 11.7481 197.794 11.6704 198.68 11.6704C199.68 11.6704 200.698 11.8646 201.603 12.2917L201.829 9.49599C200.943 9.18536 199.699 8.99121 198.435 8.99121C195.795 8.99121 192.703 9.88428 192.703 13.1459C192.703 18.0773 198.926 16.4853 198.926 19.0092C198.926 20.0964 197.87 20.3294 196.757 20.3294C195.305 20.3294 194.042 19.9411 193.137 19.4363L192.835 22.4262Z", fill: "#FD395E" }), _jsx("path", { d: "M206.795 22.7756H216.28V20.2129H210.302V17.1454H215.752V14.5826H210.302V11.7869H216.073V9.22419H206.795V22.7756Z", fill: "#FD395E" }), _jsx("defs", { children: _jsxs("linearGradient", __assign({ id: "paint0_linear_1502_38864", x1: "1.81659", y1: "3.64507", x2: "20.2841", y2: "9.7137", gradientUnits: "userSpaceOnUse" }, { children: [_jsx("stop", { offset: "0.03125", stopColor: "#CA405A", stopOpacity: "0.958429" }), _jsx("stop", { offset: "1", stopColor: "#A2243B" })] })) })] })));
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const useDebounce: (value: any, onChange: any, timeoutMs?: number) => {
2
3
  _value: any;
3
4
  set_Value: import("react").Dispatch<any>;
@@ -0,0 +1,16 @@
1
+ import { useEffect, useRef, useState } from "react";
2
+ export var useDebounce = function (value, onChange, timeoutMs) {
3
+ if (timeoutMs === void 0) { timeoutMs = 300; }
4
+ var _a = useState(value), _value = _a[0], set_Value = _a[1];
5
+ var tid = useRef(null);
6
+ useEffect(function () {
7
+ if (_value !== value) {
8
+ clearTimeout(tid.current);
9
+ tid.current = setTimeout(function () { return onChange(_value); }, timeoutMs);
10
+ }
11
+ }, [_value]);
12
+ useEffect(function () {
13
+ set_Value(value);
14
+ }, [value]);
15
+ return { _value: _value, set_Value: set_Value };
16
+ };