@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
@@ -11,10 +11,10 @@ declare const __VLS_base: import('vue').DefineComponent<BingScrollbarProps, Bing
11
11
  maxHeight: string | number;
12
12
  ariaLabel: string;
13
13
  focusable: boolean;
14
+ horizontal: boolean;
15
+ vertical: boolean;
14
16
  minThumbSize: number;
15
17
  overflowTolerance: number;
16
- vertical: boolean;
17
- horizontal: boolean;
18
18
  smooth: import('../..').SmoothScrollValue;
19
19
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
20
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -0,0 +1,398 @@
1
+ import { useReducedMotion as e } from "../../motion/reducedMotion.js";
2
+ import { createSmoothScrollController as t } from "../../motion/smoothScroll.js";
3
+ import { computed as n, createElementBlock as r, createElementVNode as i, defineComponent as a, nextTick as o, normalizeClass as s, normalizeStyle as c, onBeforeUnmount as ee, onMounted as te, openBlock as ne, ref as l, renderSlot as re, useSlots as ie, vShow as ae, watch as u, withDirectives as oe } from "vue";
4
+ //#region src/components/BingScrollbar/BingScrollbar.vue?vue&type=script&setup=true&lang.ts
5
+ var se = [
6
+ "tabindex",
7
+ "role",
8
+ "aria-label"
9
+ ], ce = /* @__PURE__ */ a({
10
+ __name: "BingScrollbar",
11
+ props: {
12
+ height: { default: void 0 },
13
+ maxHeight: { default: void 0 },
14
+ minThumbSize: { default: 28 },
15
+ overflowTolerance: { default: 1 },
16
+ vertical: {
17
+ type: Boolean,
18
+ default: !0
19
+ },
20
+ horizontal: {
21
+ type: Boolean,
22
+ default: !1
23
+ },
24
+ always: {
25
+ type: Boolean,
26
+ default: !1
27
+ },
28
+ disabled: {
29
+ type: Boolean,
30
+ default: !1
31
+ },
32
+ focusable: {
33
+ type: Boolean,
34
+ default: !0
35
+ },
36
+ ariaLabel: { default: void 0 },
37
+ smooth: {
38
+ type: [Boolean, Object],
39
+ default: !0
40
+ }
41
+ },
42
+ emits: ["scroll"],
43
+ setup(a, { expose: ce, emit: le }) {
44
+ let ue = e(), d = a, de = le, fe = ie(), f = l(null), p = l(null), m = l(null), h = l(null), g = l(null), _ = l(null), v = l(!1), y = l(!1), b = l(0), x = l(0), S = l(!1), C = l(null), w = l(!1), T, E, D, O, k, A, j, pe = 0, me = 0, he = 0, M = 0, N = 0, P = 0, F = 0, I = 0, ge = 0, _e = n(() => ["bing-scrollbar", {
45
+ "has-overflow": v.value || y.value,
46
+ "has-vertical-overflow": v.value,
47
+ "has-horizontal-overflow": y.value,
48
+ "is-vertical": d.vertical,
49
+ "is-horizontal": d.horizontal,
50
+ "is-always-visible": d.always,
51
+ "is-disabled": d.disabled,
52
+ "is-dragging": !!C.value,
53
+ "is-dragging-vertical": C.value === "vertical",
54
+ "is-dragging-horizontal": C.value === "horizontal",
55
+ "is-hovering": S.value,
56
+ "is-scrolling": w.value,
57
+ "is-smooth": !!d.smooth
58
+ }]), ve = n(() => ({
59
+ height: Ee(d.height),
60
+ maxHeight: Ee(d.maxHeight)
61
+ }));
62
+ function ye() {
63
+ return {
64
+ height: `${b.value}px`,
65
+ transform: `translate(-50%, ${I}px)`
66
+ };
67
+ }
68
+ function be() {
69
+ return {
70
+ width: `${x.value}px`,
71
+ transform: `translate(${ge}px, -50%)`
72
+ };
73
+ }
74
+ let xe = n(() => Math.max(1, d.overflowTolerance)), Se = n(() => (v.value || y.value) && d.focusable && !d.disabled), Ce = n(() => d.ariaLabel ?? (Se.value ? "可滚动内容" : void 0));
75
+ function we(e) {
76
+ f.value = e instanceof HTMLElement ? e : null;
77
+ }
78
+ let Te = {
79
+ class: "bing-scrollbar__custom-viewport",
80
+ onScroll: Me,
81
+ onWheel: J,
82
+ onKeydown: Ne,
83
+ onInput: K
84
+ };
85
+ function L() {
86
+ return typeof window < "u" && typeof document < "u";
87
+ }
88
+ function Ee(e) {
89
+ return typeof e == "number" ? `${e}px` : e;
90
+ }
91
+ function De() {
92
+ !L() || D === void 0 || (window.clearTimeout(D), D = void 0);
93
+ }
94
+ function Oe() {
95
+ !L() || O === void 0 || (window.cancelAnimationFrame(O), O = void 0);
96
+ }
97
+ function ke() {
98
+ !L() || k === void 0 || (window.cancelAnimationFrame(k), k = void 0);
99
+ }
100
+ function R() {
101
+ ke(), A = void 0;
102
+ }
103
+ function z() {
104
+ R(), j?.cancel();
105
+ }
106
+ function Ae() {
107
+ return typeof d.smooth == "object" ? d.smooth : void 0;
108
+ }
109
+ function B() {
110
+ return !!d.smooth && !d.disabled;
111
+ }
112
+ function V() {
113
+ let e = f.value;
114
+ if (!e) return;
115
+ let t = e.clientHeight, n = e.scrollHeight, r = e.clientWidth, i = e.scrollWidth, a = Math.max(0, n - t), o = Math.max(0, i - r), s = d.vertical && !d.disabled && a > xe.value, c = d.horizontal && !d.disabled && o > xe.value;
116
+ if (v.value = s, y.value = c, M = s ? a : 0, N = c ? o : 0, !s || !m.value) b.value = 0, H(0), P = 0;
117
+ else {
118
+ let r = m.value.clientHeight, i = n > 0 ? t / n * r : r, o = Math.min(r, Math.max(Math.max(12, d.minThumbSize), i));
119
+ P = Math.max(0, r - o);
120
+ let s = a > 0 ? e.scrollTop / a : 0;
121
+ b.value = o, H(P * s);
122
+ }
123
+ if (!c || !h.value) x.value = 0, U(0), F = 0;
124
+ else {
125
+ let t = h.value.clientWidth, n = i > 0 ? r / i * t : t, a = Math.min(t, Math.max(Math.max(12, d.minThumbSize), n));
126
+ F = Math.max(0, t - a);
127
+ let s = o > 0 ? e.scrollLeft / o : 0;
128
+ x.value = a, U(F * s);
129
+ }
130
+ }
131
+ function H(e) {
132
+ I = e, g.value && (g.value.style.transform = `translate(-50%, ${e}px)`);
133
+ }
134
+ function U(e) {
135
+ ge = e, _.value && (_.value.style.transform = `translate(${e}px, -50%)`);
136
+ }
137
+ function W() {
138
+ let e = f.value;
139
+ if (e) {
140
+ if (v.value) {
141
+ let t = M > 0 ? e.scrollTop / M : 0;
142
+ H(P * t);
143
+ }
144
+ if (y.value) {
145
+ let t = N > 0 ? e.scrollLeft / N : 0;
146
+ U(F * t);
147
+ }
148
+ }
149
+ }
150
+ function G() {
151
+ if (!L() || typeof window.requestAnimationFrame != "function") {
152
+ V();
153
+ return;
154
+ }
155
+ O === void 0 && (O = window.requestAnimationFrame(() => {
156
+ O = void 0, V();
157
+ }));
158
+ }
159
+ function K() {
160
+ o(G);
161
+ }
162
+ function q() {
163
+ L() && (De(), w.value = !0, D = window.setTimeout(() => {
164
+ D = void 0, w.value = !1;
165
+ }, 720));
166
+ }
167
+ function je(e) {
168
+ let t = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY;
169
+ return e.deltaMode === 1 ? t * 16 : e.deltaMode === 2 ? t * (f.value?.clientWidth ?? 1) : t;
170
+ }
171
+ function Me(e) {
172
+ W(), q(), de("scroll", e);
173
+ }
174
+ function J(e) {
175
+ if (e.defaultPrevented) return !1;
176
+ if (B()) return R(), j?.handleWheel(e) ?? !1;
177
+ if (d.disabled || !d.horizontal) return !1;
178
+ if (!e.shiftKey) return R(), !1;
179
+ let t = f.value;
180
+ if (!t) return !1;
181
+ let n = N || Math.max(0, t.scrollWidth - t.clientWidth), r = A ?? t.scrollLeft, i = Fe(r + je(e), 0, n);
182
+ return i === r && i === t.scrollLeft ? !1 : (e.preventDefault(), A = i, Re(), !0);
183
+ }
184
+ function Ne(e) {
185
+ B() && j?.handleKeydown(e);
186
+ }
187
+ function Pe(e) {
188
+ let t = f.value, n = e === "vertical" ? m.value : h.value;
189
+ return !t || !n ? null : {
190
+ maxScroll: e === "vertical" ? Math.max(0, t.scrollHeight - t.clientHeight) : Math.max(0, t.scrollWidth - t.clientWidth),
191
+ thumbTravel: e === "vertical" ? Math.max(0, n.clientHeight - b.value) : Math.max(0, n.clientWidth - x.value)
192
+ };
193
+ }
194
+ function Y(e) {
195
+ let t = f.value;
196
+ if (!t) return;
197
+ let n = M || Math.max(0, t.scrollHeight - t.clientHeight);
198
+ t.scrollTop = Math.min(n, Math.max(0, e)), W(), q();
199
+ }
200
+ function Fe(e, t, n) {
201
+ return Math.min(n, Math.max(t, e));
202
+ }
203
+ function X(e) {
204
+ let t = f.value;
205
+ if (!t) return;
206
+ let n = N || Math.max(0, t.scrollWidth - t.clientWidth);
207
+ t.scrollLeft = Math.min(n, Math.max(0, e)), W(), q();
208
+ }
209
+ function Ie() {
210
+ k = void 0;
211
+ let e = f.value;
212
+ if (!e || A === void 0) {
213
+ A = void 0;
214
+ return;
215
+ }
216
+ let t = A - e.scrollLeft;
217
+ if (Math.abs(t) < .5) {
218
+ X(A), A = void 0;
219
+ return;
220
+ }
221
+ X(e.scrollLeft + t * .42), Le();
222
+ }
223
+ function Le() {
224
+ !L() || k !== void 0 || typeof window.requestAnimationFrame != "function" || (k = window.requestAnimationFrame(Ie));
225
+ }
226
+ function Re() {
227
+ if (A !== void 0) {
228
+ if (!L() || typeof window.requestAnimationFrame != "function" || ue()) {
229
+ X(A), A = void 0;
230
+ return;
231
+ }
232
+ k === void 0 && Ie();
233
+ }
234
+ }
235
+ function ze(e, t) {
236
+ if (d.disabled || (e === "vertical" ? !v.value : !y.value) || t.button !== 0 || t.target !== t.currentTarget) return;
237
+ let n = e === "vertical" ? m.value : h.value, r = Pe(e);
238
+ if (!n || !r || r.thumbTravel <= 0) return;
239
+ t.preventDefault(), z();
240
+ let i = n.getBoundingClientRect(), a = e === "vertical" ? t.clientY - i.top - b.value / 2 : t.clientX - i.left - x.value / 2, o = Math.min(1, Math.max(0, a / r.thumbTravel));
241
+ if (e === "vertical") {
242
+ Y(o * r.maxScroll);
243
+ return;
244
+ }
245
+ X(o * r.maxScroll);
246
+ }
247
+ function Be() {
248
+ L() && (window.addEventListener("pointermove", He), window.addEventListener("pointerup", Q), window.addEventListener("pointercancel", Q));
249
+ }
250
+ function Z() {
251
+ L() && (window.removeEventListener("pointermove", He), window.removeEventListener("pointerup", Q), window.removeEventListener("pointercancel", Q));
252
+ }
253
+ function Ve(e, t) {
254
+ if (!(d.disabled || (e === "vertical" ? !v.value : !y.value) || t.button !== 0)) {
255
+ t.preventDefault(), t.stopPropagation(), z(), pe = e === "vertical" ? t.clientY : t.clientX, me = f.value?.scrollTop ?? 0, he = f.value?.scrollLeft ?? 0, C.value = e, Be();
256
+ try {
257
+ t.currentTarget?.setPointerCapture?.(t.pointerId);
258
+ } catch {}
259
+ }
260
+ }
261
+ function He(e) {
262
+ let t = C.value;
263
+ if (!t) return;
264
+ let n = Pe(t);
265
+ if (!n || n.thumbTravel <= 0) return;
266
+ e.preventDefault();
267
+ let r = ((t === "vertical" ? e.clientY : e.clientX) - pe) * (n.maxScroll / n.thumbTravel);
268
+ if (t === "vertical") {
269
+ Y(me + r);
270
+ return;
271
+ }
272
+ X(he + r);
273
+ }
274
+ function Q() {
275
+ C.value && (C.value = null, Z());
276
+ }
277
+ function Ue(e) {
278
+ let t = f.value;
279
+ if (t) {
280
+ if (typeof e == "number") {
281
+ z(), Y(e);
282
+ return;
283
+ }
284
+ z(), t.scrollTo(e), G();
285
+ }
286
+ }
287
+ function We(e) {
288
+ let t = f.value;
289
+ if (t) {
290
+ if (typeof e == "number") {
291
+ z(), Y(t.scrollTop + e);
292
+ return;
293
+ }
294
+ z(), t.scrollBy(e), G();
295
+ }
296
+ }
297
+ function $() {
298
+ if (T?.disconnect(), T = void 0, E?.disconnect(), E = void 0, L()) {
299
+ if (fe.viewport && f.value && typeof MutationObserver < "u" && (E = new MutationObserver(K), E.observe(f.value, {
300
+ childList: !0,
301
+ subtree: !0,
302
+ characterData: !0
303
+ })), typeof ResizeObserver > "u") {
304
+ window.addEventListener("resize", K), K();
305
+ return;
306
+ }
307
+ T = new ResizeObserver(K), f.value && T.observe(f.value), p.value && T.observe(p.value), m.value && T.observe(m.value), h.value && T.observe(h.value), K();
308
+ }
309
+ }
310
+ return u(f, () => {
311
+ z(), Z(), $();
312
+ }, { flush: "post" }), u(() => [
313
+ d.height,
314
+ d.maxHeight,
315
+ d.minThumbSize,
316
+ d.overflowTolerance,
317
+ d.disabled,
318
+ d.vertical,
319
+ d.horizontal
320
+ ], K), u(() => [d.disabled, d.smooth], () => {
321
+ B() || j?.cancel();
322
+ }, { deep: !0 }), te(() => {
323
+ j = t({
324
+ getElement: () => f.value,
325
+ getOptions: Ae,
326
+ getAxes: () => ({
327
+ horizontal: d.horizontal,
328
+ vertical: d.vertical
329
+ }),
330
+ isEnabled: B,
331
+ prefersReducedMotion: () => ue()
332
+ }), $();
333
+ }), ee(() => {
334
+ De(), Oe(), z(), j = void 0, Z(), T?.disconnect(), T = void 0, E?.disconnect(), E = void 0, L() && window.removeEventListener("resize", K);
335
+ }), ce({
336
+ handleWheel: J,
337
+ scrollBy: We,
338
+ scrollTo: Ue,
339
+ stop: z,
340
+ update: V,
341
+ get viewport() {
342
+ return f.value;
343
+ }
344
+ }), (e, t) => (ne(), r("div", {
345
+ class: s(_e.value),
346
+ style: c(ve.value),
347
+ onMouseenter: t[4] ||= (e) => S.value = !0,
348
+ onMouseleave: t[5] ||= (e) => S.value = !1
349
+ }, [
350
+ re(e.$slots, "viewport", {
351
+ viewportRef: we,
352
+ viewportAttrs: Te
353
+ }, () => [i("div", {
354
+ ref_key: "viewportRef",
355
+ ref: f,
356
+ class: "bing-scrollbar__viewport",
357
+ tabindex: Se.value ? 0 : void 0,
358
+ role: Ce.value ? "region" : void 0,
359
+ "aria-label": Ce.value,
360
+ onScroll: Me,
361
+ onWheel: J,
362
+ onKeydown: Ne
363
+ }, [i("div", {
364
+ ref_key: "contentRef",
365
+ ref: p,
366
+ class: "bing-scrollbar__content"
367
+ }, [re(e.$slots, "default", {}, void 0, !0)], 512)], 40, se)], !0),
368
+ oe(i("div", {
369
+ ref_key: "verticalRailRef",
370
+ ref: m,
371
+ class: "bing-scrollbar__rail bing-scrollbar__rail--vertical",
372
+ "aria-hidden": "true",
373
+ onPointerdown: t[1] ||= (e) => ze("vertical", e)
374
+ }, [i("div", {
375
+ ref_key: "verticalThumbRef",
376
+ ref: g,
377
+ class: "bing-scrollbar__thumb bing-scrollbar__thumb--vertical",
378
+ style: c(ye()),
379
+ onPointerdown: t[0] ||= (e) => Ve("vertical", e)
380
+ }, null, 36)], 544), [[ae, v.value]]),
381
+ oe(i("div", {
382
+ ref_key: "horizontalRailRef",
383
+ ref: h,
384
+ class: "bing-scrollbar__rail bing-scrollbar__rail--horizontal",
385
+ "aria-hidden": "true",
386
+ onPointerdown: t[3] ||= (e) => ze("horizontal", e)
387
+ }, [i("div", {
388
+ ref_key: "horizontalThumbRef",
389
+ ref: _,
390
+ class: "bing-scrollbar__thumb bing-scrollbar__thumb--horizontal",
391
+ style: c(be()),
392
+ onPointerdown: t[2] ||= (e) => Ve("horizontal", e)
393
+ }, null, 36)], 544), [[ae, y.value]])
394
+ ], 38));
395
+ }
396
+ });
397
+ //#endregion
398
+ export { ce as default };
@@ -0,0 +1,7 @@
1
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./BingSelect.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/BingSelect/BingSelect.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-8fbf2f8f"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -18,18 +18,19 @@ type __VLS_Slots = {} & {
18
18
  'option-detail'?: (props: typeof __VLS_107) => any;
19
19
  };
20
20
  declare const __VLS_base: import('vue').DefineComponent<BingSelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
- clear: () => any;
22
- change: (payload: BingSelectChangePayload) => any;
23
21
  close: () => any;
24
- "update:modelValue": (value: BingSelectModelValue) => any;
25
22
  open: () => any;
23
+ change: (payload: BingSelectChangePayload) => any;
24
+ clear: () => any;
25
+ "update:modelValue": (value: BingSelectModelValue) => any;
26
26
  }, string, import('vue').PublicProps, Readonly<BingSelectProps> & Readonly<{
27
- onClear?: (() => any) | undefined;
28
- onChange?: ((payload: BingSelectChangePayload) => any) | undefined;
29
27
  onClose?: (() => any) | undefined;
30
- "onUpdate:modelValue"?: ((value: BingSelectModelValue) => any) | undefined;
31
28
  onOpen?: (() => any) | undefined;
29
+ onChange?: ((payload: BingSelectChangePayload) => any) | undefined;
30
+ onClear?: (() => any) | undefined;
31
+ "onUpdate:modelValue"?: ((value: BingSelectModelValue) => any) | undefined;
32
32
  }>, {
33
+ status: "default" | "error" | "success" | "warning";
33
34
  disabled: boolean;
34
35
  minWidth: string | number;
35
36
  width: string | number;
@@ -41,7 +42,6 @@ declare const __VLS_base: import('vue').DefineComponent<BingSelectProps, {}, {},
41
42
  placeholder: string;
42
43
  clearable: boolean;
43
44
  ariaDescribedby: string;
44
- status: "default" | "error" | "success" | "warning";
45
45
  glass: boolean;
46
46
  glassBlur: string | number;
47
47
  glassOpacity: number;