@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,308 @@
1
+ import { useReducedMotion as e } from "../../motion/reducedMotion.js";
2
+ import { createSelectPanelEnter as t, createSelectPanelLeave as n } from "../../motion/selectPanelMotion.js";
3
+ import { enterLiquidHover as r, leaveLiquidHover as i, resetLiquidHover as a, setLiquidHoverOrigin as o } from "../../motion/liquidHover.js";
4
+ import { useClickFeedback as ee } from "../../motion/useClickFeedback.js";
5
+ import { ChevronRight as s } from "../../icons/icons.js";
6
+ import c from "../BingIcon/BingIcon.js";
7
+ import { useClientReady as te } from "../../utils/useClientReady.js";
8
+ import { bingDropDownContextKey as ne } from "./BingDropDown.context.js";
9
+ import { Teleport as re, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as ie, defineComponent as m, inject as ae, nextTick as oe, normalizeClass as h, normalizeStyle as se, onBeforeUnmount as ce, openBlock as g, ref as _, renderSlot as v, resolveDynamicComponent as le, toDisplayString as y, unref as b, useSlots as ue, watch as de, withCtx as fe } from "vue";
10
+ import { gsap as x } from "gsap";
11
+ //#region src/components/BingDropDown/BingDropDownItem.vue?vue&type=script&setup=true&lang.ts
12
+ var pe = {
13
+ key: 0,
14
+ class: "bing-dropdown-item__prefix",
15
+ "aria-hidden": "true"
16
+ }, me = { class: "bing-dropdown-item__content" }, he = { class: "bing-dropdown-item__title" }, ge = {
17
+ key: 0,
18
+ class: "bing-dropdown-item__description"
19
+ }, _e = {
20
+ key: 1,
21
+ class: "bing-dropdown-item__suffix"
22
+ }, ve = {
23
+ key: 1,
24
+ class: "bing-dropdown-item__shortcut"
25
+ }, ye = ["data-bing-dropdown-floating"], be = 0, xe = /* @__PURE__ */ m({
26
+ __name: "BingDropDownItem",
27
+ props: {
28
+ title: { default: void 0 },
29
+ description: { default: void 0 },
30
+ shortcut: { default: void 0 },
31
+ icon: { default: void 0 },
32
+ href: { default: void 0 },
33
+ target: { default: void 0 },
34
+ rel: { default: void 0 },
35
+ tone: { default: "default" },
36
+ disabled: {
37
+ type: Boolean,
38
+ default: !1
39
+ },
40
+ active: {
41
+ type: Boolean,
42
+ default: !1
43
+ },
44
+ closeOnClick: {
45
+ type: Boolean,
46
+ default: void 0
47
+ },
48
+ ariaLabel: { default: void 0 }
49
+ },
50
+ emits: ["click"],
51
+ setup(m, { emit: xe }) {
52
+ let { playClickFeedback: Se } = ee(), S = m, Ce = xe, we = te(), C = ue(), w = ae(ne, null), T = _(), E = _(), D = _(), O = _(!1), k = _(!1), A = _(!1), j = _("right"), M = _({
53
+ left: 0,
54
+ top: 0
55
+ }), N, P = 0, F = !1, I, L, R = !1, z = !1, Te = `bing-dropdown-submenu-${++be}`, Ee = l(() => S.shortcut ? Array.isArray(S.shortcut) ? S.shortcut : [S.shortcut] : []), De = l(() => Ee.value.join("+")), Oe = l(() => !!(S.icon || C.prefix)), ke = l(() => !!(S.description || C.description)), B = l(() => !!C.submenu), Ae = l(() => !!(C.suffix || Ee.value.length > 0 || B.value)), je = l(() => S.closeOnClick ?? !B.value), V = l(() => !!(S.href && !S.disabled)), H = l(() => V.value ? "a" : "button"), Me = l(() => {
56
+ if (V.value) return S.rel ? S.rel : S.target === "_blank" ? "noreferrer noopener" : void 0;
57
+ }), Ne = l(() => ["bing-dropdown-item-shell", {
58
+ "has-submenu": B.value,
59
+ "is-submenu-visible": O.value
60
+ }]), Pe = l(() => [
61
+ "bing-dropdown-item",
62
+ `bing-dropdown-item--${S.tone}`,
63
+ {
64
+ "is-active": S.active,
65
+ "is-disabled": S.disabled,
66
+ "has-prefix": Oe.value,
67
+ "has-description": ke.value,
68
+ "has-suffix": Ae.value
69
+ }
70
+ ]), Fe = l(() => [
71
+ "bing-dropdown-item__submenu",
72
+ `is-side-${j.value}`,
73
+ { "is-visible": O.value }
74
+ ]), Ie = l(() => ({
75
+ ...w?.getGlassStyle() ?? {},
76
+ left: `${M.value.left}px`,
77
+ top: `${M.value.top}px`
78
+ }));
79
+ function U() {
80
+ return typeof window < "u" && typeof document < "u";
81
+ }
82
+ function Le(e, t, n) {
83
+ return Math.min(n, Math.max(t, e));
84
+ }
85
+ let Re = e();
86
+ function W() {
87
+ return !U() || Re();
88
+ }
89
+ function G() {
90
+ z = !1, E.value && a(E.value);
91
+ }
92
+ function ze(e) {
93
+ if (S.disabled || e.pointerType === "touch" || W()) {
94
+ G();
95
+ return;
96
+ }
97
+ !T.value || !E.value || (o(T.value, E.value, e), z || (z = !0, r(E.value)));
98
+ }
99
+ function Be() {
100
+ !z || !E.value || (z = !1, W() ? G() : i(E.value));
101
+ }
102
+ function K() {
103
+ !R || !O.value || S.disabled || (R = !1, document.activeElement === T.value && D.value?.querySelector("[data-bing-dropdown-item]:not([disabled]):not([aria-disabled=\"true\"])")?.focus());
104
+ }
105
+ function Ve(e) {
106
+ e.defaultPrevented || e.key !== "ArrowRight" || !B.value || S.disabled || (e.preventDefault(), e.stopPropagation(), R = !0, Se(e), Q(), oe(() => {
107
+ I || K();
108
+ }));
109
+ }
110
+ function q(e) {
111
+ let r = D.value;
112
+ if (I?.kill(), I = void 0, !r) return;
113
+ let i = Array.from(r.querySelectorAll("[data-bing-dropdown-item]"));
114
+ if (x.killTweensOf([r, ...i]), W()) {
115
+ x.set([r, ...i], { clearProps: "transform,opacity,visibility" }), e && K();
116
+ return;
117
+ }
118
+ let a = e ? t : n;
119
+ L ??= x.context(() => {}, r), L.add(() => {
120
+ I = a({
121
+ panel: r,
122
+ items: i,
123
+ actionRail: null,
124
+ actionButtons: [],
125
+ placement: j.value,
126
+ align: "start",
127
+ scale: !1,
128
+ onComplete: () => {
129
+ I = void 0, x.set([r, ...i], { clearProps: O.value ? "transform" : "transform,opacity,visibility" }), e && K();
130
+ }
131
+ });
132
+ });
133
+ }
134
+ function He(e) {
135
+ if (S.disabled) {
136
+ e.preventDefault();
137
+ return;
138
+ }
139
+ Ce("click", e), e.defaultPrevented || Se(e), !(!e.defaultPrevented && B.value) && !e.defaultPrevented && je.value && w?.close();
140
+ }
141
+ function J() {
142
+ !U() || N === void 0 || (window.clearTimeout(N), N = void 0);
143
+ }
144
+ function Y() {
145
+ !U() || !P || (window.cancelAnimationFrame(P), P = 0);
146
+ }
147
+ function X() {
148
+ !U() || !O.value || (Y(), P = window.requestAnimationFrame(() => {
149
+ P = 0, Ge();
150
+ }));
151
+ }
152
+ function Ue() {
153
+ !U() || F || (window.addEventListener("resize", X), window.addEventListener("scroll", X, !0), F = !0);
154
+ }
155
+ function We() {
156
+ !U() || !F || (window.removeEventListener("resize", X), window.removeEventListener("scroll", X, !0), F = !1);
157
+ }
158
+ function Ge() {
159
+ if (!U() || !T.value || !D.value) return;
160
+ let e = T.value.getBoundingClientRect(), t = D.value.getBoundingClientRect(), n = window.innerWidth, r = window.innerHeight, i = t.width || 220, a = t.height || 0, o = n - e.right - 12 - 12, ee = e.left - 12 - 12, s = o >= i || o >= ee, c = s ? e.right + 12 : e.left - i - 12, te = Math.max(12, n - 12 - i), ne = e.top - 6, re = Math.max(12, r - 12 - a);
161
+ j.value = s ? "right" : "left", M.value = {
162
+ left: Le(c, 12, te),
163
+ top: Le(ne, 12, re)
164
+ };
165
+ }
166
+ function Z() {
167
+ R = !1, O.value && (O.value = !1, q(!1), We(), Y());
168
+ }
169
+ function Q() {
170
+ !B.value || S.disabled || (J(), !O.value && (O.value = !0, oe(() => {
171
+ O.value && (Ge(), Ue(), q(!0));
172
+ })));
173
+ }
174
+ function $() {
175
+ if (!(!B.value || k.value || A.value)) {
176
+ if (J(), !U()) {
177
+ Z();
178
+ return;
179
+ }
180
+ N = window.setTimeout(() => {
181
+ N = void 0, !k.value && !A.value && Z();
182
+ }, 90);
183
+ }
184
+ }
185
+ function Ke() {
186
+ !B.value || S.disabled || (k.value = !0, Q());
187
+ }
188
+ function qe() {
189
+ B.value && (k.value = !1, A.value = !1, $());
190
+ }
191
+ function Je() {
192
+ !B.value || S.disabled || (A.value = !0, Q());
193
+ }
194
+ function Ye(e) {
195
+ if (!B.value) return;
196
+ let t = e.relatedTarget;
197
+ t instanceof Node && e.currentTarget.contains(t) || (A.value = !1, $());
198
+ }
199
+ function Xe() {
200
+ !B.value || S.disabled || (k.value = !0, J());
201
+ }
202
+ function Ze() {
203
+ B.value && (k.value = !1, $());
204
+ }
205
+ function Qe() {
206
+ !B.value || S.disabled || (A.value = !0, J());
207
+ }
208
+ function $e(e) {
209
+ if (!B.value) return;
210
+ let t = e.relatedTarget;
211
+ if (t instanceof Node && e.currentTarget instanceof HTMLElement) {
212
+ let n = T.value?.closest(".bing-dropdown-item-shell");
213
+ if (e.currentTarget.contains(t) || n?.contains(t)) return;
214
+ }
215
+ A.value = !1, $();
216
+ }
217
+ return de(() => S.disabled, (e) => {
218
+ e && (G(), Z());
219
+ }), ce(() => {
220
+ G(), I?.kill(), L?.revert(), J(), We(), Y();
221
+ }), (e, t) => (g(), f("div", {
222
+ class: h(Ne.value),
223
+ onPointerenter: Ke,
224
+ onPointerleave: qe,
225
+ onFocusin: Je,
226
+ onFocusout: Ye
227
+ }, [(g(), u(le(H.value), {
228
+ ref_key: "itemRef",
229
+ ref: T,
230
+ class: h(Pe.value),
231
+ "data-bing-dropdown-item": "",
232
+ role: "menuitem",
233
+ type: H.value === "button" ? "button" : void 0,
234
+ href: V.value ? m.href : void 0,
235
+ target: V.value ? m.target : void 0,
236
+ rel: Me.value,
237
+ disabled: H.value === "button" ? m.disabled : void 0,
238
+ tabindex: m.disabled ? -1 : void 0,
239
+ "aria-disabled": m.disabled || void 0,
240
+ "aria-current": m.active ? "true" : void 0,
241
+ "aria-label": m.ariaLabel,
242
+ "aria-haspopup": B.value ? "menu" : void 0,
243
+ "aria-expanded": B.value ? String(O.value) : void 0,
244
+ "aria-controls": B.value ? Te : void 0,
245
+ onClick: He,
246
+ onPointerenter: ze,
247
+ onPointermove: ze,
248
+ onPointerleave: Be,
249
+ onKeydown: Ve
250
+ }, {
251
+ default: fe(() => [
252
+ p("span", {
253
+ ref_key: "liquidRef",
254
+ ref: E,
255
+ class: "bing-dropdown-item__liquid",
256
+ "aria-hidden": "true"
257
+ }, null, 512),
258
+ Oe.value ? (g(), f("span", pe, [v(e.$slots, "prefix", {}, () => [m.icon ? (g(), u(c, {
259
+ key: 0,
260
+ icon: m.icon,
261
+ size: 16,
262
+ "stroke-width": 1.75
263
+ }, null, 8, ["icon"])) : d("", !0)], !0)])) : d("", !0),
264
+ p("span", me, [p("span", he, [v(e.$slots, "default", {}, () => [ie(y(m.title), 1)], !0)]), ke.value ? (g(), f("span", ge, [v(e.$slots, "description", {}, () => [ie(y(m.description), 1)], !0)])) : d("", !0)]),
265
+ Ae.value ? (g(), f("span", _e, [e.$slots.suffix ? v(e.$slots, "suffix", { key: 0 }, void 0, !0) : De.value ? (g(), f("span", ve, y(De.value), 1)) : d("", !0), B.value ? (g(), u(c, {
266
+ key: 2,
267
+ class: "bing-dropdown-item__submenu-icon",
268
+ icon: b(s),
269
+ size: "xs",
270
+ "stroke-width": 1.75
271
+ }, null, 8, ["icon"])) : d("", !0)])) : d("", !0)
272
+ ]),
273
+ _: 3
274
+ }, 40, [
275
+ "class",
276
+ "type",
277
+ "href",
278
+ "target",
279
+ "rel",
280
+ "disabled",
281
+ "tabindex",
282
+ "aria-disabled",
283
+ "aria-current",
284
+ "aria-label",
285
+ "aria-haspopup",
286
+ "aria-expanded",
287
+ "aria-controls"
288
+ ])), b(we) && B.value ? (g(), u(re, {
289
+ key: 0,
290
+ to: "body"
291
+ }, [p("div", {
292
+ id: Te,
293
+ ref_key: "submenuRef",
294
+ ref: D,
295
+ class: h(Fe.value),
296
+ style: se(Ie.value),
297
+ "data-bing-dropdown-floating": b(w)?.floatingId,
298
+ role: "menu",
299
+ onKeydown: t[0] ||= (e) => b(w)?.onMenuKeydown(e),
300
+ onPointerenter: Xe,
301
+ onPointerleave: Ze,
302
+ onFocusin: Qe,
303
+ onFocusout: $e
304
+ }, [v(e.$slots, "submenu", {}, void 0, !0)], 46, ye)])) : d("", !0)], 34));
305
+ }
306
+ });
307
+ //#endregion
308
+ export { xe as default };
@@ -0,0 +1,7 @@
1
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./BingFilePreview.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/BingFilePreview/BingFilePreview.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-d5c69924"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -2,26 +2,25 @@ import { BingFilePreviewCloseReason, BingFilePreviewFile, BingFilePreviewProps }
2
2
  declare const __VLS_export: import('vue').DefineComponent<BingFilePreviewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
3
3
  close: (reason: BingFilePreviewCloseReason) => any;
4
4
  error: (error: Error) => any;
5
- "update:modelValue": (value: boolean) => any;
6
5
  download: (payload: import('./BingFilePreview.types').BingFilePreviewDownloadPayload) => any;
6
+ "update:modelValue": (value: boolean) => any;
7
7
  openExternal: (payload: import('./BingFilePreview.types').BingFilePreviewOpenExternalPayload) => any;
8
8
  }, string, import('vue').PublicProps, Readonly<BingFilePreviewProps> & Readonly<{
9
9
  onClose?: ((reason: BingFilePreviewCloseReason) => any) | undefined;
10
10
  onError?: ((error: Error) => any) | undefined;
11
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
12
11
  onDownload?: ((payload: import('./BingFilePreview.types').BingFilePreviewDownloadPayload) => any) | undefined;
12
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
13
13
  onOpenExternal?: ((payload: import('./BingFilePreview.types').BingFilePreviewOpenExternalPayload) => any) | undefined;
14
14
  }>, {
15
+ name: string;
15
16
  content: string;
16
17
  height: string | number;
17
18
  width: string | number;
18
- zIndex: number;
19
19
  type: import('./BingFilePreview.types').BingFilePreviewKind;
20
20
  size: number;
21
21
  ariaLabel: string;
22
- modelValue: boolean;
23
- name: string;
24
22
  file: BingFilePreviewFile;
23
+ modelValue: boolean;
25
24
  glass: boolean;
26
25
  glassBlur: string | number;
27
26
  glassOpacity: number;