@tb-dev/vue 0.3.40 → 0.3.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/components/table/types.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +23 -4
- package/dist/utils/app.d.ts +1 -0
- package/package.json +9 -9
package/dist/index.css
CHANGED
package/dist/index.js
CHANGED
|
@@ -50,6 +50,14 @@ function inject(key) {
|
|
|
50
50
|
function tryInject(key) {
|
|
51
51
|
return runWithContext(() => inject$1(key));
|
|
52
52
|
}
|
|
53
|
+
function tryInjectOrElse(key, fn) {
|
|
54
|
+
let value = tryInject(key);
|
|
55
|
+
if (typeof value === "undefined") {
|
|
56
|
+
value = fn();
|
|
57
|
+
provide(key, value);
|
|
58
|
+
}
|
|
59
|
+
return value;
|
|
60
|
+
}
|
|
53
61
|
|
|
54
62
|
function create() {
|
|
55
63
|
let ERROR_HANDLER_FN = null;
|
|
@@ -5949,18 +5957,29 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
5949
5957
|
headerClass: {},
|
|
5950
5958
|
headerStyle: {},
|
|
5951
5959
|
height: {},
|
|
5952
|
-
style: {}
|
|
5960
|
+
style: {},
|
|
5961
|
+
width: {}
|
|
5953
5962
|
},
|
|
5954
5963
|
setup(__props) {
|
|
5955
5964
|
const props = __props;
|
|
5956
5965
|
const containerHeight = computed(() => {
|
|
5957
5966
|
return props.height ? { maxHeight: toPixel(props.height) } : null;
|
|
5958
5967
|
});
|
|
5968
|
+
const containerWidth = computed(() => {
|
|
5969
|
+
return props.width ? { maxWidth: toPixel(props.width) } : null;
|
|
5970
|
+
});
|
|
5959
5971
|
return (_ctx, _cache) => {
|
|
5960
5972
|
return openBlock(), createElementBlock("div", {
|
|
5961
5973
|
"data-slot": "table-container",
|
|
5962
|
-
style: normalizeStyle([containerHeight.value, _ctx.containerStyle]),
|
|
5963
|
-
class: normalizeClass(
|
|
5974
|
+
style: normalizeStyle([containerHeight.value, containerWidth.value, _ctx.containerStyle]),
|
|
5975
|
+
class: normalizeClass(
|
|
5976
|
+
unref(cn)(
|
|
5977
|
+
"relative w-full",
|
|
5978
|
+
containerWidth.value ? "overflow-x-auto" : "overflow-x-hidden",
|
|
5979
|
+
containerHeight.value ? "overflow-y-auto" : "overflow-y-hidden",
|
|
5980
|
+
_ctx.containerClass
|
|
5981
|
+
)
|
|
5982
|
+
)
|
|
5964
5983
|
}, [
|
|
5965
5984
|
createElementVNode("table", mergeProps(_ctx.$attrs, {
|
|
5966
5985
|
"data-slot": "table",
|
|
@@ -6668,4 +6687,4 @@ function localRef(key, initial, options) {
|
|
|
6668
6687
|
});
|
|
6669
6688
|
}
|
|
6670
6689
|
|
|
6671
|
-
export { _sfc_main$2Z as Badge, _sfc_main$2Y as Button, _sfc_main$2W as ButtonIcon, _sfc_main$2X as ButtonLink, _sfc_main$2N as Card, _sfc_main$2K as Checkbox, _sfc_main$2J as Combobox, _sfc_main$2I as ComboboxAnchor, _sfc_main$2H as ComboboxEmpty, _sfc_main$2G as ComboboxGroup, _sfc_main$2F as ComboboxInput, _sfc_main$2E as ComboboxItem, _sfc_main$2D as ComboboxItemIndicator, _sfc_main$2C as ComboboxList, _sfc_main$2B as ComboboxSeparator, _sfc_main$2A as ComboboxViewport, _sfc_main$2z as ContextMenu, _sfc_main$2y as ContextMenuCheckboxItem, _sfc_main$2x as ContextMenuContent, _sfc_main$2w as ContextMenuGroup, _sfc_main$2v as ContextMenuItem, _sfc_main$2u as ContextMenuLabel, _sfc_main$2t as ContextMenuRadioGroup, _sfc_main$2s as ContextMenuRadioItem, _sfc_main$2r as ContextMenuSeparator, _sfc_main$2q as ContextMenuShortcut, _sfc_main$2p as ContextMenuSub, _sfc_main$2o as ContextMenuSubContent, _sfc_main$2n as ContextMenuSubTrigger, _sfc_main$2m as ContextMenuTrigger, _sfc_main$2l as Dialog, _sfc_main$2k as DialogClose, _sfc_main$2i as DialogContent, _sfc_main$2h as DialogDescription, _sfc_main$2g as DialogFooter, _sfc_main$2f as DialogHeader, _sfc_main$2j as DialogOverlay, _sfc_main$2e as DialogScrollContent, _sfc_main$2d as DialogTitle, _sfc_main$2c as DialogTrigger, _sfc_main$2b as DropdownMenu, _sfc_main$2a as DropdownMenuCheckboxItem, _sfc_main$29 as DropdownMenuContent, _sfc_main$28 as DropdownMenuGroup, _sfc_main$27 as DropdownMenuItem, _sfc_main$26 as DropdownMenuLabel, _sfc_main$25 as DropdownMenuRadioGroup, _sfc_main$24 as DropdownMenuRadioItem, _sfc_main$23 as DropdownMenuSeparator, _sfc_main$22 as DropdownMenuShortcut, _sfc_main$21 as DropdownMenuSub, _sfc_main$20 as DropdownMenuSubContent, _sfc_main$1$ as DropdownMenuSubTrigger, _sfc_main$1_ as DropdownMenuTrigger, _sfc_main$1W as HoverCard, _sfc_main$1U as Input, _sfc_main$1O as InputNumber, _sfc_main$1N as InputText, _sfc_main$2M 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, asyncComputed, asyncRef, cn, getCurrentApp, getErrorHandler, handleError, inject, localRef, log, maybe, onAltKeyDown, onCtrlKeyDown, onCtrlShiftKeyDown, onKeyDown, onShiftKeyDown, provide, runWithContext, setCurrentApp, setErrorHandler, toBooleanCheckboxValue, tryGetCurrentApp, tryInject, trySetCurrentApp, useElementSize, useHeight, useHeightDiff, useSidebar, useWidth, useWidthDiff, useWindowHeight, useWindowWidth, warn };
|
|
6690
|
+
export { _sfc_main$2Z as Badge, _sfc_main$2Y as Button, _sfc_main$2W as ButtonIcon, _sfc_main$2X as ButtonLink, _sfc_main$2N as Card, _sfc_main$2K as Checkbox, _sfc_main$2J as Combobox, _sfc_main$2I as ComboboxAnchor, _sfc_main$2H as ComboboxEmpty, _sfc_main$2G as ComboboxGroup, _sfc_main$2F as ComboboxInput, _sfc_main$2E as ComboboxItem, _sfc_main$2D as ComboboxItemIndicator, _sfc_main$2C as ComboboxList, _sfc_main$2B as ComboboxSeparator, _sfc_main$2A as ComboboxViewport, _sfc_main$2z as ContextMenu, _sfc_main$2y as ContextMenuCheckboxItem, _sfc_main$2x as ContextMenuContent, _sfc_main$2w as ContextMenuGroup, _sfc_main$2v as ContextMenuItem, _sfc_main$2u as ContextMenuLabel, _sfc_main$2t as ContextMenuRadioGroup, _sfc_main$2s as ContextMenuRadioItem, _sfc_main$2r as ContextMenuSeparator, _sfc_main$2q as ContextMenuShortcut, _sfc_main$2p as ContextMenuSub, _sfc_main$2o as ContextMenuSubContent, _sfc_main$2n as ContextMenuSubTrigger, _sfc_main$2m as ContextMenuTrigger, _sfc_main$2l as Dialog, _sfc_main$2k as DialogClose, _sfc_main$2i as DialogContent, _sfc_main$2h as DialogDescription, _sfc_main$2g as DialogFooter, _sfc_main$2f as DialogHeader, _sfc_main$2j as DialogOverlay, _sfc_main$2e as DialogScrollContent, _sfc_main$2d as DialogTitle, _sfc_main$2c as DialogTrigger, _sfc_main$2b as DropdownMenu, _sfc_main$2a as DropdownMenuCheckboxItem, _sfc_main$29 as DropdownMenuContent, _sfc_main$28 as DropdownMenuGroup, _sfc_main$27 as DropdownMenuItem, _sfc_main$26 as DropdownMenuLabel, _sfc_main$25 as DropdownMenuRadioGroup, _sfc_main$24 as DropdownMenuRadioItem, _sfc_main$23 as DropdownMenuSeparator, _sfc_main$22 as DropdownMenuShortcut, _sfc_main$21 as DropdownMenuSub, _sfc_main$20 as DropdownMenuSubContent, _sfc_main$1$ as DropdownMenuSubTrigger, _sfc_main$1_ as DropdownMenuTrigger, _sfc_main$1W as HoverCard, _sfc_main$1U as Input, _sfc_main$1O as InputNumber, _sfc_main$1N as InputText, _sfc_main$2M 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, asyncComputed, asyncRef, cn, getCurrentApp, getErrorHandler, handleError, inject, localRef, log, maybe, onAltKeyDown, onCtrlKeyDown, onCtrlShiftKeyDown, onKeyDown, onShiftKeyDown, provide, runWithContext, setCurrentApp, setErrorHandler, toBooleanCheckboxValue, tryGetCurrentApp, tryInject, tryInjectOrElse, trySetCurrentApp, useElementSize, useHeight, useHeightDiff, useSidebar, useWidth, useWidthDiff, useWindowHeight, useWindowWidth, warn };
|
package/dist/utils/app.d.ts
CHANGED
|
@@ -5,3 +5,4 @@ export declare function runWithContext<T>(fn: () => T): T;
|
|
|
5
5
|
export declare function provide<T>(key: InjectionKey<T>, value: T): void;
|
|
6
6
|
export declare function inject<T>(key: InjectionKey<T>): T;
|
|
7
7
|
export declare function tryInject<T>(key: InjectionKey<T>): T | undefined;
|
|
8
|
+
export declare function tryInjectOrElse<T>(key: InjectionKey<T>, fn: () => T): T;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tb-dev/vue",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.42",
|
|
4
4
|
"description": "Vue utilities",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,27 +30,27 @@
|
|
|
30
30
|
"@vueuse/core": "^13.1.0",
|
|
31
31
|
"class-variance-authority": "^0.7.1",
|
|
32
32
|
"clsx": "^2.1.1",
|
|
33
|
-
"lucide-vue-next": "^0.
|
|
34
|
-
"reka-ui": "^2.2.
|
|
33
|
+
"lucide-vue-next": "^0.507.0",
|
|
34
|
+
"reka-ui": "^2.2.1",
|
|
35
35
|
"tailwind-merge": "^3.2.0",
|
|
36
|
-
"tw-animate-css": "^1.2.
|
|
36
|
+
"tw-animate-css": "^1.2.9",
|
|
37
37
|
"vue": "^3.5.13",
|
|
38
38
|
"vue-router": "^4.5.1",
|
|
39
39
|
"vue-sonner": "^1.3.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@tailwindcss/vite": "^4.1.
|
|
43
|
-
"@tb-dev/eslint-config": "^7.1.
|
|
42
|
+
"@tailwindcss/vite": "^4.1.5",
|
|
43
|
+
"@tb-dev/eslint-config": "^7.1.1",
|
|
44
44
|
"@types/node": "^22.15.3",
|
|
45
45
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
46
|
-
"eslint": "^9.
|
|
46
|
+
"eslint": "^9.26.0",
|
|
47
47
|
"prettier": "^3.5.3",
|
|
48
48
|
"prettier-plugin-css-order": "^2.1.2",
|
|
49
49
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
50
|
-
"tailwindcss": "^4.1.
|
|
50
|
+
"tailwindcss": "^4.1.5",
|
|
51
51
|
"tslib": "^2.8.1",
|
|
52
52
|
"typescript": "~5.8.3",
|
|
53
|
-
"vite": "^6.3.
|
|
53
|
+
"vite": "^6.3.5",
|
|
54
54
|
"vite-plugin-dts": "^4.5.3",
|
|
55
55
|
"vue-tsc": "~2.2.10"
|
|
56
56
|
},
|