@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,128 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* ComparisonTable
|
|
4
|
+
* Comparison table for side-by-side data presentation
|
|
5
|
+
*/
|
|
6
|
+
import styled from 'styled-components';
|
|
7
|
+
|
|
8
|
+
const Table = styled.table`
|
|
9
|
+
width: 100%;
|
|
10
|
+
border-collapse: collapse;
|
|
11
|
+
font-size: var(--resume-size-body);
|
|
12
|
+
margin: var(--resume-space-item) 0;
|
|
13
|
+
|
|
14
|
+
@media print {
|
|
15
|
+
break-inside: avoid;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@media (max-width: 768px) {
|
|
19
|
+
font-size: var(--resume-size-small);
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
const Thead = styled.thead``;
|
|
24
|
+
|
|
25
|
+
const Th = styled.th`
|
|
26
|
+
padding: 12px;
|
|
27
|
+
text-align: ${(props) => props.$align || 'left'};
|
|
28
|
+
font-weight: var(--resume-weight-medium);
|
|
29
|
+
color: var(--resume-color-primary);
|
|
30
|
+
background-color: var(--resume-color-muted);
|
|
31
|
+
border: 1px solid var(--resume-color-border);
|
|
32
|
+
|
|
33
|
+
@media print {
|
|
34
|
+
-webkit-print-color-adjust: exact;
|
|
35
|
+
print-color-adjust: exact;
|
|
36
|
+
border: 1px solid var(--resume-color-border);
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
|
|
40
|
+
const Tbody = styled.tbody``;
|
|
41
|
+
|
|
42
|
+
const Tr = styled.tr`
|
|
43
|
+
&:nth-child(even) {
|
|
44
|
+
background-color: var(--resume-color-background);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@media print {
|
|
48
|
+
break-inside: avoid;
|
|
49
|
+
page-break-inside: avoid;
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
52
|
+
|
|
53
|
+
const Td = styled.td`
|
|
54
|
+
padding: 10px 12px;
|
|
55
|
+
border: 1px solid var(--resume-color-border);
|
|
56
|
+
color: var(--resume-color-secondary);
|
|
57
|
+
text-align: ${(props) => props.$align || 'left'};
|
|
58
|
+
vertical-align: top;
|
|
59
|
+
|
|
60
|
+
@media print {
|
|
61
|
+
border: 1px solid var(--resume-color-border);
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
64
|
+
|
|
65
|
+
const Label = styled.td`
|
|
66
|
+
padding: 10px 12px;
|
|
67
|
+
border: 1px solid var(--resume-color-border);
|
|
68
|
+
color: var(--resume-color-primary);
|
|
69
|
+
font-weight: var(--resume-weight-medium);
|
|
70
|
+
background-color: var(--resume-color-muted);
|
|
71
|
+
|
|
72
|
+
@media print {
|
|
73
|
+
-webkit-print-color-adjust: exact;
|
|
74
|
+
print-color-adjust: exact;
|
|
75
|
+
border: 1px solid var(--resume-color-border);
|
|
76
|
+
}
|
|
77
|
+
`;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @param {Object} props
|
|
81
|
+
* @param {Array<string>} props.headers - Table headers
|
|
82
|
+
* @param {Array} props.rows - Array of row data
|
|
83
|
+
* @param {boolean} [props.firstColumnLabel=false] - Style first column as label
|
|
84
|
+
* @param {string} [props.align='left'] - Text alignment
|
|
85
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
86
|
+
*/
|
|
87
|
+
export function ComparisonTable({
|
|
88
|
+
headers = [],
|
|
89
|
+
rows = [],
|
|
90
|
+
firstColumnLabel = false,
|
|
91
|
+
align = 'left',
|
|
92
|
+
className,
|
|
93
|
+
}) {
|
|
94
|
+
if (!rows || rows.length === 0) return null;
|
|
95
|
+
|
|
96
|
+
return (
|
|
97
|
+
<Table className={className}>
|
|
98
|
+
{headers.length > 0 && (
|
|
99
|
+
<Thead>
|
|
100
|
+
<Tr>
|
|
101
|
+
{headers.map((header, index) => (
|
|
102
|
+
<Th key={index} $align={align}>
|
|
103
|
+
{header}
|
|
104
|
+
</Th>
|
|
105
|
+
))}
|
|
106
|
+
</Tr>
|
|
107
|
+
</Thead>
|
|
108
|
+
)}
|
|
109
|
+
<Tbody>
|
|
110
|
+
{rows.map((row, rowIndex) => (
|
|
111
|
+
<Tr key={rowIndex}>
|
|
112
|
+
{row.map((cell, cellIndex) => {
|
|
113
|
+
const CellComponent =
|
|
114
|
+
firstColumnLabel && cellIndex === 0 ? Label : Td;
|
|
115
|
+
return (
|
|
116
|
+
<CellComponent key={cellIndex} $align={align}>
|
|
117
|
+
{cell}
|
|
118
|
+
</CellComponent>
|
|
119
|
+
);
|
|
120
|
+
})}
|
|
121
|
+
</Tr>
|
|
122
|
+
))}
|
|
123
|
+
</Tbody>
|
|
124
|
+
</Table>
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export default ComparisonTable;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* ComparisonTable Stories
|
|
4
|
+
*/
|
|
5
|
+
import { ComparisonTable } from './ComparisonTable';
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Resume Core/Tables/ComparisonTable',
|
|
9
|
+
component: ComparisonTable,
|
|
10
|
+
parameters: { layout: 'padded' },
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
headers: ['Skill', 'Previous Role', 'Current Role'],
|
|
19
|
+
rows: [
|
|
20
|
+
['Team Leadership', '5 people', '12 people'],
|
|
21
|
+
['Budget Management', '$500K', '$2M'],
|
|
22
|
+
['Project Scope', 'Single Product', 'Multiple Products'],
|
|
23
|
+
['Tech Stack', 'React, Node.js', 'React, Node.js, Python, AWS'],
|
|
24
|
+
],
|
|
25
|
+
firstColumnLabel: true,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const Example = {
|
|
30
|
+
args: {
|
|
31
|
+
headers: ['Category', 'Basic', 'Professional', 'Enterprise'],
|
|
32
|
+
rows: [
|
|
33
|
+
['Price', '$0/month', '$29/month', '$99/month'],
|
|
34
|
+
['Users', '1', '10', 'Unlimited'],
|
|
35
|
+
['Storage', '1GB', '100GB', '1TB'],
|
|
36
|
+
['Support', 'Email', 'Priority Email', '24/7 Phone'],
|
|
37
|
+
],
|
|
38
|
+
firstColumnLabel: true,
|
|
39
|
+
align: 'center',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* DataTable
|
|
4
|
+
* Generic data table with sorting and styling options
|
|
5
|
+
*/
|
|
6
|
+
import styled from 'styled-components';
|
|
7
|
+
|
|
8
|
+
const Table = styled.table`
|
|
9
|
+
width: 100%;
|
|
10
|
+
border-collapse: collapse;
|
|
11
|
+
font-size: var(--resume-size-body);
|
|
12
|
+
margin: var(--resume-space-item) 0;
|
|
13
|
+
|
|
14
|
+
@media print {
|
|
15
|
+
break-inside: avoid;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@media (max-width: 768px) {
|
|
19
|
+
font-size: var(--resume-size-small);
|
|
20
|
+
display: block;
|
|
21
|
+
overflow-x: auto;
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
const Thead = styled.thead`
|
|
26
|
+
background-color: var(--resume-color-muted);
|
|
27
|
+
|
|
28
|
+
@media print {
|
|
29
|
+
-webkit-print-color-adjust: exact;
|
|
30
|
+
print-color-adjust: exact;
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
|
|
34
|
+
const Th = styled.th`
|
|
35
|
+
padding: 12px;
|
|
36
|
+
text-align: ${(props) => props.$align || 'left'};
|
|
37
|
+
font-weight: var(--resume-weight-medium);
|
|
38
|
+
color: var(--resume-color-primary);
|
|
39
|
+
border: 1px solid var(--resume-color-border);
|
|
40
|
+
white-space: nowrap;
|
|
41
|
+
|
|
42
|
+
@media print {
|
|
43
|
+
border: 1px solid var(--resume-color-border);
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
|
|
47
|
+
const Tbody = styled.tbody``;
|
|
48
|
+
|
|
49
|
+
const Tr = styled.tr`
|
|
50
|
+
&:nth-child(even) {
|
|
51
|
+
background-color: ${(props) =>
|
|
52
|
+
props.$striped ? 'var(--resume-color-background)' : 'transparent'};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:hover {
|
|
56
|
+
background-color: var(--resume-color-muted);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@media print {
|
|
60
|
+
break-inside: avoid;
|
|
61
|
+
page-break-inside: avoid;
|
|
62
|
+
|
|
63
|
+
&:hover {
|
|
64
|
+
background-color: transparent;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
|
|
69
|
+
const Td = styled.td`
|
|
70
|
+
padding: 10px 12px;
|
|
71
|
+
border: 1px solid var(--resume-color-border);
|
|
72
|
+
color: var(--resume-color-secondary);
|
|
73
|
+
text-align: ${(props) => props.$align || 'left'};
|
|
74
|
+
vertical-align: top;
|
|
75
|
+
|
|
76
|
+
@media print {
|
|
77
|
+
border: 1px solid var(--resume-color-border);
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
|
|
81
|
+
const Tfoot = styled.tfoot`
|
|
82
|
+
background-color: var(--resume-color-muted);
|
|
83
|
+
font-weight: var(--resume-weight-medium);
|
|
84
|
+
|
|
85
|
+
@media print {
|
|
86
|
+
-webkit-print-color-adjust: exact;
|
|
87
|
+
print-color-adjust: exact;
|
|
88
|
+
}
|
|
89
|
+
`;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @param {Object} props
|
|
93
|
+
* @param {Array} props.columns - Column definitions
|
|
94
|
+
* @param {string} props.columns[].key - Column key
|
|
95
|
+
* @param {string} props.columns[].header - Column header text
|
|
96
|
+
* @param {string} [props.columns[].align] - Text alignment
|
|
97
|
+
* @param {Array} props.data - Array of data objects
|
|
98
|
+
* @param {boolean} [props.striped=true] - Alternate row colors
|
|
99
|
+
* @param {Array} [props.footer] - Footer row data
|
|
100
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
101
|
+
*/
|
|
102
|
+
export function DataTable({
|
|
103
|
+
columns = [],
|
|
104
|
+
data = [],
|
|
105
|
+
striped = true,
|
|
106
|
+
footer,
|
|
107
|
+
className,
|
|
108
|
+
}) {
|
|
109
|
+
if (!columns || columns.length === 0 || !data || data.length === 0)
|
|
110
|
+
return null;
|
|
111
|
+
|
|
112
|
+
return (
|
|
113
|
+
<Table className={className}>
|
|
114
|
+
<Thead>
|
|
115
|
+
<Tr>
|
|
116
|
+
{columns.map((col) => (
|
|
117
|
+
<Th key={col.key} $align={col.align}>
|
|
118
|
+
{col.header}
|
|
119
|
+
</Th>
|
|
120
|
+
))}
|
|
121
|
+
</Tr>
|
|
122
|
+
</Thead>
|
|
123
|
+
<Tbody>
|
|
124
|
+
{data.map((row, rowIndex) => (
|
|
125
|
+
<Tr key={rowIndex} $striped={striped}>
|
|
126
|
+
{columns.map((col) => (
|
|
127
|
+
<Td key={col.key} $align={col.align}>
|
|
128
|
+
{row[col.key]}
|
|
129
|
+
</Td>
|
|
130
|
+
))}
|
|
131
|
+
</Tr>
|
|
132
|
+
))}
|
|
133
|
+
</Tbody>
|
|
134
|
+
{footer && (
|
|
135
|
+
<Tfoot>
|
|
136
|
+
<Tr>
|
|
137
|
+
{footer.map((cell, index) => (
|
|
138
|
+
<Td key={index} $align={columns[index]?.align}>
|
|
139
|
+
{cell}
|
|
140
|
+
</Td>
|
|
141
|
+
))}
|
|
142
|
+
</Tr>
|
|
143
|
+
</Tfoot>
|
|
144
|
+
)}
|
|
145
|
+
</Table>
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export default DataTable;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* DataTable Stories
|
|
4
|
+
*/
|
|
5
|
+
import { DataTable } from './DataTable';
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Resume Core/Tables/DataTable',
|
|
9
|
+
component: DataTable,
|
|
10
|
+
parameters: { layout: 'padded' },
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
columns: [
|
|
19
|
+
{ key: 'company', header: 'Company', align: 'left' },
|
|
20
|
+
{ key: 'position', header: 'Position', align: 'left' },
|
|
21
|
+
{ key: 'years', header: 'Years', align: 'center' },
|
|
22
|
+
{ key: 'location', header: 'Location', align: 'left' },
|
|
23
|
+
],
|
|
24
|
+
data: [
|
|
25
|
+
{
|
|
26
|
+
company: 'Tech Corp',
|
|
27
|
+
position: 'Senior Engineer',
|
|
28
|
+
years: '3',
|
|
29
|
+
location: 'San Francisco, CA',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
company: 'Innovation Labs',
|
|
33
|
+
position: 'Software Engineer',
|
|
34
|
+
years: '2',
|
|
35
|
+
location: 'New York, NY',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
company: 'WebDev Agency',
|
|
39
|
+
position: 'Junior Developer',
|
|
40
|
+
years: '2',
|
|
41
|
+
location: 'Austin, TX',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
striped: true,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const Example = {
|
|
49
|
+
args: {
|
|
50
|
+
columns: [
|
|
51
|
+
{ key: 'skill', header: 'Skill', align: 'left' },
|
|
52
|
+
{ key: 'level', header: 'Level', align: 'center' },
|
|
53
|
+
{ key: 'years', header: 'Years Exp', align: 'center' },
|
|
54
|
+
],
|
|
55
|
+
data: [
|
|
56
|
+
{ skill: 'JavaScript', level: 'Expert', years: '8' },
|
|
57
|
+
{ skill: 'React', level: 'Expert', years: '5' },
|
|
58
|
+
{ skill: 'Python', level: 'Advanced', years: '4' },
|
|
59
|
+
{ skill: 'Node.js', level: 'Advanced', years: '6' },
|
|
60
|
+
],
|
|
61
|
+
striped: true,
|
|
62
|
+
footer: ['Total Skills', '4', '23 years'],
|
|
63
|
+
},
|
|
64
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* SkillMatrix
|
|
4
|
+
* Matrix table for skills vs proficiency levels
|
|
5
|
+
*/
|
|
6
|
+
import styled from 'styled-components';
|
|
7
|
+
|
|
8
|
+
const Table = styled.table`
|
|
9
|
+
width: 100%;
|
|
10
|
+
border-collapse: collapse;
|
|
11
|
+
font-size: var(--resume-size-body);
|
|
12
|
+
margin: var(--resume-space-item) 0;
|
|
13
|
+
|
|
14
|
+
@media print {
|
|
15
|
+
break-inside: avoid;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@media (max-width: 768px) {
|
|
19
|
+
font-size: var(--resume-size-small);
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
const Thead = styled.thead`
|
|
24
|
+
background-color: var(--resume-color-muted);
|
|
25
|
+
|
|
26
|
+
@media print {
|
|
27
|
+
-webkit-print-color-adjust: exact;
|
|
28
|
+
print-color-adjust: exact;
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
const Th = styled.th`
|
|
33
|
+
padding: 10px;
|
|
34
|
+
text-align: left;
|
|
35
|
+
font-weight: var(--resume-weight-medium);
|
|
36
|
+
color: var(--resume-color-primary);
|
|
37
|
+
border: 1px solid var(--resume-color-border);
|
|
38
|
+
|
|
39
|
+
@media print {
|
|
40
|
+
border: 1px solid var(--resume-color-border);
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
|
|
44
|
+
const Tbody = styled.tbody``;
|
|
45
|
+
|
|
46
|
+
const Tr = styled.tr`
|
|
47
|
+
&:nth-child(even) {
|
|
48
|
+
background-color: var(--resume-color-background);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media print {
|
|
52
|
+
break-inside: avoid;
|
|
53
|
+
page-break-inside: avoid;
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
56
|
+
|
|
57
|
+
const Td = styled.td`
|
|
58
|
+
padding: 10px;
|
|
59
|
+
border: 1px solid var(--resume-color-border);
|
|
60
|
+
color: var(--resume-color-secondary);
|
|
61
|
+
|
|
62
|
+
@media print {
|
|
63
|
+
border: 1px solid var(--resume-color-border);
|
|
64
|
+
}
|
|
65
|
+
`;
|
|
66
|
+
|
|
67
|
+
const Cell = styled.div`
|
|
68
|
+
display: flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
`;
|
|
72
|
+
|
|
73
|
+
const Indicator = styled.span`
|
|
74
|
+
width: 12px;
|
|
75
|
+
height: 12px;
|
|
76
|
+
border-radius: 50%;
|
|
77
|
+
background-color: ${(props) => {
|
|
78
|
+
if (props.$level === 'expert') return 'var(--resume-color-accent)';
|
|
79
|
+
if (props.$level === 'advanced') return 'var(--resume-color-success)';
|
|
80
|
+
if (props.$level === 'intermediate') return 'var(--resume-color-warning)';
|
|
81
|
+
return 'var(--resume-color-border)';
|
|
82
|
+
}};
|
|
83
|
+
|
|
84
|
+
@media print {
|
|
85
|
+
-webkit-print-color-adjust: exact;
|
|
86
|
+
print-color-adjust: exact;
|
|
87
|
+
border: 2px solid
|
|
88
|
+
${(props) => {
|
|
89
|
+
if (props.$level === 'expert') return 'var(--resume-color-accent)';
|
|
90
|
+
if (props.$level === 'advanced') return 'var(--resume-color-success)';
|
|
91
|
+
if (props.$level === 'intermediate')
|
|
92
|
+
return 'var(--resume-color-warning)';
|
|
93
|
+
return 'var(--resume-color-border)';
|
|
94
|
+
}};
|
|
95
|
+
}
|
|
96
|
+
`;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @param {Object} props
|
|
100
|
+
* @param {Array} props.skills - Array of skill objects
|
|
101
|
+
* @param {string} props.skills[].name - Skill name
|
|
102
|
+
* @param {Object} props.skills[].levels - Proficiency levels object
|
|
103
|
+
* @param {Array<string>} [props.categories] - Category headers
|
|
104
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
105
|
+
*/
|
|
106
|
+
export function SkillMatrix({ skills = [], categories = [], className }) {
|
|
107
|
+
if (!skills || skills.length === 0) return null;
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<Table className={className}>
|
|
111
|
+
<Thead>
|
|
112
|
+
<Tr>
|
|
113
|
+
<Th>Skill</Th>
|
|
114
|
+
{categories.map((cat, index) => (
|
|
115
|
+
<Th key={index}>{cat}</Th>
|
|
116
|
+
))}
|
|
117
|
+
</Tr>
|
|
118
|
+
</Thead>
|
|
119
|
+
<Tbody>
|
|
120
|
+
{skills.map((skill, index) => (
|
|
121
|
+
<Tr key={index}>
|
|
122
|
+
<Td>{skill.name}</Td>
|
|
123
|
+
{categories.map((cat, catIndex) => (
|
|
124
|
+
<Td key={catIndex}>
|
|
125
|
+
<Cell>
|
|
126
|
+
{skill.levels && skill.levels[cat] && (
|
|
127
|
+
<Indicator $level={skill.levels[cat]} />
|
|
128
|
+
)}
|
|
129
|
+
</Cell>
|
|
130
|
+
</Td>
|
|
131
|
+
))}
|
|
132
|
+
</Tr>
|
|
133
|
+
))}
|
|
134
|
+
</Tbody>
|
|
135
|
+
</Table>
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export default SkillMatrix;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* SkillMatrix Stories
|
|
4
|
+
*/
|
|
5
|
+
import { SkillMatrix } from './SkillMatrix';
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Resume Core/Tables/SkillMatrix',
|
|
9
|
+
component: SkillMatrix,
|
|
10
|
+
parameters: { layout: 'padded' },
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
categories: ['Beginner', 'Intermediate', 'Advanced', 'Expert'],
|
|
19
|
+
skills: [
|
|
20
|
+
{
|
|
21
|
+
name: 'JavaScript',
|
|
22
|
+
levels: {
|
|
23
|
+
Beginner: null,
|
|
24
|
+
Intermediate: null,
|
|
25
|
+
Advanced: 'advanced',
|
|
26
|
+
Expert: 'expert',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'Python',
|
|
31
|
+
levels: {
|
|
32
|
+
Beginner: null,
|
|
33
|
+
Intermediate: 'intermediate',
|
|
34
|
+
Advanced: 'advanced',
|
|
35
|
+
Expert: null,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'React',
|
|
40
|
+
levels: {
|
|
41
|
+
Beginner: null,
|
|
42
|
+
Intermediate: null,
|
|
43
|
+
Advanced: null,
|
|
44
|
+
Expert: 'expert',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'Node.js',
|
|
49
|
+
levels: {
|
|
50
|
+
Beginner: null,
|
|
51
|
+
Intermediate: null,
|
|
52
|
+
Advanced: 'advanced',
|
|
53
|
+
Expert: null,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const Example = {
|
|
61
|
+
args: {
|
|
62
|
+
categories: ['Learning', 'Proficient', 'Expert'],
|
|
63
|
+
skills: [
|
|
64
|
+
{
|
|
65
|
+
name: 'TypeScript',
|
|
66
|
+
levels: {
|
|
67
|
+
Learning: null,
|
|
68
|
+
Proficient: null,
|
|
69
|
+
Expert: 'expert',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'GraphQL',
|
|
74
|
+
levels: {
|
|
75
|
+
Learning: null,
|
|
76
|
+
Proficient: 'advanced',
|
|
77
|
+
Expert: null,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'Docker',
|
|
82
|
+
levels: {
|
|
83
|
+
Learning: 'intermediate',
|
|
84
|
+
Proficient: null,
|
|
85
|
+
Expert: null,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
};
|