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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`Radio > snapshot: checked prop 1`] = `
|
|
4
4
|
<span
|
|
5
|
-
class="ucl-uikit-radio css-
|
|
5
|
+
class="ucl-uikit-radio css-1y63xt7"
|
|
6
6
|
>
|
|
7
7
|
<input
|
|
8
8
|
checked=""
|
|
@@ -11,14 +11,14 @@ exports[`Radio > snapshot: checked prop 1`] = `
|
|
|
11
11
|
type="radio"
|
|
12
12
|
/>
|
|
13
13
|
<div
|
|
14
|
-
class="css-
|
|
14
|
+
class="css-19pto6h"
|
|
15
15
|
/>
|
|
16
16
|
</span>
|
|
17
17
|
`;
|
|
18
18
|
|
|
19
19
|
exports[`Radio > snapshot: no props 1`] = `
|
|
20
20
|
<span
|
|
21
|
-
class="ucl-uikit-radio css-
|
|
21
|
+
class="ucl-uikit-radio css-121ivaw"
|
|
22
22
|
>
|
|
23
23
|
<input
|
|
24
24
|
class="css-19qtec1"
|
|
@@ -30,7 +30,7 @@ exports[`Radio > snapshot: no props 1`] = `
|
|
|
30
30
|
|
|
31
31
|
exports[`Radio > snapshot: testId prop 1`] = `
|
|
32
32
|
<span
|
|
33
|
-
class="ucl-uikit-radio css-
|
|
33
|
+
class="ucl-uikit-radio css-121ivaw"
|
|
34
34
|
>
|
|
35
35
|
<input
|
|
36
36
|
class="css-19qtec1"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLAttributes, useState } from 'react';
|
|
1
|
+
import { HTMLAttributes, useRef, useState } from 'react';
|
|
2
2
|
import { css, cx } from '@emotion/css';
|
|
3
3
|
import { Input, Icon, IconButton, InputProps, IconButtonProps } from '../..';
|
|
4
4
|
import useTheme from '../../theme/useTheme';
|
|
@@ -38,6 +38,7 @@ const Search = ({
|
|
|
38
38
|
...props
|
|
39
39
|
}: SearchProps) => {
|
|
40
40
|
const [searchTerms, setSearchTerms] = useState<string>('');
|
|
41
|
+
const inputRef = useRef<HTMLInputElement>(null);
|
|
41
42
|
const [theme] = useTheme();
|
|
42
43
|
|
|
43
44
|
const handleSearchTermsChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
@@ -46,6 +47,7 @@ const Search = ({
|
|
|
46
47
|
|
|
47
48
|
const handleClearButtonClick = () => {
|
|
48
49
|
setSearchTerms('');
|
|
50
|
+
inputRef.current?.focus();
|
|
49
51
|
};
|
|
50
52
|
|
|
51
53
|
const handleSearchButtonClick = () => {
|
|
@@ -125,6 +127,7 @@ const Search = ({
|
|
|
125
127
|
{...props}
|
|
126
128
|
>
|
|
127
129
|
<Input
|
|
130
|
+
ref={inputRef}
|
|
128
131
|
inputClassName={inputStyle}
|
|
129
132
|
placeholder={placeholder}
|
|
130
133
|
type='text'
|
|
@@ -34,7 +34,7 @@ describe('Search', () => {
|
|
|
34
34
|
<Search />
|
|
35
35
|
</ThemeContextProvider>
|
|
36
36
|
);
|
|
37
|
-
const search = screen.
|
|
37
|
+
const search = screen.getByRole('textbox');
|
|
38
38
|
expect(search).toBeInTheDocument();
|
|
39
39
|
});
|
|
40
40
|
|
|
@@ -91,4 +91,22 @@ describe('Search', () => {
|
|
|
91
91
|
|
|
92
92
|
expect(mockOnSearch).toHaveBeenCalledWith('test search');
|
|
93
93
|
});
|
|
94
|
+
test('clear button clears text and returns focus to input', async () => {
|
|
95
|
+
const user = userEvent.setup();
|
|
96
|
+
render(
|
|
97
|
+
<ThemeContextProvider>
|
|
98
|
+
<Search placeholder='Search products...' />
|
|
99
|
+
</ThemeContextProvider>
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
const input = screen.getByTestId('ucl-uikit-search');
|
|
103
|
+
const clearButton = screen.getByTestId('ucl-uikit-search-clear-search-btn');
|
|
104
|
+
|
|
105
|
+
await user.type(input, 'hello');
|
|
106
|
+
await user.tab();
|
|
107
|
+
await user.click(clearButton);
|
|
108
|
+
|
|
109
|
+
expect((input as HTMLInputElement).value).toBe('');
|
|
110
|
+
expect(document.activeElement).toBe(input);
|
|
111
|
+
});
|
|
94
112
|
});
|
|
@@ -28,6 +28,7 @@ exports[`Search > snapshot: no props 1`] = `
|
|
|
28
28
|
class="ucl-uikit-icon css-148hpxb"
|
|
29
29
|
data-testid="ucl-uikit-icon"
|
|
30
30
|
fill="none"
|
|
31
|
+
focusable="false"
|
|
31
32
|
height="24"
|
|
32
33
|
stroke="currentColor"
|
|
33
34
|
stroke-linecap="round"
|
|
@@ -37,17 +38,8 @@ exports[`Search > snapshot: no props 1`] = `
|
|
|
37
38
|
width="24"
|
|
38
39
|
xmlns="http://www.w3.org/2000/svg"
|
|
39
40
|
>
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
x2="6"
|
|
43
|
-
y1="6"
|
|
44
|
-
y2="18"
|
|
45
|
-
/>
|
|
46
|
-
<line
|
|
47
|
-
x1="6"
|
|
48
|
-
x2="18"
|
|
49
|
-
y1="6"
|
|
50
|
-
y2="18"
|
|
41
|
+
<path
|
|
42
|
+
d="M18 6 6 18M6 6l12 12"
|
|
51
43
|
/>
|
|
52
44
|
</svg>
|
|
53
45
|
</button>
|
|
@@ -63,6 +55,7 @@ exports[`Search > snapshot: no props 1`] = `
|
|
|
63
55
|
class="ucl-uikit-icon css-148hpxb"
|
|
64
56
|
data-testid="ucl-uikit-icon"
|
|
65
57
|
fill="none"
|
|
58
|
+
focusable="false"
|
|
66
59
|
height="24"
|
|
67
60
|
stroke="currentColor"
|
|
68
61
|
stroke-linecap="round"
|
|
@@ -77,11 +70,8 @@ exports[`Search > snapshot: no props 1`] = `
|
|
|
77
70
|
cy="11"
|
|
78
71
|
r="8"
|
|
79
72
|
/>
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
x2="16.65"
|
|
83
|
-
y1="21"
|
|
84
|
-
y2="16.65"
|
|
73
|
+
<path
|
|
74
|
+
d="m21 21-4.35-4.35"
|
|
85
75
|
/>
|
|
86
76
|
</svg>
|
|
87
77
|
</button>
|
|
@@ -117,6 +107,7 @@ exports[`Search > snapshot: testId prop 1`] = `
|
|
|
117
107
|
class="ucl-uikit-icon css-148hpxb"
|
|
118
108
|
data-testid="ucl-uikit-icon"
|
|
119
109
|
fill="none"
|
|
110
|
+
focusable="false"
|
|
120
111
|
height="24"
|
|
121
112
|
stroke="currentColor"
|
|
122
113
|
stroke-linecap="round"
|
|
@@ -126,17 +117,8 @@ exports[`Search > snapshot: testId prop 1`] = `
|
|
|
126
117
|
width="24"
|
|
127
118
|
xmlns="http://www.w3.org/2000/svg"
|
|
128
119
|
>
|
|
129
|
-
<
|
|
130
|
-
|
|
131
|
-
x2="6"
|
|
132
|
-
y1="6"
|
|
133
|
-
y2="18"
|
|
134
|
-
/>
|
|
135
|
-
<line
|
|
136
|
-
x1="6"
|
|
137
|
-
x2="18"
|
|
138
|
-
y1="6"
|
|
139
|
-
y2="18"
|
|
120
|
+
<path
|
|
121
|
+
d="M18 6 6 18M6 6l12 12"
|
|
140
122
|
/>
|
|
141
123
|
</svg>
|
|
142
124
|
</button>
|
|
@@ -152,6 +134,7 @@ exports[`Search > snapshot: testId prop 1`] = `
|
|
|
152
134
|
class="ucl-uikit-icon css-148hpxb"
|
|
153
135
|
data-testid="ucl-uikit-icon"
|
|
154
136
|
fill="none"
|
|
137
|
+
focusable="false"
|
|
155
138
|
height="24"
|
|
156
139
|
stroke="currentColor"
|
|
157
140
|
stroke-linecap="round"
|
|
@@ -166,11 +149,8 @@ exports[`Search > snapshot: testId prop 1`] = `
|
|
|
166
149
|
cy="11"
|
|
167
150
|
r="8"
|
|
168
151
|
/>
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
x2="16.65"
|
|
172
|
-
y1="21"
|
|
173
|
-
y2="16.65"
|
|
152
|
+
<path
|
|
153
|
+
d="m21 21-4.35-4.35"
|
|
174
154
|
/>
|
|
175
155
|
</svg>
|
|
176
156
|
</button>
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import * as SelectStories from "./Select.stories";
|
|
2
|
+
import { Meta, Title, Subtitle, Canvas, Controls, ArgTypes } from "@storybook/blocks";
|
|
3
|
+
|
|
4
|
+
export const usage = {
|
|
5
|
+
default: `<Select
|
|
6
|
+
options={[
|
|
7
|
+
{ label: 'Option one', value: '1' },
|
|
8
|
+
{ label: 'Option two', value: '2' },
|
|
9
|
+
{ label: 'Option three', value: '3' },
|
|
10
|
+
]}
|
|
11
|
+
value={value}
|
|
12
|
+
onValueChange={handleChange}
|
|
13
|
+
/>`,
|
|
14
|
+
native: `<Select
|
|
15
|
+
native
|
|
16
|
+
options={[
|
|
17
|
+
{ label: 'Option one', value: '1' },
|
|
18
|
+
{ label: 'Option two', value: '2' },
|
|
19
|
+
{ label: 'Option three', value: '3' },
|
|
20
|
+
]}
|
|
21
|
+
value={value}
|
|
22
|
+
nativeHtmlAttributes={{ onChange: onNativeChange }}
|
|
23
|
+
/>`,
|
|
24
|
+
filterable: `<Select
|
|
25
|
+
filterable
|
|
26
|
+
options={[
|
|
27
|
+
{ label: 'Option one', value: '1' },
|
|
28
|
+
{ label: 'Option two', value: '2' },
|
|
29
|
+
{ label: 'Option three', value: '3' },
|
|
30
|
+
]}
|
|
31
|
+
value={value}
|
|
32
|
+
onValueChange={handleChange}
|
|
33
|
+
placeholder="Type to filter..."
|
|
34
|
+
filterInputProps={{ 'aria-describedby': 'filter-hint' }}
|
|
35
|
+
/>`,
|
|
36
|
+
clearable: `<Select
|
|
37
|
+
clearable
|
|
38
|
+
options={[
|
|
39
|
+
{ label: 'Option one', value: '1' },
|
|
40
|
+
{ label: 'Option two', value: '2' },
|
|
41
|
+
{ label: 'Option three', value: '3' },
|
|
42
|
+
]}
|
|
43
|
+
value={value}
|
|
44
|
+
onValueChange={handleChange}
|
|
45
|
+
placeholder="Clear selection"
|
|
46
|
+
/>`,
|
|
47
|
+
selectionBehaviourCommit: `<Select
|
|
48
|
+
selectionBehaviour="commit"
|
|
49
|
+
options={[
|
|
50
|
+
{ label: 'Option one', value: '1' },
|
|
51
|
+
{ label: 'Option two', value: '2' },
|
|
52
|
+
{ label: 'Option three', value: '3' },
|
|
53
|
+
]}
|
|
54
|
+
value={value}
|
|
55
|
+
onValueChange={handleChange}
|
|
56
|
+
/>`,
|
|
57
|
+
disabled: `<Select
|
|
58
|
+
disabled
|
|
59
|
+
options={[
|
|
60
|
+
{ label: 'Option one', value: '1' },
|
|
61
|
+
{ label: 'Option two', value: '2' },
|
|
62
|
+
{ label: 'Option three', value: '3' },
|
|
63
|
+
]}
|
|
64
|
+
value={value}
|
|
65
|
+
onValueChange={handleChange}
|
|
66
|
+
/>`,
|
|
67
|
+
placeholder: `<Select
|
|
68
|
+
placeholder="Please select an option"
|
|
69
|
+
options={[
|
|
70
|
+
{ label: 'Option one', value: '1' },
|
|
71
|
+
{ label: 'Option two', value: '2' },
|
|
72
|
+
{ label: 'Option three', value: '3' },
|
|
73
|
+
]}
|
|
74
|
+
value={value}
|
|
75
|
+
onValueChange={handleChange}
|
|
76
|
+
/>`,
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
<Meta of={SelectStories} />
|
|
80
|
+
<Title />
|
|
81
|
+
<Subtitle>
|
|
82
|
+
A custom select with an optional native fallback, opt-in filtering, and long-text handling.
|
|
83
|
+
</Subtitle>
|
|
84
|
+
|
|
85
|
+
Use `<Select>` when you need a styled dropdown that works like a standard form control but matches the UCL UI kit. The component renders a custom combobox by default and can fall back to the native `<select>` for environments where native behaviour is preferred (e.g. mobile accessibility).
|
|
86
|
+
|
|
87
|
+
Key features:
|
|
88
|
+
- Custom dropdown with keyboard support (Enter/Space to open, arrows to navigate, Escape to close)
|
|
89
|
+
- Configurable keyboard selection behaviour via `selectionBehaviour` (`focus` or `commit`)
|
|
90
|
+
- Optional native fallback (`native`)
|
|
91
|
+
- Optional filterable dropdown (`filterable`) that lets users type to narrow options
|
|
92
|
+
- Optional clear action (`clearable`) in the custom variant
|
|
93
|
+
- `filterInputProps` to forward additional attributes (e.g. `aria-describedby`) to the filter input
|
|
94
|
+
- Support for long option text via `lineBreak`
|
|
95
|
+
- Disabled state and placeholder support
|
|
96
|
+
- Story previews set a fixed control width and wrapper height for better readability in docs.
|
|
97
|
+
|
|
98
|
+
## Variants
|
|
99
|
+
|
|
100
|
+
### Custom (default)
|
|
101
|
+
The default renders a fully styled combobox that handles focus, keyboard navigation, and selection. Use this for most desktop/web cases.
|
|
102
|
+
|
|
103
|
+
<Canvas
|
|
104
|
+
of={SelectStories.Default}
|
|
105
|
+
sourceState="shown"
|
|
106
|
+
source={{ code: usage.default }}
|
|
107
|
+
/>
|
|
108
|
+
|
|
109
|
+
### Native
|
|
110
|
+
Set `native` to render the browser `<select>`. This is useful when you want built-in mobile picker behaviour or the simplest possible semantics. Props like `onChange`, `value`, and standard `<select>` attributes can be passed via `nativeHtmlAttributes`.
|
|
111
|
+
|
|
112
|
+
<Canvas
|
|
113
|
+
of={SelectStories.Native}
|
|
114
|
+
sourceState="shown"
|
|
115
|
+
source={{ code: usage.native }}
|
|
116
|
+
/>
|
|
117
|
+
|
|
118
|
+
### Disabled
|
|
119
|
+
Applies the disabled state to both custom and native variants; interactions are blocked and styles are subdued.
|
|
120
|
+
|
|
121
|
+
<Canvas
|
|
122
|
+
of={SelectStories.Disabled}
|
|
123
|
+
sourceState="shown"
|
|
124
|
+
source={{ code: usage.disabled }}
|
|
125
|
+
/>
|
|
126
|
+
|
|
127
|
+
### Placeholder
|
|
128
|
+
Shows helper text until a value is selected. In the native variant it appears as a disabled option; in the custom variant it shows in the visible field.
|
|
129
|
+
|
|
130
|
+
<Canvas
|
|
131
|
+
of={SelectStories.WithPlaceholder}
|
|
132
|
+
sourceState="shown"
|
|
133
|
+
source={{ code: usage.placeholder }}
|
|
134
|
+
/>
|
|
135
|
+
|
|
136
|
+
### With filter
|
|
137
|
+
Adds an inline text input when the dropdown is open so users can type to filter options. Arrow keys and Escape still control the dropdown; the filter text is preserved while open and cleared on close.
|
|
138
|
+
|
|
139
|
+
Use `filterInputProps` to pass extra attributes to the input (e.g. `aria-describedby`, `inputMode`).
|
|
140
|
+
|
|
141
|
+
<Canvas
|
|
142
|
+
of={SelectStories.filterable}
|
|
143
|
+
sourceState="shown"
|
|
144
|
+
source={{ code: usage.filterable }}
|
|
145
|
+
/>
|
|
146
|
+
|
|
147
|
+
### Clearable
|
|
148
|
+
Adds a built-in clear button in the custom variant when a selection is present. Clearing calls `onValueChange(null, event)` and restores the placeholder text.
|
|
149
|
+
|
|
150
|
+
<Canvas
|
|
151
|
+
of={SelectStories.Clearable}
|
|
152
|
+
sourceState="shown"
|
|
153
|
+
source={{ code: usage.clearable }}
|
|
154
|
+
/>
|
|
155
|
+
|
|
156
|
+
### Selection behaviour
|
|
157
|
+
Use `selectionBehaviour` to control how keyboard navigation commits value in the custom variant:
|
|
158
|
+
- `focus` (default): arrow keys move and commit immediately.
|
|
159
|
+
- `commit`: arrow keys only highlight; Enter or click commits.
|
|
160
|
+
|
|
161
|
+
<Canvas
|
|
162
|
+
of={SelectStories.SelectionBehaviourCommit}
|
|
163
|
+
sourceState="shown"
|
|
164
|
+
source={{ code: usage.selectionBehaviourCommit }}
|
|
165
|
+
/>
|
|
166
|
+
|
|
167
|
+
## Long text and wrapping
|
|
168
|
+
For very long labels, set `lineBreak` to allow breaking the text inside options. Without it, text is truncated/ellipsized to keep layout intact.
|
|
169
|
+
|
|
170
|
+
## Accessibility
|
|
171
|
+
- Custom variant exposes `role="combobox"` and `aria-expanded`, and listens for Enter/Space/Escape/arrow keys.
|
|
172
|
+
- In `selectionBehaviour="commit"`, arrow keys move highlight without changing value until Enter/click.
|
|
173
|
+
- Tabbing away from an open custom dropdown closes it and lets focus move normally to the next or previous control.
|
|
174
|
+
- Native variant leverages built-in browser semantics.
|
|
175
|
+
- The filter input (when `filterable` is true) is focusable when the panel opens; Escape and arrow keys bubble to the parent so the dropdown still closes/navigates.
|
|
176
|
+
- In the custom variant, `clearable` emits `null` as the cleared value.
|
|
177
|
+
- `filterInputProps` lets you forward ARIA hooks like `aria-describedby` to the filter input.
|
|
178
|
+
- Standard HTML attributes (`id`, `title`, `data-*`) are forwarded to the combobox/native select.
|
|
179
|
+
|
|
180
|
+
## Props
|
|
181
|
+
|
|
182
|
+
Full props specification for `<Select>` is below.
|
|
183
|
+
|
|
184
|
+
<Canvas
|
|
185
|
+
of={SelectStories.Default}
|
|
186
|
+
sourceState="hidden"
|
|
187
|
+
source={{ code: usage.default }}
|
|
188
|
+
/>
|
|
189
|
+
|
|
190
|
+
You can use the controls below to manipulate the `<Select>` component above.
|
|
191
|
+
|
|
192
|
+
<Controls />
|