bianic-ui 1.16.0-beta.4 → 1.16.0-beta.5
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 +11 -11
- package/dist/cjs/types/components/Button/ContextualButton/ContextualButton.d.ts +1 -1
- package/dist/cjs/types/components/Forms/DatePicker/DateInputDisplay.d.ts +1 -1
- package/dist/cjs/types/components/Forms/TextInput/index.d.ts +1 -19
- package/dist/cjs/types/stories/Form/TextInput/TextInput.stories.d.ts +2 -2
- package/dist/esm/index.js +11 -11
- package/dist/esm/types/components/Button/ContextualButton/ContextualButton.d.ts +1 -1
- package/dist/esm/types/components/Forms/DatePicker/DateInputDisplay.d.ts +1 -1
- package/dist/esm/types/components/Forms/TextInput/index.d.ts +1 -19
- package/dist/esm/types/stories/Form/TextInput/TextInput.stories.d.ts +2 -2
- package/dist/index.d.ts +2 -20
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1513,7 +1513,7 @@ var stateColorConfig = {
|
|
|
1513
1513
|
default: 'enabled:hover:bg-black/10 enabled:focus-visible:border-bia-blue-disabled enabled:focus-visible:outline-2 enabled:focus-visible:-outline-offset-1 enabled:focus-visible:outline-bia-blue-disabled enabled:active:bg-black/15',
|
|
1514
1514
|
};
|
|
1515
1515
|
|
|
1516
|
-
var ContextualButton = function (_a) {
|
|
1516
|
+
var ContextualButton = React.forwardRef(function (_a, ref) {
|
|
1517
1517
|
var actionElement = _a.actionElement, label = _a.label, icon = _a.icon, _b = _a.variant, variant = _b === void 0 ? 'dark' : _b, disabled = _a.disabled; _a.isNotified; var _d = _a.isSelected, isSelected = _d === void 0 ? false : _d, props = __rest(_a, ["actionElement", "label", "icon", "variant", "disabled", "isNotified", "isSelected"]);
|
|
1518
1518
|
var textColor = isSelected
|
|
1519
1519
|
? variant === 'dark'
|
|
@@ -1521,12 +1521,12 @@ var ContextualButton = function (_a) {
|
|
|
1521
1521
|
: 'text-primary-white'
|
|
1522
1522
|
: textColorConfig[variant];
|
|
1523
1523
|
var stateColor = stateColorConfig[isSelected ? 'selected' : 'default'];
|
|
1524
|
-
return (React.createElement("button", __assign({ className: "bianic-contextual-button box-border flex flex-row items-center rounded-radius-sm border border-transparent p-[1px] outline-none ".concat(stateColor, " ").concat(textColor) }, props, { disabled: disabled }),
|
|
1524
|
+
return (React.createElement("button", __assign({ ref: ref, className: "bianic-contextual-button box-border flex flex-row items-center rounded-radius-sm border border-transparent p-[1px] outline-none ".concat(stateColor, " ").concat(textColor) }, props, { disabled: disabled }),
|
|
1525
1525
|
icon,
|
|
1526
1526
|
label && (React.createElement("div", { className: "label flex max-h-[46px] items-center px-[5px] text-[12px] leading-none" },
|
|
1527
1527
|
React.createElement("span", { className: "mr-0.5" }, label),
|
|
1528
1528
|
actionElement))));
|
|
1529
|
-
};
|
|
1529
|
+
});
|
|
1530
1530
|
|
|
1531
1531
|
function Color() {
|
|
1532
1532
|
var colors = [
|
|
@@ -2070,8 +2070,8 @@ var styleConfig = {
|
|
|
2070
2070
|
},
|
|
2071
2071
|
};
|
|
2072
2072
|
|
|
2073
|
-
|
|
2074
|
-
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, icon = _a.icon, _c = _a.id, id = _c === void 0 ? '' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.isValid, isValid = _e === void 0 ? null : _e, label = _a.label, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f, _g = _a.readOnly, readOnly = _g === void 0 ? false : _g, _h = _a.required, required = _h === void 0 ? false : _h, _j = _a.variant, variant = _j === void 0 ? 'text' : _j, _k = _a.value, value = _k === void 0 ? undefined : _k, _l = _a.onChange, onChange = _l === void 0 ? function () { } : _l, _m = _a.maxLength, maxLength = _m === void 0 ? undefined : _m, _o = _a.inputClassName, inputClassName = _o === void 0 ? '' : _o; _a.isFlatRight; var actionElement = _a.actionElement, _q = _a.autoComplete, autoComplete = _q === void 0 ? 'off' : _q,
|
|
2073
|
+
var TextInput = React.forwardRef(function (_a, ref) {
|
|
2074
|
+
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, icon = _a.icon, _c = _a.id, id = _c === void 0 ? '' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.isValid, isValid = _e === void 0 ? null : _e, label = _a.label, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f, _g = _a.readOnly, readOnly = _g === void 0 ? false : _g, _h = _a.required, required = _h === void 0 ? false : _h, _j = _a.variant, variant = _j === void 0 ? 'text' : _j, _k = _a.value, value = _k === void 0 ? undefined : _k, _l = _a.onChange, onChange = _l === void 0 ? function () { } : _l, _m = _a.maxLength, maxLength = _m === void 0 ? undefined : _m, _o = _a.inputClassName, inputClassName = _o === void 0 ? '' : _o; _a.isFlatRight; var actionElement = _a.actionElement, _q = _a.autoComplete, autoComplete = _q === void 0 ? 'off' : _q, props = __rest(_a, ["descText", "disabled", "icon", "id", "size", "isValid", "label", "placeholder", "readOnly", "required", "variant", "value", "onChange", "maxLength", "inputClassName", "isFlatRight", "actionElement", "autoComplete"]);
|
|
2075
2075
|
var isTransparent = variant.includes('transparent');
|
|
2076
2076
|
var _r = React.useState(false), isShow = _r[0], setIsShow = _r[1];
|
|
2077
2077
|
var _s = styleConfig[variant], fieldStyle = _s.fieldStyle, iconStyle = _s.iconStyle;
|
|
@@ -2121,7 +2121,7 @@ function TextInput(_a) {
|
|
|
2121
2121
|
remainWords,
|
|
2122
2122
|
"/",
|
|
2123
2123
|
maxLength))))));
|
|
2124
|
-
}
|
|
2124
|
+
});
|
|
2125
2125
|
TextInput.defaultProps = {
|
|
2126
2126
|
descText: '',
|
|
2127
2127
|
disabled: false,
|
|
@@ -3154,7 +3154,7 @@ var PickerCalendar = function (_a) {
|
|
|
3154
3154
|
setViewYearValue(year);
|
|
3155
3155
|
handlePickerMode('month');
|
|
3156
3156
|
};
|
|
3157
|
-
return (React.createElement("div", __assign({ className: "bianic-datepicker-calendar absolute flex w-[250px] flex-col gap-[15px] rounded-b-radius-sm bg-bia-white px-1.5 pb-[17px] pt-[15px] text-bia-black shadow-md", ref: pickerCalendarRef, style: positionStyle }, props),
|
|
3157
|
+
return reactDom.createPortal(React.createElement("div", __assign({ className: "bianic-datepicker-calendar absolute flex w-[250px] flex-col gap-[15px] rounded-b-radius-sm bg-bia-white px-1.5 pb-[17px] pt-[15px] text-bia-black shadow-md", ref: pickerCalendarRef, style: positionStyle }, props),
|
|
3158
3158
|
React.createElement("div", { className: "bianic-datepicker-calendar-controller flex w-full items-center justify-between" },
|
|
3159
3159
|
React.createElement("button", { className: "bianic-datepicker-calendar-prev-button text-bia-coolgrey disabled:text-bia-coolgrey-light-50", disabled: isPrevDisabled(), onClick: pickerMode === 'date'
|
|
3160
3160
|
? handlePrevMonth
|
|
@@ -3185,7 +3185,7 @@ var PickerCalendar = function (_a) {
|
|
|
3185
3185
|
React.createElement(TbChevronRight, { size: 18 }))),
|
|
3186
3186
|
pickerMode === 'date' && (React.createElement(DateDisplay, { displayDays: displayDays, maxDateValue: maxDateValue, minDateValue: minDateValue, onDateSelect: handleDateSelect, selectedDate: selectedDate, viewMonthValue: viewMonthValue })),
|
|
3187
3187
|
pickerMode === 'month' && (React.createElement(MonthDisplay, { maxDateValue: maxDateValue, minDateValue: minDateValue, onMonthSelect: handleMonthSelect, selectedDate: selectedDate, viewMonthValue: viewMonthValue, viewYearValue: viewYearValue })),
|
|
3188
|
-
pickerMode === 'year' && (React.createElement(YearDisplay, { maxDateValue: maxDateValue, minDateValue: minDateValue, onYearSelect: handleYearSelect, viewYearValue: viewYearValue, yearDisplayRange: yearDisplayRange }))));
|
|
3188
|
+
pickerMode === 'year' && (React.createElement(YearDisplay, { maxDateValue: maxDateValue, minDateValue: minDateValue, onYearSelect: handleYearSelect, viewYearValue: viewYearValue, yearDisplayRange: yearDisplayRange }))), document.body);
|
|
3189
3189
|
};
|
|
3190
3190
|
|
|
3191
3191
|
var monthMap = [
|
|
@@ -3202,7 +3202,7 @@ var monthMap = [
|
|
|
3202
3202
|
'November',
|
|
3203
3203
|
'December',
|
|
3204
3204
|
];
|
|
3205
|
-
var DateInputDisplay = function (_a) {
|
|
3205
|
+
var DateInputDisplay = React.forwardRef(function (_a, ref) {
|
|
3206
3206
|
var value = _a.value, setValue = _a.setValue, _b = _a.placeholder, placeholder = _b === void 0 ? 'YYYY-MM-DD' : _b, label = _a.label, required = _a.required, id = _a.id, _c = _a.size, size = _c === void 0 ? 'sm' : _c, className = _a.className, _d = _a.disabled, disabled = _d === void 0 ? false : _d, buttonAction = _a.buttonAction, nullDisplay = _a.nullDisplay, props = __rest(_a, ["value", "setValue", "placeholder", "label", "required", "id", "size", "className", "disabled", "buttonAction", "nullDisplay"]);
|
|
3207
3207
|
var _e = React.useState(false), isEditing = _e[0], setIsEditing = _e[1];
|
|
3208
3208
|
var _f = React.useState(value), dateString = _f[0], setDateString = _f[1];
|
|
@@ -3251,8 +3251,8 @@ var DateInputDisplay = function (_a) {
|
|
|
3251
3251
|
label && (React.createElement("label", { htmlFor: id, className: "bianic-text-input-label text-xs font-semibold ".concat(labelStatus) },
|
|
3252
3252
|
label,
|
|
3253
3253
|
required && React.createElement("span", { className: "p-1 text-bia-red" }, "*"))),
|
|
3254
|
-
React.createElement("div", { className: "relative w-full" }, input)));
|
|
3255
|
-
};
|
|
3254
|
+
React.createElement("div", { className: "relative w-full", ref: ref }, input)));
|
|
3255
|
+
});
|
|
3256
3256
|
var dateToInputString = function (dateObj) {
|
|
3257
3257
|
if (!(dateObj instanceof Date) || isNaN(dateObj))
|
|
3258
3258
|
return ''; // Return empty string for invalid dates
|
|
@@ -7,5 +7,5 @@ interface ContextualButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
7
7
|
isNotified?: boolean;
|
|
8
8
|
isSelected?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const ContextualButton:
|
|
10
|
+
declare const ContextualButton: React.ForwardRefExoticComponent<ContextualButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
11
|
export default ContextualButton;
|
|
@@ -12,5 +12,5 @@ interface DateInputDisplayProps extends Omit<TextInputProps, 'value'> {
|
|
|
12
12
|
disabled: boolean;
|
|
13
13
|
nullDisplay?: string;
|
|
14
14
|
}
|
|
15
|
-
declare const DateInputDisplay:
|
|
15
|
+
declare const DateInputDisplay: React.ForwardRefExoticComponent<Omit<DateInputDisplayProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
16
16
|
export default DateInputDisplay;
|
|
@@ -1,23 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import TextInputProps from './PropsInterface';
|
|
3
3
|
import './style.css';
|
|
4
|
-
declare
|
|
5
|
-
declare namespace TextInput {
|
|
6
|
-
var defaultProps: {
|
|
7
|
-
descText: string;
|
|
8
|
-
disabled: boolean;
|
|
9
|
-
icon: null;
|
|
10
|
-
id: string;
|
|
11
|
-
size: string;
|
|
12
|
-
isValid: null;
|
|
13
|
-
label: string;
|
|
14
|
-
placeholder: string;
|
|
15
|
-
readOnly: boolean;
|
|
16
|
-
variant: string;
|
|
17
|
-
value: undefined;
|
|
18
|
-
onChange: () => void;
|
|
19
|
-
inputClassName: string;
|
|
20
|
-
isFlatRight: boolean;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
4
|
+
declare const TextInput: React.ForwardRefExoticComponent<Omit<TextInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
23
5
|
export default TextInput;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component:
|
|
5
|
+
component: React.ForwardRefExoticComponent<Omit<import("../../../components/Forms/TextInput/PropsInterface").default, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: string;
|
|
8
8
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -1511,7 +1511,7 @@ var stateColorConfig = {
|
|
|
1511
1511
|
default: 'enabled:hover:bg-black/10 enabled:focus-visible:border-bia-blue-disabled enabled:focus-visible:outline-2 enabled:focus-visible:-outline-offset-1 enabled:focus-visible:outline-bia-blue-disabled enabled:active:bg-black/15',
|
|
1512
1512
|
};
|
|
1513
1513
|
|
|
1514
|
-
var ContextualButton = function (_a) {
|
|
1514
|
+
var ContextualButton = forwardRef(function (_a, ref) {
|
|
1515
1515
|
var actionElement = _a.actionElement, label = _a.label, icon = _a.icon, _b = _a.variant, variant = _b === void 0 ? 'dark' : _b, disabled = _a.disabled; _a.isNotified; var _d = _a.isSelected, isSelected = _d === void 0 ? false : _d, props = __rest(_a, ["actionElement", "label", "icon", "variant", "disabled", "isNotified", "isSelected"]);
|
|
1516
1516
|
var textColor = isSelected
|
|
1517
1517
|
? variant === 'dark'
|
|
@@ -1519,12 +1519,12 @@ var ContextualButton = function (_a) {
|
|
|
1519
1519
|
: 'text-primary-white'
|
|
1520
1520
|
: textColorConfig[variant];
|
|
1521
1521
|
var stateColor = stateColorConfig[isSelected ? 'selected' : 'default'];
|
|
1522
|
-
return (React.createElement("button", __assign({ className: "bianic-contextual-button box-border flex flex-row items-center rounded-radius-sm border border-transparent p-[1px] outline-none ".concat(stateColor, " ").concat(textColor) }, props, { disabled: disabled }),
|
|
1522
|
+
return (React.createElement("button", __assign({ ref: ref, className: "bianic-contextual-button box-border flex flex-row items-center rounded-radius-sm border border-transparent p-[1px] outline-none ".concat(stateColor, " ").concat(textColor) }, props, { disabled: disabled }),
|
|
1523
1523
|
icon,
|
|
1524
1524
|
label && (React.createElement("div", { className: "label flex max-h-[46px] items-center px-[5px] text-[12px] leading-none" },
|
|
1525
1525
|
React.createElement("span", { className: "mr-0.5" }, label),
|
|
1526
1526
|
actionElement))));
|
|
1527
|
-
};
|
|
1527
|
+
});
|
|
1528
1528
|
|
|
1529
1529
|
function Color() {
|
|
1530
1530
|
var colors = [
|
|
@@ -2068,8 +2068,8 @@ var styleConfig = {
|
|
|
2068
2068
|
},
|
|
2069
2069
|
};
|
|
2070
2070
|
|
|
2071
|
-
|
|
2072
|
-
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, icon = _a.icon, _c = _a.id, id = _c === void 0 ? '' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.isValid, isValid = _e === void 0 ? null : _e, label = _a.label, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f, _g = _a.readOnly, readOnly = _g === void 0 ? false : _g, _h = _a.required, required = _h === void 0 ? false : _h, _j = _a.variant, variant = _j === void 0 ? 'text' : _j, _k = _a.value, value = _k === void 0 ? undefined : _k, _l = _a.onChange, onChange = _l === void 0 ? function () { } : _l, _m = _a.maxLength, maxLength = _m === void 0 ? undefined : _m, _o = _a.inputClassName, inputClassName = _o === void 0 ? '' : _o; _a.isFlatRight; var actionElement = _a.actionElement, _q = _a.autoComplete, autoComplete = _q === void 0 ? 'off' : _q,
|
|
2071
|
+
var TextInput = forwardRef(function (_a, ref) {
|
|
2072
|
+
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, icon = _a.icon, _c = _a.id, id = _c === void 0 ? '' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.isValid, isValid = _e === void 0 ? null : _e, label = _a.label, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f, _g = _a.readOnly, readOnly = _g === void 0 ? false : _g, _h = _a.required, required = _h === void 0 ? false : _h, _j = _a.variant, variant = _j === void 0 ? 'text' : _j, _k = _a.value, value = _k === void 0 ? undefined : _k, _l = _a.onChange, onChange = _l === void 0 ? function () { } : _l, _m = _a.maxLength, maxLength = _m === void 0 ? undefined : _m, _o = _a.inputClassName, inputClassName = _o === void 0 ? '' : _o; _a.isFlatRight; var actionElement = _a.actionElement, _q = _a.autoComplete, autoComplete = _q === void 0 ? 'off' : _q, props = __rest(_a, ["descText", "disabled", "icon", "id", "size", "isValid", "label", "placeholder", "readOnly", "required", "variant", "value", "onChange", "maxLength", "inputClassName", "isFlatRight", "actionElement", "autoComplete"]);
|
|
2073
2073
|
var isTransparent = variant.includes('transparent');
|
|
2074
2074
|
var _r = useState(false), isShow = _r[0], setIsShow = _r[1];
|
|
2075
2075
|
var _s = styleConfig[variant], fieldStyle = _s.fieldStyle, iconStyle = _s.iconStyle;
|
|
@@ -2119,7 +2119,7 @@ function TextInput(_a) {
|
|
|
2119
2119
|
remainWords,
|
|
2120
2120
|
"/",
|
|
2121
2121
|
maxLength))))));
|
|
2122
|
-
}
|
|
2122
|
+
});
|
|
2123
2123
|
TextInput.defaultProps = {
|
|
2124
2124
|
descText: '',
|
|
2125
2125
|
disabled: false,
|
|
@@ -3152,7 +3152,7 @@ var PickerCalendar = function (_a) {
|
|
|
3152
3152
|
setViewYearValue(year);
|
|
3153
3153
|
handlePickerMode('month');
|
|
3154
3154
|
};
|
|
3155
|
-
return (React.createElement("div", __assign({ className: "bianic-datepicker-calendar absolute flex w-[250px] flex-col gap-[15px] rounded-b-radius-sm bg-bia-white px-1.5 pb-[17px] pt-[15px] text-bia-black shadow-md", ref: pickerCalendarRef, style: positionStyle }, props),
|
|
3155
|
+
return createPortal(React.createElement("div", __assign({ className: "bianic-datepicker-calendar absolute flex w-[250px] flex-col gap-[15px] rounded-b-radius-sm bg-bia-white px-1.5 pb-[17px] pt-[15px] text-bia-black shadow-md", ref: pickerCalendarRef, style: positionStyle }, props),
|
|
3156
3156
|
React.createElement("div", { className: "bianic-datepicker-calendar-controller flex w-full items-center justify-between" },
|
|
3157
3157
|
React.createElement("button", { className: "bianic-datepicker-calendar-prev-button text-bia-coolgrey disabled:text-bia-coolgrey-light-50", disabled: isPrevDisabled(), onClick: pickerMode === 'date'
|
|
3158
3158
|
? handlePrevMonth
|
|
@@ -3183,7 +3183,7 @@ var PickerCalendar = function (_a) {
|
|
|
3183
3183
|
React.createElement(TbChevronRight, { size: 18 }))),
|
|
3184
3184
|
pickerMode === 'date' && (React.createElement(DateDisplay, { displayDays: displayDays, maxDateValue: maxDateValue, minDateValue: minDateValue, onDateSelect: handleDateSelect, selectedDate: selectedDate, viewMonthValue: viewMonthValue })),
|
|
3185
3185
|
pickerMode === 'month' && (React.createElement(MonthDisplay, { maxDateValue: maxDateValue, minDateValue: minDateValue, onMonthSelect: handleMonthSelect, selectedDate: selectedDate, viewMonthValue: viewMonthValue, viewYearValue: viewYearValue })),
|
|
3186
|
-
pickerMode === 'year' && (React.createElement(YearDisplay, { maxDateValue: maxDateValue, minDateValue: minDateValue, onYearSelect: handleYearSelect, viewYearValue: viewYearValue, yearDisplayRange: yearDisplayRange }))));
|
|
3186
|
+
pickerMode === 'year' && (React.createElement(YearDisplay, { maxDateValue: maxDateValue, minDateValue: minDateValue, onYearSelect: handleYearSelect, viewYearValue: viewYearValue, yearDisplayRange: yearDisplayRange }))), document.body);
|
|
3187
3187
|
};
|
|
3188
3188
|
|
|
3189
3189
|
var monthMap = [
|
|
@@ -3200,7 +3200,7 @@ var monthMap = [
|
|
|
3200
3200
|
'November',
|
|
3201
3201
|
'December',
|
|
3202
3202
|
];
|
|
3203
|
-
var DateInputDisplay = function (_a) {
|
|
3203
|
+
var DateInputDisplay = forwardRef(function (_a, ref) {
|
|
3204
3204
|
var value = _a.value, setValue = _a.setValue, _b = _a.placeholder, placeholder = _b === void 0 ? 'YYYY-MM-DD' : _b, label = _a.label, required = _a.required, id = _a.id, _c = _a.size, size = _c === void 0 ? 'sm' : _c, className = _a.className, _d = _a.disabled, disabled = _d === void 0 ? false : _d, buttonAction = _a.buttonAction, nullDisplay = _a.nullDisplay, props = __rest(_a, ["value", "setValue", "placeholder", "label", "required", "id", "size", "className", "disabled", "buttonAction", "nullDisplay"]);
|
|
3205
3205
|
var _e = useState(false), isEditing = _e[0], setIsEditing = _e[1];
|
|
3206
3206
|
var _f = useState(value), dateString = _f[0], setDateString = _f[1];
|
|
@@ -3249,8 +3249,8 @@ var DateInputDisplay = function (_a) {
|
|
|
3249
3249
|
label && (React.createElement("label", { htmlFor: id, className: "bianic-text-input-label text-xs font-semibold ".concat(labelStatus) },
|
|
3250
3250
|
label,
|
|
3251
3251
|
required && React.createElement("span", { className: "p-1 text-bia-red" }, "*"))),
|
|
3252
|
-
React.createElement("div", { className: "relative w-full" }, input)));
|
|
3253
|
-
};
|
|
3252
|
+
React.createElement("div", { className: "relative w-full", ref: ref }, input)));
|
|
3253
|
+
});
|
|
3254
3254
|
var dateToInputString = function (dateObj) {
|
|
3255
3255
|
if (!(dateObj instanceof Date) || isNaN(dateObj))
|
|
3256
3256
|
return ''; // Return empty string for invalid dates
|
|
@@ -7,5 +7,5 @@ interface ContextualButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
7
7
|
isNotified?: boolean;
|
|
8
8
|
isSelected?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const ContextualButton:
|
|
10
|
+
declare const ContextualButton: React.ForwardRefExoticComponent<ContextualButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
11
|
export default ContextualButton;
|
|
@@ -12,5 +12,5 @@ interface DateInputDisplayProps extends Omit<TextInputProps, 'value'> {
|
|
|
12
12
|
disabled: boolean;
|
|
13
13
|
nullDisplay?: string;
|
|
14
14
|
}
|
|
15
|
-
declare const DateInputDisplay:
|
|
15
|
+
declare const DateInputDisplay: React.ForwardRefExoticComponent<Omit<DateInputDisplayProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
16
16
|
export default DateInputDisplay;
|
|
@@ -1,23 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import TextInputProps from './PropsInterface';
|
|
3
3
|
import './style.css';
|
|
4
|
-
declare
|
|
5
|
-
declare namespace TextInput {
|
|
6
|
-
var defaultProps: {
|
|
7
|
-
descText: string;
|
|
8
|
-
disabled: boolean;
|
|
9
|
-
icon: null;
|
|
10
|
-
id: string;
|
|
11
|
-
size: string;
|
|
12
|
-
isValid: null;
|
|
13
|
-
label: string;
|
|
14
|
-
placeholder: string;
|
|
15
|
-
readOnly: boolean;
|
|
16
|
-
variant: string;
|
|
17
|
-
value: undefined;
|
|
18
|
-
onChange: () => void;
|
|
19
|
-
inputClassName: string;
|
|
20
|
-
isFlatRight: boolean;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
4
|
+
declare const TextInput: React.ForwardRefExoticComponent<Omit<TextInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
23
5
|
export default TextInput;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component:
|
|
5
|
+
component: React.ForwardRefExoticComponent<Omit<import("../../../components/Forms/TextInput/PropsInterface").default, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: string;
|
|
8
8
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -119,7 +119,7 @@ interface ContextualButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
119
119
|
isNotified?: boolean;
|
|
120
120
|
isSelected?: boolean;
|
|
121
121
|
}
|
|
122
|
-
declare const ContextualButton:
|
|
122
|
+
declare const ContextualButton: React$1.ForwardRefExoticComponent<ContextualButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
123
123
|
|
|
124
124
|
declare function Color(): React$1.JSX.Element;
|
|
125
125
|
|
|
@@ -209,25 +209,7 @@ interface TextInputProps extends Omit<ComponentPropsWithRef<'input'>, 'size'> {
|
|
|
209
209
|
actionElement?: React.ReactNode;
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
declare
|
|
213
|
-
declare namespace TextInput {
|
|
214
|
-
var defaultProps: {
|
|
215
|
-
descText: string;
|
|
216
|
-
disabled: boolean;
|
|
217
|
-
icon: null;
|
|
218
|
-
id: string;
|
|
219
|
-
size: string;
|
|
220
|
-
isValid: null;
|
|
221
|
-
label: string;
|
|
222
|
-
placeholder: string;
|
|
223
|
-
readOnly: boolean;
|
|
224
|
-
variant: string;
|
|
225
|
-
value: undefined;
|
|
226
|
-
onChange: () => void;
|
|
227
|
-
inputClassName: string;
|
|
228
|
-
isFlatRight: boolean;
|
|
229
|
-
};
|
|
230
|
-
}
|
|
212
|
+
declare const TextInput: React$1.ForwardRefExoticComponent<Omit<TextInputProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
231
213
|
|
|
232
214
|
interface RadioProps extends Omit<ComponentPropsWithoutRef<'input'>, 'size'> {
|
|
233
215
|
label?: string;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"@biaenergi:registry": "https://gitlab.com/api/v4/projects/50905269/packages/npm/"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.0-beta.
|
|
6
|
+
"version": "1.16.0-beta.5",
|
|
7
7
|
"description": "Design Language System develop by BIAENERGI",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"rollup": "rollup -c",
|