@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/color-input",
3
- "version": "3.1.0",
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.2.0",
65
- "@commitlint/config-conventional": "^17.2.0",
66
- "@sanity/pkg-utils": "^2.1.0",
67
- "@sanity/plugin-kit": "^3.1.1",
68
- "@sanity/semantic-release-preset": "^4.0.0",
69
- "@types/react": "^18.0.26",
70
- "@types/react-color": "^2.17.6",
71
- "@types/styled-components": "^5.1.25",
72
- "@types/tinycolor2": "^1.4.3",
73
- "@typescript-eslint/eslint-plugin": "^5.48.0",
74
- "@typescript-eslint/parser": "^5.48.0",
75
- "eslint": "^8.31.0",
76
- "eslint-config-prettier": "^8.6.0",
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.31.11",
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-all": "^4.1.5",
84
- "prettier": "^2.8.1",
85
- "prettier-plugin-packagejson": "^2.3.0",
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": "^3.0.2",
90
- "sanity": "^3.1.4",
91
- "semantic-release": "^21.0.0",
92
- "styled-components": "^5.3.6",
93
- "typescript": "^4.9.4"
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.2"
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
@@ -19,6 +19,8 @@ const ColorBoxContainer = styled.div`
19
19
  `
20
20
 
21
21
  const ColorBox = styled.div`
22
+ border-radius: inherit;
23
+ box-shadow: inset 0 0 0 1px var(--card-shadow-outline-color);
22
24
  content: '';
23
25
  position: absolute;
24
26
  inset: 0;
@@ -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)} {Math.round(hsl?.s ?? 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>