@likelion-design/ui 0.1.7 → 0.1.8
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/dist/Button.js +1 -231
- package/dist/Button.js.map +1 -1
- package/dist/Button.mjs +1 -11
- package/dist/Header.js +1 -159
- package/dist/Header.js.map +1 -1
- package/dist/Header.mjs +1 -8
- package/dist/Page.js +1 -261
- package/dist/Page.js.map +1 -1
- package/dist/Page.mjs +1 -9
- package/dist/chunk-HI5DDIGM.mjs +2 -0
- package/dist/chunk-HI5DDIGM.mjs.map +1 -0
- package/dist/chunk-LRXJPSTV.mjs +2 -0
- package/dist/chunk-LRXJPSTV.mjs.map +1 -0
- package/dist/chunk-RYQQG4LH.mjs +2 -0
- package/dist/chunk-RYQQG4LH.mjs.map +1 -0
- package/dist/chunk-SV46H7N2.mjs +2 -0
- package/dist/index.css +1 -1214
- package/dist/index.css.map +1 -1
- package/dist/index.js +1 -406
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -19
- package/dist/tailwind-preset.js +1 -57
- package/dist/tailwind-preset.js.map +1 -1
- package/dist/tailwind-preset.mjs +1 -64
- package/dist/tailwind-preset.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/Button.css +0 -415
- package/dist/Button.css.map +0 -1
- package/dist/Header.css +0 -450
- package/dist/Header.css.map +0 -1
- package/dist/Page.css +0 -516
- package/dist/Page.css.map +0 -1
- package/dist/chunk-22Q3FVTV.mjs +0 -43
- package/dist/chunk-4T4Z32IO.mjs +0 -102
- package/dist/chunk-4T4Z32IO.mjs.map +0 -1
- package/dist/chunk-6BR7YIWI.mjs +0 -181
- package/dist/chunk-6BR7YIWI.mjs.map +0 -1
- package/dist/chunk-DDHQ5ZFF.mjs +0 -75
- package/dist/chunk-DDHQ5ZFF.mjs.map +0 -1
- /package/dist/{chunk-22Q3FVTV.mjs.map → chunk-SV46H7N2.mjs.map} +0 -0
package/dist/chunk-4T4Z32IO.mjs
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Header
|
|
3
|
-
} from "./chunk-DDHQ5ZFF.mjs";
|
|
4
|
-
|
|
5
|
-
// src/stories/Page.tsx
|
|
6
|
-
import React from "react";
|
|
7
|
-
|
|
8
|
-
// src/stories/page.module.css
|
|
9
|
-
var page_default = {};
|
|
10
|
-
|
|
11
|
-
// src/stories/Page.tsx
|
|
12
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
var Page = () => {
|
|
14
|
-
const [user, setUser] = React.useState();
|
|
15
|
-
return /* @__PURE__ */ jsxs("article", { children: [
|
|
16
|
-
/* @__PURE__ */ jsx(
|
|
17
|
-
Header,
|
|
18
|
-
{
|
|
19
|
-
user,
|
|
20
|
-
onLogin: () => setUser({ name: "Jane Doe" }),
|
|
21
|
-
onLogout: () => setUser(void 0),
|
|
22
|
-
onCreateAccount: () => setUser({ name: "Jane Doe" })
|
|
23
|
-
}
|
|
24
|
-
),
|
|
25
|
-
/* @__PURE__ */ jsxs("section", { className: page_default["storybook-page"], children: [
|
|
26
|
-
/* @__PURE__ */ jsx("h2", { children: "Pages in Storybook" }),
|
|
27
|
-
/* @__PURE__ */ jsxs("p", { children: [
|
|
28
|
-
"We recommend building UIs with a",
|
|
29
|
-
" ",
|
|
30
|
-
/* @__PURE__ */ jsx(
|
|
31
|
-
"a",
|
|
32
|
-
{
|
|
33
|
-
href: "https://componentdriven.org",
|
|
34
|
-
target: "_blank",
|
|
35
|
-
rel: "noopener noreferrer",
|
|
36
|
-
children: /* @__PURE__ */ jsx("strong", { children: "component-driven" })
|
|
37
|
-
}
|
|
38
|
-
),
|
|
39
|
-
" ",
|
|
40
|
-
"process starting with atomic components and ending with pages."
|
|
41
|
-
] }),
|
|
42
|
-
/* @__PURE__ */ jsx("p", { children: "Render pages with mock data. This makes it easy to build and review page states without needing to navigate to them in your app. Here are some handy patterns for managing page data in Storybook:" }),
|
|
43
|
-
/* @__PURE__ */ jsxs("ul", { children: [
|
|
44
|
-
/* @__PURE__ */ jsx("li", { children: 'Use a higher-level connected component. Storybook helps you compose such data from the "args" of child component stories' }),
|
|
45
|
-
/* @__PURE__ */ jsx("li", { children: "Assemble data in the page component from your services. You can mock these services out using Storybook." })
|
|
46
|
-
] }),
|
|
47
|
-
/* @__PURE__ */ jsxs("p", { children: [
|
|
48
|
-
"Get a guided tutorial on component-driven development at",
|
|
49
|
-
" ",
|
|
50
|
-
/* @__PURE__ */ jsx(
|
|
51
|
-
"a",
|
|
52
|
-
{
|
|
53
|
-
href: "https://storybook.js.org/tutorials/",
|
|
54
|
-
target: "_blank",
|
|
55
|
-
rel: "noopener noreferrer",
|
|
56
|
-
children: "Storybook tutorials"
|
|
57
|
-
}
|
|
58
|
-
),
|
|
59
|
-
". Read more in the",
|
|
60
|
-
" ",
|
|
61
|
-
/* @__PURE__ */ jsx(
|
|
62
|
-
"a",
|
|
63
|
-
{
|
|
64
|
-
href: "https://storybook.js.org/docs",
|
|
65
|
-
target: "_blank",
|
|
66
|
-
rel: "noopener noreferrer",
|
|
67
|
-
children: "docs"
|
|
68
|
-
}
|
|
69
|
-
),
|
|
70
|
-
"."
|
|
71
|
-
] }),
|
|
72
|
-
/* @__PURE__ */ jsxs("div", { className: page_default["tip-wrapper"], children: [
|
|
73
|
-
/* @__PURE__ */ jsx("span", { className: page_default["tip"], children: "Tip" }),
|
|
74
|
-
" Adjust the width of the canvas with the",
|
|
75
|
-
" ",
|
|
76
|
-
/* @__PURE__ */ jsx(
|
|
77
|
-
"svg",
|
|
78
|
-
{
|
|
79
|
-
width: "10",
|
|
80
|
-
height: "10",
|
|
81
|
-
viewBox: "0 0 12 12",
|
|
82
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
83
|
-
children: /* @__PURE__ */ jsx("g", { fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ jsx(
|
|
84
|
-
"path",
|
|
85
|
-
{
|
|
86
|
-
d: "M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0 01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0 010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z",
|
|
87
|
-
id: "a",
|
|
88
|
-
fill: "#999"
|
|
89
|
-
}
|
|
90
|
-
) })
|
|
91
|
-
}
|
|
92
|
-
),
|
|
93
|
-
"Viewports addon in the toolbar"
|
|
94
|
-
] })
|
|
95
|
-
] })
|
|
96
|
-
] });
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
export {
|
|
100
|
-
Page
|
|
101
|
-
};
|
|
102
|
-
//# sourceMappingURL=chunk-4T4Z32IO.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/stories/Page.tsx","../src/stories/page.module.css"],"sourcesContent":["import React from \"react\";\n\nimport { Header } from \"./Header\";\nimport styles from \"./page.module.css\";\n\ntype User = {\n name: string;\n};\n\nexport const Page: React.FC = () => {\n const [user, setUser] = React.useState<User>();\n\n return (\n <article>\n <Header\n user={user}\n onLogin={() => setUser({ name: \"Jane Doe\" })}\n onLogout={() => setUser(undefined)}\n onCreateAccount={() => setUser({ name: \"Jane Doe\" })}\n />\n\n <section className={styles[\"storybook-page\"]}>\n <h2>Pages in Storybook</h2>\n <p>\n We recommend building UIs with a{\" \"}\n <a\n href=\"https://componentdriven.org\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <strong>component-driven</strong>\n </a>{\" \"}\n process starting with atomic components and ending with pages.\n </p>\n <p>\n Render pages with mock data. This makes it easy to build and review\n page states without needing to navigate to them in your app. Here are\n some handy patterns for managing page data in Storybook:\n </p>\n <ul>\n <li>\n Use a higher-level connected component. Storybook helps you compose\n such data from the "args" of child component stories\n </li>\n <li>\n Assemble data in the page component from your services. You can mock\n these services out using Storybook.\n </li>\n </ul>\n <p>\n Get a guided tutorial on component-driven development at{\" \"}\n <a\n href=\"https://storybook.js.org/tutorials/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Storybook tutorials\n </a>\n . Read more in the{\" \"}\n <a\n href=\"https://storybook.js.org/docs\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n docs\n </a>\n .\n </p>\n <div className={styles[\"tip-wrapper\"]}>\n <span className={styles[\"tip\"]}>Tip</span> Adjust the width of the\n canvas with the{\" \"}\n <svg\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 12 12\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g fill=\"none\" fillRule=\"evenodd\">\n <path\n d=\"M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0 01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0 010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z\"\n id=\"a\"\n fill=\"#999\"\n />\n </g>\n </svg>\n Viewports addon in the toolbar\n </div>\n </section>\n </article>\n );\n};\n",".storybook-page {\n margin: 0 auto;\n padding: 48px 20px;\n max-width: 600px;\n color: #333;\n font-size: 14px;\n line-height: 24px;\n font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n}\n\n.storybook-page h2 {\n display: inline-block;\n vertical-align: top;\n margin: 0 0 4px;\n font-weight: 700;\n font-size: 32px;\n line-height: 1;\n}\n\n.storybook-page p {\n margin: 1em 0;\n}\n\n.storybook-page a {\n color: inherit;\n}\n\n.storybook-page ul {\n margin: 1em 0;\n padding-left: 30px;\n}\n\n.storybook-page li {\n margin-bottom: 8px;\n}\n\n.storybook-page .tip {\n display: inline-block;\n vertical-align: top;\n margin-right: 10px;\n border-radius: 1em;\n background: #e7fdd8;\n padding: 4px 12px;\n color: #357a14;\n font-weight: 700;\n font-size: 11px;\n line-height: 12px;\n}\n\n.storybook-page .tip-wrapper {\n margin-top: 40px;\n margin-bottom: 40px;\n font-size: 13px;\n line-height: 20px;\n}\n\n.storybook-page .tip-wrapper svg {\n display: inline-block;\n vertical-align: top;\n margin-top: 3px;\n margin-right: 4px;\n width: 12px;\n height: 12px;\n}\n\n.storybook-page .tip-wrapper svg path {\n fill: #1ea7fd;\n}\n"],"mappings":";;;;;AAAA,OAAO,WAAW;;;ACAlB;;;ADcM,cASE,YATF;AALC,IAAM,OAAiB,MAAM;AAClC,QAAM,CAAC,MAAM,OAAO,IAAI,MAAM,SAAe;AAE7C,SACE,qBAAC,aACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,SAAS,MAAM,QAAQ,EAAE,MAAM,WAAW,CAAC;AAAA,QAC3C,UAAU,MAAM,QAAQ,MAAS;AAAA,QACjC,iBAAiB,MAAM,QAAQ,EAAE,MAAM,WAAW,CAAC;AAAA;AAAA,IACrD;AAAA,IAEA,qBAAC,aAAQ,WAAW,aAAO,gBAAgB,GACzC;AAAA,0BAAC,QAAG,gCAAkB;AAAA,MACtB,qBAAC,OAAE;AAAA;AAAA,QACgC;AAAA,QACjC;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,QAAO;AAAA,YACP,KAAI;AAAA,YAEJ,8BAAC,YAAO,8BAAgB;AAAA;AAAA,QAC1B;AAAA,QAAK;AAAA,QAAI;AAAA,SAEX;AAAA,MACA,oBAAC,OAAE,gNAIH;AAAA,MACA,qBAAC,QACC;AAAA,4BAAC,QAAG,sIAGJ;AAAA,QACA,oBAAC,QAAG,sHAGJ;AAAA,SACF;AAAA,MACA,qBAAC,OAAE;AAAA;AAAA,QACwD;AAAA,QACzD;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,QAAO;AAAA,YACP,KAAI;AAAA,YACL;AAAA;AAAA,QAED;AAAA,QAAI;AAAA,QACe;AAAA,QACnB;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,QAAO;AAAA,YACP,KAAI;AAAA,YACL;AAAA;AAAA,QAED;AAAA,QAAI;AAAA,SAEN;AAAA,MACA,qBAAC,SAAI,WAAW,aAAO,aAAa,GAClC;AAAA,4BAAC,UAAK,WAAW,aAAO,KAAK,GAAG,iBAAG;AAAA,QAAO;AAAA,QAC1B;AAAA,QAChB;AAAA,UAAC;AAAA;AAAA,YACC,OAAM;AAAA,YACN,QAAO;AAAA,YACP,SAAQ;AAAA,YACR,OAAM;AAAA,YAEN,8BAAC,OAAE,MAAK,QAAO,UAAS,WACtB;AAAA,cAAC;AAAA;AAAA,gBACC,GAAE;AAAA,gBACF,IAAG;AAAA,gBACH,MAAK;AAAA;AAAA,YACP,GACF;AAAA;AAAA,QACF;AAAA,QAAM;AAAA,SAER;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
|
package/dist/chunk-6BR7YIWI.mjs
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__objRest,
|
|
3
|
-
__spreadProps,
|
|
4
|
-
__spreadValues
|
|
5
|
-
} from "./chunk-22Q3FVTV.mjs";
|
|
6
|
-
|
|
7
|
-
// src/stories/button.module.css
|
|
8
|
-
var button_default = {};
|
|
9
|
-
|
|
10
|
-
// src/stories/Button.tsx
|
|
11
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
var ActionButton = (_a) => {
|
|
13
|
-
var _b = _a, {
|
|
14
|
-
size = "medium",
|
|
15
|
-
variant = "primary",
|
|
16
|
-
shape = "solid",
|
|
17
|
-
state = "enabled",
|
|
18
|
-
children,
|
|
19
|
-
prefixIcon,
|
|
20
|
-
suffixIcon,
|
|
21
|
-
loading = false,
|
|
22
|
-
className = "",
|
|
23
|
-
disabled
|
|
24
|
-
} = _b, props = __objRest(_b, [
|
|
25
|
-
"size",
|
|
26
|
-
"variant",
|
|
27
|
-
"shape",
|
|
28
|
-
"state",
|
|
29
|
-
"children",
|
|
30
|
-
"prefixIcon",
|
|
31
|
-
"suffixIcon",
|
|
32
|
-
"loading",
|
|
33
|
-
"className",
|
|
34
|
-
"disabled"
|
|
35
|
-
]);
|
|
36
|
-
const isDisabled = disabled || state === "disabled" || loading;
|
|
37
|
-
const actualState = loading ? "loading" : state;
|
|
38
|
-
const baseClasses = [
|
|
39
|
-
button_default["action-button"],
|
|
40
|
-
button_default[`action-button--${size}`],
|
|
41
|
-
button_default[`action-button--${variant}`],
|
|
42
|
-
button_default[`action-button--${shape}`],
|
|
43
|
-
button_default[`action-button--${actualState}`],
|
|
44
|
-
className
|
|
45
|
-
].filter(Boolean).join(" ");
|
|
46
|
-
return /* @__PURE__ */ jsxs(
|
|
47
|
-
"button",
|
|
48
|
-
__spreadProps(__spreadValues({
|
|
49
|
-
type: "button",
|
|
50
|
-
className: baseClasses,
|
|
51
|
-
disabled: isDisabled
|
|
52
|
-
}, props), {
|
|
53
|
-
children: [
|
|
54
|
-
/* @__PURE__ */ jsxs("span", { className: button_default["action-button__content"], children: [
|
|
55
|
-
prefixIcon && /* @__PURE__ */ jsx("span", { className: button_default["action-button__prefix-icon"], children: prefixIcon }),
|
|
56
|
-
/* @__PURE__ */ jsx("span", { className: button_default["action-button__label"], children }),
|
|
57
|
-
suffixIcon && /* @__PURE__ */ jsx("span", { className: button_default["action-button__suffix-icon"], children: suffixIcon })
|
|
58
|
-
] }),
|
|
59
|
-
loading && /* @__PURE__ */ jsx("span", { className: button_default["action-button__spinner"], "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
60
|
-
"svg",
|
|
61
|
-
{
|
|
62
|
-
className: button_default["action-button__spinner-svg"],
|
|
63
|
-
viewBox: "0 0 24 24",
|
|
64
|
-
fill: "none",
|
|
65
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
66
|
-
children: /* @__PURE__ */ jsxs(
|
|
67
|
-
"circle",
|
|
68
|
-
{
|
|
69
|
-
className: button_default["action-button__spinner-circle"],
|
|
70
|
-
cx: "12",
|
|
71
|
-
cy: "12",
|
|
72
|
-
r: "10",
|
|
73
|
-
stroke: "currentColor",
|
|
74
|
-
strokeWidth: "4",
|
|
75
|
-
strokeLinecap: "round",
|
|
76
|
-
strokeDasharray: "32",
|
|
77
|
-
strokeDashoffset: "32",
|
|
78
|
-
children: [
|
|
79
|
-
/* @__PURE__ */ jsx(
|
|
80
|
-
"animate",
|
|
81
|
-
{
|
|
82
|
-
attributeName: "stroke-dasharray",
|
|
83
|
-
dur: "2s",
|
|
84
|
-
values: "0 40;40 40;0 40",
|
|
85
|
-
repeatCount: "indefinite"
|
|
86
|
-
}
|
|
87
|
-
),
|
|
88
|
-
/* @__PURE__ */ jsx(
|
|
89
|
-
"animate",
|
|
90
|
-
{
|
|
91
|
-
attributeName: "stroke-dashoffset",
|
|
92
|
-
dur: "2s",
|
|
93
|
-
values: "0;-40;-80",
|
|
94
|
-
repeatCount: "indefinite"
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
)
|
|
100
|
-
}
|
|
101
|
-
) })
|
|
102
|
-
]
|
|
103
|
-
})
|
|
104
|
-
);
|
|
105
|
-
};
|
|
106
|
-
var Button = (_a) => {
|
|
107
|
-
var _b = _a, {
|
|
108
|
-
primary = false,
|
|
109
|
-
size = "medium",
|
|
110
|
-
backgroundColor,
|
|
111
|
-
label
|
|
112
|
-
} = _b, props = __objRest(_b, [
|
|
113
|
-
"primary",
|
|
114
|
-
"size",
|
|
115
|
-
"backgroundColor",
|
|
116
|
-
"label"
|
|
117
|
-
]);
|
|
118
|
-
const mode = primary ? button_default["storybook-button--primary"] : button_default["storybook-button--secondary"];
|
|
119
|
-
return /* @__PURE__ */ jsx(
|
|
120
|
-
"button",
|
|
121
|
-
__spreadProps(__spreadValues({
|
|
122
|
-
type: "button",
|
|
123
|
-
className: [
|
|
124
|
-
button_default["storybook-button"],
|
|
125
|
-
button_default[`storybook-button--${size}`],
|
|
126
|
-
mode
|
|
127
|
-
].join(" "),
|
|
128
|
-
style: { backgroundColor }
|
|
129
|
-
}, props), {
|
|
130
|
-
children: label
|
|
131
|
-
})
|
|
132
|
-
);
|
|
133
|
-
};
|
|
134
|
-
var IconButton = (_a) => {
|
|
135
|
-
var _b = _a, {
|
|
136
|
-
size = "large",
|
|
137
|
-
variant = "primary",
|
|
138
|
-
iconType = "solid",
|
|
139
|
-
state = "enabled",
|
|
140
|
-
icon,
|
|
141
|
-
className = "",
|
|
142
|
-
disabled,
|
|
143
|
-
type = "button"
|
|
144
|
-
} = _b, props = __objRest(_b, [
|
|
145
|
-
"size",
|
|
146
|
-
"variant",
|
|
147
|
-
"iconType",
|
|
148
|
-
"state",
|
|
149
|
-
"icon",
|
|
150
|
-
"className",
|
|
151
|
-
"disabled",
|
|
152
|
-
"type"
|
|
153
|
-
]);
|
|
154
|
-
const isDisabled = disabled || state === "disabled";
|
|
155
|
-
const actualState = iconType === "weak" && isDisabled ? "enabled" : state;
|
|
156
|
-
const baseClasses = [
|
|
157
|
-
button_default["icon-button"],
|
|
158
|
-
button_default[`icon-button--${size}`],
|
|
159
|
-
button_default[`icon-button--${variant}`],
|
|
160
|
-
button_default[`icon-button--${iconType}`],
|
|
161
|
-
button_default[`icon-button--${actualState}`],
|
|
162
|
-
className
|
|
163
|
-
].filter(Boolean).join(" ");
|
|
164
|
-
return /* @__PURE__ */ jsx(
|
|
165
|
-
"button",
|
|
166
|
-
__spreadProps(__spreadValues({
|
|
167
|
-
type,
|
|
168
|
-
className: baseClasses,
|
|
169
|
-
disabled: isDisabled
|
|
170
|
-
}, props), {
|
|
171
|
-
children: /* @__PURE__ */ jsx("span", { className: button_default["icon-button__icon"], children: icon })
|
|
172
|
-
})
|
|
173
|
-
);
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
export {
|
|
177
|
-
ActionButton,
|
|
178
|
-
Button,
|
|
179
|
-
IconButton
|
|
180
|
-
};
|
|
181
|
-
//# sourceMappingURL=chunk-6BR7YIWI.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/stories/button.module.css","../src/stories/Button.tsx"],"sourcesContent":["/* 기존 스타일 유지 */\n.storybook-button {\n display: inline-block;\n cursor: pointer;\n border: 0;\n border-radius: 3em;\n font-weight: 700;\n line-height: 1;\n font-family: \"Nunito Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n}\n.storybook-button--primary {\n background-color: #555ab9;\n color: white;\n}\n.storybook-button--secondary {\n box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;\n background-color: transparent;\n color: #333;\n}\n.storybook-button--small {\n padding: 10px 16px;\n font-size: 12px;\n}\n.storybook-button--medium {\n padding: 11px 20px;\n font-size: 14px;\n}\n.storybook-button--large {\n padding: 12px 24px;\n font-size: 16px;\n}\n\n/* ActionButton 스타일 */\n.action-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n font-family: \"Pretendard\", -apple-system, BlinkMacSystemFont, system-ui,\n sans-serif;\n font-weight: 600;\n border-radius: 8px;\n border: none;\n cursor: pointer;\n transition: all 0.2s ease;\n min-width: fit-content;\n white-space: nowrap;\n}\n\n/* Size 스타일 */\n.action-button--xlarge {\n height: 56px;\n padding: 0 24px;\n font-size: 17px;\n min-width: 34px;\n}\n\n.action-button--large {\n height: 48px;\n padding: 0 24px;\n font-size: 17px;\n min-width: 34px;\n}\n\n.action-button--medium {\n height: 36px;\n padding: 0 20px;\n font-size: 15px;\n min-width: 34px;\n}\n\n.action-button--small {\n height: 28px;\n padding: 0 16px;\n font-size: 13px;\n min-width: 30px;\n}\n\n/* Primary Solid 스타일 */\n.action-button--primary.action-button--solid {\n background-color: var(--color-semantic-bg-primary);\n color: var(--color-semantic-fg-inverted);\n}\n\n.action-button--primary.action-button--solid:hover:not(:disabled),\n.action-button--primary.action-button--solid.action-button--hovered:not(\n :disabled\n ) {\n background-color: var(--color-semantic-bg-primary-hovered);\n}\n\n.action-button--primary.action-button--solid:disabled,\n.action-button--primary.action-button--solid.action-button--disabled {\n background-color: var(--color-semantic-bg-normal-disabled);\n color: var(--color-semantic-fg-disabled);\n cursor: not-allowed;\n}\n\n/* Primary Outline 스타일 */\n.action-button--primary.action-button--outline {\n background-color: transparent;\n color: var(--color-semantic-fg-primary);\n border: 1px solid var(--color-semantic-border-normal);\n}\n\n.action-button--primary.action-button--outline:hover:not(:disabled),\n.action-button--primary.action-button--outline.action-button--hovered:not(\n :disabled\n ) {\n background-color: var(--color-semantic-bg-normal-hovered);\n}\n\n.action-button--primary.action-button--outline:disabled,\n.action-button--primary.action-button--outline.action-button--disabled {\n color: var(--color-semantic-fg-disabled);\n border-color: var(--color-semantic-border-weak);\n background-color: var(--color-semantic-bg-white);\n cursor: not-allowed;\n}\n\n/* Primary Ghost 스타일 */\n.action-button--primary.action-button--ghost {\n background-color: transparent;\n color: var(--color-semantic-fg-primary);\n}\n\n.action-button--primary.action-button--ghost:hover:not(:disabled),\n.action-button--primary.action-button--ghost.action-button--hovered:not(\n :disabled\n ) {\n background-color: var(--color-semantic-bg-primary-weak);\n}\n\n.action-button--primary.action-button--ghost:disabled,\n.action-button--primary.action-button--ghost.action-button--disabled {\n color: var(--color-semantic-fg-disabled);\n background-color: var(--color-semantic-bg-white);\n cursor: not-allowed;\n}\n\n/* Neutral Solid 스타일 */\n.action-button--neutral.action-button--solid {\n background-color: var(--color-semantic-bg-inverted);\n color: var(--color-semantic-fg-white);\n}\n\n.action-button--neutral.action-button--solid:hover:not(:disabled),\n.action-button--neutral.action-button--solid.action-button--hovered:not(\n :disabled\n ) {\n background-color: var(--color-semantic-bg-inverted);\n}\n\n.action-button--neutral.action-button--solid:disabled,\n.action-button--neutral.action-button--solid.action-button--disabled {\n background-color: var(--color-semantic-bg-normal-disabled);\n color: var(--color-semantic-fg-disabled);\n cursor: not-allowed;\n}\n\n/* Neutral Outline 스타일 */\n.action-button--neutral.action-button--outline {\n background-color: transparent;\n color: var(--color-semantic-fg-normal);\n border: 1px solid var(--color-semantic-border-normal);\n}\n\n.action-button--neutral.action-button--outline:hover:not(:disabled),\n.action-button--neutral.action-button--outline.action-button--hovered:not(\n :disabled\n ) {\n background-color: var(--color-semantic-bg-normal-hovered);\n}\n\n.action-button--neutral.action-button--outline:disabled,\n.action-button--neutral.action-button--outline.action-button--disabled {\n color: var(--color-semantic-fg-disabled);\n border-color: var(--color-semantic-border-weak);\n background-color: var(--color-semantic-bg-white);\n cursor: not-allowed;\n}\n\n/* Neutral Ghost 스타일 */\n.action-button--neutral.action-button--ghost {\n background-color: transparent;\n color: var(--color-semantic-fg-normal);\n}\n\n.action-button--neutral.action-button--ghost:hover:not(:disabled),\n.action-button--neutral.action-button--ghost.action-button--hovered:not(\n :disabled\n ) {\n background-color: var(--color-semantic-bg-normal-hovered);\n}\n\n.action-button--neutral.action-button--ghost:disabled,\n.action-button--neutral.action-button--ghost.action-button--disabled {\n color: var(--color-semantic-fg-disabled);\n cursor: not-allowed;\n}\n\n/* Secondary Solid 스타일 */\n.action-button--secondary.action-button--solid {\n background-color: var(--color-semantic-bg-normal);\n color: var(--color-semantic-fg-normal);\n}\n\n.action-button--secondary.action-button--solid:hover:not(:disabled),\n.action-button--secondary.action-button--solid.action-button--hovered:not(\n :disabled\n ) {\n background-color: var(--color-semantic-bg-normal-hovered);\n}\n\n.action-button--secondary.action-button--solid:disabled,\n.action-button--secondary.action-button--solid.action-button--disabled {\n background-color: var(--color-semantic-bg-normal-disabled);\n color: var(--color-semantic-fg-disabled);\n cursor: not-allowed;\n}\n\n/* Loading 상태 */\n.action-button--loading {\n position: relative;\n pointer-events: none;\n}\n\n.action-button--loading .action-button__content {\n opacity: 0;\n}\n\n.action-button__content {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n}\n\n.action-button__spinner {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n\n.action-button__spinner-svg {\n width: 20px;\n height: 20px;\n animation: spin 1s linear infinite;\n}\n\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n.action-button__spinner-circle {\n opacity: 1;\n}\n\n/* 로딩 상태일 때 hovered와 동일한 스타일 적용 */\n.action-button--primary.action-button--solid.action-button--loading {\n background-color: var(--color-semantic-bg-primary-hovered);\n color: var(--color-semantic-fg-inverted);\n}\n\n.action-button--primary.action-button--outline.action-button--loading {\n background-color: var(--color-semantic-bg-normal-hovered);\n color: var(--color-semantic-fg-primary);\n}\n\n.action-button--primary.action-button--ghost.action-button--loading {\n background-color: var(--color-semantic-bg-primary-weak);\n color: var(--color-semantic-fg-primary);\n}\n\n.action-button--neutral.action-button--solid.action-button--loading {\n background-color: var(--color-semantic-bg-inverted);\n color: var(--color-semantic-fg-white);\n}\n\n.action-button--neutral.action-button--outline.action-button--loading {\n background-color: var(--color-semantic-bg-normal-hovered);\n color: var(--color-semantic-fg-normal);\n}\n\n.action-button--neutral.action-button--ghost.action-button--loading {\n background-color: var(--color-semantic-bg-normal-hovered);\n color: var(--color-semantic-fg-normal);\n}\n\n.action-button--secondary.action-button--solid.action-button--loading {\n background-color: var(--color-semantic-bg-normal-hovered);\n color: var(--color-semantic-fg-normal);\n}\n\n/* 아이콘 스타일 */\n.action-button__prefix-icon,\n.action-button__suffix-icon {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n}\n\n.action-button--small .action-button__prefix-icon,\n.action-button--small .action-button__suffix-icon {\n width: 16px;\n height: 16px;\n}\n\n.action-button--medium .action-button__prefix-icon,\n.action-button--medium .action-button__suffix-icon {\n width: 18px;\n height: 18px;\n}\n\n.action-button--large .action-button__prefix-icon,\n.action-button--large .action-button__suffix-icon {\n width: 20px;\n height: 20px;\n}\n\n.action-button--xlarge .action-button__prefix-icon,\n.action-button--xlarge .action-button__suffix-icon {\n width: 24px;\n height: 24px;\n}\n\n.action-button__label {\n display: inline-flex;\n align-items: center;\n}\n\n/* IconButton 스타일 */\n.icon-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-family: \"Pretendard\", -apple-system, BlinkMacSystemFont, system-ui,\n sans-serif;\n border: none;\n cursor: pointer;\n transition: all 0.2s ease;\n padding: 0;\n flex-shrink: 0;\n}\n\n/* Size 스타일 */\n.icon-button--xlarge {\n width: 56px;\n height: 56px;\n border-radius: 8px;\n}\n\n.icon-button--large {\n width: 48px;\n height: 48px;\n border-radius: 6px;\n}\n\n.icon-button--medium {\n width: 36px;\n height: 36px;\n border-radius: 4px;\n}\n\n.icon-button--small {\n width: 28px;\n height: 28px;\n border-radius: 4px;\n}\n\n/* Icon 크기 */\n.icon-button__icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n}\n\n.icon-button--xlarge .icon-button__icon,\n.icon-button--large .icon-button__icon {\n width: 24px;\n height: 24px;\n}\n\n.icon-button--medium .icon-button__icon {\n width: 20px;\n height: 20px;\n}\n\n.icon-button--small .icon-button__icon {\n width: 16px;\n height: 16px;\n}\n\n/* Primary Solid 스타일 */\n.icon-button--primary.icon-button--solid {\n background-color: var(--color-semantic-bg-primary);\n color: var(--color-semantic-fg-inverted);\n}\n\n.icon-button--primary.icon-button--solid:hover:not(:disabled),\n.icon-button--primary.icon-button--solid.icon-button--hovered:not(:disabled) {\n background-color: var(--color-semantic-bg-primary-hovered);\n}\n\n.icon-button--primary.icon-button--solid:disabled,\n.icon-button--primary.icon-button--solid.icon-button--disabled {\n background-color: var(--color-semantic-bg-normal-disabled);\n color: var(--color-semantic-fg-disabled);\n cursor: not-allowed;\n}\n\n/* Primary Outline 스타일 */\n.icon-button--primary.icon-button--outline {\n background-color: transparent;\n color: var(--color-semantic-fg-primary);\n border: 1px solid var(--color-semantic-border-normal);\n}\n\n.icon-button--primary.icon-button--outline:hover:not(:disabled),\n.icon-button--primary.icon-button--outline.icon-button--hovered:not(:disabled) {\n background-color: var(--color-semantic-bg-normal-hovered);\n}\n\n.icon-button--primary.icon-button--outline:disabled,\n.icon-button--primary.icon-button--outline.icon-button--disabled {\n color: var(--color-semantic-fg-disabled);\n border-color: var(--color-semantic-border-weak);\n background-color: var(--color-semantic-bg-white);\n cursor: not-allowed;\n}\n\n/* Primary Weak 스타일 */\n.icon-button--primary.icon-button--weak {\n background-color: var(--color-semantic-bg-week-primary);\n color: var(--color-semantic-fg-primary);\n}\n\n.icon-button--primary.icon-button--weak:hover:not(:disabled),\n.icon-button--primary.icon-button--weak.icon-button--hovered:not(:disabled) {\n background-color: var(--color-semantic-bg-week-primary-hovered);\n}\n\n/* Neutral Solid 스타일 */\n.icon-button--neutral.icon-button--solid {\n background-color: var(--color-semantic-bg-inverted);\n color: var(--color-semantic-fg-white);\n}\n\n.icon-button--neutral.icon-button--solid:hover:not(:disabled),\n.icon-button--neutral.icon-button--solid.icon-button--hovered:not(:disabled) {\n background-color: var(--color-semantic-bg-inverted);\n}\n\n.icon-button--neutral.icon-button--solid:disabled,\n.icon-button--neutral.icon-button--solid.icon-button--disabled {\n background-color: var(--color-semantic-bg-normal-disabled);\n color: var(--color-semantic-fg-disabled);\n cursor: not-allowed;\n}\n\n/* Neutral Outline 스타일 */\n.icon-button--neutral.icon-button--outline {\n background-color: transparent;\n color: var(--color-semantic-fg-normal);\n border: 1px solid var(--color-semantic-border-normal);\n}\n\n.icon-button--neutral.icon-button--outline:hover:not(:disabled),\n.icon-button--neutral.icon-button--outline.icon-button--hovered:not(:disabled) {\n background-color: var(--color-semantic-bg-normal-hovered);\n}\n\n.icon-button--neutral.icon-button--outline:disabled,\n.icon-button--neutral.icon-button--outline.icon-button--disabled {\n color: var(--color-semantic-fg-disabled);\n border-color: var(--color-semantic-border-weak);\n background-color: var(--color-semantic-bg-white);\n cursor: not-allowed;\n}\n\n/* Neutral Weak 스타일 */\n.icon-button--neutral.icon-button--weak {\n background-color: var(--color-semantic-bg-week-neutral-dark);\n color: var(--color-semantic-fg-normal);\n}\n\n.icon-button--neutral.icon-button--weak:hover:not(:disabled),\n.icon-button--neutral.icon-button--weak.icon-button--hovered:not(:disabled) {\n background-color: var(--color-semantic-bg-week-neutral-dark-hovered);\n}\n\n/* Weak 타입은 disabled 상태를 가지지 않음 - 어두운 배경일 때 */\n.icon-button--neutral.icon-button--weak.dark {\n color: var(--color-semantic-fg-white);\n}\n\n.icon-button--neutral.icon-button--weak.dark:hover:not(:disabled),\n.icon-button--neutral.icon-button--weak.dark.icon-button--hovered:not(\n :disabled\n ) {\n background-color: rgba(255, 255, 255, 0.1);\n}\n","import React from \"react\";\nimport styles from \"./button.module.css\";\n\nexport type ButtonSize = \"xlarge\" | \"large\" | \"medium\" | \"small\";\nexport type ButtonVariant = \"primary\" | \"neutral\" | \"secondary\";\nexport type ButtonShape = \"solid\" | \"outline\" | \"ghost\";\nexport type ButtonState = \"enabled\" | \"hovered\" | \"loading\" | \"disabled\";\n\nexport type IconButtonSize = \"xlarge\" | \"large\" | \"medium\" | \"small\";\nexport type IconButtonVariant = \"primary\" | \"neutral\";\nexport type IconButtonType = \"solid\" | \"outline\" | \"weak\";\nexport type IconButtonState = \"enabled\" | \"hovered\" | \"disabled\";\n\nexport interface ActionButtonProps\n extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"type\"> {\n /** 버튼 크기 */\n size?: ButtonSize;\n /** 버튼 타입 (primary, neutral, secondary) */\n variant?: ButtonVariant;\n /** 버튼 모양 (solid, outline, ghost) */\n shape?: ButtonShape;\n /** 버튼 상태 */\n state?: ButtonState;\n /** 버튼 텍스트 */\n children: React.ReactNode;\n /** Prefix 아이콘 */\n prefixIcon?: React.ReactNode;\n /** Suffix 아이콘 */\n suffixIcon?: React.ReactNode;\n /** 로딩 상태일 때 표시할 스피너 */\n loading?: boolean;\n}\n\n/** ActionButton 컴포넌트는 사용자가 어떠한 액션을 트리거하거나 이벤트를 실행할 때 사용한다. */\nexport const ActionButton = ({\n size = \"medium\",\n variant = \"primary\",\n shape = \"solid\",\n state = \"enabled\",\n children,\n prefixIcon,\n suffixIcon,\n loading = false,\n className = \"\",\n disabled,\n ...props\n}: ActionButtonProps) => {\n const isDisabled = disabled || state === \"disabled\" || loading;\n const actualState = loading ? \"loading\" : state;\n\n const baseClasses = [\n styles[\"action-button\"],\n styles[`action-button--${size}`],\n styles[`action-button--${variant}`],\n styles[`action-button--${shape}`],\n styles[`action-button--${actualState}`],\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <button\n type=\"button\"\n className={baseClasses}\n disabled={isDisabled}\n {...props}\n >\n <span className={styles[\"action-button__content\"]}>\n {prefixIcon && (\n <span className={styles[\"action-button__prefix-icon\"]}>\n {prefixIcon}\n </span>\n )}\n <span className={styles[\"action-button__label\"]}>{children}</span>\n {suffixIcon && (\n <span className={styles[\"action-button__suffix-icon\"]}>\n {suffixIcon}\n </span>\n )}\n </span>\n {loading && (\n <span className={styles[\"action-button__spinner\"]} aria-hidden=\"true\">\n <svg\n className={styles[\"action-button__spinner-svg\"]}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n className={styles[\"action-button__spinner-circle\"]}\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n strokeLinecap=\"round\"\n strokeDasharray=\"32\"\n strokeDashoffset=\"32\"\n >\n <animate\n attributeName=\"stroke-dasharray\"\n dur=\"2s\"\n values=\"0 40;40 40;0 40\"\n repeatCount=\"indefinite\"\n />\n <animate\n attributeName=\"stroke-dashoffset\"\n dur=\"2s\"\n values=\"0;-40;-80\"\n repeatCount=\"indefinite\"\n />\n </circle>\n </svg>\n </span>\n )}\n </button>\n );\n};\n\n// 기존 Button 컴포넌트는 하위 호환성을 위해 유지\nexport interface ButtonProps {\n /** Is this the principal call to action on the page? */\n primary?: boolean;\n /** What background color to use */\n backgroundColor?: string;\n /** How large should the button be? */\n size?: \"small\" | \"medium\" | \"large\";\n /** Button contents */\n label: string;\n /** Optional click handler */\n onClick?: () => void;\n}\n\n/** Primary UI component for user interaction */\nexport const Button = ({\n primary = false,\n size = \"medium\",\n backgroundColor,\n label,\n ...props\n}: ButtonProps) => {\n const mode = primary\n ? styles[\"storybook-button--primary\"]\n : styles[\"storybook-button--secondary\"];\n return (\n <button\n type=\"button\"\n className={[\n styles[\"storybook-button\"],\n styles[`storybook-button--${size}`],\n mode,\n ].join(\" \")}\n style={{ backgroundColor }}\n {...props}\n >\n {label}\n </button>\n );\n};\n\nexport interface IconButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** 버튼 크기 */\n size?: IconButtonSize;\n /** 버튼 타입 (primary 또는 neutral) */\n variant?: IconButtonVariant;\n /** 버튼 모양 (solid, outline, weak) */\n iconType?: IconButtonType;\n /** 버튼 상태 */\n state?: IconButtonState;\n /** 아이콘 (Heroicons 또는 React 컴포넌트) */\n icon: React.ReactNode;\n /** 아이콘에 대한 접근성 라벨 */\n \"aria-label\": string;\n}\n\n/** IconButton 컴포넌트는 텍스트 레이블 없이 아이콘만으로 액션을 전달하는 버튼 컴포넌트이다. */\nexport const IconButton = ({\n size = \"large\",\n variant = \"primary\",\n iconType = \"solid\",\n state = \"enabled\",\n icon,\n className = \"\",\n disabled,\n type = \"button\",\n ...props\n}: IconButtonProps) => {\n const isDisabled = disabled || state === \"disabled\";\n // weak 타입은 disabled 상태를 가지지 않음\n const actualState = iconType === \"weak\" && isDisabled ? \"enabled\" : state;\n\n const baseClasses = [\n styles[\"icon-button\"],\n styles[`icon-button--${size}`],\n styles[`icon-button--${variant}`],\n styles[`icon-button--${iconType}`],\n styles[`icon-button--${actualState}`],\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <button\n type={type}\n className={baseClasses}\n disabled={isDisabled}\n {...props}\n >\n <span className={styles[\"icon-button__icon\"]}>{icon}</span>\n </button>\n );\n};\n"],"mappings":"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","names":[]}
|
package/dist/chunk-DDHQ5ZFF.mjs
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Button
|
|
3
|
-
} from "./chunk-6BR7YIWI.mjs";
|
|
4
|
-
|
|
5
|
-
// src/stories/header.module.css
|
|
6
|
-
var header_default = {};
|
|
7
|
-
|
|
8
|
-
// src/stories/Header.tsx
|
|
9
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
var Header = ({
|
|
11
|
-
user,
|
|
12
|
-
onLogin,
|
|
13
|
-
onLogout,
|
|
14
|
-
onCreateAccount
|
|
15
|
-
}) => /* @__PURE__ */ jsx("header", { children: /* @__PURE__ */ jsxs("div", { className: header_default["storybook-header"], children: [
|
|
16
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
17
|
-
/* @__PURE__ */ jsx(
|
|
18
|
-
"svg",
|
|
19
|
-
{
|
|
20
|
-
width: "32",
|
|
21
|
-
height: "32",
|
|
22
|
-
viewBox: "0 0 32 32",
|
|
23
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
24
|
-
children: /* @__PURE__ */ jsxs("g", { fill: "none", fillRule: "evenodd", children: [
|
|
25
|
-
/* @__PURE__ */ jsx(
|
|
26
|
-
"path",
|
|
27
|
-
{
|
|
28
|
-
d: "M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z",
|
|
29
|
-
fill: "#FFF"
|
|
30
|
-
}
|
|
31
|
-
),
|
|
32
|
-
/* @__PURE__ */ jsx(
|
|
33
|
-
"path",
|
|
34
|
-
{
|
|
35
|
-
d: "M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z",
|
|
36
|
-
fill: "#555AB9"
|
|
37
|
-
}
|
|
38
|
-
),
|
|
39
|
-
/* @__PURE__ */ jsx(
|
|
40
|
-
"path",
|
|
41
|
-
{
|
|
42
|
-
d: "M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z",
|
|
43
|
-
fill: "#91BAF8"
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
] })
|
|
47
|
-
}
|
|
48
|
-
),
|
|
49
|
-
/* @__PURE__ */ jsx("h1", { children: "Acme" })
|
|
50
|
-
] }),
|
|
51
|
-
/* @__PURE__ */ jsx("div", { children: user ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52
|
-
/* @__PURE__ */ jsxs("span", { className: "welcome", children: [
|
|
53
|
-
"Welcome, ",
|
|
54
|
-
/* @__PURE__ */ jsx("b", { children: user.name }),
|
|
55
|
-
"!"
|
|
56
|
-
] }),
|
|
57
|
-
/* @__PURE__ */ jsx(Button, { size: "small", onClick: onLogout, label: "Log out" })
|
|
58
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
59
|
-
/* @__PURE__ */ jsx(Button, { size: "small", onClick: onLogin, label: "Log in" }),
|
|
60
|
-
/* @__PURE__ */ jsx(
|
|
61
|
-
Button,
|
|
62
|
-
{
|
|
63
|
-
primary: true,
|
|
64
|
-
size: "small",
|
|
65
|
-
onClick: onCreateAccount,
|
|
66
|
-
label: "Sign up"
|
|
67
|
-
}
|
|
68
|
-
)
|
|
69
|
-
] }) })
|
|
70
|
-
] }) });
|
|
71
|
-
|
|
72
|
-
export {
|
|
73
|
-
Header
|
|
74
|
-
};
|
|
75
|
-
//# sourceMappingURL=chunk-DDHQ5ZFF.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/stories/header.module.css","../src/stories/Header.tsx"],"sourcesContent":[".storybook-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n padding: 15px 20px;\n font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n}\n\n.storybook-header svg {\n display: inline-block;\n vertical-align: top;\n}\n\n.storybook-header h1 {\n display: inline-block;\n vertical-align: top;\n margin: 6px 0 6px 10px;\n font-weight: 700;\n font-size: 20px;\n line-height: 1;\n}\n\n.storybook-header button + button {\n margin-left: 10px;\n}\n\n.storybook-header .welcome {\n margin-right: 10px;\n color: #333;\n font-size: 14px;\n}\n","import { Button } from \"./Button\";\nimport styles from \"./header.module.css\";\n\ntype User = {\n name: string;\n};\n\nexport interface HeaderProps {\n user?: User;\n onLogin?: () => void;\n onLogout?: () => void;\n onCreateAccount?: () => void;\n}\n\nexport const Header = ({\n user,\n onLogin,\n onLogout,\n onCreateAccount,\n}: HeaderProps) => (\n <header>\n <div className={styles[\"storybook-header\"]}>\n <div>\n <svg\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 32 32\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g fill=\"none\" fillRule=\"evenodd\">\n <path\n d=\"M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z\"\n fill=\"#FFF\"\n />\n <path\n d=\"M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z\"\n fill=\"#555AB9\"\n />\n <path\n d=\"M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z\"\n fill=\"#91BAF8\"\n />\n </g>\n </svg>\n <h1>Acme</h1>\n </div>\n <div>\n {user ? (\n <>\n <span className=\"welcome\">\n Welcome, <b>{user.name}</b>!\n </span>\n <Button size=\"small\" onClick={onLogout} label=\"Log out\" />\n </>\n ) : (\n <>\n <Button size=\"small\" onClick={onLogin} label=\"Log in\" />\n <Button\n primary\n size=\"small\"\n onClick={onCreateAccount}\n label=\"Sign up\"\n />\n </>\n )}\n </div>\n </div>\n </header>\n);\n"],"mappings":";;;;;AAAA;;;AC6BU,SAmBA,UAlBE,KADF;AAfH,IAAM,SAAS,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE,oBAAC,YACC,+BAAC,SAAI,WAAW,eAAO,kBAAkB,GACvC;AAAA,uBAAC,SACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,OAAM;AAAA,QACN,QAAO;AAAA,QACP,SAAQ;AAAA,QACR,OAAM;AAAA,QAEN,+BAAC,OAAE,MAAK,QAAO,UAAS,WACtB;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,GAAE;AAAA,cACF,MAAK;AAAA;AAAA,UACP;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,GAAE;AAAA,cACF,MAAK;AAAA;AAAA,UACP;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,GAAE;AAAA,cACF,MAAK;AAAA;AAAA,UACP;AAAA,WACF;AAAA;AAAA,IACF;AAAA,IACA,oBAAC,QAAG,kBAAI;AAAA,KACV;AAAA,EACA,oBAAC,SACE,iBACC,iCACE;AAAA,yBAAC,UAAK,WAAU,WAAU;AAAA;AAAA,MACf,oBAAC,OAAG,eAAK,MAAK;AAAA,MAAI;AAAA,OAC7B;AAAA,IACA,oBAAC,UAAO,MAAK,SAAQ,SAAS,UAAU,OAAM,WAAU;AAAA,KAC1D,IAEA,iCACE;AAAA,wBAAC,UAAO,MAAK,SAAQ,SAAS,SAAS,OAAM,UAAS;AAAA,IACtD;AAAA,MAAC;AAAA;AAAA,QACC,SAAO;AAAA,QACP,MAAK;AAAA,QACL,SAAS;AAAA,QACT,OAAM;AAAA;AAAA,IACR;AAAA,KACF,GAEJ;AAAA,GACF,GACF;","names":[]}
|
|
File without changes
|