superdesk-ui-framework 4.0.23 → 4.0.24
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/.github/workflows/test.yml +3 -3
- package/app/styles/_helpers.scss +5 -1
- package/app-typescript/components/Button.tsx +3 -0
- package/dist/examples.bundle.js +3 -1
- package/dist/superdesk-ui.bundle.css +3 -0
- package/dist/superdesk-ui.bundle.js +2 -0
- package/package.json +1 -1
- package/react/components/Button.d.ts +1 -0
- package/react/components/Button.js +2 -0
@@ -16,10 +16,10 @@ jobs:
|
|
16
16
|
- uses: actions/setup-node@v1
|
17
17
|
with:
|
18
18
|
node-version: '12.x'
|
19
|
-
|
20
|
-
- uses: actions/cache@
|
19
|
+
|
20
|
+
- uses: actions/cache@v3
|
21
21
|
with:
|
22
|
-
path: ~/.npm
|
22
|
+
path: ~/.npm
|
23
23
|
key: ${{ runner.OS }}-node-${{ hashFiles('package-lock.json') }}
|
24
24
|
restore-keys: |
|
25
25
|
${{ runner.OS }}-node-
|
package/app/styles/_helpers.scss
CHANGED
@@ -318,6 +318,10 @@ h6 {
|
|
318
318
|
justify-content: flex-end !important;
|
319
319
|
}
|
320
320
|
|
321
|
+
.sd-flex-justify-start {
|
322
|
+
justify-content: flex-start !important;
|
323
|
+
}
|
324
|
+
|
321
325
|
.sd-flex-justify-center {
|
322
326
|
justify-content: center !important;
|
323
327
|
}
|
@@ -1965,4 +1969,4 @@ h6 {
|
|
1965
1969
|
}
|
1966
1970
|
.object-top {
|
1967
1971
|
object-position: top;
|
1968
|
-
}
|
1972
|
+
}
|
@@ -17,6 +17,7 @@ interface IPropsButton {
|
|
17
17
|
theme?: 'light' | 'dark'; // defaults to 'light'
|
18
18
|
type?: 'default' | 'primary' | 'success' | 'warning' | 'alert' | 'highlight' | 'sd-green';
|
19
19
|
size?: 'small' | 'normal' | 'large'; // defaults to 'normal'
|
20
|
+
textAlign?: 'start' | 'center' | 'end'; // defaults to 'center'
|
20
21
|
children?: never;
|
21
22
|
icon?: string;
|
22
23
|
disabled?: boolean;
|
@@ -35,6 +36,8 @@ export class Button extends React.PureComponent<IPropsButton> {
|
|
35
36
|
'btn--icon-only': this.props.iconOnly,
|
36
37
|
'btn--ui-dark': this.props.theme === 'dark',
|
37
38
|
'btn--icon-only-circle': this.props.shape === 'round' && this.props.iconOnly,
|
39
|
+
'sd-flex-justify-start': this.props.textAlign === 'start',
|
40
|
+
'sd-flex-justify-end': this.props.textAlign === 'end',
|
38
41
|
});
|
39
42
|
|
40
43
|
return (
|
package/dist/examples.bundle.js
CHANGED
@@ -27760,6 +27760,8 @@ var Button = /** @class */ (function (_super) {
|
|
27760
27760
|
_a['btn--icon-only'] = this.props.iconOnly,
|
27761
27761
|
_a['btn--ui-dark'] = this.props.theme === 'dark',
|
27762
27762
|
_a['btn--icon-only-circle'] = this.props.shape === 'round' && this.props.iconOnly,
|
27763
|
+
_a['sd-flex-justify-start'] = this.props.textAlign === 'start',
|
27764
|
+
_a['sd-flex-justify-end'] = this.props.textAlign === 'end',
|
27763
27765
|
_a));
|
27764
27766
|
return (React.createElement("button", { id: this.props.id, className: classes, tabIndex: 0, disabled: this.props.disabled || this.props.isLoading, "data-loading": this.props.isLoading, onClick: this.props.disabled ? function () { return false; } : function (event) { return _this.props.onClick(event); }, "aria-label": this.props.iconOnly ? this.props.text : '', "data-test-id": this.props['data-test-id'], title: this.props.tooltip },
|
27765
27767
|
this.props.isLoading ? React.createElement(Spinner_1.Spinner, { size: "mini" }) : null,
|
@@ -187902,7 +187904,7 @@ exports.ThreePaneLayoutPattern = ThreePaneLayoutPattern;
|
|
187902
187904
|
/* 937 */
|
187903
187905
|
/***/ (function(module, exports) {
|
187904
187906
|
|
187905
|
-
module.exports = {"name":"superdesk-ui-framework","version":"4.0.
|
187907
|
+
module.exports = {"name":"superdesk-ui-framework","version":"4.0.24","license":"AGPL-3.0","repository":{"type":"git","url":"https://github.com/superdesk/superdesk-ui-framework.git"},"main":"dist/superdesk-ui.bundle.js","types":"react/index.d.ts","contributors":["Nemanja Pavlovic","Vladimir Stefanovic","Darko Tomic","Aleksandar Jelicic","Tomas Kikutis","Dragana Zivkovic"],"scripts":{"start":"webpack-dev-server --config tasks/webpack.dev.js","server":"webpack --watch --config tasks/webpack.prod.js && tsc-watch","build":"webpack --config tasks/webpack.prod.js && tsc","build-ui":"webpack && tsc && npm run lint","playground-lint":"tsc -p examples/pages/playgrounds/react-playgrounds --noEmit","lint":"eslint --parser=@typescript-eslint/parser app && tslint -c tslint.json 'app-typescript/**/*.{ts,tsx}' && npm run playground-lint","lint-fix":"tsc -p tsconfig.json --noEmit && tslint --fix -c tslint.json 'app-typescript/**/*.{ts,tsx}'","prepublishOnly":"npm run build","unit-test":"mocha","debug-unit-tests":"mocha --inspect-brk"},"devDependencies":{"@types/assert":"^1.5.6","@types/chart.js":"^2.9.24","@types/classnames":"^2.2.9","@types/enzyme":"^3.10.12","@types/enzyme-adapter-react-16":"^1.0.6","@types/lodash":"^4.14.161","@types/mocha":"^9.1.1","@types/react":"16.8.23","@types/react-beautiful-dnd":"^13.1.2","@types/react-dom":"16.8.0","@types/react-router-dom":"^5.1.2","@types/react-scrollspy":"^3.3.5","@typescript-eslint/parser":"^5.58.0","angular":"^1.7.9","angular-animate":"^1.7.9","angular-route":"^1.7.9","babel-core":"^6.26.0","babel-loader":"^7.1.2","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-es2015":"^6.24.1","babel-preset-react":"^6.24.1","classnames":"^2.2.5","clean-webpack-plugin":"^1.0.0","code-prettify":"^0.1.0","copy-webpack-plugin":"^4.6.0","css-loader":"^2.1.1","enzyme":"^3.11.0","enzyme-adapter-react-16":"^1.15.7","eslint":"^4.6.1","eslint-loader":"^1.9.0","eslint-plugin-angular":"^3.1.1","eslint-plugin-react":"^7.3.0","extract-text-webpack-plugin":"^3.0.2","file-loader":"^0.11.2","html-loader":"^0.5.1","html-webpack-plugin":"^2.30.1","jquery":"^3.1.1","jquery-ui":"^1.12.1","jsdom":"20.0.3","jsdom-global":"3.0.2","lodash":"4.17.21","mocha":"^8.4.0","moment":"^2.29.3","node-sass":"6.0","prismjs":"^1.28.0","prop-types":"^15.6.0","react":"16.8.6","react-dom":"16.8.6","react-redux":"^5.0.6","react-router-dom":"^5.1.2","redux":"^3.7.2","redux-form":"^7.0.4","sass-loader":"^6.0.6","style-loader":"^0.18.2","superdesk-code-style":"^1.1.2","ts-loader":"^6.0.2","ts-node":"^10.9.1","tslint":"^5.18.0","typescript":"4.9.5","url-loader":"^1.1.2","webpack":"^3.5.5","webpack-cli":"3.3.10","webpack-dev-server":"2.11.1","webpack-merge":"^4.2.1"},"dependencies":{"@popperjs/core":"^2.4.0","@superdesk/common":"0.0.28","@superdesk/primereact":"^5.0.2-12","@superdesk/react-resizable-panels":"0.0.39","chart.js":"^2.9.3","date-fns":"2.7.0","popper-max-size-modifier":"^0.2.0","popper.js":"1.14.4","primeicons":"2.0.0","react-beautiful-dnd":"^13.0.0","react-id-generator":"^3.0.0","react-scrollspy":"^3.4.3","tippy.js":"^6.3.7"},"peerDependencies":{"moment":"*"},"volta":{"node":"14.21.3"}}
|
187906
187908
|
|
187907
187909
|
/***/ }),
|
187908
187910
|
/* 938 */
|
@@ -6432,6 +6432,9 @@ h6 {
|
|
6432
6432
|
.sd-flex-justify-end {
|
6433
6433
|
justify-content: flex-end !important; }
|
6434
6434
|
|
6435
|
+
.sd-flex-justify-start {
|
6436
|
+
justify-content: flex-start !important; }
|
6437
|
+
|
6435
6438
|
.sd-flex-justify-center {
|
6436
6439
|
justify-content: center !important; }
|
6437
6440
|
|
@@ -27264,6 +27264,8 @@ var Button = /** @class */ (function (_super) {
|
|
27264
27264
|
_a['btn--icon-only'] = this.props.iconOnly,
|
27265
27265
|
_a['btn--ui-dark'] = this.props.theme === 'dark',
|
27266
27266
|
_a['btn--icon-only-circle'] = this.props.shape === 'round' && this.props.iconOnly,
|
27267
|
+
_a['sd-flex-justify-start'] = this.props.textAlign === 'start',
|
27268
|
+
_a['sd-flex-justify-end'] = this.props.textAlign === 'end',
|
27267
27269
|
_a));
|
27268
27270
|
return (React.createElement("button", { id: this.props.id, className: classes, tabIndex: 0, disabled: this.props.disabled || this.props.isLoading, "data-loading": this.props.isLoading, onClick: this.props.disabled ? function () { return false; } : function (event) { return _this.props.onClick(event); }, "aria-label": this.props.iconOnly ? this.props.text : '', "data-test-id": this.props['data-test-id'], title: this.props.tooltip },
|
27269
27271
|
this.props.isLoading ? React.createElement(Spinner_1.Spinner, { size: "mini" }) : null,
|
package/package.json
CHANGED
@@ -12,6 +12,7 @@ interface IPropsButton {
|
|
12
12
|
theme?: 'light' | 'dark';
|
13
13
|
type?: 'default' | 'primary' | 'success' | 'warning' | 'alert' | 'highlight' | 'sd-green';
|
14
14
|
size?: 'small' | 'normal' | 'large';
|
15
|
+
textAlign?: 'start' | 'center' | 'end';
|
15
16
|
children?: never;
|
16
17
|
icon?: string;
|
17
18
|
disabled?: boolean;
|
@@ -64,6 +64,8 @@ var Button = /** @class */ (function (_super) {
|
|
64
64
|
_a['btn--icon-only'] = this.props.iconOnly,
|
65
65
|
_a['btn--ui-dark'] = this.props.theme === 'dark',
|
66
66
|
_a['btn--icon-only-circle'] = this.props.shape === 'round' && this.props.iconOnly,
|
67
|
+
_a['sd-flex-justify-start'] = this.props.textAlign === 'start',
|
68
|
+
_a['sd-flex-justify-end'] = this.props.textAlign === 'end',
|
67
69
|
_a));
|
68
70
|
return (React.createElement("button", { id: this.props.id, className: classes, tabIndex: 0, disabled: this.props.disabled || this.props.isLoading, "data-loading": this.props.isLoading, onClick: this.props.disabled ? function () { return false; } : function (event) { return _this.props.onClick(event); }, "aria-label": this.props.iconOnly ? this.props.text : '', "data-test-id": this.props['data-test-id'], title: this.props.tooltip },
|
69
71
|
this.props.isLoading ? React.createElement(Spinner_1.Spinner, { size: "mini" }) : null,
|