@vuu-ui/vuu-ui-controls 0.8.24-debug → 0.8.25-debug

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.
@@ -1,6 +1,5 @@
1
1
  import { DataSource } from "@vuu-ui/vuu-data-types";
2
- import { ColumnDescriptor } from "@vuu-ui/vuu-table-types";
3
- import { TableRowSelectHandler } from "@vuu-ui/vuu-table";
2
+ import { ColumnDescriptor, TableRowSelectHandler } from "@vuu-ui/vuu-table-types";
4
3
  import { ChangeEvent } from "react";
5
4
  import { OpenChangeHandler } from "../dropdown";
6
5
  import { InstrumentPickerProps } from "./InstrumentPicker";
@@ -10,7 +9,7 @@ export interface InstrumentPickerHookProps extends Pick<InstrumentPickerProps, "
10
9
  defaultIsOpen?: boolean;
11
10
  isOpen?: boolean;
12
11
  }
13
- export declare const useInstrumentPicker: ({ columnMap, columns, dataSource, defaultIsOpen, isOpen: isOpenProp, itemToString, onOpenChange, onSelect, searchColumns, }: InstrumentPickerHookProps) => {
12
+ export declare const useInstrumentPicker: ({ dataSource, defaultIsOpen, isOpen: isOpenProp, itemToString, onOpenChange, onSelect, searchColumns, }: InstrumentPickerHookProps) => {
14
13
  highlightedIndex: number | undefined;
15
14
  inputProps: {
16
15
  inputProps: {
@@ -7,7 +7,6 @@ export interface OverflowContainerProps extends HTMLAttributes<HTMLDivElement> {
7
7
  PopupMenuProps?: Partial<PopupMenuProps>;
8
8
  allowDragDrop?: boolean;
9
9
  debugId?: string;
10
- height: number;
11
10
  onMoveItem?: (fromIndex: number, toIndex: number) => void;
12
11
  onSwitchWrappedItemIntoView?: (overflowItem: OverflowItem) => void;
13
12
  orientation?: orientationType;
@@ -14,7 +14,7 @@ export declare const NO_WRAPPED_ITEMS: OverflowItem[];
14
14
  to use of css order. This is taken into account by sorting.
15
15
  TODO support Vertical orientation
16
16
  */
17
- export declare const getNonWrappedAndWrappedItems: (container: HTMLElement, orientation?: orientationType) => [OverflowItem[], OverflowItem[]];
17
+ export declare const getNonWrappedAndWrappedItems: (container: HTMLElement, orientation: orientationType) => [OverflowItem[], OverflowItem[]];
18
18
  export declare const applyOverflowClassToWrappedItems: (container: HTMLElement, overflowedItems: OverflowItem[], classBase?: string) => void;
19
19
  export declare const overflowIndicatorHasWrappedButShouldNotHave: (wrappedItems: OverflowItem[]) => boolean;
20
20
  export declare const highPriorityItemsHaveWrappedButShouldNotHave: (nonWrappedItems: OverflowItem[], wrappedItems: OverflowItem[]) => boolean;
@@ -24,14 +24,14 @@ export declare const highPriorityItemsHaveWrappedButShouldNotHave: (nonWrappedIt
24
24
  We overflow one or more items. Then, when the overflowIndicator assumes
25
25
  full width, it may itself overflow.
26
26
  */
27
- export declare const correctForWrappedOverflowIndicator: (container: HTMLElement, overflowedItems: OverflowItem[]) => Promise<OverflowItem[]>;
27
+ export declare const correctForWrappedOverflowIndicator: (container: HTMLElement, overflowedItems: OverflowItem[], orientation: orientationType) => Promise<OverflowItem[]>;
28
28
  /**
29
29
  An edge case that may occur when reducing width from unwrapped to
30
30
  wrapped, or on first render.
31
31
  We overflow one or more items. Then, when the overflowIndicator assumes
32
32
  full width, it may itself overflow.
33
33
  */
34
- export declare const correctForWrappedHighPriorityItems: (container: HTMLElement, nonWrapped: OverflowItem[], wrapped: OverflowItem[]) => Promise<[OverflowItem[], OverflowItem[]]>;
34
+ export declare const correctForWrappedHighPriorityItems: (container: HTMLElement, nonWrapped: OverflowItem[], wrapped: OverflowItem[], orientation: orientationType) => Promise<[OverflowItem[], OverflowItem[]]>;
35
35
  export declare const markElementAsWrapped: (container: HTMLElement, item: OverflowItem) => void;
36
36
  export declare const getElementsMarkedAsWrapped: (container: HTMLElement) => HTMLElement[];
37
37
  export declare const unmarkItemsWhichAreNoLongerWrapped: (container: HTMLElement, wrappedItems: OverflowItem[]) => void;
@@ -40,10 +40,10 @@ export declare const unmarkItemsWhichAreNoLongerWrapped: (container: HTMLElement
40
40
  wrapped item - could the wrapped item return to the fold if the overflow
41
41
  indicaor were removed ?
42
42
  */
43
- export declare const removeOverflowIndicatorIfNoLongerNeeded: (container: HTMLElement) => boolean;
43
+ export declare const removeOverflowIndicatorIfNoLongerNeeded: (container: HTMLElement, orientation: orientationType) => boolean;
44
44
  /**
45
45
  * This is used both when an overflow menu is used to select an overflowed item
46
46
  * and when a high priority item has overflowed, whilst lower priority items
47
47
  * remain in view.
48
48
  */
49
- export declare const switchWrappedItemIntoView: (container: HTMLElement, overflowItem: OverflowItem) => [OverflowItem[], OverflowItem[]];
49
+ export declare const switchWrappedItemIntoView: (container: HTMLElement, overflowItem: OverflowItem, orientation: orientationType) => [OverflowItem[], OverflowItem[]];
@@ -2,7 +2,7 @@
2
2
  import { MenuActionHandler, MenuBuilder } from "@vuu-ui/vuu-data-types";
3
3
  import { OverflowItem } from "./overflow-utils";
4
4
  import { OverflowContainerProps } from "./OverflowContainer";
5
- export interface OverflowContainerHookProps extends Pick<OverflowContainerProps, "allowDragDrop" | "onMoveItem" | "orientation"> {
5
+ export interface OverflowContainerHookProps extends Pick<OverflowContainerProps, "allowDragDrop" | "onMoveItem">, Required<Pick<OverflowContainerProps, "orientation">> {
6
6
  itemCount: number;
7
7
  onSwitchWrappedItemIntoView?: (overflowItem: OverflowItem) => void;
8
8
  }
@@ -2,12 +2,11 @@ import { PopupMenuProps } from "@vuu-ui/vuu-popups";
2
2
  import { ButtonProps } from "@salt-ds/core";
3
3
  import { HTMLAttributes } from "react";
4
4
  import "./SplitButton.css";
5
- export interface SplitButtonProps extends HTMLAttributes<HTMLDivElement> {
6
- ButtonProps?: Partial<Omit<ButtonProps, "variant">>;
5
+ export interface SplitButtonProps extends Omit<HTMLAttributes<HTMLDivElement>, "onClick">, Pick<ButtonProps, "onClick"> {
6
+ ButtonProps?: Partial<Omit<ButtonProps, "onClick" | "variant">>;
7
7
  PopupMenuProps?: Partial<PopupMenuProps>;
8
- buttonText: string;
9
8
  disabled?: boolean;
10
9
  segmented?: boolean;
11
10
  variant?: ButtonProps["variant"];
12
11
  }
13
- export declare const SplitButton: ({ ButtonProps: ButtonPropsProp, PopupMenuProps: PopupMenuPropsProp, buttonText, disabled, onClick, segmented, variant, ...htmlAttributes }: SplitButtonProps) => JSX.Element;
12
+ export declare const SplitButton: import("react").ForwardRefExoticComponent<SplitButtonProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { SplitButtonProps } from "./SplitButton";
3
+ import "./SplitStateButton.css";
4
+ export interface SplitStateButtonProps extends SplitButtonProps {
5
+ selected: boolean;
6
+ }
7
+ export declare const SplitStateButton: import("react").ForwardRefExoticComponent<SplitStateButtonProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1 +1,2 @@
1
1
  export * from "./SplitButton";
2
+ export * from "./SplitStateButton";
@@ -4,9 +4,9 @@ import { SplitButtonProps } from "./SplitButton";
4
4
  export interface SplitButtonHookProps extends Pick<SplitButtonProps, "PopupMenuProps" | "ButtonProps" | "onClick" | "segmented"> {
5
5
  classBase: string;
6
6
  }
7
- export declare const useSplitButton: ({ ButtonProps: ButtonPropsProp, PopupMenuProps, classBase, onClick, segmented, }: SplitButtonHookProps) => {
7
+ export declare const useSplitButton: ({ ButtonProps: ButtonPropsProp, PopupMenuProps, classBase, onClick, }: SplitButtonHookProps) => {
8
8
  ButtonProps: {
9
- onClick: ((evt: any) => void) | undefined;
9
+ onClick: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
10
10
  onKeyDown: KeyboardEventHandler<HTMLButtonElement>;
11
11
  type?: "button" | "reset" | "submit" | undefined;
12
12
  className?: string | undefined;
@@ -283,7 +283,6 @@ export declare const useSplitButton: ({ ButtonProps: ButtonPropsProp, PopupMenuP
283
283
  PopupMenuProps: PopupMenuProps;
284
284
  buttonRef: import("react").RefObject<HTMLButtonElement>;
285
285
  rootRef: import("react").RefObject<HTMLDivElement>;
286
- onClick: ((evt: any) => void) | undefined;
287
286
  onBlur: FocusEventHandler<Element>;
288
287
  onFocus: FocusEventHandler<Element>;
289
288
  };
@@ -85,6 +85,11 @@ export interface TabstripProps extends HTMLAttributes<HTMLDivElement> {
85
85
  * An optional classname that will be added to each tab
86
86
  */
87
87
  tabClassName?: string;
88
+ /**
89
+ * An optional classifier, used to create a classname, intended
90
+ * for promary vs secondary bavigation.
91
+ */
92
+ variant?: "primary" | "secondary";
88
93
  }
89
94
  export type exitEditHandler = (originalValue: string, editedValue: string, allowDeactivation: boolean, tabIndex: number) => void;
90
95
  export interface responsiveDataAttributes {
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { TabstripProps } from "./TabsTypes";
3
3
  import "./Tabstrip.css";
4
- export declare const Tabstrip: ({ activeTabIndex: activeTabIndexProp, allowAddTab, allowCloseTab, allowDragDrop, allowRenameTab, animateSelectionThumb, children, className: classNameProp, id: idProp, keyBoardActivation, location, onActiveChange, onAddTab, onCloseTab, onExitEditMode, onMoveTab, orientation, showTabMenuButton, style: styleProp, tabClassName, ...htmlAttributes }: TabstripProps) => JSX.Element;
4
+ export declare const Tabstrip: ({ activeTabIndex: activeTabIndexProp, allowAddTab, allowCloseTab, allowDragDrop, allowRenameTab, animateSelectionThumb, children, className: classNameProp, id: idProp, keyBoardActivation, location, onActiveChange, onAddTab, onCloseTab, onExitEditMode, onMoveTab, orientation, showTabMenuButton, style: styleProp, tabClassName, variant, ...htmlAttributes }: TabstripProps) => JSX.Element;