@payfit/unity-illustrations 2.55.21 → 2.55.23
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/package.json +18 -11
- package/skills/unity-illustrations/SKILL.md +39 -0
- package/src/agent-references/illustrations-catalog.json +1996 -0
- package/src/agent-references/manifest.json +16 -0
- package/dist/esm/scripts/agent-references/illustration-reference.d.ts +0 -17
- package/src/agent-references/README.mdx +0 -17
- package/src/agent-references/illustrations.mdx +0 -74
- package/src/components/illustration/Illustration.stories.tsx +0 -362
- package/src/components/illustration/Illustration.tsx +0 -169
- package/src/components/illustration/figma/IllustrationLarge.figma.ts +0 -258
- package/src/components/illustration/figma/IllustrationMedium.figma.ts +0 -258
- package/src/components/illustration/figma/IllustrationSmall.figma.ts +0 -258
- package/src/components/lazy-illustration/LazyIllustration.stories.tsx +0 -204
- package/src/components/lazy-illustration/LazyIllustration.tsx +0 -125
- package/src/components/lazy-illustration/figma/LazyIllustrationLarge.figma.ts +0 -255
- package/src/components/lazy-illustration/figma/LazyIllustrationMedium.figma.ts +0 -255
- package/src/components/lazy-illustration/figma/LazyIllustrationSmall.figma.ts +0 -255
- package/src/docs/1-Introduction/1-Welcome.mdx +0 -111
- package/src/docs/1-Introduction/2-Getting Started.mdx +0 -25
- package/src/docs/1-Introduction/3-Usage.mdx +0 -114
- package/src/docs/1-Introduction/4-Changelog.mdx +0 -6
- package/src/docs/2-Reference/1-Find my illustration.mdx +0 -12
- package/src/docs/2-Reference/2-Find my animation.mdx +0 -14
- package/src/docs/2-Reference/3-Multi brand support.mdx +0 -146
- package/src/docs/blocks/AnimationLibrary.tsx +0 -181
- package/src/docs/blocks/BrandSupportBadge.tsx +0 -190
- package/src/docs/blocks/BrandSupportFilter.tsx +0 -72
- package/src/docs/blocks/Cards.tsx +0 -74
- package/src/docs/blocks/IllustrationLibrary.tsx +0 -179
- package/src/docs/blocks/useStorybookTheme.ts +0 -73
- package/src/index.ts +0 -4
- package/src/scripts/agent-references/illustration-reference.test.ts +0 -100
- package/src/scripts/agent-references/illustration-reference.ts +0 -140
- package/src/scripts/generate-assets.ts +0 -649
- package/src/scripts/templates/assetTemplate.ts +0 -224
- package/src/scripts/templates/baseTypes.ts +0 -45
- package/src/scripts/templates/indexTemplate.ts +0 -109
- package/src/unity.css +0 -5
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
// url=https://www.figma.com/design/NYcgOc3qMmcEDNqD6kD8J4?node-id=214-3597
|
|
2
|
-
// component=LazyIllustration
|
|
3
|
-
// source=https://github.com/PayFit/hr-apps/blob/master/libs/shared/unity/illustrations/src/components/lazy-illustration/LazyIllustration.tsx
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* AUTO-GENERATED - DO NOT EDIT
|
|
7
|
-
*
|
|
8
|
-
* Template file for Figma Code Connect - LazyIllustration component (Small)
|
|
9
|
-
*
|
|
10
|
-
* Handles dynamic mapping of:
|
|
11
|
-
* - Name property -> PascalCase code name
|
|
12
|
-
* - Type property -> "EmptyState" prefix for empty-state type
|
|
13
|
-
* - With background property -> "WithBackground" suffix
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
import figma from 'figma'
|
|
17
|
-
const instance = figma.selectedInstance
|
|
18
|
-
|
|
19
|
-
const nameValue = instance.getEnum('Name', {
|
|
20
|
-
accounting: 'Accounting',
|
|
21
|
-
activation_button: 'ActivationButton',
|
|
22
|
-
activation_toggle: 'ActivationToggle',
|
|
23
|
-
add_employee: 'AddEmployee',
|
|
24
|
-
administrative_document: 'AdministrativeDocument',
|
|
25
|
-
alphabet_cube: 'AlphabetCube',
|
|
26
|
-
analysis: 'Analysis',
|
|
27
|
-
annual_taxes: 'AnnualTaxes',
|
|
28
|
-
automation_in_progress: 'AutomationInProgress',
|
|
29
|
-
baby_bottle: 'BabyBottle',
|
|
30
|
-
bell: 'Bell',
|
|
31
|
-
bicycle: 'Bicycle',
|
|
32
|
-
big_idea: 'BigIdea',
|
|
33
|
-
binoculars: 'Binoculars',
|
|
34
|
-
biscuit: 'Biscuit',
|
|
35
|
-
biscuit_crumbs: 'BiscuitCrumbs',
|
|
36
|
-
blank_payslip: 'BlankPayslip',
|
|
37
|
-
book: 'Book',
|
|
38
|
-
box: 'Box',
|
|
39
|
-
brainstorming: 'Brainstorming',
|
|
40
|
-
buoy: 'Buoy',
|
|
41
|
-
calculator: 'Calculator',
|
|
42
|
-
calendar: 'Calendar',
|
|
43
|
-
card: 'Card',
|
|
44
|
-
character_headphone: 'CharacterHeadphone',
|
|
45
|
-
chat: 'Chat',
|
|
46
|
-
checkbox: 'Checkbox',
|
|
47
|
-
christmas_sock: 'ChristmasSock',
|
|
48
|
-
christmas_sock_and_confettis: 'ChristmasSockAndConfettis',
|
|
49
|
-
clock: 'Clock',
|
|
50
|
-
closed_lock: 'ClosedLock',
|
|
51
|
-
collaboration: 'Collaboration',
|
|
52
|
-
collective_research: 'CollectiveResearch',
|
|
53
|
-
computer_documentation: 'ComputerDocumentation',
|
|
54
|
-
computer_mail: 'ComputerMail',
|
|
55
|
-
confetti_cannon: 'ConfettiCannon',
|
|
56
|
-
confettis: 'Confettis',
|
|
57
|
-
contact: 'Contact',
|
|
58
|
-
contract_signature: 'ContractSignature',
|
|
59
|
-
conversation: 'Conversation',
|
|
60
|
-
cross_legged: 'CrossLegged',
|
|
61
|
-
cup_of_coffee: 'CupOfCoffee',
|
|
62
|
-
dancing: 'Dancing',
|
|
63
|
-
dancing_people: 'DancingPeople',
|
|
64
|
-
dancing_skier: 'DancingSkier',
|
|
65
|
-
data: 'Data',
|
|
66
|
-
desert: 'Desert',
|
|
67
|
-
dialogue: 'Dialogue',
|
|
68
|
-
discount: 'Discount',
|
|
69
|
-
discussion: 'Discussion',
|
|
70
|
-
doctor: 'Doctor',
|
|
71
|
-
document: 'Document',
|
|
72
|
-
document_creation: 'DocumentCreation',
|
|
73
|
-
document_error: 'DocumentError',
|
|
74
|
-
document_filing: 'DocumentFiling',
|
|
75
|
-
document_scan: 'DocumentScan',
|
|
76
|
-
document_scanning: 'DocumentScanning',
|
|
77
|
-
e_signature: 'ESignature',
|
|
78
|
-
email_login: 'EmailLogin',
|
|
79
|
-
email_notification: 'EmailNotification',
|
|
80
|
-
emergency_contact: 'EmergencyContact',
|
|
81
|
-
employment_contract: 'EmploymentContract',
|
|
82
|
-
empty_document: 'EmptyDocument',
|
|
83
|
-
empty_folder: 'EmptyFolder',
|
|
84
|
-
empty_state: 'EmptyState',
|
|
85
|
-
evaluation: 'Evaluation',
|
|
86
|
-
exceeding_threshold: 'ExceedingThreshold',
|
|
87
|
-
exceptional_compensation: 'ExceptionalCompensation',
|
|
88
|
-
expenses: 'Expenses',
|
|
89
|
-
FAQ: 'FAQ',
|
|
90
|
-
field_glasses: 'FieldGlasses',
|
|
91
|
-
filing_documents: 'FilingDocuments',
|
|
92
|
-
flowchart: 'Flowchart',
|
|
93
|
-
free_share: 'FreeShare',
|
|
94
|
-
full_calendar: 'FullCalendar',
|
|
95
|
-
gear: 'Gear',
|
|
96
|
-
gift: 'Gift',
|
|
97
|
-
golden_ribbon: 'GoldenRibbon',
|
|
98
|
-
graph: 'Graph',
|
|
99
|
-
graphic: 'Graphic',
|
|
100
|
-
half_calendar: 'HalfCalendar',
|
|
101
|
-
hammer: 'Hammer',
|
|
102
|
-
hand_hello: 'HandHello',
|
|
103
|
-
hands: 'Hands',
|
|
104
|
-
happy_character: 'HappyCharacter',
|
|
105
|
-
health: 'Health',
|
|
106
|
-
health_insurance: 'HealthInsurance',
|
|
107
|
-
high_five: 'HighFive',
|
|
108
|
-
highlight_books: 'HighlightBooks',
|
|
109
|
-
holiday_voucher: 'HolidayVoucher',
|
|
110
|
-
idea: 'Idea',
|
|
111
|
-
identity_card: 'IdentityCard',
|
|
112
|
-
incident_panel: 'IncidentPanel',
|
|
113
|
-
indicate_something: 'IndicateSomething',
|
|
114
|
-
information_update: 'InformationUpdate',
|
|
115
|
-
JEI_JEU_JEC: 'JeiJeuJec',
|
|
116
|
-
jetlang_calculator: 'JetlangCalculator',
|
|
117
|
-
kanoon: 'Kanoon',
|
|
118
|
-
kpmg: 'Kpmg',
|
|
119
|
-
legal_help: 'LegalHelp',
|
|
120
|
-
letter_box: 'LetterBox',
|
|
121
|
-
library: 'Library',
|
|
122
|
-
light_bulb: 'LightBulb',
|
|
123
|
-
little_rocket: 'LittleRocket',
|
|
124
|
-
lunch_voucher: 'LunchVoucher',
|
|
125
|
-
magnifying_glass: 'MagnifyingGlass',
|
|
126
|
-
maintenance: 'Maintenance',
|
|
127
|
-
marteler: 'Marteler',
|
|
128
|
-
meal_plate: 'MealPlate',
|
|
129
|
-
meal_voucher: 'MealVoucher',
|
|
130
|
-
meal_voucher_card: 'MealVoucherCard',
|
|
131
|
-
mobility: 'Mobility',
|
|
132
|
-
money_lending: 'MoneyLending',
|
|
133
|
-
moon: 'Moon',
|
|
134
|
-
mug: 'Mug',
|
|
135
|
-
notes: 'Notes',
|
|
136
|
-
official_letter: 'OfficialLetter',
|
|
137
|
-
open_lock: 'OpenLock',
|
|
138
|
-
organismes_payment: 'OrganismesPayment',
|
|
139
|
-
paid_leave: 'PaidLeave',
|
|
140
|
-
panel: 'Panel',
|
|
141
|
-
paper_plane: 'PaperPlane',
|
|
142
|
-
party: 'Party',
|
|
143
|
-
payfitters_with_badge: 'PayfittersWithBadge',
|
|
144
|
-
payment_information: 'PaymentInformation',
|
|
145
|
-
payroll_error: 'PayrollError',
|
|
146
|
-
payslip: 'Payslip',
|
|
147
|
-
payslip_coins: 'PayslipCoins',
|
|
148
|
-
pen: 'Pen',
|
|
149
|
-
people: 'People',
|
|
150
|
-
performance: 'Performance',
|
|
151
|
-
performance_discussion: 'PerformanceDiscussion',
|
|
152
|
-
person: 'Person',
|
|
153
|
-
person_headphone: 'PersonHeadphone',
|
|
154
|
-
personal_details: 'PersonalDetails',
|
|
155
|
-
phone_message: 'PhoneMessage',
|
|
156
|
-
piggy_bank: 'PiggyBank',
|
|
157
|
-
piggy_bank_coins: 'PiggyBankCoins',
|
|
158
|
-
planet: 'Planet',
|
|
159
|
-
plant: 'Plant',
|
|
160
|
-
post_it: 'PostIt',
|
|
161
|
-
progression: 'Progression',
|
|
162
|
-
promotion: 'Promotion',
|
|
163
|
-
provident_scheme: 'ProvidentScheme',
|
|
164
|
-
puzzle: 'Puzzle',
|
|
165
|
-
puzzle_piece: 'PuzzlePiece',
|
|
166
|
-
reading_a_book: 'ReadingABook',
|
|
167
|
-
receiving_pay: 'ReceivingPay',
|
|
168
|
-
rehire_employee: 'RehireEmployee',
|
|
169
|
-
remote: 'Remote',
|
|
170
|
-
remote_work: 'RemoteWork',
|
|
171
|
-
report: 'Report',
|
|
172
|
-
research: 'Research',
|
|
173
|
-
rocket: 'Rocket',
|
|
174
|
-
safe_deposit_box: 'SafeDepositBox',
|
|
175
|
-
salary: 'Salary',
|
|
176
|
-
salary_advance: 'SalaryAdvance',
|
|
177
|
-
salary_payment: 'SalaryPayment',
|
|
178
|
-
salary_seizure: 'SalarySeizure',
|
|
179
|
-
sale: 'Sale',
|
|
180
|
-
sand_castle: 'SandCastle',
|
|
181
|
-
schedule: 'Schedule',
|
|
182
|
-
security_fields: 'SecurityFields',
|
|
183
|
-
set_up_task: 'SetUpTask',
|
|
184
|
-
setting_slider: 'SettingSlider',
|
|
185
|
-
sick_leave: 'SickLeave',
|
|
186
|
-
signature: 'Signature',
|
|
187
|
-
sitting_on_the_sofa: 'SittingOnTheSofa',
|
|
188
|
-
small_puzzle: 'SmallPuzzle',
|
|
189
|
-
smiling_character: 'SmilingCharacter',
|
|
190
|
-
solve_problem: 'SolveProblem',
|
|
191
|
-
speaker_fingertips: 'SpeakerFingertips',
|
|
192
|
-
speaker_welcome: 'SpeakerWelcome',
|
|
193
|
-
speaker_with_microphone: 'SpeakerWithMicrophone',
|
|
194
|
-
spreadsheet: 'Spreadsheet',
|
|
195
|
-
stack_of_book_2: 'StackOfBook2',
|
|
196
|
-
stair_treads: 'StairTreads',
|
|
197
|
-
stethoscope: 'Stethoscope',
|
|
198
|
-
stock_options: 'StockOptions',
|
|
199
|
-
stopwatch: 'Stopwatch',
|
|
200
|
-
sunshade: 'Sunshade',
|
|
201
|
-
taking_note: 'TakingNote',
|
|
202
|
-
target: 'Target',
|
|
203
|
-
task_to_do: 'TaskToDo',
|
|
204
|
-
team_building: 'TeamBuilding',
|
|
205
|
-
telescope: 'Telescope',
|
|
206
|
-
template: 'Template',
|
|
207
|
-
template_form: 'TemplateForm',
|
|
208
|
-
thumbsup: 'Thumbsup',
|
|
209
|
-
thumbtack: 'Thumbtack',
|
|
210
|
-
time_tracking: 'TimeTracking',
|
|
211
|
-
timer: 'Timer',
|
|
212
|
-
tips_jar: 'TipsJar',
|
|
213
|
-
to_do: 'ToDo',
|
|
214
|
-
toggle_off: 'ToggleOff',
|
|
215
|
-
toggle_on: 'ToggleOn',
|
|
216
|
-
token_coin: 'TokenCoin',
|
|
217
|
-
trophy: 'Trophy',
|
|
218
|
-
trophy_won: 'TrophyWon',
|
|
219
|
-
validation_window: 'ValidationWindow',
|
|
220
|
-
visually_impaired: 'VisuallyImpaired',
|
|
221
|
-
visually_impaired_winter: 'VisuallyImpairedWinter',
|
|
222
|
-
walking_people: 'WalkingPeople',
|
|
223
|
-
winter_party: 'WinterParty',
|
|
224
|
-
work_at_office: 'WorkAtOffice',
|
|
225
|
-
work_expense: 'WorkExpense',
|
|
226
|
-
work_from_anywhere: 'WorkFromAnywhere',
|
|
227
|
-
working_time: 'WorkingTime',
|
|
228
|
-
wrench: 'Wrench',
|
|
229
|
-
write_book: 'WriteBook',
|
|
230
|
-
})
|
|
231
|
-
|
|
232
|
-
const typeValue = instance.getEnum('Type', {
|
|
233
|
-
generic: 'generic',
|
|
234
|
-
specific: 'specific',
|
|
235
|
-
'empty-state': 'empty-state',
|
|
236
|
-
})
|
|
237
|
-
|
|
238
|
-
const withBackgroundValue = instance.getBoolean('With background')
|
|
239
|
-
const nameWithType =
|
|
240
|
-
typeValue === 'empty-state' ? `EmptyState${nameValue ?? ''}` : nameValue
|
|
241
|
-
const finalSrc = withBackgroundValue
|
|
242
|
-
? `${nameWithType}WithBackground`
|
|
243
|
-
: nameWithType
|
|
244
|
-
|
|
245
|
-
const code = figma.tsx`<LazyIllustration
|
|
246
|
-
src="${finalSrc}"
|
|
247
|
-
variant="picture"
|
|
248
|
-
alt="${finalSrc} illustration"
|
|
249
|
-
/>`
|
|
250
|
-
|
|
251
|
-
export default {
|
|
252
|
-
id: 'lazyillustration-small',
|
|
253
|
-
example: code,
|
|
254
|
-
imports: ["import { LazyIllustration } from '@payfit/unity-illustrations'"],
|
|
255
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { Meta, Subtitle } from '@storybook/addon-docs/blocks'
|
|
2
|
-
import { Card, CardWithCover, CardHeader, CardTitle, CardContent, CardActions, Link } from '../blocks/Cards'
|
|
3
|
-
|
|
4
|
-
<Meta title="Introduction/1-Welcome" />
|
|
5
|
-
|
|
6
|
-
<img src="/images/unity-illustrations-cover.jpg" alt="Unity illustrations cover" style={{ width: '100%', marginBottom: '2rem' }} />
|
|
7
|
-
|
|
8
|
-
# Unity Illustrations
|
|
9
|
-
|
|
10
|
-
<Subtitle>Unity Illustrations is the Illustration library for the Unity Design system. Illustrations are scalable graphics that can be used to represent concepts, objects, or actions, and create visual interest and appeal. They can be static or animated.</Subtitle>
|
|
11
|
-
|
|
12
|
-
<section className="uy:grid uy:grid-cols-1 uy:gap-150 uy:sm:grid-cols-2">
|
|
13
|
-
<Card>
|
|
14
|
-
<CardHeader>
|
|
15
|
-
<CardTitle>Getting Started</CardTitle>
|
|
16
|
-
</CardHeader>
|
|
17
|
-
<CardContent>
|
|
18
|
-
<p className="sb-unstyled uy:m-0">Set up a new project with Unity Illustrations or add it to an existing project.</p>
|
|
19
|
-
</CardContent>
|
|
20
|
-
<CardActions>
|
|
21
|
-
<Link href="/?path=/docs/introduction-2-getting-started--docs">Get Started</Link>
|
|
22
|
-
</CardActions>
|
|
23
|
-
</Card>
|
|
24
|
-
<Card>
|
|
25
|
-
<CardHeader>
|
|
26
|
-
<CardTitle>Usage</CardTitle>
|
|
27
|
-
</CardHeader>
|
|
28
|
-
<CardContent>
|
|
29
|
-
<p className="sb-unstyled uy:m-0">Learn how to use the Illustrations in your project.</p>
|
|
30
|
-
</CardContent>
|
|
31
|
-
<CardActions>
|
|
32
|
-
<Link href="/?path=/docs/introduction-3-usage--docs">Learn to use</Link>
|
|
33
|
-
</CardActions>
|
|
34
|
-
</Card>
|
|
35
|
-
</section>
|
|
36
|
-
|
|
37
|
-
## Our approach
|
|
38
|
-
|
|
39
|
-
### Performant
|
|
40
|
-
|
|
41
|
-
Unity Illustrations are designed to be lightweight and tree-shakable, ensuring that you only bundle the illustrations you need.
|
|
42
|
-
|
|
43
|
-
### Easy to use
|
|
44
|
-
|
|
45
|
-
Unity Illustrations are easy to use and integrate into your project. You can use them in any React project.
|
|
46
|
-
|
|
47
|
-
### Accessible
|
|
48
|
-
|
|
49
|
-
Unity Illustrations are built with accessibility in mind and follow the best practices for creating accessible illustrations.
|
|
50
|
-
|
|
51
|
-
## Related packages
|
|
52
|
-
|
|
53
|
-
Unity Illustrations is part of the Unity Design System, and is particularly thought out to work with the Unity components library. Here are the main packages you might want to use in conjunction with Unity Illustrations:
|
|
54
|
-
|
|
55
|
-
<section className="uy:grid uy:grid-cols-1 uy:gap-150 uy:sm:grid-cols-2">
|
|
56
|
-
<CardWithCover coverSrc="images/unity-themes-cover.png" coverAlt="Unity themes">
|
|
57
|
-
<CardHeader>
|
|
58
|
-
<CardTitle>Unity themes</CardTitle>
|
|
59
|
-
</CardHeader>
|
|
60
|
-
<CardContent>
|
|
61
|
-
<p className="sb-unstyled uy:m-0">
|
|
62
|
-
Unity themes provides the base implementation of the foundational principles of the Unity Design system as a TailwindCSS preset.
|
|
63
|
-
</p>
|
|
64
|
-
</CardContent>
|
|
65
|
-
<CardActions>
|
|
66
|
-
<Link href="https://unity-theme.payfit.io/" target="_blank" rel="noopener noreferrer">Visit Unity themes</Link>
|
|
67
|
-
</CardActions>
|
|
68
|
-
</CardWithCover>
|
|
69
|
-
<CardWithCover coverSrc="images/unity-components-cover.png" coverAlt="Unity components">
|
|
70
|
-
<CardHeader>
|
|
71
|
-
<CardTitle>Unity components</CardTitle>
|
|
72
|
-
</CardHeader>
|
|
73
|
-
<CardContent>
|
|
74
|
-
<p className="sb-unstyled uy:m-0">
|
|
75
|
-
Unity components is a library of React components that implement the Unity Design system.
|
|
76
|
-
</p>
|
|
77
|
-
</CardContent>
|
|
78
|
-
<CardActions>
|
|
79
|
-
<Link href="https://unity-components.payfit.io/" target="_blank" rel="noopener noreferrer">Visit Unity components</Link>
|
|
80
|
-
</CardActions>
|
|
81
|
-
</CardWithCover>
|
|
82
|
-
</section>
|
|
83
|
-
|
|
84
|
-
## Need help?
|
|
85
|
-
|
|
86
|
-
If you have any questions or a request related to Unity Illustrations, feel free to reach out to the Frontend Framework team on Slack. If you need to know more about the foundations and guidelines of Unity, visit the design system's main documentation.
|
|
87
|
-
|
|
88
|
-
<section className="uy:grid uy:grid-cols-1 uy:gap-150 uy:sm:grid-cols-2">
|
|
89
|
-
<Card>
|
|
90
|
-
<CardHeader>
|
|
91
|
-
<CardTitle>Contact the team</CardTitle>
|
|
92
|
-
</CardHeader>
|
|
93
|
-
<CardContent>
|
|
94
|
-
<p className="sb-unstyled uy:m-0">Send us any questions, help requests or bug reports to The Front-end Framework's team slack channel</p>
|
|
95
|
-
</CardContent>
|
|
96
|
-
<CardActions>
|
|
97
|
-
<Link href="https://payfit.slack.com/archives/C05UJ6A1FJT" target="_blank" rel="noopener noreferrer">#ask-frontend-framework</Link>
|
|
98
|
-
</CardActions>
|
|
99
|
-
</Card>
|
|
100
|
-
<Card>
|
|
101
|
-
<CardHeader>
|
|
102
|
-
<CardTitle>Payfit.design</CardTitle>
|
|
103
|
-
</CardHeader>
|
|
104
|
-
<CardContent>
|
|
105
|
-
<p className="sb-unstyled uy:m-0">Learn more about the design foundation and component usage guidelines of Unity</p>
|
|
106
|
-
</CardContent>
|
|
107
|
-
<CardActions>
|
|
108
|
-
<Link href="https://www.payfit.design/24f360409/p/35fcc1-payfit-design-system" target="_blank" rel="noopener noreferrer">Visit payfit.design</Link>
|
|
109
|
-
</CardActions>
|
|
110
|
-
</Card>
|
|
111
|
-
</section>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import {Meta} from "@storybook/addon-docs/blocks";
|
|
2
|
-
|
|
3
|
-
<Meta title="Introduction/2-Getting Started" />
|
|
4
|
-
|
|
5
|
-
# Getting Started
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
Install the package in your project. We recommend you use this package alongside `@payfit/unity-themes`.
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
yarn add @payfit/unity-themes @payfit/unity-illustrations
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Ensure that `react` and `react-dom` are also installed in your project:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
yarn add react react-dom
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
You are now ready to use the illustrations in your application.
|
|
22
|
-
|
|
23
|
-
## Browser Support
|
|
24
|
-
|
|
25
|
-
This package supports all modern evergreen browsers. It does not support IE.
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import {Meta} from "@storybook/addon-docs/blocks";
|
|
2
|
-
|
|
3
|
-
<Meta title="Introduction/3-Usage" />
|
|
4
|
-
|
|
5
|
-
# Usage
|
|
6
|
-
|
|
7
|
-
Unity illustrations has two main concepts:
|
|
8
|
-
|
|
9
|
-
- Import the illustration asset you want to use from `@payfit/unity-illustrations` as a direct import
|
|
10
|
-
- Render any illustration asset with the `Illustration` component
|
|
11
|
-
- Render an illustration by name with `LazyIllustration` when you want the asset to be loaded on demand
|
|
12
|
-
|
|
13
|
-
```tsx
|
|
14
|
-
import { Illustration } from '@payfit/unity-illustrations'
|
|
15
|
-
import DashboardIllustration from '@payfit/unity-illustrations/assets/Dashboard'
|
|
16
|
-
|
|
17
|
-
function MyComponent() {
|
|
18
|
-
return <Illustration src={DashboardIllustration} alt="Dashboard illustration" variant="picture" />
|
|
19
|
-
}
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
You can customize the illustration's size and other properties using the class names from `@payfit/unity-themes`.
|
|
23
|
-
|
|
24
|
-
```tsx
|
|
25
|
-
import { Illustration } from '@payfit/unity-illustrations'
|
|
26
|
-
import DashboardIllustration from '@payfit/unity-illustrations/assets/Dashboard'
|
|
27
|
-
|
|
28
|
-
function MyComponent() {
|
|
29
|
-
// Square illustration with dimension --uy:spacing-600 (48px)
|
|
30
|
-
return <Illustration src={DashboardIllustration} alt="Dashboard illustration" variant="picture" className="uy:size-600" />
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## API
|
|
35
|
-
|
|
36
|
-
### Individual imports
|
|
37
|
-
|
|
38
|
-
The illustrations library exports all the illustrations as named imports, referencing the underlying SVG or Image asset internally. This allows you to use the illustrations in your project without bundling the entire library, and to have better discoverability and type-safety over the assets that you can use.
|
|
39
|
-
|
|
40
|
-
```tsx
|
|
41
|
-
import { Illustration } from '@payfit/unity-illustrations'
|
|
42
|
-
import DashboardIllustration from '@payfit/unity-illustrations/assets/Dashboard'
|
|
43
|
-
|
|
44
|
-
function MyComponent() {
|
|
45
|
-
return <Illustration src={DashboardIllustration} alt="Dashboard illustration" variant="picture" />
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### Brand-aware rendering
|
|
50
|
-
|
|
51
|
-
Static SVG illustrations can carry legacy and rebrand URLs. `Illustration` reads the active Unity theme from `UnityThemeProvider` and chooses `asset.urls[theme]` when it exists, falling back to `asset.url`.
|
|
52
|
-
|
|
53
|
-
```tsx
|
|
54
|
-
import { UnityThemeProvider } from '@payfit/unity-themes'
|
|
55
|
-
import { Illustration } from '@payfit/unity-illustrations'
|
|
56
|
-
import DashboardIllustration from '@payfit/unity-illustrations/assets/Dashboard'
|
|
57
|
-
|
|
58
|
-
function MyComponent() {
|
|
59
|
-
return (
|
|
60
|
-
<UnityThemeProvider theme="rebrand">
|
|
61
|
-
<Illustration src={DashboardIllustration} alt="Dashboard illustration" variant="picture" />
|
|
62
|
-
</UnityThemeProvider>
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
The generated `asset.url` field is kept for backwards compatibility. For assets present in both catalogs, it points to the legacy/default SVG. For assets that exist only in rebrand, `asset.url`, `asset.urls.legacy`, and `asset.urls.rebrand` all point to the rebrand SVG. Use `Illustration` or `LazyIllustration` when the rendered image must follow the active Unity theme.
|
|
68
|
-
|
|
69
|
-
`LazyIllustration` follows the same theme-aware behavior after it loads the requested asset by name.
|
|
70
|
-
|
|
71
|
-
```tsx
|
|
72
|
-
import { UnityThemeProvider } from '@payfit/unity-themes'
|
|
73
|
-
import { LazyIllustration } from '@payfit/unity-illustrations'
|
|
74
|
-
|
|
75
|
-
function MyComponent() {
|
|
76
|
-
return (
|
|
77
|
-
<UnityThemeProvider theme="rebrand">
|
|
78
|
-
<LazyIllustration name="Dashboard" alt="Dashboard illustration" variant="picture" />
|
|
79
|
-
</UnityThemeProvider>
|
|
80
|
-
)
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### Dynamic imports
|
|
85
|
-
|
|
86
|
-
Use `LazyIllustration` to import illustrations on demand. This is useful if you want to load illustrations only when they are needed or under certain dynamic conditions.
|
|
87
|
-
|
|
88
|
-
```tsx
|
|
89
|
-
import { LazyIllustration } from '@payfit/unity-illustrations'
|
|
90
|
-
|
|
91
|
-
function MyComponent() {
|
|
92
|
-
return <LazyIllustration name="Dashboard" alt="Dashboard illustration" variant="picture" className="uy:size-600" />
|
|
93
|
-
}
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
> **Note:** Avoid using variables in dynamic imports, like `const Dashboard = await import('@payfit/unity-illustrations/${illustrationName}')`, as it will not be able to be tree-shaken.
|
|
97
|
-
|
|
98
|
-
## TypeScript Support
|
|
99
|
-
|
|
100
|
-
This package includes TypeScript definitions, and a list of all the available illustration names is exported as a type.
|
|
101
|
-
|
|
102
|
-
```tsx
|
|
103
|
-
import { type UnityIllustrationName, illustrationNames } from '@payfit/unity-illustrations'
|
|
104
|
-
|
|
105
|
-
const myIllustrations: UnityIllustrationName[] = ['Dashboard', 'FAQ', 'Library']
|
|
106
|
-
|
|
107
|
-
console.log(illustrationNames) // ['Dashboard', 'DashboardOutlined', ...+309 illustrations more]
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
## Asset layout
|
|
111
|
-
|
|
112
|
-
The legacy catalog lives under `assets/legacy/`. Static rebrand SVGs live directly under `assets/rebrand/` and are paired with legacy assets by the same logical name derivation used for generated imports.
|
|
113
|
-
|
|
114
|
-
Every legacy SVG must have a rebrand SVG with the same generated name. Extra rebrand-only SVGs are allowed and generate assets whose default, legacy, and rebrand URLs all use the rebrand source. Static brand-aware illustrations are SVG-only; raster density variants are out of scope for this launch. Animated WEBP illustrations keep their existing generated image contract and do not need theme-specific URLs.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {Meta} from "@storybook/addon-docs/blocks";
|
|
2
|
-
import IllustrationLibrary from "../blocks/IllustrationLibrary"
|
|
3
|
-
|
|
4
|
-
<Meta title="Reference/Find my illustration" />
|
|
5
|
-
|
|
6
|
-
# Find my illustration
|
|
7
|
-
|
|
8
|
-
Unity Illustrations is made up of more than 200 SVG illustrations and animated images. Each illustration is referenced by its name in Pascal Case. You can look for the illustration you need in the table using the search field.
|
|
9
|
-
|
|
10
|
-
Refer to the [Usage](/?path=/docs/introduction-3-usage--docs) section to learn how to use the names to render icons in your application.
|
|
11
|
-
|
|
12
|
-
<IllustrationLibrary />
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {Meta} from "@storybook/addon-docs/blocks";
|
|
2
|
-
import AnimationLibrary from "../blocks/AnimationLibrary"
|
|
3
|
-
|
|
4
|
-
<Meta title="Reference/Find my animation" />
|
|
5
|
-
|
|
6
|
-
# Find my animation
|
|
7
|
-
|
|
8
|
-
Unity Illustrations includes a collection of animated illustrations in WEBP format. Each animated illustration has the `Animation` suffix in its name and follows the same usage patterns as static illustrations. You can browse and search for the animation you need in the gallery below.
|
|
9
|
-
|
|
10
|
-
Animated illustrations are fluid and responsive, but capped at their original dimensions to prevent oversizing. They use CSS custom properties to maintain optimal aspect ratios across different screen sizes.
|
|
11
|
-
|
|
12
|
-
Refer to the [Usage](/?path=/docs/introduction-3-usage--docs) section to learn how to use animation names to render them in your application.
|
|
13
|
-
|
|
14
|
-
<AnimationLibrary />
|