@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,133 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+ import { safeUrl } from '../utils/security.js';
4
+
5
+ /**
6
+ * ContactInfo Component
7
+ * Displays contact information from resume basics
8
+ *
9
+ * @component
10
+ * @example
11
+ * <ContactInfo basics={resume.basics} />
12
+ */
13
+
14
+ const ContactContainer = styled.div`
15
+ display: flex;
16
+ justify-content: center;
17
+ gap: ${(props) =>
18
+ props.theme?.spacing?.small || 'var(--resume-space-small, 12px)'};
19
+ flex-wrap: wrap;
20
+ font-size: ${(props) =>
21
+ props.theme?.typography?.small || 'var(--resume-size-small, 10pt)'};
22
+ color: ${(props) =>
23
+ props.theme?.colors?.text || 'var(--resume-color-text, #333)'};
24
+
25
+ a {
26
+ color: ${(props) =>
27
+ props.theme?.colors?.link || 'var(--resume-color-link, #0066cc)'};
28
+ text-decoration: none;
29
+
30
+ &:hover {
31
+ text-decoration: underline;
32
+ }
33
+ }
34
+ `;
35
+
36
+ const ContactItem = styled.span`
37
+ display: inline-flex;
38
+ align-items: center;
39
+ gap: 4px;
40
+ `;
41
+
42
+ const Separator = styled.span`
43
+ color: ${(props) =>
44
+ props.theme?.colors?.muted || 'var(--resume-color-muted, #999)'};
45
+ `;
46
+
47
+ export function ContactInfo({ basics = {}, separator = '•', className }) {
48
+ const { email, phone, url, location, profiles = [] } = basics;
49
+
50
+ const items = [];
51
+
52
+ if (email) {
53
+ items.push(
54
+ <ContactItem key="email">
55
+ <a href={safeUrl(`mailto:${email}`)} aria-label="Email">
56
+ {email}
57
+ </a>
58
+ </ContactItem>
59
+ );
60
+ }
61
+
62
+ if (phone) {
63
+ items.push(
64
+ <ContactItem key="phone">
65
+ <a href={safeUrl(`tel:${phone}`)} aria-label="Phone">
66
+ {phone}
67
+ </a>
68
+ </ContactItem>
69
+ );
70
+ }
71
+
72
+ if (location) {
73
+ const locationStr = [location.city, location.region, location.countryCode]
74
+ .filter(Boolean)
75
+ .join(', ');
76
+ if (locationStr) {
77
+ items.push(
78
+ <ContactItem key="location" aria-label="Location">
79
+ {locationStr}
80
+ </ContactItem>
81
+ );
82
+ }
83
+ }
84
+
85
+ if (url) {
86
+ const displayUrl = url.replace(/^https?:\/\//, '').replace(/\/$/, '');
87
+ items.push(
88
+ <ContactItem key="url">
89
+ <a
90
+ href={safeUrl(url)}
91
+ target="_blank"
92
+ rel="noopener noreferrer"
93
+ aria-label="Website"
94
+ >
95
+ {displayUrl}
96
+ </a>
97
+ </ContactItem>
98
+ );
99
+ }
100
+
101
+ // Add social profiles
102
+ profiles.forEach((profile, index) => {
103
+ if (profile.url) {
104
+ items.push(
105
+ <ContactItem key={`profile-${index}`}>
106
+ <a
107
+ href={safeUrl(profile.url)}
108
+ target="_blank"
109
+ rel="noopener noreferrer"
110
+ aria-label={profile.network}
111
+ >
112
+ {profile.network || profile.username}
113
+ </a>
114
+ </ContactItem>
115
+ );
116
+ }
117
+ });
118
+
119
+ if (items.length === 0) return null;
120
+
121
+ return (
122
+ <ContactContainer className={`resume-contact ${className || ''}`.trim()}>
123
+ {items.map((item, index) => (
124
+ <React.Fragment key={index}>
125
+ {index > 0 && <Separator aria-hidden="true">{separator}</Separator>}
126
+ {item}
127
+ </React.Fragment>
128
+ ))}
129
+ </ContactContainer>
130
+ );
131
+ }
132
+
133
+ export default ContactInfo;
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ /**
3
+ * ContactInfo Stories
4
+ */
5
+ import { ContactInfo } from './ContactInfo';
6
+
7
+ const meta = {
8
+ title: 'Resume Core/Primitives/ContactInfo',
9
+ component: ContactInfo,
10
+ parameters: { layout: 'padded' },
11
+ tags: ['autodocs'],
12
+ };
13
+
14
+ export default meta;
15
+
16
+ export const Default = {
17
+ args: {
18
+ email: 'sarah.johnson@example.com',
19
+ phone: '(555) 123-4567',
20
+ location: 'San Francisco, CA',
21
+ },
22
+ };
23
+
24
+ export const Example = {
25
+ args: {
26
+ email: 'michael.chen@example.com',
27
+ url: 'https://michaelchen.com',
28
+ linkedin: 'linkedin.com/in/michaelchen',
29
+ },
30
+ };
@@ -0,0 +1,333 @@
1
+ # Divider and Separator Components
2
+
3
+ This document describes the five divider and separator components available in @resume/core.
4
+
5
+ ## Overview
6
+
7
+ All divider components are optimized for:
8
+
9
+ - **ATS parsing compatibility** - Semantic HTML and proper positioning
10
+ - **Print quality** - Minimum stroke weights and color preservation
11
+ - **PDF generation** - Fixed dimensions to prevent moiré patterns
12
+ - **Accessibility** - Proper ARIA roles and semantic markup
13
+
14
+ ---
15
+
16
+ ## 1. KeylineDivider
17
+
18
+ Low-contrast horizontal rule with adjustable inset for visual hierarchy.
19
+
20
+ ### Props
21
+
22
+ | Prop | Type | Default | Description |
23
+ | ----------- | -------- | ------------------ | ---------------------------------------- |
24
+ | `inset` | `string` | `'0'` | Horizontal inset from edges (CSS length) |
25
+ | `color` | `string` | Theme border color | Border color |
26
+ | `className` | `string` | - | Additional CSS class |
27
+
28
+ ### Design Constraints
29
+
30
+ - Stroke weight: ≥0.3pt (prevents disappearing in print)
31
+ - Uses semantic `<hr>` element
32
+ - Print-safe color rendering
33
+
34
+ ### Examples
35
+
36
+ ```tsx
37
+ import { KeylineDivider } from '@resume/core';
38
+
39
+ // Full-width keyline
40
+ <KeylineDivider />
41
+
42
+ // Inset keyline for nested sections
43
+ <KeylineDivider inset="1rem" />
44
+
45
+ // Custom color
46
+ <KeylineDivider color="#e5e7eb" />
47
+ ```
48
+
49
+ ---
50
+
51
+ ## 2. DottedDivider
52
+
53
+ Dotted horizontal rule for visual rhythm and section separation.
54
+
55
+ ### Props
56
+
57
+ | Prop | Type | Default | Description |
58
+ | ----------- | -------- | ------------------ | -------------------- |
59
+ | `color` | `string` | Theme border color | Dot color |
60
+ | `spacing` | `string` | `'4px'` | Spacing between dots |
61
+ | `dotSize` | `string` | `'2px'` | Dot size |
62
+ | `className` | `string` | - | Additional CSS class |
63
+
64
+ ### Design Constraints
65
+
66
+ - Fixed dot size (2px) - prevents rendering artifacts
67
+ - Fixed spacing (4px) - prevents moiré in PDFs
68
+ - Uses semantic `<hr>` element
69
+
70
+ ### Examples
71
+
72
+ ```tsx
73
+ import { DottedDivider } from '@resume/core';
74
+
75
+ // Standard dotted divider
76
+ <DottedDivider />
77
+
78
+ // Custom color
79
+ <DottedDivider color="#94a3b8" />
80
+
81
+ // Sparse dotted divider
82
+ <DottedDivider spacing="8px" />
83
+ ```
84
+
85
+ ---
86
+
87
+ ## 3. AccentSidebarStripe
88
+
89
+ Narrow decorative accent stripe along the far left or right edge.
90
+
91
+ ### Props
92
+
93
+ | Prop | Type | Default | Description |
94
+ | ----------- | ------------------- | ------------------ | ---------------------- |
95
+ | `width` | `string` | `'4mm'` | Stripe width (max 6mm) |
96
+ | `color` | `string` | Theme accent color | Stripe color |
97
+ | `position` | `'left' \| 'right'` | `'left'` | Edge position |
98
+ | `height` | `string` | `'100%'` | Stripe height |
99
+ | `top` | `string` | `'0'` | Top offset |
100
+ | `className` | `string` | - | Additional CSS class |
101
+
102
+ ### Design Constraints
103
+
104
+ - Maximum width: 6mm (≈22.68px) - stays within safe margins
105
+ - No text content allowed (decorative only)
106
+ - Absolute positioning - doesn't disrupt layout
107
+ - ATS-safe: parsers ignore positioned elements
108
+
109
+ ### Examples
110
+
111
+ ```tsx
112
+ import { AccentSidebarStripe } from '@resume/core';
113
+
114
+ // Left accent stripe (needs relative positioned container)
115
+ <div style={{ position: 'relative' }}>
116
+ <AccentSidebarStripe />
117
+ <section>Content here</section>
118
+ </div>
119
+
120
+ // Right-aligned stripe
121
+ <AccentSidebarStripe position="right" />
122
+
123
+ // Custom width and color
124
+ <AccentSidebarStripe width="6mm" color="#2563eb" />
125
+
126
+ // Partial height stripe
127
+ <AccentSidebarStripe height="150px" top="1rem" />
128
+ ```
129
+
130
+ ---
131
+
132
+ ## 4. AccentTopRule
133
+
134
+ Short accent rule positioned above sections for visual hierarchy.
135
+
136
+ ### Props
137
+
138
+ | Prop | Type | Default | Description |
139
+ | ----------- | ------------------------------- | ------------------ | -------------------- |
140
+ | `width` | `string` | `'30%'` | Rule width (25-40%) |
141
+ | `align` | `'left' \| 'center' \| 'right'` | `'left'` | Alignment |
142
+ | `thickness` | `string` | `'2.5pt'` | Rule thickness |
143
+ | `color` | `string` | Theme accent color | Rule color |
144
+ | `className` | `string` | - | Additional CSS class |
145
+
146
+ ### Design Constraints
147
+
148
+ - Length: 25-40% of text width (optimal visual balance)
149
+ - Thickness: 2-3pt (prominence without overwhelming)
150
+ - Proper spacing via margin-bottom
151
+
152
+ ### Examples
153
+
154
+ ```tsx
155
+ import { AccentTopRule } from '@resume/core';
156
+
157
+ // Standard top rule above section
158
+ <AccentTopRule />
159
+ <h2>Work Experience</h2>
160
+
161
+ // Centered rule
162
+ <AccentTopRule align="center" />
163
+
164
+ // Custom width and color
165
+ <AccentTopRule width="40%" color="#8b5cf6" />
166
+
167
+ // Thicker rule
168
+ <AccentTopRule thickness="3pt" />
169
+ ```
170
+
171
+ ---
172
+
173
+ ## 5. RulesetStack
174
+
175
+ Alternating rule + gap stack for visual grouping and rhythm.
176
+
177
+ ### Props
178
+
179
+ | Prop | Type | Default | Description |
180
+ | --------------- | -------- | ------------------ | ----------------------------------- |
181
+ | `count` | `number` | `3` | Number of rules (2-5) |
182
+ | `gapMultiplier` | `number` | `1` | Gap multiplier (0.5x, 1x, 1.5x, 2x) |
183
+ | `thickness` | `string` | `'0.4pt'` | Rule thickness |
184
+ | `color` | `string` | Theme border color | Rule color |
185
+ | `className` | `string` | - | Additional CSS class |
186
+
187
+ ### Design Constraints
188
+
189
+ - Gap spacing: multiples of body leading (line-height)
190
+ - Rule thickness: 0.3-0.5pt (consistent with keylines)
191
+ - Stack count: 2-5 rules (optimal visual balance)
192
+
193
+ ### Examples
194
+
195
+ ```tsx
196
+ import { RulesetStack } from '@resume/core';
197
+
198
+ // Standard 3-rule stack
199
+ <RulesetStack count={3} />
200
+
201
+ // Tight spacing
202
+ <RulesetStack count={4} gapMultiplier={0.5} />
203
+
204
+ // Wide spacing
205
+ <RulesetStack count={2} gapMultiplier={2} />
206
+
207
+ // Custom color and thickness
208
+ <RulesetStack count={3} color="#94a3b8" thickness="0.5pt" />
209
+ ```
210
+
211
+ ---
212
+
213
+ ## Print Optimization
214
+
215
+ All components include `@media print` rules that:
216
+
217
+ 1. **Preserve colors**: `-webkit-print-color-adjust: exact; print-color-adjust: exact;`
218
+ 2. **Prevent page breaks**: `page-break-inside: avoid;`
219
+ 3. **Enforce minimum weights**: Minimum stroke weights for visibility
220
+ 4. **Fixed dimensions**: Prevent moiré patterns and rendering artifacts
221
+
222
+ ---
223
+
224
+ ## Accessibility
225
+
226
+ All components follow accessibility best practices:
227
+
228
+ - Semantic HTML (`<hr>` for horizontal rules)
229
+ - ARIA roles (`role="separator"`, `role="presentation"`)
230
+ - Proper orientation (`aria-orientation="horizontal"`)
231
+ - Hidden decorative elements (`aria-hidden="true"`)
232
+
233
+ ---
234
+
235
+ ## Theme Integration
236
+
237
+ All components integrate with the @resume/core theme system:
238
+
239
+ ```tsx
240
+ import { ThemeProvider } from '@resume/core';
241
+
242
+ const customTheme = {
243
+ colors: {
244
+ border: '#e5e7eb',
245
+ accent: '#2563eb',
246
+ },
247
+ spacing: {
248
+ tight: '0.5rem',
249
+ },
250
+ };
251
+
252
+ <ThemeProvider theme={customTheme}>
253
+ <KeylineDivider />
254
+ <AccentTopRule />
255
+ {/* Components automatically use theme values */}
256
+ </ThemeProvider>;
257
+ ```
258
+
259
+ ---
260
+
261
+ ## Storybook
262
+
263
+ All components have Storybook stories for interactive testing:
264
+
265
+ ```bash
266
+ pnpm --filter @resume/core storybook
267
+ ```
268
+
269
+ Stories available:
270
+
271
+ - `Primitives/Dividers/KeylineDivider`
272
+ - `Primitives/Dividers/DottedDivider`
273
+ - `Primitives/Dividers/AccentSidebarStripe`
274
+ - `Primitives/Dividers/AccentTopRule`
275
+ - `Primitives/Dividers/RulesetStack`
276
+
277
+ ---
278
+
279
+ ## File Locations
280
+
281
+ ```
282
+ packages/resume-core/src/primitives/
283
+ ├── KeylineDivider.tsx
284
+ ├── KeylineDivider.stories.tsx
285
+ ├── DottedDivider.tsx
286
+ ├── DottedDivider.stories.tsx
287
+ ├── AccentSidebarStripe.tsx
288
+ ├── AccentSidebarStripe.stories.tsx
289
+ ├── AccentTopRule.tsx
290
+ ├── AccentTopRule.stories.tsx
291
+ ├── RulesetStack.tsx
292
+ ├── RulesetStack.stories.tsx
293
+ └── index.jsx (exports all components)
294
+ ```
295
+
296
+ ---
297
+
298
+ ## Usage Example: Complete Resume Section
299
+
300
+ ```tsx
301
+ import {
302
+ Section,
303
+ SectionTitle,
304
+ AccentTopRule,
305
+ KeylineDivider,
306
+ AccentSidebarStripe,
307
+ RulesetStack,
308
+ } from '@resume/core';
309
+
310
+ function WorkExperience() {
311
+ return (
312
+ <Section id="work">
313
+ {/* Accent stripe along left edge */}
314
+ <AccentSidebarStripe />
315
+
316
+ {/* Accent rule above section */}
317
+ <AccentTopRule width="35%" />
318
+
319
+ <SectionTitle>Work Experience</SectionTitle>
320
+
321
+ {/* Job entries... */}
322
+
323
+ {/* Keyline divider between jobs */}
324
+ <KeylineDivider inset="1rem" />
325
+
326
+ {/* More job entries... */}
327
+
328
+ {/* Ruleset stack at end of section */}
329
+ <RulesetStack count={3} gapMultiplier={0.5} />
330
+ </Section>
331
+ );
332
+ }
333
+ ```
@@ -0,0 +1,178 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ /**
5
+ * Date formatting utility with Intl.DateTimeFormat
6
+ * Formats date ranges for work/education experience with full locale support
7
+ *
8
+ * @param {Object} options - DateRange options
9
+ * @param {string|Date} options.startDate - Start date (ISO string or Date object)
10
+ * @param {string|Date} [options.endDate] - End date (ISO string, Date object, or null for "Present")
11
+ * @param {string} [options.format='short'] - Format style: 'short' (default), 'long', 'numeric'
12
+ * @param {string} [options.locale='en-US'] - BCP 47 locale (e.g., 'en-US', 'fr-FR', 'ar-SA')
13
+ * @param {string} [options.numberingSystem] - Numbering system (e.g., 'arab', 'latn', 'hanidec')
14
+ * @param {string} [options.presentLabel] - Custom label for present/ongoing (defaults to localized)
15
+ * @returns {string} Formatted date range
16
+ *
17
+ * @example
18
+ * formatDateRange({ startDate: '2020-01-15', endDate: null })
19
+ * // 'Jan 2020 - Present'
20
+ *
21
+ * @example
22
+ * formatDateRange({
23
+ * startDate: '2020-01-15',
24
+ * locale: 'fr-FR',
25
+ * format: 'long'
26
+ * })
27
+ * // 'janvier 2020 - Présent'
28
+ *
29
+ * @example
30
+ * formatDateRange({
31
+ * startDate: '2020-01-15',
32
+ * locale: 'ar-SA',
33
+ * numberingSystem: 'arab'
34
+ * })
35
+ * // With Arabic numerals
36
+ */
37
+ export function formatDateRange({
38
+ startDate,
39
+ endDate,
40
+ format = 'short',
41
+ locale = 'en-US',
42
+ numberingSystem,
43
+ presentLabel,
44
+ }) {
45
+ if (!startDate) return '';
46
+
47
+ // Determine "Present" label based on locale
48
+ const getPresentLabel = () => {
49
+ if (presentLabel) return presentLabel;
50
+
51
+ const labels = {
52
+ en: 'Present',
53
+ 'en-US': 'Present',
54
+ 'en-GB': 'Present',
55
+ fr: 'Présent',
56
+ 'fr-FR': 'Présent',
57
+ es: 'Presente',
58
+ 'es-ES': 'Presente',
59
+ de: 'Heute',
60
+ 'de-DE': 'Heute',
61
+ it: 'Presente',
62
+ 'it-IT': 'Presente',
63
+ pt: 'Presente',
64
+ 'pt-BR': 'Presente',
65
+ ja: '現在',
66
+ 'ja-JP': '現在',
67
+ zh: '至今',
68
+ 'zh-CN': '至今',
69
+ 'zh-TW': '至今',
70
+ ko: '현재',
71
+ 'ko-KR': '현재',
72
+ ar: 'حاضر',
73
+ 'ar-SA': 'حاضر',
74
+ };
75
+
76
+ return labels[locale] || labels[locale.split('-')[0]] || 'Present';
77
+ };
78
+
79
+ const formatDate = (dateStr) => {
80
+ if (!dateStr) return getPresentLabel();
81
+
82
+ const date = typeof dateStr === 'string' ? new Date(dateStr) : dateStr;
83
+
84
+ if (isNaN(date.getTime())) return dateStr; // Invalid date, return as-is
85
+
86
+ // Configure Intl.DateTimeFormat based on format style
87
+ const monthFormats = {
88
+ short: { month: 'short' },
89
+ long: { month: 'long' },
90
+ numeric: { month: '2-digit' },
91
+ };
92
+
93
+ const options = {
94
+ ...monthFormats[format],
95
+ year: 'numeric',
96
+ };
97
+
98
+ // Add numbering system if provided
99
+ if (numberingSystem) {
100
+ options.numberingSystem = numberingSystem;
101
+ }
102
+
103
+ // Use Intl.DateTimeFormat for proper locale support
104
+ const formatter = new Intl.DateTimeFormat(locale, options);
105
+ return formatter.format(date);
106
+ };
107
+
108
+ const start = formatDate(startDate);
109
+ const end = formatDate(endDate);
110
+
111
+ return `${start} - ${end}`;
112
+ }
113
+
114
+ /**
115
+ * DateRange Component
116
+ * Styled date range display for consistent formatting with full i18n support
117
+ *
118
+ * @component
119
+ * @example
120
+ * <DateRange startDate="2020-01-15" endDate={null} />
121
+ *
122
+ * @example
123
+ * <DateRange
124
+ * startDate="2018-06"
125
+ * endDate="2020-03"
126
+ * format="long"
127
+ * locale="fr-FR"
128
+ * />
129
+ *
130
+ * @example
131
+ * // Arabic with Arabic-Indic numerals
132
+ * <DateRange
133
+ * startDate="2020-01-15"
134
+ * locale="ar-SA"
135
+ * numberingSystem="arab"
136
+ * />
137
+ */
138
+
139
+ const StyledDateRange = styled.span`
140
+ font-size: ${(props) =>
141
+ props.theme?.typography?.small || 'var(--resume-size-small, 10pt)'};
142
+ color: ${(props) =>
143
+ props.theme?.colors?.tertiary || 'var(--resume-color-tertiary, #666)'};
144
+ white-space: nowrap;
145
+ `;
146
+
147
+ export function DateRange({
148
+ startDate,
149
+ endDate,
150
+ format = 'short',
151
+ locale = 'en-US',
152
+ numberingSystem,
153
+ presentLabel,
154
+ className,
155
+ ...rest
156
+ }) {
157
+ const formatted = formatDateRange({
158
+ startDate,
159
+ endDate,
160
+ format,
161
+ locale,
162
+ numberingSystem,
163
+ presentLabel,
164
+ });
165
+
166
+ if (!formatted) return null;
167
+
168
+ return (
169
+ <StyledDateRange
170
+ className={`resume-date-range ${className || ''}`.trim()}
171
+ {...rest}
172
+ >
173
+ {formatted}
174
+ </StyledDateRange>
175
+ );
176
+ }
177
+
178
+ export default DateRange;
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ /**
3
+ * DateRange Stories
4
+ */
5
+ import { DateRange } from './DateRange';
6
+
7
+ const meta = {
8
+ title: 'Resume Core/Primitives/DateRange',
9
+ component: DateRange,
10
+ parameters: { layout: 'padded' },
11
+ tags: ['autodocs'],
12
+ };
13
+
14
+ export default meta;
15
+
16
+ export const Default = {
17
+ args: {
18
+ start: '2020',
19
+ end: 'Present',
20
+ },
21
+ };
22
+
23
+ export const Example = {
24
+ args: {
25
+ start: 'Jan 2022',
26
+ end: 'Dec 2023',
27
+ },
28
+ };