@veracity/vui 0.7.0-beta.1 → 0.7.0-beta.2
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/cjs/button/button.js +1 -1
- package/dist/cjs/button/buttonIcon.d.ts.map +1 -1
- package/dist/cjs/button/buttonIcon.js +15 -2
- package/dist/cjs/button/buttonText.d.ts.map +1 -1
- package/dist/cjs/button/buttonText.js +15 -2
- package/dist/cjs/button/context.d.ts +2 -2
- package/dist/cjs/button/context.d.ts.map +1 -1
- package/dist/cjs/button/context.js +3 -3
- package/dist/cjs/buttonGroup/context.d.ts +2 -2
- package/dist/cjs/buttonGroup/context.d.ts.map +1 -1
- package/dist/cjs/buttonGroup/context.js +3 -3
- package/dist/cjs/checkbox/checkbox.js +1 -1
- package/dist/cjs/checkbox/context.d.ts +2 -2
- package/dist/cjs/checkbox/context.d.ts.map +1 -1
- package/dist/cjs/checkbox/context.js +3 -3
- package/dist/cjs/core/links.d.ts.map +1 -1
- package/dist/cjs/core/links.js +26 -25
- package/dist/cjs/dialog/dialogBody.d.ts.map +1 -1
- package/dist/cjs/dialog/dialogBody.js +13 -1
- package/dist/cjs/dialog/dialogCancelButton.d.ts.map +1 -1
- package/dist/cjs/dialog/dialogCancelButton.js +14 -1
- package/dist/cjs/dialog/dialogCloseButton.d.ts.map +1 -1
- package/dist/cjs/dialog/dialogCloseButton.js +14 -1
- package/dist/cjs/dialog/dialogFooter.d.ts.map +1 -1
- package/dist/cjs/dialog/dialogFooter.js +2 -2
- package/dist/cjs/dialog/dialogHeader.js +2 -2
- package/dist/cjs/dialog/dialogIcon.d.ts.map +1 -1
- package/dist/cjs/dialog/dialogIcon.js +14 -1
- package/dist/cjs/dialog/dialogSubmitButton.d.ts.map +1 -1
- package/dist/cjs/dialog/dialogSubmitButton.js +14 -1
- package/dist/cjs/dialog/dialogTitle.d.ts.map +1 -1
- package/dist/cjs/dialog/dialogTitle.js +14 -1
- package/dist/cjs/footer/footerColumn.d.ts.map +1 -1
- package/dist/cjs/footer/footerColumn.js +3 -2
- package/dist/cjs/footer/footerContent.d.ts.map +1 -1
- package/dist/cjs/footer/footerContent.js +14 -1
- package/dist/cjs/footer/footerHeading.d.ts.map +1 -1
- package/dist/cjs/footer/footerHeading.js +14 -1
- package/dist/cjs/footer/footerLink.d.ts.map +1 -1
- package/dist/cjs/footer/footerLink.js +14 -1
- package/dist/cjs/footer/footerRow.d.ts.map +1 -1
- package/dist/cjs/footer/footerRow.js +14 -1
- package/dist/cjs/footer/footerSection.js +2 -2
- package/dist/cjs/footer/footerTrademark.d.ts.map +1 -1
- package/dist/cjs/footer/footerTrademark.js +3 -2
- package/dist/cjs/header/headerAccount.d.ts.map +1 -1
- package/dist/cjs/header/headerAccount.js +5 -5
- package/dist/cjs/header/headerAccount.types.d.ts +1 -1
- package/dist/cjs/header/headerAccount.types.d.ts.map +1 -1
- package/dist/cjs/header/headerAccountUserInfo.d.ts.map +1 -1
- package/dist/cjs/header/headerAccountUserInfo.js +5 -4
- package/dist/cjs/header/headerContent.d.ts.map +1 -1
- package/dist/cjs/header/headerContent.js +14 -1
- package/dist/cjs/header/headerCreateAccount.d.ts.map +1 -1
- package/dist/cjs/header/headerCreateAccount.js +3 -2
- package/dist/cjs/header/headerDivider.d.ts.map +1 -1
- package/dist/cjs/header/headerDivider.js +14 -1
- package/dist/cjs/header/headerLogo.d.ts.map +1 -1
- package/dist/cjs/header/headerLogo.js +3 -2
- package/dist/cjs/header/headerMainLinks.d.ts.map +1 -1
- package/dist/cjs/header/headerMainLinks.js +3 -2
- package/dist/cjs/header/headerMobileContent.d.ts.map +1 -1
- package/dist/cjs/header/headerMobileContent.js +13 -1
- package/dist/cjs/header/headerMobileToggle.d.ts.map +1 -1
- package/dist/cjs/header/headerMobileToggle.js +13 -1
- package/dist/cjs/header/headerNotifications.d.ts.map +1 -1
- package/dist/cjs/header/headerNotifications.js +3 -2
- package/dist/cjs/header/headerServices.js +2 -2
- package/dist/cjs/header/headerServicesMessage.d.ts.map +1 -1
- package/dist/cjs/header/headerServicesMessage.js +3 -2
- package/dist/cjs/header/headerSignIn.d.ts.map +1 -1
- package/dist/cjs/header/headerSignIn.js +3 -2
- package/dist/cjs/input/context.d.ts +2 -2
- package/dist/cjs/input/context.d.ts.map +1 -1
- package/dist/cjs/input/context.js +3 -3
- package/dist/cjs/input/input.js +1 -1
- package/dist/cjs/input/inputIcon.d.ts.map +1 -1
- package/dist/cjs/input/inputIcon.js +15 -2
- package/dist/cjs/input/inputInput.d.ts.map +1 -1
- package/dist/cjs/input/inputInput.js +14 -2
- package/dist/cjs/link/context.d.ts +2 -2
- package/dist/cjs/link/context.d.ts.map +1 -1
- package/dist/cjs/link/context.js +3 -3
- package/dist/cjs/link/linkIcon.d.ts.map +1 -1
- package/dist/cjs/link/linkIcon.js +15 -2
- package/dist/cjs/link/linkText.d.ts.map +1 -1
- package/dist/cjs/link/linkText.js +15 -2
- package/dist/cjs/list/context.d.ts +2 -2
- package/dist/cjs/list/context.d.ts.map +1 -1
- package/dist/cjs/list/context.js +3 -3
- package/dist/cjs/list/listDivider.d.ts.map +1 -1
- package/dist/cjs/list/listDivider.js +15 -2
- package/dist/cjs/list/listHeading.d.ts.map +1 -1
- package/dist/cjs/list/listHeading.js +15 -2
- package/dist/cjs/list/listIcon.d.ts.map +1 -1
- package/dist/cjs/list/listIcon.js +15 -2
- package/dist/cjs/list/listItem.d.ts.map +1 -1
- package/dist/cjs/list/listItem.js +3 -3
- package/dist/cjs/list/listText.d.ts.map +1 -1
- package/dist/cjs/list/listText.js +15 -2
- package/dist/cjs/menu/menuButton.d.ts.map +1 -1
- package/dist/cjs/menu/menuButton.js +15 -2
- package/dist/cjs/menu/menuItem.d.ts.map +1 -1
- package/dist/cjs/menu/menuItem.js +2 -2
- package/dist/cjs/menu/menuList.d.ts.map +1 -1
- package/dist/cjs/menu/menuList.js +4 -3
- package/dist/cjs/modal/modalBackdrop.d.ts.map +1 -1
- package/dist/cjs/modal/modalBackdrop.js +13 -1
- package/dist/cjs/modal/modalContent.d.ts.map +1 -1
- package/dist/cjs/modal/modalContent.js +13 -1
- package/dist/cjs/notification/context.d.ts +2 -2
- package/dist/cjs/notification/context.d.ts.map +1 -1
- package/dist/cjs/notification/context.js +3 -3
- package/dist/cjs/notification/notificationButton.d.ts.map +1 -1
- package/dist/cjs/notification/notificationButton.js +16 -3
- package/dist/cjs/notification/notificationIcon.d.ts.map +1 -1
- package/dist/cjs/notification/notificationIcon.js +16 -3
- package/dist/cjs/notification/notificationText.d.ts.map +1 -1
- package/dist/cjs/notification/notificationText.js +15 -2
- package/dist/cjs/notification/notificationTitle.d.ts.map +1 -1
- package/dist/cjs/notification/notificationTitle.js +15 -2
- package/dist/cjs/pagination/helpers.d.ts.map +1 -1
- package/dist/cjs/pagination/helpers.js +30 -12
- package/dist/cjs/pagination/paginationButton.d.ts.map +1 -1
- package/dist/cjs/pagination/paginationButton.js +3 -2
- package/dist/cjs/pagination/paginationEllipsis.d.ts.map +1 -1
- package/dist/cjs/pagination/paginationEllipsis.js +3 -2
- package/dist/cjs/pagination/paginationGoToPage.d.ts.map +1 -1
- package/dist/cjs/pagination/paginationGoToPage.js +14 -1
- package/dist/cjs/pagination/paginationNavigation.js +2 -2
- package/dist/cjs/pagination/paginationPrevNext.d.ts.map +1 -1
- package/dist/cjs/pagination/paginationPrevNext.js +3 -2
- package/dist/cjs/pagination/paginationResults.d.ts.map +1 -1
- package/dist/cjs/pagination/paginationResults.js +3 -2
- package/dist/cjs/popover/popoverContent.js +2 -2
- package/dist/cjs/popover/popoverTrigger.js +3 -3
- package/dist/cjs/radio/context.d.ts +2 -2
- package/dist/cjs/radio/context.d.ts.map +1 -1
- package/dist/cjs/radio/context.js +3 -3
- package/dist/cjs/radio/radio.js +1 -1
- package/dist/cjs/spinner/consts.d.ts +0 -12
- package/dist/cjs/spinner/consts.d.ts.map +1 -1
- package/dist/cjs/spinner/consts.js +4 -8
- package/dist/cjs/spinner/spinner.js +2 -2
- package/dist/cjs/switch/context.d.ts +2 -2
- package/dist/cjs/switch/context.d.ts.map +1 -1
- package/dist/cjs/switch/context.js +3 -3
- package/dist/cjs/switch/switchButton.js +2 -2
- package/dist/cjs/switch/switchLabel.d.ts.map +1 -1
- package/dist/cjs/switch/switchLabel.js +15 -2
- package/dist/cjs/tag/context.d.ts +2 -2
- package/dist/cjs/tag/context.d.ts.map +1 -1
- package/dist/cjs/tag/context.js +3 -3
- package/dist/cjs/tag/tagButton.d.ts.map +1 -1
- package/dist/cjs/tag/tagButton.js +16 -3
- package/dist/cjs/tag/tagIcon.d.ts.map +1 -1
- package/dist/cjs/tag/tagIcon.js +15 -2
- package/dist/cjs/tag/tagText.d.ts.map +1 -1
- package/dist/cjs/tag/tagText.js +15 -2
- package/dist/cjs/textarea/textarea.js +1 -1
- package/dist/cjs/utils/react.d.ts +2 -2
- package/dist/cjs/utils/react.d.ts.map +1 -1
- package/dist/cjs/utils/react.js +2 -2
- package/dist/esm/button/button.js +2 -2
- package/dist/esm/button/buttonIcon.d.ts.map +1 -1
- package/dist/esm/button/buttonIcon.js +5 -3
- package/dist/esm/button/buttonText.d.ts.map +1 -1
- package/dist/esm/button/buttonText.js +5 -3
- package/dist/esm/button/context.d.ts +2 -2
- package/dist/esm/button/context.d.ts.map +1 -1
- package/dist/esm/button/context.js +2 -2
- package/dist/esm/buttonGroup/context.d.ts +2 -2
- package/dist/esm/buttonGroup/context.d.ts.map +1 -1
- package/dist/esm/buttonGroup/context.js +2 -2
- package/dist/esm/checkbox/checkbox.js +2 -2
- package/dist/esm/checkbox/context.d.ts +2 -2
- package/dist/esm/checkbox/context.d.ts.map +1 -1
- package/dist/esm/checkbox/context.js +2 -2
- package/dist/esm/core/links.d.ts.map +1 -1
- package/dist/esm/core/links.js +18 -15
- package/dist/esm/dialog/dialogBody.d.ts.map +1 -1
- package/dist/esm/dialog/dialogBody.js +3 -2
- package/dist/esm/dialog/dialogCancelButton.d.ts.map +1 -1
- package/dist/esm/dialog/dialogCancelButton.js +3 -1
- package/dist/esm/dialog/dialogCloseButton.d.ts.map +1 -1
- package/dist/esm/dialog/dialogCloseButton.js +3 -1
- package/dist/esm/dialog/dialogFooter.d.ts.map +1 -1
- package/dist/esm/dialog/dialogFooter.js +3 -3
- package/dist/esm/dialog/dialogHeader.js +3 -3
- package/dist/esm/dialog/dialogIcon.d.ts.map +1 -1
- package/dist/esm/dialog/dialogIcon.js +3 -1
- package/dist/esm/dialog/dialogSubmitButton.d.ts.map +1 -1
- package/dist/esm/dialog/dialogSubmitButton.js +3 -1
- package/dist/esm/dialog/dialogTitle.d.ts.map +1 -1
- package/dist/esm/dialog/dialogTitle.js +3 -1
- package/dist/esm/footer/footerColumn.d.ts.map +1 -1
- package/dist/esm/footer/footerColumn.js +3 -2
- package/dist/esm/footer/footerContent.d.ts.map +1 -1
- package/dist/esm/footer/footerContent.js +3 -1
- package/dist/esm/footer/footerHeading.d.ts.map +1 -1
- package/dist/esm/footer/footerHeading.js +3 -1
- package/dist/esm/footer/footerLink.d.ts.map +1 -1
- package/dist/esm/footer/footerLink.js +3 -1
- package/dist/esm/footer/footerRow.d.ts.map +1 -1
- package/dist/esm/footer/footerRow.js +3 -1
- package/dist/esm/footer/footerSection.js +3 -3
- package/dist/esm/footer/footerTrademark.d.ts.map +1 -1
- package/dist/esm/footer/footerTrademark.js +3 -2
- package/dist/esm/header/headerAccount.d.ts.map +1 -1
- package/dist/esm/header/headerAccount.js +5 -5
- package/dist/esm/header/headerAccount.types.d.ts +1 -1
- package/dist/esm/header/headerAccount.types.d.ts.map +1 -1
- package/dist/esm/header/headerAccountUserInfo.d.ts.map +1 -1
- package/dist/esm/header/headerAccountUserInfo.js +5 -4
- package/dist/esm/header/headerContent.d.ts.map +1 -1
- package/dist/esm/header/headerContent.js +3 -1
- package/dist/esm/header/headerCreateAccount.d.ts.map +1 -1
- package/dist/esm/header/headerCreateAccount.js +3 -2
- package/dist/esm/header/headerDivider.d.ts.map +1 -1
- package/dist/esm/header/headerDivider.js +3 -1
- package/dist/esm/header/headerLogo.d.ts.map +1 -1
- package/dist/esm/header/headerLogo.js +3 -2
- package/dist/esm/header/headerMainLinks.d.ts.map +1 -1
- package/dist/esm/header/headerMainLinks.js +3 -2
- package/dist/esm/header/headerMobileContent.d.ts.map +1 -1
- package/dist/esm/header/headerMobileContent.js +3 -2
- package/dist/esm/header/headerMobileToggle.d.ts.map +1 -1
- package/dist/esm/header/headerMobileToggle.js +3 -2
- package/dist/esm/header/headerNotifications.d.ts.map +1 -1
- package/dist/esm/header/headerNotifications.js +3 -2
- package/dist/esm/header/headerServices.js +2 -2
- package/dist/esm/header/headerServicesMessage.d.ts.map +1 -1
- package/dist/esm/header/headerServicesMessage.js +3 -2
- package/dist/esm/header/headerSignIn.d.ts.map +1 -1
- package/dist/esm/header/headerSignIn.js +3 -2
- package/dist/esm/input/context.d.ts +2 -2
- package/dist/esm/input/context.d.ts.map +1 -1
- package/dist/esm/input/context.js +2 -2
- package/dist/esm/input/input.js +1 -1
- package/dist/esm/input/inputIcon.d.ts.map +1 -1
- package/dist/esm/input/inputIcon.js +5 -3
- package/dist/esm/input/inputInput.d.ts.map +1 -1
- package/dist/esm/input/inputInput.js +5 -4
- package/dist/esm/link/context.d.ts +2 -2
- package/dist/esm/link/context.d.ts.map +1 -1
- package/dist/esm/link/context.js +2 -2
- package/dist/esm/link/linkIcon.d.ts.map +1 -1
- package/dist/esm/link/linkIcon.js +5 -3
- package/dist/esm/link/linkText.d.ts.map +1 -1
- package/dist/esm/link/linkText.js +5 -3
- package/dist/esm/list/context.d.ts +2 -2
- package/dist/esm/list/context.d.ts.map +1 -1
- package/dist/esm/list/context.js +2 -2
- package/dist/esm/list/listDivider.d.ts.map +1 -1
- package/dist/esm/list/listDivider.js +5 -3
- package/dist/esm/list/listHeading.d.ts.map +1 -1
- package/dist/esm/list/listHeading.js +5 -3
- package/dist/esm/list/listIcon.d.ts.map +1 -1
- package/dist/esm/list/listIcon.js +5 -3
- package/dist/esm/list/listItem.d.ts.map +1 -1
- package/dist/esm/list/listItem.js +4 -4
- package/dist/esm/list/listText.d.ts.map +1 -1
- package/dist/esm/list/listText.js +5 -3
- package/dist/esm/menu/menuButton.d.ts.map +1 -1
- package/dist/esm/menu/menuButton.js +4 -2
- package/dist/esm/menu/menuItem.d.ts.map +1 -1
- package/dist/esm/menu/menuItem.js +3 -3
- package/dist/esm/menu/menuList.d.ts.map +1 -1
- package/dist/esm/menu/menuList.js +4 -3
- package/dist/esm/modal/modalBackdrop.d.ts.map +1 -1
- package/dist/esm/modal/modalBackdrop.js +3 -2
- package/dist/esm/modal/modalContent.d.ts.map +1 -1
- package/dist/esm/modal/modalContent.js +3 -2
- package/dist/esm/notification/context.d.ts +2 -2
- package/dist/esm/notification/context.d.ts.map +1 -1
- package/dist/esm/notification/context.js +2 -2
- package/dist/esm/notification/notificationButton.d.ts.map +1 -1
- package/dist/esm/notification/notificationButton.js +6 -4
- package/dist/esm/notification/notificationIcon.d.ts.map +1 -1
- package/dist/esm/notification/notificationIcon.js +6 -4
- package/dist/esm/notification/notificationText.d.ts.map +1 -1
- package/dist/esm/notification/notificationText.js +5 -3
- package/dist/esm/notification/notificationTitle.d.ts.map +1 -1
- package/dist/esm/notification/notificationTitle.js +5 -3
- package/dist/esm/pagination/helpers.d.ts.map +1 -1
- package/dist/esm/pagination/helpers.js +30 -12
- package/dist/esm/pagination/paginationButton.d.ts.map +1 -1
- package/dist/esm/pagination/paginationButton.js +3 -2
- package/dist/esm/pagination/paginationEllipsis.d.ts.map +1 -1
- package/dist/esm/pagination/paginationEllipsis.js +3 -2
- package/dist/esm/pagination/paginationGoToPage.d.ts.map +1 -1
- package/dist/esm/pagination/paginationGoToPage.js +3 -1
- package/dist/esm/pagination/paginationNavigation.js +3 -3
- package/dist/esm/pagination/paginationPrevNext.d.ts.map +1 -1
- package/dist/esm/pagination/paginationPrevNext.js +3 -2
- package/dist/esm/pagination/paginationResults.d.ts.map +1 -1
- package/dist/esm/pagination/paginationResults.js +3 -2
- package/dist/esm/popover/popoverContent.js +3 -3
- package/dist/esm/popover/popoverTrigger.js +4 -4
- package/dist/esm/radio/context.d.ts +2 -2
- package/dist/esm/radio/context.d.ts.map +1 -1
- package/dist/esm/radio/context.js +2 -2
- package/dist/esm/radio/radio.js +2 -2
- package/dist/esm/spinner/consts.d.ts +0 -12
- package/dist/esm/spinner/consts.d.ts.map +1 -1
- package/dist/esm/spinner/consts.js +4 -8
- package/dist/esm/spinner/spinner.js +2 -2
- package/dist/esm/switch/context.d.ts +2 -2
- package/dist/esm/switch/context.d.ts.map +1 -1
- package/dist/esm/switch/context.js +2 -2
- package/dist/esm/switch/switchButton.js +3 -3
- package/dist/esm/switch/switchLabel.d.ts.map +1 -1
- package/dist/esm/switch/switchLabel.js +5 -3
- package/dist/esm/tag/context.d.ts +2 -2
- package/dist/esm/tag/context.d.ts.map +1 -1
- package/dist/esm/tag/context.js +2 -2
- package/dist/esm/tag/tagButton.d.ts.map +1 -1
- package/dist/esm/tag/tagButton.js +6 -4
- package/dist/esm/tag/tagIcon.d.ts.map +1 -1
- package/dist/esm/tag/tagIcon.js +5 -3
- package/dist/esm/tag/tagText.d.ts.map +1 -1
- package/dist/esm/tag/tagText.js +5 -3
- package/dist/esm/textarea/textarea.js +1 -1
- package/dist/esm/utils/react.d.ts +2 -2
- package/dist/esm/utils/react.d.ts.map +1 -1
- package/dist/esm/utils/react.js +2 -2
- package/package.json +1 -1
- package/src/button/button.tsx +2 -2
- package/src/button/buttonIcon.tsx +5 -3
- package/src/button/buttonText.tsx +5 -3
- package/src/button/context.ts +2 -2
- package/src/buttonGroup/context.ts +2 -2
- package/src/checkbox/checkbox.tsx +2 -2
- package/src/checkbox/context.ts +2 -2
- package/src/core/links.tsx +19 -16
- package/src/dialog/dialogBody.tsx +4 -3
- package/src/dialog/dialogCancelButton.tsx +9 -1
- package/src/dialog/dialogCloseButton.tsx +4 -2
- package/src/dialog/dialogFooter.tsx +11 -3
- package/src/dialog/dialogHeader.tsx +3 -3
- package/src/dialog/dialogIcon.tsx +3 -1
- package/src/dialog/dialogSubmitButton.tsx +10 -1
- package/src/dialog/dialogTitle.tsx +3 -1
- package/src/footer/footerColumn.tsx +3 -2
- package/src/footer/footerContent.tsx +12 -1
- package/src/footer/footerHeading.tsx +5 -1
- package/src/footer/footerLink.tsx +11 -1
- package/src/footer/footerRow.tsx +3 -1
- package/src/footer/footerSection.tsx +3 -3
- package/src/footer/footerTrademark.tsx +3 -2
- package/src/header/headerAccount.tsx +11 -4
- package/src/header/headerAccount.types.ts +1 -1
- package/src/header/headerAccountUserInfo.tsx +20 -5
- package/src/header/headerContent.tsx +14 -1
- package/src/header/headerCreateAccount.tsx +3 -2
- package/src/header/headerDivider.tsx +4 -2
- package/src/header/headerLogo.tsx +3 -2
- package/src/header/headerMainLinks.tsx +10 -2
- package/src/header/headerMobileContent.tsx +4 -3
- package/src/header/headerMobileToggle.tsx +4 -3
- package/src/header/headerNotifications.tsx +3 -1
- package/src/header/headerServices.tsx +2 -2
- package/src/header/headerServicesMessage.tsx +10 -2
- package/src/header/headerSignIn.tsx +10 -2
- package/src/input/context.ts +2 -2
- package/src/input/input.tsx +1 -1
- package/src/input/inputIcon.tsx +5 -3
- package/src/input/inputInput.tsx +13 -4
- package/src/link/context.ts +2 -2
- package/src/link/linkIcon.tsx +5 -3
- package/src/link/linkText.tsx +12 -3
- package/src/list/context.ts +2 -2
- package/src/list/listDivider.tsx +5 -3
- package/src/list/listHeading.tsx +6 -4
- package/src/list/listIcon.tsx +5 -3
- package/src/list/listItem.tsx +13 -4
- package/src/list/listText.tsx +5 -3
- package/src/menu/menuButton.tsx +12 -2
- package/src/menu/menuItem.tsx +12 -3
- package/src/menu/menuList.tsx +4 -3
- package/src/modal/modalBackdrop.tsx +3 -2
- package/src/modal/modalContent.tsx +4 -3
- package/src/notification/context.ts +2 -2
- package/src/notification/notificationButton.tsx +7 -5
- package/src/notification/notificationIcon.tsx +7 -5
- package/src/notification/notificationText.tsx +6 -4
- package/src/notification/notificationTitle.tsx +13 -3
- package/src/pagination/helpers.ts +40 -8
- package/src/pagination/paginationButton.tsx +3 -2
- package/src/pagination/paginationEllipsis.tsx +10 -2
- package/src/pagination/paginationGoToPage.tsx +10 -2
- package/src/pagination/paginationNavigation.tsx +3 -3
- package/src/pagination/paginationPrevNext.tsx +3 -2
- package/src/pagination/paginationResults.tsx +3 -2
- package/src/popover/popoverContent.tsx +3 -3
- package/src/popover/popoverTrigger.tsx +4 -4
- package/src/radio/context.ts +2 -2
- package/src/radio/radio.tsx +2 -2
- package/src/spinner/consts.ts +4 -8
- package/src/spinner/spinner.tsx +1 -1
- package/src/switch/context.ts +2 -2
- package/src/switch/switchButton.tsx +3 -3
- package/src/switch/switchLabel.tsx +5 -3
- package/src/tag/context.ts +2 -2
- package/src/tag/tagButton.tsx +7 -5
- package/src/tag/tagIcon.tsx +5 -3
- package/src/tag/tagText.tsx +5 -3
- package/src/textarea/textarea.tsx +1 -1
- package/src/utils/react.ts +12 -3
package/dist/cjs/tag/context.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.useTagContext = exports.TagProvider = void 0;
|
|
4
4
|
const utils_1 = require("../utils");
|
|
5
|
-
const [TagProvider,
|
|
5
|
+
const [TagProvider, useTagContext] = (0, utils_1.createContext)({ isOptional: true });
|
|
6
6
|
exports.TagProvider = TagProvider;
|
|
7
|
-
exports.
|
|
7
|
+
exports.useTagContext = useTagContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tagButton.d.ts","sourceRoot":"","sources":["../../../src/tag/tagButton.tsx"],"names":[],"mappings":"AAEA,OAAe,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"tagButton.d.ts","sourceRoot":"","sources":["../../../src/tag/tagButton.tsx"],"names":[],"mappings":"AAEA,OAAe,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAK/C,wCAAwC;AACxC,eAAO,MAAM,SAAS,uDAoBpB,CAAA;AAIF,eAAe,SAAS,CAAA"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
@@ -7,12 +18,14 @@ exports.TagButton = void 0;
|
|
|
7
18
|
const react_1 = __importDefault(require("react"));
|
|
8
19
|
const button_1 = __importDefault(require("../button"));
|
|
9
20
|
const core_1 = require("../core");
|
|
21
|
+
const utils_1 = require("../utils");
|
|
10
22
|
const context_1 = require("./context");
|
|
11
23
|
/** Displays a button within the Tag. */
|
|
12
24
|
exports.TagButton = (0, core_1.vui)((props, ref) => {
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
25
|
+
const { className } = props, rest = __rest(props, ["className"]);
|
|
26
|
+
const mergedProps = Object.assign(Object.assign({}, (0, context_1.useTagContext)()), props);
|
|
27
|
+
const styles = (0, core_1.useStyleConfig)('Tag', (0, context_1.useTagContext)());
|
|
28
|
+
return (react_1.default.createElement(button_1.default, Object.assign({ borderColor: "transparent", className: (0, utils_1.cs)('vui-tagButton', className), colorScheme: mergedProps.colorScheme, disabled: mergedProps.disabled, hoverBorderColor: "transparent", icon: "falTimes", mr: -0.5, ref: ref, variant: "text" }, styles.button, rest)));
|
|
16
29
|
});
|
|
17
30
|
exports.TagButton.displayName = 'TagButton';
|
|
18
31
|
exports.default = exports.TagButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tagIcon.d.ts","sourceRoot":"","sources":["../../../src/tag/tagIcon.tsx"],"names":[],"mappings":"AAGA,OAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"tagIcon.d.ts","sourceRoot":"","sources":["../../../src/tag/tagIcon.tsx"],"names":[],"mappings":"AAGA,OAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAIzC,uCAAuC;AACvC,eAAO,MAAM,OAAO,kDAKlB,CAAA;AAIF,eAAe,OAAO,CAAA"}
|
package/dist/cjs/tag/tagIcon.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
@@ -7,11 +18,13 @@ exports.TagIcon = void 0;
|
|
|
7
18
|
const react_1 = __importDefault(require("react"));
|
|
8
19
|
const core_1 = require("../core");
|
|
9
20
|
const icon_1 = __importDefault(require("../icon"));
|
|
21
|
+
const utils_1 = require("../utils");
|
|
10
22
|
const context_1 = require("./context");
|
|
11
23
|
/** Displays an icon within the Tag. */
|
|
12
24
|
exports.TagIcon = (0, core_1.vui)((props, ref) => {
|
|
13
|
-
const
|
|
14
|
-
|
|
25
|
+
const { className } = props, rest = __rest(props, ["className"]);
|
|
26
|
+
const styles = (0, core_1.useStyleConfig)('Tag', (0, context_1.useTagContext)());
|
|
27
|
+
return react_1.default.createElement(icon_1.default, Object.assign({ className: (0, utils_1.cs)('vui-tagIcon', className), ref: ref }, styles.icon, rest));
|
|
15
28
|
});
|
|
16
29
|
exports.TagIcon.displayName = 'TagIcon';
|
|
17
30
|
exports.default = exports.TagIcon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tagText.d.ts","sourceRoot":"","sources":["../../../src/tag/tagText.tsx"],"names":[],"mappings":"AAGA,OAAU,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"tagText.d.ts","sourceRoot":"","sources":["../../../src/tag/tagText.tsx"],"names":[],"mappings":"AAGA,OAAU,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAIhC,oCAAoC;AACpC,eAAO,MAAM,OAAO,gDAKlB,CAAA;AAIF,eAAe,OAAO,CAAA"}
|
package/dist/cjs/tag/tagText.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
@@ -7,11 +18,13 @@ exports.TagText = void 0;
|
|
|
7
18
|
const react_1 = __importDefault(require("react"));
|
|
8
19
|
const core_1 = require("../core");
|
|
9
20
|
const t_1 = __importDefault(require("../t"));
|
|
21
|
+
const utils_1 = require("../utils");
|
|
10
22
|
const context_1 = require("./context");
|
|
11
23
|
/** Displays text within the Tag. */
|
|
12
24
|
exports.TagText = (0, core_1.vui)((props, ref) => {
|
|
13
|
-
const
|
|
14
|
-
|
|
25
|
+
const { className } = props, rest = __rest(props, ["className"]);
|
|
26
|
+
const styles = (0, core_1.useStyleConfig)('Tag', (0, context_1.useTagContext)());
|
|
27
|
+
return react_1.default.createElement(t_1.default, Object.assign({ className: (0, utils_1.cs)('vui-tagText', className), fontSize: "inherit", ref: ref }, styles.text, rest));
|
|
15
28
|
});
|
|
16
29
|
exports.TagText.displayName = 'TagText';
|
|
17
30
|
exports.default = exports.TagText;
|
|
@@ -113,7 +113,7 @@ exports.Textarea = (0, core_1.vui)((props, ref) => {
|
|
|
113
113
|
rows,
|
|
114
114
|
value
|
|
115
115
|
}, styles.textarea, textareaAliasedProps, textareaProps)),
|
|
116
|
-
showCount && (react_1.default.createElement(t_1.default, { color: "grey.80", position: "absolute", right: 0, size: "sm", top: "calc(100% + 1px)" },
|
|
116
|
+
showCount && (react_1.default.createElement(t_1.default, { className: "vui-textareaCount", color: "grey.80", position: "absolute", right: 0, size: "sm", top: "calc(100% + 1px)" },
|
|
117
117
|
count,
|
|
118
118
|
" / ",
|
|
119
119
|
maxLength))));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { RefObject } from 'react';
|
|
1
|
+
import React, { DependencyList, RefObject } from 'react';
|
|
2
2
|
import { AnyFunction, CreateContextOptions, CreateContextReturn } from './types';
|
|
3
3
|
declare type ReactRef<T> = React.Ref<T> | React.RefObject<T> | React.MutableRefObject<T>;
|
|
4
4
|
/**
|
|
@@ -11,7 +11,7 @@ export declare function createContext<ContextType>(options?: CreateContextOption
|
|
|
11
11
|
/** Assigns a node to all provided refs. */
|
|
12
12
|
export declare function mergeRefs<T>(...refs: (ReactRef<T> | undefined)[]): (node: T | null) => void;
|
|
13
13
|
/** Returns given callback with a stable reference, but keeps it updated internally. */
|
|
14
|
-
export declare function useCallbackRef<T extends AnyFunction>(callback?: T): T;
|
|
14
|
+
export declare function useCallbackRef<T extends AnyFunction>(callback?: T, deps?: DependencyList): T;
|
|
15
15
|
/**
|
|
16
16
|
* Triggers given callback when an event happens outside of a given element.
|
|
17
17
|
* Event listeners are attached to the window object.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/utils/react.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/utils/react.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EACb,cAAc,EAEd,SAAS,EAMT,MAAM,OAAO,CAAA;AAId,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAEhF,aAAK,QAAQ,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAA;AAEhF;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,KAAK,EAAE,CAAC,QAcxE;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAE,oBAAyB,oCAoB5E;AAED,2CAA2C;AAC3C,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,UAClD,CAAC,GAAG,IAAI,UAGtB;AAGD,uFAAuF;AACvF,wBAAgB,cAAc,CAAC,CAAC,SAAS,WAAW,EAAE,QAAQ,CAAC,EAAE,CAAC,EAAE,IAAI,GAAE,cAAmB,KAM5F;AAKD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC9B,GAAG,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,EACpE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,EACjC,MAAM,GAAE,MAAM,EAAkB,QAoBhC;AAED,oBAAY,kBAAkB,CAAC,CAAC,IAAI;IACnC,KAAK,CAAC,EAAE,CAAC,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,CAAA;IAChB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;CAC7B,CAAA;AAGD,sFAAsF;AACtF,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC;kBAwB3C,OAAO;WAAS,MAAM,IAAI;GAE3C;AAED,4GAA4G;AAC5G,wBAAgB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAEpD;AAGD;;GAEG;AACH,wBAAgB,YAAY,kBAY3B"}
|
package/dist/cjs/utils/react.js
CHANGED
|
@@ -71,10 +71,10 @@ function mergeRefs(...refs) {
|
|
|
71
71
|
exports.mergeRefs = mergeRefs;
|
|
72
72
|
// TODO: Bring it from UI-Utils
|
|
73
73
|
/** Returns given callback with a stable reference, but keeps it updated internally. */
|
|
74
|
-
function useCallbackRef(callback) {
|
|
74
|
+
function useCallbackRef(callback, deps = []) {
|
|
75
75
|
const ref = (0, react_1.useRef)(callback);
|
|
76
76
|
ref.current = callback;
|
|
77
|
-
return (0, react_1.useCallback)(((...args) => { var _a; return (_a = ref.current) === null || _a === void 0 ? void 0 : _a.call(ref, ...args); }),
|
|
77
|
+
return (0, react_1.useCallback)(((...args) => { var _a; return (_a = ref.current) === null || _a === void 0 ? void 0 : _a.call(ref, ...args); }), deps);
|
|
78
78
|
}
|
|
79
79
|
exports.useCallbackRef = useCallbackRef;
|
|
80
80
|
const defaultEvents = ['mousedown', 'touchstart'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useButtonGroupContext } from '../buttonGroup/context';
|
|
3
3
|
import { styled, th, useStyleConfig, vui } from '../core';
|
|
4
4
|
import { cs, filterUndefined, isReactText, isString } from '../utils';
|
|
5
5
|
import ButtonIcon from './buttonIcon';
|
|
@@ -52,7 +52,7 @@ export const ButtonBase = styled.buttonBox `
|
|
|
52
52
|
* Exposes some props to the children via context.
|
|
53
53
|
*/
|
|
54
54
|
export const Button = vui((props, ref) => {
|
|
55
|
-
const buttonGroupProps =
|
|
55
|
+
const buttonGroupProps = useButtonGroupContext();
|
|
56
56
|
const mergedProps = { ...buttonGroupProps, ...props };
|
|
57
57
|
const { borderWidth: borderWidthProp, children, className, colorScheme: colorSchemeProp, disabled, icon, iconLeft, iconRight, isElevated, isFullWidth, isLoading, // eslint-disable-line
|
|
58
58
|
isRound, isSplit, isTruncated, size, state = props.isLoading ? 'loading' : '', stateMapping, text, variant, ...rest } = mergedProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttonIcon.d.ts","sourceRoot":"","sources":["../../../src/button/buttonIcon.tsx"],"names":[],"mappings":"AAGA,OAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"buttonIcon.d.ts","sourceRoot":"","sources":["../../../src/button/buttonIcon.tsx"],"names":[],"mappings":"AAGA,OAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAIzC,0CAA0C;AAC1C,eAAO,MAAM,UAAU,kDAKrB,CAAA;AAIF,eAAe,UAAU,CAAA"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useStyleConfig, vui } from '../core';
|
|
3
3
|
import Icon from '../icon';
|
|
4
|
-
import {
|
|
4
|
+
import { cs } from '../utils';
|
|
5
|
+
import { useButtonContext } from './context';
|
|
5
6
|
/** Displays an icon within the Button. */
|
|
6
7
|
export const ButtonIcon = vui((props, ref) => {
|
|
7
|
-
const
|
|
8
|
-
|
|
8
|
+
const { className, ...rest } = props;
|
|
9
|
+
const styles = useStyleConfig('Button', useButtonContext());
|
|
10
|
+
return React.createElement(Icon, { className: cs('vui-buttonIcon', className), ref: ref, ...styles.icon, ...rest });
|
|
9
11
|
});
|
|
10
12
|
ButtonIcon.displayName = 'ButtonIcon';
|
|
11
13
|
export default ButtonIcon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttonText.d.ts","sourceRoot":"","sources":["../../../src/button/buttonText.tsx"],"names":[],"mappings":"AAGA,OAAU,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"buttonText.d.ts","sourceRoot":"","sources":["../../../src/button/buttonText.tsx"],"names":[],"mappings":"AAGA,OAAU,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAIhC,6CAA6C;AAC7C,eAAO,MAAM,UAAU,gDAKrB,CAAA;AAIF,eAAe,UAAU,CAAA"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useStyleConfig, vui } from '../core';
|
|
3
3
|
import T from '../t';
|
|
4
|
-
import {
|
|
4
|
+
import { cs } from '../utils';
|
|
5
|
+
import { useButtonContext } from './context';
|
|
5
6
|
/** Displays the text label of the button. */
|
|
6
7
|
export const ButtonText = vui((props, ref) => {
|
|
7
|
-
const
|
|
8
|
-
|
|
8
|
+
const { className, ...rest } = props;
|
|
9
|
+
const styles = useStyleConfig('Button', useButtonContext());
|
|
10
|
+
return React.createElement(T, { className: cs('vui-buttonText', className), fontSize: "inherit", ref: ref, ...styles.text, ...rest });
|
|
9
11
|
});
|
|
10
12
|
ButtonText.displayName = 'ButtonText';
|
|
11
13
|
export default ButtonText;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Dict } from '../utils';
|
|
3
|
-
declare const ButtonProvider: import("react").Provider<Dict<any>>,
|
|
4
|
-
export { ButtonProvider,
|
|
3
|
+
declare const ButtonProvider: import("react").Provider<Dict<any>>, useButtonContext: () => Dict<any>;
|
|
4
|
+
export { ButtonProvider, useButtonContext };
|
|
5
5
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/button/context.ts"],"names":[],"mappings":";AAAA,OAAO,EAAiB,IAAI,EAAE,MAAM,UAAU,CAAA;AAE9C,QAAA,MAAO,cAAc,uCAAE,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/button/context.ts"],"names":[],"mappings":";AAAA,OAAO,EAAiB,IAAI,EAAE,MAAM,UAAU,CAAA;AAE9C,QAAA,MAAO,cAAc,uCAAE,gBAAgB,iBAA6C,CAAA;AAEpF,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createContext } from '../utils';
|
|
2
|
-
const [ButtonProvider,
|
|
3
|
-
export { ButtonProvider,
|
|
2
|
+
const [ButtonProvider, useButtonContext] = createContext({ isOptional: true });
|
|
3
|
+
export { ButtonProvider, useButtonContext };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Dict } from '../utils';
|
|
3
|
-
declare const ButtonGroupProvider: import("react").Provider<Dict<any>>,
|
|
4
|
-
export { ButtonGroupProvider,
|
|
3
|
+
declare const ButtonGroupProvider: import("react").Provider<Dict<any>>, useButtonGroupContext: () => Dict<any>;
|
|
4
|
+
export { ButtonGroupProvider, useButtonGroupContext };
|
|
5
5
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/buttonGroup/context.ts"],"names":[],"mappings":";AAAA,OAAO,EAAiB,IAAI,EAAE,MAAM,UAAU,CAAA;AAE9C,QAAA,MAAO,mBAAmB,uCAAE,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/buttonGroup/context.ts"],"names":[],"mappings":";AAAA,OAAO,EAAiB,IAAI,EAAE,MAAM,UAAU,CAAA;AAE9C,QAAA,MAAO,mBAAmB,uCAAE,qBAAqB,iBAA6C,CAAA;AAE9F,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createContext } from '../utils';
|
|
2
|
-
const [ButtonGroupProvider,
|
|
3
|
-
export { ButtonGroupProvider,
|
|
2
|
+
const [ButtonGroupProvider, useButtonGroupContext] = createContext({ isOptional: true });
|
|
3
|
+
export { ButtonGroupProvider, useButtonGroupContext };
|
|
@@ -3,7 +3,7 @@ import { omitThemingProps, styled, th, useStyleConfig, vui } from '../core';
|
|
|
3
3
|
import Icon from '../icon';
|
|
4
4
|
import T from '../t';
|
|
5
5
|
import { cs, filterUndefined } from '../utils';
|
|
6
|
-
import {
|
|
6
|
+
import { useCheckboxGroupContext } from './context';
|
|
7
7
|
const CheckboxControl = styled.spanBox `
|
|
8
8
|
border-radius: sm;
|
|
9
9
|
display: inline-flex;
|
|
@@ -47,7 +47,7 @@ export const CheckboxBase = styled.labelBox `
|
|
|
47
47
|
* Uses icons to display itself in different states. Can be indeterminate when selecting some nested items.
|
|
48
48
|
*/
|
|
49
49
|
export const Checkbox = vui((props, ref) => {
|
|
50
|
-
const { defaultValue: groupDefaultValue, ...checkboxGroupProps } =
|
|
50
|
+
const { defaultValue: groupDefaultValue, ...checkboxGroupProps } = useCheckboxGroupContext() ?? {};
|
|
51
51
|
const mergedProps = { ...checkboxGroupProps, ...props };
|
|
52
52
|
const { checked, children, className, defaultChecked = groupDefaultValue !== undefined ? groupDefaultValue.includes(props.value) : undefined, disabled, icon: iconProp = 'cuiCheckboxUnselected', iconChecked = 'cuiCheckboxSelected', iconIndeterminate = 'cuiCheckboxIndeterminate', id, inputProps, inputRef, isIndeterminate, label, name, onChange, required, value, ...rest } = omitThemingProps(mergedProps);
|
|
53
53
|
const [isChecked, setIsChecked] = useState(defaultChecked);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Dict } from '../utils';
|
|
3
|
-
declare const CheckboxGroupProvider: import("react").Provider<Dict<any>>,
|
|
4
|
-
export { CheckboxGroupProvider,
|
|
3
|
+
declare const CheckboxGroupProvider: import("react").Provider<Dict<any>>, useCheckboxGroupContext: () => Dict<any>;
|
|
4
|
+
export { CheckboxGroupProvider, useCheckboxGroupContext };
|
|
5
5
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/checkbox/context.ts"],"names":[],"mappings":";AAAA,OAAO,EAAiB,IAAI,EAAE,MAAM,UAAU,CAAA;AAE9C,QAAA,MAAO,qBAAqB,uCAAE,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/checkbox/context.ts"],"names":[],"mappings":";AAAA,OAAO,EAAiB,IAAI,EAAE,MAAM,UAAU,CAAA;AAE9C,QAAA,MAAO,qBAAqB,uCAAE,uBAAuB,iBAA6C,CAAA;AAElG,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createContext } from '../utils';
|
|
2
|
-
const [CheckboxGroupProvider,
|
|
3
|
-
export { CheckboxGroupProvider,
|
|
2
|
+
const [CheckboxGroupProvider, useCheckboxGroupContext] = createContext({ isOptional: true });
|
|
3
|
+
export { CheckboxGroupProvider, useCheckboxGroupContext };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../../src/core/links.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,QAAQ,EAAE,cAAc,EAAmC,MAAM,OAAO,CAAA;AAEvG,OAAO,EAAE,IAAI,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../../src/core/links.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,QAAQ,EAAE,cAAc,EAAmC,MAAM,OAAO,CAAA;AAEvG,OAAO,EAAE,IAAI,EAAE,WAAW,EAAkC,MAAM,UAAU,CAAA;AAG5E,oBAAY,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,CAAA;AAEpC,aAAK,gBAAgB,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;AAIxE;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,UAcjE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,eAIjE;AAED,oDAAoD;AACpD,wBAAgB,QAAQ,qBASvB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,OAAO,QAuCnE"}
|
package/dist/esm/core/links.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { createContext, useContext, useEffect, useState } from 'react';
|
|
2
|
-
import { isObject, noop } from '../utils';
|
|
2
|
+
import { isObject, noop, useCallbackRef } from '../utils';
|
|
3
3
|
import { cdnUrls } from './consts';
|
|
4
4
|
const LinksContext = createContext(undefined);
|
|
5
5
|
/**
|
|
@@ -41,34 +41,37 @@ export function useLinks() {
|
|
|
41
41
|
*/
|
|
42
42
|
export function useLoadLinks(env, isLoggedIn) {
|
|
43
43
|
const [, setLinks] = useLinks();
|
|
44
|
-
useEffect(() => {
|
|
45
|
-
if (!env)
|
|
46
|
-
return;
|
|
47
|
-
loadLinks(env);
|
|
48
|
-
}, [env]);
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
setLinks(links => updateLoggedInParam(links, isLoggedIn));
|
|
51
|
-
}, [isLoggedIn]);
|
|
52
44
|
// Load links from the CDN for the given environment.
|
|
53
|
-
async
|
|
45
|
+
const loadLinks = async (env) => {
|
|
54
46
|
try {
|
|
55
47
|
const response = await fetch(`${cdnUrls[env]}/common/data/links/base.json`);
|
|
56
48
|
if (!response.ok)
|
|
57
49
|
return;
|
|
58
50
|
const data = await response.json();
|
|
59
51
|
if (isObject(data)) {
|
|
60
|
-
setLinks(updateLoggedInParam(data
|
|
52
|
+
setLinks(updateLoggedInParam(data));
|
|
61
53
|
}
|
|
62
54
|
}
|
|
63
55
|
catch {
|
|
64
56
|
console.error('Failed to retrieve links');
|
|
65
57
|
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Adds/removes loggedin=1 URL param for each link based on isLoggedIn arg.
|
|
61
|
+
* useCallbackRef is used here to prevent a stale closure in async loadLinks.
|
|
62
|
+
*/
|
|
63
|
+
const updateLoggedInParam = useCallbackRef((links) => {
|
|
69
64
|
return Object.keys(links).reduce((loggedInLinks, key) => {
|
|
70
65
|
loggedInLinks[key] = getLoggedInLink(links[key], isLoggedIn);
|
|
71
66
|
return loggedInLinks;
|
|
72
67
|
}, {});
|
|
73
|
-
}
|
|
68
|
+
});
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
if (!env)
|
|
71
|
+
return;
|
|
72
|
+
loadLinks(env);
|
|
73
|
+
}, [env]);
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
setLinks(updateLoggedInParam);
|
|
76
|
+
}, [isLoggedIn]);
|
|
74
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialogBody.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialogBody.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"dialogBody.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialogBody.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,wDA6CrB,CAAA;AAIF,eAAe,UAAU,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { Box } from '../box';
|
|
3
3
|
import { useStyleConfig, vui } from '../core';
|
|
4
|
-
import { mergeRefs } from '../utils';
|
|
4
|
+
import { cs, mergeRefs } from '../utils';
|
|
5
5
|
import { useDialogContext } from './context';
|
|
6
6
|
/**
|
|
7
7
|
* Shows the main content between the Dialog Header and Footer.
|
|
@@ -10,6 +10,7 @@ import { useDialogContext } from './context';
|
|
|
10
10
|
* Receives id linked to aria-describedby on the Dialog for accessibility.
|
|
11
11
|
*/
|
|
12
12
|
export const DialogBody = vui((props, ref) => {
|
|
13
|
+
const { className, ...rest } = props;
|
|
13
14
|
const { bodyId, icon, status } = useDialogContext() ?? {};
|
|
14
15
|
const styles = useStyleConfig('Dialog', useDialogContext());
|
|
15
16
|
const [isScrolled, setIsScrolled] = useState(false);
|
|
@@ -28,7 +29,7 @@ export const DialogBody = vui((props, ref) => {
|
|
|
28
29
|
const borderProps = isScrolled ? { borderColor: 'grey.30' } : {};
|
|
29
30
|
// Add more body padding when custom or status icon is displayed
|
|
30
31
|
const paddingProps = (icon ?? status) !== undefined ? { px: 8 } : { px: 3 };
|
|
31
|
-
return (React.createElement(Box, { borderBottom: "1px solid transparent", borderTop: "1px solid transparent", className:
|
|
32
|
+
return (React.createElement(Box, { borderBottom: "1px solid transparent", borderTop: "1px solid transparent", className: cs('vui-dialogBody', className), column: true, id: bodyId, overflowY: "auto", pb: 2, pt: 1.5, ref: mergeRefs(ref, bodyRef), ...borderProps, ...paddingProps, ...styles.body, ...rest }));
|
|
32
33
|
});
|
|
33
34
|
DialogBody.displayName = 'DialogBody';
|
|
34
35
|
export default DialogBody;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialogCancelButton.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialogCancelButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialogCancelButton.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialogCancelButton.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAExD,yFAAyF;AACzF,eAAO,MAAM,kBAAkB,mEAc7B,CAAA;AAIF,eAAe,kBAAkB,CAAA"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LineButton } from '../button';
|
|
3
3
|
import { useStyleConfig, vui } from '../core';
|
|
4
|
+
import { cs } from '../utils';
|
|
4
5
|
import { useDialogContext } from './context';
|
|
5
6
|
/** Shows an outlined Button in the Dialog Footer, which by default closes the Dialog. */
|
|
6
7
|
export const DialogCancelButton = vui((props, ref) => {
|
|
8
|
+
const { className, ...rest } = props;
|
|
7
9
|
const { onClose } = useDialogContext() ?? {};
|
|
8
10
|
const styles = useStyleConfig('Dialog', useDialogContext());
|
|
9
|
-
return (React.createElement(LineButton, { className:
|
|
11
|
+
return (React.createElement(LineButton, { className: cs('vui-dialogCancelButton', className), onClick: onClose, ref: ref, ...styles.cancelButton, ...rest }));
|
|
10
12
|
});
|
|
11
13
|
DialogCancelButton.displayName = 'DialogCancelButton';
|
|
12
14
|
export default DialogCancelButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialogCloseButton.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialogCloseButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialogCloseButton.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialogCloseButton.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAEvD,oFAAoF;AACpF,eAAO,MAAM,iBAAiB,kEAqB5B,CAAA;AAIF,eAAe,iBAAiB,CAAA"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CloseButton } from '../button';
|
|
3
3
|
import { useStyleConfig, vui } from '../core';
|
|
4
|
+
import { cs } from '../utils';
|
|
4
5
|
import { useDialogContext } from './context';
|
|
5
6
|
/** Shows a CloseButton in the Dialog Header, which by default closes the Dialog. */
|
|
6
7
|
export const DialogCloseButton = vui((props, ref) => {
|
|
8
|
+
const { className, ...rest } = props;
|
|
7
9
|
const { onClose } = useDialogContext() ?? {};
|
|
8
10
|
const styles = useStyleConfig('Dialog', useDialogContext());
|
|
9
|
-
return (React.createElement(CloseButton, { activeBg: "grey.30", className:
|
|
11
|
+
return (React.createElement(CloseButton, { activeBg: "grey.30", className: cs('vui-dialogCloseButton', className), color: "grey.80", hoverBg: "grey.20", onClick: onClose, position: "absolute", ref: ref, right: 16, size: "sm", top: 16, ...styles.closeButton, ...rest }));
|
|
10
12
|
});
|
|
11
13
|
DialogCloseButton.displayName = 'DialogCloseButton';
|
|
12
14
|
export default DialogCloseButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialogFooter.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialogFooter.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAIlD,kGAAkG;AAClG,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"dialogFooter.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialogFooter.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAIlD,kGAAkG;AAClG,eAAO,MAAM,YAAY,0DAuBvB,CAAA;AAIF,eAAe,YAAY,CAAA"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Box } from '../box';
|
|
3
3
|
import { useStyleConfig, vui } from '../core';
|
|
4
|
-
import { isJsx } from '../utils';
|
|
4
|
+
import { cs, isJsx } from '../utils';
|
|
5
5
|
import { useDialogContext } from './context';
|
|
6
6
|
import DialogCancelButton from './dialogCancelButton';
|
|
7
7
|
import DialogSubmitButton from './dialogSubmitButton';
|
|
8
8
|
/** Shows control buttons below the Dialog Body. By default includes cancel and submit buttons. */
|
|
9
9
|
export const DialogFooter = vui((props, ref) => {
|
|
10
|
-
const { cancelButton, children, submitButton, ...rest } = props;
|
|
10
|
+
const { cancelButton, children, className, submitButton, ...rest } = props;
|
|
11
11
|
const styles = useStyleConfig('Dialog', useDialogContext());
|
|
12
|
-
return (React.createElement(Box, { className:
|
|
12
|
+
return (React.createElement(Box, { className: cs('vui-dialogFooter', className), justifyContent: "flex-end", p: 3, pt: 2, ref: ref, ...styles.footer, ...rest }, children ?? (React.createElement(React.Fragment, null,
|
|
13
13
|
isJsx(cancelButton) ? cancelButton : cancelButton && React.createElement(DialogCancelButton, { ...cancelButton }),
|
|
14
14
|
isJsx(submitButton) ? submitButton : submitButton && React.createElement(DialogSubmitButton, { ...submitButton })))));
|
|
15
15
|
});
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Box } from '../box';
|
|
3
3
|
import { useStyleConfig, vui } from '../core';
|
|
4
|
-
import { isJsx, isReactText, isString } from '../utils';
|
|
4
|
+
import { cs, isJsx, isReactText, isString } from '../utils';
|
|
5
5
|
import { useDialogContext } from './context';
|
|
6
6
|
import DialogCloseButton from './dialogCloseButton';
|
|
7
7
|
import DialogIcon from './dialogIcon';
|
|
8
8
|
import DialogTitle from './dialogTitle';
|
|
9
9
|
/** Shows title, status icon and close button above the Dialog Body. */
|
|
10
10
|
export const DialogHeader = vui((props, ref) => {
|
|
11
|
-
const { children, closeButton, icon: iconProp, title: titleProp, ...rest } = props;
|
|
11
|
+
const { children, className, closeButton, icon: iconProp, title: titleProp, ...rest } = props;
|
|
12
12
|
const { onClose, status } = useDialogContext() ?? {};
|
|
13
13
|
const styles = useStyleConfig('Dialog', useDialogContext());
|
|
14
14
|
const icon = isString(iconProp) ? { name: iconProp } : iconProp;
|
|
15
15
|
const showCloseButton = Boolean(closeButton !== undefined ? closeButton : onClose);
|
|
16
16
|
const showIcon = Boolean(icon || status);
|
|
17
17
|
const title = isReactText(titleProp) ? { text: titleProp } : titleProp;
|
|
18
|
-
return (React.createElement(Box, { className:
|
|
18
|
+
return (React.createElement(Box, { className: cs('vui-dialogHeader', className), icon: icon, pb: 1.5, pl: 3, position: "relative", pr: 8, pt: 3, ref: ref, ...styles.header, ...rest }, children ?? (React.createElement(React.Fragment, null,
|
|
19
19
|
isJsx(icon) ? icon : showIcon && React.createElement(DialogIcon, { ...icon }),
|
|
20
20
|
isJsx(title) ? title : title && React.createElement(DialogTitle, { ...title }),
|
|
21
21
|
isJsx(closeButton) ? closeButton : showCloseButton && React.createElement(DialogCloseButton, null)))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialogIcon.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialogIcon.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialogIcon.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialogIcon.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD,+EAA+E;AAC/E,eAAO,MAAM,UAAU,wDAOrB,CAAA;AAIF,eAAe,UAAU,CAAA"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useStyleConfig, vui } from '../core';
|
|
3
3
|
import { Icon } from '../icon';
|
|
4
|
+
import { cs } from '../utils';
|
|
4
5
|
import { dialogStatusMapping } from './consts';
|
|
5
6
|
import { useDialogContext } from './context';
|
|
6
7
|
/** Shows an icon based on a given status. Optionally, can be a custom icon. */
|
|
7
8
|
export const DialogIcon = vui((props, ref) => {
|
|
9
|
+
const { className, ...rest } = props;
|
|
8
10
|
const { status = '' } = useDialogContext() ?? {};
|
|
9
11
|
const styles = useStyleConfig('Dialog', useDialogContext());
|
|
10
12
|
const { iconProps } = dialogStatusMapping[status] ?? {};
|
|
11
|
-
return React.createElement(Icon, { className:
|
|
13
|
+
return React.createElement(Icon, { className: cs('vui-dialogIcon', className), mr: 2, ref: ref, ...styles.icon, ...iconProps, ...rest });
|
|
12
14
|
});
|
|
13
15
|
DialogIcon.displayName = 'DialogIcon';
|
|
14
16
|
export default DialogIcon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialogSubmitButton.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialogSubmitButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialogSubmitButton.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialogSubmitButton.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAExD,yFAAyF;AACzF,eAAO,MAAM,kBAAkB,mEAc7B,CAAA;AAIF,eAAe,kBAAkB,CAAA"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Button } from '../button';
|
|
3
3
|
import { useStyleConfig, vui } from '../core';
|
|
4
|
+
import { cs } from '../utils';
|
|
4
5
|
import { useDialogContext } from './context';
|
|
5
6
|
/** Shows a button in the Dialog Footer, which triggers the main action of the Dialog. */
|
|
6
7
|
export const DialogSubmitButton = vui((props, ref) => {
|
|
8
|
+
const { className, ...rest } = props;
|
|
7
9
|
const styles = useStyleConfig('Dialog', useDialogContext());
|
|
8
|
-
return (React.createElement(Button, { className:
|
|
10
|
+
return (React.createElement(Button, { className: cs('vui-dialogSubmitButton', className), ml: 2, ref: ref, text: "Submit", ...styles.submitButton, ...rest }));
|
|
9
11
|
});
|
|
10
12
|
DialogSubmitButton.displayName = 'DialogSubmitButton';
|
|
11
13
|
export default DialogSubmitButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialogTitle.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialogTitle.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialogTitle.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialogTitle.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEjD,iHAAiH;AACjH,eAAO,MAAM,WAAW,wDAMtB,CAAA;AAIF,eAAe,WAAW,CAAA"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useStyleConfig, vui } from '../core';
|
|
3
3
|
import { H4 } from '../heading';
|
|
4
|
+
import { cs } from '../utils';
|
|
4
5
|
import { useDialogContext } from './context';
|
|
5
6
|
/** Shows a title in the Dialog Header. Receives id linked to aria-labelledby on the Dialog for accessibility. */
|
|
6
7
|
export const DialogTitle = vui((props, ref) => {
|
|
8
|
+
const { className, ...rest } = props;
|
|
7
9
|
const { titleId } = useDialogContext() ?? {};
|
|
8
10
|
const styles = useStyleConfig('Dialog', useDialogContext());
|
|
9
|
-
return React.createElement(H4, { className:
|
|
11
|
+
return React.createElement(H4, { className: cs('vui-dialogTitle', className), id: titleId, ref: ref, ...styles.title, ...rest });
|
|
10
12
|
});
|
|
11
13
|
DialogTitle.displayName = 'DialogTitle';
|
|
12
14
|
export default DialogTitle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footerColumn.d.ts","sourceRoot":"","sources":["../../../src/footer/footerColumn.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"footerColumn.d.ts","sourceRoot":"","sources":["../../../src/footer/footerColumn.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAGlD,0FAA0F;AAC1F,QAAA,MAAM,YAAY,0DAkBhB,CAAA;AAEF,eAAe,YAAY,CAAA"}
|