math-main-components 0.0.227 → 0.0.231

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,5 +1,5 @@
1
1
  import React, { MouseEvent, ReactNode } from 'react';
2
- type ButtonType = "blue" | "red" | "grey" | "lightBlue";
2
+ type ButtonType = "blue" | "blue2" | "red" | "grey" | "lightBlue";
3
3
  export declare function Button({ id, children, iconName, iconFill, type, onClick, ...props }: {
4
4
  id?: string;
5
5
  iconName?: string;
@@ -12,3 +12,4 @@ export default meta;
12
12
  type Story = StoryObj<typeof meta>;
13
13
  export declare const Primary: Story;
14
14
  export declare const Icon: Story;
15
+ export declare const Blue2: Story;
@@ -1,9 +1,11 @@
1
- import React from "react";
2
- export declare function Dialog({ data, enabled, text, onClose, onSubmit, children }: {
1
+ import React, { ReactNode } from "react";
2
+ export declare const DialogButton: () => React.JSX.Element;
3
+ export type DialogProps = {
3
4
  data?: unknown;
4
5
  enabled?: boolean;
5
6
  text?: any;
6
7
  onClose?: (event: React.MouseEvent<HTMLDivElement | HTMLButtonElement>, data?: any | undefined) => void;
7
8
  onSubmit?: (event: React.MouseEvent<HTMLButtonElement>, data?: any | undefined) => void;
8
- children: any;
9
- }): React.JSX.Element;
9
+ children: ReactNode;
10
+ };
11
+ export declare function Dialog({ data, enabled, text, onClose, onSubmit, children }: DialogProps): React.JSX.Element;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import type { StoryObj } from '@storybook/react';
3
+ declare const meta: {
4
+ title: string;
5
+ component: () => import("react").JSX.Element;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Primary: Story;
@@ -0,0 +1,7 @@
1
+ import React, { HTMLAttributes, InputHTMLAttributes } from 'react';
2
+ export declare const RadioCard: ({ children, name, defaultChecked, value, ...props }: {
3
+ children: React.ReactNode;
4
+ } & React.InputHTMLAttributes<HTMLInputElement>) => React.JSX.Element;
5
+ export declare function RadioCards({ children, columns, ...props }: {
6
+ columns?: number;
7
+ } & HTMLAttributes<HTMLDivElement>): React.JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { RadioCards } from './RadioCards';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof RadioCards;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Primary: Story;
@@ -0,0 +1 @@
1
+ export { RadioCards } from './RadioCards';
package/dist/index.cjs.js CHANGED
@@ -9430,8 +9430,8 @@ function Accordeon({ title, children }) {
9430
9430
  React__default["default"].createElement("div", { className: styles$z.content }, children)));
9431
9431
  }
9432
9432
 
9433
- var css_248z$y = ".styles-module_container__TP0rp {\n max-width: 100%;\n}\n\n.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 justify-content: center;\n border: none;\n transition: 0.2s ease-in-out;\n font-family: \"Space Grotesk\", sans-serif;\n border: 1px solid transparent;\n}\n.styles-module_button__Sh-fr:hover {\n filter: brightness(0.9);\n}\n.styles-module_button__Sh-fr:focus {\n border: var(--focus-border);\n box-shadow: var(--focus-shadow);\n}\n.styles-module_button__Sh-fr.styles-module_blue__DRdbo {\n background: var(--primary-1);\n color: white;\n}\n.styles-module_button__Sh-fr.styles-module_lightBlue__7EKfp {\n background: var(--primary-2);\n color: var(--primary-1);\n}\n.styles-module_button__Sh-fr.styles-module_red__EhImH {\n background: var(--red-1);\n color: white;\n}\n.styles-module_button__Sh-fr.styles-module_grey__kAVD1 {\n background: var(--background-1);\n color: var(--foreground-2);\n}\n.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_button__Sh-fr.styles-module_onlyIcon__bNVnI span {\n font-size: 22px !important;\n}";
9434
- var styles$y = {"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"};
9433
+ var css_248z$y = ".styles-module_container__TP0rp {\n max-width: 100%;\n}\n\n.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 justify-content: center;\n border: none;\n transition: 0.2s ease-in-out;\n font-family: \"Space Grotesk\", sans-serif;\n border: 1px solid transparent;\n}\n.styles-module_button__Sh-fr:hover {\n filter: brightness(0.9);\n}\n.styles-module_button__Sh-fr:focus {\n border: var(--focus-border);\n box-shadow: var(--focus-shadow);\n}\n.styles-module_button__Sh-fr.styles-module_blue__DRdbo {\n background: var(--primary-1);\n color: white;\n}\n.styles-module_button__Sh-fr.styles-module_blue2__rejgq {\n background: var(--background-1);\n border-color: var(--primary-1);\n color: var(--primary-1);\n}\n.styles-module_button__Sh-fr.styles-module_lightBlue__7EKfp {\n background: var(--primary-2);\n color: var(--primary-1);\n}\n.styles-module_button__Sh-fr.styles-module_red__EhImH {\n background: var(--red-1);\n color: white;\n}\n.styles-module_button__Sh-fr.styles-module_grey__kAVD1 {\n background: var(--background-1);\n color: var(--foreground-2);\n}\n.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_button__Sh-fr.styles-module_onlyIcon__bNVnI span {\n font-size: 22px !important;\n}";
9434
+ var styles$y = {"container":"styles-module_container__TP0rp","button":"styles-module_button__Sh-fr","blue":"styles-module_blue__DRdbo","blue2":"styles-module_blue2__rejgq","lightBlue":"styles-module_lightBlue__7EKfp","red":"styles-module_red__EhImH","grey":"styles-module_grey__kAVD1","onlyIcon":"styles-module_onlyIcon__bNVnI"};
9435
9435
  styleInject(css_248z$y);
9436
9436
 
9437
9437
  function Button({ id, children, iconName, iconFill = "white", type = "blue", onClick = () => { }, ...props }) {
@@ -9469,23 +9469,30 @@ function Checkbox({ id, name, defaultChecked = false, onInput = () => { }, child
9469
9469
  React__default["default"].createElement(SvgIcon, { iconName: "done", size: "21px" })));
9470
9470
  }
9471
9471
 
9472
- var css_248z$v = ".styles-module_container__9-1MH {\n position: fixed;\n height: 100vh;\n width: 100vw;\n background: var(--background-2);\n backdrop-filter: blur(10px) brightness(70%);\n left: 0;\n top: 0;\n z-index: 10000;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n}\n.styles-module_container__9-1MH.styles-module_active__AXoyo {\n opacity: 1;\n}\n.styles-module_container__9-1MH.styles-module_disabled__sELpy {\n pointer-events: none;\n opacity: 0;\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M {\n background: var(--background-1);\n border-radius: 20px;\n padding: 35px;\n width: 450px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n max-width: 100%;\n box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;\n cursor: auto;\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M h1 {\n font-size: 26px;\n font-weight: 500;\n line-height: 1.5;\n margin-top: 20px;\n margin-bottom: 20px;\n text-align: center;\n color: var(--foreground-1);\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_cancel_button__KhwLS {\n border-radius: 12px;\n color: var(--foreground-1);\n background: var(--background-2);\n padding: 14px 0px;\n border: none;\n outline: none;\n cursor: pointer;\n transition: 0.2s ease-in-out;\n font-size: 16px;\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_cancel_button__KhwLS:hover {\n filter: brightness(0.95);\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_submit_button__xLzux {\n border-radius: 12px;\n color: var(--background-1);\n background: var(--primary-1);\n padding: 14px 0px;\n border: none;\n outline: none;\n cursor: pointer;\n transition: 0.2s ease-in-out;\n font-size: 16px;\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_submit_button__xLzux:hover {\n background: var(--primary-1);\n}";
9473
- var styles$v = {"container":"styles-module_container__9-1MH","active":"styles-module_active__AXoyo","disabled":"styles-module_disabled__sELpy","dialog_window":"styles-module_dialog_window__0Bn2M","cancel_button":"styles-module_cancel_button__KhwLS","submit_button":"styles-module_submit_button__xLzux"};
9472
+ var css_248z$v = ".styles-module_container__9-1MH {\n position: fixed;\n height: 100vh;\n width: 100vw;\n backdrop-filter: blur(10px) brightness(70%);\n left: 0;\n top: 0;\n z-index: 10000;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: 0.2s ease-in-out;\n}\n.styles-module_container__9-1MH.styles-module_active__AXoyo {\n opacity: 1;\n}\n.styles-module_container__9-1MH.styles-module_active__AXoyo .styles-module_dialog_window__0Bn2M {\n opacity: 1;\n transform: translateY(0%) scale(1);\n}\n.styles-module_container__9-1MH.styles-module_disabled__sELpy {\n pointer-events: none;\n opacity: 0;\n}\n.styles-module_container__9-1MH.styles-module_disabled__sELpy .styles-module_dialog_window__0Bn2M {\n opacity: 0;\n transform: translateY(5%) scale(0.9);\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M {\n background: var(--background-1);\n border-radius: 20px;\n padding: 35px;\n width: 450px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n max-width: 100%;\n box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;\n cursor: auto;\n transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_title__1--Ss {\n font-size: 26px;\n font-weight: 500;\n line-height: 1.5;\n margin-top: 0px;\n margin-bottom: 20px;\n text-align: center;\n color: var(--foreground-1);\n font-family: var(--font-1);\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_cancel_button__KhwLS,\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_submit_button__xLzux {\n border-radius: 12px;\n padding: 14px 0px;\n border: none;\n outline: none;\n cursor: pointer;\n transition: 0.2s ease-in-out;\n font-size: 14px;\n font-family: var(--font-1);\n border: 1px solid transparent;\n user-select: none;\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_cancel_button__KhwLS:hover,\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_submit_button__xLzux:hover {\n filter: brightness(0.95);\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_cancel_button__KhwLS:active,\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_submit_button__xLzux:active {\n box-shadow: var(--focus-shadow);\n border: var(--focus-border);\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_cancel_button__KhwLS {\n color: var(--foreground-1);\n background: var(--background-2);\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_submit_button__xLzux {\n color: var(--background-1);\n background: var(--primary-1);\n}";
9473
+ var styles$v = {"container":"styles-module_container__9-1MH","active":"styles-module_active__AXoyo","dialog_window":"styles-module_dialog_window__0Bn2M","disabled":"styles-module_disabled__sELpy","title":"styles-module_title__1--Ss","cancel_button":"styles-module_cancel_button__KhwLS","submit_button":"styles-module_submit_button__xLzux"};
9474
9474
  styleInject(css_248z$v);
9475
9475
 
9476
- function Dialog({ data, enabled, text, onClose, onSubmit = () => { }, children }) {
9476
+ const DialogButton = () => {
9477
+ const [enabled, setEnabled] = React.useState(false);
9478
+ return (React__default["default"].createElement(React__default["default"].Fragment, null,
9479
+ React__default["default"].createElement(Button, { onClick: () => setEnabled(true) }, "Dialog \u00F6ffnen"),
9480
+ React__default["default"].createElement(Dialog, { enabled: enabled, onClose: () => setEnabled(false), onSubmit: () => setEnabled(false) },
9481
+ React__default["default"].createElement("h1", null, "Dialog"),
9482
+ React__default["default"].createElement("p", null, "Dialog content"))));
9483
+ };
9484
+ function Dialog({ data, enabled, text, onClose = () => { }, onSubmit = () => { }, children }) {
9477
9485
  function onClick(event) {
9478
9486
  const element = event.target;
9479
9487
  const id = element.id;
9480
9488
  if (["dialog-backdrop", "cancel-button"].includes(id)) {
9481
- if (onClose)
9482
- onClose(event, data);
9489
+ onClose(event, data);
9483
9490
  }
9484
9491
  }
9485
9492
  return (React__default["default"].createElement("div", { id: "dialog-backdrop", className: `${styles$v.container} ${enabled ? styles$v.active : styles$v.disabled}`, onClick: onClick },
9486
9493
  React__default["default"].createElement("div", { className: styles$v.dialog_window },
9487
9494
  children,
9488
- text && React__default["default"].createElement("h1", null, text),
9495
+ text && React__default["default"].createElement("h1", { className: styles$v.title }, text),
9489
9496
  React__default["default"].createElement("button", { className: styles$v.cancel_button, id: "cancel-button", onClick: onClick }, "Abbrechen"),
9490
9497
  React__default["default"].createElement("button", { className: styles$v.submit_button, id: "submit-button", onClick: (event) => onSubmit(event, data) }, "Best\u00E4tigen"))));
9491
9498
  }
@@ -10592,6 +10599,7 @@ exports.Checkbox = Checkbox;
10592
10599
  exports.ChooseRole = ChooseRole;
10593
10600
  exports.CopyCode = CopyCode;
10594
10601
  exports.Dialog = Dialog;
10602
+ exports.DialogButton = DialogButton;
10595
10603
  exports.Dropdown = Dropdown;
10596
10604
  exports.EmptyCard = EmptyCard;
10597
10605
  exports.FormText = FormText;
package/dist/index.esm.js CHANGED
@@ -9404,8 +9404,8 @@ function Accordeon({ title, children }) {
9404
9404
  React__default.createElement("div", { className: styles$z.content }, children)));
9405
9405
  }
9406
9406
 
9407
- var css_248z$y = ".styles-module_container__TP0rp {\n max-width: 100%;\n}\n\n.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 justify-content: center;\n border: none;\n transition: 0.2s ease-in-out;\n font-family: \"Space Grotesk\", sans-serif;\n border: 1px solid transparent;\n}\n.styles-module_button__Sh-fr:hover {\n filter: brightness(0.9);\n}\n.styles-module_button__Sh-fr:focus {\n border: var(--focus-border);\n box-shadow: var(--focus-shadow);\n}\n.styles-module_button__Sh-fr.styles-module_blue__DRdbo {\n background: var(--primary-1);\n color: white;\n}\n.styles-module_button__Sh-fr.styles-module_lightBlue__7EKfp {\n background: var(--primary-2);\n color: var(--primary-1);\n}\n.styles-module_button__Sh-fr.styles-module_red__EhImH {\n background: var(--red-1);\n color: white;\n}\n.styles-module_button__Sh-fr.styles-module_grey__kAVD1 {\n background: var(--background-1);\n color: var(--foreground-2);\n}\n.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_button__Sh-fr.styles-module_onlyIcon__bNVnI span {\n font-size: 22px !important;\n}";
9408
- var styles$y = {"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"};
9407
+ var css_248z$y = ".styles-module_container__TP0rp {\n max-width: 100%;\n}\n\n.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 justify-content: center;\n border: none;\n transition: 0.2s ease-in-out;\n font-family: \"Space Grotesk\", sans-serif;\n border: 1px solid transparent;\n}\n.styles-module_button__Sh-fr:hover {\n filter: brightness(0.9);\n}\n.styles-module_button__Sh-fr:focus {\n border: var(--focus-border);\n box-shadow: var(--focus-shadow);\n}\n.styles-module_button__Sh-fr.styles-module_blue__DRdbo {\n background: var(--primary-1);\n color: white;\n}\n.styles-module_button__Sh-fr.styles-module_blue2__rejgq {\n background: var(--background-1);\n border-color: var(--primary-1);\n color: var(--primary-1);\n}\n.styles-module_button__Sh-fr.styles-module_lightBlue__7EKfp {\n background: var(--primary-2);\n color: var(--primary-1);\n}\n.styles-module_button__Sh-fr.styles-module_red__EhImH {\n background: var(--red-1);\n color: white;\n}\n.styles-module_button__Sh-fr.styles-module_grey__kAVD1 {\n background: var(--background-1);\n color: var(--foreground-2);\n}\n.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_button__Sh-fr.styles-module_onlyIcon__bNVnI span {\n font-size: 22px !important;\n}";
9408
+ var styles$y = {"container":"styles-module_container__TP0rp","button":"styles-module_button__Sh-fr","blue":"styles-module_blue__DRdbo","blue2":"styles-module_blue2__rejgq","lightBlue":"styles-module_lightBlue__7EKfp","red":"styles-module_red__EhImH","grey":"styles-module_grey__kAVD1","onlyIcon":"styles-module_onlyIcon__bNVnI"};
9409
9409
  styleInject(css_248z$y);
9410
9410
 
9411
9411
  function Button({ id, children, iconName, iconFill = "white", type = "blue", onClick = () => { }, ...props }) {
@@ -9443,23 +9443,30 @@ function Checkbox({ id, name, defaultChecked = false, onInput = () => { }, child
9443
9443
  React__default.createElement(SvgIcon, { iconName: "done", size: "21px" })));
9444
9444
  }
9445
9445
 
9446
- var css_248z$v = ".styles-module_container__9-1MH {\n position: fixed;\n height: 100vh;\n width: 100vw;\n background: var(--background-2);\n backdrop-filter: blur(10px) brightness(70%);\n left: 0;\n top: 0;\n z-index: 10000;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n}\n.styles-module_container__9-1MH.styles-module_active__AXoyo {\n opacity: 1;\n}\n.styles-module_container__9-1MH.styles-module_disabled__sELpy {\n pointer-events: none;\n opacity: 0;\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M {\n background: var(--background-1);\n border-radius: 20px;\n padding: 35px;\n width: 450px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n max-width: 100%;\n box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;\n cursor: auto;\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M h1 {\n font-size: 26px;\n font-weight: 500;\n line-height: 1.5;\n margin-top: 20px;\n margin-bottom: 20px;\n text-align: center;\n color: var(--foreground-1);\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_cancel_button__KhwLS {\n border-radius: 12px;\n color: var(--foreground-1);\n background: var(--background-2);\n padding: 14px 0px;\n border: none;\n outline: none;\n cursor: pointer;\n transition: 0.2s ease-in-out;\n font-size: 16px;\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_cancel_button__KhwLS:hover {\n filter: brightness(0.95);\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_submit_button__xLzux {\n border-radius: 12px;\n color: var(--background-1);\n background: var(--primary-1);\n padding: 14px 0px;\n border: none;\n outline: none;\n cursor: pointer;\n transition: 0.2s ease-in-out;\n font-size: 16px;\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_submit_button__xLzux:hover {\n background: var(--primary-1);\n}";
9447
- var styles$v = {"container":"styles-module_container__9-1MH","active":"styles-module_active__AXoyo","disabled":"styles-module_disabled__sELpy","dialog_window":"styles-module_dialog_window__0Bn2M","cancel_button":"styles-module_cancel_button__KhwLS","submit_button":"styles-module_submit_button__xLzux"};
9446
+ var css_248z$v = ".styles-module_container__9-1MH {\n position: fixed;\n height: 100vh;\n width: 100vw;\n backdrop-filter: blur(10px) brightness(70%);\n left: 0;\n top: 0;\n z-index: 10000;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: 0.2s ease-in-out;\n}\n.styles-module_container__9-1MH.styles-module_active__AXoyo {\n opacity: 1;\n}\n.styles-module_container__9-1MH.styles-module_active__AXoyo .styles-module_dialog_window__0Bn2M {\n opacity: 1;\n transform: translateY(0%) scale(1);\n}\n.styles-module_container__9-1MH.styles-module_disabled__sELpy {\n pointer-events: none;\n opacity: 0;\n}\n.styles-module_container__9-1MH.styles-module_disabled__sELpy .styles-module_dialog_window__0Bn2M {\n opacity: 0;\n transform: translateY(5%) scale(0.9);\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M {\n background: var(--background-1);\n border-radius: 20px;\n padding: 35px;\n width: 450px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n max-width: 100%;\n box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;\n cursor: auto;\n transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_title__1--Ss {\n font-size: 26px;\n font-weight: 500;\n line-height: 1.5;\n margin-top: 0px;\n margin-bottom: 20px;\n text-align: center;\n color: var(--foreground-1);\n font-family: var(--font-1);\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_cancel_button__KhwLS,\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_submit_button__xLzux {\n border-radius: 12px;\n padding: 14px 0px;\n border: none;\n outline: none;\n cursor: pointer;\n transition: 0.2s ease-in-out;\n font-size: 14px;\n font-family: var(--font-1);\n border: 1px solid transparent;\n user-select: none;\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_cancel_button__KhwLS:hover,\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_submit_button__xLzux:hover {\n filter: brightness(0.95);\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_cancel_button__KhwLS:active,\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_submit_button__xLzux:active {\n box-shadow: var(--focus-shadow);\n border: var(--focus-border);\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_cancel_button__KhwLS {\n color: var(--foreground-1);\n background: var(--background-2);\n}\n.styles-module_container__9-1MH .styles-module_dialog_window__0Bn2M .styles-module_submit_button__xLzux {\n color: var(--background-1);\n background: var(--primary-1);\n}";
9447
+ var styles$v = {"container":"styles-module_container__9-1MH","active":"styles-module_active__AXoyo","dialog_window":"styles-module_dialog_window__0Bn2M","disabled":"styles-module_disabled__sELpy","title":"styles-module_title__1--Ss","cancel_button":"styles-module_cancel_button__KhwLS","submit_button":"styles-module_submit_button__xLzux"};
9448
9448
  styleInject(css_248z$v);
9449
9449
 
9450
- function Dialog({ data, enabled, text, onClose, onSubmit = () => { }, children }) {
9450
+ const DialogButton = () => {
9451
+ const [enabled, setEnabled] = useState(false);
9452
+ return (React__default.createElement(React__default.Fragment, null,
9453
+ React__default.createElement(Button, { onClick: () => setEnabled(true) }, "Dialog \u00F6ffnen"),
9454
+ React__default.createElement(Dialog, { enabled: enabled, onClose: () => setEnabled(false), onSubmit: () => setEnabled(false) },
9455
+ React__default.createElement("h1", null, "Dialog"),
9456
+ React__default.createElement("p", null, "Dialog content"))));
9457
+ };
9458
+ function Dialog({ data, enabled, text, onClose = () => { }, onSubmit = () => { }, children }) {
9451
9459
  function onClick(event) {
9452
9460
  const element = event.target;
9453
9461
  const id = element.id;
9454
9462
  if (["dialog-backdrop", "cancel-button"].includes(id)) {
9455
- if (onClose)
9456
- onClose(event, data);
9463
+ onClose(event, data);
9457
9464
  }
9458
9465
  }
9459
9466
  return (React__default.createElement("div", { id: "dialog-backdrop", className: `${styles$v.container} ${enabled ? styles$v.active : styles$v.disabled}`, onClick: onClick },
9460
9467
  React__default.createElement("div", { className: styles$v.dialog_window },
9461
9468
  children,
9462
- text && React__default.createElement("h1", null, text),
9469
+ text && React__default.createElement("h1", { className: styles$v.title }, text),
9463
9470
  React__default.createElement("button", { className: styles$v.cancel_button, id: "cancel-button", onClick: onClick }, "Abbrechen"),
9464
9471
  React__default.createElement("button", { className: styles$v.submit_button, id: "submit-button", onClick: (event) => onSubmit(event, data) }, "Best\u00E4tigen"))));
9465
9472
  }
@@ -10558,4 +10565,4 @@ const site = (pathname) => process.env.NEXT_PUBLIC_APP_URL + pathname;
10558
10565
  const app = (pathname) => site("/app" + pathname);
10559
10566
  const cdn = (pathname) => process.env.NEXT_PUBLIC_WEB_ASSETS_CDN + pathname;
10560
10567
 
10561
- export { Accordeon, Button, Button2, CardButton, Checkbox, ChooseRole, CopyCode, Dialog, Dropdown, EmptyCard, FormText, ForwardButton, Gap, InputArea, InputMail, InputNames, InputNumber, InputPassword, InputPin, InputText, NumberDropdown, NumberField, OptionField, OptionField2, Popover, ProgressBar, RadioButtons, RedirectButton, SearchChips, Searchbar, SelectFileCard, Slider, StepBack, SvgIcon, Switch, Table, Tabs, TextWithIcon, UsageCard, app, cdn, site, useDimensions, useOrientation, useScroll };
10568
+ export { Accordeon, Button, Button2, CardButton, Checkbox, ChooseRole, CopyCode, Dialog, DialogButton, Dropdown, EmptyCard, FormText, ForwardButton, Gap, InputArea, InputMail, InputNames, InputNumber, InputPassword, InputPin, InputText, NumberDropdown, NumberField, OptionField, OptionField2, Popover, ProgressBar, RadioButtons, RedirectButton, SearchChips, Searchbar, SelectFileCard, Slider, StepBack, SvgIcon, Switch, Table, Tabs, TextWithIcon, UsageCard, app, cdn, site, useDimensions, useOrientation, useScroll };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "math-main-components",
3
- "version": "0.0.227",
3
+ "version": "0.0.231",
4
4
  "author": "Emilian Scheel",
5
5
  "files": [
6
6
  "dist/**/*",
@@ -2,6 +2,7 @@
2
2
 
3
3
  --focus-shadow: 0px 0px 0px 4px #0057FF40;
4
4
  --focus-border: 1px solid var(--primary-1);
5
+ --focus-background: #0055ff12;
5
6
  --invalid-shadow: 0px 0px 0px 4px #ff000040;
6
7
  --invalid-border: 1px solid var(--red-1);
7
8