@twreporter/react-typescript-components 0.1.0-beta.10

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 (240) hide show
  1. package/README.md +74 -0
  2. package/lib/button/constants.d.mts +3 -0
  3. package/lib/button/constants.d.ts +3 -0
  4. package/lib/button/constants.js +5 -0
  5. package/lib/button/constants.mjs +3 -0
  6. package/lib/button/index.d.mts +160 -0
  7. package/lib/button/index.d.ts +160 -0
  8. package/lib/button/index.js +13 -0
  9. package/lib/button/index.mjs +7 -0
  10. package/lib/button-DFLYlJJW.js +630 -0
  11. package/lib/button-DFLYlJJW.js.map +1 -0
  12. package/lib/button-DyUYGG90.mjs +591 -0
  13. package/lib/button-DyUYGG90.mjs.map +1 -0
  14. package/lib/chunk-BxBTb9qk.js +39 -0
  15. package/lib/constants/external-links.d.mts +16 -0
  16. package/lib/constants/external-links.d.ts +16 -0
  17. package/lib/constants/external-links.js +3 -0
  18. package/lib/constants/external-links.mjs +3 -0
  19. package/lib/constants/internal-links.d.mts +51 -0
  20. package/lib/constants/internal-links.d.ts +51 -0
  21. package/lib/constants/internal-links.js +3 -0
  22. package/lib/constants/internal-links.mjs +3 -0
  23. package/lib/constants/release-branch.d.mts +3 -0
  24. package/lib/constants/release-branch.d.ts +3 -0
  25. package/lib/constants/release-branch.js +3 -0
  26. package/lib/constants/release-branch.mjs +3 -0
  27. package/lib/constants/request-origins.d.mts +68 -0
  28. package/lib/constants/request-origins.d.ts +68 -0
  29. package/lib/constants/request-origins.js +47 -0
  30. package/lib/constants/request-origins.js.map +1 -0
  31. package/lib/constants/request-origins.mjs +46 -0
  32. package/lib/constants/request-origins.mjs.map +1 -0
  33. package/lib/constants/theme.d.mts +3 -0
  34. package/lib/constants/theme.d.ts +3 -0
  35. package/lib/constants/theme.js +3 -0
  36. package/lib/constants/theme.mjs +3 -0
  37. package/lib/constants-2TRY2zTK.js +38 -0
  38. package/lib/constants-2TRY2zTK.js.map +1 -0
  39. package/lib/constants-BS3rPbaX.d.ts +17 -0
  40. package/lib/constants-BWFuBApI.mjs +14 -0
  41. package/lib/constants-BWFuBApI.mjs.map +1 -0
  42. package/lib/constants-B_NgWFML.d.ts +24 -0
  43. package/lib/constants-BmxSMOOn.js +36 -0
  44. package/lib/constants-BmxSMOOn.js.map +1 -0
  45. package/lib/constants-BqeEbkVD.mjs +20 -0
  46. package/lib/constants-BqeEbkVD.mjs.map +1 -0
  47. package/lib/constants-BswaTS-y.d.mts +29 -0
  48. package/lib/constants-Bz-ufaJ2.js +39 -0
  49. package/lib/constants-Bz-ufaJ2.js.map +1 -0
  50. package/lib/constants-CEyUZ-jZ.d.mts +11 -0
  51. package/lib/constants-CMMcn0f-.d.ts +11 -0
  52. package/lib/constants-CQscYQcW.mjs +25 -0
  53. package/lib/constants-CQscYQcW.mjs.map +1 -0
  54. package/lib/constants-DF_II8Fz.js +43 -0
  55. package/lib/constants-DF_II8Fz.js.map +1 -0
  56. package/lib/constants-DNr36wyK.d.mts +24 -0
  57. package/lib/constants-DQxcqnYL.d.ts +29 -0
  58. package/lib/constants-DRyQ6AuU.js +15 -0
  59. package/lib/constants-DRyQ6AuU.js.map +1 -0
  60. package/lib/constants-K2ObjToq.js +26 -0
  61. package/lib/constants-K2ObjToq.js.map +1 -0
  62. package/lib/constants-OhAETTiQ.d.mts +17 -0
  63. package/lib/constants-QF71lY6v.mjs +34 -0
  64. package/lib/constants-QF71lY6v.mjs.map +1 -0
  65. package/lib/constants-gCmka4Fp.d.ts +22 -0
  66. package/lib/constants-jYAxSTFp.d.mts +22 -0
  67. package/lib/constants-oTHAnh6r.mjs +18 -0
  68. package/lib/constants-oTHAnh6r.mjs.map +1 -0
  69. package/lib/constants-t0lkfgqP.mjs +9 -0
  70. package/lib/constants-t0lkfgqP.mjs.map +1 -0
  71. package/lib/context-BCesW3fW.mjs +24 -0
  72. package/lib/context-BCesW3fW.mjs.map +1 -0
  73. package/lib/context-Bvr0Qj2x.js +37 -0
  74. package/lib/context-Bvr0Qj2x.js.map +1 -0
  75. package/lib/customized-link/external-link.d.mts +3 -0
  76. package/lib/customized-link/external-link.d.ts +3 -0
  77. package/lib/customized-link/external-link.js +3 -0
  78. package/lib/customized-link/external-link.mjs +3 -0
  79. package/lib/customized-link/index.d.mts +13 -0
  80. package/lib/customized-link/index.d.ts +13 -0
  81. package/lib/customized-link/index.js +8 -0
  82. package/lib/customized-link/index.mjs +5 -0
  83. package/lib/customized-link/internal-link.d.mts +3 -0
  84. package/lib/customized-link/internal-link.d.ts +3 -0
  85. package/lib/customized-link/internal-link.js +6 -0
  86. package/lib/customized-link/internal-link.mjs +6 -0
  87. package/lib/customized-link/type.d.mts +2 -0
  88. package/lib/customized-link/type.d.ts +2 -0
  89. package/lib/customized-link/type.js +0 -0
  90. package/lib/customized-link/type.mjs +1 -0
  91. package/lib/customized-link-BkuKVCKQ.mjs +12 -0
  92. package/lib/customized-link-BkuKVCKQ.mjs.map +1 -0
  93. package/lib/customized-link-CK7Xlgdt.js +17 -0
  94. package/lib/customized-link-CK7Xlgdt.js.map +1 -0
  95. package/lib/divider/constants.d.mts +3 -0
  96. package/lib/divider/constants.d.ts +3 -0
  97. package/lib/divider/constants.js +3 -0
  98. package/lib/divider/constants.mjs +3 -0
  99. package/lib/divider/index.d.mts +15 -0
  100. package/lib/divider/index.d.ts +15 -0
  101. package/lib/divider/index.js +6 -0
  102. package/lib/divider/index.mjs +4 -0
  103. package/lib/divider-Bb3tebJO.mjs +15 -0
  104. package/lib/divider-Bb3tebJO.mjs.map +1 -0
  105. package/lib/divider-b3Shh7FV.js +29 -0
  106. package/lib/divider-b3Shh7FV.js.map +1 -0
  107. package/lib/dropdown-menu/index.d.mts +17 -0
  108. package/lib/dropdown-menu/index.d.ts +17 -0
  109. package/lib/dropdown-menu/index.js +14 -0
  110. package/lib/dropdown-menu/index.mjs +14 -0
  111. package/lib/dropdown-menu-CCtPuYyJ.js +150 -0
  112. package/lib/dropdown-menu-CCtPuYyJ.js.map +1 -0
  113. package/lib/dropdown-menu-Cil4RtSK.mjs +117 -0
  114. package/lib/dropdown-menu-Cil4RtSK.mjs.map +1 -0
  115. package/lib/external-link-2XoC1_oL.d.ts +9 -0
  116. package/lib/external-link-BUhvS4ry.d.mts +9 -0
  117. package/lib/external-link-CEDvlQYo.js +23 -0
  118. package/lib/external-link-CEDvlQYo.js.map +1 -0
  119. package/lib/external-link-Cx9S31Ye.mjs +16 -0
  120. package/lib/external-link-Cx9S31Ye.mjs.map +1 -0
  121. package/lib/external-links-2b4M_rcA.mjs +17 -0
  122. package/lib/external-links-2b4M_rcA.mjs.map +1 -0
  123. package/lib/external-links-SfJjb48j.js +23 -0
  124. package/lib/external-links-SfJjb48j.js.map +1 -0
  125. package/lib/hamburger-menu/index.d.mts +7 -0
  126. package/lib/hamburger-menu/index.d.ts +6 -0
  127. package/lib/hamburger-menu/index.js +22 -0
  128. package/lib/hamburger-menu/index.mjs +22 -0
  129. package/lib/hamburger-menu-BZ1hA7l5.mjs +472 -0
  130. package/lib/hamburger-menu-BZ1hA7l5.mjs.map +1 -0
  131. package/lib/hamburger-menu-Bd_wmcAB.js +487 -0
  132. package/lib/hamburger-menu-Bd_wmcAB.js.map +1 -0
  133. package/lib/header/index.d.mts +26 -0
  134. package/lib/header/index.d.ts +25 -0
  135. package/lib/header/index.js +465 -0
  136. package/lib/header/index.js.map +1 -0
  137. package/lib/header/index.mjs +459 -0
  138. package/lib/header/index.mjs.map +1 -0
  139. package/lib/heading-CFSkTbdH.mjs +37 -0
  140. package/lib/heading-CFSkTbdH.mjs.map +1 -0
  141. package/lib/heading-DFzj2z0V.js +75 -0
  142. package/lib/heading-DFzj2z0V.js.map +1 -0
  143. package/lib/icons/constants.d.mts +3 -0
  144. package/lib/icons/constants.d.ts +3 -0
  145. package/lib/icons/constants.js +5 -0
  146. package/lib/icons/constants.mjs +3 -0
  147. package/lib/icons/index.d.mts +43 -0
  148. package/lib/icons/index.d.ts +43 -0
  149. package/lib/icons/index.js +15 -0
  150. package/lib/icons/index.mjs +5 -0
  151. package/lib/icons-DF-7dKxN.js +128 -0
  152. package/lib/icons-DF-7dKxN.js.map +1 -0
  153. package/lib/icons-DguoV48M.mjs +60 -0
  154. package/lib/icons-DguoV48M.mjs.map +1 -0
  155. package/lib/index-BmIgLA0K.d.mts +5 -0
  156. package/lib/index-H3peA2d_.d.ts +5 -0
  157. package/lib/internal-link-CqTu3Yi5.js +2278 -0
  158. package/lib/internal-link-CqTu3Yi5.js.map +1 -0
  159. package/lib/internal-link-D8jJal8P.d.mts +9 -0
  160. package/lib/internal-link-DCSEl1jM.d.ts +9 -0
  161. package/lib/internal-link-NQb751uB.mjs +2299 -0
  162. package/lib/internal-link-NQb751uB.mjs.map +1 -0
  163. package/lib/internal-links-BF-974mA.mjs +52 -0
  164. package/lib/internal-links-BF-974mA.mjs.map +1 -0
  165. package/lib/internal-links-CBkMU8cY.js +58 -0
  166. package/lib/internal-links-CBkMU8cY.js.map +1 -0
  167. package/lib/logo/constants.d.mts +3 -0
  168. package/lib/logo/constants.d.ts +3 -0
  169. package/lib/logo/constants.js +5 -0
  170. package/lib/logo/constants.mjs +3 -0
  171. package/lib/logo/index.d.mts +42 -0
  172. package/lib/logo/index.d.ts +42 -0
  173. package/lib/logo/index.js +8 -0
  174. package/lib/logo/index.mjs +5 -0
  175. package/lib/logo-CC5oU9Qb.mjs +64 -0
  176. package/lib/logo-CC5oU9Qb.mjs.map +1 -0
  177. package/lib/logo-D4M-1sGD.js +83 -0
  178. package/lib/logo-D4M-1sGD.js.map +1 -0
  179. package/lib/paragraph-BWXQNQtX.mjs +30 -0
  180. package/lib/paragraph-BWXQNQtX.mjs.map +1 -0
  181. package/lib/paragraph-CJvb0_cM.js +56 -0
  182. package/lib/paragraph-CJvb0_cM.js.map +1 -0
  183. package/lib/release-branch-CRZV4Ivz.js +18 -0
  184. package/lib/release-branch-CRZV4Ivz.js.map +1 -0
  185. package/lib/release-branch-CsBbhuYE.d.ts +14 -0
  186. package/lib/release-branch-DNCD1uH_.mjs +12 -0
  187. package/lib/release-branch-DNCD1uH_.mjs.map +1 -0
  188. package/lib/release-branch-DZwlCiWD.d.mts +14 -0
  189. package/lib/styles.css +1599 -0
  190. package/lib/tab-bar/constants.d.mts +16 -0
  191. package/lib/tab-bar/constants.d.ts +16 -0
  192. package/lib/tab-bar/constants.js +7 -0
  193. package/lib/tab-bar/constants.mjs +7 -0
  194. package/lib/tab-bar/index.d.mts +10 -0
  195. package/lib/tab-bar/index.d.ts +9 -0
  196. package/lib/tab-bar/index.js +18 -0
  197. package/lib/tab-bar/index.mjs +18 -0
  198. package/lib/tab-bar/theme.d.mts +10 -0
  199. package/lib/tab-bar/theme.d.ts +10 -0
  200. package/lib/tab-bar/theme.js +4 -0
  201. package/lib/tab-bar/theme.mjs +4 -0
  202. package/lib/tab-bar-CBL2tDXk.mjs +62 -0
  203. package/lib/tab-bar-CBL2tDXk.mjs.map +1 -0
  204. package/lib/tab-bar-ZRrpziiN.js +78 -0
  205. package/lib/tab-bar-ZRrpziiN.js.map +1 -0
  206. package/lib/text/constants.d.mts +3 -0
  207. package/lib/text/constants.d.ts +3 -0
  208. package/lib/text/constants.js +4 -0
  209. package/lib/text/constants.mjs +3 -0
  210. package/lib/text/heading.d.mts +31 -0
  211. package/lib/text/heading.d.ts +31 -0
  212. package/lib/text/heading.js +9 -0
  213. package/lib/text/heading.mjs +4 -0
  214. package/lib/text/paragraph.d.mts +25 -0
  215. package/lib/text/paragraph.d.ts +25 -0
  216. package/lib/text/paragraph.js +7 -0
  217. package/lib/text/paragraph.mjs +4 -0
  218. package/lib/theme-BDGfJ8n-.d.ts +13 -0
  219. package/lib/theme-BErS2Qs6.mjs +13 -0
  220. package/lib/theme-BErS2Qs6.mjs.map +1 -0
  221. package/lib/theme-BG6yZVj-.mjs +11 -0
  222. package/lib/theme-BG6yZVj-.mjs.map +1 -0
  223. package/lib/theme-BPB1kPtQ.js +18 -0
  224. package/lib/theme-BPB1kPtQ.js.map +1 -0
  225. package/lib/theme-ClamfAy8.d.mts +13 -0
  226. package/lib/theme-DDBlIbeS.js +17 -0
  227. package/lib/theme-DDBlIbeS.js.map +1 -0
  228. package/lib/title-bar/index.d.mts +58 -0
  229. package/lib/title-bar/index.d.ts +58 -0
  230. package/lib/title-bar/index.js +153 -0
  231. package/lib/title-bar/index.js.map +1 -0
  232. package/lib/title-bar/index.mjs +145 -0
  233. package/lib/title-bar/index.mjs.map +1 -0
  234. package/lib/type-C4hJK9H9.d.ts +11 -0
  235. package/lib/type-FR-fOZvz.d.mts +11 -0
  236. package/lib/types/index.d.mts +2 -0
  237. package/lib/types/index.d.ts +2 -0
  238. package/lib/types/index.js +0 -0
  239. package/lib/types/index.mjs +1 -0
  240. package/package.json +53 -0
@@ -0,0 +1,9 @@
1
+ import { CustomizedLinkProps } from "./type-C4hJK9H9.js";
2
+ import { FC } from "react";
3
+
4
+ //#region src/customized-link/external-link.d.ts
5
+ type ExternalLinkProps = CustomizedLinkProps;
6
+ declare const ExternalLink: FC<ExternalLinkProps>;
7
+ //#endregion
8
+ export { ExternalLink };
9
+ //# sourceMappingURL=external-link-2XoC1_oL.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { CustomizedLinkProps } from "./type-FR-fOZvz.mjs";
2
+ import { FC } from "react";
3
+
4
+ //#region src/customized-link/external-link.d.ts
5
+ type ExternalLinkProps = CustomizedLinkProps;
6
+ declare const ExternalLink: FC<ExternalLinkProps>;
7
+ //#endregion
8
+ export { ExternalLink };
9
+ //# sourceMappingURL=external-link-BUhvS4ry.d.mts.map
@@ -0,0 +1,23 @@
1
+ const require_chunk = require('./chunk-BxBTb9qk.js');
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
4
+
5
+ //#region src/customized-link/external-link.tsx
6
+ const ExternalLink = ({ to, target = "_self", className = "", children }) => {
7
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
8
+ href: to,
9
+ target,
10
+ className,
11
+ children
12
+ });
13
+ };
14
+ var external_link_default = ExternalLink;
15
+
16
+ //#endregion
17
+ Object.defineProperty(exports, 'external_link_default', {
18
+ enumerable: true,
19
+ get: function () {
20
+ return external_link_default;
21
+ }
22
+ });
23
+ //# sourceMappingURL=external-link-CEDvlQYo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"external-link-CEDvlQYo.js","names":["ExternalLink: FC<ExternalLinkProps>"],"sources":["../src/customized-link/external-link.tsx"],"sourcesContent":["import type { FC } from 'react'\nimport type { CustomizedLinkProps } from './type'\n\ntype ExternalLinkProps = CustomizedLinkProps\nconst ExternalLink: FC<ExternalLinkProps> = ({\n to,\n target = '_self',\n className = '',\n children,\n}) => {\n return (\n <a href={to} target={target} className={className}>\n {children}\n </a>\n )\n}\n\nexport default ExternalLink\n"],"mappings":";;;;;AAIA,MAAMA,gBAAuC,EAC3C,IACA,SAAS,SACT,YAAY,IACZ,eACI;AACJ,QACE,2CAAC;EAAE,MAAM;EAAY;EAAmB;EACrC;GACC;;AAIR,4BAAe"}
@@ -0,0 +1,16 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+
3
+ //#region src/customized-link/external-link.tsx
4
+ const ExternalLink = ({ to, target = "_self", className = "", children }) => {
5
+ return /* @__PURE__ */ jsx("a", {
6
+ href: to,
7
+ target,
8
+ className,
9
+ children
10
+ });
11
+ };
12
+ var external_link_default = ExternalLink;
13
+
14
+ //#endregion
15
+ export { external_link_default };
16
+ //# sourceMappingURL=external-link-Cx9S31Ye.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"external-link-Cx9S31Ye.mjs","names":["ExternalLink: FC<ExternalLinkProps>"],"sources":["../src/customized-link/external-link.tsx"],"sourcesContent":["import type { FC } from 'react'\nimport type { CustomizedLinkProps } from './type'\n\ntype ExternalLinkProps = CustomizedLinkProps\nconst ExternalLink: FC<ExternalLinkProps> = ({\n to,\n target = '_self',\n className = '',\n children,\n}) => {\n return (\n <a href={to} target={target} className={className}>\n {children}\n </a>\n )\n}\n\nexport default ExternalLink\n"],"mappings":";;;AAIA,MAAMA,gBAAuC,EAC3C,IACA,SAAS,SACT,YAAY,IACZ,eACI;AACJ,QACE,oBAAC;EAAE,MAAM;EAAY;EAAmB;EACrC;GACC;;AAIR,4BAAe"}
@@ -0,0 +1,17 @@
1
+ //#region src/constants/external-links.ts
2
+ const EXTERNAL_LINKS = {
3
+ monthlyDonation: "https://www.twreporter.org/donation/period",
4
+ onceDonation: "https://www.twreporter.org/donation/one-time",
5
+ openLab: "https://medium.com/twreporter",
6
+ facebook: "https://www.facebook.com/twreporter/",
7
+ instagram: "https://www.instagram.com/twreporter/",
8
+ twitter: "https://twitter.com/tw_reporter_org",
9
+ youtube: "https://www.youtube.com/c/TwreporterOrg",
10
+ kidsReporter: "https://kids.twreporter.org/",
11
+ publicationAndMerchandise: "https://twreporter.waca.ec/",
12
+ lawmaker: "https://lawmaker.twreporter.org/"
13
+ };
14
+
15
+ //#endregion
16
+ export { EXTERNAL_LINKS };
17
+ //# sourceMappingURL=external-links-2b4M_rcA.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"external-links-2b4M_rcA.mjs","names":[],"sources":["../src/constants/external-links.ts"],"sourcesContent":["export const EXTERNAL_LINKS = {\n monthlyDonation: 'https://www.twreporter.org/donation/period',\n onceDonation: 'https://www.twreporter.org/donation/one-time',\n openLab: 'https://medium.com/twreporter',\n facebook: 'https://www.facebook.com/twreporter/',\n instagram: 'https://www.instagram.com/twreporter/',\n twitter: 'https://twitter.com/tw_reporter_org',\n youtube: 'https://www.youtube.com/c/TwreporterOrg',\n kidsReporter: 'https://kids.twreporter.org/',\n publicationAndMerchandise: 'https://twreporter.waca.ec/',\n lawmaker: 'https://lawmaker.twreporter.org/',\n} as const\n"],"mappings":";AAAA,MAAa,iBAAiB;CAC5B,iBAAiB;CACjB,cAAc;CACd,SAAS;CACT,UAAU;CACV,WAAW;CACX,SAAS;CACT,SAAS;CACT,cAAc;CACd,2BAA2B;CAC3B,UAAU;CACX"}
@@ -0,0 +1,23 @@
1
+
2
+ //#region src/constants/external-links.ts
3
+ const EXTERNAL_LINKS = {
4
+ monthlyDonation: "https://www.twreporter.org/donation/period",
5
+ onceDonation: "https://www.twreporter.org/donation/one-time",
6
+ openLab: "https://medium.com/twreporter",
7
+ facebook: "https://www.facebook.com/twreporter/",
8
+ instagram: "https://www.instagram.com/twreporter/",
9
+ twitter: "https://twitter.com/tw_reporter_org",
10
+ youtube: "https://www.youtube.com/c/TwreporterOrg",
11
+ kidsReporter: "https://kids.twreporter.org/",
12
+ publicationAndMerchandise: "https://twreporter.waca.ec/",
13
+ lawmaker: "https://lawmaker.twreporter.org/"
14
+ };
15
+
16
+ //#endregion
17
+ Object.defineProperty(exports, 'EXTERNAL_LINKS', {
18
+ enumerable: true,
19
+ get: function () {
20
+ return EXTERNAL_LINKS;
21
+ }
22
+ });
23
+ //# sourceMappingURL=external-links-SfJjb48j.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"external-links-SfJjb48j.js","names":[],"sources":["../src/constants/external-links.ts"],"sourcesContent":["export const EXTERNAL_LINKS = {\n monthlyDonation: 'https://www.twreporter.org/donation/period',\n onceDonation: 'https://www.twreporter.org/donation/one-time',\n openLab: 'https://medium.com/twreporter',\n facebook: 'https://www.facebook.com/twreporter/',\n instagram: 'https://www.instagram.com/twreporter/',\n twitter: 'https://twitter.com/tw_reporter_org',\n youtube: 'https://www.youtube.com/c/TwreporterOrg',\n kidsReporter: 'https://kids.twreporter.org/',\n publicationAndMerchandise: 'https://twreporter.waca.ec/',\n lawmaker: 'https://lawmaker.twreporter.org/',\n} as const\n"],"mappings":";;AAAA,MAAa,iBAAiB;CAC5B,iBAAiB;CACjB,cAAc;CACd,SAAS;CACT,UAAU;CACV,WAAW;CACX,SAAS;CACT,SAAS;CACT,cAAc;CACd,2BAA2B;CAC3B,UAAU;CACX"}
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+
3
+ //#region src/hamburger-menu/index.d.ts
4
+ declare const HamburgerMenu: FC;
5
+ //#endregion
6
+ export { HamburgerMenu as default };
7
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1,6 @@
1
+ import { FC } from "react";
2
+
3
+ //#region src/hamburger-menu/index.d.ts
4
+ declare const HamburgerMenu: FC;
5
+ export = HamburgerMenu;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,22 @@
1
+ require('../constants-BmxSMOOn.js');
2
+ require('../constants-K2ObjToq.js');
3
+ require('../paragraph-CJvb0_cM.js');
4
+ require('../theme-DDBlIbeS.js');
5
+ require('../button-DFLYlJJW.js');
6
+ require('../external-links-SfJjb48j.js');
7
+ require('../internal-links-CBkMU8cY.js');
8
+ require('../release-branch-CRZV4Ivz.js');
9
+ require('../external-link-CEDvlQYo.js');
10
+ require('../internal-link-CqTu3Yi5.js');
11
+ require('../customized-link-CK7Xlgdt.js');
12
+ require('../constants-DRyQ6AuU.js');
13
+ require('../divider-b3Shh7FV.js');
14
+ require('../context-Bvr0Qj2x.js');
15
+ require('../constants-DF_II8Fz.js');
16
+ require('../icons-DF-7dKxN.js');
17
+ require('../constants-2TRY2zTK.js');
18
+ require('../dropdown-menu-CCtPuYyJ.js');
19
+ const require_hamburger_menu = require('../hamburger-menu-Bd_wmcAB.js');
20
+ require('../logo-D4M-1sGD.js');
21
+
22
+ module.exports = require_hamburger_menu.hamburger_menu_default;
@@ -0,0 +1,22 @@
1
+ import "../internal-link-NQb751uB.mjs";
2
+ import "../constants-oTHAnh6r.mjs";
3
+ import "../constants-BWFuBApI.mjs";
4
+ import "../paragraph-BWXQNQtX.mjs";
5
+ import "../theme-BG6yZVj-.mjs";
6
+ import "../button-DyUYGG90.mjs";
7
+ import "../external-links-2b4M_rcA.mjs";
8
+ import "../internal-links-BF-974mA.mjs";
9
+ import "../release-branch-DNCD1uH_.mjs";
10
+ import "../external-link-Cx9S31Ye.mjs";
11
+ import "../customized-link-BkuKVCKQ.mjs";
12
+ import "../constants-t0lkfgqP.mjs";
13
+ import "../divider-Bb3tebJO.mjs";
14
+ import "../context-BCesW3fW.mjs";
15
+ import "../constants-CQscYQcW.mjs";
16
+ import "../icons-DguoV48M.mjs";
17
+ import "../constants-BqeEbkVD.mjs";
18
+ import "../dropdown-menu-Cil4RtSK.mjs";
19
+ import { hamburger_menu_default } from "../hamburger-menu-BZ1hA7l5.mjs";
20
+ import "../logo-CC5oU9Qb.mjs";
21
+
22
+ export { hamburger_menu_default as default };
@@ -0,0 +1,472 @@
1
+ import { internal_link_default } from "./internal-link-NQb751uB.mjs";
2
+ import { TYPE } from "./constants-oTHAnh6r.mjs";
3
+ import { P2 } from "./paragraph-BWXQNQtX.mjs";
4
+ import { THEME } from "./theme-BG6yZVj-.mjs";
5
+ import { icon_button_default, menu_button_default, pill_button_default, text_button_default } from "./button-DyUYGG90.mjs";
6
+ import { EXTERNAL_LINKS } from "./external-links-2b4M_rcA.mjs";
7
+ import { INTERNAL_LINKS } from "./internal-links-BF-974mA.mjs";
8
+ import { external_link_default } from "./external-link-Cx9S31Ye.mjs";
9
+ import { divider_default } from "./divider-Bb3tebJO.mjs";
10
+ import { HamburgerContext, HeaderContext } from "./context-BCesW3fW.mjs";
11
+ import { MEDIA_TYPE } from "./constants-CQscYQcW.mjs";
12
+ import { Cross, Icon, SocialMedia } from "./icons-DguoV48M.mjs";
13
+ import { DropdownMenu, selectHamburgerFooterTheme, selectHamburgerItemTheme, selectHamburgerMenuTheme, selectLogoType } from "./dropdown-menu-Cil4RtSK.mjs";
14
+ import { logo_header_default, logo_symbol_default } from "./logo-CC5oU9Qb.mjs";
15
+ import { useContext, useState } from "react";
16
+ import clsx from "clsx";
17
+ import { jsx, jsxs } from "react/jsx-runtime";
18
+
19
+ //#region src/header/constants/action-links.ts
20
+ const HEADER_ACTION_LINKS = [{
21
+ label: "電子報",
22
+ to: INTERNAL_LINKS.account.emailSubscription,
23
+ target: "_self",
24
+ type: TYPE.secondary
25
+ }, {
26
+ label: "贊助",
27
+ to: EXTERNAL_LINKS.monthlyDonation,
28
+ target: "_blank",
29
+ type: TYPE.primary
30
+ }];
31
+ const HAMBURGER_MENU_ACION_LINKS = [{
32
+ label: "訂閱電子報",
33
+ to: INTERNAL_LINKS.account.emailSubscription,
34
+ target: "_self",
35
+ type: TYPE.secondary
36
+ }, {
37
+ label: "贊助我們",
38
+ to: EXTERNAL_LINKS.monthlyDonation,
39
+ target: "_blank",
40
+ type: TYPE.primary
41
+ }];
42
+
43
+ //#endregion
44
+ //#region src/hamburger-menu/constants/channels.ts
45
+ const CHANNEL_TYPE = {
46
+ link: "link",
47
+ divider: "divider",
48
+ dropdown: "dropdown",
49
+ iconLink: "icon-link",
50
+ lightLink: "light-link"
51
+ };
52
+ const Channels = [
53
+ {
54
+ type: CHANNEL_TYPE.link,
55
+ label: "最新",
56
+ to: INTERNAL_LINKS.latest,
57
+ target: "_self"
58
+ },
59
+ { type: CHANNEL_TYPE.divider },
60
+ {
61
+ type: CHANNEL_TYPE.link,
62
+ label: "深度專題",
63
+ to: INTERNAL_LINKS.topics,
64
+ target: "_self"
65
+ },
66
+ {
67
+ type: CHANNEL_TYPE.dropdown,
68
+ label: "議題",
69
+ dropdownItems: [
70
+ {
71
+ label: "國際兩岸",
72
+ to: INTERNAL_LINKS.categories.world,
73
+ target: "_self"
74
+ },
75
+ {
76
+ label: "人權司法",
77
+ to: INTERNAL_LINKS.categories.humanRights,
78
+ target: "_self"
79
+ },
80
+ {
81
+ label: "政治社會",
82
+ to: INTERNAL_LINKS.categories.politicsAndSociety,
83
+ target: "_self"
84
+ },
85
+ {
86
+ label: "醫療健康",
87
+ to: INTERNAL_LINKS.categories.health,
88
+ target: "_self"
89
+ },
90
+ {
91
+ label: "環境永續",
92
+ to: INTERNAL_LINKS.categories.environment,
93
+ target: "_self"
94
+ },
95
+ {
96
+ label: "經濟產業",
97
+ to: INTERNAL_LINKS.categories.econ,
98
+ target: "_self"
99
+ },
100
+ {
101
+ label: "文化生活",
102
+ to: INTERNAL_LINKS.categories.culture,
103
+ target: "_self"
104
+ },
105
+ {
106
+ label: "教育校園",
107
+ to: INTERNAL_LINKS.categories.education,
108
+ target: "_self"
109
+ }
110
+ ]
111
+ },
112
+ {
113
+ type: CHANNEL_TYPE.dropdown,
114
+ label: "評論",
115
+ dropdownItems: [
116
+ {
117
+ label: "書摘與書評",
118
+ to: INTERNAL_LINKS.categories.opinion.bookReview,
119
+ target: "_self"
120
+ },
121
+ {
122
+ label: "讀者投書",
123
+ to: INTERNAL_LINKS.categories.opinion.letter,
124
+ target: "_self"
125
+ },
126
+ {
127
+ label: "全部",
128
+ to: INTERNAL_LINKS.categories.opinion.index,
129
+ target: "_self"
130
+ }
131
+ ]
132
+ },
133
+ {
134
+ type: CHANNEL_TYPE.link,
135
+ label: "人物故事",
136
+ to: INTERNAL_LINKS.humanStory,
137
+ target: "_self"
138
+ },
139
+ { type: CHANNEL_TYPE.divider },
140
+ {
141
+ type: CHANNEL_TYPE.link,
142
+ label: "影像",
143
+ to: INTERNAL_LINKS.photography,
144
+ target: "_self"
145
+ },
146
+ {
147
+ type: CHANNEL_TYPE.dropdown,
148
+ label: "Podcast",
149
+ dropdownItems: [
150
+ {
151
+ label: "關於報導者 Podcast",
152
+ to: INTERNAL_LINKS.podcast.aboutPodcast,
153
+ target: "_self"
154
+ },
155
+ {
156
+ label: "The Real Story",
157
+ to: INTERNAL_LINKS.categories.podcast.theRealStory,
158
+ target: "_self"
159
+ },
160
+ {
161
+ label: "On the Ground 路邊攤計劃",
162
+ to: INTERNAL_LINKS.categories.podcast.onTheGround,
163
+ target: "_self"
164
+ }
165
+ ]
166
+ },
167
+ {
168
+ type: CHANNEL_TYPE.link,
169
+ label: "少年報導者",
170
+ to: EXTERNAL_LINKS.kidsReporter,
171
+ target: "_blank"
172
+ },
173
+ {
174
+ type: CHANNEL_TYPE.link,
175
+ label: "報導者觀測站",
176
+ to: EXTERNAL_LINKS.lawmaker,
177
+ target: "_blank"
178
+ },
179
+ {
180
+ type: CHANNEL_TYPE.link,
181
+ label: "數位敘事",
182
+ to: INTERNAL_LINKS.infographic,
183
+ target: "_self"
184
+ },
185
+ { type: CHANNEL_TYPE.divider },
186
+ {
187
+ type: CHANNEL_TYPE.iconLink,
188
+ label: "個人專區",
189
+ icon: "member",
190
+ to: INTERNAL_LINKS.account.index,
191
+ target: "_self"
192
+ },
193
+ {
194
+ type: CHANNEL_TYPE.iconLink,
195
+ label: "我的閱讀",
196
+ icon: "kid_star",
197
+ to: INTERNAL_LINKS.myReading.index,
198
+ target: "_self"
199
+ },
200
+ {
201
+ type: CHANNEL_TYPE.iconLink,
202
+ label: "已收藏",
203
+ icon: "bookmark_basic",
204
+ to: INTERNAL_LINKS.myReading.savedBookmarks,
205
+ target: "_self"
206
+ },
207
+ {
208
+ type: CHANNEL_TYPE.iconLink,
209
+ label: "造訪紀錄",
210
+ icon: "history",
211
+ to: INTERNAL_LINKS.myReading.browsingHistory,
212
+ target: "_self"
213
+ },
214
+ { type: CHANNEL_TYPE.divider },
215
+ {
216
+ type: CHANNEL_TYPE.lightLink,
217
+ label: "基金會消息",
218
+ to: INTERNAL_LINKS.categories.foundation.index,
219
+ target: "_self"
220
+ },
221
+ {
222
+ type: CHANNEL_TYPE.lightLink,
223
+ label: "關於我們",
224
+ to: INTERNAL_LINKS.about,
225
+ target: "_blank"
226
+ },
227
+ {
228
+ type: CHANNEL_TYPE.lightLink,
229
+ label: "影響力報告",
230
+ to: INTERNAL_LINKS.influenceReport,
231
+ target: "_self"
232
+ },
233
+ {
234
+ type: CHANNEL_TYPE.lightLink,
235
+ label: "報導者開放實驗室",
236
+ to: EXTERNAL_LINKS.openLab,
237
+ target: "_blank"
238
+ },
239
+ {
240
+ type: CHANNEL_TYPE.lightLink,
241
+ label: "出版品與周邊",
242
+ to: EXTERNAL_LINKS.publicationAndMerchandise,
243
+ target: "_blank"
244
+ },
245
+ { type: CHANNEL_TYPE.divider }
246
+ ];
247
+
248
+ //#endregion
249
+ //#region src/hamburger-menu/constants/social-media.ts
250
+ const SocialMedias = [
251
+ {
252
+ icon: MEDIA_TYPE.facebook,
253
+ link: EXTERNAL_LINKS.facebook,
254
+ target: "_blank"
255
+ },
256
+ {
257
+ icon: MEDIA_TYPE.instagram,
258
+ link: EXTERNAL_LINKS.instagram,
259
+ target: "_blank"
260
+ },
261
+ {
262
+ icon: MEDIA_TYPE.twitter,
263
+ link: EXTERNAL_LINKS.twitter,
264
+ target: "_blank"
265
+ },
266
+ {
267
+ icon: MEDIA_TYPE.youtube,
268
+ link: EXTERNAL_LINKS.youtube,
269
+ target: "_blank"
270
+ }
271
+ ];
272
+
273
+ //#endregion
274
+ //#region src/hamburger-menu/components/icon-link.tsx
275
+ const IconLink$1 = ({ label, icon, to, target }) => {
276
+ const { theme, releaseBranch, isLinkExternal } = useContext(HeaderContext);
277
+ const footerTheme = theme === THEME.transparent ? THEME.normal : theme;
278
+ const LinkComponent = isLinkExternal ? external_link_default : internal_link_default;
279
+ const { color, hoverColor, hoverBgColor, svgHoverBgColor, svgBgColor, activeColor, activeBgColor, svgActiveBgColor } = selectHamburgerFooterTheme(footerTheme);
280
+ return /* @__PURE__ */ jsx(LinkComponent, {
281
+ to,
282
+ target,
283
+ children: /* @__PURE__ */ jsxs("div", {
284
+ className: clsx("py-[8px] px-[32px] flex items-center", "[&>svg]:h-[18px] [&>svg]:w-[18px] [&>svg]:mr-[4px]", color, hoverColor, hoverBgColor, svgHoverBgColor, svgBgColor, activeColor, activeBgColor, svgActiveBgColor),
285
+ children: [/* @__PURE__ */ jsx(Icon, {
286
+ filename: icon,
287
+ releaseBranch
288
+ }), /* @__PURE__ */ jsx(P2, { text: label })]
289
+ })
290
+ });
291
+ };
292
+ var icon_link_default = IconLink$1;
293
+
294
+ //#endregion
295
+ //#region src/hamburger-menu/components/light-link.tsx
296
+ const IconLink = ({ label, to, target }) => {
297
+ const { theme, isLinkExternal } = useContext(HeaderContext);
298
+ const footerTheme = theme === THEME.transparent ? THEME.normal : theme;
299
+ const { color, hoverColor, hoverBgColor, activeColor, activeBgColor } = selectHamburgerFooterTheme(footerTheme);
300
+ return /* @__PURE__ */ jsx(isLinkExternal ? external_link_default : internal_link_default, {
301
+ to,
302
+ target,
303
+ children: /* @__PURE__ */ jsx("div", {
304
+ className: clsx("py-[8px] px-[32px] flex items-center", "[&>svg]:h-[18px] [&>svg]:w-[18px] [&>svg]:mr-[4px]", color, hoverColor, hoverBgColor, activeColor, activeBgColor),
305
+ children: /* @__PURE__ */ jsx(P2, { text: label })
306
+ })
307
+ });
308
+ };
309
+ var light_link_default = IconLink;
310
+
311
+ //#endregion
312
+ //#region src/hamburger-menu/components/social-media.tsx
313
+ const SocialMedia$1 = ({ mediaType }) => {
314
+ const { theme, releaseBranch } = useContext(HeaderContext);
315
+ const footerTheme = theme === THEME.transparent ? THEME.normal : theme;
316
+ return /* @__PURE__ */ jsx(icon_button_default, {
317
+ iconComponent: /* @__PURE__ */ jsx(SocialMedia, {
318
+ mediaType,
319
+ releaseBranch
320
+ }),
321
+ theme: footerTheme,
322
+ className: clsx("[&>svg]:h-[32px] [&>svg]:w-[32px]", "[&>svg]:tablet:h-[24px] [&>svg]:tablet:w-[24px]")
323
+ });
324
+ };
325
+ var social_media_default = SocialMedia$1;
326
+
327
+ //#endregion
328
+ //#region src/hamburger-menu/index.tsx
329
+ const HamburgerMenu = () => {
330
+ const { theme, releaseBranch, isLinkExternal } = useContext(HeaderContext);
331
+ const { closeHamburgerMenu } = useContext(HamburgerContext);
332
+ const menuTheme = theme === THEME.photography ? theme : THEME.normal;
333
+ const { bgColor, scrollBarColor } = selectHamburgerMenuTheme(menuTheme);
334
+ const logoType = selectLogoType(menuTheme);
335
+ const [activeKey, setActiveKey] = useState("");
336
+ const LinkComponent = isLinkExternal ? external_link_default : internal_link_default;
337
+ return /* @__PURE__ */ jsxs("div", {
338
+ className: clsx("w-screen h-screen overflow-scroll overscroll-contain", bgColor, `pb-[calc(48px+48px)]`, "tablet:w-[320px] tablet:max-h-screen", "desktop:w-[280px]", scrollBarColor, "scrollbar-w-1", "scrollbar-thumb-rounded-xs"),
339
+ children: [
340
+ /* @__PURE__ */ jsx("div", {
341
+ className: clsx("hidden items-center justify-end pt-[24px] pr-[32px] pb-[16px]", "tablet:flex"),
342
+ children: /* @__PURE__ */ jsx(icon_button_default, {
343
+ iconComponent: Cross(releaseBranch),
344
+ theme: menuTheme,
345
+ onClick: closeHamburgerMenu
346
+ })
347
+ }),
348
+ /* @__PURE__ */ jsx(LinkComponent, {
349
+ to: INTERNAL_LINKS.home,
350
+ children: /* @__PURE__ */ jsx("div", {
351
+ className: clsx("hidden justify-center [&>img]:h-[24px] [&>img]:w-[24px]", "tablet:flex"),
352
+ children: /* @__PURE__ */ jsx(logo_symbol_default, {
353
+ type: logoType,
354
+ releaseBranch
355
+ })
356
+ })
357
+ }),
358
+ /* @__PURE__ */ jsxs("div", {
359
+ className: clsx("flex items-center justify-between px-[24px] py-[16px]", "tablet:hidden"),
360
+ children: [/* @__PURE__ */ jsx(LinkComponent, {
361
+ to: INTERNAL_LINKS.home,
362
+ children: /* @__PURE__ */ jsx(logo_header_default, {
363
+ type: logoType,
364
+ releaseBranch,
365
+ className: "h-[21px]"
366
+ })
367
+ }), /* @__PURE__ */ jsxs("div", {
368
+ className: "flex items-center gap-[16px]",
369
+ children: [/* @__PURE__ */ jsx(LinkComponent, {
370
+ to: EXTERNAL_LINKS.monthlyDonation,
371
+ children: /* @__PURE__ */ jsx(pill_button_default, {
372
+ text: "贊助",
373
+ theme: pill_button_default.Theme.normal,
374
+ type: pill_button_default.Type.primary,
375
+ style: pill_button_default.Style.brand
376
+ })
377
+ }), /* @__PURE__ */ jsx(LinkComponent, {
378
+ to: INTERNAL_LINKS.account.index,
379
+ children: /* @__PURE__ */ jsx(text_button_default, {
380
+ text: "登入",
381
+ theme: text_button_default.Theme.normal,
382
+ style: text_button_default.Style.dark,
383
+ size: text_button_default.Size.s
384
+ })
385
+ })]
386
+ })]
387
+ }),
388
+ /* @__PURE__ */ jsx("div", {
389
+ className: "px-[32px] pt-[24px] pb-[8px]",
390
+ children: /* @__PURE__ */ jsx("input", {
391
+ type: "text",
392
+ className: clsx("w-full h-[40px] rounded-[20px] px-[16px]", "focus:outline-none"),
393
+ placeholder: "搜尋"
394
+ })
395
+ }),
396
+ /* @__PURE__ */ jsx("div", {
397
+ className: "flex flex-col pt-[16px]",
398
+ children: Channels.map((channel, idx) => {
399
+ if (channel.type === CHANNEL_TYPE.link) {
400
+ const { color, hoverBgColor, activeBgColor } = selectHamburgerItemTheme(theme);
401
+ return /* @__PURE__ */ jsx(LinkComponent, {
402
+ to: channel.to,
403
+ target: channel.target,
404
+ children: /* @__PURE__ */ jsx(menu_button_default, {
405
+ text: channel.label,
406
+ fontWeight: menu_button_default.FontWeight.bold,
407
+ color,
408
+ p1ClassName: `${hoverBgColor} ${activeBgColor} pl-[32px] pr-[32px]`
409
+ }, channel.label)
410
+ }, channel.label);
411
+ }
412
+ if (channel.type === CHANNEL_TYPE.divider) return /* @__PURE__ */ jsx("div", {
413
+ className: "py-[16px] px-[32px]",
414
+ children: /* @__PURE__ */ jsx(divider_default, { direction: divider_default.Direction.horizontal })
415
+ }, `divider-${idx}`);
416
+ if (channel.type === CHANNEL_TYPE.dropdown) {
417
+ const isActive = activeKey === channel.label;
418
+ const toggleFunc = (key) => {
419
+ setActiveKey(activeKey === key ? "" : key);
420
+ };
421
+ return /* @__PURE__ */ jsx("button", {
422
+ onClick: () => toggleFunc(channel.label),
423
+ type: "button",
424
+ children: /* @__PURE__ */ jsx(DropdownMenu, {
425
+ text: channel.label,
426
+ isActive,
427
+ dropdownItems: channel.dropdownItems
428
+ })
429
+ }, channel.label);
430
+ }
431
+ if (channel.type === CHANNEL_TYPE.iconLink) return /* @__PURE__ */ jsx(icon_link_default, {
432
+ label: channel.label,
433
+ to: channel.to,
434
+ target: channel.target,
435
+ icon: channel.icon
436
+ }, channel.label);
437
+ if (channel.type === CHANNEL_TYPE.lightLink) return /* @__PURE__ */ jsx(light_link_default, {
438
+ label: channel.label,
439
+ to: channel.to,
440
+ target: channel.target
441
+ }, channel.label);
442
+ })
443
+ }),
444
+ /* @__PURE__ */ jsx("div", {
445
+ className: "flex flex-row gap-[16px] justify-center",
446
+ children: SocialMedias.map((socialMedia) => /* @__PURE__ */ jsx(LinkComponent, {
447
+ to: socialMedia.link,
448
+ target: socialMedia.target,
449
+ children: /* @__PURE__ */ jsx(social_media_default, { mediaType: socialMedia.icon })
450
+ }, socialMedia.icon))
451
+ }),
452
+ /* @__PURE__ */ jsx("div", {
453
+ className: clsx("hidden flex-col gap-[16px] px-[32px] pt-[40px] pb-[32px]", "tablet:flex"),
454
+ children: HAMBURGER_MENU_ACION_LINKS.map((link) => /* @__PURE__ */ jsx(LinkComponent, {
455
+ to: link.to,
456
+ target: link.target,
457
+ children: /* @__PURE__ */ jsx(pill_button_default, {
458
+ text: link.label,
459
+ theme,
460
+ type: link.type,
461
+ className: "w-full justify-center"
462
+ })
463
+ }, link.label))
464
+ })
465
+ ]
466
+ });
467
+ };
468
+ var hamburger_menu_default = HamburgerMenu;
469
+
470
+ //#endregion
471
+ export { HEADER_ACTION_LINKS, hamburger_menu_default };
472
+ //# sourceMappingURL=hamburger-menu-BZ1hA7l5.mjs.map