@web-portfolio/icons-sanity 1.0.0 → 1.0.1

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.cjs CHANGED
@@ -7138,6 +7138,7 @@ var ResultsScroller = (0, import_styled_components.styled)(import_ui.Box)`
7138
7138
  the dialog once the list bottoms out. */
7139
7139
  overscroll-behavior: contain;
7140
7140
  `;
7141
+ var LABEL_ROW_HEIGHT = 20;
7141
7142
  var IconTile = (0, import_styled_components.styled)(import_ui.Card)`
7142
7143
  &&[data-as='button'] {
7143
7144
  cursor: pointer;
@@ -7147,11 +7148,29 @@ var IconTile = (0, import_styled_components.styled)(import_ui.Card)`
7147
7148
  /* Without this a long label ("Google Cloud Platform") widens its grid
7148
7149
  column and knocks the whole row out of alignment. */
7149
7150
  min-width: 0;
7151
+ /* Every tile in a row must be the same height for the grid's implicit
7152
+ row track to size correctly — an overflowing label would otherwise
7153
+ stretch its own row and visually collide with the row underneath. */
7154
+ overflow: hidden;
7150
7155
  }
7151
7156
  `;
7152
7157
  var GlyphRow = (0, import_styled_components.styled)(import_ui.Flex)`
7153
7158
  height: ${({ theme }) => (0, import_ui.rem)(theme.sanity.space[5])};
7154
7159
  `;
7160
+ var LabelRow = (0, import_styled_components.styled)(import_ui.Box)`
7161
+ height: ${(0, import_ui.rem)(LABEL_ROW_HEIGHT)};
7162
+ overflow: hidden;
7163
+
7164
+ /* Belt-and-braces alongside Text's \`textOverflow="ellipsis"\` prop: force
7165
+ single-line truncation here too so a long label can never wrap and grow
7166
+ the tile past its fixed height. */
7167
+ > * {
7168
+ display: block;
7169
+ white-space: nowrap;
7170
+ overflow: hidden;
7171
+ text-overflow: ellipsis;
7172
+ }
7173
+ `;
7155
7174
  var CategorySelectBox = (0, import_styled_components.styled)(import_ui.Box)`
7156
7175
  /* Wide enough for the longest category label without letting the select
7157
7176
  crowd out the search field. */
@@ -7379,7 +7398,7 @@ function IconPickerInput(props) {
7379
7398
  onClick: () => handleSelect(name),
7380
7399
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ui.Stack, { space: 2, children: [
7381
7400
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlyphRow, { align: "center", justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconGlyph, { name, size: GRID_ICON_SIZE }) }),
7382
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Text, { size: 0, align: "center", muted: true, textOverflow: "ellipsis", children: entry.label })
7401
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LabelRow, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Text, { size: 0, align: "center", muted: true, textOverflow: "ellipsis", children: entry.label }) })
7383
7402
  ] })
7384
7403
  }
7385
7404
  )
package/dist/index.js CHANGED
@@ -7123,6 +7123,7 @@ var ResultsScroller = styled(Box)`
7123
7123
  the dialog once the list bottoms out. */
7124
7124
  overscroll-behavior: contain;
7125
7125
  `;
7126
+ var LABEL_ROW_HEIGHT = 20;
7126
7127
  var IconTile = styled(Card)`
7127
7128
  &&[data-as='button'] {
7128
7129
  cursor: pointer;
@@ -7132,11 +7133,29 @@ var IconTile = styled(Card)`
7132
7133
  /* Without this a long label ("Google Cloud Platform") widens its grid
7133
7134
  column and knocks the whole row out of alignment. */
7134
7135
  min-width: 0;
7136
+ /* Every tile in a row must be the same height for the grid's implicit
7137
+ row track to size correctly — an overflowing label would otherwise
7138
+ stretch its own row and visually collide with the row underneath. */
7139
+ overflow: hidden;
7135
7140
  }
7136
7141
  `;
7137
7142
  var GlyphRow = styled(Flex)`
7138
7143
  height: ${({ theme }) => rem(theme.sanity.space[5])};
7139
7144
  `;
7145
+ var LabelRow = styled(Box)`
7146
+ height: ${rem(LABEL_ROW_HEIGHT)};
7147
+ overflow: hidden;
7148
+
7149
+ /* Belt-and-braces alongside Text's \`textOverflow="ellipsis"\` prop: force
7150
+ single-line truncation here too so a long label can never wrap and grow
7151
+ the tile past its fixed height. */
7152
+ > * {
7153
+ display: block;
7154
+ white-space: nowrap;
7155
+ overflow: hidden;
7156
+ text-overflow: ellipsis;
7157
+ }
7158
+ `;
7140
7159
  var CategorySelectBox = styled(Box)`
7141
7160
  /* Wide enough for the longest category label without letting the select
7142
7161
  crowd out the search field. */
@@ -7364,7 +7383,7 @@ function IconPickerInput(props) {
7364
7383
  onClick: () => handleSelect(name),
7365
7384
  children: /* @__PURE__ */ jsxs(Stack, { space: 2, children: [
7366
7385
  /* @__PURE__ */ jsx(GlyphRow, { align: "center", justify: "center", children: /* @__PURE__ */ jsx(IconGlyph, { name, size: GRID_ICON_SIZE }) }),
7367
- /* @__PURE__ */ jsx(Text, { size: 0, align: "center", muted: true, textOverflow: "ellipsis", children: entry.label })
7386
+ /* @__PURE__ */ jsx(LabelRow, { children: /* @__PURE__ */ jsx(Text, { size: 0, align: "center", muted: true, textOverflow: "ellipsis", children: entry.label }) })
7368
7387
  ] })
7369
7388
  }
7370
7389
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@web-portfolio/icons-sanity",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
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": [
@@ -57,7 +57,7 @@
57
57
  "styled-components": "^6.1.13",
58
58
  "tsup": "^8.3.5",
59
59
  "typescript": "^5.7.0",
60
- "vitest": "^2.1.0"
60
+ "vitest": "^3.2.7"
61
61
  },
62
62
  "publishConfig": {
63
63
  "access": "public"