@salt-ds/lab 1.0.0-alpha.30 → 1.0.0-alpha.32
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/css/salt-lab.css +126 -176
- package/dist-cjs/app-header/AppHeader.css.js +1 -1
- package/dist-cjs/combo-box-next/ComboBoxNext.js +286 -291
- package/dist-cjs/combo-box-next/ComboBoxNext.js.map +1 -1
- package/dist-cjs/combo-box-next/useComboBoxNext.js +21 -9
- package/dist-cjs/combo-box-next/useComboBoxNext.js.map +1 -1
- package/dist-cjs/content-status/internal/StatusIndicator.js +1 -3
- package/dist-cjs/content-status/internal/StatusIndicator.js.map +1 -1
- package/dist-cjs/dialog/Dialog.css.js +1 -1
- package/dist-cjs/dialog/Dialog.js +70 -48
- package/dist-cjs/dialog/Dialog.js.map +1 -1
- package/dist-cjs/dialog/DialogActions.js.map +1 -1
- package/dist-cjs/dialog/DialogContent.css.js +1 -1
- package/dist-cjs/dialog/DialogContent.js +17 -8
- package/dist-cjs/dialog/DialogContent.js.map +1 -1
- package/dist-cjs/dialog/DialogContext.js +4 -1
- package/dist-cjs/dialog/DialogContext.js.map +1 -1
- package/dist-cjs/dialog/DialogTitle.css.js +1 -1
- package/dist-cjs/dialog/DialogTitle.js +21 -8
- package/dist-cjs/dialog/DialogTitle.js.map +1 -1
- package/dist-cjs/drawer/Drawer.css.js +1 -1
- package/dist-cjs/drawer/Drawer.js +61 -36
- package/dist-cjs/drawer/Drawer.js.map +1 -1
- package/dist-cjs/drawer/DrawerCloseButton.css.js +6 -0
- package/dist-cjs/drawer/DrawerCloseButton.css.js.map +1 -0
- package/dist-cjs/drawer/DrawerCloseButton.js +44 -0
- package/dist-cjs/drawer/DrawerCloseButton.js.map +1 -0
- package/dist-cjs/dropdown-next/DropdownNext.js +294 -308
- package/dist-cjs/dropdown-next/DropdownNext.js.map +1 -1
- package/dist-cjs/index.js +3 -9
- package/dist-cjs/index.js.map +1 -1
- package/dist-cjs/list-control/ListControlContext.js.map +1 -1
- package/dist-cjs/list-control/ListControlState.js +21 -20
- package/dist-cjs/list-control/ListControlState.js.map +1 -1
- package/dist-cjs/option/Option.js +0 -4
- package/dist-cjs/option/Option.js.map +1 -1
- package/dist-cjs/option/OptionList.css.js +1 -1
- package/dist-cjs/parent-child-layout/ParentChildLayout.css.js +1 -1
- package/dist-cjs/parent-child-layout/ParentChildLayout.js +30 -38
- package/dist-cjs/parent-child-layout/ParentChildLayout.js.map +1 -1
- package/dist-cjs/slider/Slider.css.js +1 -1
- package/dist-cjs/stepped-tracker/TrackerConnector/TrackerConnector.css.js +1 -1
- package/dist-cjs/tabs-next/TabNext.css.js +1 -1
- package/dist-cjs/tabs-next/TabstripNext.css.js +1 -1
- package/dist-es/app-header/AppHeader.css.js +1 -1
- package/dist-es/combo-box-next/ComboBoxNext.js +287 -292
- package/dist-es/combo-box-next/ComboBoxNext.js.map +1 -1
- package/dist-es/combo-box-next/useComboBoxNext.js +21 -9
- package/dist-es/combo-box-next/useComboBoxNext.js.map +1 -1
- package/dist-es/content-status/internal/StatusIndicator.js +1 -3
- package/dist-es/content-status/internal/StatusIndicator.js.map +1 -1
- package/dist-es/dialog/Dialog.css.js +1 -1
- package/dist-es/dialog/Dialog.js +73 -52
- package/dist-es/dialog/Dialog.js.map +1 -1
- package/dist-es/dialog/DialogActions.js.map +1 -1
- package/dist-es/dialog/DialogContent.css.js +1 -1
- package/dist-es/dialog/DialogContent.js +19 -10
- package/dist-es/dialog/DialogContent.js.map +1 -1
- package/dist-es/dialog/DialogContext.js +4 -1
- package/dist-es/dialog/DialogContext.js.map +1 -1
- package/dist-es/dialog/DialogTitle.css.js +1 -1
- package/dist-es/dialog/DialogTitle.js +22 -9
- package/dist-es/dialog/DialogTitle.js.map +1 -1
- package/dist-es/drawer/Drawer.css.js +1 -1
- package/dist-es/drawer/Drawer.js +65 -39
- package/dist-es/drawer/Drawer.js.map +1 -1
- package/dist-es/drawer/DrawerCloseButton.css.js +4 -0
- package/dist-es/drawer/DrawerCloseButton.css.js.map +1 -0
- package/dist-es/drawer/DrawerCloseButton.js +36 -0
- package/dist-es/drawer/DrawerCloseButton.js.map +1 -0
- package/dist-es/dropdown-next/DropdownNext.js +295 -309
- package/dist-es/dropdown-next/DropdownNext.js.map +1 -1
- package/dist-es/index.js +3 -6
- package/dist-es/index.js.map +1 -1
- package/dist-es/list-control/ListControlContext.js.map +1 -1
- package/dist-es/list-control/ListControlState.js +21 -20
- package/dist-es/list-control/ListControlState.js.map +1 -1
- package/dist-es/option/Option.js +0 -4
- package/dist-es/option/Option.js.map +1 -1
- package/dist-es/option/OptionList.css.js +1 -1
- package/dist-es/parent-child-layout/ParentChildLayout.css.js +1 -1
- package/dist-es/parent-child-layout/ParentChildLayout.js +32 -40
- package/dist-es/parent-child-layout/ParentChildLayout.js.map +1 -1
- package/dist-es/slider/Slider.css.js +1 -1
- package/dist-es/stepped-tracker/TrackerConnector/TrackerConnector.css.js +1 -1
- package/dist-es/tabs-next/TabNext.css.js +1 -1
- package/dist-es/tabs-next/TabstripNext.css.js +1 -1
- package/dist-types/combo-box-next/ComboBoxNext.d.ts +13 -3
- package/dist-types/combo-box-next/useComboBoxNext.d.ts +13 -16
- package/dist-types/content-status/internal/StatusIndicator.d.ts +1 -1
- package/dist-types/dialog/Dialog.d.ts +25 -2
- package/dist-types/dialog/DialogContext.d.ts +2 -2
- package/dist-types/dialog/DialogTitle.d.ts +19 -5
- package/dist-types/drawer/Drawer.d.ts +13 -7
- package/dist-types/drawer/DrawerCloseButton.d.ts +2 -0
- package/dist-types/drawer/index.d.ts +1 -1
- package/dist-types/dropdown-next/DropdownNext.d.ts +13 -3
- package/dist-types/index.d.ts +0 -2
- package/dist-types/list-control/ListControlContext.d.ts +12 -11
- package/dist-types/list-control/ListControlState.d.ts +21 -21
- package/dist-types/option/Option.d.ts +1 -1
- package/dist-types/parent-child-layout/ParentChildLayout.d.ts +8 -13
- package/package.json +2 -2
- package/dist-cjs/dialog/useDialog.js +0 -31
- package/dist-cjs/dialog/useDialog.js.map +0 -1
- package/dist-cjs/drawer/useDrawer.js +0 -31
- package/dist-cjs/drawer/useDrawer.js.map +0 -1
- package/dist-cjs/parent-child-item/ParentChildItem.css.js +0 -6
- package/dist-cjs/parent-child-item/ParentChildItem.css.js.map +0 -1
- package/dist-cjs/parent-child-item/ParentChildItem.js +0 -48
- package/dist-cjs/parent-child-item/ParentChildItem.js.map +0 -1
- package/dist-cjs/progress/CircularProgress/CircularProgress.css.js +0 -6
- package/dist-cjs/progress/CircularProgress/CircularProgress.css.js.map +0 -1
- package/dist-cjs/progress/CircularProgress/CircularProgress.js +0 -89
- package/dist-cjs/progress/CircularProgress/CircularProgress.js.map +0 -1
- package/dist-cjs/progress/Info.js +0 -20
- package/dist-cjs/progress/Info.js.map +0 -1
- package/dist-cjs/progress/LinearProgress/LinearProgress.css.js +0 -6
- package/dist-cjs/progress/LinearProgress/LinearProgress.css.js.map +0 -1
- package/dist-cjs/progress/LinearProgress/LinearProgress.js +0 -63
- package/dist-cjs/progress/LinearProgress/LinearProgress.js.map +0 -1
- package/dist-es/dialog/useDialog.js +0 -27
- package/dist-es/dialog/useDialog.js.map +0 -1
- package/dist-es/drawer/useDrawer.js +0 -27
- package/dist-es/drawer/useDrawer.js.map +0 -1
- package/dist-es/parent-child-item/ParentChildItem.css.js +0 -4
- package/dist-es/parent-child-item/ParentChildItem.css.js.map +0 -1
- package/dist-es/parent-child-item/ParentChildItem.js +0 -44
- package/dist-es/parent-child-item/ParentChildItem.js.map +0 -1
- package/dist-es/progress/CircularProgress/CircularProgress.css.js +0 -4
- package/dist-es/progress/CircularProgress/CircularProgress.css.js.map +0 -1
- package/dist-es/progress/CircularProgress/CircularProgress.js +0 -85
- package/dist-es/progress/CircularProgress/CircularProgress.js.map +0 -1
- package/dist-es/progress/Info.js +0 -16
- package/dist-es/progress/Info.js.map +0 -1
- package/dist-es/progress/LinearProgress/LinearProgress.css.js +0 -4
- package/dist-es/progress/LinearProgress/LinearProgress.css.js.map +0 -1
- package/dist-es/progress/LinearProgress/LinearProgress.js +0 -59
- package/dist-es/progress/LinearProgress/LinearProgress.js.map +0 -1
- package/dist-types/dialog/useDialog.d.ts +0 -25
- package/dist-types/drawer/useDrawer.d.ts +0 -25
- package/dist-types/parent-child-item/ParentChildItem.d.ts +0 -31
- package/dist-types/parent-child-item/index.d.ts +0 -1
- package/dist-types/progress/CircularProgress/CircularProgress.d.ts +0 -25
- package/dist-types/progress/Info.d.ts +0 -6
- package/dist-types/progress/LinearProgress/LinearProgress.d.ts +0 -26
- package/dist-types/progress/index.d.ts +0 -2
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import { ReactNode, Ref } from "react";
|
|
2
2
|
import { InputProps } from "@salt-ds/core";
|
|
3
3
|
import { ListControlProps } from "../list-control/ListControlState";
|
|
4
|
-
export interface ComboBoxNextProps extends InputProps, Omit<ListControlProps
|
|
4
|
+
export interface ComboBoxNextProps<Item = string> extends InputProps, Omit<ListControlProps<Item>, "value" | "defaultValue"> {
|
|
5
5
|
/**
|
|
6
6
|
* The options to display in the combo box.
|
|
7
7
|
*/
|
|
8
8
|
children?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* The default value of the input.
|
|
11
|
+
*/
|
|
12
|
+
defaultValue?: string | readonly string[] | number | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* The value of the input. The component will be controlled if this prop is provided.
|
|
15
|
+
*/
|
|
16
|
+
value?: string | readonly string[] | number | undefined;
|
|
9
17
|
}
|
|
10
|
-
export declare const ComboBoxNext:
|
|
18
|
+
export declare const ComboBoxNext: <Item = string>(props: ComboBoxNextProps<Item> & {
|
|
19
|
+
ref?: Ref<HTMLDivElement> | undefined;
|
|
20
|
+
}) => JSX.Element;
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { ListControlProps } from "../list-control/ListControlState";
|
|
2
2
|
import { SyntheticEvent } from "react";
|
|
3
3
|
import { OptionValue } from "../list-control/ListControlContext";
|
|
4
|
-
export declare function useComboBoxNext(props: ListControlProps): {
|
|
5
|
-
select: (event: SyntheticEvent, option: OptionValue) => void;
|
|
4
|
+
export declare function useComboBoxNext<Item>(props: ListControlProps<Item>): {
|
|
5
|
+
select: (event: SyntheticEvent, option: OptionValue<Item>) => void;
|
|
6
6
|
multiselect: boolean;
|
|
7
7
|
openState: boolean;
|
|
8
|
-
setOpen: (
|
|
9
|
-
openKey: import("react").MutableRefObject<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
setActive: (option?: OptionValue | undefined) => void;
|
|
15
|
-
selectedState: string[];
|
|
16
|
-
setSelectedState: import("react").Dispatch<import("react").SetStateAction<string[]>>;
|
|
8
|
+
setOpen: (newOpen: boolean, reason?: import("../list-control/ListControlState").OpenChangeReason | undefined, key?: string | undefined) => void;
|
|
9
|
+
openKey: import("react").MutableRefObject<string | undefined>;
|
|
10
|
+
activeState: OptionValue<Item> | undefined;
|
|
11
|
+
setActive: (option?: OptionValue<Item> | undefined) => void;
|
|
12
|
+
selectedState: Item[];
|
|
13
|
+
setSelectedState: import("react").Dispatch<import("react").SetStateAction<Item[]>>;
|
|
17
14
|
clear: (event: SyntheticEvent<Element, Event>) => void;
|
|
18
15
|
valueState: string | number | readonly string[] | undefined;
|
|
19
16
|
setValueState: import("react").Dispatch<import("react").SetStateAction<string | number | readonly string[] | undefined>>;
|
|
@@ -23,9 +20,9 @@ export declare function useComboBoxNext(props: ListControlProps): {
|
|
|
23
20
|
setFocusedState: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
24
21
|
listRef: import("react").RefObject<HTMLDivElement>;
|
|
25
22
|
options: HTMLElement[];
|
|
26
|
-
register: (optionValue: OptionValue
|
|
27
|
-
getOptionAtIndex: (index: number) => OptionValue
|
|
28
|
-
getIndexOfOption: (option: OptionValue) => number;
|
|
29
|
-
getOptionsMatching: (predicate: (option: OptionValue) => boolean) => OptionValue[];
|
|
30
|
-
getOptionFromSearch: (search: string, startFrom?: OptionValue | undefined) => OptionValue | undefined;
|
|
23
|
+
register: (optionValue: OptionValue<Item>, element: HTMLElement) => () => void;
|
|
24
|
+
getOptionAtIndex: (index: number) => OptionValue<Item>;
|
|
25
|
+
getIndexOfOption: (option: OptionValue<Item>) => number;
|
|
26
|
+
getOptionsMatching: (predicate: (option: OptionValue<Item>) => boolean) => OptionValue<Item>[];
|
|
27
|
+
getOptionFromSearch: (search: string, startFrom?: OptionValue<Item> | undefined) => OptionValue<Item> | undefined;
|
|
31
28
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StatusIndicatorProps as BaseStatusIndicatorProps, SpinnerProps } from "@salt-ds/core";
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
|
-
import { CircularProgressProps } from "
|
|
3
|
+
import { CircularProgressProps } from "@salt-ds/core";
|
|
4
4
|
export interface StatusIndicatorProps extends Pick<SpinnerProps, "disableAnnouncer">, Pick<CircularProgressProps, "value"> {
|
|
5
5
|
title?: string;
|
|
6
6
|
message?: string;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { HTMLAttributes, ComponentProps } from "react";
|
|
1
|
+
import { HTMLAttributes, ComponentProps, ReactNode } from "react";
|
|
2
2
|
import { FloatingFocusManager } from "@floating-ui/react";
|
|
3
3
|
import { ValidationStatus } from "@salt-ds/core";
|
|
4
|
+
interface ConditionalScrimWrapperProps {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
condition: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const ConditionalScrimWrapper: ({ condition, children, }: ConditionalScrimWrapperProps) => JSX.Element;
|
|
4
9
|
export interface DialogProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
10
|
/**
|
|
6
11
|
* Display or hide the component.
|
|
@@ -11,7 +16,7 @@ export interface DialogProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
11
16
|
*/
|
|
12
17
|
onOpenChange?: (open: boolean) => void;
|
|
13
18
|
/**
|
|
14
|
-
*
|
|
19
|
+
* The status of the Dialog
|
|
15
20
|
* */
|
|
16
21
|
status?: ValidationStatus;
|
|
17
22
|
/**
|
|
@@ -19,5 +24,23 @@ export interface DialogProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
19
24
|
* Default value is 0 (first tabbable element).
|
|
20
25
|
* */
|
|
21
26
|
initialFocus?: ComponentProps<typeof FloatingFocusManager>["initialFocus"];
|
|
27
|
+
/**
|
|
28
|
+
* Size of the Dialog
|
|
29
|
+
* */
|
|
30
|
+
size?: "small" | "medium" | "large";
|
|
31
|
+
/**
|
|
32
|
+
* Prevent the dialog closing on click away
|
|
33
|
+
* */
|
|
34
|
+
disableDismiss?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Prevent Scrim from rendering
|
|
37
|
+
* */
|
|
38
|
+
disableScrim?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Optional id prop
|
|
41
|
+
* Used for accessibility purposes to announce the title and subtitle when using a screen reader
|
|
42
|
+
* */
|
|
43
|
+
idProp?: string;
|
|
22
44
|
}
|
|
23
45
|
export declare const Dialog: import("react").ForwardRefExoticComponent<DialogProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
46
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const DialogContext: import("react").Context<{
|
|
2
|
-
dialogId?: string | undefined;
|
|
3
2
|
status?: "error" | "warning" | "success" | "info" | undefined;
|
|
3
|
+
id: string | undefined;
|
|
4
4
|
}>;
|
|
5
5
|
export declare const useDialogContext: () => {
|
|
6
|
-
dialogId?: string | undefined;
|
|
7
6
|
status?: "error" | "warning" | "success" | "info" | undefined;
|
|
7
|
+
id: string | undefined;
|
|
8
8
|
};
|
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef } from "react";
|
|
1
|
+
import { ReactNode, ComponentPropsWithoutRef } from "react";
|
|
2
2
|
import { ValidationStatus } from "@salt-ds/core";
|
|
3
|
-
interface DialogTitleProps extends ComponentPropsWithoutRef<"
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
interface DialogTitleProps extends Omit<ComponentPropsWithoutRef<"div">, "title"> {
|
|
4
|
+
/**
|
|
5
|
+
* The status of the Dialog
|
|
6
|
+
*/
|
|
7
|
+
status?: ValidationStatus | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Displays the accent bar in the Dialog Title */
|
|
10
|
+
disableAccent?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Displays the Dialog Title in a H2 component
|
|
13
|
+
*/
|
|
14
|
+
title: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Displays the Dialog Subtitle in a Label component
|
|
17
|
+
**/
|
|
18
|
+
subtitle?: ReactNode;
|
|
19
|
+
className?: string;
|
|
6
20
|
}
|
|
7
|
-
export declare const DialogTitle: ({
|
|
21
|
+
export declare const DialogTitle: ({ className, title, subtitle, disableAccent, status: statusProp, ...rest }: DialogTitleProps) => JSX.Element;
|
|
8
22
|
export {};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
export declare type DrawerPositions = (typeof DRAWER_POSITIONS)[number];
|
|
4
|
-
export interface DrawerProps extends HTMLAttributes<HTMLDivElement> {
|
|
1
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
export interface DrawerProps extends ComponentPropsWithoutRef<"div"> {
|
|
5
3
|
/**
|
|
6
|
-
* Defines the drawer position within the screen.
|
|
4
|
+
* Defines the drawer position within the screen. Defaults to `left`.
|
|
7
5
|
*/
|
|
8
|
-
position?:
|
|
6
|
+
position?: "left" | "top" | "right" | "bottom";
|
|
9
7
|
/**
|
|
10
8
|
* Display or hide the component.
|
|
11
9
|
*/
|
|
@@ -13,10 +11,18 @@ export interface DrawerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
13
11
|
/**
|
|
14
12
|
* Callback function triggered when open state changes.
|
|
15
13
|
*/
|
|
16
|
-
onOpenChange?: (
|
|
14
|
+
onOpenChange?: (newOpen: boolean) => void;
|
|
17
15
|
/**
|
|
18
16
|
* Change background color palette
|
|
19
17
|
*/
|
|
20
18
|
variant?: "primary" | "secondary";
|
|
19
|
+
/**
|
|
20
|
+
* Prevent the dialog closing on click away
|
|
21
|
+
* */
|
|
22
|
+
disableDismiss?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Prevent Scrim from rendering
|
|
25
|
+
* */
|
|
26
|
+
disableScrim?: boolean;
|
|
21
27
|
}
|
|
22
28
|
export declare const Drawer: import("react").ForwardRefExoticComponent<DrawerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "./Drawer";
|
|
2
|
-
export * from "./
|
|
2
|
+
export * from "./DrawerCloseButton";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode, Ref } from "react";
|
|
2
2
|
import { ListControlProps } from "../list-control/ListControlState";
|
|
3
3
|
import { ValidationStatus } from "@salt-ds/core";
|
|
4
|
-
export interface DropdownNextProps extends Omit<ComponentPropsWithoutRef<"button">, "value" | "defaultValue">, ListControlProps {
|
|
4
|
+
export interface DropdownNextProps<Item = string> extends Omit<ComponentPropsWithoutRef<"button">, "value" | "defaultValue">, ListControlProps<Item> {
|
|
5
5
|
/**
|
|
6
6
|
* If `true`, the dropdown will be disabled.
|
|
7
7
|
*/
|
|
@@ -39,9 +39,19 @@ export interface DropdownNextProps extends Omit<ComponentPropsWithoutRef<"button
|
|
|
39
39
|
* Styling variant. Defaults to "primary".
|
|
40
40
|
*/
|
|
41
41
|
variant?: "primary" | "secondary";
|
|
42
|
+
/**
|
|
43
|
+
* The default content of the dropdown shown in the button.
|
|
44
|
+
*/
|
|
45
|
+
defaultValue?: string | readonly string[] | number | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* The content of the dropdown shown in the button. The component will be controlled if this prop is provided.
|
|
48
|
+
*/
|
|
49
|
+
value?: string | readonly string[] | number | undefined;
|
|
42
50
|
/**
|
|
43
51
|
* Validation status, one of "error" | "warning" | "success".
|
|
44
52
|
*/
|
|
45
53
|
validationStatus?: Exclude<ValidationStatus, "info">;
|
|
46
54
|
}
|
|
47
|
-
export declare const DropdownNext:
|
|
55
|
+
export declare const DropdownNext: <Item = string>(props: DropdownNextProps<Item> & {
|
|
56
|
+
ref?: Ref<HTMLButtonElement> | undefined;
|
|
57
|
+
}) => JSX.Element;
|
package/dist-types/index.d.ts
CHANGED
|
@@ -33,10 +33,8 @@ export * from "./menu-button";
|
|
|
33
33
|
export * from "./metric";
|
|
34
34
|
export * from "./option";
|
|
35
35
|
export * from "./overlay";
|
|
36
|
-
export * from "./parent-child-item";
|
|
37
36
|
export * from "./parent-child-layout";
|
|
38
37
|
export * from "./portal";
|
|
39
|
-
export * from "./progress";
|
|
40
38
|
export * from "./query-input";
|
|
41
39
|
export * from "./responsive";
|
|
42
40
|
export * from "./search-input";
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { SyntheticEvent } from "react";
|
|
2
|
-
export interface OptionValue {
|
|
2
|
+
export interface OptionValue<Item> {
|
|
3
3
|
id: string;
|
|
4
4
|
disabled: boolean;
|
|
5
|
-
value:
|
|
5
|
+
value: Item;
|
|
6
6
|
text: string;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export declare type OpenChangeReason = "input" | "manual";
|
|
9
|
+
export interface ListControlContextValue<Item> {
|
|
9
10
|
openState: boolean;
|
|
10
|
-
setOpen: (
|
|
11
|
-
register: (optionValue: OptionValue
|
|
12
|
-
selectedState:
|
|
13
|
-
select: (event: SyntheticEvent, option: OptionValue) => void;
|
|
14
|
-
activeState?: OptionValue
|
|
15
|
-
setActive: (option: OptionValue) => void;
|
|
11
|
+
setOpen: (newOpen: boolean, openChangeReason?: OpenChangeReason) => void;
|
|
12
|
+
register: (optionValue: OptionValue<Item>, element: HTMLElement) => () => void;
|
|
13
|
+
selectedState: unknown[];
|
|
14
|
+
select: (event: SyntheticEvent, option: OptionValue<Item>) => void;
|
|
15
|
+
activeState?: OptionValue<Item>;
|
|
16
|
+
setActive: (option: OptionValue<Item>) => void;
|
|
16
17
|
multiselect: boolean;
|
|
17
18
|
focusVisibleState: boolean;
|
|
18
19
|
}
|
|
19
|
-
export declare const ListControlContext: import("react").Context<ListControlContextValue
|
|
20
|
-
export declare function useListControlContext(): ListControlContextValue
|
|
20
|
+
export declare const ListControlContext: import("react").Context<ListControlContextValue<any>>;
|
|
21
|
+
export declare function useListControlContext<Item>(): ListControlContextValue<Item>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { SyntheticEvent } from "react";
|
|
2
2
|
import { OptionValue } from "./ListControlContext";
|
|
3
|
-
export
|
|
3
|
+
export declare type OpenChangeReason = "input" | "manual";
|
|
4
|
+
export interface ListControlProps<Item> {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
readOnly?: boolean;
|
|
4
7
|
/**
|
|
5
8
|
* If true, the list will be open by default.
|
|
6
9
|
*/
|
|
@@ -12,19 +15,19 @@ export interface ListControlProps {
|
|
|
12
15
|
/**
|
|
13
16
|
* Callback fired when the open state changes.
|
|
14
17
|
*/
|
|
15
|
-
onOpenChange?: (
|
|
18
|
+
onOpenChange?: (newOpen: boolean, reason?: OpenChangeReason) => void;
|
|
16
19
|
/**
|
|
17
20
|
* The default selected options. If this is provided `defaultValue` should be provided as well.
|
|
18
21
|
*/
|
|
19
|
-
defaultSelected?:
|
|
22
|
+
defaultSelected?: Item[];
|
|
20
23
|
/**
|
|
21
24
|
* The selected options. The component will be controlled if this prop is provided.
|
|
22
25
|
*/
|
|
23
|
-
selected?:
|
|
26
|
+
selected?: Item[];
|
|
24
27
|
/**
|
|
25
28
|
* Callback fired when the selected options change.
|
|
26
29
|
*/
|
|
27
|
-
onSelectionChange?: (event: SyntheticEvent, newSelected:
|
|
30
|
+
onSelectionChange?: (event: SyntheticEvent, newSelected: Item[]) => void;
|
|
28
31
|
/**
|
|
29
32
|
* The default value.
|
|
30
33
|
*/
|
|
@@ -38,19 +41,16 @@ export interface ListControlProps {
|
|
|
38
41
|
*/
|
|
39
42
|
multiselect?: boolean;
|
|
40
43
|
}
|
|
41
|
-
export declare function useListControl(props: ListControlProps): {
|
|
44
|
+
export declare function useListControl<Item>(props: ListControlProps<Item>): {
|
|
42
45
|
multiselect: boolean;
|
|
43
46
|
openState: boolean;
|
|
44
|
-
setOpen: (
|
|
45
|
-
openKey: import("react").MutableRefObject<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
selectedState: string[];
|
|
52
|
-
setSelectedState: import("react").Dispatch<import("react").SetStateAction<string[]>>;
|
|
53
|
-
select: (event: SyntheticEvent, option: OptionValue) => void;
|
|
47
|
+
setOpen: (newOpen: boolean, reason?: OpenChangeReason | undefined, key?: string | undefined) => void;
|
|
48
|
+
openKey: import("react").MutableRefObject<string | undefined>;
|
|
49
|
+
activeState: OptionValue<Item> | undefined;
|
|
50
|
+
setActive: (option?: OptionValue<Item> | undefined) => void;
|
|
51
|
+
selectedState: Item[];
|
|
52
|
+
setSelectedState: import("react").Dispatch<import("react").SetStateAction<Item[]>>;
|
|
53
|
+
select: (event: SyntheticEvent, option: OptionValue<Item>) => void;
|
|
54
54
|
clear: (event: SyntheticEvent) => void;
|
|
55
55
|
valueState: string | number | readonly string[] | undefined;
|
|
56
56
|
setValueState: import("react").Dispatch<import("react").SetStateAction<string | number | readonly string[] | undefined>>;
|
|
@@ -60,9 +60,9 @@ export declare function useListControl(props: ListControlProps): {
|
|
|
60
60
|
setFocusedState: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
61
61
|
listRef: import("react").RefObject<HTMLDivElement>;
|
|
62
62
|
options: HTMLElement[];
|
|
63
|
-
register: (optionValue: OptionValue
|
|
64
|
-
getOptionAtIndex: (index: number) => OptionValue
|
|
65
|
-
getIndexOfOption: (option: OptionValue) => number;
|
|
66
|
-
getOptionsMatching: (predicate: (option: OptionValue) => boolean) => OptionValue[];
|
|
67
|
-
getOptionFromSearch: (search: string, startFrom?: OptionValue | undefined) => OptionValue | undefined;
|
|
63
|
+
register: (optionValue: OptionValue<Item>, element: HTMLElement) => () => void;
|
|
64
|
+
getOptionAtIndex: (index: number) => OptionValue<Item>;
|
|
65
|
+
getIndexOfOption: (option: OptionValue<Item>) => number;
|
|
66
|
+
getOptionsMatching: (predicate: (option: OptionValue<Item>) => boolean) => OptionValue<Item>[];
|
|
67
|
+
getOptionFromSearch: (search: string, startFrom?: OptionValue<Item> | undefined) => OptionValue<Item> | undefined;
|
|
68
68
|
};
|
|
@@ -1,28 +1,23 @@
|
|
|
1
1
|
import { Breakpoints, FlexLayoutProps } from "@salt-ds/core";
|
|
2
|
-
import {
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
3
|
export declare type StackedViewElement = "parent" | "child";
|
|
4
|
-
|
|
5
|
-
export interface ParentChildLayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
export interface ParentChildLayoutProps extends FlexLayoutProps<"div"> {
|
|
6
5
|
/**
|
|
7
6
|
* Breakpoint at which the parent and child will stack.
|
|
8
7
|
*/
|
|
9
|
-
|
|
8
|
+
collapseAtBreakpoint?: keyof Breakpoints;
|
|
10
9
|
/**
|
|
11
10
|
* Change element that is displayed when in staked view.
|
|
12
11
|
*/
|
|
13
|
-
|
|
12
|
+
collapsedViewElement?: StackedViewElement;
|
|
14
13
|
/**
|
|
15
14
|
* Disable all animations.
|
|
16
15
|
*/
|
|
17
16
|
disableAnimations?: boolean;
|
|
18
17
|
/**
|
|
19
|
-
*
|
|
18
|
+
* Position of the parent component within the layout.
|
|
20
19
|
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Controls the space between columns.
|
|
24
|
-
*/
|
|
25
|
-
gap?: FlexLayoutProps<ElementType>["gap"];
|
|
20
|
+
parentPosition?: "left" | "right";
|
|
26
21
|
/**
|
|
27
22
|
* Parent component to be rendered
|
|
28
23
|
*/
|
|
@@ -31,6 +26,6 @@ export interface ParentChildLayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
31
26
|
* Child component to be rendered
|
|
32
27
|
*/
|
|
33
28
|
child: ReactNode;
|
|
29
|
+
onCollapseChange?: (isCollapsed: boolean) => void;
|
|
34
30
|
}
|
|
35
|
-
export declare const ParentChildLayout: import("react").ForwardRefExoticComponent<ParentChildLayoutProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
36
|
-
export {};
|
|
31
|
+
export declare const ParentChildLayout: import("react").ForwardRefExoticComponent<Omit<ParentChildLayoutProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salt-ds/lab",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.32",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"react-window": "^1.8.6",
|
|
27
27
|
"rifm": "^0.12.0",
|
|
28
28
|
"tinycolor2": "^1.4.2",
|
|
29
|
-
"@salt-ds/core": "^1.
|
|
29
|
+
"@salt-ds/core": "^1.18.0",
|
|
30
30
|
"@salt-ds/window": "^0.1.1",
|
|
31
31
|
"@salt-ds/styles": "^0.2.1",
|
|
32
32
|
"@salt-ds/icons": "^1.9.1"
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var react = require('@floating-ui/react');
|
|
6
|
-
var core = require('@salt-ds/core');
|
|
7
|
-
|
|
8
|
-
function useDialog(props) {
|
|
9
|
-
const { open, onOpenChange } = props;
|
|
10
|
-
const { context, floating } = core.useFloatingUI({
|
|
11
|
-
open,
|
|
12
|
-
onOpenChange
|
|
13
|
-
});
|
|
14
|
-
const click = react.useClick(context);
|
|
15
|
-
const role = react.useRole(context);
|
|
16
|
-
const dismiss = react.useDismiss(context);
|
|
17
|
-
const { getFloatingProps, getReferenceProps } = react.useInteractions([
|
|
18
|
-
role,
|
|
19
|
-
dismiss,
|
|
20
|
-
click
|
|
21
|
-
]);
|
|
22
|
-
return {
|
|
23
|
-
getFloatingProps,
|
|
24
|
-
getReferenceProps,
|
|
25
|
-
floating,
|
|
26
|
-
context
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
exports.useDialog = useDialog;
|
|
31
|
-
//# sourceMappingURL=useDialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDialog.js","sources":["../src/dialog/useDialog.ts"],"sourcesContent":["import {\n useClick,\n useDismiss,\n useInteractions,\n useRole,\n} from \"@floating-ui/react\";\nimport { useFloatingUI, UseFloatingUIProps } from \"@salt-ds/core\";\n\nexport type UseDialogProps = Partial<\n Pick<UseFloatingUIProps, \"onOpenChange\" | \"open\">\n>;\n\nexport function useDialog(props: UseDialogProps) {\n const { open, onOpenChange } = props;\n\n const { context, floating } = useFloatingUI({\n open,\n onOpenChange,\n });\n\n const click = useClick(context);\n const role = useRole(context);\n const dismiss = useDismiss(context);\n\n const { getFloatingProps, getReferenceProps } = useInteractions([\n role,\n dismiss,\n click,\n ]);\n\n return {\n getFloatingProps,\n getReferenceProps,\n floating,\n context,\n };\n}\n"],"names":["useFloatingUI","useClick","useRole","useDismiss","useInteractions"],"mappings":";;;;;;;AAYO,SAAS,UAAU,KAAuB,EAAA;AAC/C,EAAM,MAAA,EAAE,IAAM,EAAA,YAAA,EAAiB,GAAA,KAAA,CAAA;AAE/B,EAAA,MAAM,EAAE,OAAA,EAAS,QAAS,EAAA,GAAIA,kBAAc,CAAA;AAAA,IAC1C,IAAA;AAAA,IACA,YAAA;AAAA,GACD,CAAA,CAAA;AAED,EAAM,MAAA,KAAA,GAAQC,eAAS,OAAO,CAAA,CAAA;AAC9B,EAAM,MAAA,IAAA,GAAOC,cAAQ,OAAO,CAAA,CAAA;AAC5B,EAAM,MAAA,OAAA,GAAUC,iBAAW,OAAO,CAAA,CAAA;AAElC,EAAA,MAAM,EAAE,gBAAA,EAAkB,iBAAkB,EAAA,GAAIC,qBAAgB,CAAA;AAAA,IAC9D,IAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,GACD,CAAA,CAAA;AAED,EAAO,OAAA;AAAA,IACL,gBAAA;AAAA,IACA,iBAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var react = require('@floating-ui/react');
|
|
6
|
-
var core = require('@salt-ds/core');
|
|
7
|
-
|
|
8
|
-
function useDrawer(props) {
|
|
9
|
-
const { open, onOpenChange } = props;
|
|
10
|
-
const { context, floating } = core.useFloatingUI({
|
|
11
|
-
open,
|
|
12
|
-
onOpenChange
|
|
13
|
-
});
|
|
14
|
-
const click = react.useClick(context);
|
|
15
|
-
const role = react.useRole(context);
|
|
16
|
-
const dismiss = react.useDismiss(context);
|
|
17
|
-
const { getFloatingProps, getReferenceProps } = react.useInteractions([
|
|
18
|
-
role,
|
|
19
|
-
dismiss,
|
|
20
|
-
click
|
|
21
|
-
]);
|
|
22
|
-
return {
|
|
23
|
-
getFloatingProps,
|
|
24
|
-
getReferenceProps,
|
|
25
|
-
floating,
|
|
26
|
-
context
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
exports.useDrawer = useDrawer;
|
|
31
|
-
//# sourceMappingURL=useDrawer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDrawer.js","sources":["../src/drawer/useDrawer.ts"],"sourcesContent":["import {\n useClick,\n useDismiss,\n useInteractions,\n useRole,\n} from \"@floating-ui/react\";\nimport { useFloatingUI, UseFloatingUIProps } from \"@salt-ds/core\";\n\nexport type UseDrawerProps = Partial<\n Pick<UseFloatingUIProps, \"onOpenChange\" | \"open\">\n>;\n\nexport function useDrawer(props: UseDrawerProps) {\n const { open, onOpenChange } = props;\n\n const { context, floating } = useFloatingUI({\n open,\n onOpenChange,\n });\n\n const click = useClick(context);\n const role = useRole(context);\n const dismiss = useDismiss(context);\n\n const { getFloatingProps, getReferenceProps } = useInteractions([\n role,\n dismiss,\n click,\n ]);\n\n return {\n getFloatingProps,\n getReferenceProps,\n floating,\n context,\n };\n}\n"],"names":["useFloatingUI","useClick","useRole","useDismiss","useInteractions"],"mappings":";;;;;;;AAYO,SAAS,UAAU,KAAuB,EAAA;AAC/C,EAAM,MAAA,EAAE,IAAM,EAAA,YAAA,EAAiB,GAAA,KAAA,CAAA;AAE/B,EAAA,MAAM,EAAE,OAAA,EAAS,QAAS,EAAA,GAAIA,kBAAc,CAAA;AAAA,IAC1C,IAAA;AAAA,IACA,YAAA;AAAA,GACD,CAAA,CAAA;AAED,EAAM,MAAA,KAAA,GAAQC,eAAS,OAAO,CAAA,CAAA;AAC9B,EAAM,MAAA,IAAA,GAAOC,cAAQ,OAAO,CAAA,CAAA;AAC5B,EAAM,MAAA,OAAA,GAAUC,iBAAW,OAAO,CAAA,CAAA;AAElC,EAAA,MAAM,EAAE,gBAAA,EAAkB,iBAAkB,EAAA,GAAIC,qBAAgB,CAAA;AAAA,IAC9D,IAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,GACD,CAAA,CAAA;AAED,EAAO,OAAA;AAAA,IACL,gBAAA;AAAA,IACA,iBAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".saltParentChildItem-slide-top {\n animation: var(--salt-animation-slide-in-top);\n}\n.saltParentChildItem-slide-bottom {\n animation: var(--salt-animation-slide-in-bottom);\n}\n.saltParentChildItem-slide-left {\n animation: var(--salt-animation-slide-in-left);\n}\n.saltParentChildItem-slide-right {\n animation: var(--salt-animation-slide-in-right);\n}\n";
|
|
4
|
-
|
|
5
|
-
module.exports = css_248z;
|
|
6
|
-
//# sourceMappingURL=ParentChildItem.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ParentChildItem.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var clsx = require('clsx');
|
|
8
|
-
var core = require('@salt-ds/core');
|
|
9
|
-
var window = require('@salt-ds/window');
|
|
10
|
-
var styles = require('@salt-ds/styles');
|
|
11
|
-
var ParentChildItem$1 = require('./ParentChildItem.css.js');
|
|
12
|
-
|
|
13
|
-
const withBaseName = core.makePrefixer("saltParentChildItem");
|
|
14
|
-
const ParentChildItem = React.forwardRef(
|
|
15
|
-
function ParentChildItem2({
|
|
16
|
-
disableAnimations = false,
|
|
17
|
-
direction,
|
|
18
|
-
isStacked,
|
|
19
|
-
children,
|
|
20
|
-
className,
|
|
21
|
-
...rest
|
|
22
|
-
}, ref) {
|
|
23
|
-
const targetWindow = window.useWindow();
|
|
24
|
-
styles.useComponentCssInjection({
|
|
25
|
-
testId: "salt-parent-child-item",
|
|
26
|
-
css: ParentChildItem$1,
|
|
27
|
-
window: targetWindow
|
|
28
|
-
});
|
|
29
|
-
return /* @__PURE__ */ jsxRuntime.jsx(core.FlexItem, {
|
|
30
|
-
className: clsx.clsx(
|
|
31
|
-
withBaseName(),
|
|
32
|
-
{
|
|
33
|
-
...direction && {
|
|
34
|
-
[withBaseName(`slide-${direction}`)]: !disableAnimations
|
|
35
|
-
},
|
|
36
|
-
"saltFlexItem-stacked": isStacked
|
|
37
|
-
},
|
|
38
|
-
className
|
|
39
|
-
),
|
|
40
|
-
ref,
|
|
41
|
-
...rest,
|
|
42
|
-
children
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
exports.ParentChildItem = ParentChildItem;
|
|
48
|
-
//# sourceMappingURL=ParentChildItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ParentChildItem.js","sources":["../src/parent-child-item/ParentChildItem.tsx"],"sourcesContent":["import { forwardRef, HTMLAttributes } from \"react\";\nimport { clsx } from \"clsx\";\nimport {\n FlexItem,\n flexItemAlignment,\n makePrefixer,\n ResponsiveProp,\n} from \"@salt-ds/core\";\n\nimport { useWindow } from \"@salt-ds/window\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\n\nimport parentChildItemCss from \"./ParentChildItem.css\";\n\nexport type SlideDirection = \"top\" | \"bottom\" | \"left\" | \"right\";\n\nexport interface ParentChildItemProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Allows the alignment specified by parent to be overridden for individual items, default is \"start\".\n */\n align?: flexItemAlignment;\n /**\n * Disable all animations.\n */\n disableAnimations?: boolean;\n /**\n * Direction for slide animations.\n */\n direction?: SlideDirection;\n /**\n * Defines the ability for an item to grow x times more compared to it's siblings, default is 0.\n */\n grow?: ResponsiveProp<number>;\n /**\n * Determines whether the component is stacked\n */\n isStacked?: boolean;\n /**\n * Defines the ability for an item to shrink x times more compared to it's siblings, default is 1.\n\n */\n shrink?: ResponsiveProp<number>;\n}\n\nconst withBaseName = makePrefixer(\"saltParentChildItem\");\nexport const ParentChildItem = forwardRef<HTMLDivElement, ParentChildItemProps>(\n function ParentChildItem(\n {\n disableAnimations = false,\n direction,\n isStacked,\n children,\n className,\n ...rest\n },\n ref\n ) {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-parent-child-item\",\n css: parentChildItemCss,\n window: targetWindow,\n });\n\n return (\n <FlexItem\n className={clsx(\n withBaseName(),\n {\n ...(direction && {\n [withBaseName(`slide-${direction}`)]: !disableAnimations,\n }),\n \"saltFlexItem-stacked\": isStacked,\n },\n className\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </FlexItem>\n );\n }\n);\n"],"names":["makePrefixer","forwardRef","ParentChildItem","useWindow","useComponentCssInjection","parentChildItemCss","jsx","FlexItem","clsx"],"mappings":";;;;;;;;;;;;AA4CA,MAAM,YAAA,GAAeA,kBAAa,qBAAqB,CAAA,CAAA;AAChD,MAAM,eAAkB,GAAAC,gBAAA;AAAA,EAC7B,SAASC,gBACP,CAAA;AAAA,IACE,iBAAoB,GAAA,KAAA;AAAA,IACpB,SAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACG,GAAA,IAAA;AAAA,KAEL,GACA,EAAA;AACA,IAAA,MAAM,eAAeC,gBAAU,EAAA,CAAA;AAC/B,IAAyBC,+BAAA,CAAA;AAAA,MACvB,MAAQ,EAAA,wBAAA;AAAA,MACR,GAAK,EAAAC,iBAAA;AAAA,MACL,MAAQ,EAAA,YAAA;AAAA,KACT,CAAA,CAAA;AAED,IAAA,uBACGC,cAAA,CAAAC,aAAA,EAAA;AAAA,MACC,SAAW,EAAAC,SAAA;AAAA,QACT,YAAa,EAAA;AAAA,QACb;AAAA,UACE,GAAI,SAAa,IAAA;AAAA,YACf,CAAC,YAAA,CAAa,CAAS,MAAA,EAAA,SAAA,CAAA,CAAW,IAAI,CAAC,iBAAA;AAAA,WACzC;AAAA,UACA,sBAAwB,EAAA,SAAA;AAAA,SAC1B;AAAA,QACA,SAAA;AAAA,OACF;AAAA,MACA,GAAA;AAAA,MACC,GAAG,IAAA;AAAA,MAEH,QAAA;AAAA,KACH,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".saltCircularProgress {\n color: var(--salt-content-primary-foreground);\n display: inline-flex;\n position: relative;\n}\n\n.saltCircularProgress-progressValue {\n align-items: center;\n color: var(--salt-content-primary-foreground);\n display: flex;\n font-family: var(--salt-text-fontFamily);\n font-size: var(--salt-text-label-fontSize);\n font-weight: var(--salt-text-label-fontWeight-strong);\n height: 100%;\n justify-content: center;\n left: 0;\n position: absolute;\n width: 100%;\n}\n\n.saltCircularProgress-track {\n inline-size: calc(var(--salt-size-base) * 3);\n block-size: calc(var(--salt-size-base) * 3);\n border-style: var(--salt-track-borderStyle);\n border-width: var(--salt-size-bar-small);\n border-radius: calc(var(--salt-size-base) * 3);\n border-color: var(--salt-palette-neutral-secondary-border);\n}\n\n.saltCircularProgress-bar {\n inline-size: calc(var(--salt-size-base) * 3);\n block-size: calc(var(--salt-size-base) * 3);\n border-style: var(--salt-track-borderStyle);\n border-width: var(--salt-size-bar-strong);\n border-radius: calc(var(--salt-size-base) * 3);\n border-color: var(--salt-accent-background);\n}\n\n.saltCircularProgress-bars {\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 0;\n inline-size: 100%;\n block-size: 100%;\n}\n\n.saltCircularProgress-barOverlayRight,\n.saltCircularProgress-barOverlayLeft {\n inline-size: 50%;\n block-size: 100%;\n transform-origin: 100% center;\n transform: rotate(180deg);\n overflow: hidden;\n position: absolute;\n}\n\n.saltCircularProgress-barSubOverlayRight,\n.saltCircularProgress-barSubOverlayLeft {\n inline-size: 100%;\n block-size: 100%;\n transform-origin: 100% center;\n overflow: hidden;\n transform: rotate(-180deg);\n}\n\n.saltCircularProgress-barOverlayLeft {\n transform: rotate(0deg);\n}\n";
|
|
4
|
-
|
|
5
|
-
module.exports = css_248z;
|
|
6
|
-
//# sourceMappingURL=CircularProgress.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CircularProgress.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|