@mongodb-js/compass-components 1.1.1 → 1.2.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/lib/components/item-action-controls.js +2 -2
- package/lib/components/item-action-controls.js.map +1 -1
- package/lib/components/leafygreen.d.ts +3 -1
- package/lib/components/leafygreen.d.ts.map +1 -1
- package/lib/components/leafygreen.js +6 -0
- package/lib/components/leafygreen.js.map +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -6
- package/lib/index.js.map +1 -1
- package/package.json +3 -8
- package/lib/components/leafy-green/combobox/chip.d.ts +0 -4
- package/lib/components/leafy-green/combobox/chip.d.ts.map +0 -1
- package/lib/components/leafy-green/combobox/chip.js +0 -182
- package/lib/components/leafy-green/combobox/chip.js.map +0 -1
- package/lib/components/leafy-green/combobox/combobox-context.d.ts +0 -15
- package/lib/components/leafy-green/combobox/combobox-context.d.ts.map +0 -1
- package/lib/components/leafy-green/combobox/combobox-context.js +0 -12
- package/lib/components/leafy-green/combobox/combobox-context.js.map +0 -1
- package/lib/components/leafy-green/combobox/combobox-group.d.ts +0 -9
- package/lib/components/leafy-green/combobox/combobox-group.d.ts.map +0 -1
- package/lib/components/leafy-green/combobox/combobox-group.js +0 -69
- package/lib/components/leafy-green/combobox/combobox-group.js.map +0 -1
- package/lib/components/leafy-green/combobox/combobox-option.d.ts +0 -10
- package/lib/components/leafy-green/combobox/combobox-option.d.ts.map +0 -1
- package/lib/components/leafy-green/combobox/combobox-option.js +0 -142
- package/lib/components/leafy-green/combobox/combobox-option.js.map +0 -1
- package/lib/components/leafy-green/combobox/combobox-types.d.ts +0 -94
- package/lib/components/leafy-green/combobox/combobox-types.d.ts.map +0 -1
- package/lib/components/leafy-green/combobox/combobox-types.js +0 -36
- package/lib/components/leafy-green/combobox/combobox-types.js.map +0 -1
- package/lib/components/leafy-green/combobox/combobox.d.ts +0 -4
- package/lib/components/leafy-green/combobox/combobox.d.ts.map +0 -1
- package/lib/components/leafy-green/combobox/combobox.js +0 -725
- package/lib/components/leafy-green/combobox/combobox.js.map +0 -1
- package/lib/components/leafy-green/combobox/combobox.styles.d.ts +0 -39
- package/lib/components/leafy-green/combobox/combobox.styles.d.ts.map +0 -1
- package/lib/components/leafy-green/combobox/combobox.styles.js +0 -299
- package/lib/components/leafy-green/combobox/combobox.styles.js.map +0 -1
- package/lib/components/leafy-green/combobox/index.d.ts +0 -4
- package/lib/components/leafy-green/combobox/index.d.ts.map +0 -1
- package/lib/components/leafy-green/combobox/index.js +0 -13
- package/lib/components/leafy-green/combobox/index.js.map +0 -1
- package/lib/components/leafy-green/combobox/util.d.ts +0 -27
- package/lib/components/leafy-green/combobox/util.d.ts.map +0 -1
- package/lib/components/leafy-green/combobox/util.js +0 -65
- package/lib/components/leafy-green/combobox/util.js.map +0 -1
|
@@ -1,142 +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.InternalComboboxOption = void 0;
|
|
30
|
-
const emotion_1 = require("@leafygreen-ui/emotion");
|
|
31
|
-
const react_1 = __importStar(require("react"));
|
|
32
|
-
const palette_1 = require("@leafygreen-ui/palette");
|
|
33
|
-
const lib_1 = require("@leafygreen-ui/lib");
|
|
34
|
-
const hooks_1 = require("@leafygreen-ui/hooks");
|
|
35
|
-
const checkbox_1 = __importDefault(require("@leafygreen-ui/checkbox"));
|
|
36
|
-
const icon_1 = __importStar(require("@leafygreen-ui/icon"));
|
|
37
|
-
const combobox_context_1 = require("./combobox-context");
|
|
38
|
-
const util_1 = require("./util");
|
|
39
|
-
const comboboxOptionStyle = () => (0, emotion_1.css) `
|
|
40
|
-
position: relative;
|
|
41
|
-
display: flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
justify-content: space-between;
|
|
44
|
-
list-style: none;
|
|
45
|
-
color: inherit;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
font-size: var(--lg-combobox-item-font-size);
|
|
49
|
-
line-height: var(--lg-combobox-item-line-height);
|
|
50
|
-
padding: var(--lg-combobox-item-padding-y) var(--lg-combobox-item-padding-x);
|
|
51
|
-
|
|
52
|
-
&:before {
|
|
53
|
-
content: '';
|
|
54
|
-
position: absolute;
|
|
55
|
-
left: 0;
|
|
56
|
-
width: 3px;
|
|
57
|
-
height: var(--lg-combobox-item-wedge-height);
|
|
58
|
-
background-color: transparent;
|
|
59
|
-
border-radius: 0 2px 2px 0;
|
|
60
|
-
transform: scaleY(0.3);
|
|
61
|
-
transition: 150ms ease-in-out;
|
|
62
|
-
transition-property: transform, background-color;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
&:hover {
|
|
66
|
-
outline: none;
|
|
67
|
-
background-color: var(--lg-combobox-item-hover-color);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&[aria-selected='true'] {
|
|
71
|
-
outline: none;
|
|
72
|
-
background-color: var(--lg-combobox-item-active-color);
|
|
73
|
-
|
|
74
|
-
&:before {
|
|
75
|
-
background-color: var(--lg-combobox-item-wedge-color);
|
|
76
|
-
transform: scaleY(1);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
`;
|
|
80
|
-
const flexSpan = (0, emotion_1.css) `
|
|
81
|
-
display: inline-flex;
|
|
82
|
-
gap: 8px;
|
|
83
|
-
justify-content: start;
|
|
84
|
-
align-items: inherit;
|
|
85
|
-
`;
|
|
86
|
-
const displayNameStyle = (isSelected) => (0, emotion_1.css) `
|
|
87
|
-
font-weight: ${isSelected ? 'bold' : 'normal'};
|
|
88
|
-
`;
|
|
89
|
-
const InternalComboboxOption = react_1.default.forwardRef(({ displayName, glyph, isSelected, isFocused, setSelected, className, }, forwardedRef) => {
|
|
90
|
-
const { multiselect, darkMode, withIcons, inputValue } = (0, react_1.useContext)(combobox_context_1.ComboboxContext);
|
|
91
|
-
const optionTextId = (0, hooks_1.useIdAllocator)({ prefix: 'combobox-option-text' });
|
|
92
|
-
const optionRef = (0, hooks_1.useForwardedRef)(forwardedRef, null);
|
|
93
|
-
const handleOptionClick = (0, react_1.useCallback)((e) => {
|
|
94
|
-
e.stopPropagation();
|
|
95
|
-
if (e.target === optionRef.current ||
|
|
96
|
-
e.target.tagName === 'INPUT' ||
|
|
97
|
-
e.target.tagName === 'SPAN') {
|
|
98
|
-
setSelected();
|
|
99
|
-
}
|
|
100
|
-
}, [optionRef, setSelected]);
|
|
101
|
-
const renderedIcon = (0, react_1.useMemo)(() => {
|
|
102
|
-
if (glyph) {
|
|
103
|
-
if ((0, icon_1.isComponentGlyph)(glyph) || (0, lib_1.isComponentType)(glyph, 'Icon')) {
|
|
104
|
-
return glyph;
|
|
105
|
-
}
|
|
106
|
-
console.error('`ComboboxOption` instance did not render icon because it is not a known glyph element.', glyph);
|
|
107
|
-
}
|
|
108
|
-
}, [glyph]);
|
|
109
|
-
const renderedChildren = (0, react_1.useMemo)(() => {
|
|
110
|
-
if (multiselect) {
|
|
111
|
-
const checkbox = (react_1.default.createElement(checkbox_1.default, { label: "", "aria-labelledby": optionTextId, checked: isSelected, tabIndex: -1, animate: false }));
|
|
112
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
113
|
-
react_1.default.createElement("span", { className: flexSpan },
|
|
114
|
-
withIcons ? renderedIcon : checkbox,
|
|
115
|
-
react_1.default.createElement("span", { id: optionTextId, className: displayNameStyle(isSelected) }, (0, util_1.wrapJSX)(displayName, inputValue, 'strong'))),
|
|
116
|
-
withIcons && checkbox));
|
|
117
|
-
}
|
|
118
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
119
|
-
react_1.default.createElement("span", { className: flexSpan },
|
|
120
|
-
renderedIcon,
|
|
121
|
-
react_1.default.createElement("span", { className: displayNameStyle(isSelected) }, (0, util_1.wrapJSX)(displayName, inputValue, 'strong'))),
|
|
122
|
-
isSelected && (react_1.default.createElement(icon_1.default, { glyph: "Checkmark", color: darkMode ? palette_1.uiColors.blue.light1 : palette_1.uiColors.blue.base }))));
|
|
123
|
-
}, [
|
|
124
|
-
multiselect,
|
|
125
|
-
renderedIcon,
|
|
126
|
-
isSelected,
|
|
127
|
-
displayName,
|
|
128
|
-
inputValue,
|
|
129
|
-
darkMode,
|
|
130
|
-
optionTextId,
|
|
131
|
-
withIcons,
|
|
132
|
-
]);
|
|
133
|
-
return (react_1.default.createElement("li", { ref: optionRef, role: "option", "aria-selected": isFocused, "aria-label": displayName, tabIndex: -1, className: (0, emotion_1.cx)(comboboxOptionStyle(), className), onClick: handleOptionClick, onKeyPress: handleOptionClick }, renderedChildren));
|
|
134
|
-
});
|
|
135
|
-
exports.InternalComboboxOption = InternalComboboxOption;
|
|
136
|
-
InternalComboboxOption.displayName = 'ComboboxOption';
|
|
137
|
-
function ComboboxOption() {
|
|
138
|
-
throw Error('`ComboboxOption` must be a child of a `Combobox` instance');
|
|
139
|
-
}
|
|
140
|
-
exports.default = ComboboxOption;
|
|
141
|
-
ComboboxOption.displayName = 'ComboboxOption';
|
|
142
|
-
//# sourceMappingURL=combobox-option.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-option.js","sourceRoot":"","sources":["../../../../src/components/leafy-green/combobox/combobox-option.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAiD;AACjD,+CAAgE;AAChE,oDAAkD;AAClD,4CAAqD;AACrD,gDAAuE;AACvE,uEAA+C;AAC/C,4DAA6D;AAE7D,yDAAqD;AACrD,iCAAiC;AAKjC,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,IAAA,aAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCpC,CAAC;AAEF,MAAM,QAAQ,GAAG,IAAA,aAAG,EAAA;;;;;CAKnB,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,UAAmB,EAAE,EAAE,CAAC,IAAA,aAAG,EAAA;iBACpC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;CAC9C,CAAC;AAKF,MAAM,sBAAsB,GAAG,eAAK,CAAC,UAAU,CAI7C,CACE,EACE,WAAW,EACX,KAAK,EACL,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,GACmB,EAC9B,YAAY,EACZ,EAAE;IACF,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,GACpD,IAAA,kBAAU,EAAC,kCAAe,CAA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|
|
|
1
|
-
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
-
import type { Either } from '@leafygreen-ui/lib';
|
|
3
|
-
export declare const ComboboxSize: {
|
|
4
|
-
readonly default: "default";
|
|
5
|
-
};
|
|
6
|
-
export declare type ComboboxSize = typeof ComboboxSize[keyof typeof ComboboxSize];
|
|
7
|
-
export declare const TrunctationLocation: {
|
|
8
|
-
readonly start: "start";
|
|
9
|
-
readonly middle: "middle";
|
|
10
|
-
readonly end: "end";
|
|
11
|
-
readonly none: "none";
|
|
12
|
-
};
|
|
13
|
-
export declare type TrunctationLocation = typeof TrunctationLocation[keyof typeof TrunctationLocation];
|
|
14
|
-
export declare const Overflow: {
|
|
15
|
-
readonly expandY: "expand-y";
|
|
16
|
-
readonly expandX: "expand-x";
|
|
17
|
-
readonly scrollY: "scroll-x";
|
|
18
|
-
};
|
|
19
|
-
export declare type Overflow = typeof Overflow[keyof typeof Overflow];
|
|
20
|
-
export declare const State: {
|
|
21
|
-
readonly error: "error";
|
|
22
|
-
readonly none: "none";
|
|
23
|
-
};
|
|
24
|
-
export declare type State = typeof State[keyof typeof State];
|
|
25
|
-
export declare const SearchState: {
|
|
26
|
-
readonly unset: "unset";
|
|
27
|
-
readonly error: "error";
|
|
28
|
-
readonly loading: "loading";
|
|
29
|
-
};
|
|
30
|
-
export declare type SearchState = typeof SearchState[keyof typeof SearchState];
|
|
31
|
-
export declare type SelectValueType<M extends boolean> = M extends true ? Array<string> : string | null;
|
|
32
|
-
export declare type onChangeType<M extends boolean> = M extends true ? (value: SelectValueType<true>) => void : (value: SelectValueType<false>) => void;
|
|
33
|
-
export declare function getNullSelection<M extends boolean>(multiselect: M): SelectValueType<M>;
|
|
34
|
-
export interface ComboboxMultiselectProps<M extends boolean> {
|
|
35
|
-
multiselect?: M;
|
|
36
|
-
initialValue?: SelectValueType<M>;
|
|
37
|
-
onChange?: onChangeType<M>;
|
|
38
|
-
value?: SelectValueType<M>;
|
|
39
|
-
overflow?: M extends true ? Overflow : undefined;
|
|
40
|
-
}
|
|
41
|
-
export interface BaseComboboxProps {
|
|
42
|
-
children?: ReactNode;
|
|
43
|
-
label?: string;
|
|
44
|
-
'aria-label'?: string;
|
|
45
|
-
description?: string;
|
|
46
|
-
placeholder?: string;
|
|
47
|
-
disabled?: boolean;
|
|
48
|
-
size?: ComboboxSize;
|
|
49
|
-
darkMode?: boolean;
|
|
50
|
-
state?: State;
|
|
51
|
-
errorMessage?: string;
|
|
52
|
-
searchState?: SearchState;
|
|
53
|
-
searchEmptyMessage?: string;
|
|
54
|
-
searchErrorMessage?: string;
|
|
55
|
-
searchLoadingMessage?: string;
|
|
56
|
-
onFilter?: (value: string) => void;
|
|
57
|
-
clearable?: boolean;
|
|
58
|
-
onClear?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
59
|
-
filteredOptions?: Array<string>;
|
|
60
|
-
chipTruncationLocation?: TrunctationLocation;
|
|
61
|
-
chipCharacterLimit?: number;
|
|
62
|
-
className?: string;
|
|
63
|
-
}
|
|
64
|
-
export declare type ComboboxProps<M extends boolean> = Either<BaseComboboxProps & ComboboxMultiselectProps<M>, 'label' | 'aria-label'>;
|
|
65
|
-
interface BaseComboboxOptionProps {
|
|
66
|
-
value?: string;
|
|
67
|
-
displayName?: string;
|
|
68
|
-
glyph?: ReactElement;
|
|
69
|
-
className?: string;
|
|
70
|
-
}
|
|
71
|
-
export declare type ComboboxOptionProps = Either<BaseComboboxOptionProps, 'value' | 'displayName'>;
|
|
72
|
-
export interface InternalComboboxOptionProps {
|
|
73
|
-
value: string;
|
|
74
|
-
displayName: string;
|
|
75
|
-
isSelected: boolean;
|
|
76
|
-
isFocused: boolean;
|
|
77
|
-
setSelected: () => void;
|
|
78
|
-
glyph?: ReactElement;
|
|
79
|
-
className?: string;
|
|
80
|
-
index: number;
|
|
81
|
-
}
|
|
82
|
-
export interface ComboboxGroupProps {
|
|
83
|
-
label: string;
|
|
84
|
-
children: React.ReactNode;
|
|
85
|
-
className?: string;
|
|
86
|
-
}
|
|
87
|
-
export interface ChipProps {
|
|
88
|
-
displayName: string;
|
|
89
|
-
isFocused: boolean;
|
|
90
|
-
onRemove: () => void;
|
|
91
|
-
onFocus: () => void;
|
|
92
|
-
}
|
|
93
|
-
export {};
|
|
94
|
-
//# sourceMappingURL=combobox-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-types.d.ts","sourceRoot":"","sources":["../../../../src/components/leafy-green/combobox/combobox-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAKjD,eAAO,MAAM,YAAY;;CAEf,CAAC;AACX,oBAAY,YAAY,GAAG,OAAO,YAAY,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE1E,eAAO,MAAM,mBAAmB;;;;;CAKtB,CAAC;AACX,oBAAY,mBAAmB,GAC7B,OAAO,mBAAmB,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAE/D,eAAO,MAAM,QAAQ;;;;CAIX,CAAC;AACX,oBAAY,QAAQ,GAAG,OAAO,QAAQ,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC;AAE9D,eAAO,MAAM,KAAK;;;CAGR,CAAC;AACX,oBAAY,KAAK,GAAG,OAAO,KAAK,CAAC,MAAM,OAAO,KAAK,CAAC,CAAC;AAErD,eAAO,MAAM,WAAW;;;;CAId,CAAC;AACX,oBAAY,WAAW,GAAG,OAAO,WAAW,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAKvE,oBAAY,eAAe,CAAC,CAAC,SAAS,OAAO,IAAI,CAAC,SAAS,IAAI,GAC3D,KAAK,CAAC,MAAM,CAAC,GACb,MAAM,GAAG,IAAI,CAAC;AAElB,oBAAY,YAAY,CAAC,CAAC,SAAS,OAAO,IAAI,CAAC,SAAS,IAAI,GAC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AAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getNullSelection = exports.SearchState = exports.State = exports.Overflow = exports.TrunctationLocation = exports.ComboboxSize = void 0;
|
|
4
|
-
exports.ComboboxSize = {
|
|
5
|
-
default: 'default',
|
|
6
|
-
};
|
|
7
|
-
exports.TrunctationLocation = {
|
|
8
|
-
start: 'start',
|
|
9
|
-
middle: 'middle',
|
|
10
|
-
end: 'end',
|
|
11
|
-
none: 'none',
|
|
12
|
-
};
|
|
13
|
-
exports.Overflow = {
|
|
14
|
-
expandY: 'expand-y',
|
|
15
|
-
expandX: 'expand-x',
|
|
16
|
-
scrollY: 'scroll-x',
|
|
17
|
-
};
|
|
18
|
-
exports.State = {
|
|
19
|
-
error: 'error',
|
|
20
|
-
none: 'none',
|
|
21
|
-
};
|
|
22
|
-
exports.SearchState = {
|
|
23
|
-
unset: 'unset',
|
|
24
|
-
error: 'error',
|
|
25
|
-
loading: 'loading',
|
|
26
|
-
};
|
|
27
|
-
function getNullSelection(multiselect) {
|
|
28
|
-
if (multiselect) {
|
|
29
|
-
return [];
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.getNullSelection = getNullSelection;
|
|
36
|
-
//# sourceMappingURL=combobox-types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-types.js","sourceRoot":"","sources":["../../../../src/components/leafy-green/combobox/combobox-types.ts"],"names":[],"mappings":";;;AAMa,QAAA,YAAY,GAAG;IAC1B,OAAO,EAAE,SAAS;CACV,CAAC;AAGE,QAAA,mBAAmB,GAAG;IACjC,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACJ,CAAC;AAIE,QAAA,QAAQ,GAAG;IACtB,OAAO,EAAE,UAAU;IACnB,OAAO,EAAE,UAAU;IACnB,OAAO,EAAE,UAAU;CACX,CAAC;AAGE,QAAA,KAAK,GAAG;IACnB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;CACJ,CAAC;AAGE,QAAA,WAAW,GAAG;IACzB,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;CACV,CAAC;AAeX,SAAgB,gBAAgB,CAC9B,WAAc;IAEd,IAAI,WAAW,EAAE;QACf,OAAO,EAAyC,CAAC;KAClD;SAAM;QACL,OAAO,IAA0B,CAAC;KACnC;AACH,CAAC;AARD,4CAQC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { ComboboxProps } from './combobox-types';
|
|
3
|
-
export default function Combobox<M extends boolean>({ children, label, description, placeholder, 'aria-label': ariaLabel, disabled, size, darkMode, state, errorMessage, searchState, searchEmptyMessage, searchErrorMessage, searchLoadingMessage, filteredOptions, onFilter, clearable, onClear, overflow, multiselect, initialValue, onChange, value, chipTruncationLocation, chipCharacterLimit, className, ...rest }: ComboboxProps<M>): JSX.Element;
|
|
4
|
-
//# sourceMappingURL=combobox.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/leafy-green/combobox/combobox.tsx"],"names":[],"mappings":";AAuBA,OAAO,KAAK,EACV,aAAa,EAGd,MAAM,kBAAkB,CAAC;AA6B1B,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,CAAC,SAAS,OAAO,EAAE,EAClD,QAAQ,EACR,KAAK,EACL,WAAW,EACX,WAAsB,EACtB,YAAY,EAAE,SAAS,EACvB,QAAgB,EAChB,IAAgB,EAChB,QAAgB,EAChB,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,GAAG,IAAI,EACR,EAAE,aAAa,CAAC,CAAC,CAAC,eA2kClB"}
|