bianic-ui 1.16.0-beta.1 → 1.16.0-beta.3
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/cjs/index.js +13 -12
- package/dist/cjs/lib.css +1 -1
- package/dist/cjs/types/components/Forms/DatePicker/DatePicker.d.ts +3 -2
- package/dist/cjs/types/stories/Form/LiveSearch/LivesearchCustomDropdownExample.stories.d.ts +3 -0
- package/dist/esm/index.js +13 -12
- package/dist/esm/lib.css +1 -1
- package/dist/esm/types/components/Forms/DatePicker/DatePicker.d.ts +3 -2
- package/dist/esm/types/stories/Form/LiveSearch/LivesearchCustomDropdownExample.stories.d.ts +3 -0
- package/dist/index.d.ts +3 -2
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -443,10 +443,10 @@ var minWidthConfig$1 = {
|
|
|
443
443
|
tn: 'min-w-[64px]',
|
|
444
444
|
};
|
|
445
445
|
var iconOnlySizeConfig$1 = {
|
|
446
|
-
lg: 'py-[13px] h-[48px]
|
|
446
|
+
lg: 'py-[13px] h-[48px] w-[48px] flex items-center justify-center gap-[10px]',
|
|
447
447
|
md: 'py-[11px] h-[40px] w-[40px] flex items-center justify-center gap-[5px]',
|
|
448
|
-
sm: 'py-[8px] h-[30px]
|
|
449
|
-
tn: 'py-[4px] h-[22px]
|
|
448
|
+
sm: 'py-[8px] h-[30px] w-[30px] flex items-center justify-center gap-[5px] ',
|
|
449
|
+
tn: 'py-[4px] h-[22px] w-[22px] flex items-center justify-center gap-[3px]',
|
|
450
450
|
};
|
|
451
451
|
var shadow = 'shadow-[0px_6px_18px_1px_rgba(188,199,237,0.5)] disabled:shadow-none active:shadow-none';
|
|
452
452
|
var variantConfig$2 = {
|
|
@@ -2401,10 +2401,11 @@ var getDropdownStyle = function (anchorRef, dropdownRef) {
|
|
|
2401
2401
|
// AND space above is more than space below
|
|
2402
2402
|
// then flip up
|
|
2403
2403
|
if (spaceToBottom < dropdownHeight && spaceToTop > spaceToBottom) {
|
|
2404
|
-
|
|
2404
|
+
var topPositionForFlip = anchorRect.top + window.scrollY - dropdownHeight;
|
|
2405
|
+
style.bottom = "".concat(topPositionForFlip, "px");
|
|
2405
2406
|
}
|
|
2406
2407
|
else {
|
|
2407
|
-
style.top = "".concat(anchorRect.bottom, "px");
|
|
2408
|
+
style.top = "".concat(anchorRect.bottom + window.scrollY, "px");
|
|
2408
2409
|
}
|
|
2409
2410
|
return style;
|
|
2410
2411
|
};
|
|
@@ -2595,7 +2596,7 @@ var processRenderedChildren = function (children, searchTerm, searchVariant, han
|
|
|
2595
2596
|
var useLiveSearch = function (_a) {
|
|
2596
2597
|
var value = _a.value, setValue = _a.setValue, onChangeText = _a.onChangeText, dropContOnClickItem = _a.dropContOnClickItem;
|
|
2597
2598
|
var _b = React.useState(false), isOpen = _b[0], setIsOpen = _b[1];
|
|
2598
|
-
var _c = React.useState(
|
|
2599
|
+
var _c = React.useState(getItemLabel(value)), searchTerm = _c[0], setSearchTerm = _c[1];
|
|
2599
2600
|
React.useEffect(function () {
|
|
2600
2601
|
if (!isOpen && searchTerm !== '') {
|
|
2601
2602
|
setSearchTerm(getItemLabel(value));
|
|
@@ -3152,15 +3153,15 @@ var displayDateFormatter = function (date) {
|
|
|
3152
3153
|
};
|
|
3153
3154
|
|
|
3154
3155
|
function DatePicker(_a) {
|
|
3155
|
-
var
|
|
3156
|
+
var value = _a.value, onChange = _a.onChange, size = _a.size, disabled = _a.disabled; _a.placeholder; var label = _a.label, minDate = _a.minDate, maxDate = _a.maxDate, required = _a.required, nullDisplay = _a.nullDisplay, inputclassName = _a.inputclassName, containerClassName = _a.containerClassName;
|
|
3156
3157
|
// State and Ref
|
|
3157
3158
|
var inputRef = React.useRef(null);
|
|
3158
3159
|
var wrapperRef = React.useRef(null);
|
|
3159
3160
|
var pickerRef = React.useRef(null);
|
|
3160
3161
|
var _c = useDetectOutsideClick(wrapperRef, false, pickerRef), isPickerOpen = _c[0], setIsPickerOpen = _c[1];
|
|
3161
|
-
return (React.createElement("div", { className: "bianic-datepicker-container relative", ref: wrapperRef },
|
|
3162
|
+
return (React.createElement("div", { className: "bianic-datepicker-container relative ".concat(containerClassName), ref: wrapperRef },
|
|
3162
3163
|
React.createElement("div", { className: "bianic-datepicker-field-container" },
|
|
3163
|
-
React.createElement(DateInputDisplay, { inputClassName:
|
|
3164
|
+
React.createElement(DateInputDisplay, { inputClassName: inputclassName, value: value, setValue: onChange, placeholder: "YYYY-MM-DD", nullDisplay: nullDisplay, size: size, label: label, required: required, buttonAction: function () { return setIsPickerOpen(!isPickerOpen); }, ref: inputRef, disabled: disabled })),
|
|
3164
3165
|
isPickerOpen && (React.createElement("div", { className: "bianic-datepicker-calendar-container absolute left-0 w-[250px] rounded-b-radius-sm bg-bia-white px-1.5 pb-[17px] pt-[15px] shadow-md" },
|
|
3165
3166
|
React.createElement(PickerCalendar, { selectedDate: value, onDateChange: onChange, ref: pickerRef, minDate: minDate, maxDate: maxDate })))));
|
|
3166
3167
|
}
|
|
@@ -3406,7 +3407,7 @@ function Modal(_a) {
|
|
|
3406
3407
|
|
|
3407
3408
|
var sizeConfig$2 = {
|
|
3408
3409
|
md: 'min-w-[38px] h-[40px] text-[14px] font-semibold',
|
|
3409
|
-
sm: 'min-w-[29px] h-[30px]
|
|
3410
|
+
sm: 'min-w-[29px] h-[30px] text-[12px] font-normal',
|
|
3410
3411
|
};
|
|
3411
3412
|
var positionConfig = {
|
|
3412
3413
|
start: 'justify-start',
|
|
@@ -3454,8 +3455,8 @@ function PaginationBar(_a) {
|
|
|
3454
3455
|
};
|
|
3455
3456
|
return (React.createElement("div", { className: "flex ".concat(positionConfig[position], " gap-[5px]") },
|
|
3456
3457
|
React.createElement(Button, { variant: "subtle-link", size: size, type: "button", onClick: function () { return handlePageChange(currentPage - 1); }, className: "cursor-pointer", iconLeft: React.createElement(TbChevronLeft, { size: iconSize }), disabled: currentPage === 1 }),
|
|
3457
|
-
showedPages.map(function (page) { return (React.createElement(Button, { key: page, variant: currentPage === page ? 'default' : 'subtle
|
|
3458
|
-
React.createElement(Button, { variant: "subtle-link", size:
|
|
3458
|
+
showedPages.map(function (page) { return (React.createElement(Button, { key: page, variant: currentPage === page ? 'default' : 'subtle', size: size, type: "button", onClick: function () { return handlePageChange(page); }, className: "cursor-pointer ".concat(sizeConfig$2[size]), label: page.toString(), minWidth: buttonSizingStyle })); }),
|
|
3459
|
+
React.createElement(Button, { variant: "subtle-link", size: size, type: "button", onClick: function () { return handlePageChange(currentPage + 1); }, className: "cursor-pointer", iconLeft: React.createElement(TbChevronRight, { size: iconSize }), disabled: currentPage === totalPages })));
|
|
3459
3460
|
}
|
|
3460
3461
|
|
|
3461
3462
|
var activeConfig = {
|