@steroidsjs/bootstrap 3.0.0-beta.11 → 3.0.0-beta.13

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.
@@ -1,33 +1,59 @@
1
- @mixin button-theme($color) {
2
- background-color: map-get($color, color);
3
- color: map-get($color, text-color);
1
+ @mixin button-theme($colorMap, $colorName, $root) {
2
+ background-color: map-get($colorMap, color);
3
+ color: map-get($colorMap, text-color);
4
4
 
5
5
  &:hover {
6
- background-color: map-get($color, color-dark);
6
+ background-color: map-get($colorMap, color-dark);
7
7
  }
8
- &:focus, &:focus-visible {
9
- border: 3px solid map-get($color, color-light);
8
+ &:focus,
9
+ &:focus-visible {
10
+ border: 4px solid map-get($colorMap, color-light);
10
11
  }
11
12
  &:active {
12
- background-color: map-get($color, color-light);
13
+ background-color: map-get($colorMap, color-light);
14
+ }
15
+
16
+ #{$root}__loader {
17
+ svg {
18
+ path {
19
+ stroke: map-get($colorMap, color-light);
20
+
21
+ @if ($colorName == 'basic' ) {
22
+ stroke: map-get($colorMap, color-dark);
23
+ }
24
+ }
25
+ }
13
26
  }
14
27
  }
15
28
 
16
- @mixin button-outline-theme($color) {
17
- background-color: #fff;
18
- color: map-get($color, color);
19
- border: 1px solid map-get($color, color);
29
+ @mixin button-outline-theme($colorMap, $colorName, $root) {
30
+ background-color: transparent;
31
+ color: map-get($colorMap, color);
32
+ border: 1px solid map-get($colorMap, color);
33
+
34
+ &:hover {
35
+ color: map-get($colorMap, color-dark);
36
+ border-color: map-get($colorMap, color-dark);
37
+ }
38
+ &:focus {
39
+ box-shadow: 0 0 0 4px map-get($colorMap, color-light), 0 0 0 4px map-get($colorMap, color-light);
40
+ border: none;
41
+ }
42
+ &:active {
43
+ color: map-get($colorMap, color-light);
44
+ border-color: map-get($colorMap, color-light);
45
+ box-shadow: none;
46
+ }
47
+
48
+ @if ($colorName == "basic") {
49
+ color: $text-color;
50
+ }
20
51
 
21
- &:hover{
22
- color: map-get($color, color-dark);
23
- border-color: map-get($color, color-dark);
24
- }
25
- &:focus {
26
- box-shadow: 0 0 0 3px map-get($color, color-light), 0 0 0 3px map-get($color, color-light);
27
- }
28
- &:active {
29
- color: map-get($color, color-light);
30
- border-color: map-get($color, color-light);
31
- box-shadow: none;
32
- }
52
+ #{$root}__loader {
53
+ svg {
54
+ path {
55
+ stroke: map-get($colorMap, color);
56
+ }
57
+ }
58
+ }
33
59
  }
@@ -23,6 +23,8 @@
23
23
  --light-gray: #f8f8f8;
24
24
  --dark: #6f6b76;
25
25
  --light: #9088a1;
26
+ --text-color: #312C3A;
27
+ --is-dark: 'false';
26
28
 
27
29
  html[data-theme="dark"] {
28
30
  --primary: #8b57ff;
@@ -49,57 +51,65 @@
49
51
  --light-gray: #928b9d;
50
52
  --dark: #6b6477;
51
53
  --light: #b7afc7;
54
+ --text-color: #FFFFFF;
55
+ --is-dark: 'true';
52
56
  }
53
57
  }
54
58
 
55
59
  /*
56
60
  * SCSS variables implementation
57
61
  */
58
- $primary: var(--primary) !default;
59
- $primary-dark: var(--primary-dark) !default;
60
- $primary-light: var(--primary-light) !default;
61
- $secondary: var(--secondary) !default;
62
- $secondary-dark: var(--secondary-dark) !default;
63
- $secondary-light: var(--secondary-light) !default;
64
- $success: var(--success) !default;
65
- $success-dark: var(--success-dark) !default;
66
- $success-light: var(--success-light) !default;
67
- $danger: var(--danger) !default;
68
- $danger-dark: var(--danger-dark) !default;
69
- $danger-light: var(--danger-light) !default;
70
- $info: var(--info) !default;
71
- $info-dark: var(--info-dark) !default;
72
- $info-light: var(--info-light) !default;
73
- $warning: var(--warning) !default;
74
- $warning-dark: var(--warning-dark) !default;
75
- $warning-light: var(--warning-light) !default;
76
- $graphite: var(--graphite) !default;
77
- $gray-dark: var(--gray-dark) !default;
78
- $gray: var(--gray) !default;
79
- $light-gray: var(--light-gray) !default;
80
- $dark: var(--dark) !default;
81
- $light: var(--light) !default;
62
+ $primary: var(--primary);
63
+ $primary-dark: var(--primary-dark);
64
+ $primary-light: var(--primary-light);
65
+ $secondary: var(--secondary);
66
+ $secondary-dark: var(--secondary-dark);
67
+ $secondary-light: var(--secondary-light);
68
+ $success: var(--success);
69
+ $success-dark: var(--success-dark);
70
+ $success-light: var(--success-light);
71
+ $danger: var(--danger);
72
+ $danger-dark: var(--danger-dark);
73
+ $danger-light: var(--danger-light);
74
+ $info: var(--info);
75
+ $info-dark: var(--info-dark);
76
+ $info-light: var(--info-light);
77
+ $warning: var(--warning);
78
+ $warning-dark: var(--warning-dark);
79
+ $warning-light: var(--warning-light);
80
+ $graphite: var(--graphite);
81
+ $gray-dark: var(--gray-dark);
82
+ $gray: var(--gray);
83
+ $light-gray: var(--light-gray);
84
+ $dark: var(--dark);
85
+ $light: var(--light);
86
+ $text-color: var(--text-color);
87
+ $is-dark: var(--is-dark);
82
88
 
83
89
  /*
84
90
  * Common colors
85
91
  */
86
92
 
87
- $black: rgba(#000, 1) !default;
88
- $black-60: rgba(#000, 0.6) !default;
89
- $black-30: rgba(#000, 0.3) !default;
90
- $black-10: rgba(#000, 0.1) !default;
91
- $black-4: rgba(#000, 0.04) !default;
92
- $white: #fff !default;
93
+ $black: rgba(#000, 1);
94
+ $black-60: rgba(#000, 0.6);
95
+ $black-30: rgba(#000, 0.3);
96
+ $black-10: rgba(#000, 0.1);
97
+ $black-4: rgba(#000, 0.04);
98
+ $white: #fff;
93
99
 
94
- $text-color: #312c3a !default;
95
- $link-color: #2ba3fb !default;
100
+ $link-color: #2ba3fb;
96
101
 
97
- $gradient-purple: linear-gradient(180deg, #7433FF, #FFA3FD);
98
- $gradient-red: linear-gradient(180deg, #EB0155, #FFFA80);
102
+ $gradient-blue: linear-gradient(180deg, #651FFF, #BA9BFF);
99
103
 
100
- $color-themes: () !default;
104
+ $color-themes: ();
101
105
  $color-themes: map-merge(
102
106
  (
107
+ "basic": (
108
+ "color": $gray,
109
+ "color-dark": $gray-dark,
110
+ "color-light": $light-gray,
111
+ "text-color": $text-color,
112
+ ),
103
113
  "primary": (
104
114
  "color": $primary,
105
115
  "color-dark": $primary-dark,
@@ -128,25 +138,13 @@ $color-themes: map-merge(
128
138
  "color": $warning,
129
139
  "color-dark": $warning-dark,
130
140
  "color-light": $warning-light,
131
- "text-color": $dark,
141
+ "text-color": $text-color,
132
142
  ),
133
143
  "info": (
134
144
  "color": $info,
135
145
  "color-dark": $info-dark,
136
146
  "color-light": $info-light,
137
- "text-color": $white,
138
- ),
139
- "light": (
140
- "color": $light,
141
- "color-dark": $dark,
142
- "color-light": $light,
143
- "text-color": $dark,
144
- ),
145
- "dark": (
146
- "color": $dark,
147
- "color-dark": $dark,
148
- "color-light": $light,
149
- "text-color": $white,
147
+ "text-color": $text-color,
150
148
  ),
151
149
  ),
152
150
  $color-themes
@@ -21,19 +21,3 @@ $line-height-2xl: 45px;
21
21
  $font-weight-sm: 400;
22
22
  $font-weight-md: 500;
23
23
  $font-weight-lg: 700;
24
-
25
-
26
- /*
27
- * Button font variables
28
- */
29
-
30
- $btn-font-weight-sm: 400;
31
- $btn-font-weight-lg: 800;
32
-
33
- $btn-font-xs: 12px;
34
- $btn-font-sm: 14px;
35
- $btn-font-base: 16px;
36
-
37
- $btn-line-height: 24px;
38
-
39
- $btn-letter-spacing: 0.1em;
@@ -1,2 +0,0 @@
1
- import { ICollapseItemViewProps } from '@steroidsjs/core/ui/content/Collapse/CollapseItem';
2
- export default function CollapseItemView(props: ICollapseItemViewProps): JSX.Element;
@@ -1,65 +0,0 @@
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
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- exports.__esModule = true;
29
- var React = __importStar(require("react"));
30
- var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon"));
31
- var hooks_1 = require("@steroidsjs/core/hooks");
32
- function CollapseItemView(props) {
33
- var bem = (0, hooks_1.useBem)('CollapseItemView');
34
- React.useEffect(function () {
35
- if (props.isAccordion) {
36
- props.toggleAccordion(props.activeKey - 1);
37
- }
38
- else {
39
- props.toggleCollapse(props.activeKey - 1);
40
- }
41
- // eslint-disable-next-line react-hooks/exhaustive-deps
42
- }, [props.activeKey]);
43
- return (React.createElement("div", { className: bem(bem.block({
44
- disable: props.disabled,
45
- borderless: props.borderless
46
- }), props.className), style: props.style },
47
- React.createElement("div", { className: bem.element('header-container', { revert: props.iconPosition === 'left' }), onClick: !props.disabled
48
- ? function () {
49
- // eslint-disable-next-line no-unused-expressions
50
- props.isAccordion
51
- ? props.toggleAccordion(props.childIndex)
52
- : props.toggleCollapse(props.childIndex);
53
- }
54
- : null },
55
- React.createElement("div", { className: bem.element('title-container') },
56
- React.createElement("p", null, props.title)),
57
- React.createElement("div", { className: bem.element('icon-wrapper', { not_visible: !props.showIcon }) }, props.icon
58
- ? (typeof props.icon === 'string' ? React.createElement(Icon_1["default"], { name: props.icon }) : props.icon)
59
- : (React.createElement(Icon_1["default"], { className: bem.element('icon', {
60
- active: !props.disabled && props.isShowMore,
61
- disable_cursor: !props.showIcon
62
- }), name: "chevron-down" })))),
63
- React.createElement("div", { className: bem.element('content', { visible: !props.disabled && props.isShowMore }) }, props.children)));
64
- }
65
- exports["default"] = CollapseItemView;
@@ -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,2 +0,0 @@
1
- import { ICollapseViewProps } from '@steroidsjs/core/ui/content/Collapse/Collapse';
2
- export default function CollapseView(props: ICollapseViewProps): JSX.Element;
@@ -1,15 +0,0 @@
1
- .CollapseView {
2
- height: fit-content;
3
-
4
- display: grid;
5
- grid-gap: 0;
6
-
7
- & > :first-child {
8
- border-radius: 4px 4px 0 0;
9
- }
10
-
11
- & > :last-child {
12
- border-radius: 0 0 4px 4px;
13
- border: unset;
14
- }
15
- }
@@ -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
- }
File without changes