visits-style 1.2.1 → 1.4.0

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 (78) hide show
  1. package/README.md +14 -7
  2. package/dist/components/Accordion/index.d.ts +12 -13
  3. package/dist/components/AppBar/index.d.ts +19 -20
  4. package/dist/components/Card/index.d.ts +17 -18
  5. package/dist/components/Modal/index.d.ts +33 -30
  6. package/dist/components/Popover/index.d.ts +38 -40
  7. package/dist/components/Portal/index.d.ts +8 -8
  8. package/dist/components/Spinner/index.d.ts +12 -12
  9. package/dist/components/Toast/ToastItem.d.ts +2 -0
  10. package/dist/components/Toast/index.d.ts +2 -39
  11. package/dist/components/Toast/types.d.ts +38 -0
  12. package/dist/components/Tooltip/index.d.ts +30 -27
  13. package/dist/components/index.d.ts +11 -10
  14. package/dist/elements/Box/index.d.ts +10 -10
  15. package/dist/elements/Button/ButtonGroup.d.ts +2 -2
  16. package/dist/elements/Button/TextButton.d.ts +18 -18
  17. package/dist/elements/Button/index.d.ts +16 -16
  18. package/dist/elements/Content/index.d.ts +2 -2
  19. package/dist/elements/Divider/index.d.ts +2 -2
  20. package/dist/elements/Grid/Col.d.ts +11 -11
  21. package/dist/elements/Grid/Container.d.ts +6 -6
  22. package/dist/elements/Grid/Row.d.ts +3 -3
  23. package/dist/elements/Icons/Approved.d.ts +2 -2
  24. package/dist/elements/Icons/ArrowDown.d.ts +2 -2
  25. package/dist/elements/Icons/ChevronLeftRound.d.ts +2 -2
  26. package/dist/elements/Icons/ChevronRightRound.d.ts +2 -2
  27. package/dist/elements/Icons/Close.d.ts +2 -2
  28. package/dist/elements/Icons/FileRound.d.ts +2 -2
  29. package/dist/elements/Icons/Pencil.d.ts +2 -2
  30. package/dist/elements/Icons/PencilSimple.d.ts +2 -2
  31. package/dist/elements/Icons/Plus.d.ts +2 -2
  32. package/dist/elements/Icons/Refresh.d.ts +2 -2
  33. package/dist/elements/Icons/User.d.ts +2 -2
  34. package/dist/elements/Icons/index.d.ts +11 -11
  35. package/dist/elements/Placeholder/index.d.ts +2 -2
  36. package/dist/elements/Progress/index.d.ts +18 -19
  37. package/dist/elements/Table/index.d.ts +11 -11
  38. package/dist/elements/Tag/index.d.ts +15 -16
  39. package/dist/elements/index.d.ts +14 -15
  40. package/dist/forms/Checkbox/index.d.ts +8 -8
  41. package/dist/forms/Field/index.d.ts +7 -8
  42. package/dist/forms/HelpMessage.d.ts +7 -7
  43. package/dist/forms/Radio/index.d.ts +8 -8
  44. package/dist/forms/Select/index.d.ts +27 -27
  45. package/dist/forms/Switch/index.d.ts +21 -21
  46. package/dist/forms/TextInput/index.d.ts +22 -23
  47. package/dist/forms/Textarea/index.d.ts +11 -11
  48. package/dist/forms/index.d.ts +7 -7
  49. package/dist/hooks/useForceUpdate.d.ts +1 -1
  50. package/dist/hooks/useIsomorphicLayoutEffect.d.ts +3 -3
  51. package/dist/hooks/useScrollFix.d.ts +1 -1
  52. package/dist/index.cjs.js +2389 -0
  53. package/dist/index.d.ts +7 -7
  54. package/dist/index.es.js +2389 -0
  55. package/dist/styles/normalize.d.ts +3 -3
  56. package/dist/theme.d.ts +3 -3
  57. package/dist/types.d.ts +36 -36
  58. package/dist/utils/arrow.d.ts +1 -1
  59. package/dist/utils/boxShadow.d.ts +1 -1
  60. package/dist/utils/disabledColor.d.ts +2 -2
  61. package/dist/utils/findColorInvert.d.ts +2 -2
  62. package/dist/utils/hambuger.d.ts +1 -1
  63. package/dist/utils/index.d.ts +6 -6
  64. package/dist/utils/isClient.d.ts +2 -2
  65. package/dist/utils/media.d.ts +10 -10
  66. package/dist/utils/setAlign.d.ts +3 -3
  67. package/dist/utils/setSize.d.ts +4 -4
  68. package/dist/utils/wrapEvent.d.ts +2 -2
  69. package/package.json +20 -63
  70. package/dist/hooks/usePopper.d.ts +0 -12
  71. package/dist/index.js +0 -8
  72. package/dist/utils/__test__/findColorInvert.test.d.ts +0 -1
  73. package/dist/visits-style.cjs.development.js +0 -2646
  74. package/dist/visits-style.cjs.development.js.map +0 -1
  75. package/dist/visits-style.cjs.production.min.js +0 -2
  76. package/dist/visits-style.cjs.production.min.js.map +0 -1
  77. package/dist/visits-style.esm.js +0 -2587
  78. package/dist/visits-style.esm.js.map +0 -1
@@ -1,3 +1,3 @@
1
- /*! based on normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
2
- declare const normalized: any;
3
- export default normalized;
1
+ /*! based on normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
2
+ declare const normalized: any;
3
+ export default normalized;
package/dist/theme.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { ThemeType } from './types';
2
- declare const theme: ThemeType;
3
- export default theme;
1
+ import { ThemeType } from './types';
2
+ declare const theme: ThemeType;
3
+ export default theme;
package/dist/types.d.ts CHANGED
@@ -1,36 +1,36 @@
1
- export declare type ColorType = 'light' | 'primary' | 'info' | 'link' | 'success' | 'warning' | 'danger' | 'dark' | 'text' | string;
2
- export declare type SizeType = 'small' | 'medium' | 'large';
3
- export declare type ColSizeType = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
4
- export declare type AlignType = 'left' | 'right' | 'center';
5
- export interface ThemeType {
6
- fontSize: string;
7
- fontFamily: string;
8
- gutter: number;
9
- smallGutter: number;
10
- media: {
11
- mobile: string;
12
- tablet: string;
13
- desktop: string;
14
- fullhd: string;
15
- };
16
- radius: string;
17
- primary: string;
18
- link: string;
19
- info: string;
20
- success: string;
21
- warning: string;
22
- danger: string;
23
- dark: string;
24
- black: string;
25
- white: string;
26
- text: string;
27
- textDark: string;
28
- textLight: string;
29
- textStrong: string;
30
- background: string;
31
- border: string;
32
- borderHover: string;
33
- borderActive: string;
34
- responsive: boolean;
35
- [key: string]: string | number | boolean | any;
36
- }
1
+ export type ColorType = 'light' | 'primary' | 'info' | 'link' | 'success' | 'warning' | 'danger' | 'dark' | 'text' | string;
2
+ export type SizeType = 'small' | 'medium' | 'large';
3
+ export type ColSizeType = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
4
+ export type AlignType = 'left' | 'right' | 'center';
5
+ export interface ThemeType {
6
+ fontSize: string;
7
+ fontFamily: string;
8
+ gutter: number;
9
+ smallGutter: number;
10
+ media: {
11
+ mobile: string;
12
+ tablet: string;
13
+ desktop: string;
14
+ fullhd: string;
15
+ };
16
+ radius: string;
17
+ primary: string;
18
+ link: string;
19
+ info: string;
20
+ success: string;
21
+ warning: string;
22
+ danger: string;
23
+ dark: string;
24
+ black: string;
25
+ white: string;
26
+ text: string;
27
+ textDark: string;
28
+ textLight: string;
29
+ textStrong: string;
30
+ background: string;
31
+ border: string;
32
+ borderHover: string;
33
+ borderActive: string;
34
+ responsive: boolean;
35
+ [key: string]: string | number | boolean | any;
36
+ }
@@ -1 +1 @@
1
- export default function Arrow(color: string): import("styled-components").FlattenSimpleInterpolation;
1
+ export default function Arrow(color: string): import("styled-components").FlattenSimpleInterpolation;
@@ -1 +1 @@
1
- export default function boxShadow(size: string, color: string, amount?: number): import("styled-components").FlattenSimpleInterpolation;
1
+ export default function boxShadow(size: string, color: string, amount?: number): import("styled-components").FlattenSimpleInterpolation;
@@ -1,2 +1,2 @@
1
- import { ThemeType } from '../types';
2
- export default function disabledColor(theme: ThemeType): import("styled-components").FlattenSimpleInterpolation;
1
+ import { ThemeType } from '../types';
2
+ export default function disabledColor(theme: ThemeType): import("styled-components").FlattenSimpleInterpolation;
@@ -1,2 +1,2 @@
1
- import { ThemeType } from '../types';
2
- export default function findColorInvert({ black, white }: ThemeType, color: string): string;
1
+ import { ThemeType } from '../types';
2
+ export default function findColorInvert({ black, white }: ThemeType, color: string): string;
@@ -1 +1 @@
1
- export default function hamburger(size: string): import("styled-components").FlattenSimpleInterpolation;
1
+ export default function hamburger(size: string): import("styled-components").FlattenSimpleInterpolation;
@@ -1,6 +1,6 @@
1
- export { default as findColorInvert } from './findColorInvert';
2
- export { default as hambuger } from './hambuger';
3
- export { default as boxShadow } from './boxShadow';
4
- export { default as arrow } from './arrow';
5
- export { default as setSize } from './setSize';
6
- export * from './media';
1
+ export { default as findColorInvert } from './findColorInvert';
2
+ export { default as hambuger } from './hambuger';
3
+ export { default as boxShadow } from './boxShadow';
4
+ export { default as arrow } from './arrow';
5
+ export { default as setSize } from './setSize';
6
+ export * from './media';
@@ -1,2 +1,2 @@
1
- declare const _default: boolean;
2
- export default _default;
1
+ declare const _default: boolean;
2
+ export default _default;
@@ -1,10 +1,10 @@
1
- import { ThemeType } from '../types';
2
- interface Props {
3
- theme: ThemeType;
4
- }
5
- export declare function mediaMobile({ theme }: Props): string;
6
- export declare function mediaTablet({ theme }: Props): string;
7
- export declare function mediaDesktop({ theme }: Props): string;
8
- export declare function mediaFullHD({ theme }: Props): string;
9
- export declare function mediaUntilFullHD({ theme }: Props): string;
10
- export {};
1
+ import { ThemeType } from '../types';
2
+ interface Props {
3
+ theme: ThemeType;
4
+ }
5
+ export declare function mediaMobile({ theme }: Props): string;
6
+ export declare function mediaTablet({ theme }: Props): string;
7
+ export declare function mediaDesktop({ theme }: Props): string;
8
+ export declare function mediaFullHD({ theme }: Props): string;
9
+ export declare function mediaUntilFullHD({ theme }: Props): string;
10
+ export {};
@@ -1,3 +1,3 @@
1
- export default function setAlign({ align }: {
2
- align?: 'left' | 'right' | 'center';
3
- }): "center" | "flex-start" | "flex-end" | "space-evenly";
1
+ export default function setAlign({ align }: {
2
+ align?: 'left' | 'right' | 'center';
3
+ }): "center" | "flex-start" | "flex-end" | "space-evenly";
@@ -1,4 +1,4 @@
1
- import { SizeType } from '../types';
2
- declare type SizePropsNameType = 'font-size' | 'height';
3
- export default function setSize(name: SizePropsNameType, size?: SizeType): string;
4
- export {};
1
+ import { SizeType } from '../types';
2
+ type SizePropsNameType = 'font-size' | 'height';
3
+ export default function setSize(name: SizePropsNameType, size?: SizeType): string;
4
+ export {};
@@ -1,2 +1,2 @@
1
- import React from 'react';
2
- export default function wrapEvent(child: React.ReactElement, handlerName: string, ourHandler: React.EventHandler<any>): (event: any) => void;
1
+ import React from 'react';
2
+ export default function wrapEvent(child: React.ReactElement, handlerName: string, ourHandler: React.EventHandler<any>): (event: any) => void;
package/package.json CHANGED
@@ -2,75 +2,32 @@
2
2
  "name": "visits-style",
3
3
  "repository": "https://github.com/visits-works/visits-style",
4
4
  "homepage": "https://github.com/visits-works/visits-style",
5
- "version": "1.2.1",
6
- "main": "dist/index.js",
7
- "module": "dist/visits-style.esm.js",
8
- "jsnext:main": "dist/visits-style.esm.js",
9
- "typings": "dist/index.d.ts",
5
+ "version": "1.4.0",
6
+ "type": "module",
7
+ "main": "./dist/index.cjs.js",
8
+ "module": "./dist/index.es.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/index.es.js",
13
+ "require": "./dist/index.cjs.js"
14
+ }
15
+ },
10
16
  "license": "Apache-2.0",
11
17
  "sideEffects": false,
12
18
  "files": [
13
19
  "dist"
14
20
  ],
21
+ "engines": {
22
+ "node": ">=16"
23
+ },
15
24
  "peerDependencies": {
16
- "react": ">=16.8.6",
17
- "react-dom": ">=16.8.6",
18
- "styled-components": ">=4.2.0"
25
+ "react": ">=18.2.0",
26
+ "react-dom": ">=18.2.0",
27
+ "styled-components": ">=5.0.0"
19
28
  },
20
29
  "dependencies": {
21
- "polished": "^4.1.3",
22
- "@popperjs/core": "^2.9.2",
23
- "react-transition-group": "^4.4.2"
24
- },
25
- "scripts": {
26
- "build": "NODE_ENV=production tsdx build",
27
- "lint": "tsdx lint src",
28
- "test": "tsdx test",
29
- "test:ci": "CI=true tsdx test --coverage"
30
- },
31
- "devDependencies": {
32
- "@testing-library/jest-dom": "^5.14.1",
33
- "@testing-library/react": "^11.2.7",
34
- "@types/jest": "^24.0.17",
35
- "@types/react": "^17.0.11",
36
- "@types/react-dom": "^17.0.8",
37
- "@types/react-transition-group": "^4.4.1",
38
- "@types/styled-components": "^5.1.10",
39
- "@typescript-eslint/eslint-plugin": "^4.28.0",
40
- "@typescript-eslint/parser": "^4.28.0",
41
- "babel-jest": "^27.0.5",
42
- "babel-plugin-polished": "^1.1.0",
43
- "babel-plugin-styled-components": "^1.12.0",
44
- "babel-preset-react-app": "^10.0.0",
45
- "eslint-config-airbnb": "18.2.1",
46
- "eslint-config-airbnb-base": "14.2.1",
47
- "eslint-config-react-app": "^6.0.0",
48
- "eslint-plugin-import": "^2.23.4",
49
- "eslint-plugin-react": "^7.24.0",
50
- "faker": "^4.1.0",
51
- "tsdx": "^0.14.1",
52
- "typescript": "^4.3.4"
53
- },
54
- "jest": {
55
- "testURL": "http://localhost",
56
- "testMatch": [
57
- "<rootDir>/**/*.test.{ts,tsx}"
58
- ],
59
- "transform": {
60
- "^.+\\.(js|ts|tsx)?$": "babel-jest"
61
- },
62
- "setupFilesAfterEnv": [
63
- "<rootDir>/src/setupTest.ts"
64
- ],
65
- "rootDir": ".",
66
- "collectCoverageFrom": [
67
- "src/**/**.{ts,tsx}",
68
- "!src/**/**.story.tsx",
69
- "!src/styles/*.ts",
70
- "!src/index.ts",
71
- "!src/elements/index.ts",
72
- "!src/forms/index.ts",
73
- "!src/components/index.ts"
74
- ]
30
+ "@floating-ui/react": "^0.24.3",
31
+ "polished": "^4.2.2"
75
32
  }
76
- }
33
+ }
@@ -1,12 +0,0 @@
1
- import { MutableRefObject } from 'react';
2
- import { VirtualElement, Placement, PositioningStrategy } from '@popperjs/core';
3
- interface Options {
4
- placement?: Placement;
5
- strategy?: PositioningStrategy;
6
- offset?: {
7
- x: number;
8
- y: number;
9
- };
10
- }
11
- export default function usePopper(referenceElement: Element | MutableRefObject<Element | null> | VirtualElement | null, popperElement: HTMLElement | MutableRefObject<HTMLElement | null> | null, options?: Partial<Options>): (() => void)[];
12
- export {};
package/dist/index.js DELETED
@@ -1,8 +0,0 @@
1
-
2
- 'use strict'
3
-
4
- if (process.env.NODE_ENV === 'production') {
5
- module.exports = require('./visits-style.cjs.production.min.js')
6
- } else {
7
- module.exports = require('./visits-style.cjs.development.js')
8
- }
@@ -1 +0,0 @@
1
- export {};