@leafygreen-ui/combobox 5.0.11 → 6.0.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/CHANGELOG.md +35 -0
- package/README.md +8 -6
- package/dist/Chip/Chip.d.ts.map +1 -1
- package/dist/Chip/Chip.styles.d.ts +17 -4
- package/dist/Chip/Chip.styles.d.ts.map +1 -1
- package/dist/Combobox/Combobox.d.ts +1 -1
- package/dist/Combobox/Combobox.d.ts.map +1 -1
- package/dist/Combobox/Combobox.styles.d.ts +18 -8
- package/dist/Combobox/Combobox.styles.d.ts.map +1 -1
- package/dist/Combobox.types.d.ts +16 -10
- package/dist/Combobox.types.d.ts.map +1 -1
- package/dist/ComboboxContext/ComboboxContext.d.ts +2 -1
- package/dist/ComboboxContext/ComboboxContext.d.ts.map +1 -1
- package/dist/ComboboxGroup/ComboboxGroup.d.ts +3 -0
- package/dist/ComboboxGroup/ComboboxGroup.d.ts.map +1 -1
- package/dist/ComboboxGroup/ComboboxGroup.styles.d.ts.map +1 -1
- package/dist/ComboboxMenu/ComboboxMenu.d.ts.map +1 -1
- package/dist/ComboboxMenu/Menu.styles.d.ts +3 -8
- package/dist/ComboboxMenu/Menu.styles.d.ts.map +1 -1
- package/dist/ComboboxOption/ComboboxOption.d.ts +3 -0
- package/dist/ComboboxOption/ComboboxOption.d.ts.map +1 -1
- package/dist/ComboboxOption/ComboboxOption.styles.d.ts +11 -4
- package/dist/ComboboxOption/ComboboxOption.styles.d.ts.map +1 -1
- package/dist/ComboboxOption/getGlyphs.d.ts +22 -0
- package/dist/ComboboxOption/getGlyphs.d.ts.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/ComboboxTestUtils.d.ts.map +1 -1
- package/dist/utils/checkScrollPosition.d.ts +10 -0
- package/dist/utils/checkScrollPosition.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/Chip/Chip.styles.ts +62 -41
- package/src/Chip/Chip.tsx +15 -5
- package/src/Combobox/Combobox.spec.tsx +49 -20
- package/src/Combobox/Combobox.styles.ts +172 -68
- package/src/Combobox/Combobox.tsx +131 -55
- package/src/Combobox.story.tsx +68 -12
- package/src/Combobox.types.ts +30 -13
- package/src/ComboboxContext/ComboboxContext.tsx +3 -0
- package/src/ComboboxGroup/ComboboxGroup.styles.ts +3 -2
- package/src/ComboboxGroup/ComboboxGroup.tsx +3 -0
- package/src/ComboboxMenu/ComboboxMenu.tsx +10 -4
- package/src/ComboboxMenu/Menu.styles.ts +12 -40
- package/src/ComboboxOption/ComboboxOption.styles.ts +88 -39
- package/src/ComboboxOption/ComboboxOption.tsx +70 -25
- package/src/ComboboxOption/getGlyphs.tsx +109 -0
- package/src/utils/ComboboxTestUtils.tsx +9 -5
- package/src/utils/checkScrollPosition.tsx +20 -0
- package/src/utils/index.ts +1 -0
- package/stories.js +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/tsdoc.json +23 -214
- package/dist/ComboboxOption/OptionContent.d.ts +0 -4
- package/dist/ComboboxOption/OptionContent.d.ts.map +0 -1
- package/src/ComboboxOption/OptionContent.tsx +0 -87
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @leafygreen-ui/combobox
|
|
2
2
|
|
|
3
|
+
## 6.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 77320a6b8: - Adds new size variants, `small` and `xsmall`.
|
|
8
|
+
- Removes truncation from chips when overflow is set to `scroll-x`. Chips do not need truncation since consumers can scroll horizontally to read the text.
|
|
9
|
+
- Sets a max height of 3 rows to the input when overflow is `expand-y`. An overflow shadow is added to indicate there is a scroll.
|
|
10
|
+
- Warning icon that appears when `state='error'` is now positioned to the left of the caret or clear icon. Previously it replaced the caret icon.
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- 77320a6b8: - Adds `onClick` and `description` prop to `ComboboxOption`
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 77320a6b8: Switch to `useAutoScroll` hook to auto scroll the focused option
|
|
19
|
+
- d9d8f770d: Updates disabled styles
|
|
20
|
+
- ce0fcb3f6: Excludes `children` from story controls
|
|
21
|
+
- 77320a6b8: Fix padding discrepancy between Combobox, Select, Text Input, and Number Input
|
|
22
|
+
- Updated dependencies [55d33e435]
|
|
23
|
+
- Updated dependencies [77320a6b8]
|
|
24
|
+
- Updated dependencies [07db42330]
|
|
25
|
+
- Updated dependencies [55d33e435]
|
|
26
|
+
- Updated dependencies [cf00160ec]
|
|
27
|
+
- Updated dependencies [ce0fcb3f6]
|
|
28
|
+
- Updated dependencies [111b680c5]
|
|
29
|
+
- Updated dependencies [77320a6b8]
|
|
30
|
+
- @leafygreen-ui/input-option@1.0.3
|
|
31
|
+
- @leafygreen-ui/lib@10.3.3
|
|
32
|
+
- @leafygreen-ui/palette@4.0.4
|
|
33
|
+
- @leafygreen-ui/typography@16.3.0
|
|
34
|
+
- @leafygreen-ui/icon-button@15.0.10
|
|
35
|
+
- @leafygreen-ui/popover@11.0.8
|
|
36
|
+
- @leafygreen-ui/tokens@2.0.3
|
|
37
|
+
|
|
3
38
|
## 5.0.11
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -115,12 +115,14 @@ import { Combobox, ComboboxOption } from '@leafygreen-ui/combobox';
|
|
|
115
115
|
|
|
116
116
|
## Props
|
|
117
117
|
|
|
118
|
-
| Prop | Type
|
|
119
|
-
| ------------- |
|
|
120
|
-
| `value` | `string`
|
|
121
|
-
| `displayName` | `string`
|
|
122
|
-
| `glyph` | `<Icon/>`
|
|
123
|
-
| `className` | `string`
|
|
118
|
+
| Prop | Type | Description | Default |
|
|
119
|
+
| ------------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
|
120
|
+
| `value` | `string` | The internal value of the option. Used as the identifier in Combobox `initialValue`, `value` and `filteredOptions`. When undefined, this is set to `_.kebabCase(displayName)` | |
|
|
121
|
+
| `displayName` | `string` | The display value of the option. Used as the rendered string within the menu and chips. When undefined, this is set to `value` | |
|
|
122
|
+
| `glyph` | `<Icon/>` | The icon to display to the left of the option in the menu. | |
|
|
123
|
+
| `className` | `string` | The className passed to the root element of the component. | |
|
|
124
|
+
| `description` | `string` | Optional descriptive text under the displayName. | |
|
|
125
|
+
| `onClick` | `(event: React.SyntheticEvent<HTMLLIElement, Event>, value: string) => void` | Callback fired when an option is clicked. Returns the event and the option value. | |
|
|
124
126
|
|
|
125
127
|
# ComboboxGroup
|
|
126
128
|
|
package/dist/Chip/Chip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../src/Chip/Chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAQtE,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../src/Chip/Chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAQtE,OAAO,EAAE,SAAS,EAAY,MAAM,mBAAmB,CAAC;AAkBxD,eAAO,MAAM,IAAI,mFAiJhB,CAAC"}
|
|
@@ -1,23 +1,36 @@
|
|
|
1
1
|
import { Theme } from '@leafygreen-ui/lib';
|
|
2
2
|
import { ComboboxSize } from '../Combobox.types';
|
|
3
|
+
/**
|
|
4
|
+
* The line-height of the combobox.
|
|
5
|
+
*/
|
|
6
|
+
export declare const lineHeight: Record<ComboboxSize, number>;
|
|
7
|
+
/**
|
|
8
|
+
* The font-size of the combobox.
|
|
9
|
+
*/
|
|
10
|
+
export declare const fontSize: Record<ComboboxSize, number>;
|
|
3
11
|
/**
|
|
4
12
|
* Vertical padding on a chip (in px)
|
|
5
13
|
*/
|
|
6
14
|
export declare const chipWrapperPaddingY: {
|
|
15
|
+
readonly xsmall: 1;
|
|
16
|
+
readonly small: 0;
|
|
7
17
|
readonly default: 2;
|
|
8
18
|
readonly large: 4;
|
|
9
19
|
};
|
|
10
20
|
/**
|
|
11
|
-
*
|
|
21
|
+
* Util to get the chip height
|
|
22
|
+
* `lineHeight + (2 * paddingY)`
|
|
12
23
|
*/
|
|
13
|
-
export declare const
|
|
24
|
+
export declare const getChipHeight: (size: ComboboxSize) => number;
|
|
14
25
|
export declare const chipWrapperBaseStyle: string;
|
|
15
|
-
export declare const chipWrapperSizeStyle:
|
|
26
|
+
export declare const chipWrapperSizeStyle: (size: ComboboxSize) => string;
|
|
16
27
|
export declare const chipWrapperThemeStyle: Record<Theme, string>;
|
|
28
|
+
export declare const disabledBaseChipWrapperStyles: string;
|
|
17
29
|
export declare const disabledChipWrapperStyle: Record<Theme, string>;
|
|
18
30
|
export declare const chipTextSizeStyle: Record<ComboboxSize, string>;
|
|
19
31
|
export declare const chipButtonStyle: string;
|
|
20
|
-
export declare const chipButtonSizeStyle:
|
|
32
|
+
export declare const chipButtonSizeStyle: (size: ComboboxSize) => string;
|
|
21
33
|
export declare const chipButtonThemeStyle: Record<Theme, string>;
|
|
34
|
+
export declare const chipButtonBaseDisabledStyles: string;
|
|
22
35
|
export declare const chipButtonDisabledStyle: Record<Theme, string>;
|
|
23
36
|
//# sourceMappingURL=Chip.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.styles.d.ts","sourceRoot":"","sources":["../../src/Chip/Chip.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"Chip.styles.d.ts","sourceRoot":"","sources":["../../src/Chip/Chip.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAKnD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAKjD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;CAKtB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,aAAa,SAAU,YAAY,WAE/C,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAOhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,SAAU,YAAY,WAGtD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAkBvD,CAAC;AAEF,eAAO,MAAM,6BAA6B,QAGzC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAU1D,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAoB1D,CAAC;AAEF,eAAO,MAAM,eAAe,QAY3B,CAAC;AAEF,eAAO,MAAM,mBAAmB,SAAU,YAAY,WAErD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAiBtD,CAAC;AAEF,eAAO,MAAM,4BAA4B,QAMxC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAOzD,CAAC"}
|
|
@@ -29,7 +29,7 @@ export declare namespace Combobox {
|
|
|
29
29
|
searchState: PropTypes.Requireable<"error" | "unset" | "loading">;
|
|
30
30
|
errorMessage: PropTypes.Requireable<string>;
|
|
31
31
|
state: PropTypes.Requireable<"none" | "error">;
|
|
32
|
-
size: PropTypes.Requireable<"default" | "large">;
|
|
32
|
+
size: PropTypes.Requireable<"xsmall" | "small" | "default" | "large">;
|
|
33
33
|
disabled: PropTypes.Requireable<boolean>;
|
|
34
34
|
description: PropTypes.Requireable<string>;
|
|
35
35
|
placeholder: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../src/Combobox/Combobox.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../src/Combobox/Combobox.tsx"],"names":[],"mappings":";AAoBA,OAAO,SAAS,MAAM,YAAY,CAAC;AAmBnC,OAAO,EAEL,aAAa,EAUd,MAAM,mBAAmB,CAAC;AA2C3B;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,OAAO,EAAE,EAC1C,QAAQ,EACR,KAAK,EACL,WAAW,EACX,WAAsB,EACtB,YAAY,EAAE,SAAS,EACvB,QAAgB,EAChB,IAA2B,EAC3B,QAAQ,EAAE,YAAY,EACtB,KAAc,EACd,YAAY,EACZ,WAAqB,EACrB,kBAAuC,EACvC,kBAA6C,EAC7C,oBAA2C,EAC3C,eAAe,EACf,QAAQ,EACR,SAAgB,EAChB,OAAO,EACP,QAA2B,EAC3B,WAAwB,EACxB,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,sBAAsB,EACtB,kBAAuB,EACvB,SAAS,EACT,SAAgB,EAChB,eAAe,EACf,eAAe,EACf,eAAe,EACf,aAAa,EACb,GAAG,IAAI,EACR,EAAE,aAAa,CAAC,CAAC,CAAC,eA+tClB;yBAhwCe,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6yCxB;;;GAGG"}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { Theme } from '@leafygreen-ui/lib';
|
|
2
2
|
import { ComboboxSize as Size, Overflow } from '../Combobox.types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* The min-height of the combobox.
|
|
5
5
|
*/
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const wrapperHeight: Record<Size, number>;
|
|
7
7
|
/**
|
|
8
8
|
* Size of combobox x & y padding (in px)
|
|
9
|
+
* (wrapperHeight - inputHeight(- (borderTop + borderBottom)) / 2
|
|
9
10
|
*/
|
|
10
11
|
export declare const comboboxPadding: Record<Size, {
|
|
11
|
-
x: number;
|
|
12
12
|
y: number;
|
|
13
|
+
xLeftWithChip: number;
|
|
14
|
+
xLeftWithoutChip: number;
|
|
15
|
+
xRight: number;
|
|
13
16
|
}>;
|
|
14
17
|
/** Width of the clear icon (in px) */
|
|
15
18
|
export declare const clearButtonIconSize = 28;
|
|
@@ -19,24 +22,31 @@ export declare const chipClassName: string;
|
|
|
19
22
|
export declare const comboboxParentStyle: (size: Size) => string;
|
|
20
23
|
export declare const baseComboboxStyles: string;
|
|
21
24
|
export declare const comboboxThemeStyles: Record<Theme, string>;
|
|
22
|
-
export declare const comboboxSizeStyles: (size: Size) => string;
|
|
25
|
+
export declare const comboboxSizeStyles: (size: Size, isMultiselectWithSelections: boolean) => string;
|
|
23
26
|
export declare const comboboxDisabledStyles: Record<Theme, string>;
|
|
24
27
|
export declare const comboboxErrorStyles: Record<Theme, string>;
|
|
25
28
|
export declare const comboboxFocusStyle: Record<Theme, string>;
|
|
26
|
-
export declare const
|
|
29
|
+
export declare const iconsWrapperBaseStyles: string;
|
|
30
|
+
export declare const iconsWrapperSizeStyles: Record<Size, string>;
|
|
27
31
|
export declare const inputWrapperStyle: ({ overflow, size, }: {
|
|
28
32
|
overflow: Overflow;
|
|
29
33
|
size: Size;
|
|
30
34
|
}) => string | undefined;
|
|
31
35
|
export declare const baseInputElementStyle: string;
|
|
32
36
|
export declare const inputElementThemeStyle: Record<Theme, string>;
|
|
33
|
-
export declare const
|
|
37
|
+
export declare const inputElementDisabledThemeStyle: Record<Theme, string>;
|
|
38
|
+
export declare const inputElementSizeStyle: (size: Size) => string;
|
|
34
39
|
export declare const inputElementTransitionStyles: (isOpen: boolean) => string;
|
|
35
40
|
/** Should only be applied to a multiselect */
|
|
36
41
|
export declare const multiselectInputElementStyle: (size: Size, inputValue?: string | undefined) => string;
|
|
37
42
|
export declare const clearButtonStyle: string;
|
|
38
|
-
export declare const endIconStyle:
|
|
43
|
+
export declare const endIconStyle: string;
|
|
39
44
|
export declare const errorMessageThemeStyle: Record<Theme, string>;
|
|
40
|
-
export declare const errorMessageSizeStyle:
|
|
45
|
+
export declare const errorMessageSizeStyle: (size: Size) => string;
|
|
41
46
|
export declare const labelDescriptionContainerStyle: string;
|
|
47
|
+
export declare const labelDescriptionLargeStyles: string;
|
|
48
|
+
export declare const comboboxOverflowShadowStyles: Record<Theme, string>;
|
|
49
|
+
export declare const errorIconThemeStyles: Record<Theme, string>;
|
|
50
|
+
export declare const caretIconThemeStyles: Record<Theme, string>;
|
|
51
|
+
export declare const caretIconDisabledStyles: Record<Theme, string>;
|
|
42
52
|
//# sourceMappingURL=Combobox.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.styles.d.ts","sourceRoot":"","sources":["../../src/Combobox/Combobox.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Combobox.styles.d.ts","sourceRoot":"","sources":["../../src/Combobox/Combobox.styles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyB,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAYlE,OAAO,EAAE,YAAY,IAAI,IAAI,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAQnE;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAK9C,CAAC;AAUF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAClC,IAAI,EACJ;IACE,CAAC,EAAE,MAAM,CAAC;IACV,aAAa,EAAE,MAAM,CAAC;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AAC;AAEF,eAAO,MAAM,gBAAgB,QAI5B,CAAC;AAEF,eAAO,MAAM,YAAY,QAGxB,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAOxD,CAAC;AAEF,eAAO,MAAM,qBAAqB,SAAU,IAAI,WAI/C,CAAC;AAEF,eAAO,MAAM,8BAA8B,QAI1C,CAAC;AAEF,eAAO,MAAM,2BAA2B,QAGvC,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAY9D,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAGtD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAGtD,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAGzD,CAAC"}
|
package/dist/Combobox.types.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export declare type ComboboxElement = typeof ComboboxElement[keyof typeof Combob
|
|
|
17
17
|
* Prop types
|
|
18
18
|
*/
|
|
19
19
|
export declare const ComboboxSize: {
|
|
20
|
+
readonly XSmall: "xsmall";
|
|
21
|
+
readonly Small: "small";
|
|
20
22
|
readonly Default: "default";
|
|
21
23
|
readonly Large: "large";
|
|
22
24
|
};
|
|
@@ -212,7 +214,8 @@ export declare type ComboboxProps<M extends boolean> = Either<BaseComboboxProps
|
|
|
212
214
|
/**
|
|
213
215
|
* Combobox Option Props
|
|
214
216
|
*/
|
|
215
|
-
|
|
217
|
+
declare type ListItemProps = Omit<ComponentPropsWithoutRef<'li'>, 'onClick' | 'value'>;
|
|
218
|
+
interface SharedComboboxOptionProps {
|
|
216
219
|
/**
|
|
217
220
|
* The internal value of the option. Used as the identifier in Combobox `initialValue`, value and filteredOptions.
|
|
218
221
|
* When undefined, this is set to `_.kebabCase(displayName)`
|
|
@@ -236,23 +239,26 @@ interface BaseComboboxOptionProps extends ComponentPropsWithoutRef<'li'> {
|
|
|
236
239
|
* Styling Prop
|
|
237
240
|
*/
|
|
238
241
|
className?: string;
|
|
242
|
+
/**
|
|
243
|
+
* Optional descriptive text under the displayName.
|
|
244
|
+
*/
|
|
245
|
+
description?: string;
|
|
246
|
+
/**
|
|
247
|
+
* Callback fired when an option is clicked.
|
|
248
|
+
*/
|
|
249
|
+
onClick?: (event: React.SyntheticEvent<HTMLLIElement, Event>, value: string) => void;
|
|
239
250
|
}
|
|
251
|
+
declare type RequiredComboboxOptionProps = Required<Pick<SharedComboboxOptionProps, 'value' | 'displayName'>>;
|
|
252
|
+
declare type BaseComboboxOptionProps = ListItemProps & SharedComboboxOptionProps;
|
|
240
253
|
export declare type ComboboxOptionProps = Either<BaseComboboxOptionProps, 'value' | 'displayName'>;
|
|
241
|
-
export interface OptionObject {
|
|
242
|
-
value: string;
|
|
243
|
-
displayName: string;
|
|
254
|
+
export interface OptionObject extends Pick<SharedComboboxOptionProps, 'description' | 'onClick'>, RequiredComboboxOptionProps {
|
|
244
255
|
isDisabled: boolean;
|
|
245
256
|
hasGlyph?: boolean;
|
|
246
257
|
}
|
|
247
|
-
export interface InternalComboboxOptionProps extends
|
|
248
|
-
value: string;
|
|
249
|
-
displayName: string;
|
|
258
|
+
export interface InternalComboboxOptionProps extends ListItemProps, Omit<SharedComboboxOptionProps, 'value' | 'displayName'>, RequiredComboboxOptionProps {
|
|
250
259
|
isSelected: boolean;
|
|
251
260
|
isFocused: boolean;
|
|
252
261
|
setSelected: () => void;
|
|
253
|
-
disabled?: boolean;
|
|
254
|
-
glyph?: ReactElement;
|
|
255
|
-
className?: string;
|
|
256
262
|
index: number;
|
|
257
263
|
}
|
|
258
264
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.types.d.ts","sourceRoot":"","sources":["../src/Combobox.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,Y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AAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AAEH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AAEH,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComboboxSize, SearchState, State, TruncationLocation } from '../Combobox.types';
|
|
2
|
+
import { ComboboxSize, Overflow, SearchState, State, TruncationLocation } from '../Combobox.types';
|
|
3
3
|
interface ComboboxData {
|
|
4
4
|
multiselect: boolean;
|
|
5
5
|
size: ComboboxSize;
|
|
@@ -8,6 +8,7 @@ interface ComboboxData {
|
|
|
8
8
|
isOpen: boolean;
|
|
9
9
|
state: State;
|
|
10
10
|
searchState: SearchState;
|
|
11
|
+
overflow: Overflow;
|
|
11
12
|
chipTruncationLocation?: TruncationLocation;
|
|
12
13
|
chipCharacterLimit?: number;
|
|
13
14
|
inputValue?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxContext.d.ts","sourceRoot":"","sources":["../../src/ComboboxContext/ComboboxContext.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,YAAY,EACZ,WAAW,EACX,KAAK,EACL,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAE3B,UAAU,YAAY;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE,WAAW,CAAC;IACzB,sBAAsB,CAAC,EAAE,kBAAkB,CAAC;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"ComboboxContext.d.ts","sourceRoot":"","sources":["../../src/ComboboxContext/ComboboxContext.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAE3B,UAAU,YAAY;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,sBAAsB,CAAC,EAAE,kBAAkB,CAAC;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,eAAe,uCAS1B,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { ComboboxGroupProps } from '../Combobox.types';
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
4
7
|
export declare function InternalComboboxGroup({ label, className, children, }: ComboboxGroupProps): JSX.Element;
|
|
5
8
|
export declare function ComboboxGroup(_: ComboboxGroupProps): JSX.Element;
|
|
6
9
|
export declare namespace ComboboxGroup {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxGroup.d.ts","sourceRoot":"","sources":["../../src/ComboboxGroup/ComboboxGroup.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAMnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAQvD,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,SAAS,EACT,QAAQ,GACT,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAqBlC;AAUD,wBAAgB,aAAa,CAAC,CAAC,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAEhE;yBAFe,aAAa"}
|
|
1
|
+
{"version":3,"file":"ComboboxGroup.d.ts","sourceRoot":"","sources":["../../src/ComboboxGroup/ComboboxGroup.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAMnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAQvD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,SAAS,EACT,QAAQ,GACT,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAqBlC;AAUD,wBAAgB,aAAa,CAAC,CAAC,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAEhE;yBAFe,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxGroup.styles.d.ts","sourceRoot":"","sources":["../../src/ComboboxGroup/ComboboxGroup.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"ComboboxGroup.styles.d.ts","sourceRoot":"","sources":["../../src/ComboboxGroup/ComboboxGroup.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAOpD,CAAC;AAEF,eAAO,MAAM,kBAAkB,QAW9B,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAO9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxMenu.d.ts","sourceRoot":"","sources":["../../src/ComboboxMenu/ComboboxMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ComboboxMenu.d.ts","sourceRoot":"","sources":["../../src/ComboboxMenu/ComboboxMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAWnD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAiClD,eAAO,MAAM,YAAY;eAjBZ,MAAM,SAAS;WACnB,MAAM,SAAS,CAAC,cAAc,CAAC;QAClC,MAAM;aACD,MAAM;eACJ,MAAM;qOAwIlB,CAAC"}
|
|
@@ -4,11 +4,8 @@ export declare const menuItemPadding: Record<Size, {
|
|
|
4
4
|
x: number;
|
|
5
5
|
y: number;
|
|
6
6
|
}>;
|
|
7
|
-
/**
|
|
8
|
-
export declare const
|
|
9
|
-
default: number;
|
|
10
|
-
large: number;
|
|
11
|
-
};
|
|
7
|
+
/** Util that returns the height of a menu item (in px) */
|
|
8
|
+
export declare const getMenuItemHeight: (size: Size) => number;
|
|
12
9
|
/**
|
|
13
10
|
* Menu styles
|
|
14
11
|
*/
|
|
@@ -16,11 +13,9 @@ export declare const popoverStyle: (width?: number) => string;
|
|
|
16
13
|
export declare const popoverThemeStyle: Record<Theme, string>;
|
|
17
14
|
export declare const menuBaseStyle: string;
|
|
18
15
|
export declare const menuThemeStyle: Record<Theme, string>;
|
|
19
|
-
export declare const menuSizeStyle: Record<Size, string>;
|
|
20
16
|
export declare const menuList: string;
|
|
21
17
|
export declare const menuMessageBaseStyle: string;
|
|
22
18
|
export declare const menuMessageThemeStyle: Record<Theme, string>;
|
|
23
|
-
export declare const menuMessageSizeStyle:
|
|
24
|
-
export declare const menuMessageIconSizeStyle: Record<Size, string>;
|
|
19
|
+
export declare const menuMessageSizeStyle: (size: Size) => string;
|
|
25
20
|
export declare const loadingIconStyle: string;
|
|
26
21
|
//# sourceMappingURL=Menu.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.styles.d.ts","sourceRoot":"","sources":["../../src/ComboboxMenu/Menu.styles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"Menu.styles.d.ts","sourceRoot":"","sources":["../../src/ComboboxMenu/Menu.styles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAK3C,OAAO,EAAE,YAAY,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,IAAI,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAKlE,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,iBAAiB,SAAU,IAAI,WAE3C,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,YAAY,4BAKxB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CASnD,CAAC;AAEF,eAAO,MAAM,aAAa,QASzB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAShD,CAAC;AAEF,eAAO,MAAM,QAAQ,QAIpB,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAKhC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAOvD,CAAC;AAEF,eAAO,MAAM,oBAAoB,SAAU,IAAI,WAI9C,CAAC;AAWF,eAAO,MAAM,gBAAgB,QAE5B,CAAC"}
|
|
@@ -5,6 +5,7 @@ import { ComboboxOptionProps, InternalComboboxOptionProps } from '../Combobox.ty
|
|
|
5
5
|
* Internal ComboboxOption Component for use within Combobox only.
|
|
6
6
|
*
|
|
7
7
|
* Prefer using {@link ComboboxOption}
|
|
8
|
+
* @internal
|
|
8
9
|
*/
|
|
9
10
|
export declare const InternalComboboxOption: React.ForwardRefExoticComponent<InternalComboboxOptionProps & React.RefAttributes<HTMLLIElement>>;
|
|
10
11
|
export declare function ComboboxOption(_: ComboboxOptionProps): JSX.Element;
|
|
@@ -16,6 +17,8 @@ export declare namespace ComboboxOption {
|
|
|
16
17
|
glyph: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
17
18
|
disabled: PropTypes.Requireable<boolean>;
|
|
18
19
|
className: PropTypes.Requireable<string>;
|
|
20
|
+
description: PropTypes.Requireable<string>;
|
|
21
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
22
|
};
|
|
20
23
|
}
|
|
21
24
|
//# sourceMappingURL=ComboboxOption.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxOption.d.ts","sourceRoot":"","sources":["../../src/ComboboxOption/ComboboxOption.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ComboboxOption.d.ts","sourceRoot":"","sources":["../../src/ComboboxOption/ComboboxOption.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAChE,OAAO,SAAS,MAAM,YAAY,CAAC;AAOnC,OAAO,EACL,mBAAmB,EAEnB,2BAA2B,EAC5B,MAAM,mBAAmB,CAAC;AAY3B;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,mGAyGlC,CAAC;AAGF,wBAAgB,cAAc,CAAC,CAAC,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAElE;yBAFe,cAAc"}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
+
import { Theme } from '@leafygreen-ui/lib';
|
|
1
2
|
import { ComboboxSize } from '../Combobox.types';
|
|
2
3
|
/**
|
|
3
4
|
* Styles
|
|
4
5
|
*/
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const flexSpan: string;
|
|
6
|
+
export declare const comboboxOptionSizeStyle: (size: ComboboxSize) => string;
|
|
7
|
+
export declare const checkMarkSizeStyle: Record<ComboboxSize, string>;
|
|
8
|
+
export declare const checkBoxBaseStyles: string;
|
|
9
9
|
export declare const disallowPointer: string;
|
|
10
10
|
export declare const displayNameStyle: (isSelected: boolean) => string;
|
|
11
|
+
export declare const iconThemeStyles: Record<Theme, string>;
|
|
12
|
+
export declare const iconHighlightedStyles: Record<Theme, string>;
|
|
13
|
+
export declare const iconDisabledStyles: Record<Theme, string>;
|
|
14
|
+
export declare const checkMarkThemeStyles: Record<Theme, string>;
|
|
15
|
+
export declare const checkMarkDisabledStyles: Record<Theme, string>;
|
|
16
|
+
export declare const multiselectIconPosition: string;
|
|
17
|
+
export declare const multiselectIconLargePosition: string;
|
|
11
18
|
//# sourceMappingURL=ComboboxOption.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxOption.styles.d.ts","sourceRoot":"","sources":["../../src/ComboboxOption/ComboboxOption.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ComboboxOption.styles.d.ts","sourceRoot":"","sources":["../../src/ComboboxOption/ComboboxOption.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAK3C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMjD;;GAEG;AAEH,eAAO,MAAM,uBAAuB,SAAU,YAAY,WAUzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAa3D,CAAC;AAEF,eAAO,MAAM,kBAAkB,QAQ9B,CAAC;AAEF,eAAO,MAAM,eAAe,QAE3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,eAAgB,OAAO,WAEnD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAOjD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAOvD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAOpD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAOtD,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAOzD,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAInC,CAAC;AACF,eAAO,MAAM,4BAA4B,QAIxC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
import { Theme } from '@leafygreen-ui/lib';
|
|
3
|
+
import { ComboboxSize } from '../Combobox.types';
|
|
4
|
+
/**
|
|
5
|
+
* Util that returns the leftGlyph and rightGlyph.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getGlyphs: ({ withIcons, isSelected, glyph, optionTextId, disabled, darkMode, size, multiselect, theme, isFocused, }: {
|
|
8
|
+
withIcons: boolean;
|
|
9
|
+
isSelected: boolean;
|
|
10
|
+
glyph?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
11
|
+
optionTextId: string;
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
darkMode: boolean;
|
|
14
|
+
size: ComboboxSize;
|
|
15
|
+
multiselect: boolean;
|
|
16
|
+
theme: Theme;
|
|
17
|
+
isFocused: boolean;
|
|
18
|
+
}) => {
|
|
19
|
+
leftGlyph: JSX.Element | null;
|
|
20
|
+
rightGlyph: false | JSX.Element;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=getGlyphs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getGlyphs.d.ts","sourceRoot":"","sources":["../../src/ComboboxOption/getGlyphs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAK5C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAYjD;;GAEG;AACH,eAAO,MAAM,SAAS;eAYT,OAAO;gBACN,OAAO;;kBAEL,MAAM;cACV,OAAO;cACP,OAAO;UACX,YAAY;iBACL,OAAO;WACb,KAAK;eACD,OAAO;;;;CAiEnB,CAAC"}
|