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
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import { default as React,
|
|
2
|
-
|
|
3
|
-
component?: ElementType;
|
|
1
|
+
import { default as React, ComponentPropsWithoutRef, ElementType } from 'react';
|
|
2
|
+
type BaseLinkOwnProps = {
|
|
4
3
|
size?: 'small' | 'default';
|
|
5
4
|
noVisited?: boolean;
|
|
6
5
|
disabled?: boolean;
|
|
7
6
|
testId?: string;
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
className?: string;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
to?: string;
|
|
10
|
+
};
|
|
11
|
+
type PolymorphicRef<C extends ElementType> = React.ComponentPropsWithRef<C>['ref'];
|
|
12
|
+
export type BaseLinkProps<C extends ElementType = 'a'> = BaseLinkOwnProps & {
|
|
13
|
+
component?: C;
|
|
14
|
+
} & Omit<ComponentPropsWithoutRef<C>, keyof BaseLinkOwnProps | 'component' | 'disabled'>;
|
|
15
|
+
type BaseLinkComponent = <C extends ElementType = 'a'>(props: BaseLinkProps<C> & {
|
|
16
|
+
ref?: PolymorphicRef<C>;
|
|
17
|
+
}) => React.JSX.Element;
|
|
18
|
+
declare const BaseLink: BaseLinkComponent;
|
|
10
19
|
export default BaseLink;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import { default as React, ComponentPropsWithoutRef, ElementType } from 'react';
|
|
1
2
|
import { BaseLinkProps } from './BaseLink';
|
|
2
|
-
|
|
3
|
+
type LinkOwnProps = {
|
|
3
4
|
variant?: 'primary' | 'secondary';
|
|
4
|
-
}
|
|
5
|
-
|
|
5
|
+
};
|
|
6
|
+
export type LinkProps<C extends ElementType = 'a'> = LinkOwnProps & BaseLinkProps<C> & Omit<ComponentPropsWithoutRef<C>, keyof LinkOwnProps>;
|
|
7
|
+
type LinkComponent = <C extends ElementType = 'a'>(props: LinkProps<C> & {
|
|
8
|
+
ref?: React.ComponentPropsWithRef<C>['ref'];
|
|
9
|
+
}) => React.JSX.Element;
|
|
10
|
+
declare const Link: LinkComponent;
|
|
6
11
|
export default Link;
|
|
@@ -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('./Link').LinkProps<C> & {
|
|
5
|
+
ref?: React.ComponentPropsWithRef<C>["ref"];
|
|
6
|
+
}) => React.JSX.Element;
|
|
5
7
|
args: {
|
|
6
8
|
children: string;
|
|
7
9
|
href: string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface MainProps extends React.HTMLAttributes<HTMLElement> {
|
|
2
|
+
/**
|
|
3
|
+
* Determines whether to wrap children in a `<Layout>` component,
|
|
4
|
+
* to apply the grid layout from the UCL Design System.
|
|
5
|
+
*/
|
|
6
|
+
layout?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* ID for testing purposes.
|
|
9
|
+
* Added to the `data-testid` attribute of top-level `<main>` element.
|
|
10
|
+
* Default is `'ucl-uikit-main'`.
|
|
11
|
+
*/
|
|
12
|
+
testId?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const NAME = "ucl-uikit-main";
|
|
15
|
+
/**
|
|
16
|
+
* Semantic wrapper around HTML `<main>` element
|
|
17
|
+
*
|
|
18
|
+
* Optionally wraps children in the UCL Design System `Layout` grid when `layout` is true
|
|
19
|
+
*/
|
|
20
|
+
declare const Main: ({ layout, testId, className, children, ...props }: MainProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default Main;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as Main } from './Main';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ layout, testId, className, children, ...props }: import('./Main').MainProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof Main>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const WithLayout: Story;
|
|
15
|
+
export declare const WithChildren: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface IContext {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
toggleMenu: () => void;
|
|
5
|
+
triggerRef: React.RefObject<HTMLButtonElement | null>;
|
|
6
|
+
contentRef: React.RefObject<HTMLDivElement | null>;
|
|
7
|
+
}
|
|
8
|
+
export declare const AppMenuContext: React.Context<IContext>;
|
|
9
|
+
export declare const useAppMenu: () => IContext;
|
|
10
|
+
declare const MenuProvider: ({ defaultOpen, children, }: {
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default MenuProvider;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { default as MenuItem } from './MenuItem';
|
|
3
|
+
import { default as MenuSection } from './MenuSection';
|
|
4
|
+
import { ButtonMenuTriggerProps } from './trigger/ButtonMenuTrigger';
|
|
5
|
+
export declare const NAME = "ucl-uikit-menu";
|
|
6
|
+
export interface MenuProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
title?: string;
|
|
9
|
+
menuId?: string;
|
|
10
|
+
position?: 'left' | 'right';
|
|
11
|
+
trigger?: React.ComponentType<ButtonMenuTriggerProps>;
|
|
12
|
+
testId?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface IMenuSubComponents {
|
|
15
|
+
Section: typeof MenuSection;
|
|
16
|
+
Item: typeof MenuItem;
|
|
17
|
+
}
|
|
18
|
+
declare const MemoMenu: import('react').MemoExoticComponent<({ defaultOpen, title, position, trigger, menuId, testId, children, className, ...props }: MenuProps) => import("react/jsx-runtime").JSX.Element>;
|
|
19
|
+
declare const MenuWithSubComponents: typeof MemoMenu & IMenuSubComponents;
|
|
20
|
+
export default MenuWithSubComponents;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React, HTMLAttributes } from 'react';
|
|
2
|
+
export declare const NAME = "ucl-uikit-menu__content";
|
|
3
|
+
export interface MenuContentProps extends HTMLAttributes<HTMLUListElement> {
|
|
4
|
+
title?: string;
|
|
5
|
+
testId?: string;
|
|
6
|
+
position?: 'left' | 'right';
|
|
7
|
+
}
|
|
8
|
+
declare const _default: React.NamedExoticComponent<MenuContentProps>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React, LiHTMLAttributes } from 'react';
|
|
2
|
+
export declare const NAME = "ucl-uikit-menu__item";
|
|
3
|
+
export interface MenuItemProps extends LiHTMLAttributes<HTMLLIElement> {
|
|
4
|
+
testId?: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
secondary?: boolean;
|
|
7
|
+
externalLink?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: React.NamedExoticComponent<MenuItemProps>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React, HTMLAttributes } from 'react';
|
|
2
|
+
export declare const NAME = "ucl-uikit-menu__section";
|
|
3
|
+
export interface MenuSectionProps extends HTMLAttributes<HTMLLIElement> {
|
|
4
|
+
testId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const MenuSection: React.FC<MenuSectionProps>;
|
|
7
|
+
export default MenuSection;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default } from './Menu';
|
|
2
|
+
export type { MenuProps } from './Menu';
|
|
3
|
+
export { default as MenuContent } from './MenuContent';
|
|
4
|
+
export type { MenuContentProps } from './MenuContent';
|
|
5
|
+
export { default as ButtonMenuTrigger } from './trigger/ButtonMenuTrigger';
|
|
6
|
+
export type { ButtonMenuTriggerProps } from './trigger/ButtonMenuTrigger';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IconButtonProps } from '../../IconButton';
|
|
2
|
+
export declare const NAME = "ucl-uikit-menu__trigger--button";
|
|
3
|
+
export declare const DEFAULT_ARIA_LABEL = "Menu button";
|
|
4
|
+
export interface ButtonMenuTriggerProps extends IconButtonProps {
|
|
5
|
+
ariaLabel?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('react').MemoExoticComponent<({ id, ariaLabel, className, ...props }: ButtonMenuTriggerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IconButtonProps } from '../../IconButton';
|
|
2
|
+
export declare const NAME = "ucl-uikit-menu__trigger--icon";
|
|
3
|
+
export declare const DEFAULT_ARIA_LABEL = "Menu button";
|
|
4
|
+
export interface IconMenuTriggerProps extends IconButtonProps {
|
|
5
|
+
ariaLabel?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('react').MemoExoticComponent<({ id, ariaLabel, className, ...props }: IconMenuTriggerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { NativeDatepickerProps } from './NativeDatepicker.types';
|
|
2
|
+
declare const NativeDatepicker: ({ value, onValueChange, minDate, maxDate, className, disabled, testId, ref, ...props }: NativeDatepickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default NativeDatepicker;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ value, onValueChange, minDate, maxDate, className, disabled, testId, ref, ...props }: import('./NativeDatepicker.types').NativeDatepickerProps) => 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
|
+
};
|
|
30
|
+
tags: string[];
|
|
31
|
+
};
|
|
32
|
+
export default meta;
|
|
33
|
+
type Story = StoryObj<typeof meta>;
|
|
34
|
+
export declare const Default: Story;
|
|
35
|
+
export declare const Disabled: Story;
|
|
36
|
+
export declare const WithMinMaxDates: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InputHTMLAttributes, RefObject } from 'react';
|
|
2
|
+
export type DatepickerValue = Date | null;
|
|
3
|
+
export interface NativeDatepickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'min' | 'max'> {
|
|
4
|
+
value?: DatepickerValue;
|
|
5
|
+
onValueChange?: (value: DatepickerValue, event?: React.SyntheticEvent) => void;
|
|
6
|
+
minDate?: string | null;
|
|
7
|
+
maxDate?: string | null;
|
|
8
|
+
testId?: string;
|
|
9
|
+
ref?: RefObject<HTMLInputElement>;
|
|
10
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a Date object to a `YYYY-MM-DD` string based on the user's local timezone.
|
|
3
3
|
*
|
|
4
|
-
* Used for passing dates to <NativeDatepicker>
|
|
4
|
+
* Used for passing dates to <NativeDatepicker>
|
|
5
5
|
*
|
|
6
6
|
* This function uses the Swedish (`sv-SE`) locale with `toLocaleDateString`
|
|
7
7
|
* as it conveniently defaults to the ISO 8601 `YYYY-MM-DD` format, while respecting
|
package/dist/components/NativeDatepicker/utils/dateToLocaleISOString/dateToLocaleISOString.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as dateToLocaleISOString } from './dateToLocaleISOString/dateToLocaleISOString';
|
|
@@ -96,7 +96,7 @@ declare const meta: {
|
|
|
96
96
|
results?: number | undefined | undefined;
|
|
97
97
|
security?: string | undefined | undefined;
|
|
98
98
|
unselectable?: "on" | "off" | undefined | undefined;
|
|
99
|
-
popover?: "" | "auto" | "manual" | undefined | undefined;
|
|
99
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
|
|
100
100
|
popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
|
|
101
101
|
popoverTarget?: string | undefined | undefined;
|
|
102
102
|
inert?: boolean | undefined | undefined;
|
|
@@ -177,18 +177,18 @@ declare const meta: {
|
|
|
177
177
|
onFocusCapture?: import('react').FocusEventHandler<HTMLDivElement> | undefined;
|
|
178
178
|
onBlur?: import('react').FocusEventHandler<HTMLDivElement> | undefined;
|
|
179
179
|
onBlurCapture?: import('react').FocusEventHandler<HTMLDivElement> | undefined;
|
|
180
|
-
onChange?: import('react').
|
|
181
|
-
onChangeCapture?: import('react').
|
|
180
|
+
onChange?: import('react').ChangeEventHandler<HTMLDivElement, Element> | undefined;
|
|
181
|
+
onChangeCapture?: import('react').ChangeEventHandler<HTMLDivElement, Element> | undefined;
|
|
182
182
|
onBeforeInput?: import('react').InputEventHandler<HTMLDivElement> | undefined;
|
|
183
|
-
onBeforeInputCapture?: import('react').
|
|
184
|
-
onInput?: import('react').
|
|
185
|
-
onInputCapture?: import('react').
|
|
186
|
-
onReset?: import('react').
|
|
187
|
-
onResetCapture?: import('react').
|
|
188
|
-
onSubmit?: import('react').
|
|
189
|
-
onSubmitCapture?: import('react').
|
|
190
|
-
onInvalid?: import('react').
|
|
191
|
-
onInvalidCapture?: import('react').
|
|
183
|
+
onBeforeInputCapture?: import('react').InputEventHandler<HTMLDivElement> | undefined;
|
|
184
|
+
onInput?: import('react').InputEventHandler<HTMLDivElement> | undefined;
|
|
185
|
+
onInputCapture?: import('react').InputEventHandler<HTMLDivElement> | undefined;
|
|
186
|
+
onReset?: import('react').ReactEventHandler<HTMLDivElement> | undefined;
|
|
187
|
+
onResetCapture?: import('react').ReactEventHandler<HTMLDivElement> | undefined;
|
|
188
|
+
onSubmit?: import('react').SubmitEventHandler<HTMLDivElement> | undefined;
|
|
189
|
+
onSubmitCapture?: import('react').SubmitEventHandler<HTMLDivElement> | undefined;
|
|
190
|
+
onInvalid?: import('react').ReactEventHandler<HTMLDivElement> | undefined;
|
|
191
|
+
onInvalidCapture?: import('react').ReactEventHandler<HTMLDivElement> | undefined;
|
|
192
192
|
onLoad?: import('react').ReactEventHandler<HTMLDivElement> | undefined;
|
|
193
193
|
onLoadCapture?: import('react').ReactEventHandler<HTMLDivElement> | undefined;
|
|
194
194
|
onError?: import('react').ReactEventHandler<HTMLDivElement> | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { MarginProps } from '../common/marginsStyle';
|
|
3
|
+
export declare const NAME = "ucl-uikit-paragrah";
|
|
4
|
+
export type ParagraphLevel = 'lg' | 'lg-medium' | 'lg-semibold' | 'lg-bold' | 'md' | 'md-medium' | 'md-semibold' | 'md-semibold' | 'md-medium-numeric' | 'sm' | 'sm-medium' | 'sm-semibold' | 'xs' | 'xs-medium';
|
|
5
|
+
export interface ParagraphBaseProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
6
|
+
level?: ParagraphLevel;
|
|
7
|
+
as?: 'p' | 'div' | 'span';
|
|
8
|
+
testId?: string;
|
|
9
|
+
ref?: React.Ref<HTMLParagraphElement>;
|
|
10
|
+
}
|
|
11
|
+
export type ParagraphProps = ParagraphBaseProps & MarginProps;
|
|
12
|
+
declare const _default: import('react').MemoExoticComponent<({ level, as, testId, className, ref, ...props }: ParagraphProps) => import("react/jsx-runtime").JSX.Element>;
|
|
13
|
+
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { SelectProps } from './Select.types';
|
|
2
|
-
|
|
2
|
+
type SelectComponent = <T extends string | number = string>(props: SelectProps<T>) => React.JSX.Element;
|
|
3
|
+
declare const Select: SelectComponent;
|
|
3
4
|
export default Select;
|
|
@@ -1,47 +1,208 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: <T extends string | number = string>(props: import('./Select.types').SelectProps<T>) =>
|
|
4
|
+
component: <T extends string | number = string>(props: import('./Select.types').SelectProps<T>) => React.JSX.Element;
|
|
5
5
|
argTypes: {
|
|
6
|
+
selectionBehaviour: {
|
|
7
|
+
description: string;
|
|
8
|
+
control: {
|
|
9
|
+
type: "radio";
|
|
10
|
+
};
|
|
11
|
+
options: string[];
|
|
12
|
+
table: {
|
|
13
|
+
type: {
|
|
14
|
+
summary: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
options: {
|
|
19
|
+
description: string;
|
|
20
|
+
control: {
|
|
21
|
+
type: "object";
|
|
22
|
+
};
|
|
23
|
+
table: {
|
|
24
|
+
type: {
|
|
25
|
+
summary: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
6
29
|
value: {
|
|
30
|
+
description: string;
|
|
7
31
|
control: {
|
|
8
32
|
type: "text";
|
|
9
33
|
};
|
|
34
|
+
table: {
|
|
35
|
+
type: {
|
|
36
|
+
summary: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
onValueChange: {
|
|
41
|
+
description: string;
|
|
42
|
+
control: false;
|
|
43
|
+
table: {
|
|
44
|
+
type: {
|
|
45
|
+
summary: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
10
48
|
};
|
|
11
49
|
native: {
|
|
50
|
+
description: string;
|
|
12
51
|
control: {
|
|
13
52
|
type: "boolean";
|
|
14
53
|
};
|
|
54
|
+
table: {
|
|
55
|
+
type: {
|
|
56
|
+
summary: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
nativeHtmlAttributes: {
|
|
61
|
+
description: string;
|
|
62
|
+
control: false;
|
|
63
|
+
table: {
|
|
64
|
+
type: {
|
|
65
|
+
summary: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
15
68
|
};
|
|
16
69
|
disabled: {
|
|
70
|
+
description: string;
|
|
17
71
|
control: {
|
|
18
72
|
type: "boolean";
|
|
19
73
|
};
|
|
74
|
+
table: {
|
|
75
|
+
type: {
|
|
76
|
+
summary: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
20
79
|
};
|
|
21
80
|
placeholder: {
|
|
81
|
+
description: string;
|
|
22
82
|
control: {
|
|
23
83
|
type: "text";
|
|
24
84
|
};
|
|
85
|
+
table: {
|
|
86
|
+
type: {
|
|
87
|
+
summary: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
25
90
|
};
|
|
26
|
-
|
|
91
|
+
filterable: {
|
|
92
|
+
description: string;
|
|
93
|
+
control: {
|
|
94
|
+
type: "boolean";
|
|
95
|
+
};
|
|
96
|
+
table: {
|
|
97
|
+
type: {
|
|
98
|
+
summary: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
clearable: {
|
|
103
|
+
description: string;
|
|
104
|
+
control: {
|
|
105
|
+
type: "boolean";
|
|
106
|
+
};
|
|
107
|
+
table: {
|
|
108
|
+
type: {
|
|
109
|
+
summary: string;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
filterInputProps: {
|
|
114
|
+
description: string;
|
|
115
|
+
control: {
|
|
116
|
+
type: "object";
|
|
117
|
+
};
|
|
118
|
+
table: {
|
|
119
|
+
type: {
|
|
120
|
+
summary: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
id: {
|
|
125
|
+
description: string;
|
|
27
126
|
control: {
|
|
28
127
|
type: "text";
|
|
29
128
|
};
|
|
129
|
+
table: {
|
|
130
|
+
type: {
|
|
131
|
+
summary: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
title: {
|
|
136
|
+
description: string;
|
|
137
|
+
control: {
|
|
138
|
+
type: "text";
|
|
139
|
+
};
|
|
140
|
+
table: {
|
|
141
|
+
type: {
|
|
142
|
+
summary: string;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
30
145
|
};
|
|
31
146
|
lineBreak: {
|
|
147
|
+
description: string;
|
|
32
148
|
control: {
|
|
33
149
|
type: "boolean";
|
|
34
150
|
};
|
|
151
|
+
table: {
|
|
152
|
+
type: {
|
|
153
|
+
summary: string;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
panelClassName: {
|
|
158
|
+
description: string;
|
|
159
|
+
control: {
|
|
160
|
+
type: "text";
|
|
161
|
+
};
|
|
162
|
+
table: {
|
|
163
|
+
type: {
|
|
164
|
+
summary: string;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
className: {
|
|
169
|
+
description: string;
|
|
170
|
+
control: {
|
|
171
|
+
type: "text";
|
|
172
|
+
};
|
|
173
|
+
table: {
|
|
174
|
+
type: {
|
|
175
|
+
summary: string;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
testId: {
|
|
180
|
+
description: string;
|
|
181
|
+
control: {
|
|
182
|
+
type: "text";
|
|
183
|
+
};
|
|
184
|
+
table: {
|
|
185
|
+
type: {
|
|
186
|
+
summary: string;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
35
189
|
};
|
|
36
190
|
};
|
|
37
191
|
args: {
|
|
192
|
+
selectionBehaviour: "focus";
|
|
38
193
|
value: undefined;
|
|
39
|
-
onChange: () => void;
|
|
40
194
|
options: {
|
|
41
195
|
label: string;
|
|
42
196
|
value: string;
|
|
43
197
|
}[];
|
|
44
198
|
};
|
|
199
|
+
parameters: {
|
|
200
|
+
docs: {
|
|
201
|
+
story: {
|
|
202
|
+
inline: boolean;
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
};
|
|
45
206
|
};
|
|
46
207
|
export default meta;
|
|
47
208
|
type Story = StoryObj<typeof meta>;
|
|
@@ -51,3 +212,6 @@ export declare const Disabled: Story;
|
|
|
51
212
|
export declare const WithPlaceholder: Story;
|
|
52
213
|
export declare const SingleLongOption: Story;
|
|
53
214
|
export declare const ManyOptions: Story;
|
|
215
|
+
export declare const filterable: Story;
|
|
216
|
+
export declare const Clearable: Story;
|
|
217
|
+
export declare const SelectionBehaviourCommit: Story;
|