cm-admin 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +12 -0
  3. data/.rspec +3 -0
  4. data/.travis.yml +6 -0
  5. data/Gemfile +6 -1
  6. data/Gemfile.lock +118 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +6 -40
  9. data/app/assets/images/logo.png +0 -0
  10. data/{lib/generators/cm_admin/templates/assets/stylesheets → app/assets/stylesheets/cm_admin}/base/auth.scss +16 -6
  11. data/app/assets/stylesheets/cm_admin/base/common.scss +237 -0
  12. data/app/assets/stylesheets/cm_admin/base/filters.scss +199 -0
  13. data/app/assets/stylesheets/cm_admin/base/form.scss +262 -0
  14. data/app/assets/stylesheets/cm_admin/base/main-nav.scss +47 -0
  15. data/app/assets/stylesheets/cm_admin/base/navbar.scss +67 -0
  16. data/app/assets/stylesheets/cm_admin/base/quicksearch.scss +69 -0
  17. data/app/assets/stylesheets/cm_admin/base/scaffold.scss +61 -0
  18. data/app/assets/stylesheets/cm_admin/base/show.scss +54 -0
  19. data/app/assets/stylesheets/cm_admin/base/sidebar.scss +225 -0
  20. data/app/assets/stylesheets/cm_admin/base/table.scss +303 -0
  21. data/app/assets/stylesheets/cm_admin/base/tabs.scss +26 -0
  22. data/app/assets/stylesheets/cm_admin/cm_admin.css.scss +26 -0
  23. data/app/assets/stylesheets/cm_admin/components/_alerts.scss +101 -0
  24. data/app/assets/stylesheets/cm_admin/components/_buttons.scss +135 -0
  25. data/app/assets/stylesheets/cm_admin/components/_dropdown-popup.scss +141 -0
  26. data/app/assets/stylesheets/cm_admin/components/_input.scss +274 -0
  27. data/app/assets/stylesheets/cm_admin/components/_modal.scss +34 -0
  28. data/app/assets/stylesheets/cm_admin/components/_range.scss +20 -0
  29. data/app/assets/stylesheets/cm_admin/components/_status-tag.scss +67 -0
  30. data/app/assets/stylesheets/cm_admin/components/index.scss +7 -0
  31. data/app/assets/stylesheets/cm_admin/dependency/bootstrap.min.css +7 -0
  32. data/app/assets/stylesheets/cm_admin/helpers/_mixins.scss +20 -0
  33. data/app/assets/stylesheets/cm_admin/helpers/_variable.scss +86 -0
  34. data/app/assets/stylesheets/cm_admin/helpers/index.scss +2 -0
  35. data/app/controllers/cm_admin/application_controller.rb +6 -0
  36. data/app/controllers/cm_admin/exports_controller.rb +16 -0
  37. data/app/controllers/cm_admin/main_controller.rb +8 -0
  38. data/app/helpers/cm_admin/application_helper.rb +11 -0
  39. data/app/javascript/packs/cm_admin/application.js +9 -0
  40. data/app/javascript/packs/cm_admin/filters.js +32 -0
  41. data/app/javascript/packs/cm_admin/scaffolds.js +14 -0
  42. data/app/views/cm_admin/main/_cm_pagy_nav.html.slim +23 -0
  43. data/app/views/cm_admin/main/_filters.html.slim +10 -0
  44. data/app/views/cm_admin/main/_table.html.slim +59 -0
  45. data/app/views/cm_admin/main/_top_navbar.html.slim +25 -0
  46. data/app/views/cm_admin/main/dashboard.html.slim +1 -0
  47. data/app/views/cm_admin/main/edit.html.slim +19 -0
  48. data/app/views/cm_admin/main/index.html.slim +9 -0
  49. data/app/views/cm_admin/main/new.html.slim +22 -0
  50. data/app/views/cm_admin/main/show.html.slim +13 -0
  51. data/app/views/layouts/_left_sidebar_nav.html.slim +30 -0
  52. data/app/views/layouts/cm_admin.html.slim +18 -0
  53. data/bin/console +1 -0
  54. data/bin/webpack +18 -0
  55. data/bin/webpack-dev-server +18 -0
  56. data/cm_admin.gemspec +20 -31
  57. data/{lib → config}/.DS_Store +0 -0
  58. data/config/initializers/active_record_extension.rb +9 -0
  59. data/config/routes.rb +18 -0
  60. data/config/webpack/development.js +5 -0
  61. data/config/webpack/environment.js +12 -0
  62. data/config/webpack/production.js +5 -0
  63. data/config/webpack/test.js +5 -0
  64. data/config/webpacker.yml +92 -0
  65. data/lib/c.png +0 -0
  66. data/lib/cm_admin.rb +31 -2
  67. data/lib/cm_admin/constants.rb +33 -0
  68. data/lib/cm_admin/engine.rb +38 -0
  69. data/lib/cm_admin/model.rb +262 -0
  70. data/lib/cm_admin/models/action.rb +22 -0
  71. data/lib/cm_admin/models/actions/blocks.rb +25 -0
  72. data/lib/cm_admin/models/blocks.rb +19 -0
  73. data/lib/cm_admin/models/column.rb +16 -0
  74. data/lib/cm_admin/models/export.rb +43 -0
  75. data/lib/cm_admin/models/field.rb +14 -0
  76. data/lib/cm_admin/models/filter.rb +30 -0
  77. data/lib/cm_admin/utils.rb +67 -0
  78. data/lib/cm_admin/version.rb +1 -1
  79. data/lib/cm_admin/view_helpers.rb +72 -0
  80. data/lib/cm_admin/view_helpers/field_column_helper.rb +23 -0
  81. data/lib/cm_admin/view_helpers/form_field_helper.rb +16 -0
  82. data/lib/cm_admin/view_helpers/form_helper.rb +55 -0
  83. data/lib/cm_admin/view_helpers/navigation_helper.rb +18 -0
  84. data/lib/cm_admin/view_helpers/page_info_helper.rb +21 -0
  85. data/lib/generators/cm_admin/install_generator.rb +10 -32
  86. data/lib/generators/cm_admin/templates/cm_admin_initializer.rb +4 -0
  87. data/lib/tasks/webpack_install.rake +63 -0
  88. data/package.json +18 -0
  89. data/postcss.config.js +12 -0
  90. data/yarn-error.log +44 -0
  91. data/yarn.lock +6903 -0
  92. metadata +123 -48
  93. data/CODE_OF_CONDUCT.md +0 -74
  94. data/lib/generators/cm_admin/USAGE +0 -8
  95. data/lib/generators/cm_admin/templates/assets/images/cm.png +0 -0
  96. data/lib/generators/cm_admin/templates/assets/stylesheets/application.css.scss +0 -33
  97. data/lib/generators/cm_admin/templates/assets/stylesheets/base/_variable.scss +0 -14
  98. data/lib/generators/cm_admin/templates/assets/stylesheets/base/form.scss +0 -125
  99. data/lib/generators/cm_admin/templates/assets/stylesheets/base/input-styles.scss +0 -72
  100. data/lib/generators/cm_admin/templates/assets/stylesheets/base/main-nav.scss +0 -79
  101. data/lib/generators/cm_admin/templates/assets/stylesheets/base/scaffold.scss +0 -95
  102. data/lib/generators/cm_admin/templates/assets/stylesheets/base/show.scss +0 -88
  103. data/lib/generators/cm_admin/templates/assets/stylesheets/base/sidebar.scss +0 -69
  104. data/lib/generators/cm_admin/templates/assets/stylesheets/base/table.scss +0 -246
  105. data/lib/generators/cm_admin/templates/layouts/_navbar.html.slim +0 -8
  106. data/lib/generators/cm_admin/templates/layouts/_side_navbar.html.slim +0 -12
  107. data/lib/generators/cm_admin/templates/layouts/application.html.slim +0 -20
  108. data/lib/generators/cm_admin/templates/layouts/initializer.rb +0 -2
  109. data/lib/generators/cm_admin/templates/views/_form.erb +0 -67
  110. data/lib/generators/cm_admin/templates/views/_table.erb +0 -22
  111. data/lib/generators/cm_admin/templates/views/edit.erb +0 -10
  112. data/lib/generators/cm_admin/templates/views/index.erb +0 -11
  113. data/lib/generators/cm_admin/templates/views/new.erb +0 -10
  114. data/lib/generators/cm_admin/templates/views/reset_password.erb +0 -12
  115. data/lib/generators/cm_admin/templates/views/show.erb +0 -18
  116. data/lib/generators/cm_admin/templates/views/sign_in.erb +0 -18
  117. data/lib/generators/cm_admin/view_generator.rb +0 -78
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 208e7113a6556a94cdba5289db7d672f6ba3443189c49789fc4f3c95d6a14dc2
4
- data.tar.gz: b9201bb6da693871e2a3708bb8ac76ba352ee68b92c58413bd17038225b39ca9
3
+ metadata.gz: 35f20e9b85e2ad48730aed1d0f2a9ad1a56d03c951969b85270f74b00990f725
4
+ data.tar.gz: 03533bffdcf8d85c46c39d50ef1f011200526e6d5d6b937e82ddfd350d1a2a48
5
5
  SHA512:
6
- metadata.gz: 8b6937bc74d0aebd0220271d096b914e70183af91fa5ec2908d3d16b32afebb97d5a1fad1f049d2234f308b27e9a843a1b4a5df649290897c20dc4635217d870
7
- data.tar.gz: 65146543054360dec133299268ae94e8579403d4a962c031835d449199dd7009271b85c31d59c8b46a42507e1ed41ad85d19dae953135789a9f10f5a488f5e28
6
+ metadata.gz: bf6a9cecd5793c32dd963973bd1196413f8c997918501934afd5c8cebf2738565e57876e76afef4a5b3e7b0c4f4d71d3ebf20ea0d291524f2c56f08013781429
7
+ data.tar.gz: 287eab8c29339f326b6e70b5255b62d2762eb9439866e879f2454458273a8a38fb55e345f1a11fb9a695a86f5da282c8b3d5a792618bb444550d8af7074d1728
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ node_modules/
10
+ public/cm-admin-packs/
11
+ # rspec failure tracking
12
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ ---
2
+ language: ruby
3
+ cache: bundler
4
+ rvm:
5
+ - 2.7.2
6
+ before_install: gem install bundler -v 2.1.4
data/Gemfile CHANGED
@@ -1,4 +1,9 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- # Specify your gem's dependencies in cm_coupon.gemspec
3
+ gem 'pagy'
4
+ gem 'slim'
5
+ gem "rake", "~> 12.0"
6
+ gem "rspec", "~> 3.0"
7
+
8
+ # Specify your gem's dependencies in cm_admin.gemspec
4
9
  gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,118 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ cm_admin (0.1.0)
5
+ axlsx_rails (~> 0.6.1)
6
+ pagy (~> 3.13)
7
+ slim (~> 4.1.0)
8
+ webpacker (~> 5.2.1)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ actionpack (6.1.3.2)
14
+ actionview (= 6.1.3.2)
15
+ activesupport (= 6.1.3.2)
16
+ rack (~> 2.0, >= 2.0.9)
17
+ rack-test (>= 0.6.3)
18
+ rails-dom-testing (~> 2.0)
19
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
20
+ actionview (6.1.3.2)
21
+ activesupport (= 6.1.3.2)
22
+ builder (~> 3.1)
23
+ erubi (~> 1.4)
24
+ rails-dom-testing (~> 2.0)
25
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
26
+ activesupport (6.1.3.2)
27
+ concurrent-ruby (~> 1.0, >= 1.0.2)
28
+ i18n (>= 1.6, < 2)
29
+ minitest (>= 5.1)
30
+ tzinfo (~> 2.0)
31
+ zeitwerk (~> 2.3)
32
+ axlsx_rails (0.6.1)
33
+ actionpack (>= 3.1)
34
+ caxlsx (>= 3.0)
35
+ builder (3.2.4)
36
+ caxlsx (3.1.0)
37
+ htmlentities (~> 4.3, >= 4.3.4)
38
+ marcel (~> 1.0)
39
+ nokogiri (~> 1.10, >= 1.10.4)
40
+ rubyzip (>= 1.3.0, < 3)
41
+ concurrent-ruby (1.1.9)
42
+ crass (1.0.6)
43
+ diff-lcs (1.4.4)
44
+ erubi (1.10.0)
45
+ htmlentities (4.3.4)
46
+ i18n (1.8.10)
47
+ concurrent-ruby (~> 1.0)
48
+ loofah (2.10.0)
49
+ crass (~> 1.0.2)
50
+ nokogiri (>= 1.5.9)
51
+ marcel (1.0.1)
52
+ method_source (1.0.0)
53
+ mini_portile2 (2.5.3)
54
+ minitest (5.14.4)
55
+ nokogiri (1.11.7)
56
+ mini_portile2 (~> 2.5.0)
57
+ racc (~> 1.4)
58
+ pagy (3.13.0)
59
+ racc (1.5.2)
60
+ rack (2.2.3)
61
+ rack-proxy (0.7.0)
62
+ rack
63
+ rack-test (1.1.0)
64
+ rack (>= 1.0, < 3)
65
+ rails-dom-testing (2.0.3)
66
+ activesupport (>= 4.2.0)
67
+ nokogiri (>= 1.6)
68
+ rails-html-sanitizer (1.3.0)
69
+ loofah (~> 2.3)
70
+ railties (6.1.3.2)
71
+ actionpack (= 6.1.3.2)
72
+ activesupport (= 6.1.3.2)
73
+ method_source
74
+ rake (>= 0.8.7)
75
+ thor (~> 1.0)
76
+ rake (12.3.3)
77
+ rspec (3.10.0)
78
+ rspec-core (~> 3.10.0)
79
+ rspec-expectations (~> 3.10.0)
80
+ rspec-mocks (~> 3.10.0)
81
+ rspec-core (3.10.1)
82
+ rspec-support (~> 3.10.0)
83
+ rspec-expectations (3.10.1)
84
+ diff-lcs (>= 1.2.0, < 2.0)
85
+ rspec-support (~> 3.10.0)
86
+ rspec-mocks (3.10.2)
87
+ diff-lcs (>= 1.2.0, < 2.0)
88
+ rspec-support (~> 3.10.0)
89
+ rspec-support (3.10.2)
90
+ rubyzip (2.3.0)
91
+ semantic_range (3.0.0)
92
+ slim (4.1.0)
93
+ temple (>= 0.7.6, < 0.9)
94
+ tilt (>= 2.0.6, < 2.1)
95
+ temple (0.8.2)
96
+ thor (1.1.0)
97
+ tilt (2.0.10)
98
+ tzinfo (2.0.4)
99
+ concurrent-ruby (~> 1.0)
100
+ webpacker (5.2.2)
101
+ activesupport (>= 5.2)
102
+ rack-proxy (>= 0.6.1)
103
+ railties (>= 5.2)
104
+ semantic_range (>= 2.3.0)
105
+ zeitwerk (2.4.2)
106
+
107
+ PLATFORMS
108
+ ruby
109
+
110
+ DEPENDENCIES
111
+ cm_admin!
112
+ pagy
113
+ rake (~> 12.0)
114
+ rspec (~> 3.0)
115
+ slim
116
+
117
+ BUNDLED WITH
118
+ 2.1.4
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 sajinmp
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,12 +1,6 @@
1
1
  # CmAdmin
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/cm_admin`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- First create a new rails project with the following command. If you are adding to existing project skip this
6
-
7
- ```
8
- rails new blog -m https://raw.githubusercontent.com/commutatus/cm-rails-template/devise_integration/template.rb
9
- ```
3
+ New CmAdmin gem
10
4
 
11
5
  ## Installation
12
6
 
@@ -18,44 +12,19 @@ gem 'cm_admin'
18
12
 
19
13
  And then execute:
20
14
 
21
- $ bundle
15
+ $ bundle install
22
16
 
23
17
  Or install it yourself as:
24
18
 
25
19
  $ gem install cm_admin
26
20
 
27
- Assuming we have a model created already or we can create one
28
-
29
- $ rails g user first_name:string last_name:string
30
-
31
-
32
21
  ## Usage
33
22
 
34
- For copying layout such as CSS and the layout files
23
+ Install the gem
35
24
 
36
25
  $ rails g cm_admin:install
37
26
 
38
- For generating the index page views
39
-
40
- $ rails g cm_admin:view products index title description
41
-
42
- For generating the show page views
43
-
44
- $ rails g cm_admin:view products show title description
45
-
46
- For generating the form page views
47
- $ rails g cm_admin:view products form column_name:field_type
48
- $ rails g cm_admin:view products form title:string description:string
49
-
50
- Following field types are acceted
51
-
52
- * input-integer
53
- * input-string
54
- * single-select
55
- * multi-select
56
- * checkbox
57
- * radio
58
-
27
+ This will generate an initializer which contains the basic setup. This also includes a layout called `admin` which can be used in the application.
59
28
 
60
29
  ## Development
61
30
 
@@ -65,12 +34,9 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
65
34
 
66
35
  ## Contributing
67
36
 
68
- Bug reports and pull requests are welcome on GitHub at https://github.com/commutatus/cm-admin. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
37
+ Bug reports and pull requests are welcome on [GitHub](https://github.com/commutatus/cm-admin).
38
+
69
39
 
70
40
  ## License
71
41
 
72
42
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
73
-
74
- ## Code of Conduct
75
-
76
- Everyone interacting in the CmAdmin project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/cm-admin/blob/master/CODE_OF_CONDUCT.md).
Binary file
@@ -1,4 +1,4 @@
1
- @import "_variable.scss";
1
+ @import '../helpers/index.scss';
2
2
 
3
3
  .auth {
4
4
  display: flex;
@@ -42,14 +42,25 @@
42
42
 
43
43
  .get-start-btn {
44
44
  width: 100%;
45
+ padding: 8px;
46
+ @include font($size: $t4-text, $color: $white);
47
+ background: linear-gradient(to right, $brand-color 50%, transparent 50%);
48
+ background-size: 200% 100%;
49
+ background-position: right bottom;
50
+ border: 1px solid $white;
51
+ border-radius: $radius-4;
52
+ @include transition-linear;
53
+ &:hover {
54
+ background-position: left bottom;
55
+ border-color: $brand-color;
56
+ }
45
57
  }
46
58
 
47
59
  .forgot-password {
48
60
  margin-bottom: 8px;
49
61
  text-align: right;
50
62
  a {
51
- color: #20b5ff;
52
- font-size: 14px;
63
+ @include font($size: $t4-text, $color: $brand-color);
53
64
  }
54
65
  }
55
66
 
@@ -58,11 +69,10 @@
58
69
  width: 100%;
59
70
  height: 39px;
60
71
  padding: 6px 12px;
61
- font-size: 16px;
62
- color: #555555;
72
+ @include font($size: $t3-text, $color: #555555);
63
73
  background-color: $white;
64
74
  border: 1px solid #ccc;
65
- border-radius: 2px;
75
+ border-radius: $radius-2;
66
76
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
67
77
  transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
68
78
  &:focus {
@@ -0,0 +1,237 @@
1
+ @import "../helpers/index.scss";
2
+
3
+ @function size($size) {
4
+ @return map-get($font-size, $size);
5
+ }
6
+
7
+ @function weight($weight) {
8
+ @return map-get($font-weight, $weight);
9
+ }
10
+
11
+ /* common popup styles */
12
+ .popup-card {
13
+ position: absolute;
14
+ background-color: $white;
15
+ filter: drop-shadow(0px 4px 16px rgba(0, 0, 0, 0.16));
16
+ border-radius: $radius-4;
17
+ z-index: 1;
18
+ &.table-export-popup {
19
+ top: 50px;
20
+ right: 10px;
21
+ width: 156px;
22
+ padding: 8px 0;
23
+ animation: fadeIn .2s ease-in-out;
24
+ .popup-option {
25
+ padding: 8px 16px;
26
+ @include font($size: $t4-text, $color: $primary-text-clr);
27
+ line-height: 22px;
28
+ transition: all .2s linear;
29
+ cursor: pointer;
30
+ &:hover {
31
+ background-color: $grey-lighter-clr;
32
+ }
33
+ span {
34
+ margin-right: 8px;
35
+ }
36
+ }
37
+ }
38
+ }
39
+
40
+ /* text alignment styles */
41
+ .text-right {
42
+ text-align: right;
43
+ }
44
+
45
+ .text-center {
46
+ text-align: center !important;
47
+ }
48
+
49
+ .text-left {
50
+ text-align: left;
51
+ }
52
+
53
+ /* typography styles */
54
+ .f12 {
55
+ font-size: size(12);
56
+ }
57
+ .f14 {
58
+ font-size: size(14) !important;
59
+ }
60
+ .f16 {
61
+ font-size: size(16);
62
+ }
63
+ .f20 {
64
+ font-size: size(20);
65
+ }
66
+ .f24 {
67
+ font-size: size(24);
68
+ }
69
+ .bold {
70
+ font-weight: weight(bold);
71
+ }
72
+ .bolder {
73
+ font-weight: weight(bolder) !important;
74
+ }
75
+
76
+ /* padding styles */
77
+
78
+ // @for $i from 1 to 39 {
79
+ // .p-#{$i} {
80
+ // padding: #{$i}px !important;
81
+ // }
82
+ // .pb-#{$i} {
83
+ // padding-bottom: #{$i}px !important;
84
+ // }
85
+ // .pt-#{$i} {
86
+ // padding-top: #{$i}px !important;
87
+ // }
88
+ // }
89
+
90
+ // @for $i from 1 to 21 {
91
+ // .pr-#{$i*2} {
92
+ // padding-right: #{$i*2}px !important;
93
+ // }
94
+ // .pl-#{$i*2} {
95
+ // padding-left: #{$i*2}px !important;
96
+ // }
97
+ // }
98
+
99
+ /* margin styles */
100
+ .m-auto {
101
+ margin: auto;
102
+ }
103
+ .mt-10 {
104
+ margin-top: 10px;
105
+ }
106
+ .mt-20 {
107
+ margin-top: 20px;
108
+ }
109
+ .mt-50 {
110
+ margin-top: 50px;
111
+ }
112
+ .mb-10 {
113
+ margin-bottom: 20px;
114
+ }
115
+ .mb-24 {
116
+ margin-bottom: 24px;
117
+ }
118
+
119
+ .mr-10 {
120
+ margin-right: 10px;
121
+ }
122
+ .mr-20 {
123
+ margin-right: 20px;
124
+ }
125
+
126
+ .ml-10 {
127
+ margin-left: 10px;
128
+ }
129
+ .ml-20 {
130
+ margin-left: 20px;
131
+ }
132
+ .ml-35 {
133
+ margin-left: 35px;
134
+ }
135
+
136
+ /* width styles in pixel */
137
+ .w-120 {
138
+ width: 120px;
139
+ }
140
+ .w-130 {
141
+ width: 130px;
142
+ }
143
+ .w-160 {
144
+ width: 160px;
145
+ }
146
+ .w-400 {
147
+ width: 400px !important;
148
+ }
149
+ .w-500 {
150
+ width: 500px;
151
+ }
152
+ .w-600 {
153
+ width: 600px;
154
+ }
155
+
156
+ /* width styles in % */
157
+ .w100 {
158
+ width: 100% !important;
159
+ }
160
+
161
+ /* border styles */
162
+ .circular-border {
163
+ border-radius: $circle;
164
+ }
165
+ .border-top {
166
+ border-top: 1px solid #ccc;
167
+ }
168
+ .border-bottom {
169
+ border-bottom: 1px solid #ccc;
170
+ }
171
+
172
+ //common styles gose here
173
+ .active {
174
+ a {
175
+ color: white !important;
176
+ }
177
+ }
178
+
179
+ .hidden {
180
+ display: none !important;
181
+ }
182
+
183
+ .pointer {
184
+ cursor: pointer;
185
+ }
186
+
187
+ .error-text {
188
+ font-size: 14px;
189
+ color: $error-clr;
190
+ margin: 5px 0;
191
+ animation: shakeError 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
192
+ transform: translate3d(0, 0, 0);
193
+ backface-visibility: hidden;
194
+ perspective: 1000px;
195
+ }
196
+
197
+ .required-symbol {
198
+ color: $brand-color;
199
+ margin-left: 2px;
200
+ }
201
+
202
+ .text-ellipsis {
203
+ overflow: hidden;
204
+ text-overflow: ellipsis;
205
+ }
206
+
207
+ @keyframes shakeError {
208
+ 10%,
209
+ 90% {
210
+ transform: translate3d(-1px, 0, 0);
211
+ }
212
+
213
+ 20%,
214
+ 80% {
215
+ transform: translate3d(2px, 0, 0);
216
+ }
217
+
218
+ 30%,
219
+ 50%,
220
+ 70% {
221
+ transform: translate3d(-4px, 0, 0);
222
+ }
223
+
224
+ 40%,
225
+ 60% {
226
+ transform: translate3d(4px, 0, 0);
227
+ }
228
+ }
229
+
230
+ @keyframes fadeIn {
231
+ from {
232
+ opacity: 0;
233
+ }
234
+ to {
235
+ opacity: 1;
236
+ }
237
+ }