@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,106 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* ToolTagRibbon Component
|
|
6
|
+
* Thin ribbon of tool/stack tags with wrapping support
|
|
7
|
+
*
|
|
8
|
+
* Displays technology tags in a compact, horizontal ribbon layout that wraps
|
|
9
|
+
* naturally. Preserves baseline grid alignment for ATS compatibility.
|
|
10
|
+
* Text-only design without icons for maximum parsability.
|
|
11
|
+
*
|
|
12
|
+
* @component
|
|
13
|
+
* @example
|
|
14
|
+
* <ToolTagRibbon tags={['React', 'TypeScript', 'Node.js', 'PostgreSQL']} />
|
|
15
|
+
* <ToolTagRibbon tags={skills} separator="•" size="small" />
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const RibbonContainer = styled.div`
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-wrap: wrap;
|
|
21
|
+
align-items: baseline;
|
|
22
|
+
gap: ${(props) => (props.$size === 'small' ? '6px' : '8px')};
|
|
23
|
+
margin: ${(props) => (props.$size === 'small' ? '4px 0' : '6px 0')};
|
|
24
|
+
line-height: ${(props) =>
|
|
25
|
+
props.theme?.typography?.lineHeight || 'var(--resume-line-height, 1.5)'};
|
|
26
|
+
|
|
27
|
+
@media print {
|
|
28
|
+
gap: ${(props) => (props.$size === 'small' ? '4px' : '6px')};
|
|
29
|
+
margin: 3pt 0;
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
const Tag = styled.span`
|
|
34
|
+
display: inline-block;
|
|
35
|
+
font-size: ${(props) => {
|
|
36
|
+
if (props.$size === 'small') return '8.5pt';
|
|
37
|
+
if (props.$size === 'large') return '10.5pt';
|
|
38
|
+
return '9.5pt'; // default medium
|
|
39
|
+
}};
|
|
40
|
+
font-weight: 500;
|
|
41
|
+
color: ${(props) =>
|
|
42
|
+
props.theme?.colors?.secondary || 'var(--resume-color-secondary, #444444)'};
|
|
43
|
+
white-space: nowrap;
|
|
44
|
+
|
|
45
|
+
/* Preserve baseline grid */
|
|
46
|
+
vertical-align: baseline;
|
|
47
|
+
|
|
48
|
+
@media print {
|
|
49
|
+
color: #444444;
|
|
50
|
+
font-size: ${(props) => {
|
|
51
|
+
if (props.$size === 'small') return '8pt';
|
|
52
|
+
if (props.$size === 'large') return '10pt';
|
|
53
|
+
return '9pt';
|
|
54
|
+
}};
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
|
|
58
|
+
const Separator = styled.span`
|
|
59
|
+
display: inline-block;
|
|
60
|
+
font-size: ${(props) => {
|
|
61
|
+
if (props.$size === 'small') return '8.5pt';
|
|
62
|
+
if (props.$size === 'large') return '10.5pt';
|
|
63
|
+
return '9.5pt';
|
|
64
|
+
}};
|
|
65
|
+
color: ${(props) =>
|
|
66
|
+
props.theme?.colors?.border || 'var(--resume-color-border, #cccccc)'};
|
|
67
|
+
user-select: none;
|
|
68
|
+
vertical-align: baseline;
|
|
69
|
+
|
|
70
|
+
@media print {
|
|
71
|
+
color: #cccccc;
|
|
72
|
+
}
|
|
73
|
+
`;
|
|
74
|
+
|
|
75
|
+
export function ToolTagRibbon({
|
|
76
|
+
tags = [],
|
|
77
|
+
separator = '·',
|
|
78
|
+
size = 'medium',
|
|
79
|
+
className,
|
|
80
|
+
...rest
|
|
81
|
+
}) {
|
|
82
|
+
if (!tags || tags.length === 0) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<RibbonContainer
|
|
88
|
+
$size={size}
|
|
89
|
+
className={`resume-tool-tag-ribbon ${className || ''}`.trim()}
|
|
90
|
+
{...rest}
|
|
91
|
+
>
|
|
92
|
+
{tags.map((tag, index) => (
|
|
93
|
+
<React.Fragment key={index}>
|
|
94
|
+
<Tag $size={size}>{tag}</Tag>
|
|
95
|
+
{index < tags.length - 1 && separator && (
|
|
96
|
+
<Separator $size={size} aria-hidden="true">
|
|
97
|
+
{separator}
|
|
98
|
+
</Separator>
|
|
99
|
+
)}
|
|
100
|
+
</React.Fragment>
|
|
101
|
+
))}
|
|
102
|
+
</RibbonContainer>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export default ToolTagRibbon;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ToolTagRibbon } from './ToolTagRibbon';
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Tags/ToolTagRibbon',
|
|
6
|
+
component: ToolTagRibbon,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'padded',
|
|
9
|
+
},
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
} satisfies Meta<typeof ToolTagRibbon>;
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryObj<typeof meta>;
|
|
15
|
+
|
|
16
|
+
const frontendStack = [
|
|
17
|
+
'React',
|
|
18
|
+
'TypeScript',
|
|
19
|
+
'Next.js',
|
|
20
|
+
'Tailwind CSS',
|
|
21
|
+
'styled-components',
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
const backendStack = [
|
|
25
|
+
'Node.js',
|
|
26
|
+
'Express',
|
|
27
|
+
'PostgreSQL',
|
|
28
|
+
'Redis',
|
|
29
|
+
'MongoDB',
|
|
30
|
+
'GraphQL',
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const fullStack = [
|
|
34
|
+
'JavaScript',
|
|
35
|
+
'TypeScript',
|
|
36
|
+
'React',
|
|
37
|
+
'Node.js',
|
|
38
|
+
'PostgreSQL',
|
|
39
|
+
'Docker',
|
|
40
|
+
'AWS',
|
|
41
|
+
'Git',
|
|
42
|
+
'REST APIs',
|
|
43
|
+
'GraphQL',
|
|
44
|
+
'Redis',
|
|
45
|
+
'MongoDB',
|
|
46
|
+
'Kubernetes',
|
|
47
|
+
'CI/CD',
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
export const Default: Story = {
|
|
51
|
+
args: {
|
|
52
|
+
tags: frontendStack,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const WithDotSeparator: Story = {
|
|
57
|
+
args: {
|
|
58
|
+
tags: frontendStack,
|
|
59
|
+
separator: '•',
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const WithSlashSeparator: Story = {
|
|
64
|
+
args: {
|
|
65
|
+
tags: backendStack,
|
|
66
|
+
separator: '/',
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const NoSeparator: Story = {
|
|
71
|
+
args: {
|
|
72
|
+
tags: frontendStack,
|
|
73
|
+
separator: '',
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const SmallSize: Story = {
|
|
78
|
+
args: {
|
|
79
|
+
tags: frontendStack,
|
|
80
|
+
size: 'small',
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export const LargeSize: Story = {
|
|
85
|
+
args: {
|
|
86
|
+
tags: frontendStack,
|
|
87
|
+
size: 'large',
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export const ManyTags: Story = {
|
|
92
|
+
args: {
|
|
93
|
+
tags: fullStack,
|
|
94
|
+
},
|
|
95
|
+
parameters: {
|
|
96
|
+
docs: {
|
|
97
|
+
description: {
|
|
98
|
+
story: 'Demonstrates wrapping behavior with many tags',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export const SingleTag: Story = {
|
|
105
|
+
args: {
|
|
106
|
+
tags: ['React'],
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export const EmptyTags: Story = {
|
|
111
|
+
args: {
|
|
112
|
+
tags: [],
|
|
113
|
+
},
|
|
114
|
+
parameters: {
|
|
115
|
+
docs: {
|
|
116
|
+
description: {
|
|
117
|
+
story: 'Component returns null when no tags are provided',
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TimelineInline } from './TimelineInline';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Timeline/TimelineInline',
|
|
6
|
+
component: TimelineInline,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
startDate: '2020-01-15',
|
|
13
|
+
endDate: '2022-03-30',
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const OngoingPosition = {
|
|
18
|
+
args: {
|
|
19
|
+
startDate: '2022-03-01',
|
|
20
|
+
endDate: null,
|
|
21
|
+
presentLabel: 'Present',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const LongFormat = {
|
|
26
|
+
args: {
|
|
27
|
+
startDate: '2020-01-15',
|
|
28
|
+
endDate: '2022-03-30',
|
|
29
|
+
format: 'long',
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const NumericFormat = {
|
|
34
|
+
args: {
|
|
35
|
+
startDate: '2020-01-15',
|
|
36
|
+
endDate: '2022-03-30',
|
|
37
|
+
format: 'numeric',
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const FrenchLocale = {
|
|
42
|
+
args: {
|
|
43
|
+
startDate: '2020-01-15',
|
|
44
|
+
endDate: null,
|
|
45
|
+
locale: 'fr-FR',
|
|
46
|
+
format: 'long',
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const SpanishLocale = {
|
|
51
|
+
args: {
|
|
52
|
+
startDate: '2020-01-15',
|
|
53
|
+
endDate: '2022-03-30',
|
|
54
|
+
locale: 'es-ES',
|
|
55
|
+
format: 'long',
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const ArabicLocale = {
|
|
60
|
+
args: {
|
|
61
|
+
startDate: '2020-01-15',
|
|
62
|
+
endDate: '2022-03-30',
|
|
63
|
+
locale: 'ar-SA',
|
|
64
|
+
numberingSystem: 'arab',
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const JapaneseLocale = {
|
|
69
|
+
args: {
|
|
70
|
+
startDate: '2020-01-15',
|
|
71
|
+
endDate: null,
|
|
72
|
+
locale: 'ja-JP',
|
|
73
|
+
format: 'long',
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const WithHyphen = {
|
|
78
|
+
args: {
|
|
79
|
+
startDate: '2020-01-15',
|
|
80
|
+
endDate: '2022-03-30',
|
|
81
|
+
useEnDash: false,
|
|
82
|
+
},
|
|
83
|
+
};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* TimelineInline Component
|
|
6
|
+
* Dates rendered inline with connector dash for compact timeline display
|
|
7
|
+
* Uses en dash (–) with narrow no-break spaces for proper typography
|
|
8
|
+
*
|
|
9
|
+
* @component
|
|
10
|
+
* @example
|
|
11
|
+
* <TimelineInline
|
|
12
|
+
* startDate="2020-01"
|
|
13
|
+
* endDate="2022-03"
|
|
14
|
+
* />
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Ongoing position (no end date)
|
|
18
|
+
* <TimelineInline
|
|
19
|
+
* startDate="2022-03"
|
|
20
|
+
* endDate={null}
|
|
21
|
+
* presentLabel="Present"
|
|
22
|
+
* />
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // With custom locale
|
|
26
|
+
* <TimelineInline
|
|
27
|
+
* startDate="2020-01-15"
|
|
28
|
+
* endDate="2022-03-30"
|
|
29
|
+
* locale="fr-FR"
|
|
30
|
+
* format="long"
|
|
31
|
+
* />
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
interface TimelineInlineProps {
|
|
35
|
+
/** Start date (ISO string or Date object) */
|
|
36
|
+
startDate: string | Date;
|
|
37
|
+
/** End date (ISO string, Date object, or null for "Present") */
|
|
38
|
+
endDate?: string | Date | null;
|
|
39
|
+
/** Date format style: 'short' (default), 'long', 'numeric' */
|
|
40
|
+
format?: 'short' | 'long' | 'numeric';
|
|
41
|
+
/** BCP 47 locale (e.g., 'en-US', 'fr-FR', 'ar-SA') */
|
|
42
|
+
locale?: string;
|
|
43
|
+
/** Custom label for present/ongoing positions */
|
|
44
|
+
presentLabel?: string;
|
|
45
|
+
/** Numbering system (e.g., 'arab', 'latn', 'hanidec') */
|
|
46
|
+
numberingSystem?: string;
|
|
47
|
+
/** Use en dash (–) instead of hyphen (-) for separator */
|
|
48
|
+
useEnDash?: boolean;
|
|
49
|
+
/** Additional CSS class name */
|
|
50
|
+
className?: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Unicode characters for proper typography
|
|
55
|
+
* EN_DASH: – (U+2013) - used for ranges
|
|
56
|
+
* NARROW_NO_BREAK_SPACE: (U+202F) - used around dash
|
|
57
|
+
*/
|
|
58
|
+
const EN_DASH = '\u2013';
|
|
59
|
+
const NARROW_NO_BREAK_SPACE = '\u202F';
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Format a single date using Intl.DateTimeFormat
|
|
63
|
+
*/
|
|
64
|
+
function formatSingleDate(
|
|
65
|
+
dateStr: string | Date | null | undefined,
|
|
66
|
+
format: 'short' | 'long' | 'numeric',
|
|
67
|
+
locale: string,
|
|
68
|
+
numberingSystem?: string,
|
|
69
|
+
presentLabel?: string
|
|
70
|
+
): string {
|
|
71
|
+
if (!dateStr) {
|
|
72
|
+
return presentLabel || getPresentLabel(locale);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const date = typeof dateStr === 'string' ? new Date(dateStr) : dateStr;
|
|
76
|
+
|
|
77
|
+
if (isNaN(date.getTime())) {
|
|
78
|
+
return typeof dateStr === 'string' ? dateStr : '';
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const monthFormats = {
|
|
82
|
+
short: { month: 'short' as const },
|
|
83
|
+
long: { month: 'long' as const },
|
|
84
|
+
numeric: { month: '2-digit' as const },
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const options: Intl.DateTimeFormatOptions = {
|
|
88
|
+
...monthFormats[format],
|
|
89
|
+
year: 'numeric',
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
if (numberingSystem) {
|
|
93
|
+
options.numberingSystem = numberingSystem;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const formatter = new Intl.DateTimeFormat(locale, options);
|
|
97
|
+
return formatter.format(date);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Get localized "Present" label
|
|
102
|
+
*/
|
|
103
|
+
function getPresentLabel(locale: string): string {
|
|
104
|
+
const labels: Record<string, string> = {
|
|
105
|
+
en: 'Present',
|
|
106
|
+
'en-US': 'Present',
|
|
107
|
+
'en-GB': 'Present',
|
|
108
|
+
fr: 'Présent',
|
|
109
|
+
'fr-FR': 'Présent',
|
|
110
|
+
es: 'Presente',
|
|
111
|
+
'es-ES': 'Presente',
|
|
112
|
+
de: 'Heute',
|
|
113
|
+
'de-DE': 'Heute',
|
|
114
|
+
it: 'Presente',
|
|
115
|
+
'it-IT': 'Presente',
|
|
116
|
+
pt: 'Presente',
|
|
117
|
+
'pt-BR': 'Presente',
|
|
118
|
+
ja: '現在',
|
|
119
|
+
'ja-JP': '現在',
|
|
120
|
+
zh: '至今',
|
|
121
|
+
'zh-CN': '至今',
|
|
122
|
+
'zh-TW': '至今',
|
|
123
|
+
ko: '현재',
|
|
124
|
+
'ko-KR': '현재',
|
|
125
|
+
ar: 'حاضر',
|
|
126
|
+
'ar-SA': 'حاضر',
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
return labels[locale] || labels[locale.split('-')[0]] || 'Present';
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const InlineContainer = styled.span`
|
|
133
|
+
font-size: var(--resume-size-small, 10pt);
|
|
134
|
+
color: var(--resume-color-secondary, #666);
|
|
135
|
+
white-space: nowrap;
|
|
136
|
+
font-variant-numeric: tabular-nums; /* Consistent number width */
|
|
137
|
+
|
|
138
|
+
@media print {
|
|
139
|
+
-webkit-print-color-adjust: exact;
|
|
140
|
+
print-color-adjust: exact;
|
|
141
|
+
}
|
|
142
|
+
`;
|
|
143
|
+
|
|
144
|
+
const DateText = styled.span`
|
|
145
|
+
font-weight: var(--resume-weight-normal, 400);
|
|
146
|
+
`;
|
|
147
|
+
|
|
148
|
+
const Separator = styled.span`
|
|
149
|
+
/* En dash with narrow no-break spaces for proper typography */
|
|
150
|
+
margin: 0;
|
|
151
|
+
padding: 0;
|
|
152
|
+
`;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* TimelineInline
|
|
156
|
+
* Compact inline date range with proper typographic separator
|
|
157
|
+
* Uses en dash (–) with narrow no-break spaces for professional appearance
|
|
158
|
+
*/
|
|
159
|
+
export function TimelineInline({
|
|
160
|
+
startDate,
|
|
161
|
+
endDate,
|
|
162
|
+
format = 'short',
|
|
163
|
+
locale = 'en-US',
|
|
164
|
+
presentLabel,
|
|
165
|
+
numberingSystem,
|
|
166
|
+
useEnDash = true,
|
|
167
|
+
className,
|
|
168
|
+
}: TimelineInlineProps) {
|
|
169
|
+
if (!startDate) return null;
|
|
170
|
+
|
|
171
|
+
const start = formatSingleDate(
|
|
172
|
+
startDate,
|
|
173
|
+
format,
|
|
174
|
+
locale,
|
|
175
|
+
numberingSystem,
|
|
176
|
+
presentLabel
|
|
177
|
+
);
|
|
178
|
+
const end = formatSingleDate(
|
|
179
|
+
endDate,
|
|
180
|
+
format,
|
|
181
|
+
locale,
|
|
182
|
+
numberingSystem,
|
|
183
|
+
presentLabel
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
// Use en dash with narrow no-break spaces for proper typography
|
|
187
|
+
const separator = useEnDash
|
|
188
|
+
? `${NARROW_NO_BREAK_SPACE}${EN_DASH}${NARROW_NO_BREAK_SPACE}`
|
|
189
|
+
: ' - ';
|
|
190
|
+
|
|
191
|
+
return (
|
|
192
|
+
<InlineContainer
|
|
193
|
+
className={`resume-timeline-inline ${className || ''}`.trim()}
|
|
194
|
+
>
|
|
195
|
+
<DateText>{start}</DateText>
|
|
196
|
+
<Separator>{separator}</Separator>
|
|
197
|
+
<DateText>{end}</DateText>
|
|
198
|
+
</InlineContainer>
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export default TimelineInline;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* TimelineItem
|
|
4
|
+
* Individual timeline entry with connector line
|
|
5
|
+
*/
|
|
6
|
+
import styled from 'styled-components';
|
|
7
|
+
|
|
8
|
+
const Item = styled.div`
|
|
9
|
+
position: relative;
|
|
10
|
+
padding-left: ${(props) => (props.$showLine ? '32px' : '0')};
|
|
11
|
+
margin-bottom: var(--resume-space-item);
|
|
12
|
+
|
|
13
|
+
${(props) =>
|
|
14
|
+
props.$showLine &&
|
|
15
|
+
`
|
|
16
|
+
&::before {
|
|
17
|
+
content: '';
|
|
18
|
+
position: absolute;
|
|
19
|
+
left: 8px;
|
|
20
|
+
top: 8px;
|
|
21
|
+
bottom: -16px;
|
|
22
|
+
width: 2px;
|
|
23
|
+
background-color: var(--resume-color-border);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:last-child::before {
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
29
|
+
`}
|
|
30
|
+
|
|
31
|
+
@media print {
|
|
32
|
+
break-inside: avoid;
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
const Marker = styled.div`
|
|
37
|
+
position: absolute;
|
|
38
|
+
left: 0;
|
|
39
|
+
top: 6px;
|
|
40
|
+
width: ${(props) => props.$size || '16px'};
|
|
41
|
+
height: ${(props) => props.$size || '16px'};
|
|
42
|
+
border-radius: 50%;
|
|
43
|
+
background-color: ${(props) => props.$color || 'var(--resume-color-accent)'};
|
|
44
|
+
border: 2px solid var(--resume-color-background);
|
|
45
|
+
|
|
46
|
+
@media print {
|
|
47
|
+
-webkit-print-color-adjust: exact;
|
|
48
|
+
print-color-adjust: exact;
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
const Content = styled.div`
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
`;
|
|
56
|
+
|
|
57
|
+
const Header = styled.div`
|
|
58
|
+
display: flex;
|
|
59
|
+
justify-content: space-between;
|
|
60
|
+
align-items: baseline;
|
|
61
|
+
margin-bottom: 4px;
|
|
62
|
+
flex-wrap: wrap;
|
|
63
|
+
`;
|
|
64
|
+
|
|
65
|
+
const Title = styled.h3`
|
|
66
|
+
font-size: var(--resume-size-subheading);
|
|
67
|
+
font-weight: var(--resume-weight-semibold);
|
|
68
|
+
color: var(--resume-color-primary);
|
|
69
|
+
margin: 0;
|
|
70
|
+
`;
|
|
71
|
+
|
|
72
|
+
const Meta = styled.div`
|
|
73
|
+
font-size: var(--resume-size-small);
|
|
74
|
+
color: var(--resume-color-secondary);
|
|
75
|
+
`;
|
|
76
|
+
|
|
77
|
+
const Description = styled.div`
|
|
78
|
+
font-size: var(--resume-size-body);
|
|
79
|
+
color: var(--resume-color-secondary);
|
|
80
|
+
line-height: var(--resume-line-height-normal);
|
|
81
|
+
`;
|
|
82
|
+
|
|
83
|
+
export function TimelineItem({
|
|
84
|
+
title,
|
|
85
|
+
meta,
|
|
86
|
+
showLine = true,
|
|
87
|
+
markerColor,
|
|
88
|
+
markerSize,
|
|
89
|
+
children,
|
|
90
|
+
className,
|
|
91
|
+
}) {
|
|
92
|
+
return (
|
|
93
|
+
<Item $showLine={showLine} className={className}>
|
|
94
|
+
{showLine && <Marker $color={markerColor} $size={markerSize} />}
|
|
95
|
+
<Content>
|
|
96
|
+
<Header>
|
|
97
|
+
<Title>{title}</Title>
|
|
98
|
+
{meta && <Meta>{meta}</Meta>}
|
|
99
|
+
</Header>
|
|
100
|
+
{children && <Description>{children}</Description>}
|
|
101
|
+
</Content>
|
|
102
|
+
</Item>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export default TimelineItem;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* TimelineItem Stories
|
|
4
|
+
*/
|
|
5
|
+
import { TimelineItem } from './TimelineItem';
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Resume Core/Timeline/TimelineItem',
|
|
9
|
+
component: TimelineItem,
|
|
10
|
+
parameters: { layout: 'padded' },
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
title: 'Senior Software Engineer at Tech Corp',
|
|
19
|
+
meta: '2020 - Present',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const WithoutLine = {
|
|
24
|
+
args: {
|
|
25
|
+
title: 'Project Lead',
|
|
26
|
+
meta: '2019',
|
|
27
|
+
showLine: false,
|
|
28
|
+
children: 'Led team of 5 developers',
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const CustomMarker = {
|
|
33
|
+
args: {
|
|
34
|
+
title: 'Achievement',
|
|
35
|
+
meta: 'Q2 2023',
|
|
36
|
+
markerColor: '#28a745',
|
|
37
|
+
markerSize: '20px',
|
|
38
|
+
children: 'Awarded Employee of the Quarter',
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const Multiple = {
|
|
43
|
+
render: () => (
|
|
44
|
+
<div>
|
|
45
|
+
<TimelineItem
|
|
46
|
+
title="Current Role"
|
|
47
|
+
meta="2020-Present"
|
|
48
|
+
markerColor="#007bff"
|
|
49
|
+
>
|
|
50
|
+
Senior Software Engineer at Tech Corp
|
|
51
|
+
</TimelineItem>
|
|
52
|
+
<TimelineItem
|
|
53
|
+
title="Previous Role"
|
|
54
|
+
meta="2018-2020"
|
|
55
|
+
markerColor="#28a745"
|
|
56
|
+
>
|
|
57
|
+
Software Engineer at StartupCo
|
|
58
|
+
</TimelineItem>
|
|
59
|
+
<TimelineItem title="First Role" meta="2016-2018" markerColor="#ffc107">
|
|
60
|
+
Junior Developer at WebAgency
|
|
61
|
+
</TimelineItem>
|
|
62
|
+
</div>
|
|
63
|
+
),
|
|
64
|
+
};
|