phlexy_ui 0.1.20 → 0.2.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: e92e0e137db4f235a6271b85a4916c64d725a6201af324e31aae6774e52cfdc9
4
- data.tar.gz: 4005ccdeece88c2ac24bbefff65fc36a3e9d14473028e04c9cadd6a55aa343e2
3
+ metadata.gz: a8b3ab6516357298f2480e0aa318617cf9462e869619595628e77164de8ba5d8
4
+ data.tar.gz: 999e848e182e6d1722b207626b0e9bd6178e400f43f0175d3bc11f4aa05848ea
5
5
  SHA512:
6
- metadata.gz: 4cf059089b3566b9647f41b6fde7c227f34ae08d3b1d852afe9781c058ef9f2f684219871f450f9bf27592f0c2909cd9b274e7355d4332d65937b3f863966e8f
7
- data.tar.gz: c69976c4a84ce88633bbcd8943f706af196fb5f45407bb5194dccd4830fd28de0e46bedba19b794171df89f11707e3765b20aa27ecc8652fbfdd07be5ad5ef60
6
+ metadata.gz: d78a33487654f230817e779efa9c2b11713f713cc267b471c47e726ee1af3a02ae7bad228a867fbe8fc76f910a0721e4bb9762813aeaacf2b86070f1fe870efa
7
+ data.tar.gz: a35718c019460928ea1283388001dc4d0bd8ffc284818ef080bdca8eb63922cc1c3949b3414e5e2a1dbc69d5021d0374d0ce475bbf1ef514247bc5619fb4dab0
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PhlexyUI
4
+ class Breadcrumbs < Base
5
+ def initialize(*, as: :div, **)
6
+ super(*, **)
7
+ @as = as
8
+ end
9
+
10
+ def view_template(&)
11
+ generate_classes!(
12
+ component_html_class: :breadcrumbs,
13
+ modifiers_map: modifiers,
14
+ base_modifiers:,
15
+ options:
16
+ ).then do |classes|
17
+ public_send(as, class: classes, **options) do
18
+ ul(&)
19
+ end
20
+ end
21
+ end
22
+
23
+ def crumb(**options, &)
24
+ generate_classes!(
25
+ options:
26
+ ).then do |classes|
27
+ li(class: classes, **options, &)
28
+ end
29
+ end
30
+ alias_method :breadcrumb, :crumb
31
+ alias_method :item, :crumb
32
+
33
+ register_modifiers({})
34
+ end
35
+ end
@@ -18,17 +18,13 @@ module PhlexyUI
18
18
  options:
19
19
  ).then do |classes|
20
20
  if modal
21
- if Phlex::VERSION.start_with?("1.")
22
- build_button_via_unsafe_raw(classes, &)
23
- else
24
- public_send(
25
- as,
26
- class: classes,
27
- onclick: safe("#{Phlex::Escape.html_escape(modal)}.showModal()"),
28
- **options,
29
- &
30
- )
31
- end
21
+ public_send(
22
+ as,
23
+ class: classes,
24
+ onclick: safe("#{Phlex::Escape.html_escape(modal)}.showModal()"),
25
+ **options,
26
+ &
27
+ )
32
28
  else
33
29
  public_send(as, class: classes, **options, &)
34
30
  end
@@ -3,14 +3,14 @@
3
3
  module PhlexyUI
4
4
  # @private
5
5
  class CollapsibleSubMenu < Base
6
- include Phlex::DeferredRender
7
-
8
6
  def initialize(*, **)
9
7
  super
10
8
  @items ||= []
11
9
  end
12
10
 
13
11
  def view_template(&)
12
+ yield(self) if block_given?
13
+
14
14
  attributes = generate_attributes(base_modifiers, options, ATTRIBUTES_MAP)
15
15
 
16
16
  generate_classes!(
@@ -3,14 +3,14 @@
3
3
  module PhlexyUI
4
4
  # @private
5
5
  class SubMenu < Base
6
- include Phlex::DeferredRender
7
-
8
6
  def initialize(*, **)
9
7
  super
10
8
  @items ||= []
11
9
  end
12
10
 
13
11
  def view_template(&)
12
+ yield(self) if block_given?
13
+
14
14
  if @title
15
15
  div do
16
16
  render @title
data/lib/phlexy_ui/tab.rb CHANGED
@@ -3,14 +3,14 @@
3
3
  module PhlexyUI
4
4
  # @private
5
5
  class Tab < Base
6
- include Phlex::DeferredRender
7
-
8
6
  def initialize(*, id: nil, **)
9
7
  super(*, **)
10
8
  @id = id
11
9
  end
12
10
 
13
11
  def view_template(&)
12
+ yield(self) if block_given?
13
+
14
14
  if @content
15
15
  render TabWithContent.new(
16
16
  *base_modifiers,
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PhlexyUI
4
+ # This timestamp is automatically updated when releasing a new version
5
+ # Format: YYYY-MM-DD HH:MM:SS UTC
6
+ UPDATED_AT = "2024-12-03 21:23:25 UTC"
7
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PhlexyUI
4
- VERSION = "0.1.20"
4
+ VERSION = "0.2.0"
5
5
  end
data/lib/phlexy_ui.rb CHANGED
@@ -1,11 +1,13 @@
1
1
  require "phlex"
2
2
  require "zeitwerk"
3
3
  require_relative "phlexy_ui/version"
4
+ require_relative "phlexy_ui/updated_at"
4
5
 
5
6
  loader = Zeitwerk::Loader.for_gem
6
7
  loader.inflector.inflect(
7
8
  "phlexy_ui" => "PhlexyUI"
8
9
  )
10
+ loader.ignore("#{__dir__}/phlexy_ui/updated_at.rb")
9
11
  loader.setup # ready!
10
12
  loader.load_file("#{__dir__}/phlexy_ui/base.rb")
11
13
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phlexy_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Alejandro Aguilar Ramos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-23 00:00:00.000000000 Z
11
+ date: 2024-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: phlex
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.10'
19
+ version: 2.0.0.rc1
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: '1.10'
26
+ version: 2.0.0.rc1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: zeitwerk
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -86,6 +86,20 @@ dependencies:
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: 1.9.2
89
+ - !ruby/object:Gem::Dependency
90
+ name: rake
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '13.0'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '13.0'
89
103
  description: PhlexyUI is a Ruby UI component library for DaisyUI using Phlex
90
104
  email: boil-dosage.0p@icloud.com
91
105
  executables: []
@@ -99,6 +113,7 @@ files:
99
113
  - lib/phlexy_ui/avatar_group.rb
100
114
  - lib/phlexy_ui/badge.rb
101
115
  - lib/phlexy_ui/base.rb
116
+ - lib/phlexy_ui/breadcrumbs.rb
102
117
  - lib/phlexy_ui/button.rb
103
118
  - lib/phlexy_ui/card.rb
104
119
  - lib/phlexy_ui/checkbox.rb
@@ -126,6 +141,7 @@ files:
126
141
  - lib/phlexy_ui/table_row.rb
127
142
  - lib/phlexy_ui/tabs.rb
128
143
  - lib/phlexy_ui/tooltip.rb
144
+ - lib/phlexy_ui/updated_at.rb
129
145
  - lib/phlexy_ui/version.rb
130
146
  homepage: https://rubygems.org/gems/phlexy_ui
131
147
  licenses: