lucentia-ui 0.2.6 → 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.
@@ -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
- return (_jsxs("label", { className: styles.switch, children: [_jsx("input", { type: "checkbox", id: id, name: name, checked: checked, defaultChecked: defaultChecked, onChange: onChange, disabled: disabled }), _jsx("span", { className: styles.slider })] }));
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
  };
@@ -5,6 +5,7 @@ export type SwitchProps = {
5
5
  /** uncontrolled */
6
6
  defaultChecked?: boolean;
7
7
  onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
8
+ onCheckedChange?: (checked: boolean) => void;
8
9
  disabled?: boolean;
9
10
  id?: string;
10
11
  name?: string;
@@ -45,7 +45,9 @@
45
45
  --space-3xl: 48px;
46
46
  --space-4xl: 64px;
47
47
  --space-5xl: 96px;
48
- --gap: 32px;
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: #1a2120bf;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucentia-ui",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
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",