@1337exp/taoui 3.0.0 → 3.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/dist/index.cjs +1261 -673
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +318 -46
- package/dist/index.mjs +1262 -674
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +66 -66
package/dist/index.cjs
CHANGED
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
const value = getComputedStyle(el).getPropertyValue("--tao-size").trim();
|
|
17
17
|
return sizes.includes(value) ? value : "medium";
|
|
18
18
|
}
|
|
19
|
-
const _hoisted_1$
|
|
20
|
-
const _hoisted_2$
|
|
19
|
+
const _hoisted_1$S = ["type", "disabled"];
|
|
20
|
+
const _hoisted_2$L = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "tao-button__loader"
|
|
23
23
|
};
|
|
24
|
-
const _hoisted_3$
|
|
24
|
+
const _hoisted_3$C = {
|
|
25
25
|
key: 1,
|
|
26
26
|
class: "tao-button__icon"
|
|
27
27
|
};
|
|
28
|
-
const _hoisted_4$
|
|
29
|
-
const _sfc_main$
|
|
28
|
+
const _hoisted_4$w = { class: "tao-button__content" };
|
|
29
|
+
const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
|
|
30
30
|
...{ name: "TaoButton" },
|
|
31
31
|
__name: "TaoButton",
|
|
32
32
|
props: {
|
|
@@ -65,12 +65,12 @@
|
|
|
65
65
|
disabled: __props.disabled || __props.loading,
|
|
66
66
|
onClick: handleClick
|
|
67
67
|
}, [
|
|
68
|
-
__props.loading ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$
|
|
69
|
-
__props.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
70
|
-
vue.createElementVNode("span", _hoisted_4$
|
|
68
|
+
__props.loading ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$L)) : vue.createCommentVNode("", true),
|
|
69
|
+
__props.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$C, vue.toDisplayString(__props.icon), 1)) : vue.createCommentVNode("", true),
|
|
70
|
+
vue.createElementVNode("span", _hoisted_4$w, [
|
|
71
71
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
72
72
|
])
|
|
73
|
-
], 10, _hoisted_1$
|
|
73
|
+
], 10, _hoisted_1$S);
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
});
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
}
|
|
82
82
|
return target;
|
|
83
83
|
};
|
|
84
|
-
const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
84
|
+
const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-eb25f649"]]);
|
|
85
85
|
function toCssLength(value) {
|
|
86
86
|
if (value === void 0 || value === null || value === "") {
|
|
87
87
|
return void 0;
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
function surfaceClass(surface) {
|
|
95
95
|
return surface && surface !== "flat" ? `tao-surface-${surface}` : void 0;
|
|
96
96
|
}
|
|
97
|
-
const _sfc_main
|
|
97
|
+
const _sfc_main$11 = /* @__PURE__ */ vue.defineComponent({
|
|
98
98
|
...{ name: "TaoBlock" },
|
|
99
99
|
__name: "TaoBlock",
|
|
100
100
|
props: {
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
|
-
const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main
|
|
121
|
+
const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-v-3d9abbef"]]);
|
|
122
122
|
const formFieldKey = Symbol("taoFormField");
|
|
123
123
|
function isDev() {
|
|
124
124
|
try {
|
|
@@ -158,21 +158,21 @@
|
|
|
158
158
|
deprecationWarning(component, label, instead);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
const _hoisted_1$
|
|
162
|
-
const _hoisted_2$
|
|
161
|
+
const _hoisted_1$R = ["for"];
|
|
162
|
+
const _hoisted_2$K = {
|
|
163
163
|
key: 0,
|
|
164
164
|
class: "tao-input__affix tao-input__affix--prefix"
|
|
165
165
|
};
|
|
166
|
-
const _hoisted_3$
|
|
167
|
-
const _hoisted_4$
|
|
166
|
+
const _hoisted_3$B = ["id", "type", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby"];
|
|
167
|
+
const _hoisted_4$v = {
|
|
168
168
|
key: 1,
|
|
169
169
|
class: "tao-input__affix tao-input__affix--suffix"
|
|
170
170
|
};
|
|
171
|
-
const _hoisted_5$
|
|
171
|
+
const _hoisted_5$o = {
|
|
172
172
|
key: 1,
|
|
173
173
|
class: "tao-input__error"
|
|
174
174
|
};
|
|
175
|
-
const _sfc_main$
|
|
175
|
+
const _sfc_main$10 = /* @__PURE__ */ vue.defineComponent({
|
|
176
176
|
...{ name: "TaoInput" },
|
|
177
177
|
__name: "TaoInput",
|
|
178
178
|
props: {
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
key: 0,
|
|
221
221
|
class: "tao-input__label",
|
|
222
222
|
for: controlId.value
|
|
223
|
-
}, vue.toDisplayString(__props.label), 9, _hoisted_1$
|
|
223
|
+
}, vue.toDisplayString(__props.label), 9, _hoisted_1$R)) : vue.createCommentVNode("", true),
|
|
224
224
|
vue.createElementVNode("div", {
|
|
225
225
|
class: vue.normalizeClass(["tao-input-shell", {
|
|
226
226
|
"tao-input-shell--focused": focused.value,
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
"tao-input-shell--suffix": _ctx.$slots.suffix
|
|
231
231
|
}])
|
|
232
232
|
}, [
|
|
233
|
-
_ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$
|
|
233
|
+
_ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$K, [
|
|
234
234
|
vue.renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
|
|
235
235
|
])) : vue.createCommentVNode("", true),
|
|
236
236
|
vue.createElementVNode("input", {
|
|
@@ -245,27 +245,27 @@
|
|
|
245
245
|
onInput: handleInput,
|
|
246
246
|
onBlur: handleBlur,
|
|
247
247
|
onFocus: handleFocus
|
|
248
|
-
}, null, 42, _hoisted_3$
|
|
249
|
-
_ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$
|
|
248
|
+
}, null, 42, _hoisted_3$B),
|
|
249
|
+
_ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$v, [
|
|
250
250
|
vue.renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
|
|
251
251
|
])) : vue.createCommentVNode("", true)
|
|
252
252
|
], 2),
|
|
253
|
-
__props.error && __props.errorMessage ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$
|
|
253
|
+
__props.error && __props.errorMessage ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$o, vue.toDisplayString(__props.errorMessage), 1)) : vue.createCommentVNode("", true)
|
|
254
254
|
], 2);
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
257
|
});
|
|
258
|
-
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
259
|
-
const _hoisted_1$
|
|
258
|
+
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["__scopeId", "data-v-aca887be"]]);
|
|
259
|
+
const _hoisted_1$Q = {
|
|
260
260
|
key: 0,
|
|
261
261
|
class: "tao-input-group__addon tao-input-group__addon--before"
|
|
262
262
|
};
|
|
263
|
-
const _hoisted_2$
|
|
264
|
-
const _hoisted_3$
|
|
263
|
+
const _hoisted_2$J = { class: "tao-input-group__field" };
|
|
264
|
+
const _hoisted_3$A = {
|
|
265
265
|
key: 1,
|
|
266
266
|
class: "tao-input-group__addon tao-input-group__addon--after"
|
|
267
267
|
};
|
|
268
|
-
const _sfc_main
|
|
268
|
+
const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent({
|
|
269
269
|
...{ name: "TaoInputGroup" },
|
|
270
270
|
__name: "TaoInputGroup",
|
|
271
271
|
props: {
|
|
@@ -290,20 +290,20 @@
|
|
|
290
290
|
onFocusin: onFocusIn,
|
|
291
291
|
onFocusout: onFocusOut
|
|
292
292
|
}, [
|
|
293
|
-
_ctx.$slots.before ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
293
|
+
_ctx.$slots.before ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Q, [
|
|
294
294
|
vue.renderSlot(_ctx.$slots, "before", {}, void 0, true)
|
|
295
295
|
])) : vue.createCommentVNode("", true),
|
|
296
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
296
|
+
vue.createElementVNode("div", _hoisted_2$J, [
|
|
297
297
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
298
298
|
]),
|
|
299
|
-
_ctx.$slots.after ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
299
|
+
_ctx.$slots.after ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$A, [
|
|
300
300
|
vue.renderSlot(_ctx.$slots, "after", {}, void 0, true)
|
|
301
301
|
])) : vue.createCommentVNode("", true)
|
|
302
302
|
], 34);
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
305
|
});
|
|
306
|
-
const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main
|
|
306
|
+
const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-55b2d297"]]);
|
|
307
307
|
const localeRu = {
|
|
308
308
|
code: "ru-RU",
|
|
309
309
|
alert: { closeLabel: "Закрыть" },
|
|
@@ -380,6 +380,16 @@
|
|
|
380
380
|
},
|
|
381
381
|
table: { emptyText: "Нет данных" },
|
|
382
382
|
tag: { closeLabel: "Убрать" },
|
|
383
|
+
colorPicker: {
|
|
384
|
+
areaLabel: "Насыщенность и яркость",
|
|
385
|
+
hueLabel: "Оттенок",
|
|
386
|
+
alphaLabel: "Прозрачность",
|
|
387
|
+
hexLabel: "Цвет в hex",
|
|
388
|
+
modeLabel: "Способ ввода",
|
|
389
|
+
swatchesLabel: "Образцы",
|
|
390
|
+
eyedropperLabel: "Пипетка",
|
|
391
|
+
chooseLabel: "Выбрать цвет"
|
|
392
|
+
},
|
|
383
393
|
timeline: { playLabel: "Играть", pauseLabel: "Пауза", restartLabel: "В начало" },
|
|
384
394
|
toast: { closeLabel: "Закрыть уведомление" }
|
|
385
395
|
};
|
|
@@ -584,6 +594,16 @@
|
|
|
584
594
|
},
|
|
585
595
|
table: { emptyText: "No data" },
|
|
586
596
|
tag: { closeLabel: "Remove" },
|
|
597
|
+
colorPicker: {
|
|
598
|
+
areaLabel: "Saturation and brightness",
|
|
599
|
+
hueLabel: "Hue",
|
|
600
|
+
alphaLabel: "Opacity",
|
|
601
|
+
hexLabel: "Color in hex",
|
|
602
|
+
modeLabel: "Input mode",
|
|
603
|
+
swatchesLabel: "Swatches",
|
|
604
|
+
eyedropperLabel: "Eyedropper",
|
|
605
|
+
chooseLabel: "Choose color"
|
|
606
|
+
},
|
|
587
607
|
timeline: { playLabel: "Play", pauseLabel: "Pause", restartLabel: "Restart" },
|
|
588
608
|
toast: { closeLabel: "Close notification" }
|
|
589
609
|
};
|
|
@@ -627,16 +647,16 @@
|
|
|
627
647
|
function formatText(template, values) {
|
|
628
648
|
return template.replace(/\{(\w+)\}/g, (match, key) => key in values ? String(values[key]) : match);
|
|
629
649
|
}
|
|
630
|
-
const _hoisted_1$
|
|
631
|
-
const _hoisted_2$
|
|
650
|
+
const _hoisted_1$P = ["id", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
|
|
651
|
+
const _hoisted_2$I = {
|
|
632
652
|
key: 0,
|
|
633
653
|
class: "tao-input-number__steppers"
|
|
634
654
|
};
|
|
635
|
-
const _hoisted_3$
|
|
636
|
-
const _hoisted_4$
|
|
637
|
-
const _hoisted_5$
|
|
638
|
-
const _hoisted_6$
|
|
639
|
-
const _sfc_main$
|
|
655
|
+
const _hoisted_3$z = ["aria-label", "disabled"];
|
|
656
|
+
const _hoisted_4$u = { "aria-hidden": "true" };
|
|
657
|
+
const _hoisted_5$n = ["aria-label", "disabled"];
|
|
658
|
+
const _hoisted_6$i = { "aria-hidden": "true" };
|
|
659
|
+
const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
|
|
640
660
|
...{ name: "TaoInputNumber" },
|
|
641
661
|
__name: "TaoInputNumber",
|
|
642
662
|
props: {
|
|
@@ -797,8 +817,8 @@
|
|
|
797
817
|
onFocus,
|
|
798
818
|
onBlur,
|
|
799
819
|
onKeydown
|
|
800
|
-
}, null, 40, _hoisted_1$
|
|
801
|
-
__props.controls ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
820
|
+
}, null, 40, _hoisted_1$P),
|
|
821
|
+
__props.controls ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$I, [
|
|
802
822
|
vue.createElementVNode("button", {
|
|
803
823
|
type: "button",
|
|
804
824
|
class: "tao-input-number__step",
|
|
@@ -807,12 +827,12 @@
|
|
|
807
827
|
disabled: __props.disabled || atMax.value,
|
|
808
828
|
onClick: _cache[0] || (_cache[0] = ($event) => bump(1))
|
|
809
829
|
}, [
|
|
810
|
-
vue.createElementVNode("span", _hoisted_4$
|
|
830
|
+
vue.createElementVNode("span", _hoisted_4$u, [
|
|
811
831
|
vue.renderSlot(_ctx.$slots, "increment-icon", {}, () => [
|
|
812
832
|
_cache[2] || (_cache[2] = vue.createTextVNode("+", -1))
|
|
813
833
|
], true)
|
|
814
834
|
])
|
|
815
|
-
], 8, _hoisted_3$
|
|
835
|
+
], 8, _hoisted_3$z),
|
|
816
836
|
vue.createElementVNode("button", {
|
|
817
837
|
type: "button",
|
|
818
838
|
class: "tao-input-number__step",
|
|
@@ -821,24 +841,24 @@
|
|
|
821
841
|
disabled: __props.disabled || atMin.value,
|
|
822
842
|
onClick: _cache[1] || (_cache[1] = ($event) => bump(-1))
|
|
823
843
|
}, [
|
|
824
|
-
vue.createElementVNode("span", _hoisted_6$
|
|
844
|
+
vue.createElementVNode("span", _hoisted_6$i, [
|
|
825
845
|
vue.renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
|
|
826
846
|
_cache[3] || (_cache[3] = vue.createTextVNode("−", -1))
|
|
827
847
|
], true)
|
|
828
848
|
])
|
|
829
|
-
], 8, _hoisted_5$
|
|
849
|
+
], 8, _hoisted_5$n)
|
|
830
850
|
])) : vue.createCommentVNode("", true)
|
|
831
851
|
], 2);
|
|
832
852
|
};
|
|
833
853
|
}
|
|
834
854
|
});
|
|
835
|
-
const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
836
|
-
const _hoisted_1$
|
|
837
|
-
const _hoisted_2$
|
|
838
|
-
const _hoisted_3$
|
|
839
|
-
const _hoisted_4$
|
|
840
|
-
const _hoisted_5$
|
|
841
|
-
const _sfc_main$
|
|
855
|
+
const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-0594919d"]]);
|
|
856
|
+
const _hoisted_1$O = ["aria-label", "disabled"];
|
|
857
|
+
const _hoisted_2$H = { "aria-hidden": "true" };
|
|
858
|
+
const _hoisted_3$y = ["id", "value", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
|
|
859
|
+
const _hoisted_4$t = ["aria-label", "disabled"];
|
|
860
|
+
const _hoisted_5$m = { "aria-hidden": "true" };
|
|
861
|
+
const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
|
|
842
862
|
...{ name: "TaoQuantity" },
|
|
843
863
|
__name: "TaoQuantity",
|
|
844
864
|
props: {
|
|
@@ -981,12 +1001,12 @@
|
|
|
981
1001
|
disabled: minusDisabled.value,
|
|
982
1002
|
onClick: onDec
|
|
983
1003
|
}, [
|
|
984
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
1004
|
+
vue.createElementVNode("span", _hoisted_2$H, [
|
|
985
1005
|
vue.renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
|
|
986
1006
|
_cache[0] || (_cache[0] = vue.createTextVNode("−", -1))
|
|
987
1007
|
], true)
|
|
988
1008
|
])
|
|
989
|
-
], 8, _hoisted_1$
|
|
1009
|
+
], 8, _hoisted_1$O),
|
|
990
1010
|
vue.createElementVNode("input", {
|
|
991
1011
|
id: controlId.value,
|
|
992
1012
|
class: "tao-quantity__input",
|
|
@@ -1006,7 +1026,7 @@
|
|
|
1006
1026
|
onFocus,
|
|
1007
1027
|
onBlur,
|
|
1008
1028
|
onKeydown
|
|
1009
|
-
}, null, 40, _hoisted_3$
|
|
1029
|
+
}, null, 40, _hoisted_3$y),
|
|
1010
1030
|
vue.createElementVNode("button", {
|
|
1011
1031
|
type: "button",
|
|
1012
1032
|
class: "tao-quantity__btn tao-quantity__btn--inc",
|
|
@@ -1014,43 +1034,43 @@
|
|
|
1014
1034
|
disabled: plusDisabled.value,
|
|
1015
1035
|
onClick: onInc
|
|
1016
1036
|
}, [
|
|
1017
|
-
vue.createElementVNode("span", _hoisted_5$
|
|
1037
|
+
vue.createElementVNode("span", _hoisted_5$m, [
|
|
1018
1038
|
vue.renderSlot(_ctx.$slots, "increment-icon", {}, () => [
|
|
1019
1039
|
_cache[1] || (_cache[1] = vue.createTextVNode("+", -1))
|
|
1020
1040
|
], true)
|
|
1021
1041
|
])
|
|
1022
|
-
], 8, _hoisted_4$
|
|
1042
|
+
], 8, _hoisted_4$t)
|
|
1023
1043
|
], 2);
|
|
1024
1044
|
};
|
|
1025
1045
|
}
|
|
1026
1046
|
});
|
|
1027
|
-
const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1028
|
-
const _hoisted_1$
|
|
1047
|
+
const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-e27165e3"]]);
|
|
1048
|
+
const _hoisted_1$N = {
|
|
1029
1049
|
key: 0,
|
|
1030
1050
|
class: "tao-card__cover"
|
|
1031
1051
|
};
|
|
1032
|
-
const _hoisted_2$
|
|
1052
|
+
const _hoisted_2$G = {
|
|
1033
1053
|
key: 0,
|
|
1034
1054
|
class: "tao-card__overlay"
|
|
1035
1055
|
};
|
|
1036
|
-
const _hoisted_3$
|
|
1056
|
+
const _hoisted_3$x = {
|
|
1037
1057
|
key: 1,
|
|
1038
1058
|
class: "tao-card__overlay"
|
|
1039
1059
|
};
|
|
1040
|
-
const _hoisted_4$
|
|
1060
|
+
const _hoisted_4$s = {
|
|
1041
1061
|
key: 0,
|
|
1042
1062
|
class: "tao-card__header-title"
|
|
1043
1063
|
};
|
|
1044
|
-
const _hoisted_5$
|
|
1045
|
-
const _hoisted_6$
|
|
1064
|
+
const _hoisted_5$l = { key: 0 };
|
|
1065
|
+
const _hoisted_6$h = {
|
|
1046
1066
|
key: 2,
|
|
1047
1067
|
class: "tao-card__title-block"
|
|
1048
1068
|
};
|
|
1049
|
-
const _hoisted_7$
|
|
1069
|
+
const _hoisted_7$d = {
|
|
1050
1070
|
key: 0,
|
|
1051
1071
|
class: "tao-card__title"
|
|
1052
1072
|
};
|
|
1053
|
-
const _hoisted_8$
|
|
1073
|
+
const _hoisted_8$c = {
|
|
1054
1074
|
key: 1,
|
|
1055
1075
|
class: "tao-card__sub"
|
|
1056
1076
|
};
|
|
@@ -1062,7 +1082,7 @@
|
|
|
1062
1082
|
key: 4,
|
|
1063
1083
|
class: "tao-card__footer"
|
|
1064
1084
|
};
|
|
1065
|
-
const _sfc_main$
|
|
1085
|
+
const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
|
|
1066
1086
|
...{ name: "TaoCard" },
|
|
1067
1087
|
__name: "TaoCard",
|
|
1068
1088
|
props: {
|
|
@@ -1104,12 +1124,12 @@
|
|
|
1104
1124
|
}]]),
|
|
1105
1125
|
style: vue.normalizeStyle(radiusStyle.value)
|
|
1106
1126
|
}, [
|
|
1107
|
-
_ctx.$slots.cover ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
1127
|
+
_ctx.$slots.cover ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$N, [
|
|
1108
1128
|
vue.renderSlot(_ctx.$slots, "cover", {}, void 0, true),
|
|
1109
|
-
_ctx.$slots.overlay ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
1129
|
+
_ctx.$slots.overlay ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$G, [
|
|
1110
1130
|
vue.renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
|
|
1111
1131
|
])) : vue.createCommentVNode("", true)
|
|
1112
|
-
])) : _ctx.$slots.overlay ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
1132
|
+
])) : _ctx.$slots.overlay ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$x, [
|
|
1113
1133
|
vue.renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
|
|
1114
1134
|
])) : vue.createCommentVNode("", true),
|
|
1115
1135
|
hasContent.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -1117,7 +1137,7 @@
|
|
|
1117
1137
|
class: "tao-card__content",
|
|
1118
1138
|
style: vue.normalizeStyle(paddingStyle.value)
|
|
1119
1139
|
}, [
|
|
1120
|
-
_ctx.$slots.headerTitle ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_4$
|
|
1140
|
+
_ctx.$slots.headerTitle ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_4$s, [
|
|
1121
1141
|
vue.renderSlot(_ctx.$slots, "headerTitle", {}, void 0, true)
|
|
1122
1142
|
])) : vue.createCommentVNode("", true),
|
|
1123
1143
|
_ctx.$slots.header || _ctx.$slots.headerSecondary ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -1127,15 +1147,15 @@
|
|
|
1127
1147
|
vue.createElementVNode("span", null, [
|
|
1128
1148
|
vue.renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
1129
1149
|
]),
|
|
1130
|
-
_ctx.$slots.headerSecondary ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$
|
|
1150
|
+
_ctx.$slots.headerSecondary ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$l, [
|
|
1131
1151
|
vue.renderSlot(_ctx.$slots, "headerSecondary", {}, void 0, true)
|
|
1132
1152
|
])) : vue.createCommentVNode("", true)
|
|
1133
1153
|
], 2)) : vue.createCommentVNode("", true),
|
|
1134
|
-
_ctx.$slots.title || _ctx.$slots.sub ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$
|
|
1135
|
-
_ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_7$
|
|
1154
|
+
_ctx.$slots.title || _ctx.$slots.sub ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$h, [
|
|
1155
|
+
_ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_7$d, [
|
|
1136
1156
|
vue.renderSlot(_ctx.$slots, "title", {}, void 0, true)
|
|
1137
1157
|
])) : vue.createCommentVNode("", true),
|
|
1138
|
-
_ctx.$slots.sub ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$
|
|
1158
|
+
_ctx.$slots.sub ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$c, [
|
|
1139
1159
|
vue.renderSlot(_ctx.$slots, "sub", {}, void 0, true)
|
|
1140
1160
|
])) : vue.createCommentVNode("", true)
|
|
1141
1161
|
])) : vue.createCommentVNode("", true),
|
|
@@ -1150,7 +1170,7 @@
|
|
|
1150
1170
|
};
|
|
1151
1171
|
}
|
|
1152
1172
|
});
|
|
1153
|
-
const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1173
|
+
const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-53c366d1"]]);
|
|
1154
1174
|
const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
1155
1175
|
function getFocusable(root) {
|
|
1156
1176
|
return [...root.querySelectorAll(FOCUSABLE)].filter(
|
|
@@ -1204,21 +1224,21 @@
|
|
|
1204
1224
|
previousOverflow = "";
|
|
1205
1225
|
}
|
|
1206
1226
|
}
|
|
1207
|
-
const _hoisted_1$
|
|
1208
|
-
const _hoisted_2$
|
|
1227
|
+
const _hoisted_1$M = ["aria-labelledby"];
|
|
1228
|
+
const _hoisted_2$F = {
|
|
1209
1229
|
key: 0,
|
|
1210
1230
|
class: "tao-modal__header"
|
|
1211
1231
|
};
|
|
1212
|
-
const _hoisted_3$
|
|
1213
|
-
const _hoisted_4$
|
|
1214
|
-
const _hoisted_5$
|
|
1215
|
-
const _hoisted_6$
|
|
1216
|
-
const _hoisted_7$
|
|
1217
|
-
const _hoisted_8$
|
|
1232
|
+
const _hoisted_3$w = ["id"];
|
|
1233
|
+
const _hoisted_4$r = { key: 1 };
|
|
1234
|
+
const _hoisted_5$k = ["aria-label"];
|
|
1235
|
+
const _hoisted_6$g = { "aria-hidden": "true" };
|
|
1236
|
+
const _hoisted_7$c = { class: "tao-modal__content" };
|
|
1237
|
+
const _hoisted_8$b = {
|
|
1218
1238
|
key: 1,
|
|
1219
1239
|
class: "tao-modal__footer"
|
|
1220
1240
|
};
|
|
1221
|
-
const _sfc_main$
|
|
1241
|
+
const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
|
|
1222
1242
|
...{ name: "TaoModal" },
|
|
1223
1243
|
__name: "TaoModal",
|
|
1224
1244
|
props: {
|
|
@@ -1335,13 +1355,13 @@
|
|
|
1335
1355
|
"aria-labelledby": __props.title ? vue.unref(titleId) : void 0,
|
|
1336
1356
|
tabindex: "-1"
|
|
1337
1357
|
}, [
|
|
1338
|
-
__props.title || _ctx.$slots.header || __props.closable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
1358
|
+
__props.title || _ctx.$slots.header || __props.closable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$F, [
|
|
1339
1359
|
vue.renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1340
1360
|
__props.title ? (vue.openBlock(), vue.createElementBlock("h2", {
|
|
1341
1361
|
key: 0,
|
|
1342
1362
|
id: vue.unref(titleId),
|
|
1343
1363
|
class: "tao-modal__title"
|
|
1344
|
-
}, vue.toDisplayString(__props.title), 9, _hoisted_3$
|
|
1364
|
+
}, vue.toDisplayString(__props.title), 9, _hoisted_3$w)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$r))
|
|
1345
1365
|
], true),
|
|
1346
1366
|
__props.closable ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
1347
1367
|
key: 0,
|
|
@@ -1350,20 +1370,20 @@
|
|
|
1350
1370
|
"aria-label": vue.unref(l10n).closeLabel,
|
|
1351
1371
|
onClick: close
|
|
1352
1372
|
}, [
|
|
1353
|
-
vue.createElementVNode("span", _hoisted_6$
|
|
1373
|
+
vue.createElementVNode("span", _hoisted_6$g, [
|
|
1354
1374
|
vue.renderSlot(_ctx.$slots, "close-icon", {}, () => [
|
|
1355
1375
|
_cache[0] || (_cache[0] = vue.createTextVNode("×", -1))
|
|
1356
1376
|
], true)
|
|
1357
1377
|
])
|
|
1358
|
-
], 8, _hoisted_5$
|
|
1378
|
+
], 8, _hoisted_5$k)) : vue.createCommentVNode("", true)
|
|
1359
1379
|
])) : vue.createCommentVNode("", true),
|
|
1360
|
-
vue.createElementVNode("div", _hoisted_7$
|
|
1380
|
+
vue.createElementVNode("div", _hoisted_7$c, [
|
|
1361
1381
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1362
1382
|
]),
|
|
1363
|
-
_ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$
|
|
1383
|
+
_ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$b, [
|
|
1364
1384
|
vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1365
1385
|
])) : vue.createCommentVNode("", true)
|
|
1366
|
-
], 8, _hoisted_1$
|
|
1386
|
+
], 8, _hoisted_1$M)
|
|
1367
1387
|
], 32)) : vue.createCommentVNode("", true)
|
|
1368
1388
|
]),
|
|
1369
1389
|
_: 3
|
|
@@ -1372,13 +1392,13 @@
|
|
|
1372
1392
|
};
|
|
1373
1393
|
}
|
|
1374
1394
|
});
|
|
1375
|
-
const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1395
|
+
const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-742274be"]]);
|
|
1376
1396
|
function tabValue(tab) {
|
|
1377
1397
|
return tab.value ?? tab.key;
|
|
1378
1398
|
}
|
|
1379
|
-
const _hoisted_1$
|
|
1380
|
-
const _hoisted_2$
|
|
1381
|
-
const _sfc_main$
|
|
1399
|
+
const _hoisted_1$L = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick"];
|
|
1400
|
+
const _hoisted_2$E = ["id", "aria-labelledby"];
|
|
1401
|
+
const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
|
|
1382
1402
|
...{ name: "TaoTabs" },
|
|
1383
1403
|
__name: "TaoTabs",
|
|
1384
1404
|
props: {
|
|
@@ -1483,7 +1503,7 @@
|
|
|
1483
1503
|
}, void 0, true, 0) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
1484
1504
|
vue.createTextVNode(vue.toDisplayString(tab.label), 1)
|
|
1485
1505
|
], 64))
|
|
1486
|
-
], 8, _hoisted_1$
|
|
1506
|
+
], 8, _hoisted_1$L);
|
|
1487
1507
|
}), 128))
|
|
1488
1508
|
], 36),
|
|
1489
1509
|
vue.createElementVNode("div", {
|
|
@@ -1493,12 +1513,12 @@
|
|
|
1493
1513
|
"aria-labelledby": tabId(__props.modelValue)
|
|
1494
1514
|
}, [
|
|
1495
1515
|
vue.renderSlot(_ctx.$slots, "default", { activeTab: __props.modelValue }, void 0, true)
|
|
1496
|
-
], 8, _hoisted_2$
|
|
1516
|
+
], 8, _hoisted_2$E)
|
|
1497
1517
|
], 2);
|
|
1498
1518
|
};
|
|
1499
1519
|
}
|
|
1500
1520
|
});
|
|
1501
|
-
const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1521
|
+
const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-a9238d96"]]);
|
|
1502
1522
|
function listenFocusLoss(onLoss) {
|
|
1503
1523
|
function onVisibilityChange() {
|
|
1504
1524
|
if (document.hidden) {
|
|
@@ -1514,7 +1534,7 @@
|
|
|
1514
1534
|
window.removeEventListener("pagehide", onLoss);
|
|
1515
1535
|
};
|
|
1516
1536
|
}
|
|
1517
|
-
const clamp = (v, min, max) => Math.min(Math.max(v, min), max);
|
|
1537
|
+
const clamp$1 = (v, min, max) => Math.min(Math.max(v, min), max);
|
|
1518
1538
|
function decimalsOf(step) {
|
|
1519
1539
|
if (!Number.isFinite(step) || step <= 0) return 0;
|
|
1520
1540
|
const s = String(step);
|
|
@@ -1526,13 +1546,13 @@
|
|
|
1526
1546
|
return Math.round(v * k) / k + 0;
|
|
1527
1547
|
};
|
|
1528
1548
|
function ratioOf(value, min, max) {
|
|
1529
|
-
return max > min ? clamp((value - min) / (max - min), 0, 1) : 0;
|
|
1549
|
+
return max > min ? clamp$1((value - min) / (max - min), 0, 1) : 0;
|
|
1530
1550
|
}
|
|
1531
1551
|
function valueAt(ratio, min, max, step) {
|
|
1532
|
-
const raw = min + clamp(ratio, 0, 1) * (max - min);
|
|
1533
|
-
if (!(step > 0)) return clamp(raw, min, max);
|
|
1552
|
+
const raw = min + clamp$1(ratio, 0, 1) * (max - min);
|
|
1553
|
+
if (!(step > 0)) return clamp$1(raw, min, max);
|
|
1534
1554
|
const snapped = min + Math.round((raw - min) / step) * step;
|
|
1535
|
-
return clamp(roundTo(snapped, Math.max(decimalsOf(step), decimalsOf(min))), min, max);
|
|
1555
|
+
return clamp$1(roundTo(snapped, Math.max(decimalsOf(step), decimalsOf(min))), min, max);
|
|
1536
1556
|
}
|
|
1537
1557
|
function nearestMark(value, marks) {
|
|
1538
1558
|
let best = value;
|
|
@@ -1562,11 +1582,11 @@
|
|
|
1562
1582
|
}
|
|
1563
1583
|
function moveThumb(values, index, next, min, max, gap = 0) {
|
|
1564
1584
|
const [a, b] = values;
|
|
1565
|
-
return index === 0 ? [clamp(next, min, Math.max(min, b - gap)), b] : [a, clamp(next, Math.min(max, a + gap), max)];
|
|
1585
|
+
return index === 0 ? [clamp$1(next, min, Math.max(min, b - gap)), b] : [a, clamp$1(next, Math.min(max, a + gap), max)];
|
|
1566
1586
|
}
|
|
1567
1587
|
function normalizeValue(value, min, max) {
|
|
1568
1588
|
const list = Array.isArray(value) ? [value[0], value[1]] : [value];
|
|
1569
|
-
const clamped = list.map((v) => clamp(Number.isFinite(v) ? v : min, min, max));
|
|
1589
|
+
const clamped = list.map((v) => clamp$1(Number.isFinite(v) ? v : min, min, max));
|
|
1570
1590
|
return clamped.length === 2 ? clamped.sort((x, y) => x - y) : clamped;
|
|
1571
1591
|
}
|
|
1572
1592
|
function niceStep(span, count) {
|
|
@@ -1592,22 +1612,22 @@
|
|
|
1592
1612
|
function isMarkActive(markValue, values) {
|
|
1593
1613
|
return values.length === 2 ? markValue >= values[0] && markValue <= values[1] : markValue <= (values[0] ?? 0);
|
|
1594
1614
|
}
|
|
1595
|
-
const _hoisted_1$
|
|
1596
|
-
const _hoisted_2$
|
|
1597
|
-
const _hoisted_3$
|
|
1615
|
+
const _hoisted_1$K = ["aria-disabled"];
|
|
1616
|
+
const _hoisted_2$D = ["id", "tabindex", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-label", "aria-orientation", "aria-disabled", "aria-invalid", "aria-describedby", "onKeydown"];
|
|
1617
|
+
const _hoisted_3$v = {
|
|
1598
1618
|
key: 0,
|
|
1599
1619
|
class: "tao-slider__value"
|
|
1600
1620
|
};
|
|
1601
|
-
const _hoisted_4$
|
|
1621
|
+
const _hoisted_4$q = {
|
|
1602
1622
|
key: 0,
|
|
1603
1623
|
class: "tao-slider__marks"
|
|
1604
1624
|
};
|
|
1605
|
-
const _hoisted_5$
|
|
1606
|
-
const _hoisted_6$
|
|
1625
|
+
const _hoisted_5$j = ["disabled", "onClick"];
|
|
1626
|
+
const _hoisted_6$f = {
|
|
1607
1627
|
key: 0,
|
|
1608
1628
|
class: "tao-slider__mark-label"
|
|
1609
1629
|
};
|
|
1610
|
-
const _sfc_main$
|
|
1630
|
+
const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
|
|
1611
1631
|
...{ name: "TaoSliderBase" },
|
|
1612
1632
|
__name: "TaoSliderBase",
|
|
1613
1633
|
props: {
|
|
@@ -1626,6 +1646,7 @@
|
|
|
1626
1646
|
error: { type: Boolean, default: false },
|
|
1627
1647
|
variant: { default: "bar" },
|
|
1628
1648
|
size: {},
|
|
1649
|
+
ariaLabel: {},
|
|
1629
1650
|
wheel: { default: 0 },
|
|
1630
1651
|
modelValue: {}
|
|
1631
1652
|
},
|
|
@@ -1826,21 +1847,22 @@
|
|
|
1826
1847
|
"aria-valuemax": __props.max,
|
|
1827
1848
|
"aria-valuenow": v,
|
|
1828
1849
|
"aria-valuetext": text(v),
|
|
1850
|
+
"aria-label": __props.ariaLabel,
|
|
1829
1851
|
"aria-orientation": __props.vertical ? "vertical" : "horizontal",
|
|
1830
1852
|
"aria-disabled": __props.disabled || void 0,
|
|
1831
1853
|
"aria-invalid": invalid.value || void 0,
|
|
1832
1854
|
"aria-describedby": describedBy.value,
|
|
1833
1855
|
onKeydown: ($event) => onKeydown($event, i),
|
|
1834
1856
|
onBlur: _cache[0] || (_cache[0] = ($event) => pointerFocus.value = false)
|
|
1835
|
-
}, null, 46, _hoisted_2$
|
|
1857
|
+
}, null, 46, _hoisted_2$D);
|
|
1836
1858
|
}), 128)),
|
|
1837
|
-
__props.showValue ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
1859
|
+
__props.showValue ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$v, [
|
|
1838
1860
|
vue.renderSlot(_ctx.$slots, "pre-value", {}, void 0, true),
|
|
1839
1861
|
vue.createTextVNode(vue.toDisplayString(barText.value), 1),
|
|
1840
1862
|
vue.renderSlot(_ctx.$slots, "post-value", {}, void 0, true)
|
|
1841
1863
|
])) : vue.createCommentVNode("", true)
|
|
1842
1864
|
], 544),
|
|
1843
|
-
markList.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
1865
|
+
markList.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$q, [
|
|
1844
1866
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(markList.value, (mark) => {
|
|
1845
1867
|
return vue.openBlock(), vue.createElementBlock("button", {
|
|
1846
1868
|
key: mark.value,
|
|
@@ -1856,7 +1878,7 @@
|
|
|
1856
1878
|
onClick: ($event) => onMarkClick(mark)
|
|
1857
1879
|
}, [
|
|
1858
1880
|
_cache[2] || (_cache[2] = vue.createElementVNode("span", { class: "tao-slider__tick" }, null, -1)),
|
|
1859
|
-
mark.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$
|
|
1881
|
+
mark.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$f, [
|
|
1860
1882
|
vue.renderSlot(_ctx.$slots, "mark", {
|
|
1861
1883
|
mark,
|
|
1862
1884
|
active: vue.unref(isMarkActive)(mark.value, values.value)
|
|
@@ -1864,15 +1886,15 @@
|
|
|
1864
1886
|
vue.createTextVNode(vue.toDisplayString(mark.label), 1)
|
|
1865
1887
|
], true)
|
|
1866
1888
|
])) : vue.createCommentVNode("", true)
|
|
1867
|
-
], 14, _hoisted_5$
|
|
1889
|
+
], 14, _hoisted_5$j);
|
|
1868
1890
|
}), 128))
|
|
1869
1891
|
])) : vue.createCommentVNode("", true)
|
|
1870
|
-
], 42, _hoisted_1$
|
|
1892
|
+
], 42, _hoisted_1$K);
|
|
1871
1893
|
};
|
|
1872
1894
|
}
|
|
1873
1895
|
});
|
|
1874
|
-
const TaoSliderBase = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1875
|
-
const _sfc_main$
|
|
1896
|
+
const TaoSliderBase = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-648d0bf1"]]);
|
|
1897
|
+
const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
|
|
1876
1898
|
...{ name: "TaoSlider" },
|
|
1877
1899
|
__name: "TaoSlider",
|
|
1878
1900
|
props: {
|
|
@@ -1891,6 +1913,7 @@
|
|
|
1891
1913
|
error: { type: Boolean },
|
|
1892
1914
|
variant: {},
|
|
1893
1915
|
size: {},
|
|
1916
|
+
ariaLabel: {},
|
|
1894
1917
|
wheel: {},
|
|
1895
1918
|
modelValue: {}
|
|
1896
1919
|
},
|
|
@@ -1928,13 +1951,13 @@
|
|
|
1928
1951
|
};
|
|
1929
1952
|
}
|
|
1930
1953
|
});
|
|
1931
|
-
const _hoisted_1$
|
|
1932
|
-
const _hoisted_2$
|
|
1933
|
-
const _hoisted_3$
|
|
1954
|
+
const _hoisted_1$J = { class: "tao-timeline__controls" };
|
|
1955
|
+
const _hoisted_2$C = { class: "tao-timeline__track" };
|
|
1956
|
+
const _hoisted_3$u = {
|
|
1934
1957
|
key: 0,
|
|
1935
1958
|
class: "tao-timeline__time"
|
|
1936
1959
|
};
|
|
1937
|
-
const _sfc_main$
|
|
1960
|
+
const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
|
|
1938
1961
|
...{ name: "TaoTimeline" },
|
|
1939
1962
|
__name: "TaoTimeline",
|
|
1940
1963
|
props: {
|
|
@@ -1974,7 +1997,7 @@
|
|
|
1974
1997
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1975
1998
|
class: vue.normalizeClass(["tao-timeline", [vue.unref(sizeClass)(__props.size), `tao-timeline--${__props.variant}`, { "tao-timeline--marks-start": __props.marksSide === "start", "tao-timeline--disabled": __props.disabled }]])
|
|
1976
1999
|
}, [
|
|
1977
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
2000
|
+
vue.createElementVNode("div", _hoisted_1$J, [
|
|
1978
2001
|
vue.createVNode(TaoButton, {
|
|
1979
2002
|
size: "small",
|
|
1980
2003
|
variant: "secondary",
|
|
@@ -2002,8 +2025,8 @@
|
|
|
2002
2025
|
_: 1
|
|
2003
2026
|
}, 8, ["disabled", "aria-label"])) : vue.createCommentVNode("", true)
|
|
2004
2027
|
]),
|
|
2005
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
2006
|
-
vue.createVNode(_sfc_main$
|
|
2028
|
+
vue.createElementVNode("div", _hoisted_2$C, [
|
|
2029
|
+
vue.createVNode(_sfc_main$U, {
|
|
2007
2030
|
"model-value": __props.modelValue,
|
|
2008
2031
|
min: 0,
|
|
2009
2032
|
max: __props.length,
|
|
@@ -2026,7 +2049,7 @@
|
|
|
2026
2049
|
} : void 0
|
|
2027
2050
|
]), 1032, ["model-value", "max", "step", "marks", "marks-side", "variant", "size", "disabled"])
|
|
2028
2051
|
]),
|
|
2029
|
-
__props.showTime ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
2052
|
+
__props.showTime ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$u, [
|
|
2030
2053
|
vue.renderSlot(_ctx.$slots, "time", {
|
|
2031
2054
|
time: __props.modelValue,
|
|
2032
2055
|
length: __props.length,
|
|
@@ -2039,8 +2062,8 @@
|
|
|
2039
2062
|
};
|
|
2040
2063
|
}
|
|
2041
2064
|
});
|
|
2042
|
-
const TaoTimeline = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2043
|
-
const _sfc_main$
|
|
2065
|
+
const TaoTimeline = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-fb8f6331"]]);
|
|
2066
|
+
const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
2044
2067
|
...{ name: "TaoTooltip" },
|
|
2045
2068
|
__name: "TaoTooltip",
|
|
2046
2069
|
props: {
|
|
@@ -2202,9 +2225,9 @@
|
|
|
2202
2225
|
};
|
|
2203
2226
|
}
|
|
2204
2227
|
});
|
|
2205
|
-
const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2206
|
-
const _hoisted_1$
|
|
2207
|
-
const _sfc_main$
|
|
2228
|
+
const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-09caf2f5"]]);
|
|
2229
|
+
const _hoisted_1$I = { class: "tao-popover" };
|
|
2230
|
+
const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
2208
2231
|
...{ name: "TaoPopover" },
|
|
2209
2232
|
__name: "TaoPopover",
|
|
2210
2233
|
props: {
|
|
@@ -2373,7 +2396,7 @@
|
|
|
2373
2396
|
unbindDismiss();
|
|
2374
2397
|
});
|
|
2375
2398
|
return (_ctx, _cache) => {
|
|
2376
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2399
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$I, [
|
|
2377
2400
|
vue.createElementVNode("div", {
|
|
2378
2401
|
ref_key: "triggerRef",
|
|
2379
2402
|
ref: triggerRef,
|
|
@@ -2402,17 +2425,17 @@
|
|
|
2402
2425
|
};
|
|
2403
2426
|
}
|
|
2404
2427
|
});
|
|
2405
|
-
const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2428
|
+
const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-3e488e1b"]]);
|
|
2406
2429
|
const spoilerGroupKey = Symbol("taoSpoilerGroup");
|
|
2407
|
-
const _hoisted_1$
|
|
2408
|
-
const _hoisted_2$
|
|
2409
|
-
const _hoisted_3$
|
|
2430
|
+
const _hoisted_1$H = { class: "tao-spoiler" };
|
|
2431
|
+
const _hoisted_2$B = ["aria-expanded", "aria-controls"];
|
|
2432
|
+
const _hoisted_3$t = {
|
|
2410
2433
|
key: 0,
|
|
2411
2434
|
class: "tao-spoiler__title"
|
|
2412
2435
|
};
|
|
2413
|
-
const _hoisted_4$
|
|
2414
|
-
const _hoisted_5$
|
|
2415
|
-
const _sfc_main$
|
|
2436
|
+
const _hoisted_4$p = ["id"];
|
|
2437
|
+
const _hoisted_5$i = { class: "tao-spoiler__content-inner" };
|
|
2438
|
+
const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
|
|
2416
2439
|
...{ name: "TaoSpoiler" },
|
|
2417
2440
|
__name: "TaoSpoiler",
|
|
2418
2441
|
props: {
|
|
@@ -2468,7 +2491,7 @@
|
|
|
2468
2491
|
});
|
|
2469
2492
|
}
|
|
2470
2493
|
return (_ctx, _cache) => {
|
|
2471
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2494
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$H, [
|
|
2472
2495
|
vue.createElementVNode("button", {
|
|
2473
2496
|
type: "button",
|
|
2474
2497
|
class: "tao-spoiler__header",
|
|
@@ -2479,12 +2502,12 @@
|
|
|
2479
2502
|
vue.createElementVNode("span", {
|
|
2480
2503
|
class: vue.normalizeClass(["tao-spoiler__icon", { "tao-spoiler__icon--open": isOpen.value }])
|
|
2481
2504
|
}, "▶", 2),
|
|
2482
|
-
__props.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
2505
|
+
__props.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$t, [
|
|
2483
2506
|
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
2484
2507
|
vue.createTextVNode(vue.toDisplayString(__props.title), 1)
|
|
2485
2508
|
], true)
|
|
2486
2509
|
])) : vue.createCommentVNode("", true)
|
|
2487
|
-
], 8, _hoisted_2$
|
|
2510
|
+
], 8, _hoisted_2$B),
|
|
2488
2511
|
vue.createVNode(vue.Transition, {
|
|
2489
2512
|
name: "tao-spoiler-slide",
|
|
2490
2513
|
onBeforeEnter,
|
|
@@ -2498,10 +2521,10 @@
|
|
|
2498
2521
|
id: vue.unref(panelId),
|
|
2499
2522
|
class: "tao-spoiler__content"
|
|
2500
2523
|
}, [
|
|
2501
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
2524
|
+
vue.createElementVNode("div", _hoisted_5$i, [
|
|
2502
2525
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2503
2526
|
])
|
|
2504
|
-
], 8, _hoisted_4$
|
|
2527
|
+
], 8, _hoisted_4$p)) : vue.createCommentVNode("", true)
|
|
2505
2528
|
]),
|
|
2506
2529
|
_: 3
|
|
2507
2530
|
})
|
|
@@ -2509,9 +2532,9 @@
|
|
|
2509
2532
|
};
|
|
2510
2533
|
}
|
|
2511
2534
|
});
|
|
2512
|
-
const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2513
|
-
const _hoisted_1$
|
|
2514
|
-
const _sfc_main$
|
|
2535
|
+
const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-5a3147a2"]]);
|
|
2536
|
+
const _hoisted_1$G = { class: "tao-spoiler-group" };
|
|
2537
|
+
const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
|
|
2515
2538
|
...{ name: "TaoSpoilerGroup" },
|
|
2516
2539
|
__name: "TaoSpoilerGroup",
|
|
2517
2540
|
props: {
|
|
@@ -2536,15 +2559,15 @@
|
|
|
2536
2559
|
setOpen
|
|
2537
2560
|
});
|
|
2538
2561
|
return (_ctx, _cache) => {
|
|
2539
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2562
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$G, [
|
|
2540
2563
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2541
2564
|
]);
|
|
2542
2565
|
};
|
|
2543
2566
|
}
|
|
2544
2567
|
});
|
|
2545
|
-
const TaoSpoilerGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2546
|
-
const _hoisted_1$
|
|
2547
|
-
const _sfc_main$
|
|
2568
|
+
const TaoSpoilerGroup = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-7986fd2a"]]);
|
|
2569
|
+
const _hoisted_1$F = ["aria-label"];
|
|
2570
|
+
const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
|
|
2548
2571
|
...{ name: "TaoCopy" },
|
|
2549
2572
|
__name: "TaoCopy",
|
|
2550
2573
|
props: {
|
|
@@ -2685,7 +2708,7 @@
|
|
|
2685
2708
|
"stroke-width": "2"
|
|
2686
2709
|
})
|
|
2687
2710
|
], -1)
|
|
2688
|
-
])], 10, _hoisted_1$
|
|
2711
|
+
])], 10, _hoisted_1$F)
|
|
2689
2712
|
], true),
|
|
2690
2713
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
2691
2714
|
copied.value && __props.tip && doneText.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -2701,8 +2724,8 @@
|
|
|
2701
2724
|
};
|
|
2702
2725
|
}
|
|
2703
2726
|
});
|
|
2704
|
-
const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2705
|
-
const _sfc_main$
|
|
2727
|
+
const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-16581b4e"]]);
|
|
2728
|
+
const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
|
|
2706
2729
|
...{ name: "TaoContainer" },
|
|
2707
2730
|
__name: "TaoContainer",
|
|
2708
2731
|
props: {
|
|
@@ -2725,8 +2748,8 @@
|
|
|
2725
2748
|
};
|
|
2726
2749
|
}
|
|
2727
2750
|
});
|
|
2728
|
-
const TaoContainer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2729
|
-
const _sfc_main$
|
|
2751
|
+
const TaoContainer = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-ef005f57"]]);
|
|
2752
|
+
const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
2730
2753
|
...{ name: "TaoFlex" },
|
|
2731
2754
|
__name: "TaoFlex",
|
|
2732
2755
|
props: {
|
|
@@ -2757,7 +2780,7 @@
|
|
|
2757
2780
|
};
|
|
2758
2781
|
}
|
|
2759
2782
|
});
|
|
2760
|
-
const _sfc_main$
|
|
2783
|
+
const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
|
|
2761
2784
|
...{ name: "TaoSpace" },
|
|
2762
2785
|
__name: "TaoSpace",
|
|
2763
2786
|
props: {
|
|
@@ -2782,8 +2805,8 @@
|
|
|
2782
2805
|
};
|
|
2783
2806
|
}
|
|
2784
2807
|
});
|
|
2785
|
-
const TaoSpace = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2786
|
-
const _sfc_main$
|
|
2808
|
+
const TaoSpace = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-67c9d3a2"]]);
|
|
2809
|
+
const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
|
|
2787
2810
|
...{ name: "TaoGrid" },
|
|
2788
2811
|
__name: "TaoGrid",
|
|
2789
2812
|
props: {
|
|
@@ -2809,8 +2832,8 @@
|
|
|
2809
2832
|
};
|
|
2810
2833
|
}
|
|
2811
2834
|
});
|
|
2812
|
-
const TaoGrid = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2813
|
-
const _sfc_main$
|
|
2835
|
+
const TaoGrid = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-5baa4944"]]);
|
|
2836
|
+
const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
|
|
2814
2837
|
...{ name: "TaoGridItem" },
|
|
2815
2838
|
__name: "TaoGridItem",
|
|
2816
2839
|
props: {
|
|
@@ -2833,15 +2856,15 @@
|
|
|
2833
2856
|
};
|
|
2834
2857
|
}
|
|
2835
2858
|
});
|
|
2836
|
-
const TaoGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2837
|
-
const _hoisted_1$
|
|
2838
|
-
const _hoisted_2$
|
|
2839
|
-
const _hoisted_3$
|
|
2840
|
-
const _hoisted_4$
|
|
2859
|
+
const TaoGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-ad288026"]]);
|
|
2860
|
+
const _hoisted_1$E = { class: "tao-split__pane tao-split__pane--start" };
|
|
2861
|
+
const _hoisted_2$A = ["aria-orientation", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-disabled", "tabindex"];
|
|
2862
|
+
const _hoisted_3$s = { class: "tao-split__pane tao-split__pane--end" };
|
|
2863
|
+
const _hoisted_4$o = {
|
|
2841
2864
|
key: 0,
|
|
2842
2865
|
class: "tao-split__shield"
|
|
2843
2866
|
};
|
|
2844
|
-
const _sfc_main$
|
|
2867
|
+
const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
2845
2868
|
...{ name: "TaoSplit" },
|
|
2846
2869
|
__name: "TaoSplit",
|
|
2847
2870
|
props: {
|
|
@@ -3138,7 +3161,7 @@
|
|
|
3138
3161
|
]]),
|
|
3139
3162
|
style: vue.normalizeStyle({ "--tao-split-start": `${startPx.value}px` })
|
|
3140
3163
|
}, [
|
|
3141
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
3164
|
+
vue.createElementVNode("div", _hoisted_1$E, [
|
|
3142
3165
|
vue.renderSlot(_ctx.$slots, "start", {}, void 0, true)
|
|
3143
3166
|
]),
|
|
3144
3167
|
vue.createElementVNode("div", {
|
|
@@ -3161,18 +3184,18 @@
|
|
|
3161
3184
|
onKeydown,
|
|
3162
3185
|
onDragstart: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
3163
3186
|
}, ["prevent"]))
|
|
3164
|
-
}, null, 40, _hoisted_2$
|
|
3165
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
3187
|
+
}, null, 40, _hoisted_2$A),
|
|
3188
|
+
vue.createElementVNode("div", _hoisted_3$s, [
|
|
3166
3189
|
vue.renderSlot(_ctx.$slots, "end", {}, void 0, true)
|
|
3167
3190
|
]),
|
|
3168
|
-
isDragging.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
3191
|
+
isDragging.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$o)) : vue.createCommentVNode("", true)
|
|
3169
3192
|
], 6);
|
|
3170
3193
|
};
|
|
3171
3194
|
}
|
|
3172
3195
|
});
|
|
3173
|
-
const TaoSplit = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3174
|
-
const _hoisted_1$
|
|
3175
|
-
const _sfc_main$
|
|
3196
|
+
const TaoSplit = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-f34ab385"]]);
|
|
3197
|
+
const _hoisted_1$D = { class: "tao-icon" };
|
|
3198
|
+
const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
|
|
3176
3199
|
...{ name: "TaoIcon" },
|
|
3177
3200
|
__name: "TaoIcon",
|
|
3178
3201
|
props: {
|
|
@@ -3187,7 +3210,7 @@
|
|
|
3187
3210
|
}));
|
|
3188
3211
|
const props = __props;
|
|
3189
3212
|
return (_ctx, _cache) => {
|
|
3190
|
-
return vue.openBlock(), vue.createElementBlock("span", _hoisted_1$
|
|
3213
|
+
return vue.openBlock(), vue.createElementBlock("span", _hoisted_1$D, [
|
|
3191
3214
|
vue.renderSlot(_ctx.$slots, "prefix", {}, void 0, true),
|
|
3192
3215
|
vue.createElementVNode("i", {
|
|
3193
3216
|
class: vue.normalizeClass(["tao-icon__value", [`icon-${props.name}`, { "tao-icon__value--invert": props.invert }]]),
|
|
@@ -3198,8 +3221,8 @@
|
|
|
3198
3221
|
};
|
|
3199
3222
|
}
|
|
3200
3223
|
});
|
|
3201
|
-
const TaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3202
|
-
const _sfc_main$
|
|
3224
|
+
const TaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-350b3502"]]);
|
|
3225
|
+
const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
|
|
3203
3226
|
...{ name: "TaoLoader" },
|
|
3204
3227
|
__name: "TaoLoader",
|
|
3205
3228
|
props: {
|
|
@@ -3260,11 +3283,11 @@
|
|
|
3260
3283
|
};
|
|
3261
3284
|
}
|
|
3262
3285
|
});
|
|
3263
|
-
const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3264
|
-
const _hoisted_1$
|
|
3265
|
-
const _hoisted_2$
|
|
3266
|
-
const _hoisted_3$
|
|
3267
|
-
const _sfc_main$
|
|
3286
|
+
const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-49a9f1b2"]]);
|
|
3287
|
+
const _hoisted_1$C = { class: "tao-image" };
|
|
3288
|
+
const _hoisted_2$z = ["src", "alt", "loading"];
|
|
3289
|
+
const _hoisted_3$r = { class: "tao-image__placeholder" };
|
|
3290
|
+
const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
3268
3291
|
...{ name: "TaoImage" },
|
|
3269
3292
|
__name: "TaoImage",
|
|
3270
3293
|
props: {
|
|
@@ -3295,7 +3318,7 @@
|
|
|
3295
3318
|
hasError.value = false;
|
|
3296
3319
|
});
|
|
3297
3320
|
return (_ctx, _cache) => {
|
|
3298
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
3321
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$C, [
|
|
3299
3322
|
__props.src && !hasError.value ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
3300
3323
|
key: 0,
|
|
3301
3324
|
class: vue.normalizeClass({ "tao-image__img--hidden": !isLoaded.value, "tao-image__img--pixelated": props.pixelated }),
|
|
@@ -3306,26 +3329,26 @@
|
|
|
3306
3329
|
draggable: "false",
|
|
3307
3330
|
onLoad: handleLoad,
|
|
3308
3331
|
onError: handleError
|
|
3309
|
-
}, null, 42, _hoisted_2$
|
|
3332
|
+
}, null, 42, _hoisted_2$z)) : vue.createCommentVNode("", true),
|
|
3310
3333
|
!__props.src || hasError.value ? vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
3311
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
3334
|
+
vue.createElementVNode("div", _hoisted_3$r, vue.toDisplayString(__props.placeholderText), 1)
|
|
3312
3335
|
], true, 1) : vue.createCommentVNode("", true)
|
|
3313
3336
|
]);
|
|
3314
3337
|
};
|
|
3315
3338
|
}
|
|
3316
3339
|
});
|
|
3317
|
-
const TaoImage = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3318
|
-
const _hoisted_1$
|
|
3319
|
-
const _hoisted_2$
|
|
3320
|
-
const _hoisted_3$
|
|
3340
|
+
const TaoImage = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-61f47c52"]]);
|
|
3341
|
+
const _hoisted_1$B = ["for"];
|
|
3342
|
+
const _hoisted_2$y = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
|
|
3343
|
+
const _hoisted_3$q = {
|
|
3321
3344
|
key: 0,
|
|
3322
3345
|
class: "tao-checkbox__label"
|
|
3323
3346
|
};
|
|
3324
|
-
const _hoisted_4$
|
|
3347
|
+
const _hoisted_4$n = {
|
|
3325
3348
|
key: 1,
|
|
3326
3349
|
class: "tao-checkbox__label"
|
|
3327
3350
|
};
|
|
3328
|
-
const _sfc_main$
|
|
3351
|
+
const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
3329
3352
|
...{ name: "TaoCheckbox" },
|
|
3330
3353
|
__name: "TaoCheckbox",
|
|
3331
3354
|
props: {
|
|
@@ -3403,25 +3426,25 @@
|
|
|
3403
3426
|
"aria-invalid": invalid.value || void 0,
|
|
3404
3427
|
"aria-describedby": describedBy.value,
|
|
3405
3428
|
onChange: onInputChange
|
|
3406
|
-
}, null, 40, _hoisted_2$
|
|
3429
|
+
}, null, 40, _hoisted_2$y),
|
|
3407
3430
|
_cache[0] || (_cache[0] = vue.createElementVNode("span", { class: "tao-checkbox__box" }, null, -1)),
|
|
3408
|
-
__props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
3431
|
+
__props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$q, vue.toDisplayString(__props.label), 1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$n, [
|
|
3409
3432
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
3410
3433
|
])),
|
|
3411
3434
|
vue.renderSlot(_ctx.$slots, "post", { text: __props.label }, void 0, true)
|
|
3412
|
-
], 10, _hoisted_1$
|
|
3435
|
+
], 10, _hoisted_1$B);
|
|
3413
3436
|
};
|
|
3414
3437
|
}
|
|
3415
3438
|
});
|
|
3416
|
-
const TaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3417
|
-
const _hoisted_1$
|
|
3439
|
+
const TaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-13f6cd33"]]);
|
|
3440
|
+
const _hoisted_1$A = {
|
|
3418
3441
|
key: 0,
|
|
3419
3442
|
class: "tao-tag__prefix"
|
|
3420
3443
|
};
|
|
3421
|
-
const _hoisted_2$
|
|
3422
|
-
const _hoisted_3$
|
|
3423
|
-
const _hoisted_4$
|
|
3424
|
-
const _sfc_main$
|
|
3444
|
+
const _hoisted_2$x = { class: "tao-tag__text" };
|
|
3445
|
+
const _hoisted_3$p = ["aria-label"];
|
|
3446
|
+
const _hoisted_4$m = { "aria-hidden": "true" };
|
|
3447
|
+
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
3425
3448
|
...{ name: "TaoTag" },
|
|
3426
3449
|
__name: "TaoTag",
|
|
3427
3450
|
props: {
|
|
@@ -3473,10 +3496,10 @@
|
|
|
3473
3496
|
]]),
|
|
3474
3497
|
style: vue.normalizeStyle(style.value)
|
|
3475
3498
|
}, [
|
|
3476
|
-
_ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$
|
|
3499
|
+
_ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$A, [
|
|
3477
3500
|
vue.renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
|
|
3478
3501
|
])) : vue.createCommentVNode("", true),
|
|
3479
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
3502
|
+
vue.createElementVNode("span", _hoisted_2$x, [
|
|
3480
3503
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
3481
3504
|
]),
|
|
3482
3505
|
__props.closable ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
@@ -3486,27 +3509,27 @@
|
|
|
3486
3509
|
"aria-label": vue.unref(l10n).closeLabel,
|
|
3487
3510
|
onClick: vue.withModifiers(onClose, ["stop"])
|
|
3488
3511
|
}, [
|
|
3489
|
-
vue.createElementVNode("span", _hoisted_4$
|
|
3512
|
+
vue.createElementVNode("span", _hoisted_4$m, [
|
|
3490
3513
|
vue.renderSlot(_ctx.$slots, "close-icon", {}, () => [
|
|
3491
3514
|
_cache[0] || (_cache[0] = vue.createTextVNode("✕", -1))
|
|
3492
3515
|
], true)
|
|
3493
3516
|
])
|
|
3494
|
-
], 8, _hoisted_3$
|
|
3517
|
+
], 8, _hoisted_3$p)) : vue.createCommentVNode("", true)
|
|
3495
3518
|
], 6);
|
|
3496
3519
|
};
|
|
3497
3520
|
}
|
|
3498
3521
|
});
|
|
3499
|
-
const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3500
|
-
const _hoisted_1$
|
|
3501
|
-
const _hoisted_2$
|
|
3522
|
+
const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-ca0b1b42"]]);
|
|
3523
|
+
const _hoisted_1$z = ["role", "aria-hidden"];
|
|
3524
|
+
const _hoisted_2$w = {
|
|
3502
3525
|
key: 1,
|
|
3503
3526
|
class: "tao-divider__text"
|
|
3504
3527
|
};
|
|
3505
|
-
const _hoisted_3$
|
|
3528
|
+
const _hoisted_3$o = {
|
|
3506
3529
|
key: 2,
|
|
3507
3530
|
class: "tao-divider__line tao-divider__line--end"
|
|
3508
3531
|
};
|
|
3509
|
-
const _sfc_main$
|
|
3532
|
+
const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
3510
3533
|
...{ name: "TaoDivider" },
|
|
3511
3534
|
__name: "TaoDivider",
|
|
3512
3535
|
props: {
|
|
@@ -3540,23 +3563,23 @@
|
|
|
3540
3563
|
key: 0,
|
|
3541
3564
|
class: vue.normalizeClass(["tao-divider__line", { "tao-divider__line--start": hasLabel.value }])
|
|
3542
3565
|
}, null, 2)) : vue.createCommentVNode("", true),
|
|
3543
|
-
hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$
|
|
3566
|
+
hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$w, [
|
|
3544
3567
|
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
3545
3568
|
vue.createTextVNode(vue.toDisplayString(__props.text), 1)
|
|
3546
3569
|
], true)
|
|
3547
3570
|
])) : vue.createCommentVNode("", true),
|
|
3548
|
-
__props.variant !== "gap" && hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
3549
|
-
], 10, _hoisted_1$
|
|
3571
|
+
__props.variant !== "gap" && hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$o)) : vue.createCommentVNode("", true)
|
|
3572
|
+
], 10, _hoisted_1$z);
|
|
3550
3573
|
};
|
|
3551
3574
|
}
|
|
3552
3575
|
});
|
|
3553
|
-
const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3554
|
-
const _hoisted_1$
|
|
3576
|
+
const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-32544dcc"]]);
|
|
3577
|
+
const _hoisted_1$y = {
|
|
3555
3578
|
key: 0,
|
|
3556
3579
|
class: "tao-fieldset__legend"
|
|
3557
3580
|
};
|
|
3558
|
-
const _hoisted_2$
|
|
3559
|
-
const _sfc_main$
|
|
3581
|
+
const _hoisted_2$v = { class: "tao-fieldset__body" };
|
|
3582
|
+
const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
|
|
3560
3583
|
...{ name: "TaoFieldset" },
|
|
3561
3584
|
__name: "TaoFieldset",
|
|
3562
3585
|
props: {
|
|
@@ -3568,20 +3591,20 @@
|
|
|
3568
3591
|
return vue.openBlock(), vue.createElementBlock("fieldset", {
|
|
3569
3592
|
class: vue.normalizeClass(["tao-fieldset", `tao-fieldset--${__props.align}`])
|
|
3570
3593
|
}, [
|
|
3571
|
-
__props.legend || _ctx.$slots.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_1$
|
|
3594
|
+
__props.legend || _ctx.$slots.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_1$y, [
|
|
3572
3595
|
vue.renderSlot(_ctx.$slots, "legend", {}, () => [
|
|
3573
3596
|
vue.createTextVNode(vue.toDisplayString(__props.legend), 1)
|
|
3574
3597
|
], true)
|
|
3575
3598
|
])) : vue.createCommentVNode("", true),
|
|
3576
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3599
|
+
vue.createElementVNode("div", _hoisted_2$v, [
|
|
3577
3600
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
3578
3601
|
])
|
|
3579
3602
|
], 2);
|
|
3580
3603
|
};
|
|
3581
3604
|
}
|
|
3582
3605
|
});
|
|
3583
|
-
const TaoFieldset = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3584
|
-
const _sfc_main$
|
|
3606
|
+
const TaoFieldset = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-3445dafd"]]);
|
|
3607
|
+
const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
|
|
3585
3608
|
...{ name: "TaoAnimatedBorder" },
|
|
3586
3609
|
__name: "TaoAnimatedBorder",
|
|
3587
3610
|
props: {
|
|
@@ -3605,10 +3628,10 @@
|
|
|
3605
3628
|
};
|
|
3606
3629
|
}
|
|
3607
3630
|
});
|
|
3608
|
-
const TaoAnimatedBorder = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3609
|
-
const _hoisted_1$
|
|
3610
|
-
const _hoisted_2$
|
|
3611
|
-
const _sfc_main$
|
|
3631
|
+
const TaoAnimatedBorder = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-c9434028"]]);
|
|
3632
|
+
const _hoisted_1$x = ["id", "placeholder", "spellcheck", "autocomplete", "minlength", "maxlength", "disabled", "readonly", "rows", "value", "aria-invalid", "aria-describedby"];
|
|
3633
|
+
const _hoisted_2$u = ["id"];
|
|
3634
|
+
const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
|
|
3612
3635
|
...{ name: "TaoTextarea" },
|
|
3613
3636
|
__name: "TaoTextarea",
|
|
3614
3637
|
props: {
|
|
@@ -3784,21 +3807,21 @@
|
|
|
3784
3807
|
onFocus,
|
|
3785
3808
|
onBlur,
|
|
3786
3809
|
onKeydown
|
|
3787
|
-
}, null, 42, _hoisted_1$
|
|
3810
|
+
}, null, 42, _hoisted_1$x),
|
|
3788
3811
|
__props.count ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
3789
3812
|
key: 0,
|
|
3790
3813
|
id: counterId.value,
|
|
3791
3814
|
class: vue.normalizeClass(["tao-textarea__count", { "tao-textarea__count--limit": atLimit.value }])
|
|
3792
|
-
}, vue.toDisplayString(countLabel.value), 11, _hoisted_2$
|
|
3815
|
+
}, vue.toDisplayString(countLabel.value), 11, _hoisted_2$u)) : vue.createCommentVNode("", true)
|
|
3793
3816
|
], 2));
|
|
3794
3817
|
};
|
|
3795
3818
|
}
|
|
3796
3819
|
});
|
|
3797
|
-
const TaoTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3798
|
-
const _hoisted_1$
|
|
3799
|
-
const _hoisted_2$
|
|
3820
|
+
const TaoTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-50628dd9"]]);
|
|
3821
|
+
const _hoisted_1$w = ["tabindex", "aria-label"];
|
|
3822
|
+
const _hoisted_2$t = { class: "tao-scroll-top__content" };
|
|
3800
3823
|
const RIPPLE_DURATION = 750;
|
|
3801
|
-
const _sfc_main$
|
|
3824
|
+
const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
3802
3825
|
...{ name: "TaoScrollTop" },
|
|
3803
3826
|
__name: "TaoScrollTop",
|
|
3804
3827
|
props: {
|
|
@@ -3905,7 +3928,7 @@
|
|
|
3905
3928
|
"aria-label": props.ariaLabel,
|
|
3906
3929
|
onClick: vue.withModifiers(onClick, ["prevent"])
|
|
3907
3930
|
}, [
|
|
3908
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3931
|
+
vue.createElementVNode("div", _hoisted_2$t, [
|
|
3909
3932
|
vue.createElementVNode("div", {
|
|
3910
3933
|
class: vue.normalizeClass([{ "tao-scroll-top__ripple--active": isRippleActive.value }, "tao-scroll-top__ripple"]),
|
|
3911
3934
|
style: vue.normalizeStyle(rippleStyle)
|
|
@@ -3922,33 +3945,33 @@
|
|
|
3922
3945
|
], -1))
|
|
3923
3946
|
], true)
|
|
3924
3947
|
])
|
|
3925
|
-
], 14, _hoisted_1$
|
|
3948
|
+
], 14, _hoisted_1$w)) : vue.createCommentVNode("", true)
|
|
3926
3949
|
]),
|
|
3927
3950
|
_: 3
|
|
3928
3951
|
});
|
|
3929
3952
|
};
|
|
3930
3953
|
}
|
|
3931
3954
|
});
|
|
3932
|
-
const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3933
|
-
const _hoisted_1$
|
|
3934
|
-
const _hoisted_2$
|
|
3955
|
+
const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-89d2feaa"]]);
|
|
3956
|
+
const _hoisted_1$v = { class: "tao-progress" };
|
|
3957
|
+
const _hoisted_2$s = {
|
|
3935
3958
|
key: 0,
|
|
3936
3959
|
class: "tao-progress__side"
|
|
3937
3960
|
};
|
|
3938
|
-
const _hoisted_3$
|
|
3939
|
-
const _hoisted_4$
|
|
3961
|
+
const _hoisted_3$n = { class: "tao-progress__main" };
|
|
3962
|
+
const _hoisted_4$l = {
|
|
3940
3963
|
key: 0,
|
|
3941
3964
|
class: "tao-progress__percentage"
|
|
3942
3965
|
};
|
|
3943
|
-
const _hoisted_5$
|
|
3966
|
+
const _hoisted_5$h = {
|
|
3944
3967
|
key: 1,
|
|
3945
3968
|
class: "tao-progress__side"
|
|
3946
3969
|
};
|
|
3947
|
-
const _hoisted_6$
|
|
3970
|
+
const _hoisted_6$e = {
|
|
3948
3971
|
key: 0,
|
|
3949
3972
|
class: "tao-progress__percentage"
|
|
3950
3973
|
};
|
|
3951
|
-
const _sfc_main$
|
|
3974
|
+
const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
|
|
3952
3975
|
...{ name: "TaoProgress" },
|
|
3953
3976
|
__name: "TaoProgress",
|
|
3954
3977
|
props: {
|
|
@@ -3979,16 +4002,16 @@
|
|
|
3979
4002
|
() => hasRight.value ? `(${props.progress}%)` : `${props.progress}%`
|
|
3980
4003
|
);
|
|
3981
4004
|
return (_ctx, _cache) => {
|
|
3982
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4005
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$v, [
|
|
3983
4006
|
vue.createElementVNode("div", {
|
|
3984
4007
|
class: vue.normalizeClass(["tao-progress__container", { "tao-progress__container--over": showOverPercent.value }]),
|
|
3985
4008
|
style: vue.normalizeStyle({ minWidth: `${minW.value}px`, maxWidth: `${maxW.value}px` })
|
|
3986
4009
|
}, [
|
|
3987
|
-
_ctx.$slots.left ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
4010
|
+
_ctx.$slots.left ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$s, [
|
|
3988
4011
|
vue.renderSlot(_ctx.$slots, "left", {}, void 0, true)
|
|
3989
4012
|
])) : vue.createCommentVNode("", true),
|
|
3990
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
3991
|
-
showOverPercent.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$
|
|
4013
|
+
vue.createElementVNode("div", _hoisted_3$n, [
|
|
4014
|
+
showOverPercent.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$l, vue.toDisplayString(__props.progress) + "%", 1)) : vue.createCommentVNode("", true),
|
|
3992
4015
|
vue.createElementVNode("div", {
|
|
3993
4016
|
class: "tao-progress__track",
|
|
3994
4017
|
style: vue.normalizeStyle({ height: `${__props.height}px` })
|
|
@@ -3999,17 +4022,17 @@
|
|
|
3999
4022
|
}, null, 6)
|
|
4000
4023
|
], 4)
|
|
4001
4024
|
]),
|
|
4002
|
-
_ctx.$slots.right || showEndPercent.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$
|
|
4025
|
+
_ctx.$slots.right || showEndPercent.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$h, [
|
|
4003
4026
|
vue.renderSlot(_ctx.$slots, "right", {}, void 0, true),
|
|
4004
|
-
showEndPercent.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$
|
|
4027
|
+
showEndPercent.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$e, vue.toDisplayString(endPercentLabel.value), 1)) : vue.createCommentVNode("", true)
|
|
4005
4028
|
])) : vue.createCommentVNode("", true)
|
|
4006
4029
|
], 6)
|
|
4007
4030
|
]);
|
|
4008
4031
|
};
|
|
4009
4032
|
}
|
|
4010
4033
|
});
|
|
4011
|
-
const TaoProgress = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4012
|
-
const _sfc_main$
|
|
4034
|
+
const TaoProgress = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-1aae89cd"]]);
|
|
4035
|
+
const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
4013
4036
|
...{ name: "TaoRangeSlider" },
|
|
4014
4037
|
__name: "TaoRangeSlider",
|
|
4015
4038
|
props: {
|
|
@@ -4028,6 +4051,7 @@
|
|
|
4028
4051
|
error: { type: Boolean },
|
|
4029
4052
|
variant: {},
|
|
4030
4053
|
size: {},
|
|
4054
|
+
ariaLabel: {},
|
|
4031
4055
|
wheel: {},
|
|
4032
4056
|
modelValue: {}
|
|
4033
4057
|
},
|
|
@@ -4065,19 +4089,19 @@
|
|
|
4065
4089
|
};
|
|
4066
4090
|
}
|
|
4067
4091
|
});
|
|
4068
|
-
const _hoisted_1$
|
|
4069
|
-
const _hoisted_2$
|
|
4070
|
-
const _hoisted_3$
|
|
4071
|
-
const _hoisted_4$
|
|
4072
|
-
const _hoisted_5$
|
|
4092
|
+
const _hoisted_1$u = { class: "tao-file-drop__row" };
|
|
4093
|
+
const _hoisted_2$r = ["aria-label"];
|
|
4094
|
+
const _hoisted_3$m = { "aria-hidden": "true" };
|
|
4095
|
+
const _hoisted_4$k = ["accept", "multiple"];
|
|
4096
|
+
const _hoisted_5$g = {
|
|
4073
4097
|
key: 0,
|
|
4074
4098
|
class: "tao-file-drop__list"
|
|
4075
4099
|
};
|
|
4076
|
-
const _hoisted_6$
|
|
4077
|
-
const _hoisted_7$
|
|
4078
|
-
const _hoisted_8$
|
|
4100
|
+
const _hoisted_6$d = { class: "tao-file-drop__name" };
|
|
4101
|
+
const _hoisted_7$b = { class: "tao-file-drop__meta" };
|
|
4102
|
+
const _hoisted_8$a = ["aria-label", "onClick"];
|
|
4079
4103
|
const _hoisted_9$4 = { "aria-hidden": "true" };
|
|
4080
|
-
const _sfc_main$
|
|
4104
|
+
const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
4081
4105
|
...{ name: "TaoFileDrop" },
|
|
4082
4106
|
__name: "TaoFileDrop",
|
|
4083
4107
|
props: {
|
|
@@ -4217,7 +4241,7 @@
|
|
|
4217
4241
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4218
4242
|
class: vue.normalizeClass(["tao-file-drop", vue.unref(sizeClass)(__props.size)])
|
|
4219
4243
|
}, [
|
|
4220
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
4244
|
+
vue.createElementVNode("div", _hoisted_1$u, [
|
|
4221
4245
|
__props.showClear && __props.modelValue.length ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
4222
4246
|
key: 0,
|
|
4223
4247
|
type: "button",
|
|
@@ -4225,12 +4249,12 @@
|
|
|
4225
4249
|
"aria-label": vue.unref(l10n).clearLabel,
|
|
4226
4250
|
onClick: requestClear
|
|
4227
4251
|
}, [
|
|
4228
|
-
vue.createElementVNode("span", _hoisted_3$
|
|
4252
|
+
vue.createElementVNode("span", _hoisted_3$m, [
|
|
4229
4253
|
vue.renderSlot(_ctx.$slots, "clear-icon", {}, () => [
|
|
4230
4254
|
_cache[1] || (_cache[1] = vue.createTextVNode("✕", -1))
|
|
4231
4255
|
], true)
|
|
4232
4256
|
])
|
|
4233
|
-
], 8, _hoisted_2$
|
|
4257
|
+
], 8, _hoisted_2$r)) : vue.createCommentVNode("", true),
|
|
4234
4258
|
vue.createElementVNode("label", {
|
|
4235
4259
|
class: vue.normalizeClass(["tao-file-drop__zone", { "tao-file-drop__zone--dragging": isDragging.value }]),
|
|
4236
4260
|
onDragover: handleDragOver,
|
|
@@ -4250,17 +4274,17 @@
|
|
|
4250
4274
|
onChange: handleFileSelect,
|
|
4251
4275
|
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
4252
4276
|
}, ["stop"]))
|
|
4253
|
-
}, null, 40, _hoisted_4$
|
|
4277
|
+
}, null, 40, _hoisted_4$k)
|
|
4254
4278
|
], 34)
|
|
4255
4279
|
]),
|
|
4256
|
-
__props.list && __props.modelValue.length ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_5$
|
|
4280
|
+
__props.list && __props.modelValue.length ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_5$g, [
|
|
4257
4281
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.modelValue, (file, index) => {
|
|
4258
4282
|
return vue.openBlock(), vue.createElementBlock("li", {
|
|
4259
4283
|
key: fileKey(file, index),
|
|
4260
4284
|
class: "tao-file-drop__file"
|
|
4261
4285
|
}, [
|
|
4262
|
-
vue.createElementVNode("span", _hoisted_6$
|
|
4263
|
-
vue.createElementVNode("span", _hoisted_7$
|
|
4286
|
+
vue.createElementVNode("span", _hoisted_6$d, vue.toDisplayString(file.name), 1),
|
|
4287
|
+
vue.createElementVNode("span", _hoisted_7$b, vue.toDisplayString(sizeLabel(file.size)), 1),
|
|
4264
4288
|
vue.createElementVNode("button", {
|
|
4265
4289
|
type: "button",
|
|
4266
4290
|
class: "tao-file-drop__remove",
|
|
@@ -4272,7 +4296,7 @@
|
|
|
4272
4296
|
_cache[2] || (_cache[2] = vue.createTextVNode("✕", -1))
|
|
4273
4297
|
], true)
|
|
4274
4298
|
])
|
|
4275
|
-
], 8, _hoisted_8$
|
|
4299
|
+
], 8, _hoisted_8$a)
|
|
4276
4300
|
]);
|
|
4277
4301
|
}), 128))
|
|
4278
4302
|
])) : vue.createCommentVNode("", true)
|
|
@@ -4280,15 +4304,15 @@
|
|
|
4280
4304
|
};
|
|
4281
4305
|
}
|
|
4282
4306
|
});
|
|
4283
|
-
const TaoFileDrop = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4284
|
-
const _hoisted_1$
|
|
4285
|
-
const _hoisted_2$
|
|
4307
|
+
const TaoFileDrop = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-f8c58faa"]]);
|
|
4308
|
+
const _hoisted_1$t = ["aria-expanded", "aria-label"];
|
|
4309
|
+
const _hoisted_2$q = {
|
|
4286
4310
|
key: 1,
|
|
4287
4311
|
"aria-hidden": "true"
|
|
4288
4312
|
};
|
|
4289
|
-
const _hoisted_3$
|
|
4290
|
-
const _hoisted_4$
|
|
4291
|
-
const _sfc_main$
|
|
4313
|
+
const _hoisted_3$l = ["onClick", "onMouseenter"];
|
|
4314
|
+
const _hoisted_4$j = { key: 1 };
|
|
4315
|
+
const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
4292
4316
|
...{ name: "TaoDropdownMenu" },
|
|
4293
4317
|
__name: "TaoDropdownMenu",
|
|
4294
4318
|
props: {
|
|
@@ -4430,12 +4454,12 @@
|
|
|
4430
4454
|
"aria-label": _ctx.$slots.button ? void 0 : vue.unref(l10n).menuLabel,
|
|
4431
4455
|
onClick: toggleMenu
|
|
4432
4456
|
}, [
|
|
4433
|
-
_ctx.$slots.button ? vue.renderSlot(_ctx.$slots, "button", {}, void 0, true, 0) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$
|
|
4457
|
+
_ctx.$slots.button ? vue.renderSlot(_ctx.$slots, "button", {}, void 0, true, 0) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$q, [
|
|
4434
4458
|
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
4435
4459
|
_cache[0] || (_cache[0] = vue.createTextVNode("⋮", -1))
|
|
4436
4460
|
], true)
|
|
4437
4461
|
]))
|
|
4438
|
-
], 8, _hoisted_1$
|
|
4462
|
+
], 8, _hoisted_1$t),
|
|
4439
4463
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
4440
4464
|
isOpen.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
4441
4465
|
key: 0,
|
|
@@ -4460,8 +4484,8 @@
|
|
|
4460
4484
|
id: action.id,
|
|
4461
4485
|
ico: action.ico,
|
|
4462
4486
|
text: action.name
|
|
4463
|
-
}, void 0, true, 0) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$
|
|
4464
|
-
], 42, _hoisted_3$
|
|
4487
|
+
}, void 0, true, 0) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$j, vue.toDisplayString(action.name), 1))
|
|
4488
|
+
], 42, _hoisted_3$l);
|
|
4465
4489
|
}), 128))
|
|
4466
4490
|
], 36)) : vue.createCommentVNode("", true)
|
|
4467
4491
|
]))
|
|
@@ -4469,10 +4493,10 @@
|
|
|
4469
4493
|
};
|
|
4470
4494
|
}
|
|
4471
4495
|
});
|
|
4472
|
-
const TaoDropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4473
|
-
const _hoisted_1$
|
|
4474
|
-
const _hoisted_2$
|
|
4475
|
-
const _sfc_main$
|
|
4496
|
+
const TaoDropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-5db490aa"]]);
|
|
4497
|
+
const _hoisted_1$s = ["aria-invalid", "aria-describedby"];
|
|
4498
|
+
const _hoisted_2$p = ["id", "value", "placeholder", "type", "disabled", "aria-invalid", "inputmode", "pattern", "maxlength", "onInput", "onPaste", "onKeydown", "onFocus"];
|
|
4499
|
+
const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
4476
4500
|
...{ name: "TaoPinCode" },
|
|
4477
4501
|
__name: "TaoPinCode",
|
|
4478
4502
|
props: {
|
|
@@ -4691,14 +4715,14 @@
|
|
|
4691
4715
|
onKeydown: ($event) => onKeydown($event, index),
|
|
4692
4716
|
onFocus: ($event) => onFocus(index),
|
|
4693
4717
|
onBlur
|
|
4694
|
-
}, null, 42, _hoisted_2$
|
|
4718
|
+
}, null, 42, _hoisted_2$p);
|
|
4695
4719
|
}), 128))
|
|
4696
|
-
], 10, _hoisted_1$
|
|
4720
|
+
], 10, _hoisted_1$s);
|
|
4697
4721
|
};
|
|
4698
4722
|
}
|
|
4699
4723
|
});
|
|
4700
|
-
const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4701
|
-
const _sfc_main$
|
|
4724
|
+
const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-6f0df8bd"]]);
|
|
4725
|
+
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
4702
4726
|
...{ name: "TaoLink" },
|
|
4703
4727
|
__name: "TaoLink",
|
|
4704
4728
|
props: {
|
|
@@ -4745,8 +4769,8 @@
|
|
|
4745
4769
|
};
|
|
4746
4770
|
}
|
|
4747
4771
|
});
|
|
4748
|
-
const _hoisted_1$
|
|
4749
|
-
const _sfc_main$
|
|
4772
|
+
const _hoisted_1$r = ["for"];
|
|
4773
|
+
const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
4750
4774
|
...{ name: "TaoFormField" },
|
|
4751
4775
|
__name: "TaoFormField",
|
|
4752
4776
|
props: {
|
|
@@ -4797,7 +4821,7 @@
|
|
|
4797
4821
|
class: "tao-form-field__label",
|
|
4798
4822
|
for: vue.unref(id),
|
|
4799
4823
|
onClick: onLabelClick
|
|
4800
|
-
}, vue.toDisplayString(__props.label), 9, _hoisted_1$
|
|
4824
|
+
}, vue.toDisplayString(__props.label), 9, _hoisted_1$r)) : vue.createCommentVNode("", true),
|
|
4801
4825
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
4802
4826
|
__props.error ? (vue.openBlock(), vue.createElementBlock("p", {
|
|
4803
4827
|
key: 1,
|
|
@@ -4812,12 +4836,12 @@
|
|
|
4812
4836
|
};
|
|
4813
4837
|
}
|
|
4814
4838
|
});
|
|
4815
|
-
const TaoFormField = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4816
|
-
const _hoisted_1$
|
|
4817
|
-
const _hoisted_2$
|
|
4818
|
-
const _hoisted_3$
|
|
4819
|
-
const _hoisted_4$
|
|
4820
|
-
const _sfc_main$
|
|
4839
|
+
const TaoFormField = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-3cf90e3a"]]);
|
|
4840
|
+
const _hoisted_1$q = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
|
|
4841
|
+
const _hoisted_2$o = { class: "tao-select__value" };
|
|
4842
|
+
const _hoisted_3$k = ["aria-activedescendant"];
|
|
4843
|
+
const _hoisted_4$i = ["id", "aria-selected", "aria-disabled", "data-tao-select-index", "onClick", "onMouseenter"];
|
|
4844
|
+
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
4821
4845
|
...{ name: "TaoSelect" },
|
|
4822
4846
|
__name: "TaoSelect",
|
|
4823
4847
|
props: {
|
|
@@ -5040,14 +5064,14 @@
|
|
|
5040
5064
|
onClick: toggle,
|
|
5041
5065
|
onKeydown: onTriggerKeydown
|
|
5042
5066
|
}, [
|
|
5043
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
5067
|
+
vue.createElementVNode("span", _hoisted_2$o, vue.toDisplayString(((_a = selected.value) == null ? void 0 : _a.label) ?? vue.unref(l10n).placeholder), 1),
|
|
5044
5068
|
vue.createElementVNode("span", {
|
|
5045
5069
|
class: vue.normalizeClass(["tao-select__chevron", { "tao-select__chevron--custom": _ctx.$slots.chevron }]),
|
|
5046
5070
|
"aria-hidden": "true"
|
|
5047
5071
|
}, [
|
|
5048
5072
|
vue.renderSlot(_ctx.$slots, "chevron", {}, void 0, true)
|
|
5049
5073
|
], 2)
|
|
5050
|
-
], 42, _hoisted_1$
|
|
5074
|
+
], 42, _hoisted_1$q),
|
|
5051
5075
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
5052
5076
|
open.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
5053
5077
|
key: 0,
|
|
@@ -5083,9 +5107,9 @@
|
|
|
5083
5107
|
}, ["prevent"])),
|
|
5084
5108
|
onClick: ($event) => selectOption(option),
|
|
5085
5109
|
onMouseenter: ($event) => !option.disabled && (activeIndex.value = index)
|
|
5086
|
-
}, vue.toDisplayString(option.label), 43, _hoisted_4$
|
|
5110
|
+
}, vue.toDisplayString(option.label), 43, _hoisted_4$i);
|
|
5087
5111
|
}), 128))
|
|
5088
|
-
], 40, _hoisted_3$
|
|
5112
|
+
], 40, _hoisted_3$k),
|
|
5089
5113
|
__props.clearable && selected.value ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
5090
5114
|
key: 0,
|
|
5091
5115
|
type: "button",
|
|
@@ -5104,90 +5128,839 @@
|
|
|
5104
5128
|
};
|
|
5105
5129
|
}
|
|
5106
5130
|
});
|
|
5107
|
-
const TaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5108
|
-
const
|
|
5109
|
-
const
|
|
5131
|
+
const TaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-47d327a3"]]);
|
|
5132
|
+
const clamp = (v, lo, hi) => Math.min(Math.max(v, lo), hi);
|
|
5133
|
+
const byte = (v) => Math.round(clamp(v, 0, 255));
|
|
5134
|
+
const hex2 = (v) => byte(v).toString(16).padStart(2, "0");
|
|
5135
|
+
function channel(text, scale) {
|
|
5136
|
+
const t = text.trim();
|
|
5137
|
+
return t.endsWith("%") ? parseFloat(t) / 100 * scale : parseFloat(t);
|
|
5138
|
+
}
|
|
5139
|
+
function parseColor(input) {
|
|
5140
|
+
const text = input.trim();
|
|
5141
|
+
const hex = /^#?([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(text);
|
|
5142
|
+
if (hex) {
|
|
5143
|
+
let h = hex[1];
|
|
5144
|
+
if (h.length <= 4) h = [...h].map((c) => c + c).join("");
|
|
5145
|
+
const n = (i) => parseInt(h.slice(i, i + 2), 16);
|
|
5146
|
+
return { r: n(0), g: n(2), b: n(4), a: h.length === 8 ? n(6) / 255 : 1 };
|
|
5147
|
+
}
|
|
5148
|
+
const fn = /^(rgba?|hsla?)\(\s*([^)]+?)\s*\)$/i.exec(text);
|
|
5149
|
+
if (fn && fn[1].toLowerCase().startsWith("hsl")) {
|
|
5150
|
+
const [main, slash] = fn[2].split("/");
|
|
5151
|
+
const parts = main.trim().split(/[\s,]+/);
|
|
5152
|
+
const alphaText = slash !== void 0 ? slash : parts[3];
|
|
5153
|
+
if (parts.length < 3 || parts.length > (slash === void 0 ? 4 : 3)) return null;
|
|
5154
|
+
const h = parseFloat(parts[0]);
|
|
5155
|
+
const s = parseFloat(parts[1]) / 100;
|
|
5156
|
+
const l = parseFloat(parts[2]) / 100;
|
|
5157
|
+
const a = alphaText === void 0 ? 1 : channel(alphaText, 1);
|
|
5158
|
+
if ([h, s, l, a].some((v) => Number.isNaN(v))) return null;
|
|
5159
|
+
return { ...hslToRgb(h, s, l), a: clamp(a, 0, 1) };
|
|
5160
|
+
}
|
|
5161
|
+
if (fn) {
|
|
5162
|
+
const [main, slash] = fn[2].split("/");
|
|
5163
|
+
const parts = main.trim().split(/[\s,]+/);
|
|
5164
|
+
const alphaText = slash !== void 0 ? slash : parts[3];
|
|
5165
|
+
if (parts.length < 3 || parts.length > (slash === void 0 ? 4 : 3)) return null;
|
|
5166
|
+
const r = channel(parts[0], 255);
|
|
5167
|
+
const g = channel(parts[1], 255);
|
|
5168
|
+
const b = channel(parts[2], 255);
|
|
5169
|
+
const a = alphaText === void 0 ? 1 : channel(alphaText, 1);
|
|
5170
|
+
if ([r, g, b, a].some((v) => Number.isNaN(v))) return null;
|
|
5171
|
+
return { r: byte(r), g: byte(g), b: byte(b), a: clamp(a, 0, 1) };
|
|
5172
|
+
}
|
|
5173
|
+
return null;
|
|
5174
|
+
}
|
|
5175
|
+
function toHex(color, alpha = false) {
|
|
5176
|
+
const base = `#${hex2(color.r)}${hex2(color.g)}${hex2(color.b)}`;
|
|
5177
|
+
return alpha ? `${base}${hex2(clamp(color.a, 0, 1) * 255)}` : base;
|
|
5178
|
+
}
|
|
5179
|
+
function rgbToHsv(r, g, b) {
|
|
5180
|
+
const R = clamp(r, 0, 255) / 255;
|
|
5181
|
+
const G = clamp(g, 0, 255) / 255;
|
|
5182
|
+
const B = clamp(b, 0, 255) / 255;
|
|
5183
|
+
const max = Math.max(R, G, B);
|
|
5184
|
+
const d = max - Math.min(R, G, B);
|
|
5185
|
+
let h = 0;
|
|
5186
|
+
if (d > 0) {
|
|
5187
|
+
if (max === R) h = (G - B) / d % 6;
|
|
5188
|
+
else if (max === G) h = (B - R) / d + 2;
|
|
5189
|
+
else h = (R - G) / d + 4;
|
|
5190
|
+
h *= 60;
|
|
5191
|
+
if (h < 0) h += 360;
|
|
5192
|
+
}
|
|
5193
|
+
return { h, s: max === 0 ? 0 : d / max, v: max };
|
|
5194
|
+
}
|
|
5195
|
+
function hsvToRgb(h, s, v) {
|
|
5196
|
+
const H = (h % 360 + 360) % 360 / 60;
|
|
5197
|
+
const S = clamp(s, 0, 1);
|
|
5198
|
+
const V = clamp(v, 0, 1);
|
|
5199
|
+
const f = (n) => {
|
|
5200
|
+
const k = (n + H) % 6;
|
|
5201
|
+
return V - V * S * Math.max(0, Math.min(k, 4 - k, 1));
|
|
5202
|
+
};
|
|
5203
|
+
return { r: f(5) * 255, g: f(3) * 255, b: f(1) * 255 };
|
|
5204
|
+
}
|
|
5205
|
+
function rgbToHsl(r, g, b) {
|
|
5206
|
+
const { h, s: sv, v } = rgbToHsv(r, g, b);
|
|
5207
|
+
const l = v * (1 - sv / 2);
|
|
5208
|
+
return { h, s: l === 0 || l === 1 ? 0 : (v - l) / Math.min(l, 1 - l), l };
|
|
5209
|
+
}
|
|
5210
|
+
function hslToRgb(h, s, l) {
|
|
5211
|
+
const S = clamp(s, 0, 1);
|
|
5212
|
+
const L = clamp(l, 0, 1);
|
|
5213
|
+
const v = L + S * Math.min(L, 1 - L);
|
|
5214
|
+
const rgb = hsvToRgb(h, v === 0 ? 0 : 2 * (1 - L / v), v);
|
|
5215
|
+
return { r: byte(rgb.r), g: byte(rgb.g), b: byte(rgb.b) };
|
|
5216
|
+
}
|
|
5217
|
+
const rgbaToHsva = (c) => ({ ...rgbToHsv(c.r, c.g, c.b), a: c.a });
|
|
5218
|
+
const hsvaToRgba = (c) => ({ ...hsvToRgb(c.h, c.s, c.v), a: c.a });
|
|
5219
|
+
const linearToSrgb = (c) => {
|
|
5220
|
+
const x = clamp(c, 0, 1);
|
|
5221
|
+
return x <= 31308e-7 ? x * 12.92 : 1.055 * Math.pow(x, 1 / 2.4) - 0.055;
|
|
5222
|
+
};
|
|
5223
|
+
const srgbToLinear = (c) => {
|
|
5224
|
+
const x = clamp(c, 0, 1);
|
|
5225
|
+
return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
|
|
5226
|
+
};
|
|
5227
|
+
function normalizeHex(input, alpha = false) {
|
|
5228
|
+
const c = parseColor(input);
|
|
5229
|
+
return c ? toHex(c, alpha) : null;
|
|
5230
|
+
}
|
|
5231
|
+
const segmentedKey = Symbol("taoSegmented");
|
|
5232
|
+
const _hoisted_1$p = ["disabled", "aria-describedby", "aria-invalid", "aria-labelledby", "id"];
|
|
5233
|
+
const _hoisted_2$n = {
|
|
5110
5234
|
key: 0,
|
|
5111
|
-
class: "tao-
|
|
5235
|
+
class: "tao-segmented__legend"
|
|
5112
5236
|
};
|
|
5113
|
-
const
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
__name: "TaoCombobox",
|
|
5237
|
+
const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
5238
|
+
...{ name: "TaoSegmented" },
|
|
5239
|
+
__name: "TaoSegmented",
|
|
5117
5240
|
props: {
|
|
5118
|
-
modelValue: {
|
|
5119
|
-
|
|
5120
|
-
|
|
5241
|
+
modelValue: { type: [String, Number, Boolean] },
|
|
5242
|
+
name: {},
|
|
5243
|
+
legend: {},
|
|
5121
5244
|
disabled: { type: Boolean, default: false },
|
|
5122
5245
|
error: { type: Boolean, default: false },
|
|
5123
|
-
emptyText: {},
|
|
5124
|
-
clearText: {},
|
|
5125
|
-
clearable: { type: Boolean, default: true },
|
|
5126
5246
|
size: {},
|
|
5127
|
-
|
|
5247
|
+
block: { type: Boolean, default: false }
|
|
5128
5248
|
},
|
|
5129
|
-
emits: ["update:modelValue", "change"
|
|
5249
|
+
emits: ["update:modelValue", "change"],
|
|
5130
5250
|
setup(__props, { emit: __emit }) {
|
|
5131
5251
|
const props = __props;
|
|
5132
|
-
const l10n = useLocaleText(props, "combobox");
|
|
5133
5252
|
const emit = __emit;
|
|
5134
5253
|
const field = vue.inject(formFieldKey, null);
|
|
5135
|
-
const
|
|
5136
|
-
const
|
|
5137
|
-
const
|
|
5254
|
+
const autoName = vue.useId();
|
|
5255
|
+
const groupName = vue.computed(() => props.name || autoName);
|
|
5256
|
+
const model = vue.computed(() => props.modelValue);
|
|
5257
|
+
const groupDisabled = vue.computed(() => props.disabled);
|
|
5138
5258
|
const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
|
|
5139
5259
|
const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
|
|
5140
|
-
const
|
|
5141
|
-
const
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
const selected = vue.computed(() => {
|
|
5153
|
-
const found = props.options.find((option) => option.value === props.modelValue);
|
|
5154
|
-
if (found) {
|
|
5155
|
-
return found;
|
|
5260
|
+
const trackRef = vue.ref(null);
|
|
5261
|
+
const thumbStyle = vue.ref({ opacity: "0" });
|
|
5262
|
+
let resizeObserver = null;
|
|
5263
|
+
let mutationObserver = null;
|
|
5264
|
+
function setValue(value) {
|
|
5265
|
+
emit("update:modelValue", value);
|
|
5266
|
+
emit("change", value);
|
|
5267
|
+
}
|
|
5268
|
+
function updateThumb() {
|
|
5269
|
+
const track = trackRef.value;
|
|
5270
|
+
if (!track) {
|
|
5271
|
+
return;
|
|
5156
5272
|
}
|
|
5157
|
-
|
|
5158
|
-
|
|
5273
|
+
const selected = track.querySelector(".tao-segmented-option--checked");
|
|
5274
|
+
if (!selected) {
|
|
5275
|
+
if (thumbStyle.value.opacity !== "0") {
|
|
5276
|
+
thumbStyle.value = { opacity: "0" };
|
|
5277
|
+
}
|
|
5278
|
+
return;
|
|
5159
5279
|
}
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5280
|
+
const trackBox = track.getBoundingClientRect();
|
|
5281
|
+
const optionBox = selected.getBoundingClientRect();
|
|
5282
|
+
const next = {
|
|
5283
|
+
width: `${optionBox.width}px`,
|
|
5284
|
+
height: `${optionBox.height}px`,
|
|
5285
|
+
transform: `translate(${optionBox.left - trackBox.left - track.clientLeft}px, ${optionBox.top - trackBox.top - track.clientTop}px)`,
|
|
5286
|
+
opacity: "1"
|
|
5287
|
+
};
|
|
5288
|
+
const prev = thumbStyle.value;
|
|
5289
|
+
if (prev.width === next.width && prev.height === next.height && prev.transform === next.transform && prev.opacity === next.opacity) {
|
|
5290
|
+
return;
|
|
5166
5291
|
}
|
|
5167
|
-
|
|
5292
|
+
thumbStyle.value = next;
|
|
5293
|
+
}
|
|
5294
|
+
vue.provide(segmentedKey, {
|
|
5295
|
+
name: groupName,
|
|
5296
|
+
model,
|
|
5297
|
+
disabled: groupDisabled,
|
|
5298
|
+
setValue
|
|
5168
5299
|
});
|
|
5169
|
-
|
|
5170
|
-
const
|
|
5171
|
-
|
|
5172
|
-
|
|
5300
|
+
vue.onMounted(() => {
|
|
5301
|
+
const track = trackRef.value;
|
|
5302
|
+
void vue.nextTick(updateThumb);
|
|
5303
|
+
if (!track) {
|
|
5304
|
+
return;
|
|
5173
5305
|
}
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
const next = filtered.value.map((option) => ({ kind: "option", option }));
|
|
5178
|
-
if (canCreate.value) {
|
|
5179
|
-
next.push({ kind: "create", text: query.value.trim() });
|
|
5306
|
+
if (typeof ResizeObserver !== "undefined") {
|
|
5307
|
+
resizeObserver = new ResizeObserver(() => updateThumb());
|
|
5308
|
+
resizeObserver.observe(track);
|
|
5180
5309
|
}
|
|
5181
|
-
|
|
5310
|
+
mutationObserver = new MutationObserver(() => updateThumb());
|
|
5311
|
+
mutationObserver.observe(track, {
|
|
5312
|
+
subtree: true,
|
|
5313
|
+
childList: true,
|
|
5314
|
+
attributes: true,
|
|
5315
|
+
attributeFilter: ["class"]
|
|
5316
|
+
});
|
|
5182
5317
|
});
|
|
5183
|
-
|
|
5184
|
-
() =>
|
|
5318
|
+
vue.watch(
|
|
5319
|
+
() => [props.modelValue, props.size, props.block, props.disabled],
|
|
5320
|
+
() => {
|
|
5321
|
+
void vue.nextTick(updateThumb);
|
|
5322
|
+
}
|
|
5185
5323
|
);
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5324
|
+
vue.onBeforeUnmount(() => {
|
|
5325
|
+
resizeObserver == null ? void 0 : resizeObserver.disconnect();
|
|
5326
|
+
resizeObserver = null;
|
|
5327
|
+
mutationObserver == null ? void 0 : mutationObserver.disconnect();
|
|
5328
|
+
mutationObserver = null;
|
|
5329
|
+
});
|
|
5330
|
+
return (_ctx, _cache) => {
|
|
5331
|
+
var _a;
|
|
5332
|
+
return vue.openBlock(), vue.createElementBlock("fieldset", {
|
|
5333
|
+
class: vue.normalizeClass(["tao-segmented", [
|
|
5334
|
+
vue.unref(sizeClass)(__props.size),
|
|
5335
|
+
{
|
|
5336
|
+
"tao-segmented--block": __props.block,
|
|
5337
|
+
"tao-segmented--disabled": __props.disabled,
|
|
5338
|
+
"tao-segmented--invalid": invalid.value
|
|
5339
|
+
}
|
|
5340
|
+
]]),
|
|
5341
|
+
disabled: __props.disabled,
|
|
5342
|
+
"aria-describedby": describedBy.value,
|
|
5343
|
+
"aria-invalid": invalid.value || void 0,
|
|
5344
|
+
"aria-labelledby": __props.legend ? void 0 : vue.unref(field) ? `${vue.unref(field).id}-label` : void 0,
|
|
5345
|
+
id: (_a = vue.unref(field)) == null ? void 0 : _a.id
|
|
5346
|
+
}, [
|
|
5347
|
+
__props.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_2$n, vue.toDisplayString(__props.legend), 1)) : vue.createCommentVNode("", true),
|
|
5348
|
+
vue.createElementVNode("div", {
|
|
5349
|
+
ref_key: "trackRef",
|
|
5350
|
+
ref: trackRef,
|
|
5351
|
+
class: "tao-segmented__track"
|
|
5352
|
+
}, [
|
|
5353
|
+
vue.createElementVNode("div", {
|
|
5354
|
+
class: "tao-segmented__thumb",
|
|
5355
|
+
style: vue.normalizeStyle(thumbStyle.value),
|
|
5356
|
+
"aria-hidden": "true"
|
|
5357
|
+
}, null, 4),
|
|
5358
|
+
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
5359
|
+
], 512)
|
|
5360
|
+
], 10, _hoisted_1$p);
|
|
5361
|
+
};
|
|
5362
|
+
}
|
|
5363
|
+
});
|
|
5364
|
+
const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-7dc6820f"]]);
|
|
5365
|
+
const _hoisted_1$o = ["for"];
|
|
5366
|
+
const _hoisted_2$m = ["id", "name", "value", "checked", "disabled", "aria-label"];
|
|
5367
|
+
const _hoisted_3$j = { class: "tao-segmented-option__face" };
|
|
5368
|
+
const _hoisted_4$h = {
|
|
5369
|
+
key: 0,
|
|
5370
|
+
class: "tao-segmented-option__icon",
|
|
5371
|
+
"aria-hidden": "true"
|
|
5372
|
+
};
|
|
5373
|
+
const _hoisted_5$f = {
|
|
5374
|
+
key: 1,
|
|
5375
|
+
class: "tao-segmented-option__label"
|
|
5376
|
+
};
|
|
5377
|
+
const _hoisted_6$c = {
|
|
5378
|
+
key: 2,
|
|
5379
|
+
class: "tao-segmented-option__sr"
|
|
5380
|
+
};
|
|
5381
|
+
const _hoisted_7$a = {
|
|
5382
|
+
key: 3,
|
|
5383
|
+
class: "tao-segmented-option__count"
|
|
5384
|
+
};
|
|
5385
|
+
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
5386
|
+
...{ name: "TaoSegmentedOption" },
|
|
5387
|
+
__name: "TaoSegmentedOption",
|
|
5388
|
+
props: {
|
|
5389
|
+
value: { type: [String, Number, Boolean] },
|
|
5390
|
+
modelValue: { type: [String, Number, Boolean] },
|
|
5391
|
+
name: {},
|
|
5392
|
+
label: { default: "" },
|
|
5393
|
+
icon: { default: "" },
|
|
5394
|
+
count: {},
|
|
5395
|
+
disabled: { type: Boolean, default: false },
|
|
5396
|
+
ariaLabel: {}
|
|
5397
|
+
},
|
|
5398
|
+
emits: ["update:modelValue", "change"],
|
|
5399
|
+
setup(__props, { emit: __emit }) {
|
|
5400
|
+
const props = __props;
|
|
5401
|
+
const emit = __emit;
|
|
5402
|
+
const group = vue.inject(segmentedKey, null);
|
|
5403
|
+
const slots = vue.useSlots();
|
|
5404
|
+
const localId = vue.useId();
|
|
5405
|
+
const isDisabled = vue.computed(() => props.disabled || Boolean(group == null ? void 0 : group.disabled.value));
|
|
5406
|
+
const inputName = vue.computed(() => (group == null ? void 0 : group.name.value) ?? props.name);
|
|
5407
|
+
const isChecked = vue.computed(() => {
|
|
5408
|
+
const current2 = group ? group.model.value : props.modelValue;
|
|
5409
|
+
return current2 === props.value;
|
|
5410
|
+
});
|
|
5411
|
+
const hasLabel = vue.computed(() => Boolean(props.label || slots.default));
|
|
5412
|
+
const isIconOnly = vue.computed(() => Boolean((props.icon || slots.icon) && !hasLabel.value));
|
|
5413
|
+
const countLabel = vue.computed(() => {
|
|
5414
|
+
if (props.count === void 0 || props.count === null || props.count === "") {
|
|
5415
|
+
return "";
|
|
5416
|
+
}
|
|
5417
|
+
if (typeof props.count === "number") {
|
|
5418
|
+
if (props.count > 99) {
|
|
5419
|
+
return "99+";
|
|
5420
|
+
}
|
|
5421
|
+
return String(props.count);
|
|
5422
|
+
}
|
|
5423
|
+
return String(props.count);
|
|
5424
|
+
});
|
|
5425
|
+
function onChange() {
|
|
5426
|
+
if (isDisabled.value) {
|
|
5427
|
+
return;
|
|
5428
|
+
}
|
|
5429
|
+
if (group) {
|
|
5430
|
+
group.setValue(props.value);
|
|
5431
|
+
return;
|
|
5432
|
+
}
|
|
5433
|
+
emit("update:modelValue", props.value);
|
|
5434
|
+
emit("change", props.value);
|
|
5435
|
+
}
|
|
5436
|
+
return (_ctx, _cache) => {
|
|
5437
|
+
return vue.openBlock(), vue.createElementBlock("label", {
|
|
5438
|
+
class: vue.normalizeClass(["tao-segmented-option", {
|
|
5439
|
+
"tao-segmented-option--checked": isChecked.value,
|
|
5440
|
+
"tao-segmented-option--disabled": props.disabled,
|
|
5441
|
+
"tao-segmented-option--icon-only": isIconOnly.value
|
|
5442
|
+
}]),
|
|
5443
|
+
for: vue.unref(localId)
|
|
5444
|
+
}, [
|
|
5445
|
+
vue.createElementVNode("input", {
|
|
5446
|
+
id: vue.unref(localId),
|
|
5447
|
+
class: "tao-segmented-option__input",
|
|
5448
|
+
type: "radio",
|
|
5449
|
+
name: inputName.value,
|
|
5450
|
+
value: String(__props.value),
|
|
5451
|
+
checked: isChecked.value,
|
|
5452
|
+
disabled: isDisabled.value,
|
|
5453
|
+
"aria-label": __props.ariaLabel,
|
|
5454
|
+
onChange
|
|
5455
|
+
}, null, 40, _hoisted_2$m),
|
|
5456
|
+
vue.createElementVNode("span", _hoisted_3$j, [
|
|
5457
|
+
__props.icon || _ctx.$slots.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$h, [
|
|
5458
|
+
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
5459
|
+
vue.createTextVNode(vue.toDisplayString(__props.icon), 1)
|
|
5460
|
+
], true)
|
|
5461
|
+
])) : vue.createCommentVNode("", true),
|
|
5462
|
+
hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$f, [
|
|
5463
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
5464
|
+
vue.createTextVNode(vue.toDisplayString(__props.label), 1)
|
|
5465
|
+
], true)
|
|
5466
|
+
])) : __props.ariaLabel ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$c, vue.toDisplayString(__props.ariaLabel), 1)) : vue.createCommentVNode("", true),
|
|
5467
|
+
countLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7$a, vue.toDisplayString(countLabel.value), 1)) : vue.createCommentVNode("", true)
|
|
5468
|
+
])
|
|
5469
|
+
], 10, _hoisted_1$o);
|
|
5470
|
+
};
|
|
5471
|
+
}
|
|
5472
|
+
});
|
|
5473
|
+
const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-fba7ca12"]]);
|
|
5474
|
+
const _hoisted_1$n = ["tabindex", "aria-label", "aria-valuetext", "aria-valuenow"];
|
|
5475
|
+
const _hoisted_2$l = { class: "tao-color-picker__strips" };
|
|
5476
|
+
const _hoisted_3$i = { class: "tao-color-picker__row" };
|
|
5477
|
+
const _hoisted_4$g = { class: "tao-color-picker__preview" };
|
|
5478
|
+
const _hoisted_5$e = {
|
|
5479
|
+
key: 1,
|
|
5480
|
+
class: "tao-color-picker__channels"
|
|
5481
|
+
};
|
|
5482
|
+
const _hoisted_6$b = ["disabled", "aria-label", "title"];
|
|
5483
|
+
const _hoisted_7$9 = ["aria-label"];
|
|
5484
|
+
const _hoisted_8$9 = ["disabled", "aria-label", "title", "onClick"];
|
|
5485
|
+
const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
5486
|
+
...{ name: "TaoColorPicker" },
|
|
5487
|
+
__name: "TaoColorPicker",
|
|
5488
|
+
props: {
|
|
5489
|
+
modelValue: {},
|
|
5490
|
+
alpha: { type: Boolean, default: false },
|
|
5491
|
+
swatches: {},
|
|
5492
|
+
modes: { default: () => ["hex", "rgb", "hsl"] },
|
|
5493
|
+
mode: {},
|
|
5494
|
+
eyedropper: { type: Boolean, default: true },
|
|
5495
|
+
disabled: { type: Boolean, default: false },
|
|
5496
|
+
size: {},
|
|
5497
|
+
areaLabel: {},
|
|
5498
|
+
hueLabel: {},
|
|
5499
|
+
alphaLabel: {},
|
|
5500
|
+
hexLabel: {},
|
|
5501
|
+
modeLabel: {},
|
|
5502
|
+
swatchesLabel: {},
|
|
5503
|
+
eyedropperLabel: {}
|
|
5504
|
+
},
|
|
5505
|
+
emits: ["update:modelValue", "update:mode", "change"],
|
|
5506
|
+
setup(__props, { emit: __emit }) {
|
|
5507
|
+
const props = __props;
|
|
5508
|
+
const emit = __emit;
|
|
5509
|
+
const l10n = useLocaleText(props, "colorPicker");
|
|
5510
|
+
const state = vue.reactive({ h: 0, s: 0, v: 0, a: 1 });
|
|
5511
|
+
const hex = vue.computed(() => toHex(hsvaToRgba(state), props.alpha));
|
|
5512
|
+
function load(value) {
|
|
5513
|
+
const c = parseColor(value);
|
|
5514
|
+
if (!c) return;
|
|
5515
|
+
const next = rgbaToHsva(c);
|
|
5516
|
+
state.h = next.s === 0 || next.v === 0 ? state.h : next.h;
|
|
5517
|
+
state.s = next.s;
|
|
5518
|
+
state.v = next.v;
|
|
5519
|
+
state.a = props.alpha ? next.a : 1;
|
|
5520
|
+
}
|
|
5521
|
+
load(props.modelValue);
|
|
5522
|
+
vue.watch(
|
|
5523
|
+
() => props.modelValue,
|
|
5524
|
+
(value) => {
|
|
5525
|
+
if (normalizeHex(value, props.alpha) !== hex.value) load(value);
|
|
5526
|
+
}
|
|
5527
|
+
);
|
|
5528
|
+
vue.watch(
|
|
5529
|
+
() => props.alpha,
|
|
5530
|
+
() => load(props.modelValue)
|
|
5531
|
+
);
|
|
5532
|
+
const currentMode = vue.ref(props.mode ?? props.modes[0] ?? "hex");
|
|
5533
|
+
vue.watch(
|
|
5534
|
+
() => props.mode,
|
|
5535
|
+
(m) => {
|
|
5536
|
+
if (m) currentMode.value = m;
|
|
5537
|
+
}
|
|
5538
|
+
);
|
|
5539
|
+
const activeMode = vue.computed(() => props.modes.includes(currentMode.value) ? currentMode.value : props.modes[0] ?? "hex");
|
|
5540
|
+
const modeValue = vue.computed({
|
|
5541
|
+
get: () => activeMode.value,
|
|
5542
|
+
set: (m) => {
|
|
5543
|
+
currentMode.value = m;
|
|
5544
|
+
emit("update:mode", m);
|
|
5545
|
+
}
|
|
5546
|
+
});
|
|
5547
|
+
const rgbFields = vue.computed(() => {
|
|
5548
|
+
const c = hsvaToRgba(state);
|
|
5549
|
+
return [Math.round(c.r), Math.round(c.g), Math.round(c.b)];
|
|
5550
|
+
});
|
|
5551
|
+
const hslFields = vue.computed(() => {
|
|
5552
|
+
const [r, g, b] = rgbFields.value;
|
|
5553
|
+
const { s, l } = rgbToHsl(r, g, b);
|
|
5554
|
+
return [Math.round(state.h) % 360, Math.round(s * 100), Math.round(l * 100)];
|
|
5555
|
+
});
|
|
5556
|
+
const alphaPercent = vue.computed(() => Math.round(state.a * 100));
|
|
5557
|
+
const channels = vue.computed(() => {
|
|
5558
|
+
const list = [];
|
|
5559
|
+
if (activeMode.value === "rgb") {
|
|
5560
|
+
["R", "G", "B"].forEach((label, index) => list.push({ key: label, label, max: 255, value: rgbFields.value[index], kind: "rgb", index }));
|
|
5561
|
+
} else if (activeMode.value === "hsl") {
|
|
5562
|
+
const max = [360, 100, 100];
|
|
5563
|
+
["H", "S", "L"].forEach((label, index) => list.push({ key: label, label, max: max[index], value: hslFields.value[index], kind: "hsl", index }));
|
|
5564
|
+
}
|
|
5565
|
+
if (activeMode.value !== "hex" && props.alpha) list.push({ key: "A", label: "A", max: 100, value: alphaPercent.value, kind: "alpha", index: 0 });
|
|
5566
|
+
return list;
|
|
5567
|
+
});
|
|
5568
|
+
function commitChannel(kind, index, value) {
|
|
5569
|
+
if (value === null || !Number.isFinite(value)) return;
|
|
5570
|
+
if (kind === "alpha") {
|
|
5571
|
+
state.a = Math.min(100, Math.max(0, value)) / 100;
|
|
5572
|
+
} else if (kind === "rgb") {
|
|
5573
|
+
const next = [...rgbFields.value];
|
|
5574
|
+
next[index] = Math.min(255, Math.max(0, Math.round(value)));
|
|
5575
|
+
load(toHex({ r: next[0], g: next[1], b: next[2], a: state.a }, true));
|
|
5576
|
+
} else {
|
|
5577
|
+
const next = [...hslFields.value];
|
|
5578
|
+
next[index] = value;
|
|
5579
|
+
const rgb = hslToRgb((next[0] % 360 + 360) % 360, next[1] / 100, next[2] / 100);
|
|
5580
|
+
load(toHex({ ...rgb, a: state.a }, true));
|
|
5581
|
+
state.h = (next[0] % 360 + 360) % 360;
|
|
5582
|
+
}
|
|
5583
|
+
push(true);
|
|
5584
|
+
}
|
|
5585
|
+
const hexText = vue.ref(hex.value);
|
|
5586
|
+
const hexInvalid = vue.ref(false);
|
|
5587
|
+
vue.watch(hex, (h) => {
|
|
5588
|
+
hexText.value = h;
|
|
5589
|
+
hexInvalid.value = false;
|
|
5590
|
+
});
|
|
5591
|
+
function push(final = false) {
|
|
5592
|
+
emit("update:modelValue", hex.value);
|
|
5593
|
+
if (final) emit("change", hex.value);
|
|
5594
|
+
}
|
|
5595
|
+
const areaRef = vue.ref(null);
|
|
5596
|
+
let dragging = -1;
|
|
5597
|
+
function fromPointer(e) {
|
|
5598
|
+
const el = areaRef.value;
|
|
5599
|
+
if (!el) return;
|
|
5600
|
+
const r = el.getBoundingClientRect();
|
|
5601
|
+
state.s = r.width ? Math.min(1, Math.max(0, (e.clientX - r.left) / r.width)) : 0;
|
|
5602
|
+
state.v = r.height ? 1 - Math.min(1, Math.max(0, (e.clientY - r.top) / r.height)) : 0;
|
|
5603
|
+
push();
|
|
5604
|
+
}
|
|
5605
|
+
function onAreaDown(e) {
|
|
5606
|
+
var _a, _b;
|
|
5607
|
+
if (props.disabled || e.button !== 0) return;
|
|
5608
|
+
dragging = e.pointerId;
|
|
5609
|
+
fromPointer(e);
|
|
5610
|
+
e.preventDefault();
|
|
5611
|
+
(_a = areaRef.value) == null ? void 0 : _a.focus({ preventScroll: true });
|
|
5612
|
+
try {
|
|
5613
|
+
(_b = areaRef.value) == null ? void 0 : _b.setPointerCapture(e.pointerId);
|
|
5614
|
+
} catch {
|
|
5615
|
+
}
|
|
5616
|
+
}
|
|
5617
|
+
function onAreaMove(e) {
|
|
5618
|
+
if (dragging === e.pointerId) fromPointer(e);
|
|
5619
|
+
}
|
|
5620
|
+
function onAreaUp(e) {
|
|
5621
|
+
if (dragging !== e.pointerId) return;
|
|
5622
|
+
dragging = -1;
|
|
5623
|
+
emit("change", hex.value);
|
|
5624
|
+
}
|
|
5625
|
+
function onAreaKey(e) {
|
|
5626
|
+
if (props.disabled) return;
|
|
5627
|
+
const k = e.shiftKey ? 0.1 : 0.01;
|
|
5628
|
+
const keys = { ArrowLeft: [-k, 0], ArrowRight: [k, 0], ArrowUp: [0, k], ArrowDown: [0, -k] };
|
|
5629
|
+
const d = keys[e.key];
|
|
5630
|
+
if (!d) return;
|
|
5631
|
+
e.preventDefault();
|
|
5632
|
+
state.s = Math.min(1, Math.max(0, Math.round((state.s + d[0]) * 1e3) / 1e3));
|
|
5633
|
+
state.v = Math.min(1, Math.max(0, Math.round((state.v + d[1]) * 1e3) / 1e3));
|
|
5634
|
+
push(true);
|
|
5635
|
+
}
|
|
5636
|
+
const hueValue = vue.computed({ get: () => state.h, set: (v) => (state.h = v, push()) });
|
|
5637
|
+
const alphaValue = vue.computed({ get: () => state.a, set: (v) => (state.a = v, push()) });
|
|
5638
|
+
const hueCss = vue.computed(() => toHex(hsvaToRgba({ h: state.h, s: 1, v: 1, a: 1 })));
|
|
5639
|
+
const solidCss = vue.computed(() => toHex(hsvaToRgba({ ...state, a: 1 })));
|
|
5640
|
+
function commitHex() {
|
|
5641
|
+
const next = normalizeHex(hexText.value, props.alpha);
|
|
5642
|
+
if (!next) {
|
|
5643
|
+
hexInvalid.value = true;
|
|
5644
|
+
return;
|
|
5645
|
+
}
|
|
5646
|
+
hexInvalid.value = false;
|
|
5647
|
+
load(next);
|
|
5648
|
+
hexText.value = hex.value;
|
|
5649
|
+
push(true);
|
|
5650
|
+
}
|
|
5651
|
+
function pick(color) {
|
|
5652
|
+
if (props.disabled) return;
|
|
5653
|
+
load(color);
|
|
5654
|
+
push(true);
|
|
5655
|
+
}
|
|
5656
|
+
const canEyedrop = vue.computed(() => props.eyedropper && typeof window !== "undefined" && "EyeDropper" in window);
|
|
5657
|
+
async function eyedrop() {
|
|
5658
|
+
try {
|
|
5659
|
+
const EyeDropperCtor = window.EyeDropper;
|
|
5660
|
+
const { sRGBHex } = await new EyeDropperCtor().open();
|
|
5661
|
+
pick(sRGBHex);
|
|
5662
|
+
} catch {
|
|
5663
|
+
}
|
|
5664
|
+
}
|
|
5665
|
+
const areaText = vue.computed(() => `${Math.round(state.s * 100)}%, ${Math.round(state.v * 100)}%`);
|
|
5666
|
+
return (_ctx, _cache) => {
|
|
5667
|
+
var _a;
|
|
5668
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
5669
|
+
class: vue.normalizeClass(["tao-color-picker", [vue.unref(sizeClass)(__props.size), { "tao-color-picker--disabled": __props.disabled }]])
|
|
5670
|
+
}, [
|
|
5671
|
+
vue.createElementVNode("div", {
|
|
5672
|
+
ref_key: "areaRef",
|
|
5673
|
+
ref: areaRef,
|
|
5674
|
+
class: "tao-color-picker__area",
|
|
5675
|
+
style: vue.normalizeStyle({ backgroundColor: hueCss.value }),
|
|
5676
|
+
role: "slider",
|
|
5677
|
+
tabindex: __props.disabled ? -1 : 0,
|
|
5678
|
+
"aria-label": vue.unref(l10n).areaLabel,
|
|
5679
|
+
"aria-valuetext": areaText.value,
|
|
5680
|
+
"aria-valuenow": Math.round(state.s * 100),
|
|
5681
|
+
"aria-valuemin": "0",
|
|
5682
|
+
"aria-valuemax": "100",
|
|
5683
|
+
onPointerdown: onAreaDown,
|
|
5684
|
+
onPointermove: onAreaMove,
|
|
5685
|
+
onPointerup: onAreaUp,
|
|
5686
|
+
onPointercancel: onAreaUp,
|
|
5687
|
+
onKeydown: onAreaKey
|
|
5688
|
+
}, [
|
|
5689
|
+
vue.createElementVNode("span", {
|
|
5690
|
+
class: "tao-color-picker__cursor",
|
|
5691
|
+
style: vue.normalizeStyle({ left: `${state.s * 100}%`, top: `${(1 - state.v) * 100}%`, backgroundColor: solidCss.value })
|
|
5692
|
+
}, null, 4)
|
|
5693
|
+
], 44, _hoisted_1$n),
|
|
5694
|
+
vue.createElementVNode("div", _hoisted_2$l, [
|
|
5695
|
+
vue.createVNode(_sfc_main$U, {
|
|
5696
|
+
modelValue: hueValue.value,
|
|
5697
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => hueValue.value = $event),
|
|
5698
|
+
class: "tao-color-picker__hue",
|
|
5699
|
+
variant: "thin",
|
|
5700
|
+
min: 0,
|
|
5701
|
+
max: 360,
|
|
5702
|
+
step: 1,
|
|
5703
|
+
disabled: __props.disabled,
|
|
5704
|
+
"aria-label": vue.unref(l10n).hueLabel,
|
|
5705
|
+
onChange: _cache[1] || (_cache[1] = ($event) => emit("change", hex.value))
|
|
5706
|
+
}, null, 8, ["modelValue", "disabled", "aria-label"]),
|
|
5707
|
+
__props.alpha ? (vue.openBlock(), vue.createBlock(_sfc_main$U, {
|
|
5708
|
+
key: 0,
|
|
5709
|
+
modelValue: alphaValue.value,
|
|
5710
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => alphaValue.value = $event),
|
|
5711
|
+
class: "tao-color-picker__alpha",
|
|
5712
|
+
variant: "thin",
|
|
5713
|
+
min: 0,
|
|
5714
|
+
max: 1,
|
|
5715
|
+
step: 0.01,
|
|
5716
|
+
disabled: __props.disabled,
|
|
5717
|
+
"aria-label": vue.unref(l10n).alphaLabel,
|
|
5718
|
+
style: vue.normalizeStyle({ "--tao-color-picker-solid": solidCss.value }),
|
|
5719
|
+
onChange: _cache[3] || (_cache[3] = ($event) => emit("change", hex.value))
|
|
5720
|
+
}, null, 8, ["modelValue", "disabled", "aria-label", "style"])) : vue.createCommentVNode("", true)
|
|
5721
|
+
]),
|
|
5722
|
+
__props.modes.length > 1 ? (vue.openBlock(), vue.createBlock(TaoSegmented, {
|
|
5723
|
+
key: 0,
|
|
5724
|
+
modelValue: modeValue.value,
|
|
5725
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => modeValue.value = $event),
|
|
5726
|
+
class: "tao-color-picker__modes",
|
|
5727
|
+
size: "small",
|
|
5728
|
+
"aria-label": vue.unref(l10n).modeLabel,
|
|
5729
|
+
disabled: __props.disabled
|
|
5730
|
+
}, {
|
|
5731
|
+
default: vue.withCtx(() => [
|
|
5732
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.modes, (m) => {
|
|
5733
|
+
return vue.openBlock(), vue.createBlock(TaoSegmentedOption, {
|
|
5734
|
+
key: m,
|
|
5735
|
+
value: m,
|
|
5736
|
+
label: m.toUpperCase()
|
|
5737
|
+
}, null, 8, ["value", "label"]);
|
|
5738
|
+
}), 128))
|
|
5739
|
+
]),
|
|
5740
|
+
_: 1
|
|
5741
|
+
}, 8, ["modelValue", "aria-label", "disabled"])) : vue.createCommentVNode("", true),
|
|
5742
|
+
vue.createElementVNode("div", _hoisted_3$i, [
|
|
5743
|
+
vue.createElementVNode("span", _hoisted_4$g, [
|
|
5744
|
+
vue.createElementVNode("span", {
|
|
5745
|
+
style: vue.normalizeStyle({ backgroundColor: hex.value })
|
|
5746
|
+
}, null, 4)
|
|
5747
|
+
]),
|
|
5748
|
+
activeMode.value === "hex" ? (vue.openBlock(), vue.createBlock(TaoInput, {
|
|
5749
|
+
key: 0,
|
|
5750
|
+
modelValue: hexText.value,
|
|
5751
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => hexText.value = $event),
|
|
5752
|
+
class: "tao-color-picker__hex",
|
|
5753
|
+
size: "small",
|
|
5754
|
+
error: hexInvalid.value,
|
|
5755
|
+
disabled: __props.disabled,
|
|
5756
|
+
"aria-label": vue.unref(l10n).hexLabel,
|
|
5757
|
+
onBlur: commitHex,
|
|
5758
|
+
onKeydown: vue.withKeys(commitHex, ["enter"])
|
|
5759
|
+
}, null, 8, ["modelValue", "error", "disabled", "aria-label"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$e, [
|
|
5760
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(channels.value, (c) => {
|
|
5761
|
+
return vue.openBlock(), vue.createElementBlock("label", {
|
|
5762
|
+
key: c.key,
|
|
5763
|
+
class: "tao-color-picker__channel"
|
|
5764
|
+
}, [
|
|
5765
|
+
vue.createElementVNode("span", null, vue.toDisplayString(c.label), 1),
|
|
5766
|
+
vue.createVNode(TaoInputNumber, {
|
|
5767
|
+
size: "small",
|
|
5768
|
+
controls: false,
|
|
5769
|
+
min: 0,
|
|
5770
|
+
max: c.max,
|
|
5771
|
+
step: 1,
|
|
5772
|
+
"model-value": c.value,
|
|
5773
|
+
disabled: __props.disabled,
|
|
5774
|
+
onCommit: (v) => commitChannel(c.kind, c.index, v)
|
|
5775
|
+
}, null, 8, ["max", "model-value", "disabled", "onCommit"])
|
|
5776
|
+
]);
|
|
5777
|
+
}), 128))
|
|
5778
|
+
])),
|
|
5779
|
+
canEyedrop.value ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
5780
|
+
key: 2,
|
|
5781
|
+
type: "button",
|
|
5782
|
+
class: "tao-color-picker__eyedropper",
|
|
5783
|
+
disabled: __props.disabled,
|
|
5784
|
+
"aria-label": vue.unref(l10n).eyedropperLabel,
|
|
5785
|
+
title: vue.unref(l10n).eyedropperLabel,
|
|
5786
|
+
onClick: eyedrop
|
|
5787
|
+
}, " ✎ ", 8, _hoisted_6$b)) : vue.createCommentVNode("", true)
|
|
5788
|
+
]),
|
|
5789
|
+
((_a = __props.swatches) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
5790
|
+
key: 1,
|
|
5791
|
+
class: "tao-color-picker__swatches",
|
|
5792
|
+
role: "group",
|
|
5793
|
+
"aria-label": vue.unref(l10n).swatchesLabel
|
|
5794
|
+
}, [
|
|
5795
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.swatches, (s) => {
|
|
5796
|
+
return vue.openBlock(), vue.createElementBlock("button", {
|
|
5797
|
+
key: s,
|
|
5798
|
+
type: "button",
|
|
5799
|
+
class: vue.normalizeClass(["tao-color-picker__swatch", { "tao-color-picker__swatch--on": vue.unref(normalizeHex)(s, __props.alpha) === hex.value }]),
|
|
5800
|
+
style: vue.normalizeStyle({ backgroundColor: s }),
|
|
5801
|
+
disabled: __props.disabled,
|
|
5802
|
+
"aria-label": s,
|
|
5803
|
+
title: s,
|
|
5804
|
+
onClick: ($event) => pick(s)
|
|
5805
|
+
}, null, 14, _hoisted_8$9);
|
|
5806
|
+
}), 128))
|
|
5807
|
+
], 8, _hoisted_7$9)) : vue.createCommentVNode("", true)
|
|
5808
|
+
], 2);
|
|
5809
|
+
};
|
|
5810
|
+
}
|
|
5811
|
+
});
|
|
5812
|
+
const TaoColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-9fe54966"]]);
|
|
5813
|
+
const _hoisted_1$m = ["disabled", "aria-label", "aria-expanded"];
|
|
5814
|
+
const _hoisted_2$k = { class: "tao-color-input__swatch" };
|
|
5815
|
+
const _hoisted_3$h = { class: "tao-color-input__text" };
|
|
5816
|
+
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
5817
|
+
...{ name: "TaoColorInput" },
|
|
5818
|
+
__name: "TaoColorInput",
|
|
5819
|
+
props: {
|
|
5820
|
+
modelValue: {},
|
|
5821
|
+
alpha: { type: Boolean, default: false },
|
|
5822
|
+
swatches: {},
|
|
5823
|
+
modes: { default: () => ["hex", "rgb", "hsl"] },
|
|
5824
|
+
mode: {},
|
|
5825
|
+
eyedropper: { type: Boolean, default: true },
|
|
5826
|
+
disabled: { type: Boolean, default: false },
|
|
5827
|
+
error: { type: Boolean, default: false },
|
|
5828
|
+
position: { default: "bottom" },
|
|
5829
|
+
size: {},
|
|
5830
|
+
chooseLabel: {}
|
|
5831
|
+
},
|
|
5832
|
+
emits: ["update:modelValue", "update:mode", "change"],
|
|
5833
|
+
setup(__props, { emit: __emit }) {
|
|
5834
|
+
const props = __props;
|
|
5835
|
+
const emit = __emit;
|
|
5836
|
+
const l10n = useLocaleText(props, "colorPicker");
|
|
5837
|
+
const shown = vue.computed(() => normalizeHex(props.modelValue, props.alpha) ?? props.modelValue);
|
|
5838
|
+
return (_ctx, _cache) => {
|
|
5839
|
+
return vue.openBlock(), vue.createBlock(TaoPopover, {
|
|
5840
|
+
position: __props.position,
|
|
5841
|
+
disabled: __props.disabled,
|
|
5842
|
+
class: "tao-color-input-root"
|
|
5843
|
+
}, {
|
|
5844
|
+
trigger: vue.withCtx(({ open }) => [
|
|
5845
|
+
vue.createElementVNode("button", {
|
|
5846
|
+
type: "button",
|
|
5847
|
+
class: vue.normalizeClass(["tao-color-input", [vue.unref(sizeClass)(__props.size), { "tao-color-input--open": open, "tao-color-input--invalid": __props.error }]]),
|
|
5848
|
+
disabled: __props.disabled,
|
|
5849
|
+
"aria-label": `${vue.unref(l10n).chooseLabel}: ${shown.value}`,
|
|
5850
|
+
"aria-haspopup": "dialog",
|
|
5851
|
+
"aria-expanded": open
|
|
5852
|
+
}, [
|
|
5853
|
+
vue.createElementVNode("span", _hoisted_2$k, [
|
|
5854
|
+
vue.createElementVNode("span", {
|
|
5855
|
+
style: vue.normalizeStyle({ backgroundColor: shown.value })
|
|
5856
|
+
}, null, 4)
|
|
5857
|
+
]),
|
|
5858
|
+
vue.createElementVNode("span", _hoisted_3$h, vue.toDisplayString(shown.value), 1)
|
|
5859
|
+
], 10, _hoisted_1$m)
|
|
5860
|
+
]),
|
|
5861
|
+
default: vue.withCtx(() => [
|
|
5862
|
+
vue.createVNode(TaoColorPicker, {
|
|
5863
|
+
"model-value": __props.modelValue,
|
|
5864
|
+
alpha: __props.alpha,
|
|
5865
|
+
swatches: __props.swatches,
|
|
5866
|
+
modes: __props.modes,
|
|
5867
|
+
mode: __props.mode,
|
|
5868
|
+
eyedropper: __props.eyedropper,
|
|
5869
|
+
size: __props.size,
|
|
5870
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event)),
|
|
5871
|
+
"onUpdate:mode": _cache[1] || (_cache[1] = ($event) => emit("update:mode", $event)),
|
|
5872
|
+
onChange: _cache[2] || (_cache[2] = ($event) => emit("change", $event))
|
|
5873
|
+
}, null, 8, ["model-value", "alpha", "swatches", "modes", "mode", "eyedropper", "size"])
|
|
5874
|
+
]),
|
|
5875
|
+
_: 1
|
|
5876
|
+
}, 8, ["position", "disabled"]);
|
|
5877
|
+
};
|
|
5878
|
+
}
|
|
5879
|
+
});
|
|
5880
|
+
const TaoColorInput = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-cc186067"]]);
|
|
5881
|
+
const _hoisted_1$l = ["id", "aria-expanded", "aria-activedescendant", "aria-invalid", "aria-describedby", "disabled", "placeholder", "value"];
|
|
5882
|
+
const _hoisted_2$j = {
|
|
5883
|
+
key: 0,
|
|
5884
|
+
class: "tao-combobox__empty"
|
|
5885
|
+
};
|
|
5886
|
+
const _hoisted_3$g = ["id", "aria-selected", "aria-disabled", "data-tao-combobox-index", "onClick", "onMouseenter"];
|
|
5887
|
+
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
5888
|
+
...{ name: "TaoCombobox" },
|
|
5889
|
+
__name: "TaoCombobox",
|
|
5890
|
+
props: {
|
|
5891
|
+
modelValue: { default: null },
|
|
5892
|
+
options: { default: () => [] },
|
|
5893
|
+
placeholder: {},
|
|
5894
|
+
disabled: { type: Boolean, default: false },
|
|
5895
|
+
error: { type: Boolean, default: false },
|
|
5896
|
+
emptyText: {},
|
|
5897
|
+
clearText: {},
|
|
5898
|
+
clearable: { type: Boolean, default: true },
|
|
5899
|
+
size: {},
|
|
5900
|
+
allowCreate: { type: Boolean, default: false }
|
|
5901
|
+
},
|
|
5902
|
+
emits: ["update:modelValue", "change", "create"],
|
|
5903
|
+
setup(__props, { emit: __emit }) {
|
|
5904
|
+
const props = __props;
|
|
5905
|
+
const l10n = useLocaleText(props, "combobox");
|
|
5906
|
+
const emit = __emit;
|
|
5907
|
+
const field = vue.inject(formFieldKey, null);
|
|
5908
|
+
const localId = vue.useId();
|
|
5909
|
+
const listId = `${localId}-list`;
|
|
5910
|
+
const controlId = vue.computed(() => (field == null ? void 0 : field.id) ?? localId);
|
|
5911
|
+
const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
|
|
5912
|
+
const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
|
|
5913
|
+
const open = vue.ref(false);
|
|
5914
|
+
const focused = vue.ref(false);
|
|
5915
|
+
const picking = vue.ref(false);
|
|
5916
|
+
const skipFocusOpen = vue.ref(false);
|
|
5917
|
+
const query = vue.ref("");
|
|
5918
|
+
const activeIndex = vue.ref(-1);
|
|
5919
|
+
const fieldRef = vue.ref(null);
|
|
5920
|
+
const inputRef = vue.ref(null);
|
|
5921
|
+
const panelRef = vue.ref(null);
|
|
5922
|
+
const panelSize = vue.ref("medium");
|
|
5923
|
+
const listRef = vue.ref(null);
|
|
5924
|
+
const listStyle = vue.ref({ top: "0px", left: "0px", width: "0px" });
|
|
5925
|
+
const selected = vue.computed(() => {
|
|
5926
|
+
const found = props.options.find((option) => option.value === props.modelValue);
|
|
5927
|
+
if (found) {
|
|
5928
|
+
return found;
|
|
5929
|
+
}
|
|
5930
|
+
if (props.modelValue === null || props.modelValue === void 0 || props.modelValue === "") {
|
|
5931
|
+
return null;
|
|
5932
|
+
}
|
|
5933
|
+
return { value: props.modelValue, label: String(props.modelValue) };
|
|
5934
|
+
});
|
|
5935
|
+
const needle = vue.computed(() => query.value.trim().toLowerCase());
|
|
5936
|
+
const filtered = vue.computed(() => {
|
|
5937
|
+
if (!needle.value) {
|
|
5938
|
+
return props.options;
|
|
5939
|
+
}
|
|
5940
|
+
return props.options.filter((option) => option.label.toLowerCase().includes(needle.value));
|
|
5941
|
+
});
|
|
5942
|
+
const canCreate = vue.computed(() => {
|
|
5943
|
+
const text = query.value.trim();
|
|
5944
|
+
if (!props.allowCreate || !text) {
|
|
5945
|
+
return false;
|
|
5946
|
+
}
|
|
5947
|
+
return !props.options.some((option) => option.label.toLowerCase() === text.toLowerCase());
|
|
5948
|
+
});
|
|
5949
|
+
const rows = vue.computed(() => {
|
|
5950
|
+
const next = filtered.value.map((option) => ({ kind: "option", option }));
|
|
5951
|
+
if (canCreate.value) {
|
|
5952
|
+
next.push({ kind: "create", text: query.value.trim() });
|
|
5953
|
+
}
|
|
5954
|
+
return next;
|
|
5955
|
+
});
|
|
5956
|
+
const enabledIndexes = vue.computed(
|
|
5957
|
+
() => rows.value.map((row, index) => row.kind === "option" && row.option.disabled ? -1 : index).filter((index) => index >= 0)
|
|
5958
|
+
);
|
|
5959
|
+
const activeId = vue.computed(() => activeIndex.value >= 0 ? `${listId}-row-${activeIndex.value}` : void 0);
|
|
5960
|
+
function syncQueryFromModel() {
|
|
5961
|
+
var _a;
|
|
5962
|
+
query.value = ((_a = selected.value) == null ? void 0 : _a.label) ?? "";
|
|
5963
|
+
}
|
|
5191
5964
|
function updatePosition() {
|
|
5192
5965
|
const trigger = fieldRef.value;
|
|
5193
5966
|
const panel = panelRef.value;
|
|
@@ -5540,7 +6313,7 @@
|
|
|
5540
6313
|
onFocus,
|
|
5541
6314
|
onBlur,
|
|
5542
6315
|
onKeydown: onInputKeydown
|
|
5543
|
-
}, null, 40, _hoisted_1$
|
|
6316
|
+
}, null, 40, _hoisted_1$l),
|
|
5544
6317
|
vue.createElementVNode("span", {
|
|
5545
6318
|
class: vue.normalizeClass(["tao-combobox__chevron", { "tao-combobox__chevron--custom": _ctx.$slots.chevron }]),
|
|
5546
6319
|
"aria-hidden": "true"
|
|
@@ -5563,7 +6336,7 @@
|
|
|
5563
6336
|
class: "tao-combobox__list",
|
|
5564
6337
|
role: "listbox"
|
|
5565
6338
|
}, [
|
|
5566
|
-
!rows.value.length ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_2$
|
|
6339
|
+
!rows.value.length ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_2$j, [
|
|
5567
6340
|
vue.renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
5568
6341
|
vue.createTextVNode(vue.toDisplayString(vue.unref(l10n).emptyText), 1)
|
|
5569
6342
|
], true)
|
|
@@ -5593,7 +6366,7 @@
|
|
|
5593
6366
|
], true, 0) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
5594
6367
|
vue.createTextVNode(vue.toDisplayString(row.option.label), 1)
|
|
5595
6368
|
], 64))
|
|
5596
|
-
], 42, _hoisted_3$
|
|
6369
|
+
], 42, _hoisted_3$g);
|
|
5597
6370
|
}), 128))
|
|
5598
6371
|
], 512),
|
|
5599
6372
|
__props.clearable && selected.value ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
@@ -5613,7 +6386,7 @@
|
|
|
5613
6386
|
};
|
|
5614
6387
|
}
|
|
5615
6388
|
});
|
|
5616
|
-
const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6389
|
+
const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-e75a5550"]]);
|
|
5617
6390
|
const ISO_DATE = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
5618
6391
|
function formatTaoDateIso(parts) {
|
|
5619
6392
|
return `${String(parts.y).padStart(4, "0")}-${String(parts.m).padStart(2, "0")}-${String(parts.d).padStart(2, "0")}`;
|
|
@@ -5756,16 +6529,16 @@
|
|
|
5756
6529
|
};
|
|
5757
6530
|
});
|
|
5758
6531
|
}
|
|
5759
|
-
const _hoisted_1$
|
|
5760
|
-
const _hoisted_2$
|
|
5761
|
-
const _hoisted_3$
|
|
6532
|
+
const _hoisted_1$k = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
|
|
6533
|
+
const _hoisted_2$i = { class: "tao-date__value" };
|
|
6534
|
+
const _hoisted_3$f = {
|
|
5762
6535
|
class: "tao-date__icon",
|
|
5763
6536
|
"aria-hidden": "true"
|
|
5764
6537
|
};
|
|
5765
|
-
const _hoisted_4$
|
|
5766
|
-
const _hoisted_5$
|
|
5767
|
-
const _hoisted_6$
|
|
5768
|
-
const _hoisted_7$
|
|
6538
|
+
const _hoisted_4$f = ["aria-label"];
|
|
6539
|
+
const _hoisted_5$d = { class: "tao-date__header" };
|
|
6540
|
+
const _hoisted_6$a = ["aria-label"];
|
|
6541
|
+
const _hoisted_7$8 = { "aria-hidden": "true" };
|
|
5769
6542
|
const _hoisted_8$8 = { class: "tao-date__month" };
|
|
5770
6543
|
const _hoisted_9$3 = ["aria-label"];
|
|
5771
6544
|
const _hoisted_10$3 = { "aria-hidden": "true" };
|
|
@@ -5780,7 +6553,7 @@
|
|
|
5780
6553
|
const _hoisted_13$1 = ["aria-label", "aria-selected", "disabled", "onClick"];
|
|
5781
6554
|
const _hoisted_14$1 = { class: "tao-date__footer" };
|
|
5782
6555
|
const _hoisted_15 = ["disabled"];
|
|
5783
|
-
const _sfc_main$
|
|
6556
|
+
const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
5784
6557
|
...{ name: "TaoDate" },
|
|
5785
6558
|
__name: "TaoDate",
|
|
5786
6559
|
props: {
|
|
@@ -6012,8 +6785,8 @@
|
|
|
6012
6785
|
onClick: toggle,
|
|
6013
6786
|
onKeydown: onTriggerKeydown
|
|
6014
6787
|
}, [
|
|
6015
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
6016
|
-
vue.createElementVNode("span", _hoisted_3$
|
|
6788
|
+
vue.createElementVNode("span", _hoisted_2$i, vue.toDisplayString(displayLabel.value || vue.unref(l10n).placeholder), 1),
|
|
6789
|
+
vue.createElementVNode("span", _hoisted_3$f, [
|
|
6017
6790
|
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
6018
6791
|
_cache[4] || (_cache[4] = vue.createElementVNode("svg", {
|
|
6019
6792
|
viewBox: "0 0 16 16",
|
|
@@ -6041,7 +6814,7 @@
|
|
|
6041
6814
|
], -1))
|
|
6042
6815
|
], true)
|
|
6043
6816
|
])
|
|
6044
|
-
], 42, _hoisted_1$
|
|
6817
|
+
], 42, _hoisted_1$k),
|
|
6045
6818
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
6046
6819
|
open.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
6047
6820
|
key: 0,
|
|
@@ -6055,14 +6828,14 @@
|
|
|
6055
6828
|
style: vue.normalizeStyle(panelStyle.value),
|
|
6056
6829
|
onKeydown: onPanelKeydown
|
|
6057
6830
|
}, [
|
|
6058
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
6831
|
+
vue.createElementVNode("div", _hoisted_5$d, [
|
|
6059
6832
|
vue.createElementVNode("button", {
|
|
6060
6833
|
type: "button",
|
|
6061
6834
|
class: "tao-date__nav",
|
|
6062
6835
|
"aria-label": vue.unref(l10n).prevMonthLabel,
|
|
6063
6836
|
onClick: _cache[0] || (_cache[0] = ($event) => goMonth(-1))
|
|
6064
6837
|
}, [
|
|
6065
|
-
vue.createElementVNode("span", _hoisted_7$
|
|
6838
|
+
vue.createElementVNode("span", _hoisted_7$8, [
|
|
6066
6839
|
vue.renderSlot(_ctx.$slots, "prev-icon", {}, () => [
|
|
6067
6840
|
_cache[5] || (_cache[5] = vue.createElementVNode("svg", {
|
|
6068
6841
|
viewBox: "0 0 24 24",
|
|
@@ -6081,7 +6854,7 @@
|
|
|
6081
6854
|
], -1))
|
|
6082
6855
|
], true)
|
|
6083
6856
|
])
|
|
6084
|
-
], 8, _hoisted_6$
|
|
6857
|
+
], 8, _hoisted_6$a),
|
|
6085
6858
|
vue.createElementVNode("p", _hoisted_8$8, vue.toDisplayString(monthLabel.value), 1),
|
|
6086
6859
|
vue.createElementVNode("button", {
|
|
6087
6860
|
type: "button",
|
|
@@ -6159,23 +6932,23 @@
|
|
|
6159
6932
|
], true)
|
|
6160
6933
|
])) : vue.createCommentVNode("", true)
|
|
6161
6934
|
])
|
|
6162
|
-
], 44, _hoisted_4$
|
|
6935
|
+
], 44, _hoisted_4$f)) : vue.createCommentVNode("", true)
|
|
6163
6936
|
]))
|
|
6164
6937
|
], 2);
|
|
6165
6938
|
};
|
|
6166
6939
|
}
|
|
6167
6940
|
});
|
|
6168
|
-
const TaoDate = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6169
|
-
const _hoisted_1$
|
|
6170
|
-
const _hoisted_2$
|
|
6171
|
-
const _hoisted_3$
|
|
6941
|
+
const TaoDate = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-97f71e11"]]);
|
|
6942
|
+
const _hoisted_1$j = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
|
|
6943
|
+
const _hoisted_2$h = { class: "tao-date-range__value" };
|
|
6944
|
+
const _hoisted_3$e = {
|
|
6172
6945
|
class: "tao-date-range__icon",
|
|
6173
6946
|
"aria-hidden": "true"
|
|
6174
6947
|
};
|
|
6175
|
-
const _hoisted_4$
|
|
6176
|
-
const _hoisted_5$
|
|
6177
|
-
const _hoisted_6$
|
|
6178
|
-
const _hoisted_7$
|
|
6948
|
+
const _hoisted_4$e = ["aria-label"];
|
|
6949
|
+
const _hoisted_5$c = { class: "tao-date__header" };
|
|
6950
|
+
const _hoisted_6$9 = ["aria-label"];
|
|
6951
|
+
const _hoisted_7$7 = { "aria-hidden": "true" };
|
|
6179
6952
|
const _hoisted_8$7 = { class: "tao-date__month" };
|
|
6180
6953
|
const _hoisted_9$2 = ["aria-label"];
|
|
6181
6954
|
const _hoisted_10$2 = { "aria-hidden": "true" };
|
|
@@ -6186,7 +6959,7 @@
|
|
|
6186
6959
|
const _hoisted_12 = ["aria-label", "aria-selected", "disabled", "onMouseenter", "onClick"];
|
|
6187
6960
|
const _hoisted_13 = { class: "tao-date__footer" };
|
|
6188
6961
|
const _hoisted_14 = ["disabled"];
|
|
6189
|
-
const _sfc_main$
|
|
6962
|
+
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
6190
6963
|
...{ name: "TaoDateRange" },
|
|
6191
6964
|
__name: "TaoDateRange",
|
|
6192
6965
|
props: {
|
|
@@ -6472,8 +7245,8 @@
|
|
|
6472
7245
|
onClick: toggle,
|
|
6473
7246
|
onKeydown: onTriggerKeydown
|
|
6474
7247
|
}, [
|
|
6475
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
6476
|
-
vue.createElementVNode("span", _hoisted_3$
|
|
7248
|
+
vue.createElementVNode("span", _hoisted_2$h, vue.toDisplayString(displayLabel.value || vue.unref(l10n).placeholder), 1),
|
|
7249
|
+
vue.createElementVNode("span", _hoisted_3$e, [
|
|
6477
7250
|
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
6478
7251
|
_cache[3] || (_cache[3] = vue.createElementVNode("svg", {
|
|
6479
7252
|
viewBox: "0 0 16 16",
|
|
@@ -6501,7 +7274,7 @@
|
|
|
6501
7274
|
], -1))
|
|
6502
7275
|
], true)
|
|
6503
7276
|
])
|
|
6504
|
-
], 42, _hoisted_1$
|
|
7277
|
+
], 42, _hoisted_1$j),
|
|
6505
7278
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
6506
7279
|
open.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
6507
7280
|
key: 0,
|
|
@@ -6515,14 +7288,14 @@
|
|
|
6515
7288
|
style: vue.normalizeStyle(panelStyle.value),
|
|
6516
7289
|
onKeydown: onPanelKeydown
|
|
6517
7290
|
}, [
|
|
6518
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
7291
|
+
vue.createElementVNode("div", _hoisted_5$c, [
|
|
6519
7292
|
vue.createElementVNode("button", {
|
|
6520
7293
|
type: "button",
|
|
6521
7294
|
class: "tao-date__nav",
|
|
6522
7295
|
"aria-label": vue.unref(l10n).prevMonthLabel,
|
|
6523
7296
|
onClick: _cache[0] || (_cache[0] = ($event) => goMonth(-1))
|
|
6524
7297
|
}, [
|
|
6525
|
-
vue.createElementVNode("span", _hoisted_7$
|
|
7298
|
+
vue.createElementVNode("span", _hoisted_7$7, [
|
|
6526
7299
|
vue.renderSlot(_ctx.$slots, "prev-icon", {}, () => [
|
|
6527
7300
|
_cache[4] || (_cache[4] = vue.createElementVNode("svg", {
|
|
6528
7301
|
viewBox: "0 0 24 24",
|
|
@@ -6541,7 +7314,7 @@
|
|
|
6541
7314
|
], -1))
|
|
6542
7315
|
], true)
|
|
6543
7316
|
])
|
|
6544
|
-
], 8, _hoisted_6$
|
|
7317
|
+
], 8, _hoisted_6$9),
|
|
6545
7318
|
vue.createElementVNode("p", _hoisted_8$7, vue.toDisplayString(monthLabel.value), 1),
|
|
6546
7319
|
vue.createElementVNode("button", {
|
|
6547
7320
|
type: "button",
|
|
@@ -6628,24 +7401,24 @@
|
|
|
6628
7401
|
], true)
|
|
6629
7402
|
])) : vue.createCommentVNode("", true)
|
|
6630
7403
|
])
|
|
6631
|
-
], 44, _hoisted_4$
|
|
7404
|
+
], 44, _hoisted_4$e)) : vue.createCommentVNode("", true)
|
|
6632
7405
|
]))
|
|
6633
7406
|
], 2);
|
|
6634
7407
|
};
|
|
6635
7408
|
}
|
|
6636
7409
|
});
|
|
6637
|
-
const TaoDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6638
|
-
const _hoisted_1$
|
|
6639
|
-
const _hoisted_2$
|
|
6640
|
-
const _hoisted_3$
|
|
7410
|
+
const TaoDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-da3794c7"]]);
|
|
7411
|
+
const _hoisted_1$i = ["for"];
|
|
7412
|
+
const _hoisted_2$g = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
|
|
7413
|
+
const _hoisted_3$d = {
|
|
6641
7414
|
key: 0,
|
|
6642
7415
|
class: "tao-switch__label"
|
|
6643
7416
|
};
|
|
6644
|
-
const _hoisted_4$
|
|
7417
|
+
const _hoisted_4$d = {
|
|
6645
7418
|
key: 1,
|
|
6646
7419
|
class: "tao-switch__label"
|
|
6647
7420
|
};
|
|
6648
|
-
const _sfc_main$
|
|
7421
|
+
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
6649
7422
|
...{ name: "TaoSwitch" },
|
|
6650
7423
|
__name: "TaoSwitch",
|
|
6651
7424
|
props: {
|
|
@@ -6688,33 +7461,33 @@
|
|
|
6688
7461
|
"aria-invalid": invalid.value || void 0,
|
|
6689
7462
|
"aria-describedby": describedBy.value,
|
|
6690
7463
|
onChange: toggle
|
|
6691
|
-
}, null, 40, _hoisted_2$
|
|
7464
|
+
}, null, 40, _hoisted_2$g),
|
|
6692
7465
|
_cache[0] || (_cache[0] = vue.createElementVNode("span", {
|
|
6693
7466
|
class: "tao-switch__track",
|
|
6694
7467
|
"aria-hidden": "true"
|
|
6695
7468
|
}, [
|
|
6696
7469
|
vue.createElementVNode("span", { class: "tao-switch__thumb" })
|
|
6697
7470
|
], -1)),
|
|
6698
|
-
__props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
7471
|
+
__props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$d, vue.toDisplayString(__props.label), 1)) : _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$d, [
|
|
6699
7472
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
6700
7473
|
])) : vue.createCommentVNode("", true)
|
|
6701
|
-
], 10, _hoisted_1$
|
|
7474
|
+
], 10, _hoisted_1$i);
|
|
6702
7475
|
};
|
|
6703
7476
|
}
|
|
6704
7477
|
});
|
|
6705
|
-
const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7478
|
+
const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-28965b34"]]);
|
|
6706
7479
|
const radioGroupKey = Symbol("taoRadioGroup");
|
|
6707
|
-
const _hoisted_1$
|
|
6708
|
-
const _hoisted_2$
|
|
6709
|
-
const _hoisted_3$
|
|
7480
|
+
const _hoisted_1$h = ["for"];
|
|
7481
|
+
const _hoisted_2$f = ["id", "name", "value", "checked", "disabled", "aria-invalid", "aria-describedby"];
|
|
7482
|
+
const _hoisted_3$c = {
|
|
6710
7483
|
key: 0,
|
|
6711
7484
|
class: "tao-radio__label"
|
|
6712
7485
|
};
|
|
6713
|
-
const _hoisted_4$
|
|
7486
|
+
const _hoisted_4$c = {
|
|
6714
7487
|
key: 1,
|
|
6715
7488
|
class: "tao-radio__label"
|
|
6716
7489
|
};
|
|
6717
|
-
const _sfc_main$
|
|
7490
|
+
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
6718
7491
|
...{ name: "TaoRadio" },
|
|
6719
7492
|
__name: "TaoRadio",
|
|
6720
7493
|
props: {
|
|
@@ -6769,25 +7542,25 @@
|
|
|
6769
7542
|
"aria-invalid": !vue.unref(group) && invalid.value || void 0,
|
|
6770
7543
|
"aria-describedby": describedBy.value,
|
|
6771
7544
|
onChange
|
|
6772
|
-
}, null, 40, _hoisted_2$
|
|
7545
|
+
}, null, 40, _hoisted_2$f),
|
|
6773
7546
|
_cache[0] || (_cache[0] = vue.createElementVNode("span", {
|
|
6774
7547
|
class: "tao-radio__dot",
|
|
6775
7548
|
"aria-hidden": "true"
|
|
6776
7549
|
}, null, -1)),
|
|
6777
|
-
__props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
7550
|
+
__props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$c, vue.toDisplayString(__props.label), 1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$c, [
|
|
6778
7551
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
6779
7552
|
]))
|
|
6780
|
-
], 10, _hoisted_1$
|
|
7553
|
+
], 10, _hoisted_1$h);
|
|
6781
7554
|
};
|
|
6782
7555
|
}
|
|
6783
7556
|
});
|
|
6784
|
-
const TaoRadio = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6785
|
-
const _hoisted_1$
|
|
6786
|
-
const _hoisted_2$
|
|
7557
|
+
const TaoRadio = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-70ac1c11"]]);
|
|
7558
|
+
const _hoisted_1$g = ["id", "disabled", "aria-describedby", "aria-invalid", "aria-labelledby"];
|
|
7559
|
+
const _hoisted_2$e = {
|
|
6787
7560
|
key: 0,
|
|
6788
7561
|
class: "tao-radio-group__legend"
|
|
6789
7562
|
};
|
|
6790
|
-
const _sfc_main$
|
|
7563
|
+
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
6791
7564
|
...{ name: "TaoRadioGroup" },
|
|
6792
7565
|
__name: "TaoRadioGroup",
|
|
6793
7566
|
props: {
|
|
@@ -6831,256 +7604,13 @@
|
|
|
6831
7604
|
"aria-invalid": invalid.value || void 0,
|
|
6832
7605
|
"aria-labelledby": labelledBy.value
|
|
6833
7606
|
}, [
|
|
6834
|
-
__props.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_2$
|
|
7607
|
+
__props.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_2$e, vue.toDisplayString(__props.legend), 1)) : vue.createCommentVNode("", true),
|
|
6835
7608
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
6836
|
-
], 10, _hoisted_1$i);
|
|
6837
|
-
};
|
|
6838
|
-
}
|
|
6839
|
-
});
|
|
6840
|
-
const TaoRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-c76ef504"]]);
|
|
6841
|
-
const segmentedKey = Symbol("taoSegmented");
|
|
6842
|
-
const _hoisted_1$h = ["disabled", "aria-describedby", "aria-invalid", "aria-labelledby", "id"];
|
|
6843
|
-
const _hoisted_2$f = {
|
|
6844
|
-
key: 0,
|
|
6845
|
-
class: "tao-segmented__legend"
|
|
6846
|
-
};
|
|
6847
|
-
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
6848
|
-
...{ name: "TaoSegmented" },
|
|
6849
|
-
__name: "TaoSegmented",
|
|
6850
|
-
props: {
|
|
6851
|
-
modelValue: { type: [String, Number, Boolean] },
|
|
6852
|
-
name: {},
|
|
6853
|
-
legend: {},
|
|
6854
|
-
disabled: { type: Boolean, default: false },
|
|
6855
|
-
error: { type: Boolean, default: false },
|
|
6856
|
-
size: {},
|
|
6857
|
-
block: { type: Boolean, default: false }
|
|
6858
|
-
},
|
|
6859
|
-
emits: ["update:modelValue", "change"],
|
|
6860
|
-
setup(__props, { emit: __emit }) {
|
|
6861
|
-
const props = __props;
|
|
6862
|
-
const emit = __emit;
|
|
6863
|
-
const field = vue.inject(formFieldKey, null);
|
|
6864
|
-
const autoName = vue.useId();
|
|
6865
|
-
const groupName = vue.computed(() => props.name || autoName);
|
|
6866
|
-
const model = vue.computed(() => props.modelValue);
|
|
6867
|
-
const groupDisabled = vue.computed(() => props.disabled);
|
|
6868
|
-
const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
|
|
6869
|
-
const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
|
|
6870
|
-
const trackRef = vue.ref(null);
|
|
6871
|
-
const thumbStyle = vue.ref({ opacity: "0" });
|
|
6872
|
-
let resizeObserver = null;
|
|
6873
|
-
let mutationObserver = null;
|
|
6874
|
-
function setValue(value) {
|
|
6875
|
-
emit("update:modelValue", value);
|
|
6876
|
-
emit("change", value);
|
|
6877
|
-
}
|
|
6878
|
-
function updateThumb() {
|
|
6879
|
-
const track = trackRef.value;
|
|
6880
|
-
if (!track) {
|
|
6881
|
-
return;
|
|
6882
|
-
}
|
|
6883
|
-
const selected = track.querySelector(".tao-segmented-option--checked");
|
|
6884
|
-
if (!selected) {
|
|
6885
|
-
if (thumbStyle.value.opacity !== "0") {
|
|
6886
|
-
thumbStyle.value = { opacity: "0" };
|
|
6887
|
-
}
|
|
6888
|
-
return;
|
|
6889
|
-
}
|
|
6890
|
-
const trackBox = track.getBoundingClientRect();
|
|
6891
|
-
const optionBox = selected.getBoundingClientRect();
|
|
6892
|
-
const next = {
|
|
6893
|
-
width: `${optionBox.width}px`,
|
|
6894
|
-
height: `${optionBox.height}px`,
|
|
6895
|
-
transform: `translate(${optionBox.left - trackBox.left - track.clientLeft}px, ${optionBox.top - trackBox.top - track.clientTop}px)`,
|
|
6896
|
-
opacity: "1"
|
|
6897
|
-
};
|
|
6898
|
-
const prev = thumbStyle.value;
|
|
6899
|
-
if (prev.width === next.width && prev.height === next.height && prev.transform === next.transform && prev.opacity === next.opacity) {
|
|
6900
|
-
return;
|
|
6901
|
-
}
|
|
6902
|
-
thumbStyle.value = next;
|
|
6903
|
-
}
|
|
6904
|
-
vue.provide(segmentedKey, {
|
|
6905
|
-
name: groupName,
|
|
6906
|
-
model,
|
|
6907
|
-
disabled: groupDisabled,
|
|
6908
|
-
setValue
|
|
6909
|
-
});
|
|
6910
|
-
vue.onMounted(() => {
|
|
6911
|
-
const track = trackRef.value;
|
|
6912
|
-
void vue.nextTick(updateThumb);
|
|
6913
|
-
if (!track) {
|
|
6914
|
-
return;
|
|
6915
|
-
}
|
|
6916
|
-
if (typeof ResizeObserver !== "undefined") {
|
|
6917
|
-
resizeObserver = new ResizeObserver(() => updateThumb());
|
|
6918
|
-
resizeObserver.observe(track);
|
|
6919
|
-
}
|
|
6920
|
-
mutationObserver = new MutationObserver(() => updateThumb());
|
|
6921
|
-
mutationObserver.observe(track, {
|
|
6922
|
-
subtree: true,
|
|
6923
|
-
childList: true,
|
|
6924
|
-
attributes: true,
|
|
6925
|
-
attributeFilter: ["class"]
|
|
6926
|
-
});
|
|
6927
|
-
});
|
|
6928
|
-
vue.watch(
|
|
6929
|
-
() => [props.modelValue, props.size, props.block, props.disabled],
|
|
6930
|
-
() => {
|
|
6931
|
-
void vue.nextTick(updateThumb);
|
|
6932
|
-
}
|
|
6933
|
-
);
|
|
6934
|
-
vue.onBeforeUnmount(() => {
|
|
6935
|
-
resizeObserver == null ? void 0 : resizeObserver.disconnect();
|
|
6936
|
-
resizeObserver = null;
|
|
6937
|
-
mutationObserver == null ? void 0 : mutationObserver.disconnect();
|
|
6938
|
-
mutationObserver = null;
|
|
6939
|
-
});
|
|
6940
|
-
return (_ctx, _cache) => {
|
|
6941
|
-
var _a;
|
|
6942
|
-
return vue.openBlock(), vue.createElementBlock("fieldset", {
|
|
6943
|
-
class: vue.normalizeClass(["tao-segmented", [
|
|
6944
|
-
vue.unref(sizeClass)(__props.size),
|
|
6945
|
-
{
|
|
6946
|
-
"tao-segmented--block": __props.block,
|
|
6947
|
-
"tao-segmented--disabled": __props.disabled,
|
|
6948
|
-
"tao-segmented--invalid": invalid.value
|
|
6949
|
-
}
|
|
6950
|
-
]]),
|
|
6951
|
-
disabled: __props.disabled,
|
|
6952
|
-
"aria-describedby": describedBy.value,
|
|
6953
|
-
"aria-invalid": invalid.value || void 0,
|
|
6954
|
-
"aria-labelledby": __props.legend ? void 0 : vue.unref(field) ? `${vue.unref(field).id}-label` : void 0,
|
|
6955
|
-
id: (_a = vue.unref(field)) == null ? void 0 : _a.id
|
|
6956
|
-
}, [
|
|
6957
|
-
__props.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_2$f, vue.toDisplayString(__props.legend), 1)) : vue.createCommentVNode("", true),
|
|
6958
|
-
vue.createElementVNode("div", {
|
|
6959
|
-
ref_key: "trackRef",
|
|
6960
|
-
ref: trackRef,
|
|
6961
|
-
class: "tao-segmented__track"
|
|
6962
|
-
}, [
|
|
6963
|
-
vue.createElementVNode("div", {
|
|
6964
|
-
class: "tao-segmented__thumb",
|
|
6965
|
-
style: vue.normalizeStyle(thumbStyle.value),
|
|
6966
|
-
"aria-hidden": "true"
|
|
6967
|
-
}, null, 4),
|
|
6968
|
-
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
6969
|
-
], 512)
|
|
6970
|
-
], 10, _hoisted_1$h);
|
|
6971
|
-
};
|
|
6972
|
-
}
|
|
6973
|
-
});
|
|
6974
|
-
const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-7dc6820f"]]);
|
|
6975
|
-
const _hoisted_1$g = ["for"];
|
|
6976
|
-
const _hoisted_2$e = ["id", "name", "value", "checked", "disabled", "aria-label"];
|
|
6977
|
-
const _hoisted_3$c = { class: "tao-segmented-option__face" };
|
|
6978
|
-
const _hoisted_4$c = {
|
|
6979
|
-
key: 0,
|
|
6980
|
-
class: "tao-segmented-option__icon",
|
|
6981
|
-
"aria-hidden": "true"
|
|
6982
|
-
};
|
|
6983
|
-
const _hoisted_5$c = {
|
|
6984
|
-
key: 1,
|
|
6985
|
-
class: "tao-segmented-option__label"
|
|
6986
|
-
};
|
|
6987
|
-
const _hoisted_6$9 = {
|
|
6988
|
-
key: 2,
|
|
6989
|
-
class: "tao-segmented-option__sr"
|
|
6990
|
-
};
|
|
6991
|
-
const _hoisted_7$7 = {
|
|
6992
|
-
key: 3,
|
|
6993
|
-
class: "tao-segmented-option__count"
|
|
6994
|
-
};
|
|
6995
|
-
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
6996
|
-
...{ name: "TaoSegmentedOption" },
|
|
6997
|
-
__name: "TaoSegmentedOption",
|
|
6998
|
-
props: {
|
|
6999
|
-
value: { type: [String, Number, Boolean] },
|
|
7000
|
-
modelValue: { type: [String, Number, Boolean] },
|
|
7001
|
-
name: {},
|
|
7002
|
-
label: { default: "" },
|
|
7003
|
-
icon: { default: "" },
|
|
7004
|
-
count: {},
|
|
7005
|
-
disabled: { type: Boolean, default: false },
|
|
7006
|
-
ariaLabel: {}
|
|
7007
|
-
},
|
|
7008
|
-
emits: ["update:modelValue", "change"],
|
|
7009
|
-
setup(__props, { emit: __emit }) {
|
|
7010
|
-
const props = __props;
|
|
7011
|
-
const emit = __emit;
|
|
7012
|
-
const group = vue.inject(segmentedKey, null);
|
|
7013
|
-
const slots = vue.useSlots();
|
|
7014
|
-
const localId = vue.useId();
|
|
7015
|
-
const isDisabled = vue.computed(() => props.disabled || Boolean(group == null ? void 0 : group.disabled.value));
|
|
7016
|
-
const inputName = vue.computed(() => (group == null ? void 0 : group.name.value) ?? props.name);
|
|
7017
|
-
const isChecked = vue.computed(() => {
|
|
7018
|
-
const current2 = group ? group.model.value : props.modelValue;
|
|
7019
|
-
return current2 === props.value;
|
|
7020
|
-
});
|
|
7021
|
-
const hasLabel = vue.computed(() => Boolean(props.label || slots.default));
|
|
7022
|
-
const isIconOnly = vue.computed(() => Boolean((props.icon || slots.icon) && !hasLabel.value));
|
|
7023
|
-
const countLabel = vue.computed(() => {
|
|
7024
|
-
if (props.count === void 0 || props.count === null || props.count === "") {
|
|
7025
|
-
return "";
|
|
7026
|
-
}
|
|
7027
|
-
if (typeof props.count === "number") {
|
|
7028
|
-
if (props.count > 99) {
|
|
7029
|
-
return "99+";
|
|
7030
|
-
}
|
|
7031
|
-
return String(props.count);
|
|
7032
|
-
}
|
|
7033
|
-
return String(props.count);
|
|
7034
|
-
});
|
|
7035
|
-
function onChange() {
|
|
7036
|
-
if (isDisabled.value) {
|
|
7037
|
-
return;
|
|
7038
|
-
}
|
|
7039
|
-
if (group) {
|
|
7040
|
-
group.setValue(props.value);
|
|
7041
|
-
return;
|
|
7042
|
-
}
|
|
7043
|
-
emit("update:modelValue", props.value);
|
|
7044
|
-
emit("change", props.value);
|
|
7045
|
-
}
|
|
7046
|
-
return (_ctx, _cache) => {
|
|
7047
|
-
return vue.openBlock(), vue.createElementBlock("label", {
|
|
7048
|
-
class: vue.normalizeClass(["tao-segmented-option", {
|
|
7049
|
-
"tao-segmented-option--checked": isChecked.value,
|
|
7050
|
-
"tao-segmented-option--disabled": props.disabled,
|
|
7051
|
-
"tao-segmented-option--icon-only": isIconOnly.value
|
|
7052
|
-
}]),
|
|
7053
|
-
for: vue.unref(localId)
|
|
7054
|
-
}, [
|
|
7055
|
-
vue.createElementVNode("input", {
|
|
7056
|
-
id: vue.unref(localId),
|
|
7057
|
-
class: "tao-segmented-option__input",
|
|
7058
|
-
type: "radio",
|
|
7059
|
-
name: inputName.value,
|
|
7060
|
-
value: String(__props.value),
|
|
7061
|
-
checked: isChecked.value,
|
|
7062
|
-
disabled: isDisabled.value,
|
|
7063
|
-
"aria-label": __props.ariaLabel,
|
|
7064
|
-
onChange
|
|
7065
|
-
}, null, 40, _hoisted_2$e),
|
|
7066
|
-
vue.createElementVNode("span", _hoisted_3$c, [
|
|
7067
|
-
__props.icon || _ctx.$slots.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$c, [
|
|
7068
|
-
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
7069
|
-
vue.createTextVNode(vue.toDisplayString(__props.icon), 1)
|
|
7070
|
-
], true)
|
|
7071
|
-
])) : vue.createCommentVNode("", true),
|
|
7072
|
-
hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$c, [
|
|
7073
|
-
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
7074
|
-
vue.createTextVNode(vue.toDisplayString(__props.label), 1)
|
|
7075
|
-
], true)
|
|
7076
|
-
])) : __props.ariaLabel ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$9, vue.toDisplayString(__props.ariaLabel), 1)) : vue.createCommentVNode("", true),
|
|
7077
|
-
countLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7$7, vue.toDisplayString(countLabel.value), 1)) : vue.createCommentVNode("", true)
|
|
7078
|
-
])
|
|
7079
7609
|
], 10, _hoisted_1$g);
|
|
7080
7610
|
};
|
|
7081
7611
|
}
|
|
7082
7612
|
});
|
|
7083
|
-
const
|
|
7613
|
+
const TaoRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-c76ef504"]]);
|
|
7084
7614
|
const _hoisted_1$f = ["role", "aria-live"];
|
|
7085
7615
|
const _hoisted_2$d = { class: "tao-alert__body" };
|
|
7086
7616
|
const _hoisted_3$b = {
|
|
@@ -8052,7 +8582,7 @@
|
|
|
8052
8582
|
class: "tao-breadcrumb__item"
|
|
8053
8583
|
}, [
|
|
8054
8584
|
index > 0 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$4, "/")) : vue.createCommentVNode("", true),
|
|
8055
|
-
index === __props.items.length - 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$4, vue.toDisplayString(item.label), 1)) : item.to ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
8585
|
+
index === __props.items.length - 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$4, vue.toDisplayString(item.label), 1)) : item.to ? (vue.openBlock(), vue.createBlock(_sfc_main$s, {
|
|
8056
8586
|
key: 2,
|
|
8057
8587
|
class: "tao-breadcrumb__link",
|
|
8058
8588
|
to: item.to
|
|
@@ -9736,6 +10266,50 @@
|
|
|
9736
10266
|
resolveConfirm(false);
|
|
9737
10267
|
}
|
|
9738
10268
|
});
|
|
10269
|
+
const round = (v, digits) => {
|
|
10270
|
+
const k = Math.pow(10, digits);
|
|
10271
|
+
return Math.round(v * k) / k + 0;
|
|
10272
|
+
};
|
|
10273
|
+
function colorModel(source, options = {}) {
|
|
10274
|
+
const { format = "object", range = 255, space = "srgb", alpha = false, precision = 5 } = options;
|
|
10275
|
+
if (space === "linear" && range !== 1) throw new Error("colorModel: linear space needs range: 1");
|
|
10276
|
+
function read(value) {
|
|
10277
|
+
let parts;
|
|
10278
|
+
if (format === "css") {
|
|
10279
|
+
return parseColor(String(value)) ?? { r: 0, g: 0, b: 0, a: 1 };
|
|
10280
|
+
} else if (format === "array") {
|
|
10281
|
+
parts = value.slice(0, 4);
|
|
10282
|
+
} else {
|
|
10283
|
+
const o = value;
|
|
10284
|
+
parts = [o.r ?? 0, o.g ?? 0, o.b ?? 0, o.a ?? 1];
|
|
10285
|
+
}
|
|
10286
|
+
const channels = [0, 1, 2].map((i) => {
|
|
10287
|
+
const v = Number(parts[i] ?? 0);
|
|
10288
|
+
return space === "linear" ? linearToSrgb(v) * 255 : range === 1 ? v * 255 : v;
|
|
10289
|
+
});
|
|
10290
|
+
return { r: channels[0], g: channels[1], b: channels[2], a: parts[3] === void 0 ? 1 : Number(parts[3]) };
|
|
10291
|
+
}
|
|
10292
|
+
function write(c) {
|
|
10293
|
+
const out = [c.r, c.g, c.b].map((v) => {
|
|
10294
|
+
if (space === "linear") return round(srgbToLinear(v / 255), precision);
|
|
10295
|
+
return range === 1 ? round(v / 255, precision) : Math.round(v);
|
|
10296
|
+
});
|
|
10297
|
+
const a = round(c.a, 3);
|
|
10298
|
+
if (format === "css") {
|
|
10299
|
+
const [r, g, b] = [c.r, c.g, c.b].map(Math.round);
|
|
10300
|
+
return alpha ? `rgb(${r} ${g} ${b} / ${a})` : `rgb(${r} ${g} ${b})`;
|
|
10301
|
+
}
|
|
10302
|
+
if (format === "array") return alpha ? [...out, a] : out;
|
|
10303
|
+
return alpha ? { r: out[0], g: out[1], b: out[2], a } : { r: out[0], g: out[1], b: out[2] };
|
|
10304
|
+
}
|
|
10305
|
+
return vue.computed({
|
|
10306
|
+
get: () => toHex(read(source.value), alpha),
|
|
10307
|
+
set: (hex) => {
|
|
10308
|
+
const parsed = parseColor(hex);
|
|
10309
|
+
if (parsed) source.value = write(parsed);
|
|
10310
|
+
}
|
|
10311
|
+
});
|
|
10312
|
+
}
|
|
9739
10313
|
const components = [
|
|
9740
10314
|
TaoButton,
|
|
9741
10315
|
TaoBlock,
|
|
@@ -9753,7 +10327,7 @@
|
|
|
9753
10327
|
TaoSpoilerGroup,
|
|
9754
10328
|
TaoCopy,
|
|
9755
10329
|
TaoContainer,
|
|
9756
|
-
_sfc_main$
|
|
10330
|
+
_sfc_main$M,
|
|
9757
10331
|
TaoSpace,
|
|
9758
10332
|
TaoGrid,
|
|
9759
10333
|
TaoGridItem,
|
|
@@ -9769,14 +10343,16 @@
|
|
|
9769
10343
|
TaoTextarea,
|
|
9770
10344
|
TaoScrollTop,
|
|
9771
10345
|
TaoProgress,
|
|
9772
|
-
_sfc_main$
|
|
9773
|
-
_sfc_main$
|
|
10346
|
+
_sfc_main$U,
|
|
10347
|
+
_sfc_main$w,
|
|
9774
10348
|
TaoFileDrop,
|
|
9775
10349
|
TaoDropdownMenu,
|
|
9776
10350
|
TaoPinCode,
|
|
9777
|
-
_sfc_main$
|
|
10351
|
+
_sfc_main$s,
|
|
9778
10352
|
TaoFormField,
|
|
9779
10353
|
TaoSelect,
|
|
10354
|
+
TaoColorInput,
|
|
10355
|
+
TaoColorPicker,
|
|
9780
10356
|
TaoCombobox,
|
|
9781
10357
|
TaoDate,
|
|
9782
10358
|
TaoDateRange,
|
|
@@ -9820,6 +10396,8 @@
|
|
|
9820
10396
|
exports2.TaoCard = TaoCard;
|
|
9821
10397
|
exports2.TaoCarousel = TaoCarousel;
|
|
9822
10398
|
exports2.TaoCheckbox = TaoCheckbox;
|
|
10399
|
+
exports2.TaoColorInput = TaoColorInput;
|
|
10400
|
+
exports2.TaoColorPicker = TaoColorPicker;
|
|
9823
10401
|
exports2.TaoCombobox = TaoCombobox;
|
|
9824
10402
|
exports2.TaoConfirmHost = TaoConfirmHost;
|
|
9825
10403
|
exports2.TaoContainer = TaoContainer;
|
|
@@ -9833,7 +10411,7 @@
|
|
|
9833
10411
|
exports2.TaoEmpty = TaoEmpty;
|
|
9834
10412
|
exports2.TaoFieldset = TaoFieldset;
|
|
9835
10413
|
exports2.TaoFileDrop = TaoFileDrop;
|
|
9836
|
-
exports2.TaoFlex = _sfc_main$
|
|
10414
|
+
exports2.TaoFlex = _sfc_main$M;
|
|
9837
10415
|
exports2.TaoFormField = TaoFormField;
|
|
9838
10416
|
exports2.TaoGrid = TaoGrid;
|
|
9839
10417
|
exports2.TaoGridItem = TaoGridItem;
|
|
@@ -9842,7 +10420,7 @@
|
|
|
9842
10420
|
exports2.TaoInput = TaoInput;
|
|
9843
10421
|
exports2.TaoInputGroup = TaoInputGroup;
|
|
9844
10422
|
exports2.TaoInputNumber = TaoInputNumber;
|
|
9845
|
-
exports2.TaoLink = _sfc_main$
|
|
10423
|
+
exports2.TaoLink = _sfc_main$s;
|
|
9846
10424
|
exports2.TaoList = TaoList;
|
|
9847
10425
|
exports2.TaoListItem = TaoListItem;
|
|
9848
10426
|
exports2.TaoLoader = TaoLoader;
|
|
@@ -9854,13 +10432,13 @@
|
|
|
9854
10432
|
exports2.TaoQuantity = TaoQuantity;
|
|
9855
10433
|
exports2.TaoRadio = TaoRadio;
|
|
9856
10434
|
exports2.TaoRadioGroup = TaoRadioGroup;
|
|
9857
|
-
exports2.TaoRangeSlider = _sfc_main$
|
|
10435
|
+
exports2.TaoRangeSlider = _sfc_main$w;
|
|
9858
10436
|
exports2.TaoScrollTop = TaoScrollTop;
|
|
9859
10437
|
exports2.TaoSegmented = TaoSegmented;
|
|
9860
10438
|
exports2.TaoSegmentedOption = TaoSegmentedOption;
|
|
9861
10439
|
exports2.TaoSelect = TaoSelect;
|
|
9862
10440
|
exports2.TaoSkeleton = TaoSkeleton;
|
|
9863
|
-
exports2.TaoSlider = _sfc_main$
|
|
10441
|
+
exports2.TaoSlider = _sfc_main$U;
|
|
9864
10442
|
exports2.TaoSpace = TaoSpace;
|
|
9865
10443
|
exports2.TaoSplit = TaoSplit;
|
|
9866
10444
|
exports2.TaoSpoiler = TaoSpoiler;
|
|
@@ -9875,17 +10453,27 @@
|
|
|
9875
10453
|
exports2.TaoToastViewport = TaoToastViewport;
|
|
9876
10454
|
exports2.TaoTooltip = TaoTooltip;
|
|
9877
10455
|
exports2.TaoUI = TaoUI;
|
|
10456
|
+
exports2.colorModel = colorModel;
|
|
9878
10457
|
exports2.confirm = confirm;
|
|
9879
10458
|
exports2.default = TaoUI;
|
|
9880
10459
|
exports2.formatTaoDateIso = formatTaoDateIso;
|
|
9881
10460
|
exports2.formatTaoDateLabel = formatTaoDateLabel;
|
|
9882
10461
|
exports2.formatTaoDateRangeLabel = formatTaoDateRangeLabel;
|
|
10462
|
+
exports2.hslToRgb = hslToRgb;
|
|
10463
|
+
exports2.hsvaToRgba = hsvaToRgba;
|
|
10464
|
+
exports2.linearToSrgb = linearToSrgb;
|
|
9883
10465
|
exports2.localeEn = localeEn;
|
|
9884
10466
|
exports2.localeRu = localeRu;
|
|
10467
|
+
exports2.normalizeHex = normalizeHex;
|
|
10468
|
+
exports2.parseColor = parseColor;
|
|
9885
10469
|
exports2.parseTaoDate = parseTaoDate;
|
|
9886
10470
|
exports2.parseTaoDateRange = parseTaoDateRange;
|
|
10471
|
+
exports2.rgbToHsl = rgbToHsl;
|
|
10472
|
+
exports2.rgbaToHsva = rgbaToHsva;
|
|
9887
10473
|
exports2.setTaoLocale = setTaoLocale;
|
|
10474
|
+
exports2.srgbToLinear = srgbToLinear;
|
|
9888
10475
|
exports2.taoLocale = taoLocale;
|
|
10476
|
+
exports2.toHex = toHex;
|
|
9889
10477
|
exports2.toast = toast;
|
|
9890
10478
|
exports2.todayTaoDate = todayTaoDate;
|
|
9891
10479
|
Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|