@akinon/ui-button 1.4.8 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +3 -3
- package/dist/esm/index.js +3 -3
- package/package.json +5 -5
package/dist/cjs/index.js
CHANGED
|
@@ -49,7 +49,7 @@ const Button = (_a) => {
|
|
|
49
49
|
const aiSecondaryColor = (_d = (_c = customTheme.colors) === null || _c === void 0 ? void 0 : _c.red) === null || _d === void 0 ? void 0 : _d['410'];
|
|
50
50
|
const aiGradient = `linear-gradient(to right, ${aiPrimaryColor},${aiSecondaryColor},${aiPrimaryColor})`;
|
|
51
51
|
const aiBackgroundSize = '175%';
|
|
52
|
-
const aiBlackBg = (_k = (_g = (_f = (_e = customTheme.colors) === null || _e === void 0 ? void 0 : _e.gray) === null || _f === void 0 ? void 0 : _f['750']) !== null && _g !== void 0 ? _g : (_j = (_h = customTheme.colors) === null || _h === void 0 ? void 0 : _h.ebonyClay) === null || _j === void 0 ? void 0 : _j['600']) !== null && _k !== void 0 ? _k : '
|
|
52
|
+
const aiBlackBg = (_k = (_g = (_f = (_e = customTheme.colors) === null || _e === void 0 ? void 0 : _e.gray) === null || _f === void 0 ? void 0 : _f['750']) !== null && _g !== void 0 ? _g : (_j = (_h = customTheme.colors) === null || _h === void 0 ? void 0 : _h.ebonyClay) === null || _j === void 0 ? void 0 : _j['600']) !== null && _k !== void 0 ? _k : 'var(--color-gray-750)';
|
|
53
53
|
const aiBlackHoverBg = (_o = (_m = (_l = customTheme.colors) === null || _l === void 0 ? void 0 : _l.neutral) === null || _m === void 0 ? void 0 : _m['950']) !== null && _o !== void 0 ? _o : (_q = (_p = customTheme.colors) === null || _p === void 0 ? void 0 : _p.gray) === null || _q === void 0 ? void 0 : _q['900'];
|
|
54
54
|
// MARK: - Disabled
|
|
55
55
|
const disabledStyles = {
|
|
@@ -103,7 +103,7 @@ const Button = (_a) => {
|
|
|
103
103
|
backgroundImage: aiGradient,
|
|
104
104
|
backgroundSize: aiBackgroundSize,
|
|
105
105
|
backgroundPosition: '0',
|
|
106
|
-
textShadow: '0 1px 0
|
|
106
|
+
textShadow: '0 1px 0 var(--color-neutral-1000-20)',
|
|
107
107
|
fontWeight: (_v = customTokens.typography.fontWeightBold) !== null && _v !== void 0 ? _v : 600,
|
|
108
108
|
color: (_w = buttonToken.colorTextLightSolid) !== null && _w !== void 0 ? _w : token.colorTextLightSolid,
|
|
109
109
|
transition: 'all 0.3s ease',
|
|
@@ -183,7 +183,7 @@ const Button = (_a) => {
|
|
|
183
183
|
// END: Icon
|
|
184
184
|
};
|
|
185
185
|
});
|
|
186
|
-
const renderButton = () => (react_1.default.createElement(antd_1.Button, Object.assign({}, buttonProps, { icon: buttonProps.icon ? (react_1.default.createElement(icons_1.Icon, { icon: buttonProps.icon, size: iconSize !== null && iconSize !== void 0 ? iconSize : 12, style: {
|
|
186
|
+
const renderButton = () => (react_1.default.createElement(antd_1.Button, Object.assign({}, buttonProps, { icon: buttonProps.icon ? (react_1.default.createElement(icons_1.Icon, { icon: buttonProps.icon, size: iconSize !== null && iconSize !== void 0 ? iconSize : 12, style: { display: 'block' } })) : undefined }), buttonProps.children));
|
|
187
187
|
// If tooltip prop is provided, wrap the button with Tooltip
|
|
188
188
|
if (buttonProps.tooltip) {
|
|
189
189
|
const tooltipProps = typeof buttonProps.tooltip === 'string'
|
package/dist/esm/index.js
CHANGED
|
@@ -46,7 +46,7 @@ export const Button = (_a) => {
|
|
|
46
46
|
const aiSecondaryColor = (_d = (_c = customTheme.colors) === null || _c === void 0 ? void 0 : _c.red) === null || _d === void 0 ? void 0 : _d['410'];
|
|
47
47
|
const aiGradient = `linear-gradient(to right, ${aiPrimaryColor},${aiSecondaryColor},${aiPrimaryColor})`;
|
|
48
48
|
const aiBackgroundSize = '175%';
|
|
49
|
-
const aiBlackBg = (_k = (_g = (_f = (_e = customTheme.colors) === null || _e === void 0 ? void 0 : _e.gray) === null || _f === void 0 ? void 0 : _f['750']) !== null && _g !== void 0 ? _g : (_j = (_h = customTheme.colors) === null || _h === void 0 ? void 0 : _h.ebonyClay) === null || _j === void 0 ? void 0 : _j['600']) !== null && _k !== void 0 ? _k : '
|
|
49
|
+
const aiBlackBg = (_k = (_g = (_f = (_e = customTheme.colors) === null || _e === void 0 ? void 0 : _e.gray) === null || _f === void 0 ? void 0 : _f['750']) !== null && _g !== void 0 ? _g : (_j = (_h = customTheme.colors) === null || _h === void 0 ? void 0 : _h.ebonyClay) === null || _j === void 0 ? void 0 : _j['600']) !== null && _k !== void 0 ? _k : 'var(--color-gray-750)';
|
|
50
50
|
const aiBlackHoverBg = (_o = (_m = (_l = customTheme.colors) === null || _l === void 0 ? void 0 : _l.neutral) === null || _m === void 0 ? void 0 : _m['950']) !== null && _o !== void 0 ? _o : (_q = (_p = customTheme.colors) === null || _p === void 0 ? void 0 : _p.gray) === null || _q === void 0 ? void 0 : _q['900'];
|
|
51
51
|
// MARK: - Disabled
|
|
52
52
|
const disabledStyles = {
|
|
@@ -100,7 +100,7 @@ export const Button = (_a) => {
|
|
|
100
100
|
backgroundImage: aiGradient,
|
|
101
101
|
backgroundSize: aiBackgroundSize,
|
|
102
102
|
backgroundPosition: '0',
|
|
103
|
-
textShadow: '0 1px 0
|
|
103
|
+
textShadow: '0 1px 0 var(--color-neutral-1000-20)',
|
|
104
104
|
fontWeight: (_v = customTokens.typography.fontWeightBold) !== null && _v !== void 0 ? _v : 600,
|
|
105
105
|
color: (_w = buttonToken.colorTextLightSolid) !== null && _w !== void 0 ? _w : token.colorTextLightSolid,
|
|
106
106
|
transition: 'all 0.3s ease',
|
|
@@ -180,7 +180,7 @@ export const Button = (_a) => {
|
|
|
180
180
|
// END: Icon
|
|
181
181
|
};
|
|
182
182
|
});
|
|
183
|
-
const renderButton = () => (React.createElement(AntButton, Object.assign({}, buttonProps, { icon: buttonProps.icon ? (React.createElement(Icon, { icon: buttonProps.icon, size: iconSize !== null && iconSize !== void 0 ? iconSize : 12, style: {
|
|
183
|
+
const renderButton = () => (React.createElement(AntButton, Object.assign({}, buttonProps, { icon: buttonProps.icon ? (React.createElement(Icon, { icon: buttonProps.icon, size: iconSize !== null && iconSize !== void 0 ? iconSize : 12, style: { display: 'block' } })) : undefined }), buttonProps.children));
|
|
184
184
|
// If tooltip prop is provided, wrap the button with Tooltip
|
|
185
185
|
if (buttonProps.tooltip) {
|
|
186
186
|
const tooltipProps = typeof buttonProps.tooltip === 'string'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/ui-button",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A basic button react component.",
|
|
6
6
|
"type": "module",
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@ant-design/cssinjs": "^1.24.0",
|
|
14
14
|
"antd": "^5.27.0",
|
|
15
|
-
"@akinon/icons": "1.2.
|
|
16
|
-
"@akinon/ui-theme": "1.
|
|
17
|
-
"@akinon/ui-tooltip": "1.4.
|
|
15
|
+
"@akinon/icons": "1.2.8",
|
|
16
|
+
"@akinon/ui-theme": "1.3.0",
|
|
17
|
+
"@akinon/ui-tooltip": "1.4.9"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"clean-package": "2.2.0",
|
|
21
21
|
"copyfiles": "^2.4.1",
|
|
22
22
|
"rimraf": "^5.0.5",
|
|
23
23
|
"typescript": "*",
|
|
24
|
-
"@akinon/typescript-config": "1.1.
|
|
24
|
+
"@akinon/typescript-config": "1.1.8"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "^18 || ^19",
|