@orfium/ictinus 3.7.0 → 3.8.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/components/Button/Button.style.d.ts +2 -1
- package/dist/components/Button/Button.style.js +3 -2
- package/dist/components/ButtonBase/ButtonBase.d.ts +2 -0
- package/dist/components/ButtonBase/ButtonBase.js +3 -0
- package/dist/components/ButtonBase/ButtonBase.style.d.ts +2 -1
- package/dist/components/ButtonBase/ButtonBase.style.js +2 -0
- package/package.json +2 -2
|
@@ -5,11 +5,12 @@ import { Props } from './Button';
|
|
|
5
5
|
export declare const buttonSpanStyle: () => () => {
|
|
6
6
|
display: string;
|
|
7
7
|
alignItems: string;
|
|
8
|
+
justifyContent: string;
|
|
8
9
|
};
|
|
9
10
|
export declare const iconStyle: () => () => {
|
|
10
11
|
display: string;
|
|
11
12
|
};
|
|
12
|
-
export declare const childrenWrapperStyle: ({ iconLeft, iconRight, hasChildren, }: RequiredProperties<Omit<import("../ButtonBase/ButtonBase").Props, "buttonType" | "isIconButton"> & {
|
|
13
|
+
export declare const childrenWrapperStyle: ({ iconLeft, iconRight, hasChildren, }: RequiredProperties<Omit<import("../ButtonBase/ButtonBase").Props, "block" | "buttonType" | "isIconButton"> & {
|
|
13
14
|
hasChildren: boolean;
|
|
14
15
|
}>) => (theme: Theme) => {
|
|
15
16
|
marginLeft: number | "8";
|
|
@@ -13,7 +13,8 @@ var buttonSpanStyle = function buttonSpanStyle() {
|
|
|
13
13
|
return function () {
|
|
14
14
|
return {
|
|
15
15
|
display: 'flex',
|
|
16
|
-
alignItems: 'center'
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
justifyContent: 'center'
|
|
17
18
|
};
|
|
18
19
|
};
|
|
19
20
|
};
|
|
@@ -51,7 +52,7 @@ var centralizedLoader = function centralizedLoader(clientWidth) {
|
|
|
51
52
|
/*#__PURE__*/
|
|
52
53
|
|
|
53
54
|
/*#__PURE__*/
|
|
54
|
-
(0, _react.css)("width:", clientWidth ? (0, _polished.rem)(clientWidth) : 'auto', ";", _functions.flex, ";justify-content:center;" + (process.env.NODE_ENV === "production" ? "" : ";label:centralizedLoader;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
55
|
+
(0, _react.css)("width:", clientWidth ? (0, _polished.rem)(clientWidth) : 'auto', ";", _functions.flex, ";justify-content:center;" + (process.env.NODE_ENV === "production" ? "" : ";label:centralizedLoader;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0J1dHRvbi9CdXR0b24uc3R5bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBb0MrRiIsImZpbGUiOiIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9CdXR0b24vQnV0dG9uLnN0eWxlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzLCBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgcmVtIH0gZnJvbSAncG9saXNoZWQnO1xuaW1wb3J0IHsgVGhlbWUgfSBmcm9tICd0aGVtZSc7XG5pbXBvcnQgeyBmbGV4IH0gZnJvbSAndGhlbWUvZnVuY3Rpb25zJztcbmltcG9ydCB7IFJlcXVpcmVkUHJvcGVydGllcyB9IGZyb20gJ3V0aWxzL2NvbW1vbic7XG5cbmltcG9ydCB7IFByb3BzIH0gZnJvbSAnLi9CdXR0b24nO1xuXG5leHBvcnQgY29uc3QgYnV0dG9uU3BhblN0eWxlID0gKCkgPT4gKCkgPT4ge1xuICByZXR1cm4ge1xuICAgIGRpc3BsYXk6ICdmbGV4JyxcbiAgICBhbGlnbkl0ZW1zOiAnY2VudGVyJyxcbiAgICBqdXN0aWZ5Q29udGVudDogJ2NlbnRlcicsXG4gIH07XG59O1xuXG5leHBvcnQgY29uc3QgaWNvblN0eWxlID0gKCkgPT4gKCkgPT4gKHtcbiAgZGlzcGxheTogJ2lubGluZS1mbGV4Jyxcbn0pO1xuXG5leHBvcnQgY29uc3QgY2hpbGRyZW5XcmFwcGVyU3R5bGUgPSAoe1xuICBpY29uTGVmdCxcbiAgaWNvblJpZ2h0LFxuICBoYXNDaGlsZHJlbixcbn06IFJlcXVpcmVkUHJvcGVydGllczxPbWl0PFByb3BzLCAnYmxvY2snfCAnaXNJY29uQnV0dG9uJyB8ICdidXR0b25UeXBlJz4gJiB7IGhhc0NoaWxkcmVuOiBib29sZWFuIH0+KSA9PiAoXG4gIHRoZW1lOiBUaGVtZVxuKSA9PiB7XG4gIGNvbnN0IHJpZ2h0SWNvbkV4aXN0cyA9IGhhc0NoaWxkcmVuICYmIGljb25SaWdodDtcbiAgY29uc3QgbGVmdEljb25FeGlzdHMgPSBoYXNDaGlsZHJlbiAmJiBpY29uTGVmdDtcblxuICByZXR1cm4ge1xuICAgIG1hcmdpbkxlZnQ6IGxlZnRJY29uRXhpc3RzID8gdGhlbWUuc3BhY2luZy5zbSA6IDAsXG4gICAgbWFyZ2luUmlnaHQ6IHJpZ2h0SWNvbkV4aXN0cyA/IHRoZW1lLnNwYWNpbmcuc20gOiAwLFxuICB9O1xufTtcblxuZXhwb3J0IGNvbnN0IGNlbnRyYWxpemVkTG9hZGVyOiAoY2xpZW50V2lkdGg/OiBudW1iZXIpID0+IFNlcmlhbGl6ZWRTdHlsZXMgPSBjbGllbnRXaWR0aCA9PiBjc3NgXG4gIHdpZHRoOiAke2NsaWVudFdpZHRoID8gcmVtKGNsaWVudFdpZHRoKSA6ICdhdXRvJ307XG4gICR7ZmxleH07XG4gIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuYDtcbiJdfQ== */", process.env.NODE_ENV === "production" ? "" : ";label:centralizedLoader;")
|
|
55
56
|
);
|
|
56
57
|
};
|
|
57
58
|
|
|
@@ -14,6 +14,8 @@ export declare type Props = {
|
|
|
14
14
|
color?: string;
|
|
15
15
|
/** This property define the size of the button. Defaults to 'md' */
|
|
16
16
|
size?: 'lg' | 'md' | 'sm';
|
|
17
|
+
/** This property will make the button fit to its parent width. Defaults to false */
|
|
18
|
+
block?: boolean;
|
|
17
19
|
/** Property indicating if the component is filled with a color based on the type */
|
|
18
20
|
filled?: boolean;
|
|
19
21
|
/** Property indicating if the component is async and loading */
|
|
@@ -23,6 +23,8 @@ var ButtonBase = /*#__PURE__*/_react["default"].forwardRef(function (props, ref)
|
|
|
23
23
|
type = _props$type === void 0 ? 'primary' : _props$type,
|
|
24
24
|
_props$color = props.color,
|
|
25
25
|
color = _props$color === void 0 ? '' : _props$color,
|
|
26
|
+
_props$block = props.block,
|
|
27
|
+
block = _props$block === void 0 ? false : _props$block,
|
|
26
28
|
_props$filled = props.filled,
|
|
27
29
|
filled = _props$filled === void 0 ? true : _props$filled,
|
|
28
30
|
_props$transparent = props.transparent,
|
|
@@ -58,6 +60,7 @@ var ButtonBase = /*#__PURE__*/_react["default"].forwardRef(function (props, ref)
|
|
|
58
60
|
loading: loading,
|
|
59
61
|
filled: filled,
|
|
60
62
|
size: size,
|
|
63
|
+
block: block,
|
|
61
64
|
color: color,
|
|
62
65
|
transparent: transparent,
|
|
63
66
|
calculatedColor: calculatedColor,
|
|
@@ -5,12 +5,13 @@ import { Props } from './ButtonBase';
|
|
|
5
5
|
/** Calculates the button specific height based on the size passed to it
|
|
6
6
|
* These sizes are specific to this button thus these are placed here and not in the config **/
|
|
7
7
|
export declare const heightBasedOnSize: (size: 'lg' | 'md' | 'sm') => string;
|
|
8
|
-
export declare const buttonBaseStyle: ({ type, filled, calculatedColor, size, iconLeft, iconRight, isIconButton, disabled, transparent, childrenCount, }: RequiredProperties<Omit<Props, "buttonType"> & {
|
|
8
|
+
export declare const buttonBaseStyle: ({ type, filled, calculatedColor, size, block, iconLeft, iconRight, isIconButton, disabled, transparent, childrenCount, }: RequiredProperties<Omit<Props, "buttonType"> & {
|
|
9
9
|
calculatedColor: ColorShapeFromComponent;
|
|
10
10
|
childrenCount: number;
|
|
11
11
|
}>) => (theme: Theme) => {
|
|
12
12
|
fontSize: string;
|
|
13
13
|
fontWeight: number;
|
|
14
|
+
width: string | undefined;
|
|
14
15
|
color: string;
|
|
15
16
|
backgroundColor: string;
|
|
16
17
|
padding: string;
|
|
@@ -46,6 +46,7 @@ var buttonBaseStyle = function buttonBaseStyle(_ref) {
|
|
|
46
46
|
filled = _ref.filled,
|
|
47
47
|
calculatedColor = _ref.calculatedColor,
|
|
48
48
|
size = _ref.size,
|
|
49
|
+
block = _ref.block,
|
|
49
50
|
iconLeft = _ref.iconLeft,
|
|
50
51
|
iconRight = _ref.iconRight,
|
|
51
52
|
isIconButton = _ref.isIconButton,
|
|
@@ -57,6 +58,7 @@ var buttonBaseStyle = function buttonBaseStyle(_ref) {
|
|
|
57
58
|
var baseButtonStyles = {
|
|
58
59
|
fontSize: fontSizeBasedOnSize(theme, size),
|
|
59
60
|
fontWeight: theme.typography.weights.medium,
|
|
61
|
+
width: block ? '100%' : undefined,
|
|
60
62
|
color: filled && !transparent ? (0, _palette.pickTextColorFromSwatches)(calculatedColor.color, calculatedColor.shade) : (0, _utils.defineBackgroundColor)(theme, calculatedColor, type, hasSupplementaryIcons, childrenCount > 0),
|
|
61
63
|
backgroundColor: filled && !transparent ? (0, _utils.defineBackgroundColor)(theme, calculatedColor, type, hasSupplementaryIcons, childrenCount > 0) : 'transparent',
|
|
62
64
|
padding: size === 'sm' || size === 'md' ? theme.spacing.sm + " " + theme.spacing.md : theme.spacing.md + " " + theme.spacing.lg,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orfium/ictinus",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"react-router-dom": "^5.2.0"
|
|
111
111
|
},
|
|
112
112
|
"scripts": {
|
|
113
|
-
"prepare": "yarn build",
|
|
113
|
+
"prepare": "yarn build && husky install",
|
|
114
114
|
"start": "start-storybook -p 6006",
|
|
115
115
|
"prebuild": "rimraf dist",
|
|
116
116
|
"build:partial:style": "cross-env NODE_ENV=production BABEL_ENV=production babel src --config-file ./babelrc.build.json --extensions '.ts' --out-dir ./dist --plugins=babel-plugin-inline-import-data-uri",
|