@mongodb-js/compass-components 1.32.1 → 1.32.2

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.
Files changed (169) hide show
  1. package/lib/components/actions/action-glyph.d.ts +11 -0
  2. package/lib/components/actions/action-glyph.d.ts.map +1 -0
  3. package/lib/components/actions/action-glyph.js +19 -0
  4. package/lib/components/actions/action-glyph.js.map +1 -0
  5. package/lib/components/actions/constants.d.ts +7 -0
  6. package/lib/components/actions/constants.d.ts.map +1 -0
  7. package/lib/components/actions/constants.js +9 -0
  8. package/lib/components/actions/constants.js.map +1 -0
  9. package/lib/components/actions/dropdown-menu-button.d.ts +19 -0
  10. package/lib/components/actions/dropdown-menu-button.d.ts.map +1 -0
  11. package/lib/components/actions/dropdown-menu-button.js +75 -0
  12. package/lib/components/actions/dropdown-menu-button.js.map +1 -0
  13. package/lib/components/actions/item-action-button.d.ts +4 -0
  14. package/lib/components/actions/item-action-button.d.ts.map +1 -0
  15. package/lib/components/actions/item-action-button.js +22 -0
  16. package/lib/components/actions/item-action-button.js.map +1 -0
  17. package/lib/components/actions/item-action-controls.d.ts +20 -0
  18. package/lib/components/actions/item-action-controls.d.ts.map +1 -0
  19. package/lib/components/actions/item-action-controls.js +85 -0
  20. package/lib/components/actions/item-action-controls.js.map +1 -0
  21. package/lib/components/actions/item-action-group.d.ts +19 -0
  22. package/lib/components/actions/item-action-group.d.ts.map +1 -0
  23. package/lib/components/actions/item-action-group.js +69 -0
  24. package/lib/components/actions/item-action-group.js.map +1 -0
  25. package/lib/components/actions/item-action-menu.d.ts +20 -0
  26. package/lib/components/actions/item-action-menu.d.ts.map +1 -0
  27. package/lib/components/actions/item-action-menu.js +89 -0
  28. package/lib/components/actions/item-action-menu.js.map +1 -0
  29. package/lib/components/actions/small-icon-button.d.ts +11 -0
  30. package/lib/components/actions/small-icon-button.d.ts.map +1 -0
  31. package/lib/components/actions/small-icon-button.js +66 -0
  32. package/lib/components/actions/small-icon-button.js.map +1 -0
  33. package/lib/components/actions/types.d.ts +32 -0
  34. package/lib/components/actions/types.d.ts.map +1 -0
  35. package/lib/components/actions/types.js +3 -0
  36. package/lib/components/actions/types.js.map +1 -0
  37. package/lib/components/actions/utils.d.ts +2 -0
  38. package/lib/components/actions/utils.d.ts.map +1 -0
  39. package/lib/components/actions/utils.js +8 -0
  40. package/lib/components/actions/utils.js.map +1 -0
  41. package/lib/components/combobox-with-custom-option.d.ts +1 -1
  42. package/lib/components/combobox-with-custom-option.d.ts.map +1 -1
  43. package/lib/components/combobox-with-custom-option.js +3 -3
  44. package/lib/components/combobox-with-custom-option.js.map +1 -1
  45. package/lib/components/document-list/element-actions.d.ts.map +1 -1
  46. package/lib/components/document-list/element-actions.js +1 -1
  47. package/lib/components/document-list/element-actions.js.map +1 -1
  48. package/lib/components/document-list/element-editors.d.ts.map +1 -1
  49. package/lib/components/document-list/element-editors.js +12 -5
  50. package/lib/components/document-list/element-editors.js.map +1 -1
  51. package/lib/components/document-list/element.d.ts.map +1 -1
  52. package/lib/components/document-list/element.js +10 -3
  53. package/lib/components/document-list/element.js.map +1 -1
  54. package/lib/components/feedback-popover.d.ts +2 -5
  55. package/lib/components/feedback-popover.d.ts.map +1 -1
  56. package/lib/components/feedback-popover.js +1 -5
  57. package/lib/components/feedback-popover.js.map +1 -1
  58. package/lib/components/file-input.js +3 -3
  59. package/lib/components/file-input.js.map +1 -1
  60. package/lib/components/guide-cue/guide-cue.d.ts +1 -2
  61. package/lib/components/guide-cue/guide-cue.d.ts.map +1 -1
  62. package/lib/components/guide-cue/guide-cue.js +1 -3
  63. package/lib/components/guide-cue/guide-cue.js.map +1 -1
  64. package/lib/components/interactive-popover.d.ts +4 -4
  65. package/lib/components/interactive-popover.d.ts.map +1 -1
  66. package/lib/components/interactive-popover.js +1 -1
  67. package/lib/components/interactive-popover.js.map +1 -1
  68. package/lib/components/leafygreen.d.ts +4 -54
  69. package/lib/components/leafygreen.d.ts.map +1 -1
  70. package/lib/components/leafygreen.js +7 -6
  71. package/lib/components/leafygreen.js.map +1 -1
  72. package/lib/components/links/link.d.ts +7 -7
  73. package/lib/components/tab-nav-bar.d.ts.map +1 -1
  74. package/lib/components/tab-nav-bar.js +8 -1
  75. package/lib/components/tab-nav-bar.js.map +1 -1
  76. package/lib/components/virtual-list.d.ts +3 -5
  77. package/lib/components/virtual-list.d.ts.map +1 -1
  78. package/lib/components/virtual-list.js +2 -2
  79. package/lib/components/virtual-list.js.map +1 -1
  80. package/lib/components/workspace-tabs/tab.d.ts +2 -3
  81. package/lib/components/workspace-tabs/tab.d.ts.map +1 -1
  82. package/lib/components/workspace-tabs/tab.js.map +1 -1
  83. package/lib/components/workspace-tabs/workspace-tabs.d.ts +2 -2
  84. package/lib/components/workspace-tabs/workspace-tabs.d.ts.map +1 -1
  85. package/lib/hooks/use-confirmation.d.ts +0 -1
  86. package/lib/hooks/use-confirmation.d.ts.map +1 -1
  87. package/lib/hooks/use-confirmation.js +0 -1
  88. package/lib/hooks/use-confirmation.js.map +1 -1
  89. package/lib/hooks/use-stacked-component.d.ts +1 -6
  90. package/lib/hooks/use-stacked-component.d.ts.map +1 -1
  91. package/lib/hooks/use-stacked-component.js +9 -28
  92. package/lib/hooks/use-stacked-component.js.map +1 -1
  93. package/lib/hooks/use-virtual-list-item-observer.d.ts +2 -4
  94. package/lib/hooks/use-virtual-list-item-observer.d.ts.map +1 -1
  95. package/lib/hooks/use-virtual-list-item-observer.js +1 -1
  96. package/lib/hooks/use-virtual-list-item-observer.js.map +1 -1
  97. package/lib/index.d.ts +9 -6
  98. package/lib/index.d.ts.map +1 -1
  99. package/lib/index.js +8 -9
  100. package/lib/index.js.map +1 -1
  101. package/package.json +47 -49
  102. package/lib/components/combobox/Chip.d.ts +0 -4
  103. package/lib/components/combobox/Chip.d.ts.map +0 -1
  104. package/lib/components/combobox/Chip.js +0 -230
  105. package/lib/components/combobox/Chip.js.map +0 -1
  106. package/lib/components/combobox/Combobox.d.ts +0 -48
  107. package/lib/components/combobox/Combobox.d.ts.map +0 -1
  108. package/lib/components/combobox/Combobox.js +0 -1029
  109. package/lib/components/combobox/Combobox.js.map +0 -1
  110. package/lib/components/combobox/Combobox.styles.d.ts +0 -53
  111. package/lib/components/combobox/Combobox.styles.d.ts.map +0 -1
  112. package/lib/components/combobox/Combobox.styles.js +0 -294
  113. package/lib/components/combobox/Combobox.styles.js.map +0 -1
  114. package/lib/components/combobox/Combobox.types.d.ts +0 -295
  115. package/lib/components/combobox/Combobox.types.d.ts.map +0 -1
  116. package/lib/components/combobox/Combobox.types.js +0 -66
  117. package/lib/components/combobox/Combobox.types.js.map +0 -1
  118. package/lib/components/combobox/ComboboxContext.d.ts +0 -21
  119. package/lib/components/combobox/ComboboxContext.d.ts.map +0 -1
  120. package/lib/components/combobox/ComboboxContext.js +0 -19
  121. package/lib/components/combobox/ComboboxContext.js.map +0 -1
  122. package/lib/components/combobox/ComboboxGroup.d.ts +0 -15
  123. package/lib/components/combobox/ComboboxGroup.d.ts.map +0 -1
  124. package/lib/components/combobox/ComboboxGroup.js +0 -84
  125. package/lib/components/combobox/ComboboxGroup.js.map +0 -1
  126. package/lib/components/combobox/ComboboxMenu/ComboboxMenu.d.ts +0 -9
  127. package/lib/components/combobox/ComboboxMenu/ComboboxMenu.d.ts.map +0 -1
  128. package/lib/components/combobox/ComboboxMenu/ComboboxMenu.js +0 -91
  129. package/lib/components/combobox/ComboboxMenu/ComboboxMenu.js.map +0 -1
  130. package/lib/components/combobox/ComboboxMenu/Menu.styles.d.ts +0 -26
  131. package/lib/components/combobox/ComboboxMenu/Menu.styles.d.ts.map +0 -1
  132. package/lib/components/combobox/ComboboxMenu/Menu.styles.js +0 -119
  133. package/lib/components/combobox/ComboboxMenu/Menu.styles.js.map +0 -1
  134. package/lib/components/combobox/ComboboxOption.d.ts +0 -20
  135. package/lib/components/combobox/ComboboxOption.d.ts.map +0 -1
  136. package/lib/components/combobox/ComboboxOption.js +0 -272
  137. package/lib/components/combobox/ComboboxOption.js.map +0 -1
  138. package/lib/components/combobox/Menu.styles.d.ts +0 -22
  139. package/lib/components/combobox/Menu.styles.d.ts.map +0 -1
  140. package/lib/components/combobox/Menu.styles.js +0 -102
  141. package/lib/components/combobox/Menu.styles.js.map +0 -1
  142. package/lib/components/combobox/index.d.ts +0 -6
  143. package/lib/components/combobox/index.d.ts.map +0 -1
  144. package/lib/components/combobox/index.js +0 -15
  145. package/lib/components/combobox/index.js.map +0 -1
  146. package/lib/components/combobox/utils/OptionObjectUtils.d.ts +0 -23
  147. package/lib/components/combobox/utils/OptionObjectUtils.d.ts.map +0 -1
  148. package/lib/components/combobox/utils/OptionObjectUtils.js +0 -40
  149. package/lib/components/combobox/utils/OptionObjectUtils.js.map +0 -1
  150. package/lib/components/combobox/utils/flattenChildren.d.ts +0 -12
  151. package/lib/components/combobox/utils/flattenChildren.d.ts.map +0 -1
  152. package/lib/components/combobox/utils/flattenChildren.js +0 -47
  153. package/lib/components/combobox/utils/flattenChildren.js.map +0 -1
  154. package/lib/components/combobox/utils/getNameAndValue.d.ts +0 -15
  155. package/lib/components/combobox/utils/getNameAndValue.d.ts.map +0 -1
  156. package/lib/components/combobox/utils/getNameAndValue.js +0 -24
  157. package/lib/components/combobox/utils/getNameAndValue.js.map +0 -1
  158. package/lib/components/combobox/utils/index.d.ts +0 -5
  159. package/lib/components/combobox/utils/index.d.ts.map +0 -1
  160. package/lib/components/combobox/utils/index.js +0 -14
  161. package/lib/components/combobox/utils/index.js.map +0 -1
  162. package/lib/components/combobox/utils/wrapJSX.d.ts +0 -15
  163. package/lib/components/combobox/utils/wrapJSX.d.ts.map +0 -1
  164. package/lib/components/combobox/utils/wrapJSX.js +0 -53
  165. package/lib/components/combobox/utils/wrapJSX.js.map +0 -1
  166. package/lib/components/item-action-controls.d.ts +0 -87
  167. package/lib/components/item-action-controls.d.ts.map +0 -1
  168. package/lib/components/item-action-controls.js +0 -239
  169. package/lib/components/item-action-controls.js.map +0 -1
@@ -1,230 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.Chip = void 0;
30
- const react_1 = __importStar(require("react"));
31
- const emotion_1 = require("@leafygreen-ui/emotion");
32
- const icon_1 = __importDefault(require("@leafygreen-ui/icon"));
33
- const inline_definition_1 = __importDefault(require("@leafygreen-ui/inline-definition"));
34
- const lib_1 = require("@leafygreen-ui/lib");
35
- const palette_1 = require("@leafygreen-ui/palette");
36
- const tokens_1 = require("@leafygreen-ui/tokens");
37
- const Combobox_styles_1 = require("./Combobox.styles");
38
- const Combobox_types_1 = require("./Combobox.types");
39
- const ComboboxContext_1 = require("./ComboboxContext");
40
- const chipWrapperBaseStyle = (0, emotion_1.css) `
41
- display: inline-flex;
42
- align-items: center;
43
- overflow: hidden;
44
- white-space: nowrap;
45
- box-sizing: border-box;
46
- `;
47
- const chipWrapperSizeStyle = {
48
- [Combobox_types_1.ComboboxSize.Default]: (0, emotion_1.css) `
49
- font-size: ${tokens_1.typeScales.body1.fontSize}px;
50
- line-height: ${tokens_1.typeScales.body1.lineHeight}px;
51
- border-radius: 4px;
52
- `,
53
- [Combobox_types_1.ComboboxSize.Large]: (0, emotion_1.css) `
54
- font-size: ${tokens_1.typeScales.body2.fontSize}px;
55
- line-height: ${tokens_1.typeScales.body2.lineHeight}px;
56
- border-radius: 4px;
57
- `,
58
- };
59
- const chipWrapperThemeStyle = {
60
- [lib_1.Theme.Light]: (0, emotion_1.css) `
61
- color: ${palette_1.palette.black};
62
- background-color: ${palette_1.palette.gray.light2};
63
-
64
- // TODO: - refine these styles with Design
65
- &:focus-within {
66
- background-color: ${palette_1.palette.blue.light2};
67
- }
68
- `,
69
- [lib_1.Theme.Dark]: (0, emotion_1.css) `
70
- color: ${palette_1.palette.gray.light2};
71
- background-color: ${palette_1.palette.gray.dark2};
72
-
73
- &:focus-within {
74
- background-color: ${palette_1.palette.blue.dark2};
75
- }
76
- `,
77
- };
78
- const disabledChipWrapperStyle = {
79
- [lib_1.Theme.Light]: (0, emotion_1.css) `
80
- cursor: not-allowed;
81
- color: ${palette_1.palette.gray.base};
82
- background-color: ${palette_1.palette.gray.light3};
83
- `,
84
- [lib_1.Theme.Dark]: (0, emotion_1.css) `
85
- cursor: not-allowed;
86
- color: ${palette_1.palette.gray.dark2};
87
- background-color: ${palette_1.palette.gray.dark4};
88
- box-shadow: inset 0 0 1px 1px ${palette_1.palette.gray.dark2}; ;
89
- `,
90
- };
91
- const chipTextSizeStyle = {
92
- [Combobox_types_1.ComboboxSize.Default]: (0, emotion_1.css) `
93
- padding-inline: 6px;
94
- padding-block: ${Combobox_styles_1.chipWrapperPaddingY[Combobox_types_1.ComboboxSize.Default]}px;
95
- `,
96
- [Combobox_types_1.ComboboxSize.Large]: (0, emotion_1.css) `
97
- padding-inline: 10px;
98
- padding-block: ${Combobox_styles_1.chipWrapperPaddingY[Combobox_types_1.ComboboxSize.Large]}px;
99
- `,
100
- };
101
- const chipButtonStyle = (0, emotion_1.css) `
102
- position: relative;
103
- display: flex;
104
- align-items: center;
105
- justify-content: center;
106
- width: 100%;
107
- outline: none;
108
- border: none;
109
- background-color: transparent;
110
- cursor: pointer;
111
- transition: background-color ${tokens_1.transitionDuration.faster}ms ease-in-out;
112
- `;
113
- const chipButtonSizeStyle = {
114
- [Combobox_types_1.ComboboxSize.Default]: (0, emotion_1.css) `
115
- height: ${Combobox_styles_1.inputHeight[Combobox_types_1.ComboboxSize.Default]}px;
116
- `,
117
- [Combobox_types_1.ComboboxSize.Large]: (0, emotion_1.css) `
118
- height: ${Combobox_styles_1.inputHeight[Combobox_types_1.ComboboxSize.Large]}px;
119
- `,
120
- };
121
- const chipButtonThemeStyle = {
122
- [lib_1.Theme.Light]: (0, emotion_1.css) `
123
- color: ${palette_1.palette.gray.dark2};
124
-
125
- &:hover {
126
- color: ${palette_1.palette.black};
127
- background-color: ${palette_1.palette.gray.light1};
128
- }
129
- `,
130
- [lib_1.Theme.Dark]: (0, emotion_1.css) `
131
- color: ${palette_1.palette.gray.light1};
132
-
133
- &:hover {
134
- color: ${palette_1.palette.gray.light3};
135
- background-color: ${palette_1.palette.gray.dark1};
136
- }
137
- `,
138
- };
139
- const chipButtonDisabledStyle = {
140
- [lib_1.Theme.Light]: (0, emotion_1.css) `
141
- cursor: not-allowed;
142
- color: ${palette_1.palette.gray.dark2};
143
- &:hover {
144
- color: inherit;
145
- background-color: unset;
146
- }
147
- `,
148
- [lib_1.Theme.Dark]: (0, emotion_1.css) `
149
- cursor: not-allowed;
150
- color: ${palette_1.palette.gray.dark2};
151
- &:hover {
152
- color: inherit;
153
- background-color: unset;
154
- }
155
- `,
156
- };
157
- exports.Chip = react_1.default.forwardRef(({ displayName, isFocused, onRemove, onFocus }, forwardedRef) => {
158
- const { darkMode, theme, size, disabled, chipTruncationLocation = 'end', chipCharacterLimit = 12, } = (0, react_1.useContext)(ComboboxContext_1.ComboboxContext);
159
- const isTruncated = !!chipCharacterLimit &&
160
- !!chipTruncationLocation &&
161
- chipTruncationLocation !== 'none' &&
162
- displayName.length > chipCharacterLimit;
163
- const buttonRef = (0, react_1.useRef)(null);
164
- const truncatedName = (0, react_1.useMemo)(() => {
165
- if (isTruncated) {
166
- const ellipsis = '…';
167
- const chars = chipCharacterLimit - 3; // ellipsis dots included in the char limit
168
- switch (chipTruncationLocation) {
169
- case 'start': {
170
- const end = displayName
171
- .substring(displayName.length - chars)
172
- .trim();
173
- return ellipsis + end;
174
- }
175
- case 'middle': {
176
- const start = displayName.substring(0, chars / 2).trim();
177
- const end = displayName
178
- .substring(displayName.length - chars / 2)
179
- .trim();
180
- return start + ellipsis + end;
181
- }
182
- case 'end': {
183
- const start = displayName.substring(0, chars).trim();
184
- return start + ellipsis;
185
- }
186
- default: {
187
- return displayName;
188
- }
189
- }
190
- }
191
- return false;
192
- }, [chipCharacterLimit, chipTruncationLocation, displayName, isTruncated]);
193
- (0, react_1.useEffect)(() => {
194
- if (isFocused && !disabled) {
195
- buttonRef?.current?.focus();
196
- }
197
- }, [disabled, forwardedRef, isFocused]);
198
- const handleKeyDown = (e) => {
199
- if (!disabled &&
200
- (e.key === lib_1.keyMap.Delete ||
201
- e.key === lib_1.keyMap.Backspace ||
202
- e.key === lib_1.keyMap.Enter ||
203
- e.key === lib_1.keyMap.Space)) {
204
- onRemove();
205
- }
206
- };
207
- const handleChipClick = (e) => {
208
- // Did not click button
209
- if (!buttonRef.current?.contains(e.target)) {
210
- onFocus();
211
- }
212
- };
213
- const handleButtonClick = () => {
214
- if (!disabled) {
215
- onRemove();
216
- }
217
- };
218
- return (
219
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events
220
- react_1.default.createElement("span", { role: "option", "aria-selected": isFocused, "data-testid": "lg-combobox-chip", ref: forwardedRef, className: (0, emotion_1.cx)(Combobox_styles_1.chipClassName, chipWrapperBaseStyle, chipWrapperThemeStyle[theme], chipWrapperSizeStyle[size], {
221
- [disabledChipWrapperStyle[theme]]: disabled,
222
- }), onClick: handleChipClick, onKeyDown: handleKeyDown, tabIndex: -1 },
223
- react_1.default.createElement("span", { className: (0, emotion_1.cx)(chipTextSizeStyle[size]) }, truncatedName ? (react_1.default.createElement(inline_definition_1.default, { darkMode: darkMode, definition: displayName, align: "bottom" }, truncatedName)) : (displayName)),
224
- react_1.default.createElement("button", { "aria-label": `Deselect ${displayName}`, "aria-disabled": disabled, disabled: disabled, ref: buttonRef, className: (0, emotion_1.cx)(chipButtonStyle, chipButtonThemeStyle[theme], chipButtonSizeStyle[size], {
225
- [chipButtonDisabledStyle[theme]]: disabled,
226
- }), onClick: handleButtonClick },
227
- react_1.default.createElement(icon_1.default, { glyph: "X" }))));
228
- });
229
- exports.Chip.displayName = 'Chip';
230
- //# sourceMappingURL=Chip.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Chip.js","sourceRoot":"","sources":["../../../src/components/combobox/Chip.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAsE;AAEtE,oDAAiD;AACjD,+DAAuC;AACvC,yFAAgE;AAChE,4CAAmD;AACnD,oDAAiD;AACjD,kDAAuE;AAEvE,uDAI2B;AAC3B,qDAAmE;AACnE,uDAAoD;AAEpD,MAAM,oBAAoB,GAAG,IAAA,aAAG,EAAA;;;;;;CAM/B,CAAC;AAEF,MAAM,oBAAoB,GAAyB;IACjD,CAAC,6BAAI,CAAC,OAAO,CAAC,EAAE,IAAA,aAAG,EAAA;iBACJ,mBAAU,CAAC,KAAK,CAAC,QAAQ;mBACvB,mBAAU,CAAC,KAAK,CAAC,UAAU;;GAE3C;IACD,CAAC,6BAAI,CAAC,KAAK,CAAC,EAAE,IAAA,aAAG,EAAA;iBACF,mBAAU,CAAC,KAAK,CAAC,QAAQ;mBACvB,mBAAU,CAAC,KAAK,CAAC,UAAU;;GAE3C;CACF,CAAC;AAEF,MAAM,qBAAqB,GAA0B;IACnD,CAAC,WAAK,CAAC,KAAK,CAA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AClB,UAAU,EAAE,WAAW,EACvB,KAAK,EAAC,QAAQ,IAEb,aAAa,CACG,CACpB,CAAC,CAAC,CAAC,CACF,WAAW,CACZ,CACI;QACP,wDACc,YAAY,WAAW,EAAE,mBACtB,QAAQ,EACvB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,IAAA,YAAE,EACX,eAAe,EACf,oBAAoB,CAAC,KAAK,CAAC,EAC3B,mBAAmB,CAAC,IAAI,CAAC,EACzB;gBACE,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ;aAC3C,CACF,EACD,OAAO,EAAE,iBAAiB;YAE1B,8BAAC,cAAI,IAAC,KAAK,EAAC,GAAG,GAAG,CACX,CACJ,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AACF,YAAI,CAAC,WAAW,GAAG,MAAM,CAAC"}
@@ -1,48 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import type { 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, popoverClassName, ...rest }: ComboboxProps<M>): React.JSX.Element;
10
- export declare namespace Combobox {
11
- var propTypes: {
12
- multiselect: PropTypes.Requireable<boolean>;
13
- value: PropTypes.Requireable<NonNullable<string | (string | null | undefined)[] | null | undefined>>;
14
- initialValue: PropTypes.Requireable<NonNullable<string | (string | null | undefined)[] | 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<"end" | "start" | "none" | "middle">;
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<"unset" | "loading" | "error">;
30
- errorMessage: PropTypes.Requireable<string>;
31
- state: PropTypes.Requireable<"none" | "error">;
32
- size: PropTypes.Requireable<"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
@@ -1 +0,0 @@
1
- {"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../src/components/combobox/Combobox.tsx"],"names":[],"mappings":"AACA,OAAO,KAMN,MAAM,OAAO,CAAC;AAOf,OAAO,SAAS,MAAM,YAAY,CAAC;AAuCnC,OAAO,KAAK,EACV,aAAa,EAId,MAAM,kBAAkB,CAAC;AA8C1B;;;;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,QAAqB,EACrB,WAAwB,EACxB,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,sBAAsB,EACtB,kBAAuB,EACvB,SAAS,EACT,SAAgB,EAChB,eAAe,EACf,eAAe,EACf,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,GAAG,IAAI,EACR,EAAE,aAAa,CAAC,CAAC,CAAC,qBA+uClB;yBAjxCe,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8zCxB;;;GAGG"}