@proximus/lavender-switch 1.4.1 → 1.4.2

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/Switch.d.ts CHANGED
@@ -5,6 +5,7 @@ export declare enum InputState {
5
5
  }
6
6
  export declare class Switch extends PxElement<HTMLInputElement> {
7
7
  static nativeName: string;
8
+ static accessorExclusions: string[];
8
9
  protected internals: ElementInternals;
9
10
  private template;
10
11
  constructor();
package/dist/index.es.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { PxElement as l } from "@proximus/lavender-common";
2
2
  const d = ':host{display:inline-flex}.switch *{box-sizing:border-box}.switch{display:inline-flex;align-items:center;border-radius:var(--px-radius-pill)}.switch:focus-visible{outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default);outline-offset:var(--px-focus-offset-mobile)}.switch:has(input[inverted]):focus-visible{outline-color:var(--px-color-border-focus-outline-inverted)}label{display:flex;flex-shrink:0;padding:var(--px-padding-3xs-mobile);border-radius:var(--px-radius-pill);background-color:var(--px-color-background-container-strong-default);outline:var(--px-size-border-m) solid var(--px-color-border-none-default);width:var(--px-size-action-input-switch-width);height:calc(var(--px-size-icon-m) + (var(--px-padding-3xs-mobile) * 2));position:relative}label:after{content:"";position:absolute;top:50%;left:var(--px-padding-3xs-mobile);width:var(--px-size-icon-m);max-width:var(--px-size-icon-m);height:var(--px-size-icon-m);border-radius:var(--px-radius-pill);background-color:var(--px-color-background-container-light-default);transform:translateY(-50%);transition:transform .2s ease-in-out}:host input{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0}:host(:not([disabled])):host(:hover) label,:host(:not([disabled])):host([hover]) label{outline-color:var(--px-color-border-neutral-default);cursor:pointer}:host([checked]) label{background-color:var(--px-color-background-purpose-success-default);transition:background-color .2s ease-in-out}:host([checked]) label:after{transform:translateY(-50%) translate(calc(var(--px-size-icon-m) - var(--px-padding-3xs-mobile)));transition:transform .2s ease-in-out}:host(:hover) :is(:host(:not([disabled])) :is(:host([checked]) label)),:host([hover]) :is(:host(:not([disabled])) :is(:host([checked]) label)){outline-color:var(--px-color-border-purpose-success-default)}:host([disabled]) label{background-color:var(--px-color-background-state-disabled-default)}:host([disabled]) label:after{background-color:var(--px-color-background-state-disabled-default)}:host([inverted]) label{background-color:var(--px-color-background-container-strong-inverted)}:host(:hover) :is(:host(:not([disabled])) :is(:host([inverted]) label)),:host([hover]) :is(:host(:not([disabled])) :is(:host([inverted]) label)){outline-color:var(--px-color-border-neutral-inverted)}:host([checked]:not([disabled])) :is(:host([inverted]) label){background-color:var(--px-color-background-purpose-success-inverted)}:host(:hover) :is(:host([checked]:not([disabled])) :is(:host([inverted]) label)),:host([hover]) :is(:host([checked]:not([disabled])) :is(:host([inverted]) label)){outline-color:var(--px-color-border-purpose-success-inverted)}:host([disabled]) :is(:host([inverted]) label){background-color:var(--px-color-background-state-disabled-inverted)}:host([disabled]) :is(:host([inverted]) label):after{background-color:var(--px-color-background-state-disabled-inverted)}@media only screen and (min-width: 48em){label{padding:var(--px-padding-3xs-desktop)}}@media only screen and (min-width: 64.0625em){label{padding:var(--px-padding-3xs-desktop)}}', a = new CSSStyleSheet();
3
3
  a.replaceSync(d);
4
- var c = /* @__PURE__ */ ((i) => (i.ERROR = "error", i.SUCCESS = "success", i))(c || {});
5
- const o = class o extends l {
4
+ var c = /* @__PURE__ */ ((r) => (r.ERROR = "error", r.SUCCESS = "success", r))(c || {});
5
+ const i = class i extends l {
6
6
  constructor() {
7
7
  var e;
8
8
  super(a), this.template = () => `<div class="switch" tabindex="0" role="switch">
@@ -90,10 +90,10 @@ const o = class o extends l {
90
90
  return this.$el.disabled;
91
91
  }
92
92
  };
93
- o.nativeName = "input";
94
- let r = o;
95
- customElements.get("px-switch") || customElements.define("px-switch", r);
93
+ i.nativeName = "input", i.accessorExclusions = ["checked", "disabled"];
94
+ let o = i;
95
+ customElements.get("px-switch") || customElements.define("px-switch", o);
96
96
  export {
97
97
  c as InputState,
98
- r as Switch
98
+ o as Switch
99
99
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-switch",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",