nexaas-ui-components 1.0.11 → 1.0.12

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.cts CHANGED
@@ -283,6 +283,18 @@ type MaskedInputProps = {
283
283
  };
284
284
  declare const MaskedInput: ({ type, name, label, placeholder, error, mask, control, required, onKeyUp, maskChar, alwaysShowMask, defaultValue, disabled, }: MaskedInputProps) => react_jsx_runtime.JSX.Element;
285
285
 
286
+ type InputTestProps = DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> & {
287
+ label?: string;
288
+ control: Control<any>;
289
+ name: string;
290
+ error?: FieldError;
291
+ required?: boolean;
292
+ };
293
+ declare function InputTest({ label, name, control, error, required, placeholder, disabled, defaultValue, }: InputTestProps): react_jsx_runtime.JSX.Element;
294
+ declare namespace InputTest {
295
+ var displayName: string;
296
+ }
297
+
286
298
  type ModalProps = {
287
299
  open?: boolean;
288
300
  onOpen?: () => void;
@@ -451,4 +463,4 @@ interface DataTablePaginationProps<TData> {
451
463
  }
452
464
  declare function DataTablePagination<TData>({ table, footer, totalData, selectAllOption, onSelectAll, rowsSelected, onRemoveAll, tableRef, paginationScroll, pageSizeOptions, }: DataTablePaginationProps<TData>): react_jsx_runtime.JSX.Element;
453
465
 
454
- export { Badge, Button, Calendar, Checkbox, type CheckboxProps, DataTable, DataTablePagination, DatePickerInput, FilterCalendar, FilterOptions, Input, InputMoney, InputNumber, InputPercentage, Logo, MaskedInput, ModalDialog, type ModalProps, type OptionType, PaginationSelect, Popover, Radio, RocketIcon, SelectField, SpinnerIcon, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Toggle, ValueContainer };
466
+ export { Badge, Button, Calendar, Checkbox, type CheckboxProps, DataTable, DataTablePagination, DatePickerInput, FilterCalendar, FilterOptions, Input, InputMoney, InputNumber, InputPercentage, InputTest, Logo, MaskedInput, ModalDialog, type ModalProps, type OptionType, PaginationSelect, Popover, Radio, RocketIcon, SelectField, SpinnerIcon, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Toggle, ValueContainer };
package/dist/index.d.ts CHANGED
@@ -283,6 +283,18 @@ type MaskedInputProps = {
283
283
  };
284
284
  declare const MaskedInput: ({ type, name, label, placeholder, error, mask, control, required, onKeyUp, maskChar, alwaysShowMask, defaultValue, disabled, }: MaskedInputProps) => react_jsx_runtime.JSX.Element;
285
285
 
286
+ type InputTestProps = DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> & {
287
+ label?: string;
288
+ control: Control<any>;
289
+ name: string;
290
+ error?: FieldError;
291
+ required?: boolean;
292
+ };
293
+ declare function InputTest({ label, name, control, error, required, placeholder, disabled, defaultValue, }: InputTestProps): react_jsx_runtime.JSX.Element;
294
+ declare namespace InputTest {
295
+ var displayName: string;
296
+ }
297
+
286
298
  type ModalProps = {
287
299
  open?: boolean;
288
300
  onOpen?: () => void;
@@ -451,4 +463,4 @@ interface DataTablePaginationProps<TData> {
451
463
  }
452
464
  declare function DataTablePagination<TData>({ table, footer, totalData, selectAllOption, onSelectAll, rowsSelected, onRemoveAll, tableRef, paginationScroll, pageSizeOptions, }: DataTablePaginationProps<TData>): react_jsx_runtime.JSX.Element;
453
465
 
454
- export { Badge, Button, Calendar, Checkbox, type CheckboxProps, DataTable, DataTablePagination, DatePickerInput, FilterCalendar, FilterOptions, Input, InputMoney, InputNumber, InputPercentage, Logo, MaskedInput, ModalDialog, type ModalProps, type OptionType, PaginationSelect, Popover, Radio, RocketIcon, SelectField, SpinnerIcon, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Toggle, ValueContainer };
466
+ export { Badge, Button, Calendar, Checkbox, type CheckboxProps, DataTable, DataTablePagination, DatePickerInput, FilterCalendar, FilterOptions, Input, InputMoney, InputNumber, InputPercentage, InputTest, Logo, MaskedInput, ModalDialog, type ModalProps, type OptionType, PaginationSelect, Popover, Radio, RocketIcon, SelectField, SpinnerIcon, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Toggle, ValueContainer };
package/dist/index.js CHANGED
@@ -2251,6 +2251,61 @@ var MaskedInput = ({
2251
2251
  }
2252
2252
  );
2253
2253
  };
2254
+ function InputTest({
2255
+ label,
2256
+ name,
2257
+ control,
2258
+ error,
2259
+ required,
2260
+ placeholder,
2261
+ disabled,
2262
+ defaultValue
2263
+ }) {
2264
+ const fieldValidationMessages = [error == null ? void 0 : error.message];
2265
+ const hasError = fieldValidationMessages.some((item) => item !== void 0);
2266
+ const styles = {
2267
+ input: `text-p-md pl-2 peer shadow-input border rounded-lg outline-none block pb-[10px] h-[46px] w-full disabled:bg-neutral-100 focus-visible:border-1 ${label ? "pt-[22px]" : "pt-[10px]"} ${hasError ? "border-dangerous-500 text-dangerous-500" : "border-neutral-300 focus-visible:border-blue-500"}`,
2268
+ label: "absolute text-label top-[0.80rem] z-10 origin-[0] transform -translate-y-3 scale-75 duration-300 text-sm peer-focus:text-blue-500 peer-focus:scale-75 peer-focus:-translate-y-3 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 left-2.5 cursor-text"
2269
+ };
2270
+ return /* @__PURE__ */ jsx(
2271
+ Controller,
2272
+ {
2273
+ control,
2274
+ name,
2275
+ defaultValue,
2276
+ render: ({ field }) => {
2277
+ return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
2278
+ /* @__PURE__ */ jsx(
2279
+ "input",
2280
+ {
2281
+ ...field,
2282
+ type: "text",
2283
+ id: name,
2284
+ className: clsx7(styles.input),
2285
+ placeholder: !label && placeholder ? placeholder : " ",
2286
+ disabled
2287
+ }
2288
+ ),
2289
+ /* @__PURE__ */ jsxs("label", { className: clsx7(styles.label), children: [
2290
+ label,
2291
+ required && label && /* @__PURE__ */ jsx("strong", { className: "text-dangerous-500", children: "\xA0*" })
2292
+ ] }),
2293
+ fieldValidationMessages.map((message, index) => /* @__PURE__ */ jsx(
2294
+ "div",
2295
+ {
2296
+ className: "text-dangerous-500 text-xs mt-1 ml-[2px]",
2297
+ role: "alert",
2298
+ "aria-label": message,
2299
+ children: message
2300
+ },
2301
+ index
2302
+ ))
2303
+ ] });
2304
+ }
2305
+ }
2306
+ );
2307
+ }
2308
+ InputTest.displayName = "InputTest";
2254
2309
  var Modal = ReactModalNamespace.default || ReactModalNamespace;
2255
2310
  var alertTypes = {
2256
2311
  success: "text-success-500",
@@ -3705,6 +3760,6 @@ function DataTable({
3705
3760
  ] });
3706
3761
  }
3707
3762
 
3708
- export { Badge, Button, Calendar, Checkbox, DataTable, DataTablePagination, DatePickerInput, FilterCalendar, FilterOptions, Input, InputMoney, InputNumber, InputPercentage, Logo, MaskedInput, ModalDialog, PaginationSelect, Popover3 as Popover, Radio, RocketIcon, SelectField, SpinnerIcon, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Toggle, ValueContainer };
3763
+ export { Badge, Button, Calendar, Checkbox, DataTable, DataTablePagination, DatePickerInput, FilterCalendar, FilterOptions, Input, InputMoney, InputNumber, InputPercentage, InputTest, Logo, MaskedInput, ModalDialog, PaginationSelect, Popover3 as Popover, Radio, RocketIcon, SelectField, SpinnerIcon, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Toggle, ValueContainer };
3709
3764
  //# sourceMappingURL=index.js.map
3710
3765
  //# sourceMappingURL=index.js.map