@digigov/react-core 2.0.0-af1b5f33 → 2.0.0-f2d82d25
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/Accordion/index.d.ts +1 -1
- package/AccordionControls/index.d.ts +1 -1
- package/AccordionSection/index.d.ts +1 -1
- package/AccordionSectionContent/index.d.ts +1 -1
- package/AccordionSectionSummary/index.d.ts +1 -1
- package/AccordionSectionSummaryHeading/index.d.ts +1 -1
- package/AdminAside/index.d.ts +1 -1
- package/AdminContainer/index.d.ts +1 -1
- package/AdminHeader/index.d.ts +1 -1
- package/AdminHeaderContent/index.d.ts +1 -1
- package/AdminLayout/index.d.ts +1 -1
- package/AdminMain/index.d.ts +1 -1
- package/AdminTopSection/index.d.ts +1 -1
- package/Aside/__snapshots__/index.test.tsx.snap +3 -3
- package/Aside/index.d.ts +1 -1
- package/AutoCompleteAssistiveHint/index.d.ts +1 -1
- package/AutoCompleteInput/index.d.ts +1 -1
- package/AutoCompleteInputTypeahead/index.d.ts +1 -1
- package/AutoCompleteResultList/index.d.ts +1 -1
- package/AutoCompleteResultListItem/index.d.ts +1 -1
- package/AutoCompleteStatus/index.d.ts +1 -1
- package/AutoCompleteStatusWrapper/index.d.ts +1 -1
- package/AutoCompleteWrapper/index.d.ts +1 -1
- package/BackLink/index.d.ts +1 -1
- package/BackToTopContainer/index.d.ts +1 -1
- package/BackToTopLimit/index.d.ts +1 -1
- package/BackToTopLink/index.d.ts +1 -1
- package/BannerContainer/index.d.ts +1 -1
- package/Base/index.d.ts +39 -10
- package/Base/index.js +16 -2
- package/Blockquote/index.d.ts +1 -1
- package/Bottom/index.d.ts +1 -1
- package/BottomInfo/index.d.ts +1 -1
- package/BottomInfoContainer/index.d.ts +1 -1
- package/BottomInfoContent/index.d.ts +1 -1
- package/Breadcrumbs/index.d.ts +1 -1
- package/BreadcrumbsList/index.d.ts +1 -1
- package/BreadcrumbsListItem/index.d.ts +1 -1
- package/Button/index.d.ts +1 -1
- package/ButtonGroup/index.d.ts +1 -1
- package/ButtonLink/index.d.ts +1 -1
- package/CallToAction/__snapshots__/index.test.tsx.snap +6 -6
- package/CallToAction/index.d.ts +1 -1
- package/Card/index.d.ts +1 -1
- package/CardAction/index.d.ts +1 -1
- package/CardContent/index.d.ts +1 -1
- package/CardHeading/index.d.ts +1 -1
- package/Checkbox/index.d.ts +1 -1
- package/CheckboxConditional/index.d.ts +1 -1
- package/CheckboxItem/index.d.ts +1 -1
- package/Chip/index.d.ts +1 -1
- package/ChipContainer/index.d.ts +1 -1
- package/ChipHeading/index.d.ts +1 -1
- package/ChipKeyValue/index.d.ts +1 -1
- package/ChoiceDividerText/index.d.ts +1 -1
- package/CircularProgress/index.d.ts +1 -1
- package/CloseButton/index.d.ts +1 -1
- package/Code/index.d.ts +1 -1
- package/CodeBlock/index.d.ts +1 -1
- package/Container/index.d.ts +1 -1
- package/CopyToClipboardContainer/index.d.ts +1 -1
- package/CopyToClipboardMessage/index.d.ts +1 -1
- package/CopyrightContainer/index.d.ts +1 -1
- package/DateInputContainer/index.d.ts +1 -1
- package/DateInputItem/index.d.ts +1 -1
- package/Details/index.d.ts +1 -1
- package/DetailsContent/index.d.ts +1 -1
- package/DetailsSummary/index.d.ts +1 -1
- package/Drawer/index.d.ts +1 -1
- package/DrawerHeading/index.d.ts +1 -1
- package/DropdownBase/index.d.ts +1 -1
- package/DropdownButton/__snapshots__/index.test.tsx.snap +36 -36
- package/DropdownButton/index.d.ts +1 -1
- package/DropdownContent/index.d.ts +1 -1
- package/ErrorMessage/index.d.ts +1 -1
- package/ErrorSummary/index.d.ts +1 -1
- package/FieldContainer/index.d.ts +1 -1
- package/Fieldset/index.d.ts +1 -1
- package/FieldsetLegend/index.d.ts +1 -1
- package/FileUpload/index.d.ts +1 -1
- package/FileUploadContainer/index.d.ts +1 -1
- package/FillableText/index.d.ts +1 -1
- package/FilterContainer/index.d.ts +1 -1
- package/FilterContent/index.d.ts +1 -1
- package/FilterHeadingContainer/index.d.ts +1 -1
- package/FilterOptionsSection/index.d.ts +1 -1
- package/FilterSelectedHeading/index.d.ts +1 -1
- package/FilterSelectedSection/index.d.ts +1 -1
- package/Footer/index.d.ts +1 -1
- package/FooterContainer/index.d.ts +1 -1
- package/FooterContent/index.d.ts +1 -1
- package/FooterContentLogos/index.d.ts +1 -1
- package/FooterHeading/index.d.ts +1 -1
- package/FooterImage/index.d.ts +1 -1
- package/FooterInfo/index.d.ts +1 -1
- package/FooterInfoSection/index.d.ts +1 -1
- package/FooterLink/index.d.ts +1 -1
- package/FooterList/index.d.ts +1 -1
- package/FooterListItem/index.d.ts +1 -1
- package/FooterNavigation/index.d.ts +1 -1
- package/FooterNavigationSection/index.d.ts +1 -1
- package/Form/index.d.ts +1 -1
- package/FullPageBackground/index.d.ts +1 -1
- package/GovGRLogo/index.d.ts +1 -1
- package/Grid/index.d.ts +1 -1
- package/Header/index.d.ts +1 -1
- package/HeaderContent/index.d.ts +1 -1
- package/HeaderLogo/index.d.ts +1 -1
- package/HeaderNavMenuContent/index.d.ts +1 -1
- package/HeaderSecondaryLogo/index.d.ts +1 -1
- package/HeaderSection/index.d.ts +1 -1
- package/HeaderTitle/index.d.ts +1 -1
- package/Heading/index.d.ts +1 -1
- package/HeadingCaption/index.d.ts +1 -1
- package/HellenicRepublicLogo/index.d.ts +1 -1
- package/Hidden/__snapshots__/index.test.tsx.snap +9 -5
- package/Hidden/index.d.ts +1 -1
- package/Hint/index.d.ts +1 -1
- package/ImageLogo/index.d.ts +1 -1
- package/ImageLogoSet/index.d.ts +1 -1
- package/KitchenSinkAllComponents/index.d.ts +1 -1
- package/KitchenSinkCard/index.d.ts +1 -1
- package/KitchenSinkCategory/index.d.ts +1 -1
- package/KitchenSinkContent/index.d.ts +1 -1
- package/KitchenSinkContentInfo/index.d.ts +1 -1
- package/KitchenSinkContentTags/index.d.ts +1 -1
- package/KitchenSinkHeading/index.d.ts +1 -1
- package/KitchenSinkLetterContent/index.d.ts +1 -1
- package/LabelContainer/index.d.ts +1 -1
- package/LabelTitle/index.d.ts +1 -1
- package/LabeledText/index.d.ts +1 -1
- package/Layout/index.d.ts +1 -1
- package/LinkBase/index.d.ts +1 -1
- package/List/index.d.ts +1 -1
- package/ListItem/index.d.ts +1 -1
- package/LoaderContainer/index.d.ts +1 -1
- package/Main/index.d.ts +1 -1
- package/Masthead/index.d.ts +1 -1
- package/MastheadBody/index.d.ts +1 -1
- package/MastheadLogo/index.d.ts +1 -1
- package/ModalAction/index.d.ts +1 -1
- package/ModalContainer/index.d.ts +1 -1
- package/ModalContent/index.d.ts +1 -1
- package/ModalHeading/index.d.ts +1 -1
- package/Nav/index.d.ts +1 -1
- package/NavList/index.d.ts +1 -1
- package/NavListItemAction/index.d.ts +1 -1
- package/NavListItemActionContainer/index.d.ts +1 -1
- package/NavListItemButton/__snapshots__/index.test.tsx.snap +18 -18
- package/NavListItemButton/index.d.ts +1 -1
- package/NavListItemLink/index.d.ts +1 -1
- package/NavMenuContainer/index.d.ts +1 -1
- package/NavMenuContent/index.d.ts +1 -1
- package/NavMenuContentListBase/index.d.ts +1 -1
- package/NavMenuContentListItem/index.d.ts +1 -1
- package/NavMenuTitle/index.d.ts +1 -1
- package/NormalText/index.d.ts +1 -1
- package/NotificationBannerContainer/index.d.ts +1 -1
- package/NotificationBannerContent/index.d.ts +1 -1
- package/NotificationBannerHeader/index.d.ts +1 -1
- package/NotificationBannerHeading/index.d.ts +1 -1
- package/NotificationBannerLink/index.d.ts +1 -1
- package/PageTitleCaption/index.d.ts +1 -1
- package/PageTitleContainer/index.d.ts +1 -1
- package/PageTitleHeading/index.d.ts +1 -1
- package/Pagination/index.d.ts +1 -1
- package/PaginationLabelContainer/index.d.ts +1 -1
- package/PaginationList/index.d.ts +1 -1
- package/PaginationListItem/index.d.ts +1 -1
- package/Panel/index.d.ts +1 -1
- package/PanelBody/index.d.ts +1 -1
- package/PanelTitle/index.d.ts +1 -1
- package/Paragraph/index.d.ts +1 -1
- package/PhaseBanner/index.d.ts +1 -1
- package/PhaseBannerHeaderContainer/index.d.ts +1 -1
- package/PhaseBannerTag/index.d.ts +1 -1
- package/PhaseBannerText/index.d.ts +1 -1
- package/RadioConditional/index.d.ts +1 -1
- package/RadioContainer/index.d.ts +1 -1
- package/RadioItem/index.d.ts +1 -1
- package/ResultsActionBar/index.d.ts +1 -1
- package/ResultsHeading/index.d.ts +1 -1
- package/ResultsHeadingActions/index.d.ts +1 -1
- package/SearchButton/index.d.ts +1 -1
- package/SearchContainer/index.d.ts +1 -1
- package/Section/index.d.ts +1 -1
- package/SectionBreak/index.d.ts +1 -1
- package/SelectContainer/index.d.ts +1 -1
- package/SelectOption/index.d.ts +1 -1
- package/SingleCharacterInput/index.d.ts +1 -1
- package/SingleCharacterInputs/index.d.ts +1 -1
- package/SkipLink/index.d.ts +1 -1
- package/Stack/index.d.ts +1 -1
- package/StepNav/index.d.ts +1 -1
- package/StepNavAccordion/index.d.ts +1 -1
- package/StepNavAccordionContent/index.d.ts +1 -1
- package/StepNavAccordionHeadingText/index.d.ts +1 -1
- package/StepNavAccordionHeadingTitle/index.d.ts +1 -1
- package/StepNavAccordionSummary/index.d.ts +1 -1
- package/StepNavAccordionSummaryHeading/index.d.ts +1 -1
- package/StepNavCircleNumber/index.d.ts +1 -1
- package/StepNavControls/index.d.ts +1 -1
- package/StepNavList/index.d.ts +1 -1
- package/StepNavListItem/index.d.ts +1 -1
- package/SummaryList/index.d.ts +1 -1
- package/SummaryListItem/index.d.ts +1 -1
- package/SummaryListItemAction/index.d.ts +1 -1
- package/SummaryListItemKey/index.d.ts +1 -1
- package/SummaryListItemValue/index.d.ts +1 -1
- package/SvgIcon/__snapshots__/index.test.tsx.snap +62 -62
- package/SvgIcon/index.d.ts +5 -4
- package/SvgIcon/index.js +3 -3
- package/SvgIcon/index.test/index.js +20 -20
- package/Table/index.d.ts +1 -1
- package/TableBody/index.d.ts +1 -1
- package/TableCaption/index.d.ts +1 -1
- package/TableContainer/index.d.ts +1 -1
- package/TableDataCell/index.d.ts +1 -1
- package/TableHead/index.d.ts +1 -1
- package/TableHeadCell/index.d.ts +1 -1
- package/TableLoaderBackground/index.d.ts +1 -1
- package/TableNoDataRow/index.d.ts +1 -1
- package/TableRow/index.d.ts +1 -1
- package/TableSortIconContainer/index.d.ts +1 -1
- package/Tabs/index.d.ts +1 -1
- package/TabsHeading/__snapshots__/index.test.tsx.snap +6 -3
- package/TabsHeading/index.d.ts +1 -1
- package/TabsList/index.d.ts +1 -1
- package/TabsListItemBase/index.d.ts +1 -1
- package/TabsPanelBase/index.d.ts +1 -1
- package/TaskList/index.d.ts +1 -1
- package/TaskListItem/index.d.ts +1 -1
- package/TaskListItemContent/index.d.ts +1 -1
- package/TaskListItemHeading/index.d.ts +1 -1
- package/TaskListItemTag/index.d.ts +1 -1
- package/TextArea/index.d.ts +1 -1
- package/TextInput/index.d.ts +1 -1
- package/Timeline/index.d.ts +1 -1
- package/TimelineActions/index.d.ts +1 -1
- package/TimelineContent/index.d.ts +1 -1
- package/TimelineHeading/index.d.ts +1 -1
- package/TimelineItem/index.d.ts +1 -1
- package/Top/index.d.ts +1 -1
- package/Typography/index.d.ts +1 -1
- package/Unpurge/index.js +1 -1
- package/VisuallyHidden/index.d.ts +1 -1
- package/WarningText/index.d.ts +1 -1
- package/cjs/Aside/__snapshots__/index.test.tsx.snap +3 -3
- package/cjs/Base/index.js +16 -2
- package/cjs/CallToAction/__snapshots__/index.test.tsx.snap +6 -6
- package/cjs/DropdownButton/__snapshots__/index.test.tsx.snap +36 -36
- package/cjs/Hidden/__snapshots__/index.test.tsx.snap +9 -5
- package/cjs/NavListItemButton/__snapshots__/index.test.tsx.snap +18 -18
- package/cjs/SvgIcon/__snapshots__/index.test.tsx.snap +62 -62
- package/cjs/SvgIcon/index.js +3 -3
- package/cjs/SvgIcon/index.test/index.js +20 -20
- package/cjs/TabsHeading/__snapshots__/index.test.tsx.snap +6 -3
- package/cjs/Unpurge/index.js +1 -1
- package/index.js +1 -1
- package/package.json +3 -3
- package/src/Aside/__snapshots__/index.test.tsx.snap +3 -3
- package/src/Base/index.tsx +149 -59
- package/src/CallToAction/__snapshots__/index.test.tsx.snap +6 -6
- package/src/DropdownButton/__snapshots__/index.test.tsx.snap +36 -36
- package/src/Hidden/__snapshots__/index.test.tsx.snap +9 -5
- package/src/NavListItemButton/__snapshots__/index.test.tsx.snap +18 -18
- package/src/SvgIcon/__snapshots__/index.test.tsx.snap +62 -62
- package/src/SvgIcon/index.test.tsx +20 -20
- package/src/SvgIcon/index.tsx +6 -5
- package/src/TabsHeading/__snapshots__/index.test.tsx.snap +6 -3
- package/src/Unpurge/index.tsx +136 -0
package/src/Base/index.tsx
CHANGED
|
@@ -10,77 +10,139 @@ type PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);
|
|
|
10
10
|
// This is the first reusable type utility we built
|
|
11
11
|
type PolymorphicComponentProp<
|
|
12
12
|
C extends React.ElementType,
|
|
13
|
-
Props = Record<string, unknown
|
|
13
|
+
Props = Record<string, unknown>,
|
|
14
14
|
> = React.PropsWithChildren<Props & AsProp<C>> &
|
|
15
15
|
Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
|
|
16
16
|
|
|
17
17
|
// This is a new type utitlity with ref!
|
|
18
18
|
type PolymorphicComponentPropWithRef<
|
|
19
19
|
C extends React.ElementType,
|
|
20
|
-
Props = Record<string, unknown
|
|
20
|
+
Props = Record<string, unknown>,
|
|
21
21
|
> = PolymorphicComponentProp<C, Props> & { ref?: any };
|
|
22
22
|
|
|
23
23
|
// This is the type for the "ref" only
|
|
24
|
-
type PolymorphicRef<C extends React.ElementType> =
|
|
25
|
-
C
|
|
26
|
-
>['ref'];
|
|
24
|
+
type PolymorphicRef<C extends React.ElementType> =
|
|
25
|
+
React.ComponentPropsWithRef<C>['ref'];
|
|
27
26
|
|
|
28
27
|
/**
|
|
29
28
|
* This is the updated component props using PolymorphicComponentPropWithRef
|
|
30
29
|
*/
|
|
31
|
-
export type BaseProps<
|
|
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
|
-
|
|
30
|
+
export type BaseProps<C extends React.ElementType> =
|
|
31
|
+
PolymorphicComponentPropWithRef<
|
|
32
|
+
C,
|
|
33
|
+
{
|
|
34
|
+
/** margin is optional. It has not a default value. */
|
|
35
|
+
margin?: spacingValues;
|
|
36
|
+
/** marginTop is optional. It has not a default value. */
|
|
37
|
+
marginTop?: spacingValues;
|
|
38
|
+
/** marginBottom is optional. It has not a default value. */
|
|
39
|
+
marginBottom?: spacingValues;
|
|
40
|
+
/** marginLeft is optional. It has not a default value. */
|
|
41
|
+
marginLeft?: spacingValues;
|
|
42
|
+
/** marginRight is optional. It has not a default value. */
|
|
43
|
+
marginRight?: spacingValues;
|
|
44
|
+
/** Alternative for margin. Margin is optional. It has not a default value. */
|
|
45
|
+
m?: spacingValues;
|
|
46
|
+
/** Alternative for marginTop. MarginTop is optional. It has not a default value. */
|
|
47
|
+
mt?: spacingValues;
|
|
48
|
+
/** Alternative for marginBottom. MarginBottom is optional. It has not a default value. */
|
|
49
|
+
mb?: spacingValues;
|
|
50
|
+
/** Alternative for marginLeft. MarginLeft is optional. It has not a default value. */
|
|
51
|
+
ml?: spacingValues;
|
|
52
|
+
/** Alternative for marginRight. MarginRight is optional. It has not a default value. */
|
|
53
|
+
mr?: spacingValues;
|
|
54
|
+
/** Alternative for marginX. MarginX is optional. It has not a default value. */
|
|
55
|
+
mx?: spacingValues;
|
|
56
|
+
/** Alternative for marginY. MarginY is optional. It has not a default value. */
|
|
57
|
+
my?: spacingValues;
|
|
58
|
+
/** padding is optional. It has not a default value. */
|
|
59
|
+
padding?: spacingValues;
|
|
60
|
+
/** paddingTop is optional. It has not a default value. */
|
|
61
|
+
paddingTop?: spacingValues;
|
|
62
|
+
/** paddingBottom is optional. It has not a default value. */
|
|
63
|
+
paddingBottom?: spacingValues;
|
|
64
|
+
/** paddingLeft is optional. It has not a default value. */
|
|
65
|
+
paddingLeft?: spacingValues;
|
|
66
|
+
/** paddingRight is optional. It has not a default value. */
|
|
67
|
+
paddingRight?: spacingValues;
|
|
68
|
+
/** Alternative for padding. Padding is optional. It has not a default value. */
|
|
69
|
+
p?: spacingValues;
|
|
70
|
+
/** Alternative for paddingTop. PaddingTop is optional. It has not a default value. */
|
|
71
|
+
pt?: spacingValues;
|
|
72
|
+
/** Alternative for paddingBottom. PaddingBottom is optional. It has not a default value. */
|
|
73
|
+
pb?: spacingValues;
|
|
74
|
+
/** Alternative for paddingLeft. PaddingLeft is optional. It has not a default value. */
|
|
75
|
+
pl?: spacingValues;
|
|
76
|
+
/** Alternative for paddingRight. PaddingRight is optional. It has not a default value. */
|
|
77
|
+
pr?: spacingValues;
|
|
78
|
+
/** Alternative for paddingX. PaddingX is optional. It has not a default value. */
|
|
79
|
+
px?: spacingValues;
|
|
80
|
+
/** Alternative for paddingY. PaddingY is optional. It has not a default value. */
|
|
81
|
+
py?: spacingValues;
|
|
82
|
+
/** printHidden is optional. Default value is false. When true, the component is hidden at print. */
|
|
83
|
+
printHidden?: boolean;
|
|
84
|
+
/** printVisible is optional. When block, the component is displayed as block. When inline, the component is displayed as inline.*/
|
|
85
|
+
printVisible?: 'block' | 'inline';
|
|
86
|
+
/** Components will be hidden at all screen sizes. */
|
|
87
|
+
hidden?: boolean;
|
|
88
|
+
/** Components will be hidden from 'xs' screen size and up. */
|
|
89
|
+
xsUpHidden?: boolean;
|
|
90
|
+
/** Components will be hidden from 'sm' screen size and up. */
|
|
91
|
+
smUpHidden?: boolean;
|
|
92
|
+
/** Components will be hidden from 'md' screen size and up. */
|
|
93
|
+
mdUpHidden?: boolean;
|
|
94
|
+
/** Components will be hidden from 'lg' screen size and up. */
|
|
95
|
+
lgUpHidden?: boolean;
|
|
96
|
+
/** Components will be hidden from 'xl' screen size and up. */
|
|
97
|
+
xlUpHidden?: boolean;
|
|
98
|
+
/** Components will be hidden between xs and sm screen size. */
|
|
99
|
+
xsHidden?: boolean;
|
|
100
|
+
/** Components will be hidden between sm and md screen size. */
|
|
101
|
+
smHidden?: boolean;
|
|
102
|
+
/** Components will be hidden between md and lg screen size. */
|
|
103
|
+
mdHidden?: boolean;
|
|
104
|
+
/** Components will be hidden between lg and xl screen size. */
|
|
105
|
+
lgHidden?: boolean;
|
|
106
|
+
/** Components will be hidden between xl and 2xl screen size. */
|
|
107
|
+
xlHidden?: boolean;
|
|
108
|
+
}
|
|
109
|
+
>;
|
|
110
|
+
|
|
111
|
+
type spacingValues =
|
|
112
|
+
| 0
|
|
113
|
+
| 0.5
|
|
114
|
+
| 1
|
|
115
|
+
| 1.5
|
|
116
|
+
| 2
|
|
117
|
+
| 2.5
|
|
118
|
+
| 3
|
|
119
|
+
| 3.5
|
|
120
|
+
| 4
|
|
121
|
+
| 5
|
|
122
|
+
| 6
|
|
123
|
+
| 7
|
|
124
|
+
| 8
|
|
125
|
+
| 9
|
|
126
|
+
| 10
|
|
127
|
+
| 11
|
|
128
|
+
| 12
|
|
129
|
+
| 14
|
|
130
|
+
| 16
|
|
131
|
+
| 20
|
|
132
|
+
| 24
|
|
133
|
+
| 28
|
|
134
|
+
| 32
|
|
135
|
+
| 36
|
|
136
|
+
| 40
|
|
137
|
+
| 44
|
|
138
|
+
| 48
|
|
139
|
+
| 52
|
|
140
|
+
| 56
|
|
141
|
+
| 60
|
|
142
|
+
| 64
|
|
143
|
+
| 72
|
|
144
|
+
| 80
|
|
145
|
+
| 96;
|
|
84
146
|
|
|
85
147
|
/**
|
|
86
148
|
* This is the type used in the type annotation for the component
|
|
@@ -90,7 +152,7 @@ type BaseComponent = <C extends React.ElementType = 'span'>(
|
|
|
90
152
|
) => React.ReactElement | null;
|
|
91
153
|
|
|
92
154
|
export const Base: BaseComponent = React.forwardRef(function Base<
|
|
93
|
-
C extends React.ElementType = 'span'
|
|
155
|
+
C extends React.ElementType = 'span',
|
|
94
156
|
>(
|
|
95
157
|
{
|
|
96
158
|
as,
|
|
@@ -99,11 +161,25 @@ export const Base: BaseComponent = React.forwardRef(function Base<
|
|
|
99
161
|
marginBottom,
|
|
100
162
|
marginLeft,
|
|
101
163
|
marginRight,
|
|
164
|
+
m,
|
|
165
|
+
mt,
|
|
166
|
+
mb,
|
|
167
|
+
ml,
|
|
168
|
+
mr,
|
|
169
|
+
mx,
|
|
170
|
+
my,
|
|
102
171
|
padding,
|
|
103
172
|
paddingTop,
|
|
104
173
|
paddingBottom,
|
|
105
174
|
paddingLeft,
|
|
106
175
|
paddingRight,
|
|
176
|
+
p,
|
|
177
|
+
pt,
|
|
178
|
+
pb,
|
|
179
|
+
pr,
|
|
180
|
+
pl,
|
|
181
|
+
px,
|
|
182
|
+
py,
|
|
107
183
|
printHidden,
|
|
108
184
|
printVisible,
|
|
109
185
|
hidden,
|
|
@@ -134,6 +210,13 @@ export const Base: BaseComponent = React.forwardRef(function Base<
|
|
|
134
210
|
marginBottom !== undefined ? true : undefined,
|
|
135
211
|
[`ds-mr-${marginRight}`]: marginRight !== undefined ? true : undefined,
|
|
136
212
|
[`ds-ml-${marginLeft}`]: marginLeft !== undefined ? true : undefined,
|
|
213
|
+
[`ds-m-${m}`]: m !== undefined ? true : undefined,
|
|
214
|
+
[`ds-mt-${mt}`]: mt !== undefined ? true : undefined,
|
|
215
|
+
[`ds-mb-${mb}`]: mb !== undefined ? true : undefined,
|
|
216
|
+
[`ds-mr-${mr}`]: mr !== undefined ? true : undefined,
|
|
217
|
+
[`ds-ml-${ml}`]: ml !== undefined ? true : undefined,
|
|
218
|
+
[`ds-mx-${mx}`]: mx !== undefined ? true : undefined,
|
|
219
|
+
[`ds-my-${my}`]: my !== undefined ? true : undefined,
|
|
137
220
|
[`ds-p-${padding}`]: padding !== undefined ? true : undefined,
|
|
138
221
|
[`ds-pt-${paddingTop}`]: paddingTop !== undefined ? true : undefined,
|
|
139
222
|
[`ds-pb-${paddingBottom}`]:
|
|
@@ -141,6 +224,13 @@ export const Base: BaseComponent = React.forwardRef(function Base<
|
|
|
141
224
|
[`ds-pr-${paddingRight}`]:
|
|
142
225
|
paddingRight !== undefined ? true : undefined,
|
|
143
226
|
[`ds-pl-${paddingLeft}`]: paddingLeft !== undefined ? true : undefined,
|
|
227
|
+
[`ds-p-${p}`]: p !== undefined ? true : undefined,
|
|
228
|
+
[`ds-pt-${pt}`]: pt !== undefined ? true : undefined,
|
|
229
|
+
[`ds-pb-${pb}`]: pb !== undefined ? true : undefined,
|
|
230
|
+
[`ds-pr-${pr}`]: pr !== undefined ? true : undefined,
|
|
231
|
+
[`ds-pl-${pl}`]: pl !== undefined ? true : undefined,
|
|
232
|
+
[`ds-px-${px}`]: px !== undefined ? true : undefined,
|
|
233
|
+
[`ds-py-${py}`]: py !== undefined ? true : undefined,
|
|
144
234
|
'ds-print-hidden': !!printHidden,
|
|
145
235
|
'ds-print-visible-block': printVisible === 'block',
|
|
146
236
|
'ds-print-visible-inline': printVisible === 'inline',
|
|
@@ -17,29 +17,29 @@ exports[`renders the CallToAction with no props 1`] = `
|
|
|
17
17
|
hello
|
|
18
18
|
<ChevronIcon>
|
|
19
19
|
<ForwardRef(Icon)
|
|
20
|
-
icon="
|
|
20
|
+
icon="chevron"
|
|
21
21
|
>
|
|
22
22
|
<ForwardRef(SvgIcon)
|
|
23
|
-
className="ds-svg-icon--
|
|
23
|
+
className="ds-svg-icon--chevron"
|
|
24
24
|
>
|
|
25
25
|
<ForwardRef(Base)
|
|
26
26
|
aria-hidden="true"
|
|
27
27
|
as="svg"
|
|
28
|
-
className="ds-svg-icon--
|
|
28
|
+
className="ds-svg-icon--chevron ds-svg-icon"
|
|
29
29
|
focusable="false"
|
|
30
30
|
viewBox="0 0 24 24"
|
|
31
31
|
>
|
|
32
32
|
<svg
|
|
33
33
|
aria-hidden="true"
|
|
34
|
-
className="ds-svg-icon--
|
|
34
|
+
className="ds-svg-icon--chevron ds-svg-icon"
|
|
35
35
|
focusable="false"
|
|
36
36
|
viewBox="0 0 24 24"
|
|
37
37
|
>
|
|
38
|
-
<
|
|
38
|
+
<chevron>
|
|
39
39
|
<path
|
|
40
40
|
d="M8.5,2L6.1,4.3l7.6,7.7l-7.6,7.6L8.5,22l10-10L8.5,2z"
|
|
41
41
|
/>
|
|
42
|
-
</
|
|
42
|
+
</chevron>
|
|
43
43
|
</svg>
|
|
44
44
|
</ForwardRef(Base)>
|
|
45
45
|
</ForwardRef(SvgIcon)>
|
|
@@ -57,31 +57,31 @@ exports[`renders the DropdownButton with arrow=true 1`] = `
|
|
|
57
57
|
>
|
|
58
58
|
<ForwardRef(Icon)
|
|
59
59
|
direction="down"
|
|
60
|
-
icon="
|
|
60
|
+
icon="chevron"
|
|
61
61
|
>
|
|
62
62
|
<ForwardRef(SvgIcon)
|
|
63
|
-
className="ds-svg-icon--
|
|
63
|
+
className="ds-svg-icon--chevron"
|
|
64
64
|
>
|
|
65
65
|
<ForwardRef(Base)
|
|
66
66
|
aria-hidden="true"
|
|
67
67
|
as="svg"
|
|
68
|
-
className="ds-svg-icon--
|
|
68
|
+
className="ds-svg-icon--chevron ds-svg-icon"
|
|
69
69
|
focusable="false"
|
|
70
70
|
viewBox="0 0 24 24"
|
|
71
71
|
>
|
|
72
72
|
<svg
|
|
73
73
|
aria-hidden="true"
|
|
74
|
-
className="ds-svg-icon--
|
|
74
|
+
className="ds-svg-icon--chevron ds-svg-icon"
|
|
75
75
|
focusable="false"
|
|
76
76
|
viewBox="0 0 24 24"
|
|
77
77
|
>
|
|
78
|
-
<
|
|
78
|
+
<chevron
|
|
79
79
|
direction="down"
|
|
80
80
|
>
|
|
81
81
|
<path
|
|
82
82
|
d="M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z"
|
|
83
83
|
/>
|
|
84
|
-
</
|
|
84
|
+
</chevron>
|
|
85
85
|
</svg>
|
|
86
86
|
</ForwardRef(Base)>
|
|
87
87
|
</ForwardRef(SvgIcon)>
|
|
@@ -150,31 +150,31 @@ exports[`renders the DropdownButton with color=primary and arrow={true} 1`] = `
|
|
|
150
150
|
>
|
|
151
151
|
<ForwardRef(Icon)
|
|
152
152
|
direction="down"
|
|
153
|
-
icon="
|
|
153
|
+
icon="chevron"
|
|
154
154
|
>
|
|
155
155
|
<ForwardRef(SvgIcon)
|
|
156
|
-
className="ds-svg-icon--
|
|
156
|
+
className="ds-svg-icon--chevron"
|
|
157
157
|
>
|
|
158
158
|
<ForwardRef(Base)
|
|
159
159
|
aria-hidden="true"
|
|
160
160
|
as="svg"
|
|
161
|
-
className="ds-svg-icon--
|
|
161
|
+
className="ds-svg-icon--chevron ds-svg-icon"
|
|
162
162
|
focusable="false"
|
|
163
163
|
viewBox="0 0 24 24"
|
|
164
164
|
>
|
|
165
165
|
<svg
|
|
166
166
|
aria-hidden="true"
|
|
167
|
-
className="ds-svg-icon--
|
|
167
|
+
className="ds-svg-icon--chevron ds-svg-icon"
|
|
168
168
|
focusable="false"
|
|
169
169
|
viewBox="0 0 24 24"
|
|
170
170
|
>
|
|
171
|
-
<
|
|
171
|
+
<chevron
|
|
172
172
|
direction="down"
|
|
173
173
|
>
|
|
174
174
|
<path
|
|
175
175
|
d="M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z"
|
|
176
176
|
/>
|
|
177
|
-
</
|
|
177
|
+
</chevron>
|
|
178
178
|
</svg>
|
|
179
179
|
</ForwardRef(Base)>
|
|
180
180
|
</ForwardRef(SvgIcon)>
|
|
@@ -286,31 +286,31 @@ exports[`renders the DropdownButton with color=primary variant="button" arrow={t
|
|
|
286
286
|
>
|
|
287
287
|
<ForwardRef(Icon)
|
|
288
288
|
direction="down"
|
|
289
|
-
icon="
|
|
289
|
+
icon="chevron"
|
|
290
290
|
>
|
|
291
291
|
<ForwardRef(SvgIcon)
|
|
292
|
-
className="ds-svg-icon--
|
|
292
|
+
className="ds-svg-icon--chevron"
|
|
293
293
|
>
|
|
294
294
|
<ForwardRef(Base)
|
|
295
295
|
aria-hidden="true"
|
|
296
296
|
as="svg"
|
|
297
|
-
className="ds-svg-icon--
|
|
297
|
+
className="ds-svg-icon--chevron ds-svg-icon"
|
|
298
298
|
focusable="false"
|
|
299
299
|
viewBox="0 0 24 24"
|
|
300
300
|
>
|
|
301
301
|
<svg
|
|
302
302
|
aria-hidden="true"
|
|
303
|
-
className="ds-svg-icon--
|
|
303
|
+
className="ds-svg-icon--chevron ds-svg-icon"
|
|
304
304
|
focusable="false"
|
|
305
305
|
viewBox="0 0 24 24"
|
|
306
306
|
>
|
|
307
|
-
<
|
|
307
|
+
<chevron
|
|
308
308
|
direction="down"
|
|
309
309
|
>
|
|
310
310
|
<path
|
|
311
311
|
d="M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z"
|
|
312
312
|
/>
|
|
313
|
-
</
|
|
313
|
+
</chevron>
|
|
314
314
|
</svg>
|
|
315
315
|
</ForwardRef(Base)>
|
|
316
316
|
</ForwardRef(SvgIcon)>
|
|
@@ -362,31 +362,31 @@ exports[`renders the DropdownButton with color=primary variant="link" arrow={tru
|
|
|
362
362
|
>
|
|
363
363
|
<ForwardRef(Icon)
|
|
364
364
|
direction="down"
|
|
365
|
-
icon="
|
|
365
|
+
icon="chevron"
|
|
366
366
|
>
|
|
367
367
|
<ForwardRef(SvgIcon)
|
|
368
|
-
className="ds-svg-icon--
|
|
368
|
+
className="ds-svg-icon--chevron"
|
|
369
369
|
>
|
|
370
370
|
<ForwardRef(Base)
|
|
371
371
|
aria-hidden="true"
|
|
372
372
|
as="svg"
|
|
373
|
-
className="ds-svg-icon--
|
|
373
|
+
className="ds-svg-icon--chevron ds-svg-icon"
|
|
374
374
|
focusable="false"
|
|
375
375
|
viewBox="0 0 24 24"
|
|
376
376
|
>
|
|
377
377
|
<svg
|
|
378
378
|
aria-hidden="true"
|
|
379
|
-
className="ds-svg-icon--
|
|
379
|
+
className="ds-svg-icon--chevron ds-svg-icon"
|
|
380
380
|
focusable="false"
|
|
381
381
|
viewBox="0 0 24 24"
|
|
382
382
|
>
|
|
383
|
-
<
|
|
383
|
+
<chevron
|
|
384
384
|
direction="down"
|
|
385
385
|
>
|
|
386
386
|
<path
|
|
387
387
|
d="M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z"
|
|
388
388
|
/>
|
|
389
|
-
</
|
|
389
|
+
</chevron>
|
|
390
390
|
</svg>
|
|
391
391
|
</ForwardRef(Base)>
|
|
392
392
|
</ForwardRef(SvgIcon)>
|
|
@@ -455,31 +455,31 @@ exports[`renders the DropdownButton with color=secondary and arrow={true} 1`] =
|
|
|
455
455
|
>
|
|
456
456
|
<ForwardRef(Icon)
|
|
457
457
|
direction="down"
|
|
458
|
-
icon="
|
|
458
|
+
icon="chevron"
|
|
459
459
|
>
|
|
460
460
|
<ForwardRef(SvgIcon)
|
|
461
|
-
className="ds-svg-icon--
|
|
461
|
+
className="ds-svg-icon--chevron"
|
|
462
462
|
>
|
|
463
463
|
<ForwardRef(Base)
|
|
464
464
|
aria-hidden="true"
|
|
465
465
|
as="svg"
|
|
466
|
-
className="ds-svg-icon--
|
|
466
|
+
className="ds-svg-icon--chevron ds-svg-icon"
|
|
467
467
|
focusable="false"
|
|
468
468
|
viewBox="0 0 24 24"
|
|
469
469
|
>
|
|
470
470
|
<svg
|
|
471
471
|
aria-hidden="true"
|
|
472
|
-
className="ds-svg-icon--
|
|
472
|
+
className="ds-svg-icon--chevron ds-svg-icon"
|
|
473
473
|
focusable="false"
|
|
474
474
|
viewBox="0 0 24 24"
|
|
475
475
|
>
|
|
476
|
-
<
|
|
476
|
+
<chevron
|
|
477
477
|
direction="down"
|
|
478
478
|
>
|
|
479
479
|
<path
|
|
480
480
|
d="M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z"
|
|
481
481
|
/>
|
|
482
|
-
</
|
|
482
|
+
</chevron>
|
|
483
483
|
</svg>
|
|
484
484
|
</ForwardRef(Base)>
|
|
485
485
|
</ForwardRef(SvgIcon)>
|
|
@@ -552,31 +552,31 @@ exports[`renders the DropdownButton with color=warning variant="button" arrow={t
|
|
|
552
552
|
>
|
|
553
553
|
<ForwardRef(Icon)
|
|
554
554
|
direction="down"
|
|
555
|
-
icon="
|
|
555
|
+
icon="chevron"
|
|
556
556
|
>
|
|
557
557
|
<ForwardRef(SvgIcon)
|
|
558
|
-
className="ds-svg-icon--
|
|
558
|
+
className="ds-svg-icon--chevron"
|
|
559
559
|
>
|
|
560
560
|
<ForwardRef(Base)
|
|
561
561
|
aria-hidden="true"
|
|
562
562
|
as="svg"
|
|
563
|
-
className="ds-svg-icon--
|
|
563
|
+
className="ds-svg-icon--chevron ds-svg-icon"
|
|
564
564
|
focusable="false"
|
|
565
565
|
viewBox="0 0 24 24"
|
|
566
566
|
>
|
|
567
567
|
<svg
|
|
568
568
|
aria-hidden="true"
|
|
569
|
-
className="ds-svg-icon--
|
|
569
|
+
className="ds-svg-icon--chevron ds-svg-icon"
|
|
570
570
|
focusable="false"
|
|
571
571
|
viewBox="0 0 24 24"
|
|
572
572
|
>
|
|
573
|
-
<
|
|
573
|
+
<chevron
|
|
574
574
|
direction="down"
|
|
575
575
|
>
|
|
576
576
|
<path
|
|
577
577
|
d="M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z"
|
|
578
578
|
/>
|
|
579
|
-
</
|
|
579
|
+
</chevron>
|
|
580
580
|
</svg>
|
|
581
581
|
</ForwardRef(Base)>
|
|
582
582
|
</ForwardRef(SvgIcon)>
|
|
@@ -6,7 +6,8 @@ exports[`renders the Hidden with \`lgUp\` props 1`] = `
|
|
|
6
6
|
>
|
|
7
7
|
<ForwardRef(Base)
|
|
8
8
|
as="div"
|
|
9
|
-
|
|
9
|
+
lgUpHidden={true}
|
|
10
|
+
xsUpHidden={false}
|
|
10
11
|
>
|
|
11
12
|
<div
|
|
12
13
|
className="ds-hidden-lg--up"
|
|
@@ -25,7 +26,8 @@ exports[`renders the Hidden with \`mdUp\` props 1`] = `
|
|
|
25
26
|
>
|
|
26
27
|
<ForwardRef(Base)
|
|
27
28
|
as="div"
|
|
28
|
-
|
|
29
|
+
mdUpHidden={true}
|
|
30
|
+
xsUpHidden={false}
|
|
29
31
|
>
|
|
30
32
|
<div
|
|
31
33
|
className="ds-hidden-md--up"
|
|
@@ -44,7 +46,8 @@ exports[`renders the Hidden with \`smUp\` props 1`] = `
|
|
|
44
46
|
>
|
|
45
47
|
<ForwardRef(Base)
|
|
46
48
|
as="div"
|
|
47
|
-
|
|
49
|
+
smUpHidden={true}
|
|
50
|
+
xsUpHidden={false}
|
|
48
51
|
>
|
|
49
52
|
<div
|
|
50
53
|
className="ds-hidden-sm--up"
|
|
@@ -63,7 +66,8 @@ exports[`renders the Hidden with \`xlUp\` props 1`] = `
|
|
|
63
66
|
>
|
|
64
67
|
<ForwardRef(Base)
|
|
65
68
|
as="div"
|
|
66
|
-
|
|
69
|
+
xlUpHidden={true}
|
|
70
|
+
xsUpHidden={false}
|
|
67
71
|
>
|
|
68
72
|
<div
|
|
69
73
|
className="ds-hidden-xl--up"
|
|
@@ -82,7 +86,7 @@ exports[`renders the Hidden with \`xsUp\` props 1`] = `
|
|
|
82
86
|
>
|
|
83
87
|
<ForwardRef(Base)
|
|
84
88
|
as="div"
|
|
85
|
-
|
|
89
|
+
xsUpHidden={true}
|
|
86
90
|
>
|
|
87
91
|
<div
|
|
88
92
|
className="ds-hidden-xs--up"
|