@mailstep/design-system 0.7.5 → 0.7.6-beta.1
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/package.json +1 -1
- package/ui/Elements/BarChartSymbol/BarChartSymbol.d.ts +1 -0
- package/ui/Elements/BarChartSymbol/BarChartSymbol.js +2 -2
- package/ui/Elements/BarChartSymbol/styles.d.ts +1 -0
- package/ui/Elements/BarChartSymbol/styles.js +1 -2
- package/ui/Elements/Table/Table.d.ts +6 -0
- package/ui/Elements/Table/Table.js +12 -0
- package/ui/Elements/Table/index.d.ts +1 -0
- package/ui/Elements/Table/index.js +1 -0
- package/ui/Elements/Table/stories/Table.stories.d.ts +8 -0
- package/ui/Elements/Table/stories/Table.stories.js +10 -0
- package/ui/index.es.js +14013 -14486
- package/ui/index.umd.js +580 -580
package/package.json
CHANGED
|
@@ -2,6 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { x } from '@xstyled/styled-components';
|
|
3
3
|
import { Bar } from './styles';
|
|
4
4
|
export var BarChartSymbol = function (_a) {
|
|
5
|
-
var _b = _a.total, total = _b === void 0 ? 3 : _b, _c = _a.height, height = _c === void 0 ? 14 : _c, _d = _a.
|
|
6
|
-
return (_jsx(x.div, { display: "flex", alignItems: "flex-end", gap: "".concat(gap, "px"), children: Array.from({ length: total }).map(function (_, index) { return (_jsx(Bar, { total: total, index: index + 1, height: height, selected: selected, color: color, width: width }, index)); }) }));
|
|
5
|
+
var _b = _a.total, total = _b === void 0 ? 3 : _b, _c = _a.height, height = _c === void 0 ? 14 : _c, _d = _a.minHeight, minHeight = _d === void 0 ? 7 : _d, _e = _a.selected, selected = _e === void 0 ? 3 : _e, _f = _a.gap, gap = _f === void 0 ? 2 : _f, _g = _a.width, width = _g === void 0 ? 3 : _g, color = _a.color;
|
|
6
|
+
return (_jsx(x.div, { display: "flex", alignItems: "flex-end", gap: "".concat(gap, "px"), children: Array.from({ length: total }).map(function (_, index) { return (_jsx(Bar, { total: total, index: index + 1, height: height, minHeight: minHeight, selected: selected, color: color, width: width }, index)); }) }));
|
|
7
7
|
};
|
|
@@ -3,12 +3,11 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
3
3
|
return cooked;
|
|
4
4
|
};
|
|
5
5
|
import { styled, th } from '@xstyled/styled-components';
|
|
6
|
-
var minHeight = 7;
|
|
7
6
|
export var Bar = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", "px;\n height: ", "px;\n background-color: ", ";\n border-radius: 7px;\n"], ["\n width: ", "px;\n height: ", "px;\n background-color: ", ";\n border-radius: 7px;\n"])), function (_a) {
|
|
8
7
|
var width = _a.width;
|
|
9
8
|
return width;
|
|
10
9
|
}, function (_a) {
|
|
11
|
-
var index = _a.index, height = _a.height, total = _a.total;
|
|
10
|
+
var index = _a.index, height = _a.height, total = _a.total, minHeight = _a.minHeight;
|
|
12
11
|
return minHeight + (index - 1) * ((height - minHeight) / (total - 1));
|
|
13
12
|
}, function (_a) {
|
|
14
13
|
var selected = _a.selected, index = _a.index, color = _a.color;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const Table: import("styled-components").StyledComponent<"table", import("@xstyled/system").Theme, {}, never>;
|
|
2
|
+
export declare const Tr: import("styled-components").StyledComponent<"tr", import("@xstyled/system").Theme, {}, never>;
|
|
3
|
+
export declare const Td: import("styled-components").StyledComponent<"td", import("@xstyled/system").Theme, {}, never>;
|
|
4
|
+
export declare const Th: import("styled-components").StyledComponent<"th", import("@xstyled/system").Theme, {}, never>;
|
|
5
|
+
export declare const Tbody: import("styled-components").StyledComponent<"tbody", import("@xstyled/system").Theme, {}, never>;
|
|
6
|
+
export declare const Thead: import("styled-components").StyledComponent<"thead", import("@xstyled/system").Theme, {}, never>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import styled from '@xstyled/styled-components';
|
|
6
|
+
export var Table = styled.table(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n border-collapse: collapse;\n color: blue2;\n"], ["\n width: 100%;\n border-collapse: collapse;\n color: blue2;\n"])));
|
|
7
|
+
export var Tr = styled.tr(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n &:nth-child(even) {\n background-color: bgLightGray;\n }\n"], ["\n &:nth-child(even) {\n background-color: bgLightGray;\n }\n"])));
|
|
8
|
+
export var Td = styled.td(templateObject_3 || (templateObject_3 = __makeTemplateObject([""], [""])));
|
|
9
|
+
export var Th = styled.th(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-weight: semiBold;\n text-align: left;\n border-top: 1px solid;\n border-top-color: lightGray6;\n\n &:not(:last-child) {\n border-right: 1px dashed;\n border-right-color: lightGray6;\n }\n"], ["\n font-weight: semiBold;\n text-align: left;\n border-top: 1px solid;\n border-top-color: lightGray6;\n\n &:not(:last-child) {\n border-right: 1px dashed;\n border-right-color: lightGray6;\n }\n"])));
|
|
10
|
+
export var Tbody = styled.tbody(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n td {\n padding: 9px 4px;\n }\n"], ["\n td {\n padding: 9px 4px;\n }\n"])));
|
|
11
|
+
export var Thead = styled.thead(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: bgLightGray1;\n\n th {\n padding: 10px 8px;\n }\n"], ["\n background-color: bgLightGray1;\n\n th {\n padding: 10px 8px;\n }\n"])));
|
|
12
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Table, Thead, Tr, Th, Td, Tbody } from './Table';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Table, Thead, Tr, Th, Td, Tbody } from './Table';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const meta: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: import("styled-components").StyledComponent<"table", import("@xstyled/system").Theme, {}, never>;
|
|
4
|
+
tags: string[];
|
|
5
|
+
argTypes: {};
|
|
6
|
+
};
|
|
7
|
+
export default meta;
|
|
8
|
+
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Table, Thead, Tr, Th, Td, Tbody } from '../';
|
|
3
|
+
var meta = {
|
|
4
|
+
title: 'Elements/Table',
|
|
5
|
+
component: Table,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
argTypes: {}
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
export var Default = function () { return (_jsxs(Table, { children: [_jsx(Thead, { children: _jsxs(Tr, { children: [_jsx(Th, { children: "Name" }), _jsx(Th, { children: "Address" }), _jsx(Th, { children: "City" })] }) }), _jsxs(Tbody, { children: [_jsxs(Tr, { children: [_jsx(Td, { children: "John Doe" }), _jsx(Td, { children: "123 Main St" }), _jsx(Td, { children: "Anytown" })] }), _jsxs(Tr, { children: [_jsx(Td, { children: "John Doe" }), _jsx(Td, { children: "123 Main St" }), _jsx(Td, { children: "Anytown" })] }), _jsxs(Tr, { children: [_jsx(Td, { children: "John Doe" }), _jsx(Td, { children: "123 Main St" }), _jsx(Td, { children: "Anytown" })] })] })] })); };
|