@jsonresume/core 0.1.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 (279) hide show
  1. package/README.md +689 -0
  2. package/dist/resume-print.css +425 -0
  3. package/dist/tokens.css +139 -0
  4. package/package.json +66 -0
  5. package/src/badges/BadgeRowOutline.jsx +118 -0
  6. package/src/badges/BadgeRowOutline.stories.tsx +160 -0
  7. package/src/badges/index.jsx +5 -0
  8. package/src/callouts/Callout.jsx +80 -0
  9. package/src/callouts/Callout.stories.tsx +27 -0
  10. package/src/callouts/HighlightCard.jsx +114 -0
  11. package/src/callouts/HighlightCard.stories.tsx +27 -0
  12. package/src/callouts/InfoBox.jsx +82 -0
  13. package/src/callouts/InfoBox.stories.tsx +26 -0
  14. package/src/callouts/index.jsx +4 -0
  15. package/src/certifications/AwardCard.jsx +83 -0
  16. package/src/certifications/AwardCard.stories.tsx +32 -0
  17. package/src/certifications/CertificationBadge.jsx +85 -0
  18. package/src/certifications/CertificationBadge.stories.tsx +29 -0
  19. package/src/certifications/CertificationRow.jsx +150 -0
  20. package/src/certifications/CertificationRow.stories.tsx +64 -0
  21. package/src/certifications/HonorsList.jsx +87 -0
  22. package/src/certifications/HonorsList.stories.tsx +36 -0
  23. package/src/certifications/index.jsx +5 -0
  24. package/src/containers/AccentCalloutPanel.jsx +176 -0
  25. package/src/containers/AccentCalloutPanel.stories.tsx +105 -0
  26. package/src/containers/MutedPanel.jsx +125 -0
  27. package/src/containers/MutedPanel.stories.tsx +113 -0
  28. package/src/containers/RoleBlockFramed.jsx +191 -0
  29. package/src/containers/RoleBlockFramed.stories.tsx +230 -0
  30. package/src/containers/SoftCardOutline.jsx +161 -0
  31. package/src/containers/SoftCardOutline.stories.tsx +174 -0
  32. package/src/containers/index.jsx +9 -0
  33. package/src/data/KPIChipLine.jsx +158 -0
  34. package/src/data/KPIChipLine.stories.tsx +99 -0
  35. package/src/data/KeyValueInline.jsx +150 -0
  36. package/src/data/KeyValueInline.stories.tsx +136 -0
  37. package/src/data/MetricBar.jsx +93 -0
  38. package/src/data/MetricBar.stories.tsx +31 -0
  39. package/src/data/MetricBullet.jsx +129 -0
  40. package/src/data/MetricBullet.stories.tsx +99 -0
  41. package/src/data/MetricInline.jsx +60 -0
  42. package/src/data/MetricInline.stories.tsx +53 -0
  43. package/src/data/ProgressCircle.jsx +81 -0
  44. package/src/data/ProgressCircle.stories.tsx +102 -0
  45. package/src/data/StatCard.jsx +65 -0
  46. package/src/data/StatCard.stories.tsx +29 -0
  47. package/src/data/index.jsx +12 -0
  48. package/src/dates/DateBadge.jsx +73 -0
  49. package/src/dates/DateBadge.stories.tsx +30 -0
  50. package/src/dates/RelativeDate.jsx +121 -0
  51. package/src/dates/RelativeDate.stories.tsx +29 -0
  52. package/src/dates/index.jsx +3 -0
  53. package/src/experience/ExperienceCard.jsx +82 -0
  54. package/src/experience/ExperienceCard.stories.tsx +36 -0
  55. package/src/experience/ExperienceCompact.jsx +72 -0
  56. package/src/experience/ExperienceCompact.stories.tsx +53 -0
  57. package/src/experience/ExperienceGrid.jsx +65 -0
  58. package/src/experience/ExperienceGrid.stories.tsx +63 -0
  59. package/src/experience/ExperienceTimeline.jsx +24 -0
  60. package/src/experience/ExperienceTimeline.stories.tsx +63 -0
  61. package/src/experience/RoleHeaderCompact.jsx +99 -0
  62. package/src/experience/index.jsx +9 -0
  63. package/src/header/ContactRowLine.jsx +125 -0
  64. package/src/header/ContactRowLine.stories.tsx +65 -0
  65. package/src/header/CornerInitials.jsx +178 -0
  66. package/src/header/CornerInitials.stories.tsx +129 -0
  67. package/src/header/Footer.jsx +50 -0
  68. package/src/header/Footer.stories.tsx +25 -0
  69. package/src/header/HeaderCentered.jsx +51 -0
  70. package/src/header/HeaderCentered.stories.tsx +30 -0
  71. package/src/header/HeaderMinimal.jsx +50 -0
  72. package/src/header/HeaderMinimal.stories.tsx +29 -0
  73. package/src/header/HeaderSplit.jsx +65 -0
  74. package/src/header/HeaderSplit.stories.tsx +29 -0
  75. package/src/header/HeroNameBlock.jsx +71 -0
  76. package/src/header/HeroNameBlock.stories.tsx +37 -0
  77. package/src/header/NameStackElegant.jsx +104 -0
  78. package/src/header/NameStackElegant.stories.tsx +60 -0
  79. package/src/header/PageBreak.jsx +25 -0
  80. package/src/header/PageBreak.stories.tsx +22 -0
  81. package/src/header/SectionFlagTitle.jsx +87 -0
  82. package/src/header/SectionFlagTitle.stories.tsx +53 -0
  83. package/src/header/SectionRuleTitle.jsx +84 -0
  84. package/src/header/SectionRuleTitle.stories.tsx +52 -0
  85. package/src/header/index.jsx +18 -0
  86. package/src/helpers/calculations.js +428 -0
  87. package/src/index.js +253 -0
  88. package/src/languages/LanguageBar.jsx +90 -0
  89. package/src/languages/LanguageBar.stories.tsx +28 -0
  90. package/src/languages/LanguageGrid.jsx +118 -0
  91. package/src/languages/LanguageGrid.stories.tsx +33 -0
  92. package/src/languages/LanguageLevelBarLite.jsx +147 -0
  93. package/src/languages/LanguageLevelBarLite.stories.tsx +74 -0
  94. package/src/languages/ProficiencyScale.jsx +107 -0
  95. package/src/languages/ProficiencyScale.stories.tsx +30 -0
  96. package/src/languages/index.jsx +5 -0
  97. package/src/layouts/CardLayout.jsx +46 -0
  98. package/src/layouts/CardLayout.stories.tsx +272 -0
  99. package/src/layouts/FlexLayout.jsx +53 -0
  100. package/src/layouts/FlexLayout.stories.tsx +270 -0
  101. package/src/layouts/GridLayout.jsx +38 -0
  102. package/src/layouts/GridLayout.stories.tsx +183 -0
  103. package/src/layouts/SidebarLayout.jsx +63 -0
  104. package/src/layouts/SidebarLayout.stories.tsx +162 -0
  105. package/src/layouts/StackLayout.jsx +26 -0
  106. package/src/layouts/StackLayout.stories.tsx +192 -0
  107. package/src/layouts/TwoColumnMicroGrid.jsx +87 -0
  108. package/src/layouts/TwoColumnMicroGrid.stories.tsx +96 -0
  109. package/src/layouts/index.jsx +11 -0
  110. package/src/lists/AchievementListSpacious.jsx +81 -0
  111. package/src/lists/AchievementListSpacious.stories.tsx +49 -0
  112. package/src/lists/AchievementListTight.jsx +80 -0
  113. package/src/lists/AchievementListTight.stories.tsx +49 -0
  114. package/src/lists/BulletList.jsx +66 -0
  115. package/src/lists/BulletList.stories.tsx +38 -0
  116. package/src/lists/CheckList.jsx +94 -0
  117. package/src/lists/CheckList.stories.tsx +38 -0
  118. package/src/lists/CompactList.jsx +90 -0
  119. package/src/lists/CompactList.stories.tsx +34 -0
  120. package/src/lists/DefinitionKeyline.jsx +114 -0
  121. package/src/lists/DefinitionKeyline.stories.tsx +90 -0
  122. package/src/lists/HangingBulletList.jsx +82 -0
  123. package/src/lists/HangingBulletList.stories.tsx +50 -0
  124. package/src/lists/IconList.jsx +89 -0
  125. package/src/lists/IconList.stories.tsx +36 -0
  126. package/src/lists/ListDashCompact.jsx +69 -0
  127. package/src/lists/ListDashCompact.stories.tsx +60 -0
  128. package/src/lists/MiniDotLeaderList.jsx +69 -0
  129. package/src/lists/MiniDotLeaderList.stories.tsx +73 -0
  130. package/src/lists/NumberedList.jsx +74 -0
  131. package/src/lists/NumberedList.stories.tsx +39 -0
  132. package/src/lists/index.jsx +12 -0
  133. package/src/metadata/GreyLabelCaps.jsx +66 -0
  134. package/src/metadata/GreyLabelCaps.stories.tsx +40 -0
  135. package/src/metadata/InlineKicker.jsx +61 -0
  136. package/src/metadata/InlineKicker.stories.tsx +35 -0
  137. package/src/metadata/MetaRow.jsx +96 -0
  138. package/src/metadata/MetaRow.stories.tsx +38 -0
  139. package/src/metadata/SmallCapsHeading.jsx +75 -0
  140. package/src/metadata/SmallCapsHeading.stories.tsx +54 -0
  141. package/src/metadata/SubsectionLabel.jsx +92 -0
  142. package/src/metadata/SubsectionLabel.stories.tsx +40 -0
  143. package/src/metadata/index.jsx +10 -0
  144. package/src/primitives/AccentSidebarStripe.stories.tsx +65 -0
  145. package/src/primitives/AccentSidebarStripe.tsx +95 -0
  146. package/src/primitives/AccentTopRule.stories.tsx +102 -0
  147. package/src/primitives/AccentTopRule.tsx +103 -0
  148. package/src/primitives/Badge.jsx +125 -0
  149. package/src/primitives/Badge.stories.tsx +27 -0
  150. package/src/primitives/ContactInfo.jsx +133 -0
  151. package/src/primitives/ContactInfo.stories.tsx +30 -0
  152. package/src/primitives/DIVIDERS.md +333 -0
  153. package/src/primitives/DateRange.jsx +178 -0
  154. package/src/primitives/DateRange.stories.tsx +28 -0
  155. package/src/primitives/DottedDivider.stories.tsx +54 -0
  156. package/src/primitives/DottedDivider.tsx +102 -0
  157. package/src/primitives/InlineSeparatorPipe.jsx +64 -0
  158. package/src/primitives/InlineSeparatorPipe.stories.tsx +96 -0
  159. package/src/primitives/KeylineDivider.stories.tsx +48 -0
  160. package/src/primitives/KeylineDivider.tsx +80 -0
  161. package/src/primitives/Link.jsx +59 -0
  162. package/src/primitives/Link.stories.tsx +29 -0
  163. package/src/primitives/ListItem.jsx +127 -0
  164. package/src/primitives/ListItem.stories.tsx +27 -0
  165. package/src/primitives/RulesetStack.stories.tsx +85 -0
  166. package/src/primitives/RulesetStack.tsx +117 -0
  167. package/src/primitives/Section.jsx +37 -0
  168. package/src/primitives/Section.stories.tsx +28 -0
  169. package/src/primitives/SectionTitle.jsx +62 -0
  170. package/src/primitives/SectionTitle.stories.tsx +27 -0
  171. package/src/primitives/index.jsx +36 -0
  172. package/src/print/ColumnBreak.jsx +44 -0
  173. package/src/print/ColumnBreak.stories.tsx +22 -0
  174. package/src/print/KeepTogether.jsx +24 -0
  175. package/src/print/KeepTogether.stories.tsx +26 -0
  176. package/src/print/LetterheadBar.jsx +100 -0
  177. package/src/print/LetterheadBar.stories.tsx +141 -0
  178. package/src/print/PageFooterLine.jsx +93 -0
  179. package/src/print/PageFooterLine.stories.tsx +121 -0
  180. package/src/print/PageHeaderLine.jsx +59 -0
  181. package/src/print/PageHeaderLine.stories.tsx +108 -0
  182. package/src/print/PrintOnly.jsx +49 -0
  183. package/src/print/PrintOnly.stories.tsx +26 -0
  184. package/src/print/SoftShadowEmulation.jsx +88 -0
  185. package/src/print/SoftShadowEmulation.stories.tsx +214 -0
  186. package/src/print/index.jsx +8 -0
  187. package/src/profile/Avatar.jsx +66 -0
  188. package/src/profile/Avatar.stories.tsx +84 -0
  189. package/src/profile/ContactGrid.jsx +63 -0
  190. package/src/profile/ContactGrid.stories.tsx +33 -0
  191. package/src/profile/ProfileCard.jsx +73 -0
  192. package/src/profile/ProfileCard.stories.tsx +35 -0
  193. package/src/profile/SocialLinks.jsx +61 -0
  194. package/src/profile/SocialLinks.stories.tsx +33 -0
  195. package/src/profile/index.jsx +9 -0
  196. package/src/providers/ThemeProvider.jsx +56 -0
  197. package/src/providers/ThemeProvider.stories.tsx +149 -0
  198. package/src/publications/PortfolioGrid.jsx +122 -0
  199. package/src/publications/PortfolioGrid.stories.tsx +62 -0
  200. package/src/publications/ProjectCard.jsx +151 -0
  201. package/src/publications/ProjectCard.stories.tsx +36 -0
  202. package/src/publications/PublicationEntryPlain.jsx +127 -0
  203. package/src/publications/PublicationEntryPlain.stories.tsx +58 -0
  204. package/src/publications/PublicationItem.jsx +120 -0
  205. package/src/publications/PublicationItem.stories.tsx +32 -0
  206. package/src/publications/index.jsx +5 -0
  207. package/src/quotes/BlockQuote.jsx +55 -0
  208. package/src/quotes/BlockQuote.stories.tsx +33 -0
  209. package/src/quotes/PullQuote.jsx +70 -0
  210. package/src/quotes/PullQuote.stories.tsx +32 -0
  211. package/src/quotes/Testimonial.jsx +99 -0
  212. package/src/quotes/Testimonial.stories.tsx +36 -0
  213. package/src/quotes/index.jsx +4 -0
  214. package/src/skills/SkillBar.jsx +66 -0
  215. package/src/skills/SkillBar.stories.tsx +112 -0
  216. package/src/skills/SkillCategory.jsx +71 -0
  217. package/src/skills/SkillCategory.stories.tsx +197 -0
  218. package/src/skills/SkillCloud.jsx +53 -0
  219. package/src/skills/SkillCloud.stories.tsx +132 -0
  220. package/src/skills/SkillGroup.jsx +56 -0
  221. package/src/skills/SkillGroup.stories.tsx +162 -0
  222. package/src/skills/SkillPill.jsx +56 -0
  223. package/src/skills/SkillPill.stories.tsx +157 -0
  224. package/src/skills/SkillRating.jsx +60 -0
  225. package/src/skills/SkillRating.stories.tsx +115 -0
  226. package/src/skills/index.jsx +11 -0
  227. package/src/styles/tokens.css +139 -0
  228. package/src/tables/ComparisonTable.jsx +128 -0
  229. package/src/tables/ComparisonTable.stories.tsx +41 -0
  230. package/src/tables/DataTable.jsx +149 -0
  231. package/src/tables/DataTable.stories.tsx +64 -0
  232. package/src/tables/SkillMatrix.jsx +139 -0
  233. package/src/tables/SkillMatrix.stories.tsx +90 -0
  234. package/src/tables/index.jsx +4 -0
  235. package/src/tags/ToolTagRibbon.jsx +106 -0
  236. package/src/tags/ToolTagRibbon.stories.tsx +121 -0
  237. package/src/tags/index.jsx +5 -0
  238. package/src/timeline/TimelineInline.stories.tsx +83 -0
  239. package/src/timeline/TimelineInline.tsx +202 -0
  240. package/src/timeline/TimelineItem.jsx +106 -0
  241. package/src/timeline/TimelineItem.stories.tsx +64 -0
  242. package/src/timeline/TimelineRuleMinimal.stories.tsx +68 -0
  243. package/src/timeline/TimelineRuleMinimal.tsx +165 -0
  244. package/src/timeline/TimelineSection.jsx +21 -0
  245. package/src/timeline/TimelineSection.stories.tsx +44 -0
  246. package/src/timeline/index.jsx +9 -0
  247. package/src/tokens/index.js +164 -0
  248. package/src/typography/Heading.jsx +48 -0
  249. package/src/typography/Heading.stories.tsx +46 -0
  250. package/src/typography/HyphenationSafeParagraph.jsx +98 -0
  251. package/src/typography/HyphenationSafeParagraph.stories.tsx +151 -0
  252. package/src/typography/Label.jsx +38 -0
  253. package/src/typography/Label.stories.tsx +27 -0
  254. package/src/typography/QuoteStripe.jsx +78 -0
  255. package/src/typography/QuoteStripe.stories.tsx +63 -0
  256. package/src/typography/SectionIntroParagraph.jsx +62 -0
  257. package/src/typography/SectionIntroParagraph.stories.tsx +57 -0
  258. package/src/typography/Text.jsx +42 -0
  259. package/src/typography/Text.stories.tsx +35 -0
  260. package/src/typography/index.jsx +11 -0
  261. package/src/utils/Divider.jsx +32 -0
  262. package/src/utils/Divider.stories.tsx +24 -0
  263. package/src/utils/Flex.jsx +6 -0
  264. package/src/utils/Flex.stories.tsx +28 -0
  265. package/src/utils/Grid.jsx +6 -0
  266. package/src/utils/Grid.stories.tsx +28 -0
  267. package/src/utils/Spacer.jsx +18 -0
  268. package/src/utils/Spacer.stories.tsx +26 -0
  269. package/src/utils/index.jsx +9 -0
  270. package/src/utils/security.js +155 -0
  271. package/src/visuals/BackgroundPattern.jsx +65 -0
  272. package/src/visuals/BackgroundPattern.stories.tsx +27 -0
  273. package/src/visuals/BorderAccent.jsx +147 -0
  274. package/src/visuals/BorderAccent.stories.tsx +27 -0
  275. package/src/visuals/ColorBlock.jsx +60 -0
  276. package/src/visuals/ColorBlock.stories.tsx +27 -0
  277. package/src/visuals/DividerVariants.jsx +120 -0
  278. package/src/visuals/DividerVariants.stories.tsx +27 -0
  279. package/src/visuals/index.jsx +5 -0
@@ -0,0 +1,141 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { LetterheadBar } from './LetterheadBar';
3
+
4
+ const meta = {
5
+ title: 'Print/LetterheadBar',
6
+ component: LetterheadBar,
7
+ parameters: {
8
+ layout: 'fullscreen',
9
+ docs: {
10
+ description: {
11
+ component:
12
+ 'Thin top bar across entire page with name. Reserves top margin for printer unprintable area. Appears as a fixed bar in print mode.',
13
+ },
14
+ },
15
+ },
16
+ tags: ['autodocs'],
17
+ argTypes: {
18
+ name: {
19
+ control: 'text',
20
+ description: 'Full name to display prominently',
21
+ },
22
+ tagline: {
23
+ control: 'text',
24
+ description: 'Optional tagline or subtitle',
25
+ },
26
+ includeSpacer: {
27
+ control: 'boolean',
28
+ description: 'Add spacer to prevent content overlap',
29
+ },
30
+ },
31
+ } satisfies Meta<typeof LetterheadBar>;
32
+
33
+ export default meta;
34
+ type Story = StoryObj<typeof meta>;
35
+
36
+ export const Default: Story = {
37
+ args: {
38
+ name: 'John Doe',
39
+ includeSpacer: true,
40
+ },
41
+ render: (args) => (
42
+ <div>
43
+ <LetterheadBar {...args} />
44
+ <div style={{ padding: '2rem' }}>
45
+ <h1>Resume Content</h1>
46
+ <p>
47
+ The letterhead bar appears at the top of the page, reserving space for
48
+ printer margins.
49
+ </p>
50
+ <p>
51
+ In print mode, it becomes fixed and accounts for the typical 0.25in
52
+ unprintable area at the top of pages.
53
+ </p>
54
+ </div>
55
+ </div>
56
+ ),
57
+ };
58
+
59
+ export const WithTagline: Story = {
60
+ args: {
61
+ name: 'Jane Smith',
62
+ tagline: 'Senior Product Designer',
63
+ includeSpacer: true,
64
+ },
65
+ render: (args) => (
66
+ <div>
67
+ <LetterheadBar {...args} />
68
+ <div style={{ padding: '2rem' }}>
69
+ <h1>Professional Experience</h1>
70
+ <p>Letterhead with name and professional tagline.</p>
71
+ </div>
72
+ </div>
73
+ ),
74
+ };
75
+
76
+ export const WithCustomContent: Story = {
77
+ args: {
78
+ name: 'Alex Chen',
79
+ includeSpacer: true,
80
+ },
81
+ render: (args) => (
82
+ <div>
83
+ <LetterheadBar {...args}>
84
+ <div style={{ display: 'flex', gap: '1rem', fontSize: '0.875rem' }}>
85
+ <span>alex@example.com</span>
86
+ <span>|</span>
87
+ <span>555-0123</span>
88
+ </div>
89
+ </LetterheadBar>
90
+ <div style={{ padding: '2rem' }}>
91
+ <h1>Resume Content</h1>
92
+ <p>Letterhead with custom contact information.</p>
93
+ </div>
94
+ </div>
95
+ ),
96
+ };
97
+
98
+ export const WithoutSpacer: Story = {
99
+ args: {
100
+ name: 'Sarah Williams',
101
+ tagline: 'Full Stack Developer',
102
+ includeSpacer: false,
103
+ },
104
+ render: (args) => (
105
+ <div>
106
+ <LetterheadBar {...args} />
107
+ <div style={{ padding: '2rem' }}>
108
+ <h1>Resume Content (No Spacer)</h1>
109
+ <p>
110
+ Without the spacer, content will start immediately after the
111
+ letterhead bar.
112
+ </p>
113
+ <p>
114
+ This can be useful if you want to manually control spacing or have a
115
+ custom layout.
116
+ </p>
117
+ </div>
118
+ </div>
119
+ ),
120
+ };
121
+
122
+ export const MinimalStyle: Story = {
123
+ args: {
124
+ name: 'Michael Brown',
125
+ includeSpacer: true,
126
+ },
127
+ render: (args) => (
128
+ <div>
129
+ <LetterheadBar {...args} />
130
+ <div style={{ padding: '2rem' }}>
131
+ <h1>Minimal Letterhead</h1>
132
+ <p>Simple name-only letterhead for clean, professional look.</p>
133
+ {Array.from({ length: 10 }, (_, i) => (
134
+ <p key={i}>
135
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
136
+ </p>
137
+ ))}
138
+ </div>
139
+ </div>
140
+ ),
141
+ };
@@ -0,0 +1,93 @@
1
+ import React from 'react';
2
+ /**
3
+ * PageFooterLine
4
+ * Small footer with page number and date
5
+ * Displays "Page X of N" format with automatic page numbering
6
+ */
7
+ import styled from 'styled-components';
8
+
9
+ const FooterContainer = styled.div`
10
+ display: none;
11
+
12
+ @media print {
13
+ display: block;
14
+ position: running(footer);
15
+ padding-top: var(--resume-space-xs, 0.5rem);
16
+ border-top: 1px solid var(--resume-color-border, #e5e7eb);
17
+ font-size: var(--resume-size-xs, 0.75rem);
18
+ color: var(--resume-color-secondary, #6b7280);
19
+ }
20
+ `;
21
+
22
+ const FooterContent = styled.div`
23
+ display: flex;
24
+ justify-content: space-between;
25
+ align-items: center;
26
+ `;
27
+
28
+ const PageNumber = styled.span`
29
+ @media print {
30
+ &::before {
31
+ content: 'Page ';
32
+ }
33
+ &::after {
34
+ content: ' of ' counter(pages);
35
+ }
36
+ }
37
+ `;
38
+
39
+ const CurrentPage = styled.span`
40
+ @media print {
41
+ &::before {
42
+ content: counter(page);
43
+ }
44
+ }
45
+ `;
46
+
47
+ const Date = styled.span`
48
+ font-variant-numeric: tabular-nums;
49
+ `;
50
+
51
+ /**
52
+ * PageFooterLine component displays a footer on each printed page
53
+ * Includes page numbers and optional date
54
+ *
55
+ * @param {Object} props
56
+ * @param {boolean} [props.showDate=true] - Show current date
57
+ * @param {string} [props.dateFormat] - Custom date string (defaults to locale date)
58
+ * @param {React.ReactNode} [props.children] - Optional custom content
59
+ * @param {string} [props.className] - Additional CSS classes
60
+ * @returns {JSX.Element}
61
+ *
62
+ * @example
63
+ * <PageFooterLine showDate={true} />
64
+ * <PageFooterLine dateFormat="January 2025" />
65
+ */
66
+ export function PageFooterLine({
67
+ showDate = true,
68
+ dateFormat,
69
+ children,
70
+ className,
71
+ }) {
72
+ const dateText =
73
+ dateFormat ||
74
+ new Date().toLocaleDateString('en-US', {
75
+ year: 'numeric',
76
+ month: 'long',
77
+ day: 'numeric',
78
+ });
79
+
80
+ return (
81
+ <FooterContainer className={className}>
82
+ <FooterContent>
83
+ <PageNumber>
84
+ <CurrentPage />
85
+ </PageNumber>
86
+ {showDate && <Date>{dateText}</Date>}
87
+ {children}
88
+ </FooterContent>
89
+ </FooterContainer>
90
+ );
91
+ }
92
+
93
+ export default PageFooterLine;
@@ -0,0 +1,121 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { PageFooterLine } from './PageFooterLine';
3
+
4
+ const meta = {
5
+ title: 'Print/PageFooterLine',
6
+ component: PageFooterLine,
7
+ parameters: {
8
+ layout: 'fullscreen',
9
+ docs: {
10
+ description: {
11
+ component:
12
+ 'Small footer with page number and date. Displays "Page X of N" format with automatic page numbering. Only visible in print preview.',
13
+ },
14
+ },
15
+ },
16
+ tags: ['autodocs'],
17
+ argTypes: {
18
+ showDate: {
19
+ control: 'boolean',
20
+ description: 'Show current date in footer',
21
+ },
22
+ dateFormat: {
23
+ control: 'text',
24
+ description: 'Custom date string (defaults to locale date)',
25
+ },
26
+ },
27
+ } satisfies Meta<typeof PageFooterLine>;
28
+
29
+ export default meta;
30
+ type Story = StoryObj<typeof meta>;
31
+
32
+ export const Default: Story = {
33
+ args: {
34
+ showDate: true,
35
+ },
36
+ render: (args) => (
37
+ <div>
38
+ <div style={{ padding: '2rem', minHeight: '400px' }}>
39
+ <h1>Resume Content</h1>
40
+ <p>
41
+ The footer will appear at the bottom of each printed page with page
42
+ numbers. Use your browser's print preview (Cmd/Ctrl + P) to see the
43
+ effect.
44
+ </p>
45
+ </div>
46
+ <PageFooterLine {...args} />
47
+ </div>
48
+ ),
49
+ };
50
+
51
+ export const WithoutDate: Story = {
52
+ args: {
53
+ showDate: false,
54
+ },
55
+ render: (args) => (
56
+ <div>
57
+ <div style={{ padding: '2rem', minHeight: '400px' }}>
58
+ <h1>Resume Content</h1>
59
+ <p>Footer with page numbers only, no date.</p>
60
+ </div>
61
+ <PageFooterLine {...args} />
62
+ </div>
63
+ ),
64
+ };
65
+
66
+ export const CustomDateFormat: Story = {
67
+ args: {
68
+ showDate: true,
69
+ dateFormat: 'January 2025',
70
+ },
71
+ render: (args) => (
72
+ <div>
73
+ <div style={{ padding: '2rem', minHeight: '400px' }}>
74
+ <h1>Resume Content</h1>
75
+ <p>Footer with custom date format.</p>
76
+ </div>
77
+ <PageFooterLine {...args} />
78
+ </div>
79
+ ),
80
+ };
81
+
82
+ export const WithCustomContent: Story = {
83
+ args: {
84
+ showDate: true,
85
+ },
86
+ render: (args) => (
87
+ <div>
88
+ <div style={{ padding: '2rem', minHeight: '400px' }}>
89
+ <h1>Resume Content</h1>
90
+ <p>Footer with additional custom content.</p>
91
+ </div>
92
+ <PageFooterLine {...args}>
93
+ <span style={{ fontSize: '0.75rem', color: '#6b7280' }}>
94
+ Confidential
95
+ </span>
96
+ </PageFooterLine>
97
+ </div>
98
+ ),
99
+ };
100
+
101
+ export const MultiPageDemo: Story = {
102
+ args: {
103
+ showDate: true,
104
+ dateFormat: 'October 2025',
105
+ },
106
+ render: (args) => (
107
+ <div>
108
+ <div style={{ padding: '2rem' }}>
109
+ <h1>Multi-Page Resume</h1>
110
+ {Array.from({ length: 20 }, (_, i) => (
111
+ <p key={i}>
112
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do
113
+ eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
114
+ ad minim veniam, quis nostrud exercitation ullamco laboris.
115
+ </p>
116
+ ))}
117
+ </div>
118
+ <PageFooterLine {...args} />
119
+ </div>
120
+ ),
121
+ };
@@ -0,0 +1,59 @@
1
+ import React from 'react';
2
+ /**
3
+ * PageHeaderLine
4
+ * Repeating header line with name on subsequent pages
5
+ * Uses CSS @page margin boxes to reserve top space
6
+ */
7
+ import styled from 'styled-components';
8
+
9
+ const HeaderContainer = styled.div`
10
+ display: none;
11
+
12
+ @media print {
13
+ display: block;
14
+ position: running(header);
15
+ padding-bottom: var(--resume-space-xs, 0.5rem);
16
+ border-bottom: 1px solid var(--resume-color-border, #e5e7eb);
17
+ font-size: var(--resume-size-small, 0.875rem);
18
+ color: var(--resume-color-secondary, #6b7280);
19
+ }
20
+ `;
21
+
22
+ const HeaderContent = styled.div`
23
+ display: flex;
24
+ justify-content: space-between;
25
+ align-items: center;
26
+ `;
27
+
28
+ const Name = styled.span`
29
+ font-weight: 600;
30
+ color: var(--resume-color-primary, #111827);
31
+ `;
32
+
33
+ /**
34
+ * PageHeaderLine component displays a header on subsequent pages
35
+ * Automatically reserves top margin space for the header
36
+ *
37
+ * @param {Object} props
38
+ * @param {string} props.name - Full name to display in header
39
+ * @param {string} [props.subtitle] - Optional subtitle (e.g., job title)
40
+ * @param {React.ReactNode} [props.children] - Optional custom content
41
+ * @param {string} [props.className] - Additional CSS classes
42
+ * @returns {JSX.Element}
43
+ *
44
+ * @example
45
+ * <PageHeaderLine name="John Doe" subtitle="Software Engineer" />
46
+ */
47
+ export function PageHeaderLine({ name, subtitle, children, className }) {
48
+ return (
49
+ <HeaderContainer className={className}>
50
+ <HeaderContent>
51
+ <Name>{name}</Name>
52
+ {subtitle && <span>{subtitle}</span>}
53
+ {children}
54
+ </HeaderContent>
55
+ </HeaderContainer>
56
+ );
57
+ }
58
+
59
+ export default PageHeaderLine;
@@ -0,0 +1,108 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { PageHeaderLine } from './PageHeaderLine';
3
+
4
+ const meta = {
5
+ title: 'Print/PageHeaderLine',
6
+ component: PageHeaderLine,
7
+ parameters: {
8
+ layout: 'fullscreen',
9
+ docs: {
10
+ description: {
11
+ component:
12
+ 'Repeating header line with name on subsequent pages. Uses CSS @page margin boxes to reserve top space for printing. Only visible in print preview.',
13
+ },
14
+ },
15
+ },
16
+ tags: ['autodocs'],
17
+ argTypes: {
18
+ name: {
19
+ control: 'text',
20
+ description: 'Full name to display in header',
21
+ },
22
+ subtitle: {
23
+ control: 'text',
24
+ description: 'Optional subtitle (e.g., job title)',
25
+ },
26
+ },
27
+ } satisfies Meta<typeof PageHeaderLine>;
28
+
29
+ export default meta;
30
+ type Story = StoryObj<typeof meta>;
31
+
32
+ export const Default: Story = {
33
+ args: {
34
+ name: 'John Doe',
35
+ },
36
+ render: (args) => (
37
+ <div>
38
+ <PageHeaderLine {...args} />
39
+ <div style={{ padding: '2rem' }}>
40
+ <h1>Resume Content</h1>
41
+ <p>
42
+ The header line will appear at the top of each printed page. Use your
43
+ browser's print preview (Cmd/Ctrl + P) to see the effect.
44
+ </p>
45
+ <p>
46
+ This component uses <code>position: running(header)</code> which is
47
+ supported in print mode to create repeating headers.
48
+ </p>
49
+ </div>
50
+ </div>
51
+ ),
52
+ };
53
+
54
+ export const WithSubtitle: Story = {
55
+ args: {
56
+ name: 'Jane Smith',
57
+ subtitle: 'Software Engineer',
58
+ },
59
+ render: (args) => (
60
+ <div>
61
+ <PageHeaderLine {...args} />
62
+ <div style={{ padding: '2rem' }}>
63
+ <h1>Resume Content</h1>
64
+ <p>Header with name and subtitle for additional context.</p>
65
+ </div>
66
+ </div>
67
+ ),
68
+ };
69
+
70
+ export const CustomContent: Story = {
71
+ args: {
72
+ name: 'Alex Johnson',
73
+ },
74
+ render: (args) => (
75
+ <div>
76
+ <PageHeaderLine {...args}>
77
+ <span style={{ fontSize: '0.75rem', color: '#6b7280' }}>
78
+ Updated: January 2025
79
+ </span>
80
+ </PageHeaderLine>
81
+ <div style={{ padding: '2rem' }}>
82
+ <h1>Resume Content</h1>
83
+ <p>Header with custom children content on the right side.</p>
84
+ </div>
85
+ </div>
86
+ ),
87
+ };
88
+
89
+ export const MultiPageDemo: Story = {
90
+ args: {
91
+ name: 'Sarah Williams',
92
+ subtitle: 'UX Designer',
93
+ },
94
+ render: (args) => (
95
+ <div>
96
+ <PageHeaderLine {...args} />
97
+ <div style={{ padding: '2rem' }}>
98
+ <h1>Page 1 Content</h1>
99
+ {Array.from({ length: 20 }, (_, i) => (
100
+ <p key={i}>
101
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do
102
+ eiusmod tempor incididunt ut labore et dolore magna aliqua.
103
+ </p>
104
+ ))}
105
+ </div>
106
+ </div>
107
+ ),
108
+ };
@@ -0,0 +1,49 @@
1
+ import React from 'react';
2
+ /**
3
+ * PrintOnly
4
+ * Show content only when printing
5
+ */
6
+ import styled from 'styled-components';
7
+
8
+ const Container = styled.div`
9
+ display: ${(props) => (props.$hideScreen ? 'none' : 'block')};
10
+
11
+ @media print {
12
+ display: block !important;
13
+ }
14
+
15
+ @media screen {
16
+ display: ${(props) => (props.$hideScreen ? 'none !important' : 'block')};
17
+ }
18
+ `;
19
+
20
+ const ScreenContainer = styled.div`
21
+ @media print {
22
+ display: none !important;
23
+ }
24
+ `;
25
+
26
+ /**
27
+ * @param {Object} props
28
+ * @param {React.ReactNode} props.children - Content to show only when printing
29
+ * @param {boolean} [props.hideScreen=true] - Hide on screen (default true)
30
+ * @param {string} [props.className] - Additional CSS classes
31
+ */
32
+ export function PrintOnly({ children, hideScreen = true, className }) {
33
+ return (
34
+ <Container $hideScreen={hideScreen} className={className}>
35
+ {children}
36
+ </Container>
37
+ );
38
+ }
39
+
40
+ /**
41
+ * @param {Object} props
42
+ * @param {React.ReactNode} props.children - Content to show only on screen
43
+ * @param {string} [props.className] - Additional CSS classes
44
+ */
45
+ export function ScreenOnly({ children, className }) {
46
+ return <ScreenContainer className={className}>{children}</ScreenContainer>;
47
+ }
48
+
49
+ export default PrintOnly;
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ /**
3
+ * PrintOnly Stories
4
+ */
5
+ import { PrintOnly } from './PrintOnly';
6
+
7
+ const meta = {
8
+ title: 'Resume Core/Print/PrintOnly',
9
+ component: PrintOnly,
10
+ parameters: { layout: 'padded' },
11
+ tags: ['autodocs'],
12
+ };
13
+
14
+ export default meta;
15
+
16
+ export const Default = {
17
+ args: {
18
+ children: 'This content only appears in print',
19
+ },
20
+ };
21
+
22
+ export const Example = {
23
+ args: {
24
+ children: 'Page footer for printed resumes',
25
+ },
26
+ };
@@ -0,0 +1,88 @@
1
+ import React from 'react';
2
+ /**
3
+ * SoftShadowEmulation
4
+ * Printed "shadow" effect using second keyline with slight offset
5
+ * No actual blur - uses subtle tint (≤8%) for print-safe shadow effect
6
+ */
7
+ import styled from 'styled-components';
8
+
9
+ const ShadowContainer = styled.div`
10
+ position: relative;
11
+ background: var(--resume-color-background, #ffffff);
12
+ `;
13
+
14
+ const ShadowBox = styled.div`
15
+ position: relative;
16
+ padding: ${(props) => props.$padding || 'var(--resume-space-base, 1rem)'};
17
+ background: var(--resume-color-background, #ffffff);
18
+
19
+ /* Primary border */
20
+ border: 1px solid var(--resume-color-border, #e5e7eb);
21
+
22
+ /* Shadow emulation using pseudo-element */
23
+ &::after {
24
+ content: '';
25
+ position: absolute;
26
+ top: ${(props) => props.$offset || '4px'};
27
+ left: ${(props) => props.$offset || '4px'};
28
+ right: -${(props) => props.$offset || '4px'};
29
+ bottom: -${(props) => props.$offset || '4px'};
30
+ border: 1px solid ${(props) => props.$shadowColor || 'rgba(0, 0, 0, 0.08)'};
31
+ border-radius: inherit;
32
+ z-index: -1;
33
+
34
+ @media print {
35
+ /* Ensure shadow prints - use solid light gray */
36
+ border-color: ${(props) => props.$printShadowColor || '#f0f0f0'};
37
+ }
38
+ }
39
+ `;
40
+
41
+ /**
42
+ * SoftShadowEmulation component creates a print-safe shadow effect
43
+ * Uses a second border with offset instead of CSS box-shadow
44
+ * Safe for ATS parsing and guaranteed to print on all devices
45
+ *
46
+ * @param {Object} props
47
+ * @param {React.ReactNode} props.children - Content to wrap with shadow
48
+ * @param {string} [props.offset='4px'] - Shadow offset distance
49
+ * @param {string} [props.shadowColor='rgba(0, 0, 0, 0.08)'] - Shadow tint (≤8% opacity)
50
+ * @param {string} [props.printShadowColor='#f0f0f0'] - Solid color for print
51
+ * @param {string} [props.padding] - Inner padding (defaults to --resume-space-base)
52
+ * @param {string} [props.className] - Additional CSS classes
53
+ * @returns {JSX.Element}
54
+ *
55
+ * @example
56
+ * <SoftShadowEmulation>
57
+ * <h2>Section Title</h2>
58
+ * <p>Content with subtle shadow effect</p>
59
+ * </SoftShadowEmulation>
60
+ *
61
+ * @example
62
+ * <SoftShadowEmulation offset="6px" shadowColor="rgba(0, 0, 0, 0.06)">
63
+ * <ProfileCard />
64
+ * </SoftShadowEmulation>
65
+ */
66
+ export function SoftShadowEmulation({
67
+ children,
68
+ offset = '4px',
69
+ shadowColor = 'rgba(0, 0, 0, 0.08)',
70
+ printShadowColor = '#f0f0f0',
71
+ padding,
72
+ className,
73
+ }) {
74
+ return (
75
+ <ShadowContainer className={className}>
76
+ <ShadowBox
77
+ $offset={offset}
78
+ $shadowColor={shadowColor}
79
+ $printShadowColor={printShadowColor}
80
+ $padding={padding}
81
+ >
82
+ {children}
83
+ </ShadowBox>
84
+ </ShadowContainer>
85
+ );
86
+ }
87
+
88
+ export default SoftShadowEmulation;