@steroidsjs/bootstrap 3.0.0-beta.4 → 3.0.0-beta.41
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/README.md +1 -2
- package/content/Accordion/AccordionItemView.d.ts +2 -0
- package/content/{Collapse/CollapseItemView.js → Accordion/AccordionItemView.js} +46 -22
- package/content/Accordion/AccordionItemView.scss +209 -0
- package/content/Accordion/AccordionView.d.ts +2 -0
- package/content/{Collapse/CollapseView.js → Accordion/AccordionView.js} +3 -3
- package/content/{Collapse/CollapseView.scss → Accordion/AccordionView.scss} +3 -4
- package/content/Alert/AlertView.scss +19 -4
- package/content/Avatar/AvatarView.js +2 -3
- package/content/Avatar/AvatarView.scss +32 -39
- package/content/Badge/BadgeView.d.ts +3 -0
- package/content/Badge/BadgeView.js +25 -0
- package/content/Badge/BadgeView.scss +135 -0
- package/content/Calendar/CaptionElement.scss +5 -4
- package/content/Card/CardView.js +36 -14
- package/content/Card/CardView.scss +139 -107
- package/content/Detail/DetailView.scss +75 -52
- package/content/DropDown/DropDownView.js +6 -3
- package/content/DropDown/DropDownView.scss +196 -27
- package/content/Icon/IconView.js +2 -2
- package/form/Button/ButtonView.js +12 -8
- package/form/Button/ButtonView.scss +174 -68
- package/form/CheckboxField/CheckboxFieldView.js +6 -3
- package/form/CheckboxField/CheckboxFieldView.scss +193 -36
- package/form/CheckboxListField/CheckboxListFieldView.js +19 -15
- package/form/CheckboxListField/CheckboxListFieldView.scss +7 -41
- package/form/DropDownField/DropDownFieldView.js +31 -47
- package/form/DropDownField/DropDownFieldView.scss +390 -182
- package/form/DropDownField/utils.d.ts +2 -0
- package/form/DropDownField/utils.js +15 -0
- package/form/DropDownFieldItem/DropDownFieldItemView.d.ts +2 -0
- package/form/DropDownFieldItem/DropDownFieldItemView.js +78 -0
- package/form/DropDownFieldItem/DropDownFieldItemView.scss +216 -0
- package/form/FieldLayout/FieldLayoutView.js +13 -9
- package/form/FieldLayout/FieldLayoutView.scss +129 -24
- package/form/FieldList/FieldListView.js +1 -1
- package/form/FileField/FileFieldView.js +1 -1
- package/form/Form/FormView.js +1 -4
- package/form/Form/FormView.scss +1 -14
- package/form/InputField/InputFieldView.js +30 -13
- package/form/InputField/InputFieldView.scss +255 -99
- package/form/NumberField/NumberFieldView.js +19 -13
- package/form/NumberField/NumberFieldView.scss +195 -89
- package/form/PasswordField/PasswordFieldView.js +11 -9
- package/form/PasswordField/PasswordFieldView.scss +231 -63
- package/form/RadioField/RadioFieldView.d.ts +3 -0
- package/form/RadioField/RadioFieldView.js +57 -0
- package/form/RadioField/RadioFieldView.scss +226 -0
- package/form/RadioListField/RadioListFieldView.js +20 -16
- package/form/RadioListField/RadioListFieldView.scss +11 -1
- package/form/ReCaptchaField/ReCaptchaFieldView.js +2 -2
- package/form/SwitcherField/SwitcherFieldView.js +1 -1
- package/form/TextField/TextFieldView.js +10 -2
- package/form/TextField/TextFieldView.scss +143 -2
- package/icons/index.d.ts +2 -0
- package/{icon/fontawesome.js → icons/index.js} +40 -11
- package/icons/svgs/accordion-chevron.svg +4 -0
- package/icons/svgs/arrow-left.svg +3 -0
- package/icons/svgs/arrow.svg +3 -0
- package/icons/svgs/badge-close.svg +3 -0
- package/icons/svgs/close.svg +4 -0
- package/icons/svgs/crossed-out-eye.svg +5 -0
- package/icons/svgs/default.svg +11 -0
- package/icons/svgs/dots.svg +5 -0
- package/icons/svgs/double-arrow-left.svg +4 -0
- package/icons/svgs/error.svg +12 -0
- package/icons/svgs/field-close.svg +4 -0
- package/icons/svgs/home.svg +4 -0
- package/icons/svgs/info.svg +12 -0
- package/icons/svgs/loader.svg +3 -0
- package/icons/svgs/search.svg +4 -0
- package/icons/svgs/success.svg +4 -0
- package/icons/svgs/user.svg +4 -0
- package/icons/svgs/visible-eye.svg +4 -0
- package/icons/svgs/warning.svg +12 -0
- package/index.d.ts +11 -2
- package/index.js +13 -4
- package/index.scss +8 -3
- package/layout/Header/HeaderView.scss +3 -3
- package/layout/Tooltip/TooltipView.js +6 -6
- package/layout/Tooltip/TooltipView.scss +45 -37
- package/list/Grid/GridView.js +1 -1
- package/list/Grid/GridView.scss +28 -30
- package/list/List/ListView.d.ts +1 -0
- package/list/List/ListView.js +5 -5
- package/list/List/ListView.scss +9 -0
- package/list/Pagination/PaginationButtonView.js +34 -5
- package/list/Pagination/PaginationButtonView.scss +261 -1
- package/list/Pagination/PaginationMoreView.js +1 -1
- package/list/Pagination/PaginationMoreView.scss +4 -1
- package/nav/Breadcrubms/BreadcrumbsView.js +9 -1
- package/nav/Breadcrubms/BreadcrumbsView.scss +49 -0
- package/nav/Nav/NavIconView.js +1 -1
- package/nav/Nav/NavListView.js +1 -1
- package/nav/Nav/NavTabsView.js +1 -1
- package/nav/Tree/TreeView.scss +14 -11
- package/package.json +56 -56
- package/scss/fonts.scss +6 -0
- package/scss/mixins/button.scss +61 -24
- package/scss/mixins/index.scss +2 -1
- package/scss/mixins/scroll.scss +31 -0
- package/scss/mixins/typography.scss +26 -0
- package/scss/variables/common/colors.scss +95 -70
- package/scss/variables/common/media.scss +2 -0
- package/scss/variables/common/typography.scss +96 -28
- package/scss/variables/components/input.scss +7 -6
- package/scss/variables/index.scss +2 -2
- package/scss/variables/normalize.scss +25 -0
- package/typography/Text/TextView.d.ts +3 -0
- package/typography/Text/TextView.js +46 -0
- package/typography/Text/TextView.scss +16 -0
- package/typography/Title/TitleView.d.ts +3 -0
- package/typography/Title/TitleView.js +50 -0
- package/typography/Title/TitleView.scss +16 -0
- package/utils/renderIcon.d.ts +9 -0
- package/utils/renderIcon.js +27 -0
- package/content/Collapse/CollapseItemView.d.ts +0 -2
- package/content/Collapse/CollapseItemView.scss +0 -88
- package/content/Collapse/CollapseView.d.ts +0 -2
- package/content/Icon/IconView.scss +0 -25
- package/icon/fontawesome.d.ts +0 -2
- package/list/List/ListItemView.scss +0 -3
- package/scss/mixins/card.scss +0 -26
- package/scss/variables/components/card.scss +0 -20
|
@@ -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,16 @@
|
|
|
1
|
+
.TitleView {
|
|
2
|
+
margin-bottom: 1em;
|
|
3
|
+
font-family: $font-family-nunito;
|
|
4
|
+
|
|
5
|
+
@each $typeName, $typeMap in $title-types {
|
|
6
|
+
&_type_#{$typeName} {
|
|
7
|
+
@include typography-type($typeMap);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@each $colorName, $color in $typography-colors {
|
|
12
|
+
&_color_#{$colorName} {
|
|
13
|
+
color: $color;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IIconProps } from '@steroidsjs/core/ui/content/Icon/Icon';
|
|
3
|
+
/**
|
|
4
|
+
* Функция которая проверяет соответствует ли typeof icon === 'string', если да - то вернет компонент Icon
|
|
5
|
+
* с переданным в него iconProps, если нет то вернется span с классом iconProps.className со вложенным {icon}
|
|
6
|
+
* @example renderIcon(props.leadIcon, {className: 'leadIcon', tabIndex: -1})
|
|
7
|
+
*/
|
|
8
|
+
declare const renderIcon: (icon: string | React.ReactElement, iconProps: IIconProps) => JSX.Element;
|
|
9
|
+
export default renderIcon;
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
/* eslint-disable valid-typeof */
|
|
18
|
+
var react_1 = __importDefault(require("react"));
|
|
19
|
+
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon/Icon"));
|
|
20
|
+
/**
|
|
21
|
+
* Функция которая проверяет соответствует ли typeof icon === 'string', если да - то вернет компонент Icon
|
|
22
|
+
* с переданным в него iconProps, если нет то вернется span с классом iconProps.className со вложенным {icon}
|
|
23
|
+
* @example renderIcon(props.leadIcon, {className: 'leadIcon', tabIndex: -1})
|
|
24
|
+
*/
|
|
25
|
+
var renderIcon = function (icon, iconProps) { return typeof icon === 'string'
|
|
26
|
+
? (react_1["default"].createElement(Icon_1["default"], __assign({ name: icon }, iconProps))) : (react_1["default"].createElement("span", { className: iconProps.className }, icon)); };
|
|
27
|
+
exports["default"] = renderIcon;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
.CollapseItemView {
|
|
2
|
-
display: grid;
|
|
3
|
-
align-items: center;
|
|
4
|
-
|
|
5
|
-
background-color: #fff;
|
|
6
|
-
border-bottom: 1px solid rgba(#000, .1);
|
|
7
|
-
box-shadow: 0 0 3px 0 rgba(34, 60, 80, 0.2);
|
|
8
|
-
min-height: 48px;
|
|
9
|
-
width: 100%;
|
|
10
|
-
height: fit-content;
|
|
11
|
-
|
|
12
|
-
&_disable {
|
|
13
|
-
opacity: .4;
|
|
14
|
-
background-color: #d7d7d7;
|
|
15
|
-
color: rgba(#212529, .7);
|
|
16
|
-
|
|
17
|
-
.IconView {
|
|
18
|
-
svg {
|
|
19
|
-
fill-opacity: .6;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&_borderless {
|
|
25
|
-
border-bottom: unset;
|
|
26
|
-
box-shadow: unset;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&_active {
|
|
30
|
-
margin-bottom: 16px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
p {
|
|
34
|
-
margin: 0;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
&__icon {
|
|
38
|
-
transform: rotate(0deg);
|
|
39
|
-
transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
40
|
-
|
|
41
|
-
&_active {
|
|
42
|
-
transform: rotate(180deg);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&_disable_cursor {
|
|
46
|
-
cursor: auto;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&__header-container {
|
|
51
|
-
display: flex;
|
|
52
|
-
&_revert {
|
|
53
|
-
flex-direction: row-reverse;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&__title-container {
|
|
58
|
-
width: 100%;
|
|
59
|
-
padding: 0 16px;
|
|
60
|
-
align-self: center;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&__icon-wrapper {
|
|
64
|
-
width: 48px;
|
|
65
|
-
height: 48px;
|
|
66
|
-
|
|
67
|
-
display: flex;
|
|
68
|
-
align-items: center;
|
|
69
|
-
justify-content: center;
|
|
70
|
-
|
|
71
|
-
&_not_visible {
|
|
72
|
-
width: 0;
|
|
73
|
-
opacity: 0;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&__content {
|
|
78
|
-
transition: all 200ms ease;
|
|
79
|
-
overflow: hidden;
|
|
80
|
-
max-height: 0;
|
|
81
|
-
padding: 0 16px;
|
|
82
|
-
|
|
83
|
-
&_visible {
|
|
84
|
-
max-height: 1024px;
|
|
85
|
-
padding: 0 16px 8px 16px
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
.IconView {
|
|
2
|
-
svg {
|
|
3
|
-
width: $icon-size;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
&_size_sm svg {
|
|
7
|
-
width: $icon-size-sm;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
&_size_lg svg {
|
|
11
|
-
width: $icon-size-lg;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
img.IconView {
|
|
16
|
-
width: $icon-size;
|
|
17
|
-
|
|
18
|
-
&_size_sm {
|
|
19
|
-
width: $icon-size-sm;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&_size_lg {
|
|
23
|
-
width: $icon-size-lg;
|
|
24
|
-
}
|
|
25
|
-
}
|
package/icon/fontawesome.d.ts
DELETED
package/scss/mixins/card.scss
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
@mixin card-theme($root, $color) {
|
|
2
|
-
background: map-get($color, color);
|
|
3
|
-
color: map-get($color, text-color);
|
|
4
|
-
|
|
5
|
-
#{$root}__header{
|
|
6
|
-
background: map-get($color, color);
|
|
7
|
-
border-bottom: 1px solid map-get($color, color-dark);
|
|
8
|
-
}
|
|
9
|
-
#{$root}__footer{
|
|
10
|
-
background: map-get($color, color);
|
|
11
|
-
border-top: 1px solid map-get($color, color-dark);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@mixin card-border-theme($root, $color) {
|
|
16
|
-
border: 1px solid map-get($color, color);
|
|
17
|
-
#{$root}__content{
|
|
18
|
-
color: map-get($color, color);
|
|
19
|
-
}
|
|
20
|
-
#{$root}__header{
|
|
21
|
-
border-bottom: 1px solid map-get($color, color);
|
|
22
|
-
}
|
|
23
|
-
#{$root}__footer{
|
|
24
|
-
border-top: 1px solid map-get($color, color);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
$card-header-font-size: 20px !default;
|
|
2
|
-
$card-header-line-height: 24px !default;
|
|
3
|
-
|
|
4
|
-
$card-title-font-size: 20px !default;
|
|
5
|
-
$card-title-line-height: 24px !default;
|
|
6
|
-
|
|
7
|
-
$card-font-size: 14px !default;
|
|
8
|
-
|
|
9
|
-
$card-children-font-size: 16px !default;
|
|
10
|
-
$card-children-line-height: 28px !default;
|
|
11
|
-
|
|
12
|
-
$card-horizontal-header-font-size: 28px !default;
|
|
13
|
-
$card-horizontal-font-size: 16px !default;
|
|
14
|
-
|
|
15
|
-
$card-link-font-size: 16px !default;
|
|
16
|
-
|
|
17
|
-
$card-border-radius: 3px !default;
|
|
18
|
-
$card-button-border-radius: 4px !default;
|
|
19
|
-
|
|
20
|
-
$card-header-background: $grey-lighter !default;
|