@steroidsjs/bootstrap 3.0.0-beta.16 → 3.0.0-beta.18

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.
@@ -4,14 +4,14 @@
4
4
  --accordion-background-dark: #312c3a;
5
5
  --accordion-rect-background: #ffffff;
6
6
  --accordion-chevron-color: #323232;
7
+ }
7
8
 
8
- html[data-theme="dark"] {
9
- --accordion-background-light: #414141;
10
- --accordion-background-intermediate: #5b5c6b;
11
- --accordion-background-dark: #4e4f57;
12
- --accordion-rect-background: #6f6b76;
13
- --accordion-chevron-color: #ffffff;
14
- }
9
+ html[data-theme="dark"] {
10
+ --accordion-background-light: #414141;
11
+ --accordion-background-intermediate: #5b5c6b;
12
+ --accordion-background-dark: #4e4f57;
13
+ --accordion-rect-background: #6f6b76;
14
+ --accordion-chevron-color: #ffffff;
15
15
  }
16
16
 
17
17
  $accordionBackgroundMap: (
@@ -4,12 +4,12 @@
4
4
  --dropdown-background: #fff;
5
5
  --dropdown-triangle-border: #eef1f2;
6
6
  --dropdown-triangle-svg: url("data:image/svg+xml,%3Csvg width='21' height='11' viewBox='0 0 21 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19.0416 0.5L10.1719 10.2567L1.30215 0.499998L19.0416 0.5Z' fill='white' stroke='%23EEF1F2'/%3E%3C/svg%3E%0A");
7
+ }
7
8
 
8
- html[data-theme="dark"] {
9
- --dropdown-background: #4e4f57;
10
- --dropdown-triangle-border: transparent;
11
- --dropdown-triangle-svg: url("data:image/svg+xml,%3Csvg width='21' height='11' viewBox='0 0 21 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.1719 11L0.171876 -1.74846e-06L20.1719 0L10.1719 11Z' fill='%234E4F57'/%3E%3C/svg%3E%0A");
12
- }
9
+ html[data-theme="dark"] {
10
+ --dropdown-background: #4e4f57;
11
+ --dropdown-triangle-border: transparent;
12
+ --dropdown-triangle-svg: url("data:image/svg+xml,%3Csvg width='21' height='11' viewBox='0 0 21 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.1719 11L0.171876 -1.74846e-06L20.1719 0L10.1719 11Z' fill='%234E4F57'/%3E%3C/svg%3E%0A");
13
13
  }
14
14
 
15
15
  $dropdown-background: var(--dropdown-background);
package/index.d.ts CHANGED
@@ -218,5 +218,11 @@ declare const _default: {
218
218
  'nav.TreeView': {
219
219
  lazy: () => any;
220
220
  };
221
+ 'typography.TextView': {
222
+ lazy: () => any;
223
+ };
224
+ 'typography.TitleView': {
225
+ lazy: () => any;
226
+ };
221
227
  };
222
228
  export default _default;
package/index.js CHANGED
@@ -220,5 +220,11 @@ exports["default"] = {
220
220
  },
221
221
  'nav.TreeView': {
222
222
  lazy: function () { return require('./nav/Tree/TreeView')["default"]; }
223
+ },
224
+ 'typography.TextView': {
225
+ lazy: function () { return require('./typography/Text/TextView')["default"]; }
226
+ },
227
+ 'typography.TitleView': {
228
+ lazy: function () { return require('./typography/Title/TitleView')["default"]; }
223
229
  }
224
230
  };
package/index.scss CHANGED
@@ -67,3 +67,5 @@
67
67
  @import './nav/Nav/NavListView';
68
68
  @import './nav/Nav/NavTabsView';
69
69
  @import './nav/Tree/TreeView';
70
+ @import './typography/Text/TextView';
71
+ @import './typography/Title/TitleView';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steroidsjs/bootstrap",
3
- "version": "3.0.0-beta.16",
3
+ "version": "3.0.0-beta.18",
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.8",
38
+ "@steroidsjs/core": "^3.0 || >=3.0.0-beta.9",
39
39
  "@steroidsjs/eslint-config": "^2.1.3",
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.8"
56
+ "@steroidsjs/core": "^3.0 || >=3.0.0-beta.9"
57
57
  }
58
58
  }
@@ -1,2 +1,3 @@
1
1
  @import "button";
2
2
  @import "card";
3
+ @import "typography";
@@ -0,0 +1,26 @@
1
+ @mixin typography-type($typeMap) {
2
+ font-family: map-get($typeMap, font-family);
3
+ font-size: map-get($typeMap, font-size);
4
+ font-weight: map-get($typeMap, font-weight);
5
+ line-height: map-get($typeMap, line-height);
6
+ color: map-get($typeMap, color);
7
+ text-transform: map-get($typeMap, text-transform);
8
+ text-decoration: map-get($typeMap, text-decoration);
9
+ text-align: map-get($typeMap, text-align);
10
+
11
+ @media (max-width: $tablet-width) {
12
+ font-size: map-get($typeMap, tablet-font-size);
13
+ font-weight: map-get($typeMap, tablet-font-weight);
14
+ line-height: map-get($typeMap, tablet-line-height);
15
+ text-transform: map-get($typeMap, tablet-text-transform);
16
+ text-align: map-get($typeMap, tablet-text-align);
17
+ }
18
+
19
+ @media (max-width: $mobile-width) {
20
+ font-size: map-get($typeMap, mobile-font-size);
21
+ font-weight: map-get($typeMap, mobile-font-weight);
22
+ line-height: map-get($typeMap, mobile-line-height);
23
+ text-transform: map-get($typeMap, mobile-text-transform);
24
+ text-align: map-get($typeMap, mobile-text-align);
25
+ }
26
+ }
@@ -25,35 +25,35 @@
25
25
  --light: #9088a1;
26
26
  --text-color: #312C3A;
27
27
  --is-dark: 'false';
28
+ }
28
29
 
29
- html[data-theme="dark"] {
30
- --primary: #8b57ff;
31
- --primary-dark: #6648a7;
32
- --primary-light: #ba9bff;
33
- --secondary: #9ea8db;
34
- --secondary-dark: #616a95;
35
- --secondary-light: #bcc3e9;
36
- --success: #3cf25a;
37
- --success-dark: #34cc4d;
38
- --success-light: #74ff8b;
39
- --danger: #fc6666;
40
- --danger-dark: #dc5858;
41
- --danger-light: #ffa1a1;
42
- --info: #9ae1f1;
43
- --info-dark: #77c4d6;
44
- --info-light: #ccf6ff;
45
- --warning: #ffe457;
46
- --warning-dark: #ebd251;
47
- --warning-light: #fff6c8;
48
- --graphite: #414141;
49
- --gray-dark: #4e4f57;
50
- --gray: #5b5c6b;
51
- --light-gray: #928b9d;
52
- --dark: #6b6477;
53
- --light: #b7afc7;
54
- --text-color: #FFFFFF;
55
- --is-dark: 'true';
56
- }
30
+ html[data-theme="dark"] {
31
+ --primary: #8b57ff;
32
+ --primary-dark: #6648a7;
33
+ --primary-light: #ba9bff;
34
+ --secondary: #9ea8db;
35
+ --secondary-dark: #616a95;
36
+ --secondary-light: #bcc3e9;
37
+ --success: #3cf25a;
38
+ --success-dark: #34cc4d;
39
+ --success-light: #74ff8b;
40
+ --danger: #fc6666;
41
+ --danger-dark: #dc5858;
42
+ --danger-light: #ffa1a1;
43
+ --info: #9ae1f1;
44
+ --info-dark: #77c4d6;
45
+ --info-light: #ccf6ff;
46
+ --warning: #ffe457;
47
+ --warning-dark: #ebd251;
48
+ --warning-light: #fff6c8;
49
+ --graphite: #414141;
50
+ --gray-dark: #4e4f57;
51
+ --gray: #5b5c6b;
52
+ --light-gray: #928b9d;
53
+ --dark: #6b6477;
54
+ --light: #b7afc7;
55
+ --text-color: #FFFFFF;
56
+ --is-dark: 'true';
57
57
  }
58
58
 
59
59
  /*
@@ -0,0 +1,2 @@
1
+ $mobile-width: 540px !default;
2
+ $tablet-width: 960px !default;
@@ -21,3 +21,87 @@ $line-height-2xl: 45px;
21
21
  $font-weight-sm: 400;
22
22
  $font-weight-md: 500;
23
23
  $font-weight-lg: 700;
24
+
25
+ $title-types: () !default;
26
+ $title-types: map-merge(
27
+ (
28
+ "h1": (
29
+ "font-size": $font-size-2xl,
30
+ "font-weight": $font-weight-lg,
31
+ "line-height": $line-height-2xl,
32
+ "color": $text-color,
33
+ ),
34
+ "h2": (
35
+ "font-size": $font-size-xl,
36
+ "font-weight": $font-weight-lg,
37
+ "line-height": $line-height-xl,
38
+ "color": $text-color,
39
+ ),
40
+ "h3": (
41
+ "font-size": $font-size-lg,
42
+ "font-weight": $font-weight-lg,
43
+ "line-height": $line-height-lg,
44
+ "color": $text-color,
45
+ ),
46
+ "h4": (
47
+ "font-size": $font-size-base,
48
+ "font-weight": $font-weight-lg,
49
+ "line-height": $line-height-base,
50
+ "color": $text-color,
51
+ ),
52
+ "h5": (
53
+ "font-size": $font-size-sm,
54
+ "font-weight": $font-weight-md,
55
+ "line-height": $line-height-sm,
56
+ "color": $text-color,
57
+ ),
58
+ "h6": (
59
+ "font-size": $font-size-xs,
60
+ "font-weight": $font-weight-md,
61
+ "line-height": $line-height-xs,
62
+ "color": $text-color,
63
+ ),
64
+ "subtitle": (
65
+ "font-size": $font-size-2xl,
66
+ "font-weight": $font-weight-md,
67
+ "line-height": $line-height-2xl,
68
+ "color": $text-color,
69
+ ),
70
+ ),
71
+ $title-types
72
+ );
73
+
74
+ $text-types: () !default;
75
+ $text-types: map-merge(
76
+ (
77
+ "body": (
78
+ "font-size": $font-size-base,
79
+ "font-weight": $font-weight-sm,
80
+ "line-height": $line-height-base,
81
+ "color": $text-color,
82
+ ),
83
+ "span": (
84
+ "font-size": $font-size-base,
85
+ "font-weight": $font-weight-sm,
86
+ "line-height": $line-height-base,
87
+ "color": $text-color,
88
+ ),
89
+ "boldSpan": (
90
+ "font-size": $font-size-base,
91
+ "font-weight": $font-weight-lg,
92
+ "line-height": $line-height-base,
93
+ "color": $text-color,
94
+ ),
95
+ ),
96
+ $text-types
97
+ );
98
+
99
+ $typography-colors: (
100
+ "text-color": $text-color,
101
+ "primary": $primary,
102
+ "secondary": $secondary,
103
+ "success": $success,
104
+ "danger": $danger,
105
+ "warning": $warning,
106
+ "info": $info,
107
+ );
@@ -1,4 +1,5 @@
1
1
  @import 'common/colors';
2
+ @import 'common/media';
2
3
  @import 'common/typography';
3
4
  @import 'common/radiuses';
4
5
  @import 'common/old-variables';
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import { ITextViewProps } from '@steroidsjs/core/ui/typography/Text/Text';
3
+ export default function TextView(props: ITextViewProps): React.DetailedReactHTMLElement<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ exports.__esModule = true;
26
+ var React = __importStar(require("react"));
27
+ var hooks_1 = require("@steroidsjs/core/hooks");
28
+ var TYPE_MAPPING = {
29
+ body: 'p',
30
+ span: 'span',
31
+ boldSpan: 'span'
32
+ };
33
+ function TextView(props) {
34
+ var bem = (0, hooks_1.useBem)('TextView');
35
+ var tag = props.tag || TYPE_MAPPING[props.type || ''] || 'p';
36
+ return (React.createElement(tag, {
37
+ className: bem(bem.block({
38
+ type: props.type,
39
+ color: props.color
40
+ }), props.className),
41
+ style: props.style
42
+ }, React.createElement(React.Fragment, null,
43
+ props.content,
44
+ props.children)));
45
+ }
46
+ exports["default"] = TextView;
@@ -0,0 +1,15 @@
1
+ .TextView {
2
+ font-family: $font-family-nunito;
3
+
4
+ @each $typeName, $typeMap in $text-types {
5
+ &_type_#{$typeName} {
6
+ @include typography-type($typeMap);
7
+ }
8
+ }
9
+
10
+ @each $colorName, $color in $typography-colors {
11
+ &_color_#{$colorName} {
12
+ color: $color;
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import { ITitleViewProps } from '@steroidsjs/core/ui/typography/Title/Title';
3
+ export default function TitleView(props: ITitleViewProps): React.DetailedReactHTMLElement<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ exports.__esModule = true;
26
+ var React = __importStar(require("react"));
27
+ var hooks_1 = require("@steroidsjs/core/hooks");
28
+ var TYPE_MAPPING = {
29
+ h1: 'h1',
30
+ h2: 'h2',
31
+ h3: 'h3',
32
+ h4: 'h4',
33
+ h5: 'h5',
34
+ h6: 'h6',
35
+ subtitle: 'h6'
36
+ };
37
+ function TitleView(props) {
38
+ var bem = (0, hooks_1.useBem)('TitleView');
39
+ var tag = props.tag || TYPE_MAPPING[props.type || ''] || 'h2';
40
+ return (React.createElement(tag, {
41
+ className: bem(bem.block({
42
+ type: props.type,
43
+ color: props.color
44
+ }), props.className),
45
+ style: props.style
46
+ }, React.createElement(React.Fragment, null,
47
+ props.content,
48
+ props.children)));
49
+ }
50
+ exports["default"] = TitleView;
@@ -0,0 +1,15 @@
1
+ .TitleView {
2
+ font-family: $font-family-nunito;
3
+
4
+ @each $typeName, $typeMap in $title-types {
5
+ &_type_#{$typeName} {
6
+ @include typography-type($typeMap);
7
+ }
8
+ }
9
+
10
+ @each $colorName, $color in $typography-colors {
11
+ &_color_#{$colorName} {
12
+ color: $color;
13
+ }
14
+ }
15
+ }