@oneplatformdev/ui 0.0.1-beta.93 → 0.0.1-beta.96

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/Input/Input.mjs CHANGED
@@ -1,33 +1,39 @@
1
- import { jsxs as y, jsx as a } from "react/jsx-runtime";
2
- import d, { useState as b } from "react";
3
- import { Eye as v, EyeOff as w } from "lucide-react";
4
- import { inputVariants as h } from "./inputVariants.mjs";
1
+ import { jsxs as N, jsx as a } from "react/jsx-runtime";
2
+ import d, { useState as v } from "react";
3
+ import { Eye as w, EyeOff as h } from "lucide-react";
4
+ import { inputVariants as P } from "./inputVariants.mjs";
5
5
  import { cn as f } from "@oneplatformdev/utils";
6
6
  const p = d.forwardRef(
7
- (t, e) => {
7
+ (t, s) => {
8
8
  const {
9
- className: s,
9
+ className: e,
10
10
  variant: o,
11
11
  type: c,
12
12
  slotProps: { input: u, wrapper: n } = {},
13
- onChange: l,
14
- onTransform: i,
13
+ onChange: i,
14
+ onTransform: l,
15
15
  ...g
16
- } = t, { startAdornment: m } = u || {};
17
- return /* @__PURE__ */ y("div", { ...n || {}, className: f("relative", n == null ? void 0 : n.className), children: [
16
+ } = t, {
17
+ startAdornment: m,
18
+ className: I,
19
+ ...b
20
+ } = u || {};
21
+ return /* @__PURE__ */ N("div", { ...n || {}, className: f("relative", n == null ? void 0 : n.className), children: [
18
22
  !!m && /* @__PURE__ */ a("span", { className: "absolute left-[10px] top-1/2 -translate-y-1/2", children: m }),
19
23
  /* @__PURE__ */ a(
20
24
  "input",
21
25
  {
22
26
  type: c,
23
27
  className: f(
24
- h({ variant: o, className: s }),
25
- !!m && "pl-8"
28
+ P({ variant: o, className: e }),
29
+ !!m && "pl-8",
30
+ I
26
31
  ),
27
- ref: e,
32
+ ref: s,
33
+ ...b,
28
34
  ...g,
29
35
  onChange: (r) => {
30
- typeof (i == null ? void 0 : i(r.target.value, r)) == "string" && (r.target.value = i(r.target.value, r)), l && l(r);
36
+ typeof (l == null ? void 0 : l(r.target.value, r)) == "string" && (r.target.value = l(r.target.value, r)), i && i(r);
31
37
  }
32
38
  }
33
39
  )
@@ -35,33 +41,33 @@ const p = d.forwardRef(
35
41
  }
36
42
  );
37
43
  p.displayName = "Input";
38
- const N = d.forwardRef(
39
- (t, e) => {
40
- var n, l, i;
41
- const [s, o] = b(!1), c = s ? "text" : "password", u = () => {
42
- o(!s);
44
+ const y = d.forwardRef(
45
+ (t, s) => {
46
+ var n, i, l;
47
+ const [e, o] = v(!1), c = e ? "text" : "password", u = () => {
48
+ o(!e);
43
49
  };
44
- return /* @__PURE__ */ y("div", { ...((n = t == null ? void 0 : t.slotProps) == null ? void 0 : n.wrapper) || {}, className: f("relative", (i = (l = t == null ? void 0 : t.slotProps) == null ? void 0 : l.wrapper) == null ? void 0 : i.className), children: [
45
- /* @__PURE__ */ a(p, { ...t, type: c, className: "pr-8", ref: e }),
46
- /* @__PURE__ */ a(I, { isVisible: s, onClick: u })
50
+ return /* @__PURE__ */ N("div", { ...((n = t == null ? void 0 : t.slotProps) == null ? void 0 : n.wrapper) || {}, className: f("relative", (l = (i = t == null ? void 0 : t.slotProps) == null ? void 0 : i.wrapper) == null ? void 0 : l.className), children: [
51
+ /* @__PURE__ */ a(p, { ...t, type: c, className: "pr-8", ref: s }),
52
+ /* @__PURE__ */ a(x, { isVisible: e, onClick: u })
47
53
  ] });
48
54
  }
49
55
  );
50
- N.displayName = "PasswordInput";
51
- const I = ({ isVisible: t, onClick: e }) => /* @__PURE__ */ a(
56
+ y.displayName = "PasswordInput";
57
+ const x = ({ isVisible: t, onClick: s }) => /* @__PURE__ */ a(
52
58
  "button",
53
59
  {
54
60
  type: "button",
55
- onClick: e,
61
+ onClick: s,
56
62
  className: "absolute top-1/2 right-3 transform -translate-y-1/2",
57
- children: t ? /* @__PURE__ */ a(v, { size: 16 }) : /* @__PURE__ */ a(w, { size: 16 })
63
+ children: t ? /* @__PURE__ */ a(w, { size: 16 }) : /* @__PURE__ */ a(h, { size: 16 })
58
64
  }
59
- ), x = d.forwardRef(
60
- ({ type: t, ...e }, s) => t === "password" ? /* @__PURE__ */ a(N, { type: t, ...e, ref: s }) : /* @__PURE__ */ a(p, { type: t, ...e, ref: s })
65
+ ), V = d.forwardRef(
66
+ ({ type: t, ...s }, e) => t === "password" ? /* @__PURE__ */ a(y, { type: t, ...s, ref: e }) : /* @__PURE__ */ a(p, { type: t, ...s, ref: e })
61
67
  );
62
- x.displayName = "Input";
68
+ V.displayName = "Input";
63
69
  export {
64
70
  p as BaseInput,
65
- x as Input,
66
- N as PasswordInput
71
+ V as Input,
72
+ y as PasswordInput
67
73
  };
@@ -1,8 +1,9 @@
1
+ import { BaseInput } from './Input';
1
2
  import { inputVariants } from './inputVariants';
2
3
  import { VariantProps } from 'class-variance-authority';
3
- import { default as React, ChangeEvent, HTMLAttributes, ReactNode } from 'react';
4
+ import { default as React, ChangeEvent, ComponentPropsWithoutRef, HTMLAttributes, ReactNode } from 'react';
4
5
 
5
- export interface InputSlotInputProps {
6
+ export interface InputSlotInputProps extends ComponentPropsWithoutRef<typeof BaseInput> {
6
7
  startAdornment?: ReactNode;
7
8
  }
8
9
  export interface InputSlotProps {
package/Sheet/Sheet.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import * as React from "react";
3
- import * as SheetPrimitive from "@radix-ui/react-dialog";
2
+ import * as React from 'react';
3
+ import * as SheetPrimitive from '@radix-ui/react-dialog';
4
4
  declare const Sheet: React.FC<SheetPrimitive.DialogProps>;
5
5
  declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
6
  declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
@@ -10,6 +10,9 @@ declare const sheetVariants: (props?: ({
10
10
  side?: "top" | "right" | "bottom" | "left" | null | undefined;
11
11
  } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
12
12
  interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
13
+ slotProps?: {
14
+ overlay?: React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>;
15
+ };
13
16
  }
14
17
  declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
15
18
  declare const SheetHeader: {
package/Sheet/Sheet.mjs CHANGED
@@ -1,10 +1,10 @@
1
- import { jsx as o, jsxs as n } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
2
  import * as r from "react";
3
3
  import * as e from "@radix-ui/react-dialog";
4
- import { cva as c } from "class-variance-authority";
5
- import { X as f } from "lucide-react";
4
+ import { cva as f } from "class-variance-authority";
5
+ import { X as p } from "lucide-react";
6
6
  import { cn as i } from "@oneplatformdev/utils";
7
- const C = e.Root, R = e.Trigger, T = e.Close, p = e.Portal, d = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
7
+ const R = e.Root, T = e.Trigger, j = e.Close, h = e.Portal, l = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
8
8
  e.Overlay,
9
9
  {
10
10
  className: i(
@@ -15,8 +15,8 @@ const C = e.Root, R = e.Trigger, T = e.Close, p = e.Portal, d = r.forwardRef(({
15
15
  ref: s
16
16
  }
17
17
  ));
18
- d.displayName = e.Overlay.displayName;
19
- const h = c(
18
+ l.displayName = e.Overlay.displayName;
19
+ const g = f(
20
20
  "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
21
21
  {
22
22
  variants: {
@@ -31,17 +31,17 @@ const h = c(
31
31
  side: "right"
32
32
  }
33
33
  }
34
- ), g = r.forwardRef(({ side: t = "right", className: a, children: s, ...l }, m) => /* @__PURE__ */ n(p, { children: [
35
- /* @__PURE__ */ o(d, {}),
36
- /* @__PURE__ */ n(
34
+ ), u = r.forwardRef(({ side: t = "right", className: a, children: s, slotProps: n, ...m }, c) => /* @__PURE__ */ d(h, { children: [
35
+ /* @__PURE__ */ o(l, { ...(n == null ? void 0 : n.overlay) || {} }),
36
+ /* @__PURE__ */ d(
37
37
  e.Content,
38
38
  {
39
- ref: m,
40
- className: i(h({ side: t }), a),
41
- ...l,
39
+ ref: c,
40
+ className: i(g({ side: t }), a),
41
+ ...m,
42
42
  children: [
43
- /* @__PURE__ */ n(e.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
44
- /* @__PURE__ */ o(f, { className: "h-4 w-4" }),
43
+ /* @__PURE__ */ d(e.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
44
+ /* @__PURE__ */ o(p, { className: "h-4 w-4" }),
45
45
  /* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
46
46
  ] }),
47
47
  s
@@ -49,8 +49,8 @@ const h = c(
49
49
  }
50
50
  )
51
51
  ] }));
52
- g.displayName = e.Content.displayName;
53
- const u = ({
52
+ u.displayName = e.Content.displayName;
53
+ const y = ({
54
54
  className: t,
55
55
  ...a
56
56
  }) => /* @__PURE__ */ o(
@@ -63,8 +63,8 @@ const u = ({
63
63
  ...a
64
64
  }
65
65
  );
66
- u.displayName = "SheetHeader";
67
- const y = ({
66
+ y.displayName = "SheetHeader";
67
+ const x = ({
68
68
  className: t,
69
69
  ...a
70
70
  }) => /* @__PURE__ */ o(
@@ -77,8 +77,8 @@ const y = ({
77
77
  ...a
78
78
  }
79
79
  );
80
- y.displayName = "SheetFooter";
81
- const x = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
80
+ x.displayName = "SheetFooter";
81
+ const N = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
82
82
  e.Title,
83
83
  {
84
84
  ref: s,
@@ -86,8 +86,8 @@ const x = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
86
86
  ...a
87
87
  }
88
88
  ));
89
- x.displayName = e.Title.displayName;
90
- const N = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
89
+ N.displayName = e.Title.displayName;
90
+ const b = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
91
91
  e.Description,
92
92
  {
93
93
  ref: s,
@@ -95,16 +95,16 @@ const N = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
95
95
  ...a
96
96
  }
97
97
  ));
98
- N.displayName = e.Description.displayName;
98
+ b.displayName = e.Description.displayName;
99
99
  export {
100
- C as Sheet,
101
- T as SheetClose,
102
- g as SheetContent,
103
- N as SheetDescription,
104
- y as SheetFooter,
105
- u as SheetHeader,
106
- d as SheetOverlay,
107
- p as SheetPortal,
108
- x as SheetTitle,
109
- R as SheetTrigger
100
+ R as Sheet,
101
+ j as SheetClose,
102
+ u as SheetContent,
103
+ b as SheetDescription,
104
+ x as SheetFooter,
105
+ y as SheetHeader,
106
+ l as SheetOverlay,
107
+ h as SheetPortal,
108
+ N as SheetTitle,
109
+ T as SheetTrigger
110
110
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneplatformdev/ui",
3
- "version": "0.0.1-beta.93",
3
+ "version": "0.0.1-beta.96",
4
4
  "description": "UI React Components.",
5
5
  "author": "One Platform Development Team",
6
6
  "keywords": [