@1337exp/taoui 1.8.0 → 1.9.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/dist/index.d.ts CHANGED
@@ -412,20 +412,36 @@ pointer: boolean;
412
412
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
413
413
 
414
414
  declare const __VLS_component_25: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_23<__VLS_TypePropsToRuntimeProps_25<{
415
- variant?: "gap" | "line" | "text";
415
+ /** `solid` — обычная линия. `dashed` — пунктир. `colored` — акцент. `gap` — пустой отступ. */
416
+ variant?: "solid" | "dashed" | "colored" | "gap";
416
417
  size?: "small" | "medium" | "large" | "big";
418
+ /** Подпись посередине. Не меняет стиль линии — для этого `variant`. */
419
+ text?: string;
420
+ /** Плавные края линии. У `gap` ничего не делает. */
421
+ fade?: boolean;
417
422
  }>, {
418
423
  variant: string;
419
424
  size: string;
425
+ text: string;
426
+ fade: boolean;
420
427
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_23<__VLS_TypePropsToRuntimeProps_25<{
421
- variant?: "gap" | "line" | "text";
428
+ /** `solid` — обычная линия. `dashed` — пунктир. `colored` — акцент. `gap` — пустой отступ. */
429
+ variant?: "solid" | "dashed" | "colored" | "gap";
422
430
  size?: "small" | "medium" | "large" | "big";
431
+ /** Подпись посередине. Не меняет стиль линии — для этого `variant`. */
432
+ text?: string;
433
+ /** Плавные края линии. У `gap` ничего не делает. */
434
+ fade?: boolean;
423
435
  }>, {
424
436
  variant: string;
425
437
  size: string;
438
+ text: string;
439
+ fade: boolean;
426
440
  }>>> & Readonly<{}>, {
441
+ text: string;
427
442
  size: "small" | "medium" | "large" | "big";
428
- variant: "gap" | "line" | "text";
443
+ variant: "solid" | "dashed" | "colored" | "gap";
444
+ fade: boolean;
429
445
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
430
446
 
431
447
  declare const __VLS_component_26: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_24<__VLS_TypePropsToRuntimeProps_26<{
package/dist/index.mjs CHANGED
@@ -2460,40 +2460,57 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
2460
2460
  }
2461
2461
  });
2462
2462
  const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-f353f529"]]);
2463
- const _hoisted_1$y = {
2463
+ const _hoisted_1$y = ["role", "aria-hidden"];
2464
+ const _hoisted_2$v = {
2464
2465
  key: 1,
2465
- class: "tao-divider-text"
2466
+ class: "tao-divider__text"
2466
2467
  };
2467
- const _hoisted_2$v = { class: "tao-divider-text__value" };
2468
2468
  const _hoisted_3$o = {
2469
2469
  key: 2,
2470
- class: "tao-divider-line"
2470
+ class: "tao-divider__line tao-divider__line--end"
2471
2471
  };
2472
2472
  const _sfc_main$A = /* @__PURE__ */ defineComponent({
2473
2473
  ...{ name: "TaoDivider" },
2474
2474
  __name: "TaoDivider",
2475
2475
  props: {
2476
- variant: { default: "line" },
2477
- size: { default: "medium" }
2476
+ variant: { default: "solid" },
2477
+ size: { default: "medium" },
2478
+ text: { default: "" },
2479
+ fade: { type: Boolean, default: false }
2478
2480
  },
2479
2481
  setup(__props) {
2480
2482
  const props = __props;
2483
+ const slots = useSlots();
2481
2484
  const gapSize = computed(() => props.size === "big" ? "large" : props.size);
2485
+ const hasLabel = computed(() => Boolean(props.text) || Boolean(slots.default));
2482
2486
  return (_ctx, _cache) => {
2483
- return __props.variant === "gap" ? (openBlock(), createElementBlock("div", {
2484
- key: 0,
2485
- class: normalizeClass(["tao-divider-gap", `tao-divider-gap--${gapSize.value}`])
2486
- }, null, 2)) : __props.variant === "text" ? (openBlock(), createElementBlock("div", _hoisted_1$y, [
2487
- _cache[0] || (_cache[0] = createElementVNode("span", { class: "tao-divider-text__line tao-divider-text__line--left" }, null, -1)),
2488
- createElementVNode("span", _hoisted_2$v, [
2489
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
2490
- ]),
2491
- _cache[1] || (_cache[1] = createElementVNode("span", { class: "tao-divider-text__line tao-divider-text__line--right" }, null, -1))
2492
- ])) : (openBlock(), createElementBlock("div", _hoisted_3$o));
2487
+ return openBlock(), createElementBlock("div", {
2488
+ class: normalizeClass(["tao-divider", [
2489
+ `tao-divider--${__props.variant}`,
2490
+ {
2491
+ "tao-divider--labeled": hasLabel.value,
2492
+ "tao-divider--fade": __props.fade && __props.variant !== "gap",
2493
+ [`tao-divider--gap-${gapSize.value}`]: __props.variant === "gap"
2494
+ }
2495
+ ]]),
2496
+ role: __props.variant === "gap" && !hasLabel.value ? void 0 : "separator",
2497
+ "aria-hidden": __props.variant === "gap" && !hasLabel.value ? true : void 0
2498
+ }, [
2499
+ __props.variant !== "gap" ? (openBlock(), createElementBlock("span", {
2500
+ key: 0,
2501
+ class: normalizeClass(["tao-divider__line", { "tao-divider__line--start": hasLabel.value }])
2502
+ }, null, 2)) : createCommentVNode("", true),
2503
+ hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_2$v, [
2504
+ renderSlot(_ctx.$slots, "default", {}, () => [
2505
+ createTextVNode(toDisplayString(__props.text), 1)
2506
+ ], true)
2507
+ ])) : createCommentVNode("", true),
2508
+ __props.variant !== "gap" && hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_3$o)) : createCommentVNode("", true)
2509
+ ], 10, _hoisted_1$y);
2493
2510
  };
2494
2511
  }
2495
2512
  });
2496
- const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-8187a15d"]]);
2513
+ const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-c1d072e5"]]);
2497
2514
  const _hoisted_1$x = {
2498
2515
  key: 0,
2499
2516
  class: "tao-fieldset__legend"