@flytedan/flytebot-design-system 0.55.3 → 0.56.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/index.d.cts CHANGED
@@ -1269,6 +1269,13 @@ interface FilterFieldMultiSelect extends FilterFieldBase {
1269
1269
  * empty token list, and tokens are de-duplicated before the call. */
1270
1270
  resolve?: (tokens: string[]) => Promise<FilterResolveResult>;
1271
1271
  placeholder?: string;
1272
+ /** What the panel says when the field has nothing to pick at all: its option list
1273
+ * (`options`, or what `loadOptions` returns for the empty query) is empty and nothing
1274
+ * has been typed, e.g. "No contact lists yet." It replaces the generic "No matches",
1275
+ * which would wrongly suggest a search came up short. The field stays in the Filter
1276
+ * menu and the text is announced through the panel's status region. Once the user types
1277
+ * and nothing matches, "No matches" still shows. Omit it for the generic text. */
1278
+ emptyText?: string;
1272
1279
  /** Placeholder for the paste textarea, when `resolve` is given. Falls back to `placeholder`. */
1273
1280
  pastePlaceholder?: string;
1274
1281
  /** Restrict which operators this field's toggle offers, e.g. `["in"]` for a dimension
package/dist/index.d.ts CHANGED
@@ -1269,6 +1269,13 @@ interface FilterFieldMultiSelect extends FilterFieldBase {
1269
1269
  * empty token list, and tokens are de-duplicated before the call. */
1270
1270
  resolve?: (tokens: string[]) => Promise<FilterResolveResult>;
1271
1271
  placeholder?: string;
1272
+ /** What the panel says when the field has nothing to pick at all: its option list
1273
+ * (`options`, or what `loadOptions` returns for the empty query) is empty and nothing
1274
+ * has been typed, e.g. "No contact lists yet." It replaces the generic "No matches",
1275
+ * which would wrongly suggest a search came up short. The field stays in the Filter
1276
+ * menu and the text is announced through the panel's status region. Once the user types
1277
+ * and nothing matches, "No matches" still shows. Omit it for the generic text. */
1278
+ emptyText?: string;
1272
1279
  /** Placeholder for the paste textarea, when `resolve` is given. Falls back to `placeholder`. */
1273
1280
  pastePlaceholder?: string;
1274
1281
  /** Restrict which operators this field's toggle offers, e.g. `["in"]` for a dimension
package/dist/index.js CHANGED
@@ -3913,7 +3913,7 @@ function MultiSelectPanel({
3913
3913
  nav.setActive(0);
3914
3914
  }, [query, options.length]);
3915
3915
  const activeId = hasListbox && options[nav.active] ? listId + "-opt-" + nav.active : void 0;
3916
- const liveMessage = showLoading ? "Loading\u2026" : showError ? "Couldn't load options." : options.length === 0 ? "No matches" : atLimit ? "Limit reached: at most " + field.maxValues + " values" : "";
3916
+ const liveMessage = showLoading ? "Loading\u2026" : showError ? "Couldn't load options." : options.length === 0 ? query === "" && field.emptyText || "No matches" : atLimit ? "Limit reached: at most " + field.maxValues + " values" : "";
3917
3917
  const [pasteText, setPasteText] = React29.useState("");
3918
3918
  const [pasteLoading, setPasteLoading] = React29.useState(false);
3919
3919
  const [unmatchedTokens, setUnmatchedTokens] = React29.useState([]);