@commercetools-uikit/flat-button 15.15.0 → 15.15.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/dist/commercetools-uikit-flat-button.cjs.d.ts +1 -0
- package/dist/commercetools-uikit-flat-button.cjs.d.ts.map +1 -0
- package/dist/commercetools-uikit-flat-button.cjs.dev.js +8 -8
- package/dist/commercetools-uikit-flat-button.cjs.prod.js +8 -8
- package/dist/commercetools-uikit-flat-button.esm.js +8 -8
- package/package.json +6 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commercetools-uikit-flat-button.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}
|
|
@@ -36,7 +36,7 @@ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInsta
|
|
|
36
36
|
var omit__default = /*#__PURE__*/_interopDefault(omit);
|
|
37
37
|
var AccessibleButton__default = /*#__PURE__*/_interopDefault(AccessibleButton);
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
const getTextColor = props => {
|
|
40
40
|
if (props.isIcon && props.isDisabled) {
|
|
41
41
|
return designSystem.designTokens.fontColorForFlatButtonIconWhenDisabled;
|
|
42
42
|
}
|
|
@@ -68,8 +68,8 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["def
|
|
|
68
68
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
69
69
|
|
|
70
70
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
const propsToOmit = ['type'];
|
|
72
|
+
const defaultProps = {
|
|
73
73
|
tone: 'primary',
|
|
74
74
|
type: 'button',
|
|
75
75
|
iconPosition: 'left',
|
|
@@ -86,9 +86,9 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
86
86
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
const ButtonIcon = props => {
|
|
90
90
|
if (!props.icon) return null;
|
|
91
|
-
|
|
91
|
+
const Icon = /*#__PURE__*/react$1.cloneElement(props.icon, {
|
|
92
92
|
size: 'medium'
|
|
93
93
|
});
|
|
94
94
|
|
|
@@ -114,10 +114,10 @@ ButtonIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
114
114
|
} : {};
|
|
115
115
|
ButtonIcon.displayName = 'ButtonIcon';
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
const FlatButton = props => {
|
|
118
118
|
var _context;
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
const buttonAttributes = _objectSpread(_objectSpread({
|
|
121
121
|
'data-track-component': 'FlatButton'
|
|
122
122
|
}, utils.filterInvalidAttributes(omit__default["default"](props, propsToOmit))), {}, {
|
|
123
123
|
// if there is a divergence between `isDisabled` and `disabled`,
|
|
@@ -170,7 +170,7 @@ FlatButton.defaultProps = defaultProps;
|
|
|
170
170
|
var FlatButton$1 = FlatButton;
|
|
171
171
|
|
|
172
172
|
// NOTE: This string will be replaced on build time with the package version.
|
|
173
|
-
var version = "15.15.
|
|
173
|
+
var version = "15.15.1";
|
|
174
174
|
|
|
175
175
|
exports["default"] = FlatButton$1;
|
|
176
176
|
exports.version = version;
|
|
@@ -35,7 +35,7 @@ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInsta
|
|
|
35
35
|
var omit__default = /*#__PURE__*/_interopDefault(omit);
|
|
36
36
|
var AccessibleButton__default = /*#__PURE__*/_interopDefault(AccessibleButton);
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
const getTextColor = props => {
|
|
39
39
|
if (props.isIcon && props.isDisabled) {
|
|
40
40
|
return designSystem.designTokens.fontColorForFlatButtonIconWhenDisabled;
|
|
41
41
|
}
|
|
@@ -65,8 +65,8 @@ var getTextColor = function getTextColor(props) {
|
|
|
65
65
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
66
66
|
|
|
67
67
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
const propsToOmit = ['type'];
|
|
69
|
+
const defaultProps = {
|
|
70
70
|
tone: 'primary',
|
|
71
71
|
type: 'button',
|
|
72
72
|
iconPosition: 'left',
|
|
@@ -78,9 +78,9 @@ var _ref = {
|
|
|
78
78
|
styles: "vertical-align:middle"
|
|
79
79
|
} ;
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
const ButtonIcon = props => {
|
|
82
82
|
if (!props.icon) return null;
|
|
83
|
-
|
|
83
|
+
const Icon = /*#__PURE__*/react$1.cloneElement(props.icon, {
|
|
84
84
|
size: 'medium'
|
|
85
85
|
});
|
|
86
86
|
|
|
@@ -97,10 +97,10 @@ var ButtonIcon = function ButtonIcon(props) {
|
|
|
97
97
|
ButtonIcon.propTypes = {};
|
|
98
98
|
ButtonIcon.displayName = 'ButtonIcon';
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
const FlatButton = props => {
|
|
101
101
|
var _context;
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
const buttonAttributes = _objectSpread(_objectSpread({
|
|
104
104
|
'data-track-component': 'FlatButton'
|
|
105
105
|
}, utils.filterInvalidAttributes(omit__default["default"](props, propsToOmit))), {}, {
|
|
106
106
|
// if there is a divergence between `isDisabled` and `disabled`,
|
|
@@ -144,7 +144,7 @@ FlatButton.defaultProps = defaultProps;
|
|
|
144
144
|
var FlatButton$1 = FlatButton;
|
|
145
145
|
|
|
146
146
|
// NOTE: This string will be replaced on build time with the package version.
|
|
147
|
-
var version = "15.15.
|
|
147
|
+
var version = "15.15.1";
|
|
148
148
|
|
|
149
149
|
exports["default"] = FlatButton$1;
|
|
150
150
|
exports.version = version;
|
|
@@ -17,7 +17,7 @@ import { filterInvalidAttributes } from '@commercetools-uikit/utils';
|
|
|
17
17
|
import AccessibleButton from '@commercetools-uikit/accessible-button';
|
|
18
18
|
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
const getTextColor = props => {
|
|
21
21
|
if (props.isIcon && props.isDisabled) {
|
|
22
22
|
return designTokens.fontColorForFlatButtonIconWhenDisabled;
|
|
23
23
|
}
|
|
@@ -49,8 +49,8 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
|
|
|
49
49
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
50
50
|
|
|
51
51
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
const propsToOmit = ['type'];
|
|
53
|
+
const defaultProps = {
|
|
54
54
|
tone: 'primary',
|
|
55
55
|
type: 'button',
|
|
56
56
|
iconPosition: 'left',
|
|
@@ -67,9 +67,9 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
67
67
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
const ButtonIcon = props => {
|
|
71
71
|
if (!props.icon) return null;
|
|
72
|
-
|
|
72
|
+
const Icon = /*#__PURE__*/cloneElement(props.icon, {
|
|
73
73
|
size: 'medium'
|
|
74
74
|
});
|
|
75
75
|
|
|
@@ -95,10 +95,10 @@ ButtonIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
95
95
|
} : {};
|
|
96
96
|
ButtonIcon.displayName = 'ButtonIcon';
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
const FlatButton = props => {
|
|
99
99
|
var _context;
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
const buttonAttributes = _objectSpread(_objectSpread({
|
|
102
102
|
'data-track-component': 'FlatButton'
|
|
103
103
|
}, filterInvalidAttributes(omit(props, propsToOmit))), {}, {
|
|
104
104
|
// if there is a divergence between `isDisabled` and `disabled`,
|
|
@@ -151,6 +151,6 @@ FlatButton.defaultProps = defaultProps;
|
|
|
151
151
|
var FlatButton$1 = FlatButton;
|
|
152
152
|
|
|
153
153
|
// NOTE: This string will be replaced on build time with the package version.
|
|
154
|
-
var version = "15.15.
|
|
154
|
+
var version = "15.15.1";
|
|
155
155
|
|
|
156
156
|
export { FlatButton$1 as default, version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/flat-button",
|
|
3
3
|
"description": "Flat buttons are minimal and a flat variation of primary and secondary buttons.",
|
|
4
|
-
"version": "15.15.
|
|
4
|
+
"version": "15.15.1",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/accessible-button": "15.15.
|
|
25
|
-
"@commercetools-uikit/design-system": "15.15.
|
|
26
|
-
"@commercetools-uikit/spacings-inline": "15.15.
|
|
27
|
-
"@commercetools-uikit/text": "15.15.
|
|
28
|
-
"@commercetools-uikit/utils": "15.15.
|
|
24
|
+
"@commercetools-uikit/accessible-button": "15.15.1",
|
|
25
|
+
"@commercetools-uikit/design-system": "15.15.1",
|
|
26
|
+
"@commercetools-uikit/spacings-inline": "15.15.1",
|
|
27
|
+
"@commercetools-uikit/text": "15.15.1",
|
|
28
|
+
"@commercetools-uikit/utils": "15.15.1",
|
|
29
29
|
"@emotion/react": "^11.10.5",
|
|
30
30
|
"@emotion/styled": "^11.10.5",
|
|
31
31
|
"lodash": "4.17.21",
|