superdesk-ui-framework 3.1.3 → 3.1.5

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.
Files changed (32) hide show
  1. package/app/fonts/sd_big-icons.eot +0 -0
  2. package/app/fonts/sd_big-icons.svg +11 -0
  3. package/app/fonts/sd_big-icons.ttf +0 -0
  4. package/app/fonts/sd_big-icons.woff +0 -0
  5. package/app/styles/_sd-tag-input.scss +1 -1
  6. package/app-typescript/components/TreeSelect/TreeSelect.tsx +118 -38
  7. package/app-typescript/components/TreeSelect/TreeSelectPill.tsx +20 -9
  8. package/app-typescript/components/avatar/avatar-group.tsx +1 -1
  9. package/app-typescript/index.ts +1 -1
  10. package/dist/examples.bundle.js +99931 -63624
  11. package/dist/playgrounds/react-playgrounds/Multiedit.tsx +1 -1
  12. package/dist/react/TreeSelect.tsx +61 -3
  13. package/dist/sd_big-icons.eot +0 -0
  14. package/dist/sd_big-icons.svg +11 -0
  15. package/dist/sd_big-icons.ttf +0 -0
  16. package/dist/sd_big-icons.woff +0 -0
  17. package/dist/superdesk-ui.bundle.css +1 -1
  18. package/dist/superdesk-ui.bundle.js +100086 -63789
  19. package/dist/vendor.bundle.js +55 -55
  20. package/examples/pages/playgrounds/react-playgrounds/Multiedit.tsx +1 -1
  21. package/examples/pages/react/TreeSelect.tsx +61 -3
  22. package/package.json +2 -1
  23. package/react/components/TreeSelect/TreeSelect.d.ts +5 -0
  24. package/react/components/TreeSelect/TreeSelect.js +80 -17
  25. package/react/components/TreeSelect/TreeSelectPill.d.ts +1 -0
  26. package/react/components/TreeSelect/TreeSelectPill.js +13 -4
  27. package/react/components/avatar/avatar-group.js +2 -2
  28. package/react/index.d.ts +1 -1
  29. package/react/index.js +3 -3
  30. package/app-typescript/components/Spacer.tsx +0 -79
  31. package/react/components/Spacer.d.ts +0 -30
  32. package/react/components/Spacer.js +0 -86
@@ -1,79 +0,0 @@
1
- import * as React from 'react';
2
-
3
- export interface IPropsSpacer {
4
- h?: boolean; // horizontal
5
- v?: boolean; // vertical
6
- gap: '0' | '4' | '8' | '16' | '32' | '64';
7
- justifyContent?: 'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly' | 'stretch';
8
- alignItems?: 'start' | 'end' | 'center' | 'stretch';
9
- noGrow?: boolean;
10
-
11
- /**
12
- * Will not wrap children in div elements.
13
- * `noGrow` prop would then not be relevant.
14
- */
15
- noWrap?: boolean;
16
-
17
- style?: React.CSSProperties;
18
-
19
- children: Array<React.ReactNode>;
20
- }
21
-
22
- export class Spacer extends React.PureComponent<IPropsSpacer> {
23
- render() {
24
- const {h, v, gap, justifyContent, alignItems, noGrow, noWrap} = this.props;
25
-
26
- const justifyContentDefault: IPropsSpacer['justifyContent'] = h ? 'space-between' : 'start';
27
- const alignItemsDefault: IPropsSpacer['alignItems'] = h ? 'center' : 'start';
28
-
29
- return (
30
- <div
31
- style={{
32
- display: 'flex',
33
- flexDirection: v ? 'column' : 'row',
34
- gap: `${gap}px`,
35
- justifyContent: justifyContent ?? justifyContentDefault,
36
- alignItems: alignItems ?? alignItemsDefault,
37
- width: noGrow === true ? undefined : '100%',
38
- ...(this.props.style ?? {}),
39
- }}
40
- >
41
- {this.props.children.map((el, i) => noWrap ? el : (
42
- <div
43
- key={i}
44
- style={{
45
- width: noGrow === true ? undefined : '100%',
46
- }}
47
- >
48
- {el}
49
- </div>
50
- ))}
51
- </div>
52
- );
53
- }
54
- }
55
-
56
- /**
57
- * Renders a standalone spacing block - similar to <br />
58
- */
59
- export interface ISpacerBlock {
60
- h?: boolean; // horizontal
61
- v?: boolean; // vertical
62
- gap: '4' | '8' | '16' | '32' | '64';
63
- }
64
-
65
- export class SpacerBlock extends React.PureComponent<ISpacerBlock> {
66
- render() {
67
- const {gap, h, v} = this.props;
68
-
69
- return (
70
- <span
71
- style={{
72
- display: h === true ? 'inline-block' : 'block',
73
- width: h === true ? `${gap}px` : undefined,
74
- height: v === true ? `${gap}px` : undefined,
75
- }}
76
- />
77
- );
78
- }
79
- }
@@ -1,30 +0,0 @@
1
- import * as React from 'react';
2
- export interface IPropsSpacer {
3
- h?: boolean;
4
- v?: boolean;
5
- gap: '0' | '4' | '8' | '16' | '32' | '64';
6
- justifyContent?: 'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly' | 'stretch';
7
- alignItems?: 'start' | 'end' | 'center' | 'stretch';
8
- noGrow?: boolean;
9
- /**
10
- * Will not wrap children in div elements.
11
- * `noGrow` prop would then not be relevant.
12
- */
13
- noWrap?: boolean;
14
- style?: React.CSSProperties;
15
- children: Array<React.ReactNode>;
16
- }
17
- export declare class Spacer extends React.PureComponent<IPropsSpacer> {
18
- render(): JSX.Element;
19
- }
20
- /**
21
- * Renders a standalone spacing block - similar to <br />
22
- */
23
- export interface ISpacerBlock {
24
- h?: boolean;
25
- v?: boolean;
26
- gap: '4' | '8' | '16' | '32' | '64';
27
- }
28
- export declare class SpacerBlock extends React.PureComponent<ISpacerBlock> {
29
- render(): JSX.Element;
30
- }
@@ -1,86 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __assign = (this && this.__assign) || function () {
18
- __assign = Object.assign || function(t) {
19
- for (var s, i = 1, n = arguments.length; i < n; i++) {
20
- s = arguments[i];
21
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
- t[p] = s[p];
23
- }
24
- return t;
25
- };
26
- return __assign.apply(this, arguments);
27
- };
28
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
29
- if (k2 === undefined) k2 = k;
30
- var desc = Object.getOwnPropertyDescriptor(m, k);
31
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
32
- desc = { enumerable: true, get: function() { return m[k]; } };
33
- }
34
- Object.defineProperty(o, k2, desc);
35
- }) : (function(o, m, k, k2) {
36
- if (k2 === undefined) k2 = k;
37
- o[k2] = m[k];
38
- }));
39
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
40
- Object.defineProperty(o, "default", { enumerable: true, value: v });
41
- }) : function(o, v) {
42
- o["default"] = v;
43
- });
44
- var __importStar = (this && this.__importStar) || function (mod) {
45
- if (mod && mod.__esModule) return mod;
46
- var result = {};
47
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
48
- __setModuleDefault(result, mod);
49
- return result;
50
- };
51
- Object.defineProperty(exports, "__esModule", { value: true });
52
- exports.SpacerBlock = exports.Spacer = void 0;
53
- var React = __importStar(require("react"));
54
- var Spacer = /** @class */ (function (_super) {
55
- __extends(Spacer, _super);
56
- function Spacer() {
57
- return _super !== null && _super.apply(this, arguments) || this;
58
- }
59
- Spacer.prototype.render = function () {
60
- var _a;
61
- var _b = this.props, h = _b.h, v = _b.v, gap = _b.gap, justifyContent = _b.justifyContent, alignItems = _b.alignItems, noGrow = _b.noGrow, noWrap = _b.noWrap;
62
- var justifyContentDefault = h ? 'space-between' : 'start';
63
- var alignItemsDefault = h ? 'center' : 'start';
64
- return (React.createElement("div", { style: __assign({ display: 'flex', flexDirection: v ? 'column' : 'row', gap: "".concat(gap, "px"), justifyContent: justifyContent !== null && justifyContent !== void 0 ? justifyContent : justifyContentDefault, alignItems: alignItems !== null && alignItems !== void 0 ? alignItems : alignItemsDefault, width: noGrow === true ? undefined : '100%' }, ((_a = this.props.style) !== null && _a !== void 0 ? _a : {})) }, this.props.children.map(function (el, i) { return noWrap ? el : (React.createElement("div", { key: i, style: {
65
- width: noGrow === true ? undefined : '100%',
66
- } }, el)); })));
67
- };
68
- return Spacer;
69
- }(React.PureComponent));
70
- exports.Spacer = Spacer;
71
- var SpacerBlock = /** @class */ (function (_super) {
72
- __extends(SpacerBlock, _super);
73
- function SpacerBlock() {
74
- return _super !== null && _super.apply(this, arguments) || this;
75
- }
76
- SpacerBlock.prototype.render = function () {
77
- var _a = this.props, gap = _a.gap, h = _a.h, v = _a.v;
78
- return (React.createElement("span", { style: {
79
- display: h === true ? 'inline-block' : 'block',
80
- width: h === true ? "".concat(gap, "px") : undefined,
81
- height: v === true ? "".concat(gap, "px") : undefined,
82
- } }));
83
- };
84
- return SpacerBlock;
85
- }(React.PureComponent));
86
- exports.SpacerBlock = SpacerBlock;