@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.js
CHANGED
|
@@ -1370,7 +1370,7 @@ var __template$1 = (cooked, raw) => __freeze$1(__defProp$1(cooked, "raw", {
|
|
|
1370
1370
|
var _a$1, _b$1, _c;
|
|
1371
1371
|
const ColorListWrap = styled__default.default(ui.Flex)(_a$1 || (_a$1 = __template$1(["\n gap: 0.25em;\n"])));
|
|
1372
1372
|
const ColorBoxContainer = styled__default.default.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"])));
|
|
1373
|
-
const ColorBox$1 = styled__default.default.div(_c || (_c = __template$1(["\n content: '';\n position: absolute;\n inset: 0;\n z-index: 1;\n"])));
|
|
1373
|
+
const ColorBox$1 = styled__default.default.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"])));
|
|
1374
1374
|
const validateColors = colors => colors.reduce((cls, c) => {
|
|
1375
1375
|
const color = c.hex ? tinycolor(c.hex) : tinycolor(c);
|
|
1376
1376
|
if (color.isValid()) {
|
|
@@ -1520,7 +1520,7 @@ const ColorPickerInner = props => {
|
|
|
1520
1520
|
size: 1,
|
|
1521
1521
|
children: [/* @__PURE__ */jsxRuntime.jsx("strong", {
|
|
1522
1522
|
children: "HSL: "
|
|
1523
|
-
}), " ", Math.round((_a2 = hsl == null ? void 0 : hsl.h) != null ? _a2 : 0), " ", Math.round((_b2 = hsl == null ? void 0 : hsl.s) != null ? _b2 : 0), "%
|
|
1523
|
+
}), " ", 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), "%"]
|
|
1524
1524
|
})]
|
|
1525
1525
|
})]
|
|
1526
1526
|
})
|