uikit-react-public 0.14.21 → 0.21.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/components/Accordion/Accordion.Heading.d.ts +5 -4
- package/dist/components/Accordion/Accordion.Panel.d.ts +2 -2
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Accordion/Accordion.stories.d.ts +57 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/AppHeader/AppHeader.d.ts +1 -1
- package/dist/components/AppHeader/AppHeaderBottom.d.ts +1 -1
- package/dist/components/AppHeader/AppHeaderNav.d.ts +1 -1
- package/dist/components/AppHeader/AppHeaderTop.d.ts +1 -1
- package/dist/components/Avatar/Avatar.stories.d.ts +107 -1
- package/dist/components/Breadcrumbs/Breadcrumb.d.ts +3 -4
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +8 -3
- package/dist/components/Button/Button.stories.d.ts +17 -7
- package/dist/components/Button/style/buttonAccentStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonPrimaryDestructiveStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonPrimaryStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonPrimarySubtleStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonPrimaryWarningStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonSecondaryDestructiveStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonSecondaryStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonSecondarySubtleStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonTertiaryDestructiveStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonTertiaryNoPaddingStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonTertiaryStyle.d.ts +4 -0
- package/dist/components/Calendar/index.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/Datepicker/Datepicker.d.ts +1 -1
- package/dist/components/Datepicker/Datepicker.stories.d.ts +4 -3
- package/dist/components/Datepicker/Datepicker.types.d.ts +4 -5
- package/dist/components/Datepicker/subcomponents/CustomDatepicker.d.ts +4 -1
- package/dist/components/Datepicker/subcomponents/DatepickerInput.d.ts +15 -2
- package/dist/components/Datepicker/subcomponents/Panel.d.ts +1 -1
- package/dist/components/Datepicker/subcomponents/VisibleField.d.ts +6 -1
- package/dist/components/Datepicker/subcomponents/index.d.ts +0 -1
- package/dist/components/Datepicker/utils/index.d.ts +0 -1
- package/dist/components/Dialog/BaseDialog.d.ts +2 -1
- package/dist/components/Dialog/Dialog.d.ts +2 -0
- package/dist/components/FooterNew/BackToTop.d.ts +8 -0
- package/dist/components/FooterNew/Footer.d.ts +23 -0
- package/dist/components/FooterNew/FooterColumn.d.ts +8 -0
- package/dist/components/FooterNew/FooterLinks.d.ts +7 -0
- package/dist/components/FooterNew/FooterNavLink.d.ts +8 -0
- package/dist/components/FooterNew/LegalAndCopyright.d.ts +14 -0
- package/dist/components/FooterNew/LogoAddressAndSocial.d.ts +10 -0
- package/dist/components/FooterNew/SocialLink.d.ts +8 -0
- package/dist/components/FooterNew/index.d.ts +2 -0
- package/dist/components/Header/Header.d.ts +4 -1
- package/dist/components/Header/Header.stories.d.ts +40 -0
- package/dist/components/HeaderNew/Header.d.ts +18 -0
- package/dist/components/HeaderNew/HeaderBorder.d.ts +7 -0
- package/dist/components/HeaderNew/HeaderLogo.d.ts +9 -0
- package/dist/components/HeaderNew/HeaderMenuContainer.d.ts +7 -0
- package/dist/components/HeaderNew/HeaderTitle.d.ts +9 -0
- package/dist/components/HeaderNew/__tests__/Header.test.d.ts +1 -0
- package/dist/components/HeaderNew/constants.d.ts +3 -0
- package/dist/components/HeaderNew/index.d.ts +3 -0
- package/dist/components/HeadingNew/Heading.d.ts +13 -0
- package/dist/components/HeadingNew/index.d.ts +2 -0
- package/dist/components/Icon/svgImports.d.ts +7 -881
- package/dist/components/Link/BaseLink.d.ts +14 -5
- package/dist/components/Link/Link.d.ts +8 -3
- package/dist/components/Link/Link.stories.d.ts +3 -1
- package/dist/components/Main/Main.d.ts +21 -0
- package/dist/components/Main/Main.stories.d.ts +15 -0
- package/dist/components/Main/__tests__/Main.test.d.ts +1 -0
- package/dist/components/Main/index.d.ts +2 -0
- package/dist/components/MenuNew/Menu.context.d.ts +14 -0
- package/dist/components/MenuNew/Menu.d.ts +20 -0
- package/dist/components/MenuNew/MenuContent.d.ts +9 -0
- package/dist/components/MenuNew/MenuItem.d.ts +10 -0
- package/dist/components/MenuNew/MenuSection.d.ts +7 -0
- package/dist/components/MenuNew/index.d.ts +6 -0
- package/dist/components/MenuNew/trigger/ButtonMenuTrigger.d.ts +8 -0
- package/dist/components/MenuNew/trigger/IconMenuTrigger.d.ts +8 -0
- package/dist/components/NativeDatepicker/NativeDatepicker.d.ts +3 -0
- package/dist/components/NativeDatepicker/NativeDatepicker.stories.d.ts +36 -0
- package/dist/components/NativeDatepicker/NativeDatepicker.types.d.ts +10 -0
- package/dist/components/NativeDatepicker/index.d.ts +2 -0
- package/dist/components/{Datepicker → NativeDatepicker}/utils/dateToLocaleISOString/dateToLocaleISOString.d.ts +1 -1
- package/dist/components/NativeDatepicker/utils/dateToLocaleISOString/dateToLocaleISOString.test.d.ts +1 -0
- package/dist/components/NativeDatepicker/utils/index.d.ts +1 -0
- package/dist/components/Overlay/Overlay.stories.d.ts +12 -12
- package/dist/components/ParagraphNew/Paragraph.d.ts +13 -0
- package/dist/components/ParagraphNew/index.d.ts +4 -0
- package/dist/components/Select/Select.d.ts +2 -1
- package/dist/components/Select/Select.stories.d.ts +167 -3
- package/dist/components/Select/Select.types.d.ts +75 -19
- package/dist/components/Select/subcomponents/CustomOption.d.ts +1 -1
- package/dist/components/Select/subcomponents/CustomSelect.d.ts +3 -2
- package/dist/components/Select/subcomponents/FilterInput.d.ts +16 -0
- package/dist/components/Select/subcomponents/NativeSelect.d.ts +5 -1
- package/dist/components/Select/subcomponents/VisibleField.d.ts +6 -1
- package/dist/components/Select/subcomponents/index.d.ts +1 -0
- package/dist/components/Spinner/Spinner.d.ts +2 -0
- package/dist/components/StandaloneLink/StandaloneLink.d.ts +8 -5
- package/dist/components/StandaloneLink/StandaloneLink.stories.d.ts +3 -1
- package/dist/components/Table/Table.d.ts +3 -3
- package/dist/components/Table/Table.stories.d.ts +3 -3
- package/dist/components/Table/Table.types.d.ts +1 -0
- package/dist/components/Table/subcomponents/Cell/Cell.d.ts +5 -1
- package/dist/components/Table/subcomponents/Cell/Cell.stories.d.ts +15 -13
- package/dist/components/Table/subcomponents/Cell/CellContent.d.ts +5 -1
- package/dist/components/Table/subcomponents/HeadCell/HeadCell.d.ts +2 -1
- package/dist/components/Table/subcomponents/HeadCell/HeadCell.stories.d.ts +14 -13
- package/dist/components/Table/subcomponents/HeadCell/HeadCellContent.d.ts +2 -1
- package/dist/components/Table/subcomponents/__tests__/Row.test.d.ts +1 -0
- package/dist/components/UclLogoNew/UclLogo.d.ts +8 -0
- package/dist/components/UclLogoNew/index.d.ts +2 -0
- package/dist/components/WeekPicker/WeekPicker.d.ts +2 -2
- package/dist/components/WeekPicker/WeekPicker.stories.d.ts +41 -0
- package/dist/components/WeekPicker/WeekPicker.types.d.ts +16 -0
- package/dist/components/WeekPicker/index.d.ts +1 -0
- package/dist/components/WeekPicker/subcomponents/CustomDatepicker.d.ts +1 -1
- package/dist/components/index.d.ts +20 -0
- package/dist/hooks/useFocusTrap.d.ts +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +22204 -16719
- package/dist/theme/__tests__/fonts.test.d.ts +1 -0
- package/dist/theme/common/themeCommon.d.ts +904 -0
- package/dist/theme/fonts.d.ts +18 -0
- package/dist/theme/index.d.ts +6 -3
- package/dist/theme/light/lightColour.d.ts +126 -0
- package/dist/theme/light/lightTheme.d.ts +3 -0
- package/dist/theme/original/color.d.ts +166 -0
- package/dist/theme/original/defaultTheme.d.ts +1340 -0
- package/dist/theme/original/originalColourNewStructure.d.ts +126 -0
- package/dist/theme/useTheme.d.ts +2174 -0
- package/dist/utils/__tests__/announce.test.d.ts +1 -0
- package/dist/utils/addAlphaToHex.d.ts +5 -0
- package/dist/utils/announce.d.ts +6 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/scrollToTop.d.ts +2 -0
- package/lib/components/Accordion/Accordion.Heading.tsx +65 -34
- package/lib/components/Accordion/Accordion.Panel.tsx +11 -7
- package/lib/components/Accordion/Accordion.stories.tsx +139 -0
- package/lib/components/Accordion/Accordion.tsx +39 -31
- package/lib/components/Accordion/__tests__/__snapshots__/Accordion.test.tsx.snap +15 -13
- package/lib/components/Accordion/index.ts +2 -0
- package/lib/components/Alert/Alert.stories.tsx +1 -1
- package/lib/components/Alert/Alert.tsx +12 -12
- package/lib/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap +13 -39
- package/lib/components/AppHeader/AppHeader.tsx +6 -11
- package/lib/components/AppHeader/AppHeaderBottom.tsx +2 -3
- package/lib/components/AppHeader/AppHeaderNav.tsx +2 -3
- package/lib/components/AppHeader/AppHeaderTop.tsx +1 -1
- package/lib/components/AppHeader/__tests__/__snapshots__/AppHeader.test.tsx.snap +2 -2
- package/lib/components/AppMenu/__tests__/__snapshots__/AppMenu.test.tsx.snap +6 -19
- package/lib/components/Avatar/Avatar.mdx +117 -0
- package/lib/components/Avatar/Avatar.stories.tsx +110 -2
- package/lib/components/Badge/Badge.stories.tsx +1 -1
- package/lib/components/Blanket/Blanket.stories.tsx +1 -1
- package/lib/components/Breadcrumbs/Breadcrumb.tsx +26 -12
- package/lib/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
- package/lib/components/Breadcrumbs/__tests__/Breadcrumbs.test.tsx +9 -27
- package/lib/components/Breadcrumbs/__tests__/__snapshots__/Breadcrumbs.test.tsx.snap +24 -20
- package/lib/components/Button/Button.mdx +32 -279
- package/lib/components/Button/Button.stories.tsx +44 -51
- package/lib/components/Button/Button.tsx +166 -25
- package/lib/components/Button/__tests__/Button.test.tsx +49 -15
- package/lib/components/Button/__tests__/__snapshots__/Button.test.tsx.snap +80 -73
- package/lib/components/Button/style/buttonAccentStyle.ts +53 -0
- package/lib/components/Button/style/buttonPrimaryDestructiveStyle.ts +55 -0
- package/lib/components/Button/style/buttonPrimaryStyle.ts +53 -0
- package/lib/components/Button/style/buttonPrimarySubtleStyle.ts +64 -0
- package/lib/components/Button/style/buttonPrimaryWarningStyle.ts +56 -0
- package/lib/components/Button/style/buttonSecondaryDestructiveStyle.ts +63 -0
- package/lib/components/Button/style/buttonSecondaryStyle.ts +62 -0
- package/lib/components/Button/style/buttonSecondarySubtleStyle.ts +72 -0
- package/lib/components/Button/style/buttonTertiaryDestructiveStyle.ts +65 -0
- package/lib/components/Button/style/buttonTertiaryNoPaddingStyle.ts +52 -0
- package/lib/components/Button/style/buttonTertiaryStyle.ts +62 -0
- package/lib/components/Calendar/Calendar.stories.tsx +1 -1
- package/lib/components/Calendar/Calendar.tsx +2 -2
- package/lib/components/Calendar/__tests__/Calendar.test.tsx +23 -15
- package/lib/components/Calendar/__tests__/__snapshots__/Calendar.test.tsx.snap +99 -95
- package/lib/components/Calendar/index.ts +1 -5
- package/lib/components/Calendar/subcomponents/AcademicWeek.tsx +2 -1
- package/lib/components/Calendar/subcomponents/AcademicWeeks.tsx +1 -1
- package/lib/components/Calendar/subcomponents/ColumnHeading.tsx +2 -2
- package/lib/components/Calendar/subcomponents/Controls.tsx +1 -1
- package/lib/components/Calendar/subcomponents/Day.stories.tsx +1 -1
- package/lib/components/Calendar/subcomponents/Day.tsx +7 -9
- package/lib/components/Calendar/subcomponents/EventDot.tsx +3 -6
- package/lib/components/Calendar/subcomponents/index.ts +1 -1
- package/lib/components/Calendar/utils/getDatesForCalendarGrid/getDatesForCalendarGrid.ts +43 -11
- package/lib/components/Calendar/utils/normaliseMonth/normaliseMonth.test.ts +5 -5
- package/lib/components/Checkbox/Checkbox.stories.tsx +1 -1
- package/lib/components/Checkbox/Checkbox.tsx +12 -10
- package/lib/components/Checkbox/__tests__/Checkbox.test.tsx +29 -0
- package/lib/components/Checkbox/__tests__/__snapshots__/Checkbox.test.tsx.snap +4 -4
- package/lib/components/Datepicker/Datepicker.lld.md +108 -0
- package/lib/components/Datepicker/Datepicker.stories.tsx +44 -5
- package/lib/components/Datepicker/Datepicker.tsx +14 -36
- package/lib/components/Datepicker/Datepicker.types.ts +5 -14
- package/lib/components/Datepicker/__tests__/Datepicker.test.tsx +267 -8
- package/lib/components/Datepicker/__tests__/__snapshots__/Datepicker.test.tsx.snap +20 -42
- package/lib/components/Datepicker/subcomponents/CustomDatepicker.tsx +48 -5
- package/lib/components/Datepicker/subcomponents/DatepickerInput.tsx +30 -17
- package/lib/components/Datepicker/subcomponents/Panel.tsx +6 -2
- package/lib/components/Datepicker/subcomponents/VisibleField.tsx +46 -8
- package/lib/components/Datepicker/subcomponents/index.ts +0 -1
- package/lib/components/Datepicker/utils/index.ts +0 -1
- package/lib/components/Dialog/BaseDialog.tsx +13 -2
- package/lib/components/Dialog/Dialog.stories.tsx +1 -1
- package/lib/components/Dialog/Dialog.tsx +8 -1
- package/lib/components/Dialog/DialogBody.tsx +5 -1
- package/lib/components/Dialog/DialogHeader.tsx +2 -1
- package/lib/components/Divider/Divider.stories.tsx +1 -1
- package/lib/components/Divider/__tests__/__snapshots__/Breadcrumbs.test.tsx.snap +12 -12
- package/lib/components/FeedbackDialog/FeedbackDialog.stories.tsx +1 -1
- package/lib/components/FeedbackDialog/FeedbackDialog.tsx +4 -6
- package/lib/components/Field/CharacterCount.tsx +2 -2
- package/lib/components/Field/ErrorText.tsx +2 -1
- package/lib/components/Field/Field.stories.tsx +1 -1
- package/lib/components/Field/Field.tsx +1 -1
- package/lib/components/Field/HelperText.tsx +3 -1
- package/lib/components/Field/__tests__/Field.test.tsx +13 -0
- package/lib/components/FileInput/FileInput.stories.tsx +1 -1
- package/lib/components/FileInput/__tests__/__snapshots__/FileInput.test.tsx.snap +4 -20
- package/lib/components/Footer/Footer.stories.tsx +1 -1
- package/lib/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +73 -82
- package/lib/components/FooterNew/BackToTop.tsx +83 -0
- package/lib/components/FooterNew/Footer.tsx +110 -0
- package/lib/components/FooterNew/FooterColumn.tsx +79 -0
- package/lib/components/FooterNew/FooterLinks.tsx +44 -0
- package/lib/components/FooterNew/FooterNavLink.tsx +63 -0
- package/lib/components/FooterNew/LegalAndCopyright.tsx +150 -0
- package/lib/components/FooterNew/LogoAddressAndSocial.tsx +154 -0
- package/lib/components/FooterNew/SocialLink.tsx +108 -0
- package/lib/components/FooterNew/__tests__/Footer.test.tsx +51 -0
- package/lib/components/FooterNew/__tests__/__snapshots__/Footer.test.tsx.snap +1107 -0
- package/lib/components/FooterNew/index.ts +2 -0
- package/lib/components/Header/Header.mdx +52 -0
- package/lib/components/Header/Header.stories.tsx +98 -0
- package/lib/components/Header/Header.tsx +51 -6
- package/lib/components/Header/__tests__/Header.test.tsx +17 -1
- package/lib/components/HeaderDraft/__tests__/__snapshots__/Header.test.tsx.snap +3 -2
- package/lib/components/HeaderNew/Header.tsx +93 -0
- package/lib/components/HeaderNew/HeaderBorder.tsx +55 -0
- package/lib/components/HeaderNew/HeaderLogo.tsx +70 -0
- package/lib/components/HeaderNew/HeaderMenuContainer.tsx +35 -0
- package/lib/components/HeaderNew/HeaderTitle.tsx +53 -0
- package/lib/components/HeaderNew/__tests__/Header.test.tsx +42 -0
- package/lib/components/HeaderNew/__tests__/__snapshots__/Header.test.tsx.snap +79 -0
- package/lib/components/HeaderNew/constants.ts +3 -0
- package/lib/components/HeaderNew/index.ts +7 -0
- package/lib/components/Heading/Heading.stories.tsx +1 -1
- package/lib/components/HeadingNew/Heading.tsx +208 -0
- package/lib/components/HeadingNew/index.ts +2 -0
- package/lib/components/Icon/Icon.stories.tsx +1 -1
- package/lib/components/Icon/__tests__/__snapshots__/Icon.test.tsx.snap +16 -12
- package/lib/components/Icon/svgImports.ts +318 -296
- package/lib/components/IconButton/IconButton.stories.tsx +1 -1
- package/lib/components/IconButton/IconButton.tsx +3 -4
- package/lib/components/IconButton/__tests__/__snapshots__/IconButton.test.tsx.snap +12 -9
- package/lib/components/Input/Input.stories.tsx +1 -1
- package/lib/components/Label/Label.stories.tsx +1 -1
- package/lib/components/Link/BaseLink.tsx +114 -71
- package/lib/components/Link/Link.stories.tsx +1 -1
- package/lib/components/Link/Link.tsx +120 -109
- package/lib/components/Link/__tests__/__snapshots__/link.test.tsx.snap +2 -2
- package/lib/components/Main/Main.stories.tsx +36 -0
- package/lib/components/Main/Main.tsx +46 -0
- package/lib/components/Main/__tests__/Main.test.tsx +80 -0
- package/lib/components/Main/__tests__/__snapshots__/Main.test.tsx.snap +33 -0
- package/lib/components/Main/index.ts +2 -0
- package/lib/components/MenuNew/Menu.context.tsx +149 -0
- package/lib/components/MenuNew/Menu.tsx +75 -0
- package/lib/components/MenuNew/MenuContent.tsx +140 -0
- package/lib/components/MenuNew/MenuItem.tsx +101 -0
- package/lib/components/MenuNew/MenuSection.tsx +47 -0
- package/lib/components/MenuNew/index.ts +8 -0
- package/lib/components/MenuNew/trigger/ButtonMenuTrigger.tsx +42 -0
- package/lib/components/MenuNew/trigger/IconMenuTrigger.tsx +40 -0
- package/lib/components/NativeDatepicker/NativeDatepicker.stories.tsx +100 -0
- package/lib/components/{Datepicker/subcomponents → NativeDatepicker}/NativeDatepicker.tsx +14 -15
- package/lib/components/NativeDatepicker/NativeDatepicker.types.ts +19 -0
- package/lib/components/NativeDatepicker/index.ts +2 -0
- package/lib/components/{Datepicker → NativeDatepicker}/utils/dateToLocaleISOString/dateToLocaleISOString.ts +1 -1
- package/lib/components/NativeDatepicker/utils/index.ts +1 -0
- package/lib/components/Pagination/Pagination.stories.tsx +1 -1
- package/lib/components/Pagination/PaginationControls.tsx +59 -17
- package/lib/components/Pagination/PaginationInfo.tsx +7 -4
- package/lib/components/Paragraph/Paragraph.stories.tsx +1 -1
- package/lib/components/ParagraphNew/Paragraph.tsx +200 -0
- package/lib/components/ParagraphNew/index.ts +6 -0
- package/lib/components/Radio/Radio.stories.tsx +1 -1
- package/lib/components/Radio/Radio.tsx +8 -8
- package/lib/components/Radio/__tests__/__snapshots__/Radio.test.tsx.snap +4 -4
- package/lib/components/Search/Search.stories.tsx +1 -1
- package/lib/components/Search/Search.tsx +4 -1
- package/lib/components/Search/__tests__/Search.test.tsx +19 -1
- package/lib/components/Search/__tests__/__snapshots__/Search.test.tsx.snap +12 -32
- package/lib/components/Select/Select.mdx +192 -0
- package/lib/components/Select/Select.stories.tsx +229 -48
- package/lib/components/Select/Select.tsx +50 -15
- package/lib/components/Select/Select.types.ts +99 -44
- package/lib/components/Select/__tests__/Select.test.tsx +698 -8
- package/lib/components/Select/__tests__/__snapshots__/Select.test.tsx.snap +5 -4
- package/lib/components/Select/subcomponents/CustomOption.tsx +12 -4
- package/lib/components/Select/subcomponents/CustomSelect.tsx +411 -41
- package/lib/components/Select/subcomponents/FilterInput.tsx +90 -0
- package/lib/components/Select/subcomponents/NativeSelect.tsx +21 -17
- package/lib/components/Select/subcomponents/Panel.tsx +2 -2
- package/lib/components/Select/subcomponents/VisibleField.tsx +59 -6
- package/lib/components/Select/subcomponents/index.tsx +1 -0
- package/lib/components/Snackbar/Snackbar.stories.tsx +1 -1
- package/lib/components/Snackbar/__tests__/__snapshots__/Snackbar.test.tsx.snap +9 -15
- package/lib/components/Spinner/Spinner.stories.tsx +1 -1
- package/lib/components/Spinner/Spinner.tsx +24 -5
- package/lib/components/Spinner/__tests__/Spinner.test.tsx +35 -5
- package/lib/components/Spinner/__tests__/__snapshots__/Spinner.test.tsx.snap +40 -16
- package/lib/components/StandaloneLink/StandaloneLink.stories.tsx +1 -1
- package/lib/components/StandaloneLink/StandaloneLink.tsx +180 -163
- package/lib/components/StandaloneLink/__tests__/__snapshots__/StandaloneLink.test.tsx.snap +2 -2
- package/lib/components/Table/Table.stories.tsx +1 -1
- package/lib/components/Table/Table.tsx +2 -0
- package/lib/components/Table/Table.types.ts +1 -0
- package/lib/components/Table/__tests__/Table.test.tsx +19 -0
- package/lib/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +7 -3
- package/lib/components/Table/subcomponents/Cell/Cell.stories.tsx +1 -1
- package/lib/components/Table/subcomponents/Cell/Cell.tsx +23 -2
- package/lib/components/Table/subcomponents/Cell/CellContent.tsx +12 -1
- package/lib/components/Table/subcomponents/Cell/__tests__/Cell.test.tsx +106 -0
- package/lib/components/Table/subcomponents/Cell/__tests__/__snapshots__/Cell.test.tsx.snap +4 -3
- package/lib/components/Table/subcomponents/HeadCell/HeadCell.stories.tsx +1 -1
- package/lib/components/Table/subcomponents/HeadCell/HeadCell.tsx +28 -6
- package/lib/components/Table/subcomponents/HeadCell/HeadCellContent.tsx +3 -0
- package/lib/components/Table/subcomponents/HeadCell/__tests__/HeadCell.test.tsx +221 -2
- package/lib/components/Table/subcomponents/HeadCell/__tests__/__snapshots__/HeadCell.test.tsx.snap +6 -4
- package/lib/components/Table/subcomponents/Row.tsx +2 -2
- package/lib/components/Table/subcomponents/SortIcon.tsx +1 -0
- package/lib/components/Table/subcomponents/__tests__/Row.test.tsx +59 -0
- package/lib/components/Tabs/Tab.tsx +3 -3
- package/lib/components/Tabs/Tabs.stories.tsx +1 -1
- package/lib/components/Tabs/Tabs.tsx +5 -3
- package/lib/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +4 -4
- package/lib/components/Textarea/Textarea.stories.tsx +1 -1
- package/lib/components/Timepicker/Timepicker.stories.tsx +1 -1
- package/lib/components/Timepicker/Timepicker.tsx +4 -0
- package/lib/components/Timepicker/__tests__/__snapshots__/Timepicker.test.tsx.snap +2 -2
- package/lib/components/Toggle/Toggle.stories.tsx +1 -1
- package/lib/components/Toggle/Toggle.tsx +5 -5
- package/lib/components/Toggle/ToggleHandle.tsx +2 -3
- package/lib/components/Tooltip/Tooltip.stories.tsx +1 -1
- package/lib/components/Tooltip/Tooltip.tsx +2 -2
- package/lib/components/Tooltip/__tests__/__snapshots__/tooltip.test.tsx.snap +2 -2
- package/lib/components/UclLogoNew/UclLogo.tsx +42 -0
- package/lib/components/UclLogoNew/index.ts +2 -0
- package/lib/components/WeekPicker/WeekPicker.stories.tsx +145 -0
- package/lib/components/WeekPicker/WeekPicker.tsx +2 -2
- package/lib/components/WeekPicker/WeekPicker.types.ts +21 -0
- package/lib/components/WeekPicker/index.ts +1 -0
- package/lib/components/WeekPicker/subcomponents/CustomDatepicker.tsx +1 -1
- package/lib/components/common/Common.mdx +1 -2
- package/lib/components/index.ts +30 -3
- package/lib/hooks/useFocusTrap.ts +40 -4
- package/lib/index.ts +1 -0
- package/lib/theme/Colours.mdx +1 -1
- package/lib/theme/Theme.mdx +1 -1
- package/lib/theme/Typography.mdx +1 -1
- package/lib/theme/__tests__/fonts.test.ts +37 -0
- package/lib/theme/common/themeCommon.ts +515 -0
- package/lib/theme/fonts.ts +110 -0
- package/lib/theme/index.ts +6 -6
- package/lib/theme/light/lightColour.ts +232 -0
- package/lib/theme/light/lightTheme.ts +37 -0
- package/lib/theme/{defaultTheme.ts → original/color.ts} +17 -199
- package/lib/theme/original/defaultTheme.ts +207 -0
- package/lib/theme/original/originalColourNewStructure.ts +185 -0
- package/lib/theme/useTheme.tsx +72 -15
- package/lib/types/assets.d.ts +10 -0
- package/lib/utils/__tests__/announce.test.ts +121 -0
- package/lib/utils/addAlphaToHex.ts +29 -0
- package/lib/utils/announce.ts +134 -0
- package/lib/utils/index.ts +1 -0
- package/lib/utils/scrollToTop.ts +5 -0
- package/package.json +11 -9
- package/dist/components/Button/buttonPrimaryStyle.d.ts +0 -4
- package/dist/components/Button/buttonSecondaryStyle.d.ts +0 -4
- package/dist/components/Button/buttonTertiaryStyle.d.ts +0 -4
- package/dist/components/Datepicker/subcomponents/NativeDatepicker.d.ts +0 -6
- package/dist/theme/defaultTheme.d.ts +0 -274
- package/lib/components/Accordion/Accordion.stories.tsx.NOT_READY +0 -93
- package/lib/components/Button/buttonPrimaryStyle.ts +0 -62
- package/lib/components/Button/buttonSecondaryStyle.ts +0 -65
- package/lib/components/Button/buttonTertiaryStyle.ts +0 -54
- /package/dist/components/{Datepicker/utils/dateToLocaleISOString/dateToLocaleISOString.test.d.ts → FooterNew/__tests__/Footer.test.d.ts} +0 -0
- /package/lib/components/{Datepicker → NativeDatepicker}/utils/dateToLocaleISOString/dateToLocaleISOString.test.ts +0 -0
|
@@ -23,9 +23,16 @@ export type OptionData<T> = {
|
|
|
23
23
|
icon?: React.ReactNode;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Additional props forwarded to the filter input when `filterable` is true
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
export type FilterInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'disabled' | 'ref' | 'role' | 'aria-autocomplete' | 'aria-label'>;
|
|
29
|
+
type SelectBaseProps<T = string | number> = Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> & {
|
|
30
|
+
/**
|
|
31
|
+
* Controls keyboard selection behaviour in the custom select variant.
|
|
32
|
+
* - `focus` (default): arrow keys move focus and commit value immediately.
|
|
33
|
+
* - `commit`: arrow keys only move focus; Enter or click commits value.
|
|
34
|
+
*/
|
|
35
|
+
selectionBehaviour?: 'focus' | 'commit';
|
|
29
36
|
/**
|
|
30
37
|
* An array of option data, to be rendered either natively or custom
|
|
31
38
|
*/
|
|
@@ -50,38 +57,87 @@ interface BaseSelectProps<T = string> {
|
|
|
50
57
|
* Native flag determines which implementation to use
|
|
51
58
|
*/
|
|
52
59
|
native?: boolean;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Adds a text input to filter options in the custom variant; ignored for native
|
|
62
|
+
*/
|
|
63
|
+
filterable?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Extra props to apply to the filter input when `filterable` is true
|
|
66
|
+
*/
|
|
67
|
+
filterInputProps?: FilterInputProps;
|
|
68
|
+
/**
|
|
69
|
+
* Extra attributes forwarded to the native <select> when `native` is true
|
|
70
|
+
*/
|
|
71
|
+
nativeHtmlAttributes?: React.SelectHTMLAttributes<HTMLSelectElement>;
|
|
72
|
+
/**
|
|
73
|
+
* Disable interaction
|
|
74
|
+
*/
|
|
61
75
|
disabled?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Allow long option labels to wrap instead of truncating
|
|
78
|
+
*/
|
|
62
79
|
lineBreak?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Custom className for the root element
|
|
82
|
+
*/
|
|
83
|
+
className?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Custom className for the options panel
|
|
86
|
+
*/
|
|
63
87
|
panelClassName?: string;
|
|
64
|
-
|
|
65
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Ref forwarded to the rendered element
|
|
90
|
+
* (div for custom, select for native)
|
|
91
|
+
*/
|
|
92
|
+
ref?: React.Ref<HTMLDivElement | HTMLSelectElement | null>;
|
|
93
|
+
};
|
|
94
|
+
export type NonClearableSelectProps<T = string | number> = SelectBaseProps<T> & {
|
|
95
|
+
/**
|
|
96
|
+
* Current value (controlled)
|
|
97
|
+
*/
|
|
98
|
+
value?: T;
|
|
99
|
+
/**
|
|
100
|
+
* Show a clear action in the custom variant when a value is selected
|
|
101
|
+
*/
|
|
102
|
+
clearable?: false | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Change handler for the custom variant
|
|
105
|
+
*/
|
|
106
|
+
onValueChange?: (value: T, ev: React.SyntheticEvent) => void;
|
|
107
|
+
};
|
|
108
|
+
export type ClearableSelectProps<T = string | number> = SelectBaseProps<T> & {
|
|
109
|
+
/**
|
|
110
|
+
* Current value (controlled)
|
|
111
|
+
*/
|
|
112
|
+
value?: T | null;
|
|
113
|
+
/**
|
|
114
|
+
* Show a clear action in the custom variant when a value is selected
|
|
115
|
+
*/
|
|
116
|
+
clearable: true;
|
|
117
|
+
/**
|
|
118
|
+
* Change handler for the custom variant
|
|
119
|
+
*/
|
|
120
|
+
onValueChange?: (value: T | null, ev: React.SyntheticEvent) => void;
|
|
66
121
|
};
|
|
67
122
|
/**
|
|
68
|
-
*
|
|
69
|
-
* Default props like value and onChange are passed to the <select> element automatically
|
|
123
|
+
* Public props for <Select>, used by both custom and native render paths.
|
|
70
124
|
*/
|
|
71
|
-
export type
|
|
72
|
-
|
|
73
|
-
|
|
125
|
+
export type SelectProps<T = string | number> = NonClearableSelectProps<T> | ClearableSelectProps<T>;
|
|
126
|
+
export type InternalSelectProps<T = string | number> = SelectBaseProps<T> & {
|
|
127
|
+
value?: T | null;
|
|
128
|
+
clearable?: boolean;
|
|
129
|
+
onValueChange?: (value: T | null, ev: React.SyntheticEvent) => void;
|
|
74
130
|
};
|
|
75
|
-
export type SelectProps<T> = NativeSelectProps | CustomSelectProps<T>;
|
|
76
131
|
/**
|
|
77
132
|
* Each option as displayed in the Panel of <CustomSelect>
|
|
78
133
|
* Roughly equivalent to a custom version of <option>
|
|
79
134
|
*/
|
|
80
135
|
export interface CustomOptionProps<T> extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
81
136
|
value: T;
|
|
137
|
+
optionIndex?: number;
|
|
82
138
|
testId?: string;
|
|
83
139
|
isSelected?: boolean;
|
|
84
|
-
onSelect: (event: React.MouseEvent, value: T) => void;
|
|
140
|
+
onSelect: (event: React.MouseEvent, value: T, optionIndex?: number) => void;
|
|
85
141
|
lineBreak?: boolean;
|
|
86
142
|
}
|
|
87
143
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CustomOptionProps } from '../Select.types';
|
|
2
|
-
declare const CustomOption: <T extends string | number>({ value, isSelected, onSelect, lineBreak, testId, className, children, ...props }: CustomOptionProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const CustomOption: <T extends string | number>({ value, optionIndex, isSelected, onSelect, lineBreak, testId, className, children, ...props }: CustomOptionProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default CustomOption;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { InternalSelectProps } from '../Select.types';
|
|
2
|
+
type CustomSelectProps<T> = Omit<InternalSelectProps<T>, 'native' | 'nativeHtmlAttributes'>;
|
|
3
|
+
declare const CustomSelect: <T extends string | number>({ selectionBehaviour, value, options, onValueChange, disabled, clearable, placeholder, lineBreak, filterInputProps, width, testId, className, panelClassName, filterable, ref, ...props }: CustomSelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export default CustomSelect;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FilterInputProps } from '../Select.types';
|
|
2
|
+
type FilterInputComponentProps = {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
6
|
+
onTabOut?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
inputRef?: React.RefObject<HTMLInputElement | null>;
|
|
10
|
+
className?: string;
|
|
11
|
+
ariaControls?: string;
|
|
12
|
+
ariaExpanded?: boolean;
|
|
13
|
+
ariaActiveDescendant?: string;
|
|
14
|
+
} & FilterInputProps;
|
|
15
|
+
declare const FilterInput: ({ value, onChange, onBlur, onTabOut, placeholder, disabled, inputRef, className, ariaControls, ariaExpanded, ariaActiveDescendant, ...rest }: FilterInputComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default FilterInput;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InternalSelectProps } from '../Select.types';
|
|
2
|
+
type NativeSelectProps = Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'value' | 'defaultValue'> & Omit<InternalSelectProps, 'native' | 'filterable' | 'nativeHtmlAttributes' | 'onValueChange' | 'ref'> & {
|
|
3
|
+
value?: string | number;
|
|
4
|
+
ref?: React.Ref<HTMLSelectElement>;
|
|
5
|
+
};
|
|
2
6
|
declare const NativeSelect: ({ options, width, disabled, placeholder, testId, className, ...props }: NativeSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
7
|
export default NativeSelect;
|
|
@@ -4,6 +4,11 @@ interface VisibleFieldProps<T> {
|
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
selectedOption: OptionData<T> | null | undefined;
|
|
6
6
|
placeholder?: string;
|
|
7
|
+
filterable?: boolean;
|
|
8
|
+
clearable?: boolean;
|
|
9
|
+
onClear?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
10
|
+
clearButtonRef?: React.RefObject<HTMLButtonElement | null>;
|
|
11
|
+
children?: React.ReactNode;
|
|
7
12
|
}
|
|
8
|
-
declare const VisibleField: <T extends string | number>({ selectedOption, isOpen, placeholder, disabled, }: VisibleFieldProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const VisibleField: <T extends string | number>({ selectedOption, isOpen, placeholder, disabled, filterable, clearable, onClear, clearButtonRef, children, }: VisibleFieldProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
9
14
|
export default VisibleField;
|
|
@@ -3,3 +3,4 @@ export { default as NativeSelect } from './NativeSelect';
|
|
|
3
3
|
export { default as CustomOption } from './CustomOption';
|
|
4
4
|
export { default as Panel } from './Panel';
|
|
5
5
|
export { default as VisibleField } from './VisibleField';
|
|
6
|
+
export { default as FilterInput } from './FilterInput';
|
|
@@ -2,7 +2,9 @@ import { SVGAttributes } from 'react';
|
|
|
2
2
|
export declare const NAME = "ucl-uikit-spinner";
|
|
3
3
|
export interface SpinnerProps extends SVGAttributes<SVGSVGElement> {
|
|
4
4
|
size?: number;
|
|
5
|
+
strokeWidth?: number;
|
|
5
6
|
testId?: string;
|
|
7
|
+
inheritColour?: boolean;
|
|
6
8
|
}
|
|
7
9
|
declare const _default: import('react').NamedExoticComponent<SpinnerProps & import('react').RefAttributes<SVGSVGElement>>;
|
|
8
10
|
export default _default;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import { default as React, ComponentPropsWithoutRef, ElementType, ReactElement } from 'react';
|
|
2
2
|
import { IconProps } from '../Icon';
|
|
3
3
|
import { BaseLinkProps } from '../Link/BaseLink';
|
|
4
4
|
import { MarginProps } from '../common/marginsStyle';
|
|
5
|
-
|
|
5
|
+
type StandaloneLinkOwnProps = {
|
|
6
6
|
variant?: 'primary' | 'secondary' | 'tertiary';
|
|
7
7
|
icon?: ReactElement<IconProps>;
|
|
8
8
|
iconPosition?: 'left' | 'right';
|
|
9
|
-
}
|
|
10
|
-
export type StandaloneLinkProps =
|
|
11
|
-
|
|
9
|
+
};
|
|
10
|
+
export type StandaloneLinkProps<C extends ElementType = 'a'> = StandaloneLinkOwnProps & BaseLinkProps<C> & MarginProps & Omit<ComponentPropsWithoutRef<C>, keyof StandaloneLinkOwnProps>;
|
|
11
|
+
type StandaloneLinkComponent = <C extends ElementType = 'a'>(props: StandaloneLinkProps<C> & {
|
|
12
|
+
ref?: React.ComponentPropsWithRef<C>['ref'];
|
|
13
|
+
}) => React.JSX.Element;
|
|
14
|
+
declare const StandaloneLink: StandaloneLinkComponent;
|
|
12
15
|
export default StandaloneLink;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import('react').
|
|
4
|
+
component: <C extends import('react').ElementType = "a">(props: import('./StandaloneLink').StandaloneLinkProps<C> & {
|
|
5
|
+
ref?: React.ComponentPropsWithRef<C>["ref"];
|
|
6
|
+
}) => React.JSX.Element;
|
|
5
7
|
args: {
|
|
6
8
|
children: string;
|
|
7
9
|
href: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TableProps } from './Table.types';
|
|
2
2
|
declare const Table: {
|
|
3
|
-
({ testId, className, children, ref, ...props }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
({ testId, className, children, ref, ariaLabel, ...props }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
Head: ({ className, children, ...props }: import('./subcomponents').TableHeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
HeadCell: ({ variant, accessor, sort, onSortChange, showSortIcon, checked, onCheck, testId, className, children, ...props }: import('./subcomponents').TableHeadCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
HeadCell: ({ variant, accessor, sort, onSortChange, showSortIcon, checked, onCheck, testId, className, children, checkboxAriaLabel, ...props }: import('./subcomponents').TableHeadCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
Body: ({ className, children, ...props }: import('./subcomponents').TableBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
Row: ({ selected, className, children, ...props }: import('./subcomponents').TableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
Cell: ({ variant, icon, onCheck, checked, onButtonClick, testId, className, children, ...props }: import('./subcomponents').TableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
Cell: ({ variant, icon, onCheck, checked, onButtonClick, testId, className, children, checkboxProps, buttonProps, ...props }: import('./subcomponents').TableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
};
|
|
10
10
|
export default Table;
|
|
@@ -2,12 +2,12 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: {
|
|
5
|
-
({ testId, className, children, ref, ...props }: import('./Table.types').TableProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
({ testId, className, children, ref, ariaLabel, ...props }: import('./Table.types').TableProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
Head: ({ className, children, ...props }: import('./subcomponents').TableHeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
HeadCell: ({ variant, accessor, sort, onSortChange, showSortIcon, checked, onCheck, testId, className, children, ...props }: import('./subcomponents').TableHeadCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
HeadCell: ({ variant, accessor, sort, onSortChange, showSortIcon, checked, onCheck, testId, className, children, checkboxAriaLabel, ...props }: import('./subcomponents').TableHeadCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
Body: ({ className, children, ...props }: import('./subcomponents').TableBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
Row: ({ selected, className, children, ...props }: import('./subcomponents').TableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
Cell: ({ variant, icon, onCheck, checked, onButtonClick, testId, className, children, ...props }: import('./subcomponents').TableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
Cell: ({ variant, icon, onCheck, checked, onButtonClick, testId, className, children, checkboxProps, buttonProps, ...props }: import('./subcomponents').TableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
};
|
|
12
12
|
parameters: {
|
|
13
13
|
layout: string;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ColumnVariant } from '../../Table.types';
|
|
2
|
+
import { CheckboxProps } from '../../../Checkbox/Checkbox';
|
|
3
|
+
import { ButtonProps } from '../../../Button';
|
|
2
4
|
export interface TableCellProps extends React.HTMLAttributes<HTMLTableCellElement> {
|
|
3
5
|
variant?: ColumnVariant;
|
|
4
6
|
icon?: React.ReactNode;
|
|
@@ -7,6 +9,8 @@ export interface TableCellProps extends React.HTMLAttributes<HTMLTableCellElemen
|
|
|
7
9
|
onButtonClick?: (event: React.UIEvent) => void;
|
|
8
10
|
className?: string;
|
|
9
11
|
testId?: string;
|
|
12
|
+
checkboxProps?: Omit<CheckboxProps, 'checked' | 'onChange'>;
|
|
13
|
+
buttonProps?: Omit<ButtonProps<'button'>, 'variant' | 'onClick' | 'className'>;
|
|
10
14
|
}
|
|
11
|
-
declare const Cell: ({ variant, icon, onCheck, checked, onButtonClick, testId, className, children, ...props }: TableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare const Cell: ({ variant, icon, onCheck, checked, onButtonClick, testId, className, children, checkboxProps, buttonProps, ...props }: TableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
16
|
export default Cell;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ variant, icon, onCheck, checked, onButtonClick, testId, className, children, ...props }: import('./Cell').TableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ variant, icon, onCheck, checked, onButtonClick, testId, className, children, checkboxProps, buttonProps, ...props }: import('./Cell').TableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
parameters: {
|
|
6
6
|
layout: string;
|
|
7
7
|
};
|
|
@@ -17,6 +17,8 @@ declare const meta: {
|
|
|
17
17
|
onButtonClick?: ((event: React.UIEvent) => void) | undefined;
|
|
18
18
|
className?: string | undefined;
|
|
19
19
|
testId?: string | undefined;
|
|
20
|
+
checkboxProps?: Omit<import('../../..').CheckboxProps, "checked" | "onChange"> | undefined;
|
|
21
|
+
buttonProps?: Omit<import('../../..').ButtonProps<"button">, "variant" | "onClick" | "className"> | undefined;
|
|
20
22
|
defaultChecked?: boolean | undefined | undefined;
|
|
21
23
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
22
24
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -63,7 +65,7 @@ declare const meta: {
|
|
|
63
65
|
results?: number | undefined | undefined;
|
|
64
66
|
security?: string | undefined | undefined;
|
|
65
67
|
unselectable?: "on" | "off" | undefined | undefined;
|
|
66
|
-
popover?: "" | "auto" | "manual" | undefined | undefined;
|
|
68
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
|
|
67
69
|
popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
|
|
68
70
|
popoverTarget?: string | undefined | undefined;
|
|
69
71
|
inert?: boolean | undefined | undefined;
|
|
@@ -144,18 +146,18 @@ declare const meta: {
|
|
|
144
146
|
onFocusCapture?: import('react').FocusEventHandler<HTMLTableCellElement> | undefined;
|
|
145
147
|
onBlur?: import('react').FocusEventHandler<HTMLTableCellElement> | undefined;
|
|
146
148
|
onBlurCapture?: import('react').FocusEventHandler<HTMLTableCellElement> | undefined;
|
|
147
|
-
onChange?: import('react').
|
|
148
|
-
onChangeCapture?: import('react').
|
|
149
|
+
onChange?: import('react').ChangeEventHandler<HTMLTableCellElement, Element> | undefined;
|
|
150
|
+
onChangeCapture?: import('react').ChangeEventHandler<HTMLTableCellElement, Element> | undefined;
|
|
149
151
|
onBeforeInput?: import('react').InputEventHandler<HTMLTableCellElement> | undefined;
|
|
150
|
-
onBeforeInputCapture?: import('react').
|
|
151
|
-
onInput?: import('react').
|
|
152
|
-
onInputCapture?: import('react').
|
|
153
|
-
onReset?: import('react').
|
|
154
|
-
onResetCapture?: import('react').
|
|
155
|
-
onSubmit?: import('react').
|
|
156
|
-
onSubmitCapture?: import('react').
|
|
157
|
-
onInvalid?: import('react').
|
|
158
|
-
onInvalidCapture?: import('react').
|
|
152
|
+
onBeforeInputCapture?: import('react').InputEventHandler<HTMLTableCellElement> | undefined;
|
|
153
|
+
onInput?: import('react').InputEventHandler<HTMLTableCellElement> | undefined;
|
|
154
|
+
onInputCapture?: import('react').InputEventHandler<HTMLTableCellElement> | undefined;
|
|
155
|
+
onReset?: import('react').ReactEventHandler<HTMLTableCellElement> | undefined;
|
|
156
|
+
onResetCapture?: import('react').ReactEventHandler<HTMLTableCellElement> | undefined;
|
|
157
|
+
onSubmit?: import('react').SubmitEventHandler<HTMLTableCellElement> | undefined;
|
|
158
|
+
onSubmitCapture?: import('react').SubmitEventHandler<HTMLTableCellElement> | undefined;
|
|
159
|
+
onInvalid?: import('react').ReactEventHandler<HTMLTableCellElement> | undefined;
|
|
160
|
+
onInvalidCapture?: import('react').ReactEventHandler<HTMLTableCellElement> | undefined;
|
|
159
161
|
onLoad?: import('react').ReactEventHandler<HTMLTableCellElement> | undefined;
|
|
160
162
|
onLoadCapture?: import('react').ReactEventHandler<HTMLTableCellElement> | undefined;
|
|
161
163
|
onError?: import('react').ReactEventHandler<HTMLTableCellElement> | undefined;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import { CheckboxProps } from '../../../Checkbox/Checkbox';
|
|
2
|
+
import { ButtonProps } from '../../../Button';
|
|
1
3
|
import { ColumnVariant } from '../../Table.types';
|
|
2
4
|
interface CellContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
5
|
variant: ColumnVariant;
|
|
4
6
|
icon?: React.ReactNode;
|
|
5
7
|
checked?: boolean;
|
|
8
|
+
checkboxProps?: Omit<CheckboxProps, 'checked' | 'onChange'>;
|
|
9
|
+
buttonProps?: Omit<ButtonProps<'button'>, 'variant' | 'onClick' | 'className'>;
|
|
6
10
|
handleCheckboxChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
11
|
handleButtonClick: (event: React.UIEvent) => void;
|
|
8
12
|
}
|
|
9
|
-
declare const CellContent: ({ variant, icon, checked, handleCheckboxChange, handleButtonClick, children, }: CellContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const CellContent: ({ variant, icon, checked, checkboxProps, buttonProps, handleCheckboxChange, handleButtonClick, children, }: CellContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
14
|
export default CellContent;
|
|
@@ -8,6 +8,7 @@ export interface TableHeadCellProps extends React.HTMLAttributes<HTMLTableCellEl
|
|
|
8
8
|
checked?: boolean;
|
|
9
9
|
onCheck?: (checked: boolean, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
10
|
testId?: string;
|
|
11
|
+
checkboxAriaLabel?: string;
|
|
11
12
|
}
|
|
12
|
-
declare const HeadCell: ({ variant, accessor, sort, onSortChange, showSortIcon, checked, onCheck, testId, className, children, ...props }: TableHeadCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const HeadCell: ({ variant, accessor, sort, onSortChange, showSortIcon, checked, onCheck, testId, className, children, checkboxAriaLabel, ...props }: TableHeadCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export default HeadCell;
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
import { SortOrder } from '../../Table.types';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ variant, accessor, sort, onSortChange, showSortIcon, checked, onCheck, testId, className, children, ...props }: import('./HeadCell').TableHeadCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
component: ({ variant, accessor, sort, onSortChange, showSortIcon, checked, onCheck, testId, className, children, checkboxAriaLabel, ...props }: import('./HeadCell').TableHeadCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: string;
|
|
8
8
|
};
|
|
@@ -23,6 +23,7 @@ declare const meta: {
|
|
|
23
23
|
checked?: boolean | undefined;
|
|
24
24
|
onCheck?: ((checked: boolean, event: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
25
25
|
testId?: string | undefined;
|
|
26
|
+
checkboxAriaLabel?: string | undefined;
|
|
26
27
|
defaultChecked?: boolean | undefined | undefined;
|
|
27
28
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
28
29
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -70,7 +71,7 @@ declare const meta: {
|
|
|
70
71
|
results?: number | undefined | undefined;
|
|
71
72
|
security?: string | undefined | undefined;
|
|
72
73
|
unselectable?: "on" | "off" | undefined | undefined;
|
|
73
|
-
popover?: "" | "auto" | "manual" | undefined | undefined;
|
|
74
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
|
|
74
75
|
popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
|
|
75
76
|
popoverTarget?: string | undefined | undefined;
|
|
76
77
|
inert?: boolean | undefined | undefined;
|
|
@@ -151,18 +152,18 @@ declare const meta: {
|
|
|
151
152
|
onFocusCapture?: import('react').FocusEventHandler<HTMLTableCellElement> | undefined;
|
|
152
153
|
onBlur?: import('react').FocusEventHandler<HTMLTableCellElement> | undefined;
|
|
153
154
|
onBlurCapture?: import('react').FocusEventHandler<HTMLTableCellElement> | undefined;
|
|
154
|
-
onChange?: import('react').
|
|
155
|
-
onChangeCapture?: import('react').
|
|
155
|
+
onChange?: import('react').ChangeEventHandler<HTMLTableCellElement, Element> | undefined;
|
|
156
|
+
onChangeCapture?: import('react').ChangeEventHandler<HTMLTableCellElement, Element> | undefined;
|
|
156
157
|
onBeforeInput?: import('react').InputEventHandler<HTMLTableCellElement> | undefined;
|
|
157
|
-
onBeforeInputCapture?: import('react').
|
|
158
|
-
onInput?: import('react').
|
|
159
|
-
onInputCapture?: import('react').
|
|
160
|
-
onReset?: import('react').
|
|
161
|
-
onResetCapture?: import('react').
|
|
162
|
-
onSubmit?: import('react').
|
|
163
|
-
onSubmitCapture?: import('react').
|
|
164
|
-
onInvalid?: import('react').
|
|
165
|
-
onInvalidCapture?: import('react').
|
|
158
|
+
onBeforeInputCapture?: import('react').InputEventHandler<HTMLTableCellElement> | undefined;
|
|
159
|
+
onInput?: import('react').InputEventHandler<HTMLTableCellElement> | undefined;
|
|
160
|
+
onInputCapture?: import('react').InputEventHandler<HTMLTableCellElement> | undefined;
|
|
161
|
+
onReset?: import('react').ReactEventHandler<HTMLTableCellElement> | undefined;
|
|
162
|
+
onResetCapture?: import('react').ReactEventHandler<HTMLTableCellElement> | undefined;
|
|
163
|
+
onSubmit?: import('react').SubmitEventHandler<HTMLTableCellElement> | undefined;
|
|
164
|
+
onSubmitCapture?: import('react').SubmitEventHandler<HTMLTableCellElement> | undefined;
|
|
165
|
+
onInvalid?: import('react').ReactEventHandler<HTMLTableCellElement> | undefined;
|
|
166
|
+
onInvalidCapture?: import('react').ReactEventHandler<HTMLTableCellElement> | undefined;
|
|
166
167
|
onLoad?: import('react').ReactEventHandler<HTMLTableCellElement> | undefined;
|
|
167
168
|
onLoadCapture?: import('react').ReactEventHandler<HTMLTableCellElement> | undefined;
|
|
168
169
|
onError?: import('react').ReactEventHandler<HTMLTableCellElement> | undefined;
|
|
@@ -4,7 +4,8 @@ interface HeadCellContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
4
4
|
sort: SortOrder;
|
|
5
5
|
showSortIcon: boolean;
|
|
6
6
|
checked: boolean;
|
|
7
|
+
checkboxAriaLabel: string;
|
|
7
8
|
onCheckboxChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
9
|
}
|
|
9
|
-
declare const HeadCellContent: ({ variant, sort, showSortIcon, checked, onCheckboxChange, children, }: HeadCellContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const HeadCellContent: ({ variant, sort, showSortIcon, checked, onCheckboxChange, checkboxAriaLabel, children, }: HeadCellContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export default HeadCellContent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SVGAttributes } from 'react';
|
|
2
|
+
export declare const NAME = "ucl-uikit-logo";
|
|
3
|
+
export interface UclLogoProps extends SVGAttributes<SVGElement> {
|
|
4
|
+
variant?: 'primary' | 'secondary' | 'primary-inverse' | 'secondary-inverse';
|
|
5
|
+
testId?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('react').MemoExoticComponent<({ variant, testId, ...props }: UclLogoProps) => import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const WeekPicker: ({ value, onValueChange, minDate, maxDate, disabled, className, ...props }:
|
|
1
|
+
import { WeekPickerProps } from './WeekPicker.types';
|
|
2
|
+
declare const WeekPicker: ({ value, onValueChange, minDate, maxDate, disabled, className, ...props }: WeekPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default WeekPicker;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ value, onValueChange, minDate, maxDate, disabled, className, ...props }: import('./WeekPicker.types').WeekPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
argTypes: {
|
|
9
|
+
value: {
|
|
10
|
+
control: {
|
|
11
|
+
type: "date";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
minDate: {
|
|
15
|
+
control: {
|
|
16
|
+
type: "date";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
maxDate: {
|
|
20
|
+
control: {
|
|
21
|
+
type: "date";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
disabled: {
|
|
25
|
+
control: {
|
|
26
|
+
type: "boolean";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
showAcademicWeeks: {
|
|
30
|
+
control: {
|
|
31
|
+
type: "boolean";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
tags: string[];
|
|
36
|
+
};
|
|
37
|
+
export default meta;
|
|
38
|
+
type Story = StoryObj<typeof meta>;
|
|
39
|
+
export declare const Default: Story;
|
|
40
|
+
export declare const WithAcademicWeeks: Story;
|
|
41
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HTMLAttributes, RefObject } from 'react';
|
|
2
|
+
import { CalendarEvent, AcademicWeek } from '../Calendar';
|
|
3
|
+
export type DatepickerValue = Date | null;
|
|
4
|
+
export interface WeekPickerProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
value?: DatepickerValue;
|
|
6
|
+
onValueChange?: (value: DatepickerValue, event?: React.SyntheticEvent) => void;
|
|
7
|
+
minDate?: string | null;
|
|
8
|
+
maxDate?: string | null;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
events?: CalendarEvent[];
|
|
11
|
+
showAcademicWeeks?: boolean;
|
|
12
|
+
academicWeeks?: AcademicWeek[];
|
|
13
|
+
testId?: string;
|
|
14
|
+
ref?: RefObject<HTMLDivElement>;
|
|
15
|
+
inputRef?: RefObject<HTMLInputElement>;
|
|
16
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DatepickerValue } from '
|
|
1
|
+
import { DatepickerValue } from '../WeekPicker.types';
|
|
2
2
|
import { CalendarEvent, AcademicWeek } from '../../Calendar';
|
|
3
3
|
interface CustomDatepickerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
value?: DatepickerValue;
|
|
@@ -26,14 +26,20 @@ export { default as Textarea } from './Textarea';
|
|
|
26
26
|
export type { TextareaProps } from './Textarea';
|
|
27
27
|
export { default as Heading } from './Heading';
|
|
28
28
|
export type { HeadingProps } from './Heading';
|
|
29
|
+
export { default as HeadingNew } from './HeadingNew';
|
|
30
|
+
export type { HeadingProps as HeadingNewProps } from './HeadingNew';
|
|
29
31
|
export { default as Paragraph } from './Paragraph';
|
|
30
32
|
export type { ParagraphProps } from './Paragraph';
|
|
33
|
+
export { default as ParagraphNew } from './ParagraphNew';
|
|
34
|
+
export type { ParagraphProps as ParagraphNewProps } from './ParagraphNew';
|
|
31
35
|
export { default as Text } from './Paragraph';
|
|
32
36
|
export type { TextProps } from './Paragraph';
|
|
33
37
|
export { default as Modal } from './Modal';
|
|
34
38
|
export type { ModalProps } from './Modal';
|
|
35
39
|
export { UclLogo } from './UclLogo';
|
|
36
40
|
export type { UclLogoProps } from './UclLogo';
|
|
41
|
+
export { UclLogoNew } from './UclLogoNew';
|
|
42
|
+
export type { UclLogoProps as UclLogoNewProps } from './UclLogoNew';
|
|
37
43
|
export { UclLogoNegativeSpace } from './UclLogo';
|
|
38
44
|
export type { UclLogoNegativeSpaceProps } from './UclLogo';
|
|
39
45
|
export { default as Tooltip } from './Tooltip';
|
|
@@ -50,14 +56,20 @@ export { default as AppMenu } from './AppMenu';
|
|
|
50
56
|
export type { AppMenuProps } from './AppMenu';
|
|
51
57
|
export { default as Menu } from './Menu';
|
|
52
58
|
export type { MenuProps } from './Menu';
|
|
59
|
+
export { default as MenuNew } from './MenuNew';
|
|
60
|
+
export type { MenuProps as MenuNewProps } from './MenuNew';
|
|
53
61
|
export { default as Select } from './Select';
|
|
54
62
|
export type { SelectProps } from './Select';
|
|
55
63
|
export { default as Footer } from './Footer';
|
|
56
64
|
export type { FooterProps } from './Footer';
|
|
65
|
+
export { default as FooterNew } from './FooterNew';
|
|
66
|
+
export type { FooterProps as FooterNewProps } from './FooterNew';
|
|
57
67
|
export { default as Divider } from './Divider';
|
|
58
68
|
export type { DividerProps } from './Divider';
|
|
59
69
|
export { default as Header } from './Header';
|
|
60
70
|
export type { HeaderProps } from './Header';
|
|
71
|
+
export { default as HeaderNew } from './HeaderNew';
|
|
72
|
+
export type { HeaderProps as HeaderNewProps } from './HeaderNew';
|
|
61
73
|
export { default as HeaderDraft } from './HeaderDraft';
|
|
62
74
|
export type { HeaderDraftProps } from './HeaderDraft';
|
|
63
75
|
export { default as Table } from './Table';
|
|
@@ -67,6 +79,8 @@ export type { AlertProps } from './Alert';
|
|
|
67
79
|
export { default as Tabs } from './Tabs';
|
|
68
80
|
export type { TabsProps } from './Tabs';
|
|
69
81
|
export type { TabProps } from './Tabs/Tab';
|
|
82
|
+
export { default as Accordion } from './Accordion';
|
|
83
|
+
export type { AccordionProps } from './Accordion';
|
|
70
84
|
export { default as Field } from './Field';
|
|
71
85
|
export type { FieldProps } from './Field';
|
|
72
86
|
export { default as Pagination } from './Pagination';
|
|
@@ -79,6 +93,8 @@ export { default as Radio, LabelledRadio } from './Radio';
|
|
|
79
93
|
export type { RadioProps, LabelledRadioProps } from './Radio';
|
|
80
94
|
export { default as Datepicker } from './Datepicker';
|
|
81
95
|
export type { DatepickerProps } from './Datepicker';
|
|
96
|
+
export { default as NativeDatepicker } from './NativeDatepicker';
|
|
97
|
+
export type { NativeDatepickerProps } from './NativeDatepicker';
|
|
82
98
|
export { default as Calendar } from './Calendar';
|
|
83
99
|
export type { CalendarProps } from './Calendar';
|
|
84
100
|
export { default as WeekPicker } from './WeekPicker';
|
|
@@ -90,3 +106,7 @@ export { default as CookieNotice } from './CookieNotice';
|
|
|
90
106
|
export type { CookieNoticeProps } from './CookieNotice';
|
|
91
107
|
export { default as Search } from './Search';
|
|
92
108
|
export type { SearchProps } from './Search';
|
|
109
|
+
export { default as Layout } from './Layout';
|
|
110
|
+
export type { LayoutProps } from './Layout';
|
|
111
|
+
export { default as Main } from './Main';
|
|
112
|
+
export type { MainProps } from './Main';
|
|
@@ -4,6 +4,7 @@ interface UseFocusTrapOptions {
|
|
|
4
4
|
initialFocusRef?: React.RefObject<HTMLElement>;
|
|
5
5
|
finalFocusRef?: React.RefObject<HTMLElement>;
|
|
6
6
|
restoreFocus?: boolean;
|
|
7
|
+
skipFirstFocusable?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare const useFocusTrap: ({ isActive, containerRef, initialFocusRef, finalFocusRef, restoreFocus, }: UseFocusTrapOptions) => void;
|
|
9
|
+
export declare const useFocusTrap: ({ isActive, containerRef, initialFocusRef, finalFocusRef, restoreFocus, skipFirstFocusable, }: UseFocusTrapOptions) => void;
|
|
9
10
|
export {};
|