@flipdish/ui-library 0.51.0 → 0.53.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 +17 -16
- package/dist/components/atoms/Checkbox/index.cjs +4 -2
- package/dist/components/atoms/Checkbox/index.cjs.map +1 -1
- package/dist/components/atoms/Checkbox/index.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/index.js +4 -2
- package/dist/components/atoms/Checkbox/index.js.map +1 -1
- package/dist/components/atoms/Slider/index.cjs +2 -2
- package/dist/components/atoms/Slider/index.cjs.map +1 -1
- package/dist/components/atoms/Slider/index.d.ts +3 -1
- package/dist/components/atoms/Slider/index.d.ts.map +1 -1
- package/dist/components/atoms/Slider/index.js +2 -2
- package/dist/components/atoms/Slider/index.js.map +1 -1
- package/dist/components/forms/Form/hooks/useForm.cjs +26 -0
- package/dist/components/forms/Form/hooks/useForm.cjs.map +1 -0
- package/dist/components/forms/Form/hooks/useForm.d.ts +13 -0
- package/dist/components/forms/Form/hooks/useForm.d.ts.map +1 -0
- package/dist/components/forms/Form/hooks/useForm.js +24 -0
- package/dist/components/forms/Form/hooks/useForm.js.map +1 -0
- package/dist/components/forms/Form/hooks/useSaveForm/useSaveForm.cjs +93 -0
- package/dist/components/forms/Form/hooks/useSaveForm/useSaveForm.cjs.map +1 -0
- package/dist/components/forms/Form/hooks/useSaveForm/useSaveForm.d.ts +54 -0
- package/dist/components/forms/Form/hooks/useSaveForm/useSaveForm.d.ts.map +1 -0
- package/dist/components/forms/Form/hooks/useSaveForm/useSaveForm.js +91 -0
- package/dist/components/forms/Form/hooks/useSaveForm/useSaveForm.js.map +1 -0
- package/dist/components/forms/Form/hooks/useSubmitInTurn/useSubmitInTurn.cjs +28 -0
- package/dist/components/forms/Form/hooks/useSubmitInTurn/useSubmitInTurn.cjs.map +1 -0
- package/dist/components/forms/Form/hooks/useSubmitInTurn/useSubmitInTurn.d.ts +10 -0
- package/dist/components/forms/Form/hooks/useSubmitInTurn/useSubmitInTurn.d.ts.map +1 -0
- package/dist/components/forms/Form/hooks/useSubmitInTurn/useSubmitInTurn.js +26 -0
- package/dist/components/forms/Form/hooks/useSubmitInTurn/useSubmitInTurn.js.map +1 -0
- package/dist/components/forms/Form/index.cjs +63 -0
- package/dist/components/forms/Form/index.cjs.map +1 -0
- package/dist/components/forms/Form/index.d.ts +37 -0
- package/dist/components/forms/Form/index.d.ts.map +1 -0
- package/dist/components/forms/Form/index.js +59 -0
- package/dist/components/forms/Form/index.js.map +1 -0
- package/dist/components/forms/Form/utilities/formSubmit.utils.cjs +23 -0
- package/dist/components/forms/Form/utilities/formSubmit.utils.cjs.map +1 -0
- package/dist/components/forms/Form/utilities/formSubmit.utils.d.ts +14 -0
- package/dist/components/forms/Form/utilities/formSubmit.utils.d.ts.map +1 -0
- package/dist/components/forms/Form/utilities/formSubmit.utils.js +21 -0
- package/dist/components/forms/Form/utilities/formSubmit.utils.js.map +1 -0
- package/dist/components/forms/FormFooter/hooks/useDestructiveConfirmation.cjs +39 -0
- package/dist/components/forms/FormFooter/hooks/useDestructiveConfirmation.cjs.map +1 -0
- package/dist/components/forms/FormFooter/hooks/useDestructiveConfirmation.d.ts +17 -0
- package/dist/components/forms/FormFooter/hooks/useDestructiveConfirmation.d.ts.map +1 -0
- package/dist/components/forms/FormFooter/hooks/useDestructiveConfirmation.js +37 -0
- package/dist/components/forms/FormFooter/hooks/useDestructiveConfirmation.js.map +1 -0
- package/dist/components/forms/FormFooter/hooks/useHasFieldError.cjs +26 -0
- package/dist/components/forms/FormFooter/hooks/useHasFieldError.cjs.map +1 -0
- package/dist/components/forms/FormFooter/hooks/useHasFieldError.d.ts +9 -0
- package/dist/components/forms/FormFooter/hooks/useHasFieldError.d.ts.map +1 -0
- package/dist/components/forms/FormFooter/hooks/useHasFieldError.js +24 -0
- package/dist/components/forms/FormFooter/hooks/useHasFieldError.js.map +1 -0
- package/dist/components/forms/FormFooter/index.cjs +41 -0
- package/dist/components/forms/FormFooter/index.cjs.map +1 -0
- package/dist/components/forms/FormFooter/index.d.ts +56 -0
- package/dist/components/forms/FormFooter/index.d.ts.map +1 -0
- package/dist/components/forms/FormFooter/index.js +39 -0
- package/dist/components/forms/FormFooter/index.js.map +1 -0
- package/dist/components/forms/FormFooter/utilities/formFooter.utils.cjs +21 -0
- package/dist/components/forms/FormFooter/utilities/formFooter.utils.cjs.map +1 -0
- package/dist/components/forms/FormFooter/utilities/formFooter.utils.d.ts +12 -0
- package/dist/components/forms/FormFooter/utilities/formFooter.utils.d.ts.map +1 -0
- package/dist/components/forms/FormFooter/utilities/formFooter.utils.js +19 -0
- package/dist/components/forms/FormFooter/utilities/formFooter.utils.js.map +1 -0
- package/dist/components/forms/FormSaveErrorAlert/index.cjs +28 -0
- package/dist/components/forms/FormSaveErrorAlert/index.cjs.map +1 -0
- package/dist/components/forms/FormSaveErrorAlert/index.d.ts +18 -0
- package/dist/components/forms/FormSaveErrorAlert/index.d.ts.map +1 -0
- package/dist/components/forms/FormSaveErrorAlert/index.js +26 -0
- package/dist/components/forms/FormSaveErrorAlert/index.js.map +1 -0
- package/dist/components/forms/FormSection/FormSection.styles.cjs +15 -0
- package/dist/components/forms/FormSection/FormSection.styles.cjs.map +1 -0
- package/dist/components/forms/FormSection/FormSection.styles.d.ts +9 -0
- package/dist/components/forms/FormSection/FormSection.styles.d.ts.map +1 -0
- package/dist/components/forms/FormSection/FormSection.styles.js +13 -0
- package/dist/components/forms/FormSection/FormSection.styles.js.map +1 -0
- package/dist/components/forms/FormSection/index.cjs +43 -0
- package/dist/components/forms/FormSection/index.cjs.map +1 -0
- package/dist/components/forms/FormSection/index.d.ts +41 -0
- package/dist/components/forms/FormSection/index.d.ts.map +1 -0
- package/dist/components/forms/FormSection/index.js +41 -0
- package/dist/components/forms/FormSection/index.js.map +1 -0
- package/dist/components/forms/FormUnsavedChangesModal/index.cjs +24 -0
- package/dist/components/forms/FormUnsavedChangesModal/index.cjs.map +1 -0
- package/dist/components/forms/FormUnsavedChangesModal/index.d.ts +14 -0
- package/dist/components/forms/FormUnsavedChangesModal/index.d.ts.map +1 -0
- package/dist/components/forms/FormUnsavedChangesModal/index.js +22 -0
- package/dist/components/forms/FormUnsavedChangesModal/index.js.map +1 -0
- package/dist/components/forms/__internal__/formField/hooks/useFocusTarget.cjs +28 -0
- package/dist/components/forms/__internal__/formField/hooks/useFocusTarget.cjs.map +1 -0
- package/dist/components/forms/__internal__/formField/hooks/useFocusTarget.d.ts +12 -0
- package/dist/components/forms/__internal__/formField/hooks/useFocusTarget.d.ts.map +1 -0
- package/dist/components/forms/__internal__/formField/hooks/useFocusTarget.js +26 -0
- package/dist/components/forms/__internal__/formField/hooks/useFocusTarget.js.map +1 -0
- package/dist/components/forms/__internal__/formField/hooks/useFocusThroughSubmit.cjs +68 -0
- package/dist/components/forms/__internal__/formField/hooks/useFocusThroughSubmit.cjs.map +1 -0
- package/dist/components/forms/__internal__/formField/hooks/useFocusThroughSubmit.d.ts +26 -0
- package/dist/components/forms/__internal__/formField/hooks/useFocusThroughSubmit.d.ts.map +1 -0
- package/dist/components/forms/__internal__/formField/hooks/useFocusThroughSubmit.js +66 -0
- package/dist/components/forms/__internal__/formField/hooks/useFocusThroughSubmit.js.map +1 -0
- package/dist/components/forms/__internal__/formField/hooks/useFormField.cjs +147 -0
- package/dist/components/forms/__internal__/formField/hooks/useFormField.cjs.map +1 -0
- package/dist/components/forms/__internal__/formField/hooks/useFormField.d.ts +35 -0
- package/dist/components/forms/__internal__/formField/hooks/useFormField.d.ts.map +1 -0
- package/dist/components/forms/__internal__/formField/hooks/useFormField.js +145 -0
- package/dist/components/forms/__internal__/formField/hooks/useFormField.js.map +1 -0
- package/dist/components/forms/__internal__/formField/providers/FieldElements.context.cjs +12 -0
- package/dist/components/forms/__internal__/formField/providers/FieldElements.context.cjs.map +1 -0
- package/dist/components/forms/__internal__/formField/providers/FieldElements.context.d.ts +7 -0
- package/dist/components/forms/__internal__/formField/providers/FieldElements.context.d.ts.map +1 -0
- package/dist/components/forms/__internal__/formField/providers/FieldElements.context.js +10 -0
- package/dist/components/forms/__internal__/formField/providers/FieldElements.context.js.map +1 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldDependents.utils.cjs +47 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldDependents.utils.cjs.map +1 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldDependents.utils.d.ts +26 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldDependents.utils.d.ts.map +1 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldDependents.utils.js +43 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldDependents.utils.js.map +1 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldElements.utils.cjs +39 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldElements.utils.cjs.map +1 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldElements.utils.d.ts +21 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldElements.utils.d.ts.map +1 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldElements.utils.js +37 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldElements.utils.js.map +1 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldValue.utils.cjs +40 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldValue.utils.cjs.map +1 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldValue.utils.d.ts +18 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldValue.utils.d.ts.map +1 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldValue.utils.js +37 -0
- package/dist/components/forms/__internal__/formField/utilities/fieldValue.utils.js.map +1 -0
- package/dist/components/forms/__internal__/formField/utilities/formFocus.utils.cjs +21 -0
- package/dist/components/forms/__internal__/formField/utilities/formFocus.utils.cjs.map +1 -0
- package/dist/components/forms/__internal__/formField/utilities/formFocus.utils.d.ts +11 -0
- package/dist/components/forms/__internal__/formField/utilities/formFocus.utils.d.ts.map +1 -0
- package/dist/components/forms/__internal__/formField/utilities/formFocus.utils.js +19 -0
- package/dist/components/forms/__internal__/formField/utilities/formFocus.utils.js.map +1 -0
- package/dist/components/forms/__internal__/formField/utilities/validationQueue.utils.cjs +128 -0
- package/dist/components/forms/__internal__/formField/utilities/validationQueue.utils.cjs.map +1 -0
- package/dist/components/forms/__internal__/formField/utilities/validationQueue.utils.d.ts +72 -0
- package/dist/components/forms/__internal__/formField/utilities/validationQueue.utils.d.ts.map +1 -0
- package/dist/components/forms/__internal__/formField/utilities/validationQueue.utils.js +121 -0
- package/dist/components/forms/__internal__/formField/utilities/validationQueue.utils.js.map +1 -0
- package/dist/components/forms/__internal__/formSubmit/providers/FormSubmit.context.cjs +12 -0
- package/dist/components/forms/__internal__/formSubmit/providers/FormSubmit.context.cjs.map +1 -0
- package/dist/components/forms/__internal__/formSubmit/providers/FormSubmit.context.d.ts +6 -0
- package/dist/components/forms/__internal__/formSubmit/providers/FormSubmit.context.d.ts.map +1 -0
- package/dist/components/forms/__internal__/formSubmit/providers/FormSubmit.context.js +10 -0
- package/dist/components/forms/__internal__/formSubmit/providers/FormSubmit.context.js.map +1 -0
- package/dist/components/forms/fields/FormCheckbox/index.cjs +34 -0
- package/dist/components/forms/fields/FormCheckbox/index.cjs.map +1 -0
- package/dist/components/forms/fields/FormCheckbox/index.d.ts +19 -0
- package/dist/components/forms/fields/FormCheckbox/index.d.ts.map +1 -0
- package/dist/components/forms/fields/FormCheckbox/index.js +32 -0
- package/dist/components/forms/fields/FormCheckbox/index.js.map +1 -0
- package/dist/components/forms/fields/FormCheckboxGroup/index.cjs +33 -0
- package/dist/components/forms/fields/FormCheckboxGroup/index.cjs.map +1 -0
- package/dist/components/forms/fields/FormCheckboxGroup/index.d.ts +19 -0
- package/dist/components/forms/fields/FormCheckboxGroup/index.d.ts.map +1 -0
- package/dist/components/forms/fields/FormCheckboxGroup/index.js +31 -0
- package/dist/components/forms/fields/FormCheckboxGroup/index.js.map +1 -0
- package/dist/components/forms/fields/FormColorPicker/hooks/useEmptyFieldValue.cjs +26 -0
- package/dist/components/forms/fields/FormColorPicker/hooks/useEmptyFieldValue.cjs.map +1 -0
- package/dist/components/forms/fields/FormColorPicker/hooks/useEmptyFieldValue.d.ts +11 -0
- package/dist/components/forms/fields/FormColorPicker/hooks/useEmptyFieldValue.d.ts.map +1 -0
- package/dist/components/forms/fields/FormColorPicker/hooks/useEmptyFieldValue.js +24 -0
- package/dist/components/forms/fields/FormColorPicker/hooks/useEmptyFieldValue.js.map +1 -0
- package/dist/components/forms/fields/FormColorPicker/index.cjs +33 -0
- package/dist/components/forms/fields/FormColorPicker/index.cjs.map +1 -0
- package/dist/components/forms/fields/FormColorPicker/index.d.ts +24 -0
- package/dist/components/forms/fields/FormColorPicker/index.d.ts.map +1 -0
- package/dist/components/forms/fields/FormColorPicker/index.js +31 -0
- package/dist/components/forms/fields/FormColorPicker/index.js.map +1 -0
- package/dist/components/forms/fields/FormColorPicker/utilities/formColorPicker.utils.cjs +20 -0
- package/dist/components/forms/fields/FormColorPicker/utilities/formColorPicker.utils.cjs.map +1 -0
- package/dist/components/forms/fields/FormColorPicker/utilities/formColorPicker.utils.d.ts +17 -0
- package/dist/components/forms/fields/FormColorPicker/utilities/formColorPicker.utils.d.ts.map +1 -0
- package/dist/components/forms/fields/FormColorPicker/utilities/formColorPicker.utils.js +18 -0
- package/dist/components/forms/fields/FormColorPicker/utilities/formColorPicker.utils.js.map +1 -0
- package/dist/components/forms/fields/FormDatePicker/index.cjs +35 -0
- package/dist/components/forms/fields/FormDatePicker/index.cjs.map +1 -0
- package/dist/components/forms/fields/FormDatePicker/index.d.ts +20 -0
- package/dist/components/forms/fields/FormDatePicker/index.d.ts.map +1 -0
- package/dist/components/forms/fields/FormDatePicker/index.js +33 -0
- package/dist/components/forms/fields/FormDatePicker/index.js.map +1 -0
- package/dist/components/forms/fields/FormDatePicker/utilities/formDatePicker.utils.cjs +23 -0
- package/dist/components/forms/fields/FormDatePicker/utilities/formDatePicker.utils.cjs.map +1 -0
- package/dist/components/forms/fields/FormDatePicker/utilities/formDatePicker.utils.d.ts +9 -0
- package/dist/components/forms/fields/FormDatePicker/utilities/formDatePicker.utils.d.ts.map +1 -0
- package/dist/components/forms/fields/FormDatePicker/utilities/formDatePicker.utils.js +21 -0
- package/dist/components/forms/fields/FormDatePicker/utilities/formDatePicker.utils.js.map +1 -0
- package/dist/components/forms/fields/FormInput/index.cjs +27 -0
- package/dist/components/forms/fields/FormInput/index.cjs.map +1 -0
- package/dist/components/forms/fields/FormInput/index.d.ts +19 -0
- package/dist/components/forms/fields/FormInput/index.d.ts.map +1 -0
- package/dist/components/forms/fields/FormInput/index.js +25 -0
- package/dist/components/forms/fields/FormInput/index.js.map +1 -0
- package/dist/components/forms/fields/FormMultiSelect/index.cjs +44 -0
- package/dist/components/forms/fields/FormMultiSelect/index.cjs.map +1 -0
- package/dist/components/forms/fields/FormMultiSelect/index.d.ts +20 -0
- package/dist/components/forms/fields/FormMultiSelect/index.d.ts.map +1 -0
- package/dist/components/forms/fields/FormMultiSelect/index.js +42 -0
- package/dist/components/forms/fields/FormMultiSelect/index.js.map +1 -0
- package/dist/components/forms/fields/FormRadioCardGroup/index.cjs +36 -0
- package/dist/components/forms/fields/FormRadioCardGroup/index.cjs.map +1 -0
- package/dist/components/forms/fields/FormRadioCardGroup/index.d.ts +32 -0
- package/dist/components/forms/fields/FormRadioCardGroup/index.d.ts.map +1 -0
- package/dist/components/forms/fields/FormRadioCardGroup/index.js +34 -0
- package/dist/components/forms/fields/FormRadioCardGroup/index.js.map +1 -0
- package/dist/components/forms/fields/FormRadioGroup/index.cjs +31 -0
- package/dist/components/forms/fields/FormRadioGroup/index.cjs.map +1 -0
- package/dist/components/forms/fields/FormRadioGroup/index.d.ts +20 -0
- package/dist/components/forms/fields/FormRadioGroup/index.d.ts.map +1 -0
- package/dist/components/forms/fields/FormRadioGroup/index.js +29 -0
- package/dist/components/forms/fields/FormRadioGroup/index.js.map +1 -0
- package/dist/components/forms/fields/FormSelect/index.cjs +30 -0
- package/dist/components/forms/fields/FormSelect/index.cjs.map +1 -0
- package/dist/components/forms/fields/FormSelect/index.d.ts +19 -0
- package/dist/components/forms/fields/FormSelect/index.d.ts.map +1 -0
- package/dist/components/forms/fields/FormSelect/index.js +28 -0
- package/dist/components/forms/fields/FormSelect/index.js.map +1 -0
- package/dist/components/forms/fields/FormSlider/index.cjs +43 -0
- package/dist/components/forms/fields/FormSlider/index.cjs.map +1 -0
- package/dist/components/forms/fields/FormSlider/index.d.ts +20 -0
- package/dist/components/forms/fields/FormSlider/index.d.ts.map +1 -0
- package/dist/components/forms/fields/FormSlider/index.js +41 -0
- package/dist/components/forms/fields/FormSlider/index.js.map +1 -0
- package/dist/components/forms/fields/FormTextArea/index.cjs +27 -0
- package/dist/components/forms/fields/FormTextArea/index.cjs.map +1 -0
- package/dist/components/forms/fields/FormTextArea/index.d.ts +19 -0
- package/dist/components/forms/fields/FormTextArea/index.d.ts.map +1 -0
- package/dist/components/forms/fields/FormTextArea/index.js +25 -0
- package/dist/components/forms/fields/FormTextArea/index.js.map +1 -0
- package/dist/components/forms/fields/FormToggle/index.cjs +32 -0
- package/dist/components/forms/fields/FormToggle/index.cjs.map +1 -0
- package/dist/components/forms/fields/FormToggle/index.d.ts +19 -0
- package/dist/components/forms/fields/FormToggle/index.d.ts.map +1 -0
- package/dist/components/forms/fields/FormToggle/index.js +30 -0
- package/dist/components/forms/fields/FormToggle/index.js.map +1 -0
- package/dist/components/forms/validation/hooks/useSchemaResolver.cjs +44 -0
- package/dist/components/forms/validation/hooks/useSchemaResolver.cjs.map +1 -0
- package/dist/components/forms/validation/hooks/useSchemaResolver.d.ts +16 -0
- package/dist/components/forms/validation/hooks/useSchemaResolver.d.ts.map +1 -0
- package/dist/components/forms/validation/hooks/useSchemaResolver.js +42 -0
- package/dist/components/forms/validation/hooks/useSchemaResolver.js.map +1 -0
- package/dist/components/forms/validation/index.cjs +413 -0
- package/dist/components/forms/validation/index.cjs.map +1 -0
- package/dist/components/forms/validation/index.d.ts +278 -0
- package/dist/components/forms/validation/index.d.ts.map +1 -0
- package/dist/components/forms/validation/index.js +394 -0
- package/dist/components/forms/validation/index.js.map +1 -0
- package/dist/components/forms/validation/utilities/validation.utils.cjs +72 -0
- package/dist/components/forms/validation/utilities/validation.utils.cjs.map +1 -0
- package/dist/components/forms/validation/utilities/validation.utils.d.ts +38 -0
- package/dist/components/forms/validation/utilities/validation.utils.d.ts.map +1 -0
- package/dist/components/forms/validation/utilities/validation.utils.js +67 -0
- package/dist/components/forms/validation/utilities/validation.utils.js.map +1 -0
- package/dist/components/forms/validation/validation.types.d.ts +8 -0
- package/dist/components/forms/validation/validation.types.d.ts.map +1 -0
- package/dist/components/organisms/ColorPicker/components/ColorPickerField.cjs +13 -3
- package/dist/components/organisms/ColorPicker/components/ColorPickerField.cjs.map +1 -1
- package/dist/components/organisms/ColorPicker/components/ColorPickerField.d.ts +1 -1
- package/dist/components/organisms/ColorPicker/components/ColorPickerField.d.ts.map +1 -1
- package/dist/components/organisms/ColorPicker/components/ColorPickerField.js +13 -3
- package/dist/components/organisms/ColorPicker/components/ColorPickerField.js.map +1 -1
- package/dist/components/organisms/ColorPicker/hooks/useColorFieldEdit.cjs +2 -2
- package/dist/components/organisms/ColorPicker/hooks/useColorFieldEdit.cjs.map +1 -1
- package/dist/components/organisms/ColorPicker/hooks/useColorFieldEdit.d.ts +1 -0
- package/dist/components/organisms/ColorPicker/hooks/useColorFieldEdit.d.ts.map +1 -1
- package/dist/components/organisms/ColorPicker/hooks/useColorFieldEdit.js +2 -2
- package/dist/components/organisms/ColorPicker/hooks/useColorFieldEdit.js.map +1 -1
- package/dist/components/organisms/ColorPicker/hooks/useCssColorField.cjs +1 -1
- package/dist/components/organisms/ColorPicker/hooks/useCssColorField.js +1 -1
- package/dist/components/organisms/ColorPicker/index.cjs +1 -1
- package/dist/components/organisms/ColorPicker/index.d.ts.map +1 -1
- package/dist/components/organisms/ColorPicker/index.js +1 -1
- package/dist/components/organisms/ColorPicker/providers/ColorPicker.provider.d.ts +1 -1
- package/dist/components/organisms/ColorPicker/providers/ColorPicker.provider.d.ts.map +1 -1
- package/dist/components/organisms/ColorPicker/utilities/colorPicker.utils.cjs.map +1 -0
- package/dist/components/organisms/ColorPicker/utilities/colorPicker.utils.d.ts.map +1 -0
- package/dist/components/organisms/ColorPicker/utilities/colorPicker.utils.js.map +1 -0
- package/dist/components/organisms/GradientPicker/components/GradientStopRow.cjs +1 -1
- package/dist/components/organisms/GradientPicker/components/GradientStopRow.js +1 -1
- package/dist/hooks/useFocusAfterRetry/index.cjs +7 -3
- package/dist/hooks/useFocusAfterRetry/index.cjs.map +1 -1
- package/dist/hooks/useFocusAfterRetry/index.d.ts +8 -2
- package/dist/hooks/useFocusAfterRetry/index.d.ts.map +1 -1
- package/dist/hooks/useFocusAfterRetry/index.js +7 -3
- package/dist/hooks/useFocusAfterRetry/index.js.map +1 -1
- package/dist/localization/en.json.cjs +117 -0
- package/dist/localization/en.json.cjs.map +1 -0
- package/dist/localization/en.json.js +98 -0
- package/dist/localization/en.json.js.map +1 -0
- package/dist/native/components/forms/Form/index.d.ts +12 -0
- package/dist/native/components/forms/FormFooter/index.d.ts +12 -0
- package/dist/native/components/forms/FormSaveErrorAlert/index.d.ts +12 -0
- package/dist/native/components/forms/FormSection/index.d.ts +12 -0
- package/dist/native/components/forms/FormUnsavedChangesModal/index.d.ts +12 -0
- package/dist/native/components/forms/fields/FormCheckbox/index.d.ts +12 -0
- package/dist/native/components/forms/fields/FormCheckboxGroup/index.d.ts +12 -0
- package/dist/native/components/forms/fields/FormColorPicker/index.d.ts +12 -0
- package/dist/native/components/forms/fields/FormDatePicker/index.d.ts +12 -0
- package/dist/native/components/forms/fields/FormInput/index.d.ts +12 -0
- package/dist/native/components/forms/fields/FormMultiSelect/index.d.ts +12 -0
- package/dist/native/components/forms/fields/FormRadioCardGroup/index.d.ts +12 -0
- package/dist/native/components/forms/fields/FormRadioGroup/index.d.ts +12 -0
- package/dist/native/components/forms/fields/FormSelect/index.d.ts +12 -0
- package/dist/native/components/forms/fields/FormSlider/index.d.ts +12 -0
- package/dist/native/components/forms/fields/FormTextArea/index.d.ts +12 -0
- package/dist/native/components/forms/fields/FormToggle/index.d.ts +12 -0
- package/dist/native/components/forms/validation/index.d.ts +12 -0
- package/dist/native/utilities/colorUtils/index.d.ts +12 -0
- package/dist/providers/UnsavedChangesGuardProvider/index.cjs +1 -1
- package/dist/providers/UnsavedChangesGuardProvider/index.js +1 -1
- package/dist/providers/UnsavedChangesGuardProvider/utilities/unsavedChangesGuard.utils.cjs.map +1 -0
- package/dist/providers/UnsavedChangesGuardProvider/{unsavedChangesGuard.utils.d.ts → utilities/unsavedChangesGuard.utils.d.ts} +1 -1
- package/dist/providers/UnsavedChangesGuardProvider/utilities/unsavedChangesGuard.utils.d.ts.map +1 -0
- package/dist/providers/UnsavedChangesGuardProvider/utilities/unsavedChangesGuard.utils.js.map +1 -0
- package/dist/utilities/__internal__/builtInTextUtils/builtInText.utils.cjs +74 -0
- package/dist/utilities/__internal__/builtInTextUtils/builtInText.utils.cjs.map +1 -0
- package/dist/utilities/__internal__/builtInTextUtils/builtInText.utils.d.ts +51 -0
- package/dist/utilities/__internal__/builtInTextUtils/builtInText.utils.d.ts.map +1 -0
- package/dist/utilities/__internal__/builtInTextUtils/builtInText.utils.js +68 -0
- package/dist/utilities/__internal__/builtInTextUtils/builtInText.utils.js.map +1 -0
- package/dist/utilities/colorUtils/index.cjs +24 -0
- package/dist/utilities/colorUtils/index.cjs.map +1 -0
- package/dist/utilities/colorUtils/index.d.ts +8 -0
- package/dist/utilities/colorUtils/index.d.ts.map +1 -0
- package/dist/utilities/colorUtils/index.js +22 -0
- package/dist/utilities/colorUtils/index.js.map +1 -0
- package/package.json +41 -6
- package/dist/components/organisms/ColorPicker/colorPicker.utils.cjs.map +0 -1
- package/dist/components/organisms/ColorPicker/colorPicker.utils.d.ts.map +0 -1
- package/dist/components/organisms/ColorPicker/colorPicker.utils.js.map +0 -1
- package/dist/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.utils.cjs.map +0 -1
- package/dist/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.utils.d.ts.map +0 -1
- package/dist/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.utils.js.map +0 -1
- /package/dist/components/organisms/ColorPicker/{colorPicker.utils.cjs → utilities/colorPicker.utils.cjs} +0 -0
- /package/dist/components/organisms/ColorPicker/{colorPicker.utils.d.ts → utilities/colorPicker.utils.d.ts} +0 -0
- /package/dist/components/organisms/ColorPicker/{colorPicker.utils.js → utilities/colorPicker.utils.js} +0 -0
- /package/dist/providers/UnsavedChangesGuardProvider/{unsavedChangesGuard.utils.cjs → utilities/unsavedChangesGuard.utils.cjs} +0 -0
- /package/dist/providers/UnsavedChangesGuardProvider/{unsavedChangesGuard.utils.js → utilities/unsavedChangesGuard.utils.js} +0 -0
|
@@ -9,9 +9,9 @@ var React = require('react');
|
|
|
9
9
|
var reactAriaComponents = require('react-aria-components');
|
|
10
10
|
var ScrollClosingPopover = require('../../../__internal__/popover/ScrollClosingPopover.cjs');
|
|
11
11
|
var ref_utils = require('../../../../utilities/__internal__/refUtils/ref.utils.cjs');
|
|
12
|
-
var colorPicker_utils = require('../colorPicker.utils.cjs');
|
|
13
12
|
var useColorFieldEdit = require('../hooks/useColorFieldEdit.cjs');
|
|
14
13
|
var ColorPicker_provider = require('../providers/ColorPicker.provider.cjs');
|
|
14
|
+
var colorPicker_utils = require('../utilities/colorPicker.utils.cjs');
|
|
15
15
|
var ColorPickerDialog = require('./ColorPickerDialog.cjs');
|
|
16
16
|
|
|
17
17
|
const ColorPickerField = ({ children, ref, value, onChange, onChangeEnd, onBlur, label, hint, isInvalid, placeholder = 'Add colour', defaultColor, isClearable, isDisabled, isRequired, size = 'md', 'aria-label': ariaLabel, 'data-testid': dataTestId, }) => {
|
|
@@ -19,7 +19,17 @@ const ColorPickerField = ({ children, ref, value, onChange, onChangeEnd, onBlur,
|
|
|
19
19
|
const labelId = React.useId();
|
|
20
20
|
const triggerId = React.useId();
|
|
21
21
|
const hintId = React.useId();
|
|
22
|
-
const { color, startValue, onOpenChange, onPick, onRemove, onKeyDownCapture } = useColorFieldEdit.useColorFieldEdit({
|
|
22
|
+
const { color, startValue, isPickerOpen, onOpenChange, onPick, onRemove, onKeyDownCapture } = useColorFieldEdit.useColorFieldEdit({
|
|
23
|
+
value,
|
|
24
|
+
defaultColor,
|
|
25
|
+
onChange,
|
|
26
|
+
onChangeEnd,
|
|
27
|
+
});
|
|
28
|
+
// Focus going into the picker is not the user leaving the field: a form would validate a colour they are about to change.
|
|
29
|
+
const blurUnlessPicking = () => {
|
|
30
|
+
if (!isPickerOpen.current)
|
|
31
|
+
onBlur?.();
|
|
32
|
+
};
|
|
23
33
|
const triggerText = color ? colorPicker_utils.toHexString(color) : placeholder;
|
|
24
34
|
// A button cannot carry `aria-required`, so a name given by `aria-label` says it in words, as the visible label does,
|
|
25
35
|
// and ends with the trigger's own text, so the value is announced with the name here too.
|
|
@@ -42,7 +52,7 @@ const ColorPickerField = ({ children, ref, value, onChange, onChangeEnd, onBlur,
|
|
|
42
52
|
// The Remove button leaves the page with the colour, so focus moves to the trigger instead of being lost.
|
|
43
53
|
root.current?.querySelector('button')?.focus();
|
|
44
54
|
};
|
|
45
|
-
return (jsxRuntime.jsxs("div", { ref: setRoot, "data-testid": fieldTestId, className: "flex flex-col items-start gap-1.5", children: [label && (jsxRuntime.jsxs("span", { id: labelId, className: "flex items-center gap-0.5 text-sm font-medium text-secondary", children: [label, isRequired && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { "aria-hidden": "true", className: "text-brand-tertiary", children: "*" }), jsxRuntime.jsx("span", { className: "sr-only", children: "(required)" })] }))] })), jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [jsxRuntime.jsxs(reactAriaComponents.DialogTrigger, { onOpenChange: onOpenChange, children: [jsxRuntime.jsx(Button.Button, { id: triggerId, size: size, color: "secondary", isDisabled: isDisabled, onBlur:
|
|
55
|
+
return (jsxRuntime.jsxs("div", { ref: setRoot, "data-testid": fieldTestId, className: "flex flex-col items-start gap-1.5", children: [label && (jsxRuntime.jsxs("span", { id: labelId, className: "flex items-center gap-0.5 text-sm font-medium text-secondary", children: [label, isRequired && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { "aria-hidden": "true", className: "text-brand-tertiary", children: "*" }), jsxRuntime.jsx("span", { className: "sr-only", children: "(required)" })] }))] })), jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [jsxRuntime.jsxs(reactAriaComponents.DialogTrigger, { onOpenChange: onOpenChange, children: [jsxRuntime.jsx(Button.Button, { id: triggerId, size: size, color: "secondary", isDisabled: isDisabled, onBlur: blurUnlessPicking,
|
|
46
56
|
// The picked colour is the user's data, not a token, so it can only be set inline.
|
|
47
57
|
iconLeading: color ? (jsxRuntime.jsx("span", { "aria-hidden": "true", className: "size-4 shrink-0 rounded-full ring-1 ring-alpha-black/10 ring-inset", style: { backgroundColor: colorPicker_utils.toHexString(color) } })) : (uiIcons.Plus), "aria-labelledby": label ? `${labelId} ${triggerId}` : undefined, "aria-label": label ? undefined : triggerName, "aria-describedby": hint ? hintId : undefined, "data-testid": testIdUtils.joinTestId(fieldTestId, 'trigger'), children: triggerText }), jsxRuntime.jsx(ScrollClosingPopover.ScrollClosingPopover, { placement: "bottom start", offset: 8, children: jsxRuntime.jsx("div", { className: "contents", onKeyDownCapture: onKeyDownCapture, children: jsxRuntime.jsx(reactAriaComponents.Dialog, { "aria-label": label ?? ariaLabel, className: "outline-hidden", children: jsxRuntime.jsx(ColorPickerDialog.ColorPickerDialog, { className: "p-4", "data-testid": testIdUtils.joinTestId(fieldTestId, 'picker'), children: jsxRuntime.jsx(ColorPicker_provider.Provider, { defaultValue: startValue, onChange: onPick, children: children }) }) }) }) })] }), isClearable && color && (jsxRuntime.jsx(Button.Button, { size: size, color: "link-gray", isDisabled: isDisabled, "aria-label": `Remove ${label ?? ariaLabel ?? 'colour'}`, onPress: handleRemove, "data-testid": testIdUtils.joinTestId(fieldTestId, 'remove'), children: "Remove" }))] }), hint && (jsxRuntime.jsx(Input.HintText, { id: hintId, isInvalid: isInvalid, children: hint }))] }));
|
|
48
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerField.cjs","sources":["../../../../../src/components/organisms/ColorPicker/components/ColorPickerField.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useId","useColorFieldEdit","toHexString","useRef","useCallback","setRef","_jsxs","_Fragment","_jsx","AriaDialogTrigger","Button","Plus","joinTestId","ScrollClosingPopover","AriaDialog","ColorPickerDialog","Provider","HintText"],"mappings":";;;;;;;;;;;;;;;;MA0Da,gBAAgB,GAAG,CAAC,EAC/B,QAAQ,EACR,GAAG,EACH,KAAK,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,KAAK,EACL,IAAI,EACJ,SAAS,EACT,WAAW,GAAG,YAAY,EAC1B,YAAY,EACZ,WAAW,EACX,UAAU,EACV,UAAU,EACV,IAAI,GAAG,IAAI,EACX,YAAY,EAAE,SAAS,EACvB,aAAa,EAAE,UAAU,GAC4B,KAAI;AACzD,IAAA,MAAM,WAAW,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CAAC;AAC5H,IAAA,MAAM,OAAO,GAAGC,WAAK,EAAE;AACvB,IAAA,MAAM,SAAS,GAAGA,WAAK,EAAE;AACzB,IAAA,MAAM,MAAM,GAAGA,WAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"ColorPickerField.cjs","sources":["../../../../../src/components/organisms/ColorPicker/components/ColorPickerField.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useId","useColorFieldEdit","toHexString","useRef","useCallback","setRef","_jsxs","_Fragment","_jsx","AriaDialogTrigger","Button","Plus","joinTestId","Scroll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CAAA,OAAA,EAAU,KAAK,IAAI,SAAS,IAAI,QAAQ,CAAA,CAAE,EACtD,OAAO,EAAE,YAAY,EAAA,aAAA,EACRE,sBAAU,CAAC,WAAW,EAAE,QAAQ,CAAC,EAAA,QAAA,EAAA,QAAA,EAAA,CAGvC,CACV,IACG,EACL,IAAI,KACHJ,cAAA,CAACS,cAAQ,EAAA,EAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAA,QAAA,EACvC,IAAI,EAAA,CACI,CACZ,CAAA,EAAA,CACG;AAEV;;"}
|
|
@@ -9,7 +9,7 @@ interface ColorPickerFieldBaseProps {
|
|
|
9
9
|
onChange: (value: string | null) => void;
|
|
10
10
|
/** Called with the value once an edit is over: the picker has closed, or Remove was pressed. Validate here, not on every pick. */
|
|
11
11
|
onChangeEnd?: (value: string | null) => void;
|
|
12
|
-
/** Called when focus leaves the trigger. */
|
|
12
|
+
/** Called when focus leaves the trigger, unless it went into the picker the trigger opened. */
|
|
13
13
|
onBlur?: () => void;
|
|
14
14
|
/** Name of the field, shown above the trigger; the types ask for this or `aria-label`. */
|
|
15
15
|
label?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerField.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/ColorPicker/components/ColorPickerField.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAGxF,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAA8B,MAAM,OAAO,CAAC;AAS7E,UAAU,yBAAyB;IACjC,wFAAwF;IACxF,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,qHAAqH;IACrH,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,gIAAgI;IAChI,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,kIAAkI;IAClI,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7C
|
|
1
|
+
{"version":3,"file":"ColorPickerField.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/ColorPicker/components/ColorPickerField.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAGxF,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAA8B,MAAM,OAAO,CAAC;AAS7E,UAAU,yBAAyB;IACjC,wFAAwF;IACxF,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,qHAAqH;IACrH,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,gIAAgI;IAChI,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,kIAAkI;IAClI,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7C,+FAA+F;IAC/F,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,0FAA0F;IAC1F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yFAAyF;IACzF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mHAAmH;IACnH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4GAA4G;IAC5G,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oFAAoF;IACpF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kCAAkC;IAClC,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,kDAAkD;IAClD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oIAAoI;IACpI,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAGD,MAAM,MAAM,qBAAqB,GAAG,yBAAyB,GAAG,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE/G,UAAU,4BAA4B;IACpC,uIAAuI;IACvI,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,GAAI,4MAkB9B,qBAAqB,GAAG,4BAA4B,gCAwHtD,CAAC"}
|
|
@@ -7,9 +7,9 @@ import { useId, useRef, useCallback } from 'react';
|
|
|
7
7
|
import { DialogTrigger, Dialog } from 'react-aria-components';
|
|
8
8
|
import { ScrollClosingPopover } from '../../../__internal__/popover/ScrollClosingPopover.js';
|
|
9
9
|
import { setRef } from '../../../../utilities/__internal__/refUtils/ref.utils.js';
|
|
10
|
-
import { toHexString } from '../colorPicker.utils.js';
|
|
11
10
|
import { useColorFieldEdit } from '../hooks/useColorFieldEdit.js';
|
|
12
11
|
import { Provider } from '../providers/ColorPicker.provider.js';
|
|
12
|
+
import { toHexString } from '../utilities/colorPicker.utils.js';
|
|
13
13
|
import { ColorPickerDialog } from './ColorPickerDialog.js';
|
|
14
14
|
|
|
15
15
|
const ColorPickerField = ({ children, ref, value, onChange, onChangeEnd, onBlur, label, hint, isInvalid, placeholder = 'Add colour', defaultColor, isClearable, isDisabled, isRequired, size = 'md', 'aria-label': ariaLabel, 'data-testid': dataTestId, }) => {
|
|
@@ -17,7 +17,17 @@ const ColorPickerField = ({ children, ref, value, onChange, onChangeEnd, onBlur,
|
|
|
17
17
|
const labelId = useId();
|
|
18
18
|
const triggerId = useId();
|
|
19
19
|
const hintId = useId();
|
|
20
|
-
const { color, startValue, onOpenChange, onPick, onRemove, onKeyDownCapture } = useColorFieldEdit({
|
|
20
|
+
const { color, startValue, isPickerOpen, onOpenChange, onPick, onRemove, onKeyDownCapture } = useColorFieldEdit({
|
|
21
|
+
value,
|
|
22
|
+
defaultColor,
|
|
23
|
+
onChange,
|
|
24
|
+
onChangeEnd,
|
|
25
|
+
});
|
|
26
|
+
// Focus going into the picker is not the user leaving the field: a form would validate a colour they are about to change.
|
|
27
|
+
const blurUnlessPicking = () => {
|
|
28
|
+
if (!isPickerOpen.current)
|
|
29
|
+
onBlur?.();
|
|
30
|
+
};
|
|
21
31
|
const triggerText = color ? toHexString(color) : placeholder;
|
|
22
32
|
// A button cannot carry `aria-required`, so a name given by `aria-label` says it in words, as the visible label does,
|
|
23
33
|
// and ends with the trigger's own text, so the value is announced with the name here too.
|
|
@@ -40,7 +50,7 @@ const ColorPickerField = ({ children, ref, value, onChange, onChangeEnd, onBlur,
|
|
|
40
50
|
// The Remove button leaves the page with the colour, so focus moves to the trigger instead of being lost.
|
|
41
51
|
root.current?.querySelector('button')?.focus();
|
|
42
52
|
};
|
|
43
|
-
return (jsxs("div", { ref: setRoot, "data-testid": fieldTestId, className: "flex flex-col items-start gap-1.5", children: [label && (jsxs("span", { id: labelId, className: "flex items-center gap-0.5 text-sm font-medium text-secondary", children: [label, isRequired && (jsxs(Fragment, { children: [jsx("span", { "aria-hidden": "true", className: "text-brand-tertiary", children: "*" }), jsx("span", { className: "sr-only", children: "(required)" })] }))] })), jsxs("div", { className: "flex items-center gap-3", children: [jsxs(DialogTrigger, { onOpenChange: onOpenChange, children: [jsx(Button, { id: triggerId, size: size, color: "secondary", isDisabled: isDisabled, onBlur:
|
|
53
|
+
return (jsxs("div", { ref: setRoot, "data-testid": fieldTestId, className: "flex flex-col items-start gap-1.5", children: [label && (jsxs("span", { id: labelId, className: "flex items-center gap-0.5 text-sm font-medium text-secondary", children: [label, isRequired && (jsxs(Fragment, { children: [jsx("span", { "aria-hidden": "true", className: "text-brand-tertiary", children: "*" }), jsx("span", { className: "sr-only", children: "(required)" })] }))] })), jsxs("div", { className: "flex items-center gap-3", children: [jsxs(DialogTrigger, { onOpenChange: onOpenChange, children: [jsx(Button, { id: triggerId, size: size, color: "secondary", isDisabled: isDisabled, onBlur: blurUnlessPicking,
|
|
44
54
|
// The picked colour is the user's data, not a token, so it can only be set inline.
|
|
45
55
|
iconLeading: color ? (jsx("span", { "aria-hidden": "true", className: "size-4 shrink-0 rounded-full ring-1 ring-alpha-black/10 ring-inset", style: { backgroundColor: toHexString(color) } })) : (Plus), "aria-labelledby": label ? `${labelId} ${triggerId}` : undefined, "aria-label": label ? undefined : triggerName, "aria-describedby": hint ? hintId : undefined, "data-testid": joinTestId(fieldTestId, 'trigger'), children: triggerText }), jsx(ScrollClosingPopover, { placement: "bottom start", offset: 8, children: jsx("div", { className: "contents", onKeyDownCapture: onKeyDownCapture, children: jsx(Dialog, { "aria-label": label ?? ariaLabel, className: "outline-hidden", children: jsx(ColorPickerDialog, { className: "p-4", "data-testid": joinTestId(fieldTestId, 'picker'), children: jsx(Provider, { defaultValue: startValue, onChange: onPick, children: children }) }) }) }) })] }), isClearable && color && (jsx(Button, { size: size, color: "link-gray", isDisabled: isDisabled, "aria-label": `Remove ${label ?? ariaLabel ?? 'colour'}`, onPress: handleRemove, "data-testid": joinTestId(fieldTestId, 'remove'), children: "Remove" }))] }), hint && (jsx(HintText, { id: hintId, isInvalid: isInvalid, children: hint }))] }));
|
|
46
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerField.js","sources":["../../../../../src/components/organisms/ColorPicker/components/ColorPickerField.tsx"],"sourcesContent":[null],"names":["_jsxs","_Fragment","_jsx","AriaDialogTrigger","AriaDialog"],"mappings":";;;;;;;;;;;;;;MA0Da,gBAAgB,GAAG,CAAC,EAC/B,QAAQ,EACR,GAAG,EACH,KAAK,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,KAAK,EACL,IAAI,EACJ,SAAS,EACT,WAAW,GAAG,YAAY,EAC1B,YAAY,EACZ,WAAW,EACX,UAAU,EACV,UAAU,EACV,IAAI,GAAG,IAAI,EACX,YAAY,EAAE,SAAS,EACvB,aAAa,EAAE,UAAU,GAC4B,KAAI;AACzD,IAAA,MAAM,WAAW,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CAAC;AAC5H,IAAA,MAAM,OAAO,GAAG,KAAK,EAAE;AACvB,IAAA,MAAM,SAAS,GAAG,KAAK,EAAE;AACzB,IAAA,MAAM,MAAM,GAAG,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"ColorPickerField.js","sources":["../../../../../src/components/organisms/ColorPicker/components/ColorPickerField.tsx"],"sourcesContent":[null],"names":["_jsxs","_Fragment","_jsx","AriaDialogTrigger","AriaDialog"],"mappings":";;;;;;;;;;;;;;MA0Da,gBAAgB,GAAG,CAAC,EAC/B,QAAQ,EACR,GAAG,EACH,KAAK,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,KAAK,EACL,IAAI,EACJ,SAAS,EACT,WAAW,GAAG,YAAY,EAC1B,YAAY,EACZ,WAAW,EACX,UAAU,EACV,UAAU,EACV,IAAI,GAAG,IAAI,EACX,YAAY,EAAE,SAAS,EACvB,aAAa,EAAE,UAAU,GAC4B,KAAI;AACzD,IAAA,MAAM,WAAW,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CAAC;AAC5H,IAAA,MAAM,OAAO,GAAG,KAAK,EAAE;AACvB,IAAA,MAAM,SAAS,GAAG,KAAK,EAAE;AACzB,IAAA,MAAM,MAAM,GAAG,KAAK,EAAE;AACtB,IAAA,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,GAAG,iBAAiB,CAAC;QAC9G,KAAK;QACL,YAAY;QACZ,QAAQ;QACR,WAAW;AACZ,KAAA,CAAC;;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IAAC,SAAS,EAAC,KAAK,EAAA,aAAA,EAAc,UAAU,CAAC,WAAW,EAAE,QAAQ,CAAC,EAAA,QAAA,EAE/EA,GAAA,CAAC,QAAQ,EAAA,EAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YACjD,QAAQ,EAAA,CACA,EAAA,CACO,EAAA,CACT,EAAA,CACT,EAAA,CACe,IACL,EACnB,WAAW,IAAI,KAAK,KACnBA,GAAA,CAAC,MAAM,EAAA,EACL,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,WAAW,EACjB,UAAU,EAAE,UAAU,EAAA,YAAA,EACV,CAAA,OAAA,EAAU,KAAK,IAAI,SAAS,IAAI,QAAQ,CAAA,CAAE,EACtD,OAAO,EAAE,YAAY,EAAA,aAAA,EACR,UAAU,CAAC,WAAW,EAAE,QAAQ,CAAC,EAAA,QAAA,EAAA,QAAA,EAAA,CAGvC,CACV,IACG,EACL,IAAI,KACHA,GAAA,CAAC,QAAQ,EAAA,EAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAA,QAAA,EACvC,IAAI,EAAA,CACI,CACZ,CAAA,EAAA,CACG;AAEV;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var colorPicker_utils = require('../colorPicker.utils.cjs');
|
|
4
|
+
var colorPicker_utils = require('../utilities/colorPicker.utils.cjs');
|
|
5
5
|
|
|
6
6
|
// The colour `ColorPicker.Provider` itself starts on.
|
|
7
7
|
const FALLBACK_COLOR = '#7F56D9';
|
|
@@ -62,7 +62,7 @@ const useColorFieldEdit = ({ value, defaultColor = FALLBACK_COLOR, onChange, onC
|
|
|
62
62
|
isEscaping.current = false;
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
|
-
return { color, startValue, onOpenChange, onPick, onRemove, onKeyDownCapture };
|
|
65
|
+
return { color, startValue, isPickerOpen, onOpenChange, onPick, onRemove, onKeyDownCapture };
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
exports.useColorFieldEdit = useColorFieldEdit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useColorFieldEdit.cjs","sources":["../../../../../src/components/organisms/ColorPicker/hooks/useColorFieldEdit.ts"],"sourcesContent":[null],"names":["toColor","toHexString","useRef"],"mappings":";;;;;AAMA;AACA,MAAM,cAAc,GAAG,SAAS;AAahC;;;;;;AAMG;AACI,MAAM,iBAAiB,GAAG,CAAC,EAAE,KAAK,EAAE,YAAY,GAAG,cAAc,EAAE,QAAQ,EAAE,WAAW,EAA4B,KAAI;AAC7H,IAAA,MAAM,KAAK,GAAGA,yBAAO,CAAC,KAAK,CAAC;IAC5B,MAAM,UAAU,GAAG,KAAK,IAAIA,yBAAO,CAAC,YAAY,CAAC;AACjD,IAAA,MAAM,UAAU,GAAG,UAAU,GAAGC,6BAAW,CAAC,UAAU,CAAC,GAAG,cAAc;;AAGxE,IAAA,MAAM,cAAc,GAAGC,YAAM,CAAC,KAAK,CAAC;;;AAGpC,IAAA,MAAM,cAAc,GAAGA,YAAM,CAAgB,IAAI,CAAC;AAClD,IAAA,MAAM,UAAU,GAAGA,YAAM,CAAC,KAAK,CAAC;AAChC,IAAA,MAAM,YAAY,GAAGA,YAAM,CAAC,KAAK,CAAC;AAElC,IAAA,MAAM,YAAY,GAAG,CAAC,MAAe,KAAI;AACvC,QAAA,YAAY,CAAC,OAAO,GAAG,MAAM;QAC7B,IAAI,MAAM,EAAE;AACV,YAAA,cAAc,CAAC,OAAO,GAAG,CAAC,KAAK;AAC/B,YAAA,cAAc,CAAC,OAAO,GAAG,KAAK,IAAI,IAAI;;AAEtC,YAAA,IAAI,CAAC,KAAK;gBAAE,QAAQ,CAAC,UAAU,CAAC;YAChC;QACF;;QAEA,IAAI,cAAc,CAAC,OAAO,IAAI,UAAU,CAAC,OAAO,EAAE;AAChD,YAAA,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC;AAChC,YAAA,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC;YACrC;QACF;;AAEA,QAAA,WAAW,GAAG,KAAK,IAAI,IAAI,CAAC;AAC9B,IAAA,CAAC;AAED,IAAA,MAAM,MAAM,GAAG,CAAC,IAAW,KAAI;;QAE7B,IAAI,CAAC,YAAY,CAAC,OAAO;YAAE;AAC3B,QAAA,cAAc,CAAC,OAAO,GAAG,KAAK;AAC9B,QAAA,QAAQ,CAACD,6BAAW,CAAC,IAAI,CAAC,CAAC;AAC7B,IAAA,CAAC;IAED,MAAM,QAAQ,GAAG,MAAK;QACpB,QAAQ,CAAC,IAAI,CAAC;AACd,QAAA,WAAW,GAAG,IAAI,CAAC;AACrB,IAAA,CAAC;AAED,IAAA,MAAM,gBAAgB,GAAG,CAAC,KAAsB,KAAI;AAClD,QAAA,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ;YAAE;AAC5B,QAAA,UAAU,CAAC,OAAO,GAAG,IAAI;;QAEzB,UAAU,CAAC,MAAK;AACd,YAAA,UAAU,CAAC,OAAO,GAAG,KAAK;AAC5B,QAAA,CAAC,CAAC;AACJ,IAAA,CAAC;AAED,IAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE;
|
|
1
|
+
{"version":3,"file":"useColorFieldEdit.cjs","sources":["../../../../../src/components/organisms/ColorPicker/hooks/useColorFieldEdit.ts"],"sourcesContent":[null],"names":["toColor","toHexString","useRef"],"mappings":";;;;;AAMA;AACA,MAAM,cAAc,GAAG,SAAS;AAahC;;;;;;AAMG;AACI,MAAM,iBAAiB,GAAG,CAAC,EAAE,KAAK,EAAE,YAAY,GAAG,cAAc,EAAE,QAAQ,EAAE,WAAW,EAA4B,KAAI;AAC7H,IAAA,MAAM,KAAK,GAAGA,yBAAO,CAAC,KAAK,CAAC;IAC5B,MAAM,UAAU,GAAG,KAAK,IAAIA,yBAAO,CAAC,YAAY,CAA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IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ;YAAE;AAC5B,QAAA,UAAU,CAAC,OAAO,GAAG,IAAI;;QAEzB,UAAU,CAAC,MAAK;AACd,YAAA,UAAU,CAAC,OAAO,GAAG,KAAK;AAC5B,QAAA,CAAC,CAAC;AACJ,IAAA,CAAC;AAED,IAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE;AAC9F;;"}
|
|
@@ -19,6 +19,7 @@ export interface UseColorFieldEditOptions {
|
|
|
19
19
|
export declare const useColorFieldEdit: ({ value, defaultColor, onChange, onChangeEnd }: UseColorFieldEditOptions) => {
|
|
20
20
|
color: Color | null;
|
|
21
21
|
startValue: string;
|
|
22
|
+
isPickerOpen: import("react").RefObject<boolean>;
|
|
22
23
|
onOpenChange: (isOpen: boolean) => void;
|
|
23
24
|
onPick: (next: Color) => void;
|
|
24
25
|
onRemove: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useColorFieldEdit.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/ColorPicker/hooks/useColorFieldEdit.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAMnD,MAAM,WAAW,wBAAwB;IACvC,gFAAgF;IAChF,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6GAA6G;IAC7G,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,6FAA6F;IAC7F,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC9C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,gDAAiE,wBAAwB
|
|
1
|
+
{"version":3,"file":"useColorFieldEdit.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/ColorPicker/hooks/useColorFieldEdit.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAMnD,MAAM,WAAW,wBAAwB;IACvC,gFAAgF;IAChF,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6GAA6G;IAC7G,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,6FAA6F;IAC7F,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC9C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,gDAAiE,wBAAwB;;;;2BAa3F,OAAO;mBAmBf,KAAK;;8BAYM;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE;CAUjD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRef } from 'react';
|
|
2
|
-
import { toColor, toHexString } from '../colorPicker.utils.js';
|
|
2
|
+
import { toColor, toHexString } from '../utilities/colorPicker.utils.js';
|
|
3
3
|
|
|
4
4
|
// The colour `ColorPicker.Provider` itself starts on.
|
|
5
5
|
const FALLBACK_COLOR = '#7F56D9';
|
|
@@ -60,7 +60,7 @@ const useColorFieldEdit = ({ value, defaultColor = FALLBACK_COLOR, onChange, onC
|
|
|
60
60
|
isEscaping.current = false;
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
|
-
return { color, startValue, onOpenChange, onPick, onRemove, onKeyDownCapture };
|
|
63
|
+
return { color, startValue, isPickerOpen, onOpenChange, onPick, onRemove, onKeyDownCapture };
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
export { useColorFieldEdit };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use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AAC,IAAW,KAAI;;QAE7B,IAAI,CAAC,YAAY,CAAC,OAAO;YAAE;AAC3B,QAAA,cAAc,CAAC,OAAO,GAAG,KAAK;AAC9B,QAAA,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AAC7B,IAAA,CAAC;IAED,MAAM,QAAQ,GAAG,MAAK;QACpB,QAAQ,CAAC,IAAI,CAAC;AACd,QAAA,WAAW,GAAG,IAAI,CAAC;AACrB,IAAA,CAAC;AAED,IAAA,MAAM,gBAAgB,GAAG,CAAC,KAAsB,KAAI;AAClD,QAAA,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ;YAAE;AAC5B,QAAA,UAAU,CAAC,OAAO,GAAG,IAAI;;QAEzB,UAAU,CAAC,MAAK;AACd,YAAA,UAAU,CAAC,OAAO,GAAG,KAAK;AAC5B,QAAA,CAAC,CAAC;AACJ,IAAA,CAAC;AAED,IAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE;
|
|
1
|
+
{"version":3,"file":"useColorFieldEdit.js","sources":["../../../../../src/components/organisms/ColorPicker/hooks/useColorFieldEdit.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAMA;AACA,MAAM,cAAc,GAAG,SAAS;AAahC;;;;;;AAMG;AACI,MAAM,iBAAiB,GAAG,CAAC,EAAE,KAAK,EAAE,YAAY,GAAG,cAAc,EAAE,QAAQ,EAAE,WAAW,EAA4B,KAAI;AAC7H,IAAA,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAC5B,MAAM,UAAU,GAAG,KAAK,IAAI,OAAO,CAAC,YAAY,CAAC;AACjD,IAAA,MAAM,UAAU,GAAG,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC,GAAG,cAAc;;AAGxE,IAAA,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC;;;AAGpC,IAAA,MAAM,cAAc,GAAG,MAAM,CAAgB,IA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C;AAED,IAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE;AAC9F;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var colorPicker_utils = require('../colorPicker.utils.cjs');
|
|
4
|
+
var colorPicker_utils = require('../utilities/colorPicker.utils.cjs');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Draft editing for the CSS colour field. Focus selects the channel list inside the parentheses;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useRef } from 'react';
|
|
2
|
-
import { cssChannelSelection } from '../colorPicker.utils.js';
|
|
2
|
+
import { cssChannelSelection } from '../utilities/colorPicker.utils.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Draft editing for the CSS colour field. Focus selects the channel list inside the parentheses;
|
|
@@ -7,12 +7,12 @@ var Select = require('@flipdish/ui-library/components/molecules/Select');
|
|
|
7
7
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
8
8
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
9
9
|
var reactAriaComponents = require('react-aria-components');
|
|
10
|
-
var colorPicker_utils = require('./colorPicker.utils.cjs');
|
|
11
10
|
var ColorPickerDialog = require('./components/ColorPickerDialog.cjs');
|
|
12
11
|
var ColorPickerField = require('./components/ColorPickerField.cjs');
|
|
13
12
|
var InputCell = require('./components/InputCell.cjs');
|
|
14
13
|
var useCssColorField = require('./hooks/useCssColorField.cjs');
|
|
15
14
|
var ColorPicker_provider = require('./providers/ColorPicker.provider.cjs');
|
|
15
|
+
var colorPicker_utils = require('./utilities/colorPicker.utils.cjs');
|
|
16
16
|
|
|
17
17
|
const COLOR_FORMAT_ITEMS = [
|
|
18
18
|
{ id: 'hex', label: 'Hex' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ColorPicker/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,kDAAkD,CAAC;AAI5F,OAAO,KAAK,EACV,cAAc,IAAI,kBAAkB,EACpC,gBAAgB,IAAI,oBAAoB,EACxC,0BAA0B,IAAI,8BAA8B,EAG7D,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ColorPicker/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,kDAAkD,CAAC;AAI5F,OAAO,KAAK,EACV,cAAc,IAAI,kBAAkB,EACpC,gBAAgB,IAAI,oBAAoB,EACxC,0BAA0B,IAAI,8BAA8B,EAG7D,MAAM,uBAAuB,CAAC;AAc/B,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAkJ7F,MAAM,WAAW,gBAAiB,SAAQ,8BAA8B;IACtE,sDAAsD;IACtD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAQD,4GAA4G;AAC5G,eAAO,MAAM,UAAU,GAAI,2BAAkC,gBAAgB,gCAuB5E,CAAC;AA8HF,MAAM,WAAW,gBAAgB;IAC/B,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AA0CD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;;iBAnYuC,CAAC;gBAAoB,CAAC;qBAK1B,CAAC;;mBAkZtC,qBAAqB;;2CArWc,kBAAkB;yCAwB/B,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC;2CAqBnC,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC;0DAyBhB,WAAW;4EA4BC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC;;sDAgMzC,gBAAgB;4CAhKtB,gBAAgB;CAgO5E,CAAC;AAqBF,YAAY,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -5,12 +5,12 @@ import { Select } from '@flipdish/ui-library/components/molecules/Select';
|
|
|
5
5
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
6
6
|
import { useTestIdPrefix, joinTestId, slugifyTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
7
7
|
import { ColorSwatchPickerItem, ColorSwatch, ColorArea, parseColor, ColorSlider, SliderTrack, ColorThumb as ColorThumb$1, ColorField, Input, ColorSwatchPicker } from 'react-aria-components';
|
|
8
|
-
import { selectAllOnFocus, formatRgbaCss, isSolidColorList, dedupeColors } from './colorPicker.utils.js';
|
|
9
8
|
import { ColorPickerDialog } from './components/ColorPickerDialog.js';
|
|
10
9
|
import { ColorPickerField } from './components/ColorPickerField.js';
|
|
11
10
|
import { InputCell } from './components/InputCell.js';
|
|
12
11
|
import { useCssColorField } from './hooks/useCssColorField.js';
|
|
13
12
|
import { useColorPicker, Provider } from './providers/ColorPicker.provider.js';
|
|
13
|
+
import { selectAllOnFocus, formatRgbaCss, isSolidColorList, dedupeColors } from './utilities/colorPicker.utils.js';
|
|
14
14
|
|
|
15
15
|
const COLOR_FORMAT_ITEMS = [
|
|
16
16
|
{ id: 'hex', label: 'Hex' },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { Color } from 'react-aria-components';
|
|
3
|
-
import type { ColorDisplayFormat } from '../colorPicker.utils';
|
|
3
|
+
import type { ColorDisplayFormat } from '../utilities/colorPicker.utils';
|
|
4
4
|
/** Color picker state. */
|
|
5
5
|
export interface ColorPickerState {
|
|
6
6
|
/** Currently selected color. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.provider.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/ColorPicker/providers/ColorPicker.provider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ColorPicker.provider.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/ColorPicker/providers/ColorPicker.provider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,0BAA0B;AAC1B,MAAM,WAAW,gBAAgB;IAC/B,gCAAgC;IAChC,KAAK,EAAE,KAAK,CAAC;IACb,+CAA+C;IAC/C,WAAW,EAAE,kBAAkB,CAAC;CACjC;AAED,oCAAoC;AACpC,MAAM,WAAW,kBAAkB;IACjC,4BAA4B;IAC5B,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,yDAAyD;IACzD,cAAc,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CACtD;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,gBAAgB,CAAC;IACxB,OAAO,EAAE,kBAAkB,CAAC;CAC7B;AAKD,eAAO,MAAM,cAAc,QAAO,uBAIjC,CAAC;AAEF,mEAAmE;AACnE,eAAO,MAAM,kBAAkB,QAAO,uBAAuB,GAAG,IAAsC,CAAC;AAQvG,0CAA0C;AAC1C,MAAM,WAAW,aAAa;IAC5B,sEAAsE;IACtE,YAAY,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC9B,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACvB,gDAAgD;IAChD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,iEAAiE;IACjE,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,gFAAgF;AAChF,eAAO,MAAM,QAAQ,GAAI,6FAOtB,aAAa,gCAgEf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colorPicker.utils.cjs","sources":["../../../../../src/components/organisms/ColorPicker/utilities/colorPicker.utils.ts"],"sourcesContent":[null],"names":["parseColor"],"mappings":";;;;AAKO,MAAM,gBAAgB,GAA8C,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM;AAEjG;;;;;;;;;AASG;MACU,aAAa,GAAG,CAAC,GAAW,EAAE,KAAa,EAAE,IAAY,EAAE,KAAa,KACnF,CAAA,KAAA,EAAQ,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA,EAAA,EAAK,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA,EAAA,EAAK,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA,EAAA,EAAK,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,GAAG,CAAA,CAAA;AAEtG;;;;;AAKG;AACI,MAAM,mBAAmB,GAAG,CAAC,KAAa,KAA2C;IAC1F,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;IACpC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MAAM;AACN,QAAA,OAAO,IAAI;IACb;AACF;AAEA;;;;;AAKG;AACH;AACO,MAAM,WAAW,GAAG,CAAC,KAAY,KAAa,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,MAAM,GAAG,KAAK;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colorPicker.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/ColorPicker/utilities/colorPicker.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,KAAK,EAAc,MAAM,uBAAuB,CAAC;AAE/D,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAEvE,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAA4B,CAAC;AAEpG;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,EAAE,OAAO,MAAM,EAAE,MAAM,MAAM,EAAE,OAAO,MAAM,KAAG,MACiB,CAAC;AAE1G;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,KAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAKpF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,SAAS,MAAM,EAAE,KAAG,OAQ5D,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,EAAE,KAAG,MAAM,EAarD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,KAAK,GAAG,IAOlE,CAAC;AAEF;;;;;GAKG;AAEH,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,KAAG,MAAiG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colorPicker.utils.js","sources":["../../../../../src/components/organisms/ColorPicker/utilities/colorPicker.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAKO,MAAM,gBAAgB,GAA8C,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM;AAEjG;;;;;;;;;AASG;MACU,aAAa,GAAG,CAAC,GAAW,EAAE,KAAa,EAAE,IAAY,EAAE,KAAa,KACnF,CAAA,KAAA,EAAQ,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA,EAAA,EAAK,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA,EAAA,EAAK,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA,EAAA,EAAK,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,GAAG,CAAA,CAAA;AAEtG;;;;;AAKG;AACI,MAAM,mBAAmB,GAAG,CAAC,KAAa,KAA2C;IAC1F,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;IACpC,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;AAC9B,IAAA,IAAI,KAAK,GAAG,CAAC,IAAI,GAAG,GAAG,KAAK;AAAE,QAAA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE;AACnD,IAAA,OAAO,IAAI;AACb;AAEA;;;;;;AAMG;AACI,MAAM,gBAAgB,GAAG,CAAC,MAAyB,KAAa;AACrE,IAAA,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK;AACrC,IAAA,IAAI;AACF,QAAA,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACrB,QAAA,OAAO,IAAI;IACb;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,KAAK;IACd;AACF;AAEA;;;;;;;;;AASG;AACI,MAAM,YAAY,GAAG,CAAC,MAAgB,KAAc;AACzD,IAAA,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU;AAC9B,IAAA,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAI;AACzB,QAAA,IAAI,GAAW;AACf,QAAA,IAAI;YACF,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;QACtC;AAAE,QAAA,MAAM;YACN,GAAG,GAAG,CAAC;QACT;AACA,QAAA,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AAAE,YAAA,OAAO,KAAK;AAC/B,QAAA,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AACb,QAAA,OAAO,IAAI;AACb,IAAA,CAAC,CAAC;AACJ;AAEA;;;;;AAKG;AACI,MAAM,OAAO,GAAG,CAAC,KAAgC,KAAkB;AACxE,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,EAAE;AAAE,QAAA,OAAO,IAAI;AAC1D,IAAA,IAAI;AACF,QAAA,OAAO,UAAU,CAAC,KAAK,CAAC;IAC1B;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,IAAI;IACb;AACF;AAEA;;;;;AAKG;AACH;AACO,MAAM,WAAW,GAAG,CAAC,KAAY,KAAa,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,MAAM,GAAG,KAAK;;"}
|
|
@@ -6,8 +6,8 @@ var UtilityButton = require('@flipdish/ui-library/components/atoms/UtilityButton
|
|
|
6
6
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var reactAriaComponents = require('react-aria-components');
|
|
9
|
-
var colorPicker_utils = require('../../ColorPicker/colorPicker.utils.cjs');
|
|
10
9
|
var InputCell = require('../../ColorPicker/components/InputCell.cjs');
|
|
10
|
+
var colorPicker_utils = require('../../ColorPicker/utilities/colorPicker.utils.cjs');
|
|
11
11
|
var GradientPicker_provider = require('../providers/GradientPicker.provider.cjs');
|
|
12
12
|
var PositionInput = require('./PositionInput.cjs');
|
|
13
13
|
|
|
@@ -4,8 +4,8 @@ import { ButtonUtility } from '@flipdish/ui-library/components/atoms/UtilityButt
|
|
|
4
4
|
import { useTestIdPrefix, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
5
5
|
import { useMemo } from 'react';
|
|
6
6
|
import { parseColor, ColorField, ColorSwatch, Input } from 'react-aria-components';
|
|
7
|
-
import { selectAllOnFocus } from '../../ColorPicker/colorPicker.utils.js';
|
|
8
7
|
import { InputCell } from '../../ColorPicker/components/InputCell.js';
|
|
8
|
+
import { selectAllOnFocus } from '../../ColorPicker/utilities/colorPicker.utils.js';
|
|
9
9
|
import { useGradientColorPicker } from '../providers/GradientPicker.provider.js';
|
|
10
10
|
import { PositionInput } from './PositionInput.js';
|
|
11
11
|
|
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
|
|
5
|
+
// The ring shows for keyboard focus only, as on every other focus target in the library.
|
|
6
|
+
const FOCUS_TARGET_CLASSES = 'outline-focus-ring focus-visible:outline-2 focus-visible:outline-offset-2';
|
|
5
7
|
/**
|
|
6
8
|
* Keeps keyboard focus in place across a retry. A "Try again" button unmounts once the data arrives, and focus would
|
|
7
9
|
* otherwise fall back to the top of the page; use it wherever a load error is replaced by the content it failed to load.
|
|
8
10
|
*
|
|
9
11
|
* @param retry Starts the failed request again.
|
|
10
|
-
* @returns `retryLoad` for the retry button, and
|
|
11
|
-
*
|
|
12
|
+
* @returns `retryLoad` for the retry button, and for the element that replaces the error either `contentProps` to spread
|
|
13
|
+
* onto it (the ref, `tabIndex={-1}` and a focus ring) or `contentRef` alone when it is already focusable, as `Form` is.
|
|
14
|
+
* That element takes focus when it mounts after a retry, unless the user has moved focus elsewhere.
|
|
12
15
|
*/
|
|
13
16
|
const useFocusAfterRetry = (retry) => {
|
|
14
17
|
const hasRetried = React.useRef(false);
|
|
@@ -24,7 +27,8 @@ const useFocusAfterRetry = (retry) => {
|
|
|
24
27
|
if (content.ownerDocument.activeElement === content.ownerDocument.body)
|
|
25
28
|
content.focus();
|
|
26
29
|
};
|
|
27
|
-
|
|
30
|
+
const contentProps = { ref: contentRef, tabIndex: -1, className: FOCUS_TARGET_CLASSES };
|
|
31
|
+
return { retryLoad, contentRef, contentProps };
|
|
28
32
|
};
|
|
29
33
|
|
|
30
34
|
exports.useFocusAfterRetry = useFocusAfterRetry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/hooks/useFocusAfterRetry/index.ts"],"sourcesContent":[null],"names":["useRef"],"mappings":";;;;AAIA
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/hooks/useFocusAfterRetry/index.ts"],"sourcesContent":[null],"names":["useRef"],"mappings":";;;;AAIA;AACA,MAAM,oBAAoB,GAAG,2EAA2E;AAExG;;;;;;;;AAQG;AACI,MAAM,kBAAkB,GAAG,CAAC,KAAoB,KAAI;AACzD,IAAA,MAAM,UAAU,GAAGA,YAAM,CAAC,KAAK,CAAC;IAEhC,MAAM,SAAS,GAAG,MAAK;AACrB,QAAA,UAAU,CAAC,OAAO,GAAG,IAAI;AACzB,QAAA,KAAK,EAAE;AACT,IAAA,CAAC;AAED,IAAA,MAAM,UAAU,GAAG,CAAC,OAA2B,KAAI;AACjD,QAAA,IAAI,CAAC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO;YAAE;AACrC,QAAA,UAAU,CAAC,OAAO,GAAG,KAAK;;QAE1B,IAAI,OAAO,CAAC,aAAa,CAAC,aAAa,KAAK,OAAO,CAAC,aAAa,CAAC,IAAI;YAAE,OAAO,CAAC,KAAK,EAAE;AACzF,IAAA,CAAC;AAED,IAAA,MAAM,YAAY,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,oBAAoB,EAAW;AAEhG,IAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE;AAChD;;"}
|
|
@@ -3,11 +3,17 @@
|
|
|
3
3
|
* otherwise fall back to the top of the page; use it wherever a load error is replaced by the content it failed to load.
|
|
4
4
|
*
|
|
5
5
|
* @param retry Starts the failed request again.
|
|
6
|
-
* @returns `retryLoad` for the retry button, and
|
|
7
|
-
*
|
|
6
|
+
* @returns `retryLoad` for the retry button, and for the element that replaces the error either `contentProps` to spread
|
|
7
|
+
* onto it (the ref, `tabIndex={-1}` and a focus ring) or `contentRef` alone when it is already focusable, as `Form` is.
|
|
8
|
+
* That element takes focus when it mounts after a retry, unless the user has moved focus elsewhere.
|
|
8
9
|
*/
|
|
9
10
|
export declare const useFocusAfterRetry: (retry: () => unknown) => {
|
|
10
11
|
retryLoad: () => void;
|
|
11
12
|
contentRef: (content: HTMLElement | null) => void;
|
|
13
|
+
contentProps: {
|
|
14
|
+
readonly ref: (content: HTMLElement | null) => void;
|
|
15
|
+
readonly tabIndex: -1;
|
|
16
|
+
readonly className: "outline-focus-ring focus-visible:outline-2 focus-visible:outline-offset-2";
|
|
17
|
+
};
|
|
12
18
|
};
|
|
13
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFocusAfterRetry/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFocusAfterRetry/index.ts"],"names":[],"mappings":"AAOA;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,OAAO;;0BAQxB,WAAW,GAAG,IAAI;;gCAAlB,WAAW,GAAG,IAAI;;;;CAUhD,CAAC"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { useRef } from 'react';
|
|
2
2
|
|
|
3
|
+
// The ring shows for keyboard focus only, as on every other focus target in the library.
|
|
4
|
+
const FOCUS_TARGET_CLASSES = 'outline-focus-ring focus-visible:outline-2 focus-visible:outline-offset-2';
|
|
3
5
|
/**
|
|
4
6
|
* Keeps keyboard focus in place across a retry. A "Try again" button unmounts once the data arrives, and focus would
|
|
5
7
|
* otherwise fall back to the top of the page; use it wherever a load error is replaced by the content it failed to load.
|
|
6
8
|
*
|
|
7
9
|
* @param retry Starts the failed request again.
|
|
8
|
-
* @returns `retryLoad` for the retry button, and
|
|
9
|
-
*
|
|
10
|
+
* @returns `retryLoad` for the retry button, and for the element that replaces the error either `contentProps` to spread
|
|
11
|
+
* onto it (the ref, `tabIndex={-1}` and a focus ring) or `contentRef` alone when it is already focusable, as `Form` is.
|
|
12
|
+
* That element takes focus when it mounts after a retry, unless the user has moved focus elsewhere.
|
|
10
13
|
*/
|
|
11
14
|
const useFocusAfterRetry = (retry) => {
|
|
12
15
|
const hasRetried = useRef(false);
|
|
@@ -22,7 +25,8 @@ const useFocusAfterRetry = (retry) => {
|
|
|
22
25
|
if (content.ownerDocument.activeElement === content.ownerDocument.body)
|
|
23
26
|
content.focus();
|
|
24
27
|
};
|
|
25
|
-
|
|
28
|
+
const contentProps = { ref: contentRef, tabIndex: -1, className: FOCUS_TARGET_CLASSES };
|
|
29
|
+
return { retryLoad, contentRef, contentProps };
|
|
26
30
|
};
|
|
27
31
|
|
|
28
32
|
export { useFocusAfterRetry };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/hooks/useFocusAfterRetry/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAIA
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/hooks/useFocusAfterRetry/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAIA;AACA,MAAM,oBAAoB,GAAG,2EAA2E;AAExG;;;;;;;;AAQG;AACI,MAAM,kBAAkB,GAAG,CAAC,KAAoB,KAAI;AACzD,IAAA,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC;IAEhC,MAAM,SAAS,GAAG,MAAK;AACrB,QAAA,UAAU,CAAC,OAAO,GAAG,IAAI;AACzB,QAAA,KAAK,EAAE;AACT,IAAA,CAAC;AAED,IAAA,MAAM,UAAU,GAAG,CAAC,OAA2B,KAAI;AACjD,QAAA,IAAI,CAAC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO;YAAE;AACrC,QAAA,UAAU,CAAC,OAAO,GAAG,KAAK;;QAE1B,IAAI,OAAO,CAAC,aAAa,CAAC,aAAa,KAAK,OAAO,CAAC,aAAa,CAAC,IAAI;YAAE,OAAO,CAAC,KAAK,EAAE;AACzF,IAAA,CAAC;AAED,IAAA,MAAM,YAAY,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,oBAAoB,EAAW;AAEhG,IAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE;AAChD;;"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var This_field_is_required = {
|
|
6
|
+
value: "This field is required"
|
|
7
|
+
};
|
|
8
|
+
var Enter_a_valid_value = {
|
|
9
|
+
value: "Enter a valid value"
|
|
10
|
+
};
|
|
11
|
+
var Enter_a_valid_email_address = {
|
|
12
|
+
value: "Enter a valid email address"
|
|
13
|
+
};
|
|
14
|
+
var Enter_a_valid_web_address = {
|
|
15
|
+
value: "Enter a valid web address"
|
|
16
|
+
};
|
|
17
|
+
var Enter_a_valid_phone_number = {
|
|
18
|
+
value: "Enter a valid phone number"
|
|
19
|
+
};
|
|
20
|
+
var Enter_a_valid_amount = {
|
|
21
|
+
value: "Enter a valid amount"
|
|
22
|
+
};
|
|
23
|
+
var Enter_a_number = {
|
|
24
|
+
value: "Enter a number"
|
|
25
|
+
};
|
|
26
|
+
var Enter_a_whole_number = {
|
|
27
|
+
value: "Enter a whole number"
|
|
28
|
+
};
|
|
29
|
+
var Enter_a_valid_colour = {
|
|
30
|
+
value: "Enter a valid colour"
|
|
31
|
+
};
|
|
32
|
+
var Choose_an_option = {
|
|
33
|
+
value: "Choose an option"
|
|
34
|
+
};
|
|
35
|
+
var Choose_at_least_one_option = {
|
|
36
|
+
value: "Choose at least one option"
|
|
37
|
+
};
|
|
38
|
+
var Enter_digits_only = {
|
|
39
|
+
value: "Enter digits only"
|
|
40
|
+
};
|
|
41
|
+
var Select_this_box_to_continue = {
|
|
42
|
+
value: "Select this box to continue"
|
|
43
|
+
};
|
|
44
|
+
var Enter_an_Eircode_such_as_D02_X285 = {
|
|
45
|
+
value: "Enter an Eircode, such as D02 X285"
|
|
46
|
+
};
|
|
47
|
+
var Enter_a_UK_postcode_such_as_SW1A_1AA = {
|
|
48
|
+
value: "Enter a UK postcode, such as SW1A 1AA"
|
|
49
|
+
};
|
|
50
|
+
var en = {
|
|
51
|
+
This_field_is_required: This_field_is_required,
|
|
52
|
+
"Enter_{min}_or_more_characters": {
|
|
53
|
+
value: "Enter {min} or more characters"
|
|
54
|
+
},
|
|
55
|
+
"Enter_{max}_characters_or_fewer": {
|
|
56
|
+
value: "Enter {max} characters or fewer"
|
|
57
|
+
},
|
|
58
|
+
Enter_a_valid_value: Enter_a_valid_value,
|
|
59
|
+
Enter_a_valid_email_address: Enter_a_valid_email_address,
|
|
60
|
+
Enter_a_valid_web_address: Enter_a_valid_web_address,
|
|
61
|
+
Enter_a_valid_phone_number: Enter_a_valid_phone_number,
|
|
62
|
+
Enter_a_valid_amount: Enter_a_valid_amount,
|
|
63
|
+
Enter_a_number: Enter_a_number,
|
|
64
|
+
Enter_a_whole_number: Enter_a_whole_number,
|
|
65
|
+
"Enter_{min}_or_more": {
|
|
66
|
+
value: "Enter {min} or more"
|
|
67
|
+
},
|
|
68
|
+
"Enter_{max}_or_less": {
|
|
69
|
+
value: "Enter {max} or less"
|
|
70
|
+
},
|
|
71
|
+
Enter_a_valid_colour: Enter_a_valid_colour,
|
|
72
|
+
"Choose_a_date_on_or_after_{min}": {
|
|
73
|
+
value: "Choose a date on or after {min}"
|
|
74
|
+
},
|
|
75
|
+
"Choose_a_date_on_or_before_{max}": {
|
|
76
|
+
value: "Choose a date on or before {max}"
|
|
77
|
+
},
|
|
78
|
+
Choose_an_option: Choose_an_option,
|
|
79
|
+
Choose_at_least_one_option: Choose_at_least_one_option,
|
|
80
|
+
Enter_digits_only: Enter_digits_only,
|
|
81
|
+
"Enter_{length}_digits": {
|
|
82
|
+
value: "Enter {length} digits"
|
|
83
|
+
},
|
|
84
|
+
Select_this_box_to_continue: Select_this_box_to_continue,
|
|
85
|
+
"Choose_{max}_or_fewer": {
|
|
86
|
+
value: "Choose {max} or fewer"
|
|
87
|
+
},
|
|
88
|
+
Enter_an_Eircode_such_as_D02_X285: Enter_an_Eircode_such_as_D02_X285,
|
|
89
|
+
Enter_a_UK_postcode_such_as_SW1A_1AA: Enter_a_UK_postcode_such_as_SW1A_1AA,
|
|
90
|
+
"Enter_a_postcode_such_as_{example}": {
|
|
91
|
+
value: "Enter a postcode, such as {example}"
|
|
92
|
+
},
|
|
93
|
+
"Enter_a_postal_code_such_as_{example}": {
|
|
94
|
+
value: "Enter a postal code, such as {example}"
|
|
95
|
+
},
|
|
96
|
+
"Enter_a_ZIP_code_such_as_{example}": {
|
|
97
|
+
value: "Enter a ZIP code, such as {example}"
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
exports.Choose_an_option = Choose_an_option;
|
|
102
|
+
exports.Choose_at_least_one_option = Choose_at_least_one_option;
|
|
103
|
+
exports.Enter_a_UK_postcode_such_as_SW1A_1AA = Enter_a_UK_postcode_such_as_SW1A_1AA;
|
|
104
|
+
exports.Enter_a_number = Enter_a_number;
|
|
105
|
+
exports.Enter_a_valid_amount = Enter_a_valid_amount;
|
|
106
|
+
exports.Enter_a_valid_colour = Enter_a_valid_colour;
|
|
107
|
+
exports.Enter_a_valid_email_address = Enter_a_valid_email_address;
|
|
108
|
+
exports.Enter_a_valid_phone_number = Enter_a_valid_phone_number;
|
|
109
|
+
exports.Enter_a_valid_value = Enter_a_valid_value;
|
|
110
|
+
exports.Enter_a_valid_web_address = Enter_a_valid_web_address;
|
|
111
|
+
exports.Enter_a_whole_number = Enter_a_whole_number;
|
|
112
|
+
exports.Enter_an_Eircode_such_as_D02_X285 = Enter_an_Eircode_such_as_D02_X285;
|
|
113
|
+
exports.Enter_digits_only = Enter_digits_only;
|
|
114
|
+
exports.Select_this_box_to_continue = Select_this_box_to_continue;
|
|
115
|
+
exports.This_field_is_required = This_field_is_required;
|
|
116
|
+
exports.default = en;
|
|
117
|
+
//# sourceMappingURL=en.json.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.json.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|