welcome-ui 0.8.5 → 0.9.0-beta.1
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/Test.js +3 -0
- package/dist/Test.mjs +9 -0
- package/dist/WuiProvider.js +405 -0
- package/dist/WuiProvider.mjs +459 -0
- package/dist/index.js +18 -0
- package/dist/index.mjs +422 -0
- package/package.json +46 -97
- package/CHANGELOG.md +0 -106
- package/LICENSE +0 -21
- package/README.md +0 -57
- package/dist/welcome-ui.cjs.js +0 -3542
- package/dist/welcome-ui.es.js +0 -3498
package/dist/Test.js
ADDED
package/dist/Test.mjs
ADDED
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),t=require("@xstyled/styled-components");function p(e,n,i){return i?n.map(o=>`url('${e}.${o}') format('${o}-variations')`).join(", "):n.map(o=>`url('${e}.${o}') format('${o}')`).join(", ")}function d({name:e,variation:{display:n="swap",extensions:i=["woff2","woff"],isVariable:o,style:a,unicodeRange:s,url:l,weight:c}}){return t.css`
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: ${e};
|
|
4
|
+
src: ${p(l,i,o)};
|
|
5
|
+
font-display: ${n};
|
|
6
|
+
${c&&t.css`
|
|
7
|
+
font-weight: ${c};
|
|
8
|
+
`}
|
|
9
|
+
${a&&t.css`
|
|
10
|
+
font-style: ${a};
|
|
11
|
+
`}
|
|
12
|
+
${s&&t.css`
|
|
13
|
+
unicode-range: ${s};
|
|
14
|
+
`}
|
|
15
|
+
}
|
|
16
|
+
`}const m=()=>({theme:e})=>!e||!e.fontFaces?null:Object.entries(e.fontFaces).map(([n,i])=>i.map(o=>d({name:n,variation:o}))),f=t.css`
|
|
17
|
+
html,
|
|
18
|
+
body,
|
|
19
|
+
div,
|
|
20
|
+
span,
|
|
21
|
+
applet,
|
|
22
|
+
object,
|
|
23
|
+
iframe,
|
|
24
|
+
h1,
|
|
25
|
+
h2,
|
|
26
|
+
h3,
|
|
27
|
+
h4,
|
|
28
|
+
h5,
|
|
29
|
+
h6,
|
|
30
|
+
p,
|
|
31
|
+
blockquote,
|
|
32
|
+
pre,
|
|
33
|
+
a,
|
|
34
|
+
abbr,
|
|
35
|
+
acronym,
|
|
36
|
+
address,
|
|
37
|
+
big,
|
|
38
|
+
cite,
|
|
39
|
+
code,
|
|
40
|
+
del,
|
|
41
|
+
dfn,
|
|
42
|
+
em,
|
|
43
|
+
img,
|
|
44
|
+
ins,
|
|
45
|
+
kbd,
|
|
46
|
+
q,
|
|
47
|
+
s,
|
|
48
|
+
samp,
|
|
49
|
+
small,
|
|
50
|
+
strike,
|
|
51
|
+
strong,
|
|
52
|
+
sub,
|
|
53
|
+
sup,
|
|
54
|
+
tt,
|
|
55
|
+
var,
|
|
56
|
+
b,
|
|
57
|
+
u,
|
|
58
|
+
i,
|
|
59
|
+
center,
|
|
60
|
+
dl,
|
|
61
|
+
dt,
|
|
62
|
+
dd,
|
|
63
|
+
ol,
|
|
64
|
+
ul,
|
|
65
|
+
li,
|
|
66
|
+
fieldset,
|
|
67
|
+
form,
|
|
68
|
+
label,
|
|
69
|
+
legend,
|
|
70
|
+
table,
|
|
71
|
+
caption,
|
|
72
|
+
tbody,
|
|
73
|
+
tfoot,
|
|
74
|
+
thead,
|
|
75
|
+
tr,
|
|
76
|
+
th,
|
|
77
|
+
td,
|
|
78
|
+
article,
|
|
79
|
+
aside,
|
|
80
|
+
canvas,
|
|
81
|
+
details,
|
|
82
|
+
embed,
|
|
83
|
+
figure,
|
|
84
|
+
figcaption,
|
|
85
|
+
footer,
|
|
86
|
+
header,
|
|
87
|
+
hgroup,
|
|
88
|
+
menu,
|
|
89
|
+
nav,
|
|
90
|
+
output,
|
|
91
|
+
ruby,
|
|
92
|
+
section,
|
|
93
|
+
summary,
|
|
94
|
+
time,
|
|
95
|
+
mark,
|
|
96
|
+
audio,
|
|
97
|
+
video {
|
|
98
|
+
min-width: 0;
|
|
99
|
+
min-height: 0;
|
|
100
|
+
margin: 0;
|
|
101
|
+
padding: 0;
|
|
102
|
+
border: 0;
|
|
103
|
+
font-size: 100%;
|
|
104
|
+
vertical-align: baseline;
|
|
105
|
+
}
|
|
106
|
+
article,
|
|
107
|
+
aside,
|
|
108
|
+
details,
|
|
109
|
+
figcaption,
|
|
110
|
+
figure,
|
|
111
|
+
footer,
|
|
112
|
+
header,
|
|
113
|
+
hgroup,
|
|
114
|
+
menu,
|
|
115
|
+
nav,
|
|
116
|
+
section {
|
|
117
|
+
display: block;
|
|
118
|
+
}
|
|
119
|
+
ol,
|
|
120
|
+
ul {
|
|
121
|
+
list-style: none;
|
|
122
|
+
}
|
|
123
|
+
blockquote,
|
|
124
|
+
q {
|
|
125
|
+
quotes: none;
|
|
126
|
+
}
|
|
127
|
+
blockquote::before,
|
|
128
|
+
blockquote::after,
|
|
129
|
+
q::before,
|
|
130
|
+
q::after {
|
|
131
|
+
content: '';
|
|
132
|
+
content: none;
|
|
133
|
+
}
|
|
134
|
+
table {
|
|
135
|
+
border-collapse: collapse;
|
|
136
|
+
border-spacing: 0;
|
|
137
|
+
}
|
|
138
|
+
a {
|
|
139
|
+
text-decoration: none;
|
|
140
|
+
}
|
|
141
|
+
img {
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
}
|
|
144
|
+
input {
|
|
145
|
+
-webkit-appearance: none;
|
|
146
|
+
-moz-appearance: none;
|
|
147
|
+
appearance: none;
|
|
148
|
+
}
|
|
149
|
+
input::-webkit-search-cancel-button {
|
|
150
|
+
display: none;
|
|
151
|
+
}
|
|
152
|
+
:focus {
|
|
153
|
+
outline: none !important; /* important for firefox */
|
|
154
|
+
}
|
|
155
|
+
*,
|
|
156
|
+
*::after,
|
|
157
|
+
*::before {
|
|
158
|
+
box-sizing: border-box;
|
|
159
|
+
-webkit-font-smoothing: antialiased;
|
|
160
|
+
-moz-osx-font-smoothing: grayscale;
|
|
161
|
+
}
|
|
162
|
+
html {
|
|
163
|
+
height: 100%;
|
|
164
|
+
}
|
|
165
|
+
body {
|
|
166
|
+
min-height: 100%;
|
|
167
|
+
padding-top: 1px;
|
|
168
|
+
margin-top: -1px;
|
|
169
|
+
}
|
|
170
|
+
`,g=t.css`
|
|
171
|
+
html {
|
|
172
|
+
line-height: 1.15;
|
|
173
|
+
-webkit-text-size-adjust: 100%;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
body {
|
|
177
|
+
margin: 0;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
main {
|
|
181
|
+
display: block;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
h1 {
|
|
185
|
+
font-size: 2em;
|
|
186
|
+
margin: 0.67em 0;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
hr {
|
|
190
|
+
box-sizing: content-box;
|
|
191
|
+
height: 0;
|
|
192
|
+
overflow: visible;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
pre {
|
|
196
|
+
font-family: monospace, monospace;
|
|
197
|
+
font-size: 1em;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
a {
|
|
201
|
+
background-color: transparent;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
abbr[title] {
|
|
205
|
+
border-bottom: none;
|
|
206
|
+
text-decoration: underline;
|
|
207
|
+
text-decoration: underline dotted;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
b,
|
|
211
|
+
strong {
|
|
212
|
+
font-weight: bolder;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
code,
|
|
216
|
+
kbd,
|
|
217
|
+
samp {
|
|
218
|
+
font-family: monospace, monospace;
|
|
219
|
+
font-size: 1em;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
small {
|
|
223
|
+
font-size: 80%;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
sub,
|
|
227
|
+
sup {
|
|
228
|
+
font-size: 75%;
|
|
229
|
+
line-height: 0;
|
|
230
|
+
position: relative;
|
|
231
|
+
vertical-align: baseline;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
sub {
|
|
235
|
+
bottom: -0.25em;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
sup {
|
|
239
|
+
top: -0.5em;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
img {
|
|
243
|
+
border-style: none;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
button,
|
|
247
|
+
input,
|
|
248
|
+
optgroup,
|
|
249
|
+
select,
|
|
250
|
+
textarea {
|
|
251
|
+
font-family: inherit;
|
|
252
|
+
font-size: 100%;
|
|
253
|
+
line-height: 1.15;
|
|
254
|
+
margin: 0;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
button,
|
|
258
|
+
input {
|
|
259
|
+
overflow: visible;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
button,
|
|
263
|
+
select {
|
|
264
|
+
text-transform: none;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
button,
|
|
268
|
+
[type='button'],
|
|
269
|
+
[type='reset'],
|
|
270
|
+
[type='submit'] {
|
|
271
|
+
-webkit-appearance: button;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
button::-moz-focus-inner,
|
|
275
|
+
[type='button']::-moz-focus-inner,
|
|
276
|
+
[type='reset']::-moz-focus-inner,
|
|
277
|
+
[type='submit']::-moz-focus-inner {
|
|
278
|
+
border-style: none;
|
|
279
|
+
padding: 0;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
button:-moz-focusring,
|
|
283
|
+
[type='button']:-moz-focusring,
|
|
284
|
+
[type='reset']:-moz-focusring,
|
|
285
|
+
[type='submit']:-moz-focusring {
|
|
286
|
+
outline: 1px dotted ButtonText;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
fieldset {
|
|
290
|
+
padding: 0.35em 0.75em 0.625em;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
legend {
|
|
294
|
+
box-sizing: border-box;
|
|
295
|
+
color: inherit;
|
|
296
|
+
display: table;
|
|
297
|
+
max-width: 100%;
|
|
298
|
+
padding: 0;
|
|
299
|
+
white-space: normal;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
progress {
|
|
303
|
+
vertical-align: baseline;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
textarea {
|
|
307
|
+
overflow: auto;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
[type='checkbox'],
|
|
311
|
+
[type='radio'] {
|
|
312
|
+
box-sizing: border-box;
|
|
313
|
+
padding: 0;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
[type='number']::-webkit-inner-spin-button,
|
|
317
|
+
[type='number']::-webkit-outer-spin-button {
|
|
318
|
+
height: auto;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
[type='search'] {
|
|
322
|
+
-webkit-appearance: textfield;
|
|
323
|
+
outline-offset: -2px;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
[type='search']::-webkit-search-decoration {
|
|
327
|
+
-webkit-appearance: none;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
::-webkit-file-upload-button {
|
|
331
|
+
-webkit-appearance: button;
|
|
332
|
+
font: inherit;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
details {
|
|
336
|
+
display: block;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
summary {
|
|
340
|
+
display: list-item;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
template {
|
|
344
|
+
display: none;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
[hidden] {
|
|
348
|
+
display: none;
|
|
349
|
+
}
|
|
350
|
+
`,h=t.css`
|
|
351
|
+
* {
|
|
352
|
+
&,
|
|
353
|
+
&::before,
|
|
354
|
+
&::after {
|
|
355
|
+
box-sizing: border-box;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
`;function y(){return t.css`
|
|
359
|
+
body,
|
|
360
|
+
button,
|
|
361
|
+
input,
|
|
362
|
+
select,
|
|
363
|
+
textarea {
|
|
364
|
+
/* stylelint-disable-next-line */
|
|
365
|
+
font-family: texts;
|
|
366
|
+
-webkit-font-smoothing: antialiased;
|
|
367
|
+
line-height: html;
|
|
368
|
+
letter-spacing: html;
|
|
369
|
+
}
|
|
370
|
+
`}const w=t.createGlobalStyle(({useReset:e})=>t.css`
|
|
371
|
+
${g};
|
|
372
|
+
${m()};
|
|
373
|
+
${y()};
|
|
374
|
+
${e?f:h};
|
|
375
|
+
|
|
376
|
+
html {
|
|
377
|
+
color: neutral-60;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
::selection {
|
|
381
|
+
${t.th("selection")};
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/* for firefox */
|
|
385
|
+
&[type='search'] {
|
|
386
|
+
appearance: none;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/* to remove x on macos */
|
|
390
|
+
input[type='search']::-webkit-search-decoration,
|
|
391
|
+
input[type='search']::-webkit-search-cancel-button,
|
|
392
|
+
input[type='search']::-webkit-search-results-button,
|
|
393
|
+
input[type='search']::-webkit-search-results-decoration {
|
|
394
|
+
appearance: none;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/* Fix to toast notification when useReset prop is add to WUI provider */
|
|
398
|
+
.Toaster__message-wrapper {
|
|
399
|
+
min-height: 'auto';
|
|
400
|
+
}
|
|
401
|
+
`),u="data-wui-hidefocusrings",k=t.createGlobalStyle(()=>t.css`
|
|
402
|
+
[${u}] *:focus {
|
|
403
|
+
outline: none;
|
|
404
|
+
}
|
|
405
|
+
`),v=({children:e,reactRootId:n})=>{const[i,o]=r.useState(!1);return r.useEffect(()=>{const a=i?"keydown":"mousemove",s=()=>o(c=>!c);window.addEventListener(a,s);const l=document.getElementById(n);return l&&(i?l.setAttribute(u,"true"):l.removeAttribute(u)),()=>{window.removeEventListener(a,s)}},[i,n]),r.createElement(r.Fragment,null,r.createElement(k,null),e)},b=({children:e,hasGlobalStyle:n=!0,reactRootId:i="root",shouldHideFocusRingOnClick:o=!0,theme:a,useReset:s})=>r.createElement(t.ThemeProvider,{theme:a},r.createElement(r.Fragment,null,n&&r.createElement(w,{useReset:s}),o?r.createElement(v,{reactRootId:i},e):e));b.displayName="WuiProvider";exports.WuiProvider=b;
|