cm-admin 0.1.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) 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 +7 -1
  6. data/Gemfile.lock +121 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +20 -21
  9. data/app/assets/images/logo.png +0 -0
  10. data/app/assets/stylesheets/cm_admin/base/auth.scss +73 -0
  11. data/app/assets/stylesheets/cm_admin/base/common.scss +237 -0
  12. data/app/assets/stylesheets/cm_admin/base/filters.scss +200 -0
  13. data/app/assets/stylesheets/cm_admin/base/form.scss +197 -0
  14. data/app/assets/stylesheets/cm_admin/base/main-nav.scss +47 -0
  15. data/app/assets/stylesheets/cm_admin/base/navbar.scss +65 -0
  16. data/app/assets/stylesheets/cm_admin/base/quicksearch.scss +76 -0
  17. data/app/assets/stylesheets/cm_admin/base/scaffold.scss +96 -0
  18. data/app/assets/stylesheets/cm_admin/base/show.scss +76 -0
  19. data/app/assets/stylesheets/cm_admin/base/sidebar.scss +225 -0
  20. data/app/assets/stylesheets/cm_admin/base/table.scss +320 -0
  21. data/app/assets/stylesheets/cm_admin/base/tabs.scss +26 -0
  22. data/{lib/generators/cm_admin/templates/assets/stylesheets/application.css.scss → app/assets/stylesheets/cm_admin/cm_admin.css.scss} +12 -16
  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 +153 -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 +31 -0
  29. data/app/assets/stylesheets/cm_admin/components/_status-tag.scss +68 -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 +87 -0
  34. data/app/assets/stylesheets/cm_admin/helpers/index.scss +2 -0
  35. data/app/controllers/cm_admin/application_controller.rb +11 -0
  36. data/app/controllers/cm_admin/exports_controller.rb +16 -0
  37. data/app/controllers/cm_admin/static_controller.rb +12 -0
  38. data/app/helpers/cm_admin/application_helper.rb +11 -0
  39. data/app/helpers/cm_admin/custom_helper.rb +4 -0
  40. data/app/javascript/packs/cm_admin/application.js +22 -0
  41. data/app/javascript/packs/cm_admin/filters.js +347 -0
  42. data/app/javascript/packs/cm_admin/quick_search.js +67 -0
  43. data/app/javascript/packs/cm_admin/scaffolds.js +43 -0
  44. data/app/javascript/stylesheets/cm_admin/application.scss +3 -0
  45. data/app/views/cm_admin/main/_associated_table.html.slim +60 -0
  46. data/app/views/cm_admin/main/_cm_pagy_nav.html.slim +23 -0
  47. data/app/views/cm_admin/main/_filters.html.slim +1 -0
  48. data/app/views/cm_admin/main/_nested_fields.html.slim +7 -0
  49. data/app/views/cm_admin/main/_nested_table_form.html.slim +6 -0
  50. data/app/views/cm_admin/main/_table.html.slim +60 -0
  51. data/app/views/cm_admin/main/_tabs.html.slim +5 -0
  52. data/app/views/cm_admin/main/_top_navbar.html.slim +25 -0
  53. data/app/views/cm_admin/main/associated_index.html.slim +6 -0
  54. data/app/views/cm_admin/main/associated_show.html.slim +6 -0
  55. data/app/views/cm_admin/main/dashboard.html.slim +1 -0
  56. data/app/views/cm_admin/main/edit.html.slim +19 -0
  57. data/app/views/cm_admin/main/index.html.slim +12 -0
  58. data/app/views/cm_admin/main/new.html.slim +22 -0
  59. data/app/views/cm_admin/main/show.html.slim +12 -0
  60. data/app/views/cm_admin/static/error_401.html.slim +4 -0
  61. data/app/views/layouts/_left_sidebar_nav.html.slim +34 -0
  62. data/app/views/layouts/_quick_links.html.slim +25 -0
  63. data/app/views/layouts/cm_admin.html.slim +41 -0
  64. data/app/views/layouts/static.html.slim +18 -0
  65. data/bin/webpack +18 -0
  66. data/bin/webpack-dev-server +18 -0
  67. data/cm_admin.gemspec +21 -31
  68. data/config/.DS_Store +0 -0
  69. data/config/initializers/active_record_extension.rb +9 -0
  70. data/config/routes.rb +19 -0
  71. data/config/webpack/development.js +5 -0
  72. data/config/webpack/environment.js +13 -0
  73. data/config/webpack/production.js +5 -0
  74. data/config/webpack/test.js +5 -0
  75. data/config/webpacker.yml +92 -0
  76. data/lib/cm_admin/constants.rb +33 -0
  77. data/lib/cm_admin/engine.rb +38 -0
  78. data/lib/cm_admin/model.rb +152 -0
  79. data/lib/cm_admin/models/action.rb +36 -0
  80. data/lib/cm_admin/models/actions/blocks.rb +25 -0
  81. data/lib/cm_admin/models/blocks.rb +19 -0
  82. data/lib/cm_admin/models/cm_show_section.rb +20 -0
  83. data/lib/cm_admin/models/column.rb +61 -0
  84. data/lib/cm_admin/models/controller_method.rb +75 -0
  85. data/lib/cm_admin/models/dsl_method.rb +122 -0
  86. data/lib/cm_admin/models/export.rb +54 -0
  87. data/lib/cm_admin/models/field.rb +15 -0
  88. data/lib/cm_admin/models/filter.rb +95 -0
  89. data/lib/cm_admin/models/form_field.rb +21 -0
  90. data/lib/cm_admin/models/tab.rb +13 -0
  91. data/lib/cm_admin/utils.rb +67 -0
  92. data/lib/cm_admin/version.rb +1 -1
  93. data/lib/cm_admin/view_helpers/column_field_helper.rb +29 -0
  94. data/lib/cm_admin/view_helpers/field_display_helper.rb +65 -0
  95. data/lib/cm_admin/view_helpers/filter_helper.rb +190 -0
  96. data/lib/cm_admin/view_helpers/form_field_helper.rb +33 -0
  97. data/lib/cm_admin/view_helpers/form_helper.rb +65 -0
  98. data/lib/cm_admin/view_helpers/manage_column_popup_helper.rb +75 -0
  99. data/lib/cm_admin/view_helpers/navigation_helper.rb +34 -0
  100. data/lib/cm_admin/view_helpers/page_info_helper.rb +57 -0
  101. data/lib/cm_admin/view_helpers.rb +74 -0
  102. data/lib/cm_admin.rb +33 -2
  103. data/lib/generators/cm_admin/install_generator.rb +11 -13
  104. data/lib/tasks/webpack_install.rake +63 -0
  105. data/package.json +23 -0
  106. data/postcss.config.js +12 -0
  107. data/tmp/cache/webpacker/last-compilation-digest-development +1 -0
  108. data/yarn.lock +6933 -0
  109. metadata +155 -42
  110. data/lib/generators/cm_admin/USAGE +0 -8
  111. data/lib/generators/cm_admin/templates/assets/images/same-logo.png +0 -0
  112. data/lib/generators/cm_admin/templates/assets/stylesheets/_variable.scss +0 -11
  113. data/lib/generators/cm_admin/templates/assets/stylesheets/alignment.scss +0 -111
  114. data/lib/generators/cm_admin/templates/assets/stylesheets/devise.scss +0 -98
  115. data/lib/generators/cm_admin/templates/assets/stylesheets/form.scss +0 -131
  116. data/lib/generators/cm_admin/templates/assets/stylesheets/products.scss +0 -21
  117. data/lib/generators/cm_admin/templates/assets/stylesheets/scaffold.scss +0 -241
  118. data/lib/generators/cm_admin/templates/assets/stylesheets/table.scss +0 -90
  119. data/lib/generators/cm_admin/templates/assets/stylesheets/user.scss +0 -25
  120. data/lib/generators/cm_admin/templates/layouts/_navbar.html.slim +0 -9
  121. data/lib/generators/cm_admin/templates/layouts/_side_navbar.html.slim +0 -16
  122. data/lib/generators/cm_admin/templates/layouts/application.html.slim +0 -25
  123. data/lib/generators/cm_admin/templates/layouts/initializer.rb +0 -2
  124. data/lib/generators/cm_admin/templates/views/_filters.html.slim +0 -0
  125. data/lib/generators/cm_admin/templates/views/_form.erb +0 -38
  126. data/lib/generators/cm_admin/templates/views/_table.erb +0 -14
  127. data/lib/generators/cm_admin/templates/views/index.erb +0 -11
  128. data/lib/generators/cm_admin/templates/views/show.erb +0 -8
  129. data/lib/generators/cm_admin/view_generator.rb +0 -57
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f72a2d04ff945602246fef73d1d261915da0aa6ad1f7948fccac7ccbc9d5405b
4
- data.tar.gz: 3b4c483d404aca09b19fae04979afb1a0e13522a67624e8513c86d9f231e63c6
3
+ metadata.gz: b468292084cb503cdffd0306b66b2d30eabe67f59f3b05037418eba24ed5cc21
4
+ data.tar.gz: 876b6dc6bf6a003cc4a792cdaf9071737b90b29abe6ba175401f0d63af58fe9b
5
5
  SHA512:
6
- metadata.gz: 643aeabbb0a12109c48dd69fdc93c746939b89d75efa5bc44b7cbe9aa110d5e41676659ee53c7b752449a2ccca5a82a870efe029b1c7eed86f75469cb0dfb540
7
- data.tar.gz: a0cc12c6c5b664e7cd9fdc14cc084708a6b6f1bd5692bd7f8202d7b26d7f6a46b95fc6cee0b84f91d1c7b493e31450eeae335650d99782fbac8fe8a82daf7ac5
6
+ metadata.gz: d526d75a25af290a0564fb45beb2c4d59fe31990a8fde29396b2ffbc01d9b46753ea0484e36364bb43a84f7c05d4c8d79de633a875df2fdb2e8888a1f098091d
7
+ data.tar.gz: d966acb8de4162bdf5dd7cf5e2022d3ce7f0b0451e3c50f73a5dfa6ef8d56804f8f5d0df724895068926dd567322c0d2ebc66eabeb6227f6a69d8df3506876d4
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,10 @@
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
+ gem 'cocoon'
8
+
9
+ # Specify your gem's dependencies in cm_admin.gemspec
4
10
  gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,121 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ cm-admin (0.3.0)
5
+ axlsx_rails (~> 0.6.1)
6
+ cocoon (~> 1.2.15)
7
+ pagy (~> 3.13)
8
+ slim (~> 4.1.0)
9
+ webpacker (~> 5.2.1)
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ actionpack (6.1.4.1)
15
+ actionview (= 6.1.4.1)
16
+ activesupport (= 6.1.4.1)
17
+ rack (~> 2.0, >= 2.0.9)
18
+ rack-test (>= 0.6.3)
19
+ rails-dom-testing (~> 2.0)
20
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
21
+ actionview (6.1.4.1)
22
+ activesupport (= 6.1.4.1)
23
+ builder (~> 3.1)
24
+ erubi (~> 1.4)
25
+ rails-dom-testing (~> 2.0)
26
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
27
+ activesupport (6.1.4.1)
28
+ concurrent-ruby (~> 1.0, >= 1.0.2)
29
+ i18n (>= 1.6, < 2)
30
+ minitest (>= 5.1)
31
+ tzinfo (~> 2.0)
32
+ zeitwerk (~> 2.3)
33
+ axlsx_rails (0.6.1)
34
+ actionpack (>= 3.1)
35
+ caxlsx (>= 3.0)
36
+ builder (3.2.4)
37
+ caxlsx (3.1.0)
38
+ htmlentities (~> 4.3, >= 4.3.4)
39
+ marcel (~> 1.0)
40
+ nokogiri (~> 1.10, >= 1.10.4)
41
+ rubyzip (>= 1.3.0, < 3)
42
+ cocoon (1.2.15)
43
+ concurrent-ruby (1.1.9)
44
+ crass (1.0.6)
45
+ diff-lcs (1.4.4)
46
+ erubi (1.10.0)
47
+ htmlentities (4.3.4)
48
+ i18n (1.8.10)
49
+ concurrent-ruby (~> 1.0)
50
+ loofah (2.12.0)
51
+ crass (~> 1.0.2)
52
+ nokogiri (>= 1.5.9)
53
+ marcel (1.0.1)
54
+ method_source (1.0.0)
55
+ mini_portile2 (2.6.1)
56
+ minitest (5.14.4)
57
+ nokogiri (1.12.4)
58
+ mini_portile2 (~> 2.6.1)
59
+ racc (~> 1.4)
60
+ pagy (3.14.0)
61
+ racc (1.5.2)
62
+ rack (2.2.3)
63
+ rack-proxy (0.7.0)
64
+ rack
65
+ rack-test (1.1.0)
66
+ rack (>= 1.0, < 3)
67
+ rails-dom-testing (2.0.3)
68
+ activesupport (>= 4.2.0)
69
+ nokogiri (>= 1.6)
70
+ rails-html-sanitizer (1.4.2)
71
+ loofah (~> 2.3)
72
+ railties (6.1.4.1)
73
+ actionpack (= 6.1.4.1)
74
+ activesupport (= 6.1.4.1)
75
+ method_source
76
+ rake (>= 0.13)
77
+ thor (~> 1.0)
78
+ rake (12.3.3)
79
+ rspec (3.10.0)
80
+ rspec-core (~> 3.10.0)
81
+ rspec-expectations (~> 3.10.0)
82
+ rspec-mocks (~> 3.10.0)
83
+ rspec-core (3.10.1)
84
+ rspec-support (~> 3.10.0)
85
+ rspec-expectations (3.10.1)
86
+ diff-lcs (>= 1.2.0, < 2.0)
87
+ rspec-support (~> 3.10.0)
88
+ rspec-mocks (3.10.2)
89
+ diff-lcs (>= 1.2.0, < 2.0)
90
+ rspec-support (~> 3.10.0)
91
+ rspec-support (3.10.2)
92
+ rubyzip (2.3.2)
93
+ semantic_range (3.0.0)
94
+ slim (4.1.0)
95
+ temple (>= 0.7.6, < 0.9)
96
+ tilt (>= 2.0.6, < 2.1)
97
+ temple (0.8.2)
98
+ thor (1.1.0)
99
+ tilt (2.0.10)
100
+ tzinfo (2.0.4)
101
+ concurrent-ruby (~> 1.0)
102
+ webpacker (5.2.2)
103
+ activesupport (>= 5.2)
104
+ rack-proxy (>= 0.6.1)
105
+ railties (>= 5.2)
106
+ semantic_range (>= 2.3.0)
107
+ zeitwerk (2.4.2)
108
+
109
+ PLATFORMS
110
+ ruby
111
+
112
+ DEPENDENCIES
113
+ cm-admin!
114
+ cocoon
115
+ pagy
116
+ rake (~> 12.0)
117
+ rspec (~> 3.0)
118
+ slim
119
+
120
+ BUNDLED WITH
121
+ 2.2.17
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,20 +12,15 @@ 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
 
@@ -43,10 +32,23 @@ For generating the show page views
43
32
 
44
33
  $ rails g cm_admin:view products show title description
45
34
 
46
- For generating the index page views
47
-
35
+ For generating the form page views
36
+ $ rails g cm_admin:view products form column_name:field_type
48
37
  $ rails g cm_admin:view products form title:string description:string
49
38
 
39
+ Following field types are acceted
40
+
41
+ * input-integer
42
+ * input-string
43
+ * single-select
44
+ * multi-select
45
+ * checkbox
46
+ * radio
47
+
48
+ ## Usage
49
+
50
+ For demo check [here](http://cm-admin.labs.commutatus.com/admin/users/)
51
+
50
52
  ## Development
51
53
 
52
54
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -55,12 +57,9 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
55
57
 
56
58
  ## Contributing
57
59
 
58
- 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.
60
+ Bug reports and pull requests are welcome on [GitHub](https://github.com/commutatus/cm-admin).
61
+
59
62
 
60
63
  ## License
61
64
 
62
65
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
63
-
64
- ## Code of Conduct
65
-
66
- 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
@@ -0,0 +1,73 @@
1
+ @import '../helpers/index.scss';
2
+
3
+ .auth {
4
+ display: flex;
5
+ justify-content: center;
6
+ align-items: center;
7
+ width: 100%;
8
+ height: 100vh;
9
+ background-color: #1b1d1f;
10
+ &__form-inner {
11
+ width: 450px;
12
+ max-width: 450px;
13
+ margin: 0 auto;
14
+ .header-log {
15
+ text-align: center;
16
+ img {
17
+ width: 250px;
18
+ }
19
+ }
20
+ .header-title {
21
+ margin: 30px 0;
22
+ letter-spacing: 2px;
23
+ text-align: center;
24
+ color: $white;
25
+ }
26
+
27
+ .field-50 {
28
+ display: flex;
29
+ margin-bottom: 24px;
30
+ &__item {
31
+ width: 50%;
32
+ &:nth-child(2) {
33
+ margin-left: 20px;
34
+ }
35
+ }
36
+ }
37
+
38
+ .field-100 {
39
+ width: 100%;
40
+ margin-bottom: 24px;
41
+ }
42
+
43
+ .get-start-btn {
44
+ width: 100%;
45
+ }
46
+
47
+ .forgot-password {
48
+ margin-bottom: 8px;
49
+ text-align: right;
50
+ a {
51
+ @include font($size: $t4-text, $color: $brand-color);
52
+ }
53
+ }
54
+
55
+ input {
56
+ display: block;
57
+ width: 100%;
58
+ height: 39px;
59
+ padding: 6px 12px;
60
+ @include font($size: $t3-text, $color: #555555);
61
+ background-color: $white;
62
+ border: 1px solid #ccc;
63
+ border-radius: $radius-2;
64
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
65
+ transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
66
+ &:focus {
67
+ border-color: #66afe9 !important;
68
+ outline: 0 !important;
69
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6) !important;
70
+ }
71
+ }
72
+ }
73
+ }
@@ -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
+ }