widenarrow-ui 2.4.5 → 2.4.7
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/lib/index.css +1 -1
- package/lib/index.d.ts +23 -5
- package/lib/index.esm.css +1 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -680,6 +680,12 @@ interface OptionItem {
|
|
|
680
680
|
* reported as a string instead, so a numeric `value` comes back as e.g. `'2'`.
|
|
681
681
|
*/
|
|
682
682
|
value: string | number;
|
|
683
|
+
/**
|
|
684
|
+
* Context shown after `text` on the same line, in a lighter colour, e.g. where a topic sits in a taxonomy.
|
|
685
|
+
* Matched by the Combobox's default filter. Not shown in pills or in the field, which show `text` only.
|
|
686
|
+
* With `nativeHtmlComponent`, shown in parentheses after `text`.
|
|
687
|
+
*/
|
|
688
|
+
secondaryText?: string;
|
|
683
689
|
/** Renders the option but prevents it from being picked. @default false */
|
|
684
690
|
disabled?: boolean;
|
|
685
691
|
/**
|
|
@@ -752,8 +758,13 @@ interface SelectInputProps {
|
|
|
752
758
|
* @default false
|
|
753
759
|
*/
|
|
754
760
|
nativeHtmlComponent?: boolean;
|
|
755
|
-
/** Size
|
|
761
|
+
/** Size of the field, and of the list unless `listSize` is set. @default SizeTypes.MEDIUM */
|
|
756
762
|
size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
763
|
+
/**
|
|
764
|
+
* Size of the options in the list, when it should differ from the field's. Without it the list follows
|
|
765
|
+
* `size`, with medium options for a large field.
|
|
766
|
+
*/
|
|
767
|
+
listSize?: SizeTypes.SMALL | SizeTypes.MEDIUM;
|
|
757
768
|
/** Adds bottom spacing, for stacking fields in a form. @default false */
|
|
758
769
|
marginBottom?: boolean;
|
|
759
770
|
/** Focus the select on mount. @default false */
|
|
@@ -799,8 +810,8 @@ interface ComboboxBaseProps {
|
|
|
799
810
|
*/
|
|
800
811
|
onSearchChange?: (searchText: string) => void;
|
|
801
812
|
/**
|
|
802
|
-
* Filters the options by the typed text. By default an option is shown when its `text`
|
|
803
|
-
* typed text, ignoring case. Pass `false` when the options are already filtered, e.g. fetched for the
|
|
813
|
+
* Filters the options by the typed text. By default an option is shown when its `text` or
|
|
814
|
+
* `secondaryText` contains the typed text, ignoring case. Pass `false` when the options are already filtered, e.g. fetched for the
|
|
804
815
|
* typed text from a server, with `onSearchChange`.
|
|
805
816
|
*/
|
|
806
817
|
filterOptions?: ((options: OptionItem[], inputValue: string) => OptionItem[]) | false;
|
|
@@ -851,8 +862,13 @@ interface ComboboxBaseProps {
|
|
|
851
862
|
* The list is not affected. Without it, the input looks like the other form fields.
|
|
852
863
|
*/
|
|
853
864
|
type?: HierarchyTypes.PRIMARY | HierarchyTypes.SECONDARY;
|
|
854
|
-
/** @default SizeTypes.MEDIUM */
|
|
865
|
+
/** Size of the field, and of the list unless `listSize` is set. @default SizeTypes.MEDIUM */
|
|
855
866
|
size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
867
|
+
/**
|
|
868
|
+
* Size of the options in the list, when it should differ from the field's. Without it the list follows
|
|
869
|
+
* `size`, with medium options for a large field.
|
|
870
|
+
*/
|
|
871
|
+
listSize?: SizeTypes.SMALL | SizeTypes.MEDIUM;
|
|
856
872
|
/** Adds bottom spacing, for stacking fields in a form. @default false */
|
|
857
873
|
marginBottom?: boolean;
|
|
858
874
|
/** Focus the input on mount. @default false */
|
|
@@ -867,6 +883,8 @@ interface ComboboxBaseProps {
|
|
|
867
883
|
className?: string;
|
|
868
884
|
/** Class name of the `<input>`. */
|
|
869
885
|
inputClassName?: string;
|
|
886
|
+
/** Class name of the field around the input and the pills, e.g. to attach another element to it. */
|
|
887
|
+
fieldClassName?: string;
|
|
870
888
|
}
|
|
871
889
|
interface ComboboxSingleProps extends ComboboxBaseProps {
|
|
872
890
|
/**
|
|
@@ -2092,7 +2110,7 @@ declare const TabGroup: {
|
|
|
2092
2110
|
};
|
|
2093
2111
|
|
|
2094
2112
|
declare const SelectInput: {
|
|
2095
|
-
({ label, withLabel, inputRef, nativeHtmlComponent, size, ariaLabel, id, onChange, defaultOption, value, error, autoFocus, helperText, options, disabled, loading, name, className, inputClassName, marginBottom }: SelectInputProps): JSX.Element;
|
|
2113
|
+
({ label, withLabel, inputRef, nativeHtmlComponent, size, listSize, ariaLabel, id, onChange, defaultOption, value, error, autoFocus, helperText, options, disabled, loading, name, className, inputClassName, marginBottom }: SelectInputProps): JSX.Element;
|
|
2096
2114
|
displayName: string;
|
|
2097
2115
|
};
|
|
2098
2116
|
|