@digigov/react-core 0.25.4 → 0.26.0
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/AccessibilityIcon/index.d.ts +0 -6
- package/AccessibilityIcon/index.js +8 -8
- package/AccessibilityIcon/index.test.js +4 -4
- package/AccessibilityTextIcon/index.test.js +4 -4
- package/Accordion/index.d.ts +1 -1
- package/Accordion/index.js +7 -7
- package/AccordionControls/index.d.ts +1 -1
- package/AccordionControls/index.js +7 -7
- package/AccordionSection/index.d.ts +1 -1
- package/AccordionSection/index.js +7 -7
- package/AccordionSectionContent/index.d.ts +1 -1
- package/AccordionSectionContent/index.js +7 -7
- package/AccordionSectionHeader/index.d.ts +1 -1
- package/AccordionSectionHeader/index.js +7 -7
- package/AccordionSectionSummary/index.d.ts +1 -1
- package/AccordionSectionSummary/index.js +6 -6
- package/AccordionSectionSummaryHeading/index.d.ts +1 -1
- package/AccordionSectionSummaryHeading/index.js +8 -7
- package/ArrowIcon/index.js +9 -9
- package/Aside/index.d.ts +1 -1
- package/Aside/index.js +7 -7
- package/BackLink/index.d.ts +1 -1
- package/BackLink/index.js +10 -10
- package/Base/index.d.ts +1 -0
- package/Base/index.js +13 -45
- package/Blockquote/index.d.ts +1 -1
- package/Blockquote/index.js +7 -7
- package/Bottom/index.d.ts +1 -1
- package/Bottom/index.js +7 -7
- package/Breadcrumbs/index.d.ts +1 -1
- package/Breadcrumbs/index.js +7 -7
- package/BreadcrumbsList/index.d.ts +1 -1
- package/BreadcrumbsList/index.js +7 -7
- package/BreadcrumbsListItem/index.d.ts +1 -1
- package/BreadcrumbsListItem/index.js +9 -9
- package/BurgerIcon/index.js +15 -15
- package/Button/index.d.ts +1 -1
- package/Button/index.js +8 -8
- package/Button/index.test.js +6 -6
- package/ButtonGroup/index.d.ts +1 -1
- package/ButtonGroup/index.js +7 -7
- package/ButtonLink/index.d.ts +1 -1
- package/ButtonLink/index.js +8 -8
- package/ButtonLink/index.test.js +6 -6
- package/CHANGELOG.md +14 -4
- package/CallToAction/index.d.ts +1 -1
- package/CallToAction/index.js +8 -8
- package/Card/index.d.ts +7 -7
- package/Card/index.js +8 -8
- package/Card/index.test.js +10 -10
- package/CardAction/index.d.ts +1 -1
- package/CardAction/index.js +7 -7
- package/CardHeading/index.d.ts +1 -1
- package/CardHeading/index.js +8 -8
- package/CardText/index.d.ts +1 -1
- package/CardText/index.js +7 -7
- package/CaretContainer/index.d.ts +1 -1
- package/CaretContainer/index.js +5 -5
- package/CaretIcon/index.js +9 -9
- package/CheckIcon/index.d.ts +0 -6
- package/CheckIcon/index.js +8 -8
- package/CheckIcon/index.test.js +4 -4
- package/Checkbox/index.d.ts +1 -1
- package/Checkbox/index.js +7 -7
- package/CheckboxConditional/index.d.ts +1 -1
- package/CheckboxConditional/index.js +8 -8
- package/CheckboxItem/__snapshots__/index.test.tsx.snap +219 -73
- package/CheckboxItem/index.d.ts +7 -1
- package/CheckboxItem/index.js +17 -12
- package/CheckboxItem/index.test.js +22 -3
- package/ChoiceDivider/__snapshots__/index.test.tsx.snap +18 -0
- package/ChoiceDivider/index.d.ts +11 -0
- package/ChoiceDivider/index.js +39 -0
- package/ChoiceDivider/index.test.js +17 -0
- package/CloseIcon/index.d.ts +0 -6
- package/CloseIcon/index.js +8 -8
- package/Confirmation/index.d.ts +1 -1
- package/Confirmation/index.js +7 -7
- package/ConfirmationBody/index.d.ts +1 -1
- package/ConfirmationBody/index.js +7 -7
- package/ConfirmationTitle/index.d.ts +1 -1
- package/ConfirmationTitle/index.js +7 -7
- package/Container/index.d.ts +1 -1
- package/Container/index.js +8 -8
- package/Container/index.test.js +2 -2
- package/CopyrightContainer/index.d.ts +1 -1
- package/CopyrightContainer/index.js +7 -7
- package/DateInputContainer/index.d.ts +1 -1
- package/DateInputContainer/index.js +7 -7
- package/DateInputItem/index.d.ts +6 -6
- package/DateInputItem/index.js +11 -11
- package/DateInputItem/index.test.js +2 -2
- package/Details/index.d.ts +1 -1
- package/Details/index.js +7 -7
- package/DetailsContent/index.d.ts +1 -1
- package/DetailsContent/index.js +7 -7
- package/DetailsSummary/index.d.ts +1 -1
- package/DetailsSummary/index.js +7 -7
- package/ErrorMessage/index.d.ts +1 -1
- package/ErrorMessage/index.js +7 -7
- package/ErrorSummary/index.d.ts +1 -1
- package/ErrorSummary/index.js +7 -7
- package/FieldContainer/index.d.ts +1 -1
- package/FieldContainer/index.js +11 -11
- package/Fieldset/index.d.ts +1 -1
- package/Fieldset/index.js +7 -7
- package/FieldsetLegend/index.d.ts +5 -5
- package/FieldsetLegend/index.js +11 -11
- package/FileUpload/index.d.ts +1 -1
- package/FileUpload/index.js +11 -11
- package/FileUploadContainer/index.d.ts +1 -1
- package/FileUploadContainer/index.js +7 -7
- package/Footer/index.d.ts +1 -1
- package/Footer/index.js +7 -7
- package/FooterContainer/index.d.ts +1 -1
- package/FooterContainer/index.js +7 -7
- package/FooterContent/index.d.ts +1 -1
- package/FooterContent/index.js +7 -7
- package/FooterContentLogos/index.d.ts +1 -1
- package/FooterContentLogos/index.js +7 -7
- package/FooterHeading/index.d.ts +1 -1
- package/FooterHeading/index.js +8 -8
- package/FooterImage/index.d.ts +1 -1
- package/FooterImage/index.js +11 -10
- package/FooterInlineList/index.d.ts +1 -1
- package/FooterInlineList/index.js +7 -7
- package/FooterInlineListItem/index.d.ts +1 -1
- package/FooterInlineListItem/index.js +7 -7
- package/FooterLink/index.d.ts +1 -1
- package/FooterLink/index.js +7 -7
- package/FooterList/index.d.ts +1 -1
- package/FooterList/index.js +7 -7
- package/FooterListItem/index.d.ts +1 -1
- package/FooterListItem/index.js +7 -7
- package/FooterMeta/index.d.ts +1 -1
- package/FooterMeta/index.js +7 -7
- package/FooterMetaItem/index.d.ts +1 -1
- package/FooterMetaItem/index.js +7 -7
- package/FooterNavigation/index.d.ts +1 -1
- package/FooterNavigation/index.js +7 -7
- package/FooterSection/index.d.ts +1 -1
- package/FooterSection/index.js +7 -7
- package/Form/index.d.ts +1 -1
- package/Form/index.js +7 -7
- package/GlobeIcon/index.js +9 -9
- package/GovGRLogo/index.d.ts +1 -1
- package/GovGRLogo/index.js +11 -11
- package/Grid/index.d.ts +6 -6
- package/Grid/index.js +12 -12
- package/Header/index.d.ts +1 -1
- package/Header/index.js +7 -7
- package/HeaderContent/index.d.ts +1 -1
- package/HeaderContent/index.js +7 -7
- package/HeaderLogo/index.d.ts +5 -5
- package/HeaderLogo/index.js +10 -10
- package/HeaderNavMenuContent/index.d.ts +1 -1
- package/HeaderNavMenuContent/index.js +7 -7
- package/HeaderSecondaryLogo/index.d.ts +5 -5
- package/HeaderSecondaryLogo/index.js +10 -10
- package/HeaderSecondaryLogo/index.test.js +4 -4
- package/HeaderSection/index.d.ts +1 -1
- package/HeaderSection/index.js +7 -7
- package/HeaderSubtitle/index.d.ts +1 -1
- package/HeaderSubtitle/index.js +7 -7
- package/HeaderTitle/index.d.ts +1 -1
- package/HeaderTitle/index.js +8 -8
- package/Heading/index.d.ts +6 -6
- package/Heading/index.js +9 -9
- package/Heading/index.test.js +24 -24
- package/HeadingCaption/index.d.ts +1 -1
- package/HeadingCaption/index.js +8 -8
- package/HellenicRepublicLogo/index.d.ts +1 -1
- package/HellenicRepublicLogo/index.js +15 -13
- package/Hidden/index.d.ts +1 -1
- package/Hidden/index.js +7 -7
- package/Hint/index.d.ts +1 -1
- package/Hint/index.js +7 -7
- package/LabelContainer/index.d.ts +1 -1
- package/LabelContainer/index.js +7 -7
- package/LabelTitle/index.d.ts +5 -5
- package/LabelTitle/index.js +7 -7
- package/Layout/index.d.ts +1 -1
- package/Layout/index.js +7 -7
- package/LinkBase/index.d.ts +1 -1
- package/LinkBase/index.js +7 -7
- package/List/index.d.ts +1 -1
- package/List/index.js +8 -8
- package/ListItem/index.d.ts +1 -1
- package/ListItem/index.js +7 -7
- package/Main/index.d.ts +1 -1
- package/Main/index.js +7 -7
- package/Masthead/index.d.ts +1 -1
- package/Masthead/index.js +7 -7
- package/MastheadBody/index.d.ts +1 -1
- package/MastheadBody/index.js +7 -7
- package/MoreVertIcon/index.d.ts +0 -6
- package/MoreVertIcon/index.js +8 -8
- package/MoreVertIcon/index.test.js +4 -4
- package/Nav/index.d.ts +14 -14
- package/Nav/index.js +15 -15
- package/NavList/index.d.ts +1 -1
- package/NavList/index.js +7 -7
- package/NavListItem/index.d.ts +1 -1
- package/NavListItem/index.js +7 -7
- package/NavListItemButton/index.d.ts +1 -1
- package/NavListItemButton/index.js +7 -7
- package/NavListItemLink/index.d.ts +1 -1
- package/NavListItemLink/index.js +5 -5
- package/NavListItemLink/index.test.js +4 -4
- package/NavMenu/index.d.ts +1 -1
- package/NavMenu/index.js +8 -8
- package/NavMenuContainer/index.d.ts +1 -1
- package/NavMenuContainer/index.js +5 -5
- package/NavMenuContainerContent/index.d.ts +1 -1
- package/NavMenuContainerContent/index.js +5 -5
- package/NavMenuContainerContentList/index.d.ts +1 -1
- package/NavMenuContainerContentList/index.js +7 -7
- package/NavMenuContainerContentListItem/index.d.ts +1 -1
- package/NavMenuContainerContentListItem/index.js +7 -7
- package/NavMenuContainerTitle/index.d.ts +1 -1
- package/NavMenuContainerTitle/index.js +7 -7
- package/NavVertical/index.d.ts +1 -1
- package/NavVertical/index.js +7 -7
- package/NavVerticalItem/index.d.ts +1 -1
- package/NavVerticalItem/index.js +6 -6
- package/NormalText/index.d.ts +8 -8
- package/NormalText/index.js +9 -9
- package/NormalText/index.test.js +52 -52
- package/NotificationBannerContainer/index.d.ts +1 -1
- package/NotificationBannerContainer/index.js +8 -8
- package/NotificationBannerContent/index.d.ts +1 -1
- package/NotificationBannerContent/index.js +7 -7
- package/NotificationBannerHeader/index.d.ts +1 -1
- package/NotificationBannerHeader/index.js +7 -7
- package/NotificationBannerHeading/index.d.ts +1 -1
- package/NotificationBannerHeading/index.js +7 -7
- package/NotificationBannerLink/index.d.ts +1 -1
- package/NotificationBannerLink/index.js +7 -7
- package/PageTitle/index.d.ts +1 -1
- package/PageTitle/index.js +7 -7
- package/PageTitleCaption/index.d.ts +1 -1
- package/PageTitleCaption/index.js +8 -8
- package/PageTitleHeading/index.d.ts +1 -1
- package/PageTitleHeading/index.js +8 -8
- package/PageTitleSection/index.d.ts +1 -1
- package/PageTitleSection/index.js +7 -7
- package/Paragraph/index.d.ts +8 -8
- package/Paragraph/index.js +9 -9
- package/Paragraph/index.test.js +52 -52
- package/PhaseBanner/index.d.ts +1 -1
- package/PhaseBanner/index.js +7 -7
- package/PhaseBannerHeaderContainer/inde.test.d.ts +1 -0
- package/PhaseBannerHeaderContainer/index.d.ts +1 -1
- package/PhaseBannerHeaderContainer/index.js +5 -4
- package/PhaseBannerTag/index.d.ts +1 -1
- package/PhaseBannerTag/index.js +7 -7
- package/PhaseBannerText/index.d.ts +1 -1
- package/PhaseBannerText/index.js +7 -7
- package/RadioConditional/index.d.ts +1 -1
- package/RadioConditional/index.js +8 -8
- package/RadioContainer/index.d.ts +1 -1
- package/RadioContainer/index.js +7 -7
- package/RadioItem/__snapshots__/index.test.tsx.snap +253 -90
- package/RadioItem/index.d.ts +7 -1
- package/RadioItem/index.js +17 -12
- package/RadioItem/index.test.js +26 -7
- package/SectionBreak/index.d.ts +5 -5
- package/SectionBreak/index.js +8 -8
- package/SelectContainer/index.d.ts +1 -1
- package/SelectContainer/index.js +7 -7
- package/SelectContainer/index.test.js +2 -2
- package/SelectOption/index.d.ts +1 -1
- package/SelectOption/index.js +8 -8
- package/SingleCharacterInputContainer/index.d.ts +1 -1
- package/SingleCharacterInputContainer/index.js +7 -7
- package/SingleCharacterInputItem/index.d.ts +6 -6
- package/SingleCharacterInputItem/index.js +14 -14
- package/SingleCharacterInputItem/index.test.js +7 -7
- package/SkipLink/index.d.ts +1 -1
- package/SkipLink/index.js +7 -7
- package/SummaryList/index.d.ts +1 -1
- package/SummaryList/index.js +7 -7
- package/SummaryListItem/index.d.ts +1 -1
- package/SummaryListItem/index.js +7 -7
- package/SummaryListItemAction/index.d.ts +1 -1
- package/SummaryListItemAction/index.js +7 -7
- package/SummaryListItemKey/index.d.ts +1 -1
- package/SummaryListItemKey/index.js +7 -7
- package/SummaryListItemValue/index.d.ts +1 -1
- package/SummaryListItemValue/index.js +7 -7
- package/SvgIcon/index.d.ts +1 -1
- package/SvgIcon/index.js +9 -9
- package/SvgIcon/index.test.js +4 -4
- package/Table/index.d.ts +16 -16
- package/Table/index.js +12 -12
- package/TableBody/index.d.ts +1 -1
- package/TableBody/index.js +8 -8
- package/TableCaption/index.d.ts +1 -1
- package/TableCaption/index.js +8 -8
- package/TableContainer/index.d.ts +1 -1
- package/TableContainer/index.js +6 -6
- package/TableDataCell/index.d.ts +1 -1
- package/TableDataCell/index.js +8 -8
- package/TableHead/index.d.ts +1 -1
- package/TableHead/index.js +7 -7
- package/TableHeadCell/index.d.ts +7 -7
- package/TableHeadCell/index.js +9 -9
- package/TableHeadCell/index.test.js +12 -12
- package/TableNoDataRow/index.d.ts +1 -1
- package/TableNoDataRow/index.js +7 -7
- package/TableRow/index.d.ts +1 -1
- package/TableRow/index.js +8 -8
- package/Tabs/index.d.ts +1 -1
- package/Tabs/index.js +7 -7
- package/TabsHeading/index.d.ts +1 -1
- package/TabsHeading/index.js +8 -8
- package/TabsList/index.d.ts +1 -1
- package/TabsList/index.js +7 -7
- package/TabsListItem/index.d.ts +1 -1
- package/TabsListItem/index.js +10 -10
- package/TabsPanel/index.d.ts +1 -1
- package/TabsPanel/index.js +7 -7
- package/TextArea/index.d.ts +1 -1
- package/TextArea/index.js +9 -9
- package/TextInput/index.d.ts +5 -5
- package/TextInput/index.js +11 -11
- package/TextInput/index.test.js +60 -60
- package/Top/index.d.ts +1 -1
- package/Top/index.js +7 -7
- package/UncheckIcon/index.d.ts +0 -6
- package/UncheckIcon/index.js +8 -8
- package/UncheckIcon/index.test.js +4 -4
- package/VisuallyHidden/index.d.ts +1 -1
- package/VisuallyHidden/index.js +7 -7
- package/WarningText/index.d.ts +1 -1
- package/WarningText/index.js +7 -7
- package/es/AccessibilityIcon/index.js +7 -7
- package/es/AccessibilityIcon/index.test.js +4 -4
- package/es/AccessibilityTextIcon/index.test.js +4 -4
- package/es/Accordion/index.js +6 -6
- package/es/AccordionControls/index.js +6 -6
- package/es/AccordionSection/index.js +6 -6
- package/es/AccordionSectionContent/index.js +6 -6
- package/es/AccordionSectionHeader/index.js +6 -6
- package/es/AccordionSectionSummary/index.js +5 -5
- package/es/AccordionSectionSummaryHeading/index.js +7 -6
- package/es/ArrowIcon/index.js +8 -8
- package/es/Aside/index.js +6 -6
- package/es/BackLink/index.js +9 -9
- package/es/Base/index.js +13 -46
- package/es/Blockquote/index.js +6 -6
- package/es/Bottom/index.js +6 -6
- package/es/Breadcrumbs/index.js +6 -6
- package/es/BreadcrumbsList/index.js +6 -6
- package/es/BreadcrumbsListItem/index.js +8 -8
- package/es/BurgerIcon/index.js +14 -14
- package/es/Button/index.js +8 -8
- package/es/Button/index.test.js +6 -6
- package/es/ButtonGroup/index.js +6 -6
- package/es/ButtonLink/index.js +7 -7
- package/es/ButtonLink/index.test.js +6 -6
- package/es/CallToAction/index.js +7 -7
- package/es/Card/index.js +7 -7
- package/es/Card/index.test.js +10 -10
- package/es/CardAction/index.js +6 -6
- package/es/CardHeading/index.js +7 -7
- package/es/CardText/index.js +6 -6
- package/es/CaretContainer/index.js +5 -5
- package/es/CaretIcon/index.js +8 -8
- package/es/CheckIcon/index.js +7 -7
- package/es/CheckIcon/index.test.js +4 -4
- package/es/Checkbox/index.js +6 -6
- package/es/CheckboxConditional/index.js +7 -7
- package/es/CheckboxItem/__snapshots__/index.test.tsx.snap +219 -73
- package/es/CheckboxItem/index.js +15 -11
- package/es/CheckboxItem/index.test.js +22 -3
- package/es/ChoiceDivider/__snapshots__/index.test.tsx.snap +18 -0
- package/es/ChoiceDivider/index.js +23 -0
- package/es/ChoiceDivider/index.test.js +11 -0
- package/es/CloseIcon/index.js +7 -7
- package/es/Confirmation/index.js +6 -6
- package/es/ConfirmationBody/index.js +6 -6
- package/es/ConfirmationTitle/index.js +6 -6
- package/es/Container/index.js +7 -7
- package/es/Container/index.test.js +2 -2
- package/es/CopyrightContainer/index.js +6 -6
- package/es/DateInputContainer/index.js +6 -6
- package/es/DateInputItem/index.js +10 -10
- package/es/DateInputItem/index.test.js +2 -2
- package/es/Details/index.js +6 -6
- package/es/DetailsContent/index.js +6 -6
- package/es/DetailsSummary/index.js +6 -6
- package/es/ErrorMessage/index.js +6 -6
- package/es/ErrorSummary/index.js +6 -6
- package/es/FieldContainer/index.js +11 -11
- package/es/Fieldset/index.js +6 -6
- package/es/FieldsetLegend/index.js +10 -10
- package/es/FileUpload/index.js +10 -10
- package/es/FileUploadContainer/index.js +6 -6
- package/es/Footer/index.js +6 -6
- package/es/FooterContainer/index.js +6 -6
- package/es/FooterContent/index.js +6 -6
- package/es/FooterContentLogos/index.js +6 -6
- package/es/FooterHeading/index.js +7 -7
- package/es/FooterImage/index.js +10 -9
- package/es/FooterInlineList/index.js +6 -6
- package/es/FooterInlineListItem/index.js +6 -6
- package/es/FooterLink/index.js +6 -6
- package/es/FooterList/index.js +6 -6
- package/es/FooterListItem/index.js +6 -6
- package/es/FooterMeta/index.js +6 -6
- package/es/FooterMetaItem/index.js +6 -6
- package/es/FooterNavigation/index.js +6 -6
- package/es/FooterSection/index.js +6 -6
- package/es/Form/index.js +6 -6
- package/es/GlobeIcon/index.js +8 -8
- package/es/GovGRLogo/index.js +10 -10
- package/es/Grid/index.js +11 -11
- package/es/Header/index.js +6 -6
- package/es/HeaderContent/index.js +6 -6
- package/es/HeaderLogo/index.js +9 -9
- package/es/HeaderNavMenuContent/index.js +6 -6
- package/es/HeaderSecondaryLogo/index.js +9 -9
- package/es/HeaderSecondaryLogo/index.test.js +4 -4
- package/es/HeaderSection/index.js +6 -6
- package/es/HeaderSubtitle/index.js +6 -6
- package/es/HeaderTitle/index.js +7 -7
- package/es/Heading/index.js +8 -8
- package/es/Heading/index.test.js +24 -24
- package/es/HeadingCaption/index.js +7 -7
- package/es/HellenicRepublicLogo/index.js +14 -12
- package/es/Hidden/index.js +6 -6
- package/es/Hint/index.js +6 -6
- package/es/LabelContainer/index.js +6 -6
- package/es/LabelTitle/index.js +6 -6
- package/es/Layout/index.js +6 -6
- package/es/LinkBase/index.js +6 -6
- package/es/List/index.js +7 -7
- package/es/ListItem/index.js +6 -6
- package/es/Main/index.js +6 -6
- package/es/Masthead/index.js +6 -6
- package/es/MastheadBody/index.js +6 -6
- package/es/MoreVertIcon/index.js +7 -7
- package/es/MoreVertIcon/index.test.js +4 -4
- package/es/Nav/index.js +14 -14
- package/es/NavList/index.js +6 -6
- package/es/NavListItem/index.js +6 -6
- package/es/NavListItemButton/index.js +6 -6
- package/es/NavListItemLink/index.js +5 -5
- package/es/NavListItemLink/index.test.js +4 -4
- package/es/NavMenu/index.js +7 -7
- package/es/NavMenuContainer/index.js +5 -5
- package/es/NavMenuContainerContent/index.js +5 -5
- package/es/NavMenuContainerContentList/index.js +6 -6
- package/es/NavMenuContainerContentListItem/index.js +6 -6
- package/es/NavMenuContainerTitle/index.js +7 -7
- package/es/NavVertical/index.js +6 -6
- package/es/NavVerticalItem/index.js +5 -5
- package/es/NormalText/index.js +8 -8
- package/es/NormalText/index.test.js +52 -52
- package/es/NotificationBannerContainer/index.js +7 -7
- package/es/NotificationBannerContent/index.js +6 -6
- package/es/NotificationBannerHeader/index.js +6 -6
- package/es/NotificationBannerHeading/index.js +6 -6
- package/es/NotificationBannerLink/index.js +6 -6
- package/es/PageTitle/index.js +6 -6
- package/es/PageTitleCaption/index.js +7 -7
- package/es/PageTitleHeading/index.js +7 -7
- package/es/PageTitleSection/index.js +6 -6
- package/es/Paragraph/index.js +8 -8
- package/es/Paragraph/index.test.js +52 -52
- package/es/PhaseBanner/index.js +6 -6
- package/es/PhaseBannerHeaderContainer/index.js +4 -3
- package/es/PhaseBannerTag/index.js +6 -6
- package/es/PhaseBannerText/index.js +6 -6
- package/es/RadioConditional/index.js +7 -7
- package/es/RadioContainer/index.js +6 -6
- package/es/RadioItem/__snapshots__/index.test.tsx.snap +253 -90
- package/es/RadioItem/index.js +15 -11
- package/es/RadioItem/index.test.js +26 -7
- package/es/SectionBreak/index.js +7 -7
- package/es/SelectContainer/index.js +6 -6
- package/es/SelectContainer/index.test.js +2 -2
- package/es/SelectOption/index.js +7 -7
- package/es/SingleCharacterInputContainer/index.js +6 -6
- package/es/SingleCharacterInputItem/index.js +13 -13
- package/es/SingleCharacterInputItem/index.test.js +7 -7
- package/es/SkipLink/index.js +6 -6
- package/es/SummaryList/index.js +6 -6
- package/es/SummaryListItem/index.js +6 -6
- package/es/SummaryListItemAction/index.js +6 -6
- package/es/SummaryListItemKey/index.js +6 -6
- package/es/SummaryListItemValue/index.js +6 -6
- package/es/SvgIcon/index.js +8 -8
- package/es/SvgIcon/index.test.js +4 -4
- package/es/Table/index.js +11 -11
- package/es/TableBody/index.js +7 -7
- package/es/TableCaption/index.js +7 -7
- package/es/TableContainer/index.js +5 -5
- package/es/TableDataCell/index.js +7 -7
- package/es/TableHead/index.js +6 -6
- package/es/TableHeadCell/index.js +8 -8
- package/es/TableHeadCell/index.test.js +12 -12
- package/es/TableNoDataRow/index.js +6 -6
- package/es/TableRow/index.js +7 -7
- package/es/Tabs/index.js +6 -6
- package/es/TabsHeading/index.js +7 -7
- package/es/TabsList/index.js +6 -6
- package/es/TabsListItem/index.js +9 -9
- package/es/TabsPanel/index.js +6 -6
- package/es/TextArea/index.js +8 -8
- package/es/TextInput/index.js +10 -10
- package/es/TextInput/index.test.js +60 -60
- package/es/Top/index.js +6 -6
- package/es/UncheckIcon/index.js +7 -7
- package/es/UncheckIcon/index.test.js +4 -4
- package/es/VisuallyHidden/index.js +6 -6
- package/es/WarningText/index.js +6 -6
- package/es/index.js +1 -0
- package/es/registry.js +3 -0
- package/esm/AccessibilityIcon/index.js +7 -7
- package/esm/AccessibilityIcon/index.test.js +4 -4
- package/esm/AccessibilityTextIcon/index.test.js +4 -4
- package/esm/Accordion/index.js +6 -6
- package/esm/AccordionControls/index.js +6 -6
- package/esm/AccordionSection/index.js +6 -6
- package/esm/AccordionSectionContent/index.js +6 -6
- package/esm/AccordionSectionHeader/index.js +6 -6
- package/esm/AccordionSectionSummary/index.js +5 -5
- package/esm/AccordionSectionSummaryHeading/index.js +7 -6
- package/esm/ArrowIcon/index.js +8 -8
- package/esm/Aside/index.js +6 -6
- package/esm/BackLink/index.js +9 -9
- package/esm/Base/index.js +13 -46
- package/esm/Blockquote/index.js +6 -6
- package/esm/Bottom/index.js +6 -6
- package/esm/Breadcrumbs/index.js +6 -6
- package/esm/BreadcrumbsList/index.js +6 -6
- package/esm/BreadcrumbsListItem/index.js +8 -8
- package/esm/BurgerIcon/index.js +14 -14
- package/esm/Button/index.js +8 -8
- package/esm/Button/index.test.js +6 -6
- package/esm/ButtonGroup/index.js +6 -6
- package/esm/ButtonLink/index.js +7 -7
- package/esm/ButtonLink/index.test.js +6 -6
- package/esm/CallToAction/index.js +7 -7
- package/esm/Card/index.js +7 -7
- package/esm/Card/index.test.js +10 -10
- package/esm/CardAction/index.js +6 -6
- package/esm/CardHeading/index.js +7 -7
- package/esm/CardText/index.js +6 -6
- package/esm/CaretContainer/index.js +5 -5
- package/esm/CaretIcon/index.js +8 -8
- package/esm/CheckIcon/index.js +7 -7
- package/esm/CheckIcon/index.test.js +4 -4
- package/esm/Checkbox/index.js +6 -6
- package/esm/CheckboxConditional/index.js +7 -7
- package/esm/CheckboxItem/__snapshots__/index.test.tsx.snap +219 -73
- package/esm/CheckboxItem/index.js +15 -11
- package/esm/CheckboxItem/index.test.js +22 -3
- package/esm/ChoiceDivider/__snapshots__/index.test.tsx.snap +18 -0
- package/esm/ChoiceDivider/index.js +23 -0
- package/esm/ChoiceDivider/index.test.js +11 -0
- package/esm/CloseIcon/index.js +7 -7
- package/esm/Confirmation/index.js +6 -6
- package/esm/ConfirmationBody/index.js +6 -6
- package/esm/ConfirmationTitle/index.js +6 -6
- package/esm/Container/index.js +7 -7
- package/esm/Container/index.test.js +2 -2
- package/esm/CopyrightContainer/index.js +6 -6
- package/esm/DateInputContainer/index.js +6 -6
- package/esm/DateInputItem/index.js +10 -10
- package/esm/DateInputItem/index.test.js +2 -2
- package/esm/Details/index.js +6 -6
- package/esm/DetailsContent/index.js +6 -6
- package/esm/DetailsSummary/index.js +6 -6
- package/esm/ErrorMessage/index.js +6 -6
- package/esm/ErrorSummary/index.js +6 -6
- package/esm/FieldContainer/index.js +11 -11
- package/esm/Fieldset/index.js +6 -6
- package/esm/FieldsetLegend/index.js +10 -10
- package/esm/FileUpload/index.js +10 -10
- package/esm/FileUploadContainer/index.js +6 -6
- package/esm/Footer/index.js +6 -6
- package/esm/FooterContainer/index.js +6 -6
- package/esm/FooterContent/index.js +6 -6
- package/esm/FooterContentLogos/index.js +6 -6
- package/esm/FooterHeading/index.js +7 -7
- package/esm/FooterImage/index.js +10 -9
- package/esm/FooterInlineList/index.js +6 -6
- package/esm/FooterInlineListItem/index.js +6 -6
- package/esm/FooterLink/index.js +6 -6
- package/esm/FooterList/index.js +6 -6
- package/esm/FooterListItem/index.js +6 -6
- package/esm/FooterMeta/index.js +6 -6
- package/esm/FooterMetaItem/index.js +6 -6
- package/esm/FooterNavigation/index.js +6 -6
- package/esm/FooterSection/index.js +6 -6
- package/esm/Form/index.js +6 -6
- package/esm/GlobeIcon/index.js +8 -8
- package/esm/GovGRLogo/index.js +10 -10
- package/esm/Grid/index.js +11 -11
- package/esm/Header/index.js +6 -6
- package/esm/HeaderContent/index.js +6 -6
- package/esm/HeaderLogo/index.js +9 -9
- package/esm/HeaderNavMenuContent/index.js +6 -6
- package/esm/HeaderSecondaryLogo/index.js +9 -9
- package/esm/HeaderSecondaryLogo/index.test.js +4 -4
- package/esm/HeaderSection/index.js +6 -6
- package/esm/HeaderSubtitle/index.js +6 -6
- package/esm/HeaderTitle/index.js +7 -7
- package/esm/Heading/index.js +8 -8
- package/esm/Heading/index.test.js +24 -24
- package/esm/HeadingCaption/index.js +7 -7
- package/esm/HellenicRepublicLogo/index.js +14 -12
- package/esm/Hidden/index.js +6 -6
- package/esm/Hint/index.js +6 -6
- package/esm/LabelContainer/index.js +6 -6
- package/esm/LabelTitle/index.js +6 -6
- package/esm/Layout/index.js +6 -6
- package/esm/LinkBase/index.js +6 -6
- package/esm/List/index.js +7 -7
- package/esm/ListItem/index.js +6 -6
- package/esm/Main/index.js +6 -6
- package/esm/Masthead/index.js +6 -6
- package/esm/MastheadBody/index.js +6 -6
- package/esm/MoreVertIcon/index.js +7 -7
- package/esm/MoreVertIcon/index.test.js +4 -4
- package/esm/Nav/index.js +14 -14
- package/esm/NavList/index.js +6 -6
- package/esm/NavListItem/index.js +6 -6
- package/esm/NavListItemButton/index.js +6 -6
- package/esm/NavListItemLink/index.js +5 -5
- package/esm/NavListItemLink/index.test.js +4 -4
- package/esm/NavMenu/index.js +7 -7
- package/esm/NavMenuContainer/index.js +5 -5
- package/esm/NavMenuContainerContent/index.js +5 -5
- package/esm/NavMenuContainerContentList/index.js +6 -6
- package/esm/NavMenuContainerContentListItem/index.js +6 -6
- package/esm/NavMenuContainerTitle/index.js +7 -7
- package/esm/NavVertical/index.js +6 -6
- package/esm/NavVerticalItem/index.js +5 -5
- package/esm/NormalText/index.js +8 -8
- package/esm/NormalText/index.test.js +52 -52
- package/esm/NotificationBannerContainer/index.js +7 -7
- package/esm/NotificationBannerContent/index.js +6 -6
- package/esm/NotificationBannerHeader/index.js +6 -6
- package/esm/NotificationBannerHeading/index.js +6 -6
- package/esm/NotificationBannerLink/index.js +6 -6
- package/esm/PageTitle/index.js +6 -6
- package/esm/PageTitleCaption/index.js +7 -7
- package/esm/PageTitleHeading/index.js +7 -7
- package/esm/PageTitleSection/index.js +6 -6
- package/esm/Paragraph/index.js +8 -8
- package/esm/Paragraph/index.test.js +52 -52
- package/esm/PhaseBanner/index.js +6 -6
- package/esm/PhaseBannerHeaderContainer/index.js +4 -3
- package/esm/PhaseBannerTag/index.js +6 -6
- package/esm/PhaseBannerText/index.js +6 -6
- package/esm/RadioConditional/index.js +7 -7
- package/esm/RadioContainer/index.js +6 -6
- package/esm/RadioItem/__snapshots__/index.test.tsx.snap +253 -90
- package/esm/RadioItem/index.js +15 -11
- package/esm/RadioItem/index.test.js +26 -7
- package/esm/SectionBreak/index.js +7 -7
- package/esm/SelectContainer/index.js +6 -6
- package/esm/SelectContainer/index.test.js +2 -2
- package/esm/SelectOption/index.js +7 -7
- package/esm/SingleCharacterInputContainer/index.js +6 -6
- package/esm/SingleCharacterInputItem/index.js +13 -13
- package/esm/SingleCharacterInputItem/index.test.js +7 -7
- package/esm/SkipLink/index.js +6 -6
- package/esm/SummaryList/index.js +6 -6
- package/esm/SummaryListItem/index.js +6 -6
- package/esm/SummaryListItemAction/index.js +6 -6
- package/esm/SummaryListItemKey/index.js +6 -6
- package/esm/SummaryListItemValue/index.js +6 -6
- package/esm/SvgIcon/index.js +8 -8
- package/esm/SvgIcon/index.test.js +4 -4
- package/esm/Table/index.js +11 -11
- package/esm/TableBody/index.js +7 -7
- package/esm/TableCaption/index.js +7 -7
- package/esm/TableContainer/index.js +5 -5
- package/esm/TableDataCell/index.js +7 -7
- package/esm/TableHead/index.js +6 -6
- package/esm/TableHeadCell/index.js +8 -8
- package/esm/TableHeadCell/index.test.js +12 -12
- package/esm/TableNoDataRow/index.js +6 -6
- package/esm/TableRow/index.js +7 -7
- package/esm/Tabs/index.js +6 -6
- package/esm/TabsHeading/index.js +7 -7
- package/esm/TabsList/index.js +6 -6
- package/esm/TabsListItem/index.js +9 -9
- package/esm/TabsPanel/index.js +6 -6
- package/esm/TextArea/index.js +8 -8
- package/esm/TextInput/index.js +10 -10
- package/esm/TextInput/index.test.js +60 -60
- package/esm/Top/index.js +6 -6
- package/esm/UncheckIcon/index.js +7 -7
- package/esm/UncheckIcon/index.test.js +4 -4
- package/esm/VisuallyHidden/index.js +6 -6
- package/esm/WarningText/index.js +6 -6
- package/esm/index.js +2 -1
- package/esm/registry.js +3 -0
- package/index.d.ts +1 -0
- package/index.js +13 -0
- package/package.json +2 -2
- package/registry.d.ts +1 -0
- package/registry.js +4 -0
- package/src/AccessibilityIcon/index.test.tsx +2 -2
- package/src/AccessibilityIcon/index.tsx +5 -12
- package/src/AccessibilityTextIcon/index.test.tsx +2 -2
- package/src/Accordion/index.tsx +3 -3
- package/src/AccordionControls/index.tsx +3 -3
- package/src/AccordionSection/index.tsx +3 -3
- package/src/AccordionSectionContent/index.tsx +3 -3
- package/src/AccordionSectionHeader/index.tsx +3 -3
- package/src/AccordionSectionSummary/index.tsx +3 -3
- package/src/AccordionSectionSummaryHeading/index.tsx +5 -4
- package/src/ArrowIcon/index.tsx +4 -4
- package/src/Aside/index.tsx +3 -3
- package/src/BackLink/index.tsx +6 -6
- package/src/Base/index.tsx +42 -91
- package/src/Blockquote/index.tsx +3 -3
- package/src/Bottom/index.tsx +3 -3
- package/src/Breadcrumbs/index.tsx +3 -3
- package/src/BreadcrumbsList/index.tsx +3 -3
- package/src/BreadcrumbsListItem/index.tsx +4 -4
- package/src/BurgerIcon/index.tsx +7 -7
- package/src/Button/index.test.tsx +3 -3
- package/src/Button/index.tsx +6 -6
- package/src/ButtonGroup/index.tsx +3 -3
- package/src/ButtonLink/index.test.tsx +3 -3
- package/src/ButtonLink/index.tsx +3 -3
- package/src/CallToAction/index.tsx +4 -4
- package/src/Card/index.test.tsx +5 -5
- package/src/Card/index.tsx +10 -10
- package/src/CardAction/index.tsx +3 -3
- package/src/CardHeading/index.tsx +5 -5
- package/src/CardText/index.tsx +3 -3
- package/src/CaretContainer/index.tsx +2 -2
- package/src/CaretIcon/index.tsx +4 -4
- package/src/CheckIcon/index.test.tsx +2 -2
- package/src/CheckIcon/index.tsx +6 -12
- package/src/Checkbox/index.tsx +3 -3
- package/src/CheckboxConditional/index.tsx +4 -4
- package/src/CheckboxItem/__snapshots__/index.test.tsx.snap +219 -73
- package/src/CheckboxItem/index.test.tsx +14 -1
- package/src/CheckboxItem/index.tsx +36 -25
- package/src/ChoiceDivider/__snapshots__/index.test.tsx.snap +18 -0
- package/src/ChoiceDivider/index.test.tsx +8 -0
- package/src/ChoiceDivider/index.tsx +29 -0
- package/src/CloseIcon/index.tsx +6 -12
- package/src/Confirmation/index.tsx +3 -3
- package/src/ConfirmationBody/index.tsx +3 -3
- package/src/ConfirmationTitle/index.tsx +3 -3
- package/src/Container/index.test.tsx +1 -1
- package/src/Container/index.tsx +3 -3
- package/src/CopyrightContainer/index.tsx +3 -3
- package/src/DateInputContainer/index.tsx +3 -3
- package/src/DateInputItem/index.test.tsx +1 -1
- package/src/DateInputItem/index.tsx +12 -12
- package/src/Details/index.tsx +3 -3
- package/src/DetailsContent/index.tsx +3 -3
- package/src/DetailsSummary/index.tsx +3 -3
- package/src/ErrorMessage/index.tsx +3 -3
- package/src/ErrorSummary/index.tsx +3 -3
- package/src/FieldContainer/index.tsx +4 -4
- package/src/Fieldset/index.tsx +3 -3
- package/src/FieldsetLegend/index.tsx +24 -22
- package/src/FileUpload/index.tsx +8 -8
- package/src/FileUploadContainer/index.tsx +3 -3
- package/src/Footer/index.tsx +3 -3
- package/src/FooterContainer/index.tsx +3 -3
- package/src/FooterContent/index.tsx +3 -3
- package/src/FooterContentLogos/index.tsx +3 -3
- package/src/FooterHeading/index.tsx +3 -3
- package/src/FooterImage/index.tsx +6 -5
- package/src/FooterInlineList/index.tsx +3 -3
- package/src/FooterInlineListItem/index.tsx +3 -3
- package/src/FooterLink/index.tsx +3 -3
- package/src/FooterList/index.tsx +3 -3
- package/src/FooterListItem/index.tsx +3 -3
- package/src/FooterMeta/index.tsx +3 -3
- package/src/FooterMetaItem/index.tsx +3 -3
- package/src/FooterNavigation/index.tsx +3 -3
- package/src/FooterSection/index.tsx +3 -3
- package/src/Form/index.tsx +3 -3
- package/src/GlobeIcon/index.tsx +4 -4
- package/src/GovGRLogo/index.tsx +7 -7
- package/src/Grid/index.tsx +14 -14
- package/src/Header/index.tsx +4 -4
- package/src/HeaderContent/index.tsx +3 -3
- package/src/HeaderLogo/index.tsx +10 -10
- package/src/HeaderNavMenuContent/index.tsx +3 -3
- package/src/HeaderSecondaryLogo/index.test.tsx +3 -3
- package/src/HeaderSecondaryLogo/index.tsx +10 -10
- package/src/HeaderSection/index.tsx +3 -3
- package/src/HeaderSubtitle/index.tsx +3 -3
- package/src/HeaderTitle/index.tsx +4 -4
- package/src/Heading/index.test.tsx +12 -12
- package/src/Heading/index.tsx +8 -8
- package/src/HeadingCaption/index.tsx +3 -3
- package/src/HellenicRepublicLogo/index.tsx +30 -26
- package/src/Hidden/index.tsx +3 -3
- package/src/Hint/index.tsx +3 -3
- package/src/LabelContainer/index.tsx +3 -3
- package/src/LabelTitle/index.tsx +7 -7
- package/src/Layout/index.tsx +3 -3
- package/src/LinkBase/index.tsx +3 -3
- package/src/List/index.tsx +3 -3
- package/src/ListItem/index.tsx +3 -3
- package/src/Main/index.tsx +4 -4
- package/src/Masthead/index.tsx +3 -3
- package/src/MastheadBody/index.tsx +3 -3
- package/src/MoreVertIcon/index.test.tsx +2 -2
- package/src/MoreVertIcon/index.tsx +5 -12
- package/src/Nav/index.tsx +20 -20
- package/src/NavList/index.tsx +3 -3
- package/src/NavListItem/index.tsx +3 -3
- package/src/NavListItemButton/index.tsx +4 -4
- package/src/NavListItemLink/index.test.tsx +2 -2
- package/src/NavListItemLink/index.tsx +4 -4
- package/src/NavMenu/index.tsx +4 -4
- package/src/NavMenuContainer/index.tsx +2 -2
- package/src/NavMenuContainerContent/index.tsx +2 -2
- package/src/NavMenuContainerContentList/index.tsx +3 -3
- package/src/NavMenuContainerContentListItem/index.tsx +3 -3
- package/src/NavMenuContainerTitle/index.tsx +7 -7
- package/src/NavVertical/index.tsx +3 -3
- package/src/NavVerticalItem/index.tsx +3 -3
- package/src/NormalText/index.test.tsx +26 -26
- package/src/NormalText/index.tsx +11 -11
- package/src/NotificationBannerContainer/index.tsx +6 -6
- package/src/NotificationBannerContent/index.tsx +3 -3
- package/src/NotificationBannerHeader/index.tsx +3 -3
- package/src/NotificationBannerHeading/index.tsx +3 -3
- package/src/NotificationBannerLink/index.tsx +4 -4
- package/src/PageTitle/index.tsx +3 -3
- package/src/PageTitleCaption/index.tsx +3 -3
- package/src/PageTitleHeading/index.tsx +3 -3
- package/src/PageTitleSection/index.tsx +3 -3
- package/src/Paragraph/index.test.tsx +26 -26
- package/src/Paragraph/index.tsx +11 -11
- package/src/PhaseBanner/index.tsx +3 -3
- package/src/PhaseBannerHeaderContainer/index.tsx +4 -3
- package/src/PhaseBannerTag/index.tsx +3 -3
- package/src/PhaseBannerText/index.tsx +3 -3
- package/src/RadioConditional/index.tsx +4 -4
- package/src/RadioContainer/index.tsx +3 -3
- package/src/RadioItem/__snapshots__/index.test.tsx.snap +253 -90
- package/src/RadioItem/index.test.tsx +17 -1
- package/src/RadioItem/index.tsx +36 -25
- package/src/SectionBreak/index.tsx +8 -8
- package/src/SelectContainer/index.test.tsx +1 -1
- package/src/SelectContainer/index.tsx +4 -4
- package/src/SelectOption/index.tsx +4 -4
- package/src/SingleCharacterInputContainer/index.tsx +3 -3
- package/src/SingleCharacterInputItem/index.test.tsx +4 -4
- package/src/SingleCharacterInputItem/index.tsx +26 -24
- package/src/SkipLink/index.tsx +5 -5
- package/src/SummaryList/index.tsx +3 -3
- package/src/SummaryListItem/index.tsx +3 -3
- package/src/SummaryListItemAction/index.tsx +3 -3
- package/src/SummaryListItemKey/index.tsx +3 -3
- package/src/SummaryListItemValue/index.tsx +3 -3
- package/src/SvgIcon/index.test.tsx +2 -2
- package/src/SvgIcon/index.tsx +4 -4
- package/src/Table/index.tsx +22 -22
- package/src/TableBody/index.tsx +3 -3
- package/src/TableCaption/index.tsx +3 -3
- package/src/TableContainer/index.tsx +3 -3
- package/src/TableDataCell/index.tsx +3 -3
- package/src/TableHead/index.tsx +3 -3
- package/src/TableHeadCell/index.test.tsx +6 -6
- package/src/TableHeadCell/index.tsx +9 -9
- package/src/TableNoDataRow/index.tsx +4 -4
- package/src/TableRow/index.tsx +3 -3
- package/src/Tabs/index.tsx +3 -3
- package/src/TabsHeading/index.tsx +3 -3
- package/src/TabsList/index.tsx +4 -4
- package/src/TabsListItem/index.tsx +6 -6
- package/src/TabsPanel/index.tsx +5 -5
- package/src/TextArea/index.tsx +5 -5
- package/src/TextInput/index.test.tsx +30 -30
- package/src/TextInput/index.tsx +14 -14
- package/src/Top/index.tsx +3 -3
- package/src/UncheckIcon/index.test.tsx +2 -2
- package/src/UncheckIcon/index.tsx +5 -12
- package/src/VisuallyHidden/index.tsx +3 -3
- package/src/WarningText/index.tsx +3 -3
- package/src/index.ts +1 -0
- package/src/registry.js +3 -0
- /package/{PhaseBannerHeaderContainer → ChoiceDivider}/index.test.d.ts +0 -0
- /package/PhaseBannerHeaderContainer/__snapshots__/{index.test.tsx.snap → inde.test.tsx.snap} +0 -0
- /package/PhaseBannerHeaderContainer/{index.test.js → inde.test.js} +0 -0
- /package/es/PhaseBannerHeaderContainer/__snapshots__/{index.test.tsx.snap → inde.test.tsx.snap} +0 -0
- /package/es/PhaseBannerHeaderContainer/{index.test.js → inde.test.js} +0 -0
- /package/esm/PhaseBannerHeaderContainer/__snapshots__/{index.test.tsx.snap → inde.test.tsx.snap} +0 -0
- /package/esm/PhaseBannerHeaderContainer/{index.test.js → inde.test.js} +0 -0
- /package/src/PhaseBannerHeaderContainer/__snapshots__/{index.test.tsx.snap → inde.test.tsx.snap} +0 -0
- /package/src/PhaseBannerHeaderContainer/{index.test.tsx → inde.test.tsx} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface SelectOptionProps extends BaseProps<'option'> {}
|
|
6
6
|
/**
|
|
@@ -11,16 +11,16 @@ export const SelectOption = React.forwardRef<
|
|
|
11
11
|
HTMLOptionElement,
|
|
12
12
|
SelectOptionProps
|
|
13
13
|
>(function SelectOption(
|
|
14
|
-
{
|
|
14
|
+
{ value, selected, className, children, ...props },
|
|
15
15
|
ref
|
|
16
16
|
) {
|
|
17
17
|
return (
|
|
18
18
|
<Base
|
|
19
19
|
as="option"
|
|
20
|
-
|
|
20
|
+
value={value}
|
|
21
21
|
ref={ref}
|
|
22
22
|
selected={selected}
|
|
23
|
-
|
|
23
|
+
className={clsx(className, {})}
|
|
24
24
|
{...props}
|
|
25
25
|
>
|
|
26
26
|
{children}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface SingleCharacterInputContainerProps extends BaseProps<'div'> {}
|
|
6
6
|
/**
|
|
@@ -12,16 +12,16 @@ export const SingleCharacterInputContainer = React.forwardRef<
|
|
|
12
12
|
HTMLDivElement,
|
|
13
13
|
SingleCharacterInputContainerProps
|
|
14
14
|
>(function SingleCharacterInputContainer(
|
|
15
|
-
{
|
|
15
|
+
{ className, children, ...props },
|
|
16
16
|
ref
|
|
17
17
|
) {
|
|
18
18
|
return (
|
|
19
19
|
<Base
|
|
20
20
|
as="div"
|
|
21
|
+
ref={ref}
|
|
21
22
|
className={clsx(className, {
|
|
22
23
|
'govgr-single-character-input--container': true,
|
|
23
24
|
})}
|
|
24
|
-
ref={ref}
|
|
25
25
|
{...props}
|
|
26
26
|
>
|
|
27
27
|
{children}
|
|
@@ -18,7 +18,7 @@ it('renders the SingleCharacterInputItem with name prop', () => {
|
|
|
18
18
|
|
|
19
19
|
it('renders the SingleCharacterInputItem with name and error props', () => {
|
|
20
20
|
expect(
|
|
21
|
-
mount(<SingleCharacterInputItem
|
|
21
|
+
mount(<SingleCharacterInputItem name={'single-character-input'} error />)
|
|
22
22
|
).toMatchSnapshot();
|
|
23
23
|
});
|
|
24
24
|
it('renders the SingleCharacterInputItem with pattern prop', () => {
|
|
@@ -27,7 +27,7 @@ it('renders the SingleCharacterInputItem with pattern prop', () => {
|
|
|
27
27
|
|
|
28
28
|
it('renders the SingleCharacterInputItem with name and error props', () => {
|
|
29
29
|
expect(
|
|
30
|
-
mount(<SingleCharacterInputItem
|
|
30
|
+
mount(<SingleCharacterInputItem name={'single-character-input'} error />)
|
|
31
31
|
).toMatchSnapshot();
|
|
32
32
|
});
|
|
33
33
|
|
|
@@ -35,10 +35,10 @@ it('renders the SingleCharacterInputItem with name, pattern, maxLength and error
|
|
|
35
35
|
expect(
|
|
36
36
|
mount(
|
|
37
37
|
<SingleCharacterInputItem
|
|
38
|
-
error
|
|
39
|
-
maxLength={6}
|
|
40
38
|
name={'single-character-input'}
|
|
41
39
|
pattern="\d{1}"
|
|
40
|
+
maxLength={6}
|
|
41
|
+
error
|
|
42
42
|
/>
|
|
43
43
|
)
|
|
44
44
|
).toMatchSnapshot();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface SingleCharacterInputItemProps extends BaseProps<'input'> {
|
|
6
6
|
/**
|
|
@@ -8,17 +8,17 @@ export interface SingleCharacterInputItemProps extends BaseProps<'input'> {
|
|
|
8
8
|
* Use this prop when there is an error at the input.
|
|
9
9
|
*/
|
|
10
10
|
error?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* pattern is optional. The default value is [0-9].
|
|
13
|
+
* Use this prop when you want to give a specific format input.
|
|
14
|
+
*/
|
|
15
|
+
pattern?: string;
|
|
11
16
|
/**
|
|
12
17
|
* maxLength property is optional
|
|
13
18
|
* maxLength prop specifies the max length of the input field.
|
|
14
19
|
* maxLength default value is 1.
|
|
15
20
|
*/
|
|
16
21
|
maxLength?: number;
|
|
17
|
-
/**
|
|
18
|
-
* pattern is optional. The default value is [0-9].
|
|
19
|
-
* Use this prop when you want to give a specific format input.
|
|
20
|
-
*/
|
|
21
|
-
pattern?: string;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Details for the SingleCharacterInputItem.
|
|
@@ -29,27 +29,29 @@ export const SingleCharacterInputItem = React.forwardRef<
|
|
|
29
29
|
HTMLInputElement,
|
|
30
30
|
SingleCharacterInputItemProps
|
|
31
31
|
>(function SingleCharacterInputItem(
|
|
32
|
-
{
|
|
32
|
+
{ name, error, className, pattern = '[0-9]*', maxLength = 1, ...props },
|
|
33
33
|
ref
|
|
34
34
|
) {
|
|
35
35
|
return (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
36
|
+
<>
|
|
37
|
+
<Base
|
|
38
|
+
as="input"
|
|
39
|
+
ref={ref}
|
|
40
|
+
type="text"
|
|
41
|
+
pattern={pattern}
|
|
42
|
+
maxLength={maxLength}
|
|
43
|
+
inputMode="numeric"
|
|
44
|
+
name={name}
|
|
45
|
+
className={clsx({
|
|
46
|
+
className,
|
|
47
|
+
'govgr-otp-input__item': true,
|
|
48
|
+
'govgr-input': true,
|
|
49
|
+
'govgr-otp-input--width': true,
|
|
50
|
+
'govgr-error-input': error === true,
|
|
51
|
+
})}
|
|
52
|
+
{...props}
|
|
53
|
+
/>
|
|
54
|
+
</>
|
|
53
55
|
);
|
|
54
56
|
});
|
|
55
57
|
|
package/src/SkipLink/index.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface LinkProps extends BaseProps<'a'> {}
|
|
6
6
|
/**
|
|
@@ -8,18 +8,18 @@ export interface LinkProps extends BaseProps<'a'> {}
|
|
|
8
8
|
*/
|
|
9
9
|
export const SkipLink = React.forwardRef<HTMLAnchorElement, LinkProps>(
|
|
10
10
|
function SkipLink(
|
|
11
|
-
{
|
|
11
|
+
{ className, children, href = '#main-content', ...props },
|
|
12
12
|
ref
|
|
13
13
|
) {
|
|
14
14
|
return (
|
|
15
15
|
<Base
|
|
16
16
|
as="a"
|
|
17
|
+
tabIndex={0}
|
|
18
|
+
href={href}
|
|
19
|
+
ref={ref}
|
|
17
20
|
className={clsx(className, {
|
|
18
21
|
'govgr--skip-link': true,
|
|
19
22
|
})}
|
|
20
|
-
href={href}
|
|
21
|
-
ref={ref}
|
|
22
|
-
tabIndex={0}
|
|
23
23
|
{...props}
|
|
24
24
|
>
|
|
25
25
|
{children}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface SummaryListProps extends BaseProps<'dl'> {
|
|
6
6
|
/**
|
|
@@ -15,15 +15,15 @@ export interface SummaryListProps extends BaseProps<'dl'> {
|
|
|
15
15
|
* It must contain a list of SummaryListItem components.
|
|
16
16
|
*/
|
|
17
17
|
export const SummaryList = React.forwardRef<HTMLDListElement, SummaryListProps>(
|
|
18
|
-
function SummaryList({ border = true, children,
|
|
18
|
+
function SummaryList({ className, border = true, children, ...props }, ref) {
|
|
19
19
|
return (
|
|
20
20
|
<Base
|
|
21
21
|
as="dl"
|
|
22
|
+
ref={ref}
|
|
22
23
|
className={clsx(className, {
|
|
23
24
|
'govgr-summary-list--no-border': !border,
|
|
24
25
|
'govgr-summary-list': true,
|
|
25
26
|
})}
|
|
26
|
-
ref={ref}
|
|
27
27
|
{...props}
|
|
28
28
|
>
|
|
29
29
|
{children}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface SummaryListItemProps extends BaseProps<'div'> {}
|
|
6
6
|
/**
|
|
@@ -10,14 +10,14 @@ export interface SummaryListItemProps extends BaseProps<'div'> {}
|
|
|
10
10
|
export const SummaryListItem = React.forwardRef<
|
|
11
11
|
HTMLDivElement,
|
|
12
12
|
SummaryListItemProps
|
|
13
|
-
>(function SummaryListItem({
|
|
13
|
+
>(function SummaryListItem({ className, children, ...props }, ref) {
|
|
14
14
|
return (
|
|
15
15
|
<Base
|
|
16
16
|
as="div"
|
|
17
|
+
ref={ref}
|
|
17
18
|
className={clsx(className, {
|
|
18
19
|
'govgr-summary-list__row': true,
|
|
19
20
|
})}
|
|
20
|
-
ref={ref}
|
|
21
21
|
{...props}
|
|
22
22
|
>
|
|
23
23
|
{children}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface SummaryListItemActionProps extends BaseProps<'dd'> {}
|
|
6
6
|
/**
|
|
@@ -10,14 +10,14 @@ export interface SummaryListItemActionProps extends BaseProps<'dd'> {}
|
|
|
10
10
|
export const SummaryListItemAction = React.forwardRef<
|
|
11
11
|
HTMLElement,
|
|
12
12
|
SummaryListItemActionProps
|
|
13
|
-
>(function SummaryListItemAction({
|
|
13
|
+
>(function SummaryListItemAction({ className, children, ...props }, ref) {
|
|
14
14
|
return (
|
|
15
15
|
<Base
|
|
16
16
|
as="dd"
|
|
17
|
+
ref={ref}
|
|
17
18
|
className={clsx(className, {
|
|
18
19
|
'govgr-summary-list__actions': true,
|
|
19
20
|
})}
|
|
20
|
-
ref={ref}
|
|
21
21
|
{...props}
|
|
22
22
|
>
|
|
23
23
|
{children}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface SummaryListItemKeyProps extends BaseProps<'dt'> {}
|
|
6
6
|
/**
|
|
@@ -10,14 +10,14 @@ export interface SummaryListItemKeyProps extends BaseProps<'dt'> {}
|
|
|
10
10
|
export const SummaryListItemKey = React.forwardRef<
|
|
11
11
|
HTMLElement,
|
|
12
12
|
SummaryListItemKeyProps
|
|
13
|
-
>(function SummaryListItemKey({
|
|
13
|
+
>(function SummaryListItemKey({ className, children, ...props }, ref) {
|
|
14
14
|
return (
|
|
15
15
|
<Base
|
|
16
16
|
as="dt"
|
|
17
|
+
ref={ref}
|
|
17
18
|
className={clsx(className, {
|
|
18
19
|
'govgr-summary-list__key': true,
|
|
19
20
|
})}
|
|
20
|
-
ref={ref}
|
|
21
21
|
{...props}
|
|
22
22
|
>
|
|
23
23
|
{children}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface SummaryListItemValueProps extends BaseProps<'dd'> {}
|
|
6
6
|
/**
|
|
@@ -9,14 +9,14 @@ export interface SummaryListItemValueProps extends BaseProps<'dd'> {}
|
|
|
9
9
|
export const SummaryListItemValue = React.forwardRef<
|
|
10
10
|
HTMLElement,
|
|
11
11
|
SummaryListItemValueProps
|
|
12
|
-
>(function SummaryListItemValue({
|
|
12
|
+
>(function SummaryListItemValue({ className, children, ...props }, ref) {
|
|
13
13
|
return (
|
|
14
14
|
<Base
|
|
15
15
|
as="dd"
|
|
16
|
+
ref={ref}
|
|
16
17
|
className={clsx(className, {
|
|
17
18
|
'govgr-summary-list__value': true,
|
|
18
19
|
})}
|
|
19
|
-
ref={ref}
|
|
20
20
|
{...props}
|
|
21
21
|
>
|
|
22
22
|
{children}
|
|
@@ -45,7 +45,7 @@ it('renders the SvgIcon with prop variant=focus', () => {
|
|
|
45
45
|
it('renders the SvgIcon with prop variant=warning and size=s', () => {
|
|
46
46
|
expect(
|
|
47
47
|
mount(
|
|
48
|
-
<SvgIcon
|
|
48
|
+
<SvgIcon variant="warning" size="s">
|
|
49
49
|
hello
|
|
50
50
|
</SvgIcon>
|
|
51
51
|
)
|
|
@@ -54,7 +54,7 @@ it('renders the SvgIcon with prop variant=warning and size=s', () => {
|
|
|
54
54
|
it('renders the SvgIcon with prop variant=error and size= xl', () => {
|
|
55
55
|
expect(
|
|
56
56
|
mount(
|
|
57
|
-
<SvgIcon
|
|
57
|
+
<SvgIcon variant="warning" size="xl">
|
|
58
58
|
hello
|
|
59
59
|
</SvgIcon>
|
|
60
60
|
)
|
package/src/SvgIcon/index.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface SvgIconProps extends BaseProps<'svg'> {
|
|
6
6
|
/**
|
|
@@ -29,11 +29,11 @@ export interface SvgIconProps extends BaseProps<'svg'> {
|
|
|
29
29
|
* SvgIcon can be used inside other svg components as childern such as CheckIcon, CaretIcon etc.
|
|
30
30
|
*/
|
|
31
31
|
export const SvgIcon = React.forwardRef<SVGSVGElement, SvgIconProps>(
|
|
32
|
-
function SvgIcon({
|
|
32
|
+
function SvgIcon({ size, variant, children, className, ...props }, ref) {
|
|
33
33
|
return (
|
|
34
34
|
<Base
|
|
35
|
-
aria-hidden="true"
|
|
36
35
|
as="svg"
|
|
36
|
+
ref={ref}
|
|
37
37
|
className={clsx(className, {
|
|
38
38
|
'govgr-svg-icon--dark': variant === 'dark',
|
|
39
39
|
'govgr-svg-icon--light': variant === 'light',
|
|
@@ -51,8 +51,8 @@ export const SvgIcon = React.forwardRef<SVGSVGElement, SvgIconProps>(
|
|
|
51
51
|
'govgr-svg-icon': true,
|
|
52
52
|
})}
|
|
53
53
|
focusable="false"
|
|
54
|
-
ref={ref}
|
|
55
54
|
viewBox="0 0 24 24"
|
|
55
|
+
aria-hidden="true"
|
|
56
56
|
{...props}
|
|
57
57
|
>
|
|
58
58
|
{children}
|
package/src/Table/index.tsx
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface TableProps extends BaseProps<'table'> {
|
|
6
|
+
/**
|
|
7
|
+
* variant is optional.
|
|
8
|
+
* The `variant` prop is used to either give blue background color to th tags
|
|
9
|
+
* or a light grey background.
|
|
10
|
+
* Default value is undefined which results to an opaque background color.
|
|
11
|
+
*/
|
|
12
|
+
variant?: 'dark' | 'light';
|
|
6
13
|
/**
|
|
7
14
|
* dense is optional.
|
|
8
15
|
* The dense prop is used to make font size smaller and give
|
|
@@ -10,18 +17,11 @@ export interface TableProps extends BaseProps<'table'> {
|
|
|
10
17
|
*/
|
|
11
18
|
dense?: boolean;
|
|
12
19
|
/**
|
|
13
|
-
*
|
|
14
|
-
* The
|
|
15
|
-
* Default value is
|
|
16
|
-
*/
|
|
17
|
-
stacked?: 'always' | 's' | 'm' | 'never';
|
|
18
|
-
/**
|
|
19
|
-
* variant is optional.
|
|
20
|
-
* The `variant` prop is used to either give blue background color to th tags
|
|
21
|
-
* or a light grey background.
|
|
22
|
-
* Default value is undefined which results to an opaque background color.
|
|
20
|
+
* zebra is optional.
|
|
21
|
+
* The zebra prop is used to make zebra table lines.
|
|
22
|
+
* Default value is false.
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
zebra?: boolean;
|
|
25
25
|
/**
|
|
26
26
|
* verticalBorders is optional.
|
|
27
27
|
* The verticalBorders prop gives extra vertical lines to the table.
|
|
@@ -29,11 +29,11 @@ export interface TableProps extends BaseProps<'table'> {
|
|
|
29
29
|
*/
|
|
30
30
|
verticalBorders?: boolean;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
33
|
-
* The
|
|
34
|
-
* Default value is
|
|
32
|
+
* stacked is optional.
|
|
33
|
+
* The stacked prop gives responsiveness to the table. If used, make sure to add "data-label" to TableDataCell components.
|
|
34
|
+
* Default value is never.
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
stacked?: 'always' | 's' | 'm' | 'never';
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* Table component is used to wrap the sub components of a table
|
|
@@ -41,13 +41,13 @@ export interface TableProps extends BaseProps<'table'> {
|
|
|
41
41
|
export const Table = React.forwardRef<HTMLTableElement, TableProps>(
|
|
42
42
|
function Table(
|
|
43
43
|
{
|
|
44
|
-
children,
|
|
45
|
-
className,
|
|
46
|
-
dense = false,
|
|
47
|
-
stacked= 'never',
|
|
48
44
|
variant,
|
|
49
|
-
verticalBorders = false,
|
|
50
45
|
zebra = false,
|
|
46
|
+
dense = false,
|
|
47
|
+
verticalBorders = false,
|
|
48
|
+
stacked= 'never',
|
|
49
|
+
className,
|
|
50
|
+
children,
|
|
51
51
|
...props
|
|
52
52
|
},
|
|
53
53
|
ref
|
|
@@ -55,6 +55,7 @@ export const Table = React.forwardRef<HTMLTableElement, TableProps>(
|
|
|
55
55
|
return (
|
|
56
56
|
<Base
|
|
57
57
|
as="table"
|
|
58
|
+
ref={ref}
|
|
58
59
|
className={clsx(className, {
|
|
59
60
|
'govgr-table': true,
|
|
60
61
|
'govgr-table--stacked-always': stacked === 'always',
|
|
@@ -67,7 +68,6 @@ export const Table = React.forwardRef<HTMLTableElement, TableProps>(
|
|
|
67
68
|
'govgr-table--with-vertical-header': verticalBorders === true,
|
|
68
69
|
'govgr-table--with-vertical-lines': verticalBorders === true,
|
|
69
70
|
})}
|
|
70
|
-
ref={ref}
|
|
71
71
|
{...props}
|
|
72
72
|
>
|
|
73
73
|
{children}
|
package/src/TableBody/index.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface TableBodyProps extends BaseProps<'tbody'> {
|
|
6
6
|
/**
|
|
@@ -16,18 +16,18 @@ export const TableBody = React.forwardRef<
|
|
|
16
16
|
HTMLTableSectionElement,
|
|
17
17
|
TableBodyProps
|
|
18
18
|
>(function TableBody(
|
|
19
|
-
{
|
|
19
|
+
{ verticalAlign = 'middle', className, children, ...props },
|
|
20
20
|
ref
|
|
21
21
|
) {
|
|
22
22
|
return (
|
|
23
23
|
<Base
|
|
24
24
|
as="tbody"
|
|
25
|
+
ref={ref}
|
|
25
26
|
className={clsx(className, {
|
|
26
27
|
'govgr-table__body': true,
|
|
27
28
|
'govgr-table__body--vertical-top': verticalAlign === 'top',
|
|
28
29
|
'govgr-table__body--vertical-bottom': verticalAlign === 'bottom',
|
|
29
30
|
})}
|
|
30
|
-
ref={ref}
|
|
31
31
|
{...props}
|
|
32
32
|
>
|
|
33
33
|
{children}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface TableCaptionProps extends BaseProps<'caption'> {
|
|
6
6
|
/**
|
|
@@ -14,10 +14,11 @@ export interface TableCaptionProps extends BaseProps<'caption'> {
|
|
|
14
14
|
* Table caption is used inside the Table component to provide a caption at the top of the table.
|
|
15
15
|
*/
|
|
16
16
|
export const TableCaption = React.forwardRef<HTMLElement, TableCaptionProps>(
|
|
17
|
-
function TableCaption({
|
|
17
|
+
function TableCaption({ size = 'm', className, children, ...props }, ref) {
|
|
18
18
|
return (
|
|
19
19
|
<Base
|
|
20
20
|
as="caption"
|
|
21
|
+
ref={ref}
|
|
21
22
|
className={clsx(className, {
|
|
22
23
|
'govgr-table__caption': true,
|
|
23
24
|
'govgr-table__caption--s': size === 's',
|
|
@@ -25,7 +26,6 @@ export const TableCaption = React.forwardRef<HTMLElement, TableCaptionProps>(
|
|
|
25
26
|
'govgr-table__caption--l': size === 'l',
|
|
26
27
|
'govgr-table__caption--xl': size === 'xl',
|
|
27
28
|
})}
|
|
28
|
-
ref={ref}
|
|
29
29
|
{...props}
|
|
30
30
|
>
|
|
31
31
|
{children}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface TableContainerProps extends BaseProps<'div'> {
|
|
6
6
|
/**
|
|
@@ -15,17 +15,17 @@ export const TableContainer = React.forwardRef<
|
|
|
15
15
|
HTMLDivElement,
|
|
16
16
|
TableContainerProps
|
|
17
17
|
>(function TableContainer(
|
|
18
|
-
{ border = false,
|
|
18
|
+
{ border = false, className, children, ...props },
|
|
19
19
|
ref
|
|
20
20
|
) {
|
|
21
21
|
return (
|
|
22
22
|
<Base
|
|
23
23
|
as="div"
|
|
24
|
+
ref={ref}
|
|
24
25
|
className={clsx(className, {
|
|
25
26
|
'govgr-table-container': true,
|
|
26
27
|
'govgr-table-container--border': border,
|
|
27
28
|
})}
|
|
28
|
-
ref={ref}
|
|
29
29
|
{...props}
|
|
30
30
|
>
|
|
31
31
|
{children}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface TableDataCellProps extends BaseProps<'td'> {
|
|
6
6
|
/**
|
|
@@ -17,17 +17,17 @@ export const TableDataCell = React.forwardRef<
|
|
|
17
17
|
HTMLTableCellElement,
|
|
18
18
|
TableDataCellProps
|
|
19
19
|
>(function TableDataCell(
|
|
20
|
-
{
|
|
20
|
+
{ dataType = 'text', className, children, ...props },
|
|
21
21
|
ref
|
|
22
22
|
) {
|
|
23
23
|
return (
|
|
24
24
|
<Base
|
|
25
25
|
as="td"
|
|
26
|
+
ref={ref}
|
|
26
27
|
className={clsx(className, {
|
|
27
28
|
'govgr-table__cell': true,
|
|
28
29
|
'govgr-table__cell--numeric': dataType === 'numeric',
|
|
29
30
|
})}
|
|
30
|
-
ref={ref}
|
|
31
31
|
{...props}
|
|
32
32
|
>
|
|
33
33
|
{children}
|
package/src/TableHead/index.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
|
|
5
5
|
export interface TableHeadProps extends BaseProps<'thead'> {}
|
|
6
6
|
/**
|
|
@@ -9,14 +9,14 @@ export interface TableHeadProps extends BaseProps<'thead'> {}
|
|
|
9
9
|
export const TableHead = React.forwardRef<
|
|
10
10
|
HTMLTableSectionElement,
|
|
11
11
|
TableHeadProps
|
|
12
|
-
>(function TableHead({
|
|
12
|
+
>(function TableHead({ className, children, ...props }, ref) {
|
|
13
13
|
return (
|
|
14
14
|
<Base
|
|
15
15
|
as="thead"
|
|
16
|
+
ref={ref}
|
|
16
17
|
className={clsx(className, {
|
|
17
18
|
'govgr-table__head': true,
|
|
18
19
|
})}
|
|
19
|
-
ref={ref}
|
|
20
20
|
{...props}
|
|
21
21
|
>
|
|
22
22
|
{children}
|
|
@@ -53,8 +53,8 @@ it('renders the TableHeadCell with dataType="numeric" cellWidth=one-quarter', ()
|
|
|
53
53
|
expect(
|
|
54
54
|
mount(
|
|
55
55
|
<TableHeadCell
|
|
56
|
-
cellWidth={'one-quarter'}
|
|
57
56
|
dataType="numeric"
|
|
57
|
+
cellWidth={'one-quarter'}
|
|
58
58
|
></TableHeadCell>
|
|
59
59
|
)
|
|
60
60
|
).toMatchSnapshot();
|
|
@@ -63,7 +63,7 @@ it('renders the TableHeadCell with dataType="numeric" cellWidth=one-quarter', ()
|
|
|
63
63
|
it('renders the TableHeadCell with dataType="numeric" and cellWidth=one-third', () => {
|
|
64
64
|
expect(
|
|
65
65
|
mount(
|
|
66
|
-
<TableHeadCell cellWidth={'one-third'}
|
|
66
|
+
<TableHeadCell dataType="numeric" cellWidth={'one-third'}></TableHeadCell>
|
|
67
67
|
)
|
|
68
68
|
).toMatchSnapshot();
|
|
69
69
|
});
|
|
@@ -71,7 +71,7 @@ it('renders the TableHeadCell with dataType="numeric" and cellWidth=one-third',
|
|
|
71
71
|
it('renders the TableHeadCell with dataType="numeric" and dataType="numeric" and cellWidth=one-half', () => {
|
|
72
72
|
expect(
|
|
73
73
|
mount(
|
|
74
|
-
<TableHeadCell cellWidth={'one-half'}
|
|
74
|
+
<TableHeadCell dataType="numeric" cellWidth={'one-half'}></TableHeadCell>
|
|
75
75
|
)
|
|
76
76
|
).toMatchSnapshot();
|
|
77
77
|
});
|
|
@@ -80,8 +80,8 @@ it('renders the TableHeadCell with dataType="numeric" and cellWidth=two-thirds',
|
|
|
80
80
|
expect(
|
|
81
81
|
mount(
|
|
82
82
|
<TableHeadCell
|
|
83
|
-
cellWidth={'two-thirds'}
|
|
84
83
|
dataType="numeric"
|
|
84
|
+
cellWidth={'two-thirds'}
|
|
85
85
|
></TableHeadCell>
|
|
86
86
|
)
|
|
87
87
|
).toMatchSnapshot();
|
|
@@ -91,8 +91,8 @@ it('renders the TableHeadCell with dataType="numeric" and cellWidth=three-quarte
|
|
|
91
91
|
expect(
|
|
92
92
|
mount(
|
|
93
93
|
<TableHeadCell
|
|
94
|
-
cellWidth={'three-quarters'}
|
|
95
94
|
dataType="numeric"
|
|
95
|
+
cellWidth={'three-quarters'}
|
|
96
96
|
></TableHeadCell>
|
|
97
97
|
)
|
|
98
98
|
).toMatchSnapshot();
|
|
@@ -100,6 +100,6 @@ it('renders the TableHeadCell with dataType="numeric" and cellWidth=three-quarte
|
|
|
100
100
|
|
|
101
101
|
it('renders the TableHeadCell dataType="numeric" and with cellWidth=full', () => {
|
|
102
102
|
expect(
|
|
103
|
-
mount(<TableHeadCell cellWidth={'full'}
|
|
103
|
+
mount(<TableHeadCell dataType="numeric" cellWidth={'full'}></TableHeadCell>)
|
|
104
104
|
).toMatchSnapshot();
|
|
105
105
|
});
|