@proximus/lavender-common 0.1.0-alpha.39
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/index.js +371 -0
- package/package.json +40 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
const a = "::slotted(*[grow]){flex-grow:var(--flex-grow-value)}::slotted(*[shrink]){flex-shrink:var(--flex-shrink-value)}::slotted(*[basis]){flex-basis:var(--flex-basis-value)}::slotted(*[align-self]){align-self:var(--flex-align-self-value)}::slotted(*[grow-mobile]){flex-grow:var(--flex-grow-mobile-value)}::slotted(*[shrink-mobile]){flex-shrink:var(--flex-shrink-mobile-value)}::slotted(*[basis-mobile]){flex-basis:var(--flex-basis-mobile-value)}::slotted(*[align-self-mobile]){align-self:var(--flex-align-self-mobile-value)}@media screen and (min-width: 768px){::slotted(*[grow-tablet]){flex-grow:var(--flex-grow-tablet-value)}::slotted(*[shrink-tablet]){flex-shrink:var(--flex-shrink-tablet-value)}::slotted(*[basis-tablet]){flex-basis:var(--flex-basis-tablet-value)}::slotted(*[align-self-tablet]){align-self:var(--flex-align-self-tablet-value)}}@media screen and (min-width: 1025px){::slotted(*[grow-laptop]){flex-grow:var(--flex-grow-laptop-value)}::slotted(*[shrink-laptop]){flex-shrink:var(--flex-shrink-laptop-value)}::slotted(*[basis-laptop]){flex-basis:var(--flex-basis-laptop-value)}::slotted(*[align-self-laptop]){align-self:var(--flex-align-self-laptop-value)}}@media screen and (min-width: 1441px){::slotted(*[grow-desktop]){flex-grow:var(--flex-grow-desktop-value)}::slotted(*[shrink-desktop]){flex-shrink:var(--flex-shrink-desktop-value)}::slotted(*[basis-desktop]){flex-basis:var(--flex-basis-desktop-value)}::slotted(*[align-self-desktop]){align-self:var(--flex-align-self-desktop-value)}}@media only screen and (min-width: 0px) and (max-width: 767px){::slotted(*[hidden-mobile]){display:none}}@media only screen and (min-width: 768px) and (max-width: 1024px){::slotted(*[hidden-tablet]){display:none}}@media only screen and (min-width: 1025px) and (max-width: 1440px){::slotted(*[hidden-laptop]){display:none}}@media only screen and (min-width: 1441px){::slotted(*[hidden-desktop]){display:none}}";
|
|
2
|
+
function r(e) {
|
|
3
|
+
const t = document.createElement(e), s = Object.getPrototypeOf(t);
|
|
4
|
+
return Object.getOwnPropertyNames(s);
|
|
5
|
+
}
|
|
6
|
+
const l = new CSSStyleSheet();
|
|
7
|
+
l.replaceSync(a);
|
|
8
|
+
class o extends HTMLElement {
|
|
9
|
+
static get observedAttributes() {
|
|
10
|
+
return [
|
|
11
|
+
"grow",
|
|
12
|
+
"grow-tablet",
|
|
13
|
+
"grow-laptop",
|
|
14
|
+
"grow-desktop",
|
|
15
|
+
"shrink",
|
|
16
|
+
"shrink-mobile",
|
|
17
|
+
"shrink-tablet",
|
|
18
|
+
"shrink-laptop",
|
|
19
|
+
"shrink-desktop",
|
|
20
|
+
"basis",
|
|
21
|
+
"basis-mobile",
|
|
22
|
+
"basis-tablet",
|
|
23
|
+
"basis-laptop",
|
|
24
|
+
"basis-desktop",
|
|
25
|
+
"align-self",
|
|
26
|
+
"hidden-mobile",
|
|
27
|
+
"hidden-tablet",
|
|
28
|
+
"hidden-laptop",
|
|
29
|
+
"hidden-desktop"
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
constructor(...t) {
|
|
33
|
+
super(), this.shadowRoot || this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [
|
|
34
|
+
l,
|
|
35
|
+
...t
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
attributeChangedCallback(t, s, i) {
|
|
39
|
+
if (o.observedAttributes.indexOf(t) !== -1)
|
|
40
|
+
if (i === null)
|
|
41
|
+
this.style.removeProperty(t);
|
|
42
|
+
else
|
|
43
|
+
switch (t) {
|
|
44
|
+
case "grow":
|
|
45
|
+
case "shrink":
|
|
46
|
+
case "basis":
|
|
47
|
+
case "grow-mobile":
|
|
48
|
+
case "grow-tablet":
|
|
49
|
+
case "grow-laptop":
|
|
50
|
+
case "grow-desktop":
|
|
51
|
+
case "shrink-mobile":
|
|
52
|
+
case "shrink-tablet":
|
|
53
|
+
case "shrink-laptop":
|
|
54
|
+
case "shrink-desktop":
|
|
55
|
+
case "basis-mobile":
|
|
56
|
+
case "basis-tablet":
|
|
57
|
+
case "basis-laptop":
|
|
58
|
+
case "basis-desktop":
|
|
59
|
+
case "align-self":
|
|
60
|
+
this.style.setProperty(`--flex-${t}-value`, i);
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
get grow() {
|
|
65
|
+
return this.getAttribute("grow");
|
|
66
|
+
}
|
|
67
|
+
set grow(t) {
|
|
68
|
+
this.setAttribute("grow", t);
|
|
69
|
+
}
|
|
70
|
+
get shrink() {
|
|
71
|
+
return this.getAttribute("shrink");
|
|
72
|
+
}
|
|
73
|
+
set shrink(t) {
|
|
74
|
+
this.setAttribute("shrink", t);
|
|
75
|
+
}
|
|
76
|
+
get basis() {
|
|
77
|
+
return this.getAttribute("basis");
|
|
78
|
+
}
|
|
79
|
+
set basis(t) {
|
|
80
|
+
this.setAttribute("basis", t);
|
|
81
|
+
}
|
|
82
|
+
get growMobile() {
|
|
83
|
+
return this.getAttribute("grow-mobile");
|
|
84
|
+
}
|
|
85
|
+
set growMobile(t) {
|
|
86
|
+
this.setAttribute("grow-mobile", t);
|
|
87
|
+
}
|
|
88
|
+
get growTablet() {
|
|
89
|
+
return this.getAttribute("grow-tablet");
|
|
90
|
+
}
|
|
91
|
+
set growTablet(t) {
|
|
92
|
+
this.setAttribute("grow-tablet", t);
|
|
93
|
+
}
|
|
94
|
+
get growLaptop() {
|
|
95
|
+
return this.getAttribute("grow-laptop");
|
|
96
|
+
}
|
|
97
|
+
set growLaptop(t) {
|
|
98
|
+
this.setAttribute("grow-laptop", t);
|
|
99
|
+
}
|
|
100
|
+
get growDesktop() {
|
|
101
|
+
return this.getAttribute("grow-desktop");
|
|
102
|
+
}
|
|
103
|
+
set growDesktop(t) {
|
|
104
|
+
this.setAttribute("grow-desktop", t);
|
|
105
|
+
}
|
|
106
|
+
get shrinkMobile() {
|
|
107
|
+
return this.getAttribute("shrink-mobile");
|
|
108
|
+
}
|
|
109
|
+
set shrinkMobile(t) {
|
|
110
|
+
this.setAttribute("shrink-mobile", t);
|
|
111
|
+
}
|
|
112
|
+
get shrinkTablet() {
|
|
113
|
+
return this.getAttribute("shrink-tablet");
|
|
114
|
+
}
|
|
115
|
+
set shrinkTablet(t) {
|
|
116
|
+
this.setAttribute("shrink-tablet", t);
|
|
117
|
+
}
|
|
118
|
+
get shrinkLaptop() {
|
|
119
|
+
return this.getAttribute("shrink-laptop");
|
|
120
|
+
}
|
|
121
|
+
set shrinkLaptop(t) {
|
|
122
|
+
this.setAttribute("shrink-laptop", t);
|
|
123
|
+
}
|
|
124
|
+
get shrinkDesktop() {
|
|
125
|
+
return this.getAttribute("shrink-desktop");
|
|
126
|
+
}
|
|
127
|
+
set shrinkDesktop(t) {
|
|
128
|
+
this.setAttribute("shrink-desktop", t);
|
|
129
|
+
}
|
|
130
|
+
get basisMobile() {
|
|
131
|
+
return this.getAttribute("basis-mobile");
|
|
132
|
+
}
|
|
133
|
+
set basisMobile(t) {
|
|
134
|
+
this.setAttribute("basis-mobile", t);
|
|
135
|
+
}
|
|
136
|
+
get basisTablet() {
|
|
137
|
+
return this.getAttribute("basis-tablet");
|
|
138
|
+
}
|
|
139
|
+
set basisTablet(t) {
|
|
140
|
+
this.setAttribute("basis-tablet", t);
|
|
141
|
+
}
|
|
142
|
+
get basisLaptop() {
|
|
143
|
+
return this.getAttribute("basis-laptop");
|
|
144
|
+
}
|
|
145
|
+
set basisLaptop(t) {
|
|
146
|
+
this.setAttribute("basis-laptop", t);
|
|
147
|
+
}
|
|
148
|
+
get basisDesktop() {
|
|
149
|
+
return this.getAttribute("basis-desktop");
|
|
150
|
+
}
|
|
151
|
+
set basisDesktop(t) {
|
|
152
|
+
this.setAttribute("basis-desktop", t);
|
|
153
|
+
}
|
|
154
|
+
get alignSelf() {
|
|
155
|
+
return this.getAttribute("align-self");
|
|
156
|
+
}
|
|
157
|
+
set alignSelf(t) {
|
|
158
|
+
this.setAttribute("align-self", t);
|
|
159
|
+
}
|
|
160
|
+
get $el() {
|
|
161
|
+
return this;
|
|
162
|
+
}
|
|
163
|
+
get hiddenMobile() {
|
|
164
|
+
return this.getAttribute("hidden-mobile");
|
|
165
|
+
}
|
|
166
|
+
set hiddenMobile(t) {
|
|
167
|
+
this.setAttribute("hidden-mobile", t);
|
|
168
|
+
}
|
|
169
|
+
get hiddenTablet() {
|
|
170
|
+
return this.getAttribute("hidden-tablet");
|
|
171
|
+
}
|
|
172
|
+
set hiddenTablet(t) {
|
|
173
|
+
this.setAttribute("hidden-tablet", t);
|
|
174
|
+
}
|
|
175
|
+
get hiddenLaptop() {
|
|
176
|
+
return this.getAttribute("hidden-laptop");
|
|
177
|
+
}
|
|
178
|
+
set hiddenLaptop(t) {
|
|
179
|
+
this.setAttribute("hidden-laptop", t);
|
|
180
|
+
}
|
|
181
|
+
get hiddenDesktop() {
|
|
182
|
+
return this.getAttribute("hidden-desktop");
|
|
183
|
+
}
|
|
184
|
+
set hiddenDesktop(t) {
|
|
185
|
+
this.setAttribute("hidden-desktop", t);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
class n extends o {
|
|
189
|
+
static get observedAttributes() {
|
|
190
|
+
return [
|
|
191
|
+
...super.observedAttributes,
|
|
192
|
+
...r(this.nativeName)
|
|
193
|
+
];
|
|
194
|
+
}
|
|
195
|
+
attributeChangedCallback(t, s, i) {
|
|
196
|
+
super.attributeChangedCallback(t, s, i), i === null ? this.$el.toggleAttribute(t) : this.$el.setAttribute(t, i);
|
|
197
|
+
}
|
|
198
|
+
constructor(...t) {
|
|
199
|
+
super(...t), this.nativeName = Object.getPrototypeOf(this).constructor.nativeName;
|
|
200
|
+
}
|
|
201
|
+
connectedCallback() {
|
|
202
|
+
for (const t of r(this.nativeName))
|
|
203
|
+
t !== "constructor" && Object.defineProperty(this, t, {
|
|
204
|
+
get() {
|
|
205
|
+
return this.$el[t];
|
|
206
|
+
},
|
|
207
|
+
set(s) {
|
|
208
|
+
this.$el[t] !== s && (this.$el[t] = s);
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
get $el() {
|
|
213
|
+
return this.shadowRoot.querySelector(this.nativeName);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
const b = ["", "default", "none", "expanded"], h = [
|
|
217
|
+
"",
|
|
218
|
+
"default",
|
|
219
|
+
"inherit",
|
|
220
|
+
"xs",
|
|
221
|
+
"s",
|
|
222
|
+
"base",
|
|
223
|
+
"m",
|
|
224
|
+
"l",
|
|
225
|
+
"xl",
|
|
226
|
+
"2xl",
|
|
227
|
+
"3xl",
|
|
228
|
+
"4xl",
|
|
229
|
+
"5xl",
|
|
230
|
+
"6xl",
|
|
231
|
+
"7xl"
|
|
232
|
+
], p = [
|
|
233
|
+
"",
|
|
234
|
+
"default",
|
|
235
|
+
"inherit",
|
|
236
|
+
"primary",
|
|
237
|
+
"body",
|
|
238
|
+
"details",
|
|
239
|
+
"hover",
|
|
240
|
+
"disabled",
|
|
241
|
+
"active",
|
|
242
|
+
"promo",
|
|
243
|
+
"success",
|
|
244
|
+
"warning",
|
|
245
|
+
"error",
|
|
246
|
+
"unlimited"
|
|
247
|
+
], d = [
|
|
248
|
+
"",
|
|
249
|
+
"default",
|
|
250
|
+
"inherit",
|
|
251
|
+
"normal",
|
|
252
|
+
"bold",
|
|
253
|
+
"extrabold",
|
|
254
|
+
"light"
|
|
255
|
+
], g = [
|
|
256
|
+
"",
|
|
257
|
+
"default",
|
|
258
|
+
"2xs",
|
|
259
|
+
"xs",
|
|
260
|
+
"s",
|
|
261
|
+
"m",
|
|
262
|
+
"l",
|
|
263
|
+
"xl",
|
|
264
|
+
"2xl"
|
|
265
|
+
], u = ["", "none", "2xs", "xs", "s", "m", "l", "xl"], c = ["", "none", "s", "m", "l"], m = ["", "none", "main", "pill"], f = [
|
|
266
|
+
"",
|
|
267
|
+
"none",
|
|
268
|
+
"weak",
|
|
269
|
+
"moderate",
|
|
270
|
+
"strong",
|
|
271
|
+
"rich",
|
|
272
|
+
"main",
|
|
273
|
+
"canvas-weak",
|
|
274
|
+
"canvas-light",
|
|
275
|
+
"canvas-soft",
|
|
276
|
+
"canvas-moderate",
|
|
277
|
+
"canvas-strong",
|
|
278
|
+
"canvas-deep",
|
|
279
|
+
"canvas-rich",
|
|
280
|
+
"action-primary",
|
|
281
|
+
"action-secondary",
|
|
282
|
+
"action-hover-bordered",
|
|
283
|
+
"action-hover",
|
|
284
|
+
"action-disabled",
|
|
285
|
+
"action-active",
|
|
286
|
+
"notification",
|
|
287
|
+
"promo",
|
|
288
|
+
"success",
|
|
289
|
+
"error",
|
|
290
|
+
"warning",
|
|
291
|
+
"unlimited"
|
|
292
|
+
], k = ["", "none", "s", "m", "l", "xl"], x = [
|
|
293
|
+
"",
|
|
294
|
+
"purple-bottom-red",
|
|
295
|
+
"purple-bottom-magenta",
|
|
296
|
+
"purple-bottom-orange",
|
|
297
|
+
"purple-bottom-blue",
|
|
298
|
+
"purple-bottom-turquoise",
|
|
299
|
+
"purple-bottom-green",
|
|
300
|
+
"purple-right-red",
|
|
301
|
+
"purple-right-magenta",
|
|
302
|
+
"purple-right-orange",
|
|
303
|
+
"purple-right-blue",
|
|
304
|
+
"purple-right-turquoise",
|
|
305
|
+
"purple-right-green",
|
|
306
|
+
"purple-top-right-red",
|
|
307
|
+
"purple-top-right-magenta",
|
|
308
|
+
"purple-top-right-orange",
|
|
309
|
+
"purple-top-right-blue",
|
|
310
|
+
"purple-top-right-turquoise",
|
|
311
|
+
"purple-top-right-green",
|
|
312
|
+
"purple-bottom-right-red",
|
|
313
|
+
"purple-bottom-right-magenta",
|
|
314
|
+
"purple-bottom-right-orange",
|
|
315
|
+
"purple-bottom-right-blue",
|
|
316
|
+
"purple-bottom-right-turquoise",
|
|
317
|
+
"purple-bottom-right-green",
|
|
318
|
+
"color-bottom-red",
|
|
319
|
+
"color-bottom-magenta",
|
|
320
|
+
"color-bottom-orange",
|
|
321
|
+
"color-bottom-blue",
|
|
322
|
+
"color-bottom-turquoise",
|
|
323
|
+
"color-bottom-green",
|
|
324
|
+
"color-right-red",
|
|
325
|
+
"color-right-magenta",
|
|
326
|
+
"color-right-orange",
|
|
327
|
+
"color-right-blue",
|
|
328
|
+
"color-right-turquoise",
|
|
329
|
+
"color-right-green",
|
|
330
|
+
"color-top-right-red",
|
|
331
|
+
"color-top-right-magenta",
|
|
332
|
+
"color-top-right-orange",
|
|
333
|
+
"color-top-right-blue",
|
|
334
|
+
"color-top-right-turquoise",
|
|
335
|
+
"color-top-right-green",
|
|
336
|
+
"color-bottom-right-red",
|
|
337
|
+
"color-bottom-right-magenta",
|
|
338
|
+
"color-bottom-right-orange",
|
|
339
|
+
"color-bottom-right-blue",
|
|
340
|
+
"color-bottom-right-turquoise",
|
|
341
|
+
"color-bottom-right-green"
|
|
342
|
+
];
|
|
343
|
+
function w(e) {
|
|
344
|
+
const t = document.createElement("style");
|
|
345
|
+
t.innerHTML = e, document.head.appendChild(t);
|
|
346
|
+
}
|
|
347
|
+
function v(e) {
|
|
348
|
+
return typeof e == "string" && (e === "false" || e === "0" || e === "null") || typeof e == "boolean" && !e;
|
|
349
|
+
}
|
|
350
|
+
function A() {
|
|
351
|
+
return window.matchMedia("only screen and (min-width: 768px)").matches ? "tablet" : window.matchMedia("only screen and (min-width: 1025px)").matches ? "laptop" : "mobile";
|
|
352
|
+
}
|
|
353
|
+
export {
|
|
354
|
+
n as PxElement,
|
|
355
|
+
o as WithFlexAttributes,
|
|
356
|
+
w as addGlobalStylesheet,
|
|
357
|
+
f as bgColorValues,
|
|
358
|
+
m as borderRadiusValues,
|
|
359
|
+
c as borderValues,
|
|
360
|
+
p as colorValues,
|
|
361
|
+
h as fontsizeValues,
|
|
362
|
+
d as fontweightValues,
|
|
363
|
+
b as gapValues,
|
|
364
|
+
r as getSupportedAttributeNames,
|
|
365
|
+
A as getViewportFormat,
|
|
366
|
+
x as gradientValues,
|
|
367
|
+
g as iconSizeValues,
|
|
368
|
+
v as isFalsy,
|
|
369
|
+
u as paddingValues,
|
|
370
|
+
k as shadowValues
|
|
371
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@proximus/lavender-common",
|
|
3
|
+
"version": "0.1.0-alpha.39",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./src/index.ts",
|
|
9
|
+
"development": "./src/index.ts",
|
|
10
|
+
"default": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./src/*.css": {
|
|
13
|
+
"development": "./src/*.css"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"test": "vitest run --coverage",
|
|
22
|
+
"build": "rm -rf dist;tsc; vite build"
|
|
23
|
+
},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"gitHead": "15a231df98020f83813279639a9a7712a5a5e759",
|
|
28
|
+
"lerna": {
|
|
29
|
+
"command": {
|
|
30
|
+
"publish": {
|
|
31
|
+
"assets": [
|
|
32
|
+
"CHANGELOG.md",
|
|
33
|
+
"package.json",
|
|
34
|
+
"dist/*.js",
|
|
35
|
+
"dist/css/**/*.css"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|