@pathscale/ui 0.0.81 → 0.0.83

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.
@@ -2,9 +2,7 @@ import { type JSX } from "solid-js";
2
2
  import type { IComponentBaseProps } from "../types";
3
3
  export type DropdownMenuProps = JSX.HTMLAttributes<HTMLUListElement> & IComponentBaseProps & {
4
4
  id?: string;
5
- class?: string;
6
- className?: string;
7
- style?: JSX.CSSProperties;
5
+ hideOverflow?: boolean;
8
6
  "aria-labelledby"?: string;
9
7
  };
10
8
  declare const DropdownMenu: (props: DropdownMenuProps) => JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { type JSX } from "solid-js";
2
2
  import { z } from "zod";
3
+ import type { ObjectSetter, Paths } from "@felte/common";
3
4
  import { type FormProps } from "./Form";
4
5
  export type ValidatedFormProps<T extends z.ZodTypeAny> = Omit<FormProps, "onSubmit"> & {
5
6
  schema: T;
@@ -7,19 +8,19 @@ export type ValidatedFormProps<T extends z.ZodTypeAny> = Omit<FormProps, "onSubm
7
8
  initialValues?: z.infer<T>;
8
9
  children?: JSX.Element | (() => JSX.Element);
9
10
  };
10
- interface FormValidationContext {
11
+ interface FormValidationContext<T extends z.ZodTypeAny = z.ZodTypeAny> {
11
12
  errors: (path?: string | ((data: any) => any)) => any;
12
13
  touched: (path?: string | ((data: any) => any)) => any;
13
14
  data: (path?: string | ((data: any) => any)) => any;
14
15
  isValid: () => boolean;
15
16
  isSubmitting: () => boolean;
16
- setData: (data: any) => void;
17
+ setData: ObjectSetter<z.infer<T>, Paths<z.infer<T>>>;
17
18
  setErrors: (errors: any) => void;
18
19
  setWarnings: (warnings: any) => void;
19
20
  setTouched: (touched: any) => void;
20
21
  reset: () => void;
21
22
  }
22
- declare const FormValidationContext: import("solid-js").Context<FormValidationContext | undefined>;
23
- export declare function useFormValidation(): FormValidationContext;
23
+ declare const FormValidationContext: import("solid-js").Context<FormValidationContext<z.ZodTypeAny> | undefined>;
24
+ export declare function useFormValidation<T extends z.ZodTypeAny = z.ZodTypeAny>(): FormValidationContext<T>;
24
25
  declare function ValidatedForm<T extends z.ZodTypeAny>(props: ValidatedFormProps<T>): JSX.Element;
25
26
  export default ValidatedForm;
package/dist/index.js CHANGED
@@ -6921,9 +6921,13 @@ const DropdownMenu = (props)=>{
6921
6921
  "dataTheme",
6922
6922
  "style",
6923
6923
  "id",
6924
+ "hideOverflow",
6924
6925
  "aria-labelledby"
6925
6926
  ]);
6926
- const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("dropdown-content menu p-2 shadow bg-base-100 rounded-box", local.class, local.className));
6927
+ const hideOverflowMemo = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>local.hideOverflow ?? true);
6928
+ const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("dropdown-content menu p-2 shadow bg-base-100 overflow-y-auto flex-nowrap w-full rounded-box", dist_clsx({
6929
+ "max-h-50": hideOverflowMemo()
6930
+ }), local.class, local.className));
6927
6931
  return (()=>{
6928
6932
  var _el$ = DropdownMenu_tmpl$();
6929
6933
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pathscale/ui",
3
- "version": "0.0.81",
3
+ "version": "0.0.83",
4
4
  "author": "pathscale",
5
5
  "repository": {
6
6
  "type": "git",