@spscommerce/ds-react 5.10.3 → 5.10.5-ie.2
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/dist/out-tsc/_template/SpsComponent.d.ts +15 -0
- package/dist/out-tsc/_template/SpsComponent.examples.d.ts +2 -0
- package/dist/out-tsc/_template/SpsComponent.examples.js +17 -0
- package/dist/out-tsc/_template/SpsComponent.examples.js.map +1 -0
- package/dist/out-tsc/_template/SpsComponent.js +44 -0
- package/dist/out-tsc/_template/SpsComponent.js.map +1 -0
- package/dist/out-tsc/_template/index.d.ts +2 -0
- package/dist/out-tsc/_template/index.js +3 -0
- package/dist/out-tsc/_template/index.js.map +1 -0
- package/dist/out-tsc/advanced-search/SpsAdvancedSearch.d.ts +22 -0
- package/dist/out-tsc/advanced-search/SpsAdvancedSearch.examples.d.ts +2 -0
- package/dist/out-tsc/advanced-search/SpsAdvancedSearch.examples.js +43 -0
- package/dist/out-tsc/advanced-search/SpsAdvancedSearch.examples.js.map +1 -0
- package/dist/out-tsc/advanced-search/SpsAdvancedSearch.js +58 -0
- package/dist/out-tsc/advanced-search/SpsAdvancedSearch.js.map +1 -0
- package/dist/out-tsc/advanced-search/index.d.ts +2 -0
- package/dist/out-tsc/advanced-search/index.js +3 -0
- package/dist/out-tsc/advanced-search/index.js.map +1 -0
- package/dist/out-tsc/autocomplete/SpsAutocomplete.d.ts +27 -0
- package/dist/out-tsc/autocomplete/SpsAutocomplete.examples.d.ts +2 -0
- package/dist/out-tsc/autocomplete/SpsAutocomplete.examples.js +37 -0
- package/dist/out-tsc/autocomplete/SpsAutocomplete.examples.js.map +1 -0
- package/dist/out-tsc/autocomplete/SpsAutocomplete.js +139 -0
- package/dist/out-tsc/autocomplete/SpsAutocomplete.js.map +1 -0
- package/dist/out-tsc/autocomplete/index.d.ts +2 -0
- package/dist/out-tsc/autocomplete/index.js +3 -0
- package/dist/out-tsc/autocomplete/index.js.map +1 -0
- package/dist/out-tsc/button/SpsButton.d.ts +18 -0
- package/dist/out-tsc/button/SpsButton.examples.d.ts +2 -0
- package/dist/out-tsc/button/SpsButton.examples.js +201 -0
- package/dist/out-tsc/button/SpsButton.examples.js.map +1 -0
- package/dist/out-tsc/button/SpsButton.js +67 -0
- package/dist/out-tsc/button/SpsButton.js.map +1 -0
- package/dist/out-tsc/button/SpsButtonGroup.d.ts +10 -0
- package/dist/out-tsc/button/SpsButtonGroup.js +68 -0
- package/dist/out-tsc/button/SpsButtonGroup.js.map +1 -0
- package/dist/out-tsc/button/SpsIconButtonPanel.d.ts +10 -0
- package/dist/out-tsc/button/SpsIconButtonPanel.js +61 -0
- package/dist/out-tsc/button/SpsIconButtonPanel.js.map +1 -0
- package/dist/out-tsc/button/index.d.ts +4 -0
- package/dist/out-tsc/button/index.js +5 -0
- package/dist/out-tsc/button/index.js.map +1 -0
- package/dist/out-tsc/card/SpsCard.d.ts +16 -0
- package/dist/out-tsc/card/SpsCard.examples.d.ts +2 -0
- package/dist/out-tsc/card/SpsCard.examples.js +98 -0
- package/dist/out-tsc/card/SpsCard.examples.js.map +1 -0
- package/dist/out-tsc/card/SpsCard.js +90 -0
- package/dist/out-tsc/card/SpsCard.js.map +1 -0
- package/dist/out-tsc/card/SpsCardHeader.d.ts +14 -0
- package/dist/out-tsc/card/SpsCardHeader.js +49 -0
- package/dist/out-tsc/card/SpsCardHeader.js.map +1 -0
- package/dist/out-tsc/card/SpsCardTabbedPane.d.ts +19 -0
- package/dist/out-tsc/card/SpsCardTabbedPane.js +63 -0
- package/dist/out-tsc/card/SpsCardTabbedPane.js.map +1 -0
- package/dist/out-tsc/card/index.d.ts +3 -0
- package/dist/out-tsc/card/index.js +4 -0
- package/dist/out-tsc/card/index.js.map +1 -0
- package/dist/out-tsc/card/useTab.d.ts +18 -0
- package/dist/out-tsc/card/useTab.js +110 -0
- package/dist/out-tsc/card/useTab.js.map +1 -0
- package/dist/out-tsc/checkbox/SpsCheckbox.d.ts +21 -0
- package/dist/out-tsc/checkbox/SpsCheckbox.examples.d.ts +2 -0
- package/dist/out-tsc/checkbox/SpsCheckbox.examples.js +35 -0
- package/dist/out-tsc/checkbox/SpsCheckbox.examples.js.map +1 -0
- package/dist/out-tsc/checkbox/SpsCheckbox.js +88 -0
- package/dist/out-tsc/checkbox/SpsCheckbox.js.map +1 -0
- package/dist/out-tsc/checkbox/index.d.ts +2 -0
- package/dist/out-tsc/checkbox/index.js +3 -0
- package/dist/out-tsc/checkbox/index.js.map +1 -0
- package/dist/out-tsc/checkbox-dropdown/SpsCheckboxDropdown.d.ts +17 -0
- package/dist/out-tsc/checkbox-dropdown/SpsCheckboxDropdown.js +54 -0
- package/dist/out-tsc/checkbox-dropdown/SpsCheckboxDropdown.js.map +1 -0
- package/dist/out-tsc/checkbox-dropdown/index.d.ts +1 -0
- package/dist/out-tsc/checkbox-dropdown/index.js +2 -0
- package/dist/out-tsc/checkbox-dropdown/index.js.map +1 -0
- package/dist/out-tsc/clickable-tag/SpsClickableTag.d.ts +16 -0
- package/dist/out-tsc/clickable-tag/SpsClickableTag.examples.d.ts +2 -0
- package/dist/out-tsc/clickable-tag/SpsClickableTag.examples.js +42 -0
- package/dist/out-tsc/clickable-tag/SpsClickableTag.examples.js.map +1 -0
- package/dist/out-tsc/clickable-tag/SpsClickableTag.js +74 -0
- package/dist/out-tsc/clickable-tag/SpsClickableTag.js.map +1 -0
- package/dist/out-tsc/clickable-tag/index.d.ts +2 -0
- package/dist/out-tsc/clickable-tag/index.js +3 -0
- package/dist/out-tsc/clickable-tag/index.js.map +1 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooser.d.ts +19 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooser.examples.d.ts +2 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooser.examples.js +18 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooser.examples.js.map +1 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooser.js +158 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooser.js.map +1 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooserColumn.d.ts +17 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooserColumn.js +61 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooserColumn.js.map +1 -0
- package/dist/out-tsc/column-chooser/index.d.ts +3 -0
- package/dist/out-tsc/column-chooser/index.js +4 -0
- package/dist/out-tsc/column-chooser/index.js.map +1 -0
- package/dist/out-tsc/conditional-field/SpsConditionalField.d.ts +11 -0
- package/dist/out-tsc/conditional-field/SpsConditionalField.examples.d.ts +2 -0
- package/dist/out-tsc/conditional-field/SpsConditionalField.examples.js +20 -0
- package/dist/out-tsc/conditional-field/SpsConditionalField.examples.js.map +1 -0
- package/dist/out-tsc/conditional-field/SpsConditionalField.js +39 -0
- package/dist/out-tsc/conditional-field/SpsConditionalField.js.map +1 -0
- package/dist/out-tsc/conditional-field/index.d.ts +2 -0
- package/dist/out-tsc/conditional-field/index.js +3 -0
- package/dist/out-tsc/conditional-field/index.js.map +1 -0
- package/dist/out-tsc/content-row/SpsContentRow.d.ts +22 -0
- package/dist/out-tsc/content-row/SpsContentRow.examples.d.ts +2 -0
- package/dist/out-tsc/content-row/SpsContentRow.examples.js +51 -0
- package/dist/out-tsc/content-row/SpsContentRow.examples.js.map +1 -0
- package/dist/out-tsc/content-row/SpsContentRow.js +105 -0
- package/dist/out-tsc/content-row/SpsContentRow.js.map +1 -0
- package/dist/out-tsc/content-row/SpsContentRowCol.d.ts +15 -0
- package/dist/out-tsc/content-row/SpsContentRowCol.js +57 -0
- package/dist/out-tsc/content-row/SpsContentRowCol.js.map +1 -0
- package/dist/out-tsc/content-row/SpsContentRowExpansion.d.ts +10 -0
- package/dist/out-tsc/content-row/SpsContentRowExpansion.js +38 -0
- package/dist/out-tsc/content-row/SpsContentRowExpansion.js.map +1 -0
- package/dist/out-tsc/content-row/index.d.ts +4 -0
- package/dist/out-tsc/content-row/index.js +5 -0
- package/dist/out-tsc/content-row/index.js.map +1 -0
- package/dist/out-tsc/currency-input/SpsCurrencyInput.d.ts +18 -0
- package/dist/out-tsc/currency-input/SpsCurrencyInput.examples.d.ts +2 -0
- package/dist/out-tsc/currency-input/SpsCurrencyInput.examples.js +20 -0
- package/dist/out-tsc/currency-input/SpsCurrencyInput.examples.js.map +1 -0
- package/dist/out-tsc/currency-input/SpsCurrencyInput.js +82 -0
- package/dist/out-tsc/currency-input/SpsCurrencyInput.js.map +1 -0
- package/dist/out-tsc/currency-input/index.d.ts +2 -0
- package/dist/out-tsc/currency-input/index.js +3 -0
- package/dist/out-tsc/currency-input/index.js.map +1 -0
- package/dist/out-tsc/dateRangePicker/SpsDateRangePicker.d.ts +23 -0
- package/dist/out-tsc/dateRangePicker/SpsDateRangePicker.examples.d.ts +2 -0
- package/dist/out-tsc/dateRangePicker/SpsDateRangePicker.examples.js +42 -0
- package/dist/out-tsc/dateRangePicker/SpsDateRangePicker.examples.js.map +1 -0
- package/dist/out-tsc/dateRangePicker/SpsDateRangePicker.js +635 -0
- package/dist/out-tsc/dateRangePicker/SpsDateRangePicker.js.map +1 -0
- package/dist/out-tsc/dateRangePicker/index.d.ts +2 -0
- package/dist/out-tsc/dateRangePicker/index.js +3 -0
- package/dist/out-tsc/dateRangePicker/index.js.map +1 -0
- package/dist/out-tsc/datepicker/SpsDatepicker.d.ts +19 -0
- package/dist/out-tsc/datepicker/SpsDatepicker.examples.d.ts +2 -0
- package/dist/out-tsc/datepicker/SpsDatepicker.examples.js +33 -0
- package/dist/out-tsc/datepicker/SpsDatepicker.examples.js.map +1 -0
- package/dist/out-tsc/datepicker/SpsDatepicker.js +427 -0
- package/dist/out-tsc/datepicker/SpsDatepicker.js.map +1 -0
- package/dist/out-tsc/datepicker/index.d.ts +2 -0
- package/dist/out-tsc/datepicker/index.js +3 -0
- package/dist/out-tsc/datepicker/index.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/SpsDateRangePickerV2.d.ts +21 -0
- package/dist/out-tsc/datepicker-v2/SpsDateRangePickerV2.js +213 -0
- package/dist/out-tsc/datepicker-v2/SpsDateRangePickerV2.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerCalendar.d.ts +18 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerCalendar.js +140 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerCalendar.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerPopup.d.ts +13 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerPopup.js +65 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerPopup.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerV2.d.ts +18 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerV2.js +111 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerV2.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/index.d.ts +4 -0
- package/dist/out-tsc/datepicker-v2/index.js +5 -0
- package/dist/out-tsc/datepicker-v2/index.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/useCalendar.d.ts +2 -0
- package/dist/out-tsc/datepicker-v2/useCalendar.js +58 -0
- package/dist/out-tsc/datepicker-v2/useCalendar.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/useMoment.d.ts +3 -0
- package/dist/out-tsc/datepicker-v2/useMoment.js +24 -0
- package/dist/out-tsc/datepicker-v2/useMoment.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/utils.d.ts +23 -0
- package/dist/out-tsc/datepicker-v2/utils.js +169 -0
- package/dist/out-tsc/datepicker-v2/utils.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/validation.d.ts +10 -0
- package/dist/out-tsc/datepicker-v2/validation.js +67 -0
- package/dist/out-tsc/datepicker-v2/validation.js.map +1 -0
- package/dist/out-tsc/datetime/SpsDateTime.d.ts +26 -0
- package/dist/out-tsc/datetime/SpsDateTime.examples.d.ts +2 -0
- package/dist/out-tsc/datetime/SpsDateTime.examples.js +21 -0
- package/dist/out-tsc/datetime/SpsDateTime.examples.js.map +1 -0
- package/dist/out-tsc/datetime/SpsDateTime.js +194 -0
- package/dist/out-tsc/datetime/SpsDateTime.js.map +1 -0
- package/dist/out-tsc/datetime/index.d.ts +2 -0
- package/dist/out-tsc/datetime/index.js +3 -0
- package/dist/out-tsc/datetime/index.js.map +1 -0
- package/dist/out-tsc/description-list/SpsDescriptionList.d.ts +14 -0
- package/dist/out-tsc/description-list/SpsDescriptionList.examples.d.ts +2 -0
- package/dist/out-tsc/description-list/SpsDescriptionList.examples.js +47 -0
- package/dist/out-tsc/description-list/SpsDescriptionList.examples.js.map +1 -0
- package/dist/out-tsc/description-list/SpsDescriptionList.js +65 -0
- package/dist/out-tsc/description-list/SpsDescriptionList.js.map +1 -0
- package/dist/out-tsc/description-list/SpsDescriptionListDefinition.d.ts +11 -0
- package/dist/out-tsc/description-list/SpsDescriptionListDefinition.js +46 -0
- package/dist/out-tsc/description-list/SpsDescriptionListDefinition.js.map +1 -0
- package/dist/out-tsc/description-list/SpsDescriptionListTerm.d.ts +18 -0
- package/dist/out-tsc/description-list/SpsDescriptionListTerm.js +92 -0
- package/dist/out-tsc/description-list/SpsDescriptionListTerm.js.map +1 -0
- package/dist/out-tsc/description-list/index.d.ts +4 -0
- package/dist/out-tsc/description-list/index.js +5 -0
- package/dist/out-tsc/description-list/index.js.map +1 -0
- package/dist/out-tsc/dropdown/SpsDropdown.d.ts +24 -0
- package/dist/out-tsc/dropdown/SpsDropdown.examples.d.ts +2 -0
- package/dist/out-tsc/dropdown/SpsDropdown.examples.js +95 -0
- package/dist/out-tsc/dropdown/SpsDropdown.examples.js.map +1 -0
- package/dist/out-tsc/dropdown/SpsDropdown.js +162 -0
- package/dist/out-tsc/dropdown/SpsDropdown.js.map +1 -0
- package/dist/out-tsc/dropdown/index.d.ts +2 -0
- package/dist/out-tsc/dropdown/index.js +3 -0
- package/dist/out-tsc/dropdown/index.js.map +1 -0
- package/dist/out-tsc/feedback-block/SpsFeedbackBlock.d.ts +12 -0
- package/dist/out-tsc/feedback-block/SpsFeedbackBlock.examples.d.ts +2 -0
- package/dist/out-tsc/feedback-block/SpsFeedbackBlock.examples.js +63 -0
- package/dist/out-tsc/feedback-block/SpsFeedbackBlock.examples.js.map +1 -0
- package/dist/out-tsc/feedback-block/SpsFeedbackBlock.js +43 -0
- package/dist/out-tsc/feedback-block/SpsFeedbackBlock.js.map +1 -0
- package/dist/out-tsc/feedback-block/index.d.ts +2 -0
- package/dist/out-tsc/feedback-block/index.js +3 -0
- package/dist/out-tsc/feedback-block/index.js.map +1 -0
- package/dist/out-tsc/fieldset/SpsFieldset.d.ts +22 -0
- package/dist/out-tsc/fieldset/SpsFieldset.examples.d.ts +2 -0
- package/dist/out-tsc/fieldset/SpsFieldset.examples.js +54 -0
- package/dist/out-tsc/fieldset/SpsFieldset.examples.js.map +1 -0
- package/dist/out-tsc/fieldset/SpsFieldset.js +99 -0
- package/dist/out-tsc/fieldset/SpsFieldset.js.map +1 -0
- package/dist/out-tsc/fieldset/index.d.ts +2 -0
- package/dist/out-tsc/fieldset/index.js +3 -0
- package/dist/out-tsc/fieldset/index.js.map +1 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanel.d.ts +10 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanel.examples.d.ts +2 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanel.examples.js +31 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanel.examples.js.map +1 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanel.js +37 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanel.js.map +1 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelCap.d.ts +11 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelCap.js +48 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelCap.js.map +1 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelFilterBox.d.ts +16 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelFilterBox.js +49 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelFilterBox.js.map +1 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelSection.d.ts +16 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelSection.js +84 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelSection.js.map +1 -0
- package/dist/out-tsc/filter-panel/index.d.ts +5 -0
- package/dist/out-tsc/filter-panel/index.js +6 -0
- package/dist/out-tsc/filter-panel/index.js.map +1 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTile.d.ts +15 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTile.js +66 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTile.js.map +1 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTileList.d.ts +10 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTileList.examples.d.ts +2 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTileList.examples.js +17 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTileList.examples.js.map +1 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTileList.js +38 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTileList.js.map +1 -0
- package/dist/out-tsc/filter-tile-list/index.d.ts +3 -0
- package/dist/out-tsc/filter-tile-list/index.js +4 -0
- package/dist/out-tsc/filter-tile-list/index.js.map +1 -0
- package/dist/out-tsc/focused-task/SpsFocusedTask.d.ts +13 -0
- package/dist/out-tsc/focused-task/SpsFocusedTask.examples.d.ts +2 -0
- package/dist/out-tsc/focused-task/SpsFocusedTask.examples.js +19 -0
- package/dist/out-tsc/focused-task/SpsFocusedTask.examples.js.map +1 -0
- package/dist/out-tsc/focused-task/SpsFocusedTask.js +80 -0
- package/dist/out-tsc/focused-task/SpsFocusedTask.js.map +1 -0
- package/dist/out-tsc/focused-task/SpsFocusedTaskActions.d.ts +10 -0
- package/dist/out-tsc/focused-task/SpsFocusedTaskActions.js +40 -0
- package/dist/out-tsc/focused-task/SpsFocusedTaskActions.js.map +1 -0
- package/dist/out-tsc/focused-task/index.d.ts +3 -0
- package/dist/out-tsc/focused-task/index.js +4 -0
- package/dist/out-tsc/focused-task/index.js.map +1 -0
- package/dist/out-tsc/form/AddRemoveFormRows.examples.d.ts +18 -0
- package/dist/out-tsc/form/AddRemoveFormRows.examples.js +25 -0
- package/dist/out-tsc/form/AddRemoveFormRows.examples.js.map +1 -0
- package/dist/out-tsc/form/SpsForm.d.ts +24 -0
- package/dist/out-tsc/form/SpsForm.examples.d.ts +41 -0
- package/dist/out-tsc/form/SpsForm.examples.js +49 -0
- package/dist/out-tsc/form/SpsForm.examples.js.map +1 -0
- package/dist/out-tsc/form/SpsForm.js +51 -0
- package/dist/out-tsc/form/SpsForm.js.map +1 -0
- package/dist/out-tsc/form/SpsFormComponentWrapper.d.ts +19 -0
- package/dist/out-tsc/form/SpsFormComponentWrapper.js +69 -0
- package/dist/out-tsc/form/SpsFormComponentWrapper.js.map +1 -0
- package/dist/out-tsc/form/hooks/SpsAbstractControl.interface.d.ts +24 -0
- package/dist/out-tsc/form/hooks/SpsAbstractControl.interface.js +2 -0
- package/dist/out-tsc/form/hooks/SpsAbstractControl.interface.js.map +1 -0
- package/dist/out-tsc/form/hooks/SpsControlSet.interface.d.ts +7 -0
- package/dist/out-tsc/form/hooks/SpsControlSet.interface.js +24 -0
- package/dist/out-tsc/form/hooks/SpsControlSet.interface.js.map +1 -0
- package/dist/out-tsc/form/hooks/formArray.d.ts +12 -0
- package/dist/out-tsc/form/hooks/formArray.js +211 -0
- package/dist/out-tsc/form/hooks/formArray.js.map +1 -0
- package/dist/out-tsc/form/hooks/formControl.d.ts +9 -0
- package/dist/out-tsc/form/hooks/formControl.js +68 -0
- package/dist/out-tsc/form/hooks/formControl.js.map +1 -0
- package/dist/out-tsc/form/hooks/formGroup.d.ts +10 -0
- package/dist/out-tsc/form/hooks/formGroup.js +182 -0
- package/dist/out-tsc/form/hooks/formGroup.js.map +1 -0
- package/dist/out-tsc/form/hooks/useForm.d.ts +2 -0
- package/dist/out-tsc/form/hooks/useForm.js +98 -0
- package/dist/out-tsc/form/hooks/useForm.js.map +1 -0
- package/dist/out-tsc/form/hooks/useFormControlId.d.ts +4 -0
- package/dist/out-tsc/form/hooks/useFormControlId.js +18 -0
- package/dist/out-tsc/form/hooks/useFormControlId.js.map +1 -0
- package/dist/out-tsc/form/hooks/useServerSideValidation.d.ts +3 -0
- package/dist/out-tsc/form/hooks/useServerSideValidation.js +37 -0
- package/dist/out-tsc/form/hooks/useServerSideValidation.js.map +1 -0
- package/dist/out-tsc/form/hooks/useSpsForm.d.ts +77 -0
- package/dist/out-tsc/form/hooks/useSpsForm.js +652 -0
- package/dist/out-tsc/form/hooks/useSpsForm.js.map +1 -0
- package/dist/out-tsc/form/index.d.ts +15 -0
- package/dist/out-tsc/form/index.js +16 -0
- package/dist/out-tsc/form/index.js.map +1 -0
- package/dist/out-tsc/form/validation/SpsValidators.d.ts +16 -0
- package/dist/out-tsc/form/validation/SpsValidators.js +84 -0
- package/dist/out-tsc/form/validation/SpsValidators.js.map +1 -0
- package/dist/out-tsc/form/validation/types.d.ts +7 -0
- package/dist/out-tsc/form/validation/types.js +4 -0
- package/dist/out-tsc/form/validation/types.js.map +1 -0
- package/dist/out-tsc/form/validation/validate.d.ts +2 -0
- package/dist/out-tsc/form/validation/validate.js +6 -0
- package/dist/out-tsc/form/validation/validate.js.map +1 -0
- package/dist/out-tsc/growler/SpsGrowler.d.ts +17 -0
- package/dist/out-tsc/growler/SpsGrowler.examples.d.ts +2 -0
- package/dist/out-tsc/growler/SpsGrowler.examples.js +122 -0
- package/dist/out-tsc/growler/SpsGrowler.examples.js.map +1 -0
- package/dist/out-tsc/growler/SpsGrowler.js +147 -0
- package/dist/out-tsc/growler/SpsGrowler.js.map +1 -0
- package/dist/out-tsc/growler/index.d.ts +3 -0
- package/dist/out-tsc/growler/index.js +4 -0
- package/dist/out-tsc/growler/index.js.map +1 -0
- package/dist/out-tsc/growler/useGrowlers.d.ts +12 -0
- package/dist/out-tsc/growler/useGrowlers.js +59 -0
- package/dist/out-tsc/growler/useGrowlers.js.map +1 -0
- package/dist/out-tsc/i18n.d.ts +3 -0
- package/dist/out-tsc/i18n.js +4 -0
- package/dist/out-tsc/i18n.js.map +1 -0
- package/dist/out-tsc/icon/SpsIcon.d.ts +13 -0
- package/dist/out-tsc/icon/SpsIcon.js +47 -0
- package/dist/out-tsc/icon/SpsIcon.js.map +1 -0
- package/dist/out-tsc/icon/index.d.ts +1 -0
- package/dist/out-tsc/icon/index.js +2 -0
- package/dist/out-tsc/icon/index.js.map +1 -0
- package/dist/out-tsc/incrementor/SpsIncrementor.d.ts +15 -0
- package/dist/out-tsc/incrementor/SpsIncrementor.examples.d.ts +2 -0
- package/dist/out-tsc/incrementor/SpsIncrementor.examples.js +18 -0
- package/dist/out-tsc/incrementor/SpsIncrementor.examples.js.map +1 -0
- package/dist/out-tsc/incrementor/SpsIncrementor.js +113 -0
- package/dist/out-tsc/incrementor/SpsIncrementor.js.map +1 -0
- package/dist/out-tsc/incrementor/index.d.ts +2 -0
- package/dist/out-tsc/incrementor/index.js +3 -0
- package/dist/out-tsc/incrementor/index.js.map +1 -0
- package/dist/out-tsc/index.d.ts +69 -0
- package/dist/out-tsc/index.js +70 -0
- package/dist/out-tsc/index.js.map +1 -0
- package/dist/out-tsc/input-group/SpsInputGroup.d.ts +17 -0
- package/dist/out-tsc/input-group/SpsInputGroup.js +74 -0
- package/dist/out-tsc/input-group/SpsInputGroup.js.map +1 -0
- package/dist/out-tsc/input-group/index.d.ts +1 -0
- package/dist/out-tsc/input-group/index.js +2 -0
- package/dist/out-tsc/input-group/index.js.map +1 -0
- package/dist/out-tsc/insight-tile/SpsInsightTile.d.ts +18 -0
- package/dist/out-tsc/insight-tile/SpsInsightTile.examples.d.ts +2 -0
- package/dist/out-tsc/insight-tile/SpsInsightTile.examples.js +59 -0
- package/dist/out-tsc/insight-tile/SpsInsightTile.examples.js.map +1 -0
- package/dist/out-tsc/insight-tile/SpsInsightTile.js +91 -0
- package/dist/out-tsc/insight-tile/SpsInsightTile.js.map +1 -0
- package/dist/out-tsc/insight-tile/SpsInsights.d.ts +10 -0
- package/dist/out-tsc/insight-tile/SpsInsights.js +19 -0
- package/dist/out-tsc/insight-tile/SpsInsights.js.map +1 -0
- package/dist/out-tsc/insight-tile/index.d.ts +2 -0
- package/dist/out-tsc/insight-tile/index.js +3 -0
- package/dist/out-tsc/insight-tile/index.js.map +1 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueList.d.ts +11 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueList.examples.d.ts +2 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueList.examples.js +25 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueList.examples.js.map +1 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueList.js +40 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueList.js.map +1 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueListItem.d.ts +13 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueListItem.js +44 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueListItem.js.map +1 -0
- package/dist/out-tsc/key-value-list/index.d.ts +3 -0
- package/dist/out-tsc/key-value-list/index.js +4 -0
- package/dist/out-tsc/key-value-list/index.js.map +1 -0
- package/dist/out-tsc/key-value-tag/SpsKeyValueTag.d.ts +16 -0
- package/dist/out-tsc/key-value-tag/SpsKeyValueTag.examples.d.ts +2 -0
- package/dist/out-tsc/key-value-tag/SpsKeyValueTag.examples.js +33 -0
- package/dist/out-tsc/key-value-tag/SpsKeyValueTag.examples.js.map +1 -0
- package/dist/out-tsc/key-value-tag/SpsKeyValueTag.js +56 -0
- package/dist/out-tsc/key-value-tag/SpsKeyValueTag.js.map +1 -0
- package/dist/out-tsc/key-value-tag/index.d.ts +2 -0
- package/dist/out-tsc/key-value-tag/index.js +3 -0
- package/dist/out-tsc/key-value-tag/index.js.map +1 -0
- package/dist/out-tsc/label/SpsLabel.d.ts +20 -0
- package/dist/out-tsc/label/SpsLabel.examples.d.ts +2 -0
- package/dist/out-tsc/label/SpsLabel.examples.js +65 -0
- package/dist/out-tsc/label/SpsLabel.examples.js.map +1 -0
- package/dist/out-tsc/label/SpsLabel.js +223 -0
- package/dist/out-tsc/label/SpsLabel.js.map +1 -0
- package/dist/out-tsc/label/index.d.ts +2 -0
- package/dist/out-tsc/label/index.js +3 -0
- package/dist/out-tsc/label/index.js.map +1 -0
- package/dist/out-tsc/list-action-bar/SpsListActionBar.d.ts +12 -0
- package/dist/out-tsc/list-action-bar/SpsListActionBar.examples.d.ts +2 -0
- package/dist/out-tsc/list-action-bar/SpsListActionBar.examples.js +61 -0
- package/dist/out-tsc/list-action-bar/SpsListActionBar.examples.js.map +1 -0
- package/dist/out-tsc/list-action-bar/SpsListActionBar.js +59 -0
- package/dist/out-tsc/list-action-bar/SpsListActionBar.js.map +1 -0
- package/dist/out-tsc/list-action-bar/index.d.ts +2 -0
- package/dist/out-tsc/list-action-bar/index.js +3 -0
- package/dist/out-tsc/list-action-bar/index.js.map +1 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbar.d.ts +25 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbar.examples.d.ts +3 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbar.examples.js +404 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbar.examples.js.map +1 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbar.js +168 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbar.js.map +1 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbarSearch.d.ts +12 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbarSearch.js +35 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbarSearch.js.map +1 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbarSearchInfo.d.ts +10 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbarSearchInfo.js +25 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbarSearchInfo.js.map +1 -0
- package/dist/out-tsc/list-toolbar/index.d.ts +4 -0
- package/dist/out-tsc/list-toolbar/index.js +5 -0
- package/dist/out-tsc/list-toolbar/index.js.map +1 -0
- package/dist/out-tsc/manifest.d.ts +2 -0
- package/dist/out-tsc/manifest.js +462 -0
- package/dist/out-tsc/manifest.js.map +1 -0
- package/dist/out-tsc/micro-block/SpsMicroBlock.d.ts +13 -0
- package/dist/out-tsc/micro-block/SpsMicroBlock.examples.d.ts +2 -0
- package/dist/out-tsc/micro-block/SpsMicroBlock.examples.js +49 -0
- package/dist/out-tsc/micro-block/SpsMicroBlock.examples.js.map +1 -0
- package/dist/out-tsc/micro-block/SpsMicroBlock.js +44 -0
- package/dist/out-tsc/micro-block/SpsMicroBlock.js.map +1 -0
- package/dist/out-tsc/micro-block/index.d.ts +2 -0
- package/dist/out-tsc/micro-block/index.js +3 -0
- package/dist/out-tsc/micro-block/index.js.map +1 -0
- package/dist/out-tsc/modal/SpsModal.d.ts +25 -0
- package/dist/out-tsc/modal/SpsModal.examples.d.ts +2 -0
- package/dist/out-tsc/modal/SpsModal.examples.js +138 -0
- package/dist/out-tsc/modal/SpsModal.examples.js.map +1 -0
- package/dist/out-tsc/modal/SpsModal.js +193 -0
- package/dist/out-tsc/modal/SpsModal.js.map +1 -0
- package/dist/out-tsc/modal/SpsModalAction.d.ts +18 -0
- package/dist/out-tsc/modal/SpsModalAction.js +73 -0
- package/dist/out-tsc/modal/SpsModalAction.js.map +1 -0
- package/dist/out-tsc/modal/SpsModalBody.d.ts +10 -0
- package/dist/out-tsc/modal/SpsModalBody.js +41 -0
- package/dist/out-tsc/modal/SpsModalBody.js.map +1 -0
- package/dist/out-tsc/modal/SpsModalFooter.d.ts +16 -0
- package/dist/out-tsc/modal/SpsModalFooter.js +48 -0
- package/dist/out-tsc/modal/SpsModalFooter.js.map +1 -0
- package/dist/out-tsc/modal/SpsModalHeader.d.ts +11 -0
- package/dist/out-tsc/modal/SpsModalHeader.js +45 -0
- package/dist/out-tsc/modal/SpsModalHeader.js.map +1 -0
- package/dist/out-tsc/modal/SpsModalOverlay.d.ts +12 -0
- package/dist/out-tsc/modal/SpsModalOverlay.js +53 -0
- package/dist/out-tsc/modal/SpsModalOverlay.js.map +1 -0
- package/dist/out-tsc/modal/index.d.ts +2 -0
- package/dist/out-tsc/modal/index.js +5 -0
- package/dist/out-tsc/modal/index.js.map +1 -0
- package/dist/out-tsc/modal-v2/SpsModalV2.d.ts +18 -0
- package/dist/out-tsc/modal-v2/SpsModalV2.js +146 -0
- package/dist/out-tsc/modal-v2/SpsModalV2.js.map +1 -0
- package/dist/out-tsc/modal-v2/index.d.ts +1 -0
- package/dist/out-tsc/modal-v2/index.js +2 -0
- package/dist/out-tsc/modal-v2/index.js.map +1 -0
- package/dist/out-tsc/multi-select/SpsMultiSelect.d.ts +34 -0
- package/dist/out-tsc/multi-select/SpsMultiSelect.examples.d.ts +2 -0
- package/dist/out-tsc/multi-select/SpsMultiSelect.examples.js +33 -0
- package/dist/out-tsc/multi-select/SpsMultiSelect.examples.js.map +1 -0
- package/dist/out-tsc/multi-select/SpsMultiSelect.js +229 -0
- package/dist/out-tsc/multi-select/SpsMultiSelect.js.map +1 -0
- package/dist/out-tsc/multi-select/index.d.ts +2 -0
- package/dist/out-tsc/multi-select/index.js +3 -0
- package/dist/out-tsc/multi-select/index.js.map +1 -0
- package/dist/out-tsc/option-list/SpsOptionList.d.ts +3 -0
- package/dist/out-tsc/option-list/SpsOptionList.js +412 -0
- package/dist/out-tsc/option-list/SpsOptionList.js.map +1 -0
- package/dist/out-tsc/option-list/SpsOptionListProps.d.ts +75 -0
- package/dist/out-tsc/option-list/SpsOptionListProps.js +49 -0
- package/dist/out-tsc/option-list/SpsOptionListProps.js.map +1 -0
- package/dist/out-tsc/option-list/index.d.ts +1 -0
- package/dist/out-tsc/option-list/index.js +2 -0
- package/dist/out-tsc/option-list/index.js.map +1 -0
- package/dist/out-tsc/option-list/useOptionListOptions.d.ts +8 -0
- package/dist/out-tsc/option-list/useOptionListOptions.js +163 -0
- package/dist/out-tsc/option-list/useOptionListOptions.js.map +1 -0
- package/dist/out-tsc/option-list/useOptionListSearch.d.ts +13 -0
- package/dist/out-tsc/option-list/useOptionListSearch.js +74 -0
- package/dist/out-tsc/option-list/useOptionListSearch.js.map +1 -0
- package/dist/out-tsc/option-list/useSpsAction.d.ts +2 -0
- package/dist/out-tsc/option-list/useSpsAction.js +40 -0
- package/dist/out-tsc/option-list/useSpsAction.js.map +1 -0
- package/dist/out-tsc/page-title/SpsPageSubtitle.d.ts +10 -0
- package/dist/out-tsc/page-title/SpsPageSubtitle.js +38 -0
- package/dist/out-tsc/page-title/SpsPageSubtitle.js.map +1 -0
- package/dist/out-tsc/page-title/SpsPageTitle.d.ts +10 -0
- package/dist/out-tsc/page-title/SpsPageTitle.examples.d.ts +2 -0
- package/dist/out-tsc/page-title/SpsPageTitle.examples.js +41 -0
- package/dist/out-tsc/page-title/SpsPageTitle.examples.js.map +1 -0
- package/dist/out-tsc/page-title/SpsPageTitle.js +50 -0
- package/dist/out-tsc/page-title/SpsPageTitle.js.map +1 -0
- package/dist/out-tsc/page-title/index.d.ts +3 -0
- package/dist/out-tsc/page-title/index.js +4 -0
- package/dist/out-tsc/page-title/index.js.map +1 -0
- package/dist/out-tsc/pagination/SpsPageSelector.d.ts +14 -0
- package/dist/out-tsc/pagination/SpsPageSelector.js +99 -0
- package/dist/out-tsc/pagination/SpsPageSelector.js.map +1 -0
- package/dist/out-tsc/pagination/SpsPagination.d.ts +16 -0
- package/dist/out-tsc/pagination/SpsPagination.examples.d.ts +2 -0
- package/dist/out-tsc/pagination/SpsPagination.examples.js +78 -0
- package/dist/out-tsc/pagination/SpsPagination.examples.js.map +1 -0
- package/dist/out-tsc/pagination/SpsPagination.js +138 -0
- package/dist/out-tsc/pagination/SpsPagination.js.map +1 -0
- package/dist/out-tsc/pagination/index.d.ts +3 -0
- package/dist/out-tsc/pagination/index.js +4 -0
- package/dist/out-tsc/pagination/index.js.map +1 -0
- package/dist/out-tsc/product-bar/SpsProductBar.d.ts +19 -0
- package/dist/out-tsc/product-bar/SpsProductBar.examples.d.ts +2 -0
- package/dist/out-tsc/product-bar/SpsProductBar.examples.js +42 -0
- package/dist/out-tsc/product-bar/SpsProductBar.examples.js.map +1 -0
- package/dist/out-tsc/product-bar/SpsProductBar.js +90 -0
- package/dist/out-tsc/product-bar/SpsProductBar.js.map +1 -0
- package/dist/out-tsc/product-bar/SpsProductBarTab.d.ts +6 -0
- package/dist/out-tsc/product-bar/SpsProductBarTab.js +38 -0
- package/dist/out-tsc/product-bar/SpsProductBarTab.js.map +1 -0
- package/dist/out-tsc/product-bar/index.d.ts +3 -0
- package/dist/out-tsc/product-bar/index.js +4 -0
- package/dist/out-tsc/product-bar/index.js.map +1 -0
- package/dist/out-tsc/progress-bar/SpsProgressBar.d.ts +15 -0
- package/dist/out-tsc/progress-bar/SpsProgressBar.examples.d.ts +27 -0
- package/dist/out-tsc/progress-bar/SpsProgressBar.examples.js +79 -0
- package/dist/out-tsc/progress-bar/SpsProgressBar.examples.js.map +1 -0
- package/dist/out-tsc/progress-bar/SpsProgressBar.js +59 -0
- package/dist/out-tsc/progress-bar/SpsProgressBar.js.map +1 -0
- package/dist/out-tsc/progress-bar/index.d.ts +2 -0
- package/dist/out-tsc/progress-bar/index.js +3 -0
- package/dist/out-tsc/progress-bar/index.js.map +1 -0
- package/dist/out-tsc/progress-ring/SpsProgressRing.d.ts +13 -0
- package/dist/out-tsc/progress-ring/SpsProgressRing.js +37 -0
- package/dist/out-tsc/progress-ring/SpsProgressRing.js.map +1 -0
- package/dist/out-tsc/progress-ring/index.d.ts +1 -0
- package/dist/out-tsc/progress-ring/index.js +2 -0
- package/dist/out-tsc/progress-ring/index.js.map +1 -0
- package/dist/out-tsc/prop-types.d.ts +23 -0
- package/dist/out-tsc/prop-types.js +26 -0
- package/dist/out-tsc/prop-types.js.map +1 -0
- package/dist/out-tsc/radio-button/SpsRadioButton.d.ts +23 -0
- package/dist/out-tsc/radio-button/SpsRadioButton.examples.d.ts +2 -0
- package/dist/out-tsc/radio-button/SpsRadioButton.examples.js +36 -0
- package/dist/out-tsc/radio-button/SpsRadioButton.examples.js.map +1 -0
- package/dist/out-tsc/radio-button/SpsRadioButton.js +64 -0
- package/dist/out-tsc/radio-button/SpsRadioButton.js.map +1 -0
- package/dist/out-tsc/radio-button/index.d.ts +2 -0
- package/dist/out-tsc/radio-button/index.js +3 -0
- package/dist/out-tsc/radio-button/index.js.map +1 -0
- package/dist/out-tsc/scrollable-container/SpsScrollableContainer.d.ts +11 -0
- package/dist/out-tsc/scrollable-container/SpsScrollableContainer.examples.d.ts +14 -0
- package/dist/out-tsc/scrollable-container/SpsScrollableContainer.examples.js +21 -0
- package/dist/out-tsc/scrollable-container/SpsScrollableContainer.examples.js.map +1 -0
- package/dist/out-tsc/scrollable-container/SpsScrollableContainer.js +27 -0
- package/dist/out-tsc/scrollable-container/SpsScrollableContainer.js.map +1 -0
- package/dist/out-tsc/scrollable-container/index.d.ts +2 -0
- package/dist/out-tsc/scrollable-container/index.js +3 -0
- package/dist/out-tsc/scrollable-container/index.js.map +1 -0
- package/dist/out-tsc/search-results-bar/SpsSearchResultsBar.d.ts +13 -0
- package/dist/out-tsc/search-results-bar/SpsSearchResultsBar.examples.d.ts +2 -0
- package/dist/out-tsc/search-results-bar/SpsSearchResultsBar.examples.js +36 -0
- package/dist/out-tsc/search-results-bar/SpsSearchResultsBar.examples.js.map +1 -0
- package/dist/out-tsc/search-results-bar/SpsSearchResultsBar.js +74 -0
- package/dist/out-tsc/search-results-bar/SpsSearchResultsBar.js.map +1 -0
- package/dist/out-tsc/search-results-bar/index.d.ts +2 -0
- package/dist/out-tsc/search-results-bar/index.js +3 -0
- package/dist/out-tsc/search-results-bar/index.js.map +1 -0
- package/dist/out-tsc/select/SpsSelect.d.ts +37 -0
- package/dist/out-tsc/select/SpsSelect.examples.d.ts +2 -0
- package/dist/out-tsc/select/SpsSelect.examples.js +77 -0
- package/dist/out-tsc/select/SpsSelect.examples.js.map +1 -0
- package/dist/out-tsc/select/SpsSelect.js +205 -0
- package/dist/out-tsc/select/SpsSelect.js.map +1 -0
- package/dist/out-tsc/select/index.d.ts +2 -0
- package/dist/out-tsc/select/index.js +3 -0
- package/dist/out-tsc/select/index.js.map +1 -0
- package/dist/out-tsc/side-nav/SpsSideNav.d.ts +38 -0
- package/dist/out-tsc/side-nav/SpsSideNav.examples.d.ts +2 -0
- package/dist/out-tsc/side-nav/SpsSideNav.examples.js +76 -0
- package/dist/out-tsc/side-nav/SpsSideNav.examples.js.map +1 -0
- package/dist/out-tsc/side-nav/SpsSideNav.js +128 -0
- package/dist/out-tsc/side-nav/SpsSideNav.js.map +1 -0
- package/dist/out-tsc/side-nav/SpsSideNavBranch.d.ts +9 -0
- package/dist/out-tsc/side-nav/SpsSideNavBranch.js +68 -0
- package/dist/out-tsc/side-nav/SpsSideNavBranch.js.map +1 -0
- package/dist/out-tsc/side-nav/index.d.ts +2 -0
- package/dist/out-tsc/side-nav/index.js +3 -0
- package/dist/out-tsc/side-nav/index.js.map +1 -0
- package/dist/out-tsc/slack-link/SpsSlackLink.d.ts +11 -0
- package/dist/out-tsc/slack-link/SpsSlackLink.examples.d.ts +2 -0
- package/dist/out-tsc/slack-link/SpsSlackLink.examples.js +16 -0
- package/dist/out-tsc/slack-link/SpsSlackLink.examples.js.map +1 -0
- package/dist/out-tsc/slack-link/SpsSlackLink.js +45 -0
- package/dist/out-tsc/slack-link/SpsSlackLink.js.map +1 -0
- package/dist/out-tsc/slack-link/index.d.ts +2 -0
- package/dist/out-tsc/slack-link/index.js +3 -0
- package/dist/out-tsc/slack-link/index.js.map +1 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeader.d.ts +13 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeader.examples.d.ts +2 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeader.examples.js +17 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeader.examples.js.map +1 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeader.js +51 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeader.js.map +1 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeaderCell.d.ts +17 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeaderCell.js +71 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeaderCell.js.map +1 -0
- package/dist/out-tsc/sorting-header/index.d.ts +3 -0
- package/dist/out-tsc/sorting-header/index.js +4 -0
- package/dist/out-tsc/sorting-header/index.js.map +1 -0
- package/dist/out-tsc/spinner/SpsSpinner.d.ts +14 -0
- package/dist/out-tsc/spinner/SpsSpinner.examples.d.ts +2 -0
- package/dist/out-tsc/spinner/SpsSpinner.examples.js +22 -0
- package/dist/out-tsc/spinner/SpsSpinner.examples.js.map +1 -0
- package/dist/out-tsc/spinner/SpsSpinner.js +46 -0
- package/dist/out-tsc/spinner/SpsSpinner.js.map +1 -0
- package/dist/out-tsc/spinner/index.d.ts +2 -0
- package/dist/out-tsc/spinner/index.js +3 -0
- package/dist/out-tsc/spinner/index.js.map +1 -0
- package/dist/out-tsc/split-button/SpsSplitButton.d.ts +18 -0
- package/dist/out-tsc/split-button/SpsSplitButton.examples.d.ts +2 -0
- package/dist/out-tsc/split-button/SpsSplitButton.examples.js +39 -0
- package/dist/out-tsc/split-button/SpsSplitButton.examples.js.map +1 -0
- package/dist/out-tsc/split-button/SpsSplitButton.js +76 -0
- package/dist/out-tsc/split-button/SpsSplitButton.js.map +1 -0
- package/dist/out-tsc/split-button/index.d.ts +2 -0
- package/dist/out-tsc/split-button/index.js +3 -0
- package/dist/out-tsc/split-button/index.js.map +1 -0
- package/dist/out-tsc/stepped-progress-bar/SpsSteppedProgressBar.d.ts +25 -0
- package/dist/out-tsc/stepped-progress-bar/SpsSteppedProgressBar.examples.d.ts +24 -0
- package/dist/out-tsc/stepped-progress-bar/SpsSteppedProgressBar.examples.js +78 -0
- package/dist/out-tsc/stepped-progress-bar/SpsSteppedProgressBar.examples.js.map +1 -0
- package/dist/out-tsc/stepped-progress-bar/SpsSteppedProgressBar.js +54 -0
- package/dist/out-tsc/stepped-progress-bar/SpsSteppedProgressBar.js.map +1 -0
- package/dist/out-tsc/stepped-progress-bar/index.d.ts +2 -0
- package/dist/out-tsc/stepped-progress-bar/index.js +3 -0
- package/dist/out-tsc/stepped-progress-bar/index.js.map +1 -0
- package/dist/out-tsc/summary-list/SpsSummaryList.examples.d.ts +2 -0
- package/dist/out-tsc/summary-list/SpsSummaryList.examples.js +44 -0
- package/dist/out-tsc/summary-list/SpsSummaryList.examples.js.map +1 -0
- package/dist/out-tsc/summary-list/SpsSummaryListColumn.d.ts +14 -0
- package/dist/out-tsc/summary-list/SpsSummaryListColumn.js +43 -0
- package/dist/out-tsc/summary-list/SpsSummaryListColumn.js.map +1 -0
- package/dist/out-tsc/summary-list/SpsSummaryListExpansion.d.ts +10 -0
- package/dist/out-tsc/summary-list/SpsSummaryListExpansion.js +38 -0
- package/dist/out-tsc/summary-list/SpsSummaryListExpansion.js.map +1 -0
- package/dist/out-tsc/summary-list/SpsSummaryListRow.d.ts +13 -0
- package/dist/out-tsc/summary-list/SpsSummaryListRow.js +98 -0
- package/dist/out-tsc/summary-list/SpsSummaryListRow.js.map +1 -0
- package/dist/out-tsc/summary-list/index.d.ts +4 -0
- package/dist/out-tsc/summary-list/index.js +5 -0
- package/dist/out-tsc/summary-list/index.js.map +1 -0
- package/dist/out-tsc/table/SpsTable.d.ts +14 -0
- package/dist/out-tsc/table/SpsTable.examples.d.ts +2 -0
- package/dist/out-tsc/table/SpsTable.examples.js +138 -0
- package/dist/out-tsc/table/SpsTable.examples.js.map +1 -0
- package/dist/out-tsc/table/SpsTable.js +88 -0
- package/dist/out-tsc/table/SpsTable.js.map +1 -0
- package/dist/out-tsc/table/SpsTableBody.d.ts +11 -0
- package/dist/out-tsc/table/SpsTableBody.js +46 -0
- package/dist/out-tsc/table/SpsTableBody.js.map +1 -0
- package/dist/out-tsc/table/SpsTableCell.d.ts +15 -0
- package/dist/out-tsc/table/SpsTableCell.js +57 -0
- package/dist/out-tsc/table/SpsTableCell.js.map +1 -0
- package/dist/out-tsc/table/SpsTableHead.d.ts +15 -0
- package/dist/out-tsc/table/SpsTableHead.js +59 -0
- package/dist/out-tsc/table/SpsTableHead.js.map +1 -0
- package/dist/out-tsc/table/SpsTableHeader.d.ts +17 -0
- package/dist/out-tsc/table/SpsTableHeader.js +91 -0
- package/dist/out-tsc/table/SpsTableHeader.js.map +1 -0
- package/dist/out-tsc/table/SpsTableRow.d.ts +14 -0
- package/dist/out-tsc/table/SpsTableRow.js +59 -0
- package/dist/out-tsc/table/SpsTableRow.js.map +1 -0
- package/dist/out-tsc/table/index.d.ts +7 -0
- package/dist/out-tsc/table/index.js +8 -0
- package/dist/out-tsc/table/index.js.map +1 -0
- package/dist/out-tsc/table/usePinnedStyles.d.ts +4 -0
- package/dist/out-tsc/table/usePinnedStyles.js +192 -0
- package/dist/out-tsc/table/usePinnedStyles.js.map +1 -0
- package/dist/out-tsc/tabs/SpsTabs.d.ts +14 -0
- package/dist/out-tsc/tabs/SpsTabs.js +77 -0
- package/dist/out-tsc/tabs/SpsTabs.js.map +1 -0
- package/dist/out-tsc/tag/SpsTag.d.ts +13 -0
- package/dist/out-tsc/tag/SpsTag.examples.d.ts +2 -0
- package/dist/out-tsc/tag/SpsTag.examples.js +25 -0
- package/dist/out-tsc/tag/SpsTag.examples.js.map +1 -0
- package/dist/out-tsc/tag/SpsTag.js +47 -0
- package/dist/out-tsc/tag/SpsTag.js.map +1 -0
- package/dist/out-tsc/tag/index.d.ts +2 -0
- package/dist/out-tsc/tag/index.js +3 -0
- package/dist/out-tsc/tag/index.js.map +1 -0
- package/dist/out-tsc/task-queue/SpsTaskQueue.d.ts +36 -0
- package/dist/out-tsc/task-queue/SpsTaskQueue.examples.d.ts +2 -0
- package/dist/out-tsc/task-queue/SpsTaskQueue.examples.js +45 -0
- package/dist/out-tsc/task-queue/SpsTaskQueue.examples.js.map +1 -0
- package/dist/out-tsc/task-queue/SpsTaskQueue.js +217 -0
- package/dist/out-tsc/task-queue/SpsTaskQueue.js.map +1 -0
- package/dist/out-tsc/task-queue/index.d.ts +2 -0
- package/dist/out-tsc/task-queue/index.js +3 -0
- package/dist/out-tsc/task-queue/index.js.map +1 -0
- package/dist/out-tsc/test-util.d.ts +2 -0
- package/dist/out-tsc/test-util.js +54 -0
- package/dist/out-tsc/test-util.js.map +1 -0
- package/dist/out-tsc/text-input/SpsTextInput.d.ts +22 -0
- package/dist/out-tsc/text-input/SpsTextInput.examples.d.ts +2 -0
- package/dist/out-tsc/text-input/SpsTextInput.examples.js +45 -0
- package/dist/out-tsc/text-input/SpsTextInput.examples.js.map +1 -0
- package/dist/out-tsc/text-input/SpsTextInput.js +73 -0
- package/dist/out-tsc/text-input/SpsTextInput.js.map +1 -0
- package/dist/out-tsc/text-input/index.d.ts +2 -0
- package/dist/out-tsc/text-input/index.js +3 -0
- package/dist/out-tsc/text-input/index.js.map +1 -0
- package/dist/out-tsc/textarea/SpsTextarea.d.ts +22 -0
- package/dist/out-tsc/textarea/SpsTextarea.examples.d.ts +2 -0
- package/dist/out-tsc/textarea/SpsTextarea.examples.js +36 -0
- package/dist/out-tsc/textarea/SpsTextarea.examples.js.map +1 -0
- package/dist/out-tsc/textarea/SpsTextarea.js +71 -0
- package/dist/out-tsc/textarea/SpsTextarea.js.map +1 -0
- package/dist/out-tsc/textarea/index.d.ts +2 -0
- package/dist/out-tsc/textarea/index.js +3 -0
- package/dist/out-tsc/textarea/index.js.map +1 -0
- package/dist/out-tsc/tile-list/SpsTile.d.ts +16 -0
- package/dist/out-tsc/tile-list/SpsTile.js +60 -0
- package/dist/out-tsc/tile-list/SpsTile.js.map +1 -0
- package/dist/out-tsc/tile-list/SpsTileList.d.ts +10 -0
- package/dist/out-tsc/tile-list/SpsTileList.examples.d.ts +2 -0
- package/dist/out-tsc/tile-list/SpsTileList.examples.js +36 -0
- package/dist/out-tsc/tile-list/SpsTileList.examples.js.map +1 -0
- package/dist/out-tsc/tile-list/SpsTileList.js +38 -0
- package/dist/out-tsc/tile-list/SpsTileList.js.map +1 -0
- package/dist/out-tsc/tile-list/index.d.ts +3 -0
- package/dist/out-tsc/tile-list/index.js +4 -0
- package/dist/out-tsc/tile-list/index.js.map +1 -0
- package/dist/out-tsc/toggle/SpsToggle.d.ts +27 -0
- package/dist/out-tsc/toggle/SpsToggle.examples.d.ts +2 -0
- package/dist/out-tsc/toggle/SpsToggle.examples.js +37 -0
- package/dist/out-tsc/toggle/SpsToggle.examples.js.map +1 -0
- package/dist/out-tsc/toggle/SpsToggle.js +95 -0
- package/dist/out-tsc/toggle/SpsToggle.js.map +1 -0
- package/dist/out-tsc/toggle/index.d.ts +2 -0
- package/dist/out-tsc/toggle/index.js +3 -0
- package/dist/out-tsc/toggle/index.js.map +1 -0
- package/dist/out-tsc/tooltip/SpsTooltip.d.ts +29 -0
- package/dist/out-tsc/tooltip/SpsTooltip.examples.d.ts +2 -0
- package/dist/out-tsc/tooltip/SpsTooltip.examples.js +119 -0
- package/dist/out-tsc/tooltip/SpsTooltip.examples.js.map +1 -0
- package/dist/out-tsc/tooltip/SpsTooltip.js +285 -0
- package/dist/out-tsc/tooltip/SpsTooltip.js.map +1 -0
- package/dist/out-tsc/tooltip/SpsTooltipTitle.d.ts +13 -0
- package/dist/out-tsc/tooltip/SpsTooltipTitle.js +32 -0
- package/dist/out-tsc/tooltip/SpsTooltipTitle.js.map +1 -0
- package/dist/out-tsc/tooltip/index.d.ts +3 -0
- package/dist/out-tsc/tooltip/index.js +4 -0
- package/dist/out-tsc/tooltip/index.js.map +1 -0
- package/dist/out-tsc/utils/FauxChangeEvent.d.ts +20 -0
- package/dist/out-tsc/utils/FauxChangeEvent.js +83 -0
- package/dist/out-tsc/utils/FauxChangeEvent.js.map +1 -0
- package/dist/out-tsc/utils/contentOf.d.ts +2 -0
- package/dist/out-tsc/utils/contentOf.js +6 -0
- package/dist/out-tsc/utils/contentOf.js.map +1 -0
- package/dist/out-tsc/utils/getPosition.d.ts +11 -0
- package/dist/out-tsc/utils/getPosition.js +181 -0
- package/dist/out-tsc/utils/getPosition.js.map +1 -0
- package/dist/out-tsc/utils/getScrollParent.d.ts +1 -0
- package/dist/out-tsc/utils/getScrollParent.js +28 -0
- package/dist/out-tsc/utils/getScrollParent.js.map +1 -0
- package/dist/out-tsc/utils/index.d.ts +11 -0
- package/dist/out-tsc/utils/index.js +12 -0
- package/dist/out-tsc/utils/index.js.map +1 -0
- package/dist/out-tsc/utils/selectChildren.d.ts +5 -0
- package/dist/out-tsc/utils/selectChildren.js +72 -0
- package/dist/out-tsc/utils/selectChildren.js.map +1 -0
- package/dist/out-tsc/utils/useCheckDeprecatedProps.d.ts +2 -0
- package/dist/out-tsc/utils/useCheckDeprecatedProps.js +35 -0
- package/dist/out-tsc/utils/useCheckDeprecatedProps.js.map +1 -0
- package/dist/out-tsc/utils/useDidUpdateEffect.d.ts +2 -0
- package/dist/out-tsc/utils/useDidUpdateEffect.js +11 -0
- package/dist/out-tsc/utils/useDidUpdateEffect.js.map +1 -0
- package/dist/out-tsc/utils/useDocumentEventListener.d.ts +1 -0
- package/dist/out-tsc/utils/useDocumentEventListener.js +39 -0
- package/dist/out-tsc/utils/useDocumentEventListener.js.map +1 -0
- package/dist/out-tsc/utils/useElementId.d.ts +2 -0
- package/dist/out-tsc/utils/useElementId.js +6 -0
- package/dist/out-tsc/utils/useElementId.js.map +1 -0
- package/dist/out-tsc/utils/useInputPopup.d.ts +6 -0
- package/dist/out-tsc/utils/useInputPopup.js +52 -0
- package/dist/out-tsc/utils/useInputPopup.js.map +1 -0
- package/dist/out-tsc/utils/usePatchReducer.d.ts +2 -0
- package/dist/out-tsc/utils/usePatchReducer.js +19 -0
- package/dist/out-tsc/utils/usePatchReducer.js.map +1 -0
- package/dist/out-tsc/utils/usePortal.d.ts +6 -0
- package/dist/out-tsc/utils/usePortal.js +57 -0
- package/dist/out-tsc/utils/usePortal.js.map +1 -0
- package/dist/out-tsc/vertical-rule/SpsVerticalRule.d.ts +11 -0
- package/dist/out-tsc/vertical-rule/SpsVerticalRule.js +46 -0
- package/dist/out-tsc/vertical-rule/SpsVerticalRule.js.map +1 -0
- package/dist/out-tsc/vertical-rule/index.d.ts +1 -0
- package/dist/out-tsc/vertical-rule/index.js +2 -0
- package/dist/out-tsc/vertical-rule/index.js.map +1 -0
- package/dist/out-tsc/wizard/SpsWizard.examples.d.ts +2 -0
- package/dist/out-tsc/wizard/SpsWizard.examples.js +31 -0
- package/dist/out-tsc/wizard/SpsWizard.examples.js.map +1 -0
- package/dist/out-tsc/wizard/SpsWizardSidebar.d.ts +23 -0
- package/dist/out-tsc/wizard/SpsWizardSidebar.js +44 -0
- package/dist/out-tsc/wizard/SpsWizardSidebar.js.map +1 -0
- package/dist/out-tsc/wizard/SpsWizardSubstep.d.ts +14 -0
- package/dist/out-tsc/wizard/SpsWizardSubstep.js +37 -0
- package/dist/out-tsc/wizard/SpsWizardSubstep.js.map +1 -0
- package/dist/out-tsc/wizard/index.d.ts +3 -0
- package/dist/out-tsc/wizard/index.js +4 -0
- package/dist/out-tsc/wizard/index.js.map +1 -0
- package/dist/out-tsc/workflow/SpsWorkflow.d.ts +14 -0
- package/dist/out-tsc/workflow/SpsWorkflow.examples.d.ts +2 -0
- package/dist/out-tsc/workflow/SpsWorkflow.examples.js +25 -0
- package/dist/out-tsc/workflow/SpsWorkflow.examples.js.map +1 -0
- package/dist/out-tsc/workflow/SpsWorkflow.js +56 -0
- package/dist/out-tsc/workflow/SpsWorkflow.js.map +1 -0
- package/dist/out-tsc/workflow/SpsWorkflowDocument.d.ts +11 -0
- package/dist/out-tsc/workflow/SpsWorkflowDocument.js +46 -0
- package/dist/out-tsc/workflow/SpsWorkflowDocument.js.map +1 -0
- package/dist/out-tsc/workflow/SpsWorkflowDocumentStatus.d.ts +13 -0
- package/dist/out-tsc/workflow/SpsWorkflowDocumentStatus.js +52 -0
- package/dist/out-tsc/workflow/SpsWorkflowDocumentStatus.js.map +1 -0
- package/dist/out-tsc/workflow/SpsWorkflowStep.d.ts +14 -0
- package/dist/out-tsc/workflow/SpsWorkflowStep.js +53 -0
- package/dist/out-tsc/workflow/SpsWorkflowStep.js.map +1 -0
- package/dist/out-tsc/workflow/index.d.ts +5 -0
- package/dist/out-tsc/workflow/index.js +6 -0
- package/dist/out-tsc/workflow/index.js.map +1 -0
- package/dist/out-tsc/zero-state/SpsMicroZeroState.d.ts +14 -0
- package/dist/out-tsc/zero-state/SpsMicroZeroState.js +46 -0
- package/dist/out-tsc/zero-state/SpsMicroZeroState.js.map +1 -0
- package/dist/out-tsc/zero-state/SpsZeroState.d.ts +13 -0
- package/dist/out-tsc/zero-state/SpsZeroState.examples.d.ts +2 -0
- package/dist/out-tsc/zero-state/SpsZeroState.examples.js +79 -0
- package/dist/out-tsc/zero-state/SpsZeroState.examples.js.map +1 -0
- package/dist/out-tsc/zero-state/SpsZeroState.js +47 -0
- package/dist/out-tsc/zero-state/SpsZeroState.js.map +1 -0
- package/dist/out-tsc/zero-state/index.d.ts +3 -0
- package/dist/out-tsc/zero-state/index.js +4 -0
- package/dist/out-tsc/zero-state/index.js.map +1 -0
- package/lib/index.cjs.js +34659 -8296
- package/lib/index.d.ts +1 -3
- package/lib/index.es.js +27969 -31456
- package/package.json +13 -19
- package/rollup.config.js +22 -0
- package/vite.config.js +1 -1
- package/lib/card-v2/SpsCardV2.d.ts +0 -2
- package/lib/card-v2/SpsCardV2Footer.d.ts +0 -2
- package/lib/card-v2/SpsCardV2Header.d.ts +0 -2
- package/lib/card-v2/SpsCardV2Title.d.ts +0 -2
- package/lib/card-v2/index.d.ts +0 -5
- package/lib/tabs-v2/SpsTab.d.ts +0 -6
- package/lib/tabs-v2/SpsTabPanel.d.ts +0 -5
- package/lib/tabs-v2/SpsTabsV2.d.ts +0 -2
- package/lib/tabs-v2/index.d.ts +0 -4
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./hooks/useSpsForm";
|
|
2
|
+
export * from "./hooks/formArray";
|
|
3
|
+
export * from "./hooks/formControl";
|
|
4
|
+
export * from "./hooks/formGroup";
|
|
5
|
+
export * from "./hooks/SpsAbstractControl.interface";
|
|
6
|
+
export * from "./hooks/SpsControlSet.interface";
|
|
7
|
+
export * from "./hooks/useForm";
|
|
8
|
+
export * from "./hooks/useServerSideValidation";
|
|
9
|
+
export * from "./validation/SpsValidators";
|
|
10
|
+
export * from "./validation/types";
|
|
11
|
+
export * from "./validation/validate";
|
|
12
|
+
export { SpsForm } from "./SpsForm";
|
|
13
|
+
export * from "./SpsForm.examples";
|
|
14
|
+
export * from "./AddRemoveFormRows.examples";
|
|
15
|
+
export { SpsFormComponentWrapper } from "./SpsFormComponentWrapper";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from "./hooks/useSpsForm";
|
|
2
|
+
export * from "./hooks/formArray";
|
|
3
|
+
export * from "./hooks/formControl";
|
|
4
|
+
export * from "./hooks/formGroup";
|
|
5
|
+
export * from "./hooks/SpsAbstractControl.interface";
|
|
6
|
+
export * from "./hooks/SpsControlSet.interface";
|
|
7
|
+
export * from "./hooks/useForm";
|
|
8
|
+
export * from "./hooks/useServerSideValidation";
|
|
9
|
+
export * from "./validation/SpsValidators";
|
|
10
|
+
export * from "./validation/types";
|
|
11
|
+
export * from "./validation/validate";
|
|
12
|
+
export { SpsForm } from "./SpsForm";
|
|
13
|
+
export * from "./SpsForm.examples";
|
|
14
|
+
export * from "./AddRemoveFormRows.examples";
|
|
15
|
+
export { SpsFormComponentWrapper } from "./SpsFormComponentWrapper";
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/form/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AAEnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iBAAiB,CAAC;AAChC,cAAc,iCAAiC,CAAC;AAEhD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,8BAA8B,CAAC;AAE7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SpsValidator, SpsValidatorFactory } from "./types";
|
|
2
|
+
export declare const SpsValidators: Readonly<{
|
|
3
|
+
min: SpsValidatorFactory<string | number>;
|
|
4
|
+
max: SpsValidatorFactory<string | number>;
|
|
5
|
+
required: SpsValidator<any>;
|
|
6
|
+
minLength: SpsValidatorFactory<string>;
|
|
7
|
+
maxLength: SpsValidatorFactory<string>;
|
|
8
|
+
pattern: SpsValidatorFactory<string>;
|
|
9
|
+
alpha: SpsValidator<string>;
|
|
10
|
+
numeric: SpsValidator<string>;
|
|
11
|
+
nonNumeric: SpsValidator<string>;
|
|
12
|
+
OnBlurErrorKeys: Set<string>;
|
|
13
|
+
date: SpsValidator<import("@spscommerce/ds-shared").SimpleDate | import("@spscommerce/ds-shared").SimpleDateRange>;
|
|
14
|
+
dateRange: SpsValidator<import("@spscommerce/ds-shared").SimpleDateRange | import("moment").Duration>;
|
|
15
|
+
dateConstraint: SpsValidatorFactory<import("@spscommerce/ds-shared").SimpleDate | import("@spscommerce/ds-shared").SimpleDateRange>;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import * as dateValidators from "../../datepicker-v2/validation";
|
|
13
|
+
import { OnBlurErrorKeys, AsTypingErrorKeys, PreventativeErrorKeys } from "./types";
|
|
14
|
+
var min = function minValidatorFactory(minimumValue) {
|
|
15
|
+
return function minValidator(value) {
|
|
16
|
+
return Number(value) >= minimumValue
|
|
17
|
+
? null
|
|
18
|
+
: { min: minimumValue };
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
OnBlurErrorKeys.add("min");
|
|
22
|
+
var max = function maxValidatorFactory(maximumValue) {
|
|
23
|
+
return function (value) { return (Number(value) <= maximumValue
|
|
24
|
+
? null
|
|
25
|
+
: { max: maximumValue }); };
|
|
26
|
+
};
|
|
27
|
+
AsTypingErrorKeys.add("max");
|
|
28
|
+
var required = function requiredValidator(value) {
|
|
29
|
+
return typeof value === "undefined" || value === null || value === "" || Number.isNaN(value) || (value === null || value === void 0 ? void 0 : value.length) === 0
|
|
30
|
+
? { required: true }
|
|
31
|
+
: null;
|
|
32
|
+
};
|
|
33
|
+
AsTypingErrorKeys.add("required");
|
|
34
|
+
var minLength = function minLengthValidatorFactory(minimumLength) {
|
|
35
|
+
return function minLengthValidator(value) {
|
|
36
|
+
return value.length >= minimumLength
|
|
37
|
+
? null
|
|
38
|
+
: { minLength: minimumLength };
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
OnBlurErrorKeys.add("minLength");
|
|
42
|
+
var maxLength = function maxLengthValidatorFactory(maximumLength) {
|
|
43
|
+
return function maxLengthValidator(value) {
|
|
44
|
+
return value.length <= maximumLength
|
|
45
|
+
? null
|
|
46
|
+
: { maxLength: maximumLength };
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
PreventativeErrorKeys.add("maxLength");
|
|
50
|
+
var pattern = function patternValidatorFactory(validationPattern) {
|
|
51
|
+
var regex = validationPattern instanceof RegExp
|
|
52
|
+
? validationPattern
|
|
53
|
+
: new RegExp(validationPattern);
|
|
54
|
+
return function patternValidator(value) {
|
|
55
|
+
return regex.test(value)
|
|
56
|
+
? null
|
|
57
|
+
: { pattern: validationPattern };
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
OnBlurErrorKeys.add("pattern");
|
|
61
|
+
var alpha = function alphaValidator(value) {
|
|
62
|
+
/*
|
|
63
|
+
* TODO: change regex to /^\p{L}*$/u once IE11 support
|
|
64
|
+
* is dropped, to match letters in all languages
|
|
65
|
+
*/
|
|
66
|
+
return /^[A-Za-z]*$/.test(value)
|
|
67
|
+
? null
|
|
68
|
+
: { alpha: true };
|
|
69
|
+
};
|
|
70
|
+
PreventativeErrorKeys.add("alpha");
|
|
71
|
+
var numeric = function numericValidator(value) {
|
|
72
|
+
return /^[0-9,. ]*$/.test(value)
|
|
73
|
+
? null
|
|
74
|
+
: { numeric: true };
|
|
75
|
+
};
|
|
76
|
+
PreventativeErrorKeys.add("numeric");
|
|
77
|
+
var nonNumeric = function nonNumericValidator(value) {
|
|
78
|
+
return /^[^0-9]*$/.test(value)
|
|
79
|
+
? null
|
|
80
|
+
: { nonNumeric: true };
|
|
81
|
+
};
|
|
82
|
+
PreventativeErrorKeys.add("nonNumeric");
|
|
83
|
+
export var SpsValidators = Object.freeze(__assign(__assign({}, dateValidators), { min: min, max: max, required: required, minLength: minLength, maxLength: maxLength, pattern: pattern, alpha: alpha, numeric: numeric, nonNumeric: nonNumeric, OnBlurErrorKeys: OnBlurErrorKeys }));
|
|
84
|
+
//# sourceMappingURL=SpsValidators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpsValidators.js","sourceRoot":"","sources":["../../../../src/form/validation/SpsValidators.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,cAAc,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,iBAA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AO,EAAE,IAAI,EAAE,CAAC;AACxB,CAAC,CAAC;AACF,qBAAqB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAErC,IAAM,UAAU,GAAyB,SAAS,mBAAmB,CAAC,KAAa;IACjF,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;QAC5B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC,CAAC;AACF,qBAAqB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AAExC,MAAM,CAAC,IAAM,aAAa,GAAG,MAAM,CAAC,MAAM,uBACrC,cAAc,KACjB,GAAG,KAAA,EACH,GAAG,KAAA,EACH,QAAQ,UAAA,EACR,SAAS,WAAA,EACT,SAAS,WAAA,EACT,OAAO,SAAA,EACP,KAAK,OAAA,EACL,OAAO,SAAA,EACP,UAAU,YAAA,EAEV,eAAe,iBAAA,IACf,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare type SpsValidationErrors = Record<string, boolean | number | string | Record<string, any>>;
|
|
2
|
+
export declare type SpsValidationStatus = SpsValidationErrors | null;
|
|
3
|
+
export declare type SpsValidator<T> = (value: T) => SpsValidationStatus;
|
|
4
|
+
export declare type SpsValidatorFactory<T> = (...args: any[]) => SpsValidator<T>;
|
|
5
|
+
export declare const OnBlurErrorKeys: Set<string>;
|
|
6
|
+
export declare const AsTypingErrorKeys: Set<string>;
|
|
7
|
+
export declare const PreventativeErrorKeys: Set<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/form/validation/types.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,IAAM,eAAe,GAAG,IAAI,GAAG,EAAU,CAAC;AACjD,MAAM,CAAC,IAAM,iBAAiB,GAAG,IAAI,GAAG,EAAU,CAAC;AACnD,MAAM,CAAC,IAAM,qBAAqB,GAAG,IAAI,GAAG,EAAU,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export function validate(value, validators) {
|
|
2
|
+
if (validators === void 0) { validators = []; }
|
|
3
|
+
var reduced = validators.reduce(function (errs, validator) { return Object.assign(errs, validator(value) || {}); }, {});
|
|
4
|
+
return Object.keys(reduced).length ? reduced : null;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=validate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../../src/form/validation/validate.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,QAAQ,CACtB,KAAQ,EACR,UAAuC;IAAvC,2BAAA,EAAA,eAAuC;IAEvC,IAAM,OAAO,GAAI,UAAkB,CAAC,MAAM,CACxC,UACE,IAAyB,EACzB,SAA0B,IACF,OAAA,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,EAA3C,CAA2C,EACrE,EAAE,CACH,CAAC;IACF,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GrowlerKind } from "@spscommerce/ds-shared";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as PropTypes from "../prop-types";
|
|
4
|
+
declare const propTypes: {
|
|
5
|
+
imgSrc: PropTypes.Requireable<string>;
|
|
6
|
+
kind: PropTypes.Requireable<GrowlerKind>;
|
|
7
|
+
onClose: PropTypes.Requireable<() => void>;
|
|
8
|
+
persist: PropTypes.Requireable<boolean>;
|
|
9
|
+
title: PropTypes.Requireable<string>;
|
|
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 SpsGrowlerProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
16
|
+
export declare function SpsGrowler(props: SpsGrowlerProps): React.ReactPortal;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
/* eslint-disable react/prop-types */
|
|
6
|
+
/* eslint-disable react/jsx-one-expression-per-line */
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { code } from "@spscommerce/utils";
|
|
9
|
+
export var SpsGrowlerExamples = {
|
|
10
|
+
writingGuidelines: {
|
|
11
|
+
label: "Writing Guidelines",
|
|
12
|
+
customSection: function () { return (React.createElement(React.Fragment, null,
|
|
13
|
+
React.createElement("p", null, "Use the following guidelines to write an effective Growler message."),
|
|
14
|
+
React.createElement("ul", null,
|
|
15
|
+
React.createElement("li", null,
|
|
16
|
+
"Write all messages in sentence case.",
|
|
17
|
+
React.createElement("ul", null,
|
|
18
|
+
React.createElement("li", null, "Capitalize the first word of the message."),
|
|
19
|
+
React.createElement("li", null, "Add punctuation, such as a period, at the end of the message."))),
|
|
20
|
+
React.createElement("li", null, "Keep messages as succinct as possible while also providing sufficient information to the customer."),
|
|
21
|
+
React.createElement("li", null, "If you can clearly convey your message in a single statement, use only the Primary Message."),
|
|
22
|
+
React.createElement("li", null, "If the message requires additional details, such as further information or instructions, use both the Primary and Secondary Messages.")),
|
|
23
|
+
React.createElement("p", null,
|
|
24
|
+
"For more examples of effective feedback message writing, refer to",
|
|
25
|
+
" ",
|
|
26
|
+
React.createElement("a", { href: "https://atlassian.design/content/messaging-guidelines", target: "_blank", rel: "noreferrer" }, "Atlassian's Messaging Guidelines"),
|
|
27
|
+
"."))); },
|
|
28
|
+
},
|
|
29
|
+
error: {
|
|
30
|
+
label: "Error",
|
|
31
|
+
description: function () { return (React.createElement(React.Fragment, null,
|
|
32
|
+
React.createElement("p", null, "Acceptable message: Document ABC123 has not been sent. Check the form and try sending it again."),
|
|
33
|
+
React.createElement("p", null, "Unacceptable message: Can't send your document.\""))); },
|
|
34
|
+
examples: {
|
|
35
|
+
primary: {
|
|
36
|
+
description: "Primary Message Only",
|
|
37
|
+
react: code(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerError() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.ERROR}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"Document ABC123 has not been sent.\"\n />\n )}\n </>\n );\n }\n "], ["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerError() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.ERROR}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"Document ABC123 has not been sent.\"\n />\n )}\n </>\n );\n }\n "]))),
|
|
38
|
+
},
|
|
39
|
+
primaryAndSecondary: {
|
|
40
|
+
description: "Primary and Secondary Messages",
|
|
41
|
+
react: code(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerError() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.ERROR}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"Document ABC123 has not been sent.\"\n >\n Check the form and try sending it again.\n </SpsGrowler>\n )}\n </>\n );\n }\n "], ["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerError() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.ERROR}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"Document ABC123 has not been sent.\"\n >\n Check the form and try sending it again.\n </SpsGrowler>\n )}\n </>\n );\n }\n "]))),
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
information: {
|
|
46
|
+
label: "Information",
|
|
47
|
+
description: function () { return (React.createElement(React.Fragment, null,
|
|
48
|
+
React.createElement("p", null, "Acceptable message: System maintenance notice. We'll be offline tonight from 9-11pm CST."),
|
|
49
|
+
React.createElement("p", null, "Unacceptable message: No access tonight."))); },
|
|
50
|
+
examples: {
|
|
51
|
+
primary: {
|
|
52
|
+
react: code(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerInfo() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.INFO}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"System maintenance tonight from 9-11pm CST.\"\n />\n )}\n </>\n );\n }\n "], ["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerInfo() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.INFO}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"System maintenance tonight from 9-11pm CST.\"\n />\n )}\n </>\n );\n }\n "]))),
|
|
53
|
+
},
|
|
54
|
+
primaryAndSecondary: {
|
|
55
|
+
react: code(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerInfo() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.INFO}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"System maintenance notice\"\n >\n We'll be offline tonight from 9-11pm CST.\n </SpsGrowler>\n )}\n </>\n );\n }\n "], ["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerInfo() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.INFO}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"System maintenance notice\"\n >\n We'll be offline tonight from 9-11pm CST.\n </SpsGrowler>\n )}\n </>\n );\n }\n "]))),
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
progress: {
|
|
60
|
+
label: "Progress",
|
|
61
|
+
description: function () { return (React.createElement(React.Fragment, null,
|
|
62
|
+
React.createElement("p", null, "Acceptable message: Export in progress."),
|
|
63
|
+
React.createElement("p", null, "Unacceptable message: Please wait."))); },
|
|
64
|
+
examples: {
|
|
65
|
+
primary: {
|
|
66
|
+
description: "Primary Message Only",
|
|
67
|
+
react: code(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerProgress() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.PROGRESS}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"Export in progress.\"\n />\n )}\n </>\n );\n }\n "], ["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerProgress() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.PROGRESS}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"Export in progress.\"\n />\n )}\n </>\n );\n }\n "]))),
|
|
68
|
+
},
|
|
69
|
+
primaryAndSecondary: {
|
|
70
|
+
description: "Primary and Secondary Messages",
|
|
71
|
+
react: code(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerProgress() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.PROGRESS}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"Export in progress\"\n >\n We'll let you know when it's done.\n </SpsGrowler>\n )}\n </>\n );\n }\n "], ["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerProgress() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.PROGRESS}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"Export in progress\"\n >\n We'll let you know when it's done.\n </SpsGrowler>\n )}\n </>\n );\n }\n "]))),
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
success: {
|
|
76
|
+
label: "Success",
|
|
77
|
+
description: function () { return (React.createElement(React.Fragment, null,
|
|
78
|
+
React.createElement("p", null, "Acceptable message: Message sent. Our support team will respond to your message within 24 hours."),
|
|
79
|
+
React.createElement("p", null, "Unacceptable message: Submitted."))); },
|
|
80
|
+
examples: {
|
|
81
|
+
primary: {
|
|
82
|
+
react: code(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerSuccess() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.SUCCESS}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"Message sent.\"\n />\n )}\n </>\n );\n }\n "], ["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerSuccess() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.SUCCESS}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"Message sent.\"\n />\n )}\n </>\n );\n }\n "]))),
|
|
83
|
+
},
|
|
84
|
+
primaryAndSecondary: {
|
|
85
|
+
react: code(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerSuccess() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.SUCCESS}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"Message sent.\"\n >\n Our support team will respond to your message within 24 hours.\n </SpsGrowler>\n )}\n </>\n );\n }\n "], ["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerSuccess() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.SUCCESS}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"Message sent.\"\n >\n Our support team will respond to your message within 24 hours.\n </SpsGrowler>\n )}\n </>\n );\n }\n "]))),
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
warning: {
|
|
90
|
+
label: "Warning",
|
|
91
|
+
description: function () { return (React.createElement(React.Fragment, null,
|
|
92
|
+
React.createElement("p", null, "Accpetable message: No internet connection detected."),
|
|
93
|
+
React.createElement("p", null, "Unacceptable message: Warning: There is a problem."))); },
|
|
94
|
+
examples: {
|
|
95
|
+
primary: {
|
|
96
|
+
description: "Primary Message Only",
|
|
97
|
+
react: code(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerWarning() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.WARNING}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"No internet connection detected.\"\n />\n )}\n </>\n );\n }\n "], ["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerWarning() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.WARNING}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"No internet connection detected.\"\n />\n )}\n </>\n );\n }\n "]))),
|
|
98
|
+
},
|
|
99
|
+
primaryAndSecondary: {
|
|
100
|
+
react: code(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerWarning() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.WARNING}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"No internet connection detected\"\n >\n Check your connection and try again.\n </SpsGrowler>\n )}\n </>\n );\n }\n "], ["\n import { SpsButton, SpsGrowler } from \"@spscommerce/ds-react\";\n import { ButtonKind, GrowlerKind } from \"@spscommerce/ds-shared\";\n\n function SpsGrowlerWarning() {\n const [growl, setGrowl] = React.useState(false);\n\n return (\n <>\n <SpsButton kind={ButtonKind.LINK} onClick={() => setGrowl(true)} disabled={growl}>\n Show Growler\n </SpsButton>\n {growl && (\n <SpsGrowler\n kind={GrowlerKind.WARNING}\n onClose={() => {\n console.log(\"Growler closed.\");\n setGrowl(false);\n }}\n title=\"No internet connection detected\"\n >\n Check your connection and try again.\n </SpsGrowler>\n )}\n </>\n );\n }\n "]))),
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
hook: {
|
|
105
|
+
label: "Hooks",
|
|
106
|
+
description: function () { return (React.createElement("p", null,
|
|
107
|
+
"If you use the useGrowlers hook, you should ideally invoke it and place",
|
|
108
|
+
" ",
|
|
109
|
+
React.createElement("code", null, "growlers()"),
|
|
110
|
+
" at the top level of your app, and pass down",
|
|
111
|
+
" ",
|
|
112
|
+
React.createElement("code", null, "createGrowler"),
|
|
113
|
+
".")); },
|
|
114
|
+
examples: {
|
|
115
|
+
hook: {
|
|
116
|
+
react: code(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n import { SpsButton, useGrowlers } from \"@spscommerce/ds-react\";\n import { GrowlerKind } from \"@spscommerce/ds-shared\";\n function SpsGrowlerHook() {\n const [growlers, createGrowler] = useGrowlers();\n\n function handleButtonClick() {\n createGrowler({\n kind: \"success\",\n title: \"Success!\",\n content: () => (\n <a href=\"#\" title=\"Content can also be a string.\">\n Look, I can put JSX in here!\n </a>\n ),\n onClose() {\n console.log(\"Growler closed.\");\n },\n });\n }\n\n return (\n <>\n <SpsButton onClick={handleButtonClick}>Add a growler</SpsButton>\n {growlers()}\n </>\n );\n }\n "], ["\n import { SpsButton, useGrowlers } from \"@spscommerce/ds-react\";\n import { GrowlerKind } from \"@spscommerce/ds-shared\";\n function SpsGrowlerHook() {\n const [growlers, createGrowler] = useGrowlers();\n\n function handleButtonClick() {\n createGrowler({\n kind: \"success\",\n title: \"Success!\",\n content: () => (\n <a href=\"#\" title=\"Content can also be a string.\">\n Look, I can put JSX in here!\n </a>\n ),\n onClose() {\n console.log(\"Growler closed.\");\n },\n });\n }\n\n return (\n <>\n <SpsButton onClick={handleButtonClick}>Add a growler</SpsButton>\n {growlers()}\n </>\n );\n }\n "]))),
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
|
|
122
|
+
//# sourceMappingURL=SpsGrowler.examples.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpsGrowler.examples.js","sourceRoot":"","sources":["../../../src/growler/SpsGrowler.examples.tsx"],"names":[],"mappings":";;;;AAAA,qCAAqC;AACrC,sDAAsD;AACtD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,E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E;YACR,OAAO,EAAE;gBACP,WAAW,EAAE,sBAAsB;gBACnC,KAAK,EAAE,IAAI,4xCAAA,ytCAyBF,IAAA;aACV;YACD,mBAAmB,EAAE;gBACnB,WAAW,EAAE,gCAAgC;gBAC7C,KAAK,EAAE,IAAI,y5CAAA,s1CA2BF,IAAA;aACV;SACF;KACF;IACD,OAAO,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,cAAM,OAAA,CACjB;YACE,kIAGI;YACJ,kEAAuC,CACtC,CACJ,EARkB,CAQlB;QACD,QAAQ,EAAE;YACR,OAAO,EAAE;gBACP,KAAK,EAAE,IAAI,oxCAAA,itCAyBF,IAAA;aACV;YACD,mBAAmB,EAAE;gBACnB,KAAK,EAAE,IAAI,86CAAA,22CA2BF,IAAA;aACV;SACF;KACF;IACD,OAAO,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,cAAM,OAAA,CACjB;YACE,sFAA2D;YAC3D,oFAAyD,CACxD,CACJ,EALkB,CAKlB;QACD,QAAQ,EAAE;YACR,OAAO,EAAE;gBACP,WAAW,EAAE,sBAAsB;gBACnC,KAAK,EAAE,IAAI,uyCAAA,ouCAyBF,IAAA;aACV;YACD,mBAAmB,EAAE;gBACnB,KAAK,EAAE,IAAI,w6CAAA,m2CA2BF,IAAA;aACV;SACF;KACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,cAAM,OAAA,CACjB;;YACkF,GAAG;YACnF,+CAAuB;;YAA6C,GAAG;YACvE,kDAA0B;gBACxB,CACL,EANkB,CAMlB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE;gBACJ,KAAK,EAAE,IAAI,u2CAAA,kyCA4BF,IAAA;aACV;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
24
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
25
|
+
if (!m) return o;
|
|
26
|
+
var i = m.call(o), r, ar = [], e;
|
|
27
|
+
try {
|
|
28
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
29
|
+
}
|
|
30
|
+
catch (error) { e = { error: error }; }
|
|
31
|
+
finally {
|
|
32
|
+
try {
|
|
33
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
34
|
+
}
|
|
35
|
+
finally { if (e) throw e.error; }
|
|
36
|
+
}
|
|
37
|
+
return ar;
|
|
38
|
+
};
|
|
39
|
+
var __values = (this && this.__values) || function(o) {
|
|
40
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
41
|
+
if (m) return m.call(o);
|
|
42
|
+
if (o && typeof o.length === "number") return {
|
|
43
|
+
next: function () {
|
|
44
|
+
if (o && i >= o.length) o = void 0;
|
|
45
|
+
return { value: o && o[i++], done: !o };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
49
|
+
};
|
|
50
|
+
import { GROWLER_FADEOUT_DURATION_MS, GROWLER_VISIBLE_DURATION_MS, GrowlerIcon, GrowlerKind, } from "@spscommerce/ds-shared";
|
|
51
|
+
import clsx from "clsx";
|
|
52
|
+
import * as React from "react";
|
|
53
|
+
import * as PropTypes from "../prop-types";
|
|
54
|
+
import { I18nContext } from "../i18n";
|
|
55
|
+
import { usePortal } from "../utils/usePortal";
|
|
56
|
+
var propsDoc = {
|
|
57
|
+
imgSrc: "string",
|
|
58
|
+
kind: "GrowlerKind",
|
|
59
|
+
onClose: "() => void",
|
|
60
|
+
persist: "boolean",
|
|
61
|
+
title: "string",
|
|
62
|
+
};
|
|
63
|
+
var propTypes = __assign(__assign({}, PropTypes.spsGlobalPropTypes), { imgSrc: PropTypes.string, kind: PropTypes.enumValue(GrowlerKind), onClose: PropTypes.fun(), persist: PropTypes.bool, title: PropTypes.string });
|
|
64
|
+
export function SpsGrowler(props) {
|
|
65
|
+
var children = props.children, className = props.className, imgSrc = props.imgSrc, _a = props.kind, kind = _a === void 0 ? GrowlerKind.INFO : _a, onClose = props.onClose, persist = props.persist, title = props.title, unsafelyReplaceClassName = props.unsafelyReplaceClassName, rest = __rest(props, ["children", "className", "imgSrc", "kind", "onClose", "persist", "title", "unsafelyReplaceClassName"]);
|
|
66
|
+
var closeCallback = React.useRef(onClose);
|
|
67
|
+
React.useEffect(function () {
|
|
68
|
+
closeCallback.current = onClose;
|
|
69
|
+
}, [onClose]);
|
|
70
|
+
var t = React.useContext(I18nContext).t;
|
|
71
|
+
var _b = __read(React.useState(true), 2), shown = _b[0], setShown = _b[1];
|
|
72
|
+
var _c = __read(React.useState(false), 2), fade = _c[0], setFade = _c[1];
|
|
73
|
+
function createTimers() {
|
|
74
|
+
return [
|
|
75
|
+
window.setTimeout(function () { return setFade(true); }, GROWLER_VISIBLE_DURATION_MS),
|
|
76
|
+
window.setTimeout(function () {
|
|
77
|
+
setShown(false);
|
|
78
|
+
if (closeCallback.current) {
|
|
79
|
+
closeCallback.current();
|
|
80
|
+
}
|
|
81
|
+
}, GROWLER_VISIBLE_DURATION_MS + GROWLER_FADEOUT_DURATION_MS),
|
|
82
|
+
];
|
|
83
|
+
}
|
|
84
|
+
var timers = React.useRef([]);
|
|
85
|
+
function startTimers() {
|
|
86
|
+
if (!persist) {
|
|
87
|
+
timers.current = createTimers();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function clearTimers() {
|
|
91
|
+
var e_1, _a;
|
|
92
|
+
try {
|
|
93
|
+
for (var _b = __values(timers.current), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
94
|
+
var timer = _c.value;
|
|
95
|
+
window.clearTimeout(timer);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
99
|
+
finally {
|
|
100
|
+
try {
|
|
101
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
102
|
+
}
|
|
103
|
+
finally { if (e_1) throw e_1.error; }
|
|
104
|
+
}
|
|
105
|
+
timers.current = [];
|
|
106
|
+
}
|
|
107
|
+
function cancelTimers() {
|
|
108
|
+
clearTimers();
|
|
109
|
+
setShown(true);
|
|
110
|
+
setFade(false);
|
|
111
|
+
}
|
|
112
|
+
function close() {
|
|
113
|
+
cancelTimers();
|
|
114
|
+
setFade(false);
|
|
115
|
+
setShown(false);
|
|
116
|
+
if (onClose) {
|
|
117
|
+
onClose();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
var iconOrSpinnerClass = kind === GrowlerKind.PROGRESS
|
|
121
|
+
? "sps-spinner"
|
|
122
|
+
: clsx("sps-icon", "sps-icon-" + GrowlerIcon.get(kind));
|
|
123
|
+
var classes = clsx(unsafelyReplaceClassName || "sps-growler", shown && "show", fade && "fade", "sps-growler--" + kind, className);
|
|
124
|
+
React.useEffect(function () {
|
|
125
|
+
startTimers();
|
|
126
|
+
return function () {
|
|
127
|
+
clearTimers();
|
|
128
|
+
};
|
|
129
|
+
}, []);
|
|
130
|
+
var portal = usePortal("sps-growler-display-area", ["sps-growler-area", "z-stratum-dialog"]);
|
|
131
|
+
return portal(React.createElement("div", __assign({ role: "alert", className: classes, onMouseEnter: cancelTimers, onMouseLeave: startTimers }, rest),
|
|
132
|
+
React.createElement("div", { className: "sps-growler__icon-box" },
|
|
133
|
+
imgSrc && React.createElement("img", { src: imgSrc, alt: "" }),
|
|
134
|
+
!imgSrc && React.createElement("i", { className: iconOrSpinnerClass, "aria-hidden": "true" })),
|
|
135
|
+
React.createElement("div", { className: "sps-growler__message-box" },
|
|
136
|
+
React.createElement("div", { className: "sps-growler__message-box-text" },
|
|
137
|
+
title && React.createElement("span", { className: "sps-growler__message-box-title d-block" }, title),
|
|
138
|
+
React.createElement("div", { className: "sps-growler__message-box-subtitle" }, children)),
|
|
139
|
+
React.createElement("button", { type: "button", className: "sps-growler__close-button", "aria-hidden": "true", onClick: close },
|
|
140
|
+
React.createElement("i", { className: "sps-icon sps-icon-x", title: t("design-system:growler.dismiss") })))));
|
|
141
|
+
}
|
|
142
|
+
Object.assign(SpsGrowler, {
|
|
143
|
+
props: propsDoc,
|
|
144
|
+
propTypes: propTypes,
|
|
145
|
+
displayName: "SpsGrowler",
|
|
146
|
+
});
|
|
147
|
+
//# sourceMappingURL=SpsGrowler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpsGrowler.js","sourceRoot":"","sources":["../../../src/growler/SpsGrowler.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,2BAA2B,EAAE,2BAA2B,EAAE,WAAW,EAAE,WAAW,GACnF,MAAM,wBAAwB,CAAC;AAChC,OAAO,IAAI,MAAM,M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AK;gBAEd,2BAAG,SAAS,EAAC,qBAAqB,EAAC,KAAK,EAAE,CAAC,CAAC,+BAA+B,CAAC,GAAI,CACzE,CACL,CACF,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE;IACxB,KAAK,EAAE,QAAQ;IACf,SAAS,WAAA;IACT,WAAW,EAAE,YAAY;CAC1B,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/growler/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GrowlerKind } from "@spscommerce/ds-shared";
|
|
2
|
+
import type { ReactNodeOrRenderFn } from "../prop-types";
|
|
3
|
+
export interface GrowlerConfig {
|
|
4
|
+
title?: string;
|
|
5
|
+
content: ReactNodeOrRenderFn;
|
|
6
|
+
kind?: GrowlerKind;
|
|
7
|
+
imgSrc?: string;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
closed?: boolean;
|
|
10
|
+
id?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function useGrowlers(): [() => JSX.Element[], (config: GrowlerConfig) => void];
|