bianic-ui 2.1.0-beta.0 → 2.1.0-beta.1
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/README.md +49 -49
- package/dist/cjs/index.js +39 -26
- package/dist/cjs/lib.css +1 -1
- package/dist/cjs/types/components/Forms/LiveSearch/Example/CustomDropdown.d.ts +1 -0
- package/dist/cjs/types/components/Forms/LiveSearch/index.d.ts +1 -1
- package/dist/cjs/types/components/Forms/LiveSearch/types/index.d.ts +1 -0
- package/dist/cjs/types/components/Forms/SelectInput/PropsInterface.d.ts +1 -0
- package/dist/cjs/types/components/Forms/SelectInput/index.d.ts +1 -1
- package/dist/cjs/types/components/Menu/MenuItem.d.ts +2 -1
- package/dist/cjs/types/stories/Form/LiveSearch/LivesearchCustomDropdownExample.stories.d.ts +1 -1
- package/dist/esm/index.js +39 -26
- package/dist/esm/lib.css +1 -1
- package/dist/esm/types/components/Forms/LiveSearch/Example/CustomDropdown.d.ts +1 -0
- package/dist/esm/types/components/Forms/LiveSearch/index.d.ts +1 -1
- package/dist/esm/types/components/Forms/LiveSearch/types/index.d.ts +1 -0
- package/dist/esm/types/components/Forms/SelectInput/PropsInterface.d.ts +1 -0
- package/dist/esm/types/components/Forms/SelectInput/index.d.ts +1 -1
- package/dist/esm/types/components/Menu/MenuItem.d.ts +2 -1
- package/dist/esm/types/stories/Form/LiveSearch/LivesearchCustomDropdownExample.stories.d.ts +1 -1
- package/dist/index.d.ts +6 -3
- package/package.json +97 -97
- package/src/style/color.css +627 -627
- package/src/style/scrollbar.css +78 -78
- package/tailwind.config.js +543 -543
package/README.md
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
# Bianic 2.0
|
|
2
|
-
|
|
3
|
-
DLS designed by BIAENERGI
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
### First Installation
|
|
8
|
-
|
|
9
|
-
`npm i bianic-ui`
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
After Bianic-Ui succesfully installed, you can call the component using JSX tag declaration style ex: `<Alert />`. Futher documentation about component can be access [here](https://ristek.link/bianic-dev-docs)
|
|
14
|
-
|
|
15
|
-
## Support
|
|
16
|
-
|
|
17
|
-
If you found any bug, please contact at [devbiaenergi@gmail.com](mailto:devbiaenergi@gmail.com)
|
|
18
|
-
|
|
19
|
-
## Contributing
|
|
20
|
-
|
|
21
|
-
If you're interested in contributing to Bianic-Ui, please contact our team at [devbiaenergi@gmail.com](mailto:devbiaenergi@gmail.com)
|
|
22
|
-
|
|
23
|
-
## Change Log
|
|
24
|
-
|
|
25
|
-
Coming soon
|
|
26
|
-
|
|
27
|
-
## Development Notes
|
|
28
|
-
|
|
29
|
-
### Code Convention
|
|
30
|
-
|
|
31
|
-
- Always separate style with tsx
|
|
32
|
-
- For style config always try to be object with one level
|
|
33
|
-
- Separate config file and component file for more readable code
|
|
34
|
-
- The variable name of style config must be describe what you styling not describe the parameters (or key)
|
|
35
|
-
- Use .tsx only when defining component, just us .ts if no component defined on the file
|
|
36
|
-
- Don't import simulation or any demo to index.ts
|
|
37
|
-
- Update storybook for every change or new component
|
|
38
|
-
|
|
39
|
-
### Component attribute naming
|
|
40
|
-
|
|
41
|
-
- Check on html documentation. Always try to use the exisiting html atribute name.
|
|
42
|
-
- If there the attibute not listed on html documentation. You can make it on your own with rules :
|
|
43
|
-
- Use "is" prefix for boolean
|
|
44
|
-
- Use "on" prefix for event listener
|
|
45
|
-
|
|
46
|
-
### Another Notes
|
|
47
|
-
|
|
48
|
-
- Please assign class `...-primary-black` when need black color. If not assigned system will use #000000 black.
|
|
49
|
-
- Just discuss any concept you had. **Discuss first, Implement later**.
|
|
1
|
+
# Bianic 2.0
|
|
2
|
+
|
|
3
|
+
DLS designed by BIAENERGI
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### First Installation
|
|
8
|
+
|
|
9
|
+
`npm i bianic-ui`
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
After Bianic-Ui succesfully installed, you can call the component using JSX tag declaration style ex: `<Alert />`. Futher documentation about component can be access [here](https://ristek.link/bianic-dev-docs)
|
|
14
|
+
|
|
15
|
+
## Support
|
|
16
|
+
|
|
17
|
+
If you found any bug, please contact at [devbiaenergi@gmail.com](mailto:devbiaenergi@gmail.com)
|
|
18
|
+
|
|
19
|
+
## Contributing
|
|
20
|
+
|
|
21
|
+
If you're interested in contributing to Bianic-Ui, please contact our team at [devbiaenergi@gmail.com](mailto:devbiaenergi@gmail.com)
|
|
22
|
+
|
|
23
|
+
## Change Log
|
|
24
|
+
|
|
25
|
+
Coming soon
|
|
26
|
+
|
|
27
|
+
## Development Notes
|
|
28
|
+
|
|
29
|
+
### Code Convention
|
|
30
|
+
|
|
31
|
+
- Always separate style with tsx
|
|
32
|
+
- For style config always try to be object with one level
|
|
33
|
+
- Separate config file and component file for more readable code
|
|
34
|
+
- The variable name of style config must be describe what you styling not describe the parameters (or key)
|
|
35
|
+
- Use .tsx only when defining component, just us .ts if no component defined on the file
|
|
36
|
+
- Don't import simulation or any demo to index.ts
|
|
37
|
+
- Update storybook for every change or new component
|
|
38
|
+
|
|
39
|
+
### Component attribute naming
|
|
40
|
+
|
|
41
|
+
- Check on html documentation. Always try to use the exisiting html atribute name.
|
|
42
|
+
- If there the attibute not listed on html documentation. You can make it on your own with rules :
|
|
43
|
+
- Use "is" prefix for boolean
|
|
44
|
+
- Use "on" prefix for event listener
|
|
45
|
+
|
|
46
|
+
### Another Notes
|
|
47
|
+
|
|
48
|
+
- Please assign class `...-primary-black` when need black color. If not assigned system will use #000000 black.
|
|
49
|
+
- Just discuss any concept you had. **Discuss first, Implement later**.
|
package/dist/cjs/index.js
CHANGED
|
@@ -1900,9 +1900,9 @@ MenuContainerNoAnchor.defaultProps = {
|
|
|
1900
1900
|
};
|
|
1901
1901
|
|
|
1902
1902
|
function MenuItem(_a) {
|
|
1903
|
-
var _b = _a.className, className = _b === void 0 ? '' : _b, label = _a.label, _c = _a.onClick, onClick = _c === void 0 ? function () { } : _c, _d = _a.caption, caption = _d === void 0 ? undefined : _d, _e = _a.isChecked, isChecked = _e === void 0 ? undefined : _e, _f = _a.onClose, onClose = _f === void 0 ? function () { } : _f, children = _a.children, _g = _a.zIndex, zIndex = _g === void 0 ? 100 : _g, _h = _a.inheritedOnClick, inheritedOnClick = _h === void 0 ? function () { } : _h, props = __rest(_a, ["className", "label", "onClick", "caption", "isChecked", "onClose", "children", "zIndex", "inheritedOnClick"]);
|
|
1904
|
-
var
|
|
1905
|
-
var
|
|
1903
|
+
var _b = _a.className, className = _b === void 0 ? '' : _b, label = _a.label, _c = _a.onClick, onClick = _c === void 0 ? function () { } : _c, _d = _a.caption, caption = _d === void 0 ? undefined : _d, _e = _a.isChecked, isChecked = _e === void 0 ? undefined : _e, _f = _a.onClose, onClose = _f === void 0 ? function () { } : _f, children = _a.children, _g = _a.zIndex, zIndex = _g === void 0 ? 100 : _g, _h = _a.inheritedOnClick, inheritedOnClick = _h === void 0 ? function () { } : _h, _j = _a.disabled, disabled = _j === void 0 ? false : _j, props = __rest(_a, ["className", "label", "onClick", "caption", "isChecked", "onClose", "children", "zIndex", "inheritedOnClick", "disabled"]);
|
|
1904
|
+
var _k = React.useState(false), isHovered = _k[0], setIsHovered = _k[1];
|
|
1905
|
+
var _l = React.useState(false), isLeft = _l[0], setIsLeft = _l[1];
|
|
1906
1906
|
var isWithChecked = isChecked !== undefined;
|
|
1907
1907
|
var leftPadding = isWithChecked ? 'pl-[5px]' : 'pl-[10px]';
|
|
1908
1908
|
var rightPadding = caption || children ? 'pr-[5px]' : 'pr-[10px]';
|
|
@@ -1924,19 +1924,21 @@ function MenuItem(_a) {
|
|
|
1924
1924
|
? 'left-0 -translate-x-full'
|
|
1925
1925
|
: 'right-0 translate-x-full';
|
|
1926
1926
|
var currentZIndex = zIndex + 10;
|
|
1927
|
-
return (React.createElement("div", { className: "group/main relative cursor-pointer first:rounded-t-radius-sm first:pt-[6px] last:rounded-b-radius-sm last:pb-[6px]", onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } },
|
|
1928
|
-
React.createElement("div", __assign({ className: "relative flex items-center py-[5px] hover:bg-bia-blue-pastel
|
|
1927
|
+
return (React.createElement("div", { className: "group/main relative cursor-pointer first:rounded-t-radius-sm first:pt-[6px] last:rounded-b-radius-sm last:pb-[6px]", onMouseEnter: function () { return !disabled && setIsHovered(true); }, onMouseLeave: function () { return !disabled && setIsHovered(false); } },
|
|
1928
|
+
React.createElement("div", __assign({ className: "relative flex items-center py-[5px] ".concat(itemClass, " ").concat(disabled ? 'cursor-not-allowed' : 'hover:bg-bia-blue-pastel'), role: "button", "aria-disabled": disabled, tabIndex: disabled ? -1 : 0, onClick: function (e) {
|
|
1929
|
+
if (disabled)
|
|
1930
|
+
return;
|
|
1929
1931
|
inheritedOnClick();
|
|
1930
1932
|
onClick(e);
|
|
1931
1933
|
}, onKeyDown: function () { }, style: {
|
|
1932
1934
|
zIndex: isHovered ? currentZIndex : currentZIndex + 15,
|
|
1933
1935
|
} }, props),
|
|
1934
1936
|
isWithChecked && (React.createElement("div", { className: "mr-[5px] aspect-square w-[14px]" }, isChecked && React.createElement(TbCheck, { className: "text-primary-black", size: 14 }))),
|
|
1935
|
-
React.createElement("span", { className: "whitespace-nowrap font-arial text-[11px] text-bia-black
|
|
1937
|
+
React.createElement("span", { className: "whitespace-nowrap font-arial text-[11px] ".concat(disabled ? 'text-bia-coolgrey-light-50' : 'text-bia-black') }, label),
|
|
1936
1938
|
React.createElement("div", { className: "ml-auto flex items-center" },
|
|
1937
1939
|
children && (React.createElement(TbChevronRight, { className: "ml-[10px] text-bia-coolgrey" })),
|
|
1938
|
-
children === undefined && caption && (React.createElement("span", { className: "ml-[30px] whitespace-nowrap text-[11px] text-bia-coolgrey
|
|
1939
|
-
children && (React.createElement(MenuContainerNoAnchor, { open: isHovered, onClose: onClose, className: "absolute top-0 bg-primary-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.20)] group-first/main:top-[6px] ".concat(translateClass), ref: MenuContRef, zIndex: currentZIndex + 10, onClickItem: function () { return inheritedOnClick(); } }, children))));
|
|
1940
|
+
children === undefined && caption && (React.createElement("span", { className: "ml-[30px] whitespace-nowrap text-[11px] ".concat(disabled ? 'text-bia-coolgrey-light-50' : 'text-bia-coolgrey') }, caption)))),
|
|
1941
|
+
children && !disabled && (React.createElement(MenuContainerNoAnchor, { open: isHovered, onClose: onClose, className: "absolute top-0 bg-primary-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.20)] group-first/main:top-[6px] ".concat(translateClass), ref: MenuContRef, zIndex: currentZIndex + 10, onClickItem: function () { return inheritedOnClick(); } }, children))));
|
|
1940
1942
|
}
|
|
1941
1943
|
MenuItem.defaultProps = {
|
|
1942
1944
|
className: '',
|
|
@@ -2132,7 +2134,7 @@ var TextInput = React.forwardRef(function (_a, ref) {
|
|
|
2132
2134
|
React.createElement("div", { className: "relative w-full" },
|
|
2133
2135
|
React.createElement("input", __assign({ className: "bianic-text-input bianic-fgc-target w-full rounded read-only:pointer-events-none read-only:border-bia-grey-light-50 hover:rounded-b-none focus:rounded-b-none focus-visible:outline-none disabled:border-bia-grey-dark-10 disabled:bg-bia-grey-light-80 disabled:text-bia-grey-active ".concat(extendedInputClassName), disabled: disabled, id: id, placeholder: placeholder || label, readOnly: readOnly, required: required, type: typeVariant, value: value, onChange: function (e) { return onChange(e); }, maxLength: maxLength, autoComplete: autoComplete, ref: ref }, props)),
|
|
2134
2136
|
React.createElement("div", { className: "absolute inset-y-0 flex items-center pl-3 ".concat(actionElement ? '' : iconStyle, " ").concat(iconPosition, " ").concat(iconSizing) }, iconElement)),
|
|
2135
|
-
(descText || maxLength) && (React.createElement("div", { className: "bianic-text-input-desc flex justify-between gap-1 text-xs ".concat(descColor) },
|
|
2137
|
+
(descText || maxLength) && (React.createElement("div", { className: "bianic-text-input-desc flex justify-between gap-1 text-xs whitespace-nowrap ".concat(descColor) },
|
|
2136
2138
|
React.createElement("span", null, descText),
|
|
2137
2139
|
maxLength && (React.createElement("span", null,
|
|
2138
2140
|
remainWords,
|
|
@@ -2393,11 +2395,11 @@ DropdownContNoAnchor.defaultProps = {
|
|
|
2393
2395
|
|
|
2394
2396
|
var sizeUnion$2 = ['md', 'sm'];
|
|
2395
2397
|
function SelectInput(_a) {
|
|
2396
|
-
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 'md' : _c, id = _a.id, label = _a.label,
|
|
2397
|
-
var
|
|
2398
|
-
var
|
|
2398
|
+
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 'md' : _c, id = _a.id, _d = _a.isValid, isValid = _d === void 0 ? null : _d, label = _a.label, _e = _a.options, options = _e === void 0 ? [] : _e, _f = _a.required, required = _f === void 0 ? false : _f, selected = _a.selected, setSelected = _a.setSelected, _g = _a.onClickDropdown, onClickDropdown = _g === void 0 ? function () { } : _g, children = _a.children, _h = _a.dropContProps, _j = _h === void 0 ? {} : _h, _k = _j.className, dropContClassName = _k === void 0 ? '' : _k, restDropContProps = __rest(_j, ["className"]), props = __rest(_a, ["descText", "disabled", "size", "id", "isValid", "label", "options", "required", "selected", "setSelected", "onClickDropdown", "children", "dropContProps"]);
|
|
2399
|
+
var _l = React.useState(false), isOpen = _l[0], setIsOpen = _l[1];
|
|
2400
|
+
var _m = React.useState(false), isDropUp = _m[0], setIsDropUp = _m[1];
|
|
2399
2401
|
var validatedSize = validUnion(size, sizeUnion$2);
|
|
2400
|
-
var
|
|
2402
|
+
var _o = sizeConfig$8[validatedSize], searchSize = _o.searchSize, iconSize = _o.iconSize;
|
|
2401
2403
|
var inputRef = React.useRef(null);
|
|
2402
2404
|
var dropdownContRef = React.useRef(null);
|
|
2403
2405
|
var handleOutsideClick = function (e) {
|
|
@@ -2447,12 +2449,18 @@ function SelectInput(_a) {
|
|
|
2447
2449
|
}
|
|
2448
2450
|
}, [isOpen]);
|
|
2449
2451
|
var dropdownPosition = isDropUp ? 'bottom-full' : 'top-full';
|
|
2450
|
-
|
|
2452
|
+
var descColor = 'text-primary-cool';
|
|
2453
|
+
var isExistValidation = isValid !== null && isValid !== undefined;
|
|
2454
|
+
if (!disabled && isExistValidation && isValid)
|
|
2455
|
+
descColor = 'text-bia-green';
|
|
2456
|
+
if (!disabled && isExistValidation && !isValid)
|
|
2457
|
+
descColor = 'text-bia-red';
|
|
2458
|
+
return (React.createElement("div", { className: "bianic-fgc-container bianic-text-input-container field-group flex w-full flex-col", ref: inputRef },
|
|
2451
2459
|
React.createElement("label", { htmlFor: id, className: "label pb-2 text-xs font-semibold" },
|
|
2452
2460
|
childrenElement(label),
|
|
2453
2461
|
required && React.createElement("span", { className: "p-1 text-bia-red" }, "*")),
|
|
2454
2462
|
React.createElement("div", { className: "group relative w-full" },
|
|
2455
|
-
React.createElement("input", __assign({ className: "field peer w-full
|
|
2463
|
+
React.createElement("input", __assign({ className: "bianic-fgc-target field peer w-full cursor-pointer rounded border border-bia-grey-dark-10 bg-primary-white pe-8 focus-visible:outline-none enabled:hover:rounded-b-none enabled:hover:border-b-bia-blue enabled:focus:rounded-b-none enabled:focus:border-b-bia-blue disabled:bg-bia-grey-light-80 disabled:text-bia-coolgrey ".concat(searchSize), onClick: function () { return setIsOpen(!isOpen); }, value: selectedLabel, readOnly: true, id: id, disabled: disabled }, props)),
|
|
2456
2464
|
React.createElement("div", { className: "pointer-events-none absolute inset-y-0 flex items-center pl-3 text-bia-coolgrey peer-disabled:text-bia-coolgrey-light-50 ".concat(iconSize) }, isOpen ? React.createElement(TbChevronUp, null) : React.createElement(TbChevronDown, null)),
|
|
2457
2465
|
children === undefined && isOpen && (React.createElement("div", { className: "absolute z-10 w-full rounded-b-md border border-bia-grey-dark-10 bg-primary-white shadow-lg ".concat(dropdownPosition), ref: optionsRef, onClick: onClickDropdown }, options.map(function (option) {
|
|
2458
2466
|
var isSelected = JSON.stringify(option) === JSON.stringify(selected);
|
|
@@ -2478,7 +2486,7 @@ function SelectInput(_a) {
|
|
|
2478
2486
|
}
|
|
2479
2487
|
return child;
|
|
2480
2488
|
})))),
|
|
2481
|
-
descText && (React.createElement("span", { className: "desc
|
|
2489
|
+
descText && (React.createElement("span", { className: "bianic-livesearch-desc bianic-text-input-desc whitespace-nowrap text-xs ".concat(descColor) }, descText))));
|
|
2482
2490
|
}
|
|
2483
2491
|
SelectInput.defaultProps = {
|
|
2484
2492
|
descText: '',
|
|
@@ -2711,23 +2719,28 @@ var useLiveSearch = function (_a) {
|
|
|
2711
2719
|
};
|
|
2712
2720
|
|
|
2713
2721
|
function LiveSearch(_a) {
|
|
2714
|
-
var _b = _a.autoComplete, autoComplete = _b === void 0 ? 'off' : _b, _c = _a.children, children = _c === void 0 ? undefined : _c, descText = _a.descText, _d = _a.disabled, disabled = _d === void 0 ? false : _d, dropContProps = _a.dropContProps, id = _a.id
|
|
2722
|
+
var _b = _a.autoComplete, autoComplete = _b === void 0 ? 'off' : _b, _c = _a.children, children = _c === void 0 ? undefined : _c, descText = _a.descText, _d = _a.disabled, disabled = _d === void 0 ? false : _d, dropContProps = _a.dropContProps, id = _a.id; _a.label; var _e = _a.onChangeText, onChangeText = _e === void 0 ? function () { } : _e, _f = _a.onClickDropdown, onClickDropdown = _f === void 0 ? function () { } : _f, options = _a.options, placeholder = _a.placeholder, _g = _a.readOnly, readOnly = _g === void 0 ? false : _g, _h = _a.required, required = _h === void 0 ? false : _h, _j = _a.searchVariant, searchVariant = _j === void 0 ? 'include' : _j, setValue = _a.setValue, _k = _a.size, size = _k === void 0 ? 'md' : _k, _l = _a.isValid, isValid = _l === void 0 ? null : _l, value = _a.value;
|
|
2715
2723
|
var inputRef = React.useRef(null);
|
|
2716
|
-
var
|
|
2724
|
+
var _m = useLiveSearch({
|
|
2717
2725
|
value: value,
|
|
2718
2726
|
setValue: setValue,
|
|
2719
2727
|
onChangeText: onChangeText,
|
|
2720
2728
|
dropContOnClickItem: dropContProps === null || dropContProps === void 0 ? void 0 : dropContProps.onClickItem,
|
|
2721
|
-
}), isOpen =
|
|
2722
|
-
var
|
|
2723
|
-
var
|
|
2729
|
+
}), isOpen = _m.isOpen, setIsOpen = _m.setIsOpen, searchTerm = _m.searchTerm, handleInputChange = _m.handleInputChange, handleDropdownItemClick = _m.handleDropdownItemClick;
|
|
2730
|
+
var _o = sizeConfig$6[size], iconClass = _o.iconClass, iconSize = _o.iconSize, inputClass = _o.inputClass;
|
|
2731
|
+
var _p = dropContProps || {}, dropContClassName = _p.className; _p.onClickItem; _p.anchorRef; var restDropContProps = __rest(_p, ["className", "onClickItem", "anchorRef"]);
|
|
2724
2732
|
var isValueExist = value && value.label !== undefined && value.label !== '';
|
|
2733
|
+
var descColor = 'text-primary-cool';
|
|
2734
|
+
var isExistValidation = isValid !== null && isValid !== undefined;
|
|
2735
|
+
if (!disabled && isExistValidation && isValid)
|
|
2736
|
+
descColor = 'text-bia-green';
|
|
2737
|
+
if (!disabled && isExistValidation && !isValid)
|
|
2738
|
+
descColor = 'text-bia-red';
|
|
2725
2739
|
var filteredOptions = filterOptions(options || [], value.label);
|
|
2726
|
-
var
|
|
2727
|
-
return (React.createElement("div", { className: "bianic-livesearch field-group group/form flex w-full flex-col gap-y-2 " },
|
|
2728
|
-
label && (React.createElement(FormLabel, { htmlFor: id, required: required, readOnly: readOnly }, label)),
|
|
2740
|
+
var _q = processRenderedChildren(children, searchTerm, searchVariant, handleDropdownItemClick), renderedChildren = _q.renderedChildren, hasFilteredResults = _q.hasFilteredResults;
|
|
2741
|
+
return (React.createElement("div", { className: "bianic-livesearch bianic-fgc-container bianic-text-input-container field-group group/form flex w-full flex-col gap-y-2 " },
|
|
2729
2742
|
React.createElement("div", { className: "group relative w-full" },
|
|
2730
|
-
React.createElement("input", { className: "bianic-livesearch-input field peer w-full rounded border border-bia-grey-dark-10 bg-primary-white read-only:pointer-events-none read-only:border-bia-grey-disabled focus-visible:outline-none enabled:hover:rounded-b-none enabled:hover:border-b-bia-blue enabled:focus:rounded-b-none enabled:focus:border-b-bia-blue disabled:border-bia-grey-dark-10 disabled:bg-bia-grey-light-10 disabled:text-bia-coolgrey ".concat(inputClass), onClick: function () { return setIsOpen(!isOpen); }, value: searchTerm, required: required, disabled: disabled, id: id, placeholder: placeholder, ref: inputRef, onChange: function (e) {
|
|
2743
|
+
React.createElement("input", { className: "bianic-livesearch-input bianic-fgc-target field peer w-full rounded border border-bia-grey-dark-10 bg-primary-white read-only:pointer-events-none read-only:border-bia-grey-disabled focus-visible:outline-none enabled:hover:rounded-b-none enabled:hover:border-b-bia-blue enabled:focus:rounded-b-none enabled:focus:border-b-bia-blue disabled:border-bia-grey-dark-10 disabled:bg-bia-grey-light-10 disabled:text-bia-coolgrey ".concat(inputClass), onClick: function () { return setIsOpen(!isOpen); }, value: searchTerm, required: required, disabled: disabled, id: id, placeholder: placeholder, ref: inputRef, onChange: function (e) {
|
|
2731
2744
|
onChangeText(e);
|
|
2732
2745
|
handleInputChange(e);
|
|
2733
2746
|
}, type: "text", readOnly: readOnly, autoComplete: autoComplete }),
|
|
@@ -2749,7 +2762,7 @@ function LiveSearch(_a) {
|
|
|
2749
2762
|
? renderedChildren
|
|
2750
2763
|
: // If no results and searchTerm is present
|
|
2751
2764
|
searchTerm.length > 0 && (React.createElement(DropdownItem, { content: React.createElement("div", { className: "px-4 py-2 text-gray-500" }, "Tidak ada hasil ditemukan.") }))))),
|
|
2752
|
-
descText && (React.createElement("span", { className: "desc text-
|
|
2765
|
+
descText && (React.createElement("span", { className: "bianic-livesearch-desc bianic-text-input-desc whitespace-nowrap text-xs ".concat(descColor) }, descText))));
|
|
2753
2766
|
}
|
|
2754
2767
|
LiveSearch.defaultProps = {
|
|
2755
2768
|
descText: '',
|