@steroidsjs/bootstrap 3.0.0-beta.106 → 3.0.0-beta.107

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.
@@ -0,0 +1,2 @@
1
+ import { IKanbanViewProps } from '@steroidsjs/core/ui/content/Kanban/Kanban';
2
+ export default function KanbanView(props: IKanbanViewProps): JSX.Element;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ exports.__esModule = true;
17
+ var react_1 = __importDefault(require("react"));
18
+ var hooks_1 = require("@steroidsjs/core/hooks");
19
+ function KanbanView(props) {
20
+ var bem = (0, hooks_1.useBem)('KanbanView');
21
+ var Droppable = props.droppableComponent;
22
+ return (react_1["default"].createElement(Droppable, { droppableId: "all-columns", direction: "horizontal", type: "column" }, function (provided) {
23
+ var _a;
24
+ return (react_1["default"].createElement("div", __assign({ className: bem.block(), id: "task-board", ref: provided.innerRef }, provided.droppableProps, { style: props.style }), (_a = props.columns) === null || _a === void 0 ? void 0 :
25
+ _a.map(function (column, index) { return props.renderColumn(column, index); }),
26
+ provided.placeholder));
27
+ }));
28
+ }
29
+ exports["default"] = KanbanView;
@@ -0,0 +1,11 @@
1
+ .KanbanView {
2
+ display: flex;
3
+ justify-content: flex-start;
4
+ align-items: flex-start;
5
+ position: relative;
6
+ width: 100%;
7
+ height: 100%;
8
+ margin-top: 10px;
9
+ white-space: nowrap;
10
+ padding: 10px 20px;
11
+ }
@@ -0,0 +1,2 @@
1
+ import { IKanbanColumnViewProps } from '@steroidsjs/core/ui/content/Kanban/Kanban';
2
+ export default function KanbanColumnView(props: IKanbanColumnViewProps): JSX.Element;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ exports.__esModule = true;
17
+ var react_1 = __importDefault(require("react"));
18
+ var hooks_1 = require("@steroidsjs/core/hooks");
19
+ var typography_1 = require("@steroidsjs/core/ui/typography");
20
+ var form_1 = require("@steroidsjs/core/ui/form");
21
+ function KanbanColumnView(props) {
22
+ var bem = (0, hooks_1.useBem)('KanbanColumnView');
23
+ var Draggable = props.draggableComponent;
24
+ var Droppable = props.droppableComponent;
25
+ var _a = props.column, id = _a.id, title = _a.title, tasks = _a.tasks;
26
+ return (react_1["default"].createElement(Draggable, { draggableId: id, index: props.columnIndex }, function (providedDraggable) { return (react_1["default"].createElement("div", __assign({ className: bem.block() }, providedDraggable.draggableProps, { ref: providedDraggable.innerRef }),
27
+ react_1["default"].createElement("div", __assign({ className: bem.element('header') }, providedDraggable.dragHandleProps),
28
+ react_1["default"].createElement(typography_1.Title, { className: bem.element('title'), content: title, type: 'h3' },
29
+ react_1["default"].createElement("span", { className: bem.element('tasks-count') }, tasks.length))),
30
+ react_1["default"].createElement(Droppable, { droppableId: id, type: "task" }, function (providedDroppable) { return (react_1["default"].createElement("div", __assign({ className: bem.element('content'), ref: providedDroppable.innerRef }, providedDroppable.droppableProps),
31
+ tasks.map(function (task, taskIndex) { return (props.renderTask(task, taskIndex)); }),
32
+ providedDroppable.placeholder)); }),
33
+ react_1["default"].createElement("div", { className: bem.element('button') },
34
+ react_1["default"].createElement(form_1.Button, { size: "sm", color: 'basic', icon: "add", block: true })))); }));
35
+ }
36
+ exports["default"] = KanbanColumnView;
@@ -0,0 +1,59 @@
1
+ @use "../../../../scss/variables";
2
+ @use "../../../../scss/mixins";
3
+
4
+ $sidebar-scroll-thumb-color: var(--sidebar-scroll-thumb-color);
5
+ $sidebar-scroll-track-color: var(--sidebar-scroll-track-color);
6
+
7
+ .KanbanColumnView {
8
+ white-space: normal;
9
+ min-width: 375px;
10
+ width: 375px;
11
+ margin-right: 8px;
12
+ padding: 16px 8px 16px 16px;
13
+ border: 1px solid variables.$element-border-color;
14
+ border-radius: 20px;
15
+ color: variables.$text-color;
16
+ background-color: variables.$element-background-color;
17
+
18
+ &__header {
19
+ display: flex;
20
+ font-size: 18px;
21
+ }
22
+
23
+ &__title {
24
+ margin-bottom: 16px;
25
+ }
26
+
27
+ &__tasks-count {
28
+ overflow-y: auto;
29
+ overflow-x: hidden;
30
+ margin-left: 8px;
31
+ color: variables.$element-placeholder-color;
32
+ }
33
+
34
+ &__content {
35
+ display: flex;
36
+ flex-direction: column;
37
+ min-height: 10px;
38
+ overflow: scroll;
39
+ overflow-x: hidden;
40
+
41
+ @include mixins.scrollWrapper(#{900px}, 8px, $sidebar-scroll-thumb-color, $sidebar-scroll-track-color);
42
+
43
+ &::-webkit-scrollbar {
44
+ width: 4px;
45
+ }
46
+
47
+ &::-webkit-scrollbar-track {
48
+ margin-bottom: 8px;
49
+ }
50
+ }
51
+
52
+ &__button {
53
+ padding-right: 8px;
54
+
55
+ .ButtonView {
56
+ background-color: variables.$light-gray;
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,2 @@
1
+ import KanbanColumnView from './KanbanColumnView';
2
+ export default KanbanColumnView;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ exports.__esModule = true;
6
+ var KanbanColumnView_1 = __importDefault(require("./KanbanColumnView"));
7
+ exports["default"] = KanbanColumnView_1["default"];
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { IKanbanTaskViewProps } from '@steroidsjs/core/ui/content/Kanban/Kanban';
3
+ declare function KanbanTaskView(props: IKanbanTaskViewProps): JSX.Element;
4
+ declare const _default: React.MemoExoticComponent<typeof KanbanTaskView>;
5
+ export default _default;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ var __importDefault = (this && this.__importDefault) || function (mod) {
37
+ return (mod && mod.__esModule) ? mod : { "default": mod };
38
+ };
39
+ exports.__esModule = true;
40
+ var react_1 = __importStar(require("react"));
41
+ var hooks_1 = require("@steroidsjs/core/hooks");
42
+ var Avatar_1 = __importDefault(require("@steroidsjs/core/ui/content/Avatar/Avatar"));
43
+ var typography_1 = require("@steroidsjs/core/ui/typography");
44
+ var TaskTags_1 = __importDefault(require("../TaskTags"));
45
+ function KanbanTaskView(props) {
46
+ var bem = (0, hooks_1.useBem)('KanbanTaskView');
47
+ var _a = props.task, id = _a.id, title = _a.title, description = _a.description, tags = _a.tags, assigner = _a.assigner, status = _a.status;
48
+ var Draggable = props.draggableComponent;
49
+ return (react_1["default"].createElement(Draggable, { draggableId: id, index: props.index }, function (provided) { return (react_1["default"].createElement("div", __assign({ className: bem.block() }, provided.draggableProps, provided.dragHandleProps, { ref: provided.innerRef }),
50
+ react_1["default"].createElement("div", { className: bem.element('wrapper') },
51
+ react_1["default"].createElement("div", { className: bem.element('content') },
52
+ react_1["default"].createElement("div", { className: bem.element('header') },
53
+ react_1["default"].createElement("h4", { className: bem.element('title'), "aria-hidden": "true" },
54
+ react_1["default"].createElement("span", { className: bem.element('task-id') }, __("#".concat(id, " "))),
55
+ title)),
56
+ description && (react_1["default"].createElement(typography_1.Text, { type: 'body2', content: description, className: bem.element('description') }))),
57
+ react_1["default"].createElement("div", { className: bem.element('footer') },
58
+ tags && (react_1["default"].createElement(TaskTags_1["default"], { tags: tags })),
59
+ assigner && (react_1["default"].createElement("div", { className: bem.element('assigner') },
60
+ react_1["default"].createElement(Avatar_1["default"], __assign({}, assigner.avatar, { size: 'sm' })))))),
61
+ status && (react_1["default"].createElement("span", { className: bem.element('status', !!status && "".concat(status.type)) })))); }));
62
+ }
63
+ exports["default"] = (0, react_1.memo)(KanbanTaskView);
@@ -0,0 +1,100 @@
1
+ @use "../../../../scss/variables";
2
+
3
+ .KanbanTaskView {
4
+ $root: &;
5
+
6
+ position: relative;
7
+ display: flex;
8
+ flex-flow: column;
9
+ flex: 1 0 auto;
10
+ overflow: hidden;
11
+ height: fit-content;
12
+ width: 100%;
13
+ margin-bottom: 8px;
14
+ border-radius: variables.$radius-small;
15
+
16
+ &__wrapper {
17
+ border: 1px solid variables.$element-border-color;
18
+ border-radius: variables.$radius-small;
19
+ color: variables.$text-color;
20
+ background-color: variables.$element-background-color;
21
+
22
+ position: relative;
23
+ display: flex;
24
+ flex-flow: column;
25
+ padding: 16px;
26
+ }
27
+
28
+ $card-statuses: (
29
+ "high": variables.$danger,
30
+ "middle": variables.$warning,
31
+ );
32
+
33
+ @each $status, $color in $card-statuses {
34
+ &__status_#{$status} {
35
+ background-color: $color;
36
+ }
37
+ }
38
+
39
+ &__status {
40
+ position: absolute;
41
+ top: 0;
42
+ left: 0;
43
+ bottom: 0;
44
+ width: 4px;
45
+ }
46
+
47
+ &__content {
48
+ display: flex;
49
+ flex-flow: column nowrap;
50
+ row-gap: 8px;
51
+ font-size: 14px;
52
+ }
53
+
54
+ &__header {
55
+ display: flex;
56
+ flex-flow: row nowrap;
57
+ }
58
+
59
+ &__title {
60
+ display: -webkit-box;
61
+ -webkit-line-clamp: 3;
62
+ -webkit-box-orient: vertical;
63
+ overflow: hidden;
64
+
65
+ &:hover {
66
+ cursor: pointer;
67
+ text-decoration: underline;
68
+ }
69
+ }
70
+
71
+ &__description {
72
+ display: -webkit-box;
73
+ -webkit-line-clamp: 3;
74
+ -webkit-box-orient: vertical;
75
+ overflow: hidden;
76
+ }
77
+
78
+ &__task-id {
79
+ color: variables.$element-placeholder-color;
80
+ }
81
+
82
+ &__footer {
83
+ display: flex;
84
+ justify-content: space-between;
85
+ flex-wrap: nowrap;
86
+ margin-top: 16px;
87
+ }
88
+
89
+ &__assigner {
90
+ display: flex;
91
+ justify-content: flex-end;
92
+ flex-grow: 1;
93
+ min-width: 32px;
94
+ min-height: 32px;
95
+ }
96
+
97
+ .TextView {
98
+ margin: 0;
99
+ }
100
+ }
@@ -0,0 +1,2 @@
1
+ import KanbanTaskView from './KanbanTaskView';
2
+ export default KanbanTaskView;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ exports.__esModule = true;
6
+ var KanbanTaskView_1 = __importDefault(require("./KanbanTaskView"));
7
+ exports["default"] = KanbanTaskView_1["default"];
@@ -0,0 +1,7 @@
1
+ import { ITaskTag } from '@steroidsjs/core/ui/content/Kanban/Kanban';
2
+ import './TaskTags.scss';
3
+ interface ITaskTagsProps {
4
+ tags: ITaskTag[];
5
+ }
6
+ export default function TaskTags(props: ITaskTagsProps): JSX.Element;
7
+ export {};
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ exports.__esModule = true;
6
+ var react_1 = __importDefault(require("react"));
7
+ var content_1 = require("@steroidsjs/core/ui/content");
8
+ var hooks_1 = require("@steroidsjs/core/hooks");
9
+ require("./TaskTags.scss");
10
+ function TaskTags(props) {
11
+ var bem = (0, hooks_1.useBem)('TaskTags');
12
+ return (react_1["default"].createElement("div", { className: bem.element('wrapper') }, props.tags.map(function (tag) { return (react_1["default"].createElement(content_1.Badge, { key: tag.id, size: "md", roundingStyle: "squarer", message: tag.message, type: tag.type })); })));
13
+ }
14
+ exports["default"] = TaskTags;
@@ -0,0 +1,9 @@
1
+ .TaskTags {
2
+ &__wrapper {
3
+ display: flex;
4
+ flex-flow: row wrap;
5
+ align-items: flex-start;
6
+ flex-grow: 0;
7
+ gap: 4px;
8
+ }
9
+ }
@@ -0,0 +1,2 @@
1
+ import TaskTags from './TaskTags';
2
+ export default TaskTags;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ exports.__esModule = true;
6
+ var TaskTags_1 = __importDefault(require("./TaskTags"));
7
+ exports["default"] = TaskTags_1["default"];
package/index.d.ts CHANGED
@@ -41,6 +41,15 @@ declare const _default: {
41
41
  'content.SliderView': {
42
42
  lazy: () => any;
43
43
  };
44
+ 'content.KanbanView': {
45
+ lazy: () => any;
46
+ };
47
+ 'content.KanbanColumnView': {
48
+ lazy: () => any;
49
+ };
50
+ 'content.KanbanTaskView': {
51
+ lazy: () => any;
52
+ };
44
53
  'content.CalendarSystemView': {
45
54
  lazy: () => any;
46
55
  };
package/index.js CHANGED
@@ -44,6 +44,15 @@ exports["default"] = {
44
44
  'content.SliderView': {
45
45
  lazy: function () { return require('./content/Slider/SliderView')["default"]; }
46
46
  },
47
+ 'content.KanbanView': {
48
+ lazy: function () { return require('./content/Kanban/KanbanView')["default"]; }
49
+ },
50
+ 'content.KanbanColumnView': {
51
+ lazy: function () { return require('./content/Kanban/views/KanbanColumn/KanbanColumnView')["default"]; }
52
+ },
53
+ 'content.KanbanTaskView': {
54
+ lazy: function () { return require('./content/Kanban/views/KanbanTask/KanbanTaskView')["default"]; }
55
+ },
47
56
  'content.CalendarSystemView': {
48
57
  lazy: function () { return require('./content/CalendarSystem/CalendarSystemView')["default"]; }
49
58
  },
package/index.scss CHANGED
@@ -24,6 +24,9 @@
24
24
  @include meta.load-css('content/Icon/IconView');
25
25
  @include meta.load-css('content/Slider/SliderView');
26
26
  @include meta.load-css('content/CopyToClipboard/CopyToClipboardView');
27
+ @include meta.load-css('content/Kanban/KanbanView');
28
+ @include meta.load-css('content/Kanban/views/KanbanColumn/KanbanColumnView');
29
+ @include meta.load-css('content/Kanban/views/KanbanTask/KanbanTaskView');
27
30
  @include meta.load-css('crud/Crud/CrudView');
28
31
  @include meta.load-css('form/AutoCompleteField/AutoCompleteFieldView');
29
32
  @include meta.load-css('form/Button/ButtonView');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steroidsjs/bootstrap",
3
- "version": "3.0.0-beta.106",
3
+ "version": "3.0.0-beta.107",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "Vladimir Kozhin <hello@kozhindev.com>",
@@ -37,7 +37,7 @@
37
37
  "react-use": "^17.4.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@steroidsjs/core": "^3.0 || >=3.0.0-beta.90",
40
+ "@steroidsjs/core": "^3.0 || >=3.0.0-beta.91",
41
41
  "@steroidsjs/eslint-config": "^2.1.4",
42
42
  "@types/enzyme": "^3.10.8",
43
43
  "@types/googlemaps": "^3.43.3",
@@ -83,6 +83,12 @@ $text-types: map.merge(
83
83
  "line-height": $line-height-base,
84
84
  "color": colors.$text-color,
85
85
  ),
86
+ "body2": (
87
+ "font-size": $font-size-sm,
88
+ "font-weight": $font-weight-sm,
89
+ "line-height": $line-height-sm,
90
+ "color": colors.$text-color,
91
+ ),
86
92
  "span": (
87
93
  "font-size": $font-size-base,
88
94
  "font-weight": $font-weight-sm,