sprintify-ui 0.0.93 → 0.0.95
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 +15422 -6148
- package/dist/style.css +1 -1
- package/dist/types/src/components/BaseActionItem.vue.d.ts +25 -102
- package/dist/types/src/components/BaseApp.vue.d.ts +8 -47
- package/dist/types/src/components/BaseAutocomplete.vue.d.ts +91 -327
- package/dist/types/src/components/BaseAutocompleteFetch.vue.d.ts +85 -290
- package/dist/types/src/components/BaseBadge.vue.d.ts +27 -110
- package/dist/types/src/components/BaseBelongsTo.vue.d.ts +89 -294
- package/dist/types/src/components/BaseButtonGroup.vue.d.ts +71 -254
- package/dist/types/src/components/BaseCard.vue.d.ts +15 -68
- package/dist/types/src/components/BaseClipboard.vue.d.ts +15 -68
- package/dist/types/src/components/BaseColor.vue.d.ts +63 -0
- package/dist/types/src/components/BaseDataIterator.vue.d.ts +82 -258
- package/dist/types/src/components/BaseDataTable.vue.d.ts +158 -509
- package/dist/types/src/components/BaseDescriptionList.vue.d.ts +8 -47
- package/dist/types/src/components/BaseDescriptionListItem.vue.d.ts +9 -48
- package/dist/types/src/components/BaseDialog.vue.d.ts +31 -131
- package/dist/types/src/components/BaseDropdown.vue.d.ts +30 -111
- package/dist/types/src/components/BaseField.vue.d.ts +31 -124
- package/dist/types/src/components/BaseFieldI18n.vue.d.ts +1 -1
- package/dist/types/src/components/BaseFileUploader.vue.d.ts +54 -192
- package/dist/types/src/components/BaseForm.vue.d.ts +62 -226
- package/dist/types/src/components/BaseHasMany.vue.d.ts +66 -219
- package/dist/types/src/components/BaseInput.vue.d.ts +10 -1
- package/dist/types/src/components/BaseInputError.vue.d.ts +8 -47
- package/dist/types/src/components/BaseInputPercent.vue.d.ts +1 -1
- package/dist/types/src/components/BaseLayoutSidebar.vue.d.ts +25 -98
- package/dist/types/src/components/BaseLayoutSidebarConfigurable.vue.d.ts +39 -155
- package/dist/types/src/components/BaseLayoutStacked.vue.d.ts +17 -70
- package/dist/types/src/components/BaseLayoutStackedConfigurable.vue.d.ts +39 -155
- package/dist/types/src/components/BaseLocaleForm.vue.d.ts +1 -1
- package/dist/types/src/components/BaseMediaLibrary.vue.d.ts +63 -234
- package/dist/types/src/components/BaseMenu.vue.d.ts +32 -105
- package/dist/types/src/components/BaseModalCenter.vue.d.ts +42 -132
- package/dist/types/src/components/BaseModalSide.vue.d.ts +29 -118
- package/dist/types/src/components/BaseNavbar.vue.d.ts +24 -87
- package/dist/types/src/components/BaseNavbarSideItem.vue.d.ts +3 -3
- package/dist/types/src/components/BaseRadioGroup.vue.d.ts +53 -194
- package/dist/types/src/components/BaseReadMore.vue.d.ts +15 -68
- package/dist/types/src/components/BaseRichText.vue.d.ts +92 -0
- package/dist/types/src/components/BaseSelect.vue.d.ts +35 -144
- package/dist/types/src/components/BaseSideNavigation.vue.d.ts +8 -47
- package/dist/types/src/components/BaseSideNavigationItem.vue.d.ts +23 -94
- package/dist/types/src/components/BaseSkeleton.vue.d.ts +19 -82
- package/dist/types/src/components/BaseSwitch.vue.d.ts +35 -144
- package/dist/types/src/components/BaseSystemAlert.vue.d.ts +27 -116
- package/dist/types/src/components/BaseTabItem.vue.d.ts +23 -94
- package/dist/types/src/components/BaseTable.vue.d.ts +101 -361
- package/dist/types/src/components/BaseTableColumn.vue.d.ts +1 -1
- package/dist/types/src/components/BaseTabs.vue.d.ts +8 -47
- package/dist/types/src/components/BaseTagAutocomplete.vue.d.ts +66 -236
- package/dist/types/src/components/BaseTagAutocompleteFetch.vue.d.ts +62 -212
- package/dist/types/src/components/index.d.ts +3 -1
- package/dist/types/src/composables/clickOutside.d.ts +8 -0
- package/dist/types/src/composables/modal.d.ts +1 -1
- package/dist/types/src/utils/scrollPreventer.d.ts +1 -2
- package/package.json +5 -1
- package/src/components/BaseAppDialogs.vue +1 -1
- package/src/components/BaseAutocomplete.vue +6 -25
- package/src/components/BaseButtonGroup.vue +2 -2
- package/src/components/BaseColor.stories.js +50 -0
- package/src/components/BaseColor.vue +91 -0
- package/src/components/BaseDropdown.stories.js +47 -9
- package/src/components/BaseDropdown.vue +27 -35
- package/src/components/BaseForm.vue +3 -3
- package/src/components/BaseInput.stories.js +52 -0
- package/src/components/BaseInput.vue +38 -1
- package/src/components/BaseLayoutSidebar.vue +4 -1
- package/src/components/BaseModalCenter.stories.js +5 -0
- package/src/components/BaseModalCenter.vue +14 -10
- package/src/components/BaseModalSide.vue +1 -4
- package/src/components/BaseRichText.stories.js +102 -0
- package/src/components/BaseRichText.vue +121 -0
- package/src/components/BaseSideNavigation.vue +4 -1
- package/src/components/BaseTable.vue +1 -0
- package/src/components/BaseTabs.vue +4 -1
- package/src/components/BaseTagAutocomplete.vue +1 -0
- package/src/components/BaseTextarea.vue +1 -1
- package/src/components/index.ts +4 -0
- package/src/composables/clickOutside.ts +57 -0
- package/src/composables/modal.ts +2 -6
- package/src/utils/scrollPreventer.ts +3 -13
|
@@ -7,9 +7,8 @@
|
|
|
7
7
|
>
|
|
8
8
|
<div v-show="modelValue">
|
|
9
9
|
<div
|
|
10
|
-
|
|
10
|
+
data-scroll-lock-scrollable
|
|
11
11
|
class="fixed inset-0 z-modal w-full overflow-y-auto overflow-x-hidden"
|
|
12
|
-
scroll-lock-target
|
|
13
12
|
>
|
|
14
13
|
<div class="flex min-h-full w-full pt-20 sm:pt-0">
|
|
15
14
|
<div class="min-h-full grow">
|
|
@@ -97,10 +96,8 @@ const props = defineProps({
|
|
|
97
96
|
|
|
98
97
|
const emit = defineEmits(['update:modelValue']);
|
|
99
98
|
|
|
100
|
-
const allow = ref(null);
|
|
101
99
|
const modal = useModal(
|
|
102
100
|
computed(() => props.modelValue),
|
|
103
|
-
allow,
|
|
104
101
|
emit
|
|
105
102
|
);
|
|
106
103
|
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import BaseRichText from './BaseRichText.vue';
|
|
2
|
+
import ShowValue from '@/../.storybook/components/ShowValue.vue';
|
|
3
|
+
import { createFieldStory } from '@/../.storybook/utils';
|
|
4
|
+
|
|
5
|
+
const toolbarOptions = [
|
|
6
|
+
'full',
|
|
7
|
+
'essential',
|
|
8
|
+
'minimal',
|
|
9
|
+
['bold', 'italic', 'underline', 'link'],
|
|
10
|
+
['bold', 'italic', 'underline', 'strike'],
|
|
11
|
+
['blockquote', 'code-block'],
|
|
12
|
+
['clean'], // remove formatting button
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
title: 'Form/BaseRichText',
|
|
17
|
+
component: BaseRichText,
|
|
18
|
+
decorators: [
|
|
19
|
+
(story) => ({
|
|
20
|
+
components: { story },
|
|
21
|
+
template: `
|
|
22
|
+
<form @submit.prevent="" class="border-none">
|
|
23
|
+
<story/>
|
|
24
|
+
</form>`,
|
|
25
|
+
}),
|
|
26
|
+
],
|
|
27
|
+
args: {
|
|
28
|
+
placeholder: 'Describe your complete life in 4 sentences...',
|
|
29
|
+
},
|
|
30
|
+
argTypes: {
|
|
31
|
+
theme: {
|
|
32
|
+
control: { type: 'select' },
|
|
33
|
+
options: ['snow', 'bubble', ''],
|
|
34
|
+
},
|
|
35
|
+
toolbar: {
|
|
36
|
+
control: { type: 'select' },
|
|
37
|
+
options: toolbarOptions,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const Template = (args) => ({
|
|
43
|
+
components: { BaseRichText, ShowValue },
|
|
44
|
+
setup() {
|
|
45
|
+
const value = ref(null);
|
|
46
|
+
return { args, value };
|
|
47
|
+
},
|
|
48
|
+
template: `
|
|
49
|
+
<BaseRichText v-model="value" v-bind="args" class="w-full"></BaseRichText>
|
|
50
|
+
<ShowValue :value="value" />
|
|
51
|
+
`,
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export const Demo = Template.bind({});
|
|
55
|
+
|
|
56
|
+
export const Basic = Template.bind({});
|
|
57
|
+
Basic.args = {
|
|
58
|
+
placeholder: 'Describe your complete life in 4 sentences...',
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const FullToolbar = Template.bind({});
|
|
62
|
+
FullToolbar.args = {
|
|
63
|
+
toolbar: 'full',
|
|
64
|
+
placeholder: 'Describe your complete life in 4 sentences...',
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const EssentialToolbar = Template.bind({});
|
|
68
|
+
EssentialToolbar.args = {
|
|
69
|
+
toolbar: 'essential',
|
|
70
|
+
placeholder: 'Describe your complete life in 4 sentences...',
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export const MinimalToolbar = Template.bind({});
|
|
74
|
+
MinimalToolbar.args = {
|
|
75
|
+
toolbar: 'minimal',
|
|
76
|
+
placeholder: 'Describe your complete life in 4 sentences...',
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const SnowTheme = Template.bind({});
|
|
80
|
+
SnowTheme.args = {
|
|
81
|
+
theme: 'snow',
|
|
82
|
+
placeholder: 'Describe your complete life in 4 sentences...',
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const BubbleTheme = Template.bind({});
|
|
86
|
+
BubbleTheme.args = {
|
|
87
|
+
theme: 'bubble',
|
|
88
|
+
placeholder: 'Describe your complete life in 4 sentences...',
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export const Disabled = Template.bind({});
|
|
92
|
+
Disabled.args = {
|
|
93
|
+
modelValue: 'Lorem ipsum...',
|
|
94
|
+
disabled: true,
|
|
95
|
+
placeholder: '',
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export const Field = createFieldStory({
|
|
99
|
+
component: BaseRichText,
|
|
100
|
+
componentName: 'BaseRichText',
|
|
101
|
+
label: 'Name',
|
|
102
|
+
});
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="base-rich-text relative"
|
|
4
|
+
:class="[hasErrorInternal ? 'error' : '']"
|
|
5
|
+
>
|
|
6
|
+
<quill-editor
|
|
7
|
+
:name="nameInternal"
|
|
8
|
+
:required="requiredInternal"
|
|
9
|
+
:theme="theme"
|
|
10
|
+
:toolbar="toolbar"
|
|
11
|
+
:placeholder="placeholder"
|
|
12
|
+
:content="modelValue"
|
|
13
|
+
:read-only="disabled"
|
|
14
|
+
:enable="enable"
|
|
15
|
+
content-type="html"
|
|
16
|
+
@update:content="emitUpdate(updateChange($event))"
|
|
17
|
+
@ready="onReady"
|
|
18
|
+
>
|
|
19
|
+
</quill-editor>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script lang="ts" setup>
|
|
24
|
+
import { isString, trim } from 'lodash';
|
|
25
|
+
import { PropType } from 'vue';
|
|
26
|
+
import { useField } from '@/composables/field';
|
|
27
|
+
|
|
28
|
+
import { QuillEditor, Quill } from '@vueup/vue-quill';
|
|
29
|
+
import Delta from 'quill-delta';
|
|
30
|
+
import '@vueup/vue-quill/dist/vue-quill.bubble.css';
|
|
31
|
+
import '@vueup/vue-quill/dist/vue-quill.snow.css';
|
|
32
|
+
|
|
33
|
+
const props = defineProps({
|
|
34
|
+
modelValue: {
|
|
35
|
+
default: undefined,
|
|
36
|
+
type: [String, Delta, undefined] as PropType<string | Delta | undefined>,
|
|
37
|
+
},
|
|
38
|
+
theme: {
|
|
39
|
+
type: String as PropType<'' | 'snow' | 'bubble'>,
|
|
40
|
+
default: 'snow',
|
|
41
|
+
},
|
|
42
|
+
toolbar: {
|
|
43
|
+
type: [String, Array] as PropType<string | string[]>,
|
|
44
|
+
default() {
|
|
45
|
+
return ['bold', 'italic', 'underline', 'link'];
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
placeholder: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: '',
|
|
51
|
+
},
|
|
52
|
+
enable: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: true,
|
|
55
|
+
},
|
|
56
|
+
disabled: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false,
|
|
59
|
+
},
|
|
60
|
+
required: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false,
|
|
63
|
+
},
|
|
64
|
+
name: {
|
|
65
|
+
default: undefined,
|
|
66
|
+
type: String,
|
|
67
|
+
},
|
|
68
|
+
hasError: {
|
|
69
|
+
default: false,
|
|
70
|
+
type: Boolean,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const emit = defineEmits(['update:modelValue']);
|
|
75
|
+
|
|
76
|
+
const { nameInternal, requiredInternal, hasErrorInternal, emitUpdate } =
|
|
77
|
+
useField({
|
|
78
|
+
name: computed(() => props.name),
|
|
79
|
+
required: computed(() => props.required),
|
|
80
|
+
hasError: computed(() => props.hasError),
|
|
81
|
+
emit: emit,
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
function updateChange(value: string | null): string | null {
|
|
85
|
+
if (value === null) {
|
|
86
|
+
return '';
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (isString(value)) {
|
|
90
|
+
return trim(value);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return '';
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function onReady(quill: Quill) {
|
|
97
|
+
if (quill.root) {
|
|
98
|
+
//(quill.root as HTMLElement).classList.add('prose', 'max-w-full');
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
</script>
|
|
102
|
+
|
|
103
|
+
<style lang="postcss">
|
|
104
|
+
.base-rich-text {
|
|
105
|
+
.ql-toolbar.ql-snow {
|
|
106
|
+
@apply rounded-t border-slate-300 font-sans;
|
|
107
|
+
}
|
|
108
|
+
.ql-container.ql-snow {
|
|
109
|
+
@apply rounded-b border-slate-300 font-sans;
|
|
110
|
+
}
|
|
111
|
+
.ql-container {
|
|
112
|
+
@apply font-sans;
|
|
113
|
+
}
|
|
114
|
+
&.error {
|
|
115
|
+
& .ql-toolbar.ql-snow,
|
|
116
|
+
& .ql-container.ql-snow {
|
|
117
|
+
@apply border-red-500;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
</style>
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<nav aria-label="Sidebar" class="relative">
|
|
3
3
|
<div class="absolute bottom-0 left-0 h-full w-px bg-slate-300" />
|
|
4
|
-
<div
|
|
4
|
+
<div
|
|
5
|
+
class="relative overflow-x-auto overflow-y-hidden"
|
|
6
|
+
data-scroll-lock-scrollable
|
|
7
|
+
>
|
|
5
8
|
<div class="space-y-2">
|
|
6
9
|
<slot />
|
|
7
10
|
</div>
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="relative">
|
|
3
3
|
<div class="absolute bottom-0 left-0 h-px w-full bg-slate-300" />
|
|
4
|
-
<div
|
|
4
|
+
<div
|
|
5
|
+
class="relative overflow-x-auto overflow-y-hidden"
|
|
6
|
+
data-scroll-lock-scrollable
|
|
7
|
+
>
|
|
5
8
|
<ul class="flex space-x-4 text-center">
|
|
6
9
|
<slot />
|
|
7
10
|
</ul>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
:required="requiredInternal"
|
|
9
9
|
:rows="rows"
|
|
10
10
|
:class="[hasErrorInternal ? 'border-red-500' : 'border-slate-300']"
|
|
11
|
-
class="mb-0
|
|
11
|
+
class="block mb-0 rounded disabled:cursor-not-allowed disabled:text-slate-300"
|
|
12
12
|
@input="emitUpdate(transformInputValue($event))"
|
|
13
13
|
/>
|
|
14
14
|
</template>
|
package/src/components/index.ts
CHANGED
|
@@ -17,6 +17,7 @@ import BaseCard from './BaseCard.vue';
|
|
|
17
17
|
import BaseCardRow from './BaseCardRow.vue';
|
|
18
18
|
import BaseCharacterCounter from './BaseCharacterCounter.vue';
|
|
19
19
|
import BaseClipboard from './BaseClipboard.vue';
|
|
20
|
+
import BaseColor from './BaseColor.vue';
|
|
20
21
|
import BaseContainer from './BaseContainer.vue';
|
|
21
22
|
import BaseCounter from './BaseCounter.vue';
|
|
22
23
|
import BaseDataIterator from './BaseDataIterator.vue';
|
|
@@ -53,6 +54,7 @@ import BasePassword from './BasePassword.vue';
|
|
|
53
54
|
import BaseProgressCircle from './BaseProgressCircle.vue';
|
|
54
55
|
import BaseRadioGroup from './BaseRadioGroup.vue';
|
|
55
56
|
import BaseReadMore from './BaseReadMore.vue';
|
|
57
|
+
import BaseRichText from './BaseRichText.vue';
|
|
56
58
|
import BaseSelect from './BaseSelect.vue';
|
|
57
59
|
import BaseShortcut from './BaseShortcut.vue';
|
|
58
60
|
import BaseSideNavigation from './BaseSideNavigation.vue';
|
|
@@ -97,6 +99,7 @@ export {
|
|
|
97
99
|
BaseCardRow,
|
|
98
100
|
BaseCharacterCounter,
|
|
99
101
|
BaseClipboard,
|
|
102
|
+
BaseColor,
|
|
100
103
|
BaseContainer,
|
|
101
104
|
BaseCounter,
|
|
102
105
|
BaseDataIterator,
|
|
@@ -133,6 +136,7 @@ export {
|
|
|
133
136
|
BaseProgressCircle,
|
|
134
137
|
BaseRadioGroup,
|
|
135
138
|
BaseReadMore,
|
|
139
|
+
BaseRichText,
|
|
136
140
|
BaseSelect,
|
|
137
141
|
BaseShortcut,
|
|
138
142
|
BaseSideNavigation,
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { MaybeElementRef, unrefElement, tryOnScopeDispose } from '@vueuse/core';
|
|
2
|
+
|
|
3
|
+
interface UseClickOutsideOptions {
|
|
4
|
+
includes?: MaybeElementRef[];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function useClickOutside(
|
|
8
|
+
element: MaybeElementRef,
|
|
9
|
+
callback: (outside: boolean) => void,
|
|
10
|
+
options: UseClickOutsideOptions = {}
|
|
11
|
+
) {
|
|
12
|
+
function cleanup() {
|
|
13
|
+
window.removeEventListener('mousedown', onClick);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const stopWatch = watch(
|
|
17
|
+
() => unrefElement(element),
|
|
18
|
+
(el) => {
|
|
19
|
+
if (el) {
|
|
20
|
+
cleanup();
|
|
21
|
+
window.addEventListener('mousedown', onClick);
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{ immediate: true }
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
function onClick(e: Event) {
|
|
28
|
+
const el = unrefElement(element);
|
|
29
|
+
|
|
30
|
+
const includeEls = options.includes?.map(unrefElement) ?? [];
|
|
31
|
+
|
|
32
|
+
if (!el) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const contains = el.contains(e.target as HTMLElement);
|
|
37
|
+
|
|
38
|
+
const includeContainsEl = includeEls.some((exceptionEl) =>
|
|
39
|
+
exceptionEl?.contains(e.target as HTMLElement)
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
const outside = !contains && !includeContainsEl;
|
|
43
|
+
|
|
44
|
+
callback(outside);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const stop = () => {
|
|
48
|
+
cleanup();
|
|
49
|
+
stopWatch();
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
tryOnScopeDispose(stop);
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
stop,
|
|
56
|
+
};
|
|
57
|
+
}
|
package/src/composables/modal.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { disableScroll, enableScroll } from '../utils';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
3
|
|
|
4
|
-
export function useModal(
|
|
5
|
-
modelValue: Ref<boolean>,
|
|
6
|
-
scrollable: Ref<HTMLElement | null>,
|
|
7
|
-
emit: any
|
|
8
|
-
) {
|
|
4
|
+
export function useModal(modelValue: Ref<boolean>, emit: any) {
|
|
9
5
|
const mounted = ref(false);
|
|
10
6
|
|
|
11
7
|
watch(
|
|
@@ -38,7 +34,7 @@ export function useModal(
|
|
|
38
34
|
}
|
|
39
35
|
|
|
40
36
|
function activate() {
|
|
41
|
-
disableScroll(
|
|
37
|
+
disableScroll();
|
|
42
38
|
window.addEventListener('keydown', onKeydown);
|
|
43
39
|
}
|
|
44
40
|
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
disablePageScroll,
|
|
3
|
-
clearQueueScrollLocks,
|
|
4
|
-
enablePageScroll,
|
|
5
|
-
ScrollableTarget,
|
|
6
|
-
} from 'scroll-lock';
|
|
1
|
+
import { disablePageScroll, enablePageScroll } from 'scroll-lock';
|
|
7
2
|
|
|
8
|
-
function disableScroll(
|
|
9
|
-
|
|
10
|
-
allow = document.querySelectorAll('[scroll-lock-target]');
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
disablePageScroll(allow);
|
|
3
|
+
function disableScroll() {
|
|
4
|
+
disablePageScroll();
|
|
14
5
|
}
|
|
15
6
|
|
|
16
7
|
function enableScroll() {
|
|
17
|
-
clearQueueScrollLocks();
|
|
18
8
|
enablePageScroll();
|
|
19
9
|
}
|
|
20
10
|
|