@flipdish/ui-library 0.59.0 → 0.60.1
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 +3 -3
- package/dist/components/atoms/AppStoreButton/index.d.ts.map +1 -1
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButton.cjs +1 -1
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButton.js +1 -1
- package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreBadgeLink.cjs.map +1 -0
- package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreBadgeLink.d.ts.map +1 -0
- package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreBadgeLink.js.map +1 -0
- package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreButtonsOutline.cjs → components/AppStoreButtonsOutline.cjs} +1 -1
- package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreButtonsOutline.cjs.map +1 -0
- package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreButtonsOutline.d.ts.map +1 -0
- package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreButtonsOutline.js → components/AppStoreButtonsOutline.js} +1 -1
- package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreButtonsOutline.js.map +1 -0
- package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.cjs +1 -1
- package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.js +1 -1
- package/dist/components/atoms/BrandButtons/SocialButton/components/SocialLogos.cjs.map +1 -0
- package/dist/components/atoms/BrandButtons/SocialButton/components/SocialLogos.d.ts.map +1 -0
- package/dist/components/atoms/BrandButtons/SocialButton/components/SocialLogos.js.map +1 -0
- package/dist/components/atoms/BrandButtons/index.cjs +1 -1
- package/dist/components/atoms/BrandButtons/index.d.ts +1 -1
- package/dist/components/atoms/BrandButtons/index.d.ts.map +1 -1
- package/dist/components/atoms/BrandButtons/index.js +1 -1
- package/dist/components/atoms/Button/index.cjs +6 -163
- package/dist/components/atoms/Button/index.cjs.map +1 -1
- package/dist/components/atoms/Button/index.d.ts +14 -117
- package/dist/components/atoms/Button/index.d.ts.map +1 -1
- package/dist/components/atoms/Button/index.js +6 -163
- package/dist/components/atoms/Button/index.js.map +1 -1
- package/dist/components/atoms/Buttons/Button/Button.cjs +168 -0
- package/dist/components/atoms/Buttons/Button/Button.cjs.map +1 -0
- package/dist/components/atoms/Buttons/Button/Button.d.ts +116 -0
- package/dist/components/atoms/Buttons/Button/Button.d.ts.map +1 -0
- package/dist/components/atoms/Buttons/Button/Button.js +165 -0
- package/dist/components/atoms/Buttons/Button/Button.js.map +1 -0
- package/dist/{native/components/atoms → components/atoms/Buttons}/Button/Button.styles.d.ts +1 -1
- package/dist/components/atoms/Buttons/Button/Button.styles.d.ts.map +1 -0
- package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonIcon.cjs +1 -1
- package/dist/components/atoms/Buttons/Button/components/ButtonIcon.cjs.map +1 -0
- package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonIcon.d.ts +1 -1
- package/dist/components/atoms/Buttons/Button/components/ButtonIcon.d.ts.map +1 -0
- package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonIcon.js +1 -1
- package/dist/components/atoms/Buttons/Button/components/ButtonIcon.js.map +1 -0
- package/dist/components/atoms/Buttons/Button/components/ButtonSpinner.cjs.map +1 -0
- package/dist/components/atoms/Buttons/Button/components/ButtonSpinner.d.ts.map +1 -0
- package/dist/components/atoms/Buttons/Button/components/ButtonSpinner.js.map +1 -0
- package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.cjs +61 -0
- package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.cjs.map +1 -0
- package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.d.ts +27 -0
- package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.d.ts.map +1 -0
- package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.js +59 -0
- package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.js.map +1 -0
- package/dist/components/atoms/Buttons/CloseButton/CloseButton.cjs +31 -0
- package/dist/components/atoms/Buttons/CloseButton/CloseButton.cjs.map +1 -0
- package/dist/components/atoms/Buttons/CloseButton/CloseButton.d.ts +19 -0
- package/dist/components/atoms/Buttons/CloseButton/CloseButton.d.ts.map +1 -0
- package/dist/components/atoms/Buttons/CloseButton/CloseButton.js +29 -0
- package/dist/components/atoms/Buttons/CloseButton/CloseButton.js.map +1 -0
- package/dist/components/atoms/Buttons/CopyButton/CopyButton.cjs +27 -0
- package/dist/components/atoms/Buttons/CopyButton/CopyButton.cjs.map +1 -0
- package/dist/components/atoms/Buttons/CopyButton/CopyButton.d.ts +28 -0
- package/dist/components/atoms/Buttons/CopyButton/CopyButton.d.ts.map +1 -0
- package/dist/components/atoms/Buttons/CopyButton/CopyButton.js +25 -0
- package/dist/components/atoms/Buttons/CopyButton/CopyButton.js.map +1 -0
- package/dist/components/atoms/Buttons/IconButton/IconButton.cjs +59 -0
- package/dist/components/atoms/Buttons/IconButton/IconButton.cjs.map +1 -0
- package/dist/components/atoms/Buttons/IconButton/IconButton.d.ts +65 -0
- package/dist/components/atoms/Buttons/IconButton/IconButton.d.ts.map +1 -0
- package/dist/components/atoms/Buttons/IconButton/IconButton.js +56 -0
- package/dist/components/atoms/Buttons/IconButton/IconButton.js.map +1 -0
- package/dist/components/atoms/Buttons/index.cjs +14 -0
- package/dist/components/atoms/Buttons/index.cjs.map +1 -0
- package/dist/components/atoms/Buttons/index.d.ts +18 -0
- package/dist/components/atoms/Buttons/index.d.ts.map +1 -0
- package/dist/components/atoms/Buttons/index.js +5 -0
- package/dist/components/atoms/Buttons/index.js.map +1 -0
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.js +1 -1
- package/dist/components/atoms/Checkboxes/Checkbox/components/CheckboxBase.cjs.map +1 -0
- package/dist/components/atoms/Checkboxes/Checkbox/components/CheckboxBase.d.ts.map +1 -0
- package/dist/components/atoms/Checkboxes/Checkbox/components/CheckboxBase.js.map +1 -0
- package/dist/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.cjs +2 -2
- package/dist/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.cjs.map +1 -1
- package/dist/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.js +1 -1
- package/dist/components/atoms/Checkboxes/index.cjs +1 -1
- package/dist/components/atoms/Checkboxes/index.d.ts +2 -2
- package/dist/components/atoms/Checkboxes/index.d.ts.map +1 -1
- package/dist/components/atoms/Checkboxes/index.js +1 -1
- package/dist/components/atoms/CloseButton/index.cjs +3 -26
- package/dist/components/atoms/CloseButton/index.cjs.map +1 -1
- package/dist/components/atoms/CloseButton/index.d.ts +5 -18
- package/dist/components/atoms/CloseButton/index.d.ts.map +1 -1
- package/dist/components/atoms/CloseButton/index.js +3 -26
- package/dist/components/atoms/CloseButton/index.js.map +1 -1
- package/dist/components/atoms/CopyButton/index.cjs +3 -21
- package/dist/components/atoms/CopyButton/index.cjs.map +1 -1
- package/dist/components/atoms/CopyButton/index.d.ts +5 -27
- package/dist/components/atoms/CopyButton/index.d.ts.map +1 -1
- package/dist/components/atoms/CopyButton/index.js +3 -21
- package/dist/components/atoms/CopyButton/index.js.map +1 -1
- package/dist/components/atoms/Input/index.cjs +13 -84
- package/dist/components/atoms/Input/index.cjs.map +1 -1
- package/dist/components/atoms/Input/index.d.ts +20 -70
- package/dist/components/atoms/Input/index.d.ts.map +1 -1
- package/dist/components/atoms/Input/index.js +11 -82
- package/dist/components/atoms/Input/index.js.map +1 -1
- package/dist/components/atoms/Inputs/Input/Input.cjs +89 -0
- package/dist/components/atoms/Inputs/Input/Input.cjs.map +1 -0
- package/dist/components/atoms/Inputs/Input/Input.d.ts +74 -0
- package/dist/components/atoms/Inputs/Input/Input.d.ts.map +1 -0
- package/dist/components/atoms/Inputs/Input/Input.js +85 -0
- package/dist/components/atoms/Inputs/Input/Input.js.map +1 -0
- package/dist/components/atoms/Inputs/SearchInput/SearchInput.cjs +60 -0
- package/dist/components/atoms/Inputs/SearchInput/SearchInput.cjs.map +1 -0
- package/dist/components/atoms/Inputs/SearchInput/SearchInput.d.ts +47 -0
- package/dist/components/atoms/Inputs/SearchInput/SearchInput.d.ts.map +1 -0
- package/dist/components/atoms/Inputs/SearchInput/SearchInput.js +58 -0
- package/dist/components/atoms/Inputs/SearchInput/SearchInput.js.map +1 -0
- package/dist/components/atoms/Inputs/TextArea/TextArea.cjs +41 -0
- package/dist/components/atoms/Inputs/TextArea/TextArea.cjs.map +1 -0
- package/dist/components/atoms/Inputs/TextArea/TextArea.d.ts +51 -0
- package/dist/components/atoms/Inputs/TextArea/TextArea.d.ts.map +1 -0
- package/dist/components/atoms/Inputs/TextArea/TextArea.js +38 -0
- package/dist/components/atoms/Inputs/TextArea/TextArea.js.map +1 -0
- package/dist/components/atoms/Inputs/components/HintText.cjs.map +1 -0
- package/dist/components/atoms/Inputs/components/HintText.d.ts.map +1 -0
- package/dist/components/atoms/Inputs/components/HintText.js.map +1 -0
- package/dist/components/atoms/Inputs/components/Label.cjs.map +1 -0
- package/dist/components/atoms/Inputs/components/Label.d.ts.map +1 -0
- package/dist/components/atoms/Inputs/components/Label.js.map +1 -0
- package/dist/components/atoms/Inputs/index.cjs +19 -0
- package/dist/components/atoms/Inputs/index.cjs.map +1 -0
- package/dist/components/atoms/Inputs/index.d.ts +19 -0
- package/dist/components/atoms/Inputs/index.d.ts.map +1 -0
- package/dist/components/atoms/Inputs/index.js +6 -0
- package/dist/components/atoms/Inputs/index.js.map +1 -0
- package/dist/components/atoms/Radios/RadioButton/RadioButton.cjs +1 -1
- package/dist/components/atoms/Radios/RadioButton/RadioButton.js +1 -1
- package/dist/components/atoms/Radios/RadioButton/components/RadioButtonBase.cjs.map +1 -0
- package/dist/components/atoms/Radios/RadioButton/components/RadioButtonBase.d.ts.map +1 -0
- package/dist/components/atoms/Radios/RadioButton/components/RadioButtonBase.js.map +1 -0
- package/dist/components/atoms/Radios/index.cjs +2 -2
- package/dist/components/atoms/Radios/index.d.ts +2 -2
- package/dist/components/atoms/Radios/index.d.ts.map +1 -1
- package/dist/components/atoms/Radios/index.js +1 -1
- package/dist/components/atoms/SearchInput/index.cjs +3 -52
- package/dist/components/atoms/SearchInput/index.cjs.map +1 -1
- package/dist/components/atoms/SearchInput/index.d.ts +5 -43
- package/dist/components/atoms/SearchInput/index.d.ts.map +1 -1
- package/dist/components/atoms/SearchInput/index.js +3 -52
- package/dist/components/atoms/SearchInput/index.js.map +1 -1
- package/dist/components/atoms/Slider/index.cjs +3 -3
- package/dist/components/atoms/Slider/index.cjs.map +1 -1
- package/dist/components/atoms/Slider/index.js +1 -1
- package/dist/components/atoms/UtilityButton/index.cjs +6 -51
- package/dist/components/atoms/UtilityButton/index.cjs.map +1 -1
- package/dist/components/atoms/UtilityButton/index.d.ts +12 -54
- package/dist/components/atoms/UtilityButton/index.d.ts.map +1 -1
- package/dist/components/atoms/UtilityButton/index.js +6 -51
- package/dist/components/atoms/UtilityButton/index.js.map +1 -1
- package/dist/components/atoms/VerificationCodeInput/index.cjs +96 -0
- package/dist/components/atoms/VerificationCodeInput/index.cjs.map +1 -0
- package/dist/components/atoms/VerificationCodeInput/index.d.ts +70 -0
- package/dist/components/atoms/VerificationCodeInput/index.d.ts.map +1 -0
- package/dist/components/atoms/VerificationCodeInput/index.js +93 -0
- package/dist/components/atoms/VerificationCodeInput/index.js.map +1 -0
- package/dist/components/forms/FormFooter/index.cjs +2 -2
- package/dist/components/forms/FormFooter/index.cjs.map +1 -1
- package/dist/components/forms/FormFooter/index.js +1 -1
- package/dist/components/forms/fields/FormInput/index.cjs +2 -2
- package/dist/components/forms/fields/FormInput/index.d.ts +1 -1
- package/dist/components/forms/fields/FormInput/index.d.ts.map +1 -1
- package/dist/components/forms/fields/FormInput/index.js +1 -1
- package/dist/components/forms/fields/FormRadioCardGroup/index.cjs +2 -2
- package/dist/components/forms/fields/FormRadioCardGroup/index.cjs.map +1 -1
- package/dist/components/forms/fields/FormRadioCardGroup/index.js +1 -1
- package/dist/components/forms/fields/FormRadioGroup/index.cjs +2 -2
- package/dist/components/forms/fields/FormRadioGroup/index.cjs.map +1 -1
- package/dist/components/forms/fields/FormRadioGroup/index.js +1 -1
- package/dist/components/forms/fields/FormSlider/index.cjs +2 -2
- package/dist/components/forms/fields/FormSlider/index.cjs.map +1 -1
- package/dist/components/forms/fields/FormSlider/index.js +1 -1
- package/dist/components/forms/fields/FormTextArea/index.cjs +2 -2
- package/dist/components/forms/fields/FormTextArea/index.d.ts +2 -2
- package/dist/components/forms/fields/FormTextArea/index.d.ts.map +1 -1
- package/dist/components/forms/fields/FormTextArea/index.js +1 -1
- package/dist/components/molecules/ActivityFeed/index.cjs +2 -2
- package/dist/components/molecules/ActivityFeed/index.js +1 -1
- package/dist/components/molecules/Alerts/Alert/Alert.cjs +3 -4
- package/dist/components/molecules/Alerts/Alert/Alert.cjs.map +1 -1
- package/dist/components/molecules/Alerts/Alert/Alert.d.ts.map +1 -1
- package/dist/components/molecules/Alerts/Alert/Alert.js +1 -2
- package/dist/components/molecules/Alerts/Alert/Alert.js.map +1 -1
- package/dist/components/molecules/Dropdown/index.cjs +2 -2
- package/dist/components/molecules/Dropdown/index.cjs.map +1 -1
- package/dist/components/molecules/Dropdown/index.d.ts +1 -1
- package/dist/components/molecules/Dropdown/index.d.ts.map +1 -1
- package/dist/components/molecules/Dropdown/index.js +1 -1
- package/dist/components/molecules/EmptyState/index.cjs +2 -2
- package/dist/components/molecules/EmptyState/index.cjs.map +1 -1
- package/dist/components/molecules/EmptyState/index.js +1 -1
- package/dist/components/molecules/Modals/ConfirmationModal/ConfirmationModal.cjs +2 -2
- package/dist/components/molecules/Modals/ConfirmationModal/ConfirmationModal.cjs.map +1 -1
- package/dist/components/molecules/Modals/ConfirmationModal/ConfirmationModal.js +1 -1
- package/dist/components/molecules/Modals/UnsavedChangesModal/UnsavedChangesModal.cjs +2 -2
- package/dist/components/molecules/Modals/UnsavedChangesModal/UnsavedChangesModal.cjs.map +1 -1
- package/dist/components/molecules/Modals/UnsavedChangesModal/UnsavedChangesModal.js +1 -1
- package/dist/components/molecules/Notifications/AvatarNotification/AvatarNotification.cjs +2 -3
- package/dist/components/molecules/Notifications/AvatarNotification/AvatarNotification.cjs.map +1 -1
- package/dist/components/molecules/Notifications/AvatarNotification/AvatarNotification.d.ts.map +1 -1
- package/dist/components/molecules/Notifications/AvatarNotification/AvatarNotification.js +1 -2
- package/dist/components/molecules/Notifications/AvatarNotification/AvatarNotification.js.map +1 -1
- package/dist/components/molecules/Notifications/IconNotification/IconNotification.cjs +2 -3
- package/dist/components/molecules/Notifications/IconNotification/IconNotification.cjs.map +1 -1
- package/dist/components/molecules/Notifications/IconNotification/IconNotification.d.ts.map +1 -1
- package/dist/components/molecules/Notifications/IconNotification/IconNotification.js +1 -2
- package/dist/components/molecules/Notifications/IconNotification/IconNotification.js.map +1 -1
- package/dist/components/molecules/Notifications/ImageNotification/ImageNotification.cjs +2 -3
- package/dist/components/molecules/Notifications/ImageNotification/ImageNotification.cjs.map +1 -1
- package/dist/components/molecules/Notifications/ImageNotification/ImageNotification.d.ts.map +1 -1
- package/dist/components/molecules/Notifications/ImageNotification/ImageNotification.js +1 -2
- package/dist/components/molecules/Notifications/ImageNotification/ImageNotification.js.map +1 -1
- package/dist/components/molecules/Paginations/Pagination/Pagination.cjs +4 -4
- package/dist/components/molecules/Paginations/Pagination/Pagination.cjs.map +1 -1
- package/dist/components/molecules/Paginations/Pagination/Pagination.js +2 -2
- package/dist/components/molecules/RadioCards/RadioCardPayment/RadioCardPayment.cjs +2 -2
- package/dist/components/molecules/RadioCards/RadioCardPayment/RadioCardPayment.cjs.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardPayment/RadioCardPayment.js +1 -1
- package/dist/components/molecules/Select/index.d.ts +1 -1
- package/dist/components/molecules/Selects/MultiSelect/MultiSelect.cjs +6 -6
- package/dist/components/molecules/Selects/MultiSelect/MultiSelect.cjs.map +1 -1
- package/dist/components/molecules/Selects/MultiSelect/MultiSelect.js +2 -2
- package/dist/components/molecules/Selects/Select/Select.cjs +4 -4
- package/dist/components/molecules/Selects/Select/Select.cjs.map +1 -1
- package/dist/components/molecules/Selects/Select/Select.d.ts +1 -1
- package/dist/components/molecules/Selects/Select/Select.d.ts.map +1 -1
- package/dist/components/molecules/Selects/Select/Select.js +3 -3
- package/dist/components/molecules/Selects/Select/{Combobox.cjs → components/Combobox.cjs} +8 -8
- package/dist/components/molecules/Selects/Select/components/Combobox.cjs.map +1 -0
- package/dist/components/molecules/Selects/Select/{Combobox.d.ts → components/Combobox.d.ts} +1 -1
- package/dist/components/molecules/Selects/Select/components/Combobox.d.ts.map +1 -0
- package/dist/components/molecules/Selects/Select/{Combobox.js → components/Combobox.js} +6 -6
- package/dist/components/molecules/Selects/Select/components/Combobox.js.map +1 -0
- package/dist/components/molecules/Selects/Select/{Popover.cjs → components/Popover.cjs} +1 -1
- package/dist/components/molecules/Selects/Select/components/Popover.cjs.map +1 -0
- package/dist/components/molecules/Selects/Select/components/Popover.d.ts.map +1 -0
- package/dist/components/molecules/Selects/Select/{Popover.js → components/Popover.js} +1 -1
- package/dist/components/molecules/Selects/Select/components/Popover.js.map +1 -0
- package/dist/components/molecules/Tags/Tag/Tag.cjs +3 -3
- package/dist/components/molecules/Tags/Tag/Tag.js +3 -3
- package/dist/components/molecules/Tags/Tag/{TagAvatar.cjs → components/TagAvatar.cjs} +1 -1
- package/dist/components/molecules/Tags/Tag/components/TagAvatar.cjs.map +1 -0
- package/dist/components/molecules/Tags/Tag/components/TagAvatar.d.ts.map +1 -0
- package/dist/components/molecules/Tags/Tag/{TagAvatar.js → components/TagAvatar.js} +1 -1
- package/dist/components/molecules/Tags/Tag/components/TagAvatar.js.map +1 -0
- package/dist/components/molecules/Tags/Tag/{TagCheckbox.cjs → components/TagCheckbox.cjs} +1 -1
- package/dist/components/molecules/Tags/Tag/components/TagCheckbox.cjs.map +1 -0
- package/dist/components/molecules/Tags/Tag/{TagCheckbox.d.ts → components/TagCheckbox.d.ts} +1 -1
- package/dist/components/molecules/Tags/Tag/components/TagCheckbox.d.ts.map +1 -0
- package/dist/components/molecules/Tags/Tag/{TagCheckbox.js → components/TagCheckbox.js} +1 -1
- package/dist/components/molecules/Tags/Tag/components/TagCheckbox.js.map +1 -0
- package/dist/components/molecules/Tags/Tag/{TagCloseX.cjs → components/TagCloseX.cjs} +1 -1
- package/dist/components/molecules/Tags/Tag/components/TagCloseX.cjs.map +1 -0
- package/dist/components/molecules/Tags/Tag/{TagCloseX.d.ts → components/TagCloseX.d.ts} +1 -1
- package/dist/components/molecules/Tags/Tag/components/TagCloseX.d.ts.map +1 -0
- package/dist/components/molecules/Tags/Tag/{TagCloseX.js → components/TagCloseX.js} +1 -1
- package/dist/components/molecules/Tags/Tag/components/TagCloseX.js.map +1 -0
- package/dist/components/molecules/Tags/index.cjs +2 -2
- package/dist/components/molecules/Tags/index.d.ts +1 -1
- package/dist/components/molecules/Tags/index.d.ts.map +1 -1
- package/dist/components/molecules/Tags/index.js +1 -1
- package/dist/components/molecules/TextArea/index.cjs +5 -30
- package/dist/components/molecules/TextArea/index.cjs.map +1 -1
- package/dist/components/molecules/TextArea/index.d.ts +7 -47
- package/dist/components/molecules/TextArea/index.d.ts.map +1 -1
- package/dist/components/molecules/TextArea/index.js +5 -30
- package/dist/components/molecules/TextArea/index.js.map +1 -1
- package/dist/components/molecules/VerificationCodeInput/index.cjs +5 -89
- package/dist/components/molecules/VerificationCodeInput/index.cjs.map +1 -1
- package/dist/components/molecules/VerificationCodeInput/index.d.ts +9 -69
- package/dist/components/molecules/VerificationCodeInput/index.d.ts.map +1 -1
- package/dist/components/molecules/VerificationCodeInput/index.js +5 -89
- package/dist/components/molecules/VerificationCodeInput/index.js.map +1 -1
- package/dist/components/organisms/Calendar/components/CalendarDayView.cjs +2 -3
- package/dist/components/organisms/Calendar/components/CalendarDayView.cjs.map +1 -1
- package/dist/components/organisms/Calendar/components/CalendarDayView.d.ts.map +1 -1
- package/dist/components/organisms/Calendar/components/CalendarDayView.js +2 -3
- package/dist/components/organisms/Calendar/components/CalendarDayView.js.map +1 -1
- package/dist/components/organisms/Calendar/components/CalendarDwViewCell.cjs +2 -2
- package/dist/components/organisms/Calendar/components/CalendarDwViewCell.cjs.map +1 -1
- package/dist/components/organisms/Calendar/components/CalendarDwViewCell.js +1 -1
- package/dist/components/organisms/Calendar/components/CalendarHeader.cjs +2 -2
- package/dist/components/organisms/Calendar/components/CalendarHeader.cjs.map +1 -1
- package/dist/components/organisms/Calendar/components/CalendarHeader.js +1 -1
- package/dist/components/organisms/Calendar/components/CalendarMonthViewCell.cjs +2 -2
- package/dist/components/organisms/Calendar/components/CalendarMonthViewCell.cjs.map +1 -1
- package/dist/components/organisms/Calendar/components/CalendarMonthViewCell.js +1 -1
- package/dist/components/organisms/Calendar/components/CalendarViewDropdown.cjs +2 -2
- package/dist/components/organisms/Calendar/components/CalendarViewDropdown.cjs.map +1 -1
- package/dist/components/organisms/Calendar/components/CalendarViewDropdown.js +1 -1
- package/dist/components/organisms/CodeSnippet/index.cjs +3 -4
- package/dist/components/organisms/CodeSnippet/index.cjs.map +1 -1
- package/dist/components/organisms/CodeSnippet/index.d.ts.map +1 -1
- package/dist/components/organisms/CodeSnippet/index.js +3 -4
- package/dist/components/organisms/CodeSnippet/index.js.map +1 -1
- package/dist/components/organisms/ColorPicker/components/ColorPickerField.cjs +4 -4
- 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 +2 -2
- package/dist/components/organisms/ColorPicker/index.cjs +3 -3
- 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 +1 -1
- package/dist/components/organisms/CommandMenu/components/CommandMenuFooter.cjs +2 -2
- package/dist/components/organisms/CommandMenu/components/CommandMenuFooter.cjs.map +1 -1
- package/dist/components/organisms/CommandMenu/components/CommandMenuFooter.js +1 -1
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.cjs +5 -5
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.cjs.map +1 -1
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.js +3 -3
- package/dist/components/organisms/DatePickers/DatePicker/{Calendar.cjs → components/Calendar.cjs} +4 -4
- package/dist/components/organisms/DatePickers/DatePicker/components/Calendar.cjs.map +1 -0
- package/dist/components/organisms/DatePickers/DatePicker/components/Calendar.d.ts.map +1 -0
- package/dist/components/organisms/DatePickers/DatePicker/{Calendar.js → components/Calendar.js} +3 -3
- package/dist/components/organisms/DatePickers/DatePicker/components/Calendar.js.map +1 -0
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs +5 -5
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs.map +1 -1
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.js +2 -2
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/organisms/DatePickers/RangeCalendar/RangeCalendar.cjs +3 -3
- package/dist/components/organisms/DatePickers/RangeCalendar/RangeCalendar.cjs.map +1 -1
- package/dist/components/organisms/DatePickers/RangeCalendar/RangeCalendar.d.ts.map +1 -1
- package/dist/components/organisms/DatePickers/RangeCalendar/RangeCalendar.js +1 -1
- package/dist/components/organisms/DatePickers/RangeCalendar/RangeCalendar.js.map +1 -1
- package/dist/components/organisms/DatePickers/components/InputDate.cjs +1 -1
- package/dist/components/organisms/DatePickers/components/InputDate.js +1 -1
- package/dist/components/organisms/FileUpload/index.cjs +4 -5
- package/dist/components/organisms/FileUpload/index.cjs.map +1 -1
- package/dist/components/organisms/FileUpload/index.d.ts.map +1 -1
- package/dist/components/organisms/FileUpload/index.js +3 -4
- package/dist/components/organisms/FileUpload/index.js.map +1 -1
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.cjs +3 -3
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.cjs.map +1 -1
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.js +1 -1
- package/dist/components/organisms/GradientPicker/components/GradientReverseButton.cjs +2 -2
- package/dist/components/organisms/GradientPicker/components/GradientReverseButton.cjs.map +1 -1
- package/dist/components/organisms/GradientPicker/components/GradientReverseButton.js +2 -2
- package/dist/components/organisms/GradientPicker/components/GradientReverseButton.js.map +1 -1
- package/dist/components/organisms/GradientPicker/components/GradientStopList.cjs +2 -2
- package/dist/components/organisms/GradientPicker/components/GradientStopList.cjs.map +1 -1
- package/dist/components/organisms/GradientPicker/components/GradientStopList.js +1 -1
- package/dist/components/organisms/GradientPicker/components/GradientStopRow.cjs +2 -2
- package/dist/components/organisms/GradientPicker/components/GradientStopRow.cjs.map +1 -1
- package/dist/components/organisms/GradientPicker/components/GradientStopRow.js +2 -2
- package/dist/components/organisms/GradientPicker/components/GradientStopRow.js.map +1 -1
- package/dist/components/organisms/GradientPicker/components/GradientTypeSelect.cjs +2 -2
- package/dist/components/organisms/GradientPicker/components/GradientTypeSelect.cjs.map +1 -1
- package/dist/components/organisms/GradientPicker/components/GradientTypeSelect.js +1 -1
- package/dist/components/organisms/HeaderNavigation/components/NavAccountCard.cjs +2 -2
- package/dist/components/organisms/HeaderNavigation/components/NavAccountCard.cjs.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/NavAccountCard.js +1 -1
- package/dist/components/organisms/HeaderNavigation/index.cjs +2 -2
- package/dist/components/organisms/HeaderNavigation/index.cjs.map +1 -1
- package/dist/components/organisms/HeaderNavigation/index.js +1 -1
- package/dist/components/organisms/ImagePicker/index.cjs +4 -5
- package/dist/components/organisms/ImagePicker/index.cjs.map +1 -1
- package/dist/components/organisms/ImagePicker/index.d.ts.map +1 -1
- package/dist/components/organisms/ImagePicker/index.js +2 -3
- package/dist/components/organisms/ImagePicker/index.js.map +1 -1
- package/dist/components/organisms/PageHeader/index.cjs +2 -2
- package/dist/components/organisms/PageHeader/index.cjs.map +1 -1
- package/dist/components/organisms/PageHeader/index.js +1 -1
- package/dist/components/organisms/SidePanel/components/SidePanelHeader.cjs +4 -5
- package/dist/components/organisms/SidePanel/components/SidePanelHeader.cjs.map +1 -1
- package/dist/components/organisms/SidePanel/components/SidePanelHeader.d.ts.map +1 -1
- package/dist/components/organisms/SidePanel/components/SidePanelHeader.js +2 -3
- package/dist/components/organisms/SidePanel/components/SidePanelHeader.js.map +1 -1
- package/dist/components/organisms/SidebarNavigation/index.cjs +2 -2
- package/dist/components/organisms/SidebarNavigation/index.cjs.map +1 -1
- package/dist/components/organisms/SidebarNavigation/index.js +2 -2
- package/dist/components/organisms/SidebarNavigation/index.js.map +1 -1
- package/dist/components/organisms/SlideoutMenu/index.cjs +2 -3
- package/dist/components/organisms/SlideoutMenu/index.cjs.map +1 -1
- package/dist/components/organisms/SlideoutMenu/index.d.ts.map +1 -1
- package/dist/components/organisms/SlideoutMenu/index.js +2 -3
- package/dist/components/organisms/SlideoutMenu/index.js.map +1 -1
- package/dist/components/organisms/TextEditor/components/TextEditorExtensions.cjs +2 -2
- package/dist/components/organisms/TextEditor/components/TextEditorExtensions.cjs.map +1 -1
- package/dist/components/organisms/TextEditor/components/TextEditorExtensions.js +1 -1
- package/dist/components/organisms/TextEditor/index.cjs +3 -3
- package/dist/components/organisms/TextEditor/index.cjs.map +1 -1
- package/dist/components/organisms/TextEditor/index.d.ts +1 -1
- package/dist/components/organisms/TextEditor/index.d.ts.map +1 -1
- package/dist/components/organisms/TextEditor/index.js +1 -1
- package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.cjs +35 -8
- package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.cjs.map +1 -1
- package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.d.ts +5 -5
- package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.d.ts.map +1 -1
- package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.js +36 -9
- package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.js.map +1 -1
- package/dist/native/components/atoms/Button/index.d.ts +14 -65
- package/dist/native/components/atoms/Button/index.d.ts.map +1 -1
- package/dist/native/components/atoms/Button/index.js +6 -145
- package/dist/native/components/atoms/Button/index.js.map +1 -1
- package/dist/native/components/atoms/Buttons/Button/Button.d.ts +66 -0
- package/dist/native/components/atoms/Buttons/Button/Button.d.ts.map +1 -0
- package/dist/native/components/atoms/Buttons/Button/Button.js +149 -0
- package/dist/native/components/atoms/Buttons/Button/Button.js.map +1 -0
- package/dist/{components/atoms → native/components/atoms/Buttons}/Button/Button.styles.d.ts +1 -1
- package/dist/native/components/atoms/Buttons/Button/Button.styles.d.ts.map +1 -0
- package/dist/native/components/atoms/{Button → Buttons/Button}/Button.styles.js +1 -1
- package/dist/native/components/atoms/Buttons/Button/Button.styles.js.map +1 -0
- package/dist/native/components/atoms/Buttons/index.d.ts +4 -0
- package/dist/native/components/atoms/Buttons/index.d.ts.map +1 -0
- package/dist/native/components/atoms/Buttons/index.js +2 -0
- package/dist/native/components/atoms/Buttons/index.js.map +1 -0
- package/dist/native/components/atoms/Inputs/index.d.ts +12 -0
- package/dist/native/components/atoms/VerificationCodeInput/index.d.ts +12 -0
- package/package.json +1 -1
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreBadgeLink.cjs.map +0 -1
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreBadgeLink.d.ts.map +0 -1
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreBadgeLink.js.map +0 -1
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButtonsOutline.cjs.map +0 -1
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButtonsOutline.d.ts.map +0 -1
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButtonsOutline.js.map +0 -1
- package/dist/components/atoms/BrandButtons/SocialButton/SocialLogos.cjs.map +0 -1
- package/dist/components/atoms/BrandButtons/SocialButton/SocialLogos.d.ts.map +0 -1
- package/dist/components/atoms/BrandButtons/SocialButton/SocialLogos.js.map +0 -1
- package/dist/components/atoms/Button/Button.styles.d.ts.map +0 -1
- package/dist/components/atoms/Button/components/ButtonIcon.cjs.map +0 -1
- package/dist/components/atoms/Button/components/ButtonIcon.d.ts.map +0 -1
- package/dist/components/atoms/Button/components/ButtonIcon.js.map +0 -1
- package/dist/components/atoms/Button/components/ButtonSpinner.cjs.map +0 -1
- package/dist/components/atoms/Button/components/ButtonSpinner.d.ts.map +0 -1
- package/dist/components/atoms/Button/components/ButtonSpinner.js.map +0 -1
- package/dist/components/atoms/Checkboxes/Checkbox/CheckboxBase.cjs.map +0 -1
- package/dist/components/atoms/Checkboxes/Checkbox/CheckboxBase.d.ts.map +0 -1
- package/dist/components/atoms/Checkboxes/Checkbox/CheckboxBase.js.map +0 -1
- package/dist/components/atoms/Input/components/HintText.cjs.map +0 -1
- package/dist/components/atoms/Input/components/HintText.d.ts.map +0 -1
- package/dist/components/atoms/Input/components/HintText.js.map +0 -1
- package/dist/components/atoms/Input/components/Label.cjs.map +0 -1
- package/dist/components/atoms/Input/components/Label.d.ts.map +0 -1
- package/dist/components/atoms/Input/components/Label.js.map +0 -1
- package/dist/components/atoms/Radios/RadioButton/RadioButtonBase.cjs.map +0 -1
- package/dist/components/atoms/Radios/RadioButton/RadioButtonBase.d.ts.map +0 -1
- package/dist/components/atoms/Radios/RadioButton/RadioButtonBase.js.map +0 -1
- package/dist/components/molecules/Selects/Select/Combobox.cjs.map +0 -1
- package/dist/components/molecules/Selects/Select/Combobox.d.ts.map +0 -1
- package/dist/components/molecules/Selects/Select/Combobox.js.map +0 -1
- package/dist/components/molecules/Selects/Select/Popover.cjs.map +0 -1
- package/dist/components/molecules/Selects/Select/Popover.d.ts.map +0 -1
- package/dist/components/molecules/Selects/Select/Popover.js.map +0 -1
- package/dist/components/molecules/Tags/Tag/TagAvatar.cjs.map +0 -1
- package/dist/components/molecules/Tags/Tag/TagAvatar.d.ts.map +0 -1
- package/dist/components/molecules/Tags/Tag/TagAvatar.js.map +0 -1
- package/dist/components/molecules/Tags/Tag/TagCheckbox.cjs.map +0 -1
- package/dist/components/molecules/Tags/Tag/TagCheckbox.d.ts.map +0 -1
- package/dist/components/molecules/Tags/Tag/TagCheckbox.js.map +0 -1
- package/dist/components/molecules/Tags/Tag/TagCloseX.cjs.map +0 -1
- package/dist/components/molecules/Tags/Tag/TagCloseX.d.ts.map +0 -1
- package/dist/components/molecules/Tags/Tag/TagCloseX.js.map +0 -1
- package/dist/components/organisms/DatePickers/DatePicker/Calendar.cjs.map +0 -1
- package/dist/components/organisms/DatePickers/DatePicker/Calendar.d.ts.map +0 -1
- package/dist/components/organisms/DatePickers/DatePicker/Calendar.js.map +0 -1
- package/dist/native/components/atoms/Button/Button.styles.d.ts.map +0 -1
- package/dist/native/components/atoms/Button/Button.styles.js.map +0 -1
- /package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreBadgeLink.cjs → components/AppStoreBadgeLink.cjs} +0 -0
- /package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreBadgeLink.d.ts → components/AppStoreBadgeLink.d.ts} +0 -0
- /package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreBadgeLink.js → components/AppStoreBadgeLink.js} +0 -0
- /package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreButtonsOutline.d.ts → components/AppStoreButtonsOutline.d.ts} +0 -0
- /package/dist/components/atoms/BrandButtons/SocialButton/{SocialLogos.cjs → components/SocialLogos.cjs} +0 -0
- /package/dist/components/atoms/BrandButtons/SocialButton/{SocialLogos.d.ts → components/SocialLogos.d.ts} +0 -0
- /package/dist/components/atoms/BrandButtons/SocialButton/{SocialLogos.js → components/SocialLogos.js} +0 -0
- /package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonSpinner.cjs +0 -0
- /package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonSpinner.d.ts +0 -0
- /package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonSpinner.js +0 -0
- /package/dist/components/atoms/Checkboxes/Checkbox/{CheckboxBase.cjs → components/CheckboxBase.cjs} +0 -0
- /package/dist/components/atoms/Checkboxes/Checkbox/{CheckboxBase.d.ts → components/CheckboxBase.d.ts} +0 -0
- /package/dist/components/atoms/Checkboxes/Checkbox/{CheckboxBase.js → components/CheckboxBase.js} +0 -0
- /package/dist/components/atoms/{Input → Inputs}/components/HintText.cjs +0 -0
- /package/dist/components/atoms/{Input → Inputs}/components/HintText.d.ts +0 -0
- /package/dist/components/atoms/{Input → Inputs}/components/HintText.js +0 -0
- /package/dist/components/atoms/{Input → Inputs}/components/Label.cjs +0 -0
- /package/dist/components/atoms/{Input → Inputs}/components/Label.d.ts +0 -0
- /package/dist/components/atoms/{Input → Inputs}/components/Label.js +0 -0
- /package/dist/components/atoms/Radios/RadioButton/{RadioButtonBase.cjs → components/RadioButtonBase.cjs} +0 -0
- /package/dist/components/atoms/Radios/RadioButton/{RadioButtonBase.d.ts → components/RadioButtonBase.d.ts} +0 -0
- /package/dist/components/atoms/Radios/RadioButton/{RadioButtonBase.js → components/RadioButtonBase.js} +0 -0
- /package/dist/components/molecules/Selects/Select/{Popover.d.ts → components/Popover.d.ts} +0 -0
- /package/dist/components/molecules/Tags/Tag/{TagAvatar.d.ts → components/TagAvatar.d.ts} +0 -0
- /package/dist/components/organisms/DatePickers/DatePicker/{Calendar.d.ts → components/Calendar.d.ts} +0 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var Tooltip = require('@flipdish/ui-library/components/atoms/Tooltip');
|
|
5
|
+
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
6
|
+
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var reactAriaComponents = require('react-aria-components');
|
|
9
|
+
var componentGuard_utils = require('../../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.cjs');
|
|
10
|
+
|
|
11
|
+
const styles = {
|
|
12
|
+
secondary: 'bg-primary text-fg-quaternary shadow-xs-skeuomorphic ring-1 ring-primary ring-inset hover:bg-primary_hover hover:text-fg-quaternary_hover disabled:shadow-xs',
|
|
13
|
+
tertiary: 'text-fg-quaternary hover:bg-primary_hover hover:text-fg-quaternary_hover',
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Compact icon-only button for toolbar, table, and card actions that should not
|
|
17
|
+
* compete visually with primary calls-to-action. Renders as a `<button>` by
|
|
18
|
+
* default; pass `href` to render as an `<a>` tag.
|
|
19
|
+
*
|
|
20
|
+
* @summary compact icon-only button for toolbar actions
|
|
21
|
+
*/
|
|
22
|
+
const IconButton = ({ tooltip, className, isDisabled, icon: Icon, size = 'sm', color = 'secondary', tooltipPlacement = 'top', 'data-testid': dataTestId, ...otherProps }) => {
|
|
23
|
+
// The id keeps the former name, `ButtonUtility`: consumers' tests select by it.
|
|
24
|
+
const iconButtonTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'button-utility', rootName: 'button-utility' });
|
|
25
|
+
const href = 'href' in otherProps ? otherProps.href : undefined;
|
|
26
|
+
const Component = href ? reactAriaComponents.Link : reactAriaComponents.Button;
|
|
27
|
+
let props = {};
|
|
28
|
+
if (href) {
|
|
29
|
+
// react-aria writes `href=""` on the span for an `href` key that is present but undefined, so a disabled link drops the key.
|
|
30
|
+
const { href: _href, ...withoutHref } = otherProps;
|
|
31
|
+
props = {
|
|
32
|
+
...(isDisabled ? withoutHref : otherProps),
|
|
33
|
+
// Without it react-aria keeps the span focusable and still fires `onPress`.
|
|
34
|
+
isDisabled,
|
|
35
|
+
// Since anchor elements do not support the `disabled` attribute and state,
|
|
36
|
+
// we need to specify `data-rac` and `data-disabled` in order to be able
|
|
37
|
+
// to use the `disabled:` selector in classes.
|
|
38
|
+
...(isDisabled ? { 'data-rac': true, 'data-disabled': true } : {}),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
props = {
|
|
43
|
+
...otherProps,
|
|
44
|
+
type: otherProps.type || 'button',
|
|
45
|
+
isDisabled,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const content = (jsxRuntime.jsxs(Component, { "aria-label": tooltip, ...props, "data-testid": iconButtonTestId, className: cx.cx('group relative inline-flex h-max cursor-pointer items-center justify-center rounded-md p-1.5 outline-focus-ring transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50', styles[color],
|
|
49
|
+
// Icon styles
|
|
50
|
+
'*:data-icon:pointer-events-none *:data-icon:shrink-0 *:data-icon:text-current *:data-icon:transition-inherit-all', size === 'xs' ? '*:data-icon:size-4' : '*:data-icon:size-5', className), children: [componentGuard_utils.isReactComponent(Icon) && jsxRuntime.jsx(Icon, { "data-icon": true }), React.isValidElement(Icon) && Icon] }));
|
|
51
|
+
if (tooltip) {
|
|
52
|
+
return (jsxRuntime.jsx(Tooltip.Tooltip, { title: tooltip, placement: tooltipPlacement, isDisabled: isDisabled, offset: size === 'xs' ? 4 : 6, children: content }));
|
|
53
|
+
}
|
|
54
|
+
return content;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
exports.IconButton = IconButton;
|
|
58
|
+
exports.styles = styles;
|
|
59
|
+
//# sourceMappingURL=IconButton.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.cjs","sources":["../../../../../src/components/atoms/Buttons/IconButton/IconButton.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","AriaLink","AriaButton","_jsxs","cx","isReactComponent","_jsx","isValidElement","Tooltip"],"mappings":";;;;;;;;;;AAWO,MAAM,MAAM,GAAG;AACpB,IAAA,SAAS,EACP,8JAA8J;AAChK,IAAA,QAAQ,EAAE,0EAA0E;;AAoDtF;;;;;;AAMG;AACI,MAAM,UAAU,GAAG,CAAC,EACzB,OAAO,EACP,SAAS,EACT,UAAU,EACV,IAAI,EAAE,IAAI,EACV,IAAI,GAAG,IAAI,EACX,KAAK,GAAG,WAAW,EACnB,gBAAgB,GAAG,KAAK,EACxB,aAAa,EAAE,UAAU,EACzB,GAAG,UAAU,EACG,KAAI;;AAEpB,IAAA,MAAM,gBAAgB,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;AACzH,IAAA,MAAM,IAAI,GAAG,MAAM,IAAI,UAAU,GAAG,UAAU,CAAC,IAAI,GAAG,SAAS;IAC/D,MAAM,SAAS,GAAG,IAAI,GAAGC,wBAAQ,GAAGC,0BAAU;IAE9C,IAAI,KAAK,GAAG,EAAE;IAEd,IAAI,IAAI,EAAE;;QAER,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,GAAG,UAA+B;AACvE,QAAA,KAAK,GAAG;YACN,IAAI,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC;;YAE1C,UAAU;;;;AAKV,YAAA,IAAI,UAAU,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;SACnE;IACH;SAAO;AACL,QAAA,KAAK,GAAG;AACN,YAAA,GAAG,UAAU;AAEb,YAAA,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,QAAQ;YACjC,UAAU;SACX;IACH;IAEA,MAAM,OAAO,IACXC,eAAA,CAAC,SAAS,EAAA,EAAA,YAAA,EACI,OAAO,KACf,KAAK,EAAA,aAAA,EACI,gBAAgB,EAC7B,SAAS,EAAEC,KAAE,CACX,4PAA4P,EAC5P,MAAM,CAAC,KAAK,CAAC;;AAGb,QAAA,kHAAkH,EAClH,IAAI,KAAK,IAAI,GAAG,oBAAoB,GAAG,oBAAoB,EAE3D,SAAS,CACV,EAAA,QAAA,EAAA,CAEAC,qCAAgB,CAAC,IAAI,CAAC,IAAIC,cAAA,CAAC,IAAI,EAAA,EAAA,WAAA,EAAA,IAAA,EAAA,CAAa,EAC5CC,oBAAc,CAAC,IAAI,CAAC,IAAI,IAAI,CAAA,EAAA,CACnB,CACb;IAED,IAAI,OAAO,EAAE;AACX,QAAA,QACED,cAAA,CAACE,eAAO,EAAA,EAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,KAAK,IAAI,GAAG,CAAC,GAAG,CAAC,EAAA,QAAA,EACxG,OAAO,EAAA,CACA;IAEd;AAEA,IAAA,OAAO,OAAO;AAChB;;;"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from 'react';
|
|
2
|
+
import type { ButtonProps as AriaButtonProps, LinkProps as AriaLinkProps, Placement } from 'react-aria-components';
|
|
3
|
+
export declare const styles: {
|
|
4
|
+
secondary: string;
|
|
5
|
+
tertiary: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Common props shared between button and anchor variants
|
|
9
|
+
*/
|
|
10
|
+
export interface CommonProps {
|
|
11
|
+
/** Disables the button and shows a disabled state */
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
/** The size variant of the button */
|
|
14
|
+
size?: 'xs' | 'sm';
|
|
15
|
+
/** The color variant of the button */
|
|
16
|
+
color?: 'secondary' | 'tertiary';
|
|
17
|
+
/** The icon to display in the button */
|
|
18
|
+
icon?: FC<{
|
|
19
|
+
className?: string;
|
|
20
|
+
}> | ReactNode;
|
|
21
|
+
/** Shown on hover and focus, and used as the accessible name unless `aria-label` is set. */
|
|
22
|
+
tooltip?: string;
|
|
23
|
+
/** The placement of the tooltip */
|
|
24
|
+
tooltipPlacement?: Placement;
|
|
25
|
+
/** Overrides the `data-testid` (defaults to `fd-button-utility`). */
|
|
26
|
+
'data-testid'?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Props for the button variant (non-link)
|
|
30
|
+
*/
|
|
31
|
+
export interface ButtonProps extends CommonProps, DetailedHTMLProps<Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'slot'>, HTMLButtonElement> {
|
|
32
|
+
/** Slot name for react-aria component */
|
|
33
|
+
slot?: AriaButtonProps['slot'];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Props for the link variant (anchor tag)
|
|
37
|
+
*/
|
|
38
|
+
interface LinkProps extends CommonProps, DetailedHTMLProps<Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'color'>, HTMLAnchorElement> {
|
|
39
|
+
/** Options for the configured client side router. */
|
|
40
|
+
routerOptions?: AriaLinkProps['routerOptions'];
|
|
41
|
+
/** Runs on a press of the link, alongside the navigation. */
|
|
42
|
+
onPress?: AriaLinkProps['onPress'];
|
|
43
|
+
}
|
|
44
|
+
/** Union type of button and link props */
|
|
45
|
+
export type Props = ButtonProps | LinkProps;
|
|
46
|
+
/** What names the button for a screen reader: its `tooltip`, or an `aria-label` or `aria-labelledby` when it has none. */
|
|
47
|
+
type AccessibleName = {
|
|
48
|
+
tooltip: string;
|
|
49
|
+
} | {
|
|
50
|
+
'aria-label': string;
|
|
51
|
+
} | {
|
|
52
|
+
'aria-labelledby': string;
|
|
53
|
+
};
|
|
54
|
+
/** Props of `IconButton`: the button or link props with an accessible name, which an icon alone does not give it. */
|
|
55
|
+
export type IconButtonProps = Props & AccessibleName;
|
|
56
|
+
/**
|
|
57
|
+
* Compact icon-only button for toolbar, table, and card actions that should not
|
|
58
|
+
* compete visually with primary calls-to-action. Renders as a `<button>` by
|
|
59
|
+
* default; pass `href` to render as an `<a>` tag.
|
|
60
|
+
*
|
|
61
|
+
* @summary compact icon-only button for toolbar actions
|
|
62
|
+
*/
|
|
63
|
+
export declare const IconButton: ({ tooltip, className, isDisabled, icon: Icon, size, color, tooltipPlacement, "data-testid": dataTestId, ...otherProps }: IconButtonProps) => import("react").JSX.Element;
|
|
64
|
+
export {};
|
|
65
|
+
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Buttons/IconButton/IconButton.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1G,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,SAAS,IAAI,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAInH,eAAO,MAAM,MAAM;;;CAIlB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qCAAqC;IACrC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,sCAAsC;IACtC,KAAK,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IACjC,wCAAwC;IACxC,IAAI,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC9C,4FAA4F;IAC5F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,qEAAqE;IACrE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,WACf,SAAQ,WAAW,EACjB,iBAAiB,CAAC,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,EAAE,iBAAiB,CAAC;IACvG,yCAAyC;IACzC,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;CAChC;AAED;;GAEG;AACH,UAAU,SAAU,SAAQ,WAAW,EAAE,iBAAiB,CAAC,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,EAAE,iBAAiB,CAAC;IACnI,qDAAqD;IACrD,aAAa,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAC/C,6DAA6D;IAC7D,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACpC;AAED,0CAA0C;AAC1C,MAAM,MAAM,KAAK,GAAG,WAAW,GAAG,SAAS,CAAC;AAE5C,0HAA0H;AAC1H,KAAK,cAAc,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,iBAAiB,EAAE,MAAM,CAAA;CAAE,CAAC;AAErG,qHAAqH;AACrH,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,cAAc,CAAC;AAErD;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,yHAUxB,eAAe,gCA4DjB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Tooltip } from '@flipdish/ui-library/components/atoms/Tooltip';
|
|
3
|
+
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
4
|
+
import { useResolvedTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
5
|
+
import { isValidElement } from 'react';
|
|
6
|
+
import { Link, Button } from 'react-aria-components';
|
|
7
|
+
import { isReactComponent } from '../../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.js';
|
|
8
|
+
|
|
9
|
+
const styles = {
|
|
10
|
+
secondary: 'bg-primary text-fg-quaternary shadow-xs-skeuomorphic ring-1 ring-primary ring-inset hover:bg-primary_hover hover:text-fg-quaternary_hover disabled:shadow-xs',
|
|
11
|
+
tertiary: 'text-fg-quaternary hover:bg-primary_hover hover:text-fg-quaternary_hover',
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Compact icon-only button for toolbar, table, and card actions that should not
|
|
15
|
+
* compete visually with primary calls-to-action. Renders as a `<button>` by
|
|
16
|
+
* default; pass `href` to render as an `<a>` tag.
|
|
17
|
+
*
|
|
18
|
+
* @summary compact icon-only button for toolbar actions
|
|
19
|
+
*/
|
|
20
|
+
const IconButton = ({ tooltip, className, isDisabled, icon: Icon, size = 'sm', color = 'secondary', tooltipPlacement = 'top', 'data-testid': dataTestId, ...otherProps }) => {
|
|
21
|
+
// The id keeps the former name, `ButtonUtility`: consumers' tests select by it.
|
|
22
|
+
const iconButtonTestId = useResolvedTestId({ testId: dataTestId, segment: 'button-utility', rootName: 'button-utility' });
|
|
23
|
+
const href = 'href' in otherProps ? otherProps.href : undefined;
|
|
24
|
+
const Component = href ? Link : Button;
|
|
25
|
+
let props = {};
|
|
26
|
+
if (href) {
|
|
27
|
+
// react-aria writes `href=""` on the span for an `href` key that is present but undefined, so a disabled link drops the key.
|
|
28
|
+
const { href: _href, ...withoutHref } = otherProps;
|
|
29
|
+
props = {
|
|
30
|
+
...(isDisabled ? withoutHref : otherProps),
|
|
31
|
+
// Without it react-aria keeps the span focusable and still fires `onPress`.
|
|
32
|
+
isDisabled,
|
|
33
|
+
// Since anchor elements do not support the `disabled` attribute and state,
|
|
34
|
+
// we need to specify `data-rac` and `data-disabled` in order to be able
|
|
35
|
+
// to use the `disabled:` selector in classes.
|
|
36
|
+
...(isDisabled ? { 'data-rac': true, 'data-disabled': true } : {}),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
props = {
|
|
41
|
+
...otherProps,
|
|
42
|
+
type: otherProps.type || 'button',
|
|
43
|
+
isDisabled,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
const content = (jsxs(Component, { "aria-label": tooltip, ...props, "data-testid": iconButtonTestId, className: cx('group relative inline-flex h-max cursor-pointer items-center justify-center rounded-md p-1.5 outline-focus-ring transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50', styles[color],
|
|
47
|
+
// Icon styles
|
|
48
|
+
'*:data-icon:pointer-events-none *:data-icon:shrink-0 *:data-icon:text-current *:data-icon:transition-inherit-all', size === 'xs' ? '*:data-icon:size-4' : '*:data-icon:size-5', className), children: [isReactComponent(Icon) && jsx(Icon, { "data-icon": true }), isValidElement(Icon) && Icon] }));
|
|
49
|
+
if (tooltip) {
|
|
50
|
+
return (jsx(Tooltip, { title: tooltip, placement: tooltipPlacement, isDisabled: isDisabled, offset: size === 'xs' ? 4 : 6, children: content }));
|
|
51
|
+
}
|
|
52
|
+
return content;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export { IconButton, styles };
|
|
56
|
+
//# sourceMappingURL=IconButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.js","sources":["../../../../../src/components/atoms/Buttons/IconButton/IconButton.tsx"],"sourcesContent":[null],"names":["AriaLink","AriaButton","_jsxs","_jsx"],"mappings":";;;;;;;;AAWO,MAAM,MAAM,GAAG;AACpB,IAAA,SAAS,EACP,8JAA8J;AAChK,IAAA,QAAQ,EAAE,0EAA0E;;AAoDtF;;;;;;AAMG;AACI,MAAM,UAAU,GAAG,CAAC,EACzB,OAAO,EACP,SAAS,EACT,UAAU,EACV,IAAI,EAAE,IAAI,EACV,IAAI,GAAG,IAAI,EACX,KAAK,GAAG,WAAW,EACnB,gBAAgB,GAAG,KAAK,EACxB,aAAa,EAAE,UAAU,EACzB,GAAG,UAAU,EACG,KAAI;;AAEpB,IAAA,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;AACzH,IAAA,MAAM,IAAI,GAAG,MAAM,IAAI,UAAU,GAAG,UAAU,CAAC,IAAI,GAAG,SAAS;IAC/D,MAAM,SAAS,GAAG,IAAI,GAAGA,IAAQ,GAAGC,MAAU;IAE9C,IAAI,KAAK,GAAG,EAAE;IAEd,IAAI,IAAI,EAAE;;QAER,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,GAAG,UAA+B;AACvE,QAAA,KAAK,GAAG;YACN,IAAI,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC;;YAE1C,UAAU;;;;AAKV,YAAA,IAAI,UAAU,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;SACnE;IACH;SAAO;AACL,QAAA,KAAK,GAAG;AACN,YAAA,GAAG,UAAU;AAEb,YAAA,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,QAAQ;YACjC,UAAU;SACX;IACH;IAEA,MAAM,OAAO,IACXC,IAAA,CAAC,SAAS,EAAA,EAAA,YAAA,EACI,OAAO,KACf,KAAK,EAAA,aAAA,EACI,gBAAgB,EAC7B,SAAS,EAAE,EAAE,CACX,4PAA4P,EAC5P,MAAM,CAAC,KAAK,CAAC;;AAGb,QAAA,kHAAkH,EAClH,IAAI,KAAK,IAAI,GAAG,oBAAoB,GAAG,oBAAoB,EAE3D,SAAS,CACV,EAAA,QAAA,EAAA,CAEA,gBAAgB,CAAC,IAAI,CAAC,IAAIC,GAAA,CAAC,IAAI,EAAA,EAAA,WAAA,EAAA,IAAA,EAAA,CAAa,EAC5C,cAAc,CAAC,IAAI,CAAC,IAAI,IAAI,CAAA,EAAA,CACnB,CACb;IAED,IAAI,OAAO,EAAE;AACX,QAAA,QACEA,GAAA,CAAC,OAAO,EAAA,EAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,KAAK,IAAI,GAAG,CAAC,GAAG,CAAC,EAAA,QAAA,EACxG,OAAO,EAAA,CACA;IAEd;AAEA,IAAA,OAAO,OAAO;AAChB;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Button = require('./Button/Button.cjs');
|
|
4
|
+
var CloseButton = require('./CloseButton/CloseButton.cjs');
|
|
5
|
+
var CopyButton = require('./CopyButton/CopyButton.cjs');
|
|
6
|
+
var IconButton = require('./IconButton/IconButton.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.Button = Button.Button;
|
|
11
|
+
exports.CloseButton = CloseButton.CloseButton;
|
|
12
|
+
exports.CopyButton = CopyButton.CopyButton;
|
|
13
|
+
exports.IconButton = IconButton.IconButton;
|
|
14
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The generic buttons: `Button` for an action or a link with a label, `IconButton` for a compact icon-only action,
|
|
3
|
+
* `CopyButton` for copying a value to the clipboard, and `CloseButton` for dismissing an overlay.
|
|
4
|
+
*
|
|
5
|
+
* Explicit named re-exports on purpose: `export *` would publish every symbol of every member and private file
|
|
6
|
+
* (import paths are the public API here), so this list is the single source of truth for what Buttons exposes.
|
|
7
|
+
* Each member's implementation, stories and docs live in its own folder (`Button/Button.tsx`), never as
|
|
8
|
+
* `index.tsx`: the `exports` wildcard would make that folder a public path.
|
|
9
|
+
*/
|
|
10
|
+
export type { ButtonProps } from './Button/Button';
|
|
11
|
+
export { Button } from './Button/Button';
|
|
12
|
+
export type { CloseButtonProps } from './CloseButton/CloseButton';
|
|
13
|
+
export { CloseButton } from './CloseButton/CloseButton';
|
|
14
|
+
export type { CopyButtonProps } from './CopyButton/CopyButton';
|
|
15
|
+
export { CopyButton } from './CopyButton/CopyButton';
|
|
16
|
+
export type { IconButtonProps } from './IconButton/IconButton';
|
|
17
|
+
export { IconButton } from './IconButton/IconButton';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Buttons/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -7,7 +7,7 @@ var React = require('react');
|
|
|
7
7
|
var reactAriaComponents = require('react-aria-components');
|
|
8
8
|
var selectionControl_styles = require('../../../__internal__/selectionControl/selectionControl.styles.cjs');
|
|
9
9
|
var CheckboxGroup_context = require('../providers/CheckboxGroup.context.cjs');
|
|
10
|
-
var CheckboxBase = require('./CheckboxBase.cjs');
|
|
10
|
+
var CheckboxBase = require('./components/CheckboxBase.cjs');
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Checkbox input for selecting one or more options in a form. Supports checked,
|
|
@@ -5,7 +5,7 @@ import { useContext } from 'react';
|
|
|
5
5
|
import { CheckboxGroupStateContext, Checkbox as Checkbox$1 } from 'react-aria-components';
|
|
6
6
|
import { selectionControlSizes } from '../../../__internal__/selectionControl/selectionControl.styles.js';
|
|
7
7
|
import { CheckboxGroupContext } from '../providers/CheckboxGroup.context.js';
|
|
8
|
-
import { CheckboxBase } from './CheckboxBase.js';
|
|
8
|
+
import { CheckboxBase } from './components/CheckboxBase.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Checkbox input for selecting one or more options in a form. Supports checked,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckboxBase.cjs","sources":["../../../../../../src/components/atoms/Checkboxes/Checkbox/components/CheckboxBase.tsx"],"sourcesContent":[null],"names":["_jsxs","cx","_jsx"],"mappings":";;;;;AAmBA;MACa,YAAY,GAAG,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,IAAI,GAAG,IAAI,EAAE,cAAc,GAAG,KAAK,EAAqB,KAAI;AAC7I,IAAA,QACEA,eAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAEC,KAAE,CACX,4IAA4I,EAC5I,IAAI,KAAK,IAAI,IAAI,mBAAmB,EACpC,CAAC,UAAU,IAAI,eAAe,KAAK,iCAAiC,EACpE,UAAU,IAAI,+BAA+B,EAC7C,UAAU,IAAI,EAAE,UAAU,IAAI,eAAe,CAAC,IAAI,aAAa,EAC/D,cAAc,IAAI,+CAA+C,EACjE,SAAS,CACV,EAAA,QAAA,EAAA,CAEDC,cAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EACc,MAAM,EAClB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,SAAS,EAAED,KAAE,CACX,uFAAuF,EACvF,IAAI,KAAK,IAAI,IAAI,UAAU,EAC3B,eAAe,IAAI,aAAa,CACjC,EAAA,QAAA,EAEDC,yBAAM,CAAC,EAAC,oBAAoB,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,GAAG,EAAC,aAAa,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,EAAA,CAAG,EAAA,CAC9G,EAENA,cAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EACc,MAAM,EAClB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,SAAS,EAAED,KAAE,CACX,oFAAoF,EACpF,IAAI,KAAK,IAAI,IAAI,UAAU,EAC3B,UAAU,IAAI,CAAC,eAAe,IAAI,aAAa,CAChD,EAAA,QAAA,EAEDC,cAAA,CAAA,MAAA,EAAA,EAAM,CAAC,EAAC,wCAAwC,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,GAAG,EAAC,aAAa,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,EAAA,CAAG,EAAA,CAClI,CAAA,EAAA,CACF;AAEV;AACA,YAAY,CAAC,WAAW,GAAG,cAAc;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckboxBase.d.ts","sourceRoot":"","sources":["../../../../../../src/components/atoms/Checkboxes/Checkbox/components/CheckboxBase.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,iBAAiB;IAChC,qDAAqD;IACrD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oEAAoE;IACpE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mDAAmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qGAAqG;IACrG,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,0JAA0J;AAC1J,eAAO,MAAM,YAAY;mFAAiG,iBAAiB;;CAwC1I,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckboxBase.js","sources":["../../../../../../src/components/atoms/Checkboxes/Checkbox/components/CheckboxBase.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;AAmBA;MACa,YAAY,GAAG,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,IAAI,GAAG,IAAI,EAAE,cAAc,GAAG,KAAK,EAAqB,KAAI;AAC7I,IAAA,QACEA,IAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAE,EAAE,CACX,4IAA4I,EAC5I,IAAI,KAAK,IAAI,IAAI,mBAAmB,EACpC,CAAC,UAAU,IAAI,eAAe,KAAK,iCAAiC,EACpE,UAAU,IAAI,+BAA+B,EAC7C,UAAU,IAAI,EAAE,UAAU,IAAI,eAAe,CAAC,IAAI,aAAa,EAC/D,cAAc,IAAI,+CAA+C,EACjE,SAAS,CACV,EAAA,QAAA,EAAA,CAEDC,GAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EACc,MAAM,EAClB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,SAAS,EAAE,EAAE,CACX,uFAAuF,EACvF,IAAI,KAAK,IAAI,IAAI,UAAU,EAC3B,eAAe,IAAI,aAAa,CACjC,EAAA,QAAA,EAEDA,cAAM,CAAC,EAAC,oBAAoB,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,GAAG,EAAC,aAAa,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,EAAA,CAAG,EAAA,CAC9G,EAENA,GAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EACc,MAAM,EAClB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,SAAS,EAAE,EAAE,CACX,oFAAoF,EACpF,IAAI,KAAK,IAAI,IAAI,UAAU,EAC3B,UAAU,IAAI,CAAC,eAAe,IAAI,aAAa,CAChD,EAAA,QAAA,EAEDA,GAAA,CAAA,MAAA,EAAA,EAAM,CAAC,EAAC,wCAAwC,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,GAAG,EAAC,aAAa,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,EAAA,CAAG,EAAA,CAClI,CAAA,EAAA,CACF;AAEV;AACA,YAAY,CAAC,WAAW,GAAG,cAAc;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var Inputs = require('@flipdish/ui-library/components/atoms/Inputs');
|
|
5
5
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
6
6
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
7
7
|
var reactAriaComponents = require('react-aria-components');
|
|
@@ -15,7 +15,7 @@ var CheckboxGroup_context = require('../providers/CheckboxGroup.context.cjs');
|
|
|
15
15
|
*/
|
|
16
16
|
const CheckboxGroup = ({ children, label, hint, size = 'sm', className, 'data-testid': dataTestId, ...props }) => {
|
|
17
17
|
const rootTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'checkbox-group', rootName: 'checkbox-group' });
|
|
18
|
-
return (jsxRuntime.jsx(CheckboxGroup_context.CheckboxGroupContext.Provider, { value: { size, testIdPrefix: rootTestId, validationBehavior: props.validationBehavior }, children: jsxRuntime.jsx(reactAriaComponents.CheckboxGroup, { ...props, "data-testid": rootTestId, className: cx.cx('flex flex-col gap-3', className), children: ({ isInvalid, isRequired }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [label && (jsxRuntime.jsx(
|
|
18
|
+
return (jsxRuntime.jsx(CheckboxGroup_context.CheckboxGroupContext.Provider, { value: { size, testIdPrefix: rootTestId, validationBehavior: props.validationBehavior }, children: jsxRuntime.jsx(reactAriaComponents.CheckboxGroup, { ...props, "data-testid": rootTestId, className: cx.cx('flex flex-col gap-3', className), children: ({ isInvalid, isRequired }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [label && (jsxRuntime.jsx(Inputs.Label, { isRequired: isRequired, isInvalid: isInvalid, children: label })), children, hint && jsxRuntime.jsx(Inputs.HintText, { isInvalid: isInvalid, children: hint })] })) }) }));
|
|
19
19
|
};
|
|
20
20
|
CheckboxGroup.displayName = 'CheckboxGroup';
|
|
21
21
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.cjs","sources":["../../../../../src/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","_jsx","CheckboxGroupContext","AriaCheckboxGroup","cx","_jsxs","_Fragment","Label","HintText"],"mappings":";;;;;;;;;AAwBA;;;;;AAKG;AACI,MAAM,aAAa,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAsB,KAAI;AAC1I,IAAA,MAAM,UAAU,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;AAEnH,IAAA,QACEC,cAAA,CAACC,0CAAoB,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAAE,EAAA,QAAA,EACpHD,eAACE,iCAAiB,EAAA,EAAA,GAAK,KAAK,EAAA,aAAA,EAAe,UAAU,EAAE,SAAS,EAAEC,KAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,EAAA,QAAA,EACnG,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,MACzBC,eAAA,CAAAC,mBAAA,EAAA,EAAA,QAAA,EAAA,CACG,KAAK,KACJL,cAAA,CAACM,
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.cjs","sources":["../../../../../src/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","_jsx","CheckboxGroupContext","AriaCheckboxGroup","cx","_jsxs","_Fragment","Label","HintText"],"mappings":";;;;;;;;;AAwBA;;;;;AAKG;AACI,MAAM,aAAa,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAsB,KAAI;AAC1I,IAAA,MAAM,UAAU,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;AAEnH,IAAA,QACEC,cAAA,CAACC,0CAAoB,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAAE,EAAA,QAAA,EACpHD,eAACE,iCAAiB,EAAA,EAAA,GAAK,KAAK,EAAA,aAAA,EAAe,UAAU,EAAE,SAAS,EAAEC,KAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,EAAA,QAAA,EACnG,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,MACzBC,eAAA,CAAAC,mBAAA,EAAA,EAAA,QAAA,EAAA,CACG,KAAK,KACJL,cAAA,CAACM,YAAK,EAAA,EAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAA,QAAA,EAChD,KAAK,EAAA,CACA,CACT,EACA,QAAQ,EAER,IAAI,IAAIN,cAAA,CAACO,eAAQ,EAAA,EAAC,SAAS,EAAE,SAAS,EAAA,QAAA,EAAG,IAAI,EAAA,CAAY,CAAA,EAAA,CACzD,CACJ,EAAA,CACiB,EAAA,CACU;AAEpC;AACA,aAAa,CAAC,WAAW,GAAG,eAAe;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { Label, HintText } from '@flipdish/ui-library/components/atoms/
|
|
2
|
+
import { Label, HintText } from '@flipdish/ui-library/components/atoms/Inputs';
|
|
3
3
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
4
4
|
import { useResolvedTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
5
5
|
import { CheckboxGroup as CheckboxGroup$1 } from 'react-aria-components';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var Checkbox = require('./Checkbox/Checkbox.cjs');
|
|
4
|
-
var CheckboxBase = require('./Checkbox/CheckboxBase.cjs');
|
|
4
|
+
var CheckboxBase = require('./Checkbox/components/CheckboxBase.cjs');
|
|
5
5
|
var CheckboxGroup = require('./CheckboxGroup/CheckboxGroup.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export type { CheckboxProps } from './Checkbox/Checkbox';
|
|
11
11
|
export { Checkbox } from './Checkbox/Checkbox';
|
|
12
|
-
export type { CheckboxBaseProps } from './Checkbox/CheckboxBase';
|
|
13
|
-
export { CheckboxBase } from './Checkbox/CheckboxBase';
|
|
12
|
+
export type { CheckboxBaseProps } from './Checkbox/components/CheckboxBase';
|
|
13
|
+
export { CheckboxBase } from './Checkbox/components/CheckboxBase';
|
|
14
14
|
export type { CheckboxGroupProps } from './CheckboxGroup/CheckboxGroup';
|
|
15
15
|
export { CheckboxGroup } from './CheckboxGroup/CheckboxGroup';
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Checkboxes/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,YAAY,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Checkboxes/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,YAAY,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Checkbox } from './Checkbox/Checkbox.js';
|
|
2
|
-
export { CheckboxBase } from './Checkbox/CheckboxBase.js';
|
|
2
|
+
export { CheckboxBase } from './Checkbox/components/CheckboxBase.js';
|
|
3
3
|
export { CheckboxGroup } from './CheckboxGroup/CheckboxGroup.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,32 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var uiIcons = require('@flipdish/ui-icons');
|
|
5
|
-
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
6
|
-
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
7
|
-
var reactAriaComponents = require('react-aria-components');
|
|
3
|
+
var Buttons = require('@flipdish/ui-library/components/atoms/Buttons');
|
|
8
4
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
sm: { root: 'size-9', icon: 'size-5' },
|
|
12
|
-
md: { root: 'size-10', icon: 'size-5' },
|
|
13
|
-
lg: { root: 'size-11', icon: 'size-6' },
|
|
14
|
-
};
|
|
15
|
-
const themes = {
|
|
16
|
-
light: 'text-fg-quaternary hover:bg-primary_hover hover:text-fg-quaternary_hover focus-visible:outline-2 focus-visible:outline-offset-2 outline-focus-ring',
|
|
17
|
-
dark: 'text-fg-white/70 hover:text-fg-white hover:bg-white/20 focus-visible:outline-2 focus-visible:outline-offset-2 outline-focus-ring',
|
|
18
|
-
};
|
|
19
|
-
// Comment to test native pipeline - please remove
|
|
20
|
-
/**
|
|
21
|
-
* Icon-only button that renders an × icon for dismissing overlays, toasts,
|
|
22
|
-
* banners, and drawers. Always supply a `label` for screen readers.
|
|
23
|
-
*
|
|
24
|
-
* @summary icon-only button that dismisses overlays
|
|
25
|
-
*/
|
|
26
|
-
const CloseButton = ({ label, className, size = 'sm', theme = 'light', 'data-testid': dataTestId, ...otherProps }) => {
|
|
27
|
-
const closeButtonTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'close-button', rootName: 'close-button' });
|
|
28
|
-
return (jsxRuntime.jsx(reactAriaComponents.Button, { ...otherProps, "data-testid": closeButtonTestId, "aria-label": label || 'Close', className: (state) => cx.cx('flex cursor-pointer items-center justify-center rounded-lg p-2 transition duration-100 ease-linear focus:outline-hidden', sizes[size].root, themes[theme], typeof className === 'function' ? className(state) : className), children: jsxRuntime.jsx(uiIcons.X, { "aria-hidden": "true", className: cx.cx('shrink-0 transition-inherit-all', sizes[size].icon) }) }));
|
|
29
|
-
};
|
|
5
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
|
|
6
|
+
const CloseButton = Buttons.CloseButton;
|
|
30
7
|
|
|
31
8
|
exports.CloseButton = CloseButton;
|
|
32
9
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/CloseButton/index.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/CloseButton/index.tsx"],"sourcesContent":[null],"names":["CloseButtonNext"],"mappings":";;;;AAMA;AACO,MAAM,WAAW,GAAGA;;"}
|
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
7
|
-
/** Accessible name announced by screen readers (defaults to `Close`). */
|
|
8
|
-
label?: string;
|
|
9
|
-
/** Overrides the `data-testid` (defaults to `fd-close-button`). */
|
|
10
|
-
'data-testid'?: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Icon-only button that renders an × icon for dismissing overlays, toasts,
|
|
14
|
-
* banners, and drawers. Always supply a `label` for screen readers.
|
|
15
|
-
*
|
|
16
|
-
* @summary icon-only button that dismisses overlays
|
|
17
|
-
*/
|
|
18
|
-
export declare const CloseButton: ({ label, className, size, theme, "data-testid": dataTestId, ...otherProps }: CloseButtonProps) => import("react").JSX.Element;
|
|
1
|
+
import { type CloseButtonProps as CloseButtonPropsNext } from '@flipdish/ui-library/components/atoms/Buttons';
|
|
2
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
|
|
3
|
+
export declare const CloseButton: ({ label, className, size, theme, "data-testid": dataTestId, ...otherProps }: CloseButtonPropsNext) => import("react").JSX.Element;
|
|
4
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
|
|
5
|
+
export type CloseButtonProps = CloseButtonPropsNext;
|
|
19
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/CloseButton/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/CloseButton/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAkC,KAAK,gBAAgB,IAAI,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAE9I,0GAA0G;AAC1G,eAAO,MAAM,WAAW,oIAAkB,CAAC;AAC3C,0GAA0G;AAC1G,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC"}
|
|
@@ -1,30 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { X } from '@flipdish/ui-icons';
|
|
3
|
-
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
4
|
-
import { useResolvedTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
5
|
-
import { Button } from 'react-aria-components';
|
|
1
|
+
import { CloseButton as CloseButton$1 } from '@flipdish/ui-library/components/atoms/Buttons';
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
sm: { root: 'size-9', icon: 'size-5' },
|
|
10
|
-
md: { root: 'size-10', icon: 'size-5' },
|
|
11
|
-
lg: { root: 'size-11', icon: 'size-6' },
|
|
12
|
-
};
|
|
13
|
-
const themes = {
|
|
14
|
-
light: 'text-fg-quaternary hover:bg-primary_hover hover:text-fg-quaternary_hover focus-visible:outline-2 focus-visible:outline-offset-2 outline-focus-ring',
|
|
15
|
-
dark: 'text-fg-white/70 hover:text-fg-white hover:bg-white/20 focus-visible:outline-2 focus-visible:outline-offset-2 outline-focus-ring',
|
|
16
|
-
};
|
|
17
|
-
// Comment to test native pipeline - please remove
|
|
18
|
-
/**
|
|
19
|
-
* Icon-only button that renders an × icon for dismissing overlays, toasts,
|
|
20
|
-
* banners, and drawers. Always supply a `label` for screen readers.
|
|
21
|
-
*
|
|
22
|
-
* @summary icon-only button that dismisses overlays
|
|
23
|
-
*/
|
|
24
|
-
const CloseButton = ({ label, className, size = 'sm', theme = 'light', 'data-testid': dataTestId, ...otherProps }) => {
|
|
25
|
-
const closeButtonTestId = useResolvedTestId({ testId: dataTestId, segment: 'close-button', rootName: 'close-button' });
|
|
26
|
-
return (jsx(Button, { ...otherProps, "data-testid": closeButtonTestId, "aria-label": label || 'Close', className: (state) => cx('flex cursor-pointer items-center justify-center rounded-lg p-2 transition duration-100 ease-linear focus:outline-hidden', sizes[size].root, themes[theme], typeof className === 'function' ? className(state) : className), children: jsx(X, { "aria-hidden": "true", className: cx('shrink-0 transition-inherit-all', sizes[size].icon) }) }));
|
|
27
|
-
};
|
|
3
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
|
|
4
|
+
const CloseButton = CloseButton$1;
|
|
28
5
|
|
|
29
6
|
export { CloseButton };
|
|
30
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/atoms/CloseButton/index.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/atoms/CloseButton/index.tsx"],"sourcesContent":[null],"names":["CloseButtonNext"],"mappings":";;AAMA;AACO,MAAM,WAAW,GAAGA;;"}
|
|
@@ -1,27 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var uiIcons = require('@flipdish/ui-icons');
|
|
5
|
-
var UtilityButton = require('@flipdish/ui-library/components/atoms/UtilityButton');
|
|
6
|
-
var useClipboard = require('@flipdish/ui-library/hooks/useClipboard');
|
|
7
|
-
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
3
|
+
var Buttons = require('@flipdish/ui-library/components/atoms/Buttons');
|
|
8
4
|
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
* icon for two seconds. Use beside an ID, a code or a link the user needs somewhere else.
|
|
12
|
-
*
|
|
13
|
-
* @summary copies a value to the clipboard with a confirmation
|
|
14
|
-
*/
|
|
15
|
-
const CopyButton = ({ value, label = 'Copy', copiedLabel = 'Copied', size = 'sm', color = 'tertiary', onCopy, isDisabled, className, 'data-testid': dataTestId, }) => {
|
|
16
|
-
const copyButtonTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'copy-button', rootName: 'copy-button' });
|
|
17
|
-
const { copied, copy } = useClipboard.useClipboard();
|
|
18
|
-
const handleCopy = async () => {
|
|
19
|
-
const { success } = await copy(value);
|
|
20
|
-
if (success)
|
|
21
|
-
onCopy?.(value);
|
|
22
|
-
};
|
|
23
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(UtilityButton.ButtonUtility, { icon: copied ? uiIcons.Check : uiIcons.Copy01, tooltip: copied ? copiedLabel : label, size: size, color: color, isDisabled: isDisabled, className: className, onClick: handleCopy, "data-testid": copyButtonTestId }), jsxRuntime.jsx("span", { className: "sr-only", "aria-live": "polite", children: copied ? copiedLabel : '' })] }));
|
|
24
|
-
};
|
|
5
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
|
|
6
|
+
const CopyButton = Buttons.CopyButton;
|
|
25
7
|
|
|
26
8
|
exports.CopyButton = CopyButton;
|
|
27
9
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/CopyButton/index.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/CopyButton/index.tsx"],"sourcesContent":[null],"names":["CopyButtonNext"],"mappings":";;;;AAMA;AACO,MAAM,UAAU,GAAGA;;"}
|
|
@@ -1,28 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/** Tooltip and accessible name after copying, also announced to screen readers. */
|
|
7
|
-
copiedLabel?: string;
|
|
8
|
-
/** Sets the button and icon dimensions. */
|
|
9
|
-
size?: 'xs' | 'sm';
|
|
10
|
-
/** Visual weight: `tertiary` sits flat on any surface, `secondary` adds a border for toolbars. */
|
|
11
|
-
color?: 'secondary' | 'tertiary';
|
|
12
|
-
/** Called with the copied value once the clipboard write succeeds. */
|
|
13
|
-
onCopy?: (value: string) => void;
|
|
14
|
-
/** Disables the button and shows a disabled state. */
|
|
15
|
-
isDisabled?: boolean;
|
|
16
|
-
/** Extra classes merged onto the button. */
|
|
17
|
-
className?: string;
|
|
18
|
-
/** Overrides the `data-testid` (defaults to `fd-copy-button`). */
|
|
19
|
-
'data-testid'?: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Icon-only button that copies a value to the clipboard and confirms it by swapping to a check
|
|
23
|
-
* icon for two seconds. Use beside an ID, a code or a link the user needs somewhere else.
|
|
24
|
-
*
|
|
25
|
-
* @summary copies a value to the clipboard with a confirmation
|
|
26
|
-
*/
|
|
27
|
-
export declare const CopyButton: ({ value, label, copiedLabel, size, color, onCopy, isDisabled, className, "data-testid": dataTestId, }: CopyButtonProps) => import("react").JSX.Element;
|
|
1
|
+
import { type CopyButtonProps as CopyButtonPropsNext } from '@flipdish/ui-library/components/atoms/Buttons';
|
|
2
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
|
|
3
|
+
export declare const CopyButton: ({ value, label, copiedLabel, size, color, onCopy, isDisabled, className, "data-testid": dataTestId, }: CopyButtonPropsNext) => import("react").JSX.Element;
|
|
4
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
|
|
5
|
+
export type CopyButtonProps = CopyButtonPropsNext;
|
|
28
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/CopyButton/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/CopyButton/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAgC,KAAK,eAAe,IAAI,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAE1I,0GAA0G;AAC1G,eAAO,MAAM,UAAU,6JAAiB,CAAC;AACzC,0GAA0G;AAC1G,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC"}
|
|
@@ -1,25 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Check, Copy01 } from '@flipdish/ui-icons';
|
|
3
|
-
import { ButtonUtility } from '@flipdish/ui-library/components/atoms/UtilityButton';
|
|
4
|
-
import { useClipboard } from '@flipdish/ui-library/hooks/useClipboard';
|
|
5
|
-
import { useResolvedTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
1
|
+
import { CopyButton as CopyButton$1 } from '@flipdish/ui-library/components/atoms/Buttons';
|
|
6
2
|
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
* icon for two seconds. Use beside an ID, a code or a link the user needs somewhere else.
|
|
10
|
-
*
|
|
11
|
-
* @summary copies a value to the clipboard with a confirmation
|
|
12
|
-
*/
|
|
13
|
-
const CopyButton = ({ value, label = 'Copy', copiedLabel = 'Copied', size = 'sm', color = 'tertiary', onCopy, isDisabled, className, 'data-testid': dataTestId, }) => {
|
|
14
|
-
const copyButtonTestId = useResolvedTestId({ testId: dataTestId, segment: 'copy-button', rootName: 'copy-button' });
|
|
15
|
-
const { copied, copy } = useClipboard();
|
|
16
|
-
const handleCopy = async () => {
|
|
17
|
-
const { success } = await copy(value);
|
|
18
|
-
if (success)
|
|
19
|
-
onCopy?.(value);
|
|
20
|
-
};
|
|
21
|
-
return (jsxs(Fragment, { children: [jsx(ButtonUtility, { icon: copied ? Check : Copy01, tooltip: copied ? copiedLabel : label, size: size, color: color, isDisabled: isDisabled, className: className, onClick: handleCopy, "data-testid": copyButtonTestId }), jsx("span", { className: "sr-only", "aria-live": "polite", children: copied ? copiedLabel : '' })] }));
|
|
22
|
-
};
|
|
3
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
|
|
4
|
+
const CopyButton = CopyButton$1;
|
|
23
5
|
|
|
24
6
|
export { CopyButton };
|
|
25
7
|
//# sourceMappingURL=index.js.map
|