f_components 0.5.0 → 1.0.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f27c8e0b1d7838f17aa6039ebac0be8174ec0318e55df6364f7f8fc1f43fe1dd
4
- data.tar.gz: 6e4b33989e61277d68f1d76b96439d70ea08bb51215ccd8fa2116d8c4572981a
3
+ metadata.gz: 4f9af996fa8b8adbb8a8855d25fdd2c9394d2096dbb31ce6a42788e5249e4c69
4
+ data.tar.gz: 36a11f893498d0babc45ce27e5a524d249211bfbdba6218132bcacfd943a64aa
5
5
  SHA512:
6
- metadata.gz: c05cf93ca574a4879fdd18ccea361c00a7963a186f30c484a29ed2cb79542a8270f2f8b167eab3036596eaf8f072638ffdbc72aa1de082924fb70218aeec0a8e
7
- data.tar.gz: 6b8bf2d6916fd16b7ea6f6606d0403a0bc31fa45800bfc6fce446021232db93ee06ffe305af6902cec0e6c68b6fdd2c721113b1bb2f95f971874f69a1923cbef
6
+ metadata.gz: c0e2cedbefb8ee2b1b698646d831e8a094d410c4f4337ed69fc0ca1e1a7983daf9bc22706980985405eef92f0b80b491772f24acb2d72854b42e02620deb7fba
7
+ data.tar.gz: e8f891eaaba9fb77a723d20ef8a388b01a513134d0a23a399d005e48f3c0b2352f2f83105a21796e609da362b2922d36237f85598b4dd5f47f7085b2ac85011c
@@ -0,0 +1,12 @@
1
+ // variables
2
+ @import "./variables/breakpoints";
3
+ @import "./variables/colors";
4
+
5
+ // blocks
6
+ @import "./blocks/button";
7
+
8
+ // components
9
+ @import "../../components/f_components/avatar/component";
10
+ @import "../../components/f_components/button/component";
11
+ @import "../../components/f_components/collapsible/component";
12
+ @import "../../components/f_components/dropdown/component";
@@ -5,6 +5,8 @@ export default class extends BaseController {
5
5
  static targets = ['desktopTable', 'mobileTable'];
6
6
 
7
7
  connect() {
8
+ console.log('CONNECTED to TABLE');
9
+
8
10
  this.toggleDuplicatesHandler = this.toggleDuplicates.bind(this);
9
11
 
10
12
  this.checkboxes().forEach(checkbox => {
@@ -2,58 +2,28 @@
2
2
 
3
3
  module FComponents
4
4
  module IconsHelper
5
- VALID_STYLES = {
6
- solid: 'fa-solid',
7
- regular: 'fa-regular',
8
- light: 'fa-light',
9
- thin: 'fa-thin',
10
- duotone: 'fa-duotone',
11
- brands: 'fa-brands'
12
- }.freeze
13
-
14
- # Public: Creates a Font Awesome icon tag
15
- #
5
+ # Public: Creates a icon tag
16
6
  # Examples:
17
7
  #
18
- # fa_icon('home')
19
- # #=> <i class="fa-solid fa-home"></i>
20
- #
21
- # fa_icon('user', style: :regular)
22
- # #=> <i class="fa-regular fa-user"></i>
23
- #
24
- # fa_icon('github', style: :brands)
25
- # #=> <i class="fa-brands fa-github"></i>
8
+ # fa_icon('eye')
9
+ # #=> <i class="fas fa-eye"></i>
26
10
  #
27
- # fa_icon('eye', class: 'strong space-x-2', text: 'my text')
28
- # #=> <i class="fa-solid fa-eye strong space-x-2"></i> my text
11
+ # fa_icon('eye', prefix: 'far')
12
+ # <i class="far fa-eye"></i>
29
13
  #
30
- # Parameters:
31
- # @param name [String] The icon name (e.g., 'home', 'user')
32
- # @param options [Hash] Additional options
33
- # - :style [Symbol] The icon style (:solid, :regular, :brands, etc.)
34
- # - :class [String] Additional CSS classes
35
- # - :text [String] Text to display after the icon
14
+ # fa_icon('eye', class: 'strong space-x-2')
15
+ # #=> <i class="fas fa-eye strong space-x-2"></i>
36
16
  #
37
- # Returns:
38
- # @return [String] Safe HTML for rendering
17
+ # fa_icon('eye', class: 'strong space-x-2', text: 'my text')
18
+ # #=> <i class="fas fa-eye strong space-x-2"></i> my text
39
19
  def fa_icon(name, options = {})
40
- style = options.delete(:style) { :solid }
41
- style_class = VALID_STYLES[style] || VALID_STYLES[:solid]
42
-
43
- icon_class = "fa-#{name}"
20
+ fa_prefix = options.delete(:prefix) { 'fas' }
21
+ icon_name = "fa-#{name}"
44
22
  custom_classes = options[:class].presence
45
- options[:class] = [style_class, icon_class, custom_classes].compact.join(' ')
46
-
23
+ options[:class] = [fa_prefix, icon_name, custom_classes].compact.join(' ')
47
24
  f_icon(options)
48
25
  end
49
26
 
50
- # Internal: Creates the <i> tag with the appropriate classes and adds text if necessary
51
- #
52
- # Parameters:
53
- # @param options [Hash] Options for the <i> tag
54
- #
55
- # Returns:
56
- # @return [String] Safe HTML for rendering
57
27
  def f_icon(options)
58
28
  text = options.delete(:text)
59
29
  tag = content_tag(:i, nil, options)
@@ -8,19 +8,10 @@ module FComponents
8
8
 
9
9
  config.app_middleware.use(
10
10
  Rack::Static,
11
- urls: ['/f-components-packs'], root: FComponents::Engine.root.join('public')
11
+ urls: ["/f_components"],
12
+ root: FComponents::Engine.root.join("public")
12
13
  )
13
14
 
14
- initializer 'webpacker.proxy' do |app|
15
- next if FComponents.webpacker&.config&.dev_server&.blank?
16
-
17
- app.middleware.insert_before(
18
- 0, Webpacker::DevServerProxy, # "Webpacker::DevServerProxy" if Rails version < 5
19
- ssl_verify_none: true,
20
- webpacker: FComponents.webpacker
21
- )
22
- end
23
-
24
15
  config.generators do |g|
25
16
  g.test_framework :rspec
26
17
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FComponents
4
- VERSION = '0.5.0'
4
+ VERSION = '1.0.0'
5
5
  end
data/lib/f_components.rb CHANGED
@@ -4,15 +4,4 @@ require 'f_components/version'
4
4
  require 'f_components/engine'
5
5
  require 'f_components/railtie' if defined?(Rails::Railtie)
6
6
 
7
- module FComponents
8
- class << self
9
- def webpacker
10
- @webpacker ||= ::Webpacker::Instance.new(
11
- root_path: FComponents::Engine.root,
12
- config_path: FComponents::Engine.root.join('config', 'webpacker.yml')
13
- )
14
- end
15
- end
16
- end
17
-
18
7
  FC = FComponents
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: f_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fretadao tech
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-21 00:00:00.000000000 Z
11
+ date: 2024-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,70 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '6'
19
+ version: '7'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '6'
27
- - !ruby/object:Gem::Dependency
28
- name: sass
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: sass-rails
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
26
+ version: '7'
55
27
  - !ruby/object:Gem::Dependency
56
28
  name: view_component
57
29
  requirement: !ruby/object:Gem::Requirement
58
30
  requirements:
59
31
  - - "~>"
60
32
  - !ruby/object:Gem::Version
61
- version: '3'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '3'
69
- - !ruby/object:Gem::Dependency
70
- name: webpacker
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '4.3'
33
+ version: '3.18'
76
34
  type: :runtime
77
35
  prerelease: false
78
36
  version_requirements: !ruby/object:Gem::Requirement
79
37
  requirements:
80
38
  - - "~>"
81
39
  - !ruby/object:Gem::Version
82
- version: '4.3'
40
+ version: '3.18'
83
41
  description: Library of view_components
84
42
  email:
85
43
  - tech@fretadao.com
@@ -89,6 +47,10 @@ extra_rdoc_files: []
89
47
  files:
90
48
  - README.md
91
49
  - Rakefile
50
+ - app/assets/stylesheets/blocks/_button.scss
51
+ - app/assets/stylesheets/f_components.scss
52
+ - app/assets/stylesheets/variables/_breakpoints.scss
53
+ - app/assets/stylesheets/variables/_colors.scss
92
54
  - app/components/f_components/avatar/component.html.erb
93
55
  - app/components/f_components/avatar/component.rb
94
56
  - app/components/f_components/avatar/component.scss
@@ -113,17 +75,8 @@ files:
113
75
  - app/components/f_components/table/desktop/component.rb
114
76
  - app/components/f_components/table/mobile/component.html.erb
115
77
  - app/components/f_components/table/mobile/component.rb
116
- - app/frontend/f_components/stylesheets/blocks/_button.scss
117
- - app/frontend/f_components/stylesheets/f_components.scss
118
- - app/frontend/f_components/stylesheets/variables/_breakpoints.scss
119
- - app/frontend/f_components/stylesheets/variables/_colors.scss
120
- - app/helpers/f_components/application_helper.rb
121
78
  - app/helpers/f_components/components_helper.rb
122
79
  - app/helpers/f_components/icons_helper.rb
123
- - config/webpack/development.js
124
- - config/webpack/environment.js
125
- - config/webpack/production.js
126
- - config/webpacker.yml
127
80
  - lib/f_components.rb
128
81
  - lib/f_components/engine.rb
129
82
  - lib/f_components/railtie.rb
@@ -1,12 +0,0 @@
1
- // variables
2
- @import "./variables/breakpoints";
3
- @import "./variables/colors";
4
-
5
- // blocks
6
- @import "./blocks/button";
7
-
8
- // components
9
- @import "../../../components/f_components/avatar/component";
10
- @import "../../../components/f_components/button/component";
11
- @import "../../../components/f_components/collapsible/component";
12
- @import "../../../components/f_components/dropdown/component";
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'webpacker/helper'
4
-
5
- module FComponents
6
- module ApplicationHelper
7
- include ::Webpacker::Helper
8
-
9
- def current_webpacker_instance
10
- FComponents.webpacker
11
- end
12
- end
13
- end
@@ -1,5 +0,0 @@
1
- process.env.NODE_ENV = process.env.NODE_ENV || 'development';
2
-
3
- const environment = require('./environment');
4
-
5
- module.exports = environment.toWebpackConfig();
@@ -1,3 +0,0 @@
1
- const {environment} = require('@rails/webpacker');
2
-
3
- module.exports = environment;
@@ -1,7 +0,0 @@
1
- process.env.NODE_ENV = process.env.NODE_ENV || 'production'
2
-
3
- const environment = require('./environment')
4
-
5
- console.log('environment: ', environment)
6
-
7
- module.exports = environment.toWebpackConfig()
data/config/webpacker.yml DELETED
@@ -1,89 +0,0 @@
1
- default: &default
2
- source_path: app/frontend/f_components
3
- source_entry_path: packs
4
- public_root_path: public
5
- public_output_path: f-components-packs
6
- resolved_paths: ['app/components/f_components']
7
- webpack_compile_output: true
8
-
9
- # Reload manifest.json on all requests so we reload latest compiled packs
10
- cache_manifest: false
11
-
12
- # Extract and emit a css file
13
- extract_css: false
14
-
15
- static_assets_extensions:
16
- - .jpg
17
- - .jpeg
18
- - .png
19
- - .gif
20
- - .tiff
21
- - .ico
22
- - .svg
23
- - .eot
24
- - .otf
25
- - .ttf
26
- - .woff
27
- - .woff2
28
-
29
- extensions:
30
- - .mjs
31
- - .js
32
- - .sass
33
- - .scss
34
- - .css
35
- - .module.sass
36
- - .module.scss
37
- - .module.css
38
- - .png
39
- - .svg
40
- - .gif
41
- - .jpeg
42
- - .jpg
43
-
44
- development:
45
- <<: *default
46
- compile: true
47
-
48
- # Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules
49
- check_yarn_integrity: true
50
-
51
- # Reference: https://webpack.js.org/configuration/dev-server/
52
- dev_server:
53
- env_prefix: 'f_components'
54
- https: false
55
- host: 0.0.0.0
56
- port: 3999
57
- public: 0.0.0.0:3999
58
- hmr: true
59
- # Inline should be set to true if using HMR
60
- inline: true
61
- overlay: true
62
- compress: true
63
- disable_host_check: true
64
- use_local_ip: false
65
- quiet: false
66
- pretty: false
67
- headers:
68
- 'Access-Control-Allow-Origin': '*'
69
- watch_options:
70
- ignored: '**/node_modules/**'
71
-
72
- test:
73
- <<: *default
74
- compile: true
75
-
76
- # Compile test packs to a separate directory
77
- public_output_path: packs-test
78
-
79
- production:
80
- <<: *default
81
-
82
- # Production depends on precompilation of packs prior to booting for performance.
83
- compile: true
84
-
85
- # Extract and emit a css file
86
- extract_css: true
87
-
88
- # Cache manifest.json for performance
89
- cache_manifest: true