@instructure/ui-buttons 10.26.1-snapshot-2 → 10.26.1
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/CHANGELOG.md +1 -24
- package/es/BaseButton/index.js +6 -9
- package/es/BaseButton/props.js +26 -1
- package/es/Button/index.js +6 -6
- package/es/Button/props.js +20 -1
- package/es/CloseButton/index.js +8 -12
- package/es/CloseButton/props.js +18 -1
- package/es/CondensedButton/index.js +6 -6
- package/es/CondensedButton/props.js +17 -1
- package/es/IconButton/index.js +6 -7
- package/es/IconButton/props.js +21 -1
- package/es/ToggleButton/index.js +6 -10
- package/es/ToggleButton/props.js +19 -1
- package/lib/BaseButton/index.js +5 -8
- package/lib/BaseButton/props.js +27 -1
- package/lib/Button/index.js +5 -5
- package/lib/Button/props.js +21 -1
- package/lib/CloseButton/index.js +7 -11
- package/lib/CloseButton/props.js +19 -1
- package/lib/CondensedButton/index.js +5 -5
- package/lib/CondensedButton/props.js +18 -1
- package/lib/IconButton/index.js +5 -6
- package/lib/IconButton/props.js +22 -1
- package/lib/ToggleButton/index.js +5 -10
- package/lib/ToggleButton/props.js +20 -1
- package/package.json +23 -20
- package/src/BaseButton/index.tsx +4 -7
- package/src/BaseButton/props.ts +40 -3
- package/src/Button/index.tsx +5 -6
- package/src/Button/props.ts +33 -2
- package/src/CloseButton/index.tsx +6 -6
- package/src/CloseButton/props.ts +25 -3
- package/src/CondensedButton/index.tsx +4 -2
- package/src/CondensedButton/props.ts +22 -3
- package/src/IconButton/index.tsx +4 -3
- package/src/IconButton/props.ts +33 -2
- package/src/ToggleButton/index.tsx +5 -2
- package/src/ToggleButton/props.ts +31 -2
- package/tsconfig.build.json +2 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/BaseButton/index.d.ts +2 -1
- package/types/BaseButton/index.d.ts.map +1 -1
- package/types/BaseButton/props.d.ts +4 -3
- package/types/BaseButton/props.d.ts.map +1 -1
- package/types/Button/index.d.ts +19 -1
- package/types/Button/index.d.ts.map +1 -1
- package/types/Button/props.d.ts +4 -3
- package/types/Button/props.d.ts.map +1 -1
- package/types/CloseButton/index.d.ts +17 -1
- package/types/CloseButton/index.d.ts.map +1 -1
- package/types/CloseButton/props.d.ts +4 -3
- package/types/CloseButton/props.d.ts.map +1 -1
- package/types/CondensedButton/index.d.ts +16 -1
- package/types/CondensedButton/index.d.ts.map +1 -1
- package/types/CondensedButton/props.d.ts +4 -3
- package/types/CondensedButton/props.d.ts.map +1 -1
- package/types/IconButton/index.d.ts +20 -1
- package/types/IconButton/index.d.ts.map +1 -1
- package/types/IconButton/props.d.ts +4 -3
- package/types/IconButton/props.d.ts.map +1 -1
- package/types/ToggleButton/index.d.ts +16 -0
- package/types/ToggleButton/index.d.ts.map +1 -1
- package/types/ToggleButton/props.d.ts +3 -2
- package/types/ToggleButton/props.d.ts.map +1 -1
|
@@ -8,6 +8,7 @@ category: components/utilities
|
|
|
8
8
|
**/
|
|
9
9
|
declare class BaseButton extends Component<BaseButtonProps> {
|
|
10
10
|
static readonly componentId = "BaseButton";
|
|
11
|
+
static propTypes: import("@instructure/shared-types").PropValidators<keyof import("./props").BaseButtonOwnProps>;
|
|
11
12
|
static allowedProps: readonly (keyof import("./props").BaseButtonOwnProps)[];
|
|
12
13
|
static defaultProps: {
|
|
13
14
|
readonly type: "button";
|
|
@@ -29,7 +30,7 @@ declare class BaseButton extends Component<BaseButtonProps> {
|
|
|
29
30
|
componentDidUpdate(): void;
|
|
30
31
|
get makeStylesVariables(): BaseButtonStyleProps;
|
|
31
32
|
get hasOnlyIconVisible(): boolean;
|
|
32
|
-
get elementType(): import("react").ComponentClass<any, any> | import("react").
|
|
33
|
+
get elementType(): import("react").ComponentClass<any, any> | import("react").FunctionComponent<Readonly<BaseButtonProps>> | import("react").ComponentClass<Readonly<BaseButtonProps>, any> | NonNullable<import("@instructure/shared-types").AsElementType | undefined>;
|
|
33
34
|
get interaction(): import("@instructure/ui-react-utils").InteractionType;
|
|
34
35
|
get isDisabled(): boolean;
|
|
35
36
|
get isReadOnly(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/BaseButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/BaseButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAajC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AASrD,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAEpE;;;;GAIG;AAEH,cAEM,UAAW,SAAQ,SAAS,CAAC,eAAe,CAAC;IACjD,MAAM,CAAC,QAAQ,CAAC,WAAW,gBAAe;IAE1C,MAAM,CAAC,SAAS,iGAAY;IAC5B,MAAM,CAAC,YAAY,0DAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;;;;;;MAeT;IAEV,GAAG,EAAE,WAAW,GAAG,IAAI,CAAO;IAE9B,iBAAiB;IAIjB,kBAAkB;IAIlB,IAAI,mBAAmB,IAAI,oBAAoB,CAM9C;IAED,IAAI,kBAAkB,YAGrB;IAED,IAAI,WAAW,0PAEd;IAED,IAAI,WAAW,0DAEd;IAED,IAAI,UAAU,YAEb;IAED,IAAI,UAAU,YAEb;IAED,IAAI,SAAS,YAEZ;IAED,IAAI,UAAU,uBAiBb;IAED,IAAI,OAAO,YAEV;IAED,KAAK;IAIL,gBAAgB,GAAI,IAAI,WAAW,GAAG,IAAI,UAQzC;IAED,WAAW,GAAI,OAAO,KAAK,CAAC,UAAU,CAAC,SAAS,GAAG,OAAO,CAAC,UAa1D;IAED,aAAa,GAAI,OAAO,KAAK,CAAC,aAAa,CAAC,SAAS,GAAG,OAAO,CAAC,UA0B/D;IAED,cAAc;IAgCd,MAAM;CAmFP;AAED,OAAO,EAAE,UAAU,EAAE,CAAA;AACrB,eAAe,UAAU,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { InteractionType } from '@instructure/ui-react-utils';
|
|
3
3
|
import type { Spacing, WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
4
|
-
import type { ToProp, AsElementType, BaseButtonTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
5
|
-
import type { Cursor } from '@instructure/
|
|
4
|
+
import type { ToProp, AsElementType, BaseButtonTheme, OtherHTMLAttributes, PropValidators } from '@instructure/shared-types';
|
|
5
|
+
import type { Cursor } from '@instructure/ui-prop-types';
|
|
6
6
|
import type { ViewProps } from '@instructure/ui-view';
|
|
7
7
|
import { Renderable } from '@instructure/shared-types';
|
|
8
8
|
type BaseButtonOwnProps = {
|
|
@@ -112,7 +112,8 @@ type PropKeys = keyof BaseButtonOwnProps;
|
|
|
112
112
|
type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
113
113
|
type BaseButtonProps = BaseButtonOwnProps & WithStyleProps<BaseButtonTheme, BaseButtonStyle> & OtherHTMLAttributes<BaseButtonOwnProps> & ToProp;
|
|
114
114
|
type BaseButtonStyle = ComponentStyle<'baseButton' | 'content' | 'children' | 'iconSVG' | 'childrenLayout' | 'iconOnly' | 'iconWrapper' | 'childrenWrapper'>;
|
|
115
|
+
declare const propTypes: PropValidators<PropKeys>;
|
|
115
116
|
declare const allowedProps: AllowedPropKeys;
|
|
116
117
|
export type { BaseButtonProps, BaseButtonOwnProps, BaseButtonStyleProps, BaseButtonStyle };
|
|
117
|
-
export { allowedProps };
|
|
118
|
+
export { propTypes, allowedProps };
|
|
118
119
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/BaseButton/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM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AY,GACZ,SAAS,GACT,UAAU,GACV,SAAS,GACT,gBAAgB,GAChB,UAAU,GACV,aAAa,GACb,iBAAiB,CACpB,CAAA;AAED,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CA+BvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAsBnB,CAAA;AAED,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EAChB,CAAA;AACD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
package/types/Button/index.d.ts
CHANGED
|
@@ -8,6 +8,24 @@ category: components
|
|
|
8
8
|
**/
|
|
9
9
|
declare class Button extends Component<ButtonProps> {
|
|
10
10
|
static readonly componentId = "Button";
|
|
11
|
+
static propTypes: import("@instructure/shared-types").PropValidators<keyof {
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
type?: "button" | "submit" | "reset";
|
|
14
|
+
size?: "small" | "medium" | "large";
|
|
15
|
+
elementRef?: (element: Element | null) => void;
|
|
16
|
+
as?: import("@instructure/shared-types").AsElementType;
|
|
17
|
+
interaction?: "enabled" | "disabled" | "readonly";
|
|
18
|
+
color?: "primary" | "primary-inverse" | "secondary" | "success" | "danger" | "ai-primary" | "ai-secondary";
|
|
19
|
+
focusColor?: "info" | "inverse";
|
|
20
|
+
display?: "inline-block" | "block";
|
|
21
|
+
textAlign?: "start" | "center";
|
|
22
|
+
withBackground?: boolean;
|
|
23
|
+
margin?: import("@instructure/emotion").Spacing;
|
|
24
|
+
cursor?: import("@instructure/ui-prop-types").Cursor;
|
|
25
|
+
href?: string;
|
|
26
|
+
renderIcon?: React.ReactNode | (() => React.ReactNode);
|
|
27
|
+
onClick?: (event: React.KeyboardEvent<import("@instructure/ui-view").ViewProps> | React.MouseEvent<import("@instructure/ui-view").ViewProps>) => void;
|
|
28
|
+
}>;
|
|
11
29
|
static allowedProps: readonly (keyof {
|
|
12
30
|
children?: React.ReactNode;
|
|
13
31
|
type?: "button" | "submit" | "reset";
|
|
@@ -21,7 +39,7 @@ declare class Button extends Component<ButtonProps> {
|
|
|
21
39
|
textAlign?: "start" | "center";
|
|
22
40
|
withBackground?: boolean;
|
|
23
41
|
margin?: import("@instructure/emotion").Spacing;
|
|
24
|
-
cursor?: import("@instructure/
|
|
42
|
+
cursor?: import("@instructure/ui-prop-types").Cursor;
|
|
25
43
|
href?: string;
|
|
26
44
|
renderIcon?: React.ReactNode | (() => React.ReactNode);
|
|
27
45
|
onClick?: (event: React.KeyboardEvent<import("@instructure/ui-view").ViewProps> | React.MouseEvent<import("@instructure/ui-view").ViewProps>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Button/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Button/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQjC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAG1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C;;;;GAIG;AAEH,cAEM,MAAO,SAAQ,SAAS,CAAC,WAAW,CAAC;IACzC,MAAM,CAAC,QAAQ,CAAC,WAAW,YAAW;IAEtC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;;;MAYlB;IAED,gBAAgB,EAAE,UAAU,GAAG,IAAI,CAAO;IAE1C,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,IAAI,OAAO,mBAEV;IAED,KAAK;IAIL,gBAAgB,GAAI,IAAI,OAAO,GAAG,IAAI,UAQrC;IAED,eAAe,GAAI,WAAW,UAAU,GAAG,IAAI,UAE9C;IAED,MAAM;CA4CP;AAED,eAAe,MAAM,CAAA;AACrB,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
package/types/Button/props.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Spacing, WithStyleProps } from '@instructure/emotion';
|
|
3
|
-
import type { ToProp, AsElementType, BaseButtonTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
4
|
-
import type { Cursor } from '@instructure/
|
|
3
|
+
import type { ToProp, AsElementType, PropValidators, BaseButtonTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
4
|
+
import type { Cursor } from '@instructure/ui-prop-types';
|
|
5
5
|
import type { ViewProps } from '@instructure/ui-view';
|
|
6
6
|
type ButtonOwnProps = {
|
|
7
7
|
/**
|
|
@@ -76,7 +76,8 @@ type ButtonOwnProps = {
|
|
|
76
76
|
type PropKeys = keyof ButtonOwnProps;
|
|
77
77
|
type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
78
78
|
type ButtonProps = ButtonOwnProps & WithStyleProps<BaseButtonTheme, null> & OtherHTMLAttributes<ButtonOwnProps> & ToProp;
|
|
79
|
+
declare const propTypes: PropValidators<PropKeys>;
|
|
79
80
|
declare const allowedProps: AllowedPropKeys;
|
|
80
81
|
export type { ButtonProps };
|
|
81
|
-
export { allowedProps };
|
|
82
|
+
export { propTypes, allowedProps };
|
|
82
83
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Button/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Button/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB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CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,CAAA;IAEtD;;OAEG;IACH,OAAO,CAAC,EAAE,CACR,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,KAChE,IAAI,CAAA;CACV,CAAA;AAED,KAAK,QAAQ,GAAG,MAAM,cAAc,CAAA;AAEpC,KAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,KAAK,WAAW,GAAG,cAAc,GAC/B,cAAc,CAAC,eAAe,EAAE,IAAI,CAAC,GACrC,mBAAmB,CAAC,cAAc,CAAC,GACnC,MAAM,CAAA;AAER,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAyBvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAiBnB,CAAA;AAED,YAAY,EAAE,WAAW,EAAE,CAAA;AAC3B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -7,6 +7,22 @@ category: components
|
|
|
7
7
|
**/
|
|
8
8
|
declare class CloseButton extends Component<CloseButtonProps> {
|
|
9
9
|
static readonly componentId = "CloseButton";
|
|
10
|
+
static propTypes: import("@instructure/shared-types").PropValidators<keyof {
|
|
11
|
+
screenReaderLabel: React.ReactNode;
|
|
12
|
+
color?: "primary" | "primary-inverse";
|
|
13
|
+
interaction?: "enabled" | "disabled" | "readonly";
|
|
14
|
+
elementRef?: (element: Element | null) => void;
|
|
15
|
+
size?: "small" | "medium" | "large";
|
|
16
|
+
onClick?: (event: React.KeyboardEvent<import("@instructure/ui-view").ViewProps> | React.MouseEvent<import("@instructure/ui-view").ViewProps>) => void;
|
|
17
|
+
margin?: import("@instructure/emotion").Spacing;
|
|
18
|
+
placement?: "start" | "end" | "static";
|
|
19
|
+
offset?: "none" | "x-small" | "small" | "medium";
|
|
20
|
+
type?: "button" | "submit" | "reset";
|
|
21
|
+
as?: import("@instructure/shared-types").AsElementType;
|
|
22
|
+
href?: string;
|
|
23
|
+
cursor?: import("@instructure/ui-prop-types").Cursor;
|
|
24
|
+
tabIndex?: number;
|
|
25
|
+
}>;
|
|
10
26
|
static allowedProps: readonly (keyof {
|
|
11
27
|
screenReaderLabel: React.ReactNode;
|
|
12
28
|
color?: "primary" | "primary-inverse";
|
|
@@ -20,7 +36,7 @@ declare class CloseButton extends Component<CloseButtonProps> {
|
|
|
20
36
|
type?: "button" | "submit" | "reset";
|
|
21
37
|
as?: import("@instructure/shared-types").AsElementType;
|
|
22
38
|
href?: string;
|
|
23
|
-
cursor?: import("@instructure/
|
|
39
|
+
cursor?: import("@instructure/ui-prop-types").Cursor;
|
|
24
40
|
tabIndex?: number;
|
|
25
41
|
})[];
|
|
26
42
|
static defaultProps: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/CloseButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/CloseButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAcjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C;;;;GAIG;AACH,cAEM,WAAY,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IACnD,MAAM,CAAC,QAAQ,CAAC,WAAW,iBAAgB;IAE3C,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;MAUlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAK9B;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,IAAI,WAAW,0DAEd;IAED,IAAI,KAAK,gDAIR;IAED,MAAM;CA6CP;AAED,eAAe,WAAW,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Spacing, WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
3
|
-
import type { ToProp, AsElementType, CloseButtonTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
4
|
-
import type { Cursor } from '@instructure/
|
|
3
|
+
import type { ToProp, AsElementType, CloseButtonTheme, OtherHTMLAttributes, PropValidators } from '@instructure/shared-types';
|
|
4
|
+
import type { Cursor } from '@instructure/ui-prop-types';
|
|
5
5
|
import type { ViewProps } from '@instructure/ui-view';
|
|
6
6
|
type CloseButtonOwnProps = {
|
|
7
7
|
/**
|
|
@@ -71,7 +71,8 @@ type PropKeys = keyof CloseButtonOwnProps;
|
|
|
71
71
|
type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
72
72
|
type CloseButtonProps = CloseButtonOwnProps & WithStyleProps<CloseButtonTheme, CloseButtonStyle> & OtherHTMLAttributes<CloseButtonOwnProps> & ToProp;
|
|
73
73
|
type CloseButtonStyle = ComponentStyle<'closeButton'>;
|
|
74
|
+
declare const propTypes: PropValidators<PropKeys>;
|
|
74
75
|
declare const allowedProps: AllowedPropKeys;
|
|
75
76
|
export type { CloseButtonProps, CloseButtonStyle };
|
|
76
|
-
export { allowedProps };
|
|
77
|
+
export { propTypes, allowedProps };
|
|
77
78
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/CloseButton/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/CloseButton/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO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OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,KAAK,QAAQ,GAAG,MAAM,mBAAmB,CAAA;AAEzC,KAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,KAAK,gBAAgB,GAAG,mBAAmB,GACzC,cAAc,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,GAClD,mBAAmB,CAAC,mBAAmB,CAAC,GACxC,MAAM,CAAA;AAER,KAAK,gBAAgB,GAAG,cAAc,CAAC,aAAa,CAAC,CAAA;AAErD,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAgBvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAenB,CAAA;AAED,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -8,6 +8,21 @@ category: components
|
|
|
8
8
|
**/
|
|
9
9
|
declare class CondensedButton extends Component<CondensedButtonProps> {
|
|
10
10
|
static readonly componentId = "CondensedButton";
|
|
11
|
+
static propTypes: import("@instructure/shared-types").PropValidators<keyof {
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
type?: "button" | "submit" | "reset";
|
|
14
|
+
size?: "small" | "medium" | "large";
|
|
15
|
+
elementRef?: (element: Element | null) => void;
|
|
16
|
+
as?: import("@instructure/shared-types").AsElementType;
|
|
17
|
+
interaction?: "enabled" | "disabled" | "readonly";
|
|
18
|
+
color?: "primary" | "primary-inverse" | "secondary";
|
|
19
|
+
margin?: import("@instructure/emotion").Spacing;
|
|
20
|
+
cursor?: import("@instructure/ui-prop-types").Cursor;
|
|
21
|
+
href?: string;
|
|
22
|
+
renderIcon?: React.ReactNode | (() => React.ReactNode);
|
|
23
|
+
onClick?: (event: React.KeyboardEvent<import("@instructure/ui-view").ViewProps> | React.MouseEvent<import("@instructure/ui-view").ViewProps>) => void;
|
|
24
|
+
display?: "inline-block" | "block";
|
|
25
|
+
}>;
|
|
11
26
|
static allowedProps: readonly (keyof {
|
|
12
27
|
children?: React.ReactNode;
|
|
13
28
|
type?: "button" | "submit" | "reset";
|
|
@@ -17,7 +32,7 @@ declare class CondensedButton extends Component<CondensedButtonProps> {
|
|
|
17
32
|
interaction?: "enabled" | "disabled" | "readonly";
|
|
18
33
|
color?: "primary" | "primary-inverse" | "secondary";
|
|
19
34
|
margin?: import("@instructure/emotion").Spacing;
|
|
20
|
-
cursor?: import("@instructure/
|
|
35
|
+
cursor?: import("@instructure/ui-prop-types").Cursor;
|
|
21
36
|
href?: string;
|
|
22
37
|
renderIcon?: React.ReactNode | (() => React.ReactNode);
|
|
23
38
|
onClick?: (event: React.KeyboardEvent<import("@instructure/ui-view").ViewProps> | React.MouseEvent<import("@instructure/ui-view").ViewProps>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/CondensedButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/CondensedButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQjC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAG1C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAEnD;;;;GAIG;AAEH,cAEM,eAAgB,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IAC3D,MAAM,CAAC,QAAQ,CAAC,WAAW,qBAAoB;IAE/C,MAAM,CAAC,SAAS;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;MAUlB;IAED,WAAW,EAAE,UAAU,GAAG,IAAI,CAAO;IAErC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAQ9B;IAED,IAAI,OAAO,mBAEV;IAED,KAAK;IAIL,MAAM;CA6CP;AAED,eAAe,eAAe,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Spacing, WithStyleProps } from '@instructure/emotion';
|
|
3
|
-
import type { ToProp, AsElementType, BaseButtonTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
4
|
-
import type { Cursor } from '@instructure/
|
|
3
|
+
import type { ToProp, AsElementType, BaseButtonTheme, OtherHTMLAttributes, PropValidators } from '@instructure/shared-types';
|
|
4
|
+
import type { Cursor } from '@instructure/ui-prop-types';
|
|
5
5
|
import type { ViewProps } from '@instructure/ui-view';
|
|
6
6
|
type CondensedButtonOwnProps = {
|
|
7
7
|
/**
|
|
@@ -63,7 +63,8 @@ type CondensedButtonOwnProps = {
|
|
|
63
63
|
type PropKeys = keyof CondensedButtonOwnProps;
|
|
64
64
|
type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
65
65
|
type CondensedButtonProps = CondensedButtonOwnProps & WithStyleProps<BaseButtonTheme, null> & OtherHTMLAttributes<CondensedButtonOwnProps> & ToProp;
|
|
66
|
+
declare const propTypes: PropValidators<PropKeys>;
|
|
66
67
|
declare const allowedProps: AllowedPropKeys;
|
|
67
68
|
export type { CondensedButtonProps };
|
|
68
|
-
export { allowedProps };
|
|
69
|
+
export { propTypes, allowedProps };
|
|
69
70
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/CondensedButton/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
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CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,KAChE,IAAI,CAAA;IAET;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAA;CACnC,CAAA;AAED,KAAK,QAAQ,GAAG,MAAM,uBAAuB,CAAA;AAE7C,KAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,KAAK,oBAAoB,GAAG,uBAAuB,GACjD,cAAc,CAAC,eAAe,EAAE,IAAI,CAAC,GACrC,mBAAmB,CAAC,uBAAuB,CAAC,GAC5C,MAAM,CAAA;AAER,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAcvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAcnB,CAAA;AAED,YAAY,EAAE,oBAAoB,EAAE,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -8,6 +8,25 @@ category: components
|
|
|
8
8
|
**/
|
|
9
9
|
declare class IconButton extends Component<IconButtonProps> {
|
|
10
10
|
static readonly componentId = "IconButton";
|
|
11
|
+
static propTypes: import("@instructure/shared-types").PropValidators<keyof {
|
|
12
|
+
children?: import("@instructure/shared-types").Renderable;
|
|
13
|
+
renderIcon?: import("@instructure/shared-types").Renderable;
|
|
14
|
+
screenReaderLabel: import("react").ReactNode;
|
|
15
|
+
type?: "button" | "submit" | "reset";
|
|
16
|
+
size?: "small" | "medium" | "large";
|
|
17
|
+
elementRef?: (element: Element | null) => void;
|
|
18
|
+
as?: import("@instructure/shared-types").AsElementType;
|
|
19
|
+
interaction?: "enabled" | "disabled" | "readonly";
|
|
20
|
+
color?: "primary" | "primary-inverse" | "secondary" | "success" | "danger" | "ai-primary" | "ai-secondary";
|
|
21
|
+
focusColor?: "info" | "inverse";
|
|
22
|
+
shape?: "rectangle" | "circle";
|
|
23
|
+
withBackground?: boolean;
|
|
24
|
+
withBorder?: boolean;
|
|
25
|
+
margin?: import("@instructure/emotion").Spacing;
|
|
26
|
+
cursor?: import("@instructure/ui-prop-types").Cursor;
|
|
27
|
+
href?: string;
|
|
28
|
+
onClick?: (event: React.KeyboardEvent<import("@instructure/ui-view").ViewProps> | React.MouseEvent<import("@instructure/ui-view").ViewProps>) => void;
|
|
29
|
+
}>;
|
|
11
30
|
static allowedProps: readonly (keyof {
|
|
12
31
|
children?: import("@instructure/shared-types").Renderable;
|
|
13
32
|
renderIcon?: import("@instructure/shared-types").Renderable;
|
|
@@ -23,7 +42,7 @@ declare class IconButton extends Component<IconButtonProps> {
|
|
|
23
42
|
withBackground?: boolean;
|
|
24
43
|
withBorder?: boolean;
|
|
25
44
|
margin?: import("@instructure/emotion").Spacing;
|
|
26
|
-
cursor?: import("@instructure/
|
|
45
|
+
cursor?: import("@instructure/ui-prop-types").Cursor;
|
|
27
46
|
href?: string;
|
|
28
47
|
onClick?: (event: React.KeyboardEvent<import("@instructure/ui-view").ViewProps> | React.MouseEvent<import("@instructure/ui-view").ViewProps>) => void;
|
|
29
48
|
})[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/IconButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AASjC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAG1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C;;;;GAIG;AAGH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/IconButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AASjC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAG1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C;;;;GAIG;AAGH,cAEM,UAAW,SAAQ,SAAS,CAAC,eAAe,CAAC;IACjD,MAAM,CAAC,QAAQ,CAAC,WAAW,gBAAe;IAE1C,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;;;MAYlB;IAED,WAAW,EAAE,UAAU,GAAG,IAAI,CAAO;IAErC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAQ9B;IAED,IAAI,OAAO,mBAEV;IAED,KAAK;IAIL,MAAM;CAiDP;AAED,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import type { Spacing, WithStyleProps } from '@instructure/emotion';
|
|
3
|
-
import type { ToProp, AsElementType, BaseButtonTheme, OtherHTMLAttributes, Renderable } from '@instructure/shared-types';
|
|
4
|
-
import type { Cursor } from '@instructure/
|
|
3
|
+
import type { ToProp, AsElementType, PropValidators, BaseButtonTheme, OtherHTMLAttributes, Renderable } from '@instructure/shared-types';
|
|
4
|
+
import type { Cursor } from '@instructure/ui-prop-types';
|
|
5
5
|
import type { ViewProps } from '@instructure/ui-view';
|
|
6
6
|
type IconButtonOwnProps = {
|
|
7
7
|
/**
|
|
@@ -79,7 +79,8 @@ type IconButtonOwnProps = {
|
|
|
79
79
|
type PropKeys = keyof IconButtonOwnProps;
|
|
80
80
|
type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
81
81
|
type IconButtonProps = IconButtonOwnProps & WithStyleProps<BaseButtonTheme, null> & OtherHTMLAttributes<IconButtonOwnProps> & ToProp;
|
|
82
|
+
declare const propTypes: PropValidators<PropKeys>;
|
|
82
83
|
declare const allowedProps: AllowedPropKeys;
|
|
83
84
|
export type { IconButtonProps };
|
|
84
|
-
export { allowedProps };
|
|
85
|
+
export { propTypes, allowedProps };
|
|
85
86
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/IconButton/props.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/IconButton/props.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjC,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EACV,MAAM,EACN,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,UAAU,EACX,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAErD,KAAK,kBAAkB,GAAG;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAA;IAErB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAA;IAEvB;;OAEG;IACH,iBAAiB,EAAE,SAAS,CAAA;IAE5B;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;IAEpC;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IAEnC;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IAE9C;;OAEG;IACH,EAAE,CAAC,EAAE,aAAa,CAAA;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAA;IAEjD;;OAEG;IACH,KAAK,CAAC,EACF,SAAS,GACT,iBAAiB,GACjB,WAAW,GACX,SAAS,GACT,QAAQ,GACR,YAAY,GACZ,cAAc,CAAA;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAE/B;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAA;IAE9B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,CACR,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,KAChE,IAAI,CAAA;CACV,CAAA;AAED,KAAK,QAAQ,GAAG,MAAM,kBAAkB,CAAA;AAExC,KAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,KAAK,eAAe,GAAG,kBAAkB,GACvC,cAAc,CAAC,eAAe,EAAE,IAAI,CAAC,GACrC,mBAAmB,CAAC,kBAAkB,CAAC,GACvC,MAAM,CAAA;AAER,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CA0BvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAkBnB,CAAA;AAED,YAAY,EAAE,eAAe,EAAE,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -7,6 +7,22 @@ category: components
|
|
|
7
7
|
**/
|
|
8
8
|
declare class ToggleButton extends Component<ToggleButtonProps, ToggleButtonState> {
|
|
9
9
|
static readonly componentId = "ToggleButton";
|
|
10
|
+
static propTypes: import("@instructure/shared-types").PropValidators<keyof {
|
|
11
|
+
screenReaderLabel: string;
|
|
12
|
+
renderTooltipContent: React.ReactNode | ((...args: any[]) => any);
|
|
13
|
+
renderIcon: import("@instructure/shared-types").Renderable;
|
|
14
|
+
status: "pressed" | "unpressed";
|
|
15
|
+
as?: import("@instructure/shared-types").AsElementType;
|
|
16
|
+
interaction?: "enabled" | "disabled" | "readonly";
|
|
17
|
+
size?: "small" | "medium" | "large";
|
|
18
|
+
elementRef?: (element: Element | null) => void;
|
|
19
|
+
onClick?: (event: React.KeyboardEvent<import("@instructure/ui-view").ViewProps> | React.MouseEvent<import("@instructure/ui-view").ViewProps>) => void;
|
|
20
|
+
color?: "primary" | "primary-inverse" | "secondary" | "success" | "danger";
|
|
21
|
+
isShowingTooltip?: boolean;
|
|
22
|
+
mountNode?: import("@instructure/ui-position").PositionMountNode;
|
|
23
|
+
placement?: import("@instructure/ui-position").PlacementPropValues;
|
|
24
|
+
constrain?: import("@instructure/ui-position").PositionConstraint;
|
|
25
|
+
}>;
|
|
10
26
|
static allowedProps: readonly (keyof {
|
|
11
27
|
screenReaderLabel: string;
|
|
12
28
|
renderTooltipContent: React.ReactNode | ((...args: any[]) => any);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ToggleButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ToggleButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEnE;;;;GAIG;AAEH,cACM,YAAa,SAAQ,SAAS,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IACxE,MAAM,CAAC,QAAQ,CAAC,WAAW,kBAAiB;IAE5C,MAAM,CAAC,SAAS;;kDAIT,GAAG;;;;;;;;;;;;;OAJkB;IAC5B,MAAM,CAAC,YAAY;;kDAGZ,GAAG;;;;;;;;;;;;;SAHwB;IAClC,MAAM,CAAC,YAAY;;;;;;;;MASlB;gBAEW,KAAK,EAAE,iBAAiB;IAQpC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAK9B;IAED,IAAI,gBAAgB,YAInB;IAED,MAAM;CAmDP;AAED,OAAO,EAAE,YAAY,EAAE,CAAA;AACvB,eAAe,YAAY,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { AsElementType, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
2
|
+
import type { AsElementType, OtherHTMLAttributes, PropValidators } from '@instructure/shared-types';
|
|
3
3
|
import type { PlacementPropValues, PositionConstraint, PositionMountNode } from '@instructure/ui-position';
|
|
4
4
|
import type { ViewProps } from '@instructure/ui-view';
|
|
5
5
|
import { Renderable } from '@instructure/shared-types';
|
|
@@ -69,7 +69,8 @@ type ToggleButtonProps = ToggleButtonOwnProps & OtherHTMLAttributes<ToggleButton
|
|
|
69
69
|
type ToggleButtonState = {
|
|
70
70
|
isShowingTooltip: boolean;
|
|
71
71
|
};
|
|
72
|
+
declare const propTypes: PropValidators<PropKeys>;
|
|
72
73
|
declare const allowedProps: AllowedPropKeys;
|
|
73
74
|
export type { ToggleButtonProps, ToggleButtonState };
|
|
74
|
-
export { allowedProps };
|
|
75
|
+
export { propTypes, allowedProps };
|
|
75
76
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/ToggleButton/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/ToggleButton/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAA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