@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.
- package/Accordion/Accordion.mjs +4 -4
- package/Select/Select.mjs +17 -16
- package/Select/Select.types.d.ts +1 -0
- package/package.json +1 -1
package/Accordion/Accordion.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { jsx as a, jsxs as
|
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 },
|
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:
|
18
|
+
ref: m,
|
19
19
|
className: c(
|
20
|
-
"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all
|
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
|
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
|
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
|
27
|
-
const { renderOption: n, option: e, index: l, options: r, deep: m = 0, ...
|
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
|
-
{ ...
|
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
|
-
{ ...
|
41
|
+
{ ...c, options: r },
|
41
42
|
/* @__PURE__ */ i(d, { ...t })
|
42
|
-
) }, e.value) : (
|
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((
|
49
|
+
(o = e.children) == null ? void 0 : o.map((s, h, v) => /* @__PURE__ */ f(
|
49
50
|
g,
|
50
51
|
{
|
51
52
|
...t,
|
52
|
-
key:
|
53
|
-
option:
|
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:
|
71
|
+
disabled: c
|
71
72
|
} = t;
|
72
|
-
return /* @__PURE__ */ u(
|
73
|
+
return /* @__PURE__ */ u(b, { value: n, onValueChange: l, disabled: c, children: [
|
73
74
|
/* @__PURE__ */ i(B, { ...t }),
|
74
|
-
/* @__PURE__ */ u(
|
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((
|
88
|
+
e.map((a, o) => /* @__PURE__ */ f(
|
88
89
|
g,
|
89
90
|
{
|
90
91
|
...t,
|
91
|
-
key:
|
92
|
-
option:
|
92
|
+
key: a.value,
|
93
|
+
option: a,
|
93
94
|
index: o,
|
94
95
|
deep: 0
|
95
96
|
}
|
package/Select/Select.types.d.ts
CHANGED