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
8 changes: 8 additions & 0 deletions packages/spindle-ui/.svgrrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"typescript": true,
"icon": true,
"ignoreExisting": true,
"svgProps": {
"role": "img"
}
}
10 changes: 9 additions & 1 deletion packages/spindle-ui/bundlesize.config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
{
"files": [
{
"path": "./dist/**/*.js",
"path": "./dist/Icon/index.js",
"maxSize": "5 kB"
},
{
"path": "./dist/Icon/!(index).js",
"maxSize": "1.5 kB"
},
{
"path": "./dist/!(Icon)/*.js",
"maxSize": "1 kB"
},
{
Expand Down
6 changes: 5 additions & 1 deletion packages/spindle-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
"prebuild": "yarn clean",
"build": "run-p build:*",
"build:script": "tsc",
"build:style": "postcss src/**/*.css src/*.css --base src -d dist/"
"build:style": "postcss src/**/*.css src/*.css --base src -d dist/",
"preicon": "npx rimraf 'src/Icon/!(*.stories).tsx' && npx cpx '../spindle-icons/dist/!(sprite).svg' icon-tmp",
"icon": "svgr --out-dir src/Icon icon-tmp",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spindle-iconの更新と同じタイミングで実行するコマンドです。どこかしらで自動にするかは検討中・・・。

"posticon": "npx rimraf icon-tmp"
},
"license": "MIT",
"private": true,
Expand All @@ -34,6 +37,7 @@
"@storybook/addon-a11y": "^5.3.19",
"@storybook/addon-actions": "^5.3.19",
"@storybook/react": "^5.3.19",
"@svgr/cli": "^5.4.0",
"@types/chai": "^4.2.12",
"@types/enzyme": "^3.10.5",
"@types/enzyme-adapter-react-16": "^1.0.6",
Expand Down
5 changes: 5 additions & 0 deletions packages/spindle-ui/src/Icon/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off"
}
}
18 changes: 18 additions & 0 deletions packages/spindle-ui/src/Icon/Accesspage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as React from 'react';

function SvgAccesspage(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
role="img"
{...props}
>
<path d="M17.44 5.8h-.85v-.85c0-1.52-1.23-2.75-2.75-2.75H6.56c-1.52 0-2.75 1.23-2.75 2.75v10.5c0 1.52 1.23 2.75 2.75 2.75h.85v.85c0 1.52 1.23 2.75 2.75 2.75h3.62c.73 0 1.42-.29 1.94-.81l3.66-3.66c.52-.52.81-1.21.81-1.94V8.55c0-1.51-1.23-2.75-2.75-2.75zM7.41 8.55v8.15h-.85c-.69 0-1.25-.56-1.25-1.25V4.95c0-.69.56-1.25 1.25-1.25h7.28c.69 0 1.25.56 1.25 1.25v.85h-4.92c-1.52 0-2.76 1.24-2.76 2.75zm1.5 10.5V8.55c0-.69.56-1.25 1.25-1.25h7.28c.69 0 1.25.56 1.25 1.25v6.51H15.2c-.96 0-1.75.79-1.75 1.75v3.49h-3.29c-.69 0-1.25-.56-1.25-1.25zm6.04.59v-2.83c0-.14.11-.25.25-.25h2.83l-3.08 3.08z" />
</svg>
);
}

export default SvgAccesspage;
22 changes: 22 additions & 0 deletions packages/spindle-ui/src/Icon/AccesspageFill.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import * as React from 'react';

function SvgAccesspageFill(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
role="img"
{...props}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M16.4 4.09H7.62c-1.11 0-2 .89-2 2v11.97c0 .06.01.12.02.18a1.991 1.991 0 01-1.82-1.98V4.29c0-1.1.9-2 2-2h8.78c1.04 0 1.89.8 1.98 1.82-.06-.01-.12-.02-.18-.02zM9.42 5.82h8.78c1.1 0 2 .9 2 2v7.72c0 .63-.25 1.24-.7 1.69l-3.86 3.86c-.45.45-1.05.7-1.69.7H9.42c-1.1 0-2-.9-2-2V7.82c0-1.1.9-2 2-2zm5.07 13.7l3.43-3.43c.25-.26.07-.69-.28-.69h-3.03c-.44 0-.8.36-.8.8v3.04c0 .35.43.53.68.28z"
/>
</svg>
);
}

export default SvgAccesspageFill;
22 changes: 22 additions & 0 deletions packages/spindle-ui/src/Icon/Align.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import * as React from 'react';

function SvgAlign(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
role="img"
{...props}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M20.03 6h-16c-.56 0-1-.45-1-1s.45-1 1-1h16c.55 0 1 .45 1 1s-.45 1-1 1zm-5 4.66h-11c-.56 0-1-.45-1-1s.45-1 1-1h11c.55 0 1 .45 1 1s-.45 1-1 1zm5 2.66h-16c-.55 0-1 .45-1 1s.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1zm-16 4.66h11c.55 0 1 .45 1 1s-.45 1-1 1h-11c-.55 0-1-.45-1-1s.45-1 1-1z"
/>
</svg>
);
}

export default SvgAlign;
22 changes: 22 additions & 0 deletions packages/spindle-ui/src/Icon/All.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import * as React from 'react';

function SvgAll(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
role="img"
{...props}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M5 3h3.5c1.1 0 2 .9 2 2v3.5c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2zm10.5 0H19c1.1 0 2 .9 2 2v3.5c0 1.1-.9 2-2 2h-3.5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2zm-7 10.5H5c-1.1 0-2 .9-2 2V19c0 1.1.9 2 2 2h3.5c1.1 0 2-.9 2-2v-3.5c0-1.1-.9-2-2-2zm7 0H19c1.1 0 2 .9 2 2V19c0 1.1-.9 2-2 2h-3.5c-1.1 0-2-.9-2-2v-3.5c0-1.1.9-2 2-2z"
/>
</svg>
);
}

export default SvgAll;
18 changes: 18 additions & 0 deletions packages/spindle-ui/src/Icon/ArrowDown.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as React from 'react';

function SvgArrowDown(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
role="img"
{...props}
>
<path d="M19.07 13.32a.996.996 0 00-1.41 0L13 17.98V4c0-.55-.45-1-1-1s-1 .45-1 1v13.98l-4.66-4.66a.996.996 0 00-1.7.71c0 .26.1.51.29.71l5.66 5.66c.33.33.74.51 1.17.56.08.02.16.05.25.05s.17-.03.25-.05c.43-.05.84-.23 1.17-.56l5.66-5.66c.37-.4.37-1.03-.02-1.42z" />
</svg>
);
}

export default SvgArrowDown;
18 changes: 18 additions & 0 deletions packages/spindle-ui/src/Icon/ArrowDownBold.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as React from 'react';

function SvgArrowDownBold(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
role="img"
{...props}
>
<path d="M19.42 12.96a1.49 1.49 0 00-2.12 0l-3.8 3.8V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v12.77l-3.8-3.8a1.49 1.49 0 00-2.12 0c-.29.29-.44.68-.44 1.06s.15.77.44 1.06l5.66 5.66c.38.38.85.61 1.35.69.13.04.27.07.42.07.15 0 .29-.03.42-.07.49-.08.97-.31 1.35-.69l5.66-5.66c.57-.59.57-1.54-.02-2.13z" />
</svg>
);
}

export default SvgArrowDownBold;
18 changes: 18 additions & 0 deletions packages/spindle-ui/src/Icon/ArrowLeft.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as React from 'react';

function SvgArrowLeft(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
role="img"
{...props}
>
<path d="M20 11.363H6.03l4.66-4.66a.996.996 0 10-1.41-1.41l-5.66 5.66c-.33.33-.51.74-.56 1.17-.03.07-.06.15-.06.24s.03.17.05.25c.05.43.23.84.56 1.17l5.66 5.66c.2.2.45.29.71.29.26 0 .51-.1.71-.29a.996.996 0 000-1.41l-4.66-4.67H20c.55 0 1-.45 1-1s-.45-1-1-1z" />
</svg>
);
}

export default SvgArrowLeft;
18 changes: 18 additions & 0 deletions packages/spindle-ui/src/Icon/ArrowLeftBold.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as React from 'react';

function SvgArrowLeftBold(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
role="img"
{...props}
>
<path d="M20 10.5H7.23l3.8-3.8c.59-.59.59-1.54 0-2.12-.59-.58-1.54-.59-2.12 0l-5.66 5.66c-.38.38-.61.85-.69 1.35-.03.12-.06.26-.06.41 0 .15.03.29.07.42.08.49.31.97.69 1.35l5.66 5.66c.29.29.68.44 1.06.44s.77-.15 1.06-.44c.59-.59.59-1.54 0-2.12l-3.8-3.8H20c.83 0 1.5-.67 1.5-1.5s-.67-1.51-1.5-1.51z" />
</svg>
);
}

export default SvgArrowLeftBold;
18 changes: 18 additions & 0 deletions packages/spindle-ui/src/Icon/ArrowRight.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as React from 'react';

function SvgArrowRight(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
role="img"
{...props}
>
<path d="M21 12c0-.09-.03-.17-.05-.25-.05-.43-.23-.84-.56-1.17l-5.66-5.66a.996.996 0 10-1.41 1.41L17.98 11H4c-.55 0-1 .45-1 1s.45 1 1 1h13.98l-4.66 4.66a.996.996 0 00.71 1.7c.26 0 .51-.1.71-.29l5.66-5.66c.33-.33.51-.74.56-1.17.01-.07.04-.15.04-.24z" />
</svg>
);
}

export default SvgArrowRight;
18 changes: 18 additions & 0 deletions packages/spindle-ui/src/Icon/ArrowRightBold.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as React from 'react';

function SvgArrowRightBold(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
role="img"
{...props}
>
<path d="M21 11.873c0-.15-.03-.29-.07-.42-.08-.49-.31-.97-.69-1.35l-5.66-5.66a1.49 1.49 0 00-2.12 0c-.58.59-.59 1.54 0 2.12l3.8 3.8H3.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5h12.77l-3.8 3.8a1.49 1.49 0 000 2.12c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.66-5.66c.38-.38.61-.85.69-1.35.03-.11.06-.25.06-.4z" />
</svg>
);
}

export default SvgArrowRightBold;
30 changes: 30 additions & 0 deletions packages/spindle-ui/src/Icon/ArrowRightCircle.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import * as React from 'react';

function SvgArrowRightCircle(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
role="img"
{...props}
>
<path
d="M12 21a9 9 0 100-18 9 9 0 000 18z"
stroke="#000"
strokeWidth={2}
strokeMiterlimit={10}
/>
<path
d="M8 12h7.6m-2.9-3.6l3 3c.4.4.4 1 0 1.4l-3 3"
stroke="#000"
strokeWidth={2}
strokeMiterlimit={10}
strokeLinecap="round"
/>
</svg>
);
}

export default SvgArrowRightCircle;
18 changes: 18 additions & 0 deletions packages/spindle-ui/src/Icon/ArrowRightCircleFill.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as React from 'react';

function SvgArrowRightCircleFill(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
role="img"
{...props}
>
<path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm5.5 11.4l-3.3 3.3c-.2.2-.5.3-.7.3-.2 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l2.3-2.3H6.5c-.6 0-1-.4-1-1s.4-1 1-1h8.6l-2.3-2.3c-.4-.4-.4-1 0-1.4.4-.4 1-.4 1.4 0l3.3 3.3c.4.4.6.9.6 1.4 0 .5-.2 1-.6 1.4z" />
</svg>
);
}

export default SvgArrowRightCircleFill;
18 changes: 18 additions & 0 deletions packages/spindle-ui/src/Icon/ArrowUp.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as React from 'react';

function SvgArrowUp(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
role="img"
{...props}
>
<path d="M19.07 9.27l-5.66-5.66c-.33-.33-.74-.51-1.17-.56-.07-.02-.15-.05-.24-.05s-.17.03-.25.05c-.43.05-.84.23-1.17.56L4.92 9.27c-.2.2-.29.45-.29.71 0 .26.1.51.29.71.39.39 1.02.39 1.41 0L11 6.02V20c0 .55.45 1 1 1s1-.45 1-1V6.02l4.66 4.66a.996.996 0 101.41-1.41z" />
</svg>
);
}

export default SvgArrowUp;
18 changes: 18 additions & 0 deletions packages/spindle-ui/src/Icon/ArrowUpBold.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as React from 'react';

function SvgArrowUpBold(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
role="img"
{...props}
>
<path d="M19.42 8.91l-5.66-5.66c-.38-.38-.85-.61-1.35-.69-.13-.04-.27-.07-.42-.07-.15 0-.29.03-.42.07-.49.08-.97.31-1.35.69L4.56 8.91a1.49 1.49 0 000 2.12c.59.58 1.54.59 2.12 0l3.8-3.8V20c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V7.23l3.8 3.8c.59.59 1.54.59 2.12 0 .29-.29.44-.68.44-1.06s-.12-.76-.42-1.06z" />
</svg>
);
}

export default SvgArrowUpBold;
22 changes: 22 additions & 0 deletions packages/spindle-ui/src/Icon/ArrowpagingDown.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import * as React from 'react';

function SvgArrowpagingDown(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
role="img"
{...props}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M11.33 15.3l-4.62-4.59c-.63-.63-.19-1.71.7-1.71h9.17c.89 0 1.34 1.07.71 1.7l-4.55 4.59c-.38.39-1.01.39-1.41.01z"
/>
</svg>
);
}

export default SvgArrowpagingDown;
22 changes: 22 additions & 0 deletions packages/spindle-ui/src/Icon/ArrowpagingDownCircle.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import * as React from 'react';

function SvgArrowpagingDownCircle(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
role="img"
{...props}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M2 12C2 6.49 6.49 2 12 2s10 4.49 10 10-4.49 10-10 10S2 17.51 2 12zm2 0c0 4.41 3.59 8 8 8s8-3.59 8-8-3.59-8-8-8-8 3.59-8 8zm4.2-2.18h7.58c.89 0 1.34 1.07.71 1.7l-3.76 3.79c-.38.4-1.02.4-1.41.01L7.5 11.53c-.64-.63-.19-1.71.7-1.71z"
/>
</svg>
);
}

export default SvgArrowpagingDownCircle;
Loading