@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,158 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ /**
5
+ * KPIChipLine Component
6
+ * Row of tiny text chips for displaying key performance indicators
7
+ * Uses stroke-less pills without filled backgrounds for better contrast and print optimization
8
+ *
9
+ * @component
10
+ * @example
11
+ * <KPIChipLine kpis={['95% Uptime', 'NPS 8.5', '200K MAU', '<100ms P95']} />
12
+ * <KPIChipLine>
13
+ * <KPIChip>95% Uptime</KPIChip>
14
+ * <KPIChip>NPS 8.5</KPIChip>
15
+ * </KPIChipLine>
16
+ */
17
+
18
+ const ChipContainer = styled.div`
19
+ display: flex;
20
+ flex-wrap: wrap;
21
+ gap: ${(props) => props.$gap || '8px'};
22
+ align-items: center;
23
+ margin: ${(props) => props.$margin || '8px 0'};
24
+
25
+ @media print {
26
+ gap: 6px;
27
+ }
28
+ `;
29
+
30
+ const Chip = styled.span`
31
+ display: inline-flex;
32
+ align-items: center;
33
+ padding: ${(props) => {
34
+ if (props.$size === 'xs') return '2px 8px';
35
+ if (props.$size === 'md') return '4px 12px';
36
+ return '3px 10px'; // default sm
37
+ }};
38
+ border-radius: ${(props) =>
39
+ props.theme?.radius?.full || 'var(--resume-radius-full, 999px)'};
40
+ border: 1px solid
41
+ ${(props) =>
42
+ props.theme?.colors?.border || 'var(--resume-color-border, #ddd)'};
43
+ background: transparent;
44
+ font-size: ${(props) => {
45
+ if (props.$size === 'xs') return '8pt';
46
+ if (props.$size === 'md') return '10pt';
47
+ return '9pt'; // default sm
48
+ }};
49
+ font-weight: ${(props) =>
50
+ props.theme?.typography?.weightMedium ||
51
+ 'var(--resume-weight-medium, 500)'};
52
+ color: ${(props) =>
53
+ props.theme?.colors?.secondary || 'var(--resume-color-secondary, #333)'};
54
+ white-space: nowrap;
55
+ line-height: 1.2;
56
+
57
+ @media print {
58
+ border: 1px solid #ccc;
59
+ background: transparent;
60
+ color: #000;
61
+ padding: ${(props) => {
62
+ if (props.$size === 'xs') return '2px 6px';
63
+ if (props.$size === 'md') return '3px 10px';
64
+ return '2px 8px';
65
+ }};
66
+ -webkit-print-color-adjust: exact;
67
+ print-color-adjust: exact;
68
+ }
69
+ `;
70
+
71
+ const Divider = styled.span`
72
+ color: ${(props) =>
73
+ props.theme?.colors?.border || 'var(--resume-color-border, #ddd)'};
74
+ font-size: ${(props) => {
75
+ if (props.$size === 'xs') return '8pt';
76
+ if (props.$size === 'md') return '10pt';
77
+ return '9pt';
78
+ }};
79
+ user-select: none;
80
+
81
+ @media print {
82
+ color: #ccc;
83
+ }
84
+ `;
85
+
86
+ /**
87
+ * Single KPI Chip
88
+ *
89
+ * @param {Object} props
90
+ * @param {React.ReactNode} props.children - The KPI text to display
91
+ * @param {'xs'|'sm'|'md'} [props.size='sm'] - Size variant
92
+ * @param {string} [props.className] - Additional CSS classes
93
+ * @returns {JSX.Element}
94
+ */
95
+ export function KPIChip({ children, size = 'sm', className, ...rest }) {
96
+ return (
97
+ <Chip
98
+ $size={size}
99
+ className={`resume-kpi-chip resume-kpi-${size} ${className || ''}`.trim()}
100
+ {...rest}
101
+ >
102
+ {children}
103
+ </Chip>
104
+ );
105
+ }
106
+
107
+ /**
108
+ * Row of KPI Chips
109
+ *
110
+ * @param {Object} props
111
+ * @param {string[]} [props.kpis] - Array of KPI strings to display as chips
112
+ * @param {React.ReactNode} [props.children] - Alternative: manual KPIChip children
113
+ * @param {'xs'|'sm'|'md'} [props.size='sm'] - Size variant for auto-generated chips
114
+ * @param {string} [props.gap='8px'] - Gap between chips
115
+ * @param {string} [props.margin='8px 0'] - Margin around container
116
+ * @param {boolean} [props.showDividers=false] - Show dividers between chips
117
+ * @param {string} [props.divider='|'] - Divider character
118
+ * @param {string} [props.className] - Additional CSS classes
119
+ * @returns {JSX.Element}
120
+ */
121
+ export function KPIChipLine({
122
+ children,
123
+ kpis,
124
+ size = 'sm',
125
+ gap = '8px',
126
+ margin = '8px 0',
127
+ showDividers = false,
128
+ divider = '|',
129
+ className,
130
+ ...rest
131
+ }) {
132
+ // Support both kpis array (convenience) and children (manual composition)
133
+ const content = kpis
134
+ ? kpis.map((kpi, index) => (
135
+ <React.Fragment key={index}>
136
+ {showDividers && index > 0 && (
137
+ <Divider $size={size} aria-hidden="true">
138
+ {divider}
139
+ </Divider>
140
+ )}
141
+ <KPIChip size={size}>{kpi}</KPIChip>
142
+ </React.Fragment>
143
+ ))
144
+ : children;
145
+
146
+ return (
147
+ <ChipContainer
148
+ $gap={gap}
149
+ $margin={margin}
150
+ className={`resume-kpi-chip-line ${className || ''}`.trim()}
151
+ {...rest}
152
+ >
153
+ {content}
154
+ </ChipContainer>
155
+ );
156
+ }
157
+
158
+ export default KPIChipLine;
@@ -0,0 +1,99 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { KPIChipLine, KPIChip } from './KPIChipLine';
3
+
4
+ const meta: Meta<typeof KPIChipLine> = {
5
+ title: 'Data/KPIChipLine',
6
+ component: KPIChipLine,
7
+ tags: ['autodocs'],
8
+ };
9
+
10
+ export default meta;
11
+ type Story = StoryObj<typeof KPIChipLine>;
12
+
13
+ export const Default: Story = {
14
+ args: {
15
+ kpis: ['95% Uptime', 'NPS 8.5', '200K MAU', '<100ms P95'],
16
+ },
17
+ };
18
+
19
+ export const Sizes: Story = {
20
+ render: () => (
21
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>
22
+ <div>
23
+ <strong>Extra Small:</strong>
24
+ <KPIChipLine kpis={['95% Uptime', 'NPS 8.5', '200K MAU']} size="xs" />
25
+ </div>
26
+ <div>
27
+ <strong>Small (default):</strong>
28
+ <KPIChipLine kpis={['95% Uptime', 'NPS 8.5', '200K MAU']} size="sm" />
29
+ </div>
30
+ <div>
31
+ <strong>Medium:</strong>
32
+ <KPIChipLine kpis={['95% Uptime', 'NPS 8.5', '200K MAU']} size="md" />
33
+ </div>
34
+ </div>
35
+ ),
36
+ };
37
+
38
+ export const WithDividers: Story = {
39
+ args: {
40
+ kpis: ['95% Uptime', 'NPS 8.5', '200K MAU', '<100ms P95'],
41
+ showDividers: true,
42
+ },
43
+ };
44
+
45
+ export const CustomDivider: Story = {
46
+ args: {
47
+ kpis: ['95% Uptime', 'NPS 8.5', '200K MAU', '<100ms P95'],
48
+ showDividers: true,
49
+ divider: '•',
50
+ },
51
+ };
52
+
53
+ export const ManualComposition: Story = {
54
+ render: () => (
55
+ <KPIChipLine>
56
+ <KPIChip>99.9% Uptime</KPIChip>
57
+ <KPIChip>NPS 9.2</KPIChip>
58
+ <KPIChip>500K MAU</KPIChip>
59
+ <KPIChip>&lt;50ms P95</KPIChip>
60
+ <KPIChip>SOC 2 Compliant</KPIChip>
61
+ </KPIChipLine>
62
+ ),
63
+ };
64
+
65
+ export const InContext: Story = {
66
+ render: () => (
67
+ <div>
68
+ <h3>Platform Engineer - Cloud Infrastructure</h3>
69
+ <p>
70
+ Managed critical production infrastructure supporting millions of users.
71
+ </p>
72
+ <KPIChipLine
73
+ kpis={['99.9% Uptime', '<100ms P95', '200K MAU', '$2.5M Saved']}
74
+ margin="12px 0"
75
+ />
76
+ <p>
77
+ Led migration to Kubernetes, implementing automated scaling, monitoring,
78
+ and disaster recovery processes across 3 regions.
79
+ </p>
80
+ </div>
81
+ ),
82
+ };
83
+
84
+ export const TightLayout: Story = {
85
+ args: {
86
+ kpis: [
87
+ 'React',
88
+ 'TypeScript',
89
+ 'Node.js',
90
+ 'PostgreSQL',
91
+ 'AWS',
92
+ 'Docker',
93
+ 'K8s',
94
+ ],
95
+ size: 'xs',
96
+ gap: '4px',
97
+ margin: '4px 0',
98
+ },
99
+ };
@@ -0,0 +1,150 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ /**
5
+ * KeyValueInline Component
6
+ * Comma-separated key:value snippets with no-wrap after colon
7
+ * Ideal for displaying metadata, technologies, or specifications inline
8
+ *
9
+ * @component
10
+ * @example
11
+ * <KeyValueInline pairs={[
12
+ * { key: 'Stack', value: 'React + Node.js' },
13
+ * { key: 'Team', value: '5 engineers' },
14
+ * { key: 'Duration', value: '8 months' }
15
+ * ]} />
16
+ */
17
+
18
+ const Container = styled.span`
19
+ display: inline;
20
+ font-size: ${(props) => {
21
+ if (props.$size === 'xs') return '9pt';
22
+ if (props.$size === 'md') return '11pt';
23
+ return '10pt'; // default sm
24
+ }};
25
+ color: ${(props) =>
26
+ props.theme?.colors?.secondary || 'var(--resume-color-secondary, #333)'};
27
+ line-height: 1.5;
28
+
29
+ @media print {
30
+ color: #333;
31
+ }
32
+ `;
33
+
34
+ const KeyValuePair = styled.span`
35
+ display: inline;
36
+ white-space: normal;
37
+ `;
38
+
39
+ const Key = styled.span`
40
+ font-weight: ${(props) =>
41
+ props.theme?.typography?.weightMedium ||
42
+ 'var(--resume-weight-medium, 500)'};
43
+ color: ${(props) =>
44
+ props.theme?.colors?.primary || 'var(--resume-color-primary, #000)'};
45
+
46
+ @media print {
47
+ font-weight: 500;
48
+ color: #000;
49
+ }
50
+ `;
51
+
52
+ const Colon = styled.span`
53
+ /* Prevent wrap between key and colon */
54
+ white-space: nowrap;
55
+
56
+ &::after {
57
+ content: ':';
58
+ margin-right: 0.25em;
59
+ }
60
+ `;
61
+
62
+ const Value = styled.span`
63
+ /* Prevent wrap immediately after colon */
64
+ display: inline-block;
65
+ color: inherit;
66
+ `;
67
+
68
+ const Separator = styled.span`
69
+ &::before {
70
+ content: ', ';
71
+ white-space: pre;
72
+ }
73
+ `;
74
+
75
+ /**
76
+ * Single Key-Value Pair
77
+ *
78
+ * @param {Object} props
79
+ * @param {string} props.keyLabel - The key/label text
80
+ * @param {string} props.value - The value text
81
+ * @param {string} [props.className] - Additional CSS classes
82
+ * @returns {JSX.Element}
83
+ */
84
+ export function KeyValue({ keyLabel, value, className, ...rest }) {
85
+ if (!keyLabel || !value) return null;
86
+
87
+ return (
88
+ <KeyValuePair
89
+ className={`resume-key-value ${className || ''}`.trim()}
90
+ {...rest}
91
+ >
92
+ <Key>{keyLabel}</Key>
93
+ <Colon />
94
+ <Value>{value}</Value>
95
+ </KeyValuePair>
96
+ );
97
+ }
98
+
99
+ /**
100
+ * Inline list of key-value pairs
101
+ *
102
+ * @param {Object} props
103
+ * @param {Array<{key: string, value: string}>} [props.pairs] - Array of key-value objects
104
+ * @param {React.ReactNode} [props.children] - Alternative: manual KeyValue children
105
+ * @param {'xs'|'sm'|'md'} [props.size='sm'] - Size variant
106
+ * @param {string} [props.separator=', '] - Separator between pairs
107
+ * @param {string} [props.className] - Additional CSS classes
108
+ * @returns {JSX.Element}
109
+ */
110
+ export function KeyValueInline({
111
+ children,
112
+ pairs,
113
+ size = 'sm',
114
+ separator = ', ',
115
+ className,
116
+ ...rest
117
+ }) {
118
+ // Support both pairs array (convenience) and children (manual composition)
119
+ const content = pairs
120
+ ? pairs
121
+ .filter((pair) => pair.key && pair.value)
122
+ .map((pair, index, arr) => (
123
+ <React.Fragment key={index}>
124
+ <KeyValue keyLabel={pair.key} value={pair.value} />
125
+ {index < arr.length - 1 && <Separator aria-hidden="true" />}
126
+ </React.Fragment>
127
+ ))
128
+ : React.Children.toArray(children).map((child, index, arr) => (
129
+ <React.Fragment key={index}>
130
+ {child}
131
+ {index < arr.length - 1 && <Separator aria-hidden="true" />}
132
+ </React.Fragment>
133
+ ));
134
+
135
+ if (!content || (Array.isArray(content) && content.length === 0)) {
136
+ return null;
137
+ }
138
+
139
+ return (
140
+ <Container
141
+ $size={size}
142
+ className={`resume-key-value-inline ${className || ''}`.trim()}
143
+ {...rest}
144
+ >
145
+ {content}
146
+ </Container>
147
+ );
148
+ }
149
+
150
+ export default KeyValueInline;
@@ -0,0 +1,136 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { KeyValueInline, KeyValue } from './KeyValueInline';
3
+
4
+ const meta: Meta<typeof KeyValueInline> = {
5
+ title: 'Data/KeyValueInline',
6
+ component: KeyValueInline,
7
+ tags: ['autodocs'],
8
+ };
9
+
10
+ export default meta;
11
+ type Story = StoryObj<typeof KeyValueInline>;
12
+
13
+ export const Default: Story = {
14
+ args: {
15
+ pairs: [
16
+ { key: 'Stack', value: 'React + Node.js' },
17
+ { key: 'Team', value: '5 engineers' },
18
+ { key: 'Duration', value: '8 months' },
19
+ ],
20
+ },
21
+ };
22
+
23
+ export const Sizes: Story = {
24
+ render: () => (
25
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '12px' }}>
26
+ <div>
27
+ <strong>Extra Small:</strong>
28
+ <br />
29
+ <KeyValueInline
30
+ size="xs"
31
+ pairs={[
32
+ { key: 'Stack', value: 'React + Node.js' },
33
+ { key: 'Team', value: '5 engineers' },
34
+ ]}
35
+ />
36
+ </div>
37
+ <div>
38
+ <strong>Small (default):</strong>
39
+ <br />
40
+ <KeyValueInline
41
+ size="sm"
42
+ pairs={[
43
+ { key: 'Stack', value: 'React + Node.js' },
44
+ { key: 'Team', value: '5 engineers' },
45
+ ]}
46
+ />
47
+ </div>
48
+ <div>
49
+ <strong>Medium:</strong>
50
+ <br />
51
+ <KeyValueInline
52
+ size="md"
53
+ pairs={[
54
+ { key: 'Stack', value: 'React + Node.js' },
55
+ { key: 'Team', value: '5 engineers' },
56
+ ]}
57
+ />
58
+ </div>
59
+ </div>
60
+ ),
61
+ };
62
+
63
+ export const ManualComposition: Story = {
64
+ render: () => (
65
+ <KeyValueInline>
66
+ <KeyValue keyLabel="Technologies" value="React, TypeScript, PostgreSQL" />
67
+ <KeyValue keyLabel="Scale" value="2M+ users" />
68
+ <KeyValue keyLabel="Team" value="12 engineers" />
69
+ </KeyValueInline>
70
+ ),
71
+ };
72
+
73
+ export const InContext: Story = {
74
+ render: () => (
75
+ <div>
76
+ <h3>E-Commerce Platform Redesign</h3>
77
+ <p>
78
+ Led complete redesign of legacy e-commerce platform.{' '}
79
+ <KeyValueInline
80
+ pairs={[
81
+ { key: 'Stack', value: 'React + Node.js + PostgreSQL' },
82
+ { key: 'Team', value: '8 engineers' },
83
+ { key: 'Duration', value: '14 months' },
84
+ { key: 'Impact', value: '40% conversion increase' },
85
+ ]}
86
+ />
87
+ </p>
88
+ <p>
89
+ Implemented microservices architecture with automated testing and
90
+ continuous deployment pipeline.
91
+ </p>
92
+ </div>
93
+ ),
94
+ };
95
+
96
+ export const ProjectMetadata: Story = {
97
+ render: () => (
98
+ <div>
99
+ <h3>Cloud Migration Project</h3>
100
+ <KeyValueInline
101
+ pairs={[
102
+ { key: 'Client', value: 'Fortune 500 Financial Services' },
103
+ { key: 'Duration', value: '18 months' },
104
+ { key: 'Budget', value: '$12M' },
105
+ { key: 'Team Size', value: '25 engineers' },
106
+ { key: 'Cloud Provider', value: 'AWS' },
107
+ { key: 'Regions', value: 'US-East, EU-West, APAC' },
108
+ ]}
109
+ size="xs"
110
+ />
111
+ <p>
112
+ Successfully migrated 200+ applications to cloud infrastructure with
113
+ zero downtime, achieving 99.9% uptime and $4.5M annual cost savings.
114
+ </p>
115
+ </div>
116
+ ),
117
+ };
118
+
119
+ export const TechnicalSpecs: Story = {
120
+ render: () => (
121
+ <div>
122
+ <h3>Distributed Cache System</h3>
123
+ <p>Built high-performance distributed caching layer.</p>
124
+ <KeyValueInline
125
+ pairs={[
126
+ { key: 'Language', value: 'Go' },
127
+ { key: 'Storage', value: 'Redis Cluster' },
128
+ { key: 'Throughput', value: '100K req/sec' },
129
+ { key: 'Latency', value: '<5ms P99' },
130
+ { key: 'Hit Rate', value: '94%' },
131
+ ]}
132
+ size="xs"
133
+ />
134
+ </div>
135
+ ),
136
+ };
@@ -0,0 +1,93 @@
1
+ import React from 'react';
2
+ /**
3
+ * MetricBar
4
+ * Horizontal bar with label and value
5
+ */
6
+ import styled from 'styled-components';
7
+
8
+ const Container = styled.div`
9
+ margin-bottom: var(--resume-space-tight);
10
+ `;
11
+
12
+ const Header = styled.div`
13
+ display: flex;
14
+ justify-content: space-between;
15
+ align-items: baseline;
16
+ margin-bottom: 4px;
17
+ `;
18
+
19
+ const Label = styled.span`
20
+ font-size: var(--resume-size-body);
21
+ color: var(--resume-color-primary);
22
+ font-weight: var(--resume-weight-medium);
23
+ `;
24
+
25
+ const Value = styled.span`
26
+ font-size: var(--resume-size-small);
27
+ color: var(--resume-color-accent);
28
+ font-weight: var(--resume-weight-semibold);
29
+ `;
30
+
31
+ const Bar = styled.div`
32
+ width: 100%;
33
+ height: ${(props) => props.$height || '24px'};
34
+ background-color: var(--resume-color-border);
35
+ border-radius: var(--resume-radius-sm);
36
+ overflow: hidden;
37
+ position: relative;
38
+
39
+ @media print {
40
+ -webkit-print-color-adjust: exact;
41
+ print-color-adjust: exact;
42
+ }
43
+ `;
44
+
45
+ const Fill = styled.div`
46
+ width: ${(props) => props.$percentage}%;
47
+ height: 100%;
48
+ background-color: ${(props) => props.$color || 'var(--resume-color-accent)'};
49
+ display: flex;
50
+ align-items: center;
51
+ padding: 0 8px;
52
+ transition: width 0.3s ease;
53
+
54
+ @media print {
55
+ -webkit-print-color-adjust: exact;
56
+ print-color-adjust: exact;
57
+ }
58
+ `;
59
+
60
+ const InnerLabel = styled.span`
61
+ font-size: var(--resume-size-small);
62
+ color: #ffffff;
63
+ font-weight: var(--resume-weight-medium);
64
+ white-space: nowrap;
65
+ `;
66
+
67
+ export function MetricBar({
68
+ label,
69
+ value,
70
+ max = 100,
71
+ height = '24px',
72
+ color,
73
+ showInnerLabel = false,
74
+ className,
75
+ }) {
76
+ const percentage = (value / max) * 100;
77
+
78
+ return (
79
+ <Container className={className}>
80
+ <Header>
81
+ <Label>{label}</Label>
82
+ <Value>{value}</Value>
83
+ </Header>
84
+ <Bar $height={height}>
85
+ <Fill $percentage={percentage} $color={color}>
86
+ {showInnerLabel && <InnerLabel>{label}</InnerLabel>}
87
+ </Fill>
88
+ </Bar>
89
+ </Container>
90
+ );
91
+ }
92
+
93
+ export default MetricBar;
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ /**
3
+ * MetricBar Stories
4
+ */
5
+ import { MetricBar } from './MetricBar';
6
+
7
+ const meta = {
8
+ title: 'Resume Core/Data/MetricBar',
9
+ component: MetricBar,
10
+ parameters: { layout: 'padded' },
11
+ tags: ['autodocs'],
12
+ };
13
+
14
+ export default meta;
15
+
16
+ export const Default = {
17
+ args: {
18
+ label: 'JavaScript',
19
+ value: 90,
20
+ max: 100,
21
+ },
22
+ };
23
+
24
+ export const Example = {
25
+ args: {
26
+ label: 'React',
27
+ value: 95,
28
+ max: 100,
29
+ color: 'blue',
30
+ },
31
+ };