@digigov/react-core 2.0.0-rc.30 → 2.0.0-rc.32

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 (109) hide show
  1. package/Accordion/index.native.d.ts +1 -5
  2. package/AccordionSection/index.native.d.ts +1 -3
  3. package/Base/compat/Input/CheckboxInput.native.js.map +2 -2
  4. package/Base/compat/Input/RadioInput.native.js.map +2 -2
  5. package/Base/index.native.js.map +2 -2
  6. package/Base/index.web.js.map +1 -1
  7. package/Base/mapping.native.d.ts +1 -1
  8. package/Base/mapping.native.js.map +2 -2
  9. package/Button/index.js +1 -0
  10. package/Button/index.js.map +2 -2
  11. package/{CircularProgress → CircularProgressBase}/index.d.ts +5 -5
  12. package/{CircularProgress → CircularProgressBase}/index.js +4 -4
  13. package/CircularProgressBase/index.js.map +7 -0
  14. package/{CircularProgress → CircularProgressBase}/package.json +1 -1
  15. package/CopyToClipboardMessage/index.native.d.ts +1 -3
  16. package/DateInputItem/index.native.d.ts +1 -3
  17. package/Details/index.native.d.ts +1 -3
  18. package/LinkBase/index.js +1 -0
  19. package/LinkBase/index.js.map +2 -2
  20. package/NavListItemActionContainer/index.native.d.ts +0 -2
  21. package/NotificationBannerLink/index.native.d.ts +1 -3
  22. package/Table/index.d.ts +9 -0
  23. package/Table/index.js +4 -1
  24. package/Table/index.js.map +2 -2
  25. package/TableDataCell/index.d.ts +13 -0
  26. package/TableDataCell/index.js +10 -1
  27. package/TableDataCell/index.js.map +2 -2
  28. package/TextArea/index.native.d.ts +1 -3
  29. package/TextInput/index.native.d.ts +1 -3
  30. package/Typography/index.d.ts +1 -1
  31. package/Typography/index.js +15 -17
  32. package/Typography/index.js.map +2 -2
  33. package/WarningText/index.d.ts +7 -0
  34. package/WarningText/index.js +10 -2
  35. package/WarningText/index.js.map +2 -2
  36. package/cjs/Base/compat/Input/CheckboxInput.native.js.map +2 -2
  37. package/cjs/Base/compat/Input/RadioInput.native.js.map +2 -2
  38. package/cjs/Base/index.native.js.map +2 -2
  39. package/cjs/Base/index.web.js.map +1 -1
  40. package/cjs/Base/mapping.native.js.map +2 -2
  41. package/cjs/Button/index.js +1 -0
  42. package/cjs/Button/index.js.map +2 -2
  43. package/cjs/{CircularProgress → CircularProgressBase}/index.js +8 -8
  44. package/cjs/CircularProgressBase/index.js.map +7 -0
  45. package/cjs/LinkBase/index.js +1 -0
  46. package/cjs/LinkBase/index.js.map +2 -2
  47. package/cjs/Table/index.js +4 -1
  48. package/cjs/Table/index.js.map +2 -2
  49. package/cjs/TableDataCell/index.js +10 -1
  50. package/cjs/TableDataCell/index.js.map +2 -2
  51. package/cjs/Typography/index.js +15 -17
  52. package/cjs/Typography/index.js.map +2 -2
  53. package/cjs/WarningText/index.js +10 -2
  54. package/cjs/WarningText/index.js.map +2 -2
  55. package/cjs/index.js +2 -4
  56. package/cjs/index.js.map +2 -2
  57. package/cjs/lazy/index.js +3 -4
  58. package/cjs/lazy.js.map +2 -2
  59. package/cjs/registry/index.js +40 -42
  60. package/cjs/registry.js.map +2 -2
  61. package/cjs/utils/index.native/index.js +32 -34
  62. package/cjs/utils/index.native.js.map +2 -2
  63. package/index.d.ts +1 -2
  64. package/index.js +2 -3
  65. package/index.js.map +2 -2
  66. package/lazy/index.js +3 -4
  67. package/package.json +5 -5
  68. package/registry/index.js +40 -42
  69. package/src/Base/compat/Input/CheckboxInput.native.tsx +2 -6
  70. package/src/Base/compat/Input/RadioInput.native.tsx +2 -6
  71. package/src/Base/index.native.tsx +2 -2
  72. package/src/Base/index.web.tsx +1 -1
  73. package/src/Base/mapping.native.tsx +1 -1
  74. package/src/Button/index.tsx +1 -0
  75. package/src/Checkbox/__snapshots__/index.test.tsx.snap +0 -5
  76. package/src/CheckboxItem/__snapshots__/index.test.tsx.snap +0 -4
  77. package/src/{CircularProgress → CircularProgressBase}/__snapshots__/index.test.tsx.snap +6 -6
  78. package/src/CircularProgressBase/index.test.tsx +38 -0
  79. package/src/{CircularProgress → CircularProgressBase}/index.tsx +7 -7
  80. package/src/LinkBase/index.tsx +1 -0
  81. package/src/RadioItem/__snapshots__/index.test.tsx.snap +0 -4
  82. package/src/Table/index.tsx +12 -0
  83. package/src/TableDataCell/__snapshots__/index.test.tsx.snap +2 -2
  84. package/src/TableDataCell/index.tsx +23 -1
  85. package/src/Typography/index.tsx +21 -20
  86. package/src/WarningText/__snapshots__/index.test.tsx.snap +26 -0
  87. package/src/WarningText/index.test.tsx +5 -0
  88. package/src/WarningText/index.tsx +17 -2
  89. package/src/index.ts +1 -2
  90. package/src/lazy.js +3 -4
  91. package/src/registry.js +40 -42
  92. package/src/utils/index.native.tsx +56 -54
  93. package/utils/index.native/index.js +32 -34
  94. package/utils/index.native.d.ts +3 -6
  95. package/utils/index.native.js.map +2 -2
  96. package/AutoCompleteInputTypeahead/index.d.ts +0 -11
  97. package/AutoCompleteInputTypeahead/index.js +0 -25
  98. package/AutoCompleteInputTypeahead/index.js.map +0 -7
  99. package/AutoCompleteInputTypeahead/package.json +0 -6
  100. package/CircularProgress/index.js.map +0 -7
  101. package/CircularProgress/index.test.d.ts +0 -1
  102. package/cjs/AutoCompleteInputTypeahead/index.js +0 -58
  103. package/cjs/AutoCompleteInputTypeahead/index.js.map +0 -7
  104. package/cjs/CircularProgress/index.js.map +0 -7
  105. package/src/AutoCompleteInputTypeahead/__snapshots__/index.test.tsx.snap +0 -16
  106. package/src/AutoCompleteInputTypeahead/index.test.tsx +0 -8
  107. package/src/AutoCompleteInputTypeahead/index.tsx +0 -32
  108. package/src/CircularProgress/index.test.tsx +0 -34
  109. /package/{AutoCompleteInputTypeahead → CircularProgressBase}/index.test.d.ts +0 -0
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
2
  import clsx from 'clsx';
3
3
 
4
- type WithClassName<TProps> = TProps & { className?: string };
5
- type PropFactory<TProps> = (props: WithClassName<TProps>) => any;
4
+ type PropFactory<TProps> = (props: TProps) => any;
6
5
 
7
6
  /**
8
7
  * A HOC that transforms the props of the wrapped component before passing them through
@@ -22,12 +21,14 @@ type PropFactory<TProps> = (props: WithClassName<TProps>) => any;
22
21
  */
23
22
  export function extend<TProps, TAdditionalProps>(
24
23
  Component: React.ComponentType<TProps>,
25
- propFactory: PropFactory<TProps & TAdditionalProps> = (props) => props
24
+ propFactory: PropFactory<React.PropsWithoutRef<TProps & TAdditionalProps>> = (
25
+ props
26
+ ) => props
26
27
  ) {
27
- const ExtendedComponent = React.forwardRef(function ExtendedComponent(
28
- props: WithClassName<TProps & TAdditionalProps>,
29
- ref
30
- ) {
28
+ const ExtendedComponent = React.forwardRef<
29
+ unknown,
30
+ TProps & TAdditionalProps
31
+ >(function ExtendedComponent(props, ref) {
31
32
  const transformedProps = propFactory(props);
32
33
 
33
34
  return <Component ref={ref} {...transformedProps} />;
@@ -62,59 +63,60 @@ export function enablePseudoclass<T extends React.ElementType>(
62
63
  Component: T,
63
64
  { self = {}, children = {} }: PseudoclassOptions
64
65
  ) {
65
- return React.forwardRef<React.ElementRef<T>, React.ComponentPropsWithRef<T>>(
66
- function enablePseudoclassComponent(
67
- { className, children: componentChildren, ...props },
68
- ref
69
- ) {
70
- // Handle if children is an array, add the corresponding classnames to the first and last child
71
- if (Array.isArray(componentChildren)) {
72
- return (
73
- <Component ref={ref} {...(props as any)} className={className}>
74
- {componentChildren.map((child, index) => {
75
- return React.cloneElement(child, {
76
- key: index,
77
- className: clsx(
78
- child.props.className,
79
- ...Object.entries(children).map(([key, classNames]) => {
80
- if (index === 0 && key === 'first-child') return classNames;
81
- if (
82
- index === componentChildren.length - 1 &&
83
- key === 'last-child'
84
- )
85
- return classNames;
86
- return '';
87
- })
88
- ),
89
- });
90
- })}
91
- </Component>
92
- );
93
- }
94
- // Handle if children is a single element, add the corresponding classname for empty pseudoclass
95
- if (componentChildren === undefined) {
96
- const componentClassNames = Object.entries(self).map(([key, value]) => {
97
- if (key === 'empty') return value.join(' ');
98
- return '';
99
- });
100
- return (
101
- <Component
102
- ref={ref}
103
- {...(props as any)}
104
- className={clsx(className, ...componentClassNames)}
105
- >
106
- {componentChildren}
107
- </Component>
108
- );
109
- }
110
- // Else return the component as it is
66
+ return React.forwardRef<
67
+ React.ComponentRef<T>,
68
+ React.ComponentPropsWithRef<T>
69
+ >(function enablePseudoclassComponent(
70
+ { className, children: componentChildren, ...props },
71
+ ref
72
+ ) {
73
+ // Handle if children is an array, add the corresponding classnames to the first and last child
74
+ if (Array.isArray(componentChildren)) {
111
75
  return (
112
76
  <Component ref={ref} {...(props as any)} className={className}>
77
+ {componentChildren.map((child, index) => {
78
+ return React.cloneElement(child, {
79
+ key: index,
80
+ className: clsx(
81
+ child.props.className,
82
+ ...Object.entries(children).map(([key, classNames]) => {
83
+ if (index === 0 && key === 'first-child') return classNames;
84
+ if (
85
+ index === componentChildren.length - 1 &&
86
+ key === 'last-child'
87
+ )
88
+ return classNames;
89
+ return '';
90
+ })
91
+ ),
92
+ });
93
+ })}
94
+ </Component>
95
+ );
96
+ }
97
+ // Handle if children is a single element, add the corresponding classname for empty pseudoclass
98
+ if (componentChildren === undefined) {
99
+ const componentClassNames = Object.entries(self).map(([key, value]) => {
100
+ if (key === 'empty') return value.join(' ');
101
+ return '';
102
+ });
103
+ return (
104
+ <Component
105
+ ref={ref}
106
+ {...(props as any)}
107
+ className={clsx(className, ...componentClassNames)}
108
+ >
113
109
  {componentChildren}
114
110
  </Component>
115
111
  );
116
112
  }
117
- );
113
+ // Else return the component as it is
114
+ return (
115
+ <Component ref={ref} {...(props as any)} className={className}>
116
+ {componentChildren}
117
+ </Component>
118
+ );
119
+ });
118
120
  }
119
121
 
120
122
  export default extend;
@@ -8,42 +8,40 @@ function extend(Component, propFactory = (props) => props) {
8
8
  return ExtendedComponent;
9
9
  }
10
10
  function enablePseudoclass(Component, { self = {}, children = {} }) {
11
- return React.forwardRef(
12
- function enablePseudoclassComponent({ className, children: componentChildren, ...props }, ref) {
13
- if (Array.isArray(componentChildren)) {
14
- return /* @__PURE__ */ React.createElement(Component, { ref, ...props, className }, componentChildren.map((child, index) => {
15
- return React.cloneElement(child, {
16
- key: index,
17
- className: clsx(
18
- child.props.className,
19
- ...Object.entries(children).map(([key, classNames]) => {
20
- if (index === 0 && key === "first-child") return classNames;
21
- if (index === componentChildren.length - 1 && key === "last-child")
22
- return classNames;
23
- return "";
24
- })
25
- )
26
- });
27
- }));
28
- }
29
- if (componentChildren === void 0) {
30
- const componentClassNames = Object.entries(self).map(([key, value]) => {
31
- if (key === "empty") return value.join(" ");
32
- return "";
11
+ return React.forwardRef(function enablePseudoclassComponent({ className, children: componentChildren, ...props }, ref) {
12
+ if (Array.isArray(componentChildren)) {
13
+ return /* @__PURE__ */ React.createElement(Component, { ref, ...props, className }, componentChildren.map((child, index) => {
14
+ return React.cloneElement(child, {
15
+ key: index,
16
+ className: clsx(
17
+ child.props.className,
18
+ ...Object.entries(children).map(([key, classNames]) => {
19
+ if (index === 0 && key === "first-child") return classNames;
20
+ if (index === componentChildren.length - 1 && key === "last-child")
21
+ return classNames;
22
+ return "";
23
+ })
24
+ )
33
25
  });
34
- return /* @__PURE__ */ React.createElement(
35
- Component,
36
- {
37
- ref,
38
- ...props,
39
- className: clsx(className, ...componentClassNames)
40
- },
41
- componentChildren
42
- );
43
- }
44
- return /* @__PURE__ */ React.createElement(Component, { ref, ...props, className }, componentChildren);
26
+ }));
45
27
  }
46
- );
28
+ if (componentChildren === void 0) {
29
+ const componentClassNames = Object.entries(self).map(([key, value]) => {
30
+ if (key === "empty") return value.join(" ");
31
+ return "";
32
+ });
33
+ return /* @__PURE__ */ React.createElement(
34
+ Component,
35
+ {
36
+ ref,
37
+ ...props,
38
+ className: clsx(className, ...componentClassNames)
39
+ },
40
+ componentChildren
41
+ );
42
+ }
43
+ return /* @__PURE__ */ React.createElement(Component, { ref, ...props, className }, componentChildren);
44
+ });
47
45
  }
48
46
  var index_native_default = extend;
49
47
  export {
@@ -1,8 +1,5 @@
1
1
  import React from 'react';
2
- type WithClassName<TProps> = TProps & {
3
- className?: string;
4
- };
5
- type PropFactory<TProps> = (props: WithClassName<TProps>) => any;
2
+ type PropFactory<TProps> = (props: TProps) => any;
6
3
  /**
7
4
  * A HOC that transforms the props of the wrapped component before passing them through
8
5
  *
@@ -19,7 +16,7 @@ type PropFactory<TProps> = (props: WithClassName<TProps>) => any;
19
16
  * type AdditionalProps = { lastName: string; };
20
17
  * const MyExpandedNativeComponent = extend<MyComponentProps, AdditionalProps>(MyNativeComponent, (props) => ({ name: `${props.name} ${props.lastName}`, ...props }));
21
18
  */
22
- export declare function extend<TProps, TAdditionalProps>(Component: React.ComponentType<TProps>, propFactory?: PropFactory<TProps & TAdditionalProps>): React.ForwardRefExoticComponent<React.PropsWithoutRef<WithClassName<TProps & TAdditionalProps>> & React.RefAttributes<unknown>>;
19
+ export declare function extend<TProps, TAdditionalProps>(Component: React.ComponentType<TProps>, propFactory?: PropFactory<React.PropsWithoutRef<TProps & TAdditionalProps>>): React.ForwardRefExoticComponent<React.PropsWithoutRef<TProps & TAdditionalProps> & React.RefAttributes<unknown>>;
23
20
  interface PseudoclassOptions {
24
21
  self?: Record<string, string[]>;
25
22
  children?: Record<string, string[]>;
@@ -42,5 +39,5 @@ interface PseudoclassOptions {
42
39
  * </MyComponentWithPseudoclass>
43
40
  *
44
41
  * */
45
- export declare function enablePseudoclass<T extends React.ElementType>(Component: T, { self, children }: PseudoclassOptions): React.ForwardRefExoticComponent<React.PropsWithoutRef<React.ComponentPropsWithRef<T>> & React.RefAttributes<React.ElementRef<T>>>;
42
+ export declare function enablePseudoclass<T extends React.ElementType>(Component: T, { self, children }: PseudoclassOptions): React.ForwardRefExoticComponent<React.PropsWithoutRef<React.ComponentPropsWithRef<T>> & React.RefAttributes<React.ComponentRef<T>>>;
46
43
  export default extend;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/index.native.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\n\ntype WithClassName<TProps> = TProps & { className?: string };\ntype PropFactory<TProps> = (props: WithClassName<TProps>) => any;\n\n/**\n * A HOC that transforms the props of the wrapped component before passing them through\n *\n * @param Component The component to wrap\n * @param [propFactory=(props) => props] The function that transforms the props\n * @returns The wrapped component that accepts the transformed props\n *\n * @example\n * type MyComponentProps = { name: string; };\n * const MyComponent = (props: MyComponentProps) => <p>Hi {props.name}</p>;\n *\n * const MyNativeComponent = extend(MyComponent, (props) => ({ name: props.name.toUpperCase(), ...props }));\n *\n * type AdditionalProps = { lastName: string; };\n * const MyExpandedNativeComponent = extend<MyComponentProps, AdditionalProps>(MyNativeComponent, (props) => ({ name: `${props.name} ${props.lastName}`, ...props }));\n */\nexport function extend<TProps, TAdditionalProps>(\n Component: React.ComponentType<TProps>,\n propFactory: PropFactory<TProps & TAdditionalProps> = (props) => props\n) {\n const ExtendedComponent = React.forwardRef(function ExtendedComponent(\n props: WithClassName<TProps & TAdditionalProps>,\n ref\n ) {\n const transformedProps = propFactory(props);\n\n return <Component ref={ref} {...transformedProps} />;\n });\n return ExtendedComponent;\n}\n\ninterface PseudoclassOptions {\n self?: Record<string, string[]>;\n children?: Record<string, string[]>;\n}\n\n/**\n * A HOC that adds pseudoclass support to the wrapped component\n *\n * @param Component The component to wrap\n * @param options The pseudoclass options\n * @returns The wrapped component that supports pseudoclasses\n *\n * @example\n * const MyComponent = (props) => <p {...props}>Hi</p>;\n * const MyComponentWithPseudoclass = enablePseudoclass(MyComponent\n * { self: { 'empty': ['ds-component__empty'] }, childrenClassNames: { 'first-child': ['ds-component__first-child'] } });\n *\n * <MyComponentWithPseudoclass className=\"my-class\" empty focus>\n * <p>First child</p>\n * <p>Second child</p>\n * </MyComponentWithPseudoclass>\n *\n * */\nexport function enablePseudoclass<T extends React.ElementType>(\n Component: T,\n { self = {}, children = {} }: PseudoclassOptions\n) {\n return React.forwardRef<React.ElementRef<T>, React.ComponentPropsWithRef<T>>(\n function enablePseudoclassComponent(\n { className, children: componentChildren, ...props },\n ref\n ) {\n // Handle if children is an array, add the corresponding classnames to the first and last child\n if (Array.isArray(componentChildren)) {\n return (\n <Component ref={ref} {...(props as any)} className={className}>\n {componentChildren.map((child, index) => {\n return React.cloneElement(child, {\n key: index,\n className: clsx(\n child.props.className,\n ...Object.entries(children).map(([key, classNames]) => {\n if (index === 0 && key === 'first-child') return classNames;\n if (\n index === componentChildren.length - 1 &&\n key === 'last-child'\n )\n return classNames;\n return '';\n })\n ),\n });\n })}\n </Component>\n );\n }\n // Handle if children is a single element, add the corresponding classname for empty pseudoclass\n if (componentChildren === undefined) {\n const componentClassNames = Object.entries(self).map(([key, value]) => {\n if (key === 'empty') return value.join(' ');\n return '';\n });\n return (\n <Component\n ref={ref}\n {...(props as any)}\n className={clsx(className, ...componentClassNames)}\n >\n {componentChildren}\n </Component>\n );\n }\n // Else return the component as it is\n return (\n <Component ref={ref} {...(props as any)} className={className}>\n {componentChildren}\n </Component>\n );\n }\n );\n}\n\nexport default extend;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AAqBV,SAAS,OACd,WACA,cAAsD,CAAC,UAAU,OACjE;AACA,QAAM,oBAAoB,MAAM,WAAW,SAASA,mBAClD,OACA,KACA;AACA,UAAM,mBAAmB,YAAY,KAAK;AAE1C,WAAO,oCAAC,aAAU,KAAW,GAAG,kBAAkB;AAAA,EACpD,CAAC;AACD,SAAO;AACT;AAyBO,SAAS,kBACd,WACA,EAAE,OAAO,CAAC,GAAG,WAAW,CAAC,EAAE,GAC3B;AACA,SAAO,MAAM;AAAA,IACX,SAAS,2BACP,EAAE,WAAW,UAAU,mBAAmB,GAAG,MAAM,GACnD,KACA;AAEA,UAAI,MAAM,QAAQ,iBAAiB,GAAG;AACpC,eACE,oCAAC,aAAU,KAAW,GAAI,OAAe,aACtC,kBAAkB,IAAI,CAAC,OAAO,UAAU;AACvC,iBAAO,MAAM,aAAa,OAAO;AAAA,YAC/B,KAAK;AAAA,YACL,WAAW;AAAA,cACT,MAAM,MAAM;AAAA,cACZ,GAAG,OAAO,QAAQ,QAAQ,EAAE,IAAI,CAAC,CAAC,KAAK,UAAU,MAAM;AACrD,oBAAI,UAAU,KAAK,QAAQ,cAAe,QAAO;AACjD,oBACE,UAAU,kBAAkB,SAAS,KACrC,QAAQ;AAER,yBAAO;AACT,uBAAO;AAAA,cACT,CAAC;AAAA,YACH;AAAA,UACF,CAAC;AAAA,QACH,CAAC,CACH;AAAA,MAEJ;AAEA,UAAI,sBAAsB,QAAW;AACnC,cAAM,sBAAsB,OAAO,QAAQ,IAAI,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM;AACrE,cAAI,QAAQ,QAAS,QAAO,MAAM,KAAK,GAAG;AAC1C,iBAAO;AAAA,QACT,CAAC;AACD,eACE;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACC,GAAI;AAAA,YACL,WAAW,KAAK,WAAW,GAAG,mBAAmB;AAAA;AAAA,UAEhD;AAAA,QACH;AAAA,MAEJ;AAEA,aACE,oCAAC,aAAU,KAAW,GAAI,OAAe,aACtC,iBACH;AAAA,IAEJ;AAAA,EACF;AACF;AAEA,IAAO,uBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\n\ntype PropFactory<TProps> = (props: TProps) => any;\n\n/**\n * A HOC that transforms the props of the wrapped component before passing them through\n *\n * @param Component The component to wrap\n * @param [propFactory=(props) => props] The function that transforms the props\n * @returns The wrapped component that accepts the transformed props\n *\n * @example\n * type MyComponentProps = { name: string; };\n * const MyComponent = (props: MyComponentProps) => <p>Hi {props.name}</p>;\n *\n * const MyNativeComponent = extend(MyComponent, (props) => ({ name: props.name.toUpperCase(), ...props }));\n *\n * type AdditionalProps = { lastName: string; };\n * const MyExpandedNativeComponent = extend<MyComponentProps, AdditionalProps>(MyNativeComponent, (props) => ({ name: `${props.name} ${props.lastName}`, ...props }));\n */\nexport function extend<TProps, TAdditionalProps>(\n Component: React.ComponentType<TProps>,\n propFactory: PropFactory<React.PropsWithoutRef<TProps & TAdditionalProps>> = (\n props\n ) => props\n) {\n const ExtendedComponent = React.forwardRef<\n unknown,\n TProps & TAdditionalProps\n >(function ExtendedComponent(props, ref) {\n const transformedProps = propFactory(props);\n\n return <Component ref={ref} {...transformedProps} />;\n });\n return ExtendedComponent;\n}\n\ninterface PseudoclassOptions {\n self?: Record<string, string[]>;\n children?: Record<string, string[]>;\n}\n\n/**\n * A HOC that adds pseudoclass support to the wrapped component\n *\n * @param Component The component to wrap\n * @param options The pseudoclass options\n * @returns The wrapped component that supports pseudoclasses\n *\n * @example\n * const MyComponent = (props) => <p {...props}>Hi</p>;\n * const MyComponentWithPseudoclass = enablePseudoclass(MyComponent\n * { self: { 'empty': ['ds-component__empty'] }, childrenClassNames: { 'first-child': ['ds-component__first-child'] } });\n *\n * <MyComponentWithPseudoclass className=\"my-class\" empty focus>\n * <p>First child</p>\n * <p>Second child</p>\n * </MyComponentWithPseudoclass>\n *\n * */\nexport function enablePseudoclass<T extends React.ElementType>(\n Component: T,\n { self = {}, children = {} }: PseudoclassOptions\n) {\n return React.forwardRef<\n React.ComponentRef<T>,\n React.ComponentPropsWithRef<T>\n >(function enablePseudoclassComponent(\n { className, children: componentChildren, ...props },\n ref\n ) {\n // Handle if children is an array, add the corresponding classnames to the first and last child\n if (Array.isArray(componentChildren)) {\n return (\n <Component ref={ref} {...(props as any)} className={className}>\n {componentChildren.map((child, index) => {\n return React.cloneElement(child, {\n key: index,\n className: clsx(\n child.props.className,\n ...Object.entries(children).map(([key, classNames]) => {\n if (index === 0 && key === 'first-child') return classNames;\n if (\n index === componentChildren.length - 1 &&\n key === 'last-child'\n )\n return classNames;\n return '';\n })\n ),\n });\n })}\n </Component>\n );\n }\n // Handle if children is a single element, add the corresponding classname for empty pseudoclass\n if (componentChildren === undefined) {\n const componentClassNames = Object.entries(self).map(([key, value]) => {\n if (key === 'empty') return value.join(' ');\n return '';\n });\n return (\n <Component\n ref={ref}\n {...(props as any)}\n className={clsx(className, ...componentClassNames)}\n >\n {componentChildren}\n </Component>\n );\n }\n // Else return the component as it is\n return (\n <Component ref={ref} {...(props as any)} className={className}>\n {componentChildren}\n </Component>\n );\n });\n}\n\nexport default extend;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AAoBV,SAAS,OACd,WACA,cAA6E,CAC3E,UACG,OACL;AACA,QAAM,oBAAoB,MAAM,WAG9B,SAASA,mBAAkB,OAAO,KAAK;AACvC,UAAM,mBAAmB,YAAY,KAAK;AAE1C,WAAO,oCAAC,aAAU,KAAW,GAAG,kBAAkB;AAAA,EACpD,CAAC;AACD,SAAO;AACT;AAyBO,SAAS,kBACd,WACA,EAAE,OAAO,CAAC,GAAG,WAAW,CAAC,EAAE,GAC3B;AACA,SAAO,MAAM,WAGX,SAAS,2BACT,EAAE,WAAW,UAAU,mBAAmB,GAAG,MAAM,GACnD,KACA;AAEA,QAAI,MAAM,QAAQ,iBAAiB,GAAG;AACpC,aACE,oCAAC,aAAU,KAAW,GAAI,OAAe,aACtC,kBAAkB,IAAI,CAAC,OAAO,UAAU;AACvC,eAAO,MAAM,aAAa,OAAO;AAAA,UAC/B,KAAK;AAAA,UACL,WAAW;AAAA,YACT,MAAM,MAAM;AAAA,YACZ,GAAG,OAAO,QAAQ,QAAQ,EAAE,IAAI,CAAC,CAAC,KAAK,UAAU,MAAM;AACrD,kBAAI,UAAU,KAAK,QAAQ,cAAe,QAAO;AACjD,kBACE,UAAU,kBAAkB,SAAS,KACrC,QAAQ;AAER,uBAAO;AACT,qBAAO;AAAA,YACT,CAAC;AAAA,UACH;AAAA,QACF,CAAC;AAAA,MACH,CAAC,CACH;AAAA,IAEJ;AAEA,QAAI,sBAAsB,QAAW;AACnC,YAAM,sBAAsB,OAAO,QAAQ,IAAI,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM;AACrE,YAAI,QAAQ,QAAS,QAAO,MAAM,KAAK,GAAG;AAC1C,eAAO;AAAA,MACT,CAAC;AACD,aACE;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACC,GAAI;AAAA,UACL,WAAW,KAAK,WAAW,GAAG,mBAAmB;AAAA;AAAA,QAEhD;AAAA,MACH;AAAA,IAEJ;AAEA,WACE,oCAAC,aAAU,KAAW,GAAI,OAAe,aACtC,iBACH;AAAA,EAEJ,CAAC;AACH;AAEA,IAAO,uBAAQ;",
6
6
  "names": ["ExtendedComponent"]
7
7
  }
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { BaseProps } from '@digigov/react-core/Base';
3
- export interface AutoCompleteInputTypeaheadProps extends BaseProps<'input'> {
4
- }
5
- /**
6
- * AutoCompleteInputTypeahead component is used to display the hole search value
7
- * in the background.
8
- *
9
- */
10
- export declare const AutoCompleteInputTypeahead: React.ForwardRefExoticComponent<Omit<AutoCompleteInputTypeaheadProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
11
- export default AutoCompleteInputTypeahead;
@@ -1,25 +0,0 @@
1
- import React from "react";
2
- import clsx from "clsx";
3
- import Base from "@digigov/react-core/Base";
4
- const AutoCompleteInputTypeahead = React.forwardRef(function AutoCompleteInputTypeahead2({ className, ...props }, ref) {
5
- return /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement(
6
- Base,
7
- {
8
- as: "input",
9
- type: "text",
10
- readOnly: true,
11
- ref,
12
- tabIndex: -1,
13
- className: clsx(className, {
14
- "ds-autocomplete__hint": true
15
- }),
16
- ...props
17
- }
18
- ));
19
- });
20
- var AutoCompleteInputTypeahead_default = AutoCompleteInputTypeahead;
21
- export {
22
- AutoCompleteInputTypeahead,
23
- AutoCompleteInputTypeahead_default as default
24
- };
25
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/AutoCompleteInputTypeahead/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface AutoCompleteInputTypeaheadProps extends BaseProps<'input'> {}\n/**\n * AutoCompleteInputTypeahead component is used to display the hole search value\n * in the background.\n *\n */\nexport const AutoCompleteInputTypeahead = React.forwardRef<\n HTMLInputElement,\n AutoCompleteInputTypeaheadProps\n>(function AutoCompleteInputTypeahead({ className, ...props }, ref) {\n return (\n <span>\n <Base\n as=\"input\"\n type=\"text\"\n readOnly\n ref={ref}\n tabIndex={-1}\n className={clsx(className, {\n 'ds-autocomplete__hint': true,\n })}\n {...props}\n />\n </span>\n );\n});\n\nexport default AutoCompleteInputTypeahead;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAQzB,MAAM,6BAA6B,MAAM,WAG9C,SAASA,4BAA2B,EAAE,WAAW,GAAG,MAAM,GAAG,KAAK;AAClE,SACE,oCAAC,cACC;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,MAAK;AAAA,MACL,UAAQ;AAAA,MACR;AAAA,MACA,UAAU;AAAA,MACV,WAAW,KAAK,WAAW;AAAA,QACzB,yBAAyB;AAAA,MAC3B,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,EACN,CACF;AAEJ,CAAC;AAED,IAAO,qCAAQ;",
6
- "names": ["AutoCompleteInputTypeahead"]
7
- }
@@ -1,6 +0,0 @@
1
- {
2
- "sideEffects": false,
3
- "module": "./index.js",
4
- "types": "./index.d.ts",
5
- "main": "../cjs/AutoCompleteInputTypeahead/index.js"
6
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/CircularProgress/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CircularProgressProps 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 CircularProgress component as an animated loader.\n * CircularProgress can be used inside LoaderContainer component.\n */\nexport const CircularProgress = React.forwardRef<\n SVGSVGElement,\n CircularProgressProps\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 CircularProgress;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAyBzB,MAAM,mBAAmB,MAAM,WAGpC,SAASA,kBACT,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,2BAAQ;",
6
- "names": ["CircularProgress"]
7
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,58 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
- var AutoCompleteInputTypeahead_exports = {};
29
- __export(AutoCompleteInputTypeahead_exports, {
30
- AutoCompleteInputTypeahead: () => AutoCompleteInputTypeahead,
31
- default: () => AutoCompleteInputTypeahead_default
32
- });
33
- module.exports = __toCommonJS(AutoCompleteInputTypeahead_exports);
34
- var import_react = __toESM(require("react"));
35
- var import_clsx = __toESM(require("clsx"));
36
- var import_Base = __toESM(require("@digigov/react-core/Base"));
37
- const AutoCompleteInputTypeahead = import_react.default.forwardRef(function AutoCompleteInputTypeahead2({ className, ...props }, ref) {
38
- return /* @__PURE__ */ import_react.default.createElement("span", null, /* @__PURE__ */ import_react.default.createElement(
39
- import_Base.default,
40
- {
41
- as: "input",
42
- type: "text",
43
- readOnly: true,
44
- ref,
45
- tabIndex: -1,
46
- className: (0, import_clsx.default)(className, {
47
- "ds-autocomplete__hint": true
48
- }),
49
- ...props
50
- }
51
- ));
52
- });
53
- var AutoCompleteInputTypeahead_default = AutoCompleteInputTypeahead;
54
- // Annotate the CommonJS export names for ESM import in node:
55
- 0 && (module.exports = {
56
- AutoCompleteInputTypeahead
57
- });
58
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/AutoCompleteInputTypeahead/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface AutoCompleteInputTypeaheadProps extends BaseProps<'input'> {}\n/**\n * AutoCompleteInputTypeahead component is used to display the hole search value\n * in the background.\n *\n */\nexport const AutoCompleteInputTypeahead = React.forwardRef<\n HTMLInputElement,\n AutoCompleteInputTypeaheadProps\n>(function AutoCompleteInputTypeahead({ className, ...props }, ref) {\n return (\n <span>\n <Base\n as=\"input\"\n type=\"text\"\n readOnly\n ref={ref}\n tabIndex={-1}\n className={clsx(className, {\n 'ds-autocomplete__hint': true,\n })}\n {...props}\n />\n </span>\n );\n});\n\nexport default AutoCompleteInputTypeahead;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAQzB,MAAM,6BAA6B,aAAAA,QAAM,WAG9C,SAASC,4BAA2B,EAAE,WAAW,GAAG,MAAM,GAAG,KAAK;AAClE,SACE,6BAAAD,QAAA,cAAC,cACC,6BAAAA,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH,MAAK;AAAA,MACL,UAAQ;AAAA,MACR;AAAA,MACA,UAAU;AAAA,MACV,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,yBAAyB;AAAA,MAC3B,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,EACN,CACF;AAEJ,CAAC;AAED,IAAO,qCAAQ;",
6
- "names": ["React", "AutoCompleteInputTypeahead", "Base", "clsx"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/CircularProgress/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CircularProgressProps 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 CircularProgress component as an animated loader.\n * CircularProgress can be used inside LoaderContainer component.\n */\nexport const CircularProgress = React.forwardRef<\n SVGSVGElement,\n CircularProgressProps\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 CircularProgress;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAyBzB,MAAM,mBAAmB,aAAAA,QAAM,WAGpC,SAASC,kBACT,EAAE,QAAQ,WAAW,OAAO,MAAM,WAAW,GAAG,MAAM,GACtD,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,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,6BAAAH,QAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,GAAE;AAAA;AAAA,IACJ;AAAA,IACA,6BAAAA,QAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,GAAE;AAAA;AAAA,IACJ;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,2BAAQ;",
6
- "names": ["React", "CircularProgress", "Base", "clsx"]
7
- }
@@ -1,16 +0,0 @@
1
- // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
-
3
- exports[`renders the AutoCompleteInputTypeahead with no props 1`] = `
4
- <body>
5
- <div>
6
- <span>
7
- <input
8
- class="ds-autocomplete__hint"
9
- readonly=""
10
- tabindex="-1"
11
- type="text"
12
- />
13
- </span>
14
- </div>
15
- </body>
16
- `;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import AutoCompleteInputTypeahead from '@digigov/react-core/AutoCompleteInputTypeahead';
5
-
6
- it('renders the AutoCompleteInputTypeahead with no props', () => {
7
- expect(render(<AutoCompleteInputTypeahead />).baseElement).toMatchSnapshot();
8
- });
@@ -1,32 +0,0 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
4
-
5
- export interface AutoCompleteInputTypeaheadProps extends BaseProps<'input'> {}
6
- /**
7
- * AutoCompleteInputTypeahead component is used to display the hole search value
8
- * in the background.
9
- *
10
- */
11
- export const AutoCompleteInputTypeahead = React.forwardRef<
12
- HTMLInputElement,
13
- AutoCompleteInputTypeaheadProps
14
- >(function AutoCompleteInputTypeahead({ className, ...props }, ref) {
15
- return (
16
- <span>
17
- <Base
18
- as="input"
19
- type="text"
20
- readOnly
21
- ref={ref}
22
- tabIndex={-1}
23
- className={clsx(className, {
24
- 'ds-autocomplete__hint': true,
25
- })}
26
- {...props}
27
- />
28
- </span>
29
- );
30
- });
31
-
32
- export default AutoCompleteInputTypeahead;
@@ -1,34 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import CircularProgress from '@digigov/react-core/CircularProgress';
5
-
6
- it('renders the CircularProgress', () => {
7
- expect(render(<CircularProgress />).baseElement).toMatchSnapshot();
8
- });
9
-
10
- it('renders the CircularProgress with size sm', () => {
11
- expect(render(<CircularProgress size="sm" />).baseElement).toMatchSnapshot();
12
- });
13
-
14
- it('renders the CircularProgress with size lg', () => {
15
- expect(render(<CircularProgress size="lg" />).baseElement).toMatchSnapshot();
16
- });
17
-
18
- it('renders the CircularProgress with color=secondary prop', () => {
19
- expect(
20
- render(<CircularProgress color={'secondary'} />).baseElement
21
- ).toMatchSnapshot();
22
- });
23
-
24
- it('renders the CircularProgress with color=secondary and size sm props', () => {
25
- expect(
26
- render(<CircularProgress color={'secondary'} size="sm" />).baseElement
27
- ).toMatchSnapshot();
28
- });
29
-
30
- it('renders the CircularProgress with color=secondary and size lg props', () => {
31
- expect(
32
- render(<CircularProgress color={'secondary'} size="lg" />).baseElement
33
- ).toMatchSnapshot();
34
- });