@spscommerce/ds-react 6.37.2 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/lib/advanced-search/SpsAdvancedSearch.d.ts +8 -20
  2. package/lib/autocomplete/SpsAutocomplete.d.ts +19 -25
  3. package/lib/button/SpsButton.d.ts +13 -17
  4. package/lib/button/SpsButtonGroup.d.ts +3 -9
  5. package/lib/button/SpsIconButtonPanel.d.ts +3 -9
  6. package/lib/card/SpsCard.d.ts +9 -14
  7. package/lib/card/SpsCardHeader.d.ts +8 -13
  8. package/lib/card/SpsCardTabbedPane.d.ts +14 -18
  9. package/lib/card/index.d.ts +0 -1
  10. package/lib/checkbox/SpsCheckbox.d.ts +12 -17
  11. package/lib/checkbox-dropdown/SpsCheckboxDropdown.d.ts +6 -14
  12. package/lib/clickable-tag/SpsClickableTag.d.ts +9 -14
  13. package/lib/column-chooser/SpsColumnChooser.d.ts +8 -13
  14. package/lib/column-chooser/SpsColumnChooserColumn.d.ts +12 -16
  15. package/lib/conditional-field/SpsConditionalField.d.ts +6 -11
  16. package/lib/content-row/SpsContentRow.d.ts +14 -20
  17. package/lib/content-row/SpsContentRowCol.d.ts +9 -14
  18. package/lib/content-row/SpsContentRowExpansion.d.ts +3 -9
  19. package/lib/currency-input/SpsCurrencyInput.d.ts +9 -15
  20. package/lib/dateRangePicker/SpsDateRangePicker.d.ts +10 -16
  21. package/lib/datepicker/SpsDatepicker.d.ts +10 -15
  22. package/lib/datepicker/SpsDatepickerCalendar.d.ts +8 -15
  23. package/lib/datepicker/SpsDatepickerPopup.d.ts +10 -12
  24. package/lib/datepicker/useMoment.d.ts +1 -1
  25. package/lib/datepicker/utils.d.ts +7 -7
  26. package/lib/datetime/SpsDateTime.d.ts +10 -16
  27. package/lib/description-list/SpsDescriptionList.d.ts +8 -13
  28. package/lib/description-list/SpsDescriptionListDefinition.d.ts +4 -10
  29. package/lib/description-list/SpsDescriptionListTerm.d.ts +10 -15
  30. package/lib/dropdown/SpsDropdown.d.ts +20 -25
  31. package/lib/feedback-block/SpsFeedbackBlock.d.ts +5 -10
  32. package/lib/fieldset/SpsFieldset.d.ts +13 -18
  33. package/lib/filter-panel/SpsFilterPanel.d.ts +3 -9
  34. package/lib/filter-panel/SpsFilterPanelCap.d.ts +5 -10
  35. package/lib/filter-panel/SpsFilterPanelFilterBox.d.ts +7 -13
  36. package/lib/filter-panel/SpsFilterPanelSection.d.ts +10 -15
  37. package/lib/filter-tile-list/SpsFilterTile.d.ts +8 -13
  38. package/lib/filter-tile-list/SpsFilterTileList.d.ts +3 -9
  39. package/lib/focused-task/SpsFocusedTask.d.ts +7 -12
  40. package/lib/focused-task/SpsFocusedTaskActions.d.ts +3 -9
  41. package/lib/form/SpsForm.d.ts +6 -12
  42. package/lib/form/SpsFormComponentWrapper.d.ts +7 -12
  43. package/lib/form/hooks/useFormControlId.d.ts +2 -2
  44. package/lib/form/hooks/useServerSideValidation.d.ts +1 -1
  45. package/lib/form/hooks/useSpsForm.d.ts +9 -9
  46. package/lib/growler/SpsGrowler.d.ts +8 -14
  47. package/lib/growler/useGrowlers.d.ts +2 -2
  48. package/lib/icon/SpsIcon.d.ts +8 -12
  49. package/lib/incrementor/SpsIncrementor.d.ts +9 -14
  50. package/lib/index.cjs.js +1075 -1600
  51. package/lib/index.es.js +22208 -28832
  52. package/lib/input-group/SpsInputGroup.d.ts +8 -13
  53. package/lib/insight-tile/SpsInsightTile.d.ts +12 -17
  54. package/lib/insight-tile/SpsInsights.d.ts +3 -9
  55. package/lib/key-value-list/SpsKeyValueList.d.ts +5 -10
  56. package/lib/key-value-list/SpsKeyValueListItem.d.ts +6 -11
  57. package/lib/key-value-list/index.d.ts +0 -1
  58. package/lib/key-value-tag/SpsKeyValueTag.d.ts +9 -14
  59. package/lib/label/SpsLabel.d.ts +11 -16
  60. package/lib/list-action-bar/SpsListActionBar.d.ts +7 -12
  61. package/lib/list-toolbar/SpsListToolbar.d.ts +20 -25
  62. package/lib/list-toolbar/SpsListToolbarSearch.d.ts +4 -10
  63. package/lib/list-toolbar/SpsListToolbarSearchInfo.d.ts +3 -9
  64. package/lib/list-toolbar/SpsListToolbarSortBy.d.ts +8 -13
  65. package/lib/micro-block/SpsMicroBlock.d.ts +6 -11
  66. package/lib/modal/SpsModal.d.ts +9 -15
  67. package/lib/multi-select/SpsMultiSelect.d.ts +27 -34
  68. package/lib/multi-value-text-input/SpsMultiValueTextInput.d.ts +13 -19
  69. package/lib/option-list/SpsOptionListProps.d.ts +46 -69
  70. package/lib/option-list/useOptionListSearch.d.ts +1 -1
  71. package/lib/option-list-v2/SpsOptionListV2.d.ts +0 -0
  72. package/lib/option-list-v2/index.d.ts +0 -0
  73. package/lib/page-title/SpsPageSubtitle.d.ts +3 -9
  74. package/lib/page-title/SpsPageTitle.d.ts +3 -9
  75. package/lib/pagination/SpsPageSelector.d.ts +10 -15
  76. package/lib/pagination/SpsPagination.d.ts +13 -18
  77. package/lib/product-bar/SpsProductBar.d.ts +11 -17
  78. package/lib/progress-bar/SpsProgressBar.d.ts +9 -14
  79. package/lib/progress-ring/SpsProgressRing.d.ts +6 -11
  80. package/lib/prop-types.d.ts +4 -23
  81. package/lib/radio-button/SpsRadioButton.d.ts +14 -20
  82. package/lib/scrollable-container/SpsScrollableContainer.d.ts +5 -10
  83. package/lib/scrollable-container/index.d.ts +0 -1
  84. package/lib/search-results-bar/SpsSearchResultsBar.d.ts +7 -12
  85. package/lib/search-results-bar/SpsSearchResultsBarV2.d.ts +8 -13
  86. package/lib/select/SpsSelect.d.ts +57 -34
  87. package/lib/slack-link/SpsSlackLink.d.ts +5 -10
  88. package/lib/slide-in-panel/SpsSlideInPanel.d.ts +8 -14
  89. package/lib/sorting-header/SpsSortingHeader.d.ts +6 -11
  90. package/lib/sorting-header/SpsSortingHeaderCell.d.ts +10 -15
  91. package/lib/spinner/SpsSpinner.d.ts +7 -12
  92. package/lib/spinner/index.d.ts +0 -1
  93. package/lib/split-button/SpsSplitButton.d.ts +13 -17
  94. package/lib/stepped-progress-bar/SpsSteppedProgressBar.d.ts +11 -12
  95. package/lib/summary-list/SpsSummaryListColumn.d.ts +8 -13
  96. package/lib/summary-list/SpsSummaryListExpansion.d.ts +3 -9
  97. package/lib/summary-list/SpsSummaryListRow.d.ts +7 -12
  98. package/lib/table/SpsTable.d.ts +12 -17
  99. package/lib/table/SpsTableBody.d.ts +3 -9
  100. package/lib/table/SpsTableCell.d.ts +8 -13
  101. package/lib/table/SpsTableHead.d.ts +5 -10
  102. package/lib/table/SpsTableHeader.d.ts +8 -13
  103. package/lib/table/SpsTableRow.d.ts +3 -9
  104. package/lib/table/useColumnResizer.d.ts +2 -2
  105. package/lib/table/usePinnedStyles.d.ts +4 -4
  106. package/lib/tabs/SpsTabs.d.ts +7 -12
  107. package/lib/tag/SpsTag.d.ts +8 -12
  108. package/lib/task-queue/SpsTaskQueue.d.ts +14 -20
  109. package/lib/text-input/SpsTextInput.d.ts +26 -20
  110. package/lib/textarea/SpsTextarea.d.ts +13 -19
  111. package/lib/tile-list/SpsTile.d.ts +13 -18
  112. package/lib/tile-list/SpsTileList.d.ts +3 -9
  113. package/lib/toggle/SpsToggle.d.ts +13 -19
  114. package/lib/tooltip/SpsTooltip.d.ts +13 -19
  115. package/lib/tooltip/SpsTooltipTitle.d.ts +8 -12
  116. package/lib/utils/contentOf.d.ts +2 -2
  117. package/lib/utils/useCheckDeprecatedProps.d.ts +1 -2
  118. package/lib/utils/useElementId.d.ts +3 -2
  119. package/lib/utils/useInputPopup.d.ts +1 -1
  120. package/lib/utils/usePortal.d.ts +3 -3
  121. package/lib/vertical-rule/SpsVerticalRule.d.ts +3 -9
  122. package/lib/wizard/SpsWizardSidebar.d.ts +5 -10
  123. package/lib/wizard/SpsWizardSubstep.d.ts +7 -12
  124. package/lib/workflow/SpsWorkflow.d.ts +7 -12
  125. package/lib/workflow/SpsWorkflowDocument.d.ts +3 -9
  126. package/lib/workflow/SpsWorkflowDocumentStatus.d.ts +6 -11
  127. package/lib/workflow/SpsWorkflowStep.d.ts +7 -12
  128. package/lib/zero-state/SpsMicroZeroState.d.ts +9 -14
  129. package/lib/zero-state/SpsZeroState.d.ts +8 -13
  130. package/package.json +35 -22
  131. package/vite.config.js +6 -6
  132. package/lib/_template/SpsComponent.d.ts +0 -15
  133. package/lib/_template/SpsComponent.examples.d.ts +0 -2
  134. package/lib/_template/index.d.ts +0 -2
  135. package/lib/card/SpsCard.examples.d.ts +0 -2
  136. package/lib/insight-tile/SpsInsightTile.examples.d.ts +0 -2
  137. package/lib/key-value-list/SpsKeyValueList.examples.d.ts +0 -2
  138. package/lib/scrollable-container/SpsScrollableContainer.examples.d.ts +0 -14
  139. package/lib/spinner/SpsSpinner.examples.d.ts +0 -2
  140. package/lib/test-util.d.ts +0 -2
@@ -1,22 +1,10 @@
1
1
  import * as React from "react";
2
- import type { SpsFormSetMeta } from "../form/hooks/useSpsForm";
3
- import type { SpsFormArray } from "../form/hooks/formArray";
4
- import type { SpsFormGroup } from "../form/hooks/formGroup";
5
- import * as PropTypes from "../prop-types";
6
- declare const propTypes: {
7
- controlsDisabled: PropTypes.Requireable<boolean>;
8
- footerLinks: PropTypes.Requireable<PropTypes.ReactNodeOrRenderFn>;
9
- formArray: PropTypes.Requireable<SpsFormArray<any>>;
10
- formGroup: PropTypes.Requireable<SpsFormGroup>;
11
- formMeta: PropTypes.Requireable<SpsFormSetMeta<any, import("../form/hooks/useSpsForm").InferredSpsFormMetaSetMembers<any>>>;
12
- isOpen: PropTypes.Requireable<boolean>;
13
- onClear: PropTypes.Requireable<() => void>;
14
- onSubmit: PropTypes.Requireable<React.FormEventHandler<Element>>;
15
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
16
- className: PropTypes.Requireable<string>;
17
- "data-testid": PropTypes.Requireable<string>;
18
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
19
- };
20
- export declare type SpsAdvancedSearchProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
2
+ import type { SpsFormProps } from "../form/SpsForm";
3
+ import type { SpsGlobalPropTypes } from "../prop-types";
4
+ export declare type SpsAdvancedSearchProps = React.PropsWithChildren<SpsGlobalPropTypes & SpsFormProps & {
5
+ controlsDisabled?: boolean;
6
+ footerLinks?: React.ReactNode | (() => React.ReactNode);
7
+ isOpen?: boolean;
8
+ onClear?: () => void;
9
+ }> & React.HTMLAttributes<HTMLDivElement>;
21
10
  export declare function SpsAdvancedSearch(props: SpsAdvancedSearchProps): JSX.Element;
22
- export {};
@@ -1,30 +1,24 @@
1
- import { SpsIcon } from "@spscommerce/ds-shared";
1
+ import type { SpsIcon } from "@spscommerce/ds-shared";
2
2
  import type { Eventually } from "@spscommerce/utils";
3
3
  import * as React from "react";
4
4
  import type { SpsFormControl } from "../form/hooks/formControl";
5
5
  import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
6
- import * as PropTypes from "../prop-types";
7
- declare const propTypes: {
8
- debounce: PropTypes.Requireable<number>;
9
- disabled: PropTypes.Requireable<boolean>;
10
- formControl: PropTypes.Requireable<SpsFormControl<string>>;
11
- formMeta: PropTypes.Requireable<SpsFormFieldMeta<string>>;
12
- icon: PropTypes.Requireable<SpsIcon>;
13
- onChange: PropTypes.Requireable<React.ChangeEventHandler<Element>>;
14
- placeholder: PropTypes.Requireable<string>;
15
- suggestions: PropTypes.Validator<string[] | Promise<string[]> | ((filter?: string) => Eventually<string[]>)>;
16
- tallOptionList: PropTypes.Requireable<boolean>;
17
- value: PropTypes.Requireable<string>;
18
- zeroState: PropTypes.Requireable<string>;
19
- loading: PropTypes.Requireable<boolean>;
20
- maxHeightOptionListPx: PropTypes.Requireable<number>;
21
- maxHeightOptionListRem: PropTypes.Requireable<number>;
22
- disableOptionsMemoization: PropTypes.Requireable<boolean>;
23
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
24
- className: PropTypes.Requireable<string>;
25
- "data-testid": PropTypes.Requireable<string>;
26
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
27
- };
28
- export declare type SpsAutocompleteProps = PropTypes.InferTS<typeof propTypes, HTMLInputElement>;
6
+ import type { SpsGlobalPropTypes } from "../prop-types";
7
+ export declare type SpsAutocompleteProps = React.PropsWithChildren<SpsGlobalPropTypes & {
8
+ debounce?: number;
9
+ disabled?: boolean;
10
+ formControl?: SpsFormControl<string>;
11
+ formMeta?: SpsFormFieldMeta<string>;
12
+ icon?: SpsIcon;
13
+ onChange?: React.ChangeEventHandler;
14
+ placeholder?: string;
15
+ suggestions: string[] | Promise<string[]> | ((filter?: string) => Eventually<string[]>);
16
+ tallOptionList?: boolean;
17
+ value?: string;
18
+ zeroState?: string;
19
+ loading?: boolean;
20
+ maxHeightOptionListPx?: number;
21
+ maxHeightOptionListRem?: number;
22
+ disableOptionsMemoization?: boolean;
23
+ }> & React.HTMLAttributes<HTMLInputElement>;
29
24
  export declare function SpsAutocomplete({ className, debounce, disabled, formControl, formMeta, onChange, icon, id, placeholder, suggestions, unsafelyReplaceClassName, tallOptionList, value, zeroState, loading, maxHeightOptionListPx, maxHeightOptionListRem, disableOptionsMemoization, "data-testid": testId, ...rest }: SpsAutocompleteProps): JSX.Element;
30
- export {};
@@ -1,18 +1,14 @@
1
- import { ButtonKind, ButtonType, SpsIcon } from "@spscommerce/ds-shared";
2
- import * as PropTypes from "../prop-types";
3
- declare const propTypes: {
4
- disabled: PropTypes.Requireable<boolean>;
5
- href: PropTypes.Requireable<string>;
6
- icon: PropTypes.Requireable<SpsIcon>;
7
- kind: PropTypes.Requireable<ButtonKind>;
8
- spinning: PropTypes.Requireable<boolean>;
9
- spinningTitle: PropTypes.Requireable<string>;
10
- type: PropTypes.Requireable<ButtonType>;
11
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
12
- className: PropTypes.Requireable<string>;
13
- "data-testid": PropTypes.Requireable<string>;
14
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
15
- };
16
- export declare type SpsButtonProps = PropTypes.InferTS<typeof propTypes, HTMLButtonElement | HTMLAnchorElement>;
1
+ import { ButtonKind, ButtonType } from "@spscommerce/ds-shared";
2
+ import type { SpsIcon } from "@spscommerce/ds-shared";
3
+ import * as React from "react";
4
+ import type { SpsGlobalPropTypes } from "../prop-types";
5
+ export declare type SpsButtonProps = React.PropsWithChildren<SpsGlobalPropTypes & {
6
+ disabled?: boolean;
7
+ href?: string;
8
+ icon?: SpsIcon;
9
+ kind?: ButtonKind;
10
+ spinning?: boolean;
11
+ spinningTitle?: string;
12
+ type?: ButtonType;
13
+ }> & React.HTMLProps<HTMLButtonElement | HTMLAnchorElement>;
17
14
  export declare function SpsButton(props: SpsButtonProps): JSX.Element;
18
- export {};
@@ -1,10 +1,4 @@
1
- import * as PropTypes from "../prop-types";
2
- declare const propTypes: {
3
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
4
- className: PropTypes.Requireable<string>;
5
- "data-testid": PropTypes.Requireable<string>;
6
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
7
- };
8
- export declare type SpsButtonGroupProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
1
+ import * as React from "react";
2
+ import type { SpsGlobalPropTypes } from "../prop-types";
3
+ export declare type SpsButtonGroupProps = React.PropsWithChildren<SpsGlobalPropTypes> & React.HTMLAttributes<HTMLDivElement>;
9
4
  export declare function SpsButtonGroup(props: SpsButtonGroupProps): JSX.Element;
10
- export {};
@@ -1,10 +1,4 @@
1
- import * as PropTypes from "../prop-types";
2
- declare const propTypes: {
3
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
4
- className: PropTypes.Requireable<string>;
5
- "data-testid": PropTypes.Requireable<string>;
6
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
7
- };
8
- export declare type SpsIconButtonPanelProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
1
+ import * as React from "react";
2
+ import type { SpsGlobalPropTypes } from "../prop-types";
3
+ export declare type SpsIconButtonPanelProps = React.PropsWithChildren<SpsGlobalPropTypes> & React.HTMLAttributes<HTMLDivElement>;
9
4
  export declare function SpsIconButtonPanel({ children, className, ...rest }: SpsIconButtonPanelProps): JSX.Element;
10
- export {};
@@ -1,16 +1,11 @@
1
1
  import { SpsIcon } from '@spscommerce/ds-shared';
2
- import * as PropTypes from '../prop-types';
3
- declare const propTypes: {
4
- activeTab: PropTypes.Requireable<string>;
5
- footer: PropTypes.Requireable<PropTypes.ReactNodeOrRenderFn>;
6
- headerContent: PropTypes.Requireable<PropTypes.ReactNodeOrRenderFn>;
7
- headerIcon: PropTypes.Requireable<SpsIcon>;
8
- headerTitle: PropTypes.Requireable<string>;
9
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
10
- className: PropTypes.Requireable<string>;
11
- "data-testid": PropTypes.Requireable<string>;
12
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
13
- };
14
- export declare type SpsCardProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
2
+ import * as React from 'react';
3
+ import type { SpsGlobalPropTypes } from '../prop-types';
4
+ export declare type SpsCardProps = React.PropsWithChildren<SpsGlobalPropTypes & {
5
+ activeTab?: string;
6
+ footer?: React.ReactNode | (() => React.ReactNode);
7
+ headerContent?: React.ReactNode | (() => React.ReactNode);
8
+ headerIcon?: SpsIcon;
9
+ headerTitle?: string;
10
+ }> & React.HTMLAttributes<HTMLDivElement>;
15
11
  export declare function SpsCard(props: SpsCardProps): JSX.Element;
16
- export {};
@@ -1,14 +1,9 @@
1
- import { SpsIcon } from "@spscommerce/ds-shared";
2
- import * as PropTypes from "../prop-types";
3
- declare const propTypes: {
4
- content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
5
- icon: PropTypes.Requireable<SpsIcon>;
6
- title: PropTypes.Requireable<string>;
7
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
8
- className: PropTypes.Requireable<string>;
9
- "data-testid": PropTypes.Requireable<string>;
10
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
11
- };
12
- export declare type SpsCardHeaderProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
1
+ import type { SpsIcon } from "@spscommerce/ds-shared";
2
+ import * as React from "react";
3
+ import type { SpsGlobalPropTypes } from "../prop-types";
4
+ export declare type SpsCardHeaderProps = React.PropsWithChildren<SpsGlobalPropTypes & {
5
+ content?: React.ReactNode;
6
+ icon?: SpsIcon;
7
+ title?: string;
8
+ }> & React.HTMLAttributes<HTMLDivElement>;
13
9
  export declare function SpsCardHeader(props: SpsCardHeaderProps): JSX.Element;
14
- export {};
@@ -1,19 +1,15 @@
1
- import { SpsIcon, TagKind } from "@spscommerce/ds-shared";
2
- import * as PropTypes from "../prop-types";
3
- declare const propTypes: {
4
- activateTab: PropTypes.Requireable<(...args: any[]) => any>;
5
- active: PropTypes.Requireable<boolean>;
6
- icon: PropTypes.Requireable<SpsIcon>;
7
- label: PropTypes.Requireable<string>;
8
- index: PropTypes.Requireable<number>;
9
- tag: PropTypes.Requireable<string>;
10
- tagKind: PropTypes.Requireable<TagKind>;
11
- tagIcon: PropTypes.Requireable<SpsIcon>;
12
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
13
- className: PropTypes.Requireable<string>;
14
- "data-testid": PropTypes.Requireable<string>;
15
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
16
- };
17
- export declare type SpsCardTabbedPaneProps = PropTypes.InferTS<typeof propTypes, HTMLAnchorElement>;
1
+ import type { SpsIcon } from "@spscommerce/ds-shared";
2
+ import { TagKind } from "@spscommerce/ds-shared";
3
+ import * as React from "react";
4
+ import type { SpsGlobalPropTypes } from "../prop-types";
5
+ export declare type SpsCardTabbedPaneProps = React.PropsWithChildren<SpsGlobalPropTypes & {
6
+ activateTab?: (target: HTMLAnchorElement, index: number, children: React.ReactNode) => void;
7
+ active?: boolean;
8
+ icon?: SpsIcon;
9
+ label?: string;
10
+ index?: number;
11
+ tag?: string;
12
+ tagKind?: TagKind;
13
+ tagIcon?: SpsIcon;
14
+ }> & React.HTMLAttributes<HTMLAnchorElement>;
18
15
  export declare function SpsCardTabbedPane(props: SpsCardTabbedPaneProps): JSX.Element;
19
- export {};
@@ -1,3 +1,2 @@
1
1
  export * from "./SpsCard";
2
2
  export * from "./SpsCardTabbedPane";
3
- export * from "./SpsCard.examples";
@@ -1,21 +1,16 @@
1
1
  import * as React from "react";
2
- import * as PropTypes from "../prop-types";
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
- declare const propTypes: {
6
- checked: PropTypes.Requireable<boolean>;
7
- disabled: PropTypes.Requireable<boolean>;
8
- formControl: PropTypes.Requireable<SpsFormControl<boolean>>;
9
- formMeta: PropTypes.Requireable<SpsFormFieldMeta<boolean>>;
10
- indeterminate: PropTypes.Requireable<boolean>;
11
- inline: PropTypes.Requireable<boolean>;
12
- label: PropTypes.Requireable<string>;
13
- onChange: PropTypes.Requireable<React.ChangeEventHandler<Element>>;
14
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
15
- className: PropTypes.Requireable<string>;
16
- "data-testid": PropTypes.Requireable<string>;
17
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
18
- };
19
- export declare type SpsCheckboxProps = PropTypes.InferTS<typeof propTypes, HTMLInputElement>;
5
+ export declare type SpsCheckboxProps = React.PropsWithChildren<SpsGlobalPropTypes & {
6
+ checked?: boolean;
7
+ disabled?: boolean;
8
+ formControl?: SpsFormControl<boolean>;
9
+ formMeta?: SpsFormFieldMeta<boolean>;
10
+ indeterminate?: boolean;
11
+ inline?: boolean;
12
+ label?: string;
13
+ name?: string;
14
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
15
+ }> & React.HTMLAttributes<HTMLInputElement>;
20
16
  export declare function SpsCheckbox({ checked: checkedProp, className, disabled, formControl, formMeta, id, indeterminate: indeterminateProp, inline, label, onChange, "data-testid": testId, unsafelyReplaceClassName, ...rest }: SpsCheckboxProps): JSX.Element;
21
- export {};
@@ -1,17 +1,9 @@
1
- import type { SpsActionMethod, SpsActionDescriptor } from "@spscommerce/ds-shared";
2
1
  import * as React from "react";
3
- import * as PropTypes from "../prop-types";
4
- declare const propTypes: {
5
- checked: PropTypes.Requireable<boolean>;
6
- onChange: PropTypes.Requireable<React.ChangeEventHandler<Element>>;
7
- indeterminate: PropTypes.Requireable<boolean>;
8
- options: PropTypes.Validator<(SpsActionMethod | [SpsActionDescriptor, () => void])[]>;
9
- disabled: PropTypes.Requireable<boolean>;
10
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
11
- className: PropTypes.Requireable<string>;
12
- "data-testid": PropTypes.Requireable<string>;
13
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
14
- };
15
- export declare type SpsCheckboxDropdownProps = PropTypes.InferTS<typeof propTypes, HTMLElement>;
2
+ import type { SpsGlobalPropTypes } from "../prop-types";
3
+ import { SpsCheckbox } from "../checkbox/SpsCheckbox";
4
+ import { SpsDropdown } from "../dropdown/SpsDropdown";
5
+ declare type PassthruCheckboxProps = Pick<Parameters<typeof SpsCheckbox>[0], "checked" | "onChange" | "indeterminate" | "disabled">;
6
+ declare type PassthruDropdownProps = Pick<Parameters<typeof SpsDropdown>[0], "options">;
7
+ export declare type SpsCheckboxDropdownProps = React.PropsWithChildren<SpsGlobalPropTypes & PassthruCheckboxProps & PassthruDropdownProps> & React.HTMLAttributes<HTMLElement>;
16
8
  export declare function SpsCheckboxDropdown(props: SpsCheckboxDropdownProps): JSX.Element;
17
9
  export {};
@@ -1,16 +1,11 @@
1
1
  import { ClickableTagKind } from "@spscommerce/ds-shared";
2
- import * as PropTypes from "../prop-types";
3
- declare const propTypes: {
4
- disabled: PropTypes.Requireable<boolean>;
5
- href: PropTypes.Requireable<string>;
6
- kind: PropTypes.Requireable<ClickableTagKind>;
7
- onAdd: PropTypes.Requireable<() => void>;
8
- onRemove: PropTypes.Requireable<() => void>;
9
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
10
- className: PropTypes.Requireable<string>;
11
- "data-testid": PropTypes.Requireable<string>;
12
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
13
- };
14
- export declare type SpsClickableTagProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
2
+ import * as React from "react";
3
+ import type { SpsGlobalPropTypes } from "../prop-types";
4
+ export declare type SpsClickableTagProps = React.PropsWithChildren<SpsGlobalPropTypes & {
5
+ disabled?: boolean;
6
+ href?: string;
7
+ kind?: ClickableTagKind;
8
+ onAdd?: () => void;
9
+ onRemove?: () => void;
10
+ }> & React.HTMLAttributes<HTMLDivElement>;
15
11
  export declare function SpsClickableTag(props: SpsClickableTagProps): JSX.Element;
16
- export {};
@@ -1,19 +1,14 @@
1
- import * as PropTypes from "../prop-types";
2
- declare const propTypes: {
3
- maxSelectedColumns: PropTypes.Requireable<number>;
4
- unselectedColumns: PropTypes.Requireable<any[]>;
5
- selectedColumns: PropTypes.Requireable<any[]>;
6
- onApplyChanges: PropTypes.Requireable<(selectedColumns: ColumnProps[]) => void>;
7
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
8
- className: PropTypes.Requireable<string>;
9
- "data-testid": PropTypes.Requireable<string>;
10
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
11
- };
12
- export declare type SpsColumnChooserProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
1
+ import * as React from "react";
2
+ import type { SpsGlobalPropTypes } from "../prop-types";
3
+ export declare type SpsColumnChooserProps = React.PropsWithChildren<SpsGlobalPropTypes & {
4
+ maxSelectedColumns?: number | null;
5
+ unselectedColumns?: any[];
6
+ selectedColumns?: any[];
7
+ onApplyChanges?: (selectedColumns: ColumnProps[]) => void;
8
+ }> & React.HTMLAttributes<HTMLDivElement>;
13
9
  export interface ColumnProps {
14
10
  name: string;
15
11
  value: string;
16
12
  mandatory?: boolean;
17
13
  }
18
14
  export declare function SpsColumnChooser(props: SpsColumnChooserProps): JSX.Element;
19
- export {};
@@ -1,17 +1,13 @@
1
- import * as PropTypes from "../prop-types";
2
- declare const propTypes: {
3
- index: PropTypes.Requireable<number>;
4
- key: PropTypes.Requireable<string>;
5
- columnId: PropTypes.Requireable<string>;
6
- name: PropTypes.Requireable<string>;
7
- value: PropTypes.Requireable<string>;
8
- onDelete: PropTypes.Requireable<(columnValue: string) => void>;
9
- mandatory: PropTypes.Requireable<boolean>;
10
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
11
- className: PropTypes.Requireable<string>;
12
- "data-testid": PropTypes.Requireable<string>;
13
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
14
- };
15
- export declare type SpsColumnChooserColumnProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
1
+ import * as React from "react";
2
+ import type { SpsGlobalPropTypes } from "../prop-types";
3
+ export declare type SpsColumnChooserColumnProps = React.PropsWithChildren<SpsGlobalPropTypes & {
4
+ index?: number;
5
+ key?: string;
6
+ columnId?: string;
7
+ ref?: React.MutableRefObject<HTMLDivElement>;
8
+ name?: string;
9
+ value?: string;
10
+ onDelete?: (columnValue: string) => void;
11
+ mandatory?: boolean;
12
+ }> & React.HTMLAttributes<HTMLDivElement>;
16
13
  export declare function SpsColumnChooserColumn(props: SpsColumnChooserColumnProps): JSX.Element;
17
- export {};
@@ -1,11 +1,6 @@
1
- import * as PropTypes from "../prop-types";
2
- declare const propTypes: {
3
- showCondition: PropTypes.Requireable<boolean>;
4
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
5
- className: PropTypes.Requireable<string>;
6
- "data-testid": PropTypes.Requireable<string>;
7
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
8
- };
9
- export declare type SpsConditionalFieldProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
10
- export declare function SpsConditionalField({ showCondition, children, className, ...rest }: SpsConditionalFieldProps): JSX.Element;
11
- export {};
1
+ import * as React from "react";
2
+ import type { SpsGlobalPropTypes } from "../prop-types";
3
+ export declare type SpsConditionalFieldProps = React.PropsWithChildren<SpsGlobalPropTypes & {
4
+ showCondition?: boolean;
5
+ }> & React.HTMLAttributes<HTMLDivElement>;
6
+ export declare function SpsConditionalField({ showCondition, children, className, ...rest }: SpsConditionalFieldProps): JSX.Element | null;
@@ -1,22 +1,16 @@
1
1
  import * as React from "react";
2
- import * as PropTypes from "../prop-types";
3
- declare const propTypes: {
4
- alternateLayout: PropTypes.Requireable<boolean>;
5
- cardSpacing: PropTypes.Requireable<boolean>;
6
- expanded: PropTypes.Requireable<boolean>;
7
- initiallyExpanded: PropTypes.Requireable<boolean>;
8
- onBeforeCollapsed: PropTypes.Requireable<() => boolean>;
9
- onBeforeExpanded: PropTypes.Requireable<() => boolean>;
10
- onSelectionChange: PropTypes.Requireable<React.ChangeEventHandler<Element>>;
11
- onCollapsed: PropTypes.Requireable<() => void>;
12
- onExpanded: PropTypes.Requireable<() => void>;
13
- selectable: PropTypes.Requireable<boolean>;
14
- selected: PropTypes.Requireable<boolean>;
15
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
16
- className: PropTypes.Requireable<string>;
17
- "data-testid": PropTypes.Requireable<string>;
18
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
19
- };
20
- export declare type SpsContentRowProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
2
+ import type { SpsGlobalPropTypes } from "../prop-types";
3
+ export declare type SpsContentRowProps = React.PropsWithChildren<SpsGlobalPropTypes & {
4
+ alternateLayout?: boolean;
5
+ cardSpacing?: boolean;
6
+ expanded?: boolean;
7
+ initiallyExpanded?: boolean;
8
+ onBeforeCollapsed?: () => boolean;
9
+ onBeforeExpanded?: () => boolean;
10
+ onSelectionChange?: React.ChangeEventHandler<HTMLInputElement>;
11
+ onCollapsed?: () => void;
12
+ onExpanded?: () => void;
13
+ selectable?: boolean;
14
+ selected?: boolean;
15
+ }> & React.HTMLAttributes<HTMLDivElement>;
21
16
  export declare function SpsContentRow(props: SpsContentRowProps): JSX.Element;
22
- export {};
@@ -1,15 +1,10 @@
1
- import * as PropTypes from "../prop-types";
2
- declare const propTypes: {
3
- borderless: PropTypes.Requireable<boolean>;
4
- lean: PropTypes.Requireable<boolean>;
5
- leaner: PropTypes.Requireable<boolean>;
6
- widthPx: PropTypes.Requireable<number>;
7
- widthRem: PropTypes.Requireable<number>;
8
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
9
- className: PropTypes.Requireable<string>;
10
- "data-testid": PropTypes.Requireable<string>;
11
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
12
- };
13
- export declare type SpsContentRowColProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
1
+ import * as React from "react";
2
+ import type { SpsGlobalPropTypes } from "../prop-types";
3
+ export declare type SpsContentRowColProps = React.PropsWithChildren<SpsGlobalPropTypes & {
4
+ borderless?: boolean;
5
+ lean?: boolean;
6
+ leaner?: boolean;
7
+ widthPx?: number;
8
+ widthRem?: number;
9
+ }> & React.HTMLAttributes<HTMLDivElement>;
14
10
  export declare function SpsContentRowCol(props: SpsContentRowColProps): JSX.Element;
15
- export {};
@@ -1,10 +1,4 @@
1
- import * as PropTypes from "../prop-types";
2
- declare const propTypes: {
3
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
4
- className: PropTypes.Requireable<string>;
5
- "data-testid": PropTypes.Requireable<string>;
6
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
7
- };
8
- export declare type SpsContentRowExpansionProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
1
+ import * as React from "react";
2
+ import type { SpsGlobalPropTypes } from "../prop-types";
3
+ export declare type SpsContentRowExpansionProps = React.PropsWithChildren<SpsGlobalPropTypes> & React.HTMLAttributes<HTMLDivElement>;
9
4
  export declare function SpsContentRowExpansion(props: SpsContentRowExpansionProps): JSX.Element;
10
- export {};
@@ -1,18 +1,12 @@
1
1
  import * as React from "react";
2
- import * as PropTypes from "../prop-types";
2
+ import type { SpsGlobalPropTypes } from "../prop-types";
3
3
  import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
4
- declare const propTypes: {
5
- disabled: PropTypes.Requireable<boolean>;
6
- formMeta: PropTypes.Requireable<SpsFormFieldMeta<number>>;
7
- name: PropTypes.Requireable<string>;
8
- onChange: PropTypes.Requireable<(newValue: number) => void>;
9
- ref: PropTypes.Requireable<React.MutableRefObject<HTMLDivElement>>;
10
- value: PropTypes.Requireable<number>;
11
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
12
- className: PropTypes.Requireable<string>;
13
- "data-testid": PropTypes.Requireable<string>;
14
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
15
- };
16
- export declare type SpsCurrencyInputProps = PropTypes.InferTS<typeof propTypes, HTMLInputElement>;
4
+ export declare type SpsCurrencyInputProps = React.PropsWithChildren<SpsGlobalPropTypes & {
5
+ disabled?: boolean;
6
+ formMeta?: SpsFormFieldMeta<number>;
7
+ name?: string;
8
+ onChange?: (newValue: number) => void;
9
+ ref?: React.MutableRefObject<HTMLDivElement>;
10
+ value?: number;
11
+ }> & React.HTMLAttributes<HTMLInputElement>;
17
12
  export declare function SpsCurrencyInput({ className, disabled, formMeta, id, name, onChange, ref, title, value, ...rest }: SpsCurrencyInputProps): JSX.Element;
18
- export {};
@@ -1,21 +1,15 @@
1
+ import * as React from "react";
1
2
  import type { SimpleDate, SimpleDateRange, DatePreset } from "@spscommerce/ds-shared";
2
- import * as PropTypes from "../prop-types";
3
+ import type { SpsGlobalPropTypes } from "../prop-types";
3
4
  import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
4
- declare const propTypes: {
5
- disabled: PropTypes.Requireable<boolean>;
6
- formMeta: PropTypes.Requireable<SpsFormFieldMeta<SimpleDateRange | DatePreset>>;
7
- maxDate: PropTypes.Requireable<SimpleDate>;
8
- minDate: PropTypes.Requireable<SimpleDate>;
9
- onChange: PropTypes.Requireable<(newDateRange: SimpleDateRange | DatePreset) => void>;
10
- presets: PropTypes.Requireable<DatePreset[]>;
11
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
12
- className: PropTypes.Requireable<string>;
13
- "data-testid": PropTypes.Requireable<string>;
14
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
15
- };
16
- export declare type SpsDateRangePickerProps = {
5
+ export declare type SpsDateRangePickerProps = React.PropsWithChildren<SpsGlobalPropTypes & {
6
+ disabled?: boolean;
7
+ formMeta?: SpsFormFieldMeta<SimpleDateRange | DatePreset | undefined>;
8
+ maxDate?: SimpleDate;
9
+ minDate?: SimpleDate;
10
+ onChange?: (newDateRange?: SimpleDateRange | DatePreset) => void;
11
+ presets?: DatePreset[];
17
12
  value?: SimpleDateRange | DatePreset;
18
- } & Omit<PropTypes.InferTS<typeof propTypes, HTMLInputElement>, "value">;
13
+ }> & React.HTMLAttributes<HTMLInputElement>;
19
14
  export declare const DEFAULT_PRESETS: DatePreset[];
20
15
  export declare function SpsDateRangePicker({ children, className, disabled, formMeta, id, maxDate, minDate, onChange, presets, value, "data-testid": testId, ...rest }: SpsDateRangePickerProps): JSX.Element;
21
- export {};
@@ -1,18 +1,13 @@
1
+ import * as React from "react";
1
2
  import type { SimpleDate } from "@spscommerce/ds-shared";
2
- import * as PropTypes from "../prop-types";
3
+ import type { SpsGlobalPropTypes } from "../prop-types";
3
4
  import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
4
- declare const propTypes: {
5
- disabled: PropTypes.Requireable<boolean>;
6
- formMeta: PropTypes.Requireable<SpsFormFieldMeta<SimpleDate>>;
7
- maxDate: PropTypes.Requireable<SimpleDate>;
8
- minDate: PropTypes.Requireable<SimpleDate>;
9
- onChange: PropTypes.Requireable<(newDate: SimpleDate) => void>;
10
- value: PropTypes.Requireable<SimpleDate>;
11
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
12
- className: PropTypes.Requireable<string>;
13
- "data-testid": PropTypes.Requireable<string>;
14
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
15
- };
16
- export declare type SpsDatepickerProps = PropTypes.InferTS<typeof propTypes, HTMLInputElement>;
5
+ export declare type SpsDatepickerProps = React.PropsWithChildren<SpsGlobalPropTypes & {
6
+ disabled?: boolean;
7
+ formMeta?: SpsFormFieldMeta<SimpleDate>;
8
+ maxDate?: SimpleDate;
9
+ minDate?: SimpleDate;
10
+ onChange?: (newDate: SimpleDate) => void;
11
+ value?: SimpleDate;
12
+ }> & React.HTMLAttributes<HTMLInputElement>;
17
13
  export declare function SpsDatepicker({ children, className, disabled, formMeta, id, maxDate, minDate, onChange, value, "data-testid": testId, ...rest }: SpsDatepickerProps): JSX.Element;
18
- export {};
@@ -1,18 +1,11 @@
1
+ import * as React from "react";
1
2
  import type { SimpleDate, SimpleDateRange } from "@spscommerce/ds-shared";
2
- import * as PropTypes from "../prop-types";
3
- declare const propTypes: {
4
- maxDate: PropTypes.Requireable<SimpleDate>;
5
- minDate: PropTypes.Requireable<SimpleDate>;
6
- onNewSelection: PropTypes.Validator<(date: SimpleDate) => void>;
7
- selectedDate: PropTypes.Requireable<SimpleDate>;
8
- selectedRange: PropTypes.Requireable<SimpleDate[]>;
9
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
10
- className: PropTypes.Requireable<string>;
11
- "data-testid": PropTypes.Requireable<string>;
12
- unsafelyReplaceClassName: PropTypes.Requireable<string>;
13
- };
14
- export interface SpsDatepickerCalendarProps extends PropTypes.InferTS<typeof propTypes, HTMLDivElement> {
3
+ import type { SpsGlobalPropTypes } from "../prop-types";
4
+ export declare type SpsDatepickerCalendarProps = React.PropsWithChildren<SpsGlobalPropTypes & {
15
5
  selectedRange?: SimpleDateRange;
16
- }
6
+ maxDate?: SimpleDate;
7
+ minDate?: SimpleDate;
8
+ onNewSelection: (date: SimpleDate) => void;
9
+ selectedDate?: SimpleDate;
10
+ }> & React.HTMLAttributes<HTMLDivElement>;
17
11
  export declare function SpsDatepickerCalendar(props: SpsDatepickerCalendarProps): JSX.Element;
18
- export {};