@alma-oss/spirit-web-react 4.4.2 → 4.5.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/CHANGELOG.md +51 -0
- package/DEPRECATIONS.md +2 -2
- package/README.md +135 -6
- package/dist/bundles/web-react.umd.js +1731 -624
- package/dist/bundles/web-react.umd.js.map +1 -1
- package/dist/bundles/web-react.umd.min.js +1 -1
- package/dist/bundles/web-react.umd.min.js.map +1 -1
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.js +19 -19
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/ButtonLink/ButtonLink.cjs +1 -1
- package/dist/components/ButtonLink/ButtonLink.cjs.map +1 -1
- package/dist/components/ButtonLink/ButtonLink.d.ts +2 -2
- package/dist/components/ButtonLink/ButtonLink.js +23 -18
- package/dist/components/ButtonLink/ButtonLink.js.map +1 -1
- package/dist/components/ButtonLink/useButtonLinkStyleProps.cjs.map +1 -1
- package/dist/components/ButtonLink/useButtonLinkStyleProps.d.ts +9 -9
- package/dist/components/ButtonLink/useButtonLinkStyleProps.js.map +1 -1
- package/dist/components/Card/CardLink.cjs +1 -1
- package/dist/components/Card/CardLink.cjs.map +1 -1
- package/dist/components/Card/CardLink.d.ts +2 -2
- package/dist/components/Card/CardLink.js +10 -15
- package/dist/components/Card/CardLink.js.map +1 -1
- package/dist/components/CharacterCounter/CharacterCounter.cjs +2 -0
- package/dist/components/CharacterCounter/CharacterCounter.cjs.map +1 -0
- package/dist/components/CharacterCounter/CharacterCounter.d.ts +7 -0
- package/dist/components/CharacterCounter/CharacterCounter.js +23 -0
- package/dist/components/CharacterCounter/CharacterCounter.js.map +1 -0
- package/dist/components/CharacterCounter/constants.cjs +2 -0
- package/dist/components/CharacterCounter/constants.cjs.map +1 -0
- package/dist/components/CharacterCounter/constants.d.ts +1 -0
- package/dist/components/CharacterCounter/constants.js +5 -0
- package/dist/components/CharacterCounter/constants.js.map +1 -0
- package/dist/components/CharacterCounter/index.cjs +2 -0
- package/dist/components/CharacterCounter/index.d.ts +3 -0
- package/dist/components/CharacterCounter/index.js +7 -0
- package/dist/components/{UNSTABLE_Attachment → CharacterCounter}/index.js.map +1 -1
- package/dist/components/CharacterCounter/types.d.ts +6 -0
- package/dist/components/CharacterCounter/useCharacterCounterState.cjs +2 -0
- package/dist/components/CharacterCounter/useCharacterCounterState.cjs.map +1 -0
- package/dist/components/CharacterCounter/useCharacterCounterState.d.ts +25 -0
- package/dist/components/CharacterCounter/useCharacterCounterState.js +66 -0
- package/dist/components/CharacterCounter/useCharacterCounterState.js.map +1 -0
- package/dist/components/CharacterCounter.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +58 -54
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/ControlButton/useControlButtonStyleProps.cjs.map +1 -1
- package/dist/components/ControlButton/useControlButtonStyleProps.js.map +1 -1
- package/dist/components/Dropdown/DropdownPopover.cjs.map +1 -1
- package/dist/components/Dropdown/DropdownPopover.d.ts +2 -2
- package/dist/components/Dropdown/DropdownPopover.js.map +1 -1
- package/dist/components/Field/index.cjs +1 -1
- package/dist/components/Field/index.d.ts +0 -2
- package/dist/components/Field/index.js +2 -4
- package/dist/components/Field/index.js.map +1 -1
- package/dist/components/Field/types.d.ts +1 -1
- package/dist/components/FieldGroup/FieldGroup.cjs +1 -1
- package/dist/components/FieldGroup/FieldGroup.cjs.map +1 -1
- package/dist/components/FieldGroup/FieldGroup.js +15 -16
- package/dist/components/FieldGroup/FieldGroup.js.map +1 -1
- package/dist/components/FileUploader/FileUploaderInput.cjs +1 -1
- package/dist/components/FileUploader/FileUploaderInput.cjs.map +1 -1
- package/dist/components/FileUploader/FileUploaderInput.js +36 -35
- package/dist/components/FileUploader/FileUploaderInput.js.map +1 -1
- package/dist/components/Header/HeaderDialogLink.cjs +1 -1
- package/dist/components/Header/HeaderDialogLink.cjs.map +1 -1
- package/dist/components/Header/HeaderDialogLink.js +18 -17
- package/dist/components/Header/HeaderDialogLink.js.map +1 -1
- package/dist/components/Header/HeaderLink.cjs +1 -1
- package/dist/components/Header/HeaderLink.cjs.map +1 -1
- package/dist/components/Header/HeaderLink.js +16 -15
- package/dist/components/Header/HeaderLink.js.map +1 -1
- package/dist/components/InputDetails/InputDetails.cjs +2 -0
- package/dist/components/InputDetails/InputDetails.cjs.map +1 -0
- package/dist/components/InputDetails/InputDetails.d.ts +7 -0
- package/dist/components/InputDetails/InputDetails.js +21 -0
- package/dist/components/InputDetails/InputDetails.js.map +1 -0
- package/dist/components/InputDetails/index.cjs +2 -0
- package/dist/components/InputDetails/index.cjs.map +1 -0
- package/dist/components/InputDetails/index.d.ts +2 -0
- package/dist/components/InputDetails/index.js +7 -0
- package/dist/components/InputDetails/index.js.map +1 -0
- package/dist/components/InputDetails/useInputDetailsStyleProps.cjs +2 -0
- package/dist/components/InputDetails/useInputDetailsStyleProps.cjs.map +1 -0
- package/dist/components/InputDetails/useInputDetailsStyleProps.d.ts +7 -0
- package/dist/components/InputDetails/useInputDetailsStyleProps.js +11 -0
- package/dist/components/InputDetails/useInputDetailsStyleProps.js.map +1 -0
- package/dist/components/InputDetails.d.ts +2 -0
- package/dist/components/Link/Link.cjs +1 -1
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.js +10 -9
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/Link/useLinkStyleProps.cjs.map +1 -1
- package/dist/components/Link/useLinkStyleProps.d.ts +1 -1
- package/dist/components/Link/useLinkStyleProps.js.map +1 -1
- package/dist/components/Pagination/PaginationLink.cjs +1 -1
- package/dist/components/Pagination/PaginationLink.cjs.map +1 -1
- package/dist/components/Pagination/PaginationLink.js +29 -18
- package/dist/components/Pagination/PaginationLink.js.map +1 -1
- package/dist/components/Radio/Radio.cjs +1 -1
- package/dist/components/Radio/Radio.cjs.map +1 -1
- package/dist/components/Radio/Radio.js +24 -25
- package/dist/components/Radio/Radio.js.map +1 -1
- package/dist/components/ScrollView/useScrollPosition.js +4 -4
- package/dist/components/Select/Select.cjs +1 -1
- package/dist/components/Select/Select.cjs.map +1 -1
- package/dist/components/Select/Select.js +28 -29
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Slider/Slider.cjs +1 -1
- package/dist/components/Slider/Slider.cjs.map +1 -1
- package/dist/components/Slider/Slider.js +23 -24
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Tabs/TabLink.cjs +1 -1
- package/dist/components/Tabs/TabLink.cjs.map +1 -1
- package/dist/components/Tabs/TabLink.js +18 -17
- package/dist/components/Tabs/TabLink.js.map +1 -1
- package/dist/components/Tag/constants.cjs +1 -1
- package/dist/components/Tag/constants.cjs.map +1 -1
- package/dist/components/Tag/constants.d.ts +1 -0
- package/dist/components/Tag/constants.js +4 -3
- package/dist/components/Tag/constants.js.map +1 -1
- package/dist/components/Tag/useTagStyleProps.cjs +1 -1
- package/dist/components/Tag/useTagStyleProps.cjs.map +1 -1
- package/dist/components/Tag/useTagStyleProps.js +25 -10
- package/dist/components/Tag/useTagStyleProps.js.map +1 -1
- package/dist/components/TextArea/TextArea.cjs +1 -1
- package/dist/components/TextArea/TextArea.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.js +57 -21
- package/dist/components/TextArea/TextArea.js.map +1 -1
- package/dist/components/TextArea/constants.cjs +2 -0
- package/dist/components/TextArea/constants.cjs.map +1 -0
- package/dist/components/TextArea/constants.d.ts +1 -0
- package/dist/components/TextArea/constants.js +5 -0
- package/dist/components/TextArea/constants.js.map +1 -0
- package/dist/components/TextFieldBase/TextFieldBase.cjs +1 -1
- package/dist/components/TextFieldBase/TextFieldBase.cjs.map +1 -1
- package/dist/components/TextFieldBase/TextFieldBase.js +69 -59
- package/dist/components/TextFieldBase/TextFieldBase.js.map +1 -1
- package/dist/components/TextFieldBase/useTextFieldBaseStyleProps.cjs +1 -1
- package/dist/components/TextFieldBase/useTextFieldBaseStyleProps.cjs.map +1 -1
- package/dist/components/TextFieldBase/useTextFieldBaseStyleProps.d.ts +1 -0
- package/dist/components/TextFieldBase/useTextFieldBaseStyleProps.js +11 -10
- package/dist/components/TextFieldBase/useTextFieldBaseStyleProps.js.map +1 -1
- package/dist/components/Toggle/Toggle.cjs +1 -1
- package/dist/components/Toggle/Toggle.cjs.map +1 -1
- package/dist/components/Toggle/Toggle.js +59 -55
- package/dist/components/Toggle/Toggle.js.map +1 -1
- package/dist/components/UNSTABLE_File/UNSTABLE_File.cjs +2 -0
- package/dist/components/UNSTABLE_File/UNSTABLE_File.cjs.map +1 -0
- package/dist/components/UNSTABLE_File/UNSTABLE_File.d.ts +8 -0
- package/dist/components/UNSTABLE_File/UNSTABLE_File.js +88 -0
- package/dist/components/UNSTABLE_File/UNSTABLE_File.js.map +1 -0
- package/dist/components/UNSTABLE_File/UNSTABLE_FileImagePreview.cjs +2 -0
- package/dist/components/UNSTABLE_File/UNSTABLE_FileImagePreview.cjs.map +1 -0
- package/dist/components/UNSTABLE_File/UNSTABLE_FileImagePreview.d.ts +8 -0
- package/dist/components/UNSTABLE_File/UNSTABLE_FileImagePreview.js +29 -0
- package/dist/components/UNSTABLE_File/UNSTABLE_FileImagePreview.js.map +1 -0
- package/dist/components/UNSTABLE_File/constants.cjs +2 -0
- package/dist/components/UNSTABLE_File/constants.cjs.map +1 -0
- package/dist/components/UNSTABLE_File/constants.d.ts +9 -0
- package/dist/components/UNSTABLE_File/constants.js +13 -0
- package/dist/components/UNSTABLE_File/constants.js.map +1 -0
- package/dist/components/UNSTABLE_File/index.cjs +2 -0
- package/dist/components/UNSTABLE_File/index.cjs.map +1 -0
- package/dist/components/UNSTABLE_File/index.d.ts +6 -0
- package/dist/components/UNSTABLE_File/index.js +16 -0
- package/dist/components/UNSTABLE_File/index.js.map +1 -0
- package/dist/components/UNSTABLE_File/types.d.ts +48 -0
- package/dist/components/UNSTABLE_File/useFileImageStyles.cjs +2 -0
- package/dist/components/UNSTABLE_File/useFileImageStyles.cjs.map +1 -0
- package/dist/components/UNSTABLE_File/useFileImageStyles.d.ts +19 -0
- package/dist/components/UNSTABLE_File/useFileImageStyles.js +21 -0
- package/dist/components/UNSTABLE_File/useFileImageStyles.js.map +1 -0
- package/dist/components/UNSTABLE_File/useFileStyleProps.cjs +2 -0
- package/dist/components/UNSTABLE_File/useFileStyleProps.cjs.map +1 -0
- package/dist/components/UNSTABLE_File/useFileStyleProps.d.ts +20 -0
- package/dist/components/UNSTABLE_File/useFileStyleProps.js +29 -0
- package/dist/components/UNSTABLE_File/useFileStyleProps.js.map +1 -0
- package/dist/components/UNSTABLE_File.d.ts +2 -0
- package/dist/components/UNSTABLE_FileUpload/UNSTABLE_FileUpload.cjs +1 -1
- package/dist/components/UNSTABLE_FileUpload/UNSTABLE_FileUpload.cjs.map +1 -1
- package/dist/components/UNSTABLE_FileUpload/UNSTABLE_FileUpload.js +129 -112
- package/dist/components/UNSTABLE_FileUpload/UNSTABLE_FileUpload.js.map +1 -1
- package/dist/components/UNSTABLE_FileUpload/types.d.ts +6 -3
- package/dist/components/UNSTABLE_FileUpload/useFileUploadStyleProps.cjs +1 -1
- package/dist/components/UNSTABLE_FileUpload/useFileUploadStyleProps.cjs.map +1 -1
- package/dist/components/UNSTABLE_FileUpload/useFileUploadStyleProps.d.ts +2 -3
- package/dist/components/UNSTABLE_FileUpload/useFileUploadStyleProps.js +18 -16
- package/dist/components/UNSTABLE_FileUpload/useFileUploadStyleProps.js.map +1 -1
- package/dist/components/UNSTABLE_Picker/PickerContext.cjs +2 -0
- package/dist/components/UNSTABLE_Picker/PickerContext.cjs.map +1 -0
- package/dist/components/UNSTABLE_Picker/PickerContext.d.ts +3 -0
- package/dist/components/UNSTABLE_Picker/PickerContext.js +9 -0
- package/dist/components/UNSTABLE_Picker/PickerContext.js.map +1 -0
- package/dist/components/UNSTABLE_Picker/PickerPopoverContext.cjs +2 -0
- package/dist/components/UNSTABLE_Picker/PickerPopoverContext.cjs.map +1 -0
- package/dist/components/UNSTABLE_Picker/PickerPopoverContext.d.ts +3 -0
- package/dist/components/UNSTABLE_Picker/PickerPopoverContext.js +16 -0
- package/dist/components/UNSTABLE_Picker/PickerPopoverContext.js.map +1 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_Picker.cjs +2 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_Picker.cjs.map +1 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_Picker.d.ts +4 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_Picker.js +204 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_Picker.js.map +1 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerGroup.cjs +2 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerGroup.cjs.map +1 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerGroup.d.ts +7 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerGroup.js +14 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerGroup.js.map +1 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerItem.cjs +2 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerItem.cjs.map +1 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerItem.d.ts +7 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerItem.js +32 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerItem.js.map +1 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerTag.cjs +2 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerTag.cjs.map +1 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerTag.d.ts +7 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerTag.js +64 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerTag.js.map +1 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_UncontrolledPicker.cjs +2 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_UncontrolledPicker.cjs.map +1 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_UncontrolledPicker.d.ts +4 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_UncontrolledPicker.js +40 -0
- package/dist/components/UNSTABLE_Picker/UNSTABLE_UncontrolledPicker.js.map +1 -0
- package/dist/components/UNSTABLE_Picker/constants.cjs +2 -0
- package/dist/components/UNSTABLE_Picker/constants.cjs.map +1 -0
- package/dist/components/UNSTABLE_Picker/constants.d.ts +6 -0
- package/dist/components/UNSTABLE_Picker/constants.js +11 -0
- package/dist/components/UNSTABLE_Picker/constants.js.map +1 -0
- package/dist/components/UNSTABLE_Picker/index.cjs +2 -0
- package/dist/components/UNSTABLE_Picker/index.cjs.map +1 -0
- package/dist/components/UNSTABLE_Picker/index.d.ts +11 -0
- package/dist/components/UNSTABLE_Picker/index.js +26 -0
- package/dist/components/UNSTABLE_Picker/index.js.map +1 -0
- package/dist/components/UNSTABLE_Picker/types.d.ts +91 -0
- package/dist/components/UNSTABLE_Picker/usePickerId.cjs +2 -0
- package/dist/components/UNSTABLE_Picker/usePickerId.cjs.map +1 -0
- package/dist/components/UNSTABLE_Picker/usePickerId.d.ts +8 -0
- package/dist/components/UNSTABLE_Picker/usePickerId.js +15 -0
- package/dist/components/UNSTABLE_Picker/usePickerId.js.map +1 -0
- package/dist/components/UNSTABLE_Picker/usePickerPopoverTabOutToTrigger.cjs +2 -0
- package/dist/components/UNSTABLE_Picker/usePickerPopoverTabOutToTrigger.cjs.map +1 -0
- package/dist/components/UNSTABLE_Picker/usePickerPopoverTabOutToTrigger.d.ts +11 -0
- package/dist/components/UNSTABLE_Picker/usePickerPopoverTabOutToTrigger.js +27 -0
- package/dist/components/UNSTABLE_Picker/usePickerPopoverTabOutToTrigger.js.map +1 -0
- package/dist/components/UNSTABLE_Picker/usePickerSelectionGridKeyboard.cjs +2 -0
- package/dist/components/UNSTABLE_Picker/usePickerSelectionGridKeyboard.cjs.map +1 -0
- package/dist/components/UNSTABLE_Picker/usePickerSelectionGridKeyboard.d.ts +13 -0
- package/dist/components/UNSTABLE_Picker/usePickerSelectionGridKeyboard.js +95 -0
- package/dist/components/UNSTABLE_Picker/usePickerSelectionGridKeyboard.js.map +1 -0
- package/dist/components/UNSTABLE_Picker/usePickerStyleProps.cjs +2 -0
- package/dist/components/UNSTABLE_Picker/usePickerStyleProps.cjs.map +1 -0
- package/dist/components/UNSTABLE_Picker/usePickerStyleProps.d.ts +21 -0
- package/dist/components/UNSTABLE_Picker/usePickerStyleProps.js +29 -0
- package/dist/components/UNSTABLE_Picker/usePickerStyleProps.js.map +1 -0
- package/dist/components/UNSTABLE_Picker/utils.cjs +2 -0
- package/dist/components/UNSTABLE_Picker/utils.cjs.map +1 -0
- package/dist/components/UNSTABLE_Picker/utils.d.ts +10 -0
- package/dist/components/UNSTABLE_Picker/utils.js +41 -0
- package/dist/components/UNSTABLE_Picker/utils.js.map +1 -0
- package/dist/components/UNSTABLE_Picker.d.ts +2 -0
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +4 -1
- package/dist/components/index.js +523 -498
- package/dist/components/index.js.map +1 -1
- package/dist/constants/index.cjs +1 -1
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +43 -40
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/selection.cjs +2 -0
- package/dist/constants/selection.cjs.map +1 -0
- package/dist/constants/selection.d.ts +2 -0
- package/dist/constants/selection.js +6 -0
- package/dist/constants/selection.js.map +1 -0
- package/dist/context/RouterContext.cjs +2 -0
- package/dist/context/RouterContext.cjs.map +1 -0
- package/dist/context/RouterContext.d.ts +16 -0
- package/dist/context/RouterContext.js +12 -0
- package/dist/context/RouterContext.js.map +1 -0
- package/dist/context/index.cjs +1 -1
- package/dist/context/index.d.ts +1 -0
- package/dist/context/index.js +11 -7
- package/dist/context/index.js.map +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.ts +5 -1
- package/dist/hooks/index.js +54 -40
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useAriaIdRefs.cjs +2 -0
- package/dist/hooks/useAriaIdRefs.cjs.map +1 -0
- package/dist/hooks/useAriaIdRefs.d.ts +11 -0
- package/dist/hooks/useAriaIdRefs.js +23 -0
- package/dist/hooks/useAriaIdRefs.js.map +1 -0
- package/dist/hooks/useControlledModeGuard.cjs +2 -0
- package/dist/hooks/useControlledModeGuard.cjs.map +1 -0
- package/dist/hooks/useControlledModeGuard.d.ts +10 -0
- package/dist/hooks/useControlledModeGuard.js +33 -0
- package/dist/hooks/useControlledModeGuard.js.map +1 -0
- package/dist/hooks/useDebouncedValue.cjs +2 -0
- package/dist/hooks/useDebouncedValue.cjs.map +1 -0
- package/dist/hooks/useDebouncedValue.d.ts +1 -0
- package/dist/hooks/useDebouncedValue.js +17 -0
- package/dist/hooks/useDebouncedValue.js.map +1 -0
- package/dist/hooks/useLinkClick.cjs +2 -0
- package/dist/hooks/useLinkClick.cjs.map +1 -0
- package/dist/hooks/useLinkClick.d.ts +4 -0
- package/dist/hooks/useLinkClick.js +15 -0
- package/dist/hooks/useLinkClick.js.map +1 -0
- package/dist/hooks/useSelectionState.cjs +2 -0
- package/dist/hooks/useSelectionState.cjs.map +1 -0
- package/dist/hooks/useSelectionState.d.ts +17 -0
- package/dist/hooks/useSelectionState.js +41 -0
- package/dist/hooks/useSelectionState.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +722 -673
- package/dist/index.js.map +1 -1
- package/dist/translations/defaults.cjs +1 -1
- package/dist/translations/defaults.cjs.map +1 -1
- package/dist/translations/defaults.d.ts +17 -0
- package/dist/translations/defaults.js +17 -0
- package/dist/translations/defaults.js.map +1 -1
- package/dist/types/button.d.ts +3 -2
- package/dist/types/card.cjs.map +1 -1
- package/dist/types/card.d.ts +5 -7
- package/dist/types/card.js.map +1 -1
- package/dist/types/checkbox.d.ts +2 -2
- package/dist/types/controlButton.d.ts +2 -3
- package/dist/types/header.d.ts +3 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/types/inputDetails.d.ts +9 -0
- package/dist/types/link.cjs.map +1 -1
- package/dist/types/link.d.ts +2 -2
- package/dist/types/link.js.map +1 -1
- package/dist/types/pagination.d.ts +4 -4
- package/dist/types/shared/index.cjs.map +1 -1
- package/dist/types/shared/index.d.ts +1 -0
- package/dist/types/shared/index.js.map +1 -1
- package/dist/types/shared/inputs.d.ts +3 -0
- package/dist/types/shared/router.d.ts +3 -0
- package/dist/types/tabs.d.ts +2 -2
- package/dist/types/tag.d.ts +1 -0
- package/dist/types/textArea.d.ts +26 -5
- package/dist/types/textFieldBase.d.ts +5 -2
- package/dist/types/toggle.d.ts +2 -2
- package/dist/utils/debounce.cjs +1 -1
- package/dist/utils/debounce.cjs.map +1 -1
- package/dist/utils/debounce.d.ts +4 -1
- package/dist/utils/debounce.js +11 -8
- package/dist/utils/debounce.js.map +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +36 -33
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/router.cjs +2 -0
- package/dist/utils/router.cjs.map +1 -0
- package/dist/utils/router.d.ts +12 -0
- package/dist/utils/router.js +10 -0
- package/dist/utils/router.js.map +1 -0
- package/dist/utils/string.cjs +1 -1
- package/dist/utils/string.cjs.map +1 -1
- package/dist/utils/string.d.ts +1 -0
- package/dist/utils/string.js +10 -9
- package/dist/utils/string.js.map +1 -1
- package/package.json +38 -23
- package/dist/components/Field/useAriaIds.cjs +0 -2
- package/dist/components/Field/useAriaIds.cjs.map +0 -1
- package/dist/components/Field/useAriaIds.d.ts +0 -8
- package/dist/components/Field/useAriaIds.js +0 -15
- package/dist/components/Field/useAriaIds.js.map +0 -1
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_Attachment.cjs +0 -2
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_Attachment.cjs.map +0 -1
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_Attachment.d.ts +0 -8
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_Attachment.js +0 -42
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_Attachment.js.map +0 -1
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentActionButton.cjs +0 -2
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentActionButton.cjs.map +0 -1
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentActionButton.d.ts +0 -8
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentActionButton.js +0 -30
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentActionButton.js.map +0 -1
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentDismissButton.cjs +0 -2
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentDismissButton.cjs.map +0 -1
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentDismissButton.d.ts +0 -8
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentDismissButton.js +0 -29
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentDismissButton.js.map +0 -1
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentImagePreview.cjs +0 -2
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentImagePreview.cjs.map +0 -1
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentImagePreview.d.ts +0 -8
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentImagePreview.js +0 -29
- package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentImagePreview.js.map +0 -1
- package/dist/components/UNSTABLE_Attachment/constants.cjs +0 -2
- package/dist/components/UNSTABLE_Attachment/constants.cjs.map +0 -1
- package/dist/components/UNSTABLE_Attachment/constants.d.ts +0 -9
- package/dist/components/UNSTABLE_Attachment/constants.js +0 -13
- package/dist/components/UNSTABLE_Attachment/constants.js.map +0 -1
- package/dist/components/UNSTABLE_Attachment/index.cjs +0 -2
- package/dist/components/UNSTABLE_Attachment/index.d.ts +0 -8
- package/dist/components/UNSTABLE_Attachment/index.js +0 -20
- package/dist/components/UNSTABLE_Attachment/types.d.ts +0 -42
- package/dist/components/UNSTABLE_Attachment/useAttachmentImageStyles.cjs +0 -2
- package/dist/components/UNSTABLE_Attachment/useAttachmentImageStyles.cjs.map +0 -1
- package/dist/components/UNSTABLE_Attachment/useAttachmentImageStyles.d.ts +0 -18
- package/dist/components/UNSTABLE_Attachment/useAttachmentImageStyles.js +0 -22
- package/dist/components/UNSTABLE_Attachment/useAttachmentImageStyles.js.map +0 -1
- package/dist/components/UNSTABLE_Attachment/useAttachmentStyleProps.cjs +0 -2
- package/dist/components/UNSTABLE_Attachment/useAttachmentStyleProps.cjs.map +0 -1
- package/dist/components/UNSTABLE_Attachment/useAttachmentStyleProps.d.ts +0 -21
- package/dist/components/UNSTABLE_Attachment/useAttachmentStyleProps.js +0 -24
- package/dist/components/UNSTABLE_Attachment/useAttachmentStyleProps.js.map +0 -1
- package/dist/components/UNSTABLE_Attachment.d.ts +0 -2
- package/dist/hooks/useAriaDescribedBy.cjs +0 -2
- package/dist/hooks/useAriaDescribedBy.cjs.map +0 -1
- package/dist/hooks/useAriaDescribedBy.d.ts +0 -5
- package/dist/hooks/useAriaDescribedBy.js +0 -7
- package/dist/hooks/useAriaDescribedBy.js.map +0 -1
- /package/dist/components/{UNSTABLE_Attachment → CharacterCounter}/index.cjs.map +0 -0
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={common:{close:"Close",edit:"Edit",remove:"Remove"},attachment:{edit:"Edit",remove:"Remove"},breadcrumbs:{back:"Go back"},fileUploader:{edit:"Edit",remove:"Remove",attachments:"Attachments"},pagination:{next:"Next",previous:"Previous",goToPage:"Go to page"},textField:{password:{show:"Show password",hide:"Hide password"}},splitButton:{dropdown:"More"}};exports.defaultLabels=e;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={common:{close:"Close",edit:"Edit",remove:"Remove"},attachment:{edit:"Edit",remove:"Remove"},breadcrumbs:{back:"Go back"},fileUploader:{edit:"Edit",remove:"Remove",attachments:"Attachments"},pagination:{next:"Next",previous:"Previous",goToPage:"Go to page"},picker:{add:"Add",removeAll:"Remove all",removeItemLabel:"Remove {itemLabel}",selectionAriaLabel:"Selected {label}",tagDescriptionText:"Press Delete or Backspace to remove"},textArea:{counter:{charactersEntered:"{count} characters entered",charactersRemaining:"{count} characters remaining",characterRemaining:"{count} character remaining",canEnterUpTo:"You can enter up to {maxLength} characters",charactersOverLimit:"{count} characters over limit",characterOverLimit:"{count} character over limit"}},textField:{password:{show:"Show password",hide:"Hide password"}},splitButton:{dropdown:"More"}};exports.defaultLabels=e;
|
|
2
2
|
//# sourceMappingURL=defaults.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.cjs","sources":["../../src/translations/defaults.ts"],"sourcesContent":["export const defaultLabels = {\n common: {\n close: 'Close',\n edit: 'Edit',\n remove: 'Remove',\n },\n attachment: {\n edit: 'Edit',\n remove: 'Remove',\n },\n breadcrumbs: {\n back: 'Go back',\n },\n fileUploader: {\n edit: 'Edit',\n remove: 'Remove',\n attachments: 'Attachments',\n },\n pagination: {\n next: 'Next',\n previous: 'Previous',\n goToPage: 'Go to page',\n },\n textField: {\n password: {\n show: 'Show password',\n hide: 'Hide password',\n },\n },\n splitButton: {\n dropdown: 'More',\n },\n};\n"],"names":["defaultLabels"],"mappings":"gFAAO,MAAMA,EAAgB,CAC3B,OAAQ,CACN,MAAO,QACP,KAAM,OACN,OAAQ,QAAA,EAEV,WAAY,CACV,KAAM,OACN,OAAQ,QAAA,EAEV,YAAa,CACX,KAAM,SAAA,EAER,aAAc,CACZ,KAAM,OACN,OAAQ,SACR,YAAa,aAAA,EAEf,WAAY,CACV,KAAM,OACN,SAAU,WACV,SAAU,YAAA,EAEZ,UAAW,CACT,SAAU,CACR,KAAM,gBACN,KAAM,eAAA,CACR,EAEF,YAAa,CACX,SAAU,MAAA,CAEd"}
|
|
1
|
+
{"version":3,"file":"defaults.cjs","sources":["../../src/translations/defaults.ts"],"sourcesContent":["export const defaultLabels = {\n common: {\n close: 'Close',\n edit: 'Edit',\n remove: 'Remove',\n },\n attachment: {\n edit: 'Edit',\n remove: 'Remove',\n },\n breadcrumbs: {\n back: 'Go back',\n },\n fileUploader: {\n edit: 'Edit',\n remove: 'Remove',\n attachments: 'Attachments',\n },\n pagination: {\n next: 'Next',\n previous: 'Previous',\n goToPage: 'Go to page',\n },\n picker: {\n add: 'Add',\n removeAll: 'Remove all',\n removeItemLabel: 'Remove {itemLabel}',\n selectionAriaLabel: 'Selected {label}',\n tagDescriptionText: 'Press Delete or Backspace to remove',\n },\n textArea: {\n counter: {\n charactersEntered: '{count} characters entered',\n charactersRemaining: '{count} characters remaining',\n characterRemaining: '{count} character remaining',\n canEnterUpTo: 'You can enter up to {maxLength} characters',\n charactersOverLimit: '{count} characters over limit',\n characterOverLimit: '{count} character over limit',\n },\n },\n textField: {\n password: {\n show: 'Show password',\n hide: 'Hide password',\n },\n },\n splitButton: {\n dropdown: 'More',\n },\n};\n"],"names":["defaultLabels"],"mappings":"gFAAO,MAAMA,EAAgB,CAC3B,OAAQ,CACN,MAAO,QACP,KAAM,OACN,OAAQ,QAAA,EAEV,WAAY,CACV,KAAM,OACN,OAAQ,QAAA,EAEV,YAAa,CACX,KAAM,SAAA,EAER,aAAc,CACZ,KAAM,OACN,OAAQ,SACR,YAAa,aAAA,EAEf,WAAY,CACV,KAAM,OACN,SAAU,WACV,SAAU,YAAA,EAEZ,OAAQ,CACN,IAAK,MACL,UAAW,aACX,gBAAiB,qBACjB,mBAAoB,mBACpB,mBAAoB,qCAAA,EAEtB,SAAU,CACR,QAAS,CACP,kBAAmB,6BACnB,oBAAqB,+BACrB,mBAAoB,8BACpB,aAAc,6CACd,oBAAqB,gCACrB,mBAAoB,8BAAA,CACtB,EAEF,UAAW,CACT,SAAU,CACR,KAAM,gBACN,KAAM,eAAA,CACR,EAEF,YAAa,CACX,SAAU,MAAA,CAEd"}
|
|
@@ -21,6 +21,23 @@ export declare const defaultLabels: {
|
|
|
21
21
|
previous: string;
|
|
22
22
|
goToPage: string;
|
|
23
23
|
};
|
|
24
|
+
picker: {
|
|
25
|
+
add: string;
|
|
26
|
+
removeAll: string;
|
|
27
|
+
removeItemLabel: string;
|
|
28
|
+
selectionAriaLabel: string;
|
|
29
|
+
tagDescriptionText: string;
|
|
30
|
+
};
|
|
31
|
+
textArea: {
|
|
32
|
+
counter: {
|
|
33
|
+
charactersEntered: string;
|
|
34
|
+
charactersRemaining: string;
|
|
35
|
+
characterRemaining: string;
|
|
36
|
+
canEnterUpTo: string;
|
|
37
|
+
charactersOverLimit: string;
|
|
38
|
+
characterOverLimit: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
24
41
|
textField: {
|
|
25
42
|
password: {
|
|
26
43
|
show: string;
|
|
@@ -21,6 +21,23 @@ const e = {
|
|
|
21
21
|
previous: "Previous",
|
|
22
22
|
goToPage: "Go to page"
|
|
23
23
|
},
|
|
24
|
+
picker: {
|
|
25
|
+
add: "Add",
|
|
26
|
+
removeAll: "Remove all",
|
|
27
|
+
removeItemLabel: "Remove {itemLabel}",
|
|
28
|
+
selectionAriaLabel: "Selected {label}",
|
|
29
|
+
tagDescriptionText: "Press Delete or Backspace to remove"
|
|
30
|
+
},
|
|
31
|
+
textArea: {
|
|
32
|
+
counter: {
|
|
33
|
+
charactersEntered: "{count} characters entered",
|
|
34
|
+
charactersRemaining: "{count} characters remaining",
|
|
35
|
+
characterRemaining: "{count} character remaining",
|
|
36
|
+
canEnterUpTo: "You can enter up to {maxLength} characters",
|
|
37
|
+
charactersOverLimit: "{count} characters over limit",
|
|
38
|
+
characterOverLimit: "{count} character over limit"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
24
41
|
textField: {
|
|
25
42
|
password: {
|
|
26
43
|
show: "Show password",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","sources":["../../src/translations/defaults.ts"],"sourcesContent":["export const defaultLabels = {\n common: {\n close: 'Close',\n edit: 'Edit',\n remove: 'Remove',\n },\n attachment: {\n edit: 'Edit',\n remove: 'Remove',\n },\n breadcrumbs: {\n back: 'Go back',\n },\n fileUploader: {\n edit: 'Edit',\n remove: 'Remove',\n attachments: 'Attachments',\n },\n pagination: {\n next: 'Next',\n previous: 'Previous',\n goToPage: 'Go to page',\n },\n textField: {\n password: {\n show: 'Show password',\n hide: 'Hide password',\n },\n },\n splitButton: {\n dropdown: 'More',\n },\n};\n"],"names":["defaultLabels"],"mappings":"AAAO,MAAMA,IAAgB;AAAA,EAC3B,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,YAAY;AAAA,IACV,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,aAAa;AAAA,IACX,MAAM;AAAA,EAAA;AAAA,EAER,cAAc;AAAA,IACZ,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,aAAa;AAAA,EAAA;AAAA,EAEf,YAAY;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,UAAU;AAAA,EAAA;AAAA,EAEZ,WAAW;AAAA,IACT,UAAU;AAAA,MACR,MAAM;AAAA,MACN,MAAM;AAAA,IAAA;AAAA,EACR;AAAA,EAEF,aAAa;AAAA,IACX,UAAU;AAAA,EAAA;AAEd;"}
|
|
1
|
+
{"version":3,"file":"defaults.js","sources":["../../src/translations/defaults.ts"],"sourcesContent":["export const defaultLabels = {\n common: {\n close: 'Close',\n edit: 'Edit',\n remove: 'Remove',\n },\n attachment: {\n edit: 'Edit',\n remove: 'Remove',\n },\n breadcrumbs: {\n back: 'Go back',\n },\n fileUploader: {\n edit: 'Edit',\n remove: 'Remove',\n attachments: 'Attachments',\n },\n pagination: {\n next: 'Next',\n previous: 'Previous',\n goToPage: 'Go to page',\n },\n picker: {\n add: 'Add',\n removeAll: 'Remove all',\n removeItemLabel: 'Remove {itemLabel}',\n selectionAriaLabel: 'Selected {label}',\n tagDescriptionText: 'Press Delete or Backspace to remove',\n },\n textArea: {\n counter: {\n charactersEntered: '{count} characters entered',\n charactersRemaining: '{count} characters remaining',\n characterRemaining: '{count} character remaining',\n canEnterUpTo: 'You can enter up to {maxLength} characters',\n charactersOverLimit: '{count} characters over limit',\n characterOverLimit: '{count} character over limit',\n },\n },\n textField: {\n password: {\n show: 'Show password',\n hide: 'Hide password',\n },\n },\n splitButton: {\n dropdown: 'More',\n },\n};\n"],"names":["defaultLabels"],"mappings":"AAAO,MAAMA,IAAgB;AAAA,EAC3B,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,YAAY;AAAA,IACV,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,aAAa;AAAA,IACX,MAAM;AAAA,EAAA;AAAA,EAER,cAAc;AAAA,IACZ,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,aAAa;AAAA,EAAA;AAAA,EAEf,YAAY;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,UAAU;AAAA,EAAA;AAAA,EAEZ,QAAQ;AAAA,IACN,KAAK;AAAA,IACL,WAAW;AAAA,IACX,iBAAiB;AAAA,IACjB,oBAAoB;AAAA,IACpB,oBAAoB;AAAA,EAAA;AAAA,EAEtB,UAAU;AAAA,IACR,SAAS;AAAA,MACP,mBAAmB;AAAA,MACnB,qBAAqB;AAAA,MACrB,oBAAoB;AAAA,MACpB,cAAc;AAAA,MACd,qBAAqB;AAAA,MACrB,oBAAoB;AAAA,IAAA;AAAA,EACtB;AAAA,EAEF,WAAW;AAAA,IACT,UAAU;AAAA,MACR,MAAM;AAAA,MACN,MAAM;AAAA,IAAA;AAAA,EACR;AAAA,EAEF,aAAa;AAAA,IACX,UAAU;AAAA,EAAA;AAEd;"}
|
package/dist/types/button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementType } from 'react';
|
|
2
|
-
import { ButtonSizesType, ButtonType, ChildrenProps, ClickEvents, ComponentButtonColorNamesType, EmotionColorNamesType, PolymorphicComponentProps, SingleOrResponsive, SizesDictionaryType, StyleProps } from './shared';
|
|
2
|
+
import { ButtonSizesType, ButtonType, ChildrenProps, ClickEvents, ComponentButtonColorNamesType, EmotionColorNamesType, PolymorphicComponentProps, RouterLinkProps, SingleOrResponsive, SizesDictionaryType, StyleProps } from './shared';
|
|
3
3
|
export type ButtonColor<C> = ComponentButtonColorNamesType<C> | EmotionColorNamesType<C>;
|
|
4
4
|
export type ButtonSize<S> = keyof S extends never ? SizesDictionaryType : ButtonSizesType | S;
|
|
5
5
|
export interface ButtonBaseProps extends ChildrenProps, StyleProps, ClickEvents {
|
|
@@ -12,8 +12,9 @@ export interface ButtonStyleProps<C = void, S = void> extends ButtonBaseProps {
|
|
|
12
12
|
isSymmetrical?: SingleOrResponsive<boolean>;
|
|
13
13
|
size?: ButtonSize<S>;
|
|
14
14
|
}
|
|
15
|
+
export type ButtonLinkStyleProps<C = void, S = void> = ButtonStyleProps<C, S> & RouterLinkProps;
|
|
15
16
|
export interface ButtonProps<C = void, S = void> extends ButtonStyleProps<C, S> {
|
|
16
17
|
type?: ButtonType;
|
|
17
18
|
}
|
|
18
19
|
export type SpiritButtonProps<E extends ElementType = 'button', C = void, S = void> = PolymorphicComponentProps<E, ButtonProps<C, S>>;
|
|
19
|
-
export type SpiritButtonLinkProps<E extends ElementType = 'a', C = void, S = void> = PolymorphicComponentProps<E, Omit<ButtonProps<C, S>, 'type'
|
|
20
|
+
export type SpiritButtonLinkProps<E extends ElementType = 'a', C = void, S = void> = PolymorphicComponentProps<E, Omit<ButtonProps<C, S>, 'type'> & RouterLinkProps>;
|
package/dist/types/card.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.cjs","sources":["../../src/types/card.ts"],"sourcesContent":["import { type ElementType } from 'react';\nimport { type ObjectFit, Sizes } from '../constants';\nimport {\n type AlignmentXDictionaryType,\n type AlignmentYDictionaryType,\n type BackgroundAccentColorsType,\n type BackgroundColorsDictionaryType,\n type BackgroundEmotionColorsType,\n type ChildrenProps,\n type DirectionExtendedDictionaryType,\n type SingleOrResponsive,\n type StyleProps,\n type TransferProps,\n} from './shared';\n\nexport const CardSizes = {\n ...Sizes,\n AUTO: 'auto',\n} as const;\n\nexport type CardSizesDictionaryKeys = keyof typeof CardSizes;\nexport type CardSizesDictionaryType<C = undefined> = (typeof CardSizes)[CardSizesDictionaryKeys] | C;\n\nexport type CardAlignmentXType = SingleOrResponsive<NonNullable<AlignmentXDictionaryType>>;\n\nexport type CardAlignmentYType = SingleOrResponsive<NonNullable<AlignmentYDictionaryType>>;\n\nexport interface CardElementTypeProps<E extends ElementType = 'article'> {\n /**\n * The HTML element or React element used to render the Card, e.g. 'div'.\n *\n * @default 'article'\n */\n elementType?: E;\n}\n\n// Card types\nexport type CardDirectionType =\n | NonNullable<DirectionExtendedDictionaryType>\n | { [key: string]: NonNullable<DirectionExtendedDictionaryType> };\n\nexport interface CardProps<E extends ElementType = 'article'> extends CardElementTypeProps<E> {\n alignmentY?: CardAlignmentYType;\n direction?: CardDirectionType;\n isBoxed?: boolean;\n}\n\nexport interface SpiritCardProps<T extends ElementType = 'article'>\n extends CardProps<T>, ChildrenProps, StyleProps, TransferProps {}\n\nexport type CardMediaBackgroundColorsType =\n | BackgroundColorsDictionaryType\n | BackgroundAccentColorsType\n | BackgroundEmotionColorsType;\n\nexport type CardMediaObjectFitType = (typeof ObjectFit)[keyof typeof ObjectFit];\n\nexport interface CardMediaProps {\n backgroundColor?: CardMediaBackgroundColorsType;\n fit?: CardMediaObjectFitType;\n hasFilledHeight?: boolean;\n isExpanded?: boolean;\n size?: CardSizesDictionaryType;\n}\n\nexport interface SpiritCardMediaProps extends CardMediaProps, ChildrenProps, StyleProps, TransferProps {}\n\n// CardLogo types\nexport interface SpiritCardLogoProps extends ChildrenProps, StyleProps, TransferProps {}\n\n// CardArtwork types\nexport interface CardArtworkProps {\n alignmentX?: CardAlignmentXType;\n}\nexport interface SpiritCardArtworkProps extends CardArtworkProps, ChildrenProps, StyleProps, TransferProps {}\n\n// CardBody types\nexport interface CardBodyProps {\n isSelectable?: boolean;\n}\n\nexport interface SpiritCardBodyProps extends CardBodyProps, ChildrenProps, StyleProps, TransferProps {}\n\n// CardEyebrow types\nexport interface SpiritCardEyebrowProps extends ChildrenProps, StyleProps, TransferProps {}\n\n// CardTitle types\nexport interface CardTitleProps {\n isHeading?: boolean;\n}\n\nexport interface SpiritCardTitleProps<T extends ElementType = 'h4'>\n extends CardTitleProps, CardElementTypeProps<T>, ChildrenProps, StyleProps, TransferProps {}\n\n// CardFooter types\nexport interface CardFooterProps {\n alignmentX?: CardAlignmentXType;\n}\n\nexport interface SpiritCardFooterProps extends CardFooterProps, ChildrenProps, StyleProps, TransferProps {}\n\n// CardLink types\nexport
|
|
1
|
+
{"version":3,"file":"card.cjs","sources":["../../src/types/card.ts"],"sourcesContent":["import { type ElementType } from 'react';\nimport { type ObjectFit, Sizes } from '../constants';\nimport {\n type AlignmentXDictionaryType,\n type AlignmentYDictionaryType,\n type BackgroundAccentColorsType,\n type BackgroundColorsDictionaryType,\n type BackgroundEmotionColorsType,\n type ChildrenProps,\n type DirectionExtendedDictionaryType,\n type PolymorphicComponentProps,\n type SingleOrResponsive,\n type StyleProps,\n type TransferProps,\n} from './shared';\n\nexport const CardSizes = {\n ...Sizes,\n AUTO: 'auto',\n} as const;\n\nexport type CardSizesDictionaryKeys = keyof typeof CardSizes;\nexport type CardSizesDictionaryType<C = undefined> = (typeof CardSizes)[CardSizesDictionaryKeys] | C;\n\nexport type CardAlignmentXType = SingleOrResponsive<NonNullable<AlignmentXDictionaryType>>;\n\nexport type CardAlignmentYType = SingleOrResponsive<NonNullable<AlignmentYDictionaryType>>;\n\nexport interface CardElementTypeProps<E extends ElementType = 'article'> {\n /**\n * The HTML element or React element used to render the Card, e.g. 'div'.\n *\n * @default 'article'\n */\n elementType?: E;\n}\n\n// Card types\nexport type CardDirectionType =\n | NonNullable<DirectionExtendedDictionaryType>\n | { [key: string]: NonNullable<DirectionExtendedDictionaryType> };\n\nexport interface CardProps<E extends ElementType = 'article'> extends CardElementTypeProps<E> {\n alignmentY?: CardAlignmentYType;\n direction?: CardDirectionType;\n isBoxed?: boolean;\n}\n\nexport interface SpiritCardProps<T extends ElementType = 'article'>\n extends CardProps<T>, ChildrenProps, StyleProps, TransferProps {}\n\nexport type CardMediaBackgroundColorsType =\n | BackgroundColorsDictionaryType\n | BackgroundAccentColorsType\n | BackgroundEmotionColorsType;\n\nexport type CardMediaObjectFitType = (typeof ObjectFit)[keyof typeof ObjectFit];\n\nexport interface CardMediaProps {\n backgroundColor?: CardMediaBackgroundColorsType;\n fit?: CardMediaObjectFitType;\n hasFilledHeight?: boolean;\n isExpanded?: boolean;\n size?: CardSizesDictionaryType;\n}\n\nexport interface SpiritCardMediaProps extends CardMediaProps, ChildrenProps, StyleProps, TransferProps {}\n\n// CardLogo types\nexport interface SpiritCardLogoProps extends ChildrenProps, StyleProps, TransferProps {}\n\n// CardArtwork types\nexport interface CardArtworkProps {\n alignmentX?: CardAlignmentXType;\n}\nexport interface SpiritCardArtworkProps extends CardArtworkProps, ChildrenProps, StyleProps, TransferProps {}\n\n// CardBody types\nexport interface CardBodyProps {\n isSelectable?: boolean;\n}\n\nexport interface SpiritCardBodyProps extends CardBodyProps, ChildrenProps, StyleProps, TransferProps {}\n\n// CardEyebrow types\nexport interface SpiritCardEyebrowProps extends ChildrenProps, StyleProps, TransferProps {}\n\n// CardTitle types\nexport interface CardTitleProps {\n isHeading?: boolean;\n}\n\nexport interface SpiritCardTitleProps<T extends ElementType = 'h4'>\n extends CardTitleProps, CardElementTypeProps<T>, ChildrenProps, StyleProps, TransferProps {}\n\n// CardFooter types\nexport interface CardFooterProps {\n alignmentX?: CardAlignmentXType;\n}\n\nexport interface SpiritCardFooterProps extends CardFooterProps, ChildrenProps, StyleProps, TransferProps {}\n\n// CardLink types\nexport interface CardLinkProps extends ChildrenProps, StyleProps, TransferProps {\n href?: string;\n}\n\nexport type SpiritCardLinkProps<E extends ElementType = 'a'> = PolymorphicComponentProps<E, CardLinkProps>;\n"],"names":["CardSizes","Sizes"],"mappings":"iIAgBaA,EAAY,CACvB,GAAGC,EAAAA,MACH,KAAM,MACR"}
|
package/dist/types/card.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementType } from 'react';
|
|
2
2
|
import { ObjectFit } from '../constants';
|
|
3
|
-
import { AlignmentXDictionaryType, AlignmentYDictionaryType, BackgroundAccentColorsType, BackgroundColorsDictionaryType, BackgroundEmotionColorsType, ChildrenProps, DirectionExtendedDictionaryType, SingleOrResponsive, StyleProps, TransferProps } from './shared';
|
|
3
|
+
import { AlignmentXDictionaryType, AlignmentYDictionaryType, BackgroundAccentColorsType, BackgroundColorsDictionaryType, BackgroundEmotionColorsType, ChildrenProps, DirectionExtendedDictionaryType, PolymorphicComponentProps, SingleOrResponsive, StyleProps, TransferProps } from './shared';
|
|
4
4
|
export declare const CardSizes: {
|
|
5
5
|
readonly AUTO: "auto";
|
|
6
6
|
readonly SMALL: "small";
|
|
@@ -59,9 +59,7 @@ export interface CardFooterProps {
|
|
|
59
59
|
}
|
|
60
60
|
export interface SpiritCardFooterProps extends CardFooterProps, ChildrenProps, StyleProps, TransferProps {
|
|
61
61
|
}
|
|
62
|
-
export
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
export type SpiritCardLinkProps<E extends ElementType = 'a'> =
|
|
66
|
-
href: string;
|
|
67
|
-
};
|
|
62
|
+
export interface CardLinkProps extends ChildrenProps, StyleProps, TransferProps {
|
|
63
|
+
href?: string;
|
|
64
|
+
}
|
|
65
|
+
export type SpiritCardLinkProps<E extends ElementType = 'a'> = PolymorphicComponentProps<E, CardLinkProps>;
|
package/dist/types/card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sources":["../../src/types/card.ts"],"sourcesContent":["import { type ElementType } from 'react';\nimport { type ObjectFit, Sizes } from '../constants';\nimport {\n type AlignmentXDictionaryType,\n type AlignmentYDictionaryType,\n type BackgroundAccentColorsType,\n type BackgroundColorsDictionaryType,\n type BackgroundEmotionColorsType,\n type ChildrenProps,\n type DirectionExtendedDictionaryType,\n type SingleOrResponsive,\n type StyleProps,\n type TransferProps,\n} from './shared';\n\nexport const CardSizes = {\n ...Sizes,\n AUTO: 'auto',\n} as const;\n\nexport type CardSizesDictionaryKeys = keyof typeof CardSizes;\nexport type CardSizesDictionaryType<C = undefined> = (typeof CardSizes)[CardSizesDictionaryKeys] | C;\n\nexport type CardAlignmentXType = SingleOrResponsive<NonNullable<AlignmentXDictionaryType>>;\n\nexport type CardAlignmentYType = SingleOrResponsive<NonNullable<AlignmentYDictionaryType>>;\n\nexport interface CardElementTypeProps<E extends ElementType = 'article'> {\n /**\n * The HTML element or React element used to render the Card, e.g. 'div'.\n *\n * @default 'article'\n */\n elementType?: E;\n}\n\n// Card types\nexport type CardDirectionType =\n | NonNullable<DirectionExtendedDictionaryType>\n | { [key: string]: NonNullable<DirectionExtendedDictionaryType> };\n\nexport interface CardProps<E extends ElementType = 'article'> extends CardElementTypeProps<E> {\n alignmentY?: CardAlignmentYType;\n direction?: CardDirectionType;\n isBoxed?: boolean;\n}\n\nexport interface SpiritCardProps<T extends ElementType = 'article'>\n extends CardProps<T>, ChildrenProps, StyleProps, TransferProps {}\n\nexport type CardMediaBackgroundColorsType =\n | BackgroundColorsDictionaryType\n | BackgroundAccentColorsType\n | BackgroundEmotionColorsType;\n\nexport type CardMediaObjectFitType = (typeof ObjectFit)[keyof typeof ObjectFit];\n\nexport interface CardMediaProps {\n backgroundColor?: CardMediaBackgroundColorsType;\n fit?: CardMediaObjectFitType;\n hasFilledHeight?: boolean;\n isExpanded?: boolean;\n size?: CardSizesDictionaryType;\n}\n\nexport interface SpiritCardMediaProps extends CardMediaProps, ChildrenProps, StyleProps, TransferProps {}\n\n// CardLogo types\nexport interface SpiritCardLogoProps extends ChildrenProps, StyleProps, TransferProps {}\n\n// CardArtwork types\nexport interface CardArtworkProps {\n alignmentX?: CardAlignmentXType;\n}\nexport interface SpiritCardArtworkProps extends CardArtworkProps, ChildrenProps, StyleProps, TransferProps {}\n\n// CardBody types\nexport interface CardBodyProps {\n isSelectable?: boolean;\n}\n\nexport interface SpiritCardBodyProps extends CardBodyProps, ChildrenProps, StyleProps, TransferProps {}\n\n// CardEyebrow types\nexport interface SpiritCardEyebrowProps extends ChildrenProps, StyleProps, TransferProps {}\n\n// CardTitle types\nexport interface CardTitleProps {\n isHeading?: boolean;\n}\n\nexport interface SpiritCardTitleProps<T extends ElementType = 'h4'>\n extends CardTitleProps, CardElementTypeProps<T>, ChildrenProps, StyleProps, TransferProps {}\n\n// CardFooter types\nexport interface CardFooterProps {\n alignmentX?: CardAlignmentXType;\n}\n\nexport interface SpiritCardFooterProps extends CardFooterProps, ChildrenProps, StyleProps, TransferProps {}\n\n// CardLink types\nexport
|
|
1
|
+
{"version":3,"file":"card.js","sources":["../../src/types/card.ts"],"sourcesContent":["import { type ElementType } from 'react';\nimport { type ObjectFit, Sizes } from '../constants';\nimport {\n type AlignmentXDictionaryType,\n type AlignmentYDictionaryType,\n type BackgroundAccentColorsType,\n type BackgroundColorsDictionaryType,\n type BackgroundEmotionColorsType,\n type ChildrenProps,\n type DirectionExtendedDictionaryType,\n type PolymorphicComponentProps,\n type SingleOrResponsive,\n type StyleProps,\n type TransferProps,\n} from './shared';\n\nexport const CardSizes = {\n ...Sizes,\n AUTO: 'auto',\n} as const;\n\nexport type CardSizesDictionaryKeys = keyof typeof CardSizes;\nexport type CardSizesDictionaryType<C = undefined> = (typeof CardSizes)[CardSizesDictionaryKeys] | C;\n\nexport type CardAlignmentXType = SingleOrResponsive<NonNullable<AlignmentXDictionaryType>>;\n\nexport type CardAlignmentYType = SingleOrResponsive<NonNullable<AlignmentYDictionaryType>>;\n\nexport interface CardElementTypeProps<E extends ElementType = 'article'> {\n /**\n * The HTML element or React element used to render the Card, e.g. 'div'.\n *\n * @default 'article'\n */\n elementType?: E;\n}\n\n// Card types\nexport type CardDirectionType =\n | NonNullable<DirectionExtendedDictionaryType>\n | { [key: string]: NonNullable<DirectionExtendedDictionaryType> };\n\nexport interface CardProps<E extends ElementType = 'article'> extends CardElementTypeProps<E> {\n alignmentY?: CardAlignmentYType;\n direction?: CardDirectionType;\n isBoxed?: boolean;\n}\n\nexport interface SpiritCardProps<T extends ElementType = 'article'>\n extends CardProps<T>, ChildrenProps, StyleProps, TransferProps {}\n\nexport type CardMediaBackgroundColorsType =\n | BackgroundColorsDictionaryType\n | BackgroundAccentColorsType\n | BackgroundEmotionColorsType;\n\nexport type CardMediaObjectFitType = (typeof ObjectFit)[keyof typeof ObjectFit];\n\nexport interface CardMediaProps {\n backgroundColor?: CardMediaBackgroundColorsType;\n fit?: CardMediaObjectFitType;\n hasFilledHeight?: boolean;\n isExpanded?: boolean;\n size?: CardSizesDictionaryType;\n}\n\nexport interface SpiritCardMediaProps extends CardMediaProps, ChildrenProps, StyleProps, TransferProps {}\n\n// CardLogo types\nexport interface SpiritCardLogoProps extends ChildrenProps, StyleProps, TransferProps {}\n\n// CardArtwork types\nexport interface CardArtworkProps {\n alignmentX?: CardAlignmentXType;\n}\nexport interface SpiritCardArtworkProps extends CardArtworkProps, ChildrenProps, StyleProps, TransferProps {}\n\n// CardBody types\nexport interface CardBodyProps {\n isSelectable?: boolean;\n}\n\nexport interface SpiritCardBodyProps extends CardBodyProps, ChildrenProps, StyleProps, TransferProps {}\n\n// CardEyebrow types\nexport interface SpiritCardEyebrowProps extends ChildrenProps, StyleProps, TransferProps {}\n\n// CardTitle types\nexport interface CardTitleProps {\n isHeading?: boolean;\n}\n\nexport interface SpiritCardTitleProps<T extends ElementType = 'h4'>\n extends CardTitleProps, CardElementTypeProps<T>, ChildrenProps, StyleProps, TransferProps {}\n\n// CardFooter types\nexport interface CardFooterProps {\n alignmentX?: CardAlignmentXType;\n}\n\nexport interface SpiritCardFooterProps extends CardFooterProps, ChildrenProps, StyleProps, TransferProps {}\n\n// CardLink types\nexport interface CardLinkProps extends ChildrenProps, StyleProps, TransferProps {\n href?: string;\n}\n\nexport type SpiritCardLinkProps<E extends ElementType = 'a'> = PolymorphicComponentProps<E, CardLinkProps>;\n"],"names":["CardSizes","Sizes"],"mappings":";AAgBO,MAAMA,IAAY;AAAA,EACvB,GAAGC;AAAA,EACH,MAAM;AACR;"}
|
package/dist/types/checkbox.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { LabelProps } from './label';
|
|
3
|
-
import { ChildrenProps, HelperTextProps, InputBaseProps, InputPositionType, ItemProps, RequiredProps, SingleOrResponsive, SpiritInputElementPropsWithRef, Validation, ValidationTextProp } from './shared';
|
|
3
|
+
import { ChildrenProps, DetailsProps, HelperTextProps, InputBaseProps, InputPositionType, ItemProps, RequiredProps, SingleOrResponsive, SpiritInputElementPropsWithRef, Validation, ValidationTextProp } from './shared';
|
|
4
4
|
export type CheckboxElementBaseProps = SpiritInputElementPropsWithRef;
|
|
5
|
-
export interface CheckboxProps extends CheckboxElementBaseProps, ChildrenProps, LabelProps, ItemProps, InputBaseProps, Validation, ValidationTextProp, RequiredProps, HelperTextProps {
|
|
5
|
+
export interface CheckboxProps extends CheckboxElementBaseProps, ChildrenProps, LabelProps, ItemProps, InputBaseProps, Validation, ValidationTextProp, RequiredProps, HelperTextProps, DetailsProps {
|
|
6
6
|
indeterminate?: boolean;
|
|
7
7
|
isChecked?: boolean;
|
|
8
8
|
inputPosition?: SingleOrResponsive<InputPositionType>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { ElementType } from 'react';
|
|
2
|
-
import { ButtonType, ChildrenProps, ClickEvents, PolymorphicComponentProps, SingleOrResponsive,
|
|
3
|
-
export type ControlButtonSize<S> = keyof S extends never ? SizesDictionaryType : 'small' | 'medium' | 'large' | S;
|
|
2
|
+
import { ButtonType, ChildrenProps, ClickEvents, PolymorphicComponentProps, SingleOrResponsive, SizeExtendedDictionaryType, StyleProps } from './shared';
|
|
4
3
|
export interface ControlButtonBaseProps extends ChildrenProps, StyleProps, ClickEvents {
|
|
5
4
|
}
|
|
6
5
|
export interface ControlButtonStyleProps<S = void> extends ControlButtonBaseProps {
|
|
7
6
|
isDisabled?: boolean;
|
|
8
7
|
isSubtle?: boolean;
|
|
9
8
|
isSymmetrical?: SingleOrResponsive<boolean>;
|
|
10
|
-
size?:
|
|
9
|
+
size?: SizeExtendedDictionaryType | S;
|
|
11
10
|
}
|
|
12
11
|
export interface ControlButtonProps<S = void> extends ControlButtonStyleProps<S> {
|
|
13
12
|
type?: ButtonType;
|
package/dist/types/header.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementType, SyntheticEvent } from 'react';
|
|
2
|
-
import { ChildrenProps, PolymorphicComponentProps, SpiritButtonElementProps, SpiritDialogElementProps, SpiritElementProps, SpiritLItemElementProps, SpiritSpanElementProps, SpiritUListElementProps, StyleProps, TransferProps } from './shared';
|
|
2
|
+
import { ChildrenProps, PolymorphicComponentProps, RouterLinkProps, SpiritButtonElementProps, SpiritDialogElementProps, SpiritElementProps, SpiritLItemElementProps, SpiritSpanElementProps, SpiritUListElementProps, StyleProps, TransferProps } from './shared';
|
|
3
3
|
export type HeaderActionsColorType = 'primary' | 'secondary';
|
|
4
4
|
export type HeaderColorType = 'primary' | 'transparent';
|
|
5
5
|
export type HeaderDialogHandlingProps = {
|
|
@@ -44,10 +44,10 @@ export interface HeaderNavProps extends SpiritUListElementProps, ChildrenProps {
|
|
|
44
44
|
}
|
|
45
45
|
export interface HeaderNavItemProps extends SpiritLItemElementProps, ChildrenProps {
|
|
46
46
|
}
|
|
47
|
-
export interface HeaderDialogLinkStyleProps extends ChildrenProps, StyleProps, TransferProps {
|
|
47
|
+
export interface HeaderDialogLinkStyleProps extends ChildrenProps, StyleProps, TransferProps, RouterLinkProps {
|
|
48
48
|
isCurrent?: boolean;
|
|
49
49
|
}
|
|
50
|
-
export interface HeaderLinkStyleProps extends ChildrenProps, StyleProps, TransferProps {
|
|
50
|
+
export interface HeaderLinkStyleProps extends ChildrenProps, StyleProps, TransferProps, RouterLinkProps {
|
|
51
51
|
isCurrent?: boolean;
|
|
52
52
|
}
|
|
53
53
|
export interface HeaderDialogLinkProps extends HeaderDialogLinkStyleProps {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ElementType, ReactNode } from 'react';
|
|
2
|
+
import { RegisterType as RegisterDetailsType } from '../hooks/useAriaIdRefs';
|
|
3
|
+
import { ChildrenProps, StyleProps } from './shared';
|
|
4
|
+
export interface InputDetailsProps<T extends ElementType = 'div'> extends ChildrenProps, StyleProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
elementType?: T;
|
|
7
|
+
id?: string;
|
|
8
|
+
registerAriaDetails?: RegisterDetailsType;
|
|
9
|
+
}
|
package/dist/types/link.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.cjs","sources":["../../src/types/link.ts"],"sourcesContent":["import { type ElementType } from 'react';\nimport { type LinkColorsExtended } from '..';\nimport type {\n ChildrenProps,\n LinkColorsDictionaryType,\n PolymorphicComponentProps,\n StyleProps,\n TransferProps,\n} from './shared';\n\n/** ===== BASE API ===== */\nexport const UNDERLINED_OPTIONS = {\n ALWAYS: 'always',\n HOVER: 'hover',\n NEVER: 'never',\n} as const;\n\nexport type LinkTarget = '_blank' | '_self' | '_parent' | '_top';\n\nexport type UnderlineOptions = (typeof UNDERLINED_OPTIONS)[keyof typeof UNDERLINED_OPTIONS];\n\nexport type LinkColorsExtendedNamesType = (typeof LinkColorsExtended)[keyof typeof LinkColorsExtended];\n\nexport type LinkColor<C> = LinkColorsDictionaryType | LinkColorsExtendedNamesType | C;\n\nexport interface LinkBaseProps extends ChildrenProps, StyleProps, TransferProps {}\n\n/** ===== STYLE API ===== */\nexport interface LinkStyleProps<C = void> extends LinkBaseProps {\n /** Color of the Link */\n color?: LinkColor<C>;\n /** When is the Link underlined */\n underlined?: UnderlineOptions;\n /** Whether is the Link disabled */\n isDisabled?: boolean;\n}\n\n/** ===== INTERNAL API ===== */\nexport interface LinkProps<C = void> extends LinkStyleProps<C> {\n /** Link's href attribute */\n href?: string;\n /** Link's target attribute */\n target?: LinkTarget;\n}\n\n/** ===== PUBLIC API ===== */\nexport type SpiritLinkProps<E extends ElementType = 'a', C = void> = PolymorphicComponentProps<E, LinkProps<C>>;\n"],"names":["UNDERLINED_OPTIONS"],"mappings":"
|
|
1
|
+
{"version":3,"file":"link.cjs","sources":["../../src/types/link.ts"],"sourcesContent":["import { type ElementType } from 'react';\nimport { type LinkColorsExtended } from '..';\nimport type {\n ChildrenProps,\n LinkColorsDictionaryType,\n PolymorphicComponentProps,\n RouterLinkProps,\n StyleProps,\n TransferProps,\n} from './shared';\n\n/** ===== BASE API ===== */\nexport const UNDERLINED_OPTIONS = {\n ALWAYS: 'always',\n HOVER: 'hover',\n NEVER: 'never',\n} as const;\n\nexport type LinkTarget = '_blank' | '_self' | '_parent' | '_top';\n\nexport type UnderlineOptions = (typeof UNDERLINED_OPTIONS)[keyof typeof UNDERLINED_OPTIONS];\n\nexport type LinkColorsExtendedNamesType = (typeof LinkColorsExtended)[keyof typeof LinkColorsExtended];\n\nexport type LinkColor<C> = LinkColorsDictionaryType | LinkColorsExtendedNamesType | C;\n\nexport interface LinkBaseProps extends ChildrenProps, StyleProps, TransferProps, RouterLinkProps {}\n\n/** ===== STYLE API ===== */\nexport interface LinkStyleProps<C = void> extends LinkBaseProps {\n /** Color of the Link */\n color?: LinkColor<C>;\n /** When is the Link underlined */\n underlined?: UnderlineOptions;\n /** Whether is the Link disabled */\n isDisabled?: boolean;\n}\n\n/** ===== INTERNAL API ===== */\nexport interface LinkProps<C = void> extends LinkStyleProps<C> {\n /** Link's href attribute */\n href?: string;\n /** Link's target attribute */\n target?: LinkTarget;\n}\n\n/** ===== PUBLIC API ===== */\nexport type SpiritLinkProps<E extends ElementType = 'a', C = void> = PolymorphicComponentProps<E, LinkProps<C>>;\n"],"names":["UNDERLINED_OPTIONS"],"mappings":"gFAYO,MAAMA,EAAqB,CAChC,OAAQ,SACR,MAAO,QACP,MAAO,OACT"}
|
package/dist/types/link.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementType } from 'react';
|
|
2
2
|
import { LinkColorsExtended } from '..';
|
|
3
|
-
import { ChildrenProps, LinkColorsDictionaryType, PolymorphicComponentProps, StyleProps, TransferProps } from './shared';
|
|
3
|
+
import { ChildrenProps, LinkColorsDictionaryType, PolymorphicComponentProps, RouterLinkProps, StyleProps, TransferProps } from './shared';
|
|
4
4
|
export declare const UNDERLINED_OPTIONS: {
|
|
5
5
|
readonly ALWAYS: "always";
|
|
6
6
|
readonly HOVER: "hover";
|
|
@@ -10,7 +10,7 @@ export type LinkTarget = '_blank' | '_self' | '_parent' | '_top';
|
|
|
10
10
|
export type UnderlineOptions = (typeof UNDERLINED_OPTIONS)[keyof typeof UNDERLINED_OPTIONS];
|
|
11
11
|
export type LinkColorsExtendedNamesType = (typeof LinkColorsExtended)[keyof typeof LinkColorsExtended];
|
|
12
12
|
export type LinkColor<C> = LinkColorsDictionaryType | LinkColorsExtendedNamesType | C;
|
|
13
|
-
export interface LinkBaseProps extends ChildrenProps, StyleProps, TransferProps {
|
|
13
|
+
export interface LinkBaseProps extends ChildrenProps, StyleProps, TransferProps, RouterLinkProps {
|
|
14
14
|
}
|
|
15
15
|
export interface LinkStyleProps<C = void> extends LinkBaseProps {
|
|
16
16
|
color?: LinkColor<C>;
|
package/dist/types/link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sources":["../../src/types/link.ts"],"sourcesContent":["import { type ElementType } from 'react';\nimport { type LinkColorsExtended } from '..';\nimport type {\n ChildrenProps,\n LinkColorsDictionaryType,\n PolymorphicComponentProps,\n StyleProps,\n TransferProps,\n} from './shared';\n\n/** ===== BASE API ===== */\nexport const UNDERLINED_OPTIONS = {\n ALWAYS: 'always',\n HOVER: 'hover',\n NEVER: 'never',\n} as const;\n\nexport type LinkTarget = '_blank' | '_self' | '_parent' | '_top';\n\nexport type UnderlineOptions = (typeof UNDERLINED_OPTIONS)[keyof typeof UNDERLINED_OPTIONS];\n\nexport type LinkColorsExtendedNamesType = (typeof LinkColorsExtended)[keyof typeof LinkColorsExtended];\n\nexport type LinkColor<C> = LinkColorsDictionaryType | LinkColorsExtendedNamesType | C;\n\nexport interface LinkBaseProps extends ChildrenProps, StyleProps, TransferProps {}\n\n/** ===== STYLE API ===== */\nexport interface LinkStyleProps<C = void> extends LinkBaseProps {\n /** Color of the Link */\n color?: LinkColor<C>;\n /** When is the Link underlined */\n underlined?: UnderlineOptions;\n /** Whether is the Link disabled */\n isDisabled?: boolean;\n}\n\n/** ===== INTERNAL API ===== */\nexport interface LinkProps<C = void> extends LinkStyleProps<C> {\n /** Link's href attribute */\n href?: string;\n /** Link's target attribute */\n target?: LinkTarget;\n}\n\n/** ===== PUBLIC API ===== */\nexport type SpiritLinkProps<E extends ElementType = 'a', C = void> = PolymorphicComponentProps<E, LinkProps<C>>;\n"],"names":["UNDERLINED_OPTIONS"],"mappings":"
|
|
1
|
+
{"version":3,"file":"link.js","sources":["../../src/types/link.ts"],"sourcesContent":["import { type ElementType } from 'react';\nimport { type LinkColorsExtended } from '..';\nimport type {\n ChildrenProps,\n LinkColorsDictionaryType,\n PolymorphicComponentProps,\n RouterLinkProps,\n StyleProps,\n TransferProps,\n} from './shared';\n\n/** ===== BASE API ===== */\nexport const UNDERLINED_OPTIONS = {\n ALWAYS: 'always',\n HOVER: 'hover',\n NEVER: 'never',\n} as const;\n\nexport type LinkTarget = '_blank' | '_self' | '_parent' | '_top';\n\nexport type UnderlineOptions = (typeof UNDERLINED_OPTIONS)[keyof typeof UNDERLINED_OPTIONS];\n\nexport type LinkColorsExtendedNamesType = (typeof LinkColorsExtended)[keyof typeof LinkColorsExtended];\n\nexport type LinkColor<C> = LinkColorsDictionaryType | LinkColorsExtendedNamesType | C;\n\nexport interface LinkBaseProps extends ChildrenProps, StyleProps, TransferProps, RouterLinkProps {}\n\n/** ===== STYLE API ===== */\nexport interface LinkStyleProps<C = void> extends LinkBaseProps {\n /** Color of the Link */\n color?: LinkColor<C>;\n /** When is the Link underlined */\n underlined?: UnderlineOptions;\n /** Whether is the Link disabled */\n isDisabled?: boolean;\n}\n\n/** ===== INTERNAL API ===== */\nexport interface LinkProps<C = void> extends LinkStyleProps<C> {\n /** Link's href attribute */\n href?: string;\n /** Link's target attribute */\n target?: LinkTarget;\n}\n\n/** ===== PUBLIC API ===== */\nexport type SpiritLinkProps<E extends ElementType = 'a', C = void> = PolymorphicComponentProps<E, LinkProps<C>>;\n"],"names":["UNDERLINED_OPTIONS"],"mappings":"AAYO,MAAMA,IAAqB;AAAA,EAChC,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AACT;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementType } from 'react';
|
|
2
2
|
import { SpiritButtonProps } from './button';
|
|
3
|
-
import { ChildrenProps, SpiritElementProps, SpiritLItemElementProps, SpiritPolymorphicElementPropsWithRef, SpiritUListElementProps } from './shared';
|
|
3
|
+
import { ChildrenProps, RouterLinkProps, SpiritElementProps, SpiritLItemElementProps, SpiritPolymorphicElementPropsWithRef, SpiritUListElementProps } from './shared';
|
|
4
4
|
export type PaginationLinkDirectionType = 'previous' | 'next';
|
|
5
5
|
export interface PaginationProps extends SpiritElementProps {
|
|
6
6
|
listProps?: SpiritUListElementProps;
|
|
@@ -13,14 +13,14 @@ export interface AriaPaginationProps {
|
|
|
13
13
|
export interface PaginationLinkBaseProps<E extends ElementType = 'a'> {
|
|
14
14
|
elementType?: E;
|
|
15
15
|
}
|
|
16
|
-
export interface PaginationLinkProps<E extends ElementType = 'a'> extends PaginationLinkBaseProps<E>, AriaPaginationProps {
|
|
16
|
+
export interface PaginationLinkProps<E extends ElementType = 'a'> extends PaginationLinkBaseProps<E>, AriaPaginationProps, RouterLinkProps {
|
|
17
17
|
isCurrent?: boolean;
|
|
18
18
|
pageNumber: number;
|
|
19
19
|
}
|
|
20
|
-
export type PaginationButtonLinkProps<E extends ElementType = 'a'> = SpiritButtonProps<E> & AriaPaginationProps & {
|
|
20
|
+
export type PaginationButtonLinkProps<E extends ElementType = 'a'> = SpiritButtonProps<E> & AriaPaginationProps & RouterLinkProps & {
|
|
21
21
|
direction: PaginationLinkDirectionType;
|
|
22
22
|
};
|
|
23
|
-
export type PaginationLinkPreviousNextProps<E extends ElementType = 'a'> = SpiritButtonProps<E> & AriaPaginationProps;
|
|
23
|
+
export type PaginationLinkPreviousNextProps<E extends ElementType = 'a'> = SpiritButtonProps<E> & AriaPaginationProps & RouterLinkProps;
|
|
24
24
|
export interface SpiritPaginationProps extends PaginationProps {
|
|
25
25
|
}
|
|
26
26
|
export interface SpiritPaginationItemProps extends PaginationItemProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/types/shared/index.ts"],"sourcesContent":["import { type ElementType, type ReactNode } from 'react';\n\nexport * from './adornments';\nexport * from './buttons';\nexport * from './colors';\nexport * from './columns';\nexport * from './dialogs';\nexport * from './dictionaries';\nexport * from './directions';\nexport * from './dragAndDrop';\nexport * from './element';\nexport * from './events';\nexport * from './inputs';\nexport * from './item';\nexport * from './polymorphic';\nexport * from './positions';\nexport * from './radii';\nexport * from './refs';\nexport * from './responsive';\nexport * from './rest';\nexport * from './sizes';\nexport * from './style';\nexport * from './text';\nexport * from './tokens';\n\nexport interface ChildrenProps {\n /** The content to display in the component. */\n children?: ReactNode | string;\n}\n\nexport interface ElementTypeProps<E extends ElementType = 'div'> {\n /**\n * The HTML element or React element used to render the component.\n *\n * @default 'div'\n */\n elementType?: E;\n}\n\nexport enum SpiritBreakpoints {\n TABLET = 'tablet',\n DESKTOP = 'desktop',\n}\n\n/**\n * This is actual type for all aria-* props which have value 'true' or 'false' is called Booleanish.\n * Unfortunately it is not exported, and you must create it manually.\n */\nexport type Booleanish = boolean | 'true' | 'false';\n\n/**\n * Represents a non-negative integer.\n *\n * @template T - The type of the number.\n */\n/* eslint-disable @typescript-eslint/no-explicit-any -- we don't care about the type here */\nexport type PositiveInteger<T extends number> = `${T}` extends '0' | `-${any}` | `${any}.${any}` ? never : T;\n/* eslint-enable @typescript-eslint/no-explicit-any */\n"],"names":["SpiritBreakpoints"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/types/shared/index.ts"],"sourcesContent":["import { type ElementType, type ReactNode } from 'react';\n\nexport * from './adornments';\nexport * from './buttons';\nexport * from './colors';\nexport * from './columns';\nexport * from './dialogs';\nexport * from './dictionaries';\nexport * from './directions';\nexport * from './dragAndDrop';\nexport * from './element';\nexport * from './events';\nexport * from './inputs';\nexport * from './item';\nexport * from './polymorphic';\nexport * from './positions';\nexport * from './radii';\nexport * from './refs';\nexport * from './responsive';\nexport * from './rest';\nexport * from './router';\nexport * from './sizes';\nexport * from './style';\nexport * from './text';\nexport * from './tokens';\n\nexport interface ChildrenProps {\n /** The content to display in the component. */\n children?: ReactNode | string;\n}\n\nexport interface ElementTypeProps<E extends ElementType = 'div'> {\n /**\n * The HTML element or React element used to render the component.\n *\n * @default 'div'\n */\n elementType?: E;\n}\n\nexport enum SpiritBreakpoints {\n TABLET = 'tablet',\n DESKTOP = 'desktop',\n}\n\n/**\n * This is actual type for all aria-* props which have value 'true' or 'false' is called Booleanish.\n * Unfortunately it is not exported, and you must create it manually.\n */\nexport type Booleanish = boolean | 'true' | 'false';\n\n/**\n * Represents a non-negative integer.\n *\n * @template T - The type of the number.\n */\n/* eslint-disable @typescript-eslint/no-explicit-any -- we don't care about the type here */\nexport type PositiveInteger<T extends number> = `${T}` extends '0' | `-${any}` | `${any}.${any}` ? never : T;\n/* eslint-enable @typescript-eslint/no-explicit-any */\n"],"names":["SpiritBreakpoints"],"mappings":"yIAwCO,IAAKA,GAAAA,IACVA,EAAA,OAAS,SACTA,EAAA,QAAU,UAFAA,IAAAA,GAAA,CAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/types/shared/index.ts"],"sourcesContent":["import { type ElementType, type ReactNode } from 'react';\n\nexport * from './adornments';\nexport * from './buttons';\nexport * from './colors';\nexport * from './columns';\nexport * from './dialogs';\nexport * from './dictionaries';\nexport * from './directions';\nexport * from './dragAndDrop';\nexport * from './element';\nexport * from './events';\nexport * from './inputs';\nexport * from './item';\nexport * from './polymorphic';\nexport * from './positions';\nexport * from './radii';\nexport * from './refs';\nexport * from './responsive';\nexport * from './rest';\nexport * from './sizes';\nexport * from './style';\nexport * from './text';\nexport * from './tokens';\n\nexport interface ChildrenProps {\n /** The content to display in the component. */\n children?: ReactNode | string;\n}\n\nexport interface ElementTypeProps<E extends ElementType = 'div'> {\n /**\n * The HTML element or React element used to render the component.\n *\n * @default 'div'\n */\n elementType?: E;\n}\n\nexport enum SpiritBreakpoints {\n TABLET = 'tablet',\n DESKTOP = 'desktop',\n}\n\n/**\n * This is actual type for all aria-* props which have value 'true' or 'false' is called Booleanish.\n * Unfortunately it is not exported, and you must create it manually.\n */\nexport type Booleanish = boolean | 'true' | 'false';\n\n/**\n * Represents a non-negative integer.\n *\n * @template T - The type of the number.\n */\n/* eslint-disable @typescript-eslint/no-explicit-any -- we don't care about the type here */\nexport type PositiveInteger<T extends number> = `${T}` extends '0' | `-${any}` | `${any}.${any}` ? never : T;\n/* eslint-enable @typescript-eslint/no-explicit-any */\n"],"names":["SpiritBreakpoints"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/types/shared/index.ts"],"sourcesContent":["import { type ElementType, type ReactNode } from 'react';\n\nexport * from './adornments';\nexport * from './buttons';\nexport * from './colors';\nexport * from './columns';\nexport * from './dialogs';\nexport * from './dictionaries';\nexport * from './directions';\nexport * from './dragAndDrop';\nexport * from './element';\nexport * from './events';\nexport * from './inputs';\nexport * from './item';\nexport * from './polymorphic';\nexport * from './positions';\nexport * from './radii';\nexport * from './refs';\nexport * from './responsive';\nexport * from './rest';\nexport * from './router';\nexport * from './sizes';\nexport * from './style';\nexport * from './text';\nexport * from './tokens';\n\nexport interface ChildrenProps {\n /** The content to display in the component. */\n children?: ReactNode | string;\n}\n\nexport interface ElementTypeProps<E extends ElementType = 'div'> {\n /**\n * The HTML element or React element used to render the component.\n *\n * @default 'div'\n */\n elementType?: E;\n}\n\nexport enum SpiritBreakpoints {\n TABLET = 'tablet',\n DESKTOP = 'desktop',\n}\n\n/**\n * This is actual type for all aria-* props which have value 'true' or 'false' is called Booleanish.\n * Unfortunately it is not exported, and you must create it manually.\n */\nexport type Booleanish = boolean | 'true' | 'false';\n\n/**\n * Represents a non-negative integer.\n *\n * @template T - The type of the number.\n */\n/* eslint-disable @typescript-eslint/no-explicit-any -- we don't care about the type here */\nexport type PositiveInteger<T extends number> = `${T}` extends '0' | `-${any}` | `${any}.${any}` ? never : T;\n/* eslint-enable @typescript-eslint/no-explicit-any */\n"],"names":["SpiritBreakpoints"],"mappings":";;AAwCO,IAAKA,sBAAAA,OACVA,EAAA,SAAS,UACTA,EAAA,UAAU,WAFAA,IAAAA,KAAA,CAAA,CAAA;"}
|
package/dist/types/tabs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementType, HTMLProps } from 'react';
|
|
2
|
-
import { ChildrenProps, ClickEvents, PolymorphicComponentProps, SpacingProp, StyleProps, TransferProps } from './shared';
|
|
2
|
+
import { ChildrenProps, ClickEvents, PolymorphicComponentProps, RouterLinkProps, SpacingProp, StyleProps, TransferProps } from './shared';
|
|
3
3
|
export type TabId = string | number;
|
|
4
4
|
export type TabListProps = ChildrenProps & TransferProps;
|
|
5
5
|
export interface TabsOnSelectionChange {
|
|
@@ -18,7 +18,7 @@ export interface TabsProps extends ChildrenProps, SpacingProp, TransferProps, Ta
|
|
|
18
18
|
toggle: TabsToggler;
|
|
19
19
|
}
|
|
20
20
|
export type TabLinkItemProps = StyleProps & HTMLProps<HTMLLIElement>;
|
|
21
|
-
export interface TabLinkBaseProps extends ChildrenProps, StyleProps, TransferProps {
|
|
21
|
+
export interface TabLinkBaseProps extends ChildrenProps, StyleProps, TransferProps, RouterLinkProps {
|
|
22
22
|
}
|
|
23
23
|
export interface TabLinkStyleProps extends TabLinkBaseProps {
|
|
24
24
|
itemProps?: TabLinkItemProps;
|
package/dist/types/tag.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface AriaTagElementTypeProps<E extends ElementType = 'span'> {
|
|
|
9
9
|
}
|
|
10
10
|
export interface TagProps<E extends ElementType = 'span', C = void, S = void> extends ChildrenProps, StyleProps, TransferProps, AriaTagElementTypeProps<E> {
|
|
11
11
|
color?: TagColor<C>;
|
|
12
|
+
isDisabled?: boolean;
|
|
12
13
|
isSubtle?: boolean;
|
|
13
14
|
size?: TagSize<S>;
|
|
14
15
|
}
|
package/dist/types/textArea.d.ts
CHANGED
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { LabelProps } from './label';
|
|
3
|
-
import { ChildrenProps, HelperTextProps, InputBaseProps, RequiredProps, SizesDictionaryType, SpiritTextAreaElementPropsWithRef, TextInputProps, Validation, ValidationTextProp } from './shared';
|
|
3
|
+
import { ChildrenProps, HelperTextProps, InputBaseProps, RequiredProps, SizesDictionaryType, SpiritTextAreaElementPropsWithRef, StyleProps, TextInputProps, Validation, ValidationTextProp } from './shared';
|
|
4
4
|
export type TextAreaElementBaseProps = Omit<SpiritTextAreaElementPropsWithRef, 'size'>;
|
|
5
|
-
export interface
|
|
5
|
+
export interface TextAreaCounterRenderProps extends StyleProps {
|
|
6
|
+
counterThreshold?: number;
|
|
7
|
+
currentLength: number;
|
|
8
|
+
hasCounter?: boolean;
|
|
9
|
+
}
|
|
10
|
+
type TextAreaBaseProps<S = void> = TextAreaElementBaseProps & InputBaseProps & ChildrenProps & LabelProps & HelperTextProps & ValidationTextProp & TextInputProps & RequiredProps & Validation & {
|
|
6
11
|
autoResizingMaxHeight?: number;
|
|
7
12
|
isAutoResizing?: boolean;
|
|
8
13
|
label: ReactNode;
|
|
9
14
|
size?: SizesDictionaryType<S>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
};
|
|
16
|
+
type TextAreaCounterOffProps = {
|
|
17
|
+
counterThreshold?: undefined;
|
|
18
|
+
hasCounter?: false;
|
|
19
|
+
};
|
|
20
|
+
type TextAreaCounterOnProps = {
|
|
21
|
+
counterThreshold?: number;
|
|
22
|
+
hasCounter: true;
|
|
23
|
+
maxLength?: number;
|
|
24
|
+
};
|
|
25
|
+
type TextAreaCounterWithThresholdProps = {
|
|
26
|
+
counterThreshold: number;
|
|
27
|
+
hasCounter?: boolean;
|
|
28
|
+
maxLength?: number;
|
|
29
|
+
};
|
|
30
|
+
type TextAreaCounterProps = TextAreaCounterOffProps | TextAreaCounterOnProps | TextAreaCounterWithThresholdProps;
|
|
31
|
+
export type TextAreaProps<S = void> = TextAreaBaseProps<S> & TextAreaCounterProps;
|
|
32
|
+
export type SpiritTextAreaProps<S = void> = TextAreaProps<S>;
|
|
33
|
+
export {};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ChildrenProps, PasswordToggleAdornmentProp, RequiredProps, SizesDictionaryType, TextInputProps } from './shared';
|
|
3
|
-
import { TextAreaProps } from './textArea';
|
|
3
|
+
import { TextAreaCounterRenderProps, TextAreaProps } from './textArea';
|
|
4
4
|
import { TextFieldProps } from './textField';
|
|
5
5
|
export interface TextFieldBaseMultiLineProps {
|
|
6
6
|
isMultiline?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export interface TextFieldBaseCounterProps {
|
|
9
|
+
counterProps?: TextAreaCounterRenderProps;
|
|
10
|
+
}
|
|
11
|
+
export type TextFieldBaseProps = ChildrenProps & TextFieldBaseMultiLineProps & TextFieldBaseCounterProps & (TextFieldProps | TextAreaProps);
|
|
9
12
|
export type SpiritTextFieldBaseProps = {
|
|
10
13
|
label: ReactNode;
|
|
11
14
|
} & TextFieldBaseProps;
|
package/dist/types/toggle.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ChangeEvent, ReactNode } from 'react';
|
|
2
2
|
import { LabelProps } from './label';
|
|
3
|
-
import { ChildrenProps, HelperTextProps, InputBaseProps, InputPositionType, RequiredProps, SingleOrResponsive, SpiritInputElementPropsWithRef, StyleProps, Validation, ValidationTextType } from './shared';
|
|
3
|
+
import { ChildrenProps, DetailsProps, HelperTextProps, InputBaseProps, InputPositionType, RequiredProps, SingleOrResponsive, SpiritInputElementPropsWithRef, StyleProps, Validation, ValidationTextType } from './shared';
|
|
4
4
|
export type ToggleElementBaseProps = SpiritInputElementPropsWithRef;
|
|
5
|
-
export interface ToggleProps extends ToggleElementBaseProps, ChildrenProps, LabelProps, RequiredProps, InputBaseProps, HelperTextProps, StyleProps, Validation {
|
|
5
|
+
export interface ToggleProps extends ToggleElementBaseProps, ChildrenProps, LabelProps, RequiredProps, InputBaseProps, HelperTextProps, DetailsProps, StyleProps, Validation {
|
|
6
6
|
hasIndicators?: boolean;
|
|
7
7
|
inputPosition?: SingleOrResponsive<InputPositionType>;
|
|
8
8
|
isChecked?: boolean;
|
package/dist/utils/debounce.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=(o,i)=>{let e;const t=(c=>{e!==void 0&&clearTimeout(e),e=setTimeout(()=>{e=void 0,o(c)},i)});return t.cancel=()=>{e!==void 0&&(clearTimeout(e),e=void 0)},t};exports.debounce=u;
|
|
2
2
|
//# sourceMappingURL=debounce.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.cjs","sources":["../../src/utils/debounce.ts"],"sourcesContent":["export const debounce = <T>(callback: (props: T) => void, delay: number) => {\n let timeout:
|
|
1
|
+
{"version":3,"file":"debounce.cjs","sources":["../../src/utils/debounce.ts"],"sourcesContent":["export type DebouncedFunction<T> = ((args: T) => void) & { cancel: () => void };\n\n/**\n * Returns a debounced function that invokes `callback` after `delay` ms have elapsed\n * since the last time the debounced function was invoked.\n *\n * @param {Function} callback - Function to debounce.\n * @param {number} delay - Delay in milliseconds.\n * @returns {DebouncedFunction<T>} Debounced function with a `cancel` method.\n */\nexport const debounce = <T>(callback: (props: T) => void, delay: number): DebouncedFunction<T> => {\n let timeout: ReturnType<typeof setTimeout> | undefined;\n\n const debounced = ((args: T): void => {\n if (timeout !== undefined) {\n clearTimeout(timeout);\n }\n\n timeout = setTimeout(() => {\n timeout = undefined;\n callback(args);\n }, delay);\n }) as DebouncedFunction<T>;\n\n debounced.cancel = () => {\n if (timeout !== undefined) {\n clearTimeout(timeout);\n timeout = undefined;\n }\n };\n\n return debounced;\n};\n"],"names":["debounce","callback","delay","timeout","debounced","args"],"mappings":"gFAUO,MAAMA,EAAW,CAAIC,EAA8BC,IAAwC,CAChG,IAAIC,EAEJ,MAAMC,GAAcC,GAAkB,CAChCF,IAAY,QACd,aAAaA,CAAO,EAGtBA,EAAU,WAAW,IAAM,CACzBA,EAAU,OACVF,EAASI,CAAI,CACf,EAAGH,CAAK,CACV,GAEA,OAAAE,EAAU,OAAS,IAAM,CACnBD,IAAY,SACd,aAAaA,CAAO,EACpBA,EAAU,OAEd,EAEOC,CACT"}
|
package/dist/utils/debounce.d.ts
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type DebouncedFunction<T> = ((args: T) => void) & {
|
|
2
|
+
cancel: () => void;
|
|
3
|
+
};
|
|
4
|
+
export declare const debounce: <T>(callback: (props: T) => void, delay: number) => DebouncedFunction<T>;
|
package/dist/utils/debounce.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
let e
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
},
|
|
7
|
-
};
|
|
1
|
+
const u = (t, i) => {
|
|
2
|
+
let e;
|
|
3
|
+
const o = ((c) => {
|
|
4
|
+
e !== void 0 && clearTimeout(e), e = setTimeout(() => {
|
|
5
|
+
e = void 0, t(c);
|
|
6
|
+
}, i);
|
|
7
|
+
});
|
|
8
|
+
return o.cancel = () => {
|
|
9
|
+
e !== void 0 && (clearTimeout(e), e = void 0);
|
|
10
|
+
}, o;
|
|
8
11
|
};
|
|
9
12
|
export {
|
|
10
|
-
|
|
13
|
+
u as debounce
|
|
11
14
|
};
|
|
12
15
|
//# sourceMappingURL=debounce.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.js","sources":["../../src/utils/debounce.ts"],"sourcesContent":["export const debounce = <T>(callback: (props: T) => void, delay: number) => {\n let timeout:
|
|
1
|
+
{"version":3,"file":"debounce.js","sources":["../../src/utils/debounce.ts"],"sourcesContent":["export type DebouncedFunction<T> = ((args: T) => void) & { cancel: () => void };\n\n/**\n * Returns a debounced function that invokes `callback` after `delay` ms have elapsed\n * since the last time the debounced function was invoked.\n *\n * @param {Function} callback - Function to debounce.\n * @param {number} delay - Delay in milliseconds.\n * @returns {DebouncedFunction<T>} Debounced function with a `cancel` method.\n */\nexport const debounce = <T>(callback: (props: T) => void, delay: number): DebouncedFunction<T> => {\n let timeout: ReturnType<typeof setTimeout> | undefined;\n\n const debounced = ((args: T): void => {\n if (timeout !== undefined) {\n clearTimeout(timeout);\n }\n\n timeout = setTimeout(() => {\n timeout = undefined;\n callback(args);\n }, delay);\n }) as DebouncedFunction<T>;\n\n debounced.cancel = () => {\n if (timeout !== undefined) {\n clearTimeout(timeout);\n timeout = undefined;\n }\n };\n\n return debounced;\n};\n"],"names":["debounce","callback","delay","timeout","debounced","args"],"mappings":"AAUO,MAAMA,IAAW,CAAIC,GAA8BC,MAAwC;AAChG,MAAIC;AAEJ,QAAMC,KAAa,CAACC,MAAkB;AACpC,IAAIF,MAAY,UACd,aAAaA,CAAO,GAGtBA,IAAU,WAAW,MAAM;AACzB,MAAAA,IAAU,QACVF,EAASI,CAAI;AAAA,IACf,GAAGH,CAAK;AAAA,EACV;AAEA,SAAAE,EAAU,SAAS,MAAM;AACvB,IAAID,MAAY,WACd,aAAaA,CAAO,GACpBA,IAAU;AAAA,EAEd,GAEOC;AACT;"}
|
package/dist/utils/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./assert.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./assert.cjs"),r=require("./classname.cjs"),e=require("./colorObjectGenerators.cjs"),l=require("./compose.cjs"),n=require("./debounce.cjs"),i=require("./delayedCallback.cjs"),c=require("./htmlReactParser.cjs"),C=require("./mergeStyleProps.cjs"),m=require("./router.cjs"),a=require("./responsive.cjs"),g=require("./ssr.cjs"),o=require("./string.cjs"),t=require("./stylePropsClassesGenerator.cjs"),p=require("./toPascalCase.cjs");exports.isEmpty=s.isEmpty;exports.isEmptyArray=s.isEmptyArray;exports.isEmptyObject=s.isEmptyObject;exports.isEmptyString=s.isEmptyString;exports.isEnumerable=s.isEnumerable;exports.isNullish=s.isNullish;exports.applyClassNamePrefix=r.applyClassNamePrefix;exports.applyColor=r.applyColor;exports.applySize=r.applySize;exports.applyTheme=r.applyTheme;exports.generateColorsObject=e.generateColorsObject;exports.getAccentBackgroundColors=e.getAccentBackgroundColors;exports.getAccentBorderColors=e.getAccentBorderColors;exports.getAccentColorNames=e.getAccentColorNames;exports.getAccentTextColors=e.getAccentTextColors;exports.getEmotionBackgroundColors=e.getEmotionBackgroundColors;exports.getEmotionBorderColors=e.getEmotionBorderColors;exports.getEmotionColorNames=e.getEmotionColorNames;exports.getEmotionTextColors=e.getEmotionTextColors;exports.getNeutralBackgroundColors=e.getNeutralBackgroundColors;exports.getNeutralTextColors=e.getNeutralTextColors;exports.getTextColorNames=e.getTextColorNames;exports.compose=l.compose;exports.debounce=n.debounce;exports.delayedCallback=i.delayedCallback;exports.htmlReactParser=c.htmlReactParser;exports.mergeStyleProps=C.mergeStyleProps;exports.handleLinkClick=m.handleLinkClick;exports.generateResponsiveClassNames=a.generateResponsiveClassNames;exports.isResponsive=a.isResponsive;exports.isSSR=g.isSSR;exports.camelCaseToKebabCase=o.camelCaseToKebabCase;exports.kebabCaseToCamelCase=o.kebabCaseToCamelCase;exports.kebabCaseToCamelCaseValues=o.kebabCaseToCamelCaseValues;exports.normalizeStringValue=o.normalizeStringValue;exports.stringOrObjectKebabCaseToCamelCase=o.stringOrObjectKebabCaseToCamelCase;exports.generateResponsiveStylePropsClasses=t.generateResponsiveStylePropsClasses;exports.generateStaticStylePropsClasses=t.generateStaticStylePropsClasses;exports.generateStylePropsClassNames=t.generateStylePropsClassNames;exports.toPascalCase=p.toPascalCase;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/utils/index.d.ts
CHANGED