@jobber/components 9.5.3 → 9.6.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/Combobox.d.ts +1 -0
- package/Combobox.js +17 -0
- package/dist/Autocomplete/index.cjs +0 -2
- package/dist/Autocomplete/index.mjs +0 -2
- package/dist/Autocomplete-cjs.js +4 -5
- package/dist/Autocomplete-es.js +1 -2
- package/dist/Card/index.cjs +2 -2
- package/dist/Card/index.mjs +2 -2
- package/dist/Chip/index.cjs +0 -2
- package/dist/Chip/index.mjs +0 -2
- package/dist/Chips/InternalChipDismissible/hooks/index.cjs +0 -2
- package/dist/Chips/InternalChipDismissible/hooks/index.mjs +0 -2
- package/dist/Chips/InternalChipDismissible/index.cjs +0 -2
- package/dist/Chips/InternalChipDismissible/index.mjs +0 -2
- package/dist/Chips/index.cjs +0 -2
- package/dist/Chips/index.mjs +0 -2
- package/dist/Combobox/Combobox.contentSlots.d.ts +5 -0
- package/dist/Combobox/Combobox.context.d.ts +34 -0
- package/dist/Combobox/Combobox.d.ts +69 -0
- package/dist/Combobox/Combobox.footer.d.ts +7 -0
- package/dist/Combobox/Combobox.items.d.ts +25 -0
- package/dist/Combobox/Combobox.responsive.d.ts +54 -0
- package/dist/Combobox/Combobox.selectAll.d.ts +4 -0
- package/dist/Combobox/Combobox.slotFactory.d.ts +7 -0
- package/dist/Combobox/Combobox.testUtils.d.ts +12 -0
- package/dist/Combobox/Combobox.types.d.ts +166 -0
- package/dist/Combobox/index.cjs +35 -0
- package/dist/Combobox/index.d.ts +2 -0
- package/dist/Combobox/index.mjs +29 -0
- package/dist/Combobox-cjs.js +675 -0
- package/dist/Combobox-es.js +673 -0
- package/dist/ComboboxPrimitive-cjs.js +88 -47
- package/dist/ComboboxPrimitive-es.js +39 -23
- package/dist/{ComboboxChipRemove-cjs.js → ComboboxSeparator-cjs.js} +501 -455
- package/dist/{ComboboxChipRemove-es.js → ComboboxSeparator-es.js} +500 -456
- package/dist/ConfirmationModal/index.cjs +0 -2
- package/dist/ConfirmationModal/index.mjs +0 -2
- package/dist/ContentBlock/index.cjs +1 -0
- package/dist/ContentBlock/index.mjs +1 -0
- package/dist/ContentBlock-cjs.js +2 -18
- package/dist/ContentBlock-es.js +1 -17
- package/dist/DataDump/index.cjs +2 -2
- package/dist/DataDump/index.mjs +2 -2
- package/dist/DataList/components/DataListActions/index.cjs +0 -2
- package/dist/DataList/components/DataListActions/index.mjs +0 -2
- package/dist/DataList/components/DataListBulkActions/index.cjs +0 -2
- package/dist/DataList/components/DataListBulkActions/index.mjs +0 -2
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +0 -2
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +0 -2
- package/dist/DataList/components/DataListFilters/index.cjs +0 -2
- package/dist/DataList/components/DataListFilters/index.mjs +0 -2
- package/dist/DataList/components/DataListHeader/index.cjs +0 -2
- package/dist/DataList/components/DataListHeader/index.mjs +0 -2
- package/dist/DataList/components/DataListItem/index.cjs +0 -2
- package/dist/DataList/components/DataListItem/index.mjs +0 -2
- package/dist/DataList/components/DataListItemActions/index.cjs +0 -2
- package/dist/DataList/components/DataListItemActions/index.mjs +0 -2
- package/dist/DataList/components/DataListItemActionsOverflow/index.cjs +0 -2
- package/dist/DataList/components/DataListItemActionsOverflow/index.mjs +0 -2
- package/dist/DataList/components/DataListItems/index.cjs +0 -2
- package/dist/DataList/components/DataListItems/index.mjs +0 -2
- package/dist/DataList/components/DataListLayout/index.cjs +0 -2
- package/dist/DataList/components/DataListLayout/index.mjs +0 -2
- package/dist/DataList/components/DataListLayoutActions/index.cjs +0 -2
- package/dist/DataList/components/DataListLayoutActions/index.mjs +0 -2
- package/dist/DataList/index.cjs +0 -2
- package/dist/DataList/index.mjs +0 -2
- package/dist/DatePicker/index.cjs +0 -2
- package/dist/DatePicker/index.mjs +0 -2
- package/dist/DatePicker-cjs.js +4 -5
- package/dist/DatePicker-es.js +1 -2
- package/dist/Dialog/index.cjs +2 -2
- package/dist/Dialog/index.mjs +2 -2
- package/dist/DrawerDescription-cjs.js +268 -99
- package/dist/DrawerDescription-es.js +270 -103
- package/dist/DrawerTitle-cjs.js +2 -6
- package/dist/DrawerTitle-es.js +3 -7
- package/dist/FieldDescription-cjs.js +184 -181
- package/dist/FieldDescription-es.js +187 -184
- package/dist/FilterPicker/components/FilterPickerActivator/index.cjs +0 -2
- package/dist/FilterPicker/components/FilterPickerActivator/index.mjs +0 -2
- package/dist/FilterPicker/components/FilterPickerContent/index.cjs +0 -2
- package/dist/FilterPicker/components/FilterPickerContent/index.mjs +0 -2
- package/dist/FilterPicker/components/FilterPickerTrigger/index.cjs +0 -2
- package/dist/FilterPicker/components/FilterPickerTrigger/index.mjs +0 -2
- package/dist/FilterPicker/index.cjs +0 -2
- package/dist/FilterPicker/index.mjs +0 -2
- package/dist/FilterPickerContent-cjs.js +4 -5
- package/dist/FilterPickerContent-es.js +1 -2
- package/dist/FormatFile/index.cjs +0 -2
- package/dist/FormatFile/index.mjs +0 -2
- package/dist/Gallery/index.cjs +0 -2
- package/dist/Gallery/index.mjs +0 -2
- package/dist/InputDate/index.cjs +0 -2
- package/dist/InputDate/index.mjs +0 -2
- package/dist/InputNumber/index.cjs +2 -2
- package/dist/InputNumber/index.mjs +2 -2
- package/dist/InputNumber/types.d.ts +5 -0
- package/dist/InputNumber-cjs.js +2 -2
- package/dist/InputNumber-es.js +2 -2
- package/dist/LightBox/index.cjs +0 -2
- package/dist/LightBox/index.mjs +0 -2
- package/dist/Menu/index.cjs +2 -2
- package/dist/Menu/index.mjs +2 -2
- package/dist/Menu-cjs.js +4 -5
- package/dist/Menu-es.js +1 -2
- package/dist/MenuSubmenuTrigger-cjs.js +206 -164
- package/dist/MenuSubmenuTrigger-es.js +194 -152
- package/dist/Modal/index.cjs +0 -2
- package/dist/Modal/index.mjs +1 -3
- package/dist/NumberFieldInput-cjs.js +187 -308
- package/dist/NumberFieldInput-es.js +187 -308
- package/dist/Page/index.cjs +2 -2
- package/dist/Page/index.mjs +2 -2
- package/dist/Popover/index.cjs +0 -2
- package/dist/Popover/index.mjs +0 -2
- package/dist/Popover-cjs.js +7 -8
- package/dist/Popover-es.js +1 -2
- package/dist/ScrollAreaViewport-cjs.js +747 -1093
- package/dist/ScrollAreaViewport-es.js +734 -1081
- package/dist/Select/index.cjs +2 -2
- package/dist/Select/index.mjs +2 -2
- package/dist/SelectGroupLabel-cjs.js +207 -306
- package/dist/SelectGroupLabel-es.js +203 -302
- package/dist/SelectPrimitive-cjs.js +11 -17
- package/dist/SelectPrimitive-es.js +1 -7
- package/dist/Tooltip/index.cjs +0 -2
- package/dist/Tooltip/index.mjs +0 -2
- package/dist/Tooltip-cjs.js +6 -7
- package/dist/Tooltip-es.js +1 -2
- package/dist/buttonRenderAdapter-cjs.js +2 -1
- package/dist/buttonRenderAdapter-es.js +2 -1
- package/dist/dialogReturnFocus-cjs.js +1 -1
- package/dist/dialogReturnFocus-es.js +2 -2
- package/dist/docs/InputNumber/InputNumber.md +2 -2
- package/dist/docs/SelectPrimitive/SelectPrimitive.md +1 -1
- package/dist/floating-ui.react-cjs.js +2557 -185
- package/dist/floating-ui.react-es.js +2512 -149
- package/dist/getMappedBreakpointWidth-cjs.js +21 -0
- package/dist/getMappedBreakpointWidth-es.js +18 -0
- package/dist/index.cjs +15 -10
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +14 -10
- package/dist/mergeClassName-cjs.js +12 -0
- package/dist/mergeClassName-es.js +10 -0
- package/dist/primitives/BottomSheet/index.cjs +1 -1
- package/dist/primitives/BottomSheet/index.mjs +1 -1
- package/dist/primitives/ComboboxPrimitive/ComboboxPrimitive.d.ts +2 -2
- package/dist/primitives/ComboboxPrimitive/index.cjs +4 -5
- package/dist/primitives/ComboboxPrimitive/index.mjs +4 -5
- package/dist/primitives/SelectPrimitive/index.cjs +1 -2
- package/dist/primitives/SelectPrimitive/index.mjs +1 -2
- package/dist/primitives/index.cjs +3 -3
- package/dist/primitives/index.mjs +3 -3
- package/dist/scrollEdges-cjs.js +1 -11
- package/dist/scrollEdges-es.js +1 -11
- package/dist/scrollable-cjs.js +58 -0
- package/dist/scrollable-es.js +54 -0
- package/dist/styles.css +759 -42
- package/dist/unstyledPrimitives/index.cjs +720 -478
- package/dist/unstyledPrimitives/index.mjs +663 -421
- package/dist/useCompositeListItem-cjs.js +2108 -361
- package/dist/useCompositeListItem-es.js +2076 -331
- package/dist/useLabel-cjs.js +2 -3
- package/dist/useLabel-es.js +2 -3
- package/dist/useRenderElement-cjs.js +9 -7
- package/dist/useRenderElement-es.js +9 -7
- package/dist/useScrollLock-cjs.js +819 -344
- package/dist/useScrollLock-es.js +732 -296
- package/dist/useScrollToActive-cjs.js +4 -5
- package/dist/useScrollToActive-es.js +1 -2
- package/dist/utils/meta/meta.json +43 -1
- package/package.json +8 -3
- package/dist/floating-ui.react-dom-cjs.js +0 -2103
- package/dist/floating-ui.react-dom-es.js +0 -2072
- package/dist/floating-ui.utils-cjs.js +0 -342
- package/dist/floating-ui.utils-es.js +0 -300
package/Combobox.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/Combobox";
|
package/Combobox.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var Combobox = require("./dist/Combobox");
|
|
8
|
+
|
|
9
|
+
Object.keys(Combobox).forEach(function(key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return Combobox[key];
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
var Autocomplete = require('../Autocomplete-cjs.js');
|
|
4
4
|
require('react');
|
|
5
5
|
require('../floating-ui.react-cjs.js');
|
|
6
|
-
require('../floating-ui.utils-cjs.js');
|
|
7
6
|
require('react/jsx-runtime');
|
|
8
7
|
require('react-dom');
|
|
9
|
-
require('../floating-ui.react-dom-cjs.js');
|
|
10
8
|
require('classnames');
|
|
11
9
|
require('@jobber/design');
|
|
12
10
|
require('@jobber/hooks');
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export { A as Autocomplete } from '../Autocomplete-es.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../floating-ui.react-es.js';
|
|
4
|
-
import '../floating-ui.utils-es.js';
|
|
5
4
|
import 'react/jsx-runtime';
|
|
6
5
|
import 'react-dom';
|
|
7
|
-
import '../floating-ui.react-dom-es.js';
|
|
8
6
|
import 'classnames';
|
|
9
7
|
import '@jobber/design';
|
|
10
8
|
import '@jobber/hooks';
|
package/dist/Autocomplete-cjs.js
CHANGED
|
@@ -6,7 +6,6 @@ var classnames = require('classnames');
|
|
|
6
6
|
var design = require('@jobber/design');
|
|
7
7
|
var jobberHooks = require('@jobber/hooks');
|
|
8
8
|
var maxHeight = require('./maxHeight-cjs.js');
|
|
9
|
-
var floatingUi_reactDom = require('./floating-ui.react-dom-cjs.js');
|
|
10
9
|
var Heading = require('./Heading-cjs.js');
|
|
11
10
|
var Text = require('./Text-cjs.js');
|
|
12
11
|
var Typography = require('./Typography-cjs.js');
|
|
@@ -136,7 +135,7 @@ function useAutocompleteListNav({ navigableCount, shouldResetActiveIndexOnClose,
|
|
|
136
135
|
const listRef = React.useRef([]);
|
|
137
136
|
const { refs, floatingStyles, context } = floatingUi_react.useFloating({
|
|
138
137
|
placement: "bottom",
|
|
139
|
-
whileElementsMounted:
|
|
138
|
+
whileElementsMounted: floatingUi_react.autoUpdate,
|
|
140
139
|
open,
|
|
141
140
|
onOpenChange: (isOpen, _event, reason) => {
|
|
142
141
|
setOpen(isOpen);
|
|
@@ -151,9 +150,9 @@ function useAutocompleteListNav({ navigableCount, shouldResetActiveIndexOnClose,
|
|
|
151
150
|
}
|
|
152
151
|
},
|
|
153
152
|
middleware: [
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
153
|
+
floatingUi_react.offset(MENU_OFFSET),
|
|
154
|
+
floatingUi_react.flip({ fallbackPlacements: ["top"] }),
|
|
155
|
+
floatingUi_react.size({
|
|
157
156
|
apply({ availableHeight, rects, elements }) {
|
|
158
157
|
const maxHeight$1 = maxHeight.calculateMaxHeight(availableHeight, {
|
|
159
158
|
maxHeight: AUTOCOMPLETE_MAX_HEIGHT,
|
package/dist/Autocomplete-es.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React__default, { useState, useRef, useEffect, useCallback, useMemo, forwardRef } from 'react';
|
|
2
|
-
import { u as useFloating,
|
|
2
|
+
import { u as useFloating, b as autoUpdate, o as offset, f as flip, m as size, t as useClick, n as useListNavigation, e as useDismiss, g as useInteractions, F as FloatingPortal, q as FloatingFocusManager, v as useTransitionStyles } from './floating-ui.react-es.js';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import { tokens } from '@jobber/design';
|
|
5
5
|
import { useCallbackRef, useDebounce } from '@jobber/hooks';
|
|
6
6
|
import { c as calculateMaxHeight } from './maxHeight-es.js';
|
|
7
|
-
import { b as autoUpdate, o as offset, f as flip, d as size } from './floating-ui.react-dom-es.js';
|
|
8
7
|
import { H as Heading } from './Heading-es.js';
|
|
9
8
|
import { T as Text } from './Text-es.js';
|
|
10
9
|
import { T as Typography } from './Typography-es.js';
|
package/dist/Card/index.cjs
CHANGED
|
@@ -14,10 +14,8 @@ require('../Menu-cjs.js');
|
|
|
14
14
|
require('@jobber/hooks');
|
|
15
15
|
require('framer-motion');
|
|
16
16
|
require('../floating-ui.react-cjs.js');
|
|
17
|
-
require('../floating-ui.utils-cjs.js');
|
|
18
17
|
require('react/jsx-runtime');
|
|
19
18
|
require('react-dom');
|
|
20
|
-
require('../floating-ui.react-dom-cjs.js');
|
|
21
19
|
require('../useAtlantisI18n-cjs.js');
|
|
22
20
|
require('../AtlantisContext-cjs.js');
|
|
23
21
|
require('../useFormFieldFocus-cjs.js');
|
|
@@ -30,9 +28,11 @@ require('../BottomSheet-cjs.js');
|
|
|
30
28
|
require('../ScrollAreaViewport-cjs.js');
|
|
31
29
|
require('../useScrollLock-cjs.js');
|
|
32
30
|
require('../scrollEdges-cjs.js');
|
|
31
|
+
require('../scrollable-cjs.js');
|
|
33
32
|
require('../HelperText-cjs.js');
|
|
34
33
|
require('../Text-cjs.js');
|
|
35
34
|
require('../SelectPrimitive-cjs.js');
|
|
35
|
+
require('../mergeClassName-cjs.js');
|
|
36
36
|
require('../SelectGroupLabel-cjs.js');
|
|
37
37
|
require('../useCompositeListItem-cjs.js');
|
|
38
38
|
require('../DrawerTitle-cjs.js');
|
package/dist/Card/index.mjs
CHANGED
|
@@ -12,10 +12,8 @@ import '../Menu-es.js';
|
|
|
12
12
|
import '@jobber/hooks';
|
|
13
13
|
import 'framer-motion';
|
|
14
14
|
import '../floating-ui.react-es.js';
|
|
15
|
-
import '../floating-ui.utils-es.js';
|
|
16
15
|
import 'react/jsx-runtime';
|
|
17
16
|
import 'react-dom';
|
|
18
|
-
import '../floating-ui.react-dom-es.js';
|
|
19
17
|
import '../useAtlantisI18n-es.js';
|
|
20
18
|
import '../AtlantisContext-es.js';
|
|
21
19
|
import '../useFormFieldFocus-es.js';
|
|
@@ -28,9 +26,11 @@ import '../BottomSheet-es.js';
|
|
|
28
26
|
import '../ScrollAreaViewport-es.js';
|
|
29
27
|
import '../useScrollLock-es.js';
|
|
30
28
|
import '../scrollEdges-es.js';
|
|
29
|
+
import '../scrollable-es.js';
|
|
31
30
|
import '../HelperText-es.js';
|
|
32
31
|
import '../Text-es.js';
|
|
33
32
|
import '../SelectPrimitive-es.js';
|
|
33
|
+
import '../mergeClassName-es.js';
|
|
34
34
|
import '../SelectGroupLabel-es.js';
|
|
35
35
|
import '../useCompositeListItem-es.js';
|
|
36
36
|
import '../DrawerTitle-es.js';
|
package/dist/Chip/index.cjs
CHANGED
|
@@ -16,10 +16,8 @@ require('../AtlantisContext-cjs.js');
|
|
|
16
16
|
require('../Typography-cjs.js');
|
|
17
17
|
require('../Tooltip-cjs.js');
|
|
18
18
|
require('../floating-ui.react-cjs.js');
|
|
19
|
-
require('../floating-ui.utils-cjs.js');
|
|
20
19
|
require('react/jsx-runtime');
|
|
21
20
|
require('react-dom');
|
|
22
|
-
require('../floating-ui.react-dom-cjs.js');
|
|
23
21
|
require('framer-motion');
|
|
24
22
|
|
|
25
23
|
|
package/dist/Chip/index.mjs
CHANGED
|
@@ -14,8 +14,6 @@ import '../AtlantisContext-es.js';
|
|
|
14
14
|
import '../Typography-es.js';
|
|
15
15
|
import '../Tooltip-es.js';
|
|
16
16
|
import '../floating-ui.react-es.js';
|
|
17
|
-
import '../floating-ui.utils-es.js';
|
|
18
17
|
import 'react/jsx-runtime';
|
|
19
18
|
import 'react-dom';
|
|
20
|
-
import '../floating-ui.react-dom-es.js';
|
|
21
19
|
import 'framer-motion';
|
|
@@ -19,10 +19,8 @@ require('../../../debounce-cjs.js');
|
|
|
19
19
|
require('../../../Icon-cjs.js');
|
|
20
20
|
require('@jobber/design');
|
|
21
21
|
require('../../../floating-ui.react-cjs.js');
|
|
22
|
-
require('../../../floating-ui.utils-cjs.js');
|
|
23
22
|
require('react/jsx-runtime');
|
|
24
23
|
require('react-dom');
|
|
25
|
-
require('../../../floating-ui.react-dom-cjs.js');
|
|
26
24
|
require('../../../maxHeight-cjs.js');
|
|
27
25
|
|
|
28
26
|
|
|
@@ -17,8 +17,6 @@ import '../../../debounce-es.js';
|
|
|
17
17
|
import '../../../Icon-es.js';
|
|
18
18
|
import '@jobber/design';
|
|
19
19
|
import '../../../floating-ui.react-es.js';
|
|
20
|
-
import '../../../floating-ui.utils-es.js';
|
|
21
20
|
import 'react/jsx-runtime';
|
|
22
21
|
import 'react-dom';
|
|
23
|
-
import '../../../floating-ui.react-dom-es.js';
|
|
24
22
|
import '../../../maxHeight-es.js';
|
|
@@ -20,10 +20,8 @@ require('../../debounce-cjs.js');
|
|
|
20
20
|
require('../../Icon-cjs.js');
|
|
21
21
|
require('@jobber/design');
|
|
22
22
|
require('../../floating-ui.react-cjs.js');
|
|
23
|
-
require('../../floating-ui.utils-cjs.js');
|
|
24
23
|
require('react/jsx-runtime');
|
|
25
24
|
require('react-dom');
|
|
26
|
-
require('../../floating-ui.react-dom-cjs.js');
|
|
27
25
|
require('../../maxHeight-cjs.js');
|
|
28
26
|
require('classnames');
|
|
29
27
|
require('../../Text-cjs.js');
|
|
@@ -18,10 +18,8 @@ import '../../debounce-es.js';
|
|
|
18
18
|
import '../../Icon-es.js';
|
|
19
19
|
import '@jobber/design';
|
|
20
20
|
import '../../floating-ui.react-es.js';
|
|
21
|
-
import '../../floating-ui.utils-es.js';
|
|
22
21
|
import 'react/jsx-runtime';
|
|
23
22
|
import 'react-dom';
|
|
24
|
-
import '../../floating-ui.react-dom-es.js';
|
|
25
23
|
import '../../maxHeight-es.js';
|
|
26
24
|
import 'classnames';
|
|
27
25
|
import '../../Text-es.js';
|
package/dist/Chips/index.cjs
CHANGED
|
@@ -22,10 +22,8 @@ require('../debounce-cjs.js');
|
|
|
22
22
|
require('../Icon-cjs.js');
|
|
23
23
|
require('@jobber/design');
|
|
24
24
|
require('../floating-ui.react-cjs.js');
|
|
25
|
-
require('../floating-ui.utils-cjs.js');
|
|
26
25
|
require('react/jsx-runtime');
|
|
27
26
|
require('react-dom');
|
|
28
|
-
require('../floating-ui.react-dom-cjs.js');
|
|
29
27
|
require('../maxHeight-cjs.js');
|
|
30
28
|
require('classnames');
|
|
31
29
|
require('../Text-cjs.js');
|
package/dist/Chips/index.mjs
CHANGED
|
@@ -20,10 +20,8 @@ import '../debounce-es.js';
|
|
|
20
20
|
import '../Icon-es.js';
|
|
21
21
|
import '@jobber/design';
|
|
22
22
|
import '../floating-ui.react-es.js';
|
|
23
|
-
import '../floating-ui.utils-es.js';
|
|
24
23
|
import 'react/jsx-runtime';
|
|
25
24
|
import 'react-dom';
|
|
26
|
-
import '../floating-ui.react-dom-es.js';
|
|
27
25
|
import '../maxHeight-es.js';
|
|
28
26
|
import 'classnames';
|
|
29
27
|
import '../Text-es.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ComboboxSlotComponent } from "./Combobox.slotFactory";
|
|
2
|
+
export type ComboboxContentSlotName = "empty" | "actions" | "footer" | "loading";
|
|
3
|
+
export type ComboboxContentSlotComponent<Props, Slot extends ComboboxContentSlotName = ComboboxContentSlotName> = ComboboxSlotComponent<Props, "comboboxContentSlot", Slot>;
|
|
4
|
+
export declare const assignComboboxContentSlot: <Props, Slot extends ComboboxContentSlotName>(component: import("react").FC<Props>, slot: Slot) => ComboboxSlotComponent<Props, "comboboxContentSlot", Slot>;
|
|
5
|
+
export declare const isComboboxContentSlotElement: <Props = unknown>(child: React.ReactNode) => child is import("react").ReactElement<Props, ComboboxSlotComponent<Props, "comboboxContentSlot", ComboboxContentSlotName>>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import type { ComboboxResponsiveConfig } from "./Combobox.responsive";
|
|
4
|
+
import type { ComboboxSize } from "./Combobox.types";
|
|
5
|
+
export declare const ComboboxContext: React.Context<{
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
label?: ReactNode;
|
|
8
|
+
multiple: boolean;
|
|
9
|
+
positionerAnchor: Element | null;
|
|
10
|
+
readOnly: boolean;
|
|
11
|
+
responsive: ComboboxResponsiveConfig;
|
|
12
|
+
setPositionerAnchor: (anchor: Element | null) => void;
|
|
13
|
+
size: ComboboxSize;
|
|
14
|
+
} | null>;
|
|
15
|
+
export declare function useOptionalComboboxContext(): {
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
label?: ReactNode;
|
|
18
|
+
multiple: boolean;
|
|
19
|
+
positionerAnchor: Element | null;
|
|
20
|
+
readOnly: boolean;
|
|
21
|
+
responsive: ComboboxResponsiveConfig;
|
|
22
|
+
setPositionerAnchor: (anchor: Element | null) => void;
|
|
23
|
+
size: ComboboxSize;
|
|
24
|
+
} | null;
|
|
25
|
+
export declare function useComboboxContext(): {
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
label?: ReactNode;
|
|
28
|
+
multiple: boolean;
|
|
29
|
+
positionerAnchor: Element | null;
|
|
30
|
+
readOnly: boolean;
|
|
31
|
+
responsive: ComboboxResponsiveConfig;
|
|
32
|
+
setPositionerAnchor: (anchor: Element | null) => void;
|
|
33
|
+
size: ComboboxSize;
|
|
34
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ComboboxChipsProps, ComboboxClearProps, ComboboxContentProps, ComboboxDescriptionProps, ComboboxEmptyProps, ComboboxErrorProps, ComboboxFilterOptions, ComboboxInputGroupProps, ComboboxInputProps, ComboboxLabelNoteProps, ComboboxLabelProps, ComboboxLoadingProps, ComboboxRootProps, ComboboxTriggerInputProps, ComboboxTriggerMultipleValueProps, ComboboxTriggerMultipleWithInputProps, ComboboxTriggerProps, ComboboxTriggerValueProps } from "./Combobox.types";
|
|
3
|
+
import { getNextSelectAllValues, getSelectAllState } from "./Combobox.selectAll";
|
|
4
|
+
import { ComboboxClearSelection, ComboboxSelectAll, ComboboxSelectedCount } from "./Combobox.footer";
|
|
5
|
+
import { ComboboxAction, ComboboxCollection, ComboboxGroup, ComboboxGroupLabel, ComboboxItem, ComboboxList, ComboboxRow, ComboboxSeparator } from "./Combobox.items";
|
|
6
|
+
import { ComboboxPrimitive } from "../primitives/ComboboxPrimitive";
|
|
7
|
+
declare function useFilter(options?: ComboboxFilterOptions): import("@base-ui/react").AutocompleteFilter;
|
|
8
|
+
declare function ComboboxRoot<Value, Multiple extends boolean | undefined = false>({ children, className, description, disabled, error, invalid, label, modal, style, multiple, readOnly, size, ...rootProps }: ComboboxRootProps<Value, Multiple>): React.JSX.Element;
|
|
9
|
+
declare function ComboboxLabel({ className, ...labelProps }: ComboboxLabelProps): React.JSX.Element;
|
|
10
|
+
declare function ComboboxLabelNote({ className, ...labelNoteProps }: ComboboxLabelNoteProps): React.JSX.Element;
|
|
11
|
+
declare function ComboboxDescription({ children, className, ...descriptionProps }: ComboboxDescriptionProps): React.JSX.Element | null;
|
|
12
|
+
declare function ComboboxError({ children, className, match, ...errorProps }: ComboboxErrorProps): React.JSX.Element | null;
|
|
13
|
+
declare function ComboboxInputGroup({ className, ...inputGroupProps }: ComboboxInputGroupProps): React.JSX.Element;
|
|
14
|
+
declare function ComboboxInput({ className, ...inputProps }: ComboboxInputProps): React.JSX.Element;
|
|
15
|
+
declare function ComboboxTrigger({ className, render, ...triggerProps }: ComboboxTriggerProps): React.JSX.Element;
|
|
16
|
+
declare function ComboboxClear({ className, ...clearProps }: ComboboxClearProps): React.JSX.Element;
|
|
17
|
+
declare function ComboboxTriggerInput({ className, clearLabel, showOptionsLabel, ...inputProps }: ComboboxTriggerInputProps): React.JSX.Element;
|
|
18
|
+
declare function ComboboxTriggerValue({ children, className, placeholder, ...triggerProps }: ComboboxTriggerValueProps): React.JSX.Element;
|
|
19
|
+
declare function ComboboxTriggerMultipleWithInput<Value = unknown>({ className, getItemLabel, getRemoveLabel, renderItem, showOptionsLabel, ...inputProps }: ComboboxTriggerMultipleWithInputProps<Value>): React.JSX.Element;
|
|
20
|
+
declare function ComboboxTriggerMultipleValue<Value = unknown>({ getItemLabel, getRemoveLabel, placeholder, renderItem, showOptionsLabel, ...chipsProps }: ComboboxTriggerMultipleValueProps<Value>): React.JSX.Element;
|
|
21
|
+
declare function ComboboxContent({ ariaLabel, children, className, empty, style, }: ComboboxContentProps): React.JSX.Element;
|
|
22
|
+
declare function ComboboxChips({ className, ...chipsProps }: ComboboxChipsProps): React.JSX.Element;
|
|
23
|
+
declare const Combobox: typeof ComboboxRoot & {
|
|
24
|
+
Label: typeof ComboboxLabel;
|
|
25
|
+
LabelNote: typeof ComboboxLabelNote;
|
|
26
|
+
Description: typeof ComboboxDescription;
|
|
27
|
+
Error: typeof ComboboxError;
|
|
28
|
+
Value: typeof ComboboxPrimitive.Value;
|
|
29
|
+
InputGroup: typeof ComboboxInputGroup;
|
|
30
|
+
Input: typeof ComboboxInput;
|
|
31
|
+
Trigger: typeof ComboboxTrigger;
|
|
32
|
+
TriggerInput: typeof ComboboxTriggerInput;
|
|
33
|
+
TriggerValue: typeof ComboboxTriggerValue;
|
|
34
|
+
TriggerMultipleWithInput: typeof ComboboxTriggerMultipleWithInput;
|
|
35
|
+
TriggerMultipleValue: typeof ComboboxTriggerMultipleValue;
|
|
36
|
+
Icon: typeof ComboboxPrimitive.Icon;
|
|
37
|
+
Clear: typeof ComboboxClear;
|
|
38
|
+
Content: typeof ComboboxContent;
|
|
39
|
+
List: typeof ComboboxList;
|
|
40
|
+
Item: typeof ComboboxItem;
|
|
41
|
+
ItemDescription: import("./Combobox.slotFactory").ComboboxSlotComponent<import("./Combobox.types").ComboboxItemDescriptionProps, "comboboxItemSlot", "label" | "prefix" | "suffix" | "description">;
|
|
42
|
+
ItemLabel: import("./Combobox.slotFactory").ComboboxSlotComponent<import("./Combobox.types").ComboboxItemLabelProps, "comboboxItemSlot", "label" | "prefix" | "suffix" | "description">;
|
|
43
|
+
ItemPrefix: import("./Combobox.slotFactory").ComboboxSlotComponent<import("./Combobox.types").ComboboxItemPrefixProps, "comboboxItemSlot", "label" | "prefix" | "suffix" | "description">;
|
|
44
|
+
ItemSuffix: import("./Combobox.slotFactory").ComboboxSlotComponent<import("./Combobox.types").ComboboxItemSuffixProps, "comboboxItemSlot", "label" | "prefix" | "suffix" | "description">;
|
|
45
|
+
ActionPrefix: import("./Combobox.slotFactory").ComboboxSlotComponent<import("./Combobox.types").ComboboxActionPrefixProps, "comboboxActionSlot", "label" | "prefix">;
|
|
46
|
+
ActionLabel: import("./Combobox.slotFactory").ComboboxSlotComponent<import("./Combobox.types").ComboboxActionLabelProps, "comboboxActionSlot", "label" | "prefix">;
|
|
47
|
+
Row: typeof ComboboxRow;
|
|
48
|
+
Collection: typeof ComboboxCollection;
|
|
49
|
+
Chips: typeof ComboboxChips;
|
|
50
|
+
Chip: typeof ComboboxPrimitive.Chip;
|
|
51
|
+
ChipRemove: typeof ComboboxPrimitive.ChipRemove;
|
|
52
|
+
Group: typeof ComboboxGroup;
|
|
53
|
+
GroupLabel: typeof ComboboxGroupLabel;
|
|
54
|
+
Separator: typeof ComboboxSeparator;
|
|
55
|
+
Status: typeof ComboboxPrimitive.Status;
|
|
56
|
+
Empty: import("./Combobox.slotFactory").ComboboxSlotComponent<ComboboxEmptyProps, "comboboxContentSlot", "empty">;
|
|
57
|
+
Loading: import("./Combobox.slotFactory").ComboboxSlotComponent<ComboboxLoadingProps, "comboboxContentSlot", "loading">;
|
|
58
|
+
Actions: import("./Combobox.slotFactory").ComboboxSlotComponent<import("./Combobox.types").ComboboxActionsProps, "comboboxContentSlot", "actions">;
|
|
59
|
+
Action: typeof ComboboxAction;
|
|
60
|
+
Footer: import("./Combobox.slotFactory").ComboboxSlotComponent<import("./Combobox.types").ComboboxFooterProps<unknown>, "comboboxContentSlot", "footer">;
|
|
61
|
+
SelectionFooter: import("./Combobox.slotFactory").ComboboxSlotComponent<import("./Combobox.types").ComboboxSelectionFooterProps, "comboboxContentSlot", "footer">;
|
|
62
|
+
SelectedCount: typeof ComboboxSelectedCount;
|
|
63
|
+
ClearSelection: typeof ComboboxClearSelection;
|
|
64
|
+
SelectAll: typeof ComboboxSelectAll;
|
|
65
|
+
useFilter: typeof useFilter;
|
|
66
|
+
getSelectAllState: typeof getSelectAllState;
|
|
67
|
+
getNextSelectAllValues: typeof getNextSelectAllValues;
|
|
68
|
+
};
|
|
69
|
+
export { Combobox };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ComboboxClearSelectionProps, ComboboxFooterProps, ComboboxSelectAllProps, ComboboxSelectedCountProps, ComboboxSelectionFooterProps } from "./Combobox.types";
|
|
3
|
+
export declare const ComboboxFooter: import("./Combobox.slotFactory").ComboboxSlotComponent<ComboboxFooterProps<unknown>, "comboboxContentSlot", "footer">;
|
|
4
|
+
export declare function ComboboxSelectedCount({ children, className, }: ComboboxSelectedCountProps): React.JSX.Element;
|
|
5
|
+
export declare const ComboboxSelectionFooter: import("./Combobox.slotFactory").ComboboxSlotComponent<ComboboxSelectionFooterProps, "comboboxContentSlot", "footer">;
|
|
6
|
+
export declare function ComboboxClearSelection({ children, label, tabIndex, ...clearProps }: ComboboxClearSelectionProps): React.JSX.Element;
|
|
7
|
+
export declare function ComboboxSelectAll({ children, label, ...buttonProps }: ComboboxSelectAllProps): React.JSX.Element | null;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ComboboxActionLabelProps, ComboboxActionPrefixProps, ComboboxActionProps, ComboboxActionsProps, ComboboxCollectionProps, ComboboxGroupLabelProps, ComboboxGroupProps, ComboboxItemDescriptionProps, ComboboxItemLabelProps, ComboboxItemPrefixProps, ComboboxItemProps, ComboboxItemSuffixProps, ComboboxListProps, ComboboxRowProps, ComboboxSeparatorProps } from "./Combobox.types";
|
|
3
|
+
import { type ComboboxSlotComponent } from "./Combobox.slotFactory";
|
|
4
|
+
export declare function ComboboxList({ className, ...listProps }: ComboboxListProps): React.JSX.Element;
|
|
5
|
+
export declare function ComboboxItem({ children, ...itemProps }: ComboboxItemProps): React.JSX.Element;
|
|
6
|
+
declare const ComboboxItemPrefixComponent: ComboboxSlotComponent<ComboboxItemPrefixProps, "comboboxItemSlot", "label" | "prefix" | "suffix" | "description">;
|
|
7
|
+
export { ComboboxItemPrefixComponent as ComboboxItemPrefix };
|
|
8
|
+
declare const ComboboxItemLabelComponent: ComboboxSlotComponent<ComboboxItemLabelProps, "comboboxItemSlot", "label" | "prefix" | "suffix" | "description">;
|
|
9
|
+
export { ComboboxItemLabelComponent as ComboboxItemLabel };
|
|
10
|
+
declare const ComboboxItemDescriptionComponent: ComboboxSlotComponent<ComboboxItemDescriptionProps, "comboboxItemSlot", "label" | "prefix" | "suffix" | "description">;
|
|
11
|
+
export { ComboboxItemDescriptionComponent as ComboboxItemDescription };
|
|
12
|
+
declare const ComboboxItemSuffixComponent: ComboboxSlotComponent<ComboboxItemSuffixProps, "comboboxItemSlot", "label" | "prefix" | "suffix" | "description">;
|
|
13
|
+
export { ComboboxItemSuffixComponent as ComboboxItemSuffix };
|
|
14
|
+
declare const ComboboxActionPrefixComponent: ComboboxSlotComponent<ComboboxActionPrefixProps, "comboboxActionSlot", "label" | "prefix">;
|
|
15
|
+
export { ComboboxActionPrefixComponent as ComboboxActionPrefix };
|
|
16
|
+
declare const ComboboxActionLabelComponent: ComboboxSlotComponent<ComboboxActionLabelProps, "comboboxActionSlot", "label" | "prefix">;
|
|
17
|
+
export { ComboboxActionLabelComponent as ComboboxActionLabel };
|
|
18
|
+
export declare function ComboboxRow(props: ComboboxRowProps): React.JSX.Element;
|
|
19
|
+
export declare function ComboboxCollection(props: ComboboxCollectionProps): React.JSX.Element;
|
|
20
|
+
export declare function ComboboxGroup(props: ComboboxGroupProps): React.JSX.Element;
|
|
21
|
+
export declare function ComboboxGroupLabel(props: ComboboxGroupLabelProps): React.JSX.Element;
|
|
22
|
+
export declare function ComboboxSeparator(props: ComboboxSeparatorProps): React.JSX.Element;
|
|
23
|
+
declare const ComboboxActionsComponent: ComboboxSlotComponent<ComboboxActionsProps, "comboboxContentSlot", "actions">;
|
|
24
|
+
export { ComboboxActionsComponent as ComboboxActions };
|
|
25
|
+
export declare function ComboboxAction({ children, className, onClick, ...buttonProps }: ComboboxActionProps): React.JSX.Element;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { Button } from "../Button";
|
|
3
|
+
import type { ComboboxPrimitivePositionerProps } from "../primitives/ComboboxPrimitive";
|
|
4
|
+
export type ComboboxFooterActionButtonRecipe = Pick<React.ComponentProps<typeof Button>, "size" | "type" | "variation">;
|
|
5
|
+
type ComboboxPositionerResponsiveProps = Pick<ComboboxPrimitivePositionerProps, "align" | "positionMethod" | "side" | "sideOffset" | "style">;
|
|
6
|
+
export interface ComboboxResponsiveConfig {
|
|
7
|
+
readonly defaultModal: boolean;
|
|
8
|
+
readonly footerActionButtonRecipe: ComboboxFooterActionButtonRecipe;
|
|
9
|
+
readonly positionerProps: ComboboxPositionerResponsiveProps;
|
|
10
|
+
readonly showChipRemove: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const DEFAULT_COMBOBOX_RESPONSIVE_CONFIG: {
|
|
13
|
+
defaultModal: false;
|
|
14
|
+
footerActionButtonRecipe: {
|
|
15
|
+
size: "small";
|
|
16
|
+
type: "secondary";
|
|
17
|
+
variation: "work";
|
|
18
|
+
};
|
|
19
|
+
positionerProps: {};
|
|
20
|
+
showChipRemove: true;
|
|
21
|
+
};
|
|
22
|
+
export declare function getComboboxResponsiveConfig(width: number | undefined): {
|
|
23
|
+
defaultModal: false;
|
|
24
|
+
footerActionButtonRecipe: {
|
|
25
|
+
size: "small";
|
|
26
|
+
type: "secondary";
|
|
27
|
+
variation: "work";
|
|
28
|
+
};
|
|
29
|
+
positionerProps: {};
|
|
30
|
+
showChipRemove: true;
|
|
31
|
+
} | {
|
|
32
|
+
defaultModal: true;
|
|
33
|
+
footerActionButtonRecipe: {
|
|
34
|
+
size: "base";
|
|
35
|
+
type: "secondary";
|
|
36
|
+
variation: "work";
|
|
37
|
+
};
|
|
38
|
+
positionerProps: {
|
|
39
|
+
align: "center";
|
|
40
|
+
positionMethod: "fixed";
|
|
41
|
+
side: "bottom";
|
|
42
|
+
sideOffset: number;
|
|
43
|
+
style: {
|
|
44
|
+
position: "fixed";
|
|
45
|
+
width: string;
|
|
46
|
+
maxWidth: string;
|
|
47
|
+
margin: number;
|
|
48
|
+
transform: "none";
|
|
49
|
+
inset: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
showChipRemove: false;
|
|
53
|
+
};
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ComboboxSelectAllOptions, ComboboxSelectAllState } from "./Combobox.types";
|
|
2
|
+
declare function getSelectAllState<Value>({ candidateValues, isItemEqual, selectedValues, }: ComboboxSelectAllOptions<Value>): ComboboxSelectAllState;
|
|
3
|
+
declare function getNextSelectAllValues<Value>({ candidateValues, isItemEqual, selectedValues, }: ComboboxSelectAllOptions<Value>): Value[];
|
|
4
|
+
export { getNextSelectAllValues, getSelectAllState };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ComboboxSlotComponent<Props, MarkerKey extends string, Slot extends string> = React.FC<Props> & Record<MarkerKey, Slot>;
|
|
3
|
+
export declare function createComboboxSlotSystem<MarkerKey extends string, SlotName extends string>(markerKey: MarkerKey): {
|
|
4
|
+
assignSlot: <Props, Slot extends SlotName>(component: React.FC<Props>, slot: Slot) => ComboboxSlotComponent<Props, MarkerKey, Slot>;
|
|
5
|
+
createSlot: <Props, Slot extends SlotName = SlotName>(slot: Slot) => ComboboxSlotComponent<Props, MarkerKey, Slot>;
|
|
6
|
+
isSlotElement: <Props = unknown>(child: React.ReactNode) => child is React.ReactElement<Props, ComboboxSlotComponent<Props, MarkerKey, SlotName>>;
|
|
7
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface TestComboboxProps {
|
|
3
|
+
readonly children?: React.ReactNode;
|
|
4
|
+
readonly multiple?: true;
|
|
5
|
+
readonly defaultValue?: string | string[];
|
|
6
|
+
readonly defaultOpen?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare function TestCombobox({ children, multiple, defaultValue, defaultOpen, }: TestComboboxProps): React.JSX.Element;
|
|
9
|
+
declare function TestComboboxContent({ children, }: {
|
|
10
|
+
readonly children?: React.ReactNode;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
export { TestCombobox, TestComboboxContent };
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
3
|
+
import type { FieldErrorProps } from "@base-ui/react/field";
|
|
4
|
+
import type { Button } from "../Button";
|
|
5
|
+
import type { ComboboxPrimitiveChipProps, ComboboxPrimitiveChipRemoveProps, ComboboxPrimitiveChipsProps, ComboboxPrimitiveClearProps, ComboboxPrimitiveCollectionProps, ComboboxPrimitiveFilter, ComboboxPrimitiveFilterOptions, ComboboxPrimitiveGroupLabelProps, ComboboxPrimitiveGroupProps, ComboboxPrimitiveIconProps, ComboboxPrimitiveInputGroupProps, ComboboxPrimitiveInputProps, ComboboxPrimitiveItemProps, ComboboxPrimitiveListProps, ComboboxPrimitiveRootProps, ComboboxPrimitiveRowProps, ComboboxPrimitiveSeparatorProps, ComboboxPrimitiveStatusProps, ComboboxPrimitiveTriggerProps, ComboboxPrimitiveValueProps } from "../primitives/ComboboxPrimitive";
|
|
6
|
+
export type ComboboxSize = "small" | "base" | "large";
|
|
7
|
+
export type ComboboxRootProps<Value, Multiple extends boolean | undefined = false> = ComboboxPrimitiveRootProps<Value, Multiple> & {
|
|
8
|
+
readonly className?: string;
|
|
9
|
+
readonly description?: string;
|
|
10
|
+
readonly error?: string;
|
|
11
|
+
readonly invalid?: boolean;
|
|
12
|
+
readonly label?: ReactNode;
|
|
13
|
+
readonly size?: ComboboxSize;
|
|
14
|
+
readonly style?: React.CSSProperties;
|
|
15
|
+
};
|
|
16
|
+
export type ComboboxLabelProps = Omit<ComponentPropsWithRef<"label">, "color">;
|
|
17
|
+
export type ComboboxLabelNoteProps = ComponentPropsWithRef<"span">;
|
|
18
|
+
export interface ComboboxDescriptionProps extends Omit<ComponentPropsWithRef<"p">, "children"> {
|
|
19
|
+
readonly children?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ComboboxErrorProps extends Omit<ComponentPropsWithRef<"div">, "children"> {
|
|
22
|
+
readonly children?: string;
|
|
23
|
+
readonly match?: FieldErrorProps["match"];
|
|
24
|
+
}
|
|
25
|
+
export type ComboboxValueProps = ComboboxPrimitiveValueProps;
|
|
26
|
+
export type ComboboxInputGroupProps = ComboboxPrimitiveInputGroupProps;
|
|
27
|
+
export type ComboboxInputProps = ComboboxPrimitiveInputProps;
|
|
28
|
+
export type ComboboxTriggerProps = ComboboxPrimitiveTriggerProps;
|
|
29
|
+
export type ComboboxIconProps = ComboboxPrimitiveIconProps;
|
|
30
|
+
export type ComboboxListProps = ComboboxPrimitiveListProps;
|
|
31
|
+
export type ComboboxItemProps = ComboboxPrimitiveItemProps;
|
|
32
|
+
export interface ComboboxItemPrefixProps {
|
|
33
|
+
readonly children: ReactNode;
|
|
34
|
+
readonly className?: string;
|
|
35
|
+
readonly style?: React.CSSProperties;
|
|
36
|
+
}
|
|
37
|
+
export interface ComboboxItemLabelProps {
|
|
38
|
+
readonly children: ReactNode;
|
|
39
|
+
readonly className?: string;
|
|
40
|
+
readonly style?: React.CSSProperties;
|
|
41
|
+
}
|
|
42
|
+
export interface ComboboxItemDescriptionProps {
|
|
43
|
+
readonly children: ReactNode;
|
|
44
|
+
readonly className?: string;
|
|
45
|
+
readonly style?: React.CSSProperties;
|
|
46
|
+
}
|
|
47
|
+
export interface ComboboxItemSuffixProps {
|
|
48
|
+
readonly children: ReactNode;
|
|
49
|
+
readonly className?: string;
|
|
50
|
+
readonly style?: React.CSSProperties;
|
|
51
|
+
}
|
|
52
|
+
export type ComboboxRowProps = ComboboxPrimitiveRowProps;
|
|
53
|
+
export type ComboboxCollectionProps = ComboboxPrimitiveCollectionProps;
|
|
54
|
+
export type ComboboxChipsProps = ComboboxPrimitiveChipsProps;
|
|
55
|
+
export type ComboboxChipProps = ComboboxPrimitiveChipProps;
|
|
56
|
+
export type ComboboxChipRemoveProps = ComboboxPrimitiveChipRemoveProps;
|
|
57
|
+
export type ComboboxGroupProps = ComboboxPrimitiveGroupProps;
|
|
58
|
+
export type ComboboxGroupLabelProps = ComboboxPrimitiveGroupLabelProps;
|
|
59
|
+
export type ComboboxSeparatorProps = ComboboxPrimitiveSeparatorProps;
|
|
60
|
+
export type ComboboxClearProps = ComboboxPrimitiveClearProps;
|
|
61
|
+
export type ComboboxStatusProps = ComboboxPrimitiveStatusProps;
|
|
62
|
+
export type ComboboxFilter = ComboboxPrimitiveFilter;
|
|
63
|
+
export type ComboboxFilterOptions = ComboboxPrimitiveFilterOptions;
|
|
64
|
+
export interface ComboboxContentProps {
|
|
65
|
+
readonly children: ReactNode;
|
|
66
|
+
readonly className?: string;
|
|
67
|
+
readonly empty?: ReactNode;
|
|
68
|
+
readonly style?: React.CSSProperties;
|
|
69
|
+
readonly ariaLabel?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface ComboboxActionsProps {
|
|
72
|
+
readonly children: ReactNode;
|
|
73
|
+
readonly className?: string;
|
|
74
|
+
readonly style?: React.CSSProperties;
|
|
75
|
+
}
|
|
76
|
+
export type ComboboxActionProps = Omit<ComponentPropsWithRef<"button">, "type">;
|
|
77
|
+
export interface ComboboxActionPrefixProps {
|
|
78
|
+
readonly children?: ReactNode;
|
|
79
|
+
readonly className?: string;
|
|
80
|
+
readonly style?: React.CSSProperties;
|
|
81
|
+
}
|
|
82
|
+
export interface ComboboxActionLabelProps {
|
|
83
|
+
readonly children?: ReactNode;
|
|
84
|
+
readonly className?: string;
|
|
85
|
+
readonly style?: React.CSSProperties;
|
|
86
|
+
}
|
|
87
|
+
export interface ComboboxEmptyProps {
|
|
88
|
+
readonly children?: ReactNode;
|
|
89
|
+
readonly className?: string;
|
|
90
|
+
readonly style?: React.CSSProperties;
|
|
91
|
+
}
|
|
92
|
+
export interface ComboboxLoadingProps extends Omit<ComponentPropsWithRef<"div">, "children"> {
|
|
93
|
+
readonly children?: ReactNode;
|
|
94
|
+
readonly rows?: number;
|
|
95
|
+
}
|
|
96
|
+
export interface ComboboxFooterRenderState<Value = unknown> {
|
|
97
|
+
readonly selectedCount: number;
|
|
98
|
+
readonly selectedValue: Value | Value[] | null | undefined;
|
|
99
|
+
readonly selectedValues: Value[];
|
|
100
|
+
readonly hasSelection: boolean;
|
|
101
|
+
readonly canClearSelection: boolean;
|
|
102
|
+
readonly multiple: boolean;
|
|
103
|
+
}
|
|
104
|
+
export interface ComboboxFooterProps<Value = unknown> {
|
|
105
|
+
readonly children: ReactNode | ((state: ComboboxFooterRenderState<Value>) => ReactNode);
|
|
106
|
+
readonly className?: string;
|
|
107
|
+
readonly style?: React.CSSProperties;
|
|
108
|
+
}
|
|
109
|
+
export interface ComboboxSelectedCountProps {
|
|
110
|
+
readonly className?: string;
|
|
111
|
+
readonly children?: (count: number) => ReactNode;
|
|
112
|
+
}
|
|
113
|
+
export interface ComboboxClearSelectionProps extends ComboboxFooterActionProps {
|
|
114
|
+
readonly children?: ReactNode;
|
|
115
|
+
readonly label?: string;
|
|
116
|
+
}
|
|
117
|
+
export interface ComboboxSelectionFooterProps {
|
|
118
|
+
readonly className?: string;
|
|
119
|
+
readonly style?: React.CSSProperties;
|
|
120
|
+
readonly showSelectedCount?: boolean;
|
|
121
|
+
readonly selectAllLabel?: string;
|
|
122
|
+
readonly selectAllState?: ComboboxSelectAllState;
|
|
123
|
+
readonly onSelectAll?: React.MouseEventHandler<HTMLButtonElement>;
|
|
124
|
+
}
|
|
125
|
+
type ButtonWithChildrenRuntimeProps = Extract<React.ComponentProps<typeof Button>, {
|
|
126
|
+
readonly children: ReactNode;
|
|
127
|
+
}>;
|
|
128
|
+
export type ComboboxFooterActionProps = Omit<ButtonWithChildrenRuntimeProps, "children" | "external" | "label" | "name" | "size" | "submit" | "to" | "type" | "url" | "value" | "variation">;
|
|
129
|
+
export interface ComboboxTriggerInputProps extends Omit<ComboboxInputProps, "children"> {
|
|
130
|
+
readonly clearLabel?: string;
|
|
131
|
+
readonly showOptionsLabel?: string;
|
|
132
|
+
}
|
|
133
|
+
export interface ComboboxTriggerValueProps extends Omit<ComboboxTriggerProps, "children"> {
|
|
134
|
+
readonly children?: ComboboxValueProps["children"];
|
|
135
|
+
readonly placeholder?: ComboboxValueProps["placeholder"];
|
|
136
|
+
}
|
|
137
|
+
export interface ComboboxTriggerMultipleWithInputProps<Value> extends Omit<ComboboxInputProps, "children"> {
|
|
138
|
+
readonly getItemLabel?: (value: Value) => string;
|
|
139
|
+
readonly getRemoveLabel?: (value: Value) => string;
|
|
140
|
+
readonly renderItem?: (value: Value) => ReactNode;
|
|
141
|
+
readonly showOptionsLabel?: string;
|
|
142
|
+
}
|
|
143
|
+
export interface ComboboxTriggerMultipleValueProps<Value> extends Omit<ComboboxChipsProps, "children"> {
|
|
144
|
+
readonly getItemLabel?: (value: Value) => string;
|
|
145
|
+
readonly getRemoveLabel?: (value: Value) => string;
|
|
146
|
+
readonly placeholder?: ComboboxValueProps["placeholder"];
|
|
147
|
+
readonly renderItem?: (value: Value) => ReactNode;
|
|
148
|
+
readonly showOptionsLabel?: string;
|
|
149
|
+
}
|
|
150
|
+
export interface ComboboxSelectAllProps extends ComboboxFooterActionProps {
|
|
151
|
+
readonly children?: ReactNode;
|
|
152
|
+
readonly label?: string;
|
|
153
|
+
}
|
|
154
|
+
export interface ComboboxSelectAllState {
|
|
155
|
+
readonly checked: boolean;
|
|
156
|
+
readonly indeterminate: boolean;
|
|
157
|
+
readonly selectedCandidateCount: number;
|
|
158
|
+
readonly candidateCount: number;
|
|
159
|
+
}
|
|
160
|
+
export type ComboboxSelectAllItemComparer<Value> = (candidateValue: Value, selectedValue: Value) => boolean;
|
|
161
|
+
export interface ComboboxSelectAllOptions<Value> {
|
|
162
|
+
readonly selectedValues: readonly Value[];
|
|
163
|
+
readonly candidateValues: readonly Value[];
|
|
164
|
+
readonly isItemEqual?: ComboboxSelectAllItemComparer<Value>;
|
|
165
|
+
}
|
|
166
|
+
export {};
|