@oneplatformdev/ui 0.0.1-beta.89 → 0.0.1-beta.91

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,6 +2,8 @@ import * as React from 'react';
2
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
- declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
6
+ showChevron?: boolean;
7
+ } & React.RefAttributes<HTMLButtonElement>>;
6
8
  declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
9
  export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -1,9 +1,9 @@
1
1
  import { jsx as a, jsxs as d } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
3
  import * as e from "@radix-ui/react-accordion";
4
- import { ChevronDown as m } from "lucide-react";
4
+ import { ChevronDown as l } from "lucide-react";
5
5
  import { cn as c } from "@oneplatformdev/utils";
6
- const u = e.Root, l = s.forwardRef(({ className: t, ...o }, r) => /* @__PURE__ */ a(
6
+ const w = e.Root, f = s.forwardRef(({ className: t, ...o }, r) => /* @__PURE__ */ a(
7
7
  e.Item,
8
8
  {
9
9
  ref: r,
@@ -11,27 +11,27 @@ const u = e.Root, l = s.forwardRef(({ className: t, ...o }, r) => /* @__PURE__ *
11
11
  ...o
12
12
  }
13
13
  ));
14
- l.displayName = "AccordionItem";
15
- const f = s.forwardRef(({ className: t, children: o, ...r }, i) => /* @__PURE__ */ a(e.Header, { className: "flex", children: /* @__PURE__ */ d(
14
+ f.displayName = "AccordionItem";
15
+ const p = s.forwardRef(({ className: t, children: o, showChevron: r = !0, ...i }, m) => /* @__PURE__ */ a(e.Header, { className: "flex", children: /* @__PURE__ */ d(
16
16
  e.Trigger,
17
17
  {
18
- ref: i,
18
+ ref: m,
19
19
  className: c(
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",
20
+ "flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all text-left [&[data-state=open]>svg]:rotate-180",
21
21
  t
22
22
  ),
23
23
  onKeyDown: (n) => {
24
24
  n.key === " " && n.target === n.currentTarget && n.preventDefault();
25
25
  },
26
- ...r,
26
+ ...i,
27
27
  children: [
28
28
  o,
29
- /* @__PURE__ */ a(m, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
29
+ r && /* @__PURE__ */ a(l, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
30
30
  ]
31
31
  }
32
32
  ) }));
33
- f.displayName = e.Trigger.displayName;
34
- const p = s.forwardRef(({ className: t, children: o, ...r }, i) => /* @__PURE__ */ a(
33
+ p.displayName = e.Trigger.displayName;
34
+ const N = s.forwardRef(({ className: t, children: o, ...r }, i) => /* @__PURE__ */ a(
35
35
  e.Content,
36
36
  {
37
37
  ref: i,
@@ -40,10 +40,10 @@ const p = s.forwardRef(({ className: t, children: o, ...r }, i) => /* @__PURE__
40
40
  children: /* @__PURE__ */ a("div", { className: c("pb-4 pt-0", t), children: o })
41
41
  }
42
42
  ));
43
- p.displayName = e.Content.displayName;
43
+ N.displayName = e.Content.displayName;
44
44
  export {
45
- u as Accordion,
46
- p as AccordionContent,
47
- l as AccordionItem,
48
- f as AccordionTrigger
45
+ w as Accordion,
46
+ N as AccordionContent,
47
+ f as AccordionItem,
48
+ p as AccordionTrigger
49
49
  };
package/Select/Select.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsxs as u, jsx as i, Fragment as x } from "react/jsx-runtime";
2
- import { createElement as s, isValidElement as S } from "react";
2
+ import { createElement as f, isValidElement as S } from "react";
3
3
  import { Button as y } from "../Button/Button.mjs";
4
4
  import "../Button/buttonVariants.mjs";
5
- import { SelectRoot as R, SelectContent as b, SelectTrigger as C, SelectValue as V, SelectItem as p } from "./SelectRoot.mjs";
5
+ import { SelectRoot as b, SelectContent as R, SelectTrigger as C, SelectValue as V, SelectItem as p } from "./SelectRoot.mjs";
6
6
  import { isValidReactElement as k } from "@oneplatformdev/utils";
7
7
  const B = (t) => {
8
8
  const { placeholder: n, renderTrigger: e, slotProps: l } = t, r = /* @__PURE__ */ i(C, { ...(l == null ? void 0 : l.triggerProps) || {}, children: /* @__PURE__ */ i(V, { placeholder: n }) });
@@ -13,6 +13,7 @@ const B = (t) => {
13
13
  p,
14
14
  {
15
15
  value: e.value,
16
+ disabled: e.disabled,
16
17
  className: "cursor-pointer",
17
18
  style: { paddingLeft: `calc(8px + ${(l || 0) * 8}px)` },
18
19
  children: [
@@ -23,34 +24,34 @@ const B = (t) => {
23
24
  e.value
24
25
  );
25
26
  }, g = (t) => {
26
- var c, o;
27
- const { renderOption: n, option: e, index: l, options: r, deep: m = 0, ...a } = t;
27
+ var a, o;
28
+ const { renderOption: n, option: e, index: l, options: r, deep: m = 0, ...c } = t;
28
29
  return n && typeof n == "function" && S(
29
30
  n(
30
31
  e,
31
32
  l,
32
33
  r,
33
- { ...a, options: r },
34
+ { ...c, options: r },
34
35
  /* @__PURE__ */ i(d, { ...t })
35
36
  )
36
37
  ) ? /* @__PURE__ */ i(p, { value: e.value, children: n(
37
38
  e,
38
39
  l,
39
40
  r,
40
- { ...a, options: r },
41
+ { ...c, options: r },
41
42
  /* @__PURE__ */ i(d, { ...t })
42
- ) }, e.value) : (c = e.children) != null && c.length ? /* @__PURE__ */ u(
43
+ ) }, e.value) : (a = e.children) != null && a.length ? /* @__PURE__ */ u(
43
44
  "div",
44
45
  {
45
46
  className: "flex flex-col gap-1 truncate line-clamp-2",
46
47
  children: [
47
48
  /* @__PURE__ */ i(d, { ...t }),
48
- (o = e.children) == null ? void 0 : o.map((f, h, v) => /* @__PURE__ */ s(
49
+ (o = e.children) == null ? void 0 : o.map((s, h, v) => /* @__PURE__ */ f(
49
50
  g,
50
51
  {
51
52
  ...t,
52
- key: f.value,
53
- option: f,
53
+ key: s.value,
54
+ option: s,
54
55
  options: v,
55
56
  index: h,
56
57
  deep: (m || 0) + 1
@@ -67,11 +68,11 @@ const B = (t) => {
67
68
  onChange: l,
68
69
  nullable: r = !1,
69
70
  clearLabel: m = "Clear",
70
- disabled: a
71
+ disabled: c
71
72
  } = t;
72
- return /* @__PURE__ */ u(R, { value: n, onValueChange: l, disabled: a, children: [
73
+ return /* @__PURE__ */ u(b, { value: n, onValueChange: l, disabled: c, children: [
73
74
  /* @__PURE__ */ i(B, { ...t }),
74
- /* @__PURE__ */ u(b, { children: [
75
+ /* @__PURE__ */ u(R, { children: [
75
76
  r && /* @__PURE__ */ i(
76
77
  y,
77
78
  {
@@ -84,12 +85,12 @@ const B = (t) => {
84
85
  children: m
85
86
  }
86
87
  ),
87
- e.map((c, o) => /* @__PURE__ */ s(
88
+ e.map((a, o) => /* @__PURE__ */ f(
88
89
  g,
89
90
  {
90
91
  ...t,
91
- key: c.value,
92
- option: c,
92
+ key: a.value,
93
+ option: a,
93
94
  index: o,
94
95
  deep: 0
95
96
  }
@@ -4,6 +4,7 @@ import * as SelectPrimitive from '@radix-ui/react-select';
4
4
  export interface SelectOption<ExtendOptionData> {
5
5
  value: string;
6
6
  label?: ReactNode;
7
+ disabled?: boolean;
7
8
  data?: ExtendOptionData;
8
9
  children?: SelectOption<ExtendOptionData>[];
9
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneplatformdev/ui",
3
- "version": "0.0.1-beta.89",
3
+ "version": "0.0.1-beta.91",
4
4
  "description": "UI React Components.",
5
5
  "author": "One Platform Development Team",
6
6
  "keywords": [