lucentia-ui 0.2.5 → 0.2.7
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 +6 -1
- package/dist/components/Button/Button.stories.js +1 -1
- package/dist/components/Input/Input.module.css +1 -1
- package/dist/components/Switch/Switch.js +6 -2
- package/dist/components/Switch/types.d.ts +1 -0
- package/dist/components/ThemeProvider/ThemeProvider.module.css +4 -2
- package/package.json +1 -1
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
background: var(--color-surface-container);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
|
|
27
28
|
.primary {
|
|
28
29
|
background: var(--color-primary-container);
|
|
29
30
|
color: var(--color-on-primary-container);
|
|
@@ -69,6 +70,7 @@
|
|
|
69
70
|
0 0 8px var(--color-secondary);
|
|
70
71
|
}
|
|
71
72
|
|
|
73
|
+
|
|
72
74
|
.danger {
|
|
73
75
|
background: var(--color-error-container);
|
|
74
76
|
color: var(--color-on-error-container);
|
|
@@ -88,6 +90,10 @@
|
|
|
88
90
|
0 0 8px var(--color-error);
|
|
89
91
|
}
|
|
90
92
|
|
|
93
|
+
.md.danger:active:not(:disabled) {
|
|
94
|
+
box-shadow: none;
|
|
95
|
+
}
|
|
96
|
+
|
|
91
97
|
|
|
92
98
|
/* ===== Size ===== */
|
|
93
99
|
|
|
@@ -109,7 +115,6 @@
|
|
|
109
115
|
.md.button:active:not(:disabled),
|
|
110
116
|
.button[data-state="pressed"] {
|
|
111
117
|
box-shadow: none;
|
|
112
|
-
background: var(--color-surface-container);
|
|
113
118
|
}
|
|
114
119
|
|
|
115
120
|
.button:focus-visible {
|
|
@@ -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", "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: { background: "var(--color-surface-container)" }, "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: {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
font-family: var(--font);
|
|
3
3
|
padding: var(--space-md) var(--space-lg);
|
|
4
4
|
border-radius: var(--radius-sm);
|
|
5
|
-
border: 2px solid var(--color-
|
|
5
|
+
border: 2px solid var(--color-background);
|
|
6
6
|
outline: none;
|
|
7
7
|
background: var(--color-surface-container);
|
|
8
8
|
color: var(--color-on-surface);
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styles from "./Switch.module.css";
|
|
3
|
-
export const Switch = ({ checked, defaultChecked, onChange, disabled = false, id, name, }) => {
|
|
4
|
-
|
|
3
|
+
export const Switch = ({ checked, defaultChecked, onChange, onCheckedChange, disabled = false, id, name, }) => {
|
|
4
|
+
const handleChange = (e) => {
|
|
5
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
6
|
+
onCheckedChange === null || onCheckedChange === void 0 ? void 0 : onCheckedChange(e.target.checked);
|
|
7
|
+
};
|
|
8
|
+
return (_jsxs("label", { className: styles.switch, children: [_jsx("input", { type: "checkbox", role: "switch", id: id, name: name, checked: checked, defaultChecked: defaultChecked, onChange: handleChange, disabled: disabled }), _jsx("span", { className: styles.slider })] }));
|
|
5
9
|
};
|
|
@@ -45,7 +45,9 @@
|
|
|
45
45
|
--space-3xl: 48px;
|
|
46
46
|
--space-4xl: 64px;
|
|
47
47
|
--space-5xl: 96px;
|
|
48
|
-
--gap:
|
|
48
|
+
--gap-sm: 16px;
|
|
49
|
+
--gap-md: 32px;
|
|
50
|
+
--gap-lg: 64px;
|
|
49
51
|
|
|
50
52
|
/* ===== Layout ===== */
|
|
51
53
|
--container: 1120px;
|
|
@@ -128,7 +130,7 @@
|
|
|
128
130
|
--color-background: #2b3a38;
|
|
129
131
|
--color-on-background: #dde4e3;
|
|
130
132
|
|
|
131
|
-
--color-surface: #
|
|
133
|
+
--color-surface: #2b3a38bf;
|
|
132
134
|
--color-on-surface: #dde4e3;
|
|
133
135
|
--color-on-surface-variant: #dde4e380;
|
|
134
136
|
--color-surface-container: #262d2d;
|
package/package.json
CHANGED