@3mo/date-time-fields 0.0.6 → 0.0.8
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 +2 -2
- package/dist/DateTimeFields/FieldDateBase.d.ts +3 -1
- package/dist/DateTimeFields/FieldDateBase.d.ts.map +1 -1
- package/dist/DateTimeFields/FieldDateRange.d.ts +1 -1
- package/dist/DateTimeFields/FieldDateRange.d.ts.map +1 -1
- package/dist/Field/FieldComponent.d.ts +1 -0
- package/dist/Field/FieldComponent.d.ts.map +1 -1
- package/dist/FieldDate.js +5 -5
- package/dist/FieldDateBase.d.ts +3 -1
- package/dist/FieldDateBase.d.ts.map +1 -1
- package/dist/FieldDateBase.js +53 -44
- package/dist/FieldDateRange.d.ts +1 -1
- package/dist/FieldDateRange.d.ts.map +1 -1
- package/dist/FieldDateRange.js +43 -43
- package/dist/FieldTime.js +3 -3
- package/dist/Popover/Popover.d.ts +9 -4
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/PopoverAlignment.d.ts +6 -0
- package/dist/Popover/PopoverAlignment.d.ts.map +1 -0
- package/dist/Popover/PopoverContainer.d.ts +26 -0
- package/dist/Popover/PopoverContainer.d.ts.map +1 -0
- package/dist/Popover/PopoverController.d.ts +8 -4
- package/dist/Popover/PopoverController.d.ts.map +1 -1
- package/dist/Popover/PopoverCoordinates.d.ts +2 -0
- package/dist/Popover/PopoverCoordinates.d.ts.map +1 -0
- package/dist/Popover/PopoverHost.d.ts +11 -0
- package/dist/Popover/PopoverHost.d.ts.map +1 -0
- package/dist/Popover/PopoverPlacement.d.ts +4 -4
- package/dist/Popover/PopoverPlacement.d.ts.map +1 -1
- package/dist/Popover/index.d.ts +4 -0
- package/dist/Popover/index.d.ts.map +1 -1
- package/dist/ResizeObserver/ResizeController.d.ts +2 -0
- package/dist/ResizeObserver/ResizeController.d.ts.map +1 -0
- package/dist/ResizeObserver/index.d.ts +3 -0
- package/dist/ResizeObserver/index.d.ts.map +1 -0
- package/dist/ResizeObserver/observeResize.d.ts +12 -0
- package/dist/ResizeObserver/observeResize.d.ts.map +1 -0
- package/dist/TextFields/FieldTextArea.d.ts +2 -0
- package/dist/TextFields/FieldTextArea.d.ts.map +1 -1
- package/dist/bundle.js +1 -1
- package/dist/calendar/Calendar.js +119 -119
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +39 -39
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# Date Time Fields
|
|
2
|
-
|
|
1
|
+
# Date Time Fields
|
|
2
|
+
|
|
3
3
|
A set of date-time related fields.
|
|
@@ -15,12 +15,14 @@ export declare abstract class FieldDateBase<T> extends InputFieldComponent<T> {
|
|
|
15
15
|
protected handleChange(value?: T, e?: Event): void;
|
|
16
16
|
protected get isActive(): boolean;
|
|
17
17
|
static get styles(): import("@a11d/lit").CSSResult;
|
|
18
|
+
protected get template(): import("lit-html").TemplateResult<1>;
|
|
18
19
|
protected get endSlotTemplate(): import("lit-html").TemplateResult<1>;
|
|
19
20
|
protected get inputTemplate(): import("lit-html").TemplateResult<1>;
|
|
20
21
|
protected abstract inputValueToValue(value: string): T | undefined;
|
|
21
22
|
protected abstract valueToInputValue(value: T | undefined): string;
|
|
22
23
|
protected get calendarIconButtonTemplate(): import("lit-html").TemplateResult<1>;
|
|
23
|
-
protected get
|
|
24
|
+
protected get popoverTemplate(): import("lit-html").TemplateResult<1>;
|
|
25
|
+
protected get calendarTemplate(): import("lit-html").TemplateResult<1>;
|
|
24
26
|
protected readonly calendarIconButtonIcon: MaterialIcon;
|
|
25
27
|
protected handleCalendarChange(value: T): void;
|
|
26
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldDateBase.d.ts","sourceRoot":"","sources":["../../FieldDateBase.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,C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AAe,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAA;IAE3F,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,mCAAmC,EAAE,WAAW,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAA;cAEtF,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK;IAKpD,cAAuB,QAAQ,YAE9B;IAED,WAAoB,MAAM,kCAEzB;IAED,cAAuB,QAAQ,yCAE9B;IAED,cAAuB,eAAe,yCAErC;IAED,cAAuB,aAAa,yCAEnC;IAED,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;uBACtC,iBAAiB,CAAC,KAAK,EAAE,CAAC,GAAG,SAAS,GAAG,MAAM;IAE3E,SAAS,KAAK,0BAA0B,yCAEvC;IAED,SAAS,KAAK,eAAe,yCAE5B;IAED,SAAS,KAAK,gBAAgB,yCAE7B;IAED,SAAS,CAAC,QAAQ,CAAC,sBAAsB,EAAE,YAAY,CAAU;IAEjE,SAAS,CAAC,oBAAoB,CAAC,KAAK,EAAE,CAAC;CAIvC"}
|
|
@@ -21,7 +21,7 @@ export declare class FieldDateRange extends FieldDateBase<DateTimeRange | undefi
|
|
|
21
21
|
value?: DateTimeRange;
|
|
22
22
|
protected calendarIconButtonIcon: MaterialIcon;
|
|
23
23
|
protected handleCalendarChange(value?: DateTimeRange): void;
|
|
24
|
-
protected get
|
|
24
|
+
protected get calendarTemplate(): import("lit-html").TemplateResult<1>;
|
|
25
25
|
protected valueToInputValue(value: DateTimeRange | undefined): string;
|
|
26
26
|
protected inputValueToValue(value: string): import("@3mo/date-time/DateTimeRange.js").DateTimeRange | undefined;
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldDateRange.d.ts","sourceRoot":"","sources":["../../FieldDateRange.ts"],"names":[],"mappings":"AACA,OAAO,EAA0D,S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;IAE9E,IAAa,MAAM,kCAElB;IAED,cAAc,CAAC,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS;IAclD,iBAAiB,CAAC,KAAK,CAAC,EAAE,aAAa;IAKvC,OAAO,CAAC,WAAW;CAcnB;AAED,mCAAmC;AACnC,qBACa,cAAe,SAAQ,aAAa,CAAC,aAAa,GAAG,SAAS,CAAC;IAE3E,OAAO,KAAK,gBAAgB,GAAwL;IACpN,OAAO,KAAK,gBAAgB,QAM3B;IAED,SAAS,CAAC,mCAAmC,2CAAoC;IAErD,KAAK,CAAC,EAAE,aAAa,CAAA;IAEjD,UAAmB,sBAAsB,EAAE,YAAY,CAAe;cAEnD,oBAAoB,CAAC,KAAK,CAAC,EAAE,aAAa;IAO7D,cAAuB,gBAAgB,yCAEtC;IAED,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS;cAIzC,iBAAiB,CAAC,KAAK,EAAE,MAAM;CAGlD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,qBAAqB,EAAE,cAAc,CAAA;KACrC;CACD"}
|
|
@@ -38,6 +38,7 @@ export declare abstract class FieldComponent<T> extends Component {
|
|
|
38
38
|
protected get isPopulated(): boolean;
|
|
39
39
|
protected get isActive(): boolean;
|
|
40
40
|
protected get isDense(): boolean;
|
|
41
|
+
static get styles(): import("@a11d/lit").CSSResult;
|
|
41
42
|
protected get template(): import("lit-html").TemplateResult<1>;
|
|
42
43
|
protected get startSlotTemplate(): import("lit-html").TemplateResult<1>;
|
|
43
44
|
protected abstract get inputTemplate(): HTMLTemplateResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldComponent.d.ts","sourceRoot":"","sources":["../../../Field/FieldComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,SAAS,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"FieldComponent.d.ts","sourceRoot":"","sources":["../../../Field/FieldComponent.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iB,yCAE9B;IAED,SAAS,CAAC,QAAQ,KAAK,aAAa,IAAI,kBAAkB,CAAA;IAE1D,SAAS,KAAK,eAAe,yCAE5B;cAEe,QAAQ;IAMxB,QAAQ,CAAC,iBAAiB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC,GAAG,UAAU,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;IACzI,QAAQ,CAAC,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAC1C,QAAQ,CAAC,cAAc,IAAI,IAAI;CAC/B"}
|
package/dist/FieldDate.js
CHANGED
|
@@ -6,11 +6,11 @@ import { FieldDateBase } from './FieldDateBase.js';
|
|
|
6
6
|
class DateCalendarSelectionAdapter extends CalendarSelectionAdapter {
|
|
7
7
|
getDayTemplate(day, classInfo) {
|
|
8
8
|
var _a, _b;
|
|
9
|
-
return html `
|
|
10
|
-
<mo-flex
|
|
11
|
-
class=${classMap(Object.assign(Object.assign({}, classInfo), { selected: (_b = (_a = this.calendar.value) === null || _a === void 0 ? void 0 : _a.equals(day)) !== null && _b !== void 0 ? _b : false }))}
|
|
12
|
-
@click=${() => this.select(day)}
|
|
13
|
-
>${day.format({ day: 'numeric' })}</mo-flex>
|
|
9
|
+
return html `
|
|
10
|
+
<mo-flex
|
|
11
|
+
class=${classMap(Object.assign(Object.assign({}, classInfo), { selected: (_b = (_a = this.calendar.value) === null || _a === void 0 ? void 0 : _a.equals(day)) !== null && _b !== void 0 ? _b : false }))}
|
|
12
|
+
@click=${() => this.select(day)}
|
|
13
|
+
>${day.format({ day: 'numeric' })}</mo-flex>
|
|
14
14
|
`;
|
|
15
15
|
}
|
|
16
16
|
getNavigatingDate(value) {
|
package/dist/FieldDateBase.d.ts
CHANGED
|
@@ -15,12 +15,14 @@ export declare abstract class FieldDateBase<T> extends InputFieldComponent<T> {
|
|
|
15
15
|
protected handleChange(value?: T, e?: Event): void;
|
|
16
16
|
protected get isActive(): boolean;
|
|
17
17
|
static get styles(): import("@a11d/lit").CSSResult;
|
|
18
|
+
protected get template(): import("lit-html").TemplateResult<1>;
|
|
18
19
|
protected get endSlotTemplate(): import("lit-html").TemplateResult<1>;
|
|
19
20
|
protected get inputTemplate(): import("lit-html").TemplateResult<1>;
|
|
20
21
|
protected abstract inputValueToValue(value: string): T | undefined;
|
|
21
22
|
protected abstract valueToInputValue(value: T | undefined): string;
|
|
22
23
|
protected get calendarIconButtonTemplate(): import("lit-html").TemplateResult<1>;
|
|
23
|
-
protected get
|
|
24
|
+
protected get popoverTemplate(): import("lit-html").TemplateResult<1>;
|
|
25
|
+
protected get calendarTemplate(): import("lit-html").TemplateResult<1>;
|
|
24
26
|
protected readonly calendarIconButtonIcon: MaterialIcon;
|
|
25
27
|
protected handleCalendarChange(value: T): void;
|
|
26
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldDateBase.d.ts","sourceRoot":"","sources":["../FieldDateBase.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAElF;;;;GAIG;AACH,8BAAsB,aAAa,CAAC,CAAC,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IACxB,IAAI,UAAQ;IAC3B,cAAc,UAAQ;IACvB,qBAAqB,gDAAe;IAE/B,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAA;IAE3F,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,mCAAmC,EAAE,WAAW,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAA;cAEtF,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK;IAKpD,cAAuB,QAAQ,YA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,61 +22,70 @@ export class FieldDateBase extends InputFieldComponent {
|
|
|
22
22
|
return super.isActive || this.open;
|
|
23
23
|
}
|
|
24
24
|
static get styles() {
|
|
25
|
-
return css `
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
return css `
|
|
26
|
+
${super.styles}
|
|
27
|
+
|
|
28
|
+
mo-popover {
|
|
29
|
+
background: var(--mo-color-background);
|
|
30
|
+
box-shadow: var(--mo-shadow);
|
|
31
|
+
border-radius: var(--mo-border-radius);
|
|
32
|
+
color: var(--mo-color-foreground);
|
|
33
|
+
padding: 10px 4px;
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
}
|
|
37
|
+
get template() {
|
|
38
|
+
return html `
|
|
39
|
+
${super.template}
|
|
40
|
+
${this.popoverTemplate}
|
|
33
41
|
`;
|
|
34
42
|
}
|
|
35
43
|
get endSlotTemplate() {
|
|
36
|
-
return html `
|
|
37
|
-
${super.endSlotTemplate}
|
|
38
|
-
${this.calendarIconButtonTemplate}
|
|
44
|
+
return html `
|
|
45
|
+
${super.endSlotTemplate}
|
|
46
|
+
${this.calendarIconButtonTemplate}
|
|
39
47
|
`;
|
|
40
48
|
}
|
|
41
49
|
get inputTemplate() {
|
|
42
|
-
return html `
|
|
43
|
-
<input
|
|
44
|
-
part='input'
|
|
45
|
-
?readonly=${this.readonly}
|
|
46
|
-
?required=${this.required}
|
|
47
|
-
?disabled=${this.disabled}
|
|
48
|
-
.value=${live(this.inputStringValue || '')}
|
|
49
|
-
@input=${(e) => this.handleInput(this.inputValueToValue(this.inputElement.value || ''), e)}
|
|
50
|
-
@change=${(e) => this.handleChange(this.inputValueToValue(this.inputElement.value || ''), e)}
|
|
51
|
-
>
|
|
50
|
+
return html `
|
|
51
|
+
<input
|
|
52
|
+
part='input'
|
|
53
|
+
?readonly=${this.readonly}
|
|
54
|
+
?required=${this.required}
|
|
55
|
+
?disabled=${this.disabled}
|
|
56
|
+
.value=${live(this.inputStringValue || '')}
|
|
57
|
+
@input=${(e) => this.handleInput(this.inputValueToValue(this.inputElement.value || ''), e)}
|
|
58
|
+
@change=${(e) => this.handleChange(this.inputValueToValue(this.inputElement.value || ''), e)}
|
|
59
|
+
>
|
|
52
60
|
`;
|
|
53
61
|
}
|
|
54
62
|
get calendarIconButtonTemplate() {
|
|
55
|
-
return html `
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
return this.hideDatePicker ? nothing : html `
|
|
64
|
+
<mo-icon-button tabindex='-1' dense slot='end'
|
|
65
|
+
icon=${this.calendarIconButtonIcon}
|
|
66
|
+
${style({ color: this.isActive ? 'var(--mo-color-accent)' : 'var(--mo-color-gray)' })}
|
|
67
|
+
@click=${() => this.open = !this.open}>
|
|
68
|
+
</mo-icon-button>
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
71
|
+
get popoverTemplate() {
|
|
72
|
+
return this.hideDatePicker ? nothing : html `
|
|
73
|
+
<mo-popover tabindex='-1' openOnFocus
|
|
74
|
+
.anchor=${this}
|
|
75
|
+
?open=${this.open}
|
|
76
|
+
@openChange=${(e) => this.open = e.detail}
|
|
77
|
+
>
|
|
78
|
+
${this.calendarTemplate}
|
|
79
|
+
</mo-popover>
|
|
71
80
|
`;
|
|
72
81
|
}
|
|
73
|
-
get
|
|
74
|
-
return html `
|
|
75
|
-
<mo-selectable-calendar
|
|
76
|
-
.selectionAdapterConstructor=${this.calendarSelectionAdapterConstructor}
|
|
77
|
-
.value=${this.value}
|
|
78
|
-
@change=${(e) => this.handleCalendarChange(e.detail)}
|
|
79
|
-
></mo-selectable-calendar>
|
|
82
|
+
get calendarTemplate() {
|
|
83
|
+
return html `
|
|
84
|
+
<mo-selectable-calendar
|
|
85
|
+
.selectionAdapterConstructor=${this.calendarSelectionAdapterConstructor}
|
|
86
|
+
.value=${this.value}
|
|
87
|
+
@change=${(e) => this.handleCalendarChange(e.detail)}
|
|
88
|
+
></mo-selectable-calendar>
|
|
80
89
|
`;
|
|
81
90
|
}
|
|
82
91
|
handleCalendarChange(value) {
|
package/dist/FieldDateRange.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare class FieldDateRange extends FieldDateBase<DateTimeRange | undefi
|
|
|
21
21
|
value?: DateTimeRange;
|
|
22
22
|
protected calendarIconButtonIcon: MaterialIcon;
|
|
23
23
|
protected handleCalendarChange(value?: DateTimeRange): void;
|
|
24
|
-
protected get
|
|
24
|
+
protected get calendarTemplate(): import("lit-html").TemplateResult<1>;
|
|
25
25
|
protected valueToInputValue(value: DateTimeRange | undefined): string;
|
|
26
26
|
protected inputValueToValue(value: string): import("@3mo/date-time/DateTimeRange.js").DateTimeRange | undefined;
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldDateRange.d.ts","sourceRoot":"","sources":["../FieldDateRange.ts"],"names":[],"mappings":"AACA,OAAO,EAA0D,SAAS,EAAE,MAAM,WAAW,CAAA;AAC7F,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAG9D,mBAAW,iDAAiD;IAAG,SAAS,IAAA;IAAE,OAAO,IAAA;CAAE;AAEnF,cAAM,iCAAkC,SAAQ,wBAAwB,CAAC,aAAa,CAAC;IACtF,gBAAgB,oDAA8D;IAE9E,IAAa,MAAM,kCAsBlB;IAED,cAAc,CAAC,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS;IAmBlD,iBAAiB,CAAC,KAAK,CAAC,EAAE,aAAa;IAKvC,OAAO,CAAC,WAAW;CAcnB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gB,yCAmBtC;IAED,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS;cAIzC,iBAAiB,CAAC,KAAK,EAAE,MAAM;CAGlD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,qBAAqB,EAAE,cAAc,CAAA;KACrC;CACD"}
|
package/dist/FieldDateRange.js
CHANGED
|
@@ -9,26 +9,26 @@ class DateRangeCalendarSelectionAdapter extends CalendarSelectionAdapter {
|
|
|
9
9
|
this.currentSelection = 0 /* DateRangeCalendarSelectionAdapterCurrentSelection.StartDate */;
|
|
10
10
|
}
|
|
11
11
|
get styles() {
|
|
12
|
-
return css `
|
|
13
|
-
.day.inSelectionRange:not(.selected) {
|
|
14
|
-
background: var(--mo-color-accent-transparent);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.day.inSelectionRange {
|
|
18
|
-
border-radius: 0px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.day.selected.first {
|
|
22
|
-
border-radius: 100px 0 0 100px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.day.selected.last {
|
|
26
|
-
border-radius: 0 100px 100px 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.day.selected.first.last {
|
|
30
|
-
border-radius: 100px;
|
|
31
|
-
}
|
|
12
|
+
return css `
|
|
13
|
+
.day.inSelectionRange:not(.selected) {
|
|
14
|
+
background: var(--mo-color-accent-transparent);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.day.inSelectionRange {
|
|
18
|
+
border-radius: 0px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.day.selected.first {
|
|
22
|
+
border-radius: 100px 0 0 100px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.day.selected.last {
|
|
26
|
+
border-radius: 0 100px 100px 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.day.selected.first.last {
|
|
30
|
+
border-radius: 100px;
|
|
31
|
+
}
|
|
32
32
|
`;
|
|
33
33
|
}
|
|
34
34
|
getDayTemplate(day, classInfo) {
|
|
@@ -36,11 +36,11 @@ class DateRangeCalendarSelectionAdapter extends CalendarSelectionAdapter {
|
|
|
36
36
|
const firstEquals = !(dateRange === null || dateRange === void 0 ? void 0 : dateRange.start) ? false : day.equals(dateRange.start);
|
|
37
37
|
const lastEquals = !(dateRange === null || dateRange === void 0 ? void 0 : dateRange.end) ? false : day.equals(dateRange.end);
|
|
38
38
|
const classes = Object.assign(Object.assign({}, classInfo), { inSelectionRange: !dateRange ? false : dateRange.includes(day), selected: firstEquals || lastEquals, first: firstEquals, last: lastEquals });
|
|
39
|
-
return html `
|
|
40
|
-
<mo-flex
|
|
41
|
-
class=${classMap(classes)}
|
|
42
|
-
@click=${() => this.handleClick(day)}
|
|
43
|
-
>${day.format({ day: 'numeric' })}</mo-flex>
|
|
39
|
+
return html `
|
|
40
|
+
<mo-flex
|
|
41
|
+
class=${classMap(classes)}
|
|
42
|
+
@click=${() => this.handleClick(day)}
|
|
43
|
+
>${day.format({ day: 'numeric' })}</mo-flex>
|
|
44
44
|
`;
|
|
45
45
|
}
|
|
46
46
|
getNavigatingDate(value) {
|
|
@@ -82,25 +82,25 @@ let FieldDateRange = class FieldDateRange extends FieldDateBase {
|
|
|
82
82
|
this.open = false;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
get
|
|
85
|
+
get calendarTemplate() {
|
|
86
86
|
var _a, _b;
|
|
87
|
-
return html `
|
|
88
|
-
<mo-flex>
|
|
89
|
-
<mo-flex direction='horizontal' alignItems='center' ${style({ textAlign: 'center', height: '30px' })}>
|
|
90
|
-
<div ${style({ width: '*', fontWeight: '500', cursor: 'pointer' })}
|
|
91
|
-
${style({ color: this.currentSelection === 0 /* DateRangeCalendarSelectionAdapterCurrentSelection.StartDate */ ? 'var(--mo-color-accent)' : 'unset' })}
|
|
92
|
-
@click=${() => this.currentSelection = 0 /* DateRangeCalendarSelectionAdapterCurrentSelection.StartDate */}
|
|
93
|
-
>${!((_a = this.value) === null || _a === void 0 ? void 0 : _a.start) ? 'Start' : this.value.start.formatAsDate()}</div>
|
|
94
|
-
|
|
95
|
-
<div ${style({ color: 'var(--mo-color-gray)' })}>bis</div>
|
|
96
|
-
|
|
97
|
-
<div ${style({ width: '*', fontWeight: '500', cursor: 'pointer' })}
|
|
98
|
-
${style({ color: this.currentSelection === 1 /* DateRangeCalendarSelectionAdapterCurrentSelection.EndDate */ ? 'var(--mo-color-accent)' : 'unset' })}
|
|
99
|
-
@click=${() => this.currentSelection = 1 /* DateRangeCalendarSelectionAdapterCurrentSelection.EndDate */}
|
|
100
|
-
>${!((_b = this.value) === null || _b === void 0 ? void 0 : _b.end) ? 'Ende' : this.value.end.formatAsDate()}</div>
|
|
101
|
-
</mo-flex>
|
|
102
|
-
${super.
|
|
103
|
-
</mo-flex>
|
|
87
|
+
return html `
|
|
88
|
+
<mo-flex>
|
|
89
|
+
<mo-flex direction='horizontal' alignItems='center' ${style({ textAlign: 'center', height: '30px' })}>
|
|
90
|
+
<div ${style({ width: '*', fontWeight: '500', cursor: 'pointer' })}
|
|
91
|
+
${style({ color: this.currentSelection === 0 /* DateRangeCalendarSelectionAdapterCurrentSelection.StartDate */ ? 'var(--mo-color-accent)' : 'unset' })}
|
|
92
|
+
@click=${() => this.currentSelection = 0 /* DateRangeCalendarSelectionAdapterCurrentSelection.StartDate */}
|
|
93
|
+
>${!((_a = this.value) === null || _a === void 0 ? void 0 : _a.start) ? 'Start' : this.value.start.formatAsDate()}</div>
|
|
94
|
+
|
|
95
|
+
<div ${style({ color: 'var(--mo-color-gray)' })}>bis</div>
|
|
96
|
+
|
|
97
|
+
<div ${style({ width: '*', fontWeight: '500', cursor: 'pointer' })}
|
|
98
|
+
${style({ color: this.currentSelection === 1 /* DateRangeCalendarSelectionAdapterCurrentSelection.EndDate */ ? 'var(--mo-color-accent)' : 'unset' })}
|
|
99
|
+
@click=${() => this.currentSelection = 1 /* DateRangeCalendarSelectionAdapterCurrentSelection.EndDate */}
|
|
100
|
+
>${!((_b = this.value) === null || _b === void 0 ? void 0 : _b.end) ? 'Ende' : this.value.end.formatAsDate()}</div>
|
|
101
|
+
</mo-flex>
|
|
102
|
+
${super.calendarTemplate}
|
|
103
|
+
</mo-flex>
|
|
104
104
|
`;
|
|
105
105
|
}
|
|
106
106
|
valueToInputValue(value) {
|
package/dist/FieldTime.js
CHANGED
|
@@ -7,9 +7,9 @@ let FieldTime = class FieldTime extends FieldText {
|
|
|
7
7
|
this.inputType = 'time';
|
|
8
8
|
}
|
|
9
9
|
get startSlotTemplate() {
|
|
10
|
-
return html `
|
|
11
|
-
<mo-icon slot='start' @click=${() => this.focus()} icon='schedule' ${style({ color: 'var(--mo-color-gray)' })}></mo-icon>
|
|
12
|
-
${super.startSlotTemplate}
|
|
10
|
+
return html `
|
|
11
|
+
<mo-icon slot='start' @click=${() => this.focus()} icon='schedule' ${style({ color: 'var(--mo-color-gray)' })}></mo-icon>
|
|
12
|
+
${super.startSlotTemplate}
|
|
13
13
|
`;
|
|
14
14
|
}
|
|
15
15
|
};
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { Component } from '@a11d/lit';
|
|
2
2
|
import { PopoverPlacement } from './PopoverPlacement.js';
|
|
3
3
|
import { PopoverController } from './PopoverController.js';
|
|
4
|
+
import { PopoverAlignment } from './PopoverAlignment.js';
|
|
5
|
+
import { PopoverCoordinates } from './PopoverCoordinates.js';
|
|
4
6
|
/**
|
|
5
7
|
* @element mo-popover
|
|
6
8
|
*
|
|
9
|
+
* @attr fixed - Whether the popover is fixed.
|
|
7
10
|
* @attr anchor - The anchor element for the popover.
|
|
8
11
|
* @attr placement - The placement of the popover relative to the anchor.
|
|
12
|
+
* @attr alignment - The alignment of the popover relative to the anchor.
|
|
9
13
|
* @attr open - Whether the popover is open.
|
|
10
14
|
* @attr openOnHover - Whether the popover should open on hover.
|
|
11
15
|
* @attr openOnFocus - Whether the popover should open on focus.
|
|
12
|
-
* @attr
|
|
13
|
-
* @attr getTopPositionOffset - A function that returns the top position offset of the popover.
|
|
16
|
+
* @attr coordinates - The coordinates of the popover.
|
|
14
17
|
*
|
|
15
18
|
* @slot - Default slot for popover content
|
|
16
19
|
*
|
|
@@ -18,15 +21,17 @@ import { PopoverController } from './PopoverController.js';
|
|
|
18
21
|
*/
|
|
19
22
|
export declare class Popover extends Component {
|
|
20
23
|
readonly openChange: EventDispatcher<boolean>;
|
|
24
|
+
fixed: boolean;
|
|
25
|
+
coordinates?: PopoverCoordinates;
|
|
21
26
|
anchor: HTMLElement;
|
|
22
27
|
placement: PopoverPlacement;
|
|
28
|
+
alignment: PopoverAlignment;
|
|
23
29
|
open: boolean;
|
|
24
30
|
openOnHover?: boolean;
|
|
25
31
|
openOnFocus?: boolean;
|
|
26
|
-
getLeftPositionOffset?: (anchorRect: DOMRect, popoverRect: DOMRect) => number;
|
|
27
|
-
getTopPositionOffset?: (anchorRect: DOMRect, popoverRect: DOMRect) => number;
|
|
28
32
|
protected readonly popoverController: PopoverController;
|
|
29
33
|
setOpen(open: boolean): void;
|
|
34
|
+
static get translationStyles(): import("@a11d/lit").CSSResult;
|
|
30
35
|
static get styles(): import("@a11d/lit").CSSResult;
|
|
31
36
|
protected get template(): import("lit-html").TemplateResult<1>;
|
|
32
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../Popover/Popover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAyC,MAAM,WAAW,CAAA;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../Popover/Popover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAyC,MAAM,WAAW,CAAA;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE5D;;;;;;;;;;;;;;;GAeG;AACH,qBACa,OAAQ,SAAQ,SAAS;IAC5B,QAAQ,CAAC,UAAU,EAAG,eAAe,CAAC,OAAO,CAAC,CAAA;IAEX,KAAK,UAAQ;IAC9B,WAAW,CAAC,EAAE,kBAAkB,CAAA;IAC/B,MAAM,EAAG,WAAW,CAAA;IACnB,SAAS,mBAA4B;IACrC,SAAS,mBAAyB;IACnB,IAAI,UAAQ;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;IAElD,SAAS,CAAC,QAAQ,CAAC,iBAAiB,oBAA8B;IAElE,OAAO,CAAC,IAAI,EAAE,OAAO;IAOrB,MAAM,KAAK,iBAAiB,kCAE3B;IAED,WAAoB,MAAM,kCAEzB;IAED,cAAuB,QAAQ,yCAE9B;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopoverAlignment.d.ts","sourceRoot":"","sources":["../../../Popover/PopoverAlignment.ts"],"names":[],"mappings":"AAAA,0BAAkB,gBAAgB;IACjC,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,GAAG,QAAQ;CACX"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Component } from '@a11d/lit';
|
|
2
|
+
import { SlotController } from '@3mo/slot-controller';
|
|
3
|
+
import { PopoverAlignment, PopoverPlacement } from './index.js';
|
|
4
|
+
/**
|
|
5
|
+
* @element mo-popover-container
|
|
6
|
+
*
|
|
7
|
+
* @attr alignment
|
|
8
|
+
* @attr placement
|
|
9
|
+
*
|
|
10
|
+
* @slot - The content to be anchored
|
|
11
|
+
* @slot popover - The popover to be anchored
|
|
12
|
+
*/
|
|
13
|
+
export declare class PopoverContainer extends Component {
|
|
14
|
+
placement: PopoverPlacement;
|
|
15
|
+
alignment: PopoverAlignment;
|
|
16
|
+
protected readonly slotController: SlotController;
|
|
17
|
+
assignSlottedPopovers(): void;
|
|
18
|
+
static get styles(): import("@a11d/lit").CSSResult;
|
|
19
|
+
protected get template(): import("lit-html").TemplateResult<1>;
|
|
20
|
+
}
|
|
21
|
+
declare global {
|
|
22
|
+
interface HTMLElementTagNameMap {
|
|
23
|
+
'mo-popover-container': PopoverContainer;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=PopoverContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopoverContainer.d.ts","sourceRoot":"","sources":["../../../Popover/PopoverContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkC,MAAM,WAAW,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAgB,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE7E;;;;;;;;GAQG;AACH,qBACa,gBAAiB,SAAQ,SAAS;IACiD,SAAS,mBAA4B;IACrC,SAAS,mBAAyB;IAEjI,SAAS,CAAC,QAAQ,CAAC,cAAc,iBAAkE;IAEnG,qBAAqB;IAWrB,WAAoB,MAAM,kCAEzB;IAED,cAAuB,QAAQ,yCAE9B;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,sBAAsB,EAAE,gBAAgB,CAAA;KACxC;CACD"}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { Controller
|
|
1
|
+
import { Controller } from '@a11d/lit';
|
|
2
2
|
import { PointerController } from '@3mo/pointer-controller';
|
|
3
3
|
import { FocusController } from '@3mo/focus-controller';
|
|
4
|
-
import
|
|
4
|
+
import { ResizeController } from '@3mo/resize-observer';
|
|
5
|
+
import { Popover } from './Popover.js';
|
|
5
6
|
export declare class PopoverController extends Controller {
|
|
6
7
|
protected readonly host: Popover;
|
|
7
8
|
constructor(host: Popover);
|
|
8
9
|
protected readonly anchorFocusController: FocusController;
|
|
9
10
|
protected readonly pointerController: PointerController;
|
|
10
11
|
protected readonly anchorPointerController: PointerController;
|
|
11
|
-
protected readonly
|
|
12
|
+
protected readonly resizeController: ResizeController<void>;
|
|
13
|
+
hostUpdated(): void;
|
|
12
14
|
private update;
|
|
13
15
|
private openIfApplicable;
|
|
14
|
-
|
|
16
|
+
updatePosition(): void;
|
|
17
|
+
private positionAbsolute;
|
|
18
|
+
private positionFixed;
|
|
15
19
|
}
|
|
16
20
|
//# sourceMappingURL=PopoverController.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverController.d.ts","sourceRoot":"","sources":["../../../Popover/PopoverController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"PopoverController.d.ts","sourceRoot":"","sources":["../../../Popover/PopoverController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAOtC,qBAAa,iBAAkB,SAAQ,UAAU;uBACR,IAAI,EAAE,OAAO;gBAAb,IAAI,EAAE,OAAO;IAIrD,SAAS,CAAC,QAAQ,CAAC,qBAAqB,kBAGtC;IAEF,SAAS,CAAC,QAAQ,CAAC,iBAAiB,oBAElC;IAEF,SAAS,CAAC,QAAQ,CAAC,uBAAuB,oBAGxC;IAEF,SAAS,CAAC,QAAQ,CAAC,gBAAgB,yBAEjC;IAEO,WAAW;IAIpB,OAAO,CAAC,MAAM;IAKd,OAAO,CAAC,gBAAgB;IAexB,cAAc;IAYd,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,aAAa;CA+DrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopoverCoordinates.d.ts","sourceRoot":"","sources":["../../../Popover/PopoverCoordinates.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Component } from '@a11d/lit';
|
|
2
|
+
export declare class PopoverHost extends Component {
|
|
3
|
+
static get instance(): HTMLElement;
|
|
4
|
+
protected get template(): import("lit-html").TemplateResult<1>;
|
|
5
|
+
}
|
|
6
|
+
declare global {
|
|
7
|
+
interface HTMLElementTagNameMap {
|
|
8
|
+
'mo-popover-host': PopoverHost;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=PopoverHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopoverHost.d.ts","sourceRoot":"","sources":["../../../Popover/PopoverHost.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,WAAW,CAAA;AAEtD,qBACa,WAAY,SAAQ,SAAS;IACzC,MAAM,KAAK,QAAQ,gBAElB;IAED,cAAuB,QAAQ,yCAE9B;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,iBAAiB,EAAE,WAAW,CAAA;KAC9B;CACD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const enum PopoverPlacement {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
BlockStart = "block-start",
|
|
3
|
+
InlineEnd = "inline-end",
|
|
4
|
+
BlockEnd = "block-end",
|
|
5
|
+
InlineStart = "inline-start"
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=PopoverPlacement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverPlacement.d.ts","sourceRoot":"","sources":["../../../Popover/PopoverPlacement.ts"],"names":[],"mappings":"AAAA,0BAAkB,gBAAgB;IACjC,
|
|
1
|
+
{"version":3,"file":"PopoverPlacement.d.ts","sourceRoot":"","sources":["../../../Popover/PopoverPlacement.ts"],"names":[],"mappings":"AAAA,0BAAkB,gBAAgB;IACjC,UAAU,gBAAgB;IAC1B,SAAS,eAAe;IACxB,QAAQ,cAAc;IACtB,WAAW,iBAAiB;CAC5B"}
|
package/dist/Popover/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export * from './PopoverPlacement.js';
|
|
2
|
+
export * from './PopoverAlignment.js';
|
|
3
|
+
export * from './PopoverCoordinates.js';
|
|
4
|
+
export * from './PopoverContainer.js';
|
|
2
5
|
export * from './Popover.js';
|
|
6
|
+
export * from './PopoverHost.js';
|
|
3
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../Popover/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../Popover/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResizeController.d.ts","sourceRoot":"","sources":["../../../ResizeObserver/ResizeController.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../ResizeObserver/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AsyncDirective, PartInfo } from '@a11d/lit';
|
|
2
|
+
declare class ResizeDirective extends AsyncDirective {
|
|
3
|
+
readonly observer: ResizeObserver;
|
|
4
|
+
protected readonly element: Element;
|
|
5
|
+
protected callback?: ResizeObserverCallback;
|
|
6
|
+
constructor(partInfo: PartInfo);
|
|
7
|
+
render(callback: ResizeObserverCallback, options?: ResizeObserverOptions): void;
|
|
8
|
+
protected disconnected(): void;
|
|
9
|
+
}
|
|
10
|
+
export declare const observeResize: (callback: ResizeObserverCallback, options?: ResizeObserverOptions | undefined) => import("lit-html/directive.js").DirectiveResult<typeof ResizeDirective>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=observeResize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observeResize.d.ts","sourceRoot":"","sources":["../../../ResizeObserver/observeResize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA0B,QAAQ,EAAY,MAAM,WAAW,CAAA;AAEtF,cAAM,eAAgB,SAAQ,cAAc;IAC3C,QAAQ,CAAC,QAAQ,iBAA4D;IAC7E,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACnC,SAAS,CAAC,QAAQ,CAAC,EAAE,sBAAsB,CAAA;gBAE/B,QAAQ,EAAE,QAAQ;IAW9B,MAAM,CAAC,QAAQ,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,qBAAqB;cAKrD,YAAY;CAG/B;AAED,eAAO,MAAM,aAAa,4JAA6B,CAAA"}
|
|
@@ -7,11 +7,13 @@ import { InputFieldComponent } from '@3mo/field';
|
|
|
7
7
|
* @attr maxLength
|
|
8
8
|
* @attr pattern
|
|
9
9
|
* @attr autoComplete
|
|
10
|
+
* @attr rows
|
|
10
11
|
*/
|
|
11
12
|
export declare class FieldTextArea extends InputFieldComponent<string> {
|
|
12
13
|
value?: string;
|
|
13
14
|
minLength?: number;
|
|
14
15
|
maxLength?: number;
|
|
16
|
+
rows?: number;
|
|
15
17
|
protected valueToInputValue(value?: string): string;
|
|
16
18
|
static get styles(): import("@a11d/lit").CSSResult;
|
|
17
19
|
protected get inputTemplate(): import("lit-html").TemplateResult<1>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldTextArea.d.ts","sourceRoot":"","sources":["../../../TextFields/FieldTextArea.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAEhD
|
|
1
|
+
{"version":3,"file":"FieldTextArea.d.ts","sourceRoot":"","sources":["../../../TextFields/FieldTextArea.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAEhD;;;;;;;;;GASG;AACH,qBACa,aAAc,SAAQ,mBAAmB,CAAC,MAAM,CAAC;IACjD,KAAK,CAAC,EAAE,MAAM,CAAA;IACE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IAEzC,SAAS,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,MAAM;IAI1C,WAAoB,MAAM,kCAEzB;IAED,cAAuB,aAAa,yCAEnC;IAED,cAAuB,eAAe,yCAErC;IAED,SAAS,KAAK,cAAc,yCAM3B;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,oBAAoB,EAAE,aAAa,CAAA;KACnC;CACD"}
|