@lightspeed/crane 1.1.1 → 1.1.3

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.
Files changed (132) hide show
  1. package/dist/app.d.mts +76 -8
  2. package/dist/app.d.ts +76 -8
  3. package/dist/app.mjs +1 -1
  4. package/dist/cli.mjs +10 -23
  5. package/package.json +6 -5
  6. package/template/footers/example-footer/ExampleFooter.vue +12 -2
  7. package/template/footers/example-footer/assets/cart.svg +19 -0
  8. package/template/footers/example-footer/component/LegalLinks.vue +20 -0
  9. package/template/footers/example-footer/component/MadeWith.vue +23 -0
  10. package/template/footers/example-footer/component/ReportAbuse.vue +4 -3
  11. package/template/footers/example-footer/showcases/1.ts +1 -1
  12. package/template/headers/example-header/ExampleHeader.vue +38 -4
  13. package/template/headers/example-header/assets/account_icon.svg +11 -0
  14. package/template/headers/example-header/assets/lightspeed_logo.png +0 -0
  15. package/template/headers/example-header/component/Account.vue +20 -0
  16. package/template/headers/example-header/component/Cart.vue +14 -33
  17. package/template/headers/example-header/component/Logo.vue +95 -0
  18. package/template/headers/example-header/component/NavigationMenu.vue +53 -0
  19. package/template/headers/example-header/settings/translations.ts +6 -2
  20. package/template/headers/example-header/showcases/1.ts +32 -3
  21. package/template/headers/example-header/showcases/2.ts +42 -0
  22. package/template/headers/example-header/showcases/translations.ts +14 -2
  23. package/template/package.json +1 -1
  24. package/template/reference/sections/about-us/AboutUs.vue +73 -0
  25. package/template/reference/sections/about-us/assets/our_company_in_numbers.jpg +0 -0
  26. package/template/reference/sections/about-us/assets/our_company_in_numbers_preview.jpg +0 -0
  27. package/template/reference/sections/about-us/assets/our_team.jpg +0 -0
  28. package/template/reference/sections/about-us/assets/our_team_preview.jpg +0 -0
  29. package/template/reference/sections/about-us/client.ts +6 -0
  30. package/template/reference/sections/about-us/component/Image.vue +94 -0
  31. package/template/reference/sections/about-us/component/Stats.vue +155 -0
  32. package/template/reference/sections/about-us/component/Title.vue +32 -0
  33. package/template/reference/sections/about-us/server.ts +6 -0
  34. package/template/reference/sections/about-us/settings/content.ts +64 -0
  35. package/template/reference/sections/about-us/settings/design.ts +74 -0
  36. package/template/reference/sections/about-us/settings/layout.ts +12 -0
  37. package/template/reference/sections/about-us/settings/translations.ts +151 -0
  38. package/template/reference/sections/about-us/showcases/1.ts +176 -0
  39. package/template/reference/sections/about-us/showcases/2.ts +160 -0
  40. package/template/reference/sections/about-us/showcases/translations.ts +259 -0
  41. package/template/reference/sections/about-us/type.ts +5 -0
  42. package/template/reference/sections/about-us/util/visibility-provider.ts +27 -0
  43. package/template/reference/sections/intro-slider/IntroSlider.vue +77 -0
  44. package/template/reference/sections/intro-slider/assets/bike_1.jpg +0 -0
  45. package/template/reference/sections/intro-slider/assets/bike_1@2x.jpg +0 -0
  46. package/template/reference/sections/intro-slider/assets/bike_2.jpg +0 -0
  47. package/template/reference/sections/intro-slider/assets/bike_2@2x.jpg +0 -0
  48. package/template/reference/sections/intro-slider/assets/bike_3.jpg +0 -0
  49. package/template/reference/sections/intro-slider/assets/bike_3@2x.jpg +0 -0
  50. package/template/reference/sections/intro-slider/assets/bike_4.jpg +0 -0
  51. package/template/reference/sections/intro-slider/assets/bike_4@2x.jpg +0 -0
  52. package/template/reference/sections/intro-slider/assets/bike_5.jpg +0 -0
  53. package/template/reference/sections/intro-slider/assets/bike_5@2x.jpg +0 -0
  54. package/template/reference/sections/intro-slider/assets/bike_6.jpg +0 -0
  55. package/template/reference/sections/intro-slider/assets/bike_6@2x.jpg +0 -0
  56. package/template/reference/sections/intro-slider/assets/category_1.jpg +0 -0
  57. package/template/reference/sections/intro-slider/assets/category_1@2x.jpg +0 -0
  58. package/template/reference/sections/intro-slider/assets/category_2.jpg +0 -0
  59. package/template/reference/sections/intro-slider/assets/category_2@2x.jpg +0 -0
  60. package/template/reference/sections/intro-slider/assets/category_3.jpg +0 -0
  61. package/template/reference/sections/intro-slider/assets/category_3@2x.jpg +0 -0
  62. package/template/reference/sections/intro-slider/assets/category_5.jpg +0 -0
  63. package/template/reference/sections/intro-slider/assets/category_5@2x.jpg +0 -0
  64. package/template/reference/sections/intro-slider/assets/category_6.jpg +0 -0
  65. package/template/reference/sections/intro-slider/assets/category_6@2x.jpg +0 -0
  66. package/template/reference/sections/intro-slider/assets/custom_section_showcase_1_preview.png +0 -0
  67. package/template/reference/sections/intro-slider/assets/custom_section_showcase_2_preview.png +0 -0
  68. package/template/reference/sections/intro-slider/client.ts +5 -0
  69. package/template/reference/sections/intro-slider/component/Slider.vue +235 -0
  70. package/template/reference/sections/intro-slider/component/Title.vue +106 -0
  71. package/template/reference/sections/intro-slider/entity/color.ts +4 -0
  72. package/template/reference/sections/intro-slider/server.ts +5 -0
  73. package/template/reference/sections/intro-slider/settings/content.ts +43 -0
  74. package/template/reference/sections/intro-slider/settings/design.ts +88 -0
  75. package/template/reference/sections/intro-slider/settings/layout.ts +12 -0
  76. package/template/reference/sections/intro-slider/settings/translations.ts +53 -0
  77. package/template/reference/sections/intro-slider/showcases/1.ts +274 -0
  78. package/template/reference/sections/intro-slider/showcases/2.ts +270 -0
  79. package/template/reference/sections/intro-slider/showcases/translations.ts +88 -0
  80. package/template/reference/sections/intro-slider/type.ts +5 -0
  81. package/template/reference/sections/tag-lines/TagLines.vue +158 -0
  82. package/template/reference/sections/tag-lines/assets/explore_our_holiday_gift_guide.jpg +0 -0
  83. package/template/reference/sections/tag-lines/assets/fall_is_here.jpg +0 -0
  84. package/template/reference/sections/tag-lines/assets/fall_is_here_preview.jpg +0 -0
  85. package/template/reference/sections/tag-lines/assets/folding_bikes.jpg +0 -0
  86. package/template/reference/sections/tag-lines/assets/hybrid_bikes.jpg +0 -0
  87. package/template/reference/sections/tag-lines/assets/mountain_and_road_bikes.jpg +0 -0
  88. package/template/reference/sections/tag-lines/assets/shop_chelsea_boots.jpg +0 -0
  89. package/template/reference/sections/tag-lines/assets/sweater_weather.jpg +0 -0
  90. package/template/reference/sections/tag-lines/assets/what_we_sell.jpg +0 -0
  91. package/template/reference/sections/tag-lines/assets/what_we_sell_preview.jpg +0 -0
  92. package/template/reference/sections/tag-lines/client.ts +5 -0
  93. package/template/reference/sections/tag-lines/component/HighlightedText.vue +50 -0
  94. package/template/reference/sections/tag-lines/component/SectionImage.vue +78 -0
  95. package/template/reference/sections/tag-lines/component/Title.vue +51 -0
  96. package/template/reference/sections/tag-lines/composables/highlighted-text-image-list.ts +34 -0
  97. package/template/reference/sections/tag-lines/server.ts +5 -0
  98. package/template/reference/sections/tag-lines/settings/content.ts +37 -0
  99. package/template/reference/sections/tag-lines/settings/design.ts +81 -0
  100. package/template/reference/sections/tag-lines/settings/layout.ts +12 -0
  101. package/template/reference/sections/tag-lines/settings/translations.ts +61 -0
  102. package/template/reference/sections/tag-lines/showcases/1.ts +190 -0
  103. package/template/reference/sections/tag-lines/showcases/2.ts +190 -0
  104. package/template/reference/sections/tag-lines/showcases/translations.ts +49 -0
  105. package/template/reference/sections/tag-lines/type.ts +5 -0
  106. package/template/reference/shared/components/Button.vue +151 -0
  107. package/template/reference/shared/components/SectionWrapper.vue +26 -0
  108. package/template/reference/shared/components/Tagline.vue +45 -0
  109. package/template/reference/shared/utils/color.ts +16 -0
  110. package/template/reference/shared/utils/styles.ts +12 -0
  111. package/template/reference/templates/assets/reference_template_apparel_cover_image.jpg +0 -0
  112. package/template/reference/templates/assets/reference_template_bike_cover_image.jpg +0 -0
  113. package/template/reference/templates/reference-template-apparel.ts +44 -0
  114. package/template/reference/templates/reference-template-bike.ts +44 -0
  115. package/template/sections/example-section/ExampleSection.vue +8 -19
  116. package/template/sections/example-section/assets/bike_accessories_high.jpg +0 -0
  117. package/template/sections/example-section/assets/bike_accessories_low.jpg +0 -0
  118. package/template/sections/example-section/assets/bike_new_arrivals_high.jpg +0 -0
  119. package/template/sections/example-section/assets/bike_new_arrivals_low.jpg +0 -0
  120. package/template/sections/example-section/assets/custom_section_showcase_3_preview.jpg +0 -0
  121. package/template/sections/example-section/assets/fixed_gears_high.jpg +0 -0
  122. package/template/sections/example-section/assets/fixed_gears_low.jpg +0 -0
  123. package/template/sections/example-section/assets/repair_service_high.jpg +0 -0
  124. package/template/sections/example-section/assets/repair_service_low.jpg +0 -0
  125. package/template/sections/example-section/settings/translations.ts +39 -7
  126. package/template/sections/example-section/showcases/3.ts +198 -0
  127. package/template/sections/example-section/showcases/translations.ts +49 -1
  128. package/template/shared/components/LanguageSelector.vue +75 -0
  129. package/template/shared/components/SectionWrapper.vue +26 -0
  130. package/template/templates/template.ts +28 -43
  131. package/types.d.ts +264 -141
  132. package/template/headers/example-header/component/SampleComponent.vue +0 -11
@@ -0,0 +1,190 @@
1
+ export default {
2
+ showcaseId: '1',
3
+ layoutId: 'Image_With_Border_Radius',
4
+ previewImage: {
5
+ set: {
6
+ ORIGINAL: {
7
+ url: 'fall_is_here_preview.jpg',
8
+ },
9
+ },
10
+ },
11
+ blockName: '$label.showcase_1.blockName',
12
+ content: {
13
+ section_tagline: {
14
+ type: 'INPUTBOX',
15
+ text: '$label.showcase_1.section_tagline.text',
16
+ },
17
+ section_title: {
18
+ type: 'INPUTBOX',
19
+ text: '$label.showcase_1.section_title.text',
20
+ },
21
+ highlighted_text: {
22
+ type: 'DECK',
23
+ cards: [
24
+ {
25
+ settings: {
26
+ text: {
27
+ type: 'INPUTBOX',
28
+ text: '$label.showcase_1.highlighted_text_1.text',
29
+ },
30
+ image_content: {
31
+ type: 'IMAGE',
32
+ imageData: {
33
+ set: {
34
+ LOW_RES: {
35
+ url: 'sweater_weather.jpg',
36
+ },
37
+ MOBILE_WEBP_LOW_RES: {
38
+ url: 'sweater_weather.jpg',
39
+ },
40
+ MOBILE_WEBP_HI_RES: {
41
+ url: 'sweater_weather.jpg',
42
+ },
43
+ WEBP_LOW_RES: {
44
+ url: 'sweater_weather.jpg',
45
+ },
46
+ WEBP_HI_2X_RES: {
47
+ url: 'sweater_weather.jpg',
48
+ },
49
+ },
50
+ borderInfo: {},
51
+ },
52
+ },
53
+ },
54
+ },
55
+ {
56
+ settings: {
57
+ text: {
58
+ type: 'INPUTBOX',
59
+ text: '$label.showcase_1.highlighted_text_2.text',
60
+ },
61
+ image_content: {
62
+ type: 'IMAGE',
63
+ imageData: {
64
+ set: {
65
+ LOW_RES: {
66
+ url: 'shop_chelsea_boots.jpg',
67
+ },
68
+ MOBILE_WEBP_LOW_RES: {
69
+ url: 'shop_chelsea_boots.jpg',
70
+ },
71
+ MOBILE_WEBP_HI_RES: {
72
+ url: 'shop_chelsea_boots.jpg',
73
+ },
74
+ WEBP_LOW_RES: {
75
+ url: 'shop_chelsea_boots.jpg',
76
+ },
77
+ WEBP_HI_2X_RES: {
78
+ url: 'shop_chelsea_boots.jpg',
79
+ },
80
+ },
81
+ borderInfo: {},
82
+ },
83
+ },
84
+ },
85
+ },
86
+ {
87
+ settings: {
88
+ text: {
89
+ type: 'INPUTBOX',
90
+ text: '$label.showcase_1.highlighted_text_3.text',
91
+ },
92
+ image_content: {
93
+ type: 'IMAGE',
94
+ imageData: {
95
+ set: {
96
+ LOW_RES: {
97
+ url: 'explore_our_holiday_gift_guide.jpg',
98
+ },
99
+ MOBILE_WEBP_LOW_RES: {
100
+ url: 'explore_our_holiday_gift_guide.jpg',
101
+ },
102
+ MOBILE_WEBP_HI_RES: {
103
+ url: 'explore_our_holiday_gift_guide.jpg',
104
+ },
105
+ WEBP_LOW_RES: {
106
+ url: 'explore_our_holiday_gift_guide.jpg',
107
+ },
108
+ WEBP_HI_2X_RES: {
109
+ url: 'explore_our_holiday_gift_guide.jpg',
110
+ },
111
+ },
112
+ borderInfo: {},
113
+ },
114
+ },
115
+ },
116
+ },
117
+ ],
118
+ },
119
+ section_image: {
120
+ type: 'IMAGE',
121
+ imageData: {
122
+ set: {
123
+ LOW_RES: {
124
+ url: 'fall_is_here.jpg',
125
+ },
126
+ MOBILE_WEBP_LOW_RES: {
127
+ url: 'fall_is_here.jpg',
128
+ },
129
+ MOBILE_WEBP_HI_RES: {
130
+ url: 'fall_is_here.jpg',
131
+ },
132
+ WEBP_LOW_RES: {
133
+ url: 'fall_is_here.jpg',
134
+ },
135
+ WEBP_HI_2X_RES: {
136
+ url: 'fall_is_here.jpg',
137
+ },
138
+ },
139
+ borderInfo: {},
140
+ },
141
+ },
142
+ },
143
+ design: {
144
+ background: {
145
+ type: 'BACKGROUND',
146
+ style: 'COLOR',
147
+ color: '#FFFFFF',
148
+ },
149
+ section_tagline: {
150
+ type: 'TEXT',
151
+ font: 'noto_serif',
152
+ size: 16,
153
+ bold: true,
154
+ italic: false,
155
+ color: '#F4EFE3',
156
+ },
157
+ section_title: {
158
+ type: 'TEXT',
159
+ font: 'noto_serif',
160
+ size: 48,
161
+ bold: true,
162
+ italic: false,
163
+ color: '#000000',
164
+ },
165
+ highlighted_text_1: {
166
+ type: 'TEXT',
167
+ font: 'noto_serif',
168
+ size: 48,
169
+ bold: true,
170
+ italic: false,
171
+ color: '#FFBF24',
172
+ },
173
+ highlighted_text_2: {
174
+ type: 'TEXT',
175
+ font: 'noto_serif',
176
+ size: 48,
177
+ bold: true,
178
+ italic: false,
179
+ color: '#6281C5',
180
+ },
181
+ highlighted_text_3: {
182
+ type: 'TEXT',
183
+ font: 'noto_serif',
184
+ size: 48,
185
+ bold: true,
186
+ italic: false,
187
+ color: '#C5629A',
188
+ },
189
+ },
190
+ } as const;
@@ -0,0 +1,190 @@
1
+ export default {
2
+ showcaseId: '2',
3
+ layoutId: 'Image_Without_Border_Radius',
4
+ previewImage: {
5
+ set: {
6
+ ORIGINAL: {
7
+ url: 'what_we_sell_preview.jpg',
8
+ },
9
+ },
10
+ },
11
+ blockName: '$label.showcase_2.blockName',
12
+ content: {
13
+ section_tagline: {
14
+ type: 'INPUTBOX',
15
+ text: '$label.showcase_2.section_tagline.text',
16
+ },
17
+ section_title: {
18
+ type: 'INPUTBOX',
19
+ text: '$label.showcase_2.section_title.text',
20
+ },
21
+ highlighted_text: {
22
+ type: 'DECK',
23
+ cards: [
24
+ {
25
+ settings: {
26
+ text: {
27
+ type: 'INPUTBOX',
28
+ text: '$label.showcase_2.highlighted_text_1.text',
29
+ },
30
+ image_content: {
31
+ type: 'IMAGE',
32
+ imageData: {
33
+ set: {
34
+ LOW_RES: {
35
+ url: 'mountain_and_road_bikes.jpg',
36
+ },
37
+ MOBILE_WEBP_LOW_RES: {
38
+ url: 'mountain_and_road_bikes.jpg',
39
+ },
40
+ MOBILE_WEBP_HI_RES: {
41
+ url: 'mountain_and_road_bikes.jpg',
42
+ },
43
+ WEBP_LOW_RES: {
44
+ url: 'mountain_and_road_bikes.jpg',
45
+ },
46
+ WEBP_HI_2X_RES: {
47
+ url: 'mountain_and_road_bikes.jpg',
48
+ },
49
+ },
50
+ borderInfo: {},
51
+ },
52
+ },
53
+ },
54
+ },
55
+ {
56
+ settings: {
57
+ text: {
58
+ type: 'INPUTBOX',
59
+ text: '$label.showcase_2.highlighted_text_2.text',
60
+ },
61
+ image_content: {
62
+ type: 'IMAGE',
63
+ imageData: {
64
+ set: {
65
+ LOW_RES: {
66
+ url: 'hybrid_bikes.jpg',
67
+ },
68
+ MOBILE_WEBP_LOW_RES: {
69
+ url: 'hybrid_bikes.jpg',
70
+ },
71
+ MOBILE_WEBP_HI_RES: {
72
+ url: 'hybrid_bikes.jpg',
73
+ },
74
+ WEBP_LOW_RES: {
75
+ url: 'hybrid_bikes.jpg',
76
+ },
77
+ WEBP_HI_2X_RES: {
78
+ url: 'hybrid_bikes.jpg',
79
+ },
80
+ },
81
+ borderInfo: {},
82
+ },
83
+ },
84
+ },
85
+ },
86
+ {
87
+ settings: {
88
+ text: {
89
+ type: 'INPUTBOX',
90
+ text: '$label.showcase_2.highlighted_text_3.text',
91
+ },
92
+ image_content: {
93
+ type: 'IMAGE',
94
+ imageData: {
95
+ set: {
96
+ LOW_RES: {
97
+ url: 'folding_bikes.jpg',
98
+ },
99
+ MOBILE_WEBP_LOW_RES: {
100
+ url: 'folding_bikes.jpg',
101
+ },
102
+ MOBILE_WEBP_HI_RES: {
103
+ url: 'folding_bikes.jpg',
104
+ },
105
+ WEBP_LOW_RES: {
106
+ url: 'folding_bikes.jpg',
107
+ },
108
+ WEBP_HI_2X_RES: {
109
+ url: 'folding_bikes.jpg',
110
+ },
111
+ },
112
+ borderInfo: {},
113
+ },
114
+ },
115
+ },
116
+ },
117
+ ],
118
+ },
119
+ section_image: {
120
+ type: 'IMAGE',
121
+ imageData: {
122
+ set: {
123
+ LOW_RES: {
124
+ url: 'what_we_sell.jpg',
125
+ },
126
+ MOBILE_WEBP_LOW_RES: {
127
+ url: 'what_we_sell.jpg',
128
+ },
129
+ MOBILE_WEBP_HI_RES: {
130
+ url: 'what_we_sell.jpg',
131
+ },
132
+ WEBP_LOW_RES: {
133
+ url: 'what_we_sell.jpg',
134
+ },
135
+ WEBP_HI_2X_RES: {
136
+ url: 'what_we_sell.jpg',
137
+ },
138
+ },
139
+ borderInfo: {},
140
+ },
141
+ },
142
+ },
143
+ design: {
144
+ background: {
145
+ type: 'BACKGROUND',
146
+ style: 'GRADIENT',
147
+ color: ['#131313', '#292929'],
148
+ },
149
+ section_tagline: {
150
+ type: 'TEXT',
151
+ font: 'pt_mono',
152
+ size: 16,
153
+ bold: true,
154
+ italic: false,
155
+ color: '#F4EFE3',
156
+ },
157
+ section_title: {
158
+ type: 'TEXT',
159
+ font: 'pt_mono',
160
+ size: 48,
161
+ bold: true,
162
+ italic: false,
163
+ color: '#FFFFFF',
164
+ },
165
+ highlighted_text_1: {
166
+ type: 'TEXT',
167
+ font: 'pt_mono',
168
+ size: 48,
169
+ bold: true,
170
+ italic: false,
171
+ color: '#BAA33E',
172
+ },
173
+ highlighted_text_2: {
174
+ type: 'TEXT',
175
+ font: 'pt_mono',
176
+ size: 48,
177
+ bold: true,
178
+ italic: false,
179
+ color: '#8A91D0',
180
+ },
181
+ highlighted_text_3: {
182
+ type: 'TEXT',
183
+ font: 'pt_mono',
184
+ size: 48,
185
+ bold: true,
186
+ italic: false,
187
+ color: '#C3455C',
188
+ },
189
+ },
190
+ } as const;
@@ -0,0 +1,49 @@
1
+ export default {
2
+ en: {
3
+ '$label.showcase_1.blockName': 'Reference Section – Tag lines',
4
+ '$label.showcase_1.section_tagline.text': 'Seasonal',
5
+ '$label.showcase_1.section_title.text': 'Fall is here:',
6
+ '$label.showcase_1.highlighted_text_1.text': 'sweater weather',
7
+ '$label.showcase_1.highlighted_text_2.text': 'shop chelsea boots',
8
+ '$label.showcase_1.highlighted_text_3.text': 'explore our holiday gift guide',
9
+
10
+ '$label.showcase_2.blockName': 'Reference Section – Tag lines',
11
+ '$label.showcase_2.section_tagline.text': 'Our bikes',
12
+ '$label.showcase_2.section_title.text': 'What we sell:',
13
+ '$label.showcase_2.highlighted_text_1.text': 'mountain and road bikes',
14
+ '$label.showcase_2.highlighted_text_2.text': 'hybrid bikes',
15
+ '$label.showcase_2.highlighted_text_3.text': 'folding bikes',
16
+ },
17
+
18
+ nl: {
19
+ '$label.showcase_1.blockName': 'Referentie Sectie – Taglines',
20
+ '$label.showcase_1.section_tagline.text': 'Seizoensgebonden',
21
+ '$label.showcase_1.section_title.text': 'De herfst is hier:',
22
+ '$label.showcase_1.highlighted_text_1.text': 'trui weer',
23
+ '$label.showcase_1.highlighted_text_2.text': 'shop chelsea boots',
24
+ '$label.showcase_1.highlighted_text_3.text': 'ontdek onze vakantiecadeaugids',
25
+
26
+ '$label.showcase_2.blockName': 'Referentie Sectie – Taglines',
27
+ '$label.showcase_2.section_tagline.text': 'Onze fietsen',
28
+ '$label.showcase_2.section_title.text': 'Wat we verkopen:',
29
+ '$label.showcase_2.highlighted_text_1.text': 'mountain- en racefietsen',
30
+ '$label.showcase_2.highlighted_text_2.text': 'hybride fietsen',
31
+ '$label.showcase_2.highlighted_text_3.text': 'vouwfietsen',
32
+ },
33
+
34
+ fr: {
35
+ '$label.showcase_1.blockName': 'Section de référence – Slogans',
36
+ '$label.showcase_1.section_tagline.text': 'Saisonnier',
37
+ '$label.showcase_1.section_title.text': 'L\'automne est là:',
38
+ '$label.showcase_1.highlighted_text_1.text': 'temps des pulls',
39
+ '$label.showcase_1.highlighted_text_2.text': 'achetez des bottes chelsea',
40
+ '$label.showcase_1.highlighted_text_3.text': 'découvrez notre guide des cadeaux de vacances',
41
+
42
+ '$label.showcase_2.blockName': 'Section de référence – Slogans',
43
+ '$label.showcase_2.section_tagline.text': 'Nos vélos',
44
+ '$label.showcase_2.section_title.text': 'Ce que nous vendons:',
45
+ '$label.showcase_2.highlighted_text_1.text': 'vélos de montagne et de route',
46
+ '$label.showcase_2.highlighted_text_2.text': 'vélos hybrides',
47
+ '$label.showcase_2.highlighted_text_3.text': 'vélos pliants',
48
+ },
49
+ } as const;
@@ -0,0 +1,5 @@
1
+ import ContentSettings from './settings/content.ts';
2
+ import DesignSettings from './settings/design.ts';
3
+
4
+ export type Content = InferContentType<typeof ContentSettings>;
5
+ export type Design = InferDesignType<typeof DesignSettings>;
@@ -0,0 +1,151 @@
1
+ <template>
2
+ <button
3
+ type="button"
4
+ :class="buttonClass"
5
+ @click="content.performAction"
6
+ >
7
+ {{ content.title }}
8
+ <div
9
+ v-if="isLink"
10
+ class="button__icon"
11
+ >
12
+ <svg
13
+ width="14"
14
+ height="11"
15
+ viewBox="0 0 14 11"
16
+ xmlns="http://www.w3.org/2000/svg"
17
+ >
18
+ <g
19
+ stroke="currentColor"
20
+ stroke-linecap="round"
21
+ fill="none"
22
+ fill-rule="evenodd"
23
+ >
24
+ <path d="M9.5.5l4 5-4 5" stroke-linejoin="round" />
25
+ <path d="M13.5 5.5H.5" />
26
+ </g>
27
+ </svg>
28
+ </div>
29
+ </button>
30
+ </template>
31
+
32
+ <script setup lang="ts">
33
+ import { computed, CSSProperties } from 'vue';
34
+ import { ButtonContent } from '@lightspeed/crane';
35
+
36
+ import { calculateFontColor } from '../utils/color.ts';
37
+
38
+ const props = defineProps<{
39
+ content: ButtonContent;
40
+ design: ButtonDesignData;
41
+ }>();
42
+
43
+ const color = computed<Color>(() => props.design.color as Color);
44
+ const fontColor = computed<string>(() => calculateFontColor(color.value.rgba));
45
+
46
+ const isLink = computed<boolean>(() => props.design.appearance === 'text-link');
47
+
48
+ const buttonClass = computed(() => ([
49
+ 'button',
50
+ {
51
+ small: props.design.size === 'small',
52
+ medium: props.design.size === 'medium',
53
+ large: props.design.size === 'large',
54
+ outline: props.design.appearance === 'outline-button',
55
+ solid: props.design.appearance === 'solid-button',
56
+ link: isLink.value,
57
+ pill: props.design.style === 'pill',
58
+ rectangle: props.design.style === 'rectangle',
59
+ round: props.design.style === 'round-corner',
60
+ },
61
+ ]));
62
+
63
+ const buttonStyles = computed<CSSProperties>(() => {
64
+ const style: CSSProperties = {
65
+ fontFamily: props.design.font,
66
+ color: fontColor.value,
67
+ };
68
+
69
+ if (props.design.appearance === 'solid-button') {
70
+ style.backgroundColor = color.value.raw;
71
+ }
72
+
73
+ if (props.design.appearance !== 'solid-button') {
74
+ style.color = color.value.raw;
75
+ }
76
+
77
+ return style;
78
+ });
79
+ </script>
80
+
81
+ <style scoped lang="scss">
82
+ .button {
83
+ --font-family: v-bind(buttonStyles.fontFamily);
84
+ --background-color: v-bind(buttonStyles.backgroundColor);
85
+ --color: v-bind(buttonStyles.color);
86
+
87
+ padding: 0 24px;
88
+ background-color: var(--background-color);
89
+ font-family: var(--font-family);
90
+ font-weight: 700;
91
+ color: var(--color);
92
+ cursor: pointer;
93
+ overflow: hidden;
94
+ text-overflow: ellipsis;
95
+ white-space: pre;
96
+ transition: opacity .2s ease-in-out;
97
+
98
+ &:hover {
99
+ opacity: 0.5;
100
+
101
+ .button__icon {
102
+ transform: translateX(4px);
103
+ }
104
+ }
105
+
106
+ &__icon {
107
+ margin-left: 5px;
108
+ transition: transform 0.3s ease;
109
+ }
110
+
111
+ &.pill {
112
+ border-radius: 32px;
113
+ }
114
+
115
+ &.round {
116
+ border-radius: 10px;
117
+ }
118
+
119
+ &.small {
120
+ height: 30px;
121
+ font-size: 12px;
122
+ }
123
+
124
+ &.medium {
125
+ height: 48px;
126
+ font-size: 16px;
127
+ }
128
+
129
+ &.large {
130
+ height: 60px;
131
+ font-size: 16px;
132
+ }
133
+
134
+ &.solid {
135
+ border: none;
136
+ }
137
+
138
+ &.outline {
139
+ border: 2px solid;
140
+ background: none;
141
+ }
142
+
143
+ &.link {
144
+ background: none;
145
+ border: none;
146
+ display: flex;
147
+ align-items: center;
148
+ padding: 0;
149
+ }
150
+ }
151
+ </style>
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <section class="section">
3
+ <div class="section__wrapper">
4
+ <slot />
5
+ </div>
6
+ </section>
7
+ </template>
8
+
9
+ <style lang="scss" scoped>
10
+ .section {
11
+ padding: 60px 20px;
12
+
13
+ @media screen and (min-width: 700px) {
14
+ padding: 75px;
15
+ }
16
+
17
+ @media screen and (min-width: 1200px) {
18
+ padding: 100px;
19
+ }
20
+
21
+ &__wrapper {
22
+ max-width: 1120px;
23
+ margin: 0 auto;
24
+ }
25
+ }
26
+ </style>
@@ -0,0 +1,45 @@
1
+ <template>
2
+ <div class="tagline">
3
+ <slot />
4
+ </div>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import { computed, CSSProperties } from 'vue';
9
+ import { getTextStyles } from '../utils/styles.ts';
10
+
11
+ const props = defineProps<{
12
+ design: TextDesignData;
13
+ }>();
14
+
15
+ const backgroundLightness = computed<string>(() => `${(props.design.color as Color).hsl.l * 100}%`);
16
+ const taglineStyles = computed<CSSProperties>(() => getTextStyles(props.design));
17
+ </script>
18
+
19
+ <style lang="scss" scoped>
20
+ @function set-contrast-color($lightness) {
21
+ $threshold: 60%;
22
+ $contrastLightness: clamp(0%, calc((#{$lightness} - #{$threshold}) * -100), 100%);
23
+
24
+ @return hsl(0, 0%, $contrastLightness);
25
+ }
26
+
27
+ .tagline {
28
+ --font-size: v-bind(taglineStyles.fontSize);
29
+ --font-family: v-bind(taglineStyles.fontFamily);
30
+ --background-color: v-bind(taglineStyles.background);
31
+ --background-color-l: v-bind(backgroundLightness);
32
+ --font-style: v-bind(taglineStyles.fontStyle);
33
+ --font-weight: v-bind(taglineStyles.fontWeight);
34
+
35
+ display: inline-block;
36
+ padding: 8px 16px;
37
+ border-radius: 20px;
38
+ font-size: var(--font-size);
39
+ font-family: var(--font-family);
40
+ background: var(--background-color);
41
+ color: set-contrast-color(var(--background-color-l));
42
+ font-style: var(--font-style);
43
+ font-weight: var(--font-weight);
44
+ }
45
+ </style>
@@ -0,0 +1,16 @@
1
+ export function isColor(color: Color | GlobalColorsString): color is Color {
2
+ return typeof color === 'object' && 'hex' in color;
3
+ }
4
+
5
+ export function getColorString(color: Color | GlobalColorsString | string): string {
6
+ if (typeof color !== 'string' && isColor(color)) {
7
+ return color.hex;
8
+ }
9
+
10
+ return color;
11
+ }
12
+
13
+ export function calculateFontColor(rgbaColor: RGBAColor): string {
14
+ const brightness = (0.299 * rgbaColor.r + 0.587 * rgbaColor.g + 0.114 * rgbaColor.b) / 255;
15
+ return brightness < 0.5 ? '#ffffff' : '#000000';
16
+ }
@@ -0,0 +1,12 @@
1
+ import { CSSProperties } from 'vue';
2
+ import { getColorString } from './color.ts';
3
+
4
+ export function getTextStyles(design: TextDesignData): CSSProperties {
5
+ return {
6
+ fontSize: `${design.size}px`,
7
+ fontFamily: design.font,
8
+ background: design.color ? getColorString(design.color) : undefined,
9
+ fontStyle: design.italic ? 'italic' : 'normal',
10
+ fontWeight: design.bold ? 'bold' : 'normal',
11
+ };
12
+ }