@slicemachine/adapter-next 0.3.15-dev-next-release.8 → 0.3.15-dev-next-release.9
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/CustomerLogos/screenshot-default.png +0 -0
- package/dist/Hero/screenshot-default.png +0 -0
- package/dist/Hero/screenshot-imageRight.png +0 -0
- package/dist/hooks/sliceTemplateLibrary-read.cjs +5 -4
- package/dist/hooks/sliceTemplateLibrary-read.cjs.map +1 -1
- package/dist/hooks/sliceTemplateLibrary-read.js +5 -4
- package/dist/hooks/sliceTemplateLibrary-read.js.map +1 -1
- package/dist/sliceTemplates/AlternateGrid/index.cjs +425 -411
- package/dist/sliceTemplates/AlternateGrid/index.cjs.map +1 -1
- package/dist/sliceTemplates/AlternateGrid/index.js +425 -411
- package/dist/sliceTemplates/AlternateGrid/index.js.map +1 -1
- package/dist/sliceTemplates/CallToAction/index.cjs +2 -0
- package/dist/sliceTemplates/CallToAction/index.cjs.map +1 -1
- package/dist/sliceTemplates/CallToAction/index.js +2 -0
- package/dist/sliceTemplates/CallToAction/index.js.map +1 -1
- package/dist/sliceTemplates/CustomerLogos/index.cjs +258 -257
- package/dist/sliceTemplates/CustomerLogos/index.cjs.map +1 -1
- package/dist/sliceTemplates/CustomerLogos/index.js +258 -257
- package/dist/sliceTemplates/CustomerLogos/index.js.map +1 -1
- package/dist/sliceTemplates/Hero/index.cjs +814 -0
- package/dist/sliceTemplates/Hero/index.cjs.map +1 -0
- package/dist/sliceTemplates/Hero/index.d.ts +9 -0
- package/dist/sliceTemplates/Hero/index.js +814 -0
- package/dist/sliceTemplates/Hero/index.js.map +1 -0
- package/package.json +3 -3
- package/src/hooks/sliceTemplateLibrary-read.ts +2 -1
- package/src/sliceTemplates/AlternateGrid/index.ts +425 -411
- package/src/sliceTemplates/CallToAction/index.ts +2 -0
- package/src/sliceTemplates/CustomerLogos/index.ts +258 -257
- package/src/sliceTemplates/Hero/index.ts +824 -0
|
@@ -251,269 +251,270 @@ const createComponentContents = (model2, isTypeScriptProject) => {
|
|
|
251
251
|
const pascalName = pascalCase.pascalCase(model2.name);
|
|
252
252
|
if (isTypeScriptProject) {
|
|
253
253
|
return commonTags.stripIndent`
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
254
|
+
import { Content, isFilled, asText } from "@prismicio/client";
|
|
255
|
+
import { PrismicNextLink, PrismicNextImage } from "@prismicio/next";
|
|
256
|
+
import { SliceComponentProps } from "@prismicio/react";
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Props for \`${pascalName}\`.
|
|
260
|
+
*/
|
|
261
|
+
export type ${pascalName}Props = SliceComponentProps<Content.${pascalName}Slice>;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Component for "${model2.name}" Slices.
|
|
265
|
+
*/
|
|
266
|
+
const ${pascalName} = ({ slice }: ${pascalName}Props): JSX.Element => {
|
|
267
|
+
return (
|
|
268
|
+
<section
|
|
269
|
+
data-slice-type={slice.slice_type}
|
|
270
|
+
data-slice-variation={slice.variation}
|
|
271
|
+
className="es-bounded es-customer-logos"
|
|
272
|
+
>
|
|
273
|
+
<div className="es-bounded-content es-customer-logos__content">
|
|
274
|
+
{isFilled.richText(slice.primary.eyebrowHeadline) && (
|
|
275
|
+
<h2 className="es-customer-logos__heading">
|
|
276
|
+
{asText(slice.primary.eyebrowHeadline)}
|
|
277
|
+
</h2>
|
|
278
|
+
)}
|
|
279
|
+
{slice.items.length > 0 && (
|
|
280
|
+
<ul className="es-customer-logos__logos">
|
|
281
|
+
{slice.items.map(
|
|
282
|
+
(item) =>
|
|
283
|
+
isFilled.image(item.image) && (
|
|
284
|
+
<li key={item.image.url} className="es-customer-logos__logo">
|
|
285
|
+
<PrismicNextLink
|
|
286
|
+
field={item.link}
|
|
287
|
+
className="es-customer-logos__link"
|
|
288
|
+
>
|
|
289
|
+
<PrismicNextImage
|
|
290
|
+
field={item.image}
|
|
291
|
+
height={26}
|
|
292
|
+
width={160}
|
|
293
|
+
className="es-customer-logos__logo__link__image"
|
|
294
|
+
/>
|
|
295
|
+
</PrismicNextLink>
|
|
296
|
+
</li>
|
|
297
|
+
)
|
|
298
|
+
)}
|
|
299
|
+
</ul>
|
|
300
|
+
)}
|
|
301
|
+
<PrismicNextLink
|
|
302
|
+
field={slice.primary.callToActionLink}
|
|
303
|
+
className="es-customer-logos__button"
|
|
304
|
+
>
|
|
305
|
+
{slice.primary.callToActionLabel || "Learn more..."}
|
|
306
|
+
</PrismicNextLink>
|
|
307
|
+
</div>
|
|
308
|
+
<style>
|
|
309
|
+
{\`
|
|
310
|
+
.es-bounded {
|
|
311
|
+
margin: 0px;
|
|
312
|
+
min-width: 0px;
|
|
313
|
+
position: relative;
|
|
314
|
+
padding: 8vw 1.25rem;
|
|
315
|
+
}
|
|
314
316
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
317
|
+
.es-bounded-content {
|
|
318
|
+
min-width: 0px;
|
|
319
|
+
max-width: 90%;
|
|
320
|
+
margin: 0px auto;
|
|
321
|
+
font-family: system-ui, sans-serif;
|
|
322
|
+
}
|
|
321
323
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
324
|
+
.es-customer-logos {
|
|
325
|
+
background-color: #f4f0ec;
|
|
326
|
+
color: #333;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.es-customer-logos__content {
|
|
330
|
+
display: grid;
|
|
331
|
+
gap: 2rem;
|
|
332
|
+
justify-items: center;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.es-customer-logos__heading {
|
|
336
|
+
color: #8592e0;
|
|
337
|
+
font-size: 1.5rem;
|
|
338
|
+
font-weight: 500;
|
|
339
|
+
text-align: center;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.es-customer-logos__logos {
|
|
343
|
+
display: grid;
|
|
344
|
+
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
|
345
|
+
grid-column-gap: 1.25rem;
|
|
346
|
+
grid-row-gap: 2rem;
|
|
347
|
+
align-items: center;
|
|
348
|
+
list-style-type: none;
|
|
349
|
+
width: 100%;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
@media (min-width: 1200px) {
|
|
353
|
+
.es-customer-logos__logos {
|
|
354
|
+
margin-left: -3rem;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.es-customer-logos__logo {
|
|
359
|
+
margin: 0;
|
|
360
|
+
display: flex;
|
|
361
|
+
justify-content: center;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
@media (min-width: 1200px) {
|
|
365
|
+
.es-customer-logos__logo {
|
|
366
|
+
margin-left: 3rem;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.es-customer-logos__logo__link__image {
|
|
371
|
+
max-width: 10rem;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.es-customer-logos__button {
|
|
375
|
+
justify-self: center;
|
|
376
|
+
text-decoration: underline;
|
|
377
|
+
}
|
|
378
|
+
\`}
|
|
379
|
+
</style>
|
|
380
|
+
</section>
|
|
381
|
+
);
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
export default ${pascalName};
|
|
385
|
+
|
|
386
|
+
`;
|
|
383
387
|
}
|
|
384
388
|
return commonTags.stripIndent`
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
min-width: 0px;
|
|
444
|
-
position: relative;
|
|
445
|
-
padding: 8vw 1.25rem;
|
|
446
|
-
}
|
|
389
|
+
import { isFilled, asText } from "@prismicio/client";
|
|
390
|
+
import { PrismicNextLink, PrismicNextImage } from "@prismicio/next";
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* @typedef {import("@prismicio/client").Content.${pascalName}Slice} ${pascalName}Slice
|
|
394
|
+
* @typedef {import("@prismicio/react").SliceComponentProps<${pascalName}Slice>} ${pascalName}Props
|
|
395
|
+
* @param {${pascalName}Props}
|
|
396
|
+
*/
|
|
397
|
+
const ${pascalName} = ({ slice }) => {
|
|
398
|
+
return (
|
|
399
|
+
<section
|
|
400
|
+
data-slice-type={slice.slice_type}
|
|
401
|
+
data-slice-variation={slice.variation}
|
|
402
|
+
className="es-bounded es-customer-logos"
|
|
403
|
+
>
|
|
404
|
+
<div className="es-bounded-content es-customer-logos__content">
|
|
405
|
+
{isFilled.richText(slice.primary.eyebrowHeadline) && (
|
|
406
|
+
<h2 className="es-customer-logos__heading">
|
|
407
|
+
{asText(slice.primary.eyebrowHeadline)}
|
|
408
|
+
</h2>
|
|
409
|
+
)}
|
|
410
|
+
{slice.items.length > 0 && (
|
|
411
|
+
<ul className="es-customer-logos__logos">
|
|
412
|
+
{slice.items.map(
|
|
413
|
+
(item) =>
|
|
414
|
+
isFilled.image(item.image) && (
|
|
415
|
+
<li key={item.image.url} className="es-customer-logos__logo">
|
|
416
|
+
<PrismicNextLink
|
|
417
|
+
field={item.link}
|
|
418
|
+
className="es-customer-logos__link"
|
|
419
|
+
>
|
|
420
|
+
<PrismicNextImage
|
|
421
|
+
field={item.image}
|
|
422
|
+
height={26}
|
|
423
|
+
width={160}
|
|
424
|
+
className="es-customer-logos__logo__link__image"
|
|
425
|
+
/>
|
|
426
|
+
</PrismicNextLink>
|
|
427
|
+
</li>
|
|
428
|
+
)
|
|
429
|
+
)}
|
|
430
|
+
</ul>
|
|
431
|
+
)}
|
|
432
|
+
<PrismicNextLink
|
|
433
|
+
field={slice.primary.callToActionLink}
|
|
434
|
+
className="es-customer-logos__button"
|
|
435
|
+
>
|
|
436
|
+
{slice.primary.callToActionLabel || "Learn more..."}
|
|
437
|
+
</PrismicNextLink>
|
|
438
|
+
</div>
|
|
439
|
+
<style>
|
|
440
|
+
{\`
|
|
441
|
+
.es-bounded {
|
|
442
|
+
margin: 0px;
|
|
443
|
+
min-width: 0px;
|
|
444
|
+
position: relative;
|
|
445
|
+
padding: 8vw 1.25rem;
|
|
446
|
+
}
|
|
447
447
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
448
|
+
.es-bounded-content {
|
|
449
|
+
min-width: 0px;
|
|
450
|
+
max-width: 90%;
|
|
451
|
+
margin: 0px auto;
|
|
452
|
+
font-family: system-ui, sans-serif;
|
|
453
|
+
}
|
|
454
454
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
455
|
+
.es-customer-logos {
|
|
456
|
+
background-color: #f4f0ec;
|
|
457
|
+
color: #333;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.es-customer-logos__content {
|
|
461
|
+
display: grid;
|
|
462
|
+
gap: 2rem;
|
|
463
|
+
justify-items: center;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.es-customer-logos__heading {
|
|
467
|
+
color: #8592e0;
|
|
468
|
+
font-size: 1.5rem;
|
|
469
|
+
font-weight: 500;
|
|
470
|
+
text-align: center;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.es-customer-logos__logos {
|
|
474
|
+
display: grid;
|
|
475
|
+
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
|
476
|
+
grid-column-gap: 1.25rem;
|
|
477
|
+
grid-row-gap: 2rem;
|
|
478
|
+
align-items: center;
|
|
479
|
+
list-style-type: none;
|
|
480
|
+
width: 100%;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
@media (min-width: 1200px) {
|
|
484
|
+
.es-customer-logos__logos {
|
|
485
|
+
margin-left: -3rem;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.es-customer-logos__logo {
|
|
490
|
+
margin: 0;
|
|
491
|
+
display: flex;
|
|
492
|
+
justify-content: center;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
@media (min-width: 1200px) {
|
|
496
|
+
.es-customer-logos__logo {
|
|
497
|
+
margin-left: 3rem;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.es-customer-logos__logo__link__image {
|
|
502
|
+
max-width: 10rem;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.es-customer-logos__button {
|
|
506
|
+
justify-self: center;
|
|
507
|
+
text-decoration: underline;
|
|
508
|
+
}
|
|
509
|
+
\`}
|
|
510
|
+
</style>
|
|
511
|
+
</section>
|
|
512
|
+
);
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
export default ${pascalName};
|
|
516
|
+
|
|
517
|
+
`;
|
|
517
518
|
};
|
|
518
519
|
const model = {
|
|
519
520
|
id: "customer_logos",
|