@choco-vanille/ui 1.15.1 → 1.17.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/dist/components/_common/rotating-chevron/styles/RotatingChevron.css.cjs +1 -1
- package/dist/components/_common/rotating-chevron/styles/RotatingChevron.css.js +1 -1
- package/dist/components/actions/_shared/buttons/styles/buttonShared.css.cjs +1 -1
- package/dist/components/actions/_shared/buttons/styles/buttonShared.css.js +1 -1
- package/dist/components/actions/button/styles/Button.css.cjs +1 -1
- package/dist/components/actions/button/styles/Button.css.js +1 -1
- package/dist/components/actions/icon-button/styles/IconButton.css.cjs +1 -1
- package/dist/components/actions/icon-button/styles/IconButton.css.js +1 -1
- package/dist/components/actions/toggle/styles/Toggle.css.cjs +1 -1
- package/dist/components/actions/toggle/styles/Toggle.css.js +1 -1
- package/dist/components/actions/toggle-group/styles/ToggleGroup.css.cjs +1 -1
- package/dist/components/actions/toggle-group/styles/ToggleGroup.css.js +1 -1
- package/dist/components/data-display/avatar/components/avatar-fallback/styles/AvatarFallback.css.cjs +1 -1
- package/dist/components/data-display/avatar/components/avatar-fallback/styles/AvatarFallback.css.js +1 -1
- package/dist/components/data-display/avatar/components/avatar-image/styles/AvatarImage.css.cjs +1 -1
- package/dist/components/data-display/avatar/components/avatar-image/styles/AvatarImage.css.js +1 -1
- package/dist/components/data-display/avatar/components/avatar-root/styles/AvatarRoot.css.cjs +1 -1
- package/dist/components/data-display/avatar/components/avatar-root/styles/AvatarRoot.css.js +1 -1
- package/dist/components/data-display/avatar/components/avatar-status/styles/AvatarStatus.css.cjs +1 -1
- package/dist/components/data-display/avatar/components/avatar-status/styles/AvatarStatus.css.js +1 -1
- package/dist/components/data-display/badge/styles/Badge.css.cjs +1 -1
- package/dist/components/data-display/badge/styles/Badge.css.js +1 -1
- package/dist/components/data-display/rich-text-renderer/styles/RichTextRenderer.css.cjs +1 -1
- package/dist/components/data-display/rich-text-renderer/styles/RichTextRenderer.css.js +1 -1
- package/dist/components/data-display/status-badge/styles/StatusBadge.css.cjs +1 -1
- package/dist/components/data-display/status-badge/styles/StatusBadge.css.js +1 -1
- package/dist/components/data-display/table/components/table-body/styles/TableBody.css.cjs +1 -1
- package/dist/components/data-display/table/components/table-body/styles/TableBody.css.js +1 -1
- package/dist/components/data-display/table/components/table-caption/styles/TableCaption.css.cjs +1 -1
- package/dist/components/data-display/table/components/table-caption/styles/TableCaption.css.js +1 -1
- package/dist/components/data-display/table/components/table-cell/styles/TableCell.css.cjs +1 -1
- package/dist/components/data-display/table/components/table-cell/styles/TableCell.css.js +1 -1
- package/dist/components/data-display/table/components/table-footer/styles/TableFooter.css.cjs +1 -1
- package/dist/components/data-display/table/components/table-footer/styles/TableFooter.css.js +1 -1
- package/dist/components/data-display/table/components/table-head/styles/TableHead.css.cjs +1 -1
- package/dist/components/data-display/table/components/table-head/styles/TableHead.css.js +1 -1
- package/dist/components/data-display/table/components/table-header/styles/TableHeader.css.cjs +1 -1
- package/dist/components/data-display/table/components/table-header/styles/TableHeader.css.js +1 -1
- package/dist/components/data-display/table/styles/Table.css.cjs +1 -1
- package/dist/components/data-display/table/styles/Table.css.js +1 -1
- package/dist/components/feedback/callout/components/callout-icon/styles/CalloutIcon.css.cjs +1 -1
- package/dist/components/feedback/callout/components/callout-icon/styles/CalloutIcon.css.js +1 -1
- package/dist/components/feedback/callout/styles/Callout.css.cjs +1 -1
- package/dist/components/feedback/callout/styles/Callout.css.js +1 -1
- package/dist/components/feedback/empty-state/styles/EmptyState.css.cjs +1 -1
- package/dist/components/feedback/empty-state/styles/EmptyState.css.js +1 -1
- package/dist/components/feedback/progress/styles/Progress.css.cjs +1 -1
- package/dist/components/feedback/progress/styles/Progress.css.js +1 -1
- package/dist/components/feedback/skeleton/styles/Skeleton.css.cjs +1 -1
- package/dist/components/feedback/skeleton/styles/Skeleton.css.js +1 -1
- package/dist/components/feedback/spinner/styles/Spinner.css.cjs +1 -1
- package/dist/components/feedback/spinner/styles/Spinner.css.js +1 -1
- package/dist/components/feedback/toast/Toast.cjs +1 -1
- package/dist/components/feedback/toast/Toast.js +1 -1
- package/dist/components/feedback/toast/components/toast-actions/styles/ToastActions.css.cjs +1 -1
- package/dist/components/feedback/toast/components/toast-actions/styles/ToastActions.css.js +1 -1
- package/dist/components/feedback/toast/components/toast-close/styles/ToastClose.css.cjs +1 -1
- package/dist/components/feedback/toast/components/toast-close/styles/ToastClose.css.js +1 -1
- package/dist/components/feedback/toast/components/toast-description/styles/ToastDescription.css.cjs +1 -1
- package/dist/components/feedback/toast/components/toast-description/styles/ToastDescription.css.js +1 -1
- package/dist/components/feedback/toast/components/toast-icon/styles/ToastIcon.css.cjs +1 -1
- package/dist/components/feedback/toast/components/toast-icon/styles/ToastIcon.css.js +1 -1
- package/dist/components/feedback/toast/components/toast-title/styles/ToastTitle.css.cjs +1 -1
- package/dist/components/feedback/toast/components/toast-title/styles/ToastTitle.css.js +1 -1
- package/dist/components/feedback/toast/styles/Toast.css.cjs +1 -1
- package/dist/components/feedback/toast/styles/Toast.css.js +1 -1
- package/dist/components/forms/_shared/components/form-label/styles/FormLabel.css.cjs +1 -1
- package/dist/components/forms/_shared/components/form-label/styles/FormLabel.css.js +1 -1
- package/dist/components/forms/_shared/components/helper-text/HelperText.css.cjs +1 -1
- package/dist/components/forms/_shared/components/helper-text/HelperText.css.js +1 -1
- package/dist/components/forms/_shared/styles/checkboxVisual.css.cjs +1 -1
- package/dist/components/forms/_shared/styles/checkboxVisual.css.js +1 -1
- package/dist/components/forms/_shared/styles/radioVisual.css.cjs +1 -1
- package/dist/components/forms/_shared/styles/radioVisual.css.js +1 -1
- package/dist/components/forms/autocomplete/Autocomplete.cjs +1 -1
- package/dist/components/forms/autocomplete/Autocomplete.js +1 -1
- package/dist/components/forms/autocomplete/components/autocomplete-content/styles/AutocompleteContent.css.cjs +1 -1
- package/dist/components/forms/autocomplete/components/autocomplete-content/styles/AutocompleteContent.css.js +1 -1
- package/dist/components/forms/autocomplete/components/autocomplete-field/AutocompleteField.cjs +1 -1
- package/dist/components/forms/autocomplete/components/autocomplete-field/AutocompleteField.js +1 -1
- package/dist/components/forms/autocomplete/components/autocomplete-input/AutocompleteInput.cjs +1 -1
- package/dist/components/forms/autocomplete/components/autocomplete-input/AutocompleteInput.js +1 -1
- package/dist/components/forms/autocomplete/components/autocomplete-input/styles/AutocompleteInput.css.cjs +1 -1
- package/dist/components/forms/autocomplete/components/autocomplete-input/styles/AutocompleteInput.css.js +1 -1
- package/dist/components/forms/autocomplete/components/autocomplete-item/styles/AutocompleteItem.css.cjs +1 -1
- package/dist/components/forms/autocomplete/components/autocomplete-item/styles/AutocompleteItem.css.js +1 -1
- package/dist/components/forms/autocomplete/components/autocomplete-separator/styles/AutocompleteSeparator.css.cjs +1 -1
- package/dist/components/forms/autocomplete/components/autocomplete-separator/styles/AutocompleteSeparator.css.js +1 -1
- package/dist/components/forms/autocomplete/components/autocomplete-trigger/styles/AutocompleteTrigger.css.cjs +1 -1
- package/dist/components/forms/autocomplete/components/autocomplete-trigger/styles/AutocompleteTrigger.css.js +1 -1
- package/dist/components/forms/autocomplete/styles/Autocomplete.css.cjs +1 -1
- package/dist/components/forms/autocomplete/styles/Autocomplete.css.js +1 -1
- package/dist/components/forms/calendar/Calendar.cjs +1 -1
- package/dist/components/forms/calendar/Calendar.js +1 -1
- package/dist/components/forms/calendar/components/calendar-caption/styles/CalendarCaption.css.cjs +1 -1
- package/dist/components/forms/calendar/components/calendar-caption/styles/CalendarCaption.css.js +1 -1
- package/dist/components/forms/calendar/components/calendar-month-view/components/calendar-month-button/CalendarMonthButton.cjs +1 -1
- package/dist/components/forms/calendar/components/calendar-month-view/components/calendar-month-button/CalendarMonthButton.cjs.map +1 -1
- package/dist/components/forms/calendar/components/calendar-month-view/components/calendar-month-button/CalendarMonthButton.js +5 -1
- package/dist/components/forms/calendar/components/calendar-month-view/components/calendar-month-button/CalendarMonthButton.js.map +1 -1
- package/dist/components/forms/calendar/components/calendar-month-view/styles/CalendarMonthView.css.cjs +1 -1
- package/dist/components/forms/calendar/components/calendar-month-view/styles/CalendarMonthView.css.js +1 -1
- package/dist/components/forms/calendar/components/calendar-year-view/components/calendar-year-button/CalendarYearButton.cjs +1 -1
- package/dist/components/forms/calendar/components/calendar-year-view/components/calendar-year-button/CalendarYearButton.cjs.map +1 -1
- package/dist/components/forms/calendar/components/calendar-year-view/components/calendar-year-button/CalendarYearButton.js +5 -1
- package/dist/components/forms/calendar/components/calendar-year-view/components/calendar-year-button/CalendarYearButton.js.map +1 -1
- package/dist/components/forms/calendar/components/calendar-year-view/styles/CalendarYearView.css.cjs +1 -1
- package/dist/components/forms/calendar/components/calendar-year-view/styles/CalendarYearView.css.js +1 -1
- package/dist/components/forms/calendar/styles/calendarDayButton.css.cjs +1 -1
- package/dist/components/forms/calendar/styles/calendarDayButton.css.js +1 -1
- package/dist/components/forms/calendar/styles/calendarGrid.css.cjs +1 -1
- package/dist/components/forms/calendar/styles/calendarGrid.css.js +1 -1
- package/dist/components/forms/calendar/styles/calendarRoot.css.cjs +1 -1
- package/dist/components/forms/calendar/styles/calendarRoot.css.js +1 -1
- package/dist/components/forms/checkbox/styles/Checkbox.css.cjs +1 -1
- package/dist/components/forms/checkbox/styles/Checkbox.css.js +1 -1
- package/dist/components/forms/date-picker/DatePicker.cjs +1 -1
- package/dist/components/forms/date-picker/DatePicker.js +1 -1
- package/dist/components/forms/date-picker/styles/DatePicker.css.cjs +1 -1
- package/dist/components/forms/date-picker/styles/DatePicker.css.js +1 -1
- package/dist/components/forms/image-picker/ImagePicker.cjs +2 -0
- package/dist/components/forms/image-picker/ImagePicker.cjs.map +1 -0
- package/dist/components/forms/image-picker/ImagePicker.d.ts +33 -0
- package/dist/components/forms/image-picker/ImagePicker.js +198 -0
- package/dist/components/forms/image-picker/ImagePicker.js.map +1 -0
- package/dist/components/forms/image-picker/components/image-picker-actions/ImagePickerActions.cjs +2 -0
- package/dist/components/forms/image-picker/components/image-picker-actions/ImagePickerActions.cjs.map +1 -0
- package/dist/components/forms/image-picker/components/image-picker-actions/ImagePickerActions.d.ts +3 -0
- package/dist/components/forms/image-picker/components/image-picker-actions/ImagePickerActions.js +50 -0
- package/dist/components/forms/image-picker/components/image-picker-actions/ImagePickerActions.js.map +1 -0
- package/dist/components/forms/image-picker/components/image-picker-actions/types/ImagePickerActions.props.d.ts +10 -0
- package/dist/components/forms/image-picker/components/image-picker-crop-dialog/ImagePickerCropDialog.cjs +2 -0
- package/dist/components/forms/image-picker/components/image-picker-crop-dialog/ImagePickerCropDialog.cjs.map +1 -0
- package/dist/components/forms/image-picker/components/image-picker-crop-dialog/ImagePickerCropDialog.d.ts +9 -0
- package/dist/components/forms/image-picker/components/image-picker-crop-dialog/ImagePickerCropDialog.js +165 -0
- package/dist/components/forms/image-picker/components/image-picker-crop-dialog/ImagePickerCropDialog.js.map +1 -0
- package/dist/components/forms/image-picker/components/image-picker-crop-dialog/index.d.ts +1 -0
- package/dist/components/forms/image-picker/components/image-picker-crop-dialog/styles/ImagePickerCropDialog.css.cjs +2 -0
- package/dist/components/forms/image-picker/components/image-picker-crop-dialog/styles/ImagePickerCropDialog.css.cjs.map +1 -0
- package/dist/components/forms/image-picker/components/image-picker-crop-dialog/styles/ImagePickerCropDialog.css.d.ts +4 -0
- package/dist/components/forms/image-picker/components/image-picker-crop-dialog/styles/ImagePickerCropDialog.css.js +7 -0
- package/dist/components/forms/image-picker/components/image-picker-crop-dialog/styles/ImagePickerCropDialog.css.js.map +1 -0
- package/dist/components/forms/image-picker/components/image-picker-crop-dialog/types/ImagePickerCropDialog.props.d.ts +18 -0
- package/dist/components/forms/image-picker/components/image-picker-input/ImagePickerInput.cjs +2 -0
- package/dist/components/forms/image-picker/components/image-picker-input/ImagePickerInput.cjs.map +1 -0
- package/dist/components/forms/image-picker/components/image-picker-input/ImagePickerInput.d.ts +3 -0
- package/dist/components/forms/image-picker/components/image-picker-input/ImagePickerInput.js +34 -0
- package/dist/components/forms/image-picker/components/image-picker-input/ImagePickerInput.js.map +1 -0
- package/dist/components/forms/image-picker/components/image-picker-input/types/ImagePickerInput.props.d.ts +11 -0
- package/dist/components/forms/image-picker/components/image-picker-preview/ImagePickerPreview.cjs +2 -0
- package/dist/components/forms/image-picker/components/image-picker-preview/ImagePickerPreview.cjs.map +1 -0
- package/dist/components/forms/image-picker/components/image-picker-preview/ImagePickerPreview.d.ts +3 -0
- package/dist/components/forms/image-picker/components/image-picker-preview/ImagePickerPreview.js +136 -0
- package/dist/components/forms/image-picker/components/image-picker-preview/ImagePickerPreview.js.map +1 -0
- package/dist/components/forms/image-picker/components/image-picker-preview/types/ImagePickerPreview.props.d.ts +28 -0
- package/dist/components/forms/image-picker/components/image-picker-remove-button/ImagePickerRemoveButton.cjs +2 -0
- package/dist/components/forms/image-picker/components/image-picker-remove-button/ImagePickerRemoveButton.cjs.map +1 -0
- package/dist/components/forms/image-picker/components/image-picker-remove-button/ImagePickerRemoveButton.d.ts +3 -0
- package/dist/components/forms/image-picker/components/image-picker-remove-button/ImagePickerRemoveButton.js +30 -0
- package/dist/components/forms/image-picker/components/image-picker-remove-button/ImagePickerRemoveButton.js.map +1 -0
- package/dist/components/forms/image-picker/components/image-picker-remove-button/types/ImagePickerRemoveButton.props.d.ts +7 -0
- package/dist/components/forms/image-picker/components/index.d.ts +5 -0
- package/dist/components/forms/image-picker/constants/imagePickerDefaults.const.cjs +2 -0
- package/dist/components/forms/image-picker/constants/imagePickerDefaults.const.cjs.map +1 -0
- package/dist/components/forms/image-picker/constants/imagePickerDefaults.const.d.ts +4 -0
- package/dist/components/forms/image-picker/constants/imagePickerDefaults.const.js +24 -0
- package/dist/components/forms/image-picker/constants/imagePickerDefaults.const.js.map +1 -0
- package/dist/components/forms/image-picker/constants/imagePickerShapes.const.cjs +2 -0
- package/dist/components/forms/image-picker/constants/imagePickerShapes.const.cjs.map +1 -0
- package/dist/components/forms/image-picker/constants/imagePickerShapes.const.d.ts +6 -0
- package/dist/components/forms/image-picker/constants/imagePickerShapes.const.js +8 -0
- package/dist/components/forms/image-picker/constants/imagePickerShapes.const.js.map +1 -0
- package/dist/components/forms/image-picker/constants/index.d.ts +1 -0
- package/dist/components/forms/image-picker/hooks/types/index.d.ts +79 -0
- package/dist/components/forms/image-picker/hooks/useImagePicker.hook.cjs +2 -0
- package/dist/components/forms/image-picker/hooks/useImagePicker.hook.cjs.map +1 -0
- package/dist/components/forms/image-picker/hooks/useImagePicker.hook.d.ts +11 -0
- package/dist/components/forms/image-picker/hooks/useImagePicker.hook.js +132 -0
- package/dist/components/forms/image-picker/hooks/useImagePicker.hook.js.map +1 -0
- package/dist/components/forms/image-picker/hooks/useImagePickerCrop.hook.cjs +2 -0
- package/dist/components/forms/image-picker/hooks/useImagePickerCrop.hook.cjs.map +1 -0
- package/dist/components/forms/image-picker/hooks/useImagePickerCrop.hook.d.ts +8 -0
- package/dist/components/forms/image-picker/hooks/useImagePickerCrop.hook.js +69 -0
- package/dist/components/forms/image-picker/hooks/useImagePickerCrop.hook.js.map +1 -0
- package/dist/components/forms/image-picker/index.d.ts +4 -0
- package/dist/components/forms/image-picker/styles/ImagePicker.css.cjs +2 -0
- package/dist/components/forms/image-picker/styles/ImagePicker.css.cjs.map +1 -0
- package/dist/components/forms/image-picker/styles/ImagePicker.css.d.ts +47 -0
- package/dist/components/forms/image-picker/styles/ImagePicker.css.js +8 -0
- package/dist/components/forms/image-picker/styles/ImagePicker.css.js.map +1 -0
- package/dist/components/forms/image-picker/types/ImagePicker.props.d.ts +81 -0
- package/dist/components/forms/image-picker/types/ImagePicker.types.d.ts +50 -0
- package/dist/components/forms/image-picker/types/index.d.ts +2 -0
- package/dist/components/forms/image-picker/utils/imagePicker.utils.cjs +2 -0
- package/dist/components/forms/image-picker/utils/imagePicker.utils.cjs.map +1 -0
- package/dist/components/forms/image-picker/utils/imagePicker.utils.d.ts +62 -0
- package/dist/components/forms/image-picker/utils/imagePicker.utils.js +81 -0
- package/dist/components/forms/image-picker/utils/imagePicker.utils.js.map +1 -0
- package/dist/components/forms/index.d.ts +1 -0
- package/dist/components/forms/number-field/components/number-field-input/styles/NumberFieldInput.css.cjs +1 -1
- package/dist/components/forms/number-field/components/number-field-input/styles/NumberFieldInput.css.js +1 -1
- package/dist/components/forms/number-field/components/number-field-steppers/styles/NumberFieldSteppers.css.cjs +1 -1
- package/dist/components/forms/number-field/components/number-field-steppers/styles/NumberFieldSteppers.css.js +1 -1
- package/dist/components/forms/number-field/styles/NumberField.css.cjs +1 -1
- package/dist/components/forms/number-field/styles/NumberField.css.js +1 -1
- package/dist/components/forms/radio-group/components/radio-item/styles/RadioItem.css.cjs +1 -1
- package/dist/components/forms/radio-group/components/radio-item/styles/RadioItem.css.js +1 -1
- package/dist/components/forms/rich-text-editor/RichTextEditor.cjs +1 -1
- package/dist/components/forms/rich-text-editor/RichTextEditor.js +1 -1
- package/dist/components/forms/rich-text-editor/RichTextEditorField.cjs +1 -1
- package/dist/components/forms/rich-text-editor/RichTextEditorField.js +1 -1
- package/dist/components/forms/rich-text-editor/components/alignment-group/AlignmentGroup.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/alignment-group/AlignmentGroup.js +1 -1
- package/dist/components/forms/rich-text-editor/components/alignment-group/styles/AlignmentGroup.css.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/alignment-group/styles/AlignmentGroup.css.js +1 -1
- package/dist/components/forms/rich-text-editor/components/block-format-group/BlockFormatGroup.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/block-format-group/BlockFormatGroup.js +1 -1
- package/dist/components/forms/rich-text-editor/components/block-format-group/styles/BlockFormatGroup.css.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/block-format-group/styles/BlockFormatGroup.css.js +1 -1
- package/dist/components/forms/rich-text-editor/components/editor-field/EditorField.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/editor-field/EditorField.js +1 -1
- package/dist/components/forms/rich-text-editor/components/history-group/Redo.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/history-group/Redo.js +1 -1
- package/dist/components/forms/rich-text-editor/components/history-group/Undo.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/history-group/Undo.js +1 -1
- package/dist/components/forms/rich-text-editor/components/history-group/styles/HistoryGroup.css.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/history-group/styles/HistoryGroup.css.js +1 -1
- package/dist/components/forms/rich-text-editor/components/image-group/ImageGroup.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/image-group/ImageGroup.js +1 -1
- package/dist/components/forms/rich-text-editor/components/image-group/styles/ImageGroup.css.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/image-group/styles/ImageGroup.css.js +1 -1
- package/dist/components/forms/rich-text-editor/components/link-group/LinkGroup.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/link-group/LinkGroup.js +1 -1
- package/dist/components/forms/rich-text-editor/components/link-group/SetLink.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/link-group/SetLink.js +1 -1
- package/dist/components/forms/rich-text-editor/components/link-group/UnsetLink.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/link-group/UnsetLink.js +1 -1
- package/dist/components/forms/rich-text-editor/components/link-group/styles/LinkGroup.css.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/link-group/styles/LinkGroup.css.js +1 -1
- package/dist/components/forms/rich-text-editor/components/lists-group/ListsGroup.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/lists-group/ListsGroup.js +1 -1
- package/dist/components/forms/rich-text-editor/components/lists-group/styles/ListsGroup.css.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/lists-group/styles/ListsGroup.css.js +1 -1
- package/dist/components/forms/rich-text-editor/components/read-only-field/ReadOnlyField.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/read-only-field/ReadOnlyField.js +1 -1
- package/dist/components/forms/rich-text-editor/components/rich-text-editor-form-field/styles/RichTextEditorFormField.css.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/rich-text-editor-form-field/styles/RichTextEditorFormField.css.js +1 -1
- package/dist/components/forms/rich-text-editor/components/rich-text-editor-label/styles/RichTextEditorLabel.css.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/rich-text-editor-label/styles/RichTextEditorLabel.css.js +1 -1
- package/dist/components/forms/rich-text-editor/components/text-appearance-group/TextColorMenu.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/text-appearance-group/TextColorMenu.js +1 -1
- package/dist/components/forms/rich-text-editor/components/text-appearance-group/styles/TextAppearanceGroup.css.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/text-appearance-group/styles/TextAppearanceGroup.css.js +1 -1
- package/dist/components/forms/rich-text-editor/components/text-appearance-group/styles/TextColorMenu.css.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/text-appearance-group/styles/TextColorMenu.css.js +1 -1
- package/dist/components/forms/rich-text-editor/components/text-appearance-group/styles/TextSizeMenu.css.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/text-appearance-group/styles/TextSizeMenu.css.js +1 -1
- package/dist/components/forms/rich-text-editor/components/text-style-group/TextStyleAction.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/text-style-group/TextStyleAction.js +1 -1
- package/dist/components/forms/rich-text-editor/components/text-style-group/styles/TextStyleGroup.css.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/text-style-group/styles/TextStyleGroup.css.js +1 -1
- package/dist/components/forms/rich-text-editor/components/toolbar/styles/Toolbar.css.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/toolbar/styles/Toolbar.css.js +1 -1
- package/dist/components/forms/rich-text-editor/components/toolbar-group/styles/ToolbarGroup.css.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/toolbar-group/styles/ToolbarGroup.css.js +1 -1
- package/dist/components/forms/rich-text-editor/components/toolbar-separator/styles/ToolbarSeparator.css.cjs +1 -1
- package/dist/components/forms/rich-text-editor/components/toolbar-separator/styles/ToolbarSeparator.css.js +1 -1
- package/dist/components/forms/rich-text-editor/styles/RichTextEditor.css.cjs +1 -1
- package/dist/components/forms/rich-text-editor/styles/RichTextEditor.css.js +1 -1
- package/dist/components/forms/select/Select.cjs +1 -1
- package/dist/components/forms/select/Select.js +1 -1
- package/dist/components/forms/select/components/select-content/styles/SelectContent.css.cjs +1 -1
- package/dist/components/forms/select/components/select-content/styles/SelectContent.css.js +1 -1
- package/dist/components/forms/select/components/select-item/styles/SelectItem.css.cjs +1 -1
- package/dist/components/forms/select/components/select-item/styles/SelectItem.css.js +1 -1
- package/dist/components/forms/select/components/select-label/styles/SelectLabel.css.cjs +1 -1
- package/dist/components/forms/select/components/select-label/styles/SelectLabel.css.js +1 -1
- package/dist/components/forms/select/components/select-separator/styles/SelectSeparator.css.cjs +1 -1
- package/dist/components/forms/select/components/select-separator/styles/SelectSeparator.css.js +1 -1
- package/dist/components/forms/select/components/select-trigger/SelectTrigger.cjs +1 -1
- package/dist/components/forms/select/components/select-trigger/SelectTrigger.js +1 -1
- package/dist/components/forms/select/components/select-trigger/styles/SelectTrigger.css.cjs +1 -1
- package/dist/components/forms/select/components/select-trigger/styles/SelectTrigger.css.js +1 -1
- package/dist/components/forms/select/styles/Select.css.cjs +1 -1
- package/dist/components/forms/select/styles/Select.css.js +1 -1
- package/dist/components/forms/slider/components/slider-header/styles/SliderHeader.css.cjs +1 -1
- package/dist/components/forms/slider/components/slider-header/styles/SliderHeader.css.js +1 -1
- package/dist/components/forms/slider/components/slider-track/styles/SliderTrack.css.cjs +1 -1
- package/dist/components/forms/slider/components/slider-track/styles/SliderTrack.css.js +1 -1
- package/dist/components/forms/slider/styles/Slider.css.cjs +1 -1
- package/dist/components/forms/slider/styles/Slider.css.js +1 -1
- package/dist/components/forms/switch/styles/Switch.css.cjs +1 -1
- package/dist/components/forms/switch/styles/Switch.css.js +1 -1
- package/dist/components/forms/text-area/TextArea.cjs +1 -1
- package/dist/components/forms/text-area/TextArea.js +1 -1
- package/dist/components/forms/text-area/components/text-area-end-action/styles/TextAreaEndAction.css.cjs +1 -1
- package/dist/components/forms/text-area/components/text-area-end-action/styles/TextAreaEndAction.css.js +1 -1
- package/dist/components/forms/text-area/components/text-area-start-icon/styles/TextAreaStartIcon.css.cjs +1 -1
- package/dist/components/forms/text-area/components/text-area-start-icon/styles/TextAreaStartIcon.css.js +1 -1
- package/dist/components/forms/text-area/styles/TextArea.css.cjs +1 -1
- package/dist/components/forms/text-area/styles/TextArea.css.js +1 -1
- package/dist/components/forms/text-field/TextField.cjs +1 -1
- package/dist/components/forms/text-field/TextField.js +1 -1
- package/dist/components/forms/text-field/components/text-field-start-icon/styles/TextFieldStartIcon.css.cjs +1 -1
- package/dist/components/forms/text-field/components/text-field-start-icon/styles/TextFieldStartIcon.css.js +1 -1
- package/dist/components/forms/text-field/styles/TextField.css.cjs +1 -1
- package/dist/components/forms/text-field/styles/TextField.css.js +1 -1
- package/dist/components/foundation/icon/styles/Icon.css.cjs +1 -1
- package/dist/components/foundation/icon/styles/Icon.css.js +1 -1
- package/dist/components/foundation/typography/styles/Typography.css.cjs +1 -1
- package/dist/components/foundation/typography/styles/Typography.css.js +1 -1
- package/dist/components/layout/box/styles/Box.css.cjs +1 -1
- package/dist/components/layout/box/styles/Box.css.js +1 -1
- package/dist/components/layout/fieldset/styles/Fieldset.css.cjs +1 -1
- package/dist/components/layout/fieldset/styles/Fieldset.css.js +1 -1
- package/dist/components/layout/flex/styles/Flex.css.cjs +1 -1
- package/dist/components/layout/flex/styles/Flex.css.js +1 -1
- package/dist/components/layout/form/styles/Form.css.cjs +1 -1
- package/dist/components/layout/form/styles/Form.css.js +1 -1
- package/dist/components/layout/grid/styles/Grid.css.cjs +1 -1
- package/dist/components/layout/grid/styles/Grid.css.js +1 -1
- package/dist/components/layout/image/styles/Image.css.cjs +1 -1
- package/dist/components/layout/image/styles/Image.css.js +1 -1
- package/dist/components/layout/inset/styles/Inset.css.cjs +1 -1
- package/dist/components/layout/inset/styles/Inset.css.js +1 -1
- package/dist/components/layout/legend/styles/Legend.css.cjs +1 -1
- package/dist/components/layout/legend/styles/Legend.css.js +1 -1
- package/dist/components/layout/separator/styles/Separator.css.cjs +1 -1
- package/dist/components/layout/separator/styles/Separator.css.js +1 -1
- package/dist/components/layout/svg-image/styles/SvgImage.css.cjs +1 -1
- package/dist/components/layout/svg-image/styles/SvgImage.css.js +1 -1
- package/dist/components/navigation/bottom-navigation/BottomNavigation.cjs +2 -0
- package/dist/components/navigation/bottom-navigation/BottomNavigation.cjs.map +1 -0
- package/dist/components/navigation/bottom-navigation/BottomNavigation.d.ts +10 -0
- package/dist/components/navigation/bottom-navigation/BottomNavigation.js +56 -0
- package/dist/components/navigation/bottom-navigation/BottomNavigation.js.map +1 -0
- package/dist/components/navigation/bottom-navigation/components/bottom-navigation-item/BottomNavigationItem.cjs +2 -0
- package/dist/components/navigation/bottom-navigation/components/bottom-navigation-item/BottomNavigationItem.cjs.map +1 -0
- package/dist/components/navigation/bottom-navigation/components/bottom-navigation-item/BottomNavigationItem.d.ts +9 -0
- package/dist/components/navigation/bottom-navigation/components/bottom-navigation-item/BottomNavigationItem.js +95 -0
- package/dist/components/navigation/bottom-navigation/components/bottom-navigation-item/BottomNavigationItem.js.map +1 -0
- package/dist/components/navigation/bottom-navigation/components/bottom-navigation-item/index.d.ts +2 -0
- package/dist/components/navigation/bottom-navigation/components/bottom-navigation-item/types/BottomNavigationItem.props.d.ts +36 -0
- package/dist/components/navigation/bottom-navigation/components/bottom-navigation-list/BottomNavigationList.cjs +2 -0
- package/dist/components/navigation/bottom-navigation/components/bottom-navigation-list/BottomNavigationList.cjs.map +1 -0
- package/dist/components/navigation/bottom-navigation/components/bottom-navigation-list/BottomNavigationList.d.ts +8 -0
- package/dist/components/navigation/bottom-navigation/components/bottom-navigation-list/BottomNavigationList.js +27 -0
- package/dist/components/navigation/bottom-navigation/components/bottom-navigation-list/BottomNavigationList.js.map +1 -0
- package/dist/components/navigation/bottom-navigation/components/bottom-navigation-list/index.d.ts +2 -0
- package/dist/components/navigation/bottom-navigation/components/bottom-navigation-list/types/BottomNavigationList.props.d.ts +12 -0
- package/dist/components/navigation/bottom-navigation/context/BottomNavigation.context.cjs +2 -0
- package/dist/components/navigation/bottom-navigation/context/BottomNavigation.context.cjs.map +1 -0
- package/dist/components/navigation/bottom-navigation/context/BottomNavigation.context.d.ts +6 -0
- package/dist/components/navigation/bottom-navigation/context/BottomNavigation.context.js +6 -0
- package/dist/components/navigation/bottom-navigation/context/BottomNavigation.context.js.map +1 -0
- package/dist/components/navigation/bottom-navigation/index.d.ts +5 -0
- package/dist/components/navigation/bottom-navigation/styles/BottomNavigation.css.cjs +2 -0
- package/dist/components/navigation/bottom-navigation/styles/BottomNavigation.css.cjs.map +1 -0
- package/dist/components/navigation/bottom-navigation/styles/BottomNavigation.css.d.ts +9 -0
- package/dist/components/navigation/bottom-navigation/styles/BottomNavigation.css.js +7 -0
- package/dist/components/navigation/bottom-navigation/styles/BottomNavigation.css.js.map +1 -0
- package/dist/components/navigation/bottom-navigation/types/BottomNavigation.props.d.ts +15 -0
- package/dist/components/navigation/bottom-navigation/types/BottomNavigationCompound.d.ts +8 -0
- package/dist/components/navigation/bottom-navigation/types/index.d.ts +2 -0
- package/dist/components/navigation/breadcrumbs/styles/Breadcrumbs.css.cjs +1 -1
- package/dist/components/navigation/breadcrumbs/styles/Breadcrumbs.css.js +1 -1
- package/dist/components/navigation/index.d.ts +1 -0
- package/dist/components/navigation/link/styles/Link.css.cjs +1 -1
- package/dist/components/navigation/link/styles/Link.css.js +1 -1
- package/dist/components/navigation/pagination/styles/Pagination.css.cjs +1 -1
- package/dist/components/navigation/pagination/styles/Pagination.css.js +1 -1
- package/dist/components/navigation/step-indicator/components/step-indicator-item/styles/StepIndicatorItem.css.cjs +1 -1
- package/dist/components/navigation/step-indicator/components/step-indicator-item/styles/StepIndicatorItem.css.js +1 -1
- package/dist/components/navigation/step-indicator/styles/StepIndicator.css.cjs +1 -1
- package/dist/components/navigation/step-indicator/styles/StepIndicator.css.js +1 -1
- package/dist/components/navigation/stepper/styles/Stepper.css.cjs +1 -1
- package/dist/components/navigation/stepper/styles/Stepper.css.js +1 -1
- package/dist/components/navigation/tabs/components/tabs-content/styles/TabsContent.css.cjs +1 -1
- package/dist/components/navigation/tabs/components/tabs-content/styles/TabsContent.css.js +1 -1
- package/dist/components/navigation/tabs/components/tabs-list/styles/TabsList.css.cjs +1 -1
- package/dist/components/navigation/tabs/components/tabs-list/styles/TabsList.css.js +1 -1
- package/dist/components/navigation/tabs/components/tabs-trigger/styles/TabsTrigger.css.cjs +1 -1
- package/dist/components/navigation/tabs/components/tabs-trigger/styles/TabsTrigger.css.js +1 -1
- package/dist/components/overlay/_shared/styles/OverlayBackdrop.css.cjs +1 -1
- package/dist/components/overlay/_shared/styles/OverlayBackdrop.css.js +1 -1
- package/dist/components/overlay/alert-dialog/AlertDialog.cjs +1 -1
- package/dist/components/overlay/alert-dialog/AlertDialog.js +1 -1
- package/dist/components/overlay/alert-dialog/styles/AlertDialog.css.cjs +1 -1
- package/dist/components/overlay/alert-dialog/styles/AlertDialog.css.js +1 -1
- package/dist/components/overlay/command/components/command-empty/styles/CommandEmpty.css.cjs +1 -1
- package/dist/components/overlay/command/components/command-empty/styles/CommandEmpty.css.js +1 -1
- package/dist/components/overlay/command/components/command-group/styles/CommandGroup.css.cjs +1 -1
- package/dist/components/overlay/command/components/command-group/styles/CommandGroup.css.js +1 -1
- package/dist/components/overlay/command/components/command-input/styles/CommandInput.css.cjs +1 -1
- package/dist/components/overlay/command/components/command-input/styles/CommandInput.css.js +1 -1
- package/dist/components/overlay/command/components/command-item/styles/CommandItem.css.cjs +1 -1
- package/dist/components/overlay/command/components/command-item/styles/CommandItem.css.js +1 -1
- package/dist/components/overlay/command/components/command-list/styles/CommandList.css.cjs +1 -1
- package/dist/components/overlay/command/components/command-list/styles/CommandList.css.js +1 -1
- package/dist/components/overlay/command/components/command-separator/styles/CommandSeparator.css.cjs +1 -1
- package/dist/components/overlay/command/components/command-separator/styles/CommandSeparator.css.js +1 -1
- package/dist/components/overlay/command/styles/Command.css.cjs +1 -1
- package/dist/components/overlay/command/styles/Command.css.js +1 -1
- package/dist/components/overlay/context-menu/components/content/styles/ContextMenuContent.css.cjs +1 -1
- package/dist/components/overlay/context-menu/components/content/styles/ContextMenuContent.css.js +1 -1
- package/dist/components/overlay/dialog/components/dialog-header/styles/DialogHeader.css.cjs +1 -1
- package/dist/components/overlay/dialog/components/dialog-header/styles/DialogHeader.css.js +1 -1
- package/dist/components/overlay/dialog/styles/Dialog.css.cjs +1 -1
- package/dist/components/overlay/dialog/styles/Dialog.css.js +1 -1
- package/dist/components/overlay/drawer/components/items/_shared/components/drawer-item-content/DrawerItemContent.cjs +1 -1
- package/dist/components/overlay/drawer/components/items/_shared/components/drawer-item-content/DrawerItemContent.js +1 -1
- package/dist/components/overlay/drawer/components/items/drawer-action-item/DrawerActionItem.cjs +1 -1
- package/dist/components/overlay/drawer/components/items/drawer-action-item/DrawerActionItem.cjs.map +1 -1
- package/dist/components/overlay/drawer/components/items/drawer-action-item/DrawerActionItem.js +5 -1
- package/dist/components/overlay/drawer/components/items/drawer-action-item/DrawerActionItem.js.map +1 -1
- package/dist/components/overlay/drawer/components/items/drawer-nav-item/DrawerNavItem.cjs +1 -1
- package/dist/components/overlay/drawer/components/items/drawer-nav-item/DrawerNavItem.cjs.map +1 -1
- package/dist/components/overlay/drawer/components/items/drawer-nav-item/DrawerNavItem.js +5 -1
- package/dist/components/overlay/drawer/components/items/drawer-nav-item/DrawerNavItem.js.map +1 -1
- package/dist/components/overlay/drawer/components/items/drawer-section-item/DrawerSectionItem.cjs +1 -1
- package/dist/components/overlay/drawer/components/items/drawer-section-item/DrawerSectionItem.cjs.map +1 -1
- package/dist/components/overlay/drawer/components/items/drawer-section-item/DrawerSectionItem.js +5 -1
- package/dist/components/overlay/drawer/components/items/drawer-section-item/DrawerSectionItem.js.map +1 -1
- package/dist/components/overlay/drawer/components/items/drawer-section-item/styles/DrawerSectionItem.css.cjs +1 -1
- package/dist/components/overlay/drawer/components/items/drawer-section-item/styles/DrawerSectionItem.css.js +1 -1
- package/dist/components/overlay/drawer/components/variants/drawer-inline/styles/DrawerInline.css.cjs +1 -1
- package/dist/components/overlay/drawer/components/variants/drawer-inline/styles/DrawerInline.css.js +1 -1
- package/dist/components/overlay/drawer/components/variants/drawer-mini/styles/DrawerMini.css.cjs +1 -1
- package/dist/components/overlay/drawer/components/variants/drawer-mini/styles/DrawerMini.css.js +1 -1
- package/dist/components/overlay/drawer/styles/Drawer.css.cjs +1 -1
- package/dist/components/overlay/drawer/styles/Drawer.css.js +1 -1
- package/dist/components/overlay/dropdown-menu/components/_shared/item.css.cjs +1 -1
- package/dist/components/overlay/dropdown-menu/components/_shared/item.css.js +1 -1
- package/dist/components/overlay/dropdown-menu/components/content/styles/DropdownMenuContent.css.cjs +1 -1
- package/dist/components/overlay/dropdown-menu/components/content/styles/DropdownMenuContent.css.js +1 -1
- package/dist/components/overlay/dropdown-menu/components/label/styles/DropdownMenuLabel.css.cjs +1 -1
- package/dist/components/overlay/dropdown-menu/components/label/styles/DropdownMenuLabel.css.js +1 -1
- package/dist/components/overlay/dropdown-menu/components/separator/styles/DropdownMenuSeparator.css.cjs +1 -1
- package/dist/components/overlay/dropdown-menu/components/separator/styles/DropdownMenuSeparator.css.js +1 -1
- package/dist/components/overlay/dropdown-menu/components/shortcut/styles/DropdownMenuShortcut.css.cjs +1 -1
- package/dist/components/overlay/dropdown-menu/components/shortcut/styles/DropdownMenuShortcut.css.js +1 -1
- package/dist/components/overlay/dropdown-menu/components/sub/dropdown-menu-sub-content/styles/DropdownMenuSubContent.css.cjs +1 -1
- package/dist/components/overlay/dropdown-menu/components/sub/dropdown-menu-sub-content/styles/DropdownMenuSubContent.css.js +1 -1
- package/dist/components/overlay/dropdown-menu/components/sub/dropdown-menu-sub-trigger/styles/DropdownMenuSubTrigger.css.cjs +1 -1
- package/dist/components/overlay/dropdown-menu/components/sub/dropdown-menu-sub-trigger/styles/DropdownMenuSubTrigger.css.js +1 -1
- package/dist/components/overlay/panel/components/panel-header/styles/PanelHeader.css.cjs +1 -1
- package/dist/components/overlay/panel/components/panel-header/styles/PanelHeader.css.js +1 -1
- package/dist/components/overlay/panel/styles/Panel.css.cjs +1 -1
- package/dist/components/overlay/panel/styles/Panel.css.js +1 -1
- package/dist/components/overlay/popover/components/content/styles/PopoverContent.css.cjs +1 -1
- package/dist/components/overlay/popover/components/content/styles/PopoverContent.css.js +1 -1
- package/dist/components/overlay/popover/components/item/styles/PopoverItem.css.cjs +1 -1
- package/dist/components/overlay/popover/components/item/styles/PopoverItem.css.js +1 -1
- package/dist/components/overlay/tooltip/styles/Tooltip.css.cjs +1 -1
- package/dist/components/overlay/tooltip/styles/Tooltip.css.js +1 -1
- package/dist/components/surfaces/accordion/components/accordion-content/styles/AccordionContent.css.cjs +1 -1
- package/dist/components/surfaces/accordion/components/accordion-content/styles/AccordionContent.css.js +1 -1
- package/dist/components/surfaces/accordion/components/accordion-item/styles/AccordionItem.css.cjs +1 -1
- package/dist/components/surfaces/accordion/components/accordion-item/styles/AccordionItem.css.js +1 -1
- package/dist/components/surfaces/accordion/components/accordion-trigger/AccordionTrigger.cjs +1 -1
- package/dist/components/surfaces/accordion/components/accordion-trigger/AccordionTrigger.js +1 -1
- package/dist/components/surfaces/accordion/components/accordion-trigger/styles/AccordionTrigger.css.cjs +1 -1
- package/dist/components/surfaces/accordion/components/accordion-trigger/styles/AccordionTrigger.css.js +1 -1
- package/dist/components/surfaces/accordion/styles/Accordion.css.cjs +1 -1
- package/dist/components/surfaces/accordion/styles/Accordion.css.js +1 -1
- package/dist/components/surfaces/card/components/card-header/styles/CardHeader.css.cjs +1 -1
- package/dist/components/surfaces/card/components/card-header/styles/CardHeader.css.js +1 -1
- package/dist/components/surfaces/card/styles/Card.css.cjs +1 -1
- package/dist/components/surfaces/card/styles/Card.css.js +1 -1
- package/dist/components/surfaces/collapsible/components/collapsible-panel/styles/CollapsiblePanel.css.cjs +1 -1
- package/dist/components/surfaces/collapsible/components/collapsible-panel/styles/CollapsiblePanel.css.js +1 -1
- package/dist/components/surfaces/collapsible/components/collapsible-trigger/CollapsibleTrigger.cjs +1 -1
- package/dist/components/surfaces/collapsible/components/collapsible-trigger/CollapsibleTrigger.js +1 -1
- package/dist/components/surfaces/collapsible/components/collapsible-trigger/styles/CollapsibleTrigger.css.cjs +1 -1
- package/dist/components/surfaces/collapsible/components/collapsible-trigger/styles/CollapsibleTrigger.css.js +1 -1
- package/dist/components/surfaces/collapsible/styles/Collapsible.css.cjs +1 -1
- package/dist/components/surfaces/collapsible/styles/Collapsible.css.js +1 -1
- package/dist/components/theme-provider/ThemeProvider.cjs +1 -1
- package/dist/components/theme-provider/ThemeProvider.js +1 -1
- package/dist/constants/animations/fade/fadeIn.css.cjs +1 -1
- package/dist/constants/animations/fade/fadeIn.css.js +1 -1
- package/dist/constants/animations/fade/fadeOut.css.cjs +1 -1
- package/dist/constants/animations/fade/fadeOut.css.js +1 -1
- package/dist/constants/animations/pulse/pulseAnimation.css.cjs +1 -1
- package/dist/constants/animations/pulse/pulseAnimation.css.js +1 -1
- package/dist/constants/animations/slide/slideDownIn.css.cjs +1 -1
- package/dist/constants/animations/slide/slideDownIn.css.js +1 -1
- package/dist/constants/animations/slide/slideDownOut.css.cjs +1 -1
- package/dist/constants/animations/slide/slideDownOut.css.js +1 -1
- package/dist/constants/animations/slide/slideLeftIn.css.cjs +1 -1
- package/dist/constants/animations/slide/slideLeftIn.css.js +1 -1
- package/dist/constants/animations/slide/slideLeftOut.css.cjs +1 -1
- package/dist/constants/animations/slide/slideLeftOut.css.js +1 -1
- package/dist/constants/animations/slide/slideRightIn.css.cjs +1 -1
- package/dist/constants/animations/slide/slideRightIn.css.js +1 -1
- package/dist/constants/animations/slide/slideRightOut.css.cjs +1 -1
- package/dist/constants/animations/slide/slideRightOut.css.js +1 -1
- package/dist/constants/animations/slide/slideUpIn.css.cjs +1 -1
- package/dist/constants/animations/slide/slideUpIn.css.js +1 -1
- package/dist/constants/animations/slide/slideUpOut.css.cjs +1 -1
- package/dist/constants/animations/slide/slideUpOut.css.js +1 -1
- package/dist/constants/animations/spin/spinAnimation.css.cjs +1 -1
- package/dist/constants/animations/spin/spinAnimation.css.js +1 -1
- package/dist/hooks/use-notification/useNotification.hook.cjs +1 -1
- package/dist/hooks/use-notification/useNotification.hook.js +1 -1
- package/dist/hooks/use-toast/useToast.hook.cjs +1 -1
- package/dist/hooks/use-toast/useToast.hook.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +278 -270
- package/dist/index.js.map +1 -1
- package/dist/styles.css +144 -138
- package/dist/ui-kit10.css +1 -1
- package/dist/ui-kit100.css +1 -1
- package/dist/ui-kit101.css +1 -1
- package/dist/ui-kit103.css +1 -1
- package/dist/ui-kit104.css +1 -1
- package/dist/ui-kit105.css +1 -1
- package/dist/ui-kit106.css +1 -1
- package/dist/ui-kit107.css +1 -1
- package/dist/ui-kit108.css +1 -1
- package/dist/ui-kit109.css +1 -1
- package/dist/ui-kit11.css +1 -1
- package/dist/ui-kit110.css +1 -1
- package/dist/ui-kit111.css +1 -1
- package/dist/ui-kit112.css +1 -1
- package/dist/ui-kit113.css +1 -1
- package/dist/ui-kit114.css +1 -1
- package/dist/ui-kit115.css +1 -1
- package/dist/ui-kit117.css +1 -1
- package/dist/ui-kit118.css +1 -1
- package/dist/ui-kit119.css +1 -1
- package/dist/ui-kit12.css +1 -1
- package/dist/ui-kit120.css +1 -1
- package/dist/ui-kit121.css +1 -1
- package/dist/ui-kit122.css +1 -1
- package/dist/ui-kit123.css +1 -1
- package/dist/ui-kit124.css +1 -1
- package/dist/ui-kit125.css +1 -1
- package/dist/ui-kit126.css +1 -1
- package/dist/ui-kit127.css +1 -1
- package/dist/ui-kit128.css +1 -1
- package/dist/ui-kit129.css +1 -1
- package/dist/ui-kit13.css +1 -1
- package/dist/ui-kit130.css +1 -1
- package/dist/ui-kit131.css +1 -1
- package/dist/ui-kit132.css +1 -1
- package/dist/ui-kit133.css +1 -1
- package/dist/ui-kit134.css +1 -1
- package/dist/ui-kit135.css +1 -1
- package/dist/ui-kit136.css +1 -1
- package/dist/ui-kit137.css +1 -1
- package/dist/ui-kit138.css +1 -1
- package/dist/ui-kit139.css +1 -1
- package/dist/ui-kit14.css +1 -1
- package/dist/ui-kit140.css +1 -1
- package/dist/ui-kit141.css +1 -1
- package/dist/ui-kit142.css +1 -1
- package/dist/ui-kit144.css +1 -1
- package/dist/ui-kit145.css +1 -1
- package/dist/ui-kit146.css +1 -1
- package/dist/ui-kit147.css +1 -1
- package/dist/ui-kit148.css +1 -1
- package/dist/ui-kit149.css +1 -1
- package/dist/ui-kit15.css +1 -1
- package/dist/ui-kit150.css +1 -1
- package/dist/ui-kit151.css +1 -1
- package/dist/ui-kit152.css +1 -1
- package/dist/ui-kit153.css +1 -1
- package/dist/ui-kit154.css +1 -1
- package/dist/ui-kit155.css +1 -1
- package/dist/ui-kit156.css +1 -1
- package/dist/ui-kit157.css +1 -1
- package/dist/ui-kit158.css +1 -1
- package/dist/ui-kit159.css +1 -1
- package/dist/ui-kit16.css +1 -1
- package/dist/ui-kit160.css +1 -0
- package/dist/ui-kit161.css +1 -0
- package/dist/ui-kit162.css +1 -0
- package/dist/ui-kit17.css +1 -1
- package/dist/ui-kit18.css +1 -1
- package/dist/ui-kit19.css +1 -1
- package/dist/ui-kit20.css +1 -1
- package/dist/ui-kit21.css +1 -1
- package/dist/ui-kit22.css +1 -1
- package/dist/ui-kit23.css +1 -1
- package/dist/ui-kit24.css +1 -1
- package/dist/ui-kit25.css +1 -1
- package/dist/ui-kit26.css +1 -1
- package/dist/ui-kit27.css +1 -1
- package/dist/ui-kit28.css +1 -1
- package/dist/ui-kit29.css +1 -1
- package/dist/ui-kit3.css +1 -1
- package/dist/ui-kit30.css +1 -1
- package/dist/ui-kit31.css +1 -1
- package/dist/ui-kit32.css +1 -1
- package/dist/ui-kit33.css +1 -1
- package/dist/ui-kit34.css +1 -1
- package/dist/ui-kit35.css +1 -1
- package/dist/ui-kit36.css +1 -1
- package/dist/ui-kit37.css +1 -1
- package/dist/ui-kit38.css +1 -1
- package/dist/ui-kit39.css +1 -1
- package/dist/ui-kit4.css +1 -1
- package/dist/ui-kit40.css +1 -1
- package/dist/ui-kit41.css +1 -1
- package/dist/ui-kit42.css +1 -1
- package/dist/ui-kit43.css +1 -1
- package/dist/ui-kit44.css +1 -1
- package/dist/ui-kit45.css +1 -1
- package/dist/ui-kit46.css +1 -1
- package/dist/ui-kit47.css +1 -1
- package/dist/ui-kit48.css +1 -1
- package/dist/ui-kit49.css +1 -1
- package/dist/ui-kit5.css +1 -1
- package/dist/ui-kit50.css +1 -1
- package/dist/ui-kit51.css +1 -1
- package/dist/ui-kit52.css +1 -1
- package/dist/ui-kit53.css +1 -1
- package/dist/ui-kit54.css +1 -1
- package/dist/ui-kit55.css +1 -1
- package/dist/ui-kit57.css +1 -1
- package/dist/ui-kit58.css +1 -1
- package/dist/ui-kit59.css +1 -1
- package/dist/ui-kit6.css +1 -1
- package/dist/ui-kit60.css +1 -1
- package/dist/ui-kit61.css +1 -1
- package/dist/ui-kit62.css +1 -1
- package/dist/ui-kit63.css +1 -1
- package/dist/ui-kit64.css +1 -1
- package/dist/ui-kit65.css +1 -1
- package/dist/ui-kit66.css +1 -1
- package/dist/ui-kit67.css +1 -1
- package/dist/ui-kit68.css +1 -1
- package/dist/ui-kit69.css +1 -1
- package/dist/ui-kit7.css +1 -1
- package/dist/ui-kit70.css +1 -1
- package/dist/ui-kit71.css +1 -1
- package/dist/ui-kit72.css +1 -1
- package/dist/ui-kit73.css +1 -1
- package/dist/ui-kit74.css +1 -1
- package/dist/ui-kit75.css +1 -1
- package/dist/ui-kit76.css +1 -1
- package/dist/ui-kit77.css +1 -1
- package/dist/ui-kit78.css +1 -1
- package/dist/ui-kit79.css +1 -1
- package/dist/ui-kit8.css +1 -1
- package/dist/ui-kit80.css +1 -1
- package/dist/ui-kit81.css +1 -1
- package/dist/ui-kit82.css +1 -1
- package/dist/ui-kit83.css +1 -1
- package/dist/ui-kit84.css +1 -1
- package/dist/ui-kit85.css +1 -1
- package/dist/ui-kit86.css +1 -1
- package/dist/ui-kit87.css +1 -1
- package/dist/ui-kit89.css +1 -1
- package/dist/ui-kit9.css +1 -1
- package/dist/ui-kit90.css +1 -1
- package/dist/ui-kit91.css +1 -1
- package/dist/ui-kit92.css +1 -1
- package/dist/ui-kit93.css +1 -1
- package/dist/ui-kit94.css +1 -1
- package/dist/ui-kit95.css +1 -1
- package/dist/ui-kit96.css +1 -1
- package/dist/ui-kit97.css +1 -1
- package/dist/ui-kit98.css +1 -1
- package/dist/ui-kit99.css +1 -1
- package/package.json +120 -119
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { IMAGE_PICKER_STYLES as I } from "../../styles/ImagePicker.css.js";
|
|
3
|
+
import { memo as f } from "react";
|
|
4
|
+
const s = f(({
|
|
5
|
+
accept: e,
|
|
6
|
+
capture: m,
|
|
7
|
+
disabled: r,
|
|
8
|
+
id: t,
|
|
9
|
+
inputRef: i,
|
|
10
|
+
name: p,
|
|
11
|
+
onChange: a,
|
|
12
|
+
required: o
|
|
13
|
+
}) => /* @__PURE__ */ n(
|
|
14
|
+
"input",
|
|
15
|
+
{
|
|
16
|
+
ref: i,
|
|
17
|
+
id: t,
|
|
18
|
+
className: I.input,
|
|
19
|
+
type: "file",
|
|
20
|
+
accept: e,
|
|
21
|
+
capture: m,
|
|
22
|
+
name: p,
|
|
23
|
+
required: o,
|
|
24
|
+
disabled: r,
|
|
25
|
+
tabIndex: -1,
|
|
26
|
+
"aria-hidden": "true",
|
|
27
|
+
onChange: a
|
|
28
|
+
}
|
|
29
|
+
));
|
|
30
|
+
s.displayName = "ImagePicker.Input";
|
|
31
|
+
export {
|
|
32
|
+
s as ImagePickerInput
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=ImagePickerInput.js.map
|
package/dist/components/forms/image-picker/components/image-picker-input/ImagePickerInput.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImagePickerInput.js","sources":["../../../../../../src/components/forms/image-picker/components/image-picker-input/ImagePickerInput.tsx"],"sourcesContent":["import { IMAGE_PICKER_STYLES } from '@components/forms/image-picker/styles/ImagePicker.css.ts'\r\nimport type { ImagePickerInputProps } from '@components/forms/image-picker/components/image-picker-input/types/ImagePickerInput.props.ts'\r\nimport { memo } from 'react'\r\n\r\nexport const ImagePickerInput = memo<ImagePickerInputProps>(({\r\n accept,\r\n capture,\r\n disabled,\r\n id,\r\n inputRef,\r\n name,\r\n onChange,\r\n required,\r\n}: ImagePickerInputProps) => (\r\n <input\r\n ref={inputRef}\r\n id={id}\r\n className={IMAGE_PICKER_STYLES.input}\r\n type={'file'}\r\n accept={accept}\r\n capture={capture}\r\n name={name}\r\n required={required}\r\n disabled={disabled}\r\n tabIndex={-1}\r\n aria-hidden={'true'}\r\n onChange={onChange}\r\n />\r\n))\r\n\r\nImagePickerInput.displayName = 'ImagePicker.Input'\r\n"],"names":["ImagePickerInput","memo","accept","capture","disabled","id","inputRef","name","onChange","required","jsx","IMAGE_PICKER_STYLES"],"mappings":";;;AAIO,MAAMA,IAAmBC,EAA4B,CAAC;AAAA,EACzD,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AACJ,MACI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACG,KAAKJ;AAAA,IACL,IAAAD;AAAA,IACA,WAAWM,EAAoB;AAAA,IAC/B,MAAM;AAAA,IACN,QAAAT;AAAA,IACA,SAAAC;AAAA,IACA,MAAAI;AAAA,IACA,UAAAE;AAAA,IACA,UAAAL;AAAA,IACA,UAAU;AAAA,IACV,eAAa;AAAA,IACb,UAAAI;AAAA,EAAA;AACJ,CACH;AAEDR,EAAiB,cAAc;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChangeEvent, InputHTMLAttributes, RefObject } from 'react';
|
|
2
|
+
export type ImagePickerInputProps = {
|
|
3
|
+
accept: string;
|
|
4
|
+
capture?: InputHTMLAttributes<HTMLInputElement>['capture'];
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
id: string;
|
|
7
|
+
inputRef: RefObject<HTMLInputElement | null>;
|
|
8
|
+
name?: string;
|
|
9
|
+
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
10
|
+
required: boolean;
|
|
11
|
+
};
|
package/dist/components/forms/image-picker/components/image-picker-preview/ImagePickerPreview.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("../../../../foundation/icon/Icon.cjs");require("../../../../foundation/icon/styles/Icon.css.cjs");const d=require("../../../../foundation/typography/Typography.cjs");require("../../../../foundation/typography/styles/Typography.css.cjs");const A=require("../../../../layout/image/Image.cjs");require("../../../../layout/image/styles/Image.css.cjs");const C=require("../../constants/imagePickerShapes.const.cjs"),r=require("../../styles/ImagePicker.css.cjs"),G=require("../../../../../resources/asset/ImagePlusIcon.svg.cjs"),K=require("../../../../../resources/asset/UploadIcon.svg.cjs"),N=require("react"),l=N.memo(({actionId:m,actionLabel:c,alt:I,ariaDescribedBy:u,ariaInvalid:E,ariaLabel:S,ariaLabelledBy:g,aspectRatio:P,disabled:t,emptyLabel:_,hasError:p,hasValue:s,height:y,icon:x=G,isDragging:h,isMobile:a,objectFit:v,onClick:q,onDragLeave:T,onDragOver:j,onDrop:R,previewUrl:n,shape:i})=>e.jsxs("button",{type:"button",className:r.IMAGE_PICKER_STYLES.preview({shape:i}),style:i===C.IMAGE_PICKER_SHAPES.circle?void 0:{height:y,aspectRatio:P},"aria-label":S,"aria-labelledby":g,"aria-describedby":u,"aria-invalid":E,onClick:q,onDragOver:a?void 0:j,onDragLeave:a?void 0:T,onDrop:a?void 0:R,disabled:t,"data-disabled":t?"true":"false","data-dragging":h?"true":"false","data-has-error":p?"true":"false","data-has-value":s?"true":"false","data-shape":i,children:[e.jsx("span",{id:m,className:r.IMAGE_PICKER_STYLES.visuallyHidden,children:c}),n?e.jsx(A,{src:n,alt:I,objectFit:v,className:r.IMAGE_PICKER_STYLES.image,width:"100%",height:"100%"}):e.jsxs("span",{className:r.IMAGE_PICKER_STYLES.empty,children:[e.jsx(o,{icon:x,size:"xl",color:"primary",className:r.IMAGE_PICKER_STYLES.emptyIcon}),!s&&e.jsx(d,{as:"span",fontSize:"sm",color:"textSecondary",className:r.IMAGE_PICKER_STYLES.emptyText,"aria-hidden":"true",children:_})]}),!a&&s&&e.jsxs("span",{className:r.IMAGE_PICKER_STYLES.scrim,"aria-hidden":"true",children:[e.jsx(o,{icon:K,size:"lg"}),e.jsx(d,{as:"span",fontSize:"sm",fontWeight:"medium",color:"primaryForeground",className:r.IMAGE_PICKER_STYLES.scrimText,children:c})]})]}));l.displayName="ImagePicker.Preview";exports.ImagePickerPreview=l;
|
|
2
|
+
//# sourceMappingURL=ImagePickerPreview.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImagePickerPreview.cjs","sources":["../../../../../../src/components/forms/image-picker/components/image-picker-preview/ImagePickerPreview.tsx"],"sourcesContent":["import { Icon } from '@components/foundation/icon'\r\nimport { Typography } from '@components/foundation/typography'\r\nimport { Image } from '@components/layout/image'\r\nimport { IMAGE_PICKER_SHAPES } from '@components/forms/image-picker/constants'\r\nimport type { ImagePickerPreviewProps } from '@components/forms/image-picker/components/image-picker-preview/types/ImagePickerPreview.props.ts'\r\nimport { IMAGE_PICKER_STYLES } from '@components/forms/image-picker/styles/ImagePicker.css.ts'\r\nimport ImagePlusIcon from '@resources/asset/ImagePlusIcon.svg?react'\r\nimport UploadIcon from '@resources/asset/UploadIcon.svg?react'\r\nimport { memo } from 'react'\r\n\r\nexport const ImagePickerPreview = memo<ImagePickerPreviewProps>(({\r\n actionId,\r\n actionLabel,\r\n alt,\r\n ariaDescribedBy,\r\n ariaInvalid,\r\n ariaLabel,\r\n ariaLabelledBy,\r\n aspectRatio,\r\n disabled,\r\n emptyLabel,\r\n hasError,\r\n hasValue,\r\n height,\r\n icon = ImagePlusIcon,\r\n isDragging,\r\n isMobile,\r\n objectFit,\r\n onClick,\r\n onDragLeave,\r\n onDragOver,\r\n onDrop,\r\n previewUrl,\r\n shape,\r\n}) => (\r\n // The preview button is the accessible field control and owns validation state.\r\n // eslint-disable-next-line jsx-a11y/role-supports-aria-props\r\n <button\r\n type={'button'}\r\n className={IMAGE_PICKER_STYLES.preview({ shape })}\r\n style={shape === IMAGE_PICKER_SHAPES.circle ? undefined : { height, aspectRatio }}\r\n aria-label={ariaLabel}\r\n aria-labelledby={ariaLabelledBy}\r\n aria-describedby={ariaDescribedBy}\r\n aria-invalid={ariaInvalid}\r\n onClick={onClick}\r\n onDragOver={isMobile ? undefined : onDragOver}\r\n onDragLeave={isMobile ? undefined : onDragLeave}\r\n onDrop={isMobile ? undefined : onDrop}\r\n disabled={disabled}\r\n data-disabled={disabled ? 'true' : 'false'}\r\n data-dragging={isDragging ? 'true' : 'false'}\r\n data-has-error={hasError ? 'true' : 'false'}\r\n data-has-value={hasValue ? 'true' : 'false'}\r\n data-shape={shape}\r\n >\r\n <span\r\n id={actionId}\r\n className={IMAGE_PICKER_STYLES.visuallyHidden}\r\n >\r\n {actionLabel}\r\n </span>\r\n {previewUrl ? (\r\n <Image\r\n src={previewUrl}\r\n alt={alt}\r\n objectFit={objectFit}\r\n className={IMAGE_PICKER_STYLES.image}\r\n width={'100%'}\r\n height={'100%'}\r\n />\r\n ) : (\r\n <span className={IMAGE_PICKER_STYLES.empty}>\r\n <Icon\r\n icon={icon}\r\n size={'xl'}\r\n color={'primary'}\r\n className={IMAGE_PICKER_STYLES.emptyIcon}\r\n />\r\n {!hasValue && (\r\n <Typography\r\n as={'span'}\r\n fontSize={'sm'}\r\n color={'textSecondary'}\r\n className={IMAGE_PICKER_STYLES.emptyText}\r\n aria-hidden={'true'}\r\n >\r\n {emptyLabel}\r\n </Typography>\r\n )}\r\n </span>\r\n )}\r\n {!isMobile && hasValue && (\r\n <span\r\n className={IMAGE_PICKER_STYLES.scrim}\r\n aria-hidden={'true'}\r\n >\r\n <Icon\r\n icon={UploadIcon}\r\n size={'lg'}\r\n />\r\n <Typography\r\n as={'span'}\r\n fontSize={'sm'}\r\n fontWeight={'medium'}\r\n color={'primaryForeground'}\r\n className={IMAGE_PICKER_STYLES.scrimText}\r\n >\r\n {actionLabel}\r\n </Typography>\r\n </span>\r\n )}\r\n </button>\r\n))\r\n\r\nImagePickerPreview.displayName = 'ImagePicker.Preview'\r\n"],"names":["ImagePickerPreview","memo","actionId","actionLabel","alt","ariaDescribedBy","ariaInvalid","ariaLabel","ariaLabelledBy","aspectRatio","disabled","emptyLabel","hasError","hasValue","height","icon","ImagePlusIcon","isDragging","isMobile","objectFit","onClick","onDragLeave","onDragOver","onDrop","previewUrl","shape","jsxs","IMAGE_PICKER_STYLES","IMAGE_PICKER_SHAPES","jsx","Image","Icon","Typography","UploadIcon"],"mappings":"6tBAUaA,EAAqBC,EAAAA,KAA8B,CAAC,CAC7D,SAAAC,EACA,YAAAC,EACA,IAAAC,EACA,gBAAAC,EACA,YAAAC,EACA,UAAAC,EACA,eAAAC,EACA,YAAAC,EACA,SAAAC,EACA,WAAAC,EACA,SAAAC,EACA,SAAAC,EACA,OAAAC,EACA,KAAAC,EAAOC,EACP,WAAAC,EACA,SAAAC,EACA,UAAAC,EACA,QAAAC,EACA,YAAAC,EACA,WAAAC,EACA,OAAAC,EACA,WAAAC,EACA,MAAAC,CACJ,IAGIC,EAAAA,KAAC,SAAA,CACG,KAAM,SACN,UAAWC,EAAAA,oBAAoB,QAAQ,CAAE,MAAAF,EAAO,EAChD,MAAOA,IAAUG,sBAAoB,OAAS,OAAY,CAAE,OAAAd,EAAQ,YAAAL,CAAA,EACpE,aAAYF,EACZ,kBAAiBC,EACjB,mBAAkBH,EAClB,eAAcC,EACd,QAAAc,EACA,WAAYF,EAAW,OAAYI,EACnC,YAAaJ,EAAW,OAAYG,EACpC,OAAQH,EAAW,OAAYK,EAC/B,SAAAb,EACA,gBAAeA,EAAW,OAAS,QACnC,gBAAeO,EAAa,OAAS,QACrC,iBAAgBL,EAAW,OAAS,QACpC,iBAAgBC,EAAW,OAAS,QACpC,aAAYY,EAEZ,SAAA,CAAAI,EAAAA,IAAC,OAAA,CACG,GAAI3B,EACJ,UAAWyB,EAAAA,oBAAoB,eAE9B,SAAAxB,CAAA,CAAA,EAEJqB,EACGK,EAAAA,IAACC,EAAA,CACG,IAAKN,EACL,IAAApB,EACA,UAAAe,EACA,UAAWQ,EAAAA,oBAAoB,MAC/B,MAAO,OACP,OAAQ,MAAA,CAAA,EAGZD,EAAAA,KAAC,OAAA,CAAK,UAAWC,EAAAA,oBAAoB,MACjC,SAAA,CAAAE,EAAAA,IAACE,EAAA,CACG,KAAAhB,EACA,KAAM,KACN,MAAO,UACP,UAAWY,EAAAA,oBAAoB,SAAA,CAAA,EAElC,CAACd,GACEgB,EAAAA,IAACG,EAAA,CACG,GAAI,OACJ,SAAU,KACV,MAAO,gBACP,UAAWL,EAAAA,oBAAoB,UAC/B,cAAa,OAEZ,SAAAhB,CAAA,CAAA,CACL,EAER,EAEH,CAACO,GAAYL,GACVa,EAAAA,KAAC,OAAA,CACG,UAAWC,EAAAA,oBAAoB,MAC/B,cAAa,OAEb,SAAA,CAAAE,EAAAA,IAACE,EAAA,CACG,KAAME,EACN,KAAM,IAAA,CAAA,EAEVJ,EAAAA,IAACG,EAAA,CACG,GAAI,OACJ,SAAU,KACV,WAAY,SACZ,MAAO,oBACP,UAAWL,EAAAA,oBAAoB,UAE9B,SAAAxB,CAAA,CAAA,CACL,CAAA,CAAA,CACJ,CAAA,CAAA,CAGX,EAEDH,EAAmB,YAAc"}
|
package/dist/components/forms/image-picker/components/image-picker-preview/ImagePickerPreview.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { jsxs as m, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import c from "../../../../foundation/icon/Icon.js";
|
|
3
|
+
import "../../../../foundation/icon/styles/Icon.css.js";
|
|
4
|
+
import n from "../../../../foundation/typography/Typography.js";
|
|
5
|
+
import "../../../../foundation/typography/styles/Typography.css.js";
|
|
6
|
+
import b from "../../../../layout/image/Image.js";
|
|
7
|
+
import "../../../../layout/image/styles/Image.css.js";
|
|
8
|
+
import { IMAGE_PICKER_SHAPES as w } from "../../constants/imagePickerShapes.const.js";
|
|
9
|
+
import { IMAGE_PICKER_STYLES as r } from "../../styles/ImagePicker.css.js";
|
|
10
|
+
import A from "../../../../../resources/asset/ImagePlusIcon.svg.js";
|
|
11
|
+
import D from "../../../../../resources/asset/UploadIcon.svg.js";
|
|
12
|
+
import { memo as j } from "react";
|
|
13
|
+
const k = j(({
|
|
14
|
+
actionId: l,
|
|
15
|
+
actionLabel: t,
|
|
16
|
+
alt: p,
|
|
17
|
+
ariaDescribedBy: g,
|
|
18
|
+
ariaInvalid: f,
|
|
19
|
+
ariaLabel: y,
|
|
20
|
+
ariaLabelledBy: v,
|
|
21
|
+
aspectRatio: h,
|
|
22
|
+
disabled: s,
|
|
23
|
+
emptyLabel: I,
|
|
24
|
+
hasError: u,
|
|
25
|
+
hasValue: i,
|
|
26
|
+
height: N,
|
|
27
|
+
icon: S = A,
|
|
28
|
+
isDragging: P,
|
|
29
|
+
isMobile: e,
|
|
30
|
+
objectFit: x,
|
|
31
|
+
onClick: E,
|
|
32
|
+
onDragLeave: z,
|
|
33
|
+
onDragOver: T,
|
|
34
|
+
onDrop: _,
|
|
35
|
+
previewUrl: d,
|
|
36
|
+
shape: o
|
|
37
|
+
}) => (
|
|
38
|
+
// The preview button is the accessible field control and owns validation state.
|
|
39
|
+
// eslint-disable-next-line jsx-a11y/role-supports-aria-props
|
|
40
|
+
/* @__PURE__ */ m(
|
|
41
|
+
"button",
|
|
42
|
+
{
|
|
43
|
+
type: "button",
|
|
44
|
+
className: r.preview({ shape: o }),
|
|
45
|
+
style: o === w.circle ? void 0 : { height: N, aspectRatio: h },
|
|
46
|
+
"aria-label": y,
|
|
47
|
+
"aria-labelledby": v,
|
|
48
|
+
"aria-describedby": g,
|
|
49
|
+
"aria-invalid": f,
|
|
50
|
+
onClick: E,
|
|
51
|
+
onDragOver: e ? void 0 : T,
|
|
52
|
+
onDragLeave: e ? void 0 : z,
|
|
53
|
+
onDrop: e ? void 0 : _,
|
|
54
|
+
disabled: s,
|
|
55
|
+
"data-disabled": s ? "true" : "false",
|
|
56
|
+
"data-dragging": P ? "true" : "false",
|
|
57
|
+
"data-has-error": u ? "true" : "false",
|
|
58
|
+
"data-has-value": i ? "true" : "false",
|
|
59
|
+
"data-shape": o,
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ a(
|
|
62
|
+
"span",
|
|
63
|
+
{
|
|
64
|
+
id: l,
|
|
65
|
+
className: r.visuallyHidden,
|
|
66
|
+
children: t
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
d ? /* @__PURE__ */ a(
|
|
70
|
+
b,
|
|
71
|
+
{
|
|
72
|
+
src: d,
|
|
73
|
+
alt: p,
|
|
74
|
+
objectFit: x,
|
|
75
|
+
className: r.image,
|
|
76
|
+
width: "100%",
|
|
77
|
+
height: "100%"
|
|
78
|
+
}
|
|
79
|
+
) : /* @__PURE__ */ m("span", { className: r.empty, children: [
|
|
80
|
+
/* @__PURE__ */ a(
|
|
81
|
+
c,
|
|
82
|
+
{
|
|
83
|
+
icon: S,
|
|
84
|
+
size: "xl",
|
|
85
|
+
color: "primary",
|
|
86
|
+
className: r.emptyIcon
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
!i && /* @__PURE__ */ a(
|
|
90
|
+
n,
|
|
91
|
+
{
|
|
92
|
+
as: "span",
|
|
93
|
+
fontSize: "sm",
|
|
94
|
+
color: "textSecondary",
|
|
95
|
+
className: r.emptyText,
|
|
96
|
+
"aria-hidden": "true",
|
|
97
|
+
children: I
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
] }),
|
|
101
|
+
!e && i && /* @__PURE__ */ m(
|
|
102
|
+
"span",
|
|
103
|
+
{
|
|
104
|
+
className: r.scrim,
|
|
105
|
+
"aria-hidden": "true",
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ a(
|
|
108
|
+
c,
|
|
109
|
+
{
|
|
110
|
+
icon: D,
|
|
111
|
+
size: "lg"
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
/* @__PURE__ */ a(
|
|
115
|
+
n,
|
|
116
|
+
{
|
|
117
|
+
as: "span",
|
|
118
|
+
fontSize: "sm",
|
|
119
|
+
fontWeight: "medium",
|
|
120
|
+
color: "primaryForeground",
|
|
121
|
+
className: r.scrimText,
|
|
122
|
+
children: t
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
));
|
|
132
|
+
k.displayName = "ImagePicker.Preview";
|
|
133
|
+
export {
|
|
134
|
+
k as ImagePickerPreview
|
|
135
|
+
};
|
|
136
|
+
//# sourceMappingURL=ImagePickerPreview.js.map
|
package/dist/components/forms/image-picker/components/image-picker-preview/ImagePickerPreview.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImagePickerPreview.js","sources":["../../../../../../src/components/forms/image-picker/components/image-picker-preview/ImagePickerPreview.tsx"],"sourcesContent":["import { Icon } from '@components/foundation/icon'\r\nimport { Typography } from '@components/foundation/typography'\r\nimport { Image } from '@components/layout/image'\r\nimport { IMAGE_PICKER_SHAPES } from '@components/forms/image-picker/constants'\r\nimport type { ImagePickerPreviewProps } from '@components/forms/image-picker/components/image-picker-preview/types/ImagePickerPreview.props.ts'\r\nimport { IMAGE_PICKER_STYLES } from '@components/forms/image-picker/styles/ImagePicker.css.ts'\r\nimport ImagePlusIcon from '@resources/asset/ImagePlusIcon.svg?react'\r\nimport UploadIcon from '@resources/asset/UploadIcon.svg?react'\r\nimport { memo } from 'react'\r\n\r\nexport const ImagePickerPreview = memo<ImagePickerPreviewProps>(({\r\n actionId,\r\n actionLabel,\r\n alt,\r\n ariaDescribedBy,\r\n ariaInvalid,\r\n ariaLabel,\r\n ariaLabelledBy,\r\n aspectRatio,\r\n disabled,\r\n emptyLabel,\r\n hasError,\r\n hasValue,\r\n height,\r\n icon = ImagePlusIcon,\r\n isDragging,\r\n isMobile,\r\n objectFit,\r\n onClick,\r\n onDragLeave,\r\n onDragOver,\r\n onDrop,\r\n previewUrl,\r\n shape,\r\n}) => (\r\n // The preview button is the accessible field control and owns validation state.\r\n // eslint-disable-next-line jsx-a11y/role-supports-aria-props\r\n <button\r\n type={'button'}\r\n className={IMAGE_PICKER_STYLES.preview({ shape })}\r\n style={shape === IMAGE_PICKER_SHAPES.circle ? undefined : { height, aspectRatio }}\r\n aria-label={ariaLabel}\r\n aria-labelledby={ariaLabelledBy}\r\n aria-describedby={ariaDescribedBy}\r\n aria-invalid={ariaInvalid}\r\n onClick={onClick}\r\n onDragOver={isMobile ? undefined : onDragOver}\r\n onDragLeave={isMobile ? undefined : onDragLeave}\r\n onDrop={isMobile ? undefined : onDrop}\r\n disabled={disabled}\r\n data-disabled={disabled ? 'true' : 'false'}\r\n data-dragging={isDragging ? 'true' : 'false'}\r\n data-has-error={hasError ? 'true' : 'false'}\r\n data-has-value={hasValue ? 'true' : 'false'}\r\n data-shape={shape}\r\n >\r\n <span\r\n id={actionId}\r\n className={IMAGE_PICKER_STYLES.visuallyHidden}\r\n >\r\n {actionLabel}\r\n </span>\r\n {previewUrl ? (\r\n <Image\r\n src={previewUrl}\r\n alt={alt}\r\n objectFit={objectFit}\r\n className={IMAGE_PICKER_STYLES.image}\r\n width={'100%'}\r\n height={'100%'}\r\n />\r\n ) : (\r\n <span className={IMAGE_PICKER_STYLES.empty}>\r\n <Icon\r\n icon={icon}\r\n size={'xl'}\r\n color={'primary'}\r\n className={IMAGE_PICKER_STYLES.emptyIcon}\r\n />\r\n {!hasValue && (\r\n <Typography\r\n as={'span'}\r\n fontSize={'sm'}\r\n color={'textSecondary'}\r\n className={IMAGE_PICKER_STYLES.emptyText}\r\n aria-hidden={'true'}\r\n >\r\n {emptyLabel}\r\n </Typography>\r\n )}\r\n </span>\r\n )}\r\n {!isMobile && hasValue && (\r\n <span\r\n className={IMAGE_PICKER_STYLES.scrim}\r\n aria-hidden={'true'}\r\n >\r\n <Icon\r\n icon={UploadIcon}\r\n size={'lg'}\r\n />\r\n <Typography\r\n as={'span'}\r\n fontSize={'sm'}\r\n fontWeight={'medium'}\r\n color={'primaryForeground'}\r\n className={IMAGE_PICKER_STYLES.scrimText}\r\n >\r\n {actionLabel}\r\n </Typography>\r\n </span>\r\n )}\r\n </button>\r\n))\r\n\r\nImagePickerPreview.displayName = 'ImagePicker.Preview'\r\n"],"names":["ImagePickerPreview","memo","actionId","actionLabel","alt","ariaDescribedBy","ariaInvalid","ariaLabel","ariaLabelledBy","aspectRatio","disabled","emptyLabel","hasError","hasValue","height","icon","ImagePlusIcon","isDragging","isMobile","objectFit","onClick","onDragLeave","onDragOver","onDrop","previewUrl","shape","jsxs","IMAGE_PICKER_STYLES","IMAGE_PICKER_SHAPES","jsx","Image","Icon","Typography","UploadIcon"],"mappings":";;;;;;;;;;;;AAUO,MAAMA,IAAqBC,EAA8B,CAAC;AAAA,EAC7D,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,KAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC,IAAOC;AAAAA,EACP,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,QAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AACJ;AAAA;AAAA;AAAA,EAGI,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,MAAM;AAAA,MACN,WAAWC,EAAoB,QAAQ,EAAE,OAAAF,GAAO;AAAA,MAChD,OAAOA,MAAUG,EAAoB,SAAS,SAAY,EAAE,QAAAd,GAAQ,aAAAL,EAAA;AAAA,MACpE,cAAYF;AAAA,MACZ,mBAAiBC;AAAA,MACjB,oBAAkBH;AAAA,MAClB,gBAAcC;AAAA,MACd,SAAAc;AAAA,MACA,YAAYF,IAAW,SAAYI;AAAA,MACnC,aAAaJ,IAAW,SAAYG;AAAA,MACpC,QAAQH,IAAW,SAAYK;AAAA,MAC/B,UAAAb;AAAA,MACA,iBAAeA,IAAW,SAAS;AAAA,MACnC,iBAAeO,IAAa,SAAS;AAAA,MACrC,kBAAgBL,IAAW,SAAS;AAAA,MACpC,kBAAgBC,IAAW,SAAS;AAAA,MACpC,cAAYY;AAAA,MAEZ,UAAA;AAAA,QAAA,gBAAAI;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,IAAI3B;AAAA,YACJ,WAAWyB,EAAoB;AAAA,YAE9B,UAAAxB;AAAA,UAAA;AAAA,QAAA;AAAA,QAEJqB,IACG,gBAAAK;AAAA,UAACC;AAAA,UAAA;AAAA,YACG,KAAKN;AAAA,YACL,KAAApB;AAAA,YACA,WAAAe;AAAA,YACA,WAAWQ,EAAoB;AAAA,YAC/B,OAAO;AAAA,YACP,QAAQ;AAAA,UAAA;AAAA,QAAA,IAGZ,gBAAAD,EAAC,QAAA,EAAK,WAAWC,EAAoB,OACjC,UAAA;AAAA,UAAA,gBAAAE;AAAA,YAACE;AAAA,YAAA;AAAA,cACG,MAAAhB;AAAA,cACA,MAAM;AAAA,cACN,OAAO;AAAA,cACP,WAAWY,EAAoB;AAAA,YAAA;AAAA,UAAA;AAAA,UAElC,CAACd,KACE,gBAAAgB;AAAA,YAACG;AAAA,YAAA;AAAA,cACG,IAAI;AAAA,cACJ,UAAU;AAAA,cACV,OAAO;AAAA,cACP,WAAWL,EAAoB;AAAA,cAC/B,eAAa;AAAA,cAEZ,UAAAhB;AAAA,YAAA;AAAA,UAAA;AAAA,QACL,GAER;AAAA,QAEH,CAACO,KAAYL,KACV,gBAAAa;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,WAAWC,EAAoB;AAAA,YAC/B,eAAa;AAAA,YAEb,UAAA;AAAA,cAAA,gBAAAE;AAAA,gBAACE;AAAA,gBAAA;AAAA,kBACG,MAAME;AAAAA,kBACN,MAAM;AAAA,gBAAA;AAAA,cAAA;AAAA,cAEV,gBAAAJ;AAAA,gBAACG;AAAA,gBAAA;AAAA,kBACG,IAAI;AAAA,kBACJ,UAAU;AAAA,kBACV,YAAY;AAAA,kBACZ,OAAO;AAAA,kBACP,WAAWL,EAAoB;AAAA,kBAE9B,UAAAxB;AAAA,gBAAA;AAAA,cAAA;AAAA,YACL;AAAA,UAAA;AAAA,QAAA;AAAA,MACJ;AAAA,IAAA;AAAA,EAAA;AAAA,CAGX;AAEDH,EAAmB,cAAc;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CSSProperties, DragEvent, HTMLAttributes } from 'react';
|
|
2
|
+
import { IconComponent } from '../../../../../foundation/icon';
|
|
3
|
+
import { ImagePickerObjectFit, ImagePickerShape } from '../../../types/ImagePicker.types.ts';
|
|
4
|
+
export type ImagePickerPreviewProps = {
|
|
5
|
+
actionId: string;
|
|
6
|
+
actionLabel: string;
|
|
7
|
+
alt: string;
|
|
8
|
+
ariaDescribedBy?: string;
|
|
9
|
+
ariaInvalid?: HTMLAttributes<HTMLButtonElement>['aria-invalid'];
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
ariaLabelledBy?: string;
|
|
12
|
+
aspectRatio?: CSSProperties['aspectRatio'];
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
emptyLabel: string;
|
|
15
|
+
hasError: boolean;
|
|
16
|
+
hasValue: boolean;
|
|
17
|
+
height?: CSSProperties['height'];
|
|
18
|
+
icon?: IconComponent;
|
|
19
|
+
isDragging: boolean;
|
|
20
|
+
isMobile: boolean;
|
|
21
|
+
objectFit: ImagePickerObjectFit;
|
|
22
|
+
onClick: () => void;
|
|
23
|
+
onDragLeave?: (event: DragEvent<HTMLButtonElement>) => void;
|
|
24
|
+
onDragOver?: (event: DragEvent<HTMLButtonElement>) => void;
|
|
25
|
+
onDrop?: (event: DragEvent<HTMLButtonElement>) => void;
|
|
26
|
+
previewUrl?: string;
|
|
27
|
+
shape: ImagePickerShape;
|
|
28
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),c=require("../../../../actions/icon-button/IconButton.cjs");require("../../../../actions/icon-button/styles/IconButton.css.cjs");const a=require("../../styles/ImagePicker.css.cjs"),s=require("../../../../../resources/asset/TrashIcon.svg.cjs"),u=require("react"),e=u.memo(({disabled:t,label:o,onClick:r,shape:i})=>n.jsx(c,{type:"button",icon:s,size:"sm",variant:"contained",color:"tertiary","aria-label":o,className:a.IMAGE_PICKER_STYLES.removeButton({shape:i}),disabled:t,onClick:r}));e.displayName="ImagePicker.RemoveButton";exports.ImagePickerRemoveButton=e;
|
|
2
|
+
//# sourceMappingURL=ImagePickerRemoveButton.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImagePickerRemoveButton.cjs","sources":["../../../../../../src/components/forms/image-picker/components/image-picker-remove-button/ImagePickerRemoveButton.tsx"],"sourcesContent":["import { IconButton } from '@components/actions/icon-button'\r\nimport type { ImagePickerRemoveButtonProps } from '@components/forms/image-picker/components/image-picker-remove-button/types/ImagePickerRemoveButton.props.ts'\r\nimport { IMAGE_PICKER_STYLES } from '@components/forms/image-picker/styles/ImagePicker.css.ts'\r\nimport TrashIcon from '@resources/asset/TrashIcon.svg?react'\r\nimport { memo } from 'react'\r\n\r\nexport const ImagePickerRemoveButton = memo<ImagePickerRemoveButtonProps>(({\r\n disabled,\r\n label,\r\n onClick,\r\n shape,\r\n}) => (\r\n <IconButton\r\n type={'button'}\r\n icon={TrashIcon}\r\n size={'sm'}\r\n variant={'contained'}\r\n color={'tertiary'}\r\n aria-label={label}\r\n className={IMAGE_PICKER_STYLES.removeButton({ shape })}\r\n disabled={disabled}\r\n onClick={onClick}\r\n />\r\n))\r\n\r\nImagePickerRemoveButton.displayName = 'ImagePicker.RemoveButton'\r\n"],"names":["ImagePickerRemoveButton","memo","disabled","label","onClick","shape","jsx","IconButton","TrashIcon","IMAGE_PICKER_STYLES"],"mappings":"2XAMaA,EAA0BC,EAAAA,KAAmC,CAAC,CACvE,SAAAC,EACA,MAAAC,EACA,QAAAC,EACA,MAAAC,CACJ,IACIC,EAAAA,IAACC,EAAA,CACG,KAAM,SACN,KAAMC,EACN,KAAM,KACN,QAAS,YACT,MAAO,WACP,aAAYL,EACZ,UAAWM,EAAAA,oBAAoB,aAAa,CAAE,MAAAJ,EAAO,EACrD,SAAAH,EACA,QAAAE,CAAA,CACJ,CACH,EAEDJ,EAAwB,YAAc"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import i from "../../../../actions/icon-button/IconButton.js";
|
|
3
|
+
import "../../../../actions/icon-button/styles/IconButton.css.js";
|
|
4
|
+
import { IMAGE_PICKER_STYLES as a } from "../../styles/ImagePicker.css.js";
|
|
5
|
+
import n from "../../../../../resources/asset/TrashIcon.svg.js";
|
|
6
|
+
import { memo as c } from "react";
|
|
7
|
+
const p = c(({
|
|
8
|
+
disabled: o,
|
|
9
|
+
label: t,
|
|
10
|
+
onClick: m,
|
|
11
|
+
shape: r
|
|
12
|
+
}) => /* @__PURE__ */ e(
|
|
13
|
+
i,
|
|
14
|
+
{
|
|
15
|
+
type: "button",
|
|
16
|
+
icon: n,
|
|
17
|
+
size: "sm",
|
|
18
|
+
variant: "contained",
|
|
19
|
+
color: "tertiary",
|
|
20
|
+
"aria-label": t,
|
|
21
|
+
className: a.removeButton({ shape: r }),
|
|
22
|
+
disabled: o,
|
|
23
|
+
onClick: m
|
|
24
|
+
}
|
|
25
|
+
));
|
|
26
|
+
p.displayName = "ImagePicker.RemoveButton";
|
|
27
|
+
export {
|
|
28
|
+
p as ImagePickerRemoveButton
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=ImagePickerRemoveButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImagePickerRemoveButton.js","sources":["../../../../../../src/components/forms/image-picker/components/image-picker-remove-button/ImagePickerRemoveButton.tsx"],"sourcesContent":["import { IconButton } from '@components/actions/icon-button'\r\nimport type { ImagePickerRemoveButtonProps } from '@components/forms/image-picker/components/image-picker-remove-button/types/ImagePickerRemoveButton.props.ts'\r\nimport { IMAGE_PICKER_STYLES } from '@components/forms/image-picker/styles/ImagePicker.css.ts'\r\nimport TrashIcon from '@resources/asset/TrashIcon.svg?react'\r\nimport { memo } from 'react'\r\n\r\nexport const ImagePickerRemoveButton = memo<ImagePickerRemoveButtonProps>(({\r\n disabled,\r\n label,\r\n onClick,\r\n shape,\r\n}) => (\r\n <IconButton\r\n type={'button'}\r\n icon={TrashIcon}\r\n size={'sm'}\r\n variant={'contained'}\r\n color={'tertiary'}\r\n aria-label={label}\r\n className={IMAGE_PICKER_STYLES.removeButton({ shape })}\r\n disabled={disabled}\r\n onClick={onClick}\r\n />\r\n))\r\n\r\nImagePickerRemoveButton.displayName = 'ImagePicker.RemoveButton'\r\n"],"names":["ImagePickerRemoveButton","memo","disabled","label","onClick","shape","jsx","IconButton","TrashIcon","IMAGE_PICKER_STYLES"],"mappings":";;;;;;AAMO,MAAMA,IAA0BC,EAAmC,CAAC;AAAA,EACvE,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AACJ,MACI,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACG,MAAM;AAAA,IACN,MAAMC;AAAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,OAAO;AAAA,IACP,cAAYL;AAAA,IACZ,WAAWM,EAAoB,aAAa,EAAE,OAAAJ,GAAO;AAAA,IACrD,UAAAH;AAAA,IACA,SAAAE;AAAA,EAAA;AACJ,CACH;AAEDJ,EAAwB,cAAc;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ImagePickerActions } from './image-picker-actions/ImagePickerActions.tsx';
|
|
2
|
+
export { ImagePickerCropDialog } from './image-picker-crop-dialog';
|
|
3
|
+
export { ImagePickerInput } from './image-picker-input/ImagePickerInput.tsx';
|
|
4
|
+
export { ImagePickerPreview } from './image-picker-preview/ImagePickerPreview.tsx';
|
|
5
|
+
export { ImagePickerRemoveButton } from './image-picker-remove-button/ImagePickerRemoveButton.tsx';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o="image/*",e={choose:"Choose image",change:"Change image",remove:"Remove image",crop:"Crop image",cancel:"Cancel",apply:"Apply crop",zoom:"Zoom",cropArea:"Adjust crop",cropError:"Unable to crop this image. Please try again.",empty:"Drag an image here or click to browse",selected:"Image selected",invalidType:"Choose an image file.",maxSize:"This image is too large."},a={...e,empty:"Tap to choose an image"};exports.IMAGE_PICKER_DEFAULT_ACCEPT=o;exports.IMAGE_PICKER_DEFAULT_LABELS=e;exports.IMAGE_PICKER_MOBILE_LABELS=a;
|
|
2
|
+
//# sourceMappingURL=imagePickerDefaults.const.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imagePickerDefaults.const.cjs","sources":["../../../../../src/components/forms/image-picker/constants/imagePickerDefaults.const.ts"],"sourcesContent":["import type { ImagePickerResolvedLabels } from '@components/forms/image-picker/types/ImagePicker.types.ts'\n\nexport const IMAGE_PICKER_DEFAULT_ACCEPT = 'image/*'\n\nexport const IMAGE_PICKER_DEFAULT_LABELS: ImagePickerResolvedLabels = {\n choose: 'Choose image',\n change: 'Change image',\n remove: 'Remove image',\n crop: 'Crop image',\n cancel: 'Cancel',\n apply: 'Apply crop',\n zoom: 'Zoom',\n cropArea: 'Adjust crop',\n cropError: 'Unable to crop this image. Please try again.',\n empty: 'Drag an image here or click to browse',\n selected: 'Image selected',\n invalidType: 'Choose an image file.',\n maxSize: 'This image is too large.',\n}\n\nexport const IMAGE_PICKER_MOBILE_LABELS: ImagePickerResolvedLabels = {\n ...IMAGE_PICKER_DEFAULT_LABELS,\n empty: 'Tap to choose an image',\n}\n"],"names":["IMAGE_PICKER_DEFAULT_ACCEPT","IMAGE_PICKER_DEFAULT_LABELS","IMAGE_PICKER_MOBILE_LABELS"],"mappings":"gFAEO,MAAMA,EAA8B,UAE9BC,EAAyD,CAClE,OAAQ,eACR,OAAQ,eACR,OAAQ,eACR,KAAM,aACN,OAAQ,SACR,MAAO,aACP,KAAM,OACN,SAAU,cACV,UAAW,+CACX,MAAO,wCACP,SAAU,iBACV,YAAa,wBACb,QAAS,0BACb,EAEaC,EAAwD,CACjE,GAAGD,EACH,MAAO,wBACX"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ImagePickerResolvedLabels } from '../types/ImagePicker.types.ts';
|
|
2
|
+
export declare const IMAGE_PICKER_DEFAULT_ACCEPT = "image/*";
|
|
3
|
+
export declare const IMAGE_PICKER_DEFAULT_LABELS: ImagePickerResolvedLabels;
|
|
4
|
+
export declare const IMAGE_PICKER_MOBILE_LABELS: ImagePickerResolvedLabels;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const o = "image/*", e = {
|
|
2
|
+
choose: "Choose image",
|
|
3
|
+
change: "Change image",
|
|
4
|
+
remove: "Remove image",
|
|
5
|
+
crop: "Crop image",
|
|
6
|
+
cancel: "Cancel",
|
|
7
|
+
apply: "Apply crop",
|
|
8
|
+
zoom: "Zoom",
|
|
9
|
+
cropArea: "Adjust crop",
|
|
10
|
+
cropError: "Unable to crop this image. Please try again.",
|
|
11
|
+
empty: "Drag an image here or click to browse",
|
|
12
|
+
selected: "Image selected",
|
|
13
|
+
invalidType: "Choose an image file.",
|
|
14
|
+
maxSize: "This image is too large."
|
|
15
|
+
}, a = {
|
|
16
|
+
...e,
|
|
17
|
+
empty: "Tap to choose an image"
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
o as IMAGE_PICKER_DEFAULT_ACCEPT,
|
|
21
|
+
e as IMAGE_PICKER_DEFAULT_LABELS,
|
|
22
|
+
a as IMAGE_PICKER_MOBILE_LABELS
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=imagePickerDefaults.const.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imagePickerDefaults.const.js","sources":["../../../../../src/components/forms/image-picker/constants/imagePickerDefaults.const.ts"],"sourcesContent":["import type { ImagePickerResolvedLabels } from '@components/forms/image-picker/types/ImagePicker.types.ts'\n\nexport const IMAGE_PICKER_DEFAULT_ACCEPT = 'image/*'\n\nexport const IMAGE_PICKER_DEFAULT_LABELS: ImagePickerResolvedLabels = {\n choose: 'Choose image',\n change: 'Change image',\n remove: 'Remove image',\n crop: 'Crop image',\n cancel: 'Cancel',\n apply: 'Apply crop',\n zoom: 'Zoom',\n cropArea: 'Adjust crop',\n cropError: 'Unable to crop this image. Please try again.',\n empty: 'Drag an image here or click to browse',\n selected: 'Image selected',\n invalidType: 'Choose an image file.',\n maxSize: 'This image is too large.',\n}\n\nexport const IMAGE_PICKER_MOBILE_LABELS: ImagePickerResolvedLabels = {\n ...IMAGE_PICKER_DEFAULT_LABELS,\n empty: 'Tap to choose an image',\n}\n"],"names":["IMAGE_PICKER_DEFAULT_ACCEPT","IMAGE_PICKER_DEFAULT_LABELS","IMAGE_PICKER_MOBILE_LABELS"],"mappings":"AAEO,MAAMA,IAA8B,WAE9BC,IAAyD;AAAA,EAClE,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AAAA,EACP,UAAU;AAAA,EACV,aAAa;AAAA,EACb,SAAS;AACb,GAEaC,IAAwD;AAAA,EACjE,GAAGD;AAAA,EACH,OAAO;AACX;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imagePickerShapes.const.cjs","sources":["../../../../../src/components/forms/image-picker/constants/imagePickerShapes.const.ts"],"sourcesContent":["export const IMAGE_PICKER_SHAPES = {\r\n square: 'square',\r\n rounded: 'rounded',\r\n circle: 'circle',\r\n} as const\r\n\r\nexport const IMAGE_PICKER_SHAPES_ARRAY = Object.values(IMAGE_PICKER_SHAPES)\r\n"],"names":["IMAGE_PICKER_SHAPES"],"mappings":"gFAAO,MAAMA,EAAsB,CAE/B,QAAS,UACT,OAAQ,QACZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imagePickerShapes.const.js","sources":["../../../../../src/components/forms/image-picker/constants/imagePickerShapes.const.ts"],"sourcesContent":["export const IMAGE_PICKER_SHAPES = {\r\n square: 'square',\r\n rounded: 'rounded',\r\n circle: 'circle',\r\n} as const\r\n\r\nexport const IMAGE_PICKER_SHAPES_ARRAY = Object.values(IMAGE_PICKER_SHAPES)\r\n"],"names":["IMAGE_PICKER_SHAPES"],"mappings":"AAAO,MAAMA,IAAsB;AAAA,EAE/B,SAAS;AAAA,EACT,QAAQ;AACZ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IMAGE_PICKER_SHAPES, IMAGE_PICKER_SHAPES_ARRAY, } from './imagePickerShapes.const.ts';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ChangeEvent, DragEvent, RefObject } from 'react';
|
|
2
|
+
import { Area, Point } from 'react-easy-crop';
|
|
3
|
+
import { ImagePickerProps } from '../../types/ImagePicker.props.ts';
|
|
4
|
+
import { ImagePickerResolvedLabels } from '../../types/ImagePicker.types.ts';
|
|
5
|
+
/** Options consumed by the ImagePicker state and interaction hook. */
|
|
6
|
+
export type UseImagePickerOptions = Pick<ImagePickerProps, 'value' | 'defaultValue' | 'onValueChange' | 'accept' | 'maxSize' | 'onValidationError' | 'disabled' | 'disableChange' | 'disableRemove' | 'isMobile' | 'labels' | 'crop'>;
|
|
7
|
+
/** State and event handlers returned by the ImagePicker hook. */
|
|
8
|
+
export type UseImagePickerReturn = {
|
|
9
|
+
/** Ref attached to the hidden native file input. */
|
|
10
|
+
inputRef: RefObject<HTMLInputElement | null>;
|
|
11
|
+
/** URL used by the preview, either the supplied URL or a local object URL. */
|
|
12
|
+
previewUrl: string | undefined;
|
|
13
|
+
/** Labels merged from the desktop or mobile defaults and consumer overrides. */
|
|
14
|
+
resolvedLabels: ImagePickerResolvedLabels;
|
|
15
|
+
/** Localized validation feedback for the most recently rejected file. */
|
|
16
|
+
validationMessage: string | undefined;
|
|
17
|
+
/** Whether the picker currently contains an image value. */
|
|
18
|
+
hasValue: boolean;
|
|
19
|
+
/** Whether choosing, changing, and drag-and-drop interactions are disabled. */
|
|
20
|
+
isChangeDisabled: boolean;
|
|
21
|
+
/** Whether remove interactions are disabled. */
|
|
22
|
+
isRemoveDisabled: boolean;
|
|
23
|
+
/** Whether a supported file is currently dragged over the preview. */
|
|
24
|
+
isDragging: boolean;
|
|
25
|
+
/** The validated file waiting for the user to confirm a crop. */
|
|
26
|
+
pendingCropFile: File | undefined;
|
|
27
|
+
/** Opens the native file chooser unless changing is disabled. */
|
|
28
|
+
handleOpen: () => void;
|
|
29
|
+
/** Validates and stores the first file selected by the native input. */
|
|
30
|
+
handleInputChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
31
|
+
/** Updates the drag state for file drag-over events. */
|
|
32
|
+
handleDragOver: (event: DragEvent<HTMLButtonElement>) => void;
|
|
33
|
+
/** Clears the drag state when a file leaves the preview. */
|
|
34
|
+
handleDragLeave: (event: DragEvent<HTMLButtonElement>) => void;
|
|
35
|
+
/** Validates and stores the first file dropped on the preview. */
|
|
36
|
+
handleDrop: (event: DragEvent<HTMLButtonElement>) => void;
|
|
37
|
+
/** Clears the selected value unless removal is disabled. */
|
|
38
|
+
handleClear: () => void;
|
|
39
|
+
/** Discards the pending crop and restores the committed form value. */
|
|
40
|
+
handleCropCancel: () => void;
|
|
41
|
+
/** Commits the cropped file and synchronizes the native input. */
|
|
42
|
+
handleCropConfirm: (file: File) => void;
|
|
43
|
+
};
|
|
44
|
+
/** Options for the internal crop interaction hook. */
|
|
45
|
+
export type UseImagePickerCropOptions = {
|
|
46
|
+
/** The validated local file being edited. */
|
|
47
|
+
file: File;
|
|
48
|
+
/** Localized message shown when crop generation fails. */
|
|
49
|
+
cropErrorLabel: string;
|
|
50
|
+
/** Receives the generated file after a successful crop. */
|
|
51
|
+
onConfirm: (file: File) => void;
|
|
52
|
+
};
|
|
53
|
+
/** Crop state and handlers returned to the internal crop dialog. */
|
|
54
|
+
export type UseImagePickerCropReturn = {
|
|
55
|
+
/** Object URL used as the crop editor source image. */
|
|
56
|
+
imageUrl: string | undefined;
|
|
57
|
+
/** Current crop position. */
|
|
58
|
+
crop: Point;
|
|
59
|
+
/** Updates the crop position. */
|
|
60
|
+
setCrop: (location: Point) => void;
|
|
61
|
+
/** Current crop zoom level. */
|
|
62
|
+
zoom: number;
|
|
63
|
+
/** Updates the crop zoom level. */
|
|
64
|
+
setZoom: (value: number) => void;
|
|
65
|
+
/** Crop rectangle in source-image pixels. */
|
|
66
|
+
croppedAreaPixels: Area | undefined;
|
|
67
|
+
/** Stores the latest crop rectangle emitted by the cropper. */
|
|
68
|
+
handleCropComplete: (croppedArea: Area, croppedAreaPixels: Area) => void;
|
|
69
|
+
/** Clears the crop error after the source image loads. */
|
|
70
|
+
handleMediaLoaded: () => void;
|
|
71
|
+
/** Surfaces a source-image loading failure in the dialog. */
|
|
72
|
+
handleMediaError: () => void;
|
|
73
|
+
/** Whether the crop file is currently being generated. */
|
|
74
|
+
isProcessing: boolean;
|
|
75
|
+
/** Localized crop generation error, when one occurred. */
|
|
76
|
+
cropError: string | undefined;
|
|
77
|
+
/** Generates and submits the cropped file when the crop is ready. */
|
|
78
|
+
handleConfirm: () => Promise<void>;
|
|
79
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),C=require("../constants/imagePickerDefaults.const.cjs"),c=require("../utils/imagePicker.utils.cjs"),Q=({value:I,defaultValue:E=null,onValueChange:P,accept:b=C.IMAGE_PICKER_DEFAULT_ACCEPT,maxSize:i,onValidationError:v,disabled:L=!1,disableChange:h=!1,disableRemove:D=!1,isMobile:F=!1,labels:T,crop:R=!1})=>{const s=t.useRef(null),[_,A]=t.useState(E),[O,m]=t.useState(),[U,l]=t.useState(),[S,o]=t.useState(!1),[j,u]=t.useState(),k=I!==void 0,r=k?I:_,M=r!==null,a=L||h,p=L||D,y={...F?C.IMAGE_PICKER_MOBILE_LABELS:C.IMAGE_PICKER_DEFAULT_LABELS,...T},q=typeof r=="string"?r:O,w=U?y[U]:void 0;t.useEffect(()=>{if(!c.isImagePickerFile(r)||typeof URL>"u"||typeof URL.createObjectURL!="function"){m(void 0);return}const e=URL.createObjectURL(r);return m(e),()=>{typeof URL.revokeObjectURL=="function"&&URL.revokeObjectURL(e)}},[r]),t.useEffect(()=>{c.syncImagePickerInput(s.current,r)},[r]);const f=t.useCallback(e=>{k||A(e),P?.(e)},[k,P]),B=t.useCallback(()=>{a||s.current?.click()},[a]),d=t.useCallback(e=>{l(void 0),c.syncImagePickerInput(s.current,e),f(e)},[f]),g=t.useCallback(e=>{if(a)return;let n;if(c.acceptsImagePickerFile(e,b)?i!==void 0&&e.size>i&&(n="maxSize"):n="invalidType",n){l(n),c.syncImagePickerInput(s.current,r),v?.(n==="maxSize"?{reason:n,file:e,maxSize:i}:{reason:n,file:e});return}if(l(void 0),R){c.syncImagePickerInput(s.current,r),u(e);return}d(e)},[b,d,R,r,a,i,v]),G=t.useCallback(e=>{const n=e.target.files?.[0];n&&g(n)},[g]),K=t.useCallback(e=>{c.hasImagePickerFiles(e)&&(e.preventDefault(),e.dataTransfer.dropEffect=a?"none":"copy",a||o(!0))},[a]),V=t.useCallback(e=>{if(e.target!==e.currentTarget)return;const n=e.relatedTarget;typeof Node<"u"&&n instanceof Node&&e.currentTarget.contains(n)||o(!1)},[]),N=t.useCallback(e=>{if(!c.hasImagePickerFiles(e)||(e.preventDefault(),o(!1),a))return;const n=e.dataTransfer.files?.[0];n&&g(n)},[g,a]),z=t.useCallback(()=>{p||(u(void 0),l(void 0),o(!1),f(null),s.current&&(s.current.value=""))},[p,f]),H=t.useCallback(()=>{u(void 0),c.syncImagePickerInput(s.current,r)},[r]),J=t.useCallback(e=>{u(void 0),d(e)},[d]);return{inputRef:s,previewUrl:q,resolvedLabels:y,validationMessage:w,hasValue:M,isChangeDisabled:a,isRemoveDisabled:p,isDragging:S,pendingCropFile:j,handleOpen:B,handleInputChange:G,handleDragOver:K,handleDragLeave:V,handleDrop:N,handleClear:z,handleCropCancel:H,handleCropConfirm:J}};exports.useImagePicker=Q;
|
|
2
|
+
//# sourceMappingURL=useImagePicker.hook.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useImagePicker.hook.cjs","sources":["../../../../../src/components/forms/image-picker/hooks/useImagePicker.hook.ts"],"sourcesContent":["import {\r\n useCallback,\r\n useEffect,\r\n useRef,\r\n useState,\r\n type ChangeEvent,\r\n type DragEvent,\r\n} from 'react'\r\n\r\nimport {\r\n IMAGE_PICKER_DEFAULT_ACCEPT,\r\n IMAGE_PICKER_DEFAULT_LABELS,\r\n IMAGE_PICKER_MOBILE_LABELS,\r\n} from '@components/forms/image-picker/constants/imagePickerDefaults.const.ts'\r\nimport type {\r\n UseImagePickerOptions,\r\n UseImagePickerReturn,\r\n} from '@components/forms/image-picker/hooks/types'\r\nimport type {\r\n ImagePickerValidationReason,\r\n ImagePickerValue,\r\n} from '@components/forms/image-picker/types/ImagePicker.types.ts'\r\nimport {\r\n acceptsImagePickerFile,\r\n hasImagePickerFiles,\r\n isImagePickerFile,\r\n syncImagePickerInput,\r\n} from '@components/forms/image-picker/utils/imagePicker.utils.ts'\r\n\r\n/**\r\n * Manages value state and browser interactions for ImagePicker.\r\n *\r\n * Supports controlled and uncontrolled values, local preview URLs, native\r\n * input synchronization, file validation, chooser opening, drag and drop, and\r\n * removal. When cropping is enabled, accepted files wait in a pending state\r\n * until the crop dialog confirms them. The returned handlers are ready to pass\r\n * to the ImagePicker subcomponents.\r\n */\r\nexport const useImagePicker = ({\r\n value,\r\n defaultValue = null,\r\n onValueChange,\r\n accept = IMAGE_PICKER_DEFAULT_ACCEPT,\r\n maxSize,\r\n onValidationError,\r\n disabled = false,\r\n disableChange = false,\r\n disableRemove = false,\r\n isMobile = false,\r\n labels,\r\n crop = false,\r\n}: UseImagePickerOptions): UseImagePickerReturn => {\r\n const inputRef = useRef<HTMLInputElement>(null)\r\n const [uncontrolledValue, setUncontrolledValue] =\r\n useState<ImagePickerValue>(defaultValue)\r\n const [filePreviewUrl, setFilePreviewUrl] = useState<string>()\r\n const [validationReason, setValidationReason] =\r\n useState<ImagePickerValidationReason>()\r\n const [isDragging, setIsDragging] = useState(false)\r\n const [pendingCropFile, setPendingCropFile] = useState<File>()\r\n\r\n const isControlled = value !== undefined\r\n const currentValue = isControlled ? value : uncontrolledValue\r\n const hasValue = currentValue !== null\r\n const isChangeDisabled = disabled || disableChange\r\n const isRemoveDisabled = disabled || disableRemove\r\n const resolvedLabels = {\r\n ...(isMobile ? IMAGE_PICKER_MOBILE_LABELS : IMAGE_PICKER_DEFAULT_LABELS),\r\n ...labels,\r\n }\r\n const previewUrl = typeof currentValue === 'string'\r\n ? currentValue\r\n : filePreviewUrl\r\n const validationMessage = validationReason\r\n ? resolvedLabels[validationReason]\r\n : undefined\r\n\r\n useEffect(() => {\r\n if (\r\n !isImagePickerFile(currentValue) ||\r\n typeof URL === 'undefined' ||\r\n typeof URL.createObjectURL !== 'function'\r\n ) {\r\n setFilePreviewUrl(undefined)\r\n return\r\n }\r\n\r\n const objectUrl = URL.createObjectURL(currentValue)\r\n setFilePreviewUrl(objectUrl)\r\n\r\n return () => {\r\n if (typeof URL.revokeObjectURL === 'function') {\r\n URL.revokeObjectURL(objectUrl)\r\n }\r\n }\r\n }, [currentValue])\r\n\r\n useEffect(() => {\r\n syncImagePickerInput(inputRef.current, currentValue)\r\n }, [currentValue])\r\n\r\n const updateValue = useCallback(\r\n (nextValue: ImagePickerValue) => {\r\n if (!isControlled) {\r\n setUncontrolledValue(nextValue)\r\n }\r\n onValueChange?.(nextValue)\r\n },\r\n [isControlled, onValueChange],\r\n )\r\n\r\n const handleOpen = useCallback(() => {\r\n if (!isChangeDisabled) {\r\n inputRef.current?.click()\r\n }\r\n }, [isChangeDisabled])\r\n\r\n const commitFile = useCallback(\r\n (file: File) => {\r\n setValidationReason(undefined)\r\n syncImagePickerInput(inputRef.current, file)\r\n updateValue(file)\r\n },\r\n [updateValue],\r\n )\r\n\r\n const handleFile = useCallback(\r\n (file: File) => {\r\n if (isChangeDisabled) {\r\n return\r\n }\r\n\r\n let reason: ImagePickerValidationReason | undefined\r\n\r\n if (!acceptsImagePickerFile(file, accept)) {\r\n reason = 'invalidType'\r\n } else if (maxSize !== undefined && file.size > maxSize) {\r\n reason = 'maxSize'\r\n }\r\n\r\n if (reason) {\r\n setValidationReason(reason)\r\n syncImagePickerInput(inputRef.current, currentValue)\r\n onValidationError?.(\r\n reason === 'maxSize'\r\n ? { reason, file, maxSize }\r\n : { reason, file },\r\n )\r\n return\r\n }\r\n\r\n setValidationReason(undefined)\r\n if (crop) {\r\n syncImagePickerInput(inputRef.current, currentValue)\r\n setPendingCropFile(file)\r\n return\r\n }\r\n\r\n commitFile(file)\r\n },\r\n [\r\n accept,\r\n commitFile,\r\n crop,\r\n currentValue,\r\n isChangeDisabled,\r\n maxSize,\r\n onValidationError,\r\n ],\r\n )\r\n\r\n const handleInputChange = useCallback(\r\n (event: ChangeEvent<HTMLInputElement>) => {\r\n const file = event.target.files?.[0]\r\n if (file) {\r\n handleFile(file)\r\n }\r\n },\r\n [handleFile],\r\n )\r\n\r\n const handleDragOver = useCallback(\r\n (event: DragEvent<HTMLButtonElement>) => {\r\n if (!hasImagePickerFiles(event)) {\r\n return\r\n }\r\n\r\n event.preventDefault()\r\n event.dataTransfer.dropEffect = isChangeDisabled ? 'none' : 'copy'\r\n if (!isChangeDisabled) {\r\n setIsDragging(true)\r\n }\r\n },\r\n [isChangeDisabled],\r\n )\r\n\r\n const handleDragLeave = useCallback(\r\n (event: DragEvent<HTMLButtonElement>) => {\r\n if (event.target !== event.currentTarget) {\r\n return\r\n }\r\n\r\n const relatedTarget = event.relatedTarget\r\n if (\r\n typeof Node !== 'undefined'\r\n && relatedTarget instanceof Node\r\n && event.currentTarget.contains(relatedTarget)\r\n ) {\r\n return\r\n }\r\n\r\n setIsDragging(false)\r\n },\r\n [],\r\n )\r\n\r\n const handleDrop = useCallback(\r\n (event: DragEvent<HTMLButtonElement>) => {\r\n if (!hasImagePickerFiles(event)) {\r\n return\r\n }\r\n\r\n event.preventDefault()\r\n setIsDragging(false)\r\n if (isChangeDisabled) {\r\n return\r\n }\r\n\r\n const file = event.dataTransfer.files?.[0]\r\n if (file) {\r\n handleFile(file)\r\n }\r\n },\r\n [handleFile, isChangeDisabled],\r\n )\r\n\r\n const handleClear = useCallback(() => {\r\n if (isRemoveDisabled) {\r\n return\r\n }\r\n\r\n setPendingCropFile(undefined)\r\n setValidationReason(undefined)\r\n setIsDragging(false)\r\n updateValue(null)\r\n if (inputRef.current) {\r\n inputRef.current.value = ''\r\n }\r\n }, [isRemoveDisabled, updateValue])\r\n\r\n const handleCropCancel = useCallback(() => {\r\n setPendingCropFile(undefined)\r\n syncImagePickerInput(inputRef.current, currentValue)\r\n }, [currentValue])\r\n\r\n const handleCropConfirm = useCallback(\r\n (file: File) => {\r\n setPendingCropFile(undefined)\r\n commitFile(file)\r\n },\r\n [commitFile],\r\n )\r\n\r\n return {\r\n inputRef,\r\n previewUrl,\r\n resolvedLabels,\r\n validationMessage,\r\n hasValue,\r\n isChangeDisabled,\r\n isRemoveDisabled,\r\n isDragging,\r\n pendingCropFile,\r\n handleOpen,\r\n handleInputChange,\r\n handleDragOver,\r\n handleDragLeave,\r\n handleDrop,\r\n handleClear,\r\n handleCropCancel,\r\n handleCropConfirm,\r\n }\r\n}\r\n"],"names":["useImagePicker","value","defaultValue","onValueChange","accept","IMAGE_PICKER_DEFAULT_ACCEPT","maxSize","onValidationError","disabled","disableChange","disableRemove","isMobile","labels","crop","inputRef","useRef","uncontrolledValue","setUncontrolledValue","useState","filePreviewUrl","setFilePreviewUrl","validationReason","setValidationReason","isDragging","setIsDragging","pendingCropFile","setPendingCropFile","isControlled","currentValue","hasValue","isChangeDisabled","isRemoveDisabled","resolvedLabels","IMAGE_PICKER_MOBILE_LABELS","IMAGE_PICKER_DEFAULT_LABELS","previewUrl","validationMessage","useEffect","isImagePickerFile","objectUrl","syncImagePickerInput","updateValue","useCallback","nextValue","handleOpen","commitFile","file","handleFile","reason","acceptsImagePickerFile","handleInputChange","event","handleDragOver","hasImagePickerFiles","handleDragLeave","relatedTarget","handleDrop","handleClear","handleCropCancel","handleCropConfirm"],"mappings":"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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { UseImagePickerOptions, UseImagePickerReturn } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Manages value state and browser interactions for ImagePicker.
|
|
4
|
+
*
|
|
5
|
+
* Supports controlled and uncontrolled values, local preview URLs, native
|
|
6
|
+
* input synchronization, file validation, chooser opening, drag and drop, and
|
|
7
|
+
* removal. When cropping is enabled, accepted files wait in a pending state
|
|
8
|
+
* until the crop dialog confirms them. The returned handlers are ready to pass
|
|
9
|
+
* to the ImagePicker subcomponents.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useImagePicker: ({ value, defaultValue, onValueChange, accept, maxSize, onValidationError, disabled, disableChange, disableRemove, isMobile, labels, crop, }: UseImagePickerOptions) => UseImagePickerReturn;
|