@canonical/react-ds-global-form 0.45.0 → 0.48.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/README.md +14 -9
- package/dist/esm/density.css +23 -28
- package/dist/esm/index.css +28 -13
- package/dist/esm/lib/{component → _work_in_progress/component}/ColorField/ColorField.js +2 -2
- package/dist/esm/lib/_work_in_progress/component/ColorField/ColorField.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/component/ColorField/index.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/component/ColorField/types.js.map +1 -0
- package/dist/esm/lib/{component → _work_in_progress/component}/ComboboxField/ComboboxField.js +2 -2
- package/dist/esm/lib/_work_in_progress/component/ComboboxField/ComboboxField.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/component/ComboboxField/index.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/component/ComboboxField/types.js.map +1 -0
- package/dist/esm/lib/{component → _work_in_progress/component}/RatingField/RatingField.js +2 -2
- package/dist/esm/lib/_work_in_progress/component/RatingField/RatingField.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/component/RatingField/index.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/component/RatingField/types.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ColorInput/ColorInput.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ColorInput/index.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ColorInput/types.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/ComboboxInput.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/MultipleCombobox.js +198 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/MultipleCombobox.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/SingleCombobox.js +120 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/SingleCombobox.js.map +1 -0
- package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/common/List/List.js +16 -4
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/common/List/List.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/common/List/index.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/common/List/types.js.map +1 -0
- package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/common/ResetButton/ResetButton.js +2 -2
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/common/ResetButton/ResetButton.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/common/ResetButton/index.js.map +1 -0
- package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/common/ResetButton/styles.css +3 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/common/ResetButton/types.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/common/index.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/constants.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/index.js.map +1 -0
- package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/messages.js +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/messages.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/types.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/utils/convertItemToString.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/utils/convertValueToItem.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/utils/filterItems.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/utils/index.js +7 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/utils/index.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/utils/isPromise.js +6 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/utils/isPromise.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/utils/settleLookup.js +10 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/utils/settleLookup.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/utils/stopPageMovesAtEnds.js +25 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/ComboboxInput/utils/stopPageMovesAtEnds.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/RatingInput/RatingInput.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/subcomponent/RatingInput/index.js.map +1 -0
- package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/RatingInput/styles.css +7 -7
- package/dist/esm/lib/_work_in_progress/subcomponent/RatingInput/types.js.map +1 -0
- package/dist/esm/lib/common/Wrapper/InvisibleWrapper.js +3 -1
- package/dist/esm/lib/common/Wrapper/InvisibleWrapper.js.map +1 -1
- package/dist/esm/lib/common/Wrapper/ToggleWrapper.css +0 -6
- package/dist/esm/lib/common/Wrapper/ToggleWrapper.js +2 -1
- package/dist/esm/lib/common/Wrapper/ToggleWrapper.js.map +1 -1
- package/dist/esm/lib/common/Wrapper/Wrapper.js +10 -6
- package/dist/esm/lib/common/Wrapper/Wrapper.js.map +1 -1
- package/dist/esm/lib/common/Wrapper/createMiddleware.js +70 -0
- package/dist/esm/lib/common/Wrapper/createMiddleware.js.map +1 -0
- package/dist/esm/lib/common/Wrapper/hooks/useFieldWrapper.js +2 -2
- package/dist/esm/lib/common/Wrapper/hooks/useFieldWrapper.js.map +1 -1
- package/dist/esm/lib/common/Wrapper/withConditionalDisplay.js +17 -12
- package/dist/esm/lib/common/Wrapper/withConditionalDisplay.js.map +1 -1
- package/dist/esm/lib/common/Wrapper/withWrapper.js +16 -10
- package/dist/esm/lib/common/Wrapper/withWrapper.js.map +1 -1
- package/dist/esm/lib/component/ChoicesField/Choices.js +2 -2
- package/dist/esm/lib/component/ChoicesField/Choices.js.map +1 -1
- package/dist/esm/lib/component/ChoicesField/ChoicesField.js +3 -2
- package/dist/esm/lib/component/ChoicesField/ChoicesField.js.map +1 -1
- package/dist/esm/lib/component/ChoicesField/styles.css +3 -65
- package/dist/esm/lib/component/DateTimeField/DateTimeField.js +2 -1
- package/dist/esm/lib/component/DateTimeField/DateTimeField.js.map +1 -1
- package/dist/esm/lib/component/FileUploadField/FileUploadField.js +45 -41
- package/dist/esm/lib/component/FileUploadField/FileUploadField.js.map +1 -1
- package/dist/esm/lib/component/FileUploadField/fileUploadRules.js +39 -0
- package/dist/esm/lib/component/FileUploadField/fileUploadRules.js.map +1 -0
- package/dist/esm/lib/component/FileUploadField/styles.css +30 -0
- package/dist/esm/lib/component/RichChoicesField/RichChoices.js +2 -2
- package/dist/esm/lib/component/RichChoicesField/RichChoices.js.map +1 -1
- package/dist/esm/lib/component/RichChoicesField/RichChoicesField.js +2 -2
- package/dist/esm/lib/component/index.js +5 -4
- package/dist/esm/lib/component/index.js.map +1 -1
- package/dist/esm/lib/index.js.map +1 -1
- package/dist/esm/lib/pattern/Field/Field.js +38 -31
- package/dist/esm/lib/pattern/Field/Field.js.map +1 -1
- package/dist/esm/lib/subcomponent/DateInput/styles.css +16 -0
- package/dist/esm/lib/subcomponent/DateTimeInput/styles.css +24 -7
- package/dist/esm/lib/subcomponent/Field/Description/Description.js +1 -3
- package/dist/esm/lib/subcomponent/Field/Description/Description.js.map +1 -1
- package/dist/esm/lib/subcomponent/Field/Description/styles.css +4 -0
- package/dist/esm/lib/subcomponent/Field/Error/Error.js +4 -4
- package/dist/esm/lib/subcomponent/Field/Error/Error.js.map +1 -1
- package/dist/esm/lib/subcomponent/Field/Error/styles.css +8 -0
- package/dist/esm/lib/subcomponent/Field/Label/styles.css +1 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/FileUploadInput.js +119 -64
- package/dist/esm/lib/subcomponent/FileUploadInput/FileUploadInput.js.map +1 -1
- package/dist/esm/lib/subcomponent/FileUploadInput/common/FileItem/FileItem.js +52 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/common/FileItem/FileItem.js.map +1 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/common/FileItem/index.js +2 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/common/FileItem/index.js.map +1 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/common/FileItem/types.js +2 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/common/FileItem/types.js.map +1 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/common/Thumbnail/Thumbnail.js +40 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/common/Thumbnail/Thumbnail.js.map +1 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/common/Thumbnail/index.js +2 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/common/Thumbnail/index.js.map +1 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/common/Thumbnail/types.js +2 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/common/Thumbnail/types.js.map +1 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/constants.js +3 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/constants.js.map +1 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/hooks/index.js +3 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/hooks/index.js.map +1 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/hooks/useFileUploads.js +148 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/hooks/useFileUploads.js.map +1 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/hooks/useObjectUrl.js +22 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/hooks/useObjectUrl.js.map +1 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/messages.js +25 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/messages.js.map +1 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/styles.css +255 -94
- package/dist/esm/lib/subcomponent/FileUploadInput/utils/formatFileSize.js +21 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/utils/formatFileSize.js.map +1 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/utils/getFileMessage.js +20 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/utils/getFileMessage.js.map +1 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/utils/index.js +4 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/utils/index.js.map +1 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/utils/matchesAccept.js +26 -0
- package/dist/esm/lib/subcomponent/FileUploadInput/utils/matchesAccept.js.map +1 -0
- package/dist/esm/lib/subcomponent/NumberInput/NumberInput.js +1 -1
- package/dist/esm/lib/subcomponent/NumberInput/NumberInput.js.map +1 -1
- package/dist/esm/lib/subcomponent/NumberInput/styles.css +17 -0
- package/dist/esm/lib/subcomponent/PasswordInput/styles.css +7 -1
- package/dist/esm/lib/subcomponent/PhoneInput/PhoneInput.js +8 -2
- package/dist/esm/lib/subcomponent/PhoneInput/PhoneInput.js.map +1 -1
- package/dist/esm/lib/subcomponent/RadioInput/styles.css +15 -13
- package/dist/esm/lib/subcomponent/TextInput/TextInput.js +3 -1
- package/dist/esm/lib/subcomponent/TextInput/TextInput.js.map +1 -1
- package/dist/esm/lib/subcomponent/index.js +5 -5
- package/dist/esm/lib/subcomponent/index.js.map +1 -1
- package/dist/esm/lib/utils/hooks/useFieldAriaProperties.js +6 -4
- package/dist/esm/lib/utils/hooks/useFieldAriaProperties.js.map +1 -1
- package/dist/esm/lib/utils/hooks/useOptionAriaProperties.js +3 -3
- package/dist/esm/lib/utils/hooks/useOptionAriaProperties.js.map +1 -1
- package/dist/esm/lib/utils/middleware/addRESTOptions.js +99 -39
- package/dist/esm/lib/utils/middleware/addRESTOptions.js.map +1 -1
- package/dist/esm/lib/utils/middleware/addRESTValidation.js +246 -32
- package/dist/esm/lib/utils/middleware/addRESTValidation.js.map +1 -1
- package/dist/esm/lib/utils/middleware/index.js +1 -0
- package/dist/esm/lib/utils/middleware/index.js.map +1 -1
- package/dist/esm/testing/expectNoAxeViolations.js +30 -0
- package/dist/esm/testing/expectNoAxeViolations.js.map +1 -0
- package/dist/types/lib/{component → _work_in_progress/component}/ColorField/ColorField.d.ts +7 -12
- package/dist/types/lib/_work_in_progress/component/ColorField/ColorField.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/component/ColorField/index.d.ts.map +1 -0
- package/dist/types/lib/{component → _work_in_progress/component}/ColorField/types.d.ts +1 -1
- package/dist/types/lib/_work_in_progress/component/ColorField/types.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/component/ComboboxField/ComboboxField.d.ts +53 -0
- package/dist/types/lib/_work_in_progress/component/ComboboxField/ComboboxField.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/component/ComboboxField/index.d.ts.map +1 -0
- package/dist/types/lib/{component → _work_in_progress/component}/ComboboxField/types.d.ts +1 -1
- package/dist/types/lib/_work_in_progress/component/ComboboxField/types.d.ts.map +1 -0
- package/dist/types/lib/{component → _work_in_progress/component}/RatingField/RatingField.d.ts +7 -12
- package/dist/types/lib/_work_in_progress/component/RatingField/RatingField.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/component/RatingField/index.d.ts.map +1 -0
- package/dist/types/lib/{component → _work_in_progress/component}/RatingField/types.d.ts +1 -1
- package/dist/types/lib/_work_in_progress/component/RatingField/types.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ColorInput/ColorInput.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ColorInput/index.d.ts.map +1 -0
- package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/ColorInput/types.d.ts +1 -1
- package/dist/types/lib/_work_in_progress/subcomponent/ColorInput/types.d.ts.map +1 -0
- package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/ComboboxInput.d.ts +13 -5
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/ComboboxInput.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/MultipleCombobox.d.ts +24 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/MultipleCombobox.d.ts.map +1 -0
- package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/SingleCombobox.d.ts +19 -4
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/SingleCombobox.d.ts.map +1 -0
- package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/common/List/List.d.ts +1 -1
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/common/List/List.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/common/List/index.d.ts.map +1 -0
- package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/common/List/types.d.ts +2 -1
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/common/List/types.d.ts.map +1 -0
- package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/common/ResetButton/ResetButton.d.ts +1 -1
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/common/ResetButton/ResetButton.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/common/ResetButton/index.d.ts.map +1 -0
- package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/common/ResetButton/types.d.ts +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/common/ResetButton/types.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/common/index.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/constants.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/index.d.ts.map +1 -0
- package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/messages.d.ts +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/messages.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/types.d.ts +52 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/types.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/utils/convertItemToString.d.ts +4 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/utils/convertItemToString.d.ts.map +1 -0
- package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/utils/convertValueToItem.d.ts +1 -1
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/utils/convertValueToItem.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/utils/filterItems.d.ts +4 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/utils/filterItems.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/utils/index.d.ts +7 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/utils/index.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/utils/isPromise.d.ts +4 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/utils/isPromise.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/utils/settleLookup.d.ts +8 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/utils/settleLookup.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/utils/stopPageMovesAtEnds.d.ts +13 -0
- package/dist/types/lib/_work_in_progress/subcomponent/ComboboxInput/utils/stopPageMovesAtEnds.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/RatingInput/RatingInput.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/RatingInput/index.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/subcomponent/RatingInput/types.d.ts.map +1 -0
- package/dist/types/lib/common/Wrapper/InvisibleWrapper.d.ts.map +1 -1
- package/dist/types/lib/common/Wrapper/ToggleWrapper.d.ts.map +1 -1
- package/dist/types/lib/common/Wrapper/Wrapper.d.ts +1 -1
- package/dist/types/lib/common/Wrapper/Wrapper.d.ts.map +1 -1
- package/dist/types/lib/common/Wrapper/createMiddleware.d.ts +43 -0
- package/dist/types/lib/common/Wrapper/createMiddleware.d.ts.map +1 -0
- package/dist/types/lib/common/Wrapper/hooks/useFieldWrapper.d.ts +2 -0
- package/dist/types/lib/common/Wrapper/hooks/useFieldWrapper.d.ts.map +1 -1
- package/dist/types/lib/common/Wrapper/withConditionalDisplay.d.ts +9 -3
- package/dist/types/lib/common/Wrapper/withConditionalDisplay.d.ts.map +1 -1
- package/dist/types/lib/common/Wrapper/withToggleWrapper.d.ts +2 -2
- package/dist/types/lib/common/Wrapper/withToggleWrapper.d.ts.map +1 -1
- package/dist/types/lib/common/Wrapper/withWrapper.d.ts +3 -5
- package/dist/types/lib/common/Wrapper/withWrapper.d.ts.map +1 -1
- package/dist/types/lib/common/types.d.ts +19 -7
- package/dist/types/lib/common/types.d.ts.map +1 -1
- package/dist/types/lib/component/CheckboxField/CheckboxField.d.ts +1 -1
- package/dist/types/lib/component/ChoicesField/Choices.d.ts +1 -1
- package/dist/types/lib/component/ChoicesField/Choices.d.ts.map +1 -1
- package/dist/types/lib/component/ChoicesField/ChoicesField.d.ts +9 -13
- package/dist/types/lib/component/ChoicesField/ChoicesField.d.ts.map +1 -1
- package/dist/types/lib/component/ChoicesField/types.d.ts +2 -2
- package/dist/types/lib/component/ChoicesField/types.d.ts.map +1 -1
- package/dist/types/lib/component/DateField/DateField.d.ts +6 -11
- package/dist/types/lib/component/DateTimeField/DateTimeField.d.ts +7 -11
- package/dist/types/lib/component/DateTimeField/DateTimeField.d.ts.map +1 -1
- package/dist/types/lib/component/FileUploadField/FileUploadField.d.ts +299 -19
- package/dist/types/lib/component/FileUploadField/FileUploadField.d.ts.map +1 -1
- package/dist/types/lib/component/FileUploadField/fileUploadRules.d.ts +24 -0
- package/dist/types/lib/component/FileUploadField/fileUploadRules.d.ts.map +1 -0
- package/dist/types/lib/component/HiddenField/HiddenField.d.ts +6 -11
- package/dist/types/lib/component/NumberField/NumberField.d.ts +6 -11
- package/dist/types/lib/component/PasswordField/PasswordField.d.ts +6 -11
- package/dist/types/lib/component/PhoneField/PhoneField.d.ts +7 -11
- package/dist/types/lib/component/RangeField/RangeField.d.ts +6 -11
- package/dist/types/lib/component/RichChoicesField/RichChoices.d.ts +1 -1
- package/dist/types/lib/component/RichChoicesField/RichChoices.d.ts.map +1 -1
- package/dist/types/lib/component/RichChoicesField/RichChoicesField.d.ts +8 -13
- package/dist/types/lib/component/RichChoicesField/types.d.ts +2 -2
- package/dist/types/lib/component/RichChoicesField/types.d.ts.map +1 -1
- package/dist/types/lib/component/SelectField/SelectField.d.ts +6 -11
- package/dist/types/lib/component/SwitchField/SwitchField.d.ts +1 -1
- package/dist/types/lib/component/TextField/TextField.d.ts +6 -11
- package/dist/types/lib/component/TextareaField/TextareaField.d.ts +6 -11
- package/dist/types/lib/component/TimeField/TimeField.d.ts +6 -11
- package/dist/types/lib/component/index.d.ts +3 -3
- package/dist/types/lib/component/index.d.ts.map +1 -1
- package/dist/types/lib/index.d.ts +1 -1
- package/dist/types/lib/index.d.ts.map +1 -1
- package/dist/types/lib/pattern/Field/Field.d.ts +9 -5
- package/dist/types/lib/pattern/Field/Field.d.ts.map +1 -1
- package/dist/types/lib/pattern/Field/types.d.ts +69 -45
- package/dist/types/lib/pattern/Field/types.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/Field/Description/Description.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/Field/Error/Error.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/FileUploadInput/FileUploadInput.d.ts +25 -4
- package/dist/types/lib/subcomponent/FileUploadInput/FileUploadInput.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/FileUploadInput/common/FileItem/FileItem.d.ts +15 -0
- package/dist/types/lib/subcomponent/FileUploadInput/common/FileItem/FileItem.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/FileUploadInput/common/FileItem/index.d.ts +3 -0
- package/dist/types/lib/subcomponent/FileUploadInput/common/FileItem/index.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/FileUploadInput/common/FileItem/types.d.ts +28 -0
- package/dist/types/lib/subcomponent/FileUploadInput/common/FileItem/types.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/FileUploadInput/common/Thumbnail/Thumbnail.d.ts +14 -0
- package/dist/types/lib/subcomponent/FileUploadInput/common/Thumbnail/Thumbnail.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/FileUploadInput/common/Thumbnail/index.d.ts +3 -0
- package/dist/types/lib/subcomponent/FileUploadInput/common/Thumbnail/index.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/FileUploadInput/common/Thumbnail/types.d.ts +9 -0
- package/dist/types/lib/subcomponent/FileUploadInput/common/Thumbnail/types.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/FileUploadInput/constants.d.ts +3 -0
- package/dist/types/lib/subcomponent/FileUploadInput/constants.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/FileUploadInput/hooks/index.d.ts +3 -0
- package/dist/types/lib/subcomponent/FileUploadInput/hooks/index.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/FileUploadInput/hooks/useFileUploads.d.ts +33 -0
- package/dist/types/lib/subcomponent/FileUploadInput/hooks/useFileUploads.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/FileUploadInput/hooks/useObjectUrl.d.ts +8 -0
- package/dist/types/lib/subcomponent/FileUploadInput/hooks/useObjectUrl.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/FileUploadInput/index.d.ts +1 -1
- package/dist/types/lib/subcomponent/FileUploadInput/index.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/FileUploadInput/messages.d.ts +4 -0
- package/dist/types/lib/subcomponent/FileUploadInput/messages.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/FileUploadInput/types.d.ts +165 -8
- package/dist/types/lib/subcomponent/FileUploadInput/types.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/FileUploadInput/utils/formatFileSize.d.ts +7 -0
- package/dist/types/lib/subcomponent/FileUploadInput/utils/formatFileSize.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/FileUploadInput/utils/getFileMessage.d.ts +14 -0
- package/dist/types/lib/subcomponent/FileUploadInput/utils/getFileMessage.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/FileUploadInput/utils/index.d.ts +5 -0
- package/dist/types/lib/subcomponent/FileUploadInput/utils/index.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/FileUploadInput/utils/matchesAccept.d.ts +10 -0
- package/dist/types/lib/subcomponent/FileUploadInput/utils/matchesAccept.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/PhoneInput/PhoneInput.d.ts +12 -0
- package/dist/types/lib/subcomponent/PhoneInput/PhoneInput.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/PhoneInput/types.d.ts +11 -2
- package/dist/types/lib/subcomponent/PhoneInput/types.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/TextInput/TextInput.d.ts +2 -0
- package/dist/types/lib/subcomponent/TextInput/TextInput.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/index.d.ts +7 -7
- package/dist/types/lib/subcomponent/index.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/types.d.ts +6 -0
- package/dist/types/lib/subcomponent/types.d.ts.map +1 -1
- package/dist/types/lib/utils/hooks/useFieldAriaProperties.d.ts +2 -1
- package/dist/types/lib/utils/hooks/useFieldAriaProperties.d.ts.map +1 -1
- package/dist/types/lib/utils/hooks/useOptionAriaProperties.d.ts +3 -2
- package/dist/types/lib/utils/hooks/useOptionAriaProperties.d.ts.map +1 -1
- package/dist/types/lib/utils/middleware/addRESTOptions.d.ts +37 -4
- package/dist/types/lib/utils/middleware/addRESTOptions.d.ts.map +1 -1
- package/dist/types/lib/utils/middleware/addRESTValidation.d.ts +38 -3
- package/dist/types/lib/utils/middleware/addRESTValidation.d.ts.map +1 -1
- package/dist/types/lib/utils/middleware/index.d.ts +2 -0
- package/dist/types/lib/utils/middleware/index.d.ts.map +1 -1
- package/dist/types/testing/expectNoAxeViolations.d.ts +10 -0
- package/dist/types/testing/expectNoAxeViolations.d.ts.map +1 -0
- package/package.json +23 -18
- package/dist/esm/lib/component/ColorField/ColorField.js.map +0 -1
- package/dist/esm/lib/component/ColorField/index.js.map +0 -1
- package/dist/esm/lib/component/ColorField/types.js.map +0 -1
- package/dist/esm/lib/component/ComboboxField/ComboboxField.js.map +0 -1
- package/dist/esm/lib/component/ComboboxField/index.js.map +0 -1
- package/dist/esm/lib/component/ComboboxField/types.js.map +0 -1
- package/dist/esm/lib/component/RatingField/RatingField.js.map +0 -1
- package/dist/esm/lib/component/RatingField/index.js.map +0 -1
- package/dist/esm/lib/component/RatingField/types.js.map +0 -1
- package/dist/esm/lib/subcomponent/ColorInput/ColorInput.js.map +0 -1
- package/dist/esm/lib/subcomponent/ColorInput/index.js.map +0 -1
- package/dist/esm/lib/subcomponent/ColorInput/types.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/ComboboxInput.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/MultipleCombobox.js +0 -84
- package/dist/esm/lib/subcomponent/ComboboxInput/MultipleCombobox.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/SingleCombobox.js +0 -67
- package/dist/esm/lib/subcomponent/ComboboxInput/SingleCombobox.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/common/List/List.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/common/List/index.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/common/List/types.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/common/ResetButton/ResetButton.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/common/ResetButton/index.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/common/ResetButton/types.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/common/index.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/constants.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/index.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/messages.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/types.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/utils/convertItemToString.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/utils/convertValueToItem.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/utils/filterItems.js.map +0 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/utils/index.js +0 -4
- package/dist/esm/lib/subcomponent/ComboboxInput/utils/index.js.map +0 -1
- package/dist/esm/lib/subcomponent/RatingInput/RatingInput.js.map +0 -1
- package/dist/esm/lib/subcomponent/RatingInput/index.js.map +0 -1
- package/dist/esm/lib/subcomponent/RatingInput/types.js.map +0 -1
- package/dist/types/lib/component/ColorField/ColorField.d.ts.map +0 -1
- package/dist/types/lib/component/ColorField/index.d.ts.map +0 -1
- package/dist/types/lib/component/ColorField/types.d.ts.map +0 -1
- package/dist/types/lib/component/ComboboxField/ComboboxField.d.ts +0 -56
- package/dist/types/lib/component/ComboboxField/ComboboxField.d.ts.map +0 -1
- package/dist/types/lib/component/ComboboxField/index.d.ts.map +0 -1
- package/dist/types/lib/component/ComboboxField/types.d.ts.map +0 -1
- package/dist/types/lib/component/RatingField/RatingField.d.ts.map +0 -1
- package/dist/types/lib/component/RatingField/index.d.ts.map +0 -1
- package/dist/types/lib/component/RatingField/types.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ColorInput/ColorInput.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ColorInput/index.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ColorInput/types.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/ComboboxInput.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/MultipleCombobox.d.ts +0 -16
- package/dist/types/lib/subcomponent/ComboboxInput/MultipleCombobox.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/SingleCombobox.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/common/List/List.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/common/List/index.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/common/List/types.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/common/ResetButton/ResetButton.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/common/ResetButton/index.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/common/ResetButton/types.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/common/index.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/constants.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/index.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/messages.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/types.d.ts +0 -27
- package/dist/types/lib/subcomponent/ComboboxInput/types.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/utils/convertItemToString.d.ts +0 -4
- package/dist/types/lib/subcomponent/ComboboxInput/utils/convertItemToString.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/utils/convertValueToItem.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/utils/filterItems.d.ts +0 -4
- package/dist/types/lib/subcomponent/ComboboxInput/utils/filterItems.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/ComboboxInput/utils/index.d.ts +0 -4
- package/dist/types/lib/subcomponent/ComboboxInput/utils/index.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/RatingInput/RatingInput.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/RatingInput/index.d.ts.map +0 -1
- package/dist/types/lib/subcomponent/RatingInput/types.d.ts.map +0 -1
- /package/dist/esm/lib/{component → _work_in_progress/component}/ColorField/index.js +0 -0
- /package/dist/esm/lib/{component → _work_in_progress/component}/ColorField/types.js +0 -0
- /package/dist/esm/lib/{component → _work_in_progress/component}/ComboboxField/index.js +0 -0
- /package/dist/esm/lib/{component → _work_in_progress/component}/ComboboxField/types.js +0 -0
- /package/dist/esm/lib/{component → _work_in_progress/component}/RatingField/index.js +0 -0
- /package/dist/esm/lib/{component → _work_in_progress/component}/RatingField/types.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ColorInput/ColorInput.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ColorInput/index.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ColorInput/styles.css +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ColorInput/types.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/ComboboxInput.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/common/List/index.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/common/List/styles.css +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/common/List/types.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/common/ResetButton/index.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/common/ResetButton/types.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/common/index.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/constants.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/index.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/styles.css +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/types.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/utils/convertItemToString.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/utils/convertValueToItem.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/utils/filterItems.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/RatingInput/RatingInput.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/RatingInput/index.js +0 -0
- /package/dist/esm/lib/{subcomponent → _work_in_progress/subcomponent}/RatingInput/types.js +0 -0
- /package/dist/types/lib/{component → _work_in_progress/component}/ColorField/index.d.ts +0 -0
- /package/dist/types/lib/{component → _work_in_progress/component}/ComboboxField/index.d.ts +0 -0
- /package/dist/types/lib/{component → _work_in_progress/component}/RatingField/index.d.ts +0 -0
- /package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/ColorInput/ColorInput.d.ts +0 -0
- /package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/ColorInput/index.d.ts +0 -0
- /package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/common/List/index.d.ts +0 -0
- /package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/common/ResetButton/index.d.ts +0 -0
- /package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/common/index.d.ts +0 -0
- /package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/constants.d.ts +0 -0
- /package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/ComboboxInput/index.d.ts +0 -0
- /package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/RatingInput/RatingInput.d.ts +0 -0
- /package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/RatingInput/index.d.ts +0 -0
- /package/dist/types/lib/{subcomponent → _work_in_progress/subcomponent}/RatingInput/types.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addRESTOptions.d.ts","sourceRoot":"","sources":["../../../../../src/lib/utils/middleware/addRESTOptions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"addRESTOptions.d.ts","sourceRoot":"","sources":["../../../../../src/lib/utils/middleware/addRESTOptions.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAyB,EACvB,KAAK,oBAAoB,EAE1B,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAK1D,UAAU,mBAAmB,CAAC,IAAI;IAChC,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,EAAE,CAAC;CAC1C;AAED,yEAAyE;AACzE,KAAK,iBAAiB,GAAG,cAAc,GAAG;IACxC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,+DAA+D;AAC/D,KAAK,iBAAiB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAkGjE;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,mBAAmB,CAAC,IAAI,GAAG,MAAM,EAAE,EAC1C,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,mBAAmB,CAAC,IAAI,CAAM,GACtC,iBAAiB,CASnB;eAEc,mBAAmB"}
|
|
@@ -1,12 +1,47 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BaseInputProps } from "../../common/types.js";
|
|
2
|
+
import { type ConfiguredMiddleware } from "../../common/Wrapper/createMiddleware.js";
|
|
2
3
|
interface ValidationOptions {
|
|
4
|
+
/** HTTP method of the validation request. Defaults to `"POST"`. */
|
|
3
5
|
method?: string;
|
|
6
|
+
/** Headers sent with the validation request. Default to a JSON content type. */
|
|
4
7
|
headers?: Record<string, string>;
|
|
5
|
-
|
|
8
|
+
/** Builds the JSON request body from the value. Defaults to `{ value }`. */
|
|
9
|
+
bodyFormatter?: (value: string) => unknown;
|
|
10
|
+
/** Reads the error message from a failed response. */
|
|
6
11
|
errorExtractor?: (response: Response) => Promise<string> | string;
|
|
12
|
+
/** Shortest value that is sent for validation. Defaults to 3. */
|
|
7
13
|
minLength?: number;
|
|
14
|
+
/** Milliseconds to wait after the last change before sending. Defaults to 300. */
|
|
8
15
|
debounceWait?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Milliseconds to wait for the endpoint's answer before giving up, so a
|
|
18
|
+
* request that never completes cannot hold a submit. Defaults to 10000.
|
|
19
|
+
*/
|
|
20
|
+
timeout?: number;
|
|
9
21
|
}
|
|
10
|
-
|
|
22
|
+
/** A middleware that works with any field. */
|
|
23
|
+
type ValidationMiddleware = ConfiguredMiddleware<BaseInputProps>;
|
|
24
|
+
/**
|
|
25
|
+
* Validates a field's value against a REST endpoint once the user stops
|
|
26
|
+
* typing, and sets the field's error when the endpoint rejects it.
|
|
27
|
+
*
|
|
28
|
+
* The check is also registered as the field's `restValidation` rule, so
|
|
29
|
+
* submitting re-checks the value and a rejected value blocks the submit. Each
|
|
30
|
+
* change cancels the pending timer and aborts the request in flight, so only
|
|
31
|
+
* the answer for the latest value can set or clear the error; unmounting the
|
|
32
|
+
* field does the same. A request that fails to complete keeps the previous
|
|
33
|
+
* message, and a request still unanswered after `timeout` is given up. It
|
|
34
|
+
* only clears the error it set, so an error from the field's own rules or
|
|
35
|
+
* another middleware stays in place. Two instances on one field each keep
|
|
36
|
+
* their own message, and submit runs both checks. The middleware can be
|
|
37
|
+
* created inline: the field keeps one instance.
|
|
38
|
+
*
|
|
39
|
+
* @param url - The endpoint validating the value.
|
|
40
|
+
* @param options - Request, debounce and error options.
|
|
41
|
+
* @returns A middleware for any field.
|
|
42
|
+
*
|
|
43
|
+
* `import { addRESTValidation } from "@canonical/react-ds-global-form";`
|
|
44
|
+
*/
|
|
45
|
+
declare function addRESTFieldValidation(url: string, options?: ValidationOptions): ValidationMiddleware;
|
|
11
46
|
export default addRESTFieldValidation;
|
|
12
47
|
//# sourceMappingURL=addRESTValidation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addRESTValidation.d.ts","sourceRoot":"","sources":["../../../../../src/lib/utils/middleware/addRESTValidation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"addRESTValidation.d.ts","sourceRoot":"","sources":["../../../../../src/lib/utils/middleware/addRESTValidation.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAyB,EACvB,KAAK,oBAAoB,EAE1B,MAAM,0CAA0C,CAAC;AAElD,UAAU,iBAAiB;IACzB,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,4EAA4E;IAC5E,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IAC3C,sDAAsD;IACtD,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAClE,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAsCD,8CAA8C;AAC9C,KAAK,oBAAoB,GAAG,oBAAoB,CAAC,cAAc,CAAC,CAAC;AA6PjE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,iBAAS,sBAAsB,CAC7B,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,iBAAsB,GAC9B,oBAAoB,CAoBtB;eAEc,sBAAsB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export type { ConfiguredMiddleware, MiddlewareBuilder, } from "../../common/Wrapper/createMiddleware.js";
|
|
2
|
+
export { default as createMiddleware } from "../../common/Wrapper/createMiddleware.js";
|
|
1
3
|
export { default as addRESTOptions } from "./addRESTOptions.js";
|
|
2
4
|
export { default as addRESTValidation } from "./addRESTValidation.js";
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/utils/middleware/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/utils/middleware/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asserts that axe finds no violation in a rendered element, naming every
|
|
3
|
+
* rule it breaks and where, so a failure reads as the finding itself.
|
|
4
|
+
*
|
|
5
|
+
* Necessary evidence, not a conformance claim: axe checks what markup can
|
|
6
|
+
* prove, and says nothing of keyboard journeys or what a screen reader
|
|
7
|
+
* announces.
|
|
8
|
+
*/
|
|
9
|
+
export default function expectNoAxeViolations(element: Element): Promise<void>;
|
|
10
|
+
//# sourceMappingURL=expectNoAxeViolations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expectNoAxeViolations.d.ts","sourceRoot":"","sources":["../../../src/testing/expectNoAxeViolations.ts"],"names":[],"mappings":"AAgBA;;;;;;;GAOG;AACH,wBAA8B,qBAAqB,CACjD,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,IAAI,CAAC,CAQf"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonical/react-ds-global-form",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"sideEffects": [
|
|
6
|
+
"*.css"
|
|
7
|
+
],
|
|
8
|
+
"main": "dist/esm/index.js",
|
|
5
9
|
"module": "dist/esm/index.js",
|
|
6
10
|
"types": "dist/types/index.d.ts",
|
|
7
11
|
"style": "dist/esm/index.css",
|
|
@@ -43,26 +47,26 @@
|
|
|
43
47
|
"test:vitest:watch": "vitest"
|
|
44
48
|
},
|
|
45
49
|
"dependencies": {
|
|
46
|
-
"@canonical/ds-utils": "^0.
|
|
47
|
-
"@canonical/react-ds-global": "^0.
|
|
48
|
-
"@canonical/
|
|
49
|
-
"@canonical/
|
|
50
|
-
"@canonical/utils": "0.43.0",
|
|
50
|
+
"@canonical/ds-utils": "^0.48.0",
|
|
51
|
+
"@canonical/react-ds-global": "^0.48.0",
|
|
52
|
+
"@canonical/styles": "^0.48.0",
|
|
53
|
+
"@canonical/utils": "0.46.0",
|
|
51
54
|
"downshift": "^9.3.2",
|
|
52
55
|
"react": "^19.2.4",
|
|
53
56
|
"react-dom": "^19.2.4",
|
|
54
57
|
"react-hook-form": "^7.71.2"
|
|
55
58
|
},
|
|
56
59
|
"devDependencies": {
|
|
57
|
-
"@biomejs/biome": "2.
|
|
58
|
-
"@canonical/biome-config": "0.
|
|
59
|
-
"@canonical/design-tokens": "0.
|
|
60
|
-
"@canonical/storybook-addon-form-state": "^0.
|
|
61
|
-
"@canonical/storybook-addon-msw": "^0.
|
|
62
|
-
"@canonical/storybook-
|
|
63
|
-
"@canonical/
|
|
64
|
-
"@canonical/
|
|
65
|
-
"@canonical/
|
|
60
|
+
"@biomejs/biome": "2.6.9",
|
|
61
|
+
"@canonical/biome-config": "0.47.0",
|
|
62
|
+
"@canonical/design-tokens": "0.46.0",
|
|
63
|
+
"@canonical/storybook-addon-form-state": "^0.48.0",
|
|
64
|
+
"@canonical/storybook-addon-msw": "^0.48.0",
|
|
65
|
+
"@canonical/storybook-config": "^0.48.0",
|
|
66
|
+
"@canonical/storybook-helpers": "^0.48.0",
|
|
67
|
+
"@canonical/typescript-config-react": "^0.48.0",
|
|
68
|
+
"@canonical/vitest-config-react": "^0.48.0",
|
|
69
|
+
"@canonical/webarchitect": "0.46.0",
|
|
66
70
|
"@chromatic-com/storybook": "^5.0.1",
|
|
67
71
|
"@storybook/addon-docs": "^10.6.0",
|
|
68
72
|
"@storybook/react-vite": "^10.6.0",
|
|
@@ -73,14 +77,15 @@
|
|
|
73
77
|
"@types/react": "^19.2.14",
|
|
74
78
|
"@types/react-dom": "^19.2.3",
|
|
75
79
|
"@vitejs/plugin-react": "^6.0.0",
|
|
80
|
+
"axe-core": "^4.11.1",
|
|
76
81
|
"copyfiles": "^2.4.1",
|
|
77
82
|
"globals": "^17.4.0",
|
|
78
|
-
"jsdom": "^
|
|
79
|
-
"msw": "^
|
|
83
|
+
"jsdom": "^31.0.0",
|
|
84
|
+
"msw": "^3.0.0",
|
|
80
85
|
"storybook": "^10.6.0",
|
|
81
86
|
"typescript": "^7.0.2",
|
|
82
87
|
"vite": "^8.0.1",
|
|
83
88
|
"vitest": "^5.0.0"
|
|
84
89
|
},
|
|
85
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "aee4aebab851f90159776a7ba658d0c62e0d2bf4"
|
|
86
91
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorField.js","sourceRoot":"","sources":["../../../../../src/lib/component/ColorField/ColorField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAGpE;;;;;;GAMG;AACH,eAAe,WAAW,CACxB,SAAS,CAAkB,UAAU,EAAE,YAAY,EAAE;IACnD,YAAY,EAAE,SAAS;CACxB,CAAC,CACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/component/ColorField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/lib/component/ColorField/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxField.js","sourceRoot":"","sources":["../../../../../src/lib/component/ComboboxField/ComboboxField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAG1E;;;;;;;;GAQG;AACH,eAAe,WAAW,CACxB,SAAS,CAAqB,aAAa,EAAE,YAAY,CAAC,CAC3D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/component/ComboboxField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/lib/component/ComboboxField/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RatingField.js","sourceRoot":"","sources":["../../../../../src/lib/component/RatingField/RatingField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAGtE;;;;;;;;GAQG;AACH,eAAe,WAAW,CACxB,SAAS,CAAmB,WAAW,EAAE,YAAY,CAAC,CACvD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/component/RatingField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/lib/component/RatingField/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorInput.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/ColorInput/ColorInput.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,cAAc,CAAC;AAEtB,MAAM,WAAW,GAA8B;IAC7C,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,mBAAmB;IACzB,IAA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ACb,SAAS,EAAE;gCACT,QAAQ;gCACR,KAAK,CAAC,WAAW,EAAE,KAAK,YAAY,CAAC,WAAW,EAAE;oCAChD,UAAU;6BACb;iCACE,MAAM,CAAC,OAAO,CAAC;iCACf,IAAI,CAAC,GAAG,CAAC,EACZ,KAAK,EAAE,EAAE,eAAe,EAAE,KAAK,EAAE,EACjC,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,mBACxB,KAAK,CAAC,WAAW,EAAE,KAAK,YAAY,CAAC,WAAW,EAAE,gBACrD,KAAK,EACjB,QAAQ,EAAE,QAAQ,IAdb,KAAK,CAeV,CACH,CAAC,GACE,EAEL,WAAW,IACR,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/ColorInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/ColorInput/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxInput.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/ComboboxInput/ComboboxInput.tsx"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,aAAa,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CACrC,SAAS,aAAa,CACpB,EAAE,SAAS,EAAE,UAAU,GAAG,KAAK,EAAE,GAAG,UAAU,EAAE,EAChD,GAAG;IAEH,MAAM,iBAAiB,GAAG,CAAC,qBAAqB,EAAE,SAAS,CAAC;SACzD,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,KAAC,gBAAgB,IAAC,SAAS,EAAE,iBAAiB,KAAM,UAAU,GAAI,CAAC;IAC5E,CAAC;IACD,OAAO,CACL,KAAC,cAAc,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,iBAAiB,KAAM,UAAU,GAAI,CAC3E,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useCombobox, useMultipleSelection } from "downshift";
|
|
3
|
-
import { useCallback, useEffect, useState } from "react";
|
|
4
|
-
import { List, ResetButton } from "./common/index.js";
|
|
5
|
-
import { VALUE_KEY } from "./constants.js";
|
|
6
|
-
import { convertItemToString as defaultConvertItemToString, convertValueToItem as defaultConvertValueToItem, filterItems as defaultFilterItems, } from "./utils/index.js";
|
|
7
|
-
import "./styles.css";
|
|
8
|
-
const componentCssClassName = "ds form-combobox";
|
|
9
|
-
/**
|
|
10
|
-
* Multiple-select combobox (presentational, controlled — no react-hook-form).
|
|
11
|
-
* Selected values are rendered as removable chips. Uses downshift's
|
|
12
|
-
* useMultipleSelection + useCombobox.
|
|
13
|
-
*
|
|
14
|
-
* @param {ComboboxInputProps} props - The component props
|
|
15
|
-
* @returns {React.ReactElement} - Rendered MultipleCombobox component
|
|
16
|
-
*
|
|
17
|
-
* `import { MultipleCombobox } from "@canonical/react-ds-global-form";`
|
|
18
|
-
*/
|
|
19
|
-
const MultipleCombobox = ({ id, className, style, options, value, onChange, disabled = false, placeholder, valueKey = VALUE_KEY, convertItemToString = defaultConvertItemToString, convertValueToItem = defaultConvertValueToItem, filterItems = defaultFilterItems, onInputValueChangeFactory, }) => {
|
|
20
|
-
// State for selected items and filtered items
|
|
21
|
-
const [selectedItems, setSelectedItems] = useState([]);
|
|
22
|
-
const [items, setItems] = useState(options);
|
|
23
|
-
// Convert array of values to array of Option objects
|
|
24
|
-
const convertValuesToItems = useCallback((values) => {
|
|
25
|
-
return values
|
|
26
|
-
.map((val) => convertValueToItem(val, options, valueKey))
|
|
27
|
-
.filter(Boolean);
|
|
28
|
-
}, [convertValueToItem, options, valueKey]);
|
|
29
|
-
// Keep selectedItems in sync with the controlled value — on mount and on every
|
|
30
|
-
// change. Must clear as well as populate: an empty/undefined `value` (e.g. after
|
|
31
|
-
// reset) has to drive `selectedItems` back to [], otherwise a later re-render
|
|
32
|
-
// that re-supplies the previous array would resurrect the cleared chips.
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
const values = value ?? [];
|
|
35
|
-
setSelectedItems(values.length > 0 ? convertValuesToItems(values) : []);
|
|
36
|
-
}, [value, convertValuesToItems]);
|
|
37
|
-
// Downshift's useMultipleSelection hook for managing multiple selections
|
|
38
|
-
const { getSelectedItemProps, getDropdownProps, addSelectedItem, removeSelectedItem, } = useMultipleSelection({
|
|
39
|
-
selectedItems,
|
|
40
|
-
onSelectedItemsChange: ({ selectedItems: newSelectedItems }) => {
|
|
41
|
-
if (newSelectedItems) {
|
|
42
|
-
setSelectedItems(newSelectedItems);
|
|
43
|
-
// Emit [] (never undefined) when the list empties: with a react-hook-form
|
|
44
|
-
// Controller that has a defaultValue, onChange(undefined) reverts the field
|
|
45
|
-
// to that default, resurrecting the removed chips. [] clears cleanly.
|
|
46
|
-
const newValue = newSelectedItems.map((item) => item[valueKey]);
|
|
47
|
-
onChange?.(newValue);
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
// Default onInputValueChangeFactory: filters items locally
|
|
52
|
-
const defaultOnInputValueChangeFactory = useCallback(() => ({ inputValue }) => {
|
|
53
|
-
setItems(filterItems(options, inputValue));
|
|
54
|
-
}, [filterItems, options]);
|
|
55
|
-
// Use provided onInputValueChangeFactory or default
|
|
56
|
-
const onInputValueChange = onInputValueChangeFactory
|
|
57
|
-
? onInputValueChangeFactory(setItems)
|
|
58
|
-
: defaultOnInputValueChangeFactory();
|
|
59
|
-
// Downshift's useCombobox hook for combobox functionality
|
|
60
|
-
const { isOpen, getMenuProps, getInputProps, getItemProps, highlightedIndex, setInputValue, // Function to set input value
|
|
61
|
-
} = useCombobox({
|
|
62
|
-
items,
|
|
63
|
-
onInputValueChange,
|
|
64
|
-
onSelectedItemChange: ({ selectedItem }) => {
|
|
65
|
-
if (selectedItem &&
|
|
66
|
-
!selectedItems.some((item) => item[valueKey] === selectedItem[valueKey])) {
|
|
67
|
-
addSelectedItem(selectedItem);
|
|
68
|
-
setInputValue(""); // Clear input after selection
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
itemToString: convertItemToString,
|
|
72
|
-
});
|
|
73
|
-
// Reset function to clear selections and input. Emits [] (not undefined) so a
|
|
74
|
-
// react-hook-form Controller with a defaultValue stores the cleared state
|
|
75
|
-
// rather than falling back to its default and repopulating the chips.
|
|
76
|
-
const resetSelection = useCallback(() => {
|
|
77
|
-
setSelectedItems([]);
|
|
78
|
-
setInputValue("");
|
|
79
|
-
onChange?.([]);
|
|
80
|
-
}, [onChange, setInputValue]);
|
|
81
|
-
return (_jsxs("div", { id: id, style: style, className: [componentCssClassName, className].filter(Boolean).join(" "), children: [_jsx("div", { className: "selected-items", children: selectedItems.map((selectedItem, index) => (_jsxs("button", { ...getSelectedItemProps({ selectedItem, index }), onClick: () => removeSelectedItem(selectedItem), className: "chip", children: [convertItemToString(selectedItem), _jsx("span", { className: "remove-icon", children: "\u00D7" })] }, String(selectedItem[valueKey])))) }), _jsxs("div", { className: "ds input combobox-input chrome", children: [_jsx("input", { className: "p", ...getInputProps(getDropdownProps({ preventKeyAction: isOpen })), placeholder: placeholder, disabled: disabled }), _jsx(ResetButton, { onClick: resetSelection })] }), _jsx(List, { isOpen: isOpen, getMenuProps: getMenuProps, getItemProps: getItemProps, items: items, highlightedIndex: highlightedIndex, convertItemToString: convertItemToString, valueKey: valueKey, fieldValue: selectedItems.map((item) => String(item[valueKey])) })] }));
|
|
82
|
-
};
|
|
83
|
-
export default MultipleCombobox;
|
|
84
|
-
//# sourceMappingURL=MultipleCombobox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MultipleCombobox.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/ComboboxInput/MultipleCombobox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EACL,mBAAmB,IAAI,0BAA0B,EACjD,kBAAkB,IAAI,yBAAyB,EAC/C,WAAW,IAAI,kBAAkB,GAClC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AAEjD;;;;;;;;;GASG;AACH,MAAM,gBAAgB,GAAG,CAAC,EACxB,EAAE,EACF,SAAS,EACT,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,WAAW,EACX,QAAQ,GAAG,SAAS,EACpB,mBAAmB,GAAG,0BAA0B,EAChD,kBAAkB,GAAG,yBAAyB,EAC9C,WAAW,GAAG,kBAAkB,EAChC,yBAAyB,GACN,EAAsB,EAAE;IAC3C,8CAA8C;IAC9C,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAW,EAAE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x as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/* @canonical/generator-ds 0.9.0-experimental.9 */
|
|
3
|
-
import { useCombobox } from "downshift";
|
|
4
|
-
import { forwardRef, useCallback, useEffect, useRef, useState } from "react";
|
|
5
|
-
import mergeRefs from "../../utils/mergeRefs.js";
|
|
6
|
-
import { List, ResetButton } from "./common/index.js";
|
|
7
|
-
import { VALUE_KEY } from "./constants.js";
|
|
8
|
-
import { convertItemToString as defaultConvertItemToString, convertValueToItem as defaultConvertValueToItem, filterItems as defaultFilterItems, } from "./utils/index.js";
|
|
9
|
-
import "./styles.css";
|
|
10
|
-
const componentCssClassName = "ds form-combobox";
|
|
11
|
-
/**
|
|
12
|
-
* Single-select combobox (presentational, controlled — no react-hook-form).
|
|
13
|
-
*
|
|
14
|
-
* Disambiguation:
|
|
15
|
-
* - `Option` is this library's option type, common to Select/Choices/Combobox.
|
|
16
|
-
* - `Item` is the downshift-cast form of an Option.
|
|
17
|
-
*
|
|
18
|
-
* The forwarded ref (the field's ref when bound) is merged with the internal
|
|
19
|
-
* input ref so focus management still works.
|
|
20
|
-
*/
|
|
21
|
-
export const SingleCombobox = forwardRef(function SingleCombobox({ id, className, style, options, value, onChange, onBlur, disabled = false, openOnReset = false, onInputValueChangeFactory, placeholder, valueKey = VALUE_KEY, convertItemToString = defaultConvertItemToString, convertValueToItem = defaultConvertValueToItem, filterItems = defaultFilterItems, }, fieldRef) {
|
|
22
|
-
const [items, setItems] = useState(options);
|
|
23
|
-
const currentValue = value;
|
|
24
|
-
const handleSelectedItemChange = useCallback((changes) => {
|
|
25
|
-
onChange?.(changes.selectedItem?.[valueKey] || undefined);
|
|
26
|
-
}, [onChange, valueKey]);
|
|
27
|
-
/* This allows for the option logic to be controlled externally, for instance by a backend
|
|
28
|
-
* For simpler use cases, simply pass a custom filterItems function */
|
|
29
|
-
const defaultOnInputValueChangeFactory = (stateUpdater) => ({ inputValue }) => stateUpdater(filterItems(options, inputValue));
|
|
30
|
-
const onInputValueChange = onInputValueChangeFactory
|
|
31
|
-
? onInputValueChangeFactory(setItems)
|
|
32
|
-
: defaultOnInputValueChangeFactory(setItems);
|
|
33
|
-
const { isOpen, openMenu, selectItem, selectedItem, getMenuProps, getInputProps, highlightedIndex, getItemProps, } = useCombobox({
|
|
34
|
-
items,
|
|
35
|
-
onSelectedItemChange: handleSelectedItemChange,
|
|
36
|
-
onInputValueChange,
|
|
37
|
-
initialSelectedItem: convertValueToItem(currentValue, options),
|
|
38
|
-
itemToString: convertItemToString,
|
|
39
|
-
});
|
|
40
|
-
const inputRef = useRef(null); // Own ref to manage focus
|
|
41
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: run the effect only when the field value changes
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
(async () => {
|
|
44
|
-
if (currentValue !== selectedItem?.[valueKey]) {
|
|
45
|
-
const newItem = await convertValueToItem(currentValue, options);
|
|
46
|
-
selectItem(newItem);
|
|
47
|
-
}
|
|
48
|
-
})();
|
|
49
|
-
}, [currentValue]);
|
|
50
|
-
const resetAndFocusInput = useCallback(() => {
|
|
51
|
-
onChange?.(undefined); // Consistent with handleSelectedItemChange
|
|
52
|
-
selectItem(null);
|
|
53
|
-
inputRef.current?.focus();
|
|
54
|
-
if (openOnReset) {
|
|
55
|
-
openMenu();
|
|
56
|
-
}
|
|
57
|
-
}, [selectItem, openOnReset, openMenu, onChange]);
|
|
58
|
-
const combinedRef = mergeRefs(inputRef, fieldRef ?? undefined);
|
|
59
|
-
return (_jsxs("div", { id: id, style: style, className: [componentCssClassName, className].filter(Boolean).join(" "), children: [_jsxs("div", { className: "ds input combobox-input chrome", children: [_jsx("input", { className: "p", ...getInputProps({
|
|
60
|
-
disabled,
|
|
61
|
-
placeholder,
|
|
62
|
-
onBlur,
|
|
63
|
-
ref: combinedRef,
|
|
64
|
-
}) }), _jsx(ResetButton, { onClick: resetAndFocusInput })] }), _jsx(List, { isOpen: isOpen, getMenuProps: getMenuProps, getItemProps: getItemProps, items: items, highlightedIndex: highlightedIndex, fieldValue: currentValue, convertItemToString: convertItemToString, valueKey: valueKey })] }));
|
|
65
|
-
});
|
|
66
|
-
export default SingleCombobox;
|
|
67
|
-
//# sourceMappingURL=SingleCombobox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SingleCombobox.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/ComboboxInput/SingleCombobox.tsx"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,OAAO,EAA+B,WAAW,EAAE,MAAM,WAAW,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7E,OAAO,SAAS,MAAM,0BAA0B,CAAC;AAEjD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EACL,mBAAmB,IAAI,0BAA0B,EACjD,kBAAkB,IAAI,yBAAyB,EAC/C,WAAW,IAAI,kBAAkB,GAClC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AAEjD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CACtC,SAAS,cAAc,CACrB,EACE,EAAE,EACF,SAAS,EACT,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,MAAM,EACN,QAAQ,GAAG,KAAK,EAChB,WAAW,GAAG,KAAK,EACnB,yBAAyB,EACzB,WAAW,EACX,QAAQ,GAAG,SAAS,EACpB,mBAAmB,GAAG,0BAA0B,EAChD,kBAAkB,GAAG,yBAAyB,EAC9C,WAAW,GAAG,kBAAkB,GACjC,EACD,QAAQ;IAER,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,OAAO,CA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Q,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;YAChC,MAAM,GAAG,GAAG,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,KAAK,EAAE,CAAC;YACxE,IAAI,UAAU,GAAG,KAAK,CAAC;YAEvB,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;gBAC7B,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;oBAC9B,UAAU,GAAG,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACrD,CAAC;qBAAM,CAAC;oBACN,UAAU,GAAG,UAAU,KAAK,MAAM,CAAC,QAAQ,CAAC,CAAC;gBAC/C,CAAC;YACH,CAAC;YACD,OAAO,CACL,0BACM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EACjC,SAAS,EAAE;oBACT,GAAG;oBACH,gBAAgB,KAAK,KAAK,IAAI,aAAa;oBAC3C,UAAU,IAAI,UAAU;iBACzB;qBACE,MAAM,CAAC,OAAO,CAAC;qBACf,IAAI,CAAC,GAAG,CAAC,EACZ,GAAG,EAAE,GAAG,IAEP,mBAAmB,CAAC,IAAI,CAAC,CACvB,CACN,CAAC;QACJ,CAAC,CAAC,GACC,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/lib/subcomponent/ComboboxInput/common/List/index.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,cAAc,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../src/lib/subcomponent/ComboboxInput/common/List/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ResetButton.js","sourceRoot":"","sources":["../../../../../../../src/lib/subcomponent/ComboboxInput/common/ResetButton/ResetButton.tsx"],"names":[],"mappings":";AAGA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,WAAW,GAAG,CAAC,EACnB,EAAE,EACF,SAAS,EACT,QAAQ,GAAG,eAAe,EAC1B,KAAK,EACL,OAAO,GACU,EAAsB,EAAE;IACzC,OAAO,CACL,KAAC,MAAM,IACL,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,gBAC3D,QAAQ,CAAC,KAAK,EAAE,EAC5B,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,OAAO,kBAGT,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/lib/subcomponent/ComboboxInput/common/ResetButton/index.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,cAAc,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../src/lib/subcomponent/ComboboxInput/common/ResetButton/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/lib/subcomponent/ComboboxInput/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAEhC,cAAc,wBAAwB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/ComboboxInput/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/ComboboxInput/index.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/ComboboxInput/messages.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,KAAK,EAAE,GAAG,EAAE,CAAC,iBAAiB;IAC9B,KAAK,EAAE,GAAG,EAAE,CAAC,iBAAiB;CAC/B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/ComboboxInput/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convertItemToString.js","sourceRoot":"","sources":["../../../../../../src/lib/subcomponent/ComboboxInput/utils/convertItemToString.ts"],"names":[],"mappings":"AAEA,SAAS,mBAAmB,CAAC,IAAmB;IAC9C,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAChC,CAAC;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convertValueToItem.js","sourceRoot":"","sources":["../../../../../../src/lib/subcomponent/ComboboxInput/utils/convertValueToItem.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,SAAS,kBAAkB,CACzB,KAAa,EACb,KAAe,EACf,QAAQ,GAAiB,SAAS;IAElC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,KAAK,CAAC,IAAI,IAAI,CAAC;AACxE,CAAC;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterItems.js","sourceRoot":"","sources":["../../../../../../src/lib/subcomponent/ComboboxInput/utils/filterItems.ts"],"names":[],"mappings":"AAEA,SAAS,WAAW,CAAC,KAAe,EAAE,UAAkB;IACtD,OAAO,KAAK,CAAC,MAAM,CACjB,CAAC,IAAI,EAAE,EAAE,CACP,CAAC,UAAU;QACX,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAC9D,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/lib/subcomponent/ComboboxInput/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RatingInput.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/RatingInput/RatingInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,KAAK,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAq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C,oBAAoB,YAAE,KAAK,GAAQ,KAlB9C,MAAM,CAmBL,CACT,CAAC;gBACJ,CAAC,CAAC,KAlCwB,IAAI,CAmCzB,CACR,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/RatingInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/RatingInput/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorField.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/ColorField/ColorField.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;;;;;GAMG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/ColorField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACxD,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/ColorField/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAE9E,uDAAuD;AACvD,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { ComboboxFieldProps } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* ComboboxInput bound to react-hook-form (controlled), wrapped with field chrome.
|
|
4
|
-
* The single composite value is owned by the field; the presentational
|
|
5
|
-
* ComboboxInput decomposes it across its input/list/chips internally.
|
|
6
|
-
*
|
|
7
|
-
* `import { ComboboxField } from "@canonical/react-ds-global-form";`
|
|
8
|
-
*
|
|
9
|
-
* @implements ds:global.component.combobox_field
|
|
10
|
-
*/
|
|
11
|
-
declare const _default: (props: {
|
|
12
|
-
id?: string;
|
|
13
|
-
className?: string;
|
|
14
|
-
style?: React.CSSProperties;
|
|
15
|
-
options: import("../../index.js").Option[];
|
|
16
|
-
name: string;
|
|
17
|
-
registerProps?: import("react-hook-form").RegisterOptions;
|
|
18
|
-
"aria-labelledby"?: string;
|
|
19
|
-
"aria-describedby"?: string;
|
|
20
|
-
"aria-errormessage"?: string;
|
|
21
|
-
"aria-invalid"?: boolean;
|
|
22
|
-
description?: string;
|
|
23
|
-
label?: string;
|
|
24
|
-
controlLabel?: string;
|
|
25
|
-
labelPosition?: "before" | "after";
|
|
26
|
-
isOptional?: boolean;
|
|
27
|
-
requiredIndicator?: import("../../subcomponent/index.js").RequiredIndicator;
|
|
28
|
-
nestedRegisterProps?: import("react-hook-form").RegisterOptions;
|
|
29
|
-
unregisterOnUnmount?: boolean;
|
|
30
|
-
mockLabel?: boolean;
|
|
31
|
-
middleware?: (import("../../index.js").Middleware<ComboboxFieldProps>[] & import("../../index.js").Middleware<Omit<import("../../index.js").WrappedComponentProps<ComboboxFieldProps>, "Component"> & {
|
|
32
|
-
condition?: import("../../index.js").Condition;
|
|
33
|
-
}>[]) | undefined;
|
|
34
|
-
WrapperComponent?: (import("react").ComponentType<import("../../index.js").WrapperProps<ComboboxFieldProps>> & import("react").ComponentType<import("../../index.js").WrapperProps<Omit<import("../../index.js").WrappedComponentProps<ComboboxFieldProps>, "Component"> & {
|
|
35
|
-
condition?: import("../../index.js").Condition;
|
|
36
|
-
}>>) | undefined;
|
|
37
|
-
condition?: import("../../index.js").Condition;
|
|
38
|
-
value?: string | string[];
|
|
39
|
-
onChange?: (value: string | string[] | undefined) => void;
|
|
40
|
-
onBlur?: () => void;
|
|
41
|
-
disabled?: boolean;
|
|
42
|
-
placeholder?: string;
|
|
43
|
-
valueKey?: keyof import("../../index.js").Option;
|
|
44
|
-
openOnReset?: boolean;
|
|
45
|
-
isMultiple?: boolean;
|
|
46
|
-
filterItems?: (options: import("../../index.js").Option[], inputValue: string) => import("../../index.js").Option[];
|
|
47
|
-
convertItemToString?: typeof import("../../subcomponent/ComboboxInput/utils/convertItemToString.js").default;
|
|
48
|
-
convertValueToItem?: typeof import("../../subcomponent/ComboboxInput/utils/convertValueToItem.js").default;
|
|
49
|
-
onInputValueChangeFactory?: (setItems: React.Dispatch<React.SetStateAction<import("../../index.js").Option[]>>) => ({ inputValue }: {
|
|
50
|
-
inputValue: string;
|
|
51
|
-
}) => void;
|
|
52
|
-
}) => import("react").ReactElement<Omit<import("../../index.js").WrappedComponentProps<ComboboxFieldProps>, "Component"> & {
|
|
53
|
-
condition?: import("../../index.js").Condition;
|
|
54
|
-
}, string | import("react").JSXElementConstructor<any>> | null;
|
|
55
|
-
export default _default;
|
|
56
|
-
//# sourceMappingURL=ComboboxField.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxField.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/ComboboxField/ComboboxField.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD;;;;;;;;GAQG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/ComboboxField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9D,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/ComboboxField/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAEpF,0DAA0D;AAC1D,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RatingField.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/RatingField/RatingField.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;;;;;;;GAQG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/RatingField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/RatingField/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAEhF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorInput.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/ColorInput/ColorInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAa,MAAM,YAAY,CAAC;AAC7D,OAAO,cAAc,CAAC;AAuCtB;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,6HAYpB,eAAe,KAAG,KAAK,CAAC,YAiK1B,CAAC;eAEa,UAAU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/ColorInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACxD,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/ColorInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjD,qEAAqE;AACrE,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG;IACxC,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,oDAAoD;IACpD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEnC,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpB,yCAAyC;IACzC,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,8CAA8C;IAC9C,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;CAC1B,CAAC"}
|