lucentia-ui 0.2.3 β†’ 0.2.5

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,4 +1,6 @@
1
1
  .button {
2
+ width: fit-content;
3
+ height: fit-content;
2
4
  font-family: var(--font);
3
5
  font-weight: var(--font-weight-medium);
4
6
  border: 2px solid transparent;
@@ -107,6 +109,7 @@
107
109
  .md.button:active:not(:disabled),
108
110
  .button[data-state="pressed"] {
109
111
  box-shadow: none;
112
+ background: var(--color-surface-container);
110
113
  }
111
114
 
112
115
  .button:focus-visible {
@@ -2,15 +2,25 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from "react";
3
3
  import { createPortal } from "react-dom";
4
4
  import styles from "./Modal.module.css";
5
- export const Modal = ({ open, onClose, children }) => {
5
+ export const Modal = ({ open, onClose, children, className, }) => {
6
6
  const [mounted, setMounted] = useState(false);
7
7
  useEffect(() => {
8
8
  setMounted(true);
9
9
  }, []);
10
+ // πŸ”’ θƒŒζ™―γ‚Ήγ‚―γƒ­γƒΌγƒ«γƒ­γƒƒγ‚―
11
+ useEffect(() => {
12
+ if (!open)
13
+ return;
14
+ const originalOverflow = document.body.style.overflow;
15
+ document.body.style.overflow = "hidden";
16
+ return () => {
17
+ document.body.style.overflow = originalOverflow;
18
+ };
19
+ }, [open]);
10
20
  if (!open || !mounted)
11
21
  return null;
12
22
  const modalRoot = document.getElementById("modal-root");
13
23
  if (!modalRoot)
14
24
  return null;
15
- return createPortal(_jsx("div", { className: styles.overlay, onClick: onClose, children: _jsx("div", { className: styles.modal, onClick: (e) => e.stopPropagation(), children: children }) }), modalRoot);
25
+ return createPortal(_jsx("div", { className: styles.overlay, onClick: onClose, children: _jsx("div", { className: [styles.modal, className].filter(Boolean).join(" "), onClick: (e) => e.stopPropagation(), children: children }) }), modalRoot);
16
26
  };
@@ -10,11 +10,10 @@
10
10
  }
11
11
 
12
12
  .modal {
13
- background: var(--color-surface);
13
+ background: var(--color-background);
14
14
  color: var(--color-on-surface);
15
15
  border-radius: var(--radius-md);
16
- box-shadow: var(--shadow-lg);
17
- padding: var(--space-lg);
16
+ box-shadow: var(--shadow-surface-lg);
17
+ padding: var(--space-2xl);
18
18
  min-width: 320px;
19
- max-width: 90vw;
20
19
  }
@@ -14,7 +14,7 @@ export const Default = {
14
14
  display: "flex",
15
15
  flexDirection: "column",
16
16
  alignItems: "center",
17
- gap: 32,
17
+ gap: 48,
18
18
  }, children: [_jsx("h2", { children: "Modal Title" }), _jsx("p", { children: "This is a modal content." }), _jsx(Button, { onClick: () => setOpen(false), children: "Close" })] }) })] }));
19
19
  },
20
20
  };
@@ -3,4 +3,5 @@ export type ModalProps = {
3
3
  open: boolean;
4
4
  onClose?: () => void;
5
5
  children: ReactNode;
6
+ className?: string;
6
7
  };
@@ -15,6 +15,7 @@
15
15
  --font-size-16: 16px;
16
16
  --font-size-18: 18px;
17
17
  --font-size-20: 20px;
18
+ --font-size-24: 24px;
18
19
  --font-size-28: 28px;
19
20
  --font-size-40: 40px;
20
21
  --font-size-48: 48px;
@@ -29,6 +30,7 @@
29
30
  --font-weight-black: 700;
30
31
 
31
32
  /* ===== Radius ===== */
33
+ --radius-xs: 4px;
32
34
  --radius-sm: 8px;
33
35
  --radius-md: 16px;
34
36
  --radius-max: 999px;
@@ -102,6 +104,9 @@
102
104
  --shadow-lg:
103
105
  -4px -4px 16px 8px var(--color-shadow-l),
104
106
  4px 4px 16px 8px var(--color-shadow-d);
107
+
108
+ --shadow-surface-lg:
109
+ 0px 4px 16px 8px var(--color-shadow-d);
105
110
  }
106
111
 
107
112
  .dark {
@@ -21,13 +21,13 @@
21
21
  .heading-lg {
22
22
  font-size: var(--font-size-24);
23
23
  line-height: var(--line-snug);
24
- font-weight: var(--font-weight-bold);
24
+ font-weight: var(--font-weight-medium);
25
25
  }
26
26
 
27
27
  .heading-md {
28
28
  font-size: var(--font-size-20);
29
29
  line-height: var(--line-snug);
30
- font-weight: var(--font-weight-bold);
30
+ font-weight: var(--font-weight-medium);
31
31
  }
32
32
 
33
33
  .heading-sm {
@@ -39,7 +39,7 @@
39
39
  .heading-xs {
40
40
  font-size: var(--font-size-16);
41
41
  line-height: var(--line-snug);
42
- font-weight: var(--font-weight-mideum);
42
+ font-weight: var(--font-weight-medium);
43
43
  }
44
44
 
45
45
  /* ========================================
@@ -21,11 +21,3 @@
21
21
  font-style: normal;
22
22
  font-display: swap;
23
23
  }
24
-
25
- @font-face {
26
- font-family: "Noto Sans JP";
27
- src: url("../fonts/NotoSansJP-Black.woff2") format("woff2");
28
- font-weight: 700;
29
- font-style: normal;
30
- font-display: swap;
31
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucentia-ui",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "React UI design token and component system based on neumorphism, featuring two color themes: light and dark.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
Binary file