@tb-dev/vue-components 5.1.0 → 5.2.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.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Andrew Ferreira <andrew.shien2@gmail.com>
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Andrew Ferreira <andrew.shien2@gmail.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -40,3 +40,4 @@ export * from './tags-input';
40
40
  export * from './textarea';
41
41
  export * from './toggle';
42
42
  export * from './tooltip';
43
+ export { FocusScope, Presence, Primitive, RovingFocusGroup, RovingFocusItem, Slot, useDateFormatter, useEmitAsProps, useFilter, useForwardExpose, useForwardProps, useForwardPropsEmits, VisuallyHidden, } from 'reka-ui';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot, createElementVNode, normalizeClass, createVNode, createElementBlock, computed, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode, ref, reactive, watch, normalizeProps, guardReactiveProps, onMounted, onUnmounted, withDirectives, isRef, vModelText, resolveDynamicComponent, normalizeStyle } from 'vue';
2
2
  import { useForwardPropsEmits, AccordionRoot, AccordionContent, useForwardProps, AccordionItem, AccordionHeader, AccordionTrigger, AlertDialogRoot, Primitive, AlertDialogAction, AlertDialogCancel, AlertDialogPortal, AlertDialogOverlay, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, AvatarRoot, AvatarFallback, AvatarImage, CalendarRoot, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNext, CalendarPrev, CheckboxRoot, CheckboxIndicator, ComboboxRoot, ComboboxAnchor, ComboboxEmpty, ComboboxGroup, ComboboxLabel, ComboboxInput, ComboboxItem, ComboboxItemIndicator, ComboboxPortal, ComboboxContent, ComboboxSeparator, ComboboxViewport, useFilter, ListboxRoot, DialogRoot, DialogClose, DialogOverlay, DialogPortal, DialogContent, DialogDescription, DialogTitle, DialogTrigger, useId, ListboxGroup, ListboxGroupLabel, ListboxFilter, ListboxItem, ListboxContent, Separator, createContext, ContextMenuRoot, ContextMenuCheckboxItem, ContextMenuItemIndicator, ContextMenuPortal, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DropdownMenuRoot, DropdownMenuCheckboxItem, DropdownMenuItemIndicator, DropdownMenuPortal, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HoverCardRoot, HoverCardPortal, HoverCardContent, HoverCardTrigger, Label, MenubarRoot, MenubarCheckboxItem, MenubarItemIndicator, MenubarPortal, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenuViewport, NavigationMenuRoot, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NumberFieldRoot, NumberFieldDecrement, NumberFieldIncrement, NumberFieldInput, PaginationRoot, PaginationList, PaginationEllipsis, PaginationFirst, PaginationListItem, PaginationLast, PaginationNext, PaginationPrev, PopoverRoot, PopoverAnchor, PopoverPortal, PopoverContent, PopoverTrigger, ProgressRoot, ProgressIndicator, RadioGroupRoot, RadioGroupItem, RadioGroupIndicator, SplitterResizeHandle, SplitterPanel, SplitterGroup, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaRoot, ScrollAreaViewport, ScrollAreaCorner, SelectRoot, SelectPortal, SelectContent, SelectViewport, SelectGroup, SelectItem, SelectItemIndicator, SelectItemText, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectIcon, SelectValue, TooltipRoot, TooltipPortal, TooltipContent, TooltipArrow, TooltipProvider, TooltipTrigger, SliderRoot, SliderTrack, SliderRange, SliderThumb, SwitchRoot, SwitchThumb, TabsRoot, TabsContent, TabsList, TabsTrigger, TagsInputRoot, TagsInputInput, TagsInputItem, TagsInputItemDelete, TagsInputItemText, Toggle } from 'reka-ui';
3
- export { ComboboxCancel, ComboboxTrigger, DropdownMenuPortal, PaginationList, PaginationListItem } from 'reka-ui';
3
+ export { ComboboxCancel, ComboboxTrigger, DropdownMenuPortal, FocusScope, PaginationList, PaginationListItem, Presence, Primitive, RovingFocusGroup, RovingFocusItem, Slot, VisuallyHidden, useDateFormatter, useEmitAsProps, useFilter, useForwardExpose, useForwardProps, useForwardPropsEmits } from 'reka-ui';
4
4
  import { reactiveOmit, useCurrentElement, useVModel, useMediaQuery } from '@vueuse/core';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import { clsx } from 'clsx';
@@ -162,12 +162,10 @@ const _sfc_main$3A = /* @__PURE__ */ defineComponent({
162
162
  return (_ctx, _cache) => {
163
163
  return openBlock(), createElementBlock("div", {
164
164
  "data-slot": "alert-description",
165
- class: normalizeClass(
166
- unref(cn)(
167
- "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
168
- props.class
169
- )
170
- )
165
+ class: normalizeClass(unref(cn)(
166
+ "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
167
+ props.class
168
+ ))
171
169
  }, [
172
170
  renderSlot(_ctx.$slots, "default")
173
171
  ], 2);
@@ -594,12 +592,10 @@ const _sfc_main$3k = /* @__PURE__ */ defineComponent({
594
592
  return (_ctx, _cache) => {
595
593
  return openBlock(), createElementBlock("div", {
596
594
  "data-slot": "card",
597
- class: normalizeClass(
598
- unref(cn)(
599
- "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
600
- props.class
601
- )
602
- )
595
+ class: normalizeClass(unref(cn)(
596
+ "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
597
+ props.class
598
+ ))
603
599
  }, [
604
600
  renderSlot(_ctx.$slots, "default")
605
601
  ], 2);
@@ -689,12 +685,10 @@ const _sfc_main$3f = /* @__PURE__ */ defineComponent({
689
685
  return (_ctx, _cache) => {
690
686
  return openBlock(), createElementBlock("div", {
691
687
  "data-slot": "card-header",
692
- class: normalizeClass(
693
- unref(cn)(
694
- "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
695
- props.class
696
- )
697
- )
688
+ class: normalizeClass(unref(cn)(
689
+ "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
690
+ props.class
691
+ ))
698
692
  }, [
699
693
  renderSlot(_ctx.$slots, "default")
700
694
  ], 2);
@@ -3438,14 +3432,12 @@ const _sfc_main$1X = /* @__PURE__ */ defineComponent({
3438
3432
  return withDirectives((openBlock(), createElementBlock("input", {
3439
3433
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
3440
3434
  "data-slot": "input",
3441
- class: normalizeClass(
3442
- unref(cn)(
3443
- "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
3444
- "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
3445
- "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
3446
- props.class
3447
- )
3448
- )
3435
+ class: normalizeClass(unref(cn)(
3436
+ "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
3437
+ "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
3438
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
3439
+ props.class
3440
+ ))
3449
3441
  }, null, 2)), [
3450
3442
  [vModelText, unref(modelValue)]
3451
3443
  ]);
@@ -4288,12 +4280,10 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
4288
4280
  const props = __props;
4289
4281
  return (_ctx, _cache) => {
4290
4282
  return openBlock(), createElementBlock("div", {
4291
- class: normalizeClass(
4292
- unref(cn)(
4293
- "relative [&>[data-slot=input]]:has-[[data-slot=decrement]]:pl-5 [&>[data-slot=input]]:has-[[data-slot=increment]]:pr-5",
4294
- props.class
4295
- )
4296
- )
4283
+ class: normalizeClass(unref(cn)(
4284
+ "relative [&>[data-slot=input]]:has-[[data-slot=decrement]]:pl-5 [&>[data-slot=input]]:has-[[data-slot=increment]]:pr-5",
4285
+ props.class
4286
+ ))
4297
4287
  }, [
4298
4288
  renderSlot(_ctx.$slots, "default")
4299
4289
  ], 2);
@@ -4377,12 +4367,10 @@ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
4377
4367
  return (_ctx, _cache) => {
4378
4368
  return openBlock(), createBlock(unref(NumberFieldInput), {
4379
4369
  "data-slot": "input",
4380
- class: normalizeClass(
4381
- unref(cn)(
4382
- "border-input placeholder:text-muted-foreground focus-visible:ring-ring flex h-9 w-full rounded-md border bg-transparent py-1 text-center text-sm shadow-sm transition-colors focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
4383
- props.class
4384
- )
4385
- )
4370
+ class: normalizeClass(unref(cn)(
4371
+ "border-input placeholder:text-muted-foreground focus-visible:ring-ring flex h-9 w-full rounded-md border bg-transparent py-1 text-center text-sm shadow-sm transition-colors focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
4372
+ props.class
4373
+ ))
4386
4374
  }, null, 8, ["class"]);
4387
4375
  };
4388
4376
  }
@@ -5122,12 +5110,10 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
5122
5110
  default: withCtx(() => [
5123
5111
  createVNode(unref(_sfc_main$11)),
5124
5112
  createVNode(unref(SelectViewport), {
5125
- class: normalizeClass(
5126
- unref(cn)(
5127
- "p-1",
5128
- _ctx.position === "popper" && "h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"
5129
- )
5130
- )
5113
+ class: normalizeClass(unref(cn)(
5114
+ "p-1",
5115
+ _ctx.position === "popper" && "h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"
5116
+ ))
5131
5117
  }, {
5132
5118
  default: withCtx(() => [
5133
5119
  renderSlot(_ctx.$slots, "default")
@@ -5738,14 +5724,12 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
5738
5724
  "data-side": _ctx.side
5739
5725
  }, [
5740
5726
  createElementVNode("div", {
5741
- class: normalizeClass(
5742
- unref(cn)(
5743
- "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
5744
- "group-data-[collapsible=offcanvas]:w-0",
5745
- "group-data-[side=right]:rotate-180",
5746
- _ctx.variant === "floating" || _ctx.variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
5747
- )
5748
- )
5727
+ class: normalizeClass(unref(cn)(
5728
+ "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
5729
+ "group-data-[collapsible=offcanvas]:w-0",
5730
+ "group-data-[side=right]:rotate-180",
5731
+ _ctx.variant === "floating" || _ctx.variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
5732
+ ))
5749
5733
  }, null, 2),
5750
5734
  createElementVNode("div", mergeProps({
5751
5735
  class: unref(cn)(
@@ -5776,12 +5760,10 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
5776
5760
  return openBlock(), createElementBlock("div", {
5777
5761
  "data-slot": "sidebar-content",
5778
5762
  "data-sidebar": "content",
5779
- class: normalizeClass(
5780
- unref(cn)(
5781
- "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
5782
- props.class
5783
- )
5784
- )
5763
+ class: normalizeClass(unref(cn)(
5764
+ "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
5765
+ props.class
5766
+ ))
5785
5767
  }, [
5786
5768
  renderSlot(_ctx.$slots, "default")
5787
5769
  ], 2);
@@ -5842,14 +5824,12 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
5842
5824
  "data-sidebar": "group-action",
5843
5825
  as: _ctx.as,
5844
5826
  "as-child": _ctx.asChild,
5845
- class: normalizeClass(
5846
- unref(cn)(
5847
- "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
5848
- "after:absolute after:-inset-2 md:after:hidden",
5849
- "group-data-[collapsible=icon]:hidden",
5850
- props.class
5851
- )
5852
- )
5827
+ class: normalizeClass(unref(cn)(
5828
+ "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
5829
+ "after:absolute after:-inset-2 md:after:hidden",
5830
+ "group-data-[collapsible=icon]:hidden",
5831
+ props.class
5832
+ ))
5853
5833
  }, {
5854
5834
  default: withCtx(() => [
5855
5835
  renderSlot(_ctx.$slots, "default")
@@ -5894,13 +5874,11 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
5894
5874
  "data-sidebar": "group-label",
5895
5875
  as: _ctx.as,
5896
5876
  "as-child": _ctx.asChild,
5897
- class: normalizeClass(
5898
- unref(cn)(
5899
- "text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
5900
- "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
5901
- props.class
5902
- )
5903
- )
5877
+ class: normalizeClass(unref(cn)(
5878
+ "text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
5879
+ "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
5880
+ props.class
5881
+ ))
5904
5882
  }, {
5905
5883
  default: withCtx(() => [
5906
5884
  renderSlot(_ctx.$slots, "default")
@@ -5962,13 +5940,11 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5962
5940
  return (_ctx, _cache) => {
5963
5941
  return openBlock(), createElementBlock("main", {
5964
5942
  "data-slot": "sidebar-inset",
5965
- class: normalizeClass(
5966
- unref(cn)(
5967
- "bg-background relative flex w-full flex-1 flex-col",
5968
- "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
5969
- props.class
5970
- )
5971
- )
5943
+ class: normalizeClass(unref(cn)(
5944
+ "bg-background relative flex w-full flex-1 flex-col",
5945
+ "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
5946
+ props.class
5947
+ ))
5972
5948
  }, [
5973
5949
  renderSlot(_ctx.$slots, "default")
5974
5950
  ], 2);
@@ -6009,18 +5985,16 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
6009
5985
  return openBlock(), createBlock(unref(Primitive), {
6010
5986
  "data-slot": "sidebar-menu-action",
6011
5987
  "data-sidebar": "menu-action",
6012
- class: normalizeClass(
6013
- unref(cn)(
6014
- "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
6015
- "after:absolute after:-inset-2 md:after:hidden",
6016
- "peer-data-[size=sm]/menu-button:top-1",
6017
- "peer-data-[size=default]/menu-button:top-1.5",
6018
- "peer-data-[size=lg]/menu-button:top-2.5",
6019
- "group-data-[collapsible=icon]:hidden",
6020
- _ctx.showOnHover && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
6021
- props.class
6022
- )
6023
- ),
5988
+ class: normalizeClass(unref(cn)(
5989
+ "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
5990
+ "after:absolute after:-inset-2 md:after:hidden",
5991
+ "peer-data-[size=sm]/menu-button:top-1",
5992
+ "peer-data-[size=default]/menu-button:top-1.5",
5993
+ "peer-data-[size=lg]/menu-button:top-2.5",
5994
+ "group-data-[collapsible=icon]:hidden",
5995
+ _ctx.showOnHover && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
5996
+ props.class
5997
+ )),
6024
5998
  as: _ctx.as,
6025
5999
  "as-child": _ctx.asChild
6026
6000
  }, {
@@ -6044,17 +6018,15 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
6044
6018
  return openBlock(), createElementBlock("div", {
6045
6019
  "data-slot": "sidebar-menu-badge",
6046
6020
  "data-sidebar": "menu-badge",
6047
- class: normalizeClass(
6048
- unref(cn)(
6049
- "text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none",
6050
- "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
6051
- "peer-data-[size=sm]/menu-button:top-1",
6052
- "peer-data-[size=default]/menu-button:top-1.5",
6053
- "peer-data-[size=lg]/menu-button:top-2.5",
6054
- "group-data-[collapsible=icon]:hidden",
6055
- props.class
6056
- )
6057
- )
6021
+ class: normalizeClass(unref(cn)(
6022
+ "text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none",
6023
+ "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
6024
+ "peer-data-[size=sm]/menu-button:top-1",
6025
+ "peer-data-[size=default]/menu-button:top-1.5",
6026
+ "peer-data-[size=lg]/menu-button:top-2.5",
6027
+ "group-data-[collapsible=icon]:hidden",
6028
+ props.class
6029
+ ))
6058
6030
  }, [
6059
6031
  renderSlot(_ctx.$slots, "default")
6060
6032
  ], 2);
@@ -6352,13 +6324,11 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
6352
6324
  return openBlock(), createElementBlock("ul", {
6353
6325
  "data-slot": "sidebar-menu-sub",
6354
6326
  "data-sidebar": "menu-badge",
6355
- class: normalizeClass(
6356
- unref(cn)(
6357
- "border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
6358
- "group-data-[collapsible=icon]:hidden",
6359
- props.class
6360
- )
6361
- )
6327
+ class: normalizeClass(unref(cn)(
6328
+ "border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
6329
+ "group-data-[collapsible=icon]:hidden",
6330
+ props.class
6331
+ ))
6362
6332
  }, [
6363
6333
  renderSlot(_ctx.$slots, "default")
6364
6334
  ], 2);
@@ -6385,16 +6355,14 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
6385
6355
  "as-child": _ctx.asChild,
6386
6356
  "data-size": _ctx.size,
6387
6357
  "data-active": _ctx.isActive,
6388
- class: normalizeClass(
6389
- unref(cn)(
6390
- "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
6391
- "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
6392
- _ctx.size === "sm" && "text-xs",
6393
- _ctx.size === "md" && "text-sm",
6394
- "group-data-[collapsible=icon]:hidden",
6395
- props.class
6396
- )
6397
- )
6358
+ class: normalizeClass(unref(cn)(
6359
+ "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
6360
+ "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
6361
+ _ctx.size === "sm" && "text-xs",
6362
+ _ctx.size === "md" && "text-sm",
6363
+ "group-data-[collapsible=icon]:hidden",
6364
+ props.class
6365
+ ))
6398
6366
  }, {
6399
6367
  default: withCtx(() => [
6400
6368
  renderSlot(_ctx.$slots, "default")
@@ -6499,17 +6467,15 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
6499
6467
  "aria-label": "Toggle Sidebar",
6500
6468
  tabindex: -1,
6501
6469
  title: "Toggle Sidebar",
6502
- class: normalizeClass(
6503
- unref(cn)(
6504
- "hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
6505
- "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
6506
- "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
6507
- "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
6508
- "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
6509
- "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
6510
- props.class
6511
- )
6512
- ),
6470
+ class: normalizeClass(unref(cn)(
6471
+ "hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
6472
+ "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
6473
+ "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
6474
+ "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
6475
+ "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
6476
+ "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
6477
+ props.class
6478
+ )),
6513
6479
  onClick: _cache[0] || (_cache[0] = //@ts-ignore
6514
6480
  (...args) => unref(toggleSidebar) && unref(toggleSidebar)(...args))
6515
6481
  }, [
@@ -6722,11 +6688,9 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
6722
6688
  default: withCtx(() => [
6723
6689
  createVNode(unref(SwitchThumb), {
6724
6690
  "data-slot": "switch-thumb",
6725
- class: normalizeClass(
6726
- unref(cn)(
6727
- "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
6728
- )
6729
- )
6691
+ class: normalizeClass(unref(cn)(
6692
+ "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
6693
+ ))
6730
6694
  }, {
6731
6695
  default: withCtx(() => [
6732
6696
  renderSlot(_ctx.$slots, "thumb")
@@ -6762,14 +6726,12 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
6762
6726
  return openBlock(), createElementBlock("div", {
6763
6727
  "data-slot": "table-container",
6764
6728
  style: normalizeStyle([containerHeight.value, containerWidth.value, _ctx.style]),
6765
- class: normalizeClass(
6766
- unref(cn)(
6767
- "relative w-full",
6768
- containerWidth.value ? "overflow-x-auto" : "overflow-x-hidden",
6769
- containerHeight.value ? "overflow-y-auto" : "overflow-y-hidden",
6770
- props.class
6771
- )
6772
- )
6729
+ class: normalizeClass(unref(cn)(
6730
+ "relative w-full",
6731
+ containerWidth.value ? "overflow-x-auto" : "overflow-x-hidden",
6732
+ containerHeight.value ? "overflow-y-auto" : "overflow-y-hidden",
6733
+ props.class
6734
+ ))
6773
6735
  }, [
6774
6736
  createElementVNode("table", {
6775
6737
  "data-slot": "table",
@@ -6829,12 +6791,10 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
6829
6791
  return (_ctx, _cache) => {
6830
6792
  return openBlock(), createElementBlock("td", {
6831
6793
  "data-slot": "table-cell",
6832
- class: normalizeClass(
6833
- unref(cn)(
6834
- "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
6835
- props.class
6836
- )
6837
- )
6794
+ class: normalizeClass(unref(cn)(
6795
+ "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
6796
+ props.class
6797
+ ))
6838
6798
  }, [
6839
6799
  renderSlot(_ctx.$slots, "default")
6840
6800
  ], 2);
@@ -6852,9 +6812,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
6852
6812
  return (_ctx, _cache) => {
6853
6813
  return openBlock(), createElementBlock("tr", {
6854
6814
  "data-slot": "table-row",
6855
- class: normalizeClass(
6856
- unref(cn)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", props.class)
6857
- )
6815
+ class: normalizeClass(unref(cn)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", props.class))
6858
6816
  }, [
6859
6817
  renderSlot(_ctx.$slots, "default")
6860
6818
  ], 2);
@@ -6923,12 +6881,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
6923
6881
  return (_ctx, _cache) => {
6924
6882
  return openBlock(), createElementBlock("th", {
6925
6883
  "data-slot": "table-head",
6926
- class: normalizeClass(
6927
- unref(cn)(
6928
- "text-muted-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
6929
- props.class
6930
- )
6931
- )
6884
+ class: normalizeClass(unref(cn)(
6885
+ "text-muted-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
6886
+ props.class
6887
+ ))
6932
6888
  }, [
6933
6889
  renderSlot(_ctx.$slots, "default")
6934
6890
  ], 2);
@@ -7251,12 +7207,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
7251
7207
  return withDirectives((openBlock(), createElementBlock("textarea", {
7252
7208
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
7253
7209
  "data-slot": "textarea",
7254
- class: normalizeClass(
7255
- unref(cn)(
7256
- "border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
7257
- props.class
7258
- )
7259
- )
7210
+ class: normalizeClass(unref(cn)(
7211
+ "border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
7212
+ props.class
7213
+ ))
7260
7214
  }, null, 2)), [
7261
7215
  [vModelText, unref(modelValue)]
7262
7216
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/vue-components",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "description": "Vue components",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -24,12 +24,12 @@
24
24
  ],
25
25
  "dependencies": {
26
26
  "@tanstack/vue-table": "^8.21.3",
27
- "@tb-dev/utils": "^7.0.9",
28
- "@tb-dev/vue": "^3.0.1",
27
+ "@tb-dev/utils": "^7.0.10",
28
+ "@tb-dev/vue": "^3.1.1",
29
29
  "@vueuse/core": "^13.6.0",
30
30
  "class-variance-authority": "^0.7.1",
31
31
  "clsx": "^2.1.1",
32
- "lucide-vue-next": "^0.534.0",
32
+ "lucide-vue-next": "^0.539.0",
33
33
  "reka-ui": "^2.4.1",
34
34
  "tailwind-merge": "^3.3.1",
35
35
  "tw-animate-css": "^1.3.6",
@@ -40,19 +40,16 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@tailwindcss/vite": "^4.1.11",
43
- "@tb-dev/eslint-config": "^8.0.3",
44
- "@types/node": "^24.1.0",
43
+ "@tb-dev/eslint-config": "^8.0.4",
44
+ "@types/node": "^24.2.1",
45
45
  "@vitejs/plugin-vue": "^6.0.1",
46
- "eslint": "^9.32.0",
47
- "prettier": "^3.6.2",
48
- "prettier-plugin-css-order": "^2.1.2",
49
- "prettier-plugin-tailwindcss": "^0.6.14",
46
+ "eslint": "^9.33.0",
50
47
  "tailwindcss": "^4.1.11",
51
48
  "tslib": "^2.8.1",
52
- "typescript": "~5.8.3",
53
- "vite": "^7.0.6",
49
+ "typescript": "~5.9.2",
50
+ "vite": "^7.1.2",
54
51
  "vite-plugin-dts": "^4.5.4",
55
- "vue-tsc": "~3.0.4"
52
+ "vue-tsc": "~3.0.5"
56
53
  },
57
54
  "files": [
58
55
  "dist"
@@ -70,7 +67,7 @@
70
67
  },
71
68
  "scripts": {
72
69
  "build": "vite build",
73
- "format": "prettier . --write",
70
+ "format": "dprint fmt",
74
71
  "lint": "eslint . --config eslint.config.js",
75
72
  "release": "pnpm run build && pnpm publish",
76
73
  "type-check": "vue-tsc --noEmit"