@luscii-healthtech/web-ui 54.3.2 → 54.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.development.js +55 -14
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/src/components/Select/Select.d.ts +25 -0
- package/dist/src/generated/components/Select/Select.d.ts +25 -0
- package/dist/stories/Select.stories.d.ts +1 -0
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -32,6 +32,31 @@ export interface SelectProps<Option extends OptionMinimal = OptionMinimal, IsMul
|
|
|
32
32
|
* way, without any processing of the value.
|
|
33
33
|
*/
|
|
34
34
|
skipValueProcessing?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Enable the user to create new options by typing and pressing Enter.
|
|
37
|
+
* When enabled, the select becomes "creatable" - if no matching options are found,
|
|
38
|
+
* the user can add the typed value as a new option.
|
|
39
|
+
*/
|
|
40
|
+
isCreatable?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Callback fired when a new option is created. Only applies when `isCreatable` is true.
|
|
43
|
+
* @param inputValue - The text input that the user typed to create the new option
|
|
44
|
+
*/
|
|
45
|
+
onCreateOption?: (inputValue: string) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Formats the label shown to users when they can create a new option.
|
|
48
|
+
* Only applies when `isCreatable` is true.
|
|
49
|
+
* Use this for translations or custom messaging.
|
|
50
|
+
* @param inputValue - The text the user has typed
|
|
51
|
+
* @returns The label to display (e.g., 'Create "inputValue"' or t('select.create', { inputValue }))
|
|
52
|
+
* @example
|
|
53
|
+
* // With translations
|
|
54
|
+
* formatCreateLabel={(value) => t('select.create', { value })}
|
|
55
|
+
* @example
|
|
56
|
+
* // Custom text
|
|
57
|
+
* formatCreateLabel={(value) => `Add "${value}" as new option`}
|
|
58
|
+
*/
|
|
59
|
+
formatCreateLabel?: (inputValue: string) => string;
|
|
35
60
|
}
|
|
36
61
|
/**
|
|
37
62
|
* A searchable select component powered by `react-select`, styled to match Luscii's design.
|
|
@@ -32,6 +32,31 @@ export interface SelectProps<Option extends OptionMinimal = OptionMinimal, IsMul
|
|
|
32
32
|
* way, without any processing of the value.
|
|
33
33
|
*/
|
|
34
34
|
skipValueProcessing?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Enable the user to create new options by typing and pressing Enter.
|
|
37
|
+
* When enabled, the select becomes "creatable" - if no matching options are found,
|
|
38
|
+
* the user can add the typed value as a new option.
|
|
39
|
+
*/
|
|
40
|
+
isCreatable?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Callback fired when a new option is created. Only applies when `isCreatable` is true.
|
|
43
|
+
* @param inputValue - The text input that the user typed to create the new option
|
|
44
|
+
*/
|
|
45
|
+
onCreateOption?: (inputValue: string) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Formats the label shown to users when they can create a new option.
|
|
48
|
+
* Only applies when `isCreatable` is true.
|
|
49
|
+
* Use this for translations or custom messaging.
|
|
50
|
+
* @param inputValue - The text the user has typed
|
|
51
|
+
* @returns The label to display (e.g., 'Create "inputValue"' or t('select.create', { inputValue }))
|
|
52
|
+
* @example
|
|
53
|
+
* // With translations
|
|
54
|
+
* formatCreateLabel={(value) => t('select.create', { value })}
|
|
55
|
+
* @example
|
|
56
|
+
* // Custom text
|
|
57
|
+
* formatCreateLabel={(value) => `Add "${value}" as new option`}
|
|
58
|
+
*/
|
|
59
|
+
formatCreateLabel?: (inputValue: string) => string;
|
|
35
60
|
}
|
|
36
61
|
/**
|
|
37
62
|
* A searchable select component powered by `react-select`, styled to match Luscii's design.
|