@myissue/vue-website-page-builder 3.2.86 → 3.2.91
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 +46 -3
- package/dist/vue-website-page-builder.css +1 -1
- package/dist/vue-website-page-builder.js +9217 -9022
- package/dist/vue-website-page-builder.umd.cjs +38 -38
- package/package.json +2 -2
- package/src/Components/Homepage/Footer.vue +9 -7
- package/src/Components/Homepage/Navbar.vue +6 -4
- package/src/Components/Layouts/FullWidthElement.vue +6 -6
- package/src/Components/Modals/BuilderComponents.vue +12 -6
- package/src/Components/Modals/DynamicModalBuilder.vue +39 -47
- package/src/Components/Modals/MediaLibraryModal.vue +2 -2
- package/src/Components/Modals/ModalBuilder.vue +23 -19
- package/src/Components/PageBuilder/DefaultComponents/DefaultBuilderComponents.vue +29 -17
- package/src/Components/PageBuilder/DefaultComponents/DefaultMediaLibraryComponent.vue +2 -2
- package/src/Components/PageBuilder/EditorMenu/Editables/BackgroundColorEditor.vue +22 -20
- package/src/Components/PageBuilder/EditorMenu/Editables/BorderRadius.vue +17 -17
- package/src/Components/PageBuilder/EditorMenu/Editables/Borders.vue +28 -26
- package/src/Components/PageBuilder/EditorMenu/Editables/ClassEditor.vue +13 -11
- package/src/Components/PageBuilder/EditorMenu/Editables/ComponentTopMenu.vue +5 -5
- package/src/Components/PageBuilder/EditorMenu/Editables/DeleteElement.vue +4 -4
- package/src/Components/PageBuilder/EditorMenu/Editables/EditGetElement.vue +22 -19
- package/src/Components/PageBuilder/EditorMenu/Editables/ElementEditor.vue +11 -11
- package/src/Components/PageBuilder/EditorMenu/Editables/ImageEditor.vue +4 -4
- package/src/Components/PageBuilder/EditorMenu/Editables/LinkEditor.vue +74 -66
- package/src/Components/PageBuilder/EditorMenu/Editables/ManageBackgroundOpacity.vue +26 -21
- package/src/Components/PageBuilder/EditorMenu/Editables/ManageOpacity.vue +26 -21
- package/src/Components/PageBuilder/EditorMenu/Editables/Margin.vue +101 -0
- package/src/Components/PageBuilder/EditorMenu/Editables/OpacityEditor.vue +2 -3
- package/src/Components/PageBuilder/EditorMenu/Editables/{PaddingPlusMargin.vue → Padding.vue} +8 -41
- package/src/Components/PageBuilder/EditorMenu/Editables/TextColorEditor.vue +22 -20
- package/src/Components/PageBuilder/EditorMenu/Editables/Typography.vue +63 -58
- package/src/Components/PageBuilder/EditorMenu/EditorAccordion.vue +7 -4
- package/src/Components/PageBuilder/EditorMenu/RightSidebarEditor.vue +24 -19
- package/src/Components/PageBuilder/Settings/AdvancedPageBuilderSettings.vue +132 -98
- package/src/Components/PageBuilder/Settings/PageBuilderSettings.vue +216 -146
- package/src/Components/PageBuilder/ToolbarOption/ToolbarOption.vue +14 -14
- package/src/Components/TipTap/TipTap.vue +4 -4
- package/src/Components/TipTap/TipTapInput.vue +39 -33
- package/src/DemoComponents/DemoBuilderComponents.vue +1 -1
- package/src/DemoComponents/DemoUnsplash.vue +79 -56
- package/src/DemoComponents/HomeSection.vue +20 -16
- package/src/DemoComponents/html.json +4 -4
- package/src/PageBuilder/PageBuilder.vue +62 -57
- package/src/PageBuilder/Preview.vue +4 -20
- package/src/composables/PageBuilderClass.ts +66 -120
- package/src/css/app.css +161 -448
- package/src/css/dev-global.css +137 -0
- package/src/main.ts +1 -0
- package/src/tailwind-safelist.html +1 -1
- package/src/utils/builder/tailwaind-colors.ts +488 -488
- package/src/utils/builder/tailwind-border-radius.ts +40 -40
- package/src/utils/builder/tailwind-border-style-width-color.ts +231 -231
- package/src/utils/builder/tailwind-font-sizes.ts +56 -57
- package/src/utils/builder/tailwind-font-styles.ts +44 -11
- package/src/utils/builder/tailwind-opacities.ts +30 -30
- package/src/utils/builder/tailwind-padding-margin.ts +136 -136
- package/dist/components.json +0 -36
- package/src/Components/Loaders/FullScreenSpinner.vue +0 -9
- package/src/Components/Loaders/SmallUniversalSpinner.vue +0 -26
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myissue/vue-website-page-builder",
|
|
3
|
-
"version": "v3.2.
|
|
3
|
+
"version": "v3.2.91",
|
|
4
4
|
"description": "Vue 3 page builder component with drag & drop functionality.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/vue-website-page-builder.umd.cjs",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"npm-run-all2": "^7.0.2",
|
|
99
99
|
"postcss": "^8.4.39",
|
|
100
100
|
"prettier": "3.5.3",
|
|
101
|
-
"tailwindcss": "^3.4.
|
|
101
|
+
"tailwindcss": "^3.4.17",
|
|
102
102
|
"typescript": "~5.8.0",
|
|
103
103
|
"vite": "^6.2.4",
|
|
104
104
|
"vite-plugin-vue-devtools": "^7.7.2",
|
|
@@ -3,29 +3,31 @@ const version = __APP_VERSION__
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<template>
|
|
6
|
-
<div
|
|
6
|
+
<div
|
|
7
|
+
class="pbx-flex pbx-justify-between pbx-gap-2 pbx-bg-red-100 pbx-py-10 lg:pbx-px-12 pbx-px-4"
|
|
8
|
+
>
|
|
7
9
|
<div>
|
|
8
|
-
<p class="myPrimaryParagraph">
|
|
10
|
+
<p class="pbx-myPrimaryParagraph">
|
|
9
11
|
<a
|
|
10
12
|
href="https://www.npmjs.com/package/@myissue/vue-website-page-builder"
|
|
11
13
|
target="_blank"
|
|
12
|
-
class="myPrimaryLink text-myPrimaryDarkGrayColor"
|
|
14
|
+
class="pbx-myPrimaryLink pbx-text-myPrimaryDarkGrayColor"
|
|
13
15
|
>
|
|
14
16
|
Install via npm
|
|
15
17
|
</a>
|
|
16
18
|
</p>
|
|
17
|
-
<p class="myPrimaryParagraph mt-3">
|
|
19
|
+
<p class="pbx-myPrimaryParagraph pbx-mt-3">
|
|
18
20
|
<a
|
|
19
21
|
href="https://github.com/qaiswardag/vue-website-page-builder"
|
|
20
22
|
target="_blank"
|
|
21
|
-
class="myPrimaryLink text-myPrimaryDarkGrayColor"
|
|
23
|
+
class="pbx-myPrimaryLink pbx-text-myPrimaryDarkGrayColor"
|
|
22
24
|
>
|
|
23
25
|
View on GitHub
|
|
24
26
|
</a>
|
|
25
27
|
</p>
|
|
26
28
|
</div>
|
|
27
|
-
<p class="myPrimaryParagraph mt-3">
|
|
28
|
-
<span class="text-myPrimaryDarkGrayColor text-sm">{{ version }}</span>
|
|
29
|
+
<p class="pbx-myPrimaryParagraph pbx-mt-3">
|
|
30
|
+
<span class="pbx-text-myPrimaryDarkGrayColor pbx-text-sm">{{ version }}</span>
|
|
29
31
|
</p>
|
|
30
32
|
</div>
|
|
31
33
|
</template>
|
|
@@ -9,13 +9,15 @@ const handleButton = function () {
|
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
11
|
<nav
|
|
12
|
-
class="px-6 py-6 mx-auto flex items-center justify-between bg-gray-50 lg:h-[10vh] h-[10vh]"
|
|
12
|
+
class="pbx-px-6 pbx-py-6 pbx-mx-auto pbx-flex pbx-items-center pbx-justify-between pbx-bg-gray-50 lg:pbx-h-[10vh] pbx-h-[10vh]"
|
|
13
13
|
aria-label="Global"
|
|
14
14
|
>
|
|
15
|
-
<img class="h-6" src="/logo/logo.svg" alt="Logo" />
|
|
15
|
+
<img class="pbx-h-6" src="/logo/logo.svg" alt="Logo" />
|
|
16
16
|
|
|
17
|
-
<div class="flex lg:gap-x-12 myPrimaryGap">
|
|
18
|
-
<div
|
|
17
|
+
<div class="pbx-flex lg:pbx-gap-x-12 pbx-myPrimaryGap">
|
|
18
|
+
<div
|
|
19
|
+
class="pbx-text-lg pbx-font-medium pbx-text-myPrimaryDarkGrayColor pbx-flex pbx-gap-2 pbx-items-center"
|
|
20
|
+
>
|
|
19
21
|
Page Builder
|
|
20
22
|
</div>
|
|
21
23
|
</div>
|
|
@@ -9,25 +9,25 @@ defineProps({
|
|
|
9
9
|
Type: Boolean,
|
|
10
10
|
default: true,
|
|
11
11
|
},
|
|
12
|
-
})
|
|
12
|
+
})
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<template>
|
|
16
16
|
<!-- chimp start -->
|
|
17
|
-
<div class="myPrimaryWidthScreenModule">
|
|
17
|
+
<div class="pbx-myPrimaryWidthScreenModule">
|
|
18
18
|
<template v-if="headerArea">
|
|
19
|
-
<div class="myPrimaryContentSection">
|
|
20
|
-
<h2 class="mySecondaryHeader">
|
|
19
|
+
<div class="pbx-myPrimaryContentSection">
|
|
20
|
+
<h2 class="pbx-mySecondaryHeader">
|
|
21
21
|
<slot name="title" />
|
|
22
22
|
</h2>
|
|
23
23
|
<template v-if="descriptionArea === true">
|
|
24
|
-
<p class="myPrimaryParagraph font-normal">
|
|
24
|
+
<p class="pbx-myPrimaryParagraph pbx-font-normal">
|
|
25
25
|
<slot name="description" />
|
|
26
26
|
</p>
|
|
27
27
|
</template>
|
|
28
28
|
</div>
|
|
29
29
|
</template>
|
|
30
|
-
<div class="myPrimaryContentSection">
|
|
30
|
+
<div class="pbx-myPrimaryContentSection">
|
|
31
31
|
<slot name="content" />
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import ModalBuilder from '../Modals/ModalBuilder.vue'
|
|
3
3
|
import DefaultBuilderComponents from '../PageBuilder/DefaultComponents/DefaultBuilderComponents.vue'
|
|
4
|
+
import { inject } from 'vue'
|
|
5
|
+
const customMediaComponent = inject('CustomMediaComponent')
|
|
4
6
|
|
|
5
7
|
defineProps({
|
|
6
8
|
firstButtonText: {
|
|
@@ -30,27 +32,31 @@ const firstButtonBuilder = function () {
|
|
|
30
32
|
<template>
|
|
31
33
|
<ModalBuilder
|
|
32
34
|
:title="title"
|
|
33
|
-
maxWidth="
|
|
35
|
+
maxWidth="6xl"
|
|
34
36
|
:showModalBuilder="show"
|
|
35
37
|
@closeMainModalBuilder="firstButtonBuilder"
|
|
36
38
|
minHeight=""
|
|
37
39
|
maxHeight=""
|
|
38
40
|
>
|
|
39
|
-
<div class="w-full inset-x-0 bg-white overflow-x-scroll lg:pt-2 pt-2">
|
|
41
|
+
<div class="pbx-w-full pbx-inset-x-0 pbx-bg-white pbx-overflow-x-scroll lg:pbx-pt-2 pbx-pt-2">
|
|
40
42
|
<div>
|
|
41
43
|
<!-- Only show custom search component if provided -->
|
|
42
44
|
<div v-if="CustomBuilderComponents">
|
|
43
45
|
<component :is="CustomBuilderComponents" />
|
|
44
46
|
</div>
|
|
45
|
-
<div class="h-[75vh]" v-else
|
|
47
|
+
<div class="pbx-h-[75vh]" v-else>
|
|
48
|
+
<DefaultBuilderComponents :customMediaComponent="customMediaComponent" />
|
|
49
|
+
</div>
|
|
46
50
|
</div>
|
|
47
51
|
</div>
|
|
48
|
-
<div
|
|
49
|
-
|
|
52
|
+
<div
|
|
53
|
+
class="pbx-py-4 pbx-flex sm:pbx-justify-end pbx-justify-center pbx-border-t pbx-border-gray-200 pbx-mt-4"
|
|
54
|
+
>
|
|
55
|
+
<div class="sm:pbx-w-3/6 pbx-w-full pbx-px-2 pbx-my-2 pbx-flex pbx-gap-2 pbx-justify-end">
|
|
50
56
|
<button
|
|
51
57
|
v-if="firstButtonText"
|
|
52
58
|
ref="firstButtonRef"
|
|
53
|
-
class="mySecondaryButton"
|
|
59
|
+
class="pbx-mySecondaryButton"
|
|
54
60
|
type="button"
|
|
55
61
|
@click="firstButtonBuilder"
|
|
56
62
|
>
|
|
@@ -89,11 +89,11 @@ const thirdButtonBuilder = function () {
|
|
|
89
89
|
<slot name="content" />
|
|
90
90
|
|
|
91
91
|
<div
|
|
92
|
-
class="font-sans w-full relative inline-block align-bottom text-left overflow-hidden transform transition-all sm:align-middle"
|
|
92
|
+
class="pbx-font-sans pbx-w-full pbx-relative pbx-inline-block pbx-align-bottom pbx-text-left pbx-overflow-hidden pbx-transform pbx-transition-all sm:pbx-align-middle"
|
|
93
93
|
>
|
|
94
|
-
<div :class="{ 'pr-4 pb-4': simpleModal !== true }">
|
|
94
|
+
<div :class="{ 'pbx-pr-4 pbx-pb-4': simpleModal !== true }">
|
|
95
95
|
<template v-if="simpleModal !== true">
|
|
96
|
-
<div v-html="description" class="myPrimaryParagraph mb-6"></div>
|
|
96
|
+
<div v-html="description" class="pbx-myPrimaryParagraph pbx-mb-6"></div>
|
|
97
97
|
</template>
|
|
98
98
|
|
|
99
99
|
<slot name="header"></slot>
|
|
@@ -103,20 +103,22 @@ const thirdButtonBuilder = function () {
|
|
|
103
103
|
</div>
|
|
104
104
|
|
|
105
105
|
<template v-if="simpleModal !== true && !isLoading">
|
|
106
|
-
<div
|
|
106
|
+
<div
|
|
107
|
+
class="pbx-py-4 pbx-flex sm:pbx-justify-end pbx-justify-center pbx-border-t pbx-border-gray-200 pbx-mt-4"
|
|
108
|
+
>
|
|
107
109
|
<slot name="footer" />
|
|
108
110
|
<div
|
|
109
111
|
:class="{
|
|
110
|
-
'sm:grid-cols-1': gridColumnAmount === 1,
|
|
111
|
-
'sm:grid-cols-2': gridColumnAmount === 2,
|
|
112
|
-
'sm:grid-cols-3': gridColumnAmount === 3,
|
|
112
|
+
'sm:pbx-grid-cols-1': gridColumnAmount === 1,
|
|
113
|
+
'sm:pbx-grid-cols-2': gridColumnAmount === 2,
|
|
114
|
+
'sm:pbx-grid-cols-3': gridColumnAmount === 3,
|
|
113
115
|
}"
|
|
114
|
-
class="sm:items-end sm:justify-end flex sm:flex-row flex-col myPrimaryGap sm:w-5/6 w-full"
|
|
116
|
+
class="sm:pbx-items-end sm:pbx-justify-end pbx-flex sm:pbx-flex-row pbx-flex-col pbx-myPrimaryGap sm:pbx-w-5/6 pbx-w-full"
|
|
115
117
|
>
|
|
116
118
|
<button
|
|
117
119
|
v-if="firstButtonText"
|
|
118
120
|
ref="firstButtonRef"
|
|
119
|
-
class="mySecondaryButton"
|
|
121
|
+
class="pbx-mySecondaryButton"
|
|
120
122
|
type="button"
|
|
121
123
|
@click="firstButtonBuilder"
|
|
122
124
|
>
|
|
@@ -126,20 +128,18 @@ const thirdButtonBuilder = function () {
|
|
|
126
128
|
<div v-if="secondButtonText">
|
|
127
129
|
<div v-if="disabled && disabledWhichButton === 'secondButtonBuilder'">
|
|
128
130
|
<button
|
|
129
|
-
class="flex items-center gap-2 myPrimaryButton bg-yellow-300 hover:bg-yellow-400 text-myPrimaryDarkGrayColor hover:text-myPrimaryDarkGrayColor focus:ring-yellow-400 w-full"
|
|
130
|
-
:class="{
|
|
131
|
-
'opacity-25 cursor-default': disabled,
|
|
132
|
-
}"
|
|
131
|
+
class="pbx-flex pbx-items-center pbx-gap-2 pbx-myPrimaryButton pbx-bg-yellow-300 hover:pbx-bg-yellow-400 pbx-text-myPrimaryDarkGrayColor hover:pbx-text-myPrimaryDarkGrayColor focus:pbx-ring-yellow-400 pbx-w-full"
|
|
132
|
+
:class="{ 'pbx-opacity-25 pbx-cursor-default': disabled }"
|
|
133
133
|
:disabled="disabled"
|
|
134
134
|
type="button"
|
|
135
135
|
@click="secondButtonBuilder"
|
|
136
136
|
>
|
|
137
137
|
<div>
|
|
138
138
|
<Transition name="bounce">
|
|
139
|
-
<div role="status" class="flex items-center">
|
|
139
|
+
<div role="status" class="pbx-flex pbx-items-center">
|
|
140
140
|
<svg
|
|
141
141
|
aria-hidden="true"
|
|
142
|
-
class="w-4 h-4 animate-spin text-white-600 fill-gray-800 flex items-center"
|
|
142
|
+
class="pbx-w-4 pbx-h-4 pbx-animate-spin pbx-text-white-600 pbx-fill-gray-800 pbx-flex pbx-items-center"
|
|
143
143
|
stroke-width="1.5"
|
|
144
144
|
viewBox="0 0 100 101"
|
|
145
145
|
fill="none"
|
|
@@ -163,7 +163,7 @@ const thirdButtonBuilder = function () {
|
|
|
163
163
|
|
|
164
164
|
<div v-if="!disabled || disabledWhichButton !== 'secondButtonBuilder'">
|
|
165
165
|
<button
|
|
166
|
-
class="myPrimaryButton bg-yellow-300 hover:bg-yellow-400 text-myPrimaryDarkGrayColor hover:text-myPrimaryDarkGrayColor focus:ring-yellow-400 w-full"
|
|
166
|
+
class="pbx-myPrimaryButton pbx-bg-yellow-300 hover:pbx-bg-yellow-400 pbx-text-myPrimaryDarkGrayColor hover:pbx-text-myPrimaryDarkGrayColor focus:pbx-ring-yellow-400 pbx-w-full"
|
|
167
167
|
type="button"
|
|
168
168
|
@click="secondButtonBuilder"
|
|
169
169
|
>
|
|
@@ -176,19 +176,17 @@ const thirdButtonBuilder = function () {
|
|
|
176
176
|
<div v-if="type === 'default'">
|
|
177
177
|
<div v-if="disabled && disabledWhichButton === 'thirdButtonBuilder'">
|
|
178
178
|
<button
|
|
179
|
-
class="flex items-center gap-2 myPrimaryButton bg-myPrimaryLinkColor focus-visible:ring-myPrimaryLinkColor focus:ring-myPrimaryLinkColor hover:bg-myPrimaryLinkColor w-full"
|
|
180
|
-
:class="{
|
|
181
|
-
'opacity-25 cursor-default': disabled,
|
|
182
|
-
}"
|
|
179
|
+
class="pbx-flex pbx-items-center pbx-gap-2 pbx-myPrimaryButton pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-myPrimaryLinkColor focus:pbx-ring-myPrimaryLinkColor hover:pbx-bg-myPrimaryLinkColor pbx-w-full"
|
|
180
|
+
:class="{ 'pbx-opacity-25 pbx-cursor-default': disabled }"
|
|
183
181
|
:disabled="disabled"
|
|
184
182
|
type="button"
|
|
185
183
|
>
|
|
186
184
|
<div>
|
|
187
185
|
<Transition name="bounce">
|
|
188
|
-
<div role="status" class="flex items-center">
|
|
186
|
+
<div role="status" class="pbx-flex pbx-items-center">
|
|
189
187
|
<svg
|
|
190
188
|
aria-hidden="true"
|
|
191
|
-
class="w-4 h-4 animate-spin text-white-600 fill-gray-800 flex items-center"
|
|
189
|
+
class="pbx-w-4 pbx-h-4 pbx-animate-spin pbx-text-white-600 pbx-fill-gray-800 pbx-flex pbx-items-center"
|
|
192
190
|
stroke-width="1.5"
|
|
193
191
|
viewBox="0 0 100 101"
|
|
194
192
|
fill="none"
|
|
@@ -212,7 +210,7 @@ const thirdButtonBuilder = function () {
|
|
|
212
210
|
|
|
213
211
|
<div v-if="!disabled || disabledWhichButton !== 'thirdButtonBuilder'">
|
|
214
212
|
<button
|
|
215
|
-
class="myPrimaryButton bg-myPrimaryLinkColor focus-visible:ring-myPrimaryLinkColor focus:ring-myPrimaryLinkColor hover:bg-myPrimaryLinkColor w-full"
|
|
213
|
+
class="pbx-myPrimaryButton pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-myPrimaryLinkColor focus:pbx-ring-myPrimaryLinkColor hover:pbx-bg-myPrimaryLinkColor pbx-w-full"
|
|
216
214
|
type="button"
|
|
217
215
|
@click="thirdButtonBuilder"
|
|
218
216
|
>
|
|
@@ -223,19 +221,17 @@ const thirdButtonBuilder = function () {
|
|
|
223
221
|
<div v-if="type === 'success'">
|
|
224
222
|
<div v-if="disabled && disabledWhichButton === 'thirdButtonBuilder'">
|
|
225
223
|
<button
|
|
226
|
-
class="flex items-center gap-2 myPrimaryButton bg-myPrimaryLinkColor focus-visible:ring-myPrimaryLinkColor focus:ring-myPrimaryLinkColor hover:bg-myPrimaryLinkColor w-full"
|
|
227
|
-
:class="{
|
|
228
|
-
'opacity-25 cursor-default': disabled,
|
|
229
|
-
}"
|
|
224
|
+
class="pbx-flex pbx-items-center pbx-gap-2 pbx-myPrimaryButton pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-myPrimaryLinkColor focus:pbx-ring-myPrimaryLinkColor hover:pbx-bg-myPrimaryLinkColor pbx-w-full"
|
|
225
|
+
:class="{ 'pbx-opacity-25 pbx-cursor-default': disabled }"
|
|
230
226
|
:disabled="disabled"
|
|
231
227
|
type="button"
|
|
232
228
|
>
|
|
233
229
|
<div>
|
|
234
230
|
<Transition name="bounce">
|
|
235
|
-
<div role="status" class="flex items-center">
|
|
231
|
+
<div role="status" class="pbx-flex pbx-items-center">
|
|
236
232
|
<svg
|
|
237
233
|
aria-hidden="true"
|
|
238
|
-
class="w-4 h-4 animate-spin text-white-600 fill-gray-800 flex items-center"
|
|
234
|
+
class="pbx-w-4 pbx-h-4 pbx-animate-spin pbx-text-white-600 pbx-fill-gray-800 pbx-flex pbx-items-center"
|
|
239
235
|
stroke-width="1.5"
|
|
240
236
|
viewBox="0 0 100 101"
|
|
241
237
|
fill="none"
|
|
@@ -259,7 +255,7 @@ const thirdButtonBuilder = function () {
|
|
|
259
255
|
|
|
260
256
|
<div v-if="!disabled || disabledWhichButton !== 'thirdButtonBuilder'">
|
|
261
257
|
<button
|
|
262
|
-
class="myPrimaryButton bg-myPrimaryLinkColor focus-visible:ring-myPrimaryLinkColor focus:ring-myPrimaryLinkColor hover:bg-myPrimaryLinkColor w-full"
|
|
258
|
+
class="pbx-myPrimaryButton pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-myPrimaryLinkColor focus:pbx-ring-myPrimaryLinkColor hover:pbx-bg-myPrimaryLinkColor pbx-w-full"
|
|
263
259
|
type="button"
|
|
264
260
|
@click="thirdButtonBuilder"
|
|
265
261
|
>
|
|
@@ -271,19 +267,17 @@ const thirdButtonBuilder = function () {
|
|
|
271
267
|
<div v-if="type === 'warning'">
|
|
272
268
|
<div v-if="disabled && disabledWhichButton === 'thirdButtonBuilder'">
|
|
273
269
|
<button
|
|
274
|
-
class="flex items-center gap-2 myPrimaryButton bg-myPrimaryLinkColor focus-visible:ring-myPrimaryLinkColor focus:ring-myPrimaryLinkColor hover:bg-myPrimaryLinkColor w-full"
|
|
275
|
-
:class="{
|
|
276
|
-
'opacity-25 cursor-default': disabled,
|
|
277
|
-
}"
|
|
270
|
+
class="pbx-flex pbx-items-center pbx-gap-2 pbx-myPrimaryButton pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-myPrimaryLinkColor focus:pbx-ring-myPrimaryLinkColor hover:pbx-bg-myPrimaryLinkColor pbx-w-full"
|
|
271
|
+
:class="{ 'pbx-opacity-25 pbx-cursor-default': disabled }"
|
|
278
272
|
:disabled="disabled"
|
|
279
273
|
type="button"
|
|
280
274
|
>
|
|
281
275
|
<div>
|
|
282
276
|
<Transition name="bounce">
|
|
283
|
-
<div role="status" class="flex items-center">
|
|
277
|
+
<div role="status" class="pbx-flex pbx-items-center">
|
|
284
278
|
<svg
|
|
285
279
|
aria-hidden="true"
|
|
286
|
-
class="w-4 h-4 animate-spin text-white-600 fill-gray-800 flex items-center"
|
|
280
|
+
class="pbx-w-4 pbx-h-4 pbx-animate-spin pbx-text-white-600 pbx-fill-gray-800 pbx-flex pbx-items-center"
|
|
287
281
|
stroke-width="1.5"
|
|
288
282
|
viewBox="0 0 100 101"
|
|
289
283
|
fill="none"
|
|
@@ -307,7 +301,7 @@ const thirdButtonBuilder = function () {
|
|
|
307
301
|
|
|
308
302
|
<div v-if="!disabled || disabledWhichButton !== 'thirdButtonBuilder'">
|
|
309
303
|
<button
|
|
310
|
-
class="flex items-center gap-2 myPrimaryButton bg-myPrimaryErrorColor hover:bg-red-600 text-white focus:ring-myPrimaryErrorColor w-full"
|
|
304
|
+
class="pbx-flex pbx-items-center pbx-gap-2 pbx-myPrimaryButton pbx-bg-myPrimaryErrorColor hover:pbx-bg-red-600 pbx-text-white focus:pbx-ring-myPrimaryErrorColor pbx-w-full"
|
|
311
305
|
type="button"
|
|
312
306
|
@click="thirdButtonBuilder"
|
|
313
307
|
>
|
|
@@ -319,19 +313,17 @@ const thirdButtonBuilder = function () {
|
|
|
319
313
|
<div v-if="type === 'danger' || type === 'delete'">
|
|
320
314
|
<div v-if="disabled && disabledWhichButton === 'thirdButtonBuilder'">
|
|
321
315
|
<button
|
|
322
|
-
class="flex items-center gap-2 myPrimaryButton bg-myPrimaryErrorColor hover:bg-red-600 text-white focus:ring-myPrimaryErrorColor w-full"
|
|
323
|
-
:class="{
|
|
324
|
-
'opacity-25 cursor-default': disabled,
|
|
325
|
-
}"
|
|
316
|
+
class="pbx-flex pbx-items-center pbx-gap-2 pbx-myPrimaryButton pbx-bg-myPrimaryErrorColor hover:pbx-bg-red-600 pbx-text-white focus:pbx-ring-myPrimaryErrorColor pbx-w-full"
|
|
317
|
+
:class="{ 'pbx-opacity-25 pbx-cursor-default': disabled }"
|
|
326
318
|
:disabled="disabled"
|
|
327
319
|
type="button"
|
|
328
320
|
>
|
|
329
321
|
<div>
|
|
330
322
|
<Transition name="bounce">
|
|
331
|
-
<div role="status" class="flex items-center">
|
|
323
|
+
<div role="status" class="pbx-flex pbx-items-center">
|
|
332
324
|
<svg
|
|
333
325
|
aria-hidden="true"
|
|
334
|
-
class="w-4 h-4 animate-spin text-white-600 fill-gray-800 flex items-center"
|
|
326
|
+
class="pbx-w-4 pbx-h-4 pbx-animate-spin pbx-text-white-600 pbx-fill-gray-800 pbx-flex pbx-items-center"
|
|
335
327
|
stroke-width="1.5"
|
|
336
328
|
viewBox="0 0 100 101"
|
|
337
329
|
fill="none"
|
|
@@ -355,7 +347,7 @@ const thirdButtonBuilder = function () {
|
|
|
355
347
|
|
|
356
348
|
<div v-if="!disabled || disabledWhichButton !== 'thirdButtonBuilder'">
|
|
357
349
|
<button
|
|
358
|
-
class="flex items-center gap-2 myPrimaryButton bg-myPrimaryErrorColor hover:bg-red-600 text-white focus:ring-myPrimaryErrorColor w-full"
|
|
350
|
+
class="pbx-flex pbx-items-center pbx-gap-2 pbx-myPrimaryButton pbx-bg-myPrimaryErrorColor hover:pbx-bg-red-600 pbx-text-white focus:pbx-ring-myPrimaryErrorColor pbx-w-full"
|
|
359
351
|
type="button"
|
|
360
352
|
@click="thirdButtonBuilder"
|
|
361
353
|
>
|
|
@@ -368,12 +360,12 @@ const thirdButtonBuilder = function () {
|
|
|
368
360
|
</div>
|
|
369
361
|
</template>
|
|
370
362
|
<template v-if="isLoading">
|
|
371
|
-
<div class="flex items-center my-2 py-4 px-2 justify-end">
|
|
363
|
+
<div class="pbx-flex pbx-items-center pbx-my-2 pbx-py-4 pbx-px-2 pbx-justify-end">
|
|
372
364
|
<div
|
|
373
|
-
class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"
|
|
365
|
+
class="pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"
|
|
374
366
|
>
|
|
375
367
|
<span
|
|
376
|
-
class="!absolute
|
|
368
|
+
class="!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"
|
|
377
369
|
>Loading...</span
|
|
378
370
|
>
|
|
379
371
|
</div>
|
|
@@ -48,10 +48,10 @@ provide('closeMediaLibraryModal', closeMediaLibraryModal)
|
|
|
48
48
|
:title="title"
|
|
49
49
|
:showModalBuilder="open"
|
|
50
50
|
@closeMainModalBuilder="firstButton"
|
|
51
|
-
maxWidth="
|
|
51
|
+
maxWidth="6xl"
|
|
52
52
|
>
|
|
53
53
|
<!-- Show only custom media component if provided -->
|
|
54
|
-
<div v-if="customMediaComponent" class="w-full">
|
|
54
|
+
<div v-if="customMediaComponent" class="pbx-w-full">
|
|
55
55
|
<component :is="customMediaComponent" />
|
|
56
56
|
</div>
|
|
57
57
|
<div v-else>
|
|
@@ -30,37 +30,41 @@ const handleClose = () => {
|
|
|
30
30
|
|
|
31
31
|
const maxWidthClass = computed(() => {
|
|
32
32
|
return {
|
|
33
|
-
sm: 'lg:max-w-sm',
|
|
34
|
-
md: 'lg:max-w-md',
|
|
35
|
-
lg: 'lg:max-w-lg',
|
|
36
|
-
xl: 'lg:max-w-xl',
|
|
37
|
-
'2xl': 'lg:max-w-2xl',
|
|
38
|
-
'3xl': 'lg:max-w-3xl',
|
|
39
|
-
'4xl': 'lg:max-w-4xl',
|
|
40
|
-
'5xl': 'lg:max-w-5xl',
|
|
41
|
-
'6xl': 'lg:max-w-6xl',
|
|
42
|
-
'7xl': 'lg:max-w-7xl',
|
|
43
|
-
full: 'lg:max-w-full', // 100% width
|
|
44
|
-
screen: 'lg:w-screen sm:max-w-none', // truly full screen
|
|
33
|
+
sm: 'lg:pbx-max-w-sm',
|
|
34
|
+
md: 'lg:pbx-max-w-md',
|
|
35
|
+
lg: 'lg:pbx-max-w-lg',
|
|
36
|
+
xl: 'lg:pbx-max-w-xl',
|
|
37
|
+
'2xl': 'lg:pbx-max-w-2xl',
|
|
38
|
+
'3xl': 'lg:pbx-max-w-3xl',
|
|
39
|
+
'4xl': 'lg:pbx-max-w-4xl',
|
|
40
|
+
'5xl': 'lg:pbx-max-w-5xl',
|
|
41
|
+
'6xl': 'lg:pbx-max-w-6xl',
|
|
42
|
+
'7xl': 'lg:pbx-max-w-7xl',
|
|
43
|
+
full: 'lg:pbx-max-w-full', // 100% width
|
|
44
|
+
screen: 'lg:w-screen sm:pbx-max-w-none', // truly full screen
|
|
45
45
|
}[props.maxWidth]
|
|
46
46
|
})
|
|
47
47
|
</script>
|
|
48
48
|
|
|
49
49
|
<template>
|
|
50
50
|
<teleport to="body">
|
|
51
|
-
<div class="font-sans">
|
|
51
|
+
<div class="pbx-font-sans">
|
|
52
52
|
<!-- Modal -->
|
|
53
53
|
<div
|
|
54
54
|
v-if="showModalBuilder"
|
|
55
|
-
class="fixed inset-0 z-40 flex items-center justify-center mx-4"
|
|
55
|
+
class="pbx-fixed pbx-inset-0 pbx-z-40 pbx-flex pbx-items-center pbx-justify-center pbx-mx-4"
|
|
56
56
|
role="dialog"
|
|
57
57
|
aria-modal="true"
|
|
58
58
|
aria-labelledby="dialog-title"
|
|
59
59
|
>
|
|
60
60
|
<!-- Backdrop -->
|
|
61
|
-
<div class="fixed inset-0 bg-black/50 transition-opacity" @click="handleClose"></div>
|
|
62
61
|
<div
|
|
63
|
-
class="
|
|
62
|
+
class="pbx-fixed pbx-inset-0 pbx-bg-black/50 pbx-transition-opacity"
|
|
63
|
+
@click="handleClose"
|
|
64
|
+
></div>
|
|
65
|
+
|
|
66
|
+
<div
|
|
67
|
+
class="pbx-relative pbx-inline-block pbx-bg-white pbx-rounded-xl pbx-text-left pbx-overflow-hidden pbx-shadow-xl pbx-transform pbx-transition-all pbx-max-w-[96vh] pbx-max-h-[98vh] pbx-overflow-y-auto pbx-w-full pbx-px-4"
|
|
64
68
|
:class="[
|
|
65
69
|
maxWidthClass ? maxWidthClass : '',
|
|
66
70
|
minHeight ? minHeight : '',
|
|
@@ -68,13 +72,13 @@ const maxWidthClass = computed(() => {
|
|
|
68
72
|
]"
|
|
69
73
|
>
|
|
70
74
|
<div
|
|
71
|
-
class="h-16 flex items-center justify-between border-b border-gray-200 bg-white mb-2"
|
|
75
|
+
class="pbx-h-16 pbx-flex pbx-items-center pbx-justify-between pbx-border-b pbx-border-gray-200 pbx-bg-white pbx-mb-2"
|
|
72
76
|
>
|
|
73
|
-
<h3 as="h3" class="myQuaternaryHeader my-0 py-0">
|
|
77
|
+
<h3 as="h3" class="pbx-myQuaternaryHeader pbx-my-0 pbx-py-0">
|
|
74
78
|
{{ title }}
|
|
75
79
|
</h3>
|
|
76
80
|
<div
|
|
77
|
-
class="h-10 w-10 flex-end cursor-pointer rounded-full flex items-center border-none justify-center bg-gray-50 aspect-square hover:bg-myPrimaryLinkColor hover:text-white hover:fill-white focus-visible:ring-0"
|
|
81
|
+
class="pbx-h-10 pbx-w-10 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white hover:pbx-fill-white focus-visible:pbx-ring-0"
|
|
78
82
|
@click="handleClose"
|
|
79
83
|
>
|
|
80
84
|
<span class="material-symbols-outlined"> close </span>
|
|
@@ -7,6 +7,13 @@ import { generateComponentPreview } from '../../../utils/componentPreviews'
|
|
|
7
7
|
import type { ComponentObject } from '../../../types'
|
|
8
8
|
import { sharedPageBuilderStore } from '../../../stores/shared-store'
|
|
9
9
|
|
|
10
|
+
defineProps({
|
|
11
|
+
customMediaComponent: {
|
|
12
|
+
type: Object,
|
|
13
|
+
default: null,
|
|
14
|
+
},
|
|
15
|
+
})
|
|
16
|
+
|
|
10
17
|
// Get modal close function
|
|
11
18
|
const { closeAddComponentModal } = usePageBuilderModal()
|
|
12
19
|
|
|
@@ -42,20 +49,23 @@ const getSvgPreview = (title: string) => {
|
|
|
42
49
|
<template>
|
|
43
50
|
<div>
|
|
44
51
|
<!-- Helper Components Section -->
|
|
45
|
-
<div class="mb-8">
|
|
46
|
-
<h3 class="myQuaternaryHeader mb-4">Helper Components</h3>
|
|
47
|
-
<div
|
|
52
|
+
<div class="pbx-mb-8">
|
|
53
|
+
<h3 class="pbx-myQuaternaryHeader pbx-mb-4">Helper Components</h3>
|
|
54
|
+
<div
|
|
55
|
+
class="pbx-grid pbx-grid-cols-1 sm:pbx-grid-cols-2 md:pbx-grid-cols-3 lg:pbx-grid-cols-4 pbx-gap-4"
|
|
56
|
+
>
|
|
57
|
+
NOW: Did user include custom media component: {{ customMediaComponent ? 'true' : 'false' }}
|
|
48
58
|
<div
|
|
49
59
|
v-for="helper in componentHelpers"
|
|
50
60
|
:key="helper.title"
|
|
51
|
-
class="border border-gray-200 overflow-hidden hover:border-myPrimaryLinkColor duration-100 cursor-pointer p-4"
|
|
61
|
+
class="pbx-border pbx-border-gray-200 pbx-overflow-hidden hover:pbx-border-myPrimaryLinkColor pbx-duration-100 pbx-cursor-pointer pbx-p-4"
|
|
52
62
|
@click="handleDropComponent(helper)"
|
|
53
63
|
>
|
|
54
|
-
<div class="max-h-72 cursor-pointer object-contain bg-white mx-auto">
|
|
55
|
-
<div v-if="false" class="mr-2" v-html="helper.icon"></div>
|
|
56
|
-
<h4 class="myPrimaryParagraph text-base font-medium">{{ helper.title }}</h4>
|
|
64
|
+
<div class="pbx-max-h-72 pbx-cursor-pointer pbx-object-contain pbx-bg-white pbx-mx-auto">
|
|
65
|
+
<div v-if="false" class="pbx-mr-2" v-html="helper.icon"></div>
|
|
66
|
+
<h4 class="pbx-myPrimaryParagraph pbx-text-base pbx-font-medium">{{ helper.title }}</h4>
|
|
57
67
|
</div>
|
|
58
|
-
<div class="myPrimaryParagraph text-xs font-normal pt-2">
|
|
68
|
+
<div class="pbx-myPrimaryParagraph pbx-text-xs pbx-font-normal pbx-pt-2">
|
|
59
69
|
Click to add {{ helper.title.toLowerCase() }} component
|
|
60
70
|
</div>
|
|
61
71
|
</div>
|
|
@@ -63,27 +73,29 @@ const getSvgPreview = (title: string) => {
|
|
|
63
73
|
</div>
|
|
64
74
|
|
|
65
75
|
<!-- Regular Components Section -->
|
|
66
|
-
<div>
|
|
67
|
-
<h3 class="myQuaternaryHeader mb-4">Layout Components</h3>
|
|
68
|
-
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
|
|
76
|
+
<div v-if="customMediaComponent">
|
|
77
|
+
<h3 class="pbx-myQuaternaryHeader pbx-mb-4">Layout Components</h3>
|
|
78
|
+
<div class="pbx-grid pbx-grid-cols-1 sm:pbx-grid-cols-2 md:pbx-grid-cols-3 pbx-gap-4">
|
|
69
79
|
<div
|
|
70
80
|
v-for="comp in components[0].components.data"
|
|
71
81
|
:key="comp.title"
|
|
72
|
-
class="border border-gray-200 overflow-hidden hover:border-myPrimaryLinkColor duration-100 cursor-pointer"
|
|
82
|
+
class="pbx-border pbx-border-gray-200 pbx-overflow-hidden hover:pbx-border-myPrimaryLinkColor pbx-duration-100 pbx-cursor-pointer"
|
|
73
83
|
@click="handleDropComponent(convertToComponentObject(comp))"
|
|
74
84
|
>
|
|
75
85
|
<div
|
|
76
|
-
class="overflow-hidden whitespace-pre-line flex-1 h-auto border-b border-gray-200 lg:py-10 py-8 px-2"
|
|
86
|
+
class="pbx-overflow-hidden pbx-whitespace-pre-line pbx-flex-1 pbx-h-auto pbx-border-b pbx-border-gray-200 lg:pbx-py-10 pbx-py-8 pbx-px-2"
|
|
77
87
|
>
|
|
78
88
|
<!-- Use SVG preview instead of external images -->
|
|
79
89
|
<div
|
|
80
|
-
class="max-h-72 cursor-pointer bg-white mx-auto flex items-center justify-center"
|
|
90
|
+
class="pbx-max-h-72 pbx-cursor-pointer pbx-bg-white pbx-mx-auto pbx-flex pbx-items-center pbx-justify-center"
|
|
81
91
|
v-html="getSvgPreview(comp.title)"
|
|
82
92
|
></div>
|
|
83
93
|
</div>
|
|
84
|
-
<div class="p-3">
|
|
85
|
-
<h4 class="myPrimaryParagraph text-sm font-normal">{{ comp.title }}</h4>
|
|
86
|
-
<div class="myPrimaryParagraph text-xs font-normal pt-2">
|
|
94
|
+
<div class="pbx-p-3">
|
|
95
|
+
<h4 class="pbx-myPrimaryParagraph pbx-text-sm pbx-font-normal">{{ comp.title }}</h4>
|
|
96
|
+
<div class="pbx-myPrimaryParagraph pbx-text-xs pbx-font-normal pbx-pt-2">
|
|
97
|
+
Click to add component
|
|
98
|
+
</div>
|
|
87
99
|
</div>
|
|
88
100
|
</div>
|
|
89
101
|
</div>
|