@charcoal-ui/react 2.0.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_lib/compat.d.ts +13 -13
- package/dist/_lib/index.d.ts +25 -25
- package/dist/components/Button/index.d.ts +21 -21
- package/dist/components/Button/index.story.d.ts +35 -35
- package/dist/components/Checkbox/index.d.ts +20 -20
- package/dist/components/Checkbox/index.story.d.ts +15 -15
- package/dist/components/Clickable/index.d.ts +18 -18
- package/dist/components/Clickable/index.story.d.ts +8 -8
- package/dist/components/DropdownSelector/Listbox.d.ts +9 -9
- package/dist/components/DropdownSelector/Popover.d.ts +9 -9
- package/dist/components/DropdownSelector/index.d.ts +31 -31
- package/dist/components/DropdownSelector/index.story.d.ts +21 -21
- package/dist/components/FieldLabel/index.d.ts +10 -10
- package/dist/components/Icon/index.d.ts +11 -11
- package/dist/components/Icon/index.story.d.ts +23 -23
- package/dist/components/IconButton/index.d.ts +13 -13
- package/dist/components/IconButton/index.story.d.ts +28 -28
- package/dist/components/LoadingSpinner/index.d.ts +14 -14
- package/dist/components/LoadingSpinner/index.d.ts.map +1 -1
- package/dist/components/LoadingSpinner/index.story.d.ts +9 -9
- package/dist/components/Modal/ModalPlumbing.d.ts +4 -4
- package/dist/components/Modal/index.d.ts +41 -17
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.story.d.ts +32 -32
- package/dist/components/MultiSelect/context.d.ts +13 -13
- package/dist/components/MultiSelect/index.d.ts +23 -23
- package/dist/components/MultiSelect/index.story.d.ts +74 -74
- package/dist/components/MultiSelect/index.test.d.ts +1 -1
- package/dist/components/Radio/index.d.ts +23 -23
- package/dist/components/Radio/index.d.ts.map +1 -1
- package/dist/components/Radio/index.story.d.ts +33 -33
- package/dist/components/Radio/index.test.d.ts +1 -1
- package/dist/components/SegmentedControl/RadioGroupContext.d.ts +8 -8
- package/dist/components/SegmentedControl/index.d.ts +19 -19
- package/dist/components/SegmentedControl/index.story.d.ts +10 -10
- package/dist/components/Switch/index.d.ts +15 -15
- package/dist/components/Switch/index.story.d.ts +13 -13
- package/dist/components/TagItem/index.d.ts +25 -0
- package/dist/components/TagItem/index.d.ts.map +1 -0
- package/dist/components/TagItem/index.story.d.ts +26 -0
- package/dist/components/TagItem/index.story.d.ts.map +1 -0
- package/dist/components/TextField/index.d.ts +43 -43
- package/dist/components/TextField/index.story.d.ts +29 -29
- package/dist/components/a11y.test.d.ts +1 -1
- package/dist/core/ComponentAbstraction.d.ts +23 -23
- package/dist/core/OverlayProvider.d.ts +2 -0
- package/dist/core/OverlayProvider.d.ts.map +1 -0
- package/dist/core/SSRProvider.d.ts +1 -1
- package/dist/index.cjs +3341 -3297
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +18 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4409 -0
- package/dist/index.js.map +1 -0
- package/dist/styled.d.ts +92 -92
- package/package.json +16 -14
- package/src/components/Checkbox/index.tsx +1 -1
- package/src/components/DropdownSelector/Listbox.tsx +2 -1
- package/src/components/DropdownSelector/index.tsx +6 -2
- package/src/components/LoadingSpinner/index.tsx +7 -6
- package/src/components/Modal/index.tsx +24 -0
- package/src/components/MultiSelect/index.tsx +1 -1
- package/src/components/Radio/index.tsx +4 -3
- package/src/components/Switch/index.tsx +2 -1
- package/src/components/TagItem/index.story.tsx +188 -0
- package/src/components/TagItem/index.tsx +176 -0
- package/src/core/OverlayProvider.tsx +1 -0
- package/src/index.ts +2 -0
- package/dist/index.modern.js +0 -4685
- package/dist/index.modern.js.map +0 -1
- package/dist/index.module.js +0 -4371
- package/dist/index.module.js.map +0 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { Story } from '../../_lib/compat';
|
|
3
|
-
import '@charcoal-ui/icons';
|
|
4
|
-
declare const _default: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: React.ForwardRefExoticComponent<import(".").IconButtonProps & React.RefAttributes<import("../Clickable").ClickableElement>>;
|
|
7
|
-
argTypes: {
|
|
8
|
-
variant: {
|
|
9
|
-
control: {
|
|
10
|
-
type: string;
|
|
11
|
-
options: string[];
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
size: {
|
|
15
|
-
control: {
|
|
16
|
-
type: string;
|
|
17
|
-
options: string[];
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|
|
23
|
-
declare type Props = {
|
|
24
|
-
variant?: 'Default' | 'Overlay';
|
|
25
|
-
size?: 'M' | 'S' | 'XS';
|
|
26
|
-
};
|
|
27
|
-
export declare const DefaultM: Story<Props>;
|
|
28
|
-
export declare const OverlayM: Story<Props>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Story } from '../../_lib/compat';
|
|
3
|
+
import '@charcoal-ui/icons';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<import(".").IconButtonProps & React.RefAttributes<import("../Clickable").ClickableElement>>;
|
|
7
|
+
argTypes: {
|
|
8
|
+
variant: {
|
|
9
|
+
control: {
|
|
10
|
+
type: string;
|
|
11
|
+
options: string[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
size: {
|
|
15
|
+
control: {
|
|
16
|
+
type: string;
|
|
17
|
+
options: string[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
23
|
+
declare type Props = {
|
|
24
|
+
variant?: 'Default' | 'Overlay';
|
|
25
|
+
size?: 'M' | 'S' | 'XS';
|
|
26
|
+
};
|
|
27
|
+
export declare const DefaultM: Story<Props>;
|
|
28
|
+
export declare const OverlayM: Story<Props>;
|
|
29
29
|
//# sourceMappingURL=index.story.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export default function LoadingSpinner({ size, padding, transparent, }: {
|
|
3
|
-
size?: number | undefined;
|
|
4
|
-
padding?: number | undefined;
|
|
5
|
-
transparent?: boolean | undefined;
|
|
6
|
-
}): JSX.Element;
|
|
7
|
-
interface Props {
|
|
8
|
-
once?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface LoadingSpinnerIconHandler {
|
|
11
|
-
restart(): void;
|
|
12
|
-
}
|
|
13
|
-
export declare const LoadingSpinnerIcon: React.ForwardRefExoticComponent<Props & React.RefAttributes<LoadingSpinnerIconHandler>>;
|
|
14
|
-
export {};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export default function LoadingSpinner({ size, padding, transparent, }: {
|
|
3
|
+
size?: number | undefined;
|
|
4
|
+
padding?: number | undefined;
|
|
5
|
+
transparent?: boolean | undefined;
|
|
6
|
+
}): JSX.Element;
|
|
7
|
+
interface Props {
|
|
8
|
+
once?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface LoadingSpinnerIconHandler {
|
|
11
|
+
restart(): void;
|
|
12
|
+
}
|
|
13
|
+
export declare const LoadingSpinnerIcon: React.ForwardRefExoticComponent<Props & React.RefAttributes<LoadingSpinnerIconHandler>>;
|
|
14
|
+
export {};
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/LoadingSpinner/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/LoadingSpinner/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAI1D,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,IAAS,EACT,OAAY,EACZ,WAAmB,GACpB;;;;CAAA,eAMA;AA8CD,UAAU,KAAK;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,IAAI,IAAI,CAAA;CAChB;AAED,eAAO,MAAM,kBAAkB,yFAmB7B,CAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import LoadingSpinner from '.';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: typeof LoadingSpinner;
|
|
5
|
-
decorators: ((...args: any) => any)[];
|
|
6
|
-
};
|
|
7
|
-
export default _default;
|
|
8
|
-
export declare function Basic(): JSX.Element;
|
|
9
|
-
export declare function Icon(): JSX.Element;
|
|
1
|
+
import LoadingSpinner from '.';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: typeof LoadingSpinner;
|
|
5
|
+
decorators: ((...args: any) => any)[];
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare function Basic(): JSX.Element;
|
|
9
|
+
export declare function Icon(): JSX.Element;
|
|
10
10
|
//# sourceMappingURL=index.story.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare function ModalHeader(): JSX.Element;
|
|
2
|
-
export declare const ModalAlign: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
-
export declare const ModalBody: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
-
export declare const ModalButtons: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
1
|
+
export declare function ModalHeader(): JSX.Element;
|
|
2
|
+
export declare const ModalAlign: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const ModalBody: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const ModalButtons: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
5
|
//# sourceMappingURL=ModalPlumbing.d.ts.map
|
|
@@ -1,18 +1,42 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AriaModalOverlayProps } from '@react-aria/overlays';
|
|
3
|
-
import { AriaDialogProps } from '@react-types/dialog';
|
|
4
|
-
import { ButtonProps } from '../Button';
|
|
5
|
-
export declare type ModalProps = AriaModalOverlayProps & AriaDialogProps & {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
zIndex?: number;
|
|
8
|
-
title: string;
|
|
9
|
-
size?: 'S' | 'M' | 'L';
|
|
10
|
-
bottomSheet?: boolean | 'full';
|
|
11
|
-
isOpen: boolean;
|
|
12
|
-
onClose: () => void;
|
|
13
|
-
portalContainer?: HTMLElement;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AriaModalOverlayProps } from '@react-aria/overlays';
|
|
3
|
+
import { AriaDialogProps } from '@react-types/dialog';
|
|
4
|
+
import { ButtonProps } from '../Button';
|
|
5
|
+
export declare type ModalProps = AriaModalOverlayProps & AriaDialogProps & {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
zIndex?: number;
|
|
8
|
+
title: string;
|
|
9
|
+
size?: 'S' | 'M' | 'L';
|
|
10
|
+
bottomSheet?: boolean | 'full';
|
|
11
|
+
isOpen: boolean;
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
portalContainer?: HTMLElement;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* モーダルコンポーネント。
|
|
17
|
+
*
|
|
18
|
+
* @example アプリケーションルートで `<OverlayProvider>` で囲った上で利用する
|
|
19
|
+
* ```tsx
|
|
20
|
+
* import {
|
|
21
|
+
* OverlayProvider,
|
|
22
|
+
* Modal,
|
|
23
|
+
* ModalHeader,
|
|
24
|
+
* ModalBody,
|
|
25
|
+
* ModalButtons
|
|
26
|
+
* } from '@charcoal-ui/react'
|
|
27
|
+
*
|
|
28
|
+
* <OverlayProvider>
|
|
29
|
+
* <App>
|
|
30
|
+
* <Modal isOpen={state.isOpen} onClose={() => state.close()} isDismissable>
|
|
31
|
+
* <ModalHeader />
|
|
32
|
+
* <ModalBody>...</ModalBody>
|
|
33
|
+
* <ModalButtons>...</ModalButtons>
|
|
34
|
+
* </Modal>
|
|
35
|
+
* </App>
|
|
36
|
+
* </OverlayProvider>
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export default function Modal({ children, zIndex, portalContainer, ...props }: ModalProps): JSX.Element;
|
|
40
|
+
export declare function ModalTitle(props: React.HTMLAttributes<HTMLHeadingElement>): JSX.Element;
|
|
41
|
+
export declare function ModalDismissButton({ children, ...props }: ButtonProps): JSX.Element | null;
|
|
18
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAA;AACjD,OAAO,EACL,qBAAqB,EAKtB,MAAM,sBAAsB,CAAA;AAK7B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAMrD,OAAe,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAG/C,oBAAY,UAAU,GAAG,qBAAqB,GAC5C,eAAe,GAAG;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;IACtB,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC9B,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,MAAM,IAAI,CAAA;IAInB,eAAe,CAAC,EAAE,WAAW,CAAA;CAC9B,CAAA;AAIH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,QAAQ,EACR,MAAwB,EACxB,eAAe,EACf,GAAG,KAAK,EACT,EAAE,UAAU,eA+FZ;AAgFD,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,eAOzE;AAQD,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,sBAYrE"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAA;AACjD,OAAO,EACL,qBAAqB,EAKtB,MAAM,sBAAsB,CAAA;AAK7B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAMrD,OAAe,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAG/C,oBAAY,UAAU,GAAG,qBAAqB,GAC5C,eAAe,GAAG;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;IACtB,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC9B,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,MAAM,IAAI,CAAA;IAInB,eAAe,CAAC,EAAE,WAAW,CAAA;CAC9B,CAAA;AAIH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,QAAQ,EACR,MAAwB,EACxB,eAAe,EACf,GAAG,KAAK,EACT,EAAE,UAAU,eA+FZ;AAgFD,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,eAOzE;AAQD,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,sBAYrE"}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { Story } from '../../_lib/compat';
|
|
2
|
-
import Modal, { ModalProps } from '.';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof Modal;
|
|
6
|
-
args: {
|
|
7
|
-
title: string;
|
|
8
|
-
};
|
|
9
|
-
argTypes: {
|
|
10
|
-
size: {
|
|
11
|
-
options: string[];
|
|
12
|
-
control: {
|
|
13
|
-
type: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
bottomSheet: {
|
|
17
|
-
options: string[];
|
|
18
|
-
mapping: {
|
|
19
|
-
full: string;
|
|
20
|
-
true: boolean;
|
|
21
|
-
false: boolean;
|
|
22
|
-
};
|
|
23
|
-
control: {
|
|
24
|
-
type: string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export default _default;
|
|
30
|
-
export declare const Default: Story<ModalProps>;
|
|
31
|
-
export declare const FullBottomSheet: Story<ModalProps>;
|
|
32
|
-
export declare const BottomSheet: Story<ModalProps>;
|
|
1
|
+
import { Story } from '../../_lib/compat';
|
|
2
|
+
import Modal, { ModalProps } from '.';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Modal;
|
|
6
|
+
args: {
|
|
7
|
+
title: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
size: {
|
|
11
|
+
options: string[];
|
|
12
|
+
control: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
bottomSheet: {
|
|
17
|
+
options: string[];
|
|
18
|
+
mapping: {
|
|
19
|
+
full: string;
|
|
20
|
+
true: boolean;
|
|
21
|
+
false: boolean;
|
|
22
|
+
};
|
|
23
|
+
control: {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export default _default;
|
|
30
|
+
export declare const Default: Story<ModalProps>;
|
|
31
|
+
export declare const FullBottomSheet: Story<ModalProps>;
|
|
32
|
+
export declare const BottomSheet: Story<ModalProps>;
|
|
33
33
|
//# sourceMappingURL=index.story.d.ts.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
declare type MultiSelectGroupContext = {
|
|
2
|
-
name: string;
|
|
3
|
-
selected: string[];
|
|
4
|
-
disabled: boolean;
|
|
5
|
-
readonly: boolean;
|
|
6
|
-
hasError: boolean;
|
|
7
|
-
onChange: ({ value, selected }: {
|
|
8
|
-
value: string;
|
|
9
|
-
selected: boolean;
|
|
10
|
-
}) => void;
|
|
11
|
-
};
|
|
12
|
-
export declare const MultiSelectGroupContext: import("react").Context<MultiSelectGroupContext>;
|
|
13
|
-
export {};
|
|
1
|
+
declare type MultiSelectGroupContext = {
|
|
2
|
+
name: string;
|
|
3
|
+
selected: string[];
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
readonly: boolean;
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
onChange: ({ value, selected }: {
|
|
8
|
+
value: string;
|
|
9
|
+
selected: boolean;
|
|
10
|
+
}) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const MultiSelectGroupContext: import("react").Context<MultiSelectGroupContext>;
|
|
13
|
+
export {};
|
|
14
14
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare type MultiSelectProps = React.PropsWithChildren<{
|
|
3
|
-
value: string;
|
|
4
|
-
forceChecked?: boolean;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
variant?: 'default' | 'overlay';
|
|
7
|
-
onChange?: (payload: {
|
|
8
|
-
value: string;
|
|
9
|
-
selected: boolean;
|
|
10
|
-
}) => void;
|
|
11
|
-
}>;
|
|
12
|
-
export default function MultiSelect({ value, forceChecked, disabled, onChange, variant, children, }: MultiSelectProps): JSX.Element;
|
|
13
|
-
export declare type MultiSelectGroupProps = React.PropsWithChildren<{
|
|
14
|
-
className?: string;
|
|
15
|
-
name: string;
|
|
16
|
-
ariaLabel: string;
|
|
17
|
-
selected: string[];
|
|
18
|
-
onChange: (selected: string[]) => void;
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
readonly?: boolean;
|
|
21
|
-
hasError?: boolean;
|
|
22
|
-
}>;
|
|
23
|
-
export declare function MultiSelectGroup({ className, name, ariaLabel, selected, onChange, disabled, readonly, hasError, children, }: MultiSelectGroupProps): JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type MultiSelectProps = React.PropsWithChildren<{
|
|
3
|
+
value: string;
|
|
4
|
+
forceChecked?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
variant?: 'default' | 'overlay';
|
|
7
|
+
onChange?: (payload: {
|
|
8
|
+
value: string;
|
|
9
|
+
selected: boolean;
|
|
10
|
+
}) => void;
|
|
11
|
+
}>;
|
|
12
|
+
export default function MultiSelect({ value, forceChecked, disabled, onChange, variant, children, }: MultiSelectProps): JSX.Element;
|
|
13
|
+
export declare type MultiSelectGroupProps = React.PropsWithChildren<{
|
|
14
|
+
className?: string;
|
|
15
|
+
name: string;
|
|
16
|
+
ariaLabel: string;
|
|
17
|
+
selected: string[];
|
|
18
|
+
onChange: (selected: string[]) => void;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
readonly?: boolean;
|
|
21
|
+
hasError?: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
export declare function MultiSelectGroup({ className, name, ariaLabel, selected, onChange, disabled, readonly, hasError, children, }: MultiSelectGroupProps): JSX.Element;
|
|
24
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Story } from '../../_lib/compat';
|
|
3
|
-
import { default as MultiSelect } from '.';
|
|
4
|
-
declare const _default: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: typeof MultiSelect;
|
|
7
|
-
argTypes: {
|
|
8
|
-
name: {
|
|
9
|
-
control: {
|
|
10
|
-
type: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
ariaLabel: {
|
|
14
|
-
control: {
|
|
15
|
-
type: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
selected: {
|
|
19
|
-
control: {
|
|
20
|
-
type: string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
firstOptionForceChecked: {
|
|
24
|
-
control: {
|
|
25
|
-
type: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
disabled: {
|
|
29
|
-
control: {
|
|
30
|
-
type: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
readonly: {
|
|
34
|
-
control: {
|
|
35
|
-
type: string;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
hasError: {
|
|
39
|
-
control: {
|
|
40
|
-
type: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
variant: {
|
|
44
|
-
control: {
|
|
45
|
-
type: string;
|
|
46
|
-
options: string[];
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
export default _default;
|
|
52
|
-
declare type Props = {
|
|
53
|
-
name: string;
|
|
54
|
-
ariaLabel: string;
|
|
55
|
-
selected: boolean;
|
|
56
|
-
firstOptionForceChecked: boolean;
|
|
57
|
-
onChange: (selected: string[]) => void;
|
|
58
|
-
disabled?: boolean;
|
|
59
|
-
readonly?: boolean;
|
|
60
|
-
hasError?: boolean;
|
|
61
|
-
variant?: 'default' | 'overlay';
|
|
62
|
-
};
|
|
63
|
-
export declare const Default: React.FunctionComponent<Props> & {
|
|
64
|
-
args?: Props | undefined;
|
|
65
|
-
};
|
|
66
|
-
declare type PlaygroundProps = {
|
|
67
|
-
name: string;
|
|
68
|
-
ariaLabel: string;
|
|
69
|
-
disabled?: boolean;
|
|
70
|
-
readonly?: boolean;
|
|
71
|
-
hasError?: boolean;
|
|
72
|
-
variant?: 'default' | 'overlay';
|
|
73
|
-
};
|
|
74
|
-
export declare const Playground: Story<PlaygroundProps>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Story } from '../../_lib/compat';
|
|
3
|
+
import { default as MultiSelect } from '.';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: typeof MultiSelect;
|
|
7
|
+
argTypes: {
|
|
8
|
+
name: {
|
|
9
|
+
control: {
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
ariaLabel: {
|
|
14
|
+
control: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
selected: {
|
|
19
|
+
control: {
|
|
20
|
+
type: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
firstOptionForceChecked: {
|
|
24
|
+
control: {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
disabled: {
|
|
29
|
+
control: {
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly: {
|
|
34
|
+
control: {
|
|
35
|
+
type: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
hasError: {
|
|
39
|
+
control: {
|
|
40
|
+
type: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
variant: {
|
|
44
|
+
control: {
|
|
45
|
+
type: string;
|
|
46
|
+
options: string[];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export default _default;
|
|
52
|
+
declare type Props = {
|
|
53
|
+
name: string;
|
|
54
|
+
ariaLabel: string;
|
|
55
|
+
selected: boolean;
|
|
56
|
+
firstOptionForceChecked: boolean;
|
|
57
|
+
onChange: (selected: string[]) => void;
|
|
58
|
+
disabled?: boolean;
|
|
59
|
+
readonly?: boolean;
|
|
60
|
+
hasError?: boolean;
|
|
61
|
+
variant?: 'default' | 'overlay';
|
|
62
|
+
};
|
|
63
|
+
export declare const Default: React.FunctionComponent<Props> & {
|
|
64
|
+
args?: Props | undefined;
|
|
65
|
+
};
|
|
66
|
+
declare type PlaygroundProps = {
|
|
67
|
+
name: string;
|
|
68
|
+
ariaLabel: string;
|
|
69
|
+
disabled?: boolean;
|
|
70
|
+
readonly?: boolean;
|
|
71
|
+
hasError?: boolean;
|
|
72
|
+
variant?: 'default' | 'overlay';
|
|
73
|
+
};
|
|
74
|
+
export declare const Playground: Story<PlaygroundProps>;
|
|
75
75
|
//# sourceMappingURL=index.story.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=index.test.d.ts.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare type RadioProps = React.PropsWithChildren<{
|
|
3
|
-
value: string;
|
|
4
|
-
forceChecked?: boolean;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
}>;
|
|
7
|
-
export default function Radio({ value, forceChecked, disabled, children, }: RadioProps): JSX.Element;
|
|
8
|
-
export declare const RadioInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {
|
|
9
|
-
type: "radio";
|
|
10
|
-
} & {
|
|
11
|
-
hasError?: boolean | undefined;
|
|
12
|
-
}, "type">;
|
|
13
|
-
export declare type RadioGroupProps = React.PropsWithChildren<{
|
|
14
|
-
className?: string;
|
|
15
|
-
value?: string;
|
|
16
|
-
label: string;
|
|
17
|
-
name: string;
|
|
18
|
-
onChange(next: string): void;
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
readonly?: boolean;
|
|
21
|
-
hasError?: boolean;
|
|
22
|
-
}>;
|
|
23
|
-
export declare function RadioGroup({ className, value, label, name, onChange, disabled, readonly, hasError, children, }: RadioGroupProps): JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type RadioProps = React.PropsWithChildren<{
|
|
3
|
+
value: string;
|
|
4
|
+
forceChecked?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
export default function Radio({ value, forceChecked, disabled, children, }: RadioProps): JSX.Element;
|
|
8
|
+
export declare const RadioInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {
|
|
9
|
+
type: "radio";
|
|
10
|
+
} & {
|
|
11
|
+
hasError?: boolean | undefined;
|
|
12
|
+
}, "type">;
|
|
13
|
+
export declare type RadioGroupProps = React.PropsWithChildren<{
|
|
14
|
+
className?: string;
|
|
15
|
+
value?: string;
|
|
16
|
+
label: string;
|
|
17
|
+
name: string;
|
|
18
|
+
onChange(next: string): void;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
readonly?: boolean;
|
|
21
|
+
hasError?: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
export declare function RadioGroup({ className, value, label, name, onChange, disabled, readonly, hasError, children, }: RadioGroupProps): JSX.Element;
|
|
24
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AAMtD,oBAAY,UAAU,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC,CAAA;AAEF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,KAAK,EACL,YAAoB,EACpB,QAAgB,EAChB,QAAQ,GACT,EAAE,UAAU,eAwCZ;AAYD,eAAO,MAAM,UAAU;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AAMtD,oBAAY,UAAU,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC,CAAA;AAEF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,KAAK,EACL,YAAoB,EACpB,QAAgB,EAChB,QAAQ,GACT,EAAE,UAAU,eAwCZ;AAYD,eAAO,MAAM,UAAU;;;;UA4CtB,CAAA;AAMD,oBAAY,eAAe,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACpD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC,CAAA;AA+BF,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,KAAK,EACL,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE,eAAe,eA8BjB"}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Radio from '.';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof Radio;
|
|
6
|
-
argTypes: {
|
|
7
|
-
value: {
|
|
8
|
-
control: {
|
|
9
|
-
type: string;
|
|
10
|
-
};
|
|
11
|
-
options: string[];
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
args: {
|
|
15
|
-
hasError: boolean;
|
|
16
|
-
parentDisabled: boolean;
|
|
17
|
-
childDisabled: boolean;
|
|
18
|
-
forceChecked: boolean;
|
|
19
|
-
readonly: boolean;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|
|
23
|
-
interface Props {
|
|
24
|
-
value?: string;
|
|
25
|
-
hasError: boolean;
|
|
26
|
-
parentDisabled: boolean;
|
|
27
|
-
childDisabled: boolean;
|
|
28
|
-
forceChecked: boolean;
|
|
29
|
-
readonly: boolean;
|
|
30
|
-
}
|
|
31
|
-
export declare const Default: React.FunctionComponent<Partial<Props>> & {
|
|
32
|
-
args?: Partial<Props> | undefined;
|
|
33
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Radio from '.';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Radio;
|
|
6
|
+
argTypes: {
|
|
7
|
+
value: {
|
|
8
|
+
control: {
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
options: string[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
args: {
|
|
15
|
+
hasError: boolean;
|
|
16
|
+
parentDisabled: boolean;
|
|
17
|
+
childDisabled: boolean;
|
|
18
|
+
forceChecked: boolean;
|
|
19
|
+
readonly: boolean;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
23
|
+
interface Props {
|
|
24
|
+
value?: string;
|
|
25
|
+
hasError: boolean;
|
|
26
|
+
parentDisabled: boolean;
|
|
27
|
+
childDisabled: boolean;
|
|
28
|
+
forceChecked: boolean;
|
|
29
|
+
readonly: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare const Default: React.FunctionComponent<Partial<Props>> & {
|
|
32
|
+
args?: Partial<Props> | undefined;
|
|
33
|
+
};
|
|
34
34
|
//# sourceMappingURL=index.story.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=index.test.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RadioGroupState } from 'react-stately';
|
|
3
|
-
declare type RadioProviderProps = React.PropsWithChildren<{
|
|
4
|
-
value: RadioGroupState;
|
|
5
|
-
}>;
|
|
6
|
-
export declare const RadioProvider: React.FC<RadioProviderProps>;
|
|
7
|
-
export declare const useRadioContext: () => RadioGroupState;
|
|
8
|
-
export {};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RadioGroupState } from 'react-stately';
|
|
3
|
+
declare type RadioProviderProps = React.PropsWithChildren<{
|
|
4
|
+
value: RadioGroupState;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const RadioProvider: React.FC<RadioProviderProps>;
|
|
7
|
+
export declare const useRadioContext: () => RadioGroupState;
|
|
8
|
+
export {};
|
|
9
9
|
//# sourceMappingURL=RadioGroupContext.d.ts.map
|