@lumx/react 4.3.2-alpha.24 → 4.3.2-alpha.25
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/_internal/DpdvhbTO.js +159 -0
- package/_internal/DpdvhbTO.js.map +1 -0
- package/index.d.ts +676 -193
- package/index.js +113 -485
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/utils/index.d.ts +2 -189
- package/utils/index.js +1218 -364
- package/utils/index.js.map +1 -1
- package/Tooltip-2RZbmkfM.d.ts +0 -915
- package/_internal/BQFZG9jO.js +0 -1768
- package/_internal/BQFZG9jO.js.map +0 -1
package/package.json
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"url": "https://github.com/lumapps/design-system/issues"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@lumx/core": "^4.3.2-alpha.
|
|
10
|
-
"@lumx/icons": "^4.3.2-alpha.
|
|
9
|
+
"@lumx/core": "^4.3.2-alpha.25",
|
|
10
|
+
"@lumx/icons": "^4.3.2-alpha.25",
|
|
11
11
|
"@popperjs/core": "^2.5.4",
|
|
12
12
|
"body-scroll-lock": "^3.1.5",
|
|
13
13
|
"react-popper": "^2.2.4"
|
|
@@ -102,6 +102,6 @@
|
|
|
102
102
|
"build:storybook": "storybook build"
|
|
103
103
|
},
|
|
104
104
|
"sideEffects": false,
|
|
105
|
-
"version": "4.3.2-alpha.
|
|
105
|
+
"version": "4.3.2-alpha.25",
|
|
106
106
|
"stableVersion": "4.3.1"
|
|
107
107
|
}
|
package/utils/index.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import * as React$1 from 'react';
|
|
2
1
|
import React__default, { RefObject, ReactNode, AriaAttributes } from 'react';
|
|
3
|
-
import { q as ComboboxAction, X as ComboboxState, Y as ComboboxReducer, y as OnComboboxSelect, T as TextFieldProps, r as ComboboxProps, Z as ComboboxSelectionType, _ as ComboboxTranslations, $ as BaseLoadingStatus, a0 as RegisteredComboboxOption, a1 as ComboboxOptionSelectEventSource } from '../Tooltip-2RZbmkfM.js';
|
|
4
2
|
import { Falsy, ObjectValues } from '@lumx/core/js/types';
|
|
5
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
4
|
import { DisabledStateContextValue } from '@lumx/core/js/utils/disabledState';
|
|
7
|
-
import '@lumx/core/js/constants';
|
|
8
5
|
|
|
9
6
|
interface ClickAwayParameters {
|
|
10
7
|
/**
|
|
@@ -398,189 +395,5 @@ type Output = [
|
|
|
398
395
|
*/
|
|
399
396
|
declare const useRovingTabIndex: (...args: BaseHookOptions) => Output;
|
|
400
397
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
declare const reducer: ComboboxReducer<ComboboxAction>;
|
|
404
|
-
/** Dispatch for the combobox component */
|
|
405
|
-
type ComboboxDispatch = React.Dispatch<ComboboxAction>;
|
|
406
|
-
|
|
407
|
-
interface ComboboxContextActions {
|
|
408
|
-
onSelect?: OnComboboxSelect;
|
|
409
|
-
onInputChange?: TextFieldProps['onChange'];
|
|
410
|
-
onOpen?: (params: {
|
|
411
|
-
manual: boolean;
|
|
412
|
-
currentValue: string;
|
|
413
|
-
}) => void;
|
|
414
|
-
}
|
|
415
|
-
interface ComboboxContextProps extends ComboboxState, ComboboxContextActions {
|
|
416
|
-
openOnFocus?: ComboboxProps['openOnFocus'];
|
|
417
|
-
openOnClick?: ComboboxProps['openOnClick'];
|
|
418
|
-
optionsLength: number;
|
|
419
|
-
/** The dispatch function to manage the inner state */
|
|
420
|
-
dispatch: ComboboxDispatch;
|
|
421
|
-
/** The ids of the currently selected options */
|
|
422
|
-
selectedIds?: Array<string>;
|
|
423
|
-
/** the type of selection currently configured for the combobox */
|
|
424
|
-
selectionType?: ComboboxSelectionType;
|
|
425
|
-
/**
|
|
426
|
-
* Whether the error state should be displayed when the status is in error.
|
|
427
|
-
*/
|
|
428
|
-
showErrorState?: boolean;
|
|
429
|
-
/**
|
|
430
|
-
* Whether the empty state should be displayed when there is no results.
|
|
431
|
-
*/
|
|
432
|
-
showEmptyState?: boolean;
|
|
433
|
-
/** translations to be used across the combobox */
|
|
434
|
-
translations: ComboboxTranslations;
|
|
435
|
-
}
|
|
436
|
-
/** Context for the Combobox component */
|
|
437
|
-
declare const ComboboxContext: React__default.Context<ComboboxContextProps>;
|
|
438
|
-
/** Context for a combobox section to store its unique id */
|
|
439
|
-
declare const SectionContext: React__default.Context<{
|
|
440
|
-
sectionId: string;
|
|
441
|
-
isLoading?: boolean;
|
|
442
|
-
}>;
|
|
443
|
-
|
|
444
|
-
interface ComboboxOptionContextValue {
|
|
445
|
-
optionId?: string;
|
|
446
|
-
isKeyboardHighlighted?: boolean;
|
|
447
|
-
}
|
|
448
|
-
declare const ComboboxOptionContext: React__default.Context<ComboboxOptionContextValue>;
|
|
449
|
-
interface ComboboxOptionIdProviderProps extends Required<ComboboxOptionContextValue> {
|
|
450
|
-
/** Option to display */
|
|
451
|
-
children: ReactNode;
|
|
452
|
-
}
|
|
453
|
-
/** Context Provider to store the current combobox option id. */
|
|
454
|
-
declare const ComboboxOptionContextProvider: ({ optionId, isKeyboardHighlighted, children, }: ComboboxOptionIdProviderProps) => react_jsx_runtime.JSX.Element;
|
|
455
|
-
/**
|
|
456
|
-
* Retrieve the current combobox option id.
|
|
457
|
-
* Must be used within a ComboboxOptionIdProvider
|
|
458
|
-
*/
|
|
459
|
-
declare const useComboboxOptionContext: () => Required<ComboboxOptionContextValue>;
|
|
460
|
-
|
|
461
|
-
interface ComboboxProviderProps {
|
|
462
|
-
children: ReactNode;
|
|
463
|
-
/** The data to pass the provider. Can be generated by the useCombobox hook */
|
|
464
|
-
value: ComboboxContextProps;
|
|
465
|
-
}
|
|
466
|
-
/** Context provider for the combobox. */
|
|
467
|
-
declare const ComboboxProvider: ({ children, value }: ComboboxProviderProps) => react_jsx_runtime.JSX.Element;
|
|
468
|
-
|
|
469
|
-
interface ComboboxRefsContext {
|
|
470
|
-
triggerRef: RefObject<HTMLElement>;
|
|
471
|
-
anchorRef: RefObject<HTMLElement>;
|
|
472
|
-
}
|
|
473
|
-
/** Context to store the refs of the combobox elements */
|
|
474
|
-
declare const ComboboxRefsContext: React$1.Context<ComboboxRefsContext>;
|
|
475
|
-
interface ComboboxRefsProviderProps extends ComboboxRefsContext {
|
|
476
|
-
children: ReactNode;
|
|
477
|
-
}
|
|
478
|
-
/** Provider to store the required refs for the Combobox */
|
|
479
|
-
declare const ComboboxRefsProvider: ({ triggerRef, anchorRef, children }: ComboboxRefsProviderProps) => react_jsx_runtime.JSX.Element;
|
|
480
|
-
/** Retrieves the combobox elements references from context */
|
|
481
|
-
declare const useComboboxRefs: () => ComboboxRefsContext;
|
|
482
|
-
|
|
483
|
-
/** Retrieve the current combobox state and actions */
|
|
484
|
-
declare const useCombobox: () => {
|
|
485
|
-
openOnFocus?: ComboboxProps["openOnFocus"];
|
|
486
|
-
openOnClick?: ComboboxProps["openOnClick"];
|
|
487
|
-
optionsLength: number;
|
|
488
|
-
selectedIds?: Array<string>;
|
|
489
|
-
selectionType?: ComboboxSelectionType;
|
|
490
|
-
showErrorState?: boolean;
|
|
491
|
-
showEmptyState?: boolean;
|
|
492
|
-
translations: ComboboxTranslations;
|
|
493
|
-
comboboxId: string;
|
|
494
|
-
listboxId: string;
|
|
495
|
-
status: BaseLoadingStatus;
|
|
496
|
-
options: Record<string, RegisteredComboboxOption>;
|
|
497
|
-
isOpen: boolean;
|
|
498
|
-
showAll: boolean;
|
|
499
|
-
type: "listbox" | "grid";
|
|
500
|
-
defaultInputValue?: string;
|
|
501
|
-
handleClose: () => void;
|
|
502
|
-
handleOpen: (params?: {
|
|
503
|
-
manual?: boolean;
|
|
504
|
-
}) => Promise<RegisteredComboboxOption[] | undefined>;
|
|
505
|
-
handleInputChange: (value: string, name?: string, event?: React__default.SyntheticEvent) => void;
|
|
506
|
-
handleSelected: (option: RegisteredComboboxOption, source?: ComboboxOptionSelectEventSource) => void;
|
|
507
|
-
dispatch: ComboboxDispatch;
|
|
508
|
-
inputValue: string;
|
|
509
|
-
};
|
|
510
|
-
|
|
511
|
-
interface UseComboboxTriggerArgs {
|
|
512
|
-
context: ReturnType<typeof useCombobox>;
|
|
513
|
-
refs: ReturnType<typeof useComboboxRefs>;
|
|
514
|
-
onKeyDown?: React__default.KeyboardEventHandler;
|
|
515
|
-
onFocus?: React__default.FocusEventHandler;
|
|
516
|
-
onBlur?: React__default.FocusEventHandler;
|
|
517
|
-
}
|
|
518
|
-
/**
|
|
519
|
-
* Provide props for the semantic and behaviors the combobox trigger.
|
|
520
|
-
*
|
|
521
|
-
*
|
|
522
|
-
*/
|
|
523
|
-
declare function useComboboxTrigger({ context, refs, onBlur, onFocus, onKeyDown }: UseComboboxTriggerArgs): {
|
|
524
|
-
id: string;
|
|
525
|
-
role: string;
|
|
526
|
-
'aria-activedescendant': string;
|
|
527
|
-
'aria-controls': string;
|
|
528
|
-
'aria-owns': string;
|
|
529
|
-
'aria-expanded': boolean;
|
|
530
|
-
onFocus: (event: React__default.FocusEvent) => void;
|
|
531
|
-
onBlur: (event: React__default.FocusEvent<Element>) => void;
|
|
532
|
-
onClick: () => void;
|
|
533
|
-
onKeyDown: React__default.KeyboardEventHandler<Element>;
|
|
534
|
-
};
|
|
535
|
-
|
|
536
|
-
/**
|
|
537
|
-
* Provide props for the semantic and behaviors the combobox button trigger
|
|
538
|
-
*
|
|
539
|
-
* Overrides the useComboboxTrigger() props & behavior to add a jump to option
|
|
540
|
-
* on printable character key down.
|
|
541
|
-
*/
|
|
542
|
-
declare function useComboboxButton(args: UseComboboxTriggerArgs): {
|
|
543
|
-
id: string;
|
|
544
|
-
role: string;
|
|
545
|
-
'aria-activedescendant': string;
|
|
546
|
-
'aria-controls': string;
|
|
547
|
-
'aria-owns': string;
|
|
548
|
-
'aria-expanded': boolean;
|
|
549
|
-
onFocus: (event: React__default.FocusEvent) => void;
|
|
550
|
-
onBlur: (event: React__default.FocusEvent<Element>) => void;
|
|
551
|
-
onClick: () => void;
|
|
552
|
-
onKeyDown: React__default.KeyboardEventHandler<Element>;
|
|
553
|
-
};
|
|
554
|
-
|
|
555
|
-
/**
|
|
556
|
-
* Provide props for the semantic and behaviors the combobox input trigger
|
|
557
|
-
*
|
|
558
|
-
* Overrides the useComboboxTrigger() props & behavior to prevent open on click
|
|
559
|
-
* if `openOnFocus` is not enabled.
|
|
560
|
-
*/
|
|
561
|
-
declare function useComboboxInput({ onKeyDown: propsOnKeyDown, ...args }: UseComboboxTriggerArgs): {
|
|
562
|
-
onClick: () => void;
|
|
563
|
-
onKeyDown: React__default.KeyboardEventHandler<Element>;
|
|
564
|
-
id: string;
|
|
565
|
-
role: string;
|
|
566
|
-
'aria-activedescendant': string;
|
|
567
|
-
'aria-controls': string;
|
|
568
|
-
'aria-owns': string;
|
|
569
|
-
'aria-expanded': boolean;
|
|
570
|
-
onFocus: (event: React__default.FocusEvent) => void;
|
|
571
|
-
onBlur: (event: React__default.FocusEvent<Element>) => void;
|
|
572
|
-
};
|
|
573
|
-
|
|
574
|
-
/** Retrieve the current combobox section id */
|
|
575
|
-
declare const useComboboxSectionId: () => {
|
|
576
|
-
sectionId: string;
|
|
577
|
-
isLoading?: boolean;
|
|
578
|
-
};
|
|
579
|
-
|
|
580
|
-
/**
|
|
581
|
-
* Register the given option to the context
|
|
582
|
-
*/
|
|
583
|
-
declare const useRegisterOption: (registerId: string, option: RegisteredComboboxOption, shouldRegister?: boolean) => void;
|
|
584
|
-
|
|
585
|
-
export { A11YLiveMessage, ClickAwayProvider, ComboboxContext, initialState as ComboboxInitialState, ComboboxOptionContext, ComboboxOptionContextProvider, ComboboxProvider, reducer as ComboboxReducer, ComboboxRefsProvider, DisabledStateProvider, InfiniteScroll, MovingFocusContext, MovingFocusProvider, Portal, PortalProvider, SectionContext, useCombobox, useComboboxButton, useComboboxInput, useComboboxOptionContext, useComboboxRefs, useComboboxSectionId, useComboboxTrigger, useDisabledStateContext, useRegisterOption, useRovingTabIndex, useVirtualFocus, useVirtualFocusParent };
|
|
586
|
-
export type { A11YLiveMessageProps, ComboboxContextActions, ComboboxContextProps, ComboboxDispatch, ComboboxOptionContextValue, ComboboxProviderProps, InfiniteScrollProps, PortalInit, PortalProps, PortalProviderProps, UseComboboxTriggerArgs };
|
|
398
|
+
export { A11YLiveMessage, ClickAwayProvider, DisabledStateProvider, InfiniteScroll, MovingFocusContext, MovingFocusProvider, Portal, PortalProvider, useDisabledStateContext, useRovingTabIndex, useVirtualFocus, useVirtualFocusParent };
|
|
399
|
+
export type { A11YLiveMessageProps, InfiniteScrollProps, PortalInit, PortalProps, PortalProviderProps };
|