myoperator-mcp 0.2.365 → 0.2.367

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 +22 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7601,6 +7601,7 @@ export { Panel, panelVariants };
7601
7601
  "phone-input": `import * as React from "react";
7602
7602
  import { cva, type VariantProps } from "class-variance-authority";
7603
7603
  import { ChevronDown } from "lucide-react";
7604
+ import ReactCountryFlag from "react-country-flag";
7604
7605
 
7605
7606
  import { cn } from "@/lib/utils";
7606
7607
 
@@ -7629,7 +7630,7 @@ const phoneInputContainerVariants = cva(
7629
7630
  * @example
7630
7631
  * \`\`\`tsx
7631
7632
  * <PhoneInput placeholder="Enter phone number" />
7632
- * <PhoneInput countryFlag="\u{1F1FA}\u{1F1F8}" countryCode="+1" />
7633
+ * <PhoneInput countryIso="US" countryCode="+1" />
7633
7634
  * <PhoneInput phoneMaxNumber={10} />
7634
7635
  * <PhoneInput state="empty" />
7635
7636
  * <PhoneInput validation="Enter a valid phone number" />
@@ -7643,8 +7644,10 @@ export interface PhoneInputProps
7643
7644
  state?: "default" | "empty" | "error";
7644
7645
  /** Validation message displayed below the input. Also applies error styling. */
7645
7646
  validation?: string;
7646
- /** Country flag emoji (e.g., "\u{1F1EE}\u{1F1F3}", "\u{1F1FA}\u{1F1F8}"). Defaults to "\u{1F1EE}\u{1F1F3}" */
7647
- countryFlag?: string;
7647
+ /** ISO 3166-1 alpha-2 country code used to render the SVG flag (e.g., "IN", "US"). Defaults to "IN" */
7648
+ countryIso?: string;
7649
+ /** Custom flag node rendered instead of the SVG flag (e.g., an emoji or custom icon) */
7650
+ countryFlag?: React.ReactNode;
7648
7651
  /** Country dial code (e.g., "+91", "+1"). Defaults to "+91" */
7649
7652
  countryCode?: string;
7650
7653
  /** Whether to show the chevron dropdown indicator. Defaults to true */
@@ -7663,7 +7666,8 @@ const PhoneInput = React.forwardRef(
7663
7666
  className,
7664
7667
  state,
7665
7668
  validation,
7666
- countryFlag = "\u{1F1EE}\u{1F1F3}",
7669
+ countryIso = "IN",
7670
+ countryFlag,
7667
7671
  countryCode = "+91",
7668
7672
  showChevron = true,
7669
7673
  onCountryClick,
@@ -7753,7 +7757,15 @@ const PhoneInput = React.forwardRef(
7753
7757
  onClick={onCountryClick}
7754
7758
  data-testid="phone-input-country"
7755
7759
  >
7756
- <span className="text-base">{countryFlag}</span>
7760
+ {countryFlag ?? (
7761
+ <ReactCountryFlag
7762
+ svg
7763
+ countryCode={countryIso}
7764
+ className="!w-5 !h-[15px] object-cover shrink-0"
7765
+ title={countryIso}
7766
+ aria-label={countryIso}
7767
+ />
7768
+ )}
7757
7769
  <span className="text-base text-semantic-text-secondary">
7758
7770
  {countryCode}
7759
7771
  </span>
@@ -8294,6 +8306,8 @@ export interface SearchFilterProps
8294
8306
  searchPlaceholder?: string;
8295
8307
  /** Search input behavior. Defaults to "numeric" for phone-number filtering. */
8296
8308
  searchMode?: SearchFilterSearchMode;
8309
+ /** Minimum query length before internal option filtering runs. Below it, all options are shown. Defaults to 0. */
8310
+ minSearchLength?: number;
8297
8311
  /** Message shown when filtering returns no options */
8298
8312
  emptyMessage?: string;
8299
8313
  /** Disables the whole filter */
@@ -8321,6 +8335,7 @@ const SearchFilter = React.forwardRef<HTMLDivElement, SearchFilterProps>(
8321
8335
  onSearchChange,
8322
8336
  searchPlaceholder = "Search...",
8323
8337
  searchMode = "numeric",
8338
+ minSearchLength = 0,
8324
8339
  emptyMessage = "No options found",
8325
8340
  disabled = false,
8326
8341
  searchDisabled = false,
@@ -8457,6 +8472,7 @@ const SearchFilter = React.forwardRef<HTMLDivElement, SearchFilterProps>(
8457
8472
  }, [isOpen, refs.floating, setOpen]);
8458
8473
 
8459
8474
  const filteredOptions = React.useMemo(() => {
8475
+ if (normalizedSearchQuery.length < minSearchLength) return options;
8460
8476
  if (!normalizedSearchQuery) return options;
8461
8477
 
8462
8478
  return options.filter((option) =>
@@ -8464,7 +8480,7 @@ const SearchFilter = React.forwardRef<HTMLDivElement, SearchFilterProps>(
8464
8480
  normalizedSearchQuery
8465
8481
  )
8466
8482
  );
8467
- }, [normalizedSearchQuery, options, searchMode]);
8483
+ }, [normalizedSearchQuery, options, searchMode, minSearchLength]);
8468
8484
 
8469
8485
  const selectOption = React.useCallback(
8470
8486
  (option: SearchFilterOption) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-mcp",
3
- "version": "0.2.365",
3
+ "version": "0.2.367",
4
4
  "description": "MCP server for myOperator UI components - enables AI assistants to access component metadata, examples, and design tokens",
5
5
  "type": "module",
6
6
  "bin": "./dist/index.js",