@conveyorhq/arrow-ds 1.41.0 → 1.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/components/DatePicker/DatePicker.js +41 -9
- package/public/components/Icon/Icon.d.ts +2 -0
- package/public/components/Icon/Icon.js +5 -1
- package/public/components/Modal/Modal.js +5 -1
- package/public/components/Select/Select.d.ts +1 -1
- package/public/components/Select/Select.js +3 -3
- package/public/css/styles.css +61 -0
- package/public/css/styles.min.css +1 -1
- package/public/css/styles.min.css.map +1 -1
- package/src/components/DatePicker/DatePicker.story.mdx +21 -0
- package/src/components/DatePicker/DatePicker.tsx +83 -14
- package/src/components/DatePicker/index.css +54 -0
- package/src/components/Icon/Icon.tsx +6 -0
- package/src/components/Modal/Modal.story.mdx +57 -0
- package/src/components/Modal/Modal.tsx +8 -2
- package/src/components/Select/Select.tsx +11 -3
package/package.json
CHANGED
|
@@ -42,10 +42,12 @@ exports.DatePickerInput = react_1.forwardRef((props, ref) => (react_1.default.cr
|
|
|
42
42
|
const renderDayContents = (day) => {
|
|
43
43
|
return (react_1.default.createElement(Text_1.Text, { as: "span", className: cn({ e: "day-text" }) }, day));
|
|
44
44
|
};
|
|
45
|
+
const CustomHeaderButtonNext = ({ onClick, disabled }) => (react_1.default.createElement(Button_1.Button, { className: "text-h5", icon: Icon_1.ICON_TYPE.CARET_RIGHT, variant: Button_1.BUTTON_VARIANT.MINIMAL, onClick: onClick, disabled: disabled }));
|
|
46
|
+
const CustomHeaderButtonPrev = ({ onClick, disabled }) => (react_1.default.createElement(Button_1.Button, { className: "text-h5", icon: Icon_1.ICON_TYPE.CARET_LEFT, variant: Button_1.BUTTON_VARIANT.MINIMAL, onClick: onClick, disabled: disabled }));
|
|
45
47
|
const CustomHeaderButtons = ({ decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled, }) => (react_1.default.createElement(Flex_1.Flex, { className: cn({ e: "month-btns-wrapper" }) },
|
|
46
|
-
react_1.default.createElement(
|
|
47
|
-
react_1.default.createElement(
|
|
48
|
-
const CustomHeader = ({ date, decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled, monthsShown, setHeaderProps, }) => {
|
|
48
|
+
react_1.default.createElement(CustomHeaderButtonPrev, { onClick: decreaseMonth, disabled: prevMonthButtonDisabled }),
|
|
49
|
+
react_1.default.createElement(CustomHeaderButtonNext, { onClick: increaseMonth, disabled: nextMonthButtonDisabled })));
|
|
50
|
+
const CustomHeader = ({ date, decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled, decreaseYear, increaseYear, prevYearButtonDisabled, nextYearButtonDisabled, monthsShown, setHeaderProps, showMonthYearPicker = false, }) => {
|
|
49
51
|
react_1.useEffect(() => {
|
|
50
52
|
if (monthsShown > 1) {
|
|
51
53
|
setHeaderProps({
|
|
@@ -54,6 +56,10 @@ const CustomHeader = ({ date, decreaseMonth, increaseMonth, prevMonthButtonDisab
|
|
|
54
56
|
increaseMonth,
|
|
55
57
|
prevMonthButtonDisabled,
|
|
56
58
|
nextMonthButtonDisabled,
|
|
59
|
+
decreaseYear,
|
|
60
|
+
increaseYear,
|
|
61
|
+
prevYearButtonDisabled,
|
|
62
|
+
nextYearButtonDisabled,
|
|
57
63
|
});
|
|
58
64
|
}
|
|
59
65
|
}, [
|
|
@@ -63,18 +69,39 @@ const CustomHeader = ({ date, decreaseMonth, increaseMonth, prevMonthButtonDisab
|
|
|
63
69
|
increaseMonth,
|
|
64
70
|
prevMonthButtonDisabled,
|
|
65
71
|
nextMonthButtonDisabled,
|
|
72
|
+
decreaseYear,
|
|
73
|
+
increaseYear,
|
|
74
|
+
prevYearButtonDisabled,
|
|
75
|
+
nextYearButtonDisabled,
|
|
66
76
|
setHeaderProps,
|
|
67
77
|
]);
|
|
68
78
|
if (monthsShown > 1) {
|
|
69
79
|
return null;
|
|
70
80
|
}
|
|
71
81
|
return (react_1.default.createElement(Flex_1.Flex, { className: cn({ e: "header" }) },
|
|
72
|
-
react_1.default.createElement(
|
|
73
|
-
|
|
82
|
+
react_1.default.createElement(CustomHeaderButtonPrev, { onClick: () => {
|
|
83
|
+
if (showMonthYearPicker) {
|
|
84
|
+
decreaseYear();
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
decreaseMonth();
|
|
88
|
+
}
|
|
89
|
+
}, disabled: showMonthYearPicker ? prevYearButtonDisabled : prevMonthButtonDisabled }),
|
|
90
|
+
react_1.default.createElement(Heading_1.Heading.H4, { className: cn({ e: "heading" }) }, showMonthYearPicker
|
|
91
|
+
? date_fns_1.format(date, "yyyy")
|
|
92
|
+
: date_fns_1.format(date, MONTH_YEAR_FORMAT)),
|
|
93
|
+
react_1.default.createElement(CustomHeaderButtonNext, { onClick: () => {
|
|
94
|
+
if (showMonthYearPicker) {
|
|
95
|
+
increaseYear();
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
increaseMonth();
|
|
99
|
+
}
|
|
100
|
+
}, disabled: showMonthYearPicker ? nextYearButtonDisabled : nextMonthButtonDisabled })));
|
|
74
101
|
};
|
|
75
|
-
const generateCustomHeaderRenderer = ({ monthsShown, setHeaderProps, }) => {
|
|
102
|
+
const generateCustomHeaderRenderer = ({ monthsShown, setHeaderProps, showMonthYearPicker = false, }) => {
|
|
76
103
|
return (customHeaderProps) => {
|
|
77
|
-
return (react_1.default.createElement(CustomHeader, Object.assign({}, customHeaderProps, { monthsShown: monthsShown, setHeaderProps: setHeaderProps })));
|
|
104
|
+
return (react_1.default.createElement(CustomHeader, Object.assign({}, customHeaderProps, { monthsShown: monthsShown, setHeaderProps: setHeaderProps, showMonthYearPicker: showMonthYearPicker })));
|
|
78
105
|
};
|
|
79
106
|
};
|
|
80
107
|
const checkHeaderPropsEquality = (prev, next) => {
|
|
@@ -86,6 +113,10 @@ const checkHeaderPropsEquality = (prev, next) => {
|
|
|
86
113
|
return false;
|
|
87
114
|
if (prev.nextMonthButtonDisabled !== next.nextMonthButtonDisabled)
|
|
88
115
|
return false;
|
|
116
|
+
if (prev.prevYearButtonDisabled !== next.prevYearButtonDisabled)
|
|
117
|
+
return false;
|
|
118
|
+
if (prev.nextYearButtonDisabled !== next.nextYearButtonDisabled)
|
|
119
|
+
return false;
|
|
89
120
|
return true;
|
|
90
121
|
};
|
|
91
122
|
const DAY_ABBREVIATIONS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
@@ -136,13 +167,14 @@ const getCalendarContainer = ({ inline, monthsShown, headerProps, calInstance, }
|
|
|
136
167
|
});
|
|
137
168
|
return ({ children, className }) => (react_1.default.createElement(PopoverMenu_1.PopoverMenu, { className: className }, children));
|
|
138
169
|
};
|
|
139
|
-
const UnwrappedDatePicker = ({ className, monthsShown = 1, calendarClassName, customInput = react_1.default.createElement(exports.DatePickerInput, null), onHeaderPropsUpdate, inline = false, popperModifiers, headerProps, rdpRef, ...rest }) => {
|
|
170
|
+
const UnwrappedDatePicker = ({ className, monthsShown = 1, calendarClassName, customInput = react_1.default.createElement(exports.DatePickerInput, null), onHeaderPropsUpdate, inline = false, popperModifiers, headerProps, rdpRef, showMonthYearPicker, ...rest }) => {
|
|
140
171
|
const isMultiMonth = monthsShown > 1;
|
|
141
172
|
const calInstance = rdpRef.current;
|
|
142
173
|
return (react_1.default.createElement(react_datepicker_1.default, Object.assign({ ref: rdpRef, className: classnames_1.default(cn(), className), calendarClassName: classnames_1.default(isMultiMonth && cn({ e: "calendar", m: "multi-month" }), calendarClassName), showPopperArrow: false, customInput: customInput, disabledKeyboardNavigation: true, renderDayContents: renderDayContents, renderCustomHeader: generateCustomHeaderRenderer({
|
|
143
174
|
monthsShown,
|
|
144
175
|
setHeaderProps: onHeaderPropsUpdate,
|
|
145
|
-
|
|
176
|
+
showMonthYearPicker,
|
|
177
|
+
}), showMonthYearPicker: showMonthYearPicker, monthsShown: monthsShown, calendarContainer: getCalendarContainer({
|
|
146
178
|
inline,
|
|
147
179
|
monthsShown,
|
|
148
180
|
headerProps,
|
|
@@ -42,6 +42,7 @@ export declare enum ICON_TYPE {
|
|
|
42
42
|
COG = "cog",
|
|
43
43
|
COLUMNS = "columns",
|
|
44
44
|
COMMENT_ALT = "comment-alt",
|
|
45
|
+
COMPASS = "compass",
|
|
45
46
|
COMPRESS = "compress",
|
|
46
47
|
CROWN = "crown",
|
|
47
48
|
ELLIPSIS_H = "ellipsis-h",
|
|
@@ -108,6 +109,7 @@ export declare enum ICON_TYPE {
|
|
|
108
109
|
TH_LARGE = "th-large",
|
|
109
110
|
THUMBS_DOWN = "thumbs-down",
|
|
110
111
|
THUMBS_UP = "thumbs-up",
|
|
112
|
+
TOOLS = "tools",
|
|
111
113
|
TRASH = "trash",
|
|
112
114
|
UNLOCK = "unlock",
|
|
113
115
|
USER = "user",
|
|
@@ -69,6 +69,7 @@ const faClock_2 = require("@fortawesome/free-solid-svg-icons/faClock");
|
|
|
69
69
|
const faCog_1 = require("@fortawesome/free-solid-svg-icons/faCog");
|
|
70
70
|
const faColumns_1 = require("@fortawesome/free-solid-svg-icons/faColumns");
|
|
71
71
|
const faCommentAlt_1 = require("@fortawesome/free-solid-svg-icons/faCommentAlt");
|
|
72
|
+
const faCompass_1 = require("@fortawesome/free-solid-svg-icons/faCompass");
|
|
72
73
|
const faCompress_1 = require("@fortawesome/free-solid-svg-icons/faCompress");
|
|
73
74
|
const faCrown_1 = require("@fortawesome/free-solid-svg-icons/faCrown");
|
|
74
75
|
const faEllipsisH_1 = require("@fortawesome/free-solid-svg-icons/faEllipsisH");
|
|
@@ -134,6 +135,7 @@ const faThumbsUp_2 = require("@fortawesome/free-solid-svg-icons/faThumbsUp");
|
|
|
134
135
|
const faTicketAlt_1 = require("@fortawesome/free-solid-svg-icons/faTicketAlt");
|
|
135
136
|
const faTimes_1 = require("@fortawesome/free-solid-svg-icons/faTimes");
|
|
136
137
|
const faTimesCircle_2 = require("@fortawesome/free-solid-svg-icons/faTimesCircle");
|
|
138
|
+
const faTools_1 = require("@fortawesome/free-solid-svg-icons/faTools");
|
|
137
139
|
const faTrash_1 = require("@fortawesome/free-solid-svg-icons/faTrash");
|
|
138
140
|
const faUnlock_1 = require("@fortawesome/free-solid-svg-icons/faUnlock");
|
|
139
141
|
const faUser_2 = require("@fortawesome/free-solid-svg-icons/faUser");
|
|
@@ -147,7 +149,7 @@ const status_1 = require("../../contexts/status");
|
|
|
147
149
|
const types_1 = require("../../types");
|
|
148
150
|
const utilities_1 = require("../../utilities");
|
|
149
151
|
const cn = utilities_1.bemHOF("Icon");
|
|
150
|
-
fontawesome_svg_core_1.library.add(faArchive_1.faArchive, faArrowDown_1.faArrowDown, faArrowLeft_1.faArrowLeft, faArrowRight_1.faArrowRight, faArrowUp_1.faArrowUp, faBackward_1.faBackward, faBan_1.faBan, faBatteryHalf_1.faBatteryHalf, faBed_1.faBed, faBell_1.faBell, faBolt_1.faBolt, faCalculator_1.faCalculator, faCalendar_1.faCalendar, faCaretDown_1.faCaretDown, faCaretLeft_1.faCaretLeft, faCaretRight_1.faCaretRight, faCaretUp_1.faCaretUp, faChartLine_1.faChartLine, faCheck_1.faCheck, faCheckCircle_2.faCheckCircle, faCheckCircle_1.faCheckCircle, faChevronDown_1.faChevronDown, faChevronLeft_1.faChevronLeft, faChevronRight_1.faChevronRight, faChevronUp_1.faChevronUp, faCircle_2.faCircle, faCircleNotch_1.faCircleNotch, faCircle_1.faCircle, faClipboard_1.faClipboard, faClock_1.faClock, faClock_2.faClock, faCog_1.faCog, faColumns_1.faColumns, faCommentAlt_1.faCommentAlt, faCompress_1.faCompress, faCrown_1.faCrown, faEllipsisH_1.faEllipsisH, faEllipsisV_1.faEllipsisV, faEnvelope_1.faEnvelope, faExclamationCircle_1.faExclamationCircle, faExclamationTriangle_1.faExclamationTriangle, faExpand_1.faExpand, faExternalLinkAlt_1.faExternalLinkAlt, faExternalLinkSquareAlt_1.faExternalLinkSquareAlt, faEye_1.faEye, faEyeSlash_1.faEyeSlash, faFastBackward_1.faFastBackward, faFastForward_1.faFastForward, faFileAlt_1.faFileAlt, faFileAlt_2.faFileAlt, faFileImport_1.faFileImport, faFileSignature_1.faFileSignature, faFilter_1.faFilter, faFlag_1.faFlag, faFolder_1.faFolder, faForward_1.faForward, faGripLines_1.faGripLines, faGripLinesVertical_1.faGripLinesVertical, faHashtag_1.faHashtag, faInfoCircle_1.faInfoCircle, faKey_1.faKey, faKeyboard_1.faKeyboard, faLayerGroup_1.faLayerGroup, faLevelUpAlt_1.faLevelUpAlt, faListUl_1.faListUl, faLock_1.faLock, faLongArrowAltRight_1.faLongArrowAltRight, faMagic_1.faMagic, faMapSigns_1.faMapSigns, faMinus_1.faMinus, faMousePointer_1.faMousePointer, faPaperclip_1.faPaperclip, faPause_1.faPause, faPen_1.faPen, faPlay_1.faPlay, faPlus_1.faPlus, faPlusCircle_1.faPlusCircle, faPooStorm_1.faPooStorm, faQuestion_1.faQuestion, faQuestionCircle_2.faQuestionCircle, faQuestionCircle_1.faQuestionCircle, faScroll_1.faScroll, faSearch_1.faSearch, faShareAlt_1.faShareAlt, faShieldAlt_1.faShieldAlt, faSignOutAlt_1.faSignOutAlt, faSignature_1.faSignature, faSlidersH_1.faSlidersH, faSort_1.faSort, faSortDown_1.faSortDown, faSortUp_1.faSortUp, faSpinner_1.faSpinner, faSquare_1.faSquare, faStar_1.faStar, faStar_2.faStar, faSync_1.faSync, faTasks_1.faTasks, faThLarge_1.faThLarge, faThumbsDown_1.faThumbsDown, faThumbsDown_2.faThumbsDown, faThumbsUp_1.faThumbsUp, faThumbsUp_2.faThumbsUp, faTicketAlt_1.faTicketAlt, faTimes_1.faTimes, faTimesCircle_1.faTimesCircle, faTimesCircle_2.faTimesCircle, faTrash_1.faTrash, faUnlock_1.faUnlock, faUser_2.faUser, faUserAstronaut_1.faUserAstronaut, faUserPlus_1.faUserPlus, faUser_1.faUser, faUsers_1.faUsers, faUserFriends_1.faUserFriends, faUserShield_1.faUserShield);
|
|
152
|
+
fontawesome_svg_core_1.library.add(faArchive_1.faArchive, faArrowDown_1.faArrowDown, faArrowLeft_1.faArrowLeft, faArrowRight_1.faArrowRight, faArrowUp_1.faArrowUp, faBackward_1.faBackward, faBan_1.faBan, faBatteryHalf_1.faBatteryHalf, faBed_1.faBed, faBell_1.faBell, faBolt_1.faBolt, faCalculator_1.faCalculator, faCalendar_1.faCalendar, faCaretDown_1.faCaretDown, faCaretLeft_1.faCaretLeft, faCaretRight_1.faCaretRight, faCaretUp_1.faCaretUp, faChartLine_1.faChartLine, faCheck_1.faCheck, faCheckCircle_2.faCheckCircle, faCheckCircle_1.faCheckCircle, faChevronDown_1.faChevronDown, faChevronLeft_1.faChevronLeft, faChevronRight_1.faChevronRight, faChevronUp_1.faChevronUp, faCircle_2.faCircle, faCircleNotch_1.faCircleNotch, faCircle_1.faCircle, faClipboard_1.faClipboard, faClock_1.faClock, faClock_2.faClock, faCog_1.faCog, faColumns_1.faColumns, faCommentAlt_1.faCommentAlt, faCompass_1.faCompass, faCompress_1.faCompress, faCrown_1.faCrown, faEllipsisH_1.faEllipsisH, faEllipsisV_1.faEllipsisV, faEnvelope_1.faEnvelope, faExclamationCircle_1.faExclamationCircle, faExclamationTriangle_1.faExclamationTriangle, faExpand_1.faExpand, faExternalLinkAlt_1.faExternalLinkAlt, faExternalLinkSquareAlt_1.faExternalLinkSquareAlt, faEye_1.faEye, faEyeSlash_1.faEyeSlash, faFastBackward_1.faFastBackward, faFastForward_1.faFastForward, faFileAlt_1.faFileAlt, faFileAlt_2.faFileAlt, faFileImport_1.faFileImport, faFileSignature_1.faFileSignature, faFilter_1.faFilter, faFlag_1.faFlag, faFolder_1.faFolder, faForward_1.faForward, faGripLines_1.faGripLines, faGripLinesVertical_1.faGripLinesVertical, faHashtag_1.faHashtag, faInfoCircle_1.faInfoCircle, faKey_1.faKey, faKeyboard_1.faKeyboard, faLayerGroup_1.faLayerGroup, faLevelUpAlt_1.faLevelUpAlt, faListUl_1.faListUl, faLock_1.faLock, faLongArrowAltRight_1.faLongArrowAltRight, faMagic_1.faMagic, faMapSigns_1.faMapSigns, faMinus_1.faMinus, faMousePointer_1.faMousePointer, faPaperclip_1.faPaperclip, faPause_1.faPause, faPen_1.faPen, faPlay_1.faPlay, faPlus_1.faPlus, faPlusCircle_1.faPlusCircle, faPooStorm_1.faPooStorm, faQuestion_1.faQuestion, faQuestionCircle_2.faQuestionCircle, faQuestionCircle_1.faQuestionCircle, faScroll_1.faScroll, faSearch_1.faSearch, faShareAlt_1.faShareAlt, faShieldAlt_1.faShieldAlt, faSignOutAlt_1.faSignOutAlt, faSignature_1.faSignature, faSlidersH_1.faSlidersH, faSort_1.faSort, faSortDown_1.faSortDown, faSortUp_1.faSortUp, faSpinner_1.faSpinner, faSquare_1.faSquare, faStar_1.faStar, faStar_2.faStar, faSync_1.faSync, faTasks_1.faTasks, faThLarge_1.faThLarge, faThumbsDown_1.faThumbsDown, faThumbsDown_2.faThumbsDown, faThumbsUp_1.faThumbsUp, faThumbsUp_2.faThumbsUp, faTicketAlt_1.faTicketAlt, faTimes_1.faTimes, faTimesCircle_1.faTimesCircle, faTimesCircle_2.faTimesCircle, faTools_1.faTools, faTrash_1.faTrash, faUnlock_1.faUnlock, faUser_2.faUser, faUserAstronaut_1.faUserAstronaut, faUserPlus_1.faUserPlus, faUser_1.faUser, faUsers_1.faUsers, faUserFriends_1.faUserFriends, faUserShield_1.faUserShield);
|
|
151
153
|
var CUSTOM_ICON_TYPE;
|
|
152
154
|
(function (CUSTOM_ICON_TYPE) {
|
|
153
155
|
CUSTOM_ICON_TYPE["ARROW_TO_BOTTOM"] = "arrow-to-bottom";
|
|
@@ -200,6 +202,7 @@ var ICON_TYPE;
|
|
|
200
202
|
ICON_TYPE["COG"] = "cog";
|
|
201
203
|
ICON_TYPE["COLUMNS"] = "columns";
|
|
202
204
|
ICON_TYPE["COMMENT_ALT"] = "comment-alt";
|
|
205
|
+
ICON_TYPE["COMPASS"] = "compass";
|
|
203
206
|
ICON_TYPE["COMPRESS"] = "compress";
|
|
204
207
|
ICON_TYPE["CROWN"] = "crown";
|
|
205
208
|
ICON_TYPE["ELLIPSIS_H"] = "ellipsis-h";
|
|
@@ -266,6 +269,7 @@ var ICON_TYPE;
|
|
|
266
269
|
ICON_TYPE["TH_LARGE"] = "th-large";
|
|
267
270
|
ICON_TYPE["THUMBS_DOWN"] = "thumbs-down";
|
|
268
271
|
ICON_TYPE["THUMBS_UP"] = "thumbs-up";
|
|
272
|
+
ICON_TYPE["TOOLS"] = "tools";
|
|
269
273
|
ICON_TYPE["TRASH"] = "trash";
|
|
270
274
|
ICON_TYPE["UNLOCK"] = "unlock";
|
|
271
275
|
ICON_TYPE["USER"] = "user";
|
|
@@ -94,8 +94,12 @@ const Modal = (props) => {
|
|
|
94
94
|
const { title, secondaryTitle, description, children, isOpen, onClose, autoFocus = false, disableOutsideClick = true, disableEscClose = false, hideCloseButton = false, size = MODAL_SIZE.DEFAULT, center = false, noHeader = false, className, ...rest } = props;
|
|
95
95
|
const modalElement = react_1.useRef(null);
|
|
96
96
|
const showHeader = title || secondaryTitle || !hideCloseButton;
|
|
97
|
+
const [esc, setEsc] = react_1.useState(disableEscClose);
|
|
98
|
+
react_1.useEffect(() => {
|
|
99
|
+
setEsc(disableEscClose);
|
|
100
|
+
}, [disableEscClose]);
|
|
97
101
|
hooks_1.useKeyPress(types_1.KEY_CODE.ESC, () => {
|
|
98
|
-
if (!
|
|
102
|
+
if (!esc && onClose) {
|
|
99
103
|
onClose();
|
|
100
104
|
}
|
|
101
105
|
});
|
|
@@ -20,7 +20,7 @@ export declare type SelectBaseProps = ({
|
|
|
20
20
|
} & SelectAsyncProps);
|
|
21
21
|
declare const Select: {
|
|
22
22
|
(props: SelectProps): JSX.Element;
|
|
23
|
-
Creatable: (
|
|
23
|
+
Creatable: ({ createOptionPosition, ...rest }: SelectCreatableProps) => JSX.Element;
|
|
24
24
|
Async: (props: SelectAsyncProps) => JSX.Element;
|
|
25
25
|
};
|
|
26
26
|
export { Select };
|
|
@@ -126,15 +126,15 @@ const SelectBase = ({ variant: variantProp = types_1.STATUS_VARIANT.DEFAULT, id:
|
|
|
126
126
|
return (react_1.default.createElement(async_1.default, Object.assign({ className: getClassNames(className, variant), id: id }, rest, hardcodedProps)));
|
|
127
127
|
}
|
|
128
128
|
if (rest.type === "creatable") {
|
|
129
|
-
return (react_1.default.createElement(creatable_1.default, Object.assign({ className: getClassNames(className, variant), id: id }, rest, hardcodedProps
|
|
129
|
+
return (react_1.default.createElement(creatable_1.default, Object.assign({ className: getClassNames(className, variant), id: id }, rest, hardcodedProps)));
|
|
130
130
|
}
|
|
131
131
|
return (react_1.default.createElement(react_select_1.default, Object.assign({ className: getClassNames(className, variant), id: id }, rest, hardcodedProps)));
|
|
132
132
|
};
|
|
133
133
|
const SelectAsync = (props) => {
|
|
134
134
|
return react_1.default.createElement(SelectBase, Object.assign({}, props, { type: "async" }));
|
|
135
135
|
};
|
|
136
|
-
const SelectCreatable = (
|
|
137
|
-
return react_1.default.createElement(SelectBase, Object.assign({},
|
|
136
|
+
const SelectCreatable = ({ createOptionPosition = "first", ...rest }) => {
|
|
137
|
+
return (react_1.default.createElement(SelectBase, Object.assign({ createOptionPosition: createOptionPosition }, rest, { type: "creatable" })));
|
|
138
138
|
};
|
|
139
139
|
const Select = (props) => {
|
|
140
140
|
return react_1.default.createElement(SelectBase, Object.assign({}, props, { type: "default" }));
|
package/public/css/styles.css
CHANGED
|
@@ -3376,6 +3376,63 @@ override built-in Image component classes */
|
|
|
3376
3376
|
margin: 8px;
|
|
3377
3377
|
}
|
|
3378
3378
|
|
|
3379
|
+
.react-datepicker__month-container {
|
|
3380
|
+
width: 288px;
|
|
3381
|
+
}
|
|
3382
|
+
|
|
3383
|
+
.react-datepicker__monthPicker {
|
|
3384
|
+
display: flex;
|
|
3385
|
+
flex-direction: column;
|
|
3386
|
+
gap: 8px;
|
|
3387
|
+
}
|
|
3388
|
+
|
|
3389
|
+
.react-datepicker__month-wrapper {
|
|
3390
|
+
display: grid;
|
|
3391
|
+
gap: 8px;
|
|
3392
|
+
|
|
3393
|
+
grid-template-columns: repeat(3, 1fr);
|
|
3394
|
+
}
|
|
3395
|
+
|
|
3396
|
+
.react-datepicker__month .react-datepicker__month-text {
|
|
3397
|
+
margin: 0;
|
|
3398
|
+
display: flex;
|
|
3399
|
+
width: 80px;
|
|
3400
|
+
}
|
|
3401
|
+
|
|
3402
|
+
.react-datepicker__month-text {
|
|
3403
|
+
height: 36px;
|
|
3404
|
+
align-items: center;
|
|
3405
|
+
justify-content: center;
|
|
3406
|
+
border-radius: 4px;
|
|
3407
|
+
--tw-bg-opacity: 1;
|
|
3408
|
+
background-color: rgb(244 247 249 / var(--tw-bg-opacity));
|
|
3409
|
+
font-size: 12px;
|
|
3410
|
+
font-weight: 500;
|
|
3411
|
+
line-height: 1;
|
|
3412
|
+
--tw-text-opacity: 1;
|
|
3413
|
+
color: rgb(71 104 125 / var(--tw-text-opacity));
|
|
3414
|
+
transition-property: color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;
|
|
3415
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
|
|
3416
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;
|
|
3417
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
3418
|
+
transition-duration: 150ms;
|
|
3419
|
+
}
|
|
3420
|
+
|
|
3421
|
+
.react-datepicker__month-text.react-datepicker__month--disabled {
|
|
3422
|
+
--tw-bg-opacity: 0.5;
|
|
3423
|
+
--tw-text-opacity: 1;
|
|
3424
|
+
color: rgb(134 163 181 / var(--tw-text-opacity));
|
|
3425
|
+
}
|
|
3426
|
+
|
|
3427
|
+
.react-datepicker__month-text:hover, .react-datepicker__month-text:active, .react-datepicker__month-text:focus, .react-datepicker__month-text.react-datepicker__month--selected, .react-datepicker__month-text.react-datepicker__month--selected:hover, .react-datepicker__month-text.react-datepicker__month--selected:active, .react-datepicker__month-text.react-datepicker__month--selected:focus {
|
|
3428
|
+
border-width: 1px;
|
|
3429
|
+
--tw-border-opacity: 1;
|
|
3430
|
+
border-color: rgb(51 198 159 / var(--tw-border-opacity));
|
|
3431
|
+
background-color: rgb(51 198 159 / .15);
|
|
3432
|
+
--tw-text-opacity: 1;
|
|
3433
|
+
color: rgb(32 65 86 / var(--tw-text-opacity));
|
|
3434
|
+
}
|
|
3435
|
+
|
|
3379
3436
|
.ads-DateRangePicker {
|
|
3380
3437
|
display: inline-flex;
|
|
3381
3438
|
}
|
|
@@ -8594,6 +8651,10 @@ override built-in Image component classes */
|
|
|
8594
8651
|
font-size: 11px;
|
|
8595
8652
|
}
|
|
8596
8653
|
|
|
8654
|
+
.text-h5 {
|
|
8655
|
+
font-size: 12px;
|
|
8656
|
+
}
|
|
8657
|
+
|
|
8597
8658
|
.text-bodySm {
|
|
8598
8659
|
font-size: 12px;
|
|
8599
8660
|
}
|