@tb-dev/vue 0.3.5 → 0.3.6
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.
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { ButtonIconProps } from './types';
|
|
3
|
+
declare const _default: <T extends string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & ButtonIconProps<T> & Partial<{}>> & import('vue').PublicProps;
|
|
5
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
6
|
+
attrs: any;
|
|
7
|
+
slots: Readonly<{
|
|
8
|
+
default?: () => VNode;
|
|
9
|
+
}> & {
|
|
10
|
+
default?: () => VNode;
|
|
11
|
+
};
|
|
12
|
+
emit: {};
|
|
13
|
+
}>) => import('vue').VNode & {
|
|
14
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_PrettifyLocal<T> = {
|
|
18
|
+
[K in keyof T]: T[K];
|
|
19
|
+
} & {};
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cva } from 'class-variance-authority';
|
|
2
|
-
import { inject as inject$1, toValue, defineComponent, computed, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot, normalizeClass, createElementBlock, Fragment, createVNode, toDisplayString, createCommentVNode, normalizeStyle, createElementVNode, withDirectives, isRef, vModelText, createTextVNode, normalizeProps, guardReactiveProps, ref, toRef, effectScope } from 'vue';
|
|
2
|
+
import { inject as inject$1, toValue, defineComponent, computed, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot, normalizeClass, createElementBlock, Fragment, createVNode, toDisplayString, resolveDynamicComponent, createCommentVNode, normalizeStyle, createElementVNode, withDirectives, isRef, vModelText, createTextVNode, normalizeProps, guardReactiveProps, ref, toRef, effectScope } from 'vue';
|
|
3
3
|
import { twMerge } from 'tailwind-merge';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { unwrap, isNil, toPixel } from '@tb-dev/utils';
|
|
@@ -88,7 +88,7 @@ function cn(...inputs) {
|
|
|
88
88
|
return twMerge(clsx(inputs));
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
const _sfc_main$
|
|
91
|
+
const _sfc_main$1X = /* @__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$
|
|
136
|
+
const _sfc_main$1W = /* @__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$
|
|
191
|
+
const _sfc_main$1V = /* @__PURE__ */ defineComponent({
|
|
192
192
|
__name: "ButtonLink",
|
|
193
193
|
props: {
|
|
194
194
|
buttonClass: {},
|
|
@@ -204,7 +204,7 @@ const _sfc_main$1U = /* @__PURE__ */ defineComponent({
|
|
|
204
204
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
205
205
|
createVNode(unref(DefineTemplate), null, {
|
|
206
206
|
default: withCtx(() => [
|
|
207
|
-
createVNode(unref(_sfc_main$
|
|
207
|
+
createVNode(unref(_sfc_main$1W), {
|
|
208
208
|
variant: _ctx.variant,
|
|
209
209
|
size: _ctx.size,
|
|
210
210
|
disabled: _ctx.disabled,
|
|
@@ -234,6 +234,52 @@ const _sfc_main$1U = /* @__PURE__ */ defineComponent({
|
|
|
234
234
|
}
|
|
235
235
|
});
|
|
236
236
|
|
|
237
|
+
const _sfc_main$1U = /* @__PURE__ */ defineComponent({
|
|
238
|
+
__name: "ButtonIcon",
|
|
239
|
+
props: {
|
|
240
|
+
buttonClass: {},
|
|
241
|
+
class: {},
|
|
242
|
+
icon: {},
|
|
243
|
+
iconClass: {},
|
|
244
|
+
iconSize: {},
|
|
245
|
+
to: {}
|
|
246
|
+
},
|
|
247
|
+
setup(__props) {
|
|
248
|
+
const props = __props;
|
|
249
|
+
return (_ctx, _cache) => {
|
|
250
|
+
return _ctx.to ? (openBlock(), createBlock(unref(_sfc_main$1V), {
|
|
251
|
+
key: 0,
|
|
252
|
+
to: _ctx.to,
|
|
253
|
+
variant: "ghost",
|
|
254
|
+
size: "icon",
|
|
255
|
+
class: normalizeClass(props.class),
|
|
256
|
+
"button-class": _ctx.buttonClass
|
|
257
|
+
}, {
|
|
258
|
+
default: withCtx(() => [
|
|
259
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), {
|
|
260
|
+
class: normalizeClass(_ctx.iconClass),
|
|
261
|
+
size: _ctx.iconSize
|
|
262
|
+
}, null, 8, ["class", "size"]))
|
|
263
|
+
]),
|
|
264
|
+
_: 1
|
|
265
|
+
}, 8, ["to", "class", "button-class"])) : (openBlock(), createBlock(unref(_sfc_main$1W), {
|
|
266
|
+
key: 1,
|
|
267
|
+
variant: "ghost",
|
|
268
|
+
size: "icon",
|
|
269
|
+
class: normalizeClass(unref(cn)(props.class, _ctx.buttonClass))
|
|
270
|
+
}, {
|
|
271
|
+
default: withCtx(() => [
|
|
272
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), {
|
|
273
|
+
class: normalizeClass(_ctx.iconClass),
|
|
274
|
+
size: _ctx.iconSize
|
|
275
|
+
}, null, 8, ["class", "size"]))
|
|
276
|
+
]),
|
|
277
|
+
_: 1
|
|
278
|
+
}, 8, ["class"]));
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
|
|
237
283
|
const _sfc_main$1T = /* @__PURE__ */ defineComponent({
|
|
238
284
|
__name: "ScrollBar",
|
|
239
285
|
props: {
|
|
@@ -4148,4 +4194,4 @@ function localRef(key, initial, options) {
|
|
|
4148
4194
|
});
|
|
4149
4195
|
}
|
|
4150
4196
|
|
|
4151
|
-
export { _sfc_main$
|
|
4197
|
+
export { _sfc_main$1X as Badge, _sfc_main$1W as Button, _sfc_main$1U as ButtonIcon, _sfc_main$1V as ButtonLink, _sfc_main$1M as Card, _sfc_main$1L as Checkbox, _sfc_main$1K as ContextMenu, _sfc_main$1J as ContextMenuCheckboxItem, _sfc_main$1I as ContextMenuContent, _sfc_main$1H as ContextMenuGroup, _sfc_main$1G as ContextMenuItem, _sfc_main$1F as ContextMenuLabel, _sfc_main$1E as ContextMenuRadioGroup, _sfc_main$1D as ContextMenuRadioItem, _sfc_main$1C as ContextMenuSeparator, _sfc_main$1B as ContextMenuShortcut, _sfc_main$1A as ContextMenuSub, _sfc_main$1z as ContextMenuSubContent, _sfc_main$1y as ContextMenuSubTrigger, _sfc_main$1x as ContextMenuTrigger, _sfc_main$1w as Dialog, _sfc_main$1v as DialogClose, _sfc_main$1t as DialogContent, _sfc_main$1s as DialogDescription, _sfc_main$1r as DialogFooter, _sfc_main$1q as DialogHeader, _sfc_main$1u as DialogOverlay, _sfc_main$1p as DialogScrollContent, _sfc_main$1o as DialogTitle, _sfc_main$1n as DialogTrigger, _sfc_main$1m as DropdownMenu, _sfc_main$1l as DropdownMenuCheckboxItem, _sfc_main$1k as DropdownMenuContent, _sfc_main$1j as DropdownMenuGroup, _sfc_main$1i as DropdownMenuItem, _sfc_main$1h as DropdownMenuLabel, _sfc_main$1g as DropdownMenuRadioGroup, _sfc_main$1f as DropdownMenuRadioItem, _sfc_main$1e as DropdownMenuSeparator, _sfc_main$1d as DropdownMenuShortcut, _sfc_main$1c as DropdownMenuSub, _sfc_main$1b as DropdownMenuSubContent, _sfc_main$1a as DropdownMenuSubTrigger, _sfc_main$19 as DropdownMenuTrigger, _sfc_main$18 as Input, _sfc_main$10 as InputNumber, _sfc_main$$ as InputText, _sfc_main$16 as Label, _sfc_main$_ as Link, _sfc_main$Z as Popover, _sfc_main$Y as PopoverAnchor, _sfc_main$X as PopoverContent, _sfc_main$W as PopoverTrigger, _sfc_main$V as Progress, _sfc_main$U as RadioGroup, _sfc_main$T as RadioGroupItem, _sfc_main$1S as ScrollArea, _sfc_main$S as Select, _sfc_main$R as SelectContent, _sfc_main$Q as SelectGroup, _sfc_main$P as SelectItem, _sfc_main$O as SelectItemText, _sfc_main$N as SelectLabel, _sfc_main$M as SelectScrollDownButton, _sfc_main$L as SelectScrollUpButton, _sfc_main$K as SelectSeparator, _sfc_main$J as SelectTrigger, _sfc_main$I as SelectValue, _sfc_main$H as Separator, _sfc_main$G as Sheet, _sfc_main$F as SheetClose, _sfc_main$D as SheetContent, _sfc_main$C as SheetDescription, _sfc_main$B as SheetFooter, _sfc_main$A as SheetHeader, _sfc_main$z as SheetTitle, _sfc_main$y as SheetTrigger, _sfc_main$m as Sidebar, _sfc_main$o 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$s as Tooltip, _sfc_main$r as TooltipContent, _sfc_main$q as TooltipProvider, _sfc_main$p 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.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "Vue utilities",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@tanstack/vue-table": "^8.21.2",
|
|
29
|
-
"@tb-dev/utils": "^6.0.
|
|
29
|
+
"@tb-dev/utils": "^6.0.1",
|
|
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.
|
|
33
|
+
"lucide-vue-next": "^0.488.0",
|
|
34
34
|
"reka-ui": "^2.2.0",
|
|
35
35
|
"tailwind-merge": "^3.2.0",
|
|
36
36
|
"tw-animate-css": "^1.2.5",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@tailwindcss/vite": "^4.1.3",
|
|
42
|
-
"@tb-dev/eslint-config": "^
|
|
42
|
+
"@tb-dev/eslint-config": "^7.0.0",
|
|
43
43
|
"@types/node": "^22.14.1",
|
|
44
44
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
45
45
|
"eslint": "^9.24.0",
|