@witchcraft/ui 0.1.3 → 0.2.1-beta.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 +3 -6
- package/dist/module.json +3 -3
- package/dist/module.mjs +15 -12
- package/dist/runtime/build/generateTheme.js +1 -1
- package/dist/runtime/components/Aria/Aria.vue +5 -9
- package/dist/runtime/components/Aria/Aria.vue.d.ts +5 -0
- package/dist/runtime/components/Icon/Icon.vue +10 -30
- package/dist/runtime/components/Icon/Icon.vue.d.ts +21 -0
- package/dist/runtime/components/LibButton/LibButton.vue +51 -72
- package/dist/runtime/components/LibButton/LibButton.vue.d.ts +36 -0
- package/dist/runtime/components/LibCheckbox/LibCheckbox.vue +43 -74
- package/dist/runtime/components/LibCheckbox/LibCheckbox.vue.d.ts +42 -0
- package/dist/runtime/components/LibColorInput/LibColorInput.vue +63 -107
- package/dist/runtime/components/LibColorInput/LibColorInput.vue.d.ts +63 -0
- package/dist/runtime/components/LibColorPicker/LibColorPicker.vue +272 -352
- package/dist/runtime/components/LibColorPicker/LibColorPicker.vue.d.ts +61 -0
- package/dist/runtime/components/LibColorPicker/utils/safeConvertToHsva.js +1 -1
- package/dist/runtime/components/LibColorPicker/utils/safeConvertToRgba.js +1 -1
- package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue +35 -69
- package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue.d.ts +22 -0
- package/dist/runtime/components/LibDatePicker/LibDatePicker.vue +17 -38
- package/dist/runtime/components/LibDatePicker/LibDatePicker.vue.d.ts +40 -0
- package/dist/runtime/components/LibDatePicker/LibRangeDatePicker.vue +58 -82
- package/dist/runtime/components/LibDatePicker/LibRangeDatePicker.vue.d.ts +34 -0
- package/dist/runtime/components/LibDatePicker/LibSingleDatePicker.vue +55 -67
- package/dist/runtime/components/LibDatePicker/LibSingleDatePicker.vue.d.ts +34 -0
- package/dist/runtime/components/LibDatePicker/LibTimeZonePicker.vue +7 -8
- package/dist/runtime/components/LibDatePicker/LibTimeZonePicker.vue.d.ts +22 -0
- package/dist/runtime/components/LibDebug/LibDebug.vue +43 -70
- package/dist/runtime/components/LibDebug/LibDebug.vue.d.ts +32 -0
- package/dist/runtime/components/LibDevOnly/LibDevOnly.vue +18 -31
- package/dist/runtime/components/LibDevOnly/LibDevOnly.vue.d.ts +22 -0
- package/dist/runtime/components/LibFileInput/LibFileInput.vue +116 -156
- package/dist/runtime/components/LibFileInput/LibFileInput.vue.d.ts +43 -0
- package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +211 -241
- package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.vue.d.ts +165 -0
- package/dist/runtime/components/LibLabel/LibLabel.vue +25 -46
- package/dist/runtime/components/LibLabel/LibLabel.vue.d.ts +26 -0
- package/dist/runtime/components/LibMultiValues/LibMultiValues.vue +43 -58
- package/dist/runtime/components/LibMultiValues/LibMultiValues.vue.d.ts +29 -0
- package/dist/runtime/components/LibNotifications/LibNotification.vue +34 -48
- package/dist/runtime/components/LibNotifications/LibNotification.vue.d.ts +17 -0
- package/dist/runtime/components/LibNotifications/LibNotifications.vue +63 -83
- package/dist/runtime/components/LibNotifications/LibNotifications.vue.d.ts +13 -0
- package/dist/runtime/components/LibPagination/LibPagination.vue +67 -111
- package/dist/runtime/components/LibPagination/LibPagination.vue.d.ts +104 -0
- package/dist/runtime/components/LibPalette/LibPalette.vue +17 -23
- package/dist/runtime/components/LibPalette/LibPalette.vue.d.ts +14 -0
- package/dist/runtime/components/LibPopup/LibPopup.vue +314 -351
- package/dist/runtime/components/LibPopup/LibPopup.vue.d.ts +46 -0
- package/dist/runtime/components/LibProgressBar/LibProgressBar.vue +65 -91
- package/dist/runtime/components/LibProgressBar/LibProgressBar.vue.d.ts +41 -0
- package/dist/runtime/components/LibRecorder/LibRecorder.vue +127 -177
- package/dist/runtime/components/LibRecorder/LibRecorder.vue.d.ts +77 -0
- package/dist/runtime/components/LibRoot/LibRoot.vue +75 -101
- package/dist/runtime/components/LibRoot/LibRoot.vue.d.ts +41 -0
- package/dist/runtime/components/LibSimpleInput/LibSimpleInput.vue +42 -77
- package/dist/runtime/components/LibSimpleInput/LibSimpleInput.vue.d.ts +35 -0
- package/dist/runtime/components/LibSuggestions/LibSuggestions.vue +118 -156
- package/dist/runtime/components/LibSuggestions/LibSuggestions.vue.d.ts +94 -0
- package/dist/runtime/components/LibTable/LibTable.vue +63 -99
- package/dist/runtime/components/LibTable/LibTable.vue.d.ts +45 -0
- package/dist/runtime/components/Template/NAME.vue +15 -36
- package/dist/runtime/components/Template/NAME.vue.d.ts +17 -0
- package/dist/runtime/components/TestControls/TestControls.vue +6 -9
- package/dist/runtime/components/TestControls/TestControls.vue.d.ts +5 -0
- package/dist/runtime/components/shared/props.d.ts +0 -29
- package/dist/runtime/components/shared/props.js +0 -12
- package/dist/runtime/composables/useAccesibilityOutline.js +1 -1
- package/dist/runtime/composables/useDivideAttrs.js +1 -1
- package/dist/runtime/composables/useSuggestions.js +4 -4
- package/dist/runtime/directives/vDetectFlex.js +4 -4
- package/dist/runtime/directives/vExtractRootEl.d.ts +1 -1
- package/dist/runtime/directives/vResizableCols.d.ts +1 -1
- package/dist/runtime/directives/vResizableCols.js +4 -4
- package/dist/runtime/helpers/NotificationHandler.js +6 -6
- package/dist/runtime/helpers/base64ToImg.js +2 -2
- package/dist/runtime/nuxt/plugins/vue-plugin.js +1 -1
- package/dist/runtime/tailwind/themeConvertionOpts.d.ts +1 -1
- package/dist/runtime/theme.d.ts +1 -1
- package/dist/runtime/theme.js +1 -1
- package/dist/runtime/utils/notifyIfError.js +1 -1
- package/dist/runtime/vue/registerComponents.js +1 -1
- package/dist/types.d.mts +2 -6
- package/package.json +68 -90
- package/src/module.ts +19 -12
- package/src/runtime/build/generateTheme.ts +1 -1
- package/src/runtime/components/LibButton/LibButton.stories.ts +1 -1
- package/src/runtime/components/LibButton/LibButton.vue +3 -3
- package/src/runtime/components/LibCheckbox/LibCheckbox.vue +3 -7
- package/src/runtime/components/LibColorPicker/LibColorPicker.vue +6 -4
- package/src/runtime/components/LibColorPicker/utils/safeConvertToHsva.ts +1 -1
- package/src/runtime/components/LibColorPicker/utils/safeConvertToRgba.ts +1 -1
- package/src/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue +8 -15
- package/src/runtime/components/LibDatePicker/LibRangeDatePicker.vue +6 -0
- package/src/runtime/components/LibDatePicker/LibSingleDatePicker.vue +6 -0
- package/src/runtime/components/LibDebug/LibDebug.stories.ts +1 -1
- package/src/runtime/components/LibDebug/LibDebug.vue +2 -0
- package/src/runtime/components/LibFileInput/LibFileInput.vue +4 -0
- package/src/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +7 -5
- package/src/runtime/components/LibLabel/LibLabel.vue +2 -3
- package/src/runtime/components/LibMultiValues/LibMultiValues.vue +5 -3
- package/src/runtime/components/LibNotifications/LibNotification.vue +3 -0
- package/src/runtime/components/LibNotifications/LibNotifications.vue +1 -1
- package/src/runtime/components/LibPalette/LibPalette.vue +3 -3
- package/src/runtime/components/LibPopup/LibPopup.vue +2 -2
- package/src/runtime/components/LibProgressBar/LibProgressBar.vue +2 -2
- package/src/runtime/components/LibRecorder/LibRecorder.vue +3 -3
- package/src/runtime/components/LibRoot/LibRoot.vue +3 -2
- package/src/runtime/components/LibSimpleInput/LibSimpleInput.vue +2 -2
- package/src/runtime/components/LibSuggestions/LibSuggestions.vue +2 -2
- package/src/runtime/components/LibTable/LibTable.vue +1 -1
- package/src/runtime/components/Template/NAME.vue +2 -2
- package/src/runtime/components/shared/props.ts +8 -12
- package/src/runtime/composables/useAccesibilityOutline.ts +1 -1
- package/src/runtime/composables/useDivideAttrs.ts +1 -1
- package/src/runtime/composables/useSuggestions.ts +4 -4
- package/src/runtime/directives/vDetectFlex.ts +4 -4
- package/src/runtime/directives/vExtractRootEl.ts +1 -1
- package/src/runtime/directives/vResizableCols.ts +5 -5
- package/src/runtime/helpers/NotificationHandler.ts +6 -6
- package/src/runtime/nuxt/plugins/vue-plugin.ts +1 -1
- package/src/runtime/tailwind/themeConvertionOpts.ts +1 -1
- package/src/runtime/theme.ts +2 -2
- package/src/runtime/utils/notifyIfError.ts +1 -1
- package/src/runtime/vue/registerComponents.ts +1 -1
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -36
- package/dist/runtime/components/Focus.stories.d.ts +0 -11
- package/dist/runtime/components/Focus.stories.js +0 -53
- package/dist/runtime/components/LibButton/LibButton.stories.d.ts +0 -12
- package/dist/runtime/components/LibButton/LibButton.stories.js +0 -94
- package/dist/runtime/components/LibCheckbox/LibCheckbox.stories.d.ts +0 -14
- package/dist/runtime/components/LibCheckbox/LibCheckbox.stories.js +0 -29
- package/dist/runtime/components/LibColorInput/LibColorInput.stories.d.ts +0 -7
- package/dist/runtime/components/LibColorInput/LibColorInput.stories.js +0 -58
- package/dist/runtime/components/LibColorPicker/LibColorPicker.stories.d.ts +0 -9
- package/dist/runtime/components/LibColorPicker/LibColorPicker.stories.js +0 -68
- package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.stories.d.ts +0 -7
- package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.stories.js +0 -36
- package/dist/runtime/components/LibDatePicker/LibDatePicker.stories.d.ts +0 -11
- package/dist/runtime/components/LibDatePicker/LibDatePicker.stories.js +0 -98
- package/dist/runtime/components/LibDebug/LibDebug.stories.d.ts +0 -9
- package/dist/runtime/components/LibDebug/LibDebug.stories.js +0 -46
- package/dist/runtime/components/LibFileInput/LibFileInput.stories.d.ts +0 -10
- package/dist/runtime/components/LibFileInput/LibFileInput.stories.js +0 -63
- package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.stories.d.ts +0 -33
- package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.stories.js +0 -384
- package/dist/runtime/components/LibLabel/LibLabel.stories.d.ts +0 -6
- package/dist/runtime/components/LibLabel/LibLabel.stories.js +0 -25
- package/dist/runtime/components/LibMultiValues/LibMultiValues.stories.d.ts +0 -23
- package/dist/runtime/components/LibMultiValues/LibMultiValues.stories.js +0 -61
- package/dist/runtime/components/LibNotifications/LibNotification.stories.d.ts +0 -15
- package/dist/runtime/components/LibNotifications/LibNotification.stories.js +0 -126
- package/dist/runtime/components/LibNotifications/LibNotifications.stories.d.ts +0 -6
- package/dist/runtime/components/LibNotifications/LibNotifications.stories.js +0 -109
- package/dist/runtime/components/LibPagination/LibPagination.stories.d.ts +0 -6
- package/dist/runtime/components/LibPagination/LibPagination.stories.js +0 -40
- package/dist/runtime/components/LibPalette/LibPalette.stories.d.ts +0 -6
- package/dist/runtime/components/LibPalette/LibPalette.stories.js +0 -20
- package/dist/runtime/components/LibPopup/LibPopup.stories.d.ts +0 -14
- package/dist/runtime/components/LibPopup/LibPopup.stories.js +0 -147
- package/dist/runtime/components/LibProgressBar/LibProgressBar.stories.d.ts +0 -10
- package/dist/runtime/components/LibProgressBar/LibProgressBar.stories.js +0 -81
- package/dist/runtime/components/LibRecorder/LibRecorder.stories.d.ts +0 -19
- package/dist/runtime/components/LibRecorder/LibRecorder.stories.js +0 -63
- package/dist/runtime/components/LibSimpleInput/LibSimpleInput.stories.d.ts +0 -26
- package/dist/runtime/components/LibSimpleInput/LibSimpleInput.stories.js +0 -78
- package/dist/runtime/components/LibSuggestions/LibSuggestions.stories.d.ts +0 -27
- package/dist/runtime/components/LibSuggestions/LibSuggestions.stories.js +0 -112
- package/dist/runtime/components/LibTable/LibTable.stories.d.ts +0 -16
- package/dist/runtime/components/LibTable/LibTable.stories.js +0 -156
- package/dist/runtime/components/Reset.stories.d.ts +0 -5
- package/dist/runtime/components/Reset.stories.js +0 -19
- package/dist/runtime/components/Scrolling.stories.d.ts +0 -6
- package/dist/runtime/components/Scrolling.stories.js +0 -44
- package/dist/runtime/composables/useScrollNearContainerEdges.stories.d.ts +0 -7
- package/dist/runtime/composables/useScrollNearContainerEdges.stories.js +0 -85
- package/dist/types.d.ts +0 -7
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
<lib-popup
|
|
3
3
|
class="color-input--popup"
|
|
4
4
|
v-model="showPopup"
|
|
5
|
-
@close="$tempValue =
|
|
5
|
+
@close="$tempValue = void 0;
|
|
6
|
+
emit('cancel')"
|
|
6
7
|
>
|
|
7
|
-
<template #button="{extractEl}">
|
|
8
|
+
<template #button="{ extractEl }">
|
|
8
9
|
<!-- <div -->
|
|
9
10
|
<!-- class=" -->
|
|
10
11
|
<!-- flex -->
|
|
@@ -17,7 +18,8 @@
|
|
|
17
18
|
<!-- -->
|
|
18
19
|
<lib-button
|
|
19
20
|
:id="id ?? fallbackId"
|
|
20
|
-
:class="twMerge(
|
|
21
|
+
:class="twMerge(
|
|
22
|
+
`
|
|
21
23
|
p-0
|
|
22
24
|
color-input--button
|
|
23
25
|
flex flex-nowrap
|
|
@@ -27,11 +29,11 @@
|
|
|
27
29
|
[&_.button--label]:gap-0
|
|
28
30
|
after:hidden
|
|
29
31
|
`,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
$attrs.class
|
|
33
|
+
)"
|
|
32
34
|
:aria-label="t('color-input.aria-and-title-prefix') + stringColor"
|
|
33
35
|
:title="t('color-input.aria-and-title-prefix') + stringColor"
|
|
34
|
-
v-bind="{...$attrs, class:
|
|
36
|
+
v-bind="{ ...$attrs, class: void 0 }"
|
|
35
37
|
v-extract-root-el="extractEl"
|
|
36
38
|
@click="togglePopup"
|
|
37
39
|
>
|
|
@@ -42,14 +44,14 @@
|
|
|
42
44
|
w-full
|
|
43
45
|
"
|
|
44
46
|
>
|
|
45
|
-
<slot v-bind="{stringColor, classes:swatchClasses}">
|
|
47
|
+
<slot v-bind="{ stringColor, classes: swatchClasses }">
|
|
46
48
|
<div :class="swatchClasses"
|
|
47
49
|
:style="`background:${stringColor}`"
|
|
48
50
|
/>
|
|
49
51
|
</slot>
|
|
50
52
|
<slot
|
|
51
53
|
v-if="$tempValue"
|
|
52
|
-
v-bind="{tempStringColor, classes:swatchClasses}"
|
|
54
|
+
v-bind="{ tempStringColor, classes: swatchClasses }"
|
|
53
55
|
name="temp"
|
|
54
56
|
>
|
|
55
57
|
<div :class="swatchClasses"
|
|
@@ -60,7 +62,7 @@
|
|
|
60
62
|
</template>
|
|
61
63
|
</lib-button>
|
|
62
64
|
</template>
|
|
63
|
-
<template #popup="{extractEl}">
|
|
65
|
+
<template #popup="{ extractEl }">
|
|
64
66
|
<div class="color-input--popup-wrapper p-5" v-extract-root-el="extractEl">
|
|
65
67
|
<lib-color-picker v-if="showPopup"
|
|
66
68
|
:id="id ?? fallbackId"
|
|
@@ -77,24 +79,19 @@
|
|
|
77
79
|
</lib-popup>
|
|
78
80
|
</template>
|
|
79
81
|
|
|
80
|
-
<script setup
|
|
81
|
-
import Color from "colorjs.io"
|
|
82
|
-
import {
|
|
83
|
-
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import
|
|
87
|
-
import
|
|
88
|
-
import
|
|
89
|
-
import
|
|
90
|
-
import LibPopup from "../LibPopup/LibPopup.vue"
|
|
91
|
-
import { getFallbackId, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js"
|
|
92
|
-
|
|
93
|
-
|
|
82
|
+
<script setup>
|
|
83
|
+
import Color from "colorjs.io";
|
|
84
|
+
import { computed, ref, useAttrs } from "vue";
|
|
85
|
+
import { useInjectedI18n } from "../../composables/useInjectedI18n.js";
|
|
86
|
+
import { vExtractRootEl } from "../../directives/vExtractRootEl.js";
|
|
87
|
+
import { twMerge } from "../../utils/twMerge.js";
|
|
88
|
+
import LibButton from "../LibButton/LibButton.vue";
|
|
89
|
+
import LibColorPicker from "../LibColorPicker/LibColorPicker.vue";
|
|
90
|
+
import LibPopup from "../LibPopup/LibPopup.vue";
|
|
91
|
+
import { getFallbackId } from "../shared/props.js";
|
|
94
92
|
defineOptions({
|
|
95
|
-
|
|
96
|
-
})
|
|
97
|
-
|
|
93
|
+
name: "lib-color-input"
|
|
94
|
+
});
|
|
98
95
|
const swatchClasses = `
|
|
99
96
|
color-input--swatch
|
|
100
97
|
after:content-vertical-holder
|
|
@@ -106,94 +103,53 @@ const swatchClasses = `
|
|
|
106
103
|
before:inset-0
|
|
107
104
|
before:bg-transparency-squares
|
|
108
105
|
before:z-[-1]
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
})
|
|
121
|
-
const emit = defineEmits
|
|
122
|
-
(e: "save"): void
|
|
123
|
-
(e: "cancel"): void
|
|
124
|
-
}>()
|
|
125
|
-
|
|
126
|
-
|
|
106
|
+
`;
|
|
107
|
+
const fallbackId = getFallbackId();
|
|
108
|
+
const t = useInjectedI18n();
|
|
109
|
+
const props = defineProps({
|
|
110
|
+
label: { type: String, required: false },
|
|
111
|
+
id: { type: String, required: false },
|
|
112
|
+
allowAlpha: { type: Boolean, required: false, default: true },
|
|
113
|
+
border: { type: Boolean, required: false, default: true },
|
|
114
|
+
copyTransform: { type: Function, required: false, default: (_val, stringVal) => stringVal },
|
|
115
|
+
stringPrecision: { type: Number, required: false, default: 3 },
|
|
116
|
+
customRepresentation: { type: Object, required: false, default: void 0 }
|
|
117
|
+
});
|
|
118
|
+
const emit = defineEmits(["save", "cancel"]);
|
|
127
119
|
function save() {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
120
|
+
$value.value = internalTempValue.value;
|
|
121
|
+
showPopup.value = false;
|
|
122
|
+
$tempValue.value = void 0;
|
|
123
|
+
emit("save");
|
|
132
124
|
}
|
|
133
125
|
function cancel() {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
126
|
+
showPopup.value = false;
|
|
127
|
+
$tempValue.value = void 0;
|
|
128
|
+
emit("cancel");
|
|
137
129
|
}
|
|
138
|
-
|
|
139
|
-
const $
|
|
140
|
-
|
|
141
|
-
const $value = defineModel<RgbaColor>({ required: false, default: () => ({ r: 0, g: 0, b: 0 }) })
|
|
142
|
-
const $tempValue = defineModel<RgbaColor | undefined>("tempValue", { required: false, default: () => (undefined) })
|
|
143
|
-
|
|
130
|
+
const $attrs = useAttrs();
|
|
131
|
+
const $value = defineModel({ type: Object, ...{ required: false, default: () => ({ r: 0, g: 0, b: 0 }) } });
|
|
132
|
+
const $tempValue = defineModel("tempValue", { type: null, ...{ required: false, default: () => void 0 } });
|
|
144
133
|
const stringColor = computed(() => new Color("srgb", [
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
], $value.value.a ?? 1
|
|
149
|
-
|
|
134
|
+
$value.value.r / 255,
|
|
135
|
+
$value.value.g / 255,
|
|
136
|
+
$value.value.b / 255
|
|
137
|
+
], $value.value.a ?? 1).toString());
|
|
150
138
|
const tempStringColor = computed(() => $tempValue.value ? new Color("srgb", [
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
], $tempValue.value.a ?? 1
|
|
155
|
-
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
$value.value = internalTempValue.value
|
|
164
|
-
}
|
|
165
|
-
showPopup.value = !showPopup.value
|
|
166
|
-
}
|
|
167
|
-
|
|
139
|
+
$tempValue.value.r / 255,
|
|
140
|
+
$tempValue.value.g / 255,
|
|
141
|
+
$tempValue.value.b / 255
|
|
142
|
+
], $tempValue.value.a ?? 1).toString() : "");
|
|
143
|
+
const internalTempValue = ref({ ...$value.value });
|
|
144
|
+
const showPopup = ref(false);
|
|
145
|
+
const togglePopup = () => {
|
|
146
|
+
if (showPopup.value) {
|
|
147
|
+
$value.value = internalTempValue.value;
|
|
148
|
+
}
|
|
149
|
+
showPopup.value = !showPopup.value;
|
|
150
|
+
};
|
|
168
151
|
</script>
|
|
169
152
|
|
|
170
|
-
<script
|
|
153
|
+
<script>
|
|
171
154
|
|
|
172
|
-
type RealProps =
|
|
173
|
-
& LabelProps
|
|
174
|
-
& LinkableByIdProps
|
|
175
|
-
& {
|
|
176
|
-
allowAlpha?: boolean
|
|
177
|
-
border?: boolean
|
|
178
|
-
/** See ColorPicker.copyTransform */
|
|
179
|
-
copyTransform?: (val: HsvaColor, stringVal: string) => any
|
|
180
|
-
/** See ColorPicker.allowAlpha */
|
|
181
|
-
stringPrecision?: number
|
|
182
|
-
/** See ColorPicker.customRepresentation */
|
|
183
|
-
customRepresentation?: {
|
|
184
|
-
fromHsvaToString: (hsva: HsvaColor, includeAlpha: boolean) => string
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
interface Props
|
|
188
|
-
extends
|
|
189
|
-
/** @vue-ignore */
|
|
190
|
-
Partial<Omit<ButtonHTMLAttributes,"class">
|
|
191
|
-
& TailwindClassProp
|
|
192
|
-
& {
|
|
193
|
-
// why is this not already a part of button?
|
|
194
|
-
"aria-label": string
|
|
195
|
-
}>,
|
|
196
|
-
RealProps
|
|
197
|
-
{}
|
|
198
155
|
</script>
|
|
199
|
-
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes } from "vue";
|
|
2
|
+
import type { HsvaColor, RgbaColor } from "../../types/index.js.js";
|
|
3
|
+
import { type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js.js";
|
|
4
|
+
type RealProps = LabelProps & LinkableByIdProps & {
|
|
5
|
+
allowAlpha?: boolean;
|
|
6
|
+
border?: boolean;
|
|
7
|
+
/** See ColorPicker.copyTransform */
|
|
8
|
+
copyTransform?: (val: HsvaColor, stringVal: string) => any;
|
|
9
|
+
/** See ColorPicker.allowAlpha */
|
|
10
|
+
stringPrecision?: number;
|
|
11
|
+
/** See ColorPicker.customRepresentation */
|
|
12
|
+
customRepresentation?: {
|
|
13
|
+
fromHsvaToString: (hsva: HsvaColor, includeAlpha: boolean) => string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
interface Props extends
|
|
17
|
+
/** @vue-ignore */
|
|
18
|
+
Partial<Omit<ButtonHTMLAttributes, "class"> & TailwindClassProp & {
|
|
19
|
+
"aria-label": string;
|
|
20
|
+
}>, RealProps {
|
|
21
|
+
}
|
|
22
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props & {
|
|
23
|
+
modelValue?: RgbaColor;
|
|
24
|
+
tempValue?: RgbaColor | undefined;
|
|
25
|
+
}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
"update:modelValue": (value: RgbaColor) => any;
|
|
27
|
+
"update:tempValue": (value: RgbaColor | undefined) => any;
|
|
28
|
+
} & {
|
|
29
|
+
cancel: () => any;
|
|
30
|
+
save: () => any;
|
|
31
|
+
}, string, import("vue").PublicProps, Readonly<Props & {
|
|
32
|
+
modelValue?: RgbaColor;
|
|
33
|
+
tempValue?: RgbaColor | undefined;
|
|
34
|
+
}> & Readonly<{
|
|
35
|
+
"onUpdate:modelValue"?: ((value: RgbaColor) => any) | undefined;
|
|
36
|
+
onCancel?: (() => any) | undefined;
|
|
37
|
+
onSave?: (() => any) | undefined;
|
|
38
|
+
"onUpdate:tempValue"?: ((value: RgbaColor | undefined) => any) | undefined;
|
|
39
|
+
}>, {
|
|
40
|
+
border: boolean;
|
|
41
|
+
allowAlpha: boolean;
|
|
42
|
+
stringPrecision: number;
|
|
43
|
+
customRepresentation: {
|
|
44
|
+
fromHsvaToString: (hsva: HsvaColor, includeAlpha: boolean) => string;
|
|
45
|
+
};
|
|
46
|
+
copyTransform: (val: HsvaColor, stringVal: string) => any;
|
|
47
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
48
|
+
default?: (props: {
|
|
49
|
+
stringColor: any;
|
|
50
|
+
classes: any;
|
|
51
|
+
}) => any;
|
|
52
|
+
} & {
|
|
53
|
+
temp?: (props: {
|
|
54
|
+
tempStringColor: any;
|
|
55
|
+
classes: any;
|
|
56
|
+
}) => any;
|
|
57
|
+
}>;
|
|
58
|
+
export default _default;
|
|
59
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
60
|
+
new (): {
|
|
61
|
+
$slots: S;
|
|
62
|
+
};
|
|
63
|
+
};
|