lucentia-ui 0.2.14 β†’ 0.2.16

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.
@@ -6,7 +6,7 @@
6
6
  border: 2px solid transparent;
7
7
  cursor: pointer;
8
8
 
9
- border-radius: var(--radius-sm);
9
+
10
10
 
11
11
  transition:
12
12
  box-shadow 0.2s ease,
@@ -17,11 +17,27 @@
17
17
 
18
18
  /* ===== Variant ===== */
19
19
  .ghost {
20
- background: var(--color-surface);
20
+ background: var(--color-surface-container);
21
21
  color: var(--color-on-surface);
22
22
  }
23
- .ghost:hover:not(:disabled) {
24
- background: var(--color-surface-container);
23
+
24
+ .sm.ghost:hover:not(:disabled) {
25
+ border: 2px solid var(--color-border);
26
+ box-shadow:
27
+ 0 0 2px var(--color-primary),
28
+ 0 0 4px var(--color-primary);
29
+ }
30
+
31
+ .md.ghost:hover:not(:disabled) {
32
+ border: 2px solid var(--color-border);
33
+ box-shadow:
34
+ 0 0 4px var(--color-shadow-d),
35
+ 0 0 8px var(--color-shadow-d);
36
+ }
37
+
38
+ .sm.ghost:active:not(:disabled),
39
+ .md.ghost:active:not(:disabled) {
40
+ box-shadow: none;
25
41
  }
26
42
 
27
43
 
@@ -44,13 +60,12 @@
44
60
  0 0 8px var(--color-primary);
45
61
  }
46
62
 
47
- .md.primary:hover:not(:disabled) {
48
- border: 2px solid var(--color-primary);
49
- box-shadow:
50
- 0 0 4px var(--color-primary),
51
- 0 0 8px var(--color-primary);
63
+ .sm.primary:active:not(:disabled),
64
+ .md.primary:active:not(:disabled) {
65
+ box-shadow: none;
52
66
  }
53
67
 
68
+
54
69
  .secondary {
55
70
  background: var(--color-secondary-container);
56
71
  color: var(--color-on-secondary-container);
@@ -70,6 +85,14 @@
70
85
  0 0 8px var(--color-secondary);
71
86
  }
72
87
 
88
+ .sm.secondary:active:not(:disabled),
89
+ .md.secondary:active:not(:disabled) {
90
+ box-shadow: none;
91
+ }
92
+
93
+ .md.danger:active:not(:disabled) {
94
+ box-shadow: none;
95
+ }
73
96
 
74
97
  .danger {
75
98
  background: var(--color-error-container);
@@ -90,6 +113,7 @@
90
113
  0 0 8px var(--color-error);
91
114
  }
92
115
 
116
+ .sm.danger:active:not(:disabled),
93
117
  .md.danger:active:not(:disabled) {
94
118
  box-shadow: none;
95
119
  }
@@ -101,12 +125,14 @@
101
125
  padding: var(--space-xs) var(--space-lg);
102
126
  font-size: var(--font-size-14);
103
127
  box-shadow: var(--shadow-sm);
128
+ border-radius: var(--radius-sm);
104
129
  }
105
130
 
106
131
  .md {
107
132
  padding: var(--space-sm) var(--space-2xl);
108
133
  font-size: var(--font-size-16);
109
134
  box-shadow: var(--shadow-md);
135
+ border-radius: var(--radius-sm);
110
136
  }
111
137
 
112
138
 
@@ -117,12 +143,6 @@
117
143
 
118
144
  /* ===== State ===== */
119
145
 
120
- .sm.button:active:not(:disabled),
121
- .md.button:active:not(:disabled),
122
- .button[data-state="pressed"] {
123
- box-shadow: none;
124
- }
125
-
126
146
  .button:focus-visible {
127
147
  outline: none;
128
148
  }
@@ -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", style: { background: "var(--color-surface-container)" }, "data-state": "pressed", children: "Pressed" }), _jsx(Button, { variant: "ghost", disabled: true, children: "Disabled" })] })),
39
+ }, children: [_jsx(Button, { variant: "ghost", children: "Default" }), _jsx(Button, { variant: "ghost", style: { boxShadow: "none" }, "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,54 @@
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-family: var(--font);
25
+ font-weight: var(--font-weight-medium);
26
+ text-decoration: none;
27
+ color: var(--color-on-surface);
28
+
29
+ padding: var(--space-md) var(--space-lg);
30
+
31
+ border-radius: var(--radius-sm);
32
+ box-shadow: var(--shadow-sm);
33
+ }
34
+
35
+
36
+
37
+ .menuLink:hover{
38
+ background: var(--color-surface-container);
39
+ }
40
+
41
+ .menuLink:active{
42
+ box-shadow: var(--shadow-sm-in);
43
+ }
44
+
45
+ .menuLink.active {
46
+ color: var(--color-on-primary-container);
47
+ background: var(--color-primary-container);
48
+ box-shadow: var(--shadow-sm-in);
49
+ }
50
+
51
+ .disabled {
52
+ opacity: 0.5;
53
+ pointer-events: none;
54
+ }
@@ -0,0 +1,2 @@
1
+ import type { MenuItemProps } from "./types";
2
+ export declare const MenuItem: ({ children, disabled, className, }: MenuItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -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,2 @@
1
+ import type { MenuLinkProps } from "./types";
2
+ export declare const MenuLink: ({ href, children, isActive, }: MenuLinkProps) => import("react/jsx-runtime").JSX.Element;
@@ -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,2 @@
1
+ import type { MenuListProps } from "./types";
2
+ export declare const MenuList: ({ children, className }: MenuListProps) => import("react/jsx-runtime").JSX.Element;
@@ -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 MenuList = ({ children, className }) => {
5
+ return _jsx("ul", { className: clsx(styles.list, className), children: children });
6
+ };
@@ -0,0 +1,4 @@
1
+ export { MenuList } from "./MenuList";
2
+ export { MenuItem } from "./MenuItem";
3
+ export { MenuLink } from "./MenuLink";
4
+ export type { MenuListProps, MenuItemProps, MenuLinkProps, } from "./types";
@@ -0,0 +1,3 @@
1
+ export { MenuList } from "./MenuList";
2
+ export { MenuItem } from "./MenuItem";
3
+ export { MenuLink } from "./MenuLink";
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucentia-ui",
3
- "version": "0.2.14",
3
+ "version": "0.2.16",
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",