@sanity/color-input 3.1.0 → 3.1.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.
- package/LICENSE +1 -1
- package/lib/index.d.ts +2 -3
- package/lib/index.esm.js +19 -9
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +19 -9
- package/lib/index.js.map +1 -1
- package/package.json +26 -26
- package/src/ColorList.tsx +2 -0
- package/src/ColorPicker.tsx +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/color-input",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "Color input",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -56,46 +56,46 @@
|
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@sanity/icons": "^2.0.0",
|
|
58
58
|
"@sanity/incompatible-plugin": "^1.0.4",
|
|
59
|
-
"@sanity/ui": "^1.0.0",
|
|
60
59
|
"lodash": "^4.17.21",
|
|
61
60
|
"react-color": "^2.19.3"
|
|
62
61
|
},
|
|
63
62
|
"devDependencies": {
|
|
64
|
-
"@commitlint/cli": "^17.
|
|
65
|
-
"@commitlint/config-conventional": "^17.
|
|
66
|
-
"@sanity/pkg-utils": "^2.
|
|
67
|
-
"@sanity/plugin-kit": "^3.1.
|
|
68
|
-
"@sanity/semantic-release-preset": "^4.
|
|
69
|
-
"@types/react": "^18.
|
|
70
|
-
"@types/react-color": "^2.17.
|
|
71
|
-
"@types/styled-components": "^5.1.
|
|
72
|
-
"@types/tinycolor2": "^1.4.
|
|
73
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
74
|
-
"@typescript-eslint/parser": "^5.
|
|
75
|
-
"eslint": "^8.
|
|
76
|
-
"eslint-config-prettier": "^8.
|
|
63
|
+
"@commitlint/cli": "^17.8.1",
|
|
64
|
+
"@commitlint/config-conventional": "^17.8.1",
|
|
65
|
+
"@sanity/pkg-utils": "^2.4.10",
|
|
66
|
+
"@sanity/plugin-kit": "^3.1.10",
|
|
67
|
+
"@sanity/semantic-release-preset": "^4.1.7",
|
|
68
|
+
"@types/react": "^18.2.65",
|
|
69
|
+
"@types/react-color": "^2.17.11",
|
|
70
|
+
"@types/styled-components": "^5.1.34",
|
|
71
|
+
"@types/tinycolor2": "^1.4.6",
|
|
72
|
+
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
73
|
+
"@typescript-eslint/parser": "^5.62.0",
|
|
74
|
+
"eslint": "^8.57.0",
|
|
75
|
+
"eslint-config-prettier": "^8.10.0",
|
|
77
76
|
"eslint-config-sanity": "^6.0.0",
|
|
78
77
|
"eslint-plugin-prettier": "^4.2.1",
|
|
79
|
-
"eslint-plugin-react": "^7.
|
|
78
|
+
"eslint-plugin-react": "^7.34.0",
|
|
80
79
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
81
80
|
"husky": "^8.0.1",
|
|
82
81
|
"lint-staged": "^13.0.3",
|
|
83
|
-
"npm-run-
|
|
84
|
-
"prettier": "^2.8.
|
|
85
|
-
"prettier-plugin-packagejson": "^2.
|
|
82
|
+
"npm-run-all2": "^5.0.0",
|
|
83
|
+
"prettier": "^2.8.8",
|
|
84
|
+
"prettier-plugin-packagejson": "^2.4.12",
|
|
86
85
|
"react": "^18.2.0",
|
|
87
86
|
"react-dom": "^18.2.0",
|
|
88
87
|
"react-is": "^18.2.0",
|
|
89
|
-
"rimraf": "^
|
|
90
|
-
"sanity": "^3.
|
|
91
|
-
"semantic-release": "^21.
|
|
92
|
-
"styled-components": "^5.
|
|
93
|
-
"typescript": "^4.9.
|
|
88
|
+
"rimraf": "^5.0.0",
|
|
89
|
+
"sanity": "^3.32.0",
|
|
90
|
+
"semantic-release": "^21.1.2",
|
|
91
|
+
"styled-components": "^5.0 || ^6.0",
|
|
92
|
+
"typescript": "^4.9.5"
|
|
94
93
|
},
|
|
95
94
|
"peerDependencies": {
|
|
95
|
+
"@sanity/ui": "^1.0 || ^2.0",
|
|
96
96
|
"react": "^18",
|
|
97
|
-
"sanity": "^3",
|
|
98
|
-
"styled-components": "^5.
|
|
97
|
+
"sanity": "^3.23.0",
|
|
98
|
+
"styled-components": "^5.0 || ^6.0"
|
|
99
99
|
},
|
|
100
100
|
"engines": {
|
|
101
101
|
"node": ">=14"
|
package/src/ColorList.tsx
CHANGED
package/src/ColorPicker.tsx
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
import {Alpha, Checkboard, Hue, Saturation} from 'react-color/lib/components/common'
|
|
3
2
|
import {Color, CustomPicker} from 'react-color'
|
|
4
3
|
import {Box, Button, Card, Flex, Inline, Stack, Text} from '@sanity/ui'
|
|
@@ -111,8 +110,8 @@ const ColorPickerInner = (props: ColorPickerProps) => {
|
|
|
111
110
|
{rgb?.r} {rgb?.g} {rgb?.b}
|
|
112
111
|
</Text>
|
|
113
112
|
<Text size={1}>
|
|
114
|
-
<strong>HSL: </strong> {Math.round(hsl?.h ?? 0)}
|
|
115
|
-
{Math.round(hsl?.l ?? 0)}
|
|
113
|
+
<strong>HSL: </strong> {Math.round(hsl?.h ?? 0)}{' '}
|
|
114
|
+
{Math.round((hsl?.s ?? 0) * 100)}% {Math.round((hsl?.l ?? 0) * 100)}%
|
|
116
115
|
</Text>
|
|
117
116
|
</Inline>
|
|
118
117
|
</Stack>
|