@typeolymp/ui-components 2.2.5 → 2.2.7
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.
|
@@ -15,7 +15,10 @@ export declare const Multiple: () => JSX.Element;
|
|
|
15
15
|
export declare const Playground: {
|
|
16
16
|
(args: any): JSX.Element;
|
|
17
17
|
args: {
|
|
18
|
+
type: string[];
|
|
18
19
|
locale: Locale;
|
|
20
|
+
hideTitle: boolean;
|
|
21
|
+
hidePeriod: boolean;
|
|
19
22
|
exerciseResults: ({
|
|
20
23
|
_id: string;
|
|
21
24
|
student: string;
|
package/build/index.es.js
CHANGED
|
@@ -48070,7 +48070,7 @@ var TimeChart = function (_a) {
|
|
|
48070
48070
|
};
|
|
48071
48071
|
|
|
48072
48072
|
var Chart = function (_a) {
|
|
48073
|
-
var type = _a.type, locale = _a.locale, exerciseResults = _a.exerciseResults, _b = _a.defaultPeriod, defaultPeriod = _b === void 0 ? Period.TODAY : _b, onChangePeriod = _a.onChangePeriod, nExercisesInCourse = _a.nExercisesInCourse;
|
|
48073
|
+
var type = _a.type, locale = _a.locale, hideTitle = _a.hideTitle, hidePeriod = _a.hidePeriod, exerciseResults = _a.exerciseResults, _b = _a.defaultPeriod, defaultPeriod = _b === void 0 ? Period.TODAY : _b, onChangePeriod = _a.onChangePeriod, nExercisesInCourse = _a.nExercisesInCourse;
|
|
48074
48074
|
var _c = useState(defaultPeriod), period = _c[0], setPeriod = _c[1];
|
|
48075
48075
|
useEffect(function () {
|
|
48076
48076
|
setPeriod(defaultPeriod);
|
|
@@ -48107,20 +48107,20 @@ var Chart = function (_a) {
|
|
|
48107
48107
|
return jsx$1(TimeChart, __assign$2({}, props));
|
|
48108
48108
|
}
|
|
48109
48109
|
};
|
|
48110
|
-
return (jsxs(Fragment$1, { children: [jsxs("div", __assign$2({ style: {
|
|
48110
|
+
return (jsxs(Fragment$1, { children: [(!hideTitle || !hidePeriod) && (jsxs("div", __assign$2({ style: {
|
|
48111
48111
|
display: "flex",
|
|
48112
48112
|
gap: 20,
|
|
48113
48113
|
alignItems: "baseline",
|
|
48114
|
-
justifyContent: "
|
|
48114
|
+
justifyContent: "flex-end",
|
|
48115
48115
|
marginBottom: 10,
|
|
48116
48116
|
padding: "0 15px 0 5px",
|
|
48117
|
-
} }, { children: [jsx$1(Heading, __assign$2({ type: "h3" }, { children: titles[type] })), jsx$1(Select, __assign$2({ defaultValue: period, onChange: function (value) {
|
|
48117
|
+
} }, { children: [!hideTitle && (jsx$1("div", __assign$2({ style: { marginRight: "auto" } }, { children: jsx$1(Heading, __assign$2({ type: "h3" }, { children: titles[type] })) }))), !hidePeriod && (jsx$1(Select, __assign$2({ defaultValue: period, onChange: function (value) {
|
|
48118
48118
|
setPeriod(value);
|
|
48119
48119
|
onChangePeriod(value);
|
|
48120
48120
|
}, id: "period", name: "period" }, { children: periods.map(function (_a) {
|
|
48121
48121
|
var value = _a.value, label = _a.label;
|
|
48122
48122
|
return (jsx$1("option", __assign$2({ value: value }, { children: label }), value));
|
|
48123
|
-
}) }), period)] })), renderChart()] }));
|
|
48123
|
+
}) }), period))] }))), renderChart()] }));
|
|
48124
48124
|
};
|
|
48125
48125
|
|
|
48126
48126
|
var Container$5 = styled.div(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject$1(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n flex-wrap: wrap;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n flex-wrap: wrap;\n"])));
|
|
@@ -48416,7 +48416,7 @@ var Form = forwardRef(function (props, ref) {
|
|
|
48416
48416
|
});
|
|
48417
48417
|
|
|
48418
48418
|
var Container$3 = styled.div(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject$1(["\n min-width: 720px;\n width: 100%;\n border-radius: 10px;\n padding: 15px;\n box-sizing: border-box;\n border: 1px solid ", ";\n background-color: ", ";\n box-shadow: 0 4px 0 ", ";\n\n display: flex;\n flex-direction: column;\n gap: 10px;\n"], ["\n min-width: 720px;\n width: 100%;\n border-radius: 10px;\n padding: 15px;\n box-sizing: border-box;\n border: 1px solid ", ";\n background-color: ", ";\n box-shadow: 0 4px 0 ", ";\n\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])), theme.colors.lightGray.darker, theme.colors.lightGray.base, theme.colors.lightGray.darker);
|
|
48419
|
-
var Row = styled.div(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject$1(["\n min-height: 40px;\n
|
|
48419
|
+
var Row = styled.div(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject$1(["\n min-height: 40px;\n display: grid;\n gap: 7px;\n"], ["\n min-height: 40px;\n display: grid;\n gap: 7px;\n"])));
|
|
48420
48420
|
var Row1 = styled(Row)(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject$1(["\n grid-template-columns: repeat(13, 1fr) 1.75fr;\n"], ["\n grid-template-columns: repeat(13, 1fr) 1.75fr;\n"])));
|
|
48421
48421
|
var Row2 = styled(Row)(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject$1(["\n grid-template-columns: 1.5fr repeat(12, 1fr) 1.25fr;\n\n > div:last-child {\n border-radius: 6px 6px 0;\n }\n"], ["\n grid-template-columns: 1.5fr repeat(12, 1fr) 1.25fr;\n\n > div:last-child {\n border-radius: 6px 6px 0;\n }\n"])));
|
|
48422
48422
|
var Row3 = styled(Row)(templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject$1(["\n grid-template-columns: 2fr repeat(12, 1fr) 0.75fr;\n\n > div:last-child {\n margin-top: -11px;\n border-top: none;\n border-radius: 0 0 6px 6px;\n }\n"], ["\n grid-template-columns: 2fr repeat(12, 1fr) 0.75fr;\n\n > div:last-child {\n margin-top: -11px;\n border-top: none;\n border-radius: 0 0 6px 6px;\n }\n"])));
|