@mailstep/design-system 0.5.1-beta.1 → 0.6.0
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/package.json +40 -20
- package/ui/Blocks/CommonGrid/CommonGrid.d.ts +5 -2
- package/ui/Blocks/CommonGrid/CommonGrid.js +12 -22
- package/ui/Blocks/CommonGrid/CommonGridContainer.d.ts +3 -0
- package/ui/Blocks/CommonGrid/CommonGridContainer.js +66 -0
- package/ui/Blocks/CommonGrid/StandardButtons.d.ts +4 -0
- package/ui/Blocks/CommonGrid/StandardButtons.js +36 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.d.ts +12 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.js +50 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownMenu.d.ts +11 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownMenu.js +18 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownSelect.d.ts +12 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownSelect.js +45 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/BooleanSelect/BooleanSelect.d.ts +6 -0
- package/ui/Blocks/CommonGrid/components/BooleanSelect/BooleanSelect.js +37 -0
- package/ui/Blocks/CommonGrid/components/BooleanSelect/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/BooleanSelect/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/ButtonMore/ButtonMore.d.ts +13 -0
- package/ui/Blocks/CommonGrid/components/ButtonMore/ButtonMore.js +32 -0
- package/ui/Blocks/CommonGrid/components/ButtonMore/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/ButtonMore/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/ColumnFilterCell.js +1 -1
- package/ui/Blocks/CommonGrid/components/ColumnTitle/ColumnTitle.d.ts +5 -0
- package/ui/Blocks/CommonGrid/components/ColumnTitle/ColumnTitle.js +58 -0
- package/ui/Blocks/CommonGrid/components/ColumnTitle/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/ColumnTitle/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.d.ts +11 -0
- package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.js +20 -0
- package/ui/Blocks/CommonGrid/components/ControlButtons/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/ControlButtons/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/DataRow.js +4 -4
- package/ui/Blocks/CommonGrid/components/DatePickerRange/DatePickerRange.d.ts +12 -0
- package/ui/Blocks/CommonGrid/components/DatePickerRange/DatePickerRange.js +113 -0
- package/ui/Blocks/CommonGrid/components/DatePickerRange/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/DatePickerRange/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/DatePickerRange/utils/sameDate.d.ts +1 -0
- package/ui/Blocks/CommonGrid/components/DatePickerRange/utils/sameDate.js +3 -0
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.d.ts +8 -0
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.js +43 -0
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/FilterRow.js +2 -3
- package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.d.ts +7 -0
- package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.js +46 -0
- package/ui/Blocks/CommonGrid/components/FloatingButton/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/FloatingButton/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/GridSelect/GridSelect.d.ts +10 -0
- package/ui/Blocks/CommonGrid/components/GridSelect/GridSelect.js +19 -0
- package/ui/Blocks/CommonGrid/components/GridSelect/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/GridSelect/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/HeadCell.js +1 -4
- package/ui/Blocks/CommonGrid/components/IconList/IconList.d.ts +18 -0
- package/ui/Blocks/CommonGrid/components/IconList/IconList.js +29 -0
- package/ui/Blocks/CommonGrid/components/IconList/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/IconList/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.d.ts +11 -0
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.js +20 -0
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.d.ts +12 -0
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.js +47 -0
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/NumberRange/NumberRange.d.ts +3 -0
- package/ui/Blocks/CommonGrid/components/NumberRange/NumberRange.js +76 -0
- package/ui/Blocks/CommonGrid/components/NumberRange/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/NumberRange/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/NumberRange/types.d.ts +17 -0
- package/ui/Blocks/CommonGrid/components/NumberRange/types.js +1 -0
- package/ui/Blocks/CommonGrid/components/OversizedScroll.js +1 -4
- package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/ReadEditButtonCell.d.ts +6 -0
- package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/ReadEditButtonCell.js +26 -0
- package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/Table.d.ts +0 -6
- package/ui/Blocks/CommonGrid/components/Table.js +0 -5
- package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.d.ts +8 -0
- package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.js +32 -0
- package/ui/Blocks/CommonGrid/components/TablePagination/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/TablePagination/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/TextRange/TextRange.d.ts +4 -0
- package/ui/Blocks/CommonGrid/components/TextRange/TextRange.js +89 -0
- package/ui/Blocks/CommonGrid/components/TextRange/index.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/TextRange/index.js +2 -0
- package/ui/Blocks/CommonGrid/components/TextRange/types.d.ts +21 -0
- package/ui/Blocks/CommonGrid/components/TextRange/types.js +1 -0
- package/ui/Blocks/CommonGrid/components/gridCells/BoolIcon.d.ts +5 -0
- package/ui/Blocks/CommonGrid/components/gridCells/BoolIcon.js +22 -0
- package/ui/Blocks/CommonGrid/components/gridCells/ButtonInCell.d.ts +4 -0
- package/ui/Blocks/CommonGrid/components/{icons/ArrowSimple.js → gridCells/ButtonInCell.js} +4 -2
- package/ui/Blocks/CommonGrid/components/gridCells/Date.d.ts +4 -0
- package/ui/Blocks/CommonGrid/components/gridCells/Date.js +8 -0
- package/ui/Blocks/CommonGrid/components/gridCells/DateTime.d.ts +4 -0
- package/ui/Blocks/CommonGrid/components/gridCells/DateTime.js +13 -0
- package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.d.ts +9 -0
- package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.js +33 -0
- package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.d.ts +4 -0
- package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.js +18 -0
- package/ui/Blocks/CommonGrid/components/gridCells/IconButtonInCell.d.ts +9 -0
- package/ui/Blocks/CommonGrid/components/gridCells/IconButtonInCell.js +15 -0
- package/ui/Blocks/CommonGrid/components/gridCells/ImageCell.d.ts +6 -0
- package/ui/Blocks/CommonGrid/components/gridCells/ImageCell.js +23 -0
- package/ui/Blocks/CommonGrid/components/gridCells/LinkInCell.d.ts +1 -0
- package/ui/Blocks/CommonGrid/components/gridCells/LinkInCell.js +8 -0
- package/ui/Blocks/CommonGrid/components/gridCells/RemoveItem.d.ts +5 -0
- package/ui/Blocks/CommonGrid/components/gridCells/RemoveItem.js +24 -0
- package/ui/Blocks/CommonGrid/components/gridCells/RowActionsCell.d.ts +7 -0
- package/ui/Blocks/CommonGrid/components/gridCells/RowActionsCell.js +30 -0
- package/ui/Blocks/CommonGrid/components/gridCells/StringJoin.d.ts +4 -0
- package/ui/Blocks/CommonGrid/components/gridCells/StringJoin.js +7 -0
- package/ui/Blocks/CommonGrid/components/gridCells/SwitchInCell.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/gridCells/SwitchInCell.js +16 -0
- package/ui/Blocks/CommonGrid/components/gridCells/ToggleCell.d.ts +7 -0
- package/ui/Blocks/CommonGrid/components/gridCells/ToggleCell.js +30 -0
- package/ui/Blocks/CommonGrid/components/gridCells/index.d.ts +14 -0
- package/ui/Blocks/CommonGrid/components/gridCells/index.js +14 -0
- package/ui/Blocks/CommonGrid/hooks/useAddFilter.d.ts +4 -0
- package/ui/Blocks/CommonGrid/hooks/useAddFilter.js +14 -0
- package/ui/Blocks/CommonGrid/hooks/useEditReadAsColumn.d.ts +15 -0
- package/ui/Blocks/CommonGrid/hooks/useEditReadAsColumn.js +70 -0
- package/ui/Blocks/CommonGrid/hooks/useFloatingButton.d.ts +3 -0
- package/ui/Blocks/CommonGrid/hooks/useFloatingButton.js +13 -0
- package/ui/Blocks/CommonGrid/hooks/useGetGridHeight.d.ts +7 -0
- package/ui/Blocks/CommonGrid/hooks/useGetGridHeight.js +33 -0
- package/ui/Blocks/CommonGrid/hooks/useGridActionTrigger.d.ts +8 -0
- package/ui/Blocks/CommonGrid/hooks/useGridActionTrigger.js +25 -0
- package/ui/Blocks/CommonGrid/hooks/useManageColumn.d.ts +19 -0
- package/ui/Blocks/CommonGrid/hooks/useManageColumn.js +34 -0
- package/ui/Blocks/CommonGrid/hooks/useToggleAllCheckbox.d.ts +8 -0
- package/ui/Blocks/CommonGrid/hooks/useToggleAllCheckbox.js +15 -0
- package/ui/Blocks/CommonGrid/index.d.ts +8 -6
- package/ui/Blocks/CommonGrid/index.js +8 -8
- package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.js +4 -4
- package/ui/Blocks/CommonGrid/storybook/stories/default.stories.js +3 -2
- package/ui/Blocks/CommonGrid/storybook/stories/loading.stories.js +3 -2
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNoScrollLayout.stories.js +3 -3
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNormalLayout.stories.js +3 -3
- package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.js +2 -2
- package/ui/Blocks/CommonGrid/storybook/stories/withCustomGridActions.stories.js +3 -3
- package/ui/Blocks/CommonGrid/storybook/stories/withForcedCheckboxes.stories.js +2 -1
- package/ui/Blocks/CommonGrid/storybook/utils/linguiContainer.d.ts +1 -0
- package/ui/Blocks/CommonGrid/storybook/utils/linguiContainer.js +8 -0
- package/ui/Blocks/CommonGrid/storybook/utils/utils.js +1 -1
- package/ui/Blocks/CommonGrid/storybook/utils/withTheme.js +1 -17
- package/ui/Blocks/CommonGrid/styles.d.ts +14 -0
- package/ui/Blocks/CommonGrid/styles.js +33 -0
- package/ui/Blocks/CommonGrid/translations.d.ts +1 -0
- package/ui/Blocks/CommonGrid/translations.js +6 -0
- package/ui/Blocks/CommonGrid/types.d.ts +29 -15
- package/ui/Blocks/CommonGrid/utils/index.d.ts +4 -1
- package/ui/Blocks/CommonGrid/utils/index.js +19 -0
- package/ui/Blocks/HidePrint/HidePrint.d.ts +6 -0
- package/ui/Blocks/HidePrint/HidePrint.js +13 -0
- package/ui/Blocks/Popover/index.d.ts +12 -0
- package/ui/Blocks/Popover/index.js +21 -0
- package/ui/Elements/DatePicker/DatePicker.d.ts +20 -0
- package/ui/Elements/DatePicker/DatePicker.js +65 -0
- package/ui/Elements/DatePicker/Datetime/DateTime.d.ts +95 -0
- package/ui/Elements/DatePicker/Datetime/DateTime.js +516 -0
- package/ui/Elements/DatePicker/Datetime/components/Timepicker.d.ts +8 -0
- package/ui/Elements/DatePicker/Datetime/components/Timepicker.js +57 -0
- package/ui/Elements/DatePicker/Datetime/components/ViewNavigation.d.ts +9 -0
- package/ui/Elements/DatePicker/Datetime/components/ViewNavigation.js +16 -0
- package/ui/Elements/DatePicker/Datetime/types.d.ts +61 -0
- package/ui/Elements/DatePicker/Datetime/types.js +7 -0
- package/ui/Elements/DatePicker/Datetime/views/DaysView.d.ts +14 -0
- package/ui/Elements/DatePicker/Datetime/views/DaysView.js +145 -0
- package/ui/Elements/DatePicker/Datetime/views/MonthsView.d.ts +10 -0
- package/ui/Elements/DatePicker/Datetime/views/MonthsView.js +111 -0
- package/ui/Elements/DatePicker/Datetime/views/YearsView.d.ts +15 -0
- package/ui/Elements/DatePicker/Datetime/views/YearsView.js +117 -0
- package/ui/Elements/DatePicker/index.d.ts +2 -0
- package/ui/Elements/DatePicker/index.js +2 -0
- package/ui/Elements/DatePicker/styles.d.ts +2 -0
- package/ui/Elements/DatePicker/styles.js +8 -0
- package/ui/Elements/DropdownMenu/DropdownMenu.d.ts +2 -0
- package/ui/Elements/DropdownMenu/DropdownMenu.js +36 -0
- package/ui/Elements/DropdownMenu/components/DefaultItem.d.ts +3 -0
- package/ui/Elements/DropdownMenu/components/DefaultItem.js +16 -0
- package/ui/Elements/DropdownMenu/components/MenuItem.d.ts +3 -0
- package/ui/Elements/DropdownMenu/components/MenuItem.js +51 -0
- package/ui/Elements/DropdownMenu/components/MenuList.d.ts +3 -0
- package/ui/Elements/DropdownMenu/components/MenuList.js +10 -0
- package/ui/Elements/DropdownMenu/index.d.ts +1 -0
- package/ui/Elements/DropdownMenu/index.js +1 -0
- package/ui/Elements/DropdownMenu/types.d.ts +41 -0
- package/ui/Elements/DropdownMenu/types.js +1 -0
- package/ui/Elements/DropdownSelect/DropdownSelect.d.ts +21 -0
- package/ui/Elements/DropdownSelect/DropdownSelect.js +47 -0
- package/ui/Elements/DropdownSelect/index.d.ts +4 -0
- package/ui/Elements/DropdownSelect/index.js +3 -0
- package/ui/Elements/HighlightBox/HighlightBox.d.ts +50 -0
- package/ui/Elements/HighlightBox/HighlightBox.js +65 -0
- package/ui/Elements/HighlightBox/index.d.ts +2 -0
- package/ui/Elements/HighlightBox/index.js +2 -0
- package/ui/Elements/Icon/icons/Company.d.ts +3 -0
- package/ui/Elements/Icon/icons/Company.js +13 -0
- package/ui/Elements/Icon/icons/Integrations.d.ts +3 -0
- package/ui/Elements/Icon/icons/Integrations.js +13 -0
- package/ui/Elements/Icon/icons/ShoppingBag.d.ts +3 -0
- package/ui/Elements/Icon/icons/ShoppingBag.js +13 -0
- package/ui/Elements/Icon/icons/Truck.d.ts +3 -0
- package/ui/Elements/Icon/icons/Truck.js +13 -0
- package/ui/Elements/Icon/icons/TwoUsers.d.ts +3 -0
- package/ui/Elements/Icon/icons/TwoUsers.js +13 -0
- package/ui/Elements/Icon/icons/index.d.ts +5 -0
- package/ui/Elements/Icon/icons/index.js +5 -0
- package/ui/Elements/MultiSelect/MultiSelect.d.ts +6 -0
- package/ui/Elements/MultiSelect/MultiSelect.js +29 -0
- package/ui/Elements/MultiSelect/index.d.ts +2 -0
- package/ui/Elements/MultiSelect/index.js +2 -0
- package/ui/Elements/Pagination/Pagination.d.ts +4 -3
- package/ui/Elements/Pagination/Pagination.js +11 -3
- package/ui/Elements/Pagination/stories/Pagination.stories.d.ts +1 -1
- package/ui/Elements/Pagination/styled.js +6 -6
- package/ui/Elements/Select/Select.d.ts +3 -0
- package/ui/Elements/Select/Select.js +69 -0
- package/ui/Elements/Select/index.d.ts +2 -0
- package/ui/Elements/Select/index.js +2 -0
- package/ui/Elements/Select/styles.d.ts +5 -0
- package/ui/Elements/Select/styles.js +12 -0
- package/ui/Elements/Select/themes/CustomComponents.d.ts +8 -0
- package/ui/Elements/Select/themes/CustomComponents.js +125 -0
- package/ui/Elements/Select/themes/baseStyles.d.ts +28 -0
- package/ui/Elements/Select/themes/baseStyles.js +87 -0
- package/ui/Elements/Select/themes/formStyles.d.ts +24 -0
- package/ui/Elements/Select/themes/formStyles.js +102 -0
- package/ui/Elements/Select/themes/index.d.ts +3 -0
- package/ui/Elements/Select/themes/index.js +43 -0
- package/ui/Elements/Select/types.d.ts +55 -0
- package/ui/Elements/Select/types.js +1 -0
- package/ui/Elements/SingleSelect/SingleSelect.d.ts +20 -0
- package/ui/Elements/SingleSelect/SingleSelect.js +197 -0
- package/ui/Elements/SingleSelect/index.d.ts +2 -0
- package/ui/Elements/SingleSelect/index.js +2 -0
- package/ui/Elements/Toggle/Toggle.d.ts +1 -1
- package/ui/Elements/Toggle/Toggle.js +2 -2
- package/ui/Elements/Toggle/stories/Toggle.stories.d.ts +1 -1
- package/ui/Elements/Toggle/types.d.ts +1 -0
- package/ui/Forms/Input/types.d.ts +2 -2
- package/ui/Forms/TextArea/TextArea.d.ts +20 -0
- package/ui/Forms/TextArea/TextArea.js +34 -0
- package/ui/Forms/TextArea/index.d.ts +2 -0
- package/ui/Forms/TextArea/index.js +2 -0
- package/ui/Forms/TextArea/styles.d.ts +12 -0
- package/ui/Forms/TextArea/styles.js +31 -0
- package/ui/ThemeProvider/ThemeProvider.d.ts +3 -1
- package/ui/ThemeProvider/ThemeProvider.js +4 -2
- package/ui/ThemeProvider/types.d.ts +1 -0
- package/ui/index.d.ts +17 -1
- package/ui/index.es.js +42462 -8524
- package/ui/index.js +17 -1
- package/ui/index.umd.js +1647 -270
- package/ui/Blocks/CommonGrid/CommonGridContext.d.ts +0 -12
- package/ui/Blocks/CommonGrid/CommonGridContext.js +0 -45
- package/ui/Blocks/CommonGrid/components/ActionColumnHead.d.ts +0 -4
- package/ui/Blocks/CommonGrid/components/ActionColumnHead.js +0 -16
- package/ui/Blocks/CommonGrid/components/ButtonStrip.d.ts +0 -7
- package/ui/Blocks/CommonGrid/components/ButtonStrip.js +0 -35
- package/ui/Blocks/CommonGrid/components/ConfigForm.d.ts +0 -9
- package/ui/Blocks/CommonGrid/components/ConfigForm.js +0 -58
- package/ui/Blocks/CommonGrid/components/DefaultPaginator.d.ts +0 -3
- package/ui/Blocks/CommonGrid/components/DefaultPaginator.js +0 -11
- package/ui/Blocks/CommonGrid/components/Dialog.d.ts +0 -11
- package/ui/Blocks/CommonGrid/components/Dialog.js +0 -19
- package/ui/Blocks/CommonGrid/components/DropdownMenu.d.ts +0 -21
- package/ui/Blocks/CommonGrid/components/DropdownMenu.js +0 -59
- package/ui/Blocks/CommonGrid/components/DropdownSelect.d.ts +0 -15
- package/ui/Blocks/CommonGrid/components/DropdownSelect.js +0 -35
- package/ui/Blocks/CommonGrid/components/FloatingButton.d.ts +0 -6
- package/ui/Blocks/CommonGrid/components/FloatingButton.js +0 -13
- package/ui/Blocks/CommonGrid/components/icons/ArrowSimple.d.ts +0 -2
- package/ui/Blocks/CommonGrid/hooks/useControlButtons.d.ts +0 -10
- package/ui/Blocks/CommonGrid/hooks/useControlButtons.js +0 -64
- package/ui/Blocks/CommonGrid/storybook/stories/customControllButtons.stories.d.ts +0 -13
- package/ui/Blocks/CommonGrid/storybook/stories/customControllButtons.stories.js +0 -49
- package/ui/Blocks/CommonGrid/storybook/utils/filters.d.ts +0 -2
- package/ui/Blocks/CommonGrid/storybook/utils/filters.js +0 -23
- package/ui/Blocks/CommonGrid/utils/public.d.ts +0 -16
- package/ui/Blocks/CommonGrid/utils/public.js +0 -52
|
@@ -0,0 +1,36 @@
|
|
|
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 styled from '@xstyled/styled-components';
|
|
29
|
+
import MenuList from './components/MenuList';
|
|
30
|
+
import DefaultItem from './components/DefaultItem';
|
|
31
|
+
var StyledDropdownWrap = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: fit-content;\n height: fit-content;\n background-color: white;\n padding: 2;\n display: block;\n border: slim;\n border-color: lightGray2;\n border-radius: 10px;\n box-shadow: dropdownMenuShadow;\n color: red2;\n z-index: 1;\n"], ["\n width: fit-content;\n height: fit-content;\n background-color: white;\n padding: 2;\n display: block;\n border: slim;\n border-color: lightGray2;\n border-radius: 10px;\n box-shadow: dropdownMenuShadow;\n color: red2;\n z-index: 1;\n"])));
|
|
32
|
+
export var DropdownMenu = function (_a) {
|
|
33
|
+
var items = _a.items, showMenu = _a.showMenu, className = _a.className, _b = _a.ItemComponent, ItemComponent = _b === void 0 ? DefaultItem : _b, header = _a.header, footer = _a.footer, rest = __rest(_a, ["items", "showMenu", "className", "ItemComponent", "header", "footer"]);
|
|
34
|
+
return (_jsx(_Fragment, { children: showMenu && (_jsxs(StyledDropdownWrap, __assign({ className: className }, rest, { children: [header ? header : null, _jsx(MenuList, { items: items, ItemComponent: ItemComponent }), footer ? footer : null] }))) }));
|
|
35
|
+
};
|
|
36
|
+
var templateObject_1;
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
import styled, { css } from '@xstyled/styled-components';
|
|
7
|
+
var StyledListItem = styled.li(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 10px;\n font-size: 12px;\n color: typoPrimary;\n font-weight: normal;\n\n :hover {\n background-color: bgLightGray1;\n cursor: pointer;\n }\n\n ", ";\n"], ["\n padding: 10px;\n font-size: 12px;\n color: typoPrimary;\n font-weight: normal;\n\n :hover {\n background-color: bgLightGray1;\n cursor: pointer;\n }\n\n ", ";\n"])), function (props) {
|
|
8
|
+
return props.hasSeparator && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-top: slim;\n border-color: lightGray2;\n "], ["\n border-top: slim;\n border-color: lightGray2;\n "])));
|
|
9
|
+
});
|
|
10
|
+
var IconWrap = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin-right: 10px;\n"], ["\n margin-right: 10px;\n"])));
|
|
11
|
+
var MenuItem = function (_a) {
|
|
12
|
+
var icon = _a.icon, title = _a.title, hasSeparator = _a.hasSeparator;
|
|
13
|
+
return (_jsxs(StyledListItem, { hasSeparator: hasSeparator, children: [icon && _jsx(IconWrap, { children: icon }), title] }));
|
|
14
|
+
};
|
|
15
|
+
export default MenuItem;
|
|
16
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -0,0 +1,51 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
17
|
+
import { useCallback } from 'react';
|
|
18
|
+
import styled from '@xstyled/styled-components';
|
|
19
|
+
import { useLocation } from 'react-router';
|
|
20
|
+
import Link from '../../Link/Link';
|
|
21
|
+
var StyledLink = styled(Link)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: block;\n border-top: ", ";\n padding-top: ", ";\n color: typoPrimary;\n\n :hover > * {\n color: typoPrimary;\n background-color: bgLightGray1;\n border-radius: 6px;\n }\n ", "\n"], ["\n display: block;\n border-top: ", ";\n padding-top: ", ";\n color: typoPrimary;\n\n :hover > * {\n color: typoPrimary;\n background-color: bgLightGray1;\n border-radius: 6px;\n }\n ", "\n"])), function (_a) {
|
|
22
|
+
var $hasSeparator = _a.$hasSeparator;
|
|
23
|
+
return ($hasSeparator ? '1px solid #D2D8DF' : 'none');
|
|
24
|
+
}, function (_a) {
|
|
25
|
+
var $hasSeparator = _a.$hasSeparator;
|
|
26
|
+
return ($hasSeparator ? '4px' : '0');
|
|
27
|
+
}, function (_a) {
|
|
28
|
+
var $isActive = _a.$isActive;
|
|
29
|
+
return $isActive &&
|
|
30
|
+
"\n background-color: red1;\n color: white;\n border-radius: 6px;\n :hover {\n & svg {\n stroke: typoPrimary;\n }\n }\n & svg {\n stroke: white;\n }\n }\n";
|
|
31
|
+
});
|
|
32
|
+
var MenuItem = function (_a) {
|
|
33
|
+
var item = _a.item, ItemComponent = _a.ItemComponent, onClose = _a.onClose;
|
|
34
|
+
var onClick = item.onClick, link = item.link, hasSeparator = item.hasSeparator, name = item.name, autoClose = item.autoClose;
|
|
35
|
+
var location = useLocation();
|
|
36
|
+
var isActive = link === location.pathname;
|
|
37
|
+
var onClickCallback = useCallback(function (e) {
|
|
38
|
+
if (onClick) {
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
onClick();
|
|
41
|
+
}
|
|
42
|
+
if (autoClose && onClose) {
|
|
43
|
+
setTimeout(function () {
|
|
44
|
+
onClose();
|
|
45
|
+
}, 200);
|
|
46
|
+
}
|
|
47
|
+
}, [autoClose, onClick, onClose]);
|
|
48
|
+
return (_jsx(StyledLink, { to: link, "$isActive": isActive, onClick: onClickCallback, "$hasSeparator": !!hasSeparator, "data-cy": name, size: "inherit", children: _jsx(ItemComponent, __assign({}, item)) }));
|
|
49
|
+
};
|
|
50
|
+
export default MenuItem;
|
|
51
|
+
var templateObject_1;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import MenuItem from './MenuItem';
|
|
3
|
+
var MenuList = function (_a) {
|
|
4
|
+
var items = _a.items, ItemComponent = _a.ItemComponent, onClose = _a.onClose;
|
|
5
|
+
return (_jsx("ul", { children: items &&
|
|
6
|
+
items.map(function (item, i) {
|
|
7
|
+
return !item.hidden && _jsx(MenuItem, { item: item, ItemComponent: ItemComponent, onClose: onClose }, i);
|
|
8
|
+
}) }));
|
|
9
|
+
};
|
|
10
|
+
export default MenuList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropdownMenu as default } from './DropdownMenu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropdownMenu as default } from './DropdownMenu';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
export type Pathname = {
|
|
3
|
+
pathname: string;
|
|
4
|
+
};
|
|
5
|
+
export type DefaultItem = {
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
title?: string | JSX.Element;
|
|
8
|
+
link?: string | Pathname;
|
|
9
|
+
onClick?: Function;
|
|
10
|
+
hasSeparator?: boolean;
|
|
11
|
+
hidden?: boolean;
|
|
12
|
+
count?: number;
|
|
13
|
+
autoClose?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type Item = {
|
|
16
|
+
link?: string | Pathname;
|
|
17
|
+
onClick?: Function;
|
|
18
|
+
hasSeparator?: boolean;
|
|
19
|
+
name?: string;
|
|
20
|
+
autoClose?: boolean;
|
|
21
|
+
hidden?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export type MenuItemProps<ItemType extends Item> = {
|
|
24
|
+
item: ItemType;
|
|
25
|
+
ItemComponent: React.ComponentType<Omit<ItemType, 'onClick' | 'link'>>;
|
|
26
|
+
onClose?: Function;
|
|
27
|
+
};
|
|
28
|
+
export type MenuItems<ItemType extends Item> = {
|
|
29
|
+
items?: ItemType[];
|
|
30
|
+
ItemComponent: React.ComponentType<Omit<ItemType, 'onClick' | 'link'>>;
|
|
31
|
+
onClose?: Function;
|
|
32
|
+
};
|
|
33
|
+
export type DropdownMenuProps<ItemType extends Item = DefaultItem> = {
|
|
34
|
+
showMenu?: boolean;
|
|
35
|
+
className?: string;
|
|
36
|
+
childRef?: Ref<any>;
|
|
37
|
+
items?: ItemType[];
|
|
38
|
+
ItemComponent?: React.ComponentType<Omit<ItemType, 'onClick' | 'link'>>;
|
|
39
|
+
header?: React.ReactNode;
|
|
40
|
+
footer?: React.ReactNode;
|
|
41
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AppearanceValue } from '../Button/index';
|
|
3
|
+
type Item = {
|
|
4
|
+
label: string | JSX.Element;
|
|
5
|
+
value: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
};
|
|
8
|
+
type DropdownSelectProps = {
|
|
9
|
+
label: string | JSX.Element;
|
|
10
|
+
appearance?: AppearanceValue;
|
|
11
|
+
options: Item[];
|
|
12
|
+
showChevron?: boolean;
|
|
13
|
+
onSelect?: (value: Item['value']) => void;
|
|
14
|
+
icon?: JSX.Element;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
ButtonComponent?: React.FC;
|
|
17
|
+
};
|
|
18
|
+
export declare const CustomSelectButton: import("styled-components").StyledComponent<"button", import("@xstyled/system").Theme, {}, never>;
|
|
19
|
+
declare const DropdownSelect: ({ label, appearance, options, showChevron, onSelect, disabled, icon, ButtonComponent, }: DropdownSelectProps) => JSX.Element;
|
|
20
|
+
export default DropdownSelect;
|
|
21
|
+
export type { Item as DropdownSelectItem };
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
import React, { useCallback, useRef } from 'react';
|
|
7
|
+
import styled from '@xstyled/styled-components';
|
|
8
|
+
import Icon from '../Icon/Icon';
|
|
9
|
+
import DropdownMenu from '../DropdownMenu';
|
|
10
|
+
import Button from '../Button/index';
|
|
11
|
+
import Popover from '../../Blocks/Popover';
|
|
12
|
+
var ArrowIcon = styled(Icon)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-shrink: 0;\n margin-left: 2;\n"], ["\n flex-shrink: 0;\n margin-left: 2;\n"])));
|
|
13
|
+
var CustomIconWrap = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-right: 1;\n"], ["\n margin-right: 1;\n"])));
|
|
14
|
+
var StyledDropdownMenu = styled(DropdownMenu)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n top: 8px;\n min-width: ", ";\n width: max-content;\n"], ["\n position: absolute;\n top: 8px;\n min-width: ", ";\n width: max-content;\n"])), function (_a) {
|
|
15
|
+
var $fixedWidth = _a.$fixedWidth;
|
|
16
|
+
return ($fixedWidth ? '160px' : 'max-content');
|
|
17
|
+
});
|
|
18
|
+
var ContentWrapper = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"])));
|
|
19
|
+
var ChevronWrapper = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n border-left: ", ";\n"], ["\n border-left: ", ";\n"])), function (_a) {
|
|
20
|
+
var $hasBorder = _a.$hasBorder;
|
|
21
|
+
return ($hasBorder ? '1px solid white' : 'none');
|
|
22
|
+
});
|
|
23
|
+
export var CustomSelectButton = styled.button(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: none;\n min-width: 160px;\n height: 38px;\n padding: 0;\n background-color: red1;\n color: white;\n font-size: 14px;\n line-height: 14px;\n font-weight: 600;\n border: none;\n border-radius: lg;\n outline: none;\n cursor: pointer;\n :disabled {\n border: slim;\n background-color: bgLightGray;\n border-color: lightGray5;\n color: gray3;\n opacity: 0.6;\n cursor: auto;\n }\n\n @media (min-width: 1024px) {\n display: block;\n\n :focus {\n outline: none;\n }\n }\n\n ", " {\n justify-content: space-between;\n padding-left: 14px;\n }\n\n ", " {\n margin-left: 20px;\n padding: 12px 14px;\n }\n"], ["\n display: none;\n min-width: 160px;\n height: 38px;\n padding: 0;\n background-color: red1;\n color: white;\n font-size: 14px;\n line-height: 14px;\n font-weight: 600;\n border: none;\n border-radius: lg;\n outline: none;\n cursor: pointer;\n :disabled {\n border: slim;\n background-color: bgLightGray;\n border-color: lightGray5;\n color: gray3;\n opacity: 0.6;\n cursor: auto;\n }\n\n @media (min-width: 1024px) {\n display: block;\n\n :focus {\n outline: none;\n }\n }\n\n ", " {\n justify-content: space-between;\n padding-left: 14px;\n }\n\n ", " {\n margin-left: 20px;\n padding: 12px 14px;\n }\n"])), ContentWrapper, ChevronWrapper);
|
|
24
|
+
var DropdownSelect = function (_a) {
|
|
25
|
+
var label = _a.label, appearance = _a.appearance, options = _a.options, showChevron = _a.showChevron, onSelect = _a.onSelect, disabled = _a.disabled, icon = _a.icon, ButtonComponent = _a.ButtonComponent;
|
|
26
|
+
var _b = React.useState(false), showDropdownMenu = _b[0], setShowDropdownMenu = _b[1];
|
|
27
|
+
var onClose = useCallback(function () { return setShowDropdownMenu(false); }, []);
|
|
28
|
+
var toggleDropdownMenu = React.useCallback(function () {
|
|
29
|
+
setShowDropdownMenu(function (prev) { return !prev; });
|
|
30
|
+
}, []);
|
|
31
|
+
var handleSelectItem = React.useCallback(function (item) {
|
|
32
|
+
setShowDropdownMenu(false);
|
|
33
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(item.value);
|
|
34
|
+
}, [onSelect]);
|
|
35
|
+
var ref = useRef(null);
|
|
36
|
+
var items = options.map(function (item) { return ({
|
|
37
|
+
title: item.label,
|
|
38
|
+
onClick: function () { return handleSelectItem(item); },
|
|
39
|
+
link: '#',
|
|
40
|
+
name: item.name,
|
|
41
|
+
}); });
|
|
42
|
+
var ComponentOfButton = ButtonComponent || Button;
|
|
43
|
+
var isCustomBtn = !!ButtonComponent;
|
|
44
|
+
return (_jsxs("div", { ref: ref, children: [_jsx(ComponentOfButton, { type: "button", appearance: appearance, onClick: toggleDropdownMenu, disabled: disabled, "data-cy": "createProductDropdownMenuBtn", children: _jsxs(ContentWrapper, { children: [icon && _jsx(CustomIconWrap, { children: icon }), _jsx("span", { children: label }), showChevron && (_jsx(ChevronWrapper, { "$hasBorder": isCustomBtn, children: _jsx(ArrowIcon, { icon: "chevronDown", size: isCustomBtn ? '100%' : '80%', fixedWidth: isCustomBtn }) }))] }) }), showDropdownMenu && (_jsx(Popover, { parentRef: ref, onClose: onClose, placement: "bottom-start", children: _jsx(StyledDropdownMenu, { showMenu: true, items: items, "$fixedWidth": isCustomBtn }) }))] }));
|
|
45
|
+
};
|
|
46
|
+
export default DropdownSelect;
|
|
47
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type FlagAppearanceType = 'neutralBold' | 'neutralSubtle' | 'blueBold' | 'blueSubtle' | 'tealBold' | 'tealSubtle' | 'greenBold' | 'greenSubtle' | 'orangeBold' | 'orangeSubtle' | 'yellowBold' | 'yellowSubtle' | 'pinkBold' | 'pinkSubtle' | 'purpleBold' | 'purpleSubtle' | 'redBold' | 'redSubtle';
|
|
3
|
+
export declare const flagAppearanceToColorMap: {
|
|
4
|
+
neutralBold: string;
|
|
5
|
+
neutralSubtle: string;
|
|
6
|
+
blueBold: string;
|
|
7
|
+
blueSubtle: string;
|
|
8
|
+
tealBold: string;
|
|
9
|
+
tealSubtle: string;
|
|
10
|
+
greenBold: string;
|
|
11
|
+
greenSubtle: string;
|
|
12
|
+
orangeBold: string;
|
|
13
|
+
orangeSubtle: string;
|
|
14
|
+
yellowBold: string;
|
|
15
|
+
yellowSubtle: string;
|
|
16
|
+
pinkBold: string;
|
|
17
|
+
pinkSubtle: string;
|
|
18
|
+
purpleBold: string;
|
|
19
|
+
purpleSubtle: string;
|
|
20
|
+
redBold: string;
|
|
21
|
+
redSubtle: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const flagAppearanceToFontColorMap: {
|
|
24
|
+
neutralBold: string;
|
|
25
|
+
neutralSubtle: string;
|
|
26
|
+
blueBold: string;
|
|
27
|
+
blueSubtle: string;
|
|
28
|
+
tealBold: string;
|
|
29
|
+
tealSubtle: string;
|
|
30
|
+
greenBold: string;
|
|
31
|
+
greenSubtle: string;
|
|
32
|
+
orangeBold: string;
|
|
33
|
+
orangeSubtle: string;
|
|
34
|
+
yellowBold: string;
|
|
35
|
+
yellowSubtle: string;
|
|
36
|
+
pinkBold: string;
|
|
37
|
+
pinkSubtle: string;
|
|
38
|
+
purpleBold: string;
|
|
39
|
+
purpleSubtle: string;
|
|
40
|
+
redBold: string;
|
|
41
|
+
redSubtle: string;
|
|
42
|
+
};
|
|
43
|
+
type HighlightBoxType = {
|
|
44
|
+
children: React.ReactNode;
|
|
45
|
+
appearance: FlagAppearanceType;
|
|
46
|
+
size?: 'default' | 'small' | 'wide' | 'fitContent';
|
|
47
|
+
prefix?: string;
|
|
48
|
+
};
|
|
49
|
+
declare const HighlightBox: ({ children, appearance, size, prefix }: HighlightBoxType) => JSX.Element;
|
|
50
|
+
export default HighlightBox;
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import styled, { useTheme } from '@xstyled/styled-components';
|
|
7
|
+
import { th } from '@xstyled/system';
|
|
8
|
+
var StyledHighlightBox = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: flex-start;\n border-radius: ml;\n font-size: 12px;\n text-align: center;\n line-height: 19.2px;\n min-width: 0;\n font-weight: semiBold;\n .default {\n height: 24px;\n padding: 2px 8px;\n }\n .small {\n height: 18px;\n padding: 1px 6px;\n }\n .wide {\n height: 2.75em;\n display: flex;\n flex-flow: row wrap;\n width: 11rem;\n align-content: center;\n line-height: 14px;\n padding: 0.5px 12px;\n }\n .fitContent {\n width: fit-content;\n height: auto;\n padding: 4px 5px;\n font-size: 13px;\n line-height: 15px;\n font-weight: 400;\n }\n background-color: ", ";\n color: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: flex-start;\n border-radius: ml;\n font-size: 12px;\n text-align: center;\n line-height: 19.2px;\n min-width: 0;\n font-weight: semiBold;\n .default {\n height: 24px;\n padding: 2px 8px;\n }\n .small {\n height: 18px;\n padding: 1px 6px;\n }\n .wide {\n height: 2.75em;\n display: flex;\n flex-flow: row wrap;\n width: 11rem;\n align-content: center;\n line-height: 14px;\n padding: 0.5px 12px;\n }\n .fitContent {\n width: fit-content;\n height: auto;\n padding: 4px 5px;\n font-size: 13px;\n line-height: 15px;\n font-weight: 400;\n }\n background-color: ", ";\n color: ", ";\n"])), function (_a) {
|
|
9
|
+
var $bgcolor = _a.$bgcolor;
|
|
10
|
+
return $bgcolor;
|
|
11
|
+
}, function (_a) {
|
|
12
|
+
var $fontColor = _a.$fontColor;
|
|
13
|
+
return $fontColor;
|
|
14
|
+
});
|
|
15
|
+
var OverflowWrap = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n text-overflow: ellipsis;\n overflow: hidden;\n"], ["\n text-overflow: ellipsis;\n overflow: hidden;\n"])));
|
|
16
|
+
export var flagAppearanceToColorMap = {
|
|
17
|
+
neutralBold: 'neutral300',
|
|
18
|
+
neutralSubtle: 'neutral20',
|
|
19
|
+
blueBold: 'blue70',
|
|
20
|
+
blueSubtle: 'blue20',
|
|
21
|
+
tealBold: 'teal60',
|
|
22
|
+
tealSubtle: 'teal20',
|
|
23
|
+
greenBold: 'green60',
|
|
24
|
+
greenSubtle: 'green20',
|
|
25
|
+
orangeBold: 'orange60',
|
|
26
|
+
orangeSubtle: 'orange20',
|
|
27
|
+
yellowBold: 'yellow60',
|
|
28
|
+
yellowSubtle: 'yellow20',
|
|
29
|
+
pinkBold: 'magenta60',
|
|
30
|
+
pinkSubtle: 'magenta20',
|
|
31
|
+
purpleBold: 'purple60',
|
|
32
|
+
purpleSubtle: 'purple20',
|
|
33
|
+
redBold: 'red60',
|
|
34
|
+
redSubtle: 'red20',
|
|
35
|
+
};
|
|
36
|
+
export var flagAppearanceToFontColorMap = {
|
|
37
|
+
neutralBold: 'white',
|
|
38
|
+
neutralSubtle: 'typoPrimary',
|
|
39
|
+
blueBold: 'white',
|
|
40
|
+
blueSubtle: 'blue80',
|
|
41
|
+
tealBold: 'white',
|
|
42
|
+
tealSubtle: 'teal90',
|
|
43
|
+
greenBold: 'white',
|
|
44
|
+
greenSubtle: 'green80',
|
|
45
|
+
orangeBold: 'white',
|
|
46
|
+
orangeSubtle: 'orange80',
|
|
47
|
+
yellowBold: 'typoPrimary',
|
|
48
|
+
yellowSubtle: 'typoPrimary',
|
|
49
|
+
pinkBold: 'white',
|
|
50
|
+
pinkSubtle: 'magenta80',
|
|
51
|
+
purpleBold: 'white',
|
|
52
|
+
purpleSubtle: 'purple80',
|
|
53
|
+
redBold: 'white',
|
|
54
|
+
redSubtle: 'red80',
|
|
55
|
+
};
|
|
56
|
+
var HighlightBox = function (_a) {
|
|
57
|
+
var children = _a.children, appearance = _a.appearance, _b = _a.size, size = _b === void 0 ? 'default' : _b, prefix = _a.prefix;
|
|
58
|
+
var theme = useTheme();
|
|
59
|
+
var bgColor = th.color(appearance ? flagAppearanceToColorMap[appearance] : 'transparent')({ theme: theme });
|
|
60
|
+
var fontColor = th.color(appearance ? flagAppearanceToFontColorMap[appearance] : 'typoPrimary')({ theme: theme });
|
|
61
|
+
var name = !!prefix ? "".concat(prefix, "Label") : 'label';
|
|
62
|
+
return (_jsx(StyledHighlightBox, { "$bgcolor": bgColor, "$fontColor": fontColor, "data-cy": name, children: _jsx(OverflowWrap, { className: size, children: children }) }));
|
|
63
|
+
};
|
|
64
|
+
export default HighlightBox;
|
|
65
|
+
var templateObject_1, templateObject_2;
|
|
@@ -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 Company = function (props) { return (_jsxs("svg", __assign({ width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, props, { children: [_jsxs("g", { clipPath: "url(#clip0_1076_22920)", children: [_jsx("path", { d: "M14.0003 14.6663H5.66699C4.01014 14.6663 2.66699 13.3232 2.66699 11.6663V4.33301C2.66699 2.67615 4.01014 1.33301 5.66699 1.33301H11.0401C12.675 1.33301 14.0003 2.65834 14.0003 4.29323V4.29323V14.6663Z", strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("rect", { x: "6", y: "10", width: "4.66667", height: "4.66667", strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M5.16699 7.38867H7.00033", strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M9.55566 7.38867H11.389", strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M5.16699 5.55566H7.00033", strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M9.55566 5.55566H11.389", strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M5.16699 3.72168H7.00033", strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M9.55566 3.72168H11.389", strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" })] }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_1076_22920", children: _jsx("rect", { width: "16", height: "16", fill: "white" }) }) })] }))); };
|
|
@@ -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 } from "react/jsx-runtime";
|
|
13
|
+
export var Integrations = function (props) { return (_jsx("svg", __assign({ width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, props, { children: _jsx("path", { d: "M7.33301 2.66683C7.33301 1.93045 7.92994 1.3335 8.66634 1.3335C9.40274 1.3335 9.99967 1.93045 9.99967 2.66683V3.3335C9.99967 3.70168 10.2981 4.00016 10.6663 4.00016H12.6663C13.0345 4.00016 13.333 4.29864 13.333 4.66683V6.66683C13.333 7.03503 13.0345 7.3335 12.6663 7.3335H11.9997C11.2633 7.3335 10.6663 7.93043 10.6663 8.66683C10.6663 9.40323 11.2633 10.0002 11.9997 10.0002H12.6663C13.0345 10.0002 13.333 10.2986 13.333 10.6668V12.6668C13.333 13.035 13.0345 13.3335 12.6663 13.3335H10.6663C10.2981 13.3335 9.99967 13.035 9.99967 12.6668V12.0002C9.99967 11.2638 9.40274 10.6668 8.66634 10.6668C7.92994 10.6668 7.33301 11.2638 7.33301 12.0002V12.6668C7.33301 13.035 7.03454 13.3335 6.66634 13.3335H4.66634C4.29815 13.3335 3.99967 13.035 3.99967 12.6668V10.6668C3.99967 10.2986 3.70119 10.0002 3.33301 10.0002H2.66634C1.92996 10.0002 1.33301 9.40323 1.33301 8.66683C1.33301 7.93043 1.92996 7.3335 2.66634 7.3335H3.33301C3.70119 7.3335 3.99967 7.03503 3.99967 6.66683V4.66683C3.99967 4.29864 4.29815 4.00016 4.66634 4.00016H6.66634C7.03454 4.00016 7.33301 3.70168 7.33301 3.3335V2.66683Z", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }))); };
|
|
@@ -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 } from "react/jsx-runtime";
|
|
13
|
+
export var ShoppingBag = function (props) { return (_jsx("svg", __assign({ width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, props, { children: _jsx("path", { d: "M10.667 7.33333V4.66667C10.667 3.19391 9.47306 2 8.00033 2C6.52757 2 5.33366 3.19391 5.33366 4.66667V7.33333M3.33366 6H12.667L13.3337 14H2.66699L3.33366 6Z", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }))); };
|
|
@@ -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 Truck = function (props) { return (_jsxs("svg", __assign({ width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, props, { children: [_jsxs("g", { clipPath: "url(#clip0_1076_22693)", children: [_jsx("path", { d: "M5.33268 13.6663C6.25316 13.6663 6.99935 12.9201 6.99935 11.9997C6.99935 11.0792 6.25316 10.333 5.33268 10.333C4.41221 10.333 3.66602 11.0792 3.66602 11.9997C3.66602 12.9201 4.41221 13.6663 5.33268 13.6663Z", strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M12.6667 13.6663C13.5871 13.6663 14.3333 12.9201 14.3333 11.9997C14.3333 11.0792 13.5871 10.333 12.6667 10.333C11.7462 10.333 11 11.0792 11 11.9997C11 12.9201 11.7462 13.6663 12.6667 13.6663Z", strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M5.66602 8.99967V2.33301H15.666V11.6663", strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M0.333008 12.3333V7.66667C0.333008 6.20067 1.53367 5 2.99967 5H5.66634", strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M8.33301 11.666H9.66634", strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M0.333008 12.333H2.33301", strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M2.66602 9.33301V8.08301C2.66602 7.67051 3.00402 7.33301 3.41602 7.33301H4.66602", strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" })] }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_1076_22693", children: _jsx("rect", { width: "16", height: "16", fill: "white" }) }) })] }))); };
|
|
@@ -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 TwoUsers = function (props) { return (_jsxs("svg", __assign({ width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, props, { children: [_jsx("path", { d: "M10.6797 7.27588C11.8937 7.27588 12.8777 6.29188 12.8777 5.07788C12.8777 3.86455 11.8937 2.87988 10.6797 2.87988", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M11.6904 9.66406C12.0531 9.68873 12.4131 9.74073 12.7684 9.8194C13.2611 9.9174 13.8544 10.1194 14.0651 10.5614C14.1998 10.8447 14.1998 11.1747 14.0651 11.4581C13.8551 11.9001 13.2611 12.1021 12.7684 12.2034", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.39465 10.1377C8.85463 10.1377 10.956 10.5104 10.956 11.999C10.956 13.4884 8.86796 13.8737 6.39465 13.8737C3.93465 13.8737 1.83398 13.5017 1.83398 12.0124C1.83398 10.523 3.92132 10.1377 6.39465 10.1377Z", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.39435 8.013C4.77168 8.013 3.47168 6.71233 3.47168 5.08966C3.47168 3.46766 4.77168 2.16699 6.39435 2.16699C8.01701 2.16699 9.31768 3.46766 9.31768 5.08966C9.31768 6.71233 8.01701 8.013 6.39435 8.013Z", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] }))); };
|
|
@@ -48,3 +48,8 @@ export { Calendar } from './Calendar';
|
|
|
48
48
|
export { QRCode } from './QRCode';
|
|
49
49
|
export { Rows } from './Rows';
|
|
50
50
|
export { Group } from './Group';
|
|
51
|
+
export { Company } from './Company';
|
|
52
|
+
export { ShoppingBag } from './ShoppingBag';
|
|
53
|
+
export { Truck } from './Truck';
|
|
54
|
+
export { TwoUsers } from './TwoUsers';
|
|
55
|
+
export { Integrations } from './Integrations';
|
|
@@ -48,3 +48,8 @@ export { Calendar } from './Calendar';
|
|
|
48
48
|
export { QRCode } from './QRCode';
|
|
49
49
|
export { Rows } from './Rows';
|
|
50
50
|
export { Group } from './Group';
|
|
51
|
+
export { Company } from './Company';
|
|
52
|
+
export { ShoppingBag } from './ShoppingBag';
|
|
53
|
+
export { Truck } from './Truck';
|
|
54
|
+
export { TwoUsers } from './TwoUsers';
|
|
55
|
+
export { Integrations } from './Integrations';
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import Select from '../Select';
|
|
25
|
+
var SelectFilter = function (_a) {
|
|
26
|
+
var checkAllButton = _a.checkAllButton, restProps = __rest(_a, ["checkAllButton"]);
|
|
27
|
+
return (_jsx(Select, __assign({}, restProps, { optionVariant: "checkbox", multiLabelVariant: "count", isMulti: true, showSelectAllButton: checkAllButton })));
|
|
28
|
+
};
|
|
29
|
+
export default SelectFilter;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export type Props = {
|
|
2
2
|
page?: number;
|
|
3
3
|
itemCount?: number;
|
|
4
|
-
itemPerPage
|
|
5
|
-
onPageChange?: (number: number) => void;
|
|
4
|
+
itemPerPage: number;
|
|
5
|
+
onPageChange?: (number: number, rows: number) => void;
|
|
6
|
+
customPaginationHandler?: (page: number, rows: number) => void;
|
|
6
7
|
};
|
|
7
|
-
declare const Pagination: ({ onPageChange, itemPerPage, itemCount, page }: Props) => JSX.Element;
|
|
8
|
+
declare const Pagination: ({ onPageChange, itemPerPage, itemCount, page, customPaginationHandler }: Props) => JSX.Element;
|
|
8
9
|
export default Pagination;
|
|
@@ -2,12 +2,16 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useCallback, useMemo } from 'react';
|
|
3
3
|
import { Btn, GoIcon, Wrapper, PageBtn, DotsWrapper } from './styled';
|
|
4
4
|
var Pagination = function (_a) {
|
|
5
|
-
var onPageChange = _a.onPageChange, itemPerPage = _a.itemPerPage, itemCount = _a.itemCount, page = _a.page;
|
|
5
|
+
var onPageChange = _a.onPageChange, itemPerPage = _a.itemPerPage, itemCount = _a.itemCount, page = _a.page, customPaginationHandler = _a.customPaginationHandler;
|
|
6
6
|
var setPage = useCallback(function (number) { return function () {
|
|
7
|
+
if (customPaginationHandler) {
|
|
8
|
+
customPaginationHandler(number, itemPerPage);
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
7
11
|
if (onPageChange) {
|
|
8
|
-
onPageChange(number);
|
|
12
|
+
onPageChange(number, itemPerPage);
|
|
9
13
|
}
|
|
10
|
-
}; }, [onPageChange]);
|
|
14
|
+
}; }, [itemPerPage, onPageChange, customPaginationHandler]);
|
|
11
15
|
var pageX = page !== null && page !== void 0 ? page : 1;
|
|
12
16
|
var pageCount = Math.max(Math.ceil((itemCount !== null && itemCount !== void 0 ? itemCount : 0) / (itemPerPage !== null && itemPerPage !== void 0 ? itemPerPage : 3)), 1);
|
|
13
17
|
var arrayOfPages = useMemo(function () {
|
|
@@ -25,6 +29,10 @@ var Pagination = function (_a) {
|
|
|
25
29
|
else if (pageX > pageCount - 4) {
|
|
26
30
|
return pageNumbers.slice(pageCount - 5, pageCount - 1);
|
|
27
31
|
}
|
|
32
|
+
else if (window.innerWidth < 768) {
|
|
33
|
+
// display dispersion of 1 chars from current page (part between dots)
|
|
34
|
+
return pageNumbers.slice(pageX - 2, pageX + 1);
|
|
35
|
+
}
|
|
28
36
|
else {
|
|
29
37
|
// display dispersion of 2 chars from current page (part between dots)
|
|
30
38
|
return pageNumbers.slice(pageX - 3, pageX + 2);
|