@lotics/ui 7.2.0 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/ui",
3
- "version": "7.2.0",
3
+ "version": "7.3.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./tokens": "./src/tokens.ts",
@@ -18,6 +18,8 @@ interface InlineMemberSelectProps {
18
18
  placeholder?: string;
19
19
  disabled?: boolean;
20
20
  accessibilityLabel?: string;
21
+ /** Show an in-menu search box to filter the roster; default false. */
22
+ searchable?: boolean;
21
23
  }
22
24
 
23
25
  /**
@@ -23,6 +23,8 @@ export interface InlineSelectProps<T extends string> {
23
23
  placeholder?: string;
24
24
  disabled?: boolean;
25
25
  accessibilityLabel?: string;
26
+ /** Show an in-menu search box; default false. */
27
+ searchable?: boolean;
26
28
  }
27
29
 
28
30
  /**
@@ -33,7 +35,7 @@ export interface InlineSelectProps<T extends string> {
33
35
  * standard and custom-rendered pickers are both supported here.
34
36
  */
35
37
  export function InlineSelect<T extends string>(props: InlineSelectProps<T>) {
36
- const { value, onSave, options, renderOptionContent, renderSelected, placeholder, disabled, accessibilityLabel } = props;
38
+ const { value, onSave, options, renderOptionContent, renderSelected, placeholder, disabled, accessibilityLabel, searchable = false } = props;
37
39
  const [open, setOpen] = useState(false);
38
40
  const [saving, setSaving] = useState(false);
39
41
  const [error, setError] = useState<string | null>(null);
@@ -78,7 +80,7 @@ export function InlineSelect<T extends string>(props: InlineSelectProps<T>) {
78
80
  </PopoverTrigger>
79
81
  <PopoverContent disableBodyScroll>
80
82
  <OptionList
81
- search={{ mode: "none" }}
83
+ search={{ mode: searchable ? "internal" : "none" }}
82
84
  options={options}
83
85
  value={value}
84
86
  onValueChange={(next) => void pick(next)}
@@ -32,6 +32,8 @@ interface MemberSelectProps<MULTI extends boolean = false> {
32
32
  placeholder?: string;
33
33
  disabled?: boolean;
34
34
  autoFocus?: boolean;
35
+ /** Show an in-menu search box to filter the roster; default false. */
36
+ searchable?: boolean;
35
37
  includeEmptyOption?: boolean;
36
38
  enableSelectAll?: boolean;
37
39
  /** Label for the "select all" link in multi-select mode. Pass a translated string. */