@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploaderInput.cjs","sources":["../../../src/components/FileUploader/FileUploaderInput.tsx"],"sourcesContent":["'use client';\n\nimport classNames from 'classnames';\nimport React, { useEffect, useState } from 'react';\nimport { useAriaDescribedBy, useStyleProps } from '../../hooks';\nimport { type SpiritFileUploaderInputProps } from '../../types';\nimport { HelperText, Label, ValidationText
|
|
1
|
+
{"version":3,"file":"FileUploaderInput.cjs","sources":["../../../src/components/FileUploader/FileUploaderInput.tsx"],"sourcesContent":["'use client';\n\nimport classNames from 'classnames';\nimport React, { useEffect, useState } from 'react';\nimport { useAriaDescribedBy, useStyleProps } from '../../hooks';\nimport { type SpiritFileUploaderInputProps } from '../../types';\nimport { HelperText, Label, ValidationText } from '../Field';\nimport { useValidationTextRole } from '../Field/useValidationTextRole';\nimport { Icon } from '../Icon';\nimport { DEFAULT_FILE_QUEUE_LIMIT, DEFAULT_FILE_SIZE_LIMIT } from './constants';\nimport { useFileUploaderInput } from './useFileUploaderInput';\nimport { useFileUploaderStyleProps } from './useFileUploaderStyleProps';\n\nconst FileUploaderInput = (props: SpiritFileUploaderInputProps) => {\n const [isDragAndDropSupported, setIsDragAndDropSupported] = useState(false);\n const {\n accept,\n 'aria-describedby': ariaDescribedBy = '',\n dropZoneRef,\n hasValidationIcon,\n helperText,\n iconName = 'upload',\n id,\n inputRef,\n isDisabled,\n isLabelHidden,\n isMultiple,\n isRequired,\n label,\n labelText,\n linkText,\n maxFileSize = DEFAULT_FILE_SIZE_LIMIT,\n maxUploadedFiles = DEFAULT_FILE_QUEUE_LIMIT,\n name,\n onError,\n queueLimitBehavior = 'none',\n validationState,\n validationText,\n ...restProps\n } = props;\n const {\n isDisabledByQueueLimitBehavior,\n isDragging,\n isDropZoneHidden,\n onChange,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onDrop,\n } = useFileUploaderInput({\n accept,\n isMultiple,\n maxFileSize,\n maxUploadedFiles,\n onError,\n queueLimitBehavior,\n });\n const { classProps } = useFileUploaderStyleProps({\n hasValidationIcon,\n isDisabled,\n isDisabledByQueueLimitBehavior,\n isDragAndDropSupported,\n isDragging,\n isDropZoneHidden,\n isLabelHidden,\n isRequired,\n queueLimitBehavior,\n validationState,\n });\n const { styleProps, props: transferProps } = useStyleProps(restProps);\n const [ariaDescribedByProp, register] = useAriaDescribedBy(ariaDescribedBy);\n const validationTextRole = useValidationTextRole({\n validationState,\n validationText,\n });\n\n useEffect(() => {\n setIsDragAndDropSupported('draggable' in document.createElement('span'));\n }, []);\n\n return (\n <div\n {...transferProps}\n {...styleProps}\n onDragOver={!isDisabled && isDragAndDropSupported ? onDragOver : undefined}\n onDragEnter={!isDisabled && isDragAndDropSupported ? onDragEnter : undefined}\n onDragLeave={!isDisabled && isDragAndDropSupported ? onDragLeave : undefined}\n onDrop={!isDisabled && isDragAndDropSupported ? onDrop : undefined}\n className={classNames(classProps.input.root, styleProps.className)}\n >\n <Label htmlFor={id} UNSAFE_className={classProps.input.label}>\n {label}\n </Label>\n <input\n {...ariaDescribedByProp}\n type=\"file\"\n accept={accept}\n id={id}\n ref={inputRef}\n name={name}\n className={classProps.input.input}\n onChange={onChange}\n multiple={isMultiple}\n disabled={isDisabled || isDisabledByQueueLimitBehavior}\n {...restProps}\n />\n <div ref={dropZoneRef} className={classProps.input.dropZone.root}>\n <Icon name={iconName} aria-hidden=\"true\" />\n <Label htmlFor={id} UNSAFE_className={classProps.input.dropZone.label}>\n <span className={classProps.input.link}>{linkText}</span>\n \n <span className={classProps.input.dropLabel}>{labelText}</span>\n </Label>\n <HelperText\n UNSAFE_className={classProps.input.helper}\n id={`${id}__helperText`}\n registerAria={register}\n helperText={helperText}\n />\n </div>\n {validationState && (\n <ValidationText\n UNSAFE_className={classProps.input.validationText}\n elementType=\"span\"\n {...(hasValidationIcon && { hasValidationStateIcon: validationState })}\n id={`${id}__validationText`}\n validationText={validationText}\n registerAria={register}\n role={validationTextRole}\n />\n )}\n </div>\n );\n};\n\nFileUploaderInput.spiritComponent = 'FileUploaderInput';\n\nexport default FileUploaderInput;\n"],"names":["FileUploaderInput","props","isDragAndDropSupported","setIsDragAndDropSupported","useState","accept","ariaDescribedBy","dropZoneRef","hasValidationIcon","helperText","iconName","id","inputRef","isDisabled","isLabelHidden","isMultiple","isRequired","label","labelText","linkText","maxFileSize","DEFAULT_FILE_SIZE_LIMIT","maxUploadedFiles","DEFAULT_FILE_QUEUE_LIMIT","name","onError","queueLimitBehavior","validationState","validationText","restProps","isDisabledByQueueLimitBehavior","isDragging","isDropZoneHidden","onChange","onDragEnter","onDragLeave","onDragOver","onDrop","useFileUploaderInput","classProps","useFileUploaderStyleProps","styleProps","transferProps","useStyleProps","ariaDescribedByProp","register","useAriaDescribedBy","validationTextRole","useValidationTextRole","useEffect","jsxs","classNames","jsx","Label","Icon","HelperText","ValidationText"],"mappings":"0kBAaMA,EAAqBC,GAAwC,CACjE,KAAM,CAACC,EAAwBC,CAAyB,EAAIC,EAAAA,SAAS,EAAK,EACpE,CACJ,OAAAC,EACA,mBAAoBC,EAAkB,GACtC,YAAAC,EACA,kBAAAC,EACA,WAAAC,EACA,SAAAC,EAAW,SACX,GAAAC,EACA,SAAAC,EACA,WAAAC,EACA,cAAAC,EACA,WAAAC,EACA,WAAAC,EACA,MAAAC,EACA,UAAAC,EACA,SAAAC,EACA,YAAAC,EAAcC,EAAAA,wBACd,iBAAAC,EAAmBC,EAAAA,yBACnB,KAAAC,EACA,QAAAC,EACA,mBAAAC,EAAqB,OACrB,gBAAAC,EACA,eAAAC,EACA,GAAGC,CAAA,EACD5B,EACE,CACJ,+BAAA6B,EACA,WAAAC,EACA,iBAAAC,EACA,SAAAC,EACA,YAAAC,EACA,YAAAC,EACA,WAAAC,EACA,OAAAC,CAAA,EACEC,uBAAqB,CACvB,OAAAjC,EACA,WAAAU,EACA,YAAAK,EACA,iBAAAE,EACA,QAAAG,EACA,mBAAAC,CAAA,CACD,EACK,CAAE,WAAAa,CAAA,EAAeC,4BAA0B,CAE/C,WAAA3B,EACA,+BAAAiB,EACA,uBAAA5B,EACA,WAAA6B,EACA,iBAAAC,EACA,cAAAlB,EACA,WAAAE,EACA,mBAAAU,EACA,gBAAAC,CAAA,CACD,EACK,CAAA,WAAEc,EAAY,MAAOC,CAAA,EAAkBC,EAAAA,cAAcd,CAAS,EAC9D,CAACe,EAAqBC,CAAQ,EAAIC,EAAAA,mBAAmBxC,CAAe,EACpEyC,EAAqBC,EAAAA,sBAAsB,CAC/C,gBAAArB,EACA,eAAAC,CAAA,CACD,EAEDqB,OAAAA,EAAAA,UAAU,IAAM,CACd9C,EAA0B,cAAe,SAAS,cAAc,MAAM,CAAC,CACzE,EAAG,CAAA,CAAE,EAGH+C,EAAAA,KAAC,MAAA,CACE,GAAGR,EACH,GAAGD,EACJ,WAAY,CAAC5B,GAAcX,EAAyBkC,EAAa,OACjE,YAAa,CAACvB,GAAcX,EAAyBgC,EAAc,OACnE,YAAa,CAACrB,GAAcX,EAAyBiC,EAAc,OACnE,OAAQ,CAACtB,GAAcX,EAAyBmC,EAAS,OACzD,UAAWc,EAAWZ,EAAW,MAAM,KAAME,EAAW,SAAS,EAEjE,SAAA,CAAAW,EAAAA,IAACC,EAAAA,SAAM,QAAS1C,EAAI,iBAAkB4B,EAAW,MAAM,MACpD,SAAAtB,CAAA,CACH,EACAmC,EAAAA,IAAC,QAAA,CACE,GAAGR,EACJ,KAAK,OACL,OAAAvC,EACA,GAAAM,EACA,IAAKC,EACL,KAAAY,EACA,UAAWe,EAAW,MAAM,MAC5B,SAAAN,EACA,SAAUlB,EACV,SAAUF,GAAciB,EACvB,GAAGD,CAAA,CAAA,EAENqB,EAAAA,KAAC,OAAI,IAAK3C,EAAa,UAAWgC,EAAW,MAAM,SAAS,KAC1D,SAAA,CAAAa,EAAAA,IAACE,EAAAA,QAAA,CAAK,KAAM5C,EAAU,cAAY,OAAO,EACzCwC,EAAAA,KAACG,EAAAA,SAAM,QAAS1C,EAAI,iBAAkB4B,EAAW,MAAM,SAAS,MAC9D,SAAA,CAAAa,MAAC,OAAA,CAAK,UAAWb,EAAW,MAAM,KAAO,SAAApB,EAAS,EAAO,UAExD,OAAA,CAAK,UAAWoB,EAAW,MAAM,UAAY,SAAArB,CAAA,CAAU,CAAA,EAC1D,EACAkC,EAAAA,IAACG,EAAAA,QAAA,CACC,iBAAkBhB,EAAW,MAAM,OACnC,GAAI,GAAG5B,CAAE,eACT,aAAckC,EACd,WAAApC,CAAA,CAAA,CACF,EACF,EACCkB,GACCyB,EAAAA,IAACI,EAAAA,QAAA,CACC,iBAAkBjB,EAAW,MAAM,eACnC,YAAY,OACX,GAAI/B,GAAqB,CAAE,uBAAwBmB,CAAA,EACpD,GAAI,GAAGhB,CAAE,mBACT,eAAAiB,EACA,aAAciB,EACd,KAAME,CAAA,CAAA,CACR,CAAA,CAAA,CAIR,EAEA/C,EAAkB,gBAAkB"}
|
|
@@ -3,17 +3,16 @@ import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
|
3
3
|
import O from "classnames";
|
|
4
4
|
import { useState as Q, useEffect as $ } from "react";
|
|
5
5
|
import { useStyleProps as z } from "../../hooks/styleProps.js";
|
|
6
|
-
import { useAriaDescribedBy as w } from "../../hooks/
|
|
6
|
+
import { useAriaDescribedBy as w } from "../../hooks/useAriaIdRefs.js";
|
|
7
7
|
import G from "../Field/HelperText.js";
|
|
8
8
|
import D from "../Field/Label.js";
|
|
9
|
-
import J from "../Field/
|
|
10
|
-
import K from "../Field/
|
|
11
|
-
import
|
|
12
|
-
import X from "
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
const oe = (g) => {
|
|
9
|
+
import J from "../Field/ValidationText.js";
|
|
10
|
+
import { useValidationTextRole as K } from "../Field/useValidationTextRole.js";
|
|
11
|
+
import W from "../Icon/Icon.js";
|
|
12
|
+
import { DEFAULT_FILE_SIZE_LIMIT as X, DEFAULT_FILE_QUEUE_LIMIT as Y } from "./constants.js";
|
|
13
|
+
import { useFileUploaderInput as ee } from "./useFileUploaderInput.js";
|
|
14
|
+
import { useFileUploaderStyleProps as re } from "./useFileUploaderStyleProps.js";
|
|
15
|
+
const ie = (g) => {
|
|
17
16
|
const [o, h] = Q(!1), {
|
|
18
17
|
accept: n,
|
|
19
18
|
"aria-describedby": v = "",
|
|
@@ -30,40 +29,41 @@ const oe = (g) => {
|
|
|
30
29
|
label: _,
|
|
31
30
|
labelText: L,
|
|
32
31
|
linkText: S,
|
|
33
|
-
maxFileSize: U =
|
|
34
|
-
maxUploadedFiles: A =
|
|
35
|
-
|
|
32
|
+
maxFileSize: U = X,
|
|
33
|
+
maxUploadedFiles: A = Y,
|
|
34
|
+
name: y,
|
|
35
|
+
onError: P,
|
|
36
36
|
queueLimitBehavior: p = "none",
|
|
37
37
|
validationState: t,
|
|
38
38
|
validationText: d,
|
|
39
39
|
...m
|
|
40
40
|
} = g, {
|
|
41
41
|
isDisabledByQueueLimitBehavior: c,
|
|
42
|
-
isDragging:
|
|
43
|
-
isDropZoneHidden:
|
|
44
|
-
onChange:
|
|
45
|
-
onDragEnter:
|
|
46
|
-
onDragLeave:
|
|
47
|
-
onDragOver:
|
|
48
|
-
onDrop:
|
|
49
|
-
} =
|
|
42
|
+
isDragging: B,
|
|
43
|
+
isDropZoneHidden: R,
|
|
44
|
+
onChange: Z,
|
|
45
|
+
onDragEnter: V,
|
|
46
|
+
onDragLeave: H,
|
|
47
|
+
onDragOver: M,
|
|
48
|
+
onDrop: j
|
|
49
|
+
} = ee({
|
|
50
50
|
accept: n,
|
|
51
51
|
isMultiple: l,
|
|
52
52
|
maxFileSize: U,
|
|
53
53
|
maxUploadedFiles: A,
|
|
54
|
-
onError:
|
|
54
|
+
onError: P,
|
|
55
55
|
queueLimitBehavior: p
|
|
56
|
-
}), { classProps: e } =
|
|
56
|
+
}), { classProps: e } = re({
|
|
57
57
|
isDisabled: i,
|
|
58
58
|
isDisabledByQueueLimitBehavior: c,
|
|
59
59
|
isDragAndDropSupported: o,
|
|
60
|
-
isDragging:
|
|
61
|
-
isDropZoneHidden:
|
|
60
|
+
isDragging: B,
|
|
61
|
+
isDropZoneHidden: R,
|
|
62
62
|
isLabelHidden: T,
|
|
63
63
|
isRequired: I,
|
|
64
64
|
queueLimitBehavior: p,
|
|
65
65
|
validationState: t
|
|
66
|
-
}), { styleProps: u, props:
|
|
66
|
+
}), { styleProps: u, props: k } = z(m), [q, f] = w(v), C = K({
|
|
67
67
|
validationState: t,
|
|
68
68
|
validationText: d
|
|
69
69
|
});
|
|
@@ -72,12 +72,12 @@ const oe = (g) => {
|
|
|
72
72
|
}, []), /* @__PURE__ */ s(
|
|
73
73
|
"div",
|
|
74
74
|
{
|
|
75
|
-
...
|
|
75
|
+
...k,
|
|
76
76
|
...u,
|
|
77
|
-
onDragOver: !i && o ?
|
|
78
|
-
onDragEnter: !i && o ?
|
|
79
|
-
onDragLeave: !i && o ?
|
|
80
|
-
onDrop: !i && o ?
|
|
77
|
+
onDragOver: !i && o ? M : void 0,
|
|
78
|
+
onDragEnter: !i && o ? V : void 0,
|
|
79
|
+
onDragLeave: !i && o ? H : void 0,
|
|
80
|
+
onDrop: !i && o ? j : void 0,
|
|
81
81
|
className: O(e.input.root, u.className),
|
|
82
82
|
children: [
|
|
83
83
|
/* @__PURE__ */ r(D, { htmlFor: a, UNSAFE_className: e.input.label, children: _ }),
|
|
@@ -89,15 +89,16 @@ const oe = (g) => {
|
|
|
89
89
|
accept: n,
|
|
90
90
|
id: a,
|
|
91
91
|
ref: N,
|
|
92
|
+
name: y,
|
|
92
93
|
className: e.input.input,
|
|
93
|
-
onChange:
|
|
94
|
+
onChange: Z,
|
|
94
95
|
multiple: l,
|
|
95
96
|
disabled: i || c,
|
|
96
97
|
...m
|
|
97
98
|
}
|
|
98
99
|
),
|
|
99
100
|
/* @__PURE__ */ s("div", { ref: b, className: e.input.dropZone.root, children: [
|
|
100
|
-
/* @__PURE__ */ r(
|
|
101
|
+
/* @__PURE__ */ r(W, { name: F, "aria-hidden": "true" }),
|
|
101
102
|
/* @__PURE__ */ s(D, { htmlFor: a, UNSAFE_className: e.input.dropZone.label, children: [
|
|
102
103
|
/* @__PURE__ */ r("span", { className: e.input.link, children: S }),
|
|
103
104
|
" ",
|
|
@@ -114,7 +115,7 @@ const oe = (g) => {
|
|
|
114
115
|
)
|
|
115
116
|
] }),
|
|
116
117
|
t && /* @__PURE__ */ r(
|
|
117
|
-
|
|
118
|
+
J,
|
|
118
119
|
{
|
|
119
120
|
UNSAFE_className: e.input.validationText,
|
|
120
121
|
elementType: "span",
|
|
@@ -129,8 +130,8 @@ const oe = (g) => {
|
|
|
129
130
|
}
|
|
130
131
|
);
|
|
131
132
|
};
|
|
132
|
-
|
|
133
|
+
ie.spiritComponent = "FileUploaderInput";
|
|
133
134
|
export {
|
|
134
|
-
|
|
135
|
+
ie as default
|
|
135
136
|
};
|
|
136
137
|
//# sourceMappingURL=FileUploaderInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploaderInput.js","sources":["../../../src/components/FileUploader/FileUploaderInput.tsx"],"sourcesContent":["'use client';\n\nimport classNames from 'classnames';\nimport React, { useEffect, useState } from 'react';\nimport { useAriaDescribedBy, useStyleProps } from '../../hooks';\nimport { type SpiritFileUploaderInputProps } from '../../types';\nimport { HelperText, Label, ValidationText
|
|
1
|
+
{"version":3,"file":"FileUploaderInput.js","sources":["../../../src/components/FileUploader/FileUploaderInput.tsx"],"sourcesContent":["'use client';\n\nimport classNames from 'classnames';\nimport React, { useEffect, useState } from 'react';\nimport { useAriaDescribedBy, useStyleProps } from '../../hooks';\nimport { type SpiritFileUploaderInputProps } from '../../types';\nimport { HelperText, Label, ValidationText } from '../Field';\nimport { useValidationTextRole } from '../Field/useValidationTextRole';\nimport { Icon } from '../Icon';\nimport { DEFAULT_FILE_QUEUE_LIMIT, DEFAULT_FILE_SIZE_LIMIT } from './constants';\nimport { useFileUploaderInput } from './useFileUploaderInput';\nimport { useFileUploaderStyleProps } from './useFileUploaderStyleProps';\n\nconst FileUploaderInput = (props: SpiritFileUploaderInputProps) => {\n const [isDragAndDropSupported, setIsDragAndDropSupported] = useState(false);\n const {\n accept,\n 'aria-describedby': ariaDescribedBy = '',\n dropZoneRef,\n hasValidationIcon,\n helperText,\n iconName = 'upload',\n id,\n inputRef,\n isDisabled,\n isLabelHidden,\n isMultiple,\n isRequired,\n label,\n labelText,\n linkText,\n maxFileSize = DEFAULT_FILE_SIZE_LIMIT,\n maxUploadedFiles = DEFAULT_FILE_QUEUE_LIMIT,\n name,\n onError,\n queueLimitBehavior = 'none',\n validationState,\n validationText,\n ...restProps\n } = props;\n const {\n isDisabledByQueueLimitBehavior,\n isDragging,\n isDropZoneHidden,\n onChange,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onDrop,\n } = useFileUploaderInput({\n accept,\n isMultiple,\n maxFileSize,\n maxUploadedFiles,\n onError,\n queueLimitBehavior,\n });\n const { classProps } = useFileUploaderStyleProps({\n hasValidationIcon,\n isDisabled,\n isDisabledByQueueLimitBehavior,\n isDragAndDropSupported,\n isDragging,\n isDropZoneHidden,\n isLabelHidden,\n isRequired,\n queueLimitBehavior,\n validationState,\n });\n const { styleProps, props: transferProps } = useStyleProps(restProps);\n const [ariaDescribedByProp, register] = useAriaDescribedBy(ariaDescribedBy);\n const validationTextRole = useValidationTextRole({\n validationState,\n validationText,\n });\n\n useEffect(() => {\n setIsDragAndDropSupported('draggable' in document.createElement('span'));\n }, []);\n\n return (\n <div\n {...transferProps}\n {...styleProps}\n onDragOver={!isDisabled && isDragAndDropSupported ? onDragOver : undefined}\n onDragEnter={!isDisabled && isDragAndDropSupported ? onDragEnter : undefined}\n onDragLeave={!isDisabled && isDragAndDropSupported ? onDragLeave : undefined}\n onDrop={!isDisabled && isDragAndDropSupported ? onDrop : undefined}\n className={classNames(classProps.input.root, styleProps.className)}\n >\n <Label htmlFor={id} UNSAFE_className={classProps.input.label}>\n {label}\n </Label>\n <input\n {...ariaDescribedByProp}\n type=\"file\"\n accept={accept}\n id={id}\n ref={inputRef}\n name={name}\n className={classProps.input.input}\n onChange={onChange}\n multiple={isMultiple}\n disabled={isDisabled || isDisabledByQueueLimitBehavior}\n {...restProps}\n />\n <div ref={dropZoneRef} className={classProps.input.dropZone.root}>\n <Icon name={iconName} aria-hidden=\"true\" />\n <Label htmlFor={id} UNSAFE_className={classProps.input.dropZone.label}>\n <span className={classProps.input.link}>{linkText}</span>\n \n <span className={classProps.input.dropLabel}>{labelText}</span>\n </Label>\n <HelperText\n UNSAFE_className={classProps.input.helper}\n id={`${id}__helperText`}\n registerAria={register}\n helperText={helperText}\n />\n </div>\n {validationState && (\n <ValidationText\n UNSAFE_className={classProps.input.validationText}\n elementType=\"span\"\n {...(hasValidationIcon && { hasValidationStateIcon: validationState })}\n id={`${id}__validationText`}\n validationText={validationText}\n registerAria={register}\n role={validationTextRole}\n />\n )}\n </div>\n );\n};\n\nFileUploaderInput.spiritComponent = 'FileUploaderInput';\n\nexport default FileUploaderInput;\n"],"names":["FileUploaderInput","props","isDragAndDropSupported","setIsDragAndDropSupported","useState","accept","ariaDescribedBy","dropZoneRef","hasValidationIcon","helperText","iconName","id","inputRef","isDisabled","isLabelHidden","isMultiple","isRequired","label","labelText","linkText","maxFileSize","DEFAULT_FILE_SIZE_LIMIT","maxUploadedFiles","DEFAULT_FILE_QUEUE_LIMIT","name","onError","queueLimitBehavior","validationState","validationText","restProps","isDisabledByQueueLimitBehavior","isDragging","isDropZoneHidden","onChange","onDragEnter","onDragLeave","onDragOver","onDrop","useFileUploaderInput","classProps","useFileUploaderStyleProps","styleProps","transferProps","useStyleProps","ariaDescribedByProp","register","useAriaDescribedBy","validationTextRole","useValidationTextRole","useEffect","jsxs","classNames","jsx","Label","Icon","HelperText","ValidationText"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("react/jsx-runtime"),k=require("react"),g=require("../../hooks/styleProps.cjs"),m=require("../../hooks/useLinkClick.cjs"),C=require("../../utils/mergeStyleProps.cjs"),L=require("./useHeaderStyleProps.cjs"),S=(t,n)=>{const{elementType:i="a",children:l,isCurrent:c,routerOptions:u,...r}=t,s=i,{classProps:a}=L.useHeaderStyleProps({isCurrentLink:c}),{styleProps:p,props:o}=g.useStyleProps(r),d=C.mergeStyleProps(s,{classProps:a.headerDialogLink,styleProps:p,otherProps:o}),P=m.useLinkClick({...r,routerOptions:u});return y.jsx(s,{...o,...d,onClick:P,ref:n,children:l})},e=k.forwardRef(S);e.spiritComponent="HeaderDialogLink";e.displayName="HeaderDialogLink";exports.default=e;
|
|
2
2
|
//# sourceMappingURL=HeaderDialogLink.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderDialogLink.cjs","sources":["../../../src/components/Header/HeaderDialogLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport {\n type HeaderDialogLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritDialogHeaderLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useHeaderStyleProps } from './useHeaderStyleProps';\n\nconst _HeaderDialogLink = <E extends ElementType = 'a'>(\n props: SpiritDialogHeaderLinkProps<E>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const { elementType = 'a', children, isCurrent, ...restProps } = props;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, {\n classProps: classProps.headerDialogLink,\n styleProps,\n otherProps,\n });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst HeaderDialogLink = forwardRef<HTMLAnchorElement, SpiritDialogHeaderLinkProps<'a'>>(\n _HeaderDialogLink,\n) as unknown as PolymorphicComponent<'a', HeaderDialogLinkProps>;\n\nHeaderDialogLink.spiritComponent = 'HeaderDialogLink';\nHeaderDialogLink.displayName = 'HeaderDialogLink';\n\nexport default HeaderDialogLink;\n"],"names":["_HeaderDialogLink","props","ref","elementType","children","isCurrent","restProps","Component","classProps","useHeaderStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","HeaderDialogLink","forwardRef"],"mappings":"
|
|
1
|
+
{"version":3,"file":"HeaderDialogLink.cjs","sources":["../../../src/components/Header/HeaderDialogLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useLinkClick, useStyleProps } from '../../hooks';\nimport {\n type HeaderDialogLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritDialogHeaderLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useHeaderStyleProps } from './useHeaderStyleProps';\n\nconst _HeaderDialogLink = <E extends ElementType = 'a'>(\n props: SpiritDialogHeaderLinkProps<E>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const { elementType = 'a', children, isCurrent, routerOptions, ...restProps } = props;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, {\n classProps: classProps.headerDialogLink,\n styleProps,\n otherProps,\n });\n\n const handleClick = useLinkClick({ ...restProps, routerOptions });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} onClick={handleClick} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst HeaderDialogLink = forwardRef<HTMLAnchorElement, SpiritDialogHeaderLinkProps<'a'>>(\n _HeaderDialogLink,\n) as unknown as PolymorphicComponent<'a', HeaderDialogLinkProps>;\n\nHeaderDialogLink.spiritComponent = 'HeaderDialogLink';\nHeaderDialogLink.displayName = 'HeaderDialogLink';\n\nexport default HeaderDialogLink;\n"],"names":["_HeaderDialogLink","props","ref","elementType","children","isCurrent","routerOptions","restProps","Component","classProps","useHeaderStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","handleClick","useLinkClick","jsx","HeaderDialogLink","forwardRef"],"mappings":"uVAaMA,EAAoB,CACxBC,EACAC,IACgB,CAChB,KAAM,CAAE,YAAAC,EAAc,IAAK,SAAAC,EAAU,UAAAC,EAAW,cAAAC,EAAe,GAAGC,GAAcN,EAE1EO,EAAYL,EAEZ,CAAE,WAAAM,CAAA,EAAeC,EAAAA,oBAAoB,CAAE,cAAeL,EAAW,EACjE,CAAA,WAAEM,EAAY,MAAOC,CAAA,EAAeC,EAAAA,cAAcN,CAAS,EAC3DO,EAAmBC,EAAAA,gBAAgBP,EAAW,CAClD,WAAYC,EAAW,iBAAA,WACvBE,EACA,WAAAC,CAAA,CACD,EAEKI,EAAcC,EAAAA,aAAa,CAAE,GAAGV,EAAW,cAAAD,EAAe,EAEhE,OACEY,MAACV,GAAW,GAAGI,EAAa,GAAGE,EAAkB,QAASE,EAAa,IAAAd,EACpE,SAAAE,EACH,CAEJ,EAEMe,EAAmBC,EAAAA,WACvBpB,CACF,EAEAmB,EAAiB,gBAAkB,mBACnCA,EAAiB,YAAc"}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { useStyleProps as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as f } from "react";
|
|
4
|
+
import { useStyleProps as P } from "../../hooks/styleProps.js";
|
|
5
|
+
import { useLinkClick as g } from "../../hooks/useLinkClick.js";
|
|
6
|
+
import { mergeStyleProps as y } from "../../utils/mergeStyleProps.js";
|
|
7
|
+
import { useHeaderStyleProps as C } from "./useHeaderStyleProps.js";
|
|
8
|
+
const L = (t, i) => {
|
|
9
|
+
const { elementType: n = "a", children: p, isCurrent: l, routerOptions: a, ...r } = t, e = n, { classProps: m } = C({ isCurrentLink: l }), { styleProps: c, props: o } = P(r), d = y(e, {
|
|
10
|
+
classProps: m.headerDialogLink,
|
|
11
|
+
styleProps: c,
|
|
12
|
+
otherProps: o
|
|
13
|
+
}), k = g({ ...r, routerOptions: a });
|
|
14
|
+
return /* @__PURE__ */ u(e, { ...o, ...d, onClick: k, ref: i, children: p });
|
|
15
|
+
}, s = f(
|
|
16
|
+
L
|
|
16
17
|
);
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
s.spiritComponent = "HeaderDialogLink";
|
|
19
|
+
s.displayName = "HeaderDialogLink";
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
s as default
|
|
21
22
|
};
|
|
22
23
|
//# sourceMappingURL=HeaderDialogLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderDialogLink.js","sources":["../../../src/components/Header/HeaderDialogLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport {\n type HeaderDialogLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritDialogHeaderLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useHeaderStyleProps } from './useHeaderStyleProps';\n\nconst _HeaderDialogLink = <E extends ElementType = 'a'>(\n props: SpiritDialogHeaderLinkProps<E>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const { elementType = 'a', children, isCurrent, ...restProps } = props;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, {\n classProps: classProps.headerDialogLink,\n styleProps,\n otherProps,\n });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst HeaderDialogLink = forwardRef<HTMLAnchorElement, SpiritDialogHeaderLinkProps<'a'>>(\n _HeaderDialogLink,\n) as unknown as PolymorphicComponent<'a', HeaderDialogLinkProps>;\n\nHeaderDialogLink.spiritComponent = 'HeaderDialogLink';\nHeaderDialogLink.displayName = 'HeaderDialogLink';\n\nexport default HeaderDialogLink;\n"],"names":["_HeaderDialogLink","props","ref","elementType","children","isCurrent","restProps","Component","classProps","useHeaderStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","HeaderDialogLink","forwardRef"],"mappings":"
|
|
1
|
+
{"version":3,"file":"HeaderDialogLink.js","sources":["../../../src/components/Header/HeaderDialogLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useLinkClick, useStyleProps } from '../../hooks';\nimport {\n type HeaderDialogLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritDialogHeaderLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useHeaderStyleProps } from './useHeaderStyleProps';\n\nconst _HeaderDialogLink = <E extends ElementType = 'a'>(\n props: SpiritDialogHeaderLinkProps<E>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const { elementType = 'a', children, isCurrent, routerOptions, ...restProps } = props;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, {\n classProps: classProps.headerDialogLink,\n styleProps,\n otherProps,\n });\n\n const handleClick = useLinkClick({ ...restProps, routerOptions });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} onClick={handleClick} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst HeaderDialogLink = forwardRef<HTMLAnchorElement, SpiritDialogHeaderLinkProps<'a'>>(\n _HeaderDialogLink,\n) as unknown as PolymorphicComponent<'a', HeaderDialogLinkProps>;\n\nHeaderDialogLink.spiritComponent = 'HeaderDialogLink';\nHeaderDialogLink.displayName = 'HeaderDialogLink';\n\nexport default HeaderDialogLink;\n"],"names":["_HeaderDialogLink","props","ref","elementType","children","isCurrent","routerOptions","restProps","Component","classProps","useHeaderStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","handleClick","useLinkClick","jsx","HeaderDialogLink","forwardRef"],"mappings":";;;;;;;AAaA,MAAMA,IAAoB,CACxBC,GACAC,MACgB;AAChB,QAAM,EAAE,aAAAC,IAAc,KAAK,UAAAC,GAAU,WAAAC,GAAW,eAAAC,GAAe,GAAGC,MAAcN,GAE1EO,IAAYL,GAEZ,EAAE,YAAAM,EAAA,IAAeC,EAAoB,EAAE,eAAeL,GAAW,GACjE,EAAE,YAAAM,GAAY,OAAOC,EAAA,IAAeC,EAAcN,CAAS,GAC3DO,IAAmBC,EAAgBP,GAAW;AAAA,IAClD,YAAYC,EAAW;AAAA,IACvB,YAAAE;AAAA,IACA,YAAAC;AAAA,EAAA,CACD,GAEKI,IAAcC,EAAa,EAAE,GAAGV,GAAW,eAAAD,GAAe;AAEhE,SACE,gBAAAY,EAACV,KAAW,GAAGI,GAAa,GAAGE,GAAkB,SAASE,GAAa,KAAAd,GACpE,UAAAE,GACH;AAEJ,GAEMe,IAAmBC;AAAA,EACvBpB;AACF;AAEAmB,EAAiB,kBAAkB;AACnCA,EAAiB,cAAc;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=require("react/jsx-runtime"),m=require("react"),C=require("../../hooks/styleProps.cjs"),L=require("../../hooks/useLinkClick.cjs"),S=require("../../utils/mergeStyleProps.cjs"),q=require("./useHeaderStyleProps.cjs"),H=(o,n)=>{const{elementType:i="a",children:c,isCurrent:l,routerOptions:u,...e}=o,{href:p}=e,s=i,{classProps:a}=q.useHeaderStyleProps({isCurrentLink:l}),{styleProps:d,props:t}=C.useStyleProps(e),P=S.mergeStyleProps(s,{classProps:a.headerLink,styleProps:d,otherProps:t}),y=L.useLinkClick({...e,routerOptions:u});return k.jsx(s,{...t,...P,href:p,onClick:y,ref:n,children:c})},r=m.forwardRef(H);r.spiritComponent="HeaderLink";r.displayName="HeaderLink";exports.default=r;
|
|
2
2
|
//# sourceMappingURL=HeaderLink.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderLink.cjs","sources":["../../../src/components/Header/HeaderLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport {\n type HeaderLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritHeaderLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useHeaderStyleProps } from './useHeaderStyleProps';\n\nconst _HeaderLink = <E extends ElementType = 'a'>(\n props: SpiritHeaderLinkProps<E>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const { elementType = 'a', children, isCurrent, ...restProps } = props;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, {\n classProps: classProps.headerLink,\n styleProps,\n otherProps,\n });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst HeaderLink = forwardRef<HTMLAnchorElement, SpiritHeaderLinkProps<'a'>>(\n _HeaderLink,\n) as unknown as PolymorphicComponent<'a', HeaderLinkProps>;\n\nHeaderLink.spiritComponent = 'HeaderLink';\nHeaderLink.displayName = 'HeaderLink';\n\nexport default HeaderLink;\n"],"names":["_HeaderLink","props","ref","elementType","children","isCurrent","restProps","Component","classProps","useHeaderStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","HeaderLink","forwardRef"],"mappings":"
|
|
1
|
+
{"version":3,"file":"HeaderLink.cjs","sources":["../../../src/components/Header/HeaderLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useLinkClick, useStyleProps } from '../../hooks';\nimport {\n type HeaderLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritHeaderLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useHeaderStyleProps } from './useHeaderStyleProps';\n\nconst _HeaderLink = <E extends ElementType = 'a'>(\n props: SpiritHeaderLinkProps<E>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const { elementType = 'a', children, isCurrent, routerOptions, ...restProps } = props;\n const { href } = restProps;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, {\n classProps: classProps.headerLink,\n styleProps,\n otherProps,\n });\n\n const handleClick = useLinkClick({ ...restProps, routerOptions });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} href={href} onClick={handleClick} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst HeaderLink = forwardRef<HTMLAnchorElement, SpiritHeaderLinkProps<'a'>>(\n _HeaderLink,\n) as unknown as PolymorphicComponent<'a', HeaderLinkProps>;\n\nHeaderLink.spiritComponent = 'HeaderLink';\nHeaderLink.displayName = 'HeaderLink';\n\nexport default HeaderLink;\n"],"names":["_HeaderLink","props","ref","elementType","children","isCurrent","routerOptions","restProps","href","Component","classProps","useHeaderStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","handleClick","useLinkClick","jsx","HeaderLink","forwardRef"],"mappings":"uVAaMA,EAAc,CAClBC,EACAC,IACgB,CAChB,KAAM,CAAE,YAAAC,EAAc,IAAK,SAAAC,EAAU,UAAAC,EAAW,cAAAC,EAAe,GAAGC,GAAcN,EAC1E,CAAE,KAAAO,GAASD,EAEXE,EAAYN,EAEZ,CAAE,WAAAO,CAAA,EAAeC,EAAAA,oBAAoB,CAAE,cAAeN,EAAW,EACjE,CAAA,WAAEO,EAAY,MAAOC,CAAA,EAAeC,EAAAA,cAAcP,CAAS,EAC3DQ,EAAmBC,EAAAA,gBAAgBP,EAAW,CAClD,WAAYC,EAAW,WAAA,WACvBE,EACA,WAAAC,CAAA,CACD,EAEKI,EAAcC,EAAAA,aAAa,CAAE,GAAGX,EAAW,cAAAD,EAAe,EAEhE,OACEa,MAACV,EAAA,CAAW,GAAGI,EAAa,GAAGE,EAAkB,KAAAP,EAAY,QAASS,EAAa,IAAAf,EAChF,SAAAE,CAAA,CACH,CAEJ,EAEMgB,EAAaC,EAAAA,WACjBrB,CACF,EAEAoB,EAAW,gBAAkB,aAC7BA,EAAW,YAAc"}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as P } from "react";
|
|
4
|
-
import { useStyleProps as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import { useStyleProps as y } from "../../hooks/styleProps.js";
|
|
5
|
+
import { useLinkClick as C } from "../../hooks/useLinkClick.js";
|
|
6
|
+
import { mergeStyleProps as L } from "../../utils/mergeStyleProps.js";
|
|
7
|
+
import { useHeaderStyleProps as h } from "./useHeaderStyleProps.js";
|
|
8
|
+
const H = (t, n) => {
|
|
9
|
+
const { elementType: i = "a", children: p, isCurrent: m, routerOptions: c, ...r } = t, { href: l } = r, e = i, { classProps: a } = h({ isCurrentLink: m }), { styleProps: d, props: o } = y(r), f = L(e, {
|
|
9
10
|
classProps: a.headerLink,
|
|
10
|
-
styleProps:
|
|
11
|
-
otherProps:
|
|
12
|
-
});
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
},
|
|
15
|
-
|
|
11
|
+
styleProps: d,
|
|
12
|
+
otherProps: o
|
|
13
|
+
}), k = C({ ...r, routerOptions: c });
|
|
14
|
+
return /* @__PURE__ */ u(e, { ...o, ...f, href: l, onClick: k, ref: n, children: p });
|
|
15
|
+
}, s = P(
|
|
16
|
+
H
|
|
16
17
|
);
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
s.spiritComponent = "HeaderLink";
|
|
19
|
+
s.displayName = "HeaderLink";
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
s as default
|
|
21
22
|
};
|
|
22
23
|
//# sourceMappingURL=HeaderLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderLink.js","sources":["../../../src/components/Header/HeaderLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport {\n type HeaderLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritHeaderLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useHeaderStyleProps } from './useHeaderStyleProps';\n\nconst _HeaderLink = <E extends ElementType = 'a'>(\n props: SpiritHeaderLinkProps<E>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const { elementType = 'a', children, isCurrent, ...restProps } = props;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, {\n classProps: classProps.headerLink,\n styleProps,\n otherProps,\n });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst HeaderLink = forwardRef<HTMLAnchorElement, SpiritHeaderLinkProps<'a'>>(\n _HeaderLink,\n) as unknown as PolymorphicComponent<'a', HeaderLinkProps>;\n\nHeaderLink.spiritComponent = 'HeaderLink';\nHeaderLink.displayName = 'HeaderLink';\n\nexport default HeaderLink;\n"],"names":["_HeaderLink","props","ref","elementType","children","isCurrent","restProps","Component","classProps","useHeaderStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","HeaderLink","forwardRef"],"mappings":"
|
|
1
|
+
{"version":3,"file":"HeaderLink.js","sources":["../../../src/components/Header/HeaderLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useLinkClick, useStyleProps } from '../../hooks';\nimport {\n type HeaderLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritHeaderLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useHeaderStyleProps } from './useHeaderStyleProps';\n\nconst _HeaderLink = <E extends ElementType = 'a'>(\n props: SpiritHeaderLinkProps<E>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const { elementType = 'a', children, isCurrent, routerOptions, ...restProps } = props;\n const { href } = restProps;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, {\n classProps: classProps.headerLink,\n styleProps,\n otherProps,\n });\n\n const handleClick = useLinkClick({ ...restProps, routerOptions });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} href={href} onClick={handleClick} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst HeaderLink = forwardRef<HTMLAnchorElement, SpiritHeaderLinkProps<'a'>>(\n _HeaderLink,\n) as unknown as PolymorphicComponent<'a', HeaderLinkProps>;\n\nHeaderLink.spiritComponent = 'HeaderLink';\nHeaderLink.displayName = 'HeaderLink';\n\nexport default HeaderLink;\n"],"names":["_HeaderLink","props","ref","elementType","children","isCurrent","routerOptions","restProps","href","Component","classProps","useHeaderStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","handleClick","useLinkClick","jsx","HeaderLink","forwardRef"],"mappings":";;;;;;;AAaA,MAAMA,IAAc,CAClBC,GACAC,MACgB;AAChB,QAAM,EAAE,aAAAC,IAAc,KAAK,UAAAC,GAAU,WAAAC,GAAW,eAAAC,GAAe,GAAGC,MAAcN,GAC1E,EAAE,MAAAO,MAASD,GAEXE,IAAYN,GAEZ,EAAE,YAAAO,EAAA,IAAeC,EAAoB,EAAE,eAAeN,GAAW,GACjE,EAAE,YAAAO,GAAY,OAAOC,EAAA,IAAeC,EAAcP,CAAS,GAC3DQ,IAAmBC,EAAgBP,GAAW;AAAA,IAClD,YAAYC,EAAW;AAAA,IACvB,YAAAE;AAAA,IACA,YAAAC;AAAA,EAAA,CACD,GAEKI,IAAcC,EAAa,EAAE,GAAGX,GAAW,eAAAD,GAAe;AAEhE,SACE,gBAAAa,EAACV,GAAA,EAAW,GAAGI,GAAa,GAAGE,GAAkB,MAAAP,GAAY,SAASS,GAAa,KAAAf,GAChF,UAAAE,EAAA,CACH;AAEJ,GAEMgB,IAAaC;AAAA,EACjBrB;AACF;AAEAoB,EAAW,kBAAkB;AAC7BA,EAAW,cAAc;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const m=require("react/jsx-runtime"),f=require("react"),S=require("../../hooks/styleProps.cjs"),g=require("../../utils/mergeStyleProps.cjs"),D=require("./useInputDetailsStyleProps.cjs"),o={elementType:"div",id:void 0,registerAriaDetails:void 0},i=p=>{const n={...o,...p},{classProps:l,props:u}=D.useInputDetailsStyleProps(n),{children:c,elementType:a,id:e,registerAriaDetails:t,...d}=u,{styleProps:P,props:s}=S.useStyleProps(d),r=a||o.elementType,y=g.mergeStyleProps(r,{classProps:l,styleProps:P,otherProps:s});return f.useEffect(()=>(e&&t?.({add:e}),()=>{e&&t?.({remove:e})}),[e,t]),m.jsx(r,{...s,...y,id:e,children:c})};i.spiritComponent="InputDetails";exports.default=i;
|
|
2
|
+
//# sourceMappingURL=InputDetails.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputDetails.cjs","sources":["../../../src/components/InputDetails/InputDetails.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, useEffect } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport { type InputDetailsProps } from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useInputDetailsStyleProps } from './useInputDetailsStyleProps';\n\nconst defaultProps: Partial<InputDetailsProps> = {\n elementType: 'div',\n id: undefined,\n registerAriaDetails: undefined,\n};\n\nconst InputDetails = <E extends ElementType = 'div'>(props: InputDetailsProps<E>) => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const { classProps, props: modifiedProps } = useInputDetailsStyleProps(propsWithDefaults);\n const { children, elementType, id, registerAriaDetails, ...restProps } = modifiedProps;\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const Component = (elementType || defaultProps.elementType) as ElementType;\n const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });\n\n useEffect(() => {\n if (id) {\n registerAriaDetails?.({ add: id });\n }\n\n return () => {\n if (id) {\n registerAriaDetails?.({ remove: id });\n }\n };\n }, [id, registerAriaDetails]);\n\n return (\n <Component {...otherProps} {...mergedStyleProps} id={id}>\n {children}\n </Component>\n );\n};\n\nInputDetails.spiritComponent = 'InputDetails';\n\nexport default InputDetails;\n"],"names":["defaultProps","InputDetails","props","propsWithDefaults","classProps","modifiedProps","useInputDetailsStyleProps","children","elementType","id","registerAriaDetails","restProps","styleProps","otherProps","useStyleProps","Component","mergedStyleProps","mergeStyleProps","useEffect"],"mappings":"mTAQMA,EAA2C,CAC/C,YAAa,MACb,GAAI,OACJ,oBAAqB,MACvB,EAEMC,EAA+CC,GAAgC,CACnF,MAAMC,EAAoB,CAAE,GAAGH,EAAc,GAAGE,CAAA,EAC1C,CAAE,WAAAE,EAAY,MAAOC,CAAA,EAAkBC,EAAAA,0BAA0BH,CAAiB,EAClF,CAAE,SAAAI,EAAU,YAAAC,EAAa,GAAAC,EAAI,oBAAAC,EAAqB,GAAGC,GAAcN,EACnE,CAAA,WAAEO,EAAY,MAAOC,CAAA,EAAeC,EAAAA,cAAcH,CAAS,EAC3DI,EAAaP,GAAeR,EAAa,YACzCgB,EAAmBC,EAAAA,gBAAgBF,EAAW,CAAE,WAAAX,EAAA,WAAYQ,EAAY,WAAAC,EAAY,EAE1FK,OAAAA,EAAAA,UAAU,KACJT,GACFC,IAAsB,CAAE,IAAKD,EAAI,EAG5B,IAAM,CACPA,GACFC,IAAsB,CAAE,OAAQD,EAAI,CAExC,GACC,CAACA,EAAIC,CAAmB,CAAC,QAGzBK,EAAA,CAAW,GAAGF,EAAa,GAAGG,EAAkB,GAAAP,EAC9C,SAAAF,EACH,CAEJ,EAEAN,EAAa,gBAAkB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React, ElementType } from 'react';
|
|
2
|
+
import { InputDetailsProps } from '../../types';
|
|
3
|
+
declare const InputDetails: {
|
|
4
|
+
<E extends ElementType = "div">(props: InputDetailsProps<E>): React.JSX.Element;
|
|
5
|
+
spiritComponent: string;
|
|
6
|
+
};
|
|
7
|
+
export default InputDetails;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect as P } from "react";
|
|
4
|
+
import { useStyleProps as y } from "../../hooks/styleProps.js";
|
|
5
|
+
import { mergeStyleProps as D } from "../../utils/mergeStyleProps.js";
|
|
6
|
+
import { useInputDetailsStyleProps as g } from "./useInputDetailsStyleProps.js";
|
|
7
|
+
const o = {
|
|
8
|
+
elementType: "div",
|
|
9
|
+
id: void 0,
|
|
10
|
+
registerAriaDetails: void 0
|
|
11
|
+
}, v = (p) => {
|
|
12
|
+
const i = { ...o, ...p }, { classProps: n, props: l } = g(i), { children: m, elementType: a, id: e, registerAriaDetails: t, ...c } = l, { styleProps: d, props: r } = y(c), s = a || o.elementType, f = D(s, { classProps: n, styleProps: d, otherProps: r });
|
|
13
|
+
return P(() => (e && t?.({ add: e }), () => {
|
|
14
|
+
e && t?.({ remove: e });
|
|
15
|
+
}), [e, t]), /* @__PURE__ */ u(s, { ...r, ...f, id: e, children: m });
|
|
16
|
+
};
|
|
17
|
+
v.spiritComponent = "InputDetails";
|
|
18
|
+
export {
|
|
19
|
+
v as default
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=InputDetails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputDetails.js","sources":["../../../src/components/InputDetails/InputDetails.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, useEffect } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport { type InputDetailsProps } from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useInputDetailsStyleProps } from './useInputDetailsStyleProps';\n\nconst defaultProps: Partial<InputDetailsProps> = {\n elementType: 'div',\n id: undefined,\n registerAriaDetails: undefined,\n};\n\nconst InputDetails = <E extends ElementType = 'div'>(props: InputDetailsProps<E>) => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const { classProps, props: modifiedProps } = useInputDetailsStyleProps(propsWithDefaults);\n const { children, elementType, id, registerAriaDetails, ...restProps } = modifiedProps;\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const Component = (elementType || defaultProps.elementType) as ElementType;\n const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });\n\n useEffect(() => {\n if (id) {\n registerAriaDetails?.({ add: id });\n }\n\n return () => {\n if (id) {\n registerAriaDetails?.({ remove: id });\n }\n };\n }, [id, registerAriaDetails]);\n\n return (\n <Component {...otherProps} {...mergedStyleProps} id={id}>\n {children}\n </Component>\n );\n};\n\nInputDetails.spiritComponent = 'InputDetails';\n\nexport default InputDetails;\n"],"names":["defaultProps","InputDetails","props","propsWithDefaults","classProps","modifiedProps","useInputDetailsStyleProps","children","elementType","id","registerAriaDetails","restProps","styleProps","otherProps","useStyleProps","Component","mergedStyleProps","mergeStyleProps","useEffect"],"mappings":";;;;;;AAQA,MAAMA,IAA2C;AAAA,EAC/C,aAAa;AAAA,EACb,IAAI;AAAA,EACJ,qBAAqB;AACvB,GAEMC,IAAe,CAAgCC,MAAgC;AACnF,QAAMC,IAAoB,EAAE,GAAGH,GAAc,GAAGE,EAAA,GAC1C,EAAE,YAAAE,GAAY,OAAOC,EAAA,IAAkBC,EAA0BH,CAAiB,GAClF,EAAE,UAAAI,GAAU,aAAAC,GAAa,IAAAC,GAAI,qBAAAC,GAAqB,GAAGC,MAAcN,GACnE,EAAE,YAAAO,GAAY,OAAOC,EAAA,IAAeC,EAAcH,CAAS,GAC3DI,IAAaP,KAAeR,EAAa,aACzCgB,IAAmBC,EAAgBF,GAAW,EAAE,YAAAX,GAAY,YAAAQ,GAAY,YAAAC,GAAY;AAE1F,SAAAK,EAAU,OACJT,KACFC,IAAsB,EAAE,KAAKD,GAAI,GAG5B,MAAM;AACX,IAAIA,KACFC,IAAsB,EAAE,QAAQD,GAAI;AAAA,EAExC,IACC,CAACA,GAAIC,CAAmB,CAAC,qBAGzBK,GAAA,EAAW,GAAGF,GAAa,GAAGG,GAAkB,IAAAP,GAC9C,UAAAF,GACH;AAEJ;AAEAN,EAAa,kBAAkB;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./InputDetails.cjs"),t=require("./useInputDetailsStyleProps.cjs");exports.InputDetails=e.default;exports.useInputDetailsStyleProps=t.useInputDetailsStyleProps;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../hooks/useClassNamePrefix.cjs");function t(s){return{classProps:e.useClassNamePrefix("InputDetails"),props:s}}exports.useInputDetailsStyleProps=t;
|
|
2
|
+
//# sourceMappingURL=useInputDetailsStyleProps.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInputDetailsStyleProps.cjs","sources":["../../../src/components/InputDetails/useInputDetailsStyleProps.ts"],"sourcesContent":["import type { ElementType } from 'react';\nimport { useClassNamePrefix } from '../../hooks';\nimport { type InputDetailsProps } from '../../types';\n\nexport interface InputDetailsStyles<T> {\n classProps: string;\n props: T;\n}\n\nexport function useInputDetailsStyleProps<E extends ElementType = 'div'>(\n props: InputDetailsProps<E>,\n): InputDetailsStyles<InputDetailsProps<E>> {\n const inputDetailsClass = useClassNamePrefix('InputDetails');\n\n return {\n classProps: inputDetailsClass,\n props,\n };\n}\n"],"names":["useInputDetailsStyleProps","props","useClassNamePrefix"],"mappings":"sIASO,SAASA,EACdC,EAC0C,CAG1C,MAAO,CACL,WAHwBC,EAAAA,mBAAmB,cAAc,EAIzD,MAAAD,CAAA,CAEJ"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { InputDetailsProps } from '../../types';
|
|
3
|
+
export interface InputDetailsStyles<T> {
|
|
4
|
+
classProps: string;
|
|
5
|
+
props: T;
|
|
6
|
+
}
|
|
7
|
+
export declare function useInputDetailsStyleProps<E extends ElementType = 'div'>(props: InputDetailsProps<E>): InputDetailsStyles<InputDetailsProps<E>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useClassNamePrefix as t } from "../../hooks/useClassNamePrefix.js";
|
|
2
|
+
function a(s) {
|
|
3
|
+
return {
|
|
4
|
+
classProps: t("InputDetails"),
|
|
5
|
+
props: s
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
a as useInputDetailsStyleProps
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=useInputDetailsStyleProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInputDetailsStyleProps.js","sources":["../../../src/components/InputDetails/useInputDetailsStyleProps.ts"],"sourcesContent":["import type { ElementType } from 'react';\nimport { useClassNamePrefix } from '../../hooks';\nimport { type InputDetailsProps } from '../../types';\n\nexport interface InputDetailsStyles<T> {\n classProps: string;\n props: T;\n}\n\nexport function useInputDetailsStyleProps<E extends ElementType = 'div'>(\n props: InputDetailsProps<E>,\n): InputDetailsStyles<InputDetailsProps<E>> {\n const inputDetailsClass = useClassNamePrefix('InputDetails');\n\n return {\n classProps: inputDetailsClass,\n props,\n };\n}\n"],"names":["useInputDetailsStyleProps","props","useClassNamePrefix"],"mappings":";AASO,SAASA,EACdC,GAC0C;AAG1C,SAAO;AAAA,IACL,YAHwBC,EAAmB,cAAc;AAAA,IAIzD,OAAAD;AAAA,EAAA;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=require("react/jsx-runtime"),S=require("react"),f=require("../../hooks/styleProps.cjs"),L=require("../../hooks/useLinkClick.cjs"),h=require("../../utils/mergeStyleProps.cjs"),q=require("./useLinkStyleProps.cjs"),o={elementType:"a",color:"primary",hasVisitedStyleAllowed:!1,underlined:"hover"},C=(n,i)=>{const l={...o,...n},{elementType:p=o.elementType,children:c,routerOptions:u,...s}=l,t=p,{classProps:y,props:a}=q.useLinkStyleProps(s),{styleProps:d,props:r}=f.useStyleProps(a),P=h.mergeStyleProps(t,{classProps:y,styleProps:d,otherProps:r}),m=L.useLinkClick({...s,routerOptions:u});return k.jsx(t,{...r,...P,onClick:m,ref:i,children:c})},e=S.forwardRef(C);e.spiritComponent="Link";e.displayName="Link";exports.default=e;
|
|
2
2
|
//# sourceMappingURL=Link.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.cjs","sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport { type LinkProps, type PolymorphicComponent, type PolymorphicRef, type SpiritLinkProps } from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useLinkStyleProps } from './useLinkStyleProps';\n\nconst defaultProps = {\n elementType: 'a',\n color: 'primary',\n hasVisitedStyleAllowed: false,\n underlined: 'hover',\n};\n\nconst _Link = <E extends ElementType = 'a', C = void>(\n props: SpiritLinkProps<E, C>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const { elementType = defaultProps.elementType, children, ...restProps } = propsWithDefaults;\n\n const Component = elementType as ElementType;\n\n const { classProps, props: modifiedProps } = useLinkStyleProps(restProps);\n const { styleProps, props: otherProps } = useStyleProps(modifiedProps);\n const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });\n\n return (\n <Component {...otherProps} {...mergedStyleProps}
|
|
1
|
+
{"version":3,"file":"Link.cjs","sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useLinkClick, useStyleProps } from '../../hooks';\nimport { type LinkProps, type PolymorphicComponent, type PolymorphicRef, type SpiritLinkProps } from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useLinkStyleProps } from './useLinkStyleProps';\n\nconst defaultProps = {\n elementType: 'a',\n color: 'primary',\n hasVisitedStyleAllowed: false,\n underlined: 'hover',\n};\n\nconst _Link = <E extends ElementType = 'a', C = void>(\n props: SpiritLinkProps<E, C>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const { elementType = defaultProps.elementType, children, routerOptions, ...restProps } = propsWithDefaults;\n\n const Component = elementType as ElementType;\n\n const { classProps, props: modifiedProps } = useLinkStyleProps(restProps);\n const { styleProps, props: otherProps } = useStyleProps(modifiedProps);\n const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });\n\n const handleClick = useLinkClick({ ...restProps, routerOptions });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} onClick={handleClick} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst Link = forwardRef<HTMLAnchorElement, SpiritLinkProps<'a', void>>(_Link) as unknown as PolymorphicComponent<\n 'a',\n LinkProps<void>\n>;\n\nLink.spiritComponent = 'Link';\nLink.displayName = 'Link';\n\nexport default Link;\n"],"names":["defaultProps","_Link","props","ref","propsWithDefaults","elementType","children","routerOptions","restProps","Component","classProps","modifiedProps","useLinkStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","handleClick","useLinkClick","jsx","Link","forwardRef"],"mappings":"qVAQMA,EAAe,CACnB,YAAa,IACb,MAAO,UACP,uBAAwB,GACxB,WAAY,OACd,EAEMC,EAAQ,CACZC,EACAC,IACgB,CAChB,MAAMC,EAAoB,CAAE,GAAGJ,EAAc,GAAGE,CAAA,EAC1C,CAAE,YAAAG,EAAcL,EAAa,YAAa,SAAAM,EAAU,cAAAC,EAAe,GAAGC,GAAcJ,EAEpFK,EAAYJ,EAEZ,CAAE,WAAAK,EAAY,MAAOC,CAAA,EAAkBC,EAAAA,kBAAkBJ,CAAS,EAClE,CAAA,WAAEK,EAAY,MAAOC,CAAA,EAAeC,EAAAA,cAAcJ,CAAa,EAC/DK,EAAmBC,EAAAA,gBAAgBR,EAAW,CAAE,WAAAC,EAAA,WAAYG,EAAY,WAAAC,EAAY,EAEpFI,EAAcC,EAAAA,aAAa,CAAE,GAAGX,EAAW,cAAAD,EAAe,EAEhE,OACEa,MAACX,GAAW,GAAGK,EAAa,GAAGE,EAAkB,QAASE,EAAa,IAAAf,EACpE,SAAAG,EACH,CAEJ,EAEMe,EAAOC,EAAAA,WAA0DrB,CAAK,EAK5EoB,EAAK,gBAAkB,OACvBA,EAAK,YAAc"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { useStyleProps as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { jsx as P } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as k } from "react";
|
|
4
|
+
import { useStyleProps as h } from "../../hooks/styleProps.js";
|
|
5
|
+
import { useLinkClick as L } from "../../hooks/useLinkClick.js";
|
|
6
|
+
import { mergeStyleProps as C } from "../../utils/mergeStyleProps.js";
|
|
7
|
+
import { useLinkStyleProps as S } from "./useLinkStyleProps.js";
|
|
7
8
|
const s = {
|
|
8
9
|
elementType: "a",
|
|
9
10
|
color: "primary",
|
|
10
11
|
hasVisitedStyleAllowed: !1,
|
|
11
12
|
underlined: "hover"
|
|
12
|
-
},
|
|
13
|
-
const i = { ...s, ...p }, { elementType: l = s.elementType, children: m, ...
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
}, t =
|
|
13
|
+
}, T = (p, n) => {
|
|
14
|
+
const i = { ...s, ...p }, { elementType: l = s.elementType, children: m, routerOptions: c, ...o } = i, e = l, { classProps: a, props: d } = S(o), { styleProps: f, props: r } = h(d), u = C(e, { classProps: a, styleProps: f, otherProps: r }), y = L({ ...o, routerOptions: c });
|
|
15
|
+
return /* @__PURE__ */ P(e, { ...r, ...u, onClick: y, ref: n, children: m });
|
|
16
|
+
}, t = k(T);
|
|
16
17
|
t.spiritComponent = "Link";
|
|
17
18
|
t.displayName = "Link";
|
|
18
19
|
export {
|