@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.
- 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 -28832
- 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,13 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export declare const SpsDatepickerPopup: React.ForwardRefExoticComponent<Pick<SpsDatepickerPopupProps, "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "data-testid" | "unsafelyReplaceClassName" | "isOpen" | "attachTo"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
export {};
|
|
2
|
+
export declare type SpsDatepickerPopupProps = React.PropsWithChildren<{
|
|
3
|
+
attachTo: React.MutableRefObject<HTMLElement | null>;
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
6
|
+
export declare const SpsDatepickerPopup: React.ForwardRefExoticComponent<{
|
|
7
|
+
attachTo: React.MutableRefObject<HTMLElement | null>;
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
} & {
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -4,19 +4,19 @@ export declare const FORMAT = "MM/DD/YYYY";
|
|
|
4
4
|
export declare const FORMAT_PATTERN: RegExp;
|
|
5
5
|
export declare const SYMBOL_DATE_PARSE_ERROR: unique symbol;
|
|
6
6
|
export declare const SimpleDateUtils: Readonly<{
|
|
7
|
-
createFrom(input: string | Moment): SimpleDate;
|
|
8
|
-
createRangeFrom(input: string): SimpleDateRange;
|
|
9
|
-
isValid(date: SimpleDate): boolean;
|
|
7
|
+
createFrom(input: string | Moment): SimpleDate | null;
|
|
8
|
+
createRangeFrom(input: string): SimpleDateRange | null;
|
|
9
|
+
isValid(date: SimpleDate): boolean | undefined;
|
|
10
10
|
nullifyInvalidDate(value: any): SimpleDate | null;
|
|
11
|
-
toMoment(date: SimpleDate): Moment;
|
|
11
|
+
toMoment(date: SimpleDate): Moment | null;
|
|
12
12
|
toString(date: SimpleDate): string;
|
|
13
13
|
toStringRange(dateRange: SimpleDateRange): string;
|
|
14
14
|
create(): SimpleDate;
|
|
15
15
|
isSameDate(d1: SimpleDate, d2: SimpleDate): boolean;
|
|
16
16
|
isSameMonth(d1: SimpleDate, d2: SimpleDate): boolean;
|
|
17
|
-
isAfter(date: SimpleDate, referenceDate: SimpleDate): boolean;
|
|
18
|
-
isBefore(date: SimpleDate, referenceDate: SimpleDate): boolean;
|
|
19
|
-
isInRange(date: SimpleDate, range: SimpleDateRange, inclusive?: boolean): boolean;
|
|
17
|
+
isAfter(date: SimpleDate, referenceDate: SimpleDate): boolean | null;
|
|
18
|
+
isBefore(date: SimpleDate, referenceDate: SimpleDate): boolean | null;
|
|
19
|
+
isInRange(date: SimpleDate, range: SimpleDateRange, inclusive?: boolean): boolean | 0 | null;
|
|
20
20
|
prevMonth(date: SimpleDate): SimpleDate;
|
|
21
21
|
nextMonth(date: SimpleDate): SimpleDate;
|
|
22
22
|
createRangeFromPreset(preset: DatePreset): SimpleDateRange;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import "moment/locale/en-au";
|
|
2
3
|
import "moment/locale/en-ca";
|
|
3
4
|
import "moment/locale/en-ie";
|
|
@@ -7,20 +8,13 @@ import "moment/locale/fr";
|
|
|
7
8
|
import "moment/locale/es";
|
|
8
9
|
import "moment/locale/zh-cn";
|
|
9
10
|
import "moment/locale/zh-tw";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
20
|
-
className: PropTypes.Requireable<string>;
|
|
21
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
22
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
23
|
-
};
|
|
24
|
-
export declare type SpsDateTimeProps = PropTypes.InferTS<typeof propTypes, HTMLSpanElement>;
|
|
11
|
+
export declare type SpsDateTimeProps = React.PropsWithChildren<{
|
|
12
|
+
currentUser?: any;
|
|
13
|
+
dateToFormat?: string | Date;
|
|
14
|
+
format?: string;
|
|
15
|
+
locale?: string;
|
|
16
|
+
relative?: boolean;
|
|
17
|
+
relativeHrs?: number;
|
|
18
|
+
tz?: string;
|
|
19
|
+
}> & React.HTMLAttributes<HTMLSpanElement>;
|
|
25
20
|
export declare function SpsDateTime(props: SpsDateTimeProps): JSX.Element;
|
|
26
|
-
export {};
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
9
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
10
|
-
};
|
|
11
|
-
export declare type SpsDescriptionListProps = PropTypes.InferTS<typeof propTypes, HTMLDListElement>;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
+
export declare type SpsDescriptionListProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
4
|
+
compact?: boolean;
|
|
5
|
+
wideTerms?: boolean;
|
|
6
|
+
widerTerms?: boolean;
|
|
7
|
+
}> & React.HTMLAttributes<HTMLDListElement>;
|
|
12
8
|
export declare function SpsDescriptionList(props: SpsDescriptionListProps): JSX.Element;
|
|
13
|
-
export declare function SpsDl(
|
|
14
|
-
export {};
|
|
9
|
+
export declare function SpsDl(props: SpsDescriptionListProps): JSX.Element;
|
|
@@ -1,11 +1,5 @@
|
|
|
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 SpsDescriptionListDefinitionProps = PropTypes.InferTS<typeof propTypes, HTMLElement>;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
+
export declare type SpsDescriptionListDefinitionProps = React.PropsWithChildren<SpsGlobalPropTypes> & React.HTMLAttributes<HTMLElement>;
|
|
9
4
|
export declare function SpsDescriptionListDefinition(props: SpsDescriptionListDefinitionProps): JSX.Element;
|
|
10
|
-
export declare function SpsDd(
|
|
11
|
-
export {};
|
|
5
|
+
export declare function SpsDd(props: SpsDescriptionListDefinitionProps): JSX.Element;
|
|
@@ -1,18 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import type { SpsFormControl } from "../form/hooks/formControl";
|
|
2
3
|
import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
3
|
-
import
|
|
4
|
-
declare
|
|
5
|
-
error
|
|
6
|
-
errors
|
|
7
|
-
help
|
|
8
|
-
labelFor
|
|
9
|
-
required
|
|
10
|
-
|
|
11
|
-
className: PropTypes.Requireable<string>;
|
|
12
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
13
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
14
|
-
};
|
|
15
|
-
export declare type SpsDescriptionListTermProps = PropTypes.InferTS<typeof propTypes, HTMLElement>;
|
|
4
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
5
|
+
export declare type SpsDescriptionListTermProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
6
|
+
error?: boolean;
|
|
7
|
+
errors?: React.ReactNode | (() => React.ReactNode);
|
|
8
|
+
help?: React.ReactNode | (() => React.ReactNode);
|
|
9
|
+
labelFor?: SpsFormControl<any> | SpsFormFieldMeta<any>;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
}> & React.HTMLAttributes<HTMLElement>;
|
|
16
12
|
export declare function SpsDescriptionListTerm(props: SpsDescriptionListTermProps): JSX.Element;
|
|
17
|
-
export declare function SpsDt(
|
|
18
|
-
export {};
|
|
13
|
+
export declare function SpsDt(props: SpsDescriptionListTermProps): JSX.Element;
|
|
@@ -1,28 +1,23 @@
|
|
|
1
1
|
import type { SpsActionDescriptor, SpsActionMethod } from "@spscommerce/ds-shared";
|
|
2
2
|
import { DropdownKind, SpsIcon } from "@spscommerce/ds-shared";
|
|
3
|
-
import * as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
24
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
25
|
-
};
|
|
26
|
-
export declare type SpsDropdownProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
5
|
+
export declare type SpsDropdownProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
6
|
+
action?: (...args: any[]) => void;
|
|
7
|
+
alignLeft?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
icon?: SpsIcon;
|
|
10
|
+
kind?: DropdownKind;
|
|
11
|
+
label?: string;
|
|
12
|
+
options?: Array<SpsActionMethod | [SpsActionDescriptor, () => void]>;
|
|
13
|
+
spinning?: boolean;
|
|
14
|
+
spinningTitle?: string;
|
|
15
|
+
tallOptionList?: boolean;
|
|
16
|
+
onOpen?: () => void;
|
|
17
|
+
onClose?: () => void;
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
maxHeightOptionListPx?: number;
|
|
20
|
+
maxHeightOptionListRem?: number;
|
|
21
|
+
disableOptionsMemoization?: boolean;
|
|
22
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
27
23
|
export declare function SpsDropdown(props: SpsDropdownProps): JSX.Element;
|
|
28
|
-
export {};
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { FeedbackBlockKind } from "@spscommerce/ds-shared";
|
|
2
|
-
import * as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
8
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
9
|
-
};
|
|
10
|
-
export declare type SpsFeedbackBlockProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
|
+
export declare type SpsFeedbackBlockProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
|
+
kind?: FeedbackBlockKind;
|
|
6
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
11
7
|
export declare function SpsFeedbackBlock(props: SpsFeedbackBlockProps): JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,22 +1,17 @@
|
|
|
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
|
-
errors
|
|
7
|
-
formArray
|
|
8
|
-
formGroup
|
|
9
|
-
formMeta
|
|
10
|
-
legend
|
|
11
|
-
optional
|
|
12
|
-
enabled
|
|
13
|
-
onToggled
|
|
14
|
-
tooltip
|
|
15
|
-
|
|
16
|
-
className: PropTypes.Requireable<string>;
|
|
17
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
18
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
19
|
-
};
|
|
20
|
-
export declare type SpsFieldsetProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
6
|
+
export declare type SpsFieldsetProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
7
|
+
errors?: React.ReactNode | (() => React.ReactNode);
|
|
8
|
+
formArray?: SpsFormArray<any>;
|
|
9
|
+
formGroup?: SpsFormGroup;
|
|
10
|
+
formMeta?: SpsFormSetMeta<any>;
|
|
11
|
+
legend?: string;
|
|
12
|
+
optional?: boolean;
|
|
13
|
+
enabled?: boolean;
|
|
14
|
+
onToggled?: (isEnabled: boolean) => void;
|
|
15
|
+
tooltip?: string;
|
|
16
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
21
17
|
export declare function SpsFieldset({ children, className, errors, formArray, formGroup, formMeta, legend, unsafelyReplaceClassName, optional, enabled, onToggled, tooltip, "data-testid": testId, }: SpsFieldsetProps): JSX.Element;
|
|
22
|
-
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 SpsFilterPanelProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
+
export declare type SpsFilterPanelProps = React.PropsWithChildren<SpsGlobalPropTypes> & React.HTMLAttributes<HTMLDivElement>;
|
|
9
4
|
export declare function SpsFilterPanel({ children, className, ...rest }: SpsFilterPanelProps): 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 SpsFilterPanelCapProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
+
export declare type SpsFilterPanelCapProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
4
|
+
onClear?: () => void;
|
|
5
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
10
6
|
export declare function SpsFilterPanelCap({ children, className, onClear, ...rest }: SpsFilterPanelCapProps): JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
3
|
import type { SpsFormFieldMeta } from "../form";
|
|
4
|
-
declare
|
|
5
|
-
value
|
|
6
|
-
placeholder
|
|
7
|
-
formMeta
|
|
8
|
-
onFilterChange
|
|
9
|
-
|
|
10
|
-
className: PropTypes.Requireable<string>;
|
|
11
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
12
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
13
|
-
};
|
|
14
|
-
export declare type SpsFilterPanelFilterBoxProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
4
|
+
export declare type SpsFilterPanelFilterBoxProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
|
+
value?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
formMeta?: SpsFormFieldMeta<string>;
|
|
8
|
+
onFilterChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
9
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
15
10
|
export declare function SpsFilterPanelFilterBox({ className, value, placeholder, formMeta, onFilterChange, ...rest }: SpsFilterPanelFilterBoxProps): JSX.Element;
|
|
16
|
-
export {};
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
12
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
13
|
-
};
|
|
14
|
-
export declare type SpsFilterPanelSectionProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
+
export declare type SpsFilterPanelSectionProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
4
|
+
title?: string;
|
|
5
|
+
expanded?: boolean;
|
|
6
|
+
heightPx?: number;
|
|
7
|
+
heightRem?: number;
|
|
8
|
+
onExpand?: () => void;
|
|
9
|
+
onCollapse?: () => void;
|
|
10
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
15
11
|
export declare function SpsFilterPanelSection({ children, className, title, expanded, heightPx, heightRem, onExpand, onCollapse, ...rest }: SpsFilterPanelSectionProps): JSX.Element;
|
|
16
|
-
export {};
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { SpsFilterTileKind } from "@spscommerce/ds-shared";
|
|
2
|
-
import
|
|
3
|
-
declare
|
|
4
|
-
value:
|
|
5
|
-
title:
|
|
6
|
-
kind
|
|
7
|
-
active
|
|
8
|
-
|
|
9
|
-
className: PropTypes.Requireable<string>;
|
|
10
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
11
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
12
|
-
};
|
|
13
|
-
export declare type SpsFilterTileProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
3
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
|
+
export declare type SpsFilterTileProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
|
+
value: number;
|
|
6
|
+
title: string;
|
|
7
|
+
kind?: SpsFilterTileKind;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
14
10
|
export declare function SpsFilterTile(props: SpsFilterTileProps): JSX.Element;
|
|
15
|
-
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 SpsFilterTileListProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
+
export declare type SpsFilterTileListProps = React.PropsWithChildren<SpsGlobalPropTypes> & React.HTMLAttributes<HTMLDivElement>;
|
|
9
4
|
export declare function SpsFilterTileList(props: SpsFilterTileListProps): JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
9
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
10
|
-
};
|
|
11
|
-
export declare type SpsFocusedTaskProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
+
export declare type SpsFocusedTaskProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
4
|
+
fullWidth?: boolean;
|
|
5
|
+
isOpen?: boolean;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
12
8
|
export declare function SpsFocusedTask(props: SpsFocusedTaskProps): JSX.Element;
|
|
13
|
-
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 SpsFocusedTaskActionsProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
|
+
export declare type SpsFocusedTaskActionsProps = React.PropsWithChildren<SpsGlobalPropTypes> & React.HTMLAttributes<HTMLDivElement>;
|
|
9
4
|
export declare function SpsFocusedTaskActions(props: SpsFocusedTaskActionsProps): JSX.Element;
|
|
10
|
-
export {};
|
package/lib/form/SpsForm.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as PropTypes from "../prop-types";
|
|
3
2
|
import type { SpsFormArray } from "./hooks/formArray";
|
|
4
3
|
import type { SpsFormGroup } from "./hooks/formGroup";
|
|
5
4
|
import type { SpsFormSetMeta } from "./hooks/useSpsForm";
|
|
@@ -7,17 +6,12 @@ export declare const spsFormProps: {
|
|
|
7
6
|
formMeta: string;
|
|
8
7
|
onSubmit: string;
|
|
9
8
|
};
|
|
10
|
-
export declare
|
|
11
|
-
formArray
|
|
12
|
-
formGroup
|
|
13
|
-
formMeta
|
|
14
|
-
onSubmit
|
|
15
|
-
|
|
16
|
-
className: PropTypes.Requireable<string>;
|
|
17
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
18
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
19
|
-
};
|
|
20
|
-
export declare type SpsFormProps = PropTypes.InferTS<typeof spsFormPropTypes, HTMLFormElement>;
|
|
9
|
+
export declare type SpsFormProps = React.PropsWithChildren<{
|
|
10
|
+
formArray?: SpsFormArray<any>;
|
|
11
|
+
formGroup?: SpsFormGroup;
|
|
12
|
+
formMeta?: SpsFormSetMeta<any>;
|
|
13
|
+
onSubmit?: React.FormEventHandler;
|
|
14
|
+
}> & React.HTMLAttributes<HTMLFormElement>;
|
|
21
15
|
declare type SpsFormForwardRefType = SpsFormProps & React.RefAttributes<HTMLFormElement>;
|
|
22
16
|
declare type SpsFormForwardRefExoticComponent = React.ForwardRefExoticComponent<SpsFormForwardRefType>;
|
|
23
17
|
export declare const SpsForm: SpsFormForwardRefExoticComponent;
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
3
|
import type { SpsFormControl } from "./hooks/formControl";
|
|
4
4
|
import type { SpsFormMetaBase } from "./hooks/useSpsForm";
|
|
5
|
-
declare
|
|
6
|
-
focusInputOnClick
|
|
7
|
-
formMeta
|
|
8
|
-
formControl
|
|
9
|
-
inputRef
|
|
10
|
-
|
|
11
|
-
className: PropTypes.Requireable<string>;
|
|
12
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
13
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
14
|
-
};
|
|
15
|
-
export declare type SpsFormComponentWrapperProps = PropTypes.InferProps<typeof spsFormComponentWrapperPropTypes> & React.HTMLAttributes<HTMLDivElement>;
|
|
5
|
+
export declare type SpsFormComponentWrapperProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
6
|
+
focusInputOnClick?: boolean;
|
|
7
|
+
formMeta?: SpsFormMetaBase<any>;
|
|
8
|
+
formControl?: SpsFormControl<any>;
|
|
9
|
+
inputRef?: React.MutableRefObject<HTMLInputElement | HTMLTextAreaElement | null>;
|
|
10
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
16
11
|
declare type SpsFormComponentWrapperForwardRefType = SpsFormComponentWrapperProps & React.RefAttributes<HTMLDivElement>;
|
|
17
12
|
declare type SpsFormComponentWrapperForwardRefExoticComponent = React.ForwardRefExoticComponent<SpsFormComponentWrapperForwardRefType>;
|
|
18
13
|
export declare const SpsFormComponentWrapper: SpsFormComponentWrapperForwardRefExoticComponent;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { SpsValidationStatus } from "../validation/types";
|
|
2
2
|
import type { SpsAbstractControl } from "./SpsAbstractControl.interface";
|
|
3
|
-
export declare function useServerSideValidation(formControl: SpsAbstractControl<any>, initialState?: SpsValidationStatus): (import("../validation/types").SpsValidationErrors | import("react").Dispatch<import("react").SetStateAction<import("../validation/types").SpsValidationErrors>>)[];
|
|
3
|
+
export declare function useServerSideValidation(formControl: SpsAbstractControl<any>, initialState?: SpsValidationStatus): (import("../validation/types").SpsValidationErrors | import("react").Dispatch<import("react").SetStateAction<import("../validation/types").SpsValidationErrors | null>> | null)[];
|
|
@@ -12,18 +12,14 @@ export declare abstract class SpsFormMetaBase<T> {
|
|
|
12
12
|
validators: Array<SpsValidator<T>>;
|
|
13
13
|
errors: SpsValidationErrors | null;
|
|
14
14
|
revealAllErrors: boolean;
|
|
15
|
-
preventativeErrors:
|
|
15
|
+
preventativeErrors: string[];
|
|
16
16
|
submitted: boolean;
|
|
17
17
|
constructor(path: Path, update: UpdateFn);
|
|
18
|
-
abstract isPristine(): boolean;
|
|
19
|
-
abstract markAsPristine(): SpsFormMetaBase<T>;
|
|
20
|
-
abstract markAsDirty(): SpsFormMetaBase<T>;
|
|
21
|
-
abstract isFocused(): boolean;
|
|
22
18
|
setValidators(newValidators: Array<SpsValidator<T>>): SpsFormMetaBase<T>;
|
|
23
19
|
validate(newValue: T): SpsFormMetaBase<T>;
|
|
24
20
|
isValid(): boolean;
|
|
25
21
|
hasErrors(): boolean;
|
|
26
|
-
isVisibilyInvalid(): boolean;
|
|
22
|
+
isVisibilyInvalid(): boolean | null;
|
|
27
23
|
hasError(errorKey: string): any;
|
|
28
24
|
hasPreventativeError(errorKey: string): boolean;
|
|
29
25
|
hasPreventativeErrors(): boolean;
|
|
@@ -31,6 +27,10 @@ export declare abstract class SpsFormMetaBase<T> {
|
|
|
31
27
|
isSubmitted(): boolean;
|
|
32
28
|
onFocus(): void;
|
|
33
29
|
onBlur(): void;
|
|
30
|
+
abstract isPristine(): boolean;
|
|
31
|
+
abstract markAsPristine(): SpsFormMetaBase<T>;
|
|
32
|
+
abstract markAsDirty(): SpsFormMetaBase<T>;
|
|
33
|
+
abstract isFocused(): boolean;
|
|
34
34
|
}
|
|
35
35
|
export declare class SpsFormFieldMeta<T> extends SpsFormMetaBase<T> {
|
|
36
36
|
id: string;
|
|
@@ -57,9 +57,6 @@ export declare abstract class SpsFormSetMeta<T extends SpsFormSetValue, U extend
|
|
|
57
57
|
fields: U;
|
|
58
58
|
constructor(path: Path, update: UpdateFn);
|
|
59
59
|
constructor(inferMembersFromValue: T, path: Path, update: UpdateFn);
|
|
60
|
-
protected abstract inferMembers(inferFromValue: T): any;
|
|
61
|
-
protected inferSpsControl(valueOrControl: any, key: PathComponent): SpsFormMetaBase<any>;
|
|
62
|
-
private rollup;
|
|
63
60
|
isFocused(): boolean;
|
|
64
61
|
isValid(): boolean;
|
|
65
62
|
hasErrors(): boolean;
|
|
@@ -69,6 +66,9 @@ export declare abstract class SpsFormSetMeta<T extends SpsFormSetValue, U extend
|
|
|
69
66
|
markAsDirty(): this;
|
|
70
67
|
markAsBlurred(): this;
|
|
71
68
|
markAsSubmitted(): this;
|
|
69
|
+
protected inferSpsControl(valueOrControl: any, key: PathComponent): SpsFormMetaBase<any>;
|
|
70
|
+
private rollup;
|
|
71
|
+
protected abstract inferMembers(inferFromValue: T): any;
|
|
72
72
|
}
|
|
73
73
|
export declare class SpsFormGroupMeta<T extends object> extends SpsFormSetMeta<T> {
|
|
74
74
|
protected inferMembers(inferFromValue: T): void;
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import { GrowlerKind } from "@spscommerce/ds-shared";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import
|
|
4
|
-
declare
|
|
5
|
-
imgSrc
|
|
6
|
-
kind
|
|
7
|
-
onClose
|
|
8
|
-
persist
|
|
9
|
-
title
|
|
10
|
-
|
|
11
|
-
className: PropTypes.Requireable<string>;
|
|
12
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
13
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
14
|
-
};
|
|
15
|
-
export declare type SpsGrowlerProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
3
|
+
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
|
+
export declare type SpsGrowlerProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
|
+
imgSrc?: string;
|
|
6
|
+
kind?: GrowlerKind;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
persist?: boolean;
|
|
9
|
+
title?: string;
|
|
10
|
+
}> & React.HTMLAttributes<HTMLDivElement>;
|
|
16
11
|
export declare function SpsGrowler(props: SpsGrowlerProps): React.ReactPortal;
|
|
17
|
-
export {};
|