@leafygreen-ui/combobox 7.0.0-alpha.1 → 7.0.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.
- package/CHANGELOG.md +151 -33
- package/dist/Combobox/Combobox.d.ts +48 -0
- package/dist/Combobox/Combobox.d.ts.map +1 -0
- package/dist/Combobox/Combobox.styles.d.ts +51 -0
- package/dist/Combobox/Combobox.styles.d.ts.map +1 -0
- package/dist/Combobox/index.d.ts +2 -0
- package/dist/Combobox/index.d.ts.map +1 -0
- package/dist/Combobox.types.d.ts +255 -0
- package/dist/Combobox.types.d.ts.map +1 -0
- package/dist/ComboboxChip/ComboboxChip.d.ts +4 -0
- package/dist/ComboboxChip/ComboboxChip.d.ts.map +1 -0
- package/dist/ComboboxChip/ComboboxChip.stories.d.ts +7 -0
- package/dist/ComboboxChip/ComboboxChip.stories.d.ts.map +1 -0
- package/dist/ComboboxChip/ComboboxChip.styles.d.ts +24 -0
- package/dist/ComboboxChip/ComboboxChip.styles.d.ts.map +1 -0
- package/dist/ComboboxChip/index.d.ts +2 -0
- package/dist/ComboboxChip/index.d.ts.map +1 -0
- package/dist/ComboboxContext/ComboboxContext.d.ts +28 -0
- package/dist/ComboboxContext/ComboboxContext.d.ts.map +1 -0
- package/dist/ComboboxContext/index.d.ts +2 -0
- package/dist/ComboboxContext/index.d.ts.map +1 -0
- package/dist/ComboboxGroup/ComboboxGroup.d.ts +17 -0
- package/dist/ComboboxGroup/ComboboxGroup.d.ts.map +1 -0
- package/dist/ComboboxGroup/ComboboxGroup.stories.d.ts +7 -0
- package/dist/ComboboxGroup/ComboboxGroup.stories.d.ts.map +1 -0
- package/dist/ComboboxGroup/ComboboxGroup.styles.d.ts +5 -0
- package/dist/ComboboxGroup/ComboboxGroup.styles.d.ts.map +1 -0
- package/dist/ComboboxGroup/index.d.ts +2 -0
- package/dist/ComboboxGroup/index.d.ts.map +1 -0
- package/dist/ComboboxMenu/ComboboxMenu.d.ts +13 -0
- package/dist/ComboboxMenu/ComboboxMenu.d.ts.map +1 -0
- package/dist/ComboboxMenu/ComboboxMenu.stories.d.ts +6 -0
- package/dist/ComboboxMenu/ComboboxMenu.stories.d.ts.map +1 -0
- package/dist/ComboboxMenu/Menu.styles.d.ts +21 -0
- package/dist/ComboboxMenu/Menu.styles.d.ts.map +1 -0
- package/dist/ComboboxMenu/index.d.ts +2 -0
- package/dist/ComboboxMenu/index.d.ts.map +1 -0
- package/dist/ComboboxOption/ComboboxOption.d.ts +24 -0
- package/dist/ComboboxOption/ComboboxOption.d.ts.map +1 -0
- package/dist/ComboboxOption/ComboboxOption.stories.d.ts +7 -0
- package/dist/ComboboxOption/ComboboxOption.stories.d.ts.map +1 -0
- package/dist/ComboboxOption/ComboboxOption.styles.d.ts +18 -0
- package/dist/ComboboxOption/ComboboxOption.styles.d.ts.map +1 -0
- package/dist/ComboboxOption/getGlyphs.d.ts +22 -0
- package/dist/ComboboxOption/getGlyphs.d.ts.map +1 -0
- package/dist/ComboboxOption/index.d.ts +2 -0
- package/dist/ComboboxOption/index.d.ts.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/test-utils/getTestOptions.testutils.d.ts +3 -0
- package/dist/test-utils/getTestOptions.testutils.d.ts.map +1 -0
- package/dist/utils/ComboboxTestUtils.d.ts +41 -0
- package/dist/utils/ComboboxTestUtils.d.ts.map +1 -0
- package/dist/utils/OptionObjectUtils.d.ts +23 -0
- package/dist/utils/OptionObjectUtils.d.ts.map +1 -0
- package/dist/utils/checkScrollPosition.d.ts +10 -0
- package/dist/utils/checkScrollPosition.d.ts.map +1 -0
- package/dist/utils/flattenChildren.d.ts +12 -0
- package/dist/utils/flattenChildren.d.ts.map +1 -0
- package/dist/utils/getNameAndValue.d.ts +15 -0
- package/dist/utils/getNameAndValue.d.ts.map +1 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/wrapJSX.d.ts +15 -0
- package/dist/utils/wrapJSX.d.ts.map +1 -0
- package/package.json +20 -18
- package/src/Combobox/Combobox.spec.tsx +18 -13
- package/src/Combobox/Combobox.styles.ts +16 -16
- package/src/Combobox/Combobox.tsx +3 -3
- package/src/Combobox.story.tsx +13 -1
- package/src/Combobox.types.ts +111 -149
- package/src/{Chip/Chip.stories.tsx → ComboboxChip/ComboboxChip.stories.tsx} +4 -4
- package/src/ComboboxChip/ComboboxChip.styles.ts +77 -0
- package/src/ComboboxChip/ComboboxChip.tsx +95 -0
- package/src/ComboboxChip/index.ts +1 -0
- package/src/ComboboxMenu/ComboboxMenu.stories.tsx +63 -0
- package/src/ComboboxMenu/ComboboxMenu.tsx +10 -13
- package/src/ComboboxMenu/Menu.styles.ts +2 -2
- package/src/ComboboxOption/ComboboxOption.styles.ts +1 -1
- package/src/utils/ComboboxTestUtils.tsx +8 -3
- package/src/utils/flattenChildren.tsx +1 -1
- package/stories.js +1 -0
- package/tsconfig.json +15 -8
- package/tsdoc.json +259 -340
- package/.turbo/turbo-build.log +0 -0
- package/.turbo/turbo-tsc.log +0 -1
- package/rollup.config.mjs +0 -2
- package/src/Chip/Chip.styles.ts +0 -171
- package/src/Chip/Chip.tsx +0 -175
- package/src/Chip/index.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,50 +1,168 @@
|
|
|
1
1
|
# @leafygreen-ui/combobox
|
|
2
2
|
|
|
3
|
-
## 7.0.
|
|
3
|
+
## 7.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9a471879: - Updates disabled dark mode caret from `gray.dark2` to `gray.dark1`
|
|
8
|
+
- Updates dark mode dropdown border from `gray.dark3` to `gray.dark2`
|
|
9
|
+
- Updated dependencies [dd4f3da8]
|
|
10
|
+
- Updated dependencies [784e9d8a]
|
|
11
|
+
- Updated dependencies [90053e16]
|
|
12
|
+
- @leafygreen-ui/lib@13.0.0
|
|
13
|
+
- @leafygreen-ui/icon-button@15.0.19
|
|
14
|
+
- @leafygreen-ui/typography@18.0.0
|
|
15
|
+
- @leafygreen-ui/checkbox@12.0.20
|
|
16
|
+
- @leafygreen-ui/inline-definition@6.0.13
|
|
17
|
+
- @leafygreen-ui/input-option@1.0.13
|
|
18
|
+
- @leafygreen-ui/leafygreen-provider@3.1.10
|
|
19
|
+
- @leafygreen-ui/popover@11.1.1
|
|
20
|
+
|
|
21
|
+
## 7.0.0
|
|
4
22
|
|
|
5
23
|
### Major Changes
|
|
6
24
|
|
|
7
|
-
-
|
|
25
|
+
- 9a728c7b: Replaces internal `Chip` component with new LG `Chip` component and exposes an upgraded `TruncationLocation` object which capitalizes the first letter of each key. Instead of referring to it as `TruncationLocation.end`, it will now be represented as `TruncationLocation.End`.
|
|
8
26
|
|
|
9
27
|
### Patch Changes
|
|
10
28
|
|
|
11
|
-
- Updated dependencies [
|
|
12
|
-
- @leafygreen-ui/
|
|
13
|
-
- @leafygreen-ui/inline-definition@7.0.0-alpha.1
|
|
14
|
-
- @leafygreen-ui/input-option@2.0.0-alpha.1
|
|
15
|
-
- @leafygreen-ui/icon-button@16.0.0-alpha.1
|
|
16
|
-
- @leafygreen-ui/typography@17.0.0-alpha.1
|
|
17
|
-
- @leafygreen-ui/checkbox@13.0.0-alpha.1
|
|
18
|
-
- @leafygreen-ui/emotion@5.0.0-alpha.1
|
|
19
|
-
- @leafygreen-ui/palette@5.0.0-alpha.1
|
|
20
|
-
- @leafygreen-ui/popover@12.0.0-alpha.1
|
|
21
|
-
- @leafygreen-ui/tokens@3.0.0-alpha.1
|
|
22
|
-
- @leafygreen-ui/hooks@8.0.0-alpha.1
|
|
23
|
-
- @leafygreen-ui/icon@12.0.0-alpha.1
|
|
24
|
-
- @leafygreen-ui/lib@11.0.0-alpha.1
|
|
29
|
+
- Updated dependencies [9a728c7b]
|
|
30
|
+
- @leafygreen-ui/chip@1.0.0
|
|
25
31
|
|
|
26
|
-
##
|
|
32
|
+
## 6.0.15
|
|
27
33
|
|
|
28
|
-
###
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- 3a9b274d: Handles keyboard event based on the event's `key` property rather than its `keyCode` property
|
|
37
|
+
- Updated dependencies [3a9b274d]
|
|
38
|
+
- @leafygreen-ui/lib@12.0.0
|
|
39
|
+
- @leafygreen-ui/checkbox@12.0.19
|
|
40
|
+
- @leafygreen-ui/icon-button@15.0.18
|
|
41
|
+
- @leafygreen-ui/inline-definition@6.0.12
|
|
42
|
+
- @leafygreen-ui/input-option@1.0.11
|
|
43
|
+
- @leafygreen-ui/leafygreen-provider@3.1.9
|
|
44
|
+
- @leafygreen-ui/popover@11.0.18
|
|
45
|
+
- @leafygreen-ui/typography@17.0.1
|
|
46
|
+
|
|
47
|
+
## 6.0.14
|
|
48
|
+
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- Updated dependencies [a5770c15]
|
|
52
|
+
- Updated dependencies [c89d17a4]
|
|
53
|
+
- @leafygreen-ui/typography@17.0.0
|
|
54
|
+
- @leafygreen-ui/checkbox@12.0.18
|
|
55
|
+
- @leafygreen-ui/input-option@1.0.10
|
|
56
|
+
|
|
57
|
+
## 6.0.13
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- Updated dependencies [3fe03b50]
|
|
62
|
+
- Updated dependencies [fd907503]
|
|
63
|
+
- Updated dependencies [c9f0055a]
|
|
64
|
+
- Updated dependencies [56459cde]
|
|
65
|
+
- @leafygreen-ui/tokens@2.2.0
|
|
66
|
+
- @leafygreen-ui/hooks@8.0.0
|
|
67
|
+
- @leafygreen-ui/icon@11.23.0
|
|
68
|
+
- @leafygreen-ui/checkbox@12.0.17
|
|
69
|
+
- @leafygreen-ui/leafygreen-provider@3.1.8
|
|
70
|
+
- @leafygreen-ui/popover@11.0.17
|
|
71
|
+
|
|
72
|
+
## 6.0.12
|
|
73
|
+
|
|
74
|
+
### Patch Changes
|
|
75
|
+
|
|
76
|
+
- 4fcf2e94: Type assert children as `Array<React.ReactNode>` inside the internal function `renderedMenuContents` and add explicit return type to internal function `renderCombobox`.
|
|
77
|
+
- Updated dependencies [4fcf2e94]
|
|
78
|
+
- Updated dependencies [4fcf2e94]
|
|
79
|
+
- Updated dependencies [4fcf2e94]
|
|
80
|
+
- Updated dependencies [4fcf2e94]
|
|
81
|
+
- Updated dependencies [4fcf2e94]
|
|
82
|
+
- Updated dependencies [4fcf2e94]
|
|
83
|
+
- @leafygreen-ui/icon@11.22.2
|
|
84
|
+
- @leafygreen-ui/lib@11.0.0
|
|
85
|
+
- @leafygreen-ui/checkbox@12.0.16
|
|
86
|
+
- @leafygreen-ui/popover@11.0.16
|
|
87
|
+
- @leafygreen-ui/icon-button@15.0.17
|
|
88
|
+
- @leafygreen-ui/inline-definition@6.0.11
|
|
89
|
+
- @leafygreen-ui/input-option@1.0.9
|
|
90
|
+
- @leafygreen-ui/leafygreen-provider@3.1.7
|
|
91
|
+
- @leafygreen-ui/typography@16.5.5
|
|
92
|
+
|
|
93
|
+
## 6.0.11
|
|
94
|
+
|
|
95
|
+
### Patch Changes
|
|
96
|
+
|
|
97
|
+
- c11bbc29: Fixes problem with ts-docs not being available in bundle.
|
|
98
|
+
- Updated dependencies [c11bbc29]
|
|
99
|
+
- @leafygreen-ui/checkbox@12.0.15
|
|
100
|
+
- @leafygreen-ui/emotion@4.0.7
|
|
101
|
+
- @leafygreen-ui/hooks@7.7.8
|
|
102
|
+
- @leafygreen-ui/icon@11.22.1
|
|
103
|
+
- @leafygreen-ui/icon-button@15.0.16
|
|
104
|
+
- @leafygreen-ui/inline-definition@6.0.10
|
|
105
|
+
- @leafygreen-ui/input-option@1.0.8
|
|
106
|
+
- @leafygreen-ui/leafygreen-provider@3.1.6
|
|
107
|
+
- @leafygreen-ui/lib@10.4.3
|
|
108
|
+
- @leafygreen-ui/palette@4.0.7
|
|
109
|
+
- @leafygreen-ui/popover@11.0.15
|
|
110
|
+
- @leafygreen-ui/tokens@2.1.4
|
|
111
|
+
- @leafygreen-ui/typography@16.5.4
|
|
112
|
+
|
|
113
|
+
## 6.0.10
|
|
114
|
+
|
|
115
|
+
### Patch Changes
|
|
116
|
+
|
|
117
|
+
- c15ee2ac: Fixes missing documentation file
|
|
118
|
+
- Updated dependencies [f73807cf]
|
|
119
|
+
- Updated dependencies [31c09354]
|
|
120
|
+
- Updated dependencies [c15ee2ac]
|
|
121
|
+
- @leafygreen-ui/icon@11.22.0
|
|
122
|
+
- @leafygreen-ui/checkbox@12.0.14
|
|
123
|
+
- @leafygreen-ui/emotion@4.0.6
|
|
124
|
+
- @leafygreen-ui/hooks@7.7.7
|
|
125
|
+
- @leafygreen-ui/icon-button@15.0.15
|
|
126
|
+
- @leafygreen-ui/inline-definition@6.0.9
|
|
127
|
+
- @leafygreen-ui/input-option@1.0.7
|
|
128
|
+
- @leafygreen-ui/leafygreen-provider@3.1.5
|
|
129
|
+
- @leafygreen-ui/lib@10.4.2
|
|
130
|
+
- @leafygreen-ui/palette@4.0.6
|
|
131
|
+
- @leafygreen-ui/popover@11.0.14
|
|
132
|
+
- @leafygreen-ui/tokens@2.1.3
|
|
133
|
+
- @leafygreen-ui/typography@16.5.3
|
|
134
|
+
|
|
135
|
+
## 6.0.9
|
|
136
|
+
|
|
137
|
+
### Patch Changes
|
|
138
|
+
|
|
139
|
+
- e8ef95e6: Updates disabled styles
|
|
140
|
+
|
|
141
|
+
## 6.0.8
|
|
142
|
+
|
|
143
|
+
### Patch Changes
|
|
144
|
+
|
|
145
|
+
- 2603d7ac: Component props now properly inherit from `PopoverProps` interface
|
|
29
146
|
|
|
30
|
-
|
|
147
|
+
## 6.0.7
|
|
31
148
|
|
|
32
149
|
### Patch Changes
|
|
33
150
|
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
- @leafygreen-ui/
|
|
37
|
-
- @leafygreen-ui/
|
|
38
|
-
- @leafygreen-ui/
|
|
39
|
-
- @leafygreen-ui/
|
|
40
|
-
- @leafygreen-ui/
|
|
41
|
-
- @leafygreen-ui/
|
|
42
|
-
- @leafygreen-ui/
|
|
43
|
-
- @leafygreen-ui/
|
|
44
|
-
- @leafygreen-ui/
|
|
45
|
-
- @leafygreen-ui/
|
|
46
|
-
- @leafygreen-ui/
|
|
47
|
-
- @leafygreen-ui/
|
|
151
|
+
- 215268ff: Updates build tooling. No functional changes
|
|
152
|
+
- Updated dependencies [215268ff]
|
|
153
|
+
- @leafygreen-ui/leafygreen-provider@3.1.4
|
|
154
|
+
- @leafygreen-ui/inline-definition@6.0.8
|
|
155
|
+
- @leafygreen-ui/input-option@1.0.6
|
|
156
|
+
- @leafygreen-ui/icon-button@15.0.14
|
|
157
|
+
- @leafygreen-ui/typography@16.5.2
|
|
158
|
+
- @leafygreen-ui/checkbox@12.0.13
|
|
159
|
+
- @leafygreen-ui/emotion@4.0.5
|
|
160
|
+
- @leafygreen-ui/palette@4.0.5
|
|
161
|
+
- @leafygreen-ui/popover@11.0.13
|
|
162
|
+
- @leafygreen-ui/tokens@2.1.2
|
|
163
|
+
- @leafygreen-ui/hooks@7.7.6
|
|
164
|
+
- @leafygreen-ui/icon@11.20.1
|
|
165
|
+
- @leafygreen-ui/lib@10.4.1
|
|
48
166
|
|
|
49
167
|
## 6.0.6
|
|
50
168
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { ComboboxProps } from '../Combobox.types';
|
|
4
|
+
/**
|
|
5
|
+
* Combobox is a combination of a Select and TextInput,
|
|
6
|
+
* allowing the user to either type a value directly or select a value from the list.
|
|
7
|
+
* Can be configured to select a single or multiple options.
|
|
8
|
+
*/
|
|
9
|
+
export declare function Combobox<M extends boolean>({ children, label, description, placeholder, 'aria-label': ariaLabel, disabled, size, darkMode: darkModeProp, state, errorMessage, searchState, searchEmptyMessage, searchErrorMessage, searchLoadingMessage, filteredOptions, onFilter, clearable, onClear, overflow, multiselect, initialValue, onChange, value, chipTruncationLocation, chipCharacterLimit, className, usePortal, portalClassName, portalContainer, scrollContainer, popoverZIndex, ...rest }: ComboboxProps<M>): React.JSX.Element;
|
|
10
|
+
export declare namespace Combobox {
|
|
11
|
+
var propTypes: {
|
|
12
|
+
multiselect: PropTypes.Requireable<boolean>;
|
|
13
|
+
value: PropTypes.Requireable<string | (string | null | undefined)[]>;
|
|
14
|
+
initialValue: PropTypes.Requireable<string | (string | null | undefined)[]>;
|
|
15
|
+
overflow: PropTypes.Requireable<"expand-y" | "scroll-x" | "expand-x">;
|
|
16
|
+
darkMode: PropTypes.Requireable<boolean>;
|
|
17
|
+
label: PropTypes.Requireable<string>;
|
|
18
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
19
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
20
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
+
chipCharacterLimit: PropTypes.Requireable<number>;
|
|
22
|
+
chipTruncationLocation: PropTypes.Requireable<"none" | "start" | "middle" | "end">;
|
|
23
|
+
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
24
|
+
onFilter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
+
clearable: PropTypes.Requireable<boolean>;
|
|
26
|
+
searchLoadingMessage: PropTypes.Requireable<string>;
|
|
27
|
+
searchErrorMessage: PropTypes.Requireable<string>;
|
|
28
|
+
searchEmptyMessage: PropTypes.Requireable<string>;
|
|
29
|
+
searchState: PropTypes.Requireable<"error" | "unset" | "loading">;
|
|
30
|
+
errorMessage: PropTypes.Requireable<string>;
|
|
31
|
+
state: PropTypes.Requireable<"none" | "error">;
|
|
32
|
+
size: PropTypes.Requireable<"xsmall" | "small" | "default" | "large">;
|
|
33
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
34
|
+
description: PropTypes.Requireable<string>;
|
|
35
|
+
placeholder: PropTypes.Requireable<string>;
|
|
36
|
+
filteredOptions: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
37
|
+
popoverZIndex: PropTypes.Requireable<number>;
|
|
38
|
+
usePortal: PropTypes.Requireable<boolean>;
|
|
39
|
+
scrollContainer: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
40
|
+
portalContainer: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
41
|
+
portalClassName: PropTypes.Requireable<string>;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Why'd you have to go and make things so complicated?
|
|
46
|
+
* - Avril; and also me to myself about this component
|
|
47
|
+
*/
|
|
48
|
+
//# sourceMappingURL=Combobox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../src/Combobox/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAYN,MAAM,OAAO,CAAC;AAQf,OAAO,SAAS,MAAM,YAAY,CAAC;AAkBnC,OAAO,EAEL,aAAa,EAUd,MAAM,mBAAmB,CAAC;AA4C3B;;;;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,qBAguClB;yBAjwCe,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8yCxB;;;GAGG"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Theme } from '@leafygreen-ui/lib';
|
|
2
|
+
import { ComboboxSize as Size, Overflow } from '../Combobox.types';
|
|
3
|
+
/**
|
|
4
|
+
* The min-height of the combobox.
|
|
5
|
+
*/
|
|
6
|
+
export declare const wrapperHeight: Record<Size, number>;
|
|
7
|
+
/**
|
|
8
|
+
* Size of combobox x & y padding (in px)
|
|
9
|
+
* (wrapperHeight - inputHeight(- (borderTop + borderBottom)) / 2
|
|
10
|
+
*/
|
|
11
|
+
export declare const comboboxPadding: Record<Size, {
|
|
12
|
+
y: number;
|
|
13
|
+
xLeftWithChip: number;
|
|
14
|
+
xLeftWithoutChip: number;
|
|
15
|
+
xRight: number;
|
|
16
|
+
}>;
|
|
17
|
+
/** Width of the clear icon (in px) */
|
|
18
|
+
export declare const clearButtonIconSize = 28;
|
|
19
|
+
/** Width of the dropdown caret icon (in px) */
|
|
20
|
+
export declare const caretIconSize: 16;
|
|
21
|
+
export declare const comboboxParentStyle: (size: Size) => string;
|
|
22
|
+
export declare const baseComboboxStyles: string;
|
|
23
|
+
export declare const comboboxThemeStyles: Record<Theme, string>;
|
|
24
|
+
export declare const comboboxSizeStyles: (size: Size, isMultiselectWithSelections: boolean) => string;
|
|
25
|
+
export declare const comboboxDisabledStyles: Record<Theme, string>;
|
|
26
|
+
export declare const comboboxErrorStyles: Record<Theme, string>;
|
|
27
|
+
export declare const comboboxFocusStyle: Record<Theme, string>;
|
|
28
|
+
export declare const iconsWrapperBaseStyles: string;
|
|
29
|
+
export declare const iconsWrapperSizeStyles: Record<Size, string>;
|
|
30
|
+
export declare const inputWrapperStyle: ({ overflow, size, }: {
|
|
31
|
+
overflow: Overflow;
|
|
32
|
+
size: Size;
|
|
33
|
+
}) => string | undefined;
|
|
34
|
+
export declare const baseInputElementStyle: string;
|
|
35
|
+
export declare const inputElementThemeStyle: Record<Theme, string>;
|
|
36
|
+
export declare const inputElementDisabledThemeStyle: Record<Theme, string>;
|
|
37
|
+
export declare const inputElementSizeStyle: (size: Size) => string;
|
|
38
|
+
export declare const inputElementTransitionStyles: (isOpen: boolean) => string;
|
|
39
|
+
/** Should only be applied to a multiselect */
|
|
40
|
+
export declare const multiselectInputElementStyle: (size: Size, inputValue?: string) => string;
|
|
41
|
+
export declare const clearButtonStyle: string;
|
|
42
|
+
export declare const endIconStyle: string;
|
|
43
|
+
export declare const errorMessageThemeStyle: Record<Theme, string>;
|
|
44
|
+
export declare const errorMessageSizeStyle: (size: Size) => string;
|
|
45
|
+
export declare const labelDescriptionContainerStyle: string;
|
|
46
|
+
export declare const labelDescriptionLargeStyles: string;
|
|
47
|
+
export declare const comboboxOverflowShadowStyles: Record<Theme, string>;
|
|
48
|
+
export declare const errorIconThemeStyles: Record<Theme, string>;
|
|
49
|
+
export declare const caretIconThemeStyles: Record<Theme, string>;
|
|
50
|
+
export declare const caretIconDisabledStyles: Record<Theme, string>;
|
|
51
|
+
//# sourceMappingURL=Combobox.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Combobox.styles.d.ts","sourceRoot":"","sources":["../../src/Combobox/Combobox.styles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAU3C,OAAO,EAAE,YAAY,IAAI,IAAI,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAoBnE;;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;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;CAChB,CA0BF,CAAC;AA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,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Combobox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { type ChipProps, TruncationLocation } from '@leafygreen-ui/chip';
|
|
3
|
+
import { Either, HTMLElementProps } from '@leafygreen-ui/lib';
|
|
4
|
+
import { PortalControlProps } from '@leafygreen-ui/popover';
|
|
5
|
+
export { TruncationLocation };
|
|
6
|
+
/**
|
|
7
|
+
* Prop Enums & Types
|
|
8
|
+
*/
|
|
9
|
+
export declare const ComboboxElement: {
|
|
10
|
+
readonly Input: "Input";
|
|
11
|
+
readonly ClearButton: "ClearButton";
|
|
12
|
+
readonly FirstChip: "FirstChip";
|
|
13
|
+
readonly LastChip: "LastChip";
|
|
14
|
+
readonly MiddleChip: "MiddleChip";
|
|
15
|
+
readonly Combobox: "Combobox";
|
|
16
|
+
readonly Menu: "Menu";
|
|
17
|
+
};
|
|
18
|
+
export declare type ComboboxElement = (typeof ComboboxElement)[keyof typeof ComboboxElement];
|
|
19
|
+
/**
|
|
20
|
+
* Prop types
|
|
21
|
+
*/
|
|
22
|
+
export declare const ComboboxSize: {
|
|
23
|
+
readonly XSmall: "xsmall";
|
|
24
|
+
readonly Small: "small";
|
|
25
|
+
readonly Default: "default";
|
|
26
|
+
readonly Large: "large";
|
|
27
|
+
};
|
|
28
|
+
export declare type ComboboxSize = (typeof ComboboxSize)[keyof typeof ComboboxSize];
|
|
29
|
+
export declare const Overflow: {
|
|
30
|
+
/**
|
|
31
|
+
* Combobox will be set to a fixed width, and will expand its height based on the number of Chips selected
|
|
32
|
+
*/
|
|
33
|
+
readonly expandY: "expand-y";
|
|
34
|
+
/**
|
|
35
|
+
* Combobox will be set to a fixed height and width (default 100% of container). Chips will be scrollable left-right
|
|
36
|
+
*/
|
|
37
|
+
readonly scrollX: "scroll-x";
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated
|
|
40
|
+
*/
|
|
41
|
+
readonly expandX: "expand-x";
|
|
42
|
+
};
|
|
43
|
+
export declare type Overflow = (typeof Overflow)[keyof typeof Overflow];
|
|
44
|
+
export declare const State: {
|
|
45
|
+
readonly none: "none";
|
|
46
|
+
readonly error: "error";
|
|
47
|
+
};
|
|
48
|
+
export declare type State = (typeof State)[keyof typeof State];
|
|
49
|
+
export declare const SearchState: {
|
|
50
|
+
readonly unset: "unset";
|
|
51
|
+
readonly error: "error";
|
|
52
|
+
readonly loading: "loading";
|
|
53
|
+
};
|
|
54
|
+
export declare type SearchState = (typeof SearchState)[keyof typeof SearchState];
|
|
55
|
+
/**
|
|
56
|
+
* Generic Typing
|
|
57
|
+
*/
|
|
58
|
+
export declare type SelectValueType<M extends boolean> = M extends true ? Array<string> : string | null;
|
|
59
|
+
export declare type onChangeType<M extends boolean> = M extends true ? (value: SelectValueType<true>) => void : (value: SelectValueType<false>) => void;
|
|
60
|
+
export declare function getNullSelection<M extends boolean>(multiselect: M): SelectValueType<M>;
|
|
61
|
+
/**
|
|
62
|
+
* Combobox Props
|
|
63
|
+
*/
|
|
64
|
+
export interface ComboboxMultiselectProps<M extends boolean> {
|
|
65
|
+
/**
|
|
66
|
+
* Defines whether a user can select multiple options, or only a single option.
|
|
67
|
+
* When using TypeScript, `multiselect` affects the valid values of `initialValue`, `value`, and `onChange`
|
|
68
|
+
*/
|
|
69
|
+
multiselect?: M;
|
|
70
|
+
/**
|
|
71
|
+
* The initial selection.
|
|
72
|
+
* Must be a string (or array of strings) that matches the `value` prop of a `ComboboxOption`.
|
|
73
|
+
* Changing the `initialValue` after initial render will not change the selection.
|
|
74
|
+
*/
|
|
75
|
+
initialValue?: SelectValueType<M>;
|
|
76
|
+
/**
|
|
77
|
+
* A callback called when the selection changes.
|
|
78
|
+
* Callback receives a single argument that is the new selection, either string, or string array
|
|
79
|
+
*/
|
|
80
|
+
onChange?: onChangeType<M>;
|
|
81
|
+
/**
|
|
82
|
+
* The controlled value of the Combobox.
|
|
83
|
+
* Must be a string (or array of strings) that matches the `value` prop of a `ComboboxOption`.
|
|
84
|
+
* Changing `value` after initial render _will_ affect the selection.
|
|
85
|
+
* `value` will always take precedence over `initialValue` if both are provided.
|
|
86
|
+
*/
|
|
87
|
+
value?: SelectValueType<M>;
|
|
88
|
+
/**
|
|
89
|
+
* Defines the overflow behavior of a multiselect combobox.
|
|
90
|
+
*
|
|
91
|
+
* `expand-y`: Combobox has fixed width, and additional selections will cause the element to grow in the block direction.
|
|
92
|
+
*
|
|
93
|
+
* `expand-x`: Combobox has fixed height, and additional selections will cause the element to grow in the inline direction.
|
|
94
|
+
*
|
|
95
|
+
* `scroll-x`: Combobox has fixed height and width, and additional selections will cause the element to be scrollable in the x (horizontal) direction.
|
|
96
|
+
*/
|
|
97
|
+
overflow?: M extends true ? Overflow : undefined;
|
|
98
|
+
}
|
|
99
|
+
declare type PartialChipProps = Pick<ChipProps, 'chipTruncationLocation' | 'chipCharacterLimit' | 'popoverZIndex'>;
|
|
100
|
+
export declare type BaseComboboxProps = Omit<HTMLElementProps<'div'>, 'onChange'> & PortalControlProps & PartialChipProps & {
|
|
101
|
+
/**
|
|
102
|
+
* Defines the Combobox Options by passing children. Must be `ComboboxOption` or `ComboboxGroup`
|
|
103
|
+
*/
|
|
104
|
+
children?: ReactNode;
|
|
105
|
+
/**
|
|
106
|
+
* An accessible label for the input, rendered in a <label> to the DOM
|
|
107
|
+
*/
|
|
108
|
+
label?: string;
|
|
109
|
+
/**
|
|
110
|
+
* An accessible label for the input, used only for screen-readers
|
|
111
|
+
*/
|
|
112
|
+
'aria-label'?: string;
|
|
113
|
+
/**
|
|
114
|
+
* A description for the input
|
|
115
|
+
*/
|
|
116
|
+
description?: string;
|
|
117
|
+
/**
|
|
118
|
+
* A placeholder for the input element. Uses the native `placeholder` attribute.
|
|
119
|
+
*/
|
|
120
|
+
placeholder?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Disables all interaction with the component
|
|
123
|
+
*/
|
|
124
|
+
disabled?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Defines the visual size of the component
|
|
127
|
+
*/
|
|
128
|
+
size?: ComboboxSize;
|
|
129
|
+
/**
|
|
130
|
+
* Toggles Dark Mode
|
|
131
|
+
*/
|
|
132
|
+
darkMode?: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* The error state of the component. Defines whether the error message is displayed.
|
|
135
|
+
*/
|
|
136
|
+
state?: State;
|
|
137
|
+
/**
|
|
138
|
+
* The message shown below the input when state is `error`
|
|
139
|
+
*/
|
|
140
|
+
errorMessage?: string;
|
|
141
|
+
/**
|
|
142
|
+
* The state of search results. Toggles search messages within the menu.
|
|
143
|
+
*/
|
|
144
|
+
searchState?: SearchState;
|
|
145
|
+
/**
|
|
146
|
+
* A message shown within the menu when there are no options passed in as children, or `filteredOptions` is an empty array
|
|
147
|
+
*/
|
|
148
|
+
searchEmptyMessage?: string;
|
|
149
|
+
/**
|
|
150
|
+
* A message shown within the menu when searchState is `error`
|
|
151
|
+
*/
|
|
152
|
+
searchErrorMessage?: string;
|
|
153
|
+
/**
|
|
154
|
+
* A message shown within the menu when searchState is `loading`
|
|
155
|
+
*/
|
|
156
|
+
searchLoadingMessage?: string;
|
|
157
|
+
/**
|
|
158
|
+
* A callback called when the search input changes.
|
|
159
|
+
* Receives a single argument that is the current input value.
|
|
160
|
+
* Use this callback to set `searchState` and/or `filteredOptions` appropriately
|
|
161
|
+
*/
|
|
162
|
+
onFilter?: (value: string) => void;
|
|
163
|
+
/**
|
|
164
|
+
* Defines whether the Clear button appears to the right of the input.
|
|
165
|
+
*/
|
|
166
|
+
clearable?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* A callback fired when the Clear button is pressed.
|
|
169
|
+
* Fired _after_ `onChange`, and _before_ `onFilter`
|
|
170
|
+
*/
|
|
171
|
+
onClear?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
172
|
+
/**
|
|
173
|
+
* An array used to define which options are displayed.
|
|
174
|
+
* Do not remove options from the JSX children, as this will affect the selected options
|
|
175
|
+
*/
|
|
176
|
+
filteredOptions?: Array<string>;
|
|
177
|
+
};
|
|
178
|
+
export declare type ComboboxProps<M extends boolean> = Either<BaseComboboxProps & ComboboxMultiselectProps<M>, 'label' | 'aria-label'>;
|
|
179
|
+
/**
|
|
180
|
+
* Combobox Option Props
|
|
181
|
+
*/
|
|
182
|
+
declare type ListItemProps = Omit<ComponentPropsWithoutRef<'li'>, 'onClick' | 'value'>;
|
|
183
|
+
interface SharedComboboxOptionProps {
|
|
184
|
+
/**
|
|
185
|
+
* The internal value of the option. Used as the identifier in Combobox `initialValue`, value and filteredOptions.
|
|
186
|
+
* When undefined, this is set to `_.kebabCase(displayName)`
|
|
187
|
+
*/
|
|
188
|
+
value?: string;
|
|
189
|
+
/**
|
|
190
|
+
* The display value of the option. Used as the rendered string within the menu and chips.
|
|
191
|
+
* When undefined, this is set to `value`
|
|
192
|
+
*/
|
|
193
|
+
displayName?: string;
|
|
194
|
+
/**
|
|
195
|
+
* The icon to display to the left of the option in the menu.
|
|
196
|
+
*/
|
|
197
|
+
glyph?: ReactElement;
|
|
198
|
+
/**
|
|
199
|
+
* Defines whether the option is disabled.
|
|
200
|
+
* Node: disabled options are still rendered in the menu, but not selectable.
|
|
201
|
+
*/
|
|
202
|
+
disabled?: boolean;
|
|
203
|
+
/**
|
|
204
|
+
* Styling Prop
|
|
205
|
+
*/
|
|
206
|
+
className?: string;
|
|
207
|
+
/**
|
|
208
|
+
* Optional descriptive text under the displayName.
|
|
209
|
+
*/
|
|
210
|
+
description?: string;
|
|
211
|
+
/**
|
|
212
|
+
* Callback fired when an option is clicked.
|
|
213
|
+
*/
|
|
214
|
+
onClick?: (event: React.SyntheticEvent<HTMLLIElement, Event>, value: string) => void;
|
|
215
|
+
}
|
|
216
|
+
declare type RequiredComboboxOptionProps = Required<Pick<SharedComboboxOptionProps, 'value' | 'displayName'>>;
|
|
217
|
+
declare type BaseComboboxOptionProps = ListItemProps & SharedComboboxOptionProps;
|
|
218
|
+
export declare type ComboboxOptionProps = Either<BaseComboboxOptionProps, 'value' | 'displayName'>;
|
|
219
|
+
export interface OptionObject extends Pick<SharedComboboxOptionProps, 'description' | 'onClick'>, RequiredComboboxOptionProps {
|
|
220
|
+
isDisabled: boolean;
|
|
221
|
+
hasGlyph?: boolean;
|
|
222
|
+
}
|
|
223
|
+
export interface InternalComboboxOptionProps extends ListItemProps, Omit<SharedComboboxOptionProps, 'value' | 'displayName'>, RequiredComboboxOptionProps {
|
|
224
|
+
isSelected: boolean;
|
|
225
|
+
isFocused: boolean;
|
|
226
|
+
setSelected: () => void;
|
|
227
|
+
index: number;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Combobox Group Props
|
|
231
|
+
*/
|
|
232
|
+
export interface ComboboxGroupProps {
|
|
233
|
+
/**
|
|
234
|
+
* Label for the group of options
|
|
235
|
+
*/
|
|
236
|
+
label: string;
|
|
237
|
+
/**
|
|
238
|
+
* Options in the group. Must be one or more `ComboboxOption` components
|
|
239
|
+
*/
|
|
240
|
+
children: React.ReactNode;
|
|
241
|
+
/**
|
|
242
|
+
* Styling prop
|
|
243
|
+
*/
|
|
244
|
+
className?: string;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Combobox Chip
|
|
248
|
+
*/
|
|
249
|
+
export interface ComboboxChipProps {
|
|
250
|
+
displayName: string;
|
|
251
|
+
isFocused: boolean;
|
|
252
|
+
onRemove: () => void;
|
|
253
|
+
onFocus: () => void;
|
|
254
|
+
}
|
|
255
|
+
//# sourceMappingURL=Combobox.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Combobox.types.d.ts","sourceRoot":"","sources":["../src/Combobox.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,KAAK,SAAS,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B;;GAEG;AAEH,eAAO,MAAM,eAAe;;;;;;;;CAQlB,CAAC;AACX,oBAAY,eAAe,GACzB,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAEzD;;GAEG;AAEH,eAAO,MAAM,YAAY;;;;;CAKf,CAAC;AACX,oBAAY,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE5E,eAAO,MAAM,QAAQ;IACnB;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AACX,oBAAY,QAAQ,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC;AAEhE,eAAO,MA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AM,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,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboboxChip.d.ts","sourceRoot":"","sources":["../../src/ComboboxChip/ComboboxChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAOrD,OAAO,EACL,iBAAiB,EAGlB,MAAM,mBAAmB,CAAC;AAK3B,eAAO,MAAM,YAAY,2FA6ExB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryMetaType } from '@leafygreen-ui/lib';
|
|
3
|
+
import { ComboboxChip } from './ComboboxChip';
|
|
4
|
+
declare const meta: StoryMetaType<typeof ComboboxChip>;
|
|
5
|
+
export default meta;
|
|
6
|
+
export declare const Generated: () => React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=ComboboxChip.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboboxChip.stories.d.ts","sourceRoot":"","sources":["../../src/ComboboxChip/ComboboxChip.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,QAAA,MAAM,IAAI,EAAE,aAAa,CAAC,OAAO,YAAY,CAuB5C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,SAAS,yBAAc,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComboboxSize } from '../Combobox.types';
|
|
2
|
+
export declare const chipClassName: string;
|
|
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>;
|
|
11
|
+
/**
|
|
12
|
+
* Vertical padding on a chip (in px)
|
|
13
|
+
*/
|
|
14
|
+
export declare const chipWrapperPaddingY: {
|
|
15
|
+
readonly xsmall: 1;
|
|
16
|
+
readonly small: 0;
|
|
17
|
+
readonly default: 2;
|
|
18
|
+
readonly large: 4;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Override chip sizes
|
|
22
|
+
*/
|
|
23
|
+
export declare const chipSizeStyles: Record<ComboboxSize, string>;
|
|
24
|
+
//# sourceMappingURL=ComboboxChip.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboboxChip.styles.d.ts","sourceRoot":"","sources":["../../src/ComboboxChip/ComboboxChip.styles.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,eAAO,MAAM,aAAa,QAAyC,CAAC;AAEpE;;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;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAkCvD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ComboboxChip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|