cr-ui-lib 1.1.117 → 1.1.119
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/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -254,9 +254,10 @@ declare type SingleSelectDropdownProps = {
|
|
|
254
254
|
selectedColorDropdownItem?: string;
|
|
255
255
|
uniqueSearch?: boolean;
|
|
256
256
|
emptyMessageClass?: string;
|
|
257
|
+
marginTopDropdown?: number;
|
|
257
258
|
};
|
|
258
259
|
declare function SingleSelectDropdown({ label, value, onChange, options, placeholder, onScrollToEnd, onSearch, hasMore, isLoading, searchable, searchDebounceMs, requiresSearch, minSearchLength, emptyMessage, loadingMessage, searchPlaceholder, disabled, hasIcon, buttonClass, labelClass, displayItemClass, displayMainClass, hasSearchIcon, searchInputClass, placeholderSearchClass, usePortal, // default true
|
|
259
|
-
iconClass, placeholderClass, displayContainerClass, selectedColorDropdownItem, uniqueSearch, emptyMessageClass, }: SingleSelectDropdownProps): JSX.Element;
|
|
260
|
+
iconClass, placeholderClass, displayContainerClass, selectedColorDropdownItem, uniqueSearch, emptyMessageClass, marginTopDropdown }: SingleSelectDropdownProps): JSX.Element;
|
|
260
261
|
|
|
261
262
|
interface SelectionButton {
|
|
262
263
|
data: string[];
|
package/dist/index.d.ts
CHANGED
|
@@ -254,9 +254,10 @@ declare type SingleSelectDropdownProps = {
|
|
|
254
254
|
selectedColorDropdownItem?: string;
|
|
255
255
|
uniqueSearch?: boolean;
|
|
256
256
|
emptyMessageClass?: string;
|
|
257
|
+
marginTopDropdown?: number;
|
|
257
258
|
};
|
|
258
259
|
declare function SingleSelectDropdown({ label, value, onChange, options, placeholder, onScrollToEnd, onSearch, hasMore, isLoading, searchable, searchDebounceMs, requiresSearch, minSearchLength, emptyMessage, loadingMessage, searchPlaceholder, disabled, hasIcon, buttonClass, labelClass, displayItemClass, displayMainClass, hasSearchIcon, searchInputClass, placeholderSearchClass, usePortal, // default true
|
|
259
|
-
iconClass, placeholderClass, displayContainerClass, selectedColorDropdownItem, uniqueSearch, emptyMessageClass, }: SingleSelectDropdownProps): JSX.Element;
|
|
260
|
+
iconClass, placeholderClass, displayContainerClass, selectedColorDropdownItem, uniqueSearch, emptyMessageClass, marginTopDropdown }: SingleSelectDropdownProps): JSX.Element;
|
|
260
261
|
|
|
261
262
|
interface SelectionButton {
|
|
262
263
|
data: string[];
|
package/dist/index.js
CHANGED
|
@@ -2315,6 +2315,13 @@ var DateRangePicker = ({
|
|
|
2315
2315
|
}
|
|
2316
2316
|
};
|
|
2317
2317
|
const handleDateClick = (date, isLeftCalendar) => {
|
|
2318
|
+
if (startDate !== null && endDate !== null && startDate === date) {
|
|
2319
|
+
setEndDate(date);
|
|
2320
|
+
}
|
|
2321
|
+
if (startDate !== null && endDate === null && isLeftCalendar) {
|
|
2322
|
+
setEndDate(date);
|
|
2323
|
+
return;
|
|
2324
|
+
}
|
|
2318
2325
|
if (startDate !== null && endDate === null && isLeftCalendar || startDate !== null && endDate !== null && (startDate == null ? void 0 : startDate.getTime()) === (endDate == null ? void 0 : endDate.getTime()) && isLeftCalendar) {
|
|
2319
2326
|
setStartDate(null);
|
|
2320
2327
|
setEndDate(null);
|
|
@@ -3502,7 +3509,8 @@ function SingleSelectDropdown({
|
|
|
3502
3509
|
displayContainerClass = "",
|
|
3503
3510
|
selectedColorDropdownItem = "text-[#131414]",
|
|
3504
3511
|
uniqueSearch = false,
|
|
3505
|
-
emptyMessageClass = "px-2 py-2 text-sm text-gray-500"
|
|
3512
|
+
emptyMessageClass = "px-2 py-2 text-sm text-gray-500",
|
|
3513
|
+
marginTopDropdown = 4
|
|
3506
3514
|
}) {
|
|
3507
3515
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
3508
3516
|
const [searchTerm, setSearchTerm] = React.useState("");
|
|
@@ -3648,7 +3656,7 @@ function SingleSelectDropdown({
|
|
|
3648
3656
|
ref: portalRef,
|
|
3649
3657
|
style: usePortal ? {
|
|
3650
3658
|
position: "absolute",
|
|
3651
|
-
top: `${dropdownPosition.top +
|
|
3659
|
+
top: `${dropdownPosition.top + marginTopDropdown}px`,
|
|
3652
3660
|
left: `${dropdownPosition.left}px`,
|
|
3653
3661
|
width: `${dropdownPosition.width}px`,
|
|
3654
3662
|
// Add a zIndex to ensure it floats above other content
|
|
@@ -3657,7 +3665,7 @@ function SingleSelectDropdown({
|
|
|
3657
3665
|
position: "absolute",
|
|
3658
3666
|
top: "100%",
|
|
3659
3667
|
left: 0,
|
|
3660
|
-
marginTop:
|
|
3668
|
+
marginTop: `${marginTopDropdown}px`,
|
|
3661
3669
|
width: "100%",
|
|
3662
3670
|
zIndex: 99
|
|
3663
3671
|
},
|