@witchcraft/ui 0.2.1-beta.3 → 0.2.2
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/dist/module.json +1 -1
- package/dist/module.mjs +20 -4
- package/dist/runtime/build/WitchcraftUiResolver.d.ts +2 -2
- package/dist/runtime/build/generateTheme.js +2 -2
- package/dist/runtime/components/Aria/Aria.d.vue.ts +5 -0
- package/dist/runtime/components/Aria/Aria.vue +4 -2
- package/dist/runtime/components/Aria/Aria.vue.d.ts +1 -1
- package/dist/runtime/components/Icon/Icon.d.vue.ts +21 -0
- package/dist/runtime/components/Icon/Icon.vue +3 -3
- package/dist/runtime/components/Icon/Icon.vue.d.ts +1 -1
- package/dist/runtime/components/LibButton/LibButton.d.vue.ts +36 -0
- package/dist/runtime/components/LibButton/LibButton.vue +9 -4
- package/dist/runtime/components/LibButton/LibButton.vue.d.ts +1 -1
- package/dist/runtime/components/LibCheckbox/LibCheckbox.d.vue.ts +42 -0
- package/dist/runtime/components/LibCheckbox/LibCheckbox.vue +3 -4
- package/dist/runtime/components/LibCheckbox/LibCheckbox.vue.d.ts +1 -1
- package/dist/runtime/components/LibColorInput/LibColorInput.d.vue.ts +63 -0
- package/dist/runtime/components/LibColorInput/LibColorInput.vue +15 -8
- package/dist/runtime/components/LibColorInput/LibColorInput.vue.d.ts +1 -1
- package/dist/runtime/components/LibColorPicker/LibColorPicker.d.vue.ts +61 -0
- package/dist/runtime/components/LibColorPicker/LibColorPicker.vue +10 -6
- package/dist/runtime/components/LibColorPicker/LibColorPicker.vue.d.ts +1 -1
- package/dist/runtime/components/LibColorPicker/utils/truncate.js +1 -1
- package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.d.vue.ts +22 -0
- package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue +5 -2
- package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue.d.ts +1 -1
- package/dist/runtime/components/LibDatePicker/LibDatePicker.d.vue.ts +40 -0
- package/dist/runtime/components/LibDatePicker/LibDatePicker.vue.d.ts +1 -1
- package/dist/runtime/components/LibDatePicker/LibRangeDatePicker.d.vue.ts +34 -0
- package/dist/runtime/components/LibDatePicker/LibRangeDatePicker.vue +8 -6
- package/dist/runtime/components/LibDatePicker/LibRangeDatePicker.vue.d.ts +1 -1
- package/dist/runtime/components/LibDatePicker/LibSingleDatePicker.d.vue.ts +34 -0
- package/dist/runtime/components/LibDatePicker/LibSingleDatePicker.vue +7 -5
- package/dist/runtime/components/LibDatePicker/LibSingleDatePicker.vue.d.ts +1 -1
- package/dist/runtime/components/LibDatePicker/LibTimeZonePicker.d.vue.ts +22 -0
- package/dist/runtime/components/LibDatePicker/LibTimeZonePicker.vue.d.ts +1 -1
- package/dist/runtime/components/LibDebug/LibDebug.d.vue.ts +32 -0
- package/dist/runtime/components/LibDebug/LibDebug.vue +9 -4
- package/dist/runtime/components/LibDebug/LibDebug.vue.d.ts +1 -1
- package/dist/runtime/components/LibDevOnly/LibDevOnly.d.vue.ts +25 -0
- package/dist/runtime/components/LibDevOnly/LibDevOnly.vue +2 -1
- package/dist/runtime/components/LibDevOnly/LibDevOnly.vue.d.ts +4 -1
- package/dist/runtime/components/LibFileInput/LibFileInput.d.vue.ts +43 -0
- package/dist/runtime/components/LibFileInput/LibFileInput.vue +29 -13
- package/dist/runtime/components/LibFileInput/LibFileInput.vue.d.ts +2 -2
- package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.d.vue.ts +165 -0
- package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +42 -12
- package/dist/runtime/components/LibLabel/LibLabel.d.vue.ts +26 -0
- package/dist/runtime/components/LibLabel/LibLabel.vue +2 -2
- package/dist/runtime/components/LibLabel/LibLabel.vue.d.ts +3 -3
- package/dist/runtime/components/LibMultiValues/LibMultiValues.d.vue.ts +29 -0
- package/dist/runtime/components/LibMultiValues/LibMultiValues.vue +1 -2
- package/dist/runtime/components/LibMultiValues/LibMultiValues.vue.d.ts +2 -2
- package/dist/runtime/components/LibNotifications/LibNotification.d.vue.ts +17 -0
- package/dist/runtime/components/LibNotifications/LibNotification.vue +19 -8
- package/dist/runtime/components/LibNotifications/LibNotifications.d.vue.ts +13 -0
- package/dist/runtime/components/LibNotifications/LibNotifications.vue +10 -6
- package/dist/runtime/components/LibNotifications/LibNotifications.vue.d.ts +2 -2
- package/dist/runtime/components/LibPagination/LibPagination.d.vue.ts +104 -0
- package/dist/runtime/components/LibPagination/LibPagination.vue +25 -12
- package/dist/runtime/components/LibPagination/LibPagination.vue.d.ts +2 -2
- package/dist/runtime/components/LibPalette/LibPalette.d.vue.ts +14 -0
- package/dist/runtime/components/LibPalette/LibPalette.vue +6 -5
- package/dist/runtime/components/LibPalette/LibPalette.vue.d.ts +5 -5
- package/dist/runtime/components/LibPopup/LibPopup.d.vue.ts +46 -0
- package/dist/runtime/components/LibPopup/LibPopup.vue +6 -4
- package/dist/runtime/components/LibPopup/LibPopup.vue.d.ts +3 -3
- package/dist/runtime/components/LibProgressBar/LibProgressBar.d.vue.ts +41 -0
- package/dist/runtime/components/LibProgressBar/LibProgressBar.vue +5 -3
- package/dist/runtime/components/LibProgressBar/LibProgressBar.vue.d.ts +9 -9
- package/dist/runtime/components/LibRecorder/LibRecorder.d.vue.ts +77 -0
- package/dist/runtime/components/LibRecorder/LibRecorder.vue +1 -1
- package/dist/runtime/components/LibRecorder/LibRecorder.vue.d.ts +2 -2
- package/dist/runtime/components/LibRoot/LibRoot.d.vue.ts +41 -0
- package/dist/runtime/components/LibRoot/LibRoot.vue +11 -6
- package/dist/runtime/components/LibRoot/LibRoot.vue.d.ts +1 -1
- package/dist/runtime/components/LibSimpleInput/LibSimpleInput.d.vue.ts +35 -0
- package/dist/runtime/components/LibSimpleInput/LibSimpleInput.vue +1 -1
- package/dist/runtime/components/LibSimpleInput/LibSimpleInput.vue.d.ts +1 -1
- package/dist/runtime/components/LibSuggestions/LibSuggestions.d.vue.ts +94 -0
- package/dist/runtime/components/LibSuggestions/LibSuggestions.vue +6 -4
- package/dist/runtime/components/LibSuggestions/LibSuggestions.vue.d.ts +1 -1
- package/dist/runtime/components/LibTable/LibTable.d.vue.ts +45 -0
- package/dist/runtime/components/LibTable/LibTable.vue +23 -8
- package/dist/runtime/components/LibTable/LibTable.vue.d.ts +1 -1
- package/dist/runtime/components/Template/NAME.d.vue.ts +17 -0
- package/dist/runtime/components/Template/NAME.vue +2 -3
- package/dist/runtime/components/Template/NAME.vue.d.ts +1 -1
- package/dist/runtime/components/TestControls/TestControls.d.vue.ts +5 -0
- package/dist/runtime/components/TestControls/TestControls.vue +4 -2
- package/dist/runtime/components/TestControls/TestControls.vue.d.ts +1 -1
- package/dist/runtime/composables/useDragWithThreshold.d.ts +1 -1
- package/dist/runtime/composables/useInjectedI18n.d.ts +1 -1
- package/dist/runtime/composables/useScrollNearContainerEdges.d.ts +1 -1
- package/dist/runtime/composables/useSetupI18n.d.ts +1 -1
- package/dist/runtime/composables/useSuggestions.d.ts +2 -2
- package/dist/runtime/helpers/NotificationHandler.d.ts +1 -1
- package/dist/runtime/helpers/base64ToImg.js +2 -2
- package/dist/runtime/tailwind/themeConvertionOpts.d.ts +1 -1
- package/dist/runtime/types/index.d.ts +1 -1
- package/dist/runtime/utils/notifyIfError.d.ts +1 -1
- package/package.json +9 -10
- package/src/module.ts +41 -33
- package/src/runtime/build/WitchcraftUiResolver.ts +3 -3
- package/src/runtime/build/generateTheme.ts +3 -2
- package/src/runtime/build/unpluginIconViteOptions.ts +1 -1
- package/src/runtime/components/Aria/Aria.vue +5 -6
- package/src/runtime/components/Focus.stories.ts +11 -12
- package/src/runtime/components/Icon/Icon.vue +5 -9
- package/src/runtime/components/LibButton/LibButton.stories.ts +21 -22
- package/src/runtime/components/LibButton/LibButton.vue +23 -21
- package/src/runtime/components/LibCheckbox/LibCheckbox.stories.ts +6 -10
- package/src/runtime/components/LibCheckbox/LibCheckbox.vue +17 -19
- package/src/runtime/components/LibColorInput/LibColorInput.stories.ts +8 -13
- package/src/runtime/components/LibColorInput/LibColorInput.vue +49 -45
- package/src/runtime/components/LibColorPicker/LibColorPicker.stories.ts +14 -18
- package/src/runtime/components/LibColorPicker/LibColorPicker.vue +50 -52
- package/src/runtime/components/LibColorPicker/utils/safeConvertToHsva.ts +1 -2
- package/src/runtime/components/LibColorPicker/utils/safeConvertToRgba.ts +1 -2
- package/src/runtime/components/LibColorPicker/utils/truncate.ts +1 -2
- package/src/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.stories.ts +5 -8
- package/src/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue +11 -9
- package/src/runtime/components/LibDatePicker/LibDatePicker.stories.ts +14 -15
- package/src/runtime/components/LibDatePicker/LibDatePicker.vue +1 -2
- package/src/runtime/components/LibDatePicker/LibRangeDatePicker.vue +13 -13
- package/src/runtime/components/LibDatePicker/LibSingleDatePicker.vue +9 -8
- package/src/runtime/components/LibDatePicker/LibTimeZonePicker.vue +2 -1
- package/src/runtime/components/LibDatePicker/helpers.ts +0 -2
- package/src/runtime/components/LibDebug/LibDebug.stories.ts +11 -15
- package/src/runtime/components/LibDebug/LibDebug.vue +14 -11
- package/src/runtime/components/LibDevOnly/LibDevOnly.vue +8 -4
- package/src/runtime/components/LibFileInput/LibFileInput.stories.ts +12 -15
- package/src/runtime/components/LibFileInput/LibFileInput.vue +65 -47
- package/src/runtime/components/LibInputDeprecated/LibInputDeprecated.stories.ts +77 -84
- package/src/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +73 -48
- package/src/runtime/components/LibLabel/LibLabel.stories.ts +4 -8
- package/src/runtime/components/LibLabel/LibLabel.vue +8 -8
- package/src/runtime/components/LibMultiValues/LibMultiValues.stories.ts +10 -15
- package/src/runtime/components/LibMultiValues/LibMultiValues.vue +14 -18
- package/src/runtime/components/LibNotifications/LibNotification.stories.ts +30 -34
- package/src/runtime/components/LibNotifications/LibNotification.vue +27 -17
- package/src/runtime/components/LibNotifications/LibNotifications.stories.ts +11 -15
- package/src/runtime/components/LibNotifications/LibNotifications.vue +21 -16
- package/src/runtime/components/LibPagination/LibPagination.stories.ts +5 -9
- package/src/runtime/components/LibPagination/LibPagination.vue +46 -32
- package/src/runtime/components/LibPalette/LibPalette.stories.ts +3 -7
- package/src/runtime/components/LibPalette/LibPalette.vue +13 -12
- package/src/runtime/components/LibPopup/LibPopup.stories.ts +19 -23
- package/src/runtime/components/LibPopup/LibPopup.vue +31 -35
- package/src/runtime/components/LibProgressBar/LibProgressBar.stories.ts +13 -17
- package/src/runtime/components/LibProgressBar/LibProgressBar.vue +36 -33
- package/src/runtime/components/LibRecorder/LibRecorder.stories.ts +11 -12
- package/src/runtime/components/LibRecorder/LibRecorder.vue +34 -34
- package/src/runtime/components/LibRoot/LibRoot.vue +16 -12
- package/src/runtime/components/LibSimpleInput/LibSimpleInput.stories.ts +20 -24
- package/src/runtime/components/LibSimpleInput/LibSimpleInput.vue +17 -21
- package/src/runtime/components/LibSuggestions/LibSuggestions.stories.ts +16 -19
- package/src/runtime/components/LibSuggestions/LibSuggestions.vue +28 -30
- package/src/runtime/components/LibTable/LibTable.stories.ts +30 -33
- package/src/runtime/components/LibTable/LibTable.vue +38 -24
- package/src/runtime/components/Reset.stories.ts +3 -6
- package/src/runtime/components/Scrolling.stories.ts +5 -8
- package/src/runtime/components/Template/NAME.vue +11 -11
- package/src/runtime/components/Template/TemplateStory.ts +9 -10
- package/src/runtime/components/TestControls/TestControls.vue +5 -5
- package/src/runtime/components/shared/props.ts +4 -6
- package/src/runtime/components/shared/storyHelpers/playInput.ts +2 -3
- package/src/runtime/components/shared/storyHelpers/playSuggestions.ts +5 -9
- package/src/runtime/composables/useAccesibilityOutline.ts +1 -1
- package/src/runtime/composables/useAriaLabel.ts +1 -1
- package/src/runtime/composables/useDarkMode.ts +15 -19
- package/src/runtime/composables/useDragWithThreshold.ts +6 -8
- package/src/runtime/composables/useGlobalResizeObserver.ts +0 -1
- package/src/runtime/composables/useInjectedDarkMode.ts +2 -2
- package/src/runtime/composables/useInjectedI18n.ts +1 -1
- package/src/runtime/composables/useInjectedLocale.ts +3 -4
- package/src/runtime/composables/useScrollNearContainerEdges.stories.ts +4 -4
- package/src/runtime/composables/useScrollNearContainerEdges.ts +12 -13
- package/src/runtime/composables/useSetupI18n.ts +4 -7
- package/src/runtime/composables/useSetupLocale.ts +3 -5
- package/src/runtime/composables/useSuggestions.ts +25 -30
- package/src/runtime/directives/vDetectFlex.ts +5 -8
- package/src/runtime/directives/vExtractRootEl.ts +1 -1
- package/src/runtime/directives/vResizableCols.ts +3 -7
- package/src/runtime/directives/vResizeObserver.ts +1 -2
- package/src/runtime/globalResizeObserver.ts +0 -1
- package/src/runtime/helpers/NotificationHandler.ts +8 -12
- package/src/runtime/helpers/base64ToImg.ts +2 -3
- package/src/runtime/helpers/createNoonUtcDate.ts +0 -1
- package/src/runtime/helpers/defaultTranslationFunction.ts +0 -1
- package/src/runtime/helpers/getTimeZoneList.ts +0 -1
- package/src/runtime/helpers/readFile.ts +2 -2
- package/src/runtime/helpers/resizeObserverWrapper.ts +0 -1
- package/src/runtime/helpers/storybook.ts +2 -3
- package/src/runtime/main.lib.ts +0 -2
- package/src/runtime/nuxt/plugins/vue-plugin.ts +4 -5
- package/src/runtime/tailwind/themeConvertionOpts.ts +3 -4
- package/src/runtime/theme.ts +0 -1
- package/src/runtime/types/index.ts +3 -4
- package/src/runtime/utils/notifyIfError.ts +2 -2
- package/src/runtime/utils/twMerge.ts +2 -2
- package/src/runtime/vue/VueComponentsPlugin.ts +1 -2
- package/src/runtime/vue/registerComponents.ts +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
:id="id"
|
|
3
4
|
tabindex="-1"
|
|
4
5
|
:class="twMerge(
|
|
5
6
|
showOutline ? 'group outlined outlined-visible' : '[&_*]:outline-hidden',
|
|
@@ -33,9 +34,14 @@
|
|
|
33
34
|
$attrs.attrs?.class
|
|
34
35
|
)"
|
|
35
36
|
>
|
|
36
|
-
<TestControls
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
<TestControls
|
|
38
|
+
v-if="testWrapperMode"
|
|
39
|
+
:show-outline="showOutline"
|
|
40
|
+
/>
|
|
41
|
+
<Notifications
|
|
42
|
+
v-if="useNotifications && isClientSide"
|
|
43
|
+
data-allow-mismatch
|
|
44
|
+
/>
|
|
39
45
|
<slot/>
|
|
40
46
|
</div>
|
|
41
47
|
</div>
|
|
@@ -43,7 +49,6 @@
|
|
|
43
49
|
|
|
44
50
|
<script setup>
|
|
45
51
|
import { unreachable } from "@alanscodelog/utils/unreachable";
|
|
46
|
-
import {} from "metamorphosis";
|
|
47
52
|
import { computed, onBeforeUnmount, onMounted, ref, toRaw } from "vue";
|
|
48
53
|
import { useAccesibilityOutline } from "../../composables/useAccesibilityOutline.js";
|
|
49
54
|
import { useDivideAttrs } from "../../composables/useDivideAttrs.js";
|
|
@@ -58,7 +63,7 @@ import { twMerge } from "../../utils/twMerge.js";
|
|
|
58
63
|
import Notifications from "../LibNotifications/LibNotifications.vue";
|
|
59
64
|
import TestControls from "../TestControls/TestControls.vue";
|
|
60
65
|
const $attrs = useDivideAttrs(["wrapper"]);
|
|
61
|
-
defineOptions({ name: "
|
|
66
|
+
defineOptions({ name: "Root", inheritAttrs: false, suspensible: false });
|
|
62
67
|
const props = defineProps({
|
|
63
68
|
theme: { type: Object, required: false, default: void 0 },
|
|
64
69
|
outline: { type: Boolean, required: false, default: true },
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type InputHTMLAttributes } from "vue";
|
|
2
|
+
import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js.js";
|
|
3
|
+
type RealProps = LinkableByIdProps & LabelProps & BaseInteractiveProps & {
|
|
4
|
+
placeholder?: InputHTMLAttributes["placeholder"];
|
|
5
|
+
disabled?: InputHTMLAttributes["disabled"];
|
|
6
|
+
id?: InputHTMLAttributes["id"];
|
|
7
|
+
type?: InputHTMLAttributes["type"];
|
|
8
|
+
valid?: boolean;
|
|
9
|
+
};
|
|
10
|
+
interface Props extends
|
|
11
|
+
/** @vue-ignore */
|
|
12
|
+
Partial<Omit<InputHTMLAttributes, "class" | "readonly" | "disabled" | "onSubmit" | "onInput"> & TailwindClassProp>, RealProps {
|
|
13
|
+
}
|
|
14
|
+
declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
15
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
16
|
+
readonly onInput?: ((val: InputEvent) => any) | undefined;
|
|
17
|
+
readonly onSubmit?: ((val: T) => any) | undefined;
|
|
18
|
+
readonly "onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
19
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onInput" | "onSubmit" | "onUpdate:modelValue"> & (Props & {
|
|
20
|
+
modelValue: T;
|
|
21
|
+
}) & {}> & import("vue").PublicProps;
|
|
22
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
23
|
+
attrs: any;
|
|
24
|
+
slots: {};
|
|
25
|
+
emit: {
|
|
26
|
+
(e: "submit", val: T): void;
|
|
27
|
+
(e: "input", val: InputEvent): void;
|
|
28
|
+
} & ((evt: "update:modelValue", value: T) => void);
|
|
29
|
+
}>) => import("vue").VNode & {
|
|
30
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
31
|
+
};
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_PrettifyLocal<T> = {
|
|
34
|
+
[K in keyof T as K]: T[K];
|
|
35
|
+
} & {};
|
|
@@ -78,7 +78,7 @@ import { hasModifiers } from "../../helpers/hasModifiers.js";
|
|
|
78
78
|
import { twMerge } from "../../utils/twMerge.js";
|
|
79
79
|
import { getFallbackId } from "../shared/props.js";
|
|
80
80
|
defineOptions({
|
|
81
|
-
name: "
|
|
81
|
+
name: "LibSimpleInput",
|
|
82
82
|
inheritAttrs: false
|
|
83
83
|
});
|
|
84
84
|
const fallbackId = getFallbackId();
|
|
@@ -18,7 +18,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
18
18
|
readonly "onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
19
19
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onInput" | "onSubmit" | "onUpdate:modelValue"> & (Props & {
|
|
20
20
|
modelValue: T;
|
|
21
|
-
}) &
|
|
21
|
+
}) & {}> & import("vue").PublicProps;
|
|
22
22
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
23
23
|
attrs: any;
|
|
24
24
|
slots: {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { type HTMLAttributes } from "vue";
|
|
2
|
+
import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type SuggestionsEmits, type SuggestionsProps, type WrapperProps } from "../shared/props.js.js";
|
|
3
|
+
type WrapperTypes = Partial<WrapperProps<"item", HTMLAttributes, {
|
|
4
|
+
/** Tailwind classes. */
|
|
5
|
+
class?: string;
|
|
6
|
+
}>>;
|
|
7
|
+
type RealProps = LinkableByIdProps & LabelProps & BaseInteractiveProps & {
|
|
8
|
+
/** Return true to prevent the keydown event from being handled. */
|
|
9
|
+
filterKeydown?: (e: KeyboardEvent) => boolean;
|
|
10
|
+
/** Return true to prevent the blur event from being handled. */
|
|
11
|
+
filterBlur?: (e: MouseEvent) => boolean;
|
|
12
|
+
/** Return true to prevent the focus event from being handled. */
|
|
13
|
+
filterFocus?: (e: FocusEvent) => boolean;
|
|
14
|
+
};
|
|
15
|
+
interface Props extends
|
|
16
|
+
/** @vue-ignore */
|
|
17
|
+
Partial<Omit<HTMLAttributes, "class" | "onSubmit"> & {
|
|
18
|
+
/** Tailwind classes. */
|
|
19
|
+
class?: string;
|
|
20
|
+
}>,
|
|
21
|
+
/** @vue-ignore */
|
|
22
|
+
WrapperTypes, RealProps {
|
|
23
|
+
}
|
|
24
|
+
declare const _default: <TSuggestion extends string | object, TValue extends string | string[]>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
25
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
26
|
+
readonly onSubmit?: ((val: string, suggestion?: any, wasRemoved?: boolean | undefined) => any) | undefined;
|
|
27
|
+
readonly "onUpdate:isOpen"?: ((val: boolean) => any) | undefined;
|
|
28
|
+
readonly "onUpdate:activeSuggestion"?: ((val: number) => any) | undefined;
|
|
29
|
+
readonly "onUpdate:modelValue"?: ((value: TValue) => any) | undefined;
|
|
30
|
+
readonly "onUpdate:inputValue"?: ((value: string) => any) | undefined;
|
|
31
|
+
readonly "onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
32
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onSubmit" | "onUpdate:modelValue" | "onUpdate:open" | "onUpdate:isOpen" | "onUpdate:activeSuggestion" | "onUpdate:inputValue"> & (Props & SuggestionsProps<TSuggestion> & {
|
|
33
|
+
/**
|
|
34
|
+
* The final valid value. This is *not* the value you want to share with the input. If `restrictToSuggestions` is true this will not update on any invalid values that `inputValue` might be set to.
|
|
35
|
+
*
|
|
36
|
+
* If suggestions are objects, this will be the string returned by the `suggestionLabel` prop.
|
|
37
|
+
*/
|
|
38
|
+
modelValue: TValue;
|
|
39
|
+
/**
|
|
40
|
+
* If the element is bound to an input, this is the value that the input should be sharing.
|
|
41
|
+
*
|
|
42
|
+
* It allows the component to read even invalid output, and also to reset that invalid output when either modelValue is set to a new value, or when the component is closed via cancel.
|
|
43
|
+
*/
|
|
44
|
+
inputValue?: string;
|
|
45
|
+
open?: boolean;
|
|
46
|
+
}) & {}> & import("vue").PublicProps;
|
|
47
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
48
|
+
suggestions: {
|
|
49
|
+
list: any[] | undefined;
|
|
50
|
+
filtered: any[] | undefined;
|
|
51
|
+
active: number;
|
|
52
|
+
available: boolean;
|
|
53
|
+
moreThanOneAvailable: boolean;
|
|
54
|
+
hasExactlyMatching: TSuggestion | undefined;
|
|
55
|
+
hasValidSuggestion: boolean;
|
|
56
|
+
openable: boolean | undefined;
|
|
57
|
+
getLabel: (item: any) => string;
|
|
58
|
+
$open: boolean;
|
|
59
|
+
open: () => void;
|
|
60
|
+
close: () => void;
|
|
61
|
+
enterSelected: (doClose?: boolean) => void;
|
|
62
|
+
enterIndex: (num: number, doClose?: boolean) => void;
|
|
63
|
+
toggle: () => void;
|
|
64
|
+
cancel: () => void;
|
|
65
|
+
select: (num: number) => void;
|
|
66
|
+
prev: () => void;
|
|
67
|
+
next: () => void;
|
|
68
|
+
first: () => void;
|
|
69
|
+
last: () => void;
|
|
70
|
+
};
|
|
71
|
+
el: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
|
|
72
|
+
/** A simple keydown handler that can be passed to an input to control the component while still focused inside it. */
|
|
73
|
+
inputKeydownHandler: (e: KeyboardEvent) => void;
|
|
74
|
+
/** A blur handler for the input that controls the component. This also takes care of making clicking on a suggestion work, since otherwise if canOpen is set to false in the blur handler, no click event will fire. */
|
|
75
|
+
inputBlurHandler: (e: MouseEvent) => void;
|
|
76
|
+
/** A focus handler for the input that controls the component. */
|
|
77
|
+
inputFocusHandler: (e: FocusEvent) => void;
|
|
78
|
+
}>): void;
|
|
79
|
+
attrs: any;
|
|
80
|
+
slots: {
|
|
81
|
+
item?: (props: {
|
|
82
|
+
item: any;
|
|
83
|
+
index: any;
|
|
84
|
+
isSelected: any;
|
|
85
|
+
}) => any;
|
|
86
|
+
};
|
|
87
|
+
emit: SuggestionsEmits<false> & (((evt: "update:modelValue", value: TValue) => void) & ((evt: "update:inputValue", value: string) => void) & ((evt: "update:open", value: boolean) => void));
|
|
88
|
+
}>) => import("vue").VNode & {
|
|
89
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
90
|
+
};
|
|
91
|
+
export default _default;
|
|
92
|
+
type __VLS_PrettifyLocal<T> = {
|
|
93
|
+
[K in keyof T as K]: T[K];
|
|
94
|
+
} & {};
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
v-bind="{ ...$.attrs, class: void 0 }"
|
|
18
18
|
>
|
|
19
19
|
<!-- Click event is just in case, it should not really be triggered. We can do click selections via the blur handler. -->
|
|
20
|
-
<div
|
|
20
|
+
<div
|
|
21
|
+
:id="`suggestion-${id ?? fallbackId}-${index}`"
|
|
21
22
|
role="option"
|
|
22
23
|
:class="twMerge(
|
|
23
24
|
`
|
|
@@ -41,7 +42,8 @@
|
|
|
41
42
|
@mousedown.prevent
|
|
42
43
|
@mouseup="suggestions.enterIndex(index, !Array.isArray($modelValue))"
|
|
43
44
|
>
|
|
44
|
-
<slot
|
|
45
|
+
<slot
|
|
46
|
+
name="item"
|
|
45
47
|
:item="item"
|
|
46
48
|
:index="index"
|
|
47
49
|
:is-selected="Array.isArray($modelValue) ? $modelValue.includes(item) : $modelValue === item"
|
|
@@ -68,7 +70,7 @@ import { twMerge } from "../../utils/twMerge.js";
|
|
|
68
70
|
import LibCheckbox from "../LibCheckbox/LibCheckbox.vue";
|
|
69
71
|
import { getFallbackId } from "../shared/props.js";
|
|
70
72
|
defineOptions({
|
|
71
|
-
name: "
|
|
73
|
+
name: "LibSuggestions",
|
|
72
74
|
inheritAttrs: false
|
|
73
75
|
});
|
|
74
76
|
const $ = useDivideAttrs(["item"]);
|
|
@@ -91,7 +93,7 @@ const props = defineProps({
|
|
|
91
93
|
suggestionsFilter: { type: Function, required: false },
|
|
92
94
|
allowOpenEmpty: { type: Boolean, required: false },
|
|
93
95
|
canOpen: { type: Boolean, required: false, default: true },
|
|
94
|
-
canClose: { type: Boolean, required: false },
|
|
96
|
+
canClose: { type: Boolean, required: false, default: true },
|
|
95
97
|
isValid: { type: Boolean, required: false, default: true },
|
|
96
98
|
suggestionSelector: { type: Function, required: false },
|
|
97
99
|
showSelectedValues: { type: Boolean, required: false }
|
|
@@ -43,7 +43,7 @@ declare const _default: <TSuggestion extends string | object, TValue extends str
|
|
|
43
43
|
*/
|
|
44
44
|
inputValue?: string;
|
|
45
45
|
open?: boolean;
|
|
46
|
-
}) &
|
|
46
|
+
}) & {}> & import("vue").PublicProps;
|
|
47
47
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
48
48
|
suggestions: {
|
|
49
49
|
list: any[] | undefined;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type TableHTMLAttributes } from "vue";
|
|
2
|
+
import type { ResizableOptions, TableColConfig } from "../../types/index.js.js";
|
|
3
|
+
import type { TailwindClassProp } from "../shared/props.js.js";
|
|
4
|
+
type T = any;
|
|
5
|
+
type RealProps = {
|
|
6
|
+
resizable?: Partial<ResizableOptions>;
|
|
7
|
+
values?: T[];
|
|
8
|
+
itemKey?: keyof T | ((item: T) => string);
|
|
9
|
+
/** Let's the table know the shape of the data since values might be empty. */
|
|
10
|
+
cols?: (keyof T)[];
|
|
11
|
+
rounded?: boolean;
|
|
12
|
+
border?: boolean;
|
|
13
|
+
cellBorder?: boolean;
|
|
14
|
+
header?: boolean;
|
|
15
|
+
colConfig?: TableColConfig<T>;
|
|
16
|
+
};
|
|
17
|
+
interface Props extends
|
|
18
|
+
/** @vue-ignore */
|
|
19
|
+
Partial<Omit<TableHTMLAttributes, "class" | "readonly" | "disabled"> & TailwindClassProp>, RealProps {
|
|
20
|
+
}
|
|
21
|
+
declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
22
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Props & {}> & import("vue").PublicProps;
|
|
23
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
24
|
+
attrs: any;
|
|
25
|
+
slots: {
|
|
26
|
+
[x: string]: ((props: {
|
|
27
|
+
colKey: any;
|
|
28
|
+
style: string;
|
|
29
|
+
class: string;
|
|
30
|
+
}) => any) | undefined;
|
|
31
|
+
} & {
|
|
32
|
+
[x: string]: ((props: {
|
|
33
|
+
class: string;
|
|
34
|
+
item: any;
|
|
35
|
+
value: any;
|
|
36
|
+
}) => any) | undefined;
|
|
37
|
+
};
|
|
38
|
+
emit: {};
|
|
39
|
+
}>) => import("vue").VNode & {
|
|
40
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
41
|
+
};
|
|
42
|
+
export default _default;
|
|
43
|
+
type __VLS_PrettifyLocal<T> = {
|
|
44
|
+
[K in keyof T as K]: T[K];
|
|
45
|
+
} & {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- Assumes no scrollbars on children -->
|
|
3
|
-
<table
|
|
3
|
+
<table
|
|
4
|
+
:class="twMerge(
|
|
4
5
|
`table
|
|
5
6
|
table-fixed
|
|
6
7
|
border-separate
|
|
@@ -42,10 +43,17 @@
|
|
|
42
43
|
)"
|
|
43
44
|
v-resizable-cols="resizableOptions"
|
|
44
45
|
>
|
|
45
|
-
<thead
|
|
46
|
+
<thead
|
|
47
|
+
v-if="header"
|
|
48
|
+
class="table--header"
|
|
49
|
+
>
|
|
46
50
|
<tr class="table--row">
|
|
47
|
-
<template
|
|
48
|
-
|
|
51
|
+
<template
|
|
52
|
+
v-for="col, i of cols"
|
|
53
|
+
:key="col"
|
|
54
|
+
>
|
|
55
|
+
<slot
|
|
56
|
+
:name="`header-${col.toString()}`"
|
|
49
57
|
:class="[
|
|
50
58
|
extraClasses[`-1-${i}`],
|
|
51
59
|
'cell table--header-cell',
|
|
@@ -54,7 +62,8 @@
|
|
|
54
62
|
:style="`width:${widths.length > 0 ? widths[i] : ``}; `"
|
|
55
63
|
:col-key="col"
|
|
56
64
|
>
|
|
57
|
-
<td
|
|
65
|
+
<td
|
|
66
|
+
:class="[
|
|
58
67
|
extraClasses[`-1-${i}`],
|
|
59
68
|
'cell table--header-cell',
|
|
60
69
|
colConfig[col]?.resizable === false ? 'no-resize' : ''
|
|
@@ -68,9 +77,15 @@
|
|
|
68
77
|
</tr>
|
|
69
78
|
</thead>
|
|
70
79
|
<tbody class="table--body">
|
|
71
|
-
<template
|
|
80
|
+
<template
|
|
81
|
+
v-for="item, i of values"
|
|
82
|
+
:key="typeof itemKey === 'function' ? itemKey(item) : item[itemKey]"
|
|
83
|
+
>
|
|
72
84
|
<tr class="table--row">
|
|
73
|
-
<template
|
|
85
|
+
<template
|
|
86
|
+
v-for="col, j of cols"
|
|
87
|
+
:key="(typeof itemKey === 'function' ? itemKey(item) : item[itemKey]) + col.toString()"
|
|
88
|
+
>
|
|
74
89
|
<slot
|
|
75
90
|
:name="col"
|
|
76
91
|
:item="item"
|
|
@@ -94,7 +109,7 @@ import { computed, ref } from "vue";
|
|
|
94
109
|
import { vResizableCols } from "../../directives/vResizableCols.js";
|
|
95
110
|
import { twMerge } from "../../utils/twMerge.js";
|
|
96
111
|
defineOptions({
|
|
97
|
-
name: "
|
|
112
|
+
name: "LibTable"
|
|
98
113
|
});
|
|
99
114
|
const props = defineProps({
|
|
100
115
|
resizable: { type: Object, required: false, default: () => ({}) },
|
|
@@ -19,7 +19,7 @@ interface Props extends
|
|
|
19
19
|
Partial<Omit<TableHTMLAttributes, "class" | "readonly" | "disabled"> & TailwindClassProp>, RealProps {
|
|
20
20
|
}
|
|
21
21
|
declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
22
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Props &
|
|
22
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Props & {}> & import("vue").PublicProps;
|
|
23
23
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
24
24
|
attrs: any;
|
|
25
25
|
slots: {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
2
|
+
modelValue: string;
|
|
3
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
|
+
"update:modelValue": (value: string) => any;
|
|
5
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
6
|
+
modelValue: string;
|
|
7
|
+
}> & Readonly<{
|
|
8
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
10
|
+
default?: (props: {}) => any;
|
|
11
|
+
}>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -11,9 +11,8 @@
|
|
|
11
11
|
<script setup>
|
|
12
12
|
import { ref } from "vue";
|
|
13
13
|
import { twMerge } from "../../utils/twMerge.js";
|
|
14
|
-
import {} from "../shared/props.js";
|
|
15
14
|
defineOptions({
|
|
16
|
-
name: "
|
|
15
|
+
name: "LibName",
|
|
17
16
|
/* todo */
|
|
18
17
|
inheritAttrs: false
|
|
19
18
|
});
|
|
@@ -23,6 +22,6 @@ const modelValue = defineModel({ type: String, ...{ required: true } });
|
|
|
23
22
|
|
|
24
23
|
<script>
|
|
25
24
|
export default {
|
|
26
|
-
name: "
|
|
25
|
+
name: "LibName"
|
|
27
26
|
};
|
|
28
27
|
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
2
2
|
modelValue: string;
|
|
3
|
-
},
|
|
3
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
4
|
"update:modelValue": (value: string) => any;
|
|
5
5
|
}, string, import("vue").PublicProps, Readonly<{
|
|
6
6
|
modelValue: string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
showOutline: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
export default _default;
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
<!-- Width 100% + 2xmargin in combination with the margins in LibRoot is a bit of a hack so that it looks like there's padding around the content in test mode (for storybook). We can't just absolutely position these controls or they make the container scroll. -->
|
|
3
3
|
<div class="test-controls flex gap-2 p-1 pb-10 -ml-10 w-[calc(100%_+_var(--spacing)*20)]">
|
|
4
4
|
<div class="flex-grow"/>
|
|
5
|
-
<div class="outline-indicator">
|
|
5
|
+
<div class="outline-indicator">
|
|
6
|
+
{{ showOutline ? "Outline Enabled" : "Outline Disabled" }}
|
|
7
|
+
</div>
|
|
6
8
|
<lib-dark-mode-switcher/>
|
|
7
9
|
</div>
|
|
8
10
|
</template>
|
|
9
11
|
|
|
10
12
|
<script setup>
|
|
11
13
|
import LibDarkModeSwitcher from "../LibDarkModeSwitcher/LibDarkModeSwitcher.vue";
|
|
12
|
-
defineOptions({ name: "
|
|
14
|
+
defineOptions({ name: "TestControls" });
|
|
13
15
|
defineProps({
|
|
14
16
|
showOutline: { type: Boolean, required: true }
|
|
15
17
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
showOutline: boolean;
|
|
3
3
|
};
|
|
4
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props,
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
5
|
export default _default;
|
|
@@ -52,7 +52,7 @@ import type { Point } from "../types/index.js.js";
|
|
|
52
52
|
* }
|
|
53
53
|
* ```
|
|
54
54
|
*/
|
|
55
|
-
export declare const useDragWithThreshold: ({ initialOffset, pointerCoords, threshold
|
|
55
|
+
export declare const useDragWithThreshold: ({ initialOffset, pointerCoords, threshold }?: {
|
|
56
56
|
initialOffset?: Ref<Point | undefined>;
|
|
57
57
|
pointerCoords?: Ref<Point | undefined>;
|
|
58
58
|
threshold?: Ref<number>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TranslationFunction } from "./useSetupI18n.js.js";
|
|
2
2
|
export declare function useInjectedI18n(): TranslationFunction;
|
|
@@ -52,7 +52,7 @@ import type { ScrollNearContainerEdgesOptions } from "../types/index.js.js";
|
|
|
52
52
|
* </div>
|
|
53
53
|
* ```
|
|
54
54
|
*/
|
|
55
|
-
export declare const useScrollNearContainerEdges: ({ containerEl, scrollMargin, outerScrollMargin, fastPixelMultiplier, fastPixelAmount, useTimer, timerInterval
|
|
55
|
+
export declare const useScrollNearContainerEdges: ({ containerEl, scrollMargin, outerScrollMargin, fastPixelMultiplier, fastPixelAmount, useTimer, timerInterval }: ScrollNearContainerEdgesOptions) => {
|
|
56
56
|
scrollEdges: (clientX: number, clientY: number, overrideUseTimer?: boolean) => void;
|
|
57
57
|
/** Reactive. */
|
|
58
58
|
scrollIndicator: {
|
|
@@ -9,7 +9,7 @@ export type TranslationFunction = (key: string, replacements?: Record<string, an
|
|
|
9
9
|
*
|
|
10
10
|
* To avoid hydration errors, on the server, the message loading is awaited.
|
|
11
11
|
*/
|
|
12
|
-
export declare function useSetupI18n({ locale, useBuiltinTranslations, useDummyMessageSetWhileLoading, translationFunction
|
|
12
|
+
export declare function useSetupI18n({ locale, useBuiltinTranslations, useDummyMessageSetWhileLoading, translationFunction }: {
|
|
13
13
|
locale: Ref<string>;
|
|
14
14
|
/** Will asynchronously load the built-in translations for the current locale (watching and updating if needed). If you don't use this, you'll need to provide a custom translation function. */
|
|
15
15
|
useBuiltinTranslations?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { AnyFunction } from "@alanscodelog/utils";
|
|
2
2
|
import { type Ref } from "vue";
|
|
3
|
-
import {
|
|
3
|
+
import type { SuggestionsEmits, SuggestionsOptions } from "../components/shared/props.js.js";
|
|
4
4
|
/**
|
|
5
5
|
* The logic for the suggestions component.
|
|
6
6
|
*
|
|
@@ -8,7 +8,7 @@ export declare class NotificationHandler<TRawEntry extends RawNotificationEntry<
|
|
|
8
8
|
maxHistory: number;
|
|
9
9
|
listeners: NotificationListener<TEntry>[];
|
|
10
10
|
stringifier?: NotificationStringifier<TEntry>;
|
|
11
|
-
constructor({ timeout, stringifier, maxHistory
|
|
11
|
+
constructor({ timeout, stringifier, maxHistory }?: {
|
|
12
12
|
timeout?: NotificationHandler<TRawEntry>["timeout"];
|
|
13
13
|
stringifier?: NotificationHandler<TRawEntry>["stringifier"];
|
|
14
14
|
maxHistory?: NotificationHandler<TRawEntry>["maxHistory"];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export const base64ToImg = async (imageSrc) => {
|
|
2
2
|
const img = new Image();
|
|
3
|
-
const loaded = new Promise((
|
|
3
|
+
const loaded = new Promise((resolve) => {
|
|
4
4
|
img.addEventListener("load", () => {
|
|
5
5
|
resolve(img);
|
|
6
6
|
});
|
|
7
|
-
})
|
|
7
|
+
});
|
|
8
8
|
img.src = imageSrc;
|
|
9
9
|
await loaded;
|
|
10
10
|
return img;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { themeAsTailwindCss } from "metamorphosis/tailwind";
|
|
2
2
|
export declare const themeConvertionOpts: Parameters<typeof themeAsTailwindCss>[1];
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* If the value is not an error, it is returned.
|
|
7
7
|
*/
|
|
8
|
-
export declare function notifyIfError<T>(err: T, { logger, ns, force
|
|
8
|
+
export declare function notifyIfError<T>(err: T, { logger, ns, force }?: {
|
|
9
9
|
logger?: {
|
|
10
10
|
debug: (...args: any[]) => void;
|
|
11
11
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@witchcraft/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Vue component library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/runtime/main.lib.js",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"storybook:build": "pnpm nuxt prepare && storybook build -o docs/storybook",
|
|
60
60
|
"storybook:test": "pnpm storybook:build && pnpm concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"pnpm http-server docs/storybook --port 6006 --silent\" \"pnpm wait-on tcp:6006 && pnpm test-storybook\"",
|
|
61
61
|
"test": "pnpm storybook:test && pnpm lint:types",
|
|
62
|
+
"test:dev": "pnpm concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"pnpm storybook\" \"pnpm wait-on tcp:6006 && pnpm test-storybook --watch\"",
|
|
62
63
|
"doc": "pnpm test && pnpm storybook:build",
|
|
63
64
|
"doc:dev": "pnpm storybook",
|
|
64
65
|
"lint:eslint": "eslint \"src/**/*.{js,ts,vue,cjs}\" \"*.{js,ts}\" --max-warnings=5 --report-unused-disable-directives",
|
|
@@ -86,7 +87,6 @@
|
|
|
86
87
|
},
|
|
87
88
|
"dependencies": {
|
|
88
89
|
"@alanscodelog/utils": "^6.0.1",
|
|
89
|
-
"@egoist/vue-to-react": "^1.2.0",
|
|
90
90
|
"@iconify/json": "^2.2.379",
|
|
91
91
|
"@nuxt/kit": "^4.0.3",
|
|
92
92
|
"@nuxt/schema": "^4.0.3",
|
|
@@ -106,17 +106,17 @@
|
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
108
|
"@alanscodelog/commitlint-config": "^3.1.2",
|
|
109
|
-
"@alanscodelog/eslint-config": "^
|
|
109
|
+
"@alanscodelog/eslint-config": "^6.3.0",
|
|
110
110
|
"@alanscodelog/semantic-release-config": "^5.0.4",
|
|
111
|
-
"@alanscodelog/tsconfigs": "^6.
|
|
112
|
-
"@alanscodelog/vite-config": "^0.0.
|
|
111
|
+
"@alanscodelog/tsconfigs": "^6.2.0",
|
|
112
|
+
"@alanscodelog/vite-config": "^0.0.6",
|
|
113
113
|
"@chromatic-com/storybook": "^3.2.7",
|
|
114
114
|
"@commitlint/cli": "^19.8.1",
|
|
115
115
|
"@internationalized/date": "^3.9.0",
|
|
116
116
|
"@nuxt/eslint-config": "^1.9.0",
|
|
117
117
|
"@nuxt/module-builder": "^1.0.2",
|
|
118
118
|
"@nuxtjs/i18n": "^9.5.6",
|
|
119
|
-
"@playwright/test": "
|
|
119
|
+
"@playwright/test": "=1.54.0",
|
|
120
120
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
121
121
|
"@storybook/addon-a11y": "^8.6.14",
|
|
122
122
|
"@storybook/addon-actions": "^8.6.14",
|
|
@@ -141,14 +141,13 @@
|
|
|
141
141
|
"autoprefixer": "^10.4.21",
|
|
142
142
|
"concurrently": "^9.2.1",
|
|
143
143
|
"eslint": "^9.34.0",
|
|
144
|
-
"eslint-plugin-jsdoc": "^48.11.0",
|
|
145
144
|
"http-server": "^14.1.1",
|
|
146
145
|
"husky": "^9.1.7",
|
|
147
146
|
"indexit": "2.1.0-beta.3",
|
|
148
147
|
"madge": "^7.0.0",
|
|
149
148
|
"nuxt": "^4.0.3",
|
|
150
|
-
"playwright": "
|
|
151
|
-
"playwright-core": "
|
|
149
|
+
"playwright": "=1.54.0",
|
|
150
|
+
"playwright-core": "=1.54.0",
|
|
152
151
|
"semantic-release": "^24.2.7",
|
|
153
152
|
"storybook": "^8.6.14",
|
|
154
153
|
"storybook-dark-mode": "^4.0.2",
|
|
@@ -159,7 +158,7 @@
|
|
|
159
158
|
"vite": "^7.1.3",
|
|
160
159
|
"vite-tsconfig-paths": "^5.1.4",
|
|
161
160
|
"vue": "^3.5.20",
|
|
162
|
-
"vue-tsc": "3.0.
|
|
161
|
+
"vue-tsc": "3.0.6",
|
|
163
162
|
"wait-on": "^8.0.4"
|
|
164
163
|
},
|
|
165
164
|
"author": "Alan <alanscodelog@gmail.com>",
|