codengage_view_components 0.1.9 → 0.2.1

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: 0221b137a8d807a2cf27d7da5647b45c7cc240c402f02c86e61e7c9e57f65bed
4
- data.tar.gz: ecc4e6292575a86ecda2eb6177ec16cf09cdeb462c09e5c6e5687e54ad4e92f8
3
+ metadata.gz: cfd73793377d828c00a108614ac1f6d9e77add938707211634c94115d6a2ce11
4
+ data.tar.gz: 9603e42864d524ba3fa0cdbcb8a94cf1834e3b61b8bbbe7105fb6dbbf69478e3
5
5
  SHA512:
6
- metadata.gz: 6443227134713cfd62ecc74b4f47ad83d50989d3820c28c0a59c154ff88a9deab3aafe408f39803aecd610a783efa14fa0682a76551d7be0f1b4c1b58c683805
7
- data.tar.gz: 5395eefd178169625824cbd41601ea8b55a53151929339c8e3a465c55485cb80c0e219811f5b02ee00c2dc1d4c283c159811d3732ed89ec5fd9f45b68ceb1b2f
6
+ metadata.gz: 909c752b041b8b5832311f1df812b44fa5b4b92e165be657088f8f71d4484fa6c16c5e2caadbea3d64a0ca1329095a5a0b2265dd8cb2fbffd745f7c7cd000b49
7
+ data.tar.gz: d80cdc63d3f674f21e383785b9259bab2562ef6b27e0c9963c6f9714ea6435e5785a88f12e82c117beebebe64473e4d3c066fed8b2b20d7840e4776832589167
@@ -1,3 +1,7 @@
1
1
  .date-field__calendar {
2
2
  @apply absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-gray-500;
3
+ }
4
+
5
+ .date-field__form {
6
+ @apply flex flex-row relative select-none text-[#374151] w-full px-3 py-1.5 cursor-pointer border border-form-border rounded-[10px] bg-form outline-0 transition-all duration-200 overflow-hidden text-sm hover:shadow-sm focus:outline-none placeholder:text-gray-700;
3
7
  }
@@ -1,5 +1,5 @@
1
1
  .relative.w-full
2
- = @form.text_field @attribute, class: "#{@classes} pr-10", placeholder: @placeholder, data: { controller: 'datepicker', **@data_options }
2
+ = @form.text_field @attribute, class: "#{@classes} pr-10 date-field__form", placeholder: @placeholder, data: { controller: 'datepicker', **@data_options }
3
3
 
4
4
  .form__calendar
5
5
  = lucide_icon('calendar', class: 'w-4 h-4')
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CodengageViewComponents
4
4
  class DateFieldComponent < ApplicationComponent
5
- def initialize(form:, classes:, attribute:, placeholder:, **data_options)
5
+ def initialize(form:, classes: "", attribute:, placeholder: "", **data_options)
6
6
  @form = form
7
7
  @classes = classes
8
8
  @attribute = attribute
@@ -9,7 +9,7 @@ module CodengageViewComponents
9
9
  "alert" => { bg: "bg-red-700", stroke: "#DC3545", icon: "circle-alert" }
10
10
  }.freeze
11
11
 
12
- def initialize(flash:, classes:)
12
+ def initialize(flash:, classes: "")
13
13
  @classes = classes
14
14
  @messages = flash.map do |type, text|
15
15
  style = STYLES[type]
@@ -1,3 +1,4 @@
1
1
  = link_to @url, class: tab_item_class do
2
- = lucide_icon("#{@icon}", class: 'w-4 h-4')
2
+ - unless @icon.blank?
3
+ = lucide_icon("#{@icon}", class: 'w-4 h-4')
3
4
  = @text
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CodengageViewComponents
4
4
  class TabItemComponent < ApplicationComponent
5
- def initialize(url:, tab:, icon:, text:, classes:)
5
+ def initialize(url:, tab:, icon: "", text: "", classes: "")
6
6
  @url = url
7
7
  @tab = tab
8
8
  @icon = icon
@@ -1,3 +1,3 @@
1
1
  module CodengageViewComponents
2
- VERSION = "0.1.9"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codengage_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Karlinski Baldo