@sanity/assist 6.1.6 → 6.1.7
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/dist/index.js +6 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2942,12 +2942,9 @@ function IconInput(props) {
|
|
|
2942
2942
|
onChange
|
|
2943
2943
|
} = props, id = useId();
|
|
2944
2944
|
let t0;
|
|
2945
|
-
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = Object.
|
|
2945
|
+
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = Object.keys(icons).filter(isIconSymbol), $[0] = t0) : t0 = $[0];
|
|
2946
2946
|
let t1;
|
|
2947
|
-
$[1] !== onChange ? (t1 = t0.map((
|
|
2948
|
-
const [key, icon] = t22;
|
|
2949
|
-
return /* @__PURE__ */ jsx(IconItem, { iconKey: key, icon, onChange }, key);
|
|
2950
|
-
}), $[1] = onChange, $[2] = t1) : t1 = $[2];
|
|
2947
|
+
$[1] !== onChange ? (t1 = t0.map((key) => /* @__PURE__ */ jsx(IconItem, { iconKey: key, onChange }, key)), $[1] = onChange, $[2] = t1) : t1 = $[2];
|
|
2951
2948
|
const items = t1;
|
|
2952
2949
|
let t2;
|
|
2953
2950
|
$[3] !== value ? (t2 = getIcon(value), $[3] = value, $[4] = t2) : t2 = $[4];
|
|
@@ -2968,8 +2965,7 @@ function IconInput(props) {
|
|
|
2968
2965
|
return $[11] !== id || $[12] !== t3 || $[13] !== t5 ? (t7 = /* @__PURE__ */ jsx(MenuButton, { button: t3, id, menu: t5, popover: t6 }), $[11] = id, $[12] = t3, $[13] = t5, $[14] = t7) : t7 = $[14], t7;
|
|
2969
2966
|
}
|
|
2970
2967
|
function IconItem(t0) {
|
|
2971
|
-
const $ = c(
|
|
2972
|
-
icon,
|
|
2968
|
+
const $ = c(9), {
|
|
2973
2969
|
iconKey: key,
|
|
2974
2970
|
onChange
|
|
2975
2971
|
} = t0;
|
|
@@ -2977,7 +2973,9 @@ function IconItem(t0) {
|
|
|
2977
2973
|
$[0] !== key || $[1] !== onChange ? (t1 = () => onChange(set(key)), $[0] = key, $[1] = onChange, $[2] = t1) : t1 = $[2];
|
|
2978
2974
|
const onClick = t1;
|
|
2979
2975
|
let t2;
|
|
2980
|
-
|
|
2976
|
+
$[3] !== key ? (t2 = /* @__PURE__ */ jsx(Icon, { symbol: key }), $[3] = key, $[4] = t2) : t2 = $[4];
|
|
2977
|
+
let t3;
|
|
2978
|
+
return $[5] !== key || $[6] !== onClick || $[7] !== t2 ? (t3 = /* @__PURE__ */ jsx(MenuItem, { icon: t2, title: key, text: key, onClick }), $[5] = key, $[6] = onClick, $[7] = t2, $[8] = t3) : t3 = $[8], t3;
|
|
2981
2979
|
}
|
|
2982
2980
|
function getIcon(iconName) {
|
|
2983
2981
|
return iconName && isIconSymbol(iconName) ? iconName : "sparkles";
|