@moubing/bing-ui 0.11.2 → 0.12.1

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.
Files changed (210) hide show
  1. package/README.md +300 -171
  2. package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
  3. package/dist/bing-ui.css +1 -1
  4. package/dist/components/BingAnimatedText/BingAnimatedText.js +7 -0
  5. package/dist/components/BingAnimatedText/BingAnimatedText.vue_vue_type_script_setup_true_lang.js +194 -0
  6. package/dist/components/BingAppSwitcherTransition/BingAppSwitcherTransition.js +7 -0
  7. package/dist/components/BingAppSwitcherTransition/BingAppSwitcherTransition.vue_vue_type_script_setup_true_lang.js +244 -0
  8. package/dist/components/BingAutocomplete/BingAutocomplete.js +7 -0
  9. package/dist/components/BingAutocomplete/BingAutocomplete.vue.d.ts +4 -4
  10. package/dist/components/BingAutocomplete/BingAutocomplete.vue_vue_type_script_setup_true_lang.js +560 -0
  11. package/dist/components/BingButton/BingButton.js +7 -0
  12. package/dist/components/BingButton/BingButton.vue.d.ts +2 -2
  13. package/dist/components/BingButton/BingButton.vue_vue_type_script_setup_true_lang.js +200 -0
  14. package/dist/components/BingCard/BingCard.js +7 -0
  15. package/dist/components/BingCard/BingCard.vue_vue_type_script_setup_true_lang.js +481 -0
  16. package/dist/components/BingCarouselTransition/BingCarouselTransition.js +7 -0
  17. package/dist/components/BingCarouselTransition/BingCarouselTransition.vue_vue_type_script_setup_true_lang.js +174 -0
  18. package/dist/components/BingCheckbox/BingCheckbox.js +7 -0
  19. package/dist/components/BingCheckbox/BingCheckbox.vue.d.ts +4 -4
  20. package/dist/components/BingCheckbox/BingCheckbox.vue_vue_type_script_setup_true_lang.js +233 -0
  21. package/dist/components/BingCheckboxGroup/BingCheckboxGroup.context.js +4 -0
  22. package/dist/components/BingCheckboxGroup/BingCheckboxGroup.js +7 -0
  23. package/dist/components/BingCheckboxGroup/BingCheckboxGroup.vue.d.ts +4 -4
  24. package/dist/components/BingCheckboxGroup/BingCheckboxGroup.vue_vue_type_script_setup_true_lang.js +105 -0
  25. package/dist/components/BingCodeBlock/BingCodeBlock.highlight.js +78 -0
  26. package/dist/components/BingCodeBlock/BingCodeBlock.js +7 -0
  27. package/dist/components/BingCodeBlock/BingCodeBlock.vue_vue_type_script_setup_true_lang.js +347 -0
  28. package/dist/components/BingColorPicker/BingColorPicker.js +7 -0
  29. package/dist/components/BingColorPicker/BingColorPicker.utils.d.ts +70 -0
  30. package/dist/components/BingColorPicker/BingColorPicker.utils.js +265 -0
  31. package/dist/components/BingColorPicker/BingColorPicker.vue.d.ts +7 -7
  32. package/dist/components/BingColorPicker/BingColorPicker.vue_vue_type_script_setup_true_lang.js +540 -0
  33. package/dist/components/BingColorPicker/BingColorPickerFormatEditor.js +7 -0
  34. package/dist/components/BingColorPicker/BingColorPickerFormatEditor.vue.d.ts +27 -0
  35. package/dist/components/BingColorPicker/BingColorPickerFormatEditor.vue_vue_type_script_setup_true_lang.js +142 -0
  36. package/dist/components/BingColorPicker/BingColorPickerSpectrum.js +7 -0
  37. package/dist/components/BingColorPicker/BingColorPickerSpectrum.vue.d.ts +26 -0
  38. package/dist/components/BingColorPicker/BingColorPickerSpectrum.vue_vue_type_script_setup_true_lang.js +168 -0
  39. package/dist/components/BingConfigProvider/BingConfigProvider.js +5 -0
  40. package/dist/components/BingConfigProvider/BingConfigProvider.types.d.ts +5 -0
  41. package/dist/components/BingConfigProvider/BingConfigProvider.vue.d.ts +18 -0
  42. package/dist/components/BingConfigProvider/BingConfigProvider.vue_vue_type_script_setup_true_lang.js +18 -0
  43. package/dist/components/BingConfigProvider/index.d.ts +3 -0
  44. package/dist/components/BingCursor/BingCursor.controller.js +240 -0
  45. package/dist/components/BingCursor/BingCursor.js +7 -0
  46. package/dist/components/BingCursor/BingCursor.native.js +20 -0
  47. package/dist/components/BingCursor/BingCursor.presets.js +60 -0
  48. package/dist/components/BingCursor/BingCursor.shapes.js +83 -0
  49. package/dist/components/BingCursor/BingCursor.styleSource.js +83 -0
  50. package/dist/components/BingCursor/BingCursor.vue_vue_type_script_setup_true_lang.js +73 -0
  51. package/dist/components/BingDatePicker/BingDatePicker.js +7 -0
  52. package/dist/components/BingDatePicker/BingDatePicker.utils.d.ts +26 -0
  53. package/dist/components/BingDatePicker/BingDatePicker.utils.js +137 -0
  54. package/dist/components/BingDatePicker/BingDatePicker.vue.d.ts +14 -14
  55. package/dist/components/BingDatePicker/BingDatePicker.vue_vue_type_script_setup_true_lang.js +804 -0
  56. package/dist/components/BingDatePicker/BingDatePickerCalendar.js +7 -0
  57. package/dist/components/BingDatePicker/BingDatePickerCalendar.vue.d.ts +37 -0
  58. package/dist/components/BingDatePicker/BingDatePickerCalendar.vue_vue_type_script_setup_true_lang.js +248 -0
  59. package/dist/components/BingDatePicker/BingDatePickerTimePanel.js +7 -0
  60. package/dist/components/BingDatePicker/BingDatePickerTimePanel.vue.d.ts +26 -0
  61. package/dist/components/BingDatePicker/BingDatePickerTimePanel.vue_vue_type_script_setup_true_lang.js +97 -0
  62. package/dist/components/BingDeckTransition/BingDeckTransition.js +7 -0
  63. package/dist/components/BingDeckTransition/BingDeckTransition.vue_vue_type_script_setup_true_lang.js +187 -0
  64. package/dist/components/BingDialog/BingDialog.js +7 -0
  65. package/dist/components/BingDialog/BingDialog.vue.d.ts +4 -5
  66. package/dist/components/BingDialog/BingDialog.vue_vue_type_script_setup_true_lang.js +558 -0
  67. package/dist/components/BingDropDown/BingDropDown.context.js +4 -0
  68. package/dist/components/BingDropDown/BingDropDown.js +7 -0
  69. package/dist/components/BingDropDown/BingDropDown.vue.d.ts +1 -2
  70. package/dist/components/BingDropDown/BingDropDown.vue_vue_type_script_setup_true_lang.js +649 -0
  71. package/dist/components/BingDropDown/BingDropDownItem.js +7 -0
  72. package/dist/components/BingDropDown/BingDropDownItem.vue.d.ts +1 -1
  73. package/dist/components/BingDropDown/BingDropDownItem.vue_vue_type_script_setup_true_lang.js +308 -0
  74. package/dist/components/BingFilePreview/BingFilePreview.js +7 -0
  75. package/dist/components/BingFilePreview/BingFilePreview.vue.d.ts +4 -5
  76. package/dist/components/BingFilePreview/BingFilePreview.vue_vue_type_script_setup_true_lang.js +589 -0
  77. package/dist/components/BingForm/BingForm.context.js +7 -0
  78. package/dist/components/BingForm/BingForm.js +7 -0
  79. package/dist/components/BingForm/BingForm.vue.d.ts +0 -1
  80. package/dist/components/BingForm/BingForm.vue_vue_type_script_setup_true_lang.js +300 -0
  81. package/dist/components/BingForm/formFocus.js +13 -0
  82. package/dist/components/BingForm/formTabOrder.js +27 -0
  83. package/dist/components/BingForm/useFormControl.d.ts +1 -1
  84. package/dist/components/BingForm/useFormControl.js +24 -0
  85. package/dist/components/BingForm/useFormNextHint.js +135 -0
  86. package/dist/components/BingFormItem/BingFormItem.js +7 -0
  87. package/dist/components/BingFormItem/BingFormItem.vue.d.ts +1 -1
  88. package/dist/components/BingFormItem/BingFormItem.vue_vue_type_script_setup_true_lang.js +252 -0
  89. package/dist/components/BingIcon/BingIcon.js +7 -0
  90. package/dist/components/BingIcon/BingIcon.vue_vue_type_script_setup_true_lang.js +48 -0
  91. package/dist/components/BingImage/BingImage.js +7 -0
  92. package/dist/components/BingImage/BingImage.vue_vue_type_script_setup_true_lang.js +244 -0
  93. package/dist/components/BingImagePreview/BingImagePreview.js +7 -0
  94. package/dist/components/BingImagePreview/BingImagePreview.vue.d.ts +4 -5
  95. package/dist/components/BingImagePreview/BingImagePreview.vue_vue_type_script_setup_true_lang.js +699 -0
  96. package/dist/components/BingInput/BingInput.js +7 -0
  97. package/dist/components/BingInput/BingInput.vue.d.ts +6 -6
  98. package/dist/components/BingInput/BingInput.vue_vue_type_script_setup_true_lang.js +311 -0
  99. package/dist/components/BingRadio/BingRadio.js +7 -0
  100. package/dist/components/BingRadio/BingRadio.vue.d.ts +4 -4
  101. package/dist/components/BingRadio/BingRadio.vue_vue_type_script_setup_true_lang.js +170 -0
  102. package/dist/components/BingRadioGroup/BingRadioGroup.context.js +4 -0
  103. package/dist/components/BingRadioGroup/BingRadioGroup.js +7 -0
  104. package/dist/components/BingRadioGroup/BingRadioGroup.vue.d.ts +4 -4
  105. package/dist/components/BingRadioGroup/BingRadioGroup.vue_vue_type_script_setup_true_lang.js +125 -0
  106. package/dist/components/BingResizable/BingResizable.js +7 -0
  107. package/dist/components/BingResizable/BingResizable.vue.d.ts +1 -1
  108. package/dist/components/BingResizable/BingResizable.vue_vue_type_script_setup_true_lang.js +555 -0
  109. package/dist/components/BingScrollbar/BingScrollbar.js +7 -0
  110. package/dist/components/BingScrollbar/BingScrollbar.vue.d.ts +2 -2
  111. package/dist/components/BingScrollbar/BingScrollbar.vue_vue_type_script_setup_true_lang.js +398 -0
  112. package/dist/components/BingSelect/BingSelect.js +7 -0
  113. package/dist/components/BingSelect/BingSelect.vue.d.ts +7 -7
  114. package/dist/components/BingSelect/BingSelect.vue_vue_type_script_setup_true_lang.js +1066 -0
  115. package/dist/components/BingSlider/BingSlider.js +7 -0
  116. package/dist/components/BingSlider/BingSlider.vue.d.ts +6 -6
  117. package/dist/components/BingSlider/BingSlider.vue_vue_type_script_setup_true_lang.js +130 -0
  118. package/dist/components/BingSortableList/BingSortableList.js +7 -0
  119. package/dist/components/BingSortableList/BingSortableList.vue_vue_type_script_setup_true_lang.js +334 -0
  120. package/dist/components/BingSortableList/BingSortableListItem.js +7 -0
  121. package/dist/components/BingSortableList/BingSortableListItem.vue_vue_type_script_setup_true_lang.js +76 -0
  122. package/dist/components/BingSplitPane/BingSplitPane.js +7 -0
  123. package/dist/components/BingSplitPane/BingSplitPane.vue_vue_type_script_setup_true_lang.js +167 -0
  124. package/dist/components/BingTable/BingTable.js +7 -0
  125. package/dist/components/BingTable/BingTable.measurements.js +72 -0
  126. package/dist/components/BingTable/BingTable.vue.d.ts +1 -2
  127. package/dist/components/BingTable/BingTable.vue_vue_type_script_setup_true_lang.js +1416 -0
  128. package/dist/components/BingTable/BingTableCellValue.js +7 -0
  129. package/dist/components/BingTable/BingTableCellValue.vue_vue_type_script_setup_true_lang.js +68 -0
  130. package/dist/components/BingTable/BingTableHeaderCell.js +5 -0
  131. package/dist/components/BingTable/BingTableHeaderCell.vue_vue_type_script_setup_true_lang.js +45 -0
  132. package/dist/components/BingTable/BingTableHeaderContent.js +7 -0
  133. package/dist/components/BingTable/BingTableHeaderContent.vue_vue_type_script_setup_true_lang.js +110 -0
  134. package/dist/components/BingTable/useTableColumns.js +126 -0
  135. package/dist/components/BingTableColumnControls/BingTableColumnControls.js +7 -0
  136. package/dist/components/BingTableColumnControls/BingTableColumnControls.vue.d.ts +1 -1
  137. package/dist/components/BingTableColumnControls/BingTableColumnControls.vue_vue_type_script_setup_true_lang.js +251 -0
  138. package/dist/components/BingTabs/BingTabs.js +7 -0
  139. package/dist/components/BingTabs/BingTabs.vue.d.ts +2 -3
  140. package/dist/components/BingTabs/BingTabs.vue_vue_type_script_setup_true_lang.js +320 -0
  141. package/dist/components/BingTag/BingTag.js +7 -0
  142. package/dist/components/BingTag/BingTag.vue.d.ts +0 -1
  143. package/dist/components/BingTag/BingTag.vue_vue_type_script_setup_true_lang.js +65 -0
  144. package/dist/components/BingTextarea/BingTextarea.js +7 -0
  145. package/dist/components/BingTextarea/BingTextarea.vue.d.ts +6 -6
  146. package/dist/components/BingTextarea/BingTextarea.vue_vue_type_script_setup_true_lang.js +243 -0
  147. package/dist/components/BingToast/BingToast.js +7 -0
  148. package/dist/components/BingToast/BingToast.service.js +132 -0
  149. package/dist/components/BingToast/BingToast.types.d.ts +1 -1
  150. package/dist/components/BingToast/BingToast.types.js +19 -0
  151. package/dist/components/BingToast/BingToast.vue.d.ts +0 -1
  152. package/dist/components/BingToast/BingToast.vue_vue_type_script_setup_true_lang.js +307 -0
  153. package/dist/components/BingTooltip/BingTooltip.js +7 -0
  154. package/dist/components/BingTooltip/BingTooltip.shared.js +14 -0
  155. package/dist/components/BingTooltip/BingTooltip.vue.d.ts +4 -5
  156. package/dist/components/BingTooltip/BingTooltip.vue_vue_type_script_setup_true_lang.js +572 -0
  157. package/dist/components/BingTreeSelect/BingTreeSelect.js +7 -0
  158. package/dist/components/BingTreeSelect/BingTreeSelect.vue.d.ts +7 -7
  159. package/dist/components/BingTreeSelect/BingTreeSelect.vue_vue_type_script_setup_true_lang.js +1274 -0
  160. package/dist/components/index.d.ts +1 -0
  161. package/dist/icons/LICENSE-lucide.txt +39 -0
  162. package/dist/icons/createIcon.d.ts +8 -0
  163. package/dist/icons/createIcon.js +36 -0
  164. package/dist/icons/icons.d.ts +51 -0
  165. package/dist/icons/icons.js +252 -0
  166. package/dist/icons/index.d.ts +3 -0
  167. package/dist/index.js +48 -0
  168. package/dist/motion/clickParticles.d.ts +1 -1
  169. package/dist/motion/clickParticles2.js +66 -0
  170. package/dist/motion/index.d.ts +1 -1
  171. package/dist/motion/index.js +17 -0
  172. package/dist/motion/liquidHover.js +36 -0
  173. package/dist/motion/optionDetailMotion.d.ts +7 -1
  174. package/dist/motion/optionDetailMotion.js +74 -0
  175. package/dist/motion/panelMotion.js +19 -0
  176. package/dist/motion/reducedMotion.d.ts +16 -0
  177. package/dist/motion/reducedMotion.js +28 -0
  178. package/dist/motion/selectPanelMotion.js +115 -0
  179. package/dist/motion/smoothScroll.d.ts +2 -0
  180. package/dist/motion/smoothScroll.js +276 -0
  181. package/dist/motion/useClickFeedback.js +47 -0
  182. package/dist/motion/useTextControlCaret.js +136 -0
  183. package/dist/utils/clipboard.d.ts +9 -0
  184. package/dist/utils/clipboard.js +16 -0
  185. package/dist/utils/config.d.ts +42 -0
  186. package/dist/utils/config.js +37 -0
  187. package/dist/utils/controlAttrs.js +37 -0
  188. package/dist/utils/floating.d.ts +86 -0
  189. package/dist/utils/floating.js +99 -0
  190. package/dist/utils/glass.js +25 -0
  191. package/dist/utils/overlay.js +94 -0
  192. package/dist/utils/scrollLock.js +44 -0
  193. package/dist/utils/search.d.ts +16 -0
  194. package/dist/utils/search.js +23 -0
  195. package/dist/utils/useClientReady.js +10 -0
  196. package/dist/utils/useDeferredBlurValidation.d.ts +18 -0
  197. package/dist/utils/useDeferredBlurValidation.js +34 -0
  198. package/dist/utils/useKeyboardScrollSync.d.ts +11 -0
  199. package/dist/utils/useKeyboardScrollSync.js +28 -0
  200. package/dist/utils/useOptionDetailPanel.d.ts +50 -0
  201. package/dist/utils/useOptionDetailPanel.js +180 -0
  202. package/dist/utils/useOutsidePointerDown.d.ts +8 -0
  203. package/dist/utils/useOutsidePointerDown.js +17 -0
  204. package/dist/utils/useSearchShortcutFocus.d.ts +18 -0
  205. package/dist/utils/useSearchShortcutFocus.js +47 -0
  206. package/dist/utils/useVirtualList.d.ts +42 -0
  207. package/dist/utils/useVirtualList.js +74 -0
  208. package/package.json +15 -9
  209. package/dist/bing-ui.es.js +0 -31278
  210. package/dist/bing-ui.umd.js +0 -229
@@ -0,0 +1,7 @@
1
+ import e from "./BingAnimatedText.vue_vue_type_script_setup_true_lang.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ //#region src/components/BingAnimatedText/BingAnimatedText.vue
5
+ var n = /* @__PURE__ */ t(e, [["__scopeId", "data-v-cd2a4057"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,194 @@
1
+ import { useReducedMotion as e } from "../../motion/reducedMotion.js";
2
+ import { computed as t, createElementBlock as n, createElementVNode as r, defineComponent as i, nextTick as a, normalizeClass as o, normalizeStyle as s, onMounted as c, onUnmounted as l, onUpdated as u, openBlock as d, ref as f, renderSlot as p, watch as m } from "vue";
3
+ import { gsap as h } from "gsap";
4
+ import { SplitText as g } from "gsap/SplitText";
5
+ //#region src/components/BingAnimatedText/BingAnimatedText.vue?vue&type=script&setup=true&lang.ts
6
+ var _ = /* @__PURE__ */ i({
7
+ __name: "BingAnimatedText",
8
+ props: {
9
+ effect: { default: "none" },
10
+ trigger: { default: "always" },
11
+ disabled: {
12
+ type: Boolean,
13
+ default: !1
14
+ },
15
+ shineColor: { default: void 0 },
16
+ shineBaseColor: { default: void 0 },
17
+ shineSpeed: { default: 3 },
18
+ shineDelay: { default: 0 },
19
+ shineInterval: { default: 1.6 },
20
+ shineDirection: { default: "left" },
21
+ shineAngle: { default: 120 },
22
+ jumpY: { default: -6 },
23
+ jumpStagger: { default: .035 },
24
+ jumpDuration: { default: .34 },
25
+ jumpEase: { default: "power2.out" },
26
+ jumpReturnEase: { default: "back.out(2.4)" },
27
+ jumpRepeatDelay: { default: 1.2 }
28
+ },
29
+ setup(i) {
30
+ let _ = e({ onChange: () => X() }), v = !1, y = i, b = f(null), x = f(null), S = f(null), C, w, T, E, D, O = !1, k = !1, A = !1, j = "", M = t(() => y.effect !== "none" && !y.disabled), N = t(() => M.value && y.effect === "shine"), P = t(() => M.value && y.effect === "jump"), F = t(() => [
31
+ "bing-animated-text",
32
+ `bing-animated-text--${y.effect}`,
33
+ {
34
+ "is-disabled": y.disabled,
35
+ "is-shine-active": N.value,
36
+ [`bing-animated-text--shine-${y.trigger}`]: N.value,
37
+ [`bing-animated-text--shine-direction-${y.shineDirection}`]: N.value,
38
+ [`bing-animated-text--jump-${y.trigger}`]: P.value
39
+ }
40
+ ]), I = t(() => {
41
+ let e = {};
42
+ return P.value && (e["--animated-text-jump-room"] = `${Math.max(2, Math.abs(Math.min(0, y.jumpY)) + 2)}px`), N.value ? (e["--animated-text-shine-angle"] = `${y.shineAngle}deg`, y.shineColor && (e["--animated-text-shine-color"] = y.shineColor), y.shineBaseColor && (e["--animated-text-shine-base-color"] = y.shineBaseColor), e) : e;
43
+ });
44
+ function L() {
45
+ return typeof window < "u" && typeof document < "u";
46
+ }
47
+ function R() {
48
+ v ||= (h.registerPlugin(g), !0);
49
+ }
50
+ function z() {
51
+ O = !1, b.value?.removeAttribute("data-jump-playing"), b.value?.removeAttribute("data-jump-ready"), T?.kill(), T = void 0, C?.revert(), C = void 0, w?.revert(), w = void 0, S.value?.replaceChildren();
52
+ }
53
+ function B() {
54
+ return y.shineDirection === "left" ? {
55
+ start: "150% 0",
56
+ end: "-150% 0"
57
+ } : {
58
+ start: "-150% 0",
59
+ end: "150% 0"
60
+ };
61
+ }
62
+ function V() {
63
+ k = !1, b.value?.removeAttribute("data-shine-playing"), E?.kill(), E = void 0, D?.kill(), D = void 0, x.value && h.set(x.value, { clearProps: "backgroundPosition" });
64
+ }
65
+ function H() {
66
+ y.trigger !== "always" || !N.value || _() || (D?.kill(), D = h.delayedCall(Math.max(0, y.shineInterval), () => {
67
+ D = void 0, U(0);
68
+ }));
69
+ }
70
+ function U(e = y.shineDelay) {
71
+ let t = x.value;
72
+ if (k || D || !t || !N.value || _()) return;
73
+ let n = B();
74
+ k = !0, b.value?.setAttribute("data-shine-playing", "true"), h.set(t, { backgroundPosition: n.start }), E = h.to(t, {
75
+ backgroundPosition: n.end,
76
+ duration: Math.max(.1, y.shineSpeed),
77
+ delay: Math.max(0, e),
78
+ ease: "none",
79
+ overwrite: !0,
80
+ onComplete: () => {
81
+ h.set(t, { backgroundPosition: n.start }), k = !1, E = void 0, b.value?.removeAttribute("data-shine-playing"), H();
82
+ }
83
+ });
84
+ }
85
+ function W() {
86
+ V(), !(!N.value || !x.value || _()) && (h.set(x.value, { backgroundPosition: B().start }), (y.trigger === "always" || y.trigger === "once") && U());
87
+ }
88
+ function G() {
89
+ if (O || !C?.chars.length || !P.value || _()) return;
90
+ let e = Math.max(.1, y.jumpDuration), t = y.trigger === "always";
91
+ O = !0, b.value?.setAttribute("data-jump-playing", "true"), T = h.timeline({
92
+ repeat: t ? -1 : 0,
93
+ repeatDelay: Math.max(0, y.jumpRepeatDelay),
94
+ onComplete: () => {
95
+ O = !1, T = void 0, b.value?.removeAttribute("data-jump-playing");
96
+ }
97
+ }), T.fromTo(C.chars, { y: 0 }, {
98
+ keyframes: [{
99
+ y: y.jumpY,
100
+ duration: e * .45,
101
+ ease: y.jumpEase
102
+ }, {
103
+ y: 0,
104
+ duration: e * .55,
105
+ ease: y.jumpReturnEase
106
+ }],
107
+ stagger: Math.max(0, y.jumpStagger),
108
+ overwrite: !0
109
+ });
110
+ }
111
+ function K() {
112
+ z();
113
+ let e = x.value, t = S.value, n = b.value;
114
+ j = e?.innerHTML ?? "", !(!P.value || !e || !t || !n || _()) && (R(), t.innerHTML = j, t.querySelectorAll("[id]").forEach((e) => e.removeAttribute("id")), w = h.context(() => {
115
+ C = g.create(t, {
116
+ type: "words, chars",
117
+ tag: "span",
118
+ aria: "hidden",
119
+ wordsClass: "bing-animated-text__word",
120
+ charsClass: "bing-animated-text__char"
121
+ }), C.words.forEach((e) => {
122
+ /[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}]/u.test(e.textContent ?? "") && e.classList.add("bing-animated-text__word--breakable");
123
+ }), h.set(C.chars, {
124
+ display: "inline-block",
125
+ transformOrigin: "50% 100%",
126
+ willChange: "transform"
127
+ }), n.setAttribute("data-jump-ready", "true"), (y.trigger === "always" || y.trigger === "once") && G();
128
+ }, n));
129
+ }
130
+ function q() {
131
+ !L() || A || (A = !0, a(() => {
132
+ A = !1, b.value && K();
133
+ }));
134
+ }
135
+ function J() {
136
+ L() && a(() => {
137
+ W();
138
+ });
139
+ }
140
+ function Y() {
141
+ y.trigger === "hover" && (N.value && U(), P.value && G());
142
+ }
143
+ m(() => [
144
+ y.effect,
145
+ y.trigger,
146
+ y.disabled,
147
+ y.shineSpeed,
148
+ y.shineDelay,
149
+ y.shineInterval,
150
+ y.shineDirection,
151
+ y.shineAngle,
152
+ y.shineColor,
153
+ y.shineBaseColor
154
+ ], J, { flush: "post" }), m(() => [
155
+ y.effect,
156
+ y.trigger,
157
+ y.disabled,
158
+ y.jumpY,
159
+ y.jumpStagger,
160
+ y.jumpDuration,
161
+ y.jumpEase,
162
+ y.jumpReturnEase,
163
+ y.jumpRepeatDelay
164
+ ], q, { flush: "post" }), c(() => {
165
+ J(), q();
166
+ }), u(() => {
167
+ x.value?.innerHTML !== j && q();
168
+ }), l(() => {
169
+ V(), z();
170
+ });
171
+ function X() {
172
+ J(), q();
173
+ }
174
+ return (e, t) => (d(), n("span", {
175
+ ref_key: "rootRef",
176
+ ref: b,
177
+ class: o(F.value),
178
+ style: s(I.value),
179
+ onMouseenter: Y
180
+ }, [r("span", {
181
+ ref_key: "contentRef",
182
+ ref: x,
183
+ class: "bing-animated-text__content"
184
+ }, [p(e.$slots, "default", {}, void 0, !0)], 512), r("span", {
185
+ ref_key: "jumpContentRef",
186
+ ref: S,
187
+ class: "bing-animated-text__jump-layer",
188
+ "aria-hidden": "true",
189
+ inert: ""
190
+ }, null, 512)], 38));
191
+ }
192
+ });
193
+ //#endregion
194
+ export { _ as default };
@@ -0,0 +1,7 @@
1
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./BingAppSwitcherTransition.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/BingAppSwitcherTransition/BingAppSwitcherTransition.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-5b2d52f7"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,244 @@
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, onBeforeUpdate as p, onMounted as m, openBlock as h, ref as g, renderList as _, renderSlot as v, toDisplayString as y, watch as b } from "vue";
4
+ import { gsap as x } from "gsap";
5
+ //#region src/components/BingAppSwitcherTransition/BingAppSwitcherTransition.vue?vue&type=script&setup=true&lang.ts
6
+ var S = ["aria-hidden"], C = /* @__PURE__ */ l({
7
+ __name: "BingAppSwitcherTransition",
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 = g([]), O = g(null), k = g(!1), A = g(void 0), j, M = 0, N, P, F = r(() => T.items.filter((e) => !e.disabled)), I = r(() => F.value[0]), L = r(() => T.modelValue !== void 0), R = r(() => L.value ? T.modelValue : A.value ?? I.value?.value), z = r(() => {
32
+ let e = T.items.findIndex((e) => Object.is(e.value, R.value));
33
+ return e >= 0 ? e : 0;
34
+ }), B = r(() => T.items.map((e) => ({
35
+ ...e,
36
+ value: e.value,
37
+ label: e.label,
38
+ disabled: T.disabled || e.disabled
39
+ })));
40
+ function V() {
41
+ return typeof window < "u";
42
+ }
43
+ function H() {
44
+ return T.disabled || T.respectReducedMotion && w();
45
+ }
46
+ function U(e) {
47
+ let t = T.items.length;
48
+ return t === 0 ? 0 : T.loop ? (e + t) % t : Math.min(Math.max(e, 0), t - 1);
49
+ }
50
+ function W(e, t) {
51
+ let n = e - t, r = T.items.length;
52
+ return r === 0 ? 0 : (n > r / 2 && (n -= r), n < r / -2 && (n += r), n);
53
+ }
54
+ function G(e, t, n = t) {
55
+ let r = W(e, t), i = Math.abs(r), a = e === n;
56
+ return {
57
+ xPercent: r * 58,
58
+ y: 30 + i * 3,
59
+ scale: a ? .68 : .6,
60
+ rotation: r * -1.4,
61
+ opacity: a ? .98 : Math.max(.46, .66 - i * .1),
62
+ zIndex: a ? 18 : 10 - i,
63
+ force3D: !0
64
+ };
65
+ }
66
+ function K(e, t) {
67
+ let n = W(e, t), r = Math.abs(n);
68
+ return {
69
+ xPercent: n * 116,
70
+ y: r === 0 ? 0 : 22,
71
+ scale: r === 0 ? 1 : .78,
72
+ rotation: n * -1.4,
73
+ opacity: +(r === 0),
74
+ zIndex: r === 0 ? 24 : 5 - r,
75
+ force3D: !0
76
+ };
77
+ }
78
+ function q(e, t) {
79
+ e instanceof HTMLElement && (D.value[t] = e);
80
+ }
81
+ function J(e) {
82
+ let t = T.items[e];
83
+ if (!t || T.disabled || t.disabled || Object.is(t.value, R.value)) return !1;
84
+ let n = R.value, r = T.items.find((e) => Object.is(e.value, n));
85
+ return P = t.value, L.value || (A.value = t.value), E("update:modelValue", t.value), E("change", {
86
+ value: t.value,
87
+ previousValue: n,
88
+ item: t,
89
+ previousItem: r
90
+ }), !0;
91
+ }
92
+ function Y(e = z.value, t = !1) {
93
+ let n = t || H() ? 0 : .32;
94
+ j?.kill(), j = x.timeline({
95
+ defaults: {
96
+ duration: n,
97
+ ease: "power3.out",
98
+ overwrite: "auto"
99
+ },
100
+ onStart: () => {
101
+ k.value = !0;
102
+ },
103
+ onComplete: () => {
104
+ k.value = !1, j = void 0;
105
+ },
106
+ onInterrupt: () => {
107
+ k.value = !1;
108
+ }
109
+ }), D.value.forEach((t, n) => {
110
+ j?.to(t, K(n, e), 0);
111
+ });
112
+ }
113
+ function X(e, t) {
114
+ let n = W(e, t) >= 0 ? 1 : -1;
115
+ if (H()) {
116
+ Y(e, !0);
117
+ return;
118
+ }
119
+ j?.kill(), k.value = !0, j = x.timeline({
120
+ defaults: { overwrite: "auto" },
121
+ onComplete: () => {
122
+ k.value = !1, j = void 0;
123
+ },
124
+ onInterrupt: () => {
125
+ k.value = !1;
126
+ }
127
+ }), O.value && j.to(O.value, {
128
+ x: n * -10,
129
+ scale: .996,
130
+ duration: .16,
131
+ ease: "power2.out",
132
+ force3D: !0
133
+ }, 0).to(O.value, {
134
+ x: 0,
135
+ scale: 1,
136
+ duration: .5,
137
+ ease: "expo.out",
138
+ force3D: !0
139
+ }, .18), D.value.forEach((e, n) => {
140
+ j?.to(e, {
141
+ ...G(n, t, t),
142
+ duration: .2,
143
+ ease: "power3.out"
144
+ }, 0);
145
+ }), D.value.forEach((t, n) => {
146
+ j?.to(t, {
147
+ ...G(n, e, e),
148
+ duration: .34,
149
+ ease: "power3.inOut"
150
+ }, .1);
151
+ }), D.value.forEach((t, n) => {
152
+ let r = K(n, e), i = n === e;
153
+ j?.to(t, {
154
+ ...r,
155
+ duration: i ? .48 : .32,
156
+ ease: i ? "expo.out" : "power3.out"
157
+ }, i ? .3 : .34);
158
+ });
159
+ }
160
+ function Z(e) {
161
+ let t = U(e), n = z.value;
162
+ t === z.value || k.value || !J(t) || X(t, n);
163
+ }
164
+ function Q(e) {
165
+ Z(T.items.findIndex((t) => Object.is(t.value, e)));
166
+ }
167
+ function $(e) {
168
+ e.defaultPrevented || T.disabled || Math.abs(e.deltaX) <= Math.abs(e.deltaY) || (e.preventDefault(), !(k.value || !V()) && (M += e.deltaX, N && window.clearTimeout(N), N = window.setTimeout(() => {
169
+ let e = M > 0 ? 1 : -1, t = Math.abs(M) > 34;
170
+ M = 0, N = void 0, t && Z(z.value + e);
171
+ }, 58)));
172
+ }
173
+ return p(() => {
174
+ D.value = [];
175
+ }), m(() => {
176
+ u().then(() => {
177
+ D.value.forEach((e) => {
178
+ x.set(e, {
179
+ transformOrigin: "50% 50%",
180
+ willChange: "transform, opacity",
181
+ force3D: !0
182
+ });
183
+ }), Y(z.value, !0);
184
+ });
185
+ }), f(() => {
186
+ j?.kill(), x.killTweensOf(D.value), O.value && x.killTweensOf(O.value), N && V() && window.clearTimeout(N);
187
+ }), b(R, (e, t) => {
188
+ if (e === void 0) return;
189
+ if (Object.is(e, P)) {
190
+ P = void 0;
191
+ return;
192
+ }
193
+ let n = T.items.findIndex((t) => Object.is(t.value, e));
194
+ if (n < 0) return;
195
+ let r = T.items.findIndex((e) => Object.is(e.value, t));
196
+ u().then(() => {
197
+ if (r < 0) {
198
+ Y(n, !0);
199
+ return;
200
+ }
201
+ X(n, r);
202
+ });
203
+ }), (e, r) => (h(), o("section", {
204
+ class: d(["bing-app-switcher-transition", { "is-disabled": l.disabled }]),
205
+ onWheel: $
206
+ }, [s("div", {
207
+ ref_key: "stageRef",
208
+ ref: O,
209
+ class: "bing-app-switcher-transition__stage"
210
+ }, [(h(!0), o(n, null, _(l.items, (t, n) => (h(), o("article", {
211
+ key: String(t.value),
212
+ ref_for: !0,
213
+ ref: (e) => q(e, n),
214
+ class: d(["bing-app-switcher-transition__card", { "is-active": Object.is(R.value, t.value) }]),
215
+ "aria-hidden": !Object.is(R.value, t.value)
216
+ }, [v(e.$slots, "default", {
217
+ item: t,
218
+ index: n,
219
+ active: Object.is(R.value, t.value),
220
+ isAnimating: k.value
221
+ }, () => [c(y(t.label), 1)], !0)], 10, S))), 128))], 512), l.showTabs ? (h(), i(t, {
222
+ key: 0,
223
+ items: B.value,
224
+ "model-value": R.value,
225
+ variant: "glass",
226
+ size: "md",
227
+ block: "",
228
+ disabled: l.disabled,
229
+ loop: l.loop,
230
+ "respect-reduced-motion": l.respectReducedMotion,
231
+ "aria-label": l.ariaLabel,
232
+ "onUpdate:modelValue": Q
233
+ }, null, 8, [
234
+ "items",
235
+ "model-value",
236
+ "disabled",
237
+ "loop",
238
+ "respect-reduced-motion",
239
+ "aria-label"
240
+ ])) : a("", !0)], 34));
241
+ }
242
+ });
243
+ //#endregion
244
+ export { C as default };
@@ -0,0 +1,7 @@
1
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./BingAutocomplete.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/BingAutocomplete/BingAutocomplete.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-83106cf3"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -1,17 +1,17 @@
1
1
  import { BingAutocompleteExpose, BingAutocompleteOption, BingAutocompleteProps, BingAutocompleteSlots } from './BingAutocomplete.types';
2
2
  type __VLS_Slots = BingAutocompleteSlots;
3
3
  declare const __VLS_base: import('vue').DefineComponent<BingAutocompleteProps, BingAutocompleteExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
4
+ close: () => any;
5
+ open: () => any;
4
6
  clear: () => any;
5
7
  select: (option: BingAutocompleteOption) => any;
6
- close: () => any;
7
8
  "update:modelValue": (value: string) => any;
8
- open: () => any;
9
9
  }, string, import('vue').PublicProps, Readonly<BingAutocompleteProps> & Readonly<{
10
+ onClose?: (() => any) | undefined;
11
+ onOpen?: (() => any) | undefined;
10
12
  onClear?: (() => any) | undefined;
11
13
  onSelect?: ((option: BingAutocompleteOption) => any) | undefined;
12
- onClose?: (() => any) | undefined;
13
14
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
14
- onOpen?: (() => any) | undefined;
15
15
  }>, {
16
16
  disabled: boolean;
17
17
  filter: boolean;