@flipdish/ui-library 0.62.0 → 0.64.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 +22 -21
- package/dist/components/__internal__/listOption/listOption.styles.cjs +20 -0
- package/dist/components/__internal__/listOption/listOption.styles.cjs.map +1 -0
- package/dist/components/__internal__/listOption/listOption.styles.d.ts +16 -0
- package/dist/components/__internal__/listOption/listOption.styles.d.ts.map +1 -0
- package/dist/components/__internal__/listOption/listOption.styles.js +18 -0
- package/dist/components/__internal__/listOption/listOption.styles.js.map +1 -0
- package/dist/components/atoms/BackgroundPattern/components/Circle.cjs +17 -12
- package/dist/components/atoms/BackgroundPattern/components/Circle.cjs.map +1 -1
- package/dist/components/atoms/BackgroundPattern/components/Circle.d.ts +3 -3
- package/dist/components/atoms/BackgroundPattern/components/Circle.d.ts.map +1 -1
- package/dist/components/atoms/BackgroundPattern/components/Circle.js +17 -12
- package/dist/components/atoms/BackgroundPattern/components/Circle.js.map +1 -1
- package/dist/components/atoms/BackgroundPattern/components/Grid.cjs +17 -12
- package/dist/components/atoms/BackgroundPattern/components/Grid.cjs.map +1 -1
- package/dist/components/atoms/BackgroundPattern/components/Grid.d.ts +3 -3
- package/dist/components/atoms/BackgroundPattern/components/Grid.d.ts.map +1 -1
- package/dist/components/atoms/BackgroundPattern/components/Grid.js +17 -12
- package/dist/components/atoms/BackgroundPattern/components/Grid.js.map +1 -1
- package/dist/components/atoms/BackgroundPattern/components/GridCheck.cjs +13 -8
- package/dist/components/atoms/BackgroundPattern/components/GridCheck.cjs.map +1 -1
- package/dist/components/atoms/BackgroundPattern/components/GridCheck.d.ts +3 -3
- package/dist/components/atoms/BackgroundPattern/components/GridCheck.d.ts.map +1 -1
- package/dist/components/atoms/BackgroundPattern/components/GridCheck.js +13 -8
- package/dist/components/atoms/BackgroundPattern/components/GridCheck.js.map +1 -1
- package/dist/components/atoms/BackgroundPattern/components/Square.cjs +17 -12
- package/dist/components/atoms/BackgroundPattern/components/Square.cjs.map +1 -1
- package/dist/components/atoms/BackgroundPattern/components/Square.d.ts +3 -3
- package/dist/components/atoms/BackgroundPattern/components/Square.d.ts.map +1 -1
- package/dist/components/atoms/BackgroundPattern/components/Square.js +17 -12
- package/dist/components/atoms/BackgroundPattern/components/Square.js.map +1 -1
- package/dist/components/atoms/BackgroundPattern/index.cjs +5 -3
- package/dist/components/atoms/BackgroundPattern/index.cjs.map +1 -1
- package/dist/components/atoms/BackgroundPattern/index.d.ts +11 -11
- package/dist/components/atoms/BackgroundPattern/index.d.ts.map +1 -1
- package/dist/components/atoms/BackgroundPattern/index.js +5 -3
- package/dist/components/atoms/BackgroundPattern/index.js.map +1 -1
- package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.cjs +7 -3
- package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.cjs.map +1 -1
- package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.d.ts +4 -4
- package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.d.ts.map +1 -1
- package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.js +7 -3
- package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.js.map +1 -1
- package/dist/components/atoms/Buttons/IconButton/IconButton.cjs +6 -3
- package/dist/components/atoms/Buttons/IconButton/IconButton.cjs.map +1 -1
- package/dist/components/atoms/Buttons/IconButton/IconButton.d.ts +4 -4
- package/dist/components/atoms/Buttons/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/atoms/Buttons/IconButton/IconButton.js +7 -4
- package/dist/components/atoms/Buttons/IconButton/IconButton.js.map +1 -1
- package/dist/components/atoms/Card/index.cjs +5 -3
- package/dist/components/atoms/Card/index.cjs.map +1 -1
- package/dist/components/atoms/Card/index.d.ts +3 -3
- package/dist/components/atoms/Card/index.d.ts.map +1 -1
- package/dist/components/atoms/Card/index.js +5 -3
- package/dist/components/atoms/Card/index.js.map +1 -1
- package/dist/components/atoms/Checkbox/index.d.ts +1 -4
- package/dist/components/atoms/Checkbox/index.d.ts.map +1 -1
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.cjs +3 -3
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.d.ts +2 -7
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.js +4 -4
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/atoms/Dot/index.cjs +5 -3
- package/dist/components/atoms/Dot/index.cjs.map +1 -1
- package/dist/components/atoms/Dot/index.d.ts +3 -3
- package/dist/components/atoms/Dot/index.d.ts.map +1 -1
- package/dist/components/atoms/Dot/index.js +5 -3
- package/dist/components/atoms/Dot/index.js.map +1 -1
- package/dist/components/atoms/FeaturedIcon/index.cjs +4 -3
- package/dist/components/atoms/FeaturedIcon/index.cjs.map +1 -1
- package/dist/components/atoms/FeaturedIcon/index.d.ts +2 -4
- package/dist/components/atoms/FeaturedIcon/index.d.ts.map +1 -1
- package/dist/components/atoms/FeaturedIcon/index.js +5 -4
- package/dist/components/atoms/FeaturedIcon/index.js.map +1 -1
- package/dist/components/atoms/Flag/index.cjs +10 -6
- package/dist/components/atoms/Flag/index.cjs.map +1 -1
- package/dist/components/atoms/Flag/index.d.ts +3 -3
- package/dist/components/atoms/Flag/index.d.ts.map +1 -1
- package/dist/components/atoms/Flag/index.js +12 -8
- package/dist/components/atoms/Flag/index.js.map +1 -1
- package/dist/components/atoms/FlipdishLogo/index.cjs +5 -3
- package/dist/components/atoms/FlipdishLogo/index.cjs.map +1 -1
- package/dist/components/atoms/FlipdishLogo/index.d.ts +3 -3
- package/dist/components/atoms/FlipdishLogo/index.d.ts.map +1 -1
- package/dist/components/atoms/FlipdishLogo/index.js +5 -3
- package/dist/components/atoms/FlipdishLogo/index.js.map +1 -1
- package/dist/components/atoms/Illustration/components/TextIllustration.cjs +7 -4
- package/dist/components/atoms/Illustration/components/TextIllustration.cjs.map +1 -1
- package/dist/components/atoms/Illustration/components/TextIllustration.d.ts +2 -3
- package/dist/components/atoms/Illustration/components/TextIllustration.d.ts.map +1 -1
- package/dist/components/atoms/Illustration/components/TextIllustration.js +7 -4
- package/dist/components/atoms/Illustration/components/TextIllustration.js.map +1 -1
- package/dist/components/atoms/Input/index.d.ts +2 -8
- package/dist/components/atoms/Input/index.d.ts.map +1 -1
- package/dist/components/atoms/Inputs/Input/Input.cjs +4 -4
- package/dist/components/atoms/Inputs/Input/Input.cjs.map +1 -1
- package/dist/components/atoms/Inputs/Input/Input.d.ts +3 -11
- package/dist/components/atoms/Inputs/Input/Input.d.ts.map +1 -1
- package/dist/components/atoms/Inputs/Input/Input.js +6 -6
- package/dist/components/atoms/Inputs/Input/Input.js.map +1 -1
- package/dist/components/atoms/Inputs/SearchInput/SearchInput.cjs +3 -2
- package/dist/components/atoms/Inputs/SearchInput/SearchInput.cjs.map +1 -1
- package/dist/components/atoms/Inputs/SearchInput/SearchInput.d.ts +2 -7
- package/dist/components/atoms/Inputs/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/components/atoms/Inputs/SearchInput/SearchInput.js +3 -2
- package/dist/components/atoms/Inputs/SearchInput/SearchInput.js.map +1 -1
- package/dist/components/atoms/Inputs/TextArea/TextArea.cjs +7 -6
- package/dist/components/atoms/Inputs/TextArea/TextArea.cjs.map +1 -1
- package/dist/components/atoms/Inputs/TextArea/TextArea.d.ts +4 -13
- package/dist/components/atoms/Inputs/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/atoms/Inputs/TextArea/TextArea.js +8 -7
- package/dist/components/atoms/Inputs/TextArea/TextArea.js.map +1 -1
- package/dist/components/atoms/Inputs/TimeInput/TimeInput.cjs +5 -5
- package/dist/components/atoms/Inputs/TimeInput/TimeInput.cjs.map +1 -1
- package/dist/components/atoms/Inputs/TimeInput/TimeInput.d.ts +2 -7
- package/dist/components/atoms/Inputs/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/components/atoms/Inputs/TimeInput/TimeInput.js +6 -6
- package/dist/components/atoms/Inputs/TimeInput/TimeInput.js.map +1 -1
- package/dist/components/atoms/Inputs/components/HintText.cjs +4 -3
- package/dist/components/atoms/Inputs/components/HintText.cjs.map +1 -1
- package/dist/components/atoms/Inputs/components/HintText.d.ts +3 -8
- package/dist/components/atoms/Inputs/components/HintText.d.ts.map +1 -1
- package/dist/components/atoms/Inputs/components/HintText.js +4 -3
- package/dist/components/atoms/Inputs/components/HintText.js.map +1 -1
- package/dist/components/atoms/Inputs/components/Label.cjs +4 -3
- package/dist/components/atoms/Inputs/components/Label.cjs.map +1 -1
- package/dist/components/atoms/Inputs/components/Label.d.ts +3 -8
- package/dist/components/atoms/Inputs/components/Label.d.ts.map +1 -1
- package/dist/components/atoms/Inputs/components/Label.js +4 -3
- package/dist/components/atoms/Inputs/components/Label.js.map +1 -1
- package/dist/components/atoms/PhoneInput/components/PhoneInputCountrySelect.cjs +35 -0
- package/dist/components/atoms/PhoneInput/components/PhoneInputCountrySelect.cjs.map +1 -0
- package/dist/components/atoms/PhoneInput/components/PhoneInputCountrySelect.d.ts +24 -0
- package/dist/components/atoms/PhoneInput/components/PhoneInputCountrySelect.d.ts.map +1 -0
- package/dist/components/atoms/PhoneInput/components/PhoneInputCountrySelect.js +33 -0
- package/dist/components/atoms/PhoneInput/components/PhoneInputCountrySelect.js.map +1 -0
- package/dist/components/atoms/PhoneInput/hooks/usePhoneEntry.cjs +100 -0
- package/dist/components/atoms/PhoneInput/hooks/usePhoneEntry.cjs.map +1 -0
- package/dist/components/atoms/PhoneInput/hooks/usePhoneEntry.d.ts +35 -0
- package/dist/components/atoms/PhoneInput/hooks/usePhoneEntry.d.ts.map +1 -0
- package/dist/components/atoms/PhoneInput/hooks/usePhoneEntry.js +98 -0
- package/dist/components/atoms/PhoneInput/hooks/usePhoneEntry.js.map +1 -0
- package/dist/components/atoms/PhoneInput/index.cjs +79 -0
- package/dist/components/atoms/PhoneInput/index.cjs.map +1 -0
- package/dist/components/atoms/PhoneInput/index.d.ts +48 -0
- package/dist/components/atoms/PhoneInput/index.d.ts.map +1 -0
- package/dist/components/atoms/PhoneInput/index.js +77 -0
- package/dist/components/atoms/PhoneInput/index.js.map +1 -0
- package/dist/components/atoms/PhoneInput/phoneInput.types.d.ts +17 -0
- package/dist/components/atoms/PhoneInput/phoneInput.types.d.ts.map +1 -0
- package/dist/components/atoms/PhoneInput/utilities/phoneInput.utils.cjs +304 -0
- package/dist/components/atoms/PhoneInput/utilities/phoneInput.utils.cjs.map +1 -0
- package/dist/components/atoms/PhoneInput/utilities/phoneInput.utils.d.ts +147 -0
- package/dist/components/atoms/PhoneInput/utilities/phoneInput.utils.d.ts.map +1 -0
- package/dist/components/atoms/PhoneInput/utilities/phoneInput.utils.js +288 -0
- package/dist/components/atoms/PhoneInput/utilities/phoneInput.utils.js.map +1 -0
- package/dist/components/atoms/RadioButton/index.d.ts +1 -4
- package/dist/components/atoms/RadioButton/index.d.ts.map +1 -1
- package/dist/components/atoms/Radios/RadioButton/RadioButton.cjs +6 -4
- package/dist/components/atoms/Radios/RadioButton/RadioButton.cjs.map +1 -1
- package/dist/components/atoms/Radios/RadioButton/RadioButton.d.ts +2 -7
- package/dist/components/atoms/Radios/RadioButton/RadioButton.d.ts.map +1 -1
- package/dist/components/atoms/Radios/RadioButton/RadioButton.js +7 -5
- package/dist/components/atoms/Radios/RadioButton/RadioButton.js.map +1 -1
- package/dist/components/atoms/RatingStars/index.cjs +4 -3
- package/dist/components/atoms/RatingStars/index.cjs.map +1 -1
- package/dist/components/atoms/RatingStars/index.d.ts +3 -3
- package/dist/components/atoms/RatingStars/index.d.ts.map +1 -1
- package/dist/components/atoms/RatingStars/index.js +6 -5
- package/dist/components/atoms/RatingStars/index.js.map +1 -1
- package/dist/components/atoms/SearchInput/index.d.ts +1 -4
- package/dist/components/atoms/SearchInput/index.d.ts.map +1 -1
- package/dist/components/atoms/SocialButton/index.d.ts +1 -1
- package/dist/components/atoms/SocialButton/index.d.ts.map +1 -1
- package/dist/components/atoms/UtilityButton/index.cjs.map +1 -1
- package/dist/components/atoms/UtilityButton/index.d.ts +2 -2
- package/dist/components/atoms/UtilityButton/index.d.ts.map +1 -1
- package/dist/components/atoms/UtilityButton/index.js.map +1 -1
- package/dist/components/atoms/VerificationCodeInput/index.cjs +18 -18
- package/dist/components/atoms/VerificationCodeInput/index.cjs.map +1 -1
- package/dist/components/atoms/VerificationCodeInput/index.d.ts +10 -29
- package/dist/components/atoms/VerificationCodeInput/index.d.ts.map +1 -1
- package/dist/components/atoms/VerificationCodeInput/index.js +19 -19
- package/dist/components/atoms/VerificationCodeInput/index.js.map +1 -1
- package/dist/components/forms/Form/index.cjs +14 -11
- package/dist/components/forms/Form/index.cjs.map +1 -1
- package/dist/components/forms/Form/index.d.ts +9 -8
- package/dist/components/forms/Form/index.d.ts.map +1 -1
- package/dist/components/forms/Form/index.js +16 -13
- package/dist/components/forms/Form/index.js.map +1 -1
- package/dist/components/forms/__internal__/formField/hooks/useFocusThroughSubmit.cjs +10 -1
- package/dist/components/forms/__internal__/formField/hooks/useFocusThroughSubmit.cjs.map +1 -1
- package/dist/components/forms/__internal__/formField/hooks/useFocusThroughSubmit.d.ts.map +1 -1
- package/dist/components/forms/__internal__/formField/hooks/useFocusThroughSubmit.js +10 -1
- package/dist/components/forms/__internal__/formField/hooks/useFocusThroughSubmit.js.map +1 -1
- package/dist/components/forms/fields/FormPhoneInput/index.cjs +36 -0
- package/dist/components/forms/fields/FormPhoneInput/index.cjs.map +1 -0
- package/dist/components/forms/fields/FormPhoneInput/index.d.ts +19 -0
- package/dist/components/forms/fields/FormPhoneInput/index.d.ts.map +1 -0
- package/dist/components/forms/fields/FormPhoneInput/index.js +34 -0
- package/dist/components/forms/fields/FormPhoneInput/index.js.map +1 -0
- package/dist/components/forms/validation/index.cjs +25 -56
- package/dist/components/forms/validation/index.cjs.map +1 -1
- package/dist/components/forms/validation/index.d.ts +2 -12
- package/dist/components/forms/validation/index.d.ts.map +1 -1
- package/dist/components/forms/validation/index.js +1 -32
- package/dist/components/forms/validation/index.js.map +1 -1
- package/dist/components/forms/validation/phoneNumber/index.cjs +20 -0
- package/dist/components/forms/validation/phoneNumber/index.cjs.map +1 -0
- package/dist/components/forms/validation/phoneNumber/index.d.ts +14 -0
- package/dist/components/forms/validation/phoneNumber/index.d.ts.map +1 -0
- package/dist/components/forms/validation/phoneNumber/index.js +18 -0
- package/dist/components/forms/validation/phoneNumber/index.js.map +1 -0
- package/dist/components/forms/validation/utilities/validation.utils.cjs +34 -0
- package/dist/components/forms/validation/utilities/validation.utils.cjs.map +1 -1
- package/dist/components/forms/validation/utilities/validation.utils.d.ts +29 -1
- package/dist/components/forms/validation/utilities/validation.utils.d.ts.map +1 -1
- package/dist/components/forms/validation/utilities/validation.utils.js +33 -2
- package/dist/components/forms/validation/utilities/validation.utils.js.map +1 -1
- package/dist/components/forms/validation/validation.types.d.ts +10 -0
- package/dist/components/forms/validation/validation.types.d.ts.map +1 -1
- package/dist/components/molecules/ButtonGroup/index.cjs +8 -6
- package/dist/components/molecules/ButtonGroup/index.cjs.map +1 -1
- package/dist/components/molecules/ButtonGroup/index.d.ts +7 -5
- package/dist/components/molecules/ButtonGroup/index.d.ts.map +1 -1
- package/dist/components/molecules/ButtonGroup/index.js +12 -10
- package/dist/components/molecules/ButtonGroup/index.js.map +1 -1
- package/dist/components/molecules/EmptyState/index.cjs +33 -33
- package/dist/components/molecules/EmptyState/index.cjs.map +1 -1
- package/dist/components/molecules/EmptyState/index.d.ts +23 -24
- package/dist/components/molecules/EmptyState/index.d.ts.map +1 -1
- package/dist/components/molecules/EmptyState/index.js +36 -36
- package/dist/components/molecules/EmptyState/index.js.map +1 -1
- package/dist/components/molecules/Messaging/index.cjs +5 -3
- package/dist/components/molecules/Messaging/index.cjs.map +1 -1
- package/dist/components/molecules/Messaging/index.d.ts +3 -3
- package/dist/components/molecules/Messaging/index.d.ts.map +1 -1
- package/dist/components/molecules/Messaging/index.js +5 -3
- package/dist/components/molecules/Messaging/index.js.map +1 -1
- package/dist/components/molecules/SectionFooter/index.cjs +9 -6
- package/dist/components/molecules/SectionFooter/index.cjs.map +1 -1
- package/dist/components/molecules/SectionFooter/index.d.ts +5 -5
- package/dist/components/molecules/SectionFooter/index.d.ts.map +1 -1
- package/dist/components/molecules/SectionFooter/index.js +10 -7
- package/dist/components/molecules/SectionFooter/index.js.map +1 -1
- package/dist/components/molecules/SectionHeader/index.cjs +21 -15
- package/dist/components/molecules/SectionHeader/index.cjs.map +1 -1
- package/dist/components/molecules/SectionHeader/index.d.ts +11 -11
- package/dist/components/molecules/SectionHeader/index.d.ts.map +1 -1
- package/dist/components/molecules/SectionHeader/index.js +22 -16
- package/dist/components/molecules/SectionHeader/index.js.map +1 -1
- package/dist/components/molecules/Select/index.d.ts +2 -5
- package/dist/components/molecules/Select/index.d.ts.map +1 -1
- package/dist/components/molecules/Selects/MultiSelect/MultiSelect.cjs +3 -2
- package/dist/components/molecules/Selects/MultiSelect/MultiSelect.cjs.map +1 -1
- package/dist/components/molecules/Selects/MultiSelect/MultiSelect.d.ts +3 -3
- package/dist/components/molecules/Selects/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/molecules/Selects/MultiSelect/MultiSelect.js +4 -3
- package/dist/components/molecules/Selects/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/components/molecules/Selects/Select/Select.cjs +5 -5
- package/dist/components/molecules/Selects/Select/Select.cjs.map +1 -1
- package/dist/components/molecules/Selects/Select/Select.d.ts +3 -6
- package/dist/components/molecules/Selects/Select/Select.d.ts.map +1 -1
- package/dist/components/molecules/Selects/Select/Select.js +6 -6
- package/dist/components/molecules/Selects/Select/Select.js.map +1 -1
- package/dist/components/molecules/Selects/Select/components/Combobox.cjs +7 -5
- package/dist/components/molecules/Selects/Select/components/Combobox.cjs.map +1 -1
- package/dist/components/molecules/Selects/Select/components/Combobox.d.ts +3 -3
- package/dist/components/molecules/Selects/Select/components/Combobox.d.ts.map +1 -1
- package/dist/components/molecules/Selects/Select/components/Combobox.js +10 -8
- package/dist/components/molecules/Selects/Select/components/Combobox.js.map +1 -1
- package/dist/components/molecules/Selects/Select/components/Popover.cjs +2 -3
- package/dist/components/molecules/Selects/Select/components/Popover.cjs.map +1 -1
- package/dist/components/molecules/Selects/Select/components/Popover.d.ts.map +1 -1
- package/dist/components/molecules/Selects/Select/components/Popover.js +2 -3
- package/dist/components/molecules/Selects/Select/components/Popover.js.map +1 -1
- package/dist/components/molecules/Selects/components/SelectItem.cjs +2 -1
- package/dist/components/molecules/Selects/components/SelectItem.cjs.map +1 -1
- package/dist/components/molecules/Selects/components/SelectItem.d.ts.map +1 -1
- package/dist/components/molecules/Selects/components/SelectItem.js +2 -1
- package/dist/components/molecules/Selects/components/SelectItem.js.map +1 -1
- package/dist/components/molecules/Tabs/index.cjs +10 -7
- package/dist/components/molecules/Tabs/index.cjs.map +1 -1
- package/dist/components/molecules/Tabs/index.d.ts +12 -15
- package/dist/components/molecules/Tabs/index.d.ts.map +1 -1
- package/dist/components/molecules/Tabs/index.js +13 -10
- package/dist/components/molecules/Tabs/index.js.map +1 -1
- package/dist/components/molecules/Tags/Tag/Tag.cjs +4 -3
- package/dist/components/molecules/Tags/Tag/Tag.cjs.map +1 -1
- package/dist/components/molecules/Tags/Tag/Tag.d.ts +4 -3
- package/dist/components/molecules/Tags/Tag/Tag.d.ts.map +1 -1
- package/dist/components/molecules/Tags/Tag/Tag.js +5 -4
- package/dist/components/molecules/Tags/Tag/Tag.js.map +1 -1
- package/dist/components/molecules/Tags/TagGroup/TagGroup.cjs +5 -3
- package/dist/components/molecules/Tags/TagGroup/TagGroup.cjs.map +1 -1
- package/dist/components/molecules/Tags/TagGroup/TagGroup.d.ts +2 -3
- package/dist/components/molecules/Tags/TagGroup/TagGroup.d.ts.map +1 -1
- package/dist/components/molecules/Tags/TagGroup/TagGroup.js +6 -4
- package/dist/components/molecules/Tags/TagGroup/TagGroup.js.map +1 -1
- package/dist/components/molecules/TextArea/index.d.ts +1 -4
- package/dist/components/molecules/TextArea/index.d.ts.map +1 -1
- package/dist/components/organisms/Carousel/index.cjs +26 -14
- package/dist/components/organisms/Carousel/index.cjs.map +1 -1
- package/dist/components/organisms/Carousel/index.d.ts +8 -10
- package/dist/components/organisms/Carousel/index.d.ts.map +1 -1
- package/dist/components/organisms/Carousel/index.js +28 -16
- package/dist/components/organisms/Carousel/index.js.map +1 -1
- package/dist/components/organisms/ColorPicker/components/ColorPickerField.cjs +3 -2
- package/dist/components/organisms/ColorPicker/components/ColorPickerField.cjs.map +1 -1
- package/dist/components/organisms/ColorPicker/components/ColorPickerField.d.ts +2 -4
- package/dist/components/organisms/ColorPicker/components/ColorPickerField.d.ts.map +1 -1
- package/dist/components/organisms/ColorPicker/components/ColorPickerField.js +4 -3
- package/dist/components/organisms/ColorPicker/components/ColorPickerField.js.map +1 -1
- package/dist/components/organisms/ColorPicker/index.cjs +3 -1
- package/dist/components/organisms/ColorPicker/index.cjs.map +1 -1
- package/dist/components/organisms/ColorPicker/index.d.ts +1 -1
- package/dist/components/organisms/ColorPicker/index.d.ts.map +1 -1
- package/dist/components/organisms/ColorPicker/index.js +7 -5
- package/dist/components/organisms/ColorPicker/index.js.map +1 -1
- package/dist/components/organisms/ColorPicker/providers/ColorPicker.provider.js +1 -1
- package/dist/components/organisms/CommandMenu/components/CommandInput.cjs +5 -3
- package/dist/components/organisms/CommandMenu/components/CommandInput.cjs.map +1 -1
- package/dist/components/organisms/CommandMenu/components/CommandInput.d.ts +3 -5
- package/dist/components/organisms/CommandMenu/components/CommandInput.d.ts.map +1 -1
- package/dist/components/organisms/CommandMenu/components/CommandInput.js +5 -3
- package/dist/components/organisms/CommandMenu/components/CommandInput.js.map +1 -1
- package/dist/components/organisms/CommandMenu/index.cjs +8 -6
- package/dist/components/organisms/CommandMenu/index.cjs.map +1 -1
- package/dist/components/organisms/CommandMenu/index.d.ts +4 -4
- package/dist/components/organisms/CommandMenu/index.d.ts.map +1 -1
- package/dist/components/organisms/CommandMenu/index.js +9 -7
- package/dist/components/organisms/CommandMenu/index.js.map +1 -1
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.cjs +4 -2
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.cjs.map +1 -1
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.d.ts +2 -4
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.js +4 -2
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs +3 -2
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs.map +1 -1
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.d.ts +2 -4
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.js +4 -3
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/organisms/DatePickers/RangeCalendar/RangeCalendar.js +2 -2
- package/dist/components/organisms/FileUpload/index.cjs +8 -6
- package/dist/components/organisms/FileUpload/index.cjs.map +1 -1
- package/dist/components/organisms/FileUpload/index.d.ts +7 -7
- package/dist/components/organisms/FileUpload/index.d.ts.map +1 -1
- package/dist/components/organisms/FileUpload/index.js +12 -10
- package/dist/components/organisms/FileUpload/index.js.map +1 -1
- package/dist/components/organisms/FilterBar/index.cjs +13 -9
- package/dist/components/organisms/FilterBar/index.cjs.map +1 -1
- package/dist/components/organisms/FilterBar/index.d.ts +7 -7
- package/dist/components/organisms/FilterBar/index.d.ts.map +1 -1
- package/dist/components/organisms/FilterBar/index.js +14 -10
- package/dist/components/organisms/FilterBar/index.js.map +1 -1
- package/dist/components/organisms/SidePanel/components/SidePanelContent.cjs +4 -3
- package/dist/components/organisms/SidePanel/components/SidePanelContent.cjs.map +1 -1
- package/dist/components/organisms/SidePanel/components/SidePanelContent.d.ts +12 -6
- package/dist/components/organisms/SidePanel/components/SidePanelContent.d.ts.map +1 -1
- package/dist/components/organisms/SidePanel/components/SidePanelContent.js +4 -3
- package/dist/components/organisms/SidePanel/components/SidePanelContent.js.map +1 -1
- package/dist/components/organisms/SidePanel/components/SidePanelFooter.cjs +4 -3
- package/dist/components/organisms/SidePanel/components/SidePanelFooter.cjs.map +1 -1
- package/dist/components/organisms/SidePanel/components/SidePanelFooter.d.ts +11 -6
- package/dist/components/organisms/SidePanel/components/SidePanelFooter.d.ts.map +1 -1
- package/dist/components/organisms/SidePanel/components/SidePanelFooter.js +4 -3
- package/dist/components/organisms/SidePanel/components/SidePanelFooter.js.map +1 -1
- package/dist/components/organisms/SidePanel/components/SidePanelHeader.cjs +12 -10
- package/dist/components/organisms/SidePanel/components/SidePanelHeader.cjs.map +1 -1
- package/dist/components/organisms/SidePanel/components/SidePanelHeader.d.ts +8 -7
- package/dist/components/organisms/SidePanel/components/SidePanelHeader.d.ts.map +1 -1
- package/dist/components/organisms/SidePanel/components/SidePanelHeader.js +15 -13
- package/dist/components/organisms/SidePanel/components/SidePanelHeader.js.map +1 -1
- package/dist/components/organisms/SidebarNavigation/index.cjs +2 -1
- package/dist/components/organisms/SidebarNavigation/index.cjs.map +1 -1
- package/dist/components/organisms/SidebarNavigation/index.d.ts.map +1 -1
- package/dist/components/organisms/SidebarNavigation/index.js +2 -1
- package/dist/components/organisms/SidebarNavigation/index.js.map +1 -1
- package/dist/components/organisms/SlideoutMenu/index.cjs +8 -8
- package/dist/components/organisms/SlideoutMenu/index.cjs.map +1 -1
- package/dist/components/organisms/SlideoutMenu/index.d.ts +9 -18
- package/dist/components/organisms/SlideoutMenu/index.d.ts.map +1 -1
- package/dist/components/organisms/SlideoutMenu/index.js +9 -9
- package/dist/components/organisms/SlideoutMenu/index.js.map +1 -1
- package/dist/components/organisms/Table/index.cjs +15 -10
- package/dist/components/organisms/Table/index.cjs.map +1 -1
- package/dist/components/organisms/Table/index.d.ts +10 -19
- package/dist/components/organisms/Table/index.d.ts.map +1 -1
- package/dist/components/organisms/Table/index.js +18 -13
- package/dist/components/organisms/Table/index.js.map +1 -1
- package/dist/components/organisms/TextEditor/components/TextEditorExtensions.js +1 -1
- package/dist/components/organisms/TextEditor/components/TextEditorToolbar.cjs +5 -3
- package/dist/components/organisms/TextEditor/components/TextEditorToolbar.cjs.map +1 -1
- package/dist/components/organisms/TextEditor/components/TextEditorToolbar.d.ts +2 -3
- package/dist/components/organisms/TextEditor/components/TextEditorToolbar.d.ts.map +1 -1
- package/dist/components/organisms/TextEditor/components/TextEditorToolbar.js +5 -3
- package/dist/components/organisms/TextEditor/components/TextEditorToolbar.js.map +1 -1
- package/dist/components/organisms/TextEditor/index.cjs +16 -9
- package/dist/components/organisms/TextEditor/index.cjs.map +1 -1
- package/dist/components/organisms/TextEditor/index.d.ts +7 -9
- package/dist/components/organisms/TextEditor/index.d.ts.map +1 -1
- package/dist/components/organisms/TextEditor/index.js +21 -14
- package/dist/components/organisms/TextEditor/index.js.map +1 -1
- package/dist/components/organisms/VideoPlayer/index.cjs +3 -2
- package/dist/components/organisms/VideoPlayer/index.cjs.map +1 -1
- package/dist/components/organisms/VideoPlayer/index.d.ts +1 -6
- package/dist/components/organisms/VideoPlayer/index.d.ts.map +1 -1
- package/dist/components/organisms/VideoPlayer/index.js +4 -3
- package/dist/components/organisms/VideoPlayer/index.js.map +1 -1
- package/dist/native/components/atoms/PhoneInput/index.d.ts +12 -0
- package/dist/native/components/forms/fields/FormPhoneInput/index.d.ts +12 -0
- package/dist/native/components/forms/validation/phoneNumber/index.d.ts +12 -0
- package/dist/utilities/__internal__/inertUtils/inert.utils.cjs +17 -0
- package/dist/utilities/__internal__/inertUtils/inert.utils.cjs.map +1 -1
- package/dist/utilities/__internal__/inertUtils/inert.utils.d.ts +11 -0
- package/dist/utilities/__internal__/inertUtils/inert.utils.d.ts.map +1 -1
- package/dist/utilities/__internal__/inertUtils/inert.utils.js +17 -1
- package/dist/utilities/__internal__/inertUtils/inert.utils.js.map +1 -1
- package/dist/utilities/__internal__/refUtils/ref.utils.cjs +20 -0
- package/dist/utilities/__internal__/refUtils/ref.utils.cjs.map +1 -1
- package/dist/utilities/__internal__/refUtils/ref.utils.d.ts +10 -1
- package/dist/utilities/__internal__/refUtils/ref.utils.d.ts.map +1 -1
- package/dist/utilities/__internal__/refUtils/ref.utils.js +20 -1
- package/dist/utilities/__internal__/refUtils/ref.utils.js.map +1 -1
- package/package.json +13 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Tabs/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Tabs/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAgD,KAAK,EAAE,EAA8B,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AACtI,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,QAAQ,IAAI,YAAY,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAW9I,KAAK,WAAW,GAAG,YAAY,GAAG,UAAU,CAAC;AAE7C,KAAK,eAAe,GAAG,cAAc,GAAG,aAAa,GAAG,eAAe,GAAG,gBAAgB,GAAG,WAAW,CAAC;AACzG,KAAK,aAAa,GAAG,cAAc,GAAG,aAAa,GAAG,eAAe,GAAG,gBAAgB,GAAG,MAAM,CAAC;AAClG,KAAK,aAAa,CAAC,CAAC,IAAI,CAAC,SAAS,YAAY,GAAG,eAAe,GAAG,aAAa,CAAC;AAEjF,iIAAiI;AACjI,eAAO,MAAM,YAAY,GAAI,2CAA2C,IAAI,CAAC,kBAAkB,EAAE,gBAAgB,GAAG,YAAY,GAAG,WAAW,CAAC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zB,wFAAwF;IACxF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,gHAAgH;AAChH,eAAO,MAAM,GAAG,GAAI,6GASjB,iBAAiB,gCAoEnB,CAAC;AAEF,QAAA,MAAM,QAAQ;IAGV,iHAAiH;oBACjG,MAAM;kDAgBxB,CAAC;AAIH;;;;;GAKG;AACH,eAAO,MAAM,IAAI,EAAe,OAAO,QAAQ,GAAG;IAChD,KAAK,EAAE,OAAO,QAAQ,CAAC;IACvB,IAAI,EAAE,OAAO,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,GAAG,CAAC;CAClB,CAAC"}
|
|
@@ -2,9 +2,9 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import { Badge } from '@flipdish/ui-library/components/atoms/Badges';
|
|
3
3
|
import { Skeleton } from '@flipdish/ui-library/components/atoms/Skeleton';
|
|
4
4
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
5
|
-
import { useTestIdPrefix,
|
|
6
|
-
import { createContext, useContext, isValidElement } from 'react';
|
|
7
|
-
import {
|
|
5
|
+
import { useTestIdPrefix, slugifyTestId, joinTestId, useResolvedTestId, TestIdProvider } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
6
|
+
import { createContext, forwardRef, useContext, isValidElement } from 'react';
|
|
7
|
+
import { TabPanel as TabPanel$1, Tabs as Tabs$1, useSlottedContext, TabsContext, TabList as TabList$1, Tab as Tab$1 } from 'react-aria-components';
|
|
8
8
|
import { isReactComponent } from '../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.js';
|
|
9
9
|
|
|
10
10
|
/** Per-type tab classes for an interaction state — exported so `PageHeader`'s nav strip matches without duplicating the maps. */
|
|
@@ -66,12 +66,13 @@ const TabList = ({ size = 'sm', type = 'button-brand', orientation: orientationP
|
|
|
66
66
|
'relative before:absolute before:inset-x-0 before:bottom-0 before:h-px before:bg-border-secondary', typeof className === 'function' ? className(state) : className), children: children ?? (otherProps.items ? (item) => jsx(Tab, { ...item, children: item.children }) : undefined) }) }));
|
|
67
67
|
};
|
|
68
68
|
/** Content shown while its matching `Tab` is selected; exposed as `Tabs.Panel`. */
|
|
69
|
-
const TabPanel = ({ 'data-testid': dataTestId, ...props }) => {
|
|
69
|
+
const TabPanel = forwardRef(({ 'data-testid': dataTestId, ...props }, ref) => {
|
|
70
70
|
const prefix = useTestIdPrefix();
|
|
71
71
|
const idPart = props.id !== undefined ? slugifyTestId(String(props.id)) : 'panel';
|
|
72
72
|
const panelTestId = dataTestId ?? (prefix ? joinTestId(prefix, `panel-${idPart}`) : undefined);
|
|
73
|
-
return (jsx(TabPanel$1, { ...props, "data-testid": panelTestId, className: (state) => cx('outline-focus-ring focus-visible:outline-2 focus-visible:outline-offset-2', typeof props.className === 'function' ? props.className(state) : props.className) }));
|
|
74
|
-
};
|
|
73
|
+
return (jsx(TabPanel$1, { ...props, ref: ref, "data-testid": panelTestId, className: (state) => cx('outline-focus-ring focus-visible:outline-2 focus-visible:outline-offset-2', typeof props.className === 'function' ? props.className(state) : props.className) }));
|
|
74
|
+
});
|
|
75
|
+
TabPanel.displayName = 'Tabs.Panel';
|
|
75
76
|
/** A single selectable tab with an optional icon and badge, styled by its `TabList`; exposed as `Tabs.Item`. */
|
|
76
77
|
const Tab = ({ label, children, badge, isBadgeLoading, icon: Icon, className, 'data-testid': dataTestId, ...otherProps }) => {
|
|
77
78
|
const { size = 'sm', type = 'button-brand', fullWidth } = useContext(TabListContext);
|
|
@@ -91,16 +92,18 @@ const Tab = ({ label, children, badge, isBadgeLoading, icon: Icon, className, 'd
|
|
|
91
92
|
return (jsx(Tab$1, { ...otherProps, "data-testid": tabTestId, className: (prop) => cx('z-10 flex h-max cursor-pointer items-center justify-center gap-2 rounded-md whitespace-nowrap text-quaternary transition duration-100 ease-linear', 'group-orientation-vertical:justify-start', fullWidth && 'w-full flex-1', tabSizes[size].base, tabSizes[size][type], getTabStyles(prop)[type], typeof className === 'function' ? className(prop) : className), children: (state) => (jsxs(Fragment, { children: [isValidElement(Icon) && Icon, isReactComponent(Icon) && jsx(Icon, { "data-icon": true, className: "transition-inherit-all" }), jsxs("span", { className: cx('flex items-center gap-1.5', type !== 'line' && 'px-0.5'), children: [typeof children === 'function' ? children(state) : children || label, isBadgeLoading ? (jsx(Skeleton, { "aria-hidden": "true", width: 28, height: 22, radius: showPillColorBadge ? 'full' : 'md', className: cx(size === 'sm' && '-my-px'), "data-testid": tabTestId ? joinTestId(tabTestId, 'badge-loading') : undefined })) : (badge !== undefined &&
|
|
92
93
|
badge !== '' && (jsx(Badge, { size: "sm", type: showPillColorBadge ? 'pill-color' : 'modern', color: showPillColorBadge && (state.isHovered || state.isSelected) ? 'brand' : 'gray', className: cx('flex transition-inherit-all', size === 'sm' && '-my-px'), children: badge })))] })] })) }));
|
|
93
94
|
};
|
|
95
|
+
const TabsRoot = forwardRef(({ className, 'data-testid': dataTestId, ...props }, ref) => {
|
|
96
|
+
const rootTestId = useResolvedTestId({ testId: dataTestId, segment: 'tabs', rootName: 'tabs' });
|
|
97
|
+
return (jsx(TestIdProvider, { value: rootTestId, children: jsx(Tabs$1, { keyboardActivation: "manual", ...props, ref: ref, "data-testid": rootTestId, className: (state) => cx('flex w-full flex-col', typeof className === 'function' ? className(state) : className) }) }));
|
|
98
|
+
});
|
|
99
|
+
TabsRoot.displayName = 'Tabs';
|
|
94
100
|
/**
|
|
95
101
|
* Organises related content into labelled panels, showing one at a time.
|
|
96
102
|
* Compose with `Tabs.List` (`TabList`), `Tabs.Item` (`Tab`), and `Tabs.Panel` (`TabPanel`).
|
|
97
103
|
*
|
|
98
104
|
* @summary switch between labelled content panels
|
|
99
105
|
*/
|
|
100
|
-
const Tabs =
|
|
101
|
-
const rootTestId = useResolvedTestId({ testId: dataTestId, segment: 'tabs', rootName: 'tabs' });
|
|
102
|
-
return (jsx(TestIdProvider, { value: rootTestId, children: jsx(Tabs$1, { keyboardActivation: "manual", ...props, "data-testid": rootTestId, className: (state) => cx('flex w-full flex-col', typeof className === 'function' ? className(state) : className) }) }));
|
|
103
|
-
};
|
|
106
|
+
const Tabs = TabsRoot;
|
|
104
107
|
Tabs.Panel = TabPanel;
|
|
105
108
|
Tabs.List = TabList;
|
|
106
109
|
Tabs.Item = Tab;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/molecules/Tabs/index.tsx"],"sourcesContent":[null],"names":["_jsx","AriaTabList","AriaTabPanel","AriaTab","_jsxs","_Fragment","AriaTabs"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/molecules/Tabs/index.tsx"],"sourcesContent":[null],"names":["_jsx","AriaTabList","AriaTabPanel","AriaTab","_jsxs","_Fragment","AriaTabs"],"mappings":";;;;;;;;;AAwBA;AACO,MAAM,YAAY,GAAG,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAA2E,MAAM;AACnJ,IAAA,cAAc,EAAE,EAAE,CAChB,mDAAmD,EACnD,cAAc,IAAI,6BAA6B,EAC/C,CAAC,UAAU,IAAI,SAAS,KAAK,qFAAqF,CACnH;AACD,IAAA,aAAa,EAAE,EAAE,CACf,mDAAmD,EACnD,SAAS,IAAI,qEAAqE,EAClF,cAAc,IAAI,6BAA6B,EAC/C,UAAU,IAAI,qEAAqE,CACpF;AACD,IAAA,eAAe,EAAE,EAAE,CACjB,mDAAmD,EACnD,cAAc,IAAI,6BAA6B,EAC/C,CAAC,UAAU,IAAI,SAAS,KAAK,6EAA6E,CAC3G;AACD,IAAA,gBAAgB,EAAE,EAAE,CAClB,8DAA8D,EAC9D,cAAc,IAAI,6BAA6B,EAC/C,CAAC,UAAU,IAAI,SAAS,KAAK,4GAA4G,CAC1I;AACD,IAAA,SAAS,EAAE,EAAE,CACX,8FAA8F,EAC9F,cAAc,IAAI,6BAA6B,EAC/C,CAAC,UAAU,IAAI,SAAS,KAAK,4FAA4F,CAC1H;AACD,IAAA,IAAI,EAAE,EAAE,CAC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AAK,CAAC,GAAG,SAAS,CAAC,EAAA,CAChH,EAAA,CACa;AAErB,CAAC,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,MAAM;AAE7B;;;;;AAKG;AACI,MAAM,IAAI,GAAG;AAMpB,IAAI,CAAC,KAAK,GAAG,QAAQ;AACrB,IAAI,CAAC,IAAI,GAAG,OAAO;AACnB,IAAI,CAAC,IAAI,GAAG,GAAG;;"}
|
|
@@ -18,7 +18,7 @@ var TagCloseX = require('./components/TagCloseX.cjs');
|
|
|
18
18
|
*
|
|
19
19
|
* @summary single tag with optional adornments and selection
|
|
20
20
|
*/
|
|
21
|
-
const Tag = ({ id, avatarSrc, avatarContrastBorder = true, dot, dotColor = 'fg-success-secondary', dotClassName, isDisabled, count, className, children, onClose, textValue, 'data-testid': dataTestId, ...otherProps }) => {
|
|
21
|
+
const Tag = React.forwardRef(({ id, avatarSrc, avatarContrastBorder = true, dot, dotColor = 'fg-success-secondary', dotClassName, isDisabled, count, className, children, onClose, textValue, 'data-testid': dataTestId, ...otherProps }, ref) => {
|
|
22
22
|
const context = React.useContext(TagGroup_context.TagGroupContext);
|
|
23
23
|
const prefix = testIdUtils.useTestIdPrefix();
|
|
24
24
|
const idPart = id !== undefined ? testIdUtils.slugifyTestId(String(id)) : 'tag';
|
|
@@ -32,7 +32,7 @@ const Tag = ({ id, avatarSrc, avatarContrastBorder = true, dot, dotColor = 'fg-s
|
|
|
32
32
|
return null;
|
|
33
33
|
};
|
|
34
34
|
const leadingContent = renderLeadingContent();
|
|
35
|
-
return (jsxRuntime.jsx(reactAriaComponents.Tag, { ...otherProps, id: id, isDisabled: isDisabled,
|
|
35
|
+
return (jsxRuntime.jsx(reactAriaComponents.Tag, { ...otherProps, ref: ref, id: id, isDisabled: isDisabled,
|
|
36
36
|
// A given `textValue` wins: it is how a tag whose children are not plain text gets its accessible text.
|
|
37
37
|
textValue: textValue ?? (typeof children === 'string' ? children : undefined), "data-testid": tagTestId, className: (state) => cx.cx(Tags_styles.styles.root, Tags_styles.styles.sizes[context.size].root.base,
|
|
38
38
|
// With avatar
|
|
@@ -52,7 +52,8 @@ const Tag = ({ id, avatarSrc, avatarContrastBorder = true, dot, dotColor = 'fg-s
|
|
|
52
52
|
if (id !== undefined)
|
|
53
53
|
onClose?.(String(id));
|
|
54
54
|
}, "data-testid": closeTestId }))] })) }));
|
|
55
|
-
};
|
|
55
|
+
});
|
|
56
|
+
Tag.displayName = 'Tag';
|
|
56
57
|
|
|
57
58
|
exports.Tag = Tag;
|
|
58
59
|
//# sourceMappingURL=Tag.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.cjs","sources":["../../../../../src/components/molecules/Tags/Tag/Tag.tsx"],"sourcesContent":[null],"names":["useContext","TagGroupContext","useTestIdPrefix","slugifyTestId","joinTestId","_jsx","TagAvatar","Dot","AriaTag","cx","styles","_jsxs","_Fragment","TagCheckbox","TagCloseX"],"mappings":";;;;;;;;;;;;;;AAgDA;;;;;AAKG;
|
|
1
|
+
{"version":3,"file":"Tag.cjs","sources":["../../../../../src/components/molecules/Tags/Tag/Tag.tsx"],"sourcesContent":[null],"names":["forwardRef","useContext","TagGroupContext","useTestIdPrefix","slugifyTestId","joinTestId","_jsx","TagAvatar","Dot","AriaTag","cx","styles","_jsxs","_Fragment","TagCheckbox","TagCloseX"],"mappings":";;;;;;;;;;;;;;AAgDA;;;;;AAKG;MACU,GAAG,GAAGA,gBAAU,CAC3B,CACE,EACE,EAAE,EACF,SAAS,EACT,oBAAoB,GAAG,IAAI,EAC3B,GAAG,EACH,QAAQ,GAAG,sBAAsB,EACjC,YAAY,EACZ,UAAU,EACV,KAAK,EACL,SAAS,EACT,QAAQ,EACR,OAAO,EACP,SAAS,EACT,aAAa,EAAE,UAAU,EACzB,GAAG,UAAU,EACd,EACD,GAAG,KACD;AACF,IAAA,MAAM,OAAO,GAAGC,gBAAU,CAACC,gCAAe,CAAC;AAC3C,IAAA,MAAM,MAAM,GAAGC,2BAA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,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,EAAA,QAAA,EAAG,KAAK,EAAA,CAAQ,CAAA,EAAA,CAC7G,EAEL,CAAC,OAAO,IAAI,cAAc,MACzBL,cAAA,CAACS,mBAAS,EAAA,EACR,IAAI,EAAE,OAAO,CAAC,IAAI,EAClB,mBAAmB,EAAE,cAAc;;oBAEnC,OAAO,EAAE,MAAK;wBACZ,IAAI,EAAE,KAAK,SAAS;AAAE,4BAAA,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;oBAC7C,CAAC,EAAA,aAAA,EACY,WAAW,EAAA,CACxB,CACH,IACA,CACJ,EAAA,CACO;AAEd,CAAC;AAGH,GAAG,CAAC,WAAW,GAAG,KAAK;;"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type DotColor } from '@flipdish/ui-library/components/atoms/Dot';
|
|
2
|
-
import { type PropsWithChildren, type RefAttributes } from 'react';
|
|
3
2
|
import { type TagProps as AriaTagProps } from 'react-aria-components';
|
|
4
3
|
export interface TagItem {
|
|
5
4
|
/** Stable key for the tag: selection, removal and the derived test id all read it. */
|
|
@@ -26,7 +25,7 @@ export interface TagItem {
|
|
|
26
25
|
/** Shows a close button and is called with the tag id when it is pressed. */
|
|
27
26
|
onClose?: (id: string) => void;
|
|
28
27
|
}
|
|
29
|
-
export interface TagProps extends AriaTagProps,
|
|
28
|
+
export interface TagProps extends AriaTagProps, Omit<TagItem, 'label' | 'id'> {
|
|
30
29
|
/**
|
|
31
30
|
* Overrides the derived `data-testid` for this tag (defaults to
|
|
32
31
|
* `<root>--tag-<slug>`, slugified from `id`).
|
|
@@ -39,5 +38,7 @@ export interface TagProps extends AriaTagProps, RefAttributes<HTMLDivElement>, O
|
|
|
39
38
|
*
|
|
40
39
|
* @summary single tag with optional adornments and selection
|
|
41
40
|
*/
|
|
42
|
-
export declare const Tag: (
|
|
41
|
+
export declare const Tag: import("react").ForwardRefExoticComponent<TagProps & {
|
|
42
|
+
children?: import("react").ReactNode | undefined;
|
|
43
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
43
44
|
//# sourceMappingURL=Tag.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Tags/Tag/Tag.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Tags/Tag/Tag.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAI/E,OAAO,EAAkB,KAAK,QAAQ,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAOtF,MAAM,WAAW,OAAO;IACtB,sFAAsF;IACtF,EAAE,EAAE,MAAM,CAAC;IACX,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qFAAqF;IACrF,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,4GAA4G;IAC5G,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAGD,MAAM,WAAW,QAAS,SAAQ,YAAY,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3E;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,GAAG;;kDA4Ff,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import { Dot } from '@flipdish/ui-library/components/atoms/Dot';
|
|
3
3
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
4
4
|
import { useTestIdPrefix, slugifyTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
5
|
-
import { useContext } from 'react';
|
|
5
|
+
import { forwardRef, useContext } from 'react';
|
|
6
6
|
import { Tag as Tag$1 } from 'react-aria-components';
|
|
7
7
|
import { TagGroupContext } from '../providers/TagGroup.context.js';
|
|
8
8
|
import { styles } from '../Tags.styles.js';
|
|
@@ -16,7 +16,7 @@ import { TagCloseX } from './components/TagCloseX.js';
|
|
|
16
16
|
*
|
|
17
17
|
* @summary single tag with optional adornments and selection
|
|
18
18
|
*/
|
|
19
|
-
const Tag = ({ id, avatarSrc, avatarContrastBorder = true, dot, dotColor = 'fg-success-secondary', dotClassName, isDisabled, count, className, children, onClose, textValue, 'data-testid': dataTestId, ...otherProps }) => {
|
|
19
|
+
const Tag = forwardRef(({ id, avatarSrc, avatarContrastBorder = true, dot, dotColor = 'fg-success-secondary', dotClassName, isDisabled, count, className, children, onClose, textValue, 'data-testid': dataTestId, ...otherProps }, ref) => {
|
|
20
20
|
const context = useContext(TagGroupContext);
|
|
21
21
|
const prefix = useTestIdPrefix();
|
|
22
22
|
const idPart = id !== undefined ? slugifyTestId(String(id)) : 'tag';
|
|
@@ -30,7 +30,7 @@ const Tag = ({ id, avatarSrc, avatarContrastBorder = true, dot, dotColor = 'fg-s
|
|
|
30
30
|
return null;
|
|
31
31
|
};
|
|
32
32
|
const leadingContent = renderLeadingContent();
|
|
33
|
-
return (jsx(Tag$1, { ...otherProps, id: id, isDisabled: isDisabled,
|
|
33
|
+
return (jsx(Tag$1, { ...otherProps, ref: ref, id: id, isDisabled: isDisabled,
|
|
34
34
|
// A given `textValue` wins: it is how a tag whose children are not plain text gets its accessible text.
|
|
35
35
|
textValue: textValue ?? (typeof children === 'string' ? children : undefined), "data-testid": tagTestId, className: (state) => cx(styles.root, styles.sizes[context.size].root.base,
|
|
36
36
|
// With avatar
|
|
@@ -50,7 +50,8 @@ const Tag = ({ id, avatarSrc, avatarContrastBorder = true, dot, dotColor = 'fg-s
|
|
|
50
50
|
if (id !== undefined)
|
|
51
51
|
onClose?.(String(id));
|
|
52
52
|
}, "data-testid": closeTestId }))] })) }));
|
|
53
|
-
};
|
|
53
|
+
});
|
|
54
|
+
Tag.displayName = 'Tag';
|
|
54
55
|
|
|
55
56
|
export { Tag };
|
|
56
57
|
//# sourceMappingURL=Tag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sources":["../../../../../src/components/molecules/Tags/Tag/Tag.tsx"],"sourcesContent":[null],"names":["_jsx","AriaTag","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;;AAgDA;;;;;AAKG;
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../../../src/components/molecules/Tags/Tag/Tag.tsx"],"sourcesContent":[null],"names":["_jsx","AriaTag","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;;AAgDA;;;;;AAKG;MACU,GAAG,GAAG,UAAU,CAC3B,CACE,EACE,EAAE,EACF,SAAS,EACT,oBAAoB,GAAG,IAAI,EAC3B,GAAG,EACH,QAAQ,GAAG,sBAAsB,EACjC,YAAY,EACZ,UAAU,EACV,KAAK,EACL,SAAS,EACT,QAAQ,EACR,OAAO,EACP,SAAS,EACT,aAAa,EAAE,UAAU,EACzB,GAAG,UAAU,EACd,EACD,GAAG,KACD;AACF,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,eAAe,CAAC;AAC3C,IAAA,MAAM,MAAM,GAAG,eAAe,EAAE;AAChC,IAAA,MAAM,MAAM,GAAG,EAAE,KAAK,SAAS,GAAG,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC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A,GAAA,CAAC,SAAS,EAAA,EACR,IAAI,EAAE,OAAO,CAAC,IAAI,EAClB,mBAAmB,EAAE,cAAc;;oBAEnC,OAAO,EAAE,MAAK;wBACZ,IAAI,EAAE,KAAK,SAAS;AAAE,4BAAA,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;oBAC7C,CAAC,EAAA,aAAA,EACY,WAAW,EAAA,CACxB,CACH,IACA,CACJ,EAAA,CACO;AAEd,CAAC;AAGH,GAAG,CAAC,WAAW,GAAG,KAAK;;"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
5
|
+
var React = require('react');
|
|
5
6
|
var reactAriaComponents = require('react-aria-components');
|
|
6
7
|
var TagGroup_context = require('../providers/TagGroup.context.cjs');
|
|
7
8
|
|
|
@@ -11,10 +12,11 @@ var TagGroup_context = require('../providers/TagGroup.context.cjs');
|
|
|
11
12
|
*
|
|
12
13
|
* @summary group of tags for filtering, selection or categorisation
|
|
13
14
|
*/
|
|
14
|
-
const TagGroup = ({ label, selectionMode = 'none', size = 'sm', children, 'data-testid': dataTestId, ...otherProps }) => {
|
|
15
|
+
const TagGroup = React.forwardRef(({ label, selectionMode = 'none', size = 'sm', children, 'data-testid': dataTestId, ...otherProps }, ref) => {
|
|
15
16
|
const rootTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'tag-group', rootName: 'tag-group' });
|
|
16
|
-
return (jsxRuntime.jsx(TagGroup_context.TagGroupContext.Provider, { value: { selectionMode, size }, children: jsxRuntime.jsx(testIdUtils.TestIdProvider, { value: rootTestId, children: jsxRuntime.jsx(reactAriaComponents.TagGroup, { "aria-label": label, selectionMode: selectionMode, disallowEmptySelection: selectionMode === 'single', ...otherProps, "data-testid": rootTestId, children: children }) }) }));
|
|
17
|
-
};
|
|
17
|
+
return (jsxRuntime.jsx(TagGroup_context.TagGroupContext.Provider, { value: { selectionMode, size }, children: jsxRuntime.jsx(testIdUtils.TestIdProvider, { value: rootTestId, children: jsxRuntime.jsx(reactAriaComponents.TagGroup, { "aria-label": label, selectionMode: selectionMode, disallowEmptySelection: selectionMode === 'single', ...otherProps, ref: ref, "data-testid": rootTestId, children: children }) }) }));
|
|
18
|
+
});
|
|
19
|
+
TagGroup.displayName = 'TagGroup';
|
|
18
20
|
/** Container for the `Tag` items inside a `TagGroup`; a plain alias of react-aria-components' `TagList`. */
|
|
19
21
|
const TagList = reactAriaComponents.TagList;
|
|
20
22
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagGroup.cjs","sources":["../../../../../src/components/molecules/Tags/TagGroup/TagGroup.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","_jsx","TagGroupContext","TestIdProvider","AriaTagGroup","AriaTagList"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TagGroup.cjs","sources":["../../../../../src/components/molecules/Tags/TagGroup/TagGroup.tsx"],"sourcesContent":[null],"names":["forwardRef","useResolvedTestId","_jsx","TagGroupContext","TestIdProvider","AriaTagGroup","AriaTagList"],"mappings":";;;;;;;;AAqBA;;;;;AAKG;AACI,MAAM,QAAQ,GAAGA,gBAAU,CAChC,CAAC,EAAE,KAAK,EAAE,aAAa,GAAG,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,UAAU,EAAE,EAAE,GAAG,KAAI;AAC1G,IAAA,MAAM,UAAU,GAAGC,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;IAEzG,QACEC,eAACC,gCAAe,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,EAAA,QAAA,EACtDD,eAACE,0BAAc,EAAA,EAAC,KAAK,EAAE,UAAU,EAAA,QAAA,EAC/BF,cAAA,CAACG,4BAAY,EAAA,EAAA,YAAA,EACC,KAAK,EACjB,aAAa,EAAE,aAAa,EAC5B,sBAAsB,EAAE,aAAa,KAAK,QAAQ,EAAA,GAC9C,UAAU,EACd,GAAG,EAAE,GAAG,EAAA,aAAA,EACK,UAAU,EAAA,QAAA,EAEtB,QAAQ,EAAA,CACI,EAAA,CACA,EAAA,CACQ;AAE/B,CAAC;AAGH,QAAQ,CAAC,WAAW,GAAG,UAAU;AAEjC;AACO,MAAM,OAAO,GAAGC;;;"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { RefAttributes } from 'react';
|
|
2
1
|
import { type TagGroupProps as AriaTagGroupProps } from 'react-aria-components';
|
|
3
2
|
import type { TagSize } from '../Tags.styles';
|
|
4
|
-
export interface TagGroupProps extends AriaTagGroupProps
|
|
3
|
+
export interface TagGroupProps extends AriaTagGroupProps {
|
|
5
4
|
/** Accessible name of the group, applied as its `aria-label`. */
|
|
6
5
|
label: string;
|
|
7
6
|
/** Size of every `Tag` in the group, shared through context. */
|
|
@@ -19,7 +18,7 @@ export interface TagGroupProps extends AriaTagGroupProps, RefAttributes<HTMLDivE
|
|
|
19
18
|
*
|
|
20
19
|
* @summary group of tags for filtering, selection or categorisation
|
|
21
20
|
*/
|
|
22
|
-
export declare const TagGroup: (
|
|
21
|
+
export declare const TagGroup: import("react").ForwardRefExoticComponent<TagGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
22
|
/** Container for the `Tag` items inside a `TagGroup`; a plain alias of react-aria-components' `TagList`. */
|
|
24
23
|
export declare const TagList: <T>(props: import("react-aria-components").TagListProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
|
|
25
24
|
//# sourceMappingURL=TagGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Tags/TagGroup/TagGroup.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TagGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Tags/TagGroup/TagGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,EAA4B,KAAK,aAAa,IAAI,iBAAiB,EAA0B,MAAM,uBAAuB,CAAC;AAElI,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,0GAqBpB,CAAC;AAIF,4GAA4G;AAC5G,eAAO,MAAM,OAAO,oLAAc,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useResolvedTestId, TestIdProvider } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
3
|
-
import {
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { TagGroup as TagGroup$1, TagList as TagList$1 } from 'react-aria-components';
|
|
4
5
|
import { TagGroupContext } from '../providers/TagGroup.context.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -9,10 +10,11 @@ import { TagGroupContext } from '../providers/TagGroup.context.js';
|
|
|
9
10
|
*
|
|
10
11
|
* @summary group of tags for filtering, selection or categorisation
|
|
11
12
|
*/
|
|
12
|
-
const TagGroup = ({ label, selectionMode = 'none', size = 'sm', children, 'data-testid': dataTestId, ...otherProps }) => {
|
|
13
|
+
const TagGroup = forwardRef(({ label, selectionMode = 'none', size = 'sm', children, 'data-testid': dataTestId, ...otherProps }, ref) => {
|
|
13
14
|
const rootTestId = useResolvedTestId({ testId: dataTestId, segment: 'tag-group', rootName: 'tag-group' });
|
|
14
|
-
return (jsx(TagGroupContext.Provider, { value: { selectionMode, size }, children: jsx(TestIdProvider, { value: rootTestId, children: jsx(TagGroup$1, { "aria-label": label, selectionMode: selectionMode, disallowEmptySelection: selectionMode === 'single', ...otherProps, "data-testid": rootTestId, children: children }) }) }));
|
|
15
|
-
};
|
|
15
|
+
return (jsx(TagGroupContext.Provider, { value: { selectionMode, size }, children: jsx(TestIdProvider, { value: rootTestId, children: jsx(TagGroup$1, { "aria-label": label, selectionMode: selectionMode, disallowEmptySelection: selectionMode === 'single', ...otherProps, ref: ref, "data-testid": rootTestId, children: children }) }) }));
|
|
16
|
+
});
|
|
17
|
+
TagGroup.displayName = 'TagGroup';
|
|
16
18
|
/** Container for the `Tag` items inside a `TagGroup`; a plain alias of react-aria-components' `TagList`. */
|
|
17
19
|
const TagList = TagList$1;
|
|
18
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagGroup.js","sources":["../../../../../src/components/molecules/Tags/TagGroup/TagGroup.tsx"],"sourcesContent":[null],"names":["_jsx","AriaTagGroup","AriaTagList"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TagGroup.js","sources":["../../../../../src/components/molecules/Tags/TagGroup/TagGroup.tsx"],"sourcesContent":[null],"names":["_jsx","AriaTagGroup","AriaTagList"],"mappings":";;;;;;AAqBA;;;;;AAKG;AACI,MAAM,QAAQ,GAAG,UAAU,CAChC,CAAC,EAAE,KAAK,EAAE,aAAa,GAAG,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,UAAU,EAAE,EAAE,GAAG,KAAI;AAC1G,IAAA,MAAM,UAAU,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;IAEzG,QACEA,IAAC,eAAe,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,EAAA,QAAA,EACtDA,IAAC,cAAc,EAAA,EAAC,KAAK,EAAE,UAAU,EAAA,QAAA,EAC/BA,GAAA,CAACC,UAAY,EAAA,EAAA,YAAA,EACC,KAAK,EACjB,aAAa,EAAE,aAAa,EAC5B,sBAAsB,EAAE,aAAa,KAAK,QAAQ,EAAA,GAC9C,UAAU,EACd,GAAG,EAAE,GAAG,EAAA,aAAA,EACK,UAAU,EAAA,QAAA,EAEtB,QAAQ,EAAA,CACI,EAAA,CACA,EAAA,CACQ;AAE/B,CAAC;AAGH,QAAQ,CAAC,WAAW,GAAG,UAAU;AAEjC;AACO,MAAM,OAAO,GAAGC;;"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { TextAreaBase as TextAreaBaseNext, type TextAreaProps as TextAreaPropsNext } from '@flipdish/ui-library/components/atoms/Inputs';
|
|
2
2
|
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Inputs`. Removed in the next major. */
|
|
3
|
-
export declare const TextArea:
|
|
4
|
-
({ label, hint, tooltip, textAreaRef, hideRequiredIndicator, textAreaClassName, placeholder, className, rows, cols, size, "data-testid": dataTestId, ...props }: TextAreaPropsNext): import("react").JSX.Element;
|
|
5
|
-
displayName: string;
|
|
6
|
-
};
|
|
3
|
+
export declare const TextArea: import("react").ForwardRefExoticComponent<TextAreaPropsNext & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
4
|
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Inputs`. Removed in the next major. */
|
|
8
5
|
export declare const TextAreaBase: typeof TextAreaBaseNext;
|
|
9
6
|
/** @deprecated Use `TextAreaProps` from `@flipdish/ui-library/components/atoms/Inputs`. Removed in the next major. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/TextArea/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,YAAY,IAAI,gBAAgB,EAEhC,KAAK,aAAa,IAAI,iBAAiB,EACxC,MAAM,8CAA8C,CAAC;AAEtD,yGAAyG;AACzG,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/TextArea/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,YAAY,IAAI,gBAAgB,EAEhC,KAAK,aAAa,IAAI,iBAAiB,EACxC,MAAM,8CAA8C,CAAC;AAEtD,yGAAyG;AACzG,eAAO,MAAM,QAAQ,8GAAe,CAAC;AACrC,yGAAyG;AACzG,eAAO,MAAM,YAAY,EAAE,OAAO,gBAAmC,CAAC;AACtE,sHAAsH;AACtH,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAAC"}
|
|
@@ -4,7 +4,9 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
4
4
|
var Dot = require('@flipdish/ui-library/components/atoms/Dot');
|
|
5
5
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
6
6
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
7
|
+
var utils = require('@react-aria/utils');
|
|
7
8
|
var React = require('react');
|
|
9
|
+
var ref_utils = require('../../../utilities/__internal__/refUtils/ref.utils.cjs');
|
|
8
10
|
var useCarouselScroll = require('./hooks/useCarouselScroll.cjs');
|
|
9
11
|
|
|
10
12
|
const CarouselContext = React.createContext(null);
|
|
@@ -21,7 +23,7 @@ const useCarousel = () => {
|
|
|
21
23
|
}
|
|
22
24
|
return context;
|
|
23
25
|
};
|
|
24
|
-
const CarouselRoot = ({ orientation = 'horizontal', opts, setApi, plugins, className, children, 'data-testid': dataTestId, ...props }) => {
|
|
26
|
+
const CarouselRoot = React.forwardRef(({ orientation = 'horizontal', opts, setApi, plugins, className, children, 'data-testid': dataTestId, ...props }, ref) => {
|
|
25
27
|
const rootTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'carousel', rootName: 'carousel' });
|
|
26
28
|
const { carouselRef, api, scrollPrev, scrollNext, canScrollPrev, canScrollNext, selectedIndex, scrollSnaps, onKeyDownCapture } = useCarouselScroll.useCarouselScroll({
|
|
27
29
|
orientation,
|
|
@@ -42,24 +44,30 @@ const CarouselRoot = ({ orientation = 'horizontal', opts, setApi, plugins, class
|
|
|
42
44
|
canScrollNext,
|
|
43
45
|
selectedIndex,
|
|
44
46
|
scrollSnaps,
|
|
45
|
-
}, children: jsxRuntime.jsx("div", { onKeyDownCapture: onKeyDownCapture, className: cx.cx('relative', className), role: isNamed ? 'region' : 'group', "aria-roledescription": "carousel", ...props, "data-testid": rootTestId, children: children }) }) }));
|
|
46
|
-
};
|
|
47
|
-
|
|
47
|
+
}, children: jsxRuntime.jsx("div", { onKeyDownCapture: onKeyDownCapture, className: cx.cx('relative', className), role: isNamed ? 'region' : 'group', "aria-roledescription": "carousel", ...props, ref: ref, "data-testid": rootTestId, children: children }) }) }));
|
|
48
|
+
});
|
|
49
|
+
CarouselRoot.displayName = 'Carousel.Root';
|
|
50
|
+
const CarouselContent = React.forwardRef(({ className, overflowHidden = true, ...props }, ref) => {
|
|
48
51
|
const { carouselRef, orientation } = useCarousel();
|
|
49
|
-
return (jsxRuntime.jsx("div", { ref: carouselRef, className: cx.cx('h-full w-full', overflowHidden && 'overflow-hidden'), children: jsxRuntime.jsx("div", { className: cx.cx('flex max-h-full', orientation === 'horizontal' ? '' : 'flex-col', className), ...props }) }));
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
+
return (jsxRuntime.jsx("div", { ref: carouselRef, className: cx.cx('h-full w-full', overflowHidden && 'overflow-hidden'), children: jsxRuntime.jsx("div", { className: cx.cx('flex max-h-full', orientation === 'horizontal' ? '' : 'flex-col', className), ...props, ref: ref }) }));
|
|
53
|
+
});
|
|
54
|
+
CarouselContent.displayName = 'Carousel.Content';
|
|
55
|
+
const CarouselItem = React.forwardRef(({ className, index, 'data-testid': dataTestId, ...props }, ref) => {
|
|
52
56
|
const prefix = testIdUtils.useTestIdPrefix();
|
|
53
57
|
const itemTestId = dataTestId ?? (prefix && index !== undefined ? testIdUtils.joinTestId(prefix, `item-${index}`) : undefined);
|
|
54
58
|
return (
|
|
55
59
|
// biome-ignore lint/a11y/useSemanticElements: This is a custom component and we need to use a div to wrap the children
|
|
56
|
-
jsxRuntime.jsx("div", { role: "group", "aria-roledescription": "slide", className: cx.cx('min-w-0 shrink-0 grow-0 basis-full', className), ...props, "data-testid": itemTestId }));
|
|
57
|
-
};
|
|
58
|
-
|
|
60
|
+
jsxRuntime.jsx("div", { role: "group", "aria-roledescription": "slide", className: cx.cx('min-w-0 shrink-0 grow-0 basis-full', className), ...props, ref: ref, "data-testid": itemTestId }));
|
|
61
|
+
});
|
|
62
|
+
CarouselItem.displayName = 'Carousel.Item';
|
|
63
|
+
const Trigger = React.forwardRef(({ className, children, asChild, direction, style, 'data-testid': dataTestId, ...props }, ref) => {
|
|
59
64
|
const { scrollPrev, canScrollNext, scrollNext, canScrollPrev } = useCarousel();
|
|
60
65
|
const prefix = testIdUtils.useTestIdPrefix();
|
|
61
66
|
const triggerTestId = dataTestId ?? (prefix ? testIdUtils.joinTestId(prefix, direction) : undefined);
|
|
62
67
|
const isDisabled = direction === 'prev' ? !canScrollPrev : !canScrollNext;
|
|
68
|
+
// A child given through `asChild` keeps its own ref beside the consumer's; cloning would otherwise keep only its own.
|
|
69
|
+
const childRef = asChild && React.isValidElement(children) ? ref_utils.elementRef(children) : undefined;
|
|
70
|
+
const asChildRef = React.useMemo(() => utils.mergeRefs(childRef, ref), [childRef, ref]);
|
|
63
71
|
const handleClick = () => {
|
|
64
72
|
if (isDisabled)
|
|
65
73
|
return;
|
|
@@ -75,6 +83,7 @@ const Trigger = ({ className, children, asChild, direction, style, 'data-testid'
|
|
|
75
83
|
if (asChild && React.isValidElement(children)) {
|
|
76
84
|
const childProps = children.props;
|
|
77
85
|
return React.cloneElement(children, {
|
|
86
|
+
ref: asChildRef,
|
|
78
87
|
onClick: handleClick,
|
|
79
88
|
disabled: isDisabled,
|
|
80
89
|
'aria-label': childProps['aria-label'] ?? defaultAriaLabel,
|
|
@@ -83,10 +92,13 @@ const Trigger = ({ className, children, asChild, direction, style, 'data-testid'
|
|
|
83
92
|
className: [computedClassName, childProps.className].filter(Boolean).join(' ') || undefined,
|
|
84
93
|
});
|
|
85
94
|
}
|
|
86
|
-
return (jsxRuntime.jsx("button", { type: "button", "aria-label": defaultAriaLabel, disabled: isDisabled, className: computedClassName, style: style, onClick: handleClick, ...props, "data-testid": triggerTestId, children: children }));
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
const
|
|
95
|
+
return (jsxRuntime.jsx("button", { type: "button", "aria-label": defaultAriaLabel, disabled: isDisabled, className: computedClassName, style: style, onClick: handleClick, ...props, ref: ref, "data-testid": triggerTestId, children: children }));
|
|
96
|
+
});
|
|
97
|
+
Trigger.displayName = 'CarouselTrigger';
|
|
98
|
+
const CarouselPrevTrigger = React.forwardRef((props, ref) => (jsxRuntime.jsx(Trigger, { ...props, ref: ref, direction: "prev" })));
|
|
99
|
+
CarouselPrevTrigger.displayName = 'Carousel.PrevTrigger';
|
|
100
|
+
const CarouselNextTrigger = React.forwardRef((props, ref) => (jsxRuntime.jsx(Trigger, { ...props, ref: ref, direction: "next" })));
|
|
101
|
+
CarouselNextTrigger.displayName = 'Carousel.NextTrigger';
|
|
90
102
|
const CarouselIndicator = ({ index, isSelected = false, children, asChild, className, style, 'data-testid': dataTestId }) => {
|
|
91
103
|
const { api, selectedIndex } = useCarousel();
|
|
92
104
|
const prefix = testIdUtils.useTestIdPrefix();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/organisms/Carousel/index.tsx"],"sourcesContent":[null],"names":["createContext","useContext","useResolvedTestId","useCarouselScroll","_jsx","TestIdProvider","cx","useTestIdPrefix","joinTestId","isValidElement","cloneElement","Dot"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/organisms/Carousel/index.tsx"],"sourcesContent":[null],"names":["createContext","useContext","forwardRef","useResolvedTestId","useCarouselScroll","_jsx","TestIdProvider","cx","useTestIdPrefix","joinTestId","isValidElement","elementRef","useMemo","mergeRefs","cloneElement","Dot"],"mappings":";;;;;;;;;;;AA2CA,MAAM,eAAe,GAAGA,mBAAa,CAA8B,IAAI,CAAC;AAExE;;;;;AAKG;AACI,MAAM,WAAW,GAAG,MAAK;AAC9B,IAAA,MAAM,OAAO,GAAGC,gBAAU,CAAC,eAAe,CAAC;IAE3C,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC;IAC9E;AAEA,IAAA,OAAO,OAAO;AAChB;AAEA,MAAM,YAAY,GAAGC,gBAAU,CAC7B,CAAC,EAAE,WAAW,GAAG,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;AACvH,IAAA,MAAM,UAAU,GAAGC,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvG,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAC5HC,mCAAiB,CAAC;QAChB,WAAW;QACX,IAAI;QACJ,OAAO;QACP,MAAM;AACP,KAAA,CAAC;;AAEJ,IAAA,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;AAExE,IAAA,QACEC,cAAA,CAACC,0BAAc,EAAA,EAAC,KAAK,EAAE,UAAU,EAAA,QAAA,EAC/BD,cAAA,CAAC,eAAe,CAAC,QAAQ,EAAA,EACvB,KAAK,EAAE;gBACL,WAAW;AACX,gBAAA,GAAG,EAAE,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;;AAUG;AACI,MAAM,QAAQ,GAAG;AACtB,IAAA,IAAI,EAAE,YAAY;AAClB,IAAA,OAAO,EAAE,eAAe;AACxB,IAAA,IAAI,EAAE,YAAY;AAClB,IAAA,WAAW,EAAE,mBAAmB;AAChC,IAAA,WAAW,EAAE,mBAAmB;AAChC,IAAA,cAAc,EAAE,sBAAsB;AACtC,IAAA,SAAS,EAAE,iBAAiB;AAC5B,IAAA,YAAY,EAAE,oBAAoB;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentPropsWithoutRef, CSSProperties, HTMLAttributes, ReactNode, RefAttributes } from 'react';
|
|
2
2
|
import { type CarouselApi, type CarouselOptions, type CarouselPlugin, useCarouselScroll } from './hooks/useCarouselScroll';
|
|
3
3
|
type CarouselProps = {
|
|
4
4
|
/** The options for the Embla carousel. `orientation` owns the scroll axis, so an `axis` here or inside `breakpoints` is ignored. */
|
|
@@ -37,13 +37,13 @@ type CarouselContextProps = CarouselProps & {
|
|
|
37
37
|
* @returns The carousel's options and Embla API, the previous and next actions with whether each can scroll, the selected snap index and every snap position.
|
|
38
38
|
*/
|
|
39
39
|
export declare const useCarousel: () => CarouselContextProps;
|
|
40
|
-
interface CarouselContentProps extends
|
|
40
|
+
interface CarouselContentProps extends ComponentPropsWithoutRef<'div'> {
|
|
41
41
|
/** The class name of the content. */
|
|
42
42
|
className?: string;
|
|
43
43
|
/** Whether to hide the overflow. */
|
|
44
44
|
overflowHidden?: boolean;
|
|
45
45
|
}
|
|
46
|
-
interface CarouselItemProps extends
|
|
46
|
+
interface CarouselItemProps extends ComponentPropsWithoutRef<'div'> {
|
|
47
47
|
/** 0-based position of this slide, used to derive its `data-testid` (`<root>--item-<index>`). */
|
|
48
48
|
index?: number;
|
|
49
49
|
/** Overrides the derived `data-testid` for this item. */
|
|
@@ -56,8 +56,6 @@ interface TriggerRenderProps {
|
|
|
56
56
|
'data-testid'?: string;
|
|
57
57
|
}
|
|
58
58
|
interface TriggerProps {
|
|
59
|
-
/** The ref of the trigger. */
|
|
60
|
-
ref?: Ref<HTMLButtonElement>;
|
|
61
59
|
/** If true, the child element will be cloned and passed down the prop of the trigger. */
|
|
62
60
|
asChild?: boolean;
|
|
63
61
|
/** The direction of the trigger. */
|
|
@@ -120,11 +118,11 @@ fully custom carousel layouts.
|
|
|
120
118
|
* @summary slides with navigation controls and indicators
|
|
121
119
|
*/
|
|
122
120
|
export declare const Carousel: {
|
|
123
|
-
Root: (
|
|
124
|
-
Content:
|
|
125
|
-
Item:
|
|
126
|
-
PrevTrigger: (
|
|
127
|
-
NextTrigger: (
|
|
121
|
+
Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & CarouselProps & RefAttributes<HTMLDivElement>>;
|
|
122
|
+
Content: import("react").ForwardRefExoticComponent<CarouselContentProps & RefAttributes<HTMLDivElement>>;
|
|
123
|
+
Item: import("react").ForwardRefExoticComponent<CarouselItemProps & RefAttributes<HTMLDivElement>>;
|
|
124
|
+
PrevTrigger: import("react").ForwardRefExoticComponent<Omit<TriggerProps, "direction"> & RefAttributes<HTMLButtonElement>>;
|
|
125
|
+
NextTrigger: import("react").ForwardRefExoticComponent<Omit<TriggerProps, "direction"> & RefAttributes<HTMLButtonElement>>;
|
|
128
126
|
IndicatorGroup: ({ children, ...props }: CarouselIndicatorGroupProps) => import("react").JSX.Element;
|
|
129
127
|
Indicator: ({ index, isSelected, children, asChild, className, style, "data-testid": dataTestId }: CarouselIndicatorProps) => import("react").JSX.Element;
|
|
130
128
|
IndicatorBar: ({ framed, className }: CarouselIndicatorBarProps) => import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Carousel/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/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