uikit-react-public 0.17.4 → 0.21.9
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 -4
- package/dist/components/Accordion/Accordion.Heading.d.ts +1 -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/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 +7 -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/Checkbox/Checkbox.d.ts +1 -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/__tests__/Footer.test.d.ts +1 -0
- package/dist/components/FooterNew/index.d.ts +2 -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/Heading/Heading.d.ts +6 -4
- package/dist/components/Heading/Heading.stories.d.ts +8 -6
- 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/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/Overlay/Overlay.stories.d.ts +12 -12
- package/dist/components/Paragraph/Paragraph.d.ts +5 -2
- package/dist/components/Paragraph/Paragraph.stories.d.ts +6 -3
- package/dist/components/Select/Select.d.ts +2 -1
- package/dist/components/Select/Select.stories.d.ts +13 -1
- package/dist/components/Select/Select.types.d.ts +40 -13
- package/dist/components/Select/subcomponents/CustomSelect.d.ts +3 -3
- package/dist/components/Select/subcomponents/FilterInput.d.ts +3 -1
- package/dist/components/Select/subcomponents/NativeSelect.d.ts +2 -2
- package/dist/components/Select/subcomponents/VisibleField.d.ts +4 -1
- 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/index.d.ts +12 -0
- package/dist/index.js +20104 -15317
- 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/addAlphaToHex.d.ts +5 -0
- package/dist/utils/scrollToTop.d.ts +2 -0
- package/lib/components/Accordion/Accordion.Heading.tsx +51 -39
- package/lib/components/Accordion/Accordion.Panel.tsx +0 -4
- package/lib/components/Accordion/Accordion.tsx +34 -28
- package/lib/components/Accordion/__tests__/__snapshots__/Accordion.test.tsx.snap +12 -10
- 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/Badge/Badge.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 +43 -50
- package/lib/components/Button/Button.tsx +165 -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 +33 -13
- package/lib/components/Calendar/Calendar.tsx +2 -2
- package/lib/components/Calendar/__tests__/__snapshots__/Calendar.test.tsx.snap +99 -95
- package/lib/components/Calendar/subcomponents/AcademicWeek.tsx +2 -1
- package/lib/components/Calendar/subcomponents/AcademicWeeks.tsx +2 -3
- package/lib/components/Calendar/subcomponents/ColumnHeading.tsx +3 -7
- 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 +4 -8
- 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/__tests__/Datepicker.test.tsx +117 -0
- package/lib/components/Datepicker/__tests__/__snapshots__/Datepicker.test.tsx.snap +16 -44
- package/lib/components/Datepicker/subcomponents/CustomDatepicker.tsx +10 -1
- package/lib/components/Datepicker/subcomponents/VisibleField.tsx +24 -23
- package/lib/components/Dialog/BaseDialog.tsx +2 -2
- package/lib/components/Dialog/Dialog.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 +1 -1
- package/lib/components/Field/Field.tsx +1 -1
- package/lib/components/Field/HelperText.tsx +3 -1
- 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/__tests__/__snapshots__/Footer.test.tsx.snap +70 -79
- 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/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 +34 -41
- package/lib/components/Heading/Heading.tsx +180 -49
- package/lib/components/Heading/__tests__/__snapshots__/Heading.test.tsx.snap +4 -4
- 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.tsx +3 -4
- package/lib/components/IconButton/__tests__/__snapshots__/IconButton.test.tsx.snap +12 -9
- 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/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/Pagination/Pagination.stories.tsx +1 -1
- package/lib/components/Pagination/PaginationControls.tsx +4 -5
- package/lib/components/Pagination/PaginationInfo.tsx +2 -3
- package/lib/components/Paragraph/Paragraph.stories.tsx +29 -27
- package/lib/components/Paragraph/Paragraph.tsx +212 -81
- package/lib/components/Paragraph/__tests__/__snapshots__/Paragraph.test.tsx.snap +5 -5
- 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/__tests__/__snapshots__/Search.test.tsx.snap +12 -32
- package/lib/components/Select/Select.mdx +23 -0
- package/lib/components/Select/Select.stories.tsx +43 -10
- package/lib/components/Select/Select.tsx +14 -3
- package/lib/components/Select/Select.types.ts +53 -16
- package/lib/components/Select/__tests__/Select.test.tsx +250 -1
- package/lib/components/Select/__tests__/__snapshots__/Select.test.tsx.snap +5 -4
- package/lib/components/Select/subcomponents/CustomOption.tsx +10 -3
- package/lib/components/Select/subcomponents/CustomSelect.tsx +110 -10
- package/lib/components/Select/subcomponents/FilterInput.tsx +13 -3
- package/lib/components/Select/subcomponents/NativeSelect.tsx +10 -18
- package/lib/components/Select/subcomponents/Panel.tsx +2 -2
- package/lib/components/Select/subcomponents/VisibleField.tsx +48 -3
- package/lib/components/Snackbar/__tests__/__snapshots__/Snackbar.test.tsx.snap +9 -15
- 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/Timepicker/Timepicker.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.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 +3 -5
- package/lib/components/common/Common.mdx +0 -1
- package/lib/components/index.ts +19 -1
- 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/addAlphaToHex.ts +29 -0
- package/lib/utils/scrollToTop.ts +5 -0
- package/package.json +11 -6
- 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/theme/defaultTheme.d.ts +0 -274
- package/lib/components/Button/buttonPrimaryStyle.ts +0 -62
- package/lib/components/Button/buttonSecondaryStyle.ts +0 -65
- package/lib/components/Button/buttonTertiaryStyle.ts +0 -54
|
@@ -1,95 +1,226 @@
|
|
|
1
|
-
import { memo, HTMLAttributes,
|
|
1
|
+
import { memo, HTMLAttributes, JSX } from 'react';
|
|
2
2
|
import { css, cx } from '@emotion/css';
|
|
3
3
|
import useTheme from '../../theme/useTheme';
|
|
4
4
|
import marginsStyle, { MarginProps } from '../common/marginsStyle';
|
|
5
5
|
|
|
6
6
|
export const NAME = 'ucl-uikit-paragrah';
|
|
7
7
|
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
export type ParagraphLevel =
|
|
9
|
+
| 'lg'
|
|
10
|
+
| 'lg-medium'
|
|
11
|
+
| 'lg-semibold'
|
|
12
|
+
| 'lg-bold'
|
|
13
|
+
| 'md'
|
|
14
|
+
| 'md-medium'
|
|
15
|
+
| 'md-semibold'
|
|
16
|
+
| 'md-semibold'
|
|
17
|
+
| 'md-medium-numeric'
|
|
18
|
+
| 'sm'
|
|
19
|
+
| 'sm-medium'
|
|
20
|
+
| 'sm-semibold'
|
|
21
|
+
| 'xs'
|
|
22
|
+
| 'xs-medium';
|
|
23
|
+
|
|
24
|
+
export interface ParagraphBaseProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
25
|
+
level?: ParagraphLevel;
|
|
26
|
+
size?: 'standfirst' | 'body' | 'small'; // deprecated
|
|
27
|
+
emphasis?: 'high' | 'medium'; // deprecated
|
|
28
|
+
as?: 'p' | 'div' | 'span';
|
|
29
|
+
margins?: boolean; // deprecated
|
|
13
30
|
testId?: string;
|
|
31
|
+
ref?: React.Ref<HTMLParagraphElement>;
|
|
14
32
|
}
|
|
15
33
|
|
|
16
34
|
export type ParagraphProps = ParagraphBaseProps & MarginProps;
|
|
17
35
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
const Paragraph = ({
|
|
37
|
+
level = 'md',
|
|
38
|
+
size = 'body',
|
|
39
|
+
emphasis = 'high',
|
|
40
|
+
as = 'p',
|
|
41
|
+
margins = true,
|
|
42
|
+
testId = NAME,
|
|
43
|
+
className,
|
|
44
|
+
ref,
|
|
45
|
+
noMargins,
|
|
46
|
+
...props
|
|
47
|
+
}: ParagraphProps) => {
|
|
48
|
+
const [theme] = useTheme();
|
|
49
|
+
|
|
50
|
+
const {
|
|
51
|
+
typography: {
|
|
52
|
+
body: {
|
|
53
|
+
lg,
|
|
54
|
+
lgMedium,
|
|
55
|
+
lgSemibold,
|
|
56
|
+
lgBold,
|
|
57
|
+
md,
|
|
58
|
+
mdMedium,
|
|
59
|
+
mdSemibold,
|
|
60
|
+
mdMediumNumeric,
|
|
61
|
+
sm,
|
|
62
|
+
smMedium,
|
|
63
|
+
smSemibold,
|
|
64
|
+
xs,
|
|
65
|
+
xsMedium,
|
|
66
|
+
},
|
|
29
67
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
68
|
+
} = theme;
|
|
69
|
+
|
|
70
|
+
const mappedLevel: ParagraphLevel =
|
|
71
|
+
level ||
|
|
72
|
+
(size === 'standfirst'
|
|
73
|
+
? emphasis === 'medium'
|
|
74
|
+
? 'lg-medium'
|
|
75
|
+
: 'lg'
|
|
76
|
+
: size === 'small'
|
|
77
|
+
? emphasis === 'medium'
|
|
78
|
+
? 'sm-medium'
|
|
79
|
+
: 'sm'
|
|
80
|
+
: emphasis === 'medium'
|
|
81
|
+
? 'md-medium'
|
|
82
|
+
: 'md');
|
|
83
|
+
|
|
84
|
+
const baseStyle = css`
|
|
85
|
+
font-family: ${md.fontFamily};
|
|
86
|
+
font-feature-settings: ${md.fontSettings};
|
|
87
|
+
color: ${emphasis === 'medium'
|
|
88
|
+
? theme.colour.text.secondary
|
|
89
|
+
: theme.colour.text.default};
|
|
90
|
+
margin: 0;
|
|
91
|
+
`;
|
|
92
|
+
|
|
93
|
+
const lgStyle = css`
|
|
94
|
+
font-size: ${lg.fontSize}px;
|
|
95
|
+
font-weight: ${lg.fontWeight};
|
|
96
|
+
line-height: ${lg.lineHeight}%;
|
|
97
|
+
`;
|
|
98
|
+
|
|
99
|
+
const lgMediumStyle = css`
|
|
100
|
+
font-size: ${lgMedium.fontSize}px;
|
|
101
|
+
font-weight: ${lgMedium.fontWeight};
|
|
102
|
+
line-height: ${lgMedium.lineHeight}%;
|
|
103
|
+
`;
|
|
104
|
+
|
|
105
|
+
const lgSemiboldStyle = css`
|
|
106
|
+
font-size: ${lgSemibold.fontSize}px;
|
|
107
|
+
font-weight: ${lgSemibold.fontWeight};
|
|
108
|
+
line-height: ${lgSemibold.lineHeight}%;
|
|
109
|
+
`;
|
|
110
|
+
|
|
111
|
+
const lgBoldStyle = css`
|
|
112
|
+
font-size: ${lgBold.fontSize}px;
|
|
113
|
+
font-weight: ${lgBold.fontWeight};
|
|
114
|
+
line-height: ${lgBold.lineHeight}%;
|
|
115
|
+
`;
|
|
116
|
+
|
|
117
|
+
const mdStyle = css`
|
|
118
|
+
font-size: ${md.fontSize}px;
|
|
119
|
+
font-weight: ${md.fontWeight};
|
|
120
|
+
line-height: ${md.lineHeight}%;
|
|
121
|
+
`;
|
|
122
|
+
|
|
123
|
+
const mdMediumStyle = css`
|
|
124
|
+
font-size: ${mdMedium.fontSize}px;
|
|
125
|
+
font-weight: ${mdMedium.fontWeight};
|
|
126
|
+
line-height: ${mdMedium.lineHeight}%;
|
|
127
|
+
`;
|
|
128
|
+
|
|
129
|
+
const mdSemiboldStyle = css`
|
|
130
|
+
font-size: ${mdSemibold.fontSize}px;
|
|
131
|
+
font-weight: ${mdSemibold.fontWeight};
|
|
132
|
+
line-height: ${mdSemibold.lineHeight}%;
|
|
133
|
+
`;
|
|
134
|
+
|
|
135
|
+
const mdMediumNumericStyle = css`
|
|
136
|
+
font-size: ${mdMediumNumeric.fontSize}px;
|
|
137
|
+
font-weight: ${mdMediumNumeric.fontWeight};
|
|
138
|
+
line-height: ${mdMediumNumeric.lineHeight}%;
|
|
139
|
+
`;
|
|
140
|
+
|
|
141
|
+
const smStyle = css`
|
|
142
|
+
font-size: ${sm.fontSize}px;
|
|
143
|
+
font-weight: ${sm.fontWeight};
|
|
144
|
+
line-height: ${sm.lineHeight}%;
|
|
145
|
+
`;
|
|
146
|
+
|
|
147
|
+
const smMediumStyle = css`
|
|
148
|
+
font-size: ${smMedium.fontSize}px;
|
|
149
|
+
font-weight: ${smMedium.fontWeight};
|
|
150
|
+
line-height: ${smMedium.lineHeight}%;
|
|
151
|
+
`;
|
|
152
|
+
|
|
153
|
+
const smSemiboldStyle = css`
|
|
154
|
+
font-size: ${smSemibold.fontSize}px;
|
|
155
|
+
font-weight: ${smSemibold.fontWeight};
|
|
156
|
+
line-height: ${smSemibold.lineHeight}%;
|
|
157
|
+
`;
|
|
158
|
+
|
|
159
|
+
const xsStyle = css`
|
|
160
|
+
font-size: ${xs.fontSize}px;
|
|
161
|
+
font-weight: ${xs.fontWeight};
|
|
162
|
+
line-height: ${xs.lineHeight}%;
|
|
163
|
+
`;
|
|
164
|
+
|
|
165
|
+
const xsMediumStyle = css`
|
|
166
|
+
font-size: ${xsMedium.fontSize}px;
|
|
167
|
+
font-weight: ${xsMedium.fontWeight};
|
|
168
|
+
line-height: ${xsMedium.lineHeight}%;
|
|
169
|
+
`;
|
|
170
|
+
|
|
171
|
+
const style = cx(
|
|
172
|
+
NAME,
|
|
173
|
+
baseStyle,
|
|
174
|
+
mappedLevel === 'lg' && lgStyle,
|
|
175
|
+
mappedLevel === 'lg-medium' && lgMediumStyle,
|
|
176
|
+
mappedLevel === 'lg-semibold' && lgSemiboldStyle,
|
|
177
|
+
mappedLevel === 'lg-bold' && lgBoldStyle,
|
|
178
|
+
mappedLevel === 'md' && mdStyle,
|
|
179
|
+
mappedLevel === 'md-medium' && mdMediumStyle,
|
|
180
|
+
mappedLevel === 'md-semibold' && mdSemiboldStyle,
|
|
181
|
+
mappedLevel === 'md-medium-numeric' && mdMediumNumericStyle,
|
|
182
|
+
mappedLevel === 'sm' && smStyle,
|
|
183
|
+
mappedLevel === 'sm-medium' && smMediumStyle,
|
|
184
|
+
mappedLevel === 'sm-semibold' && smSemiboldStyle,
|
|
185
|
+
mappedLevel === 'xs' && xsStyle,
|
|
186
|
+
mappedLevel === 'xs-medium' && xsMediumStyle,
|
|
187
|
+
marginsStyle(
|
|
188
|
+
{ ...props, noMargins: noMargins || margins === false },
|
|
189
|
+
theme
|
|
190
|
+
),
|
|
191
|
+
className
|
|
192
|
+
);
|
|
193
|
+
|
|
194
|
+
const paragraphTag = as as keyof JSX.IntrinsicElements;
|
|
195
|
+
|
|
196
|
+
return (
|
|
197
|
+
<>
|
|
198
|
+
{paragraphTag === 'p' && (
|
|
199
|
+
<p
|
|
200
|
+
ref={ref}
|
|
201
|
+
className={style}
|
|
202
|
+
data-testid={testId}
|
|
203
|
+
{...props}
|
|
204
|
+
/>
|
|
205
|
+
)}
|
|
206
|
+
{paragraphTag === 'div' && (
|
|
207
|
+
<div
|
|
208
|
+
ref={ref as React.Ref<HTMLDivElement>}
|
|
209
|
+
className={style}
|
|
210
|
+
data-testid={testId}
|
|
211
|
+
{...props}
|
|
212
|
+
/>
|
|
213
|
+
)}
|
|
214
|
+
{paragraphTag === 'span' && (
|
|
215
|
+
<span
|
|
216
|
+
ref={ref as React.Ref<HTMLSpanElement>}
|
|
217
|
+
className={style}
|
|
218
|
+
data-testid={testId}
|
|
219
|
+
{...props}
|
|
220
|
+
/>
|
|
221
|
+
)}
|
|
222
|
+
</>
|
|
223
|
+
);
|
|
224
|
+
};
|
|
94
225
|
|
|
95
226
|
export default memo(Paragraph);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`Paragraph > snapshot: custom test id 1`] = `
|
|
4
4
|
<p
|
|
5
|
-
class="ucl-uikit-paragrah css-
|
|
5
|
+
class="ucl-uikit-paragrah css-h12wmf"
|
|
6
6
|
data-testid="custom-test-id"
|
|
7
7
|
>
|
|
8
8
|
This is a test
|
|
@@ -11,7 +11,7 @@ exports[`Paragraph > snapshot: custom test id 1`] = `
|
|
|
11
11
|
|
|
12
12
|
exports[`Paragraph > snapshot: emphasis 1`] = `
|
|
13
13
|
<p
|
|
14
|
-
class="ucl-uikit-paragrah css-
|
|
14
|
+
class="ucl-uikit-paragrah css-h12wmf"
|
|
15
15
|
data-testid="ucl-uikit-paragrah"
|
|
16
16
|
>
|
|
17
17
|
high emphasis
|
|
@@ -20,7 +20,7 @@ exports[`Paragraph > snapshot: emphasis 1`] = `
|
|
|
20
20
|
|
|
21
21
|
exports[`Paragraph > snapshot: minimal props 1`] = `
|
|
22
22
|
<p
|
|
23
|
-
class="ucl-uikit-paragrah css-
|
|
23
|
+
class="ucl-uikit-paragrah css-h12wmf"
|
|
24
24
|
data-testid="ucl-uikit-paragrah"
|
|
25
25
|
>
|
|
26
26
|
This is a test
|
|
@@ -29,7 +29,7 @@ exports[`Paragraph > snapshot: minimal props 1`] = `
|
|
|
29
29
|
|
|
30
30
|
exports[`Paragraph > snapshot: no margins 1`] = `
|
|
31
31
|
<p
|
|
32
|
-
class="ucl-uikit-paragrah css-
|
|
32
|
+
class="ucl-uikit-paragrah css-1dosm7d"
|
|
33
33
|
data-testid="ucl-uikit-paragrah"
|
|
34
34
|
>
|
|
35
35
|
no margins
|
|
@@ -38,7 +38,7 @@ exports[`Paragraph > snapshot: no margins 1`] = `
|
|
|
38
38
|
|
|
39
39
|
exports[`Paragraph > snapshot: size 1`] = `
|
|
40
40
|
<p
|
|
41
|
-
class="ucl-uikit-paragrah css-
|
|
41
|
+
class="ucl-uikit-paragrah css-h12wmf"
|
|
42
42
|
data-testid="ucl-uikit-paragrah"
|
|
43
43
|
>
|
|
44
44
|
standfirst
|
|
@@ -64,19 +64,19 @@ const Radio = forwardRef<Ref, RadioProps>(
|
|
|
64
64
|
`;
|
|
65
65
|
|
|
66
66
|
const checkedStyle = css`
|
|
67
|
-
background-color: ${theme.
|
|
68
|
-
border-color: ${theme.
|
|
69
|
-
color: ${theme.
|
|
67
|
+
background-color: ${theme.colour.icon.brand};
|
|
68
|
+
border-color: ${theme.colour.icon.brand};
|
|
69
|
+
color: ${theme.colour.icon.inverse};
|
|
70
70
|
`;
|
|
71
71
|
|
|
72
72
|
const uncheckedStyle = css`
|
|
73
|
-
background-color: ${theme.
|
|
74
|
-
border-color: ${theme.
|
|
73
|
+
background-color: ${theme.colour.icon.inverse};
|
|
74
|
+
border-color: ${theme.colour.speciality.inputDefault};
|
|
75
75
|
`;
|
|
76
76
|
|
|
77
77
|
const disabledStyle = css`
|
|
78
|
-
background-color: ${theme.
|
|
79
|
-
border-color: ${theme.
|
|
78
|
+
background-color: ${theme.colour.icon.disabled};
|
|
79
|
+
border-color: ${theme.colour.icon.disabled};
|
|
80
80
|
cursor: not-allowed;
|
|
81
81
|
`;
|
|
82
82
|
|
|
@@ -112,7 +112,7 @@ const Radio = forwardRef<Ref, RadioProps>(
|
|
|
112
112
|
width: 12px;
|
|
113
113
|
height: 12px;
|
|
114
114
|
border-radius: 50%;
|
|
115
|
-
background-color: ${theme.
|
|
115
|
+
background-color: ${theme.colour.icon.inverse};
|
|
116
116
|
user-select: none;
|
|
117
117
|
pointer-events: none;
|
|
118
118
|
`;
|
|
@@ -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"
|
|
@@ -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>
|
|
@@ -32,6 +32,17 @@ export const usage = {
|
|
|
32
32
|
onValueChange={handleChange}
|
|
33
33
|
placeholder="Type to filter..."
|
|
34
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"
|
|
35
46
|
/>`,
|
|
36
47
|
selectionBehaviourCommit: `<Select
|
|
37
48
|
selectionBehaviour="commit"
|
|
@@ -78,6 +89,7 @@ Key features:
|
|
|
78
89
|
- Configurable keyboard selection behaviour via `selectionBehaviour` (`focus` or `commit`)
|
|
79
90
|
- Optional native fallback (`native`)
|
|
80
91
|
- Optional filterable dropdown (`filterable`) that lets users type to narrow options
|
|
92
|
+
- Optional clear action (`clearable`) in the custom variant
|
|
81
93
|
- `filterInputProps` to forward additional attributes (e.g. `aria-describedby`) to the filter input
|
|
82
94
|
- Support for long option text via `lineBreak`
|
|
83
95
|
- Disabled state and placeholder support
|
|
@@ -132,6 +144,15 @@ Use `filterInputProps` to pass extra attributes to the input (e.g. `aria-describ
|
|
|
132
144
|
source={{ code: usage.filterable }}
|
|
133
145
|
/>
|
|
134
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
|
+
|
|
135
156
|
### Selection behaviour
|
|
136
157
|
Use `selectionBehaviour` to control how keyboard navigation commits value in the custom variant:
|
|
137
158
|
- `focus` (default): arrow keys move and commit immediately.
|
|
@@ -149,8 +170,10 @@ For very long labels, set `lineBreak` to allow breaking the text inside options.
|
|
|
149
170
|
## Accessibility
|
|
150
171
|
- Custom variant exposes `role="combobox"` and `aria-expanded`, and listens for Enter/Space/Escape/arrow keys.
|
|
151
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.
|
|
152
174
|
- Native variant leverages built-in browser semantics.
|
|
153
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.
|
|
154
177
|
- `filterInputProps` lets you forward ARIA hooks like `aria-describedby` to the filter input.
|
|
155
178
|
- Standard HTML attributes (`id`, `title`, `data-*`) are forwarded to the combobox/native select.
|
|
156
179
|
|