@moubing/bing-ui 0.11.1 → 0.12.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/README.md +300 -171
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/bing-ui.css +1 -1
- package/dist/components/BingAnimatedText/BingAnimatedText.js +7 -0
- package/dist/components/BingAnimatedText/BingAnimatedText.vue_vue_type_script_setup_true_lang.js +194 -0
- package/dist/components/BingAppSwitcherTransition/BingAppSwitcherTransition.js +7 -0
- package/dist/components/BingAppSwitcherTransition/BingAppSwitcherTransition.vue_vue_type_script_setup_true_lang.js +244 -0
- package/dist/components/BingAutocomplete/BingAutocomplete.js +7 -0
- package/dist/components/BingAutocomplete/BingAutocomplete.vue.d.ts +4 -4
- package/dist/components/BingAutocomplete/BingAutocomplete.vue_vue_type_script_setup_true_lang.js +560 -0
- package/dist/components/BingButton/BingButton.js +7 -0
- package/dist/components/BingButton/BingButton.vue.d.ts +2 -2
- package/dist/components/BingButton/BingButton.vue_vue_type_script_setup_true_lang.js +200 -0
- package/dist/components/BingCard/BingCard.js +7 -0
- package/dist/components/BingCard/BingCard.vue_vue_type_script_setup_true_lang.js +481 -0
- package/dist/components/BingCarouselTransition/BingCarouselTransition.js +7 -0
- package/dist/components/BingCarouselTransition/BingCarouselTransition.vue_vue_type_script_setup_true_lang.js +174 -0
- package/dist/components/BingCheckbox/BingCheckbox.js +7 -0
- package/dist/components/BingCheckbox/BingCheckbox.vue.d.ts +4 -4
- package/dist/components/BingCheckbox/BingCheckbox.vue_vue_type_script_setup_true_lang.js +233 -0
- package/dist/components/BingCheckboxGroup/BingCheckboxGroup.context.js +4 -0
- package/dist/components/BingCheckboxGroup/BingCheckboxGroup.js +7 -0
- package/dist/components/BingCheckboxGroup/BingCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/BingCheckboxGroup/BingCheckboxGroup.vue_vue_type_script_setup_true_lang.js +105 -0
- package/dist/components/BingCodeBlock/BingCodeBlock.highlight.js +78 -0
- package/dist/components/BingCodeBlock/BingCodeBlock.js +7 -0
- package/dist/components/BingCodeBlock/BingCodeBlock.vue_vue_type_script_setup_true_lang.js +347 -0
- package/dist/components/BingColorPicker/BingColorPicker.js +7 -0
- package/dist/components/BingColorPicker/BingColorPicker.utils.d.ts +70 -0
- package/dist/components/BingColorPicker/BingColorPicker.utils.js +265 -0
- package/dist/components/BingColorPicker/BingColorPicker.vue.d.ts +7 -7
- package/dist/components/BingColorPicker/BingColorPicker.vue_vue_type_script_setup_true_lang.js +540 -0
- package/dist/components/BingColorPicker/BingColorPickerFormatEditor.js +7 -0
- package/dist/components/BingColorPicker/BingColorPickerFormatEditor.vue.d.ts +27 -0
- package/dist/components/BingColorPicker/BingColorPickerFormatEditor.vue_vue_type_script_setup_true_lang.js +142 -0
- package/dist/components/BingColorPicker/BingColorPickerSpectrum.js +7 -0
- package/dist/components/BingColorPicker/BingColorPickerSpectrum.vue.d.ts +26 -0
- package/dist/components/BingColorPicker/BingColorPickerSpectrum.vue_vue_type_script_setup_true_lang.js +168 -0
- package/dist/components/BingConfigProvider/BingConfigProvider.js +5 -0
- package/dist/components/BingConfigProvider/BingConfigProvider.types.d.ts +5 -0
- package/dist/components/BingConfigProvider/BingConfigProvider.vue.d.ts +18 -0
- package/dist/components/BingConfigProvider/BingConfigProvider.vue_vue_type_script_setup_true_lang.js +18 -0
- package/dist/components/BingConfigProvider/index.d.ts +3 -0
- package/dist/components/BingCursor/BingCursor.controller.js +240 -0
- package/dist/components/BingCursor/BingCursor.js +7 -0
- package/dist/components/BingCursor/BingCursor.native.js +20 -0
- package/dist/components/BingCursor/BingCursor.presets.js +60 -0
- package/dist/components/BingCursor/BingCursor.shapes.js +83 -0
- package/dist/components/BingCursor/BingCursor.styleSource.js +83 -0
- package/dist/components/BingCursor/BingCursor.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/components/BingDatePicker/BingDatePicker.js +7 -0
- package/dist/components/BingDatePicker/BingDatePicker.utils.d.ts +26 -0
- package/dist/components/BingDatePicker/BingDatePicker.utils.js +137 -0
- package/dist/components/BingDatePicker/BingDatePicker.vue.d.ts +14 -14
- package/dist/components/BingDatePicker/BingDatePicker.vue_vue_type_script_setup_true_lang.js +804 -0
- package/dist/components/BingDatePicker/BingDatePickerCalendar.js +7 -0
- package/dist/components/BingDatePicker/BingDatePickerCalendar.vue.d.ts +37 -0
- package/dist/components/BingDatePicker/BingDatePickerCalendar.vue_vue_type_script_setup_true_lang.js +248 -0
- package/dist/components/BingDatePicker/BingDatePickerTimePanel.js +7 -0
- package/dist/components/BingDatePicker/BingDatePickerTimePanel.vue.d.ts +26 -0
- package/dist/components/BingDatePicker/BingDatePickerTimePanel.vue_vue_type_script_setup_true_lang.js +97 -0
- package/dist/components/BingDeckTransition/BingDeckTransition.js +7 -0
- package/dist/components/BingDeckTransition/BingDeckTransition.vue_vue_type_script_setup_true_lang.js +187 -0
- package/dist/components/BingDialog/BingDialog.js +7 -0
- package/dist/components/BingDialog/BingDialog.vue.d.ts +4 -5
- package/dist/components/BingDialog/BingDialog.vue_vue_type_script_setup_true_lang.js +558 -0
- package/dist/components/BingDropDown/BingDropDown.context.js +4 -0
- package/dist/components/BingDropDown/BingDropDown.js +7 -0
- package/dist/components/BingDropDown/BingDropDown.vue.d.ts +1 -2
- package/dist/components/BingDropDown/BingDropDown.vue_vue_type_script_setup_true_lang.js +649 -0
- package/dist/components/BingDropDown/BingDropDownItem.js +7 -0
- package/dist/components/BingDropDown/BingDropDownItem.vue.d.ts +1 -1
- package/dist/components/BingDropDown/BingDropDownItem.vue_vue_type_script_setup_true_lang.js +308 -0
- package/dist/components/BingFilePreview/BingFilePreview.js +7 -0
- package/dist/components/BingFilePreview/BingFilePreview.vue.d.ts +4 -5
- package/dist/components/BingFilePreview/BingFilePreview.vue_vue_type_script_setup_true_lang.js +589 -0
- package/dist/components/BingForm/BingForm.context.js +7 -0
- package/dist/components/BingForm/BingForm.js +7 -0
- package/dist/components/BingForm/BingForm.vue.d.ts +0 -1
- package/dist/components/BingForm/BingForm.vue_vue_type_script_setup_true_lang.js +300 -0
- package/dist/components/BingForm/formFocus.js +13 -0
- package/dist/components/BingForm/formTabOrder.js +27 -0
- package/dist/components/BingForm/useFormControl.d.ts +1 -1
- package/dist/components/BingForm/useFormControl.js +24 -0
- package/dist/components/BingForm/useFormNextHint.js +135 -0
- package/dist/components/BingFormItem/BingFormItem.js +7 -0
- package/dist/components/BingFormItem/BingFormItem.vue.d.ts +1 -1
- package/dist/components/BingFormItem/BingFormItem.vue_vue_type_script_setup_true_lang.js +252 -0
- package/dist/components/BingIcon/BingIcon.js +7 -0
- package/dist/components/BingIcon/BingIcon.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/components/BingImage/BingImage.js +7 -0
- package/dist/components/BingImage/BingImage.vue_vue_type_script_setup_true_lang.js +244 -0
- package/dist/components/BingImagePreview/BingImagePreview.js +7 -0
- package/dist/components/BingImagePreview/BingImagePreview.vue.d.ts +4 -5
- package/dist/components/BingImagePreview/BingImagePreview.vue_vue_type_script_setup_true_lang.js +699 -0
- package/dist/components/BingInput/BingInput.js +7 -0
- package/dist/components/BingInput/BingInput.vue.d.ts +6 -6
- package/dist/components/BingInput/BingInput.vue_vue_type_script_setup_true_lang.js +311 -0
- package/dist/components/BingRadio/BingRadio.js +7 -0
- package/dist/components/BingRadio/BingRadio.vue.d.ts +4 -4
- package/dist/components/BingRadio/BingRadio.vue_vue_type_script_setup_true_lang.js +170 -0
- package/dist/components/BingRadioGroup/BingRadioGroup.context.js +4 -0
- package/dist/components/BingRadioGroup/BingRadioGroup.js +7 -0
- package/dist/components/BingRadioGroup/BingRadioGroup.vue.d.ts +4 -4
- package/dist/components/BingRadioGroup/BingRadioGroup.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/components/BingResizable/BingResizable.js +7 -0
- package/dist/components/BingResizable/BingResizable.vue.d.ts +1 -1
- package/dist/components/BingResizable/BingResizable.vue_vue_type_script_setup_true_lang.js +555 -0
- package/dist/components/BingScrollbar/BingScrollbar.js +7 -0
- package/dist/components/BingScrollbar/BingScrollbar.vue.d.ts +2 -2
- package/dist/components/BingScrollbar/BingScrollbar.vue_vue_type_script_setup_true_lang.js +398 -0
- package/dist/components/BingSelect/BingSelect.js +7 -0
- package/dist/components/BingSelect/BingSelect.vue.d.ts +7 -7
- package/dist/components/BingSelect/BingSelect.vue_vue_type_script_setup_true_lang.js +1066 -0
- package/dist/components/BingSlider/BingSlider.js +7 -0
- package/dist/components/BingSlider/BingSlider.vue.d.ts +6 -6
- package/dist/components/BingSlider/BingSlider.vue_vue_type_script_setup_true_lang.js +130 -0
- package/dist/components/BingSortableList/BingSortableList.js +7 -0
- package/dist/components/BingSortableList/BingSortableList.vue_vue_type_script_setup_true_lang.js +334 -0
- package/dist/components/BingSortableList/BingSortableListItem.js +7 -0
- package/dist/components/BingSortableList/BingSortableListItem.vue_vue_type_script_setup_true_lang.js +76 -0
- package/dist/components/BingSplitPane/BingSplitPane.js +7 -0
- package/dist/components/BingSplitPane/BingSplitPane.vue_vue_type_script_setup_true_lang.js +167 -0
- package/dist/components/BingTable/BingTable.js +7 -0
- package/dist/components/BingTable/BingTable.measurements.js +72 -0
- package/dist/components/BingTable/BingTable.vue.d.ts +1 -2
- package/dist/components/BingTable/BingTable.vue_vue_type_script_setup_true_lang.js +1416 -0
- package/dist/components/BingTable/BingTableCellValue.js +7 -0
- package/dist/components/BingTable/BingTableCellValue.vue_vue_type_script_setup_true_lang.js +68 -0
- package/dist/components/BingTable/BingTableHeaderCell.js +5 -0
- package/dist/components/BingTable/BingTableHeaderCell.vue_vue_type_script_setup_true_lang.js +45 -0
- package/dist/components/BingTable/BingTableHeaderContent.js +7 -0
- package/dist/components/BingTable/BingTableHeaderContent.vue_vue_type_script_setup_true_lang.js +110 -0
- package/dist/components/BingTable/useTableColumns.js +126 -0
- package/dist/components/BingTableColumnControls/BingTableColumnControls.js +7 -0
- package/dist/components/BingTableColumnControls/BingTableColumnControls.vue.d.ts +1 -1
- package/dist/components/BingTableColumnControls/BingTableColumnControls.vue_vue_type_script_setup_true_lang.js +251 -0
- package/dist/components/BingTabs/BingTabs.js +7 -0
- package/dist/components/BingTabs/BingTabs.vue.d.ts +2 -3
- package/dist/components/BingTabs/BingTabs.vue_vue_type_script_setup_true_lang.js +320 -0
- package/dist/components/BingTag/BingTag.js +7 -0
- package/dist/components/BingTag/BingTag.vue.d.ts +0 -1
- package/dist/components/BingTag/BingTag.vue_vue_type_script_setup_true_lang.js +65 -0
- package/dist/components/BingTextarea/BingTextarea.js +7 -0
- package/dist/components/BingTextarea/BingTextarea.vue.d.ts +6 -6
- package/dist/components/BingTextarea/BingTextarea.vue_vue_type_script_setup_true_lang.js +243 -0
- package/dist/components/BingToast/BingToast.js +7 -0
- package/dist/components/BingToast/BingToast.service.js +132 -0
- package/dist/components/BingToast/BingToast.types.d.ts +1 -1
- package/dist/components/BingToast/BingToast.types.js +19 -0
- package/dist/components/BingToast/BingToast.vue.d.ts +0 -1
- package/dist/components/BingToast/BingToast.vue_vue_type_script_setup_true_lang.js +307 -0
- package/dist/components/BingTooltip/BingTooltip.js +7 -0
- package/dist/components/BingTooltip/BingTooltip.shared.js +14 -0
- package/dist/components/BingTooltip/BingTooltip.vue.d.ts +4 -5
- package/dist/components/BingTooltip/BingTooltip.vue_vue_type_script_setup_true_lang.js +572 -0
- package/dist/components/BingTreeSelect/BingTreeSelect.js +7 -0
- package/dist/components/BingTreeSelect/BingTreeSelect.vue.d.ts +7 -7
- package/dist/components/BingTreeSelect/BingTreeSelect.vue_vue_type_script_setup_true_lang.js +1274 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/icons/LICENSE-lucide.txt +39 -0
- package/dist/icons/createIcon.d.ts +8 -0
- package/dist/icons/createIcon.js +36 -0
- package/dist/icons/icons.d.ts +51 -0
- package/dist/icons/icons.js +252 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/index.js +48 -0
- package/dist/motion/clickParticles.d.ts +1 -1
- package/dist/motion/clickParticles2.js +66 -0
- package/dist/motion/index.d.ts +1 -1
- package/dist/motion/index.js +17 -0
- package/dist/motion/liquidHover.js +36 -0
- package/dist/motion/optionDetailMotion.d.ts +7 -1
- package/dist/motion/optionDetailMotion.js +74 -0
- package/dist/motion/panelMotion.js +19 -0
- package/dist/motion/reducedMotion.d.ts +16 -0
- package/dist/motion/reducedMotion.js +28 -0
- package/dist/motion/selectPanelMotion.js +115 -0
- package/dist/motion/smoothScroll.d.ts +2 -0
- package/dist/motion/smoothScroll.js +276 -0
- package/dist/motion/useClickFeedback.js +47 -0
- package/dist/motion/useTextControlCaret.js +136 -0
- package/dist/utils/clipboard.d.ts +9 -0
- package/dist/utils/clipboard.js +16 -0
- package/dist/utils/config.d.ts +42 -0
- package/dist/utils/config.js +37 -0
- package/dist/utils/controlAttrs.js +37 -0
- package/dist/utils/floating.d.ts +86 -0
- package/dist/utils/floating.js +99 -0
- package/dist/utils/glass.js +25 -0
- package/dist/utils/overlay.js +94 -0
- package/dist/utils/scrollLock.js +44 -0
- package/dist/utils/search.d.ts +16 -0
- package/dist/utils/search.js +23 -0
- package/dist/utils/useClientReady.js +10 -0
- package/dist/utils/useDeferredBlurValidation.d.ts +18 -0
- package/dist/utils/useDeferredBlurValidation.js +34 -0
- package/dist/utils/useKeyboardScrollSync.d.ts +11 -0
- package/dist/utils/useKeyboardScrollSync.js +28 -0
- package/dist/utils/useOptionDetailPanel.d.ts +50 -0
- package/dist/utils/useOptionDetailPanel.js +180 -0
- package/dist/utils/useOutsidePointerDown.d.ts +8 -0
- package/dist/utils/useOutsidePointerDown.js +17 -0
- package/dist/utils/useSearchShortcutFocus.d.ts +18 -0
- package/dist/utils/useSearchShortcutFocus.js +47 -0
- package/dist/utils/useVirtualList.d.ts +42 -0
- package/dist/utils/useVirtualList.js +74 -0
- package/package.json +15 -9
- package/dist/bing-ui.es.js +0 -31276
- package/dist/bing-ui.umd.js +0 -229
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { useReducedMotion as e } from "../../motion/reducedMotion.js";
|
|
2
|
+
import t from "../BingTabs/BingTabs.js";
|
|
3
|
+
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineComponent as l, nextTick as u, normalizeClass as d, onBeforeUnmount as f, onMounted as p, openBlock as m, ref as h, renderList as g, renderSlot as _, toDisplayString as v, watch as y } from "vue";
|
|
4
|
+
import { gsap as b } from "gsap";
|
|
5
|
+
//#region src/components/BingCarouselTransition/BingCarouselTransition.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var x = { class: "bing-carousel-transition__viewport" }, S = ["aria-hidden"], C = /* @__PURE__ */ l({
|
|
7
|
+
__name: "BingCarouselTransition",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: { default: void 0 },
|
|
10
|
+
items: { default: () => [] },
|
|
11
|
+
disabled: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: !1
|
|
14
|
+
},
|
|
15
|
+
respectReducedMotion: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: !0
|
|
18
|
+
},
|
|
19
|
+
loop: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: !0
|
|
22
|
+
},
|
|
23
|
+
showTabs: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !0
|
|
26
|
+
},
|
|
27
|
+
ariaLabel: { default: "轮播切换面板" }
|
|
28
|
+
},
|
|
29
|
+
emits: ["update:modelValue", "change"],
|
|
30
|
+
setup(l, { emit: C }) {
|
|
31
|
+
let w = e(), T = l, E = C, D = h(null), O = h(!1), k = h(void 0), A, j = 0, M, N, P = r(() => T.items.filter((e) => !e.disabled)), F = r(() => P.value[0]), I = r(() => T.modelValue !== void 0), L = r(() => I.value ? T.modelValue : k.value ?? F.value?.value), R = r(() => {
|
|
32
|
+
let e = T.items.findIndex((e) => Object.is(e.value, L.value));
|
|
33
|
+
return e >= 0 ? e : 0;
|
|
34
|
+
}), z = r(() => T.items.map((e) => ({
|
|
35
|
+
...e,
|
|
36
|
+
value: e.value,
|
|
37
|
+
label: e.label,
|
|
38
|
+
disabled: T.disabled || e.disabled
|
|
39
|
+
})));
|
|
40
|
+
function B() {
|
|
41
|
+
return typeof window < "u";
|
|
42
|
+
}
|
|
43
|
+
function V() {
|
|
44
|
+
return T.disabled || T.respectReducedMotion && w();
|
|
45
|
+
}
|
|
46
|
+
function H(e, t, n) {
|
|
47
|
+
return Math.min(Math.max(e, t), n);
|
|
48
|
+
}
|
|
49
|
+
function U(e) {
|
|
50
|
+
let t = T.items.length;
|
|
51
|
+
return t === 0 ? 0 : T.loop ? (e + t) % t : H(e, 0, t - 1);
|
|
52
|
+
}
|
|
53
|
+
function W(e) {
|
|
54
|
+
D.value && b.set(D.value, {
|
|
55
|
+
xPercent: U(e) * -100,
|
|
56
|
+
force3D: !0
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function G(e) {
|
|
60
|
+
let t = T.items[e];
|
|
61
|
+
if (!t || T.disabled || t.disabled || Object.is(t.value, L.value)) return !1;
|
|
62
|
+
let n = L.value, r = T.items.find((e) => Object.is(e.value, n));
|
|
63
|
+
return N = t.value, I.value || (k.value = t.value), E("update:modelValue", t.value), E("change", {
|
|
64
|
+
value: t.value,
|
|
65
|
+
previousValue: n,
|
|
66
|
+
item: t,
|
|
67
|
+
previousItem: r
|
|
68
|
+
}), !0;
|
|
69
|
+
}
|
|
70
|
+
function K(e, t = .52) {
|
|
71
|
+
let n = U(e);
|
|
72
|
+
if (A?.kill(), !D.value || V()) {
|
|
73
|
+
W(n), O.value = !1;
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
O.value = !0, A = b.to(D.value, {
|
|
77
|
+
xPercent: n * -100,
|
|
78
|
+
duration: t,
|
|
79
|
+
ease: "power3.out",
|
|
80
|
+
overwrite: "auto",
|
|
81
|
+
force3D: !0,
|
|
82
|
+
onComplete: () => {
|
|
83
|
+
O.value = !1, A = void 0;
|
|
84
|
+
},
|
|
85
|
+
onInterrupt: () => {
|
|
86
|
+
O.value = !1;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function q(e) {
|
|
91
|
+
let t = U(e);
|
|
92
|
+
t === R.value || !G(t) || K(t);
|
|
93
|
+
}
|
|
94
|
+
function J() {
|
|
95
|
+
if (!D.value || V()) return;
|
|
96
|
+
let e = H(j / 7, -32, 32);
|
|
97
|
+
b.to(D.value, {
|
|
98
|
+
xPercent: R.value * -100 - e,
|
|
99
|
+
duration: .16,
|
|
100
|
+
ease: "power2.out",
|
|
101
|
+
overwrite: "auto",
|
|
102
|
+
force3D: !0
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function Y() {
|
|
106
|
+
let e = j > 0 ? 1 : -1, t = Math.abs(j) > 42, n = t ? R.value + e : R.value;
|
|
107
|
+
if (j = 0, t) {
|
|
108
|
+
let e = U(n);
|
|
109
|
+
G(e), K(e, .5);
|
|
110
|
+
} else K(R.value, .32);
|
|
111
|
+
}
|
|
112
|
+
function X(e) {
|
|
113
|
+
e.defaultPrevented || T.disabled || Math.abs(e.deltaX) <= Math.abs(e.deltaY) || (e.preventDefault(), !(O.value || !B()) && (j += e.deltaX, J(), M && window.clearTimeout(M), M = window.setTimeout(() => {
|
|
114
|
+
M = void 0, Y();
|
|
115
|
+
}, 72)));
|
|
116
|
+
}
|
|
117
|
+
function Z(e) {
|
|
118
|
+
q(T.items.findIndex((t) => Object.is(t.value, e)));
|
|
119
|
+
}
|
|
120
|
+
return p(() => {
|
|
121
|
+
u().then(() => {
|
|
122
|
+
W(R.value);
|
|
123
|
+
});
|
|
124
|
+
}), f(() => {
|
|
125
|
+
A?.kill(), D.value && b.killTweensOf(D.value), M && B() && window.clearTimeout(M);
|
|
126
|
+
}), y(L, (e) => {
|
|
127
|
+
if (e === void 0) return;
|
|
128
|
+
if (Object.is(e, N)) {
|
|
129
|
+
N = void 0;
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
let t = T.items.findIndex((t) => Object.is(t.value, e));
|
|
133
|
+
t < 0 || u().then(() => {
|
|
134
|
+
K(t, .32);
|
|
135
|
+
});
|
|
136
|
+
}), (e, r) => (m(), o("section", {
|
|
137
|
+
class: d(["bing-carousel-transition", { "is-disabled": l.disabled }]),
|
|
138
|
+
onWheel: X
|
|
139
|
+
}, [l.showTabs ? (m(), i(t, {
|
|
140
|
+
key: 0,
|
|
141
|
+
items: z.value,
|
|
142
|
+
"model-value": L.value,
|
|
143
|
+
variant: "glass",
|
|
144
|
+
size: "md",
|
|
145
|
+
disabled: l.disabled,
|
|
146
|
+
loop: l.loop,
|
|
147
|
+
"respect-reduced-motion": l.respectReducedMotion,
|
|
148
|
+
"aria-label": l.ariaLabel,
|
|
149
|
+
"onUpdate:modelValue": Z
|
|
150
|
+
}, null, 8, [
|
|
151
|
+
"items",
|
|
152
|
+
"model-value",
|
|
153
|
+
"disabled",
|
|
154
|
+
"loop",
|
|
155
|
+
"respect-reduced-motion",
|
|
156
|
+
"aria-label"
|
|
157
|
+
])) : a("", !0), s("div", x, [s("div", {
|
|
158
|
+
ref_key: "trackRef",
|
|
159
|
+
ref: D,
|
|
160
|
+
class: "bing-carousel-transition__track"
|
|
161
|
+
}, [(m(!0), o(n, null, g(l.items, (t, n) => (m(), o("article", {
|
|
162
|
+
key: String(t.value),
|
|
163
|
+
class: d(["bing-carousel-transition__panel", { "is-active": Object.is(L.value, t.value) }]),
|
|
164
|
+
"aria-hidden": !Object.is(L.value, t.value)
|
|
165
|
+
}, [_(e.$slots, "default", {
|
|
166
|
+
item: t,
|
|
167
|
+
index: n,
|
|
168
|
+
active: Object.is(L.value, t.value),
|
|
169
|
+
isAnimating: O.value
|
|
170
|
+
}, () => [c(v(t.label), 1)], !0)], 10, S))), 128))], 512)])], 34));
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
//#endregion
|
|
174
|
+
export { C as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./BingCheckbox.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/BingCheckbox/BingCheckbox.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-4db29dad"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -4,16 +4,18 @@ type __VLS_Slots = {} & {
|
|
|
4
4
|
default?: (props: typeof __VLS_13) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import('vue').DefineComponent<BingCheckboxProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
change: (value: boolean, event: Event) => any;
|
|
8
7
|
blur: (event: FocusEvent) => any;
|
|
9
8
|
focus: (event: FocusEvent) => any;
|
|
9
|
+
change: (value: boolean, event: Event) => any;
|
|
10
10
|
"update:modelValue": (value: boolean) => any;
|
|
11
11
|
}, string, import('vue').PublicProps, Readonly<BingCheckboxProps> & Readonly<{
|
|
12
|
-
onChange?: ((value: boolean, event: Event) => any) | undefined;
|
|
13
12
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
14
13
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
14
|
+
onChange?: ((value: boolean, event: Event) => any) | undefined;
|
|
15
15
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
|
+
name: string;
|
|
18
|
+
status: "default" | "error" | "success" | "warning";
|
|
17
19
|
disabled: boolean;
|
|
18
20
|
label: string;
|
|
19
21
|
id: string;
|
|
@@ -23,8 +25,6 @@ declare const __VLS_base: import('vue').DefineComponent<BingCheckboxProps, {}, {
|
|
|
23
25
|
decorative: boolean;
|
|
24
26
|
modelValue: boolean;
|
|
25
27
|
ariaDescribedby: string;
|
|
26
|
-
status: "default" | "error" | "success" | "warning";
|
|
27
|
-
name: string;
|
|
28
28
|
value: string | number;
|
|
29
29
|
indeterminate: boolean;
|
|
30
30
|
shape: import('./BingCheckbox.types').BingCheckboxShape;
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { useReducedMotion as e } from "../../motion/reducedMotion.js";
|
|
2
|
+
import { useClickFeedback as t } from "../../motion/useClickFeedback.js";
|
|
3
|
+
import { useFormControl as n } from "../BingForm/useFormControl.js";
|
|
4
|
+
import { Check as r } from "../../icons/icons.js";
|
|
5
|
+
import i from "../BingIcon/BingIcon.js";
|
|
6
|
+
import { bingCheckboxGroupContextKey as a } from "../BingCheckboxGroup/BingCheckboxGroup.context.js";
|
|
7
|
+
import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, inject as m, normalizeClass as h, normalizeStyle as g, onBeforeUnmount as _, openBlock as v, ref as y, renderSlot as b, resolveDynamicComponent as x, toDisplayString as S, unref as C, useSlots as w, watch as T, withCtx as E } from "vue";
|
|
8
|
+
import { gsap as D } from "gsap";
|
|
9
|
+
//#region src/components/BingCheckbox/BingCheckbox.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
+
var O = [
|
|
11
|
+
"id",
|
|
12
|
+
"checked",
|
|
13
|
+
"indeterminate",
|
|
14
|
+
"disabled",
|
|
15
|
+
"name",
|
|
16
|
+
"value",
|
|
17
|
+
"aria-label",
|
|
18
|
+
"aria-describedby",
|
|
19
|
+
"aria-invalid"
|
|
20
|
+
], k = {
|
|
21
|
+
class: "bing-checkbox__control",
|
|
22
|
+
"aria-hidden": "true"
|
|
23
|
+
}, A = {
|
|
24
|
+
key: 1,
|
|
25
|
+
class: "bing-checkbox__label"
|
|
26
|
+
}, j = /* @__PURE__ */ p({
|
|
27
|
+
__name: "BingCheckbox",
|
|
28
|
+
props: {
|
|
29
|
+
id: { default: void 0 },
|
|
30
|
+
modelValue: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
indeterminate: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
disabled: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: void 0
|
|
41
|
+
},
|
|
42
|
+
size: { default: void 0 },
|
|
43
|
+
shape: { default: "rounded" },
|
|
44
|
+
tone: { default: "primary" },
|
|
45
|
+
label: { default: void 0 },
|
|
46
|
+
ariaLabel: { default: void 0 },
|
|
47
|
+
ariaDescribedby: { default: void 0 },
|
|
48
|
+
status: { default: void 0 },
|
|
49
|
+
name: { default: void 0 },
|
|
50
|
+
value: { default: void 0 },
|
|
51
|
+
decorative: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: !1
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
emits: [
|
|
57
|
+
"update:modelValue",
|
|
58
|
+
"change",
|
|
59
|
+
"focus",
|
|
60
|
+
"blur"
|
|
61
|
+
],
|
|
62
|
+
setup(p, { emit: j }) {
|
|
63
|
+
let ee = e(), M = p, N = j, { playClickFeedback: P } = t(), F = w(), I = m(a, null), { formItem: L, resolvedSize: R, resolvedDisabled: z, resolvedStatus: B, resolvedId: V, resolvedAriaDescribedby: H } = n({
|
|
64
|
+
get id() {
|
|
65
|
+
return M.id;
|
|
66
|
+
},
|
|
67
|
+
get size() {
|
|
68
|
+
return M.size ?? I?.size.value;
|
|
69
|
+
},
|
|
70
|
+
get disabled() {
|
|
71
|
+
return I?.disabled.value || M.disabled;
|
|
72
|
+
},
|
|
73
|
+
get status() {
|
|
74
|
+
return M.status ?? I?.status.value;
|
|
75
|
+
},
|
|
76
|
+
get ariaDescribedby() {
|
|
77
|
+
return M.ariaDescribedby;
|
|
78
|
+
}
|
|
79
|
+
}, { register: !I }), U = y(null), W = y(null), G = y(!1), K = null, q = o(() => !!(M.label || F.default)), J = o(() => M.name ?? I?.name.value), Y = o(() => I ? I.modelValue.value.some((e) => e === M.value) : M.modelValue), X = o(() => [
|
|
80
|
+
"bing-checkbox",
|
|
81
|
+
typeof R.value == "string" ? `bing-checkbox--${R.value}` : void 0,
|
|
82
|
+
`bing-checkbox--${M.shape}`,
|
|
83
|
+
`bing-checkbox--${M.tone}`,
|
|
84
|
+
`bing-checkbox--status-${B.value}`,
|
|
85
|
+
{
|
|
86
|
+
"is-checked": Y.value,
|
|
87
|
+
"is-indeterminate": M.indeterminate,
|
|
88
|
+
"is-disabled": z.value,
|
|
89
|
+
"is-invalid": B.value === "error",
|
|
90
|
+
"is-decorative": M.decorative,
|
|
91
|
+
"is-check-exiting": G.value,
|
|
92
|
+
"has-label": q.value && !M.decorative
|
|
93
|
+
}
|
|
94
|
+
]), Z = o(() => {
|
|
95
|
+
if (typeof R.value == "number") return {
|
|
96
|
+
"--bing-checkbox-size": `${R.value}px`,
|
|
97
|
+
"--bing-checkbox-radius": M.shape === "circle" ? "50%" : `${Math.max(2, Math.round(R.value * .22))}px`
|
|
98
|
+
};
|
|
99
|
+
});
|
|
100
|
+
function Q() {
|
|
101
|
+
D.killTweensOf([U.value, W.value].filter((e) => !!e));
|
|
102
|
+
}
|
|
103
|
+
function $(e, t, n, r) {
|
|
104
|
+
if (ee()) {
|
|
105
|
+
G.value = !1;
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
let i = U.value, a = W.value;
|
|
109
|
+
if (!i || !a) return;
|
|
110
|
+
let o = e && !t, s = n && !r;
|
|
111
|
+
Q(), G.value = !1, o ? D.fromTo(i, {
|
|
112
|
+
autoAlpha: 0,
|
|
113
|
+
rotation: -18,
|
|
114
|
+
scale: .18
|
|
115
|
+
}, {
|
|
116
|
+
autoAlpha: 1,
|
|
117
|
+
rotation: 0,
|
|
118
|
+
scale: 1,
|
|
119
|
+
duration: .28,
|
|
120
|
+
ease: "back.out(3.4)",
|
|
121
|
+
clearProps: "transform,opacity,visibility",
|
|
122
|
+
overwrite: !0
|
|
123
|
+
}) : s && (G.value = !0, D.fromTo(i, {
|
|
124
|
+
autoAlpha: 1,
|
|
125
|
+
rotation: 0,
|
|
126
|
+
scale: 1
|
|
127
|
+
}, {
|
|
128
|
+
autoAlpha: 0,
|
|
129
|
+
rotation: 0,
|
|
130
|
+
scale: .32,
|
|
131
|
+
duration: .18,
|
|
132
|
+
ease: "power2.in",
|
|
133
|
+
clearProps: "transform,opacity,visibility",
|
|
134
|
+
overwrite: !0,
|
|
135
|
+
onComplete: () => {
|
|
136
|
+
G.value = !1;
|
|
137
|
+
}
|
|
138
|
+
})), t ? D.fromTo(a, {
|
|
139
|
+
autoAlpha: 0,
|
|
140
|
+
scaleX: .2
|
|
141
|
+
}, {
|
|
142
|
+
autoAlpha: 1,
|
|
143
|
+
scaleX: 1,
|
|
144
|
+
duration: .2,
|
|
145
|
+
ease: "back.out(2.4)",
|
|
146
|
+
clearProps: "transform,opacity,visibility",
|
|
147
|
+
overwrite: !0
|
|
148
|
+
}) : r && D.fromTo(a, {
|
|
149
|
+
autoAlpha: 1,
|
|
150
|
+
scaleX: 1
|
|
151
|
+
}, {
|
|
152
|
+
autoAlpha: 0,
|
|
153
|
+
scaleX: .2,
|
|
154
|
+
duration: .12,
|
|
155
|
+
ease: "power2.in",
|
|
156
|
+
clearProps: "transform,opacity,visibility",
|
|
157
|
+
overwrite: !0
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
function te(e) {
|
|
161
|
+
if (e.defaultPrevented || z.value || M.decorative) return;
|
|
162
|
+
let t = e.currentTarget.parentElement?.querySelector(".bing-checkbox__control");
|
|
163
|
+
P(e, t);
|
|
164
|
+
}
|
|
165
|
+
function ne(e) {
|
|
166
|
+
let t = e.target.checked;
|
|
167
|
+
if (K = {
|
|
168
|
+
checked: t,
|
|
169
|
+
indeterminate: M.indeterminate
|
|
170
|
+
}, $(t, M.indeterminate, Y.value, M.indeterminate), I && M.value !== void 0) {
|
|
171
|
+
I.updateValue(M.value, t, e);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
N("update:modelValue", t), N("change", t, e), L?.handleControlChange();
|
|
175
|
+
}
|
|
176
|
+
function re(e) {
|
|
177
|
+
N("blur", e), I?.handleCheckboxBlur(e), I || L?.handleControlBlur();
|
|
178
|
+
}
|
|
179
|
+
return T(() => [Y.value, M.indeterminate], ([e, t], [n, r]) => {
|
|
180
|
+
if (K?.checked === e && K.indeterminate === t) {
|
|
181
|
+
K = null;
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
K = null, $(e, t, n, r);
|
|
185
|
+
}, { flush: "post" }), _(Q), (e, t) => (v(), s(x(p.decorative ? "span" : "label"), {
|
|
186
|
+
class: h(X.value),
|
|
187
|
+
style: g(Z.value),
|
|
188
|
+
"aria-hidden": p.decorative || void 0
|
|
189
|
+
}, {
|
|
190
|
+
default: E(() => [
|
|
191
|
+
p.decorative ? c("", !0) : (v(), l("input", {
|
|
192
|
+
key: 0,
|
|
193
|
+
class: "bing-checkbox__input",
|
|
194
|
+
id: C(V),
|
|
195
|
+
type: "checkbox",
|
|
196
|
+
checked: Y.value,
|
|
197
|
+
indeterminate: p.indeterminate,
|
|
198
|
+
disabled: C(z),
|
|
199
|
+
name: J.value,
|
|
200
|
+
value: p.value,
|
|
201
|
+
"aria-label": p.ariaLabel || void 0,
|
|
202
|
+
"aria-describedby": C(H),
|
|
203
|
+
"aria-invalid": C(B) === "error" || void 0,
|
|
204
|
+
onChange: ne,
|
|
205
|
+
onClick: te,
|
|
206
|
+
onFocus: t[0] ||= (e) => N("focus", e),
|
|
207
|
+
onBlur: re
|
|
208
|
+
}, null, 40, O)),
|
|
209
|
+
u("span", k, [u("span", {
|
|
210
|
+
ref_key: "checkRef",
|
|
211
|
+
ref: U,
|
|
212
|
+
class: "bing-checkbox__check"
|
|
213
|
+
}, [f(i, {
|
|
214
|
+
icon: C(r),
|
|
215
|
+
size: "xs",
|
|
216
|
+
"stroke-width": 2.25
|
|
217
|
+
}, null, 8, ["icon"])], 512), u("span", {
|
|
218
|
+
ref_key: "mixedRef",
|
|
219
|
+
ref: W,
|
|
220
|
+
class: "bing-checkbox__mixed"
|
|
221
|
+
}, null, 512)]),
|
|
222
|
+
!p.decorative && q.value ? (v(), l("span", A, [b(e.$slots, "default", {}, () => [d(S(p.label), 1)], !0)])) : c("", !0)
|
|
223
|
+
]),
|
|
224
|
+
_: 3
|
|
225
|
+
}, 8, [
|
|
226
|
+
"class",
|
|
227
|
+
"style",
|
|
228
|
+
"aria-hidden"
|
|
229
|
+
]));
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
//#endregion
|
|
233
|
+
export { j as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./BingCheckboxGroup.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/BingCheckboxGroup/BingCheckboxGroup.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-eeb67963"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -4,16 +4,18 @@ type __VLS_Slots = {} & {
|
|
|
4
4
|
default?: (props: typeof __VLS_1) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import('vue').DefineComponent<BingCheckboxGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
change: (value: BingCheckboxGroupValue[], event: Event) => any;
|
|
8
7
|
blur: (event: FocusEvent) => any;
|
|
9
8
|
focus: (event: FocusEvent) => any;
|
|
9
|
+
change: (value: BingCheckboxGroupValue[], event: Event) => any;
|
|
10
10
|
"update:modelValue": (value: BingCheckboxGroupValue[]) => any;
|
|
11
11
|
}, string, import('vue').PublicProps, Readonly<BingCheckboxGroupProps> & Readonly<{
|
|
12
|
-
onChange?: ((value: BingCheckboxGroupValue[], event: Event) => any) | undefined;
|
|
13
12
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
14
13
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
14
|
+
onChange?: ((value: BingCheckboxGroupValue[], event: Event) => any) | undefined;
|
|
15
15
|
"onUpdate:modelValue"?: ((value: BingCheckboxGroupValue[]) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
|
+
name: string;
|
|
18
|
+
status: "default" | "error" | "success" | "warning";
|
|
17
19
|
disabled: boolean;
|
|
18
20
|
direction: import('./BingCheckboxGroup.types').BingCheckboxGroupDirection;
|
|
19
21
|
id: string;
|
|
@@ -21,8 +23,6 @@ declare const __VLS_base: import('vue').DefineComponent<BingCheckboxGroupProps,
|
|
|
21
23
|
ariaLabel: string;
|
|
22
24
|
modelValue: BingCheckboxGroupValue[];
|
|
23
25
|
ariaDescribedby: string;
|
|
24
|
-
status: "default" | "error" | "success" | "warning";
|
|
25
|
-
name: string;
|
|
26
26
|
options: BingCheckboxGroupOption[];
|
|
27
27
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
package/dist/components/BingCheckboxGroup/BingCheckboxGroup.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { isolateFormControls as e, useFormControl as t } from "../BingForm/useFormControl.js";
|
|
2
|
+
import { bingCheckboxGroupContextKey as n } from "./BingCheckboxGroup.context.js";
|
|
3
|
+
import r from "../BingCheckbox/BingCheckbox.js";
|
|
4
|
+
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, defineComponent as u, normalizeClass as d, openBlock as f, provide as p, ref as m, renderList as h, renderSlot as g, toDisplayString as _, unref as v, useId as y, withCtx as b } from "vue";
|
|
5
|
+
//#region src/components/BingCheckboxGroup/BingCheckboxGroup.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var x = [
|
|
7
|
+
"id",
|
|
8
|
+
"aria-label",
|
|
9
|
+
"aria-labelledby",
|
|
10
|
+
"aria-describedby",
|
|
11
|
+
"aria-invalid"
|
|
12
|
+
], S = { class: "bing-checkbox-group__option" }, C = { class: "bing-checkbox-group__option-label" }, w = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "bing-checkbox-group__option-description"
|
|
15
|
+
}, T = /* @__PURE__ */ u({
|
|
16
|
+
__name: "BingCheckboxGroup",
|
|
17
|
+
props: {
|
|
18
|
+
id: { default: void 0 },
|
|
19
|
+
modelValue: { default: () => [] },
|
|
20
|
+
options: { default: () => [] },
|
|
21
|
+
disabled: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: void 0
|
|
24
|
+
},
|
|
25
|
+
size: { default: void 0 },
|
|
26
|
+
direction: { default: "wrap" },
|
|
27
|
+
name: { default: void 0 },
|
|
28
|
+
ariaLabel: { default: void 0 },
|
|
29
|
+
ariaDescribedby: { default: void 0 },
|
|
30
|
+
status: { default: void 0 }
|
|
31
|
+
},
|
|
32
|
+
emits: [
|
|
33
|
+
"update:modelValue",
|
|
34
|
+
"change",
|
|
35
|
+
"focus",
|
|
36
|
+
"blur"
|
|
37
|
+
],
|
|
38
|
+
setup(u, { emit: T }) {
|
|
39
|
+
let E = u, D = T, { formItem: O, resolvedId: k, resolvedSize: A, resolvedDisabled: j, resolvedStatus: M, resolvedAriaDescribedby: N, resolvedAriaLabelledby: P } = t(E, { group: !0 });
|
|
40
|
+
e();
|
|
41
|
+
let F = `bing-checkbox-group-${y()}`, I = m(null), L = m(!1), R = a(() => E.name ?? F), z = a(() => E.modelValue ?? []), B = a(() => [
|
|
42
|
+
"bing-checkbox-group",
|
|
43
|
+
`bing-checkbox-group--${A.value}`,
|
|
44
|
+
`bing-checkbox-group--${E.direction}`,
|
|
45
|
+
`bing-checkbox-group--status-${M.value}`,
|
|
46
|
+
{
|
|
47
|
+
"is-disabled": j.value,
|
|
48
|
+
"is-invalid": M.value === "error"
|
|
49
|
+
}
|
|
50
|
+
]);
|
|
51
|
+
function V(e) {
|
|
52
|
+
return j.value || !!e.disabled;
|
|
53
|
+
}
|
|
54
|
+
function H(e, t, n) {
|
|
55
|
+
if (j.value) return;
|
|
56
|
+
let r = z.value, i = t ? r.includes(e) ? r : [...r, e] : r.filter((t) => t !== e);
|
|
57
|
+
D("update:modelValue", i), D("change", i, n), O?.handleControlChange();
|
|
58
|
+
}
|
|
59
|
+
function U(e) {
|
|
60
|
+
L.value || (L.value = !0, D("focus", e));
|
|
61
|
+
}
|
|
62
|
+
function W(e) {
|
|
63
|
+
let t = I.value, n = e.relatedTarget;
|
|
64
|
+
t && n instanceof Node && t.contains(n) || (L.value = !1, D("blur", e), O?.handleControlBlur());
|
|
65
|
+
}
|
|
66
|
+
function G(e) {
|
|
67
|
+
W(e);
|
|
68
|
+
}
|
|
69
|
+
return p(n, {
|
|
70
|
+
modelValue: z,
|
|
71
|
+
disabled: j,
|
|
72
|
+
size: A,
|
|
73
|
+
name: R,
|
|
74
|
+
status: M,
|
|
75
|
+
updateValue: H,
|
|
76
|
+
handleCheckboxBlur: G,
|
|
77
|
+
isOptionDisabled: V
|
|
78
|
+
}), (e, t) => (f(), c("div", {
|
|
79
|
+
id: v(k),
|
|
80
|
+
ref_key: "rootRef",
|
|
81
|
+
ref: I,
|
|
82
|
+
class: d(B.value),
|
|
83
|
+
role: "group",
|
|
84
|
+
"aria-label": u.ariaLabel || void 0,
|
|
85
|
+
"aria-labelledby": u.ariaLabel ? void 0 : v(P),
|
|
86
|
+
"aria-describedby": v(N),
|
|
87
|
+
"aria-invalid": v(M) === "error" || void 0,
|
|
88
|
+
onFocusin: U
|
|
89
|
+
}, [g(e.$slots, "default", {}, () => [(f(!0), c(i, null, h(u.options, (e) => (f(), o(r, {
|
|
90
|
+
key: String(e.value),
|
|
91
|
+
value: e.value,
|
|
92
|
+
label: e.label,
|
|
93
|
+
disabled: V(e)
|
|
94
|
+
}, {
|
|
95
|
+
default: b(() => [l("span", S, [l("span", C, _(e.label), 1), e.description ? (f(), c("span", w, _(e.description), 1)) : s("", !0)])]),
|
|
96
|
+
_: 2
|
|
97
|
+
}, 1032, [
|
|
98
|
+
"value",
|
|
99
|
+
"label",
|
|
100
|
+
"disabled"
|
|
101
|
+
]))), 128))], !0)], 42, x));
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
//#endregion
|
|
105
|
+
export { T as default };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
//#region src/components/BingCodeBlock/BingCodeBlock.highlight.ts
|
|
2
|
+
var e = {
|
|
3
|
+
javascript: () => import("shiki/langs/javascript.mjs"),
|
|
4
|
+
typescript: () => import("shiki/langs/typescript.mjs"),
|
|
5
|
+
jsx: () => import("shiki/langs/jsx.mjs"),
|
|
6
|
+
tsx: () => import("shiki/langs/tsx.mjs"),
|
|
7
|
+
vue: () => import("shiki/langs/vue.mjs"),
|
|
8
|
+
html: () => import("shiki/langs/html.mjs"),
|
|
9
|
+
css: () => import("shiki/langs/css.mjs"),
|
|
10
|
+
scss: () => import("shiki/langs/scss.mjs"),
|
|
11
|
+
json: () => import("shiki/langs/json.mjs"),
|
|
12
|
+
markdown: () => import("shiki/langs/markdown.mjs"),
|
|
13
|
+
shellscript: () => import("shiki/langs/shellscript.mjs"),
|
|
14
|
+
yaml: () => import("shiki/langs/yaml.mjs")
|
|
15
|
+
}, t = {
|
|
16
|
+
js: "javascript",
|
|
17
|
+
cjs: "javascript",
|
|
18
|
+
mjs: "javascript",
|
|
19
|
+
ts: "typescript",
|
|
20
|
+
cts: "typescript",
|
|
21
|
+
mts: "typescript",
|
|
22
|
+
md: "markdown",
|
|
23
|
+
bash: "shellscript",
|
|
24
|
+
sh: "shellscript",
|
|
25
|
+
shell: "shellscript",
|
|
26
|
+
zsh: "shellscript",
|
|
27
|
+
yml: "yaml"
|
|
28
|
+
}, n = {
|
|
29
|
+
"github-dark": () => import("shiki/themes/github-dark.mjs"),
|
|
30
|
+
"github-light": () => import("shiki/themes/github-light.mjs"),
|
|
31
|
+
"dark-plus": () => import("shiki/themes/dark-plus.mjs"),
|
|
32
|
+
"light-plus": () => import("shiki/themes/light-plus.mjs"),
|
|
33
|
+
"vitesse-dark": () => import("shiki/themes/vitesse-dark.mjs"),
|
|
34
|
+
"vitesse-light": () => import("shiki/themes/vitesse-light.mjs")
|
|
35
|
+
}, r, i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
|
|
36
|
+
function o() {
|
|
37
|
+
return r ??= Promise.all([import("shiki/core"), import("shiki/engine/javascript")]).then(([{ createHighlighterCore: e }, { createJavaScriptRegexEngine: t }]) => e({
|
|
38
|
+
langs: [],
|
|
39
|
+
themes: [],
|
|
40
|
+
engine: t()
|
|
41
|
+
})).catch((e) => {
|
|
42
|
+
throw r = void 0, e;
|
|
43
|
+
}), r;
|
|
44
|
+
}
|
|
45
|
+
function s(e, t, n) {
|
|
46
|
+
let r = e.get(t);
|
|
47
|
+
return r || (r = n().catch((n) => {
|
|
48
|
+
throw e.delete(t), n;
|
|
49
|
+
}), e.set(t, r)), r;
|
|
50
|
+
}
|
|
51
|
+
function c(n, r) {
|
|
52
|
+
let i = t[r] ?? r;
|
|
53
|
+
return i === "markdown" ? Promise.all(Object.keys(e).map((e) => l(n, e))) : l(n, i);
|
|
54
|
+
}
|
|
55
|
+
function l(t, n) {
|
|
56
|
+
let r = e[n];
|
|
57
|
+
return r ? s(i, n, () => t.loadLanguage(r)) : Promise.resolve();
|
|
58
|
+
}
|
|
59
|
+
function u(e, t) {
|
|
60
|
+
let r = n[t];
|
|
61
|
+
return r ? s(a, t, () => e.loadTheme(r)) : Promise.resolve();
|
|
62
|
+
}
|
|
63
|
+
async function d(e, t, n) {
|
|
64
|
+
let r = await o();
|
|
65
|
+
return await Promise.all([c(r, t), u(r, n)]), r.codeToTokens(e, {
|
|
66
|
+
lang: t,
|
|
67
|
+
theme: n
|
|
68
|
+
}).tokens.map((e, t) => ({
|
|
69
|
+
number: t + 1,
|
|
70
|
+
tokens: e.map((e) => ({
|
|
71
|
+
content: e.content,
|
|
72
|
+
color: e.color,
|
|
73
|
+
fontStyle: e.fontStyle
|
|
74
|
+
}))
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
export { d as highlightCode };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./BingCodeBlock.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/BingCodeBlock/BingCodeBlock.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-0a48810e"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|