@dreamcommerce/aurora 2.1.9 → 2.1.10-2
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/build/cjs/packages/aurora/src/assets/icon_arrow.js +3 -2
- package/build/cjs/packages/aurora/src/assets/icon_arrow.js.map +1 -1
- package/build/cjs/packages/aurora/src/assets/icon_calendar.js +3 -2
- package/build/cjs/packages/aurora/src/assets/icon_calendar.js.map +1 -1
- package/build/cjs/packages/aurora/src/assets/icon_close.js +3 -2
- package/build/cjs/packages/aurora/src/assets/icon_close.js.map +1 -1
- package/build/cjs/packages/aurora/src/assets/icon_delete.js +3 -2
- package/build/cjs/packages/aurora/src/assets/icon_delete.js.map +1 -1
- package/build/cjs/packages/aurora/src/assets/icon_hint.js +3 -2
- package/build/cjs/packages/aurora/src/assets/icon_hint.js.map +1 -1
- package/build/cjs/packages/aurora/src/assets/icon_tick.js +3 -2
- package/build/cjs/packages/aurora/src/assets/icon_tick.js.map +1 -1
- package/build/cjs/packages/aurora/src/assets/icon_upload.js +3 -2
- package/build/cjs/packages/aurora/src/assets/icon_upload.js.map +1 -1
- package/build/cjs/packages/aurora/src/assets/icon_warning.js +18 -0
- package/build/cjs/packages/aurora/src/assets/icon_warning.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/content_tabs/components/content_tabs.js +23 -0
- package/build/cjs/packages/aurora/src/components/content_tabs/components/content_tabs.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/content_tabs/components/content_tabs_item.js +22 -0
- package/build/cjs/packages/aurora/src/components/content_tabs/components/content_tabs_item.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/content_tabs/components/content_tabs_item_list.js +19 -0
- package/build/cjs/packages/aurora/src/components/content_tabs/components/content_tabs_item_list.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/content_tabs/components/content_tabs_panel.js +19 -0
- package/build/cjs/packages/aurora/src/components/content_tabs/components/content_tabs_panel.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/content_tabs/components/content_tabs_panel_list.js +27 -0
- package/build/cjs/packages/aurora/src/components/content_tabs/components/content_tabs_panel_list.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/content_tabs/components/content_tabs_wrapper.js +17 -0
- package/build/cjs/packages/aurora/src/components/content_tabs/components/content_tabs_wrapper.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/content_tabs/context.js +23 -0
- package/build/cjs/packages/aurora/src/components/content_tabs/context.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/content_tabs/css_classes.js +15 -0
- package/build/cjs/packages/aurora/src/components/content_tabs/css_classes.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/controls/components/input_wrapper.js +7 -2
- package/build/cjs/packages/aurora/src/components/controls/components/input_wrapper.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/controls/css_classes.js +2 -0
- package/build/cjs/packages/aurora/src/components/controls/css_classes.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/controls/hoc/control_select/index.js +2 -2
- package/build/cjs/packages/aurora/src/components/date_picker/components/common_ranges.js +1 -1
- package/build/cjs/packages/aurora/src/components/date_picker/components/days_grid.js +1 -1
- package/build/cjs/packages/aurora/src/components/date_picker/components/label.js +1 -1
- package/build/cjs/packages/aurora/src/components/date_picker/components/month_controller.js +1 -1
- package/build/cjs/packages/aurora/src/components/date_picker/components/month_year_picker/components/month_view.js +1 -1
- package/build/cjs/packages/aurora/src/components/date_picker/components/month_year_picker/components/month_year_controller.js +1 -1
- package/build/cjs/packages/aurora/src/components/date_picker/components/month_year_picker/components/years_view.js +1 -1
- package/build/cjs/packages/aurora/src/components/date_picker/components/pure_date_picker.js +1 -1
- package/build/cjs/packages/aurora/src/components/date_picker/components/single_day.js +1 -1
- package/build/cjs/packages/aurora/src/components/date_picker/hoc/range_picker.js +1 -1
- package/build/cjs/packages/aurora/src/components/date_picker/hoc/single_date_picker.js +1 -1
- package/build/cjs/packages/aurora/src/components/dropdown/components/additional_info.js +16 -0
- package/build/cjs/packages/aurora/src/components/dropdown/components/additional_info.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/dropdown/components/list.js +2 -2
- package/build/cjs/packages/aurora/src/components/dropdown/components/select.js +3 -2
- package/build/cjs/packages/aurora/src/components/dropdown/components/select.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/dropdown/css_classes.js +6 -0
- package/build/cjs/packages/aurora/src/components/dropdown/css_classes.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/dropdown/hoc/multiselect/index.js +1 -1
- package/build/cjs/packages/aurora/src/components/dropdown/hoc/select/index.js +13 -6
- package/build/cjs/packages/aurora/src/components/dropdown/hoc/select/index.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/dropdown/hooks/use_value.js +1 -1
- package/build/cjs/packages/aurora/src/components/dropdown/hooks/use_values.js +4 -0
- package/build/cjs/packages/aurora/src/components/dropdown/hooks/use_values.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/dropdown/index.js +3 -1
- package/build/cjs/packages/aurora/src/components/dropdown/index.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/flash_messenger/components/flash_message.js +1 -1
- package/build/cjs/packages/aurora/src/css/content_tabs/main.module.less.js +12 -0
- package/build/cjs/packages/aurora/src/css/content_tabs/main.module.less.js.map +1 -0
- package/build/cjs/packages/aurora/src/css/dropdown/main.module.less.js +2 -2
- package/build/cjs/packages/aurora/src/css/icons/main.module.less.js +3 -3
- package/build/cjs/packages/aurora/src/css/input/main.module.less.js +2 -2
- package/build/cjs/packages/aurora/src/css/link/main.module.less.js +2 -2
- package/build/cjs/packages/aurora/src/index.js +12 -0
- package/build/cjs/packages/aurora/src/index.js.map +1 -1
- package/build/esm/packages/aurora/src/assets/icon.js +2 -2
- package/build/esm/packages/aurora/src/assets/icon_arrow.js +3 -2
- package/build/esm/packages/aurora/src/assets/icon_arrow.js.map +1 -1
- package/build/esm/packages/aurora/src/assets/icon_calendar.d.ts +1 -1
- package/build/esm/packages/aurora/src/assets/icon_calendar.js +3 -2
- package/build/esm/packages/aurora/src/assets/icon_calendar.js.map +1 -1
- package/build/esm/packages/aurora/src/assets/icon_close.js +3 -2
- package/build/esm/packages/aurora/src/assets/icon_close.js.map +1 -1
- package/build/esm/packages/aurora/src/assets/icon_constants.d.ts +4 -0
- package/build/esm/packages/aurora/src/assets/icon_constants.js +5 -0
- package/build/esm/packages/aurora/src/assets/icon_constants.js.map +1 -0
- package/build/esm/packages/aurora/src/assets/icon_delete.js +3 -2
- package/build/esm/packages/aurora/src/assets/icon_delete.js.map +1 -1
- package/build/esm/packages/aurora/src/assets/icon_hint.js +3 -2
- package/build/esm/packages/aurora/src/assets/icon_hint.js.map +1 -1
- package/build/esm/packages/aurora/src/assets/icon_tick.js +3 -2
- package/build/esm/packages/aurora/src/assets/icon_tick.js.map +1 -1
- package/build/esm/packages/aurora/src/assets/icon_upload.js +3 -2
- package/build/esm/packages/aurora/src/assets/icon_upload.js.map +1 -1
- package/build/esm/packages/aurora/src/assets/icon_warning.d.ts +4 -0
- package/build/esm/packages/aurora/src/assets/icon_warning.js +10 -0
- package/build/esm/packages/aurora/src/assets/icon_warning.js.map +1 -0
- package/build/esm/packages/aurora/src/assets/types.d.ts +4 -0
- package/build/esm/packages/aurora/src/assets/types.js +2 -0
- package/build/esm/packages/aurora/src/assets/types.js.map +1 -1
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs.d.ts +4 -0
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs.js +15 -0
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs.js.map +1 -0
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_item.d.ts +4 -0
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_item.js +14 -0
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_item.js.map +1 -0
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_item_list.d.ts +4 -0
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_item_list.js +11 -0
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_item_list.js.map +1 -0
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_panel.d.ts +4 -0
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_panel.js +11 -0
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_panel.js.map +1 -0
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_panel_list.d.ts +4 -0
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_panel_list.js +19 -0
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_panel_list.js.map +1 -0
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_wrapper.d.ts +4 -0
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_wrapper.js +9 -0
- package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_wrapper.js.map +1 -0
- package/build/esm/packages/aurora/src/components/content_tabs/context.d.ts +5 -0
- package/build/esm/packages/aurora/src/components/content_tabs/context.js +14 -0
- package/build/esm/packages/aurora/src/components/content_tabs/context.js.map +1 -0
- package/build/esm/packages/aurora/src/components/content_tabs/css_classes.d.ts +9 -0
- package/build/esm/packages/aurora/src/components/content_tabs/css_classes.js +11 -0
- package/build/esm/packages/aurora/src/components/content_tabs/css_classes.js.map +1 -0
- package/build/esm/packages/aurora/src/components/content_tabs/types.d.ts +29 -0
- package/build/esm/packages/aurora/src/components/content_tabs/types.js +2 -0
- package/build/esm/packages/aurora/src/components/content_tabs/types.js.map +1 -0
- package/build/esm/packages/aurora/src/components/controls/components/input_wrapper.d.ts +1 -1
- package/build/esm/packages/aurora/src/components/controls/components/input_wrapper.js +8 -3
- package/build/esm/packages/aurora/src/components/controls/components/input_wrapper.js.map +1 -1
- package/build/esm/packages/aurora/src/components/controls/css_classes.d.ts +1 -0
- package/build/esm/packages/aurora/src/components/controls/css_classes.js +2 -1
- package/build/esm/packages/aurora/src/components/controls/css_classes.js.map +1 -1
- package/build/esm/packages/aurora/src/components/controls/hoc/control_select/index.js +2 -2
- package/build/esm/packages/aurora/src/components/controls/types.d.ts +4 -0
- package/build/esm/packages/aurora/src/components/date_picker/components/common_ranges.js +1 -1
- package/build/esm/packages/aurora/src/components/date_picker/components/days_grid.js +1 -1
- package/build/esm/packages/aurora/src/components/date_picker/components/label.d.ts +1 -1
- package/build/esm/packages/aurora/src/components/date_picker/components/label.js +1 -1
- package/build/esm/packages/aurora/src/components/date_picker/components/month_controller.js +1 -1
- package/build/esm/packages/aurora/src/components/date_picker/components/month_year_picker/components/month_view.js +1 -1
- package/build/esm/packages/aurora/src/components/date_picker/components/month_year_picker/components/month_year_controller.js +1 -1
- package/build/esm/packages/aurora/src/components/date_picker/components/month_year_picker/components/years_view.js +1 -1
- package/build/esm/packages/aurora/src/components/date_picker/components/pure_date_picker.js +1 -1
- package/build/esm/packages/aurora/src/components/date_picker/components/single_day.js +1 -1
- package/build/esm/packages/aurora/src/components/date_picker/hoc/range_picker.js +1 -1
- package/build/esm/packages/aurora/src/components/date_picker/hoc/single_date_picker.js +1 -1
- package/build/esm/packages/aurora/src/components/dropdown/components/additional_info.d.ts +4 -0
- package/build/esm/packages/aurora/src/components/dropdown/components/additional_info.js +8 -0
- package/build/esm/packages/aurora/src/components/dropdown/components/additional_info.js.map +1 -0
- package/build/esm/packages/aurora/src/components/dropdown/components/content.js +2 -2
- package/build/esm/packages/aurora/src/components/dropdown/components/list.d.ts +1 -1
- package/build/esm/packages/aurora/src/components/dropdown/components/list.js +2 -2
- package/build/esm/packages/aurora/src/components/dropdown/components/select.js +3 -2
- package/build/esm/packages/aurora/src/components/dropdown/components/select.js.map +1 -1
- package/build/esm/packages/aurora/src/components/dropdown/css_classes.d.ts +3 -0
- package/build/esm/packages/aurora/src/components/dropdown/css_classes.js +4 -1
- package/build/esm/packages/aurora/src/components/dropdown/css_classes.js.map +1 -1
- package/build/esm/packages/aurora/src/components/dropdown/hoc/multiselect/index.js +1 -1
- package/build/esm/packages/aurora/src/components/dropdown/hoc/select/index.js +14 -7
- package/build/esm/packages/aurora/src/components/dropdown/hoc/select/index.js.map +1 -1
- package/build/esm/packages/aurora/src/components/dropdown/hooks/use_value.d.ts +1 -1
- package/build/esm/packages/aurora/src/components/dropdown/hooks/use_value.js +1 -1
- package/build/esm/packages/aurora/src/components/dropdown/hooks/use_values.d.ts +1 -1
- package/build/esm/packages/aurora/src/components/dropdown/hooks/use_values.js +4 -0
- package/build/esm/packages/aurora/src/components/dropdown/hooks/use_values.js.map +1 -1
- package/build/esm/packages/aurora/src/components/dropdown/index.js +3 -1
- package/build/esm/packages/aurora/src/components/dropdown/index.js.map +1 -1
- package/build/esm/packages/aurora/src/components/dropdown/types.d.ts +11 -0
- package/build/esm/packages/aurora/src/components/flash_messenger/components/flash_message.js +1 -1
- package/build/esm/packages/aurora/src/components/link/css_classes.d.ts +0 -1
- package/build/esm/packages/aurora/src/css/content_tabs/main.module.less.js +8 -0
- package/build/esm/packages/aurora/src/css/content_tabs/main.module.less.js.map +1 -0
- package/build/esm/packages/aurora/src/css/dropdown/main.module.less.js +2 -2
- package/build/esm/packages/aurora/src/css/icons/main.module.less.js +3 -3
- package/build/esm/packages/aurora/src/css/input/main.module.less.js +2 -2
- package/build/esm/packages/aurora/src/css/link/main.module.less.js +2 -2
- package/build/esm/packages/aurora/src/index.d.ts +7 -1
- package/build/esm/packages/aurora/src/index.js +6 -0
- package/build/esm/packages/aurora/src/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
+
import { Any } from 'ts-toolbelt';
|
|
3
|
+
import { ICON_SIZES } from './icon_constants';
|
|
2
4
|
export declare type TIcon = {
|
|
3
5
|
children: ReactNode;
|
|
4
6
|
};
|
|
7
|
+
export declare type TIconSize = Any.Keys<typeof ICON_SIZES>;
|
|
5
8
|
export interface IIconProps extends Partial<SVGElement> {
|
|
6
9
|
className?: string;
|
|
7
10
|
onClick?: (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
|
|
11
|
+
size?: TIconSize;
|
|
8
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/assets/types.ts"],"names":[],"mappings":"AAAA,OAAiC,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/assets/types.ts"],"names":[],"mappings":"AAAA,OAAiC,OAAO,CAAC;AAEzC,OAAoB,aAAa,CAAC;AAClC,OAA2B,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { useContext, useEffect } from 'react';
|
|
2
|
+
import CSS_CLASSES from '../css_classes.js';
|
|
3
|
+
import { ContentTabsContext } from '../context.js';
|
|
4
|
+
import cssClasses from '../../../css/content_tabs/main.module.less.js';
|
|
5
|
+
|
|
6
|
+
const ContentTabs = ({ initialActiveTabId, children }) => {
|
|
7
|
+
const { setActiveId } = useContext(ContentTabsContext);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
setActiveId(initialActiveTabId);
|
|
10
|
+
}, [setActiveId, initialActiveTabId]);
|
|
11
|
+
return React.createElement("div", { className: cssClasses[CSS_CLASSES.contentTabs] }, children);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default ContentTabs;
|
|
15
|
+
//# sourceMappingURL=content_tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import CSS_CLASSES from '../css_classes.js';
|
|
3
|
+
import { ContentTabsContext } from '../context.js';
|
|
4
|
+
import cssClasses from '../../../css/content_tabs/main.module.less.js';
|
|
5
|
+
|
|
6
|
+
const ContentTabsItem = ({ id, children }) => {
|
|
7
|
+
const { activeId, setActiveId } = useContext(ContentTabsContext);
|
|
8
|
+
const activeItem = activeId === id;
|
|
9
|
+
return (React.createElement("button", { className: `${cssClasses[CSS_CLASSES.contentTabsItem]} ${activeItem ? cssClasses[CSS_CLASSES.contentTabsItemActive] : ''}`, role: "tab", tabIndex: activeItem ? 1 : -1, "aria-selected": activeItem, "aria-controls": id, onClick: () => setActiveId(id) }, children));
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default ContentTabsItem;
|
|
13
|
+
export { ContentTabsItem };
|
|
14
|
+
//# sourceMappingURL=content_tabs_item.js.map
|
package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_item.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_item_list.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CSS_CLASSES from '../css_classes.js';
|
|
3
|
+
import cssClasses from '../../../css/content_tabs/main.module.less.js';
|
|
4
|
+
|
|
5
|
+
const ContentTabsItemList = ({ children }) => {
|
|
6
|
+
return (React.createElement("div", { role: "tablist", className: cssClasses[CSS_CLASSES.contentTabsItemList] }, children));
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default ContentTabsItemList;
|
|
10
|
+
export { ContentTabsItemList };
|
|
11
|
+
//# sourceMappingURL=content_tabs_item_list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_panel.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CSS_CLASSES from '../css_classes.js';
|
|
3
|
+
import cssClasses from '../../../css/content_tabs/main.module.less.js';
|
|
4
|
+
|
|
5
|
+
const ContentTabsPanel = ({ id, children }) => {
|
|
6
|
+
return (React.createElement("div", { role: "tabpanel", tabIndex: 0, "aria-labelledby": id, className: cssClasses[CSS_CLASSES.contentTabsPanel] }, children));
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default ContentTabsPanel;
|
|
10
|
+
export { ContentTabsPanel };
|
|
11
|
+
//# sourceMappingURL=content_tabs_panel.js.map
|
package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_panel.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_panel_list.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import CSS_CLASSES from '../css_classes.js';
|
|
3
|
+
import { ContentTabsContext } from '../context.js';
|
|
4
|
+
import cssClasses from '../../../css/content_tabs/main.module.less.js';
|
|
5
|
+
|
|
6
|
+
const ContentTabsPanelList = ({ children }) => {
|
|
7
|
+
const { activeId } = useContext(ContentTabsContext);
|
|
8
|
+
return (React.createElement("div", { className: cssClasses[CSS_CLASSES.contentTabsPanelList] }, children &&
|
|
9
|
+
React.Children.map(children, (child) => {
|
|
10
|
+
if (child.type.name !== 'ContentTabsPanel') {
|
|
11
|
+
throw new Error('The child components should be of type ContentTabsPanel');
|
|
12
|
+
}
|
|
13
|
+
return child.props.id === activeId ? child : null;
|
|
14
|
+
})));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default ContentTabsPanelList;
|
|
18
|
+
export { ContentTabsPanelList };
|
|
19
|
+
//# sourceMappingURL=content_tabs_panel_list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_wrapper.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ContentTabsContextProvider } from '../context.js';
|
|
3
|
+
|
|
4
|
+
const ContentTabsWrapper = ({ children }) => {
|
|
5
|
+
return React.createElement(ContentTabsContextProvider, null, children);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default ContentTabsWrapper;
|
|
9
|
+
//# sourceMappingURL=content_tabs_wrapper.js.map
|
package/build/esm/packages/aurora/src/components/content_tabs/components/content_tabs_wrapper.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IContentTabsContextProps, IContentTabsContextProviderProps } from './types';
|
|
2
|
+
import React, { FC } from 'react';
|
|
3
|
+
export declare const ContentTabsContext: React.Context<IContentTabsContextProps>;
|
|
4
|
+
export declare const ContentTabsContextProvider: FC<IContentTabsContextProviderProps>;
|
|
5
|
+
export default ContentTabsContextProvider;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
const ContentTabsContext = React.createContext({
|
|
4
|
+
activeId: null,
|
|
5
|
+
setActiveId: () => { }
|
|
6
|
+
});
|
|
7
|
+
const ContentTabsContextProvider = ({ children }) => {
|
|
8
|
+
const [activeId, setActiveId] = useState(null);
|
|
9
|
+
return React.createElement(ContentTabsContext.Provider, { value: { activeId, setActiveId } }, children);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default ContentTabsContextProvider;
|
|
13
|
+
export { ContentTabsContext, ContentTabsContextProvider };
|
|
14
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var CSS_CLASSES = {
|
|
2
|
+
contentTabs: 'content-tabs',
|
|
3
|
+
contentTabsItemList: 'content-tabs__item-list',
|
|
4
|
+
contentTabsItem: 'content-tabs__item',
|
|
5
|
+
contentTabsItemActive: 'content-tabs__item_active',
|
|
6
|
+
contentTabsPanelList: 'content-tabs__panel-list',
|
|
7
|
+
contentTabsPanel: 'content-tabs__panel'
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default CSS_CLASSES;
|
|
11
|
+
//# sourceMappingURL=css_classes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
2
|
+
export interface IContentTabsContextProps {
|
|
3
|
+
activeId: string | null;
|
|
4
|
+
setActiveId: Dispatch<SetStateAction<any>>;
|
|
5
|
+
}
|
|
6
|
+
export interface IContentTabsContextProviderProps {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface IContentTabsItemListProps {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export interface IContentTabsItemProps {
|
|
13
|
+
id: string;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export interface IContentTabsPanelListProps {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export interface IContentTabsPanelProps {
|
|
20
|
+
id: string;
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export interface IContentTabsWrapperProps {
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export interface IContentTabsProps {
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
initialActiveTabId: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../src/components/content_tabs/types.ts"],"names":[],"mappings":"AAAA,OAAoD,OAAO,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
|
-
import { cssControl, cssControlWrapper, cssControlS, cssControlFocus, cssControlDisabled, cssControlReadonly, cssControlError, cssControlInput } from '../css_classes.js';
|
|
3
|
+
import { cssControl, cssControlWrapper, cssControlS, cssControlFocus, cssControlDisabled, cssControlReadonly, cssControlError, cssControlInput, cssControlRemoveButton } from '../css_classes.js';
|
|
4
4
|
import cssClasses from '../../../css/input/main.module.less.js';
|
|
5
5
|
import { useControlContext } from '../context.js';
|
|
6
6
|
|
|
7
|
-
const InputWrapper = ({ value, size, isFocused, isDisabled, isReadOnly, preElements, postElements, ...props }) => {
|
|
7
|
+
const InputWrapper = ({ value, size, isFocused, isDisabled, isReadOnly, preElements, postElements, placeholder, shouldShowRemoveButton, onRemoveOptions, removeButtonContent, ...props }) => {
|
|
8
8
|
const { errors } = useControlContext();
|
|
9
9
|
const classes = classnames(cssClasses[cssControl], cssClasses[cssControlWrapper], {
|
|
10
10
|
[cssClasses[cssControlS]]: size === 'small',
|
|
@@ -13,9 +13,14 @@ const InputWrapper = ({ value, size, isFocused, isDisabled, isReadOnly, preEleme
|
|
|
13
13
|
[cssClasses[cssControlReadonly]]: isReadOnly,
|
|
14
14
|
[cssClasses[cssControlError]]: errors
|
|
15
15
|
});
|
|
16
|
+
const handleOnClick = (ev) => {
|
|
17
|
+
ev.stopPropagation();
|
|
18
|
+
onRemoveOptions && onRemoveOptions();
|
|
19
|
+
};
|
|
16
20
|
return (React.createElement("div", { ...props, className: classes },
|
|
17
21
|
preElements,
|
|
18
|
-
React.createElement("input", { type: "text", className: cssClasses[cssControlInput], value: value, readOnly: true }),
|
|
22
|
+
React.createElement("input", { type: "text", className: cssClasses[cssControlInput], value: value, placeholder: placeholder, readOnly: true }),
|
|
23
|
+
shouldShowRemoveButton && (React.createElement("button", { className: cssClasses[cssControlRemoveButton], onClick: handleOnClick }, removeButtonContent)),
|
|
19
24
|
postElements));
|
|
20
25
|
};
|
|
21
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -20,6 +20,7 @@ export declare const cssControlDisabled = "control_disabled";
|
|
|
20
20
|
export declare const cssControlReadonly = "control_readonly";
|
|
21
21
|
export declare const cssControlError = "control_error";
|
|
22
22
|
export declare const cssControlInput = "control__input";
|
|
23
|
+
export declare const cssControlRemoveButton = "control__remove-button";
|
|
23
24
|
export declare const checkbox = "checkbox";
|
|
24
25
|
export declare const checkboxDisabled: string;
|
|
25
26
|
export declare const checkboxControl: string;
|
|
@@ -20,6 +20,7 @@ const cssControlDisabled = 'control_disabled';
|
|
|
20
20
|
const cssControlReadonly = 'control_readonly';
|
|
21
21
|
const cssControlError = 'control_error';
|
|
22
22
|
const cssControlInput = 'control__input';
|
|
23
|
+
const cssControlRemoveButton = 'control__remove-button';
|
|
23
24
|
const checkbox = 'checkbox';
|
|
24
25
|
const checkboxDisabled = `${checkbox}_disabled`;
|
|
25
26
|
const checkboxControl = `${checkbox}__control`;
|
|
@@ -42,5 +43,5 @@ const cellSelectorCellActive = `${cellSelectorCell}_active`;
|
|
|
42
43
|
const cssHelper = 'helper';
|
|
43
44
|
const cssHelperError = `${cssHelper}_error`;
|
|
44
45
|
|
|
45
|
-
export { cellSelector, cellSelectorCell, cellSelectorCellActive, cellSelectorContainer, cellSelectorRow, checkbox, checkboxControl, checkboxDisabled, checkboxIcon, checkboxLabel, checkboxSwitch, checkboxSwitchControl, checkboxSwitchDisabled, checkboxSwitchIcon, checkboxSwitchLabel, cssControl, cssControlDisabled, cssControlError, cssControlFocus, cssControlInput, cssControlReadonly, cssControlS, cssControlWrapper, cssControls, cssControlsAdditionalInfo, cssControlsContent, cssControlsElement, cssControlsElementCheckbox, cssControlsElementPostfix, cssControlsElementPrefix, cssControlsElementRadio, cssControlsElementVerticalAlignTop, cssControlsError, cssControlsErrors, cssControlsErrorsList, cssControlsErrorsListItem, cssControlsLabel, cssHelper, cssHelperError, radio, radioControl, radioDisabled, radioLabel };
|
|
46
|
+
export { cellSelector, cellSelectorCell, cellSelectorCellActive, cellSelectorContainer, cellSelectorRow, checkbox, checkboxControl, checkboxDisabled, checkboxIcon, checkboxLabel, checkboxSwitch, checkboxSwitchControl, checkboxSwitchDisabled, checkboxSwitchIcon, checkboxSwitchLabel, cssControl, cssControlDisabled, cssControlError, cssControlFocus, cssControlInput, cssControlReadonly, cssControlRemoveButton, cssControlS, cssControlWrapper, cssControls, cssControlsAdditionalInfo, cssControlsContent, cssControlsElement, cssControlsElementCheckbox, cssControlsElementPostfix, cssControlsElementPrefix, cssControlsElementRadio, cssControlsElementVerticalAlignTop, cssControlsError, cssControlsErrors, cssControlsErrorsList, cssControlsErrorsListItem, cssControlsLabel, cssHelper, cssHelperError, radio, radioControl, radioDisabled, radioLabel };
|
|
46
47
|
//# sourceMappingURL=css_classes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -18,14 +18,14 @@ import Select from '../../../dropdown/hoc/select/index.js';
|
|
|
18
18
|
* />
|
|
19
19
|
* )
|
|
20
20
|
*/
|
|
21
|
-
const ControlSelect = ({ label, isRequired, id, name, defaultValues, options, isWithGroups, isWithSearch, defaultIsOpen, defaultCloseOnClick, isReadonly, isDisabled, onChange, onToggle, errors, hint, hintOptions = { isFixed: true }, additionalInfo }) => {
|
|
21
|
+
const ControlSelect = ({ label, isRequired, id, name, defaultValues, options, isWithGroups, isWithSearch, defaultIsOpen, defaultCloseOnClick, isReadonly, isDisabled, onChange, onToggle, errors, hint, hintOptions = { isFixed: true }, placeholder, additionalInfo, onScroll, scrollErrors, innerAdditionalInfo }) => {
|
|
22
22
|
return (React.createElement(Control, { errors: errors, name: name, id: id },
|
|
23
23
|
(label || hint) && (React.createElement(Control.Label, { id: id, isRequired: isRequired },
|
|
24
24
|
label,
|
|
25
25
|
hint && React.createElement(Hint, { fixed: hintOptions.isFixed, spacingLeft: true, hint: hint }))),
|
|
26
26
|
React.createElement(Control.Content, null,
|
|
27
27
|
React.createElement(Control.Element, null,
|
|
28
|
-
React.createElement(Select, { key: name, name: name, options: options, defaultValues: defaultValues, isWithGroups: isWithGroups, isWithSearch: isWithSearch, defaultIsOpen: defaultIsOpen, defaultCloseOnClick: defaultCloseOnClick, isReadonly: isReadonly, isDisabled: isDisabled, onChange: onChange, onToggle: onToggle }))),
|
|
28
|
+
React.createElement(Select, { key: name, name: name, options: options, defaultValues: defaultValues, isWithGroups: isWithGroups, isWithSearch: isWithSearch, defaultIsOpen: defaultIsOpen, defaultCloseOnClick: defaultCloseOnClick, isReadonly: isReadonly, isDisabled: isDisabled, placeholder: placeholder, onChange: onChange, onToggle: onToggle, onScroll: onScroll, scrollErrors: scrollErrors, innerAdditionalInfo: innerAdditionalInfo }))),
|
|
29
29
|
React.createElement(Control.Errors, null),
|
|
30
30
|
additionalInfo && React.createElement(Control.AdditionalInfo, null, additionalInfo)));
|
|
31
31
|
};
|
|
@@ -85,6 +85,10 @@ export interface IInputWrapperProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
85
85
|
isReadOnly?: boolean;
|
|
86
86
|
preElements?: ReactNode;
|
|
87
87
|
postElements?: ReactNode;
|
|
88
|
+
placeholder?: string;
|
|
89
|
+
shouldShowRemoveButton?: boolean;
|
|
90
|
+
removeButtonContent?: JSX.Element;
|
|
91
|
+
onRemoveOptions?: (...args: any[]) => any;
|
|
88
92
|
}
|
|
89
93
|
export interface IControlLabelProps {
|
|
90
94
|
id?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useContext, useRef } from 'react';
|
|
2
2
|
import { useTranslation } from '../../../../../../external/react-i18next/dist/es/useTranslation.js';
|
|
3
3
|
import DatepickerContext from '../context/value_controller_context.js';
|
|
4
|
-
import cssClasses from '../../../css/date_picker/main.module.less.js';
|
|
5
4
|
import { cssDatePickerCommonRanges } from '../css_classes.js';
|
|
5
|
+
import cssClasses from '../../../css/date_picker/main.module.less.js';
|
|
6
6
|
import Select from '../../dropdown/hoc/select/index.js';
|
|
7
7
|
import { getRanges } from '../utilities.js';
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import DatepickerContext from '../context/value_controller_context.js';
|
|
3
3
|
import MonthYearNavigationContext from '../context/month_year_navigation_context.js';
|
|
4
|
-
import cssClasses from '../../../css/date_picker/main.module.less.js';
|
|
5
4
|
import { cssDatePickerDaysGrid, cssDatePickerDaysGridRow, cssDatePickerDaysGridWeekName } from '../css_classes.js';
|
|
5
|
+
import cssClasses from '../../../css/date_picker/main.module.less.js';
|
|
6
6
|
import SingleDay from './single_day.js';
|
|
7
7
|
import useDateNames from '../hooks/use_date_names.js';
|
|
8
8
|
|
|
@@ -2,8 +2,8 @@ import React, { useContext } from 'react';
|
|
|
2
2
|
import InputWrapper from '../../controls/components/input_wrapper.js';
|
|
3
3
|
import DatepickerContext from '../context/value_controller_context.js';
|
|
4
4
|
import IconCalendar from '../../../assets/icon_calendar.js';
|
|
5
|
-
import cssClasses from '../../../css/date_picker/main.module.less.js';
|
|
6
5
|
import { cssDatePickerLabelIcon } from '../css_classes.js';
|
|
6
|
+
import cssClasses from '../../../css/date_picker/main.module.less.js';
|
|
7
7
|
|
|
8
8
|
const DatepickerLabel = ({ name }) => {
|
|
9
9
|
const { readable, inputValue } = useContext(DatepickerContext);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useContext, useRef } from 'react';
|
|
2
2
|
import Dropdown from '../../dropdown/index.js';
|
|
3
3
|
import MonthYearNavigationContext from '../context/month_year_navigation_context.js';
|
|
4
|
-
import cssClasses from '../../../css/date_picker/main.module.less.js';
|
|
5
4
|
import { cssDatePickerController, cssDatePickerControllerArrow, cssDatePickerControllerArrowLeft, cssDatePickerControllerTitle, cssDatePickerControllerArrowRight } from '../css_classes.js';
|
|
5
|
+
import cssClasses from '../../../css/date_picker/main.module.less.js';
|
|
6
6
|
import { DATE_PICKER_TEST_ID } from '../constants.js';
|
|
7
7
|
import { useKeyboardNavigation } from '../hooks/use_keyboard_navigation.js';
|
|
8
8
|
import useDateNames from '../hooks/use_date_names.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import { DropdownContext } from '../../../../dropdown/context/index.js';
|
|
3
3
|
import MonthYearNavigationContext from '../../../context/month_year_navigation_context.js';
|
|
4
|
-
import cssClasses from '../../../../../css/date_picker/main.module.less.js';
|
|
5
4
|
import { cssDatePickerMonthTable, cssDatePickerMonthTableItem, cssDatePickerMonthTableItemSelected } from '../../../css_classes.js';
|
|
5
|
+
import cssClasses from '../../../../../css/date_picker/main.module.less.js';
|
|
6
6
|
import { MONTHS_IN_YEAR } from '../../../constants.js';
|
|
7
7
|
import useDateNames from '../../../hooks/use_date_names.js';
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
|
-
import cssClasses from '../../../../../css/date_picker/main.module.less.js';
|
|
3
2
|
import { cssDatePickerController, cssDatePickerControllerArrow, cssDatePickerControllerArrowLeft, cssDatePickerControllerTitle, cssDatePickerControllerArrowRight } from '../../../css_classes.js';
|
|
3
|
+
import cssClasses from '../../../../../css/date_picker/main.module.less.js';
|
|
4
4
|
import { MonthYearPickerContext } from '../context.js';
|
|
5
5
|
|
|
6
6
|
const MonthYearPickerController = () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import MonthYearNavigationContext from '../../../context/month_year_navigation_context.js';
|
|
3
|
-
import cssClasses from '../../../../../css/date_picker/main.module.less.js';
|
|
4
3
|
import { cssDatePickerMonthTable, cssDatePickerMonthTableItem, cssDatePickerMonthTableItemSelected } from '../../../css_classes.js';
|
|
4
|
+
import cssClasses from '../../../../../css/date_picker/main.module.less.js';
|
|
5
5
|
import { YEARS_IN_VIEW } from '../../../constants.js';
|
|
6
6
|
import { MonthYearPickerContext } from '../context.js';
|
|
7
7
|
import { MONTH_VIEW } from '../constants.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import MonthYearNavigationContext from '../context/month_year_navigation_context.js';
|
|
3
|
-
import cssClasses from '../../../css/date_picker/main.module.less.js';
|
|
4
3
|
import { cssDatePickerContainer } from '../css_classes.js';
|
|
4
|
+
import cssClasses from '../../../css/date_picker/main.module.less.js';
|
|
5
5
|
import { MAX_MONTH, MIN_MONTH } from '../constants.js';
|
|
6
6
|
import useAnimation from '../hooks/use_animation.js';
|
|
7
7
|
import DaysGrid from './days_grid.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useContext, useMemo } from 'react';
|
|
2
2
|
import { classNames } from '../../../utilities/styles/classNames.js';
|
|
3
3
|
import DatepickerContext from '../context/value_controller_context.js';
|
|
4
|
-
import cssClasses from '../../../css/date_picker/main.module.less.js';
|
|
5
4
|
import { cssDatePickerDay, cssDatePickerDayNavigation, cssDatePickerDaySelected, cssDatePickerDayBlocked, cssDatePickerDayProposed, cssDatePickerDayRangeEndLeft, cssDatePickerDayRangeEndLeftProposed, cssDatePickerDayRangeEndRight, cssDatePickerDayRangeEndRightProposed, cssDatePickerDayInRange, cssDatePickerDayText, cssDatePickerDayTextRoundedBorders, cssDatePickerDayTextNavigation, cssDatePickerDayTextToday, cssDatePickerDayTextSelected } from '../css_classes.js';
|
|
5
|
+
import cssClasses from '../../../css/date_picker/main.module.less.js';
|
|
6
6
|
import { DATE_PICKER_TEST_ID } from '../constants.js';
|
|
7
7
|
|
|
8
8
|
const SingleDay = ({ date, month, year }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useContext, useState, useEffect } from 'react';
|
|
2
2
|
import DatepickerContext from '../context/value_controller_context.js';
|
|
3
|
-
import cssClasses from '../../../css/date_picker/main.module.less.js';
|
|
4
3
|
import { cssRangePicker, cssRangePickerContainer } from '../css_classes.js';
|
|
4
|
+
import cssClasses from '../../../css/date_picker/main.module.less.js';
|
|
5
5
|
import { useKeyboardNavigation } from '../hooks/use_keyboard_navigation.js';
|
|
6
6
|
import { PureDatepicker } from '../components/pure_date_picker.js';
|
|
7
7
|
import CommonRanges from '../components/common_ranges.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useContext, useState } from 'react';
|
|
2
2
|
import DatepickerContext from '../context/value_controller_context.js';
|
|
3
|
-
import cssClasses from '../../../css/date_picker/main.module.less.js';
|
|
4
3
|
import { cssDatePicker } from '../css_classes.js';
|
|
4
|
+
import cssClasses from '../../../css/date_picker/main.module.less.js';
|
|
5
5
|
import { PureDatepicker } from '../components/pure_date_picker.js';
|
|
6
6
|
import Buttons from '../components/buttons.js';
|
|
7
7
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -6,7 +6,7 @@ import { useDropdownContext } from '../context/index.js';
|
|
|
6
6
|
import { SCREEN_XS } from '../../../constants/responsive_breakpoints.js';
|
|
7
7
|
import { useScreenDetect } from '../../../hooks/use_screen_detect.js';
|
|
8
8
|
import withTranslation from '../../../utilities/translation/with_translation.js';
|
|
9
|
-
import
|
|
9
|
+
import cssClasses$1 from '../../../css/icons/main.module.less.js';
|
|
10
10
|
import { TransitionGroup, CSSTransition } from 'react-transition-group';
|
|
11
11
|
import { DROPDOWN_Z_INDEX, DROPDOWN_ON_MODAL_Z_INDEX } from '../constants.js';
|
|
12
12
|
import { cssDropdownContent, cssDropdownArrowHorizontalDirectionRight, cssDropdownArrowVerticalDirectionBottom, cssDropdownHeader, cssDropdownHeaderContent, cssDropdownHeaderTitle } from '../css_classes.js';
|
|
@@ -78,7 +78,7 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
|
|
|
78
78
|
React.createElement("div", { ref: contentRef, style: styles, className: contentClassName },
|
|
79
79
|
React.createElement("div", { className: cssClasses[cssDropdownHeader] },
|
|
80
80
|
React.createElement("div", { onClick: () => typeof toggleDropdown === 'function' && toggleDropdown() }, headerComponent !== null && headerComponent !== void 0 ? headerComponent : (React.createElement("div", { className: cssClasses[cssDropdownHeaderContent] },
|
|
81
|
-
headerGoBackIcon || React.createElement(IconArrow, { className:
|
|
81
|
+
headerGoBackIcon || React.createElement(IconArrow, { className: cssClasses$1['icon_rotate-180'] }),
|
|
82
82
|
React.createElement("span", { className: cssClasses[cssDropdownHeaderTitle] }, headerGoBackText !== null && headerGoBackText !== void 0 ? headerGoBackText : t('Go back')))))),
|
|
83
83
|
children))) : null), (portalContainer === null || portalContainer === void 0 ? void 0 : portalContainer.current) || document.body);
|
|
84
84
|
};
|
|
@@ -19,11 +19,11 @@ isWithGroups,
|
|
|
19
19
|
/**
|
|
20
20
|
* Children nodes
|
|
21
21
|
*/
|
|
22
|
-
children }) => {
|
|
22
|
+
children, onScroll }) => {
|
|
23
23
|
const listClasses = classnames(cssClasses[cssDropdownList], cssClasses[cssDropdownWithScroll], {
|
|
24
24
|
[cssClasses[cssDropdownListWithGroup]]: isWithGroups
|
|
25
25
|
});
|
|
26
|
-
return (React.createElement("ul", { role: "listbox", className: listClasses }, children));
|
|
26
|
+
return (React.createElement("ul", { role: "listbox", className: listClasses, onScroll: onScroll }, children));
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
export default List;
|
|
@@ -3,6 +3,7 @@ import { useDropdownContext } from '../context/index.js';
|
|
|
3
3
|
import InputWrapper from '../../controls/components/input_wrapper.js';
|
|
4
4
|
import cssClasses from '../../../css/dropdown/main.module.less.js';
|
|
5
5
|
import { useKeyboardOpenClose } from '../hooks/use_keyboard_open_close.js';
|
|
6
|
+
import IconClose from '../../../assets/icon_close.js';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Dropdown.Select component. Displays select like control. Use it only if you have selectable values.
|
|
@@ -26,7 +27,7 @@ isReadonly = false,
|
|
|
26
27
|
/**
|
|
27
28
|
* array of selected options
|
|
28
29
|
*/
|
|
29
|
-
selectedOptions }) => {
|
|
30
|
+
selectedOptions, placeholder, onRemoveOptions }) => {
|
|
30
31
|
const ref = useRef(null);
|
|
31
32
|
/**
|
|
32
33
|
* get values from dropdown context
|
|
@@ -43,7 +44,7 @@ selectedOptions }) => {
|
|
|
43
44
|
const $hiddenInputs = notDisabled.map((option) => (React.createElement("input", { key: option.value, type: "hidden", name: name, value: option.value, disabled: isDisabled, readOnly: isReadonly })));
|
|
44
45
|
useKeyboardOpenClose(toggleDropdown, isOpen, ref);
|
|
45
46
|
return (React.createElement("div", { className: cssClasses['select'], "aria-expanded": isOpen, "aria-haspopup": "listbox", ref: ref },
|
|
46
|
-
React.createElement(InputWrapper, { value: value, isFocused: Boolean(isOpen), isDisabled: isDisabled, isReadOnly: isReadonly, onClick: toggleDropdown }),
|
|
47
|
+
React.createElement(InputWrapper, { value: value, isFocused: Boolean(isOpen), isDisabled: isDisabled, isReadOnly: isReadonly, onClick: toggleDropdown, placeholder: placeholder, onRemoveOptions: onRemoveOptions, shouldShowRemoveButton: !!selectedOptions.length, removeButtonContent: React.createElement(IconClose, { size: "s" }) }),
|
|
47
48
|
$hiddenInputs));
|
|
48
49
|
};
|
|
49
50
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -9,6 +9,9 @@ export declare const cssDropdownHeaderContent: string;
|
|
|
9
9
|
export declare const cssDropdownItemWithHover: string;
|
|
10
10
|
export declare const cssDropdownInput: string;
|
|
11
11
|
export declare const cssDropdownList: string;
|
|
12
|
+
export declare const cssDropdownError: string;
|
|
13
|
+
export declare const cssDropdownErrorIcon: string;
|
|
14
|
+
export declare const cssDropdownAdditionalInfo: string;
|
|
12
15
|
export declare const cssDropdownSearch: string;
|
|
13
16
|
export declare const cssDropdownWithScroll: string;
|
|
14
17
|
export declare const cssDropdownListWithGroup: string;
|