@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,85 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { RulesetStack } from './RulesetStack';
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Primitives/Dividers/RulesetStack',
|
|
6
|
+
component: RulesetStack,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'padded',
|
|
9
|
+
},
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
} satisfies Meta<typeof RulesetStack>;
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryObj<typeof meta>;
|
|
15
|
+
|
|
16
|
+
export const Default: Story = {
|
|
17
|
+
args: {},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const TwoRules: Story = {
|
|
21
|
+
args: {
|
|
22
|
+
count: 2,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const FiveRules: Story = {
|
|
27
|
+
args: {
|
|
28
|
+
count: 5,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const TightSpacing: Story = {
|
|
33
|
+
args: {
|
|
34
|
+
count: 3,
|
|
35
|
+
gapMultiplier: 0.5,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const WideSpacing: Story = {
|
|
40
|
+
args: {
|
|
41
|
+
count: 3,
|
|
42
|
+
gapMultiplier: 2,
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const CustomColor: Story = {
|
|
47
|
+
args: {
|
|
48
|
+
count: 3,
|
|
49
|
+
color: '#94a3b8',
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const Thicker: Story = {
|
|
54
|
+
args: {
|
|
55
|
+
count: 3,
|
|
56
|
+
thickness: '0.6pt',
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const AllVariants: Story = {
|
|
61
|
+
render: () => (
|
|
62
|
+
<div style={{ maxWidth: '600px' }}>
|
|
63
|
+
<p>2 rules (minimal)</p>
|
|
64
|
+
<RulesetStack count={2} />
|
|
65
|
+
|
|
66
|
+
<p>3 rules (default)</p>
|
|
67
|
+
<RulesetStack count={3} />
|
|
68
|
+
|
|
69
|
+
<p>5 rules (maximum)</p>
|
|
70
|
+
<RulesetStack count={5} />
|
|
71
|
+
|
|
72
|
+
<p>Tight spacing (0.5x multiplier)</p>
|
|
73
|
+
<RulesetStack count={3} gapMultiplier={0.5} />
|
|
74
|
+
|
|
75
|
+
<p>Wide spacing (2x multiplier)</p>
|
|
76
|
+
<RulesetStack count={3} gapMultiplier={2} />
|
|
77
|
+
|
|
78
|
+
<p>Custom color (slate)</p>
|
|
79
|
+
<RulesetStack count={3} color="#94a3b8" />
|
|
80
|
+
|
|
81
|
+
<p>Thicker rules (0.6pt)</p>
|
|
82
|
+
<RulesetStack count={3} thickness="0.6pt" />
|
|
83
|
+
</div>
|
|
84
|
+
),
|
|
85
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* RulesetStack Component
|
|
6
|
+
* Alternating rule + gap stack for visual grouping and rhythm
|
|
7
|
+
* Creates structured visual hierarchy through repetition
|
|
8
|
+
*
|
|
9
|
+
* Design constraints:
|
|
10
|
+
* - Gap spacing based on multiples of body leading (line-height)
|
|
11
|
+
* - Rule thickness consistent with keyline weight (0.3-0.5pt)
|
|
12
|
+
* - Stack count: 2-5 rules (optimal visual balance)
|
|
13
|
+
* - Gap multipliers: 0.5x, 1x, 1.5x, or 2x body leading
|
|
14
|
+
*
|
|
15
|
+
* @component
|
|
16
|
+
* @example
|
|
17
|
+
* // Standard 3-rule stack
|
|
18
|
+
* <RulesetStack count={3} />
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // Tight spacing with 4 rules
|
|
22
|
+
* <RulesetStack count={4} gapMultiplier={0.5} />
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // Custom color and thickness
|
|
26
|
+
* <RulesetStack count={2} color="#94a3b8" thickness="0.5pt" />
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
interface RulesetStackProps {
|
|
30
|
+
/** Number of rules to render (2-5, defaults to 3) */
|
|
31
|
+
count?: number;
|
|
32
|
+
/** Gap multiplier based on body leading (defaults to 1) */
|
|
33
|
+
gapMultiplier?: number;
|
|
34
|
+
/** Rule thickness (defaults to 0.4pt) */
|
|
35
|
+
thickness?: string;
|
|
36
|
+
/** Rule color (defaults to theme border color) */
|
|
37
|
+
color?: string;
|
|
38
|
+
/** Additional CSS class name */
|
|
39
|
+
className?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const StyledStack = styled.div`
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
margin-top: ${(props) =>
|
|
46
|
+
props.theme?.spacing?.tight || 'var(--resume-space-tight, 0.5rem)'};
|
|
47
|
+
margin-bottom: ${(props) =>
|
|
48
|
+
props.theme?.spacing?.tight || 'var(--resume-space-tight, 0.5rem)'};
|
|
49
|
+
|
|
50
|
+
@media print {
|
|
51
|
+
page-break-inside: avoid;
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
|
|
55
|
+
const StyledRule = styled.div<{
|
|
56
|
+
thickness?: string;
|
|
57
|
+
color?: string;
|
|
58
|
+
gapSize: string;
|
|
59
|
+
}>`
|
|
60
|
+
width: 100%;
|
|
61
|
+
height: ${(props) => props.thickness || '0.4pt'};
|
|
62
|
+
background-color: ${(props) =>
|
|
63
|
+
props.color ||
|
|
64
|
+
props.theme?.colors?.border ||
|
|
65
|
+
'var(--resume-color-border, #e5e7eb)'};
|
|
66
|
+
margin-bottom: ${(props) => props.gapSize};
|
|
67
|
+
|
|
68
|
+
&:last-child {
|
|
69
|
+
margin-bottom: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@media print {
|
|
73
|
+
/* Ensure minimum stroke weight for print visibility */
|
|
74
|
+
min-height: 0.3pt;
|
|
75
|
+
/* Ensure color renders in print */
|
|
76
|
+
-webkit-print-color-adjust: exact;
|
|
77
|
+
print-color-adjust: exact;
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
|
|
81
|
+
export function RulesetStack({
|
|
82
|
+
count = 3,
|
|
83
|
+
gapMultiplier = 1,
|
|
84
|
+
thickness,
|
|
85
|
+
color,
|
|
86
|
+
className,
|
|
87
|
+
...rest
|
|
88
|
+
}: RulesetStackProps) {
|
|
89
|
+
// Clamp count between 2 and 5
|
|
90
|
+
const ruleCount = Math.min(Math.max(count, 2), 5);
|
|
91
|
+
|
|
92
|
+
// Calculate gap size based on body leading (assuming 1.5 line-height)
|
|
93
|
+
// Default body line-height from tokens is 1.5
|
|
94
|
+
const baseLeading = 1.5; // From typography.lineHeights.normal
|
|
95
|
+
const gapSize = `calc(${baseLeading * gapMultiplier}rem * 0.5)`;
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
<StyledStack
|
|
99
|
+
role="separator"
|
|
100
|
+
aria-orientation="horizontal"
|
|
101
|
+
className={`resume-ruleset-stack ${className || ''}`.trim()}
|
|
102
|
+
{...rest}
|
|
103
|
+
>
|
|
104
|
+
{Array.from({ length: ruleCount }, (_, index) => (
|
|
105
|
+
<StyledRule
|
|
106
|
+
key={index}
|
|
107
|
+
thickness={thickness}
|
|
108
|
+
color={color}
|
|
109
|
+
gapSize={gapSize}
|
|
110
|
+
aria-hidden="true"
|
|
111
|
+
/>
|
|
112
|
+
))}
|
|
113
|
+
</StyledStack>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export default RulesetStack;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Section Component
|
|
6
|
+
* Semantic <section> wrapper for resume sections with consistent spacing
|
|
7
|
+
*
|
|
8
|
+
* @component
|
|
9
|
+
* @example
|
|
10
|
+
* <Section id="work-experience">
|
|
11
|
+
* <SectionTitle>Work Experience</SectionTitle>
|
|
12
|
+
* <ListItem {...jobData} />
|
|
13
|
+
* </Section>
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const StyledSection = styled.section`
|
|
17
|
+
margin-bottom: ${(props) =>
|
|
18
|
+
props.theme?.spacing?.section || 'var(--resume-space-section, 2rem)'};
|
|
19
|
+
|
|
20
|
+
@media print {
|
|
21
|
+
page-break-inside: avoid;
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
export function Section({ children, className, id, ...rest }) {
|
|
26
|
+
return (
|
|
27
|
+
<StyledSection
|
|
28
|
+
id={id}
|
|
29
|
+
className={`resume-section ${className || ''}`.trim()}
|
|
30
|
+
{...rest}
|
|
31
|
+
>
|
|
32
|
+
{children}
|
|
33
|
+
</StyledSection>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export default Section;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Section Stories
|
|
4
|
+
*/
|
|
5
|
+
import { Section } from './Section';
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Resume Core/Primitives/Section',
|
|
9
|
+
component: Section,
|
|
10
|
+
parameters: { layout: 'padded' },
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
title: 'Work Experience',
|
|
19
|
+
children: 'Section content goes here',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const Example = {
|
|
24
|
+
args: {
|
|
25
|
+
title: 'Skills',
|
|
26
|
+
children: 'List of skills and technologies',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* SectionTitle Component
|
|
6
|
+
* Styled heading for resume sections with optional icon and accent border
|
|
7
|
+
*
|
|
8
|
+
* @component
|
|
9
|
+
* @example
|
|
10
|
+
* <SectionTitle icon="💼">Work Experience</SectionTitle>
|
|
11
|
+
* <SectionTitle level="h3">Projects</SectionTitle>
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const StyledTitle = styled.h2`
|
|
15
|
+
font-size: ${(props) =>
|
|
16
|
+
props.theme?.typography?.heading || 'var(--resume-size-heading, 16pt)'};
|
|
17
|
+
font-weight: 600;
|
|
18
|
+
color: ${(props) =>
|
|
19
|
+
props.theme?.colors?.primary || 'var(--resume-color-primary, #000)'};
|
|
20
|
+
margin: 0 0
|
|
21
|
+
${(props) => props.theme?.spacing?.item || 'var(--resume-space-item, 1rem)'}
|
|
22
|
+
0;
|
|
23
|
+
padding-bottom: 4px;
|
|
24
|
+
border-bottom: 2px solid
|
|
25
|
+
${(props) =>
|
|
26
|
+
props.theme?.colors?.accent || 'var(--resume-color-accent, #0066cc)'};
|
|
27
|
+
|
|
28
|
+
@media print {
|
|
29
|
+
page-break-after: avoid;
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
const Icon = styled.span`
|
|
34
|
+
margin-right: 8px;
|
|
35
|
+
font-size: 1.2em;
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
export function SectionTitle({
|
|
39
|
+
children,
|
|
40
|
+
icon,
|
|
41
|
+
level = 2,
|
|
42
|
+
className,
|
|
43
|
+
...rest
|
|
44
|
+
}) {
|
|
45
|
+
// Use 'as' prop for dynamic heading level
|
|
46
|
+
return (
|
|
47
|
+
<StyledTitle
|
|
48
|
+
as={`h${level}`}
|
|
49
|
+
className={`resume-section-title ${className || ''}`.trim()}
|
|
50
|
+
{...rest}
|
|
51
|
+
>
|
|
52
|
+
{icon && (
|
|
53
|
+
<Icon aria-hidden="true" className="resume-icon">
|
|
54
|
+
{icon}
|
|
55
|
+
</Icon>
|
|
56
|
+
)}
|
|
57
|
+
{children}
|
|
58
|
+
</StyledTitle>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export default SectionTitle;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* SectionTitle Stories
|
|
4
|
+
*/
|
|
5
|
+
import { SectionTitle } from './SectionTitle';
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Resume Core/Primitives/SectionTitle',
|
|
9
|
+
component: SectionTitle,
|
|
10
|
+
parameters: { layout: 'padded' },
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
children: 'Professional Experience',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const Example = {
|
|
23
|
+
args: {
|
|
24
|
+
children: 'Education & Certifications',
|
|
25
|
+
level: 2,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @resume/core Primitives
|
|
4
|
+
* React components for building ATS-friendly resume themes
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export { Section } from './Section.jsx';
|
|
8
|
+
export { SectionTitle } from './SectionTitle.jsx';
|
|
9
|
+
export { ListItem } from './ListItem.jsx';
|
|
10
|
+
export { DateRange, formatDateRange } from './DateRange.jsx';
|
|
11
|
+
export { Badge, BadgeList } from './Badge.jsx';
|
|
12
|
+
export { ContactInfo } from './ContactInfo.jsx';
|
|
13
|
+
export { Link } from './Link.jsx';
|
|
14
|
+
export { InlineSeparatorPipe } from './InlineSeparatorPipe.jsx';
|
|
15
|
+
|
|
16
|
+
// Divider and separator components
|
|
17
|
+
export { KeylineDivider } from './KeylineDivider';
|
|
18
|
+
export { DottedDivider } from './DottedDivider';
|
|
19
|
+
export { AccentSidebarStripe } from './AccentSidebarStripe';
|
|
20
|
+
export { AccentTopRule } from './AccentTopRule';
|
|
21
|
+
export { RulesetStack } from './RulesetStack';
|
|
22
|
+
|
|
23
|
+
// Default exports for convenience
|
|
24
|
+
export { default as DefaultSection } from './Section.jsx';
|
|
25
|
+
export { default as DefaultSectionTitle } from './SectionTitle.jsx';
|
|
26
|
+
export { default as DefaultListItem } from './ListItem.jsx';
|
|
27
|
+
export { default as DefaultDateRange } from './DateRange.jsx';
|
|
28
|
+
export { default as DefaultBadge } from './Badge.jsx';
|
|
29
|
+
export { default as DefaultContactInfo } from './ContactInfo.jsx';
|
|
30
|
+
export { default as DefaultLink } from './Link.jsx';
|
|
31
|
+
export { default as DefaultInlineSeparatorPipe } from './InlineSeparatorPipe.jsx';
|
|
32
|
+
export { default as DefaultKeylineDivider } from './KeylineDivider';
|
|
33
|
+
export { default as DefaultDottedDivider } from './DottedDivider';
|
|
34
|
+
export { default as DefaultAccentSidebarStripe } from './AccentSidebarStripe';
|
|
35
|
+
export { default as DefaultAccentTopRule } from './AccentTopRule';
|
|
36
|
+
export { default as DefaultRulesetStack } from './RulesetStack';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* ColumnBreak
|
|
4
|
+
* Force column or page break for print layouts
|
|
5
|
+
*/
|
|
6
|
+
import styled from 'styled-components';
|
|
7
|
+
|
|
8
|
+
const Break = styled.div`
|
|
9
|
+
@media print {
|
|
10
|
+
${(props) => {
|
|
11
|
+
if (props.$type === 'page') {
|
|
12
|
+
return `
|
|
13
|
+
page-break-after: always;
|
|
14
|
+
break-after: page;
|
|
15
|
+
`;
|
|
16
|
+
}
|
|
17
|
+
if (props.$type === 'column') {
|
|
18
|
+
return `
|
|
19
|
+
column-break-after: always;
|
|
20
|
+
break-after: column;
|
|
21
|
+
`;
|
|
22
|
+
}
|
|
23
|
+
return `
|
|
24
|
+
page-break-after: always;
|
|
25
|
+
break-after: page;
|
|
26
|
+
`;
|
|
27
|
+
}}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media screen {
|
|
31
|
+
display: none;
|
|
32
|
+
}
|
|
33
|
+
`;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @param {Object} props
|
|
37
|
+
* @param {string} [props.type='page'] - Break type (page, column)
|
|
38
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
39
|
+
*/
|
|
40
|
+
export function ColumnBreak({ type = 'page', className }) {
|
|
41
|
+
return <Break $type={type} className={className} />;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export default ColumnBreak;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* ColumnBreak Stories
|
|
4
|
+
*/
|
|
5
|
+
import { ColumnBreak } from './ColumnBreak';
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Resume Core/Print/ColumnBreak',
|
|
9
|
+
component: ColumnBreak,
|
|
10
|
+
parameters: { layout: 'padded' },
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const Example = {
|
|
21
|
+
args: {},
|
|
22
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* KeepTogether
|
|
4
|
+
* Prevent page break within content
|
|
5
|
+
*/
|
|
6
|
+
import styled from 'styled-components';
|
|
7
|
+
|
|
8
|
+
const Container = styled.div`
|
|
9
|
+
@media print {
|
|
10
|
+
break-inside: avoid;
|
|
11
|
+
page-break-inside: avoid;
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @param {Object} props
|
|
17
|
+
* @param {React.ReactNode} props.children - Content to keep together
|
|
18
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
19
|
+
*/
|
|
20
|
+
export function KeepTogether({ children, className }) {
|
|
21
|
+
return <Container className={className}>{children}</Container>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default KeepTogether;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* KeepTogether Stories
|
|
4
|
+
*/
|
|
5
|
+
import { KeepTogether } from './KeepTogether';
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Resume Core/Print/KeepTogether',
|
|
9
|
+
component: KeepTogether,
|
|
10
|
+
parameters: { layout: 'padded' },
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
children: 'Content that should stay together when printing',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const Example = {
|
|
23
|
+
args: {
|
|
24
|
+
children: 'Experience section - do not break across pages',
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* LetterheadBar
|
|
4
|
+
* Thin top bar across entire page with name
|
|
5
|
+
* Reserves top margin for unprintable area
|
|
6
|
+
*/
|
|
7
|
+
import styled from 'styled-components';
|
|
8
|
+
|
|
9
|
+
const LetterheadContainer = styled.div`
|
|
10
|
+
@media print {
|
|
11
|
+
position: fixed;
|
|
12
|
+
top: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
right: 0;
|
|
15
|
+
padding: var(--resume-space-xs, 0.5rem) var(--resume-space-base, 1rem);
|
|
16
|
+
background: var(--resume-color-accent, #f3f4f6);
|
|
17
|
+
border-bottom: 2px solid var(--resume-color-primary, #111827);
|
|
18
|
+
z-index: 1000;
|
|
19
|
+
|
|
20
|
+
/* Reserve space for unprintable area */
|
|
21
|
+
margin-top: 0.25in;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media screen {
|
|
25
|
+
padding: var(--resume-space-xs, 0.5rem) var(--resume-space-base, 1rem);
|
|
26
|
+
background: var(--resume-color-accent, #f3f4f6);
|
|
27
|
+
border-bottom: 2px solid var(--resume-color-primary, #111827);
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
|
|
31
|
+
const LetterheadContent = styled.div`
|
|
32
|
+
display: flex;
|
|
33
|
+
justify-content: space-between;
|
|
34
|
+
align-items: center;
|
|
35
|
+
font-size: var(--resume-size-small, 0.875rem);
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
const Name = styled.div`
|
|
39
|
+
font-weight: 700;
|
|
40
|
+
letter-spacing: 0.05em;
|
|
41
|
+
text-transform: uppercase;
|
|
42
|
+
color: var(--resume-color-primary, #111827);
|
|
43
|
+
font-size: var(--resume-size-base, 1rem);
|
|
44
|
+
`;
|
|
45
|
+
|
|
46
|
+
const Tagline = styled.div`
|
|
47
|
+
color: var(--resume-color-secondary, #6b7280);
|
|
48
|
+
font-size: var(--resume-size-small, 0.875rem);
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
const Spacer = styled.div`
|
|
52
|
+
@media print {
|
|
53
|
+
height: 0.75in;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@media screen {
|
|
57
|
+
height: 3rem;
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* LetterheadBar component displays a persistent bar at the top of each page
|
|
63
|
+
* Reserves appropriate top margin for printer unprintable areas
|
|
64
|
+
*
|
|
65
|
+
* @param {Object} props
|
|
66
|
+
* @param {string} props.name - Full name to display prominently
|
|
67
|
+
* @param {string} [props.tagline] - Optional tagline or subtitle
|
|
68
|
+
* @param {boolean} [props.includespacer=true] - Add spacer to prevent content overlap
|
|
69
|
+
* @param {React.ReactNode} [props.children] - Optional custom content
|
|
70
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
71
|
+
* @returns {JSX.Element}
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* <LetterheadBar name="Jane Smith" tagline="Product Designer" />
|
|
75
|
+
* <LetterheadBar name="John Doe">
|
|
76
|
+
* <div>Custom content</div>
|
|
77
|
+
* </LetterheadBar>
|
|
78
|
+
*/
|
|
79
|
+
export function LetterheadBar({
|
|
80
|
+
name,
|
|
81
|
+
tagline,
|
|
82
|
+
includeSpacer = true,
|
|
83
|
+
children,
|
|
84
|
+
className,
|
|
85
|
+
}) {
|
|
86
|
+
return (
|
|
87
|
+
<>
|
|
88
|
+
<LetterheadContainer className={className}>
|
|
89
|
+
<LetterheadContent>
|
|
90
|
+
<Name>{name}</Name>
|
|
91
|
+
{tagline && <Tagline>{tagline}</Tagline>}
|
|
92
|
+
{children}
|
|
93
|
+
</LetterheadContent>
|
|
94
|
+
</LetterheadContainer>
|
|
95
|
+
{includeSpacer && <Spacer />}
|
|
96
|
+
</>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export default LetterheadBar;
|