@kubex/zinc 1.1.14 → 1.1.15

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.
@@ -37098,7 +37098,7 @@
37098
37098
  "package": {
37099
37099
  "name": "@kubex/zinc",
37100
37100
  "description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
37101
- "version": "1.1.14",
37101
+ "version": "1.1.15",
37102
37102
  "author": "",
37103
37103
  "license": "MIT"
37104
37104
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@kubex/zinc",
4
- "version": "1.1.14",
4
+ "version": "1.1.15",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
package/dist/zn.min.js CHANGED
@@ -3704,7 +3704,7 @@ button {
3704
3704
  <slot>${this._getLoadingState()}</slot>
3705
3705
  </div>
3706
3706
  </dialog>
3707
- `}};el.styles=Q(O5e),_([Le()],el.prototype,"hasFocus",2),_([ce("dialog")],el.prototype,"dialogEl",2),_([w({type:Boolean,reflect:!0})],el.prototype,"open",2),_([w()],el.prototype,"uri",2),_([He("open",{waitUntilFirstUpdate:!0})],el.prototype,"handleOpenChange",1);el.define("zn-editor-dialog");var P5e=J`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--zn-toggle-margin:8px 0}.switch__wrapper{display:inline-flex}.switch__input-wrapper{text-align:left;position:relative;display:inline-flex;width:50px;height:25px;flex-shrink:0;cursor:pointer;border-radius:20px;align-items:center;background:rgba(0,0,0,0.15);border-width:1px !important;margin:var(--zn-toggle-margin);transition:color 0.2s ease-in-out,background-color 0.4s ease-in-out,border-color 0.2s ease-in-out}:host(:focus) .switch__input-wrapper{outline:rgb(var(--zn-primary)) solid 1px}:host([checked]) .switch__input-wrapper{background:rgba(var(--zn-primary),0.8)}:host([checked]) .switch__input-wrapper .switch__control{transform:translateX(calc(100% - 1px)) scale(0.8);background:rgb(255,255,255);width:25px}.switch{height:100%;width:100%;padding:0;margin:0;cursor:pointer}.switch-label{font-size:90%}.switch__control{pointer-events:none;display:inline-block;width:100%;height:25px;border-radius:100px;background:rgba(255,255,255,0.9);box-shadow:rgb(255,255,255) 0 0 0 0,rgba(59,130,246,0.5) 0 0 0 0,rgba(0,0,0,0.1) 0 1px 3px 0,rgba(0,0,0,0.1) 0 1px 2px -1px;position:relative;top:0;transform:scale(0.8);transition:transform 0.3s ease-in-out,background-color 0.4s ease-in-out,opacity 0.2s ease-in-out,max-width 0.2s,width 0.4s;outline:none;max-width:25px}.switch__input{position:absolute;opacity:0;padding:0;margin:0;pointer-events:none}.switch__wrapper--small .switch__input-wrapper{height:20px;width:35px}:host([checked]) .switch__wrapper--small .switch__input-wrapper .switch__control{transform:translateX(calc(100% - 7px)) scale(0.8)}.switch__wrapper--small .switch__control{max-width:20px;height:20px}.switch__wrapper--inline label{align-items:center;display:flex;gap:8px}.switch__wrapper--inline label .switch__input{margin-inline:1px;margin-inline-end:1px}`;var Dr=class extends Y{constructor(){super(...arguments);this.formControlController=new lt(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,i)=>t.checked=i});this.hasFocus=!1;this.title="";this.name="";this.fallbackValue="";this.size="medium";this.disabled=!1;this.checked=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.helpText="";this.triggerSubmit=!1;this.onText="";this.offText="";this.label="";this.inline=!1}get validity(){var t;return(t=this.input)==null?void 0:t.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(t){this.formControlController.updateValidity(),super.firstUpdated(t)}handleBlur(){this.hasFocus=!1}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("zn-input")}handleClick(){this.checked=!this.checked,this.triggerSubmit&&this.formControlController.submit()}handleFocus(){this.hasFocus=!0}handleKeyDown(t){t.key==="ArrowLeft"&&(t.preventDefault(),this.checked=!1),t.key==="ArrowRight"&&(t.preventDefault(),this.checked=!0)}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=C``;this.fallbackValue!==""&&(t=C`
3707
+ `}};el.styles=Q(O5e),_([Le()],el.prototype,"hasFocus",2),_([ce("dialog")],el.prototype,"dialogEl",2),_([w({type:Boolean,reflect:!0})],el.prototype,"open",2),_([w()],el.prototype,"uri",2),_([He("open",{waitUntilFirstUpdate:!0})],el.prototype,"handleOpenChange",1);el.define("zn-editor-dialog");var P5e=J`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--zn-toggle-margin:8px 0}.switch__wrapper{display:inline-flex}.switch__input-wrapper{box-sizing:border-box;text-align:left;position:relative;display:inline-flex;width:42px;height:24px;flex-shrink:0;cursor:pointer;border-radius:12px;align-items:center;background-color:rgba(0,0,0,0.15);border:0.92px solid transparent;margin:var(--zn-toggle-margin);transition:color 0.2s ease-in-out,background-color 0.4s ease-in-out,border-color 0.2s ease-in-out}:host(:focus) .switch__input-wrapper{outline:rgb(var(--zn-primary)) solid 1px}:host([checked]) .switch__input-wrapper{background-color:rgb(105,54,245);border-color:rgb(105,54,245)}:host([checked]) .switch__input-wrapper .switch__control{transform:translate(16px,-50%)}.switch{height:100%;width:100%;padding:0;margin:0;cursor:pointer}.switch-label{font-size:90%}.switch__control{pointer-events:none;position:absolute;top:50%;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:rgba(0,0,0,0.1) 0 1px 3px 0,rgba(0,0,0,0.1) 0 1px 2px -1px;transform:translateY(-50%);transition:transform 0.3s ease-in-out,background-color 0.4s ease-in-out;outline:none}.switch__input{position:absolute;opacity:0;padding:0;margin:0;pointer-events:none}.switch__wrapper--small .switch__input-wrapper{height:20px;width:35px}.switch__wrapper--small .switch__control{width:14px;height:14px}:host([checked]) .switch__wrapper--small .switch__input-wrapper .switch__control{transform:translate(13px,-50%)}.switch__wrapper--inline label{align-items:center;display:flex;gap:8px}.switch__wrapper--inline label .switch__input{margin-inline:1px;margin-inline-end:1px}`;var Dr=class extends Y{constructor(){super(...arguments);this.formControlController=new lt(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,i)=>t.checked=i});this.hasFocus=!1;this.title="";this.name="";this.fallbackValue="";this.size="medium";this.disabled=!1;this.checked=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.helpText="";this.triggerSubmit=!1;this.onText="";this.offText="";this.label="";this.inline=!1}get validity(){var t;return(t=this.input)==null?void 0:t.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(t){this.formControlController.updateValidity(),super.firstUpdated(t)}handleBlur(){this.hasFocus=!1}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("zn-input")}handleClick(){this.checked=!this.checked,this.triggerSubmit&&this.formControlController.submit()}handleFocus(){this.hasFocus=!0}handleKeyDown(t){t.key==="ArrowLeft"&&(t.preventDefault(),this.checked=!1),t.key==="ArrowRight"&&(t.preventDefault(),this.checked=!0)}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=C``;this.fallbackValue!==""&&(t=C`
3708
3708
  <input type="hidden"
3709
3709
  name=${this.name}
3710
3710
  value=${this.fallbackValue}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubex/zinc",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
4
4
  "description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
5
5
  "keywords": [
6
6
  "web components",
@@ -9,17 +9,18 @@
9
9
  }
10
10
 
11
11
  .switch__input-wrapper {
12
+ box-sizing: border-box;
12
13
  text-align: left;
13
14
  position: relative;
14
15
  display: inline-flex;
15
- width: 50px;
16
- height: 25px;
16
+ width: 42px;
17
+ height: 24px;
17
18
  flex-shrink: 0;
18
19
  cursor: pointer;
19
- border-radius: 20px;
20
+ border-radius: 12px;
20
21
  align-items: center;
21
- background: rgba(0, 0, 0, 0.15);
22
- border-width: 1px !important;
22
+ background-color: rgba(0, 0, 0, 0.15);
23
+ border: 0.92px solid transparent;
23
24
  margin: var(--zn-toggle-margin);
24
25
  transition: color .2s ease-in-out, background-color .4s ease-in-out, border-color .2s ease-in-out;
25
26
  }
@@ -29,12 +30,11 @@
29
30
  }
30
31
 
31
32
  :host([checked]) .switch__input-wrapper {
32
- background: rgba(var(--zn-primary), 0.8);
33
+ background-color: rgba(105, 54, 245, 1);
34
+ border-color: rgba(105, 54, 245, 1);
33
35
 
34
36
  .switch__control {
35
- transform: translateX(calc(100% - 1px)) scale(0.8);
36
- background: rgba(255, 255, 255, 1);
37
- width: 25px;
37
+ transform: translate(16px, -50%);
38
38
  }
39
39
  }
40
40
 
@@ -52,19 +52,18 @@
52
52
 
53
53
  .switch__control {
54
54
  pointer-events: none;
55
- display: inline-block;
56
- width: 100%;
57
- height: 25px;
58
- border-radius: 100px;
59
- background: rgba(255, 255, 255, 0.9);
60
- box-shadow: rgb(255, 255, 255) 0 0 0 0, rgba(59, 130, 246, 0.5) 0 0 0 0, rgba(0, 0, 0, 0.1) 0 1px 3px 0, rgba(0, 0, 0, 0.1) 0 1px 2px -1px;
55
+ position: absolute;
56
+ top: 50%;
57
+ left: 3px;
58
+ width: 20px;
59
+ height: 20px;
60
+ border-radius: 50%;
61
+ background: #fff;
62
+ box-shadow: rgba(0, 0, 0, 0.1) 0 1px 3px 0, rgba(0, 0, 0, 0.1) 0 1px 2px -1px;
61
63
 
62
- position: relative;
63
- top: 0;
64
- transform: scale(0.8);
65
- transition: transform .3s ease-in-out, background-color .4s ease-in-out, opacity .2s ease-in-out, max-width .2s, width .4s;
64
+ transform: translateY(-50%);
65
+ transition: transform .3s ease-in-out, background-color .4s ease-in-out;
66
66
  outline: none;
67
- max-width: 25px;
68
67
  }
69
68
 
70
69
  .switch__input {
@@ -81,17 +80,17 @@
81
80
  width: 35px;
82
81
  }
83
82
 
83
+ .switch__wrapper--small .switch__control {
84
+ width: 14px;
85
+ height: 14px;
86
+ }
87
+
84
88
  :host([checked]) .switch__wrapper--small .switch__input-wrapper {
85
89
  .switch__control {
86
- transform: translateX(calc(100% - 7px)) scale(0.8);
90
+ transform: translate(13px, -50%);
87
91
  }
88
92
  }
89
93
 
90
- .switch__wrapper--small .switch__control {
91
- max-width: 20px;
92
- height: 20px;
93
- }
94
-
95
94
  // Support inline label
96
95
  .switch__wrapper--inline label {
97
96
  align-items: center;