welcome-ui 0.32.2 → 1.0.0-beta.2

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.
Files changed (36) hide show
  1. package/dist/box.js +1 -0
  2. package/dist/box.mjs +8 -0
  3. package/dist/index.js +18 -0
  4. package/dist/index.mjs +421 -0
  5. package/dist/system.js +1 -0
  6. package/dist/system.mjs +51 -0
  7. package/dist/types/components/Box/index.d.ts +3 -0
  8. package/dist/types/components/System/index.d.ts +40 -0
  9. package/dist/types/components/WuiProvider/font.d.ts +16 -0
  10. package/dist/types/components/WuiProvider/hide-focus-rings-root.d.ts +8 -0
  11. package/dist/types/components/WuiProvider/index.d.ts +11 -0
  12. package/dist/types/components/WuiProvider/styles.d.ts +5 -0
  13. package/dist/types/components/index.d.ts +3 -0
  14. package/dist/types/index.d.ts +2 -0
  15. package/dist/types/theme/borders.d.ts +6 -0
  16. package/dist/types/theme/colors.d.ts +346 -0
  17. package/dist/types/theme/dark.d.ts +7 -0
  18. package/dist/types/theme/focus.d.ts +10 -0
  19. package/dist/types/theme/fonts.d.ts +18 -0
  20. package/dist/types/theme/index.d.ts +64 -0
  21. package/dist/types/theme/radii.d.ts +12 -0
  22. package/dist/types/theme/screens.d.ts +13 -0
  23. package/dist/types/theme/selection.d.ts +4 -0
  24. package/dist/types/theme/shadows.d.ts +5 -0
  25. package/dist/types/theme/space.d.ts +18 -0
  26. package/dist/types/theme/transitions.d.ts +13 -0
  27. package/dist/types/theme/typography.d.ts +133 -0
  28. package/dist/types/theme/underline.d.ts +9 -0
  29. package/dist/wui-provider.js +405 -0
  30. package/dist/wui-provider.mjs +459 -0
  31. package/package.json +39 -126
  32. package/CHANGELOG.md +0 -1087
  33. package/LICENSE +0 -21
  34. package/README.md +0 -63
  35. package/dist/welcome-ui.cjs.js +0 -6973
  36. package/dist/welcome-ui.es.js +0 -6914
@@ -0,0 +1,459 @@
1
+ "use client";
2
+ import a, { useState as b, useEffect as d } from "react";
3
+ import { css as i, createGlobalStyle as p, th as m, ThemeProvider as f } from "@xstyled/styled-components";
4
+ function g(e, o, n) {
5
+ return n ? o.map((t) => `url('${e}.${t}') format('${t}-variations')`).join(", ") : o.map((t) => `url('${e}.${t}') format('${t}')`).join(", ");
6
+ }
7
+ function h({
8
+ name: e,
9
+ variation: {
10
+ display: o = "swap",
11
+ extensions: n = ["woff2", "woff"],
12
+ isVariable: t,
13
+ style: r,
14
+ unicodeRange: s,
15
+ url: l,
16
+ weight: c
17
+ }
18
+ }) {
19
+ return i`
20
+ @font-face {
21
+ font-family: ${e};
22
+ src: ${g(l, n, t)};
23
+ font-display: ${o};
24
+ ${c && i`
25
+ font-weight: ${c};
26
+ `}
27
+ ${r && i`
28
+ font-style: ${r};
29
+ `}
30
+ ${s && i`
31
+ unicode-range: ${s};
32
+ `}
33
+ }
34
+ `;
35
+ }
36
+ const y = () => ({ theme: e }) => !e || !e.fontFaces ? null : Object.entries(e.fontFaces).map(
37
+ ([o, n]) => n.map((t) => h({ name: o, variation: t }))
38
+ ), w = i`
39
+ html,
40
+ body,
41
+ div,
42
+ span,
43
+ applet,
44
+ object,
45
+ iframe,
46
+ h1,
47
+ h2,
48
+ h3,
49
+ h4,
50
+ h5,
51
+ h6,
52
+ p,
53
+ blockquote,
54
+ pre,
55
+ a,
56
+ abbr,
57
+ acronym,
58
+ address,
59
+ big,
60
+ cite,
61
+ code,
62
+ del,
63
+ dfn,
64
+ em,
65
+ img,
66
+ ins,
67
+ kbd,
68
+ q,
69
+ s,
70
+ samp,
71
+ small,
72
+ strike,
73
+ strong,
74
+ sub,
75
+ sup,
76
+ tt,
77
+ var,
78
+ b,
79
+ u,
80
+ i,
81
+ center,
82
+ dl,
83
+ dt,
84
+ dd,
85
+ ol,
86
+ ul,
87
+ li,
88
+ fieldset,
89
+ form,
90
+ label,
91
+ legend,
92
+ table,
93
+ caption,
94
+ tbody,
95
+ tfoot,
96
+ thead,
97
+ tr,
98
+ th,
99
+ td,
100
+ article,
101
+ aside,
102
+ canvas,
103
+ details,
104
+ embed,
105
+ figure,
106
+ figcaption,
107
+ footer,
108
+ header,
109
+ hgroup,
110
+ menu,
111
+ nav,
112
+ output,
113
+ ruby,
114
+ section,
115
+ summary,
116
+ time,
117
+ mark,
118
+ audio,
119
+ video {
120
+ min-width: 0;
121
+ min-height: 0;
122
+ margin: 0;
123
+ padding: 0;
124
+ border: 0;
125
+ font-size: 100%;
126
+ vertical-align: baseline;
127
+ }
128
+ article,
129
+ aside,
130
+ details,
131
+ figcaption,
132
+ figure,
133
+ footer,
134
+ header,
135
+ hgroup,
136
+ menu,
137
+ nav,
138
+ section {
139
+ display: block;
140
+ }
141
+ ol,
142
+ ul {
143
+ list-style: none;
144
+ }
145
+ blockquote,
146
+ q {
147
+ quotes: none;
148
+ }
149
+ blockquote::before,
150
+ blockquote::after,
151
+ q::before,
152
+ q::after {
153
+ content: '';
154
+ content: none;
155
+ }
156
+ table {
157
+ border-collapse: collapse;
158
+ border-spacing: 0;
159
+ }
160
+ a {
161
+ text-decoration: none;
162
+ }
163
+ img {
164
+ overflow: hidden;
165
+ }
166
+ input {
167
+ -webkit-appearance: none;
168
+ -moz-appearance: none;
169
+ appearance: none;
170
+ }
171
+ input::-webkit-search-cancel-button {
172
+ display: none;
173
+ }
174
+ :focus {
175
+ outline: none !important; /* important for firefox */
176
+ }
177
+ *,
178
+ *::after,
179
+ *::before {
180
+ box-sizing: border-box;
181
+ -webkit-font-smoothing: antialiased;
182
+ -moz-osx-font-smoothing: grayscale;
183
+ }
184
+ html {
185
+ height: 100%;
186
+ }
187
+ body {
188
+ min-height: 100%;
189
+ padding-top: 1px;
190
+ margin-top: -1px;
191
+ }
192
+ `, x = i`
193
+ html {
194
+ line-height: 1.15;
195
+ -webkit-text-size-adjust: 100%;
196
+ }
197
+
198
+ body {
199
+ margin: 0;
200
+ }
201
+
202
+ main {
203
+ display: block;
204
+ }
205
+
206
+ h1 {
207
+ font-size: 2em;
208
+ margin: 0.67em 0;
209
+ }
210
+
211
+ hr {
212
+ box-sizing: content-box;
213
+ height: 0;
214
+ overflow: visible;
215
+ }
216
+
217
+ pre {
218
+ font-family: monospace, monospace;
219
+ font-size: 1em;
220
+ }
221
+
222
+ a {
223
+ background-color: transparent;
224
+ }
225
+
226
+ abbr[title] {
227
+ border-bottom: none;
228
+ text-decoration: underline;
229
+ text-decoration: underline dotted;
230
+ }
231
+
232
+ b,
233
+ strong {
234
+ font-weight: bolder;
235
+ }
236
+
237
+ code,
238
+ kbd,
239
+ samp {
240
+ font-family: monospace, monospace;
241
+ font-size: 1em;
242
+ }
243
+
244
+ small {
245
+ font-size: 80%;
246
+ }
247
+
248
+ sub,
249
+ sup {
250
+ font-size: 75%;
251
+ line-height: 0;
252
+ position: relative;
253
+ vertical-align: baseline;
254
+ }
255
+
256
+ sub {
257
+ bottom: -0.25em;
258
+ }
259
+
260
+ sup {
261
+ top: -0.5em;
262
+ }
263
+
264
+ img {
265
+ border-style: none;
266
+ }
267
+
268
+ button,
269
+ input,
270
+ optgroup,
271
+ select,
272
+ textarea {
273
+ font-family: inherit;
274
+ font-size: 100%;
275
+ line-height: 1.15;
276
+ margin: 0;
277
+ }
278
+
279
+ button,
280
+ input {
281
+ overflow: visible;
282
+ }
283
+
284
+ button,
285
+ select {
286
+ text-transform: none;
287
+ }
288
+
289
+ button,
290
+ [type='button'],
291
+ [type='reset'],
292
+ [type='submit'] {
293
+ -webkit-appearance: button;
294
+ }
295
+
296
+ button::-moz-focus-inner,
297
+ [type='button']::-moz-focus-inner,
298
+ [type='reset']::-moz-focus-inner,
299
+ [type='submit']::-moz-focus-inner {
300
+ border-style: none;
301
+ padding: 0;
302
+ }
303
+
304
+ button:-moz-focusring,
305
+ [type='button']:-moz-focusring,
306
+ [type='reset']:-moz-focusring,
307
+ [type='submit']:-moz-focusring {
308
+ outline: 1px dotted ButtonText;
309
+ }
310
+
311
+ fieldset {
312
+ padding: 0.35em 0.75em 0.625em;
313
+ }
314
+
315
+ legend {
316
+ box-sizing: border-box;
317
+ color: inherit;
318
+ display: table;
319
+ max-width: 100%;
320
+ padding: 0;
321
+ white-space: normal;
322
+ }
323
+
324
+ progress {
325
+ vertical-align: baseline;
326
+ }
327
+
328
+ textarea {
329
+ overflow: auto;
330
+ }
331
+
332
+ [type='checkbox'],
333
+ [type='radio'] {
334
+ box-sizing: border-box;
335
+ padding: 0;
336
+ }
337
+
338
+ [type='number']::-webkit-inner-spin-button,
339
+ [type='number']::-webkit-outer-spin-button {
340
+ height: auto;
341
+ }
342
+
343
+ [type='search'] {
344
+ -webkit-appearance: textfield;
345
+ outline-offset: -2px;
346
+ }
347
+
348
+ [type='search']::-webkit-search-decoration {
349
+ -webkit-appearance: none;
350
+ }
351
+
352
+ ::-webkit-file-upload-button {
353
+ -webkit-appearance: button;
354
+ font: inherit;
355
+ }
356
+
357
+ details {
358
+ display: block;
359
+ }
360
+
361
+ summary {
362
+ display: list-item;
363
+ }
364
+
365
+ template {
366
+ display: none;
367
+ }
368
+
369
+ [hidden] {
370
+ display: none;
371
+ }
372
+ `, k = i`
373
+ * {
374
+ &,
375
+ &::before,
376
+ &::after {
377
+ box-sizing: border-box;
378
+ }
379
+ }
380
+ `;
381
+ function v() {
382
+ return i`
383
+ body,
384
+ button,
385
+ input,
386
+ select,
387
+ textarea {
388
+ /* stylelint-disable-next-line */
389
+ font-family: texts;
390
+ -webkit-font-smoothing: antialiased;
391
+ line-height: html;
392
+ letter-spacing: html;
393
+ }
394
+ `;
395
+ }
396
+ const z = p(
397
+ ({ useReset: e }) => i`
398
+ ${x};
399
+ ${y()};
400
+ ${v()};
401
+ ${e ? w : k};
402
+
403
+ html {
404
+ color: neutral-60;
405
+ }
406
+
407
+ ::selection {
408
+ ${m("selection")};
409
+ }
410
+
411
+ /* for firefox */
412
+ &[type='search'] {
413
+ appearance: none;
414
+ }
415
+
416
+ /* to remove x on macos */
417
+ input[type='search']::-webkit-search-decoration,
418
+ input[type='search']::-webkit-search-cancel-button,
419
+ input[type='search']::-webkit-search-results-button,
420
+ input[type='search']::-webkit-search-results-decoration {
421
+ appearance: none;
422
+ }
423
+
424
+ /* Fix to toast notification when useReset prop is add to WUI provider */
425
+ .Toaster__message-wrapper {
426
+ min-height: 'auto';
427
+ }
428
+ `
429
+ ), u = "data-wui-hidefocusrings", $ = p(
430
+ () => i`
431
+ [${u}] *:focus {
432
+ outline: none;
433
+ }
434
+ `
435
+ ), F = ({
436
+ children: e,
437
+ reactRootId: o
438
+ }) => {
439
+ const [n, t] = b(!1);
440
+ return d(() => {
441
+ const r = n ? "keydown" : "mousemove", s = () => t((c) => !c);
442
+ window.addEventListener(r, s);
443
+ const l = document.getElementById(o);
444
+ return l && (n ? l.setAttribute(u, "true") : l.removeAttribute(u)), () => {
445
+ window.removeEventListener(r, s);
446
+ };
447
+ }, [n, o]), /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement($, null), e);
448
+ }, E = ({
449
+ children: e,
450
+ hasGlobalStyle: o = !0,
451
+ reactRootId: n = "root",
452
+ shouldHideFocusRingOnClick: t = !0,
453
+ theme: r,
454
+ useReset: s
455
+ }) => /* @__PURE__ */ a.createElement(f, { theme: r }, /* @__PURE__ */ a.createElement(a.Fragment, null, o && /* @__PURE__ */ a.createElement(z, { useReset: s }), t ? /* @__PURE__ */ a.createElement(F, { reactRootId: n }, e) : e));
456
+ E.displayName = "WuiProvider";
457
+ export {
458
+ E as WuiProvider
459
+ };
package/package.json CHANGED
@@ -1,31 +1,27 @@
1
1
  {
2
2
  "name": "welcome-ui",
3
- "version": "0.32.2",
4
- "description": "Customizable design system with react • styled-components • styled-system and reakit.",
5
- "main": "dist/welcome-ui.cjs.js",
6
- "module": "dist/welcome-ui.es.js",
3
+ "version": "1.0.0-beta.2",
4
+ "description": "Customizable design system with react • styled-components • styled-system and ariakit.",
5
+ "files": [
6
+ "dist"
7
+ ],
8
+ "main": "./dist/index.js",
9
+ "module": "./dist/index.mjs",
10
+ "types": "./dist/types/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/types/index.d.ts",
14
+ "import": "./dist/index.mjs",
15
+ "require": "./dist/index.js"
16
+ },
17
+ "./*": {
18
+ "import": "./dist/components/*.mjs",
19
+ "require": "./dist/components/*.js"
20
+ }
21
+ },
7
22
  "scripts": {
8
- "start": "yarn docz:dev",
9
- "icons:optimize": "svgo --folder=src/components/Icon/assets --pretty --indent=2 --multipass --quiet",
10
- "icons:collect": "node helpers/icons.js && eslint src/components/Icon/icons.js --fix",
11
- "exports:check": "node helpers/exports.js",
12
- "pre-build": "yarn exports:check && yarn icons:optimize && yarn icons:collect",
13
- "build": "rm -rf dist && rollup --config",
14
- "release:build": "yarn pre-build && yarn build && standard-version && conventional-github-releaser --preset angular",
15
- "release:publish": "git push --follow-tags origin master && npm publish",
16
- "release": "yarn release:build && npm run release:publish && yarn docz:build && yarn docz:deploy --domain welcome-ui.com",
17
- "lint": "yarn lint:mdx & yarn lint:js && yarn lint:css",
18
- "lint:js": "eslint src --max-warnings 0",
19
- "lint:css": "stylelint 'src/**/styles.js'",
20
- "lint:mdx": "prettier --parser mdx --check 'src/**/*.mdx'",
21
- "test": "jest src",
22
- "test:watch": "jest src --watch",
23
- "docz:dev": "yarn docz:clean && docz dev",
24
- "docz:build": "yarn docz:clean && docz build",
25
- "docz:deploy": "surge --project ./docs",
26
- "docz:clean": "rm -rf .docz && rm -rf docs && gatsby clean",
27
- "clean": "yarn docz:clean && yarn start",
28
- "phoenix": "rm -rf node_modules && yarn cache clean && yarn"
23
+ "start": "vite build --watch",
24
+ "build": "vite build"
29
25
  },
30
26
  "repository": {
31
27
  "type": "git",
@@ -34,13 +30,12 @@
34
30
  "keywords": [
35
31
  "design-system",
36
32
  "react",
37
- "reakit",
33
+ "ariakit",
38
34
  "styled-components",
39
35
  "styled-system",
40
36
  "ui-library",
41
37
  "ui",
42
38
  "ux",
43
- "jungle",
44
39
  "welcome",
45
40
  "WTTJ"
46
41
  ],
@@ -49,109 +44,27 @@
49
44
  "bugs": {
50
45
  "url": "https://github.com/WTTJ/welcome-ui/issues"
51
46
  },
52
- "homepage": "https://github.com/WTTJ/welcome-ui#readme",
53
- "devDependencies": {
54
- "@babel/cli": "=7.4.3",
55
- "@babel/core": "=7.4.3",
56
- "@babel/plugin-proposal-class-properties": "=7.4.0",
57
- "@babel/plugin-transform-modules-commonjs": "=7.4.0",
58
- "@babel/plugin-transform-runtime": "^7.4.4",
59
- "@babel/preset-env": "=7.4.3",
60
- "@babel/preset-react": "=7.0.0",
61
- "@commitlint/cli": "^8.0.0",
62
- "@commitlint/config-conventional": "^8.0.0",
63
- "@emotion/core": "^10.0.9",
64
- "@testing-library/dom": "=6.7.0",
65
- "@testing-library/react": "^8.0.1",
66
- "@testing-library/user-event": "=7.0.1",
67
- "babel-eslint": "=10.0.3",
68
- "babel-jest": "=24.7.1",
69
- "babel-plugin-annotate-pure-calls": "^0.4.0",
70
- "babel-plugin-styled-components": "=1.10.6",
71
- "babel-plugin-transform-react-remove-prop-types": "=0.4.24",
72
- "conventional-github-releaser": "^3.1.3",
73
- "css-loader": "=2.1.1",
74
- "docz": "=2.2.0-alpha.8",
75
- "eslint": "=6.5.1",
76
- "eslint-config-prettier": "=6.4.0",
77
- "eslint-config-react-app": "=5.0.2",
78
- "eslint-plugin-flowtype": "=4.3.0",
79
- "eslint-plugin-import": "=2.18.2",
80
- "eslint-plugin-jsx-a11y": "=6.2.3",
81
- "eslint-plugin-prettier": "=3.1.1",
82
- "eslint-plugin-react": "=7.16.0",
83
- "eslint-plugin-react-hooks": "=2.1.2",
84
- "eslint-plugin-sort-destructure-keys": "=1.3.3",
85
- "final-form": "=4.13.1",
86
- "gatsby": "^2.15.34",
87
- "gatsby-plugin-eslint": "=2.0.8",
88
- "gatsby-plugin-google-analytics": "^2.1.31",
89
- "gatsby-plugin-react-helmet": "^3.1.13",
90
- "gatsby-plugin-styled-components": "=3.1.13",
91
- "gatsby-theme-docz": "=2.2.0-alpha.8",
92
- "husky": "=1.3.1",
93
- "jest": "=24.7.1",
94
- "jest-dom": "^3.5.0",
95
- "jest-styled-components": "=6.3.3",
96
- "prettier": "=1.18.2",
97
- "react": "^16.10.2",
98
- "react-dom": "^16.10.2",
99
- "react-final-form": "=6.0.1",
100
- "react-helmet": "^5.2.1",
101
- "react-live": "^2.2.1",
102
- "react-router-dom": "=5.1.2",
103
- "rollup": "=1.12.4",
104
- "rollup-plugin-babel": "=4.3.2",
105
- "rollup-plugin-node-resolve": "^5.0.1",
106
- "rollup-plugin-postcss": "=2.0.3",
107
- "rollup-plugin-size-snapshot": "^0.9.0",
108
- "standard-version": "^6.0.1",
109
- "style-loader": "=0.23.1",
110
- "stylelint": "=12.0.0",
111
- "stylelint-config-recommended": "=3.0.0",
112
- "stylelint-config-styled-components": "=0.1.1",
113
- "stylelint-processor-styled-components": "=1.9.0",
114
- "surge": "=0.21.3",
115
- "svgo": "=1.2.2",
116
- "wttj-config-front": "=1.0.1"
117
- },
118
47
  "dependencies": {
119
- "@babel/runtime": "^7.4.5",
120
- "@xstyled/styled-components": "^1.8.3",
121
- "@xstyled/system": "^1.8.2",
122
- "downshift": "=3.2.10",
123
- "emoji-mart": "=2.11.1",
124
- "lodash.capitalize": "=4.2.1",
125
- "lodash.difference": "=4.5.0",
126
- "lodash.differenceby": "=4.8.0",
127
- "lodash.get": "^4.4.2",
128
- "lodash.isequal": "=4.5.0",
129
- "lodash.kebabcase": "=4.1.1",
130
- "lodash.merge": "^4.6.1",
131
- "lodash.range": "=3.2.0",
132
- "lodash.uniqby": "=4.7.0",
133
- "match-sorter": "=3.1.1",
134
- "mime": "=2.4.4",
135
- "polished": "^3.4.1",
136
- "prop-types": "^15.7.2",
137
- "react-datepicker": "^2.9.6",
138
- "react-dropzone": "^10.1.8",
139
- "react-flatten-children": "^1.0.0",
140
- "react-simplemde-editor": "=4.0.2",
141
- "reakit": "^1.0.0-beta.7",
142
- "styled-components": "^4.3.2"
48
+ "@ariakit/react": "0.4.15"
49
+ },
50
+ "devDependencies": {
51
+ "@types/react": "^18.3.12",
52
+ "@xstyled/styled-components": "^3.7.3",
53
+ "react": "^18.0.0",
54
+ "rollup-preserve-directives": "^1.1.3",
55
+ "styled-components": "^5.3.9",
56
+ "typescript": "^5.6.3",
57
+ "vite-plugin-dts": "^4.3.0",
58
+ "vite": "^5.4.10",
59
+ "wttj-config": "^3.0.1"
143
60
  },
144
61
  "peerDependencies": {
145
- "react": "^16.8.0",
146
- "react-dom": "^16.8.0"
62
+ "@xstyled/styled-components": "^3.7.3",
63
+ "react": "^18.0.0",
64
+ "styled-components": "^5.3.9"
147
65
  },
148
66
  "resolutions": {
149
- "docz/**/webpack": "4.31.0"
67
+ "loader-utils": "2.0.3"
150
68
  },
151
- "husky": {
152
- "hooks": {
153
- "pre-push": "yarn exports:check && yarn lint && yarn icons:optimize && yarn icons:collect && yarn test",
154
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
155
- }
156
- }
69
+ "homepage": "https://welcome-ui.com"
157
70
  }