docs: updated guideline icons (#2676)
* docs: updated guideline icons * Update docs/images/1px-border-radius.svg * Update docs/images/1px-border-radius.svg * Update docs/images/1px-padding.svg * Update docs/images/24px-24px.svg * Update docs/images/2px-element-spacing.svg * Update docs/images/2px-stroke.svg
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.9 KiB |
@@ -49,9 +49,11 @@
|
||||
<path d="M120 350h240" stroke="#D8D8D9" stroke-width=".5"/>
|
||||
<path d="M350 120v240" stroke="#D8D8D9" stroke-width=".5"/>
|
||||
</g>
|
||||
<path d="m240 140-100 50 100 50 100-50-100-50Z" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="m140 290 100 50 100-50" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="m140 240 100 50 100-50" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<g id="embed-lucide-layers" stroke="#3C3C43" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" transform="translate(120 120), scale(10)">
|
||||
<path d="M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z" />
|
||||
<path d="M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12" />
|
||||
<path d="M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17" />
|
||||
</g>
|
||||
<g opacity=".5" stroke="#fff" stroke-width="3">
|
||||
<path d="M120 92v16"/>
|
||||
<path d="M360 92v16"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -53,9 +53,13 @@
|
||||
<path d="M350 120V360" stroke="#D8D8D9" stroke-width="0.5"/>
|
||||
</g>
|
||||
<g clip-path="url(#clip1_1612_15659)">
|
||||
<path d="M310 260C324.9 245.4 340 227.9 340 205C340 190.413 334.205 176.424 323.891 166.109C313.576 155.795 299.587 150 285 150C267.4 150 255 155 240 170C225 155 212.6 150 195 150C180.413 150 166.424 155.795 156.109 166.109C145.795 176.424 140 190.413 140 205C140 228 155 245.5 170 260L240 330L310 260Z" stroke="#F56565" stroke-width="60" stroke-linejoin="round" stroke-dasharray="0.2 0.4"/>
|
||||
<g id="embed-lucide-heart" stroke="#F56565" stroke-width="7" stroke-dasharray="0.04 0.08" stroke-linejoin="round" transform="translate(120 120), scale(10)">
|
||||
<path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z" />
|
||||
</g>
|
||||
</g>
|
||||
<g id="embed-lucide-heart" stroke="#3C3C43" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" transform="translate(120 120), scale(10)">
|
||||
<path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z" />
|
||||
</g>
|
||||
<path d="M310 260C324.9 245.4 340 227.9 340 205C340 190.413 334.205 176.424 323.891 166.109C313.576 155.795 299.587 150 285 150C267.4 150 255 155 240 170C225 155 212.6 150 195 150C180.413 150 166.424 155.795 156.109 166.109C145.795 176.424 140 190.413 140 205C140 228 155 245.5 170 260L240 330L310 260Z" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<defs>
|
||||
<clipPath id="clip0_1612_15659">
|
||||
<rect x="120" y="120" width="240" height="240" rx="8" fill="white"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@@ -52,16 +52,18 @@
|
||||
<path d="M120 350H360" stroke="#D8D8D9" stroke-width="0.5"/>
|
||||
<path d="M350 120V360" stroke="#D8D8D9" stroke-width="0.5"/>
|
||||
</g>
|
||||
<path d="M310 160H170C158.954 160 150 168.954 150 180V320C150 331.046 158.954 340 170 340H310C321.046 340 330 331.046 330 320V180C330 168.954 321.046 160 310 160Z" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M280 140V180" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M200 140V180" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M150 220H330" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M200 260H200.1" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M240 260H240.1" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M280 260H280.1" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M200 300H200.1" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M240 300H240.1" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M280 300H280.1" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<g id="embed-lucide-calendar-days" stroke="#3C3C43" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" transform="translate(120 120), scale(10)">
|
||||
<path d="M8 2v4" />
|
||||
<path d="M16 2v4" />
|
||||
<rect width="18" height="18" x="3" y="4" rx="2" />
|
||||
<path d="M3 10h18" />
|
||||
<path d="M8 14h.01" />
|
||||
<path d="M12 14h.01" />
|
||||
<path d="M16 14h.01" />
|
||||
<path d="M8 18h.01" />
|
||||
<path d="M12 18h.01" />
|
||||
<path d="M16 18h.01" />
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_1612_15298">
|
||||
<rect x="120" y="120" width="240" height="240" rx="8" fill="white"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 16 KiB |
@@ -54,10 +54,12 @@
|
||||
</g>
|
||||
<circle opacity="0.17" cx="240" cy="240" r="100" stroke="#F56565" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<rect opacity="0.17" x="150" y="150" width="180" height="180" rx="20" stroke="#F56565" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M330 330L270 270M330 330V282M330 330H282" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M150 282V330M150 330H198M150 330L210 270" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M330 198V150M330 150H282M330 150L270 210" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M150 198V150M150 150H198M150 150L210 210" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<g id="embed-lucide-expand" stroke="#3C3C43" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" transform="translate(120 120), scale(10)">
|
||||
<path d="m21 21-6-6m6 6v-4.8m0 4.8h-4.8" />
|
||||
<path d="M3 16.2V21m0 0h4.8M3 21l6-6" />
|
||||
<path d="M21 7.8V3m0 0h-4.8M21 3l-6 6" />
|
||||
<path d="M3 7.8V3m0 0h4.8M3 3l6 6" />
|
||||
</g>
|
||||
<circle opacity="0.5" cx="240" cy="240" r="100" stroke="#F56565" stroke-dasharray="1 1"/>
|
||||
<rect opacity="0.5" x="150" y="150" width="180" height="180" rx="20" stroke="#F56565" stroke-dasharray="1 1"/>
|
||||
<defs>
|
||||
|
||||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -54,7 +54,9 @@
|
||||
<path d="M120 350H360" stroke="#D8D8D9" stroke-width="0.5"/>
|
||||
<path d="M350 120V360" stroke="#D8D8D9" stroke-width="0.5"/>
|
||||
</g>
|
||||
<path d="M150 150L220.7 320L245.8 246.1L320 220.7L150 150Z" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<g id="embed-lucide-mouse-pointer-2" stroke="#3C3C43" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" transform="translate(110 110), scale(10)">
|
||||
<path d="M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z" />
|
||||
</g>
|
||||
<path opacity="0.5" d="M240 120V360M360 240H120" stroke="#F56565" stroke-dasharray="1 1"/>
|
||||
</g>
|
||||
<defs>
|
||||
|
||||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
@@ -53,7 +53,9 @@
|
||||
<path d="M120 350H360" stroke="#D8D8D9" stroke-width="0.5"/>
|
||||
<path d="M350 120V360" stroke="#D8D8D9" stroke-width="0.5"/>
|
||||
</g>
|
||||
<path d="M160 160L230.7 330L255.8 256.1L330 230.7L160 160Z" stroke="#3C3C43" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<g id="embed-lucide-mouse-pointer-2" stroke="#3C3C43" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" transform="translate(120 120), scale(10)">
|
||||
<path d="M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z" />
|
||||
</g>
|
||||
<path opacity="0.5" d="M240 120V360M360 240H120" stroke="#F56565" stroke-dasharray="1 1"/>
|
||||
</g>
|
||||
<defs>
|
||||
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
30
scripts/updateGuidelineIcons.mjs
Normal file
@@ -0,0 +1,30 @@
|
||||
import path from 'path';
|
||||
import { readdirSync, readFileSync, writeFileSync } from 'fs';
|
||||
|
||||
for (const file of readdirSync(path.join(import.meta.dirname, '../docs/images'))) {
|
||||
if (!file.endsWith('.svg')) continue;
|
||||
const fileName = path.join(import.meta.dirname, '../docs/images', file);
|
||||
const oldFileContent = readFileSync(fileName, 'utf8');
|
||||
const newFileContent = oldFileContent
|
||||
.split('</g>')
|
||||
.map((val) =>
|
||||
val.replace(
|
||||
/(<g id="embed-lucide-([^"]*).*>)(.|\n)*/gm,
|
||||
(_, groupOpeningTag, iconName) =>
|
||||
[
|
||||
groupOpeningTag,
|
||||
...readFileSync(path.join(import.meta.dirname, `../icons/${iconName}.svg`), 'utf8')
|
||||
.replace(/(<svg)([^>]|\n)*>|<\/svg>/g, '')
|
||||
.split('\n'),
|
||||
]
|
||||
.map((val) => val.trimEnd())
|
||||
.filter(Boolean)
|
||||
.join('\n') + '\n',
|
||||
),
|
||||
)
|
||||
.join('</g>');
|
||||
if (oldFileContent !== newFileContent) {
|
||||
console.log(`Updating ${fileName}`);
|
||||
writeFileSync(fileName, newFileContent);
|
||||
}
|
||||
}
|
||||