@versini/ui-toggle 7.0.2 → 7.0.3

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -6
  2. package/package.json +7 -3
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-toggle v7.0.2
2
+ @versini/ui-toggle v7.0.3
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -24,17 +24,13 @@ const getToggleBaseClasses = ({ narrow })=>{
24
24
  const getToggleKnobFocusClasses = ()=>{
25
25
  return clsx("peer-focus:outline", "peer-focus:outline-2", "peer-focus:outline-offset-2", "peer-focus:outline-focus-dark");
26
26
  };
27
- // Aqua-style split background overlay for the toggle knob:
28
- // - Top half: flat white overlay (light, uniform)
29
- // - Bottom half: starts darker, gradually lightens toward the bottom edge
30
- const KNOB_SPLIT_OVERLAY = "after:bg-[linear-gradient(to_bottom,oklch(1_0_0/0.2)_50%,oklch(0_0_0/0.1)_50%,oklch(1_0_0/0.05)_100%)]";
31
27
  const getToggleKnobOnClasses = ({ narrow, splitBackground })=>{
32
28
  return clsx({
33
29
  "peer-checked:after:translate-x-full": !narrow,
34
30
  "peer-checked:after:translate-x-4": narrow
35
31
  }, // background color when checked
36
32
  "peer-checked:bg-action-light", // split background overlay on the knob (both states)
37
- splitBackground && KNOB_SPLIT_OVERLAY, // knob circle and border color when checked
33
+ splitBackground && "after:av-bg-split-overlay", // knob circle and border color when checked
38
34
  "peer-checked:after:bg-white", "peer-checked:after:border-white");
39
35
  };
40
36
  const getToggleKnobOffClasses = ({ narrow })=>{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-toggle",
3
- "version": "7.0.2",
3
+ "version": "7.0.3",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -34,7 +34,11 @@
34
34
  "test:coverage:ui": "vitest --coverage --ui",
35
35
  "test:coverage": "vitest run --coverage",
36
36
  "test:watch": "vitest",
37
- "test": "vitest run"
37
+ "test": "vitest run",
38
+ "test:visual": "playwright test -c playwright-ct.config.ts",
39
+ "test:visual:report": "playwright show-report playwright-report",
40
+ "test:visual:update": "playwright test -c playwright-ct.config.ts --update-snapshots",
41
+ "test:visual:ui": "playwright test -c playwright-ct.config.ts --ui"
38
42
  },
39
43
  "devDependencies": {
40
44
  "@versini/ui-types": "9.1.0"
@@ -47,5 +51,5 @@
47
51
  "sideEffects": [
48
52
  "**/*.css"
49
53
  ],
50
- "gitHead": "7cec17f37e7c539ba81294ec754563b4e5733ce8"
54
+ "gitHead": "738b2918169bc39087fc7dc4b04752970b06087e"
51
55
  }