uistiti 0.1.2 → 0.1.4

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: 155ff6df2e902fd9da022f3b8b46e7a0b5d6ff5ba68fd98766beea271f214d9a
4
- data.tar.gz: 5418a7b8f51140f6cb0a0dce3a50edd29afcececfb0f93bc13d0e6663dbbf9ce
3
+ metadata.gz: 1e5b828febae7e765e280a4d6b868ed9471e4ea645b850852dbebc1cb5f72190
4
+ data.tar.gz: 7941b8fb623d6cb435fa5875854f2c256fd03f9917e1a6d4384bdda042f21441
5
5
  SHA512:
6
- metadata.gz: 1fd1fb301c61c5f2dd44fac7595bf261d81e7085556360fd421232258a0c00774b9028a78146108e7c41aa24f34494d787bfb54a4c2203fd41a046b2c38dcc70
7
- data.tar.gz: 0c142f19d729edd179dae85047ccb0a07d4443d42c8eb4ce556e3fcdf0b027213b9cca0bacd060d26afc2fe84d4e7867a045eceea8720e94d8dc1608285b1f7d
6
+ metadata.gz: eaffbd0add2c858f4ceab5d2e5a9aa2850b69aca8bfb130f2c8778a60c8a54c8a70d60464e0491fa2357f8a3f6c97f4eb41c660e4336de804cfdb04bf4c5a87d
7
+ data.tar.gz: 5ac99337319d212ffedd895ba83180f5960045111f0f92e4988fb43ad413e735bee691188fe1e9caf5c24988442b77640483f88dc6598f329379472cf4c7fafe
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Setup Playground to use all available component props
4
+ # Setup Features to use individual component props and combinations
5
+
6
+ module Uistiti
7
+ module Alpha
8
+ class ButtonPreview < ViewComponent::Preview
9
+ # Simple button style
10
+
11
+ # @param color select [primary, secondary, danger]
12
+ def playground(color: 'primary')
13
+ render(Uistiti::Alpha::Button.new(color:).with_content('Button'))
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Setup Playground to use all available component props
4
+ # Setup Features to use individual component props and combinations
5
+
6
+ module Uistiti
7
+ module Alpha
8
+ class ContainerPreview < ViewComponent::Preview
9
+ # This composent restrict the content horizontaly, on small screens it applyes a padding-inline of 1rem and on large screens it applkies a padding-iline of 3rem
10
+
11
+ def playground
12
+ render(Uistiti::Alpha::Container.new.with_content('Content of the container'))
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Setup Playground to use all available component props
4
+ # Setup Features to use individual component props and combinations
5
+
6
+ module Uistiti
7
+ module Alpha
8
+ class FlexPreview < ViewComponent::Preview
9
+ # Declare each possible params bellow, please see how to declare params and annotate previews https://lookbook.build/guide/previews/annotations
10
+
11
+ # @param direction select [row, column]
12
+ # @param gap select [tiny, small, medium, large, xl, xxl]
13
+ # @param justify_content select [center, start, end, flex-start, flex-end, left, right, normal, space-between, space-around, space-evenly, stretch]
14
+ # @param align_items select [normal, stretch, center, start, end, flex-start, flex-end, self-start, self-end]
15
+ def playground(direction: 'some value', justify_content: 'some value', align_items: 'some value', gap: 'some value')
16
+ render(Uistiti::Alpha::Flex.new(direction:, justify_content:, align_items:, gap:)) do
17
+ [
18
+ content_tag(:p, 'Item 1'),
19
+ content_tag(:p, 'Item 2'),
20
+ content_tag(:p, 'Item 3')
21
+ ].join.html_safe
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Setup Playground to use all available component props
4
+ # Setup Features to use individual component props and combinations
5
+
6
+ module Uistiti
7
+ module Alpha
8
+ class ImagePreview < ViewComponent::Preview
9
+ # Declare each possible params bellow, please see how to declare params and annotate previews https://lookbook.build/guide/previews/annotations
10
+
11
+ # @param source
12
+ # @param size select [small, medium, large, xl, xxl]
13
+ def playground(source: 'https://www.lesterresdenatae.fr/wp-content/uploads/2022/05/Masque-20.png', size: 'large')
14
+ render(Uistiti::Alpha::Image.new(source:, size:))
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Setup Playground to use all available component props
4
+ # Setup Features to use individual component props and combinations
5
+
6
+ module Uistiti
7
+ module Alpha
8
+ class LinkPreview < ViewComponent::Preview
9
+ # Declare each possible params bellow, please see how to declare params and annotate previews https://lookbook.build/guide/previews/annotations
10
+
11
+ # @param path
12
+ # @param method select [get, delete]
13
+ # @param color select [base, inverse-base, primary, secondary]
14
+ def playground(path: 'some value', method: :get, color: :base)
15
+ render(Uistiti::Alpha::Link.new(path:, method:, color:).with_content('Link'))
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Setup Playground to use all available component props
4
+ # Setup Features to use individual component props and combinations
5
+
6
+ module Uistiti
7
+ module Alpha
8
+ class MainLayoutPreview < ViewComponent::Preview
9
+
10
+ # Main layout
11
+ # ---------------
12
+ # This layout is here to structure the page, it does not make sens to present it as a component
13
+ #
14
+ # @hidden
15
+ def playground()
16
+ render(Uistiti::Alpha::MainLayout.new())
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Setup Playground to use all available component props
4
+ # Setup Features to use individual component props and combinations
5
+
6
+ module Uistiti
7
+ module Alpha
8
+ class NavbarPreview < ViewComponent::Preview
9
+ # Declare each possible params bellow, please see how to declare params and annotate previews https://lookbook.build/guide/previews/annotations
10
+
11
+ # @param color select [primary, secondary]
12
+ def playground(color: :primary)
13
+ render(Uistiti::Alpha::Navbar.new(color:)) do |navbar|
14
+ navbar.with_logo{'UISTITI'}
15
+ navbar.with_links([
16
+ { path: '#', method: :get, color: 'inverse-base', text: 'Link 1' },
17
+ { path: '#', method: :get, color: 'inverse-base', text: 'Link 2' },
18
+ { path: '#', method: :get, color: 'inverse-base', text: 'Link 3' },
19
+ ])
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -23,7 +23,7 @@ module Uistiti
23
23
  end
24
24
 
25
25
  def create_preview
26
- template("preview.tt", "test/components/previews/uistiti/#{status_path}#{underscore_name}_preview.rb")
26
+ template("preview.tt", "app/components/previews/uistiti/#{status_path}#{underscore_name}_preview.rb")
27
27
  end
28
28
 
29
29
  private
@@ -6,10 +6,7 @@ module Uistiti
6
6
  isolate_namespace Uistiti
7
7
 
8
8
  #Show to lookbook where it can find the previews
9
- puts '*'*80
10
- puts File.join(Uistiti::Engine.root, 'test/components/previews')
11
- puts '*'*80
12
- Lookbook.config.preview_paths = [File.join(Uistiti::Engine.root, 'test/components/previews')]
9
+ Lookbook.config.preview_paths = [File.join(Uistiti::Engine.root, 'app/components/previews')]
13
10
  Lookbook.config.preview_layout = "uistiti/component_preview"
14
11
  end
15
12
  end
@@ -1,3 +1,3 @@
1
1
  module Uistiti
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uistiti
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Ecrepont
@@ -90,6 +90,13 @@ files:
90
90
  - app/assets/stylesheets/uistiti/components/alpha/navbar.scss
91
91
  - app/assets/stylesheets/uistiti/config/_variables.scss
92
92
  - app/assets/stylesheets/uistiti/uistiti.scss
93
+ - app/components/previews/uistiti/alpha/button_preview.rb
94
+ - app/components/previews/uistiti/alpha/container_preview.rb
95
+ - app/components/previews/uistiti/alpha/flex_preview.rb
96
+ - app/components/previews/uistiti/alpha/image_preview.rb
97
+ - app/components/previews/uistiti/alpha/link_preview.rb
98
+ - app/components/previews/uistiti/alpha/main_layout_preview.rb
99
+ - app/components/previews/uistiti/alpha/navbar_preview.rb
93
100
  - app/components/uistiti/alpha/button.html.erb
94
101
  - app/components/uistiti/alpha/button.rb
95
102
  - app/components/uistiti/alpha/container.html.erb