@loadsmart/miranda-wc 1.22.0 → 1.23.0
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/components/component/component.d.ts +17 -1
- package/dist/components/component/component.d.ts.map +1 -1
- package/dist/components/text-field/index.d.ts +3 -0
- package/dist/components/text-field/index.d.ts.map +1 -0
- package/dist/components/text-field/text-field.d.ts +158 -0
- package/dist/components/text-field/text-field.d.ts.map +1 -0
- package/dist/components/text-field/text-field.styles.d.ts +3 -0
- package/dist/components/text-field/text-field.styles.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +456 -315
- package/dist/index.js.map +1 -1
- package/dist/utils/events.d.ts +25 -0
- package/dist/utils/events.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
export declare class Component extends LitElement {
|
|
3
|
-
emit<T>(eventName: string, options?: CustomEventInit<T>): void;
|
|
3
|
+
protected emit<T>(eventName: string, options?: CustomEventInit<T>): void;
|
|
4
|
+
/**
|
|
5
|
+
* Re-dispatches an event.
|
|
6
|
+
* This function is useful for forwarding non-composed events, such as `change`
|
|
7
|
+
* events.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* class MyInput extends LitElement {
|
|
11
|
+
* render() {
|
|
12
|
+
* return html`<input @change=${this.reemit}>`;
|
|
13
|
+
* }
|
|
14
|
+
*
|
|
15
|
+
* }
|
|
16
|
+
*
|
|
17
|
+
* @param event The event to re-dispatch.
|
|
18
|
+
*/
|
|
19
|
+
protected reemit(event: Event): void;
|
|
4
20
|
}
|
|
5
21
|
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/component/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/component/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAIjC,qBAAa,SAAU,SAAQ,UAAU;IACxC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC;IAWjE;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK;CAG7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/text-field/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { Component } from '../component';
|
|
2
|
+
import '../layout/group';
|
|
3
|
+
import '../close-button';
|
|
4
|
+
export type TextFieldSize = 'small' | 'default' | 'large';
|
|
5
|
+
export interface TextFieldProps {
|
|
6
|
+
clearable?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
max?: string;
|
|
9
|
+
'max-length'?: number;
|
|
10
|
+
min?: string;
|
|
11
|
+
'min-length'?: number;
|
|
12
|
+
pattern?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
'read-only'?: boolean;
|
|
15
|
+
size?: TextFieldSize;
|
|
16
|
+
step?: string;
|
|
17
|
+
type?: 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url';
|
|
18
|
+
value?: string;
|
|
19
|
+
'm-clear'?: (event: CustomEvent) => void;
|
|
20
|
+
change?: (event: Event) => void;
|
|
21
|
+
input?: (event: Event) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare class TextField extends Component {
|
|
24
|
+
#private;
|
|
25
|
+
static styles: import("lit").CSSResult[];
|
|
26
|
+
static get properties(): {
|
|
27
|
+
clearable: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
};
|
|
30
|
+
disabled: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
reflect: boolean;
|
|
33
|
+
};
|
|
34
|
+
max: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
};
|
|
37
|
+
maxLength: {
|
|
38
|
+
type: NumberConstructor;
|
|
39
|
+
reflect: boolean;
|
|
40
|
+
attribute: string;
|
|
41
|
+
};
|
|
42
|
+
min: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
};
|
|
45
|
+
minLength: {
|
|
46
|
+
type: NumberConstructor;
|
|
47
|
+
reflect: boolean;
|
|
48
|
+
attribute: string;
|
|
49
|
+
};
|
|
50
|
+
pattern: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
};
|
|
53
|
+
placeholder: {
|
|
54
|
+
type: StringConstructor;
|
|
55
|
+
};
|
|
56
|
+
readOnly: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
reflect: boolean;
|
|
59
|
+
attribute: string;
|
|
60
|
+
};
|
|
61
|
+
size: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
};
|
|
64
|
+
step: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
};
|
|
67
|
+
type: {
|
|
68
|
+
type: StringConstructor;
|
|
69
|
+
};
|
|
70
|
+
value: {
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Should the text field be clearable.
|
|
76
|
+
*/
|
|
77
|
+
clearable: TextFieldProps['clearable'];
|
|
78
|
+
/**
|
|
79
|
+
* Should the text field be disabled.
|
|
80
|
+
*/
|
|
81
|
+
disabled: TextFieldProps['disabled'];
|
|
82
|
+
/**
|
|
83
|
+
* Define the greatest value in the range of permitted values.
|
|
84
|
+
*
|
|
85
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#max
|
|
86
|
+
*/
|
|
87
|
+
max: TextFieldProps['max'];
|
|
88
|
+
/**
|
|
89
|
+
* The maximum number of characters a user can enter into the text field. Set
|
|
90
|
+
* to -1 for none.
|
|
91
|
+
*
|
|
92
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength
|
|
93
|
+
*/
|
|
94
|
+
maxLength: TextFieldProps['max-length'];
|
|
95
|
+
/**
|
|
96
|
+
* Define the most negative value in the range of permitted values.
|
|
97
|
+
*
|
|
98
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#min
|
|
99
|
+
*/
|
|
100
|
+
min: TextFieldProps['min'];
|
|
101
|
+
/**
|
|
102
|
+
* The minimum number of characters a user can enter into the text field. Set
|
|
103
|
+
* to -1 for none.
|
|
104
|
+
*
|
|
105
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength
|
|
106
|
+
*/
|
|
107
|
+
minLength: TextFieldProps['min-length'];
|
|
108
|
+
/**
|
|
109
|
+
* A regular expression that the text field's value must match to pass
|
|
110
|
+
* constraint validation.
|
|
111
|
+
*
|
|
112
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#pattern
|
|
113
|
+
*/
|
|
114
|
+
pattern: TextFieldProps['pattern'];
|
|
115
|
+
/**
|
|
116
|
+
* Placeholder text for the input.
|
|
117
|
+
*/
|
|
118
|
+
placeholder: TextFieldProps['placeholder'];
|
|
119
|
+
/**
|
|
120
|
+
* Indicate whether or not a user should be able to edit the text field's
|
|
121
|
+
* value.
|
|
122
|
+
*
|
|
123
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#readonly
|
|
124
|
+
*/
|
|
125
|
+
readOnly: TextFieldProps['read-only'];
|
|
126
|
+
/**
|
|
127
|
+
* Return or set the element's step attribute, which works with min and max
|
|
128
|
+
* to limit the increments at which a numeric or date-time value can be set.
|
|
129
|
+
*
|
|
130
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step
|
|
131
|
+
*/
|
|
132
|
+
step: TextFieldProps['step'];
|
|
133
|
+
/**
|
|
134
|
+
* Text field size.
|
|
135
|
+
*/
|
|
136
|
+
size: TextFieldProps['size'];
|
|
137
|
+
/**
|
|
138
|
+
* Input type.
|
|
139
|
+
*/
|
|
140
|
+
type: TextFieldProps['type'];
|
|
141
|
+
/**
|
|
142
|
+
* Text field value.
|
|
143
|
+
*/
|
|
144
|
+
value?: TextFieldProps['value'];
|
|
145
|
+
private inputElement;
|
|
146
|
+
constructor();
|
|
147
|
+
connectedCallback(): void;
|
|
148
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
149
|
+
get input(): HTMLInputElement | null;
|
|
150
|
+
clear(): void;
|
|
151
|
+
focus(): void;
|
|
152
|
+
}
|
|
153
|
+
declare global {
|
|
154
|
+
interface HTMLElementTagNameMap {
|
|
155
|
+
'm-text-field': TextField;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=text-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../src/components/text-field/text-field.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AAEzB,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAE1D,MAAM,WAAW,cAAc;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MA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AAM,CAAC,CAAC;IAErC;;OAEG;IACK,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAErC;;OAEG;IACK,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAErC;;OAEG;IACK,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IAExC,OAAO,CAAC,YAAY,CAAiC;;IAc5C,iBAAiB;IAMjB,MAAM;IA0Df,IAAI,KAAK,IAAI,gBAAgB,GAAG,IAAI,CAMnC;IAED,KAAK;IAYI,KAAK;CAqBd;AAID,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,cAAc,EAAE,SAAS,CAAC;KAC1B;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-field.styles.d.ts","sourceRoot":"","sources":["../../../src/components/text-field/text-field.styles.ts"],"names":[],"mappings":"AAMA,iBAAS,MAAM,4BAmHd;AAED,eAAe,MAAM,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,5 +10,6 @@ export * from './components/progress-bar-countdown';
|
|
|
10
10
|
export * from './components/radio-group';
|
|
11
11
|
export * from './components/tag';
|
|
12
12
|
export * from './components/text';
|
|
13
|
+
export * from './components/text-field';
|
|
13
14
|
export * from './components/toggle-group';
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qCAAqC,CAAC;AACpD,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qCAAqC,CAAC;AACpD,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC"}
|