@tb-dev/vue 0.3.8 → 0.3.9

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,28 +1,23 @@
1
1
  import { VNode } from 'vue';
2
- interface Props {
3
- contentClass?: string;
4
- descriptionClass?: string;
5
- headerClass?: string;
6
- scrollAreaClass?: string;
7
- scrollAreaHeight?: number | string;
8
- titleClass?: string;
9
- }
2
+ import { CardProps } from './types';
10
3
  declare function __VLS_template(): {
11
4
  attrs: Partial<{}>;
12
5
  slots: Readonly<{
13
- default: () => VNode;
6
+ default?: () => VNode;
14
7
  description?: () => VNode;
8
+ footer?: () => VNode;
15
9
  title?: () => VNode;
16
10
  }> & {
17
- default: () => VNode;
11
+ default?: () => VNode;
18
12
  description?: () => VNode;
13
+ footer?: () => VNode;
19
14
  title?: () => VNode;
20
15
  };
21
16
  refs: {};
22
17
  rootEl: HTMLDivElement;
23
18
  };
24
19
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
25
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
20
+ declare const __VLS_component: import('vue').DefineComponent<CardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CardProps> & Readonly<{}>, {
26
21
  scrollAreaHeight: number | string;
27
22
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
28
23
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,2 +1,3 @@
1
1
  import { default as Card } from './Card.vue';
2
+ export type * from './types';
2
3
  export { Card };
@@ -0,0 +1,9 @@
1
+ export interface CardProps {
2
+ contentClass?: string;
3
+ descriptionClass?: string;
4
+ footerClass?: string;
5
+ headerClass?: string;
6
+ scrollAreaClass?: string;
7
+ scrollAreaHeight?: number | string;
8
+ titleClass?: string;
9
+ }
package/dist/index.js CHANGED
@@ -88,7 +88,7 @@ function cn(...inputs) {
88
88
  return twMerge(clsx(inputs));
89
89
  }
90
90
 
91
- const _sfc_main$2c = /* @__PURE__ */ defineComponent({
91
+ const _sfc_main$2d = /* @__PURE__ */ defineComponent({
92
92
  __name: "Badge",
93
93
  props: {
94
94
  asChild: { type: Boolean },
@@ -133,7 +133,7 @@ const badgeVariants = cva(
133
133
  }
134
134
  );
135
135
 
136
- const _sfc_main$2b = /* @__PURE__ */ defineComponent({
136
+ const _sfc_main$2c = /* @__PURE__ */ defineComponent({
137
137
  __name: "Button",
138
138
  props: {
139
139
  variant: {},
@@ -188,7 +188,7 @@ const buttonVariants = cva(
188
188
 
189
189
  const _hoisted_1$b = { key: 0 };
190
190
  const _hoisted_2$1 = { key: 0 };
191
- const _sfc_main$2a = /* @__PURE__ */ defineComponent({
191
+ const _sfc_main$2b = /* @__PURE__ */ defineComponent({
192
192
  __name: "ButtonLink",
193
193
  props: {
194
194
  buttonClass: {},
@@ -204,7 +204,7 @@ const _sfc_main$2a = /* @__PURE__ */ defineComponent({
204
204
  return openBlock(), createElementBlock(Fragment, null, [
205
205
  createVNode(unref(DefineTemplate), null, {
206
206
  default: withCtx(() => [
207
- createVNode(unref(_sfc_main$2b), {
207
+ createVNode(unref(_sfc_main$2c), {
208
208
  variant: _ctx.variant,
209
209
  size: _ctx.size,
210
210
  disabled: _ctx.disabled,
@@ -234,7 +234,7 @@ const _sfc_main$2a = /* @__PURE__ */ defineComponent({
234
234
  }
235
235
  });
236
236
 
237
- const _sfc_main$29 = /* @__PURE__ */ defineComponent({
237
+ const _sfc_main$2a = /* @__PURE__ */ defineComponent({
238
238
  __name: "ButtonIcon",
239
239
  props: {
240
240
  buttonClass: {},
@@ -247,7 +247,7 @@ const _sfc_main$29 = /* @__PURE__ */ defineComponent({
247
247
  setup(__props) {
248
248
  const props = __props;
249
249
  return (_ctx, _cache) => {
250
- return _ctx.to ? (openBlock(), createBlock(unref(_sfc_main$2a), {
250
+ return _ctx.to ? (openBlock(), createBlock(unref(_sfc_main$2b), {
251
251
  key: 0,
252
252
  to: _ctx.to,
253
253
  variant: "ghost",
@@ -262,7 +262,7 @@ const _sfc_main$29 = /* @__PURE__ */ defineComponent({
262
262
  }, null, 8, ["class", "size"]))
263
263
  ]),
264
264
  _: 1
265
- }, 8, ["to", "class", "button-class"])) : (openBlock(), createBlock(unref(_sfc_main$2b), {
265
+ }, 8, ["to", "class", "button-class"])) : (openBlock(), createBlock(unref(_sfc_main$2c), {
266
266
  key: 1,
267
267
  variant: "ghost",
268
268
  size: "icon",
@@ -280,7 +280,7 @@ const _sfc_main$29 = /* @__PURE__ */ defineComponent({
280
280
  }
281
281
  });
282
282
 
283
- const _sfc_main$28 = /* @__PURE__ */ defineComponent({
283
+ const _sfc_main$29 = /* @__PURE__ */ defineComponent({
284
284
  __name: "ScrollBar",
285
285
  props: {
286
286
  orientation: { default: "vertical" },
@@ -316,7 +316,7 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
316
316
  }
317
317
  });
318
318
 
319
- const _sfc_main$27 = /* @__PURE__ */ defineComponent({
319
+ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
320
320
  __name: "ScrollArea",
321
321
  props: {
322
322
  type: {},
@@ -346,7 +346,7 @@ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
346
346
  ]),
347
347
  _: 3
348
348
  }),
349
- createVNode(_sfc_main$28),
349
+ createVNode(_sfc_main$29),
350
350
  createVNode(unref(ScrollAreaCorner))
351
351
  ]),
352
352
  _: 3
@@ -355,7 +355,7 @@ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
355
355
  }
356
356
  });
357
357
 
358
- const _sfc_main$26 = /* @__PURE__ */ defineComponent({
358
+ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
359
359
  __name: "Card",
360
360
  props: {
361
361
  class: {}
@@ -378,7 +378,7 @@ const _sfc_main$26 = /* @__PURE__ */ defineComponent({
378
378
  }
379
379
  });
380
380
 
381
- const _sfc_main$25 = /* @__PURE__ */ defineComponent({
381
+ const _sfc_main$26 = /* @__PURE__ */ defineComponent({
382
382
  __name: "CardContent",
383
383
  props: {
384
384
  class: {}
@@ -396,7 +396,7 @@ const _sfc_main$25 = /* @__PURE__ */ defineComponent({
396
396
  }
397
397
  });
398
398
 
399
- const _sfc_main$24 = /* @__PURE__ */ defineComponent({
399
+ const _sfc_main$25 = /* @__PURE__ */ defineComponent({
400
400
  __name: "CardDescription",
401
401
  props: {
402
402
  class: {}
@@ -414,6 +414,24 @@ const _sfc_main$24 = /* @__PURE__ */ defineComponent({
414
414
  }
415
415
  });
416
416
 
417
+ const _sfc_main$24 = /* @__PURE__ */ defineComponent({
418
+ __name: "CardFooter",
419
+ props: {
420
+ class: {}
421
+ },
422
+ setup(__props) {
423
+ const props = __props;
424
+ return (_ctx, _cache) => {
425
+ return openBlock(), createElementBlock("div", {
426
+ "data-slot": "card-footer",
427
+ class: normalizeClass(unref(cn)("flex items-center px-6 [.border-t]:pt-6", props.class))
428
+ }, [
429
+ renderSlot(_ctx.$slots, "default")
430
+ ], 2);
431
+ };
432
+ }
433
+ });
434
+
417
435
  const _sfc_main$23 = /* @__PURE__ */ defineComponent({
418
436
  __name: "CardHeader",
419
437
  props: {
@@ -460,6 +478,7 @@ const _sfc_main$21 = /* @__PURE__ */ defineComponent({
460
478
  props: {
461
479
  contentClass: {},
462
480
  descriptionClass: {},
481
+ footerClass: {},
463
482
  headerClass: {},
464
483
  scrollAreaClass: {},
465
484
  scrollAreaHeight: { default: "auto" },
@@ -467,7 +486,7 @@ const _sfc_main$21 = /* @__PURE__ */ defineComponent({
467
486
  },
468
487
  setup(__props) {
469
488
  return (_ctx, _cache) => {
470
- return openBlock(), createBlock(unref(_sfc_main$26), null, {
489
+ return openBlock(), createBlock(unref(_sfc_main$27), null, {
471
490
  default: withCtx(() => [
472
491
  _ctx.$slots.title ? (openBlock(), createBlock(unref(_sfc_main$23), {
473
492
  key: 0,
@@ -482,7 +501,7 @@ const _sfc_main$21 = /* @__PURE__ */ defineComponent({
482
501
  ]),
483
502
  _: 3
484
503
  }, 8, ["class"]),
485
- _ctx.$slots.description ? (openBlock(), createBlock(unref(_sfc_main$24), {
504
+ _ctx.$slots.description ? (openBlock(), createBlock(unref(_sfc_main$25), {
486
505
  key: 0,
487
506
  class: normalizeClass(_ctx.descriptionClass)
488
507
  }, {
@@ -494,11 +513,12 @@ const _sfc_main$21 = /* @__PURE__ */ defineComponent({
494
513
  ]),
495
514
  _: 3
496
515
  }, 8, ["class"])) : createCommentVNode("", true),
497
- createVNode(unref(_sfc_main$25), {
516
+ _ctx.$slots.default ? (openBlock(), createBlock(unref(_sfc_main$26), {
517
+ key: 1,
498
518
  class: normalizeClass(unref(cn)("p-0", _ctx.contentClass))
499
519
  }, {
500
520
  default: withCtx(() => [
501
- _ctx.scrollAreaHeight && _ctx.scrollAreaHeight !== "auto" ? (openBlock(), createBlock(unref(_sfc_main$27), {
521
+ _ctx.scrollAreaHeight && _ctx.scrollAreaHeight !== "auto" ? (openBlock(), createBlock(unref(_sfc_main$28), {
502
522
  key: 0,
503
523
  class: normalizeClass(_ctx.scrollAreaClass),
504
524
  style: normalizeStyle({ height: unref(toPixel)(_ctx.scrollAreaHeight) })
@@ -510,7 +530,16 @@ const _sfc_main$21 = /* @__PURE__ */ defineComponent({
510
530
  }, 8, ["class", "style"])) : renderSlot(_ctx.$slots, "default", { key: 1 })
511
531
  ]),
512
532
  _: 3
513
- }, 8, ["class"])
533
+ }, 8, ["class"])) : createCommentVNode("", true),
534
+ _ctx.$slots.footer ? (openBlock(), createBlock(unref(_sfc_main$24), {
535
+ key: 2,
536
+ class: normalizeClass(_ctx.footerClass)
537
+ }, {
538
+ default: withCtx(() => [
539
+ renderSlot(_ctx.$slots, "footer")
540
+ ]),
541
+ _: 3
542
+ }, 8, ["class"])) : createCommentVNode("", true)
514
543
  ]),
515
544
  _: 3
516
545
  });
@@ -3834,7 +3863,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3834
3863
  const props = __props;
3835
3864
  const { toggleSidebar } = useSidebar();
3836
3865
  return (_ctx, _cache) => {
3837
- return openBlock(), createBlock(unref(_sfc_main$2b), {
3866
+ return openBlock(), createBlock(unref(_sfc_main$2c), {
3838
3867
  "data-sidebar": "trigger",
3839
3868
  "data-slot": "sidebar-trigger",
3840
3869
  variant: "ghost",
@@ -4691,4 +4720,4 @@ function localRef(key, initial, options) {
4691
4720
  });
4692
4721
  }
4693
4722
 
4694
- export { _sfc_main$2c as Badge, _sfc_main$2b as Button, _sfc_main$29 as ButtonIcon, _sfc_main$2a as ButtonLink, _sfc_main$21 as Card, _sfc_main$20 as Checkbox, _sfc_main$1$ as ContextMenu, _sfc_main$1_ as ContextMenuCheckboxItem, _sfc_main$1Z as ContextMenuContent, _sfc_main$1Y as ContextMenuGroup, _sfc_main$1X as ContextMenuItem, _sfc_main$1W as ContextMenuLabel, _sfc_main$1V as ContextMenuRadioGroup, _sfc_main$1U as ContextMenuRadioItem, _sfc_main$1T as ContextMenuSeparator, _sfc_main$1S as ContextMenuShortcut, _sfc_main$1R as ContextMenuSub, _sfc_main$1Q as ContextMenuSubContent, _sfc_main$1P as ContextMenuSubTrigger, _sfc_main$1O as ContextMenuTrigger, _sfc_main$1N as Dialog, _sfc_main$1M as DialogClose, _sfc_main$1K as DialogContent, _sfc_main$1J as DialogDescription, _sfc_main$1I as DialogFooter, _sfc_main$1H as DialogHeader, _sfc_main$1L as DialogOverlay, _sfc_main$1G as DialogScrollContent, _sfc_main$1F as DialogTitle, _sfc_main$1E as DialogTrigger, _sfc_main$1D as DropdownMenu, _sfc_main$1C as DropdownMenuCheckboxItem, _sfc_main$1B as DropdownMenuContent, _sfc_main$1A as DropdownMenuGroup, _sfc_main$1z as DropdownMenuItem, _sfc_main$1y as DropdownMenuLabel, _sfc_main$1x as DropdownMenuRadioGroup, _sfc_main$1w as DropdownMenuRadioItem, _sfc_main$1v as DropdownMenuSeparator, _sfc_main$1u as DropdownMenuShortcut, _sfc_main$1t as DropdownMenuSub, _sfc_main$1s as DropdownMenuSubContent, _sfc_main$1r as DropdownMenuSubTrigger, _sfc_main$1q as DropdownMenuTrigger, _sfc_main$1p as Input, _sfc_main$1h as InputNumber, _sfc_main$1g as InputText, _sfc_main$1n as Label, _sfc_main$1f as Link, _sfc_main$1e as Popover, _sfc_main$1d as PopoverAnchor, _sfc_main$1c as PopoverContent, _sfc_main$1b as PopoverTrigger, _sfc_main$1a as Progress, _sfc_main$19 as RadioGroup, _sfc_main$18 as RadioGroupItem, _sfc_main$27 as ScrollArea, _sfc_main$17 as Select, _sfc_main$16 as SelectContent, _sfc_main$15 as SelectGroup, _sfc_main$14 as SelectItem, _sfc_main$13 as SelectItemText, _sfc_main$12 as SelectLabel, _sfc_main$11 as SelectScrollDownButton, _sfc_main$10 as SelectScrollUpButton, _sfc_main$$ as SelectSeparator, _sfc_main$_ as SelectTrigger, _sfc_main$Z as SelectValue, _sfc_main$Y as Separator, _sfc_main$X as Sheet, _sfc_main$W as SheetClose, _sfc_main$U as SheetContent, _sfc_main$T as SheetDescription, _sfc_main$S as SheetFooter, _sfc_main$R as SheetHeader, _sfc_main$Q as SheetTitle, _sfc_main$P as SheetTrigger, _sfc_main$m as Sidebar, _sfc_main$L as SidebarGroup, _sfc_main$K as SidebarGroupAction, _sfc_main$J as SidebarGroupContent, _sfc_main$I as SidebarGroupLabel, _sfc_main$F as SidebarMenu, _sfc_main$E as SidebarMenuAction, _sfc_main$D as SidebarMenuBadge, _sfc_main$x as SidebarMenuButton, _sfc_main$w as SidebarMenuItem, _sfc_main$u as SidebarMenuSkeleton, _sfc_main$t as SidebarMenuSub, _sfc_main$s as SidebarMenuSubButton, _sfc_main$r as SidebarMenuSubItem, _sfc_main$p as SidebarRail, _sfc_main$o as SidebarSeparator, _sfc_main$n as SidebarTrigger, _sfc_main$v as Skeleton, _sfc_main$c as Table, _sfc_main$i as TableCell, _sfc_main$g as TableEmpty, _sfc_main$e as TableHead, _sfc_main$b as TableLink, _sfc_main$h as TableRow, _sfc_main$a as Tabs, _sfc_main$9 as TabsContent, _sfc_main$8 as TabsList, _sfc_main$7 as TabsTrigger, _sfc_main$6 as TagsInput, _sfc_main$5 as TagsInputInput, _sfc_main$4 as TagsInputItem, _sfc_main$3 as TagsInputItemDelete, _sfc_main$2 as TagsInputItemText, _sfc_main$1 as Textarea, _sfc_main as Toggle, _sfc_main$C as Tooltip, _sfc_main$B as TooltipContent, _sfc_main$A as TooltipProvider, _sfc_main$z as TooltipTrigger, asyncComputed, asyncRef, cn, getCurrentApp, getErrorHandler, handleError, inject, localRef, maybe, onAltKeyDown, onCtrlKeyDown, onCtrlShiftKeyDown, onKeyDown, onShiftKeyDown, provide, runWithContext, setCurrentApp, setErrorHandler, tryGetCurrentApp, tryInject, trySetCurrentApp, useElementSize, useHeight, useHeightDiff, useSidebar, useWidth, useWidthDiff, useWindowHeight, useWindowWidth };
4723
+ export { _sfc_main$2d as Badge, _sfc_main$2c as Button, _sfc_main$2a as ButtonIcon, _sfc_main$2b as ButtonLink, _sfc_main$21 as Card, _sfc_main$20 as Checkbox, _sfc_main$1$ as ContextMenu, _sfc_main$1_ as ContextMenuCheckboxItem, _sfc_main$1Z as ContextMenuContent, _sfc_main$1Y as ContextMenuGroup, _sfc_main$1X as ContextMenuItem, _sfc_main$1W as ContextMenuLabel, _sfc_main$1V as ContextMenuRadioGroup, _sfc_main$1U as ContextMenuRadioItem, _sfc_main$1T as ContextMenuSeparator, _sfc_main$1S as ContextMenuShortcut, _sfc_main$1R as ContextMenuSub, _sfc_main$1Q as ContextMenuSubContent, _sfc_main$1P as ContextMenuSubTrigger, _sfc_main$1O as ContextMenuTrigger, _sfc_main$1N as Dialog, _sfc_main$1M as DialogClose, _sfc_main$1K as DialogContent, _sfc_main$1J as DialogDescription, _sfc_main$1I as DialogFooter, _sfc_main$1H as DialogHeader, _sfc_main$1L as DialogOverlay, _sfc_main$1G as DialogScrollContent, _sfc_main$1F as DialogTitle, _sfc_main$1E as DialogTrigger, _sfc_main$1D as DropdownMenu, _sfc_main$1C as DropdownMenuCheckboxItem, _sfc_main$1B as DropdownMenuContent, _sfc_main$1A as DropdownMenuGroup, _sfc_main$1z as DropdownMenuItem, _sfc_main$1y as DropdownMenuLabel, _sfc_main$1x as DropdownMenuRadioGroup, _sfc_main$1w as DropdownMenuRadioItem, _sfc_main$1v as DropdownMenuSeparator, _sfc_main$1u as DropdownMenuShortcut, _sfc_main$1t as DropdownMenuSub, _sfc_main$1s as DropdownMenuSubContent, _sfc_main$1r as DropdownMenuSubTrigger, _sfc_main$1q as DropdownMenuTrigger, _sfc_main$1p as Input, _sfc_main$1h as InputNumber, _sfc_main$1g as InputText, _sfc_main$1n as Label, _sfc_main$1f as Link, _sfc_main$1e as Popover, _sfc_main$1d as PopoverAnchor, _sfc_main$1c as PopoverContent, _sfc_main$1b as PopoverTrigger, _sfc_main$1a as Progress, _sfc_main$19 as RadioGroup, _sfc_main$18 as RadioGroupItem, _sfc_main$28 as ScrollArea, _sfc_main$17 as Select, _sfc_main$16 as SelectContent, _sfc_main$15 as SelectGroup, _sfc_main$14 as SelectItem, _sfc_main$13 as SelectItemText, _sfc_main$12 as SelectLabel, _sfc_main$11 as SelectScrollDownButton, _sfc_main$10 as SelectScrollUpButton, _sfc_main$$ as SelectSeparator, _sfc_main$_ as SelectTrigger, _sfc_main$Z as SelectValue, _sfc_main$Y as Separator, _sfc_main$X as Sheet, _sfc_main$W as SheetClose, _sfc_main$U as SheetContent, _sfc_main$T as SheetDescription, _sfc_main$S as SheetFooter, _sfc_main$R as SheetHeader, _sfc_main$Q as SheetTitle, _sfc_main$P as SheetTrigger, _sfc_main$m as Sidebar, _sfc_main$L as SidebarGroup, _sfc_main$K as SidebarGroupAction, _sfc_main$J as SidebarGroupContent, _sfc_main$I as SidebarGroupLabel, _sfc_main$F as SidebarMenu, _sfc_main$E as SidebarMenuAction, _sfc_main$D as SidebarMenuBadge, _sfc_main$x as SidebarMenuButton, _sfc_main$w as SidebarMenuItem, _sfc_main$u as SidebarMenuSkeleton, _sfc_main$t as SidebarMenuSub, _sfc_main$s as SidebarMenuSubButton, _sfc_main$r as SidebarMenuSubItem, _sfc_main$p as SidebarRail, _sfc_main$o as SidebarSeparator, _sfc_main$n as SidebarTrigger, _sfc_main$v as Skeleton, _sfc_main$c as Table, _sfc_main$i as TableCell, _sfc_main$g as TableEmpty, _sfc_main$e as TableHead, _sfc_main$b as TableLink, _sfc_main$h as TableRow, _sfc_main$a as Tabs, _sfc_main$9 as TabsContent, _sfc_main$8 as TabsList, _sfc_main$7 as TabsTrigger, _sfc_main$6 as TagsInput, _sfc_main$5 as TagsInputInput, _sfc_main$4 as TagsInputItem, _sfc_main$3 as TagsInputItemDelete, _sfc_main$2 as TagsInputItemText, _sfc_main$1 as Textarea, _sfc_main as Toggle, _sfc_main$C as Tooltip, _sfc_main$B as TooltipContent, _sfc_main$A as TooltipProvider, _sfc_main$z as TooltipTrigger, asyncComputed, asyncRef, cn, getCurrentApp, getErrorHandler, handleError, inject, localRef, maybe, onAltKeyDown, onCtrlKeyDown, onCtrlShiftKeyDown, onKeyDown, onShiftKeyDown, provide, runWithContext, setCurrentApp, setErrorHandler, tryGetCurrentApp, tryInject, trySetCurrentApp, useElementSize, useHeight, useHeightDiff, useSidebar, useWidth, useWidthDiff, useWindowHeight, useWindowWidth };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/vue",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "Vue utilities",
5
5
  "license": "MIT",
6
6
  "type": "module",