@stackshift-ui/team 6.0.6-beta.2 → 6.0.6

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.
@@ -0,0 +1,85 @@
1
+ // src/team_b.tsx
2
+ import { Button } from "@stackshift-ui/button";
3
+ import { Card } from "@stackshift-ui/card";
4
+ import { Container } from "@stackshift-ui/container";
5
+ import { Flex } from "@stackshift-ui/flex";
6
+ import { Image } from "@stackshift-ui/image";
7
+ import { Section } from "@stackshift-ui/section";
8
+ import { Text } from "@stackshift-ui/text";
9
+ import React from "react";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ function Team_B({ team }) {
12
+ var _a;
13
+ const [activeTab, setActiveTab] = React.useState((_a = team == null ? void 0 : team[0]) == null ? void 0 : _a.name);
14
+ const filteredMembers = React.useMemo(
15
+ () => (team == null ? void 0 : team.filter((member) => (member == null ? void 0 : member.name) === activeTab)) || [],
16
+ [team, activeTab]
17
+ );
18
+ return /* @__PURE__ */ jsx(Section, { className: "py-20 bg-background", children: /* @__PURE__ */ jsx(Container, { maxWidth: 1280, children: /* @__PURE__ */ jsxs(Flex, { wrap: true, align: "center", children: [
19
+ /* @__PURE__ */ jsx(TeamTabs, { team, activeTab, setActiveTab }),
20
+ /* @__PURE__ */ jsx(TeamMembersList, { members: filteredMembers })
21
+ ] }) }) });
22
+ }
23
+ function TeamTabs({ team, activeTab, setActiveTab }) {
24
+ return /* @__PURE__ */ jsx("div", { className: "w-full px-3 mb-8 lg:mb-0 lg:w-1/3", children: /* @__PURE__ */ jsx(
25
+ Flex,
26
+ {
27
+ as: "ul",
28
+ wrap: true,
29
+ justify: "center",
30
+ direction: "row",
31
+ className: "space-x-6 lg:flex-col lg:justify-start lg:space-x-0",
32
+ children: team == null ? void 0 : team.map((item) => /* @__PURE__ */ jsx(TeamTab, { data: item, activeTab, setActiveTab }, item.name))
33
+ }
34
+ ) });
35
+ }
36
+ function TeamTab({ data, activeTab, setActiveTab }) {
37
+ if (!data || !data.name) return null;
38
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
39
+ Button,
40
+ {
41
+ as: "button",
42
+ variant: "unstyled",
43
+ ariaLabel: data.name,
44
+ className: `mb-4 text-xl lg:text-2xl ${data.name === activeTab ? "text-gray-900" : "text-gray-500"} font-bold hover:text-gray-500 focus:outline-none`,
45
+ onClick: () => {
46
+ var _a;
47
+ return setActiveTab((_a = data.name) != null ? _a : "");
48
+ },
49
+ children: data.name
50
+ }
51
+ ) });
52
+ }
53
+ function TeamMembersList({ members }) {
54
+ if (!members) return null;
55
+ return /* @__PURE__ */ jsx("div", { className: "w-full px-3 lg:w-2/3", children: members.map((member, index) => /* @__PURE__ */ jsx(TeamMemberCard, { member }, index)) });
56
+ }
57
+ function TeamMemberCard({ member }) {
58
+ var _a, _b;
59
+ if (!member) return null;
60
+ return /* @__PURE__ */ jsxs(Card, { className: "flex p-6 shadow-lg bg-white", borderRadius: "md", children: [
61
+ ((_a = member.mainImage) == null ? void 0 : _a.image) && /* @__PURE__ */ jsx(
62
+ Image,
63
+ {
64
+ className: "object-cover overflow-hidden rounded-md",
65
+ src: `${member.mainImage.image}`,
66
+ sizes: "100vw",
67
+ width: 329,
68
+ height: 494,
69
+ alt: (_b = member.mainImage.alt) != null ? _b : `team-member-${member.name}-profile-image`
70
+ }
71
+ ),
72
+ /* @__PURE__ */ jsx(TeamMmeberText, { member })
73
+ ] });
74
+ }
75
+ function TeamMmeberText({ member }) {
76
+ return /* @__PURE__ */ jsxs("div", { className: "order-last w-1/2 pt-6 pl-6 mt-6", children: [
77
+ /* @__PURE__ */ jsx(Text, { weight: "bold", fontSize: "2xl", children: member.name }),
78
+ /* @__PURE__ */ jsx(Text, { className: "mb-6", muted: true, children: member.jobTitle }),
79
+ /* @__PURE__ */ jsx(Text, { className: "mb-6 text-justify", muted: true, children: member.plainText })
80
+ ] });
81
+ }
82
+
83
+ export {
84
+ Team_B
85
+ };
@@ -0,0 +1,51 @@
1
+ // src/team_a.tsx
2
+ import { Card } from "@stackshift-ui/card";
3
+ import { Container } from "@stackshift-ui/container";
4
+ import { Flex } from "@stackshift-ui/flex";
5
+ import { Heading } from "@stackshift-ui/heading";
6
+ import { Image } from "@stackshift-ui/image";
7
+ import { Section } from "@stackshift-ui/section";
8
+ import { Text } from "@stackshift-ui/text";
9
+ import React from "react";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ function Team_A({ caption, title, team }) {
12
+ return /* @__PURE__ */ jsx(Section, { className: "py-20 bg-background", children: /* @__PURE__ */ jsxs(Container, { maxWidth: 1e3, children: [
13
+ /* @__PURE__ */ jsx(Container, { maxWidth: 576, className: "mb-10 text-center", children: /* @__PURE__ */ jsx(CaptionAndTitle, { caption, title }) }),
14
+ /* @__PURE__ */ jsx(Teams, { team })
15
+ ] }) });
16
+ }
17
+ function CaptionAndTitle({ caption, title }) {
18
+ return /* @__PURE__ */ jsxs(React.Fragment, { children: [
19
+ caption ? /* @__PURE__ */ jsx(Text, { weight: "bold", className: "text-secondary", children: caption }) : null,
20
+ title ? /* @__PURE__ */ jsx(Heading, { type: "h2", fontSize: "2xl", children: title }) : null
21
+ ] });
22
+ }
23
+ function Teams({ team }) {
24
+ if (!team) return null;
25
+ return /* @__PURE__ */ jsx(Flex, { wrap: true, children: team == null ? void 0 : team.map((member) => {
26
+ var _a, _b, _c, _d;
27
+ return /* @__PURE__ */ jsx("div", { className: "w-full px-3 mb-6 md:w-1/2 lg:w-1/3", children: /* @__PURE__ */ jsxs(Card, { className: "py-24 text-center shadow-lg bg-white", borderRadius: "md", children: [
28
+ ((_a = member == null ? void 0 : member.mainImage) == null ? void 0 : _a.image) && /* @__PURE__ */ jsx(
29
+ Image,
30
+ {
31
+ width: 96,
32
+ height: 96,
33
+ className: "mx-auto border-0 w-[96px] h-[96px] object-cover rounded-full",
34
+ src: `${(_b = member == null ? void 0 : member.mainImage) == null ? void 0 : _b.image}`,
35
+ alt: (_d = (_c = member == null ? void 0 : member.mainImage) == null ? void 0 : _c.alt) != null ? _d : `team-member-${member == null ? void 0 : member.name}-profile-image`
36
+ }
37
+ ),
38
+ /* @__PURE__ */ jsx(TeamMemberText, { member })
39
+ ] }) }, member == null ? void 0 : member.name);
40
+ }) });
41
+ }
42
+ function TeamMemberText({ member }) {
43
+ return /* @__PURE__ */ jsxs(React.Fragment, { children: [
44
+ /* @__PURE__ */ jsx(Heading, { type: "h3", className: "mb-2 text-xl lg:text-2xl", children: member == null ? void 0 : member.name }),
45
+ /* @__PURE__ */ jsx(Text, { muted: true, children: member == null ? void 0 : member.jobTitle })
46
+ ] });
47
+ }
48
+
49
+ export {
50
+ Team_A
51
+ };
@@ -0,0 +1,58 @@
1
+ // src/team_d.tsx
2
+ import { Card } from "@stackshift-ui/card";
3
+ import { Container } from "@stackshift-ui/container";
4
+ import { Flex } from "@stackshift-ui/flex";
5
+ import { Heading } from "@stackshift-ui/heading";
6
+ import { Image } from "@stackshift-ui/image";
7
+ import { Section } from "@stackshift-ui/section";
8
+ import { Text } from "@stackshift-ui/text";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ function Team_D({ caption, title, team }) {
11
+ return /* @__PURE__ */ jsx(Section, { className: "py-20 bg-background", children: /* @__PURE__ */ jsxs(Container, { maxWidth: 1280, children: [
12
+ /* @__PURE__ */ jsx(CaptionAndTitle, { caption, title }),
13
+ /* @__PURE__ */ jsx(TeamMemberCard, { team })
14
+ ] }) });
15
+ }
16
+ function CaptionAndTitle({ caption, title }) {
17
+ return /* @__PURE__ */ jsxs(Container, { maxWidth: 576, className: "mb-8 text-center lg:mb-16", children: [
18
+ caption && /* @__PURE__ */ jsx(Text, { weight: "bold", className: "text-secondary", children: caption }),
19
+ title && /* @__PURE__ */ jsx(Heading, { children: title })
20
+ ] });
21
+ }
22
+ function TeamMemberCard({ team }) {
23
+ if (!team) return null;
24
+ return /* @__PURE__ */ jsx(Flex, { wrap: true, children: team && team.map((member, index) => {
25
+ var _a, _b, _c, _d;
26
+ return /* @__PURE__ */ jsx("div", { className: "w-full px-4 mb-6 lg:w-1/2", children: /* @__PURE__ */ jsxs(
27
+ Card,
28
+ {
29
+ className: "items-center p-0 bg-white overflow-hidden shadow-lg sm:flex sm:flex-wrap lg:block xl:flex",
30
+ borderRadius: "md",
31
+ children: [
32
+ ((_a = member.mainImage) == null ? void 0 : _a.image) && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
33
+ Image,
34
+ {
35
+ className: "h-[320px] w-full object-cover rounded-md sm:w-[179px] lg:w-full xl:w-[179px]",
36
+ sizes: "100vw",
37
+ src: `${(_b = member == null ? void 0 : member.mainImage) == null ? void 0 : _b.image}`,
38
+ width: 179,
39
+ height: 320,
40
+ alt: (_d = (_c = member == null ? void 0 : member.mainImage) == null ? void 0 : _c.alt) != null ? _d : `team-member-${member == null ? void 0 : member.name}-profile-image`
41
+ }
42
+ ) }),
43
+ /* @__PURE__ */ jsx(TeamMemberText, { member })
44
+ ]
45
+ }
46
+ ) }, index);
47
+ }) });
48
+ }
49
+ function TeamMemberText({ member }) {
50
+ return /* @__PURE__ */ jsxs("div", { className: "p-4 sm:w-2/3 lg:w-full lg:pl-6 xl:w-2/3", children: [
51
+ /* @__PURE__ */ jsx(Text, { weight: "bold", fontSize: "2xl", className: "mb-2", children: member == null ? void 0 : member.name }),
52
+ /* @__PURE__ */ jsx(Text, { className: "mb-4 leading-loose", muted: true, children: member == null ? void 0 : member.plainText })
53
+ ] });
54
+ }
55
+
56
+ export {
57
+ Team_D
58
+ };
@@ -0,0 +1,59 @@
1
+ // src/team_c.tsx
2
+ import { Card } from "@stackshift-ui/card";
3
+ import { Container } from "@stackshift-ui/container";
4
+ import { Flex } from "@stackshift-ui/flex";
5
+ import { Heading } from "@stackshift-ui/heading";
6
+ import { Image } from "@stackshift-ui/image";
7
+ import { Section } from "@stackshift-ui/section";
8
+ import { Text } from "@stackshift-ui/text";
9
+ import React from "react";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ function Team_C({ caption, title, team }) {
12
+ return /* @__PURE__ */ jsx(Section, { className: "py-20 bg-background", children: /* @__PURE__ */ jsxs(Container, { maxWidth: 1280, children: [
13
+ /* @__PURE__ */ jsx(CaptionAndTitle, { caption, title }),
14
+ /* @__PURE__ */ jsx(TeamMemberCard, { team })
15
+ ] }) });
16
+ }
17
+ function CaptionAndTitle({ caption, title }) {
18
+ return /* @__PURE__ */ jsxs(Container, { maxWidth: 576, className: "mb-12 text-center ", children: [
19
+ caption && /* @__PURE__ */ jsx(Text, { weight: "bold", className: "text-primary", children: caption }),
20
+ title && /* @__PURE__ */ jsx(Heading, { children: title })
21
+ ] });
22
+ }
23
+ function TeamMemberCard({ team }) {
24
+ if (!team) return null;
25
+ return /* @__PURE__ */ jsx(Flex, { wrap: true, children: team.map((member) => {
26
+ var _a, _b, _c, _d;
27
+ return /* @__PURE__ */ jsx("div", { className: "w-full px-3 mb-6 md:w-1/2 lg:w-1/3", children: /* @__PURE__ */ jsxs(
28
+ Card,
29
+ {
30
+ className: "w-full p-0 pb-8 overflow-hidden bg-white shadow-lg text-center",
31
+ borderRadius: "md",
32
+ children: [
33
+ ((_a = member.mainImage) == null ? void 0 : _a.image) && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
34
+ Image,
35
+ {
36
+ className: "mb-8 h-[345px] w-full object-cover rounded-md",
37
+ sizes: "100vw",
38
+ src: `${(_b = member == null ? void 0 : member.mainImage) == null ? void 0 : _b.image}`,
39
+ width: 345,
40
+ height: 256,
41
+ alt: (_d = (_c = member == null ? void 0 : member.mainImage) == null ? void 0 : _c.alt) != null ? _d : `team-member-${member == null ? void 0 : member.name}-profile-image`
42
+ }
43
+ ) }),
44
+ /* @__PURE__ */ jsx(TeamMemberText, { member })
45
+ ]
46
+ }
47
+ ) }, member == null ? void 0 : member.name);
48
+ }) });
49
+ }
50
+ function TeamMemberText({ member }) {
51
+ return /* @__PURE__ */ jsxs(React.Fragment, { children: [
52
+ /* @__PURE__ */ jsx(Text, { fontSize: "2xl", weight: "bold", className: "mb-2", children: member == null ? void 0 : member.name }),
53
+ /* @__PURE__ */ jsx(Text, { muted: true, children: member == null ? void 0 : member.jobTitle })
54
+ ] });
55
+ }
56
+
57
+ export {
58
+ Team_C
59
+ };
@@ -0,0 +1,26 @@
1
+ // src/team.tsx
2
+ import { lazy } from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ var Variants = {
5
+ variant_a: lazy(() => import("./team_a.mjs")),
6
+ variant_b: lazy(() => import("./team_b.mjs")),
7
+ variant_c: lazy(() => import("./team_c.mjs")),
8
+ variant_d: lazy(() => import("./team_d.mjs"))
9
+ };
10
+ var displayName = "Team";
11
+ var Team = ({ data }) => {
12
+ var _a, _b, _c, _d, _e, _f;
13
+ const variant = data == null ? void 0 : data.variant;
14
+ const Variant = variant && Variants[variant];
15
+ const props = {
16
+ caption: (_b = (_a = data == null ? void 0 : data.variants) == null ? void 0 : _a.subtitle) != null ? _b : void 0,
17
+ title: (_d = (_c = data == null ? void 0 : data.variants) == null ? void 0 : _c.title) != null ? _d : void 0,
18
+ team: (_f = (_e = data == null ? void 0 : data.variants) == null ? void 0 : _e.teams) != null ? _f : void 0
19
+ };
20
+ return Variant ? /* @__PURE__ */ jsx(Variant, { ...props }) : null;
21
+ };
22
+ Team.displayName = displayName;
23
+
24
+ export {
25
+ Team
26
+ };