@oneplatformdev/ui 0.0.1-beta.146 → 0.0.1-beta.147

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.
Files changed (2) hide show
  1. package/Dialog/Dialog.mjs +38 -38
  2. package/package.json +1 -1
package/Dialog/Dialog.mjs CHANGED
@@ -1,34 +1,34 @@
1
1
  import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
2
  import i, { useState as y, useRef as N } from "react";
3
- import * as t from "@radix-ui/react-dialog";
3
+ import * as a from "@radix-ui/react-dialog";
4
4
  import { XIcon as D } from "lucide-react";
5
- import { cn as r, composeRefs as b } from "@oneplatformdev/utils";
5
+ import { cn as l, composeRefs as b } from "@oneplatformdev/utils";
6
6
  import { DialogOverlayScope as h } from "./DialogOverlayScope.mjs";
7
7
  const F = (e) => {
8
- const { modal: a = !1, ...s } = e;
8
+ const { modal: t, ...s } = e;
9
9
  return /* @__PURE__ */ o(
10
- t.Root,
10
+ a.Root,
11
11
  {
12
- modal: a,
12
+ modal: t,
13
13
  ...s
14
14
  }
15
15
  );
16
- }, H = t.Trigger, v = t.Portal, _ = t.Close, c = i.forwardRef(({ className: e, ...a }, s) => /* @__PURE__ */ o(
17
- t.Overlay,
16
+ }, H = a.Trigger, v = a.Portal, _ = a.Close, c = i.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ o(
17
+ a.Overlay,
18
18
  {
19
19
  ref: s,
20
- className: r(
20
+ className: l(
21
21
  "fixed inset-0 z-40 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
22
22
  e
23
23
  ),
24
- ...a
24
+ ...t
25
25
  }
26
26
  ));
27
- c.displayName = t.Overlay.displayName;
27
+ c.displayName = a.Overlay.displayName;
28
28
  const w = i.forwardRef(
29
29
  ({
30
30
  className: e,
31
- children: a,
31
+ children: t,
32
32
  showCloseButton: s = !0,
33
33
  onOpenAutoFocus: n,
34
34
  preventAutoFocus: f,
@@ -38,27 +38,27 @@ const w = i.forwardRef(
38
38
  return /* @__PURE__ */ d(v, { children: [
39
39
  /* @__PURE__ */ o(c, {}),
40
40
  /* @__PURE__ */ o(h, { value: g, children: /* @__PURE__ */ d(
41
- t.Content,
41
+ a.Content,
42
42
  {
43
- ref: (l) => {
44
- l && b(p, x)(l);
43
+ ref: (r) => {
44
+ r && b(p, x)(r);
45
45
  },
46
- className: r(
46
+ className: l(
47
47
  "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg",
48
48
  "duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
49
49
  "max-w-[90%] max-h-[90%] overflow-hidden",
50
50
  "bg-[#FCFCFC] border border-[#E8E9EB] rounded-[16px]",
51
51
  e
52
52
  ),
53
- onOpenAutoFocus: (l) => (f && l.preventDefault(), n == null ? void 0 : n(l)),
53
+ onOpenAutoFocus: (r) => (f && r.preventDefault(), n == null ? void 0 : n(r)),
54
54
  ...m,
55
55
  children: [
56
- a,
56
+ t,
57
57
  s && /* @__PURE__ */ d(
58
- t.Close,
58
+ a.Close,
59
59
  {
60
60
  "aria-label": "Close",
61
- className: r(
61
+ className: l(
62
62
  "absolute right-4 top-4 rounded-sm ring-offset-background w-10 aspect-square",
63
63
  "flex items-center justify-center",
64
64
  "data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
@@ -81,64 +81,64 @@ const w = i.forwardRef(
81
81
  /* @__PURE__ */ o(
82
82
  "div",
83
83
  {
84
- ref: (l) => {
85
- l && u(l);
84
+ ref: (r) => {
85
+ r && u(r);
86
86
  }
87
87
  }
88
88
  )
89
89
  ] });
90
90
  }
91
91
  );
92
- w.displayName = t.Content.displayName;
92
+ w.displayName = a.Content.displayName;
93
93
  const C = ({
94
94
  className: e,
95
- ...a
95
+ ...t
96
96
  }) => /* @__PURE__ */ o(
97
97
  "div",
98
98
  {
99
- className: r(
99
+ className: l(
100
100
  "flex flex-col space-y-1.5 text-center sm:text-left",
101
101
  e
102
102
  ),
103
- ...a
103
+ ...t
104
104
  }
105
105
  );
106
106
  C.displayName = "DialogHeader";
107
107
  const R = ({
108
108
  className: e,
109
- ...a
109
+ ...t
110
110
  }) => /* @__PURE__ */ o(
111
111
  "div",
112
112
  {
113
- className: r(
113
+ className: l(
114
114
  "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
115
115
  e
116
116
  ),
117
- ...a
117
+ ...t
118
118
  }
119
119
  );
120
120
  R.displayName = "DialogFooter";
121
- const T = i.forwardRef(({ className: e, ...a }, s) => /* @__PURE__ */ o(
122
- t.Title,
121
+ const T = i.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ o(
122
+ a.Title,
123
123
  {
124
124
  ref: s,
125
- className: r(
125
+ className: l(
126
126
  "text-lg font-semibold leading-none tracking-tight",
127
127
  e
128
128
  ),
129
- ...a
129
+ ...t
130
130
  }
131
131
  ));
132
- T.displayName = t.Title.displayName;
133
- const j = i.forwardRef(({ className: e, ...a }, s) => /* @__PURE__ */ o(
134
- t.Description,
132
+ T.displayName = a.Title.displayName;
133
+ const j = i.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ o(
134
+ a.Description,
135
135
  {
136
136
  ref: s,
137
- className: r("text-sm text-muted-foreground", e),
138
- ...a
137
+ className: l("text-sm text-muted-foreground", e),
138
+ ...t
139
139
  }
140
140
  ));
141
- j.displayName = t.Description.displayName;
141
+ j.displayName = a.Description.displayName;
142
142
  export {
143
143
  F as Dialog,
144
144
  _ as DialogClose,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneplatformdev/ui",
3
- "version": "0.0.1-beta.146",
3
+ "version": "0.0.1-beta.147",
4
4
  "description": "UI React Components.",
5
5
  "author": "One Platform Development Team",
6
6
  "keywords": [