Skip to content

Commit ddf3710

Browse files
committed
add component formilk
1 parent f299869 commit ddf3710

File tree

5 files changed

+79
-3
lines changed

5 files changed

+79
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "formilk",
33
"description": "Formilk is a system of configurable components created with Atomicojs",
4-
"version": "0.19.1",
4+
"version": "0.20.0",
55
"scripts": {
66
"start": "vite --force",
77
"build": "vite build --outDir docs",

src/components.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export * from "./formilk/formilk";
2+
13
export * from "./theme/theme";
24

35
export * from "./input/input";

src/formilk/formilk.tsx

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import { Props, css, c } from "atomico";
2+
import customElements from "../custom-elements";
3+
4+
function formilk({ width, color1, color2, contrast }: Props<typeof formilk>) {
5+
color1 = contrast ? "#fff" : color1;
6+
return (
7+
<host shadowDom>
8+
<svg viewBox="0 0 220 70.841" width={width}>
9+
<path
10+
d="M61.111 70.841a15.678 15.678 0 0 1-7.859-1.994 14.053 14.053 0 0 1-5.515-5.538 16.957 16.957 0 0 1-1.969-8.308 16.977 16.977 0 0 1 2.02-8.31 15.235 15.235 0 0 1 5.624-5.594 16.449 16.449 0 0 1 7.917-1.938 16.449 16.449 0 0 1 7.917 1.938 14.842 14.842 0 0 1 5.624 5.594 16.4 16.4 0 0 1 2.02 8.307 16.423 16.423 0 0 1-2.075 8.307 14.822 14.822 0 0 1-5.678 5.538 16.3 16.3 0 0 1-8.026 1.998Zm0-6.757a7.762 7.762 0 0 0 3.931-1.052 7.058 7.058 0 0 0 2.894-3.046 10.808 10.808 0 0 0 1.092-4.984 9.572 9.572 0 0 0-2.239-6.757 7.529 7.529 0 0 0-5.569-2.326 7.206 7.206 0 0 0-5.46 2.326 9.572 9.572 0 0 0-2.239 6.757c0 2.935.71 5.151 2.184 6.7a6.874 6.874 0 0 0 5.406 2.382ZM90.158 44.423a11.2 11.2 0 0 1 3.877-3.821 10.356 10.356 0 0 1 5.405-1.385v8.141h-2.02c-2.4 0-4.2.554-5.405 1.717-1.256 1.163-1.856 3.157-1.856 5.981v15.286h-7.645V39.66h7.644ZM142.138 39.217a12.268 12.268 0 0 1 9.009 3.434c2.239 2.326 3.385 5.538 3.385 9.692v18h-7.648V53.395a7.838 7.838 0 0 0-1.8-5.538 6.413 6.413 0 0 0-4.914-1.883 6.619 6.619 0 0 0-4.969 1.883 7.838 7.838 0 0 0-1.8 5.538v16.947h-7.643V53.395a7.838 7.838 0 0 0-1.8-5.538 6.413 6.413 0 0 0-4.914-1.883 6.457 6.457 0 0 0-4.969 1.883 7.614 7.614 0 0 0-1.856 5.538v16.947h-7.646V39.66h7.644v3.711a10.009 10.009 0 0 1 3.822-3.046 11.783 11.783 0 0 1 5.078-1.108 13.226 13.226 0 0 1 6.334 1.5 11.006 11.006 0 0 1 4.313 4.373 10.745 10.745 0 0 1 4.313-4.264 12.107 12.107 0 0 1 6.061-1.609ZM165.672 36.006a4.45 4.45 0 0 1-3.331-1.329 4.144 4.144 0 0 1-1.365-3.212 4.144 4.144 0 0 1 1.365-3.212 4.45 4.45 0 0 1 3.331-1.329 4.662 4.662 0 0 1 3.385 1.329 4.291 4.291 0 0 1 1.31 3.212 4.291 4.291 0 0 1-1.31 3.212 4.662 4.662 0 0 1-3.385 1.329Zm3.767 3.655v30.682h-7.644V39.661ZM176.974 29.359h7.644v40.983h-7.644zM210.064 70.342l-10.267-13.07v13.07h-7.644V29.363h7.644v23.316l10.156-13.016h9.937l-13.326 15.393 13.435 15.286Z"
11+
fill={color1}
12+
/>
13+
<path
14+
d="M3.492 69.842a17.461 17.461 0 0 0 12.346-5.114 17.459 17.459 0 0 0 5.114-12.346v17.46Zm17.46-33.175h13.967v19.207a13.967 13.967 0 0 1-4.091 9.876 13.966 13.966 0 0 1-9.876 4.091Z"
15+
fill={color2}
16+
/>
17+
<circle
18+
cx="6.984"
19+
cy="6.984"
20+
r="6.984"
21+
transform="translate(0 48.889)"
22+
fill={color2}
23+
/>
24+
<path
25+
d="M36.666 36.667H20.952v15.714a15.713 15.713 0 0 1 15.714-15.714Zm15.715-15.715H36.666a15.713 15.713 0 0 0-15.714 15.714h15.715a15.713 15.713 0 0 0 15.714-15.714Z"
26+
fill={color1}
27+
fill-rule="evenodd"
28+
/>
29+
<path
30+
d="M17.46 17.46v17.46a17.46 17.46 0 0 1 17.46-17.46A17.46 17.46 0 0 0 52.381 0H34.92a17.46 17.46 0 0 0-17.46 17.46Z"
31+
fill={color1}
32+
fill-rule="evenodd"
33+
/>
34+
</svg>
35+
</host>
36+
);
37+
}
38+
39+
formilk.props = {
40+
width: {
41+
type: String,
42+
value: "220px",
43+
},
44+
color1: {
45+
type: String,
46+
value: "#333",
47+
},
48+
color2: {
49+
type: String,
50+
value: "#02d365",
51+
},
52+
contrast: {
53+
type: Boolean,
54+
},
55+
};
56+
57+
formilk.styles = css`
58+
svg {
59+
max-width: 100%;
60+
display: block;
61+
}
62+
`;
63+
64+
export const Formilk = c(formilk);
65+
66+
customElements.define("formilk", Formilk);

src/logo.svg

Lines changed: 1 addition & 1 deletion
Loading

src/welcome.doc.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
import { md } from "@atomico/stories";
2-
import { Button, Input, Icon, InputSwitch, Label, Theme } from "./components";
2+
import {
3+
Formilk,
4+
Button,
5+
Input,
6+
Icon,
7+
InputSwitch,
8+
Label,
9+
Theme,
10+
} from "./components";
311

412
export const meta = {
513
title: "👋 Welcome",

0 commit comments

Comments
 (0)