widenarrow-ui 0.1.2 → 0.1.4

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/.babelrc CHANGED
@@ -1,11 +1,18 @@
1
1
  {
2
- "presets": ["@babel/react"],
3
- "ignore": ["**/__snapshots__", "**/*.d.ts", "**/*.test.*"],
4
- "plugins": [
5
- "@babel/plugin-transform-typescript",
6
- "babel-plugin-typescript-to-proptypes",
7
- "@babel/plugin-proposal-export-default-from",
8
- "@babel/proposal-class-properties",
9
- "@babel/proposal-object-rest-spread"
2
+ "presets": [
3
+ [
4
+ "@babel/env",
5
+ {
6
+ "targets": {
7
+ "edge": "17",
8
+ "firefox": "60",
9
+ "chrome": "67",
10
+ "safari": "11.1"
11
+ },
12
+ "useBuiltIns": "usage",
13
+ "corejs": "3.6.5"
14
+ }
15
+ ],
16
+ "@babel/preset-react"
10
17
  ]
11
18
  }
@@ -2,9 +2,10 @@ import { forwardRef, ReactNode } from 'react';
2
2
  import classNames from 'classnames/bind';
3
3
  import { is } from 'ramda';
4
4
 
5
- import { MarginInterface, PaddingInterface, FlexStylingInterface } from 'types/styling';
5
+ import { MarginInterface, PaddingInterface, FlexStylingInterface } from '../../types/styling';
6
6
 
7
7
  import styles from './Box.module.scss';
8
+ // import styles from 'components/Box/Box.module.scss';
8
9
 
9
10
  const s = classNames.bind(styles);
10
11
 
@@ -0,0 +1,3 @@
1
+ import Box from './Box/Box'; // eslint-ignore-line
2
+
3
+ export default { Box, Card };
package/package.json CHANGED
@@ -1,16 +1,11 @@
1
1
  {
2
2
  "name": "widenarrow-ui",
3
- "version": "0.1.2",
4
- "main": "dist/js/index.js",
5
- "module": "dist/esm/index.js",
6
- "types": "dist/js/index.d.ts",
3
+ "version": "0.1.4",
7
4
  "private": false,
8
- "publishConfig": {
9
- "access": "public",
10
- "tag": "prerelease"
11
- },
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.js",
12
7
  "dependencies": {
13
- "@babel/core": "^7.22.20",
8
+ "@babel/polyfill": "^7.12.1",
14
9
  "@testing-library/jest-dom": "5.17.0",
15
10
  "@testing-library/react": "13.4.0",
16
11
  "@testing-library/user-event": "13.5.0",
@@ -29,14 +24,7 @@
29
24
  "web-vitals": "2.1.4"
30
25
  },
31
26
  "scripts": {
32
- "build:lib": "npm run build:babel && npm run build:types && node ./scripts/copyTS.js",
33
- "build:babel": "concurrently \"npm run build:babel:esm && npm run build:babel:umd\" \"npm run build:babel:cjs\"",
34
- "build:babel:cjs": "BABEL_ENV=cjs babel --source-maps --extensions \".js,.ts,.tsx\" src --out-dir dist/js --presets=@babel/env",
35
- "build:babel:esm": "BABEL_ENV=esm babel --source-maps --extensions \".js,.ts,.tsx\" src --out-dir dist/esm",
36
- "build:babel:umd": "BABEL_ENV=umd babel --source-maps --extensions \".js\" dist/esm --out-dir dist/umd --plugins=transform-es2015-modules-umd",
37
- "build:types": "tsc -p tsconfig.gen-dts.json",
38
- "clean": "rimraf dist",
39
- "develop": "npm run build:types && npm run build:babel:esm --skip-initial-build --watch --verbose"
27
+ "build": "rm -rf dist && NODE_ENV=production babel src/lib --out-dir dist --copy-files"
40
28
  },
41
29
  "eslintConfig": {
42
30
  "extends": [
@@ -58,12 +46,7 @@
58
46
  },
59
47
  "devDependencies": {
60
48
  "@babel/cli": "^7.22.15",
61
- "@babel/plugin-proposal-export-default-from": "^7.22.17",
62
- "babel-plugin-transform-es2015-modules-umd": "^6.24.1",
63
- "babel-plugin-typescript-to-proptypes": "^2.1.0",
64
- "babel-preset-env": "^1.7.0",
65
- "babel-preset-react": "^6.24.1",
66
- "babel-preset-stage-2": "^6.24.1",
67
- "concurrently": "^8.2.1"
49
+ "@babel/core": "^7.22.20",
50
+ "@babel/preset-env": "^7.22.20"
68
51
  }
69
52
  }
@@ -2,9 +2,10 @@ import { forwardRef, ReactNode } from 'react';
2
2
  import classNames from 'classnames/bind';
3
3
  import { is } from 'ramda';
4
4
 
5
- import { MarginInterface, PaddingInterface, FlexStylingInterface } from 'types/styling';
5
+ import { MarginInterface, PaddingInterface, FlexStylingInterface } from '../../types/styling';
6
6
 
7
7
  import styles from './Box.module.scss';
8
+ // import styles from 'components/Box/Box.module.scss';
8
9
 
9
10
  const s = classNames.bind(styles);
10
11
 
@@ -0,0 +1,4 @@
1
+ import Box from './Box/Box'; // eslint-ignore-line
2
+ import Card from './Card/Card'; // eslint-ignore-line
3
+
4
+ export default { Box, Card };
@@ -3,7 +3,6 @@
3
3
  @import 'colors';
4
4
  @import 'mixins';
5
5
  @import 'libraryOverrides';
6
- // @import 'print';
7
6
 
8
7
  /**
9
8
  This sole purpose of this rule and its font size is to set a base for our rem values, which in turn ONLY should be used
@@ -14,11 +13,6 @@ html {
14
13
  font-size: 15px;
15
14
  }
16
15
 
17
- /**
18
- |--------------------------------------------------
19
- | <HTML> TAGS
20
- |--------------------------------------------------
21
- */
22
16
  *,
23
17
  *::after,
24
18
  *::before {
@@ -210,43 +204,6 @@ pre code {
210
204
  border-radius: 0;
211
205
  }
212
206
 
213
- @media screen and (max-width: 767px) {
214
- input {
215
- font-size: 16px !important;
216
- }
217
- }
218
-
219
- /**
220
- |--------------------------------------------------
221
- | Scrollwheel (only chrome)
222
- |--------------------------------------------------
223
- */
224
- /* width */
225
- // ::-webkit-scrollbar {
226
- // width: 8px;
227
- // }
228
-
229
- // /* Track */
230
- // ::-webkit-scrollbar-track {
231
- // background: $grey-1;
232
- // }
233
-
234
- // /* Handle */
235
- // ::-webkit-scrollbar-thumb {
236
- // border-radius: 4px;
237
- // background: $grey-4;
238
- // }
239
-
240
- // /* Handle on hover */
241
- // ::-webkit-scrollbar-thumb:hover {
242
- // background: $grey-5;
243
- // }
244
-
245
- /**
246
- |--------------------------------------------------
247
- | <App /> TAGS
248
- |--------------------------------------------------
249
- */
250
207
  body {
251
208
  overflow-x: hidden;
252
209
  background: $application-background;
@@ -277,23 +234,4 @@ body {
277
234
  margin: 0 auto;
278
235
  position: relative;
279
236
  }
280
-
281
- // E.g report page where we dont want a white strip
282
- &.pagemode-full {
283
- .app {
284
- max-width: 100%;
285
- }
286
-
287
- &:after {
288
- height: 0;
289
- }
290
- }
291
- }
292
-
293
- .u-semiBold {
294
- font-weight: 600;
295
- }
296
-
297
- .u-error {
298
- color: $red;
299
237
  }
package/tsconfig.json CHANGED
@@ -1,17 +1,19 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "declaration": true,
4
+ "esModuleInterop": true,
4
5
  "emitDeclarationOnly": true,
5
6
  "outDir": "dist/js",
6
- "jsx": "react",
7
+ "jsx": "react-jsx",
7
8
  "lib": ["es2017", "dom"],
8
9
  "module": "commonjs",
9
10
  "moduleResolution": "node",
10
11
  "skipLibCheck": true,
11
12
  "strict": true,
12
13
  "strictNullChecks": false,
13
- "target": "es5"
14
+ "target": "es5",
15
+ "typeRoots": ["./node_modules/@types", "./types"]
14
16
  },
15
- "include": ["./src/*", "./src/**/*"],
17
+ "include": ["./src/*", "./src/**/*", "./types/declaration.d.ts"],
16
18
  "exclude": ["./src/**/**.test.tsx", "./src/**/**.test.ts", "./src/**/**.stories.ts", "./src/**/**.stories.tsx", "./src/**/examples/**"]
17
19
  }
@@ -1 +1,2 @@
1
- declare module "*.module.scss";
1
+ declare module '*.module.scss';
2
+ declare module '*.scss';
package/copyTS.js DELETED
@@ -1,15 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-var-requires */
2
- const path = require('path');
3
- const glob = require('glob');
4
- const fse = require('fs-extra');
5
- /* eslint-enable @typescript-eslint/no-var-requires */
6
- const srcDir = path.join('./src');
7
- const distDir = path.join('./dist/js');
8
- const files = glob.sync('**/*.d.ts', {
9
- cwd: srcDir
10
- });
11
- files.forEach((file) => {
12
- const from = path.join(srcDir, file);
13
- const to = path.join(distDir, file);
14
- fse.copySync(from, to);
15
- });
package/dist/index.tsx DELETED
@@ -1,3 +0,0 @@
1
- import Box from 'components/Box/Box';
2
-
3
- export default { Box }; // eslint-disable-line
@@ -1,3 +0,0 @@
1
- import Box from 'components/Box/Box';
2
-
3
- export default { Box }; // eslint-disable-line
File without changes