@versini/ui-toggle 4.0.8 → 4.0.10
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 +19 -1
- package/dist/index.js +3 -3
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ The Toggle component provides an intuitive switch interface for binary choices w
|
|
|
27
27
|
npm install @versini/ui-toggle
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
> **Note**: This component requires TailwindCSS and the `@versini/ui-styles` plugin for proper styling. See the [
|
|
30
|
+
> **Note**: This component requires TailwindCSS and the `@versini/ui-styles` plugin for proper styling. See the [installation documentation](https://versini-org.github.io/ui-components/?path=/docs/getting-started-installation--docs) for complete setup instructions.
|
|
31
31
|
|
|
32
32
|
## Usage
|
|
33
33
|
|
|
@@ -104,3 +104,21 @@ function SettingsPanel() {
|
|
|
104
104
|
);
|
|
105
105
|
}
|
|
106
106
|
```
|
|
107
|
+
|
|
108
|
+
## API
|
|
109
|
+
|
|
110
|
+
### Toggle Props
|
|
111
|
+
|
|
112
|
+
| Prop | Type | Default | Description |
|
|
113
|
+
| ------------- | ---------------------------- | ------- | -------------------------------------------------- | ------------- | ---------- | ---------------------- |
|
|
114
|
+
| `label` | `string` | - | Visible (or aria) label for the toggle (required). |
|
|
115
|
+
| `name` | `string` | - | Form field name (required). |
|
|
116
|
+
| `onChange` | `(checked: boolean) => void` | - | Callback fired when checked state changes. |
|
|
117
|
+
| `checked` | `boolean` | `false` | Controlled checked state. |
|
|
118
|
+
| `focusMode` | `"dark" | "light" | "system" | "alt-system"` | `"system"` | Focus ring color mode. |
|
|
119
|
+
| `labelHidden` | `boolean` | `false` | Visually hide the label (still accessible). |
|
|
120
|
+
| `mode` | `"dark" | "light" | "system" | "alt-system"` | `"system"` | Color mode/theme. |
|
|
121
|
+
| `noBorder` | `boolean` | `false` | Remove outer border styling. |
|
|
122
|
+
| `className` | `string` | - | Extra classes for wrapper. |
|
|
123
|
+
|
|
124
|
+
> The component renders a native checkbox input – you can pass standard input attributes via spreading if extending.
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { TOGGLE_CLASSNAME as o, Toggle as r } from "./components/Toggle/Toggle.js";
|
|
2
2
|
/*!
|
|
3
|
-
@versini/ui-toggle v4.0.
|
|
3
|
+
@versini/ui-toggle v4.0.10
|
|
4
4
|
© 2025 gizmette.com
|
|
5
5
|
*/
|
|
6
6
|
try {
|
|
7
7
|
window.__VERSINI_UI_TOGGLE__ || (window.__VERSINI_UI_TOGGLE__ = {
|
|
8
|
-
version: "4.0.
|
|
9
|
-
buildTime: "08/
|
|
8
|
+
version: "4.0.10",
|
|
9
|
+
buildTime: "08/23/2025 10:06 AM EDT",
|
|
10
10
|
homepage: "https://github.com/aversini/ui-components",
|
|
11
11
|
license: "MIT"
|
|
12
12
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-toggle",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"main": "dist/index.js",
|
|
16
16
|
"types": "dist/index.d.ts",
|
|
17
17
|
"files": [
|
|
18
|
-
"dist"
|
|
18
|
+
"dist",
|
|
19
|
+
"README.md"
|
|
19
20
|
],
|
|
20
21
|
"scripts": {
|
|
21
22
|
"build:check": "tsc",
|
|
@@ -50,5 +51,5 @@
|
|
|
50
51
|
"sideEffects": [
|
|
51
52
|
"**/*.css"
|
|
52
53
|
],
|
|
53
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "a1afd6e4613b1da7abf61d10a72614611521fb39"
|
|
54
55
|
}
|