@tb-dev/vue 0.3.29 → 0.3.31

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.
@@ -5,6 +5,7 @@ interface Props extends PrimitiveProps {
5
5
  variant?: ButtonVariants['variant'];
6
6
  size?: ButtonVariants['size'];
7
7
  class?: HTMLAttributes['class'];
8
+ type?: 'button' | 'submit';
8
9
  }
9
10
  declare function __VLS_template(): {
10
11
  attrs: Partial<{}>;
@@ -17,6 +18,7 @@ declare function __VLS_template(): {
17
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
19
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
19
20
  as: import('reka-ui').AsTag | import('vue').Component;
21
+ type: "button" | "submit";
20
22
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
23
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
24
  export default _default;
@@ -8,6 +8,7 @@ export interface TextareaProps {
8
8
  class?: HTMLAttributes['class'];
9
9
  cols?: TextareaHTMLAttributes['cols'];
10
10
  disabled?: boolean;
11
+ height?: number | string;
11
12
  label?: string;
12
13
  labelClass?: HTMLAttributes['class'];
13
14
  max?: TextareaHTMLAttributes['maxlength'];
package/dist/index.js CHANGED
@@ -141,6 +141,7 @@ const _sfc_main$2X = /* @__PURE__ */ defineComponent({
141
141
  variant: {},
142
142
  size: {},
143
143
  class: {},
144
+ type: { default: "button" },
144
145
  asChild: { type: Boolean },
145
146
  as: { default: "button" }
146
147
  },
@@ -151,13 +152,14 @@ const _sfc_main$2X = /* @__PURE__ */ defineComponent({
151
152
  "data-slot": "button",
152
153
  as: _ctx.as,
153
154
  "as-child": _ctx.asChild,
155
+ type: _ctx.type,
154
156
  class: normalizeClass(unref(cn)(unref(buttonVariants)({ variant: _ctx.variant, size: _ctx.size }), props.class))
155
157
  }, {
156
158
  default: withCtx(() => [
157
159
  renderSlot(_ctx.$slots, "default")
158
160
  ]),
159
161
  _: 3
160
- }, 8, ["as", "as-child", "class"]);
162
+ }, 8, ["as", "as-child", "type", "class"]);
161
163
  };
162
164
  }
163
165
  });
@@ -6306,6 +6308,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6306
6308
  class: {},
6307
6309
  cols: {},
6308
6310
  disabled: { type: Boolean },
6311
+ height: {},
6309
6312
  label: {},
6310
6313
  labelClass: {},
6311
6314
  max: {},
@@ -6328,6 +6331,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6328
6331
  get: () => props.modelValue ?? void 0,
6329
6332
  set: (it) => emit("update:modelValue", it ?? null)
6330
6333
  });
6334
+ const textareaHeight = computed(() => {
6335
+ return props.height ? { height: toPixel(props.height) } : null;
6336
+ });
6331
6337
  const [DefineTemplate, ReuseTemplate] = createReusableTemplate();
6332
6338
  return (_ctx, _cache) => {
6333
6339
  return openBlock(), createElementBlock(Fragment, null, [
@@ -6350,7 +6356,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6350
6356
  required: _ctx.required,
6351
6357
  rows: _ctx.rows,
6352
6358
  spellcheck: _ctx.spellcheck,
6353
- style: _ctx.style,
6359
+ style: [textareaHeight.value, _ctx.style],
6354
6360
  class: unref(cn)(
6355
6361
  "size-full resize-none font-normal focus-visible:ring-0 disabled:cursor-default",
6356
6362
  props.class
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/vue",
3
- "version": "0.3.29",
3
+ "version": "0.3.31",
4
4
  "description": "Vue utilities",
5
5
  "license": "MIT",
6
6
  "type": "module",