@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.
- package/README.md +300 -171
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/bing-ui.css +1 -1
- package/dist/components/BingAnimatedText/BingAnimatedText.js +7 -0
- package/dist/components/BingAnimatedText/BingAnimatedText.vue_vue_type_script_setup_true_lang.js +194 -0
- package/dist/components/BingAppSwitcherTransition/BingAppSwitcherTransition.js +7 -0
- package/dist/components/BingAppSwitcherTransition/BingAppSwitcherTransition.vue_vue_type_script_setup_true_lang.js +244 -0
- package/dist/components/BingAutocomplete/BingAutocomplete.js +7 -0
- package/dist/components/BingAutocomplete/BingAutocomplete.vue.d.ts +4 -4
- package/dist/components/BingAutocomplete/BingAutocomplete.vue_vue_type_script_setup_true_lang.js +560 -0
- package/dist/components/BingButton/BingButton.js +7 -0
- package/dist/components/BingButton/BingButton.vue.d.ts +2 -2
- package/dist/components/BingButton/BingButton.vue_vue_type_script_setup_true_lang.js +200 -0
- package/dist/components/BingCard/BingCard.js +7 -0
- package/dist/components/BingCard/BingCard.vue_vue_type_script_setup_true_lang.js +481 -0
- package/dist/components/BingCarouselTransition/BingCarouselTransition.js +7 -0
- package/dist/components/BingCarouselTransition/BingCarouselTransition.vue_vue_type_script_setup_true_lang.js +174 -0
- package/dist/components/BingCheckbox/BingCheckbox.js +7 -0
- package/dist/components/BingCheckbox/BingCheckbox.vue.d.ts +4 -4
- package/dist/components/BingCheckbox/BingCheckbox.vue_vue_type_script_setup_true_lang.js +233 -0
- package/dist/components/BingCheckboxGroup/BingCheckboxGroup.context.js +4 -0
- package/dist/components/BingCheckboxGroup/BingCheckboxGroup.js +7 -0
- package/dist/components/BingCheckboxGroup/BingCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/BingCheckboxGroup/BingCheckboxGroup.vue_vue_type_script_setup_true_lang.js +105 -0
- package/dist/components/BingCodeBlock/BingCodeBlock.highlight.js +78 -0
- package/dist/components/BingCodeBlock/BingCodeBlock.js +7 -0
- package/dist/components/BingCodeBlock/BingCodeBlock.vue_vue_type_script_setup_true_lang.js +347 -0
- package/dist/components/BingColorPicker/BingColorPicker.js +7 -0
- package/dist/components/BingColorPicker/BingColorPicker.utils.d.ts +70 -0
- package/dist/components/BingColorPicker/BingColorPicker.utils.js +265 -0
- package/dist/components/BingColorPicker/BingColorPicker.vue.d.ts +7 -7
- package/dist/components/BingColorPicker/BingColorPicker.vue_vue_type_script_setup_true_lang.js +540 -0
- package/dist/components/BingColorPicker/BingColorPickerFormatEditor.js +7 -0
- package/dist/components/BingColorPicker/BingColorPickerFormatEditor.vue.d.ts +27 -0
- package/dist/components/BingColorPicker/BingColorPickerFormatEditor.vue_vue_type_script_setup_true_lang.js +142 -0
- package/dist/components/BingColorPicker/BingColorPickerSpectrum.js +7 -0
- package/dist/components/BingColorPicker/BingColorPickerSpectrum.vue.d.ts +26 -0
- package/dist/components/BingColorPicker/BingColorPickerSpectrum.vue_vue_type_script_setup_true_lang.js +168 -0
- package/dist/components/BingConfigProvider/BingConfigProvider.js +5 -0
- package/dist/components/BingConfigProvider/BingConfigProvider.types.d.ts +5 -0
- package/dist/components/BingConfigProvider/BingConfigProvider.vue.d.ts +18 -0
- package/dist/components/BingConfigProvider/BingConfigProvider.vue_vue_type_script_setup_true_lang.js +18 -0
- package/dist/components/BingConfigProvider/index.d.ts +3 -0
- package/dist/components/BingCursor/BingCursor.controller.js +240 -0
- package/dist/components/BingCursor/BingCursor.js +7 -0
- package/dist/components/BingCursor/BingCursor.native.js +20 -0
- package/dist/components/BingCursor/BingCursor.presets.js +60 -0
- package/dist/components/BingCursor/BingCursor.shapes.js +83 -0
- package/dist/components/BingCursor/BingCursor.styleSource.js +83 -0
- package/dist/components/BingCursor/BingCursor.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/components/BingDatePicker/BingDatePicker.js +7 -0
- package/dist/components/BingDatePicker/BingDatePicker.utils.d.ts +26 -0
- package/dist/components/BingDatePicker/BingDatePicker.utils.js +137 -0
- package/dist/components/BingDatePicker/BingDatePicker.vue.d.ts +14 -14
- package/dist/components/BingDatePicker/BingDatePicker.vue_vue_type_script_setup_true_lang.js +804 -0
- package/dist/components/BingDatePicker/BingDatePickerCalendar.js +7 -0
- package/dist/components/BingDatePicker/BingDatePickerCalendar.vue.d.ts +37 -0
- package/dist/components/BingDatePicker/BingDatePickerCalendar.vue_vue_type_script_setup_true_lang.js +248 -0
- package/dist/components/BingDatePicker/BingDatePickerTimePanel.js +7 -0
- package/dist/components/BingDatePicker/BingDatePickerTimePanel.vue.d.ts +26 -0
- package/dist/components/BingDatePicker/BingDatePickerTimePanel.vue_vue_type_script_setup_true_lang.js +97 -0
- package/dist/components/BingDeckTransition/BingDeckTransition.js +7 -0
- package/dist/components/BingDeckTransition/BingDeckTransition.vue_vue_type_script_setup_true_lang.js +187 -0
- package/dist/components/BingDialog/BingDialog.js +7 -0
- package/dist/components/BingDialog/BingDialog.vue.d.ts +4 -5
- package/dist/components/BingDialog/BingDialog.vue_vue_type_script_setup_true_lang.js +558 -0
- package/dist/components/BingDropDown/BingDropDown.context.js +4 -0
- package/dist/components/BingDropDown/BingDropDown.js +7 -0
- package/dist/components/BingDropDown/BingDropDown.vue.d.ts +1 -2
- package/dist/components/BingDropDown/BingDropDown.vue_vue_type_script_setup_true_lang.js +649 -0
- package/dist/components/BingDropDown/BingDropDownItem.js +7 -0
- package/dist/components/BingDropDown/BingDropDownItem.vue.d.ts +1 -1
- package/dist/components/BingDropDown/BingDropDownItem.vue_vue_type_script_setup_true_lang.js +308 -0
- package/dist/components/BingFilePreview/BingFilePreview.js +7 -0
- package/dist/components/BingFilePreview/BingFilePreview.vue.d.ts +4 -5
- package/dist/components/BingFilePreview/BingFilePreview.vue_vue_type_script_setup_true_lang.js +589 -0
- package/dist/components/BingForm/BingForm.context.js +7 -0
- package/dist/components/BingForm/BingForm.js +7 -0
- package/dist/components/BingForm/BingForm.vue.d.ts +0 -1
- package/dist/components/BingForm/BingForm.vue_vue_type_script_setup_true_lang.js +300 -0
- package/dist/components/BingForm/formFocus.js +13 -0
- package/dist/components/BingForm/formTabOrder.js +27 -0
- package/dist/components/BingForm/useFormControl.d.ts +1 -1
- package/dist/components/BingForm/useFormControl.js +24 -0
- package/dist/components/BingForm/useFormNextHint.js +135 -0
- package/dist/components/BingFormItem/BingFormItem.js +7 -0
- package/dist/components/BingFormItem/BingFormItem.vue.d.ts +1 -1
- package/dist/components/BingFormItem/BingFormItem.vue_vue_type_script_setup_true_lang.js +252 -0
- package/dist/components/BingIcon/BingIcon.js +7 -0
- package/dist/components/BingIcon/BingIcon.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/components/BingImage/BingImage.js +7 -0
- package/dist/components/BingImage/BingImage.vue_vue_type_script_setup_true_lang.js +244 -0
- package/dist/components/BingImagePreview/BingImagePreview.js +7 -0
- package/dist/components/BingImagePreview/BingImagePreview.vue.d.ts +4 -5
- package/dist/components/BingImagePreview/BingImagePreview.vue_vue_type_script_setup_true_lang.js +699 -0
- package/dist/components/BingInput/BingInput.js +7 -0
- package/dist/components/BingInput/BingInput.vue.d.ts +6 -6
- package/dist/components/BingInput/BingInput.vue_vue_type_script_setup_true_lang.js +311 -0
- package/dist/components/BingRadio/BingRadio.js +7 -0
- package/dist/components/BingRadio/BingRadio.vue.d.ts +4 -4
- package/dist/components/BingRadio/BingRadio.vue_vue_type_script_setup_true_lang.js +170 -0
- package/dist/components/BingRadioGroup/BingRadioGroup.context.js +4 -0
- package/dist/components/BingRadioGroup/BingRadioGroup.js +7 -0
- package/dist/components/BingRadioGroup/BingRadioGroup.vue.d.ts +4 -4
- package/dist/components/BingRadioGroup/BingRadioGroup.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/components/BingResizable/BingResizable.js +7 -0
- package/dist/components/BingResizable/BingResizable.vue.d.ts +1 -1
- package/dist/components/BingResizable/BingResizable.vue_vue_type_script_setup_true_lang.js +555 -0
- package/dist/components/BingScrollbar/BingScrollbar.js +7 -0
- package/dist/components/BingScrollbar/BingScrollbar.vue.d.ts +2 -2
- package/dist/components/BingScrollbar/BingScrollbar.vue_vue_type_script_setup_true_lang.js +398 -0
- package/dist/components/BingSelect/BingSelect.js +7 -0
- package/dist/components/BingSelect/BingSelect.vue.d.ts +7 -7
- package/dist/components/BingSelect/BingSelect.vue_vue_type_script_setup_true_lang.js +1066 -0
- package/dist/components/BingSlider/BingSlider.js +7 -0
- package/dist/components/BingSlider/BingSlider.vue.d.ts +6 -6
- package/dist/components/BingSlider/BingSlider.vue_vue_type_script_setup_true_lang.js +130 -0
- package/dist/components/BingSortableList/BingSortableList.js +7 -0
- package/dist/components/BingSortableList/BingSortableList.vue_vue_type_script_setup_true_lang.js +334 -0
- package/dist/components/BingSortableList/BingSortableListItem.js +7 -0
- package/dist/components/BingSortableList/BingSortableListItem.vue_vue_type_script_setup_true_lang.js +76 -0
- package/dist/components/BingSplitPane/BingSplitPane.js +7 -0
- package/dist/components/BingSplitPane/BingSplitPane.vue_vue_type_script_setup_true_lang.js +167 -0
- package/dist/components/BingTable/BingTable.js +7 -0
- package/dist/components/BingTable/BingTable.measurements.js +72 -0
- package/dist/components/BingTable/BingTable.vue.d.ts +1 -2
- package/dist/components/BingTable/BingTable.vue_vue_type_script_setup_true_lang.js +1416 -0
- package/dist/components/BingTable/BingTableCellValue.js +7 -0
- package/dist/components/BingTable/BingTableCellValue.vue_vue_type_script_setup_true_lang.js +68 -0
- package/dist/components/BingTable/BingTableHeaderCell.js +5 -0
- package/dist/components/BingTable/BingTableHeaderCell.vue_vue_type_script_setup_true_lang.js +45 -0
- package/dist/components/BingTable/BingTableHeaderContent.js +7 -0
- package/dist/components/BingTable/BingTableHeaderContent.vue_vue_type_script_setup_true_lang.js +110 -0
- package/dist/components/BingTable/useTableColumns.js +126 -0
- package/dist/components/BingTableColumnControls/BingTableColumnControls.js +7 -0
- package/dist/components/BingTableColumnControls/BingTableColumnControls.vue.d.ts +1 -1
- package/dist/components/BingTableColumnControls/BingTableColumnControls.vue_vue_type_script_setup_true_lang.js +251 -0
- package/dist/components/BingTabs/BingTabs.js +7 -0
- package/dist/components/BingTabs/BingTabs.vue.d.ts +2 -3
- package/dist/components/BingTabs/BingTabs.vue_vue_type_script_setup_true_lang.js +320 -0
- package/dist/components/BingTag/BingTag.js +7 -0
- package/dist/components/BingTag/BingTag.vue.d.ts +0 -1
- package/dist/components/BingTag/BingTag.vue_vue_type_script_setup_true_lang.js +65 -0
- package/dist/components/BingTextarea/BingTextarea.js +7 -0
- package/dist/components/BingTextarea/BingTextarea.vue.d.ts +6 -6
- package/dist/components/BingTextarea/BingTextarea.vue_vue_type_script_setup_true_lang.js +243 -0
- package/dist/components/BingToast/BingToast.js +7 -0
- package/dist/components/BingToast/BingToast.service.js +132 -0
- package/dist/components/BingToast/BingToast.types.d.ts +1 -1
- package/dist/components/BingToast/BingToast.types.js +19 -0
- package/dist/components/BingToast/BingToast.vue.d.ts +0 -1
- package/dist/components/BingToast/BingToast.vue_vue_type_script_setup_true_lang.js +307 -0
- package/dist/components/BingTooltip/BingTooltip.js +7 -0
- package/dist/components/BingTooltip/BingTooltip.shared.js +14 -0
- package/dist/components/BingTooltip/BingTooltip.vue.d.ts +4 -5
- package/dist/components/BingTooltip/BingTooltip.vue_vue_type_script_setup_true_lang.js +572 -0
- package/dist/components/BingTreeSelect/BingTreeSelect.js +7 -0
- package/dist/components/BingTreeSelect/BingTreeSelect.vue.d.ts +7 -7
- package/dist/components/BingTreeSelect/BingTreeSelect.vue_vue_type_script_setup_true_lang.js +1274 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/icons/LICENSE-lucide.txt +39 -0
- package/dist/icons/createIcon.d.ts +8 -0
- package/dist/icons/createIcon.js +36 -0
- package/dist/icons/icons.d.ts +51 -0
- package/dist/icons/icons.js +252 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/index.js +48 -0
- package/dist/motion/clickParticles.d.ts +1 -1
- package/dist/motion/clickParticles2.js +66 -0
- package/dist/motion/index.d.ts +1 -1
- package/dist/motion/index.js +17 -0
- package/dist/motion/liquidHover.js +36 -0
- package/dist/motion/optionDetailMotion.d.ts +7 -1
- package/dist/motion/optionDetailMotion.js +74 -0
- package/dist/motion/panelMotion.js +19 -0
- package/dist/motion/reducedMotion.d.ts +16 -0
- package/dist/motion/reducedMotion.js +28 -0
- package/dist/motion/selectPanelMotion.js +115 -0
- package/dist/motion/smoothScroll.d.ts +2 -0
- package/dist/motion/smoothScroll.js +276 -0
- package/dist/motion/useClickFeedback.js +47 -0
- package/dist/motion/useTextControlCaret.js +136 -0
- package/dist/utils/clipboard.d.ts +9 -0
- package/dist/utils/clipboard.js +16 -0
- package/dist/utils/config.d.ts +42 -0
- package/dist/utils/config.js +37 -0
- package/dist/utils/controlAttrs.js +37 -0
- package/dist/utils/floating.d.ts +86 -0
- package/dist/utils/floating.js +99 -0
- package/dist/utils/glass.js +25 -0
- package/dist/utils/overlay.js +94 -0
- package/dist/utils/scrollLock.js +44 -0
- package/dist/utils/search.d.ts +16 -0
- package/dist/utils/search.js +23 -0
- package/dist/utils/useClientReady.js +10 -0
- package/dist/utils/useDeferredBlurValidation.d.ts +18 -0
- package/dist/utils/useDeferredBlurValidation.js +34 -0
- package/dist/utils/useKeyboardScrollSync.d.ts +11 -0
- package/dist/utils/useKeyboardScrollSync.js +28 -0
- package/dist/utils/useOptionDetailPanel.d.ts +50 -0
- package/dist/utils/useOptionDetailPanel.js +180 -0
- package/dist/utils/useOutsidePointerDown.d.ts +8 -0
- package/dist/utils/useOutsidePointerDown.js +17 -0
- package/dist/utils/useSearchShortcutFocus.d.ts +18 -0
- package/dist/utils/useSearchShortcutFocus.js +47 -0
- package/dist/utils/useVirtualList.d.ts +42 -0
- package/dist/utils/useVirtualList.js +74 -0
- package/package.json +15 -9
- package/dist/bing-ui.es.js +0 -31278
- package/dist/bing-ui.umd.js +0 -229
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { BingColorPickerChangePayload, BingColorPickerExpose,
|
|
1
|
+
import { BingColorPickerChangePayload, BingColorPickerExpose, BingColorPickerProps } from './BingColorPicker.types';
|
|
2
2
|
declare const _default: typeof __VLS_export;
|
|
3
3
|
export default _default;
|
|
4
4
|
declare const __VLS_export: import('vue').DefineComponent<BingColorPickerProps, BingColorPickerExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
|
-
change: (payload: BingColorPickerChangePayload) => any;
|
|
6
5
|
close: () => any;
|
|
6
|
+
open: () => any;
|
|
7
|
+
change: (payload: BingColorPickerChangePayload) => any;
|
|
7
8
|
copy: (payload: import('./BingColorPicker.types').BingColorPickerCopyPayload) => any;
|
|
8
9
|
"update:modelValue": (value: string) => any;
|
|
9
|
-
open: () => any;
|
|
10
10
|
copyError: (error: Error) => any;
|
|
11
11
|
}, string, import('vue').PublicProps, Readonly<BingColorPickerProps> & Readonly<{
|
|
12
|
-
onChange?: ((payload: BingColorPickerChangePayload) => any) | undefined;
|
|
13
12
|
onClose?: (() => any) | undefined;
|
|
13
|
+
onOpen?: (() => any) | undefined;
|
|
14
|
+
onChange?: ((payload: BingColorPickerChangePayload) => any) | undefined;
|
|
14
15
|
onCopy?: ((payload: import('./BingColorPicker.types').BingColorPickerCopyPayload) => any) | undefined;
|
|
15
16
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
16
|
-
onOpen?: (() => any) | undefined;
|
|
17
17
|
onCopyError?: ((error: Error) => any) | undefined;
|
|
18
18
|
}>, {
|
|
19
|
+
status: "default" | "error" | "success" | "warning";
|
|
19
20
|
disabled: boolean;
|
|
20
21
|
minWidth: string | number;
|
|
21
22
|
width: string | number;
|
|
@@ -25,7 +26,6 @@ declare const __VLS_export: import('vue').DefineComponent<BingColorPickerProps,
|
|
|
25
26
|
ariaLabel: string;
|
|
26
27
|
modelValue: import('./BingColorPicker.types').BingColorPickerModelValue;
|
|
27
28
|
ariaDescribedby: string;
|
|
28
|
-
status: "default" | "error" | "success" | "warning";
|
|
29
29
|
glass: boolean;
|
|
30
30
|
glassBlur: string | number;
|
|
31
31
|
glassOpacity: number;
|
|
@@ -34,5 +34,5 @@ declare const __VLS_export: import('vue').DefineComponent<BingColorPickerProps,
|
|
|
34
34
|
copyLabel: string;
|
|
35
35
|
copiedLabel: string;
|
|
36
36
|
copyResetDelay: number;
|
|
37
|
-
presets: BingColorPickerPresetInput[];
|
|
37
|
+
presets: import('./BingColorPicker.types').BingColorPickerPresetInput[];
|
|
38
38
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
package/dist/components/BingColorPicker/BingColorPicker.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,540 @@
|
|
|
1
|
+
import { useConfigZIndex as e } from "../../utils/config.js";
|
|
2
|
+
import { useReducedMotion as t } from "../../motion/reducedMotion.js";
|
|
3
|
+
import { useClickFeedback as n } from "../../motion/useClickFeedback.js";
|
|
4
|
+
import { isolateFormControls as r, useFormControl as i } from "../BingForm/useFormControl.js";
|
|
5
|
+
import { ChevronDown as a } from "../../icons/icons.js";
|
|
6
|
+
import ee from "../BingIcon/BingIcon.js";
|
|
7
|
+
import te from "../BingScrollbar/BingScrollbar.js";
|
|
8
|
+
import { useOverlay as ne } from "../../utils/overlay.js";
|
|
9
|
+
import { useClientReady as re } from "../../utils/useClientReady.js";
|
|
10
|
+
import { createGlassCssVariables as ie, defaultGlassEffect as o } from "../../utils/glass.js";
|
|
11
|
+
import { writeTextWithClipboardApi as ae, writeTextWithTextareaFallback as oe } from "../../utils/clipboard.js";
|
|
12
|
+
import { computeFloatingPosition as se, useFloatingAutoUpdate as ce } from "../../utils/floating.js";
|
|
13
|
+
import { clamp as le, createColorValue as ue, defaultColor as de, defaultPresets as fe, getColorFormatValue as pe, getHueFromHex as s, hexToRgb as me, hsvToRgb as he, normalizeAlpha as ge, normalizeCssLength as _e, normalizeHex as ve, normalizeHue as ye, normalizePreset as be, parseColorInput as xe, parseCssSize as Se, resolveAlpha as Ce, resolveColor as we, rgbToHex as Te, rgbToHsv as Ee } from "./BingColorPicker.utils.js";
|
|
14
|
+
import De from "./BingColorPickerFormatEditor.js";
|
|
15
|
+
import Oe from "./BingColorPickerSpectrum.js";
|
|
16
|
+
import { Fragment as ke, Teleport as Ae, computed as c, createBlock as je, createCommentVNode as Me, createElementBlock as l, createElementVNode as u, createVNode as d, defineComponent as f, nextTick as p, normalizeClass as m, normalizeStyle as h, onBeforeUnmount as Ne, openBlock as g, ref as _, renderList as Pe, toDisplayString as Fe, unref as v, watch as y, withCtx as Ie, withDirectives as Le, withModifiers as Re } from "vue";
|
|
17
|
+
import { gsap as b } from "gsap";
|
|
18
|
+
//#region src/components/BingColorPicker/BingColorPicker.vue?vue&type=script&setup=true&lang.ts
|
|
19
|
+
var ze = [
|
|
20
|
+
"id",
|
|
21
|
+
"disabled",
|
|
22
|
+
"aria-label",
|
|
23
|
+
"aria-describedby",
|
|
24
|
+
"aria-invalid",
|
|
25
|
+
"aria-expanded"
|
|
26
|
+
], Be = {
|
|
27
|
+
class: "bing-color-picker__swatch-wrap",
|
|
28
|
+
"aria-hidden": "true"
|
|
29
|
+
}, Ve = { class: "bing-color-picker__trigger-value" }, He = { class: "bing-color-picker__trigger-format" }, Ue = {
|
|
30
|
+
class: "bing-color-picker__chevron",
|
|
31
|
+
"aria-hidden": "true"
|
|
32
|
+
}, We = ["aria-label"], Ge = { class: "bing-color-picker__body" }, Ke = {
|
|
33
|
+
class: "bing-color-picker__presets",
|
|
34
|
+
"aria-label": "预设颜色"
|
|
35
|
+
}, qe = [
|
|
36
|
+
"aria-label",
|
|
37
|
+
"aria-pressed",
|
|
38
|
+
"title",
|
|
39
|
+
"disabled",
|
|
40
|
+
"onClick"
|
|
41
|
+
], Je = {
|
|
42
|
+
class: "bing-color-picker__preset-surface",
|
|
43
|
+
"aria-hidden": "true"
|
|
44
|
+
}, Ye = 0, x = 320, Xe = 280, Ze = 180, S = /* @__PURE__ */ f({
|
|
45
|
+
__name: "BingColorPicker",
|
|
46
|
+
props: {
|
|
47
|
+
id: { default: void 0 },
|
|
48
|
+
modelValue: { default: de },
|
|
49
|
+
presets: { default: () => fe },
|
|
50
|
+
disabled: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: void 0
|
|
53
|
+
},
|
|
54
|
+
size: { default: void 0 },
|
|
55
|
+
block: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: !1
|
|
58
|
+
},
|
|
59
|
+
width: { default: void 0 },
|
|
60
|
+
minWidth: { default: 180 },
|
|
61
|
+
panelWidth: { default: x },
|
|
62
|
+
copyLabel: { default: "复制" },
|
|
63
|
+
copiedLabel: { default: "已复制" },
|
|
64
|
+
copyResetDelay: { default: 1400 },
|
|
65
|
+
ariaLabel: { default: void 0 },
|
|
66
|
+
ariaDescribedby: { default: void 0 },
|
|
67
|
+
status: { default: void 0 },
|
|
68
|
+
glass: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: o.glass
|
|
71
|
+
},
|
|
72
|
+
glassBlur: { default: void 0 },
|
|
73
|
+
glassOpacity: { default: void 0 },
|
|
74
|
+
glassSaturation: { default: void 0 }
|
|
75
|
+
},
|
|
76
|
+
emits: [
|
|
77
|
+
"update:modelValue",
|
|
78
|
+
"change",
|
|
79
|
+
"copy",
|
|
80
|
+
"copyError",
|
|
81
|
+
"open",
|
|
82
|
+
"close"
|
|
83
|
+
],
|
|
84
|
+
setup(o, { expose: de, emit: fe }) {
|
|
85
|
+
let f = t(), { vClickFeedback: S, playClickFeedback: Qe } = n(), C = o, w = fe, $e = re(), { formItem: T, resolvedId: et, resolvedSize: tt, resolvedDisabled: E, resolvedStatus: nt, resolvedAriaDescribedby: rt } = i(C);
|
|
86
|
+
r();
|
|
87
|
+
let it = `bing-color-picker-${++Ye}`, at = `${it}-panel`, D = _(null), O = _(null), k = _(null), ot = _(null), A = _(we(C.modelValue)), j = _(Ce(C.modelValue)), M = _(A.value), N = _(j.value), P = _("hex"), F = _(Ee(me(M.value)).h), I = _(!1), L = _(!1), R = _(null), z = _({
|
|
88
|
+
left: 0,
|
|
89
|
+
placement: "bottom",
|
|
90
|
+
top: 0,
|
|
91
|
+
width: x
|
|
92
|
+
}), B = !1, V, H, U, W, G, st = c(() => ie("bing-color-picker", {
|
|
93
|
+
glass: C.glass,
|
|
94
|
+
glassBlur: C.glassBlur,
|
|
95
|
+
glassOpacity: C.glassOpacity,
|
|
96
|
+
glassSaturation: C.glassSaturation
|
|
97
|
+
})), ct = c(() => {
|
|
98
|
+
let e = {
|
|
99
|
+
"--bing-color-picker-min-width": _e(C.minWidth),
|
|
100
|
+
"--bing-color-picker-width": `${Xe}px`,
|
|
101
|
+
...st.value
|
|
102
|
+
};
|
|
103
|
+
return C.width !== void 0 && (e["--bing-color-picker-width"] = _e(C.width)), e;
|
|
104
|
+
}), K = ce(At, { enabled: () => I.value }), lt = e("colorPicker"), q = ne({
|
|
105
|
+
open: () => L.value,
|
|
106
|
+
elements: () => [D.value, k.value],
|
|
107
|
+
zIndex: () => lt.value,
|
|
108
|
+
onEscape: () => $(!0)
|
|
109
|
+
}), ut = c(() => ({
|
|
110
|
+
left: `${z.value.left}px`,
|
|
111
|
+
position: "fixed",
|
|
112
|
+
top: `${z.value.top}px`,
|
|
113
|
+
width: `${z.value.width}px`,
|
|
114
|
+
zIndex: q.zIndex.value,
|
|
115
|
+
...st.value
|
|
116
|
+
})), dt = c(() => [
|
|
117
|
+
"bing-color-picker",
|
|
118
|
+
`bing-color-picker--${tt.value}`,
|
|
119
|
+
`bing-color-picker--status-${nt.value}`,
|
|
120
|
+
{
|
|
121
|
+
"is-open": I.value,
|
|
122
|
+
"is-block": C.block || !!T,
|
|
123
|
+
"is-disabled": E.value,
|
|
124
|
+
"is-invalid": nt.value === "error"
|
|
125
|
+
}
|
|
126
|
+
]), ft = c(() => [
|
|
127
|
+
"bing-color-picker__panel",
|
|
128
|
+
`is-placement-${z.value.placement}`,
|
|
129
|
+
{ "is-glass": C.glass }
|
|
130
|
+
]), J = c(() => ue(M.value, N.value)), pt = c(() => ue(A.value, j.value)), Y = c(() => ({
|
|
131
|
+
...Ee(J.value.rgb),
|
|
132
|
+
h: F.value
|
|
133
|
+
})), mt = c(() => ({ "--bing-color-picker-selected-color": pt.value.rgba })), ht = c(() => C.presets.map(be).filter((e) => !!e)), gt = c(() => pe(pt.value, P.value)), _t = c(() => C.ariaLabel ?? `已选颜色 ${gt.value}`);
|
|
134
|
+
y(() => C.modelValue, (e) => {
|
|
135
|
+
if (G?.value === e) {
|
|
136
|
+
G = void 0;
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
G = void 0, vt(e);
|
|
140
|
+
}), y(() => [C.panelWidth, C.presets.length], () => {
|
|
141
|
+
I.value && p(K.schedule);
|
|
142
|
+
}), y(() => E.value, (e) => {
|
|
143
|
+
e && $();
|
|
144
|
+
}), Ne(() => {
|
|
145
|
+
kt(), K.dispose(), Wt(), Z(), Pt(), b.killTweensOf([k.value, ...Nt()].filter(Boolean));
|
|
146
|
+
});
|
|
147
|
+
function X() {
|
|
148
|
+
return typeof window < "u" && typeof document < "u";
|
|
149
|
+
}
|
|
150
|
+
function vt(e) {
|
|
151
|
+
let t = xe(e), n = t?.hex ?? "#ec4899";
|
|
152
|
+
Z(), W = void 0, M.value = n, N.value = t?.alpha ?? 1, A.value = n, j.value = t?.alpha ?? 1, F.value = s(n, F.value);
|
|
153
|
+
}
|
|
154
|
+
function yt(e) {
|
|
155
|
+
return {
|
|
156
|
+
...J.value,
|
|
157
|
+
value: J.value.hex,
|
|
158
|
+
source: e
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
function Z() {
|
|
162
|
+
if (!X() || U === void 0) {
|
|
163
|
+
U = void 0;
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
window.clearTimeout(U), U = void 0;
|
|
167
|
+
}
|
|
168
|
+
function Q(e = W) {
|
|
169
|
+
Z();
|
|
170
|
+
let t = e ?? "field", n = J.value.hex, r = A.value !== n || j.value !== N.value, i = W !== void 0;
|
|
171
|
+
if (W = void 0, !r && !i) return;
|
|
172
|
+
A.value = n, j.value = N.value;
|
|
173
|
+
let a = { value: n };
|
|
174
|
+
G = a, w("update:modelValue", n), w("change", yt(t)), T?.handleControlChange(), p(() => {
|
|
175
|
+
G === a && (G = void 0);
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
function bt(e) {
|
|
179
|
+
if (W = e, Z(), !X()) {
|
|
180
|
+
Q(e);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
U = window.setTimeout(() => {
|
|
184
|
+
Q(e);
|
|
185
|
+
}, Ze);
|
|
186
|
+
}
|
|
187
|
+
function xt(e, t, n = {}) {
|
|
188
|
+
let r = ve(e);
|
|
189
|
+
if (r) {
|
|
190
|
+
if (t === "preset" && (F.value = s(r, F.value)), M.value = r, n.immediate) {
|
|
191
|
+
Q(t);
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
bt(t);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
function St(e, t, n = {}) {
|
|
198
|
+
let r = ve(e.hex);
|
|
199
|
+
if (r) {
|
|
200
|
+
if (M.value = r, N.value = ge(e.alpha), F.value = s(r, F.value), n.immediate) {
|
|
201
|
+
Q(t);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
bt(t);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
function Ct(e, t, n, r) {
|
|
208
|
+
let i = ye(e);
|
|
209
|
+
F.value = i, xt(Te(he({
|
|
210
|
+
h: i,
|
|
211
|
+
s: le(t, 0, 100),
|
|
212
|
+
v: le(n, 0, 100)
|
|
213
|
+
})), r);
|
|
214
|
+
}
|
|
215
|
+
function wt(e) {
|
|
216
|
+
N.value = ge(e), bt("alpha");
|
|
217
|
+
}
|
|
218
|
+
function Tt(e, t) {
|
|
219
|
+
St(e, "input", { immediate: t });
|
|
220
|
+
}
|
|
221
|
+
function Et() {
|
|
222
|
+
T?.handleControlBlur();
|
|
223
|
+
}
|
|
224
|
+
function Dt(e) {
|
|
225
|
+
xt(e.value, "preset", { immediate: !0 });
|
|
226
|
+
}
|
|
227
|
+
function Ot() {
|
|
228
|
+
!X() || B || (window.addEventListener("pointerdown", Vt, !0), B = !0);
|
|
229
|
+
}
|
|
230
|
+
function kt() {
|
|
231
|
+
!X() || !B || (window.removeEventListener("pointerdown", Vt, !0), B = !1);
|
|
232
|
+
}
|
|
233
|
+
function At() {
|
|
234
|
+
if (!X() || !D.value || !k.value) return;
|
|
235
|
+
let e = D.value.getBoundingClientRect(), t = window.innerWidth, n = window.innerHeight, r = Se(C.panelWidth, x), i = Math.max(0, t - 24), a = Math.min(Math.max(e.width, r), i);
|
|
236
|
+
k.value.style.width = `${a}px`;
|
|
237
|
+
let { side: ee, left: te, top: ne } = se({
|
|
238
|
+
anchor: e,
|
|
239
|
+
floating: {
|
|
240
|
+
width: a,
|
|
241
|
+
height: k.value.offsetHeight || 340
|
|
242
|
+
},
|
|
243
|
+
side: "bottom",
|
|
244
|
+
gap: 8,
|
|
245
|
+
padding: 12,
|
|
246
|
+
viewport: {
|
|
247
|
+
width: t,
|
|
248
|
+
height: n
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
z.value = {
|
|
252
|
+
left: te,
|
|
253
|
+
placement: ee,
|
|
254
|
+
top: ne,
|
|
255
|
+
width: a
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
function jt() {
|
|
259
|
+
return Array.from(k.value?.querySelectorAll(".bing-color-picker__spectrum, .bing-color-picker__format-editor") ?? []);
|
|
260
|
+
}
|
|
261
|
+
function Mt() {
|
|
262
|
+
return Array.from(k.value?.querySelectorAll(".bing-color-picker__preset-color") ?? []);
|
|
263
|
+
}
|
|
264
|
+
function Nt() {
|
|
265
|
+
return [...jt(), ...Mt()];
|
|
266
|
+
}
|
|
267
|
+
function Pt() {
|
|
268
|
+
V?.kill(), V = void 0;
|
|
269
|
+
}
|
|
270
|
+
function Ft() {
|
|
271
|
+
let e = k.value;
|
|
272
|
+
if (!e) return;
|
|
273
|
+
let t = jt(), n = Mt(), r = [...t, ...n], i = z.value.placement === "top";
|
|
274
|
+
if (Pt(), b.killTweensOf([e, ...r]), f()) {
|
|
275
|
+
b.set([e, ...r], {
|
|
276
|
+
autoAlpha: 1,
|
|
277
|
+
y: 0,
|
|
278
|
+
clearProps: "transform"
|
|
279
|
+
});
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
V = b.timeline({
|
|
283
|
+
defaults: {
|
|
284
|
+
duration: .22,
|
|
285
|
+
ease: "power3.out",
|
|
286
|
+
overwrite: !0
|
|
287
|
+
},
|
|
288
|
+
onComplete: () => {
|
|
289
|
+
b.set([e, ...r], { clearProps: "transform" }), V = void 0;
|
|
290
|
+
}
|
|
291
|
+
}), V.fromTo(e, {
|
|
292
|
+
autoAlpha: 0,
|
|
293
|
+
y: i ? 6 : -6,
|
|
294
|
+
transformOrigin: i ? "50% 100%" : "50% 0%"
|
|
295
|
+
}, {
|
|
296
|
+
autoAlpha: 1,
|
|
297
|
+
force3D: !1,
|
|
298
|
+
y: 0,
|
|
299
|
+
duration: .2
|
|
300
|
+
}, 0).fromTo(t, {
|
|
301
|
+
autoAlpha: 0,
|
|
302
|
+
y: i ? -4 : 4
|
|
303
|
+
}, {
|
|
304
|
+
autoAlpha: 1,
|
|
305
|
+
force3D: !1,
|
|
306
|
+
y: 0,
|
|
307
|
+
duration: .16
|
|
308
|
+
}, .05).fromTo(n, {
|
|
309
|
+
autoAlpha: 0,
|
|
310
|
+
y: i ? -4 : 4
|
|
311
|
+
}, {
|
|
312
|
+
autoAlpha: 1,
|
|
313
|
+
force3D: !1,
|
|
314
|
+
y: 0,
|
|
315
|
+
duration: .18,
|
|
316
|
+
stagger: .02
|
|
317
|
+
}, .06);
|
|
318
|
+
}
|
|
319
|
+
function It(e) {
|
|
320
|
+
L.value = !1, e && O.value?.focus();
|
|
321
|
+
}
|
|
322
|
+
function Lt(e = !1) {
|
|
323
|
+
let t = k.value;
|
|
324
|
+
if (!t || f()) {
|
|
325
|
+
It(e);
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
let n = jt(), r = Mt(), i = [...n, ...r], a = z.value.placement === "top";
|
|
329
|
+
Pt(), b.killTweensOf([t, ...i]), V = b.timeline({
|
|
330
|
+
defaults: {
|
|
331
|
+
duration: .14,
|
|
332
|
+
ease: "power2.in",
|
|
333
|
+
overwrite: !0
|
|
334
|
+
},
|
|
335
|
+
onComplete: () => {
|
|
336
|
+
V = void 0, It(e);
|
|
337
|
+
}
|
|
338
|
+
}), V.to(r, {
|
|
339
|
+
autoAlpha: 0,
|
|
340
|
+
force3D: !1,
|
|
341
|
+
y: a ? 4 : -4,
|
|
342
|
+
stagger: {
|
|
343
|
+
each: .012,
|
|
344
|
+
from: "end"
|
|
345
|
+
}
|
|
346
|
+
}, 0).to(n, {
|
|
347
|
+
autoAlpha: 0,
|
|
348
|
+
force3D: !1,
|
|
349
|
+
y: a ? 4 : -4,
|
|
350
|
+
duration: .12
|
|
351
|
+
}, .02).to(t, {
|
|
352
|
+
autoAlpha: 0,
|
|
353
|
+
force3D: !1,
|
|
354
|
+
y: a ? 6 : -6,
|
|
355
|
+
duration: .16
|
|
356
|
+
}, .02);
|
|
357
|
+
}
|
|
358
|
+
async function Rt() {
|
|
359
|
+
E.value || I.value || (L.value = !0, I.value = !0, Ot(), K.start(), w("open"), await p(), At(), Ft());
|
|
360
|
+
}
|
|
361
|
+
function $(e = !1) {
|
|
362
|
+
I.value && (W && Q(W), I.value = !1, kt(), ot.value?.cancelDrag(), K.dispose(), w("close"), Lt(e));
|
|
363
|
+
}
|
|
364
|
+
function zt() {
|
|
365
|
+
if (!E.value) {
|
|
366
|
+
if (I.value) {
|
|
367
|
+
$();
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
Rt();
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
function Bt(e) {
|
|
374
|
+
return e instanceof Node ? !!(q.contains(e) || D.value?.contains(e) || k.value?.contains(e)) : !1;
|
|
375
|
+
}
|
|
376
|
+
function Vt(e) {
|
|
377
|
+
Bt(e.target) || $();
|
|
378
|
+
}
|
|
379
|
+
function Ht(e) {
|
|
380
|
+
Bt(e.relatedTarget) || T?.handleControlBlur();
|
|
381
|
+
}
|
|
382
|
+
function Ut(e) {
|
|
383
|
+
if (!E.value && !(e.key === "Escape" && (e.defaultPrevented || !q.isTop(e)))) {
|
|
384
|
+
if (e.key === "Escape" && I.value) {
|
|
385
|
+
e.preventDefault(), $(!0);
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
e.currentTarget === O.value && (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), Qe(e, O.value), Rt());
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
function Wt() {
|
|
392
|
+
if (!X() || H === void 0) {
|
|
393
|
+
H = void 0;
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
window.clearTimeout(H), H = void 0;
|
|
397
|
+
}
|
|
398
|
+
function Gt() {
|
|
399
|
+
Wt(), X() && (H = window.setTimeout(() => {
|
|
400
|
+
H = void 0, R.value = null;
|
|
401
|
+
}, Math.max(0, C.copyResetDelay)));
|
|
402
|
+
}
|
|
403
|
+
async function Kt(e, t) {
|
|
404
|
+
try {
|
|
405
|
+
let n, r = !1;
|
|
406
|
+
try {
|
|
407
|
+
r = await ae(t);
|
|
408
|
+
} catch (e) {
|
|
409
|
+
n = e;
|
|
410
|
+
}
|
|
411
|
+
if (!(r || oe(t))) throw n instanceof Error ? n : /* @__PURE__ */ Error("复制功能暂不可用。");
|
|
412
|
+
R.value = e, w("copy", {
|
|
413
|
+
color: J.value,
|
|
414
|
+
format: e,
|
|
415
|
+
value: t
|
|
416
|
+
}), await p(), Gt();
|
|
417
|
+
} catch (e) {
|
|
418
|
+
w("copyError", e instanceof Error ? e : Error(String(e)));
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
return de({
|
|
422
|
+
focus: () => O.value?.focus(),
|
|
423
|
+
blur: () => O.value?.blur(),
|
|
424
|
+
openPanel: () => {
|
|
425
|
+
Rt();
|
|
426
|
+
},
|
|
427
|
+
closePanel: () => $(!0)
|
|
428
|
+
}), (e, t) => (g(), l("div", {
|
|
429
|
+
ref_key: "rootRef",
|
|
430
|
+
ref: D,
|
|
431
|
+
class: m(dt.value),
|
|
432
|
+
style: h(ct.value)
|
|
433
|
+
}, [Le((g(), l("button", {
|
|
434
|
+
id: v(et),
|
|
435
|
+
ref_key: "triggerRef",
|
|
436
|
+
ref: O,
|
|
437
|
+
class: "bing-color-picker__trigger",
|
|
438
|
+
type: "button",
|
|
439
|
+
disabled: v(E),
|
|
440
|
+
"aria-label": _t.value,
|
|
441
|
+
"aria-describedby": v(rt),
|
|
442
|
+
"aria-invalid": v(nt) === "error" || void 0,
|
|
443
|
+
"aria-haspopup": "dialog",
|
|
444
|
+
"aria-expanded": I.value,
|
|
445
|
+
"aria-controls": at,
|
|
446
|
+
onClick: zt,
|
|
447
|
+
onBlur: Ht,
|
|
448
|
+
onKeydown: Ut
|
|
449
|
+
}, [
|
|
450
|
+
u("span", Be, [u("span", {
|
|
451
|
+
class: "bing-color-picker__swatch",
|
|
452
|
+
style: h(mt.value)
|
|
453
|
+
}, null, 4)]),
|
|
454
|
+
u("span", Ve, [u("span", He, Fe(gt.value), 1)]),
|
|
455
|
+
u("span", Ue, [d(ee, {
|
|
456
|
+
icon: v(a),
|
|
457
|
+
size: "sm",
|
|
458
|
+
"stroke-width": 1.75
|
|
459
|
+
}, null, 8, ["icon"])])
|
|
460
|
+
], 40, ze)), [[v(S)]]), v($e) ? (g(), je(Ae, {
|
|
461
|
+
key: 0,
|
|
462
|
+
to: "body"
|
|
463
|
+
}, [L.value ? (g(), l("div", {
|
|
464
|
+
key: 0,
|
|
465
|
+
id: at,
|
|
466
|
+
ref_key: "panelRef",
|
|
467
|
+
ref: k,
|
|
468
|
+
class: m(ft.value),
|
|
469
|
+
style: h(ut.value),
|
|
470
|
+
role: "dialog",
|
|
471
|
+
"aria-label": _t.value,
|
|
472
|
+
onKeydown: Ut,
|
|
473
|
+
onPointerdown: t[1] ||= Re(() => {}, ["stop"]),
|
|
474
|
+
onClick: t[2] ||= Re(() => {}, ["stop"])
|
|
475
|
+
}, [d(te, {
|
|
476
|
+
class: "bing-color-picker__scroll",
|
|
477
|
+
focusable: !1
|
|
478
|
+
}, {
|
|
479
|
+
default: Ie(() => [u("div", Ge, [
|
|
480
|
+
d(Oe, {
|
|
481
|
+
ref_key: "spectrumRef",
|
|
482
|
+
ref: ot,
|
|
483
|
+
"id-prefix": it,
|
|
484
|
+
hue: Y.value.h,
|
|
485
|
+
saturation: Y.value.s,
|
|
486
|
+
value: Y.value.v,
|
|
487
|
+
color: J.value,
|
|
488
|
+
alpha: N.value,
|
|
489
|
+
disabled: v(E),
|
|
490
|
+
onHsvChange: Ct,
|
|
491
|
+
onAlphaChange: wt,
|
|
492
|
+
onCommit: Q
|
|
493
|
+
}, null, 8, [
|
|
494
|
+
"hue",
|
|
495
|
+
"saturation",
|
|
496
|
+
"value",
|
|
497
|
+
"color",
|
|
498
|
+
"alpha",
|
|
499
|
+
"disabled"
|
|
500
|
+
]),
|
|
501
|
+
u("div", Ke, [(g(!0), l(ke, null, Pe(ht.value, (e) => Le((g(), l("button", {
|
|
502
|
+
key: e.value,
|
|
503
|
+
class: m(["bing-color-picker__preset", { "is-selected": e.value === J.value.hex }]),
|
|
504
|
+
type: "button",
|
|
505
|
+
"aria-label": `选择 ${e.label}`,
|
|
506
|
+
"aria-pressed": e.value === J.value.hex,
|
|
507
|
+
title: e.label,
|
|
508
|
+
disabled: v(E),
|
|
509
|
+
onClick: (t) => Dt(e)
|
|
510
|
+
}, [u("span", Je, [u("span", {
|
|
511
|
+
class: "bing-color-picker__preset-color",
|
|
512
|
+
style: h({ backgroundColor: e.value })
|
|
513
|
+
}, null, 4)])], 10, qe)), [[v(S)]])), 128))]),
|
|
514
|
+
d(De, {
|
|
515
|
+
format: P.value,
|
|
516
|
+
"onUpdate:format": t[0] ||= (e) => P.value = e,
|
|
517
|
+
"id-prefix": it,
|
|
518
|
+
color: J.value,
|
|
519
|
+
disabled: v(E),
|
|
520
|
+
copied: R.value === P.value,
|
|
521
|
+
"copy-label": o.copyLabel,
|
|
522
|
+
"copied-label": o.copiedLabel,
|
|
523
|
+
onCommit: Tt,
|
|
524
|
+
onBlur: Et,
|
|
525
|
+
onCopy: Kt
|
|
526
|
+
}, null, 8, [
|
|
527
|
+
"format",
|
|
528
|
+
"color",
|
|
529
|
+
"disabled",
|
|
530
|
+
"copied",
|
|
531
|
+
"copy-label",
|
|
532
|
+
"copied-label"
|
|
533
|
+
])
|
|
534
|
+
])]),
|
|
535
|
+
_: 1
|
|
536
|
+
})], 46, We)) : Me("", !0)])) : Me("", !0)], 6));
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
//#endregion
|
|
540
|
+
export { S as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./BingColorPickerFormatEditor.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/BingColorPicker/BingColorPickerFormatEditor.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-4cffd018"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BingColorPickerFormat } from './BingColorPicker.types';
|
|
2
|
+
import { ColorValue, ParsedColor } from './BingColorPicker.utils';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
idPrefix: string;
|
|
5
|
+
color: ColorValue;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
copied: boolean;
|
|
8
|
+
copyLabel: string;
|
|
9
|
+
copiedLabel: string;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_ModelProps = {
|
|
12
|
+
'format': BingColorPickerFormat;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
15
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
+
blur: () => any;
|
|
17
|
+
copy: (format: BingColorPickerFormat, value: string) => any;
|
|
18
|
+
commit: (parsed: ParsedColor, immediate: boolean) => any;
|
|
19
|
+
"update:format": (value: BingColorPickerFormat) => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
+
onBlur?: (() => any) | undefined;
|
|
22
|
+
onCopy?: ((format: BingColorPickerFormat, value: string) => any) | undefined;
|
|
23
|
+
onCommit?: ((parsed: ParsedColor, immediate: boolean) => any) | undefined;
|
|
24
|
+
"onUpdate:format"?: ((value: BingColorPickerFormat) => any) | undefined;
|
|
25
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|