@spscommerce/ds-react 8.20.11 → 8.20.13
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 +1 -1
- package/lib/autocomplete/SpsAutocomplete.d.ts +1 -1
- package/lib/button/SpsButton.d.ts +1 -1
- package/lib/button/SpsButtonGroup.d.ts +1 -1
- package/lib/button/SpsIconButtonPanel.d.ts +1 -1
- package/lib/card/SpsCard.d.ts +1 -1
- package/lib/card/SpsCardHeader.d.ts +1 -1
- package/lib/card/SpsCardTabbedPane.d.ts +1 -1
- package/lib/card/useTab.d.ts +1 -1
- package/lib/checkbox/SpsCheckbox.d.ts +1 -1
- package/lib/checkbox-dropdown/SpsCheckboxDropdown.d.ts +3 -3
- package/lib/clickable-tag/SpsClickableTag.d.ts +1 -1
- package/lib/column-chooser/SpsColumnChooser.d.ts +1 -1
- package/lib/column-chooser/SpsColumnChooserColumn.d.ts +1 -1
- package/lib/conditional-field/SpsConditionalField.d.ts +1 -1
- package/lib/content-row/SpsContentRow.d.ts +1 -1
- package/lib/content-row/SpsContentRowCol.d.ts +1 -1
- package/lib/content-row/SpsContentRowExpansion.d.ts +1 -1
- package/lib/currency-input/SpsCurrencyInput.d.ts +1 -1
- package/lib/dateRangePicker/SpsDateRangePicker.d.ts +1 -1
- package/lib/dateTimeRangePicker/SpsDateTimeRangePicker.d.ts +1 -1
- package/lib/datepicker/SpsDatepicker.d.ts +1 -1
- package/lib/datepicker/SpsDatepickerCalendar.d.ts +1 -1
- package/lib/datepicker/SpsDatepickerPopup.d.ts +2 -2
- package/lib/datetime/SpsDateTime.d.ts +1 -1
- package/lib/description-list/SpsDescriptionList.d.ts +1 -1
- package/lib/description-list/SpsDescriptionListDefinition.d.ts +1 -1
- package/lib/description-list/SpsDescriptionListTerm.d.ts +1 -1
- package/lib/dropdown/SpsDropdown.d.ts +1 -1
- package/lib/feedback-block/SpsFeedbackBlock.d.ts +1 -1
- package/lib/fieldset/SpsFieldset.d.ts +1 -1
- package/lib/filter-panel/SpsFilterPanel.d.ts +1 -1
- package/lib/filter-panel/SpsFilterPanelCap.d.ts +1 -1
- package/lib/filter-panel/SpsFilterPanelFilterBox.d.ts +1 -1
- package/lib/filter-panel/SpsFilterPanelSection.d.ts +1 -1
- package/lib/filter-tile-list/SpsFilterTile.d.ts +1 -1
- package/lib/filter-tile-list/SpsFilterTileList.d.ts +1 -1
- package/lib/focused-task/SpsFocusedTask.d.ts +1 -1
- package/lib/focused-task/SpsFocusedTaskActions.d.ts +1 -1
- package/lib/form/SpsForm.d.ts +3 -3
- package/lib/form/SpsFormComponentWrapper.d.ts +3 -3
- package/lib/form/hooks/useSpsForm.d.ts +9 -9
- package/lib/form/validation/SpsValidators.d.ts +3 -3
- package/lib/form/validation/types.d.ts +4 -4
- package/lib/growler/SpsGrowler.d.ts +1 -1
- package/lib/icon/SpsIcon.d.ts +1 -1
- package/lib/incrementor/SpsIncrementor.d.ts +1 -1
- package/lib/index.cjs.js +56 -56
- package/lib/index.es.js +549 -546
- package/lib/input-group/SpsInputGroup.d.ts +1 -1
- package/lib/insight-tile/SpsInsightTile.d.ts +1 -1
- package/lib/insight-tile/SpsInsights.d.ts +1 -1
- package/lib/key-value-list/SpsKeyValueList.d.ts +1 -1
- package/lib/key-value-list/SpsKeyValueListItem.d.ts +1 -1
- package/lib/key-value-tag/SpsKeyValueTag.d.ts +1 -1
- package/lib/label/SpsLabel.d.ts +1 -1
- package/lib/list-action-bar/SpsListActionBar.d.ts +1 -1
- package/lib/list-toolbar/SpsListToolbar.d.ts +1 -1
- package/lib/list-toolbar/SpsListToolbarSearch.d.ts +1 -1
- package/lib/list-toolbar/SpsListToolbarSearchInfo.d.ts +1 -1
- package/lib/list-toolbar/SpsListToolbarSortBy.d.ts +1 -1
- package/lib/micro-block/SpsMicroBlock.d.ts +1 -1
- package/lib/modal/SpsModal.d.ts +1 -1
- package/lib/modal/useModals.d.ts +1 -1
- package/lib/multi-select/SpsMultiSelect.d.ts +1 -1
- package/lib/multi-value-text-input/SpsMultiValueTextInput.d.ts +1 -1
- package/lib/option-list/SpsOptionListProps.d.ts +1 -1
- package/lib/page-title/SpsPageSubtitle.d.ts +1 -1
- package/lib/page-title/SpsPageTitle.d.ts +1 -1
- package/lib/pagination/SpsPageSelector.d.ts +1 -1
- package/lib/pagination/SpsPagination.d.ts +1 -1
- package/lib/product-bar/SpsProductBar.d.ts +1 -1
- package/lib/product-bar/SpsProductBarTab.d.ts +1 -1
- package/lib/progress-bar/SpsProgressBar.d.ts +1 -1
- package/lib/progress-ring/SpsProgressRing.d.ts +1 -1
- package/lib/radio-button/SpsRadioButton.d.ts +1 -1
- package/lib/scrollable-container/SpsScrollableContainer.d.ts +1 -1
- package/lib/search-results-bar/SpsSearchResultsBar.d.ts +1 -1
- package/lib/search-results-bar/SpsSearchResultsBarV2.d.ts +1 -1
- package/lib/select/SpsSelect.d.ts +27 -27
- package/lib/slack-link/SpsSlackLink.d.ts +1 -1
- package/lib/slide-in-panel/SpsSlideInPanel.d.ts +1 -1
- package/lib/sorting-header/SpsSortingHeader.d.ts +1 -1
- package/lib/sorting-header/SpsSortingHeaderCell.d.ts +1 -1
- package/lib/spinner/SpsSpinner.d.ts +1 -1
- package/lib/split-button/SpsSplitButton.d.ts +1 -1
- package/lib/stepped-progress-bar/SpsSteppedProgressBar.d.ts +1 -1
- package/lib/summary-list/SpsSummaryListColumn.d.ts +1 -1
- package/lib/summary-list/SpsSummaryListExpansion.d.ts +1 -1
- package/lib/summary-list/SpsSummaryListRow.d.ts +1 -1
- package/lib/table/SpsTable.d.ts +1 -1
- package/lib/table/SpsTableBody.d.ts +1 -1
- package/lib/table/SpsTableCell.d.ts +1 -1
- package/lib/table/SpsTableHead.d.ts +1 -1
- package/lib/table/SpsTableHeader.d.ts +1 -1
- package/lib/table/SpsTableRow.d.ts +1 -1
- package/lib/tabs/SpsTabs.d.ts +1 -1
- package/lib/tag/SpsTag.d.ts +1 -1
- package/lib/task-queue/SpsTaskQueue.d.ts +2 -2
- package/lib/text-input/SpsTextInput.d.ts +13 -13
- package/lib/textarea/SpsTextarea.d.ts +1 -1
- package/lib/tile-list/SpsTile.d.ts +1 -1
- package/lib/tile-list/SpsTileList.d.ts +1 -1
- package/lib/time-input/SpsTimeInput.d.ts +1 -1
- package/lib/toggle/SpsToggle.d.ts +1 -1
- package/lib/tooltip/SpsTooltip.d.ts +1 -1
- package/lib/tooltip/SpsTooltipTitle.d.ts +1 -1
- package/lib/utils/Provide.d.ts +1 -1
- package/lib/utils/bindProps.d.ts +1 -1
- package/lib/utils/usePortal.d.ts +2 -2
- package/lib/vertical-rule/SpsVerticalRule.d.ts +1 -1
- package/lib/wizard/SpsWizardSidebar.d.ts +1 -1
- package/lib/wizard/SpsWizardSubstep.d.ts +1 -1
- package/lib/workflow/SpsWorkflow.d.ts +1 -1
- package/lib/workflow/SpsWorkflowDocument.d.ts +1 -1
- package/lib/workflow/SpsWorkflowDocumentStatus.d.ts +1 -1
- package/lib/workflow/SpsWorkflowStep.d.ts +1 -1
- package/lib/zero-state/SpsMicroZeroState.d.ts +1 -1
- package/lib/zero-state/SpsZeroState.d.ts +1 -1
- package/package.json +12 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsFormProps } from "../form/SpsForm";
|
|
3
3
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
|
-
export
|
|
4
|
+
export type SpsAdvancedSearchProps = React.PropsWithChildren<SpsGlobalPropTypes & SpsFormProps & {
|
|
5
5
|
controlsDisabled?: boolean;
|
|
6
6
|
footerLinks?: React.ReactNode | (() => React.ReactNode);
|
|
7
7
|
isOpen?: boolean;
|
|
@@ -4,7 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
import type { SpsFormControl } from "../form/hooks/formControl";
|
|
5
5
|
import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
6
6
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
7
|
-
export
|
|
7
|
+
export type SpsAutocompleteProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
8
8
|
autoComplete?: string;
|
|
9
9
|
debounce?: number;
|
|
10
10
|
disabled?: boolean;
|
|
@@ -2,7 +2,7 @@ import { ButtonKind, ButtonType } from "@spscommerce/ds-shared";
|
|
|
2
2
|
import type { SpsIcon } from "@spscommerce/ds-shared";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
5
|
-
export
|
|
5
|
+
export type SpsButtonProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
href?: string;
|
|
8
8
|
icon?: SpsIcon;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
-
export
|
|
3
|
+
export type SpsButtonGroupProps = React.PropsWithChildren<SpsGlobalPropTypes> & React.HTMLAttributes<HTMLDivElement>;
|
|
4
4
|
export declare function SpsButtonGroup(props: SpsButtonGroupProps): React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
-
export
|
|
3
|
+
export type SpsIconButtonPanelProps = React.PropsWithChildren<SpsGlobalPropTypes> & React.HTMLAttributes<HTMLDivElement>;
|
|
4
4
|
export declare function SpsIconButtonPanel({ children, className, ...rest }: SpsIconButtonPanelProps): React.JSX.Element;
|
package/lib/card/SpsCard.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SpsIcon } from '@spscommerce/ds-shared';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import type { SpsGlobalPropTypes } from '../prop-types';
|
|
4
|
-
export
|
|
4
|
+
export type SpsCardProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
5
|
activeTab?: string;
|
|
6
6
|
footer?: React.ReactNode | (() => React.ReactNode);
|
|
7
7
|
headerContent?: React.ReactNode | (() => React.ReactNode);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SpsIcon } from "@spscommerce/ds-shared";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
|
-
export
|
|
4
|
+
export type SpsCardHeaderProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
5
|
content?: React.ReactNode;
|
|
6
6
|
icon?: SpsIcon;
|
|
7
7
|
title?: string;
|
|
@@ -2,7 +2,7 @@ import type { SpsIcon } from "@spscommerce/ds-shared";
|
|
|
2
2
|
import { TagKind } from "@spscommerce/ds-shared";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
5
|
-
export
|
|
5
|
+
export type SpsCardTabbedPaneProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
6
6
|
activateTab?: (target: HTMLAnchorElement, index: number, children: React.ReactNode) => void;
|
|
7
7
|
active?: boolean;
|
|
8
8
|
icon?: SpsIcon;
|
package/lib/card/useTab.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
3
|
import type { SpsFormControl } from "../form/hooks/formControl";
|
|
4
4
|
import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
5
|
-
export
|
|
5
|
+
export type SpsCheckboxProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
6
6
|
autoComplete?: string;
|
|
7
7
|
checked?: boolean;
|
|
8
8
|
disabled?: boolean;
|
|
@@ -2,8 +2,8 @@ import * as React from "react";
|
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
3
|
import { SpsCheckbox } from "../checkbox/SpsCheckbox";
|
|
4
4
|
import { SpsDropdown } from "../dropdown/SpsDropdown";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
5
|
+
type PassthruCheckboxProps = Pick<Parameters<typeof SpsCheckbox>[0], "checked" | "onChange" | "indeterminate" | "disabled">;
|
|
6
|
+
type PassthruDropdownProps = Pick<Parameters<typeof SpsDropdown>[0], "options">;
|
|
7
|
+
export type SpsCheckboxDropdownProps = React.PropsWithChildren<SpsGlobalPropTypes & PassthruCheckboxProps & PassthruDropdownProps> & React.HTMLAttributes<HTMLElement>;
|
|
8
8
|
export declare function SpsCheckboxDropdown(props: SpsCheckboxDropdownProps): React.JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClickableTagKind } from "@spscommerce/ds-shared";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
|
-
export
|
|
4
|
+
export type SpsClickableTagProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
href?: string;
|
|
7
7
|
kind?: ClickableTagKind;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
-
export
|
|
3
|
+
export type SpsColumnChooserProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
4
4
|
maxSelectedColumns?: number | null;
|
|
5
5
|
unselectedColumns?: any[];
|
|
6
6
|
selectedColumns?: any[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
-
export
|
|
3
|
+
export type SpsColumnChooserColumnProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
4
4
|
index?: number;
|
|
5
5
|
key?: string;
|
|
6
6
|
columnId?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
-
export
|
|
3
|
+
export type SpsConditionalFieldProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
4
4
|
showCondition?: boolean;
|
|
5
5
|
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
6
6
|
export declare function SpsConditionalField({ showCondition, children, className, ...rest }: SpsConditionalFieldProps): React.JSX.Element | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
-
export
|
|
3
|
+
export type SpsContentRowProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
4
4
|
alternateLayout?: boolean;
|
|
5
5
|
cardSpacing?: boolean;
|
|
6
6
|
expanded?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
-
export
|
|
3
|
+
export type SpsContentRowColProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
4
4
|
borderless?: boolean;
|
|
5
5
|
lean?: boolean;
|
|
6
6
|
leaner?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
-
export
|
|
3
|
+
export type SpsContentRowExpansionProps = React.PropsWithChildren<SpsGlobalPropTypes> & React.HTMLAttributes<HTMLDivElement>;
|
|
4
4
|
export declare function SpsContentRowExpansion(props: SpsContentRowExpansionProps): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
3
|
import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
4
|
-
export
|
|
4
|
+
export type SpsCurrencyInputProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
5
|
autoComplete?: string;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
formMeta?: SpsFormFieldMeta<number>;
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import type { SimpleDate, SimpleDateRange, DatePreset } from "@spscommerce/ds-shared";
|
|
3
3
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
4
|
import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
5
|
-
export
|
|
5
|
+
export type SpsDateRangePickerProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
6
6
|
autoComplete?: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
formMeta?: SpsFormFieldMeta<SimpleDateRange | DatePreset | null | undefined>;
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import type { SimpleMomentRange, SimpleDate, DateTimePreset } from "@spscommerce/ds-shared";
|
|
3
3
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
4
|
import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
5
|
-
export
|
|
5
|
+
export type SpsDateTimeRangePickerProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
formMeta?: SpsFormFieldMeta<SimpleMomentRange | undefined>;
|
|
8
8
|
maxDate?: SimpleDate;
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import type { SimpleDate } from "@spscommerce/ds-shared";
|
|
3
3
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
4
|
import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
5
|
-
export
|
|
5
|
+
export type SpsDatepickerProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
6
6
|
autoComplete?: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
formMeta?: SpsFormFieldMeta<SimpleDate | undefined>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SimpleDate, SimpleDateRange } from "@spscommerce/ds-shared";
|
|
3
3
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
|
-
export
|
|
4
|
+
export type SpsDatepickerCalendarProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
5
|
selectedRange?: SimpleDateRange;
|
|
6
6
|
isOpen?: boolean;
|
|
7
7
|
maxDate?: SimpleDate;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export
|
|
2
|
+
export type SpsDatepickerPopupProps = React.PropsWithChildren<{
|
|
3
3
|
attachTo: React.MutableRefObject<HTMLElement | null>;
|
|
4
4
|
isOpen: boolean;
|
|
5
5
|
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
@@ -7,5 +7,5 @@ export declare const SpsDatepickerPopup: React.ForwardRefExoticComponent<{
|
|
|
7
7
|
attachTo: React.MutableRefObject<HTMLElement | null>;
|
|
8
8
|
isOpen: boolean;
|
|
9
9
|
} & {
|
|
10
|
-
children?: React.ReactNode;
|
|
10
|
+
children?: React.ReactNode | undefined;
|
|
11
11
|
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -8,7 +8,7 @@ import "moment/locale/fr";
|
|
|
8
8
|
import "moment/locale/es";
|
|
9
9
|
import "moment/locale/zh-cn";
|
|
10
10
|
import "moment/locale/zh-tw";
|
|
11
|
-
export
|
|
11
|
+
export type SpsDateTimeProps = React.PropsWithChildren<{
|
|
12
12
|
currentUser?: any;
|
|
13
13
|
dateToFormat?: string | Date;
|
|
14
14
|
format?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
-
export
|
|
3
|
+
export type SpsDescriptionListProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
4
4
|
compact?: boolean;
|
|
5
5
|
wideTerms?: boolean;
|
|
6
6
|
widerTerms?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
-
export
|
|
3
|
+
export type SpsDescriptionListDefinitionProps = React.PropsWithChildren<SpsGlobalPropTypes> & React.HTMLAttributes<HTMLElement>;
|
|
4
4
|
export declare function SpsDescriptionListDefinition(props: SpsDescriptionListDefinitionProps): React.JSX.Element;
|
|
5
5
|
export declare function SpsDd(props: SpsDescriptionListDefinitionProps): React.JSX.Element;
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import type { SpsFormControl } from "../form/hooks/formControl";
|
|
3
3
|
import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
4
4
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
5
|
-
export
|
|
5
|
+
export type SpsDescriptionListTermProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
6
6
|
error?: boolean;
|
|
7
7
|
errors?: React.ReactNode | (() => React.ReactNode);
|
|
8
8
|
help?: React.ReactNode | (() => React.ReactNode);
|
|
@@ -2,7 +2,7 @@ import type { SpsActionDescriptor, SpsActionMethod } from "@spscommerce/ds-share
|
|
|
2
2
|
import { DropdownKind, SpsIcon } from "@spscommerce/ds-shared";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
5
|
-
export
|
|
5
|
+
export type SpsDropdownProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
6
6
|
action?: (...args: any[]) => void;
|
|
7
7
|
alignLeft?: boolean;
|
|
8
8
|
disabled?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FeedbackBlockKind } from "@spscommerce/ds-shared";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
|
-
export
|
|
4
|
+
export type SpsFeedbackBlockProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
5
|
kind?: FeedbackBlockKind;
|
|
6
6
|
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
7
7
|
export declare function SpsFeedbackBlock(props: SpsFeedbackBlockProps): React.JSX.Element;
|
|
@@ -3,7 +3,7 @@ import type { SpsGlobalPropTypes } from "../prop-types";
|
|
|
3
3
|
import type { SpsFormArray } from "../form/hooks/formArray";
|
|
4
4
|
import type { SpsFormGroup } from "../form/hooks/formGroup";
|
|
5
5
|
import type { SpsFormSetMeta } from "../form/hooks/useSpsForm";
|
|
6
|
-
export
|
|
6
|
+
export type SpsFieldsetProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
7
7
|
errors?: React.ReactNode | (() => React.ReactNode);
|
|
8
8
|
formArray?: SpsFormArray<any>;
|
|
9
9
|
formGroup?: SpsFormGroup;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
-
export
|
|
3
|
+
export type SpsFilterPanelProps = React.PropsWithChildren<SpsGlobalPropTypes> & React.HTMLAttributes<HTMLDivElement>;
|
|
4
4
|
export declare function SpsFilterPanel({ children, className, ...rest }: SpsFilterPanelProps): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
-
export
|
|
3
|
+
export type SpsFilterPanelCapProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
4
4
|
onClear?: () => void;
|
|
5
5
|
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
6
6
|
export declare function SpsFilterPanelCap({ children, className, onClear, ...rest }: SpsFilterPanelCapProps): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
3
|
import type { SpsFormFieldMeta } from "../form";
|
|
4
|
-
export
|
|
4
|
+
export type SpsFilterPanelFilterBoxProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
5
|
value?: string;
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
formMeta?: SpsFormFieldMeta<string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
-
export
|
|
3
|
+
export type SpsFilterPanelSectionProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
4
4
|
title?: string | React.ReactNode;
|
|
5
5
|
expanded?: boolean;
|
|
6
6
|
heightPx?: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { SpsFilterTileKind } from "@spscommerce/ds-shared";
|
|
3
3
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
|
-
export
|
|
4
|
+
export type SpsFilterTileProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
5
|
value: number;
|
|
6
6
|
title: string;
|
|
7
7
|
kind?: SpsFilterTileKind;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
-
export
|
|
3
|
+
export type SpsFilterTileListProps = React.PropsWithChildren<SpsGlobalPropTypes> & React.HTMLAttributes<HTMLDivElement>;
|
|
4
4
|
export declare function SpsFilterTileList(props: SpsFilterTileListProps): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
-
export
|
|
3
|
+
export type SpsFocusedTaskProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
4
4
|
fullWidth?: boolean;
|
|
5
5
|
isOpen?: boolean;
|
|
6
6
|
onClose?: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
-
export
|
|
3
|
+
export type SpsFocusedTaskActionsProps = React.PropsWithChildren<SpsGlobalPropTypes> & React.HTMLAttributes<HTMLDivElement>;
|
|
4
4
|
export declare function SpsFocusedTaskActions(props: SpsFocusedTaskActionsProps): React.JSX.Element;
|
package/lib/form/SpsForm.d.ts
CHANGED
|
@@ -6,13 +6,13 @@ export declare const spsFormProps: {
|
|
|
6
6
|
formMeta: string;
|
|
7
7
|
onSubmit: string;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type SpsFormProps = React.PropsWithChildren<{
|
|
10
10
|
formArray?: SpsFormArray<any>;
|
|
11
11
|
formGroup?: SpsFormGroup;
|
|
12
12
|
formMeta?: SpsFormSetMeta<any>;
|
|
13
13
|
onSubmit?: React.FormEventHandler;
|
|
14
14
|
}> & React.HTMLAttributes<HTMLFormElement>;
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
type SpsFormForwardRefType = SpsFormProps & React.RefAttributes<HTMLFormElement>;
|
|
16
|
+
type SpsFormForwardRefExoticComponent = React.ForwardRefExoticComponent<SpsFormForwardRefType>;
|
|
17
17
|
export declare const SpsForm: SpsFormForwardRefExoticComponent;
|
|
18
18
|
export {};
|
|
@@ -2,13 +2,13 @@ import * as React from "react";
|
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
3
|
import type { SpsFormControl } from "./hooks/formControl";
|
|
4
4
|
import type { SpsFormMetaBase } from "./hooks/useSpsForm";
|
|
5
|
-
export
|
|
5
|
+
export type SpsFormComponentWrapperProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
6
6
|
focusInputOnClick?: boolean;
|
|
7
7
|
formMeta?: SpsFormMetaBase<any>;
|
|
8
8
|
formControl?: SpsFormControl<any>;
|
|
9
9
|
inputRef?: React.MutableRefObject<HTMLInputElement | HTMLTextAreaElement | null>;
|
|
10
10
|
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
type SpsFormComponentWrapperForwardRefType = SpsFormComponentWrapperProps & React.RefAttributes<HTMLDivElement>;
|
|
12
|
+
type SpsFormComponentWrapperForwardRefExoticComponent = React.ForwardRefExoticComponent<SpsFormComponentWrapperForwardRefType>;
|
|
13
13
|
export declare const SpsFormComponentWrapper: SpsFormComponentWrapperForwardRefExoticComponent;
|
|
14
14
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { SpsValidator } from "../validation/types";
|
|
2
2
|
import { ValidationMode } from "./useCustomValidator";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
type PathComponent = string | number;
|
|
4
|
+
type Path = PathComponent[];
|
|
5
|
+
type UpdateFn = (path?: Path, newValue?: any, markAsBlurred?: boolean, newValidators?: Array<SpsValidator<any>>, markAsSubmitted?: boolean) => void;
|
|
6
6
|
interface UpdateFormOptions {
|
|
7
7
|
validators?: SpsValidatorMap;
|
|
8
8
|
runValidators?: boolean;
|
|
@@ -48,14 +48,14 @@ export declare class SpsFormFieldMeta<T> extends SpsFormMetaBase<T> {
|
|
|
48
48
|
markAsBlurred(): SpsFormFieldMeta<T>;
|
|
49
49
|
markAsSubmitted(): SpsFormFieldMeta<T>;
|
|
50
50
|
}
|
|
51
|
-
export
|
|
52
|
-
export
|
|
51
|
+
export type InferredSpsFormMeta<T> = SpsFormMetaBase<T> & (T extends any[] ? SpsFormArrayMeta<T> : T extends (Array<infer U> | undefined) ? SpsFormArrayMeta<U[]> | undefined : T extends object ? SpsFormGroupMeta<T> : T extends (object | undefined) ? SpsFormGroupMeta<object & T> | undefined : T extends boolean ? SpsFormFieldMeta<boolean> : T extends (infer V | undefined) ? SpsFormFieldMeta<V> | undefined : SpsFormFieldMeta<T>);
|
|
52
|
+
export type SpsFormSetMembers<T> = {
|
|
53
53
|
[K in keyof T]?: SpsFormMetaBase<any>;
|
|
54
54
|
};
|
|
55
|
-
export
|
|
55
|
+
export type InferredSpsFormMetaSetMembers<T> = SpsFormSetMembers<T> & {
|
|
56
56
|
[K in keyof T]: InferredSpsFormMeta<T[K]>;
|
|
57
57
|
};
|
|
58
|
-
export
|
|
58
|
+
export type SpsFormSetValue = any[] | object;
|
|
59
59
|
export declare abstract class SpsFormSetMeta<T extends SpsFormSetValue, U extends SpsFormSetMembers<T> = InferredSpsFormMetaSetMembers<T>> extends SpsFormFieldMeta<T> {
|
|
60
60
|
fields: U;
|
|
61
61
|
constructor(path: Path, update: UpdateFn);
|
|
@@ -86,7 +86,7 @@ export interface SpsFormState<T extends SpsFormSetValue> {
|
|
|
86
86
|
validateForm: () => boolean;
|
|
87
87
|
getCurrentFormValue: () => T;
|
|
88
88
|
}
|
|
89
|
-
export
|
|
90
|
-
export
|
|
89
|
+
export type SpsValidatorMapValue = Array<SpsValidator<any>> | ((value: any) => Array<SpsValidator<any>>);
|
|
90
|
+
export type SpsValidatorMap = Record<string, SpsValidatorMapValue>;
|
|
91
91
|
export declare function useSpsForm<T extends SpsFormSetValue>(value: T, validatorMap?: SpsValidatorMap): SpsFormState<T>;
|
|
92
92
|
export {};
|
|
@@ -14,7 +14,7 @@ export declare const SpsValidators: Readonly<{
|
|
|
14
14
|
positiveOrNegativeNumber: SpsValidator<string>;
|
|
15
15
|
OnBlurErrorKeys: Set<string>;
|
|
16
16
|
setDateFormat(format: string): void;
|
|
17
|
-
date: SpsValidator<import("@spscommerce/ds-shared").SimpleDate | import("
|
|
18
|
-
dateRange: SpsValidator<import("@spscommerce/ds-shared").SimpleDateRange | import("
|
|
19
|
-
dateConstraint: SpsValidatorFactory<import("@spscommerce/ds-shared").SimpleDate | import("
|
|
17
|
+
date: SpsValidator<import("@spscommerce/ds-shared").SimpleDate | import("@spscommerce/ds-shared").SimpleDateRange | import("moment").Moment | import("@spscommerce/ds-shared").SimpleMomentRange | null>;
|
|
18
|
+
dateRange: SpsValidator<import("@spscommerce/ds-shared").SimpleDateRange | import("moment").Duration | import("@spscommerce/ds-shared").SimpleMomentRange>;
|
|
19
|
+
dateConstraint: SpsValidatorFactory<import("@spscommerce/ds-shared").SimpleDate | import("@spscommerce/ds-shared").SimpleDateRange | import("moment").Moment | import("@spscommerce/ds-shared").SimpleMomentRange>;
|
|
20
20
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export type SpsValidationErrors = Record<string, boolean | number | string | Record<string, any>>;
|
|
2
|
+
export type SpsValidationStatus = SpsValidationErrors | null;
|
|
3
|
+
export type SpsValidator<T> = (value: T) => SpsValidationStatus;
|
|
4
|
+
export type SpsValidatorFactory<T> = (...args: any[]) => SpsValidator<T>;
|
|
5
5
|
export declare const OnBlurErrorKeys: Set<string>;
|
|
6
6
|
export declare const AsTypingErrorKeys: Set<string>;
|
|
7
7
|
export declare const PreventativeErrorKeys: Set<string>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GrowlerKind } from "@spscommerce/ds-shared";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
|
-
export
|
|
4
|
+
export type SpsGrowlerProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
5
|
imgSrc?: string;
|
|
6
6
|
kind?: GrowlerKind;
|
|
7
7
|
onClose?: () => void;
|
package/lib/icon/SpsIcon.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { SpsIcon as SpsIconEnum } from "@spscommerce/ds-shared";
|
|
|
2
2
|
import { SpsIconSize } from "@spscommerce/ds-shared";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
5
|
-
export
|
|
5
|
+
export type SpsIconProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
6
6
|
icon: SpsIconEnum;
|
|
7
7
|
size?: SpsIconSize;
|
|
8
8
|
}> & React.HTMLAttributes<HTMLElement>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
-
export
|
|
3
|
+
export type SpsIncrementorProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
4
4
|
autoComplete?: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
defaultValue?: number;
|