@steroidsjs/bootstrap 3.0.0-beta.62 → 3.0.0-beta.63

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/index.d.ts CHANGED
@@ -173,6 +173,9 @@ declare const _default: {
173
173
  'list.GridView': {
174
174
  lazy: () => any;
175
175
  };
176
+ 'list.FlexGridView': {
177
+ lazy: () => any;
178
+ };
176
179
  'list.ContentColumnView': {
177
180
  lazy: () => any;
178
181
  };
package/index.js CHANGED
@@ -176,6 +176,9 @@ exports["default"] = {
176
176
  'list.GridView': {
177
177
  lazy: function () { return require('./list/Grid/GridView')["default"]; }
178
178
  },
179
+ 'list.FlexGridView': {
180
+ lazy: function () { return require('./list/FlexGrid/FlexGridView')["default"]; }
181
+ },
179
182
  'list.ContentColumnView': {
180
183
  lazy: function () { return require('./list/Grid/views/ContentColumnView/ContentColumnView')["default"]; }
181
184
  },
package/index.scss CHANGED
@@ -61,6 +61,7 @@
61
61
  @import './list/CheckboxColumn/CheckboxColumnView';
62
62
  @import './list/Empty/EmptyView';
63
63
  @import './list/Grid/GridView';
64
+ @import './list/FlexGrid/FlexGridView';
64
65
  @import './list/List/ListView';
65
66
  @import './list/Pagination/PaginationButtonView';
66
67
  @import './list/Pagination/PaginationMoreView';
@@ -0,0 +1,2 @@
1
+ import { IFlexGridViewProps } from '@steroidsjs/core/ui/list/FlexGrid/FlexGrid';
2
+ export default function FlexGridView(props: IFlexGridViewProps): JSX.Element;
@@ -0,0 +1,71 @@
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
+ exports.__esModule = true;
37
+ var React = __importStar(require("react"));
38
+ var hooks_1 = require("@steroidsjs/core/hooks");
39
+ function FlexGridView(props) {
40
+ var _a;
41
+ var bem = (0, hooks_1.useBem)('FlexGridView');
42
+ var halfColGap = props.colGap / 2;
43
+ var hasItems = !!((_a = props.items) === null || _a === void 0 ? void 0 : _a.length);
44
+ var colGapStyle = hasItems
45
+ ? {
46
+ marginRight: -halfColGap,
47
+ marginLeft: -halfColGap
48
+ }
49
+ : {
50
+ columnGap: props.colGap
51
+ };
52
+ return (React.createElement("div", { className: bem(bem.block({
53
+ wrap: props.wrap,
54
+ align: props.align,
55
+ direction: props.direction,
56
+ justify: props.justify
57
+ }), props.className), style: __assign(__assign(__assign({}, props.style), colGapStyle), { rowGap: props.rowGap }) },
58
+ hasItems && props.items.map(function (item, index) { return (React.createElement("div", { key: index, className: bem(bem.element('item', {
59
+ col: item.col,
60
+ lg: item.lg,
61
+ md: item.md,
62
+ sm: item.sm,
63
+ offset: item.offset
64
+ }), props.itemClassName), style: {
65
+ paddingRight: halfColGap,
66
+ paddingLeft: halfColGap,
67
+ order: item.order
68
+ } }, item.content)); }),
69
+ props.children));
70
+ }
71
+ exports["default"] = FlexGridView;
@@ -0,0 +1,57 @@
1
+ $justifyValues: center, end, start, stretch, flex-start, flex-end, left, right, space-between, space-around, space-evenly;
2
+ $alignValues: center, end, start, stretch, flex-start, flex-end;
3
+ $directionValues: column-reverse column row-reverse row;
4
+ $colValues: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12;
5
+ $colMaxValue: 12;
6
+
7
+ @mixin col($className, $root, $property: flex-basis) {
8
+ @each $colValue in $colValues {
9
+ &_#{$className}_#{$colValue} {
10
+ #{$property}: calc((100% / $colMaxValue) * $colValue);
11
+ }
12
+ }
13
+ }
14
+
15
+ .FlexGridView {
16
+ $root: &;
17
+
18
+ display: flex;
19
+ flex-wrap: nowrap;
20
+
21
+ &_wrap {
22
+ flex-wrap: wrap;
23
+ }
24
+
25
+ @each $alignValue in $alignValues {
26
+ &_align_#{$alignValue} {
27
+ align-items: $alignValue;
28
+ }
29
+ }
30
+
31
+ @each $justifyValue in $justifyValues {
32
+ &_justify_#{$justifyValue} {
33
+ justify-content: $justifyValue;
34
+ }
35
+ }
36
+
37
+ @each $directionValue in $directionValues {
38
+ &_direction_#{$directionValue} {
39
+ flex-direction: $directionValue;
40
+ }
41
+ }
42
+
43
+ &__item {
44
+ @include col(col, $root);
45
+ @include col(offset, $root, margin-inline-start);
46
+
47
+ @media (max-width: $desktop-width) {
48
+ @include col(lg, $root);
49
+ }
50
+ @media (max-width: $tablet-width) {
51
+ @include col(md, $root);
52
+ }
53
+ @media (max-width: $mobile-width) {
54
+ @include col(sm, $root);
55
+ }
56
+ }
57
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steroidsjs/bootstrap",
3
- "version": "3.0.0-beta.62",
3
+ "version": "3.0.0-beta.63",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "Vladimir Kozhin <hello@kozhindev.com>",
@@ -35,7 +35,7 @@
35
35
  "react-use": "^17.4.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@steroidsjs/core": "^3.0 || >=3.0.0-beta.42",
38
+ "@steroidsjs/core": "^3.0 || >=3.0.0-beta.44",
39
39
  "@steroidsjs/eslint-config": "^2.1.4",
40
40
  "@types/enzyme": "^3.10.8",
41
41
  "@types/googlemaps": "^3.43.3",
@@ -53,6 +53,6 @@
53
53
  "typescript": "^4.9.5"
54
54
  },
55
55
  "peerDependencies": {
56
- "@steroidsjs/core": "^3.0 || >=3.0.0-beta.42"
56
+ "@steroidsjs/core": "^3.0 || >=3.0.0-beta.44"
57
57
  }
58
58
  }
@@ -1,2 +1,3 @@
1
1
  $mobile-width: 540px !default;
2
2
  $tablet-width: 960px !default;
3
+ $desktop-width: 1920px !default;