@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.
- package/README.md +689 -0
- package/dist/resume-print.css +425 -0
- package/dist/tokens.css +139 -0
- package/package.json +66 -0
- package/src/badges/BadgeRowOutline.jsx +118 -0
- package/src/badges/BadgeRowOutline.stories.tsx +160 -0
- package/src/badges/index.jsx +5 -0
- package/src/callouts/Callout.jsx +80 -0
- package/src/callouts/Callout.stories.tsx +27 -0
- package/src/callouts/HighlightCard.jsx +114 -0
- package/src/callouts/HighlightCard.stories.tsx +27 -0
- package/src/callouts/InfoBox.jsx +82 -0
- package/src/callouts/InfoBox.stories.tsx +26 -0
- package/src/callouts/index.jsx +4 -0
- package/src/certifications/AwardCard.jsx +83 -0
- package/src/certifications/AwardCard.stories.tsx +32 -0
- package/src/certifications/CertificationBadge.jsx +85 -0
- package/src/certifications/CertificationBadge.stories.tsx +29 -0
- package/src/certifications/CertificationRow.jsx +150 -0
- package/src/certifications/CertificationRow.stories.tsx +64 -0
- package/src/certifications/HonorsList.jsx +87 -0
- package/src/certifications/HonorsList.stories.tsx +36 -0
- package/src/certifications/index.jsx +5 -0
- package/src/containers/AccentCalloutPanel.jsx +176 -0
- package/src/containers/AccentCalloutPanel.stories.tsx +105 -0
- package/src/containers/MutedPanel.jsx +125 -0
- package/src/containers/MutedPanel.stories.tsx +113 -0
- package/src/containers/RoleBlockFramed.jsx +191 -0
- package/src/containers/RoleBlockFramed.stories.tsx +230 -0
- package/src/containers/SoftCardOutline.jsx +161 -0
- package/src/containers/SoftCardOutline.stories.tsx +174 -0
- package/src/containers/index.jsx +9 -0
- package/src/data/KPIChipLine.jsx +158 -0
- package/src/data/KPIChipLine.stories.tsx +99 -0
- package/src/data/KeyValueInline.jsx +150 -0
- package/src/data/KeyValueInline.stories.tsx +136 -0
- package/src/data/MetricBar.jsx +93 -0
- package/src/data/MetricBar.stories.tsx +31 -0
- package/src/data/MetricBullet.jsx +129 -0
- package/src/data/MetricBullet.stories.tsx +99 -0
- package/src/data/MetricInline.jsx +60 -0
- package/src/data/MetricInline.stories.tsx +53 -0
- package/src/data/ProgressCircle.jsx +81 -0
- package/src/data/ProgressCircle.stories.tsx +102 -0
- package/src/data/StatCard.jsx +65 -0
- package/src/data/StatCard.stories.tsx +29 -0
- package/src/data/index.jsx +12 -0
- package/src/dates/DateBadge.jsx +73 -0
- package/src/dates/DateBadge.stories.tsx +30 -0
- package/src/dates/RelativeDate.jsx +121 -0
- package/src/dates/RelativeDate.stories.tsx +29 -0
- package/src/dates/index.jsx +3 -0
- package/src/experience/ExperienceCard.jsx +82 -0
- package/src/experience/ExperienceCard.stories.tsx +36 -0
- package/src/experience/ExperienceCompact.jsx +72 -0
- package/src/experience/ExperienceCompact.stories.tsx +53 -0
- package/src/experience/ExperienceGrid.jsx +65 -0
- package/src/experience/ExperienceGrid.stories.tsx +63 -0
- package/src/experience/ExperienceTimeline.jsx +24 -0
- package/src/experience/ExperienceTimeline.stories.tsx +63 -0
- package/src/experience/RoleHeaderCompact.jsx +99 -0
- package/src/experience/index.jsx +9 -0
- package/src/header/ContactRowLine.jsx +125 -0
- package/src/header/ContactRowLine.stories.tsx +65 -0
- package/src/header/CornerInitials.jsx +178 -0
- package/src/header/CornerInitials.stories.tsx +129 -0
- package/src/header/Footer.jsx +50 -0
- package/src/header/Footer.stories.tsx +25 -0
- package/src/header/HeaderCentered.jsx +51 -0
- package/src/header/HeaderCentered.stories.tsx +30 -0
- package/src/header/HeaderMinimal.jsx +50 -0
- package/src/header/HeaderMinimal.stories.tsx +29 -0
- package/src/header/HeaderSplit.jsx +65 -0
- package/src/header/HeaderSplit.stories.tsx +29 -0
- package/src/header/HeroNameBlock.jsx +71 -0
- package/src/header/HeroNameBlock.stories.tsx +37 -0
- package/src/header/NameStackElegant.jsx +104 -0
- package/src/header/NameStackElegant.stories.tsx +60 -0
- package/src/header/PageBreak.jsx +25 -0
- package/src/header/PageBreak.stories.tsx +22 -0
- package/src/header/SectionFlagTitle.jsx +87 -0
- package/src/header/SectionFlagTitle.stories.tsx +53 -0
- package/src/header/SectionRuleTitle.jsx +84 -0
- package/src/header/SectionRuleTitle.stories.tsx +52 -0
- package/src/header/index.jsx +18 -0
- package/src/helpers/calculations.js +428 -0
- package/src/index.js +253 -0
- package/src/languages/LanguageBar.jsx +90 -0
- package/src/languages/LanguageBar.stories.tsx +28 -0
- package/src/languages/LanguageGrid.jsx +118 -0
- package/src/languages/LanguageGrid.stories.tsx +33 -0
- package/src/languages/LanguageLevelBarLite.jsx +147 -0
- package/src/languages/LanguageLevelBarLite.stories.tsx +74 -0
- package/src/languages/ProficiencyScale.jsx +107 -0
- package/src/languages/ProficiencyScale.stories.tsx +30 -0
- package/src/languages/index.jsx +5 -0
- package/src/layouts/CardLayout.jsx +46 -0
- package/src/layouts/CardLayout.stories.tsx +272 -0
- package/src/layouts/FlexLayout.jsx +53 -0
- package/src/layouts/FlexLayout.stories.tsx +270 -0
- package/src/layouts/GridLayout.jsx +38 -0
- package/src/layouts/GridLayout.stories.tsx +183 -0
- package/src/layouts/SidebarLayout.jsx +63 -0
- package/src/layouts/SidebarLayout.stories.tsx +162 -0
- package/src/layouts/StackLayout.jsx +26 -0
- package/src/layouts/StackLayout.stories.tsx +192 -0
- package/src/layouts/TwoColumnMicroGrid.jsx +87 -0
- package/src/layouts/TwoColumnMicroGrid.stories.tsx +96 -0
- package/src/layouts/index.jsx +11 -0
- package/src/lists/AchievementListSpacious.jsx +81 -0
- package/src/lists/AchievementListSpacious.stories.tsx +49 -0
- package/src/lists/AchievementListTight.jsx +80 -0
- package/src/lists/AchievementListTight.stories.tsx +49 -0
- package/src/lists/BulletList.jsx +66 -0
- package/src/lists/BulletList.stories.tsx +38 -0
- package/src/lists/CheckList.jsx +94 -0
- package/src/lists/CheckList.stories.tsx +38 -0
- package/src/lists/CompactList.jsx +90 -0
- package/src/lists/CompactList.stories.tsx +34 -0
- package/src/lists/DefinitionKeyline.jsx +114 -0
- package/src/lists/DefinitionKeyline.stories.tsx +90 -0
- package/src/lists/HangingBulletList.jsx +82 -0
- package/src/lists/HangingBulletList.stories.tsx +50 -0
- package/src/lists/IconList.jsx +89 -0
- package/src/lists/IconList.stories.tsx +36 -0
- package/src/lists/ListDashCompact.jsx +69 -0
- package/src/lists/ListDashCompact.stories.tsx +60 -0
- package/src/lists/MiniDotLeaderList.jsx +69 -0
- package/src/lists/MiniDotLeaderList.stories.tsx +73 -0
- package/src/lists/NumberedList.jsx +74 -0
- package/src/lists/NumberedList.stories.tsx +39 -0
- package/src/lists/index.jsx +12 -0
- package/src/metadata/GreyLabelCaps.jsx +66 -0
- package/src/metadata/GreyLabelCaps.stories.tsx +40 -0
- package/src/metadata/InlineKicker.jsx +61 -0
- package/src/metadata/InlineKicker.stories.tsx +35 -0
- package/src/metadata/MetaRow.jsx +96 -0
- package/src/metadata/MetaRow.stories.tsx +38 -0
- package/src/metadata/SmallCapsHeading.jsx +75 -0
- package/src/metadata/SmallCapsHeading.stories.tsx +54 -0
- package/src/metadata/SubsectionLabel.jsx +92 -0
- package/src/metadata/SubsectionLabel.stories.tsx +40 -0
- package/src/metadata/index.jsx +10 -0
- package/src/primitives/AccentSidebarStripe.stories.tsx +65 -0
- package/src/primitives/AccentSidebarStripe.tsx +95 -0
- package/src/primitives/AccentTopRule.stories.tsx +102 -0
- package/src/primitives/AccentTopRule.tsx +103 -0
- package/src/primitives/Badge.jsx +125 -0
- package/src/primitives/Badge.stories.tsx +27 -0
- package/src/primitives/ContactInfo.jsx +133 -0
- package/src/primitives/ContactInfo.stories.tsx +30 -0
- package/src/primitives/DIVIDERS.md +333 -0
- package/src/primitives/DateRange.jsx +178 -0
- package/src/primitives/DateRange.stories.tsx +28 -0
- package/src/primitives/DottedDivider.stories.tsx +54 -0
- package/src/primitives/DottedDivider.tsx +102 -0
- package/src/primitives/InlineSeparatorPipe.jsx +64 -0
- package/src/primitives/InlineSeparatorPipe.stories.tsx +96 -0
- package/src/primitives/KeylineDivider.stories.tsx +48 -0
- package/src/primitives/KeylineDivider.tsx +80 -0
- package/src/primitives/Link.jsx +59 -0
- package/src/primitives/Link.stories.tsx +29 -0
- package/src/primitives/ListItem.jsx +127 -0
- package/src/primitives/ListItem.stories.tsx +27 -0
- package/src/primitives/RulesetStack.stories.tsx +85 -0
- package/src/primitives/RulesetStack.tsx +117 -0
- package/src/primitives/Section.jsx +37 -0
- package/src/primitives/Section.stories.tsx +28 -0
- package/src/primitives/SectionTitle.jsx +62 -0
- package/src/primitives/SectionTitle.stories.tsx +27 -0
- package/src/primitives/index.jsx +36 -0
- package/src/print/ColumnBreak.jsx +44 -0
- package/src/print/ColumnBreak.stories.tsx +22 -0
- package/src/print/KeepTogether.jsx +24 -0
- package/src/print/KeepTogether.stories.tsx +26 -0
- package/src/print/LetterheadBar.jsx +100 -0
- package/src/print/LetterheadBar.stories.tsx +141 -0
- package/src/print/PageFooterLine.jsx +93 -0
- package/src/print/PageFooterLine.stories.tsx +121 -0
- package/src/print/PageHeaderLine.jsx +59 -0
- package/src/print/PageHeaderLine.stories.tsx +108 -0
- package/src/print/PrintOnly.jsx +49 -0
- package/src/print/PrintOnly.stories.tsx +26 -0
- package/src/print/SoftShadowEmulation.jsx +88 -0
- package/src/print/SoftShadowEmulation.stories.tsx +214 -0
- package/src/print/index.jsx +8 -0
- package/src/profile/Avatar.jsx +66 -0
- package/src/profile/Avatar.stories.tsx +84 -0
- package/src/profile/ContactGrid.jsx +63 -0
- package/src/profile/ContactGrid.stories.tsx +33 -0
- package/src/profile/ProfileCard.jsx +73 -0
- package/src/profile/ProfileCard.stories.tsx +35 -0
- package/src/profile/SocialLinks.jsx +61 -0
- package/src/profile/SocialLinks.stories.tsx +33 -0
- package/src/profile/index.jsx +9 -0
- package/src/providers/ThemeProvider.jsx +56 -0
- package/src/providers/ThemeProvider.stories.tsx +149 -0
- package/src/publications/PortfolioGrid.jsx +122 -0
- package/src/publications/PortfolioGrid.stories.tsx +62 -0
- package/src/publications/ProjectCard.jsx +151 -0
- package/src/publications/ProjectCard.stories.tsx +36 -0
- package/src/publications/PublicationEntryPlain.jsx +127 -0
- package/src/publications/PublicationEntryPlain.stories.tsx +58 -0
- package/src/publications/PublicationItem.jsx +120 -0
- package/src/publications/PublicationItem.stories.tsx +32 -0
- package/src/publications/index.jsx +5 -0
- package/src/quotes/BlockQuote.jsx +55 -0
- package/src/quotes/BlockQuote.stories.tsx +33 -0
- package/src/quotes/PullQuote.jsx +70 -0
- package/src/quotes/PullQuote.stories.tsx +32 -0
- package/src/quotes/Testimonial.jsx +99 -0
- package/src/quotes/Testimonial.stories.tsx +36 -0
- package/src/quotes/index.jsx +4 -0
- package/src/skills/SkillBar.jsx +66 -0
- package/src/skills/SkillBar.stories.tsx +112 -0
- package/src/skills/SkillCategory.jsx +71 -0
- package/src/skills/SkillCategory.stories.tsx +197 -0
- package/src/skills/SkillCloud.jsx +53 -0
- package/src/skills/SkillCloud.stories.tsx +132 -0
- package/src/skills/SkillGroup.jsx +56 -0
- package/src/skills/SkillGroup.stories.tsx +162 -0
- package/src/skills/SkillPill.jsx +56 -0
- package/src/skills/SkillPill.stories.tsx +157 -0
- package/src/skills/SkillRating.jsx +60 -0
- package/src/skills/SkillRating.stories.tsx +115 -0
- package/src/skills/index.jsx +11 -0
- package/src/styles/tokens.css +139 -0
- package/src/tables/ComparisonTable.jsx +128 -0
- package/src/tables/ComparisonTable.stories.tsx +41 -0
- package/src/tables/DataTable.jsx +149 -0
- package/src/tables/DataTable.stories.tsx +64 -0
- package/src/tables/SkillMatrix.jsx +139 -0
- package/src/tables/SkillMatrix.stories.tsx +90 -0
- package/src/tables/index.jsx +4 -0
- package/src/tags/ToolTagRibbon.jsx +106 -0
- package/src/tags/ToolTagRibbon.stories.tsx +121 -0
- package/src/tags/index.jsx +5 -0
- package/src/timeline/TimelineInline.stories.tsx +83 -0
- package/src/timeline/TimelineInline.tsx +202 -0
- package/src/timeline/TimelineItem.jsx +106 -0
- package/src/timeline/TimelineItem.stories.tsx +64 -0
- package/src/timeline/TimelineRuleMinimal.stories.tsx +68 -0
- package/src/timeline/TimelineRuleMinimal.tsx +165 -0
- package/src/timeline/TimelineSection.jsx +21 -0
- package/src/timeline/TimelineSection.stories.tsx +44 -0
- package/src/timeline/index.jsx +9 -0
- package/src/tokens/index.js +164 -0
- package/src/typography/Heading.jsx +48 -0
- package/src/typography/Heading.stories.tsx +46 -0
- package/src/typography/HyphenationSafeParagraph.jsx +98 -0
- package/src/typography/HyphenationSafeParagraph.stories.tsx +151 -0
- package/src/typography/Label.jsx +38 -0
- package/src/typography/Label.stories.tsx +27 -0
- package/src/typography/QuoteStripe.jsx +78 -0
- package/src/typography/QuoteStripe.stories.tsx +63 -0
- package/src/typography/SectionIntroParagraph.jsx +62 -0
- package/src/typography/SectionIntroParagraph.stories.tsx +57 -0
- package/src/typography/Text.jsx +42 -0
- package/src/typography/Text.stories.tsx +35 -0
- package/src/typography/index.jsx +11 -0
- package/src/utils/Divider.jsx +32 -0
- package/src/utils/Divider.stories.tsx +24 -0
- package/src/utils/Flex.jsx +6 -0
- package/src/utils/Flex.stories.tsx +28 -0
- package/src/utils/Grid.jsx +6 -0
- package/src/utils/Grid.stories.tsx +28 -0
- package/src/utils/Spacer.jsx +18 -0
- package/src/utils/Spacer.stories.tsx +26 -0
- package/src/utils/index.jsx +9 -0
- package/src/utils/security.js +155 -0
- package/src/visuals/BackgroundPattern.jsx +65 -0
- package/src/visuals/BackgroundPattern.stories.tsx +27 -0
- package/src/visuals/BorderAccent.jsx +147 -0
- package/src/visuals/BorderAccent.stories.tsx +27 -0
- package/src/visuals/ColorBlock.jsx +60 -0
- package/src/visuals/ColorBlock.stories.tsx +27 -0
- package/src/visuals/DividerVariants.jsx +120 -0
- package/src/visuals/DividerVariants.stories.tsx +27 -0
- package/src/visuals/index.jsx +5 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* MetricBullet Component
|
|
6
|
+
* Bullet point with leading bold metric token aligned to tab stop for vertical rhythm
|
|
7
|
+
* Ideal for achievement lists with quantifiable results
|
|
8
|
+
*
|
|
9
|
+
* @component
|
|
10
|
+
* @example
|
|
11
|
+
* <MetricBullet metric="40%">Revenue increase in Q4 2023</MetricBullet>
|
|
12
|
+
* <MetricBullet metric="$2.5M" align="right">Annual cost savings achieved</MetricBullet>
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const BulletContainer = styled.li`
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: baseline;
|
|
18
|
+
margin-bottom: ${(props) => (props.$spacing === 'tight' ? '4px' : '8px')};
|
|
19
|
+
line-height: 1.5;
|
|
20
|
+
list-style: none;
|
|
21
|
+
|
|
22
|
+
@media print {
|
|
23
|
+
page-break-inside: avoid;
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
const Metric = styled.span`
|
|
28
|
+
font-weight: var(--resume-weight-bold, 700);
|
|
29
|
+
color: var(--resume-color-primary, #000);
|
|
30
|
+
min-width: ${(props) => (props.$align === 'right' ? 'auto' : '60px')};
|
|
31
|
+
max-width: ${(props) => (props.$align === 'right' ? '80px' : 'auto')};
|
|
32
|
+
margin-right: ${(props) => (props.$align === 'right' ? '12px' : '0')};
|
|
33
|
+
margin-left: ${(props) => (props.$align === 'right' ? '0' : '12px')};
|
|
34
|
+
text-align: ${(props) => (props.$align === 'right' ? 'right' : 'left')};
|
|
35
|
+
flex-shrink: 0;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
|
|
38
|
+
${(props) =>
|
|
39
|
+
props.$align === 'right'
|
|
40
|
+
? `
|
|
41
|
+
order: -1;
|
|
42
|
+
`
|
|
43
|
+
: ''}
|
|
44
|
+
|
|
45
|
+
@media print {
|
|
46
|
+
font-weight: 700;
|
|
47
|
+
color: #000;
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
const Content = styled.span`
|
|
52
|
+
flex: 1;
|
|
53
|
+
color: var(--resume-color-primary, #000);
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
const Bullet = styled.span`
|
|
57
|
+
margin-right: 8px;
|
|
58
|
+
color: var(--resume-color-accent, #0066cc);
|
|
59
|
+
font-weight: var(--resume-weight-bold, 700);
|
|
60
|
+
|
|
61
|
+
@media print {
|
|
62
|
+
color: #333;
|
|
63
|
+
}
|
|
64
|
+
`;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @param {Object} props
|
|
68
|
+
* @param {string} props.metric - The metric value to display (e.g., "40%", "$2.5M", "12x")
|
|
69
|
+
* @param {React.ReactNode} props.children - The description text
|
|
70
|
+
* @param {'left'|'right'} [props.align='left'] - Metric alignment (left = after bullet, right = before bullet)
|
|
71
|
+
* @param {'normal'|'tight'} [props.spacing='normal'] - Vertical spacing between bullets
|
|
72
|
+
* @param {string} [props.bullet='•'] - Custom bullet character
|
|
73
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
74
|
+
* @returns {JSX.Element}
|
|
75
|
+
*/
|
|
76
|
+
export function MetricBullet({
|
|
77
|
+
metric,
|
|
78
|
+
children,
|
|
79
|
+
align = 'left',
|
|
80
|
+
spacing = 'normal',
|
|
81
|
+
bullet = '•',
|
|
82
|
+
className,
|
|
83
|
+
...rest
|
|
84
|
+
}) {
|
|
85
|
+
if (!metric || !children) return null;
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<BulletContainer
|
|
89
|
+
$spacing={spacing}
|
|
90
|
+
className={`resume-metric-bullet ${className || ''}`.trim()}
|
|
91
|
+
{...rest}
|
|
92
|
+
>
|
|
93
|
+
{align === 'left' && <Bullet>{bullet}</Bullet>}
|
|
94
|
+
<Metric $align={align}>{metric}</Metric>
|
|
95
|
+
{align === 'right' && <Bullet>{bullet}</Bullet>}
|
|
96
|
+
<Content>{children}</Content>
|
|
97
|
+
</BulletContainer>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* MetricBulletList Component
|
|
103
|
+
* Container for multiple metric bullets
|
|
104
|
+
*
|
|
105
|
+
* @component
|
|
106
|
+
* @example
|
|
107
|
+
* <MetricBulletList>
|
|
108
|
+
* <MetricBullet metric="40%">Revenue increase</MetricBullet>
|
|
109
|
+
* <MetricBullet metric="$2.5M">Cost savings</MetricBullet>
|
|
110
|
+
* </MetricBulletList>
|
|
111
|
+
*/
|
|
112
|
+
const ListContainer = styled.ul`
|
|
113
|
+
margin: 8px 0;
|
|
114
|
+
padding-left: 0;
|
|
115
|
+
list-style: none;
|
|
116
|
+
`;
|
|
117
|
+
|
|
118
|
+
export function MetricBulletList({ children, className, ...rest }) {
|
|
119
|
+
return (
|
|
120
|
+
<ListContainer
|
|
121
|
+
className={`resume-metric-bullet-list ${className || ''}`.trim()}
|
|
122
|
+
{...rest}
|
|
123
|
+
>
|
|
124
|
+
{children}
|
|
125
|
+
</ListContainer>
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export default MetricBullet;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MetricBullet, MetricBulletList } from './MetricBullet';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof MetricBullet> = {
|
|
5
|
+
title: 'Data/MetricBullet',
|
|
6
|
+
component: MetricBullet,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof MetricBullet>;
|
|
12
|
+
|
|
13
|
+
export const Default: Story = {
|
|
14
|
+
render: () => (
|
|
15
|
+
<MetricBulletList>
|
|
16
|
+
<MetricBullet metric="40%">Revenue increase in Q4 2023</MetricBullet>
|
|
17
|
+
<MetricBullet metric="$2.5M">Annual cost savings achieved</MetricBullet>
|
|
18
|
+
<MetricBullet metric="3x">
|
|
19
|
+
Performance improvement over baseline
|
|
20
|
+
</MetricBullet>
|
|
21
|
+
</MetricBulletList>
|
|
22
|
+
),
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const RightAligned: Story = {
|
|
26
|
+
render: () => (
|
|
27
|
+
<MetricBulletList>
|
|
28
|
+
<MetricBullet metric="40%" align="right">
|
|
29
|
+
Revenue increase in Q4 2023
|
|
30
|
+
</MetricBullet>
|
|
31
|
+
<MetricBullet metric="$2.5M" align="right">
|
|
32
|
+
Annual cost savings achieved
|
|
33
|
+
</MetricBullet>
|
|
34
|
+
<MetricBullet metric="3x" align="right">
|
|
35
|
+
Performance improvement over baseline
|
|
36
|
+
</MetricBullet>
|
|
37
|
+
</MetricBulletList>
|
|
38
|
+
),
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const TightSpacing: Story = {
|
|
42
|
+
render: () => (
|
|
43
|
+
<MetricBulletList>
|
|
44
|
+
<MetricBullet metric="99.9%" spacing="tight">
|
|
45
|
+
System uptime maintained
|
|
46
|
+
</MetricBullet>
|
|
47
|
+
<MetricBullet metric="<100ms" spacing="tight">
|
|
48
|
+
P95 latency achieved
|
|
49
|
+
</MetricBullet>
|
|
50
|
+
<MetricBullet metric="200K" spacing="tight">
|
|
51
|
+
Monthly active users reached
|
|
52
|
+
</MetricBullet>
|
|
53
|
+
<MetricBullet metric="NPS 8.5" spacing="tight">
|
|
54
|
+
Customer satisfaction score
|
|
55
|
+
</MetricBullet>
|
|
56
|
+
</MetricBulletList>
|
|
57
|
+
),
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const CustomBullet: Story = {
|
|
61
|
+
render: () => (
|
|
62
|
+
<MetricBulletList>
|
|
63
|
+
<MetricBullet metric="40%" bullet="✓">
|
|
64
|
+
Revenue increase achieved
|
|
65
|
+
</MetricBullet>
|
|
66
|
+
<MetricBullet metric="$2.5M" bullet="✓">
|
|
67
|
+
Cost savings realized
|
|
68
|
+
</MetricBullet>
|
|
69
|
+
<MetricBullet metric="15" bullet="→">
|
|
70
|
+
Team members led
|
|
71
|
+
</MetricBullet>
|
|
72
|
+
</MetricBulletList>
|
|
73
|
+
),
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export const InContext: Story = {
|
|
77
|
+
render: () => (
|
|
78
|
+
<div>
|
|
79
|
+
<h3>Senior Software Engineer - Acme Corp</h3>
|
|
80
|
+
<p>
|
|
81
|
+
Led development of microservices platform serving enterprise clients.
|
|
82
|
+
</p>
|
|
83
|
+
<MetricBulletList>
|
|
84
|
+
<MetricBullet metric="85%">
|
|
85
|
+
Reduced API response time by optimizing database queries
|
|
86
|
+
</MetricBullet>
|
|
87
|
+
<MetricBullet metric="$4.2M">
|
|
88
|
+
Annual infrastructure cost savings through cloud optimization
|
|
89
|
+
</MetricBullet>
|
|
90
|
+
<MetricBullet metric="15">
|
|
91
|
+
Engineers mentored across 3 cross-functional teams
|
|
92
|
+
</MetricBullet>
|
|
93
|
+
<MetricBullet metric="2M+">
|
|
94
|
+
Daily active users supported by platform
|
|
95
|
+
</MetricBullet>
|
|
96
|
+
</MetricBulletList>
|
|
97
|
+
</div>
|
|
98
|
+
),
|
|
99
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* MetricInline Component
|
|
6
|
+
* Bold inline numerics styled consistently for embedding within text
|
|
7
|
+
* Uses font weight instead of color for accessibility and print compatibility
|
|
8
|
+
*
|
|
9
|
+
* @component
|
|
10
|
+
* @example
|
|
11
|
+
* <p>Increased revenue by <MetricInline>40%</MetricInline> year over year</p>
|
|
12
|
+
* <p>Led team of <MetricInline size="lg">12</MetricInline> engineers</p>
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const StyledMetric = styled.strong`
|
|
16
|
+
font-weight: ${(props) => {
|
|
17
|
+
if (props.$size === 'sm') return 'var(--resume-weight-semibold, 600)';
|
|
18
|
+
if (props.$size === 'lg') return 'var(--resume-weight-extrabold, 800)';
|
|
19
|
+
return 'var(--resume-weight-bold, 700)'; // default md
|
|
20
|
+
}};
|
|
21
|
+
font-size: ${(props) => {
|
|
22
|
+
if (props.$size === 'sm') return '0.95em';
|
|
23
|
+
if (props.$size === 'lg') return '1.1em';
|
|
24
|
+
return '1em'; // default md
|
|
25
|
+
}};
|
|
26
|
+
color: inherit;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
|
|
29
|
+
@media print {
|
|
30
|
+
font-weight: ${(props) => {
|
|
31
|
+
if (props.$size === 'sm') return '600';
|
|
32
|
+
if (props.$size === 'lg') return '800';
|
|
33
|
+
return '700';
|
|
34
|
+
}};
|
|
35
|
+
color: inherit;
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @param {Object} props
|
|
41
|
+
* @param {React.ReactNode} props.children - The metric value to display
|
|
42
|
+
* @param {'sm'|'md'|'lg'} [props.size='md'] - Size variant (affects font weight and size)
|
|
43
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
44
|
+
* @returns {JSX.Element}
|
|
45
|
+
*/
|
|
46
|
+
export function MetricInline({ children, size = 'md', className, ...rest }) {
|
|
47
|
+
return (
|
|
48
|
+
<StyledMetric
|
|
49
|
+
$size={size}
|
|
50
|
+
className={`resume-metric-inline resume-metric-${size} ${
|
|
51
|
+
className || ''
|
|
52
|
+
}`.trim()}
|
|
53
|
+
{...rest}
|
|
54
|
+
>
|
|
55
|
+
{children}
|
|
56
|
+
</StyledMetric>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export default MetricInline;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MetricInline } from './MetricInline';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof MetricInline> = {
|
|
5
|
+
title: 'Data/MetricInline',
|
|
6
|
+
component: MetricInline,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof MetricInline>;
|
|
12
|
+
|
|
13
|
+
export const Default: Story = {
|
|
14
|
+
render: () => (
|
|
15
|
+
<p>
|
|
16
|
+
Increased revenue by <MetricInline>40%</MetricInline> year over year while
|
|
17
|
+
reducing costs by <MetricInline>$2.5M</MetricInline> annually.
|
|
18
|
+
</p>
|
|
19
|
+
),
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const Sizes: Story = {
|
|
23
|
+
render: () => (
|
|
24
|
+
<div>
|
|
25
|
+
<p>
|
|
26
|
+
Small: Led team of <MetricInline size="sm">12</MetricInline> engineers
|
|
27
|
+
</p>
|
|
28
|
+
<p>
|
|
29
|
+
Medium (default): Improved performance by{' '}
|
|
30
|
+
<MetricInline>3x</MetricInline>
|
|
31
|
+
</p>
|
|
32
|
+
<p>
|
|
33
|
+
Large: Achieved <MetricInline size="lg">99.9%</MetricInline> uptime
|
|
34
|
+
</p>
|
|
35
|
+
</div>
|
|
36
|
+
),
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const InContext: Story = {
|
|
40
|
+
render: () => (
|
|
41
|
+
<div>
|
|
42
|
+
<h3>Senior Software Engineer</h3>
|
|
43
|
+
<p>
|
|
44
|
+
Led a cross-functional team of <MetricInline>15</MetricInline> engineers
|
|
45
|
+
to deliver a cloud-native platform serving{' '}
|
|
46
|
+
<MetricInline>2M+</MetricInline> daily active users. Improved API
|
|
47
|
+
response time by <MetricInline>85%</MetricInline> and reduced
|
|
48
|
+
infrastructure costs by <MetricInline size="lg">$4.2M</MetricInline>{' '}
|
|
49
|
+
annually.
|
|
50
|
+
</p>
|
|
51
|
+
</div>
|
|
52
|
+
),
|
|
53
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* ProgressCircle
|
|
4
|
+
* Circular progress indicator
|
|
5
|
+
*/
|
|
6
|
+
import styled from 'styled-components';
|
|
7
|
+
|
|
8
|
+
const Container = styled.div`
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: 4px;
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
const Circle = styled.svg`
|
|
16
|
+
transform: rotate(-90deg);
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
const Label = styled.span`
|
|
20
|
+
font-size: var(--resume-size-small);
|
|
21
|
+
color: var(--resume-color-secondary);
|
|
22
|
+
font-weight: var(--resume-weight-medium);
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
export function ProgressCircle({
|
|
26
|
+
value = 0,
|
|
27
|
+
max = 100,
|
|
28
|
+
size = 60,
|
|
29
|
+
strokeWidth = 6,
|
|
30
|
+
color = 'var(--resume-color-accent)',
|
|
31
|
+
label,
|
|
32
|
+
showValue = false,
|
|
33
|
+
className,
|
|
34
|
+
}) {
|
|
35
|
+
const radius = (size - strokeWidth) / 2;
|
|
36
|
+
const circumference = radius * 2 * Math.PI;
|
|
37
|
+
const progress = (value / max) * 100;
|
|
38
|
+
const strokeDashoffset = circumference - (progress / 100) * circumference;
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<Container className={className}>
|
|
42
|
+
<Circle width={size} height={size}>
|
|
43
|
+
<circle
|
|
44
|
+
cx={size / 2}
|
|
45
|
+
cy={size / 2}
|
|
46
|
+
r={radius}
|
|
47
|
+
fill="none"
|
|
48
|
+
stroke="var(--resume-color-border)"
|
|
49
|
+
strokeWidth={strokeWidth}
|
|
50
|
+
/>
|
|
51
|
+
<circle
|
|
52
|
+
cx={size / 2}
|
|
53
|
+
cy={size / 2}
|
|
54
|
+
r={radius}
|
|
55
|
+
fill="none"
|
|
56
|
+
stroke={color}
|
|
57
|
+
strokeWidth={strokeWidth}
|
|
58
|
+
strokeDasharray={circumference}
|
|
59
|
+
strokeDashoffset={strokeDashoffset}
|
|
60
|
+
strokeLinecap="round"
|
|
61
|
+
/>
|
|
62
|
+
{showValue && (
|
|
63
|
+
<text
|
|
64
|
+
x="50%"
|
|
65
|
+
y="50%"
|
|
66
|
+
textAnchor="middle"
|
|
67
|
+
dy="0.3em"
|
|
68
|
+
fontSize={size / 4}
|
|
69
|
+
fill="var(--resume-color-primary)"
|
|
70
|
+
transform={`rotate(90 ${size / 2} ${size / 2})`}
|
|
71
|
+
>
|
|
72
|
+
{Math.round(progress)}%
|
|
73
|
+
</text>
|
|
74
|
+
)}
|
|
75
|
+
</Circle>
|
|
76
|
+
{label && <Label>{label}</Label>}
|
|
77
|
+
</Container>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export default ProgressCircle;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* ProgressCircle Stories
|
|
4
|
+
*/
|
|
5
|
+
import { ProgressCircle } from './ProgressCircle';
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Resume Core/Data/ProgressCircle',
|
|
9
|
+
component: ProgressCircle,
|
|
10
|
+
parameters: { layout: 'padded' },
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
argTypes: {
|
|
13
|
+
value: { control: { type: 'range', min: 0, max: 100, step: 5 } },
|
|
14
|
+
size: { control: { type: 'range', min: 40, max: 150, step: 10 } },
|
|
15
|
+
strokeWidth: { control: { type: 'range', min: 2, max: 12, step: 1 } },
|
|
16
|
+
color: { control: 'color' },
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default meta;
|
|
21
|
+
|
|
22
|
+
export const Default = {
|
|
23
|
+
args: {
|
|
24
|
+
value: 75,
|
|
25
|
+
max: 100,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const WithValue = {
|
|
30
|
+
args: {
|
|
31
|
+
value: 85,
|
|
32
|
+
max: 100,
|
|
33
|
+
label: 'JavaScript',
|
|
34
|
+
showValue: true,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const CustomColor = {
|
|
39
|
+
args: {
|
|
40
|
+
value: 90,
|
|
41
|
+
max: 100,
|
|
42
|
+
color: '#28a745',
|
|
43
|
+
label: 'React',
|
|
44
|
+
showValue: true,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const Large = {
|
|
49
|
+
args: {
|
|
50
|
+
value: 70,
|
|
51
|
+
max: 100,
|
|
52
|
+
size: 120,
|
|
53
|
+
strokeWidth: 10,
|
|
54
|
+
label: 'TypeScript',
|
|
55
|
+
showValue: true,
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const Small = {
|
|
60
|
+
args: {
|
|
61
|
+
value: 80,
|
|
62
|
+
max: 100,
|
|
63
|
+
size: 50,
|
|
64
|
+
strokeWidth: 4,
|
|
65
|
+
label: 'Node.js',
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const SkillProficiency = {
|
|
70
|
+
render: () => (
|
|
71
|
+
<div style={{ display: 'flex', gap: '2rem', flexWrap: 'wrap' }}>
|
|
72
|
+
<ProgressCircle value={95} label="Expert" showValue color="#28a745" />
|
|
73
|
+
<ProgressCircle value={80} label="Advanced" showValue color="#007bff" />
|
|
74
|
+
<ProgressCircle
|
|
75
|
+
value={60}
|
|
76
|
+
label="Intermediate"
|
|
77
|
+
showValue
|
|
78
|
+
color="#ffc107"
|
|
79
|
+
/>
|
|
80
|
+
<ProgressCircle value={30} label="Beginner" showValue color="#dc3545" />
|
|
81
|
+
</div>
|
|
82
|
+
),
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const TechnologyStack = {
|
|
86
|
+
render: () => (
|
|
87
|
+
<div
|
|
88
|
+
style={{
|
|
89
|
+
display: 'grid',
|
|
90
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(80px, 1fr))',
|
|
91
|
+
gap: '1.5rem',
|
|
92
|
+
}}
|
|
93
|
+
>
|
|
94
|
+
<ProgressCircle value={90} label="JavaScript" showValue />
|
|
95
|
+
<ProgressCircle value={85} label="React" showValue color="#61dafb" />
|
|
96
|
+
<ProgressCircle value={80} label="TypeScript" showValue color="#3178c6" />
|
|
97
|
+
<ProgressCircle value={75} label="Node.js" showValue color="#339933" />
|
|
98
|
+
<ProgressCircle value={70} label="Python" showValue color="#3776ab" />
|
|
99
|
+
<ProgressCircle value={65} label="Docker" showValue color="#2496ed" />
|
|
100
|
+
</div>
|
|
101
|
+
),
|
|
102
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* StatCard
|
|
4
|
+
* Card displaying a statistic or metric
|
|
5
|
+
*/
|
|
6
|
+
import styled from 'styled-components';
|
|
7
|
+
|
|
8
|
+
const Card = styled.div`
|
|
9
|
+
padding: var(--resume-space-item);
|
|
10
|
+
background-color: var(--resume-color-background);
|
|
11
|
+
border: 1px solid var(--resume-color-border);
|
|
12
|
+
border-radius: var(--resume-radius-md);
|
|
13
|
+
text-align: ${(props) => props.$align || 'left'};
|
|
14
|
+
|
|
15
|
+
@media print {
|
|
16
|
+
border: 1px solid var(--resume-color-border);
|
|
17
|
+
break-inside: avoid;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
const Value = styled.div`
|
|
22
|
+
font-size: ${(props) => props.$size || 'var(--resume-size-name)'};
|
|
23
|
+
font-weight: var(--resume-weight-bold);
|
|
24
|
+
color: ${(props) => props.$color || 'var(--resume-color-accent)'};
|
|
25
|
+
line-height: 1;
|
|
26
|
+
margin-bottom: 4px;
|
|
27
|
+
|
|
28
|
+
@media print {
|
|
29
|
+
-webkit-print-color-adjust: exact;
|
|
30
|
+
print-color-adjust: exact;
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
|
|
34
|
+
const Label = styled.div`
|
|
35
|
+
font-size: var(--resume-size-body);
|
|
36
|
+
color: var(--resume-color-secondary);
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
const Description = styled.div`
|
|
40
|
+
font-size: var(--resume-size-small);
|
|
41
|
+
color: var(--resume-color-secondary);
|
|
42
|
+
margin-top: 4px;
|
|
43
|
+
`;
|
|
44
|
+
|
|
45
|
+
export function StatCard({
|
|
46
|
+
value,
|
|
47
|
+
label,
|
|
48
|
+
description,
|
|
49
|
+
valueSize,
|
|
50
|
+
valueColor,
|
|
51
|
+
align = 'left',
|
|
52
|
+
className,
|
|
53
|
+
}) {
|
|
54
|
+
return (
|
|
55
|
+
<Card $align={align} className={className}>
|
|
56
|
+
<Value $size={valueSize} $color={valueColor}>
|
|
57
|
+
{value}
|
|
58
|
+
</Value>
|
|
59
|
+
{label && <Label>{label}</Label>}
|
|
60
|
+
{description && <Description>{description}</Description>}
|
|
61
|
+
</Card>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export default StatCard;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* StatCard Stories
|
|
4
|
+
*/
|
|
5
|
+
import { StatCard } from './StatCard';
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Resume Core/Data/StatCard',
|
|
9
|
+
component: StatCard,
|
|
10
|
+
parameters: { layout: 'padded' },
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
value: '8+',
|
|
19
|
+
label: 'Years Experience',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const Example = {
|
|
24
|
+
args: {
|
|
25
|
+
value: '15+',
|
|
26
|
+
label: 'Projects Completed',
|
|
27
|
+
icon: '🚀',
|
|
28
|
+
},
|
|
29
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Data Display Components
|
|
4
|
+
* Export all data visualization components
|
|
5
|
+
*/
|
|
6
|
+
export { ProgressCircle } from './ProgressCircle.jsx';
|
|
7
|
+
export { StatCard } from './StatCard.jsx';
|
|
8
|
+
export { MetricBar } from './MetricBar.jsx';
|
|
9
|
+
export { MetricInline } from './MetricInline.jsx';
|
|
10
|
+
export { MetricBullet, MetricBulletList } from './MetricBullet.jsx';
|
|
11
|
+
export { KPIChipLine, KPIChip } from './KPIChipLine.jsx';
|
|
12
|
+
export { KeyValueInline, KeyValue } from './KeyValueInline.jsx';
|