@smart-react-components/ui 2.0.0-alpha-62 → 2.0.0-alpha-64
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/Button/ButtonGroup.js
CHANGED
|
@@ -8,6 +8,6 @@ const ButtonGroupElement_1 = __importDefault(require("../components/Button/Butto
|
|
|
8
8
|
const ButtonList_1 = __importDefault(require("./ButtonList"));
|
|
9
9
|
const ButtonGroup = props => (react_1.default.createElement(ButtonList_1.default, Object.assign({}, props, { hasSpace: false, template: react_1.default.createElement(ButtonGroupElement_1.default, { shape: props.shape }) }), props.children));
|
|
10
10
|
ButtonGroup.defaultProps = {
|
|
11
|
-
shape: '
|
|
11
|
+
shape: 'rectangle',
|
|
12
12
|
};
|
|
13
13
|
exports.default = ButtonGroup;
|
package/Button/ButtonList.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { JSXElementProps } from '@smart-react-components/core/types';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { ButtonListGenericProps } from '../types/button';
|
|
4
3
|
export interface Props extends ButtonListGenericProps {
|
|
5
|
-
elementProps?: JSXElementProps;
|
|
6
4
|
hasSpace?: boolean;
|
|
7
5
|
template?: JSX.Element;
|
|
8
6
|
}
|
|
@@ -49,47 +49,11 @@ exports.default = (0, styled_components_1.default)(Button_1.default).attrs(({ ha
|
|
|
49
49
|
align-items: stretch;
|
|
50
50
|
background: transparent;
|
|
51
51
|
border: 0;
|
|
52
|
+
border-radius: ${(isFixedSize && shape === 'rounded') ? '100%' : theme.$.radius.button[shape]};
|
|
52
53
|
font-family: ${theme.$.fontFamily.button};
|
|
53
54
|
position: relative;
|
|
54
55
|
transition: box-shadow 300ms 0s ease-in-out;
|
|
55
56
|
|
|
56
|
-
&,
|
|
57
|
-
${ButtonContent_1.default} {
|
|
58
|
-
border-radius: ${(isFixedSize && shape === 'rounded') ? '100%' : theme.$.radius.button[shape]};
|
|
59
|
-
|
|
60
|
-
${hasSeparatedLeftAddon
|
|
61
|
-
? `
|
|
62
|
-
border-top-left-radius: 0;
|
|
63
|
-
border-bottom-left-radius: 0;
|
|
64
|
-
`
|
|
65
|
-
: ''}
|
|
66
|
-
|
|
67
|
-
${hasSeparatedRightAddon
|
|
68
|
-
? `
|
|
69
|
-
border-top-right-radius: 0;
|
|
70
|
-
border-bottom-right-radius: 0;
|
|
71
|
-
`
|
|
72
|
-
: ''}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
${ButtonContent_1.default} {
|
|
76
|
-
${hasLeftAddon
|
|
77
|
-
? `
|
|
78
|
-
border-left: 0;
|
|
79
|
-
border-top-left-radius: 0;
|
|
80
|
-
border-bottom-left-radius: 0;
|
|
81
|
-
`
|
|
82
|
-
: ''}
|
|
83
|
-
|
|
84
|
-
${hasRightAddon
|
|
85
|
-
? `
|
|
86
|
-
border-right: 0;
|
|
87
|
-
border-top-right-radius: 0;
|
|
88
|
-
border-bottom-right-radius: 0;
|
|
89
|
-
`
|
|
90
|
-
: ''}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
57
|
&:active {
|
|
94
58
|
outline: 0;
|
|
95
59
|
}
|
|
@@ -281,4 +245,52 @@ exports.default = (0, styled_components_1.default)(Button_1.default).attrs(({ ha
|
|
|
281
245
|
}
|
|
282
246
|
`
|
|
283
247
|
: ''}
|
|
248
|
+
|
|
249
|
+
${hasSeparatedLeftAddon
|
|
250
|
+
? `
|
|
251
|
+
border-top-left-radius: 0;
|
|
252
|
+
border-bottom-left-radius: 0;
|
|
253
|
+
`
|
|
254
|
+
: ''}
|
|
255
|
+
|
|
256
|
+
${hasSeparatedRightAddon
|
|
257
|
+
? `
|
|
258
|
+
border-top-right-radius: 0;
|
|
259
|
+
border-bottom-right-radius: 0;
|
|
260
|
+
`
|
|
261
|
+
: ''}
|
|
262
|
+
|
|
263
|
+
${ButtonContent_1.default} {
|
|
264
|
+
border-radius: ${(isFixedSize && shape === 'rounded') ? '100%' : theme.$.radius.button[shape]};
|
|
265
|
+
|
|
266
|
+
${hasLeftAddon
|
|
267
|
+
? `
|
|
268
|
+
border-left: 0;
|
|
269
|
+
border-top-left-radius: 0;
|
|
270
|
+
border-bottom-left-radius: 0;
|
|
271
|
+
`
|
|
272
|
+
: ''}
|
|
273
|
+
|
|
274
|
+
${hasRightAddon
|
|
275
|
+
? `
|
|
276
|
+
border-right: 0;
|
|
277
|
+
border-top-right-radius: 0;
|
|
278
|
+
border-bottom-right-radius: 0;
|
|
279
|
+
`
|
|
280
|
+
: ''}
|
|
281
|
+
|
|
282
|
+
${hasSeparatedLeftAddon
|
|
283
|
+
? `
|
|
284
|
+
border-top-left-radius: 0;
|
|
285
|
+
border-bottom-left-radius: 0;
|
|
286
|
+
`
|
|
287
|
+
: ''}
|
|
288
|
+
|
|
289
|
+
${hasSeparatedRightAddon
|
|
290
|
+
? `
|
|
291
|
+
border-top-right-radius: 0;
|
|
292
|
+
border-bottom-right-radius: 0;
|
|
293
|
+
`
|
|
294
|
+
: ''}
|
|
295
|
+
}
|
|
284
296
|
`);
|
package/package.json
CHANGED
package/types/button.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export interface ButtonGenericProps<T extends ContentElement> extends IntrinsicS
|
|
|
23
23
|
}
|
|
24
24
|
export interface ButtonListGenericProps extends IntrinsicStyledCoreProps, Partial<ResponsiveProp<'size', SizeProp>> {
|
|
25
25
|
children: JSX.Element[];
|
|
26
|
+
elementProps?: JSXElementProps;
|
|
26
27
|
hasHover?: boolean;
|
|
27
28
|
hasWaveEffect?: boolean;
|
|
28
29
|
isBlock?: boolean;
|