@1337exp/taoui 5.0.0 → 5.1.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/CHANGELOG.md +7 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/skills/taoui/references/components.md +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.1.0
|
|
4
|
+
|
|
5
|
+
Two small additions, nothing to migrate.
|
|
6
|
+
|
|
7
|
+
- **`TaoSwitch` `loading`**: the change is being applied (a request is on its way). A spinner runs on the thumb, a click does nothing and the box stays as the model says, the switch is not greyed out like a disabled one, and `aria-busy` tells a screen reader.
|
|
8
|
+
- **A contact patch on the slider thumb** (`TaoSlider`, `TaoRangeSlider`, `TaoScrubber`): a soft ring of the thumb's own colour around the dot, wider under the pointer and widest while dragging, as if a finger pressed it. A shadow, so the layout and the hit area stay the same; none on `flat` and disabled sliders; the keyboard focus ring moves outside it.
|
|
9
|
+
|
|
3
10
|
## 5.0.0
|
|
4
11
|
|
|
5
12
|
A foundation release: shared mechanisms instead of per-component copies, and a clean API. Everything deprecated since 2.0 is removed, so read [MIGRATION-5.md](MIGRATION-5.md) first. Why and how: `docs/v5-plan.md`.
|
package/dist/index.d.ts
CHANGED
|
@@ -1680,11 +1680,19 @@ disabled?: boolean;
|
|
|
1680
1680
|
error?: boolean;
|
|
1681
1681
|
/** Size, same scale as TaoButton; without it — the size of ancestors. / Размер, шкала как у TaoButton; без него — размер предков. */
|
|
1682
1682
|
size?: TaoSize;
|
|
1683
|
+
/**
|
|
1684
|
+
* The change is being applied (a request is on its way): a spinner on the thumb, a click does nothing, and it is
|
|
1685
|
+
* not greyed out like a disabled switch. A screen reader hears it busy.
|
|
1686
|
+
* Изменение применяется (запрос в пути): на бегунке крутится кольцо, щелчок ничего не делает, и переключатель не
|
|
1687
|
+
* гаснет, как недоступный. Скринридер слышит «занят».
|
|
1688
|
+
*/
|
|
1689
|
+
loading?: boolean;
|
|
1683
1690
|
}>, {
|
|
1684
1691
|
modelValue: boolean;
|
|
1685
1692
|
label: string;
|
|
1686
1693
|
disabled: boolean;
|
|
1687
1694
|
error: boolean;
|
|
1695
|
+
loading: boolean;
|
|
1688
1696
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1689
1697
|
change: (value: boolean) => void;
|
|
1690
1698
|
"update:modelValue": (value: boolean) => void;
|
|
@@ -1696,11 +1704,19 @@ disabled?: boolean;
|
|
|
1696
1704
|
error?: boolean;
|
|
1697
1705
|
/** Size, same scale as TaoButton; without it — the size of ancestors. / Размер, шкала как у TaoButton; без него — размер предков. */
|
|
1698
1706
|
size?: TaoSize;
|
|
1707
|
+
/**
|
|
1708
|
+
* The change is being applied (a request is on its way): a spinner on the thumb, a click does nothing, and it is
|
|
1709
|
+
* not greyed out like a disabled switch. A screen reader hears it busy.
|
|
1710
|
+
* Изменение применяется (запрос в пути): на бегунке крутится кольцо, щелчок ничего не делает, и переключатель не
|
|
1711
|
+
* гаснет, как недоступный. Скринридер слышит «занят».
|
|
1712
|
+
*/
|
|
1713
|
+
loading?: boolean;
|
|
1699
1714
|
}>, {
|
|
1700
1715
|
modelValue: boolean;
|
|
1701
1716
|
label: string;
|
|
1702
1717
|
disabled: boolean;
|
|
1703
1718
|
error: boolean;
|
|
1719
|
+
loading: boolean;
|
|
1704
1720
|
}>>> & Readonly<{
|
|
1705
1721
|
onChange?: ((value: boolean) => any) | undefined;
|
|
1706
1722
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
@@ -1708,6 +1724,7 @@ onChange?: ((value: boolean) => any) | undefined;
|
|
|
1708
1724
|
label: string;
|
|
1709
1725
|
disabled: boolean;
|
|
1710
1726
|
error: boolean;
|
|
1727
|
+
loading: boolean;
|
|
1711
1728
|
modelValue: boolean;
|
|
1712
1729
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
1713
1730
|
|
package/dist/index.js
CHANGED
|
@@ -2043,7 +2043,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
2043
2043
|
};
|
|
2044
2044
|
}
|
|
2045
2045
|
});
|
|
2046
|
-
const TaoSliderBase = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-v-
|
|
2046
|
+
const TaoSliderBase = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-v-6085dc4f"]]);
|
|
2047
2047
|
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
2048
2048
|
...{ name: "TaoSlider" },
|
|
2049
2049
|
__name: "TaoSlider",
|
|
@@ -8424,7 +8424,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
8424
8424
|
});
|
|
8425
8425
|
const TaoDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-4f6bc7bf"]]);
|
|
8426
8426
|
const _hoisted_1$i = ["for"];
|
|
8427
|
-
const _hoisted_2$g = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
|
|
8427
|
+
const _hoisted_2$g = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby", "aria-busy"];
|
|
8428
8428
|
const _hoisted_3$d = {
|
|
8429
8429
|
key: 0,
|
|
8430
8430
|
class: "tao-switch__label"
|
|
@@ -8441,15 +8441,19 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
8441
8441
|
label: { default: "" },
|
|
8442
8442
|
disabled: { type: Boolean, default: false },
|
|
8443
8443
|
error: { type: Boolean, default: false },
|
|
8444
|
-
size: {}
|
|
8444
|
+
size: {},
|
|
8445
|
+
loading: { type: Boolean, default: false }
|
|
8445
8446
|
},
|
|
8446
8447
|
emits: ["update:modelValue", "change"],
|
|
8447
8448
|
setup(__props, { emit: __emit }) {
|
|
8448
8449
|
const props = __props;
|
|
8449
8450
|
const emit = __emit;
|
|
8450
8451
|
const { controlId, invalid, describedBy } = useField(props);
|
|
8451
|
-
function toggle() {
|
|
8452
|
-
if (props.disabled) {
|
|
8452
|
+
function toggle(event) {
|
|
8453
|
+
if (props.disabled || props.loading) {
|
|
8454
|
+
if (event?.target instanceof HTMLInputElement) {
|
|
8455
|
+
event.target.checked = props.modelValue;
|
|
8456
|
+
}
|
|
8453
8457
|
return;
|
|
8454
8458
|
}
|
|
8455
8459
|
const next = !props.modelValue;
|
|
@@ -8458,7 +8462,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
8458
8462
|
}
|
|
8459
8463
|
return (_ctx, _cache) => {
|
|
8460
8464
|
return openBlock(), createElementBlock("label", {
|
|
8461
|
-
class: normalizeClass(["tao-switch", [unref(sizeClass)(__props.size), { "tao-switch--disabled": __props.disabled, "tao-switch--on": __props.modelValue, "tao-switch--invalid": unref(invalid) }]]),
|
|
8465
|
+
class: normalizeClass(["tao-switch", [unref(sizeClass)(__props.size), { "tao-switch--disabled": __props.disabled, "tao-switch--on": __props.modelValue, "tao-switch--invalid": unref(invalid), "tao-switch--loading": __props.loading }]]),
|
|
8462
8466
|
for: unref(controlId)
|
|
8463
8467
|
}, [
|
|
8464
8468
|
createElementVNode("input", {
|
|
@@ -8471,6 +8475,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
8471
8475
|
"aria-checked": __props.modelValue,
|
|
8472
8476
|
"aria-invalid": unref(invalid) || void 0,
|
|
8473
8477
|
"aria-describedby": unref(describedBy),
|
|
8478
|
+
"aria-busy": __props.loading || void 0,
|
|
8474
8479
|
onChange: toggle
|
|
8475
8480
|
}, null, 40, _hoisted_2$g),
|
|
8476
8481
|
_cache[0] || (_cache[0] = createElementVNode("span", {
|
|
@@ -8486,7 +8491,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
8486
8491
|
};
|
|
8487
8492
|
}
|
|
8488
8493
|
});
|
|
8489
|
-
const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-
|
|
8494
|
+
const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-fc2a8d88"]]);
|
|
8490
8495
|
const radioGroupKey = Symbol("taoRadioGroup");
|
|
8491
8496
|
const _hoisted_1$h = ["for"];
|
|
8492
8497
|
const _hoisted_2$f = ["id", "name", "value", "checked", "disabled", "aria-invalid", "aria-describedby"];
|