@digigov/react-core 2.0.0-13876dba → 2.0.0-16da9467
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/index.native.d.ts +1 -5
- package/AccordionSection/index.native.d.ts +1 -3
- package/AccordionSectionSummaryHeading/index.d.ts +1 -0
- package/AccordionSectionSummaryHeading/index.js +3 -2
- package/AccordionSectionSummaryHeading/index.js.map +2 -2
- package/BannerContainer/index.js +1 -1
- package/BannerContainer/index.js.map +2 -2
- package/Base/compat/Input/CheckboxInput.native.js.map +2 -2
- package/Base/compat/Input/RadioInput.native.js.map +2 -2
- package/Base/index.native.js.map +2 -2
- package/Base/index.web.js.map +1 -1
- package/Base/mapping.native.d.ts +1 -1
- package/Base/mapping.native.js.map +2 -2
- package/Button/index.js +1 -0
- package/Button/index.js.map +2 -2
- package/{CircularProgress → CircularProgressBase}/index.d.ts +5 -5
- package/{CircularProgress → CircularProgressBase}/index.js +4 -4
- package/CircularProgressBase/index.js.map +7 -0
- package/{CircularProgress → CircularProgressBase}/package.json +1 -1
- package/CopyToClipboardMessage/index.native.d.ts +1 -3
- package/DateInputItem/index.native.d.ts +1 -3
- package/Details/index.native.d.ts +1 -3
- package/DetailsContent/index.d.ts +1 -0
- package/DetailsContent/index.js +3 -2
- package/DetailsContent/index.js.map +2 -2
- package/Grid/index.d.ts +1 -7
- package/Grid/index.js.map +2 -2
- package/NavListItemActionContainer/index.native.d.ts +0 -2
- package/NotificationBannerLink/index.native.d.ts +1 -3
- package/Table/index.d.ts +9 -0
- package/Table/index.js +4 -1
- package/Table/index.js.map +2 -2
- package/TableDataCell/index.d.ts +13 -0
- package/TableDataCell/index.js +10 -1
- package/TableDataCell/index.js.map +2 -2
- package/TextArea/index.native.d.ts +1 -3
- package/TextInput/index.native.d.ts +1 -3
- package/Typography/index.d.ts +1 -1
- package/Typography/index.js +15 -17
- package/Typography/index.js.map +2 -2
- package/cjs/AccordionSectionSummaryHeading/index.js +3 -2
- package/cjs/AccordionSectionSummaryHeading/index.js.map +2 -2
- package/cjs/BannerContainer/index.js +1 -1
- package/cjs/BannerContainer/index.js.map +2 -2
- package/cjs/Base/compat/Input/CheckboxInput.native.js.map +2 -2
- package/cjs/Base/compat/Input/RadioInput.native.js.map +2 -2
- package/cjs/Base/index.native.js.map +2 -2
- package/cjs/Base/index.web.js.map +1 -1
- package/cjs/Base/mapping.native.js.map +2 -2
- package/cjs/Button/index.js +1 -0
- package/cjs/Button/index.js.map +2 -2
- package/cjs/{CircularProgress → CircularProgressBase}/index.js +8 -8
- package/cjs/CircularProgressBase/index.js.map +7 -0
- package/cjs/DetailsContent/index.js +3 -2
- package/cjs/DetailsContent/index.js.map +2 -2
- package/cjs/Grid/index.js.map +2 -2
- package/cjs/Table/index.js +4 -1
- package/cjs/Table/index.js.map +2 -2
- package/cjs/TableDataCell/index.js +10 -1
- package/cjs/TableDataCell/index.js.map +2 -2
- package/cjs/Typography/index.js +15 -17
- package/cjs/Typography/index.js.map +2 -2
- package/cjs/index.js +2 -4
- package/cjs/index.js.map +2 -2
- package/cjs/lazy/index.js +1 -2
- package/cjs/lazy.js.map +2 -2
- package/cjs/registry/index.js +4 -6
- package/cjs/registry.js.map +2 -2
- package/cjs/utils/index.native/index.js +32 -34
- package/cjs/utils/index.native.js.map +2 -2
- package/index.d.ts +1 -2
- package/index.js +2 -3
- package/index.js.map +2 -2
- package/lazy/index.js +1 -2
- package/package.json +5 -5
- package/registry/index.js +4 -6
- package/src/AccordionSectionSummaryHeading/index.tsx +9 -2
- package/src/BannerContainer/__snapshots__/index.test.tsx.snap +1 -1
- package/src/BannerContainer/index.tsx +1 -1
- package/src/Base/compat/Input/CheckboxInput.native.tsx +2 -6
- package/src/Base/compat/Input/RadioInput.native.tsx +2 -6
- package/src/Base/index.native.tsx +2 -2
- package/src/Base/index.web.tsx +1 -1
- package/src/Base/mapping.native.tsx +1 -1
- package/src/Button/index.tsx +1 -0
- package/src/Checkbox/__snapshots__/index.test.tsx.snap +0 -5
- package/src/CheckboxItem/__snapshots__/index.test.tsx.snap +0 -4
- package/src/{CircularProgress → CircularProgressBase}/__snapshots__/index.test.tsx.snap +6 -6
- package/src/CircularProgressBase/index.test.tsx +38 -0
- package/src/{CircularProgress → CircularProgressBase}/index.tsx +7 -7
- package/src/DetailsContent/index.tsx +11 -2
- package/src/Grid/index.tsx +1 -7
- package/src/RadioItem/__snapshots__/index.test.tsx.snap +0 -4
- package/src/Table/index.tsx +12 -0
- package/src/TableDataCell/__snapshots__/index.test.tsx.snap +2 -2
- package/src/TableDataCell/index.tsx +23 -1
- package/src/Typography/index.tsx +21 -20
- package/src/index.ts +1 -2
- package/src/lazy.js +1 -2
- package/src/registry.js +4 -6
- package/src/utils/index.native.tsx +56 -54
- package/utils/index.native/index.js +32 -34
- package/utils/index.native.d.ts +3 -6
- package/utils/index.native.js.map +2 -2
- package/AutoCompleteInputTypeahead/index.d.ts +0 -11
- package/AutoCompleteInputTypeahead/index.js +0 -25
- package/AutoCompleteInputTypeahead/index.js.map +0 -7
- package/AutoCompleteInputTypeahead/package.json +0 -6
- package/CircularProgress/index.js.map +0 -7
- package/CircularProgress/index.test.d.ts +0 -1
- package/cjs/AutoCompleteInputTypeahead/index.js +0 -58
- package/cjs/AutoCompleteInputTypeahead/index.js.map +0 -7
- package/cjs/CircularProgress/index.js.map +0 -7
- package/src/AutoCompleteInputTypeahead/__snapshots__/index.test.tsx.snap +0 -16
- package/src/AutoCompleteInputTypeahead/index.test.tsx +0 -8
- package/src/AutoCompleteInputTypeahead/index.tsx +0 -32
- package/src/CircularProgress/index.test.tsx +0 -34
- /package/{AutoCompleteInputTypeahead → CircularProgressBase}/index.test.d.ts +0 -0
|
@@ -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
|
-
});
|
|
File without changes
|