@dynamic-framework/ui-react 2.9.0 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/dynamic-ui.css +1 -1
- package/dist/css/dynamic-ui.min.css +1 -1
- package/dist/esm/components/DAlert/DAlert.js +16 -0
- package/dist/esm/components/DAlert/DAlert.js.map +1 -0
- package/dist/esm/components/DAlert/index.js +6 -0
- package/dist/esm/components/DAlert/index.js.map +1 -0
- package/dist/esm/components/DAvatar/DAvatar.js +23 -0
- package/dist/esm/components/DAvatar/DAvatar.js.map +1 -0
- package/dist/esm/components/DAvatar/index.js +6 -0
- package/dist/esm/components/DAvatar/index.js.map +1 -0
- package/dist/esm/components/DBadge/DBadge.js +31 -0
- package/dist/esm/components/DBadge/DBadge.js.map +1 -0
- package/dist/esm/components/DBadge/index.js +6 -0
- package/dist/esm/components/DBadge/index.js.map +1 -0
- package/dist/esm/components/DBox/DBox.js +9 -0
- package/dist/esm/components/DBox/DBox.js.map +1 -0
- package/dist/esm/components/DBox/index.js +6 -0
- package/dist/esm/components/DBox/index.js.map +1 -0
- package/dist/esm/components/DBoxFile/DBoxFile.js +26 -0
- package/dist/esm/components/DBoxFile/DBoxFile.js.map +1 -0
- package/dist/esm/components/DBoxFile/index.js +6 -0
- package/dist/esm/components/DBoxFile/index.js.map +1 -0
- package/dist/esm/components/DBoxFile/useDBoxFile.js +236 -0
- package/dist/esm/components/DBoxFile/useDBoxFile.js.map +1 -0
- package/dist/esm/components/DBoxFile/utils.js +127 -0
- package/dist/esm/components/DBoxFile/utils.js.map +1 -0
- package/dist/esm/components/DButton/DButton.js +84 -0
- package/dist/esm/components/DButton/DButton.js.map +1 -0
- package/dist/esm/components/DButton/index.js +6 -0
- package/dist/esm/components/DButton/index.js.map +1 -0
- package/dist/esm/components/DButtonIcon/DButtonIcon.js +52 -0
- package/dist/esm/components/DButtonIcon/DButtonIcon.js.map +1 -0
- package/dist/esm/components/DButtonIcon/index.js +6 -0
- package/dist/esm/components/DButtonIcon/index.js.map +1 -0
- package/dist/esm/components/DButtonIcon/warnMissingAccessibleName.js +40 -0
- package/dist/esm/components/DButtonIcon/warnMissingAccessibleName.js.map +1 -0
- package/dist/esm/components/DCard/DCard.js +17 -0
- package/dist/esm/components/DCard/DCard.js.map +1 -0
- package/dist/esm/components/DCard/components/DCardBody.js +9 -0
- package/dist/esm/components/DCard/components/DCardBody.js.map +1 -0
- package/dist/esm/components/DCard/components/DCardFooter.js +9 -0
- package/dist/esm/components/DCard/components/DCardFooter.js.map +1 -0
- package/dist/esm/components/DCard/components/DCardHeader.js +9 -0
- package/dist/esm/components/DCard/components/DCardHeader.js.map +1 -0
- package/dist/esm/components/DCard/index.js +9 -0
- package/dist/esm/components/DCard/index.js.map +1 -0
- package/dist/esm/components/DCarousel/DCarousel.js +39 -0
- package/dist/esm/components/DCarousel/DCarousel.js.map +1 -0
- package/dist/esm/components/DCarousel/components/DCarouselSlide.js +12 -0
- package/dist/esm/components/DCarousel/components/DCarouselSlide.js.map +1 -0
- package/dist/esm/components/DCarousel/index.js +7 -0
- package/dist/esm/components/DCarousel/index.js.map +1 -0
- package/dist/esm/components/DChip/DChip.js +18 -0
- package/dist/esm/components/DChip/DChip.js.map +1 -0
- package/dist/esm/components/DChip/index.js +6 -0
- package/dist/esm/components/DChip/index.js.map +1 -0
- package/dist/esm/components/DCollapse/DCollapse.js +30 -0
- package/dist/esm/components/DCollapse/DCollapse.js.map +1 -0
- package/dist/esm/components/DCollapse/index.js +6 -0
- package/dist/esm/components/DCollapse/index.js.map +1 -0
- package/dist/esm/components/DConfirmModal/DConfirmModalContainer.js +59 -0
- package/dist/esm/components/DConfirmModal/DConfirmModalContainer.js.map +1 -0
- package/dist/esm/components/DConfirmModal/DConfirmModalUI.js +39 -0
- package/dist/esm/components/DConfirmModal/DConfirmModalUI.js.map +1 -0
- package/dist/esm/components/DConfirmModal/confirmModalStore.js +38 -0
- package/dist/esm/components/DConfirmModal/confirmModalStore.js.map +1 -0
- package/dist/esm/components/DCreditCard/DCreditCard.js +15 -0
- package/dist/esm/components/DCreditCard/DCreditCard.js.map +1 -0
- package/dist/esm/components/DCreditCard/index.js +6 -0
- package/dist/esm/components/DCreditCard/index.js.map +1 -0
- package/dist/esm/components/DCurrencyText/DCurrencyText.js +10 -0
- package/dist/esm/components/DCurrencyText/DCurrencyText.js.map +1 -0
- package/dist/esm/components/DCurrencyText/index.js +6 -0
- package/dist/esm/components/DCurrencyText/index.js.map +1 -0
- package/dist/esm/components/DDataStateWrapper/DDataStateWrapper.js +35 -0
- package/dist/esm/components/DDataStateWrapper/DDataStateWrapper.js.map +1 -0
- package/dist/esm/components/DDataStateWrapper/components/EmptyState.js +10 -0
- package/dist/esm/components/DDataStateWrapper/components/EmptyState.js.map +1 -0
- package/dist/esm/components/DDataStateWrapper/components/ErrorState.js +10 -0
- package/dist/esm/components/DDataStateWrapper/components/ErrorState.js.map +1 -0
- package/dist/esm/components/DDataStateWrapper/components/LoadingState.js +8 -0
- package/dist/esm/components/DDataStateWrapper/components/LoadingState.js.map +1 -0
- package/dist/esm/components/DDataStateWrapper/index.js +9 -0
- package/dist/esm/components/DDataStateWrapper/index.js.map +1 -0
- package/dist/esm/components/DDatePicker/DDatePicker.js +54 -0
- package/dist/esm/components/DDatePicker/DDatePicker.js.map +1 -0
- package/dist/esm/components/DDatePicker/components/DDatePickerHeaderSelector.js +50 -0
- package/dist/esm/components/DDatePicker/components/DDatePickerHeaderSelector.js.map +1 -0
- package/dist/esm/components/DDatePicker/components/DDatePickerInput.js +16 -0
- package/dist/esm/components/DDatePicker/components/DDatePickerInput.js.map +1 -0
- package/dist/esm/components/DDatePicker/components/DDatePickerTime.js +11 -0
- package/dist/esm/components/DDatePicker/components/DDatePickerTime.js.map +1 -0
- package/dist/esm/components/DDatePicker/index.js +6 -0
- package/dist/esm/components/DDatePicker/index.js.map +1 -0
- package/dist/esm/components/DDropdown/DDropdown.js +315 -0
- package/dist/esm/components/DDropdown/DDropdown.js.map +1 -0
- package/dist/esm/components/DDropdown/index.js +6 -0
- package/dist/esm/components/DDropdown/index.js.map +1 -0
- package/dist/esm/components/DErrorBoundary/DErrorBoundary.js +22 -0
- package/dist/esm/components/DErrorBoundary/DErrorBoundary.js.map +1 -0
- package/dist/esm/components/DErrorBoundary/components/DefaultErrorBoundary.js +10 -0
- package/dist/esm/components/DErrorBoundary/components/DefaultErrorBoundary.js.map +1 -0
- package/dist/esm/components/DErrorBoundary/index.js +7 -0
- package/dist/esm/components/DErrorBoundary/index.js.map +1 -0
- package/dist/esm/components/DIcon/DIcon.js +21 -0
- package/dist/esm/components/DIcon/DIcon.js.map +1 -0
- package/dist/esm/components/DIcon/index.js +6 -0
- package/dist/esm/components/DIcon/index.js.map +1 -0
- package/dist/esm/components/DIconBase/DIconBase.js +146 -0
- package/dist/esm/components/DIconBase/DIconBase.js.map +1 -0
- package/dist/esm/components/DIconBase/index.js +6 -0
- package/dist/esm/components/DIconBase/index.js.map +1 -0
- package/dist/esm/components/DIconBase/resolveIconFromRegistry.js +20 -0
- package/dist/esm/components/DIconBase/resolveIconFromRegistry.js.map +1 -0
- package/dist/esm/components/DIconBase/warnUnknownIcon.js +59 -0
- package/dist/esm/components/DIconBase/warnUnknownIcon.js.map +1 -0
- package/dist/esm/components/DInput/DInput.js +83 -0
- package/dist/esm/components/DInput/DInput.js.map +1 -0
- package/dist/esm/components/DInput/index.js +6 -0
- package/dist/esm/components/DInput/index.js.map +1 -0
- package/dist/esm/components/DInputCheck/DInputCheck.js +57 -0
- package/dist/esm/components/DInputCheck/DInputCheck.js.map +1 -0
- package/dist/esm/components/DInputCheck/index.js +6 -0
- package/dist/esm/components/DInputCheck/index.js.map +1 -0
- package/dist/esm/components/DInputCounter/DInputCounter.js +49 -0
- package/dist/esm/components/DInputCounter/DInputCounter.js.map +1 -0
- package/dist/esm/components/DInputCounter/index.js +6 -0
- package/dist/esm/components/DInputCounter/index.js.map +1 -0
- package/dist/esm/components/DInputCurrency/DInputCurrency.js +20 -0
- package/dist/esm/components/DInputCurrency/DInputCurrency.js.map +1 -0
- package/dist/esm/components/DInputCurrency/index.js +6 -0
- package/dist/esm/components/DInputCurrency/index.js.map +1 -0
- package/dist/esm/components/DInputMask/DInputMask.js +13 -0
- package/dist/esm/components/DInputMask/DInputMask.js.map +1 -0
- package/dist/esm/components/DInputMask/index.js +6 -0
- package/dist/esm/components/DInputMask/index.js.map +1 -0
- package/dist/esm/components/DInputPassword/DInputPassword.js +24 -0
- package/dist/esm/components/DInputPassword/DInputPassword.js.map +1 -0
- package/dist/esm/components/DInputPassword/index.js +6 -0
- package/dist/esm/components/DInputPassword/index.js.map +1 -0
- package/dist/esm/components/DInputPhone/DInputPhone.js +96 -0
- package/dist/esm/components/DInputPhone/DInputPhone.js.map +1 -0
- package/dist/esm/components/DInputPhone/index.js +6 -0
- package/dist/esm/components/DInputPhone/index.js.map +1 -0
- package/dist/esm/components/DInputPin/DInputPin.js +86 -0
- package/dist/esm/components/DInputPin/DInputPin.js.map +1 -0
- package/dist/esm/components/DInputPin/index.js +6 -0
- package/dist/esm/components/DInputPin/index.js.map +1 -0
- package/dist/esm/components/DInputRange/DInputRange.js +46 -0
- package/dist/esm/components/DInputRange/DInputRange.js.map +1 -0
- package/dist/esm/components/DInputRange/index.js +6 -0
- package/dist/esm/components/DInputRange/index.js.map +1 -0
- package/dist/esm/components/DInputSearch/DInputSearch.js +57 -0
- package/dist/esm/components/DInputSearch/DInputSearch.js.map +1 -0
- package/dist/esm/components/DInputSearch/index.js +6 -0
- package/dist/esm/components/DInputSearch/index.js.map +1 -0
- package/dist/esm/components/DInputSelect/DInputSelect.js +90 -0
- package/dist/esm/components/DInputSelect/DInputSelect.js.map +1 -0
- package/dist/esm/components/DInputSelect/index.js +6 -0
- package/dist/esm/components/DInputSelect/index.js.map +1 -0
- package/dist/esm/components/DInputSwitch/DInputSwitch.js +32 -0
- package/dist/esm/components/DInputSwitch/DInputSwitch.js.map +1 -0
- package/dist/esm/components/DInputSwitch/index.js +6 -0
- package/dist/esm/components/DInputSwitch/index.js.map +1 -0
- package/dist/esm/components/DLayout/DLayout.js +22 -0
- package/dist/esm/components/DLayout/DLayout.js.map +1 -0
- package/dist/esm/components/DLayout/components/DLayoutPane.js +16 -0
- package/dist/esm/components/DLayout/components/DLayoutPane.js.map +1 -0
- package/dist/esm/components/DLayout/index.js +7 -0
- package/dist/esm/components/DLayout/index.js.map +1 -0
- package/dist/esm/components/DListGroup/DListGroup.js +31 -0
- package/dist/esm/components/DListGroup/DListGroup.js.map +1 -0
- package/dist/esm/components/DListGroup/components/DListGroupItem.js +41 -0
- package/dist/esm/components/DListGroup/components/DListGroupItem.js.map +1 -0
- package/dist/esm/components/DListGroup/index.js +7 -0
- package/dist/esm/components/DListGroup/index.js.map +1 -0
- package/dist/esm/components/DModal/DModal.js +37 -0
- package/dist/esm/components/DModal/DModal.js.map +1 -0
- package/dist/esm/components/DModal/components/DModalBody.js +9 -0
- package/dist/esm/components/DModal/components/DModalBody.js.map +1 -0
- package/dist/esm/components/DModal/components/DModalFooter.js +14 -0
- package/dist/esm/components/DModal/components/DModalFooter.js.map +1 -0
- package/dist/esm/components/DModal/components/DModalHeader.js +15 -0
- package/dist/esm/components/DModal/components/DModalHeader.js.map +1 -0
- package/dist/esm/components/DModal/index.js +9 -0
- package/dist/esm/components/DModal/index.js.map +1 -0
- package/dist/esm/components/DOffcanvas/DOffcanvas.js +82 -0
- package/dist/esm/components/DOffcanvas/DOffcanvas.js.map +1 -0
- package/dist/esm/components/DOffcanvas/components/DOffcanvasBody.js +9 -0
- package/dist/esm/components/DOffcanvas/components/DOffcanvasBody.js.map +1 -0
- package/dist/esm/components/DOffcanvas/components/DOffcanvasFooter.js +14 -0
- package/dist/esm/components/DOffcanvas/components/DOffcanvasFooter.js.map +1 -0
- package/dist/esm/components/DOffcanvas/components/DOffcanvasHeader.js +15 -0
- package/dist/esm/components/DOffcanvas/components/DOffcanvasHeader.js.map +1 -0
- package/dist/esm/components/DOffcanvas/index.js +9 -0
- package/dist/esm/components/DOffcanvas/index.js.map +1 -0
- package/dist/esm/components/DOtp/DOtp.js +26 -0
- package/dist/esm/components/DOtp/DOtp.js.map +1 -0
- package/dist/esm/components/DOtp/components/OtpCountdown.js +12 -0
- package/dist/esm/components/DOtp/components/OtpCountdown.js.map +1 -0
- package/dist/esm/components/DOtp/index.js +6 -0
- package/dist/esm/components/DOtp/index.js.map +1 -0
- package/dist/esm/components/DPaginator/DPaginator.js +12 -0
- package/dist/esm/components/DPaginator/DPaginator.js.map +1 -0
- package/dist/esm/components/DPaginator/index.js +6 -0
- package/dist/esm/components/DPaginator/index.js.map +1 -0
- package/dist/esm/components/DPasswordStrengthMeter/DPasswordStrengthMeter.js +27 -0
- package/dist/esm/components/DPasswordStrengthMeter/DPasswordStrengthMeter.js.map +1 -0
- package/dist/esm/components/DPasswordStrengthMeter/PasswordCheckItem.js +10 -0
- package/dist/esm/components/DPasswordStrengthMeter/PasswordCheckItem.js.map +1 -0
- package/dist/esm/components/DPasswordStrengthMeter/PasswordCheckList.js +41 -0
- package/dist/esm/components/DPasswordStrengthMeter/PasswordCheckList.js.map +1 -0
- package/dist/esm/components/DPasswordStrengthMeter/PasswordStrength.js +23 -0
- package/dist/esm/components/DPasswordStrengthMeter/PasswordStrength.js.map +1 -0
- package/dist/esm/components/DPasswordStrengthMeter/index.js +6 -0
- package/dist/esm/components/DPasswordStrengthMeter/index.js.map +1 -0
- package/dist/esm/components/DPopover/DPopover.js +49 -0
- package/dist/esm/components/DPopover/DPopover.js.map +1 -0
- package/dist/esm/components/DPopover/index.js +6 -0
- package/dist/esm/components/DPopover/index.js.map +1 -0
- package/dist/esm/components/DProgress/DProgress.js +16 -0
- package/dist/esm/components/DProgress/DProgress.js.map +1 -0
- package/dist/esm/components/DProgress/index.js +6 -0
- package/dist/esm/components/DProgress/index.js.map +1 -0
- package/dist/esm/components/DSelect/DSelect.js +60 -0
- package/dist/esm/components/DSelect/DSelect.js.map +1 -0
- package/dist/esm/components/DSelect/components/DSelectClearIndicator.js +12 -0
- package/dist/esm/components/DSelect/components/DSelectClearIndicator.js.map +1 -0
- package/dist/esm/components/DSelect/components/DSelectDropdownIndicator.js +12 -0
- package/dist/esm/components/DSelect/components/DSelectDropdownIndicator.js.map +1 -0
- package/dist/esm/components/DSelect/components/DSelectLoadingIndicator.js +12 -0
- package/dist/esm/components/DSelect/components/DSelectLoadingIndicator.js.map +1 -0
- package/dist/esm/components/DSelect/components/DSelectMultiValueRemove.js +12 -0
- package/dist/esm/components/DSelect/components/DSelectMultiValueRemove.js.map +1 -0
- package/dist/esm/components/DSelect/components/DSelectOptionCheck.js +14 -0
- package/dist/esm/components/DSelect/components/DSelectOptionCheck.js.map +1 -0
- package/dist/esm/components/DSelect/components/DSelectOptionEmoji.js +14 -0
- package/dist/esm/components/DSelect/components/DSelectOptionEmoji.js.map +1 -0
- package/dist/esm/components/DSelect/components/DSelectOptionIcon.js +15 -0
- package/dist/esm/components/DSelect/components/DSelectOptionIcon.js.map +1 -0
- package/dist/esm/components/DSelect/components/DSelectPlaceholder.js +14 -0
- package/dist/esm/components/DSelect/components/DSelectPlaceholder.js.map +1 -0
- package/dist/esm/components/DSelect/components/DSelectSingleValueEmoji.js +15 -0
- package/dist/esm/components/DSelect/components/DSelectSingleValueEmoji.js.map +1 -0
- package/dist/esm/components/DSelect/components/DSelectSingleValueEmojiText.js +15 -0
- package/dist/esm/components/DSelect/components/DSelectSingleValueEmojiText.js.map +1 -0
- package/dist/esm/components/DSelect/components/DSelectSingleValueIconText.js +16 -0
- package/dist/esm/components/DSelect/components/DSelectSingleValueIconText.js.map +1 -0
- package/dist/esm/components/DSelect/index.js +6 -0
- package/dist/esm/components/DSelect/index.js.map +1 -0
- package/dist/esm/components/DStepper/DStepper.js +13 -0
- package/dist/esm/components/DStepper/DStepper.js.map +1 -0
- package/dist/esm/components/DStepper/index.js +6 -0
- package/dist/esm/components/DStepper/index.js.map +1 -0
- package/dist/esm/components/DStepperDesktop/DStepperDesktop.js +27 -0
- package/dist/esm/components/DStepperDesktop/DStepperDesktop.js.map +1 -0
- package/dist/esm/components/DStepperDesktop/index.js +6 -0
- package/dist/esm/components/DStepperDesktop/index.js.map +1 -0
- package/dist/esm/components/DStepperMobile/DStepperMobile.js +37 -0
- package/dist/esm/components/DStepperMobile/DStepperMobile.js.map +1 -0
- package/dist/esm/components/DStepperMobile/index.js +6 -0
- package/dist/esm/components/DStepperMobile/index.js.map +1 -0
- package/dist/esm/components/DTabs/DTabs.js +117 -0
- package/dist/esm/components/DTabs/DTabs.js.map +1 -0
- package/dist/esm/components/DTabs/TabContext.js +13 -0
- package/dist/esm/components/DTabs/TabContext.js.map +1 -0
- package/dist/esm/components/DTabs/components/DTabContent.js +14 -0
- package/dist/esm/components/DTabs/components/DTabContent.js.map +1 -0
- package/dist/esm/components/DTabs/index.js +8 -0
- package/dist/esm/components/DTabs/index.js.map +1 -0
- package/dist/esm/components/DTimeline/DTimeline.js +12 -0
- package/dist/esm/components/DTimeline/DTimeline.js.map +1 -0
- package/dist/esm/components/DTimeline/index.js +6 -0
- package/dist/esm/components/DTimeline/index.js.map +1 -0
- package/dist/esm/components/DToast/DToast.js +15 -0
- package/dist/esm/components/DToast/DToast.js.map +1 -0
- package/dist/esm/components/DToast/components/DToastBody.js +9 -0
- package/dist/esm/components/DToast/components/DToastBody.js.map +1 -0
- package/dist/esm/components/DToast/components/DToastHeader.js +9 -0
- package/dist/esm/components/DToast/components/DToastHeader.js.map +1 -0
- package/dist/esm/components/DToast/index.js +8 -0
- package/dist/esm/components/DToast/index.js.map +1 -0
- package/dist/esm/components/DToastContainer/DToastContainer.js +9 -0
- package/dist/esm/components/DToastContainer/DToastContainer.js.map +1 -0
- package/dist/esm/components/DToastContainer/index.js +7 -0
- package/dist/esm/components/DToastContainer/index.js.map +1 -0
- package/dist/esm/components/DToastContainer/useDToast.js +58 -0
- package/dist/esm/components/DToastContainer/useDToast.js.map +1 -0
- package/dist/esm/components/DTooltip/DTooltip.js +51 -0
- package/dist/esm/components/DTooltip/DTooltip.js.map +1 -0
- package/dist/esm/components/DTooltip/index.js +6 -0
- package/dist/esm/components/DTooltip/index.js.map +1 -0
- package/dist/esm/components/DVoucher/DVoucher.js +55 -0
- package/dist/esm/components/DVoucher/DVoucher.js.map +1 -0
- package/dist/esm/components/DVoucher/hooks/useScreenshot.js +30 -0
- package/dist/esm/components/DVoucher/hooks/useScreenshot.js.map +1 -0
- package/dist/esm/components/DVoucher/hooks/useScreenshotDownload.js +30 -0
- package/dist/esm/components/DVoucher/hooks/useScreenshotDownload.js.map +1 -0
- package/dist/esm/components/DVoucher/hooks/useScreenshotWebShare.js +27 -0
- package/dist/esm/components/DVoucher/hooks/useScreenshotWebShare.js.map +1 -0
- package/dist/esm/components/DVoucher/index.js +9 -0
- package/dist/esm/components/DVoucher/index.js.map +1 -0
- package/dist/esm/components/config.js +14 -0
- package/dist/esm/components/config.js.map +1 -0
- package/dist/esm/contexts/DContext.js +124 -0
- package/dist/esm/contexts/DContext.js.map +1 -0
- package/dist/esm/contexts/DPortalContext.js +128 -0
- package/dist/esm/contexts/DPortalContext.js.map +1 -0
- package/dist/esm/hooks/useConfirmModal.js +63 -0
- package/dist/esm/hooks/useConfirmModal.js.map +1 -0
- package/dist/esm/hooks/useCountdown.js +45 -0
- package/dist/esm/hooks/useCountdown.js.map +1 -0
- package/dist/esm/hooks/useDisableBodyScrollEffect.js +52 -0
- package/dist/esm/hooks/useDisableBodyScrollEffect.js.map +1 -0
- package/dist/esm/hooks/useDisableInputWheel.js +17 -0
- package/dist/esm/hooks/useDisableInputWheel.js.map +1 -0
- package/dist/esm/hooks/useFormatCurrency.js +16 -0
- package/dist/esm/hooks/useFormatCurrency.js.map +1 -0
- package/dist/esm/hooks/useInputCurrency.js +76 -0
- package/dist/esm/hooks/useInputCurrency.js.map +1 -0
- package/dist/esm/hooks/useItemSelection.js +35 -0
- package/dist/esm/hooks/useItemSelection.js.map +1 -0
- package/dist/esm/hooks/useMediaBreakpointUp.js +30 -0
- package/dist/esm/hooks/useMediaBreakpointUp.js.map +1 -0
- package/dist/esm/hooks/useMediaQuery.js +11 -0
- package/dist/esm/hooks/useMediaQuery.js.map +1 -0
- package/dist/esm/hooks/useOtp.js +107 -0
- package/dist/esm/hooks/useOtp.js.map +1 -0
- package/dist/esm/hooks/usePortal.js +26 -0
- package/dist/esm/hooks/usePortal.js.map +1 -0
- package/dist/esm/hooks/useProvidedRefOrCreate.js +24 -0
- package/dist/esm/hooks/useProvidedRefOrCreate.js.map +1 -0
- package/dist/esm/hooks/useResponsiveProp.js +50 -0
- package/dist/esm/hooks/useResponsiveProp.js.map +1 -0
- package/dist/esm/hooks/useStackState.js +40 -0
- package/dist/esm/hooks/useStackState.js.map +1 -0
- package/dist/esm/icons/coreIcons.js +55 -0
- package/dist/esm/icons/coreIcons.js.map +1 -0
- package/dist/esm/index.js +98 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/utils/attr-accept.js +38 -0
- package/dist/esm/utils/attr-accept.js.map +1 -0
- package/dist/esm/utils/buildUrl.js +57 -0
- package/dist/esm/utils/buildUrl.js.map +1 -0
- package/dist/esm/utils/changeQueryString.js +19 -0
- package/dist/esm/utils/changeQueryString.js.map +1 -0
- package/dist/esm/utils/configureI18n.js +20 -0
- package/dist/esm/utils/configureI18n.js.map +1 -0
- package/dist/esm/utils/formatCurrency.js +8 -0
- package/dist/esm/utils/formatCurrency.js.map +1 -0
- package/dist/esm/utils/getCssVariable.js +7 -0
- package/dist/esm/utils/getCssVariable.js.map +1 -0
- package/dist/esm/utils/getKeyboardFocusableElements.js +11 -0
- package/dist/esm/utils/getKeyboardFocusableElements.js.map +1 -0
- package/dist/esm/utils/getQueryString.js +8 -0
- package/dist/esm/utils/getQueryString.js.map +1 -0
- package/dist/esm/utils/mediaQuery.js +13 -0
- package/dist/esm/utils/mediaQuery.js.map +1 -0
- package/dist/esm/utils/sanitizeHref.js +67 -0
- package/dist/esm/utils/sanitizeHref.js.map +1 -0
- package/dist/esm/utils/validatePhoneNumber.js +14 -0
- package/dist/esm/utils/validatePhoneNumber.js.map +1 -0
- package/dist/icons-core.json +33 -0
- package/dist/index.esm.js +287 -22
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +287 -21
- package/dist/index.js.map +1 -1
- package/dist/types/components/DButtonIcon/warnMissingAccessibleName.d.ts +18 -0
- package/dist/types/components/DIcon/DIcon.d.ts +8 -0
- package/dist/types/components/DIconBase/DIconBase.d.ts +43 -1
- package/dist/types/components/DIconBase/resolveIconFromRegistry.d.ts +14 -0
- package/dist/types/components/DIconBase/warnUnknownIcon.d.ts +13 -0
- package/dist/types/components/DInputRange/DInputRange.d.ts +1 -1
- package/dist/types/components/config.d.ts +10 -0
- package/dist/types/icons/coreIcons.d.ts +24 -0
- package/dist/types/icons/index.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +4 -4
- package/dist/types/components/DVoucher/hooks/useScreenshotDownload.spec.d.ts +0 -1
- package/dist/types/components/DVoucher/hooks/useScreenshotWebShare.spec.d.ts +0 -1
- package/dist/types/hooks/tests/useCountdown.spec.d.ts +0 -1
- package/dist/types/hooks/tests/useDisableBodyScrollEffect.spec.d.ts +0 -1
- package/dist/types/hooks/tests/useDisableInputWheel.spec.d.ts +0 -1
- package/dist/types/hooks/tests/useFormatCurrency.spec.d.ts +0 -1
- package/dist/types/hooks/tests/useInputCurrency.spec.d.ts +0 -1
- package/dist/types/hooks/tests/useItemSelection.spec.d.ts +0 -1
- package/dist/types/hooks/tests/useMediaBreakpointUp.spec.d.ts +0 -1
- package/dist/types/hooks/tests/useMediaQuery.spec.d.ts +0 -1
- package/dist/types/hooks/tests/usePortal.spec.d.ts +0 -1
- package/dist/types/hooks/tests/useProvidedRefOrCreate.spec.d.ts +0 -1
- package/dist/types/hooks/tests/useStackState.spec.d.ts +0 -1
- package/dist/types/utils/tests/attr-accept.spec.d.ts +0 -1
- package/dist/types/utils/tests/buildUrl.spec.d.ts +0 -1
- package/dist/types/utils/tests/changeQueryString.spec.d.ts +0 -1
- package/dist/types/utils/tests/configureI18n.spec.d.ts +0 -1
- package/dist/types/utils/tests/formatCurrency.spec.d.ts +0 -1
- package/dist/types/utils/tests/getCssVariable.spec.d.ts +0 -1
- package/dist/types/utils/tests/getKeyboardFocusableElements.spec.d.ts +0 -1
- package/dist/types/utils/tests/getQueryString.spec.d.ts +0 -1
- package/dist/types/utils/tests/mediaQuery.spec.d.ts +0 -1
- package/dist/types/utils/tests/sanitizeHref.spec.d.ts +0 -1
- package/dist/types/utils/tests/validatePhoneNumber.spec.d.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -45,6 +45,16 @@ function _interopNamespaceDefault(e) {
|
|
|
45
45
|
var LucideIcons__namespace = /*#__PURE__*/_interopNamespaceDefault(LucideIcons);
|
|
46
46
|
|
|
47
47
|
const PREFIX_BS = 'bs-';
|
|
48
|
+
/**
|
|
49
|
+
* Default icon-font family configured by `DContextProvider`.
|
|
50
|
+
*
|
|
51
|
+
* `DIconBase` compares the family it receives against these values to tell an
|
|
52
|
+
* unconfigured consumer apart from one that deliberately opted into an icon
|
|
53
|
+
* font (Material Symbols, Bootstrap Icons). Only the former gets the
|
|
54
|
+
* development warning for an unresolved icon name.
|
|
55
|
+
*/
|
|
56
|
+
const DEFAULT_ICON_FAMILY_CLASS = 'bi';
|
|
57
|
+
const DEFAULT_ICON_FAMILY_PREFIX = 'bi-';
|
|
48
58
|
|
|
49
59
|
/* eslint-disable no-lonely-if */
|
|
50
60
|
function useDisableBodyScrollEffect(disable) {
|
|
@@ -326,8 +336,8 @@ const DEFAULT_STATE = {
|
|
|
326
336
|
decimal: '.',
|
|
327
337
|
},
|
|
328
338
|
icon: {
|
|
329
|
-
familyClass:
|
|
330
|
-
familyPrefix:
|
|
339
|
+
familyClass: DEFAULT_ICON_FAMILY_CLASS,
|
|
340
|
+
familyPrefix: DEFAULT_ICON_FAMILY_PREFIX,
|
|
331
341
|
materialStyle: false,
|
|
332
342
|
},
|
|
333
343
|
iconRegistry: undefined,
|
|
@@ -432,6 +442,79 @@ function useDContext() {
|
|
|
432
442
|
return React.useContext(DContext);
|
|
433
443
|
}
|
|
434
444
|
|
|
445
|
+
/**
|
|
446
|
+
* Resolves a string icon name against the registry supplied through
|
|
447
|
+
* `DContextProvider`'s `iconRegistry` prop.
|
|
448
|
+
*
|
|
449
|
+
* This is the single implementation shared by `DIcon` and `DIconBase`, so both
|
|
450
|
+
* public entry points — and every Dynamic UI component that renders an icon
|
|
451
|
+
* through them — resolve names identically.
|
|
452
|
+
*
|
|
453
|
+
* A non-string `icon` is returned untouched: a component passed directly needs
|
|
454
|
+
* no lookup. A name missing from the registry is also returned untouched, so
|
|
455
|
+
* the caller can fall through to lucide-react and then to the icon-font family.
|
|
456
|
+
*/
|
|
457
|
+
function resolveIconFromRegistry(icon, iconRegistry) {
|
|
458
|
+
if (typeof icon !== 'string')
|
|
459
|
+
return icon;
|
|
460
|
+
return (iconRegistry === null || iconRegistry === void 0 ? void 0 : iconRegistry[icon]) || icon;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Names already reported, so a name repeated across renders or across many
|
|
465
|
+
* instances only warns once per page load.
|
|
466
|
+
*/
|
|
467
|
+
const warnedIconNames = new Set();
|
|
468
|
+
/**
|
|
469
|
+
* True when the icon-font family is the one `DContextProvider` defaults to.
|
|
470
|
+
*
|
|
471
|
+
* The warning is limited to that case so a consumer who configured a different
|
|
472
|
+
* font — Material Symbols, for instance — is not told about names that font
|
|
473
|
+
* resolves perfectly well.
|
|
474
|
+
*
|
|
475
|
+
* It cannot tell "never configured a font" apart from "configured exactly the
|
|
476
|
+
* defaults", and those defaults are also the standard Bootstrap Icons setup, so
|
|
477
|
+
* a consumer who deliberately uses Bootstrap Icons is warned too. The message
|
|
478
|
+
* says so; silencing that case would need a new context flag, which is beyond
|
|
479
|
+
* what this helper should decide.
|
|
480
|
+
*/
|
|
481
|
+
function isDefaultIconFamily(familyClass, familyPrefix) {
|
|
482
|
+
return familyClass === DEFAULT_ICON_FAMILY_CLASS
|
|
483
|
+
&& familyPrefix === DEFAULT_ICON_FAMILY_PREFIX;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Warns, once per name and only outside production builds, that an icon name
|
|
487
|
+
* resolved to neither the registry nor lucide-react and is falling back to the
|
|
488
|
+
* default icon font, which this package no longer ships.
|
|
489
|
+
*
|
|
490
|
+
* Whether that fallback renders depends on the host app: if it loads the font
|
|
491
|
+
* itself the `<i>` shows the glyph, and if it does not, nothing appears. The
|
|
492
|
+
* message states both possibilities instead of assuming the second.
|
|
493
|
+
*
|
|
494
|
+
* The `process.env.NODE_ENV` guard is what bundlers constant-fold, so the whole
|
|
495
|
+
* call — and this module — drops out of a consumer's production bundle.
|
|
496
|
+
*/
|
|
497
|
+
function warnUnknownIcon(name, familyClass, familyPrefix) {
|
|
498
|
+
if (!isDefaultIconFamily(familyClass, familyPrefix))
|
|
499
|
+
return;
|
|
500
|
+
if (warnedIconNames.has(name))
|
|
501
|
+
return;
|
|
502
|
+
warnedIconNames.add(name);
|
|
503
|
+
const fallbackClass = `${DEFAULT_ICON_FAMILY_CLASS} ${DEFAULT_ICON_FAMILY_PREFIX}${name}`;
|
|
504
|
+
// eslint-disable-next-line no-console
|
|
505
|
+
console.warn(`[Dynamic UI] Icon "${name}" is not in the icon registry and is not a `
|
|
506
|
+
+ 'lucide-react export, so it falls back to the default icon font: '
|
|
507
|
+
+ `<i class="${fallbackClass}">. That renders only if your app loads that `
|
|
508
|
+
+ 'font, which this package stopped shipping in v2.0.0. '
|
|
509
|
+
+ 'If the icon is missing, pass a PascalCase lucide-react name such as '
|
|
510
|
+
+ '"Home", or register the component with '
|
|
511
|
+
+ '<DContextProvider iconRegistry={{ MyIcon }}>. '
|
|
512
|
+
+ `If you use the "${DEFAULT_ICON_FAMILY_CLASS}" font on purpose, this is a `
|
|
513
|
+
+ 'false positive: the warning fires whenever the configured family equals '
|
|
514
|
+
+ 'the package default, which is also the standard Bootstrap Icons setup. '
|
|
515
|
+
+ 'It never appears in production builds.');
|
|
516
|
+
}
|
|
517
|
+
|
|
435
518
|
function subscribeToMediaQuery(query, callback) {
|
|
436
519
|
const mediaQueryList = window.matchMedia(query);
|
|
437
520
|
mediaQueryList.addEventListener('change', callback);
|
|
@@ -521,7 +604,31 @@ function useResponsiveProp(useListener = false) {
|
|
|
521
604
|
function isIconComponent(value) {
|
|
522
605
|
return typeof value !== 'string' && reactIs.isValidElementType(value);
|
|
523
606
|
}
|
|
524
|
-
|
|
607
|
+
/**
|
|
608
|
+
* Renders an icon, resolving the `icon` prop in this order:
|
|
609
|
+
*
|
|
610
|
+
* 1. **Icon registry** — a string name found in `DContextProvider`'s
|
|
611
|
+
* `iconRegistry` renders the component registered under it. A component
|
|
612
|
+
* passed directly skips this step and renders as-is.
|
|
613
|
+
* 2. **lucide-react** — a PascalCase name exported by lucide-react renders that
|
|
614
|
+
* icon. When `materialStyle` is on, this step is skipped and the name is
|
|
615
|
+
* emitted as the text content of the icon-font element instead.
|
|
616
|
+
* 3. **Icon-font family** — anything left over renders as
|
|
617
|
+
* `<i class="{familyClass} {familyPrefix}{name}">`, the legacy path for
|
|
618
|
+
* Material Symbols and Bootstrap Icons. Outside production builds, a name
|
|
619
|
+
* that reaches this step while the family is still the package default logs
|
|
620
|
+
* a one-time warning.
|
|
621
|
+
*
|
|
622
|
+
* A name that resolves nowhere and has no family configured renders `?`.
|
|
623
|
+
*
|
|
624
|
+
* Every path is hidden from the accessibility tree by default (`aria-hidden`),
|
|
625
|
+
* since icons are overwhelmingly decorative. See `ariaHidden` / `ariaLabel` to
|
|
626
|
+
* override that for an icon that carries meaning on its own.
|
|
627
|
+
*/
|
|
628
|
+
function DIconBase({ icon: iconProp, color, style, className, size, useListenerSize = false, hasCircle = false, materialStyle = false, familyClass, familyPrefix, strokeWidth = 2, ariaHidden, ariaLabel, dataAttributes, }) {
|
|
629
|
+
const { iconRegistry } = useDContext();
|
|
630
|
+
// The registry wins over every other source, including Material icons.
|
|
631
|
+
const icon = resolveIconFromRegistry(iconProp, iconRegistry);
|
|
525
632
|
// If materialStyle is true, use Material Design icons (legacy)
|
|
526
633
|
const isStringIcon = typeof icon === 'string';
|
|
527
634
|
const useMaterialIcons = materialStyle && isStringIcon;
|
|
@@ -543,6 +650,61 @@ function DIconBase({ icon, color, style, className, size, useListenerSize = fals
|
|
|
543
650
|
}, [responsivePropValue, size]);
|
|
544
651
|
const generateStyleVariables = React.useMemo(() => (Object.assign(Object.assign(Object.assign({}, resolvedSize && { [`--${PREFIX_BS}icon-component-size`]: resolvedSize }), hasCircle && { [`--${PREFIX_BS}icon-component-padding`]: `calc(var(--${PREFIX_BS}icon-component-size, 24px) * 0.4)` }), style)), [resolvedSize, hasCircle, style]);
|
|
545
652
|
const generateClasses = React.useMemo(() => (Object.assign(Object.assign(Object.assign({ 'd-icon': true }, className && { [className]: true }), { 'd-icon-has-circle': hasCircle }), color && { [`d-icon-color-${color}`]: true })), [className, hasCircle, color]);
|
|
653
|
+
/**
|
|
654
|
+
* Decorative by default. `ariaHidden` and `ariaLabel` are not symmetric:
|
|
655
|
+
* hiding is absolute, so `ariaHidden` wins over a name, but `ariaHidden={false}`
|
|
656
|
+
* and `ariaLabel` agree — both expose the icon — and the name is honoured.
|
|
657
|
+
*/
|
|
658
|
+
const accessibilityProps = React.useMemo(() => {
|
|
659
|
+
// Hiding is absolute: it wins over a name.
|
|
660
|
+
if (ariaHidden === true)
|
|
661
|
+
return { 'aria-hidden': true };
|
|
662
|
+
// A name exposes the icon, which is also what `ariaHidden={false}` asks for.
|
|
663
|
+
if (ariaLabel)
|
|
664
|
+
return { role: 'img', 'aria-label': ariaLabel };
|
|
665
|
+
// Exposed with no name: an explicit opt-out of the default, warned about below.
|
|
666
|
+
if (ariaHidden === false)
|
|
667
|
+
return {};
|
|
668
|
+
return { 'aria-hidden': true };
|
|
669
|
+
}, [ariaHidden, ariaLabel]);
|
|
670
|
+
/**
|
|
671
|
+
* `dataAttributes` is typed to `data-*`, but casting through it was the only
|
|
672
|
+
* way to reach the DOM before `ariaHidden` existed, so it still wins over the
|
|
673
|
+
* computed values — and therefore decides the effective state below.
|
|
674
|
+
*/
|
|
675
|
+
const domAttributes = React.useMemo(() => (Object.assign(Object.assign({}, accessibilityProps), dataAttributes)), [accessibilityProps, dataAttributes]);
|
|
676
|
+
/**
|
|
677
|
+
* lucide-react hides its own `<svg>` unless it receives an a11y prop, and a
|
|
678
|
+
* registry component may do the same, which would keep the graphic out of the
|
|
679
|
+
* tree even when this wrapper is not hidden. Only matters when the icon is
|
|
680
|
+
* exposed without a name: under `role="img"` the wrapper is a leaf, so a
|
|
681
|
+
* hidden child changes nothing.
|
|
682
|
+
*
|
|
683
|
+
* A registry component that hardcodes `aria-hidden` on its own `<svg>` instead
|
|
684
|
+
* of spreading props still wins — nothing here can reach inside it.
|
|
685
|
+
*/
|
|
686
|
+
const isExposedWithoutName = React.useMemo(() => {
|
|
687
|
+
const attributes = domAttributes;
|
|
688
|
+
const hidden = attributes['aria-hidden'];
|
|
689
|
+
return hidden !== true && hidden !== 'true' && !attributes.role;
|
|
690
|
+
}, [domAttributes]);
|
|
691
|
+
/**
|
|
692
|
+
* Diagnostics read the effective state, so a `dataAttributes` override that
|
|
693
|
+
* hides the icon after all is not reported as exposing it. Memoised like the
|
|
694
|
+
* values above, so re-rendering with the same props does not repeat them.
|
|
695
|
+
*/
|
|
696
|
+
React.useMemo(() => {
|
|
697
|
+
if (process.env.NODE_ENV === 'production')
|
|
698
|
+
return;
|
|
699
|
+
if (ariaHidden === true && ariaLabel) {
|
|
700
|
+
// eslint-disable-next-line no-console
|
|
701
|
+
console.warn(`DIcon: ariaLabel "${ariaLabel}" is ignored because ariaHidden is true. Drop ariaHidden to expose the name.`);
|
|
702
|
+
}
|
|
703
|
+
if (ariaHidden === false && isExposedWithoutName) {
|
|
704
|
+
// eslint-disable-next-line no-console
|
|
705
|
+
console.warn('DIcon: ariaHidden={false} without an ariaLabel exposes an unnamed graphic to assistive technology. Pass ariaLabel to name it.');
|
|
706
|
+
}
|
|
707
|
+
}, [ariaHidden, ariaLabel, isExposedWithoutName]);
|
|
546
708
|
const iconSize = React.useMemo(() => {
|
|
547
709
|
if (resolvedSize) {
|
|
548
710
|
const numSize = parseInt(resolvedSize, 10);
|
|
@@ -552,35 +714,38 @@ function DIconBase({ icon, color, style, className, size, useListenerSize = fals
|
|
|
552
714
|
}, [resolvedSize]);
|
|
553
715
|
// Render Material Design icon (legacy support)
|
|
554
716
|
if (useMaterialIcons) {
|
|
555
|
-
return (jsxRuntime.jsx("i", Object.assign({ className: classNames(generateClasses, familyClass), style: generateStyleVariables },
|
|
717
|
+
return (jsxRuntime.jsx("i", Object.assign({ className: classNames(generateClasses, familyClass), style: generateStyleVariables }, domAttributes, { children: isStringIcon ? icon : null })));
|
|
556
718
|
}
|
|
557
719
|
if (isIconComponent(icon)) {
|
|
558
|
-
return (jsxRuntime.jsx("span", Object.assign({ className: classNames(generateClasses), style: generateStyleVariables },
|
|
559
|
-
width: resolvedSize || 24,
|
|
560
|
-
height: resolvedSize || 24,
|
|
561
|
-
strokeWidth,
|
|
562
|
-
}) })));
|
|
720
|
+
return (jsxRuntime.jsx("span", Object.assign({ className: classNames(generateClasses), style: generateStyleVariables }, domAttributes, { children: React.createElement(icon, Object.assign({ width: resolvedSize || 24, height: resolvedSize || 24, strokeWidth }, isExposedWithoutName && { 'aria-hidden': false })) })));
|
|
563
721
|
}
|
|
564
722
|
// Render Lucide icon
|
|
565
723
|
if (!LucideIcon) {
|
|
566
|
-
if (
|
|
567
|
-
|
|
724
|
+
if (typeof icon === 'string' && familyClass && familyPrefix) {
|
|
725
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
726
|
+
warnUnknownIcon(icon, familyClass, familyPrefix);
|
|
727
|
+
}
|
|
728
|
+
return (jsxRuntime.jsx("i", Object.assign({ className: classNames(generateClasses, familyClass, `${familyPrefix}${icon}`), style: generateStyleVariables }, domAttributes)));
|
|
568
729
|
}
|
|
569
730
|
// eslint-disable-next-line no-console
|
|
570
731
|
console.warn(`Icon "${String(icon)}" not found in Lucide. Make sure to use PascalCase names (e.g., "Home", "User", "Settings")`);
|
|
571
|
-
return (jsxRuntime.jsx("span", Object.assign({ className: classNames(generateClasses), style: generateStyleVariables },
|
|
732
|
+
return (jsxRuntime.jsx("span", Object.assign({ className: classNames(generateClasses), style: generateStyleVariables }, domAttributes, { children: "?" })));
|
|
572
733
|
}
|
|
573
|
-
return (jsxRuntime.jsx("span", Object.assign({ className: classNames(generateClasses), style: generateStyleVariables },
|
|
734
|
+
return (jsxRuntime.jsx("span", Object.assign({ className: classNames(generateClasses), style: generateStyleVariables }, domAttributes, { children: jsxRuntime.jsx(LucideIcon, Object.assign({ size: iconSize || 24, strokeWidth: strokeWidth }, isExposedWithoutName && { 'aria-hidden': false })) })));
|
|
574
735
|
}
|
|
575
736
|
|
|
737
|
+
/**
|
|
738
|
+
* Thin wrapper over `DIconBase` that fills the icon-font configuration
|
|
739
|
+
* (`familyClass`, `familyPrefix`, `materialStyle`) from `DContextProvider`
|
|
740
|
+
* whenever the caller does not pass it explicitly.
|
|
741
|
+
*
|
|
742
|
+
* Name resolution itself — registry, then lucide-react, then the icon-font
|
|
743
|
+
* family — lives in `DIconBase`, so both components behave identically.
|
|
744
|
+
*/
|
|
576
745
|
function DIcon(_a) {
|
|
577
746
|
var { icon, familyClass: propFamilyClass, familyPrefix: propFamilyPrefix, materialStyle: propMaterialStyle } = _a, props = tslib.__rest(_a, ["icon", "familyClass", "familyPrefix", "materialStyle"]);
|
|
578
|
-
const { icon: { familyClass, familyPrefix, materialStyle, },
|
|
579
|
-
|
|
580
|
-
? iconRegistry === null || iconRegistry === void 0 ? void 0 : iconRegistry[icon]
|
|
581
|
-
: undefined;
|
|
582
|
-
const resolvedIcon = registryIcon || icon;
|
|
583
|
-
return (jsxRuntime.jsx(DIconBase, Object.assign({ icon: resolvedIcon, familyClass: propFamilyClass !== null && propFamilyClass !== void 0 ? propFamilyClass : familyClass, familyPrefix: propFamilyPrefix !== null && propFamilyPrefix !== void 0 ? propFamilyPrefix : familyPrefix, materialStyle: propMaterialStyle !== null && propMaterialStyle !== void 0 ? propMaterialStyle : materialStyle }, props)));
|
|
747
|
+
const { icon: { familyClass, familyPrefix, materialStyle, }, } = useDContext();
|
|
748
|
+
return (jsxRuntime.jsx(DIconBase, Object.assign({ icon: icon, familyClass: propFamilyClass !== null && propFamilyClass !== void 0 ? propFamilyClass : familyClass, familyPrefix: propFamilyPrefix !== null && propFamilyPrefix !== void 0 ? propFamilyPrefix : familyPrefix, materialStyle: propMaterialStyle !== null && propMaterialStyle !== void 0 ? propMaterialStyle : materialStyle }, props)));
|
|
584
749
|
}
|
|
585
750
|
|
|
586
751
|
function DAlert({ color = 'success', icon: iconProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, iconClose: iconCloseProp, iconCloseFamilyClass, iconCloseFamilyPrefix, iconCloseMaterialStyle, showClose, onClose, children, id, className, style, dataAttributes, }) {
|
|
@@ -722,7 +887,7 @@ function DInput(_a, ref) {
|
|
|
722
887
|
[`input-group-${size}`]: !!size,
|
|
723
888
|
'input-group': true,
|
|
724
889
|
'has-validation': invalid || valid,
|
|
725
|
-
}), children: [!!inputStart && (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}InputStart`, children: inputStart })), iconStart && (onIconStartClick ? (jsxRuntime.jsx("button", { type: "button", className: "input-group-text", id: `${id}Start`, onClick: handleOnIconStartClick, disabled: disabled || loading || iconStartDisabled, "aria-label": iconStartAriaLabel || (typeof iconStart === 'string' ? iconStart : 'start icon'), tabIndex: iconStartTabIndex, children: jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass !== null && iconStartFamilyClass !== void 0 ? iconStartFamilyClass : familyClass, familyPrefix: iconStartFamilyPrefix !== null && iconStartFamilyPrefix !== void 0 ? iconStartFamilyPrefix : familyPrefix, materialStyle: iconStartMaterialStyle !== null && iconStartMaterialStyle !== void 0 ? iconStartMaterialStyle : materialStyle }) })) : (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}Start`,
|
|
890
|
+
}), children: [!!inputStart && (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}InputStart`, children: inputStart })), iconStart && (onIconStartClick ? (jsxRuntime.jsx("button", { type: "button", className: "input-group-text", id: `${id}Start`, onClick: handleOnIconStartClick, disabled: disabled || loading || iconStartDisabled, "aria-label": iconStartAriaLabel || (typeof iconStart === 'string' ? iconStart : 'start icon'), tabIndex: iconStartTabIndex, children: jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass !== null && iconStartFamilyClass !== void 0 ? iconStartFamilyClass : familyClass, familyPrefix: iconStartFamilyPrefix !== null && iconStartFamilyPrefix !== void 0 ? iconStartFamilyPrefix : familyPrefix, materialStyle: iconStartMaterialStyle !== null && iconStartMaterialStyle !== void 0 ? iconStartMaterialStyle : materialStyle }) })) : (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}Start`, tabIndex: -1, children: jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass !== null && iconStartFamilyClass !== void 0 ? iconStartFamilyClass : familyClass, familyPrefix: iconStartFamilyPrefix !== null && iconStartFamilyPrefix !== void 0 ? iconStartFamilyPrefix : familyPrefix, materialStyle: iconStartMaterialStyle !== null && iconStartMaterialStyle !== void 0 ? iconStartMaterialStyle : materialStyle }) }))), dynamicComponent, (iconEnd && !loading) && (onIconEndClick ? (jsxRuntime.jsx("button", { type: "button", className: "input-group-text", id: `${id}End`, onClick: handleOnIconEndClick, disabled: disabled || loading || iconEndDisabled, "aria-label": iconEndAriaLabel || (typeof iconEnd === 'string' ? iconEnd : 'end icon'), tabIndex: iconEndTabIndex, children: jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass !== null && iconEndFamilyClass !== void 0 ? iconEndFamilyClass : familyClass, familyPrefix: iconEndFamilyPrefix !== null && iconEndFamilyPrefix !== void 0 ? iconEndFamilyPrefix : familyPrefix, materialStyle: iconEndMaterialStyle !== null && iconEndMaterialStyle !== void 0 ? iconEndMaterialStyle : materialStyle }) })) : (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}End`, tabIndex: -1, children: jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass !== null && iconEndFamilyClass !== void 0 ? iconEndFamilyClass : familyClass, familyPrefix: iconEndFamilyPrefix !== null && iconEndFamilyPrefix !== void 0 ? iconEndFamilyPrefix : familyPrefix, materialStyle: iconEndMaterialStyle !== null && iconEndMaterialStyle !== void 0 ? iconEndMaterialStyle : materialStyle }) }))), loading && (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}Loading`, children: jsxRuntime.jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", "data-testid": "loading-spinner", children: jsxRuntime.jsx("span", { className: "visually-hidden", children: "Loading..." }) }) })), !!inputEnd && (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}InputEnd`, children: inputEnd }))] }), hint && (jsxRuntime.jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] })));
|
|
726
891
|
}
|
|
727
892
|
const ForwardedDInput = React.forwardRef(DInput);
|
|
728
893
|
ForwardedDInput.displayName = 'DInput';
|
|
@@ -1205,6 +1370,44 @@ const DButton = React.forwardRef((props, ref) => {
|
|
|
1205
1370
|
});
|
|
1206
1371
|
DButton.displayName = 'DButton';
|
|
1207
1372
|
|
|
1373
|
+
/**
|
|
1374
|
+
* Controls already reported, keyed by kind and icon, so the same unlabelled one
|
|
1375
|
+
* only warns once per page load however often it re-renders or however many
|
|
1376
|
+
* instances exist.
|
|
1377
|
+
*/
|
|
1378
|
+
const warnedControls = new Set();
|
|
1379
|
+
/**
|
|
1380
|
+
* Warns, once per icon and only outside production builds, that an icon-only
|
|
1381
|
+
* button has no accessible name.
|
|
1382
|
+
*
|
|
1383
|
+
* The control has no text to fall back on and its icon is hidden from the
|
|
1384
|
+
* accessibility tree, so the name has to be given explicitly. `aria-label` is
|
|
1385
|
+
* the direct way; on a button `aria-labelledby` and `title` count too, since
|
|
1386
|
+
* `rest` reaches the DOM there, while an anchor drops them — hence `kind`, so
|
|
1387
|
+
* the advice matches what the element can actually receive.
|
|
1388
|
+
*
|
|
1389
|
+
* A legacy icon-font icon used to leak its ligature as the name by accident —
|
|
1390
|
+
* never a good one, being unlocalised and often meaningless ("more_vert") — and
|
|
1391
|
+
* no longer does, so the omission is now visible instead of silent.
|
|
1392
|
+
*
|
|
1393
|
+
* The `process.env.NODE_ENV` guard is what bundlers constant-fold, so the whole
|
|
1394
|
+
* call — and this module — drops out of a consumer's production bundle.
|
|
1395
|
+
*/
|
|
1396
|
+
function warnMissingAccessibleName(icon, kind) {
|
|
1397
|
+
const key = `${kind}:${icon}`;
|
|
1398
|
+
if (warnedControls.has(key))
|
|
1399
|
+
return;
|
|
1400
|
+
warnedControls.add(key);
|
|
1401
|
+
const alternatives = kind === 'button'
|
|
1402
|
+
? 'On a button, aria-labelledby or title work too. '
|
|
1403
|
+
: 'A link renders from the href branch, which does not forward aria-labelledby or title, so aria-label is the only option. ';
|
|
1404
|
+
// eslint-disable-next-line no-console
|
|
1405
|
+
console.warn(`[Dynamic UI] DButtonIcon: the "${icon}" ${kind} has no accessible name. `
|
|
1406
|
+
+ 'Pass aria-label, since an icon-only control has no text to fall back on '
|
|
1407
|
+
+ `and its icon is hidden from the accessibility tree. ${alternatives}`
|
|
1408
|
+
+ 'It never appears in production builds.');
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1208
1411
|
function DButtonIcon(_a) {
|
|
1209
1412
|
var { id, icon, size, className, variant, state, loadingAriaLabel, iconMaterialStyle, disabled = false, color = 'primary', loading = false, href, target, rel, stopPropagationEnabled = true, style, iconFamilyClass, iconFamilyPrefix, dataAttributes, onClick, 'aria-label': ariaLabelProp } = _a, rest = tslib.__rest(_a, ["id", "icon", "size", "className", "variant", "state", "loadingAriaLabel", "iconMaterialStyle", "disabled", "color", "loading", "href", "target", "rel", "stopPropagationEnabled", "style", "iconFamilyClass", "iconFamilyPrefix", "dataAttributes", "onClick", 'aria-label']);
|
|
1210
1413
|
const { icon: { familyClass, familyPrefix, materialStyle, }, } = useDContext();
|
|
@@ -1228,6 +1431,15 @@ function DButtonIcon(_a) {
|
|
|
1228
1431
|
const ariaLabel = React.useMemo(() => (loading
|
|
1229
1432
|
? loadingAriaLabel || ariaLabelProp
|
|
1230
1433
|
: ariaLabelProp), [loading, loadingAriaLabel, ariaLabelProp]);
|
|
1434
|
+
/**
|
|
1435
|
+
* `aria-labelledby` and `title` also name a control, but they travel in `rest`,
|
|
1436
|
+
* which only the button branch spreads — an anchor drops them, so there the
|
|
1437
|
+
* button really is unnamed and the warning still applies.
|
|
1438
|
+
*/
|
|
1439
|
+
const hasAccessibleName = React.useMemo(() => !!ariaLabel || (!href && (!!rest['aria-labelledby'] || !!rest.title)), [ariaLabel, href, rest]);
|
|
1440
|
+
if (process.env.NODE_ENV !== 'production' && !hasAccessibleName) {
|
|
1441
|
+
warnMissingAccessibleName(icon, href ? 'link' : 'button');
|
|
1442
|
+
}
|
|
1231
1443
|
if (href) {
|
|
1232
1444
|
return (jsxRuntime.jsx("a", Object.assign({ id: id, href: href, target: target, rel: rel, className: classNames(generateClasses, className), style: style, onClick: clickHandler, "aria-label": ariaLabel, "aria-disabled": isDisabled }, dataAttributes, { children: loading
|
|
1233
1445
|
? (jsxRuntime.jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsxRuntime.jsx("span", { className: "visually-hidden", children: "Loading..." }) }))
|
|
@@ -2717,7 +2929,7 @@ function DTooltip({ className, childrenClassName, style, offSet = ARROW_HEIGHT +
|
|
|
2717
2929
|
function DTimeline({ className, style, dataAttributes, items, }) {
|
|
2718
2930
|
return (jsxRuntime.jsx("div", Object.assign({ style: style, className: classNames('d-timeline', className) }, dataAttributes, { children: items.map((item, index) => (jsxRuntime.jsxs("div", { className: classNames('d-timeline-item', {
|
|
2719
2931
|
[`d-timeline-item-${item.status}`]: item.status,
|
|
2720
|
-
}), children: [jsxRuntime.jsx("div", { className: "d-timeline-item-connector" }), jsxRuntime.jsx("div", { className: "d-timeline-item-icon", children: jsxRuntime.jsx(DIcon, { icon: item.icon || '
|
|
2932
|
+
}), children: [jsxRuntime.jsx("div", { className: "d-timeline-item-connector" }), jsxRuntime.jsx("div", { className: "d-timeline-item-icon", children: jsxRuntime.jsx(DIcon, { icon: item.icon || 'Check', size: "1rem" }) }), jsxRuntime.jsxs("div", { className: "d-timeline-item-content", children: [jsxRuntime.jsx("div", { className: "d-timeline-item-title", children: item.title }), item.description && jsxRuntime.jsx("div", { className: "d-timeline-item-description", children: item.description }), item.time && jsxRuntime.jsx("div", { className: "d-timeline-item-time", children: item.time }), item.children] })] }, index))) })));
|
|
2721
2933
|
}
|
|
2722
2934
|
|
|
2723
2935
|
const TabContext = React.createContext(undefined);
|
|
@@ -3762,6 +3974,59 @@ function DConfirmModalContainer({ nodeId }) {
|
|
|
3762
3974
|
return reactDom.createPortal(jsxRuntime.jsx(framerMotion.AnimatePresence, { children: entries.map((entry) => (jsxRuntime.jsxs(framerMotion.motion.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0, transition: { delay: 0.3 } }, transition: { duration: 0.15, ease: 'linear' }, children: [jsxRuntime.jsx("div", { className: "backdrop backdrop-confirm-modal", onClick: entry.onCloseAction, role: "presentation" }), jsxRuntime.jsx(DConfirmModalUI, { entry: entry })] }, entry.id))) }), portalNode);
|
|
3763
3975
|
}
|
|
3764
3976
|
|
|
3977
|
+
/**
|
|
3978
|
+
* The lucide-react icons Dynamic UI renders on its own, without the consumer
|
|
3979
|
+
* asking for them by name.
|
|
3980
|
+
*
|
|
3981
|
+
* Two sources feed this list:
|
|
3982
|
+
*
|
|
3983
|
+
* - The `iconMap` defaults of `DContextProvider` (`src/contexts/DContext.tsx`),
|
|
3984
|
+
* used by close buttons, chevrons, alert states, input adornments and the
|
|
3985
|
+
* stepper checkmark.
|
|
3986
|
+
* - Names hard-coded in component JSX or in a prop default, such as
|
|
3987
|
+
* `DDropdown`'s toggle or `DVoucher`'s action buttons.
|
|
3988
|
+
*
|
|
3989
|
+
* Any bundler-level optimisation that narrows lucide-react down to the icons a
|
|
3990
|
+
* widget actually uses must keep this set, or Dynamic UI components break for
|
|
3991
|
+
* reasons the widget author cannot see in their own source. That is why the
|
|
3992
|
+
* list ships in the package as `dist/icons-core.json` and is exported here.
|
|
3993
|
+
*
|
|
3994
|
+
* `src/icons/coreIcons.spec.ts` scans `src/components/**` and fails when an
|
|
3995
|
+
* internally used icon name is missing from this list or absent from
|
|
3996
|
+
* lucide-react, so the two cannot drift apart.
|
|
3997
|
+
*/
|
|
3998
|
+
const CORE_LUCIDE_ICONS = [
|
|
3999
|
+
// iconMap defaults — src/contexts/DContext.tsx
|
|
4000
|
+
'AlertCircle',
|
|
4001
|
+
'AlertTriangle',
|
|
4002
|
+
'Calendar',
|
|
4003
|
+
'Check',
|
|
4004
|
+
'CheckCircle',
|
|
4005
|
+
'ChevronDown',
|
|
4006
|
+
'ChevronLeft',
|
|
4007
|
+
'ChevronRight',
|
|
4008
|
+
'ChevronUp',
|
|
4009
|
+
'Eye',
|
|
4010
|
+
'EyeOff',
|
|
4011
|
+
'Info',
|
|
4012
|
+
'Minus',
|
|
4013
|
+
'Plus',
|
|
4014
|
+
'Search',
|
|
4015
|
+
'Upload',
|
|
4016
|
+
'X',
|
|
4017
|
+
// Hard-coded in component JSX or in a prop default
|
|
4018
|
+
'Circle',
|
|
4019
|
+
'CircleCheck',
|
|
4020
|
+
'CircleCheckBig',
|
|
4021
|
+
'Download',
|
|
4022
|
+
'FileText',
|
|
4023
|
+
'MoreVertical',
|
|
4024
|
+
'Paperclip',
|
|
4025
|
+
'RefreshCw',
|
|
4026
|
+
'Share2',
|
|
4027
|
+
'Trash',
|
|
4028
|
+
];
|
|
4029
|
+
|
|
3765
4030
|
Object.defineProperty(exports, "getErrorMessage", {
|
|
3766
4031
|
enumerable: true,
|
|
3767
4032
|
get: function () { return reactErrorBoundary.getErrorMessage; }
|
|
@@ -3770,6 +4035,7 @@ Object.defineProperty(exports, "useErrorBoundary", {
|
|
|
3770
4035
|
enumerable: true,
|
|
3771
4036
|
get: function () { return reactErrorBoundary.useErrorBoundary; }
|
|
3772
4037
|
});
|
|
4038
|
+
exports.CORE_LUCIDE_ICONS = CORE_LUCIDE_ICONS;
|
|
3773
4039
|
exports.DAlert = DAlert;
|
|
3774
4040
|
exports.DAvatar = DAvatar;
|
|
3775
4041
|
exports.DBadge = DBadge;
|