@steroidsjs/bootstrap 3.0.0-beta.3 → 3.0.0-beta.31

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.
Files changed (97) hide show
  1. package/README.md +1 -2
  2. package/content/Accordion/AccordionItemView.d.ts +2 -0
  3. package/content/Accordion/AccordionItemView.js +96 -0
  4. package/content/Accordion/AccordionItemView.scss +209 -0
  5. package/content/Accordion/AccordionView.d.ts +2 -0
  6. package/content/{Collapse/CollapseView.js → Accordion/AccordionView.js} +3 -3
  7. package/content/{Collapse/CollapseView.scss → Accordion/AccordionView.scss} +3 -4
  8. package/content/Alert/AlertView.scss +19 -4
  9. package/content/Avatar/AvatarView.js +2 -3
  10. package/content/Avatar/AvatarView.scss +29 -36
  11. package/content/Badge/BadgeView.d.ts +3 -0
  12. package/content/Badge/BadgeView.js +25 -0
  13. package/content/Badge/BadgeView.scss +135 -0
  14. package/content/Calendar/CaptionElement.scss +5 -4
  15. package/content/Card/CardView.js +34 -14
  16. package/content/Card/CardView.scss +126 -110
  17. package/content/Detail/DetailView.scss +75 -52
  18. package/content/DropDown/DropDownView.js +6 -3
  19. package/content/DropDown/DropDownView.scss +196 -27
  20. package/content/Icon/IconView.js +2 -2
  21. package/form/Button/ButtonView.js +12 -8
  22. package/form/Button/ButtonView.scss +157 -71
  23. package/form/CheckboxField/CheckboxFieldView.js +6 -3
  24. package/form/CheckboxField/CheckboxFieldView.scss +185 -36
  25. package/form/DropDownField/DropDownFieldView.js +46 -47
  26. package/form/DropDownField/DropDownFieldView.scss +391 -181
  27. package/form/DropDownField/views/DropDownItem/DropDownItemView.d.ts +3 -0
  28. package/form/DropDownField/views/DropDownItem/DropDownItemView.js +80 -0
  29. package/form/DropDownField/views/DropDownItem/DropDownItemView.scss +217 -0
  30. package/form/DropDownField/views/DropDownItem/index.d.ts +2 -0
  31. package/form/DropDownField/views/DropDownItem/index.js +7 -0
  32. package/form/FieldLayout/FieldLayoutView.js +12 -4
  33. package/form/FieldLayout/FieldLayoutView.scss +128 -24
  34. package/form/Form/FormView.js +3 -3
  35. package/form/Form/FormView.scss +10 -14
  36. package/form/InputField/InputFieldView.js +32 -13
  37. package/form/InputField/InputFieldView.scss +245 -99
  38. package/form/NumberField/NumberFieldView.js +19 -13
  39. package/form/NumberField/NumberFieldView.scss +195 -89
  40. package/form/PasswordField/PasswordFieldView.js +11 -9
  41. package/form/PasswordField/PasswordFieldView.scss +231 -63
  42. package/form/RadioListField/RadioListFieldView.js +10 -3
  43. package/form/RadioListField/RadioListFieldView.scss +229 -1
  44. package/form/TextField/TextFieldView.js +10 -2
  45. package/form/TextField/TextFieldView.scss +143 -2
  46. package/icons/index.d.ts +2 -0
  47. package/{icon/fontawesome.js → icons/index.js} +37 -11
  48. package/icons/svgs/accordion-chevron.svg +4 -0
  49. package/icons/svgs/arrow.svg +3 -0
  50. package/icons/svgs/badge-close.svg +3 -0
  51. package/icons/svgs/close.svg +4 -0
  52. package/icons/svgs/crossed-out-eye.svg +5 -0
  53. package/icons/svgs/default.svg +11 -0
  54. package/icons/svgs/dots.svg +5 -0
  55. package/icons/svgs/error.svg +12 -0
  56. package/icons/svgs/field-close.svg +4 -0
  57. package/icons/svgs/info.svg +12 -0
  58. package/icons/svgs/loader.svg +3 -0
  59. package/icons/svgs/search.svg +4 -0
  60. package/icons/svgs/success.svg +4 -0
  61. package/icons/svgs/user.svg +4 -0
  62. package/icons/svgs/visible-eye.svg +4 -0
  63. package/icons/svgs/warning.svg +12 -0
  64. package/index.d.ts +11 -2
  65. package/index.js +13 -4
  66. package/index.scss +6 -3
  67. package/layout/Header/HeaderView.scss +3 -3
  68. package/layout/Tooltip/TooltipView.js +6 -6
  69. package/layout/Tooltip/TooltipView.scss +45 -37
  70. package/list/Grid/GridView.scss +28 -30
  71. package/nav/Tree/TreeView.scss +14 -11
  72. package/package.json +56 -56
  73. package/scss/fonts.scss +6 -0
  74. package/scss/mixins/button.scss +51 -25
  75. package/scss/mixins/index.scss +2 -1
  76. package/scss/mixins/scroll.scss +31 -0
  77. package/scss/mixins/typography.scss +26 -0
  78. package/scss/variables/common/colors.scss +87 -67
  79. package/scss/variables/common/media.scss +2 -0
  80. package/scss/variables/common/typography.scss +96 -28
  81. package/scss/variables/components/input.scss +7 -6
  82. package/scss/variables/index.scss +2 -2
  83. package/scss/variables/normalize.scss +21 -0
  84. package/typography/Text/TextView.d.ts +3 -0
  85. package/typography/Text/TextView.js +46 -0
  86. package/typography/Text/TextView.scss +16 -0
  87. package/typography/Title/TitleView.d.ts +3 -0
  88. package/typography/Title/TitleView.js +50 -0
  89. package/typography/Title/TitleView.scss +16 -0
  90. package/content/Collapse/CollapseItemView.d.ts +0 -2
  91. package/content/Collapse/CollapseItemView.js +0 -65
  92. package/content/Collapse/CollapseItemView.scss +0 -88
  93. package/content/Collapse/CollapseView.d.ts +0 -2
  94. package/content/Icon/IconView.scss +0 -25
  95. package/icon/fontawesome.d.ts +0 -2
  96. package/scss/mixins/card.scss +0 -26
  97. package/scss/variables/components/card.scss +0 -20
@@ -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
+ }
@@ -23,62 +23,90 @@
23
23
  --light-gray: #f8f8f8;
24
24
  --dark: #6f6b76;
25
25
  --light: #9088a1;
26
+ --text-color: #312c3a;
27
+ --background-color: #fff;
28
+ --is-dark: "false";
29
+ --border-color: #eef1f2;
30
+ --border-color-hover: #e5e9eb;
31
+ --placeholder-color: rgba(0, 0, 0, 0.3);
32
+ --placeholder-disabled-color: rgba(0, 0, 0, 0.3);
33
+ --background-disabled-color: #eef1f2;
34
+ --element-background-color: #FFFFFF;
35
+ }
26
36
 
27
- html[data-theme="dark"] {
28
- --primary: #8b57ff;
29
- --primary-dark: #6648a7;
30
- --primary-light: #ba9bff;
31
- --secondary: #9ea8db;
32
- --secondary-dark: #616a95;
33
- --secondary-light: #bcc3e9;
34
- --success: #3cf25a;
35
- --success-dark: #34cc4d;
36
- --success-light: #74ff8b;
37
- --danger: #fc6666;
38
- --danger-dark: #dc5858;
39
- --danger-light: #ffa1a1;
40
- --info: #9ae1f1;
41
- --info-dark: #77c4d6;
42
- --info-light: #ccf6ff;
43
- --warning: #ffe457;
44
- --warning-dark: #ebd251;
45
- --warning-light: #fff6c8;
46
- --graphite: #414141;
47
- --gray-dark: #4e4f57;
48
- --gray: #5b5c6b;
49
- --light-gray: #928b9d;
50
- --dark: #6b6477;
51
- --light: #b7afc7;
52
- }
37
+ html[data-theme="dark"] {
38
+ --primary: #8b57ff;
39
+ --primary-dark: #6648a7;
40
+ --primary-light: #ba9bff;
41
+ --secondary: #9ea8db;
42
+ --secondary-dark: #616a95;
43
+ --secondary-light: #bcc3e9;
44
+ --success: #3cf25a;
45
+ --success-dark: #34cc4d;
46
+ --success-light: #74ff8b;
47
+ --danger: #fc6666;
48
+ --danger-dark: #dc5858;
49
+ --danger-light: #ffa1a1;
50
+ --info: #9ae1f1;
51
+ --info-dark: #77c4d6;
52
+ --info-light: #ccf6ff;
53
+ --warning: #ffe457;
54
+ --warning-dark: #ebd251;
55
+ --warning-light: #fff6c8;
56
+ --graphite: #414141;
57
+ --gray-dark: #4e4f57;
58
+ --gray: #5b5c6b;
59
+ --light-gray: #928b9d;
60
+ --dark: #6b6477;
61
+ --light: #b7afc7;
62
+ --text-color: #ffffff;
63
+ --background-color: #323030;
64
+ --is-dark: "true";
65
+ --border-color: #5B5C6B;
66
+ --border-color-hover: #4e4f57;
67
+ --placeholder-color: rgba(255, 255, 255, 0.3);
68
+ --placeholder-disabled-color: rgba(255, 255, 255, 0.1);
69
+ --background-disabled-color: #5b5c6b;
70
+ --element-background-color: #414141;
53
71
  }
54
72
 
55
73
  /*
56
74
  * SCSS variables implementation
57
75
  */
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;
76
+ $primary: var(--primary);
77
+ $primary-dark: var(--primary-dark);
78
+ $primary-light: var(--primary-light);
79
+ $secondary: var(--secondary);
80
+ $secondary-dark: var(--secondary-dark);
81
+ $secondary-light: var(--secondary-light);
82
+ $success: var(--success);
83
+ $success-dark: var(--success-dark);
84
+ $success-light: var(--success-light);
85
+ $danger: var(--danger);
86
+ $danger-dark: var(--danger-dark);
87
+ $danger-light: var(--danger-light);
88
+ $info: var(--info);
89
+ $info-dark: var(--info-dark);
90
+ $info-light: var(--info-light);
91
+ $warning: var(--warning);
92
+ $warning-dark: var(--warning-dark);
93
+ $warning-light: var(--warning-light);
94
+ $graphite: var(--graphite);
95
+ $gray-dark: var(--gray-dark);
96
+ $gray: var(--gray);
97
+ $light-gray: var(--light-gray);
98
+ $dark: var(--dark);
99
+ $light: var(--light);
100
+ $text-color: var(--text-color);
101
+ $text-color-revert: var(--text-color-revert);
102
+ $background-color: var(--background-color);
103
+ $is-dark: var(--is-dark);
104
+ $border-color: var(--border-color);
105
+ $border-color-hover: var(--border-color-hover);
106
+ $placeholder-color: var(--placeholder-color);
107
+ $placeholder-disabled-color: var(--placeholder-disabled-color);
108
+ $background-disabled-color: var(--background-disabled-color);
109
+ $element-background-color: var(--element-background-color);
82
110
 
83
111
  /*
84
112
  * Common colors
@@ -91,15 +119,19 @@ $black-10: rgba(#000, 0.1) !default;
91
119
  $black-4: rgba(#000, 0.04) !default;
92
120
  $white: #fff !default;
93
121
 
94
- $text-color: #312c3a !default;
95
122
  $link-color: #2ba3fb !default;
96
123
 
97
- $gradient-purple: linear-gradient(180deg, #7433FF, #FFA3FD);
98
- $gradient-red: linear-gradient(180deg, #EB0155, #FFFA80);
124
+ $gradient-blue: linear-gradient(180deg, #651fff, #ba9bff) !default;
99
125
 
100
126
  $color-themes: () !default;
101
127
  $color-themes: map-merge(
102
128
  (
129
+ "basic": (
130
+ "color": $gray,
131
+ "color-dark": $gray-dark,
132
+ "color-light": $light-gray,
133
+ "text-color": $text-color,
134
+ ),
103
135
  "primary": (
104
136
  "color": $primary,
105
137
  "color-dark": $primary-dark,
@@ -128,25 +160,13 @@ $color-themes: map-merge(
128
160
  "color": $warning,
129
161
  "color-dark": $warning-dark,
130
162
  "color-light": $warning-light,
131
- "text-color": $dark,
163
+ "text-color": $text-color,
132
164
  ),
133
165
  "info": (
134
166
  "color": $info,
135
167
  "color-dark": $info-dark,
136
168
  "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,
169
+ "text-color": $text-color,
150
170
  ),
151
171
  ),
152
172
  $color-themes
@@ -0,0 +1,2 @@
1
+ $mobile-width: 540px !default;
2
+ $tablet-width: 960px !default;
@@ -4,36 +4,104 @@
4
4
 
5
5
  $font-family-nunito: "Nunito", sans-serif;
6
6
 
7
- $font-size-xs: 12px;
8
- $font-size-sm: 14px;
9
- $font-size-base: 16px;
10
- $font-size-lg: 18px;
11
- $font-size-xl: 24px;
12
- $font-size-2xl: 32px;
7
+ $font-size-xs: 12px !default;
8
+ $font-size-sm: 14px !default;
9
+ $font-size-base: 16px !default;
10
+ $font-size-lg: 18px !default;
11
+ $font-size-xl: 24px !default;
12
+ $font-size-2xl: 32px !default;
13
13
 
14
- $line-height-xs: 17px;
15
- $line-height-sm: 20px;
16
- $line-height-base: 22px;
17
- $line-height-lg: 25px;
18
- $line-height-xl: 34px;
19
- $line-height-2xl: 45px;
14
+ $line-height-xs: 17px !default;
15
+ $line-height-sm: 20px !default;
16
+ $line-height-base: 22px !default;
17
+ $line-height-lg: 25px !default;
18
+ $line-height-xl: 34px !default;
19
+ $line-height-2xl: 45px !default;
20
20
 
21
- $font-weight-sm: 400;
22
- $font-weight-md: 500;
23
- $font-weight-lg: 700;
21
+ $font-weight-sm: 400 !default;
22
+ $font-weight-md: 500 !default;
23
+ $font-weight-lg: 700 !default;
24
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
+ );
25
73
 
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;
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
+ );
38
98
 
39
- $btn-letter-spacing: 0.1em;
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,3 +1,9 @@
1
+ $input-height-sm: 34px;
2
+ $input-height-md: 46px;
3
+ $input-height-lg: 56px;
4
+
5
+
6
+ //remove after ready all inputs
1
7
  //Small
2
8
  $input-label-margin-bottom-sm: 4px;
3
9
 
@@ -52,15 +58,10 @@ $input-message-margin-top-lg: $input-message-margin-top-sm;
52
58
  $input-message-icon-size-lg: $input-message-icon-size-sm;
53
59
  $input-message-icon-margin-right-lg: $input-message-icon-margin-right-sm;
54
60
 
55
-
56
- $input-height-sm: 28px !default;
57
- $input-height-md: 36px !default;
58
- $input-height-lg: 46px !default;
59
-
60
61
  $input-border: 1px solid $border-default !default;
61
62
  $input-border-radius: 4px !default;
62
63
 
63
64
  $input-padding-y: 0 !default;
64
65
  $input-padding-x: 8px !default;
65
66
  $input-addon-padding: 0.6rem !default;
66
- $input-text-padding: 0.4rem !default;
67
+ $input-text-padding: 0.4rem !default;
@@ -1,12 +1,12 @@
1
+ @import 'normalize.scss';
1
2
  @import 'common/colors';
3
+ @import 'common/media';
2
4
  @import 'common/typography';
3
- @import 'common/spacing';
4
5
  @import 'common/radiuses';
5
6
  @import 'common/old-variables';
6
7
 
7
8
  @import 'components/button';
8
9
  @import 'components/calendar';
9
- @import 'components/card';
10
10
  @import 'components/icon';
11
11
  @import 'components/input';
12
12
  @import 'components/ratefield';
@@ -0,0 +1,21 @@
1
+ @import-normalize;
2
+
3
+ * {
4
+ margin: 0;
5
+ padding: 0;
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ a {
10
+ text-decoration: none;
11
+ color: inherit;
12
+ font-family: inherit;
13
+ }
14
+
15
+ button {
16
+ font-family: inherit;
17
+ }
18
+
19
+ input {
20
+ outline: none;
21
+ }
@@ -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,16 @@
1
+ .TextView {
2
+ margin-bottom: 1em;
3
+ font-family: $font-family-nunito;
4
+
5
+ @each $typeName, $typeMap in $text-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,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,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
+ }
@@ -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;