@digigov/react-core 2.0.0-a32ad9b2 → 2.0.0-a594a958

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 (137) hide show
  1. package/AccordionSection/index.web.d.ts +0 -1
  2. package/AccordionSection/index.web.js.map +2 -2
  3. package/AccordionSectionSummaryHeading/index.d.ts +1 -0
  4. package/AccordionSectionSummaryHeading/index.js +3 -2
  5. package/AccordionSectionSummaryHeading/index.js.map +2 -2
  6. package/BannerContainer/index.js +1 -1
  7. package/BannerContainer/index.js.map +2 -2
  8. package/Button/index.js +1 -0
  9. package/Button/index.js.map +2 -2
  10. package/{CircularProgress → CircularProgressBase}/index.d.ts +5 -5
  11. package/{CircularProgress → CircularProgressBase}/index.js +4 -4
  12. package/CircularProgressBase/index.js.map +7 -0
  13. package/{CircularProgress → CircularProgressBase}/package.json +1 -1
  14. package/DetailsContent/index.d.ts +1 -0
  15. package/DetailsContent/index.js +3 -2
  16. package/DetailsContent/index.js.map +2 -2
  17. package/Grid/index.d.ts +1 -7
  18. package/Grid/index.js.map +2 -2
  19. package/LinkBase/index.js +1 -0
  20. package/LinkBase/index.js.map +2 -2
  21. package/NavListItemActionBase/index.js +2 -2
  22. package/NavListItemActionBase/index.js.map +2 -2
  23. package/SummaryList/index.d.ts +10 -2
  24. package/SummaryList/index.js +10 -2
  25. package/SummaryList/index.js.map +2 -2
  26. package/SummaryListItem/index.js +1 -1
  27. package/SummaryListItem/index.js.map +2 -2
  28. package/SummaryListItemKey/index.d.ts +14 -0
  29. package/SummaryListItemKey/index.js +14 -2
  30. package/SummaryListItemKey/index.js.map +2 -2
  31. package/SummaryListItemValue/index.d.ts +14 -0
  32. package/SummaryListItemValue/index.js +11 -2
  33. package/SummaryListItemValue/index.js.map +2 -2
  34. package/Table/index.d.ts +9 -0
  35. package/Table/index.js +4 -1
  36. package/Table/index.js.map +2 -2
  37. package/TableDataCell/index.d.ts +22 -0
  38. package/TableDataCell/index.js +18 -2
  39. package/TableDataCell/index.js.map +2 -2
  40. package/WarningText/index.d.ts +7 -0
  41. package/WarningText/index.js +10 -2
  42. package/WarningText/index.js.map +2 -2
  43. package/cjs/AccordionSection/index.web.js.map +2 -2
  44. package/cjs/AccordionSectionSummaryHeading/index.js +3 -2
  45. package/cjs/AccordionSectionSummaryHeading/index.js.map +2 -2
  46. package/cjs/BannerContainer/index.js +1 -1
  47. package/cjs/BannerContainer/index.js.map +2 -2
  48. package/cjs/Button/index.js +1 -0
  49. package/cjs/Button/index.js.map +2 -2
  50. package/cjs/{CircularProgress → CircularProgressBase}/index.js +8 -8
  51. package/cjs/CircularProgressBase/index.js.map +7 -0
  52. package/cjs/DetailsContent/index.js +3 -2
  53. package/cjs/DetailsContent/index.js.map +2 -2
  54. package/cjs/Grid/index.js.map +2 -2
  55. package/cjs/LinkBase/index.js +1 -0
  56. package/cjs/LinkBase/index.js.map +2 -2
  57. package/cjs/NavListItemActionBase/index.js +2 -2
  58. package/cjs/NavListItemActionBase/index.js.map +2 -2
  59. package/cjs/SummaryList/index.js +10 -2
  60. package/cjs/SummaryList/index.js.map +2 -2
  61. package/cjs/SummaryListItem/index.js +1 -1
  62. package/cjs/SummaryListItem/index.js.map +2 -2
  63. package/cjs/SummaryListItemKey/index.js +14 -2
  64. package/cjs/SummaryListItemKey/index.js.map +3 -3
  65. package/cjs/SummaryListItemValue/index.js +11 -2
  66. package/cjs/SummaryListItemValue/index.js.map +3 -3
  67. package/cjs/Table/index.js +4 -1
  68. package/cjs/Table/index.js.map +2 -2
  69. package/cjs/TableDataCell/index.js +18 -2
  70. package/cjs/TableDataCell/index.js.map +3 -3
  71. package/cjs/WarningText/index.js +10 -2
  72. package/cjs/WarningText/index.js.map +2 -2
  73. package/cjs/index.js +2 -4
  74. package/cjs/index.js.map +2 -2
  75. package/cjs/lazy/index.js +1 -2
  76. package/cjs/lazy.js.map +2 -2
  77. package/cjs/registry/index.js +8 -10
  78. package/cjs/registry.js.map +2 -2
  79. package/index.d.ts +1 -2
  80. package/index.js +2 -3
  81. package/index.js.map +2 -2
  82. package/lazy/index.js +1 -2
  83. package/package.json +3 -3
  84. package/registry/index.js +8 -10
  85. package/src/Accordion/__snapshots__/index.test.tsx.snap +48 -0
  86. package/src/Accordion/index.test.tsx +24 -0
  87. package/src/AccordionSection/index.web.tsx +0 -1
  88. package/src/AccordionSectionSummaryHeading/__snapshots__/index.test.tsx.snap +17 -0
  89. package/src/AccordionSectionSummaryHeading/index.test.tsx +9 -0
  90. package/src/AccordionSectionSummaryHeading/index.tsx +9 -2
  91. package/src/BannerContainer/__snapshots__/index.test.tsx.snap +1 -1
  92. package/src/BannerContainer/index.tsx +1 -1
  93. package/src/Button/index.tsx +1 -0
  94. package/src/{CircularProgress → CircularProgressBase}/__snapshots__/index.test.tsx.snap +6 -6
  95. package/src/CircularProgressBase/index.test.tsx +38 -0
  96. package/src/{CircularProgress → CircularProgressBase}/index.tsx +7 -7
  97. package/src/DetailsContent/index.tsx +11 -2
  98. package/src/Grid/index.tsx +1 -7
  99. package/src/LinkBase/index.tsx +1 -0
  100. package/src/NavListItemActionBase/__snapshots__/index.test.tsx.snap +0 -1
  101. package/src/NavListItemActionBase/index.tsx +2 -2
  102. package/src/SummaryList/__snapshots__/index.test.tsx.snap +36 -0
  103. package/src/SummaryList/index.test.tsx +15 -0
  104. package/src/SummaryList/index.tsx +20 -3
  105. package/src/SummaryListItem/index.tsx +1 -1
  106. package/src/SummaryListItemKey/__snapshots__/index.test.tsx.snap +70 -0
  107. package/src/SummaryListItemKey/index.test.tsx +29 -0
  108. package/src/SummaryListItemKey/index.tsx +29 -1
  109. package/src/SummaryListItemValue/__snapshots__/index.test.tsx.snap +34 -0
  110. package/src/SummaryListItemValue/index.test.tsx +14 -0
  111. package/src/SummaryListItemValue/index.tsx +30 -2
  112. package/src/Table/index.tsx +12 -0
  113. package/src/TableDataCell/__snapshots__/index.test.tsx.snap +79 -2
  114. package/src/TableDataCell/index.test.tsx +42 -0
  115. package/src/TableDataCell/index.tsx +56 -1
  116. package/src/TableRow/__snapshots__/index.test.tsx.snap +1 -1
  117. package/src/TableRow/index.test.tsx +1 -1
  118. package/src/WarningText/__snapshots__/index.test.tsx.snap +26 -0
  119. package/src/WarningText/index.test.tsx +5 -0
  120. package/src/WarningText/index.tsx +17 -2
  121. package/src/index.ts +1 -2
  122. package/src/lazy.js +1 -2
  123. package/src/registry.js +8 -10
  124. package/AutoCompleteInputTypeahead/index.d.ts +0 -11
  125. package/AutoCompleteInputTypeahead/index.js +0 -25
  126. package/AutoCompleteInputTypeahead/index.js.map +0 -7
  127. package/AutoCompleteInputTypeahead/package.json +0 -6
  128. package/CircularProgress/index.js.map +0 -7
  129. package/CircularProgress/index.test.d.ts +0 -1
  130. package/cjs/AutoCompleteInputTypeahead/index.js +0 -58
  131. package/cjs/AutoCompleteInputTypeahead/index.js.map +0 -7
  132. package/cjs/CircularProgress/index.js.map +0 -7
  133. package/src/AutoCompleteInputTypeahead/__snapshots__/index.test.tsx.snap +0 -16
  134. package/src/AutoCompleteInputTypeahead/index.test.tsx +0 -8
  135. package/src/AutoCompleteInputTypeahead/index.tsx +0 -32
  136. package/src/CircularProgress/index.test.tsx +0 -34
  137. /package/{AutoCompleteInputTypeahead → CircularProgressBase}/index.test.d.ts +0 -0
@@ -4,7 +4,6 @@ export interface AccordionSectionProps extends BaseProps<'details'> {
4
4
  }
5
5
  /**
6
6
  * AccordionSection should be inside the Accordion component.
7
- *
8
7
  * Inside this component must place the Accordion and the AccordionSectionContent components.
9
8
  */
10
9
  export declare const AccordionSection: React.ForwardRefExoticComponent<Omit<AccordionSectionProps, "ref"> & React.RefAttributes<HTMLDetailsElement>>;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/AccordionSection/index.web.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nexport interface AccordionSectionProps extends BaseProps<'details'> {}\n/**\n * AccordionSection should be inside the Accordion component.\n *\n * Inside this component must place the Accordion and the AccordionSectionContent components.\n */\nexport const AccordionSection = React.forwardRef<\n HTMLDetailsElement,\n AccordionSectionProps\n>(function AccordionSection({ className, children, ...props }, ref) {\n return (\n <Base\n as=\"details\"\n ref={ref}\n className={clsx(className, {\n 'ds-accordion__section': true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default AccordionSection;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAOzB,MAAM,mBAAmB,MAAM,WAGpC,SAASA,kBAAiB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AAClE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,yBAAyB;AAAA,MAC3B,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,oBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nexport interface AccordionSectionProps extends BaseProps<'details'> {}\n/**\n * AccordionSection should be inside the Accordion component.\n * Inside this component must place the Accordion and the AccordionSectionContent components.\n */\nexport const AccordionSection = React.forwardRef<\n HTMLDetailsElement,\n AccordionSectionProps\n>(function AccordionSection({ className, children, ...props }, ref) {\n return (\n <Base\n as=\"details\"\n ref={ref}\n className={clsx(className, {\n 'ds-accordion__section': true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default AccordionSection;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAMzB,MAAM,mBAAmB,MAAM,WAGpC,SAASA,kBAAiB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AAClE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,yBAAyB;AAAA,MAC3B,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,oBAAQ;",
6
6
  "names": ["AccordionSection"]
7
7
  }
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface AccordionSectionSummaryHeadingProps extends BaseProps<'h2'> {
4
+ variant?: 'default' | 'arrows';
4
5
  }
5
6
  /**
6
7
  * AccordionSectionSummaryHeading should be placed inside AccordionSectionSummary.
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
- const AccordionSectionSummaryHeading = React.forwardRef(function AccordionSectionSummaryHeading2({ className, children, ...props }, ref) {
4
+ const AccordionSectionSummaryHeading = React.forwardRef(function AccordionSectionSummaryHeading2({ variant, className, children, ...props }, ref) {
5
5
  return /* @__PURE__ */ React.createElement(
6
6
  Base,
7
7
  {
@@ -18,7 +18,8 @@ const AccordionSectionSummaryHeading = React.forwardRef(function AccordionSectio
18
18
  {
19
19
  as: "span",
20
20
  className: clsx({
21
- "ds-accordion__section-button": true
21
+ "ds-accordion__section-button": true,
22
+ "ds-accordion__section-button--arrows": variant === "arrows"
22
23
  })
23
24
  },
24
25
  children
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/AccordionSectionSummaryHeading/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface AccordionSectionSummaryHeadingProps extends BaseProps<'h2'> {}\n/**\n * AccordionSectionSummaryHeading should be placed inside AccordionSectionSummary.\n */\nexport const AccordionSectionSummaryHeading = React.forwardRef<\n HTMLHeadingElement,\n AccordionSectionSummaryHeadingProps\n>(function AccordionSectionSummaryHeading(\n { className, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"h2\"\n ref={ref}\n className={clsx(className, {\n 'ds-accordion__section-heading': true,\n })}\n {...props}\n role=\"button\"\n >\n <Base\n as=\"span\"\n className={clsx({\n 'ds-accordion__section-button': true,\n })}\n >\n {children}\n </Base>\n </Base>\n );\n});\n\nexport default AccordionSectionSummaryHeading;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAMzB,MAAM,iCAAiC,MAAM,WAGlD,SAASA,gCACT,EAAE,WAAW,UAAU,GAAG,MAAM,GAChC,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,iCAAiC;AAAA,MACnC,CAAC;AAAA,MACA,GAAG;AAAA,MACJ,MAAK;AAAA;AAAA,IAEL;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH,WAAW,KAAK;AAAA,UACd,gCAAgC;AAAA,QAClC,CAAC;AAAA;AAAA,MAEA;AAAA,IACH;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,yCAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface AccordionSectionSummaryHeadingProps extends BaseProps<'h2'> {\n /*\n * The type of the icon to be displayed on the right side of the heading.\n * @default 'default'\n */\n variant?: 'default' | 'arrows';\n}\n/**\n * AccordionSectionSummaryHeading should be placed inside AccordionSectionSummary.\n */\nexport const AccordionSectionSummaryHeading = React.forwardRef<\n HTMLHeadingElement,\n AccordionSectionSummaryHeadingProps\n>(function AccordionSectionSummaryHeading(\n { variant, className, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"h2\"\n ref={ref}\n className={clsx(className, {\n 'ds-accordion__section-heading': true,\n })}\n {...props}\n role=\"button\"\n >\n <Base\n as=\"span\"\n className={clsx({\n 'ds-accordion__section-button': true,\n 'ds-accordion__section-button--arrows': variant === 'arrows',\n })}\n >\n {children}\n </Base>\n </Base>\n );\n});\n\nexport default AccordionSectionSummaryHeading;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAYzB,MAAM,iCAAiC,MAAM,WAGlD,SAASA,gCACT,EAAE,SAAS,WAAW,UAAU,GAAG,MAAM,GACzC,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,iCAAiC;AAAA,MACnC,CAAC;AAAA,MACA,GAAG;AAAA,MACJ,MAAK;AAAA;AAAA,IAEL;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH,WAAW,KAAK;AAAA,UACd,gCAAgC;AAAA,UAChC,wCAAwC,YAAY;AAAA,QACtD,CAAC;AAAA;AAAA,MAEA;AAAA,IACH;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,yCAAQ;",
6
6
  "names": ["AccordionSectionSummaryHeading"]
7
7
  }
@@ -8,7 +8,7 @@ const BannerContainer = React.forwardRef(function BannerContainer2({ className,
8
8
  as: "div",
9
9
  ref,
10
10
  className: clsx(className, {
11
- "ds-cookie-banner": true
11
+ "ds-banner-container": true
12
12
  }),
13
13
  ...props
14
14
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/BannerContainer/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport { Base, BaseProps } from '@digigov/react-core/Base';\n\nexport interface BannerContainerProps extends BaseProps<'div'> {}\n\nexport const BannerContainer = React.forwardRef<\n HTMLDivElement,\n BannerContainerProps\n>(function BannerContainer({ className, children, ...props }, ref) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-cookie-banner': true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default BannerContainer;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAAS,YAAuB;AAIzB,MAAM,kBAAkB,MAAM,WAGnC,SAASA,iBAAgB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AACjE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,oBAAoB;AAAA,MACtB,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,0BAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport { Base, BaseProps } from '@digigov/react-core/Base';\n\nexport interface BannerContainerProps extends BaseProps<'div'> {}\n\nexport const BannerContainer = React.forwardRef<\n HTMLDivElement,\n BannerContainerProps\n>(function BannerContainer({ className, children, ...props }, ref) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-banner-container': true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default BannerContainer;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAAS,YAAuB;AAIzB,MAAM,kBAAkB,MAAM,WAGnC,SAASA,iBAAgB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AACjE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,uBAAuB;AAAA,MACzB,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,0BAAQ;",
6
6
  "names": ["BannerContainer"]
7
7
  }
package/Button/index.js CHANGED
@@ -22,6 +22,7 @@ const Button = React.forwardRef(
22
22
  className: clsx(className, {
23
23
  "ds-link": variant === "link",
24
24
  "ds-link-warning": variant === "link" && color === "warning",
25
+ "ds-link--disabled": variant === "link" && disabled,
25
26
  "ds-btn": variant === "button",
26
27
  "ds-btn--dense": dense,
27
28
  "ds-btn-primary": variant === "button" && color === "primary",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Button/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface ButtonProps extends BaseProps<'button'> {\n /**\n * color is optional.\n * 'primary' color is used for the main call to action on a page.\n * 'secondary' color is used for secondary calls to action on a page.\n * 'warning' color is used to make users think carefully before they use them.\n * The default value is 'primary'.\n * @value 'primary'\n * @value 'secondary'\n * @value 'warning'\n * @default 'primary'\n */\n color?: 'primary' | 'secondary' | 'warning';\n /**\n * variant is optional.\n * @value 'link'\n * @value 'button'\n * @default 'button'\n */\n variant?: 'link' | 'button';\n /**\n * dense is optional.\n * @value true Button will be dense.\n * @value false\n * @default false\n */\n dense?: boolean;\n}\n/**\n * Use the Button component to help users carry out an action.\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function Button(\n {\n color = 'primary',\n variant = 'button',\n dense,\n disabled,\n printHidden = true,\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"button\"\n disabled={disabled}\n printHidden={printHidden}\n ref={ref}\n className={clsx(className, {\n 'ds-link': variant === 'link',\n 'ds-link-warning': variant === 'link' && color === 'warning',\n 'ds-btn': variant === 'button',\n 'ds-btn--dense': dense,\n 'ds-btn-primary': variant === 'button' && color === 'primary',\n 'ds-btn-secondary': variant === 'button' && color === 'secondary',\n 'ds-btn-warning': variant === 'button' && color === 'warning',\n 'ds-btn--disabled': variant === 'button' && disabled,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Button;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAiCzB,MAAM,SAAS,MAAM;AAAA,EAC1B,SAASA,QACP;AAAA,IACE,QAAQ;AAAA,IACR,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,WAAW,YAAY;AAAA,UACvB,mBAAmB,YAAY,UAAU,UAAU;AAAA,UACnD,UAAU,YAAY;AAAA,UACtB,iBAAiB;AAAA,UACjB,kBAAkB,YAAY,YAAY,UAAU;AAAA,UACpD,oBAAoB,YAAY,YAAY,UAAU;AAAA,UACtD,kBAAkB,YAAY,YAAY,UAAU;AAAA,UACpD,oBAAoB,YAAY,YAAY;AAAA,QAC9C,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,iBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface ButtonProps extends BaseProps<'button'> {\n /**\n * color is optional.\n * 'primary' color is used for the main call to action on a page.\n * 'secondary' color is used for secondary calls to action on a page.\n * 'warning' color is used to make users think carefully before they use them.\n * The default value is 'primary'.\n * @value 'primary'\n * @value 'secondary'\n * @value 'warning'\n * @default 'primary'\n */\n color?: 'primary' | 'secondary' | 'warning';\n /**\n * variant is optional.\n * @value 'link'\n * @value 'button'\n * @default 'button'\n */\n variant?: 'link' | 'button';\n /**\n * dense is optional.\n * @value true Button will be dense.\n * @value false\n * @default false\n */\n dense?: boolean;\n}\n/**\n * Use the Button component to help users carry out an action.\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function Button(\n {\n color = 'primary',\n variant = 'button',\n dense,\n disabled,\n printHidden = true,\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"button\"\n disabled={disabled}\n printHidden={printHidden}\n ref={ref}\n className={clsx(className, {\n 'ds-link': variant === 'link',\n 'ds-link-warning': variant === 'link' && color === 'warning',\n 'ds-link--disabled': variant === 'link' && disabled,\n 'ds-btn': variant === 'button',\n 'ds-btn--dense': dense,\n 'ds-btn-primary': variant === 'button' && color === 'primary',\n 'ds-btn-secondary': variant === 'button' && color === 'secondary',\n 'ds-btn-warning': variant === 'button' && color === 'warning',\n 'ds-btn--disabled': variant === 'button' && disabled,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Button;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAiCzB,MAAM,SAAS,MAAM;AAAA,EAC1B,SAASA,QACP;AAAA,IACE,QAAQ;AAAA,IACR,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,WAAW,YAAY;AAAA,UACvB,mBAAmB,YAAY,UAAU,UAAU;AAAA,UACnD,qBAAqB,YAAY,UAAU;AAAA,UAC3C,UAAU,YAAY;AAAA,UACtB,iBAAiB;AAAA,UACjB,kBAAkB,YAAY,YAAY,UAAU;AAAA,UACpD,oBAAoB,YAAY,YAAY,UAAU;AAAA,UACtD,kBAAkB,YAAY,YAAY,UAAU;AAAA,UACpD,oBAAoB,YAAY,YAAY;AAAA,QAC9C,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,iBAAQ;",
6
6
  "names": ["Button"]
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
- export interface CircularProgressProps extends BaseProps<'svg'> {
3
+ export interface CircularProgressBaseProps extends BaseProps<'svg'> {
4
4
  /**
5
5
  * color prop is optional.
6
6
  * color prop is used to change the color of the loader.
@@ -20,8 +20,8 @@ export interface CircularProgressProps extends BaseProps<'svg'> {
20
20
  size?: 'sm' | 'md' | 'lg';
21
21
  }
22
22
  /**
23
- * Use CircularProgress component as an animated loader.
24
- * CircularProgress can be used inside LoaderContainer component.
23
+ * Use CircularProgressBase component as an animated loader.
24
+ * CircularProgressBase can be used inside LoaderContainer component.
25
25
  */
26
- export declare const CircularProgress: React.ForwardRefExoticComponent<Omit<CircularProgressProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
27
- export default CircularProgress;
26
+ export declare const CircularProgressBase: React.ForwardRefExoticComponent<Omit<CircularProgressBaseProps, "ref"> & React.RefAttributes<SVGElement>>;
27
+ export default CircularProgressBase;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
- const CircularProgress = React.forwardRef(function CircularProgress2({ color = "primary", size = "md", className, ...props }, ref) {
4
+ const CircularProgressBase = React.forwardRef(function CircularProgress({ color = "primary", size = "md", className, ...props }, ref) {
5
5
  return /* @__PURE__ */ React.createElement(
6
6
  Base,
7
7
  {
@@ -35,9 +35,9 @@ const CircularProgress = React.forwardRef(function CircularProgress2({ color = "
35
35
  )
36
36
  );
37
37
  });
38
- var CircularProgress_default = CircularProgress;
38
+ var CircularProgressBase_default = CircularProgressBase;
39
39
  export {
40
- CircularProgress,
41
- CircularProgress_default as default
40
+ CircularProgressBase,
41
+ CircularProgressBase_default as default
42
42
  };
43
43
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/CircularProgressBase/index.tsx"],
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CircularProgressBaseProps extends BaseProps<'svg'> {\n /**\n * color prop is optional.\n * color prop is used to change the color of the loader.\n * @value 'primary' is the default color.\n * @value 'secondary' recommended for dark backgrounds.\n * @default 'primary'\n */\n color?: 'primary' | 'secondary';\n /**\n * size prop is optional.\n * size prop is used to change the size of the loader.\n * @value 'sm'\n * @value 'md'\n * @value 'lg'\n * @default 'md'\n */\n size?: 'sm' | 'md' | 'lg';\n}\n/**\n * Use CircularProgressBase component as an animated loader.\n * CircularProgressBase can be used inside LoaderContainer component.\n */\nexport const CircularProgressBase = React.forwardRef<\n SVGElement,\n CircularProgressBaseProps\n>(function CircularProgress(\n { color = 'primary', size = 'md', className, ...props },\n ref\n) {\n return (\n <Base\n as=\"svg\"\n ref={ref}\n className={clsx(className, {\n 'ds-circular-progress': true,\n 'ds-circular-progress--secondary': color === 'secondary',\n 'ds-circular-progress--sm': size === 'sm',\n 'ds-circular-progress--md': size === 'md',\n 'ds-circular-progress--lg': size === 'lg',\n })}\n focusable=\"false\"\n viewBox=\"0 0 200 200\"\n aria-hidden=\"true\"\n {...props}\n >\n <path\n className=\"ds-circular-progress__circle ds-circular-progress__circle--1\"\n d=\"M26,99.551C26,55.478,60.246,27.5,99.85,27.5S174,55.478,174,99.551,139.455,172.5,99.85,172.5C60.273,172.473,26,143.6,26,99.551Z\"\n />\n <path\n className=\"ds-circular-progress__circle ds-circular-progress__circle--2\"\n d=\"M26,99.551C26,55.478,60.246,27.5,99.85,27.5S174,55.478,174,99.551,139.455,172.5,99.85,172.5C60.273,172.473,26,143.6,26,99.551Z\"\n />\n </Base>\n );\n});\n\nexport default CircularProgressBase;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAyBzB,MAAM,uBAAuB,MAAM,WAGxC,SAAS,iBACT,EAAE,QAAQ,WAAW,OAAO,MAAM,WAAW,GAAG,MAAM,GACtD,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,wBAAwB;AAAA,QACxB,mCAAmC,UAAU;AAAA,QAC7C,4BAA4B,SAAS;AAAA,QACrC,4BAA4B,SAAS;AAAA,QACrC,4BAA4B,SAAS;AAAA,MACvC,CAAC;AAAA,MACD,WAAU;AAAA,MACV,SAAQ;AAAA,MACR,eAAY;AAAA,MACX,GAAG;AAAA;AAAA,IAEJ;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,GAAE;AAAA;AAAA,IACJ;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,GAAE;AAAA;AAAA,IACJ;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,+BAAQ;",
6
+ "names": []
7
+ }
@@ -2,5 +2,5 @@
2
2
  "sideEffects": false,
3
3
  "module": "./index.js",
4
4
  "types": "./index.d.ts",
5
- "main": "../cjs/CircularProgress/index.js"
5
+ "main": "../cjs/CircularProgressBase/index.js"
6
6
  }
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface DetailsContentProps extends BaseProps<'div'> {
4
+ color?: 'primary' | 'secondary';
4
5
  }
5
6
  /**
6
7
  *DetailsContent component wraps the content text.
@@ -1,14 +1,15 @@
1
1
  import React from "react";
2
2
  import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
- const DetailsContent = React.forwardRef(function DetailsContent2({ className, children, ...props }, ref) {
4
+ const DetailsContent = React.forwardRef(function DetailsContent2({ color, className, children, ...props }, ref) {
5
5
  return /* @__PURE__ */ React.createElement(
6
6
  Base,
7
7
  {
8
8
  as: "div",
9
9
  ref,
10
10
  className: clsx(className, {
11
- "ds-details__content": true
11
+ "ds-details__content": true,
12
+ "ds-details__content--secondary": color === "secondary"
12
13
  }),
13
14
  ...props
14
15
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/DetailsContent/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface DetailsContentProps extends BaseProps<'div'> {}\n/**\n *DetailsContent component wraps the content text.\n *It is used inside Details component as children\n */\nexport const DetailsContent = React.forwardRef<\n HTMLDivElement,\n DetailsContentProps\n>(function DetailsContent({ className, children, ...props }, ref) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-details__content': true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default DetailsContent;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAOzB,MAAM,iBAAiB,MAAM,WAGlC,SAASA,gBAAe,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AAChE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,uBAAuB;AAAA,MACzB,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,yBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface DetailsContentProps extends BaseProps<'div'> {\n /*\n ** color is optional. Default value is 'primary'.\n * @value 'primary'\n * @value 'secondary'\n * @default 'primary'\n * */\n color?: 'primary' | 'secondary';\n}\n/**\n *DetailsContent component wraps the content text.\n *It is used inside Details component as children\n */\nexport const DetailsContent = React.forwardRef<\n HTMLDivElement,\n DetailsContentProps\n>(function DetailsContent({ color, className, children, ...props }, ref) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-details__content': true,\n 'ds-details__content--secondary': color === 'secondary',\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default DetailsContent;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAezB,MAAM,iBAAiB,MAAM,WAGlC,SAASA,gBAAe,EAAE,OAAO,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AACvE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,uBAAuB;AAAA,QACvB,kCAAkC,UAAU;AAAA,MAC9C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,yBAAQ;",
6
6
  "names": ["DetailsContent"]
7
7
  }
package/Grid/index.d.ts CHANGED
@@ -30,13 +30,7 @@ export interface GridProps extends BaseProps<'div' | 'aside' | 'main'> {
30
30
  inline?: boolean;
31
31
  /**
32
32
  * Defines the space between the type item components. It can only be used on a type container component.
33
- * @value 1
34
- * @value 2
35
- * @value 4
36
- * @value 6
37
- * @value 8
38
- * @value 10
39
- * @value 12
33
+ * @value 1 - 12
40
34
  * @value object
41
35
  * @default undefined
42
36
  */
package/Grid/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Grid/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\ntype GridValues = 'auto' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\ntype SpacingValues = 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 11 | 12;\ninterface SpacingMediaValues {\n xs?: SpacingValues;\n sm?: SpacingValues;\n md?: SpacingValues;\n lg?: SpacingValues;\n xl?: SpacingValues;\n}\nexport interface GridProps extends BaseProps<'div' | 'aside' | 'main'> {\n /**\n * If true, the component will have the flex container behavior. You should be wrapping items with a container.\n * @value true\n * @value false\n * @default false\n */\n container?: boolean;\n /**\n * @value true\n * @value false\n * @default true\n */\n item?: boolean;\n /**\n * @value true\n * @value false\n */\n inline?: boolean;\n /**\n * Defines the space between the type item components. It can only be used on a type container component.\n * @value 1\n * @value 2\n * @value 4\n * @value 6\n * @value 8\n * @value 10\n * @value 12\n * @value object\n * @default undefined\n */\n spacing?: SpacingValues | SpacingMediaValues;\n\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for all the screen sizes with the lowest priority.\n */\n xs?: GridValues;\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for the sm breakpoint and wider screens if not overridden.\n */\n sm?: GridValues;\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for the md breakpoint and wider screens if not overridden.\n */\n md?: GridValues;\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for the lg breakpoint and wider screens if not overridden.\n */\n lg?: GridValues;\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for the xl breakpoint and wider screens.\n */\n xl?: GridValues;\n}\n/**\n * Grid is used to arrange other components in complex grid configurations of rows and columns.\n */\nexport const Grid = React.forwardRef<HTMLElement, GridProps>(function Grid(\n {\n className,\n children,\n container = false,\n item = true,\n spacing,\n inline,\n xs,\n sm,\n md,\n lg,\n xl,\n as,\n ...props\n },\n ref\n) {\n return (\n <Base\n as={as || 'div'}\n ref={ref}\n className={clsx(className, {\n 'ds-grid': container,\n 'ds-grid-item': item,\n 'ds-grid-inline': container && inline,\n [`ds-gap-${spacing}`]: container && typeof spacing === 'number',\n [`ds-gap-xs-${(spacing as SpacingMediaValues)?.xs}`]:\n container && (spacing as SpacingMediaValues)?.xs !== undefined,\n [`ds-gap-sm-${(spacing as SpacingMediaValues)?.sm}`]:\n container && (spacing as SpacingMediaValues)?.sm !== undefined,\n [`ds-gap-md-${(spacing as SpacingMediaValues)?.md}`]:\n container && (spacing as SpacingMediaValues)?.md !== undefined,\n [`ds-gap-lg-${(spacing as SpacingMediaValues)?.lg}`]:\n container && (spacing as SpacingMediaValues)?.lg !== undefined,\n [`ds-gap-xl-${(spacing as SpacingMediaValues)?.xl}`]:\n container && (spacing as SpacingMediaValues)?.xl !== undefined,\n [`xs:ds-grid__col-span-${xs}`]: item && xs !== undefined,\n [`sm:ds-grid__col-span-${sm}`]: item && sm !== undefined,\n [`md:ds-grid__col-span-${md}`]: item && md !== undefined,\n [`lg:ds-grid__col-span-${lg}`]: item && lg !== undefined,\n [`xl:ds-grid__col-span-${xl}`]: item && xl !== undefined,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default Grid;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAwFzB,MAAM,OAAO,MAAM,WAAmC,SAASA,MACpE;AAAA,EACE;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI,MAAM;AAAA,MACV;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,WAAW;AAAA,QACX,gBAAgB;AAAA,QAChB,kBAAkB,aAAa;AAAA,QAC/B,CAAC,UAAU,OAAO,EAAE,GAAG,aAAa,OAAO,YAAY;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,QAC/C,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,QAC/C,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,QAC/C,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,QAC/C,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,MACjD,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,eAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\ntype GridValues = 'auto' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\ntype SpacingValues = 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 11 | 12;\ninterface SpacingMediaValues {\n xs?: SpacingValues;\n sm?: SpacingValues;\n md?: SpacingValues;\n lg?: SpacingValues;\n xl?: SpacingValues;\n}\nexport interface GridProps extends BaseProps<'div' | 'aside' | 'main'> {\n /**\n * If true, the component will have the flex container behavior. You should be wrapping items with a container.\n * @value true\n * @value false\n * @default false\n */\n container?: boolean;\n /**\n * @value true\n * @value false\n * @default true\n */\n item?: boolean;\n /**\n * @value true\n * @value false\n */\n inline?: boolean;\n /**\n * Defines the space between the type item components. It can only be used on a type container component.\n * @value 1 - 12\n * @value object\n * @default undefined\n */\n spacing?: SpacingValues | SpacingMediaValues;\n\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for all the screen sizes with the lowest priority.\n */\n xs?: GridValues;\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for the sm breakpoint and wider screens if not overridden.\n */\n sm?: GridValues;\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for the md breakpoint and wider screens if not overridden.\n */\n md?: GridValues;\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for the lg breakpoint and wider screens if not overridden.\n */\n lg?: GridValues;\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12).\n * If 'auto', the grid item's width matches its content.\n * If it's not set, the prop is ignored.\n * The value is applied for the xl breakpoint and wider screens.\n */\n xl?: GridValues;\n}\n/**\n * Grid is used to arrange other components in complex grid configurations of rows and columns.\n */\nexport const Grid = React.forwardRef<HTMLElement, GridProps>(function Grid(\n {\n className,\n children,\n container = false,\n item = true,\n spacing,\n inline,\n xs,\n sm,\n md,\n lg,\n xl,\n as,\n ...props\n },\n ref\n) {\n return (\n <Base\n as={as || 'div'}\n ref={ref}\n className={clsx(className, {\n 'ds-grid': container,\n 'ds-grid-item': item,\n 'ds-grid-inline': container && inline,\n [`ds-gap-${spacing}`]: container && typeof spacing === 'number',\n [`ds-gap-xs-${(spacing as SpacingMediaValues)?.xs}`]:\n container && (spacing as SpacingMediaValues)?.xs !== undefined,\n [`ds-gap-sm-${(spacing as SpacingMediaValues)?.sm}`]:\n container && (spacing as SpacingMediaValues)?.sm !== undefined,\n [`ds-gap-md-${(spacing as SpacingMediaValues)?.md}`]:\n container && (spacing as SpacingMediaValues)?.md !== undefined,\n [`ds-gap-lg-${(spacing as SpacingMediaValues)?.lg}`]:\n container && (spacing as SpacingMediaValues)?.lg !== undefined,\n [`ds-gap-xl-${(spacing as SpacingMediaValues)?.xl}`]:\n container && (spacing as SpacingMediaValues)?.xl !== undefined,\n [`xs:ds-grid__col-span-${xs}`]: item && xs !== undefined,\n [`sm:ds-grid__col-span-${sm}`]: item && sm !== undefined,\n [`md:ds-grid__col-span-${md}`]: item && md !== undefined,\n [`lg:ds-grid__col-span-${lg}`]: item && lg !== undefined,\n [`xl:ds-grid__col-span-${xl}`]: item && xl !== undefined,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default Grid;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAkFzB,MAAM,OAAO,MAAM,WAAmC,SAASA,MACpE;AAAA,EACE;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI,MAAM;AAAA,MACV;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,WAAW;AAAA,QACX,gBAAgB;AAAA,QAChB,kBAAkB,aAAa;AAAA,QAC/B,CAAC,UAAU,OAAO,EAAE,GAAG,aAAa,OAAO,YAAY;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,aAAc,SAAgC,EAAE,EAAE,GACjD,aAAc,SAAgC,OAAO;AAAA,QACvD,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,QAC/C,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,QAC/C,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,QAC/C,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,QAC/C,CAAC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,OAAO;AAAA,MACjD,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,eAAQ;",
6
6
  "names": ["Grid"]
7
7
  }
package/LinkBase/index.js CHANGED
@@ -12,6 +12,7 @@ const LinkBase = React.forwardRef(
12
12
  "ds-link": defaultStyle,
13
13
  "ds-link--no-underline": !underline
14
14
  }),
15
+ ...props.as && { defaultStyle, underline },
15
16
  ...props
16
17
  },
17
18
  children
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/LinkBase/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface LinkBaseProps extends BaseProps<'a'> {\n /**\n * underline is optional. The default value is 'true'.\n * Make it 'false' only if the context tells the user that the text is a link, even without the underline.\n * @value true\n * @value false\n */\n underline?: boolean;\n /**\n * defaultStyle is optional. The default value is 'true'.\n * Make it 'false' only if you need to use a link with different style, and the default style clashes over with your\n * custom styles. For example, BreadcrumbsListItem is a link but it has a different styling.\n * @value true\n * @value false\n */\n defaultStyle?: boolean;\n}\n/**\n * This component defines a hyperlink, which is used to link from one page to another.\n */\nexport const LinkBase = React.forwardRef<HTMLAnchorElement, LinkBaseProps>(\n function LinkBase(\n { underline = true, defaultStyle = true, className, children, ...props },\n ref\n ) {\n return (\n <Base\n as=\"a\"\n ref={ref}\n className={clsx(className, {\n 'ds-link': defaultStyle,\n 'ds-link--no-underline': !underline,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default LinkBase;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAsBzB,MAAM,WAAW,MAAM;AAAA,EAC5B,SAASA,UACP,EAAE,YAAY,MAAM,eAAe,MAAM,WAAW,UAAU,GAAG,MAAM,GACvE,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,WAAW;AAAA,UACX,yBAAyB,CAAC;AAAA,QAC5B,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface LinkBaseProps extends BaseProps<'a'> {\n /**\n * underline is optional. The default value is 'true'.\n * Make it 'false' only if the context tells the user that the text is a link, even without the underline.\n * @value true\n * @value false\n */\n underline?: boolean;\n /**\n * defaultStyle is optional. The default value is 'true'.\n * Make it 'false' only if you need to use a link with different style, and the default style clashes over with your\n * custom styles. For example, BreadcrumbsListItem is a link but it has a different styling.\n * @value true\n * @value false\n */\n defaultStyle?: boolean;\n}\n/**\n * This component defines a hyperlink, which is used to link from one page to another.\n */\nexport const LinkBase = React.forwardRef<HTMLAnchorElement, LinkBaseProps>(\n function LinkBase(\n { underline = true, defaultStyle = true, className, children, ...props },\n ref\n ) {\n return (\n <Base\n as=\"a\"\n ref={ref}\n className={clsx(className, {\n 'ds-link': defaultStyle,\n 'ds-link--no-underline': !underline,\n })}\n {...(props.as && { defaultStyle: defaultStyle, underline: underline })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default LinkBase;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAsBzB,MAAM,WAAW,MAAM;AAAA,EAC5B,SAASA,UACP,EAAE,YAAY,MAAM,eAAe,MAAM,WAAW,UAAU,GAAG,MAAM,GACvE,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,WAAW;AAAA,UACX,yBAAyB,CAAC;AAAA,QAC5B,CAAC;AAAA,QACA,GAAI,MAAM,MAAM,EAAE,cAA4B,UAAqB;AAAA,QACnE,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ;",
6
6
  "names": ["LinkBase"]
7
7
  }
@@ -3,7 +3,7 @@ import NavListItemActionContainer from "@digigov/react-core/NavListItemActionCon
3
3
  import NavListItemBadge from "@digigov/react-core/NavListItemBadge";
4
4
  import NavListItemButton from "@digigov/react-core/NavListItemButton";
5
5
  import NavListItemLinkBase from "@digigov/react-core/NavListItemLinkBase";
6
- const NavListItemActionBase = React.forwardRef(function NavListItemActionBase2({ label, arrow = false, href, className, children, ...props }, ref) {
6
+ const NavListItemActionBase = React.forwardRef(function NavListItemActionBase2({ label, arrow = false, href, className, children, badgeText, ...props }, ref) {
7
7
  return /* @__PURE__ */ React.createElement(NavListItemActionContainer, null, href ? /* @__PURE__ */ React.createElement(
8
8
  NavListItemLinkBase,
9
9
  {
@@ -22,7 +22,7 @@ const NavListItemActionBase = React.forwardRef(function NavListItemActionBase2({
22
22
  ref
23
23
  },
24
24
  children || label
25
- ), props.badgeText && /* @__PURE__ */ React.createElement(NavListItemBadge, { text: props.badgeText }));
25
+ ), badgeText && /* @__PURE__ */ React.createElement(NavListItemBadge, { text: badgeText }));
26
26
  });
27
27
  var NavListItemActionBase_default = NavListItemActionBase;
28
28
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/NavListItemActionBase/index.tsx"],
4
- "sourcesContent": ["import React, { ForwardedRef } from 'react';\nimport NavListItemActionContainer from '@digigov/react-core/NavListItemActionContainer';\nimport NavListItemBadge from '@digigov/react-core/NavListItemBadge';\nimport NavListItemButton, {\n NavListItemButtonProps,\n} from '@digigov/react-core/NavListItemButton';\nimport NavListItemLinkBase, {\n NavListItemLinkBaseProps,\n} from '@digigov/react-core/NavListItemLinkBase';\n\nexport type LinkButtonJoinProps = NavListItemLinkBaseProps &\n NavListItemButtonProps;\nexport interface NavListItemActionBaseProps extends LinkButtonJoinProps {\n /**\n * label is optional.\n * The label for the NavListItemActionBase.\n */\n label?: string;\n\n /**\n * arrow is optional.\n * use arrow prop if you want to have arrow at the nav list item.\n * @value true\n * @value false\n * @default false\n */\n arrow?: boolean;\n badgeText?: string;\n}\n/**\n * NavListItemAction must be inside the NavList.\n * This component has a items of NavListItemLink component inside.\n */\nexport const NavListItemActionBase = React.forwardRef<\n HTMLButtonElement | HTMLAnchorElement,\n NavListItemActionBaseProps\n>(function NavListItemActionBase(\n { label, arrow = false, href, className, children, ...props },\n ref\n) {\n return (\n <NavListItemActionContainer>\n {href ? (\n <NavListItemLinkBase\n {...props}\n href={href}\n className={className}\n ref={ref as ForwardedRef<HTMLAnchorElement>}\n >\n {children || label}\n </NavListItemLinkBase>\n ) : (\n <NavListItemButton\n {...props}\n arrow={arrow}\n className={className}\n ref={ref as ForwardedRef<HTMLButtonElement>}\n >\n {children || label}\n </NavListItemButton>\n )}\n {props.badgeText && <NavListItemBadge text={props.badgeText} />}\n </NavListItemActionContainer>\n );\n});\n\nexport default NavListItemActionBase;\n"],
5
- "mappings": "AAAA,OAAO,WAA6B;AACpC,OAAO,gCAAgC;AACvC,OAAO,sBAAsB;AAC7B,OAAO,uBAEA;AACP,OAAO,yBAEA;AAyBA,MAAM,wBAAwB,MAAM,WAGzC,SAASA,uBACT,EAAE,OAAO,QAAQ,OAAO,MAAM,WAAW,UAAU,GAAG,MAAM,GAC5D,KACA;AACA,SACE,oCAAC,kCACE,OACC;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC,YAAY;AAAA,EACf,IAEA;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC,YAAY;AAAA,EACf,GAED,MAAM,aAAa,oCAAC,oBAAiB,MAAM,MAAM,WAAW,CAC/D;AAEJ,CAAC;AAED,IAAO,gCAAQ;",
4
+ "sourcesContent": ["import React, { ForwardedRef } from 'react';\nimport NavListItemActionContainer from '@digigov/react-core/NavListItemActionContainer';\nimport NavListItemBadge from '@digigov/react-core/NavListItemBadge';\nimport NavListItemButton, {\n NavListItemButtonProps,\n} from '@digigov/react-core/NavListItemButton';\nimport NavListItemLinkBase, {\n NavListItemLinkBaseProps,\n} from '@digigov/react-core/NavListItemLinkBase';\n\nexport type LinkButtonJoinProps = NavListItemLinkBaseProps &\n NavListItemButtonProps;\nexport interface NavListItemActionBaseProps extends LinkButtonJoinProps {\n /**\n * label is optional.\n * The label for the NavListItemActionBase.\n */\n label?: string;\n\n /**\n * arrow is optional.\n * use arrow prop if you want to have arrow at the nav list item.\n * @value true\n * @value false\n * @default false\n */\n arrow?: boolean;\n badgeText?: string;\n}\n/**\n * NavListItemAction must be inside the NavList.\n * This component has a items of NavListItemLink component inside.\n */\nexport const NavListItemActionBase = React.forwardRef<\n HTMLButtonElement | HTMLAnchorElement,\n NavListItemActionBaseProps\n>(function NavListItemActionBase(\n { label, arrow = false, href, className, children, badgeText, ...props },\n ref\n) {\n return (\n <NavListItemActionContainer>\n {href ? (\n <NavListItemLinkBase\n {...props}\n href={href}\n className={className}\n ref={ref as ForwardedRef<HTMLAnchorElement>}\n >\n {children || label}\n </NavListItemLinkBase>\n ) : (\n <NavListItemButton\n {...props}\n arrow={arrow}\n className={className}\n ref={ref as ForwardedRef<HTMLButtonElement>}\n >\n {children || label}\n </NavListItemButton>\n )}\n {badgeText && <NavListItemBadge text={badgeText} />}\n </NavListItemActionContainer>\n );\n});\n\nexport default NavListItemActionBase;\n"],
5
+ "mappings": "AAAA,OAAO,WAA6B;AACpC,OAAO,gCAAgC;AACvC,OAAO,sBAAsB;AAC7B,OAAO,uBAEA;AACP,OAAO,yBAEA;AAyBA,MAAM,wBAAwB,MAAM,WAGzC,SAASA,uBACT,EAAE,OAAO,QAAQ,OAAO,MAAM,WAAW,UAAU,WAAW,GAAG,MAAM,GACvE,KACA;AACA,SACE,oCAAC,kCACE,OACC;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC,YAAY;AAAA,EACf,IAEA;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC,YAAY;AAAA,EACf,GAED,aAAa,oCAAC,oBAAiB,MAAM,WAAW,CACnD;AAEJ,CAAC;AAED,IAAO,gCAAQ;",
6
6
  "names": ["NavListItemActionBase"]
7
7
  }
@@ -4,7 +4,7 @@ export interface SummaryListProps extends BaseProps<'dl'> {
4
4
  /**
5
5
  * border is optional.
6
6
  * By default, SummaryList has borders. You can remove borders by using border prop.
7
- * By default is true
7
+ * By default is true.
8
8
  * @value true
9
9
  * @value false
10
10
  * @default true
@@ -13,12 +13,20 @@ export interface SummaryListProps extends BaseProps<'dl'> {
13
13
  /**
14
14
  * noLastBorder is optional.
15
15
  * By default, SummaryList has borders. You can remove last border by using noLastBorder prop.
16
- * By default is true
16
+ * By default is false.
17
17
  * @value true
18
18
  * @value false
19
19
  * @default false
20
20
  */
21
21
  noLastBorder?: boolean;
22
+ /**
23
+ * error is optional.
24
+ * If true, the SummaryList will be styled to indicate an error state.
25
+ * @value true
26
+ * @value false
27
+ * @default false
28
+ */
29
+ error?: boolean;
22
30
  }
23
31
  /**
24
32
  * SummaryList used as a table with summary information.
@@ -2,7 +2,14 @@ import React from "react";
2
2
  import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
4
  const SummaryList = React.forwardRef(
5
- function SummaryList2({ className, noLastBorder = false, border = true, children, ...props }, ref) {
5
+ function SummaryList2({
6
+ border = true,
7
+ noLastBorder = false,
8
+ error = false,
9
+ className,
10
+ children,
11
+ ...props
12
+ }, ref) {
6
13
  return /* @__PURE__ */ React.createElement(
7
14
  Base,
8
15
  {
@@ -11,7 +18,8 @@ const SummaryList = React.forwardRef(
11
18
  className: clsx(className, {
12
19
  "ds-summary-list": true,
13
20
  "ds-summary-list--no-border": !border,
14
- "ds-summary-list--no-last-border": noLastBorder
21
+ "ds-summary-list--no-last-border": noLastBorder,
22
+ "ds-summary-list--error": error === true
15
23
  }),
16
24
  ...props
17
25
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SummaryList/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListProps extends BaseProps<'dl'> {\n /**\n * border is optional.\n * By default, SummaryList has borders. You can remove borders by using border prop.\n * By default is true\n * @value true\n * @value false\n * @default true\n */\n border?: boolean;\n /**\n * noLastBorder is optional.\n * By default, SummaryList has borders. You can remove last border by using noLastBorder prop.\n * By default is true\n * @value true\n * @value false\n * @default false\n */\n noLastBorder?: boolean;\n}\n/**\n * SummaryList used as a table with summary information.\n * It must contain a list of SummaryListItem components.\n */\nexport const SummaryList = React.forwardRef<HTMLDListElement, SummaryListProps>(\n function SummaryList(\n { className, noLastBorder = false, border = true, children, ...props },\n ref\n ) {\n return (\n <Base\n as=\"dl\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list': true,\n 'ds-summary-list--no-border': !border,\n 'ds-summary-list--no-last-border': noLastBorder,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default SummaryList;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA0BzB,MAAM,cAAc,MAAM;AAAA,EAC/B,SAASA,aACP,EAAE,WAAW,eAAe,OAAO,SAAS,MAAM,UAAU,GAAG,MAAM,GACrE,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,mBAAmB;AAAA,UACnB,8BAA8B,CAAC;AAAA,UAC/B,mCAAmC;AAAA,QACrC,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,sBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListProps extends BaseProps<'dl'> {\n /**\n * border is optional.\n * By default, SummaryList has borders. You can remove borders by using border prop.\n * By default is true.\n * @value true\n * @value false\n * @default true\n */\n border?: boolean;\n /**\n * noLastBorder is optional.\n * By default, SummaryList has borders. You can remove last border by using noLastBorder prop.\n * By default is false.\n * @value true\n * @value false\n * @default false\n */\n noLastBorder?: boolean;\n\n /**\n * error is optional.\n * If true, the SummaryList will be styled to indicate an error state.\n * @value true\n * @value false\n * @default false\n */\n error?: boolean;\n}\n/**\n * SummaryList used as a table with summary information.\n * It must contain a list of SummaryListItem components.\n */\nexport const SummaryList = React.forwardRef<HTMLDListElement, SummaryListProps>(\n function SummaryList(\n {\n border = true,\n noLastBorder = false,\n error = false,\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"dl\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list': true,\n 'ds-summary-list--no-border': !border,\n 'ds-summary-list--no-last-border': noLastBorder,\n 'ds-summary-list--error': error === true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default SummaryList;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAmCzB,MAAM,cAAc,MAAM;AAAA,EAC/B,SAASA,aACP;AAAA,IACE,SAAS;AAAA,IACT,eAAe;AAAA,IACf,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,mBAAmB;AAAA,UACnB,8BAA8B,CAAC;AAAA,UAC/B,mCAAmC;AAAA,UACnC,0BAA0B,UAAU;AAAA,QACtC,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,sBAAQ;",
6
6
  "names": ["SummaryList"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
- const SummaryListItem = React.forwardRef(function SummaryListItem2({ className, children, border = true, ...props }, ref) {
4
+ const SummaryListItem = React.forwardRef(function SummaryListItem2({ border = true, className, children, ...props }, ref) {
5
5
  return /* @__PURE__ */ React.createElement(
6
6
  Base,
7
7
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SummaryListItem/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListItemProps extends BaseProps<'div'> {\n /**\n * border is optional.\n * By default, SummaryListItem has borders. You can remove borders by using border prop.\n * By default is true\n ** @value true\n * @value false\n * @default true\n */\n border?: boolean;\n}\n/**\n * SummaryListItem must be inside SummaryList component. Each SummaryListItem is a row in the SummaryList table.\n * This component must contain SummaryListItemKey, SummaryListItemValue and SummaryListItemAction, in that order.\n */\nexport const SummaryListItem = React.forwardRef<\n HTMLDivElement,\n SummaryListItemProps\n>(function SummaryListItem(\n { className, children, border = true, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list__row': true,\n 'ds-summary-list__row--no-border': !border,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default SummaryListItem;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAiBzB,MAAM,kBAAkB,MAAM,WAGnC,SAASA,iBACT,EAAE,WAAW,UAAU,SAAS,MAAM,GAAG,MAAM,GAC/C,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,wBAAwB;AAAA,QACxB,mCAAmC,CAAC;AAAA,MACtC,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,0BAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListItemProps extends BaseProps<'div'> {\n /**\n * border is optional.\n * By default, SummaryListItem has borders. You can remove borders by using border prop.\n * By default is true\n ** @value true\n * @value false\n * @default true\n */\n border?: boolean;\n}\n/**\n * SummaryListItem must be inside SummaryList component. Each SummaryListItem is a row in the SummaryList table.\n * This component must contain SummaryListItemKey, SummaryListItemValue and SummaryListItemAction, in that order.\n */\nexport const SummaryListItem = React.forwardRef<\n HTMLDivElement,\n SummaryListItemProps\n>(function SummaryListItem(\n { border = true, className, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list__row': true,\n 'ds-summary-list__row--no-border': !border,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default SummaryListItem;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAiBzB,MAAM,kBAAkB,MAAM,WAGnC,SAASA,iBACT,EAAE,SAAS,MAAM,WAAW,UAAU,GAAG,MAAM,GAC/C,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,wBAAwB;AAAA,QACxB,mCAAmC,CAAC;AAAA,MACtC,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,0BAAQ;",
6
6
  "names": ["SummaryListItem"]
7
7
  }
@@ -14,6 +14,20 @@ export interface SummaryListItemKeyProps extends BaseProps<'dt'> {
14
14
  * lg shows the width of the key column for large screens.
15
15
  */
16
16
  lg?: WidthValues;
17
+ /**
18
+ * error is optional.
19
+ * Use error prop to highlight the SummaryListItemKey when there is an error in the corresponding field.
20
+ * @value true
21
+ * @value false
22
+ * @default false
23
+ */
24
+ error?: boolean;
25
+ /**
26
+ * errorAssistiveText is optional.
27
+ * Default value is "Λανθασμένο πεδίο".
28
+ * errorAssistiveText is used to provide a textual warning for assistive technologies like screen readers.
29
+ */
30
+ errorAssistiveText?: string;
17
31
  }
18
32
  export type WidthValues = 3 | 4 | 5 | 6 | 7 | 8 | 9;
19
33
  /**
@@ -1,7 +1,17 @@
1
1
  import React from "react";
2
2
  import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
- const SummaryListItemKey = React.forwardRef(function SummaryListItemKey2({ sm = 3, md, lg, className, children, ...props }, ref) {
4
+ import VisuallyHidden from "@digigov/react-core/VisuallyHidden";
5
+ const SummaryListItemKey = React.forwardRef(function SummaryListItemKey2({
6
+ sm = 3,
7
+ md,
8
+ lg,
9
+ error,
10
+ errorAssistiveText = "\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF",
11
+ className,
12
+ children,
13
+ ...props
14
+ }, ref) {
5
15
  return /* @__PURE__ */ React.createElement(
6
16
  Base,
7
17
  {
@@ -11,10 +21,12 @@ const SummaryListItemKey = React.forwardRef(function SummaryListItemKey2({ sm =
11
21
  "ds-summary-list__key": true,
12
22
  [`ds-summary-list__key--sm-${sm}`]: sm !== void 0,
13
23
  [`ds-summary-list__key--md-${md}`]: md !== void 0,
14
- [`ds-summary-list__key--lg-${lg}`]: lg !== void 0
24
+ [`ds-summary-list__key--lg-${lg}`]: lg !== void 0,
25
+ "ds-summary-list__key--error": error === true
15
26
  }),
16
27
  ...props
17
28
  },
29
+ error === true && /* @__PURE__ */ React.createElement(VisuallyHidden, null, errorAssistiveText),
18
30
  children
19
31
  );
20
32
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SummaryListItemKey/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListItemKeyProps extends BaseProps<'dt'> {\n /**\n * sm shows the width of the key column for small screens.\n * @default 3\n */\n sm?: WidthValues;\n /**\n * md shows the width of the key column for medium screens.\n */\n md?: WidthValues;\n /**\n * lg shows the width of the key column for large screens.\n */\n lg?: WidthValues;\n}\n\nexport type WidthValues = 3 | 4 | 5 | 6 | 7 | 8 | 9;\n/**\n * SummaryListItemKey is used within the SummaryListItem component.\n * In this column we place the key information for the row (ex. \"Name\", \"Address\", etc).\n */\nexport const SummaryListItemKey = React.forwardRef<\n HTMLElement,\n SummaryListItemKeyProps\n>(function SummaryListItemKey(\n { sm = 3, md, lg, className, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"dt\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list__key': true,\n [`ds-summary-list__key--sm-${sm}`]: sm !== undefined,\n [`ds-summary-list__key--md-${md}`]: md !== undefined,\n [`ds-summary-list__key--lg-${lg}`]: lg !== undefined,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default SummaryListItemKey;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAuBzB,MAAM,qBAAqB,MAAM,WAGtC,SAASA,oBACT,EAAE,KAAK,GAAG,IAAI,IAAI,WAAW,UAAU,GAAG,MAAM,GAChD,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,wBAAwB;AAAA,QACxB,CAAC,4BAA4B,EAAE,EAAE,GAAG,OAAO;AAAA,QAC3C,CAAC,4BAA4B,EAAE,EAAE,GAAG,OAAO;AAAA,QAC3C,CAAC,4BAA4B,EAAE,EAAE,GAAG,OAAO;AAAA,MAC7C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,6BAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport VisuallyHidden from '@digigov/react-core/VisuallyHidden';\n\nexport interface SummaryListItemKeyProps extends BaseProps<'dt'> {\n /**\n * sm shows the width of the key column for small screens.\n * @default 3\n */\n sm?: WidthValues;\n /**\n * md shows the width of the key column for medium screens.\n */\n md?: WidthValues;\n /**\n * lg shows the width of the key column for large screens.\n */\n lg?: WidthValues;\n\n /**\n * error is optional.\n * Use error prop to highlight the SummaryListItemKey when there is an error in the corresponding field.\n * @value true\n * @value false\n * @default false\n */\n\n error?: boolean;\n /**\n * errorAssistiveText is optional.\n * Default value is \"\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF\".\n * errorAssistiveText is used to provide a textual warning for assistive technologies like screen readers.\n */\n errorAssistiveText?: string;\n}\n\nexport type WidthValues = 3 | 4 | 5 | 6 | 7 | 8 | 9;\n/**\n * SummaryListItemKey is used within the SummaryListItem component.\n * In this column we place the key information for the row (ex. \"Name\", \"Address\", etc).\n */\nexport const SummaryListItemKey = React.forwardRef<\n HTMLElement,\n SummaryListItemKeyProps\n>(function SummaryListItemKey(\n {\n sm = 3,\n md,\n lg,\n error,\n errorAssistiveText = '\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF',\n className,\n children,\n ...props\n },\n ref\n) {\n return (\n <Base\n as=\"dt\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list__key': true,\n [`ds-summary-list__key--sm-${sm}`]: sm !== undefined,\n [`ds-summary-list__key--md-${md}`]: md !== undefined,\n [`ds-summary-list__key--lg-${lg}`]: lg !== undefined,\n 'ds-summary-list__key--error': error === true,\n })}\n {...props}\n >\n {error === true && <VisuallyHidden>{errorAssistiveText}</VisuallyHidden>}\n {children}\n </Base>\n );\n});\n\nexport default SummaryListItemKey;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,OAAO,oBAAoB;AAuCpB,MAAM,qBAAqB,MAAM,WAGtC,SAASA,oBACT;AAAA,EACE,KAAK;AAAA,EACL;AAAA,EACA;AAAA,EACA;AAAA,EACA,qBAAqB;AAAA,EACrB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,wBAAwB;AAAA,QACxB,CAAC,4BAA4B,EAAE,EAAE,GAAG,OAAO;AAAA,QAC3C,CAAC,4BAA4B,EAAE,EAAE,GAAG,OAAO;AAAA,QAC3C,CAAC,4BAA4B,EAAE,EAAE,GAAG,OAAO;AAAA,QAC3C,+BAA+B,UAAU;AAAA,MAC3C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH,UAAU,QAAQ,oCAAC,sBAAgB,kBAAmB;AAAA,IACtD;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,6BAAQ;",
6
6
  "names": ["SummaryListItemKey"]
7
7
  }
@@ -1,6 +1,20 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface SummaryListItemValueProps extends BaseProps<'dd'> {
4
+ /**
5
+ * error is optional.
6
+ * Use error prop to highlight the SummaryListItemKey when there is an error in the corresponding field.
7
+ * @value true
8
+ * @value false
9
+ * @default false
10
+ */
11
+ error?: boolean;
12
+ /**
13
+ * errorAssistiveText is optional.
14
+ * Default value is "Λανθασμένο πεδίο".
15
+ * errorAssistiveText is used to provide a textual warning for assistive technologies like screen readers.
16
+ */
17
+ errorAssistiveText?: string;
4
18
  }
5
19
  /**
6
20
  * Details for the SummaryListItemValue.
@@ -1,17 +1,26 @@
1
1
  import React from "react";
2
2
  import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
- const SummaryListItemValue = React.forwardRef(function SummaryListItemValue2({ className, children, ...props }, ref) {
4
+ import VisuallyHidden from "@digigov/react-core/VisuallyHidden";
5
+ const SummaryListItemValue = React.forwardRef(function SummaryListItemValue2({
6
+ error,
7
+ errorAssistiveText = "\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF",
8
+ className,
9
+ children,
10
+ ...props
11
+ }, ref) {
5
12
  return /* @__PURE__ */ React.createElement(
6
13
  Base,
7
14
  {
8
15
  as: "dd",
9
16
  ref,
10
17
  className: clsx(className, {
11
- "ds-summary-list__value": true
18
+ "ds-summary-list__value": true,
19
+ "ds-summary-list__value--error": error === true
12
20
  }),
13
21
  ...props
14
22
  },
23
+ error === true && /* @__PURE__ */ React.createElement(VisuallyHidden, null, errorAssistiveText),
15
24
  children
16
25
  );
17
26
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SummaryListItemValue/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListItemValueProps extends BaseProps<'dd'> {}\n/**\n * Details for the SummaryListItemValue.\n */\nexport const SummaryListItemValue = React.forwardRef<\n HTMLElement,\n SummaryListItemValueProps\n>(function SummaryListItemValue({ className, children, ...props }, ref) {\n return (\n <Base\n as=\"dd\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list__value': true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default SummaryListItemValue;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAMzB,MAAM,uBAAuB,MAAM,WAGxC,SAASA,sBAAqB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AACtE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,0BAA0B;AAAA,MAC5B,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,+BAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport VisuallyHidden from '@digigov/react-core/VisuallyHidden';\n\nexport interface SummaryListItemValueProps extends BaseProps<'dd'> {\n /**\n * error is optional.\n * Use error prop to highlight the SummaryListItemKey when there is an error in the corresponding field.\n * @value true\n * @value false\n * @default false\n */\n\n error?: boolean;\n /**\n * errorAssistiveText is optional.\n * Default value is \"\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF\".\n * errorAssistiveText is used to provide a textual warning for assistive technologies like screen readers.\n */\n errorAssistiveText?: string;\n}\n/**\n * Details for the SummaryListItemValue.\n */\nexport const SummaryListItemValue = React.forwardRef<\n HTMLElement,\n SummaryListItemValueProps\n>(function SummaryListItemValue(\n {\n error,\n errorAssistiveText = '\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF',\n className,\n children,\n ...props\n },\n ref\n) {\n return (\n <Base\n as=\"dd\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list__value': true,\n 'ds-summary-list__value--error': error === true,\n })}\n {...props}\n >\n {error === true && <VisuallyHidden>{errorAssistiveText}</VisuallyHidden>}\n {children}\n </Base>\n );\n});\n\nexport default SummaryListItemValue;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,OAAO,oBAAoB;AAsBpB,MAAM,uBAAuB,MAAM,WAGxC,SAASA,sBACT;AAAA,EACE;AAAA,EACA,qBAAqB;AAAA,EACrB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,0BAA0B;AAAA,QAC1B,iCAAiC,UAAU;AAAA,MAC7C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH,UAAU,QAAQ,oCAAC,sBAAgB,kBAAmB;AAAA,IACtD;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,+BAAQ;",
6
6
  "names": ["SummaryListItemValue"]
7
7
  }