@goldlabelapps/theme 1.0.1 → 3.2.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.
Files changed (174) hide show
  1. package/dist/context/ConfigContext.js +6 -6
  2. package/dist/design-system/components/DesignSystemProvider/DesignSystemProvider.d.ts +2 -0
  3. package/dist/design-system/components/DesignSystemProvider/DesignSystemProvider.js +29 -0
  4. package/dist/design-system/components/DesignSystemProvider/types.d.ts +1 -0
  5. package/dist/design-system/components/DesignSystemProvider/types.js +1 -0
  6. package/dist/design-system/components/brand/Logo/Logo.d.ts +2 -0
  7. package/dist/design-system/components/brand/Logo/Logo.js +35 -0
  8. package/dist/design-system/components/brand/Logo/types.d.ts +1 -0
  9. package/dist/design-system/components/brand/Logo/types.js +1 -0
  10. package/dist/design-system/components/buttons/Button/Button.d.ts +2 -0
  11. package/dist/design-system/components/buttons/Button/Button.js +135 -0
  12. package/dist/design-system/components/buttons/Button/types.d.ts +1 -0
  13. package/dist/design-system/components/buttons/Button/types.js +1 -0
  14. package/dist/design-system/components/buttons/IconButton/IconButton.d.ts +2 -0
  15. package/dist/design-system/components/buttons/IconButton/IconButton.js +129 -0
  16. package/dist/design-system/components/buttons/IconButton/types.d.ts +1 -0
  17. package/dist/design-system/components/buttons/IconButton/types.js +1 -0
  18. package/dist/design-system/components/feedback/Alert/Alert.d.ts +2 -0
  19. package/dist/design-system/components/feedback/Alert/Alert.js +12 -0
  20. package/dist/design-system/components/feedback/Alert/types.d.ts +1 -0
  21. package/dist/design-system/components/feedback/Alert/types.js +1 -0
  22. package/dist/design-system/components/feedback/Card/Card.d.ts +2 -0
  23. package/dist/design-system/components/feedback/Card/Card.js +46 -0
  24. package/dist/design-system/components/feedback/Card/types.d.ts +1 -0
  25. package/dist/design-system/components/feedback/Card/types.js +1 -0
  26. package/dist/design-system/components/feedback/Field/Field.d.ts +2 -0
  27. package/dist/design-system/components/feedback/Field/Field.js +6 -0
  28. package/dist/design-system/components/feedback/Field/types.d.ts +1 -0
  29. package/dist/design-system/components/feedback/Field/types.js +1 -0
  30. package/dist/design-system/components/feedback/index.d.ts +6 -0
  31. package/dist/design-system/components/feedback/index.js +3 -0
  32. package/dist/design-system/components/headings/Heading/Heading.d.ts +3 -0
  33. package/dist/design-system/components/headings/Heading/Heading.js +66 -0
  34. package/dist/design-system/components/headings/Heading/types.d.ts +1 -0
  35. package/dist/design-system/components/headings/Heading/types.js +1 -0
  36. package/dist/design-system/components/icons/Icon/Icon.d.ts +10 -0
  37. package/dist/design-system/components/icons/Icon/Icon.js +421 -0
  38. package/dist/design-system/components/icons/Icon/types.d.ts +7 -0
  39. package/dist/design-system/components/icons/Icon/types.js +1 -0
  40. package/dist/design-system/components/icons/SVGIcons/BlokeyIcon.d.ts +2 -0
  41. package/dist/design-system/components/icons/SVGIcons/BlokeyIcon.js +7 -0
  42. package/dist/design-system/components/icons/SVGIcons/ChromeIcon.d.ts +2 -0
  43. package/dist/design-system/components/icons/SVGIcons/ChromeIcon.js +7 -0
  44. package/dist/design-system/components/icons/SVGIcons/DesktopIcon.d.ts +2 -0
  45. package/dist/design-system/components/icons/SVGIcons/DesktopIcon.js +7 -0
  46. package/dist/design-system/components/icons/SVGIcons/EdgeIcon.d.ts +2 -0
  47. package/dist/design-system/components/icons/SVGIcons/EdgeIcon.js +7 -0
  48. package/dist/design-system/components/icons/SVGIcons/FallmanagerIcon.d.ts +2 -0
  49. package/dist/design-system/components/icons/SVGIcons/FallmanagerIcon.js +8 -0
  50. package/dist/design-system/components/icons/SVGIcons/FirefoxIcon.d.ts +2 -0
  51. package/dist/design-system/components/icons/SVGIcons/FirefoxIcon.js +7 -0
  52. package/dist/design-system/components/icons/SVGIcons/FlickrIcon.d.ts +2 -0
  53. package/dist/design-system/components/icons/SVGIcons/FlickrIcon.js +9 -0
  54. package/dist/design-system/components/icons/SVGIcons/GatsbyIcon.d.ts +2 -0
  55. package/dist/design-system/components/icons/SVGIcons/GatsbyIcon.js +8 -0
  56. package/dist/design-system/components/icons/SVGIcons/GoldenticketIcon.d.ts +2 -0
  57. package/dist/design-system/components/icons/SVGIcons/GoldenticketIcon.js +7 -0
  58. package/dist/design-system/components/icons/SVGIcons/GoldlabelOutlined.d.ts +2 -0
  59. package/dist/design-system/components/icons/SVGIcons/GoldlabelOutlined.js +7 -0
  60. package/dist/design-system/components/icons/SVGIcons/GraphqlIcon.d.ts +2 -0
  61. package/dist/design-system/components/icons/SVGIcons/GraphqlIcon.js +7 -0
  62. package/dist/design-system/components/icons/SVGIcons/IphoneIcon.d.ts +2 -0
  63. package/dist/design-system/components/icons/SVGIcons/IphoneIcon.js +7 -0
  64. package/dist/design-system/components/icons/SVGIcons/LinuxIcon.d.ts +2 -0
  65. package/dist/design-system/components/icons/SVGIcons/LinuxIcon.js +7 -0
  66. package/dist/design-system/components/icons/SVGIcons/MacIcon.d.ts +2 -0
  67. package/dist/design-system/components/icons/SVGIcons/MacIcon.js +7 -0
  68. package/dist/design-system/components/icons/SVGIcons/MacromediaIcon.d.ts +3 -0
  69. package/dist/design-system/components/icons/SVGIcons/MacromediaIcon.js +8 -0
  70. package/dist/design-system/components/icons/SVGIcons/OliverIcon.d.ts +2 -0
  71. package/dist/design-system/components/icons/SVGIcons/OliverIcon.js +5 -0
  72. package/dist/design-system/components/icons/SVGIcons/OpenAIIcon.d.ts +2 -0
  73. package/dist/design-system/components/icons/SVGIcons/OpenAIIcon.js +6 -0
  74. package/dist/design-system/components/icons/SVGIcons/PingpongballIcon.d.ts +2 -0
  75. package/dist/design-system/components/icons/SVGIcons/PingpongballIcon.js +8 -0
  76. package/dist/design-system/components/icons/SVGIcons/SafariIcon.d.ts +2 -0
  77. package/dist/design-system/components/icons/SVGIcons/SafariIcon.js +7 -0
  78. package/dist/design-system/components/icons/SVGIcons/WindowsIcon.d.ts +2 -0
  79. package/dist/design-system/components/icons/SVGIcons/WindowsIcon.js +7 -0
  80. package/dist/design-system/components/icons/SVGIcons/WordpressIcon.d.ts +2 -0
  81. package/dist/design-system/components/icons/SVGIcons/WordpressIcon.js +7 -0
  82. package/dist/design-system/components/icons/SVGIcons/XboxIcon.d.ts +2 -0
  83. package/dist/design-system/components/icons/SVGIcons/XboxIcon.js +7 -0
  84. package/dist/design-system/components/icons/index.d.ts +2 -0
  85. package/dist/design-system/components/icons/index.js +1 -0
  86. package/dist/design-system/components/images/FeaturedImage/FeaturedImage.d.ts +2 -0
  87. package/dist/design-system/components/images/FeaturedImage/FeaturedImage.js +67 -0
  88. package/dist/design-system/components/images/FeaturedImage/types.d.ts +1 -0
  89. package/dist/design-system/components/images/FeaturedImage/types.js +1 -0
  90. package/dist/design-system/components/layout/AppShell/AppShell.d.ts +2 -0
  91. package/dist/design-system/components/layout/AppShell/AppShell.js +6 -0
  92. package/dist/design-system/components/layout/AppShell/types.d.ts +1 -0
  93. package/dist/design-system/components/layout/AppShell/types.js +1 -0
  94. package/dist/design-system/components/layout/Footer/Footer.d.ts +2 -0
  95. package/dist/design-system/components/layout/Footer/Footer.js +106 -0
  96. package/dist/design-system/components/layout/Footer/types.d.ts +1 -0
  97. package/dist/design-system/components/layout/Footer/types.js +1 -0
  98. package/dist/design-system/components/layout/Header/Header.d.ts +2 -0
  99. package/dist/design-system/components/layout/Header/Header.js +6 -0
  100. package/dist/design-system/components/layout/Header/types.d.ts +1 -0
  101. package/dist/design-system/components/layout/Header/types.js +1 -0
  102. package/dist/design-system/components/layout/Main/Main.d.ts +2 -0
  103. package/dist/design-system/components/layout/Main/Main.js +4 -0
  104. package/dist/design-system/components/layout/Main/types.d.ts +1 -0
  105. package/dist/design-system/components/layout/Main/types.js +1 -0
  106. package/dist/design-system/components/layout/MenuDrawer/MenuDrawer.d.ts +2 -0
  107. package/dist/design-system/components/layout/MenuDrawer/MenuDrawer.js +31 -0
  108. package/dist/design-system/components/layout/MenuDrawer/types.d.ts +1 -0
  109. package/dist/design-system/components/layout/MenuDrawer/types.js +1 -0
  110. package/dist/design-system/components/layout/PageSection/PageSection.d.ts +2 -0
  111. package/dist/design-system/components/layout/PageSection/PageSection.js +6 -0
  112. package/dist/design-system/components/layout/PageSection/types.d.ts +1 -0
  113. package/dist/design-system/components/layout/PageSection/types.js +1 -0
  114. package/dist/design-system/components/layout/SectionTitle/SectionTitle.d.ts +2 -0
  115. package/dist/design-system/components/layout/SectionTitle/SectionTitle.js +6 -0
  116. package/dist/design-system/components/layout/SectionTitle/types.d.ts +1 -0
  117. package/dist/design-system/components/layout/SectionTitle/types.js +1 -0
  118. package/dist/design-system/components/layout/index.d.ts +7 -0
  119. package/dist/design-system/components/layout/index.js +7 -0
  120. package/dist/design-system/components/lists/List/List.d.ts +2 -0
  121. package/dist/design-system/components/lists/List/List.js +6 -0
  122. package/dist/design-system/components/lists/List/types.d.ts +2 -0
  123. package/dist/design-system/components/lists/List/types.js +1 -0
  124. package/dist/design-system/components/lists/ListItem/ListItem.d.ts +2 -0
  125. package/dist/design-system/components/lists/ListItem/ListItem.js +6 -0
  126. package/dist/design-system/components/lists/ListItem/types.d.ts +2 -0
  127. package/dist/design-system/components/lists/ListItem/types.js +1 -0
  128. package/dist/design-system/components/lists/ListItemButton/ListItemButton.d.ts +2 -0
  129. package/dist/design-system/components/lists/ListItemButton/ListItemButton.js +6 -0
  130. package/dist/design-system/components/lists/ListItemButton/types.d.ts +2 -0
  131. package/dist/design-system/components/lists/ListItemButton/types.js +1 -0
  132. package/dist/design-system/components/lists/ListItemText/ListItemText.d.ts +2 -0
  133. package/dist/design-system/components/lists/ListItemText/ListItemText.js +6 -0
  134. package/dist/design-system/components/lists/ListItemText/types.d.ts +2 -0
  135. package/dist/design-system/components/lists/ListItemText/types.js +1 -0
  136. package/dist/design-system/components/lists/ListSubheader/ListSubheader.d.ts +2 -0
  137. package/dist/design-system/components/lists/ListSubheader/ListSubheader.js +6 -0
  138. package/dist/design-system/components/lists/ListSubheader/types.d.ts +2 -0
  139. package/dist/design-system/components/lists/ListSubheader/types.js +1 -0
  140. package/dist/design-system/components/navigation/Breadcrumb/Breadcrumb.d.ts +2 -0
  141. package/dist/design-system/components/navigation/Breadcrumb/Breadcrumb.js +18 -0
  142. package/dist/design-system/components/navigation/Breadcrumb/types.d.ts +1 -0
  143. package/dist/design-system/components/navigation/Breadcrumb/types.js +1 -0
  144. package/dist/design-system/components/navigation/Share/Share.d.ts +3 -0
  145. package/dist/design-system/components/navigation/Share/Share.js +156 -0
  146. package/dist/design-system/components/navigation/Share/types.d.ts +1 -0
  147. package/dist/design-system/components/navigation/Share/types.js +1 -0
  148. package/dist/design-system/components/navigation/SiteNav/SiteNav.d.ts +3 -0
  149. package/dist/design-system/components/navigation/SiteNav/SiteNav.js +82 -0
  150. package/dist/design-system/components/navigation/SiteNav/types.d.ts +1 -0
  151. package/dist/design-system/components/navigation/SiteNav/types.js +1 -0
  152. package/dist/design-system/components/nxStyle.d.ts +129 -0
  153. package/dist/design-system/components/nxStyle.js +89 -0
  154. package/dist/design-system/components/responsive/Viewport/Viewport.d.ts +4 -0
  155. package/dist/design-system/components/responsive/Viewport/Viewport.js +32 -0
  156. package/dist/design-system/components/responsive/Viewport/types.d.ts +1 -0
  157. package/dist/design-system/components/responsive/Viewport/types.js +1 -0
  158. package/dist/design-system/components/surfaces/Swatch/Swatch.d.ts +2 -0
  159. package/dist/design-system/components/surfaces/Swatch/Swatch.js +19 -0
  160. package/dist/design-system/components/surfaces/Swatch/types.d.ts +1 -0
  161. package/dist/design-system/components/surfaces/Swatch/types.js +1 -0
  162. package/dist/design-system/components/surfaces/SwatchGroup/SwatchGroup.d.ts +2 -0
  163. package/dist/design-system/components/surfaces/SwatchGroup/SwatchGroup.js +12 -0
  164. package/dist/design-system/components/surfaces/SwatchGroup/types.d.ts +1 -0
  165. package/dist/design-system/components/surfaces/SwatchGroup/types.js +1 -0
  166. package/dist/design-system/index.d.ts +23 -0
  167. package/dist/design-system/index.js +22 -0
  168. package/dist/index.d.ts +25 -0
  169. package/dist/index.js +21 -0
  170. package/dist/styles/site-layout.css +354 -0
  171. package/dist/styles/theme.d.ts +3 -0
  172. package/dist/styles/theme.js +120 -0
  173. package/dist/styles/tokens.css +109 -0
  174. package/package.json +19 -1
@@ -0,0 +1,2 @@
1
+ import type { ListProps as MuiListProps } from '@mui/material/List';
2
+ export type ListProps = MuiListProps;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { ListItemProps } from './types';
2
+ export default function ListItem(props: ListItemProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { ListItem as MuiListItem } from '@mui/material';
4
+ export default function ListItem(props) {
5
+ return _jsx(MuiListItem, { ...props });
6
+ }
@@ -0,0 +1,2 @@
1
+ import type { ListItemProps as MuiListItemProps } from '@mui/material/ListItem';
2
+ export type ListItemProps = MuiListItemProps;
@@ -0,0 +1,2 @@
1
+ import type { ListItemButtonProps } from './types';
2
+ export default function ListItemButton(props: ListItemButtonProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { ListItemButton as MuiListItemButton } from '@mui/material';
4
+ export default function ListItemButton(props) {
5
+ return _jsx(MuiListItemButton, { ...props });
6
+ }
@@ -0,0 +1,2 @@
1
+ import type { ListItemButtonProps as MuiListItemButtonProps } from '@mui/material/ListItemButton';
2
+ export type ListItemButtonProps = MuiListItemButtonProps;
@@ -0,0 +1,2 @@
1
+ import type { ListItemTextProps } from './types';
2
+ export default function ListItemText(props: ListItemTextProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { ListItemText as MuiListItemText } from '@mui/material';
4
+ export default function ListItemText(props) {
5
+ return _jsx(MuiListItemText, { ...props });
6
+ }
@@ -0,0 +1,2 @@
1
+ import type { ListItemTextProps as MuiListItemTextProps } from '@mui/material/ListItemText';
2
+ export type ListItemTextProps = MuiListItemTextProps;
@@ -0,0 +1,2 @@
1
+ import type { ListSubheaderProps } from './types';
2
+ export default function ListSubheader(props: ListSubheaderProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { ListSubheader as MuiListSubheader } from '@mui/material';
4
+ export default function ListSubheader(props) {
5
+ return _jsx(MuiListSubheader, { ...props });
6
+ }
@@ -0,0 +1,2 @@
1
+ import type { ListSubheaderProps as MuiListSubheaderProps } from '@mui/material/ListSubheader';
2
+ export type ListSubheaderProps = MuiListSubheaderProps;
@@ -0,0 +1,2 @@
1
+ import type { BreadcrumbProps } from './types';
2
+ export default function Breadcrumb({ items }: BreadcrumbProps): import("react").JSX.Element | null;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export default function Breadcrumb({ items }) {
3
+ if (!Array.isArray(items) || items.length === 0) {
4
+ return null;
5
+ }
6
+ return (_jsx("nav", { "aria-label": "Breadcrumb", className: "site-breadcrumbs", children: _jsx("ol", { style: {
7
+ margin: 0,
8
+ padding: 0,
9
+ listStyle: 'none',
10
+ display: 'flex',
11
+ flexWrap: 'wrap',
12
+ alignItems: 'center',
13
+ gap: '0.5rem',
14
+ }, children: items.map((item, index) => {
15
+ const isLast = index === items.length - 1;
16
+ return (_jsx("li", { style: { display: 'inline-flex', alignItems: 'center', gap: '0.5rem' }, children: item.href && !isLast ? _jsx("a", { href: item.href, children: item.label }) : _jsx("span", { "aria-current": isLast ? 'page' : undefined, children: item.label }) }, `${item.label}-${index}`));
17
+ }) }) }));
18
+ }
@@ -0,0 +1 @@
1
+ export type { BreadcrumbItem, BreadcrumbProps } from '../../../types';
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import type { ShareProps } from './types';
3
+ export default function Share({ size, url, title, description, }: ShareProps): React.JSX.Element;
@@ -0,0 +1,156 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import { Box, Popover, Stack, Typography } from '@mui/material';
5
+ import { FacebookShareButton, LinkedinShareButton, WhatsappShareButton, XShareButton, } from 'react-share';
6
+ import Button from '../../buttons/Button/Button';
7
+ import IconButton from '../../buttons/IconButton/IconButton';
8
+ import Icon from '../../icons/Icon/Icon';
9
+ const CHANNELS = [
10
+ {
11
+ key: 'x',
12
+ label: 'X/Twitter',
13
+ icon: 'twitter',
14
+ render: (children, shareUrl, _description, ariaLabel) => (_jsx(XShareButton, { url: shareUrl, "aria-label": ariaLabel, children: children })),
15
+ },
16
+ {
17
+ key: 'facebook',
18
+ label: 'Facebook',
19
+ icon: 'facebook',
20
+ render: (children, shareUrl, _description, ariaLabel) => (_jsx(FacebookShareButton, { url: shareUrl, "aria-label": ariaLabel, children: children })),
21
+ },
22
+ {
23
+ key: 'linkedin',
24
+ label: 'LinkedIn',
25
+ icon: 'linkedin',
26
+ render: (children, shareUrl, description, ariaLabel) => (_jsx(LinkedinShareButton, { url: shareUrl, summary: description, "aria-label": ariaLabel, children: children })),
27
+ },
28
+ {
29
+ key: 'whatsapp',
30
+ label: 'WhatsApp',
31
+ icon: 'whatsapp',
32
+ render: (children, shareUrl, _description, ariaLabel) => (_jsx(WhatsappShareButton, { url: shareUrl, "aria-label": ariaLabel, children: children })),
33
+ },
34
+ ];
35
+ function renderShareContent(label, icon, showLabels) {
36
+ return (_jsxs(Box, { component: "span", sx: {
37
+ display: 'inline-flex',
38
+ alignItems: 'center',
39
+ justifyContent: 'flex-start',
40
+ gap: 1,
41
+ minHeight: showLabels ? 42 : 'auto',
42
+ width: '100%',
43
+ px: showLabels ? 1.25 : 0.75,
44
+ py: showLabels ? 0.75 : 0.5,
45
+ borderRadius: '3px',
46
+ '&:hover': {
47
+ backgroundColor: 'rgba(25, 118, 210, 0.08)',
48
+ },
49
+ }, children: [_jsx(Icon, { icon: icon, color: "secondary" }), showLabels ? _jsx(Typography, { variant: "body2", children: label }) : null] }));
50
+ }
51
+ function getSizeStyles(size) {
52
+ if (size === 'small') {
53
+ return {
54
+ iconButtonSize: 'sm',
55
+ gap: 1,
56
+ };
57
+ }
58
+ if (size === 'large') {
59
+ return {
60
+ iconButtonSize: 'lg',
61
+ gap: 1.5,
62
+ };
63
+ }
64
+ return {
65
+ iconButtonSize: 'md',
66
+ gap: 1,
67
+ };
68
+ }
69
+ export default function Share({ size = 'medium', url, title, description, }) {
70
+ const containerRef = React.useRef(null);
71
+ const [copied, setCopied] = React.useState(false);
72
+ const [anchorEl, setAnchorEl] = React.useState(null);
73
+ const [copiedAnchorEl, setCopiedAnchorEl] = React.useState(null);
74
+ const [shareData, setShareData] = React.useState({
75
+ url: url ?? '',
76
+ title: title ?? '',
77
+ description: description ?? '',
78
+ });
79
+ const resetTimerRef = React.useRef(null);
80
+ React.useEffect(() => {
81
+ if (url && title !== undefined && description !== undefined) {
82
+ setShareData({ url, title, description });
83
+ return;
84
+ }
85
+ if (typeof window === 'undefined') {
86
+ return;
87
+ }
88
+ const meta = document.querySelector('meta[name="description"]');
89
+ setShareData({
90
+ url: url ?? window.location.href,
91
+ title: title ?? window.document.title,
92
+ description: description ?? meta?.content ?? '',
93
+ });
94
+ }, [description, title, url]);
95
+ React.useEffect(() => {
96
+ return () => {
97
+ if (resetTimerRef.current !== null) {
98
+ window.clearTimeout(resetTimerRef.current);
99
+ }
100
+ };
101
+ }, []);
102
+ const { iconButtonSize, gap } = getSizeStyles(size);
103
+ const open = Boolean(anchorEl);
104
+ const copiedOpen = copied && Boolean(copiedAnchorEl);
105
+ const handleCopy = async () => {
106
+ if (!shareData.url || typeof navigator === 'undefined' || !navigator.clipboard?.writeText) {
107
+ return;
108
+ }
109
+ await navigator.clipboard.writeText(shareData.url);
110
+ setCopied(true);
111
+ setCopiedAnchorEl(containerRef.current);
112
+ if (resetTimerRef.current !== null) {
113
+ window.clearTimeout(resetTimerRef.current);
114
+ }
115
+ resetTimerRef.current = window.setTimeout(() => {
116
+ setCopied(false);
117
+ setCopiedAnchorEl(null);
118
+ resetTimerRef.current = null;
119
+ }, 2500);
120
+ setAnchorEl(null);
121
+ };
122
+ const handleToggle = (event) => {
123
+ const nextAnchor = event.currentTarget;
124
+ setAnchorEl(current => (current ? null : nextAnchor));
125
+ };
126
+ const handleClose = () => {
127
+ setAnchorEl(null);
128
+ };
129
+ const handleCopiedClose = () => {
130
+ setCopied(false);
131
+ setCopiedAnchorEl(null);
132
+ if (resetTimerRef.current !== null) {
133
+ window.clearTimeout(resetTimerRef.current);
134
+ resetTimerRef.current = null;
135
+ }
136
+ };
137
+ return (_jsxs(Box, { id: "share", ref: containerRef, "aria-label": "Share", sx: { display: 'flex', flexDirection: 'column', gap }, children: [_jsx(IconButton, { size: iconButtonSize, ariaLabel: "Open share menu", "aria-haspopup": "menu", "aria-expanded": open, "aria-controls": open ? 'share-menu' : undefined, icon: _jsx(Icon, { icon: "share", color: "secondary" }), onClick: handleToggle }), _jsx(Popover, { id: "share-menu", open: open, anchorEl: anchorEl, onClose: handleClose, anchorOrigin: { vertical: 'bottom', horizontal: 'center' }, transformOrigin: { vertical: 'top', horizontal: 'center' }, children: _jsx(Box, { sx: { p: 1.5, minWidth: 220 }, children: _jsxs(Stack, { spacing: gap, role: "menu", "aria-label": "Share menu", children: [CHANNELS.map(channel => {
138
+ const content = renderShareContent(channel.label, channel.icon, true);
139
+ return (_jsx(Box, { role: "none", sx: {
140
+ display: 'flex',
141
+ width: '100%',
142
+ '& > button': {
143
+ width: '100%',
144
+ display: 'flex',
145
+ },
146
+ }, children: channel.render(content, shareData.url, shareData.description, `Share on ${channel.label}`) }, channel.key));
147
+ }), _jsx(Button, { variant: "ghost", size: iconButtonSize, fullWidth: true, sx: {
148
+ justifyContent: 'flex-start',
149
+ color: 'text.primary',
150
+ '&:hover': {
151
+ backgroundColor: 'rgba(25, 118, 210, 0.08)',
152
+ },
153
+ }, startIcon: _jsx(Icon, { icon: "copy", color: "secondary" }), onClick: () => {
154
+ void handleCopy();
155
+ }, ariaLabel: "Copy link", disabled: !shareData.url, children: "Copy link" })] }) }) }), _jsx(Popover, { open: copiedOpen, anchorEl: copiedAnchorEl, onClose: handleCopiedClose, anchorOrigin: { vertical: 'bottom', horizontal: 'center' }, transformOrigin: { vertical: 'top', horizontal: 'center' }, disableRestoreFocus: true, children: _jsx(Box, { role: "status", sx: { px: 1.5, py: 1 }, children: _jsxs(Typography, { variant: "body2", children: ["Copied ", shareData.url, " to clipboard."] }) }) })] }));
156
+ }
@@ -0,0 +1 @@
1
+ export type { ShareProps, ShareSize } from '../../../types';
@@ -0,0 +1,3 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { SiteNavProps } from './types';
3
+ export default function SiteNav({ items, navigateTo }: SiteNavProps): ReactNode;
@@ -0,0 +1,82 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Fragment, useEffect, useState } from 'react';
4
+ import List from '../../lists/List/List';
5
+ import ListItem from '../../lists/ListItem/ListItem';
6
+ import ListItemButton from '../../lists/ListItemButton/ListItemButton';
7
+ import ListItemText from '../../lists/ListItemText/ListItemText';
8
+ function getNavPath(item) {
9
+ if (typeof item.slug === 'string' && item.slug.trim()) {
10
+ return item.slug;
11
+ }
12
+ if (typeof item.path === 'string' && item.path.trim()) {
13
+ return item.path;
14
+ }
15
+ return '#';
16
+ }
17
+ function isSuppressedHomeItem(item, depth) {
18
+ if (depth !== 0) {
19
+ return false;
20
+ }
21
+ const title = (item.title ?? '').trim().toLowerCase();
22
+ const path = getNavPath(item);
23
+ return title === 'home' || path === '/';
24
+ }
25
+ function normalizeNavPath(path) {
26
+ if (!path || path === '/') {
27
+ return '/';
28
+ }
29
+ const trimmed = path.trim();
30
+ return trimmed.endsWith('/') ? trimmed.slice(0, -1) : trimmed;
31
+ }
32
+ function isOnCurrentPath(itemPath, currentPath) {
33
+ if (!currentPath || !itemPath || itemPath === '#') {
34
+ return false;
35
+ }
36
+ const normalizedCurrentPath = normalizeNavPath(currentPath);
37
+ const normalizedItemPath = normalizeNavPath(itemPath);
38
+ if (normalizedItemPath === '/') {
39
+ return normalizedCurrentPath !== '/';
40
+ }
41
+ return normalizedCurrentPath === normalizedItemPath || normalizedCurrentPath.startsWith(`${normalizedItemPath}/`);
42
+ }
43
+ function renderNavItems(items, navigateTo, depth = 0, keyPrefix = 'nav', currentPath = '') {
44
+ if (!Array.isArray(items) || !items.length) {
45
+ return null;
46
+ }
47
+ return (_jsx(List, { disablePadding: true, dense: true, children: items.map((item, index) => {
48
+ if (isSuppressedHomeItem(item, depth)) {
49
+ return null;
50
+ }
51
+ const key = `${keyPrefix}-${index}-${item.title || item.slug || item.path || 'node'}`;
52
+ const hasChildren = Array.isArray(item.children) && item.children.length > 0;
53
+ const label = item.title || 'Untitled';
54
+ const itemPath = getNavPath(item);
55
+ const isCurrentPath = Boolean(currentPath && itemPath && currentPath === itemPath);
56
+ const shouldRenderChildren = Boolean(hasChildren && isOnCurrentPath(itemPath, currentPath));
57
+ return (_jsxs(Fragment, { children: [_jsx(ListItem, { disablePadding: true, children: _jsx(ListItemButton, { disabled: isCurrentPath, onClick: () => {
58
+ navigateTo?.(itemPath, item);
59
+ }, sx: {
60
+ pl: 1.5 + depth * 2,
61
+ py: 0.25,
62
+ minHeight: 28,
63
+ borderRadius: 1,
64
+ }, children: _jsx(ListItemText, { primary: label, sx: { my: 0 }, primaryTypographyProps: {
65
+ fontWeight: isCurrentPath ? 600 : 400,
66
+ fontSize: '1rem',
67
+ lineHeight: 1.15,
68
+ color: isCurrentPath ? 'primary.main' : 'text.primary',
69
+ } }) }) }), shouldRenderChildren ? renderNavItems(item.children, navigateTo, depth + 1, key, currentPath) : null] }, key));
70
+ }) }));
71
+ }
72
+ export default function SiteNav({ items, navigateTo }) {
73
+ const [currentPath, setCurrentPath] = useState('');
74
+ useEffect(() => {
75
+ if (typeof window === 'undefined') {
76
+ return;
77
+ }
78
+ const pathname = window.location.pathname;
79
+ setCurrentPath(pathname.endsWith('/') && pathname !== '/' ? pathname.slice(0, -1) : pathname);
80
+ }, []);
81
+ return renderNavItems(items, navigateTo, 0, 'nav', currentPath);
82
+ }
@@ -0,0 +1 @@
1
+ export type { SiteNavProps, T_NavNode } from '../../../types';
@@ -0,0 +1,129 @@
1
+ export declare const nxLightStyle: {
2
+ ':root': {
3
+ '--nx-ink': string;
4
+ '--nx-ink-logo': string;
5
+ '--nx-dusty': string;
6
+ '--nx-body': string;
7
+ '--nx-sign': string;
8
+ '--nx-ash': string;
9
+ '--nx-muted': string;
10
+ '--nx-fog': string;
11
+ '--nx-parchment': string;
12
+ '--nx-paper': string;
13
+ '--nx-oat': string;
14
+ '--nx-clay': string;
15
+ '--nx-line': string;
16
+ '--nx-line-soft': string;
17
+ '--nx-glass': string;
18
+ '--nx-glass-hi': string;
19
+ '--nx-tile': string;
20
+ '--nx-scrim': string;
21
+ '--nx-shadow-card': string;
22
+ '--nx-shadow-card-hover': string;
23
+ '--nx-shadow-glass': string;
24
+ '--nx-shadow-button': string;
25
+ '--nx-shadow-button-hi': string;
26
+ '--nx-shadow-float': string;
27
+ '--nx-shadow-pop': string;
28
+ '--surface-input': string;
29
+ '--surface-input-hover': string;
30
+ '--surface-input-focus': string;
31
+ '--surface-input-disabled': string;
32
+ '--surface-footer': string;
33
+ '--border-input': string;
34
+ '--border-input-hover': string;
35
+ '--border-input-focus': string;
36
+ '--focus-ring': string;
37
+ };
38
+ body: {
39
+ backgroundColor: string;
40
+ color: string;
41
+ transition: string;
42
+ };
43
+ };
44
+ export declare const nxDarkStyle: {
45
+ ':root': {
46
+ '--nx-ink': string;
47
+ '--nx-ink-logo': string;
48
+ '--nx-dusty': string;
49
+ '--nx-body': string;
50
+ '--nx-sign': string;
51
+ '--nx-ash': string;
52
+ '--nx-muted': string;
53
+ '--nx-fog': string;
54
+ '--nx-parchment': string;
55
+ '--nx-paper': string;
56
+ '--nx-oat': string;
57
+ '--nx-clay': string;
58
+ '--nx-line': string;
59
+ '--nx-line-soft': string;
60
+ '--nx-glass': string;
61
+ '--nx-glass-hi': string;
62
+ '--nx-tile': string;
63
+ '--nx-scrim': string;
64
+ '--nx-shadow-card': string;
65
+ '--nx-shadow-card-hover': string;
66
+ '--nx-shadow-glass': string;
67
+ '--nx-shadow-button': string;
68
+ '--nx-shadow-button-hi': string;
69
+ '--nx-shadow-float': string;
70
+ '--nx-shadow-pop': string;
71
+ '--surface-input': string;
72
+ '--surface-input-hover': string;
73
+ '--surface-input-focus': string;
74
+ '--surface-input-disabled': string;
75
+ '--surface-footer': string;
76
+ '--border-input': string;
77
+ '--border-input-hover': string;
78
+ '--border-input-focus': string;
79
+ '--focus-ring': string;
80
+ };
81
+ body: {
82
+ backgroundColor: string;
83
+ color: string;
84
+ transition: string;
85
+ };
86
+ };
87
+ export declare function getNxStyle(mode: 'light' | 'dark'): {
88
+ ':root': {
89
+ '--nx-ink': string;
90
+ '--nx-ink-logo': string;
91
+ '--nx-dusty': string;
92
+ '--nx-body': string;
93
+ '--nx-sign': string;
94
+ '--nx-ash': string;
95
+ '--nx-muted': string;
96
+ '--nx-fog': string;
97
+ '--nx-parchment': string;
98
+ '--nx-paper': string;
99
+ '--nx-oat': string;
100
+ '--nx-clay': string;
101
+ '--nx-line': string;
102
+ '--nx-line-soft': string;
103
+ '--nx-glass': string;
104
+ '--nx-glass-hi': string;
105
+ '--nx-tile': string;
106
+ '--nx-scrim': string;
107
+ '--nx-shadow-card': string;
108
+ '--nx-shadow-card-hover': string;
109
+ '--nx-shadow-glass': string;
110
+ '--nx-shadow-button': string;
111
+ '--nx-shadow-button-hi': string;
112
+ '--nx-shadow-float': string;
113
+ '--nx-shadow-pop': string;
114
+ '--surface-input': string;
115
+ '--surface-input-hover': string;
116
+ '--surface-input-focus': string;
117
+ '--surface-input-disabled': string;
118
+ '--surface-footer': string;
119
+ '--border-input': string;
120
+ '--border-input-hover': string;
121
+ '--border-input-focus': string;
122
+ '--focus-ring': string;
123
+ };
124
+ body: {
125
+ backgroundColor: string;
126
+ color: string;
127
+ transition: string;
128
+ };
129
+ };
@@ -0,0 +1,89 @@
1
+ export const nxLightStyle = {
2
+ ':root': {
3
+ '--nx-ink': '#1F1F1F',
4
+ '--nx-ink-logo': '#222222',
5
+ '--nx-dusty': '#3D3D3D',
6
+ '--nx-body': '#2F2F2F',
7
+ '--nx-sign': '#4D4D4D',
8
+ '--nx-ash': '#606060',
9
+ '--nx-muted': '#737373',
10
+ '--nx-fog': '#8A8A8A',
11
+ '--nx-parchment': '#FFFFFF',
12
+ '--nx-paper': '#FFFFFF',
13
+ '--nx-oat': '#E6E6E6',
14
+ '--nx-clay': '#5A5A5A',
15
+ '--nx-line': 'rgba(31, 31, 31, 0.14)',
16
+ '--nx-line-soft': 'rgba(31, 31, 31, 0.08)',
17
+ '--nx-glass': 'rgba(255, 255, 255, 0.42)',
18
+ '--nx-glass-hi': 'rgba(255, 255, 255, 0.5)',
19
+ '--nx-tile': 'rgba(255, 255, 255, 0.72)',
20
+ '--nx-scrim': 'rgba(17, 17, 17, 0.93)',
21
+ '--nx-shadow-card': '0 12px 40px rgba(31, 31, 31, 0.12)',
22
+ '--nx-shadow-card-hover': '0 28px 66px rgba(31, 31, 31, 0.18)',
23
+ '--nx-shadow-glass': '0 26px 60px -12px rgba(31, 31, 31, 0.18), 0 2px 6px rgba(31, 31, 31, 0.08)',
24
+ '--nx-shadow-button': '0 12px 30px rgba(31, 31, 31, 0.18)',
25
+ '--nx-shadow-button-hi': '0 18px 40px rgba(31, 31, 31, 0.24)',
26
+ '--nx-shadow-float': '0 40px 80px rgba(31, 31, 31, 0.24)',
27
+ '--nx-shadow-pop': '0 16px 48px rgba(31, 31, 31, 0.18)',
28
+ '--surface-input': 'rgba(255, 255, 255, 0.92)',
29
+ '--surface-input-hover': '#EDEDED',
30
+ '--surface-input-focus': '#FFFFFF',
31
+ '--surface-input-disabled': '#E0E0E0',
32
+ '--surface-footer': 'transparent',
33
+ '--border-input': 'rgba(31, 31, 31, 0.22)',
34
+ '--border-input-hover': 'rgba(31, 31, 31, 0.32)',
35
+ '--border-input-focus': '#5A5A5A',
36
+ '--focus-ring': '#5A5A5A',
37
+ },
38
+ body: {
39
+ backgroundColor: 'transparent',
40
+ color: '#1E1E1E',
41
+ transition: 'background-color 0.2s ease',
42
+ },
43
+ };
44
+ export const nxDarkStyle = {
45
+ ':root': {
46
+ '--nx-ink': '#F5F5F5',
47
+ '--nx-ink-logo': '#F5F5F5',
48
+ '--nx-dusty': '#D9D9D9',
49
+ '--nx-body': '#E5E5E5',
50
+ '--nx-sign': '#CFCFCF',
51
+ '--nx-ash': '#B8B8B8',
52
+ '--nx-muted': '#A3A3A3',
53
+ '--nx-fog': '#8F8F8F',
54
+ '--nx-parchment': '#111111',
55
+ '--nx-paper': '#1C1C1C',
56
+ '--nx-oat': '#4A4A4A',
57
+ '--nx-clay': '#F0F0F0',
58
+ '--nx-line': 'rgba(255, 255, 255, 0.16)',
59
+ '--nx-line-soft': 'rgba(255, 255, 255, 0.10)',
60
+ '--nx-glass': 'rgba(28, 28, 28, 0.72)',
61
+ '--nx-glass-hi': 'rgba(36, 36, 36, 0.82)',
62
+ '--nx-tile': 'rgba(28, 28, 28, 0.86)',
63
+ '--nx-scrim': 'rgba(17, 17, 17, 0.93)',
64
+ '--nx-shadow-card': '0 12px 40px rgba(0, 0, 0, 0.35)',
65
+ '--nx-shadow-card-hover': '0 28px 66px rgba(0, 0, 0, 0.46)',
66
+ '--nx-shadow-glass': '0 26px 60px -12px rgba(0, 0, 0, 0.46), 0 2px 6px rgba(0, 0, 0, 0.2)',
67
+ '--nx-shadow-button': '0 12px 30px rgba(0, 0, 0, 0.4)',
68
+ '--nx-shadow-button-hi': '0 18px 40px rgba(0, 0, 0, 0.5)',
69
+ '--nx-shadow-float': '0 40px 80px rgba(0, 0, 0, 0.5)',
70
+ '--nx-shadow-pop': '0 16px 48px rgba(0, 0, 0, 0.46)',
71
+ '--surface-input': 'rgba(28, 28, 28, 0.92)',
72
+ '--surface-input-hover': '#2A2A2A',
73
+ '--surface-input-focus': '#333333',
74
+ '--surface-input-disabled': '#2F2F2F',
75
+ '--surface-footer': '#1C1C1C',
76
+ '--border-input': 'rgba(255, 255, 255, 0.22)',
77
+ '--border-input-hover': 'rgba(255, 255, 255, 0.32)',
78
+ '--border-input-focus': '#F0F0F0',
79
+ '--focus-ring': '#F0F0F0',
80
+ },
81
+ body: {
82
+ backgroundColor: 'transparent',
83
+ color: '#F7F7F7',
84
+ transition: 'background-color 0.2s ease',
85
+ },
86
+ };
87
+ export function getNxStyle(mode) {
88
+ return mode === 'dark' ? nxDarkStyle : nxLightStyle;
89
+ }
@@ -0,0 +1,4 @@
1
+ import type { UseIsMobileOptions, VisibilityProps } from './types';
2
+ export declare function useIsMobile({ maxWidth }?: UseIsMobileOptions): boolean;
3
+ export declare function DesktopOnly({ children, maxWidth, fallback }: VisibilityProps): import("react").JSX.Element;
4
+ export declare function MobileOnly({ children, maxWidth, fallback }: VisibilityProps): import("react").JSX.Element;
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useLayoutEffect, useState } from 'react';
4
+ import { useMediaQuery } from '@mui/material';
5
+ export function useIsMobile({ maxWidth = 999 } = {}) {
6
+ return useMediaQuery(`(max-width:${maxWidth}px)`, {
7
+ noSsr: true,
8
+ defaultMatches: false,
9
+ });
10
+ }
11
+ export function DesktopOnly({ children, maxWidth = 999, fallback = null }) {
12
+ const [hydrated, setHydrated] = useState(false);
13
+ useLayoutEffect(() => {
14
+ setHydrated(true);
15
+ }, []);
16
+ const isMobile = useIsMobile({ maxWidth });
17
+ if (!hydrated) {
18
+ return (_jsx("div", { style: { opacity: 0, pointerEvents: 'none' }, children: children }));
19
+ }
20
+ return isMobile ? _jsx(_Fragment, { children: fallback }) : _jsx(_Fragment, { children: children });
21
+ }
22
+ export function MobileOnly({ children, maxWidth = 999, fallback = null }) {
23
+ const [hydrated, setHydrated] = useState(false);
24
+ useLayoutEffect(() => {
25
+ setHydrated(true);
26
+ }, []);
27
+ const isMobile = useIsMobile({ maxWidth });
28
+ if (!hydrated) {
29
+ return (_jsx("div", { style: { opacity: 0, pointerEvents: 'none' }, children: children }));
30
+ }
31
+ return isMobile ? _jsx(_Fragment, { children: children }) : _jsx(_Fragment, { children: fallback });
32
+ }
@@ -0,0 +1 @@
1
+ export type { UseIsMobileOptions, VisibilityProps } from '../../../types';
@@ -0,0 +1,2 @@
1
+ import type { SwatchProps } from './types';
2
+ export default function Swatch({ label, value }: SwatchProps): import("react").JSX.Element;