@digigov/react-core 2.0.0-b3ec0588 → 2.0.0-rc.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.
Files changed (256) hide show
  1. package/Accordion/index.d.ts +1 -1
  2. package/AccordionControls/index.d.ts +1 -1
  3. package/AccordionSection/index.d.ts +1 -1
  4. package/AccordionSectionContent/index.d.ts +1 -1
  5. package/AccordionSectionSummary/index.d.ts +1 -1
  6. package/AccordionSectionSummaryHeading/index.d.ts +1 -1
  7. package/AdminAside/index.d.ts +1 -1
  8. package/AdminContainer/index.d.ts +1 -1
  9. package/AdminHeader/index.d.ts +1 -1
  10. package/AdminHeaderContent/index.d.ts +1 -1
  11. package/AdminLayout/index.d.ts +1 -1
  12. package/AdminMain/index.d.ts +1 -1
  13. package/AdminTopSection/index.d.ts +1 -1
  14. package/Aside/index.d.ts +1 -1
  15. package/AutoCompleteAssistiveHint/index.d.ts +1 -1
  16. package/AutoCompleteInput/index.d.ts +1 -1
  17. package/AutoCompleteInputTypeahead/index.d.ts +1 -1
  18. package/AutoCompleteResultList/index.d.ts +1 -1
  19. package/AutoCompleteResultListItem/index.d.ts +1 -1
  20. package/AutoCompleteStatus/index.d.ts +1 -1
  21. package/AutoCompleteStatusWrapper/index.d.ts +1 -1
  22. package/AutoCompleteWrapper/index.d.ts +1 -1
  23. package/BackLink/index.d.ts +1 -1
  24. package/BackToTopContainer/index.d.ts +1 -1
  25. package/BackToTopLimit/index.d.ts +1 -1
  26. package/BackToTopLink/index.d.ts +1 -1
  27. package/BannerContainer/index.d.ts +1 -1
  28. package/Base/index.d.ts +39 -10
  29. package/Base/index.js +16 -2
  30. package/Blockquote/index.d.ts +1 -1
  31. package/Bottom/index.d.ts +1 -1
  32. package/BottomInfo/index.d.ts +1 -1
  33. package/BottomInfoContainer/index.d.ts +1 -1
  34. package/BottomInfoContent/index.d.ts +1 -1
  35. package/Breadcrumbs/index.d.ts +1 -1
  36. package/BreadcrumbsList/index.d.ts +1 -1
  37. package/BreadcrumbsListItem/index.d.ts +1 -1
  38. package/Button/index.d.ts +1 -1
  39. package/ButtonGroup/index.d.ts +1 -1
  40. package/ButtonLink/index.d.ts +1 -1
  41. package/CallToAction/index.d.ts +1 -1
  42. package/Card/index.d.ts +1 -1
  43. package/CardAction/index.d.ts +1 -1
  44. package/CardContent/index.d.ts +1 -1
  45. package/CardHeading/index.d.ts +1 -1
  46. package/Checkbox/index.d.ts +1 -1
  47. package/CheckboxConditional/index.d.ts +1 -1
  48. package/CheckboxItem/index.d.ts +1 -1
  49. package/Chip/index.d.ts +1 -1
  50. package/ChipContainer/index.d.ts +1 -1
  51. package/ChipHeading/index.d.ts +1 -1
  52. package/ChipKeyValue/index.d.ts +1 -1
  53. package/ChoiceDividerText/index.d.ts +1 -1
  54. package/CircularProgress/index.d.ts +1 -1
  55. package/CloseButton/index.d.ts +1 -1
  56. package/Code/index.d.ts +1 -1
  57. package/CodeBlock/index.d.ts +1 -1
  58. package/Container/index.d.ts +1 -1
  59. package/CopyToClipboardContainer/index.d.ts +1 -1
  60. package/CopyToClipboardMessage/index.d.ts +1 -1
  61. package/CopyrightContainer/index.d.ts +1 -1
  62. package/DateInputContainer/index.d.ts +1 -1
  63. package/DateInputItem/index.d.ts +1 -1
  64. package/Details/index.d.ts +1 -1
  65. package/DetailsContent/index.d.ts +1 -1
  66. package/DetailsSummary/index.d.ts +1 -1
  67. package/Drawer/index.d.ts +1 -1
  68. package/DrawerHeading/index.d.ts +1 -1
  69. package/DropdownBase/index.d.ts +1 -1
  70. package/DropdownButton/index.d.ts +1 -1
  71. package/DropdownContent/index.d.ts +1 -1
  72. package/ErrorMessage/index.d.ts +1 -1
  73. package/ErrorSummary/index.d.ts +1 -1
  74. package/FieldContainer/index.d.ts +1 -1
  75. package/Fieldset/index.d.ts +1 -1
  76. package/FieldsetLegend/index.d.ts +1 -1
  77. package/FileUpload/index.d.ts +1 -1
  78. package/FileUploadContainer/index.d.ts +1 -1
  79. package/FillableText/index.d.ts +1 -1
  80. package/FilterContainer/index.d.ts +1 -1
  81. package/FilterContent/index.d.ts +1 -1
  82. package/FilterHeadingContainer/index.d.ts +1 -1
  83. package/FilterOptionsSection/index.d.ts +1 -1
  84. package/FilterSelectedHeading/index.d.ts +1 -1
  85. package/FilterSelectedSection/index.d.ts +1 -1
  86. package/Footer/index.d.ts +1 -1
  87. package/FooterContainer/index.d.ts +1 -1
  88. package/FooterContent/index.d.ts +1 -1
  89. package/FooterContentLogos/index.d.ts +1 -1
  90. package/FooterHeading/index.d.ts +1 -1
  91. package/FooterImage/index.d.ts +1 -1
  92. package/FooterInfo/index.d.ts +1 -1
  93. package/FooterInfoSection/index.d.ts +1 -1
  94. package/FooterLink/index.d.ts +1 -1
  95. package/FooterList/index.d.ts +1 -1
  96. package/FooterListItem/index.d.ts +1 -1
  97. package/FooterNavigation/index.d.ts +1 -1
  98. package/FooterNavigationSection/index.d.ts +1 -1
  99. package/Form/index.d.ts +1 -1
  100. package/FullPageBackground/index.d.ts +1 -1
  101. package/GovGRLogo/index.d.ts +1 -1
  102. package/Grid/index.d.ts +1 -1
  103. package/Header/index.d.ts +1 -1
  104. package/HeaderContent/index.d.ts +1 -1
  105. package/HeaderLogo/index.d.ts +1 -1
  106. package/HeaderNavMenuContent/index.d.ts +1 -1
  107. package/HeaderSecondaryLogo/index.d.ts +1 -1
  108. package/HeaderSection/index.d.ts +1 -1
  109. package/HeaderTitle/index.d.ts +1 -1
  110. package/Heading/index.d.ts +1 -1
  111. package/HeadingCaption/index.d.ts +1 -1
  112. package/HellenicRepublicLogo/index.d.ts +1 -1
  113. package/Hidden/index.d.ts +1 -1
  114. package/Hint/index.d.ts +1 -1
  115. package/ImageLogo/index.d.ts +1 -1
  116. package/ImageLogoSet/index.d.ts +1 -1
  117. package/KitchenSinkAllComponents/index.d.ts +1 -1
  118. package/KitchenSinkCard/index.d.ts +1 -1
  119. package/KitchenSinkCategory/index.d.ts +1 -1
  120. package/KitchenSinkContent/index.d.ts +1 -1
  121. package/KitchenSinkContentInfo/index.d.ts +1 -1
  122. package/KitchenSinkContentTags/index.d.ts +1 -1
  123. package/KitchenSinkHeading/index.d.ts +1 -1
  124. package/KitchenSinkLetterContent/index.d.ts +1 -1
  125. package/LabelContainer/index.d.ts +1 -1
  126. package/LabelTitle/index.d.ts +1 -1
  127. package/LabeledText/index.d.ts +1 -1
  128. package/Layout/index.d.ts +1 -1
  129. package/LinkBase/index.d.ts +1 -1
  130. package/List/index.d.ts +1 -1
  131. package/ListItem/index.d.ts +1 -1
  132. package/LoaderContainer/index.d.ts +1 -1
  133. package/Main/index.d.ts +1 -1
  134. package/Masthead/index.d.ts +1 -1
  135. package/MastheadBody/index.d.ts +1 -1
  136. package/MastheadLogo/index.d.ts +1 -1
  137. package/ModalAction/index.d.ts +1 -1
  138. package/ModalContainer/index.d.ts +1 -1
  139. package/ModalContent/index.d.ts +1 -1
  140. package/ModalHeading/index.d.ts +1 -1
  141. package/Nav/index.d.ts +1 -1
  142. package/NavList/index.d.ts +1 -1
  143. package/NavListItemAction/index.d.ts +1 -1
  144. package/NavListItemActionContainer/index.d.ts +1 -1
  145. package/NavListItemButton/index.d.ts +1 -1
  146. package/NavListItemLink/index.d.ts +1 -1
  147. package/NavMenuContainer/index.d.ts +1 -1
  148. package/NavMenuContent/index.d.ts +1 -1
  149. package/NavMenuContentListBase/index.d.ts +1 -1
  150. package/NavMenuContentListItem/index.d.ts +1 -1
  151. package/NavMenuTitle/index.d.ts +1 -1
  152. package/NormalText/index.d.ts +1 -1
  153. package/NotificationBannerContainer/index.d.ts +1 -1
  154. package/NotificationBannerContent/index.d.ts +1 -1
  155. package/NotificationBannerHeader/index.d.ts +1 -1
  156. package/NotificationBannerHeading/index.d.ts +1 -1
  157. package/NotificationBannerLink/index.d.ts +1 -1
  158. package/PageTitleCaption/index.d.ts +1 -1
  159. package/PageTitleContainer/index.d.ts +1 -1
  160. package/PageTitleHeading/index.d.ts +1 -1
  161. package/Pagination/index.d.ts +1 -1
  162. package/PaginationLabelContainer/index.d.ts +1 -1
  163. package/PaginationList/index.d.ts +1 -1
  164. package/PaginationListItem/index.d.ts +1 -1
  165. package/Panel/index.d.ts +1 -1
  166. package/PanelBody/index.d.ts +1 -1
  167. package/PanelTitle/index.d.ts +1 -1
  168. package/Paragraph/index.d.ts +1 -1
  169. package/PhaseBanner/index.d.ts +1 -1
  170. package/PhaseBannerHeaderContainer/index.d.ts +1 -1
  171. package/PhaseBannerTag/index.d.ts +1 -1
  172. package/PhaseBannerText/index.d.ts +1 -1
  173. package/RadioConditional/index.d.ts +1 -1
  174. package/RadioContainer/index.d.ts +1 -1
  175. package/RadioItem/index.d.ts +1 -1
  176. package/ResultsActionBar/index.d.ts +1 -1
  177. package/ResultsHeading/index.d.ts +1 -1
  178. package/ResultsHeadingActions/index.d.ts +1 -1
  179. package/SearchButton/index.d.ts +1 -1
  180. package/SearchContainer/index.d.ts +1 -1
  181. package/Section/index.d.ts +1 -1
  182. package/SectionBreak/index.d.ts +1 -1
  183. package/SelectContainer/index.d.ts +1 -1
  184. package/SelectOption/index.d.ts +1 -1
  185. package/SingleCharacterInput/index.d.ts +1 -1
  186. package/SingleCharacterInputs/index.d.ts +1 -1
  187. package/SkipLink/index.d.ts +1 -1
  188. package/Stack/index.d.ts +1 -1
  189. package/StepNav/index.d.ts +1 -1
  190. package/StepNavAccordion/index.d.ts +1 -1
  191. package/StepNavAccordionContent/index.d.ts +1 -1
  192. package/StepNavAccordionHeadingText/index.d.ts +1 -1
  193. package/StepNavAccordionHeadingTitle/index.d.ts +1 -1
  194. package/StepNavAccordionSummary/index.d.ts +1 -1
  195. package/StepNavAccordionSummaryHeading/index.d.ts +1 -1
  196. package/StepNavCircleNumber/index.d.ts +1 -1
  197. package/StepNavControls/index.d.ts +1 -1
  198. package/StepNavList/index.d.ts +1 -1
  199. package/StepNavListItem/index.d.ts +1 -1
  200. package/SummaryList/index.d.ts +1 -1
  201. package/SummaryListItem/index.d.ts +1 -1
  202. package/SummaryListItemAction/index.d.ts +1 -1
  203. package/SummaryListItemKey/index.d.ts +1 -1
  204. package/SummaryListItemValue/index.d.ts +1 -1
  205. package/SvgIcon/__snapshots__/index.test.tsx.snap +43 -20
  206. package/SvgIcon/index.d.ts +6 -5
  207. package/SvgIcon/index.test/index.js +25 -19
  208. package/Table/index.d.ts +1 -1
  209. package/TableBody/index.d.ts +1 -1
  210. package/TableCaption/index.d.ts +1 -1
  211. package/TableContainer/index.d.ts +1 -1
  212. package/TableDataCell/index.d.ts +1 -1
  213. package/TableHead/index.d.ts +1 -1
  214. package/TableHeadCell/index.d.ts +1 -1
  215. package/TableLoaderBackground/index.d.ts +1 -1
  216. package/TableNoDataRow/index.d.ts +1 -1
  217. package/TableRow/index.d.ts +1 -1
  218. package/TableSortIconContainer/index.d.ts +1 -1
  219. package/Tabs/index.d.ts +1 -1
  220. package/TabsHeading/index.d.ts +1 -1
  221. package/TabsList/index.d.ts +1 -1
  222. package/TabsListItemBase/index.d.ts +1 -1
  223. package/TabsPanelBase/index.d.ts +1 -1
  224. package/TaskList/index.d.ts +1 -1
  225. package/TaskListItem/index.d.ts +1 -1
  226. package/TaskListItemContent/index.d.ts +1 -1
  227. package/TaskListItemHeading/index.d.ts +1 -1
  228. package/TaskListItemTag/index.d.ts +1 -1
  229. package/TextArea/index.d.ts +1 -1
  230. package/TextInput/index.d.ts +1 -1
  231. package/Timeline/index.d.ts +1 -1
  232. package/TimelineActions/index.d.ts +1 -1
  233. package/TimelineContent/index.d.ts +1 -1
  234. package/TimelineHeading/index.d.ts +1 -1
  235. package/TimelineItem/index.d.ts +1 -1
  236. package/Top/index.d.ts +1 -1
  237. package/Typography/index.d.ts +1 -1
  238. package/Unpurge/index.js +1 -1
  239. package/VisuallyHidden/index.d.ts +1 -1
  240. package/WarningText/index.d.ts +1 -1
  241. package/cjs/Base/index.js +16 -2
  242. package/cjs/SvgIcon/__snapshots__/index.test.tsx.snap +43 -20
  243. package/cjs/SvgIcon/index.test/index.js +25 -19
  244. package/cjs/Unpurge/index.js +1 -1
  245. package/cjs/lazy/index.js +2137 -0
  246. package/index.js +1 -1
  247. package/lazy/index.js +1655 -0
  248. package/lazy/package.json +6 -0
  249. package/lazy.d.ts +239 -0
  250. package/package.json +3 -3
  251. package/src/Base/index.tsx +149 -59
  252. package/src/SvgIcon/__snapshots__/index.test.tsx.snap +43 -20
  253. package/src/SvgIcon/index.test.tsx +5 -2
  254. package/src/SvgIcon/index.tsx +6 -4
  255. package/src/Unpurge/index.tsx +136 -0
  256. package/src/lazy.js +240 -0
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@digigov/react-core",
3
- "version": "2.0.0-b3ec0588",
3
+ "version": "2.0.0-rc.0",
4
4
  "description": "@digigov react core components",
5
5
  "author": "GRNET Developers <devs@lists.grnet.gr>",
6
6
  "license": "BSD-2-Clause",
7
7
  "main": "./cjs/index.js",
8
8
  "module": "./index.js",
9
9
  "peerDependencies": {
10
- "@digigov/css": "2.0.0-b3ec0588",
11
- "@digigov/react-icons": "2.0.0-b3ec0588",
10
+ "@digigov/css": "1.3.0-rc.0",
11
+ "@digigov/react-icons": "2.0.0-rc.0",
12
12
  "clsx": "1.1.1",
13
13
  "react": "^16.8.0 || ^17.0.0",
14
14
  "react-dom": "^16.8.0 || ^17.0.0"
@@ -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> = React.ComponentPropsWithRef<
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
- C extends React.ElementType
33
- > = PolymorphicComponentPropWithRef<
34
- C,
35
- {
36
- /** margin is optional. It has not a default value. */
37
- margin?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
38
- /** marginTop is optional. It has not a default value. */
39
- marginTop?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
40
- /** marginBottom is optional. It has not a default value. */
41
- marginBottom?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
42
- /** marginLeft is optional. It has not a default value. */
43
- marginLeft?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
44
- /** marginRight is optional. It has not a default value. */
45
- marginRight?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
46
- /** padding is optional. It has not a default value. */
47
- padding?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
48
- /** paddingTop is optional. It has not a default value. */
49
- paddingTop?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
50
- /** paddingBottom is optional. It has not a default value. */
51
- paddingBottom?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
52
- /** paddingLeft is optional. It has not a default value. */
53
- paddingLeft?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
54
- /** paddingRight is optional. It has not a default value. */
55
- paddingRight?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
56
- /** printHidden is optional. Default value is false. When true, the component is hidden at print. */
57
- printHidden?: boolean;
58
- /** printVisible is optional. When block, the component is displayed as block. When inline, the component is displayed as inline.*/
59
- printVisible?: 'block' | 'inline';
60
- /** Components will be hidden at all screen sizes. */
61
- hidden?: boolean;
62
- /** Components will be hidden from 'xs' screen size and up. */
63
- xsUpHidden?: boolean;
64
- /** Components will be hidden from 'sm' screen size and up. */
65
- smUpHidden?: boolean;
66
- /** Components will be hidden from 'md' screen size and up. */
67
- mdUpHidden?: boolean;
68
- /** Components will be hidden from 'lg' screen size and up. */
69
- lgUpHidden?: boolean;
70
- /** Components will be hidden from 'xl' screen size and up. */
71
- xlUpHidden?: boolean;
72
- /** Components will be hidden between xs and sm screen size. */
73
- xsHidden?: boolean;
74
- /** Components will be hidden between sm and md screen size. */
75
- smHidden?: boolean;
76
- /** Components will be hidden between md and lg screen size. */
77
- mdHidden?: boolean;
78
- /** Components will be hidden between lg and xl screen size. */
79
- lgHidden?: boolean;
80
- /** Components will be hidden between xl and 2xl screen size. */
81
- xlHidden?: boolean;
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',
@@ -19,6 +19,29 @@ exports[`renders the SvgIcon with no props 1`] = `
19
19
  </ForwardRef(SvgIcon)>
20
20
  `;
21
21
 
22
+ exports[`renders the SvgIcon with prop color=base-content 1`] = `
23
+ <ForwardRef(SvgIcon)
24
+ color="base-content"
25
+ >
26
+ <ForwardRef(Base)
27
+ aria-hidden="true"
28
+ as="svg"
29
+ className="ds-svg-icon--base-content ds-svg-icon"
30
+ focusable="false"
31
+ viewBox="0 0 24 24"
32
+ >
33
+ <svg
34
+ aria-hidden="true"
35
+ className="ds-svg-icon--base-content ds-svg-icon"
36
+ focusable="false"
37
+ viewBox="0 0 24 24"
38
+ >
39
+ hello
40
+ </svg>
41
+ </ForwardRef(Base)>
42
+ </ForwardRef(SvgIcon)>
43
+ `;
44
+
22
45
  exports[`renders the SvgIcon with prop color=dark 1`] = `
23
46
  <ForwardRef(SvgIcon)
24
47
  color="dark"
@@ -135,20 +158,20 @@ exports[`renders the SvgIcon with prop color=gray 1`] = `
135
158
  </ForwardRef(SvgIcon)>
136
159
  `;
137
160
 
138
- exports[`renders the SvgIcon with prop color=light 1`] = `
161
+ exports[`renders the SvgIcon with prop color=primary 1`] = `
139
162
  <ForwardRef(SvgIcon)
140
- color="light"
163
+ color="primary"
141
164
  >
142
165
  <ForwardRef(Base)
143
166
  aria-hidden="true"
144
167
  as="svg"
145
- className="ds-svg-icon--light ds-svg-icon"
168
+ className="ds-svg-icon--primary ds-svg-icon"
146
169
  focusable="false"
147
170
  viewBox="0 0 24 24"
148
171
  >
149
172
  <svg
150
173
  aria-hidden="true"
151
- className="ds-svg-icon--light ds-svg-icon"
174
+ className="ds-svg-icon--primary ds-svg-icon"
152
175
  focusable="false"
153
176
  viewBox="0 0 24 24"
154
177
  >
@@ -158,20 +181,20 @@ exports[`renders the SvgIcon with prop color=light 1`] = `
158
181
  </ForwardRef(SvgIcon)>
159
182
  `;
160
183
 
161
- exports[`renders the SvgIcon with prop color=primary 1`] = `
184
+ exports[`renders the SvgIcon with prop color=success 1`] = `
162
185
  <ForwardRef(SvgIcon)
163
- color="primary"
186
+ color="success"
164
187
  >
165
188
  <ForwardRef(Base)
166
189
  aria-hidden="true"
167
190
  as="svg"
168
- className="ds-svg-icon--primary ds-svg-icon"
191
+ className="ds-svg-icon--success ds-svg-icon"
169
192
  focusable="false"
170
193
  viewBox="0 0 24 24"
171
194
  >
172
195
  <svg
173
196
  aria-hidden="true"
174
- className="ds-svg-icon--primary ds-svg-icon"
197
+ className="ds-svg-icon--success ds-svg-icon"
175
198
  focusable="false"
176
199
  viewBox="0 0 24 24"
177
200
  >
@@ -181,20 +204,20 @@ exports[`renders the SvgIcon with prop color=primary 1`] = `
181
204
  </ForwardRef(SvgIcon)>
182
205
  `;
183
206
 
184
- exports[`renders the SvgIcon with prop color=success 1`] = `
207
+ exports[`renders the SvgIcon with prop color=warning 1`] = `
185
208
  <ForwardRef(SvgIcon)
186
- color="success"
209
+ color="warning"
187
210
  >
188
211
  <ForwardRef(Base)
189
212
  aria-hidden="true"
190
213
  as="svg"
191
- className="ds-svg-icon--success ds-svg-icon"
214
+ className="ds-svg-icon--warning ds-svg-icon"
192
215
  focusable="false"
193
216
  viewBox="0 0 24 24"
194
217
  >
195
218
  <svg
196
219
  aria-hidden="true"
197
- className="ds-svg-icon--success ds-svg-icon"
220
+ className="ds-svg-icon--warning ds-svg-icon"
198
221
  focusable="false"
199
222
  viewBox="0 0 24 24"
200
223
  >
@@ -204,20 +227,21 @@ exports[`renders the SvgIcon with prop color=success 1`] = `
204
227
  </ForwardRef(SvgIcon)>
205
228
  `;
206
229
 
207
- exports[`renders the SvgIcon with prop color=warning 1`] = `
230
+ exports[`renders the SvgIcon with prop color=warning and size=sm 1`] = `
208
231
  <ForwardRef(SvgIcon)
209
232
  color="warning"
233
+ size="sm"
210
234
  >
211
235
  <ForwardRef(Base)
212
236
  aria-hidden="true"
213
237
  as="svg"
214
- className="ds-svg-icon--warning ds-svg-icon"
238
+ className="ds-svg-icon--warning ds-svg-icon--sm ds-svg-icon"
215
239
  focusable="false"
216
240
  viewBox="0 0 24 24"
217
241
  >
218
242
  <svg
219
243
  aria-hidden="true"
220
- className="ds-svg-icon--warning ds-svg-icon"
244
+ className="ds-svg-icon--warning ds-svg-icon--sm ds-svg-icon"
221
245
  focusable="false"
222
246
  viewBox="0 0 24 24"
223
247
  >
@@ -227,21 +251,20 @@ exports[`renders the SvgIcon with prop color=warning 1`] = `
227
251
  </ForwardRef(SvgIcon)>
228
252
  `;
229
253
 
230
- exports[`renders the SvgIcon with prop color=warning and size=sm 1`] = `
254
+ exports[`renders the SvgIcon with prop color=white 1`] = `
231
255
  <ForwardRef(SvgIcon)
232
- color="warning"
233
- size="sm"
256
+ color="white"
234
257
  >
235
258
  <ForwardRef(Base)
236
259
  aria-hidden="true"
237
260
  as="svg"
238
- className="ds-svg-icon--warning ds-svg-icon--sm ds-svg-icon"
261
+ className="ds-svg-icon--white ds-svg-icon"
239
262
  focusable="false"
240
263
  viewBox="0 0 24 24"
241
264
  >
242
265
  <svg
243
266
  aria-hidden="true"
244
- className="ds-svg-icon--warning ds-svg-icon--sm ds-svg-icon"
267
+ className="ds-svg-icon--white ds-svg-icon"
245
268
  focusable="false"
246
269
  viewBox="0 0 24 24"
247
270
  >
@@ -21,11 +21,14 @@ it('renders the SvgIcon with prop size=lg', () => {
21
21
  it('renders the SvgIcon with prop size=xl', () => {
22
22
  expect(mount(<SvgIcon size="xl">hello</SvgIcon>)).toMatchSnapshot();
23
23
  });
24
+ it('renders the SvgIcon with prop color=base-content', () => {
25
+ expect(mount(<SvgIcon color="base-content">hello</SvgIcon>)).toMatchSnapshot();
26
+ });
24
27
  it('renders the SvgIcon with prop color=dark', () => {
25
28
  expect(mount(<SvgIcon color="dark">hello</SvgIcon>)).toMatchSnapshot();
26
29
  });
27
- it('renders the SvgIcon with prop color=light', () => {
28
- expect(mount(<SvgIcon color="light">hello</SvgIcon>)).toMatchSnapshot();
30
+ it('renders the SvgIcon with prop color=white', () => {
31
+ expect(mount(<SvgIcon color="white">hello</SvgIcon>)).toMatchSnapshot();
29
32
  });
30
33
  it('renders the SvgIcon with prop color=gray', () => {
31
34
  expect(mount(<SvgIcon color="gray">hello</SvgIcon>)).toMatchSnapshot();
@@ -18,20 +18,22 @@ export interface SvgIconProps extends BaseProps<'svg'> {
18
18
  /**
19
19
  * color property styles svg icon with Gov.gr palette's basic colors.
20
20
  * color property is optional.
21
- * @value 'dark'
22
- * @value 'light'
21
+ * @value 'base-content'
22
+ * @value 'dark', always dark, among all themes
23
+ * @value 'white', always white, among all themes
23
24
  * @value 'gray'
24
25
  * @value 'primary'
25
26
  * @value 'success'
26
27
  * @value 'warning'
27
28
  * @value 'error'
28
- * @value 'focus'
29
+ * @value 'focus', use only in focus state, in dark background
29
30
  * @value 'info'
30
31
  * @value 'link'
31
32
  */
32
33
  color?:
34
+ | 'base-content'
33
35
  | 'dark'
34
- | 'light'
36
+ | 'white'
35
37
  | 'gray'
36
38
  | 'primary'
37
39
  | 'success'
@@ -179,6 +179,74 @@ function Unpurge() {
179
179
  ds-mb-1.5
180
180
  ds-mb-2.5
181
181
  ds-mb-3.5
182
+ ds-mx-0
183
+ ds-mx-1
184
+ ds-mx-2
185
+ ds-mx-3
186
+ ds-mx-4
187
+ ds-mx-5
188
+ ds-mx-6
189
+ ds-mx-7
190
+ ds-mx-8
191
+ ds-mx-9
192
+ ds-mx-10
193
+ ds-mx-11
194
+ ds-mx-12
195
+ ds-mx-14
196
+ ds-mx-16
197
+ ds-mx-20
198
+ ds-mx-24
199
+ ds-mx-28
200
+ ds-mx-32
201
+ ds-mx-36
202
+ ds-mx-40
203
+ ds-mx-44
204
+ ds-mx-48
205
+ ds-mx-52
206
+ ds-mx-56
207
+ ds-mx-60
208
+ ds-mx-64
209
+ ds-mx-72
210
+ ds-mx-80
211
+ ds-mx-96
212
+ ds-mx-0.5
213
+ ds-mx-1.5
214
+ ds-mx-2.5
215
+ ds-mx-3.5
216
+ ds-my-0
217
+ ds-my-1
218
+ ds-my-2
219
+ ds-my-3
220
+ ds-my-4
221
+ ds-my-5
222
+ ds-my-6
223
+ ds-my-7
224
+ ds-my-8
225
+ ds-my-9
226
+ ds-my-10
227
+ ds-my-11
228
+ ds-my-12
229
+ ds-my-14
230
+ ds-my-16
231
+ ds-my-20
232
+ ds-my-24
233
+ ds-my-28
234
+ ds-my-32
235
+ ds-my-36
236
+ ds-my-40
237
+ ds-my-44
238
+ ds-my-48
239
+ ds-my-52
240
+ ds-my-56
241
+ ds-my-60
242
+ ds-my-64
243
+ ds-my-72
244
+ ds-my-80
245
+ ds-my-96
246
+ ds-my-0.5
247
+ ds-my-1.5
248
+ ds-my-2.5
249
+ ds-my-3.5
182
250
  ds-p-0
183
251
  ds-p-1
184
252
  ds-p-2
@@ -354,6 +422,74 @@ function Unpurge() {
354
422
  ds-pb-1.5
355
423
  ds-pb-2.5
356
424
  ds-pb-3.5
425
+ ds-px-0
426
+ ds-px-1
427
+ ds-px-2
428
+ ds-px-3
429
+ ds-px-4
430
+ ds-px-5
431
+ ds-px-6
432
+ ds-px-7
433
+ ds-px-8
434
+ ds-px-9
435
+ ds-px-10
436
+ ds-px-11
437
+ ds-px-12
438
+ ds-px-14
439
+ ds-px-16
440
+ ds-px-20
441
+ ds-px-24
442
+ ds-px-28
443
+ ds-px-32
444
+ ds-px-36
445
+ ds-px-40
446
+ ds-px-44
447
+ ds-px-48
448
+ ds-px-52
449
+ ds-px-56
450
+ ds-px-60
451
+ ds-px-64
452
+ ds-px-72
453
+ ds-px-80
454
+ ds-px-96
455
+ ds-px-0.5
456
+ ds-px-1.5
457
+ ds-px-2.5
458
+ ds-px-3.5
459
+ ds-py-0
460
+ ds-py-1
461
+ ds-py-2
462
+ ds-py-3
463
+ ds-py-4
464
+ ds-py-5
465
+ ds-py-6
466
+ ds-py-7
467
+ ds-py-8
468
+ ds-py-9
469
+ ds-py-10
470
+ ds-py-11
471
+ ds-py-12
472
+ ds-py-14
473
+ ds-py-16
474
+ ds-py-20
475
+ ds-py-24
476
+ ds-py-28
477
+ ds-py-32
478
+ ds-py-36
479
+ ds-py-40
480
+ ds-py-44
481
+ ds-py-48
482
+ ds-py-52
483
+ ds-py-56
484
+ ds-py-60
485
+ ds-py-64
486
+ ds-py-72
487
+ ds-py-80
488
+ ds-py-96
489
+ ds-py-0.5
490
+ ds-py-1.5
491
+ ds-py-2.5
492
+ ds-py-3.5
357
493
  ds-gap-1
358
494
  ds-gap-2
359
495
  ds-gap-4