@pingux/astro 2.43.0 → 2.44.0-alpha.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/lib/cjs/components/Icon/Icon.stories.js +18 -14
- package/lib/cjs/components/IconButton/IconButton.d.ts +4 -0
- package/lib/cjs/components/IconButton/IconButton.js +36 -13
- package/lib/cjs/components/IconButton/IconButton.stories.d.ts +10 -0
- package/lib/cjs/components/IconButton/IconButton.stories.js +1 -2
- package/lib/cjs/components/IconButton/IconButton.styles.d.ts +417 -0
- package/lib/cjs/components/IconButton/IconButton.test.d.ts +1 -0
- package/lib/cjs/components/IconButton/IconButton.test.js +2 -1
- package/lib/cjs/components/IconButton/iconButtonAttributes.d.ts +48 -0
- package/lib/cjs/components/IconButton/iconButtonAttributes.js +1 -8
- package/lib/cjs/components/IconButton/index.d.ts +1 -0
- package/lib/cjs/components/Loader/Loader.stories.js +14 -6
- package/lib/cjs/context/BadgeContext/index.d.ts +5 -1
- package/lib/cjs/types/icon.d.ts +2 -6
- package/lib/cjs/types/iconButton.d.ts +21 -0
- package/lib/cjs/types/iconButton.js +6 -0
- package/lib/cjs/types/index.d.ts +1 -0
- package/lib/cjs/types/index.js +21 -10
- package/lib/cjs/types/loader.d.ts +2 -7
- package/lib/cjs/types/shared/style.d.ts +4 -0
- package/lib/cjs/utils/docUtils/iconSizeProps.d.ts +9 -0
- package/lib/cjs/utils/docUtils/iconSizeProps.js +22 -0
- package/lib/components/Icon/Icon.stories.js +18 -13
- package/lib/components/IconButton/IconButton.js +36 -13
- package/lib/components/IconButton/IconButton.stories.js +1 -2
- package/lib/components/IconButton/IconButton.test.js +2 -1
- package/lib/components/IconButton/iconButtonAttributes.js +1 -8
- package/lib/components/Loader/Loader.stories.js +15 -6
- package/lib/types/iconButton.js +1 -0
- package/lib/types/index.js +1 -0
- package/lib/utils/docUtils/iconSizeProps.js +12 -0
- package/package.json +1 -1
@@ -1,15 +1,22 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
4
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
5
|
+
var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
6
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
7
|
+
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
8
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
9
|
+
var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
3
10
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
4
11
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
5
12
|
_Object$defineProperty(exports, "__esModule", {
|
6
13
|
value: true
|
7
14
|
});
|
8
15
|
exports["default"] = exports.Sizes = exports.SVGIcons = exports.Default = exports.CommonlyUsed = void 0;
|
16
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
9
17
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
10
18
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
11
|
-
var
|
12
|
-
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
19
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
13
20
|
var _react = _interopRequireDefault(require("react"));
|
14
21
|
var _AccountGroupIcon = _interopRequireDefault(require("@pingux/mdi-react/AccountGroupIcon"));
|
15
22
|
var _AccountIcon = _interopRequireDefault(require("@pingux/mdi-react/AccountIcon"));
|
@@ -22,9 +29,11 @@ var _storybookDocsLayout = _interopRequireDefault(require("../../../.storybook/s
|
|
22
29
|
var _index = require("../../index");
|
23
30
|
var _colors = require("../../styles/colors");
|
24
31
|
var _figmaLinks = require("../../utils/designUtils/figmaLinks");
|
25
|
-
var
|
32
|
+
var _iconSizeProps = require("../../utils/docUtils/iconSizeProps");
|
26
33
|
var _Icon = _interopRequireDefault(require("./Icon.mdx"));
|
27
34
|
var _react2 = require("@emotion/react");
|
35
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
36
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
28
37
|
var _default = {
|
29
38
|
title: 'Components/Icon',
|
30
39
|
component: _index.Icon,
|
@@ -39,20 +48,14 @@ var _default = {
|
|
39
48
|
}
|
40
49
|
}
|
41
50
|
},
|
42
|
-
argTypes: {
|
51
|
+
argTypes: _objectSpread(_objectSpread({
|
43
52
|
icon: {
|
44
53
|
control: {
|
45
54
|
type: 'none'
|
46
55
|
},
|
47
56
|
description: 'The icon to render. List of icons at https://materialdesignicons.com/'
|
48
|
-
}
|
49
|
-
|
50
|
-
control: {
|
51
|
-
type: 'select',
|
52
|
-
options: (0, _keys["default"])(_tShirtSizes.tShirtSizes)
|
53
|
-
},
|
54
|
-
description: 'The size of the icon container. If given a number value, it will be converted to pixels. ' + 'Tshirt sizing is recommended and can be passed to the size prop as "xs", "sm" , "md" ' + 'rendering 15, 20, and 25 pixel svg containers.'
|
55
|
-
},
|
57
|
+
}
|
58
|
+
}, _iconSizeProps.sizeArgTypes), {}, {
|
56
59
|
color: {
|
57
60
|
control: {
|
58
61
|
type: 'select',
|
@@ -63,10 +66,11 @@ var _default = {
|
|
63
66
|
})
|
64
67
|
}
|
65
68
|
}
|
66
|
-
},
|
69
|
+
}),
|
67
70
|
args: {
|
71
|
+
color: 'active',
|
68
72
|
icon: _SearchIcon["default"],
|
69
|
-
|
73
|
+
size: 'sm'
|
70
74
|
}
|
71
75
|
};
|
72
76
|
exports["default"] = _default;
|
@@ -25,9 +25,8 @@ var _themeUi = require("theme-ui");
|
|
25
25
|
var _BadgeContext = require("../../context/BadgeContext");
|
26
26
|
var _hooks = require("../../hooks");
|
27
27
|
var _TooltipTrigger = _interopRequireWildcard(require("../TooltipTrigger"));
|
28
|
-
var _iconButtonAttributes = require("./iconButtonAttributes");
|
29
28
|
var _react2 = require("@emotion/react");
|
30
|
-
var _excluded = ["children", "className", "title", "variant", "
|
29
|
+
var _excluded = ["children", "className", "title", "variant", "onBlur", "onFocus", "onHoverChange", "onHoverEnd", "onHoverStart", "onKeyDown", "onKeyUp", "onPress", "onPressEnd", "onPressStart", "onPressChange", "onPressUp", "isDisabled"];
|
31
30
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
32
31
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
33
32
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
@@ -37,26 +36,51 @@ var IconButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
37
36
|
className = props.className,
|
38
37
|
title = props.title,
|
39
38
|
variant = props.variant,
|
39
|
+
onBlur = props.onBlur,
|
40
|
+
onFocus = props.onFocus,
|
41
|
+
onHoverChange = props.onHoverChange,
|
42
|
+
onHoverEnd = props.onHoverEnd,
|
43
|
+
onHoverStart = props.onHoverStart,
|
44
|
+
onKeyDown = props.onKeyDown,
|
45
|
+
onKeyUp = props.onKeyUp,
|
40
46
|
onPress = props.onPress,
|
41
|
-
onPressStart = props.onPressStart,
|
42
47
|
onPressEnd = props.onPressEnd,
|
48
|
+
onPressStart = props.onPressStart,
|
43
49
|
onPressChange = props.onPressChange,
|
44
50
|
onPressUp = props.onPressUp,
|
45
51
|
isDisabled = props.isDisabled,
|
46
52
|
others = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
47
|
-
var buttonRef = (0, _react.useRef)();
|
53
|
+
var buttonRef = (0, _react.useRef)(null);
|
48
54
|
/* istanbul ignore next */
|
49
55
|
(0, _react.useImperativeHandle)(ref, function () {
|
50
56
|
return buttonRef.current;
|
51
57
|
});
|
52
|
-
var _usePress = (0, _interactions.usePress)(
|
58
|
+
var _usePress = (0, _interactions.usePress)({
|
59
|
+
ref: buttonRef
|
60
|
+
}),
|
53
61
|
isPressedFromContext = _usePress.isPressed;
|
54
|
-
var _useButton = (0, _reactAria.useButton)(_objectSpread({
|
62
|
+
var _useButton = (0, _reactAria.useButton)(_objectSpread({
|
63
|
+
elementType: 'button',
|
64
|
+
isDisabled: isDisabled,
|
65
|
+
onBlur: onBlur,
|
66
|
+
onFocus: onFocus,
|
67
|
+
onKeyDown: onKeyDown,
|
68
|
+
onKeyUp: onKeyUp,
|
69
|
+
onPress: onPress,
|
70
|
+
onPressChange: onPressChange,
|
71
|
+
onPressEnd: onPressEnd,
|
72
|
+
onPressStart: onPressStart,
|
73
|
+
onPressUp: onPressUp
|
74
|
+
}, others), buttonRef),
|
55
75
|
buttonProps = _useButton.buttonProps,
|
56
76
|
isPressed = _useButton.isPressed;
|
57
|
-
var
|
58
|
-
badgeBg =
|
59
|
-
var _useHover = (0, _interactions.useHover)(
|
77
|
+
var _ref = (0, _react.useContext)(_BadgeContext.BadgeContext),
|
78
|
+
badgeBg = _ref.bg;
|
79
|
+
var _useHover = (0, _interactions.useHover)({
|
80
|
+
onHoverChange: onHoverChange,
|
81
|
+
onHoverEnd: onHoverEnd,
|
82
|
+
onHoverStart: onHoverStart
|
83
|
+
}),
|
60
84
|
hoverProps = _useHover.hoverProps,
|
61
85
|
isHovered = _useHover.isHovered;
|
62
86
|
var _useFocusRing = (0, _reactAria.useFocusRing)(),
|
@@ -77,11 +101,11 @@ var IconButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
77
101
|
tabIndex: 0,
|
78
102
|
className: classNames,
|
79
103
|
"aria-label": ariaLabel,
|
80
|
-
sx: badgeBg && isHovered
|
104
|
+
sx: badgeBg && isHovered ? {
|
81
105
|
'path': {
|
82
106
|
fill: badgeBg
|
83
107
|
}
|
84
|
-
},
|
108
|
+
} : undefined,
|
85
109
|
variant: "iconButtons.".concat(variant),
|
86
110
|
onPointerOver: hoverProps.onPointerEnter
|
87
111
|
}, children));
|
@@ -92,11 +116,10 @@ var IconButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
92
116
|
}
|
93
117
|
return button;
|
94
118
|
});
|
95
|
-
IconButton.propTypes = _iconButtonAttributes.iconButtonPropTypes;
|
96
119
|
IconButton.defaultProps = {
|
97
120
|
variant: 'base',
|
98
121
|
isDisabled: false
|
99
122
|
};
|
100
|
-
IconButton.displayName = '
|
123
|
+
IconButton.displayName = 'IconButton';
|
101
124
|
var _default = IconButton;
|
102
125
|
exports["default"] = _default;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { StoryFn } from '@storybook/react';
|
3
|
+
import { IconButtonProps } from '../../types';
|
4
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
5
|
+
export default _default;
|
6
|
+
export declare const Default: StoryFn<IconButtonProps>;
|
7
|
+
export declare const WithTooltip: () => React.JSX.Element;
|
8
|
+
export declare const Disabled: () => React.JSX.Element;
|
9
|
+
export declare const Sizes: () => React.JSX.Element;
|
10
|
+
export declare const CommonlyUsed: () => React.JSX.Element;
|
@@ -16,7 +16,7 @@ var _PlusIcon = _interopRequireDefault(require("@pingux/mdi-react/PlusIcon"));
|
|
16
16
|
var _storybookAddonDesigns = require("storybook-addon-designs");
|
17
17
|
var _storybookDocsLayout = _interopRequireDefault(require("../../../.storybook/storybookDocsLayout"));
|
18
18
|
var _index = require("../../index");
|
19
|
-
var _figmaLinks = require("../../utils/designUtils/figmaLinks
|
19
|
+
var _figmaLinks = require("../../utils/designUtils/figmaLinks");
|
20
20
|
var _IconButton = _interopRequireDefault(require("./IconButton.mdx"));
|
21
21
|
var _iconButtonAttributes = require("./iconButtonAttributes");
|
22
22
|
var _react2 = require("@emotion/react");
|
@@ -43,7 +43,6 @@ var Default = function Default(args) {
|
|
43
43
|
"aria-label": "default icon button"
|
44
44
|
}, args), (0, _react2.jsx)(_index.Icon, {
|
45
45
|
icon: _CreateIcon["default"],
|
46
|
-
size: args.size,
|
47
46
|
title: {
|
48
47
|
name: 'Create Icon'
|
49
48
|
}
|
@@ -0,0 +1,417 @@
|
|
1
|
+
export declare const base: {
|
2
|
+
justifyContent: string;
|
3
|
+
appearance: string;
|
4
|
+
alignItems: string;
|
5
|
+
alignSelf: string;
|
6
|
+
display: string;
|
7
|
+
flexGrow: number;
|
8
|
+
flexShrink: number;
|
9
|
+
borderRadius: string;
|
10
|
+
cursor: string;
|
11
|
+
bg: string;
|
12
|
+
p: string;
|
13
|
+
width: string;
|
14
|
+
height: string;
|
15
|
+
path: {
|
16
|
+
fill: string;
|
17
|
+
};
|
18
|
+
outline: string;
|
19
|
+
'&.is-focused': {
|
20
|
+
outline: string;
|
21
|
+
outlineColor: string;
|
22
|
+
outlineOffset: string;
|
23
|
+
};
|
24
|
+
'&.is-hovered': {
|
25
|
+
bg: string;
|
26
|
+
};
|
27
|
+
'&.is-pressed': {
|
28
|
+
path: {
|
29
|
+
fill: string;
|
30
|
+
};
|
31
|
+
bg: string;
|
32
|
+
};
|
33
|
+
};
|
34
|
+
export declare const square: {
|
35
|
+
borderRadius: string;
|
36
|
+
justifyContent: string;
|
37
|
+
appearance: string;
|
38
|
+
alignItems: string;
|
39
|
+
alignSelf: string;
|
40
|
+
display: string;
|
41
|
+
flexGrow: number;
|
42
|
+
flexShrink: number;
|
43
|
+
cursor: string;
|
44
|
+
bg: string;
|
45
|
+
p: string;
|
46
|
+
width: string;
|
47
|
+
height: string;
|
48
|
+
path: {
|
49
|
+
fill: string;
|
50
|
+
};
|
51
|
+
outline: string;
|
52
|
+
'&.is-focused': {
|
53
|
+
outline: string;
|
54
|
+
outlineColor: string;
|
55
|
+
outlineOffset: string;
|
56
|
+
};
|
57
|
+
'&.is-hovered': {
|
58
|
+
bg: string;
|
59
|
+
};
|
60
|
+
'&.is-pressed': {
|
61
|
+
path: {
|
62
|
+
fill: string;
|
63
|
+
};
|
64
|
+
bg: string;
|
65
|
+
};
|
66
|
+
};
|
67
|
+
declare const _default: {
|
68
|
+
base: {
|
69
|
+
justifyContent: string;
|
70
|
+
appearance: string;
|
71
|
+
alignItems: string;
|
72
|
+
alignSelf: string;
|
73
|
+
display: string;
|
74
|
+
flexGrow: number;
|
75
|
+
flexShrink: number;
|
76
|
+
borderRadius: string;
|
77
|
+
cursor: string;
|
78
|
+
bg: string;
|
79
|
+
p: string;
|
80
|
+
width: string;
|
81
|
+
height: string;
|
82
|
+
path: {
|
83
|
+
fill: string;
|
84
|
+
};
|
85
|
+
outline: string;
|
86
|
+
'&.is-focused': {
|
87
|
+
outline: string;
|
88
|
+
outlineColor: string;
|
89
|
+
outlineOffset: string;
|
90
|
+
};
|
91
|
+
'&.is-hovered': {
|
92
|
+
bg: string;
|
93
|
+
};
|
94
|
+
'&.is-pressed': {
|
95
|
+
path: {
|
96
|
+
fill: string;
|
97
|
+
};
|
98
|
+
bg: string;
|
99
|
+
};
|
100
|
+
};
|
101
|
+
bidirectional: {
|
102
|
+
border: string;
|
103
|
+
outline: string;
|
104
|
+
height: string;
|
105
|
+
width: string;
|
106
|
+
color: string;
|
107
|
+
borderRadius: string;
|
108
|
+
borderColor: string;
|
109
|
+
'&.is-hovered': {
|
110
|
+
color: string;
|
111
|
+
borderColor: string;
|
112
|
+
};
|
113
|
+
'&.is-pressed': {
|
114
|
+
color: string;
|
115
|
+
borderColor: string;
|
116
|
+
};
|
117
|
+
'&.is-focused': {
|
118
|
+
outline: string;
|
119
|
+
outlineColor: string;
|
120
|
+
outlineOffset: string;
|
121
|
+
};
|
122
|
+
};
|
123
|
+
badge: {
|
124
|
+
deleteButton: {
|
125
|
+
borderRadius: string;
|
126
|
+
cursor: string;
|
127
|
+
height: number;
|
128
|
+
p: number;
|
129
|
+
width: number;
|
130
|
+
mx: string;
|
131
|
+
'&.is-focused': {
|
132
|
+
bg: string;
|
133
|
+
boxShadow: string;
|
134
|
+
outline: string;
|
135
|
+
outlineColor: string;
|
136
|
+
outlineOffset: string;
|
137
|
+
};
|
138
|
+
};
|
139
|
+
};
|
140
|
+
badgeDeleteButton: {
|
141
|
+
outline: string;
|
142
|
+
path: {
|
143
|
+
fill: string;
|
144
|
+
};
|
145
|
+
'&.is-focused': {
|
146
|
+
boxShadow: string;
|
147
|
+
outline: string;
|
148
|
+
outlineColor: string;
|
149
|
+
outlineOffset: string;
|
150
|
+
};
|
151
|
+
'&.is-hovered': {
|
152
|
+
backgroundColor: string;
|
153
|
+
path: {
|
154
|
+
fill: string;
|
155
|
+
};
|
156
|
+
};
|
157
|
+
'&.is-pressed': {
|
158
|
+
path: {
|
159
|
+
fill: string;
|
160
|
+
};
|
161
|
+
bg: string;
|
162
|
+
};
|
163
|
+
borderRadius: string;
|
164
|
+
cursor: string;
|
165
|
+
height: number;
|
166
|
+
p: number;
|
167
|
+
width: number;
|
168
|
+
mx: string;
|
169
|
+
};
|
170
|
+
copyButton: any;
|
171
|
+
datePicker: {
|
172
|
+
containedIcon: any;
|
173
|
+
};
|
174
|
+
hintButton: any;
|
175
|
+
inverted: {
|
176
|
+
bg: string;
|
177
|
+
borderColor: string;
|
178
|
+
path: {
|
179
|
+
fill: string;
|
180
|
+
};
|
181
|
+
'&.is-hovered': {
|
182
|
+
bg: string;
|
183
|
+
borderColor: string;
|
184
|
+
color: string;
|
185
|
+
boxShadow: string;
|
186
|
+
};
|
187
|
+
'&.is-focused': {
|
188
|
+
outline: string;
|
189
|
+
outlineColor: string;
|
190
|
+
outlineOffset: string;
|
191
|
+
};
|
192
|
+
'&.is-pressed': {
|
193
|
+
bg: string;
|
194
|
+
borderColor: string;
|
195
|
+
color: string;
|
196
|
+
};
|
197
|
+
justifyContent: string;
|
198
|
+
appearance: string;
|
199
|
+
alignItems: string;
|
200
|
+
alignSelf: string;
|
201
|
+
display: string;
|
202
|
+
flexGrow: number;
|
203
|
+
flexShrink: number;
|
204
|
+
borderRadius: string;
|
205
|
+
cursor: string;
|
206
|
+
p: string;
|
207
|
+
width: string;
|
208
|
+
height: string;
|
209
|
+
outline: string;
|
210
|
+
};
|
211
|
+
messageCloseButton: any;
|
212
|
+
modalCloseButton: any;
|
213
|
+
invertedBadgeDeleteButton: {
|
214
|
+
path: {
|
215
|
+
fill: string;
|
216
|
+
};
|
217
|
+
'&.is-hovered': {
|
218
|
+
bg: string;
|
219
|
+
};
|
220
|
+
outline: string;
|
221
|
+
'&.is-focused': {
|
222
|
+
boxShadow: string;
|
223
|
+
outline: string;
|
224
|
+
outlineColor: string;
|
225
|
+
outlineOffset: string;
|
226
|
+
};
|
227
|
+
'&.is-pressed': {
|
228
|
+
path: {
|
229
|
+
fill: string;
|
230
|
+
};
|
231
|
+
bg: string;
|
232
|
+
};
|
233
|
+
borderRadius: string;
|
234
|
+
cursor: string;
|
235
|
+
height: number;
|
236
|
+
p: number;
|
237
|
+
width: number;
|
238
|
+
mx: string;
|
239
|
+
};
|
240
|
+
invertedSquare: {
|
241
|
+
borderRadius: string;
|
242
|
+
bg: string;
|
243
|
+
borderColor: string;
|
244
|
+
path: {
|
245
|
+
fill: string;
|
246
|
+
};
|
247
|
+
'&.is-hovered': {
|
248
|
+
bg: string;
|
249
|
+
borderColor: string;
|
250
|
+
color: string;
|
251
|
+
boxShadow: string;
|
252
|
+
};
|
253
|
+
'&.is-focused': {
|
254
|
+
outline: string;
|
255
|
+
outlineColor: string;
|
256
|
+
outlineOffset: string;
|
257
|
+
};
|
258
|
+
'&.is-pressed': {
|
259
|
+
bg: string;
|
260
|
+
borderColor: string;
|
261
|
+
color: string;
|
262
|
+
};
|
263
|
+
justifyContent: string;
|
264
|
+
appearance: string;
|
265
|
+
alignItems: string;
|
266
|
+
alignSelf: string;
|
267
|
+
display: string;
|
268
|
+
flexGrow: number;
|
269
|
+
flexShrink: number;
|
270
|
+
cursor: string;
|
271
|
+
p: string;
|
272
|
+
width: string;
|
273
|
+
height: string;
|
274
|
+
outline: string;
|
275
|
+
};
|
276
|
+
square: {
|
277
|
+
borderRadius: string;
|
278
|
+
justifyContent: string;
|
279
|
+
appearance: string;
|
280
|
+
alignItems: string;
|
281
|
+
alignSelf: string;
|
282
|
+
display: string;
|
283
|
+
flexGrow: number;
|
284
|
+
flexShrink: number;
|
285
|
+
cursor: string;
|
286
|
+
bg: string;
|
287
|
+
p: string;
|
288
|
+
width: string;
|
289
|
+
height: string;
|
290
|
+
path: {
|
291
|
+
fill: string;
|
292
|
+
};
|
293
|
+
outline: string;
|
294
|
+
'&.is-focused': {
|
295
|
+
outline: string;
|
296
|
+
outlineColor: string;
|
297
|
+
outlineOffset: string;
|
298
|
+
};
|
299
|
+
'&.is-hovered': {
|
300
|
+
bg: string;
|
301
|
+
};
|
302
|
+
'&.is-pressed': {
|
303
|
+
path: {
|
304
|
+
fill: string;
|
305
|
+
};
|
306
|
+
bg: string;
|
307
|
+
};
|
308
|
+
};
|
309
|
+
svgIconButton: {
|
310
|
+
path: {
|
311
|
+
fill: string;
|
312
|
+
};
|
313
|
+
justifyContent: string;
|
314
|
+
appearance: string;
|
315
|
+
alignItems: string;
|
316
|
+
alignSelf: string;
|
317
|
+
display: string;
|
318
|
+
flexGrow: number;
|
319
|
+
flexShrink: number;
|
320
|
+
borderRadius: string;
|
321
|
+
cursor: string;
|
322
|
+
bg: string;
|
323
|
+
p: string;
|
324
|
+
width: string;
|
325
|
+
height: string;
|
326
|
+
outline: string;
|
327
|
+
'&.is-focused': {
|
328
|
+
outline: string;
|
329
|
+
outlineColor: string;
|
330
|
+
outlineOffset: string;
|
331
|
+
};
|
332
|
+
'&.is-hovered': {
|
333
|
+
bg: string;
|
334
|
+
};
|
335
|
+
'&.is-pressed': {
|
336
|
+
path: {
|
337
|
+
fill: string;
|
338
|
+
};
|
339
|
+
bg: string;
|
340
|
+
};
|
341
|
+
};
|
342
|
+
toggle: any;
|
343
|
+
tooltip: {
|
344
|
+
button: any;
|
345
|
+
};
|
346
|
+
applicationPortal: {
|
347
|
+
background: string;
|
348
|
+
'&.is-focused': {
|
349
|
+
outline: string;
|
350
|
+
outlineColor: string;
|
351
|
+
outlineOffset: string;
|
352
|
+
};
|
353
|
+
'&.is-hovered': {
|
354
|
+
path: {
|
355
|
+
fill: string;
|
356
|
+
};
|
357
|
+
};
|
358
|
+
'&.is-pressed': {
|
359
|
+
path: {
|
360
|
+
fill: string;
|
361
|
+
};
|
362
|
+
};
|
363
|
+
justifyContent: string;
|
364
|
+
appearance: string;
|
365
|
+
alignItems: string;
|
366
|
+
alignSelf: string;
|
367
|
+
display: string;
|
368
|
+
flexGrow: number;
|
369
|
+
flexShrink: number;
|
370
|
+
borderRadius: string;
|
371
|
+
cursor: string;
|
372
|
+
bg: string;
|
373
|
+
p: string;
|
374
|
+
width: string;
|
375
|
+
height: string;
|
376
|
+
path: {
|
377
|
+
fill: string;
|
378
|
+
};
|
379
|
+
outline: string;
|
380
|
+
};
|
381
|
+
applicationPortalPinned: {
|
382
|
+
path: {
|
383
|
+
fill: string;
|
384
|
+
};
|
385
|
+
background: string;
|
386
|
+
'&.is-focused': {
|
387
|
+
outline: string;
|
388
|
+
outlineColor: string;
|
389
|
+
outlineOffset: string;
|
390
|
+
};
|
391
|
+
'&.is-hovered': {
|
392
|
+
path: {
|
393
|
+
fill: string;
|
394
|
+
};
|
395
|
+
};
|
396
|
+
'&.is-pressed': {
|
397
|
+
path: {
|
398
|
+
fill: string;
|
399
|
+
};
|
400
|
+
};
|
401
|
+
justifyContent: string;
|
402
|
+
appearance: string;
|
403
|
+
alignItems: string;
|
404
|
+
alignSelf: string;
|
405
|
+
display: string;
|
406
|
+
flexGrow: number;
|
407
|
+
flexShrink: number;
|
408
|
+
borderRadius: string;
|
409
|
+
cursor: string;
|
410
|
+
bg: string;
|
411
|
+
p: string;
|
412
|
+
width: string;
|
413
|
+
height: string;
|
414
|
+
outline: string;
|
415
|
+
};
|
416
|
+
};
|
417
|
+
export default _default;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -128,7 +128,8 @@ test('tooltip is not shown on hover or focus when prop is not passed', function
|
|
128
128
|
test('the button should be getting aria label attribute', function () {
|
129
129
|
var testLabel = defaultProps['aria-label'];
|
130
130
|
getComponent();
|
131
|
-
|
131
|
+
var button = _testWrapper.screen.getByRole('button');
|
132
|
+
expect(button).toHaveAttribute('aria-label', testLabel);
|
132
133
|
});
|
133
134
|
test('show button isDisabled status', function () {
|
134
135
|
var onPress = jest.fn();
|
@@ -0,0 +1,48 @@
|
|
1
|
+
export declare const iconButtonArgTypes: {
|
2
|
+
icon: {
|
3
|
+
control: {
|
4
|
+
type: string;
|
5
|
+
};
|
6
|
+
description: string;
|
7
|
+
};
|
8
|
+
title: {
|
9
|
+
control: {
|
10
|
+
type: string;
|
11
|
+
};
|
12
|
+
description: string;
|
13
|
+
};
|
14
|
+
'aria-label': {
|
15
|
+
control: {
|
16
|
+
type: string;
|
17
|
+
};
|
18
|
+
description: string;
|
19
|
+
};
|
20
|
+
isDisabled: any;
|
21
|
+
variant: {
|
22
|
+
control: {
|
23
|
+
type: string;
|
24
|
+
options: string[];
|
25
|
+
};
|
26
|
+
description: string;
|
27
|
+
};
|
28
|
+
onPress: any;
|
29
|
+
onPressStart: any;
|
30
|
+
onPressEnd: any;
|
31
|
+
onPressChange: any;
|
32
|
+
onPressUp: any;
|
33
|
+
};
|
34
|
+
export declare const iconButtonArgs: {
|
35
|
+
icon: import("@pingux/mdi-react").MdiReactIconComponentType;
|
36
|
+
variant: string;
|
37
|
+
};
|
38
|
+
export declare const iconButtonPropTypes: {
|
39
|
+
variant: any;
|
40
|
+
'aria-label': any;
|
41
|
+
title: any;
|
42
|
+
onPress: any;
|
43
|
+
onPressStart: any;
|
44
|
+
onPressEnd: any;
|
45
|
+
onPressChange: any;
|
46
|
+
onPressUp: any;
|
47
|
+
isDisabled: any;
|
48
|
+
};
|