@flytedan/flytebot-design-system 0.51.1 → 0.51.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.
package/dist/index.d.cts CHANGED
@@ -1214,7 +1214,8 @@ interface FilterFieldBase {
1214
1214
  /** Human label shown in the "add filter" list and on the field's chip. */
1215
1215
  label: string;
1216
1216
  /** Phosphor icon name (e.g. "megaphone") drawn before the chip's text, so a chip reads as
1217
- * its kind at a glance. Decorative: the chip's name is its text alone. */
1217
+ * its kind at a glance. Decorative, but it names the kind for a sighted reader, so a chip with
1218
+ * an icon paints only its value; its accessible name and tooltip stay the full "Label: value". */
1218
1219
  icon?: string;
1219
1220
  }
1220
1221
  interface FilterFieldText extends FilterFieldBase {
package/dist/index.d.ts CHANGED
@@ -1214,7 +1214,8 @@ interface FilterFieldBase {
1214
1214
  /** Human label shown in the "add filter" list and on the field's chip. */
1215
1215
  label: string;
1216
1216
  /** Phosphor icon name (e.g. "megaphone") drawn before the chip's text, so a chip reads as
1217
- * its kind at a glance. Decorative: the chip's name is its text alone. */
1217
+ * its kind at a glance. Decorative, but it names the kind for a sighted reader, so a chip with
1218
+ * an icon paints only its value; its accessible name and tooltip stay the full "Label: value". */
1218
1219
  icon?: string;
1219
1220
  }
1220
1221
  interface FilterFieldText extends FilterFieldBase {
package/dist/index.js CHANGED
@@ -4470,8 +4470,10 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
4470
4470
  removeField(field);
4471
4471
  closeEditing();
4472
4472
  };
4473
- const chipText = field.label + (set ? ": " + chipLabel(field, value) : "");
4474
- const chip = /* @__PURE__ */ jsx49(Tag, { icon: field.icon, selected: true, onClick: toggleOrClose, onRemove: remove, title: chipText, "aria-label": chipText, children: /* @__PURE__ */ jsx49(MiddleEllipsis, { text: chipText }) });
4473
+ const valueText = set ? chipLabel(field, value) : "";
4474
+ const chipText = set ? field.label + ": " + valueText : field.label;
4475
+ const paintedText = field.icon && set ? valueText : chipText;
4476
+ const chip = /* @__PURE__ */ jsx49(Tag, { icon: field.icon, selected: true, onClick: toggleOrClose, onRemove: remove, title: chipText, "aria-label": chipText, children: /* @__PURE__ */ jsx49(MiddleEllipsis, { text: paintedText }) });
4475
4477
  if (field.type === "text") {
4476
4478
  return /* @__PURE__ */ jsx49("span", { className: "fd-filterbar-chip", children: chip }, field.key);
4477
4479
  }