@uniformdev/design-system 20.54.1-alpha.1 → 20.55.0

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/esm/index.js CHANGED
@@ -11300,6 +11300,7 @@ var LabelsQuickFilter = ({
11300
11300
  };
11301
11301
  const renderGroupItem = (group) => {
11302
11302
  const childItems = filteredItems.filter((item) => item.parent === group.id);
11303
+ const totalChildResults = childItems.length;
11303
11304
  if (childItems.length === 0) {
11304
11305
  return null;
11305
11306
  }
@@ -11349,24 +11350,42 @@ var LabelsQuickFilter = ({
11349
11350
  /* @__PURE__ */ jsx99(Icon, { icon: TbChevronRight2, iconColor: "currentColor", size: "1rem" })
11350
11351
  ] }),
11351
11352
  withoutPortal,
11352
- children: childItems.map((item) => {
11353
- var _a;
11354
- const isChildSelected = selectedIdsSet.has(item.id);
11355
- return /* @__PURE__ */ jsxs65(
11356
- SelectableMenuItem,
11357
- {
11358
- selectStyles: "checkbox-select",
11359
- hideOnClick: false,
11360
- onClick: () => handleToggle(item),
11361
- selected: isChildSelected,
11362
- children: [
11363
- /* @__PURE__ */ jsx99(Swatch, { variant: (_a = item.variant) != null ? _a : "swatch-default", size: "small" }),
11364
- /* @__PURE__ */ jsx99("span", { children: item.name })
11365
- ]
11366
- },
11367
- item.id
11368
- );
11369
- })
11353
+ children: /* @__PURE__ */ jsx99(
11354
+ VerticalRhythm,
11355
+ {
11356
+ gap: "0",
11357
+ css: (
11358
+ // if there are more than 5 child results, add a scrollbar
11359
+ // we do this because the user could potentially have a lot of child results
11360
+ // and this breaks the UI if the menu is too tall
11361
+ totalChildResults > 5 ? [
11362
+ scrollbarStyles,
11363
+ {
11364
+ maxHeight: "320px",
11365
+ overflowY: "auto"
11366
+ }
11367
+ ] : void 0
11368
+ ),
11369
+ children: childItems.map((item) => {
11370
+ var _a;
11371
+ const isChildSelected = selectedIdsSet.has(item.id);
11372
+ return /* @__PURE__ */ jsxs65(
11373
+ SelectableMenuItem,
11374
+ {
11375
+ selectStyles: "checkbox-select",
11376
+ hideOnClick: false,
11377
+ onClick: () => handleToggle(item),
11378
+ selected: isChildSelected,
11379
+ children: [
11380
+ /* @__PURE__ */ jsx99(Swatch, { variant: (_a = item.variant) != null ? _a : "swatch-default", size: "small" }),
11381
+ /* @__PURE__ */ jsx99("span", { children: item.name })
11382
+ ]
11383
+ },
11384
+ item.id
11385
+ );
11386
+ })
11387
+ }
11388
+ )
11370
11389
  },
11371
11390
  group.id
11372
11391
  );
package/dist/index.js CHANGED
@@ -13197,6 +13197,7 @@ var LabelsQuickFilter = ({
13197
13197
  };
13198
13198
  const renderGroupItem = (group) => {
13199
13199
  const childItems = filteredItems.filter((item) => item.parent === group.id);
13200
+ const totalChildResults = childItems.length;
13200
13201
  if (childItems.length === 0) {
13201
13202
  return null;
13202
13203
  }
@@ -13246,24 +13247,42 @@ var LabelsQuickFilter = ({
13246
13247
  /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Icon, { icon: import_TbChevronRight2.TbChevronRight, iconColor: "currentColor", size: "1rem" })
13247
13248
  ] }),
13248
13249
  withoutPortal,
13249
- children: childItems.map((item) => {
13250
- var _a;
13251
- const isChildSelected = selectedIdsSet.has(item.id);
13252
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
13253
- SelectableMenuItem,
13254
- {
13255
- selectStyles: "checkbox-select",
13256
- hideOnClick: false,
13257
- onClick: () => handleToggle(item),
13258
- selected: isChildSelected,
13259
- children: [
13260
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Swatch, { variant: (_a = item.variant) != null ? _a : "swatch-default", size: "small" }),
13261
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: item.name })
13262
- ]
13263
- },
13264
- item.id
13265
- );
13266
- })
13250
+ children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
13251
+ VerticalRhythm,
13252
+ {
13253
+ gap: "0",
13254
+ css: (
13255
+ // if there are more than 5 child results, add a scrollbar
13256
+ // we do this because the user could potentially have a lot of child results
13257
+ // and this breaks the UI if the menu is too tall
13258
+ totalChildResults > 5 ? [
13259
+ scrollbarStyles,
13260
+ {
13261
+ maxHeight: "320px",
13262
+ overflowY: "auto"
13263
+ }
13264
+ ] : void 0
13265
+ ),
13266
+ children: childItems.map((item) => {
13267
+ var _a;
13268
+ const isChildSelected = selectedIdsSet.has(item.id);
13269
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
13270
+ SelectableMenuItem,
13271
+ {
13272
+ selectStyles: "checkbox-select",
13273
+ hideOnClick: false,
13274
+ onClick: () => handleToggle(item),
13275
+ selected: isChildSelected,
13276
+ children: [
13277
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Swatch, { variant: (_a = item.variant) != null ? _a : "swatch-default", size: "small" }),
13278
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: item.name })
13279
+ ]
13280
+ },
13281
+ item.id
13282
+ );
13283
+ })
13284
+ }
13285
+ )
13267
13286
  },
13268
13287
  group.id
13269
13288
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/design-system",
3
- "version": "20.54.1-alpha.1+028680cba4",
3
+ "version": "20.55.0",
4
4
  "description": "Uniform design system components",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "exports": {
@@ -35,8 +35,8 @@
35
35
  "@storybook/react-vite": "10.1.0",
36
36
  "@types/react": "19.2.2",
37
37
  "@types/react-dom": "19.2.2",
38
- "@uniformdev/canvas": "^20.54.1-alpha.1+028680cba4",
39
- "@uniformdev/richtext": "^20.54.1-alpha.1+028680cba4",
38
+ "@uniformdev/canvas": "^20.55.0",
39
+ "@uniformdev/richtext": "^20.55.0",
40
40
  "autoprefixer": "10.4.21",
41
41
  "hygen": "6.2.11",
42
42
  "jsdom": "20.0.3",
@@ -88,5 +88,5 @@
88
88
  "publishConfig": {
89
89
  "access": "public"
90
90
  },
91
- "gitHead": "028680cba478a17da934cdb2ddebb777e2553455"
91
+ "gitHead": "ef21541bd262e454318a30372f90d22a06183b82"
92
92
  }