@steroidsjs/bootstrap 3.0.0-beta.6 → 3.0.0-beta.60

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 (277) hide show
  1. package/README.md +1 -2
  2. package/content/Accordion/AccordionItemView.d.ts +2 -0
  3. package/content/{Collapse/CollapseItemView.js → Accordion/AccordionItemView.js} +47 -22
  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.js +3 -2
  9. package/content/Alert/AlertView.scss +19 -4
  10. package/content/Avatar/AvatarView.js +2 -3
  11. package/content/Avatar/AvatarView.scss +32 -39
  12. package/content/Badge/BadgeView.d.ts +3 -0
  13. package/content/Badge/BadgeView.js +25 -0
  14. package/content/Badge/BadgeView.scss +135 -0
  15. package/content/Calendar/CalendarView.js +1 -1
  16. package/content/Calendar/CalendarView.scss +240 -161
  17. package/content/Calendar/CaptionElement.js +23 -15
  18. package/content/Calendar/CaptionElement.scss +164 -106
  19. package/content/Card/CardView.js +37 -14
  20. package/content/Card/CardView.scss +139 -107
  21. package/content/CopyToClipboard/CopyToClipboardView.d.ts +3 -0
  22. package/content/CopyToClipboard/CopyToClipboardView.js +19 -0
  23. package/content/CopyToClipboard/CopyToClipboardView.scss +41 -0
  24. package/content/Detail/DetailView.scss +75 -52
  25. package/content/DropDown/DropDownView.d.ts +0 -1
  26. package/content/DropDown/DropDownView.js +6 -4
  27. package/content/DropDown/DropDownView.scss +196 -27
  28. package/content/Icon/IconView.d.ts +1 -2
  29. package/content/Icon/IconView.js +2 -2
  30. package/content/Icon/IconView.scss +1 -23
  31. package/content/Menu/MenuItemView.d.ts +2 -0
  32. package/content/Menu/MenuItemView.js +15 -0
  33. package/content/Menu/MenuItemView.scss +63 -0
  34. package/content/Menu/MenuView.d.ts +2 -0
  35. package/content/Menu/MenuView.js +30 -0
  36. package/content/Menu/MenuView.scss +43 -0
  37. package/form/AutoCompleteField/AutoCompleteFieldView.d.ts +1 -2
  38. package/form/AutoCompleteField/AutoCompleteFieldView.js +62 -8
  39. package/form/AutoCompleteField/AutoCompleteFieldView.scss +199 -142
  40. package/form/Button/ButtonView.d.ts +1 -2
  41. package/form/Button/ButtonView.js +13 -9
  42. package/form/Button/ButtonView.scss +168 -68
  43. package/form/CheckboxField/CheckboxFieldView.d.ts +1 -2
  44. package/form/CheckboxField/CheckboxFieldView.js +6 -4
  45. package/form/CheckboxField/CheckboxFieldView.scss +195 -36
  46. package/form/CheckboxListField/CheckboxListFieldView.d.ts +1 -2
  47. package/form/CheckboxListField/CheckboxListFieldView.js +18 -15
  48. package/form/CheckboxListField/CheckboxListFieldView.scss +7 -41
  49. package/form/DateField/DateFieldView.js +7 -6
  50. package/form/DateField/DateFieldView.scss +7 -74
  51. package/form/DateRangeField/DateRangeFieldView.js +10 -13
  52. package/form/DateRangeField/DateRangeFieldView.scss +29 -78
  53. package/form/DateTimeField/DateTimeFieldView.d.ts +1 -2
  54. package/form/DateTimeField/DateTimeFieldView.js +5 -5
  55. package/form/DateTimeField/DateTimeFieldView.scss +7 -109
  56. package/form/DateTimeRangeField/DateTimeRangeFieldView.js +9 -7
  57. package/form/DateTimeRangeField/DateTimeRangeFieldView.scss +25 -90
  58. package/form/DropDownField/DropDownFieldView.js +31 -47
  59. package/form/DropDownField/DropDownFieldView.scss +388 -182
  60. package/form/DropDownField/utils.d.ts +2 -0
  61. package/form/DropDownField/utils.js +15 -0
  62. package/form/DropDownFieldItem/DropDownFieldItemView.d.ts +2 -0
  63. package/form/DropDownFieldItem/DropDownFieldItemView.js +78 -0
  64. package/form/DropDownFieldItem/DropDownFieldItemView.scss +218 -0
  65. package/form/FieldLayout/FieldLayoutView.d.ts +1 -2
  66. package/form/FieldLayout/FieldLayoutView.js +13 -9
  67. package/form/FieldLayout/FieldLayoutView.scss +114 -19
  68. package/form/FieldList/FieldListItemView.js +6 -4
  69. package/form/FieldList/FieldListItemView.scss +17 -39
  70. package/form/FieldList/FieldListView.js +9 -8
  71. package/form/FieldList/FieldListView.scss +58 -18
  72. package/form/FieldSet/FieldSetView.js +4 -2
  73. package/form/FieldSet/FieldSetView.scss +39 -0
  74. package/form/FileField/FileFieldItemView.d.ts +1 -2
  75. package/form/FileField/FileFieldItemView.js +31 -6
  76. package/form/FileField/FileFieldItemView.scss +254 -13
  77. package/form/FileField/FileFieldView.d.ts +1 -2
  78. package/form/FileField/FileFieldView.js +6 -8
  79. package/form/FileField/FileFieldView.scss +34 -4
  80. package/form/Form/FormView.js +1 -4
  81. package/form/Form/FormView.scss +1 -14
  82. package/form/HtmlField/HtmlFieldView.d.ts +1 -2
  83. package/form/HtmlField/HtmlFieldView.scss +6 -3
  84. package/form/ImageField/ImageFieldView.js +1 -1
  85. package/form/InputField/InputFieldView.d.ts +1 -2
  86. package/form/InputField/InputFieldView.js +30 -13
  87. package/form/InputField/InputFieldView.scss +265 -99
  88. package/form/NumberField/NumberFieldView.d.ts +1 -2
  89. package/form/NumberField/NumberFieldView.js +19 -13
  90. package/form/NumberField/NumberFieldView.scss +195 -89
  91. package/form/PasswordField/PasswordFieldView.d.ts +1 -2
  92. package/form/PasswordField/PasswordFieldView.js +11 -9
  93. package/form/PasswordField/PasswordFieldView.scss +231 -63
  94. package/form/RadioField/RadioFieldView.d.ts +2 -0
  95. package/form/RadioField/RadioFieldView.js +57 -0
  96. package/form/RadioField/RadioFieldView.scss +226 -0
  97. package/form/RadioListField/RadioListFieldView.d.ts +1 -2
  98. package/form/RadioListField/RadioListFieldView.js +20 -16
  99. package/form/RadioListField/RadioListFieldView.scss +11 -1
  100. package/form/ReCaptchaField/ReCaptchaFieldView.d.ts +1 -2
  101. package/form/ReCaptchaField/ReCaptchaFieldView.js +2 -2
  102. package/form/SliderField/SliderFieldView.d.ts +1 -2
  103. package/form/SwitcherField/SwitcherFieldView.d.ts +1 -2
  104. package/form/SwitcherField/SwitcherFieldView.js +12 -7
  105. package/form/SwitcherField/SwitcherFieldView.scss +188 -1
  106. package/form/TextField/TextFieldView.d.ts +1 -2
  107. package/form/TextField/TextFieldView.js +10 -2
  108. package/form/TextField/TextFieldView.scss +144 -2
  109. package/form/TimeField/TimeFieldView.d.ts +1 -2
  110. package/icons/index.d.ts +2 -0
  111. package/icons/index.js +103 -0
  112. package/icons/svgs/add.svg +4 -0
  113. package/icons/svgs/add_square.svg +5 -0
  114. package/icons/svgs/arrow_down_18x18.svg +4 -0
  115. package/icons/svgs/arrow_down_24x24.svg +4 -0
  116. package/icons/svgs/arrow_drop_down_10x10.svg +3 -0
  117. package/icons/svgs/arrow_left_18x18.svg +4 -0
  118. package/icons/svgs/arrow_left_24x24.svg +4 -0
  119. package/icons/svgs/arrow_right_18x18.svg +4 -0
  120. package/icons/svgs/arrow_right_24x24.svg +4 -0
  121. package/icons/svgs/arrow_up_18x18.svg +4 -0
  122. package/icons/svgs/arrow_up_24x24.svg +4 -0
  123. package/icons/svgs/blank.svg +4 -0
  124. package/icons/svgs/calendar_check.svg +5 -0
  125. package/icons/svgs/calendar_range.svg +8 -0
  126. package/icons/svgs/cancel_ellips.svg +4 -0
  127. package/icons/svgs/chart.svg +6 -0
  128. package/icons/svgs/checkmark_12x12.svg +4 -0
  129. package/icons/svgs/checkmark_8x8.svg +4 -0
  130. package/icons/svgs/circle_cross_12x12.svg +4 -0
  131. package/icons/svgs/circle_cross_16x16.svg +4 -0
  132. package/icons/svgs/circle_cross_18x18.svg +4 -0
  133. package/icons/svgs/clip.svg +3 -0
  134. package/icons/svgs/copy.svg +5 -0
  135. package/icons/svgs/cross_12x12.svg +4 -0
  136. package/icons/svgs/cross_4x4.svg +3 -0
  137. package/icons/svgs/cross_8x8.svg +4 -0
  138. package/icons/svgs/cut.svg +3 -0
  139. package/icons/svgs/date_range.svg +8 -0
  140. package/icons/svgs/default_16x16.svg +4 -0
  141. package/icons/svgs/default_24x24.svg +11 -0
  142. package/icons/svgs/double_arrow_down.svg +5 -0
  143. package/icons/svgs/double_arrow_left.svg +5 -0
  144. package/icons/svgs/double_arrow_right.svg +5 -0
  145. package/icons/svgs/double_arrow_up.svg +5 -0
  146. package/icons/svgs/doughnut_chart.svg +5 -0
  147. package/icons/svgs/edit.svg +4 -0
  148. package/icons/svgs/error_16x16.svg +5 -0
  149. package/icons/svgs/error_24x24.svg +12 -0
  150. package/icons/svgs/expand_down.svg +3 -0
  151. package/icons/svgs/expand_left.svg +3 -0
  152. package/icons/svgs/expand_left_double.svg +4 -0
  153. package/icons/svgs/expand_right.svg +3 -0
  154. package/icons/svgs/expand_right_double.svg +4 -0
  155. package/icons/svgs/expand_up.svg +3 -0
  156. package/icons/svgs/file_dock.svg +6 -0
  157. package/icons/svgs/filter.svg +3 -0
  158. package/icons/svgs/fluid.svg +4 -0
  159. package/icons/svgs/folder.svg +3 -0
  160. package/icons/svgs/group.svg +8 -0
  161. package/icons/svgs/home.svg +4 -0
  162. package/icons/svgs/img_box.svg +5 -0
  163. package/icons/svgs/import.svg +4 -0
  164. package/icons/svgs/info_16x16.svg +5 -0
  165. package/icons/svgs/info_24x24.svg +12 -0
  166. package/icons/svgs/left_12x12.svg +3 -0
  167. package/icons/svgs/loading_default.svg +3 -0
  168. package/icons/svgs/loading_icon_thick.svg +3 -0
  169. package/icons/svgs/loading_purple.svg +9 -0
  170. package/icons/svgs/map.svg +7 -0
  171. package/icons/svgs/menu_dots.svg +5 -0
  172. package/icons/svgs/menu_left.svg +5 -0
  173. package/icons/svgs/minis_sq.svg +4 -0
  174. package/icons/svgs/paste.svg +8 -0
  175. package/icons/svgs/pie_chart.svg +5 -0
  176. package/icons/svgs/pin.svg +4 -0
  177. package/icons/svgs/sad.svg +6 -0
  178. package/icons/svgs/search.svg +4 -0
  179. package/icons/svgs/setting_line.svg +3 -0
  180. package/icons/svgs/share.svg +7 -0
  181. package/icons/svgs/star.svg +3 -0
  182. package/icons/svgs/success_16x16.svg +4 -0
  183. package/icons/svgs/success_24x24.svg +11 -0
  184. package/icons/svgs/support.svg +3 -0
  185. package/icons/svgs/trash.svg +6 -0
  186. package/icons/svgs/upload.svg +4 -0
  187. package/icons/svgs/user.svg +4 -0
  188. package/icons/svgs/view.svg +4 -0
  189. package/icons/svgs/view_hide.svg +5 -0
  190. package/icons/svgs/warning_16x16.svg +5 -0
  191. package/icons/svgs/warning_24x24.svg +12 -0
  192. package/index.d.ts +26 -2
  193. package/index.js +28 -4
  194. package/index.scss +16 -3
  195. package/layout/Header/HeaderView.scss +3 -3
  196. package/layout/Loader/LoaderView.d.ts +2 -2
  197. package/layout/Loader/LoaderView.js +6 -2
  198. package/layout/Loader/LoaderView.scss +67 -22
  199. package/layout/Notifications/NotificationsItemView.d.ts +1 -2
  200. package/layout/Notifications/NotificationsView.d.ts +1 -2
  201. package/layout/ProgressBar/CircleProgressBarView.d.ts +1 -2
  202. package/layout/ProgressBar/LineProgressBarView.d.ts +1 -2
  203. package/layout/Tooltip/TooltipView.d.ts +1 -2
  204. package/layout/Tooltip/TooltipView.js +6 -6
  205. package/layout/Tooltip/TooltipView.scss +45 -37
  206. package/list/CheckboxColumn/CheckboxColumnView.d.ts +1 -2
  207. package/list/CheckboxColumn/CheckboxColumnView.js +2 -1
  208. package/list/ControlsColumnView/ControlsColumnView.d.ts +1 -2
  209. package/list/Grid/GridView.js +8 -4
  210. package/list/Grid/GridView.scss +148 -37
  211. package/list/Grid/views/ContentColumnView/ContentColumnView.d.ts +3 -0
  212. package/list/Grid/views/ContentColumnView/ContentColumnView.js +51 -0
  213. package/list/Grid/views/ContentColumnView/ContentColumnView.scss +88 -0
  214. package/list/Grid/views/ContentColumnView/index.d.ts +2 -0
  215. package/list/Grid/views/ContentColumnView/index.js +7 -0
  216. package/list/List/ListItemView.d.ts +1 -2
  217. package/list/List/ListView.js +5 -7
  218. package/list/List/ListView.scss +32 -1
  219. package/list/Pagination/PaginationButtonView.js +34 -5
  220. package/list/Pagination/PaginationButtonView.scss +265 -1
  221. package/list/Pagination/PaginationMoreView.js +1 -1
  222. package/list/Pagination/PaginationMoreView.scss +4 -1
  223. package/modal/Modal/ModalView.d.ts +1 -2
  224. package/modal/Modal/ModalView.js +4 -7
  225. package/modal/Modal/ModalView.scss +129 -93
  226. package/modal/TwoFactorModal/TwoFactorModalView.d.ts +1 -2
  227. package/nav/Breadcrubms/BreadcrumbsView.js +9 -1
  228. package/nav/Breadcrubms/BreadcrumbsView.scss +49 -0
  229. package/nav/ButtonGroup/ButtonGroupView.d.ts +2 -0
  230. package/nav/ButtonGroup/ButtonGroupView.js +32 -0
  231. package/nav/ButtonGroup/ButtonGroupView.scss +83 -0
  232. package/nav/Controls/ControlsView.d.ts +1 -2
  233. package/nav/Controls/ControlsView.scss +9 -3
  234. package/nav/Nav/NavBarView.d.ts +1 -2
  235. package/nav/Nav/NavButtonView.d.ts +1 -2
  236. package/nav/Nav/NavIconView.d.ts +1 -2
  237. package/nav/Nav/NavIconView.js +1 -1
  238. package/nav/Nav/NavLinkView.d.ts +1 -2
  239. package/nav/Nav/NavListView.d.ts +1 -2
  240. package/nav/Nav/NavListView.js +1 -1
  241. package/nav/Nav/NavTabsView.d.ts +1 -2
  242. package/nav/Nav/NavTabsView.js +1 -1
  243. package/nav/Tree/TreeView.d.ts +1 -2
  244. package/nav/Tree/TreeView.scss +14 -11
  245. package/package.json +56 -56
  246. package/scss/animations/index.scss +1 -0
  247. package/scss/animations/loading.scss +13 -0
  248. package/scss/fonts.scss +6 -0
  249. package/scss/mixins/button.scss +80 -24
  250. package/scss/mixins/customMixins.scss +5 -0
  251. package/scss/mixins/date.scss +397 -0
  252. package/scss/mixins/index.scss +4 -1
  253. package/scss/mixins/scroll.scss +31 -0
  254. package/scss/mixins/typography.scss +26 -0
  255. package/scss/variables/common/colors.scss +119 -69
  256. package/scss/variables/common/media.scss +2 -0
  257. package/scss/variables/common/typography.scss +96 -28
  258. package/scss/variables/common/variables.scss +1 -0
  259. package/scss/variables/components/input.scss +7 -6
  260. package/scss/variables/index.scss +3 -2
  261. package/scss/variables/normalize.scss +25 -0
  262. package/typography/Text/TextView.d.ts +3 -0
  263. package/typography/Text/TextView.js +46 -0
  264. package/typography/Text/TextView.scss +16 -0
  265. package/typography/Title/TitleView.d.ts +3 -0
  266. package/typography/Title/TitleView.js +50 -0
  267. package/typography/Title/TitleView.scss +16 -0
  268. package/utils/renderIcon.d.ts +9 -0
  269. package/utils/renderIcon.js +27 -0
  270. package/content/Collapse/CollapseItemView.d.ts +0 -2
  271. package/content/Collapse/CollapseItemView.scss +0 -88
  272. package/content/Collapse/CollapseView.d.ts +0 -2
  273. package/icons/fontawesome.d.ts +0 -2
  274. package/icons/fontawesome.js +0 -254
  275. package/list/List/ListItemView.scss +0 -3
  276. package/scss/mixins/card.scss +0 -26
  277. package/scss/variables/components/card.scss +0 -20
@@ -1,102 +1,208 @@
1
+ :root {
2
+ --number-field-arrow-color: #414141;
3
+ }
4
+
5
+ html[data-theme="dark"] {
6
+ --number-field-arrow-color: #ffffff;
7
+ }
8
+
9
+ $number-field-arrow-color: var(--number-field-arrow-color);
10
+
1
11
  .NumberFieldView {
2
- display: flex;
3
- overflow: hidden;
4
- flex-flow: row nowrap;
5
- align-items: stretch;
6
- padding: 0;
7
- border: $input-border;
8
-
9
- &:hover {
10
- border-color: $border-hover;
11
- }
12
- &:active {
13
- border-color: $border-action;
14
- box-shadow: 0 0 0 4px $border-typing;
15
- }
16
-
17
- &_disabled {
18
- color: rgba(0, 0, 0, .25);
19
- background-color: $back-disabled;
20
- border: unset;
21
- cursor: not-allowed;
22
-
23
- &:active, &:hover {
24
- border: unset;
25
- box-shadow: unset;
12
+ $root: &;
13
+ display: flex;
14
+ position: relative;
15
+ padding: 0;
16
+
17
+ font-family: $font-family-nunito;
18
+
19
+ // Hide default arrows
20
+ /* Chrome, Safari, Edge, Opera */
21
+ input::-webkit-outer-spin-button,
22
+ input::-webkit-inner-spin-button {
23
+ -webkit-appearance: none;
24
+ margin: 0;
26
25
  }
27
26
 
28
- input {
29
- cursor: inherit;
27
+ /* Firefox */
28
+ input[type="number"] {
29
+ -moz-appearance: textfield;
30
30
  }
31
- }
32
-
33
- // Hide default arrows
34
- /* Chrome, Safari, Edge, Opera */
35
- input::-webkit-outer-spin-button,
36
- input::-webkit-inner-spin-button {
37
- -webkit-appearance: none;
38
- margin: 0;
39
- }
40
-
41
- /* Firefox */
42
- input[type=number] {
43
- -moz-appearance: textfield;
44
- }
45
-
46
- &__input {
47
- flex-grow: 1;
48
- border: none;
49
- outline: none;
50
- background-color: transparent;
51
- color: $heading;
52
-
53
- width: inherit;
54
- padding: $input-padding-y $input-padding-x;
55
- }
56
-
57
- &__arrows-container{
58
- display: flex;
59
- flex-flow: column;
60
- grid-gap: 2px;
61
- font-size: .6em;
62
-
63
- opacity: 0;
64
- pointer-events: none;
65
- transition: opacity .15s;
66
- }
67
- &:hover &__arrows-container{
68
- opacity: 1;
69
- pointer-events: all;
70
- }
71
-
72
- &__arrow{
73
- padding: $input-padding-y $input-padding-x;
74
- cursor: pointer;
75
- height: 50%;
76
31
 
77
- display: flex;
78
- align-items: center;
79
- justify-content: center;
80
-
81
- &:nth-child(1), &:nth-child(2) {
82
- background-color: $grey-lighter;
83
- &:active, &:hover {
84
- background-color: $border-default;
85
- fill: $white;
86
- svg {
87
- fill: $white;
32
+ &__arrows-container {
33
+ position: absolute;
34
+ z-index: 2;
35
+ right: 0;
36
+ top: 0;
37
+ height: 100%;
38
+
39
+ display: flex;
40
+ flex-direction: column;
41
+ justify-content: space-between;
42
+ align-items: center;
43
+
44
+ transition: opacity 150ms ease-in-out;
45
+ opacity: 0;
46
+ pointer-events: none;
47
+ }
48
+
49
+ &__arrow {
50
+ width: 30px;
51
+ height: 16px;
52
+
53
+ display: flex;
54
+ justify-content: center;
55
+ align-items: center;
56
+ outline: none;
57
+ border: none;
58
+ background: transparent;
59
+
60
+ span > svg > path {
61
+ stroke: $number-field-arrow-color;
62
+ }
63
+
64
+ &_disabled {
65
+ span {
66
+ cursor: not-allowed;
67
+ }
68
+ span > svg > path {
69
+ stroke: $background-disabled-color;
70
+ }
71
+ }
72
+
73
+ &:last-child {
74
+ transform: rotate(180deg);
75
+ }
76
+ }
77
+
78
+ &_size {
79
+ &_lg {
80
+ #{$root} {
81
+ &__input {
82
+ height: 56px;
83
+ border-radius: $radius-large;
84
+ font-size: $font-size-lg;
85
+
86
+ &-effects {
87
+ border-radius: $radius-large;
88
+ }
89
+ }
90
+
91
+ &__arrow {
92
+ transform: translateX(-3px) translateY(6px);
93
+
94
+ &:last-child {
95
+ transform: translateX(-3px) translateY(-8px) rotate(180deg);
96
+ }
97
+ }
98
+ }
99
+ }
100
+
101
+ &_md {
102
+ #{$root} {
103
+ &__input {
104
+ height: 46px;
105
+ border-radius: $radius-large;
106
+ font-size: $font-size-base;
107
+
108
+ &-effects {
109
+ border-radius: $radius-large;
110
+ }
111
+ }
112
+
113
+ &__arrow {
114
+ transform: translateX(-3px) translateY(4px) scale(0.8);
115
+
116
+ &:last-child {
117
+ transform: translateX(-3px) translateY(-4px) rotate(180deg) scale(0.8);
118
+ }
119
+ }
120
+ }
121
+ }
122
+
123
+ &_sm {
124
+ #{$root} {
125
+ &__input {
126
+ height: 34px;
127
+ font-size: $font-size-sm;
128
+
129
+ &-effects {
130
+ border-radius: $radius-small;
131
+ }
132
+ }
133
+
134
+ &__arrow {
135
+ transform: translateX(1px) translateY(2px) scale(0.8);
136
+
137
+ &:last-child {
138
+ transform: translateX(1px) translateY(-3px) rotate(180deg) scale(0.8);
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
144
+
145
+ &__input {
146
+ width: 100%;
147
+ outline: none;
148
+ border: 1px solid $border-color;
149
+ border-radius: $radius-small;
150
+ padding: 5px 22px 5px 8px;
151
+ line-height: 24px;
152
+ z-index: 1;
153
+ font-weight: $font-weight-sm;
154
+ color: $text-color;
155
+
156
+ background-color: $element-background-color;
157
+
158
+ &::placeholder {
159
+ color: $placeholder-color;
160
+ }
161
+
162
+ &:disabled {
163
+ background-color: $background-disabled-color;
164
+ color: $placeholder-disabled-color;
165
+ }
166
+
167
+ &:hover:not(:disabled):not(:focus) {
168
+ border-color: $border-color-hover;
169
+ }
170
+
171
+ &:active:not(:disabled) {
172
+ border: 1px solid $primary;
88
173
  }
89
- }
90
174
  }
91
175
 
92
- &_disabled{
93
- cursor: not-allowed;
176
+ &:focus-within #{$root}__arrows-container {
177
+ opacity: 1;
178
+ pointer-events: all;
94
179
  }
95
180
 
96
- svg{
97
- transition: fill .1s;
181
+ &__input-effects {
182
+ position: absolute;
183
+ display: block;
184
+ z-index: 5;
185
+ top: 0;
186
+ left: 0;
187
+
188
+ width: 100%;
189
+ height: 100%;
190
+ background-color: transparent;
191
+ border: 4px solid $primary-light;
192
+ opacity: 0;
193
+ pointer-events: none;
98
194
  }
99
195
 
100
- }
101
- }
196
+ &__input:focus ~ &__input-effects {
197
+ opacity: 1;
198
+ }
199
+
200
+ &__input:active ~ &__input-effects {
201
+ opacity: 0;
202
+ }
102
203
 
204
+ &_filled #{$root}__arrows-container {
205
+ opacity: 1;
206
+ pointer-events: all;
207
+ }
208
+ }
@@ -1,3 +1,2 @@
1
- import { IBemHocOutput } from '@steroidsjs/core/hoc/bem';
2
1
  import { IPasswordFieldViewProps } from '@steroidsjs/core/ui/form/PasswordField/PasswordField';
3
- export default function PasswordFieldView(props: IPasswordFieldViewProps & IBemHocOutput): JSX.Element;
2
+ export default function PasswordFieldView(props: IPasswordFieldViewProps): JSX.Element;
@@ -42,15 +42,17 @@ var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon"));
42
42
  var hooks_1 = require("@steroidsjs/core/hooks");
43
43
  function PasswordFieldView(props) {
44
44
  var bem = (0, hooks_1.useBem)('PasswordFieldView');
45
- return (React.createElement("div", { className: bem(bem.block(), props.className) },
46
- React.createElement("div", { className: bem(bem.element('container', {
45
+ return (React.createElement("div", { className: bem(bem.block({
46
+ size: props.size,
47
+ filled: !!props.inputProps.value,
48
+ disabled: props.inputProps.disabled
49
+ }), props.className) },
50
+ React.createElement("div", { className: bem.element('container', {
47
51
  disabled: props.inputProps.disabled
48
- }), 'form-control', 'form-control-' + props.size, !!props.errors && 'is-invalid') },
49
- React.createElement("input", __assign({ className: bem(bem.element('input', {
50
- size: props.size
51
- }), !!props.errors && 'is-invalid', props.className) }, props.inputProps)),
52
- props.security && (React.createElement("button", { className: bem(bem.element('icon-eye')), onMouseDown: props.onShowPassword, onMouseUp: props.onHidePassword },
53
- React.createElement(Icon_1["default"], { name: props.inputProps.type === 'password' ? 'securityEye' : 'securityEyeSlash' })))),
54
- props.security && (React.createElement("div", { className: bem.element('security-bar', props.securityLevel) }))));
52
+ }) },
53
+ React.createElement("input", __assign({ className: bem.element('input') }, props.inputProps, { id: props.id })),
54
+ props.showSecurityIcon && (React.createElement("span", { className: bem(bem.element('icon-eye')), onMouseDown: props.onShowPassword, onMouseUp: props.onHidePassword },
55
+ React.createElement(Icon_1["default"], { name: props.inputProps.type === 'password' ? 'view_hide' : 'view' })))),
56
+ props.showSecurityBar && (React.createElement("div", { className: bem.element('security-bar', props.securityLevel) }))));
55
57
  }
56
58
  exports["default"] = PasswordFieldView;
@@ -1,76 +1,244 @@
1
+ :root {
2
+ --security-bar-background: #eef1f2;
3
+ --eye-default-color: #eef1f2;
4
+ --eye-filled-color: #323232;
5
+ }
6
+
7
+ html[data-theme="dark"] {
8
+ --security-bar-background: #5b5c6b;
9
+ --eye-default-color: #5b5c6b;
10
+ --eye-filled-color: #ffffff;
11
+ }
12
+
13
+ $security-bar-background: var(--security-bar-background);
14
+ $eye-default-color: var(--eye-default-color);
15
+ $eye-filled-color: var(--eye-filled-color);
16
+
1
17
  .PasswordFieldView {
18
+ $root: &;
19
+
20
+ position: relative;
21
+ line-height: 24px;
22
+ font-weight: $font-weight-sm;
23
+
24
+ &__container {
25
+ position: relative;
26
+ width: 100%;
27
+ height: 34px;
28
+
29
+ &::before {
30
+ position: absolute;
31
+ content: "";
32
+ width: 100%;
33
+ height: 100%;
2
34
 
35
+ transform: translate(-4px, -4px);
3
36
 
4
- &__container{
5
- display: flex;
6
- flex-flow: row nowrap;
7
- align-items: stretch;
8
- padding: 0;
37
+ border-radius: 16px;
9
38
 
10
- &:focus-within{
11
- outline: 0;
12
- border-color: $border-action;
13
- box-shadow: 0 0 0 0.2rem $border-typing;
39
+ border: 4px solid $primary-light;
40
+ transition: opacity 150ms ease-in-out;
41
+ opacity: 0;
42
+ pointer-events: none;
43
+ }
44
+
45
+ &:focus-within:not(&_disabled):not(:active)::before {
46
+ opacity: 1;
47
+ }
14
48
  }
15
- &.is-invalid:focus-within{
16
- border-color: $border-error;
17
- box-shadow: 0 0 0 0.2rem $back-error;
49
+
50
+ &__input {
51
+ width: 100%;
52
+ height: 100%;
53
+ border-radius: $radius-small;
54
+ border: 1px solid $border-color;
55
+ outline: none;
56
+ padding-left: 8px;
57
+ padding-right: 42px;
58
+
59
+ background-color: $element-background-color;
60
+ color: $text-color;
61
+
62
+ &::placeholder {
63
+ color: $placeholder-color;
64
+ }
65
+
66
+ &:hover {
67
+ border: 1px solid $border-color-hover;
68
+ }
69
+
70
+ &:not(:disabled):active {
71
+ border: 1px solid $primary;
72
+ }
73
+
74
+ &:not(:disabled):focus {
75
+ border-color: transparent;
76
+ }
77
+
78
+ &:disabled {
79
+ border: none;
80
+ background-color: $background-disabled-color;
81
+ }
18
82
  }
19
- &_disabled {
20
- color: rgba(0, 0, 0, .25);
21
- background-color: $back-disabled;
22
- cursor: not-allowed;
23
- input {
24
- cursor: inherit;
25
- }
83
+
84
+ &_size {
85
+ &_lg {
86
+ #{$root}__container {
87
+ height: 56px;
88
+
89
+ &::before {
90
+ border-radius: 16px;
91
+ transform: translateX(-2%) translateY(-6.5%)
92
+ }
93
+ }
94
+
95
+ #{$root}__input {
96
+ border-radius: $radius-large;
97
+ font-size: $font-size-lg;
98
+ }
99
+
100
+ }
101
+
102
+ &_md {
103
+ #{$root}__container {
104
+ height: 46px;
105
+
106
+ &::before {
107
+ border-radius: 16px;
108
+ }
109
+ }
110
+
111
+ #{$root}__input {
112
+ border-radius: $radius-large;
113
+ font-size: $font-size-base;
114
+ }
115
+
116
+ }
117
+
118
+ &_sm {
119
+ #{$root}__container {
120
+ height: $input-height-sm;
121
+
122
+ &::before {
123
+ border-radius: 12px;
124
+ transform: translateX(-2%) translateY(-9.5%);
125
+ }
126
+ }
127
+
128
+ #{$root}__input {
129
+ border-radius: $radius-small;
130
+ font-size: $font-size-sm;
131
+ }
132
+
133
+ }
26
134
  }
27
- }
28
-
29
- &__input {
30
- flex-grow: 1;
31
- border: none;
32
- outline: none;
33
- background-color: transparent;
34
-
35
- padding: $input-padding-y $input-padding-x;
36
- }
37
-
38
- &__icon-eye {
39
- cursor: pointer;
40
- display: flex;
41
- align-items: center;
42
- padding-right: $input-padding-x;
43
-
44
- opacity: .5;
45
- transition: opacity .1s ease-in;
46
- &:hover {
47
- opacity: 1;
135
+
136
+ &__security-bar {
137
+ position: relative;
138
+ width: 100%;
139
+ height: 4px;
140
+ border-radius: 4px;
141
+ margin-top: 8px;
142
+
143
+ background-color: $security-bar-background;
144
+
145
+ &::before {
146
+ content: "";
147
+ position: absolute;
148
+ width: 0%;
149
+ height: 4px;
150
+ border-radius: 4px;
151
+ transition: width 1s ease-in-out;
152
+ }
153
+
154
+ &_danger::before {
155
+ width: 33%;
156
+ background-color: $danger;
157
+ }
158
+
159
+ &_warning::before {
160
+ width: 66%;
161
+ background-color: $warning;
162
+ }
163
+
164
+ &_success::before {
165
+ width: 100%;
166
+ background-color: $success;
167
+ }
48
168
  }
49
169
 
50
- & > span{
51
- display: flex;
52
- align-items: center;
170
+ &__icon-eye {
171
+ outline: none;
172
+ border: none;
173
+
174
+ cursor: pointer;
175
+ position: absolute;
176
+ right: 8px;
177
+ top: 50%;
178
+ transform: translateY(-50%);
53
179
  }
54
- }
55
-
56
- &__security-bar {
57
- margin: 10px 0 0 ;
58
- height: 4px;
59
- width: 0;
60
- border-radius: 3px;
61
- transition: width 1s;
62
-
63
- &_danger {
64
- width: 33%;
65
- background-color: $danger;
180
+
181
+ &__icon-eye {
182
+ width: 24px;
183
+ height: 24px;
184
+
185
+ svg {
186
+ path {
187
+ fill: $eye-default-color;
188
+
189
+ &:last-child {
190
+ stroke: $eye-default-color;
191
+ }
192
+ }
193
+ }
194
+
195
+ &:active {
196
+ svg {
197
+ path {
198
+ fill: inherit;
199
+ stroke: $eye-default-color;
200
+ }
201
+ circle {
202
+ stroke: $eye-default-color;
203
+ }
204
+ }
205
+ }
66
206
  }
67
- &_warning {
68
- width: 66%;
69
- background-color: $warning;
207
+
208
+ &_filled {
209
+ #{$root}__icon-eye {
210
+ svg {
211
+ path {
212
+ fill: $eye-filled-color;
213
+
214
+ &:last-child {
215
+ stroke: $eye-filled-color;
216
+ }
217
+ }
218
+ }
219
+
220
+ &:active {
221
+ svg {
222
+ path {
223
+ fill: inherit;
224
+ stroke: $eye-filled-color;
225
+ }
226
+ circle {
227
+ stroke: $eye-filled-color;
228
+ }
229
+ }
230
+ }
231
+ }
70
232
  }
71
- &_success {
72
- width: 100%;
73
- background-color: $success;
233
+
234
+ &_disabled {
235
+ #{$root}__icon-eye,
236
+ #{$root}__security-bar {
237
+ opacity: 0;
238
+
239
+ &::before {
240
+ opacity: 0;
241
+ }
242
+ }
74
243
  }
75
- }
76
- }
244
+ }
@@ -0,0 +1,2 @@
1
+ import { IRadioFieldViewProps } from '@steroidsjs/core/ui/form/RadioField/RadioField';
2
+ export default function RadioFieldView(props: IRadioFieldViewProps): JSX.Element;
@@ -0,0 +1,57 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
37
+ return (mod && mod.__esModule) ? mod : { "default": mod };
38
+ };
39
+ exports.__esModule = true;
40
+ var React = __importStar(require("react"));
41
+ var hooks_1 = require("@steroidsjs/core/hooks");
42
+ var useUniqueId_1 = __importDefault(require("@steroidsjs/core/hooks/useUniqueId"));
43
+ function RadioFieldView(props) {
44
+ var bem = (0, hooks_1.useBem)('RadioFieldView');
45
+ var id = (0, useUniqueId_1["default"])('radio');
46
+ return (React.createElement("div", { className: bem(bem.block({
47
+ hasError: !!props.errors,
48
+ size: props.size
49
+ }), props.className), onClick: props.onChange },
50
+ React.createElement("input", __assign({ className: bem(bem.element('input', {
51
+ checked: props.checked
52
+ })), id: props.id || id }, props.inputProps, { checked: props.checked, disabled: props.disabled, required: props.required })),
53
+ React.createElement("label", { className: bem.element('label'), htmlFor: props.id || id },
54
+ React.createElement("span", { className: bem.element('ellipse') }),
55
+ props.label)));
56
+ }
57
+ exports["default"] = RadioFieldView;