odt-ui-rails 0.1.0 → 0.1.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: 7cfd3ce3bb87002fd436c806e91c5265f0e6c86ad6526d317e480d2fdc6fa833
4
- data.tar.gz: f0e8f657c95a809ff669ab4bede5faca1175ceea322478cbd2d139700dcbe475
3
+ metadata.gz: c4f464afaea55b9bc1136ae9d86d5dc6008da52b3383e9939a2507d6645f3c72
4
+ data.tar.gz: 23ae8add898e19986518487bffb3e1b73da52e498fc21815e984500742182eaa
5
5
  SHA512:
6
- metadata.gz: 2abe1004260233049d5a659e6efe5634167eb92f9704c9d33f74741215db957a55ba95d1c30ca4009389add9ebfb3bfc8e0ac062bbbebac36fe36988095c2cf4
7
- data.tar.gz: 9beb448b7fe69848789ff861b29c57baa370cdd75dc365858a8c353bfc74457572c09b5450e7048be19be9c08561a593f00e98e74a724d29af4584335dc2a5a2
6
+ metadata.gz: 4d60b4cd47ccdb71b24ba0ad43df728fddd43854d7cebf3613a4ee0a92aff998c68dff76165bf84910f998d3fd9fe25e8b6fa6b5c676f7353702a7eff20f898b
7
+ data.tar.gz: 83fac7c8cbded7660ae29ebe9092c40f31e91195c6418f09d28ba5e9df07e814344f0d9c45defdc1106e6f811d6e9f65a46a077b6dd09183396cd6ef176e5764
data/lib/odt_ui/helper.rb CHANGED
@@ -34,13 +34,15 @@ module OdtUi
34
34
  # Shorthand Component Helpers
35
35
  # =========================================================================
36
36
 
37
+ # Actions
37
38
  def odt_button(label = nil, **props, &block)
38
39
  props[:children] = label if label.present?
39
40
  odt_component(:Button, props, &block)
40
41
  end
41
42
 
42
- def odt_heading(text = nil, level: 1, **props, &block)
43
- props[:level] = level
43
+ # Typography
44
+ def odt_heading(text = nil, as: "h2", **props, &block)
45
+ props[:as] = as
44
46
  props[:children] = text if text.present?
45
47
  odt_component(:Heading, props, &block)
46
48
  end
@@ -50,6 +52,7 @@ module OdtUi
50
52
  odt_component(:Text, props, &block)
51
53
  end
52
54
 
55
+ # Data Display & Layout
53
56
  def odt_badge(label = nil, **props, &block)
54
57
  props[:children] = label if label.present?
55
58
  odt_component(:Badge, props, &block)
@@ -61,11 +64,32 @@ module OdtUi
61
64
  odt_component(:Avatar, props)
62
65
  end
63
66
 
67
+ def odt_card(**props, &block)
68
+ odt_component(:Card, props, &block)
69
+ end
70
+
71
+ def odt_stat_card(title = nil, value = nil, **props)
72
+ props[:title] = title if title.present?
73
+ props[:value] = value if value.present?
74
+ odt_component(:StatCard, props)
75
+ end
76
+
77
+ def odt_progress_bar(value = 0, **props)
78
+ props[:value] = value
79
+ odt_component(:ProgressBar, props)
80
+ end
81
+
82
+ # Form Controls
64
83
  def odt_input(name = nil, **props)
65
84
  props[:name] = name if name.present?
66
85
  odt_component(:Input, props)
67
86
  end
68
87
 
88
+ def odt_text_area(name = nil, **props)
89
+ props[:name] = name if name.present?
90
+ odt_component(:TextArea, props)
91
+ end
92
+
69
93
  def odt_password_input(name = nil, **props)
70
94
  props[:name] = name if name.present?
71
95
  odt_component(:PasswordInput, props)
@@ -76,12 +100,9 @@ module OdtUi
76
100
  odt_component(:SearchInput, props)
77
101
  end
78
102
 
79
- def odt_card(**props, &block)
80
- odt_component(:Card, props, &block)
81
- end
82
-
83
- def odt_stat_card(**props)
84
- odt_component(:StatCard, props)
103
+ def odt_pin_input(name = nil, **props)
104
+ props[:name] = name if name.present?
105
+ odt_component(:PinInput, props)
85
106
  end
86
107
 
87
108
  def odt_switch(name = nil, **props)
@@ -98,5 +119,18 @@ module OdtUi
98
119
  props[:name] = name if name.present?
99
120
  odt_component(:RadioGroup, props)
100
121
  end
122
+
123
+ # Overlays & Menus
124
+ def odt_modal(**props, &block)
125
+ odt_component(:Modal, props, &block)
126
+ end
127
+
128
+ def odt_dropdown_menu(**props, &block)
129
+ odt_component(:DropdownMenu, props, &block)
130
+ end
131
+
132
+ def odt_toaster(**props)
133
+ odt_component(:Toaster, props)
134
+ end
101
135
  end
102
136
  end
@@ -1,3 +1,3 @@
1
1
  module OdtUi
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: odt-ui-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
- - ODT Team
7
+ - Pixel
8
8
  bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
@@ -16,6 +16,9 @@ dependencies:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
18
  version: '6.1'
19
+ - - "<"
20
+ - !ruby/object:Gem::Version
21
+ version: '9'
19
22
  type: :runtime
20
23
  prerelease: false
21
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -23,10 +26,13 @@ dependencies:
23
26
  - - ">="
24
27
  - !ruby/object:Gem::Version
25
28
  version: '6.1'
29
+ - - "<"
30
+ - !ruby/object:Gem::Version
31
+ version: '9'
26
32
  description: Seamlessly mount and render ODT-Lightweight-UI components in Rails MVC
27
33
  views via Hotwire Stimulus.
28
34
  email:
29
- - dev@odt.com
35
+ - pixxel.tk@gmail.com
30
36
  executables: []
31
37
  extensions: []
32
38
  extra_rdoc_files: []