@linzjs/lui 24.20.1 → 26.1.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/CHANGELOG.md +39 -0
- package/dist/assets/svg-content.d.ts +7 -7
- package/dist/components/Drawer/Drawer.d.ts +45 -45
- package/dist/components/Drawer/DrawerContext.d.ts +6 -7
- package/dist/components/Drawer/DrawerGlobal.d.ts +12 -12
- package/dist/components/Drawer/DrawerGlobalContext.d.ts +14 -14
- package/dist/components/Drawer/utils.d.ts +7 -7
- package/dist/components/LuiAccordicard/LuiAccordicard.d.ts +9 -9
- package/dist/components/LuiAccordicardStatic/LuiAccordicardStatic.d.ts +9 -9
- package/dist/components/LuiAccordion/LuiAccordion.d.ts +12 -12
- package/dist/components/LuiBadge/LuiBadge.d.ts +12 -12
- package/dist/components/LuiBanner/LuiBanner.d.ts +10 -10
- package/dist/components/LuiBannerV2/LuiBannerV2.d.ts +22 -22
- package/dist/components/LuiBearingInput/LuiBearingInput.d.ts +16 -16
- package/dist/components/LuiButton/LuiButton.d.ts +44 -44
- package/dist/components/LuiColourPicker/ColorBucket.d.ts +6 -6
- package/dist/components/LuiColourPicker/ColorInput.d.ts +9 -9
- package/dist/components/LuiColourPicker/ColorPalette.d.ts +14 -14
- package/dist/components/LuiColourPicker/ColourPaletteConstants.d.ts +8 -8
- package/dist/components/LuiCommonInputProps.d.ts +5 -5
- package/dist/components/LuiCounter/LuiCounter.d.ts +8 -8
- package/dist/components/LuiError/LuiError.d.ts +8 -8
- package/dist/components/LuiErrorPage/LuiErrorIllustration.d.ts +5 -5
- package/dist/components/LuiErrorPage/LuiErrorPage.d.ts +9 -9
- package/dist/components/LuiErrorPanel/LuiErrorPanel.d.ts +23 -23
- package/dist/components/LuiExpandableBanner/LuiExpandableBanner.d.ts +19 -19
- package/dist/components/LuiFilterContainer/LuiFilterContainer.d.ts +14 -14
- package/dist/components/LuiFilterMenu/LuiFilterMenu.d.ts +16 -16
- package/dist/components/LuiFooter/LuiAppFooterSml.d.ts +13 -13
- package/dist/components/LuiFooter/LuiFooter.d.ts +12 -12
- package/dist/components/LuiFormElements/ClearableLuiTextInput/ClearableLuiTextInput.d.ts +14 -14
- package/dist/components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput.d.ts +16 -16
- package/dist/components/LuiFormElements/LuiComboSelect/LuiComboSelect.d.ts +27 -27
- package/dist/components/LuiFormElements/LuiDateInput/DateInput.d.ts +5 -5
- package/dist/components/LuiFormElements/LuiDateInput/DateInputHelper.d.ts +6 -6
- package/dist/components/LuiFormElements/LuiDateInput/FireDateChange.d.ts +1 -1
- package/dist/components/LuiFormElements/LuiDateInput/LuiDateInput.d.ts +5 -5
- package/dist/components/LuiFormElements/LuiFileInputBox/LuiFileInputBox.d.ts +36 -36
- package/dist/components/LuiFormElements/LuiMoneyInput/LuiMoneyInput.d.ts +28 -28
- package/dist/components/LuiFormElements/LuiRadioInput/LuiRadioInput.d.ts +15 -15
- package/dist/components/LuiFormElements/LuiSelectInput/LuiSelectInput.d.ts +20 -20
- package/dist/components/LuiFormElements/LuiTextAreaInput/LuiAutoExpandTextAreaInput.d.ts +3 -3
- package/dist/components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.d.ts +12 -12
- package/dist/components/LuiFormElements/LuiTextInput/LuiTextInput.d.ts +23 -23
- package/dist/components/LuiForms/LuiFormSection/LuiFormSectionHeader.d.ts +7 -7
- package/dist/components/LuiForms/LuiFormSection/LuiHelpInfo/LuiHelpInfo.d.ts +6 -6
- package/dist/components/LuiHeader/LuiHeader.d.ts +72 -72
- package/dist/components/LuiHeaderMenu/LuiHeaderMenus.d.ts +51 -51
- package/dist/components/LuiHeaderMenuV2/LuiHeaderMenusV2.d.ts +87 -102
- package/dist/components/LuiHeaderV2/LuiHeaderV2.d.ts +103 -109
- package/dist/components/LuiIcon/LuiIcon.d.ts +35 -35
- package/dist/components/LuiListBox/LuiListBox.d.ts +59 -59
- package/dist/components/LuiListBox/LuiListBoxGroup.d.ts +10 -10
- package/dist/components/LuiListBox/LuiListBoxItem.d.ts +10 -10
- package/dist/components/LuiListBox/Renderers/CheckboxItemRenderer.d.ts +4 -4
- package/dist/components/LuiListBox/Renderers/RadioItemRenderer.d.ts +4 -4
- package/dist/components/LuiListBox/useLuiListBox.d.ts +3 -3
- package/dist/components/LuiLoadingSpinner/LuiLoadingSpinner.d.ts +16 -16
- package/dist/components/LuiLoadingSpinner/LuiLottieLight.d.ts +14 -14
- package/dist/components/LuiMenu/LuiMenu.d.ts +12 -12
- package/dist/components/LuiMenuTrigger/LuiMenuTrigger.d.ts +5 -5
- package/dist/components/LuiModal/LuiAlertModalV2.d.ts +7 -7
- package/dist/components/LuiModal/LuiModal.d.ts +40 -40
- package/dist/components/LuiModal/LuiModalContext.d.ts +6 -0
- package/dist/components/LuiModal/LuiModalV2.d.ts +36 -36
- package/dist/components/LuiMultiSwitch/LuiMultiSwitch.d.ts +23 -23
- package/dist/components/LuiMultiSwitch/LuiMultiSwitch.examples.d.ts +4 -4
- package/dist/components/LuiPagination/LuiPagination.d.ts +23 -23
- package/dist/components/LuiProgressBar/LuiProgressBar.d.ts +9 -9
- package/dist/components/LuiResizableLayout/LuiResizableLayout.d.ts +25 -25
- package/dist/components/LuiSearchBox/LuiSearchBox.d.ts +41 -41
- package/dist/components/LuiSearchInput/LuiPassiveSearchInput.d.ts +28 -28
- package/dist/components/LuiSearchInput/LuiSearchInput.d.ts +38 -38
- package/dist/components/LuiSearchInput/ResultsDisplay.d.ts +23 -23
- package/dist/components/LuiSelectMenu/LuiSelectDataMenu.d.ts +15 -15
- package/dist/components/LuiSelectMenu/LuiSelectMenu.d.ts +25 -25
- package/dist/components/LuiShadow/LuiShadow.d.ts +6 -6
- package/dist/components/LuiSideMenu/LuiSideMenu.d.ts +5 -5
- package/dist/components/LuiSideMenu/LuiSideMenuItem.d.ts +11 -11
- package/dist/components/LuiSidePanel/LuiSidePanel.d.ts +9 -9
- package/dist/components/LuiSidePanel/LuiSidePanelHelper.d.ts +7 -7
- package/dist/components/LuiSideToolbar/LuiSideToolbar.d.ts +11 -11
- package/dist/components/LuiSideToolbar/ToolbarButton.d.ts +21 -21
- package/dist/components/LuiSideToolbar/ToolbarIcon.d.ts +13 -13
- package/dist/components/LuiSideToolbar/ToolbarItem.d.ts +17 -17
- package/dist/components/LuiSplitButton/LuiSplitButton.d.ts +30 -30
- package/dist/components/LuiStaticMessage/LuiStaticMessage.d.ts +10 -10
- package/dist/components/LuiSwitchButton/LuiSwitchButton.d.ts +8 -8
- package/dist/components/LuiTabs/LuiTab/LuiTab.d.ts +13 -13
- package/dist/components/LuiTabs/LuiTabs.d.ts +10 -10
- package/dist/components/LuiTabs/LuiTabsGroup/LuiTabsGroup.d.ts +5 -5
- package/dist/components/LuiTabs/LuiTabsPanel/LuiTabsPanel.d.ts +8 -8
- package/dist/components/LuiTabs/LuiTabsPanelSwitch/LuiTabsPanelSwitch.d.ts +8 -8
- package/dist/components/LuiToastMessage/LuiToastMessage.d.ts +20 -20
- package/dist/components/LuiTooltip/LuiTooltip.d.ts +16 -16
- package/dist/components/LuiUpdateSplashModal/LuiUpdatesSplashModal.d.ts +27 -27
- package/dist/components/Splitter/Control/Control.d.ts +9 -9
- package/dist/components/Splitter/Control/ControlIcon.d.ts +7 -7
- package/dist/components/Splitter/Separator/Separator.d.ts +11 -11
- package/dist/components/Splitter/Splitter.d.ts +44 -44
- package/dist/components/Splitter/Stories/RangeAsPx.d.ts +9 -9
- package/dist/components/Splitter/Stories/Section.d.ts +5 -3
- package/dist/components/Splitter/helpers/clampSeparator.d.ts +10 -10
- package/dist/components/Splitter/helpers/dataBoundary.d.ts +18 -18
- package/dist/components/Splitter/helpers/getGridTemplate.d.ts +14 -14
- package/dist/components/Splitter/helpers/getKeyDownDeltaMove.d.ts +6 -7
- package/dist/components/Splitter/helpers/getSeparatorAttributes.d.ts +27 -27
- package/dist/components/Splitter/helpers/getSeparatorPosition.d.ts +7 -7
- package/dist/components/Splitter/helpers/transition.d.ts +5 -5
- package/dist/components/Splitter/helpers/useForkRef.d.ts +3 -4
- package/dist/components/Splitter/helpers/useMoveSeparator.d.ts +11 -11
- package/dist/components/Splitter/helpers/useShowSeparator.d.ts +7 -7
- package/dist/components/Splitter/helpers/useValueSeparator.d.ts +15 -15
- package/dist/components/Splitter/helpers/useValueSeparatorEffects.d.ts +5 -5
- package/dist/components/Splitter/useSplitterRef.d.ts +5 -5
- package/dist/components/Toast/Helpers/ToastSection.d.ts +9 -9
- package/dist/components/Toast/Helpers/ToastTypes.d.ts +35 -35
- package/dist/components/Toast/Helpers/getToastProviderEl.d.ts +15 -15
- package/dist/components/Toast/Helpers/toastUsage.d.ts +2 -2
- package/dist/components/Toast/Helpers/useToastState.d.ts +20 -21
- package/dist/components/Toast/ToastBanner.d.ts +6 -6
- package/dist/components/Toast/ToastProvider.d.ts +10 -10
- package/dist/components/Toast/Upgrade/LuiToastMessageCompatibleInterface.d.ts +5 -5
- package/dist/components/Toast/Upgrade/ToastVersion.d.ts +2 -3
- package/dist/components/Toast/Upgrade/index.d.ts +39 -39
- package/dist/components/Toast/Upgrade/observeOlderToasts.d.ts +6 -6
- package/dist/components/Toast/Upgrade/useShowLUIMessageCompatibleInterface.d.ts +5 -5
- package/dist/components/Toast/index.d.ts +2 -2
- package/dist/components/Toast/useToast.d.ts +43 -43
- package/dist/components/common/Hooks.d.ts +32 -32
- package/dist/components/common/ResponsiveUtils.d.ts +7 -7
- package/dist/components/common/StorybookSupport.d.ts +6 -6
- package/dist/components/common/UseMediaQuery.d.ts +9 -9
- package/dist/contexts/LuiFilterCharactersProvider.d.ts +12 -12
- package/dist/contexts/LuiMessagingContextProvider.d.ts +14 -14
- package/dist/fonts.d.ts +10 -10
- package/dist/functions/LinzFreeTextFilter.d.ts +14 -14
- package/dist/functions/LinzFreeTextValidator.d.ts +2 -2
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/useClickedOutsideElement.d.ts +14 -14
- package/dist/hooks/useDeprecatedWarning.d.ts +1 -1
- package/dist/index.d.ts +92 -92
- package/dist/index.js +10917 -9559
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +10917 -9559
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/LuiSwitchButton/LuiSwitchButton.scss +1 -0
- package/package.json +73 -61
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import './Separator.scss';
|
|
2
|
-
import React, { ComponentProps } from 'react';
|
|
3
|
-
import { Splitter } from '../Splitter';
|
|
4
|
-
type Parts = NonNullable<ComponentProps<typeof Splitter>['parts']>['controls'];
|
|
5
|
-
export declare const Separator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
6
|
-
parts?: Parts;
|
|
7
|
-
ratio?: number
|
|
8
|
-
onResized?: (
|
|
9
|
-
startAt?: number
|
|
10
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
export {};
|
|
1
|
+
import './Separator.scss';
|
|
2
|
+
import React, { ComponentProps } from 'react';
|
|
3
|
+
import { Splitter } from '../Splitter';
|
|
4
|
+
type Parts = NonNullable<ComponentProps<typeof Splitter>['parts']>['controls'];
|
|
5
|
+
export declare const Separator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
6
|
+
parts?: Parts;
|
|
7
|
+
ratio?: number;
|
|
8
|
+
onResized?: (val: number) => void;
|
|
9
|
+
startAt?: number;
|
|
10
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export {};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import React, { ComponentPropsWithRef } from 'react';
|
|
2
|
-
import { HTMLAttributes } from 'react';
|
|
3
|
-
import './Splitter.scss';
|
|
4
|
-
import { LuiButton } from '../LuiButton/LuiButton';
|
|
5
|
-
type ButtonProps = Omit<ComponentPropsWithRef<typeof LuiButton>, 'children'> & {
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
};
|
|
8
|
-
type BoundaryPx = {
|
|
9
|
-
min?: `${number}px`;
|
|
10
|
-
max?: `${number}px`;
|
|
11
|
-
};
|
|
12
|
-
type BoundaryNum = {
|
|
13
|
-
min?: number;
|
|
14
|
-
max?: number;
|
|
15
|
-
};
|
|
16
|
-
type BoundaryProps = BoundaryPx | BoundaryNum;
|
|
17
|
-
type Start = number | '1st-collapsed' | '2nd-collapsed';
|
|
18
|
-
type Controlled = {
|
|
19
|
-
ratio?: number;
|
|
20
|
-
startAt?: never;
|
|
21
|
-
};
|
|
22
|
-
type Uncontrolled = {
|
|
23
|
-
ratio?: never;
|
|
24
|
-
startAt?: Start;
|
|
25
|
-
};
|
|
26
|
-
type RatioProps = Controlled | Uncontrolled;
|
|
27
|
-
type Props = {
|
|
28
|
-
onResized?: (ratio: number) => void;
|
|
29
|
-
orientation?: 'horizontal' | 'vertical';
|
|
30
|
-
parts?: {
|
|
31
|
-
separator?: ComponentPropsWithRef<'div'>;
|
|
32
|
-
controls?: {
|
|
33
|
-
container?: ComponentPropsWithRef<'span'>;
|
|
34
|
-
primary?: ButtonProps;
|
|
35
|
-
secondary?: ButtonProps;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
} & HTMLAttributes<HTMLDivElement> & RatioProps & BoundaryProps;
|
|
39
|
-
/**
|
|
40
|
-
* Container that appends a separator when the children count equals 2.
|
|
41
|
-
* It looks at HTML nodes, not React components
|
|
42
|
-
*/
|
|
43
|
-
export declare const Splitter: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
44
|
-
export {};
|
|
1
|
+
import React, { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
import './Splitter.scss';
|
|
4
|
+
import { LuiButton } from '../LuiButton/LuiButton';
|
|
5
|
+
type ButtonProps = Omit<ComponentPropsWithRef<typeof LuiButton>, 'children'> & {
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
};
|
|
8
|
+
type BoundaryPx = {
|
|
9
|
+
min?: `${number}px`;
|
|
10
|
+
max?: `${number}px`;
|
|
11
|
+
};
|
|
12
|
+
type BoundaryNum = {
|
|
13
|
+
min?: number;
|
|
14
|
+
max?: number;
|
|
15
|
+
};
|
|
16
|
+
type BoundaryProps = BoundaryPx | BoundaryNum;
|
|
17
|
+
type Start = number | '1st-collapsed' | '2nd-collapsed';
|
|
18
|
+
type Controlled = {
|
|
19
|
+
ratio?: number;
|
|
20
|
+
startAt?: never;
|
|
21
|
+
};
|
|
22
|
+
type Uncontrolled = {
|
|
23
|
+
ratio?: never;
|
|
24
|
+
startAt?: Start;
|
|
25
|
+
};
|
|
26
|
+
type RatioProps = Controlled | Uncontrolled;
|
|
27
|
+
type Props = {
|
|
28
|
+
onResized?: (ratio: number) => void;
|
|
29
|
+
orientation?: 'horizontal' | 'vertical';
|
|
30
|
+
parts?: {
|
|
31
|
+
separator?: ComponentPropsWithRef<'div'>;
|
|
32
|
+
controls?: {
|
|
33
|
+
container?: ComponentPropsWithRef<'span'>;
|
|
34
|
+
primary?: ButtonProps;
|
|
35
|
+
secondary?: ButtonProps;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
} & HTMLAttributes<HTMLDivElement> & RatioProps & BoundaryProps;
|
|
39
|
+
/**
|
|
40
|
+
* Container that appends a separator when the children count equals 2.
|
|
41
|
+
* It looks at HTML nodes, not React components
|
|
42
|
+
*/
|
|
43
|
+
export declare const Splitter: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
44
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React, { ComponentProps } from 'react';
|
|
2
|
-
import { Splitter } from '../Splitter';
|
|
3
|
-
import './RangeAsPx.scss';
|
|
4
|
-
type SplitterProps = ComponentProps<typeof Splitter>;
|
|
5
|
-
type PixelProps = SplitterProps & {
|
|
6
|
-
unit?: '%' | 'px';
|
|
7
|
-
};
|
|
8
|
-
export declare const RangeAsPx: ({ unit, ...rest }: PixelProps) => React.JSX.Element;
|
|
9
|
-
export {};
|
|
1
|
+
import React, { ComponentProps } from 'react';
|
|
2
|
+
import { Splitter } from '../Splitter';
|
|
3
|
+
import './RangeAsPx.scss';
|
|
4
|
+
type SplitterProps = ComponentProps<typeof Splitter>;
|
|
5
|
+
type PixelProps = SplitterProps & {
|
|
6
|
+
unit?: '%' | 'px';
|
|
7
|
+
};
|
|
8
|
+
export declare const RangeAsPx: ({ unit, ...rest }: PixelProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type SectionProps = JSX.IntrinsicElements['section'];
|
|
3
|
+
export declare const HorizontalSection: (props: SectionProps) => React.JSX.Element;
|
|
4
|
+
export declare const VerticalSection: (props: SectionProps) => React.JSX.Element;
|
|
5
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Delimits the separator position value between 0 to 100 by default.
|
|
3
|
-
* It will prioritize supplied min and max delimiters as long as they are within the 0-100 range.
|
|
4
|
-
* @param props Expects a separator value and optional min and max delimiters
|
|
5
|
-
*/
|
|
6
|
-
export declare const clampSeparator: (props: {
|
|
7
|
-
min?: number
|
|
8
|
-
value: number;
|
|
9
|
-
max?: number
|
|
10
|
-
}) => number;
|
|
1
|
+
/**
|
|
2
|
+
* Delimits the separator position value between 0 to 100 by default.
|
|
3
|
+
* It will prioritize supplied min and max delimiters as long as they are within the 0-100 range.
|
|
4
|
+
* @param props Expects a separator value and optional min and max delimiters
|
|
5
|
+
*/
|
|
6
|
+
export declare const clampSeparator: (props: {
|
|
7
|
+
min?: number;
|
|
8
|
+
value: number;
|
|
9
|
+
max?: number;
|
|
10
|
+
}) => number;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
import { Splitter } from '../Splitter';
|
|
3
|
-
type Props = Pick<ComponentProps<typeof Splitter>, 'min' | 'max'>;
|
|
4
|
-
type Result = 'keep-secondary' | 'keep-primary' | 'keep-both';
|
|
5
|
-
/**
|
|
6
|
-
* Given boundaries passed as prop, it defines how the grid column/row template will be arranged.
|
|
7
|
-
* and whether the separator will be positioned using right or left absolute values (top or bottom for horizontal).
|
|
8
|
-
* It will use a data- attribute to store this prop derived information for later processing.
|
|
9
|
-
*/
|
|
10
|
-
export declare const setDataBoundary: (props: Props) => {
|
|
11
|
-
"data-boundary": Result;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Util to get what grid arrangement needs to be used to avoid jumps/flashes.
|
|
15
|
-
* The return value is derived from the Splitter props, and stored in a data- attribute.
|
|
16
|
-
*/
|
|
17
|
-
export declare const getDataBoundary: (separator: Element) => Result | undefined;
|
|
18
|
-
export {};
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { Splitter } from '../Splitter';
|
|
3
|
+
type Props = Pick<ComponentProps<typeof Splitter>, 'min' | 'max'>;
|
|
4
|
+
type Result = 'keep-secondary' | 'keep-primary' | 'keep-both';
|
|
5
|
+
/**
|
|
6
|
+
* Given boundaries passed as prop, it defines how the grid column/row template will be arranged.
|
|
7
|
+
* and whether the separator will be positioned using right or left absolute values (top or bottom for horizontal).
|
|
8
|
+
* It will use a data- attribute to store this prop derived information for later processing.
|
|
9
|
+
*/
|
|
10
|
+
export declare const setDataBoundary: (props: Props) => {
|
|
11
|
+
"data-boundary": Result;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Util to get what grid arrangement needs to be used to avoid jumps/flashes.
|
|
15
|
+
* The return value is derived from the Splitter props, and stored in a data- attribute.
|
|
16
|
+
*/
|
|
17
|
+
export declare const getDataBoundary: (separator: Element) => Result | undefined;
|
|
18
|
+
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* It will calculate the best grid arrangement, based on the min/max props passed to the Splitter.
|
|
3
|
-
* All grid options work. The preference `1fr XXpx` over `(width - XXpx) 1fr` depends on the type of boundary
|
|
4
|
-
* to avoid calculation of position when the window is being resized while trying to retain the collapsed state
|
|
5
|
-
* on a min/max value fixed in pixels (e.g. 200px). Such calculation adds unnecessary lagging on the separator
|
|
6
|
-
* to catch up. This function aims to avoid such lagging during resizing.
|
|
7
|
-
* primary relates to top/left
|
|
8
|
-
* secondary relates to right/bottom
|
|
9
|
-
*/
|
|
10
|
-
export declare const getGridTemplate: (separator: HTMLDivElement) => {
|
|
11
|
-
grid: string;
|
|
12
|
-
primary: string;
|
|
13
|
-
secondary: string;
|
|
14
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* It will calculate the best grid arrangement, based on the min/max props passed to the Splitter.
|
|
3
|
+
* All grid options work. The preference `1fr XXpx` over `(width - XXpx) 1fr` depends on the type of boundary
|
|
4
|
+
* to avoid calculation of position when the window is being resized while trying to retain the collapsed state
|
|
5
|
+
* on a min/max value fixed in pixels (e.g. 200px). Such calculation adds unnecessary lagging on the separator
|
|
6
|
+
* to catch up. This function aims to avoid such lagging during resizing.
|
|
7
|
+
* primary relates to top/left
|
|
8
|
+
* secondary relates to right/bottom
|
|
9
|
+
*/
|
|
10
|
+
export declare const getGridTemplate: (separator: HTMLDivElement) => {
|
|
11
|
+
grid: string;
|
|
12
|
+
primary: string;
|
|
13
|
+
secondary: string;
|
|
14
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
export {};
|
|
1
|
+
type Event = Pick<React.KeyboardEvent<HTMLDivElement>, 'currentTarget' | 'key' | 'ctrlKey' | 'shiftKey' | 'metaKey' | 'altKey'>;
|
|
2
|
+
/**
|
|
3
|
+
* Gets the delta % the separator should move based on key down.
|
|
4
|
+
*/
|
|
5
|
+
export declare const getKeyDownDeltaMove: (e: Event, valueNow: number) => number;
|
|
6
|
+
export {};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
type Props = {
|
|
3
|
-
child: Element | null | undefined;
|
|
4
|
-
separator?: never;
|
|
5
|
-
ref?: never;
|
|
6
|
-
} | {
|
|
7
|
-
child?: never;
|
|
8
|
-
separator: Element | null | undefined;
|
|
9
|
-
ref?: never;
|
|
10
|
-
} | {
|
|
11
|
-
child?: never;
|
|
12
|
-
separator?: never;
|
|
13
|
-
ref?: RefObject<HTMLElement | null> | null | undefined;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Given a ref/element if finds the Separator and returns the most useful attributes
|
|
17
|
-
*/
|
|
18
|
-
export declare const getSeparatorAttributes: (props: Props) => {
|
|
19
|
-
valueNow: number;
|
|
20
|
-
valueMax: number;
|
|
21
|
-
valueMin: number;
|
|
22
|
-
orientation: "horizontal" | "vertical" | undefined;
|
|
23
|
-
thickness: number;
|
|
24
|
-
boundary: ("keep-secondary" | "keep-primary" | "keep-both") | undefined;
|
|
25
|
-
sticky: "primary" | "secondary" | undefined;
|
|
26
|
-
};
|
|
27
|
-
export {};
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
child: Element | null | undefined;
|
|
4
|
+
separator?: never;
|
|
5
|
+
ref?: never;
|
|
6
|
+
} | {
|
|
7
|
+
child?: never;
|
|
8
|
+
separator: Element | null | undefined;
|
|
9
|
+
ref?: never;
|
|
10
|
+
} | {
|
|
11
|
+
child?: never;
|
|
12
|
+
separator?: never;
|
|
13
|
+
ref?: RefObject<HTMLElement | null> | null | undefined;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Given a ref/element if finds the Separator and returns the most useful attributes
|
|
17
|
+
*/
|
|
18
|
+
export declare const getSeparatorAttributes: (props: Props) => {
|
|
19
|
+
valueNow: number;
|
|
20
|
+
valueMax: number;
|
|
21
|
+
valueMin: number;
|
|
22
|
+
orientation: "horizontal" | "vertical" | undefined;
|
|
23
|
+
thickness: number;
|
|
24
|
+
boundary: ("keep-secondary" | "keep-primary" | "keep-both") | undefined;
|
|
25
|
+
sticky: "primary" | "secondary" | undefined;
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Returns a value from 0 to 100 that represents the separator position from left to right.
|
|
4
|
-
* @param separatorRef Separator ref
|
|
5
|
-
* @param drag Represents mouse/touch horizontal/vertical coordinate when the user is resizing.
|
|
6
|
-
*/
|
|
7
|
-
export declare const getSeparatorPosition: (separatorRef: RefObject<HTMLDivElement | null>, drag: number) => number;
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a value from 0 to 100 that represents the separator position from left to right.
|
|
4
|
+
* @param separatorRef Separator ref
|
|
5
|
+
* @param drag Represents mouse/touch horizontal/vertical coordinate when the user is resizing.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getSeparatorPosition: (separatorRef: RefObject<HTMLDivElement | null>, drag: number) => number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
export declare const transition: (props: RefObject<HTMLDivElement | null> | HTMLDivElement) => {
|
|
3
|
-
stop: () => void;
|
|
4
|
-
resume: () => void;
|
|
5
|
-
};
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export declare const transition: (props: RefObject<HTMLDivElement | null> | HTMLDivElement) => {
|
|
3
|
+
stop: () => void;
|
|
4
|
+
resume: () => void;
|
|
5
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export {};
|
|
1
|
+
type ForwardedRef<T> = ((instance: T | null) => void) | React.RefObject<T | null> | null;
|
|
2
|
+
export declare const useForkRef: <T>(forwardedRef: ForwardedRef<T>) => import("react").RefObject<T | null>;
|
|
3
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* It captures window events to report a new position.
|
|
4
|
-
* Provides necessary handlers for separator.
|
|
5
|
-
*/
|
|
6
|
-
export declare const useMoveSeparator: (separator: RefObject<HTMLDivElement | null>, resize: (val: number) => void) => {
|
|
7
|
-
onMouseDown: () => void;
|
|
8
|
-
onTouchStart: () => void;
|
|
9
|
-
onTouchEnd: () => void;
|
|
10
|
-
onBlur: () => void;
|
|
11
|
-
};
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* It captures window events to report a new position.
|
|
4
|
+
* Provides necessary handlers for separator.
|
|
5
|
+
*/
|
|
6
|
+
export declare const useMoveSeparator: (separator: RefObject<HTMLDivElement | null>, resize: (val: number) => void) => {
|
|
7
|
+
onMouseDown: () => void;
|
|
8
|
+
onTouchStart: () => void;
|
|
9
|
+
onTouchEnd: () => void;
|
|
10
|
+
onBlur: () => void;
|
|
11
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Returns true if the splitter container has 3 child nodes, including the separator.
|
|
4
|
-
* The consumer must render 2 element nodes (not components), to be able to split.
|
|
5
|
-
* @param separatorRef Separator ref
|
|
6
|
-
*/
|
|
7
|
-
export declare const useShowSeparator: (separatorRef: RefObject<HTMLDivElement | null>) => void;
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Returns true if the splitter container has 3 child nodes, including the separator.
|
|
4
|
+
* The consumer must render 2 element nodes (not components), to be able to split.
|
|
5
|
+
* @param separatorRef Separator ref
|
|
6
|
+
*/
|
|
7
|
+
export declare const useShowSeparator: (separatorRef: RefObject<HTMLDivElement | null>) => void;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Ensures valueNow is set to a valid value within its allowed boundaries.
|
|
4
|
-
* If boundaries and/or initialRatio are not specified, they will be defaulted.
|
|
5
|
-
* It's possible that multiple events trigger setValueNow simultaneosly with the same value.
|
|
6
|
-
* This multiple calls are expected, and setValueNow will resize only once.
|
|
7
|
-
*/
|
|
8
|
-
export declare const useValueSeparator: ({ separator, ratio, onResized, startAt, }: {
|
|
9
|
-
ratio?: number
|
|
10
|
-
onResized?: (
|
|
11
|
-
separator: RefObject<HTMLDivElement | null>;
|
|
12
|
-
startAt?: number
|
|
13
|
-
}) => {
|
|
14
|
-
setValueNow: (val?: number) => void;
|
|
15
|
-
};
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Ensures valueNow is set to a valid value within its allowed boundaries.
|
|
4
|
+
* If boundaries and/or initialRatio are not specified, they will be defaulted.
|
|
5
|
+
* It's possible that multiple events trigger setValueNow simultaneosly with the same value.
|
|
6
|
+
* This multiple calls are expected, and setValueNow will resize only once.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useValueSeparator: ({ separator, ratio, onResized, startAt, }: {
|
|
9
|
+
ratio?: number;
|
|
10
|
+
onResized?: (newVal: number) => void;
|
|
11
|
+
separator: RefObject<HTMLDivElement | null>;
|
|
12
|
+
startAt?: number;
|
|
13
|
+
}) => {
|
|
14
|
+
setValueNow: (val?: number) => void;
|
|
15
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Calls setValueNow when the separator attributes change.
|
|
4
|
-
*/
|
|
5
|
-
export declare const useValueSeparatorEffects: (setValueNow: (val?: number) => void, separator: RefObject<HTMLDivElement | null>, ratio?: number, startAt?: number) => void;
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Calls setValueNow when the separator attributes change.
|
|
4
|
+
*/
|
|
5
|
+
export declare const useValueSeparatorEffects: (setValueNow: (val?: number) => void, separator: RefObject<HTMLDivElement | null>, ratio?: number, startAt?: number) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
export declare const useSplitterRef: () => {
|
|
3
|
-
ref: RefObject<HTMLDivElement | null>;
|
|
4
|
-
setRatio: (val: number) => void;
|
|
5
|
-
};
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export declare const useSplitterRef: () => {
|
|
3
|
+
ref: RefObject<HTMLDivElement | null>;
|
|
4
|
+
setRatio: (val: number) => void;
|
|
5
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import './ToastSection.scss';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { IToast, ToastPosition } from './ToastTypes';
|
|
4
|
-
export declare const ToastSection: ({ position, list, remove, defaultTimeout, }: {
|
|
5
|
-
position: ToastPosition;
|
|
6
|
-
list: IToast[];
|
|
7
|
-
remove: (id: number) => void;
|
|
8
|
-
defaultTimeout: number;
|
|
9
|
-
}) => React.ReactPortal;
|
|
1
|
+
import './ToastSection.scss';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { IToast, ToastPosition } from './ToastTypes';
|
|
4
|
+
export declare const ToastSection: ({ position, list, remove, defaultTimeout, }: {
|
|
5
|
+
position: ToastPosition;
|
|
6
|
+
list: IToast[];
|
|
7
|
+
remove: (id: number) => void;
|
|
8
|
+
defaultTimeout: number;
|
|
9
|
+
}) => React.ReactPortal;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
type VerticalSide = 'top' | 'bottom';
|
|
3
|
-
type HorizontalSide = 'Left' | 'Center' | 'Right';
|
|
4
|
-
export type ToastPosition = `${VerticalSide}${HorizontalSide}`;
|
|
5
|
-
export type ToastNode = ReactNode | ((e: {
|
|
6
|
-
close: () => void;
|
|
7
|
-
}) => ReactNode);
|
|
8
|
-
export type ToastOptions = {
|
|
9
|
-
timeout?: number;
|
|
10
|
-
position?: ToastPosition;
|
|
11
|
-
onLeave?: (id: number) => void;
|
|
12
|
-
/**
|
|
13
|
-
* If true, the toast will require a user to dismiss it. This will set timeout to Infinity and override any provided timeout value.
|
|
14
|
-
* If false, the toast will not have a dismiss button and will automatically dismiss based on the timeout value (default 5s).
|
|
15
|
-
* If not provided, the toast will require dismissal if timeout is Infinity, and auto-dismiss otherwise, while still showing a dismiss button.
|
|
16
|
-
*/
|
|
17
|
-
requireDismiss?: boolean;
|
|
18
|
-
};
|
|
19
|
-
export type ToastAction = {
|
|
20
|
-
type: 'add';
|
|
21
|
-
notification: ToastNode;
|
|
22
|
-
options?: ToastOptions;
|
|
23
|
-
id: number;
|
|
24
|
-
} | {
|
|
25
|
-
type: 'remove';
|
|
26
|
-
id: number;
|
|
27
|
-
};
|
|
28
|
-
export interface IToast {
|
|
29
|
-
id: number;
|
|
30
|
-
notification: ToastNode;
|
|
31
|
-
options?: ToastOptions;
|
|
32
|
-
createdAt: number;
|
|
33
|
-
updatedAt: number;
|
|
34
|
-
}
|
|
35
|
-
export {};
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type VerticalSide = 'top' | 'bottom';
|
|
3
|
+
type HorizontalSide = 'Left' | 'Center' | 'Right';
|
|
4
|
+
export type ToastPosition = `${VerticalSide}${HorizontalSide}`;
|
|
5
|
+
export type ToastNode = ReactNode | ((e: {
|
|
6
|
+
close: () => void;
|
|
7
|
+
}) => ReactNode);
|
|
8
|
+
export type ToastOptions = {
|
|
9
|
+
timeout?: number;
|
|
10
|
+
position?: ToastPosition;
|
|
11
|
+
onLeave?: (id: number) => void;
|
|
12
|
+
/**
|
|
13
|
+
* If true, the toast will require a user to dismiss it. This will set timeout to Infinity and override any provided timeout value.
|
|
14
|
+
* If false, the toast will not have a dismiss button and will automatically dismiss based on the timeout value (default 5s).
|
|
15
|
+
* If not provided, the toast will require dismissal if timeout is Infinity, and auto-dismiss otherwise, while still showing a dismiss button.
|
|
16
|
+
*/
|
|
17
|
+
requireDismiss?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type ToastAction = {
|
|
20
|
+
type: 'add';
|
|
21
|
+
notification: ToastNode;
|
|
22
|
+
options?: ToastOptions;
|
|
23
|
+
id: number;
|
|
24
|
+
} | {
|
|
25
|
+
type: 'remove';
|
|
26
|
+
id: number;
|
|
27
|
+
};
|
|
28
|
+
export interface IToast {
|
|
29
|
+
id: number;
|
|
30
|
+
notification: ToastNode;
|
|
31
|
+
options?: ToastOptions;
|
|
32
|
+
createdAt: number;
|
|
33
|
+
updatedAt: number;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrieves the toast provider container element. It creates a new
|
|
3
|
-
* one if it hasn't been created already.
|
|
4
|
-
*
|
|
5
|
-
* @description It is expected that application A, renders application B, that happens to render
|
|
6
|
-
* the new toasts as well. In this case, application B will still render the context
|
|
7
|
-
* provider to handle their toasts, but it will re-use the portal created by A.
|
|
8
|
-
*
|
|
9
|
-
* When the provider is created, it will observe older toasts coming to the screen
|
|
10
|
-
* to make them visually align with the new ones. This needs to happens when the portal is
|
|
11
|
-
* created, regardless of what app has created it.
|
|
12
|
-
*
|
|
13
|
-
* @returns HTMLDivElement
|
|
14
|
-
*/
|
|
15
|
-
export declare const getToastProviderEl: () => HTMLDivElement;
|
|
1
|
+
/**
|
|
2
|
+
* Retrieves the toast provider container element. It creates a new
|
|
3
|
+
* one if it hasn't been created already.
|
|
4
|
+
*
|
|
5
|
+
* @description It is expected that application A, renders application B, that happens to render
|
|
6
|
+
* the new toasts as well. In this case, application B will still render the context
|
|
7
|
+
* provider to handle their toasts, but it will re-use the portal created by A.
|
|
8
|
+
*
|
|
9
|
+
* When the provider is created, it will observe older toasts coming to the screen
|
|
10
|
+
* to make them visually align with the new ones. This needs to happens when the portal is
|
|
11
|
+
* created, regardless of what app has created it.
|
|
12
|
+
*
|
|
13
|
+
* @returns HTMLDivElement
|
|
14
|
+
*/
|
|
15
|
+
export declare const getToastProviderEl: () => HTMLDivElement;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const ToastUsage: () => React.JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ToastUsage: () => React.JSX.Element;
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
export {};
|
|
1
|
+
import { IToast, ToastAction } from './ToastTypes';
|
|
2
|
+
type ToastState = {
|
|
3
|
+
toasts: IToast[];
|
|
4
|
+
stack: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const reducer: (state: ToastState, action: ToastAction) => ToastState;
|
|
7
|
+
export declare const useToastState: ({ stack }: {
|
|
8
|
+
stack: number;
|
|
9
|
+
}) => {
|
|
10
|
+
toasts: {
|
|
11
|
+
topLeft: IToast[];
|
|
12
|
+
topCenter: IToast[];
|
|
13
|
+
topRight: IToast[];
|
|
14
|
+
bottomLeft: IToast[];
|
|
15
|
+
bottomCenter: IToast[];
|
|
16
|
+
bottomRight: IToast[];
|
|
17
|
+
};
|
|
18
|
+
dispatch: import("react").ActionDispatch<[action: ToastAction]>;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import './ToastBanner.scss';
|
|
2
|
-
import React, { ComponentPropsWithoutRef } from 'react';
|
|
3
|
-
import { LuiBannerV2 } from '../LuiBannerV2/LuiBannerV2';
|
|
4
|
-
type Props = Pick<ComponentPropsWithoutRef<typeof LuiBannerV2>, 'level' | 'onDismiss' | 'children'>;
|
|
5
|
-
export declare const ToastBanner: ({ level, onDismiss, children }: Props) => React.JSX.Element;
|
|
6
|
-
export {};
|
|
1
|
+
import './ToastBanner.scss';
|
|
2
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import { LuiBannerV2 } from '../LuiBannerV2/LuiBannerV2';
|
|
4
|
+
type Props = Pick<ComponentPropsWithoutRef<typeof LuiBannerV2>, 'level' | 'onDismiss' | 'children'>;
|
|
5
|
+
export declare const ToastBanner: ({ level, onDismiss, children }: Props) => React.JSX.Element;
|
|
6
|
+
export {};
|