@oneplatformdev/ui 0.0.1-beta.44 → 0.0.1-beta.45

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,5 +1,5 @@
1
- import * as React from "react";
2
- import * as AccordionPrimitive from "@radix-ui/react-accordion";
1
+ import * as React from 'react';
2
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
3
3
  declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
4
4
  declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -1,46 +1,49 @@
1
1
  import { jsx as a, jsxs as d } from "react/jsx-runtime";
2
- import * as i from "react";
2
+ import * as s from "react";
3
3
  import * as e from "@radix-ui/react-accordion";
4
4
  import { ChevronDown as m } from "lucide-react";
5
- import { cn as s } from "@oneplatformdev/utils";
6
- const g = e.Root, c = i.forwardRef(({ className: o, ...t }, r) => /* @__PURE__ */ a(
5
+ import { cn as c } from "@oneplatformdev/utils";
6
+ const u = e.Root, l = s.forwardRef(({ className: t, ...o }, r) => /* @__PURE__ */ a(
7
7
  e.Item,
8
8
  {
9
9
  ref: r,
10
- className: s("border-b", o),
11
- ...t
10
+ className: c("border-b", t),
11
+ ...o
12
12
  }
13
13
  ));
14
- c.displayName = "AccordionItem";
15
- const l = i.forwardRef(({ className: o, children: t, ...r }, n) => /* @__PURE__ */ a(e.Header, { className: "flex", children: /* @__PURE__ */ d(
14
+ l.displayName = "AccordionItem";
15
+ const f = s.forwardRef(({ className: t, children: o, ...r }, i) => /* @__PURE__ */ a(e.Header, { className: "flex", children: /* @__PURE__ */ d(
16
16
  e.Trigger,
17
17
  {
18
- ref: n,
19
- className: s(
18
+ ref: i,
19
+ className: c(
20
20
  "flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",
21
- o
21
+ t
22
22
  ),
23
+ onKeyDown: (n) => {
24
+ n.key === " " && n.target === n.currentTarget && n.preventDefault();
25
+ },
23
26
  ...r,
24
27
  children: [
25
- t,
28
+ o,
26
29
  /* @__PURE__ */ a(m, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
27
30
  ]
28
31
  }
29
32
  ) }));
30
- l.displayName = e.Trigger.displayName;
31
- const f = i.forwardRef(({ className: o, children: t, ...r }, n) => /* @__PURE__ */ a(
33
+ f.displayName = e.Trigger.displayName;
34
+ const p = s.forwardRef(({ className: t, children: o, ...r }, i) => /* @__PURE__ */ a(
32
35
  e.Content,
33
36
  {
34
- ref: n,
37
+ ref: i,
35
38
  className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
36
39
  ...r,
37
- children: /* @__PURE__ */ a("div", { className: s("pb-4 pt-0", o), children: t })
40
+ children: /* @__PURE__ */ a("div", { className: c("pb-4 pt-0", t), children: o })
38
41
  }
39
42
  ));
40
- f.displayName = e.Content.displayName;
43
+ p.displayName = e.Content.displayName;
41
44
  export {
42
- g as Accordion,
43
- f as AccordionContent,
44
- c as AccordionItem,
45
- l as AccordionTrigger
45
+ u as Accordion,
46
+ p as AccordionContent,
47
+ l as AccordionItem,
48
+ f as AccordionTrigger
46
49
  };
@@ -1,27 +1,29 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { DatePicker as c } from "../DatePicker/DatePicker.mjs";
3
- import { FormControl as i } from "../Form/Form.mjs";
4
- import { FormRenderControl as l } from "../Form/FormRenderControl.mjs";
5
- const f = (e) => {
6
- const { form: t, name: m, label: n, ...a } = e;
7
- return /* @__PURE__ */ o(
8
- l,
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { DatePicker as l } from "../DatePicker/DatePicker.mjs";
3
+ import { FormControl as p } from "../Form/Form.mjs";
4
+ import { FormRenderControl as s } from "../Form/FormRenderControl.mjs";
5
+ const h = (m) => {
6
+ const { form: n, name: a, label: c, onDateChange: r, ...i } = m;
7
+ return /* @__PURE__ */ e(
8
+ s,
9
9
  {
10
- form: t,
11
- name: m,
12
- label: n,
13
- render: ({ field: r }) => /* @__PURE__ */ o(i, { children: /* @__PURE__ */ o(
14
- c,
10
+ form: n,
11
+ name: a,
12
+ label: c,
13
+ render: ({ field: o }) => /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(
14
+ l,
15
15
  {
16
- ...r,
17
- ...a,
18
- selectedDate: r.value,
19
- onDateChange: r.onChange
16
+ ...o,
17
+ ...i,
18
+ selectedDate: o.value,
19
+ onDateChange: (t) => {
20
+ o.onChange(t), r == null || r(t);
21
+ }
20
22
  }
21
23
  ) })
22
24
  }
23
25
  );
24
26
  };
25
27
  export {
26
- f as FormDatePicker
28
+ h as FormDatePicker
27
29
  };
@@ -2,5 +2,5 @@ import { DatePickerProps } from '../DatePicker';
2
2
  import { FormRenderControlExtendProps } from '../Form';
3
3
  import { FieldValues } from 'react-hook-form/dist/types/fields';
4
4
 
5
- export interface FormDatePickerProps<Data extends FieldValues> extends FormRenderControlExtendProps<Data>, DatePickerProps {
5
+ export interface FormDatePickerProps<Data extends FieldValues> extends FormRenderControlExtendProps<Data>, Omit<DatePickerProps, 'onDateChange'>, Partial<Pick<DatePickerProps, 'onDateChange'>> {
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneplatformdev/ui",
3
- "version": "0.0.1-beta.44",
3
+ "version": "0.0.1-beta.45",
4
4
  "description": "UI React Components.",
5
5
  "author": "One Platform Development Team",
6
6
  "keywords": [
@@ -95,6 +95,7 @@
95
95
  "react-dropzone": "^14.3.5",
96
96
  "react-hook-form": "^7.54.2",
97
97
  "react-resizable-panels": "^2.1.7",
98
+ "react-textarea-autosize": "^8.5.7",
98
99
  "recharts": "^2.15.0",
99
100
  "sonner": "^1.7.1",
100
101
  "vaul": "^1.1.2",