@instructure/ui-buttons 8.9.2-snapshot.1 → 8.9.2-snapshot.12
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/es/Button/index.js +1 -2
- package/es/CondensedButton/index.js +1 -2
- package/es/IconButton/index.js +1 -2
- package/lib/Button/index.js +1 -2
- package/lib/CondensedButton/index.js +1 -2
- package/lib/IconButton/index.js +1 -2
- package/package.json +21 -21
- package/src/BaseButton/props.ts +24 -4
- package/src/BaseButton/styles.ts +7 -3
- package/src/Button/index.tsx +0 -2
- package/src/Button/props.ts +7 -3
- package/src/CloseButton/props.ts +15 -4
- package/src/CloseButton/styles.ts +3 -3
- package/src/CondensedButton/index.tsx +0 -3
- package/src/CondensedButton/props.ts +8 -3
- package/src/IconButton/index.tsx +0 -3
- package/src/IconButton/props.ts +8 -3
- package/types/BaseButton/props.d.ts +5 -4
- package/types/BaseButton/props.d.ts.map +1 -1
- package/types/BaseButton/styles.d.ts +3 -556
- package/types/BaseButton/styles.d.ts.map +1 -1
- package/types/Button/index.d.ts.map +1 -1
- package/types/Button/props.d.ts +3 -3
- package/types/Button/props.d.ts.map +1 -1
- package/types/CloseButton/index.d.ts +2 -10
- package/types/CloseButton/index.d.ts.map +1 -1
- package/types/CloseButton/props.d.ts +5 -4
- package/types/CloseButton/props.d.ts.map +1 -1
- package/types/CloseButton/styles.d.ts +3 -18
- package/types/CloseButton/styles.d.ts.map +1 -1
- package/types/CondensedButton/index.d.ts.map +1 -1
- package/types/CondensedButton/props.d.ts +3 -3
- package/types/CondensedButton/props.d.ts.map +1 -1
- package/types/IconButton/index.d.ts.map +1 -1
- package/types/IconButton/props.d.ts +3 -3
- package/types/IconButton/props.d.ts.map +1 -1
package/es/Button/index.js
CHANGED
|
@@ -82,8 +82,7 @@ let Button = (_dec = withStyle(null, generateComponentTheme), _dec2 = testable()
|
|
|
82
82
|
|
|
83
83
|
const interaction = getInteraction({
|
|
84
84
|
props
|
|
85
|
-
});
|
|
86
|
-
|
|
85
|
+
});
|
|
87
86
|
const themeOverride = this.props.themeOverride;
|
|
88
87
|
const buttonProps = { ...passthroughProps(props),
|
|
89
88
|
type,
|
|
@@ -67,8 +67,7 @@ let CondensedButton = (_dec = withStyle(null, generateComponentTheme), _dec2 = t
|
|
|
67
67
|
cursor = _this$props.cursor,
|
|
68
68
|
href = _this$props.href,
|
|
69
69
|
renderIcon = _this$props.renderIcon,
|
|
70
|
-
props = _objectWithoutProperties(_this$props, _excluded);
|
|
71
|
-
|
|
70
|
+
props = _objectWithoutProperties(_this$props, _excluded);
|
|
72
71
|
|
|
73
72
|
const themeOverride = this.props.themeOverride;
|
|
74
73
|
return /*#__PURE__*/React.createElement(BaseButton, Object.assign({}, passthroughProps(props), {
|
package/es/IconButton/index.js
CHANGED
|
@@ -73,8 +73,7 @@ let IconButton = (_dec = withStyle(null, generateComponentTheme), _dec2 = testab
|
|
|
73
73
|
margin = _this$props.margin,
|
|
74
74
|
cursor = _this$props.cursor,
|
|
75
75
|
href = _this$props.href,
|
|
76
|
-
props = _objectWithoutProperties(_this$props, _excluded);
|
|
77
|
-
|
|
76
|
+
props = _objectWithoutProperties(_this$props, _excluded);
|
|
78
77
|
|
|
79
78
|
const themeOverride = this.props.themeOverride;
|
|
80
79
|
return /*#__PURE__*/React.createElement(BaseButton, Object.assign({}, passthroughProps(props), {
|
package/lib/Button/index.js
CHANGED
|
@@ -78,8 +78,7 @@ let Button = (_dec = (0, _emotion.withStyle)(null, _theme.default), _dec2 = (0,
|
|
|
78
78
|
props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
79
79
|
const interaction = (0, _getInteraction.getInteraction)({
|
|
80
80
|
props
|
|
81
|
-
});
|
|
82
|
-
|
|
81
|
+
});
|
|
83
82
|
const themeOverride = this.props.themeOverride;
|
|
84
83
|
const buttonProps = { ...(0, _passthroughProps.passthroughProps)(props),
|
|
85
84
|
type,
|
|
@@ -62,8 +62,7 @@ let CondensedButton = (_dec = (0, _emotion.withStyle)(null, _theme.default), _de
|
|
|
62
62
|
cursor = _this$props.cursor,
|
|
63
63
|
href = _this$props.href,
|
|
64
64
|
renderIcon = _this$props.renderIcon,
|
|
65
|
-
props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
66
|
-
|
|
65
|
+
props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
67
66
|
const themeOverride = this.props.themeOverride;
|
|
68
67
|
return /*#__PURE__*/_react.default.createElement(_BaseButton.BaseButton, Object.assign({}, (0, _passthroughProps.passthroughProps)(props), {
|
|
69
68
|
isCondensed: true,
|
package/lib/IconButton/index.js
CHANGED
|
@@ -69,8 +69,7 @@ let IconButton = (_dec = (0, _emotion.withStyle)(null, _theme.default), _dec2 =
|
|
|
69
69
|
margin = _this$props.margin,
|
|
70
70
|
cursor = _this$props.cursor,
|
|
71
71
|
href = _this$props.href,
|
|
72
|
-
props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
73
|
-
|
|
72
|
+
props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
74
73
|
const themeOverride = this.props.themeOverride;
|
|
75
74
|
return /*#__PURE__*/_react.default.createElement(_BaseButton.BaseButton, Object.assign({}, (0, _passthroughProps.passthroughProps)(props), {
|
|
76
75
|
type: type,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-buttons",
|
|
3
|
-
"version": "8.9.2-snapshot.
|
|
3
|
+
"version": "8.9.2-snapshot.12+6231ada93",
|
|
4
4
|
"description": "Accessible button components",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -24,28 +24,28 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@instructure/ui-babel-preset": "8.9.2-snapshot.
|
|
28
|
-
"@instructure/ui-test-locator": "8.9.2-snapshot.
|
|
29
|
-
"@instructure/ui-test-queries": "8.9.2-snapshot.
|
|
30
|
-
"@instructure/ui-test-utils": "8.9.2-snapshot.
|
|
31
|
-
"@instructure/ui-themes": "8.9.2-snapshot.
|
|
27
|
+
"@instructure/ui-babel-preset": "8.9.2-snapshot.12+6231ada93",
|
|
28
|
+
"@instructure/ui-test-locator": "8.9.2-snapshot.12+6231ada93",
|
|
29
|
+
"@instructure/ui-test-queries": "8.9.2-snapshot.12+6231ada93",
|
|
30
|
+
"@instructure/ui-test-utils": "8.9.2-snapshot.12+6231ada93",
|
|
31
|
+
"@instructure/ui-themes": "8.9.2-snapshot.12+6231ada93"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.13.10",
|
|
35
|
-
"@instructure/console": "8.9.2-snapshot.
|
|
36
|
-
"@instructure/emotion": "8.9.2-snapshot.
|
|
37
|
-
"@instructure/shared-types": "8.9.2-snapshot.
|
|
38
|
-
"@instructure/ui-a11y-content": "8.9.2-snapshot.
|
|
39
|
-
"@instructure/ui-a11y-utils": "8.9.2-snapshot.
|
|
40
|
-
"@instructure/ui-color-utils": "8.9.2-snapshot.
|
|
41
|
-
"@instructure/ui-dom-utils": "8.9.2-snapshot.
|
|
42
|
-
"@instructure/ui-icons": "8.9.2-snapshot.
|
|
43
|
-
"@instructure/ui-position": "8.9.2-snapshot.
|
|
44
|
-
"@instructure/ui-react-utils": "8.9.2-snapshot.
|
|
45
|
-
"@instructure/ui-testable": "8.9.2-snapshot.
|
|
46
|
-
"@instructure/ui-tooltip": "8.9.2-snapshot.
|
|
47
|
-
"@instructure/ui-utils": "8.9.2-snapshot.
|
|
48
|
-
"@instructure/ui-view": "8.9.2-snapshot.
|
|
35
|
+
"@instructure/console": "8.9.2-snapshot.12+6231ada93",
|
|
36
|
+
"@instructure/emotion": "8.9.2-snapshot.12+6231ada93",
|
|
37
|
+
"@instructure/shared-types": "8.9.2-snapshot.12+6231ada93",
|
|
38
|
+
"@instructure/ui-a11y-content": "8.9.2-snapshot.12+6231ada93",
|
|
39
|
+
"@instructure/ui-a11y-utils": "8.9.2-snapshot.12+6231ada93",
|
|
40
|
+
"@instructure/ui-color-utils": "8.9.2-snapshot.12+6231ada93",
|
|
41
|
+
"@instructure/ui-dom-utils": "8.9.2-snapshot.12+6231ada93",
|
|
42
|
+
"@instructure/ui-icons": "8.9.2-snapshot.12+6231ada93",
|
|
43
|
+
"@instructure/ui-position": "8.9.2-snapshot.12+6231ada93",
|
|
44
|
+
"@instructure/ui-react-utils": "8.9.2-snapshot.12+6231ada93",
|
|
45
|
+
"@instructure/ui-testable": "8.9.2-snapshot.12+6231ada93",
|
|
46
|
+
"@instructure/ui-tooltip": "8.9.2-snapshot.12+6231ada93",
|
|
47
|
+
"@instructure/ui-utils": "8.9.2-snapshot.12+6231ada93",
|
|
48
|
+
"@instructure/ui-view": "8.9.2-snapshot.12+6231ada93",
|
|
49
49
|
"keycode": "^2",
|
|
50
50
|
"prop-types": "^15"
|
|
51
51
|
},
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
58
|
"sideEffects": false,
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "6231ada93bd4299d640b5d39d7e44b0f54852b2a"
|
|
60
60
|
}
|
package/src/BaseButton/props.ts
CHANGED
|
@@ -28,8 +28,16 @@ import PropTypes from 'prop-types'
|
|
|
28
28
|
import { ThemeablePropTypes } from '@instructure/emotion'
|
|
29
29
|
|
|
30
30
|
import type { InteractionType } from '@instructure/ui-react-utils'
|
|
31
|
-
import type {
|
|
32
|
-
|
|
31
|
+
import type {
|
|
32
|
+
Spacing,
|
|
33
|
+
WithStyleProps,
|
|
34
|
+
ComponentStyle
|
|
35
|
+
} from '@instructure/emotion'
|
|
36
|
+
import type {
|
|
37
|
+
AsElementType,
|
|
38
|
+
BaseButtonTheme,
|
|
39
|
+
PropValidators
|
|
40
|
+
} from '@instructure/shared-types'
|
|
33
41
|
|
|
34
42
|
type BaseButtonOwnProps = {
|
|
35
43
|
children?: React.ReactNode
|
|
@@ -64,7 +72,19 @@ type PropKeys = keyof BaseButtonOwnProps
|
|
|
64
72
|
|
|
65
73
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
66
74
|
|
|
67
|
-
type BaseButtonProps = BaseButtonOwnProps &
|
|
75
|
+
type BaseButtonProps = BaseButtonOwnProps &
|
|
76
|
+
WithStyleProps<BaseButtonTheme, BaseButtonStyle>
|
|
77
|
+
|
|
78
|
+
type BaseButtonStyle = ComponentStyle<
|
|
79
|
+
| 'baseButton'
|
|
80
|
+
| 'content'
|
|
81
|
+
| 'children'
|
|
82
|
+
| 'iconSVG'
|
|
83
|
+
| 'childrenLayout'
|
|
84
|
+
| 'iconOnly'
|
|
85
|
+
| 'iconWrapper'
|
|
86
|
+
| 'childrenWrapper'
|
|
87
|
+
>
|
|
68
88
|
|
|
69
89
|
const propTypes: PropValidators<PropKeys> = {
|
|
70
90
|
/**
|
|
@@ -188,5 +208,5 @@ const allowedProps: AllowedPropKeys = [
|
|
|
188
208
|
'withBorder'
|
|
189
209
|
]
|
|
190
210
|
|
|
191
|
-
export type { BaseButtonProps, BaseButtonStyleProps }
|
|
211
|
+
export type { BaseButtonProps, BaseButtonStyleProps, BaseButtonStyle }
|
|
192
212
|
export { propTypes, allowedProps }
|
package/src/BaseButton/styles.ts
CHANGED
|
@@ -22,8 +22,12 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import { BaseButtonTheme } from '@instructure/shared-types'
|
|
26
|
-
import {
|
|
25
|
+
import type { BaseButtonTheme } from '@instructure/shared-types'
|
|
26
|
+
import type {
|
|
27
|
+
BaseButtonProps,
|
|
28
|
+
BaseButtonStyleProps,
|
|
29
|
+
BaseButtonStyle
|
|
30
|
+
} from './props'
|
|
27
31
|
|
|
28
32
|
/**
|
|
29
33
|
* ---
|
|
@@ -39,7 +43,7 @@ const generateStyle = (
|
|
|
39
43
|
componentTheme: BaseButtonTheme,
|
|
40
44
|
props: BaseButtonProps,
|
|
41
45
|
state: BaseButtonStyleProps
|
|
42
|
-
) => {
|
|
46
|
+
): BaseButtonStyle => {
|
|
43
47
|
const {
|
|
44
48
|
size,
|
|
45
49
|
color,
|
package/src/Button/index.tsx
CHANGED
|
@@ -109,8 +109,6 @@ class Button extends Component<ButtonProps> {
|
|
|
109
109
|
|
|
110
110
|
const interaction = getInteraction({ props })
|
|
111
111
|
|
|
112
|
-
// @ts-expect-error ts-migrate(2339) FIXME: Property 'themeOverride' does not exist on type 'R... Remove this comment to see the full error message
|
|
113
|
-
// eslint-disable-next-line react/prop-types
|
|
114
112
|
const themeOverride = this.props.themeOverride
|
|
115
113
|
|
|
116
114
|
const buttonProps = {
|
package/src/Button/props.ts
CHANGED
|
@@ -27,8 +27,12 @@ import PropTypes from 'prop-types'
|
|
|
27
27
|
|
|
28
28
|
import { ThemeablePropTypes } from '@instructure/emotion'
|
|
29
29
|
|
|
30
|
-
import type { Spacing } from '@instructure/emotion'
|
|
31
|
-
import type {
|
|
30
|
+
import type { Spacing, WithStyleProps } from '@instructure/emotion'
|
|
31
|
+
import type {
|
|
32
|
+
AsElementType,
|
|
33
|
+
PropValidators,
|
|
34
|
+
BaseButtonTheme
|
|
35
|
+
} from '@instructure/shared-types'
|
|
32
36
|
|
|
33
37
|
type ButtonOwnProps = {
|
|
34
38
|
children?: React.ReactNode
|
|
@@ -52,7 +56,7 @@ type PropKeys = keyof ButtonOwnProps
|
|
|
52
56
|
|
|
53
57
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
54
58
|
|
|
55
|
-
type ButtonProps = ButtonOwnProps
|
|
59
|
+
type ButtonProps = ButtonOwnProps & WithStyleProps<BaseButtonTheme, null>
|
|
56
60
|
|
|
57
61
|
const propTypes: PropValidators<PropKeys> = {
|
|
58
62
|
/**
|
package/src/CloseButton/props.ts
CHANGED
|
@@ -25,8 +25,16 @@
|
|
|
25
25
|
import PropTypes from 'prop-types'
|
|
26
26
|
import { ThemeablePropTypes } from '@instructure/emotion'
|
|
27
27
|
|
|
28
|
-
import type {
|
|
29
|
-
|
|
28
|
+
import type {
|
|
29
|
+
Spacing,
|
|
30
|
+
WithStyleProps,
|
|
31
|
+
ComponentStyle
|
|
32
|
+
} from '@instructure/emotion'
|
|
33
|
+
import type {
|
|
34
|
+
AsElementType,
|
|
35
|
+
CloseButtonTheme,
|
|
36
|
+
PropValidators
|
|
37
|
+
} from '@instructure/shared-types'
|
|
30
38
|
|
|
31
39
|
type CloseButtonOwnProps = {
|
|
32
40
|
screenReaderLabel: string | React.ReactNode
|
|
@@ -49,7 +57,10 @@ type PropKeys = keyof CloseButtonOwnProps
|
|
|
49
57
|
|
|
50
58
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
51
59
|
|
|
52
|
-
type CloseButtonProps = CloseButtonOwnProps &
|
|
60
|
+
type CloseButtonProps = CloseButtonOwnProps &
|
|
61
|
+
WithStyleProps<CloseButtonTheme, CloseButtonStyle>
|
|
62
|
+
|
|
63
|
+
type CloseButtonStyle = ComponentStyle<'closeButton'>
|
|
53
64
|
|
|
54
65
|
const propTypes: PropValidators<PropKeys> = {
|
|
55
66
|
/**
|
|
@@ -133,5 +144,5 @@ const allowedProps: AllowedPropKeys = [
|
|
|
133
144
|
'type'
|
|
134
145
|
]
|
|
135
146
|
|
|
136
|
-
export type { CloseButtonProps }
|
|
147
|
+
export type { CloseButtonProps, CloseButtonStyle }
|
|
137
148
|
export { propTypes, allowedProps }
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import { CloseButtonTheme } from '@instructure/shared-types'
|
|
26
|
-
import { CloseButtonProps } from './props'
|
|
25
|
+
import type { CloseButtonTheme } from '@instructure/shared-types'
|
|
26
|
+
import type { CloseButtonProps, CloseButtonStyle } from './props'
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* ---
|
|
@@ -38,7 +38,7 @@ import { CloseButtonProps } from './props'
|
|
|
38
38
|
const generateStyle = (
|
|
39
39
|
componentTheme: CloseButtonTheme,
|
|
40
40
|
props: CloseButtonProps
|
|
41
|
-
) => {
|
|
41
|
+
): CloseButtonStyle => {
|
|
42
42
|
const { placement, offset } = props
|
|
43
43
|
|
|
44
44
|
const offsetValueMap = {
|
|
@@ -89,8 +89,6 @@ class CondensedButton extends Component<CondensedButtonProps> {
|
|
|
89
89
|
...props
|
|
90
90
|
} = this.props
|
|
91
91
|
|
|
92
|
-
// @ts-expect-error ts-migrate(2339) FIXME: Property 'themeOverride' does not exist on type 'R... Remove this comment to see the full error message
|
|
93
|
-
// eslint-disable-next-line react/prop-types
|
|
94
92
|
const themeOverride = this.props.themeOverride
|
|
95
93
|
|
|
96
94
|
return (
|
|
@@ -109,7 +107,6 @@ class CondensedButton extends Component<CondensedButtonProps> {
|
|
|
109
107
|
cursor={cursor}
|
|
110
108
|
href={href}
|
|
111
109
|
renderIcon={renderIcon}
|
|
112
|
-
// @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call.
|
|
113
110
|
themeOverride={themeOverride}
|
|
114
111
|
ref={(component) => {
|
|
115
112
|
// @ts-expect-error ts-migrate(2322) FIXME: Type 'BaseButton | null' is not assignable to type... Remove this comment to see the full error message
|
|
@@ -27,8 +27,12 @@ import PropTypes from 'prop-types'
|
|
|
27
27
|
|
|
28
28
|
import { ThemeablePropTypes } from '@instructure/emotion'
|
|
29
29
|
|
|
30
|
-
import type { Spacing } from '@instructure/emotion'
|
|
31
|
-
import type {
|
|
30
|
+
import type { Spacing, WithStyleProps } from '@instructure/emotion'
|
|
31
|
+
import type {
|
|
32
|
+
AsElementType,
|
|
33
|
+
BaseButtonTheme,
|
|
34
|
+
PropValidators
|
|
35
|
+
} from '@instructure/shared-types'
|
|
32
36
|
|
|
33
37
|
type CondensedButtonOwnProps = {
|
|
34
38
|
children?: React.ReactNode
|
|
@@ -48,7 +52,8 @@ type PropKeys = keyof CondensedButtonOwnProps
|
|
|
48
52
|
|
|
49
53
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
50
54
|
|
|
51
|
-
type CondensedButtonProps = CondensedButtonOwnProps
|
|
55
|
+
type CondensedButtonProps = CondensedButtonOwnProps &
|
|
56
|
+
WithStyleProps<BaseButtonTheme, null>
|
|
52
57
|
|
|
53
58
|
const propTypes: PropValidators<PropKeys> = {
|
|
54
59
|
/**
|
package/src/IconButton/index.tsx
CHANGED
|
@@ -99,8 +99,6 @@ class IconButton extends Component<IconButtonProps> {
|
|
|
99
99
|
...props
|
|
100
100
|
} = this.props
|
|
101
101
|
|
|
102
|
-
// @ts-expect-error ts-migrate(2339) FIXME: Property 'themeOverride' does not exist on type 'R... Remove this comment to see the full error message
|
|
103
|
-
// eslint-disable-next-line react/prop-types
|
|
104
102
|
const themeOverride = this.props.themeOverride
|
|
105
103
|
|
|
106
104
|
return (
|
|
@@ -120,7 +118,6 @@ class IconButton extends Component<IconButtonProps> {
|
|
|
120
118
|
cursor={cursor}
|
|
121
119
|
href={href}
|
|
122
120
|
renderIcon={children || renderIcon}
|
|
123
|
-
// @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call.
|
|
124
121
|
themeOverride={themeOverride}
|
|
125
122
|
ref={(component) => {
|
|
126
123
|
// @ts-expect-error ts-migrate(2322) FIXME: Type 'BaseButton | null' is not assignable to type... Remove this comment to see the full error message
|
package/src/IconButton/props.ts
CHANGED
|
@@ -27,8 +27,12 @@ import PropTypes from 'prop-types'
|
|
|
27
27
|
|
|
28
28
|
import { ThemeablePropTypes } from '@instructure/emotion'
|
|
29
29
|
|
|
30
|
-
import type { Spacing } from '@instructure/emotion'
|
|
31
|
-
import type {
|
|
30
|
+
import type { Spacing, WithStyleProps } from '@instructure/emotion'
|
|
31
|
+
import type {
|
|
32
|
+
AsElementType,
|
|
33
|
+
PropValidators,
|
|
34
|
+
BaseButtonTheme
|
|
35
|
+
} from '@instructure/shared-types'
|
|
32
36
|
|
|
33
37
|
type IconButtonOwnProps = {
|
|
34
38
|
children?: React.ReactNode | ((...args: any[]) => React.ReactNode)
|
|
@@ -53,7 +57,8 @@ type PropKeys = keyof IconButtonOwnProps
|
|
|
53
57
|
|
|
54
58
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
55
59
|
|
|
56
|
-
type IconButtonProps = IconButtonOwnProps
|
|
60
|
+
type IconButtonProps = IconButtonOwnProps &
|
|
61
|
+
WithStyleProps<BaseButtonTheme, null>
|
|
57
62
|
|
|
58
63
|
const propTypes: PropValidators<PropKeys> = {
|
|
59
64
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { InteractionType } from '@instructure/ui-react-utils';
|
|
3
|
-
import type { Spacing, WithStyleProps } from '@instructure/emotion';
|
|
4
|
-
import type { AsElementType, PropValidators } from '@instructure/shared-types';
|
|
3
|
+
import type { Spacing, WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
4
|
+
import type { AsElementType, BaseButtonTheme, PropValidators } from '@instructure/shared-types';
|
|
5
5
|
declare type BaseButtonOwnProps = {
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
type?: 'button' | 'submit' | 'reset';
|
|
@@ -31,9 +31,10 @@ declare type BaseButtonStyleProps = {
|
|
|
31
31
|
};
|
|
32
32
|
declare type PropKeys = keyof BaseButtonOwnProps;
|
|
33
33
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
34
|
-
declare type BaseButtonProps = BaseButtonOwnProps & WithStyleProps
|
|
34
|
+
declare type BaseButtonProps = BaseButtonOwnProps & WithStyleProps<BaseButtonTheme, BaseButtonStyle>;
|
|
35
|
+
declare type BaseButtonStyle = ComponentStyle<'baseButton' | 'content' | 'children' | 'iconSVG' | 'childrenLayout' | 'iconOnly' | 'iconWrapper' | 'childrenWrapper'>;
|
|
35
36
|
declare const propTypes: PropValidators<PropKeys>;
|
|
36
37
|
declare const allowedProps: AllowedPropKeys;
|
|
37
|
-
export type { BaseButtonProps, BaseButtonStyleProps };
|
|
38
|
+
export type { BaseButtonProps, BaseButtonStyleProps, BaseButtonStyle };
|
|
38
39
|
export { propTypes, allowedProps };
|
|
39
40
|
//# 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,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/BaseButton/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,cAAc,EACf,MAAM,2BAA2B,CAAA;AAElC,aAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;IACpC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,WAAW,CAAC,EAAE,eAAe,CAAA;IAC7B,KAAK,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;IAC1E,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAA;IAClC,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IAC9B,KAAK,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAA;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,SAAS,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACnC,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAA;IACxD,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC3B,CAAA;AAED,aAAK,oBAAoB,GAAG;IAC1B,UAAU,EAAE,OAAO,CAAA;IACnB,kBAAkB,EAAE,OAAO,CAAA;CAC5B,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,kBAAkB,CAAA;AAExC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,eAAe,GAAG,kBAAkB,GACvC,cAAc,CAAC,eAAe,EAAE,eAAe,CAAC,CAAA;AAElD,aAAK,eAAe,GAAG,cAAc,CACjC,YAAY,GACZ,SAAS,GACT,UAAU,GACV,SAAS,GACT,gBAAgB,GAChB,UAAU,GACV,aAAa,GACb,iBAAiB,CACpB,CAAA;AAED,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAgGvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAsBnB,CAAA;AAED,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,eAAe,EAAE,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseButtonTheme } from '@instructure/shared-types';
|
|
2
|
-
import { BaseButtonProps, BaseButtonStyleProps } from './props';
|
|
1
|
+
import type { BaseButtonTheme } from '@instructure/shared-types';
|
|
2
|
+
import type { BaseButtonProps, BaseButtonStyleProps, BaseButtonStyle } from './props';
|
|
3
3
|
/**
|
|
4
4
|
* ---
|
|
5
5
|
* private: true
|
|
@@ -10,559 +10,6 @@ import { BaseButtonProps, BaseButtonStyleProps } from './props';
|
|
|
10
10
|
* @param {Object} state the state of the component, the style is applied to
|
|
11
11
|
* @return {Object} The final style object, which will be used in the component
|
|
12
12
|
*/
|
|
13
|
-
declare const generateStyle: (componentTheme: BaseButtonTheme, props: BaseButtonProps, state: BaseButtonStyleProps) =>
|
|
14
|
-
baseButton: {
|
|
15
|
-
label: string;
|
|
16
|
-
appearance: string;
|
|
17
|
-
textDecoration: string;
|
|
18
|
-
touchAction: string;
|
|
19
|
-
'&::-moz-focus-inner': {
|
|
20
|
-
border: string;
|
|
21
|
-
};
|
|
22
|
-
'*': {
|
|
23
|
-
pointerEvents: string;
|
|
24
|
-
};
|
|
25
|
-
'&:active > [class$=-baseButton__content]': {
|
|
26
|
-
background: string;
|
|
27
|
-
boxShadow: string;
|
|
28
|
-
} | {
|
|
29
|
-
background: string;
|
|
30
|
-
boxShadow: string;
|
|
31
|
-
} | {
|
|
32
|
-
background: string;
|
|
33
|
-
boxShadow: string;
|
|
34
|
-
} | {
|
|
35
|
-
background: string;
|
|
36
|
-
boxShadow: string;
|
|
37
|
-
} | {
|
|
38
|
-
background: string;
|
|
39
|
-
boxShadow: string;
|
|
40
|
-
};
|
|
41
|
-
'&:hover > [class$=-baseButton__content]': {
|
|
42
|
-
background: string;
|
|
43
|
-
} | {
|
|
44
|
-
background: string;
|
|
45
|
-
} | {
|
|
46
|
-
background: string;
|
|
47
|
-
} | {
|
|
48
|
-
background: string;
|
|
49
|
-
} | {
|
|
50
|
-
background: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
content: {
|
|
54
|
-
borderStyle: string;
|
|
55
|
-
lineHeight: string | number;
|
|
56
|
-
opacity?: number | undefined;
|
|
57
|
-
paddingLeft: string | number;
|
|
58
|
-
paddingRight: string | number;
|
|
59
|
-
borderRadius: string | 0;
|
|
60
|
-
color: string;
|
|
61
|
-
background: string;
|
|
62
|
-
borderColor: string;
|
|
63
|
-
height?: string | undefined;
|
|
64
|
-
width: string;
|
|
65
|
-
fontSize: string | 0;
|
|
66
|
-
label: string;
|
|
67
|
-
boxSizing: string;
|
|
68
|
-
display: string;
|
|
69
|
-
direction: string;
|
|
70
|
-
userSelect: string;
|
|
71
|
-
transition: string;
|
|
72
|
-
transform: string;
|
|
73
|
-
fontFamily: string;
|
|
74
|
-
fontWeight: number;
|
|
75
|
-
textTransform: string;
|
|
76
|
-
letterSpacing: string;
|
|
77
|
-
borderWidth: string | 0;
|
|
78
|
-
textAlign: "start" | "center" | undefined;
|
|
79
|
-
'&:hover': {
|
|
80
|
-
transform: string;
|
|
81
|
-
};
|
|
82
|
-
} | {
|
|
83
|
-
borderStyle: string;
|
|
84
|
-
lineHeight: string | number;
|
|
85
|
-
opacity?: number | undefined;
|
|
86
|
-
paddingLeft: string | number;
|
|
87
|
-
paddingRight: string | number;
|
|
88
|
-
borderRadius: string | 0;
|
|
89
|
-
color: string;
|
|
90
|
-
background: string;
|
|
91
|
-
borderColor: string;
|
|
92
|
-
height?: string | undefined;
|
|
93
|
-
width: string;
|
|
94
|
-
fontSize: string | 0;
|
|
95
|
-
label: string;
|
|
96
|
-
boxSizing: string;
|
|
97
|
-
display: string;
|
|
98
|
-
direction: string;
|
|
99
|
-
userSelect: string;
|
|
100
|
-
transition: string;
|
|
101
|
-
transform: string;
|
|
102
|
-
fontFamily: string;
|
|
103
|
-
fontWeight: number;
|
|
104
|
-
textTransform: string;
|
|
105
|
-
letterSpacing: string;
|
|
106
|
-
borderWidth: string | 0;
|
|
107
|
-
textAlign: "start" | "center" | undefined;
|
|
108
|
-
'&:hover': {
|
|
109
|
-
transform: string;
|
|
110
|
-
};
|
|
111
|
-
} | {
|
|
112
|
-
borderStyle: string;
|
|
113
|
-
lineHeight: string | number;
|
|
114
|
-
opacity?: number | undefined;
|
|
115
|
-
paddingLeft: string | number;
|
|
116
|
-
paddingRight: string | number;
|
|
117
|
-
borderRadius: string | 0;
|
|
118
|
-
color: string;
|
|
119
|
-
background: string;
|
|
120
|
-
borderColor: string;
|
|
121
|
-
height?: string | undefined;
|
|
122
|
-
width: string;
|
|
123
|
-
fontSize: string | 0;
|
|
124
|
-
label: string;
|
|
125
|
-
boxSizing: string;
|
|
126
|
-
display: string;
|
|
127
|
-
direction: string;
|
|
128
|
-
userSelect: string;
|
|
129
|
-
transition: string;
|
|
130
|
-
transform: string;
|
|
131
|
-
fontFamily: string;
|
|
132
|
-
fontWeight: number;
|
|
133
|
-
textTransform: string;
|
|
134
|
-
letterSpacing: string;
|
|
135
|
-
borderWidth: string | 0;
|
|
136
|
-
textAlign: "start" | "center" | undefined;
|
|
137
|
-
'&:hover': {
|
|
138
|
-
transform: string;
|
|
139
|
-
};
|
|
140
|
-
} | {
|
|
141
|
-
borderStyle: string;
|
|
142
|
-
lineHeight: string | number;
|
|
143
|
-
opacity?: number | undefined;
|
|
144
|
-
paddingLeft: string | number;
|
|
145
|
-
paddingRight: string | number;
|
|
146
|
-
borderRadius: string | 0;
|
|
147
|
-
color: string;
|
|
148
|
-
background: string;
|
|
149
|
-
borderColor: string;
|
|
150
|
-
height?: string | undefined;
|
|
151
|
-
width: string;
|
|
152
|
-
fontSize: string | 0;
|
|
153
|
-
label: string;
|
|
154
|
-
boxSizing: string;
|
|
155
|
-
display: string;
|
|
156
|
-
direction: string;
|
|
157
|
-
userSelect: string;
|
|
158
|
-
transition: string;
|
|
159
|
-
transform: string;
|
|
160
|
-
fontFamily: string;
|
|
161
|
-
fontWeight: number;
|
|
162
|
-
textTransform: string;
|
|
163
|
-
letterSpacing: string;
|
|
164
|
-
borderWidth: string | 0;
|
|
165
|
-
textAlign: "start" | "center" | undefined;
|
|
166
|
-
'&:hover': {
|
|
167
|
-
transform: string;
|
|
168
|
-
};
|
|
169
|
-
} | {
|
|
170
|
-
borderStyle: string;
|
|
171
|
-
lineHeight: string | number;
|
|
172
|
-
opacity?: number | undefined;
|
|
173
|
-
paddingLeft: string | number;
|
|
174
|
-
paddingRight: string | number;
|
|
175
|
-
borderRadius: string | 0;
|
|
176
|
-
color: string;
|
|
177
|
-
background: string;
|
|
178
|
-
borderColor: string;
|
|
179
|
-
height?: string | undefined;
|
|
180
|
-
width: string;
|
|
181
|
-
fontSize: string | 0;
|
|
182
|
-
label: string;
|
|
183
|
-
boxSizing: string;
|
|
184
|
-
display: string;
|
|
185
|
-
direction: string;
|
|
186
|
-
userSelect: string;
|
|
187
|
-
transition: string;
|
|
188
|
-
transform: string;
|
|
189
|
-
fontFamily: string;
|
|
190
|
-
fontWeight: number;
|
|
191
|
-
textTransform: string;
|
|
192
|
-
letterSpacing: string;
|
|
193
|
-
borderWidth: string | 0;
|
|
194
|
-
textAlign: "start" | "center" | undefined;
|
|
195
|
-
'&:hover': {
|
|
196
|
-
transform: string;
|
|
197
|
-
};
|
|
198
|
-
} | {
|
|
199
|
-
borderStyle: string;
|
|
200
|
-
lineHeight: string | number;
|
|
201
|
-
opacity?: number | undefined;
|
|
202
|
-
paddingLeft: string | number;
|
|
203
|
-
paddingRight: string | number;
|
|
204
|
-
borderRadius: string | 0;
|
|
205
|
-
color: string;
|
|
206
|
-
background: string;
|
|
207
|
-
borderColor: string;
|
|
208
|
-
height?: string | undefined;
|
|
209
|
-
width: string;
|
|
210
|
-
fontSize: string | 0;
|
|
211
|
-
label: string;
|
|
212
|
-
boxSizing: string;
|
|
213
|
-
display: string;
|
|
214
|
-
direction: string;
|
|
215
|
-
userSelect: string;
|
|
216
|
-
transition: string;
|
|
217
|
-
transform: string;
|
|
218
|
-
fontFamily: string;
|
|
219
|
-
fontWeight: number;
|
|
220
|
-
textTransform: string;
|
|
221
|
-
letterSpacing: string;
|
|
222
|
-
borderWidth: string | 0;
|
|
223
|
-
textAlign: "start" | "center" | undefined;
|
|
224
|
-
'&:hover': {
|
|
225
|
-
transform: string;
|
|
226
|
-
};
|
|
227
|
-
} | {
|
|
228
|
-
borderStyle: string;
|
|
229
|
-
lineHeight: string | number;
|
|
230
|
-
opacity?: number | undefined;
|
|
231
|
-
paddingLeft: string | number;
|
|
232
|
-
paddingRight: string | number;
|
|
233
|
-
borderRadius: string | 0;
|
|
234
|
-
color: string;
|
|
235
|
-
background: string;
|
|
236
|
-
borderColor: string;
|
|
237
|
-
height?: string | undefined;
|
|
238
|
-
width: string;
|
|
239
|
-
fontSize: string | 0;
|
|
240
|
-
label: string;
|
|
241
|
-
boxSizing: string;
|
|
242
|
-
display: string;
|
|
243
|
-
direction: string;
|
|
244
|
-
userSelect: string;
|
|
245
|
-
transition: string;
|
|
246
|
-
transform: string;
|
|
247
|
-
fontFamily: string;
|
|
248
|
-
fontWeight: number;
|
|
249
|
-
textTransform: string;
|
|
250
|
-
letterSpacing: string;
|
|
251
|
-
borderWidth: string | 0;
|
|
252
|
-
textAlign: "start" | "center" | undefined;
|
|
253
|
-
'&:hover': {
|
|
254
|
-
transform: string;
|
|
255
|
-
};
|
|
256
|
-
} | {
|
|
257
|
-
borderStyle: string;
|
|
258
|
-
lineHeight: string | number;
|
|
259
|
-
opacity?: number | undefined;
|
|
260
|
-
paddingLeft: string | number;
|
|
261
|
-
paddingRight: string | number;
|
|
262
|
-
borderRadius: string | 0;
|
|
263
|
-
color: string;
|
|
264
|
-
background: string;
|
|
265
|
-
borderColor: string;
|
|
266
|
-
height?: string | undefined;
|
|
267
|
-
width: string;
|
|
268
|
-
fontSize: string | 0;
|
|
269
|
-
label: string;
|
|
270
|
-
boxSizing: string;
|
|
271
|
-
display: string;
|
|
272
|
-
direction: string;
|
|
273
|
-
userSelect: string;
|
|
274
|
-
transition: string;
|
|
275
|
-
transform: string;
|
|
276
|
-
fontFamily: string;
|
|
277
|
-
fontWeight: number;
|
|
278
|
-
textTransform: string;
|
|
279
|
-
letterSpacing: string;
|
|
280
|
-
borderWidth: string | 0;
|
|
281
|
-
textAlign: "start" | "center" | undefined;
|
|
282
|
-
'&:hover': {
|
|
283
|
-
transform: string;
|
|
284
|
-
};
|
|
285
|
-
} | {
|
|
286
|
-
borderStyle: string;
|
|
287
|
-
lineHeight: string | number;
|
|
288
|
-
opacity?: number | undefined;
|
|
289
|
-
paddingLeft: string | number;
|
|
290
|
-
paddingRight: string | number;
|
|
291
|
-
borderRadius: string | 0;
|
|
292
|
-
color: string;
|
|
293
|
-
background: string;
|
|
294
|
-
borderColor: string;
|
|
295
|
-
height?: string | undefined;
|
|
296
|
-
width: string;
|
|
297
|
-
fontSize: string | 0;
|
|
298
|
-
label: string;
|
|
299
|
-
boxSizing: string;
|
|
300
|
-
display: string;
|
|
301
|
-
direction: string;
|
|
302
|
-
userSelect: string;
|
|
303
|
-
transition: string;
|
|
304
|
-
transform: string;
|
|
305
|
-
fontFamily: string;
|
|
306
|
-
fontWeight: number;
|
|
307
|
-
textTransform: string;
|
|
308
|
-
letterSpacing: string;
|
|
309
|
-
borderWidth: string | 0;
|
|
310
|
-
textAlign: "start" | "center" | undefined;
|
|
311
|
-
'&:hover': {
|
|
312
|
-
transform: string;
|
|
313
|
-
};
|
|
314
|
-
} | {
|
|
315
|
-
borderStyle: string;
|
|
316
|
-
lineHeight: string | number;
|
|
317
|
-
opacity?: number | undefined;
|
|
318
|
-
paddingLeft: string | number;
|
|
319
|
-
paddingRight: string | number;
|
|
320
|
-
borderRadius: string | 0;
|
|
321
|
-
color: string;
|
|
322
|
-
background: string;
|
|
323
|
-
borderColor: string;
|
|
324
|
-
height?: string | undefined;
|
|
325
|
-
width: string;
|
|
326
|
-
fontSize: string | 0;
|
|
327
|
-
label: string;
|
|
328
|
-
boxSizing: string;
|
|
329
|
-
display: string;
|
|
330
|
-
direction: string;
|
|
331
|
-
userSelect: string;
|
|
332
|
-
transition: string;
|
|
333
|
-
transform: string;
|
|
334
|
-
fontFamily: string;
|
|
335
|
-
fontWeight: number;
|
|
336
|
-
textTransform: string;
|
|
337
|
-
letterSpacing: string;
|
|
338
|
-
borderWidth: string | 0;
|
|
339
|
-
textAlign: "start" | "center" | undefined;
|
|
340
|
-
'&:hover': {
|
|
341
|
-
transform: string;
|
|
342
|
-
};
|
|
343
|
-
} | {
|
|
344
|
-
borderStyle: string;
|
|
345
|
-
lineHeight: string | number;
|
|
346
|
-
opacity?: number | undefined;
|
|
347
|
-
paddingLeft: string | number;
|
|
348
|
-
paddingRight: string | number;
|
|
349
|
-
borderRadius: string | 0;
|
|
350
|
-
color: string;
|
|
351
|
-
background: string;
|
|
352
|
-
borderColor: string;
|
|
353
|
-
height?: string | undefined;
|
|
354
|
-
width: string;
|
|
355
|
-
fontSize: string | 0;
|
|
356
|
-
label: string;
|
|
357
|
-
boxSizing: string;
|
|
358
|
-
display: string;
|
|
359
|
-
direction: string;
|
|
360
|
-
userSelect: string;
|
|
361
|
-
transition: string;
|
|
362
|
-
transform: string;
|
|
363
|
-
fontFamily: string;
|
|
364
|
-
fontWeight: number;
|
|
365
|
-
textTransform: string;
|
|
366
|
-
letterSpacing: string;
|
|
367
|
-
borderWidth: string | 0;
|
|
368
|
-
textAlign: "start" | "center" | undefined;
|
|
369
|
-
'&:hover': {
|
|
370
|
-
transform: string;
|
|
371
|
-
};
|
|
372
|
-
} | {
|
|
373
|
-
borderStyle: string;
|
|
374
|
-
lineHeight: string | number;
|
|
375
|
-
opacity?: number | undefined;
|
|
376
|
-
paddingLeft: string | number;
|
|
377
|
-
paddingRight: string | number;
|
|
378
|
-
borderRadius: string | 0;
|
|
379
|
-
color: string;
|
|
380
|
-
background: string;
|
|
381
|
-
borderColor: string;
|
|
382
|
-
height?: string | undefined;
|
|
383
|
-
width: string;
|
|
384
|
-
fontSize: string | 0;
|
|
385
|
-
label: string;
|
|
386
|
-
boxSizing: string;
|
|
387
|
-
display: string;
|
|
388
|
-
direction: string;
|
|
389
|
-
userSelect: string;
|
|
390
|
-
transition: string;
|
|
391
|
-
transform: string;
|
|
392
|
-
fontFamily: string;
|
|
393
|
-
fontWeight: number;
|
|
394
|
-
textTransform: string;
|
|
395
|
-
letterSpacing: string;
|
|
396
|
-
borderWidth: string | 0;
|
|
397
|
-
textAlign: "start" | "center" | undefined;
|
|
398
|
-
'&:hover': {
|
|
399
|
-
transform: string;
|
|
400
|
-
};
|
|
401
|
-
} | {
|
|
402
|
-
borderStyle: string;
|
|
403
|
-
lineHeight: string | number;
|
|
404
|
-
opacity?: number | undefined;
|
|
405
|
-
paddingLeft: string | number;
|
|
406
|
-
paddingRight: string | number;
|
|
407
|
-
borderRadius: string | 0;
|
|
408
|
-
color: string;
|
|
409
|
-
background: string;
|
|
410
|
-
borderColor: string;
|
|
411
|
-
height?: string | undefined;
|
|
412
|
-
width: string;
|
|
413
|
-
fontSize: string | 0;
|
|
414
|
-
label: string;
|
|
415
|
-
boxSizing: string;
|
|
416
|
-
display: string;
|
|
417
|
-
direction: string;
|
|
418
|
-
userSelect: string;
|
|
419
|
-
transition: string;
|
|
420
|
-
transform: string;
|
|
421
|
-
fontFamily: string;
|
|
422
|
-
fontWeight: number;
|
|
423
|
-
textTransform: string;
|
|
424
|
-
letterSpacing: string;
|
|
425
|
-
borderWidth: string | 0;
|
|
426
|
-
textAlign: "start" | "center" | undefined;
|
|
427
|
-
'&:hover': {
|
|
428
|
-
transform: string;
|
|
429
|
-
};
|
|
430
|
-
} | {
|
|
431
|
-
borderStyle: string;
|
|
432
|
-
lineHeight: string | number;
|
|
433
|
-
opacity?: number | undefined;
|
|
434
|
-
paddingLeft: string | number;
|
|
435
|
-
paddingRight: string | number;
|
|
436
|
-
borderRadius: string | 0;
|
|
437
|
-
color: string;
|
|
438
|
-
background: string;
|
|
439
|
-
borderColor: string;
|
|
440
|
-
height?: string | undefined;
|
|
441
|
-
width: string;
|
|
442
|
-
fontSize: string | 0;
|
|
443
|
-
label: string;
|
|
444
|
-
boxSizing: string;
|
|
445
|
-
display: string;
|
|
446
|
-
direction: string;
|
|
447
|
-
userSelect: string;
|
|
448
|
-
transition: string;
|
|
449
|
-
transform: string;
|
|
450
|
-
fontFamily: string;
|
|
451
|
-
fontWeight: number;
|
|
452
|
-
textTransform: string;
|
|
453
|
-
letterSpacing: string;
|
|
454
|
-
borderWidth: string | 0;
|
|
455
|
-
textAlign: "start" | "center" | undefined;
|
|
456
|
-
'&:hover': {
|
|
457
|
-
transform: string;
|
|
458
|
-
};
|
|
459
|
-
} | {
|
|
460
|
-
borderStyle: string;
|
|
461
|
-
lineHeight: string | number;
|
|
462
|
-
opacity?: number | undefined;
|
|
463
|
-
paddingLeft: string | number;
|
|
464
|
-
paddingRight: string | number;
|
|
465
|
-
borderRadius: string | 0;
|
|
466
|
-
color: string;
|
|
467
|
-
background: string;
|
|
468
|
-
borderColor: string;
|
|
469
|
-
height?: string | undefined;
|
|
470
|
-
width: string;
|
|
471
|
-
fontSize: string | 0;
|
|
472
|
-
label: string;
|
|
473
|
-
boxSizing: string;
|
|
474
|
-
display: string;
|
|
475
|
-
direction: string;
|
|
476
|
-
userSelect: string;
|
|
477
|
-
transition: string;
|
|
478
|
-
transform: string;
|
|
479
|
-
fontFamily: string;
|
|
480
|
-
fontWeight: number;
|
|
481
|
-
textTransform: string;
|
|
482
|
-
letterSpacing: string;
|
|
483
|
-
borderWidth: string | 0;
|
|
484
|
-
textAlign: "start" | "center" | undefined;
|
|
485
|
-
'&:hover': {
|
|
486
|
-
transform: string;
|
|
487
|
-
};
|
|
488
|
-
};
|
|
489
|
-
children: {
|
|
490
|
-
paddingTop: string | number;
|
|
491
|
-
paddingBottom: string | number;
|
|
492
|
-
label: string;
|
|
493
|
-
display: string;
|
|
494
|
-
} | {
|
|
495
|
-
paddingTop: string | number;
|
|
496
|
-
paddingBottom: string | number;
|
|
497
|
-
label: string;
|
|
498
|
-
display: string;
|
|
499
|
-
} | {
|
|
500
|
-
paddingTop: string | number;
|
|
501
|
-
paddingBottom: string | number;
|
|
502
|
-
label: string;
|
|
503
|
-
display: string;
|
|
504
|
-
};
|
|
505
|
-
iconSVG: {
|
|
506
|
-
fontSize: string | 0;
|
|
507
|
-
label: string;
|
|
508
|
-
display: string;
|
|
509
|
-
alignItems: string;
|
|
510
|
-
} | {
|
|
511
|
-
fontSize: string | 0;
|
|
512
|
-
label: string;
|
|
513
|
-
display: string;
|
|
514
|
-
alignItems: string;
|
|
515
|
-
} | {
|
|
516
|
-
fontSize: string | 0;
|
|
517
|
-
label: string;
|
|
518
|
-
display: string;
|
|
519
|
-
alignItems: string;
|
|
520
|
-
};
|
|
521
|
-
childrenLayout: {
|
|
522
|
-
label: string;
|
|
523
|
-
display: string;
|
|
524
|
-
height: string;
|
|
525
|
-
width: string;
|
|
526
|
-
justifyContent: string;
|
|
527
|
-
boxSizing: string;
|
|
528
|
-
alignItems: string;
|
|
529
|
-
flexDirection: string;
|
|
530
|
-
maxWidth: string;
|
|
531
|
-
overflowX: string;
|
|
532
|
-
overflowY: string;
|
|
533
|
-
unicodeBidi: string;
|
|
534
|
-
};
|
|
535
|
-
iconOnly: {
|
|
536
|
-
label: string;
|
|
537
|
-
boxSizing: string;
|
|
538
|
-
minWidth: string;
|
|
539
|
-
flexShrink: number;
|
|
540
|
-
maxWidth: string;
|
|
541
|
-
overflowX: string;
|
|
542
|
-
overflowY: string;
|
|
543
|
-
unicodeBidi: string;
|
|
544
|
-
};
|
|
545
|
-
iconWrapper: {
|
|
546
|
-
label: string;
|
|
547
|
-
boxSizing: string;
|
|
548
|
-
minWidth: string;
|
|
549
|
-
paddingInlineEnd: string | 0;
|
|
550
|
-
flexShrink: number;
|
|
551
|
-
maxWidth: string;
|
|
552
|
-
overflowX: string;
|
|
553
|
-
overflowY: string;
|
|
554
|
-
unicodeBidi: string;
|
|
555
|
-
};
|
|
556
|
-
childrenWrapper: {
|
|
557
|
-
label: string;
|
|
558
|
-
boxSizing: string;
|
|
559
|
-
minWidth: string;
|
|
560
|
-
flexShrink: number;
|
|
561
|
-
maxWidth: string;
|
|
562
|
-
overflowX: string;
|
|
563
|
-
overflowY: string;
|
|
564
|
-
unicodeBidi: string;
|
|
565
|
-
};
|
|
566
|
-
};
|
|
13
|
+
declare const generateStyle: (componentTheme: BaseButtonTheme, props: BaseButtonProps, state: BaseButtonStyleProps) => BaseButtonStyle;
|
|
567
14
|
export default generateStyle;
|
|
568
15
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/BaseButton/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/BaseButton/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,eAAe,EAChB,MAAM,SAAS,CAAA;AAEhB;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,eAAe,SACxB,eAAe,SACf,oBAAoB,KAC1B,eAmXF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Button/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAWxC,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;;;;;;;;;;;;MAclB;IAED,gBAAgB,OAAO;IAEvB,IAAI,OAAO,SAGV;IAED,KAAK;IAML,gBAAgB,oBAKf;IAGD,eAAe,2BAEd;IAED,MAAM;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Button/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAWxC,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;;;;;;;;;;;;MAclB;IAED,gBAAgB,OAAO;IAEvB,IAAI,OAAO,SAGV;IAED,KAAK;IAML,gBAAgB,oBAKf;IAGD,eAAe,2BAEd;IAED,MAAM;CA4CP;AAED,eAAe,MAAM,CAAA;AACrB,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
package/types/Button/props.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { Spacing } from '@instructure/emotion';
|
|
3
|
-
import type { AsElementType, PropValidators } from '@instructure/shared-types';
|
|
2
|
+
import type { Spacing, WithStyleProps } from '@instructure/emotion';
|
|
3
|
+
import type { AsElementType, PropValidators, BaseButtonTheme } from '@instructure/shared-types';
|
|
4
4
|
declare type ButtonOwnProps = {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
type?: 'button' | 'submit' | 'reset';
|
|
@@ -20,7 +20,7 @@ declare type ButtonOwnProps = {
|
|
|
20
20
|
};
|
|
21
21
|
declare type PropKeys = keyof ButtonOwnProps;
|
|
22
22
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
23
|
-
declare type ButtonProps = ButtonOwnProps
|
|
23
|
+
declare type ButtonProps = ButtonOwnProps & WithStyleProps<BaseButtonTheme, null>;
|
|
24
24
|
declare const propTypes: PropValidators<PropKeys>;
|
|
25
25
|
declare const allowedProps: AllowedPropKeys;
|
|
26
26
|
export type { ButtonProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Button/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Button/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,eAAe,EAChB,MAAM,2BAA2B,CAAA;AAElC,aAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;IACpC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,WAAW,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAA;IACjD,KAAK,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;IAC1E,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAA;IAClC,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAA;CACzD,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,cAAc,CAAA;AAEpC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,WAAW,GAAG,cAAc,GAAG,cAAc,CAAC,eAAe,EAAE,IAAI,CAAC,CAAA;AAEzE,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAuEvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAgBnB,CAAA;AAED,YAAY,EAAE,WAAW,EAAE,CAAA;AAC3B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -17,11 +17,7 @@ declare class CloseButton extends Component<CloseButtonProps> {
|
|
|
17
17
|
size?: "small" | "medium" | "large" | undefined;
|
|
18
18
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
19
19
|
margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
20
|
-
placement?: "start" | "end" | "static" | undefined;
|
|
21
|
-
---
|
|
22
|
-
category: components
|
|
23
|
-
---
|
|
24
|
-
**/
|
|
20
|
+
placement?: "start" | "end" | "static" | undefined;
|
|
25
21
|
offset?: "small" | "medium" | "none" | "x-small" | undefined;
|
|
26
22
|
type?: "button" | "submit" | "reset" | undefined;
|
|
27
23
|
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
@@ -37,11 +33,7 @@ declare class CloseButton extends Component<CloseButtonProps> {
|
|
|
37
33
|
size?: "small" | "medium" | "large" | undefined;
|
|
38
34
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
39
35
|
margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
40
|
-
placement?: "start" | "end" | "static" | undefined;
|
|
41
|
-
---
|
|
42
|
-
category: components
|
|
43
|
-
---
|
|
44
|
-
**/
|
|
36
|
+
placement?: "start" | "end" | "static" | undefined;
|
|
45
37
|
offset?: "small" | "medium" | "none" | "x-small" | undefined;
|
|
46
38
|
type?: "button" | "submit" | "reset" | undefined;
|
|
47
39
|
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/CloseButton/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAOrD,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
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/CloseButton/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAOrD,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;;;;;;;;;MAWlB;IAED,iBAAiB;IAKjB,kBAAkB;IAKlB,IAAI,WAAW,0DAEd;IAED,IAAI,KAAK,gDAIR;IAED,MAAM;CAyCP;AAED,eAAe,WAAW,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { Spacing, WithStyleProps } from '@instructure/emotion';
|
|
3
|
-
import type { AsElementType, PropValidators } from '@instructure/shared-types';
|
|
2
|
+
import type { Spacing, WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
3
|
+
import type { AsElementType, CloseButtonTheme, PropValidators } from '@instructure/shared-types';
|
|
4
4
|
declare type CloseButtonOwnProps = {
|
|
5
5
|
screenReaderLabel: string | React.ReactNode;
|
|
6
6
|
color?: 'primary' | 'primary-inverse';
|
|
@@ -19,9 +19,10 @@ declare type CloseButtonOwnProps = {
|
|
|
19
19
|
};
|
|
20
20
|
declare type PropKeys = keyof CloseButtonOwnProps;
|
|
21
21
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
22
|
-
declare type CloseButtonProps = CloseButtonOwnProps & WithStyleProps
|
|
22
|
+
declare type CloseButtonProps = CloseButtonOwnProps & WithStyleProps<CloseButtonTheme, CloseButtonStyle>;
|
|
23
|
+
declare type CloseButtonStyle = ComponentStyle<'closeButton'>;
|
|
23
24
|
declare const propTypes: PropValidators<PropKeys>;
|
|
24
25
|
declare const allowedProps: AllowedPropKeys;
|
|
25
|
-
export type { CloseButtonProps };
|
|
26
|
+
export type { CloseButtonProps, CloseButtonStyle };
|
|
26
27
|
export { propTypes, allowedProps };
|
|
27
28
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/CloseButton/props.ts"],"names":[],"mappings":";AA2BA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/CloseButton/props.ts"],"names":[],"mappings":";AA2BA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,cAAc,EACf,MAAM,2BAA2B,CAAA;AAElC,aAAK,mBAAmB,GAAG;IACzB,iBAAiB,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAA;IAC3C,KAAK,CAAC,EAAE,SAAS,GAAG,iBAAiB,CAAA;IACrC,WAAW,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAA;IACjD,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAA;IACtC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAA;IAChD,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;IACpC,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC3B,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,mBAAmB,CAAA;AAEzC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,gBAAgB,GAAG,mBAAmB,GACzC,cAAc,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAA;AAEpD,aAAK,gBAAgB,GAAG,cAAc,CAAC,aAAa,CAAC,CAAA;AAErD,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CA+DvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAenB,CAAA;AAED,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CloseButtonTheme } from '@instructure/shared-types';
|
|
2
|
-
import { CloseButtonProps } from './props';
|
|
1
|
+
import type { CloseButtonTheme } from '@instructure/shared-types';
|
|
2
|
+
import type { CloseButtonProps, CloseButtonStyle } from './props';
|
|
3
3
|
/**
|
|
4
4
|
* ---
|
|
5
5
|
* private: true
|
|
@@ -10,21 +10,6 @@ import { CloseButtonProps } from './props';
|
|
|
10
10
|
* @param {Object} state the state of the component, the style is applied to
|
|
11
11
|
* @return {Object} The final style object, which will be used in the component
|
|
12
12
|
*/
|
|
13
|
-
declare const generateStyle: (componentTheme: CloseButtonTheme, props: CloseButtonProps) =>
|
|
14
|
-
closeButton: {
|
|
15
|
-
position: string;
|
|
16
|
-
label: string;
|
|
17
|
-
zIndex: number;
|
|
18
|
-
display: string;
|
|
19
|
-
} | {
|
|
20
|
-
insetInlineStart: string | number;
|
|
21
|
-
insetInlineEnd: string | number;
|
|
22
|
-
top?: string | number | undefined;
|
|
23
|
-
position: string;
|
|
24
|
-
label: string;
|
|
25
|
-
zIndex: number;
|
|
26
|
-
display: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
13
|
+
declare const generateStyle: (componentTheme: CloseButtonTheme, props: CloseButtonProps) => CloseButtonStyle;
|
|
29
14
|
export default generateStyle;
|
|
30
15
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/CloseButton/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/CloseButton/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAEjE;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,gBAAgB,SACzB,gBAAgB,KACtB,gBAqCF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/CondensedButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAWxC,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;;;;;;;;;MAWlB;IAED,WAAW,OAAO;IAElB,IAAI,OAAO,SAGV;IAED,KAAK;IAKL,MAAM;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/CondensedButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAWxC,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;;;;;;;;;MAWlB;IAED,WAAW,OAAO;IAElB,IAAI,OAAO,SAGV;IAED,KAAK;IAKL,MAAM;CA4CP;AAED,eAAe,eAAe,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { Spacing } from '@instructure/emotion';
|
|
3
|
-
import type { AsElementType, PropValidators } from '@instructure/shared-types';
|
|
2
|
+
import type { Spacing, WithStyleProps } from '@instructure/emotion';
|
|
3
|
+
import type { AsElementType, BaseButtonTheme, PropValidators } from '@instructure/shared-types';
|
|
4
4
|
declare type CondensedButtonOwnProps = {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
type?: 'button' | 'submit' | 'reset';
|
|
@@ -16,7 +16,7 @@ declare type CondensedButtonOwnProps = {
|
|
|
16
16
|
};
|
|
17
17
|
declare type PropKeys = keyof CondensedButtonOwnProps;
|
|
18
18
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
19
|
-
declare type CondensedButtonProps = CondensedButtonOwnProps
|
|
19
|
+
declare type CondensedButtonProps = CondensedButtonOwnProps & WithStyleProps<BaseButtonTheme, null>;
|
|
20
20
|
declare const propTypes: PropValidators<PropKeys>;
|
|
21
21
|
declare const allowedProps: AllowedPropKeys;
|
|
22
22
|
export type { CondensedButtonProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/CondensedButton/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/CondensedButton/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,cAAc,EACf,MAAM,2BAA2B,CAAA;AAElC,aAAK,uBAAuB,GAAG;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;IACpC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,WAAW,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAA;IACjD,KAAK,CAAC,EAAE,SAAS,GAAG,iBAAiB,CAAA;IACrC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAA;CACzD,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,uBAAuB,CAAA;AAE7C,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,oBAAoB,GAAG,uBAAuB,GACjD,cAAc,CAAC,eAAe,EAAE,IAAI,CAAC,CAAA;AAEvC,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAgDvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAYnB,CAAA;AAED,YAAY,EAAE,oBAAoB,EAAE,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/IconButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAYxC,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;;;;;;;;;;;;MAclB;IAED,WAAW,OAAO;IAElB,IAAI,OAAO,SAGV;IAED,KAAK;IAKL,MAAM;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/IconButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAYxC,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;;;;;;;;;;;;MAclB;IAED,WAAW,OAAO;IAElB,IAAI,OAAO,SAGV;IAED,KAAK;IAKL,MAAM;CAkDP;AAED,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { Spacing } from '@instructure/emotion';
|
|
3
|
-
import type { AsElementType, PropValidators } from '@instructure/shared-types';
|
|
2
|
+
import type { Spacing, WithStyleProps } from '@instructure/emotion';
|
|
3
|
+
import type { AsElementType, PropValidators, BaseButtonTheme } from '@instructure/shared-types';
|
|
4
4
|
declare type IconButtonOwnProps = {
|
|
5
5
|
children?: React.ReactNode | ((...args: any[]) => React.ReactNode);
|
|
6
6
|
renderIcon?: React.ReactNode | ((...args: any[]) => any);
|
|
@@ -21,7 +21,7 @@ declare type IconButtonOwnProps = {
|
|
|
21
21
|
};
|
|
22
22
|
declare type PropKeys = keyof IconButtonOwnProps;
|
|
23
23
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
24
|
-
declare type IconButtonProps = IconButtonOwnProps
|
|
24
|
+
declare type IconButtonProps = IconButtonOwnProps & WithStyleProps<BaseButtonTheme, null>;
|
|
25
25
|
declare const propTypes: PropValidators<PropKeys>;
|
|
26
26
|
declare const allowedProps: AllowedPropKeys;
|
|
27
27
|
export type { IconButtonProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/IconButton/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/IconButton/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,eAAe,EAChB,MAAM,2BAA2B,CAAA;AAElC,aAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,KAAK,CAAC,SAAS,CAAC,CAAA;IAClE,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAA;IACxD,iBAAiB,EAAE,MAAM,CAAA;IACzB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;IACpC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,WAAW,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAA;IACjD,KAAK,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;IAC1E,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,KAAK,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAA;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,kBAAkB,CAAA;AAExC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,eAAe,GAAG,kBAAkB,GACvC,cAAc,CAAC,eAAe,EAAE,IAAI,CAAC,CAAA;AAEvC,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CA0EvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAiBnB,CAAA;AAED,YAAY,EAAE,eAAe,EAAE,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|