Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/metal-needles-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cube-dev/ui-kit": minor
---

Add new icons: PercentageIcon, CurrencyDollarIcon, Number123Icon.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"clear:dist": "rimraf ./dist",
"release": "pnpm build && changeset publish",
"postinstall": "git config blame.ignoreRevsFile .git-blame-ignore-revs",
"add-icons": "cd src/icons && node add-new-icon.js"
"add-icons": "cd src/icons && node add-new-icon.js && pnpm fix"
},
"publishConfig": {
"directory": "dist"
Expand Down
20 changes: 20 additions & 0 deletions src/icons/CurrencyDollarIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { wrapIcon } from './wrap-icon';

export const CurrencyDollarIcon = wrapIcon(
'CurrencyDollarIcon',
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
fill="none"
viewBox="0 0 24 24"
>
<path
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
d="M16.7 8A3 3 0 0 0 14 6h-4a3 3 0 1 0 0 6h4a3 3 0 0 1 0 6h-4a3 3 0 0 1-2.7-2M12 3v3m0 12v3"
/>
</svg>,
);
20 changes: 20 additions & 0 deletions src/icons/Number123Icon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { wrapIcon } from './wrap-icon';

export const Number123Icon = wrapIcon(
'Number123Icon',
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
fill="none"
viewBox="0 0 24 24"
>
<path
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
d="m3 10 2-2v8m4-8h3a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h3m4-8h2.5A1.5 1.5 0 0 1 21 9.5v1a1.5 1.5 0 0 1-1.5 1.5m0 0H18m1.5 0a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1-1.5 1.5H17"
/>
</svg>,
);
20 changes: 20 additions & 0 deletions src/icons/PercentageIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { wrapIcon } from './wrap-icon';

export const PercentageIcon = wrapIcon(
'PercentageIcon',
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
fill="none"
viewBox="0 0 24 24"
>
<path
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
d="M6 18 18 6m-2 11a1 1 0 1 0 2 0 1 1 0 0 0-2 0M6 7a1 1 0 1 0 2 0 1 1 0 0 0-2 0"
/>
</svg>,
);
5 changes: 4 additions & 1 deletion src/icons/add-new-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ import prettier from 'prettier';
let svgContent = fs.readFileSync(svgFile, 'utf8');

// Replace '#43436B' with 'currentColor'
svgContent = svgContent.replace(/#43436B/g, 'currentColor');
svgContent = svgContent.replace(
/("#43436B"|"#000"|"#000000"|"black")/g,
'"currentColor"',
);

// Ensure the <svg> tag has a viewBox attribute; if not, add one.
const svgTagMatch = svgContent.match(/<svg\b([^>]*)>/);
Expand Down
3 changes: 3 additions & 0 deletions src/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export { CodeIcon } from './CodeIcon';
export { CopyIcon } from './CopyIcon';
export { CountIcon } from './CountIcon';
export { CubeIcon } from './CubeIcon';
export { CurrencyDollarIcon } from './CurrencyDollarIcon';
export { DangerIcon } from './DangerIcon';
export { DashboardIcon } from './DashboardIcon';
export { DatabaseIcon } from './DatabaseIcon';
Expand Down Expand Up @@ -72,10 +73,12 @@ export { LockFilledIcon } from './LockFilledIcon';
export { LockIcon } from './LockIcon';
export { MoreIcon } from './MoreIcon';
export { NotAllowedIcon } from './NotAllowedIcon';
export { Number123Icon } from './Number123Icon';
export { NumberIcon } from './NumberIcon';
export { PauseCircleFilledIcon } from './PauseCircleFilledIcon';
export { PauseCircleIcon } from './PauseCircleIcon';
export { PauseIcon } from './PauseIcon';
export { PercentageIcon } from './PercentageIcon';
export { PieChartIcon } from './PieChartIcon';
export { PlayCircleIcon } from './PlayCircleIcon';
export { PlayIcon } from './PlayIcon';
Expand Down
Loading