@vertz/theme-shadcn 0.2.41 → 0.2.42
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/dist/index.js +52 -79
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -266,7 +266,7 @@ function createThemedDialog() {
|
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
// src/components/primitives/drawer.tsx
|
|
269
|
-
import {
|
|
269
|
+
import { jsxDEV as jsxDEV_7x81h0kn } from "@vertz/ui/jsx-dev-runtime";
|
|
270
270
|
import { resolveChildren } from "@vertz/ui";
|
|
271
271
|
import { ComposedSheet } from "@vertz/ui-primitives";
|
|
272
272
|
var PANEL_CLASS_MAP = {
|
|
@@ -276,86 +276,59 @@ var PANEL_CLASS_MAP = {
|
|
|
276
276
|
bottom: "panelBottom"
|
|
277
277
|
};
|
|
278
278
|
function createThemedDrawer(styles) {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
close: styles.close
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
}, DrawerHeader = function({ children, className: cls, class: classProp }) {
|
|
297
|
-
const effectiveCls = cls ?? classProp;
|
|
298
|
-
const combined = [styles.header, effectiveCls].filter(Boolean).join(" ");
|
|
299
|
-
const resolved = resolveChildren(children);
|
|
300
|
-
return (() => {
|
|
301
|
-
const __el0 = __element("div");
|
|
302
|
-
__el0.setAttribute("data-slot", "drawer-header");
|
|
303
|
-
{
|
|
304
|
-
const __v = combined;
|
|
305
|
-
if (__v != null && __v !== false)
|
|
306
|
-
__el0.setAttribute("class", __v === true ? "" : __v);
|
|
307
|
-
}
|
|
308
|
-
__enterChildren(__el0);
|
|
309
|
-
__insert(__el0, resolved);
|
|
310
|
-
__exitChildren();
|
|
311
|
-
return __el0;
|
|
312
|
-
})();
|
|
313
|
-
}, DrawerFooter = function({ children, className: cls, class: classProp }) {
|
|
314
|
-
const effectiveCls = cls ?? classProp;
|
|
315
|
-
const combined = [styles.footer, effectiveCls].filter(Boolean).join(" ");
|
|
316
|
-
const resolved = resolveChildren(children);
|
|
317
|
-
return (() => {
|
|
318
|
-
const __el1 = __element("div");
|
|
319
|
-
__el1.setAttribute("data-slot", "drawer-footer");
|
|
320
|
-
{
|
|
321
|
-
const __v = combined;
|
|
322
|
-
if (__v != null && __v !== false)
|
|
323
|
-
__el1.setAttribute("class", __v === true ? "" : __v);
|
|
324
|
-
}
|
|
325
|
-
__enterChildren(__el1);
|
|
326
|
-
__insert(__el1, resolved);
|
|
327
|
-
__exitChildren();
|
|
328
|
-
return __el1;
|
|
329
|
-
})();
|
|
330
|
-
}, DrawerHandle = function({ className: cls, class: classProp }) {
|
|
331
|
-
const effectiveCls = cls ?? classProp;
|
|
332
|
-
const combined = [styles.handle, effectiveCls].filter(Boolean).join(" ");
|
|
333
|
-
return (() => {
|
|
334
|
-
const __el2 = __element("div");
|
|
335
|
-
__el2.setAttribute("data-slot", "drawer-handle");
|
|
336
|
-
{
|
|
337
|
-
const __v = combined;
|
|
338
|
-
if (__v != null && __v !== false)
|
|
339
|
-
__el2.setAttribute("class", __v === true ? "" : __v);
|
|
340
|
-
}
|
|
341
|
-
return __el2;
|
|
342
|
-
})();
|
|
343
|
-
};
|
|
344
|
-
const __mfResult0 = Object.assign(DrawerRoot, {
|
|
345
|
-
Trigger: ComposedSheet.Trigger,
|
|
346
|
-
Content: ComposedSheet.Content,
|
|
347
|
-
Header: DrawerHeader,
|
|
348
|
-
Title: ComposedSheet.Title,
|
|
349
|
-
Description: ComposedSheet.Description,
|
|
350
|
-
Footer: DrawerFooter,
|
|
351
|
-
Handle: DrawerHandle
|
|
279
|
+
function DrawerRoot({ children, side, onOpenChange }) {
|
|
280
|
+
const resolvedSide = side ?? "bottom";
|
|
281
|
+
const panelClass = styles[PANEL_CLASS_MAP[resolvedSide]];
|
|
282
|
+
return ComposedSheet({
|
|
283
|
+
children,
|
|
284
|
+
side: resolvedSide,
|
|
285
|
+
onOpenChange,
|
|
286
|
+
classes: {
|
|
287
|
+
overlay: styles.overlay,
|
|
288
|
+
content: panelClass,
|
|
289
|
+
title: styles.title,
|
|
290
|
+
description: styles.description,
|
|
291
|
+
close: styles.close
|
|
292
|
+
}
|
|
352
293
|
});
|
|
353
|
-
__flushMountFrame();
|
|
354
|
-
return __mfResult0;
|
|
355
|
-
} catch (__mfErr) {
|
|
356
|
-
__discardMountFrame(__mfDepth);
|
|
357
|
-
throw __mfErr;
|
|
358
294
|
}
|
|
295
|
+
function DrawerHeader({ children, className: cls, class: classProp }) {
|
|
296
|
+
const effectiveCls = cls ?? classProp;
|
|
297
|
+
const combined = [styles.header, effectiveCls].filter(Boolean).join(" ");
|
|
298
|
+
const resolved = resolveChildren(children);
|
|
299
|
+
return jsxDEV_7x81h0kn("div", {
|
|
300
|
+
"data-slot": "drawer-header",
|
|
301
|
+
class: combined,
|
|
302
|
+
children: [...resolved]
|
|
303
|
+
}, undefined, true, undefined, this);
|
|
304
|
+
}
|
|
305
|
+
function DrawerFooter({ children, className: cls, class: classProp }) {
|
|
306
|
+
const effectiveCls = cls ?? classProp;
|
|
307
|
+
const combined = [styles.footer, effectiveCls].filter(Boolean).join(" ");
|
|
308
|
+
const resolved = resolveChildren(children);
|
|
309
|
+
return jsxDEV_7x81h0kn("div", {
|
|
310
|
+
"data-slot": "drawer-footer",
|
|
311
|
+
class: combined,
|
|
312
|
+
children: [...resolved]
|
|
313
|
+
}, undefined, true, undefined, this);
|
|
314
|
+
}
|
|
315
|
+
function DrawerHandle({ className: cls, class: classProp }) {
|
|
316
|
+
const effectiveCls = cls ?? classProp;
|
|
317
|
+
const combined = [styles.handle, effectiveCls].filter(Boolean).join(" ");
|
|
318
|
+
return jsxDEV_7x81h0kn("div", {
|
|
319
|
+
"data-slot": "drawer-handle",
|
|
320
|
+
class: combined
|
|
321
|
+
}, undefined, false, undefined, this);
|
|
322
|
+
}
|
|
323
|
+
return Object.assign(DrawerRoot, {
|
|
324
|
+
Trigger: ComposedSheet.Trigger,
|
|
325
|
+
Content: ComposedSheet.Content,
|
|
326
|
+
Header: DrawerHeader,
|
|
327
|
+
Title: ComposedSheet.Title,
|
|
328
|
+
Description: ComposedSheet.Description,
|
|
329
|
+
Footer: DrawerFooter,
|
|
330
|
+
Handle: DrawerHandle
|
|
331
|
+
});
|
|
359
332
|
}
|
|
360
333
|
|
|
361
334
|
// src/components/primitives/dropdown-menu.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertz/theme-shadcn",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.42",
|
|
4
4
|
"description": "Shadcn-inspired theme for Vertz — pre-built style definitions using variants() and css()",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"typecheck": "tsc --noEmit"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@vertz/ui": "^0.2.
|
|
44
|
-
"@vertz/ui-primitives": "^0.2.
|
|
43
|
+
"@vertz/ui": "^0.2.41",
|
|
44
|
+
"@vertz/ui-primitives": "^0.2.41"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@happy-dom/global-registrator": "^20.7.0",
|
|
48
|
-
"@vertz/ui-
|
|
48
|
+
"@vertz/ui-server": "^0.2.41",
|
|
49
49
|
"bunup": "^0.16.31",
|
|
50
50
|
"happy-dom": "^20.7.0",
|
|
51
51
|
"typescript": "^5.7.0"
|