@clasing/ui 2.9.2 → 2.9.3

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,14 +1,4 @@
1
- import { j as n, c as s } from "../index-C_XDkVGm.js";
2
- function o({ className: e, ...t }) {
3
- return /* @__PURE__ */ n.jsx(
4
- "div",
5
- {
6
- "data-slot": "skeleton",
7
- className: s("bg-accent animate-pulse rounded-md", e),
8
- ...t
9
- }
10
- );
11
- }
1
+ import { S as r } from "../skeleton-DcjuJ5_d.js";
12
2
  export {
13
- o as Skeleton
3
+ r as Skeleton
14
4
  };
@@ -0,0 +1,313 @@
1
+ import { j as t, c as r } from "./index-C_XDkVGm.js";
2
+ import * as o from "@radix-ui/react-dropdown-menu";
3
+ import { CheckIcon as d, CircleIcon as i, CaretRightIcon as u } from "@phosphor-icons/react";
4
+ function p({
5
+ ...e
6
+ }) {
7
+ return /* @__PURE__ */ t.jsx(o.Root, { "data-slot": "dropdown-menu", ...e });
8
+ }
9
+ function m({
10
+ ...e
11
+ }) {
12
+ return /* @__PURE__ */ t.jsx(o.Portal, { "data-slot": "dropdown-menu-portal", ...e });
13
+ }
14
+ function f({
15
+ ...e
16
+ }) {
17
+ return /* @__PURE__ */ t.jsx(
18
+ o.Trigger,
19
+ {
20
+ "data-slot": "dropdown-menu-trigger",
21
+ ...e
22
+ }
23
+ );
24
+ }
25
+ function g({
26
+ className: e,
27
+ sideOffset: n = 4,
28
+ collisionPadding: a = 24,
29
+ ...s
30
+ }) {
31
+ return /* @__PURE__ */ t.jsx(o.Portal, { children: /* @__PURE__ */ t.jsx(
32
+ o.Content,
33
+ {
34
+ "data-slot": "dropdown-menu-content",
35
+ sideOffset: n,
36
+ className: r(
37
+ `
38
+ z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32
39
+ origin-(--radix-dropdown-menu-content-transform-origin)
40
+ overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1
41
+ text-popover-foreground shadow-md
42
+ data-[side=bottom]:slide-in-from-top-2
43
+ data-[side=left]:slide-in-from-right-2
44
+ data-[side=right]:slide-in-from-left-2
45
+ data-[side=top]:slide-in-from-bottom-2
46
+ data-[state=closed]:animate-out data-[state=closed]:fade-out-0
47
+ data-[state=closed]:zoom-out-95
48
+ data-[state=open]:animate-in data-[state=open]:fade-in-0
49
+ data-[state=open]:zoom-in-95
50
+ `,
51
+ e
52
+ ),
53
+ collisionPadding: a,
54
+ ...s
55
+ }
56
+ ) });
57
+ }
58
+ function x({
59
+ ...e
60
+ }) {
61
+ return /* @__PURE__ */ t.jsx(o.Group, { "data-slot": "dropdown-menu-group", ...e });
62
+ }
63
+ function v({
64
+ className: e,
65
+ inset: n,
66
+ variant: a = "default",
67
+ ...s
68
+ }) {
69
+ return /* @__PURE__ */ t.jsx(
70
+ o.Item,
71
+ {
72
+ "data-slot": "dropdown-menu-item",
73
+ "data-inset": n,
74
+ "data-variant": a,
75
+ className: r(
76
+ `
77
+ relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5
78
+ paragraph-sm outline-hidden select-none
79
+ focus:bg-accent focus:text-accent-foreground
80
+ data-disabled:pointer-events-none data-disabled:opacity-50
81
+ data-inset:pl-8
82
+ data-[variant=destructive]:text-destructive-foreground
83
+ data-[variant=destructive]:focus:bg-destructive
84
+ data-[variant=destructive]:focus:text-destructive-foreground
85
+ dark:data-[variant=destructive]:focus:bg-destructive/80
86
+ [&_svg]:pointer-events-none [&_svg]:shrink-0
87
+ [&_svg:not([class*='size-'])]:size-4
88
+ data-[variant=destructive]:*:[svg]:text-destructive-foreground!
89
+ `,
90
+ e
91
+ ),
92
+ ...s
93
+ }
94
+ );
95
+ }
96
+ function b({
97
+ className: e,
98
+ children: n,
99
+ checked: a,
100
+ ...s
101
+ }) {
102
+ return /* @__PURE__ */ t.jsxs(
103
+ o.CheckboxItem,
104
+ {
105
+ "data-slot": "dropdown-menu-checkbox-item",
106
+ className: r(
107
+ `
108
+ relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2
109
+ pl-8 paragraph-sm outline-hidden select-none
110
+ focus:bg-accent focus:text-accent-foreground
111
+ data-disabled:pointer-events-none data-disabled:opacity-50
112
+ [&_svg]:pointer-events-none [&_svg]:shrink-0
113
+ [&_svg:not([class*='size-'])]:size-4
114
+ `,
115
+ e
116
+ ),
117
+ checked: a,
118
+ ...s,
119
+ children: [
120
+ /* @__PURE__ */ t.jsx(
121
+ "span",
122
+ {
123
+ className: `\r
124
+ pointer-events-none absolute left-2 flex size-3.5 items-center\r
125
+ justify-center\r
126
+ `,
127
+ children: /* @__PURE__ */ t.jsx(o.ItemIndicator, { children: /* @__PURE__ */ t.jsx(d, { className: "size-4" }) })
128
+ }
129
+ ),
130
+ n
131
+ ]
132
+ }
133
+ );
134
+ }
135
+ function h({
136
+ ...e
137
+ }) {
138
+ return /* @__PURE__ */ t.jsx(
139
+ o.RadioGroup,
140
+ {
141
+ "data-slot": "dropdown-menu-radio-group",
142
+ ...e
143
+ }
144
+ );
145
+ }
146
+ function w({
147
+ className: e,
148
+ children: n,
149
+ ...a
150
+ }) {
151
+ return /* @__PURE__ */ t.jsxs(
152
+ o.RadioItem,
153
+ {
154
+ "data-slot": "dropdown-menu-radio-item",
155
+ className: r(
156
+ `
157
+ relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2
158
+ pl-8 paragraph-sm outline-hidden select-none
159
+ focus:bg-accent focus:text-accent-foreground
160
+ data-disabled:pointer-events-none data-disabled:opacity-50
161
+ [&_svg]:pointer-events-none [&_svg]:shrink-0
162
+ [&_svg:not([class*='size-'])]:size-4
163
+ `,
164
+ e
165
+ ),
166
+ ...a,
167
+ children: [
168
+ /* @__PURE__ */ t.jsx(
169
+ "span",
170
+ {
171
+ className: `\r
172
+ pointer-events-none absolute left-2 flex size-3.5 items-center\r
173
+ justify-center\r
174
+ `,
175
+ children: /* @__PURE__ */ t.jsx(o.ItemIndicator, { children: /* @__PURE__ */ t.jsx(i, { weight: "fill", className: "size-2 fill-current" }) })
176
+ }
177
+ ),
178
+ n
179
+ ]
180
+ }
181
+ );
182
+ }
183
+ function j({
184
+ className: e,
185
+ inset: n,
186
+ ...a
187
+ }) {
188
+ return /* @__PURE__ */ t.jsx(
189
+ o.Label,
190
+ {
191
+ "data-slot": "dropdown-menu-label",
192
+ "data-inset": n,
193
+ className: r(
194
+ `
195
+ px-2 py-1.5 paragraph-sm font-semibold
196
+ data-inset:pl-8
197
+ `,
198
+ e
199
+ ),
200
+ ...a
201
+ }
202
+ );
203
+ }
204
+ function z({
205
+ className: e,
206
+ ...n
207
+ }) {
208
+ return /* @__PURE__ */ t.jsx(
209
+ o.Separator,
210
+ {
211
+ "data-slot": "dropdown-menu-separator",
212
+ className: r("-mx-1 my-1 h-px bg-border", e),
213
+ ...n
214
+ }
215
+ );
216
+ }
217
+ function D({
218
+ className: e,
219
+ ...n
220
+ }) {
221
+ return /* @__PURE__ */ t.jsx(
222
+ "span",
223
+ {
224
+ "data-slot": "dropdown-menu-shortcut",
225
+ className: r(
226
+ "ml-auto paragraph-xs tracking-widest text-muted-foreground",
227
+ e
228
+ ),
229
+ ...n
230
+ }
231
+ );
232
+ }
233
+ function M({
234
+ ...e
235
+ }) {
236
+ return /* @__PURE__ */ t.jsx(o.Sub, { "data-slot": "dropdown-menu-sub", ...e });
237
+ }
238
+ function N({
239
+ className: e,
240
+ inset: n,
241
+ children: a,
242
+ ...s
243
+ }) {
244
+ return /* @__PURE__ */ t.jsxs(
245
+ o.SubTrigger,
246
+ {
247
+ "data-slot": "dropdown-menu-sub-trigger",
248
+ "data-inset": n,
249
+ className: r(
250
+ `
251
+ relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5
252
+ paragraph-sm outline-hidden select-none
253
+ focus:bg-accent focus:text-accent-foreground
254
+ data-disabled:pointer-events-none data-disabled:opacity-50
255
+ data-inset:pl-8
256
+ [&_svg]:pointer-events-none [&_svg]:shrink-0
257
+ [&_svg:not([class*='size-'])]:size-4
258
+ `,
259
+ e
260
+ ),
261
+ ...s,
262
+ children: [
263
+ a,
264
+ /* @__PURE__ */ t.jsx(u, { className: "ml-auto size-4" })
265
+ ]
266
+ }
267
+ );
268
+ }
269
+ function y({
270
+ className: e,
271
+ ...n
272
+ }) {
273
+ return /* @__PURE__ */ t.jsx(
274
+ o.SubContent,
275
+ {
276
+ "data-slot": "dropdown-menu-sub-content",
277
+ className: r(
278
+ `
279
+ z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin)
280
+ overflow-hidden rounded-md border bg-popover p-1
281
+ text-popover-foreground shadow-lg
282
+ data-[side=bottom]:slide-in-from-top-2
283
+ data-[side=left]:slide-in-from-right-2
284
+ data-[side=right]:slide-in-from-left-2
285
+ data-[side=top]:slide-in-from-bottom-2
286
+ data-[state=closed]:animate-out data-[state=closed]:fade-out-0
287
+ data-[state=closed]:zoom-out-95
288
+ data-[state=open]:animate-in data-[state=open]:fade-in-0
289
+ data-[state=open]:zoom-in-95
290
+ `,
291
+ e
292
+ ),
293
+ ...n
294
+ }
295
+ );
296
+ }
297
+ export {
298
+ p as D,
299
+ b as a,
300
+ g as b,
301
+ x as c,
302
+ v as d,
303
+ j as e,
304
+ m as f,
305
+ h as g,
306
+ w as h,
307
+ z as i,
308
+ D as j,
309
+ M as k,
310
+ y as l,
311
+ N as m,
312
+ f as n
313
+ };
@@ -0,0 +1,2 @@
1
+ import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarSubMenu, SidebarSubMenuContent, SidebarSubMenuItem, SidebarSubMenuTrigger, SidebarTrigger, useSidebar } from '../components/sidebar';
2
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarSubMenu, SidebarSubMenuContent, SidebarSubMenuItem, SidebarSubMenuTrigger, SidebarTrigger, useSidebar, };
@@ -0,0 +1,166 @@
1
+ import { j as e, c as s } from "./index-C_XDkVGm.js";
2
+ import * as o from "@radix-ui/react-dialog";
3
+ import { XIcon as i } from "@phosphor-icons/react";
4
+ function f({ ...t }) {
5
+ return /* @__PURE__ */ e.jsx(o.Root, { "data-slot": "sheet", ...t });
6
+ }
7
+ function h({
8
+ ...t
9
+ }) {
10
+ return /* @__PURE__ */ e.jsx(o.Trigger, { "data-slot": "sheet-trigger", ...t });
11
+ }
12
+ function m({
13
+ ...t
14
+ }) {
15
+ return /* @__PURE__ */ e.jsx(o.Close, { "data-slot": "sheet-close", ...t });
16
+ }
17
+ function l({
18
+ ...t
19
+ }) {
20
+ return /* @__PURE__ */ e.jsx(o.Portal, { "data-slot": "sheet-portal", ...t });
21
+ }
22
+ function d({
23
+ className: t,
24
+ ...a
25
+ }) {
26
+ return /* @__PURE__ */ e.jsx(
27
+ o.Overlay,
28
+ {
29
+ "data-slot": "sheet-overlay",
30
+ className: s(
31
+ `
32
+ fixed inset-0 z-50 bg-black/50
33
+ data-[state=closed]:animate-out data-[state=closed]:fade-out-0
34
+ data-[state=open]:animate-in data-[state=open]:fade-in-0
35
+ `,
36
+ t
37
+ ),
38
+ ...a
39
+ }
40
+ );
41
+ }
42
+ function p({
43
+ className: t,
44
+ children: a,
45
+ side: n = "right",
46
+ ...r
47
+ }) {
48
+ return /* @__PURE__ */ e.jsxs(l, { children: [
49
+ /* @__PURE__ */ e.jsx(d, {}),
50
+ /* @__PURE__ */ e.jsxs(
51
+ o.Content,
52
+ {
53
+ "data-slot": "sheet-content",
54
+ className: s(
55
+ `
56
+ fixed z-50 flex flex-col gap-4 bg-background text-foreground
57
+ shadow-lg transition ease-in-out
58
+ data-[state=closed]:animate-out data-[state=closed]:duration-300
59
+ data-[state=open]:animate-in data-[state=open]:duration-500
60
+ `,
61
+ n === "right" && `
62
+ inset-y-0 right-0 h-full w-3/4 border-l
63
+ data-[state=closed]:slide-out-to-right
64
+ data-[state=open]:slide-in-from-right
65
+ sm:max-w-sm
66
+ `,
67
+ n === "left" && `
68
+ inset-y-0 left-0 h-full w-3/4 border-r
69
+ data-[state=closed]:slide-out-to-left
70
+ data-[state=open]:slide-in-from-left
71
+ sm:max-w-sm
72
+ `,
73
+ n === "top" && `
74
+ inset-x-0 top-0 h-auto border-b
75
+ data-[state=closed]:slide-out-to-top
76
+ data-[state=open]:slide-in-from-top
77
+ `,
78
+ n === "bottom" && `
79
+ inset-x-0 bottom-0 h-auto border-t
80
+ data-[state=closed]:slide-out-to-bottom
81
+ data-[state=open]:slide-in-from-bottom
82
+ `,
83
+ t
84
+ ),
85
+ ...r,
86
+ children: [
87
+ a,
88
+ /* @__PURE__ */ e.jsxs(
89
+ o.Close,
90
+ {
91
+ className: `\r
92
+ absolute top-4 right-4 rounded-xs text-foreground opacity-70\r
93
+ ring-offset-background transition-opacity\r
94
+ hover:opacity-100\r
95
+ focus:ring-2 focus:ring-ring focus:ring-offset-2\r
96
+ focus:outline-hidden\r
97
+ disabled:pointer-events-none\r
98
+ data-[state=open]:bg-secondary\r
99
+ `,
100
+ children: [
101
+ /* @__PURE__ */ e.jsx(i, { className: "size-4" }),
102
+ /* @__PURE__ */ e.jsx("span", { className: "sr-only", children: "Close" })
103
+ ]
104
+ }
105
+ )
106
+ ]
107
+ }
108
+ )
109
+ ] });
110
+ }
111
+ function x({ className: t, ...a }) {
112
+ return /* @__PURE__ */ e.jsx(
113
+ "div",
114
+ {
115
+ "data-slot": "sheet-header",
116
+ className: s("flex flex-col gap-1.5 p-4", t),
117
+ ...a
118
+ }
119
+ );
120
+ }
121
+ function g({ className: t, ...a }) {
122
+ return /* @__PURE__ */ e.jsx(
123
+ "div",
124
+ {
125
+ "data-slot": "sheet-footer",
126
+ className: s("mt-auto flex flex-col gap-2 p-4", t),
127
+ ...a
128
+ }
129
+ );
130
+ }
131
+ function b({
132
+ className: t,
133
+ ...a
134
+ }) {
135
+ return /* @__PURE__ */ e.jsx(
136
+ o.Title,
137
+ {
138
+ "data-slot": "sheet-title",
139
+ className: s("font-semibold text-foreground", t),
140
+ ...a
141
+ }
142
+ );
143
+ }
144
+ function j({
145
+ className: t,
146
+ ...a
147
+ }) {
148
+ return /* @__PURE__ */ e.jsx(
149
+ o.Description,
150
+ {
151
+ "data-slot": "sheet-description",
152
+ className: s("paragraph-sm text-muted-foreground", t),
153
+ ...a
154
+ }
155
+ );
156
+ }
157
+ export {
158
+ f as S,
159
+ m as a,
160
+ p as b,
161
+ j as c,
162
+ g as d,
163
+ x as e,
164
+ b as f,
165
+ h as g
166
+ };
@@ -0,0 +1,14 @@
1
+ import { j as s, c as a } from "./index-C_XDkVGm.js";
2
+ function o({ className: e, ...t }) {
3
+ return /* @__PURE__ */ s.jsx(
4
+ "div",
5
+ {
6
+ "data-slot": "skeleton",
7
+ className: a("bg-accent animate-pulse rounded-md", e),
8
+ ...t
9
+ }
10
+ );
11
+ }
12
+ export {
13
+ o as S
14
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clasing/ui",
3
- "version": "2.9.2",
3
+ "version": "2.9.3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -211,6 +211,10 @@
211
211
  "import": "./dist/components/field.js",
212
212
  "types": "./dist/components/field.d.ts"
213
213
  },
214
+ "./sidebar": {
215
+ "import": "./dist/components/sidebar.js",
216
+ "types": "./dist/components/sidebar.d.ts"
217
+ },
214
218
  "./blocks/interactive-card": {
215
219
  "import": "./dist/components/blocks/interactive-card.js",
216
220
  "types": "./dist/components/blocks/interactive-card.d.ts"