@telia-ace/widget-ui 1.0.28-experimental.2 → 1.0.28-experimental.21
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/_icon.d.ts +7 -0
- package/dist/components/button/button.d.ts +10 -0
- package/dist/components/icon.d.ts +8 -6
- package/dist/components/index.d.ts +1 -2
- package/dist/components/ui-html.d.ts +13 -0
- package/dist/components/ui-symbol-badge.d.ts +22 -0
- package/dist/components/ui-timestamp.d.ts +23 -0
- package/dist/components/ui-typography.d.ts +13 -0
- package/dist/controllers/index.d.ts +1 -0
- package/dist/controllers/node-connector.d.ts +8 -0
- package/dist/create-web-component.d.ts +4 -0
- package/dist/data-provider.d.ts +11 -0
- package/dist/index.d.ts +13 -2
- package/dist/index.js +1975 -1719
- package/dist/index.js.map +1 -1
- package/dist/mixins/context.d.ts +9 -0
- package/dist/mixins/index.d.ts +5 -0
- package/dist/mixins/pending-state.d.ts +6 -0
- package/dist/mixins/provider.d.ts +7 -0
- package/dist/mixins/requester.d.ts +7 -0
- package/dist/mixins/widget-component.d.ts +8 -0
- package/dist/utils/animations.d.ts +2 -2
- package/dist/utils/map-context-style.d.ts +5 -0
- package/package.json +24 -7
- package/src/styles/mixins.scss +257 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class ConsumerInterface {
|
|
3
|
+
}
|
|
4
|
+
export declare class ContextProviderInterface {
|
|
5
|
+
}
|
|
6
|
+
type Constructor<T = {}> = new (...args: any[]) => T;
|
|
7
|
+
export declare const ConsumerMixin: <T extends Constructor<LitElement>>(Base: T) => Constructor<ConsumerInterface> & T;
|
|
8
|
+
export declare const ContextProviderMixin: <T extends Constructor<LitElement>>(Base: T) => Constructor<ContextProviderInterface> & T;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ConsumerMixin } from './context';
|
|
2
|
+
export { PendingState } from './pending-state';
|
|
3
|
+
export { Provider as ProviderMixin } from './provider';
|
|
4
|
+
export { Requester } from './requester';
|
|
5
|
+
export { WidgetComponent as WidgetComponentMixin } from './widget-component';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class PendingStateInterface {
|
|
3
|
+
}
|
|
4
|
+
type Constructor<T = {}> = new (...args: any[]) => T;
|
|
5
|
+
export declare const PendingState: <T extends Constructor<LitElement>>(Base: T) => Constructor<PendingStateInterface> & T;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class ProviderInterface {
|
|
3
|
+
provideInstance(key: string, instance: any): void;
|
|
4
|
+
}
|
|
5
|
+
type Constructor<T = {}> = new (...args: any[]) => T;
|
|
6
|
+
export declare const Provider: <T extends Constructor<LitElement>>(Base: T) => Constructor<ProviderInterface> & T;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class RequesterInterface {
|
|
3
|
+
requestInstance(key: string): any;
|
|
4
|
+
}
|
|
5
|
+
type Constructor<T = {}> = new (...args: any[]) => T;
|
|
6
|
+
export declare const Requester: <T extends Constructor<LitElement>>(Base: T) => Constructor<RequesterInterface> & T;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class WidgetComponentInterface {
|
|
3
|
+
requestInstance(key: string): any;
|
|
4
|
+
nodeId: string;
|
|
5
|
+
}
|
|
6
|
+
export type WidgetComponentConstructor<T = {}> = new (...args: any[]) => T;
|
|
7
|
+
export type _LitElement = LitElement;
|
|
8
|
+
export declare const WidgetComponent: <T extends WidgetComponentConstructor<LitElement>>(Base: T) => WidgetComponentConstructor<WidgetComponentInterface> & T;
|
|
@@ -11,7 +11,7 @@ export declare const transitionComposer: {
|
|
|
11
11
|
compose: (status: TransitionStatus | undefined, definitions: {
|
|
12
12
|
enter: TransitionStateSettings;
|
|
13
13
|
exit: TransitionStateSettings;
|
|
14
|
-
}) => false | import("@emotion/react").SerializedStyles |
|
|
15
|
-
composeViewTransition: (status: TransitionStatus, type: string, direction?: 'forth' | 'back') => false | import("@emotion/react").SerializedStyles |
|
|
14
|
+
}) => false | "" | import("@emotion/react").SerializedStyles | undefined;
|
|
15
|
+
composeViewTransition: (status: TransitionStatus, type: string, direction?: 'forth' | 'back') => false | "" | import("@emotion/react").SerializedStyles | undefined;
|
|
16
16
|
get: (title: string) => any;
|
|
17
17
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-ui",
|
|
3
|
-
"version": "1.0.28-experimental.
|
|
3
|
+
"version": "1.0.28-experimental.21",
|
|
4
4
|
"description": "UI components used by ACE Widgets.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
@@ -9,27 +9,42 @@
|
|
|
9
9
|
],
|
|
10
10
|
"main": "dist/index.js",
|
|
11
11
|
"sourceMain": "src/index.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": "./dist/index.js",
|
|
14
|
+
"./styles/mixins.scss": {
|
|
15
|
+
"import": "./src/styles/mixins.scss",
|
|
16
|
+
"require": "./src/styles/mixins.scss"
|
|
17
|
+
},
|
|
18
|
+
"./package.json": {
|
|
19
|
+
"import": "./package.json",
|
|
20
|
+
"require": "./package.json"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
12
23
|
"type": "module",
|
|
13
24
|
"types": "dist/index.d.ts",
|
|
14
25
|
"files": [
|
|
15
26
|
"LICENSE.txt",
|
|
16
27
|
"README.md",
|
|
17
|
-
"dist/"
|
|
28
|
+
"dist/",
|
|
29
|
+
"src/styles/"
|
|
18
30
|
],
|
|
19
31
|
"publishConfig": {
|
|
20
32
|
"access": "public"
|
|
21
33
|
},
|
|
22
34
|
"sideEffects": false,
|
|
23
35
|
"dependencies": {
|
|
24
|
-
"@
|
|
25
|
-
"@
|
|
26
|
-
"@telia-ace/widget-
|
|
36
|
+
"@open-wc/dedupe-mixin": "^1.3.1",
|
|
37
|
+
"@open-wc/lit-helpers": "^0.5.1",
|
|
38
|
+
"@telia-ace/widget-core": "1.0.21-experimental.21",
|
|
39
|
+
"@telia-ace/widget-routing": "1.0.22-experimental.21",
|
|
40
|
+
"@telia-ace/widget-utilities": "1.0.10-experimental.21",
|
|
27
41
|
"@webprovisions/platform": "^1.1.2",
|
|
28
42
|
"htmr": "1.0.2"
|
|
29
43
|
},
|
|
30
44
|
"peerDependencies": {
|
|
31
45
|
"@emotion/react": "^11.10.5",
|
|
32
46
|
"@emotion/styled": "^11.10.5",
|
|
47
|
+
"lit": "^2.6.1",
|
|
33
48
|
"react": "^18.2.0",
|
|
34
49
|
"react-dom": "^18.2.0",
|
|
35
50
|
"react-router-dom": "^5.3.4",
|
|
@@ -38,15 +53,17 @@
|
|
|
38
53
|
"devDependencies": {
|
|
39
54
|
"@emotion/react": "^11.10.5",
|
|
40
55
|
"@emotion/styled": "^11.10.5",
|
|
41
|
-
"@telia-ace/widget-developer-tools": "1.0.16-experimental.
|
|
56
|
+
"@telia-ace/widget-developer-tools": "1.0.16-experimental.21",
|
|
42
57
|
"@types/react": "^18.0.26",
|
|
43
58
|
"@types/react-dom": "^18.0.10",
|
|
44
59
|
"@types/react-router-dom": "^5.3.3",
|
|
45
60
|
"@types/react-transition-group": "^4.4.5",
|
|
61
|
+
"lit": "^2.6.1",
|
|
46
62
|
"react": "^18.2.0",
|
|
47
63
|
"react-dom": "^18.2.0",
|
|
48
64
|
"react-router-dom": "^5.3.4",
|
|
49
|
-
"react-transition-group": "^4.4.5"
|
|
65
|
+
"react-transition-group": "^4.4.5",
|
|
66
|
+
"sass": "^1.57.1"
|
|
50
67
|
},
|
|
51
68
|
"scripts": {
|
|
52
69
|
"clean": "rimraf ./dist",
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
@mixin reset {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
@mixin genericHtml {
|
|
6
|
+
font-size: var(--fonts-normal);
|
|
7
|
+
font-weight: 300;
|
|
8
|
+
line-height: 1.5em;
|
|
9
|
+
color: var(--colors-text);
|
|
10
|
+
|
|
11
|
+
h1,
|
|
12
|
+
h2,
|
|
13
|
+
h3,
|
|
14
|
+
h4,
|
|
15
|
+
h5,
|
|
16
|
+
h6 {
|
|
17
|
+
word-break: break-word;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
h1:first-child,
|
|
21
|
+
h2:first-child,
|
|
22
|
+
h3:first-child,
|
|
23
|
+
h4:first-child,
|
|
24
|
+
h5:first-child,
|
|
25
|
+
h6:first-child {
|
|
26
|
+
margin-top: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
h1:only-child,
|
|
30
|
+
h2:only-child,
|
|
31
|
+
h3:only-child,
|
|
32
|
+
h4:only-child,
|
|
33
|
+
h5:only-child,
|
|
34
|
+
h6:only-child {
|
|
35
|
+
margin: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
h1:last-child,
|
|
39
|
+
h2:last-child,
|
|
40
|
+
h3:last-child,
|
|
41
|
+
h4:last-child,
|
|
42
|
+
h5:last-child,
|
|
43
|
+
h6:last-child {
|
|
44
|
+
margin-bottom: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
a {
|
|
48
|
+
color: var(--colors-link);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
a:focus-visible {
|
|
52
|
+
outline: var(--accessibility-border);
|
|
53
|
+
color: var(--accessibility-colors-inactiveText);
|
|
54
|
+
border-color: transparent;
|
|
55
|
+
text-decoration: underline;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
img {
|
|
59
|
+
max-width: 100% !important;
|
|
60
|
+
height: auto !important;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
p {
|
|
64
|
+
word-break: break-word;
|
|
65
|
+
margin: var(--size-normal) 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
p:first-child {
|
|
69
|
+
margin: 0 0 var(--size-normal);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
p:last-child {
|
|
73
|
+
margin: var(--size-normal) 0 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
p:only-child {
|
|
77
|
+
margin: 0;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@mixin contentBox {
|
|
82
|
+
display: flex;
|
|
83
|
+
justify-content: center;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
background: #ffffff;
|
|
86
|
+
border-radius: var(--borderRadius);
|
|
87
|
+
border: var(--border);
|
|
88
|
+
box-shadow: var(--boxShadow, none);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@mixin borderTabStyle {
|
|
92
|
+
outline: var(--accessibility-border);
|
|
93
|
+
color: var(--accessibility-colors-inactiveText);
|
|
94
|
+
border-color: transparent;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@mixin linkTabStyle {
|
|
98
|
+
outline: var(--accessibility-border);
|
|
99
|
+
color: var(--accessibility-colors-inactiveText);
|
|
100
|
+
border-color: transparent;
|
|
101
|
+
text-decoration: underline;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@mixin list {
|
|
105
|
+
padding: 0;
|
|
106
|
+
margin: 0;
|
|
107
|
+
list-style: none;
|
|
108
|
+
> li {
|
|
109
|
+
margin: 0 0 var(--size-normal);
|
|
110
|
+
white-space: nowrap;
|
|
111
|
+
text-overflow: ellipsis;
|
|
112
|
+
min-width: 0;
|
|
113
|
+
}
|
|
114
|
+
> li:focus {
|
|
115
|
+
outline-offset: -2px;
|
|
116
|
+
}
|
|
117
|
+
> li > a {
|
|
118
|
+
text-decoration: none;
|
|
119
|
+
}
|
|
120
|
+
> li:last-child {
|
|
121
|
+
margin: 0;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@mixin itemList {
|
|
126
|
+
ui-item-list::part(list) {
|
|
127
|
+
@include list;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
h1 {
|
|
131
|
+
margin: 0 0 var(--size-normal);
|
|
132
|
+
font-size: var(--fonts-medium);
|
|
133
|
+
font-weight: normal;
|
|
134
|
+
line-height: 1.8em;
|
|
135
|
+
color: var(--colors-text);
|
|
136
|
+
}
|
|
137
|
+
h1 {
|
|
138
|
+
display: flex;
|
|
139
|
+
align-items: center;
|
|
140
|
+
}
|
|
141
|
+
h1 i {
|
|
142
|
+
margin: 7px var(--size-normal) 0 0;
|
|
143
|
+
width: 24px;
|
|
144
|
+
display: inline-block;
|
|
145
|
+
vertical-align: text-bottom;
|
|
146
|
+
align-self: flex-start;
|
|
147
|
+
min-width: 24px;
|
|
148
|
+
min-height: 24px;
|
|
149
|
+
text-align: center;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@mixin buttonCss {
|
|
154
|
+
cursor: pointer;
|
|
155
|
+
text-align: center;
|
|
156
|
+
border: none;
|
|
157
|
+
font-weight: 300;
|
|
158
|
+
padding: var(--size-normal);
|
|
159
|
+
border-radius: var(--borderRadius);
|
|
160
|
+
font-family: inherit;
|
|
161
|
+
font-size: var(--fonts-normal);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@mixin invertedHoverButton {
|
|
165
|
+
$primary: var(--button-primary, var(--colors-primary));
|
|
166
|
+
$secondary: var(--button-secondary, var(--colors-secondary));
|
|
167
|
+
|
|
168
|
+
@include buttonCss;
|
|
169
|
+
border: 1px solid $primary;
|
|
170
|
+
background-color: $secondary;
|
|
171
|
+
color: $primary;
|
|
172
|
+
|
|
173
|
+
&.active {
|
|
174
|
+
border-color: $secondary;
|
|
175
|
+
background-color: $primary;
|
|
176
|
+
color: $secondary;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
transition: background-color 200ms ease-out, color 200ms ease-out;
|
|
180
|
+
|
|
181
|
+
span,
|
|
182
|
+
i,
|
|
183
|
+
p,
|
|
184
|
+
a {
|
|
185
|
+
transition: color 200ms ease-out;
|
|
186
|
+
color: inherit;
|
|
187
|
+
font-size: var(--fonts-normal);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&:not([disabled]) {
|
|
191
|
+
&:hover {
|
|
192
|
+
background-color: $primary;
|
|
193
|
+
color: $secondary;
|
|
194
|
+
|
|
195
|
+
// span,
|
|
196
|
+
// i,
|
|
197
|
+
// p,
|
|
198
|
+
// a {
|
|
199
|
+
// color: inherit;
|
|
200
|
+
// }
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
&:focus-visible {
|
|
204
|
+
@include borderTabStyle;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
@mixin resetButton {
|
|
210
|
+
-webkit-appearance: button;
|
|
211
|
+
text-transform: none;
|
|
212
|
+
overflow: visible;
|
|
213
|
+
outline: none;
|
|
214
|
+
border: none;
|
|
215
|
+
background-color: transparent;
|
|
216
|
+
cursor: pointer;
|
|
217
|
+
font-family: inherit;
|
|
218
|
+
font-size: inherit;
|
|
219
|
+
line-height: normal;
|
|
220
|
+
margin: 0;
|
|
221
|
+
padding: 0;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@mixin scrollable {
|
|
225
|
+
// overflow-y: ${
|
|
226
|
+
// browser() === Browsers.Chrome || browser() === Browsers.EdgeChromium ? 'overlay' : 'auto'
|
|
227
|
+
// };
|
|
228
|
+
overflow-y: auto;
|
|
229
|
+
overflow-x: hidden;
|
|
230
|
+
-ms-overflow-style: none; /* IE 10+ */
|
|
231
|
+
scrollbar-width: thin; /* Firefox */
|
|
232
|
+
scrollbar-color: transparent transparent; /* Firefox */
|
|
233
|
+
|
|
234
|
+
&::-webkit-scrollbar {
|
|
235
|
+
width: 3px !important;
|
|
236
|
+
background-color: transparent;
|
|
237
|
+
border-left: none;
|
|
238
|
+
}
|
|
239
|
+
&::-webkit-scrollbar-thumb {
|
|
240
|
+
// background-color: transparent;
|
|
241
|
+
background-color: #7f7f7f !important;
|
|
242
|
+
}
|
|
243
|
+
&::-webkit-scrollbar-track {
|
|
244
|
+
-webkit-box-shadow: none !important;
|
|
245
|
+
background-color: transparent;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// &.scrolling {
|
|
249
|
+
scrollbar-color: #7f7f7f transparent !important;
|
|
250
|
+
scrollbar-width: thin !important; /* Firefox */
|
|
251
|
+
-ms-overflow-style: none !important; /* IE 10+ */
|
|
252
|
+
|
|
253
|
+
::-webkit-scrollbar-thumb {
|
|
254
|
+
background-color: #7f7f7f !important;
|
|
255
|
+
}
|
|
256
|
+
// }
|
|
257
|
+
}
|