@streamlayer/react-ui 0.37.0 → 0.38.0
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as t, jsxs as d, Fragment as i } from "react/jsx-runtime";
|
|
2
|
-
import { SButton as
|
|
2
|
+
import { SButton as l, ButtonIcon as m, ButtonLabel as s } from "./styles.js";
|
|
3
3
|
import "@linaria/react";
|
|
4
|
-
const
|
|
5
|
-
r && /* @__PURE__ */ t(
|
|
6
|
-
/* @__PURE__ */ t(
|
|
4
|
+
const p = ({ disabled: e, active: n, onClick: o, label: c, icon: r }) => /* @__PURE__ */ t(l, { onClick: o, disabled: e, "data-selected": n, children: /* @__PURE__ */ d(i, { children: [
|
|
5
|
+
r && /* @__PURE__ */ t(m, { children: r }),
|
|
6
|
+
/* @__PURE__ */ t(s, { children: c })
|
|
7
7
|
] }) });
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
p as Button
|
|
10
10
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const SButton: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
3
3
|
export declare const ButtonIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
4
|
+
export declare const ButtonLabel: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
@@ -9,7 +9,10 @@ const e = r.button`
|
|
|
9
9
|
border-radius: 100px;
|
|
10
10
|
border: 1px solid var(--color-neutrals-gray3);
|
|
11
11
|
color: var(--color-primary-green1);
|
|
12
|
-
padding:
|
|
12
|
+
padding: 0px 8px;
|
|
13
|
+
font-size: 12px;
|
|
14
|
+
font-weight: var(--font-weight-default);
|
|
15
|
+
letter-spacing: -0.5px;
|
|
13
16
|
cursor: pointer;
|
|
14
17
|
|
|
15
18
|
&:hover {
|
|
@@ -19,26 +22,38 @@ const e = r.button`
|
|
|
19
22
|
&[data-selected='true'] {
|
|
20
23
|
color: var(--color-white);
|
|
21
24
|
background-color: var(--color-primary-green1);
|
|
25
|
+
border-color: var(--color-primary-green1);
|
|
22
26
|
|
|
23
27
|
&:hover {
|
|
24
|
-
border-color: var(--color-neutrals-gray3);
|
|
25
28
|
cursor: default;
|
|
26
29
|
}
|
|
30
|
+
|
|
31
|
+
&:disabled {
|
|
32
|
+
&:hover {
|
|
33
|
+
border-color: var(--color-primary-green1);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
27
36
|
}
|
|
28
37
|
|
|
29
38
|
&:disabled {
|
|
30
39
|
opacity: 0.5;
|
|
31
40
|
cursor: default;
|
|
41
|
+
|
|
42
|
+
&:hover {
|
|
43
|
+
cursor: default;
|
|
44
|
+
border-color: var(--color-neutrals-gray3);
|
|
45
|
+
}
|
|
32
46
|
}
|
|
33
47
|
`, t = r.span`
|
|
34
|
-
display:
|
|
48
|
+
display: flex;
|
|
35
49
|
width: 22px;
|
|
36
50
|
height: 22px;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
align-items: center;
|
|
37
53
|
margin-right: 5px;
|
|
38
|
-
|
|
39
|
-
background-position: center;
|
|
40
|
-
`;
|
|
54
|
+
`, a = r.span``;
|
|
41
55
|
export {
|
|
42
56
|
t as ButtonIcon,
|
|
57
|
+
a as ButtonLabel,
|
|
43
58
|
e as SButton
|
|
44
59
|
};
|
|
@@ -52,7 +52,8 @@ const N = {
|
|
|
52
52
|
}, E = Object.assign({}, N, T), S = {
|
|
53
53
|
REGULAR: "'Benton Sans', BentonSans, SL-FONT1, Arial, Helvetica, sans-serif",
|
|
54
54
|
SERIF: "'Tiempos', 'Tiempos Text', SL-FONT2, Times New Roman, serif",
|
|
55
|
-
COLOR: "#fff"
|
|
55
|
+
COLOR: "#fff",
|
|
56
|
+
WEIGHT_DEFAULT: "500"
|
|
56
57
|
}, O = Object.keys(E).reduce((_, R) => {
|
|
57
58
|
const A = E[R];
|
|
58
59
|
return `
|
package/lib/ui/theme/theme.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { css as h } from "@linaria/core";
|
|
3
|
-
import { colors as
|
|
3
|
+
import { colors as d, FONT as e } from "./constants.js";
|
|
4
4
|
const l = `
|
|
5
|
-
${
|
|
6
|
-
--font-family: ${
|
|
7
|
-
--font-regular: ${
|
|
8
|
-
--font-color: ${
|
|
9
|
-
--font-serif: ${
|
|
5
|
+
${d}
|
|
6
|
+
--font-family: ${e.REGULAR};
|
|
7
|
+
--font-regular: ${e.REGULAR};
|
|
8
|
+
--font-color: ${e.COLOR};
|
|
9
|
+
--font-serif: ${e.SERIF};
|
|
10
|
+
--font-weight-default: ${e.WEIGHT_DEFAULT};
|
|
10
11
|
`, f = h`
|
|
11
12
|
${l}
|
|
12
|
-
`, p = () => /* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
13
|
+
`, p = () => /* @__PURE__ */ t("table", { children: /* @__PURE__ */ r("table", { children: [
|
|
14
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ r("tr", { children: [
|
|
15
|
+
/* @__PURE__ */ t("th", { children: "name" }),
|
|
16
|
+
/* @__PURE__ */ t("th", { children: "value" })
|
|
16
17
|
] }) }),
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
+
/* @__PURE__ */ t("tbody", { children: l.split(";").map((o) => {
|
|
18
19
|
const n = o.trim(), [i, c] = n.split(":");
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ r("tr", { children: [
|
|
21
|
+
/* @__PURE__ */ t("td", { children: i }),
|
|
22
|
+
/* @__PURE__ */ t("td", { children: c })
|
|
22
23
|
] }, n);
|
|
23
24
|
}) })
|
|
24
25
|
] }) });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -73,6 +73,6 @@
|
|
|
73
73
|
"vite-plugin-svgr": "^4.1.0",
|
|
74
74
|
"vite-svg-loader": "^4.0.0",
|
|
75
75
|
"vite-tsconfig-paths": "^4.2.1",
|
|
76
|
-
"@streamlayer/react": "^0.23.
|
|
76
|
+
"@streamlayer/react": "^0.23.3"
|
|
77
77
|
}
|
|
78
78
|
}
|