@edu-tosel/design 1.0.288 → 1.0.289

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.
@@ -39,13 +39,13 @@ function ModalV2({ titles, openState, contents, theme, btns, }) {
39
39
  const themeColors = {
40
40
  green: "green-dark",
41
41
  blue: "blue-navy",
42
- red: "red-crimson",
42
+ red: "crimson-dark",
43
43
  };
44
44
  const buttonStyles = (btn) => btn.active
45
45
  ? cn("flex justify-center items-center w-full h-fit rounded-lg p-3", btn.type === "main"
46
46
  ? `bg-${themeColors[theme]} text-white`
47
47
  : `bg-${themeColors[theme]}/10 text-${themeColors[theme]}`)
48
48
  : "flex justify-center items-center w-full h-fit rounded-lg p-3 bg-gray-light text-gray-dark cursor-not-allowed";
49
- return (_jsx("div", { className: cn(container), onClick: () => setIsOpen(false), children: _jsx("div", { className: cn(boxPositionWrapper), children: _jsxs("div", { className: cn(tagWrapper), onClick: (e) => e.stopPropagation(), children: [_jsxs("div", { className: "w-full flex justify-between items-start", children: [_jsxs("div", { className: cn(titleWrapper), children: [_jsx("div", { className: cn(titleText), children: titles.title }), _jsx("div", { className: cn(subtitleText), children: titles.subtitle })] }), _jsx("div", { className: "size-6 flex justify-center items-center cursor-pointer", onClick: () => setIsOpen(false), children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "size-6", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18 18 6M6 6l12 12" }) }) })] }), _jsx("div", { className: "w-full flex flex-wrap", children: contents }), btns && (_jsx("div", { className: "w-full flex justify-center gap-2 flex-col sm:flex-row", children: btns.map((btn, index) => btn ? (_jsx("div", { className: cn(buttonStyles(btn), btns.length === 1 ? "w-full" : "w-1/2 sm:w-full"), onClick: btn.active ? btn.options?.onClick : undefined, children: btn.options?.title }, index)) : null) }))] }) }) }));
49
+ return (_jsx("div", { className: cn(container), onClick: () => setIsOpen(false), children: _jsx("div", { className: cn(boxPositionWrapper), children: _jsxs("div", { className: cn(tagWrapper), onClick: (e) => e.stopPropagation(), children: [_jsxs("div", { className: "w-full flex justify-between items-start", children: [_jsxs("div", { className: cn(titleWrapper), children: [_jsx("div", { className: cn(titleText), children: titles.title }), _jsx("div", { className: cn(subtitleText), children: titles.subtitle })] }), _jsx("div", { className: "size-6 flex justify-center items-center cursor-pointer", onClick: () => setIsOpen(false), children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "size-6", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18 18 6M6 6l12 12" }) }) })] }), _jsx("div", { className: "w-full flex flex-wrap max-h-100 overflow-scroll", children: contents }), btns && (_jsx("div", { className: "w-full flex justify-center gap-2 cursor-pointer flex-col sm:flex-row", children: btns.map((btn, index) => btn ? (_jsx("div", { className: cn(buttonStyles(btn), btns.length === 1 ? "w-full" : "w-1/2 sm:w-full"), onClick: btn.active ? btn.options?.onClick : undefined, children: btn.options?.title }, index)) : null) }))] }) }) }));
50
50
  }
51
51
  export default ModalV2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.288",
3
+ "version": "1.0.289",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.288
1
+ 1.0.289