@spscommerce/ds-react 6.37.3 → 7.0.1
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/lib/advanced-search/SpsAdvancedSearch.d.ts +8 -20
- package/lib/autocomplete/SpsAutocomplete.d.ts +19 -25
- package/lib/button/SpsButton.d.ts +13 -17
- package/lib/button/SpsButtonGroup.d.ts +3 -9
- package/lib/button/SpsIconButtonPanel.d.ts +3 -9
- package/lib/card/SpsCard.d.ts +9 -14
- package/lib/card/SpsCardHeader.d.ts +8 -13
- package/lib/card/SpsCardTabbedPane.d.ts +14 -18
- package/lib/card/index.d.ts +0 -1
- package/lib/checkbox/SpsCheckbox.d.ts +12 -17
- package/lib/checkbox-dropdown/SpsCheckboxDropdown.d.ts +6 -14
- package/lib/clickable-tag/SpsClickableTag.d.ts +9 -14
- package/lib/column-chooser/SpsColumnChooser.d.ts +8 -13
- package/lib/column-chooser/SpsColumnChooserColumn.d.ts +12 -16
- package/lib/conditional-field/SpsConditionalField.d.ts +6 -11
- package/lib/content-row/SpsContentRow.d.ts +14 -20
- package/lib/content-row/SpsContentRowCol.d.ts +9 -14
- package/lib/content-row/SpsContentRowExpansion.d.ts +3 -9
- package/lib/currency-input/SpsCurrencyInput.d.ts +9 -15
- package/lib/dateRangePicker/SpsDateRangePicker.d.ts +10 -16
- package/lib/datepicker/SpsDatepicker.d.ts +10 -15
- package/lib/datepicker/SpsDatepickerCalendar.d.ts +8 -15
- package/lib/datepicker/SpsDatepickerPopup.d.ts +10 -12
- package/lib/datepicker/useMoment.d.ts +1 -1
- package/lib/datepicker/utils.d.ts +7 -7
- package/lib/datetime/SpsDateTime.d.ts +10 -16
- package/lib/description-list/SpsDescriptionList.d.ts +8 -13
- package/lib/description-list/SpsDescriptionListDefinition.d.ts +4 -10
- package/lib/description-list/SpsDescriptionListTerm.d.ts +10 -15
- package/lib/dropdown/SpsDropdown.d.ts +20 -25
- package/lib/feedback-block/SpsFeedbackBlock.d.ts +5 -10
- package/lib/fieldset/SpsFieldset.d.ts +13 -18
- package/lib/filter-panel/SpsFilterPanel.d.ts +3 -9
- package/lib/filter-panel/SpsFilterPanelCap.d.ts +5 -10
- package/lib/filter-panel/SpsFilterPanelFilterBox.d.ts +7 -13
- package/lib/filter-panel/SpsFilterPanelSection.d.ts +10 -15
- package/lib/filter-tile-list/SpsFilterTile.d.ts +8 -13
- package/lib/filter-tile-list/SpsFilterTileList.d.ts +3 -9
- package/lib/focused-task/SpsFocusedTask.d.ts +7 -12
- package/lib/focused-task/SpsFocusedTaskActions.d.ts +3 -9
- package/lib/form/SpsForm.d.ts +6 -12
- package/lib/form/SpsFormComponentWrapper.d.ts +7 -12
- package/lib/form/hooks/useFormControlId.d.ts +2 -2
- package/lib/form/hooks/useServerSideValidation.d.ts +1 -1
- package/lib/form/hooks/useSpsForm.d.ts +9 -9
- package/lib/growler/SpsGrowler.d.ts +8 -14
- package/lib/growler/useGrowlers.d.ts +2 -2
- package/lib/icon/SpsIcon.d.ts +8 -12
- package/lib/incrementor/SpsIncrementor.d.ts +9 -14
- package/lib/index.cjs.js +1075 -1600
- package/lib/index.es.js +22208 -28833
- package/lib/input-group/SpsInputGroup.d.ts +8 -13
- package/lib/insight-tile/SpsInsightTile.d.ts +12 -17
- package/lib/insight-tile/SpsInsights.d.ts +3 -9
- package/lib/key-value-list/SpsKeyValueList.d.ts +5 -10
- package/lib/key-value-list/SpsKeyValueListItem.d.ts +6 -11
- package/lib/key-value-list/index.d.ts +0 -1
- package/lib/key-value-tag/SpsKeyValueTag.d.ts +9 -14
- package/lib/label/SpsLabel.d.ts +11 -16
- package/lib/list-action-bar/SpsListActionBar.d.ts +7 -12
- package/lib/list-toolbar/SpsListToolbar.d.ts +20 -25
- package/lib/list-toolbar/SpsListToolbarSearch.d.ts +4 -10
- package/lib/list-toolbar/SpsListToolbarSearchInfo.d.ts +3 -9
- package/lib/list-toolbar/SpsListToolbarSortBy.d.ts +8 -13
- package/lib/micro-block/SpsMicroBlock.d.ts +6 -11
- package/lib/modal/SpsModal.d.ts +9 -15
- package/lib/multi-select/SpsMultiSelect.d.ts +27 -34
- package/lib/multi-value-text-input/SpsMultiValueTextInput.d.ts +13 -19
- package/lib/option-list/SpsOptionListProps.d.ts +46 -69
- package/lib/option-list/useOptionListSearch.d.ts +1 -1
- package/lib/option-list-v2/SpsOptionListV2.d.ts +0 -0
- package/lib/option-list-v2/index.d.ts +0 -0
- package/lib/page-title/SpsPageSubtitle.d.ts +3 -9
- package/lib/page-title/SpsPageTitle.d.ts +3 -9
- package/lib/pagination/SpsPageSelector.d.ts +10 -15
- package/lib/pagination/SpsPagination.d.ts +13 -18
- package/lib/product-bar/SpsProductBar.d.ts +11 -17
- package/lib/progress-bar/SpsProgressBar.d.ts +9 -14
- package/lib/progress-ring/SpsProgressRing.d.ts +6 -11
- package/lib/prop-types.d.ts +4 -23
- package/lib/radio-button/SpsRadioButton.d.ts +14 -20
- package/lib/scrollable-container/SpsScrollableContainer.d.ts +5 -10
- package/lib/scrollable-container/index.d.ts +0 -1
- package/lib/search-results-bar/SpsSearchResultsBar.d.ts +7 -12
- package/lib/search-results-bar/SpsSearchResultsBarV2.d.ts +8 -13
- package/lib/select/SpsSelect.d.ts +57 -34
- package/lib/slack-link/SpsSlackLink.d.ts +5 -10
- package/lib/slide-in-panel/SpsSlideInPanel.d.ts +8 -14
- package/lib/sorting-header/SpsSortingHeader.d.ts +6 -11
- package/lib/sorting-header/SpsSortingHeaderCell.d.ts +10 -15
- package/lib/spinner/SpsSpinner.d.ts +7 -12
- package/lib/spinner/index.d.ts +0 -1
- package/lib/split-button/SpsSplitButton.d.ts +13 -17
- package/lib/stepped-progress-bar/SpsSteppedProgressBar.d.ts +11 -12
- package/lib/summary-list/SpsSummaryListColumn.d.ts +8 -13
- package/lib/summary-list/SpsSummaryListExpansion.d.ts +3 -9
- package/lib/summary-list/SpsSummaryListRow.d.ts +7 -12
- package/lib/table/SpsTable.d.ts +12 -17
- package/lib/table/SpsTableBody.d.ts +3 -9
- package/lib/table/SpsTableCell.d.ts +8 -13
- package/lib/table/SpsTableHead.d.ts +5 -10
- package/lib/table/SpsTableHeader.d.ts +8 -13
- package/lib/table/SpsTableRow.d.ts +3 -9
- package/lib/table/useColumnResizer.d.ts +2 -2
- package/lib/table/usePinnedStyles.d.ts +4 -4
- package/lib/tabs/SpsTabs.d.ts +7 -12
- package/lib/tag/SpsTag.d.ts +8 -12
- package/lib/task-queue/SpsTaskQueue.d.ts +14 -20
- package/lib/text-input/SpsTextInput.d.ts +26 -20
- package/lib/textarea/SpsTextarea.d.ts +13 -19
- package/lib/tile-list/SpsTile.d.ts +13 -18
- package/lib/tile-list/SpsTileList.d.ts +3 -9
- package/lib/toggle/SpsToggle.d.ts +13 -19
- package/lib/tooltip/SpsTooltip.d.ts +13 -19
- package/lib/tooltip/SpsTooltipTitle.d.ts +8 -12
- package/lib/utils/contentOf.d.ts +2 -2
- package/lib/utils/useCheckDeprecatedProps.d.ts +1 -2
- package/lib/utils/useElementId.d.ts +3 -2
- package/lib/utils/useInputPopup.d.ts +1 -1
- package/lib/utils/usePortal.d.ts +3 -3
- package/lib/vertical-rule/SpsVerticalRule.d.ts +3 -9
- package/lib/wizard/SpsWizardSidebar.d.ts +5 -10
- package/lib/wizard/SpsWizardSubstep.d.ts +7 -12
- package/lib/workflow/SpsWorkflow.d.ts +7 -12
- package/lib/workflow/SpsWorkflowDocument.d.ts +3 -9
- package/lib/workflow/SpsWorkflowDocumentStatus.d.ts +6 -11
- package/lib/workflow/SpsWorkflowStep.d.ts +7 -12
- package/lib/zero-state/SpsMicroZeroState.d.ts +9 -14
- package/lib/zero-state/SpsZeroState.d.ts +8 -13
- package/package.json +35 -22
- package/vite.config.js +6 -6
- package/lib/_template/SpsComponent.d.ts +0 -15
- package/lib/_template/SpsComponent.examples.d.ts +0 -2
- package/lib/_template/index.d.ts +0 -2
- package/lib/card/SpsCard.examples.d.ts +0 -2
- package/lib/insight-tile/SpsInsightTile.examples.d.ts +0 -2
- package/lib/key-value-list/SpsKeyValueList.examples.d.ts +0 -2
- package/lib/scrollable-container/SpsScrollableContainer.examples.d.ts +0 -14
- package/lib/spinner/SpsSpinner.examples.d.ts +0 -2
- package/lib/test-util.d.ts +0 -2
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
2
3
|
import type { SpsFormArray } from "../form/hooks/formArray";
|
|
3
4
|
import type { SpsFormGroup } from "../form/hooks/formGroup";
|
|
4
5
|
import type { SpsFormSetMeta } from "../form/hooks/useSpsForm";
|
|
5
|
-
declare
|
|
6
|
-
formArray
|
|
7
|
-
formGroup
|
|
8
|
-
formMeta
|
|
9
|
-
stacked
|
|
10
|
-
|
|
11
|
-
className: PropTypes.Requireable<string>;
|
|
12
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
13
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
14
|
-
};
|
|
15
|
-
export declare type SpsInputGroupProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
6
|
+
export declare type SpsInputGroupProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
7
|
+
formArray?: SpsFormArray<any>;
|
|
8
|
+
formGroup?: SpsFormGroup;
|
|
9
|
+
formMeta?: SpsFormSetMeta<any>;
|
|
10
|
+
stacked?: boolean;
|
|
11
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
16
12
|
export declare function SpsInputGroup({ children, className, formArray, formGroup, formMeta, stacked, "data-testid": testId, unsafelyReplaceClassName, ...rest }: SpsInputGroupProps): JSX.Element;
|
|
17
|
-
export {};
|
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import { SpsInsightTileKind, SpsIcon } from "@spscommerce/ds-shared";
|
|
2
|
-
import * as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
14
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
15
|
-
};
|
|
16
|
-
export declare type SpsInsightTileProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
1
|
+
import type { SpsInsightTileKind, SpsIcon } from "@spscommerce/ds-shared";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
|
+
export declare type SpsInsightTileProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
|
+
horizontal?: boolean;
|
|
6
|
+
icon?: SpsIcon;
|
|
7
|
+
kind?: SpsInsightTileKind;
|
|
8
|
+
title?: string;
|
|
9
|
+
metric?: number | string;
|
|
10
|
+
partnerCount?: number;
|
|
11
|
+
totalPartners?: number;
|
|
12
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
17
13
|
export declare function SpsInsightTile(props: SpsInsightTileProps): JSX.Element;
|
|
18
|
-
export {};
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
className: PropTypes.Requireable<string>;
|
|
5
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
6
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
7
|
-
};
|
|
8
|
-
export declare type SpsInsightsProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
+
export declare type SpsInsightsProps = React.PropsWithChildren<SpsGlobalPropTypes> & React.HTMLAttributes<HTMLDivElement>;
|
|
9
4
|
export declare function SpsInsights(props: SpsInsightsProps): JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
7
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
8
|
-
};
|
|
9
|
-
export declare type SpsKeyValueListProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
+
export declare type SpsKeyValueListProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
4
|
+
inline?: boolean;
|
|
5
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
10
6
|
export declare function SpsKeyValueList(props: SpsKeyValueListProps): JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { KeyValueListTitleColor } from "@spscommerce/ds-shared";
|
|
2
|
-
import
|
|
3
|
-
declare
|
|
4
|
-
itemKey:
|
|
5
|
-
titleColor
|
|
6
|
-
|
|
7
|
-
className: PropTypes.Requireable<string>;
|
|
8
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
9
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
10
|
-
};
|
|
11
|
-
export declare type SpsKeyValueListItemProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
3
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
|
+
export declare type SpsKeyValueListItemProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
|
+
itemKey: string | React.ReactNode | (() => React.ReactNode);
|
|
6
|
+
titleColor?: KeyValueListTitleColor;
|
|
7
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
12
8
|
export declare function SpsKeyValueListItem(props: SpsKeyValueListItemProps): JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import { SpsIcon, TagKind } from "@spscommerce/ds-shared";
|
|
2
|
-
import * as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
12
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
13
|
-
};
|
|
14
|
-
export declare type SpsKeyValueTagProps = PropTypes.InferTS<typeof propTypes, HTMLSpanElement>;
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
|
+
export declare type SpsKeyValueTagProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
|
+
color?: TagKind;
|
|
6
|
+
href?: string;
|
|
7
|
+
icon?: SpsIcon;
|
|
8
|
+
tagKey: string;
|
|
9
|
+
value: string;
|
|
10
|
+
}> & React.HTMLAttributes<HTMLSpanElement>;
|
|
15
11
|
export declare function SpsKeyValueTag(props: SpsKeyValueTagProps): JSX.Element;
|
|
16
|
-
export {};
|
package/lib/label/SpsLabel.d.ts
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
import { SpsIcon } from "@spscommerce/ds-shared";
|
|
2
|
-
import * as
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
4
|
import type { SpsFormControl } from "../form/hooks/formControl";
|
|
4
5
|
import { SpsFormMetaBase } from "../form/hooks/useSpsForm";
|
|
5
|
-
declare
|
|
6
|
-
description
|
|
7
|
-
for:
|
|
8
|
-
stronglySuggested
|
|
9
|
-
help
|
|
10
|
-
helpIcon
|
|
11
|
-
helpIconColor
|
|
12
|
-
errors
|
|
13
|
-
|
|
14
|
-
className: PropTypes.Requireable<string>;
|
|
15
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
16
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
17
|
-
};
|
|
18
|
-
export declare type SpsLabelProps = PropTypes.InferTS<typeof propTypes, HTMLLabelElement>;
|
|
6
|
+
export declare type SpsLabelProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
7
|
+
description?: string;
|
|
8
|
+
for: SpsFormMetaBase<any> | SpsFormControl<any>;
|
|
9
|
+
stronglySuggested?: boolean;
|
|
10
|
+
help?: React.ReactNode | (() => React.ReactNode);
|
|
11
|
+
helpIcon?: SpsIcon;
|
|
12
|
+
helpIconColor?: string;
|
|
13
|
+
errors?: React.ReactNode | (() => React.ReactNode);
|
|
14
|
+
}> & React.HTMLAttributes<HTMLLabelElement>;
|
|
19
15
|
export declare function SpsLabel({ children, className, description, for: forProp, stronglySuggested, help, helpIcon, helpIconColor, errors, unsafelyReplaceClassName, "data-testid": testId, ...rest }: SpsLabelProps): JSX.Element;
|
|
20
|
-
export {};
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
9
|
-
};
|
|
10
|
-
export declare type SpsListActionBarProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
11
|
-
export declare function SpsListActionBar(props: SpsListActionBarProps): JSX.Element;
|
|
12
|
-
export {};
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
+
export declare type SpsListActionBarProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
4
|
+
clearSelected: () => void;
|
|
5
|
+
itemsSelected: string | number;
|
|
6
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
7
|
+
export declare function SpsListActionBar(props: SpsListActionBarProps): React.ReactElement;
|
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
import type { SpsTab } from "@spscommerce/ds-shared";
|
|
2
|
-
import * as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
23
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
24
|
-
};
|
|
25
|
-
export declare type SpsListToolbarProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
|
+
export declare type SpsListToolbarProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
|
+
activeTab?: SpsTab;
|
|
6
|
+
advancedSearch?: {
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
enteredFields?: number;
|
|
9
|
+
};
|
|
10
|
+
onToggleAdvancedSearch?: (boolean: any) => void;
|
|
11
|
+
onTabChange?: (SpsTab: any) => void;
|
|
12
|
+
title?: string;
|
|
13
|
+
tabs?: SpsTab[];
|
|
14
|
+
onToolbarPinned?: (boolean: any) => void;
|
|
15
|
+
selectable?: boolean;
|
|
16
|
+
isSelected?: boolean;
|
|
17
|
+
isIndeterminate?: boolean;
|
|
18
|
+
onSelectionChange?: (boolean: any) => void;
|
|
19
|
+
pinResultsBar?: boolean;
|
|
20
|
+
pinToolbar?: boolean;
|
|
21
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
26
22
|
export declare function SpsListToolbar(props: SpsListToolbarProps): JSX.Element;
|
|
27
|
-
export {};
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
3
|
-
declare
|
|
4
|
-
onSubmit
|
|
5
|
-
|
|
6
|
-
className: PropTypes.Requireable<string>;
|
|
7
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
8
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
9
|
-
};
|
|
10
|
-
export declare type SpsListToolbarSearchProps = PropTypes.InferTS<typeof propTypes, HTMLElement>;
|
|
2
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
+
export declare type SpsListToolbarSearchProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
4
|
+
onSubmit?: React.FormEventHandler;
|
|
5
|
+
}> & React.HTMLAttributes<HTMLElement>;
|
|
11
6
|
export declare function SpsListToolbarSearch(props: SpsListToolbarSearchProps): JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
className: PropTypes.Requireable<string>;
|
|
5
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
6
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
7
|
-
};
|
|
8
|
-
export declare type SpsListToolbarSearchInfoProps = PropTypes.InferTS<typeof propTypes, HTMLElement>;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
+
export declare type SpsListToolbarSearchInfoProps = React.PropsWithChildren<SpsGlobalPropTypes> & React.HTMLAttributes<HTMLElement>;
|
|
9
4
|
export declare function SpsListToolbarSearchInfo(props: SpsListToolbarSearchInfoProps): JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,21 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import type { SortDirection, SpsIcon } from "@spscommerce/ds-shared";
|
|
2
|
-
import
|
|
3
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
4
|
export interface SortOption {
|
|
4
5
|
label: string;
|
|
5
6
|
key: string;
|
|
6
7
|
direction: SortDirection;
|
|
7
8
|
icon: SpsIcon;
|
|
8
9
|
}
|
|
9
|
-
declare
|
|
10
|
-
options
|
|
11
|
-
activeOption
|
|
12
|
-
onSortChange
|
|
13
|
-
defaultOption
|
|
14
|
-
|
|
15
|
-
className: PropTypes.Requireable<string>;
|
|
16
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
17
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
18
|
-
};
|
|
19
|
-
export declare type SpsListToolbarSortByProps = PropTypes.InferTS<typeof propTypes, HTMLElement>;
|
|
10
|
+
export declare type SpsListToolbarSortByProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
11
|
+
options?: SortOption[];
|
|
12
|
+
activeOption?: SortOption;
|
|
13
|
+
onSortChange?: (option: SortOption) => void;
|
|
14
|
+
defaultOption?: SortOption;
|
|
15
|
+
}> & React.HTMLAttributes<HTMLElement>;
|
|
20
16
|
export declare function SpsListToolbarSortBy(props: SpsListToolbarSortByProps): JSX.Element;
|
|
21
|
-
export {};
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { FeedbackBlockKind } from "@spscommerce/ds-shared";
|
|
2
|
-
import * as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
9
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
10
|
-
};
|
|
11
|
-
export declare type SpsMicroBlockProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
|
+
export declare type SpsMicroBlockProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
|
+
kind?: FeedbackBlockKind;
|
|
6
|
+
message: string;
|
|
7
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
12
8
|
export declare function SpsMicroBlock(props: SpsMicroBlockProps): JSX.Element;
|
|
13
|
-
export {};
|
package/lib/modal/SpsModal.d.ts
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import { ModalKind, ModalSize } from "@spscommerce/ds-shared";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import
|
|
4
|
-
declare
|
|
5
|
-
kind
|
|
6
|
-
size
|
|
7
|
-
title
|
|
8
|
-
onClose
|
|
9
|
-
focusElementOnOpen
|
|
10
|
-
fullHeight
|
|
11
|
-
|
|
12
|
-
className: PropTypes.Requireable<string>;
|
|
13
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
14
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
15
|
-
};
|
|
16
|
-
export declare type SpsModalProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
3
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
|
+
export declare type SpsModalProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
|
+
kind?: ModalKind;
|
|
6
|
+
size?: ModalSize;
|
|
7
|
+
title?: string;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
focusElementOnOpen?: React.MutableRefObject<HTMLElement>;
|
|
10
|
+
fullHeight?: boolean;
|
|
11
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
17
12
|
export declare function SpsModalFooter({ children }: SpsModalProps): JSX.Element;
|
|
18
13
|
export declare function SpsModal({ children, className, id: idProp, kind, size, onClose, focusElementOnOpen, title, fullHeight, ...rest }: SpsModalProps): JSX.Element;
|
|
19
|
-
export {};
|
|
@@ -1,39 +1,32 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { Eventually } from "@spscommerce/utils";
|
|
3
|
-
import type { SpsActionMethod } from "@spscommerce/ds-shared";
|
|
4
|
-
import {
|
|
5
|
-
import * as PropTypes from "../prop-types";
|
|
3
|
+
import type { SpsActionMethod, SpsIcon } from "@spscommerce/ds-shared";
|
|
4
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
6
5
|
import type { SpsFormControl } from "../form/hooks/formControl";
|
|
7
6
|
import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
8
|
-
declare
|
|
9
|
-
action
|
|
10
|
-
captionKey
|
|
11
|
-
clearSearchOnBlur
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
className: PropTypes.Requireable<string>;
|
|
34
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
35
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
36
|
-
};
|
|
37
|
-
export declare type SpsMultiSelectProps = PropTypes.InferTS<typeof propTypes, HTMLInputElement>;
|
|
7
|
+
export declare type SpsMultiSelectProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
8
|
+
action?: SpsActionMethod;
|
|
9
|
+
captionKey?: string;
|
|
10
|
+
clearSearchOnBlur?: boolean;
|
|
11
|
+
comparisonKey?: string;
|
|
12
|
+
debounce?: number;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
disableOptionsMemoization?: boolean;
|
|
15
|
+
disableSelected?: boolean;
|
|
16
|
+
formControl?: SpsFormControl<any[]>;
|
|
17
|
+
formMeta?: SpsFormFieldMeta<any[]>;
|
|
18
|
+
hideSelected?: boolean;
|
|
19
|
+
icon?: SpsIcon;
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
maxHeightOptionListPx?: number;
|
|
22
|
+
maxHeightOptionListRem?: number;
|
|
23
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
24
|
+
onSearchChange?: (searchText: string) => void;
|
|
25
|
+
options: Eventually<any[]> | ((filter?: string) => Eventually<any[]>);
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
tallOptionList?: boolean;
|
|
28
|
+
textKey?: string;
|
|
29
|
+
value?: any;
|
|
30
|
+
zeroState?: string;
|
|
31
|
+
}> & React.HTMLAttributes<HTMLInputElement>;
|
|
38
32
|
export declare function SpsMultiSelect({ action, captionKey, className, clearSearchOnBlur, debounce, disabled, disableSelected, comparisonKey, formControl, formMeta, hideSelected, id, onChange, onSearchChange, options, placeholder, tallOptionList, textKey, unsafelyReplaceClassName, value, zeroState, loading, icon, maxHeightOptionListPx, maxHeightOptionListRem, disableOptionsMemoization, "data-testid": testId, ...rest }: SpsMultiSelectProps): JSX.Element;
|
|
39
|
-
export {};
|
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { SpsIcon } from "@spscommerce/ds-shared";
|
|
3
|
-
import
|
|
2
|
+
import type { SpsIcon } from "@spscommerce/ds-shared";
|
|
3
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
4
|
import type { SpsFormControl } from "../form/hooks/formControl";
|
|
5
5
|
import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
6
|
-
declare
|
|
7
|
-
disabled
|
|
8
|
-
formControl
|
|
9
|
-
formMeta
|
|
10
|
-
icon
|
|
11
|
-
onChange
|
|
12
|
-
onEntryChange
|
|
13
|
-
placeholder
|
|
14
|
-
value
|
|
15
|
-
createTagOptions
|
|
16
|
-
|
|
17
|
-
className: PropTypes.Requireable<string>;
|
|
18
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
19
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
20
|
-
};
|
|
21
|
-
export declare type SpsMultiValueTextInputProps = PropTypes.InferTS<typeof propTypes, HTMLInputElement>;
|
|
6
|
+
export declare type SpsMultiValueTextInputProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
formControl?: SpsFormControl<any[]>;
|
|
9
|
+
formMeta?: SpsFormFieldMeta<any[]>;
|
|
10
|
+
icon?: SpsIcon;
|
|
11
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
12
|
+
onEntryChange?: (searchText: string) => void;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
value?: string[];
|
|
15
|
+
createTagOptions?: string[];
|
|
16
|
+
}> & React.HTMLAttributes<HTMLInputElement>;
|
|
22
17
|
export declare function SpsMultiValueTextInput({ className, disabled, formControl, formMeta, id, onChange, onEntryChange, placeholder, unsafelyReplaceClassName, value, icon, createTagOptions, "data-testid": testId, ...rest }: SpsMultiValueTextInputProps): JSX.Element;
|
|
23
|
-
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { ChangeEventHandler, KeyboardEvent } from "react";
|
|
2
|
-
import type { SpsActionMethod } from "@spscommerce/ds-shared";
|
|
3
|
-
import { Position } from "@spscommerce/ds-shared";
|
|
1
|
+
import type { ChangeEventHandler, KeyboardEvent, MutableRefObject, PropsWithChildren, HTMLAttributes } from "react";
|
|
2
|
+
import type { SpsActionMethod, Position } from "@spscommerce/ds-shared";
|
|
4
3
|
import type { Eventually } from "@spscommerce/utils";
|
|
5
|
-
import
|
|
4
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
6
5
|
export declare const spsOptionListPassthroughProps: {
|
|
7
6
|
docs: {
|
|
8
7
|
options: string;
|
|
@@ -18,69 +17,47 @@ export declare const spsOptionListPassthroughProps: {
|
|
|
18
17
|
disableOptionsMemoization: string;
|
|
19
18
|
onSpecialActionSelect: string;
|
|
20
19
|
};
|
|
21
|
-
propTypes: {
|
|
22
|
-
captionKey: PropTypes.Requireable<string>;
|
|
23
|
-
comparisonKey: PropTypes.Requireable<string>;
|
|
24
|
-
disabledOptions: PropTypes.Requireable<any[]>;
|
|
25
|
-
options: PropTypes.Validator<any[] | Promise<any[]> | ((filter?: string) => Eventually<any[]>)>;
|
|
26
|
-
tall: PropTypes.Requireable<boolean>;
|
|
27
|
-
textKey: PropTypes.Requireable<string>;
|
|
28
|
-
valueKey: PropTypes.Requireable<string>;
|
|
29
|
-
zeroState: PropTypes.Requireable<string>;
|
|
30
|
-
maxHeightPx: PropTypes.Requireable<number>;
|
|
31
|
-
maxHeightRem: PropTypes.Requireable<number>;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
export declare const searchableOptionListProps: {
|
|
35
|
-
hideInlineSearch: PropTypes.Requireable<boolean>;
|
|
36
|
-
onSearchChange: PropTypes.Requireable<ChangeEventHandler<Element>>;
|
|
37
|
-
search: PropTypes.Requireable<string>;
|
|
38
|
-
searchDebounce: PropTypes.Requireable<number>;
|
|
39
|
-
searchPlaceholder: PropTypes.Requireable<string>;
|
|
40
|
-
searchInputRef: PropTypes.Requireable<import("react").MutableRefObject<HTMLInputElement>>;
|
|
41
|
-
onSpecialActionSelect: PropTypes.Requireable<() => void>;
|
|
42
|
-
};
|
|
43
|
-
export declare const propTypes: {
|
|
44
|
-
attachTo: PropTypes.Validator<import("react").MutableRefObject<HTMLElement>>;
|
|
45
|
-
conformWidth: PropTypes.Requireable<boolean>;
|
|
46
|
-
id: PropTypes.Validator<string>;
|
|
47
|
-
isOpen: PropTypes.Requireable<boolean>;
|
|
48
|
-
keepOpen: PropTypes.Requireable<boolean>;
|
|
49
|
-
keyDown: PropTypes.Requireable<KeyboardEvent<Element>>;
|
|
50
|
-
nullOption: PropTypes.Requireable<string>;
|
|
51
|
-
offsets: PropTypes.Requireable<number[]>;
|
|
52
|
-
onOptionListChanged: PropTypes.Requireable<(filteredListLength: number) => void>;
|
|
53
|
-
onOptionSelected: PropTypes.Requireable<(option: any) => void>;
|
|
54
|
-
onPositionFlip: PropTypes.Requireable<(opensUpward: boolean) => void>;
|
|
55
|
-
onSelfToggle: PropTypes.Requireable<(isOpen: boolean) => void>;
|
|
56
|
-
optionRole: PropTypes.Requireable<string>;
|
|
57
|
-
positionOverride: PropTypes.Requireable<Position[]>;
|
|
58
|
-
selectedOption: PropTypes.Requireable<any>;
|
|
59
|
-
specialAction: PropTypes.Requireable<SpsActionMethod>;
|
|
60
|
-
ignoreWidthStyles: PropTypes.Requireable<boolean>;
|
|
61
|
-
loading: PropTypes.Requireable<boolean>;
|
|
62
|
-
filterByTextAndCaptionKey: PropTypes.Requireable<boolean>;
|
|
63
|
-
disableOptionsMemoization: PropTypes.Requireable<boolean>;
|
|
64
|
-
hideInlineSearch: PropTypes.Requireable<boolean>;
|
|
65
|
-
onSearchChange: PropTypes.Requireable<ChangeEventHandler<Element>>;
|
|
66
|
-
search: PropTypes.Requireable<string>;
|
|
67
|
-
searchDebounce: PropTypes.Requireable<number>;
|
|
68
|
-
searchPlaceholder: PropTypes.Requireable<string>;
|
|
69
|
-
searchInputRef: PropTypes.Requireable<import("react").MutableRefObject<HTMLInputElement>>;
|
|
70
|
-
onSpecialActionSelect: PropTypes.Requireable<() => void>;
|
|
71
|
-
captionKey: PropTypes.Requireable<string>;
|
|
72
|
-
comparisonKey: PropTypes.Requireable<string>;
|
|
73
|
-
disabledOptions: PropTypes.Requireable<any[]>;
|
|
74
|
-
options: PropTypes.Validator<any[] | Promise<any[]> | ((filter?: string) => Eventually<any[]>)>;
|
|
75
|
-
tall: PropTypes.Requireable<boolean>;
|
|
76
|
-
textKey: PropTypes.Requireable<string>;
|
|
77
|
-
valueKey: PropTypes.Requireable<string>;
|
|
78
|
-
zeroState: PropTypes.Requireable<string>;
|
|
79
|
-
maxHeightPx: PropTypes.Requireable<number>;
|
|
80
|
-
maxHeightRem: PropTypes.Requireable<number>;
|
|
81
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
82
|
-
className: PropTypes.Requireable<string>;
|
|
83
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
84
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
85
20
|
};
|
|
86
|
-
export
|
|
21
|
+
export interface SpsOptionListPassthroughProps {
|
|
22
|
+
captionKey?: string;
|
|
23
|
+
comparisonKey?: string;
|
|
24
|
+
disabledOptions?: any[];
|
|
25
|
+
options: any[] | Promise<any[]> | ((filter?: string) => Eventually<any[]>);
|
|
26
|
+
tall?: boolean;
|
|
27
|
+
textKey?: string;
|
|
28
|
+
valueKey?: string;
|
|
29
|
+
zeroState?: string;
|
|
30
|
+
maxHeightPx?: number;
|
|
31
|
+
maxHeightRem?: number;
|
|
32
|
+
}
|
|
33
|
+
export interface SpsSearchableOptionListProps {
|
|
34
|
+
hideInlineSearch?: boolean;
|
|
35
|
+
onSearchChange?: ChangeEventHandler;
|
|
36
|
+
search?: string;
|
|
37
|
+
searchDebounce?: number;
|
|
38
|
+
searchPlaceholder?: string;
|
|
39
|
+
searchInputRef?: MutableRefObject<HTMLInputElement | null>;
|
|
40
|
+
onSpecialActionSelect?: () => void;
|
|
41
|
+
}
|
|
42
|
+
export declare type SpsOptionListProps = PropsWithChildren<SpsGlobalPropTypes & SpsOptionListPassthroughProps & SpsSearchableOptionListProps & {
|
|
43
|
+
attachTo: MutableRefObject<HTMLElement | null>;
|
|
44
|
+
conformWidth?: boolean;
|
|
45
|
+
id: string;
|
|
46
|
+
isOpen?: boolean;
|
|
47
|
+
keepOpen?: boolean;
|
|
48
|
+
keyDown?: KeyboardEvent | null;
|
|
49
|
+
nullOption?: string;
|
|
50
|
+
offsets?: number[];
|
|
51
|
+
onOptionListChanged?: (filteredListLength: number) => void;
|
|
52
|
+
onOptionSelected?: (option: any) => void;
|
|
53
|
+
onPositionFlip?: (opensUpward: boolean) => void;
|
|
54
|
+
onSelfToggle?: (isOpen: boolean) => void;
|
|
55
|
+
optionRole?: string;
|
|
56
|
+
positionOverride?: Position[];
|
|
57
|
+
selectedOption?: any;
|
|
58
|
+
specialAction?: SpsActionMethod;
|
|
59
|
+
ignoreWidthStyles?: boolean;
|
|
60
|
+
loading?: boolean;
|
|
61
|
+
filterByTextAndCaptionKey?: boolean;
|
|
62
|
+
disableOptionsMemoization?: boolean;
|
|
63
|
+
}> & HTMLAttributes<HTMLDivElement>;
|
|
@@ -4,7 +4,7 @@ export interface OptionListSearchState {
|
|
|
4
4
|
isAsync: boolean;
|
|
5
5
|
pending: boolean;
|
|
6
6
|
value: string;
|
|
7
|
-
replacementPattern: RegExp;
|
|
7
|
+
replacementPattern: RegExp | null;
|
|
8
8
|
}
|
|
9
9
|
export declare function useOptionListSearch({ hideInlineSearch, options, onSearchChange, search, searchPlaceholder, searchInputRef, }: SpsOptionListProps): [
|
|
10
10
|
JSX.Element,
|
|
File without changes
|
|
File without changes
|