@designcrowd/fe-shared-lib 1.5.1 → 1.5.3-CarouselUpdatev0
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/css/tailwind-brandCrowd.css +0 -6
- package/dist/css/tailwind-brandPage.css +0 -6
- package/dist/css/tailwind-crazyDomains.css +0 -6
- package/dist/css/tailwind-designCom.css +0 -6
- package/dist/css/tailwind-designCrowd.css +0 -6
- package/index.js +1 -0
- package/package.json +2 -2
- package/public/css/tailwind-brandCrowd.css +2472 -0
- package/public/css/tailwind-brandPage.css +2156 -0
- package/public/css/tailwind-crazyDomains.css +2472 -0
- package/public/css/tailwind-designCom.css +2472 -0
- package/public/css/tailwind-designCrowd.css +2472 -0
- package/src/atoms/components/Carousel/Carousel.fixtures.js +18 -0
- package/src/atoms/components/Carousel/Carousel.vue +5 -29
- package/src/atoms/components/Carousel/carousel.stories.js +448 -179
- package/src/atoms/components/PromoCard/PromoCard.stories.ts +263 -0
- package/src/atoms/components/PromoCard/PromoCard.vue +83 -0
- package/src/experiences/components/PublishBrandPageModal/PublishBrandPageModal.stories.js +36 -0
- package/src/experiences/components/PublishBrandPageModal/PublishBrandPageModal.vue +100 -297
- package/src/experiences/components/PublishBrandPageModal/views/PublishWhenHasDomainsView.vue +271 -0
- package/src/experiences/components/PublishBrandPageModal/views/PublishWhenNoDomainsView.vue +168 -0
- package/src/experiences/components/PublishBrandPageModal/views/PublishedView.vue +149 -0
- package/src/experiences/components/PublishBrandPageModal/views/SetUrlView.vue +155 -0
- package/tailwind.config.js +7 -8
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="tw-mt-4">
|
|
4
|
+
<div>
|
|
5
|
+
<TextInput
|
|
6
|
+
v-model="internalSlug"
|
|
7
|
+
element-classes="tw-mb-0 !tw-rounded-l-none tw-text-lg"
|
|
8
|
+
:prefix-text="`${brandPageBaseUrlWithoutHttps}/`"
|
|
9
|
+
:error="!!slugValidationError"
|
|
10
|
+
:disabled="isInputEnabled"
|
|
11
|
+
:placeholder="getPlaceHolder"
|
|
12
|
+
data-test-brand-page-slug-input
|
|
13
|
+
:attrs="{ 'data-test-set-url-text-field': '' }"
|
|
14
|
+
@input="onSlugChanged"
|
|
15
|
+
/>
|
|
16
|
+
<div v-if="slugErrorMessage" class="tw-mt-2 tw-text-sm tw-text-left tw-text-error-500 tw-font-normal">
|
|
17
|
+
{{ slugErrorMessage }}
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="tw-font-sans tw-text-center" :style="isMobile ? 'padding-left: 1.5rem; padding-right: 1.5rem;' : ''">
|
|
22
|
+
<Button
|
|
23
|
+
:label="setUrlLabel"
|
|
24
|
+
:variant="isDesignCom ? 'primary' : 'primary-with-icon'"
|
|
25
|
+
icon="chevron-right-wide"
|
|
26
|
+
:disabled="isPublishingDisabled"
|
|
27
|
+
class="tw-my-4"
|
|
28
|
+
:full-width="isMobile"
|
|
29
|
+
data-test-brand-page-publish-button
|
|
30
|
+
@on-click="onPublish"
|
|
31
|
+
/>
|
|
32
|
+
<Button
|
|
33
|
+
:label="hasAlreadyPurchasedDomainCloseButtonLabel"
|
|
34
|
+
variant="no-border"
|
|
35
|
+
size="large"
|
|
36
|
+
class="tw-my-4"
|
|
37
|
+
:full-width="isMobile"
|
|
38
|
+
@on-click="onCloseModal"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
<script>
|
|
44
|
+
import TextInput from '../../../../atoms/components/TextInput/TextInput.vue';
|
|
45
|
+
import Button from '../../../../atoms/components/Button/Button.vue';
|
|
46
|
+
import mediaQueryMixin from '../../../mixins/mediaQueryMixin';
|
|
47
|
+
import { publishBrandPageModalTr } from '../../../../useSharedLibTranslate';
|
|
48
|
+
|
|
49
|
+
export default {
|
|
50
|
+
components: {
|
|
51
|
+
TextInput,
|
|
52
|
+
Button,
|
|
53
|
+
},
|
|
54
|
+
mixins: [mediaQueryMixin],
|
|
55
|
+
props: {
|
|
56
|
+
brandPageBaseUrl: {
|
|
57
|
+
type: String,
|
|
58
|
+
required: true,
|
|
59
|
+
default: undefined,
|
|
60
|
+
},
|
|
61
|
+
brandPageSlug: {
|
|
62
|
+
type: String,
|
|
63
|
+
required: true,
|
|
64
|
+
default: undefined,
|
|
65
|
+
},
|
|
66
|
+
slugValidationError: {
|
|
67
|
+
type: String,
|
|
68
|
+
required: true,
|
|
69
|
+
default: undefined,
|
|
70
|
+
},
|
|
71
|
+
errorMessage: {
|
|
72
|
+
type: String,
|
|
73
|
+
required: false,
|
|
74
|
+
default: undefined,
|
|
75
|
+
},
|
|
76
|
+
publishErrorMessage: {
|
|
77
|
+
type: String,
|
|
78
|
+
required: false,
|
|
79
|
+
default: undefined,
|
|
80
|
+
},
|
|
81
|
+
isPublishing: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
required: true,
|
|
84
|
+
default: false,
|
|
85
|
+
},
|
|
86
|
+
isDesignCom: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
required: true,
|
|
89
|
+
default: false,
|
|
90
|
+
},
|
|
91
|
+
brandPageType: {
|
|
92
|
+
type: String,
|
|
93
|
+
required: true,
|
|
94
|
+
default: '',
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
emits: ['close-modal', 'internal-publish-brand-page', 'on-slug-changed'],
|
|
98
|
+
setup() {
|
|
99
|
+
return {
|
|
100
|
+
publishBrandPageModalTr,
|
|
101
|
+
slugInputPlaceholderYourNameLabel: publishBrandPageModalTr('slugInputPlaceholderYourNameLabel'),
|
|
102
|
+
slugInputPlaceholderYourBusinessNameLabel: publishBrandPageModalTr('slugInputPlaceholderYourBusinessNameLabel'),
|
|
103
|
+
setUrlLabel: publishBrandPageModalTr('setUrlLabel'),
|
|
104
|
+
hasAlreadyPurchasedDomainCloseButtonLabel: publishBrandPageModalTr('hasAlreadyPurchasedDomainCloseButtonLabel'),
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
data() {
|
|
108
|
+
return {
|
|
109
|
+
domainTypeValue: this.radioValue,
|
|
110
|
+
internalSlug: this.brandPageSlug,
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
computed: {
|
|
114
|
+
brandPageBaseUrlWithoutHttps() {
|
|
115
|
+
return this.brandPageBaseUrl.replace('https://', '');
|
|
116
|
+
},
|
|
117
|
+
allowPublish() {
|
|
118
|
+
return this.internalSlug && !this.slugValidationError;
|
|
119
|
+
},
|
|
120
|
+
slugErrorMessage() {
|
|
121
|
+
return this.slugValidationError ? this.slugValidationError : this.publishErrorMessage;
|
|
122
|
+
},
|
|
123
|
+
isInputEnabled() {
|
|
124
|
+
return this.isPublishing;
|
|
125
|
+
},
|
|
126
|
+
isPublishingDisabled() {
|
|
127
|
+
return !this.allowPublish || this.isPublishing;
|
|
128
|
+
},
|
|
129
|
+
getPlaceHolder() {
|
|
130
|
+
return this.brandPageType === 'brandContact'
|
|
131
|
+
? this.slugInputPlaceholderYourNameLabel
|
|
132
|
+
: this.slugInputPlaceholderYourBusinessNameLabel;
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
watch: {
|
|
136
|
+
brandPageSlug(slug) {
|
|
137
|
+
this.internalSlug = slug;
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
mounted() {
|
|
141
|
+
this.internalSlug = this.brandPageSlug;
|
|
142
|
+
},
|
|
143
|
+
methods: {
|
|
144
|
+
onCloseModal() {
|
|
145
|
+
this.$emit('close-modal');
|
|
146
|
+
},
|
|
147
|
+
onSlugChanged(e) {
|
|
148
|
+
this.$emit('on-slug-changed', e);
|
|
149
|
+
},
|
|
150
|
+
onPublish() {
|
|
151
|
+
this.$emit('internal-publish-brand-page', this.internalSlug, undefined);
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
</script>
|
package/tailwind.config.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const bcTheme = require(
|
|
2
|
-
const bpTheme = require(
|
|
3
|
-
const dcTheme = require(
|
|
4
|
-
const cdTheme = require(
|
|
5
|
-
const dcomTheme = require(
|
|
6
|
-
const viewports = require(
|
|
1
|
+
const bcTheme = require('./src/themes/bc');
|
|
2
|
+
const bpTheme = require('./src/themes/bp');
|
|
3
|
+
const dcTheme = require('./src/themes/dc');
|
|
4
|
+
const cdTheme = require('./src/themes/cd');
|
|
5
|
+
const dcomTheme = require('./src/themes/dcom');
|
|
6
|
+
const viewports = require('./src/viewports');
|
|
7
7
|
|
|
8
8
|
const designSystemConfig = {
|
|
9
9
|
themes: {
|
|
@@ -20,7 +20,7 @@ const theme = designSystemConfig.themes[process.env.tailwindTheme]; // use the e
|
|
|
20
20
|
module.exports = {
|
|
21
21
|
prefix: 'tw-',
|
|
22
22
|
content: ['./src/**/components/**/*.vue'],
|
|
23
|
-
safelist: [{ pattern: /^!tw-p-/ }, { pattern: /^tw-overflow-y-auto$/ }],
|
|
23
|
+
safelist: [{ pattern: /^!tw-p-/ }, { pattern: /^tw-overflow-y-auto$/ }, { pattern: /^tw-line-clamp-/ }],
|
|
24
24
|
theme: {
|
|
25
25
|
...theme,
|
|
26
26
|
extend: {
|
|
@@ -34,4 +34,3 @@ module.exports = {
|
|
|
34
34
|
preflight: true,
|
|
35
35
|
},
|
|
36
36
|
};
|
|
37
|
-
|