@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,121 +1,138 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import
|
|
4
|
-
import { useState as
|
|
5
|
-
import { useStyleProps as
|
|
6
|
-
import { useAriaDescribedBy as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useValidationTextRole as
|
|
12
|
-
import
|
|
13
|
-
import { useFileUploadState as
|
|
14
|
-
import { useFileUploadStyleProps as
|
|
15
|
-
const
|
|
16
|
-
const [
|
|
17
|
-
"aria-describedby":
|
|
18
|
-
accept:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
2
|
+
import { jsxs as r, jsx as i, Fragment as G } from "react/jsx-runtime";
|
|
3
|
+
import J from "classnames";
|
|
4
|
+
import { useState as K, useEffect as Q } from "react";
|
|
5
|
+
import { useStyleProps as W } from "../../hooks/styleProps.js";
|
|
6
|
+
import { useAriaDescribedBy as X } from "../../hooks/useAriaIdRefs.js";
|
|
7
|
+
import Y from "../Button/Button.js";
|
|
8
|
+
import ee from "../Field/HelperText.js";
|
|
9
|
+
import v from "../Field/Label.js";
|
|
10
|
+
import oe from "../Field/ValidationText.js";
|
|
11
|
+
import { useValidationTextRole as ie } from "../Field/useValidationTextRole.js";
|
|
12
|
+
import re from "../Icon/Icon.js";
|
|
13
|
+
import { useFileUploadState as te } from "./useFileUploadState.js";
|
|
14
|
+
import { useFileUploadStyleProps as ae } from "./useFileUploadStyleProps.js";
|
|
15
|
+
const g = (h) => {
|
|
16
|
+
const [N, S] = K(!1), {
|
|
17
|
+
"aria-describedby": b = "",
|
|
18
|
+
accept: A,
|
|
19
|
+
buttonText: T = "Browse",
|
|
20
|
+
children: x,
|
|
21
|
+
dropZoneRef: F,
|
|
22
|
+
hasValidationIcon: y,
|
|
23
|
+
helperText: U,
|
|
24
|
+
iconName: E = "upload",
|
|
25
|
+
id: B,
|
|
26
|
+
inputRef: L,
|
|
27
|
+
isCompact: d,
|
|
26
28
|
isDisabled: o,
|
|
27
|
-
|
|
28
|
-
isLabelHidden:
|
|
29
|
-
isMultiple:
|
|
29
|
+
isDragAndDropSupported: s,
|
|
30
|
+
isLabelHidden: P,
|
|
31
|
+
isMultiple: I,
|
|
30
32
|
isRequired: _,
|
|
31
|
-
label:
|
|
32
|
-
labelText:
|
|
33
|
-
linkText:
|
|
34
|
-
name:
|
|
35
|
-
onFilesSelected:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
label: R,
|
|
34
|
+
labelText: p,
|
|
35
|
+
linkText: V,
|
|
36
|
+
name: c,
|
|
37
|
+
onFilesSelected: Z,
|
|
38
|
+
rootId: l,
|
|
39
|
+
validationState: n,
|
|
40
|
+
validationText: m,
|
|
41
|
+
...C
|
|
42
|
+
} = h, u = c !== void 0, t = s ?? N, { isDragging: j, onChange: H, onDragEnter: O, onDragLeave: $, onDragOver: k, onDrop: q } = te({
|
|
43
|
+
onFilesSelected: u ? Z : void 0
|
|
44
|
+
}), { classProps: e } = ae({
|
|
45
|
+
isCompact: d,
|
|
42
46
|
isDisabled: o,
|
|
43
|
-
isDragAndDropSupported:
|
|
44
|
-
isDragging:
|
|
45
|
-
|
|
46
|
-
isLabelHidden: U,
|
|
47
|
+
isDragAndDropSupported: t,
|
|
48
|
+
isDragging: j,
|
|
49
|
+
isLabelHidden: P,
|
|
47
50
|
isRequired: _,
|
|
48
|
-
validationState:
|
|
49
|
-
}), { styleProps:
|
|
50
|
-
validationState:
|
|
51
|
-
validationText:
|
|
52
|
-
}), a =
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
}, []), /* @__PURE__ */
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
51
|
+
validationState: n
|
|
52
|
+
}), { styleProps: D, props: w } = W(C), [z, f] = X(b), M = ie({
|
|
53
|
+
validationState: n,
|
|
54
|
+
validationText: m
|
|
55
|
+
}), a = B;
|
|
56
|
+
return Q(() => {
|
|
57
|
+
s === void 0 && S("draggable" in document.createElement("span"));
|
|
58
|
+
}, [s]), /* @__PURE__ */ r(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
...w,
|
|
62
|
+
...D,
|
|
63
|
+
...l != null && l !== "" ? { id: l } : {},
|
|
64
|
+
className: J(e.root, D.className),
|
|
65
|
+
children: [
|
|
66
|
+
u && /* @__PURE__ */ r(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
onDragOver: !o && t ? k : void 0,
|
|
70
|
+
onDragEnter: !o && t ? O : void 0,
|
|
71
|
+
onDragLeave: !o && t ? $ : void 0,
|
|
72
|
+
onDrop: !o && t ? q : void 0,
|
|
73
|
+
className: e.input.root,
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ i(v, { htmlFor: a, UNSAFE_className: e.input.label, children: R }),
|
|
76
|
+
/* @__PURE__ */ i(
|
|
77
|
+
"input",
|
|
78
|
+
{
|
|
79
|
+
...z,
|
|
80
|
+
type: "file",
|
|
81
|
+
accept: A,
|
|
82
|
+
id: a,
|
|
83
|
+
ref: L,
|
|
84
|
+
name: c,
|
|
85
|
+
className: e.input.input,
|
|
86
|
+
onChange: H,
|
|
87
|
+
multiple: I,
|
|
88
|
+
disabled: o
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
/* @__PURE__ */ r("div", { ref: F, className: e.input.dropZone.root, children: [
|
|
92
|
+
!d && /* @__PURE__ */ i(re, { name: E, boxSize: 28, "aria-hidden": "true" }),
|
|
93
|
+
/* @__PURE__ */ r("div", { className: e.input.dropZone.content, children: [
|
|
94
|
+
/* @__PURE__ */ r(v, { htmlFor: a, UNSAFE_className: e.input.dropZone.label, children: [
|
|
95
|
+
V,
|
|
96
|
+
p && /* @__PURE__ */ r(G, { children: [
|
|
97
|
+
" ",
|
|
98
|
+
/* @__PURE__ */ i("span", { className: e.input.dropLabel, children: p })
|
|
99
|
+
] })
|
|
100
|
+
] }),
|
|
101
|
+
/* @__PURE__ */ i(
|
|
102
|
+
ee,
|
|
103
|
+
{
|
|
104
|
+
UNSAFE_className: e.input.helper,
|
|
105
|
+
id: `${a}-helper`,
|
|
106
|
+
registerAria: f,
|
|
107
|
+
helperText: U
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
] }),
|
|
111
|
+
/* @__PURE__ */ i(Y, { "aria-hidden": "true", isDisabled: o, elementType: "div", type: null, children: T })
|
|
112
|
+
] }),
|
|
113
|
+
n && /* @__PURE__ */ i(
|
|
114
|
+
oe,
|
|
115
|
+
{
|
|
116
|
+
UNSAFE_className: e.input.validationText,
|
|
117
|
+
elementType: "div",
|
|
118
|
+
...y && { hasValidationStateIcon: n },
|
|
119
|
+
id: `${a}-validation`,
|
|
120
|
+
validationText: m,
|
|
121
|
+
registerAria: f,
|
|
122
|
+
role: M
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
x
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
);
|
|
115
132
|
};
|
|
116
|
-
|
|
117
|
-
|
|
133
|
+
g.spiritComponent = "UNSTABLE_FileUpload";
|
|
134
|
+
g.displayName = "UNSTABLE_FileUpload";
|
|
118
135
|
export {
|
|
119
|
-
|
|
136
|
+
g as default
|
|
120
137
|
};
|
|
121
138
|
//# sourceMappingURL=UNSTABLE_FileUpload.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UNSTABLE_FileUpload.js","sources":["../../../src/components/UNSTABLE_FileUpload/UNSTABLE_FileUpload.tsx"],"sourcesContent":["'use client';\n\nimport classNames from 'classnames';\nimport React, { useEffect, useState } from 'react';\nimport { useAriaDescribedBy, useStyleProps } from '../../hooks';\nimport { HelperText, Label, ValidationText
|
|
1
|
+
{"version":3,"file":"UNSTABLE_FileUpload.js","sources":["../../../src/components/UNSTABLE_FileUpload/UNSTABLE_FileUpload.tsx"],"sourcesContent":["'use client';\n\nimport classNames from 'classnames';\nimport React, { useEffect, useState } from 'react';\nimport { useAriaDescribedBy, useStyleProps } from '../../hooks';\nimport { Button } from '../Button';\nimport { HelperText, Label, ValidationText } from '../Field';\nimport { useValidationTextRole } from '../Field/useValidationTextRole';\nimport { Icon } from '../Icon';\nimport { type UnstableFileUploadProps } from './types';\nimport { useFileUploadState } from './useFileUploadState';\nimport { useFileUploadStyleProps } from './useFileUploadStyleProps';\n\nconst UNSTABLE_FileUpload = (props: UnstableFileUploadProps) => {\n const [isDragAndDropDetected, setIsDragAndDropDetected] = useState(false);\n const {\n 'aria-describedby': ariaDescribedBy = '',\n accept,\n buttonText = 'Browse',\n children,\n dropZoneRef,\n hasValidationIcon,\n helperText,\n iconName = 'upload',\n id,\n inputRef,\n isCompact,\n isDisabled,\n isDragAndDropSupported: isDragAndDropSupportedProp,\n isLabelHidden,\n isMultiple,\n isRequired,\n label,\n labelText,\n linkText,\n name,\n onFilesSelected,\n rootId,\n validationState,\n validationText,\n ...restProps\n } = props;\n\n const hasInput = name !== undefined;\n\n const isDragAndDropSupported = isDragAndDropSupportedProp ?? isDragAndDropDetected;\n\n const { isDragging, onChange, onDragEnter, onDragLeave, onDragOver, onDrop } = useFileUploadState({\n onFilesSelected: hasInput ? onFilesSelected : undefined,\n });\n\n const { classProps } = useFileUploadStyleProps({\n hasValidationIcon,\n isCompact,\n isDisabled,\n isDragAndDropSupported,\n isDragging,\n isLabelHidden,\n isRequired,\n validationState,\n });\n\n const { styleProps, props: transferProps } = useStyleProps(restProps);\n\n const [ariaDescribedByProp, register] = useAriaDescribedBy(ariaDescribedBy);\n const validationTextRole = useValidationTextRole({\n validationState,\n validationText,\n });\n const inputId = id;\n\n useEffect(() => {\n if (isDragAndDropSupportedProp !== undefined) {\n return;\n }\n setIsDragAndDropDetected('draggable' in document.createElement('span'));\n }, [isDragAndDropSupportedProp]);\n\n return (\n <div\n {...transferProps}\n {...styleProps}\n {...(rootId != null && rootId !== '' ? { id: rootId } : {})}\n className={classNames(classProps.root, styleProps.className)}\n >\n {hasInput && (\n <div\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={classProps.input.root}\n >\n <Label htmlFor={inputId} UNSAFE_className={classProps.input.label}>\n {label}\n </Label>\n <input\n {...ariaDescribedByProp}\n type=\"file\"\n accept={accept}\n id={inputId}\n ref={inputRef}\n name={name}\n className={classProps.input.input}\n onChange={onChange}\n multiple={isMultiple}\n disabled={isDisabled}\n />\n <div ref={dropZoneRef} className={classProps.input.dropZone.root}>\n {!isCompact && <Icon name={iconName} boxSize={28} aria-hidden=\"true\" />}\n <div className={classProps.input.dropZone.content}>\n <Label htmlFor={inputId} UNSAFE_className={classProps.input.dropZone.label}>\n {linkText}\n {labelText && (\n <>\n {' '}\n <span className={classProps.input.dropLabel}>{labelText}</span>\n </>\n )}\n </Label>\n <HelperText\n UNSAFE_className={classProps.input.helper}\n id={`${inputId}-helper`}\n registerAria={register}\n helperText={helperText}\n />\n </div>\n {/* @ts-expect-error - Div cannot have type=\"button\". This will be solved with https://jira.almacareer.tech/browse/DS-2168 */}\n <Button aria-hidden=\"true\" isDisabled={isDisabled} elementType=\"div\" type={null}>\n {buttonText}\n </Button>\n </div>\n {validationState && (\n <ValidationText\n UNSAFE_className={classProps.input.validationText}\n elementType=\"div\"\n {...(hasValidationIcon && { hasValidationStateIcon: validationState })}\n id={`${inputId}-validation`}\n validationText={validationText}\n registerAria={register}\n role={validationTextRole}\n />\n )}\n </div>\n )}\n {children}\n </div>\n );\n};\n\nUNSTABLE_FileUpload.spiritComponent = 'UNSTABLE_FileUpload';\nUNSTABLE_FileUpload.displayName = 'UNSTABLE_FileUpload';\n\nexport default UNSTABLE_FileUpload;\n"],"names":["UNSTABLE_FileUpload","props","isDragAndDropDetected","setIsDragAndDropDetected","useState","ariaDescribedBy","accept","buttonText","children","dropZoneRef","hasValidationIcon","helperText","iconName","id","inputRef","isCompact","isDisabled","isDragAndDropSupportedProp","isLabelHidden","isMultiple","isRequired","label","labelText","linkText","name","onFilesSelected","rootId","validationState","validationText","restProps","hasInput","isDragAndDropSupported","isDragging","onChange","onDragEnter","onDragLeave","onDragOver","onDrop","useFileUploadState","classProps","useFileUploadStyleProps","styleProps","transferProps","useStyleProps","ariaDescribedByProp","register","useAriaDescribedBy","validationTextRole","useValidationTextRole","inputId","useEffect","jsxs","classNames","jsx","Label","Icon","Fragment","HelperText","Button","ValidationText"],"mappings":";;;;;;;;;;;;;;AAaA,MAAMA,IAAsB,CAACC,MAAmC;AAC9D,QAAM,CAACC,GAAuBC,CAAwB,IAAIC,EAAS,EAAK,GAClE;AAAA,IACJ,oBAAoBC,IAAkB;AAAA,IACtC,QAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,IAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,wBAAwBC;AAAA,IACxB,eAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,QAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACD5B,GAEE6B,IAAWN,MAAS,QAEpBO,IAAyBd,KAA8Bf,GAEvD,EAAE,YAAA8B,GAAY,UAAAC,GAAU,aAAAC,GAAa,aAAAC,GAAa,YAAAC,GAAY,QAAAC,EAAA,IAAWC,GAAmB;AAAA,IAChG,iBAAiBR,IAAWL,IAAkB;AAAA,EAAA,CAC/C,GAEK,EAAE,YAAAc,EAAA,IAAeC,GAAwB;AAAA,IAE7C,WAAAzB;AAAA,IACA,YAAAC;AAAA,IACA,wBAAAe;AAAA,IACA,YAAAC;AAAA,IACA,eAAAd;AAAA,IACA,YAAAE;AAAA,IACA,iBAAAO;AAAA,EAAA,CACD,GAEK,EAAE,YAAAc,GAAY,OAAOC,EAAA,IAAkBC,EAAcd,CAAS,GAE9D,CAACe,GAAqBC,CAAQ,IAAIC,EAAmBzC,CAAe,GACpE0C,IAAqBC,GAAsB;AAAA,IAC/C,iBAAArB;AAAA,IACA,gBAAAC;AAAA,EAAA,CACD,GACKqB,IAAUpC;AAEhB,SAAAqC,EAAU,MAAM;AACd,IAAIjC,MAA+B,UAGnCd,EAAyB,eAAe,SAAS,cAAc,MAAM,CAAC;AAAA,EACxE,GAAG,CAACc,CAA0B,CAAC,GAG7B,gBAAAkC;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGT;AAAA,MACH,GAAGD;AAAA,MACH,GAAIf,KAAU,QAAQA,MAAW,KAAK,EAAE,IAAIA,EAAA,IAAW,CAAA;AAAA,MACxD,WAAW0B,EAAWb,EAAW,MAAME,EAAW,SAAS;AAAA,MAE1D,UAAA;AAAA,QAAAX,KACC,gBAAAqB;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,YAAY,CAACnC,KAAce,IAAyBK,IAAa;AAAA,YACjE,aAAa,CAACpB,KAAce,IAAyBG,IAAc;AAAA,YACnE,aAAa,CAAClB,KAAce,IAAyBI,IAAc;AAAA,YACnE,QAAQ,CAACnB,KAAce,IAAyBM,IAAS;AAAA,YACzD,WAAWE,EAAW,MAAM;AAAA,YAE5B,UAAA;AAAA,cAAA,gBAAAc,EAACC,KAAM,SAASL,GAAS,kBAAkBV,EAAW,MAAM,OACzD,UAAAlB,EAAA,CACH;AAAA,cACA,gBAAAgC;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACE,GAAGT;AAAA,kBACJ,MAAK;AAAA,kBACL,QAAAtC;AAAA,kBACA,IAAI2C;AAAA,kBACJ,KAAKnC;AAAA,kBACL,MAAAU;AAAA,kBACA,WAAWe,EAAW,MAAM;AAAA,kBAC5B,UAAAN;AAAA,kBACA,UAAUd;AAAA,kBACV,UAAUH;AAAA,gBAAA;AAAA,cAAA;AAAA,cAEZ,gBAAAmC,EAAC,SAAI,KAAK1C,GAAa,WAAW8B,EAAW,MAAM,SAAS,MACzD,UAAA;AAAA,gBAAA,CAACxB,uBAAcwC,IAAA,EAAK,MAAM3C,GAAU,SAAS,IAAI,eAAY,QAAO;AAAA,kCACpE,OAAA,EAAI,WAAW2B,EAAW,MAAM,SAAS,SACxC,UAAA;AAAA,kBAAA,gBAAAY,EAACG,KAAM,SAASL,GAAS,kBAAkBV,EAAW,MAAM,SAAS,OAClE,UAAA;AAAA,oBAAAhB;AAAA,oBACAD,KACC,gBAAA6B,EAAAK,GAAA,EACG,UAAA;AAAA,sBAAA;AAAA,wCACA,QAAA,EAAK,WAAWjB,EAAW,MAAM,WAAY,UAAAjB,EAAA,CAAU;AAAA,oBAAA,EAAA,CAC1D;AAAA,kBAAA,GAEJ;AAAA,kBACA,gBAAA+B;AAAA,oBAACI;AAAA,oBAAA;AAAA,sBACC,kBAAkBlB,EAAW,MAAM;AAAA,sBACnC,IAAI,GAAGU,CAAO;AAAA,sBACd,cAAcJ;AAAA,sBACd,YAAAlC;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBACF,GACF;AAAA,gBAEA,gBAAA0C,EAACK,KAAO,eAAY,QAAO,YAAA1C,GAAwB,aAAY,OAAM,MAAM,MACxE,UAAAT,EAAA,CACH;AAAA,cAAA,GACF;AAAA,cACCoB,KACC,gBAAA0B;AAAA,gBAACM;AAAA,gBAAA;AAAA,kBACC,kBAAkBpB,EAAW,MAAM;AAAA,kBACnC,aAAY;AAAA,kBACX,GAAI7B,KAAqB,EAAE,wBAAwBiB,EAAA;AAAA,kBACpD,IAAI,GAAGsB,CAAO;AAAA,kBACd,gBAAArB;AAAA,kBACA,cAAciB;AAAA,kBACd,MAAME;AAAA,gBAAA;AAAA,cAAA;AAAA,YACR;AAAA,UAAA;AAAA,QAAA;AAAA,QAILvC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;AAEAR,EAAoB,kBAAkB;AACtCA,EAAoB,cAAc;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { MutableRefObject, ReactNode } from 'react';
|
|
2
2
|
import { SpiritInputElementProps, Validation, ValidationTextType } from '../../types/shared';
|
|
3
|
-
import {
|
|
3
|
+
import { UnstableFileItem } from '../UNSTABLE_File/types';
|
|
4
4
|
export interface UnstableFileUploadTextProps {
|
|
5
|
+
buttonText?: string;
|
|
5
6
|
helperText?: string;
|
|
6
7
|
labelText?: string;
|
|
7
8
|
linkText?: string;
|
|
8
9
|
}
|
|
9
|
-
export type UnstableFileUploadAttachmentsItem =
|
|
10
|
+
export type UnstableFileUploadAttachmentsItem = UnstableFileItem;
|
|
10
11
|
export type FilesSelectedType = (files: File[]) => void;
|
|
11
12
|
export interface UnstableFileUploadInputProps extends Omit<SpiritInputElementProps, 'onError' | 'label'>, UnstableFileUploadTextProps, Validation {
|
|
12
13
|
accept?: string;
|
|
@@ -16,6 +17,8 @@ export interface UnstableFileUploadInputProps extends Omit<SpiritInputElementPro
|
|
|
16
17
|
id: string;
|
|
17
18
|
inputRef?: MutableRefObject<HTMLInputElement>;
|
|
18
19
|
isDisabled?: boolean;
|
|
20
|
+
isCompact?: boolean;
|
|
21
|
+
isDragAndDropSupported?: boolean;
|
|
19
22
|
isLabelHidden?: boolean;
|
|
20
23
|
isMultiple?: boolean;
|
|
21
24
|
isRequired?: boolean;
|
|
@@ -26,5 +29,5 @@ export interface UnstableFileUploadInputProps extends Omit<SpiritInputElementPro
|
|
|
26
29
|
}
|
|
27
30
|
export interface UnstableFileUploadProps extends UnstableFileUploadInputProps {
|
|
28
31
|
id: string;
|
|
29
|
-
|
|
32
|
+
rootId?: string;
|
|
30
33
|
}
|
|
@@ -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 a=require("classnames"),$=require("../../hooks/useClassNamePrefix.cjs"),g=e=>{const o=$.useClassNamePrefix("UNSTABLE_FileUpload"),s="has-drag-and-drop",l=`${o}Input`,t=`${l}--disabled`,n=`${l}__dropZone--disabled`,i=`${l}__dropZone--compact`,d=`${l}--${e?.validationState}`,p="is-dragging",r=`${l}__dragAndDropLabel`,u=`${l}__dropZone`,c=`${l}__dropZoneContent`,_=`${l}__dropZoneLabel`,C=`${l}__helperText`,b=`${l}__input`,U=`${l}__label`,f=`${l}__label--hidden`,D=`${l}__label--required`,I=`${l}__validationText`;return{classProps:{root:o,input:{root:a(l,{[s]:e?.isDragAndDropSupported,[t]:e?.isDisabled,[p]:e?.isDragging,[d]:e?.validationState}),label:a(U,{[D]:e?.isRequired,[f]:e?.isLabelHidden}),input:b,dropLabel:r,helper:C,validationText:I,dropZone:{root:a(u,{[n]:e?.isDisabled,[i]:e?.isCompact}),content:c,label:_}}}}};exports.useFileUploadStyleProps=g;
|
|
2
2
|
//# sourceMappingURL=useFileUploadStyleProps.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFileUploadStyleProps.cjs","sources":["../../../src/components/UNSTABLE_FileUpload/useFileUploadStyleProps.ts"],"sourcesContent":["import classNames from 'classnames';\nimport { useClassNamePrefix } from '../../hooks';\nimport { type StyleProps, type Validation } from '../../types';\n\nexport interface FileUploadStyleProps extends StyleProps, Validation {\n isDisabled?: boolean;\n
|
|
1
|
+
{"version":3,"file":"useFileUploadStyleProps.cjs","sources":["../../../src/components/UNSTABLE_FileUpload/useFileUploadStyleProps.ts"],"sourcesContent":["import classNames from 'classnames';\nimport { useClassNamePrefix } from '../../hooks';\nimport { type StyleProps, type Validation } from '../../types';\n\nexport interface FileUploadStyleProps extends StyleProps, Validation {\n isDisabled?: boolean;\n isCompact?: boolean;\n isDragAndDropSupported?: boolean;\n isDragging?: boolean;\n isLabelHidden?: boolean;\n isRequired?: boolean;\n}\n\nexport interface FileUploadStyle {\n /** className props */\n classProps: {\n root: string;\n input: {\n root: string;\n label: string;\n input: string;\n dropLabel: string;\n helper: string;\n validationText: string;\n dropZone: {\n root: string;\n content: string;\n label: string;\n };\n };\n };\n}\n\nexport const useFileUploadStyleProps = (props?: FileUploadStyleProps): FileUploadStyle => {\n const fileUploadClass = useClassNamePrefix('UNSTABLE_FileUpload');\n const fileUploadHasDragAndDropClass = 'has-drag-and-drop';\n const fileUploadInputClass = `${fileUploadClass}Input`;\n const fileUploadInputDisabledClass = `${fileUploadInputClass}--disabled`;\n const fileUploadDropZoneDisabledClass = `${fileUploadInputClass}__dropZone--disabled`;\n const fileUploadDropZoneCompactClass = `${fileUploadInputClass}__dropZone--compact`;\n const fileUploadInputValidationClass = `${fileUploadInputClass}--${props?.validationState}`;\n const fileUploadInputDraggingClass = 'is-dragging';\n const fileUploadInputDropLabelClass = `${fileUploadInputClass}__dragAndDropLabel`;\n const fileUploadInputDropZoneClass = `${fileUploadInputClass}__dropZone`;\n const fileUploadInputDropZoneContentClass = `${fileUploadInputClass}__dropZoneContent`;\n const fileUploadInputDropZoneLabelClass = `${fileUploadInputClass}__dropZoneLabel`;\n const fileUploadInputHelperClass = `${fileUploadInputClass}__helperText`;\n const fileUploadInputInputClass = `${fileUploadInputClass}__input`;\n const fileUploadInputLabelClass = `${fileUploadInputClass}__label`;\n const fileUploadInputLabelHiddenClass = `${fileUploadInputClass}__label--hidden`;\n const fileUploadInputLabelRequiredClass = `${fileUploadInputClass}__label--required`;\n const fileUploadInputValidationTextClass = `${fileUploadInputClass}__validationText`;\n\n return {\n classProps: {\n root: fileUploadClass,\n input: {\n root: classNames(fileUploadInputClass, {\n [fileUploadHasDragAndDropClass]: props?.isDragAndDropSupported,\n [fileUploadInputDisabledClass]: props?.isDisabled,\n [fileUploadInputDraggingClass]: props?.isDragging,\n [fileUploadInputValidationClass]: props?.validationState,\n }),\n label: classNames(fileUploadInputLabelClass, {\n [fileUploadInputLabelRequiredClass]: props?.isRequired,\n [fileUploadInputLabelHiddenClass]: props?.isLabelHidden,\n }),\n input: fileUploadInputInputClass,\n dropLabel: fileUploadInputDropLabelClass,\n helper: fileUploadInputHelperClass,\n validationText: fileUploadInputValidationTextClass,\n dropZone: {\n root: classNames(fileUploadInputDropZoneClass, {\n [fileUploadDropZoneDisabledClass]: props?.isDisabled,\n [fileUploadDropZoneCompactClass]: props?.isCompact,\n }),\n content: fileUploadInputDropZoneContentClass,\n label: fileUploadInputDropZoneLabelClass,\n },\n },\n },\n };\n};\n"],"names":["useFileUploadStyleProps","props","fileUploadClass","useClassNamePrefix","fileUploadHasDragAndDropClass","fileUploadInputClass","fileUploadInputDisabledClass","fileUploadDropZoneDisabledClass","fileUploadDropZoneCompactClass","fileUploadInputValidationClass","fileUploadInputDraggingClass","fileUploadInputDropLabelClass","fileUploadInputDropZoneClass","fileUploadInputDropZoneContentClass","fileUploadInputDropZoneLabelClass","fileUploadInputHelperClass","fileUploadInputInputClass","fileUploadInputLabelClass","fileUploadInputLabelHiddenClass","fileUploadInputLabelRequiredClass","fileUploadInputValidationTextClass","classNames"],"mappings":"8JAiCaA,EAA2BC,GAAkD,CACxF,MAAMC,EAAkBC,EAAAA,mBAAmB,qBAAqB,EAC1DC,EAAgC,oBAChCC,EAAuB,GAAGH,CAAe,QACzCI,EAA+B,GAAGD,CAAoB,aACtDE,EAAkC,GAAGF,CAAoB,uBACzDG,EAAiC,GAAGH,CAAoB,sBACxDI,EAAiC,GAAGJ,CAAoB,KAAKJ,GAAO,eAAe,GACnFS,EAA+B,cAC/BC,EAAgC,GAAGN,CAAoB,qBACvDO,EAA+B,GAAGP,CAAoB,aACtDQ,EAAsC,GAAGR,CAAoB,oBAC7DS,EAAoC,GAAGT,CAAoB,kBAC3DU,EAA6B,GAAGV,CAAoB,eACpDW,EAA4B,GAAGX,CAAoB,UACnDY,EAA4B,GAAGZ,CAAoB,UACnDa,EAAkC,GAAGb,CAAoB,kBACzDc,EAAoC,GAAGd,CAAoB,oBAC3De,EAAqC,GAAGf,CAAoB,mBAElE,MAAO,CACL,WAAY,CACV,KAAMH,EACN,MAAO,CACL,KAAMmB,EAAWhB,EAAsB,CACrC,CAACD,CAA6B,EAAGH,GAAO,uBACxC,CAACK,CAA4B,EAAGL,GAAO,WACvC,CAACS,CAA4B,EAAGT,GAAO,WACvC,CAACQ,CAA8B,EAAGR,GAAO,eAAA,CAC1C,EACD,MAAOoB,EAAWJ,EAA2B,CAC3C,CAACE,CAAiC,EAAGlB,GAAO,WAC5C,CAACiB,CAA+B,EAAGjB,GAAO,aAAA,CAC3C,EACD,MAAOe,EACP,UAAWL,EACX,OAAQI,EACR,eAAgBK,EAChB,SAAU,CACR,KAAMC,EAAWT,EAA8B,CAC7C,CAACL,CAA+B,EAAGN,GAAO,WAC1C,CAACO,CAA8B,EAAGP,GAAO,SAAA,CAC1C,EACD,QAASY,EACT,MAAOC,CAAA,CACT,CACF,CACF,CAEJ"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { StyleProps, Validation } from '../../types';
|
|
2
2
|
export interface FileUploadStyleProps extends StyleProps, Validation {
|
|
3
3
|
isDisabled?: boolean;
|
|
4
|
+
isCompact?: boolean;
|
|
4
5
|
isDragAndDropSupported?: boolean;
|
|
5
6
|
isDragging?: boolean;
|
|
6
|
-
isFluid?: boolean;
|
|
7
7
|
isLabelHidden?: boolean;
|
|
8
8
|
isRequired?: boolean;
|
|
9
9
|
}
|
|
@@ -16,14 +16,13 @@ export interface FileUploadStyle {
|
|
|
16
16
|
input: string;
|
|
17
17
|
dropLabel: string;
|
|
18
18
|
helper: string;
|
|
19
|
-
link: string;
|
|
20
19
|
validationText: string;
|
|
21
20
|
dropZone: {
|
|
22
21
|
root: string;
|
|
22
|
+
content: string;
|
|
23
23
|
label: string;
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
-
list: string;
|
|
27
26
|
};
|
|
28
27
|
}
|
|
29
28
|
export declare const useFileUploadStyleProps: (props?: FileUploadStyleProps) => FileUploadStyle;
|
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
import e from "classnames";
|
|
2
|
-
import { useClassNamePrefix as
|
|
3
|
-
const
|
|
4
|
-
const
|
|
2
|
+
import { useClassNamePrefix as $ } from "../../hooks/useClassNamePrefix.js";
|
|
3
|
+
const L = (a) => {
|
|
4
|
+
const o = $("UNSTABLE_FileUpload"), s = "has-drag-and-drop", l = `${o}Input`, n = `${l}--disabled`, t = `${l}__dropZone--disabled`, i = `${l}__dropZone--compact`, d = `${l}--${a?.validationState}`, p = "is-dragging", r = `${l}__dragAndDropLabel`, c = `${l}__dropZone`, u = `${l}__dropZoneContent`, _ = `${l}__dropZoneLabel`, C = `${l}__helperText`, f = `${l}__input`, U = `${l}__label`, b = `${l}__label--hidden`, D = `${l}__label--required`, I = `${l}__validationText`;
|
|
5
5
|
return {
|
|
6
6
|
classProps: {
|
|
7
|
-
root:
|
|
7
|
+
root: o,
|
|
8
8
|
input: {
|
|
9
9
|
root: e(l, {
|
|
10
|
-
[
|
|
11
|
-
[
|
|
10
|
+
[s]: a?.isDragAndDropSupported,
|
|
11
|
+
[n]: a?.isDisabled,
|
|
12
12
|
[p]: a?.isDragging,
|
|
13
13
|
[d]: a?.validationState
|
|
14
14
|
}),
|
|
15
15
|
label: e(U, {
|
|
16
|
-
[
|
|
17
|
-
[
|
|
16
|
+
[D]: a?.isRequired,
|
|
17
|
+
[b]: a?.isLabelHidden
|
|
18
18
|
}),
|
|
19
19
|
input: f,
|
|
20
20
|
dropLabel: r,
|
|
21
|
-
helper:
|
|
22
|
-
|
|
23
|
-
validationText: $,
|
|
21
|
+
helper: C,
|
|
22
|
+
validationText: I,
|
|
24
23
|
dropZone: {
|
|
25
|
-
root:
|
|
26
|
-
|
|
24
|
+
root: e(c, {
|
|
25
|
+
[t]: a?.isDisabled,
|
|
26
|
+
[i]: a?.isCompact
|
|
27
|
+
}),
|
|
28
|
+
content: u,
|
|
29
|
+
label: _
|
|
27
30
|
}
|
|
28
|
-
}
|
|
29
|
-
list: g
|
|
31
|
+
}
|
|
30
32
|
}
|
|
31
33
|
};
|
|
32
34
|
};
|
|
33
35
|
export {
|
|
34
|
-
|
|
36
|
+
L as useFileUploadStyleProps
|
|
35
37
|
};
|
|
36
38
|
//# sourceMappingURL=useFileUploadStyleProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFileUploadStyleProps.js","sources":["../../../src/components/UNSTABLE_FileUpload/useFileUploadStyleProps.ts"],"sourcesContent":["import classNames from 'classnames';\nimport { useClassNamePrefix } from '../../hooks';\nimport { type StyleProps, type Validation } from '../../types';\n\nexport interface FileUploadStyleProps extends StyleProps, Validation {\n isDisabled?: boolean;\n
|
|
1
|
+
{"version":3,"file":"useFileUploadStyleProps.js","sources":["../../../src/components/UNSTABLE_FileUpload/useFileUploadStyleProps.ts"],"sourcesContent":["import classNames from 'classnames';\nimport { useClassNamePrefix } from '../../hooks';\nimport { type StyleProps, type Validation } from '../../types';\n\nexport interface FileUploadStyleProps extends StyleProps, Validation {\n isDisabled?: boolean;\n isCompact?: boolean;\n isDragAndDropSupported?: boolean;\n isDragging?: boolean;\n isLabelHidden?: boolean;\n isRequired?: boolean;\n}\n\nexport interface FileUploadStyle {\n /** className props */\n classProps: {\n root: string;\n input: {\n root: string;\n label: string;\n input: string;\n dropLabel: string;\n helper: string;\n validationText: string;\n dropZone: {\n root: string;\n content: string;\n label: string;\n };\n };\n };\n}\n\nexport const useFileUploadStyleProps = (props?: FileUploadStyleProps): FileUploadStyle => {\n const fileUploadClass = useClassNamePrefix('UNSTABLE_FileUpload');\n const fileUploadHasDragAndDropClass = 'has-drag-and-drop';\n const fileUploadInputClass = `${fileUploadClass}Input`;\n const fileUploadInputDisabledClass = `${fileUploadInputClass}--disabled`;\n const fileUploadDropZoneDisabledClass = `${fileUploadInputClass}__dropZone--disabled`;\n const fileUploadDropZoneCompactClass = `${fileUploadInputClass}__dropZone--compact`;\n const fileUploadInputValidationClass = `${fileUploadInputClass}--${props?.validationState}`;\n const fileUploadInputDraggingClass = 'is-dragging';\n const fileUploadInputDropLabelClass = `${fileUploadInputClass}__dragAndDropLabel`;\n const fileUploadInputDropZoneClass = `${fileUploadInputClass}__dropZone`;\n const fileUploadInputDropZoneContentClass = `${fileUploadInputClass}__dropZoneContent`;\n const fileUploadInputDropZoneLabelClass = `${fileUploadInputClass}__dropZoneLabel`;\n const fileUploadInputHelperClass = `${fileUploadInputClass}__helperText`;\n const fileUploadInputInputClass = `${fileUploadInputClass}__input`;\n const fileUploadInputLabelClass = `${fileUploadInputClass}__label`;\n const fileUploadInputLabelHiddenClass = `${fileUploadInputClass}__label--hidden`;\n const fileUploadInputLabelRequiredClass = `${fileUploadInputClass}__label--required`;\n const fileUploadInputValidationTextClass = `${fileUploadInputClass}__validationText`;\n\n return {\n classProps: {\n root: fileUploadClass,\n input: {\n root: classNames(fileUploadInputClass, {\n [fileUploadHasDragAndDropClass]: props?.isDragAndDropSupported,\n [fileUploadInputDisabledClass]: props?.isDisabled,\n [fileUploadInputDraggingClass]: props?.isDragging,\n [fileUploadInputValidationClass]: props?.validationState,\n }),\n label: classNames(fileUploadInputLabelClass, {\n [fileUploadInputLabelRequiredClass]: props?.isRequired,\n [fileUploadInputLabelHiddenClass]: props?.isLabelHidden,\n }),\n input: fileUploadInputInputClass,\n dropLabel: fileUploadInputDropLabelClass,\n helper: fileUploadInputHelperClass,\n validationText: fileUploadInputValidationTextClass,\n dropZone: {\n root: classNames(fileUploadInputDropZoneClass, {\n [fileUploadDropZoneDisabledClass]: props?.isDisabled,\n [fileUploadDropZoneCompactClass]: props?.isCompact,\n }),\n content: fileUploadInputDropZoneContentClass,\n label: fileUploadInputDropZoneLabelClass,\n },\n },\n },\n };\n};\n"],"names":["useFileUploadStyleProps","props","fileUploadClass","useClassNamePrefix","fileUploadHasDragAndDropClass","fileUploadInputClass","fileUploadInputDisabledClass","fileUploadDropZoneDisabledClass","fileUploadDropZoneCompactClass","fileUploadInputValidationClass","fileUploadInputDraggingClass","fileUploadInputDropLabelClass","fileUploadInputDropZoneClass","fileUploadInputDropZoneContentClass","fileUploadInputDropZoneLabelClass","fileUploadInputHelperClass","fileUploadInputInputClass","fileUploadInputLabelClass","fileUploadInputLabelHiddenClass","fileUploadInputLabelRequiredClass","fileUploadInputValidationTextClass","classNames"],"mappings":";;AAiCO,MAAMA,IAA0B,CAACC,MAAkD;AACxF,QAAMC,IAAkBC,EAAmB,qBAAqB,GAC1DC,IAAgC,qBAChCC,IAAuB,GAAGH,CAAe,SACzCI,IAA+B,GAAGD,CAAoB,cACtDE,IAAkC,GAAGF,CAAoB,wBACzDG,IAAiC,GAAGH,CAAoB,uBACxDI,IAAiC,GAAGJ,CAAoB,KAAKJ,GAAO,eAAe,IACnFS,IAA+B,eAC/BC,IAAgC,GAAGN,CAAoB,sBACvDO,IAA+B,GAAGP,CAAoB,cACtDQ,IAAsC,GAAGR,CAAoB,qBAC7DS,IAAoC,GAAGT,CAAoB,mBAC3DU,IAA6B,GAAGV,CAAoB,gBACpDW,IAA4B,GAAGX,CAAoB,WACnDY,IAA4B,GAAGZ,CAAoB,WACnDa,IAAkC,GAAGb,CAAoB,mBACzDc,IAAoC,GAAGd,CAAoB,qBAC3De,IAAqC,GAAGf,CAAoB;AAElE,SAAO;AAAA,IACL,YAAY;AAAA,MACV,MAAMH;AAAA,MACN,OAAO;AAAA,QACL,MAAMmB,EAAWhB,GAAsB;AAAA,UACrC,CAACD,CAA6B,GAAGH,GAAO;AAAA,UACxC,CAACK,CAA4B,GAAGL,GAAO;AAAA,UACvC,CAACS,CAA4B,GAAGT,GAAO;AAAA,UACvC,CAACQ,CAA8B,GAAGR,GAAO;AAAA,QAAA,CAC1C;AAAA,QACD,OAAOoB,EAAWJ,GAA2B;AAAA,UAC3C,CAACE,CAAiC,GAAGlB,GAAO;AAAA,UAC5C,CAACiB,CAA+B,GAAGjB,GAAO;AAAA,QAAA,CAC3C;AAAA,QACD,OAAOe;AAAA,QACP,WAAWL;AAAA,QACX,QAAQI;AAAA,QACR,gBAAgBK;AAAA,QAChB,UAAU;AAAA,UACR,MAAMC,EAAWT,GAA8B;AAAA,YAC7C,CAACL,CAA+B,GAAGN,GAAO;AAAA,YAC1C,CAACO,CAA8B,GAAGP,GAAO;AAAA,UAAA,CAC1C;AAAA,UACD,SAASY;AAAA,UACT,OAAOC;AAAA,QAAA;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("../../constants/dictionaries.cjs"),t=e.createContext({size:r.Sizes.MEDIUM}),i=t.Provider,o=()=>e.useContext(t);exports.PickerContextProvider=i;exports.usePickerContext=o;
|
|
2
|
+
//# sourceMappingURL=PickerContext.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PickerContext.cjs","sources":["../../../src/components/UNSTABLE_Picker/PickerContext.ts"],"sourcesContent":["'use client';\n\nimport { createContext, useContext } from 'react';\nimport { Sizes } from '../../constants';\nimport type { UnstablePickerContextType } from './types';\n\nconst PickerContext = createContext<UnstablePickerContextType>({ size: Sizes.MEDIUM });\n\nexport const PickerContextProvider = PickerContext.Provider;\n\nexport const usePickerContext = () => useContext(PickerContext);\n"],"names":["PickerContext","createContext","Sizes","PickerContextProvider","usePickerContext","useContext"],"mappings":"oKAMMA,EAAgBC,EAAAA,cAAyC,CAAE,KAAMC,EAAAA,MAAM,OAAQ,EAExEC,EAAwBH,EAAc,SAEtCI,EAAmB,IAAMC,EAAAA,WAAWL,CAAa"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useContext as t, createContext as o } from "react";
|
|
3
|
+
import { Sizes as r } from "../../constants/dictionaries.js";
|
|
4
|
+
const e = o({ size: r.MEDIUM }), c = e.Provider, n = () => t(e);
|
|
5
|
+
export {
|
|
6
|
+
c as PickerContextProvider,
|
|
7
|
+
n as usePickerContext
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=PickerContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PickerContext.js","sources":["../../../src/components/UNSTABLE_Picker/PickerContext.ts"],"sourcesContent":["'use client';\n\nimport { createContext, useContext } from 'react';\nimport { Sizes } from '../../constants';\nimport type { UnstablePickerContextType } from './types';\n\nconst PickerContext = createContext<UnstablePickerContextType>({ size: Sizes.MEDIUM });\n\nexport const PickerContextProvider = PickerContext.Provider;\n\nexport const usePickerContext = () => useContext(PickerContext);\n"],"names":["PickerContext","createContext","Sizes","PickerContextProvider","usePickerContext","useContext"],"mappings":";;;AAMA,MAAMA,IAAgBC,EAAyC,EAAE,MAAMC,EAAM,QAAQ,GAExEC,IAAwBH,EAAc,UAEtCI,IAAmB,MAAMC,EAAWL,CAAa;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),o=require("../../constants/selection.cjs"),r={id:"",isDisabled:!1,onSelectionChange:()=>{},selectedKeys:[],selectionMode:o.MULTIPLE_SELECTION_MODE},t=e.createContext(r),n=t.Provider,c=()=>e.useContext(t);exports.PickerPopoverContextProvider=n;exports.usePickerPopoverContext=c;
|
|
2
|
+
//# sourceMappingURL=PickerPopoverContext.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PickerPopoverContext.cjs","sources":["../../../src/components/UNSTABLE_Picker/PickerPopoverContext.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, useContext } from 'react';\nimport { MULTIPLE_SELECTION_MODE } from '../../constants';\nimport type { UnstablePickerPopoverContextValue } from './types';\n\nconst defaultContext: UnstablePickerPopoverContextValue = {\n id: '',\n isDisabled: false,\n onSelectionChange: () => {},\n selectedKeys: [],\n selectionMode: MULTIPLE_SELECTION_MODE,\n};\n\nconst PickerPopoverContext = createContext<UnstablePickerPopoverContextValue>(defaultContext);\n\nexport const PickerPopoverContextProvider = PickerPopoverContext.Provider;\n\nexport const usePickerPopoverContext = (): UnstablePickerPopoverContextValue => useContext(PickerPopoverContext);\n"],"names":["defaultContext","MULTIPLE_SELECTION_MODE","PickerPopoverContext","createContext","PickerPopoverContextProvider","usePickerPopoverContext","useContext"],"mappings":"iKAMMA,EAAoD,CACxD,GAAI,GACJ,WAAY,GACZ,kBAAmB,IAAM,CAAC,EAC1B,aAAc,CAAA,EACd,cAAeC,EAAAA,uBACjB,EAEMC,EAAuBC,EAAAA,cAAiDH,CAAc,EAE/EI,EAA+BF,EAAqB,SAEpDG,EAA0B,IAAyCC,EAAAA,WAAWJ,CAAoB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext as o, useContext as t } from "react";
|
|
3
|
+
import { MULTIPLE_SELECTION_MODE as r } from "../../constants/selection.js";
|
|
4
|
+
const n = {
|
|
5
|
+
id: "",
|
|
6
|
+
isDisabled: !1,
|
|
7
|
+
onSelectionChange: () => {
|
|
8
|
+
},
|
|
9
|
+
selectedKeys: [],
|
|
10
|
+
selectionMode: r
|
|
11
|
+
}, e = o(n), c = e.Provider, P = () => t(e);
|
|
12
|
+
export {
|
|
13
|
+
c as PickerPopoverContextProvider,
|
|
14
|
+
P as usePickerPopoverContext
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=PickerPopoverContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PickerPopoverContext.js","sources":["../../../src/components/UNSTABLE_Picker/PickerPopoverContext.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, useContext } from 'react';\nimport { MULTIPLE_SELECTION_MODE } from '../../constants';\nimport type { UnstablePickerPopoverContextValue } from './types';\n\nconst defaultContext: UnstablePickerPopoverContextValue = {\n id: '',\n isDisabled: false,\n onSelectionChange: () => {},\n selectedKeys: [],\n selectionMode: MULTIPLE_SELECTION_MODE,\n};\n\nconst PickerPopoverContext = createContext<UnstablePickerPopoverContextValue>(defaultContext);\n\nexport const PickerPopoverContextProvider = PickerPopoverContext.Provider;\n\nexport const usePickerPopoverContext = (): UnstablePickerPopoverContextValue => useContext(PickerPopoverContext);\n"],"names":["defaultContext","MULTIPLE_SELECTION_MODE","PickerPopoverContext","createContext","PickerPopoverContextProvider","usePickerPopoverContext","useContext"],"mappings":";;;AAMA,MAAMA,IAAoD;AAAA,EACxD,IAAI;AAAA,EACJ,YAAY;AAAA,EACZ,mBAAmB,MAAM;AAAA,EAAC;AAAA,EAC1B,cAAc,CAAA;AAAA,EACd,eAAeC;AACjB,GAEMC,IAAuBC,EAAiDH,CAAc,GAE/EI,IAA+BF,EAAqB,UAEpDG,IAA0B,MAAyCC,EAAWJ,CAAoB;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),ge=require("classnames"),r=require("react"),me=require("../../constants/selection.cjs"),Pe=require("../../hooks/styleProps.cjs"),be=require("../../hooks/useAriaIdRefs.cjs"),ve=require("../../hooks/useI18n.cjs"),B=require("../../hooks/useSelectionState.cjs"),U=require("../../translations/replaceTranslationParams.cjs"),xe=require("../Dropdown/Dropdown.cjs"),fe=require("../Dropdown/DropdownPopover.cjs"),Te=require("../Field/HelperText.cjs"),ye=require("../Field/Label.cjs"),ke=require("../Field/ValidationText.cjs"),Se=require("../Field/useValidationTextRole.cjs"),qe=require("../Icon/Icon.cjs"),he=require("../VisuallyHidden/VisuallyHidden.cjs"),Ie=require("./constants.cjs"),Le=require("./PickerContext.cjs"),Ae=require("./PickerPopoverContext.cjs"),w=require("./UNSTABLE_PickerTag.cjs"),Ne=require("./usePickerId.cjs"),Re=require("./usePickerPopoverTabOutToTrigger.cjs"),je=require("./usePickerSelectionGridKeyboard.cjs"),Ce=require("./usePickerStyleProps.cjs"),p=require("./utils.cjs"),Ee=(O,V)=>{const{t:n}=ve.useI18n(),{"aria-describedby":G="",addButtonLabel:F=n("picker.add"),children:x,closeButtonLabel:H=n("common.close"),emptySelectionLabel:q,helperText:$,id:z,isAggregated:f=!1,isDisabled:o=!1,isFluid:Z=!1,isLabelHidden:J=!1,isOpen:t,isRequired:Q=!1,label:i,onSelectionChange:c,onToggle:g,removeAllLabel:W=n("picker.removeAll"),renderTags:h,selectedKeys:d,selectionAriaLabel:X=n("picker.selectionAriaLabel"),selectionMode:u=me.MULTIPLE_SELECTION_MODE,size:I=Ie.DEFAULT_SIZE,tagDescriptionText:Y=n("picker.tagDescriptionText"),hasValidationIcon:ee,validationState:m,validationText:L,...re}=O,[te,A]=be.useAriaDescribedBy(G),se=Se.useValidationTextRole({validationState:m,validationText:L}),{classProps:s}=Ce.usePickerStyleProps({isDisabled:o,isFluid:Z,isLabelHidden:J,isRequired:Q,size:I,validationState:m}),{styleProps:N,props:oe}=Pe.useStyleProps(re),{labelId:R,pickerId:P,popoverId:j,selectionId:ie,tagDescriptionId:C}=Ne.usePickerId(z),E=r.useMemo(()=>p.collectPickerItems(x),[x]),_=r.useMemo(()=>p.getPickerItemLabelMap(E),[E]),b=r.useMemo(()=>B.getSelectedKeys(d,u),[d,u]),a=r.useMemo(()=>p.getSelectedItems(b,_),[b,_]),D=l=>B.isSingleSelectionMode(u)?c([]):c(d.filter(v=>v!==l)),ae=()=>c([]),K=r.useRef(null),M=r.useRef(null),T=r.useCallback(()=>{t&&(g(),Promise.resolve().then(()=>{M.current?.focus()}))},[t,g]),{onPopoverKeyDownCapture:le}=Re.usePickerPopoverTabOutToTrigger({isOpen:t,onClose:T}),ne=p.getPickerSelectionGridKeyboardRowCount(a.length,{isAggregated:f}),{getKeyboardGridRowProps:y,removeTagAtIndex:k}=je.usePickerSelectionGridKeyboard({isDisabled:o,isPopoverOpen:t,onRemoveAtIndex:l=>{f?ae():D(a[l].value)},selectionRef:K,tagCount:ne}),ce=q?U.replaceTranslationParams(q,{label:i}):i,de=p.getAggregatedTagLabel(i,a),ue=a.length?h?h({getKeyboardGridRowProps:y,onRemove:D,removeTagAtIndex:k}):f?e.jsx(w.default,{tagKeyboardProps:y(0),isDisabled:o,label:de,onRemove:()=>k(0),removeLabel:W}):a.map((l,v)=>e.jsx(w.default,{tagKeyboardProps:y(v),isDisabled:o,label:l.label,onRemove:()=>k(v)},l.value)):e.jsx("span",{"aria-hidden":"true",className:s.selectionEmpty,children:ce}),pe=r.useMemo(()=>({id:P,isDisabled:o,onSelectionChange:c,selectedKeys:b,selectionMode:u}),[b,o,c,P,u]);return r.useImperativeHandle(V,()=>({close:T,selectedKeys:d}),[T,d]),e.jsx(Le.PickerContextProvider,{value:{size:I,tagDescriptionId:C},children:e.jsxs("div",{...N,className:ge(s.root,N.className),...oe,children:[e.jsx(ye.default,{id:R,UNSAFE_className:s.label,elementType:"span",children:i}),e.jsxs(xe.default,{id:j,isOpen:t,onToggle:g,children:[e.jsxs("div",{role:"group","aria-label":i,className:s.inputContainer,children:[e.jsx("div",{ref:K,...te,id:ie,role:a.length?"grid":"group","aria-label":U.replaceTranslationParams(X,{label:i}),"aria-live":"off","aria-atomic":!1,"aria-relevant":"additions",className:s.selection,children:ue}),e.jsxs("button",{ref:M,type:"button",className:s.trigger,"aria-haspopup":"dialog","aria-expanded":t,"aria-controls":j,onClick:g,disabled:o,children:[e.jsx(he.default,{children:t?H:F}),e.jsx(qe.default,{name:`chevron-${t?"up":"down"}`,boxSize:20})]})]}),e.jsx(fe.default,{"aria-labelledby":R,role:"dialog","aria-modal":"true",onKeyDownCapture:le,children:e.jsx(Ae.PickerPopoverContextProvider,{value:pe,children:x})})]}),e.jsx(Te.default,{UNSAFE_className:s.helperText,id:`${P}-helper-text`,registerAria:A,helperText:$}),m&&e.jsx(ke.default,{UNSAFE_className:s.validationText,id:`${P}-validation-text`,...ee&&{hasValidationStateIcon:m},validationText:L,registerAria:A,role:se}),e.jsx("span",{id:C,hidden:!0,children:Y})]})})},S=r.forwardRef(Ee);S.spiritComponent="UNSTABLE_Picker";S.displayName="UNSTABLE_Picker";exports.default=S;
|
|
2
|
+
//# sourceMappingURL=UNSTABLE_Picker.cjs.map
|