@sanity/color-input 3.1.1 → 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/lib/index.esm.js +2 -2
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/package.json +11 -11
- package/src/ColorList.tsx +2 -0
- package/src/ColorPicker.tsx +2 -3
package/lib/index.esm.js
CHANGED
|
@@ -1359,7 +1359,7 @@ var __template$1 = (cooked, raw) => __freeze$1(__defProp$1(cooked, "raw", {
|
|
|
1359
1359
|
var _a$1, _b$1, _c;
|
|
1360
1360
|
const ColorListWrap = styled(Flex)(_a$1 || (_a$1 = __template$1(["\n gap: 0.25em;\n"])));
|
|
1361
1361
|
const ColorBoxContainer = styled.div(_b$1 || (_b$1 = __template$1(["\n width: 2.1em;\n height: 2.1em;\n cursor: pointer;\n position: relative;\n overflow: hidden;\n border-radius: 3px;\n background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADFJREFUOE9jZGBgEGHAD97gk2YcNYBhmIQBgWSAP52AwoAQwJvQRg1gACckQoC2gQgAIF8IscwEtKYAAAAASUVORK5CYII=') left center #fff;\n"])));
|
|
1362
|
-
const ColorBox$1 = styled.div(_c || (_c = __template$1(["\n content: '';\n position: absolute;\n inset: 0;\n z-index: 1;\n"])));
|
|
1362
|
+
const ColorBox$1 = styled.div(_c || (_c = __template$1(["\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px var(--card-shadow-outline-color);\n content: '';\n position: absolute;\n inset: 0;\n z-index: 1;\n"])));
|
|
1363
1363
|
const validateColors = colors => colors.reduce((cls, c) => {
|
|
1364
1364
|
const color = c.hex ? tinycolor(c.hex) : tinycolor(c);
|
|
1365
1365
|
if (color.isValid()) {
|
|
@@ -1509,7 +1509,7 @@ const ColorPickerInner = props => {
|
|
|
1509
1509
|
size: 1,
|
|
1510
1510
|
children: [/* @__PURE__ */jsx("strong", {
|
|
1511
1511
|
children: "HSL: "
|
|
1512
|
-
}), " ", Math.round((_a2 = hsl == null ? void 0 : hsl.h) != null ? _a2 : 0), " ", Math.round((_b2 = hsl == null ? void 0 : hsl.s) != null ? _b2 : 0), "%
|
|
1512
|
+
}), " ", Math.round((_a2 = hsl == null ? void 0 : hsl.h) != null ? _a2 : 0), " ", Math.round(((_b2 = hsl == null ? void 0 : hsl.s) != null ? _b2 : 0) * 100), "% ", Math.round(((_c = hsl == null ? void 0 : hsl.l) != null ? _c : 0) * 100), "%"]
|
|
1513
1513
|
})]
|
|
1514
1514
|
})]
|
|
1515
1515
|
})
|