lucentia-ui 0.2.13 β 0.2.15
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.
- package/dist/components/Button/Button.module.css +2 -1
- package/dist/components/Button/Button.stories.js +1 -1
- package/dist/components/Feedback/Modal/Modal.js +1 -1
- package/dist/components/Menu/Menu.module.css +51 -0
- package/dist/components/Menu/MenuItem.d.ts +2 -0
- package/dist/components/Menu/MenuItem.js +6 -0
- package/dist/components/Menu/MenuLink.d.ts +2 -0
- package/dist/components/Menu/MenuLink.js +6 -0
- package/dist/components/Menu/MenuList.d.ts +2 -0
- package/dist/components/Menu/MenuList.js +6 -0
- package/dist/components/Menu/index.d.ts +4 -0
- package/dist/components/Menu/index.js +3 -0
- package/dist/components/Menu/types.d.ts +18 -0
- package/dist/components/Menu/types.js +1 -0
- package/dist/styles/tokens.css +2 -2
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
color: var(--color-on-surface);
|
|
22
22
|
}
|
|
23
23
|
.ghost:hover:not(:disabled) {
|
|
24
|
-
|
|
24
|
+
border: 2px solid var(--color-border);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
|
|
@@ -120,6 +120,7 @@
|
|
|
120
120
|
.sm.button:active:not(:disabled),
|
|
121
121
|
.md.button:active:not(:disabled),
|
|
122
122
|
.button[data-state="pressed"] {
|
|
123
|
+
|
|
123
124
|
box-shadow: none;
|
|
124
125
|
}
|
|
125
126
|
|
|
@@ -36,7 +36,7 @@ export const State = {
|
|
|
36
36
|
flexDirection: "column",
|
|
37
37
|
alignItems: "flex-start",
|
|
38
38
|
gap: 32,
|
|
39
|
-
}, children: [_jsx(Button, { variant: "ghost", children: "Default" }), _jsx(Button, { variant: "ghost",
|
|
39
|
+
}, children: [_jsx(Button, { variant: "ghost", children: "Default" }), _jsx(Button, { variant: "ghost", "data-state": "pressed", children: "Pressed" }), _jsx(Button, { variant: "ghost", disabled: true, children: "Disabled" })] })),
|
|
40
40
|
};
|
|
41
41
|
export const Variants = {
|
|
42
42
|
render: () => (_jsxs("div", { style: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { useEffect, useState } from "react";
|
|
3
4
|
import { createPortal } from "react-dom";
|
|
@@ -7,7 +8,6 @@ export const Modal = ({ open, onClose, children, className, }) => {
|
|
|
7
8
|
useEffect(() => {
|
|
8
9
|
setMounted(true);
|
|
9
10
|
}, []);
|
|
10
|
-
// π θζ―γΉγ―γγΌγ«γγγ―
|
|
11
11
|
useEffect(() => {
|
|
12
12
|
if (!open)
|
|
13
13
|
return;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
.list {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: var(--gap-sm);
|
|
5
|
+
margin: 0;
|
|
6
|
+
list-style: none;
|
|
7
|
+
padding: var(--space-lg) 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.item {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
.menuLink {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: var(--space-sm);
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
|
|
24
|
+
font-weight: var(--font-weight-medium);
|
|
25
|
+
text-decoration: none;
|
|
26
|
+
color: var(--color-on-surface);
|
|
27
|
+
|
|
28
|
+
padding: var(--space-md) var(--space-lg);
|
|
29
|
+
|
|
30
|
+
border-radius: var(--radius-sm);
|
|
31
|
+
box-shadow: var(--shadow-sm);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.menuLink:hover{
|
|
35
|
+
background: var(--color-surface-container);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.menuLink:active{
|
|
39
|
+
box-shadow: var(--shadow-sm-in);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.menuLink.active {
|
|
43
|
+
color: var(--color-on-primary-container);
|
|
44
|
+
background: var(--color-primary-container);
|
|
45
|
+
box-shadow: var(--shadow-sm-in);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.disabled {
|
|
49
|
+
opacity: 0.5;
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styles from "./Menu.module.css";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
export const MenuItem = ({ children, disabled = false, className, }) => {
|
|
5
|
+
return (_jsx("li", { className: clsx(styles.item, disabled && styles.disabled, className), "aria-disabled": disabled, role: "none", children: children }));
|
|
6
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import Link from "next/link";
|
|
3
|
+
import styles from "./Menu.module.css";
|
|
4
|
+
export const MenuLink = ({ href, children, isActive = false, }) => {
|
|
5
|
+
return (_jsx(Link, { href: href, role: "menuitem", className: `${styles.menuLink} ${isActive ? styles.active : ""}`, "aria-current": isActive ? "page" : undefined, children: children }));
|
|
6
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { LinkProps } from "next/link";
|
|
3
|
+
export interface MenuListProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface MenuItemProps {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onSelect?: () => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface MenuLinkProps extends Omit<LinkProps, "children"> {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
isActive?: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/styles/tokens.css
CHANGED
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
--color-on-background: #161d1d;
|
|
63
63
|
|
|
64
64
|
--color-surface: #f4fbfabf;
|
|
65
|
-
--color-on-surface: #
|
|
65
|
+
--color-on-surface: #3a4444;
|
|
66
66
|
--color-on-surface-variant: #161d1d80;
|
|
67
67
|
--color-surface-container: #e9efeebf;
|
|
68
68
|
|
|
@@ -121,7 +121,7 @@ html[data-theme="dark"] {
|
|
|
121
121
|
--color-on-background: #dde4e3;
|
|
122
122
|
|
|
123
123
|
--color-surface: #2b3a38bf;
|
|
124
|
-
--color-on-surface: #
|
|
124
|
+
--color-on-surface: #c3cbca;
|
|
125
125
|
--color-on-surface-variant: #dde4e380;
|
|
126
126
|
--color-surface-container: #262d2d;
|
|
127
127
|
|
package/package.json
CHANGED