@web-portfolio/icons-sanity 3.0.2 → 3.0.3

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.
Files changed (2) hide show
  1. package/dist/index.js +12 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5194,22 +5194,22 @@ const metadata = {
5194
5194
  }
5195
5195
  }, PreviewFrame = styled(Card).withConfig({
5196
5196
  displayName: "PreviewFrame",
5197
- componentId: "sc-nnhm10-0"
5197
+ componentId: "sc-0esdoi-0"
5198
5198
  })`flex-shrink:0;width:${({ theme }) => rem(28 + theme.sanity.space[3] * 2)};height:${({ theme }) => rem(28 + theme.sanity.space[3] * 2)};`, ResultsScroller = styled(Box).withConfig({
5199
5199
  displayName: "ResultsScroller",
5200
- componentId: "sc-nnhm10-1"
5200
+ componentId: "sc-0esdoi-1"
5201
5201
  })`max-height:${rem(400)};overflow-y:auto;overscroll-behavior:contain;`, IconTile = styled(Card).withConfig({
5202
5202
  displayName: "IconTile",
5203
- componentId: "sc-nnhm10-2"
5203
+ componentId: "sc-0esdoi-2"
5204
5204
  })`&&[data-as='button']{cursor:pointer;border:1px solid var(--card-border-color);min-width:0;overflow:hidden;}`, GlyphRow = styled(Flex).withConfig({
5205
5205
  displayName: "GlyphRow",
5206
- componentId: "sc-nnhm10-3"
5207
- })`height:${({ theme }) => rem(theme.sanity.space[5])};`, LabelRow = styled(Box).withConfig({
5206
+ componentId: "sc-0esdoi-3"
5207
+ })`height:${rem(37)};`, LabelRow = styled(Box).withConfig({
5208
5208
  displayName: "LabelRow",
5209
- componentId: "sc-nnhm10-4"
5209
+ componentId: "sc-0esdoi-4"
5210
5210
  })`min-height:${rem(20)};`, CategorySelectBox = styled(Box).withConfig({
5211
5211
  displayName: "CategorySelectBox",
5212
- componentId: "sc-nnhm10-5"
5212
+ componentId: "sc-0esdoi-5"
5213
5213
  })`width:${rem(180)};`;
5214
5214
  function matchesQuery(name, entry, query) {
5215
5215
  if (!query.trim()) return !0;
@@ -5242,7 +5242,7 @@ function formatCategoryLabel(category) {
5242
5242
  return CATEGORY_LABEL_OVERRIDES[category] ? CATEGORY_LABEL_OVERRIDES[category] : category.split(/[-_]/).filter(Boolean).map((word) => word[0].toUpperCase() + word.slice(1)).join(" ");
5243
5243
  }
5244
5244
  function IconPickerInput(props) {
5245
- let { value, onChange, readOnly, elementProps } = props, [open, setOpen] = useState(!1), [query, setQuery] = useState(""), [category, setCategory] = useState(""), [visibleCount, setVisibleCount] = useState(96), names = useMemo(() => Object.keys(metadata).sort(), []), categories = useMemo(() => {
5245
+ let { value, onChange, readOnly, elementProps } = props, [open, setOpen] = useState(!1), [query, setQuery] = useState(""), [category, setCategory] = useState(""), [visibleCount, setVisibleCount] = useState(48), names = useMemo(() => Object.keys(metadata).sort(), []), categories = useMemo(() => {
5246
5246
  let found = /* @__PURE__ */ new Set();
5247
5247
  for (let name of names) {
5248
5248
  let entry = metadata[name];
@@ -5261,7 +5261,7 @@ function IconPickerInput(props) {
5261
5261
  category
5262
5262
  ]);
5263
5263
  useEffect(() => {
5264
- setVisibleCount(96);
5264
+ setVisibleCount(48);
5265
5265
  }, [query, category]);
5266
5266
  let visible = filtered.slice(0, visibleCount), remaining = filtered.length - visible.length, selectedEntry = value ? metadata[value] : void 0, hasUnknownValue = !!(value && !selectedEntry), closeDialog = useCallback(() => {
5267
5267
  setOpen(!1), setQuery(""), setCategory("");
@@ -5476,7 +5476,7 @@ function IconPickerInput(props) {
5476
5476
  justify: "center",
5477
5477
  children: /* @__PURE__ */ jsx(Icon, {
5478
5478
  name,
5479
- size: 24
5479
+ size: 29
5480
5480
  })
5481
5481
  }), /* @__PURE__ */ jsx(LabelRow, { children: /* @__PURE__ */ jsx(Text, {
5482
5482
  size: 0,
@@ -5492,8 +5492,8 @@ function IconPickerInput(props) {
5492
5492
  }), remaining > 0 && /* @__PURE__ */ jsx(Button, {
5493
5493
  mode: "ghost",
5494
5494
  width: "fill",
5495
- text: `Show ${Math.min(remaining, 96)} more`,
5496
- onClick: () => setVisibleCount((count) => count + 96)
5495
+ text: `Show ${Math.min(remaining, 48)} more`,
5496
+ onClick: () => setVisibleCount((count) => count + 48)
5497
5497
  })]
5498
5498
  }) })]
5499
5499
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@web-portfolio/icons-sanity",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "Sanity Studio icon picker input, backed by the same bundled registry as @web-portfolio/icons.",
5
5
  "license": "MIT",
6
6
  "keywords": [