@oneplatformdev/ui 0.0.1-beta.90 → 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.
@@ -1,4 +1,4 @@
1
- import { jsx as a, jsxs as m } from "react/jsx-runtime";
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
4
  import { ChevronDown as l } from "lucide-react";
@@ -12,12 +12,12 @@ const w = e.Root, f = s.forwardRef(({ className: t, ...o }, r) => /* @__PURE__ *
12
12
  }
13
13
  ));
14
14
  f.displayName = "AccordionItem";
15
- const p = s.forwardRef(({ className: t, children: o, showChevron: r = !0, ...i }, d) => /* @__PURE__ */ a(e.Header, { className: "flex", children: /* @__PURE__ */ m(
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: d,
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) => {
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.90",
3
+ "version": "0.0.1-beta.91",
4
4
  "description": "UI React Components.",
5
5
  "author": "One Platform Development Team",
6
6
  "keywords": [