@kurbo/dkit 0.4.0
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 +24 -0
- package/dist/bin.js +8066 -0
- package/dist/bin.js.map +1 -0
- package/package.json +58 -0
- package/vendor/registry/blocks/blog-detail/module.json +27 -0
- package/vendor/registry/blocks/blog-detail/ui/minimal/next/blog-detail.tsx +26 -0
- package/vendor/registry/blocks/blog-detail/ui/minimal/nuxt/BlogDetail.vue +27 -0
- package/vendor/registry/blocks/blog-detail/ui/shadcn/next/blog-detail.tsx +106 -0
- package/vendor/registry/blocks/blog-detail/ui/shadcn/nuxt/BlogDetail.vue +116 -0
- package/vendor/registry/blocks/blog-list/module.json +26 -0
- package/vendor/registry/blocks/blog-list/ui/minimal/next/blog-list.tsx +130 -0
- package/vendor/registry/blocks/blog-list/ui/minimal/nuxt/BlogList.vue +62 -0
- package/vendor/registry/blocks/blog-list/ui/shadcn/next/blog-list.tsx +109 -0
- package/vendor/registry/blocks/blog-list/ui/shadcn/nuxt/BlogList.vue +100 -0
- package/vendor/registry/blocks/blog-list-cards/module.json +27 -0
- package/vendor/registry/blocks/blog-list-cards/ui/minimal/next/blog-list-cards.tsx +130 -0
- package/vendor/registry/blocks/blog-list-cards/ui/minimal/nuxt/BlogListCards.vue +114 -0
- package/vendor/registry/blocks/blog-list-cards/ui/shadcn/next/blog-list-cards.tsx +119 -0
- package/vendor/registry/blocks/blog-list-cards/ui/shadcn/nuxt/BlogListCards.vue +113 -0
- package/vendor/registry/blocks/booking-form-ui/module.json +15 -0
- package/vendor/registry/blocks/booking-form-ui/ui/minimal/next/booking-form.tsx +89 -0
- package/vendor/registry/blocks/booking-form-ui/ui/shadcn/next/booking-form.tsx +92 -0
- package/vendor/registry/blocks/contact-form-ui/module.json +27 -0
- package/vendor/registry/blocks/contact-form-ui/ui/minimal/next/contact-form.tsx +45 -0
- package/vendor/registry/blocks/contact-form-ui/ui/minimal/nuxt/ContactForm.vue +79 -0
- package/vendor/registry/blocks/contact-form-ui/ui/shadcn/next/contact-form.tsx +55 -0
- package/vendor/registry/blocks/contact-form-ui/ui/shadcn/nuxt/ContactForm.vue +92 -0
- package/vendor/registry/blocks/faq-list/module.json +15 -0
- package/vendor/registry/blocks/faq-list/ui/minimal/next/faq-list.tsx +78 -0
- package/vendor/registry/blocks/faq-list/ui/shadcn/next/faq-list.tsx +77 -0
- package/vendor/registry/blocks/maintenance-gate/module.json +13 -0
- package/vendor/registry/blocks/maintenance-gate/ui/minimal/next/maintenance-gate.tsx +135 -0
- package/vendor/registry/blocks/maintenance-gate/ui/shadcn/next/maintenance-gate.tsx +87 -0
- package/vendor/registry/blocks/nav-footer/module.json +13 -0
- package/vendor/registry/blocks/nav-footer/ui/minimal/next/nav-footer.tsx +55 -0
- package/vendor/registry/blocks/nav-footer/ui/shadcn/next/nav-footer.tsx +41 -0
- package/vendor/registry/blocks/nav-header/module.json +14 -0
- package/vendor/registry/blocks/nav-header/ui/minimal/next/nav-header.tsx +244 -0
- package/vendor/registry/blocks/nav-header/ui/shadcn/next/nav-header-client.tsx +185 -0
- package/vendor/registry/blocks/nav-header/ui/shadcn/next/nav-header.tsx +12 -0
- package/vendor/registry/blocks/page-detail/module.json +26 -0
- package/vendor/registry/blocks/page-detail/ui/minimal/next/page-detail.tsx +26 -0
- package/vendor/registry/blocks/page-detail/ui/minimal/nuxt/PageDetail.vue +26 -0
- package/vendor/registry/blocks/page-detail/ui/shadcn/next/page-detail.tsx +61 -0
- package/vendor/registry/blocks/page-detail/ui/shadcn/nuxt/PageDetail.vue +62 -0
- package/vendor/registry/blocks/project-detail/module.json +15 -0
- package/vendor/registry/blocks/project-detail/ui/minimal/next/project-detail.tsx +58 -0
- package/vendor/registry/blocks/project-detail/ui/shadcn/next/project-detail.tsx +91 -0
- package/vendor/registry/blocks/project-list/module.json +14 -0
- package/vendor/registry/blocks/project-list/ui/minimal/next/project-list.tsx +104 -0
- package/vendor/registry/blocks/project-list/ui/shadcn/next/project-list.tsx +81 -0
- package/vendor/registry/blocks/project-list-cards/module.json +15 -0
- package/vendor/registry/blocks/project-list-cards/ui/minimal/next/project-list-cards.tsx +125 -0
- package/vendor/registry/blocks/project-list-cards/ui/shadcn/next/project-list-cards.tsx +94 -0
- package/vendor/registry/blocks/projects-carousel/module.json +15 -0
- package/vendor/registry/blocks/projects-carousel/ui/minimal/next/projects-carousel-client.tsx +239 -0
- package/vendor/registry/blocks/projects-carousel/ui/minimal/next/projects-carousel.tsx +24 -0
- package/vendor/registry/blocks/projects-carousel/ui/shadcn/next/projects-carousel-client.tsx +102 -0
- package/vendor/registry/blocks/projects-carousel/ui/shadcn/next/projects-carousel.tsx +24 -0
- package/vendor/registry/blocks/service-detail/module.json +15 -0
- package/vendor/registry/blocks/service-detail/ui/minimal/next/service-detail.tsx +49 -0
- package/vendor/registry/blocks/service-detail/ui/shadcn/next/service-detail.tsx +75 -0
- package/vendor/registry/blocks/service-list/module.json +14 -0
- package/vendor/registry/blocks/service-list/ui/minimal/next/service-list.tsx +103 -0
- package/vendor/registry/blocks/service-list/ui/shadcn/next/service-list.tsx +80 -0
- package/vendor/registry/blocks/service-list-cards/module.json +15 -0
- package/vendor/registry/blocks/service-list-cards/ui/minimal/next/service-list-cards.tsx +124 -0
- package/vendor/registry/blocks/service-list-cards/ui/shadcn/next/service-list-cards.tsx +92 -0
- package/vendor/registry/blocks/site-brand/module.json +13 -0
- package/vendor/registry/blocks/site-brand/ui/minimal/next/site-brand.tsx +61 -0
- package/vendor/registry/blocks/site-brand/ui/shadcn/next/site-brand.tsx +48 -0
- package/vendor/registry/blocks/site-logo/module.json +13 -0
- package/vendor/registry/blocks/site-logo/ui/minimal/next/site-logo.tsx +37 -0
- package/vendor/registry/blocks/site-logo/ui/shadcn/next/site-logo.tsx +34 -0
- package/vendor/registry/blocks/social-links/module.json +13 -0
- package/vendor/registry/blocks/social-links/ui/minimal/next/social-links.tsx +55 -0
- package/vendor/registry/blocks/social-links/ui/shadcn/next/social-links.tsx +46 -0
- package/vendor/registry/blocks/team-detail/module.json +15 -0
- package/vendor/registry/blocks/team-detail/ui/minimal/next/team-detail.tsx +113 -0
- package/vendor/registry/blocks/team-detail/ui/shadcn/next/team-detail.tsx +77 -0
- package/vendor/registry/blocks/team-list/module.json +14 -0
- package/vendor/registry/blocks/team-list/ui/minimal/next/team-list.tsx +113 -0
- package/vendor/registry/blocks/team-list/ui/shadcn/next/team-list.tsx +77 -0
- package/vendor/registry/blocks/team-list-cards/module.json +15 -0
- package/vendor/registry/blocks/team-list-cards/ui/minimal/next/team-list-cards.tsx +111 -0
- package/vendor/registry/blocks/team-list-cards/ui/shadcn/next/team-list-cards.tsx +83 -0
- package/vendor/registry/blocks/testimonials-carousel/module.json +15 -0
- package/vendor/registry/blocks/testimonials-carousel/ui/minimal/next/testimonials-carousel-client.tsx +230 -0
- package/vendor/registry/blocks/testimonials-carousel/ui/minimal/next/testimonials-carousel.tsx +23 -0
- package/vendor/registry/blocks/testimonials-carousel/ui/shadcn/next/testimonials-carousel-client.tsx +91 -0
- package/vendor/registry/blocks/testimonials-carousel/ui/shadcn/next/testimonials-carousel.tsx +23 -0
- package/vendor/registry/blocks/testimonials-list/module.json +14 -0
- package/vendor/registry/blocks/testimonials-list/ui/minimal/next/testimonials-list.tsx +109 -0
- package/vendor/registry/blocks/testimonials-list/ui/shadcn/next/testimonials-list.tsx +72 -0
- package/vendor/registry/blocks/testimonials-list-cards/module.json +15 -0
- package/vendor/registry/blocks/testimonials-list-cards/ui/minimal/next/testimonials-list-cards.tsx +114 -0
- package/vendor/registry/blocks/testimonials-list-cards/ui/shadcn/next/testimonials-list-cards.tsx +72 -0
- package/vendor/registry/core/languages/policies.json +25 -0
- package/vendor/registry/core/languages/seed.json +16 -0
- package/vendor/registry/core/languages/snapshot.json +94 -0
- package/vendor/registry/modules/blog/access/policies.json +49 -0
- package/vendor/registry/modules/blog/access/policies.multilocale.json +67 -0
- package/vendor/registry/modules/blog/lib.multilocale.ts +552 -0
- package/vendor/registry/modules/blog/lib.ts +346 -0
- package/vendor/registry/modules/blog/module.json +50 -0
- package/vendor/registry/modules/blog/schema/snapshot.json +701 -0
- package/vendor/registry/modules/blog/schema/snapshot.multilocale.json +884 -0
- package/vendor/registry/modules/blog/services/ATTRIBUTION.md +8 -0
- package/vendor/registry/modules/blog/services/assets/ada-lovelace-avatar.jpg +0 -0
- package/vendor/registry/modules/blog/services/assets/hello-from-dkit-cover.jpg +0 -0
- package/vendor/registry/modules/blog/services/seed.json +70 -0
- package/vendor/registry/modules/blog/services/seed.multilocale.json +90 -0
- package/vendor/registry/modules/blog/types.multilocale.ts +96 -0
- package/vendor/registry/modules/blog/types.ts +62 -0
- package/vendor/registry/modules/booking-form/access/policies.json +25 -0
- package/vendor/registry/modules/booking-form/access/policies.multilocale.json +27 -0
- package/vendor/registry/modules/booking-form/lib.multilocale.ts +71 -0
- package/vendor/registry/modules/booking-form/lib.ts +77 -0
- package/vendor/registry/modules/booking-form/module.json +32 -0
- package/vendor/registry/modules/booking-form/schema/snapshot.json +294 -0
- package/vendor/registry/modules/booking-form/schema/snapshot.multilocale.json +467 -0
- package/vendor/registry/modules/booking-form/services/flows.json +19 -0
- package/vendor/registry/modules/booking-form/types.multilocale.ts +29 -0
- package/vendor/registry/modules/booking-form/types.ts +27 -0
- package/vendor/registry/modules/contact-form/access/policies.json +25 -0
- package/vendor/registry/modules/contact-form/access/policies.multilocale.json +27 -0
- package/vendor/registry/modules/contact-form/lib.multilocale.ts +65 -0
- package/vendor/registry/modules/contact-form/lib.ts +67 -0
- package/vendor/registry/modules/contact-form/module.json +32 -0
- package/vendor/registry/modules/contact-form/schema/snapshot.json +193 -0
- package/vendor/registry/modules/contact-form/schema/snapshot.multilocale.json +293 -0
- package/vendor/registry/modules/contact-form/services/flows.json +19 -0
- package/vendor/registry/modules/contact-form/types.multilocale.ts +21 -0
- package/vendor/registry/modules/contact-form/types.ts +19 -0
- package/vendor/registry/modules/faq/access/policies.json +25 -0
- package/vendor/registry/modules/faq/access/policies.multilocale.json +18 -0
- package/vendor/registry/modules/faq/lib.multilocale.ts +120 -0
- package/vendor/registry/modules/faq/lib.ts +73 -0
- package/vendor/registry/modules/faq/module.json +31 -0
- package/vendor/registry/modules/faq/schema/snapshot.json +180 -0
- package/vendor/registry/modules/faq/schema/snapshot.multilocale.json +116 -0
- package/vendor/registry/modules/faq/services/seed.json +38 -0
- package/vendor/registry/modules/faq/services/seed.multilocale.json +32 -0
- package/vendor/registry/modules/faq/types.multilocale.ts +31 -0
- package/vendor/registry/modules/faq/types.ts +17 -0
- package/vendor/registry/modules/navigation/access/policies.json +31 -0
- package/vendor/registry/modules/navigation/access/policies.multilocale.json +51 -0
- package/vendor/registry/modules/navigation/lib.multilocale.ts +198 -0
- package/vendor/registry/modules/navigation/lib.ts +252 -0
- package/vendor/registry/modules/navigation/module.json +46 -0
- package/vendor/registry/modules/navigation/schema/snapshot.json +453 -0
- package/vendor/registry/modules/navigation/schema/snapshot.multilocale.json +864 -0
- package/vendor/registry/modules/navigation/services/seed.json +103 -0
- package/vendor/registry/modules/navigation/services/seed.multilocale.json +88 -0
- package/vendor/registry/modules/navigation/types.multilocale.ts +60 -0
- package/vendor/registry/modules/navigation/types.ts +44 -0
- package/vendor/registry/modules/pages/access/policies.json +25 -0
- package/vendor/registry/modules/pages/access/policies.multilocale.json +18 -0
- package/vendor/registry/modules/pages/lib.multilocale.ts +166 -0
- package/vendor/registry/modules/pages/lib.ts +123 -0
- package/vendor/registry/modules/pages/module.json +39 -0
- package/vendor/registry/modules/pages/schema/snapshot.json +247 -0
- package/vendor/registry/modules/pages/schema/snapshot.multilocale.json +187 -0
- package/vendor/registry/modules/pages/services/seed.json +24 -0
- package/vendor/registry/modules/pages/services/seed.multilocale.json +34 -0
- package/vendor/registry/modules/pages/types.multilocale.ts +37 -0
- package/vendor/registry/modules/pages/types.ts +21 -0
- package/vendor/registry/modules/projects/access/policies.json +31 -0
- package/vendor/registry/modules/projects/access/policies.multilocale.json +43 -0
- package/vendor/registry/modules/projects/lib.multilocale.ts +111 -0
- package/vendor/registry/modules/projects/lib.ts +138 -0
- package/vendor/registry/modules/projects/module.json +48 -0
- package/vendor/registry/modules/projects/schema/snapshot.json +348 -0
- package/vendor/registry/modules/projects/schema/snapshot.multilocale.json +577 -0
- package/vendor/registry/modules/projects/services/ATTRIBUTION.md +7 -0
- package/vendor/registry/modules/projects/services/assets/brand-identity-cover.jpg +0 -0
- package/vendor/registry/modules/projects/services/seed.json +40 -0
- package/vendor/registry/modules/projects/services/seed.multilocale.json +31 -0
- package/vendor/registry/modules/projects/types.multilocale.ts +38 -0
- package/vendor/registry/modules/projects/types.ts +28 -0
- package/vendor/registry/modules/services/access/policies.json +31 -0
- package/vendor/registry/modules/services/access/policies.multilocale.json +43 -0
- package/vendor/registry/modules/services/lib.multilocale.ts +109 -0
- package/vendor/registry/modules/services/lib.ts +134 -0
- package/vendor/registry/modules/services/module.json +47 -0
- package/vendor/registry/modules/services/schema/snapshot.json +305 -0
- package/vendor/registry/modules/services/schema/snapshot.multilocale.json +510 -0
- package/vendor/registry/modules/services/services/ATTRIBUTION.md +8 -0
- package/vendor/registry/modules/services/services/assets/design-development.jpg +0 -0
- package/vendor/registry/modules/services/services/assets/strategy-consulting.jpg +0 -0
- package/vendor/registry/modules/services/services/seed.json +44 -0
- package/vendor/registry/modules/services/services/seed.multilocale.json +31 -0
- package/vendor/registry/modules/services/types.multilocale.ts +36 -0
- package/vendor/registry/modules/services/types.ts +26 -0
- package/vendor/registry/modules/settings/access/policies.json +31 -0
- package/vendor/registry/modules/settings/access/policies.multilocale.json +43 -0
- package/vendor/registry/modules/settings/lib.multilocale.ts +158 -0
- package/vendor/registry/modules/settings/lib.ts +259 -0
- package/vendor/registry/modules/settings/module.json +33 -0
- package/vendor/registry/modules/settings/schema/snapshot.json +315 -0
- package/vendor/registry/modules/settings/schema/snapshot.multilocale.json +586 -0
- package/vendor/registry/modules/settings/services/assets/dkit-logo.svg +4 -0
- package/vendor/registry/modules/settings/services/seed.json +31 -0
- package/vendor/registry/modules/settings/services/seed.multilocale.json +42 -0
- package/vendor/registry/modules/settings/types.multilocale.ts +72 -0
- package/vendor/registry/modules/settings/types.ts +94 -0
- package/vendor/registry/modules/team/access/policies.json +31 -0
- package/vendor/registry/modules/team/access/policies.multilocale.json +43 -0
- package/vendor/registry/modules/team/lib.multilocale.ts +88 -0
- package/vendor/registry/modules/team/lib.ts +120 -0
- package/vendor/registry/modules/team/module.json +47 -0
- package/vendor/registry/modules/team/schema/snapshot.json +295 -0
- package/vendor/registry/modules/team/schema/snapshot.multilocale.json +525 -0
- package/vendor/registry/modules/team/services/ATTRIBUTION.md +8 -0
- package/vendor/registry/modules/team/services/assets/morgan-lee-photo.jpg +0 -0
- package/vendor/registry/modules/team/services/assets/taylor-kim-photo.jpg +0 -0
- package/vendor/registry/modules/team/services/seed.json +52 -0
- package/vendor/registry/modules/team/services/seed.multilocale.json +30 -0
- package/vendor/registry/modules/team/types.multilocale.ts +33 -0
- package/vendor/registry/modules/team/types.ts +27 -0
- package/vendor/registry/modules/testimonials/access/policies.json +31 -0
- package/vendor/registry/modules/testimonials/access/policies.multilocale.json +43 -0
- package/vendor/registry/modules/testimonials/lib.multilocale.ts +93 -0
- package/vendor/registry/modules/testimonials/lib.ts +85 -0
- package/vendor/registry/modules/testimonials/module.json +41 -0
- package/vendor/registry/modules/testimonials/schema/snapshot.json +248 -0
- package/vendor/registry/modules/testimonials/schema/snapshot.multilocale.json +462 -0
- package/vendor/registry/modules/testimonials/services/ATTRIBUTION.md +8 -0
- package/vendor/registry/modules/testimonials/services/assets/jane-doe-avatar.jpg +0 -0
- package/vendor/registry/modules/testimonials/services/assets/sample-author-avatar.jpg +0 -0
- package/vendor/registry/modules/testimonials/services/seed.json +49 -0
- package/vendor/registry/modules/testimonials/services/seed.multilocale.json +30 -0
- package/vendor/registry/modules/testimonials/types.multilocale.ts +27 -0
- package/vendor/registry/modules/testimonials/types.ts +22 -0
- package/vendor/registry/registry.json +832 -0
- package/vendor/registry/shared/helpers.ts +16 -0
- package/vendor/registry/shared/i18n.ts +74 -0
- package/vendor/registry/shared/minimal.css +83 -0
- package/vendor/registry/shared/paths.ts +50 -0
- package/vendor/registry/shared/prose.css +113 -0
- package/vendor/registry/tsconfig.json +49 -0
package/vendor/registry/blocks/testimonials-carousel/ui/shadcn/next/testimonials-carousel-client.tsx
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Carousel,
|
|
5
|
+
CarouselContent,
|
|
6
|
+
CarouselItem,
|
|
7
|
+
CarouselNext,
|
|
8
|
+
CarouselPrevious,
|
|
9
|
+
} from "@/components/ui/carousel";
|
|
10
|
+
|
|
11
|
+
export type TestimonialSlide = {
|
|
12
|
+
id: string;
|
|
13
|
+
quote: string;
|
|
14
|
+
author_name: string;
|
|
15
|
+
author_role?: string | null;
|
|
16
|
+
company?: string | null;
|
|
17
|
+
avatarUrl?: string | null;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** Full-bleed Embla carousel — quote on the section bg, one slide each. */
|
|
21
|
+
export function TestimonialsCarouselClient({
|
|
22
|
+
slides,
|
|
23
|
+
}: {
|
|
24
|
+
slides: TestimonialSlide[];
|
|
25
|
+
}) {
|
|
26
|
+
if (!slides.length) {
|
|
27
|
+
return (
|
|
28
|
+
<p className="rounded-xl border border-dashed border-border px-6 py-12 text-center text-muted-foreground">
|
|
29
|
+
No testimonials yet.
|
|
30
|
+
</p>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<section className="w-full overflow-x-clip bg-muted/40 py-16 sm:py-24">
|
|
36
|
+
<div className="mx-auto mb-12 max-w-2xl px-6 text-center">
|
|
37
|
+
<p className="mb-3 text-xs font-medium tracking-[0.2em] text-primary uppercase">
|
|
38
|
+
Testimonials
|
|
39
|
+
</p>
|
|
40
|
+
<h2 className="text-3xl font-semibold tracking-tight text-foreground sm:text-4xl">
|
|
41
|
+
What our clients say
|
|
42
|
+
</h2>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<Carousel
|
|
46
|
+
opts={{ align: "center", loop: slides.length > 1 }}
|
|
47
|
+
className="mx-auto w-full max-w-4xl px-12 sm:px-16"
|
|
48
|
+
>
|
|
49
|
+
<CarouselContent className="-ml-0">
|
|
50
|
+
{slides.map((t) => (
|
|
51
|
+
<CarouselItem key={t.id} className="pl-0 basis-full">
|
|
52
|
+
<figure className="mx-auto flex max-w-2xl flex-col items-center px-6 text-center">
|
|
53
|
+
{t.avatarUrl ? (
|
|
54
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
55
|
+
<img
|
|
56
|
+
src={t.avatarUrl}
|
|
57
|
+
alt=""
|
|
58
|
+
className="mb-8 h-20 w-20 rounded-full object-cover ring-2 ring-border sm:h-24 sm:w-24"
|
|
59
|
+
/>
|
|
60
|
+
) : (
|
|
61
|
+
<span className="mb-8 flex h-20 w-20 items-center justify-center rounded-full bg-background text-2xl font-semibold text-muted-foreground ring-2 ring-border sm:h-24 sm:w-24">
|
|
62
|
+
{t.author_name.charAt(0)}
|
|
63
|
+
</span>
|
|
64
|
+
)}
|
|
65
|
+
<blockquote className="text-xl leading-relaxed text-foreground sm:text-2xl sm:leading-relaxed">
|
|
66
|
+
“{t.quote}”
|
|
67
|
+
</blockquote>
|
|
68
|
+
<figcaption className="mt-8">
|
|
69
|
+
<span className="block text-base font-medium text-foreground">
|
|
70
|
+
{t.author_name}
|
|
71
|
+
</span>
|
|
72
|
+
{t.author_role || t.company ? (
|
|
73
|
+
<span className="mt-1 block text-sm text-muted-foreground">
|
|
74
|
+
{[t.author_role, t.company].filter(Boolean).join(" · ")}
|
|
75
|
+
</span>
|
|
76
|
+
) : null}
|
|
77
|
+
</figcaption>
|
|
78
|
+
</figure>
|
|
79
|
+
</CarouselItem>
|
|
80
|
+
))}
|
|
81
|
+
</CarouselContent>
|
|
82
|
+
{slides.length > 1 ? (
|
|
83
|
+
<>
|
|
84
|
+
<CarouselPrevious className="left-2 border-border bg-background sm:left-4" />
|
|
85
|
+
<CarouselNext className="right-2 border-border bg-background sm:right-4" />
|
|
86
|
+
</>
|
|
87
|
+
) : null}
|
|
88
|
+
</Carousel>
|
|
89
|
+
</section>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getTestimonials,
|
|
3
|
+
testimonialAvatarUrl,
|
|
4
|
+
} from "@/lib/dkit/testimonials";
|
|
5
|
+
import {
|
|
6
|
+
TestimonialsCarouselClient,
|
|
7
|
+
type TestimonialSlide,
|
|
8
|
+
} from "./testimonials-carousel-client";
|
|
9
|
+
|
|
10
|
+
/** Uses your project's shadcn carousel — full-bleed, one quote per slide. */
|
|
11
|
+
export async function TestimonialsCarousel() {
|
|
12
|
+
const testimonials = await getTestimonials();
|
|
13
|
+
const slides: TestimonialSlide[] = testimonials.map((t) => ({
|
|
14
|
+
id: t.id,
|
|
15
|
+
quote: t.quote,
|
|
16
|
+
author_name: t.author_name,
|
|
17
|
+
author_role: t.author_role,
|
|
18
|
+
company: t.company,
|
|
19
|
+
avatarUrl: testimonialAvatarUrl(t),
|
|
20
|
+
}));
|
|
21
|
+
|
|
22
|
+
return <TestimonialsCarouselClient slides={slides} />;
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "dkit:block",
|
|
3
|
+
"id": "testimonials-list",
|
|
4
|
+
"title": "Testimonials list",
|
|
5
|
+
"description": "Stacked testimonials with avatar, quote, and attribution",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"frameworks": ["next"],
|
|
8
|
+
"uiKits": ["shadcn", "minimal"],
|
|
9
|
+
"slot": "list",
|
|
10
|
+
"route": { "kind": "static" },
|
|
11
|
+
"registryDependencies": ["testimonials"],
|
|
12
|
+
"dependencies": ["@directus/sdk"],
|
|
13
|
+
"layers": ["ui"]
|
|
14
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getTestimonials,
|
|
3
|
+
testimonialAvatarUrl,
|
|
4
|
+
} from "@/lib/dkit/testimonials";
|
|
5
|
+
|
|
6
|
+
/** Minimal kit — stacked list (shared type primitives). */
|
|
7
|
+
export async function TestimonialsList() {
|
|
8
|
+
const testimonials = await getTestimonials();
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<section>
|
|
12
|
+
<style>{`
|
|
13
|
+
.dkit-testimonials-list {
|
|
14
|
+
list-style: none;
|
|
15
|
+
margin: 0;
|
|
16
|
+
padding: 0;
|
|
17
|
+
}
|
|
18
|
+
.dkit-testimonials-list > li {
|
|
19
|
+
display: flex;
|
|
20
|
+
gap: 1rem;
|
|
21
|
+
padding: 1rem 0;
|
|
22
|
+
border-bottom: 1px solid var(--dkit-border, #ddd);
|
|
23
|
+
}
|
|
24
|
+
.dkit-testimonials-list > li:last-child {
|
|
25
|
+
border-bottom: 0;
|
|
26
|
+
}
|
|
27
|
+
.dkit-testimonials-list__avatar,
|
|
28
|
+
.dkit-testimonials-list__initial {
|
|
29
|
+
flex: 0 0 auto;
|
|
30
|
+
width: 3rem;
|
|
31
|
+
height: 3rem;
|
|
32
|
+
border-radius: 9999px;
|
|
33
|
+
object-fit: cover;
|
|
34
|
+
}
|
|
35
|
+
.dkit-testimonials-list__initial {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
background: #eee;
|
|
40
|
+
font-weight: 700;
|
|
41
|
+
font-size: 1rem;
|
|
42
|
+
}
|
|
43
|
+
.dkit-testimonials-list__body {
|
|
44
|
+
min-width: 0;
|
|
45
|
+
flex: 1;
|
|
46
|
+
}
|
|
47
|
+
.dkit-testimonials-list__quote {
|
|
48
|
+
margin: 0;
|
|
49
|
+
line-height: 1.5;
|
|
50
|
+
}
|
|
51
|
+
.dkit-testimonials-list__meta {
|
|
52
|
+
margin: 0.75rem 0 0;
|
|
53
|
+
font-size: 0.875rem;
|
|
54
|
+
color: var(--dkit-muted, #666);
|
|
55
|
+
}
|
|
56
|
+
.dkit-testimonials-list__name {
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
color: var(--dkit-fg, #111);
|
|
59
|
+
}
|
|
60
|
+
`}</style>
|
|
61
|
+
|
|
62
|
+
<header>
|
|
63
|
+
<p className="dkit-label">Testimonials</p>
|
|
64
|
+
<h1 className="dkit-headline">What our clients say</h1>
|
|
65
|
+
</header>
|
|
66
|
+
|
|
67
|
+
{testimonials.length === 0 ? (
|
|
68
|
+
<p>No testimonials yet.</p>
|
|
69
|
+
) : (
|
|
70
|
+
<ul className="dkit-testimonials-list">
|
|
71
|
+
{testimonials.map((t) => {
|
|
72
|
+
const avatarUrl = testimonialAvatarUrl(t);
|
|
73
|
+
return (
|
|
74
|
+
<li key={t.id}>
|
|
75
|
+
{avatarUrl ? (
|
|
76
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
77
|
+
<img
|
|
78
|
+
className="dkit-testimonials-list__avatar"
|
|
79
|
+
src={avatarUrl}
|
|
80
|
+
alt=""
|
|
81
|
+
width={48}
|
|
82
|
+
height={48}
|
|
83
|
+
/>
|
|
84
|
+
) : (
|
|
85
|
+
<span className="dkit-testimonials-list__initial">
|
|
86
|
+
{t.author_name.charAt(0)}
|
|
87
|
+
</span>
|
|
88
|
+
)}
|
|
89
|
+
<div className="dkit-testimonials-list__body">
|
|
90
|
+
<blockquote className="dkit-testimonials-list__quote">
|
|
91
|
+
“{t.quote}”
|
|
92
|
+
</blockquote>
|
|
93
|
+
<p className="dkit-testimonials-list__meta">
|
|
94
|
+
<span className="dkit-testimonials-list__name">
|
|
95
|
+
{t.author_name}
|
|
96
|
+
</span>
|
|
97
|
+
{t.author_role || t.company
|
|
98
|
+
? ` · ${[t.author_role, t.company].filter(Boolean).join(" · ")}`
|
|
99
|
+
: null}
|
|
100
|
+
</p>
|
|
101
|
+
</div>
|
|
102
|
+
</li>
|
|
103
|
+
);
|
|
104
|
+
})}
|
|
105
|
+
</ul>
|
|
106
|
+
)}
|
|
107
|
+
</section>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getTestimonials,
|
|
3
|
+
testimonialAvatarUrl,
|
|
4
|
+
} from "@/lib/dkit/testimonials";
|
|
5
|
+
|
|
6
|
+
/** Styled with shadcn theme tokens — stacked list like blog-list. */
|
|
7
|
+
export async function TestimonialsList() {
|
|
8
|
+
const testimonials = await getTestimonials();
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<div className="relative mx-auto max-w-2xl px-6 py-16 sm:py-20">
|
|
12
|
+
<header className="mb-12 border-b border-border pb-10">
|
|
13
|
+
<p className="mb-3 text-xs font-medium tracking-[0.2em] text-primary uppercase">
|
|
14
|
+
Testimonials
|
|
15
|
+
</p>
|
|
16
|
+
<h1 className="text-4xl font-semibold leading-tight tracking-tight text-foreground sm:text-5xl">
|
|
17
|
+
What our clients say
|
|
18
|
+
</h1>
|
|
19
|
+
</header>
|
|
20
|
+
|
|
21
|
+
{testimonials.length === 0 ? (
|
|
22
|
+
<p className="rounded-xl border border-dashed border-border bg-muted/40 px-6 py-10 text-center text-muted-foreground">
|
|
23
|
+
No testimonials yet.
|
|
24
|
+
</p>
|
|
25
|
+
) : (
|
|
26
|
+
<ul className="space-y-1">
|
|
27
|
+
{testimonials.map((t) => {
|
|
28
|
+
const avatarUrl = testimonialAvatarUrl(t);
|
|
29
|
+
return (
|
|
30
|
+
<li key={t.id}>
|
|
31
|
+
<div className="flex gap-5 rounded-xl px-4 py-5">
|
|
32
|
+
{avatarUrl ? (
|
|
33
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
34
|
+
<img
|
|
35
|
+
src={avatarUrl}
|
|
36
|
+
alt=""
|
|
37
|
+
className="mt-0.5 h-12 w-12 shrink-0 rounded-full object-cover ring-1 ring-border"
|
|
38
|
+
/>
|
|
39
|
+
) : (
|
|
40
|
+
<span className="mt-0.5 flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-muted text-base font-semibold text-muted-foreground ring-1 ring-border">
|
|
41
|
+
{t.author_name.charAt(0)}
|
|
42
|
+
</span>
|
|
43
|
+
)}
|
|
44
|
+
<div className="min-w-0 flex-1">
|
|
45
|
+
<blockquote className="text-base leading-relaxed text-foreground">
|
|
46
|
+
“{t.quote}”
|
|
47
|
+
</blockquote>
|
|
48
|
+
<p className="mt-3 flex flex-wrap items-center gap-x-2 text-xs text-muted-foreground">
|
|
49
|
+
<span className="font-medium text-foreground">
|
|
50
|
+
{t.author_name}
|
|
51
|
+
</span>
|
|
52
|
+
{t.author_role || t.company ? (
|
|
53
|
+
<>
|
|
54
|
+
<span aria-hidden>·</span>
|
|
55
|
+
<span>
|
|
56
|
+
{[t.author_role, t.company]
|
|
57
|
+
.filter(Boolean)
|
|
58
|
+
.join(" · ")}
|
|
59
|
+
</span>
|
|
60
|
+
</>
|
|
61
|
+
) : null}
|
|
62
|
+
</p>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</li>
|
|
66
|
+
);
|
|
67
|
+
})}
|
|
68
|
+
</ul>
|
|
69
|
+
)}
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "dkit:block",
|
|
3
|
+
"id": "testimonials-list-cards",
|
|
4
|
+
"title": "Testimonials list (cards)",
|
|
5
|
+
"description": "Card grid of quotes with author, role, company, and avatar",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"frameworks": ["next"],
|
|
8
|
+
"uiKits": ["shadcn", "minimal"],
|
|
9
|
+
"shadcnComponents": ["card"],
|
|
10
|
+
"slot": "list",
|
|
11
|
+
"route": { "kind": "static" },
|
|
12
|
+
"registryDependencies": ["testimonials"],
|
|
13
|
+
"dependencies": ["@directus/sdk"],
|
|
14
|
+
"layers": ["ui"]
|
|
15
|
+
}
|
package/vendor/registry/blocks/testimonials-list-cards/ui/minimal/next/testimonials-list-cards.tsx
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getTestimonials,
|
|
3
|
+
testimonialAvatarUrl,
|
|
4
|
+
} from "@/lib/dkit/testimonials";
|
|
5
|
+
|
|
6
|
+
/** Minimal kit — uses shared .dkit-card / type primitives. */
|
|
7
|
+
export async function TestimonialsListCards() {
|
|
8
|
+
const testimonials = await getTestimonials();
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<section>
|
|
12
|
+
<style>{`
|
|
13
|
+
.dkit-testimonials-cards-header {
|
|
14
|
+
text-align: center;
|
|
15
|
+
margin-bottom: 2rem;
|
|
16
|
+
}
|
|
17
|
+
.dkit-testimonials-cards {
|
|
18
|
+
display: grid;
|
|
19
|
+
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
20
|
+
gap: 1.5rem;
|
|
21
|
+
list-style: none;
|
|
22
|
+
margin: 0;
|
|
23
|
+
padding: 0;
|
|
24
|
+
}
|
|
25
|
+
.dkit-testimonials-cards blockquote {
|
|
26
|
+
margin: 0;
|
|
27
|
+
flex: 1;
|
|
28
|
+
font-size: 0.9375rem;
|
|
29
|
+
line-height: 1.6;
|
|
30
|
+
}
|
|
31
|
+
.dkit-testimonials-cards__footer {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
gap: 0.75rem;
|
|
35
|
+
margin-top: 1rem;
|
|
36
|
+
padding-top: 1rem;
|
|
37
|
+
border-top: 1px solid #eee;
|
|
38
|
+
}
|
|
39
|
+
.dkit-testimonials-cards__avatar,
|
|
40
|
+
.dkit-testimonials-cards__initial {
|
|
41
|
+
width: 2.5rem;
|
|
42
|
+
height: 2.5rem;
|
|
43
|
+
border-radius: 9999px;
|
|
44
|
+
object-fit: cover;
|
|
45
|
+
flex-shrink: 0;
|
|
46
|
+
}
|
|
47
|
+
.dkit-testimonials-cards__initial {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
background: #eee;
|
|
52
|
+
font-weight: 600;
|
|
53
|
+
font-size: 0.875rem;
|
|
54
|
+
}
|
|
55
|
+
.dkit-testimonials-cards__name {
|
|
56
|
+
font-weight: 600;
|
|
57
|
+
font-size: 0.875rem;
|
|
58
|
+
margin: 0;
|
|
59
|
+
}
|
|
60
|
+
.dkit-testimonials-cards__meta {
|
|
61
|
+
font-size: 0.8125rem;
|
|
62
|
+
color: var(--dkit-muted, #666);
|
|
63
|
+
margin: 0;
|
|
64
|
+
}
|
|
65
|
+
`}</style>
|
|
66
|
+
|
|
67
|
+
<div className="dkit-testimonials-cards-header">
|
|
68
|
+
<p className="dkit-label">Testimonials</p>
|
|
69
|
+
<h2 className="dkit-headline">What our clients say</h2>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
{testimonials.length === 0 ? (
|
|
73
|
+
<p>No testimonials yet.</p>
|
|
74
|
+
) : (
|
|
75
|
+
<ul className="dkit-testimonials-cards">
|
|
76
|
+
{testimonials.map((t) => {
|
|
77
|
+
const avatarUrl = testimonialAvatarUrl(t);
|
|
78
|
+
return (
|
|
79
|
+
<li key={t.id} className="dkit-card">
|
|
80
|
+
<blockquote>“{t.quote}”</blockquote>
|
|
81
|
+
<div className="dkit-testimonials-cards__footer">
|
|
82
|
+
{avatarUrl ? (
|
|
83
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
84
|
+
<img
|
|
85
|
+
className="dkit-testimonials-cards__avatar"
|
|
86
|
+
src={avatarUrl}
|
|
87
|
+
alt=""
|
|
88
|
+
width={40}
|
|
89
|
+
height={40}
|
|
90
|
+
/>
|
|
91
|
+
) : (
|
|
92
|
+
<span className="dkit-testimonials-cards__initial">
|
|
93
|
+
{t.author_name.charAt(0)}
|
|
94
|
+
</span>
|
|
95
|
+
)}
|
|
96
|
+
<span>
|
|
97
|
+
<p className="dkit-testimonials-cards__name">
|
|
98
|
+
{t.author_name}
|
|
99
|
+
</p>
|
|
100
|
+
{t.author_role || t.company ? (
|
|
101
|
+
<p className="dkit-testimonials-cards__meta">
|
|
102
|
+
{[t.author_role, t.company].filter(Boolean).join(" · ")}
|
|
103
|
+
</p>
|
|
104
|
+
) : null}
|
|
105
|
+
</span>
|
|
106
|
+
</div>
|
|
107
|
+
</li>
|
|
108
|
+
);
|
|
109
|
+
})}
|
|
110
|
+
</ul>
|
|
111
|
+
)}
|
|
112
|
+
</section>
|
|
113
|
+
);
|
|
114
|
+
}
|
package/vendor/registry/blocks/testimonials-list-cards/ui/shadcn/next/testimonials-list-cards.tsx
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getTestimonials,
|
|
3
|
+
testimonialAvatarUrl,
|
|
4
|
+
} from "@/lib/dkit/testimonials";
|
|
5
|
+
import {
|
|
6
|
+
Card,
|
|
7
|
+
CardContent,
|
|
8
|
+
CardFooter,
|
|
9
|
+
} from "@/components/ui/card";
|
|
10
|
+
|
|
11
|
+
/** Uses your project's shadcn/ui components. */
|
|
12
|
+
export async function TestimonialsListCards() {
|
|
13
|
+
const testimonials = await getTestimonials();
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<div className="mx-auto max-w-5xl px-6 py-16 sm:py-20">
|
|
17
|
+
<header className="mb-12 text-center">
|
|
18
|
+
<p className="mb-3 text-xs font-medium tracking-[0.2em] text-primary uppercase">
|
|
19
|
+
Testimonials
|
|
20
|
+
</p>
|
|
21
|
+
<h2 className="text-3xl font-semibold tracking-tight text-foreground sm:text-4xl">
|
|
22
|
+
What our clients say
|
|
23
|
+
</h2>
|
|
24
|
+
</header>
|
|
25
|
+
|
|
26
|
+
{testimonials.length === 0 ? (
|
|
27
|
+
<p className="rounded-xl border border-dashed border-border px-6 py-12 text-center text-muted-foreground">
|
|
28
|
+
No testimonials yet.
|
|
29
|
+
</p>
|
|
30
|
+
) : (
|
|
31
|
+
<div className="grid gap-5 sm:grid-cols-2 lg:grid-cols-3">
|
|
32
|
+
{testimonials.map((t) => {
|
|
33
|
+
const avatarUrl = testimonialAvatarUrl(t);
|
|
34
|
+
return (
|
|
35
|
+
<Card key={t.id} className="h-full shadow-sm">
|
|
36
|
+
<CardContent className="flex-1">
|
|
37
|
+
<blockquote className="text-sm leading-relaxed text-card-foreground">
|
|
38
|
+
“{t.quote}”
|
|
39
|
+
</blockquote>
|
|
40
|
+
</CardContent>
|
|
41
|
+
<CardFooter className="mt-auto gap-3 border-t">
|
|
42
|
+
{avatarUrl ? (
|
|
43
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
44
|
+
<img
|
|
45
|
+
src={avatarUrl}
|
|
46
|
+
alt=""
|
|
47
|
+
className="h-10 w-10 shrink-0 rounded-full object-cover ring-1 ring-border"
|
|
48
|
+
/>
|
|
49
|
+
) : (
|
|
50
|
+
<span className="flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-muted text-sm font-medium text-muted-foreground">
|
|
51
|
+
{t.author_name.charAt(0)}
|
|
52
|
+
</span>
|
|
53
|
+
)}
|
|
54
|
+
<span className="min-w-0">
|
|
55
|
+
<span className="block text-sm font-medium text-foreground">
|
|
56
|
+
{t.author_name}
|
|
57
|
+
</span>
|
|
58
|
+
{t.author_role || t.company ? (
|
|
59
|
+
<span className="block text-xs text-muted-foreground">
|
|
60
|
+
{[t.author_role, t.company].filter(Boolean).join(" · ")}
|
|
61
|
+
</span>
|
|
62
|
+
) : null}
|
|
63
|
+
</span>
|
|
64
|
+
</CardFooter>
|
|
65
|
+
</Card>
|
|
66
|
+
);
|
|
67
|
+
})}
|
|
68
|
+
</div>
|
|
69
|
+
)}
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"policies": [
|
|
3
|
+
{
|
|
4
|
+
"name": "dkit Languages Public Read",
|
|
5
|
+
"icon": "public",
|
|
6
|
+
"description": "Public read for content languages (multilocale).",
|
|
7
|
+
"admin_access": false,
|
|
8
|
+
"app_access": false
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"permissions": [
|
|
12
|
+
{
|
|
13
|
+
"policy": "dkit Languages Public Read",
|
|
14
|
+
"collection": "languages",
|
|
15
|
+
"action": "read",
|
|
16
|
+
"fields": ["*"]
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"access": [
|
|
20
|
+
{
|
|
21
|
+
"role": "$public",
|
|
22
|
+
"policy": "dkit Languages Public Read"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "dkit.rest",
|
|
3
|
+
"collections": [
|
|
4
|
+
{
|
|
5
|
+
"collection": "languages",
|
|
6
|
+
"schema": {},
|
|
7
|
+
"meta": {
|
|
8
|
+
"icon": "translate",
|
|
9
|
+
"color": "#0F766E",
|
|
10
|
+
"display_template": "{{name}} ({{code}})",
|
|
11
|
+
"singleton": false,
|
|
12
|
+
"sort": 1,
|
|
13
|
+
"translations": [
|
|
14
|
+
{
|
|
15
|
+
"language": "en-US",
|
|
16
|
+
"translation": "Languages",
|
|
17
|
+
"singular": "Language",
|
|
18
|
+
"plural": "Languages"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"note": "Content locales for Directus translations (dkit multilocales)"
|
|
22
|
+
},
|
|
23
|
+
"fields": [
|
|
24
|
+
{
|
|
25
|
+
"field": "code",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"meta": {
|
|
28
|
+
"interface": "input",
|
|
29
|
+
"required": true,
|
|
30
|
+
"width": "half",
|
|
31
|
+
"sort": 1,
|
|
32
|
+
"options": { "trim": true },
|
|
33
|
+
"translations": [
|
|
34
|
+
{ "language": "en-US", "translation": "Code" }
|
|
35
|
+
],
|
|
36
|
+
"note": "BCP 47 / Directus language code (e.g. en-US, nl-NL)",
|
|
37
|
+
"validation": {
|
|
38
|
+
"_and": [{ "code": { "_regex": "^[A-Za-z]{2,3}(-[A-Za-z0-9]+)*$" } }]
|
|
39
|
+
},
|
|
40
|
+
"validation_message": "Use a locale code like en-US or nl-NL."
|
|
41
|
+
},
|
|
42
|
+
"schema": {
|
|
43
|
+
"is_primary_key": true,
|
|
44
|
+
"is_nullable": false,
|
|
45
|
+
"max_length": 15
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"field": "name",
|
|
50
|
+
"type": "string",
|
|
51
|
+
"meta": {
|
|
52
|
+
"interface": "input",
|
|
53
|
+
"required": true,
|
|
54
|
+
"width": "half",
|
|
55
|
+
"sort": 2,
|
|
56
|
+
"options": { "trim": true },
|
|
57
|
+
"translations": [
|
|
58
|
+
{ "language": "en-US", "translation": "Name" }
|
|
59
|
+
],
|
|
60
|
+
"validation": {
|
|
61
|
+
"_and": [{ "name": { "_regex": "^.{1,80}$" } }]
|
|
62
|
+
},
|
|
63
|
+
"validation_message": "Name is required (max 80 characters)."
|
|
64
|
+
},
|
|
65
|
+
"schema": { "is_nullable": false, "max_length": 80 }
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"field": "direction",
|
|
69
|
+
"type": "string",
|
|
70
|
+
"meta": {
|
|
71
|
+
"interface": "select-dropdown",
|
|
72
|
+
"width": "half",
|
|
73
|
+
"sort": 3,
|
|
74
|
+
"options": {
|
|
75
|
+
"choices": [
|
|
76
|
+
{ "text": "LTR", "value": "ltr" },
|
|
77
|
+
{ "text": "RTL", "value": "rtl" }
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"translations": [
|
|
81
|
+
{ "language": "en-US", "translation": "Direction" }
|
|
82
|
+
],
|
|
83
|
+
"validation": {
|
|
84
|
+
"_and": [{ "direction": { "_in": ["ltr", "rtl"] } }]
|
|
85
|
+
},
|
|
86
|
+
"validation_message": "Choose LTR or RTL."
|
|
87
|
+
},
|
|
88
|
+
"schema": { "default_value": "ltr", "is_nullable": false, "max_length": 3 }
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"relations": []
|
|
94
|
+
}
|