@inialum/memories-react 0.4.0 → 1.0.1

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 (34) hide show
  1. package/README.md +60 -12
  2. package/dist/assets/cross_icon.js +28 -0
  3. package/dist/assets/inialum_logo_light_transparent.js +184 -0
  4. package/dist/assets/inialum_logo_white_transparent.js +184 -0
  5. package/dist/assets/menu_icon.js +38 -0
  6. package/dist/assets/x_logo.js +14 -0
  7. package/dist/components/{Button.d.ts → Button/Button.d.ts} +1 -1
  8. package/dist/components/Button/Button.js +19 -0
  9. package/dist/components/Button/Button.stories.d.ts +18 -0
  10. package/dist/components/Button/index.d.ts +1 -0
  11. package/dist/components/Button/index.js +2 -0
  12. package/dist/components/{ButtonLink.d.ts → ButtonLink/ButtonLink.d.ts} +1 -1
  13. package/dist/components/ButtonLink/ButtonLink.js +22 -0
  14. package/dist/components/ButtonLink/ButtonLink.stories.d.ts +19 -0
  15. package/dist/components/ButtonLink/index.d.ts +1 -0
  16. package/dist/components/ButtonLink/index.js +2 -0
  17. package/dist/components/Footer/Footer.js +127 -0
  18. package/dist/components/Footer/Footer.stories.d.ts +9 -0
  19. package/dist/components/Footer/index.d.ts +1 -0
  20. package/dist/components/Footer/index.js +2 -0
  21. package/dist/components/Header/Header.js +38 -0
  22. package/dist/components/Header/Header.stories.d.ts +11 -0
  23. package/dist/components/Header/index.d.ts +1 -0
  24. package/dist/components/Header/index.js +2 -0
  25. package/dist/components/Navigation/Navigation.js +169 -0
  26. package/dist/components/Navigation/Navigation.stories.d.ts +17 -0
  27. package/dist/components/Navigation/index.d.ts +1 -0
  28. package/dist/components/Navigation/index.js +2 -0
  29. package/dist/components/index.js +11 -0
  30. package/dist/index.js +7 -20485
  31. package/package.json +41 -31
  32. /package/dist/components/{Footer.d.ts → Footer/Footer.d.ts} +0 -0
  33. /package/dist/components/{Header.d.ts → Header/Header.d.ts} +0 -0
  34. /package/dist/components/{Navigation.d.ts → Navigation/Navigation.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ export { ButtonLink } from './ButtonLink';
@@ -0,0 +1,2 @@
1
+ import { ButtonLink } from "./ButtonLink.js";
2
+ export { ButtonLink };
@@ -0,0 +1,127 @@
1
+ import SvgInialumLogoLightTransparent from "../../assets/inialum_logo_light_transparent.js";
2
+ import SvgXLogo from "../../assets/x_logo.js";
3
+ import clsx from "clsx";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ //#region src/components/Footer/Footer.tsx
6
+ var Footer = ({ className, ...rest }) => {
7
+ const nowYear = (/* @__PURE__ */ new Date()).getFullYear();
8
+ return /* @__PURE__ */ jsxs("footer", {
9
+ ...rest,
10
+ className: clsx("bg-base-block", "pt-52 px-48 pb-28 md:pb-64", className),
11
+ children: [
12
+ /* @__PURE__ */ jsxs("div", {
13
+ className: "flex flex-col items-center justify-center gap-y-12 md:gap-y-16",
14
+ children: [/* @__PURE__ */ jsx("div", {
15
+ className: "w-120 h-120 md:w-280 md:h-280",
16
+ children: /* @__PURE__ */ jsx(SvgInialumLogoLightTransparent, {
17
+ "aria-label": "INIALUM - INIAD Alumni Meetings",
18
+ className: "object-cover w-full h-full"
19
+ })
20
+ }), /* @__PURE__ */ jsx("div", {
21
+ className: "font-bold text-2xs md:text-sm",
22
+ children: "さらなる連携を、ともに歩んだ仲間と"
23
+ })]
24
+ }),
25
+ /* @__PURE__ */ jsx("nav", { children: /* @__PURE__ */ jsxs("ul", {
26
+ className: "flex flex-col items-center text-center gap-y-32 md:gap-y-48 pt-40 md:py-56 pb-28",
27
+ children: [
28
+ /* @__PURE__ */ jsx("li", {
29
+ className: "font-bold text-xs md:text-base",
30
+ children: /* @__PURE__ */ jsx("a", {
31
+ href: "/",
32
+ children: "ホーム"
33
+ })
34
+ }),
35
+ /* @__PURE__ */ jsx("li", {
36
+ className: "font-bold text-xs md:text-base",
37
+ children: /* @__PURE__ */ jsx("a", {
38
+ href: "/vision",
39
+ children: "私たちの思い"
40
+ })
41
+ }),
42
+ /* @__PURE__ */ jsx("li", {
43
+ className: "font-bold text-xs md:text-base",
44
+ children: /* @__PURE__ */ jsx("a", {
45
+ href: "https://inialum.org/join",
46
+ children: "入会する"
47
+ })
48
+ }),
49
+ /* @__PURE__ */ jsx("li", {
50
+ className: "font-bold text-xs md:text-base",
51
+ children: /* @__PURE__ */ jsx("a", {
52
+ href: "/contact",
53
+ children: "お問い合わせ"
54
+ })
55
+ }),
56
+ /* @__PURE__ */ jsx("li", {
57
+ className: "font-bold text-xs md:text-base",
58
+ children: /* @__PURE__ */ jsx("a", {
59
+ href: "https://inialum.notion.site/INIALUM-Q-A-0cfb2bd4cc814df6a29ca5aa7f9ad9b7",
60
+ target: "_blank",
61
+ rel: "noreferrer noopener",
62
+ children: "Q&A"
63
+ })
64
+ })
65
+ ]
66
+ }) }),
67
+ /* @__PURE__ */ jsxs("div", {
68
+ className: "flex flex-col items-center text-center border-t border-t-gray-500 max-w-732 mx-auto gap-y-16 md:gap-y-36 pt-28 md:pt-56",
69
+ children: [
70
+ /* @__PURE__ */ jsx("div", {
71
+ className: "flex items-center justify-center pt-0 px-0 pb-12 md:pb-8",
72
+ children: /* @__PURE__ */ jsx("a", {
73
+ href: "https://twitter.com/inialum",
74
+ target: "_blank",
75
+ rel: "noreferrer noopener",
76
+ children: /* @__PURE__ */ jsx(SvgXLogo, {
77
+ "aria-label": "X公式アカウント",
78
+ className: "h-24 md:h-32 fill-black"
79
+ })
80
+ })
81
+ }),
82
+ /* @__PURE__ */ jsxs("div", {
83
+ className: "flex items-center justify-center text-gray-500 gap-x-20 md:gap-x-48 text-2xs md:text-sm",
84
+ children: [
85
+ /* @__PURE__ */ jsx("a", {
86
+ href: "https://inialum.notion.site/4cbf67b190544bff8891deabc64e776c",
87
+ target: "_blank",
88
+ rel: "noreferrer noopener",
89
+ children: "同窓会会則"
90
+ }),
91
+ /* @__PURE__ */ jsx("a", {
92
+ href: "https://inialum.notion.site/4d2374f79b594f00b93c0efccf3c6bb4",
93
+ target: "_blank",
94
+ rel: "noreferrer noopener",
95
+ children: "役員一覧"
96
+ }),
97
+ /* @__PURE__ */ jsx("a", {
98
+ href: "https://inialum.notion.site/d8a7e0dd14224c0dadfd630a6665cee0",
99
+ target: "_blank",
100
+ rel: "noreferrer noopener",
101
+ children: "プライバシーポリシー"
102
+ }),
103
+ /* @__PURE__ */ jsx("a", {
104
+ href: "https://github.com/inialum",
105
+ target: "_blank",
106
+ rel: "noreferrer noopener",
107
+ children: "GitHub"
108
+ })
109
+ ]
110
+ }),
111
+ /* @__PURE__ */ jsxs("div", {
112
+ className: "text-gray-500 text-2xs md:text-sm",
113
+ children: [
114
+ "© ",
115
+ nowYear,
116
+ " INIALUM - INIAD Alumni Meetings."
117
+ ]
118
+ })
119
+ ]
120
+ })
121
+ ]
122
+ });
123
+ };
124
+ //#endregion
125
+ export { Footer };
126
+
127
+ //# sourceMappingURL=Footer.js.map
@@ -0,0 +1,9 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ import { DetailedHTMLProps, HTMLAttributes } from 'react';
3
+ declare const meta: {
4
+ title: string;
5
+ component: ({ className, ...rest }: DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>) => import("react/jsx-runtime").JSX.Element;
6
+ };
7
+ export default meta;
8
+ type Story = StoryObj<typeof meta>;
9
+ export declare const Default: Story;
@@ -0,0 +1 @@
1
+ export { Footer } from './Footer';
@@ -0,0 +1,2 @@
1
+ import { Footer } from "./Footer.js";
2
+ export { Footer };
@@ -0,0 +1,38 @@
1
+ import SvgInialumLogoLightTransparent from "../../assets/inialum_logo_light_transparent.js";
2
+ import SvgMenuIcon from "../../assets/menu_icon.js";
3
+ import { Navigation } from "../Navigation/Navigation.js";
4
+ import "../Navigation/index.js";
5
+ import clsx from "clsx";
6
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
+ import { useCallback, useState } from "react";
8
+ //#region src/components/Header/Header.tsx
9
+ var Header = ({ hasNavigation = true, className, ...rest }) => {
10
+ const [isOpen, setIsOpen] = useState(false);
11
+ const onClick = useCallback(() => {
12
+ setIsOpen(!isOpen);
13
+ }, [isOpen]);
14
+ return /* @__PURE__ */ jsxs("header", {
15
+ ...rest,
16
+ className: clsx("relative flex items-center", "bg-primary w-full h-60", className),
17
+ children: [/* @__PURE__ */ jsx("div", {
18
+ className: "absolute top-0 left-0 flex items-center justify-center w-160 h-160 md:w-xs md:h-320 p-12 md:p-24 bg-base-white z-30",
19
+ children: /* @__PURE__ */ jsx(SvgInialumLogoLightTransparent, { "aria-label": "INIALUM - INIAD Alumni Meetings" })
20
+ }), hasNavigation && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("button", {
21
+ type: "button",
22
+ className: "ml-auto mr-20 p-4 fill-base-white",
23
+ title: "ナビゲーションメニュー",
24
+ "aria-label": "ナビゲーションメニューを開く",
25
+ "aria-haspopup": "true",
26
+ "aria-expanded": isOpen,
27
+ onClick,
28
+ children: /* @__PURE__ */ jsx(SvgMenuIcon, { "aria-hidden": "true" })
29
+ }), isOpen && /* @__PURE__ */ jsx(Navigation, {
30
+ isOpen,
31
+ onClose: onClick
32
+ })] })]
33
+ });
34
+ };
35
+ //#endregion
36
+ export { Header };
37
+
38
+ //# sourceMappingURL=Header.js.map
@@ -0,0 +1,11 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ import { ClassAttributes, HTMLAttributes } from 'react';
3
+ declare const meta: {
4
+ title: string;
5
+ component: ({ hasNavigation, className, ...rest }: ClassAttributes<HTMLElement> & HTMLAttributes<HTMLElement> & {
6
+ hasNavigation?: boolean;
7
+ }) => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ export default meta;
10
+ type Story = StoryObj<typeof meta>;
11
+ export declare const Default: Story;
@@ -0,0 +1 @@
1
+ export { Header } from './Header';
@@ -0,0 +1,2 @@
1
+ import { Header } from "./Header.js";
2
+ export { Header };
@@ -0,0 +1,169 @@
1
+ import SvgXLogo from "../../assets/x_logo.js";
2
+ import SvgCrossIcon from "../../assets/cross_icon.js";
3
+ import SvgInialumLogoWhiteTransparent from "../../assets/inialum_logo_white_transparent.js";
4
+ import clsx from "clsx";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { useCallback, useEffect, useRef } from "react";
7
+ import { createPortal } from "react-dom";
8
+ import { RemoveScroll } from "react-remove-scroll";
9
+ //#region src/components/Navigation/Navigation.tsx
10
+ var Navigation = ({ portal = true, ...rest }) => {
11
+ if (portal) {
12
+ const rootElement = portal === true ? document.body : portal.rootElement;
13
+ return createPortal(/* @__PURE__ */ jsx(NavigationContent, { ...rest }), rootElement);
14
+ }
15
+ return /* @__PURE__ */ jsx(NavigationContent, { ...rest });
16
+ };
17
+ var NavigationContent = ({ isOpen, className, onClose: _onClose, ...rest }) => {
18
+ const nowYear = (/* @__PURE__ */ new Date()).getFullYear();
19
+ const dialogRef = useRef(null);
20
+ const onClose = useCallback(() => {
21
+ const dialogElem = dialogRef.current;
22
+ if (!dialogElem) return;
23
+ dialogElem.close();
24
+ _onClose();
25
+ }, [_onClose]);
26
+ useEffect(() => {
27
+ const dialogElem = dialogRef.current;
28
+ if (!dialogElem) return;
29
+ if (isOpen) {
30
+ if (dialogElem.hasAttribute("open")) return;
31
+ dialogElem.showModal();
32
+ } else {
33
+ if (!dialogElem.hasAttribute("open")) return;
34
+ dialogElem.close();
35
+ }
36
+ }, [isOpen]);
37
+ const onClickContent = useCallback((e) => {
38
+ e.stopPropagation();
39
+ }, []);
40
+ return /* @__PURE__ */ jsx(RemoveScroll, {
41
+ removeScrollBar: true,
42
+ enabled: isOpen,
43
+ children: /* @__PURE__ */ jsxs("dialog", {
44
+ ...rest,
45
+ ref: dialogRef,
46
+ onClick: onClose,
47
+ className: clsx("bg-blue-600 text-base-white", "m-0 p-0 max-w-full max-h-full h-svh left-full -translate-x-full sm:w-372 w-full", className),
48
+ style: { transition: "opacity .5s" },
49
+ children: [/* @__PURE__ */ jsx("button", {
50
+ type: "button",
51
+ className: "absolute top-20 right-20 p-4 fill-base-white",
52
+ "aria-label": "閉じる",
53
+ onClick: onClose,
54
+ children: /* @__PURE__ */ jsx(SvgCrossIcon, {
55
+ width: "24",
56
+ height: "24",
57
+ "aria-hidden": "true"
58
+ })
59
+ }), /* @__PURE__ */ jsxs("div", {
60
+ className: "w-full h-full",
61
+ onClick: onClickContent,
62
+ children: [
63
+ /* @__PURE__ */ jsx("div", {
64
+ className: "object-cover h-160 w-160 p-12 sm:hidden",
65
+ children: /* @__PURE__ */ jsx(SvgInialumLogoWhiteTransparent, { "aria-label": "INIALUM - INIAD Alumni Meetings" })
66
+ }),
67
+ /* @__PURE__ */ jsx("nav", { children: /* @__PURE__ */ jsxs("ul", {
68
+ className: "flex flex-col justify-center gap-y-32 px-36 py-32 sm:mt-160",
69
+ children: [
70
+ /* @__PURE__ */ jsx("li", {
71
+ className: "font-bold text-xs",
72
+ children: /* @__PURE__ */ jsx("a", {
73
+ href: "/",
74
+ children: "ホーム"
75
+ })
76
+ }),
77
+ /* @__PURE__ */ jsx("li", {
78
+ className: "font-bold text-xs",
79
+ children: /* @__PURE__ */ jsx("a", {
80
+ href: "/vision",
81
+ children: "私たちの思い"
82
+ })
83
+ }),
84
+ /* @__PURE__ */ jsx("li", {
85
+ className: "font-bold text-xs",
86
+ children: /* @__PURE__ */ jsx("a", {
87
+ href: "https://inialum.org/join",
88
+ children: "入会する"
89
+ })
90
+ }),
91
+ /* @__PURE__ */ jsx("li", {
92
+ className: "font-bold text-xs",
93
+ children: /* @__PURE__ */ jsx("a", {
94
+ href: "/contact",
95
+ children: "お問い合わせ"
96
+ })
97
+ }),
98
+ /* @__PURE__ */ jsx("li", {
99
+ className: "font-bold text-xs",
100
+ children: /* @__PURE__ */ jsx("a", {
101
+ href: "https://inialum.notion.site/INIALUM-Q-A-0cfb2bd4cc814df6a29ca5aa7f9ad9b7",
102
+ target: "_blank",
103
+ rel: "noreferrer noopener",
104
+ children: "Q&A"
105
+ })
106
+ })
107
+ ]
108
+ }) }),
109
+ /* @__PURE__ */ jsxs("div", {
110
+ className: "flex flex-col justify-center border-t border-t-gray-300 gap-y-24 pt-24 mx-36 pb-80 sm:w-300",
111
+ children: [
112
+ /* @__PURE__ */ jsx("a", {
113
+ href: "https://twitter.com/inialum",
114
+ target: "_blank",
115
+ rel: "noreferrer noopener",
116
+ className: "flex items-center w-fit",
117
+ children: /* @__PURE__ */ jsx(SvgXLogo, {
118
+ "aria-label": "X公式アカウント",
119
+ className: "h-24 fill-base-white"
120
+ })
121
+ }),
122
+ /* @__PURE__ */ jsxs("div", {
123
+ className: "flex items-center gap-x-20 text-gray-300 text-2xs",
124
+ children: [
125
+ /* @__PURE__ */ jsx("a", {
126
+ href: "https://inialum.notion.site/4cbf67b190544bff8891deabc64e776c",
127
+ target: "_blank",
128
+ rel: "noreferrer noopener",
129
+ children: "同窓会会則"
130
+ }),
131
+ /* @__PURE__ */ jsx("a", {
132
+ href: "https://inialum.notion.site/4d2374f79b594f00b93c0efccf3c6bb4",
133
+ target: "_blank",
134
+ rel: "noreferrer noopener",
135
+ children: "役員一覧"
136
+ }),
137
+ /* @__PURE__ */ jsx("a", {
138
+ href: "https://inialum.notion.site/d8a7e0dd14224c0dadfd630a6665cee0",
139
+ target: "_blank",
140
+ rel: "noreferrer noopener",
141
+ children: "プライバシーポリシー"
142
+ }),
143
+ /* @__PURE__ */ jsx("a", {
144
+ href: "https://github.com/inialum",
145
+ target: "_blank",
146
+ rel: "noreferrer noopener",
147
+ children: "GitHub"
148
+ })
149
+ ]
150
+ }),
151
+ /* @__PURE__ */ jsxs("div", {
152
+ className: "text-2xs text-gray-300",
153
+ children: [
154
+ "© ",
155
+ nowYear,
156
+ " INIALUM - INIAD Alumni Meetings."
157
+ ]
158
+ })
159
+ ]
160
+ })
161
+ ]
162
+ })]
163
+ })
164
+ });
165
+ };
166
+ //#endregion
167
+ export { Navigation };
168
+
169
+ //# sourceMappingURL=Navigation.js.map
@@ -0,0 +1,17 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ import { ClassAttributes, DialogHTMLAttributes } from 'react';
3
+ declare const meta: {
4
+ title: string;
5
+ component: ({ portal, ...rest }: ClassAttributes<HTMLDialogElement> & DialogHTMLAttributes<HTMLDialogElement> & {
6
+ isOpen: boolean;
7
+ onClose: () => void;
8
+ } & {
9
+ portal?: true | {
10
+ rootElement: Element;
11
+ };
12
+ }) => import("react/jsx-runtime").JSX.Element;
13
+ tags: string[];
14
+ };
15
+ export default meta;
16
+ type Story = StoryObj<typeof meta>;
17
+ export declare const Default: Story;
@@ -0,0 +1 @@
1
+ export { Navigation } from './Navigation';
@@ -0,0 +1,2 @@
1
+ import { Navigation } from "./Navigation.js";
2
+ export { Navigation };
@@ -0,0 +1,11 @@
1
+ import { Button } from "./Button/Button.js";
2
+ import "./Button/index.js";
3
+ import { ButtonLink } from "./ButtonLink/ButtonLink.js";
4
+ import "./ButtonLink/index.js";
5
+ import { Footer } from "./Footer/Footer.js";
6
+ import "./Footer/index.js";
7
+ import { Navigation } from "./Navigation/Navigation.js";
8
+ import "./Navigation/index.js";
9
+ import { Header } from "./Header/Header.js";
10
+ import "./Header/index.js";
11
+ export { Button, ButtonLink, Footer, Header, Navigation };