@mailstep/design-system 0.4.21 → 0.5.0-beta.10
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 +33 -2
- package/ui/Blocks/CommonGrid/CommonGrid.d.ts +3 -0
- package/ui/Blocks/CommonGrid/CommonGrid.js +106 -0
- package/ui/Blocks/CommonGrid/CommonGridContainer.d.ts +3 -0
- package/ui/Blocks/CommonGrid/CommonGridContainer.js +67 -0
- package/ui/Blocks/CommonGrid/CommonGridContext.d.ts +9 -0
- package/ui/Blocks/CommonGrid/CommonGridContext.js +32 -0
- package/ui/Blocks/CommonGrid/HoC/withReduxActions.d.ts +2 -0
- package/ui/Blocks/CommonGrid/HoC/withReduxActions.js +36 -0
- package/ui/Blocks/CommonGrid/StandardButtons.d.ts +6 -0
- package/ui/Blocks/CommonGrid/StandardButtons.js +50 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.d.ts +11 -0
- package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.js +53 -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 +35 -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.d.ts +11 -0
- package/ui/Blocks/CommonGrid/components/ColumnFilterCell.js +41 -0
- 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/ColumnTitle.d.ts +9 -0
- package/ui/Blocks/CommonGrid/components/ColumnTitle.js +20 -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/DataCell.d.ts +11 -0
- package/ui/Blocks/CommonGrid/components/DataCell.js +52 -0
- package/ui/Blocks/CommonGrid/components/DataRow.d.ts +21 -0
- package/ui/Blocks/CommonGrid/components/DataRow.js +110 -0
- 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/DropdownSelect/DropdownSelect.d.ts +21 -0
- package/ui/Blocks/CommonGrid/components/DropdownSelect/DropdownSelect.js +47 -0
- package/ui/Blocks/CommonGrid/components/DropdownSelect/index.d.ts +4 -0
- package/ui/Blocks/CommonGrid/components/DropdownSelect/index.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/FilterDropdown.d.ts +3 -0
- package/ui/Blocks/CommonGrid/components/FilterDropdown.js +36 -0
- package/ui/Blocks/CommonGrid/components/FilterRow.d.ts +15 -0
- package/ui/Blocks/CommonGrid/components/FilterRow.js +34 -0
- package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.d.ts +7 -0
- package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.js +45 -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/GroupRow.d.ts +9 -0
- package/ui/Blocks/CommonGrid/components/GroupRow.js +27 -0
- package/ui/Blocks/CommonGrid/components/HeadCell.d.ts +27 -0
- package/ui/Blocks/CommonGrid/components/HeadCell.js +40 -0
- package/ui/Blocks/CommonGrid/components/HeadRow.d.ts +15 -0
- package/ui/Blocks/CommonGrid/components/HeadRow.js +69 -0
- package/ui/Blocks/CommonGrid/components/HidePrint/HidePrint.d.ts +6 -0
- package/ui/Blocks/CommonGrid/components/HidePrint/HidePrint.js +13 -0
- 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.d.ts +11 -0
- package/ui/Blocks/CommonGrid/components/OversizedScroll.js +21 -0
- 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/Resize.d.ts +7 -0
- package/ui/Blocks/CommonGrid/components/Resize.js +33 -0
- package/ui/Blocks/CommonGrid/components/Table.d.ts +10 -0
- package/ui/Blocks/CommonGrid/components/Table.js +25 -0
- package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.d.ts +7 -0
- package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.js +31 -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/gridCells/ButtonInCell.js +16 -0
- 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 +5 -0
- package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.js +19 -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/index.d.ts +12 -0
- package/ui/Blocks/CommonGrid/components/gridCells/index.js +12 -0
- package/ui/Blocks/CommonGrid/components/icons/ArrowSimple.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/icons/ArrowSimple.js +14 -0
- package/ui/Blocks/CommonGrid/components/icons/Edit.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/icons/Edit.js +14 -0
- package/ui/Blocks/CommonGrid/components/icons/EyeOpen.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/icons/EyeOpen.js +14 -0
- package/ui/Blocks/CommonGrid/components/icons/Sorting.d.ts +2 -0
- package/ui/Blocks/CommonGrid/components/icons/Sorting.js +14 -0
- package/ui/Blocks/CommonGrid/components/utils.d.ts +8 -0
- package/ui/Blocks/CommonGrid/components/utils.js +22 -0
- package/ui/Blocks/CommonGrid/hooks/useColumnSizes.d.ts +12 -0
- package/ui/Blocks/CommonGrid/hooks/useColumnSizes.js +83 -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/useGetGridHeight.d.ts +7 -0
- package/ui/Blocks/CommonGrid/hooks/useGetGridHeight.js +33 -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/useRowsKeyControls.d.ts +4 -0
- package/ui/Blocks/CommonGrid/hooks/useRowsKeyControls.js +21 -0
- package/ui/Blocks/CommonGrid/hooks/useUxReset.d.ts +3 -0
- package/ui/Blocks/CommonGrid/hooks/useUxReset.js +15 -0
- package/ui/Blocks/CommonGrid/index.d.ts +7 -0
- package/ui/Blocks/CommonGrid/index.js +7 -0
- package/ui/Blocks/CommonGrid/store/index.d.ts +58 -0
- package/ui/Blocks/CommonGrid/store/index.js +230 -0
- package/ui/Blocks/CommonGrid/store/migrateState.d.ts +3 -0
- package/ui/Blocks/CommonGrid/store/migrateState.js +14 -0
- package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.d.ts +11 -0
- package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.js +31 -0
- package/ui/Blocks/CommonGrid/storybook/stories/customControllButtons.stories.d.ts +13 -0
- package/ui/Blocks/CommonGrid/storybook/stories/customControllButtons.stories.js +49 -0
- package/ui/Blocks/CommonGrid/storybook/stories/default.stories.d.ts +6 -0
- package/ui/Blocks/CommonGrid/storybook/stories/default.stories.js +14 -0
- package/ui/Blocks/CommonGrid/storybook/stories/loading.stories.d.ts +10 -0
- package/ui/Blocks/CommonGrid/storybook/stories/loading.stories.js +11 -0
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNoScrollLayout.stories.d.ts +10 -0
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNoScrollLayout.stories.js +12 -0
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNormalLayout.stories.d.ts +10 -0
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNormalLayout.stories.js +12 -0
- package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.d.ts +6 -0
- package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.js +15 -0
- package/ui/Blocks/CommonGrid/storybook/stories/withCustomGridActions.stories.d.ts +10 -0
- package/ui/Blocks/CommonGrid/storybook/stories/withCustomGridActions.stories.js +15 -0
- package/ui/Blocks/CommonGrid/storybook/stories/withForcedCheckboxes.stories.d.ts +14 -0
- package/ui/Blocks/CommonGrid/storybook/stories/withForcedCheckboxes.stories.js +24 -0
- package/ui/Blocks/CommonGrid/storybook/utils/actions.d.ts +4 -0
- package/ui/Blocks/CommonGrid/storybook/utils/actions.js +6 -0
- package/ui/Blocks/CommonGrid/storybook/utils/columnDefinition.d.ts +10 -0
- package/ui/Blocks/CommonGrid/storybook/utils/columnDefinition.js +97 -0
- package/ui/Blocks/CommonGrid/storybook/utils/filters.d.ts +2 -0
- package/ui/Blocks/CommonGrid/storybook/utils/filters.js +23 -0
- package/ui/Blocks/CommonGrid/storybook/utils/utils.d.ts +17 -0
- package/ui/Blocks/CommonGrid/storybook/utils/utils.js +66 -0
- package/ui/Blocks/CommonGrid/storybook/utils/withRedux.d.ts +2 -0
- package/ui/Blocks/CommonGrid/storybook/utils/withRedux.js +12 -0
- package/ui/Blocks/CommonGrid/storybook/utils/withRouter.d.ts +2 -0
- package/ui/Blocks/CommonGrid/storybook/utils/withRouter.js +4 -0
- package/ui/Blocks/CommonGrid/storybook/utils/withTheme.d.ts +2 -0
- package/ui/Blocks/CommonGrid/storybook/utils/withTheme.js +18 -0
- package/ui/Blocks/CommonGrid/styles.d.ts +12 -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 +313 -0
- package/ui/Blocks/CommonGrid/types.js +8 -0
- package/ui/Blocks/CommonGrid/utils/index.d.ts +19 -0
- package/ui/Blocks/CommonGrid/utils/index.js +78 -0
- package/ui/Blocks/CommonGrid/utils/public.d.ts +16 -0
- package/ui/Blocks/CommonGrid/utils/public.js +52 -0
- package/ui/Blocks/Popover/index.d.ts +10 -0
- package/ui/Blocks/Popover/index.js +19 -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/DatePicker/utils/getLanguage.d.ts +1 -0
- package/ui/Elements/DatePicker/utils/getLanguage.js +10 -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/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/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 +1 -1
- package/ui/Elements/Pagination/Pagination.js +6 -2
- 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 +9 -0
- package/ui/Elements/Select/themes/CustomComponents.js +131 -0
- package/ui/Elements/Select/themes/baseStyles.d.ts +28 -0
- package/ui/Elements/Select/themes/baseStyles.js +70 -0
- package/ui/Elements/Select/themes/formStyles.d.ts +23 -0
- package/ui/Elements/Select/themes/formStyles.js +104 -0
- package/ui/Elements/Select/themes/headingStyles.d.ts +17 -0
- package/ui/Elements/Select/themes/headingStyles.js +99 -0
- package/ui/Elements/Select/themes/index.d.ts +3 -0
- package/ui/Elements/Select/themes/index.js +61 -0
- package/ui/Elements/Select/themes/leftMenuStyles.d.ts +18 -0
- package/ui/Elements/Select/themes/leftMenuStyles.js +57 -0
- package/ui/Elements/Select/types.d.ts +54 -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/Forms/Input/types.d.ts +2 -2
- package/ui/index.es.js +868 -1104
- package/ui/index.umd.js +8 -5
|
@@ -0,0 +1,131 @@
|
|
|
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, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
|
+
import { useCallback, useMemo, memo, useState, useEffect, useRef } from 'react';
|
|
29
|
+
import { components } from 'react-select';
|
|
30
|
+
import styled from '@xstyled/styled-components';
|
|
31
|
+
import { components as selectComponents } from 'react-select';
|
|
32
|
+
import { Trans } from '@lingui/react';
|
|
33
|
+
import Icon from '../../Icon/Icon';
|
|
34
|
+
import { Paragraph3 } from '../../Typography/Typography';
|
|
35
|
+
import Checkbox from '../../../Forms/Checkbox/Checkbox';
|
|
36
|
+
import Toggle from '../../Toggle/Toggle';
|
|
37
|
+
// Option for big lists
|
|
38
|
+
var SimplifiedOptionInner = function (props) {
|
|
39
|
+
var styles = props.getStyles('option', props);
|
|
40
|
+
var data = props.data, selectOption = props.selectOption, innerProps = props.innerProps;
|
|
41
|
+
var handleClick = useCallback(function () { return selectOption(data); }, [data, selectOption]);
|
|
42
|
+
return (_jsx("div", { style: styles, onClick: handleClick, onMouseOver: innerProps.onMouseOver, onMouseMove: innerProps.onMouseMove, children: props.label }));
|
|
43
|
+
};
|
|
44
|
+
export var SimplifiedOption = memo(SimplifiedOptionInner, function (prevProps, nextProps) { var _a, _b; return prevProps.isFocused === nextProps.isFocused && ((_a = prevProps.data) === null || _a === void 0 ? void 0 : _a.label) === ((_b = nextProps.data) === null || _b === void 0 ? void 0 : _b.label); });
|
|
45
|
+
// Value container with icon
|
|
46
|
+
var IconDiv = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding-left: 12px;\n align-self: center;\n"], ["\n padding-left: 12px;\n align-self: center;\n"])));
|
|
47
|
+
export var IconValueContainer = function (props) {
|
|
48
|
+
var _a;
|
|
49
|
+
// eslint-disable-next-line react/prop-types
|
|
50
|
+
var children = props.children, rest = __rest(props, ["children"]);
|
|
51
|
+
var icon = (_a = rest.selectProps) === null || _a === void 0 ? void 0 : _a.icon;
|
|
52
|
+
return (_jsxs(_Fragment, { children: [icon && (_jsx(IconDiv, { className: "inputIcon", children: _jsx(Icon, { icon: icon }) })), _jsx(components.ValueContainer, __assign({}, rest, { children: children }))] }));
|
|
53
|
+
};
|
|
54
|
+
// MultiValue container replacement with count of selected options
|
|
55
|
+
export var CountMultiValue = function (props) {
|
|
56
|
+
var _a, _b;
|
|
57
|
+
var selectVal = props.selectProps.value;
|
|
58
|
+
var inputVal = props.selectProps.inputValue;
|
|
59
|
+
var transValues = useMemo(function () { return ({ count: selectVal.length }); }, [selectVal.length]);
|
|
60
|
+
if (!inputVal && ((_a = props.data) === null || _a === void 0 ? void 0 : _a.value) == ((_b = selectVal[0]) === null || _b === void 0 ? void 0 : _b.value)) {
|
|
61
|
+
return (_jsx(selectComponents.SingleValue, __assign({}, props, { children: selectVal.length > 1 ? (_jsx(Trans, { id: "datagrid.filterCell.optionsSelectedLabel", message: '{count} options', values: transValues })) : (props.children) })));
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
// Option with chevron form new design
|
|
68
|
+
var ChevronDiv = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n align-self: center;\n display: flex;\n"], ["\n align-self: center;\n display: flex;\n"])));
|
|
69
|
+
var SelectedIndicator = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin-left: auto;\n padding-left: 8px;\n"], ["\n margin-left: auto;\n padding-left: 8px;\n"])));
|
|
70
|
+
export var ChevronOption = function (props) {
|
|
71
|
+
var theme = props.theme, isSelected = props.isSelected, selectOption = props.selectOption, children = props.children, data = props.data;
|
|
72
|
+
var showCheckbox = theme.optionVariant == 'checkbox';
|
|
73
|
+
var showToggle = theme.optionVariant == 'toggle';
|
|
74
|
+
return (_jsxs(selectComponents.Option, __assign({}, props, { children: [_jsx("span", { className: "label", "data-cy": "dropdownModalOption".concat(data.index), children: children }), (showCheckbox || showToggle) && (_jsxs(SelectedIndicator, { children: [showCheckbox && _jsx(Checkbox, { checked: isSelected, size: 2, readOnly: true }), showToggle && _jsx(Toggle, { name: "", onChange: selectOption, checked: isSelected, spaceAround: false, variant: 'grid' })] }))] })));
|
|
75
|
+
};
|
|
76
|
+
// Option with background highlight
|
|
77
|
+
var OptionInnerWrap = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n margin: 4px;\n & > div {\n margin-right: 2;\n }\n"], ["\n display: flex;\n align-items: center;\n margin: 4px;\n & > div {\n margin-right: 2;\n }\n"])));
|
|
78
|
+
export var HighlightOption = function (props) {
|
|
79
|
+
var children = props.children, data = props.data;
|
|
80
|
+
return (_jsx(selectComponents.Option, __assign({}, props, { children: _jsx(OptionInnerWrap, { className: "optionInner", "data-cy": "dropdownModalOption".concat(data.index), children: _jsx("span", { className: "label", children: children }) }) })));
|
|
81
|
+
};
|
|
82
|
+
// menu with check all and reset config button
|
|
83
|
+
var SelectAll = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n margin: 4px 8px 0 8px;\n padding: ", ";\n font-weight: ", ";\n color: blue2;\n :hover {\n font-weight: 700;\n cursor: pointer;\n background-color: bgLightGray1;\n border-radius: 6px;\n }\n"], ["\n display: flex;\n margin: 4px 8px 0 8px;\n padding: ", ";\n font-weight: ", ";\n color: blue2;\n :hover {\n font-weight: 700;\n cursor: pointer;\n background-color: bgLightGray1;\n border-radius: 6px;\n }\n"])), function (_a) {
|
|
84
|
+
var additionalPadding = _a.additionalPadding;
|
|
85
|
+
return (additionalPadding ? '8px 27px 8px 10px' : '8px 10px');
|
|
86
|
+
}, function (_a) {
|
|
87
|
+
var isSelected = _a.isSelected;
|
|
88
|
+
return (isSelected ? 'bold' : 'normal');
|
|
89
|
+
});
|
|
90
|
+
var ConfigWrap = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n text-align: center;\n cursor: pointer;\n color: red1;\n text-decoration: underline;\n margin: 0 30px 0 20px;\n padding-bottom: 7px;\n :first-letter {\n text-transform: capitalize;\n }\n :hover {\n color: red3;\n }\n"], ["\n text-align: center;\n cursor: pointer;\n color: red1;\n text-decoration: underline;\n margin: 0 30px 0 20px;\n padding-bottom: 7px;\n :first-letter {\n text-transform: capitalize;\n }\n :hover {\n color: red3;\n }\n"])));
|
|
91
|
+
export var ConnectedMenu = function (props) {
|
|
92
|
+
var theme = props.theme;
|
|
93
|
+
var _a = props.selectProps, resetGrid = _a.resetGrid, onCustomSelectAll = _a.onCustomSelectAll, onCustomDeselectAll = _a.onCustomDeselectAll, value = _a.value, options = _a.options, resetGridButton = _a.resetGridButton, selectAllButton = _a.selectAllButton, maxMenuHeight = _a.maxMenuHeight;
|
|
94
|
+
var showCheckbox = theme.optionVariant === 'checkbox';
|
|
95
|
+
var showToggle = theme.optionVariant === 'toggle';
|
|
96
|
+
var _b = useState(false), isSelected = _b[0], setIsSelected = _b[1];
|
|
97
|
+
var _c = useState(false), additionalPadding = _c[0], setAdditionalPadding = _c[1];
|
|
98
|
+
var ref = useRef(null);
|
|
99
|
+
useEffect(function () {
|
|
100
|
+
var _a;
|
|
101
|
+
// if the height of all options is higher than maxMenuHeight and the slider is displayed => the indentation needs to be increased
|
|
102
|
+
((_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) && setAdditionalPadding(ref.current.offsetHeight * options.length > maxMenuHeight);
|
|
103
|
+
if (value) {
|
|
104
|
+
options.length === value.length && setIsSelected(true);
|
|
105
|
+
options.length !== value.length && setIsSelected(false);
|
|
106
|
+
}
|
|
107
|
+
else
|
|
108
|
+
return;
|
|
109
|
+
}, [additionalPadding, maxMenuHeight, options.length, value]);
|
|
110
|
+
var selectAll = useCallback(function () {
|
|
111
|
+
if (!isSelected) {
|
|
112
|
+
setIsSelected(true);
|
|
113
|
+
onCustomSelectAll();
|
|
114
|
+
}
|
|
115
|
+
else if (isSelected) {
|
|
116
|
+
setIsSelected(false);
|
|
117
|
+
onCustomDeselectAll();
|
|
118
|
+
}
|
|
119
|
+
}, [isSelected, onCustomDeselectAll, onCustomSelectAll]);
|
|
120
|
+
return (_jsxs(selectComponents.Menu, __assign({}, props, { children: [selectAllButton && (_jsxs(SelectAll, { isSelected: isSelected, onClick: selectAll, ref: ref, additionalPadding: additionalPadding, children: [_jsx(Trans, { id: "datagrid.filterCell.selectAllLabel", message: 'select all' }), (showCheckbox || showToggle) && (_jsxs(SelectedIndicator, { children: [showCheckbox && _jsx(Checkbox, { checked: isSelected, size: 2, readOnly: true }), showToggle && _jsx(Toggle, { name: "", checked: isSelected, spaceAround: false, variant: 'grid' })] }))] })), props.children, resetGridButton && (_jsx(ConfigWrap, { onClick: resetGrid, children: _jsx(Paragraph3, { variant: "semiBold", children: _jsx(Trans, { id: "dataGrid.buttonClearConfig", message: "Reset config" }) }) }))] })));
|
|
121
|
+
};
|
|
122
|
+
export var CustomInput = function (props) {
|
|
123
|
+
var name = props.selectProps.name;
|
|
124
|
+
var value = !!name ? "".concat(name, "Inp") : props.id;
|
|
125
|
+
return _jsx(selectComponents.Input, __assign({}, props, { "data-cy": value }));
|
|
126
|
+
};
|
|
127
|
+
export var DropdownIndicator = function (props) {
|
|
128
|
+
var _a = props.selectProps, menuIsOpen = _a.menuIsOpen, name = _a.name;
|
|
129
|
+
return (_jsx(selectComponents.DropdownIndicator, __assign({}, props, { children: _jsx(ChevronDiv, { className: "chevron", "data-cy": "".concat(name, "ChevronBtn"), children: _jsx(Icon, { icon: menuIsOpen ? 'goUp' : 'goDown', size: '100%' }) }) })));
|
|
130
|
+
};
|
|
131
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SelectProps } from '../types';
|
|
2
|
+
import { ControlProps, CSSObjectWithLabel } from 'react-select';
|
|
3
|
+
export type BaseStylesTheme = {
|
|
4
|
+
colors: {
|
|
5
|
+
primary: string;
|
|
6
|
+
primary50: string;
|
|
7
|
+
primary25: string;
|
|
8
|
+
optionTextColor: string;
|
|
9
|
+
inputDisabledColor: string;
|
|
10
|
+
inputBackgroundColor: string;
|
|
11
|
+
inputBorderColor: string;
|
|
12
|
+
menuBackgroundColor: string;
|
|
13
|
+
inputTextColor: string;
|
|
14
|
+
placeholderTextColor: string;
|
|
15
|
+
};
|
|
16
|
+
height: string | number;
|
|
17
|
+
focusBoxShadow?: string;
|
|
18
|
+
};
|
|
19
|
+
export type BaseState<ThemeType = BaseStylesTheme> = {
|
|
20
|
+
theme: ThemeType;
|
|
21
|
+
isSelected: boolean;
|
|
22
|
+
isFocused: boolean;
|
|
23
|
+
isDisabled: boolean;
|
|
24
|
+
isMulti: boolean;
|
|
25
|
+
selectProps: SelectProps;
|
|
26
|
+
} & ControlProps;
|
|
27
|
+
export type StylesConfig<T = BaseState> = Record<string, (styles: CSSObjectWithLabel, state: T) => CSSObjectWithLabel>;
|
|
28
|
+
export declare const baseStylesConfig: StylesConfig;
|
|
@@ -0,0 +1,70 @@
|
|
|
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 createRgba from '../../../utils/CreateRgba/createRgba';
|
|
13
|
+
// style object https://react-select.com/styles
|
|
14
|
+
export var baseStylesConfig = {
|
|
15
|
+
control: function (styles, _a) {
|
|
16
|
+
var _b;
|
|
17
|
+
var selectProps = _a.selectProps, theme = _a.theme, isFocused = _a.isFocused, isDisabled = _a.isDisabled;
|
|
18
|
+
var colors = theme.colors;
|
|
19
|
+
return __assign(__assign({}, styles), { borderColor: selectProps.isInvalid || isFocused ? colors.primary : colors.inputBorderColor, backgroundColor: isDisabled ? colors.inputDisabledColor : colors.inputBackgroundColor, boxShadow: isFocused ? theme.focusBoxShadow : undefined, '&:hover': __assign(__assign({}, ((_b = styles['&:hover']) !== null && _b !== void 0 ? _b : {})), { borderColor: undefined }), minHeight: theme.height, minWidth: selectProps.isMulti ? 'min-content' : 'max-content' });
|
|
20
|
+
},
|
|
21
|
+
option: function (styles, _a) {
|
|
22
|
+
var isSelected = _a.isSelected, theme = _a.theme, isFocused = _a.isFocused;
|
|
23
|
+
return __assign(__assign({}, styles), { color: isSelected ? 'white' : theme.colors.optionTextColor, backgroundColor: isSelected ? theme.colors.primary : isFocused ? theme.colors.primary25 : 'transparent', ':active': __assign(__assign({}, styles[':active']), { backgroundColor: isSelected ? undefined : theme.colors.primary50 }) });
|
|
24
|
+
},
|
|
25
|
+
menu: function (styles, _a) {
|
|
26
|
+
var theme = _a.theme;
|
|
27
|
+
return __assign(__assign({}, styles), { minWidth: 'max-content', backgroundColor: theme.colors.menuBackgroundColor });
|
|
28
|
+
},
|
|
29
|
+
dropdownIndicator: function (styles, _a) {
|
|
30
|
+
var theme = _a.theme;
|
|
31
|
+
return (__assign(__assign({}, styles), { justifyContent: 'center', alignItems: 'center', padding: '0 4px', color: createRgba(theme.colors.inputTextColor, 0.25) }));
|
|
32
|
+
},
|
|
33
|
+
clearIndicator: function (styles, _a) {
|
|
34
|
+
var theme = _a.theme;
|
|
35
|
+
return (__assign(__assign({}, styles), { justifyContent: 'center', alignItems: 'center', padding: '0 4px', color: createRgba(theme.colors.inputTextColor, 0.25) }));
|
|
36
|
+
},
|
|
37
|
+
loadingIndicator: function (styles, _a) {
|
|
38
|
+
var theme = _a.theme;
|
|
39
|
+
return (__assign(__assign({}, styles), { justifyContent: 'center', alignItems: 'center', padding: '0 4px', color: createRgba(theme.colors.inputTextColor, 0.25) }));
|
|
40
|
+
},
|
|
41
|
+
indicatorSeparator: function (styles, _a) {
|
|
42
|
+
var theme = _a.theme;
|
|
43
|
+
return (__assign(__assign({}, styles), { backgroundColor: createRgba(theme.colors.inputTextColor, 0.25) }));
|
|
44
|
+
},
|
|
45
|
+
input: function (styles, _a) {
|
|
46
|
+
var theme = _a.theme;
|
|
47
|
+
return (__assign(__assign({}, styles), { color: theme.colors.inputTextColor }));
|
|
48
|
+
},
|
|
49
|
+
singleValue: function (styles, _a) {
|
|
50
|
+
var selectProps = _a.selectProps, theme = _a.theme;
|
|
51
|
+
return (__assign(__assign({}, styles), { color: selectProps.isInvalid ? theme.colors.primary : theme.colors.inputTextColor }));
|
|
52
|
+
},
|
|
53
|
+
multiValue: function (styles, _a) {
|
|
54
|
+
var theme = _a.theme;
|
|
55
|
+
return (__assign(__assign({}, styles), { color: theme.colors.inputTextColor, backgroundColor: theme.colors.menuBackgroundColor }));
|
|
56
|
+
},
|
|
57
|
+
multiValueLabel: function (styles) { return (__assign(__assign({}, styles), { fontSize: 'unset', padding: '5px' })); },
|
|
58
|
+
placeholder: function (styles, _a) {
|
|
59
|
+
var selectProps = _a.selectProps, theme = _a.theme;
|
|
60
|
+
return (__assign(__assign({}, styles), { textOverflow: 'ellipsis', whiteSpace: 'nowrap', overflow: 'hidden', maxWidth: 'calc(100% - 8px)', color: selectProps.isDarkPlaceholderText ? theme.colors.inputTextColor : theme.colors.placeholderTextColor }));
|
|
61
|
+
},
|
|
62
|
+
loadingMessage: function (styles, _a) {
|
|
63
|
+
var theme = _a.theme;
|
|
64
|
+
return (__assign(__assign({}, styles), { color: theme.colors.optionTextColor }));
|
|
65
|
+
},
|
|
66
|
+
noOptionsMessage: function (styles, _a) {
|
|
67
|
+
var theme = _a.theme;
|
|
68
|
+
return (__assign(__assign({}, styles), { color: theme.colors.optionTextColor }));
|
|
69
|
+
},
|
|
70
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SelectProps } from '../types';
|
|
2
|
+
import { BaseStylesTheme, BaseState, StylesConfig } from './baseStyles';
|
|
3
|
+
type CustomTheme = Omit<BaseStylesTheme, 'colors'> & {
|
|
4
|
+
colors: Omit<BaseStylesTheme['colors'], 'primary50' | 'primary25'> & {
|
|
5
|
+
optionHighligh: string;
|
|
6
|
+
valueTextColor: string;
|
|
7
|
+
inputBorderHoverColor: string;
|
|
8
|
+
menuHoverBackgroundColor: string;
|
|
9
|
+
dropdownIndicatorColor: string;
|
|
10
|
+
};
|
|
11
|
+
textWeightRegular: string;
|
|
12
|
+
textWeightSemiBold: string;
|
|
13
|
+
textWeightBold: string;
|
|
14
|
+
optionVariant: Required<SelectProps>['optionVariant'];
|
|
15
|
+
borderRadius: string;
|
|
16
|
+
font: string;
|
|
17
|
+
narrowIndicators: boolean;
|
|
18
|
+
};
|
|
19
|
+
type State = BaseState<CustomTheme>;
|
|
20
|
+
export declare const CustomStyles: StylesConfig<State>;
|
|
21
|
+
type ThemeGetter = (theme: any) => CustomTheme;
|
|
22
|
+
export declare const getCustomTheme: (theme: any, optionVariant: Required<SelectProps>['optionVariant'], useFilterSubvariant: boolean) => ThemeGetter;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
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 { baseStylesConfig } from './baseStyles';
|
|
13
|
+
import { th } from '@xstyled/system';
|
|
14
|
+
// style object https://react-select.com/styles
|
|
15
|
+
export var CustomStyles = __assign(__assign({}, baseStylesConfig), { control: function (styles, _a) {
|
|
16
|
+
var _b;
|
|
17
|
+
var selectProps = _a.selectProps, theme = _a.theme, isFocused = _a.isFocused, isDisabled = _a.isDisabled;
|
|
18
|
+
var colors = theme.colors;
|
|
19
|
+
return __assign(__assign({}, styles), { borderColor: selectProps.isInvalid ? colors.primary : isFocused ? colors.inputTextColor : colors.inputBorderColor, backgroundColor: isDisabled ? colors.inputDisabledColor : colors.inputBackgroundColor, boxShadow: isFocused ? theme.focusBoxShadow : undefined, borderRadius: theme.borderRadius, '& input': {
|
|
20
|
+
fontWeight: theme.textWeightBold,
|
|
21
|
+
fontFamily: theme.font,
|
|
22
|
+
}, '&:hover': __assign(__assign({}, ((_b = styles['&:hover']) !== null && _b !== void 0 ? _b : {})), { borderColor: colors.inputBorderHoverColor }), fontSize: '14px', minHeight: theme.height, minWidth: selectProps.isMulti ? 'min-content' : 'max-content', '.inputIcon': {
|
|
23
|
+
color: isDisabled ? colors.valueTextColor : !!selectProps.value ? colors.inputTextColor : colors.valueTextColor,
|
|
24
|
+
} });
|
|
25
|
+
}, singleValue: function (styles, _a) {
|
|
26
|
+
var selectProps = _a.selectProps, theme = _a.theme, isDisabled = _a.isDisabled;
|
|
27
|
+
return (__assign(__assign({}, styles), { color: selectProps.isInvalid ? theme.colors.primary : isDisabled ? theme.colors.valueTextColor : theme.colors.inputTextColor, fontSize: '14px', fontWeight: selectProps.isDarkPlaceholderText ? '400' : theme.textWeightSemiBold }));
|
|
28
|
+
}, multiValue: function (styles, state) {
|
|
29
|
+
var _a;
|
|
30
|
+
var theme = state.theme;
|
|
31
|
+
var base = (_a = baseStylesConfig.multiValue) === null || _a === void 0 ? void 0 : _a.call(baseStylesConfig, styles, state);
|
|
32
|
+
return __assign(__assign({}, base), { fontSize: '9px', fontWeight: theme.textWeightSemiBold });
|
|
33
|
+
}, multiValueRemove: function (styles, _a) {
|
|
34
|
+
var _b;
|
|
35
|
+
var theme = _a.theme;
|
|
36
|
+
return (__assign(__assign({}, styles), { color: theme.colors.inputBorderColor, '&:hover': __assign(__assign({}, ((_b = styles['&:hover']) !== null && _b !== void 0 ? _b : {})), { backgroundColor: theme.colors.inputTextColor }) }));
|
|
37
|
+
}, placeholder: function (styles, state) {
|
|
38
|
+
var _a;
|
|
39
|
+
var theme = state.theme;
|
|
40
|
+
var base = (_a = baseStylesConfig.placeholder) === null || _a === void 0 ? void 0 : _a.call(baseStylesConfig, styles, state);
|
|
41
|
+
return __assign(__assign({}, base), { fontSize: '14px', fontWeight: theme.textWeightSemiBold });
|
|
42
|
+
}, option: function (styles, _a) {
|
|
43
|
+
var isSelected = _a.isSelected, theme = _a.theme, isFocused = _a.isFocused, isDisabled = _a.isDisabled;
|
|
44
|
+
var defaultColor = theme.colors.optionTextColor;
|
|
45
|
+
var disabledColor = theme.colors.placeholderTextColor;
|
|
46
|
+
return {
|
|
47
|
+
color: isDisabled ? disabledColor : defaultColor,
|
|
48
|
+
fontWeight: !isDisabled && (isSelected || isFocused) ? theme.textWeightBold : theme.textWeightRegular,
|
|
49
|
+
fontSize: '14px',
|
|
50
|
+
cursor: !isDisabled ? 'pointer' : 'default',
|
|
51
|
+
display: 'flex',
|
|
52
|
+
flexDirection: 'row',
|
|
53
|
+
alignContent: 'center',
|
|
54
|
+
padding: '8px 10px',
|
|
55
|
+
marginLeft: '8px',
|
|
56
|
+
marginRight: '8px',
|
|
57
|
+
borderRadius: '6px',
|
|
58
|
+
'&:hover': { backgroundColor: !isDisabled ? theme.colors.menuHoverBackgroundColor : undefined },
|
|
59
|
+
'.chevron': {
|
|
60
|
+
display: isFocused ? 'block' : 'none',
|
|
61
|
+
paddingRight: '8px',
|
|
62
|
+
color: theme.colors.primary,
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
}, menu: function (styles, state) {
|
|
66
|
+
var _a;
|
|
67
|
+
var base = (_a = baseStylesConfig.menu) === null || _a === void 0 ? void 0 : _a.call(baseStylesConfig, styles, state);
|
|
68
|
+
return __assign(__assign({}, base), { boxShadow: '0 3px 10px 0 rgba(0, 0, 0, 0.15)', marginTop: '-0', paddingTop: '0', zIndex: 3 });
|
|
69
|
+
}, dropdownIndicator: function (styles, state) {
|
|
70
|
+
var _a;
|
|
71
|
+
var base = (_a = baseStylesConfig.dropdownIndicator) === null || _a === void 0 ? void 0 : _a.call(baseStylesConfig, styles, state);
|
|
72
|
+
var theme = state.theme, isFocused = state.isFocused;
|
|
73
|
+
return __assign(__assign({}, base), { color: isFocused ? theme.colors.inputTextColor : theme.colors.dropdownIndicatorColor, padding: '0px 5px 0px 0px', '@media (min-width: 1024px)': {
|
|
74
|
+
padding: '0px 5px 0px 1px',
|
|
75
|
+
} });
|
|
76
|
+
}, clearIndicator: function (styles, state) {
|
|
77
|
+
var _a;
|
|
78
|
+
var base = (_a = baseStylesConfig.clearIndicator) === null || _a === void 0 ? void 0 : _a.call(baseStylesConfig, styles, state);
|
|
79
|
+
var theme = state.theme;
|
|
80
|
+
return __assign(__assign({}, base), { padding: theme.narrowIndicators ? '0px 0px 0px 2px' : '0px 4px' });
|
|
81
|
+
},
|
|
82
|
+
// invisible indicator separator
|
|
83
|
+
indicatorSeparator: function () { return ({ display: 'none' }); } });
|
|
84
|
+
export var getCustomTheme = function (theme, optionVariant, useFilterSubvariant) {
|
|
85
|
+
var inputTextColor = th.color('blue2')({ theme: theme });
|
|
86
|
+
var customColors = {
|
|
87
|
+
primary: th.color('red1')({ theme: theme }),
|
|
88
|
+
inputTextColor: inputTextColor,
|
|
89
|
+
valueTextColor: th.color('gray')({ theme: theme }),
|
|
90
|
+
placeholderTextColor: th.color('lightGray3')({ theme: theme }),
|
|
91
|
+
optionTextColor: th.color('blue2')({ theme: theme }),
|
|
92
|
+
inputDisabledColor: th.color('lightGray1')({ theme: theme }),
|
|
93
|
+
inputBackgroundColor: "white",
|
|
94
|
+
inputBorderColor: th.color('lightGray3')({ theme: theme }),
|
|
95
|
+
inputBorderHoverColor: th.color('gray5')({ theme: theme }),
|
|
96
|
+
optionHighligh: th.color('white')({ theme: theme }),
|
|
97
|
+
menuBackgroundColor: th.color('white')({ theme: theme }),
|
|
98
|
+
menuHoverBackgroundColor: th.color('bgLightGray1')({ theme: theme }),
|
|
99
|
+
dropdownIndicatorColor: th.color('gray1')({ theme: theme }),
|
|
100
|
+
};
|
|
101
|
+
return function (reactSelectTheme) {
|
|
102
|
+
return __assign(__assign({}, reactSelectTheme), { colors: customColors, focusBoxShadow: null, height: useFilterSubvariant ? '32px' : '38px', textWeightRegular: th.fontWeight('regular')({ theme: theme }), textWeightSemiBold: th.fontWeight('semiBold')({ theme: theme }), textWeightBold: th.fontWeight('bold')({ theme: theme }), optionVariant: optionVariant, borderRadius: th.radius('lg')({ theme: theme }), font: th.font('primary')({ theme: theme }), narrowIndicators: !!useFilterSubvariant });
|
|
103
|
+
};
|
|
104
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseStylesTheme, BaseState, StylesConfig } from './baseStyles';
|
|
2
|
+
type CustomTheme = Omit<BaseStylesTheme, 'colors'> & {
|
|
3
|
+
colors: Omit<BaseStylesTheme['colors'], 'primary50' | 'primary25'> & {
|
|
4
|
+
optionHighligh: string;
|
|
5
|
+
optionFocused: string;
|
|
6
|
+
optionHoverTextColor: string;
|
|
7
|
+
optionSelectTextColor: string;
|
|
8
|
+
scrollbarTrack: string;
|
|
9
|
+
};
|
|
10
|
+
optionTextWeight: string | number;
|
|
11
|
+
menuWidth?: string | number;
|
|
12
|
+
};
|
|
13
|
+
type State = BaseState<CustomTheme>;
|
|
14
|
+
export declare const CustomStyles: StylesConfig<State>;
|
|
15
|
+
type ThemeGetter = (theme: any) => CustomTheme;
|
|
16
|
+
export declare const getCustomTheme: (theme: any) => ThemeGetter;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,99 @@
|
|
|
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 { baseStylesConfig } from './baseStyles';
|
|
13
|
+
import { th } from '@xstyled/system';
|
|
14
|
+
// style object https://react-select.com/styles
|
|
15
|
+
export var CustomStyles = __assign(__assign({}, baseStylesConfig), { control: function (styles, state) {
|
|
16
|
+
var _a;
|
|
17
|
+
var base = (_a = baseStylesConfig.control) === null || _a === void 0 ? void 0 : _a.call(baseStylesConfig, styles, state);
|
|
18
|
+
var selectProps = state.selectProps;
|
|
19
|
+
return __assign(__assign({}, base), { border: th.border('slim')({ theme: selectProps === null || selectProps === void 0 ? void 0 : selectProps.systemTheme }), borderColor: th.color('lightGray6')({ theme: selectProps === null || selectProps === void 0 ? void 0 : selectProps.systemTheme }), borderStyle: 'solid', borderRadius: '7px', fontSize: '14px', fontWeight: th.fontWeight('normal')({ theme: selectProps === null || selectProps === void 0 ? void 0 : selectProps.systemTheme }), lineHeight: '22.4px', height: '40px', cursor: 'pointer', padding: '2px 10px', gap: '6px', backgroundColor: th.color('white')({ theme: selectProps === null || selectProps === void 0 ? void 0 : selectProps.systemTheme }), '.inputIcon': {
|
|
20
|
+
fontSize: '13px',
|
|
21
|
+
paddingLeft: 0,
|
|
22
|
+
'@media (max-width: 576px)': {
|
|
23
|
+
display: 'none',
|
|
24
|
+
},
|
|
25
|
+
} });
|
|
26
|
+
}, indicatorSeparator: function () { return ({ display: 'none' }); }, input: function (styles, _a) {
|
|
27
|
+
var theme = _a.theme, isFocused = _a.isFocused;
|
|
28
|
+
return {
|
|
29
|
+
color: isFocused ? theme.colors.optionHoverTextColor : theme.colors.optionTextColor,
|
|
30
|
+
fontSize: '12px',
|
|
31
|
+
};
|
|
32
|
+
}, option: function (styles, _a) {
|
|
33
|
+
var isSelected = _a.isSelected, theme = _a.theme, isFocused = _a.isFocused, selectProps = _a.selectProps;
|
|
34
|
+
return {
|
|
35
|
+
color: isSelected
|
|
36
|
+
? theme.colors.optionSelectTextColor
|
|
37
|
+
: isFocused
|
|
38
|
+
? theme.colors.optionHoverTextColor
|
|
39
|
+
: theme.colors.optionTextColor,
|
|
40
|
+
fontSize: '12px',
|
|
41
|
+
padding: '4px',
|
|
42
|
+
cursor: 'pointer',
|
|
43
|
+
'& > .optionInner': {
|
|
44
|
+
display: 'flex',
|
|
45
|
+
flexDirection: 'row',
|
|
46
|
+
alignContent: 'center',
|
|
47
|
+
padding: '8px 12px',
|
|
48
|
+
'@media (max-width: 576px)': {
|
|
49
|
+
padding: '2px 3px',
|
|
50
|
+
},
|
|
51
|
+
backgroundColor: isSelected ? theme.colors.optionHighligh : isFocused ? theme.colors.optionFocused : 'inherit',
|
|
52
|
+
borderRadius: th.radius('md')({ theme: selectProps === null || selectProps === void 0 ? void 0 : selectProps.systemTheme }),
|
|
53
|
+
},
|
|
54
|
+
'.chevron': {
|
|
55
|
+
display: 'none',
|
|
56
|
+
},
|
|
57
|
+
fontWeight: theme.optionTextWeight,
|
|
58
|
+
};
|
|
59
|
+
}, menu: function (styles, state) {
|
|
60
|
+
var _a;
|
|
61
|
+
var theme = state.theme, selectProps = state.selectProps;
|
|
62
|
+
var base = (_a = baseStylesConfig.menu) === null || _a === void 0 ? void 0 : _a.call(baseStylesConfig, styles, state);
|
|
63
|
+
var br = th.radius('ml')({ theme: selectProps === null || selectProps === void 0 ? void 0 : selectProps.systemTheme });
|
|
64
|
+
return __assign(__assign({}, base), { right: 0, minWidth: 'unset', width: base === null || base === void 0 ? void 0 : base.width, marginTop: '16px', zIndex: 2, boxShadow: th.shadow('dropShadow')({ theme: selectProps === null || selectProps === void 0 ? void 0 : selectProps.systemTheme }), borderRadius: "".concat(br, " "), '@media (min-width: 1024px)': {
|
|
65
|
+
width: theme.menuWidth || (base === null || base === void 0 ? void 0 : base.width),
|
|
66
|
+
} });
|
|
67
|
+
}, menuList: function (styles, _a) {
|
|
68
|
+
var theme = _a.theme;
|
|
69
|
+
return __assign(__assign({}, styles), { margin: '6px 6px 6px 0', '::-webkit-scrollbar-thumb': {
|
|
70
|
+
border: 'none',
|
|
71
|
+
borderRadius: '4px',
|
|
72
|
+
}, '::-webkit-scrollbar': {
|
|
73
|
+
width: '17px',
|
|
74
|
+
}, '::-webkit-scrollbar-track': {
|
|
75
|
+
backgroundColor: theme.colors.scrollbarTrack,
|
|
76
|
+
borderRadius: '4px',
|
|
77
|
+
} });
|
|
78
|
+
} });
|
|
79
|
+
export var getCustomTheme = function (theme) {
|
|
80
|
+
var primary = th.color('white')({ theme: theme });
|
|
81
|
+
var customColors = {
|
|
82
|
+
primary: primary,
|
|
83
|
+
optionTextColor: th.color('gray1')({ theme: theme }),
|
|
84
|
+
optionHighligh: th.color('red1')({ theme: theme }),
|
|
85
|
+
optionFocused: th.color('bgLightGray1')({ theme: theme }),
|
|
86
|
+
inputDisabledColor: th.color('lightGray1')({ theme: theme }),
|
|
87
|
+
inputBackgroundColor: th.color('blue1')({ theme: theme }),
|
|
88
|
+
inputBorderColor: th.color('lightGray3')({ theme: theme }),
|
|
89
|
+
menuBackgroundColor: th.color('white')({ theme: theme }),
|
|
90
|
+
optionHoverTextColor: th.color('typoPrimary')({ theme: theme }),
|
|
91
|
+
optionSelectTextColor: primary,
|
|
92
|
+
scrollbarTrack: th.color('bgLightGray1')({ theme: theme }),
|
|
93
|
+
inputTextColor: th.color('blue2')({ theme: theme }),
|
|
94
|
+
placeholderTextColor: th.color('lightGray3')({ theme: theme }),
|
|
95
|
+
};
|
|
96
|
+
return function (reactSelectTheme) {
|
|
97
|
+
return __assign(__assign({}, reactSelectTheme), { colors: customColors, focusBoxShadow: null, optionTextWeight: th.fontWeight('bold')({ theme: theme }), menuWidth: '260px' });
|
|
98
|
+
};
|
|
99
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { StylesConfig, SelectComponentsConfig } from 'react-select';
|
|
2
|
+
import { SelectProps } from '../types';
|
|
3
|
+
export declare const useStylesAndComponents: (style: SelectProps['style'], optionVariant: SelectProps['optionVariant'], multiLabelVariant: SelectProps['multiLabelVariant'], containerVariant: SelectProps['containerVariant'], useSimplifiedOptions: SelectProps['useSimplifiedOptions'], showSelectAllButton: SelectProps['showSelectAllButton'], showResetGridButton: SelectProps['showResetGridButton']) => [SelectComponentsConfig<unknown, boolean, any>, any, StylesConfig];
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { SimplifiedOption, IconValueContainer, CountMultiValue, ChevronOption, HighlightOption, DropdownIndicator, CustomInput, ConnectedMenu, } from './CustomComponents';
|
|
2
|
+
import { getCustomTheme as getFormCustomTheme, CustomStyles as FormCustomStyles } from './formStyles';
|
|
3
|
+
import { getCustomTheme as getLeftMenuCustomTheme, CustomStyles as LeftMenuCustomStyles } from './leftMenuStyles';
|
|
4
|
+
import { getCustomTheme as getHeadingCustomTheme, CustomStyles as HeadingCustomStyles } from './headingStyles';
|
|
5
|
+
import { useTheme } from '@xstyled/styled-components';
|
|
6
|
+
import { useMemo } from 'react';
|
|
7
|
+
export var useStylesAndComponents = function (style, optionVariant, multiLabelVariant, containerVariant, useSimplifiedOptions, showSelectAllButton, showResetGridButton) {
|
|
8
|
+
if (style === void 0) { style = 'form'; }
|
|
9
|
+
if (optionVariant === void 0) { optionVariant = 'default'; }
|
|
10
|
+
if (multiLabelVariant === void 0) { multiLabelVariant = 'default'; }
|
|
11
|
+
if (containerVariant === void 0) { containerVariant = 'default'; }
|
|
12
|
+
var systemTheme = useTheme();
|
|
13
|
+
return useMemo(function () {
|
|
14
|
+
var components = {
|
|
15
|
+
ValueContainer: IconValueContainer,
|
|
16
|
+
};
|
|
17
|
+
if (multiLabelVariant === 'count') {
|
|
18
|
+
components.MultiValue = CountMultiValue;
|
|
19
|
+
}
|
|
20
|
+
if (containerVariant === 'search') {
|
|
21
|
+
components.DropdownIndicator = null;
|
|
22
|
+
}
|
|
23
|
+
if (showResetGridButton || showSelectAllButton) {
|
|
24
|
+
components.Menu = ConnectedMenu;
|
|
25
|
+
}
|
|
26
|
+
var themes;
|
|
27
|
+
var styles;
|
|
28
|
+
components.Input = CustomInput;
|
|
29
|
+
if (style == 'leftMenu') {
|
|
30
|
+
themes = getLeftMenuCustomTheme(systemTheme);
|
|
31
|
+
styles = LeftMenuCustomStyles;
|
|
32
|
+
components.Option = HighlightOption;
|
|
33
|
+
}
|
|
34
|
+
else if (style == 'heading') {
|
|
35
|
+
themes = getHeadingCustomTheme(systemTheme);
|
|
36
|
+
styles = HeadingCustomStyles;
|
|
37
|
+
components.DropdownIndicator = DropdownIndicator;
|
|
38
|
+
components.Option = HighlightOption;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
// (style == 'form' || style == 'gridFilter')
|
|
42
|
+
themes = getFormCustomTheme(systemTheme, optionVariant, style == 'gridFilter');
|
|
43
|
+
styles = FormCustomStyles;
|
|
44
|
+
components.Option = ChevronOption;
|
|
45
|
+
components.DropdownIndicator = DropdownIndicator;
|
|
46
|
+
}
|
|
47
|
+
// performance reasons
|
|
48
|
+
if (useSimplifiedOptions)
|
|
49
|
+
components.Option = SimplifiedOption;
|
|
50
|
+
return [components, themes, styles];
|
|
51
|
+
}, [
|
|
52
|
+
multiLabelVariant,
|
|
53
|
+
containerVariant,
|
|
54
|
+
showResetGridButton,
|
|
55
|
+
showSelectAllButton,
|
|
56
|
+
style,
|
|
57
|
+
useSimplifiedOptions,
|
|
58
|
+
systemTheme,
|
|
59
|
+
optionVariant,
|
|
60
|
+
]);
|
|
61
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseStylesTheme, BaseState, StylesConfig } from './baseStyles';
|
|
2
|
+
type CustomTheme = Omit<BaseStylesTheme, 'colors'> & {
|
|
3
|
+
colors: Omit<BaseStylesTheme['colors'], 'primary50' | 'primary25'> & {
|
|
4
|
+
optionHighligh: string;
|
|
5
|
+
optionHoverTextColor: string;
|
|
6
|
+
optionSelectTextColor: string;
|
|
7
|
+
scrollbarTrack: string;
|
|
8
|
+
inputTextColor: string;
|
|
9
|
+
placeholderTextColor: string;
|
|
10
|
+
optionFocused: string;
|
|
11
|
+
};
|
|
12
|
+
optionTextWeight: string | number;
|
|
13
|
+
};
|
|
14
|
+
type State = BaseState<CustomTheme>;
|
|
15
|
+
export declare const CustomStyles: StylesConfig<State>;
|
|
16
|
+
type ThemeGetter = (theme: any) => CustomTheme;
|
|
17
|
+
export declare const getCustomTheme: (theme: any) => ThemeGetter;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
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 { baseStylesConfig } from './baseStyles';
|
|
13
|
+
import { CustomStyles as headingStyles } from './headingStyles';
|
|
14
|
+
import { th } from '@xstyled/system';
|
|
15
|
+
import createRgba from '../../../utils/CreateRgba/createRgba';
|
|
16
|
+
// style object https://react-select.com/styles
|
|
17
|
+
export var CustomStyles = __assign(__assign({}, baseStylesConfig), { control: function (styles, state) {
|
|
18
|
+
var _a;
|
|
19
|
+
var base = (_a = baseStylesConfig.control) === null || _a === void 0 ? void 0 : _a.call(baseStylesConfig, styles, state);
|
|
20
|
+
var selectProps = state.selectProps, theme = state.theme;
|
|
21
|
+
var br = th.radius('ml')({ theme: selectProps === null || selectProps === void 0 ? void 0 : selectProps.systemTheme });
|
|
22
|
+
var colors = theme.colors;
|
|
23
|
+
return __assign(__assign({}, base), { fontWeight: theme.optionTextWeight, borderStyle: undefined, borderRadius: br, fontSize: '14px', lineHeight: 1.5, letterSpacing: '0.4px', height: theme.height, '.inputIcon': {
|
|
24
|
+
color: colors.inputTextColor,
|
|
25
|
+
paddingLeft: '14px',
|
|
26
|
+
} });
|
|
27
|
+
}, valueContainer: function (styles, state) {
|
|
28
|
+
var _a;
|
|
29
|
+
var base = (_a = headingStyles.valueContainer) === null || _a === void 0 ? void 0 : _a.call(headingStyles, styles, state);
|
|
30
|
+
return __assign(__assign(__assign({}, styles), base), { padding: '1px 8px' });
|
|
31
|
+
}, option: headingStyles.option, menu: function (styles, state) {
|
|
32
|
+
var _a;
|
|
33
|
+
var base = (_a = headingStyles.menu) === null || _a === void 0 ? void 0 : _a.call(headingStyles, styles, state);
|
|
34
|
+
return __assign(__assign({}, base), { marginTop: '-6px', paddingTop: '6px' });
|
|
35
|
+
}, menuList: headingStyles.menuList });
|
|
36
|
+
export var getCustomTheme = function (theme) {
|
|
37
|
+
var primary = th.color('red2')({ theme: theme });
|
|
38
|
+
var inputTextColor = th.color('gray')({ theme: theme });
|
|
39
|
+
var customColors = {
|
|
40
|
+
primary: primary,
|
|
41
|
+
inputTextColor: inputTextColor,
|
|
42
|
+
placeholderTextColor: createRgba(inputTextColor, 0.75),
|
|
43
|
+
optionTextColor: inputTextColor,
|
|
44
|
+
optionHoverTextColor: th.color('white')({ theme: theme }),
|
|
45
|
+
optionSelectTextColor: inputTextColor,
|
|
46
|
+
optionHighligh: th.color('blue3')({ theme: theme }),
|
|
47
|
+
scrollbarTrack: th.color('blue2')({ theme: theme }),
|
|
48
|
+
inputDisabledColor: th.color('lightGray1')({ theme: theme }),
|
|
49
|
+
inputBackgroundColor: th.color('blue1')({ theme: theme }),
|
|
50
|
+
inputBorderColor: th.color('lightGray3')({ theme: theme }),
|
|
51
|
+
menuBackgroundColor: th.color('blue1')({ theme: theme }),
|
|
52
|
+
optionFocused: th.color('bgLightGray1')({ theme: theme }),
|
|
53
|
+
};
|
|
54
|
+
return function (reactSelectTheme) {
|
|
55
|
+
return __assign(__assign({}, reactSelectTheme), { colors: customColors, focusBoxShadow: null, height: '30px', optionTextWeight: th.fontWeight('bold')({ theme: theme }) });
|
|
56
|
+
};
|
|
57
|
+
};
|