@digigov/react-core 2.0.0-rc.1 → 2.0.0-rc.11
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/AdminAside/__snapshots__/index.test.tsx.snap +7 -3
- package/AdminAside/index.js +6 -2
- package/AdminContainer/__snapshots__/index.test.tsx.snap +35 -7
- package/AdminContainer/index.d.ts +8 -1
- package/AdminContainer/index.js +6 -7
- package/AdminContainer/index.test/index.js +6 -0
- package/AdminMain/__snapshots__/index.test.tsx.snap +6 -3
- package/AdminMain/index.js +7 -2
- package/{src/AutoCompleteWrapper → AutoCompleteContainer}/__snapshots__/index.test.tsx.snap +4 -4
- package/AutoCompleteContainer/index.d.ts +22 -0
- package/{AutoCompleteWrapper → AutoCompleteContainer}/index.js +5 -5
- package/AutoCompleteContainer/index.test/index.js +7 -0
- package/{AutoCompleteStatusWrapper → AutoCompleteContainer}/index.test/package.json +1 -1
- package/{AutoCompleteStatusWrapper → AutoCompleteContainer}/package.json +1 -1
- package/AutoCompleteInput/__snapshots__/index.test.tsx.snap +14 -50
- package/AutoCompleteInput/index.d.ts +1 -9
- package/AutoCompleteInput/index.js +2 -4
- package/AutoCompleteInput/index.test/index.js +5 -19
- package/AutoCompleteMultipleInput/index.d.ts +9 -0
- package/AutoCompleteMultipleInput/index.js +21 -0
- package/{AutoCompleteWrapper/index.test → AutoCompleteMultipleInput}/package.json +1 -1
- package/AutoCompleteMultipleInputContainer/index.d.ts +12 -0
- package/AutoCompleteMultipleInputContainer/index.js +24 -0
- package/AutoCompleteMultipleInputContainer/package.json +6 -0
- package/AutoCompleteResultList/__snapshots__/index.test.tsx.snap +2 -38
- package/AutoCompleteResultList/index.d.ts +1 -10
- package/AutoCompleteResultList/index.js +2 -3
- package/AutoCompleteResultList/index.test/index.js +0 -14
- package/AutoCompleteStatus/__snapshots__/index.test.tsx.snap +2 -2
- package/AutoCompleteStatus/index.d.ts +1 -1
- package/AutoCompleteStatus/index.js +2 -2
- package/{AutoCompleteStatusWrapper → AutoCompleteStatusContainer}/__snapshots__/index.test.tsx.snap +4 -4
- package/AutoCompleteStatusContainer/index.d.ts +10 -0
- package/{AutoCompleteStatusWrapper → AutoCompleteStatusContainer}/index.js +5 -5
- package/AutoCompleteStatusContainer/index.test/index.js +7 -0
- package/AutoCompleteStatusContainer/index.test/package.json +6 -0
- package/AutoCompleteStatusContainer/package.json +6 -0
- package/Base/index.js +1 -1
- package/Card/__snapshots__/index.test.tsx.snap +42 -0
- package/Card/index.d.ts +8 -1
- package/Card/index.js +3 -2
- package/Card/index.test/index.js +21 -9
- package/DateInputItem/index.js +0 -2
- package/DropdownContent/index.d.ts +9 -1
- package/DropdownContent/index.js +6 -5
- package/FooterContentLogos/__snapshots__/index.test.tsx.snap +2 -2
- package/FooterContentLogos/index.js +1 -1
- package/Hidden/__snapshots__/index.test.tsx.snap +5 -5
- package/Hint/index.js +1 -1
- package/ImageLogo/__snapshots__/index.test.tsx.snap +2 -2
- package/ImageLogo/index.js +1 -2
- package/ImageLogoSet/__snapshots__/index.test.tsx.snap +10 -10
- package/KitchenSinkCard/index.d.ts +1 -1
- package/ModalContainer/index.d.ts +8 -1
- package/ModalContainer/index.js +8 -6
- package/ModalHeading/index.js +1 -2
- package/NormalText/__snapshots__/index.test.tsx.snap +60 -60
- package/NormalText/index.js +1 -1
- package/Paragraph/__snapshots__/index.test.tsx.snap +54 -54
- package/PhaseBannerHeaderContainer/__snapshots__/inde.test.tsx.snap +2 -2
- package/PhaseBannerHeaderContainer/index.js +1 -1
- package/Skeleton/__snapshots__/index.test.tsx.snap +296 -0
- package/{AutoCompleteStatusWrapper → Skeleton}/index.d.ts +44 -5
- package/Skeleton/index.js +35 -0
- package/Skeleton/index.test/index.js +64 -0
- package/Skeleton/index.test/package.json +6 -0
- package/Skeleton/index.test.d.ts +1 -0
- package/{AutoCompleteWrapper → Skeleton}/package.json +1 -1
- package/SummaryList/index.d.ts +10 -1
- package/SummaryList/index.js +4 -2
- package/Tabs/index.d.ts +1 -2
- package/Tabs/index.js +3 -4
- package/TabsHeading/__snapshots__/index.test.tsx.snap +3 -3
- package/Unpurge/index.js +1 -1
- package/cjs/AdminAside/__snapshots__/index.test.tsx.snap +7 -3
- package/cjs/AdminAside/index.js +6 -2
- package/cjs/AdminContainer/__snapshots__/index.test.tsx.snap +35 -7
- package/cjs/AdminContainer/index.js +6 -7
- package/cjs/AdminContainer/index.test/index.js +6 -0
- package/cjs/AdminMain/__snapshots__/index.test.tsx.snap +6 -3
- package/cjs/AdminMain/index.js +7 -2
- package/{AutoCompleteWrapper → cjs/AutoCompleteContainer}/__snapshots__/index.test.tsx.snap +4 -4
- package/cjs/{AutoCompleteWrapper → AutoCompleteContainer}/index.js +6 -6
- package/cjs/{AutoCompleteWrapper → AutoCompleteContainer}/index.test/index.js +2 -2
- package/cjs/AutoCompleteInput/__snapshots__/index.test.tsx.snap +14 -50
- package/cjs/AutoCompleteInput/index.js +2 -4
- package/cjs/AutoCompleteInput/index.test/index.js +5 -19
- package/cjs/AutoCompleteMultipleInput/index.js +28 -0
- package/cjs/AutoCompleteMultipleInputContainer/index.js +31 -0
- package/cjs/AutoCompleteResultList/__snapshots__/index.test.tsx.snap +2 -38
- package/cjs/AutoCompleteResultList/index.js +2 -3
- package/cjs/AutoCompleteResultList/index.test/index.js +0 -14
- package/cjs/AutoCompleteStatus/__snapshots__/index.test.tsx.snap +2 -2
- package/cjs/AutoCompleteStatus/index.js +2 -2
- package/cjs/{AutoCompleteStatusWrapper → AutoCompleteStatusContainer}/__snapshots__/index.test.tsx.snap +4 -4
- package/cjs/{AutoCompleteStatusWrapper → AutoCompleteStatusContainer}/index.js +6 -6
- package/cjs/{AutoCompleteStatusWrapper → AutoCompleteStatusContainer}/index.test/index.js +2 -2
- package/cjs/Base/index.js +1 -1
- package/cjs/Card/__snapshots__/index.test.tsx.snap +42 -0
- package/cjs/Card/index.js +3 -2
- package/cjs/Card/index.test/index.js +21 -9
- package/cjs/DateInputItem/index.js +0 -2
- package/cjs/DropdownContent/index.js +6 -5
- package/cjs/FooterContentLogos/__snapshots__/index.test.tsx.snap +2 -2
- package/cjs/FooterContentLogos/index.js +1 -1
- package/cjs/Hidden/__snapshots__/index.test.tsx.snap +5 -5
- package/cjs/Hint/index.js +1 -1
- package/cjs/ImageLogo/__snapshots__/index.test.tsx.snap +2 -2
- package/cjs/ImageLogo/index.js +1 -2
- package/cjs/ImageLogoSet/__snapshots__/index.test.tsx.snap +10 -10
- package/cjs/ModalContainer/index.js +8 -6
- package/cjs/ModalHeading/index.js +1 -2
- package/cjs/NormalText/__snapshots__/index.test.tsx.snap +60 -60
- package/cjs/NormalText/index.js +1 -1
- package/cjs/Paragraph/__snapshots__/index.test.tsx.snap +54 -54
- package/cjs/PhaseBannerHeaderContainer/__snapshots__/inde.test.tsx.snap +2 -2
- package/cjs/PhaseBannerHeaderContainer/index.js +1 -1
- package/cjs/Skeleton/__snapshots__/index.test.tsx.snap +296 -0
- package/cjs/Skeleton/index.js +42 -0
- package/cjs/Skeleton/index.test/index.js +67 -0
- package/cjs/SummaryList/index.js +4 -2
- package/cjs/Tabs/index.js +3 -4
- package/cjs/TabsHeading/__snapshots__/index.test.tsx.snap +3 -3
- package/cjs/Unpurge/index.js +1 -1
- package/cjs/index.js +26 -4
- package/cjs/lazy/index.js +30 -12
- package/cjs/registry/index.js +10 -4
- package/index.d.ts +3 -1
- package/index.js +4 -2
- package/lazy/index.js +24 -10
- package/lazy.d.ts +13 -11
- package/package.json +3 -3
- package/registry/index.js +10 -4
- package/registry.d.ts +5 -2
- package/src/AdminAside/__snapshots__/index.test.tsx.snap +7 -3
- package/src/AdminAside/index.tsx +6 -2
- package/src/AdminContainer/__snapshots__/index.test.tsx.snap +35 -7
- package/src/AdminContainer/index.test.tsx +3 -0
- package/src/AdminContainer/index.tsx +12 -11
- package/src/AdminMain/__snapshots__/index.test.tsx.snap +6 -3
- package/src/AdminMain/index.tsx +5 -2
- package/{cjs/AutoCompleteWrapper → src/AutoCompleteContainer}/__snapshots__/index.test.tsx.snap +4 -4
- package/src/{AutoCompleteWrapper → AutoCompleteContainer}/index.test.tsx +2 -2
- package/src/{AutoCompleteWrapper → AutoCompleteContainer}/index.tsx +8 -8
- package/src/AutoCompleteInput/__snapshots__/index.test.tsx.snap +14 -50
- package/src/AutoCompleteInput/index.test.tsx +4 -12
- package/src/AutoCompleteInput/index.tsx +2 -11
- package/src/AutoCompleteMultipleInput/index.tsx +28 -0
- package/src/AutoCompleteMultipleInputContainer/index.tsx +38 -0
- package/src/AutoCompleteResultList/__snapshots__/index.test.tsx.snap +2 -38
- package/src/AutoCompleteResultList/index.test.tsx +0 -20
- package/src/AutoCompleteResultList/index.tsx +1 -13
- package/src/AutoCompleteStatus/__snapshots__/index.test.tsx.snap +2 -2
- package/src/AutoCompleteStatus/index.tsx +2 -2
- package/src/AutoCompleteStatusContainer/__snapshots__/index.test.tsx.snap +16 -0
- package/src/AutoCompleteStatusContainer/index.test.tsx +10 -0
- package/src/AutoCompleteStatusContainer/index.tsx +28 -0
- package/src/Base/index.tsx +5 -5
- package/src/Card/__snapshots__/index.test.tsx.snap +42 -0
- package/src/Card/index.test.tsx +6 -0
- package/src/Card/index.tsx +9 -1
- package/src/DateInputItem/index.tsx +0 -2
- package/src/DropdownContent/index.tsx +10 -1
- package/src/FooterContentLogos/__snapshots__/index.test.tsx.snap +2 -2
- package/src/FooterContentLogos/index.tsx +1 -1
- package/src/Hidden/__snapshots__/index.test.tsx.snap +5 -5
- package/src/Hint/index.tsx +2 -2
- package/src/ImageLogo/__snapshots__/index.test.tsx.snap +2 -2
- package/src/ImageLogo/index.tsx +1 -2
- package/src/ImageLogoSet/__snapshots__/index.test.tsx.snap +10 -10
- package/src/ModalContainer/index.tsx +18 -14
- package/src/ModalHeading/index.tsx +2 -2
- package/src/NormalText/__snapshots__/index.test.tsx.snap +60 -60
- package/src/NormalText/index.tsx +2 -2
- package/src/Paragraph/__snapshots__/index.test.tsx.snap +54 -54
- package/src/PhaseBannerHeaderContainer/__snapshots__/inde.test.tsx.snap +2 -2
- package/src/PhaseBannerHeaderContainer/index.tsx +1 -1
- package/src/Skeleton/__snapshots__/index.test.tsx.snap +296 -0
- package/src/Skeleton/index.test.tsx +35 -0
- package/src/Skeleton/index.tsx +105 -0
- package/src/SummaryList/index.tsx +12 -1
- package/src/Tabs/index.tsx +1 -3
- package/src/TabsHeading/__snapshots__/index.test.tsx.snap +3 -3
- package/src/Unpurge/index.tsx +14 -2
- package/src/index.ts +3 -1
- package/src/lazy.js +4 -2
- package/src/registry.js +10 -4
- package/AutoCompleteStatusWrapper/index.test/index.js +0 -7
- package/AutoCompleteWrapper/index.d.ts +0 -22
- package/AutoCompleteWrapper/index.test/index.js +0 -7
- package/src/AutoCompleteStatusWrapper/__snapshots__/index.test.tsx.snap +0 -16
- package/src/AutoCompleteStatusWrapper/index.test.tsx +0 -10
- package/src/AutoCompleteStatusWrapper/index.tsx +0 -28
- /package/{AutoCompleteStatusWrapper → AutoCompleteContainer}/index.test.d.ts +0 -0
- /package/{AutoCompleteWrapper → AutoCompleteStatusContainer}/index.test.d.ts +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
+
|
|
5
|
+
export interface SkeletonProps extends BaseProps<'span'> {
|
|
6
|
+
/**
|
|
7
|
+
* variant prop determines the style of the skeleton element.
|
|
8
|
+
* @value 'circular', it renders a circular skeleton.
|
|
9
|
+
* @value 'rectangular', it renders a rectangular skeleton.
|
|
10
|
+
* @value 'text', it renders a text skeleton.
|
|
11
|
+
* @value 'button', it renders a button skeleton.
|
|
12
|
+
* @default 'text'
|
|
13
|
+
*/
|
|
14
|
+
variant?: 'circular' | 'rectangular' | 'text' | 'button';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* width prop determines the width of the skeleton element.
|
|
18
|
+
* It accepts number in px or string with valid CSS units (e.g. '24px', '1em', '100%').
|
|
19
|
+
* For better responsive experience, avoid using px and use percentage instead.
|
|
20
|
+
* @default undefined
|
|
21
|
+
*/
|
|
22
|
+
width?: number | string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* height prop determines the height of the skeleton element.
|
|
26
|
+
* It accepts number in px or string with valid CSS units (e.g. '24px', '1em', '100%').
|
|
27
|
+
* @default undefined
|
|
28
|
+
*/
|
|
29
|
+
height?: number | string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* fontSize is optional. 'sm' is the default value.
|
|
33
|
+
* Use 'xl' when this Skeleton is for a main page title.
|
|
34
|
+
* The fontSize works only for variant 'text'.
|
|
35
|
+
* You don't need fontSize if you wrap Skeleton in a typography component.
|
|
36
|
+
* @value 'xl'
|
|
37
|
+
* @value 'lg'
|
|
38
|
+
* @value 'md'
|
|
39
|
+
* @value 'sm'
|
|
40
|
+
* @value 'xs'
|
|
41
|
+
* @default 'sm'
|
|
42
|
+
*/
|
|
43
|
+
fontSize?: 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
44
|
+
/**
|
|
45
|
+
* animation prop determines if the skeleton should animate or not.
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
48
|
+
animation?: boolean;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Use Skeleton component while a page is loading.
|
|
52
|
+
*/
|
|
53
|
+
export const Skeleton = React.forwardRef<HTMLSpanElement, SkeletonProps>(
|
|
54
|
+
function Skeleton(
|
|
55
|
+
{
|
|
56
|
+
width,
|
|
57
|
+
height,
|
|
58
|
+
fontSize,
|
|
59
|
+
variant = 'text',
|
|
60
|
+
animation = true,
|
|
61
|
+
className,
|
|
62
|
+
children,
|
|
63
|
+
...props
|
|
64
|
+
},
|
|
65
|
+
ref
|
|
66
|
+
) {
|
|
67
|
+
return (
|
|
68
|
+
<Base
|
|
69
|
+
as="span"
|
|
70
|
+
ref={ref}
|
|
71
|
+
className={clsx(className, {
|
|
72
|
+
'ds-skeleton': true,
|
|
73
|
+
[`ds-skeleton--font-${fontSize}`]:
|
|
74
|
+
fontSize !== undefined && variant === 'text',
|
|
75
|
+
[`ds-skeleton--${variant}`]:
|
|
76
|
+
!!variant && (!children || typeof children === 'string'),
|
|
77
|
+
'ds-skeleton--animate': !!animation,
|
|
78
|
+
'ds-skeleton--width-fit-content': !!children && !width,
|
|
79
|
+
})}
|
|
80
|
+
{...props}
|
|
81
|
+
style={{
|
|
82
|
+
width:
|
|
83
|
+
typeof children === 'string'
|
|
84
|
+
? Math.ceil(children.length * 0.5) + 'em'
|
|
85
|
+
: width,
|
|
86
|
+
maxWidth: !!width ? '100%' : undefined,
|
|
87
|
+
height: height,
|
|
88
|
+
}}
|
|
89
|
+
>
|
|
90
|
+
{variant === 'button' && (
|
|
91
|
+
<span
|
|
92
|
+
className={clsx({
|
|
93
|
+
'ds-skeleton__line': true,
|
|
94
|
+
'ds-skeleton__line--size-default':
|
|
95
|
+
width === undefined && height === undefined,
|
|
96
|
+
})}
|
|
97
|
+
></span>
|
|
98
|
+
)}
|
|
99
|
+
{typeof children != 'string' && children}
|
|
100
|
+
</Base>
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
export default Skeleton;
|
|
@@ -12,13 +12,23 @@ export interface SummaryListProps extends BaseProps<'dl'> {
|
|
|
12
12
|
* @default true
|
|
13
13
|
*/
|
|
14
14
|
border?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* noLastBorder is optional.
|
|
17
|
+
* By default, SummaryList has borders. You can remove last border by using noLastBorder prop.
|
|
18
|
+
* By default is true
|
|
19
|
+
* @value true
|
|
20
|
+
* @value false
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
noLastBorder?: boolean
|
|
24
|
+
|
|
15
25
|
}
|
|
16
26
|
/**
|
|
17
27
|
* SummaryList used as a table with summary informations.
|
|
18
28
|
* It must contain a list of SummaryListItem components.
|
|
19
29
|
*/
|
|
20
30
|
export const SummaryList = React.forwardRef<HTMLDListElement, SummaryListProps>(
|
|
21
|
-
function SummaryList({ className, border = true, children, ...props }, ref) {
|
|
31
|
+
function SummaryList({ className, noLastBorder = false, border = true, children, ...props }, ref) {
|
|
22
32
|
return (
|
|
23
33
|
<Base
|
|
24
34
|
as="dl"
|
|
@@ -26,6 +36,7 @@ export const SummaryList = React.forwardRef<HTMLDListElement, SummaryListProps>(
|
|
|
26
36
|
className={clsx(className, {
|
|
27
37
|
'ds-summary-list': true,
|
|
28
38
|
'ds-summary-list--no-border': !border,
|
|
39
|
+
'ds-summary-list--no-last-border': noLastBorder
|
|
29
40
|
})}
|
|
30
41
|
{...props}
|
|
31
42
|
>
|
package/src/Tabs/index.tsx
CHANGED
|
@@ -3,7 +3,6 @@ import clsx from 'clsx';
|
|
|
3
3
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
4
|
|
|
5
5
|
export interface TabsProps extends BaseProps<'div'> {
|
|
6
|
-
direction?: 'vertical' | 'horizontal';
|
|
7
6
|
/**
|
|
8
7
|
* dense is optional.
|
|
9
8
|
* @value true Tabs will be dense.
|
|
@@ -17,7 +16,7 @@ export interface TabsProps extends BaseProps<'div'> {
|
|
|
17
16
|
* This component must contain TabsHeading, TabsList, and a list of TabsPanel component.
|
|
18
17
|
*/
|
|
19
18
|
export const Tabs = React.forwardRef<HTMLDivElement, TabsProps>(function Tabs(
|
|
20
|
-
{
|
|
19
|
+
{ className, dense, children, ...props },
|
|
21
20
|
ref
|
|
22
21
|
) {
|
|
23
22
|
return (
|
|
@@ -26,7 +25,6 @@ export const Tabs = React.forwardRef<HTMLDivElement, TabsProps>(function Tabs(
|
|
|
26
25
|
ref={ref}
|
|
27
26
|
className={clsx(className, {
|
|
28
27
|
'ds-tabs': true,
|
|
29
|
-
'ds-tabs--vertical': direction === 'vertical',
|
|
30
28
|
'ds-tabs--dense': dense,
|
|
31
29
|
})}
|
|
32
30
|
{...props}
|
|
@@ -11,7 +11,7 @@ exports[`renders the TabsHeading with no props 1`] = `
|
|
|
11
11
|
xsUpHidden={false}
|
|
12
12
|
>
|
|
13
13
|
<div
|
|
14
|
-
className="ds-hidden-md
|
|
14
|
+
className="ds-hidden-md-up"
|
|
15
15
|
>
|
|
16
16
|
<ForwardRef(Heading)
|
|
17
17
|
size="sm"
|
|
@@ -51,7 +51,7 @@ exports[`renders the TabsHeading with size=m 1`] = `
|
|
|
51
51
|
xsUpHidden={false}
|
|
52
52
|
>
|
|
53
53
|
<div
|
|
54
|
-
className="ds-hidden-md
|
|
54
|
+
className="ds-hidden-md-up"
|
|
55
55
|
>
|
|
56
56
|
<ForwardRef(Heading)
|
|
57
57
|
size="md"
|
|
@@ -91,7 +91,7 @@ exports[`renders the TabsHeading with size=s 1`] = `
|
|
|
91
91
|
xsUpHidden={false}
|
|
92
92
|
>
|
|
93
93
|
<div
|
|
94
|
-
className="ds-hidden-md
|
|
94
|
+
className="ds-hidden-md-up"
|
|
95
95
|
>
|
|
96
96
|
<ForwardRef(Heading)
|
|
97
97
|
size="sm"
|
package/src/Unpurge/index.tsx
CHANGED
|
@@ -687,8 +687,20 @@ function Unpurge() {
|
|
|
687
687
|
ds-heading-md
|
|
688
688
|
ds-heading-lg
|
|
689
689
|
ds-heading-xl
|
|
690
|
-
ds-image-logo
|
|
691
|
-
ds-image-logo
|
|
690
|
+
ds-image-logo-light
|
|
691
|
+
ds-image-logo-dark
|
|
692
|
+
ds-autocomplete__multi-input-container--1
|
|
693
|
+
ds-autocomplete__multi-input-container--2
|
|
694
|
+
ds-autocomplete__multi-input-container--3
|
|
695
|
+
ds-skeleton--text
|
|
696
|
+
ds-skeleton--circular
|
|
697
|
+
ds-skeleton--rectangular
|
|
698
|
+
ds-skeleton--button
|
|
699
|
+
ds-skeleton--font-xs
|
|
700
|
+
ds-skeleton--font-sm
|
|
701
|
+
ds-skeleton--font-md
|
|
702
|
+
ds-skeleton--font-lg
|
|
703
|
+
ds-skeleton--font-xl
|
|
692
704
|
`}
|
|
693
705
|
></div>
|
|
694
706
|
);
|
package/src/index.ts
CHANGED
|
@@ -152,7 +152,9 @@ export * from '@digigov/react-core/AutoCompleteInput';
|
|
|
152
152
|
export * from '@digigov/react-core/AutoCompleteInputTypeahead';
|
|
153
153
|
export * from '@digigov/react-core/AutoCompleteResultList';
|
|
154
154
|
export * from '@digigov/react-core/AutoCompleteResultListItem';
|
|
155
|
-
export * from '@digigov/react-core/
|
|
155
|
+
export * from '@digigov/react-core/AutoCompleteContainer';
|
|
156
|
+
export * from '@digigov/react-core/AutoCompleteMultipleInputContainer';
|
|
157
|
+
export * from '@digigov/react-core/AutoCompleteMultipleInput';
|
|
156
158
|
export * from '@digigov/react-core/Chip';
|
|
157
159
|
export * from '@digigov/react-core/ChipHeading';
|
|
158
160
|
export * from '@digigov/react-core/ChipContainer';
|
package/src/lazy.js
CHANGED
|
@@ -15,13 +15,15 @@ export default {
|
|
|
15
15
|
'AdminTopSection': lazy(() => import('@digigov/react-core/AdminTopSection').then((module)=> ({default: module['AdminTopSection']}))),
|
|
16
16
|
'Aside': lazy(() => import('@digigov/react-core/Aside').then((module)=> ({default: module['Aside']}))),
|
|
17
17
|
'AutoCompleteAssistiveHint': lazy(() => import('@digigov/react-core/AutoCompleteAssistiveHint').then((module)=> ({default: module['AutoCompleteAssistiveHint']}))),
|
|
18
|
+
'AutoCompleteContainer': lazy(() => import('@digigov/react-core/AutoCompleteContainer').then((module)=> ({default: module['AutoCompleteContainer']}))),
|
|
18
19
|
'AutoCompleteInput': lazy(() => import('@digigov/react-core/AutoCompleteInput').then((module)=> ({default: module['AutoCompleteInput']}))),
|
|
19
20
|
'AutoCompleteInputTypeahead': lazy(() => import('@digigov/react-core/AutoCompleteInputTypeahead').then((module)=> ({default: module['AutoCompleteInputTypeahead']}))),
|
|
21
|
+
'AutoCompleteMultipleInput': lazy(() => import('@digigov/react-core/AutoCompleteMultipleInput').then((module)=> ({default: module['AutoCompleteMultipleInput']}))),
|
|
22
|
+
'AutoCompleteMultipleInputContainer': lazy(() => import('@digigov/react-core/AutoCompleteMultipleInputContainer').then((module)=> ({default: module['AutoCompleteMultipleInputContainer']}))),
|
|
20
23
|
'AutoCompleteResultList': lazy(() => import('@digigov/react-core/AutoCompleteResultList').then((module)=> ({default: module['AutoCompleteResultList']}))),
|
|
21
24
|
'AutoCompleteResultListItem': lazy(() => import('@digigov/react-core/AutoCompleteResultListItem').then((module)=> ({default: module['AutoCompleteResultListItem']}))),
|
|
22
25
|
'AutoCompleteStatus': lazy(() => import('@digigov/react-core/AutoCompleteStatus').then((module)=> ({default: module['AutoCompleteStatus']}))),
|
|
23
|
-
'
|
|
24
|
-
'AutoCompleteWrapper': lazy(() => import('@digigov/react-core/AutoCompleteWrapper').then((module)=> ({default: module['AutoCompleteWrapper']}))),
|
|
26
|
+
'AutoCompleteStatusContainer': lazy(() => import('@digigov/react-core/AutoCompleteStatusContainer').then((module)=> ({default: module['AutoCompleteStatusContainer']}))),
|
|
25
27
|
'BackLink': lazy(() => import('@digigov/react-core/BackLink').then((module)=> ({default: module['BackLink']}))),
|
|
26
28
|
'BackToTopContainer': lazy(() => import('@digigov/react-core/BackToTopContainer').then((module)=> ({default: module['BackToTopContainer']}))),
|
|
27
29
|
'BackToTopLimit': lazy(() => import('@digigov/react-core/BackToTopLimit').then((module)=> ({default: module['BackToTopLimit']}))),
|
package/src/registry.js
CHANGED
|
@@ -14,13 +14,15 @@ import * as _digigov_react_core_AdminMain from '@digigov/react-core/AdminMain';
|
|
|
14
14
|
import * as _digigov_react_core_AdminTopSection from '@digigov/react-core/AdminTopSection';
|
|
15
15
|
import * as _digigov_react_core_Aside from '@digigov/react-core/Aside';
|
|
16
16
|
import * as _digigov_react_core_AutoCompleteAssistiveHint from '@digigov/react-core/AutoCompleteAssistiveHint';
|
|
17
|
+
import * as _digigov_react_core_AutoCompleteContainer from '@digigov/react-core/AutoCompleteContainer';
|
|
17
18
|
import * as _digigov_react_core_AutoCompleteInput from '@digigov/react-core/AutoCompleteInput';
|
|
18
19
|
import * as _digigov_react_core_AutoCompleteInputTypeahead from '@digigov/react-core/AutoCompleteInputTypeahead';
|
|
20
|
+
import * as _digigov_react_core_AutoCompleteMultipleInput from '@digigov/react-core/AutoCompleteMultipleInput';
|
|
21
|
+
import * as _digigov_react_core_AutoCompleteMultipleInputContainer from '@digigov/react-core/AutoCompleteMultipleInputContainer';
|
|
19
22
|
import * as _digigov_react_core_AutoCompleteResultList from '@digigov/react-core/AutoCompleteResultList';
|
|
20
23
|
import * as _digigov_react_core_AutoCompleteResultListItem from '@digigov/react-core/AutoCompleteResultListItem';
|
|
21
24
|
import * as _digigov_react_core_AutoCompleteStatus from '@digigov/react-core/AutoCompleteStatus';
|
|
22
|
-
import * as
|
|
23
|
-
import * as _digigov_react_core_AutoCompleteWrapper from '@digigov/react-core/AutoCompleteWrapper';
|
|
25
|
+
import * as _digigov_react_core_AutoCompleteStatusContainer from '@digigov/react-core/AutoCompleteStatusContainer';
|
|
24
26
|
import * as _digigov_react_core_BackLink from '@digigov/react-core/BackLink';
|
|
25
27
|
import * as _digigov_react_core_BackToTopContainer from '@digigov/react-core/BackToTopContainer';
|
|
26
28
|
import * as _digigov_react_core_BackToTopLimit from '@digigov/react-core/BackToTopLimit';
|
|
@@ -190,6 +192,7 @@ import * as _digigov_react_core_SelectContainer from '@digigov/react-core/Select
|
|
|
190
192
|
import * as _digigov_react_core_SelectOption from '@digigov/react-core/SelectOption';
|
|
191
193
|
import * as _digigov_react_core_SingleCharacterInput from '@digigov/react-core/SingleCharacterInput';
|
|
192
194
|
import * as _digigov_react_core_SingleCharacterInputs from '@digigov/react-core/SingleCharacterInputs';
|
|
195
|
+
import * as _digigov_react_core_Skeleton from '@digigov/react-core/Skeleton';
|
|
193
196
|
import * as _digigov_react_core_SkipLink from '@digigov/react-core/SkipLink';
|
|
194
197
|
import * as _digigov_react_core_Stack from '@digigov/react-core/Stack';
|
|
195
198
|
import * as _digigov_react_core_StepNav from '@digigov/react-core/StepNav';
|
|
@@ -277,13 +280,15 @@ export default {
|
|
|
277
280
|
'@digigov/react-core/AdminTopSection': lazyImport(_digigov_react_core_AdminTopSection),
|
|
278
281
|
'@digigov/react-core/Aside': lazyImport(_digigov_react_core_Aside),
|
|
279
282
|
'@digigov/react-core/AutoCompleteAssistiveHint': lazyImport(_digigov_react_core_AutoCompleteAssistiveHint),
|
|
283
|
+
'@digigov/react-core/AutoCompleteContainer': lazyImport(_digigov_react_core_AutoCompleteContainer),
|
|
280
284
|
'@digigov/react-core/AutoCompleteInput': lazyImport(_digigov_react_core_AutoCompleteInput),
|
|
281
285
|
'@digigov/react-core/AutoCompleteInputTypeahead': lazyImport(_digigov_react_core_AutoCompleteInputTypeahead),
|
|
286
|
+
'@digigov/react-core/AutoCompleteMultipleInput': lazyImport(_digigov_react_core_AutoCompleteMultipleInput),
|
|
287
|
+
'@digigov/react-core/AutoCompleteMultipleInputContainer': lazyImport(_digigov_react_core_AutoCompleteMultipleInputContainer),
|
|
282
288
|
'@digigov/react-core/AutoCompleteResultList': lazyImport(_digigov_react_core_AutoCompleteResultList),
|
|
283
289
|
'@digigov/react-core/AutoCompleteResultListItem': lazyImport(_digigov_react_core_AutoCompleteResultListItem),
|
|
284
290
|
'@digigov/react-core/AutoCompleteStatus': lazyImport(_digigov_react_core_AutoCompleteStatus),
|
|
285
|
-
'@digigov/react-core/
|
|
286
|
-
'@digigov/react-core/AutoCompleteWrapper': lazyImport(_digigov_react_core_AutoCompleteWrapper),
|
|
291
|
+
'@digigov/react-core/AutoCompleteStatusContainer': lazyImport(_digigov_react_core_AutoCompleteStatusContainer),
|
|
287
292
|
'@digigov/react-core/BackLink': lazyImport(_digigov_react_core_BackLink),
|
|
288
293
|
'@digigov/react-core/BackToTopContainer': lazyImport(_digigov_react_core_BackToTopContainer),
|
|
289
294
|
'@digigov/react-core/BackToTopLimit': lazyImport(_digigov_react_core_BackToTopLimit),
|
|
@@ -453,6 +458,7 @@ export default {
|
|
|
453
458
|
'@digigov/react-core/SelectOption': lazyImport(_digigov_react_core_SelectOption),
|
|
454
459
|
'@digigov/react-core/SingleCharacterInput': lazyImport(_digigov_react_core_SingleCharacterInput),
|
|
455
460
|
'@digigov/react-core/SingleCharacterInputs': lazyImport(_digigov_react_core_SingleCharacterInputs),
|
|
461
|
+
'@digigov/react-core/Skeleton': lazyImport(_digigov_react_core_Skeleton),
|
|
456
462
|
'@digigov/react-core/SkipLink': lazyImport(_digigov_react_core_SkipLink),
|
|
457
463
|
'@digigov/react-core/Stack': lazyImport(_digigov_react_core_Stack),
|
|
458
464
|
'@digigov/react-core/StepNav': lazyImport(_digigov_react_core_StepNav),
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { mount } from 'enzyme';
|
|
3
|
-
import AutoCompleteStatusWrapper from '@digigov/react-core/AutoCompleteStatusWrapper';
|
|
4
|
-
var _ref = /*#__PURE__*/React.createElement(AutoCompleteStatusWrapper, null, "hello");
|
|
5
|
-
it('renders the AdminContainer with no props', function () {
|
|
6
|
-
expect(mount(_ref)).toMatchSnapshot();
|
|
7
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
-
export interface AutoCompleteWrapperProps extends BaseProps<'div'> {
|
|
4
|
-
/**
|
|
5
|
-
* width is optional.
|
|
6
|
-
* Use width prop to define a custom width in your component.
|
|
7
|
-
* @value '25%';
|
|
8
|
-
* @value '33.3%';
|
|
9
|
-
* @value '50%';
|
|
10
|
-
* @value '66.6%';
|
|
11
|
-
* @value '75%';
|
|
12
|
-
* @value '100%';
|
|
13
|
-
* @value 'full';
|
|
14
|
-
*/
|
|
15
|
-
width?: '25%' | '33.3%' | '50%' | '66.6%' | '75%' | '100%' | 'full';
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* AutoCompleteWrapper is a wrapper for autocomplete element.
|
|
19
|
-
* Use AutoCompleteWrapper to wrap autocomplete elements.
|
|
20
|
-
*/
|
|
21
|
-
export declare const AutoCompleteWrapper: React.ForwardRefExoticComponent<Pick<AutoCompleteWrapperProps, "p" | "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "width" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "m" | "mt" | "mb" | "ml" | "mr" | "mx" | "my" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "pt" | "pb" | "pl" | "pr" | "px" | "py" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
-
export default AutoCompleteWrapper;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { mount } from 'enzyme';
|
|
3
|
-
import AutoCompleteWrapper from '@digigov/react-core/AutoCompleteWrapper';
|
|
4
|
-
var _ref = /*#__PURE__*/React.createElement(AutoCompleteWrapper, null, "hello");
|
|
5
|
-
it('renders the AdminContainer with no props', function () {
|
|
6
|
-
expect(mount(_ref)).toMatchSnapshot();
|
|
7
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`renders the AdminContainer with no props 1`] = `
|
|
4
|
-
<ForwardRef(AutoCompleteStatusWrapper)>
|
|
5
|
-
<ForwardRef(Base)
|
|
6
|
-
as="div"
|
|
7
|
-
className="ds-autocomplete__status__wrapper"
|
|
8
|
-
>
|
|
9
|
-
<div
|
|
10
|
-
className="ds-autocomplete__status__wrapper"
|
|
11
|
-
>
|
|
12
|
-
hello
|
|
13
|
-
</div>
|
|
14
|
-
</ForwardRef(Base)>
|
|
15
|
-
</ForwardRef(AutoCompleteStatusWrapper)>
|
|
16
|
-
`;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { mount } from 'enzyme';
|
|
3
|
-
|
|
4
|
-
import AutoCompleteStatusWrapper from '@digigov/react-core/AutoCompleteStatusWrapper';
|
|
5
|
-
|
|
6
|
-
it('renders the AdminContainer with no props', () => {
|
|
7
|
-
expect(
|
|
8
|
-
mount(<AutoCompleteStatusWrapper>hello</AutoCompleteStatusWrapper>)
|
|
9
|
-
).toMatchSnapshot();
|
|
10
|
-
});
|
|
@@ -1,28 +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 AutoCompleteStatusWrapperProps extends BaseProps<'div'> { }
|
|
6
|
-
/**
|
|
7
|
-
* AutoCompleteStatusWrapper is a wrapper for autocomplete element.
|
|
8
|
-
* Use AutoCompleteStatusWrapper to wrap autocomplete elements.
|
|
9
|
-
*/
|
|
10
|
-
export const AutoCompleteStatusWrapper = React.forwardRef<
|
|
11
|
-
HTMLDivElement,
|
|
12
|
-
AutoCompleteStatusWrapperProps
|
|
13
|
-
>(function AutoCompleteStatusWrapper({ className, children, ...props }, ref) {
|
|
14
|
-
return (
|
|
15
|
-
<Base
|
|
16
|
-
as="div"
|
|
17
|
-
ref={ref}
|
|
18
|
-
className={clsx(className, {
|
|
19
|
-
'ds-autocomplete__status__wrapper': true,
|
|
20
|
-
})}
|
|
21
|
-
{...props}
|
|
22
|
-
>
|
|
23
|
-
{children}
|
|
24
|
-
</Base>
|
|
25
|
-
);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
export default AutoCompleteStatusWrapper;
|
|
File without changes
|
|
File without changes
|