lucentia-ui 0.1.6 → 0.1.8
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/README.md +18 -11
- package/dist/components/Button/Button.module.css +6 -2
- package/dist/components/Divider/Divider.d.ts +2 -0
- package/dist/components/Divider/Divider.js +5 -0
- package/dist/components/Divider/Divider.module.css +28 -0
- package/dist/components/Divider/Divider.stories.d.ts +8 -0
- package/dist/components/Divider/Divider.stories.js +48 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Divider/index.js +1 -0
- package/dist/components/Divider/types.d.ts +7 -0
- package/dist/components/{Modal → Feedback/Modal}/Modal.stories.js +7 -2
- package/dist/components/Feedback/Modal/types.js +1 -0
- package/dist/components/Input/Input.module.css +14 -4
- package/dist/components/Input/Input.stories.js +6 -1
- package/dist/components/Textarea/Textarea.module.css +10 -0
- package/dist/components/ThemeProvider/ThemeProvider.js +1 -1
- package/dist/components/ThemeProvider/ThemeProvider.module.css +11 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/styles/base.css +110 -0
- package/dist/styles/font.css +3 -3
- package/package.json +4 -2
- package/dist/styles/globals.css +0 -0
- package/dist/styles/reset.css +0 -106
- package/dist/styles/tokens/index.css +0 -2
- package/dist/styles/tokens/theme-dark.css +0 -58
- package/dist/styles/tokens/theme-light.css +0 -65
- package/dist/styles/tokens.css +0 -107
- /package/dist/components/{Modal → Divider}/types.js +0 -0
- /package/dist/components/{Modal → Feedback/Modal}/Modal.d.ts +0 -0
- /package/dist/components/{Modal → Feedback/Modal}/Modal.js +0 -0
- /package/dist/components/{Modal → Feedback/Modal}/Modal.module.css +0 -0
- /package/dist/components/{Modal → Feedback/Modal}/Modal.stories.d.ts +0 -0
- /package/dist/components/{Modal → Feedback/Modal}/index.d.ts +0 -0
- /package/dist/components/{Modal → Feedback/Modal}/index.js +0 -0
- /package/dist/components/{Modal → Feedback/Modal}/types.d.ts +0 -0
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@ export default function App() {
|
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
|
|
40
41
|
## 利用可能なテーマ
|
|
41
42
|
|
|
42
43
|
```ts
|
|
@@ -47,6 +48,16 @@ type Theme = "light" | "dark";
|
|
|
47
48
|
<ThemeProvider theme="dark">
|
|
48
49
|
```
|
|
49
50
|
|
|
51
|
+
## 追加CSSのFont.css、Base.cssの導入は任意
|
|
52
|
+
- `base` : reset, box-sizing, typography base, color tokens
|
|
53
|
+
- `font` : Noto Sans JP font-face definitions
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
import "lucentia-ui/styles/base";
|
|
57
|
+
import "lucentia-ui/styles/font";
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
|
|
50
61
|
### 2.コンポーネントをそのまま使う
|
|
51
62
|
|
|
52
63
|
```tsx
|
|
@@ -63,10 +74,9 @@ export default function Example() {
|
|
|
63
74
|
}
|
|
64
75
|
```
|
|
65
76
|
|
|
66
|
-
- 追加の CSS import は不要
|
|
67
77
|
- ThemeProvider 配下であればスタイルは自動適用
|
|
68
78
|
|
|
69
|
-
###
|
|
79
|
+
### ThemeProvider は必須
|
|
70
80
|
|
|
71
81
|
lucentia-ui のコンポーネントは
|
|
72
82
|
CSS Variables(Design Tokens) に依存しています。
|
|
@@ -86,25 +96,22 @@ ThemeProvider は:
|
|
|
86
96
|
|
|
87
97
|
という役割を持ちます。
|
|
88
98
|
|
|
89
|
-
|
|
99
|
+
## テーマ設定例
|
|
90
100
|
|
|
91
101
|
```tsx
|
|
92
|
-
import { useState } from "react";
|
|
93
102
|
import { ThemeProvider, Button } from "lucentia-ui";
|
|
94
103
|
|
|
95
104
|
export default function App() {
|
|
96
|
-
const [theme, setTheme] = useState<"light" | "dark">("light");
|
|
97
|
-
|
|
98
105
|
return (
|
|
99
|
-
<ThemeProvider theme=
|
|
100
|
-
|
|
101
|
-
Toggle theme
|
|
102
|
-
</Button>
|
|
106
|
+
<ThemeProvider theme="dark">
|
|
107
|
+
{children}
|
|
103
108
|
</ThemeProvider>
|
|
104
109
|
);
|
|
105
110
|
}
|
|
106
111
|
```
|
|
107
112
|
|
|
113
|
+
|
|
114
|
+
|
|
108
115
|
## コンポーネント設計方針
|
|
109
116
|
|
|
110
117
|
- **HTML ネイティブ要素を尊重**
|
|
@@ -122,9 +129,9 @@ export default function App() {
|
|
|
122
129
|
- Input
|
|
123
130
|
- Select
|
|
124
131
|
- Switch
|
|
132
|
+
- Textarea
|
|
125
133
|
- Modal
|
|
126
134
|
|
|
127
|
-
詳細は **Storybook** を参照してください。
|
|
128
135
|
|
|
129
136
|
---
|
|
130
137
|
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
background: var(--color-surface-container);
|
|
17
17
|
color: var(--color-on-surface);
|
|
18
18
|
}
|
|
19
|
+
.default:hover:not(:disabled) {
|
|
20
|
+
border: 2px solid var(--color-border);
|
|
21
|
+
box-shadow: 0 0 4px var(--color-border), 0 0 8px var(--color-border);
|
|
22
|
+
}
|
|
19
23
|
|
|
20
24
|
.primary {
|
|
21
25
|
background: var(--color-primary-container);
|
|
@@ -52,7 +56,7 @@
|
|
|
52
56
|
.sm {
|
|
53
57
|
padding: var(--space-xs) var(--space-lg);
|
|
54
58
|
font-size: 0.875rem;
|
|
55
|
-
|
|
59
|
+
box-shadow: var(--shadow-sm);
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
.md {
|
|
@@ -73,6 +77,6 @@
|
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
.button:disabled {
|
|
76
|
-
opacity: 0.
|
|
80
|
+
opacity: 0.5;
|
|
77
81
|
cursor: not-allowed;
|
|
78
82
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styles from "./Divider.module.css";
|
|
3
|
+
export const Divider = ({ orientation = "horizontal", variant = "default", className, }) => {
|
|
4
|
+
return (_jsx("div", { role: "separator", "aria-orientation": orientation, "data-orientation": orientation, "data-variant": variant, className: [styles.divider, className].filter(Boolean).join(" ") }));
|
|
5
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.divider {
|
|
2
|
+
background: var(--color-border);
|
|
3
|
+
flex-shrink: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/* orientation */
|
|
7
|
+
.divider[data-orientation="horizontal"] {
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 2px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.divider[data-orientation="vertical"] {
|
|
13
|
+
width: 2px;
|
|
14
|
+
height: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/* variants */
|
|
19
|
+
|
|
20
|
+
.divider[data-variant="groove"][data-orientation="horizontal"]{
|
|
21
|
+
box-shadow: var(--shadow-sm-in);
|
|
22
|
+
height: 4px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.divider[data-variant="groove"][data-orientation="vertical"]{
|
|
26
|
+
box-shadow: var(--shadow-sm-in);
|
|
27
|
+
width: 4px;
|
|
28
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Divider } from "./Divider";
|
|
3
|
+
declare const meta: Meta<typeof Divider>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Divider>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Groove: Story;
|
|
8
|
+
export declare const Vertical: Story;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Divider } from "./Divider";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: "Components/Divider",
|
|
5
|
+
component: Divider,
|
|
6
|
+
args: {
|
|
7
|
+
orientation: "horizontal",
|
|
8
|
+
variant: "default",
|
|
9
|
+
},
|
|
10
|
+
argTypes: {
|
|
11
|
+
orientation: {
|
|
12
|
+
control: "radio",
|
|
13
|
+
options: ["horizontal", "vertical"],
|
|
14
|
+
},
|
|
15
|
+
variant: {
|
|
16
|
+
control: "radio",
|
|
17
|
+
options: ["default", "groove"],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
/**
|
|
23
|
+
* 共通レンダラー
|
|
24
|
+
* - vertical / horizontal 両方確認できるサイズ
|
|
25
|
+
* - flex + shrink防止前提
|
|
26
|
+
*/
|
|
27
|
+
const renderDivider = (args) => (_jsx("div", { style: {
|
|
28
|
+
display: "flex",
|
|
29
|
+
width: "200px",
|
|
30
|
+
height: "200px",
|
|
31
|
+
alignItems: "center",
|
|
32
|
+
justifyContent: "center",
|
|
33
|
+
}, children: _jsx(Divider, { ...args }) }));
|
|
34
|
+
export const Default = {
|
|
35
|
+
render: renderDivider,
|
|
36
|
+
};
|
|
37
|
+
export const Groove = {
|
|
38
|
+
render: renderDivider,
|
|
39
|
+
args: {
|
|
40
|
+
variant: "groove",
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
export const Vertical = {
|
|
44
|
+
render: renderDivider,
|
|
45
|
+
args: {
|
|
46
|
+
orientation: "vertical",
|
|
47
|
+
},
|
|
48
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Divider } from "./Divider";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { Modal } from "./Modal";
|
|
4
|
-
import { Button } from "
|
|
4
|
+
import { Button } from "../../Button/Button";
|
|
5
5
|
const meta = {
|
|
6
6
|
title: "Components/Feedback/Modal",
|
|
7
7
|
component: Modal,
|
|
@@ -10,6 +10,11 @@ export default meta;
|
|
|
10
10
|
export const Default = {
|
|
11
11
|
render: () => {
|
|
12
12
|
const [open, setOpen] = useState(false);
|
|
13
|
-
return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: () => setOpen(true), children: "Open Modal" }), _jsx(Modal, { open: open, onClose: () => setOpen(false), children: _jsxs("div", { style: {
|
|
13
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: () => setOpen(true), children: "Open Modal" }), _jsx(Modal, { open: open, onClose: () => setOpen(false), children: _jsxs("div", { style: {
|
|
14
|
+
display: "flex",
|
|
15
|
+
flexDirection: "column",
|
|
16
|
+
alignItems: "center",
|
|
17
|
+
gap: 32,
|
|
18
|
+
}, children: [_jsx("h2", { children: "Modal Title" }), _jsx("p", { children: "This is a modal content." }), _jsx(Button, { onClick: () => setOpen(false), children: "Close" })] }) })] }));
|
|
14
19
|
},
|
|
15
20
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
border-radius: var(--radius-sm);
|
|
5
5
|
border: 2px solid var(--color-surface);
|
|
6
6
|
outline: none;
|
|
7
|
-
box-shadow: var(--shadow-md-in);
|
|
8
|
-
|
|
9
7
|
background: var(--color-surface-container);
|
|
10
8
|
color: var(--color-on-surface);
|
|
11
9
|
|
|
@@ -18,6 +16,17 @@
|
|
|
18
16
|
border: 2px solid var(--color-primary);
|
|
19
17
|
}
|
|
20
18
|
|
|
19
|
+
|
|
20
|
+
/* ===== Readonly ===== */
|
|
21
|
+
.input:read-only:not(:disabled) {
|
|
22
|
+
box-shadow: none;
|
|
23
|
+
cursor: text;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.input:read-only:not(:disabled) :focus {
|
|
27
|
+
border: 2px solid var(--color-surface);
|
|
28
|
+
}
|
|
29
|
+
|
|
21
30
|
/* ===== Error ===== */
|
|
22
31
|
.error {
|
|
23
32
|
border: 2px solid var(--color-error);
|
|
@@ -31,12 +40,13 @@
|
|
|
31
40
|
|
|
32
41
|
/* ===== size ===== */
|
|
33
42
|
.sm {
|
|
34
|
-
padding: var(--space-sm) var(--space-md);
|
|
35
43
|
font-size: 0.875rem;
|
|
44
|
+
padding: var(--space-sm) var(--space-md);
|
|
36
45
|
box-shadow: var(--shadow-sm-in);
|
|
37
46
|
}
|
|
38
47
|
|
|
39
48
|
.md {
|
|
40
|
-
padding: var(--space-md) var(--space-lg);
|
|
41
49
|
font-size: 1rem;
|
|
50
|
+
padding: var(--space-md) var(--space-lg);
|
|
51
|
+
box-shadow: var(--shadow-md-in);
|
|
42
52
|
}
|
|
@@ -12,7 +12,12 @@ export const Default = {
|
|
|
12
12
|
};
|
|
13
13
|
export const State = {
|
|
14
14
|
render: () => {
|
|
15
|
-
return (_jsxs("div", { style: {
|
|
15
|
+
return (_jsxs("div", { style: {
|
|
16
|
+
display: "flex",
|
|
17
|
+
flexDirection: "column",
|
|
18
|
+
alignItems: "flex-start",
|
|
19
|
+
gap: 32,
|
|
20
|
+
}, children: [_jsx(Input, { placeholder: "Default State", state: "default" }), _jsx(Input, { placeholder: "Error State", state: "error" }), _jsx(Input, { placeholder: "Readonly State", readOnly: true }), _jsx(Input, { placeholder: "Disabled State", disabled: true })] }));
|
|
16
21
|
},
|
|
17
22
|
};
|
|
18
23
|
export const Size = {
|
|
@@ -24,6 +24,16 @@
|
|
|
24
24
|
border: 2px solid var(--color-error);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/* ===== Readonly ===== */
|
|
28
|
+
.textarea:read-only {
|
|
29
|
+
box-shadow: none;
|
|
30
|
+
cursor: text;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.textarea:read-only:focus {
|
|
34
|
+
border: 2px solid var(--color-surface);
|
|
35
|
+
}
|
|
36
|
+
|
|
27
37
|
/* ===== Disabled ===== */
|
|
28
38
|
.textarea:disabled {
|
|
29
39
|
opacity: 0.5;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import styles from "./ThemeProvider.module.css";
|
|
3
3
|
export function ThemeProvider({ theme = "light", children, }) {
|
|
4
|
-
return (_jsx("
|
|
4
|
+
return (_jsx("main", { className: `${styles.theme} ${theme === "dark" ? styles.dark : styles.light}`, children: children }));
|
|
5
5
|
}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
/* ===== Layout ===== */
|
|
24
24
|
--container: 1120px;
|
|
25
|
+
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
.light {
|
|
@@ -58,11 +59,11 @@
|
|
|
58
59
|
/* ===== Effect ===== */
|
|
59
60
|
--blur: blur(8px);
|
|
60
61
|
|
|
61
|
-
--shadow-sm: -
|
|
62
|
-
|
|
62
|
+
--shadow-sm: -2px -2px 2px 1px var(--color-shadow-l),
|
|
63
|
+
2px 2px 2px 1px var(--color-shadow-d);
|
|
63
64
|
|
|
64
|
-
--shadow-sm-in: inset -2px -2px 2px var(--color-shadow-l),
|
|
65
|
-
inset 2px 2px 2px var(--color-shadow-d);
|
|
65
|
+
--shadow-sm-in: inset -2px -2px 2px 1px var(--color-shadow-l),
|
|
66
|
+
inset 2px 2px 2px 1px var(--color-shadow-d);
|
|
66
67
|
|
|
67
68
|
--shadow-md: -2px -2px 4px 2px var(--color-shadow-l),
|
|
68
69
|
2px 2px 4px 2px var(--color-shadow-d);
|
|
@@ -98,7 +99,7 @@
|
|
|
98
99
|
--color-on-surface-variant: #dde4e380;
|
|
99
100
|
--color-surface-container: #262d2d;
|
|
100
101
|
|
|
101
|
-
--color-border: #
|
|
102
|
+
--color-border: #889392;
|
|
102
103
|
--color-scrim: rgba(0, 0, 0, 0.25);
|
|
103
104
|
|
|
104
105
|
--color-shadow-l: rgba(255, 255, 255, 0.25);
|
|
@@ -107,14 +108,14 @@
|
|
|
107
108
|
/* ===== Effect ===== */
|
|
108
109
|
--blur: blur(8px);
|
|
109
110
|
|
|
110
|
-
--shadow-sm: -
|
|
111
|
-
|
|
111
|
+
--shadow-sm: -2px -2px 2px 1px var(--color-shadow-l),
|
|
112
|
+
2px 2px 2px 1px var(--color-shadow-d);
|
|
112
113
|
|
|
113
|
-
--shadow-sm-in: inset -2px -2px 2px var(--color-shadow-l),
|
|
114
|
-
inset 2px 2px 2px var(--color-shadow-d);
|
|
114
|
+
--shadow-sm-in: inset -2px -2px 2px 1px var(--color-shadow-l),
|
|
115
|
+
inset 2px 2px 2px 1px var(--color-shadow-d);
|
|
115
116
|
|
|
116
117
|
--shadow-md: -2px -2px 4px 2px var(--color-shadow-l),
|
|
117
|
-
2px 2px 4px
|
|
118
|
+
2px 2px 4px 2px var(--color-shadow-d);
|
|
118
119
|
|
|
119
120
|
--shadow-md-in: inset -4px -4px 4px var(--color-shadow-l),
|
|
120
121
|
inset 4px 4px 4px var(--color-shadow-d);
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/styles/base.css
CHANGED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/* ------------------------------
|
|
2
|
+
Reset / Base
|
|
3
|
+
------------------------------ */
|
|
4
|
+
|
|
5
|
+
/* box-sizing を全要素に適用 */
|
|
6
|
+
*,
|
|
7
|
+
*::before,
|
|
8
|
+
*::after {
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* マージン・パディングをリセット */
|
|
13
|
+
html,
|
|
14
|
+
body,
|
|
15
|
+
h1,
|
|
16
|
+
h2,
|
|
17
|
+
h3,
|
|
18
|
+
h4,
|
|
19
|
+
h5,
|
|
20
|
+
h6,
|
|
21
|
+
p,
|
|
22
|
+
figure,
|
|
23
|
+
blockquote,
|
|
24
|
+
dl,
|
|
25
|
+
dd {
|
|
26
|
+
margin: 0;
|
|
27
|
+
padding: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* html / body 基本設定 */
|
|
31
|
+
html {
|
|
32
|
+
-webkit-text-size-adjust: 100%;
|
|
33
|
+
text-size-adjust: 100%;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
body {
|
|
37
|
+
line-height: 1.5;
|
|
38
|
+
font-family: var(--font, system-ui, -apple-system, sans-serif);
|
|
39
|
+
padding: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
main {
|
|
43
|
+
min-height: 100vh;
|
|
44
|
+
background: var(--color-background);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* リスト */
|
|
48
|
+
ul,
|
|
49
|
+
ol {
|
|
50
|
+
list-style: none;
|
|
51
|
+
margin: 0;
|
|
52
|
+
padding: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* リンク */
|
|
56
|
+
a {
|
|
57
|
+
color: inherit;
|
|
58
|
+
text-decoration: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* 画像・メディア */
|
|
62
|
+
img,
|
|
63
|
+
picture,
|
|
64
|
+
video,
|
|
65
|
+
canvas,
|
|
66
|
+
svg {
|
|
67
|
+
display: block;
|
|
68
|
+
max-width: 100%;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* フォーム要素 */
|
|
72
|
+
button,
|
|
73
|
+
input,
|
|
74
|
+
select,
|
|
75
|
+
textarea {
|
|
76
|
+
font: inherit;
|
|
77
|
+
color: inherit;
|
|
78
|
+
background: none;
|
|
79
|
+
border: none;
|
|
80
|
+
outline: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* button */
|
|
84
|
+
button {
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* textarea */
|
|
89
|
+
textarea {
|
|
90
|
+
resize: vertical;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
input::placeholder,
|
|
94
|
+
textarea::placeholder {
|
|
95
|
+
color: var(--color-on-surface-variant, #161D1D80);
|
|
96
|
+
opacity: 1;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
/* テーブル */
|
|
101
|
+
table {
|
|
102
|
+
border-collapse: collapse;
|
|
103
|
+
border-spacing: 0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* アクセシビリティ */
|
|
107
|
+
:focus-visible {
|
|
108
|
+
outline: 2px solid var(--color-primary, #00a1a1);
|
|
109
|
+
outline-offset: 2px;
|
|
110
|
+
}
|
package/dist/styles/font.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: "Noto Sans JP";
|
|
3
|
-
src: url("
|
|
3
|
+
src: url("../fonts/NotoSansJP-Regular.woff2") format("woff2");
|
|
4
4
|
font-weight: 400;
|
|
5
5
|
font-style: normal;
|
|
6
6
|
font-display: swap;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
@font-face {
|
|
10
10
|
font-family: "Noto Sans JP";
|
|
11
|
-
src: url("
|
|
11
|
+
src: url("../fonts/NotoSansJP-Medium.woff2") format("woff2");
|
|
12
12
|
font-weight: 500;
|
|
13
13
|
font-style: normal;
|
|
14
14
|
font-display: swap;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
@font-face {
|
|
18
18
|
font-family: "Noto Sans JP";
|
|
19
|
-
src: url("
|
|
19
|
+
src: url("../fonts/NotoSansJP-Bold.woff2") format("woff2");
|
|
20
20
|
font-weight: 600;
|
|
21
21
|
font-style: normal;
|
|
22
22
|
font-display: swap;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lucentia-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
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",
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
".": {
|
|
9
9
|
"import": "./dist/index.js",
|
|
10
10
|
"types": "./dist/index.d.ts"
|
|
11
|
-
}
|
|
11
|
+
},
|
|
12
|
+
"./styles/base": "./dist/styles/base.css",
|
|
13
|
+
"./styles/font": "./dist/styles/font.css"
|
|
12
14
|
},
|
|
13
15
|
"files": [
|
|
14
16
|
"dist",
|
package/dist/styles/globals.css
DELETED
|
File without changes
|
package/dist/styles/reset.css
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/* ------------------------------
|
|
2
|
-
Reset / Base
|
|
3
|
-
------------------------------ */
|
|
4
|
-
|
|
5
|
-
/* box-sizing を全要素に適用 */
|
|
6
|
-
*,
|
|
7
|
-
*::before,
|
|
8
|
-
*::after {
|
|
9
|
-
box-sizing: border-box;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/* マージン・パディングをリセット */
|
|
13
|
-
html,
|
|
14
|
-
body,
|
|
15
|
-
h1,
|
|
16
|
-
h2,
|
|
17
|
-
h3,
|
|
18
|
-
h4,
|
|
19
|
-
h5,
|
|
20
|
-
h6,
|
|
21
|
-
p,
|
|
22
|
-
figure,
|
|
23
|
-
blockquote,
|
|
24
|
-
dl,
|
|
25
|
-
dd {
|
|
26
|
-
margin: 0;
|
|
27
|
-
padding: 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/* html / body 基本設定 */
|
|
31
|
-
html {
|
|
32
|
-
-webkit-text-size-adjust: 100%;
|
|
33
|
-
text-size-adjust: 100%;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
body {
|
|
37
|
-
line-height: 1.5;
|
|
38
|
-
font-family: var(--font, system-ui, -apple-system, sans-serif);
|
|
39
|
-
color: var(--color-text, #000);
|
|
40
|
-
background-color: var(--color-background, #fff);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/* リスト */
|
|
44
|
-
ul,
|
|
45
|
-
ol {
|
|
46
|
-
list-style: none;
|
|
47
|
-
margin: 0;
|
|
48
|
-
padding: 0;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/* リンク */
|
|
52
|
-
a {
|
|
53
|
-
color: inherit;
|
|
54
|
-
text-decoration: none;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/* 画像・メディア */
|
|
58
|
-
img,
|
|
59
|
-
picture,
|
|
60
|
-
video,
|
|
61
|
-
canvas,
|
|
62
|
-
svg {
|
|
63
|
-
display: block;
|
|
64
|
-
max-width: 100%;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/* フォーム要素 */
|
|
68
|
-
button,
|
|
69
|
-
input,
|
|
70
|
-
select,
|
|
71
|
-
textarea {
|
|
72
|
-
font: inherit;
|
|
73
|
-
color: inherit;
|
|
74
|
-
background: none;
|
|
75
|
-
border: none;
|
|
76
|
-
outline: none;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* button */
|
|
80
|
-
button {
|
|
81
|
-
cursor: pointer;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/* textarea */
|
|
85
|
-
textarea {
|
|
86
|
-
resize: vertical;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
input::placeholder,
|
|
90
|
-
textarea::placeholder {
|
|
91
|
-
color: var(--color-on-surface-variant, #161D1D80);
|
|
92
|
-
opacity: 1;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
/* テーブル */
|
|
97
|
-
table {
|
|
98
|
-
border-collapse: collapse;
|
|
99
|
-
border-spacing: 0;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/* アクセシビリティ */
|
|
103
|
-
:focus-visible {
|
|
104
|
-
outline: 2px solid var(--color-primary, #00a1a1);
|
|
105
|
-
outline-offset: 2px;
|
|
106
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
.theme.dark {
|
|
2
|
-
--color-primary: #80d5d4;
|
|
3
|
-
--color-on-primary: #003737;
|
|
4
|
-
--color-primary-container: #004f4f;
|
|
5
|
-
--color-on-primary-container: #9cf1f0;
|
|
6
|
-
|
|
7
|
-
--color-secondary: #b0cccb;
|
|
8
|
-
--color-on-secondary: #1b3534;
|
|
9
|
-
--color-secondary-container: #324b4b;
|
|
10
|
-
--color-on-secondary-container: #cce8e7;
|
|
11
|
-
|
|
12
|
-
--color-error: #ffb4ab;
|
|
13
|
-
--color-on-error: #690005;
|
|
14
|
-
--color-error-container: #93000a;
|
|
15
|
-
--color-on-error-container: #ffdad6;
|
|
16
|
-
|
|
17
|
-
--color-background: #2b3a38;
|
|
18
|
-
--color-on-background: #dde4e3;
|
|
19
|
-
|
|
20
|
-
--color-surface: #1a2120bf;
|
|
21
|
-
--color-on-surface: #dde4e3;
|
|
22
|
-
|
|
23
|
-
--color-surface-container: #262d2d;
|
|
24
|
-
--color-border: #4b5251;
|
|
25
|
-
--color-scrim: rgba(0, 0, 0, 0.1);
|
|
26
|
-
|
|
27
|
-
--color-shadow-l: rgba(255, 255, 255, 0.25);
|
|
28
|
-
--color-shadow-d: rgba(0, 0, 0, 1);
|
|
29
|
-
|
|
30
|
-
--shadow-md: -2px -2px 4px 2px var(--color-shadow-l),
|
|
31
|
-
2px 2px 4px 4px var(--color-shadow-d);
|
|
32
|
-
|
|
33
|
-
--shadow-md-in: inset -4px -4px 4px var(--color-shadow-l),
|
|
34
|
-
inset 4px 4px 4px var(--color-shadow-d);
|
|
35
|
-
|
|
36
|
-
--shadow-lg: -4px -4px 16px 8px var(--color-shadow-l),
|
|
37
|
-
4px 4px 16px 8px var(--color-shadow-d);
|
|
38
|
-
|
|
39
|
-
/* ===== Radius ===== */
|
|
40
|
-
--radius-sm: 8px;
|
|
41
|
-
--radius-md: 16px;
|
|
42
|
-
--radius-max: 999px;
|
|
43
|
-
|
|
44
|
-
/* ===== Space ===== */
|
|
45
|
-
--space-xs: 4px;
|
|
46
|
-
--space-sm: 8px;
|
|
47
|
-
--space-md: 12px;
|
|
48
|
-
--space-lg: 16px;
|
|
49
|
-
--space-xl: 24px;
|
|
50
|
-
--space-2xl: 32px;
|
|
51
|
-
--space-3xl: 48px;
|
|
52
|
-
--space-4xl: 64px;
|
|
53
|
-
--space-5xl: 96px;
|
|
54
|
-
--gap: 32px;
|
|
55
|
-
|
|
56
|
-
/* ===== Layout ===== */
|
|
57
|
-
--container: 1120px;
|
|
58
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
.theme.light {
|
|
2
|
-
/* font */
|
|
3
|
-
--font: "Noto Sans JP", sans-serif;
|
|
4
|
-
|
|
5
|
-
/* ===== Color ===== */
|
|
6
|
-
--color-primary: #00a1a1;
|
|
7
|
-
--color-on-primary: #ffffff;
|
|
8
|
-
--color-primary-container: #9cf1f0;
|
|
9
|
-
--color-on-primary-container: #004f4f;
|
|
10
|
-
|
|
11
|
-
--color-secondary: #7b9695;
|
|
12
|
-
--color-on-secondary: #ffffff;
|
|
13
|
-
--color-secondary-container: #cce8e7;
|
|
14
|
-
--color-on-secondary-container: #324b4b;
|
|
15
|
-
|
|
16
|
-
--color-error: #ff5449;
|
|
17
|
-
--color-on-error: #ffffff;
|
|
18
|
-
--color-error-container: #ffdad6;
|
|
19
|
-
--color-on-error-container: #93000a;
|
|
20
|
-
|
|
21
|
-
--color-background: #f4fbfa;
|
|
22
|
-
--color-on-background: #161d1d;
|
|
23
|
-
|
|
24
|
-
--color-surface: #f4fbfabf;
|
|
25
|
-
--color-on-surface: #161d1d;
|
|
26
|
-
--color-surface-container: #e9efeebf;
|
|
27
|
-
|
|
28
|
-
--color-border: #bbcccc;
|
|
29
|
-
--color-scrim: rgba(129, 129, 129, 0.25);
|
|
30
|
-
|
|
31
|
-
/* ===== Effect ===== */
|
|
32
|
-
--blur: blur(8px);
|
|
33
|
-
|
|
34
|
-
--color-shadow-l: rgba(255, 255, 255, 1);
|
|
35
|
-
--color-shadow-d: rgba(0, 0, 0, 0.2);
|
|
36
|
-
|
|
37
|
-
--shadow-md: -2px -2px 4px 2px var(--color-shadow-l),
|
|
38
|
-
2px 2px 4px 2px var(--color-shadow-d);
|
|
39
|
-
|
|
40
|
-
--shadow-md-in: inset -4px -4px 4px var(--color-shadow-l),
|
|
41
|
-
inset 4px 4px 4px var(--color-shadow-d);
|
|
42
|
-
|
|
43
|
-
--shadow-lg: -4px -4px 16px 8px var(--color-shadow-l),
|
|
44
|
-
4px 4px 16px 8px var(--color-shadow-d);
|
|
45
|
-
|
|
46
|
-
/* ===== Radius ===== */
|
|
47
|
-
--radius-sm: 8px;
|
|
48
|
-
--radius-md: 16px;
|
|
49
|
-
--radius-max: 999px;
|
|
50
|
-
|
|
51
|
-
/* ===== Space ===== */
|
|
52
|
-
--space-xs: 4px;
|
|
53
|
-
--space-sm: 8px;
|
|
54
|
-
--space-md: 12px;
|
|
55
|
-
--space-lg: 16px;
|
|
56
|
-
--space-xl: 24px;
|
|
57
|
-
--space-2xl: 32px;
|
|
58
|
-
--space-3xl: 48px;
|
|
59
|
-
--space-4xl: 64px;
|
|
60
|
-
--space-5xl: 96px;
|
|
61
|
-
--gap: 32px;
|
|
62
|
-
|
|
63
|
-
/* ===== Layout ===== */
|
|
64
|
-
--container: 1120px;
|
|
65
|
-
}
|
package/dist/styles/tokens.css
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
/* font */
|
|
3
|
-
--font: "Noto Sans JP", sans-serif;
|
|
4
|
-
|
|
5
|
-
/* ===== Color ===== */
|
|
6
|
-
--color-primary: #00a1a1;
|
|
7
|
-
--color-on-primary: #ffffff;
|
|
8
|
-
--color-primary-container: #9cf1f0;
|
|
9
|
-
--color-on-primary-container: #004f4f;
|
|
10
|
-
|
|
11
|
-
--color-secondary: #7b9695;
|
|
12
|
-
--color-on-secondary: #ffffff;
|
|
13
|
-
--color-secondary-container: #cce8e7;
|
|
14
|
-
--color-on-secondary-container: #324b4b;
|
|
15
|
-
|
|
16
|
-
--color-error: #ff5449;
|
|
17
|
-
--color-on-error: #ffffff;
|
|
18
|
-
--color-error-container: #ffdad6;
|
|
19
|
-
--color-on-error-container: #93000a;
|
|
20
|
-
|
|
21
|
-
--color-background: #f4fbfa;
|
|
22
|
-
--color-on-background: #161d1d;
|
|
23
|
-
|
|
24
|
-
--color-surface: #f4fbfabf;
|
|
25
|
-
--color-on-surface: #161d1d;
|
|
26
|
-
--color-on-surface-variant: #161d1d80;
|
|
27
|
-
--color-surface-container: #e9efeebf;
|
|
28
|
-
|
|
29
|
-
--color-border: #bbcccc;
|
|
30
|
-
--color-scrim: rgba(129, 129, 129, 0.25);
|
|
31
|
-
|
|
32
|
-
/* ===== Effect ===== */
|
|
33
|
-
--blur: blur(8px);
|
|
34
|
-
|
|
35
|
-
--color-shadow-l: rgba(255, 255, 255, 1);
|
|
36
|
-
--color-shadow-d: rgba(0, 0, 0, 0.2);
|
|
37
|
-
|
|
38
|
-
--shadow-md: -2px -2px 4px 2px var(--color-shadow-l),
|
|
39
|
-
2px 2px 4px 2px var(--color-shadow-d);
|
|
40
|
-
|
|
41
|
-
--shadow-md-in: inset -4px -4px 4px var(--color-shadow-l),
|
|
42
|
-
inset 4px 4px 4px var(--color-shadow-d);
|
|
43
|
-
|
|
44
|
-
--shadow-lg: -4px -4px 16px 8px var(--color-shadow-l),
|
|
45
|
-
4px 4px 16px 8px var(--color-shadow-d);
|
|
46
|
-
|
|
47
|
-
/* ===== Radius ===== */
|
|
48
|
-
--radius-sm: 8px;
|
|
49
|
-
--radius-md: 16px;
|
|
50
|
-
--radius-max: 999px;
|
|
51
|
-
|
|
52
|
-
/* ===== Space ===== */
|
|
53
|
-
--space-xs: 4px;
|
|
54
|
-
--space-sm: 8px;
|
|
55
|
-
--space-md: 12px;
|
|
56
|
-
--space-lg: 16px;
|
|
57
|
-
--space-xl: 24px;
|
|
58
|
-
--space-2xl: 32px;
|
|
59
|
-
--space-3xl: 48px;
|
|
60
|
-
--space-4xl: 64px;
|
|
61
|
-
--space-5xl: 96px;
|
|
62
|
-
--gap: 32px;
|
|
63
|
-
|
|
64
|
-
/* ===== Layout ===== */
|
|
65
|
-
--container: 1120px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.dark {
|
|
69
|
-
--color-primary: #80d5d4;
|
|
70
|
-
--color-on-primary: #003737;
|
|
71
|
-
--color-primary-container: #004f4f;
|
|
72
|
-
--color-on-primary-container: #9cf1f0;
|
|
73
|
-
|
|
74
|
-
--color-secondary: #b0cccb;
|
|
75
|
-
--color-on-secondary: #1b3534;
|
|
76
|
-
--color-secondary-container: #324b4b;
|
|
77
|
-
--color-on-secondary-container: #cce8e7;
|
|
78
|
-
|
|
79
|
-
--color-error: #ffb4ab;
|
|
80
|
-
--color-on-error: #690005;
|
|
81
|
-
--color-error-container: #93000a;
|
|
82
|
-
--color-on-error-container: #ffdad6;
|
|
83
|
-
|
|
84
|
-
--color-background: #2b3a38;
|
|
85
|
-
--color-on-background: #dde4e3;
|
|
86
|
-
|
|
87
|
-
--color-surface: #1a2120bf;
|
|
88
|
-
--color-on-surface: #dde4e3;
|
|
89
|
-
--color-on-surface-variant: #dde4e380;
|
|
90
|
-
--color-surface-container: #262d2d;
|
|
91
|
-
|
|
92
|
-
--color-border: #4b5251;
|
|
93
|
-
|
|
94
|
-
--color-shadow-l: rgba(255, 255, 255, 0.25);
|
|
95
|
-
--color-shadow-d: rgba(0, 0, 0, 1);
|
|
96
|
-
|
|
97
|
-
--shadow-md: -2px -2px 4px 2px var(--color-shadow-l),
|
|
98
|
-
2px 2px 4px 4px var(--color-shadow-d);
|
|
99
|
-
|
|
100
|
-
--shadow-md-in: inset -4px -4px 4px var(--color-shadow-l),
|
|
101
|
-
inset 4px 4px 4px var(--color-shadow-d);
|
|
102
|
-
|
|
103
|
-
--shadow-lg: -4px -4px 16px 8px var(--color-shadow-l),
|
|
104
|
-
4px 4px 16px 8px var(--color-shadow-d);
|
|
105
|
-
|
|
106
|
-
--color-scrim: rgba(0, 0, 0, 0.1);
|
|
107
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|