@mastra/playground-ui 72.0.0-alpha.0 → 72.0.0-alpha.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.
Files changed (39) hide show
  1. package/dist/{combobox-Db8NtklU.js → combobox-BCB51kuy.js} +58 -12
  2. package/dist/combobox-BCB51kuy.js.map +1 -0
  3. package/dist/{combobox-Cg-KVjdt.cjs → combobox-CtEvUaJc.cjs} +58 -12
  4. package/dist/combobox-CtEvUaJc.cjs.map +1 -0
  5. package/dist/components/Combobox.cjs.js +1 -1
  6. package/dist/components/Combobox.es.js +1 -1
  7. package/dist/components/DataList.cjs.js +1 -1
  8. package/dist/components/DataList.es.js +1 -1
  9. package/dist/components/PropertyFilter.cjs.js +1 -1
  10. package/dist/components/PropertyFilter.es.js +1 -1
  11. package/dist/domains/agents/agent-combobox.cjs.js +1 -1
  12. package/dist/domains/agents/agent-combobox.es.js +1 -1
  13. package/dist/domains/datasets/components/dataset-combobox.cjs.js +1 -1
  14. package/dist/domains/datasets/components/dataset-combobox.es.js +1 -1
  15. package/dist/domains/datasets/components/dataset-detail/dataset-tags-editor.cjs.js +1 -1
  16. package/dist/domains/datasets/components/dataset-detail/dataset-tags-editor.es.js +1 -1
  17. package/dist/domains/datasets/components/dataset-versions.cjs.js +1 -1
  18. package/dist/domains/datasets/components/dataset-versions.es.js +1 -1
  19. package/dist/domains/datasets/components/experiment-trigger/scorer-selector.cjs.js +1 -1
  20. package/dist/domains/datasets/components/experiment-trigger/scorer-selector.es.js +1 -1
  21. package/dist/domains/experiments/components/experiment-results-tag-picker.cjs.js +1 -1
  22. package/dist/domains/experiments/components/experiment-results-tag-picker.es.js +1 -1
  23. package/dist/domains/prompt-blocks/prompt-block-version-combobox.cjs.js +1 -1
  24. package/dist/domains/prompt-blocks/prompt-block-version-combobox.es.js +1 -1
  25. package/dist/domains/scores/components/span-scoring.cjs.js +1 -1
  26. package/dist/domains/scores/components/span-scoring.es.js +1 -1
  27. package/dist/domains/traces/components/trace-columns-menu.cjs.js +1 -1
  28. package/dist/domains/traces/components/trace-columns-menu.es.js +1 -1
  29. package/dist/domains/workflows/components/workflow-combobox.cjs.js +1 -1
  30. package/dist/domains/workflows/components/workflow-combobox.es.js +1 -1
  31. package/dist/layout/tabbed-container.cjs.js +1 -1
  32. package/dist/layout/tabbed-container.es.js +1 -1
  33. package/dist/{tabbed-container-DiHt3VX3.js → tabbed-container-CRPiA3RI.js} +2 -2
  34. package/dist/{tabbed-container-DiHt3VX3.js.map → tabbed-container-CRPiA3RI.js.map} +1 -1
  35. package/dist/{tabbed-container-DbgPRklc.cjs → tabbed-container-DLntsyso.cjs} +2 -2
  36. package/dist/{tabbed-container-DbgPRklc.cjs.map → tabbed-container-DLntsyso.cjs.map} +1 -1
  37. package/package.json +7 -7
  38. package/dist/combobox-Cg-KVjdt.cjs.map +0 -1
  39. package/dist/combobox-Db8NtklU.js.map +0 -1
@@ -31,9 +31,13 @@ function getComboboxShape({ inFieldContext, multiple, variant, size, iconOnlyVal
31
31
  if (size !== "md") return "trigger";
32
32
  return "chips";
33
33
  }
34
+ /** The value typed text stands for. The custom option and the value match in the filter both read it this way. */
35
+ function typedValue(inputValue) {
36
+ return inputValue.trim();
37
+ }
34
38
  /** A "Use “text”" option for typed text that isn't one of the options yet. */
35
39
  function getCustomOption(options, inputValue) {
36
- const value = inputValue.trim();
40
+ const value = typedValue(inputValue);
37
41
  if (!value) return void 0;
38
42
  if (options.some((option) => option.value === value || optionText(option) === value)) return void 0;
39
43
  return {
@@ -41,10 +45,37 @@ function getCustomOption(options, inputValue) {
41
45
  value
42
46
  };
43
47
  }
44
- /** Matches the label like Base UI's default filter, the text a field shows, and any keywords. */
45
- function useOptionFilter() {
48
+ /**
49
+ * Selected values that no option lists (typed ones, or ones the caller's options no longer include), in the
50
+ * order given. Each shows its bare value, on its chip and in the popup.
51
+ */
52
+ function getUnlistedOptions(options, values) {
53
+ const listedValues = new Set(options.map((option) => option.value));
54
+ return [...new Set(values)].filter((value) => !listedValues.has(value)).map((value) => ({
55
+ label: value,
56
+ value
57
+ }));
58
+ }
59
+ /**
60
+ * The selected values as options: listed ones in `options` order, then the unlisted ones. `onValueChange`
61
+ * reports the values in this order too, with a new pick appended.
62
+ */
63
+ function getSelectedOptions(options, values, unlistedOptions) {
64
+ const selectedValues = new Set(values);
65
+ return [...options.filter((option) => selectedValues.has(option.value)), ...unlistedOptions];
66
+ }
67
+ /** Matches options by value, because Base UI compares by reference and unlisted selections are rebuilt on every render. */
68
+ function isSameOption(item, selected) {
69
+ return item.value === selected.value;
70
+ }
71
+ /**
72
+ * Matches the label like Base UI's default filter, the text a field shows, and any keywords. With
73
+ * `matchValue`, an option whose value is exactly the typed value matches too: `getCustomOption` holds back
74
+ * typed text that is an existing value, so without this, typing a value whose label differs shows nothing.
75
+ */
76
+ function useOptionFilter({ matchValue }) {
46
77
  const { contains } = Combobox.useFilter();
47
- return (option, query) => [
78
+ return (option, query) => matchValue && option.value === typedValue(query) || [
48
79
  option.label,
49
80
  optionText(option),
50
81
  ...option.keywords ?? []
@@ -163,7 +194,7 @@ function MultipleComboboxControl({ shape, controlProps, placeholder, selectedCou
163
194
  }
164
195
  function SingleCombobox({ shape, controlProps, options, value, onValueChange, placeholder = "Select option", searchPlaceholder = "Search", emptyText = "No option found.", className, disabled = false, variant = "default", size = "md", open, onOpenChange, container, align = "start", popupWidth, showChevron = true, iconOnlyValue = false, allowCustomValue = false, onInputValueChange }) {
165
196
  const [inputValue, setInputValue] = React$1.useState("");
166
- const filter = useOptionFilter();
197
+ const filter = useOptionFilter({ matchValue: allowCustomValue });
167
198
  const inField = shape === "field";
168
199
  const selectedOption = options.find((option) => option.value === value);
169
200
  const customOption = allowCustomValue ? getCustomOption(options, inputValue) : void 0;
@@ -211,10 +242,23 @@ function SingleCombobox({ shape, controlProps, options, value, onValueChange, pl
211
242
  })]
212
243
  });
213
244
  }
214
- function MultipleCombobox({ shape, controlProps, options, value = EMPTY_VALUES, onValueChange, clearLabel, placeholder = "Select options", searchPlaceholder = "Search", emptyText = "No option found.", className, disabled = false, variant = "default", size = "md", open, onOpenChange, container, align = "start", popupWidth, showChevron = true, iconOnlyValue = false }) {
215
- const filter = useOptionFilter();
216
- const selectedValues = new Set(value);
217
- const selectedOptions = options.filter((option) => selectedValues.has(option.value));
245
+ /**
246
+ * A multiple select: picks show as chips (or a count on a compact trigger) and stay listed, checked, in the popup.
247
+ * With `allowCustomValue` the typed text can be picked as a new value.
248
+ */
249
+ function MultipleCombobox({ shape, controlProps, options, value = EMPTY_VALUES, onValueChange, clearLabel, placeholder = "Select options", searchPlaceholder = "Search", emptyText = "No option found.", className, disabled = false, variant = "default", size = "md", open, onOpenChange, container, align = "start", popupWidth, showChevron = true, iconOnlyValue = false, allowCustomValue = false, onInputValueChange }) {
250
+ const [inputValue, setInputValue] = React$1.useState("");
251
+ const filter = useOptionFilter({ matchValue: allowCustomValue });
252
+ const unlistedOptions = getUnlistedOptions(options, value);
253
+ const selectedOptions = getSelectedOptions(options, value, unlistedOptions);
254
+ const customOption = allowCustomValue ? getCustomOption([...options, ...unlistedOptions], inputValue) : void 0;
255
+ const extraItems = customOption ? [...unlistedOptions, customOption] : unlistedOptions;
256
+ const items = extraItems.length > 0 ? [...options, ...extraItems] : options;
257
+ /** Keeps the mirrored search text in step with Base UI, which also clears it after each pick. */
258
+ function handleInputValueChange(next) {
259
+ setInputValue(next);
260
+ onInputValueChange?.(next);
261
+ }
218
262
  const footer = clearLabel && selectedOptions.length > 0 ? /* @__PURE__ */ jsx(ComboboxClearFooter, {
219
263
  label: clearLabel,
220
264
  onClear: () => onValueChange?.([])
@@ -222,10 +266,12 @@ function MultipleCombobox({ shape, controlProps, options, value = EMPTY_VALUES,
222
266
  return /* @__PURE__ */ jsxs(ComboboxRoot, {
223
267
  multiple: true,
224
268
  autoHighlight: true,
225
- items: options,
269
+ items,
226
270
  filter,
227
271
  value: selectedOptions,
228
- onValueChange: (items) => onValueChange?.(items.map((item) => item.value)),
272
+ isItemEqualToValue: isSameOption,
273
+ onInputValueChange: handleInputValueChange,
274
+ onValueChange: (picked) => onValueChange?.(picked.map((item) => item.value)),
229
275
  disabled,
230
276
  open,
231
277
  onOpenChange,
@@ -303,4 +349,4 @@ function Combobox$1(props) {
303
349
  }
304
350
  export { Combobox$1 as t };
305
351
 
306
- //# sourceMappingURL=combobox-Db8NtklU.js.map
352
+ //# sourceMappingURL=combobox-BCB51kuy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combobox-BCB51kuy.js","names":["BaseCombobox","_Fragment","React","Combobox"],"sources":["../src/ds/components/Combobox/combobox.tsx"],"sourcesContent":["import { Combobox as BaseCombobox } from '@base-ui/react/combobox';\nimport * as React from 'react';\nimport {\n ComboboxChip,\n ComboboxChips,\n ComboboxChipsInput,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n ComboboxRoot,\n ComboboxSearch,\n ComboboxTrigger,\n ComboboxValue,\n} from './combobox-parts';\nimport { comboboxPopupWidthClass, comboboxStyles } from './combobox-styles';\nimport type { ComboboxPopupWidth, ComboboxVariant } from './combobox-styles';\nimport { Button, isIconButtonSize } from '@/ds/components/Button/Button';\nimport type { ButtonSize } from '@/ds/components/Button/Button';\nimport { keepOwnAccessibleName, useFieldAriaIds } from '@/ds/components/Field/field-control-aria';\nimport { FieldBlock } from '@/ds/components/FormFieldBlocks/block/field-block';\nimport { fieldErrorId } from '@/ds/components/FormFieldBlocks/block/field-error-id';\nimport { IconCrossMedium } from '@/ds/icons/central/IconCrossMedium';\nimport { deprecatedErrorAria } from '@/ds/primitives/form-element';\nimport type { PortalContainer } from '@/ds/primitives/portal-container';\nimport { cn } from '@/lib/utils';\n\nexport type { ComboboxPopupWidth, ComboboxVariant } from './combobox-styles';\n\nexport type ComboboxOption = {\n label: string;\n value: string;\n description?: string;\n displayLabel?: React.ReactNode;\n start?: React.ReactNode;\n end?: React.ReactNode;\n /** Extra terms the search matches besides `label` (aliases, ids, a provider name). Never displayed. */\n keywords?: readonly string[];\n};\n\ntype ComboboxSharedProps = {\n options: ComboboxOption[];\n placeholder?: React.ReactNode;\n /** The search row's placeholder for compact triggers. A field (inside a `Field`) searches in itself and shows `placeholder`. */\n searchPlaceholder?: string;\n emptyText?: string;\n className?: string;\n disabled?: boolean;\n /**\n * `default` inside a `Field` is a form field you type in to search. `ghost` (and the legacy `outline`/`link`),\n * or any variant outside a `Field`, is a compact trigger with the search inside the popup.\n */\n variant?: ComboboxVariant;\n /** Icon sizes (`icon-*`) render a chevron-only trigger with the search in the popup; pass `aria-label` to name it. */\n size?: ButtonSize;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n container?: PortalContainer;\n id?: string;\n 'aria-label'?: string;\n 'aria-describedby'?: string;\n /** Which edge of the trigger the popup lines up with. `end` opens it leftwards (e.g. an icon trigger at the end of a row). */\n align?: 'start' | 'center' | 'end';\n /** A fixed popup width for long options (e.g. model ids). Without it the popup takes the trigger's width, at least 11rem. */\n popupWidth?: ComboboxPopupWidth;\n showChevron?: boolean;\n iconOnlyValue?: boolean;\n allowCustomValue?: boolean;\n /** Called with the search text as it changes (and with `''` after a compact trigger's selection resets it). */\n onInputValueChange?: (value: string) => void;\n /** @deprecated Wrap the combobox in `<Field invalid>` with a `FieldError`. */\n error?: string;\n /** @deprecated Only keyed the `error` message id; a `Field` links its error without one. */\n name?: string;\n};\n\nexport type ComboboxSingleProps = ComboboxSharedProps & {\n multiple?: false;\n value?: string;\n onValueChange?: (value: string) => void;\n};\n\nexport type ComboboxMultipleProps = ComboboxSharedProps & {\n multiple: true;\n value?: readonly string[];\n onValueChange?: (value: string[]) => void;\n clearLabel?: string;\n};\n\nexport type ComboboxProps = ComboboxSingleProps | ComboboxMultipleProps;\n\nconst EMPTY_VALUES: readonly string[] = [];\n\nfunction isMultipleCombobox(props: ComboboxProps): props is ComboboxMultipleProps {\n return props.multiple === true;\n}\n\n/** The text a field shows for its value: a plain-text `displayLabel` wins over `label`. */\nfunction optionText(option: ComboboxOption) {\n return typeof option.displayLabel === 'string' ? option.displayLabel : option.label;\n}\n\n/** Inputs take a text placeholder only; a ReactNode placeholder keeps the compact trigger. */\nfunction textPlaceholder(placeholder: React.ReactNode) {\n return typeof placeholder === 'string' ? placeholder : undefined;\n}\n\n/**\n * How the combobox renders:\n * - `field`: a single select inside a `Field` searches in the field, like a text input.\n * - `chips`: a multiple select inside a `Field` shows its picks as chips and searches in the field.\n * - `trigger`: everything else (toolbars, breadcrumbs, inline pickers that callers lay out as a button)\n * keeps a compact trigger with the search inside the popup.\n */\ntype ComboboxShape = 'field' | 'chips' | 'trigger';\n\nfunction getComboboxShape({\n inFieldContext,\n multiple,\n variant,\n size,\n iconOnlyValue,\n showChevron,\n placeholder,\n}: {\n inFieldContext: boolean;\n multiple: boolean;\n variant: ComboboxVariant;\n size: ButtonSize;\n iconOnlyValue: boolean;\n showChevron: boolean;\n placeholder: React.ReactNode;\n}): ComboboxShape {\n if (!inFieldContext) return 'trigger';\n if (variant !== 'default') return 'trigger';\n if (isIconButtonSize(size)) return 'trigger';\n if (iconOnlyValue || !showChevron) return 'trigger';\n if (placeholder !== undefined && textPlaceholder(placeholder) === undefined) return 'trigger';\n if (!multiple) return 'field';\n // The chips field is tuned to the medium control height.\n if (size !== 'md') return 'trigger';\n return 'chips';\n}\n\n/** The value typed text stands for. The custom option and the value match in the filter both read it this way. */\nfunction typedValue(inputValue: string): string {\n return inputValue.trim();\n}\n\n/** A \"Use “text”\" option for typed text that isn't one of the options yet. */\nfunction getCustomOption(options: ComboboxOption[], inputValue: string): ComboboxOption | undefined {\n const value = typedValue(inputValue);\n if (!value) return undefined;\n // A field shows the selected option's text while it's closed; that isn't a new value.\n if (options.some(option => option.value === value || optionText(option) === value)) return undefined;\n return { label: `Use “${value}”`, value };\n}\n\n/**\n * Selected values that no option lists (typed ones, or ones the caller's options no longer include), in the\n * order given. Each shows its bare value, on its chip and in the popup.\n */\nfunction getUnlistedOptions(options: ComboboxOption[], values: readonly string[]): ComboboxOption[] {\n const listedValues = new Set(options.map(option => option.value));\n return [...new Set(values)].filter(value => !listedValues.has(value)).map(value => ({ label: value, value }));\n}\n\n/**\n * The selected values as options: listed ones in `options` order, then the unlisted ones. `onValueChange`\n * reports the values in this order too, with a new pick appended.\n */\nfunction getSelectedOptions(\n options: ComboboxOption[],\n values: readonly string[],\n unlistedOptions: ComboboxOption[],\n): ComboboxOption[] {\n const selectedValues = new Set(values);\n return [...options.filter(option => selectedValues.has(option.value)), ...unlistedOptions];\n}\n\n/** Matches options by value, because Base UI compares by reference and unlisted selections are rebuilt on every render. */\nfunction isSameOption(item: ComboboxOption, selected: ComboboxOption): boolean {\n return item.value === selected.value;\n}\n\n/**\n * Matches the label like Base UI's default filter, the text a field shows, and any keywords. With\n * `matchValue`, an option whose value is exactly the typed value matches too: `getCustomOption` holds back\n * typed text that is an existing value, so without this, typing a value whose label differs shows nothing.\n */\nfunction useOptionFilter({ matchValue }: { matchValue: boolean }) {\n const { contains } = BaseCombobox.useFilter();\n return (option: ComboboxOption, query: string) =>\n (matchValue && option.value === typedValue(query)) ||\n [option.label, optionText(option), ...(option.keywords ?? [])].some(text => contains(text, query));\n}\n\n/** Names the control when nothing else does: an `id` or a `Field` links a label to it instead. */\nfunction getFallbackAriaLabel({ hasLabel, multiple }: { hasLabel: boolean; multiple: boolean }) {\n if (hasLabel) return undefined;\n return multiple ? 'Select options' : 'Select option';\n}\n\nfunction getControlProps({\n id,\n ariaLabel,\n ariaDescribedBy,\n hasLabel,\n multiple,\n error,\n errorName,\n}: {\n id?: string;\n ariaLabel?: string;\n ariaDescribedBy?: string;\n hasLabel: boolean;\n multiple: boolean;\n error?: string;\n errorName: string;\n}) {\n const describedBy = [ariaDescribedBy, error ? fieldErrorId(errorName) : undefined].filter(Boolean).join(' ');\n return {\n id,\n 'aria-label': ariaLabel ?? getFallbackAriaLabel({ hasLabel, multiple }),\n ...keepOwnAccessibleName({ 'aria-label': ariaLabel }),\n ...deprecatedErrorAria(Boolean(error)),\n 'aria-describedby': describedBy || undefined,\n };\n}\n\ntype ControlProps = ReturnType<typeof getControlProps>;\n\nfunction triggerClassName({ iconOnlyValue, className }: { iconOnlyValue: boolean; className?: string }) {\n return cn(iconOnlyValue && 'w-auto px-2.5', className);\n}\n\n/** An option row's content: start slot, label over description, end slot. */\nfunction ComboboxOptionContent({ option }: { option: ComboboxOption }) {\n return (\n <>\n {option.start}\n <span className={comboboxStyles.optionText}>\n <span className={comboboxStyles.optionLabel}>{option.label}</span>\n {option.description && <span className={comboboxStyles.optionDescription}>{option.description}</span>}\n </span>\n {option.end ? <span className={comboboxStyles.optionEnd}>{option.end}</span> : null}\n </>\n );\n}\n\nfunction ComboboxClearFooter({ label, onClear }: { label: string; onClear: () => void }) {\n return (\n <div className=\"border-t border-border p-1\">\n <Button\n type=\"button\"\n variant=\"destructive-ghost\"\n size=\"sm\"\n className=\"w-full justify-start\"\n onClick={onClear}\n icon={<IconCrossMedium />}\n >\n {label}\n </Button>\n </div>\n );\n}\n\n/** The popup: the search row for a compact trigger (a field searches in itself), then the options. */\nfunction ComboboxOptionsContent({\n popupWidth,\n showSearch,\n searchPlaceholder,\n emptyText,\n align,\n container,\n footer,\n}: {\n popupWidth?: ComboboxPopupWidth;\n showSearch: boolean;\n searchPlaceholder: string;\n emptyText: string;\n align: 'start' | 'center' | 'end';\n container?: PortalContainer;\n footer?: React.ReactNode;\n}) {\n return (\n <ComboboxContent align={align} container={container} className={popupWidth && comboboxPopupWidthClass[popupWidth]}>\n {showSearch ? <ComboboxSearch placeholder={searchPlaceholder} /> : null}\n <ComboboxEmpty>{emptyText}</ComboboxEmpty>\n <ComboboxList>\n {(option: ComboboxOption) => (\n <ComboboxItem key={option.value} value={option}>\n <ComboboxOptionContent option={option} />\n </ComboboxItem>\n )}\n </ComboboxList>\n {footer}\n </ComboboxContent>\n );\n}\n\ntype TriggerLookProps = {\n variant: ComboboxVariant;\n size: ButtonSize;\n showChevron: boolean;\n iconOnlyValue: boolean;\n className?: string;\n};\n\nfunction SingleComboboxControl({\n shape,\n controlProps,\n placeholder,\n selectedOption,\n look,\n}: {\n shape: ComboboxShape;\n controlProps: ControlProps;\n placeholder: React.ReactNode;\n selectedOption?: ComboboxOption;\n look: TriggerLookProps;\n}) {\n if (shape === 'field') {\n return (\n <ComboboxInput\n {...controlProps}\n size={isIconButtonSize(look.size) ? undefined : look.size}\n placeholder={textPlaceholder(placeholder)}\n start={selectedOption?.start}\n className={look.className}\n />\n );\n }\n\n return (\n <ComboboxTrigger\n {...controlProps}\n variant={look.variant}\n size={look.size}\n showChevron={look.showChevron}\n icon={isIconButtonSize(look.size) ? undefined : selectedOption?.start}\n className={triggerClassName(look)}\n >\n {selectedOption?.displayLabel ?? <ComboboxValue placeholder={placeholder} />}\n </ComboboxTrigger>\n );\n}\n\nfunction MultipleComboboxControl({\n shape,\n controlProps,\n placeholder,\n selectedCount,\n look,\n}: {\n shape: ComboboxShape;\n controlProps: ControlProps;\n placeholder: React.ReactNode;\n selectedCount: number;\n look: TriggerLookProps;\n}) {\n if (shape === 'chips') {\n return (\n <ComboboxChips className={look.className}>\n <ComboboxValue>\n {(items: ComboboxOption[]) => (\n <>\n {items.map(item => (\n <ComboboxChip key={item.value}>{item.label}</ComboboxChip>\n ))}\n <ComboboxChipsInput\n {...controlProps}\n placeholder={items.length === 0 ? textPlaceholder(placeholder) : undefined}\n />\n </>\n )}\n </ComboboxValue>\n </ComboboxChips>\n );\n }\n\n const text = selectedCount === 0 ? placeholder : `${selectedCount} selected`;\n return (\n <ComboboxTrigger\n {...controlProps}\n variant={look.variant}\n size={look.size}\n showChevron={look.showChevron}\n className={triggerClassName(look)}\n >\n <span className={cn(selectedCount === 0 && comboboxStyles.placeholder)}>{text}</span>\n </ComboboxTrigger>\n );\n}\n\ntype ShapeProps = { shape: ComboboxShape; controlProps: ControlProps };\n\nfunction SingleCombobox({\n shape,\n controlProps,\n options,\n value,\n onValueChange,\n placeholder = 'Select option',\n searchPlaceholder = 'Search',\n emptyText = 'No option found.',\n className,\n disabled = false,\n variant = 'default',\n size = 'md',\n open,\n onOpenChange,\n container,\n align = 'start',\n popupWidth,\n showChevron = true,\n iconOnlyValue = false,\n allowCustomValue = false,\n onInputValueChange,\n}: ComboboxSingleProps & ShapeProps) {\n // The search text: a field's own text, or the compact trigger's popup search.\n const [inputValue, setInputValue] = React.useState('');\n const filter = useOptionFilter({ matchValue: allowCustomValue });\n const inField = shape === 'field';\n const selectedOption = options.find(option => option.value === value);\n const customOption = allowCustomValue ? getCustomOption(options, inputValue) : undefined;\n const items = customOption ? [customOption, ...options] : options;\n\n function handleInputValueChange(next: string) {\n setInputValue(next);\n onInputValueChange?.(next);\n }\n\n function handleValueChange(item: ComboboxOption | null) {\n if (!item) return;\n onValueChange?.(item.value);\n // A field shows the picked option; a compact trigger's popup search starts empty next time.\n if (!inField) handleInputValueChange('');\n }\n\n return (\n <ComboboxRoot\n autoHighlight\n items={items}\n filter={filter}\n itemToStringLabel={optionText}\n // Base UI's \"nothing selected\" is null.\n value={selectedOption ?? null}\n // A field owns its text (the selected option's, or the search); a compact trigger's search is reset here.\n inputValue={inField ? undefined : inputValue}\n onInputValueChange={handleInputValueChange}\n onValueChange={handleValueChange}\n disabled={disabled}\n open={open}\n onOpenChange={onOpenChange}\n >\n <SingleComboboxControl\n shape={shape}\n controlProps={controlProps}\n placeholder={placeholder}\n selectedOption={selectedOption}\n look={{ variant, size, showChevron, iconOnlyValue, className }}\n />\n <ComboboxOptionsContent\n popupWidth={popupWidth}\n showSearch={!inField}\n searchPlaceholder={searchPlaceholder}\n emptyText={emptyText}\n align={align}\n container={container}\n />\n </ComboboxRoot>\n );\n}\n\n/**\n * A multiple select: picks show as chips (or a count on a compact trigger) and stay listed, checked, in the popup.\n * With `allowCustomValue` the typed text can be picked as a new value.\n */\nfunction MultipleCombobox({\n shape,\n controlProps,\n options,\n value = EMPTY_VALUES,\n onValueChange,\n clearLabel,\n placeholder = 'Select options',\n searchPlaceholder = 'Search',\n emptyText = 'No option found.',\n className,\n disabled = false,\n variant = 'default',\n size = 'md',\n open,\n onOpenChange,\n container,\n align = 'start',\n popupWidth,\n showChevron = true,\n iconOnlyValue = false,\n allowCustomValue = false,\n onInputValueChange,\n}: ComboboxMultipleProps & ShapeProps) {\n // Mirrors the search text, which Base UI owns here, so the typed value can be offered as an option.\n const [inputValue, setInputValue] = React.useState('');\n const filter = useOptionFilter({ matchValue: allowCustomValue });\n const unlistedOptions = getUnlistedOptions(options, value);\n const selectedOptions = getSelectedOptions(options, value, unlistedOptions);\n // A typed value that is already picked is listed checked in the popup; offering it again would unpick it.\n const customOption = allowCustomValue ? getCustomOption([...options, ...unlistedOptions], inputValue) : undefined;\n // Unlisted picks go after the caller's options, which keep their order. Listing them lets a compact trigger,\n // which has no chips, untick them. The custom option comes last, unlike the single select: `autoHighlight`\n // highlights the first item, so someone who types \"gpt-4\" to narrow the list down to \"gpt-4o\" and presses\n // Enter picks \"gpt-4o\" instead of adding the literal text.\n const extraItems = customOption ? [...unlistedOptions, customOption] : unlistedOptions;\n const items = extraItems.length > 0 ? [...options, ...extraItems] : options;\n\n /** Keeps the mirrored search text in step with Base UI, which also clears it after each pick. */\n function handleInputValueChange(next: string) {\n setInputValue(next);\n onInputValueChange?.(next);\n }\n\n const footer =\n clearLabel && selectedOptions.length > 0 ? (\n <ComboboxClearFooter label={clearLabel} onClear={() => onValueChange?.([])} />\n ) : undefined;\n\n return (\n <ComboboxRoot\n multiple\n autoHighlight\n items={items}\n filter={filter}\n value={selectedOptions}\n isItemEqualToValue={isSameOption}\n onInputValueChange={handleInputValueChange}\n onValueChange={picked => onValueChange?.(picked.map(item => item.value))}\n disabled={disabled}\n open={open}\n onOpenChange={onOpenChange}\n >\n <MultipleComboboxControl\n shape={shape}\n controlProps={controlProps}\n placeholder={placeholder}\n selectedCount={selectedOptions.length}\n look={{ variant, size, showChevron, iconOnlyValue, className }}\n />\n <ComboboxOptionsContent\n popupWidth={popupWidth}\n showSearch={shape !== 'chips'}\n searchPlaceholder={searchPlaceholder}\n emptyText={emptyText}\n align={align}\n container={container}\n footer={footer}\n />\n </ComboboxRoot>\n );\n}\n\n/**\n * A searchable select driven by `options`, built on the Combobox parts.\n *\n * Inside a `Field`, a `default` combobox searches right in the field: a text field for a single value,\n * removable chips for `multiple`. Everywhere else (outside a `Field`, `ghost` and icon-size triggers,\n * custom non-text placeholders) it keeps a compact trigger with the search inside the popup. For anything\n * these props don't cover (groups, rich items), compose the parts directly (`ComboboxRoot`, ...).\n */\nexport function Combobox(props: ComboboxProps) {\n const field = useFieldAriaIds();\n const generatedName = React.useId();\n const multiple = isMultipleCombobox(props);\n const shape = getComboboxShape({\n inFieldContext: Boolean(field),\n multiple,\n variant: props.variant ?? 'default',\n size: props.size ?? 'md',\n iconOnlyValue: props.iconOnlyValue ?? false,\n showChevron: props.showChevron ?? true,\n placeholder: props.placeholder,\n });\n const errorName = props.name ?? generatedName;\n const controlProps = getControlProps({\n id: props.id,\n ariaLabel: props['aria-label'],\n ariaDescribedBy: props['aria-describedby'],\n hasLabel: Boolean(props.id || field),\n multiple,\n error: props.error,\n errorName,\n });\n\n const root = isMultipleCombobox(props) ? (\n <MultipleCombobox {...props} shape={shape} controlProps={controlProps} />\n ) : (\n <SingleCombobox {...props} shape={shape} controlProps={controlProps} />\n );\n\n if (!props.error) return root;\n\n return (\n <div className={comboboxStyles.root}>\n {root}\n <FieldBlock.ErrorMsg name={errorName}>{props.error}</FieldBlock.ErrorMsg>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AA4FA,IAAM,eAAkC,CAAC;AAEzC,SAAS,mBAAmB,OAAsD;CAChF,OAAO,MAAM,aAAa;AAC5B;;AAGA,SAAS,WAAW,QAAwB;CAC1C,OAAO,OAAO,OAAO,iBAAiB,WAAW,OAAO,eAAe,OAAO;AAChF;;AAGA,SAAS,gBAAgB,aAA8B;CACrD,OAAO,OAAO,gBAAgB,WAAW,cAAc,KAAA;AACzD;AAWA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getComboboxShape({ inFieldContext, multiple, variant, size, iconOnlyVal
33
33
  if (size !== "md") return "trigger";
34
34
  return "chips";
35
35
  }
36
+ /** The value typed text stands for. The custom option and the value match in the filter both read it this way. */
37
+ function typedValue(inputValue) {
38
+ return inputValue.trim();
39
+ }
36
40
  /** A "Use “text”" option for typed text that isn't one of the options yet. */
37
41
  function getCustomOption(options, inputValue) {
38
- const value = inputValue.trim();
42
+ const value = typedValue(inputValue);
39
43
  if (!value) return void 0;
40
44
  if (options.some((option) => option.value === value || optionText(option) === value)) return void 0;
41
45
  return {
@@ -43,10 +47,37 @@ function getCustomOption(options, inputValue) {
43
47
  value
44
48
  };
45
49
  }
46
- /** Matches the label like Base UI's default filter, the text a field shows, and any keywords. */
47
- function useOptionFilter() {
50
+ /**
51
+ * Selected values that no option lists (typed ones, or ones the caller's options no longer include), in the
52
+ * order given. Each shows its bare value, on its chip and in the popup.
53
+ */
54
+ function getUnlistedOptions(options, values) {
55
+ const listedValues = new Set(options.map((option) => option.value));
56
+ return [...new Set(values)].filter((value) => !listedValues.has(value)).map((value) => ({
57
+ label: value,
58
+ value
59
+ }));
60
+ }
61
+ /**
62
+ * The selected values as options: listed ones in `options` order, then the unlisted ones. `onValueChange`
63
+ * reports the values in this order too, with a new pick appended.
64
+ */
65
+ function getSelectedOptions(options, values, unlistedOptions) {
66
+ const selectedValues = new Set(values);
67
+ return [...options.filter((option) => selectedValues.has(option.value)), ...unlistedOptions];
68
+ }
69
+ /** Matches options by value, because Base UI compares by reference and unlisted selections are rebuilt on every render. */
70
+ function isSameOption(item, selected) {
71
+ return item.value === selected.value;
72
+ }
73
+ /**
74
+ * Matches the label like Base UI's default filter, the text a field shows, and any keywords. With
75
+ * `matchValue`, an option whose value is exactly the typed value matches too: `getCustomOption` holds back
76
+ * typed text that is an existing value, so without this, typing a value whose label differs shows nothing.
77
+ */
78
+ function useOptionFilter({ matchValue }) {
48
79
  const { contains } = _base_ui_react_combobox.Combobox.useFilter();
49
- return (option, query) => [
80
+ return (option, query) => matchValue && option.value === typedValue(query) || [
50
81
  option.label,
51
82
  optionText(option),
52
83
  ...option.keywords ?? []
@@ -165,7 +196,7 @@ function MultipleComboboxControl({ shape, controlProps, placeholder, selectedCou
165
196
  }
166
197
  function SingleCombobox({ shape, controlProps, options, value, onValueChange, placeholder = "Select option", searchPlaceholder = "Search", emptyText = "No option found.", className, disabled = false, variant = "default", size = "md", open, onOpenChange, container, align = "start", popupWidth, showChevron = true, iconOnlyValue = false, allowCustomValue = false, onInputValueChange }) {
167
198
  const [inputValue, setInputValue] = react.useState("");
168
- const filter = useOptionFilter();
199
+ const filter = useOptionFilter({ matchValue: allowCustomValue });
169
200
  const inField = shape === "field";
170
201
  const selectedOption = options.find((option) => option.value === value);
171
202
  const customOption = allowCustomValue ? getCustomOption(options, inputValue) : void 0;
@@ -213,10 +244,23 @@ function SingleCombobox({ shape, controlProps, options, value, onValueChange, pl
213
244
  })]
214
245
  });
215
246
  }
216
- function MultipleCombobox({ shape, controlProps, options, value = EMPTY_VALUES, onValueChange, clearLabel, placeholder = "Select options", searchPlaceholder = "Search", emptyText = "No option found.", className, disabled = false, variant = "default", size = "md", open, onOpenChange, container, align = "start", popupWidth, showChevron = true, iconOnlyValue = false }) {
217
- const filter = useOptionFilter();
218
- const selectedValues = new Set(value);
219
- const selectedOptions = options.filter((option) => selectedValues.has(option.value));
247
+ /**
248
+ * A multiple select: picks show as chips (or a count on a compact trigger) and stay listed, checked, in the popup.
249
+ * With `allowCustomValue` the typed text can be picked as a new value.
250
+ */
251
+ function MultipleCombobox({ shape, controlProps, options, value = EMPTY_VALUES, onValueChange, clearLabel, placeholder = "Select options", searchPlaceholder = "Search", emptyText = "No option found.", className, disabled = false, variant = "default", size = "md", open, onOpenChange, container, align = "start", popupWidth, showChevron = true, iconOnlyValue = false, allowCustomValue = false, onInputValueChange }) {
252
+ const [inputValue, setInputValue] = react.useState("");
253
+ const filter = useOptionFilter({ matchValue: allowCustomValue });
254
+ const unlistedOptions = getUnlistedOptions(options, value);
255
+ const selectedOptions = getSelectedOptions(options, value, unlistedOptions);
256
+ const customOption = allowCustomValue ? getCustomOption([...options, ...unlistedOptions], inputValue) : void 0;
257
+ const extraItems = customOption ? [...unlistedOptions, customOption] : unlistedOptions;
258
+ const items = extraItems.length > 0 ? [...options, ...extraItems] : options;
259
+ /** Keeps the mirrored search text in step with Base UI, which also clears it after each pick. */
260
+ function handleInputValueChange(next) {
261
+ setInputValue(next);
262
+ onInputValueChange?.(next);
263
+ }
220
264
  const footer = clearLabel && selectedOptions.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComboboxClearFooter, {
221
265
  label: clearLabel,
222
266
  onClear: () => onValueChange?.([])
@@ -224,10 +268,12 @@ function MultipleCombobox({ shape, controlProps, options, value = EMPTY_VALUES,
224
268
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_combobox_parts.ComboboxRoot, {
225
269
  multiple: true,
226
270
  autoHighlight: true,
227
- items: options,
271
+ items,
228
272
  filter,
229
273
  value: selectedOptions,
230
- onValueChange: (items) => onValueChange?.(items.map((item) => item.value)),
274
+ isItemEqualToValue: isSameOption,
275
+ onInputValueChange: handleInputValueChange,
276
+ onValueChange: (picked) => onValueChange?.(picked.map((item) => item.value)),
231
277
  disabled,
232
278
  open,
233
279
  onOpenChange,
@@ -310,4 +356,4 @@ Object.defineProperty(exports, "Combobox", {
310
356
  }
311
357
  });
312
358
 
313
- //# sourceMappingURL=combobox-Cg-KVjdt.cjs.map
359
+ //# sourceMappingURL=combobox-CtEvUaJc.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combobox-CtEvUaJc.cjs","names":["isIconButtonSize","BaseCombobox","fieldErrorId","keepOwnAccessibleName","deprecatedErrorAria","cn","_Fragment","comboboxStyles","Button","IconCrossMedium","ComboboxContent","comboboxPopupWidthClass","ComboboxSearch","ComboboxEmpty","ComboboxList","ComboboxItem","ComboboxInput","ComboboxTrigger","ComboboxValue","ComboboxChips","ComboboxChip","ComboboxChipsInput","React","ComboboxRoot","useFieldAriaIds","FieldBlock"],"sources":["../src/ds/components/Combobox/combobox.tsx"],"sourcesContent":["import { Combobox as BaseCombobox } from '@base-ui/react/combobox';\nimport * as React from 'react';\nimport {\n ComboboxChip,\n ComboboxChips,\n ComboboxChipsInput,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n ComboboxRoot,\n ComboboxSearch,\n ComboboxTrigger,\n ComboboxValue,\n} from './combobox-parts';\nimport { comboboxPopupWidthClass, comboboxStyles } from './combobox-styles';\nimport type { ComboboxPopupWidth, ComboboxVariant } from './combobox-styles';\nimport { Button, isIconButtonSize } from '@/ds/components/Button/Button';\nimport type { ButtonSize } from '@/ds/components/Button/Button';\nimport { keepOwnAccessibleName, useFieldAriaIds } from '@/ds/components/Field/field-control-aria';\nimport { FieldBlock } from '@/ds/components/FormFieldBlocks/block/field-block';\nimport { fieldErrorId } from '@/ds/components/FormFieldBlocks/block/field-error-id';\nimport { IconCrossMedium } from '@/ds/icons/central/IconCrossMedium';\nimport { deprecatedErrorAria } from '@/ds/primitives/form-element';\nimport type { PortalContainer } from '@/ds/primitives/portal-container';\nimport { cn } from '@/lib/utils';\n\nexport type { ComboboxPopupWidth, ComboboxVariant } from './combobox-styles';\n\nexport type ComboboxOption = {\n label: string;\n value: string;\n description?: string;\n displayLabel?: React.ReactNode;\n start?: React.ReactNode;\n end?: React.ReactNode;\n /** Extra terms the search matches besides `label` (aliases, ids, a provider name). Never displayed. */\n keywords?: readonly string[];\n};\n\ntype ComboboxSharedProps = {\n options: ComboboxOption[];\n placeholder?: React.ReactNode;\n /** The search row's placeholder for compact triggers. A field (inside a `Field`) searches in itself and shows `placeholder`. */\n searchPlaceholder?: string;\n emptyText?: string;\n className?: string;\n disabled?: boolean;\n /**\n * `default` inside a `Field` is a form field you type in to search. `ghost` (and the legacy `outline`/`link`),\n * or any variant outside a `Field`, is a compact trigger with the search inside the popup.\n */\n variant?: ComboboxVariant;\n /** Icon sizes (`icon-*`) render a chevron-only trigger with the search in the popup; pass `aria-label` to name it. */\n size?: ButtonSize;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n container?: PortalContainer;\n id?: string;\n 'aria-label'?: string;\n 'aria-describedby'?: string;\n /** Which edge of the trigger the popup lines up with. `end` opens it leftwards (e.g. an icon trigger at the end of a row). */\n align?: 'start' | 'center' | 'end';\n /** A fixed popup width for long options (e.g. model ids). Without it the popup takes the trigger's width, at least 11rem. */\n popupWidth?: ComboboxPopupWidth;\n showChevron?: boolean;\n iconOnlyValue?: boolean;\n allowCustomValue?: boolean;\n /** Called with the search text as it changes (and with `''` after a compact trigger's selection resets it). */\n onInputValueChange?: (value: string) => void;\n /** @deprecated Wrap the combobox in `<Field invalid>` with a `FieldError`. */\n error?: string;\n /** @deprecated Only keyed the `error` message id; a `Field` links its error without one. */\n name?: string;\n};\n\nexport type ComboboxSingleProps = ComboboxSharedProps & {\n multiple?: false;\n value?: string;\n onValueChange?: (value: string) => void;\n};\n\nexport type ComboboxMultipleProps = ComboboxSharedProps & {\n multiple: true;\n value?: readonly string[];\n onValueChange?: (value: string[]) => void;\n clearLabel?: string;\n};\n\nexport type ComboboxProps = ComboboxSingleProps | ComboboxMultipleProps;\n\nconst EMPTY_VALUES: readonly string[] = [];\n\nfunction isMultipleCombobox(props: ComboboxProps): props is ComboboxMultipleProps {\n return props.multiple === true;\n}\n\n/** The text a field shows for its value: a plain-text `displayLabel` wins over `label`. */\nfunction optionText(option: ComboboxOption) {\n return typeof option.displayLabel === 'string' ? option.displayLabel : option.label;\n}\n\n/** Inputs take a text placeholder only; a ReactNode placeholder keeps the compact trigger. */\nfunction textPlaceholder(placeholder: React.ReactNode) {\n return typeof placeholder === 'string' ? placeholder : undefined;\n}\n\n/**\n * How the combobox renders:\n * - `field`: a single select inside a `Field` searches in the field, like a text input.\n * - `chips`: a multiple select inside a `Field` shows its picks as chips and searches in the field.\n * - `trigger`: everything else (toolbars, breadcrumbs, inline pickers that callers lay out as a button)\n * keeps a compact trigger with the search inside the popup.\n */\ntype ComboboxShape = 'field' | 'chips' | 'trigger';\n\nfunction getComboboxShape({\n inFieldContext,\n multiple,\n variant,\n size,\n iconOnlyValue,\n showChevron,\n placeholder,\n}: {\n inFieldContext: boolean;\n multiple: boolean;\n variant: ComboboxVariant;\n size: ButtonSize;\n iconOnlyValue: boolean;\n showChevron: boolean;\n placeholder: React.ReactNode;\n}): ComboboxShape {\n if (!inFieldContext) return 'trigger';\n if (variant !== 'default') return 'trigger';\n if (isIconButtonSize(size)) return 'trigger';\n if (iconOnlyValue || !showChevron) return 'trigger';\n if (placeholder !== undefined && textPlaceholder(placeholder) === undefined) return 'trigger';\n if (!multiple) return 'field';\n // The chips field is tuned to the medium control height.\n if (size !== 'md') return 'trigger';\n return 'chips';\n}\n\n/** The value typed text stands for. The custom option and the value match in the filter both read it this way. */\nfunction typedValue(inputValue: string): string {\n return inputValue.trim();\n}\n\n/** A \"Use “text”\" option for typed text that isn't one of the options yet. */\nfunction getCustomOption(options: ComboboxOption[], inputValue: string): ComboboxOption | undefined {\n const value = typedValue(inputValue);\n if (!value) return undefined;\n // A field shows the selected option's text while it's closed; that isn't a new value.\n if (options.some(option => option.value === value || optionText(option) === value)) return undefined;\n return { label: `Use “${value}”`, value };\n}\n\n/**\n * Selected values that no option lists (typed ones, or ones the caller's options no longer include), in the\n * order given. Each shows its bare value, on its chip and in the popup.\n */\nfunction getUnlistedOptions(options: ComboboxOption[], values: readonly string[]): ComboboxOption[] {\n const listedValues = new Set(options.map(option => option.value));\n return [...new Set(values)].filter(value => !listedValues.has(value)).map(value => ({ label: value, value }));\n}\n\n/**\n * The selected values as options: listed ones in `options` order, then the unlisted ones. `onValueChange`\n * reports the values in this order too, with a new pick appended.\n */\nfunction getSelectedOptions(\n options: ComboboxOption[],\n values: readonly string[],\n unlistedOptions: ComboboxOption[],\n): ComboboxOption[] {\n const selectedValues = new Set(values);\n return [...options.filter(option => selectedValues.has(option.value)), ...unlistedOptions];\n}\n\n/** Matches options by value, because Base UI compares by reference and unlisted selections are rebuilt on every render. */\nfunction isSameOption(item: ComboboxOption, selected: ComboboxOption): boolean {\n return item.value === selected.value;\n}\n\n/**\n * Matches the label like Base UI's default filter, the text a field shows, and any keywords. With\n * `matchValue`, an option whose value is exactly the typed value matches too: `getCustomOption` holds back\n * typed text that is an existing value, so without this, typing a value whose label differs shows nothing.\n */\nfunction useOptionFilter({ matchValue }: { matchValue: boolean }) {\n const { contains } = BaseCombobox.useFilter();\n return (option: ComboboxOption, query: string) =>\n (matchValue && option.value === typedValue(query)) ||\n [option.label, optionText(option), ...(option.keywords ?? [])].some(text => contains(text, query));\n}\n\n/** Names the control when nothing else does: an `id` or a `Field` links a label to it instead. */\nfunction getFallbackAriaLabel({ hasLabel, multiple }: { hasLabel: boolean; multiple: boolean }) {\n if (hasLabel) return undefined;\n return multiple ? 'Select options' : 'Select option';\n}\n\nfunction getControlProps({\n id,\n ariaLabel,\n ariaDescribedBy,\n hasLabel,\n multiple,\n error,\n errorName,\n}: {\n id?: string;\n ariaLabel?: string;\n ariaDescribedBy?: string;\n hasLabel: boolean;\n multiple: boolean;\n error?: string;\n errorName: string;\n}) {\n const describedBy = [ariaDescribedBy, error ? fieldErrorId(errorName) : undefined].filter(Boolean).join(' ');\n return {\n id,\n 'aria-label': ariaLabel ?? getFallbackAriaLabel({ hasLabel, multiple }),\n ...keepOwnAccessibleName({ 'aria-label': ariaLabel }),\n ...deprecatedErrorAria(Boolean(error)),\n 'aria-describedby': describedBy || undefined,\n };\n}\n\ntype ControlProps = ReturnType<typeof getControlProps>;\n\nfunction triggerClassName({ iconOnlyValue, className }: { iconOnlyValue: boolean; className?: string }) {\n return cn(iconOnlyValue && 'w-auto px-2.5', className);\n}\n\n/** An option row's content: start slot, label over description, end slot. */\nfunction ComboboxOptionContent({ option }: { option: ComboboxOption }) {\n return (\n <>\n {option.start}\n <span className={comboboxStyles.optionText}>\n <span className={comboboxStyles.optionLabel}>{option.label}</span>\n {option.description && <span className={comboboxStyles.optionDescription}>{option.description}</span>}\n </span>\n {option.end ? <span className={comboboxStyles.optionEnd}>{option.end}</span> : null}\n </>\n );\n}\n\nfunction ComboboxClearFooter({ label, onClear }: { label: string; onClear: () => void }) {\n return (\n <div className=\"border-t border-border p-1\">\n <Button\n type=\"button\"\n variant=\"destructive-ghost\"\n size=\"sm\"\n className=\"w-full justify-start\"\n onClick={onClear}\n icon={<IconCrossMedium />}\n >\n {label}\n </Button>\n </div>\n );\n}\n\n/** The popup: the search row for a compact trigger (a field searches in itself), then the options. */\nfunction ComboboxOptionsContent({\n popupWidth,\n showSearch,\n searchPlaceholder,\n emptyText,\n align,\n container,\n footer,\n}: {\n popupWidth?: ComboboxPopupWidth;\n showSearch: boolean;\n searchPlaceholder: string;\n emptyText: string;\n align: 'start' | 'center' | 'end';\n container?: PortalContainer;\n footer?: React.ReactNode;\n}) {\n return (\n <ComboboxContent align={align} container={container} className={popupWidth && comboboxPopupWidthClass[popupWidth]}>\n {showSearch ? <ComboboxSearch placeholder={searchPlaceholder} /> : null}\n <ComboboxEmpty>{emptyText}</ComboboxEmpty>\n <ComboboxList>\n {(option: ComboboxOption) => (\n <ComboboxItem key={option.value} value={option}>\n <ComboboxOptionContent option={option} />\n </ComboboxItem>\n )}\n </ComboboxList>\n {footer}\n </ComboboxContent>\n );\n}\n\ntype TriggerLookProps = {\n variant: ComboboxVariant;\n size: ButtonSize;\n showChevron: boolean;\n iconOnlyValue: boolean;\n className?: string;\n};\n\nfunction SingleComboboxControl({\n shape,\n controlProps,\n placeholder,\n selectedOption,\n look,\n}: {\n shape: ComboboxShape;\n controlProps: ControlProps;\n placeholder: React.ReactNode;\n selectedOption?: ComboboxOption;\n look: TriggerLookProps;\n}) {\n if (shape === 'field') {\n return (\n <ComboboxInput\n {...controlProps}\n size={isIconButtonSize(look.size) ? undefined : look.size}\n placeholder={textPlaceholder(placeholder)}\n start={selectedOption?.start}\n className={look.className}\n />\n );\n }\n\n return (\n <ComboboxTrigger\n {...controlProps}\n variant={look.variant}\n size={look.size}\n showChevron={look.showChevron}\n icon={isIconButtonSize(look.size) ? undefined : selectedOption?.start}\n className={triggerClassName(look)}\n >\n {selectedOption?.displayLabel ?? <ComboboxValue placeholder={placeholder} />}\n </ComboboxTrigger>\n );\n}\n\nfunction MultipleComboboxControl({\n shape,\n controlProps,\n placeholder,\n selectedCount,\n look,\n}: {\n shape: ComboboxShape;\n controlProps: ControlProps;\n placeholder: React.ReactNode;\n selectedCount: number;\n look: TriggerLookProps;\n}) {\n if (shape === 'chips') {\n return (\n <ComboboxChips className={look.className}>\n <ComboboxValue>\n {(items: ComboboxOption[]) => (\n <>\n {items.map(item => (\n <ComboboxChip key={item.value}>{item.label}</ComboboxChip>\n ))}\n <ComboboxChipsInput\n {...controlProps}\n placeholder={items.length === 0 ? textPlaceholder(placeholder) : undefined}\n />\n </>\n )}\n </ComboboxValue>\n </ComboboxChips>\n );\n }\n\n const text = selectedCount === 0 ? placeholder : `${selectedCount} selected`;\n return (\n <ComboboxTrigger\n {...controlProps}\n variant={look.variant}\n size={look.size}\n showChevron={look.showChevron}\n className={triggerClassName(look)}\n >\n <span className={cn(selectedCount === 0 && comboboxStyles.placeholder)}>{text}</span>\n </ComboboxTrigger>\n );\n}\n\ntype ShapeProps = { shape: ComboboxShape; controlProps: ControlProps };\n\nfunction SingleCombobox({\n shape,\n controlProps,\n options,\n value,\n onValueChange,\n placeholder = 'Select option',\n searchPlaceholder = 'Search',\n emptyText = 'No option found.',\n className,\n disabled = false,\n variant = 'default',\n size = 'md',\n open,\n onOpenChange,\n container,\n align = 'start',\n popupWidth,\n showChevron = true,\n iconOnlyValue = false,\n allowCustomValue = false,\n onInputValueChange,\n}: ComboboxSingleProps & ShapeProps) {\n // The search text: a field's own text, or the compact trigger's popup search.\n const [inputValue, setInputValue] = React.useState('');\n const filter = useOptionFilter({ matchValue: allowCustomValue });\n const inField = shape === 'field';\n const selectedOption = options.find(option => option.value === value);\n const customOption = allowCustomValue ? getCustomOption(options, inputValue) : undefined;\n const items = customOption ? [customOption, ...options] : options;\n\n function handleInputValueChange(next: string) {\n setInputValue(next);\n onInputValueChange?.(next);\n }\n\n function handleValueChange(item: ComboboxOption | null) {\n if (!item) return;\n onValueChange?.(item.value);\n // A field shows the picked option; a compact trigger's popup search starts empty next time.\n if (!inField) handleInputValueChange('');\n }\n\n return (\n <ComboboxRoot\n autoHighlight\n items={items}\n filter={filter}\n itemToStringLabel={optionText}\n // Base UI's \"nothing selected\" is null.\n value={selectedOption ?? null}\n // A field owns its text (the selected option's, or the search); a compact trigger's search is reset here.\n inputValue={inField ? undefined : inputValue}\n onInputValueChange={handleInputValueChange}\n onValueChange={handleValueChange}\n disabled={disabled}\n open={open}\n onOpenChange={onOpenChange}\n >\n <SingleComboboxControl\n shape={shape}\n controlProps={controlProps}\n placeholder={placeholder}\n selectedOption={selectedOption}\n look={{ variant, size, showChevron, iconOnlyValue, className }}\n />\n <ComboboxOptionsContent\n popupWidth={popupWidth}\n showSearch={!inField}\n searchPlaceholder={searchPlaceholder}\n emptyText={emptyText}\n align={align}\n container={container}\n />\n </ComboboxRoot>\n );\n}\n\n/**\n * A multiple select: picks show as chips (or a count on a compact trigger) and stay listed, checked, in the popup.\n * With `allowCustomValue` the typed text can be picked as a new value.\n */\nfunction MultipleCombobox({\n shape,\n controlProps,\n options,\n value = EMPTY_VALUES,\n onValueChange,\n clearLabel,\n placeholder = 'Select options',\n searchPlaceholder = 'Search',\n emptyText = 'No option found.',\n className,\n disabled = false,\n variant = 'default',\n size = 'md',\n open,\n onOpenChange,\n container,\n align = 'start',\n popupWidth,\n showChevron = true,\n iconOnlyValue = false,\n allowCustomValue = false,\n onInputValueChange,\n}: ComboboxMultipleProps & ShapeProps) {\n // Mirrors the search text, which Base UI owns here, so the typed value can be offered as an option.\n const [inputValue, setInputValue] = React.useState('');\n const filter = useOptionFilter({ matchValue: allowCustomValue });\n const unlistedOptions = getUnlistedOptions(options, value);\n const selectedOptions = getSelectedOptions(options, value, unlistedOptions);\n // A typed value that is already picked is listed checked in the popup; offering it again would unpick it.\n const customOption = allowCustomValue ? getCustomOption([...options, ...unlistedOptions], inputValue) : undefined;\n // Unlisted picks go after the caller's options, which keep their order. Listing them lets a compact trigger,\n // which has no chips, untick them. The custom option comes last, unlike the single select: `autoHighlight`\n // highlights the first item, so someone who types \"gpt-4\" to narrow the list down to \"gpt-4o\" and presses\n // Enter picks \"gpt-4o\" instead of adding the literal text.\n const extraItems = customOption ? [...unlistedOptions, customOption] : unlistedOptions;\n const items = extraItems.length > 0 ? [...options, ...extraItems] : options;\n\n /** Keeps the mirrored search text in step with Base UI, which also clears it after each pick. */\n function handleInputValueChange(next: string) {\n setInputValue(next);\n onInputValueChange?.(next);\n }\n\n const footer =\n clearLabel && selectedOptions.length > 0 ? (\n <ComboboxClearFooter label={clearLabel} onClear={() => onValueChange?.([])} />\n ) : undefined;\n\n return (\n <ComboboxRoot\n multiple\n autoHighlight\n items={items}\n filter={filter}\n value={selectedOptions}\n isItemEqualToValue={isSameOption}\n onInputValueChange={handleInputValueChange}\n onValueChange={picked => onValueChange?.(picked.map(item => item.value))}\n disabled={disabled}\n open={open}\n onOpenChange={onOpenChange}\n >\n <MultipleComboboxControl\n shape={shape}\n controlProps={controlProps}\n placeholder={placeholder}\n selectedCount={selectedOptions.length}\n look={{ variant, size, showChevron, iconOnlyValue, className }}\n />\n <ComboboxOptionsContent\n popupWidth={popupWidth}\n showSearch={shape !== 'chips'}\n searchPlaceholder={searchPlaceholder}\n emptyText={emptyText}\n align={align}\n container={container}\n footer={footer}\n />\n </ComboboxRoot>\n );\n}\n\n/**\n * A searchable select driven by `options`, built on the Combobox parts.\n *\n * Inside a `Field`, a `default` combobox searches right in the field: a text field for a single value,\n * removable chips for `multiple`. Everywhere else (outside a `Field`, `ghost` and icon-size triggers,\n * custom non-text placeholders) it keeps a compact trigger with the search inside the popup. For anything\n * these props don't cover (groups, rich items), compose the parts directly (`ComboboxRoot`, ...).\n */\nexport function Combobox(props: ComboboxProps) {\n const field = useFieldAriaIds();\n const generatedName = React.useId();\n const multiple = isMultipleCombobox(props);\n const shape = getComboboxShape({\n inFieldContext: Boolean(field),\n multiple,\n variant: props.variant ?? 'default',\n size: props.size ?? 'md',\n iconOnlyValue: props.iconOnlyValue ?? false,\n showChevron: props.showChevron ?? true,\n placeholder: props.placeholder,\n });\n const errorName = props.name ?? generatedName;\n const controlProps = getControlProps({\n id: props.id,\n ariaLabel: props['aria-label'],\n ariaDescribedBy: props['aria-describedby'],\n hasLabel: Boolean(props.id || field),\n multiple,\n error: props.error,\n errorName,\n });\n\n const root = isMultipleCombobox(props) ? (\n <MultipleCombobox {...props} shape={shape} controlProps={controlProps} />\n ) : (\n <SingleCombobox {...props} shape={shape} controlProps={controlProps} />\n );\n\n if (!props.error) return root;\n\n return (\n <div className={comboboxStyles.root}>\n {root}\n <FieldBlock.ErrorMsg name={errorName}>{props.error}</FieldBlock.ErrorMsg>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AA4FA,IAAM,eAAkC,CAAC;AAEzC,SAAS,mBAAmB,OAAsD;CAChF,OAAO,MAAM,aAAa;AAC5B;;AAGA,SAAS,WAAW,QAAwB;CAC1C,OAAO,OAAO,OAAO,iBAAiB,WAAW,OAAO,eAAe,OAAO;AAChF;;AAGA,SAAS,gBAAgB,aAA8B;CACrD,OAAO,OAAO,gBAAgB,WAAW,cAAc,KAAA;AACzD;AAWA,SAAS,iBAAiB,EACxB,gBACA,UACA,SACA,MACA,eACA,aACA,eASgB;CAChB,IAAI,CAAC,gBAAgB,OAAO;CAC5B,IAAI,YAAY,WAAW,OAAO;CAClC,IAAIA,eAAAA,iBAAiB,IAAI,GAAG,OAAO;CACnC,IAAI,iBAAiB,CAAC,aAAa,OAAO;CAC1C,IAAI,gBAAgB,KAAA,KAAa,gBAAgB,WAAW,MAAM,KAAA,GAAW,OAAO;CACpF,IAAI,CAAC,UAAU,OA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gBAAgBF,MAAM,MAAM;CAClC,MAAM,WAAW,mBAAmB,KAAK;CACzC,MAAM,QAAQ,iBAAiB;EAC7B,gBAAgB,QAAQ,KAAK;EAC7B;EACA,SAAS,MAAM,WAAW;EAC1B,MAAM,MAAM,QAAQ;EACpB,eAAe,MAAM,iBAAiB;EACtC,aAAa,MAAM,eAAe;EAClC,aAAa,MAAM;CACrB,CAAC;CACD,MAAM,YAAY,MAAM,QAAQ;CAChC,MAAM,eAAe,gBAAgB;EACnC,IAAI,MAAM;EACV,WAAW,MAAM;EACjB,iBAAiB,MAAM;EACvB,UAAU,QAAQ,MAAM,MAAM,KAAK;EACnC;EACA,OAAO,MAAM;EACb;CACF,CAAC;CAED,MAAM,OAAO,mBAAmB,KAAK,IACnC,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAD;EAAkB,GAAI;EAAc;EAAqB;CAAe,CAAA,IAExE,iBAAA,GAAA,kBAAA,IAAA,CAAC,gBAAD;EAAgB,GAAI;EAAc;EAAqB;CAAe,CAAA;CAGxE,IAAI,CAAC,MAAM,OAAO,OAAO;CAEzB,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,WAAWf,uBAAAA,eAAe;EAA/B,UAAA,CACG,MACD,iBAAA,GAAA,kBAAA,IAAA,CAACkB,uBAAAA,WAAW,UAAZ;GAAqB,MAAM;GAAY,UAAA,MAAM;EAA2B,CAAA,CACrE;;AAET"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_combobox = require("../combobox-Cg-KVjdt.cjs");
2
+ const require_combobox = require("../combobox-CtEvUaJc.cjs");
3
3
  const require_combobox_parts = require("../combobox-parts-DR1Qn6xm.cjs");
4
4
  let _base_ui_react_combobox = require("@base-ui/react/combobox");
5
5
  exports.Combobox = require_combobox.Combobox;
@@ -1,4 +1,4 @@
1
- import { t as Combobox } from "../combobox-Db8NtklU.js";
1
+ import { t as Combobox } from "../combobox-BCB51kuy.js";
2
2
  import { C as comboboxStyles, _ as ComboboxRoot, a as ComboboxCollection, b as ComboboxTrigger, c as ComboboxGroup, d as ComboboxItemContent, f as ComboboxItemDescription, g as ComboboxList, h as ComboboxLabel, i as ComboboxClear, l as ComboboxInput, m as ComboboxItemTitle, n as ComboboxChips, o as ComboboxContent, p as ComboboxItemEnd, r as ComboboxChipsInput, s as ComboboxEmpty, t as ComboboxChip, u as ComboboxItem, v as ComboboxSearch, x as ComboboxValue, y as ComboboxSeparator } from "../combobox-parts-BVuRAhY6.js";
3
3
  import { Combobox as ComboboxPrimitive } from "@base-ui/react/combobox";
4
4
  export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxItemContent, ComboboxItemDescription, ComboboxItemEnd, ComboboxItemTitle, ComboboxLabel, ComboboxList, ComboboxPrimitive, ComboboxRoot, ComboboxSearch, ComboboxSeparator, ComboboxTrigger, ComboboxValue, comboboxStyles };
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_data_list = require("../data-list-BXe_ULaL.cjs");
3
3
  const require_DataList = require("../DataList-BViBdMjt.cjs");
4
- const require_tabbed_container = require("../tabbed-container-DbgPRklc.cjs");
4
+ const require_tabbed_container = require("../tabbed-container-DLntsyso.cjs");
5
5
  const require_use_data_list_keyboard = require("../use-data-list-keyboard-BCLBdaWR.cjs");
6
6
  exports.DataList = require_data_list.DataList;
7
7
  exports.DataListSkeleton = require_DataList.DataListSkeleton;
@@ -1,5 +1,5 @@
1
1
  import { t as DataList } from "../data-list-BV-YCOhk.js";
2
2
  import { i as DataListSkeletonRows, n as ScoresDataList, r as DataListSkeleton, t as TracesDataList } from "../DataList-Qh99bAyQ.js";
3
- import { t as TabbedContainer } from "../tabbed-container-DiHt3VX3.js";
3
+ import { t as TabbedContainer } from "../tabbed-container-CRPiA3RI.js";
4
4
  import { t as useDataListKeyboard } from "../use-data-list-keyboard-fJXq2T3y.js";
5
5
  export { DataList, DataListSkeleton, DataListSkeletonRows, ScoresDataList, TabbedContainer, TracesDataList, useDataListKeyboard };
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_property_filter_applied = require("../property-filter-applied-W4RoXpXu.cjs");
3
3
  const require_Button = require("../Button-Dnj_IjKV.cjs");
4
- const require_combobox = require("../combobox-Cg-KVjdt.cjs");
4
+ const require_combobox = require("../combobox-CtEvUaJc.cjs");
5
5
  const require_components_Field = require("./Field.cjs.js");
6
6
  const require_popover = require("../popover-eezEX_lT.cjs");
7
7
  const require_Txt = require("../Txt-_00wWxTd.cjs");
@@ -1,6 +1,6 @@
1
1
  import { n as PickMultiPanel, r as PropertyFilterActions, t as PropertyFilterApplied } from "../property-filter-applied-BrXPlQiN.js";
2
2
  import { n as Button } from "../Button-DS5CxY8l.js";
3
- import { t as Combobox } from "../combobox-Db8NtklU.js";
3
+ import { t as Combobox } from "../combobox-BCB51kuy.js";
4
4
  import { Field, FieldError } from "./Field.es.js";
5
5
  import { i as PopoverTrigger, n as Popover, r as PopoverContent } from "../popover-BpMi52Tb.js";
6
6
  import { t as Txt } from "../Txt-5efBsb2p.js";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_combobox = require("../../combobox-Cg-KVjdt.cjs");
2
+ const require_combobox = require("../../combobox-CtEvUaJc.cjs");
3
3
  const require_lib_framework = require("../../lib/framework.cjs.js");
4
4
  const require_toast_api = require("../../toast-api-OXZMucsU.cjs");
5
5
  let react = require("react");
@@ -1,4 +1,4 @@
1
- import { t as Combobox } from "../../combobox-Db8NtklU.js";
1
+ import { t as Combobox } from "../../combobox-BCB51kuy.js";
2
2
  import { useLinkComponent } from "../../lib/framework.es.js";
3
3
  import { t as toast } from "../../toast-api-C7oY0pJy.js";
4
4
  import { useEffect } from "react";
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_combobox = require("../../../combobox-Cg-KVjdt.cjs");
3
+ const require_combobox = require("../../../combobox-CtEvUaJc.cjs");
4
4
  const require_lib_framework = require("../../../lib/framework.cjs.js");
5
5
  const require_toast_api = require("../../../toast-api-OXZMucsU.cjs");
6
6
  let react = require("react");
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as Combobox } from "../../../combobox-Db8NtklU.js";
2
+ import { t as Combobox } from "../../../combobox-BCB51kuy.js";
3
3
  import { useLinkComponent } from "../../../lib/framework.es.js";
4
4
  import { t as toast } from "../../../toast-api-C7oY0pJy.js";
5
5
  import { useEffect } from "react";
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_domains_datasets_components_datasets_list_helpers = require("../datasets-list/helpers.cjs.js");
3
3
  const require_domains_observability_components_computed_tag = require("../../../observability/components/computed-tag.cjs.js");
4
- const require_combobox = require("../../../../combobox-Cg-KVjdt.cjs");
4
+ const require_combobox = require("../../../../combobox-CtEvUaJc.cjs");
5
5
  const require_icons_central_IconCheckmark2Medium = require("../../../../icons/central/IconCheckmark2Medium.cjs.js");
6
6
  const require_icons_central_IconCrossMedium = require("../../../../icons/central/IconCrossMedium.cjs.js");
7
7
  const require_toast_api = require("../../../../toast-api-OXZMucsU.cjs");
@@ -1,6 +1,6 @@
1
1
  import { getAllDatasetTags } from "../datasets-list/helpers.es.js";
2
2
  import { ComputedTag } from "../../../observability/components/computed-tag.es.js";
3
- import { t as Combobox } from "../../../../combobox-Db8NtklU.js";
3
+ import { t as Combobox } from "../../../../combobox-BCB51kuy.js";
4
4
  import { IconCheckmark2Medium } from "../../../../icons/central/IconCheckmark2Medium.es.js";
5
5
  import { IconCrossMedium } from "../../../../icons/central/IconCrossMedium.es.js";
6
6
  import { t as toast } from "../../../../toast-api-C7oY0pJy.js";
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_combobox = require("../../../combobox-Cg-KVjdt.cjs");
3
+ const require_combobox = require("../../../combobox-CtEvUaJc.cjs");
4
4
  const require_utils_date_format = require("../../../utils/date-format.cjs.js");
5
5
  let react = require("react");
6
6
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as Combobox } from "../../../combobox-Db8NtklU.js";
2
+ import { t as Combobox } from "../../../combobox-BCB51kuy.js";
3
3
  import { formatDate } from "../../../utils/date-format.es.js";
4
4
  import { useEffect } from "react";
5
5
  import { jsx } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_combobox = require("../../../../combobox-Cg-KVjdt.cjs");
2
+ const require_combobox = require("../../../../combobox-CtEvUaJc.cjs");
3
3
  const require_components_Field = require("../../../../components/Field.cjs.js");
4
4
  let react_jsx_runtime = require("react/jsx-runtime");
5
5
  let _mastra_react_hooks_scores = require("@mastra/react/hooks/scores");
@@ -1,5 +1,5 @@
1
1
  import { useScorers } from "../../../scores/hooks.es.js";
2
- import { t as Combobox } from "../../../../combobox-Db8NtklU.js";
2
+ import { t as Combobox } from "../../../../combobox-BCB51kuy.js";
3
3
  import { Field, FieldDescription, FieldLabel } from "../../../../components/Field.es.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  // src/domains/datasets/components/experiment-trigger/scorer-selector.tsx
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_combobox = require("../../../combobox-Cg-KVjdt.cjs");
3
+ const require_combobox = require("../../../combobox-CtEvUaJc.cjs");
4
4
  const require_icons_central_IconCheckmark2Medium = require("../../../icons/central/IconCheckmark2Medium.cjs.js");
5
5
  let react = require("react");
6
6
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as Combobox } from "../../../combobox-Db8NtklU.js";
2
+ import { t as Combobox } from "../../../combobox-BCB51kuy.js";
3
3
  import { IconCheckmark2Medium } from "../../../icons/central/IconCheckmark2Medium.es.js";
4
4
  import { useMemo, useState } from "react";
5
5
  import { jsx } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_Badge = require("../../Badge-DqaMg7Gy.cjs");
3
- const require_combobox = require("../../combobox-Cg-KVjdt.cjs");
3
+ const require_combobox = require("../../combobox-CtEvUaJc.cjs");
4
4
  const require_utils_date_format = require("../../utils/date-format.cjs.js");
5
5
  let react_jsx_runtime = require("react/jsx-runtime");
6
6
  let _mastra_react_hooks_prompt_blocks = require("@mastra/react/hooks/prompt-blocks");
@@ -1,5 +1,5 @@
1
1
  import { t as Badge } from "../../Badge-C7NnqmMx.js";
2
- import { t as Combobox } from "../../combobox-Db8NtklU.js";
2
+ import { t as Combobox } from "../../combobox-BCB51kuy.js";
3
3
  import { formatDate } from "../../utils/date-format.es.js";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import { usePromptBlockVersions } from "@mastra/react/hooks/prompt-blocks";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_combobox = require("../../../combobox-Cg-KVjdt.cjs");
2
+ const require_combobox = require("../../../combobox-CtEvUaJc.cjs");
3
3
  const require_Dialog = require("../../../Dialog-DKOLz3KE.cjs");
4
4
  const require_Notice = require("../../../Notice-CS_aUxIi.cjs");
5
5
  const require_components_Text = require("../../../components/Text.cjs.js");
@@ -1,4 +1,4 @@
1
- import { t as Combobox } from "../../../combobox-Db8NtklU.js";
1
+ import { t as Combobox } from "../../../combobox-BCB51kuy.js";
2
2
  import { n as DialogBody, o as DialogDescription, p as DialogAction, r as DialogCancel, s as DialogFooter } from "../../../Dialog-CybqopCT.js";
3
3
  import { t as Notice } from "../../../Notice-BdfIyUok.js";
4
4
  import { TextAndIcon } from "../../../components/Text.es.js";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_domains_traces_trace_list_columns = require("../trace-list-columns.cjs.js");
3
- const require_combobox = require("../../../combobox-Cg-KVjdt.cjs");
3
+ const require_combobox = require("../../../combobox-CtEvUaJc.cjs");
4
4
  const require_Dialog = require("../../../Dialog-DKOLz3KE.cjs");
5
5
  const require_dropdown_menu = require("../../../dropdown-menu-CbrBOOgZ.cjs");
6
6
  const require_components_Field = require("../../../components/Field.cjs.js");
@@ -1,5 +1,5 @@
1
1
  import { TRACE_COLUMN_CATALOGS, TRACE_CUSTOM_COLUMN_FIELDS, TRACE_CUSTOM_COLUMN_LABELS, TRACE_USAGE_COLUMNS } from "../trace-list-columns.es.js";
2
- import { t as Combobox } from "../../../combobox-Db8NtklU.js";
2
+ import { t as Combobox } from "../../../combobox-BCB51kuy.js";
3
3
  import { a as DialogContent, c as DialogHeader, d as DialogTitle, n as DialogBody, o as DialogDescription, p as DialogAction, r as DialogCancel, s as DialogFooter, t as Dialog } from "../../../Dialog-CybqopCT.js";
4
4
  import { t as DropdownMenu } from "../../../dropdown-menu-C9U8z4q0.js";
5
5
  import { Field, FieldError, FieldLabel } from "../../../components/Field.es.js";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_combobox = require("../../../combobox-Cg-KVjdt.cjs");
2
+ const require_combobox = require("../../../combobox-CtEvUaJc.cjs");
3
3
  const require_lib_framework = require("../../../lib/framework.cjs.js");
4
4
  const require_toast_api = require("../../../toast-api-OXZMucsU.cjs");
5
5
  let react = require("react");
@@ -1,4 +1,4 @@
1
- import { t as Combobox } from "../../../combobox-Db8NtklU.js";
1
+ import { t as Combobox } from "../../../combobox-BCB51kuy.js";
2
2
  import { useLinkComponent } from "../../../lib/framework.es.js";
3
3
  import { t as toast } from "../../../toast-api-C7oY0pJy.js";
4
4
  import { useEffect } from "react";
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_tabbed_container = require("../tabbed-container-DbgPRklc.cjs");
2
+ const require_tabbed_container = require("../tabbed-container-DLntsyso.cjs");
3
3
  exports.TabbedContainer = require_tabbed_container.TabbedContainer;
@@ -1 +1 @@
1
- export { t as TabbedContainer } from "../tabbed-container-DiHt3VX3.js";
1
+ export { t as TabbedContainer } from "../tabbed-container-CRPiA3RI.js";
@@ -1,4 +1,4 @@
1
- import { t as Combobox } from "./combobox-Db8NtklU.js";
1
+ import { t as Combobox } from "./combobox-BCB51kuy.js";
2
2
  import { t as DataList } from "./data-list-BV-YCOhk.js";
3
3
  import { SearchInput } from "./components/SearchInput.es.js";
4
4
  import { t as TabContent } from "./tabs-content-Clwuqe7C.js";
@@ -127,4 +127,4 @@ var TabbedContainer = Object.assign(TabbedContainerRoot, {
127
127
  });
128
128
  export { TabbedContainer as t };
129
129
 
130
- //# sourceMappingURL=tabbed-container-DiHt3VX3.js.map
130
+ //# sourceMappingURL=tabbed-container-CRPiA3RI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabbed-container-DiHt3VX3.js","names":[],"sources":["../src/ds/layout/tabbed-container/tabbed-container-root.tsx","../src/ds/layout/tabbed-container/index.ts"],"sourcesContent":["import { Children, isValidElement, useContext } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport './tabbed-container.css';\nimport { Combobox } from '@/ds/components/Combobox/combobox';\nimport type { ComboboxProps } from '@/ds/components/Combobox/combobox';\nimport { DataList } from '@/ds/components/DataList/data-list';\nimport type { DataListFit } from '@/ds/components/DataList/data-list-root';\nimport { SearchInput } from '@/ds/components/SearchInput';\nimport type { SearchInputProps } from '@/ds/components/SearchInput';\nimport { TabContent } from '@/ds/components/Tabs/tabs-content';\nimport { TabsContext } from '@/ds/components/Tabs/tabs-context';\nimport { TabList } from '@/ds/components/Tabs/tabs-list';\nimport { Tabs } from '@/ds/components/Tabs/tabs-root';\nimport type { TabsRootProps } from '@/ds/components/Tabs/tabs-root';\nimport { Tab } from '@/ds/components/Tabs/tabs-tab';\nimport type { TabProps } from '@/ds/components/Tabs/tabs-tab';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/ds/components/Tooltip/tooltip';\nimport { Txt } from '@/ds/components/Txt';\nimport { IconFilter2 } from '@/ds/icons/central/IconFilter2';\nimport { cn } from '@/lib/utils';\n\nexport type TabbedContainerSearchProps = Pick<SearchInputProps, 'debounceMs' | 'label' | 'placeholder'> & {\n value: string;\n onSearch: (search: string) => void;\n};\n\nexport type TabbedContainerFilterProps = ComboboxProps & { 'aria-label': string };\n\ntype TabbedContainerItemProps = Pick<\n TabProps,\n 'attention' | 'disabled' | 'disabledTooltip' | 'onClick' | 'onClose' | 'value'\n> & {\n label: ReactNode;\n children: ReactNode;\n className?: string;\n tabClassName?: string;\n};\n\nexport type TabbedContainerPanelProps = TabbedContainerItemProps;\n\nexport type TabbedContainerDataListProps = TabbedContainerItemProps & {\n columns: string;\n search?: TabbedContainerSearchProps;\n filter?: TabbedContainerFilterProps;\n fit?: DataListFit;\n};\n\nexport const TabbedContainerPanel = ({ value, children, className }: TabbedContainerPanelProps) => (\n <TabContent value={value} keepMounted className={cn('min-h-0 flex-1', className)}>\n {children}\n </TabContent>\n);\n\nexport const TabbedContainerDataList = ({ value, columns, fit, children, className }: TabbedContainerDataListProps) => (\n <TabContent value={value} keepMounted className={cn('tabbed-container-data-list min-h-0 flex-1', className)}>\n <DataList columns={columns} fit={fit} variant=\"light\" className=\"min-h-0 px-0 pb-0\">\n {children}\n </DataList>\n </TabContent>\n);\n\nexport const DataListControls = ({ dataLists }: { dataLists: ReactElement<TabbedContainerDataListProps>[] }) => {\n const tabs = useContext(TabsContext);\n return dataLists.map(dataList => {\n const { filter, search, value } = dataList.props;\n if (!search && !filter) return null;\n const active = value === tabs?.value;\n const filterCount = filter ? (Array.isArray(filter.value) ? filter.value.length : filter.value ? 1 : 0) : 0;\n return (\n <div key={value} data-slot=\"tabbed-container-controls\" data-active={active || undefined} hidden={!active}>\n <div data-slot=\"tabbed-container-query\">\n {search ? (\n <div data-slot=\"tabbed-container-search\">\n <SearchInput\n label={search.label}\n placeholder={search.placeholder}\n value={search.value}\n onValueChange={search.onSearch}\n debounceMs={search.debounceMs ?? 300}\n size=\"md\"\n shortcut={active}\n className=\"max-w-120\"\n />\n </div>\n ) : null}\n {filter ? (\n <TooltipProvider delay={200}>\n <Tooltip>\n <TooltipTrigger asChild>\n <div data-slot=\"tabbed-container-filter\" data-active={filterCount > 0 || undefined}>\n <IconFilter2 aria-hidden=\"true\" />\n {filterCount > 0 ? (\n <Txt as=\"span\" variant=\"meta\" aria-hidden=\"true\" data-slot=\"tabbed-container-filter-count\">\n {filterCount}\n </Txt>\n ) : null}\n {filter.multiple ? (\n <Combobox {...filter} clearLabel=\"Clear\" size=\"md\" variant=\"default\" />\n ) : (\n <Combobox {...filter} size=\"md\" variant=\"default\" />\n )}\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n {filterCount > 0 ? `Filter, ${filterCount} selected` : 'Filter'}\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n ) : null}\n </div>\n </div>\n );\n });\n};\n\nexport type TabbedContainerProps<T extends string> = {\n children: ReactNode;\n defaultTab: T;\n value?: T;\n onValueChange?: (value: T) => void;\n frame?: TabsRootProps<T>['frame'];\n className?: string;\n};\n\ntype TabbedContainerChildProps = TabbedContainerPanelProps | TabbedContainerDataListProps;\n\nconst isContainerChild = (child: ReactNode): child is ReactElement<TabbedContainerChildProps> =>\n isValidElement(child) && (child.type === TabbedContainerPanel || child.type === TabbedContainerDataList);\n\nconst isDataList = (\n child: ReactElement<TabbedContainerChildProps>,\n): child is ReactElement<TabbedContainerDataListProps> => child.type === TabbedContainerDataList;\n\nexport function TabbedContainerRoot<T extends string>({\n children,\n defaultTab,\n value,\n onValueChange,\n frame = 'inset',\n className,\n}: TabbedContainerProps<T>) {\n const panels = Children.toArray(children).filter(isContainerChild);\n const dataLists = panels.filter(isDataList);\n return (\n <Tabs\n defaultTab={defaultTab}\n value={value}\n onValueChange={onValueChange}\n appearance=\"contained\"\n frame={frame}\n className={cn('tabbed-container min-h-0 flex-1', className)}\n >\n <div data-slot=\"tabbed-container-rail\">\n <div data-slot=\"tabbed-container-tabs\">\n <TabList>\n {panels.map(panel => (\n <Tab\n key={panel.props.value}\n value={panel.props.value}\n disabled={panel.props.disabled}\n attention={panel.props.attention}\n disabledTooltip={panel.props.disabledTooltip}\n onClick={panel.props.onClick}\n onClose={panel.props.onClose}\n className={panel.props.tabClassName}\n >\n {panel.props.label}\n </Tab>\n ))}\n </TabList>\n </div>\n <DataListControls dataLists={dataLists} />\n </div>\n {panels}\n </Tabs>\n );\n}\n","import { TabbedContainerDataList, TabbedContainerPanel, TabbedContainerRoot } from './tabbed-container-root';\n\nexport type {\n TabbedContainerDataListProps,\n TabbedContainerFilterProps,\n TabbedContainerPanelProps,\n TabbedContainerProps,\n TabbedContainerSearchProps,\n} from './tabbed-container-root';\n\nexport const TabbedContainer = Object.assign(TabbedContainerRoot, {\n Panel: TabbedContainerPanel,\n DataList: TabbedContainerDataList,\n});\n"],"mappings":";;;;;;;;;;;;AA+CA,IAAa,wBAAwB,EAAE,OAAO,UAAU,gBACtD,oBAAC,YAAD;CAAmB;CAAO,aAAA;CAAY,WAAW,GAAG,kBAAkB,SAAS;CAC5E;AACS,CAAA;AAGd,IAAa,2BAA2B,EAAE,OAAO,SAAS,KAAK,UAAU,gBACvE,oBAAC,YAAD;CAAmB;CAAO,aAAA;CAAY,WAAW,GAAG,6CAA6C,SAAS;CACxG,UAAA,oBAAC,UAAD;EAAmB;EAAc;EAAK,SAAQ;EAAQ,WAAU;EAC7D;CACO,CAAA;AACA,CAAA;AAGd,IAAa,oBAAoB,EAAE,gBAA6E;CAC9G,MAAM,OAAO,WAA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,CAAA,IACf,IACD;;EACF,GAzCK,KAyCL;CAET,CAAC;AACH;AAaA,IAAM,oBAAoB,UACxB,eAAe,KAAK,MAAM,MAAM,SAAS,wBAAwB,MAAM,SAAS;AAElF,IAAM,cACJ,UACwD,MAAM,SAAS;AAEzE,SAAgB,oBAAsC,EACpD,UACA,YACA,OACA,eACA,QAAQ,SACR,aAC0B;CAC1B,MAAM,SAAS,SAAS,QAAQ,QAAQ,CAAC,CAAC,OAAO,gBAAgB;CACjE,MAAM,YAAY,OAAO,OAAO,UAAU;CAC1C,OACE,qBAAC,MAAD;EACc;EACL;EACQ;EACf,YAAW;EACJ;EACP,WAAW,GAAG,mCAAmC,SAAS;EAN5D,UAAA,CAQE,qBAAC,OAAD;GAAK,aAAU;GAAf,UAAA,CACE,oBAAC,OAAD;IAAK,aAAU;IACb,UAAA,oBAAC,SAAD,EAAA,UACG,OAAO,KAAI,UACV,oBAAC,KAAD;KAEE,OAAO,MAAM,MAAM;KACnB,UAAU,MAAM,MAAM;KACtB,WAAW,MAAM,MAAM;KACvB,iBAAiB,MAAM,MAAM;KAC7B,SAAS,MAAM,MAAM;KACrB,SAAS,MAAM,MAAM;KACrB,WAAW,MAAM,MAAM;KAEtB,UAAA,MAAM,MAAM;IACV,GAVE,MAAM,MAAM,KAUd,CACN,EACM,CAAA;GACN,CAAA,GACL,oBAAC,kBAAD,EAA6B,UAAY,CAAA,CACtC;EACJ,CAAA,GAAA,MACG;;AAEV;;ACtKA,IAAa,kBAAkB,OAAO,OAAO,qBAAqB;CAChE,OAAO;CACP,UAAU;AACZ,CAAC"}
1
+ {"version":3,"file":"tabbed-container-CRPiA3RI.js","names":[],"sources":["../src/ds/layout/tabbed-container/tabbed-container-root.tsx","../src/ds/layout/tabbed-container/index.ts"],"sourcesContent":["import { Children, isValidElement, useContext } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport './tabbed-container.css';\nimport { Combobox } from '@/ds/components/Combobox/combobox';\nimport type { ComboboxProps } from '@/ds/components/Combobox/combobox';\nimport { DataList } from '@/ds/components/DataList/data-list';\nimport type { DataListFit } from '@/ds/components/DataList/data-list-root';\nimport { SearchInput } from '@/ds/components/SearchInput';\nimport type { SearchInputProps } from '@/ds/components/SearchInput';\nimport { TabContent } from '@/ds/components/Tabs/tabs-content';\nimport { TabsContext } from '@/ds/components/Tabs/tabs-context';\nimport { TabList } from '@/ds/components/Tabs/tabs-list';\nimport { Tabs } from '@/ds/components/Tabs/tabs-root';\nimport type { TabsRootProps } from '@/ds/components/Tabs/tabs-root';\nimport { Tab } from '@/ds/components/Tabs/tabs-tab';\nimport type { TabProps } from '@/ds/components/Tabs/tabs-tab';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/ds/components/Tooltip/tooltip';\nimport { Txt } from '@/ds/components/Txt';\nimport { IconFilter2 } from '@/ds/icons/central/IconFilter2';\nimport { cn } from '@/lib/utils';\n\nexport type TabbedContainerSearchProps = Pick<SearchInputProps, 'debounceMs' | 'label' | 'placeholder'> & {\n value: string;\n onSearch: (search: string) => void;\n};\n\nexport type TabbedContainerFilterProps = ComboboxProps & { 'aria-label': string };\n\ntype TabbedContainerItemProps = Pick<\n TabProps,\n 'attention' | 'disabled' | 'disabledTooltip' | 'onClick' | 'onClose' | 'value'\n> & {\n label: ReactNode;\n children: ReactNode;\n className?: string;\n tabClassName?: string;\n};\n\nexport type TabbedContainerPanelProps = TabbedContainerItemProps;\n\nexport type TabbedContainerDataListProps = TabbedContainerItemProps & {\n columns: string;\n search?: TabbedContainerSearchProps;\n filter?: TabbedContainerFilterProps;\n fit?: DataListFit;\n};\n\nexport const TabbedContainerPanel = ({ value, children, className }: TabbedContainerPanelProps) => (\n <TabContent value={value} keepMounted className={cn('min-h-0 flex-1', className)}>\n {children}\n </TabContent>\n);\n\nexport const TabbedContainerDataList = ({ value, columns, fit, children, className }: TabbedContainerDataListProps) => (\n <TabContent value={value} keepMounted className={cn('tabbed-container-data-list min-h-0 flex-1', className)}>\n <DataList columns={columns} fit={fit} variant=\"light\" className=\"min-h-0 px-0 pb-0\">\n {children}\n </DataList>\n </TabContent>\n);\n\nexport const DataListControls = ({ dataLists }: { dataLists: ReactElement<TabbedContainerDataListProps>[] }) => {\n const tabs = useContext(TabsContext);\n return dataLists.map(dataList => {\n const { filter, search, value } = dataList.props;\n if (!search && !filter) return null;\n const active = value === tabs?.value;\n const filterCount = filter ? (Array.isArray(filter.value) ? filter.value.length : filter.value ? 1 : 0) : 0;\n return (\n <div key={value} data-slot=\"tabbed-container-controls\" data-active={active || undefined} hidden={!active}>\n <div data-slot=\"tabbed-container-query\">\n {search ? (\n <div data-slot=\"tabbed-container-search\">\n <SearchInput\n label={search.label}\n placeholder={search.placeholder}\n value={search.value}\n onValueChange={search.onSearch}\n debounceMs={search.debounceMs ?? 300}\n size=\"md\"\n shortcut={active}\n className=\"max-w-120\"\n />\n </div>\n ) : null}\n {filter ? (\n <TooltipProvider delay={200}>\n <Tooltip>\n <TooltipTrigger asChild>\n <div data-slot=\"tabbed-container-filter\" data-active={filterCount > 0 || undefined}>\n <IconFilter2 aria-hidden=\"true\" />\n {filterCount > 0 ? (\n <Txt as=\"span\" variant=\"meta\" aria-hidden=\"true\" data-slot=\"tabbed-container-filter-count\">\n {filterCount}\n </Txt>\n ) : null}\n {filter.multiple ? (\n <Combobox {...filter} clearLabel=\"Clear\" size=\"md\" variant=\"default\" />\n ) : (\n <Combobox {...filter} size=\"md\" variant=\"default\" />\n )}\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n {filterCount > 0 ? `Filter, ${filterCount} selected` : 'Filter'}\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n ) : null}\n </div>\n </div>\n );\n });\n};\n\nexport type TabbedContainerProps<T extends string> = {\n children: ReactNode;\n defaultTab: T;\n value?: T;\n onValueChange?: (value: T) => void;\n frame?: TabsRootProps<T>['frame'];\n className?: string;\n};\n\ntype TabbedContainerChildProps = TabbedContainerPanelProps | TabbedContainerDataListProps;\n\nconst isContainerChild = (child: ReactNode): child is ReactElement<TabbedContainerChildProps> =>\n isValidElement(child) && (child.type === TabbedContainerPanel || child.type === TabbedContainerDataList);\n\nconst isDataList = (\n child: ReactElement<TabbedContainerChildProps>,\n): child is ReactElement<TabbedContainerDataListProps> => child.type === TabbedContainerDataList;\n\nexport function TabbedContainerRoot<T extends string>({\n children,\n defaultTab,\n value,\n onValueChange,\n frame = 'inset',\n className,\n}: TabbedContainerProps<T>) {\n const panels = Children.toArray(children).filter(isContainerChild);\n const dataLists = panels.filter(isDataList);\n return (\n <Tabs\n defaultTab={defaultTab}\n value={value}\n onValueChange={onValueChange}\n appearance=\"contained\"\n frame={frame}\n className={cn('tabbed-container min-h-0 flex-1', className)}\n >\n <div data-slot=\"tabbed-container-rail\">\n <div data-slot=\"tabbed-container-tabs\">\n <TabList>\n {panels.map(panel => (\n <Tab\n key={panel.props.value}\n value={panel.props.value}\n disabled={panel.props.disabled}\n attention={panel.props.attention}\n disabledTooltip={panel.props.disabledTooltip}\n onClick={panel.props.onClick}\n onClose={panel.props.onClose}\n className={panel.props.tabClassName}\n >\n {panel.props.label}\n </Tab>\n ))}\n </TabList>\n </div>\n <DataListControls dataLists={dataLists} />\n </div>\n {panels}\n </Tabs>\n );\n}\n","import { TabbedContainerDataList, TabbedContainerPanel, TabbedContainerRoot } from './tabbed-container-root';\n\nexport type {\n TabbedContainerDataListProps,\n TabbedContainerFilterProps,\n TabbedContainerPanelProps,\n TabbedContainerProps,\n TabbedContainerSearchProps,\n} from './tabbed-container-root';\n\nexport const TabbedContainer = Object.assign(TabbedContainerRoot, {\n Panel: TabbedContainerPanel,\n DataList: TabbedContainerDataList,\n});\n"],"mappings":";;;;;;;;;;;;AA+CA,IAAa,wBAAwB,EAAE,OAAO,UAAU,gBACtD,oBAAC,YAAD;CAAmB;CAAO,aAAA;CAAY,WAAW,GAAG,kBAAkB,SAAS;CAC5E;AACS,CAAA;AAGd,IAAa,2BAA2B,EAAE,OAAO,SAAS,K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4 @@
1
- require('./tabbed-container.css');const require_combobox = require("./combobox-Cg-KVjdt.cjs");
1
+ require('./tabbed-container.css');const require_combobox = require("./combobox-CtEvUaJc.cjs");
2
2
  const require_data_list = require("./data-list-BXe_ULaL.cjs");
3
3
  const require_components_SearchInput = require("./components/SearchInput.cjs.js");
4
4
  const require_tabs_content = require("./tabs-content-4sU2blc6.cjs");
@@ -132,4 +132,4 @@ Object.defineProperty(exports, "TabbedContainer", {
132
132
  }
133
133
  });
134
134
 
135
- //# sourceMappingURL=tabbed-container-DbgPRklc.cjs.map
135
+ //# sourceMappingURL=tabbed-container-DLntsyso.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabbed-container-DbgPRklc.cjs","names":["TabContent","cn","DataList","useContext","TabsContext","SearchInput","TooltipProvider","Tooltip","TooltipTrigger","IconFilter2","Txt","Combobox","TooltipContent","isValidElement","Children","Tabs","TabList","Tab"],"sources":["../src/ds/layout/tabbed-container/tabbed-container-root.tsx","../src/ds/layout/tabbed-container/index.ts"],"sourcesContent":["import { Children, isValidElement, useContext } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport './tabbed-container.css';\nimport { Combobox } from '@/ds/components/Combobox/combobox';\nimport type { ComboboxProps } from '@/ds/components/Combobox/combobox';\nimport { DataList } from '@/ds/components/DataList/data-list';\nimport type { DataListFit } from '@/ds/components/DataList/data-list-root';\nimport { SearchInput } from '@/ds/components/SearchInput';\nimport type { SearchInputProps } from '@/ds/components/SearchInput';\nimport { TabContent } from '@/ds/components/Tabs/tabs-content';\nimport { TabsContext } from '@/ds/components/Tabs/tabs-context';\nimport { TabList } from '@/ds/components/Tabs/tabs-list';\nimport { Tabs } from '@/ds/components/Tabs/tabs-root';\nimport type { TabsRootProps } from '@/ds/components/Tabs/tabs-root';\nimport { Tab } from '@/ds/components/Tabs/tabs-tab';\nimport type { TabProps } from '@/ds/components/Tabs/tabs-tab';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/ds/components/Tooltip/tooltip';\nimport { Txt } from '@/ds/components/Txt';\nimport { IconFilter2 } from '@/ds/icons/central/IconFilter2';\nimport { cn } from '@/lib/utils';\n\nexport type TabbedContainerSearchProps = Pick<SearchInputProps, 'debounceMs' | 'label' | 'placeholder'> & {\n value: string;\n onSearch: (search: string) => void;\n};\n\nexport type TabbedContainerFilterProps = ComboboxProps & { 'aria-label': string };\n\ntype TabbedContainerItemProps = Pick<\n TabProps,\n 'attention' | 'disabled' | 'disabledTooltip' | 'onClick' | 'onClose' | 'value'\n> & {\n label: ReactNode;\n children: ReactNode;\n className?: string;\n tabClassName?: string;\n};\n\nexport type TabbedContainerPanelProps = TabbedContainerItemProps;\n\nexport type TabbedContainerDataListProps = TabbedContainerItemProps & {\n columns: string;\n search?: TabbedContainerSearchProps;\n filter?: TabbedContainerFilterProps;\n fit?: DataListFit;\n};\n\nexport const TabbedContainerPanel = ({ value, children, className }: TabbedContainerPanelProps) => (\n <TabContent value={value} keepMounted className={cn('min-h-0 flex-1', className)}>\n {children}\n </TabContent>\n);\n\nexport const TabbedContainerDataList = ({ value, columns, fit, children, className }: TabbedContainerDataListProps) => (\n <TabContent value={value} keepMounted className={cn('tabbed-container-data-list min-h-0 flex-1', className)}>\n <DataList columns={columns} fit={fit} variant=\"light\" className=\"min-h-0 px-0 pb-0\">\n {children}\n </DataList>\n </TabContent>\n);\n\nexport const DataListControls = ({ dataLists }: { dataLists: ReactElement<TabbedContainerDataListProps>[] }) => {\n const tabs = useContext(TabsContext);\n return dataLists.map(dataList => {\n const { filter, search, value } = dataList.props;\n if (!search && !filter) return null;\n const active = value === tabs?.value;\n const filterCount = filter ? (Array.isArray(filter.value) ? filter.value.length : filter.value ? 1 : 0) : 0;\n return (\n <div key={value} data-slot=\"tabbed-container-controls\" data-active={active || undefined} hidden={!active}>\n <div data-slot=\"tabbed-container-query\">\n {search ? (\n <div data-slot=\"tabbed-container-search\">\n <SearchInput\n label={search.label}\n placeholder={search.placeholder}\n value={search.value}\n onValueChange={search.onSearch}\n debounceMs={search.debounceMs ?? 300}\n size=\"md\"\n shortcut={active}\n className=\"max-w-120\"\n />\n </div>\n ) : null}\n {filter ? (\n <TooltipProvider delay={200}>\n <Tooltip>\n <TooltipTrigger asChild>\n <div data-slot=\"tabbed-container-filter\" data-active={filterCount > 0 || undefined}>\n <IconFilter2 aria-hidden=\"true\" />\n {filterCount > 0 ? (\n <Txt as=\"span\" variant=\"meta\" aria-hidden=\"true\" data-slot=\"tabbed-container-filter-count\">\n {filterCount}\n </Txt>\n ) : null}\n {filter.multiple ? (\n <Combobox {...filter} clearLabel=\"Clear\" size=\"md\" variant=\"default\" />\n ) : (\n <Combobox {...filter} size=\"md\" variant=\"default\" />\n )}\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n {filterCount > 0 ? `Filter, ${filterCount} selected` : 'Filter'}\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n ) : null}\n </div>\n </div>\n );\n });\n};\n\nexport type TabbedContainerProps<T extends string> = {\n children: ReactNode;\n defaultTab: T;\n value?: T;\n onValueChange?: (value: T) => void;\n frame?: TabsRootProps<T>['frame'];\n className?: string;\n};\n\ntype TabbedContainerChildProps = TabbedContainerPanelProps | TabbedContainerDataListProps;\n\nconst isContainerChild = (child: ReactNode): child is ReactElement<TabbedContainerChildProps> =>\n isValidElement(child) && (child.type === TabbedContainerPanel || child.type === TabbedContainerDataList);\n\nconst isDataList = (\n child: ReactElement<TabbedContainerChildProps>,\n): child is ReactElement<TabbedContainerDataListProps> => child.type === TabbedContainerDataList;\n\nexport function TabbedContainerRoot<T extends string>({\n children,\n defaultTab,\n value,\n onValueChange,\n frame = 'inset',\n className,\n}: TabbedContainerProps<T>) {\n const panels = Children.toArray(children).filter(isContainerChild);\n const dataLists = panels.filter(isDataList);\n return (\n <Tabs\n defaultTab={defaultTab}\n value={value}\n onValueChange={onValueChange}\n appearance=\"contained\"\n frame={frame}\n className={cn('tabbed-container min-h-0 flex-1', className)}\n >\n <div data-slot=\"tabbed-container-rail\">\n <div data-slot=\"tabbed-container-tabs\">\n <TabList>\n {panels.map(panel => (\n <Tab\n key={panel.props.value}\n value={panel.props.value}\n disabled={panel.props.disabled}\n attention={panel.props.attention}\n disabledTooltip={panel.props.disabledTooltip}\n onClick={panel.props.onClick}\n onClose={panel.props.onClose}\n className={panel.props.tabClassName}\n >\n {panel.props.label}\n </Tab>\n ))}\n </TabList>\n </div>\n <DataListControls dataLists={dataLists} />\n </div>\n {panels}\n </Tabs>\n );\n}\n","import { TabbedContainerDataList, TabbedContainerPanel, TabbedContainerRoot } from './tabbed-container-root';\n\nexport type {\n TabbedContainerDataListProps,\n TabbedContainerFilterProps,\n TabbedContainerPanelProps,\n TabbedContainerProps,\n TabbedContainerSearchProps,\n} from './tabbed-container-root';\n\nexport const TabbedContainer = Object.assign(TabbedContainerRoot, {\n Panel: TabbedContainerPanel,\n DataList: TabbedContainerDataList,\n});\n"],"mappings":";;;;;;;;;;;;AA+CA,IAAa,wBAAwB,EAAE,OAAO,UAAU,gBACtD,iBAAA,GAAA,kBAAA,IAAA,CAACA,qBAAAA,YAAD;CAAmB;CAAO,aAAA;CAAY,WAAWC,cAAAA,GAAG,kBAAkB,SAAS;CAC5E;AACS,CAAA;AAGd,IAAa,2BAA2B,EAAE,OAAO,SAAS,KAAK,UAAU,gBACvE,iBAAA,GAAA,kBAAA,IAAA,CAACD,qBAAAA,YAAD;CAAmB;CAAO,aAAA;CAAY,WAAWC,cAAAA,GAAG,6CAA6C,SAAS;CACxG,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,kBAAAA,UAAD;EAAmB;EAAc;EAAK,SAAQ;EAAQ,WAAU;EAC7D;CACO,CAAA;AACA,CAAA;AAGd,IAAa,oBAAoB,EAAE,gBAA6E;CAC9G,MAAM,QAAA,GAAOC,MAAAA,WAAAA,CAAWC,iBAAAA,WAAW;CACnC,OAAO,UAAU,KAAI,aAAY;EAC/B,MAAM,EAAE,QAAQ,QAAQ,UAAU,S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AAM;KACrB,WAAW,MAAM,MAAM;KAEtB,UAAA,MAAM,MAAM;IACV,GAVE,MAAM,MAAM,KAUd,CACN,EACM,CAAA;GACN,CAAA,GACL,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAD,EAA6B,UAAY,CAAA,CACtC;EACJ,CAAA,GAAA,MACG;;AAEV;;ACtKA,IAAa,kBAAkB,OAAO,OAAO,qBAAqB;CAChE,OAAO;CACP,UAAU;AACZ,CAAC"}
1
+ {"version":3,"file":"tabbed-container-DLntsyso.cjs","names":["TabContent","cn","DataList","useContext","TabsContext","SearchInput","TooltipProvider","Tooltip","TooltipTrigger","IconFilter2","Txt","Combobox","TooltipContent","isValidElement","Children","Tabs","TabList","Tab"],"sources":["../src/ds/layout/tabbed-container/tabbed-container-root.tsx","../src/ds/layout/tabbed-container/index.ts"],"sourcesContent":["import { Children, isValidElement, useContext } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport './tabbed-container.css';\nimport { Combobox } from '@/ds/components/Combobox/combobox';\nimport type { ComboboxProps } from '@/ds/components/Combobox/combobox';\nimport { DataList } from '@/ds/components/DataList/data-list';\nimport type { DataListFit } from '@/ds/components/DataList/data-list-root';\nimport { SearchInput } from '@/ds/components/SearchInput';\nimport type { SearchInputProps } from '@/ds/components/SearchInput';\nimport { TabContent } from '@/ds/components/Tabs/tabs-content';\nimport { TabsContext } from '@/ds/components/Tabs/tabs-context';\nimport { TabList } from '@/ds/components/Tabs/tabs-list';\nimport { Tabs } from '@/ds/components/Tabs/tabs-root';\nimport type { TabsRootProps } from '@/ds/components/Tabs/tabs-root';\nimport { Tab } from '@/ds/components/Tabs/tabs-tab';\nimport type { TabProps } from '@/ds/components/Tabs/tabs-tab';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/ds/components/Tooltip/tooltip';\nimport { Txt } from '@/ds/components/Txt';\nimport { IconFilter2 } from '@/ds/icons/central/IconFilter2';\nimport { cn } from '@/lib/utils';\n\nexport type TabbedContainerSearchProps = Pick<SearchInputProps, 'debounceMs' | 'label' | 'placeholder'> & {\n value: string;\n onSearch: (search: string) => void;\n};\n\nexport type TabbedContainerFilterProps = ComboboxProps & { 'aria-label': string };\n\ntype TabbedContainerItemProps = Pick<\n TabProps,\n 'attention' | 'disabled' | 'disabledTooltip' | 'onClick' | 'onClose' | 'value'\n> & {\n label: ReactNode;\n children: ReactNode;\n className?: string;\n tabClassName?: string;\n};\n\nexport type TabbedContainerPanelProps = TabbedContainerItemProps;\n\nexport type TabbedContainerDataListProps = TabbedContainerItemProps & {\n columns: string;\n search?: TabbedContainerSearchProps;\n filter?: TabbedContainerFilterProps;\n fit?: DataListFit;\n};\n\nexport const TabbedContainerPanel = ({ value, children, className }: TabbedContainerPanelProps) => (\n <TabContent value={value} keepMounted className={cn('min-h-0 flex-1', className)}>\n {children}\n </TabContent>\n);\n\nexport const TabbedContainerDataList = ({ value, columns, fit, children, className }: TabbedContainerDataListProps) => (\n <TabContent value={value} keepMounted className={cn('tabbed-container-data-list min-h-0 flex-1', className)}>\n <DataList columns={columns} fit={fit} variant=\"light\" className=\"min-h-0 px-0 pb-0\">\n {children}\n </DataList>\n </TabContent>\n);\n\nexport const DataListControls = ({ dataLists }: { dataLists: ReactElement<TabbedContainerDataListProps>[] }) => {\n const tabs = useContext(TabsContext);\n return dataLists.map(dataList => {\n const { filter, search, value } = dataList.props;\n if (!search && !filter) return null;\n const active = value === tabs?.value;\n const filterCount = filter ? (Array.isArray(filter.value) ? filter.value.length : filter.value ? 1 : 0) : 0;\n return (\n <div key={value} data-slot=\"tabbed-container-controls\" data-active={active || undefined} hidden={!active}>\n <div data-slot=\"tabbed-container-query\">\n {search ? (\n <div data-slot=\"tabbed-container-search\">\n <SearchInput\n label={search.label}\n placeholder={search.placeholder}\n value={search.value}\n onValueChange={search.onSearch}\n debounceMs={search.debounceMs ?? 300}\n size=\"md\"\n shortcut={active}\n className=\"max-w-120\"\n />\n </div>\n ) : null}\n {filter ? (\n <TooltipProvider delay={200}>\n <Tooltip>\n <TooltipTrigger asChild>\n <div data-slot=\"tabbed-container-filter\" data-active={filterCount > 0 || undefined}>\n <IconFilter2 aria-hidden=\"true\" />\n {filterCount > 0 ? (\n <Txt as=\"span\" variant=\"meta\" aria-hidden=\"true\" data-slot=\"tabbed-container-filter-count\">\n {filterCount}\n </Txt>\n ) : null}\n {filter.multiple ? (\n <Combobox {...filter} clearLabel=\"Clear\" size=\"md\" variant=\"default\" />\n ) : (\n <Combobox {...filter} size=\"md\" variant=\"default\" />\n )}\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n {filterCount > 0 ? `Filter, ${filterCount} selected` : 'Filter'}\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n ) : null}\n </div>\n </div>\n );\n });\n};\n\nexport type TabbedContainerProps<T extends string> = {\n children: ReactNode;\n defaultTab: T;\n value?: T;\n onValueChange?: (value: T) => void;\n frame?: TabsRootProps<T>['frame'];\n className?: string;\n};\n\ntype TabbedContainerChildProps = TabbedContainerPanelProps | TabbedContainerDataListProps;\n\nconst isContainerChild = (child: ReactNode): child is ReactElement<TabbedContainerChildProps> =>\n isValidElement(child) && (child.type === TabbedContainerPanel || child.type === TabbedContainerDataList);\n\nconst isDataList = (\n child: ReactElement<TabbedContainerChildProps>,\n): child is ReactElement<TabbedContainerDataListProps> => child.type === TabbedContainerDataList;\n\nexport function TabbedContainerRoot<T extends string>({\n children,\n defaultTab,\n value,\n onValueChange,\n frame = 'inset',\n className,\n}: TabbedContainerProps<T>) {\n const panels = Children.toArray(children).filter(isContainerChild);\n const dataLists = panels.filter(isDataList);\n return (\n <Tabs\n defaultTab={defaultTab}\n value={value}\n onValueChange={onValueChange}\n appearance=\"contained\"\n frame={frame}\n className={cn('tabbed-container min-h-0 flex-1', className)}\n >\n <div data-slot=\"tabbed-container-rail\">\n <div data-slot=\"tabbed-container-tabs\">\n <TabList>\n {panels.map(panel => (\n <Tab\n key={panel.props.value}\n value={panel.props.value}\n disabled={panel.props.disabled}\n attention={panel.props.attention}\n disabledTooltip={panel.props.disabledTooltip}\n onClick={panel.props.onClick}\n onClose={panel.props.onClose}\n className={panel.props.tabClassName}\n >\n {panel.props.label}\n </Tab>\n ))}\n </TabList>\n </div>\n <DataListControls dataLists={dataLists} />\n </div>\n {panels}\n </Tabs>\n );\n}\n","import { TabbedContainerDataList, TabbedContainerPanel, TabbedContainerRoot } from './tabbed-container-root';\n\nexport type {\n TabbedContainerDataListProps,\n TabbedContainerFilterProps,\n TabbedContainerPanelProps,\n TabbedContainerProps,\n TabbedContainerSearchProps,\n} from './tabbed-container-root';\n\nexport const TabbedContainer = Object.assign(TabbedContainerRoot, {\n Panel: TabbedContainerPanel,\n DataList: TabbedContainerDataList,\n});\n"],"mappings":";;;;;;;;;;;;AA+CA,IAAa,wBAAwB,EAAE,OAAO,UAAU,gBACtD,iBAAA,GAAA,kBAAA,IAAA,CAACA,qBAAAA,YAAD;CAAmB;CAAO,aAAA;CAAY,WAAWC,cAAAA,GAAG,kBAAkB,SAAS;CAC5E;AACS,CAAA;AAGd,IAAa,2BAA2B,EAAE,OAAO,SAAS,KAAK,UAAU,gBACvE,iBAAA,GAAA,kBAAA,IAAA,CAACD,qBAAAA,YAAD;CAAmB;CAAO,aAAA;CAAY,WAAWC,cAAAA,GAAG,6CAA6C,SAAS;CACxG,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,kBAAAA,UAAD;EAAmB;EAAc;EAAK,SAAQ;EAAQ,WAAU;EAC7D;CACO,CAAA;AACA,CAAA;AAGd,IAAa,oBAAoB,EAAE,gBAA6E;CAC9G,MAAM,QAAA,GAAOC,MAAAA,WAAAA,CAAWC,iBAAAA,WAAW;CACnC,OAAO,UAAU,KAAI,aAAY;EAC/B,MAAM,EAAE,QAAQ,QAAQ,UAAU,SAAS;EAC3C,IAAI,CAAC,UAAU,CAAC,QAAQ,OAAO;EAC/B,MAAM,SAAS,UAAU,MAAM;EAC/B,MAAM,cAAc,SAAU,MAAM,QAA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BAAA,GAAA,kBAAA,IAAA,CAAC,kBAAD,EAA6B,UAAY,CAAA,CACtC;EACJ,CAAA,GAAA,MACG;;AAEV;;ACtKA,IAAa,kBAAkB,OAAO,OAAO,qBAAqB;CAChE,OAAO;CACP,UAAU;AACZ,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mastra/playground-ui",
3
3
  "type": "module",
4
- "version": "72.0.0-alpha.0",
4
+ "version": "72.0.0-alpha.1",
5
5
  "description": "Mastra Playground components",
6
6
  "sideEffects": [
7
7
  "**/*.css"
@@ -232,8 +232,8 @@
232
232
  "react-dom": ">=19.0.0",
233
233
  "tailwindcss": "^4.0.0",
234
234
  "@mastra/ai-sdk": "^1.12.2-alpha.0",
235
- "@mastra/react": "1.17.0-alpha.0",
236
- "@mastra/client-js": "^1.62.1-alpha.0"
235
+ "@mastra/client-js": "^1.62.1-alpha.1",
236
+ "@mastra/react": "1.17.0-alpha.1"
237
237
  },
238
238
  "devDependencies": {
239
239
  "@modelcontextprotocol/client": "2.4.0",
@@ -279,13 +279,13 @@
279
279
  "vite": "^8.3.5",
280
280
  "vite-plugin-lib-inject-css": "^2.2.2",
281
281
  "vitest": "5.1.0",
282
- "@internal/lint": "0.0.152",
283
282
  "@internal/ai-sdk-v5": "0.0.99",
283
+ "@internal/lint": "0.0.152",
284
284
  "@mastra/ai-sdk": "1.12.2-alpha.0",
285
- "@mastra/client-js": "^1.62.1-alpha.0",
285
+ "@mastra/client-js": "^1.62.1-alpha.1",
286
+ "@mastra/core": "1.87.0-alpha.1",
286
287
  "@mastra/memory": "1.41.3",
287
- "@mastra/core": "1.87.0-alpha.0",
288
- "@mastra/react": "1.17.0-alpha.0",
288
+ "@mastra/react": "1.17.0-alpha.1",
289
289
  "@mastra/schema-compat": "1.4.1"
290
290
  },
291
291
  "homepage": "https://mastra.ai",
@@ -1 +0,0 @@
1
- {"version":3,"file":"combobox-Cg-KVjdt.cjs","names":["isIconButtonSize","BaseCombobox","fieldErrorId","keepOwnAccessibleName","deprecatedErrorAria","cn","_Fragment","comboboxStyles","Button","IconCrossMedium","ComboboxContent","comboboxPopupWidthClass","ComboboxSearch","ComboboxEmpty","ComboboxList","ComboboxItem","ComboboxInput","ComboboxTrigger","ComboboxValue","ComboboxChips","ComboboxChip","ComboboxChipsInput","React","ComboboxRoot","useFieldAriaIds","FieldBlock"],"sources":["../src/ds/components/Combobox/combobox.tsx"],"sourcesContent":["import { Combobox as BaseCombobox } from '@base-ui/react/combobox';\nimport * as React from 'react';\nimport {\n ComboboxChip,\n ComboboxChips,\n ComboboxChipsInput,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n ComboboxRoot,\n ComboboxSearch,\n ComboboxTrigger,\n ComboboxValue,\n} from './combobox-parts';\nimport { comboboxPopupWidthClass, comboboxStyles } from './combobox-styles';\nimport type { ComboboxPopupWidth, ComboboxVariant } from './combobox-styles';\nimport { Button, isIconButtonSize } from '@/ds/components/Button/Button';\nimport type { ButtonSize } from '@/ds/components/Button/Button';\nimport { keepOwnAccessibleName, useFieldAriaIds } from '@/ds/components/Field/field-control-aria';\nimport { FieldBlock } from '@/ds/components/FormFieldBlocks/block/field-block';\nimport { fieldErrorId } from '@/ds/components/FormFieldBlocks/block/field-error-id';\nimport { IconCrossMedium } from '@/ds/icons/central/IconCrossMedium';\nimport { deprecatedErrorAria } from '@/ds/primitives/form-element';\nimport type { PortalContainer } from '@/ds/primitives/portal-container';\nimport { cn } from '@/lib/utils';\n\nexport type { ComboboxPopupWidth, ComboboxVariant } from './combobox-styles';\n\nexport type ComboboxOption = {\n label: string;\n value: string;\n description?: string;\n displayLabel?: React.ReactNode;\n start?: React.ReactNode;\n end?: React.ReactNode;\n /** Extra terms the search matches besides `label` (aliases, ids, a provider name). Never displayed. */\n keywords?: readonly string[];\n};\n\ntype ComboboxSharedProps = {\n options: ComboboxOption[];\n placeholder?: React.ReactNode;\n /** The search row's placeholder for compact triggers. A field (inside a `Field`) searches in itself and shows `placeholder`. */\n searchPlaceholder?: string;\n emptyText?: string;\n className?: string;\n disabled?: boolean;\n /**\n * `default` inside a `Field` is a form field you type in to search. `ghost` (and the legacy `outline`/`link`),\n * or any variant outside a `Field`, is a compact trigger with the search inside the popup.\n */\n variant?: ComboboxVariant;\n /** Icon sizes (`icon-*`) render a chevron-only trigger with the search in the popup; pass `aria-label` to name it. */\n size?: ButtonSize;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n container?: PortalContainer;\n id?: string;\n 'aria-label'?: string;\n 'aria-describedby'?: string;\n /** Which edge of the trigger the popup lines up with. `end` opens it leftwards (e.g. an icon trigger at the end of a row). */\n align?: 'start' | 'center' | 'end';\n /** A fixed popup width for long options (e.g. model ids). Without it the popup takes the trigger's width, at least 11rem. */\n popupWidth?: ComboboxPopupWidth;\n showChevron?: boolean;\n iconOnlyValue?: boolean;\n allowCustomValue?: boolean;\n /** Called with the search text as it changes (and with `''` after a compact trigger's selection resets it). */\n onInputValueChange?: (value: string) => void;\n /** @deprecated Wrap the combobox in `<Field invalid>` with a `FieldError`. */\n error?: string;\n /** @deprecated Only keyed the `error` message id; a `Field` links its error without one. */\n name?: string;\n};\n\nexport type ComboboxSingleProps = ComboboxSharedProps & {\n multiple?: false;\n value?: string;\n onValueChange?: (value: string) => void;\n};\n\nexport type ComboboxMultipleProps = ComboboxSharedProps & {\n multiple: true;\n value?: readonly string[];\n onValueChange?: (value: string[]) => void;\n clearLabel?: string;\n};\n\nexport type ComboboxProps = ComboboxSingleProps | ComboboxMultipleProps;\n\nconst EMPTY_VALUES: readonly string[] = [];\n\nfunction isMultipleCombobox(props: ComboboxProps): props is ComboboxMultipleProps {\n return props.multiple === true;\n}\n\n/** The text a field shows for its value: a plain-text `displayLabel` wins over `label`. */\nfunction optionText(option: ComboboxOption) {\n return typeof option.displayLabel === 'string' ? option.displayLabel : option.label;\n}\n\n/** Inputs take a text placeholder only; a ReactNode placeholder keeps the compact trigger. */\nfunction textPlaceholder(placeholder: React.ReactNode) {\n return typeof placeholder === 'string' ? placeholder : undefined;\n}\n\n/**\n * How the combobox renders:\n * - `field`: a single select inside a `Field` searches in the field, like a text input.\n * - `chips`: a multiple select inside a `Field` shows its picks as chips and searches in the field.\n * - `trigger`: everything else (toolbars, breadcrumbs, inline pickers that callers lay out as a button)\n * keeps a compact trigger with the search inside the popup.\n */\ntype ComboboxShape = 'field' | 'chips' | 'trigger';\n\nfunction getComboboxShape({\n inFieldContext,\n multiple,\n variant,\n size,\n iconOnlyValue,\n showChevron,\n placeholder,\n}: {\n inFieldContext: boolean;\n multiple: boolean;\n variant: ComboboxVariant;\n size: ButtonSize;\n iconOnlyValue: boolean;\n showChevron: boolean;\n placeholder: React.ReactNode;\n}): ComboboxShape {\n if (!inFieldContext) return 'trigger';\n if (variant !== 'default') return 'trigger';\n if (isIconButtonSize(size)) return 'trigger';\n if (iconOnlyValue || !showChevron) return 'trigger';\n if (placeholder !== undefined && textPlaceholder(placeholder) === undefined) return 'trigger';\n if (!multiple) return 'field';\n // The chips field is tuned to the medium control height.\n if (size !== 'md') return 'trigger';\n return 'chips';\n}\n\n/** A \"Use “text”\" option for typed text that isn't one of the options yet. */\nfunction getCustomOption(options: ComboboxOption[], inputValue: string): ComboboxOption | undefined {\n const value = inputValue.trim();\n if (!value) return undefined;\n // A field shows the selected option's text while it's closed; that isn't a new value.\n if (options.some(option => option.value === value || optionText(option) === value)) return undefined;\n return { label: `Use “${value}”`, value };\n}\n\n/** Matches the label like Base UI's default filter, the text a field shows, and any keywords. */\nfunction useOptionFilter() {\n const { contains } = BaseCombobox.useFilter();\n return (option: ComboboxOption, query: string) =>\n [option.label, optionText(option), ...(option.keywords ?? [])].some(text => contains(text, query));\n}\n\n/** Names the control when nothing else does: an `id` or a `Field` links a label to it instead. */\nfunction getFallbackAriaLabel({ hasLabel, multiple }: { hasLabel: boolean; multiple: boolean }) {\n if (hasLabel) return undefined;\n return multiple ? 'Select options' : 'Select option';\n}\n\nfunction getControlProps({\n id,\n ariaLabel,\n ariaDescribedBy,\n hasLabel,\n multiple,\n error,\n errorName,\n}: {\n id?: string;\n ariaLabel?: string;\n ariaDescribedBy?: string;\n hasLabel: boolean;\n multiple: boolean;\n error?: string;\n errorName: string;\n}) {\n const describedBy = [ariaDescribedBy, error ? fieldErrorId(errorName) : undefined].filter(Boolean).join(' ');\n return {\n id,\n 'aria-label': ariaLabel ?? getFallbackAriaLabel({ hasLabel, multiple }),\n ...keepOwnAccessibleName({ 'aria-label': ariaLabel }),\n ...deprecatedErrorAria(Boolean(error)),\n 'aria-describedby': describedBy || undefined,\n };\n}\n\ntype ControlProps = ReturnType<typeof getControlProps>;\n\nfunction triggerClassName({ iconOnlyValue, className }: { iconOnlyValue: boolean; className?: string }) {\n return cn(iconOnlyValue && 'w-auto px-2.5', className);\n}\n\n/** An option row's content: start slot, label over description, end slot. */\nfunction ComboboxOptionContent({ option }: { option: ComboboxOption }) {\n return (\n <>\n {option.start}\n <span className={comboboxStyles.optionText}>\n <span className={comboboxStyles.optionLabel}>{option.label}</span>\n {option.description && <span className={comboboxStyles.optionDescription}>{option.description}</span>}\n </span>\n {option.end ? <span className={comboboxStyles.optionEnd}>{option.end}</span> : null}\n </>\n );\n}\n\nfunction ComboboxClearFooter({ label, onClear }: { label: string; onClear: () => void }) {\n return (\n <div className=\"border-t border-border p-1\">\n <Button\n type=\"button\"\n variant=\"destructive-ghost\"\n size=\"sm\"\n className=\"w-full justify-start\"\n onClick={onClear}\n icon={<IconCrossMedium />}\n >\n {label}\n </Button>\n </div>\n );\n}\n\n/** The popup: the search row for a compact trigger (a field searches in itself), then the options. */\nfunction ComboboxOptionsContent({\n popupWidth,\n showSearch,\n searchPlaceholder,\n emptyText,\n align,\n container,\n footer,\n}: {\n popupWidth?: ComboboxPopupWidth;\n showSearch: boolean;\n searchPlaceholder: string;\n emptyText: string;\n align: 'start' | 'center' | 'end';\n container?: PortalContainer;\n footer?: React.ReactNode;\n}) {\n return (\n <ComboboxContent align={align} container={container} className={popupWidth && comboboxPopupWidthClass[popupWidth]}>\n {showSearch ? <ComboboxSearch placeholder={searchPlaceholder} /> : null}\n <ComboboxEmpty>{emptyText}</ComboboxEmpty>\n <ComboboxList>\n {(option: ComboboxOption) => (\n <ComboboxItem key={option.value} value={option}>\n <ComboboxOptionContent option={option} />\n </ComboboxItem>\n )}\n </ComboboxList>\n {footer}\n </ComboboxContent>\n );\n}\n\ntype TriggerLookProps = {\n variant: ComboboxVariant;\n size: ButtonSize;\n showChevron: boolean;\n iconOnlyValue: boolean;\n className?: string;\n};\n\nfunction SingleComboboxControl({\n shape,\n controlProps,\n placeholder,\n selectedOption,\n look,\n}: {\n shape: ComboboxShape;\n controlProps: ControlProps;\n placeholder: React.ReactNode;\n selectedOption?: ComboboxOption;\n look: TriggerLookProps;\n}) {\n if (shape === 'field') {\n return (\n <ComboboxInput\n {...controlProps}\n size={isIconButtonSize(look.size) ? undefined : look.size}\n placeholder={textPlaceholder(placeholder)}\n start={selectedOption?.start}\n className={look.className}\n />\n );\n }\n\n return (\n <ComboboxTrigger\n {...controlProps}\n variant={look.variant}\n size={look.size}\n showChevron={look.showChevron}\n icon={isIconButtonSize(look.size) ? undefined : selectedOption?.start}\n className={triggerClassName(look)}\n >\n {selectedOption?.displayLabel ?? <ComboboxValue placeholder={placeholder} />}\n </ComboboxTrigger>\n );\n}\n\nfunction MultipleComboboxControl({\n shape,\n controlProps,\n placeholder,\n selectedCount,\n look,\n}: {\n shape: ComboboxShape;\n controlProps: ControlProps;\n placeholder: React.ReactNode;\n selectedCount: number;\n look: TriggerLookProps;\n}) {\n if (shape === 'chips') {\n return (\n <ComboboxChips className={look.className}>\n <ComboboxValue>\n {(items: ComboboxOption[]) => (\n <>\n {items.map(item => (\n <ComboboxChip key={item.value}>{item.label}</ComboboxChip>\n ))}\n <ComboboxChipsInput\n {...controlProps}\n placeholder={items.length === 0 ? textPlaceholder(placeholder) : undefined}\n />\n </>\n )}\n </ComboboxValue>\n </ComboboxChips>\n );\n }\n\n const text = selectedCount === 0 ? placeholder : `${selectedCount} selected`;\n return (\n <ComboboxTrigger\n {...controlProps}\n variant={look.variant}\n size={look.size}\n showChevron={look.showChevron}\n className={triggerClassName(look)}\n >\n <span className={cn(selectedCount === 0 && comboboxStyles.placeholder)}>{text}</span>\n </ComboboxTrigger>\n );\n}\n\ntype ShapeProps = { shape: ComboboxShape; controlProps: ControlProps };\n\nfunction SingleCombobox({\n shape,\n controlProps,\n options,\n value,\n onValueChange,\n placeholder = 'Select option',\n searchPlaceholder = 'Search',\n emptyText = 'No option found.',\n className,\n disabled = false,\n variant = 'default',\n size = 'md',\n open,\n onOpenChange,\n container,\n align = 'start',\n popupWidth,\n showChevron = true,\n iconOnlyValue = false,\n allowCustomValue = false,\n onInputValueChange,\n}: ComboboxSingleProps & ShapeProps) {\n // The search text: a field's own text, or the compact trigger's popup search.\n const [inputValue, setInputValue] = React.useState('');\n const filter = useOptionFilter();\n const inField = shape === 'field';\n const selectedOption = options.find(option => option.value === value);\n const customOption = allowCustomValue ? getCustomOption(options, inputValue) : undefined;\n const items = customOption ? [customOption, ...options] : options;\n\n function handleInputValueChange(next: string) {\n setInputValue(next);\n onInputValueChange?.(next);\n }\n\n function handleValueChange(item: ComboboxOption | null) {\n if (!item) return;\n onValueChange?.(item.value);\n // A field shows the picked option; a compact trigger's popup search starts empty next time.\n if (!inField) handleInputValueChange('');\n }\n\n return (\n <ComboboxRoot\n autoHighlight\n items={items}\n filter={filter}\n itemToStringLabel={optionText}\n // Base UI's \"nothing selected\" is null.\n value={selectedOption ?? null}\n // A field owns its text (the selected option's, or the search); a compact trigger's search is reset here.\n inputValue={inField ? undefined : inputValue}\n onInputValueChange={handleInputValueChange}\n onValueChange={handleValueChange}\n disabled={disabled}\n open={open}\n onOpenChange={onOpenChange}\n >\n <SingleComboboxControl\n shape={shape}\n controlProps={controlProps}\n placeholder={placeholder}\n selectedOption={selectedOption}\n look={{ variant, size, showChevron, iconOnlyValue, className }}\n />\n <ComboboxOptionsContent\n popupWidth={popupWidth}\n showSearch={!inField}\n searchPlaceholder={searchPlaceholder}\n emptyText={emptyText}\n align={align}\n container={container}\n />\n </ComboboxRoot>\n );\n}\n\nfunction MultipleCombobox({\n shape,\n controlProps,\n options,\n value = EMPTY_VALUES,\n onValueChange,\n clearLabel,\n placeholder = 'Select options',\n searchPlaceholder = 'Search',\n emptyText = 'No option found.',\n className,\n disabled = false,\n variant = 'default',\n size = 'md',\n open,\n onOpenChange,\n container,\n align = 'start',\n popupWidth,\n showChevron = true,\n iconOnlyValue = false,\n}: ComboboxMultipleProps & ShapeProps) {\n const filter = useOptionFilter();\n const selectedValues = new Set(value);\n const selectedOptions = options.filter(option => selectedValues.has(option.value));\n const footer =\n clearLabel && selectedOptions.length > 0 ? (\n <ComboboxClearFooter label={clearLabel} onClear={() => onValueChange?.([])} />\n ) : undefined;\n\n return (\n <ComboboxRoot\n multiple\n autoHighlight\n items={options}\n filter={filter}\n value={selectedOptions}\n onValueChange={items => onValueChange?.(items.map(item => item.value))}\n disabled={disabled}\n open={open}\n onOpenChange={onOpenChange}\n >\n <MultipleComboboxControl\n shape={shape}\n controlProps={controlProps}\n placeholder={placeholder}\n selectedCount={selectedOptions.length}\n look={{ variant, size, showChevron, iconOnlyValue, className }}\n />\n <ComboboxOptionsContent\n popupWidth={popupWidth}\n showSearch={shape !== 'chips'}\n searchPlaceholder={searchPlaceholder}\n emptyText={emptyText}\n align={align}\n container={container}\n footer={footer}\n />\n </ComboboxRoot>\n );\n}\n\n/**\n * A searchable select driven by `options`, built on the Combobox parts.\n *\n * Inside a `Field`, a `default` combobox searches right in the field: a text field for a single value,\n * removable chips for `multiple`. Everywhere else (outside a `Field`, `ghost` and icon-size triggers,\n * custom non-text placeholders) it keeps a compact trigger with the search inside the popup. For anything\n * these props don't cover (groups, rich items), compose the parts directly (`ComboboxRoot`, ...).\n */\nexport function Combobox(props: ComboboxProps) {\n const field = useFieldAriaIds();\n const generatedName = React.useId();\n const multiple = isMultipleCombobox(props);\n const shape = getComboboxShape({\n inFieldContext: Boolean(field),\n multiple,\n variant: props.variant ?? 'default',\n size: props.size ?? 'md',\n iconOnlyValue: props.iconOnlyValue ?? false,\n showChevron: props.showChevron ?? true,\n placeholder: props.placeholder,\n });\n const errorName = props.name ?? generatedName;\n const controlProps = getControlProps({\n id: props.id,\n ariaLabel: props['aria-label'],\n ariaDescribedBy: props['aria-describedby'],\n hasLabel: Boolean(props.id || field),\n multiple,\n error: props.error,\n errorName,\n });\n\n const root = isMultipleCombobox(props) ? (\n <MultipleCombobox {...props} shape={shape} controlProps={controlProps} />\n ) : (\n <SingleCombobox {...props} shape={shape} controlProps={controlProps} />\n );\n\n if (!props.error) return root;\n\n return (\n <div className={comboboxStyles.root}>\n {root}\n <FieldBlock.ErrorMsg name={errorName}>{props.error}</FieldBlock.ErrorMsg>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AA4FA,IAAM,eAAkC,CAAC;AAEzC,SAAS,mBAAmB,OAAsD;CAChF,OAAO,MAAM,aAAa;AAC5B;;AAGA,SAAS,WAAW,QAAwB;CAC1C,OAAO,OAAO,OAAO,iBAAiB,WAAW,OAAO,eAAe,OAAO;AAChF;;AAGA,SAAS,gBAAgB,aAA8B;CACrD,OAAO,OAAO,gBAAgB,WAAW,cAAc,KAAA;AACzD;AAWA,SAAS,iBAAiB,EACxB,gBACA,UACA,SACA,MACA,eACA,aACA,eASgB;CAChB,IAAI,CAAC,gBAAgB,OAAO;CAC5B,IAAI,YAAY,WAAW,OAAO;CAClC,IAAIA,eAAAA,iBAAiB,IAAI,GAAG,OAAO;CACnC,IAAI,iBAAiB,CAAC,aAAa,OAAO;CAC1C,IAAI,gBAAgB,KAAA,KAAa,gBAAgB,WAAW,MAAM,KAAA,GAAW,OAAO;CACpF,IAAI,CAAC,UAAU,OAAO;CAEtB,IAAI,SAAS,MAAM,OAAO;CAC1B,OAAO;AACT;;AAGA,SAAS,gBAAgB,SAA2B,YAA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;;;;;;;AAUA,SAAgB,SAAS,OAAsB;CAC7C,MAAM,QAAQC,2BAAAA,gBAAgB;CAC9B,MAAM,gBAAgBF,MAAM,MAAM;CAClC,MAAM,WAAW,mBAAmB,KAAK;CACzC,MAAM,QAAQ,iBAAiB;EAC7B,gBAAgB,QAAQ,KAAK;EAC7B;EACA,SAAS,MAAM,WAAW;EAC1B,MAAM,MAAM,QAAQ;EACpB,eAAe,MAAM,iBAAiB;EACtC,aAAa,MAAM,eAAe;EAClC,aAAa,MAAM;CACrB,CAAC;CACD,MAAM,YAAY,MAAM,QAAQ;CAChC,MAAM,eAAe,gBAAgB;EACnC,IAAI,MAAM;EACV,WAAW,MAAM;EACjB,iBAAiB,MAAM;EACvB,UAAU,QAAQ,MAAM,MAAM,KAAK;EACnC;EACA,OAAO,MAAM;EACb;CACF,CAAC;CAED,MAAM,OAAO,mBAAmB,KAAK,IACnC,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAD;EAAkB,GAAI;EAAc;EAAqB;CAAe,CAAA,IAExE,iBAAA,GAAA,kBAAA,IAAA,CAAC,gBAAD;EAAgB,GAAI;EAAc;EAAqB;CAAe,CAAA;CAGxE,IAAI,CAAC,MAAM,OAAO,OAAO;CAEzB,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,WAAWf,uBAAAA,eAAe;EAA/B,UAAA,CACG,MACD,iBAAA,GAAA,kBAAA,IAAA,CAACkB,uBAAAA,WAAW,UAAZ;GAAqB,MAAM;GAAY,UAAA,MAAM;EAA2B,CAAA,CACrE;;AAET"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"combobox-Db8NtklU.js","names":["BaseCombobox","_Fragment","React","Combobox"],"sources":["../src/ds/components/Combobox/combobox.tsx"],"sourcesContent":["import { Combobox as BaseCombobox } from '@base-ui/react/combobox';\nimport * as React from 'react';\nimport {\n ComboboxChip,\n ComboboxChips,\n ComboboxChipsInput,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n ComboboxRoot,\n ComboboxSearch,\n ComboboxTrigger,\n ComboboxValue,\n} from './combobox-parts';\nimport { comboboxPopupWidthClass, comboboxStyles } from './combobox-styles';\nimport type { ComboboxPopupWidth, ComboboxVariant } from './combobox-styles';\nimport { Button, isIconButtonSize } from '@/ds/components/Button/Button';\nimport type { ButtonSize } from '@/ds/components/Button/Button';\nimport { keepOwnAccessibleName, useFieldAriaIds } from '@/ds/components/Field/field-control-aria';\nimport { FieldBlock } from '@/ds/components/FormFieldBlocks/block/field-block';\nimport { fieldErrorId } from '@/ds/components/FormFieldBlocks/block/field-error-id';\nimport { IconCrossMedium } from '@/ds/icons/central/IconCrossMedium';\nimport { deprecatedErrorAria } from '@/ds/primitives/form-element';\nimport type { PortalContainer } from '@/ds/primitives/portal-container';\nimport { cn } from '@/lib/utils';\n\nexport type { ComboboxPopupWidth, ComboboxVariant } from './combobox-styles';\n\nexport type ComboboxOption = {\n label: string;\n value: string;\n description?: string;\n displayLabel?: React.ReactNode;\n start?: React.ReactNode;\n end?: React.ReactNode;\n /** Extra terms the search matches besides `label` (aliases, ids, a provider name). Never displayed. */\n keywords?: readonly string[];\n};\n\ntype ComboboxSharedProps = {\n options: ComboboxOption[];\n placeholder?: React.ReactNode;\n /** The search row's placeholder for compact triggers. A field (inside a `Field`) searches in itself and shows `placeholder`. */\n searchPlaceholder?: string;\n emptyText?: string;\n className?: string;\n disabled?: boolean;\n /**\n * `default` inside a `Field` is a form field you type in to search. `ghost` (and the legacy `outline`/`link`),\n * or any variant outside a `Field`, is a compact trigger with the search inside the popup.\n */\n variant?: ComboboxVariant;\n /** Icon sizes (`icon-*`) render a chevron-only trigger with the search in the popup; pass `aria-label` to name it. */\n size?: ButtonSize;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n container?: PortalContainer;\n id?: string;\n 'aria-label'?: string;\n 'aria-describedby'?: string;\n /** Which edge of the trigger the popup lines up with. `end` opens it leftwards (e.g. an icon trigger at the end of a row). */\n align?: 'start' | 'center' | 'end';\n /** A fixed popup width for long options (e.g. model ids). Without it the popup takes the trigger's width, at least 11rem. */\n popupWidth?: ComboboxPopupWidth;\n showChevron?: boolean;\n iconOnlyValue?: boolean;\n allowCustomValue?: boolean;\n /** Called with the search text as it changes (and with `''` after a compact trigger's selection resets it). */\n onInputValueChange?: (value: string) => void;\n /** @deprecated Wrap the combobox in `<Field invalid>` with a `FieldError`. */\n error?: string;\n /** @deprecated Only keyed the `error` message id; a `Field` links its error without one. */\n name?: string;\n};\n\nexport type ComboboxSingleProps = ComboboxSharedProps & {\n multiple?: false;\n value?: string;\n onValueChange?: (value: string) => void;\n};\n\nexport type ComboboxMultipleProps = ComboboxSharedProps & {\n multiple: true;\n value?: readonly string[];\n onValueChange?: (value: string[]) => void;\n clearLabel?: string;\n};\n\nexport type ComboboxProps = ComboboxSingleProps | ComboboxMultipleProps;\n\nconst EMPTY_VALUES: readonly string[] = [];\n\nfunction isMultipleCombobox(props: ComboboxProps): props is ComboboxMultipleProps {\n return props.multiple === true;\n}\n\n/** The text a field shows for its value: a plain-text `displayLabel` wins over `label`. */\nfunction optionText(option: ComboboxOption) {\n return typeof option.displayLabel === 'string' ? option.displayLabel : option.label;\n}\n\n/** Inputs take a text placeholder only; a ReactNode placeholder keeps the compact trigger. */\nfunction textPlaceholder(placeholder: React.ReactNode) {\n return typeof placeholder === 'string' ? placeholder : undefined;\n}\n\n/**\n * How the combobox renders:\n * - `field`: a single select inside a `Field` searches in the field, like a text input.\n * - `chips`: a multiple select inside a `Field` shows its picks as chips and searches in the field.\n * - `trigger`: everything else (toolbars, breadcrumbs, inline pickers that callers lay out as a button)\n * keeps a compact trigger with the search inside the popup.\n */\ntype ComboboxShape = 'field' | 'chips' | 'trigger';\n\nfunction getComboboxShape({\n inFieldContext,\n multiple,\n variant,\n size,\n iconOnlyValue,\n showChevron,\n placeholder,\n}: {\n inFieldContext: boolean;\n multiple: boolean;\n variant: ComboboxVariant;\n size: ButtonSize;\n iconOnlyValue: boolean;\n showChevron: boolean;\n placeholder: React.ReactNode;\n}): ComboboxShape {\n if (!inFieldContext) return 'trigger';\n if (variant !== 'default') return 'trigger';\n if (isIconButtonSize(size)) return 'trigger';\n if (iconOnlyValue || !showChevron) return 'trigger';\n if (placeholder !== undefined && textPlaceholder(placeholder) === undefined) return 'trigger';\n if (!multiple) return 'field';\n // The chips field is tuned to the medium control height.\n if (size !== 'md') return 'trigger';\n return 'chips';\n}\n\n/** A \"Use “text”\" option for typed text that isn't one of the options yet. */\nfunction getCustomOption(options: ComboboxOption[], inputValue: string): ComboboxOption | undefined {\n const value = inputValue.trim();\n if (!value) return undefined;\n // A field shows the selected option's text while it's closed; that isn't a new value.\n if (options.some(option => option.value === value || optionText(option) === value)) return undefined;\n return { label: `Use “${value}”`, value };\n}\n\n/** Matches the label like Base UI's default filter, the text a field shows, and any keywords. */\nfunction useOptionFilter() {\n const { contains } = BaseCombobox.useFilter();\n return (option: ComboboxOption, query: string) =>\n [option.label, optionText(option), ...(option.keywords ?? [])].some(text => contains(text, query));\n}\n\n/** Names the control when nothing else does: an `id` or a `Field` links a label to it instead. */\nfunction getFallbackAriaLabel({ hasLabel, multiple }: { hasLabel: boolean; multiple: boolean }) {\n if (hasLabel) return undefined;\n return multiple ? 'Select options' : 'Select option';\n}\n\nfunction getControlProps({\n id,\n ariaLabel,\n ariaDescribedBy,\n hasLabel,\n multiple,\n error,\n errorName,\n}: {\n id?: string;\n ariaLabel?: string;\n ariaDescribedBy?: string;\n hasLabel: boolean;\n multiple: boolean;\n error?: string;\n errorName: string;\n}) {\n const describedBy = [ariaDescribedBy, error ? fieldErrorId(errorName) : undefined].filter(Boolean).join(' ');\n return {\n id,\n 'aria-label': ariaLabel ?? getFallbackAriaLabel({ hasLabel, multiple }),\n ...keepOwnAccessibleName({ 'aria-label': ariaLabel }),\n ...deprecatedErrorAria(Boolean(error)),\n 'aria-describedby': describedBy || undefined,\n };\n}\n\ntype ControlProps = ReturnType<typeof getControlProps>;\n\nfunction triggerClassName({ iconOnlyValue, className }: { iconOnlyValue: boolean; className?: string }) {\n return cn(iconOnlyValue && 'w-auto px-2.5', className);\n}\n\n/** An option row's content: start slot, label over description, end slot. */\nfunction ComboboxOptionContent({ option }: { option: ComboboxOption }) {\n return (\n <>\n {option.start}\n <span className={comboboxStyles.optionText}>\n <span className={comboboxStyles.optionLabel}>{option.label}</span>\n {option.description && <span className={comboboxStyles.optionDescription}>{option.description}</span>}\n </span>\n {option.end ? <span className={comboboxStyles.optionEnd}>{option.end}</span> : null}\n </>\n );\n}\n\nfunction ComboboxClearFooter({ label, onClear }: { label: string; onClear: () => void }) {\n return (\n <div className=\"border-t border-border p-1\">\n <Button\n type=\"button\"\n variant=\"destructive-ghost\"\n size=\"sm\"\n className=\"w-full justify-start\"\n onClick={onClear}\n icon={<IconCrossMedium />}\n >\n {label}\n </Button>\n </div>\n );\n}\n\n/** The popup: the search row for a compact trigger (a field searches in itself), then the options. */\nfunction ComboboxOptionsContent({\n popupWidth,\n showSearch,\n searchPlaceholder,\n emptyText,\n align,\n container,\n footer,\n}: {\n popupWidth?: ComboboxPopupWidth;\n showSearch: boolean;\n searchPlaceholder: string;\n emptyText: string;\n align: 'start' | 'center' | 'end';\n container?: PortalContainer;\n footer?: React.ReactNode;\n}) {\n return (\n <ComboboxContent align={align} container={container} className={popupWidth && comboboxPopupWidthClass[popupWidth]}>\n {showSearch ? <ComboboxSearch placeholder={searchPlaceholder} /> : null}\n <ComboboxEmpty>{emptyText}</ComboboxEmpty>\n <ComboboxList>\n {(option: ComboboxOption) => (\n <ComboboxItem key={option.value} value={option}>\n <ComboboxOptionContent option={option} />\n </ComboboxItem>\n )}\n </ComboboxList>\n {footer}\n </ComboboxContent>\n );\n}\n\ntype TriggerLookProps = {\n variant: ComboboxVariant;\n size: ButtonSize;\n showChevron: boolean;\n iconOnlyValue: boolean;\n className?: string;\n};\n\nfunction SingleComboboxControl({\n shape,\n controlProps,\n placeholder,\n selectedOption,\n look,\n}: {\n shape: ComboboxShape;\n controlProps: ControlProps;\n placeholder: React.ReactNode;\n selectedOption?: ComboboxOption;\n look: TriggerLookProps;\n}) {\n if (shape === 'field') {\n return (\n <ComboboxInput\n {...controlProps}\n size={isIconButtonSize(look.size) ? undefined : look.size}\n placeholder={textPlaceholder(placeholder)}\n start={selectedOption?.start}\n className={look.className}\n />\n );\n }\n\n return (\n <ComboboxTrigger\n {...controlProps}\n variant={look.variant}\n size={look.size}\n showChevron={look.showChevron}\n icon={isIconButtonSize(look.size) ? undefined : selectedOption?.start}\n className={triggerClassName(look)}\n >\n {selectedOption?.displayLabel ?? <ComboboxValue placeholder={placeholder} />}\n </ComboboxTrigger>\n );\n}\n\nfunction MultipleComboboxControl({\n shape,\n controlProps,\n placeholder,\n selectedCount,\n look,\n}: {\n shape: ComboboxShape;\n controlProps: ControlProps;\n placeholder: React.ReactNode;\n selectedCount: number;\n look: TriggerLookProps;\n}) {\n if (shape === 'chips') {\n return (\n <ComboboxChips className={look.className}>\n <ComboboxValue>\n {(items: ComboboxOption[]) => (\n <>\n {items.map(item => (\n <ComboboxChip key={item.value}>{item.label}</ComboboxChip>\n ))}\n <ComboboxChipsInput\n {...controlProps}\n placeholder={items.length === 0 ? textPlaceholder(placeholder) : undefined}\n />\n </>\n )}\n </ComboboxValue>\n </ComboboxChips>\n );\n }\n\n const text = selectedCount === 0 ? placeholder : `${selectedCount} selected`;\n return (\n <ComboboxTrigger\n {...controlProps}\n variant={look.variant}\n size={look.size}\n showChevron={look.showChevron}\n className={triggerClassName(look)}\n >\n <span className={cn(selectedCount === 0 && comboboxStyles.placeholder)}>{text}</span>\n </ComboboxTrigger>\n );\n}\n\ntype ShapeProps = { shape: ComboboxShape; controlProps: ControlProps };\n\nfunction SingleCombobox({\n shape,\n controlProps,\n options,\n value,\n onValueChange,\n placeholder = 'Select option',\n searchPlaceholder = 'Search',\n emptyText = 'No option found.',\n className,\n disabled = false,\n variant = 'default',\n size = 'md',\n open,\n onOpenChange,\n container,\n align = 'start',\n popupWidth,\n showChevron = true,\n iconOnlyValue = false,\n allowCustomValue = false,\n onInputValueChange,\n}: ComboboxSingleProps & ShapeProps) {\n // The search text: a field's own text, or the compact trigger's popup search.\n const [inputValue, setInputValue] = React.useState('');\n const filter = useOptionFilter();\n const inField = shape === 'field';\n const selectedOption = options.find(option => option.value === value);\n const customOption = allowCustomValue ? getCustomOption(options, inputValue) : undefined;\n const items = customOption ? [customOption, ...options] : options;\n\n function handleInputValueChange(next: string) {\n setInputValue(next);\n onInputValueChange?.(next);\n }\n\n function handleValueChange(item: ComboboxOption | null) {\n if (!item) return;\n onValueChange?.(item.value);\n // A field shows the picked option; a compact trigger's popup search starts empty next time.\n if (!inField) handleInputValueChange('');\n }\n\n return (\n <ComboboxRoot\n autoHighlight\n items={items}\n filter={filter}\n itemToStringLabel={optionText}\n // Base UI's \"nothing selected\" is null.\n value={selectedOption ?? null}\n // A field owns its text (the selected option's, or the search); a compact trigger's search is reset here.\n inputValue={inField ? undefined : inputValue}\n onInputValueChange={handleInputValueChange}\n onValueChange={handleValueChange}\n disabled={disabled}\n open={open}\n onOpenChange={onOpenChange}\n >\n <SingleComboboxControl\n shape={shape}\n controlProps={controlProps}\n placeholder={placeholder}\n selectedOption={selectedOption}\n look={{ variant, size, showChevron, iconOnlyValue, className }}\n />\n <ComboboxOptionsContent\n popupWidth={popupWidth}\n showSearch={!inField}\n searchPlaceholder={searchPlaceholder}\n emptyText={emptyText}\n align={align}\n container={container}\n />\n </ComboboxRoot>\n );\n}\n\nfunction MultipleCombobox({\n shape,\n controlProps,\n options,\n value = EMPTY_VALUES,\n onValueChange,\n clearLabel,\n placeholder = 'Select options',\n searchPlaceholder = 'Search',\n emptyText = 'No option found.',\n className,\n disabled = false,\n variant = 'default',\n size = 'md',\n open,\n onOpenChange,\n container,\n align = 'start',\n popupWidth,\n showChevron = true,\n iconOnlyValue = false,\n}: ComboboxMultipleProps & ShapeProps) {\n const filter = useOptionFilter();\n const selectedValues = new Set(value);\n const selectedOptions = options.filter(option => selectedValues.has(option.value));\n const footer =\n clearLabel && selectedOptions.length > 0 ? (\n <ComboboxClearFooter label={clearLabel} onClear={() => onValueChange?.([])} />\n ) : undefined;\n\n return (\n <ComboboxRoot\n multiple\n autoHighlight\n items={options}\n filter={filter}\n value={selectedOptions}\n onValueChange={items => onValueChange?.(items.map(item => item.value))}\n disabled={disabled}\n open={open}\n onOpenChange={onOpenChange}\n >\n <MultipleComboboxControl\n shape={shape}\n controlProps={controlProps}\n placeholder={placeholder}\n selectedCount={selectedOptions.length}\n look={{ variant, size, showChevron, iconOnlyValue, className }}\n />\n <ComboboxOptionsContent\n popupWidth={popupWidth}\n showSearch={shape !== 'chips'}\n searchPlaceholder={searchPlaceholder}\n emptyText={emptyText}\n align={align}\n container={container}\n footer={footer}\n />\n </ComboboxRoot>\n );\n}\n\n/**\n * A searchable select driven by `options`, built on the Combobox parts.\n *\n * Inside a `Field`, a `default` combobox searches right in the field: a text field for a single value,\n * removable chips for `multiple`. Everywhere else (outside a `Field`, `ghost` and icon-size triggers,\n * custom non-text placeholders) it keeps a compact trigger with the search inside the popup. For anything\n * these props don't cover (groups, rich items), compose the parts directly (`ComboboxRoot`, ...).\n */\nexport function Combobox(props: ComboboxProps) {\n const field = useFieldAriaIds();\n const generatedName = React.useId();\n const multiple = isMultipleCombobox(props);\n const shape = getComboboxShape({\n inFieldContext: Boolean(field),\n multiple,\n variant: props.variant ?? 'default',\n size: props.size ?? 'md',\n iconOnlyValue: props.iconOnlyValue ?? false,\n showChevron: props.showChevron ?? true,\n placeholder: props.placeholder,\n });\n const errorName = props.name ?? generatedName;\n const controlProps = getControlProps({\n id: props.id,\n ariaLabel: props['aria-label'],\n ariaDescribedBy: props['aria-describedby'],\n hasLabel: Boolean(props.id || field),\n multiple,\n error: props.error,\n errorName,\n });\n\n const root = isMultipleCombobox(props) ? (\n <MultipleCombobox {...props} shape={shape} controlProps={controlProps} />\n ) : (\n <SingleCombobox {...props} shape={shape} controlProps={controlProps} />\n );\n\n if (!props.error) return root;\n\n return (\n <div className={comboboxStyles.root}>\n {root}\n <FieldBlock.ErrorMsg name={errorName}>{props.error}</FieldBlock.ErrorMsg>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AA4FA,IAAM,eAAkC,CAAC;AAEzC,SAAS,mBAAmB,OAAsD;CAChF,OAAO,MAAM,aAAa;AAC5B;;AAGA,SAAS,WAAW,QAAwB;CAC1C,OAAO,OAAO,OAAO,iBAAiB,WAAW,OAAO,eAAe,OAAO;AAChF;;AAGA,SAAS,gBAAgB,aAA8B;CACrD,OAAO,OAAO,gBAAgB,WAAW,cAAc,KAAA;AACzD;AAWA,SAAS,iBAAiB,EACxB,gBACA,UACA,SACA,MACA,eACA,aACA,eASgB;CAChB,IAAI,CAAC,gBAAgB,OAAO;CAC5B,IAAI,YAAY,WAAW,OAAO;CAClC,IAAI,iBAAiB,IAAI,GAAG,OAAO;CACnC,IAAI,iBAAiB,CAAC,aAAa,OAAO;CAC1C,IAAI,gBAAgB,KAAA,KAAa,gBAAgB,WAAW,MAAM,KAAA,GAAW,OAAO;CACpF,IAAI,CAAC,UAAU,OAAO;CAEtB,IAAI,SAAS,MAAM,OAAO;CAC1B,OAAO;AACT;;AAGA,SAAS,gBAAgB,SAA2B,YAAgD;CAClG,MAAM,QAAQ,WAAW,KAAK;CAC9B,IAAI,CAAC,OAAO,OAAO,KAAA;CAEnB,IAAI,QAAQ,MAAK,WAAU,OAAO,UAAU,SAAS,WAAW,MAAM,MAAM,KAAK,GAAG,OAAO,KAAA;CAC3F,OAAO;EAAE,OAAO,QAAQ,MAAM;EAAI;CAAM;AAC1C;;AAGA,SAAS,kBAAkB;CACzB,MAAM,EAAE,aAAaA,SAAa,UAAU;CAC5C,QAAQ,QAAwB,UAC9B;EAAC,OAAO;EAAO,WAAW,MAAM;EAAG,GAAI,OAAO,YAAY,CAAC;CAAE,CAAC,CAAC,MAAK,SAAQ,SAAS,MAAM,KAAK,CAAC;AACrG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