@trsys-tech/matrix-library 0.5.9 → 0.6.0-alpha.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"FormInput.d.ts","sourceRoot":"","sources":["../../../src/components/form-input/FormInput.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA0B,QAAQ,EAA0B,MAAM,cAAc,CAAC;AACxF,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,EAAa,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEpE,KAAK,cAAc,CAAC,YAAY,SAAS,WAAW,EAAE,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,EAAE,QAAQ,CAAC,GACjJ,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,GAAG;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE;QACV,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;QAChG,gBAAgB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC;QAC1G,gBAAgB,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC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BAAoB,CAAC,CAAC;QAC1G,gBAAgB,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;QAChH,cAAc,CAAC,EAAE,cAAc,GAAG,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;KACzE,CAAC;CACH,CAAC;AAEJ,QAAA,MAAM,SAAS,GAAI,YAAY,SAAS,WAAW,EAAE,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,SAAS,cAAc,CAAC,YAAY,EAAE,KAAK,CAAC,4CAsCrI,CAAC;AACF,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,CAAC"}
@@ -1,28 +1,35 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
2
  import { FormField as c, FormItem as f, FormLabel as x, FormControl as b, FormMessage as g } from "./form.es.js";
3
3
  import { TextField as h } from "./textfield.es.js";
4
- const C = (l) => {
5
- const { name: m, control: n, defaultValue: d, disabled: o, readOnly: i, rules: p, shouldUnregister: a, label: u, slotProps: r, required: s, ...P } = l;
4
+ const C = (d) => {
5
+ const { name: i, control: m, defaultValue: n, disabled: o, readOnly: s, rules: a, shouldUnregister: p, label: u, slotProps: r, required: t, ...P } = d;
6
6
  return /* @__PURE__ */ e(
7
7
  c,
8
8
  {
9
- control: n,
10
- name: m,
11
- defaultValue: d,
9
+ control: m,
10
+ name: i,
11
+ defaultValue: n,
12
12
  disabled: o,
13
- rules: p,
14
- shouldUnregister: a,
15
- render: ({ field: F }) => /* @__PURE__ */ t(f, { ...P, children: [
16
- /* @__PURE__ */ t(x, { ...r?.formLabelProps ?? {}, children: [
13
+ rules: a,
14
+ shouldUnregister: p,
15
+ render: ({ field: F }) => /* @__PURE__ */ l(f, { ...P, children: [
16
+ /* @__PURE__ */ l(x, { ...r?.formLabelProps ?? {}, children: [
17
17
  u,
18
- s && /* @__PURE__ */ e("span", { className: "text-danger text-sm leading-4", children: "*" })
18
+ t && /* @__PURE__ */ e("span", { className: "text-danger text-sm leading-4", children: "*" })
19
19
  ] }),
20
20
  /* @__PURE__ */ e(b, { ...r?.formControlProps ?? {}, children: /* @__PURE__ */ e(
21
21
  h,
22
22
  {
23
23
  ...r?.textFieldProps ?? {},
24
- disabled: o || i,
25
- slotProps: { inputProps: { ...r?.textFieldProps?.slotProps?.inputProps, ...F, "aria-required": s } }
24
+ disabled: o || s,
25
+ slotProps: {
26
+ inputProps: {
27
+ ...r?.textFieldProps?.slotProps?.inputProps,
28
+ ...F,
29
+ "aria-required": t,
30
+ disabled: o || s
31
+ }
32
+ }
26
33
  }
27
34
  ) }),
28
35
  /* @__PURE__ */ e(g, { ...r?.formMessageProps ?? {} })
@@ -1 +1 @@
1
- {"version":3,"file":"forminput.es.js","sources":["../src/components/form-input/FormInput.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport { FormControl, FormField, FormItem, FormLabel, FormMessage } from \"../form/Form\";\r\nimport { SlotProps } from \"@radix-ui/react-slot\";\r\nimport { Control, ControllerProps, FieldPath, FieldValues } from \"react-hook-form\";\r\nimport { TextField, TextFieldProps } from \"../text-field/TextField\";\r\n\r\ntype FormInputProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = Omit<ControllerProps<TFieldValues, TName>, \"render\"> &\r\n React.ComponentProps<typeof FormItem> & {\r\n label: string;\r\n control: Control<TFieldValues>;\r\n required?: boolean;\r\n readOnly?: boolean;\r\n slotProps?: {\r\n formLabelProps?: React.HTMLAttributes<HTMLLabelElement> & React.RefAttributes<HTMLLabelElement>;\r\n formMessageProps?: React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>;\r\n formControlProps?: Omit<SlotProps & React.RefAttributes<HTMLElement>, \"ref\"> & React.RefAttributes<HTMLElement>;\r\n textFieldProps?: TextFieldProps & React.RefAttributes<HTMLInputElement>;\r\n };\r\n };\r\n\r\nconst FormInput = <TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>(props: FormInputProps<TFieldValues, TName>) => {\r\n const { name, control, defaultValue, disabled, readOnly, rules, shouldUnregister, label, slotProps, required, ...formItemProps } = props;\r\n\r\n return (\r\n <FormField\r\n control={control}\r\n name={name}\r\n defaultValue={defaultValue}\r\n disabled={disabled}\r\n rules={rules}\r\n shouldUnregister={shouldUnregister}\r\n render={({ field }) => {\r\n return (\r\n <FormItem {...formItemProps}>\r\n <FormLabel {...(slotProps?.formLabelProps ?? {})}>\r\n {label}\r\n {required && <span className=\"text-danger text-sm leading-4\">*</span>}\r\n </FormLabel>\r\n <FormControl {...(slotProps?.formControlProps ?? {})}>\r\n <TextField\r\n {...(slotProps?.textFieldProps ?? {})}\r\n disabled={disabled || readOnly}\r\n slotProps={{ inputProps: { ...slotProps?.textFieldProps?.slotProps?.inputProps, ...field, \"aria-required\": required } }}\r\n />\r\n </FormControl>\r\n <FormMessage {...(slotProps?.formMessageProps ?? {})} />\r\n </FormItem>\r\n );\r\n }}\r\n />\r\n );\r\n};\r\nexport { FormInput, type FormInputProps };\r\n"],"names":["FormInput","props","name","control","defaultValue","disabled","readOnly","rules","shouldUnregister","label","slotProps","required","formItemProps","jsx","FormField","field","jsxs","FormItem","FormLabel","FormControl","TextField","FormMessage"],"mappings":";;;AAqBA,MAAMA,IAAY,CAA0EC,MAA+C;AACzI,QAAM,EAAE,MAAAC,GAAM,SAAAC,GAAS,cAAAC,GAAc,UAAAC,GAAU,UAAAC,GAAU,OAAAC,GAAO,kBAAAC,GAAkB,OAAAC,GAAO,WAAAC,GAAW,UAAAC,GAAU,GAAGC,MAAkBX;AAEnI,SACE,gBAAAY;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAAX;AAAA,MACA,MAAAD;AAAA,MACA,cAAAE;AAAA,MACA,UAAAC;AAAA,MACA,OAAAE;AAAA,MACA,kBAAAC;AAAA,MACA,QAAQ,CAAC,EAAE,OAAAO,QAEP,gBAAAC,EAACC,GAAA,EAAU,GAAGL,GACZ,UAAA;AAAA,QAAA,gBAAAI,EAACE,GAAA,EAAW,GAAIR,GAAW,kBAAkB,CAAA,GAC1C,UAAA;AAAA,UAAAD;AAAA,UACAE,KAAY,gBAAAE,EAAC,QAAA,EAAK,WAAU,iCAAgC,UAAA,IAAA,CAAC;AAAA,QAAA,GAChE;AAAA,0BACCM,GAAA,EAAa,GAAIT,GAAW,oBAAoB,CAAA,GAC/C,UAAA,gBAAAG;AAAA,UAACO;AAAA,UAAA;AAAA,YACE,GAAIV,GAAW,kBAAkB,CAAA;AAAA,YAClC,UAAUL,KAAYC;AAAA,YACtB,WAAW,EAAE,YAAY,EAAE,GAAGI,GAAW,gBAAgB,WAAW,YAAY,GAAGK,GAAO,iBAAiBJ,IAAS;AAAA,UAAE;AAAA,QAAA,GAE1H;AAAA,0BACCU,GAAA,EAAa,GAAIX,GAAW,oBAAoB,CAAA,EAAC,CAAI;AAAA,MAAA,GACxD;AAAA,IAEJ;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"forminput.es.js","sources":["../src/components/form-input/FormInput.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport { FormControl, FormField, FormItem, FormLabel, FormMessage } from \"../form/Form\";\r\nimport { SlotProps } from \"@radix-ui/react-slot\";\r\nimport { Control, ControllerProps, FieldPath, FieldValues } from \"react-hook-form\";\r\nimport { TextField, TextFieldProps } from \"../text-field/TextField\";\r\n\r\ntype FormInputProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = Omit<ControllerProps<TFieldValues, TName>, \"render\"> &\r\n React.ComponentProps<typeof FormItem> & {\r\n label: string;\r\n control: Control<TFieldValues>;\r\n required?: boolean;\r\n readOnly?: boolean;\r\n slotProps?: {\r\n formLabelProps?: React.HTMLAttributes<HTMLLabelElement> & React.RefAttributes<HTMLLabelElement>;\r\n formMessageProps?: React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>;\r\n formControlProps?: Omit<SlotProps & React.RefAttributes<HTMLElement>, \"ref\"> & React.RefAttributes<HTMLElement>;\r\n textFieldProps?: TextFieldProps & React.RefAttributes<HTMLInputElement>;\r\n };\r\n };\r\n\r\nconst FormInput = <TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>(props: FormInputProps<TFieldValues, TName>) => {\r\n const { name, control, defaultValue, disabled, readOnly, rules, shouldUnregister, label, slotProps, required, ...formItemProps } = props;\r\n\r\n return (\r\n <FormField\r\n control={control}\r\n name={name}\r\n defaultValue={defaultValue}\r\n disabled={disabled}\r\n rules={rules}\r\n shouldUnregister={shouldUnregister}\r\n render={({ field }) => {\r\n return (\r\n <FormItem {...formItemProps}>\r\n <FormLabel {...(slotProps?.formLabelProps ?? {})}>\r\n {label}\r\n {required && <span className=\"text-danger text-sm leading-4\">*</span>}\r\n </FormLabel>\r\n <FormControl {...(slotProps?.formControlProps ?? {})}>\r\n <TextField\r\n {...(slotProps?.textFieldProps ?? {})}\r\n disabled={disabled || readOnly}\r\n slotProps={{\r\n inputProps: {\r\n ...slotProps?.textFieldProps?.slotProps?.inputProps,\r\n ...field,\r\n \"aria-required\": required,\r\n disabled: disabled || readOnly,\r\n },\r\n }}\r\n />\r\n </FormControl>\r\n <FormMessage {...(slotProps?.formMessageProps ?? {})} />\r\n </FormItem>\r\n );\r\n }}\r\n />\r\n );\r\n};\r\nexport { FormInput, type FormInputProps };\r\n"],"names":["FormInput","props","name","control","defaultValue","disabled","readOnly","rules","shouldUnregister","label","slotProps","required","formItemProps","jsx","FormField","field","jsxs","FormItem","FormLabel","FormControl","TextField","FormMessage"],"mappings":";;;AAqBA,MAAMA,IAAY,CAA0EC,MAA+C;AACzI,QAAM,EAAE,MAAAC,GAAM,SAAAC,GAAS,cAAAC,GAAc,UAAAC,GAAU,UAAAC,GAAU,OAAAC,GAAO,kBAAAC,GAAkB,OAAAC,GAAO,WAAAC,GAAW,UAAAC,GAAU,GAAGC,MAAkBX;AAEnI,SACE,gBAAAY;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAAX;AAAA,MACA,MAAAD;AAAA,MACA,cAAAE;AAAA,MACA,UAAAC;AAAA,MACA,OAAAE;AAAA,MACA,kBAAAC;AAAA,MACA,QAAQ,CAAC,EAAE,OAAAO,QAEP,gBAAAC,EAACC,GAAA,EAAU,GAAGL,GACZ,UAAA;AAAA,QAAA,gBAAAI,EAACE,GAAA,EAAW,GAAIR,GAAW,kBAAkB,CAAA,GAC1C,UAAA;AAAA,UAAAD;AAAA,UACAE,KAAY,gBAAAE,EAAC,QAAA,EAAK,WAAU,iCAAgC,UAAA,IAAA,CAAC;AAAA,QAAA,GAChE;AAAA,0BACCM,GAAA,EAAa,GAAIT,GAAW,oBAAoB,CAAA,GAC/C,UAAA,gBAAAG;AAAA,UAACO;AAAA,UAAA;AAAA,YACE,GAAIV,GAAW,kBAAkB,CAAA;AAAA,YAClC,UAAUL,KAAYC;AAAA,YACtB,WAAW;AAAA,cACT,YAAY;AAAA,gBACV,GAAGI,GAAW,gBAAgB,WAAW;AAAA,gBACzC,GAAGK;AAAA,gBACH,iBAAiBJ;AAAA,gBACjB,UAAUN,KAAYC;AAAA,cAAA;AAAA,YACxB;AAAA,UACF;AAAA,QAAA,GAEJ;AAAA,0BACCe,GAAA,EAAa,GAAIX,GAAW,oBAAoB,CAAA,EAAC,CAAI;AAAA,MAAA,GACxD;AAAA,IAEJ;AAAA,EAAA;AAGN;"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@trsys-tech/matrix-library",
3
3
  "description": "MatrixUI Library",
4
4
  "private": false,
5
- "version": "0.5.9",
5
+ "version": "0.6.0-alpha.0",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",