@mailstep/design-system 0.5.1-beta.2 → 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 +7 -71
- package/ui/Blocks/CommonGrid/index.js +7 -15
- 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,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);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { StoryObj } from '@storybook/react';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ onPageChange, itemPerPage, itemCount, page }: import("../Pagination").Props) => JSX.Element;
|
|
5
|
+
component: ({ onPageChange, itemPerPage, itemCount, page, customPaginationHandler }: import("../Pagination").Props) => JSX.Element;
|
|
6
6
|
tags: string[];
|
|
7
7
|
argTypes: {};
|
|
8
8
|
};
|
|
@@ -3,9 +3,9 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
3
3
|
return cooked;
|
|
4
4
|
};
|
|
5
5
|
import styled, { x } from '@xstyled/styled-components';
|
|
6
|
-
import { th } from '@xstyled/
|
|
7
|
-
import
|
|
8
|
-
export var Wrapper = styled(x.div)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n\n & > *:not(:last-child) {\n margin-right: 4px;\n }\n"], ["\n display: inline-flex;\n align-items: center;\n\n & > *:not(:last-child) {\n margin-right: 4px;\n }\n"])));
|
|
6
|
+
import { th } from '@xstyled/system';
|
|
7
|
+
import Icon from '../Icon';
|
|
8
|
+
export var Wrapper = styled(x.div)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n\n & > *:not(:last-child) {\n margin-right: 1px;\n @media (min-width: 1024px) {\n margin-right: 4px;\n }\n }\n"], ["\n display: inline-flex;\n align-items: center;\n\n & > *:not(:last-child) {\n margin-right: 1px;\n @media (min-width: 1024px) {\n margin-right: 4px;\n }\n }\n"])));
|
|
9
9
|
export var Btn = styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: transparent;\n border: none;\n cursor: ", ";\n opacity: ", ";\n"], ["\n background-color: transparent;\n border: none;\n cursor: ", ";\n opacity: ", ";\n"])), function (_a) {
|
|
10
10
|
var disabled = _a.disabled;
|
|
11
11
|
return (disabled ? 'default' : 'pointer');
|
|
@@ -13,14 +13,14 @@ export var Btn = styled.button(templateObject_2 || (templateObject_2 = __makeTem
|
|
|
13
13
|
var disabled = _a.disabled;
|
|
14
14
|
return (disabled ? 0 : 1);
|
|
15
15
|
});
|
|
16
|
-
export var ArrowIcon = styled(Icon)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-radius: 50%;\n aspect-ratio: 1 / 1;\n width: 16px;\n display: flex;\n align-items: center;\n color:
|
|
17
|
-
export var GoIcon = styled(ArrowIcon)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin: 0 8px;\n font-size:
|
|
16
|
+
export var ArrowIcon = styled(Icon)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-radius: 50%;\n aspect-ratio: 1 / 1;\n width: 16px;\n display: flex;\n align-items: center;\n color: blue2;\n\n &:hover {\n color: blue2;\n }\n"], ["\n border-radius: 50%;\n aspect-ratio: 1 / 1;\n width: 16px;\n display: flex;\n align-items: center;\n color: blue2;\n\n &:hover {\n color: blue2;\n }\n"])));
|
|
17
|
+
export var GoIcon = styled(ArrowIcon)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin: 0 8px;\n font-size: 12px;\n & > svg {\n width: 10px;\n }\n"], ["\n margin: 0 8px;\n font-size: 12px;\n & > svg {\n width: 10px;\n }\n"])));
|
|
18
18
|
export var DotsWrapper = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: gray1;\n"], ["\n color: gray1;\n"])));
|
|
19
19
|
export var PageBtn = styled.span(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n height: 18px;\n min-width: 18px;\n display: flex;\n border-radius: 50%;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin: 0 4px;\n color: ", ";\n font-size: 14px;\n font-weight: ", ";\n font-family: ", ";\n line-height: 1em;\n\n &:hover {\n color: blue2;\n }\n"], ["\n height: 18px;\n min-width: 18px;\n display: flex;\n border-radius: 50%;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin: 0 4px;\n color: ", ";\n font-size: 14px;\n font-weight: ", ";\n font-family: ", ";\n line-height: 1em;\n\n &:hover {\n color: blue2;\n }\n"])), function (_a) {
|
|
20
20
|
var isCurrent = _a.isCurrent;
|
|
21
21
|
return (isCurrent ? th.color('red1') : th.color('gray1'));
|
|
22
22
|
}, function (_a) {
|
|
23
23
|
var isCurrent = _a.isCurrent;
|
|
24
|
-
return (isCurrent ? th.fontWeight('semiBold') : th.fontWeight('
|
|
24
|
+
return (isCurrent ? th.fontWeight('semiBold') : th.fontWeight('normal'));
|
|
25
25
|
}, th('fonts.primary'));
|
|
26
26
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SelectProps } from './types';
|
|
2
|
+
declare const Select: ({ label, name, value, options, defaultOptions, loadOptions, onChange, onBlur, error, isInvalid, isLoading, isDarkPlaceholderText, spaceAround, disabled, onInputChange, isSearchable, isMulti, className, useSimplifiedOptions, showSelectAllButton, showResetGridButton, style, optionVariant, multiLabelVariant, containerVariant, placeholder, placeholderIcon, innerRef, maxMenuHeight, getOptionValue, resetGrid, ...passTroughProps }: SelectProps) => JSX.Element;
|
|
3
|
+
export default Select;
|
|
@@ -0,0 +1,69 @@
|
|
|
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, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { useCallback, useMemo } from 'react';
|
|
25
|
+
import { Wrapper, StyledReactSelect, StyledAsyncSelect } from './styles';
|
|
26
|
+
import { useStylesAndComponents } from './themes';
|
|
27
|
+
import { useTheme } from '@xstyled/styled-components';
|
|
28
|
+
import SpaceAroundWrap from '../SpaceAround';
|
|
29
|
+
import { FieldLabel } from '../Label';
|
|
30
|
+
import { ErrorMessage } from '../ErrorMessage';
|
|
31
|
+
import { i18n } from '@lingui/core';
|
|
32
|
+
var emptyOptions = [];
|
|
33
|
+
var noOptionsMessage = function () { return i18n._({ id: 'select.noOptions', message: 'no options' }); };
|
|
34
|
+
var loadingMessage = function () { return i18n._({ id: 'components.dropdown.loading', message: 'Loading...' }); };
|
|
35
|
+
var Select = function (_a) {
|
|
36
|
+
var label = _a.label, name = _a.name, _b = _a.value, value = _b === void 0 ? '' : _b, _c = _a.options, options = _c === void 0 ? emptyOptions : _c, defaultOptions = _a.defaultOptions, loadOptions = _a.loadOptions, onChange = _a.onChange, onBlur = _a.onBlur, error = _a.error, isInvalid = _a.isInvalid, isLoading = _a.isLoading, isDarkPlaceholderText = _a.isDarkPlaceholderText, _d = _a.spaceAround, spaceAround = _d === void 0 ? false : _d, disabled = _a.disabled, onInputChange = _a.onInputChange, isSearchable = _a.isSearchable, isMulti = _a.isMulti, className = _a.className, _e = _a.useSimplifiedOptions, useSimplifiedOptions = _e === void 0 ? false : _e, _f = _a.showSelectAllButton, showSelectAllButton = _f === void 0 ? false : _f, _g = _a.showResetGridButton, showResetGridButton = _g === void 0 ? false : _g, style = _a.style, optionVariant = _a.optionVariant, multiLabelVariant = _a.multiLabelVariant, containerVariant = _a.containerVariant, placeholder = _a.placeholder, placeholderIcon = _a.placeholderIcon, innerRef = _a.innerRef, maxMenuHeight = _a.maxMenuHeight, getOptionValue = _a.getOptionValue, resetGrid = _a.resetGrid, passTroughProps = __rest(_a, ["label", "name", "value", "options", "defaultOptions", "loadOptions", "onChange", "onBlur", "error", "isInvalid", "isLoading", "isDarkPlaceholderText", "spaceAround", "disabled", "onInputChange", "isSearchable", "isMulti", "className", "useSimplifiedOptions", "showSelectAllButton", "showResetGridButton", "style", "optionVariant", "multiLabelVariant", "containerVariant", "placeholder", "placeholderIcon", "innerRef", "maxMenuHeight", "getOptionValue", "resetGrid"]);
|
|
37
|
+
var isAsync = !!loadOptions;
|
|
38
|
+
if (showSelectAllButton && (loadOptions || !isMulti)) {
|
|
39
|
+
console.error('CheckboxSelect incompatible props');
|
|
40
|
+
}
|
|
41
|
+
var setAllOptions = useCallback(function () {
|
|
42
|
+
onChange === null || onChange === void 0 ? void 0 : onChange((options || []));
|
|
43
|
+
}, [onChange, options]);
|
|
44
|
+
var unsetAllOptions = useCallback(function () {
|
|
45
|
+
if (typeof onChange === 'function') {
|
|
46
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(emptyOptions);
|
|
47
|
+
}
|
|
48
|
+
}, [onChange]);
|
|
49
|
+
var icon = containerVariant === 'search' ? 'search' : placeholderIcon ? placeholderIcon : undefined;
|
|
50
|
+
var modifiedMaxMenuHeight = showResetGridButton && showSelectAllButton && maxMenuHeight ? maxMenuHeight - 30 : maxMenuHeight;
|
|
51
|
+
var _h = useStylesAndComponents(style, optionVariant, multiLabelVariant, containerVariant, useSimplifiedOptions, showSelectAllButton, showResetGridButton), customComponents = _h[0], customTheme = _h[1], customStyles = _h[2];
|
|
52
|
+
var RenderComponent = isAsync ? StyledAsyncSelect : StyledReactSelect;
|
|
53
|
+
var selectedOption;
|
|
54
|
+
var localGetOptionValue = useMemo(function () { return getOptionValue || (function (option) { return option === null || option === void 0 ? void 0 : option.value; }); }, [getOptionValue]);
|
|
55
|
+
if (Array.isArray(value)) {
|
|
56
|
+
selectedOption = (defaultOptions || options).filter(function (option) { return value.includes(localGetOptionValue(option)); });
|
|
57
|
+
selectedOption = (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.length) ? selectedOption : null;
|
|
58
|
+
}
|
|
59
|
+
else if (value !== undefined) {
|
|
60
|
+
selectedOption = (defaultOptions || options).find(function (option) { return localGetOptionValue(option) === value; }) || null;
|
|
61
|
+
}
|
|
62
|
+
var theme = useTheme();
|
|
63
|
+
// strip extra params
|
|
64
|
+
var handleLoadOptions = useMemo(function () {
|
|
65
|
+
return loadOptions ? function (fulltext) { return loadOptions(fulltext); } : undefined;
|
|
66
|
+
}, [loadOptions]);
|
|
67
|
+
return (_jsxs(SpaceAroundWrap, { spaceAround: spaceAround, className: className, children: [_jsxs(Wrapper, { children: [label && _jsx(FieldLabel, { htmlFor: name, children: label }), _jsx(RenderComponent, __assign({ id: name, name: name, options: options, loadOptions: handleLoadOptions, defaultOptions: defaultOptions, value: selectedOption, onChange: onChange, onBlur: onBlur, isDisabled: disabled || isLoading, isLoading: isLoading, isInvalid: isInvalid !== undefined ? isInvalid : !!error, isDarkPlaceholderText: isDarkPlaceholderText, placeholder: placeholder || i18n._({ id: 'components.dropdown.placeholder', message: 'Select...' }), styles: customStyles, theme: customTheme, icon: icon, hideSelectedOptions: !!(isMulti && multiLabelVariant != 'count'), onInputChange: onInputChange, isSearchable: isAsync || isSearchable, isMulti: isMulti, classNamePrefix: "react-select", components: customComponents, closeMenuOnSelect: isMulti ? false : undefined }, passTroughProps, { ref: innerRef, tabIndex: null, systemTheme: theme, resetGrid: resetGrid, onCustomSelectAll: setAllOptions, onCustomDeselectAll: unsetAllOptions, selectAllButton: showSelectAllButton, resetGridButton: showResetGridButton, maxMenuHeight: modifiedMaxMenuHeight, getOptionValue: getOptionValue, noOptionsMessage: noOptionsMessage, loadingMessage: loadingMessage }))] }), error && _jsx(ErrorMessage, { children: error })] }));
|
|
68
|
+
};
|
|
69
|
+
export default Select;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import ReactSelect from 'react-select';
|
|
2
|
+
import AsyncSelect from 'react-select/async';
|
|
3
|
+
export declare const Wrapper: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
|
|
4
|
+
export declare const StyledReactSelect: import("styled-components").StyledComponent<ReactSelect, import("@xstyled/system").Theme, import("@xstyled/util").Props<import("@xstyled/system").Theme> & import("@xstyled/system").SystemProps<import("@xstyled/system").Theme>, never>;
|
|
5
|
+
export declare const StyledAsyncSelect: import("styled-components").StyledComponent<AsyncSelect, import("@xstyled/system").Theme, import("@xstyled/util").Props<import("@xstyled/system").Theme> & import("@xstyled/system").SystemProps<import("@xstyled/system").Theme>, never>;
|
|
@@ -0,0 +1,12 @@
|
|
|
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 styled from '@xstyled/styled-components';
|
|
6
|
+
import ReactSelect from 'react-select';
|
|
7
|
+
import AsyncSelect from 'react-select/async';
|
|
8
|
+
import { system } from '@xstyled/system';
|
|
9
|
+
export var Wrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
10
|
+
export var StyledReactSelect = styled(ReactSelect)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", ";\n font-size: 14px;\n"], ["\n ", ";\n font-size: 14px;\n"])), system);
|
|
11
|
+
export var StyledAsyncSelect = styled(AsyncSelect)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", ";\n font-size: 14px;\n"], ["\n ", ";\n font-size: 14px;\n"])), system);
|
|
12
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const SimplifiedOption: React.MemoExoticComponent<(props: any) => any>;
|
|
3
|
+
export declare const IconValueContainer: (props: any) => any;
|
|
4
|
+
export declare const CountMultiValue: (props: any) => any;
|
|
5
|
+
export declare const ChevronOption: (props: any) => any;
|
|
6
|
+
export declare const ConnectedMenu: (props: any) => any;
|
|
7
|
+
export declare const CustomInput: (props: any) => any;
|
|
8
|
+
export declare const DropdownIndicator: (props: any) => any;
|