@digital-realty/ix-time 1.1.5 → 1.1.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.
- package/dist/IxTime.d.ts +1 -1
- package/dist/ix-time-styles.js +15 -0
- package/dist/ix-time-styles.js.map +1 -1
- package/dist/ix-time.min.js +1 -1
- package/package.json +10 -5
package/dist/IxTime.d.ts
CHANGED
package/dist/ix-time-styles.js
CHANGED
|
@@ -3,6 +3,21 @@ export const IxTimeStyles = css `
|
|
|
3
3
|
:host {
|
|
4
4
|
display: block;
|
|
5
5
|
}
|
|
6
|
+
::part(input-field) {
|
|
7
|
+
background: transparent;
|
|
8
|
+
padding: 0;
|
|
9
|
+
height: 26px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
#search-input-vaadin-time-picker-3 {
|
|
13
|
+
padding: 0 !important;
|
|
14
|
+
--_hover-highlight: transparent;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
vaadin-time-picker::before {
|
|
18
|
+
display: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
6
21
|
ix-field {
|
|
7
22
|
display: block;
|
|
8
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ix-time-styles.js","sourceRoot":"","sources":["../src/ix-time-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"ix-time-styles.js","sourceRoot":"","sources":["../src/ix-time-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmC9B,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const IxTimeStyles = css`\n :host {\n display: block;\n }\n ::part(input-field) {\n background: transparent;\n padding: 0;\n height: 26px;\n }\n\n #search-input-vaadin-time-picker-3 {\n padding: 0 !important;\n --_hover-highlight: transparent;\n }\n\n vaadin-time-picker::before {\n display: none;\n }\n\n ix-field {\n display: block;\n }\n .flex-fill {\n flex: 1;\n align-items: center;\n }\n input {\n border: none;\n background: transparent;\n outline: none;\n min-width: 3rem;\n }\n .time {\n position: relative;\n }\n`;\n"]}
|
package/dist/ix-time.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate}from"tslib";import{css,LitElement,html}from"lit";import{property,query,state}from"lit/decorators.js";import{classMap}from"lit/directives/class-map.js";import"@digital-realty/ix-field/ix-field.js";import{requestUpdateOnAriaChange}from"@material/web/internal/aria/delegate.js";let IxTimeStyles=css`:host{display:block}ix-field{display:block}.flex-fill{flex:1;align-items:center}input{border:none;background:0 0;outline:0;min-width:3rem}.time{position:relative}`;class IxTime extends LitElement{constructor(){super(...arguments),this.label="",this.value="",this.min="",this.max="",this.internals=this.attachInternals(),this.disabled=!1,this.internalErrorText="",this.errorText="",this.required=!1,this.hideError=!1,this.onChanged=()=>{},this.focused=!1,this.focusin=()=>{this.focused=!0},this.clear=()=>{this.value=""},this.handleChange=t=>{t=t.target.value;this.value=t,this.validateDate(),this.onChanged(t)},this.validateDate=()=>{this.value&&this.timeInput.validity.valid?this.internalErrorText="":this.timeInput.validity.rangeUnderflow||this.timeInput.validity.rangeOverflow?this.internalErrorText=`The value must be between ${this.min} and ${this.max}.`:this.required&&!this.timeInput.validity.valid&&(this.internalErrorText="Time is not valid.")},this.focusOut=()=>{this.focused=!1}}static get styles(){return[IxTimeStyles]}get error(){return this.internalErrorText||this.errorText||""}get hasError(){return!!this.error}get form(){return this.internals.form}get labels(){return this.internals.labels}get name(){var t;return null!=(t=this.getAttribute("name"))?t:""}set name(t){this.setAttribute("name",t)}get validationMessage(){return this.internals.validationMessage}get validity(){return this.internals.validity}get willValidate(){return this.internals.willValidate}checkValidity(){return this.internals.checkValidity()}reportValidity(){return this.internals.reportValidity()}formResetCallback(){this.reset()}reset(){var t;this.clear(),this.value=null!=(t=this.getAttribute("value"))?t:""}updated(){this.internals.setValidity({badInput:this.hasError},this.error,this.timeInput),this.internals.setFormValue(this.value)}focus(){this.timeInput.focus()}firstUpdated(){this.validateDate()}render(){var t={disabled:this.disabled,error:!this.disabled&&this.hasError};return html`<ix-field class="${classMap(t)}" ?focused="${this.focused}" ?populated="${this.value}" ?disabled="${this.disabled}" ?required="${this.required}" ?error="${this.hasError&&!this.hideError}" error-text="${this.error}" label="${this.label}" @focusin="${this.focusin}" @focusout="${this.focusOut}"><input id="time-input" @change="${this.handleChange}" .value="${this.value}" class="flex-fill" type="time" min="${this.min}" max="${this.max}"></ix-field>`}}requestUpdateOnAriaChange(IxTime),IxTime.shadowRootOptions={...LitElement.shadowRootOptions,delegatesFocus:!0},IxTime.formAssociated=!0,__decorate([property({type:String})],IxTime.prototype,"label",void 0),__decorate([property({type:String})],IxTime.prototype,"value",void 0),__decorate([property({type:String})],IxTime.prototype,"min",void 0),__decorate([property({type:String})],IxTime.prototype,"max",void 0),__decorate([query("#time-input")],IxTime.prototype,"timeInput",void 0),__decorate([property({type:Boolean,reflect:!0})],IxTime.prototype,"disabled",void 0),__decorate([state()],IxTime.prototype,"internalErrorText",void 0),__decorate([property({type:String})],IxTime.prototype,"errorText",void 0),__decorate([property({type:Boolean,reflect:!0})],IxTime.prototype,"required",void 0),__decorate([property({type:Boolean,reflect:!0})],IxTime.prototype,"hideError",void 0),__decorate([property({type:Function})],IxTime.prototype,"onChanged",void 0),__decorate([state()],IxTime.prototype,"focused",void 0),window.customElements.define("ix-time",IxTime);
|
|
1
|
+
import{__decorate}from"tslib";import{css,LitElement,html}from"lit";import{property,query,state}from"lit/decorators.js";import{classMap}from"lit/directives/class-map.js";import"@digital-realty/ix-field/ix-field.js";import{requestUpdateOnAriaChange}from"@material/web/internal/aria/delegate.js";let IxTimeStyles=css`:host{display:block}::part(input-field){background:0 0;padding:0;height:26px}#search-input-vaadin-time-picker-3{padding:0!important;--_hover-highlight:transparent}vaadin-time-picker::before{display:none}ix-field{display:block}.flex-fill{flex:1;align-items:center}input{border:none;background:0 0;outline:0;min-width:3rem}.time{position:relative}`;class IxTime extends LitElement{constructor(){super(...arguments),this.label="",this.value="",this.min="",this.max="",this.internals=this.attachInternals(),this.disabled=!1,this.internalErrorText="",this.errorText="",this.required=!1,this.hideError=!1,this.onChanged=()=>{},this.focused=!1,this.focusin=()=>{this.focused=!0},this.clear=()=>{this.value=""},this.handleChange=t=>{t=t.target.value;this.value=t,this.validateDate(),this.onChanged(t)},this.validateDate=()=>{this.value&&this.timeInput.validity.valid?this.internalErrorText="":this.timeInput.validity.rangeUnderflow||this.timeInput.validity.rangeOverflow?this.internalErrorText=`The value must be between ${this.min} and ${this.max}.`:this.required&&!this.timeInput.validity.valid&&(this.internalErrorText="Time is not valid.")},this.focusOut=()=>{this.focused=!1}}static get styles(){return[IxTimeStyles]}get error(){return this.internalErrorText||this.errorText||""}get hasError(){return!!this.error}get form(){return this.internals.form}get labels(){return this.internals.labels}get name(){var t;return null!=(t=this.getAttribute("name"))?t:""}set name(t){this.setAttribute("name",t)}get validationMessage(){return this.internals.validationMessage}get validity(){return this.internals.validity}get willValidate(){return this.internals.willValidate}checkValidity(){return this.internals.checkValidity()}reportValidity(){return this.internals.reportValidity()}formResetCallback(){this.reset()}reset(){var t;this.clear(),this.value=null!=(t=this.getAttribute("value"))?t:""}updated(){this.internals.setValidity({badInput:this.hasError},this.error,this.timeInput),this.internals.setFormValue(this.value)}focus(){this.timeInput.focus()}firstUpdated(){this.validateDate()}render(){var t={disabled:this.disabled,error:!this.disabled&&this.hasError};return html`<ix-field class="${classMap(t)}" ?focused="${this.focused}" ?populated="${this.value}" ?disabled="${this.disabled}" ?required="${this.required}" ?error="${this.hasError&&!this.hideError}" error-text="${this.error}" label="${this.label}" @focusin="${this.focusin}" @focusout="${this.focusOut}"><input id="time-input" @change="${this.handleChange}" .value="${this.value}" class="flex-fill" type="time" min="${this.min}" max="${this.max}"></ix-field>`}}requestUpdateOnAriaChange(IxTime),IxTime.shadowRootOptions={...LitElement.shadowRootOptions,delegatesFocus:!0},IxTime.formAssociated=!0,__decorate([property({type:String})],IxTime.prototype,"label",void 0),__decorate([property({type:String})],IxTime.prototype,"value",void 0),__decorate([property({type:String})],IxTime.prototype,"min",void 0),__decorate([property({type:String})],IxTime.prototype,"max",void 0),__decorate([query("#time-input")],IxTime.prototype,"timeInput",void 0),__decorate([property({type:Boolean,reflect:!0})],IxTime.prototype,"disabled",void 0),__decorate([state()],IxTime.prototype,"internalErrorText",void 0),__decorate([property({type:String})],IxTime.prototype,"errorText",void 0),__decorate([property({type:Boolean,reflect:!0})],IxTime.prototype,"required",void 0),__decorate([property({type:Boolean,reflect:!0})],IxTime.prototype,"hideError",void 0),__decorate([property({type:Function})],IxTime.prototype,"onChanged",void 0),__decorate([state()],IxTime.prototype,"focused",void 0),window.customElements.define("ix-time",IxTime);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Webcomponent ix-time following open-wc recommendations",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Digital Realty",
|
|
6
|
-
"version": "1.1.
|
|
6
|
+
"version": "1.1.7",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.js",
|
|
@@ -26,19 +26,24 @@
|
|
|
26
26
|
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\""
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@
|
|
29
|
+
"@adobe/lit-mobx": "^2.2.2",
|
|
30
|
+
"@digital-realty/ix-field": "^1.1.6",
|
|
30
31
|
"@material/web": "1.2.0",
|
|
32
|
+
"@vaadin/time-picker": "^24.6.1",
|
|
31
33
|
"@web/test-runner-commands": "^0.9.0",
|
|
32
|
-
"
|
|
34
|
+
"date-fns": "^4.1.0",
|
|
35
|
+
"lit": "^3.2.1",
|
|
36
|
+
"mobx": "^6.13.5",
|
|
37
|
+
"mobx-persist-store": "^1.1.5"
|
|
33
38
|
},
|
|
34
39
|
"devDependencies": {
|
|
35
40
|
"@custom-elements-manifest/analyzer": "^0.4.17",
|
|
36
|
-
"@digital-realty/theme": "^1.0.30",
|
|
37
41
|
"@open-wc/eslint-config": "^9.2.1",
|
|
38
42
|
"@open-wc/testing": "^3.1.6",
|
|
39
43
|
"@typescript-eslint/eslint-plugin": "^5.48.0",
|
|
40
44
|
"@typescript-eslint/parser": "^5.48.0",
|
|
41
45
|
"@web/dev-server": "^0.1.34",
|
|
46
|
+
"@web/dev-server-import-maps": "^0.2.1",
|
|
42
47
|
"@web/test-runner": "^0.14.0",
|
|
43
48
|
"concurrently": "^9.1.0",
|
|
44
49
|
"eslint": "^8.31.0",
|
|
@@ -100,5 +105,5 @@
|
|
|
100
105
|
"README.md",
|
|
101
106
|
"LICENSE"
|
|
102
107
|
],
|
|
103
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "6317e182112d38af2942a16af3f08bbe548427d6"
|
|
104
109
|
}
|