math-main-components 0.0.137 → 0.0.144

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,8 +1,10 @@
1
1
  import React, { MouseEvent } from 'react';
2
+ type ButtonType = "blue" | "red" | "grey" | "lightBlue";
2
3
  export declare function Button({ text, iconName, iconFill, type, onClick }: {
3
4
  text?: string;
4
5
  iconName?: string;
5
6
  iconFill?: string;
6
- type?: string;
7
+ type?: ButtonType;
7
8
  onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
8
9
  }): React.JSX.Element;
10
+ export {};
@@ -13,7 +13,7 @@ export type TableItemAction<DataType> = {
13
13
  onClick: (event: MouseEvent<HTMLDivElement>, item: TableItem<DataType>, index: number) => void;
14
14
  type: TableActionType;
15
15
  };
16
- export declare function Table<DataType>({ items, title, actions, moreActions, selected, style, marginTop, emptyTitle, emptySubtitle, emptyIconName }: {
16
+ export declare function Table<DataType>({ items, title, actions, moreActions, selected, style, marginTop, emptyTitle, emptySubtitle, emptyIconName, enableEmptyCard }: {
17
17
  items: TableItem<DataType>[];
18
18
  title: string;
19
19
  selected?: number;
@@ -24,4 +24,5 @@ export declare function Table<DataType>({ items, title, actions, moreActions, se
24
24
  emptyTitle?: string;
25
25
  emptySubtitle?: string;
26
26
  emptyIconName?: string;
27
+ enableEmptyCard?: boolean;
27
28
  }): React.JSX.Element;
package/dist/index.cjs.js CHANGED
@@ -64,8 +64,8 @@ function AuthButton({ text, type = "submit", theme = "primary", iconName = "arro
64
64
  React__default["default"].createElement(SvgIcon, { iconName: iconName }))));
65
65
  }
66
66
 
67
- var css_248z$t = ".styles-module_container__TP0rp {\n max-width: 100%;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr {\n padding: 10px 18px;\n background: var(--primary-1);\n border-radius: 40px;\n cursor: pointer;\n display: flex;\n flex-direction: row;\n gap: 10px;\n font-size: 15px;\n font-weight: 400;\n color: white;\n align-items: center;\n border: none;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_onlyIcon__bNVnI {\n width: 44px;\n height: 44px;\n padding: 0;\n align-items: center;\n justify-content: center;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_onlyIcon__bNVnI span {\n font-size: 22px !important;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_red__EhImH {\n background: var(--red-1);\n color: white;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_grey__kAVD1 {\n background: var(--background-1);\n color: var(--foreground-2);\n}";
68
- var styles$t = {"container":"styles-module_container__TP0rp","button":"styles-module_button__Sh-fr","onlyIcon":"styles-module_onlyIcon__bNVnI","red":"styles-module_red__EhImH","grey":"styles-module_grey__kAVD1"};
67
+ var css_248z$t = ".styles-module_container__TP0rp {\n max-width: 100%;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr {\n padding: 10px 18px;\n border-radius: 40px;\n cursor: pointer;\n display: flex;\n flex-direction: row;\n gap: 10px;\n font-size: 15px;\n font-weight: 400;\n align-items: center;\n border: none;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_blue__DRdbo {\n background: var(--primary-1);\n color: white;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_lightBlue__7EKfp {\n background: var(--primary-2);\n color: var(--primary-1);\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_red__EhImH {\n background: var(--red-1);\n color: white;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_grey__kAVD1 {\n background: var(--background-1);\n color: var(--foreground-2);\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_onlyIcon__bNVnI {\n width: 44px;\n height: 44px;\n padding: 0;\n align-items: center;\n justify-content: center;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_onlyIcon__bNVnI span {\n font-size: 22px !important;\n}";
68
+ var styles$t = {"container":"styles-module_container__TP0rp","button":"styles-module_button__Sh-fr","blue":"styles-module_blue__DRdbo","lightBlue":"styles-module_lightBlue__7EKfp","red":"styles-module_red__EhImH","grey":"styles-module_grey__kAVD1","onlyIcon":"styles-module_onlyIcon__bNVnI"};
69
69
  styleInject(css_248z$t);
70
70
 
71
71
  function Button({ text, iconName, iconFill = "white", type = "blue", onClick = () => { } }) {
@@ -175,7 +175,7 @@ function EmptyCard({ title = "Keine Daten", subtitle = "Es sind keine Daten vorh
175
175
  React__default["default"].createElement(SvgIcon, { size: "60px", iconName: iconName }),
176
176
  React__default["default"].createElement("h1", null, title),
177
177
  React__default["default"].createElement("p", null, subtitle),
178
- button && React__default["default"].createElement(Button, { text: button, onClick: onClick })));
178
+ button && React__default["default"].createElement(Button, { text: button, onClick: onClick, type: "lightBlue" })));
179
179
  }
180
180
 
181
181
  var css_248z$m = ".styles-module_container__HOoBj {\n margin-bottom: 30px;\n}\n.styles-module_container__HOoBj button {\n padding: 12px 18px;\n border-radius: 40px;\n border: none;\n color: white;\n font-weight: 400;\n font-size: 16px;\n background: var(--primary-1);\n cursor: pointer;\n display: flex;\n flex-direction: row;\n gap: 10px;\n align-items: center;\n}";
@@ -632,9 +632,9 @@ var css_248z$3 = ".styles-module_container__jNs7m h3 {\n font-weight: 500;\n f
632
632
  var styles$3 = {"container":"styles-module_container__jNs7m","item_list":"styles-module_item_list__FxHkg","has_children":"styles-module_has_children__Uu-8D","action":"styles-module_action__YYTok","default":"styles-module_default__SexGH","red":"styles-module_red__KD3qJ","item":"styles-module_item__sgyiV","selected":"styles-module_selected__iOu39","icon":"styles-module_icon__Jy87z","moreText":"styles-module_moreText__-blXb","subtitle":"styles-module_subtitle__DT5OF","blue":"styles-module_blue__theVn","title":"styles-module_title__nIwzs"};
633
633
  styleInject(css_248z$3);
634
634
 
635
- function Table({ items, title = "Titel", actions = [], moreActions, selected, style = "default", marginTop = 30, emptyTitle = "Keine Daten", emptySubtitle = "Es sind keine Daten vorhanden.", emptyIconName = "manage_search" }) {
635
+ function Table({ items, title = "Titel", actions = [], moreActions, selected, style = "default", marginTop = 30, emptyTitle = "Keine Daten", emptySubtitle = "Es sind keine Daten vorhanden.", emptyIconName = "manage_search", enableEmptyCard = true }) {
636
636
  return (React__default["default"].createElement("div", { className: styles$3.container, style: { marginTop: marginTop } },
637
- items.length == 0 &&
637
+ items.length == 0 && enableEmptyCard &&
638
638
  React__default["default"].createElement(EmptyCard, { title: emptyTitle, subtitle: emptySubtitle, iconName: emptyIconName }),
639
639
  items.length > 0 &&
640
640
  React__default["default"].createElement(React__default["default"].Fragment, null,
package/dist/index.esm.js CHANGED
@@ -56,8 +56,8 @@ function AuthButton({ text, type = "submit", theme = "primary", iconName = "arro
56
56
  React.createElement(SvgIcon, { iconName: iconName }))));
57
57
  }
58
58
 
59
- var css_248z$t = ".styles-module_container__TP0rp {\n max-width: 100%;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr {\n padding: 10px 18px;\n background: var(--primary-1);\n border-radius: 40px;\n cursor: pointer;\n display: flex;\n flex-direction: row;\n gap: 10px;\n font-size: 15px;\n font-weight: 400;\n color: white;\n align-items: center;\n border: none;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_onlyIcon__bNVnI {\n width: 44px;\n height: 44px;\n padding: 0;\n align-items: center;\n justify-content: center;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_onlyIcon__bNVnI span {\n font-size: 22px !important;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_red__EhImH {\n background: var(--red-1);\n color: white;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_grey__kAVD1 {\n background: var(--background-1);\n color: var(--foreground-2);\n}";
60
- var styles$t = {"container":"styles-module_container__TP0rp","button":"styles-module_button__Sh-fr","onlyIcon":"styles-module_onlyIcon__bNVnI","red":"styles-module_red__EhImH","grey":"styles-module_grey__kAVD1"};
59
+ var css_248z$t = ".styles-module_container__TP0rp {\n max-width: 100%;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr {\n padding: 10px 18px;\n border-radius: 40px;\n cursor: pointer;\n display: flex;\n flex-direction: row;\n gap: 10px;\n font-size: 15px;\n font-weight: 400;\n align-items: center;\n border: none;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_blue__DRdbo {\n background: var(--primary-1);\n color: white;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_lightBlue__7EKfp {\n background: var(--primary-2);\n color: var(--primary-1);\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_red__EhImH {\n background: var(--red-1);\n color: white;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_grey__kAVD1 {\n background: var(--background-1);\n color: var(--foreground-2);\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_onlyIcon__bNVnI {\n width: 44px;\n height: 44px;\n padding: 0;\n align-items: center;\n justify-content: center;\n}\n.styles-module_container__TP0rp .styles-module_button__Sh-fr.styles-module_onlyIcon__bNVnI span {\n font-size: 22px !important;\n}";
60
+ var styles$t = {"container":"styles-module_container__TP0rp","button":"styles-module_button__Sh-fr","blue":"styles-module_blue__DRdbo","lightBlue":"styles-module_lightBlue__7EKfp","red":"styles-module_red__EhImH","grey":"styles-module_grey__kAVD1","onlyIcon":"styles-module_onlyIcon__bNVnI"};
61
61
  styleInject(css_248z$t);
62
62
 
63
63
  function Button({ text, iconName, iconFill = "white", type = "blue", onClick = () => { } }) {
@@ -167,7 +167,7 @@ function EmptyCard({ title = "Keine Daten", subtitle = "Es sind keine Daten vorh
167
167
  React.createElement(SvgIcon, { size: "60px", iconName: iconName }),
168
168
  React.createElement("h1", null, title),
169
169
  React.createElement("p", null, subtitle),
170
- button && React.createElement(Button, { text: button, onClick: onClick })));
170
+ button && React.createElement(Button, { text: button, onClick: onClick, type: "lightBlue" })));
171
171
  }
172
172
 
173
173
  var css_248z$m = ".styles-module_container__HOoBj {\n margin-bottom: 30px;\n}\n.styles-module_container__HOoBj button {\n padding: 12px 18px;\n border-radius: 40px;\n border: none;\n color: white;\n font-weight: 400;\n font-size: 16px;\n background: var(--primary-1);\n cursor: pointer;\n display: flex;\n flex-direction: row;\n gap: 10px;\n align-items: center;\n}";
@@ -624,9 +624,9 @@ var css_248z$3 = ".styles-module_container__jNs7m h3 {\n font-weight: 500;\n f
624
624
  var styles$3 = {"container":"styles-module_container__jNs7m","item_list":"styles-module_item_list__FxHkg","has_children":"styles-module_has_children__Uu-8D","action":"styles-module_action__YYTok","default":"styles-module_default__SexGH","red":"styles-module_red__KD3qJ","item":"styles-module_item__sgyiV","selected":"styles-module_selected__iOu39","icon":"styles-module_icon__Jy87z","moreText":"styles-module_moreText__-blXb","subtitle":"styles-module_subtitle__DT5OF","blue":"styles-module_blue__theVn","title":"styles-module_title__nIwzs"};
625
625
  styleInject(css_248z$3);
626
626
 
627
- function Table({ items, title = "Titel", actions = [], moreActions, selected, style = "default", marginTop = 30, emptyTitle = "Keine Daten", emptySubtitle = "Es sind keine Daten vorhanden.", emptyIconName = "manage_search" }) {
627
+ function Table({ items, title = "Titel", actions = [], moreActions, selected, style = "default", marginTop = 30, emptyTitle = "Keine Daten", emptySubtitle = "Es sind keine Daten vorhanden.", emptyIconName = "manage_search", enableEmptyCard = true }) {
628
628
  return (React.createElement("div", { className: styles$3.container, style: { marginTop: marginTop } },
629
- items.length == 0 &&
629
+ items.length == 0 && enableEmptyCard &&
630
630
  React.createElement(EmptyCard, { title: emptyTitle, subtitle: emptySubtitle, iconName: emptyIconName }),
631
631
  items.length > 0 &&
632
632
  React.createElement(React.Fragment, null,
@@ -4,6 +4,7 @@ import { User } from "./User";
4
4
  export interface Course {
5
5
  id: string;
6
6
  title: string;
7
+ description: string;
7
8
  content: Object;
8
9
  userId: string;
9
10
  user?: User;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "math-main-components",
3
- "version": "0.0.137",
3
+ "version": "0.0.144",
4
4
  "author": "Emilian Scheel",
5
5
  "files": [
6
6
  "dist/**/*"
@@ -11,7 +11,8 @@
11
11
  "pre-commit": [
12
12
  "build",
13
13
  "increment-version",
14
- "git-add-all"
14
+ "git-add-dist",
15
+ "git-add-package-json"
15
16
  ],
16
17
  "license": "MIT",
17
18
  "devDependencies": {
@@ -45,6 +46,7 @@
45
46
  "clean": "rm -rf dist",
46
47
  "increment-version": "npm --no-git-tag-version version patch",
47
48
  "git-add-dist": "git add dist",
49
+ "git-add-package-json": "git add package.json",
48
50
  "build": "npm run build:js && npm run build:types",
49
51
  "build:js": "rollup -c",
50
52
  "build:types": "tsc --emitDeclarationOnly --outDir dist"