@tb-dev/vue-components 1.1.0 → 2.0.0

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,11 +1,7 @@
1
1
  import { VNode } from 'vue';
2
- import { PopoverProps } from './types';
3
- type __VLS_Props = PopoverProps;
4
- declare function open(): void;
5
- declare function close(): void;
6
2
  type __VLS_PublicProps = {
7
3
  modelValue: boolean;
8
- } & __VLS_Props;
4
+ };
9
5
  declare function __VLS_template(): {
10
6
  attrs: Partial<{}>;
11
7
  slots: Readonly<{
@@ -19,10 +15,7 @@ declare function __VLS_template(): {
19
15
  rootEl: any;
20
16
  };
21
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
- declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {
23
- close: typeof close;
24
- open: typeof open;
25
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
26
19
  "update:modelValue": (value: boolean) => any;
27
20
  }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
28
21
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
@@ -1,3 +1,3 @@
1
+ import { PopoverContent } from '../__base/popover';
1
2
  import { default as Popover } from './Popover.vue';
2
- export type * from './types';
3
- export { Popover };
3
+ export { Popover, PopoverContent };
package/dist/index.js CHANGED
@@ -4038,48 +4038,17 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
4038
4038
 
4039
4039
  const _sfc_main$1k = /* @__PURE__ */ defineComponent({
4040
4040
  __name: "Popover",
4041
- props: /* @__PURE__ */ mergeModels({
4042
- align: {},
4043
- alignOffset: {},
4044
- arrowPadding: {},
4045
- avoidCollisions: { type: Boolean },
4046
- collisionBoundary: {},
4047
- collisionPadding: {},
4048
- contentClass: {},
4049
- disableOutsidePointerEvents: { type: Boolean },
4050
- disableUpdateOnLayoutShift: { type: Boolean },
4051
- forceMount: { type: Boolean },
4052
- hideWhenDetached: { type: Boolean },
4053
- keepOpen: { type: Boolean },
4054
- positionStrategy: {},
4055
- prioritizePosition: { type: Boolean },
4056
- reference: {},
4057
- side: {},
4058
- sideOffset: {},
4059
- sticky: {},
4060
- updatePositionStrategy: {}
4061
- }, {
4041
+ props: {
4062
4042
  "modelValue": { type: Boolean, ...{ required: true } },
4063
4043
  "modelModifiers": {}
4064
- }),
4044
+ },
4065
4045
  emits: ["update:modelValue"],
4066
- setup(__props, { expose: __expose }) {
4067
- const props = __props;
4068
- const isOpen = useModel(__props, "modelValue");
4069
- function open() {
4070
- isOpen.value = true;
4071
- }
4072
- function close() {
4073
- isOpen.value = false;
4074
- }
4075
- function onPointerDownOutside() {
4076
- if (!props.keepOpen) close();
4077
- }
4078
- __expose({ close, open });
4046
+ setup(__props) {
4047
+ const open = useModel(__props, "modelValue");
4079
4048
  return (_ctx, _cache) => {
4080
4049
  return openBlock(), createBlock(unref(_sfc_main$1n), {
4081
- open: isOpen.value,
4082
- "onUpdate:open": _cache[0] || (_cache[0] = ($event) => isOpen.value = $event)
4050
+ open: open.value,
4051
+ "onUpdate:open": _cache[0] || (_cache[0] = ($event) => open.value = $event)
4083
4052
  }, {
4084
4053
  default: withCtx(() => [
4085
4054
  createVNode(unref(_sfc_main$1l), { "as-child": "" }, {
@@ -4088,32 +4057,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
4088
4057
  ]),
4089
4058
  _: 3
4090
4059
  }),
4091
- createVNode(unref(_sfc_main$1m), {
4092
- align: _ctx.align,
4093
- "align-offset": _ctx.alignOffset,
4094
- "arrow-padding": _ctx.arrowPadding,
4095
- "avoid-collisions": _ctx.avoidCollisions,
4096
- "collision-boundary": _ctx.collisionBoundary,
4097
- "collision-padding": _ctx.collisionPadding,
4098
- "disable-outside-pointer-events": _ctx.disableOutsidePointerEvents,
4099
- "disable-update-on-layout-shift": _ctx.disableUpdateOnLayoutShift,
4100
- "force-mount": _ctx.forceMount,
4101
- "hide-when-detached": _ctx.hideWhenDetached,
4102
- "position-strategy": _ctx.positionStrategy,
4103
- "prioritize-position": _ctx.prioritizePosition,
4104
- reference: _ctx.reference,
4105
- side: _ctx.side,
4106
- "side-offset": _ctx.sideOffset,
4107
- sticky: _ctx.sticky,
4108
- "update-position-strategy": _ctx.updatePositionStrategy,
4109
- class: normalizeClass(_ctx.contentClass),
4110
- onPointerDownOutside
4111
- }, {
4112
- default: withCtx(() => [
4113
- renderSlot(_ctx.$slots, "default")
4114
- ]),
4115
- _: 3
4116
- }, 8, ["align", "align-offset", "arrow-padding", "avoid-collisions", "collision-boundary", "collision-padding", "disable-outside-pointer-events", "disable-update-on-layout-shift", "force-mount", "hide-when-detached", "position-strategy", "prioritize-position", "reference", "side", "side-offset", "sticky", "update-position-strategy", "class"])
4060
+ renderSlot(_ctx.$slots, "default")
4117
4061
  ]),
4118
4062
  _: 3
4119
4063
  }, 8, ["open"]);
@@ -6932,4 +6876,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
6932
6876
  }
6933
6877
  });
6934
6878
 
6935
- export { _sfc_main$3i as Accordion, _sfc_main$3h as AccordionContent, _sfc_main$3g as AccordionItem, _sfc_main$3f as AccordionTrigger, _sfc_main$3e as Alert, _sfc_main$3d as AlertDescription, _sfc_main$31 as AlertDialog, _sfc_main$3c as AlertTitle, _sfc_main$30 as Avatar, _sfc_main$2$ as AvatarFallback, _sfc_main$2_ as AvatarImage, _sfc_main$2Z as Badge, _sfc_main$3a as Button, _sfc_main$2W as ButtonIcon, _sfc_main$2X as ButtonLink, _sfc_main$2N as Card, _sfc_main$2L as Checkbox, _sfc_main$2K as Combobox, _sfc_main$2J as ComboboxAnchor, _sfc_main$2I as ComboboxEmpty, _sfc_main$2H as ComboboxGroup, _sfc_main$2G as ComboboxInput, _sfc_main$2F as ComboboxItem, _sfc_main$2E as ComboboxItemIndicator, _sfc_main$2D as ComboboxList, _sfc_main$2C as ComboboxSeparator, _sfc_main$2B as ComboboxViewport, _sfc_main$2A as ContextMenu, _sfc_main$2z as ContextMenuCheckboxItem, _sfc_main$2y as ContextMenuContent, _sfc_main$2x as ContextMenuGroup, _sfc_main$2w as ContextMenuItem, _sfc_main$2v as ContextMenuLabel, _sfc_main$2u as ContextMenuRadioGroup, _sfc_main$2t as ContextMenuRadioItem, _sfc_main$2s as ContextMenuSeparator, _sfc_main$2r as ContextMenuShortcut, _sfc_main$2q as ContextMenuSub, _sfc_main$2p as ContextMenuSubContent, _sfc_main$2o as ContextMenuSubTrigger, _sfc_main$2n as ContextMenuTrigger, _sfc_main$2d as Dialog, _sfc_main$2l as DialogClose, _sfc_main$2c as DropdownMenu, _sfc_main$2b as DropdownMenuCheckboxItem, _sfc_main$2a as DropdownMenuContent, _sfc_main$29 as DropdownMenuGroup, _sfc_main$28 as DropdownMenuItem, _sfc_main$27 as DropdownMenuLabel, _sfc_main$26 as DropdownMenuRadioGroup, _sfc_main$25 as DropdownMenuRadioItem, _sfc_main$24 as DropdownMenuSeparator, _sfc_main$23 as DropdownMenuShortcut, _sfc_main$22 as DropdownMenuSub, _sfc_main$21 as DropdownMenuSubContent, _sfc_main$20 as DropdownMenuSubTrigger, _sfc_main$1$ as DropdownMenuTrigger, _sfc_main$1X as HoverCard, _sfc_main$1V as Input, _sfc_main$1P as InputNumber, _sfc_main$1O as InputText, _sfc_main$1N as Label, _sfc_main$1M as Link, Loading, _sfc_main$1K as Menubar, _sfc_main$1J as MenubarCheckboxItem, _sfc_main$1I as MenubarContent, _sfc_main$1H as MenubarGroup, _sfc_main$1G as MenubarItem, _sfc_main$1F as MenubarLabel, _sfc_main$1E as MenubarMenu, _sfc_main$1D as MenubarRadioGroup, _sfc_main$1C as MenubarRadioItem, _sfc_main$1B as MenubarSeparator, _sfc_main$1A as MenubarShortcut, _sfc_main$1z as MenubarSub, _sfc_main$1y as MenubarSubContent, _sfc_main$1x as MenubarSubTrigger, _sfc_main$1w as MenubarTrigger, _sfc_main$1v as Pagination, _sfc_main$1u as PaginationContent, _sfc_main$1t as PaginationEllipsis, _sfc_main$1s as PaginationFirst, _sfc_main$1r as PaginationItem, _sfc_main$1q as PaginationLast, _sfc_main$1p as PaginationNext, _sfc_main$1o as PaginationPrevious, _sfc_main$1k as Popover, _sfc_main$1j as Progress, _sfc_main$1i as RadioGroup, _sfc_main$1h as RadioGroupItem, _sfc_main$1g as ResizableHandle, _sfc_main$1f as ResizablePanel, _sfc_main$1e as ResizablePanelGroup, _sfc_main$2U as ScrollArea, _sfc_main$12 as Select, _sfc_main$1b as SelectGroup, _sfc_main$1a as SelectItem, _sfc_main$19 as SelectItemText, _sfc_main$18 as SelectLabel, _sfc_main$17 as SelectScrollDownButton, _sfc_main$16 as SelectScrollUpButton, _sfc_main$15 as SelectSeparator, _sfc_main$11 as Separator, _sfc_main$10 as Sheet, _sfc_main$$ as SheetClose, _sfc_main$Z as SheetContent, _sfc_main$Y as SheetDescription, _sfc_main$X as SheetFooter, _sfc_main$W as SheetHeader, _sfc_main$V as SheetTitle, _sfc_main$U as SheetTrigger, _sfc_main$r as Sidebar, _sfc_main$Q as SidebarGroup, _sfc_main$P as SidebarGroupAction, _sfc_main$O as SidebarGroupContent, _sfc_main$N as SidebarGroupLabel, _sfc_main$K as SidebarMenu, _sfc_main$J as SidebarMenuAction, _sfc_main$I as SidebarMenuBadge, _sfc_main$C as SidebarMenuButton, _sfc_main$B as SidebarMenuItem, _sfc_main$z as SidebarMenuSkeleton, _sfc_main$y as SidebarMenuSub, _sfc_main$x as SidebarMenuSubButton, _sfc_main$w as SidebarMenuSubItem, _sfc_main$u as SidebarRail, _sfc_main$t as SidebarSeparator, _sfc_main$s as SidebarTrigger, _sfc_main$A as Skeleton, _sfc_main$q as Slider, _sfc_main$p as Sonner, _sfc_main$n as Switch, _sfc_main$e as Table, _sfc_main$k as TableCell, _sfc_main$i as TableEmpty, _sfc_main$g as TableHead, _sfc_main$d as TableLink, _sfc_main$j as TableRow, _sfc_main$c as Tabs, _sfc_main$b as TabsContent, _sfc_main$a as TabsList, _sfc_main$9 as TabsTrigger, _sfc_main$8 as TagsInput, _sfc_main$7 as TagsInputInput, _sfc_main$6 as TagsInputItem, _sfc_main$5 as TagsInputItemDelete, _sfc_main$4 as TagsInputItemText, _sfc_main$2 as Textarea, _sfc_main$1 as Toggle, _sfc_main as Tooltip, cn, toBooleanCheckboxValue, useSidebar };
6879
+ export { _sfc_main$3i as Accordion, _sfc_main$3h as AccordionContent, _sfc_main$3g as AccordionItem, _sfc_main$3f as AccordionTrigger, _sfc_main$3e as Alert, _sfc_main$3d as AlertDescription, _sfc_main$31 as AlertDialog, _sfc_main$3c as AlertTitle, _sfc_main$30 as Avatar, _sfc_main$2$ as AvatarFallback, _sfc_main$2_ as AvatarImage, _sfc_main$2Z as Badge, _sfc_main$3a as Button, _sfc_main$2W as ButtonIcon, _sfc_main$2X as ButtonLink, _sfc_main$2N as Card, _sfc_main$2L as Checkbox, _sfc_main$2K as Combobox, _sfc_main$2J as ComboboxAnchor, _sfc_main$2I as ComboboxEmpty, _sfc_main$2H as ComboboxGroup, _sfc_main$2G as ComboboxInput, _sfc_main$2F as ComboboxItem, _sfc_main$2E as ComboboxItemIndicator, _sfc_main$2D as ComboboxList, _sfc_main$2C as ComboboxSeparator, _sfc_main$2B as ComboboxViewport, _sfc_main$2A as ContextMenu, _sfc_main$2z as ContextMenuCheckboxItem, _sfc_main$2y as ContextMenuContent, _sfc_main$2x as ContextMenuGroup, _sfc_main$2w as ContextMenuItem, _sfc_main$2v as ContextMenuLabel, _sfc_main$2u as ContextMenuRadioGroup, _sfc_main$2t as ContextMenuRadioItem, _sfc_main$2s as ContextMenuSeparator, _sfc_main$2r as ContextMenuShortcut, _sfc_main$2q as ContextMenuSub, _sfc_main$2p as ContextMenuSubContent, _sfc_main$2o as ContextMenuSubTrigger, _sfc_main$2n as ContextMenuTrigger, _sfc_main$2d as Dialog, _sfc_main$2l as DialogClose, _sfc_main$2c as DropdownMenu, _sfc_main$2b as DropdownMenuCheckboxItem, _sfc_main$2a as DropdownMenuContent, _sfc_main$29 as DropdownMenuGroup, _sfc_main$28 as DropdownMenuItem, _sfc_main$27 as DropdownMenuLabel, _sfc_main$26 as DropdownMenuRadioGroup, _sfc_main$25 as DropdownMenuRadioItem, _sfc_main$24 as DropdownMenuSeparator, _sfc_main$23 as DropdownMenuShortcut, _sfc_main$22 as DropdownMenuSub, _sfc_main$21 as DropdownMenuSubContent, _sfc_main$20 as DropdownMenuSubTrigger, _sfc_main$1$ as DropdownMenuTrigger, _sfc_main$1X as HoverCard, _sfc_main$1V as Input, _sfc_main$1P as InputNumber, _sfc_main$1O as InputText, _sfc_main$1N as Label, _sfc_main$1M as Link, Loading, _sfc_main$1K as Menubar, _sfc_main$1J as MenubarCheckboxItem, _sfc_main$1I as MenubarContent, _sfc_main$1H as MenubarGroup, _sfc_main$1G as MenubarItem, _sfc_main$1F as MenubarLabel, _sfc_main$1E as MenubarMenu, _sfc_main$1D as MenubarRadioGroup, _sfc_main$1C as MenubarRadioItem, _sfc_main$1B as MenubarSeparator, _sfc_main$1A as MenubarShortcut, _sfc_main$1z as MenubarSub, _sfc_main$1y as MenubarSubContent, _sfc_main$1x as MenubarSubTrigger, _sfc_main$1w as MenubarTrigger, _sfc_main$1v as Pagination, _sfc_main$1u as PaginationContent, _sfc_main$1t as PaginationEllipsis, _sfc_main$1s as PaginationFirst, _sfc_main$1r as PaginationItem, _sfc_main$1q as PaginationLast, _sfc_main$1p as PaginationNext, _sfc_main$1o as PaginationPrevious, _sfc_main$1k as Popover, _sfc_main$1m as PopoverContent, _sfc_main$1j as Progress, _sfc_main$1i as RadioGroup, _sfc_main$1h as RadioGroupItem, _sfc_main$1g as ResizableHandle, _sfc_main$1f as ResizablePanel, _sfc_main$1e as ResizablePanelGroup, _sfc_main$2U as ScrollArea, _sfc_main$12 as Select, _sfc_main$1b as SelectGroup, _sfc_main$1a as SelectItem, _sfc_main$19 as SelectItemText, _sfc_main$18 as SelectLabel, _sfc_main$17 as SelectScrollDownButton, _sfc_main$16 as SelectScrollUpButton, _sfc_main$15 as SelectSeparator, _sfc_main$11 as Separator, _sfc_main$10 as Sheet, _sfc_main$$ as SheetClose, _sfc_main$Z as SheetContent, _sfc_main$Y as SheetDescription, _sfc_main$X as SheetFooter, _sfc_main$W as SheetHeader, _sfc_main$V as SheetTitle, _sfc_main$U as SheetTrigger, _sfc_main$r as Sidebar, _sfc_main$Q as SidebarGroup, _sfc_main$P as SidebarGroupAction, _sfc_main$O as SidebarGroupContent, _sfc_main$N as SidebarGroupLabel, _sfc_main$K as SidebarMenu, _sfc_main$J as SidebarMenuAction, _sfc_main$I as SidebarMenuBadge, _sfc_main$C as SidebarMenuButton, _sfc_main$B as SidebarMenuItem, _sfc_main$z as SidebarMenuSkeleton, _sfc_main$y as SidebarMenuSub, _sfc_main$x as SidebarMenuSubButton, _sfc_main$w as SidebarMenuSubItem, _sfc_main$u as SidebarRail, _sfc_main$t as SidebarSeparator, _sfc_main$s as SidebarTrigger, _sfc_main$A as Skeleton, _sfc_main$q as Slider, _sfc_main$p as Sonner, _sfc_main$n as Switch, _sfc_main$e as Table, _sfc_main$k as TableCell, _sfc_main$i as TableEmpty, _sfc_main$g as TableHead, _sfc_main$d as TableLink, _sfc_main$j as TableRow, _sfc_main$c as Tabs, _sfc_main$b as TabsContent, _sfc_main$a as TabsList, _sfc_main$9 as TabsTrigger, _sfc_main$8 as TagsInput, _sfc_main$7 as TagsInputInput, _sfc_main$6 as TagsInputItem, _sfc_main$5 as TagsInputItemDelete, _sfc_main$4 as TagsInputItemText, _sfc_main$2 as Textarea, _sfc_main$1 as Toggle, _sfc_main as Tooltip, cn, toBooleanCheckboxValue, useSidebar };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/vue-components",
3
- "version": "1.1.0",
3
+ "version": "2.0.0",
4
4
  "description": "Vue components",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,23 +0,0 @@
1
- import { HTMLAttributes } from 'vue';
2
- import { PopoverContentProps } from 'reka-ui';
3
- export interface PopoverProps {
4
- align?: PopoverContentProps['align'];
5
- alignOffset?: PopoverContentProps['alignOffset'];
6
- arrowPadding?: PopoverContentProps['arrowPadding'];
7
- avoidCollisions?: PopoverContentProps['avoidCollisions'];
8
- collisionBoundary?: PopoverContentProps['collisionBoundary'];
9
- collisionPadding?: PopoverContentProps['collisionPadding'];
10
- contentClass?: HTMLAttributes['class'];
11
- disableOutsidePointerEvents?: PopoverContentProps['disableOutsidePointerEvents'];
12
- disableUpdateOnLayoutShift?: PopoverContentProps['disableUpdateOnLayoutShift'];
13
- forceMount?: PopoverContentProps['forceMount'];
14
- hideWhenDetached?: PopoverContentProps['hideWhenDetached'];
15
- keepOpen?: boolean;
16
- positionStrategy?: PopoverContentProps['positionStrategy'];
17
- prioritizePosition?: PopoverContentProps['prioritizePosition'];
18
- reference?: PopoverContentProps['reference'];
19
- side?: PopoverContentProps['side'];
20
- sideOffset?: PopoverContentProps['sideOffset'];
21
- sticky?: PopoverContentProps['sticky'];
22
- updatePositionStrategy?: PopoverContentProps['updatePositionStrategy'];
23
- }