@yimingliao/cms 0.0.99 → 0.0.100

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.
@@ -426,8 +426,9 @@ declare function MainFields({ className, children, ...props }: ComponentProps<"d
426
426
  declare function SideFields({ className, children, ...props }: ComponentProps<"div">): react_jsx_runtime.JSX.Element;
427
427
 
428
428
  interface InputProps<T extends FormData = FormData> extends ComponentProps<"input">, FormFieldController<T> {
429
+ inputGroupClassName?: string;
429
430
  }
430
- declare function Input<T extends FormData = FormData>({ fieldName, setFormData, isLoading, isDisabled, isError, className, children, ...props }: InputProps<T>): react_jsx_runtime.JSX.Element;
431
+ declare function Input<T extends FormData = FormData>({ fieldName, setFormData, isLoading, isDisabled, isError, className, inputGroupClassName, children, ...props }: InputProps<T>): react_jsx_runtime.JSX.Element;
431
432
 
432
433
  declare function PasswordInput<T extends FormData = FormData>({ ...props }: InputProps<T>): react_jsx_runtime.JSX.Element;
433
434
 
@@ -713,25 +713,33 @@ function Input({
713
713
  isError = false,
714
714
  // base
715
715
  className,
716
+ inputGroupClassName,
716
717
  children,
717
718
  ...props
718
719
  }) {
719
- return /* @__PURE__ */ jsxs(InputGroup, { "data-disabled": isDisabled || isLoading, className: "h-10", children: [
720
- isLoading ? /* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(Spinner, {}) }) : /* @__PURE__ */ jsx(
721
- InputGroupInput,
722
- {
723
- disabled: isDisabled || isLoading,
724
- "aria-invalid": isError,
725
- onChange: (e) => {
726
- if (!setFormData || !fieldName) return;
727
- setFormData((p) => ({ ...p, [fieldName]: e.target.value }));
728
- },
729
- className: cn("h-10", className),
730
- ...props
731
- }
732
- ),
733
- children
734
- ] });
720
+ return /* @__PURE__ */ jsxs(
721
+ InputGroup,
722
+ {
723
+ "data-disabled": isDisabled || isLoading,
724
+ className: cn("h-10", inputGroupClassName),
725
+ children: [
726
+ isLoading ? /* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(Spinner, {}) }) : /* @__PURE__ */ jsx(
727
+ InputGroupInput,
728
+ {
729
+ disabled: isDisabled || isLoading,
730
+ "aria-invalid": isError,
731
+ onChange: (e) => {
732
+ if (!setFormData || !fieldName) return;
733
+ setFormData((p) => ({ ...p, [fieldName]: e.target.value }));
734
+ },
735
+ className: cn("h-10", className),
736
+ ...props
737
+ }
738
+ ),
739
+ children
740
+ ]
741
+ }
742
+ );
735
743
  }
736
744
  function PasswordInput({
737
745
  ...props
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yimingliao/cms",
3
- "version": "0.0.99",
3
+ "version": "0.0.100",
4
4
  "author": "Yiming Liao",
5
5
  "license": "MIT",
6
6
  "type": "module",