@tb-dev/vue 0.3.11 → 0.3.13

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.
@@ -21,7 +21,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
21
21
  "update:modelValue": (value: boolean) => any;
22
22
  }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
23
23
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
24
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
24
+ }>, {
25
+ position: "after" | "before";
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
25
27
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
26
28
  export default _default;
27
29
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -3,4 +3,5 @@ export interface SwitchProps {
3
3
  disabled?: boolean;
4
4
  label?: string;
5
5
  labelClass?: string;
6
+ position?: 'after' | 'before';
6
7
  }
package/dist/index.js CHANGED
@@ -702,12 +702,12 @@ const _sfc_main$2v = /* @__PURE__ */ defineComponent({
702
702
  });
703
703
  return (_ctx, _cache) => {
704
704
  return openBlock(), createBlock(unref(ComboboxGroup), mergeProps({ "data-slot": "combobox-group" }, delegatedProps.value, {
705
- class: unref(cn)("overflow-hidden p-1 text-foreground", props.class)
705
+ class: unref(cn)("text-foreground overflow-hidden p-1", props.class)
706
706
  }), {
707
707
  default: withCtx(() => [
708
708
  _ctx.heading ? (openBlock(), createBlock(unref(ComboboxLabel), {
709
709
  key: 0,
710
- class: "px-2 py-1.5 text-xs font-medium text-muted-foreground"
710
+ class: "text-muted-foreground px-2 py-1.5 text-xs font-medium"
711
711
  }, {
712
712
  default: withCtx(() => [
713
713
  createTextVNode(toDisplayString(_ctx.heading), 1)
@@ -869,7 +869,7 @@ const _sfc_main$2r = /* @__PURE__ */ defineComponent({
869
869
  default: withCtx(() => [
870
870
  createVNode(unref(ComboboxContent), mergeProps({ "data-slot": "combobox-list" }, unref(forwarded), {
871
871
  class: unref(cn)(
872
- "z-50 w-[200px] rounded-md border bg-popover text-popover-foreground origin-(--reka-combobox-content-transform-origin) overflow-hidden shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
872
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-[200px] origin-(--reka-combobox-content-transform-origin) overflow-hidden rounded-md border shadow-md outline-none",
873
873
  props.class
874
874
  )
875
875
  }), {
@@ -1581,11 +1581,11 @@ const _sfc_main$23 = /* @__PURE__ */ defineComponent({
1581
1581
  return (_ctx, _cache) => {
1582
1582
  return openBlock(), createBlock(unref(DialogPortal), null, {
1583
1583
  default: withCtx(() => [
1584
- createVNode(unref(DialogOverlay), { class: "fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" }, {
1584
+ createVNode(unref(DialogOverlay), { class: "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-black/80" }, {
1585
1585
  default: withCtx(() => [
1586
1586
  createVNode(unref(DialogContent), mergeProps({
1587
1587
  class: unref(cn)(
1588
- "relative z-50 grid w-full max-w-lg my-8 gap-4 border border-border bg-background p-6 shadow-lg duration-200 sm:rounded-lg md:w-full",
1588
+ "border-border bg-background relative z-50 my-8 grid w-full max-w-lg gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg md:w-full",
1589
1589
  props.class
1590
1590
  )
1591
1591
  }, unref(forwarded), {
@@ -1599,9 +1599,9 @@ const _sfc_main$23 = /* @__PURE__ */ defineComponent({
1599
1599
  }), {
1600
1600
  default: withCtx(() => [
1601
1601
  renderSlot(_ctx.$slots, "default"),
1602
- createVNode(unref(DialogClose), { class: "absolute top-4 right-4 p-0.5 transition-colors rounded-md hover:bg-secondary" }, {
1602
+ createVNode(unref(DialogClose), { class: "hover:bg-secondary absolute top-4 right-4 rounded-md p-0.5 transition-colors" }, {
1603
1603
  default: withCtx(() => [
1604
- createVNode(unref(X), { class: "w-4 h-4" }),
1604
+ createVNode(unref(X), { class: "h-4 w-4" }),
1605
1605
  _cache[1] || (_cache[1] = createElementVNode("span", { class: "sr-only" }, "Close", -1))
1606
1606
  ]),
1607
1607
  _: 1
@@ -2233,7 +2233,7 @@ const _sfc_main$1K = /* @__PURE__ */ defineComponent({
2233
2233
  return openBlock(), createElementBlock("div", {
2234
2234
  class: normalizeClass(
2235
2235
  unref(cn)(
2236
- "relative [&>[data-slot=input]]:has-[[data-slot=increment]]:pr-5 [&>[data-slot=input]]:has-[[data-slot=decrement]]:pl-5",
2236
+ "relative [&>[data-slot=input]]:has-[[data-slot=decrement]]:pl-5 [&>[data-slot=input]]:has-[[data-slot=increment]]:pr-5",
2237
2237
  props.class
2238
2238
  )
2239
2239
  )
@@ -2262,7 +2262,7 @@ const _sfc_main$1J = /* @__PURE__ */ defineComponent({
2262
2262
  return (_ctx, _cache) => {
2263
2263
  return openBlock(), createBlock(unref(NumberFieldDecrement), mergeProps({ "data-slot": "decrement" }, unref(forwarded), {
2264
2264
  class: unref(cn)(
2265
- "absolute top-1/2 -translate-y-1/2 left-0 p-3 disabled:cursor-not-allowed disabled:opacity-20",
2265
+ "absolute top-1/2 left-0 -translate-y-1/2 p-3 disabled:cursor-not-allowed disabled:opacity-20",
2266
2266
  props.class
2267
2267
  )
2268
2268
  }), {
@@ -2295,7 +2295,7 @@ const _sfc_main$1I = /* @__PURE__ */ defineComponent({
2295
2295
  return (_ctx, _cache) => {
2296
2296
  return openBlock(), createBlock(unref(NumberFieldIncrement), mergeProps({ "data-slot": "increment" }, unref(forwarded), {
2297
2297
  class: unref(cn)(
2298
- "absolute top-1/2 -translate-y-1/2 right-0 disabled:cursor-not-allowed disabled:opacity-20 p-3",
2298
+ "absolute top-1/2 right-0 -translate-y-1/2 p-3 disabled:cursor-not-allowed disabled:opacity-20",
2299
2299
  props.class
2300
2300
  )
2301
2301
  }), {
@@ -2322,7 +2322,7 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
2322
2322
  "data-slot": "input",
2323
2323
  class: normalizeClass(
2324
2324
  unref(cn)(
2325
- "flex h-9 w-full rounded-md border border-input bg-transparent py-1 text-sm text-center shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
2325
+ "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",
2326
2326
  props.class
2327
2327
  )
2328
2328
  )
@@ -3275,7 +3275,7 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
3275
3275
  default: withCtx(() => [
3276
3276
  createVNode(unref(PopoverContent), mergeProps({ "data-slot": "popover-content" }, { ...unref(forwarded), ..._ctx.$attrs }, {
3277
3277
  class: unref(cn)(
3278
- "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md origin-(--reka-popover-content-transform-origin) outline-hidden",
3278
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--reka-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
3279
3279
  props.class
3280
3280
  )
3281
3281
  }), {
@@ -4663,7 +4663,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
4663
4663
  return (_ctx, _cache) => {
4664
4664
  return openBlock(), createElementBlock("div", {
4665
4665
  "data-slot": "skeleton",
4666
- class: normalizeClass(unref(cn)("animate-pulse rounded-md bg-primary/10", props.class))
4666
+ class: normalizeClass(unref(cn)("bg-primary/10 animate-pulse rounded-md", props.class))
4667
4667
  }, null, 2);
4668
4668
  };
4669
4669
  }
@@ -5052,7 +5052,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
5052
5052
  });
5053
5053
 
5054
5054
  const _hoisted_1$2 = {
5055
- key: 0,
5055
+ key: 1,
5056
5056
  class: "w-full"
5057
5057
  };
5058
5058
  const _sfc_main$m = /* @__PURE__ */ defineComponent({
@@ -5061,7 +5061,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
5061
5061
  class: {},
5062
5062
  disabled: { type: Boolean },
5063
5063
  label: {},
5064
- labelClass: {}
5064
+ labelClass: {},
5065
+ position: { default: "before" }
5065
5066
  }, {
5066
5067
  "modelValue": { type: Boolean, ...{ required: true } },
5067
5068
  "modelModifiers": {}
@@ -5094,11 +5095,12 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
5094
5095
  }),
5095
5096
  _ctx.label || _ctx.$slots.label ? (openBlock(), createBlock(unref(_sfc_main$1M), {
5096
5097
  key: 0,
5097
- class: normalizeClass(_ctx.labelClass)
5098
+ class: normalizeClass(unref(cn)("flex flex-row items-center justify-start gap-2", _ctx.labelClass))
5098
5099
  }, {
5099
5100
  default: withCtx(() => [
5100
- _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1$2, toDisplayString(_ctx.label), 1)) : renderSlot(_ctx.$slots, "label", { key: 1 }),
5101
- createVNode(unref(ReuseTemplate))
5101
+ _ctx.position === "before" ? (openBlock(), createBlock(unref(ReuseTemplate), { key: 0 })) : createCommentVNode("", true),
5102
+ _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1$2, toDisplayString(_ctx.label), 1)) : renderSlot(_ctx.$slots, "label", { key: 2 }),
5103
+ _ctx.position === "after" ? (openBlock(), createBlock(unref(ReuseTemplate), { key: 3 })) : createCommentVNode("", true)
5102
5104
  ]),
5103
5105
  _: 3
5104
5106
  }, 8, ["class"])) : (openBlock(), createBlock(unref(ReuseTemplate), { key: 1 }))
@@ -5227,7 +5229,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
5227
5229
  return openBlock(), createBlock(_sfc_main$h, null, {
5228
5230
  default: withCtx(() => [
5229
5231
  createVNode(_sfc_main$i, mergeProps({
5230
- class: unref(cn)("p-4 whitespace-nowrap align-middle text-sm text-foreground", props.class)
5232
+ class: unref(cn)("text-foreground p-4 align-middle text-sm whitespace-nowrap", props.class)
5231
5233
  }, delegatedProps.value), {
5232
5234
  default: withCtx(() => [
5233
5235
  createElementVNode("div", _hoisted_1, [
@@ -5541,7 +5543,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
5541
5543
  return (_ctx, _cache) => {
5542
5544
  return openBlock(), createBlock(unref(TagsInputRoot), mergeProps(unref(forwarded), {
5543
5545
  class: unref(cn)(
5544
- "flex flex-wrap gap-2 items-center rounded-md border border-input bg-background px-3 py-1.5 text-sm",
5546
+ "border-input bg-background flex flex-wrap items-center gap-2 rounded-md border px-3 py-1.5 text-sm",
5545
5547
  props.class
5546
5548
  )
5547
5549
  }), {
@@ -5573,7 +5575,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
5573
5575
  const forwardedProps = useForwardProps(delegatedProps);
5574
5576
  return (_ctx, _cache) => {
5575
5577
  return openBlock(), createBlock(unref(TagsInputInput), mergeProps(unref(forwardedProps), {
5576
- class: unref(cn)("text-sm min-h-5 focus:outline-none flex-1 bg-transparent px-1", props.class)
5578
+ class: unref(cn)("min-h-5 flex-1 bg-transparent px-1 text-sm focus:outline-none", props.class)
5577
5579
  }), null, 16, ["class"]);
5578
5580
  };
5579
5581
  }
@@ -5598,7 +5600,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
5598
5600
  return (_ctx, _cache) => {
5599
5601
  return openBlock(), createBlock(unref(TagsInputItem), mergeProps(unref(forwardedProps), {
5600
5602
  class: unref(cn)(
5601
- "flex h-5 items-center rounded-md bg-secondary data-[state=active]:ring-ring data-[state=active]:ring-2 data-[state=active]:ring-offset-2 ring-offset-background",
5603
+ "bg-secondary data-[state=active]:ring-ring ring-offset-background flex h-5 items-center rounded-md data-[state=active]:ring-2 data-[state=active]:ring-offset-2",
5602
5604
  props.class
5603
5605
  )
5604
5606
  }), {
@@ -5627,11 +5629,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5627
5629
  const forwardedProps = useForwardProps(delegatedProps);
5628
5630
  return (_ctx, _cache) => {
5629
5631
  return openBlock(), createBlock(unref(TagsInputItemDelete), mergeProps(unref(forwardedProps), {
5630
- class: unref(cn)("flex rounded bg-transparent mr-1", props.class)
5632
+ class: unref(cn)("mr-1 flex rounded bg-transparent", props.class)
5631
5633
  }), {
5632
5634
  default: withCtx(() => [
5633
5635
  renderSlot(_ctx.$slots, "default", {}, () => [
5634
- createVNode(unref(X), { class: "w-4 h-4" })
5636
+ createVNode(unref(X), { class: "h-4 w-4" })
5635
5637
  ])
5636
5638
  ]),
5637
5639
  _: 3
@@ -5656,7 +5658,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
5656
5658
  const forwardedProps = useForwardProps(delegatedProps);
5657
5659
  return (_ctx, _cache) => {
5658
5660
  return openBlock(), createBlock(unref(TagsInputItemText), mergeProps(unref(forwardedProps), {
5659
- class: unref(cn)("py-0.5 px-2 text-sm rounded bg-transparent", props.class)
5661
+ class: unref(cn)("rounded bg-transparent px-2 py-0.5 text-sm", props.class)
5660
5662
  }), null, 16, ["class"]);
5661
5663
  };
5662
5664
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/vue",
3
- "version": "0.3.11",
3
+ "version": "0.3.13",
4
4
  "description": "Vue utilities",
5
5
  "license": "MIT",
6
6
  "type": "module",