@tb-dev/vue 0.3.21 → 0.3.23
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/checkbox/Checkbox.vue.d.ts +9 -4
- package/dist/components/checkbox/types.d.ts +3 -6
- package/dist/components/input/types.d.ts +4 -0
- package/dist/components/input-number/types.d.ts +9 -3
- package/dist/components/input-text/types.d.ts +4 -1
- package/dist/components/select/types.d.ts +4 -1
- package/dist/components/switch/types.d.ts +0 -1
- package/dist/components/textarea/Textarea.vue.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +77 -59
- package/package.json +3 -3
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { CheckboxProps } from './types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { CheckboxRootProps } from 'reka-ui';
|
|
3
|
+
type __VLS_Props = CheckboxProps;
|
|
4
|
+
type __VLS_PublicProps = {
|
|
5
|
+
modelValue?: CheckboxRootProps['modelValue'];
|
|
6
|
+
} & __VLS_Props;
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (value: boolean | "indeterminate" | null | undefined) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
10
|
+
"onUpdate:modelValue"?: ((value: boolean | "indeterminate" | null | undefined) => any) | undefined;
|
|
6
11
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
12
|
export default _default;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CheckboxRootProps } from 'reka-ui';
|
|
2
2
|
export interface CheckboxProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
disabled?: boolean;
|
|
3
|
+
defaultValue?: CheckboxRootProps['defaultValue'];
|
|
4
|
+
disabled?: CheckboxRootProps['disabled'];
|
|
6
5
|
label?: string;
|
|
7
6
|
labelClass?: string;
|
|
8
|
-
modelValue?: Option<boolean>;
|
|
9
|
-
required?: boolean;
|
|
10
7
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Option } from '@tb-dev/utils';
|
|
2
2
|
import { InputHTMLAttributes } from 'vue';
|
|
3
3
|
export interface InputProps {
|
|
4
|
+
autocomplete?: InputHTMLAttributes['autocomplete'];
|
|
5
|
+
autofocus?: InputHTMLAttributes['autofocus'];
|
|
4
6
|
class?: string;
|
|
5
7
|
disabled?: InputHTMLAttributes['disabled'];
|
|
6
8
|
label?: string;
|
|
@@ -10,6 +12,8 @@ export interface InputProps {
|
|
|
10
12
|
modelValue: Option<string>;
|
|
11
13
|
onBlur?: () => void;
|
|
12
14
|
placeholder?: InputHTMLAttributes['placeholder'];
|
|
15
|
+
readonly?: InputHTMLAttributes['readonly'];
|
|
16
|
+
required?: InputHTMLAttributes['required'];
|
|
13
17
|
size?: InputHTMLAttributes['size'];
|
|
14
18
|
spellcheck?: InputHTMLAttributes['spellcheck'];
|
|
15
19
|
type?: InputHTMLAttributes['type'];
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { Option } from '@tb-dev/utils';
|
|
2
|
+
import { NumberFieldRootProps } from 'reka-ui';
|
|
2
3
|
export interface InputNumberProps {
|
|
3
4
|
class?: string;
|
|
4
5
|
defaultValue?: number;
|
|
5
6
|
disabled?: boolean;
|
|
6
|
-
|
|
7
|
+
disableDecrement?: boolean;
|
|
8
|
+
disableIncrement?: boolean;
|
|
9
|
+
disableWheelChange?: NumberFieldRootProps['disableWheelChange'];
|
|
10
|
+
formatOptions?: NumberFieldRootProps['formatOptions'];
|
|
7
11
|
label?: string;
|
|
8
12
|
labelClass?: string;
|
|
9
|
-
max?:
|
|
10
|
-
min?:
|
|
13
|
+
max?: NumberFieldRootProps['max'];
|
|
14
|
+
min?: NumberFieldRootProps['min'];
|
|
11
15
|
modelValue: Option<number>;
|
|
16
|
+
step?: NumberFieldRootProps['step'];
|
|
17
|
+
stepSnapping?: NumberFieldRootProps['stepSnapping'];
|
|
12
18
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'vue';
|
|
2
2
|
export interface InputTextProps {
|
|
3
|
-
|
|
3
|
+
autocomplete?: InputHTMLAttributes['autocomplete'];
|
|
4
|
+
autofocus?: InputHTMLAttributes['autofocus'];
|
|
4
5
|
disabled?: InputHTMLAttributes['disabled'];
|
|
5
6
|
label?: string;
|
|
6
7
|
labelClass?: string;
|
|
@@ -8,6 +9,8 @@ export interface InputTextProps {
|
|
|
8
9
|
min?: InputHTMLAttributes['minlength'];
|
|
9
10
|
onBlur?: () => void;
|
|
10
11
|
placeholder?: InputHTMLAttributes['placeholder'];
|
|
12
|
+
readonly?: InputHTMLAttributes['readonly'];
|
|
13
|
+
required?: InputHTMLAttributes['required'];
|
|
11
14
|
size?: InputHTMLAttributes['size'];
|
|
12
15
|
spellcheck?: InputHTMLAttributes['spellcheck'];
|
|
13
16
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { Option } from '@tb-dev/utils';
|
|
2
|
+
import { SelectHTMLAttributes } from 'vue';
|
|
2
3
|
export interface SelectProps {
|
|
3
|
-
|
|
4
|
+
autocomplete?: SelectHTMLAttributes['autocomplete'];
|
|
5
|
+
autofocus?: SelectHTMLAttributes['autofocus'];
|
|
4
6
|
contentClass?: string;
|
|
5
7
|
disabled?: boolean;
|
|
6
8
|
label?: string;
|
|
7
9
|
labelClass?: string;
|
|
8
10
|
modelValue: Option<string>;
|
|
9
11
|
placeholder?: string;
|
|
12
|
+
required?: boolean;
|
|
10
13
|
triggerClass?: string;
|
|
11
14
|
}
|
|
@@ -4,8 +4,8 @@ declare const _default: import('vue').DefineComponent<TextareaProps, {}, {}, {},
|
|
|
4
4
|
}, string, import('vue').PublicProps, Readonly<TextareaProps> & Readonly<{
|
|
5
5
|
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
6
6
|
}>, {
|
|
7
|
-
spellcheck: boolean | "true" | "false";
|
|
8
7
|
autocomplete: string;
|
|
8
|
+
spellcheck: boolean | "true" | "false";
|
|
9
9
|
autocorrect: string;
|
|
10
10
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
export default _default;
|
package/dist/index.css
CHANGED
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, resolveDynamicComponent, createCommentVNode, normalizeStyle, createElementVNode, createTextVNode, withDirectives, isRef, vModelText,
|
|
2
|
+
import { inject as inject$1, toValue, defineComponent, computed, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot, normalizeClass, createElementBlock, Fragment, createVNode, toDisplayString, resolveDynamicComponent, createCommentVNode, normalizeStyle, mergeModels, useModel, createElementVNode, createTextVNode, withDirectives, isRef, vModelText, normalizeProps, guardReactiveProps, useTemplateRef, ref, createSlots, 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';
|
|
@@ -206,17 +206,17 @@ const _sfc_main$2P = /* @__PURE__ */ defineComponent({
|
|
|
206
206
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
207
207
|
createVNode(unref(DefineTemplate), null, {
|
|
208
208
|
default: withCtx(() => [
|
|
209
|
-
createVNode(unref(_sfc_main$2Q), {
|
|
209
|
+
createVNode(unref(_sfc_main$2Q), mergeProps(_ctx.$attrs, {
|
|
210
210
|
variant: _ctx.variant,
|
|
211
211
|
size: _ctx.size,
|
|
212
212
|
disabled: _ctx.disabled,
|
|
213
|
-
class:
|
|
214
|
-
}, {
|
|
213
|
+
class: unref(cn)("size-full", _ctx.buttonClass)
|
|
214
|
+
}), {
|
|
215
215
|
default: withCtx(() => [
|
|
216
216
|
_ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1$i, toDisplayString(_ctx.label), 1)) : renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
217
217
|
]),
|
|
218
218
|
_: 3
|
|
219
|
-
},
|
|
219
|
+
}, 16, ["variant", "size", "disabled", "class"])
|
|
220
220
|
]),
|
|
221
221
|
_: 3
|
|
222
222
|
}),
|
|
@@ -631,36 +631,29 @@ const _sfc_main$2D = /* @__PURE__ */ defineComponent({
|
|
|
631
631
|
const _hoisted_1$h = { class: "w-full" };
|
|
632
632
|
const _sfc_main$2C = /* @__PURE__ */ defineComponent({
|
|
633
633
|
__name: "Checkbox",
|
|
634
|
-
props: {
|
|
635
|
-
|
|
636
|
-
defaultValue: { type: Boolean },
|
|
634
|
+
props: /* @__PURE__ */ mergeModels({
|
|
635
|
+
defaultValue: { type: [Boolean, String] },
|
|
637
636
|
disabled: { type: Boolean },
|
|
638
637
|
label: {},
|
|
639
|
-
labelClass: {}
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
638
|
+
labelClass: {}
|
|
639
|
+
}, {
|
|
640
|
+
"modelValue": { type: [Boolean, String, null], ...{ required: false } },
|
|
641
|
+
"modelModifiers": {}
|
|
642
|
+
}),
|
|
643
643
|
emits: ["update:modelValue"],
|
|
644
|
-
setup(__props
|
|
645
|
-
const
|
|
646
|
-
const emit = __emit;
|
|
647
|
-
const value = computed({
|
|
648
|
-
get: () => props.modelValue ?? false,
|
|
649
|
-
set: (it) => emit("update:modelValue", it)
|
|
650
|
-
});
|
|
644
|
+
setup(__props) {
|
|
645
|
+
const value = useModel(__props, "modelValue");
|
|
651
646
|
const [DefineTemplate, ReuseTemplate] = createReusableTemplate();
|
|
652
647
|
return (_ctx, _cache) => {
|
|
653
648
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
654
649
|
createVNode(unref(DefineTemplate), null, {
|
|
655
650
|
default: withCtx(() => [
|
|
656
|
-
createVNode(unref(_sfc_main$2D), {
|
|
651
|
+
createVNode(unref(_sfc_main$2D), mergeProps(_ctx.$attrs, {
|
|
657
652
|
modelValue: value.value,
|
|
658
653
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
659
654
|
"default-value": _ctx.defaultValue,
|
|
660
|
-
disabled: _ctx.disabled
|
|
661
|
-
|
|
662
|
-
class: normalizeClass(props.class)
|
|
663
|
-
}, null, 8, ["modelValue", "default-value", "disabled", "required", "class"])
|
|
655
|
+
disabled: _ctx.disabled
|
|
656
|
+
}), null, 16, ["modelValue", "default-value", "disabled"])
|
|
664
657
|
]),
|
|
665
658
|
_: 1
|
|
666
659
|
}),
|
|
@@ -2217,6 +2210,8 @@ const _hoisted_1$b = { class: "w-full" };
|
|
|
2217
2210
|
const _sfc_main$1Q = /* @__PURE__ */ defineComponent({
|
|
2218
2211
|
__name: "Input",
|
|
2219
2212
|
props: {
|
|
2213
|
+
autocomplete: {},
|
|
2214
|
+
autofocus: {},
|
|
2220
2215
|
class: {},
|
|
2221
2216
|
disabled: {},
|
|
2222
2217
|
label: {},
|
|
@@ -2226,6 +2221,8 @@ const _sfc_main$1Q = /* @__PURE__ */ defineComponent({
|
|
|
2226
2221
|
modelValue: {},
|
|
2227
2222
|
onBlur: {},
|
|
2228
2223
|
placeholder: {},
|
|
2224
|
+
readonly: {},
|
|
2225
|
+
required: {},
|
|
2229
2226
|
size: {},
|
|
2230
2227
|
spellcheck: { default: "false" },
|
|
2231
2228
|
type: { default: "text" }
|
|
@@ -2244,19 +2241,24 @@ const _sfc_main$1Q = /* @__PURE__ */ defineComponent({
|
|
|
2244
2241
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
2245
2242
|
createVNode(unref(DefineTemplate), null, {
|
|
2246
2243
|
default: withCtx(() => [
|
|
2247
|
-
createVNode(unref(_sfc_main$1R), {
|
|
2244
|
+
createVNode(unref(_sfc_main$1R), mergeProps(_ctx.$attrs, {
|
|
2248
2245
|
modelValue: value.value,
|
|
2249
2246
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
2247
|
+
modelModifiers: { trim: true },
|
|
2250
2248
|
type: _ctx.type,
|
|
2249
|
+
autocomplete: _ctx.autocomplete,
|
|
2250
|
+
autofocus: _ctx.autofocus,
|
|
2251
2251
|
placeholder: _ctx.placeholder,
|
|
2252
2252
|
disabled: _ctx.disabled,
|
|
2253
2253
|
maxlength: _ctx.max,
|
|
2254
2254
|
minlength: _ctx.min,
|
|
2255
|
+
readonly: _ctx.readonly,
|
|
2256
|
+
required: _ctx.required,
|
|
2255
2257
|
size: _ctx.size,
|
|
2256
2258
|
spellcheck: _ctx.spellcheck,
|
|
2257
|
-
class:
|
|
2259
|
+
class: unref(cn)("focus-visible:ring-0 disabled:cursor-default", props.class),
|
|
2258
2260
|
onBlur: _ctx.onBlur
|
|
2259
|
-
}, null,
|
|
2261
|
+
}), null, 16, ["modelValue", "type", "autocomplete", "autofocus", "placeholder", "disabled", "maxlength", "minlength", "readonly", "required", "size", "spellcheck", "class", "onBlur"])
|
|
2260
2262
|
]),
|
|
2261
2263
|
_: 1
|
|
2262
2264
|
}),
|
|
@@ -2433,12 +2435,17 @@ const _sfc_main$1K = /* @__PURE__ */ defineComponent({
|
|
|
2433
2435
|
class: {},
|
|
2434
2436
|
defaultValue: {},
|
|
2435
2437
|
disabled: { type: Boolean },
|
|
2438
|
+
disableDecrement: { type: Boolean },
|
|
2439
|
+
disableIncrement: { type: Boolean },
|
|
2440
|
+
disableWheelChange: { type: Boolean },
|
|
2436
2441
|
formatOptions: { default: () => ({ useGrouping: false }) },
|
|
2437
2442
|
label: {},
|
|
2438
2443
|
labelClass: {},
|
|
2439
2444
|
max: {},
|
|
2440
2445
|
min: {},
|
|
2441
|
-
modelValue: {}
|
|
2446
|
+
modelValue: {},
|
|
2447
|
+
step: {},
|
|
2448
|
+
stepSnapping: { type: Boolean }
|
|
2442
2449
|
},
|
|
2443
2450
|
emits: ["update:modelValue"],
|
|
2444
2451
|
setup(__props, { emit: __emit }) {
|
|
@@ -2454,28 +2461,35 @@ const _sfc_main$1K = /* @__PURE__ */ defineComponent({
|
|
|
2454
2461
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
2455
2462
|
createVNode(unref(DefineTemplate), null, {
|
|
2456
2463
|
default: withCtx(() => [
|
|
2457
|
-
createVNode(unref(_sfc_main$1P), {
|
|
2464
|
+
createVNode(unref(_sfc_main$1P), mergeProps(_ctx.$attrs, {
|
|
2458
2465
|
modelValue: value.value,
|
|
2459
2466
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
2460
2467
|
"default-value": _ctx.defaultValue,
|
|
2468
|
+
disabled: _ctx.disabled,
|
|
2469
|
+
"disable-wheel-change": _ctx.disableWheelChange,
|
|
2461
2470
|
"format-options": _ctx.formatOptions,
|
|
2462
2471
|
min: _ctx.min,
|
|
2463
2472
|
max: _ctx.max,
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2473
|
+
step: _ctx.step,
|
|
2474
|
+
"step-snapping": _ctx.stepSnapping,
|
|
2475
|
+
class: unref(cn)("w-full", props.class)
|
|
2476
|
+
}), {
|
|
2467
2477
|
default: withCtx(() => [
|
|
2468
2478
|
createVNode(unref(_sfc_main$1O), null, {
|
|
2469
2479
|
default: withCtx(() => [
|
|
2470
|
-
createVNode(unref(_sfc_main$1N)
|
|
2480
|
+
createVNode(unref(_sfc_main$1N), {
|
|
2481
|
+
disabled: _ctx.disabled || _ctx.disableDecrement
|
|
2482
|
+
}, null, 8, ["disabled"]),
|
|
2471
2483
|
createVNode(unref(_sfc_main$1L)),
|
|
2472
|
-
createVNode(unref(_sfc_main$1M)
|
|
2484
|
+
createVNode(unref(_sfc_main$1M), {
|
|
2485
|
+
disabled: _ctx.disabled || _ctx.disableIncrement
|
|
2486
|
+
}, null, 8, ["disabled"])
|
|
2473
2487
|
]),
|
|
2474
2488
|
_: 1
|
|
2475
2489
|
})
|
|
2476
2490
|
]),
|
|
2477
2491
|
_: 1
|
|
2478
|
-
},
|
|
2492
|
+
}, 16, ["modelValue", "default-value", "disabled", "disable-wheel-change", "format-options", "min", "max", "step", "step-snapping", "class"])
|
|
2479
2493
|
]),
|
|
2480
2494
|
_: 1
|
|
2481
2495
|
}),
|
|
@@ -2497,7 +2511,8 @@ const _sfc_main$1K = /* @__PURE__ */ defineComponent({
|
|
|
2497
2511
|
const _sfc_main$1J = /* @__PURE__ */ defineComponent({
|
|
2498
2512
|
__name: "InputText",
|
|
2499
2513
|
props: /* @__PURE__ */ mergeModels({
|
|
2500
|
-
|
|
2514
|
+
autocomplete: {},
|
|
2515
|
+
autofocus: {},
|
|
2501
2516
|
disabled: {},
|
|
2502
2517
|
label: {},
|
|
2503
2518
|
labelClass: {},
|
|
@@ -2505,6 +2520,8 @@ const _sfc_main$1J = /* @__PURE__ */ defineComponent({
|
|
|
2505
2520
|
min: {},
|
|
2506
2521
|
onBlur: {},
|
|
2507
2522
|
placeholder: {},
|
|
2523
|
+
readonly: {},
|
|
2524
|
+
required: {},
|
|
2508
2525
|
size: {},
|
|
2509
2526
|
spellcheck: { default: "false" }
|
|
2510
2527
|
}, {
|
|
@@ -2513,14 +2530,14 @@ const _sfc_main$1J = /* @__PURE__ */ defineComponent({
|
|
|
2513
2530
|
}),
|
|
2514
2531
|
emits: ["update:modelValue"],
|
|
2515
2532
|
setup(__props) {
|
|
2516
|
-
const props = __props;
|
|
2517
2533
|
const value = useModel(__props, "modelValue");
|
|
2518
2534
|
return (_ctx, _cache) => {
|
|
2519
2535
|
return openBlock(), createBlock(unref(_sfc_main$1Q), {
|
|
2520
2536
|
modelValue: value.value,
|
|
2521
2537
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
2522
2538
|
type: "text",
|
|
2523
|
-
|
|
2539
|
+
autocomplete: _ctx.autocomplete,
|
|
2540
|
+
autofocus: _ctx.autofocus,
|
|
2524
2541
|
disabled: _ctx.disabled,
|
|
2525
2542
|
label: _ctx.label,
|
|
2526
2543
|
"label-class": _ctx.labelClass,
|
|
@@ -2528,9 +2545,11 @@ const _sfc_main$1J = /* @__PURE__ */ defineComponent({
|
|
|
2528
2545
|
min: _ctx.min,
|
|
2529
2546
|
"on-blur": _ctx.onBlur,
|
|
2530
2547
|
placeholder: _ctx.placeholder,
|
|
2548
|
+
readonly: _ctx.readonly,
|
|
2549
|
+
required: _ctx.required,
|
|
2531
2550
|
size: _ctx.size,
|
|
2532
2551
|
spellcheck: _ctx.spellcheck
|
|
2533
|
-
}, null, 8, ["modelValue", "
|
|
2552
|
+
}, null, 8, ["modelValue", "autocomplete", "autofocus", "disabled", "label", "label-class", "max", "min", "on-blur", "placeholder", "readonly", "required", "size", "spellcheck"]);
|
|
2534
2553
|
};
|
|
2535
2554
|
}
|
|
2536
2555
|
});
|
|
@@ -3887,13 +3906,15 @@ const _hoisted_2$1 = { class: "w-full" };
|
|
|
3887
3906
|
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
3888
3907
|
__name: "Select",
|
|
3889
3908
|
props: {
|
|
3890
|
-
|
|
3909
|
+
autocomplete: {},
|
|
3910
|
+
autofocus: {},
|
|
3891
3911
|
contentClass: {},
|
|
3892
3912
|
disabled: { type: Boolean },
|
|
3893
3913
|
label: {},
|
|
3894
3914
|
labelClass: {},
|
|
3895
3915
|
modelValue: {},
|
|
3896
3916
|
placeholder: {},
|
|
3917
|
+
required: { type: Boolean },
|
|
3897
3918
|
triggerClass: {}
|
|
3898
3919
|
},
|
|
3899
3920
|
emits: ["update:modelValue"],
|
|
@@ -3911,13 +3932,14 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
3911
3932
|
createVNode(unref(DefineTemplate), null, {
|
|
3912
3933
|
default: withCtx(() => [
|
|
3913
3934
|
createElementVNode("div", _hoisted_1$5, [
|
|
3914
|
-
createVNode(unref(_sfc_main$1d), {
|
|
3935
|
+
createVNode(unref(_sfc_main$1d), mergeProps(_ctx.$attrs, {
|
|
3915
3936
|
modelValue: value.value,
|
|
3916
3937
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
3938
|
+
autocomplete: _ctx.autocomplete,
|
|
3939
|
+
autofocus: _ctx.autofocus,
|
|
3917
3940
|
disabled: _ctx.disabled,
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
}, {
|
|
3941
|
+
required: _ctx.required
|
|
3942
|
+
}), {
|
|
3921
3943
|
default: withCtx(() => [
|
|
3922
3944
|
createVNode(unref(_sfc_main$14), {
|
|
3923
3945
|
class: normalizeClass(unref(cn)("w-full", _ctx.triggerClass))
|
|
@@ -3937,7 +3959,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
3937
3959
|
}, 8, ["class"])
|
|
3938
3960
|
]),
|
|
3939
3961
|
_: 3
|
|
3940
|
-
},
|
|
3962
|
+
}, 16, ["modelValue", "autocomplete", "autofocus", "disabled", "required"]),
|
|
3941
3963
|
renderSlot(_ctx.$slots, "action")
|
|
3942
3964
|
])
|
|
3943
3965
|
]),
|
|
@@ -5295,7 +5317,6 @@ const _hoisted_1$3 = {
|
|
|
5295
5317
|
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
5296
5318
|
__name: "Switch",
|
|
5297
5319
|
props: /* @__PURE__ */ mergeModels({
|
|
5298
|
-
class: {},
|
|
5299
5320
|
disabled: { type: Boolean },
|
|
5300
5321
|
label: {},
|
|
5301
5322
|
labelClass: {},
|
|
@@ -5306,19 +5327,17 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
5306
5327
|
}),
|
|
5307
5328
|
emits: ["update:modelValue"],
|
|
5308
5329
|
setup(__props) {
|
|
5309
|
-
const props = __props;
|
|
5310
5330
|
const toggled = useModel(__props, "modelValue");
|
|
5311
5331
|
const [DefineTemplate, ReuseTemplate] = createReusableTemplate();
|
|
5312
5332
|
return (_ctx, _cache) => {
|
|
5313
5333
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
5314
5334
|
createVNode(unref(DefineTemplate), null, {
|
|
5315
5335
|
default: withCtx(() => [
|
|
5316
|
-
createVNode(unref(_sfc_main$p), {
|
|
5336
|
+
createVNode(unref(_sfc_main$p), mergeProps(_ctx.$attrs, {
|
|
5317
5337
|
modelValue: toggled.value,
|
|
5318
5338
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => toggled.value = $event),
|
|
5319
|
-
disabled: _ctx.disabled
|
|
5320
|
-
|
|
5321
|
-
}, createSlots({ _: 2 }, [
|
|
5339
|
+
disabled: _ctx.disabled
|
|
5340
|
+
}), createSlots({ _: 2 }, [
|
|
5322
5341
|
_ctx.$slots.thumb ? {
|
|
5323
5342
|
name: "thumb",
|
|
5324
5343
|
fn: withCtx(() => [
|
|
@@ -5326,7 +5345,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
5326
5345
|
]),
|
|
5327
5346
|
key: "0"
|
|
5328
5347
|
} : void 0
|
|
5329
|
-
]),
|
|
5348
|
+
]), 1040, ["modelValue", "disabled"])
|
|
5330
5349
|
]),
|
|
5331
5350
|
_: 3
|
|
5332
5351
|
}),
|
|
@@ -5970,9 +5989,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
5970
5989
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
5971
5990
|
createVNode(unref(DefineTemplate), null, {
|
|
5972
5991
|
default: withCtx(() => [
|
|
5973
|
-
createVNode(unref(_sfc_main$3), {
|
|
5992
|
+
createVNode(unref(_sfc_main$3), mergeProps(_ctx.$attrs, {
|
|
5974
5993
|
modelValue: value.value,
|
|
5975
5994
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
5995
|
+
modelModifiers: { trim: true },
|
|
5976
5996
|
autocapitalize: _ctx.autocapitalize,
|
|
5977
5997
|
autocomplete: _ctx.autocomplete,
|
|
5978
5998
|
autocorrect: _ctx.autocorrect,
|
|
@@ -5986,14 +6006,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
5986
6006
|
required: _ctx.required,
|
|
5987
6007
|
rows: _ctx.rows,
|
|
5988
6008
|
spellcheck: _ctx.spellcheck,
|
|
5989
|
-
class:
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
props.class
|
|
5993
|
-
)
|
|
6009
|
+
class: unref(cn)(
|
|
6010
|
+
"size-full resize-none font-normal focus-visible:ring-0 disabled:cursor-default",
|
|
6011
|
+
props.class
|
|
5994
6012
|
),
|
|
5995
6013
|
onBlur: _ctx.onBlur
|
|
5996
|
-
}, null,
|
|
6014
|
+
}), null, 16, ["modelValue", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "cols", "disabled", "maxlength", "minlength", "placeholder", "readonly", "required", "rows", "spellcheck", "class", "onBlur"])
|
|
5997
6015
|
]),
|
|
5998
6016
|
_: 1
|
|
5999
6017
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tb-dev/vue",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.23",
|
|
4
4
|
"description": "Vue utilities",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"vue-sonner": "^1.3.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@tailwindcss/vite": "^4.1.
|
|
42
|
+
"@tailwindcss/vite": "^4.1.4",
|
|
43
43
|
"@tb-dev/eslint-config": "^7.0.0",
|
|
44
44
|
"@types/node": "^22.14.1",
|
|
45
45
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
@@ -47,7 +47,7 @@
|
|
|
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.4",
|
|
51
51
|
"tslib": "^2.8.1",
|
|
52
52
|
"typescript": "~5.8.3",
|
|
53
53
|
"vite": "^6.2.6",
|