sprintify-ui 0.8.40 → 0.8.42
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/sprintify-ui.es.js +4910 -4972
- package/dist/types/components/BaseActionItem.vue.d.ts +5 -15
- package/dist/types/components/BaseActionItemButton.vue.d.ts +4 -25
- package/dist/types/components/BaseAddressForm.vue.d.ts +6 -45
- package/dist/types/components/BaseAlert.vue.d.ts +11 -37
- package/dist/types/components/BaseApp.vue.d.ts +8 -3
- package/dist/types/components/BaseAppDialogs.vue.d.ts +1 -1
- package/dist/types/components/BaseAppSnackbars.vue.d.ts +1 -1
- package/dist/types/components/BaseAutocomplete.vue.d.ts +585 -37
- package/dist/types/components/BaseAutocompleteDrawer.vue.d.ts +24 -16
- package/dist/types/components/BaseAutocompleteFetch.vue.d.ts +526 -36
- package/dist/types/components/BaseAvatar.vue.d.ts +4 -4
- package/dist/types/components/BaseAvatarGroup.vue.d.ts +4 -4
- package/dist/types/components/BaseBadge.vue.d.ts +11 -35
- package/dist/types/components/BaseBelongsTo.vue.d.ts +524 -34
- package/dist/types/components/BaseBelongsToFetch.vue.d.ts +484 -35
- package/dist/types/components/BaseBoolean.vue.d.ts +3 -12
- package/dist/types/components/BaseBreadcrumbs.vue.d.ts +4 -4
- package/dist/types/components/BaseButton.vue.d.ts +17 -53
- package/dist/types/components/BaseButtonGroup.vue.d.ts +19 -14
- package/dist/types/components/BaseCalendar.vue.d.ts +46 -13
- package/dist/types/components/BaseCard.vue.d.ts +13 -6
- package/dist/types/components/BaseCardRow.vue.d.ts +13 -31
- package/dist/types/components/BaseCharacterCounter.vue.d.ts +4 -4
- package/dist/types/components/BaseClipboard.vue.d.ts +14 -6
- package/dist/types/components/BaseCollapse.vue.d.ts +20 -52
- package/dist/types/components/BaseColor.vue.d.ts +8 -8
- package/dist/types/components/BaseContainer.vue.d.ts +11 -33
- package/dist/types/components/BaseCounter.vue.d.ts +4 -4
- package/dist/types/components/BaseCropper.vue.d.ts +29 -30
- package/dist/types/components/BaseCropperModal.vue.d.ts +8 -17
- package/dist/types/components/BaseDataIterator.vue.d.ts +6 -6
- package/dist/types/components/BaseDataIteratorSectionBox.vue.d.ts +10 -14
- package/dist/types/components/BaseDataIteratorSectionButton.vue.d.ts +6 -15
- package/dist/types/components/BaseDataIteratorSectionColumns.vue.d.ts +4 -4
- package/dist/types/components/BaseDataIteratorSectionModal.vue.d.ts +13 -17
- package/dist/types/components/BaseDataTable.vue.d.ts +842 -26
- package/dist/types/components/BaseDataTableRowAction.vue.d.ts +4 -25
- package/dist/types/components/BaseDataTableTemplate.vue.d.ts +129 -14
- package/dist/types/components/BaseDatePicker.vue.d.ts +7 -56
- package/dist/types/components/BaseDateSelect.vue.d.ts +5 -5
- package/dist/types/components/BaseDescriptionList.vue.d.ts +8 -3
- package/dist/types/components/BaseDescriptionListItem.vue.d.ts +11 -4
- package/dist/types/components/BaseDialog.vue.d.ts +516 -8
- package/dist/types/components/BaseDisplayRelativeTime.vue.d.ts +15 -8
- package/dist/types/components/BaseDraggable.vue.d.ts +18 -20
- package/dist/types/components/BaseDropdown.vue.d.ts +18 -10
- package/dist/types/components/BaseDropdownAutocomplete.vue.d.ts +23 -16
- package/dist/types/components/BaseField.vue.d.ts +12 -7
- package/dist/types/components/BaseFieldI18n.vue.d.ts +7 -7
- package/dist/types/components/BaseFilePicker.vue.d.ts +20 -44
- package/dist/types/components/BaseFilePickerCrop.vue.d.ts +51 -39
- package/dist/types/components/BaseFileUploader.vue.d.ts +40 -76
- package/dist/types/components/BaseForm.vue.d.ts +22 -15
- package/dist/types/components/BaseGantt.vue.d.ts +21 -40
- package/dist/types/components/BaseHasMany.vue.d.ts +325 -39
- package/dist/types/components/BaseHeader.vue.d.ts +4 -37
- package/dist/types/components/BaseIconPicker.vue.d.ts +6 -31
- package/dist/types/components/BaseInput.vue.d.ts +12 -12
- package/dist/types/components/BaseInputError.vue.d.ts +11 -6
- package/dist/types/components/BaseInputLabel.vue.d.ts +4 -4
- package/dist/types/components/BaseInputPercent.vue.d.ts +9 -9
- package/dist/types/components/BaseJsonReader.vue.d.ts +4 -29
- package/dist/types/components/BaseJsonReaderItem.vue.d.ts +3 -12
- package/dist/types/components/BaseLayoutNotificationDropdown.vue.d.ts +5 -5
- package/dist/types/components/BaseLayoutNotificationItem.vue.d.ts +4 -4
- package/dist/types/components/BaseLayoutNotificationItemContent.vue.d.ts +3 -12
- package/dist/types/components/BaseLayoutSidebar.vue.d.ts +16 -11
- package/dist/types/components/BaseLayoutSidebarConfigurable.vue.d.ts +13 -8
- package/dist/types/components/BaseLayoutStacked.vue.d.ts +22 -42
- package/dist/types/components/BaseLayoutStackedConfigurable.vue.d.ts +12 -7
- package/dist/types/components/BaseLazy.vue.d.ts +24 -15
- package/dist/types/components/BaseLoadingCover.vue.d.ts +5 -5
- package/dist/types/components/BaseMediaGallery.vue.d.ts +5 -5
- package/dist/types/components/BaseMediaGalleryItem.vue.d.ts +5 -5
- package/dist/types/components/BaseMediaItem.vue.d.ts +5 -5
- package/dist/types/components/BaseMediaLibrary.vue.d.ts +38 -33
- package/dist/types/components/BaseMediaList.vue.d.ts +5 -5
- package/dist/types/components/BaseMediaListItem.vue.d.ts +6 -6
- package/dist/types/components/BaseMediaPictures.vue.d.ts +5 -5
- package/dist/types/components/BaseMediaPicturesItem.vue.d.ts +5 -5
- package/dist/types/components/BaseMediaPreview.vue.d.ts +5 -5
- package/dist/types/components/BaseMenu.vue.d.ts +31 -23
- package/dist/types/components/BaseMenuItem.vue.d.ts +5 -5
- package/dist/types/components/BaseModalCenter.vue.d.ts +14 -9
- package/dist/types/components/BaseModalSide.vue.d.ts +14 -9
- package/dist/types/components/BaseNavbar.vue.d.ts +23 -16
- package/dist/types/components/BaseNavbarItem.vue.d.ts +5 -5
- package/dist/types/components/BaseNavbarItemContent.vue.d.ts +4 -4
- package/dist/types/components/BaseNavbarSideItem.vue.d.ts +5 -5
- package/dist/types/components/BaseNavbarSideItemContent.vue.d.ts +4 -4
- package/dist/types/components/BasePagination.vue.d.ts +5 -5
- package/dist/types/components/BasePanel.vue.d.ts +5 -5
- package/dist/types/components/BasePassword.vue.d.ts +8 -8
- package/dist/types/components/BaseProgressCircle.vue.d.ts +4 -4
- package/dist/types/components/BaseRadioGroup.vue.d.ts +15 -10
- package/dist/types/components/BaseReadMore.vue.d.ts +13 -6
- package/dist/types/components/BaseRichText.vue.d.ts +6 -6
- package/dist/types/components/BaseScrollColumn.vue.d.ts +5 -5
- package/dist/types/components/BaseSelect.vue.d.ts +15 -8
- package/dist/types/components/BaseShortcut.vue.d.ts +5 -5
- package/dist/types/components/BaseSideNavigation.vue.d.ts +11 -27
- package/dist/types/components/BaseSideNavigationItem.vue.d.ts +13 -31
- package/dist/types/components/BaseSkeleton.vue.d.ts +4 -4
- package/dist/types/components/BaseStatistic.vue.d.ts +6 -4
- package/dist/types/components/BaseStepper.vue.d.ts +4 -4
- package/dist/types/components/BaseStepperItem.vue.d.ts +5 -5
- package/dist/types/components/BaseSwitch.vue.d.ts +14 -9
- package/dist/types/components/BaseSystemAlert.vue.d.ts +12 -7
- package/dist/types/components/BaseTabItem.vue.d.ts +15 -31
- package/dist/types/components/BaseTable.vue.d.ts +15 -45
- package/dist/types/components/BaseTableBody.vue.d.ts +8 -3
- package/dist/types/components/BaseTableCell.vue.d.ts +13 -47
- package/dist/types/components/BaseTableColumn.vue.d.ts +8 -8
- package/dist/types/components/BaseTableHead.vue.d.ts +11 -27
- package/dist/types/components/BaseTableHeader.vue.d.ts +15 -35
- package/dist/types/components/BaseTableRow.vue.d.ts +15 -41
- package/dist/types/components/BaseTabs.vue.d.ts +14 -27
- package/dist/types/components/BaseTagAutocomplete.vue.d.ts +235 -39
- package/dist/types/components/BaseTagAutocompleteFetch.vue.d.ts +457 -39
- package/dist/types/components/BaseTextarea.vue.d.ts +8 -8
- package/dist/types/components/BaseTextareaAutoresize.vue.d.ts +8 -8
- package/dist/types/components/BaseTimePicker.vue.d.ts +6 -6
- package/dist/types/components/BaseTimeline.vue.d.ts +3 -3
- package/dist/types/components/BaseTimelineItem.vue.d.ts +3 -3
- package/dist/types/components/BaseToast.vue.d.ts +3 -12
- package/dist/types/components/BaseTooltip.vue.d.ts +15 -36
- package/dist/types/components/BaseUniqueCode.vue.d.ts +5 -5
- package/dist/types/components/SlotComponent.d.ts +4 -4
- package/dist/types/stories/PageInputSizes.vue.d.ts +1 -1
- package/dist/types/stories/PageShow.vue.d.ts +1 -1
- package/dist/types/svg/BaseEmptyState.vue.d.ts +1 -1
- package/dist/types/svg/BaseSpinnerLarge.vue.d.ts +1 -1
- package/dist/types/svg/BaseSpinnerSmall.vue.d.ts +1 -1
- package/package.json +1 -6
- package/src/components/BaseLazy.stories.js +28 -7
- package/src/components/BaseLazy.vue +64 -10
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { TimelineItem } from '../types';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
4
|
items: {
|
|
5
5
|
required: true;
|
|
6
6
|
type: PropType<TimelineItem[]>;
|
|
7
7
|
};
|
|
8
|
-
}
|
|
8
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
9
|
items: {
|
|
10
10
|
required: true;
|
|
11
11
|
type: PropType<TimelineItem[]>;
|
|
12
12
|
};
|
|
13
|
-
}
|
|
13
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
14
14
|
export default _default;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { TimelineItem } from '../types';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
4
|
item: {
|
|
5
5
|
required: true;
|
|
6
6
|
type: PropType<TimelineItem>;
|
|
7
7
|
};
|
|
8
|
-
}
|
|
8
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
9
|
item: {
|
|
10
10
|
required: true;
|
|
11
11
|
type: PropType<TimelineItem>;
|
|
12
12
|
};
|
|
13
|
-
}
|
|
13
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
14
14
|
export default _default;
|
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
text: string;
|
|
3
3
|
color: string;
|
|
4
|
-
}
|
|
4
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
5
5
|
text: string;
|
|
6
6
|
color: string;
|
|
7
|
-
}
|
|
7
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
8
|
export default _default;
|
|
9
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
-
type __VLS_TypePropsToOption<T> = {
|
|
11
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
-
} : {
|
|
14
|
-
type: import('vue').PropType<T[K]>;
|
|
15
|
-
required: true;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,60 +1,39 @@
|
|
|
1
1
|
import { UseFloatingOptions } from '@floating-ui/vue';
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
tooltip?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {
|
|
8
|
+
targetRef: HTMLDivElement;
|
|
9
|
+
tooltipRef: HTMLDivElement;
|
|
10
|
+
};
|
|
11
|
+
attrs: Partial<{}>;
|
|
5
12
|
};
|
|
6
|
-
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import("vue").DefineComponent<{
|
|
7
15
|
visible?: boolean;
|
|
8
16
|
text?: string | null | undefined;
|
|
9
17
|
class?: string[] | string | null | undefined;
|
|
10
18
|
floatingOptions?: UseFloatingOptions;
|
|
11
19
|
interactive?: boolean;
|
|
12
|
-
}
|
|
13
|
-
visible: boolean;
|
|
14
|
-
text: null;
|
|
15
|
-
class: null;
|
|
16
|
-
floatingOptions: undefined;
|
|
17
|
-
interactive: boolean;
|
|
18
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
20
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
19
21
|
visible?: boolean;
|
|
20
22
|
text?: string | null | undefined;
|
|
21
23
|
class?: string[] | string | null | undefined;
|
|
22
24
|
floatingOptions?: UseFloatingOptions;
|
|
23
25
|
interactive?: boolean;
|
|
24
|
-
}>, {
|
|
25
|
-
visible: boolean;
|
|
26
|
-
text: null;
|
|
27
|
-
class: null;
|
|
28
|
-
floatingOptions: undefined;
|
|
29
|
-
interactive: boolean;
|
|
30
|
-
}>>>, {
|
|
26
|
+
}> & Readonly<{}>, {
|
|
31
27
|
class: string | string[] | null;
|
|
32
28
|
text: string | null;
|
|
33
29
|
visible: boolean;
|
|
34
30
|
floatingOptions: UseFloatingOptions;
|
|
35
31
|
interactive: boolean;
|
|
36
|
-
}, {}>;
|
|
37
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component,
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
38
34
|
export default _default;
|
|
39
|
-
type __VLS_WithDefaults<P, D> = {
|
|
40
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
41
|
-
default: D[K];
|
|
42
|
-
}> : P[K];
|
|
43
|
-
};
|
|
44
|
-
type __VLS_Prettify<T> = {
|
|
45
|
-
[K in keyof T]: T[K];
|
|
46
|
-
} & {};
|
|
47
35
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
48
36
|
new (): {
|
|
49
37
|
$slots: S;
|
|
50
38
|
};
|
|
51
39
|
};
|
|
52
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
53
|
-
type __VLS_TypePropsToOption<T> = {
|
|
54
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
55
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
56
|
-
} : {
|
|
57
|
-
type: import('vue').PropType<T[K]>;
|
|
58
|
-
required: true;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
3
|
modelValue: {
|
|
4
4
|
required: true;
|
|
5
5
|
type: PropType<string | number | null>;
|
|
@@ -12,7 +12,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
default: string;
|
|
13
13
|
type: PropType<"numeric" | "alphanumeric">;
|
|
14
14
|
};
|
|
15
|
-
}
|
|
15
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
16
|
"update:modelValue": (...args: any[]) => void;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
18
|
modelValue: {
|
|
@@ -27,9 +27,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
27
|
default: string;
|
|
28
28
|
type: PropType<"numeric" | "alphanumeric">;
|
|
29
29
|
};
|
|
30
|
-
}>> & {
|
|
30
|
+
}>> & Readonly<{
|
|
31
31
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
32
|
-
}
|
|
32
|
+
}>, {
|
|
33
33
|
type: "numeric" | "alphanumeric";
|
|
34
|
-
}, {}>;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
35
35
|
export default _default;
|
|
@@ -2,7 +2,7 @@ import { DefineComponent } from 'vue';
|
|
|
2
2
|
/**
|
|
3
3
|
* Base component to manually render the slot of component
|
|
4
4
|
*/
|
|
5
|
-
declare const _default: DefineComponent<{
|
|
5
|
+
declare const _default: DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
6
|
component: {
|
|
7
7
|
type: ObjectConstructor;
|
|
8
8
|
required: true;
|
|
@@ -19,7 +19,7 @@ declare const _default: DefineComponent<{
|
|
|
19
19
|
type: StringConstructor;
|
|
20
20
|
default: string;
|
|
21
21
|
};
|
|
22
|
-
}
|
|
22
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
23
|
component: {
|
|
24
24
|
type: ObjectConstructor;
|
|
25
25
|
required: true;
|
|
@@ -36,8 +36,8 @@ declare const _default: DefineComponent<{
|
|
|
36
36
|
type: StringConstructor;
|
|
37
37
|
default: string;
|
|
38
38
|
};
|
|
39
|
-
}
|
|
39
|
+
}>> & Readonly<{}>, {
|
|
40
40
|
name: string;
|
|
41
41
|
tag: string;
|
|
42
|
-
}, {}>;
|
|
42
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
43
43
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sprintify-ui",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.42",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "rimraf dist && vue-tsc && vite build",
|
|
@@ -53,14 +53,9 @@
|
|
|
53
53
|
"@commitlint/cli": "^17.8.1",
|
|
54
54
|
"@commitlint/config-conventional": "^17.8.1",
|
|
55
55
|
"@iconify/vue": "^4.1.1",
|
|
56
|
-
"@storybook/addon-actions": "^8.3.0",
|
|
57
56
|
"@storybook/addon-controls": "^8.3.0",
|
|
58
57
|
"@storybook/addon-docs": "^8.3.0",
|
|
59
|
-
"@storybook/addon-essentials": "^8.3.0",
|
|
60
|
-
"@storybook/addon-interactions": "^8.3.0",
|
|
61
|
-
"@storybook/addon-links": "^8.3.0",
|
|
62
58
|
"@storybook/manager-api": "^8.3.0",
|
|
63
|
-
"@storybook/test": "^8.3.0",
|
|
64
59
|
"@storybook/theming": "^8.3.0",
|
|
65
60
|
"@storybook/vue3": "^8.3.0",
|
|
66
61
|
"@storybook/vue3-vite": "^8.3.0",
|
|
@@ -2,10 +2,13 @@ import BaseLazy from "./BaseLazy.vue";
|
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: "Utils/BaseLazy",
|
|
5
|
-
description: "BaseLazy component",
|
|
6
5
|
component: BaseLazy,
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: "A lazy loading component that shows a preview while the main content is loading.",
|
|
10
|
+
},
|
|
11
|
+
},
|
|
9
12
|
},
|
|
10
13
|
};
|
|
11
14
|
|
|
@@ -18,10 +21,10 @@ const Template = (args) => ({
|
|
|
18
21
|
},
|
|
19
22
|
template: `
|
|
20
23
|
<div>
|
|
21
|
-
<BaseLazy v-bind="args">
|
|
24
|
+
<BaseLazy v-for="i in 300" v-bind="args" class="border-b">
|
|
22
25
|
<template #default>
|
|
23
26
|
<div class="flex items-center p-3 bg-blue-500 text-blue-900 h-20">
|
|
24
|
-
<p class="text-center">Rendered content</p>
|
|
27
|
+
<p class="text-center">Rendered content [{{ i }}]</p>
|
|
25
28
|
</div>
|
|
26
29
|
</template>
|
|
27
30
|
<template #preview>
|
|
@@ -34,5 +37,23 @@ const Template = (args) => ({
|
|
|
34
37
|
`,
|
|
35
38
|
});
|
|
36
39
|
|
|
37
|
-
export const
|
|
38
|
-
|
|
40
|
+
export const Mount = Template.bind({});
|
|
41
|
+
Mount.args = {
|
|
42
|
+
delay: 2000,
|
|
43
|
+
trigger: 'mount'
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const Intersection = Template.bind({});
|
|
47
|
+
Intersection.args = {
|
|
48
|
+
delay: 1000,
|
|
49
|
+
trigger: 'intersection'
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const IntersectionMargin = Template.bind({});
|
|
53
|
+
IntersectionMargin.args = {
|
|
54
|
+
trigger: 'intersection',
|
|
55
|
+
intersectionConfig: {
|
|
56
|
+
rootMargin: '500px',
|
|
57
|
+
},
|
|
58
|
+
delay: 1000,
|
|
59
|
+
};
|
|
@@ -1,26 +1,80 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div ref="nodeRef">
|
|
3
|
+
|
|
4
|
+
<slot
|
|
3
5
|
v-if="shouldRender"
|
|
4
6
|
name="default"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
/>
|
|
8
|
+
<slot
|
|
7
9
|
v-else
|
|
8
10
|
name="preview"
|
|
9
|
-
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
10
13
|
</template>
|
|
11
14
|
|
|
12
15
|
<script lang="ts" setup>
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
import { useIntersectionObserver, UseIntersectionObserverOptions } from '@vueuse/core';
|
|
18
|
+
|
|
19
|
+
const nodeRef = ref<HTMLElement | null>(null);
|
|
20
|
+
|
|
21
|
+
const TRIGGER_MOUNT = 'mount';
|
|
22
|
+
const TRIGGER_INTERSECTION = 'intersection';
|
|
23
|
+
|
|
24
|
+
const props = withDefaults(defineProps<{
|
|
15
25
|
delay?: number;
|
|
16
|
-
|
|
26
|
+
trigger?: typeof TRIGGER_MOUNT | typeof TRIGGER_INTERSECTION;
|
|
27
|
+
intersectionConfig?: UseIntersectionObserverOptions;
|
|
28
|
+
}>(), {
|
|
29
|
+
delay: 200,
|
|
30
|
+
trigger: TRIGGER_MOUNT,
|
|
31
|
+
intersectionConfig: undefined,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const inViewport = ref(false);
|
|
35
|
+
const delayCompleted = ref(false);
|
|
36
|
+
let timeoutId = 0;
|
|
37
|
+
|
|
38
|
+
if (props.trigger === TRIGGER_INTERSECTION) {
|
|
17
39
|
|
|
18
|
-
|
|
40
|
+
useIntersectionObserver(
|
|
41
|
+
nodeRef,
|
|
42
|
+
(ctx) => inViewport.value = ctx[0].isIntersecting,
|
|
43
|
+
props.intersectionConfig
|
|
44
|
+
);
|
|
19
45
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
46
|
+
watch(
|
|
47
|
+
inViewport,
|
|
48
|
+
() => {
|
|
49
|
+
startTimeout();
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
} else {
|
|
53
|
+
onMounted(() => {
|
|
54
|
+
startTimeout();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
onUnmounted(() => {
|
|
59
|
+
clearTimeout(timeoutId);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
function startTimeout() {
|
|
63
|
+
clearTimeout(timeoutId);
|
|
64
|
+
|
|
65
|
+
delayCompleted.value = false;
|
|
66
|
+
|
|
67
|
+
timeoutId = setTimeout(() => {
|
|
68
|
+
delayCompleted.value = true;
|
|
23
69
|
}, props.delay);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const shouldRender = computed(() => {
|
|
73
|
+
if (props.trigger === TRIGGER_MOUNT) {
|
|
74
|
+
return delayCompleted.value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return inViewport.value && delayCompleted.value;
|
|
24
78
|
});
|
|
25
79
|
|
|
26
80
|
</script>
|