@tb-dev/vue 0.3.28 → 0.3.30

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.
@@ -5,6 +5,7 @@ interface Props extends PrimitiveProps {
5
5
  variant?: ButtonVariants['variant'];
6
6
  size?: ButtonVariants['size'];
7
7
  class?: HTMLAttributes['class'];
8
+ type?: 'button' | 'submit';
8
9
  }
9
10
  declare function __VLS_template(): {
10
11
  attrs: Partial<{}>;
@@ -17,6 +18,7 @@ declare function __VLS_template(): {
17
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
19
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
19
20
  as: import('reka-ui').AsTag | import('vue').Component;
21
+ type: "button" | "submit";
20
22
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
23
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
24
  export default _default;
@@ -1,3 +1,4 @@
1
1
  import { default as Checkbox } from './Checkbox.vue';
2
2
  export type * from './types';
3
3
  export { Checkbox };
4
+ export { toBooleanCheckboxValue } from './utils';
@@ -0,0 +1,3 @@
1
+ import { Option } from '@tb-dev/utils';
2
+ import { CheckboxValue } from './types';
3
+ export declare function toBooleanCheckboxValue(value: Option<CheckboxValue>): boolean;
package/dist/index.js CHANGED
@@ -141,6 +141,7 @@ const _sfc_main$2X = /* @__PURE__ */ defineComponent({
141
141
  variant: {},
142
142
  size: {},
143
143
  class: {},
144
+ type: { default: "button" },
144
145
  asChild: { type: Boolean },
145
146
  as: { default: "button" }
146
147
  },
@@ -151,13 +152,14 @@ const _sfc_main$2X = /* @__PURE__ */ defineComponent({
151
152
  "data-slot": "button",
152
153
  as: _ctx.as,
153
154
  "as-child": _ctx.asChild,
155
+ type: _ctx.type,
154
156
  class: normalizeClass(unref(cn)(unref(buttonVariants)({ variant: _ctx.variant, size: _ctx.size }), props.class))
155
157
  }, {
156
158
  default: withCtx(() => [
157
159
  renderSlot(_ctx.$slots, "default")
158
160
  ]),
159
161
  _: 3
160
- }, 8, ["as", "as-child", "class"]);
162
+ }, 8, ["as", "as-child", "type", "class"]);
161
163
  };
162
164
  }
163
165
  });
@@ -685,6 +687,10 @@ const _sfc_main$2J = /* @__PURE__ */ defineComponent({
685
687
  }
686
688
  });
687
689
 
690
+ function toBooleanCheckboxValue(value) {
691
+ return value === true;
692
+ }
693
+
688
694
  const _sfc_main$2I = /* @__PURE__ */ defineComponent({
689
695
  __name: "Combobox",
690
696
  props: {
@@ -6587,4 +6593,4 @@ function localRef(key, initial, options) {
6587
6593
  });
6588
6594
  }
6589
6595
 
6590
- export { _sfc_main$2Y as Badge, _sfc_main$2X as Button, _sfc_main$2V as ButtonIcon, _sfc_main$2W as ButtonLink, _sfc_main$2M as Card, _sfc_main$2J as Checkbox, _sfc_main$2I as Combobox, _sfc_main$2H as ComboboxAnchor, _sfc_main$2G as ComboboxEmpty, _sfc_main$2F as ComboboxGroup, _sfc_main$2E as ComboboxInput, _sfc_main$2D as ComboboxItem, _sfc_main$2C as ComboboxItemIndicator, _sfc_main$2B as ComboboxList, _sfc_main$2A as ComboboxSeparator, _sfc_main$2z as ComboboxViewport, _sfc_main$2y as ContextMenu, _sfc_main$2x as ContextMenuCheckboxItem, _sfc_main$2w as ContextMenuContent, _sfc_main$2v as ContextMenuGroup, _sfc_main$2u as ContextMenuItem, _sfc_main$2t as ContextMenuLabel, _sfc_main$2s as ContextMenuRadioGroup, _sfc_main$2r as ContextMenuRadioItem, _sfc_main$2q as ContextMenuSeparator, _sfc_main$2p as ContextMenuShortcut, _sfc_main$2o as ContextMenuSub, _sfc_main$2n as ContextMenuSubContent, _sfc_main$2m as ContextMenuSubTrigger, _sfc_main$2l as ContextMenuTrigger, _sfc_main$2k as Dialog, _sfc_main$2j as DialogClose, _sfc_main$2h as DialogContent, _sfc_main$2g as DialogDescription, _sfc_main$2f as DialogFooter, _sfc_main$2e as DialogHeader, _sfc_main$2i as DialogOverlay, _sfc_main$2d as DialogScrollContent, _sfc_main$2c as DialogTitle, _sfc_main$2b as DialogTrigger, _sfc_main$2a as DropdownMenu, _sfc_main$29 as DropdownMenuCheckboxItem, _sfc_main$28 as DropdownMenuContent, _sfc_main$27 as DropdownMenuGroup, _sfc_main$26 as DropdownMenuItem, _sfc_main$25 as DropdownMenuLabel, _sfc_main$24 as DropdownMenuRadioGroup, _sfc_main$23 as DropdownMenuRadioItem, _sfc_main$22 as DropdownMenuSeparator, _sfc_main$21 as DropdownMenuShortcut, _sfc_main$20 as DropdownMenuSub, _sfc_main$1$ as DropdownMenuSubContent, _sfc_main$1_ as DropdownMenuSubTrigger, _sfc_main$1Z as DropdownMenuTrigger, _sfc_main$1V as HoverCard, _sfc_main$1T as Input, _sfc_main$1N as InputNumber, _sfc_main$1M as InputText, _sfc_main$2L as Label, _sfc_main$1L as Link, _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$2T 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, 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 };
6596
+ export { _sfc_main$2Y as Badge, _sfc_main$2X as Button, _sfc_main$2V as ButtonIcon, _sfc_main$2W as ButtonLink, _sfc_main$2M as Card, _sfc_main$2J as Checkbox, _sfc_main$2I as Combobox, _sfc_main$2H as ComboboxAnchor, _sfc_main$2G as ComboboxEmpty, _sfc_main$2F as ComboboxGroup, _sfc_main$2E as ComboboxInput, _sfc_main$2D as ComboboxItem, _sfc_main$2C as ComboboxItemIndicator, _sfc_main$2B as ComboboxList, _sfc_main$2A as ComboboxSeparator, _sfc_main$2z as ComboboxViewport, _sfc_main$2y as ContextMenu, _sfc_main$2x as ContextMenuCheckboxItem, _sfc_main$2w as ContextMenuContent, _sfc_main$2v as ContextMenuGroup, _sfc_main$2u as ContextMenuItem, _sfc_main$2t as ContextMenuLabel, _sfc_main$2s as ContextMenuRadioGroup, _sfc_main$2r as ContextMenuRadioItem, _sfc_main$2q as ContextMenuSeparator, _sfc_main$2p as ContextMenuShortcut, _sfc_main$2o as ContextMenuSub, _sfc_main$2n as ContextMenuSubContent, _sfc_main$2m as ContextMenuSubTrigger, _sfc_main$2l as ContextMenuTrigger, _sfc_main$2k as Dialog, _sfc_main$2j as DialogClose, _sfc_main$2h as DialogContent, _sfc_main$2g as DialogDescription, _sfc_main$2f as DialogFooter, _sfc_main$2e as DialogHeader, _sfc_main$2i as DialogOverlay, _sfc_main$2d as DialogScrollContent, _sfc_main$2c as DialogTitle, _sfc_main$2b as DialogTrigger, _sfc_main$2a as DropdownMenu, _sfc_main$29 as DropdownMenuCheckboxItem, _sfc_main$28 as DropdownMenuContent, _sfc_main$27 as DropdownMenuGroup, _sfc_main$26 as DropdownMenuItem, _sfc_main$25 as DropdownMenuLabel, _sfc_main$24 as DropdownMenuRadioGroup, _sfc_main$23 as DropdownMenuRadioItem, _sfc_main$22 as DropdownMenuSeparator, _sfc_main$21 as DropdownMenuShortcut, _sfc_main$20 as DropdownMenuSub, _sfc_main$1$ as DropdownMenuSubContent, _sfc_main$1_ as DropdownMenuSubTrigger, _sfc_main$1Z as DropdownMenuTrigger, _sfc_main$1V as HoverCard, _sfc_main$1T as Input, _sfc_main$1N as InputNumber, _sfc_main$1M as InputText, _sfc_main$2L as Label, _sfc_main$1L as Link, _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$2T 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, asyncComputed, asyncRef, cn, getCurrentApp, getErrorHandler, handleError, inject, localRef, maybe, onAltKeyDown, onCtrlKeyDown, onCtrlShiftKeyDown, onKeyDown, onShiftKeyDown, provide, runWithContext, setCurrentApp, setErrorHandler, toBooleanCheckboxValue, 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.28",
3
+ "version": "0.3.30",
4
4
  "description": "Vue utilities",
5
5
  "license": "MIT",
6
6
  "type": "module",