@myissue/vue-website-page-builder 3.4.20 → 3.4.22
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 +22 -24
- package/dist/vue-website-page-builder.js +1 -1
- package/dist/vue-website-page-builder.umd.cjs +1 -1
- package/package.json +2 -3
- package/src/App.vue +0 -28
- package/src/Components/Homepage/Footer.vue +0 -32
- package/src/Components/Homepage/Navbar.vue +0 -25
- package/src/Components/Layouts/FullWidthElement.vue +0 -34
- package/src/Components/Loaders/GlobalLoader.vue +0 -18
- package/src/Components/Modals/BuilderComponents.vue +0 -53
- package/src/Components/Modals/DynamicModalBuilder.vue +0 -209
- package/src/Components/Modals/MediaLibraryModal.vue +0 -61
- package/src/Components/Modals/ModalBuilder.vue +0 -117
- package/src/Components/PageBuilder/EditorMenu/Editables/BackgroundColorEditor.vue +0 -121
- package/src/Components/PageBuilder/EditorMenu/Editables/BorderRadius.vue +0 -188
- package/src/Components/PageBuilder/EditorMenu/Editables/Borders.vue +0 -176
- package/src/Components/PageBuilder/EditorMenu/Editables/ClassEditor.vue +0 -112
- package/src/Components/PageBuilder/EditorMenu/Editables/ComponentTopMenu.vue +0 -108
- package/src/Components/PageBuilder/EditorMenu/Editables/EditGetElement.vue +0 -541
- package/src/Components/PageBuilder/EditorMenu/Editables/HTMLEditor.vue +0 -203
- package/src/Components/PageBuilder/EditorMenu/Editables/ImageEditor.vue +0 -96
- package/src/Components/PageBuilder/EditorMenu/Editables/LinkEditor.vue +0 -315
- package/src/Components/PageBuilder/EditorMenu/Editables/ManageBackgroundOpacity.vue +0 -107
- package/src/Components/PageBuilder/EditorMenu/Editables/ManageOpacity.vue +0 -106
- package/src/Components/PageBuilder/EditorMenu/Editables/Margin.vue +0 -116
- package/src/Components/PageBuilder/EditorMenu/Editables/OpacityEditor.vue +0 -19
- package/src/Components/PageBuilder/EditorMenu/Editables/Padding.vue +0 -117
- package/src/Components/PageBuilder/EditorMenu/Editables/StyleEditor.vue +0 -123
- package/src/Components/PageBuilder/EditorMenu/Editables/TextColorEditor.vue +0 -123
- package/src/Components/PageBuilder/EditorMenu/Editables/Typography.vue +0 -237
- package/src/Components/PageBuilder/EditorMenu/EditorAccordion.vue +0 -46
- package/src/Components/PageBuilder/EditorMenu/RightSidebarEditor.vue +0 -368
- package/src/Components/PageBuilder/Settings/AdvancedPageBuilderSettings.vue +0 -476
- package/src/Components/PageBuilder/Settings/PageBuilderSettings.vue +0 -581
- package/src/Components/PageBuilder/ToolbarOption/ToolbarOption.vue +0 -248
- package/src/Components/PageBuilder/UndoRedo/UndoRedo.vue +0 -90
- package/src/Components/TipTap/TipTap.vue +0 -25
- package/src/Components/TipTap/TipTapInput.vue +0 -341
- package/src/PageBuilder/PageBuilder.vue +0 -1025
- package/src/PageBuilder/Preview.vue +0 -64
- package/src/composables/builderInstance.ts +0 -47
- package/src/composables/delay.ts +0 -5
- package/src/composables/extractCleanHTMLFromPageBuilder.ts +0 -59
- package/src/composables/preloadImage.ts +0 -8
- package/src/composables/useDebounce.ts +0 -8
- package/src/composables/usePageBuilderModal.ts +0 -25
- package/src/composables/useTranslations.ts +0 -28
- package/src/css/dev-global.css +0 -24
- package/src/css/style.css +0 -600
- package/src/helpers/isEmptyObject.ts +0 -5
- package/src/index.ts +0 -28
- package/src/locales/ar.json +0 -170
- package/src/locales/de.json +0 -171
- package/src/locales/en.json +0 -171
- package/src/locales/es.json +0 -171
- package/src/locales/fr.json +0 -171
- package/src/locales/hi.json +0 -172
- package/src/locales/ja.json +0 -171
- package/src/locales/pt.json +0 -171
- package/src/locales/ru.json +0 -171
- package/src/locales/zh-Hans.json +0 -171
- package/src/main.ts +0 -14
- package/src/plugin.ts +0 -16
- package/src/services/LocalStorageManager.ts +0 -25
- package/src/services/PageBuilderService.ts +0 -3191
- package/src/stores/page-builder-state.ts +0 -498
- package/src/stores/shared-store.ts +0 -13
- package/src/tailwind-safelist.html +0 -3
- package/src/tests/DefaultComponents/DefaultBuilderComponents.vue +0 -284
- package/src/tests/DefaultComponents/DefaultMediaLibraryComponent.vue +0 -10
- package/src/tests/PageBuilderTest.vue +0 -82
- package/src/tests/TestComponents/DemoBuilderComponentsTest.vue +0 -5
- package/src/tests/TestComponents/DemoMediaLibraryComponentTest.vue +0 -8
- package/src/tests/TestComponents/DemoUnsplash.vue +0 -389
- package/src/tests/componentsArray.test.json +0 -62
- package/src/tests/pageBuilderService.test.ts +0 -165
- package/src/types/global.d.ts +0 -11
- package/src/types/index.ts +0 -306
- package/src/utils/builder/html-doc-declaration-with-components.ts +0 -7
- package/src/utils/builder/tailwaind-colors.ts +0 -503
- package/src/utils/builder/tailwind-border-radius.ts +0 -67
- package/src/utils/builder/tailwind-border-style-width-color.ts +0 -272
- package/src/utils/builder/tailwind-font-sizes.ts +0 -75
- package/src/utils/builder/tailwind-font-styles.ts +0 -56
- package/src/utils/builder/tailwind-opacities.ts +0 -45
- package/src/utils/builder/tailwind-padding-margin.ts +0 -159
- package/src/utils/html-elements/component.ts +0 -485
- package/src/utils/html-elements/componentHelpers.ts +0 -98
- package/src/utils/html-elements/themes.ts +0 -85
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { ref, computed, watch } from 'vue'
|
|
3
|
-
import { Listbox, ListboxButton, ListboxOption, ListboxOptions } from '@headlessui/vue'
|
|
4
|
-
import tailwindColors from '../../../../utils/builder/tailwaind-colors'
|
|
5
|
-
import { sharedPageBuilderStore } from '../../../../stores/shared-store'
|
|
6
|
-
import { getPageBuilder } from '../../../../composables/builderInstance'
|
|
7
|
-
import { useTranslations } from '../../../../composables/useTranslations'
|
|
8
|
-
|
|
9
|
-
const { translate } = useTranslations()
|
|
10
|
-
|
|
11
|
-
const pageBuilderService = getPageBuilder()
|
|
12
|
-
|
|
13
|
-
// Use shared store instance
|
|
14
|
-
const pageBuilderStateStore = sharedPageBuilderStore
|
|
15
|
-
|
|
16
|
-
defineProps({
|
|
17
|
-
globalPageLayout: {
|
|
18
|
-
Type: Boolean,
|
|
19
|
-
},
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
const backgroundColor = ref(null)
|
|
23
|
-
const getBackgroundColor = computed(() => {
|
|
24
|
-
return pageBuilderStateStore.getBackgroundColor
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
watch(
|
|
28
|
-
getBackgroundColor,
|
|
29
|
-
async (newValue) => {
|
|
30
|
-
backgroundColor.value = newValue
|
|
31
|
-
await pageBuilderService.initializeElementStyles()
|
|
32
|
-
},
|
|
33
|
-
{ immediate: true },
|
|
34
|
-
)
|
|
35
|
-
</script>
|
|
36
|
-
|
|
37
|
-
<template>
|
|
38
|
-
<Listbox as="div" v-model="backgroundColor">
|
|
39
|
-
<div class="pbx-relative">
|
|
40
|
-
<div
|
|
41
|
-
:class="[
|
|
42
|
-
globalPageLayout
|
|
43
|
-
? 'pbx-flex pbx-flex-col pbx-border-solid pbx-border pbx-border-gray-400'
|
|
44
|
-
: 'pbx-flex pbx-gap-2 pbx-items-center',
|
|
45
|
-
]"
|
|
46
|
-
>
|
|
47
|
-
<ListboxButton
|
|
48
|
-
v-if="globalPageLayout"
|
|
49
|
-
class="pbx-flex pbx-flex-row pbx-justify-between pbx-items-center pbx-pl-3 pbx-pr-3 pbx-py-5 pbx-cursor-pointer pbx-duration-200 hover:pbx-bg-myPrimaryLightGrayColor pbx-bg-white hover:pbx-text-black pbx-text-black pbx-font-sans pbx-font-medium pbx-border-0"
|
|
50
|
-
>
|
|
51
|
-
<div class="pbx-flex pbx-justify-start pbx-items-center pbx-gap-2">
|
|
52
|
-
<div
|
|
53
|
-
class="pbx-aspect-square pbx-w-6 pbx-h-6 pbx-border pbx-border-gray-600 pbx-rounded-sm pbx-bg-none pbx-border-solid"
|
|
54
|
-
:class="`pbx-bg-${backgroundColor?.replace('pbx-bg-', '')}`"
|
|
55
|
-
></div>
|
|
56
|
-
<div>{{ translate('Background Color') }}</div>
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
<span v-if="globalPageLayout" class="material-symbols-outlined"> chevron_right </span>
|
|
60
|
-
</ListboxButton>
|
|
61
|
-
|
|
62
|
-
<ListboxButton
|
|
63
|
-
v-if="!globalPageLayout"
|
|
64
|
-
class="pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"
|
|
65
|
-
>
|
|
66
|
-
<div class="pbx-flex pbx-flex-col">
|
|
67
|
-
<div class="pbx-flex pbx-gap-2 pbx-items-center">
|
|
68
|
-
<span
|
|
69
|
-
class="material-symbols-outlined"
|
|
70
|
-
style="text-shadow: rgb(0 0 0 / 10%) 1.5px 1.5px 0px"
|
|
71
|
-
:class="`pbx-text-${backgroundColor?.replace('pbx-bg-', '')}`"
|
|
72
|
-
>
|
|
73
|
-
format_color_fill
|
|
74
|
-
</span>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
</ListboxButton>
|
|
78
|
-
</div>
|
|
79
|
-
|
|
80
|
-
<transition
|
|
81
|
-
leave-active-class="pbx-transition pbx-ease-in pbx-duration-100"
|
|
82
|
-
leave-from-class="pbx-opacity-100"
|
|
83
|
-
leave-to-class="pbx-opacity-0"
|
|
84
|
-
>
|
|
85
|
-
<ListboxOptions
|
|
86
|
-
class="pbx-headless-dropdown pbx-absolute pbx-min-w-[12rem] pbx-z-40 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-gray-50 pbx-py-1 pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm"
|
|
87
|
-
>
|
|
88
|
-
<ListboxOption
|
|
89
|
-
as="template"
|
|
90
|
-
v-for="color in tailwindColors.backgroundColorVariables"
|
|
91
|
-
@click="pageBuilderService.handleBackgroundColor(backgroundColor)"
|
|
92
|
-
:key="color"
|
|
93
|
-
:value="color"
|
|
94
|
-
v-slot="{ active, backgroundColor }"
|
|
95
|
-
>
|
|
96
|
-
<li
|
|
97
|
-
:class="[
|
|
98
|
-
active
|
|
99
|
-
? 'pbx-bg-myPrimaryLinkColor pbx-text-white'
|
|
100
|
-
: 'pbx-text-myPrimaryDarkGrayColor',
|
|
101
|
-
'pbx-relative pbx-cursor-default pbx-select-none pbx-py-2 pbx-pl-3 pbx-pr-9',
|
|
102
|
-
]"
|
|
103
|
-
>
|
|
104
|
-
<div v-if="color === 'none'" class="pbx-flex pbx-items-center">
|
|
105
|
-
<span class="material-symbols-outlined"> ev_shadow </span>
|
|
106
|
-
<span class="pbx-ml-3">{{ translate('Transparent') }}</span>
|
|
107
|
-
</div>
|
|
108
|
-
<div v-if="color !== 'none'" class="pbx-flex pbx-items-center">
|
|
109
|
-
<div
|
|
110
|
-
class="pbx-aspect-square pbx-w-6 pbx-h-6 pbx-border-solid pbx-border pbx-border-gray-100 pbx-rounded-sm"
|
|
111
|
-
:class="`pbx-bg-${color.replace('pbx-bg-', '')}`"
|
|
112
|
-
></div>
|
|
113
|
-
<span class="pbx-ml-3">{{ color }}</span>
|
|
114
|
-
</div>
|
|
115
|
-
</li>
|
|
116
|
-
</ListboxOption>
|
|
117
|
-
</ListboxOptions>
|
|
118
|
-
</transition>
|
|
119
|
-
</div>
|
|
120
|
-
</Listbox>
|
|
121
|
-
</template>
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { ref, computed, watch } from 'vue'
|
|
3
|
-
import { sharedPageBuilderStore } from '../../../../stores/shared-store'
|
|
4
|
-
import EditorAccordion from '../EditorAccordion.vue'
|
|
5
|
-
import tailwindBorderRadius from '../../../../utils/builder/tailwind-border-radius'
|
|
6
|
-
import { getPageBuilder } from '../../../../composables/builderInstance'
|
|
7
|
-
import { useTranslations } from '../../../../composables/useTranslations'
|
|
8
|
-
|
|
9
|
-
const { translate } = useTranslations()
|
|
10
|
-
const pageBuilderService = getPageBuilder()
|
|
11
|
-
|
|
12
|
-
const pageBuilderStateStore = sharedPageBuilderStore
|
|
13
|
-
|
|
14
|
-
const borderRadiusGlobal = ref(null)
|
|
15
|
-
const borderRadiusTopLeft = ref(null)
|
|
16
|
-
const borderRadiusTopRight = ref(null)
|
|
17
|
-
const borderRadiusBottomleft = ref(null)
|
|
18
|
-
const borderRadiusBottomRight = ref(null)
|
|
19
|
-
const getBorderRadiusGlobal = computed(() => {
|
|
20
|
-
return pageBuilderStateStore.getBorderRadiusGlobal
|
|
21
|
-
})
|
|
22
|
-
const getBorderRadiusTopLeft = computed(() => {
|
|
23
|
-
return pageBuilderStateStore.getBorderRadiusTopLeft
|
|
24
|
-
})
|
|
25
|
-
const getBorderRadiusTopRight = computed(() => {
|
|
26
|
-
return pageBuilderStateStore.getBorderRadiusTopRight
|
|
27
|
-
})
|
|
28
|
-
const getBorderRadiusBottomleft = computed(() => {
|
|
29
|
-
return pageBuilderStateStore.getBorderRadiusBottomleft
|
|
30
|
-
})
|
|
31
|
-
const getBorderRadiusBottomRight = computed(() => {
|
|
32
|
-
return pageBuilderStateStore.getBorderRadiusBottomRight
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
watch(
|
|
36
|
-
getBorderRadiusGlobal,
|
|
37
|
-
async (newValue) => {
|
|
38
|
-
borderRadiusGlobal.value = newValue
|
|
39
|
-
await pageBuilderService.initializeElementStyles()
|
|
40
|
-
},
|
|
41
|
-
{ immediate: true },
|
|
42
|
-
)
|
|
43
|
-
watch(
|
|
44
|
-
getBorderRadiusTopLeft,
|
|
45
|
-
async (newValue) => {
|
|
46
|
-
borderRadiusTopLeft.value = newValue
|
|
47
|
-
await pageBuilderService.initializeElementStyles()
|
|
48
|
-
},
|
|
49
|
-
{ immediate: true },
|
|
50
|
-
)
|
|
51
|
-
watch(
|
|
52
|
-
getBorderRadiusTopRight,
|
|
53
|
-
async (newValue) => {
|
|
54
|
-
borderRadiusTopRight.value = newValue
|
|
55
|
-
await pageBuilderService.initializeElementStyles()
|
|
56
|
-
},
|
|
57
|
-
{ immediate: true },
|
|
58
|
-
)
|
|
59
|
-
watch(
|
|
60
|
-
getBorderRadiusBottomleft,
|
|
61
|
-
async (newValue) => {
|
|
62
|
-
borderRadiusBottomleft.value = newValue
|
|
63
|
-
await pageBuilderService.initializeElementStyles()
|
|
64
|
-
},
|
|
65
|
-
{ immediate: true },
|
|
66
|
-
)
|
|
67
|
-
watch(
|
|
68
|
-
getBorderRadiusBottomRight,
|
|
69
|
-
async (newValue) => {
|
|
70
|
-
borderRadiusBottomRight.value = newValue
|
|
71
|
-
await pageBuilderService.initializeElementStyles()
|
|
72
|
-
},
|
|
73
|
-
{ immediate: true },
|
|
74
|
-
)
|
|
75
|
-
</script>
|
|
76
|
-
|
|
77
|
-
<template>
|
|
78
|
-
<EditorAccordion>
|
|
79
|
-
<template #title>{{ translate('Border Radius') }}</template>
|
|
80
|
-
<template #content>
|
|
81
|
-
<p class="pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4">
|
|
82
|
-
{{ translate('Global') }}
|
|
83
|
-
</p>
|
|
84
|
-
<div class="pbx-my-2 pbx-py-2">
|
|
85
|
-
<label for="global-border-radius" class="pbx-myPrimaryInputLabel">{{
|
|
86
|
-
translate('Border Radius')
|
|
87
|
-
}}</label>
|
|
88
|
-
<select
|
|
89
|
-
id="global-border-radius"
|
|
90
|
-
v-model="borderRadiusGlobal"
|
|
91
|
-
class="pbx-myPrimarySelect"
|
|
92
|
-
@change="pageBuilderService.handleBorderRadiusGlobal(borderRadiusGlobal)"
|
|
93
|
-
>
|
|
94
|
-
<option disabled value="">{{ translate('Select') }}</option>
|
|
95
|
-
<option
|
|
96
|
-
v-for="borderRadiusGlobal in tailwindBorderRadius.roundedGlobal"
|
|
97
|
-
:key="borderRadiusGlobal"
|
|
98
|
-
>
|
|
99
|
-
{{ borderRadiusGlobal }}
|
|
100
|
-
</option>
|
|
101
|
-
</select>
|
|
102
|
-
</div>
|
|
103
|
-
<hr />
|
|
104
|
-
<p class="pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4">
|
|
105
|
-
{{ translate('Specific') }}
|
|
106
|
-
</p>
|
|
107
|
-
<div class="pbx-my-2 pbx-py-2">
|
|
108
|
-
<label for="border-radius-top-left" class="pbx-myPrimaryInputLabel">
|
|
109
|
-
{{ translate('Border Radius top left') }}
|
|
110
|
-
</label>
|
|
111
|
-
<select
|
|
112
|
-
id="border-radius-top-left"
|
|
113
|
-
v-model="borderRadiusTopLeft"
|
|
114
|
-
class="pbx-myPrimarySelect"
|
|
115
|
-
@change="pageBuilderService.handleBorderRadiusTopLeft(borderRadiusTopLeft)"
|
|
116
|
-
>
|
|
117
|
-
<option disabled value="">{{ translate('Select') }}</option>
|
|
118
|
-
<option
|
|
119
|
-
v-for="borderRadiusTopLeft in tailwindBorderRadius.roundedTopLeft"
|
|
120
|
-
:key="borderRadiusTopLeft"
|
|
121
|
-
>
|
|
122
|
-
{{ borderRadiusTopLeft }}
|
|
123
|
-
</option>
|
|
124
|
-
</select>
|
|
125
|
-
</div>
|
|
126
|
-
<hr />
|
|
127
|
-
<div class="pbx-my-2 pbx-py-2">
|
|
128
|
-
<label for="border-radius-top-right" class="pbx-myPrimaryInputLabel">
|
|
129
|
-
{{ translate('Border Radius top right') }}
|
|
130
|
-
</label>
|
|
131
|
-
<select
|
|
132
|
-
id="border-radius-top-right"
|
|
133
|
-
v-model="borderRadiusTopRight"
|
|
134
|
-
class="pbx-myPrimarySelect"
|
|
135
|
-
@change="pageBuilderService.handleBorderRadiusTopRight(borderRadiusTopRight)"
|
|
136
|
-
>
|
|
137
|
-
<option disabled value="">{{ translate('Select') }}</option>
|
|
138
|
-
<option
|
|
139
|
-
v-for="borderRadiusTopRight in tailwindBorderRadius.roundedTopRight"
|
|
140
|
-
:key="borderRadiusTopRight"
|
|
141
|
-
>
|
|
142
|
-
{{ borderRadiusTopRight }}
|
|
143
|
-
</option>
|
|
144
|
-
</select>
|
|
145
|
-
</div>
|
|
146
|
-
<hr />
|
|
147
|
-
<div class="pbx-my-2 pbx-py-2">
|
|
148
|
-
<label for="border-radius-bottom-left" class="pbx-myPrimaryInputLabel">
|
|
149
|
-
{{ translate('Border Radius bottom left') }}
|
|
150
|
-
</label>
|
|
151
|
-
<select
|
|
152
|
-
id="border-radius-bottom-left"
|
|
153
|
-
v-model="borderRadiusBottomleft"
|
|
154
|
-
class="pbx-myPrimarySelect"
|
|
155
|
-
@change="pageBuilderService.handleBorderRadiusBottomleft(borderRadiusBottomleft)"
|
|
156
|
-
>
|
|
157
|
-
<option disabled value="">{{ translate('Select') }}</option>
|
|
158
|
-
<option
|
|
159
|
-
v-for="borderRadiusBottomleft in tailwindBorderRadius.roundedBottomLeft"
|
|
160
|
-
:key="borderRadiusBottomleft"
|
|
161
|
-
>
|
|
162
|
-
{{ borderRadiusBottomleft }}
|
|
163
|
-
</option>
|
|
164
|
-
</select>
|
|
165
|
-
</div>
|
|
166
|
-
<hr />
|
|
167
|
-
<div class="pbx-my-2 pbx-py-2">
|
|
168
|
-
<label for="border-radius-bottom-right" class="pbx-myPrimaryInputLabel">
|
|
169
|
-
{{ translate('Border Radius bottom right') }}
|
|
170
|
-
</label>
|
|
171
|
-
<select
|
|
172
|
-
id="border-radius-bottom-right"
|
|
173
|
-
v-model="borderRadiusBottomRight"
|
|
174
|
-
class="pbx-myPrimarySelect"
|
|
175
|
-
@change="pageBuilderService.handleBorderRadiusBottomRight(borderRadiusBottomRight)"
|
|
176
|
-
>
|
|
177
|
-
<option disabled value="">{{ translate('Select') }}</option>
|
|
178
|
-
<option
|
|
179
|
-
v-for="borderRadiusBottomRight in tailwindBorderRadius.roundedBottomRight"
|
|
180
|
-
:key="borderRadiusBottomRight"
|
|
181
|
-
>
|
|
182
|
-
{{ borderRadiusBottomRight }}
|
|
183
|
-
</option>
|
|
184
|
-
</select>
|
|
185
|
-
</div>
|
|
186
|
-
</template>
|
|
187
|
-
</EditorAccordion>
|
|
188
|
-
</template>
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { ref, computed, watch } from 'vue'
|
|
3
|
-
import EditorAccordion from '../EditorAccordion.vue'
|
|
4
|
-
import tailwindBorderStyleWidthPlusColor from '../../../../utils/builder/tailwind-border-style-width-color'
|
|
5
|
-
import tailwindColors from '../../../../utils/builder/tailwaind-colors'
|
|
6
|
-
import { Listbox, ListboxButton, ListboxOption, ListboxOptions } from '@headlessui/vue'
|
|
7
|
-
import { sharedPageBuilderStore } from '../../../../stores/shared-store'
|
|
8
|
-
import { getPageBuilder } from '../../../../composables/builderInstance'
|
|
9
|
-
import { useTranslations } from '../../../../composables/useTranslations'
|
|
10
|
-
|
|
11
|
-
const { translate } = useTranslations()
|
|
12
|
-
const pageBuilderService = getPageBuilder()
|
|
13
|
-
|
|
14
|
-
// Use shared store instance
|
|
15
|
-
const pageBuilderStateStore = sharedPageBuilderStore
|
|
16
|
-
|
|
17
|
-
const borderStyle = ref(null)
|
|
18
|
-
const borderWidth = ref(null)
|
|
19
|
-
const borderColor = ref(null)
|
|
20
|
-
const getBorderStyle = computed(() => {
|
|
21
|
-
return pageBuilderStateStore.getBorderStyle
|
|
22
|
-
})
|
|
23
|
-
const getBorderWidth = computed(() => {
|
|
24
|
-
return pageBuilderStateStore.getBorderWidth
|
|
25
|
-
})
|
|
26
|
-
const getBorderColor = computed(() => {
|
|
27
|
-
return pageBuilderStateStore.getBorderColor
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
watch(
|
|
31
|
-
getBorderStyle,
|
|
32
|
-
async (newValue) => {
|
|
33
|
-
borderStyle.value = newValue
|
|
34
|
-
await pageBuilderService.initializeElementStyles()
|
|
35
|
-
},
|
|
36
|
-
{ immediate: true },
|
|
37
|
-
)
|
|
38
|
-
watch(
|
|
39
|
-
getBorderWidth,
|
|
40
|
-
async (newValue) => {
|
|
41
|
-
borderWidth.value = newValue
|
|
42
|
-
await pageBuilderService.initializeElementStyles()
|
|
43
|
-
},
|
|
44
|
-
{ immediate: true },
|
|
45
|
-
)
|
|
46
|
-
watch(
|
|
47
|
-
getBorderColor,
|
|
48
|
-
async (newValue) => {
|
|
49
|
-
borderColor.value = newValue
|
|
50
|
-
await pageBuilderService.initializeElementStyles()
|
|
51
|
-
},
|
|
52
|
-
{ immediate: true },
|
|
53
|
-
)
|
|
54
|
-
</script>
|
|
55
|
-
|
|
56
|
-
<template>
|
|
57
|
-
<EditorAccordion>
|
|
58
|
-
<template #title>{{ translate('Border Style, Width & Color') }}</template>
|
|
59
|
-
<template #content>
|
|
60
|
-
<p class="pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4">
|
|
61
|
-
{{ translate('Border') }}
|
|
62
|
-
</p>
|
|
63
|
-
|
|
64
|
-
<div class="pbx-my-2 pbx-py-2">
|
|
65
|
-
<label for="border-style" class="pbx-myPrimaryInputLabel">{{
|
|
66
|
-
translate('Border Style')
|
|
67
|
-
}}</label>
|
|
68
|
-
<select
|
|
69
|
-
id="border-style"
|
|
70
|
-
v-model="borderStyle"
|
|
71
|
-
class="pbx-myPrimarySelect"
|
|
72
|
-
@change="pageBuilderService.handleBorderStyle(borderStyle)"
|
|
73
|
-
>
|
|
74
|
-
<option disabled value="">{{ translate('Select') }}</option>
|
|
75
|
-
<option
|
|
76
|
-
v-for="borderStyle in tailwindBorderStyleWidthPlusColor.borderStyle"
|
|
77
|
-
:key="borderStyle"
|
|
78
|
-
>
|
|
79
|
-
{{ borderStyle }}
|
|
80
|
-
</option>
|
|
81
|
-
</select>
|
|
82
|
-
</div>
|
|
83
|
-
<hr />
|
|
84
|
-
<div class="pbx-my-2 pbx-py-2">
|
|
85
|
-
<label for="border-width" class="pbx-myPrimaryInputLabel">{{
|
|
86
|
-
translate('Border Width')
|
|
87
|
-
}}</label>
|
|
88
|
-
<select
|
|
89
|
-
id="border-width"
|
|
90
|
-
v-model="borderWidth"
|
|
91
|
-
class="pbx-myPrimarySelect"
|
|
92
|
-
@change="pageBuilderService.handleBorderWidth(borderWidth)"
|
|
93
|
-
>
|
|
94
|
-
<option disabled value="">{{ translate('Select') }}</option>
|
|
95
|
-
<option
|
|
96
|
-
v-for="borderWidth in tailwindBorderStyleWidthPlusColor.borderWidth"
|
|
97
|
-
:key="borderWidth"
|
|
98
|
-
>
|
|
99
|
-
{{ borderWidth }}
|
|
100
|
-
</option>
|
|
101
|
-
</select>
|
|
102
|
-
</div>
|
|
103
|
-
<hr />
|
|
104
|
-
<div class="pbx-my-2 pbx-py-2">
|
|
105
|
-
<label for="border-color" class="pbx-myPrimaryInputLabel">{{
|
|
106
|
-
translate('Border Color')
|
|
107
|
-
}}</label>
|
|
108
|
-
<Listbox as="div" v-model="borderColor">
|
|
109
|
-
<div class="pbx-relative pbx-mt-2">
|
|
110
|
-
<ListboxButton class="pbx-myPrimarySelect" id="border-color">
|
|
111
|
-
<span class="pbx-flex pbx-items-center pbx-gap-2">
|
|
112
|
-
<div v-if="getBorderColor === 'none'">
|
|
113
|
-
<div class="pbx-myPrimaryColorPreview pbx-border-none">
|
|
114
|
-
<span class="material-symbols-outlined"> ev_shadow </span>
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
<div
|
|
118
|
-
v-if="borderColor !== 'none'"
|
|
119
|
-
class="pbx-aspect-square pbx-w-6 pbx-h-6 pbx-border-solid pbx-border pbx-border-gray-100 pbx-rounded-sm"
|
|
120
|
-
:class="`pbx-bg-${borderColor?.replace('pbx-border-', '')}`"
|
|
121
|
-
></div>
|
|
122
|
-
<span class="pbx-block pbx-truncate">{{ borderColor }}</span>
|
|
123
|
-
</span>
|
|
124
|
-
</ListboxButton>
|
|
125
|
-
|
|
126
|
-
<transition
|
|
127
|
-
leave-active-class="pbx-transition pbx-ease-in pbx-duration-100"
|
|
128
|
-
leave-from-class="pbx-opacity-100"
|
|
129
|
-
leave-to-class="pbx-opacity-0"
|
|
130
|
-
>
|
|
131
|
-
<ListboxOptions
|
|
132
|
-
class="pbx-absolute pbx-z-10 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-white pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm pbx-list-none pbx-p-0 pbx-m-0"
|
|
133
|
-
>
|
|
134
|
-
<ListboxOption
|
|
135
|
-
as="template"
|
|
136
|
-
v-for="color in tailwindBorderStyleWidthPlusColor.borderColor"
|
|
137
|
-
@click="pageBuilderService.handleBorderColor(borderColor)"
|
|
138
|
-
:key="color"
|
|
139
|
-
:value="color"
|
|
140
|
-
v-slot="{ active, borderColor }"
|
|
141
|
-
>
|
|
142
|
-
<li
|
|
143
|
-
:class="[
|
|
144
|
-
active
|
|
145
|
-
? 'pbx-bg-myPrimaryLinkColor pbx-text-white'
|
|
146
|
-
: 'pbx-text-myPrimaryDarkGrayColor',
|
|
147
|
-
'pbx-relative pbx-cursor-default pbx-select-none pbx-py-2 pbx-pl-3 pbx-pr-9',
|
|
148
|
-
]"
|
|
149
|
-
>
|
|
150
|
-
<div class="pbx-flex pbx-items-center">
|
|
151
|
-
<div v-if="color === 'none'">
|
|
152
|
-
<div class="pbx-myPrimaryColorPreview pbx-border-none">
|
|
153
|
-
<span class="material-symbols-outlined"> ev_shadow </span>
|
|
154
|
-
</div>
|
|
155
|
-
</div>
|
|
156
|
-
|
|
157
|
-
<div
|
|
158
|
-
v-if="color !== 'none'"
|
|
159
|
-
class="pbx-aspect-square pbx-w-6 pbx-h-6 pbx-bg-gray-950"
|
|
160
|
-
:class="`pbx-bg-${color.replace('pbx-border-', '')}`"
|
|
161
|
-
></div>
|
|
162
|
-
<span v-if="color === 'none'" class="pbx-ml-3">{{
|
|
163
|
-
translate('Transparent')
|
|
164
|
-
}}</span>
|
|
165
|
-
<span v-if="color !== 'none'" class="pbx-ml-3">{{ color }}</span>
|
|
166
|
-
</div>
|
|
167
|
-
</li>
|
|
168
|
-
</ListboxOption>
|
|
169
|
-
</ListboxOptions>
|
|
170
|
-
</transition>
|
|
171
|
-
</div>
|
|
172
|
-
</Listbox>
|
|
173
|
-
</div>
|
|
174
|
-
</template>
|
|
175
|
-
</EditorAccordion>
|
|
176
|
-
</template>
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { ref, computed, watch } from 'vue'
|
|
3
|
-
import { sharedPageBuilderStore } from '../../../../stores/shared-store'
|
|
4
|
-
import EditorAccordion from '../EditorAccordion.vue'
|
|
5
|
-
import { getPageBuilder } from '../../../../composables/builderInstance'
|
|
6
|
-
import { useTranslations } from '../../../../composables/useTranslations'
|
|
7
|
-
|
|
8
|
-
const { translate } = useTranslations()
|
|
9
|
-
|
|
10
|
-
const pageBuilderService = getPageBuilder()
|
|
11
|
-
|
|
12
|
-
const pageBuilderStateStore = sharedPageBuilderStore
|
|
13
|
-
|
|
14
|
-
const currentClasses = ref(null)
|
|
15
|
-
const getCurrentClasses = computed(() => pageBuilderStateStore.getCurrentClasses)
|
|
16
|
-
|
|
17
|
-
watch(
|
|
18
|
-
getCurrentClasses,
|
|
19
|
-
(newValue) => {
|
|
20
|
-
currentClasses.value = newValue
|
|
21
|
-
},
|
|
22
|
-
{ immediate: true },
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
const inputClass = ref('')
|
|
26
|
-
const errorMessage = ref('') // <-- error message reactive ref
|
|
27
|
-
|
|
28
|
-
const handleAddClasses = async () => {
|
|
29
|
-
const classToAdd = inputClass.value.trim()
|
|
30
|
-
|
|
31
|
-
if (!classToAdd) {
|
|
32
|
-
errorMessage.value = 'Please enter a class name.'
|
|
33
|
-
return
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Add prefix if missing
|
|
37
|
-
const prefixedClass = classToAdd.startsWith('pbx-') ? classToAdd : 'pbx-' + classToAdd
|
|
38
|
-
|
|
39
|
-
// Check if class already exists
|
|
40
|
-
if (currentClasses.value?.includes(prefixedClass)) {
|
|
41
|
-
errorMessage.value = `Class "${prefixedClass}" is already added.`
|
|
42
|
-
return
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
errorMessage.value = '' // Clear error
|
|
46
|
-
|
|
47
|
-
pageBuilderService.handleAddClasses(classToAdd)
|
|
48
|
-
await pageBuilderService.initializeElementStyles()
|
|
49
|
-
|
|
50
|
-
inputClass.value = ''
|
|
51
|
-
}
|
|
52
|
-
</script>
|
|
53
|
-
|
|
54
|
-
<template>
|
|
55
|
-
<EditorAccordion>
|
|
56
|
-
<template #title>{{ translate('Generated CSS') }}</template>
|
|
57
|
-
<template #content>
|
|
58
|
-
<p class="pbx-myPrimaryInputLabel pbx-my-4">
|
|
59
|
-
{{
|
|
60
|
-
translate(
|
|
61
|
-
'This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.',
|
|
62
|
-
)
|
|
63
|
-
}}
|
|
64
|
-
</p>
|
|
65
|
-
|
|
66
|
-
<div class="pbx-flex pbx-flex-row pbx-flex-wrap pbx-gap-2 pbx-mt-2 pbx-mb-4">
|
|
67
|
-
<div
|
|
68
|
-
v-for="className in currentClasses"
|
|
69
|
-
:key="className"
|
|
70
|
-
class="pbx-myPrimaryTag pbx-cursor-pointer hover:pbx-bg-myPrimaryErrorColor hover:pbx-text-white pbx-text-xs pbx-py-2 pbx-font-medium"
|
|
71
|
-
@click="
|
|
72
|
-
async () => {
|
|
73
|
-
pageBuilderService.handleRemoveClasses(className)
|
|
74
|
-
await pageBuilderService.initializeElementStyles()
|
|
75
|
-
}
|
|
76
|
-
"
|
|
77
|
-
>
|
|
78
|
-
<div class="pbx-flex pbx-items-center pbx-gap-1">
|
|
79
|
-
<span class="pbx-mr-1">
|
|
80
|
-
{{ className }}
|
|
81
|
-
</span>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
|
|
86
|
-
<hr />
|
|
87
|
-
<div class="pbx-my-2 pbx-py-2">
|
|
88
|
-
<label for="custom-css" class="pbx-myPrimaryInputLabel">
|
|
89
|
-
{{ translate('Add your CSS.') }}
|
|
90
|
-
<br />
|
|
91
|
-
{{ translate('The pbx- prefix is added automatically.') }}
|
|
92
|
-
</label>
|
|
93
|
-
<div class="pbx-flex pbx-gap-2 pbx-item-center">
|
|
94
|
-
<input
|
|
95
|
-
id="custom-css"
|
|
96
|
-
v-model="inputClass"
|
|
97
|
-
type="text"
|
|
98
|
-
:placeholder="translate('Type class')"
|
|
99
|
-
@keydown.enter="handleAddClasses()"
|
|
100
|
-
autocomplete="off"
|
|
101
|
-
class="pbx-myPrimaryInput"
|
|
102
|
-
/>
|
|
103
|
-
|
|
104
|
-
<button @click="handleAddClasses" type="button" class="pbx-myPrimaryButton">
|
|
105
|
-
{{ translate('Add') }}
|
|
106
|
-
</button>
|
|
107
|
-
</div>
|
|
108
|
-
</div>
|
|
109
|
-
<p v-if="errorMessage" class="pbx-myPrimaryInputError">{{ errorMessage }}</p>
|
|
110
|
-
</template>
|
|
111
|
-
</EditorAccordion>
|
|
112
|
-
</template>
|