playbook_ui 5.2.0.pre.alpha10 → 5.2.0.pre.alpha11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1225ea47f826453974d3809f9a5d07ff1632d203265d1d0711ece149ac486a5
4
- data.tar.gz: fb3c33eb6f8aaa8412f6287b65506773791018ff09311b63c563879e47a8fdce
3
+ metadata.gz: ba4b9d0302c466d8b09711cbf8c6692bd99a7d327e05af173b07c1b1b6442319
4
+ data.tar.gz: 6f588818479d2132e2113246a211bddb4d2dfc30c9ba7fd2a8c11513333e97a7
5
5
  SHA512:
6
- metadata.gz: f71982e1200edb2d19bc8ba1a9669dfdef2b426f0259e488c7342ede1d0c2c2eba173855be8f513928bd5955424d5c35c12c35b5efde14e484d7e49799672c86
7
- data.tar.gz: 9c5e7464414de0e5b39a14d6d4f9f993b689b00456e11124d71931587a1b3d52153a724dc56bb8e4b3c3e914511a26ebea8d390bfedf0c3f0e6bcd14c0aaabed
6
+ metadata.gz: 41a7897836819170f2a3dd65afe40be337c59e54c4d67a3abe1822d5fb4af018ea173291d46a342138f6993c9c4cbbf435cc73838aef8f5bd56a94e34af068c7
7
+ data.tar.gz: d3251e65b92357d863a6a2a4814661c275852cc00515093bce1df595718298845ffef53e67c1362e7cc32f44e2250a1f40d80a045b42c1e9bad3ad28369f5213
@@ -15,6 +15,7 @@ module Playbook
15
15
  self.prefix_partial_path_with_controller_namespace = previous
16
16
  end
17
17
 
18
+ # deprecated
18
19
  def pb_react(kit, props: {}, options: {})
19
20
  ::Webpacker::React::Component.new(kit.camelize).render(props, options)
20
21
  end
@@ -0,0 +1,7 @@
1
+ <%= content_tag(:div,
2
+ aria: object.aria,
3
+ class: object.classname,
4
+ data: object.data,
5
+ id: object.id) do %>
6
+ <span>FOO CONTENT</span>
7
+ <% end %>
@@ -0,0 +1,39 @@
1
+ /* @flow */
2
+
3
+ import React from 'react'
4
+ import classnames from 'classnames'
5
+ import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
6
+ import { spacing } from '../utilities/spacing.js'
7
+
8
+ type FooProps = {
9
+ aria?: object,
10
+ className?: String,
11
+ data?: object,
12
+ id?: String,
13
+ }
14
+
15
+ const Foo = (props: FooProps) => {
16
+ const {
17
+ aria = {},
18
+ className = 'test_foo',
19
+ data = {},
20
+ id,
21
+ } = props
22
+
23
+ const ariaProps = buildAriaProps(aria)
24
+ const dataProps = buildDataProps(data)
25
+ const classes = classnames(buildCss('pb_foo'), className, spacing(props))
26
+
27
+ return (
28
+ <div
29
+ {...ariaProps}
30
+ {...dataProps}
31
+ className={classes}
32
+ id={id}
33
+ >
34
+ {className}
35
+ </div>
36
+ )
37
+ }
38
+
39
+ export default Foo
@@ -0,0 +1,3 @@
1
+ .pb_foo {
2
+
3
+ }
@@ -0,0 +1 @@
1
+ <%= pb_rails("foo") %>
@@ -0,0 +1,10 @@
1
+ import React from 'react'
2
+ import { Foo } from '../../'
3
+
4
+ const FooDefault = () => (
5
+ <div>
6
+ <Foo />
7
+ </div>
8
+ )
9
+
10
+ export default FooDefault
@@ -0,0 +1,9 @@
1
+ examples:
2
+
3
+ rails:
4
+ - foo_default: Default
5
+
6
+
7
+ react:
8
+ - foo_default: Default
9
+
@@ -0,0 +1 @@
1
+ export { default as FooDefault } from './_foo_default.jsx'
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Playbook
4
+ module PbFoo
5
+ class Foo
6
+ include Playbook::Props
7
+
8
+ partial "pb_foo/foo"
9
+ end
10
+ end
11
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- VERSION = "5.2.0.pre.alpha10"
4
+ VERSION = "5.2.0.pre.alpha11"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0.pre.alpha10
4
+ version: 5.2.0.pre.alpha11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -785,6 +785,14 @@ files:
785
785
  - app/pb_kits/playbook/pb_flex/docs/index.js
786
786
  - app/pb_kits/playbook/pb_flex/flex.rb
787
787
  - app/pb_kits/playbook/pb_flex/flex_item.rb
788
+ - app/pb_kits/playbook/pb_foo/_foo.html.erb
789
+ - app/pb_kits/playbook/pb_foo/_foo.jsx
790
+ - app/pb_kits/playbook/pb_foo/_foo.scss
791
+ - app/pb_kits/playbook/pb_foo/docs/_foo_default.html.erb
792
+ - app/pb_kits/playbook/pb_foo/docs/_foo_default.jsx
793
+ - app/pb_kits/playbook/pb_foo/docs/example.yml
794
+ - app/pb_kits/playbook/pb_foo/docs/index.js
795
+ - app/pb_kits/playbook/pb_foo/foo.rb
788
796
  - app/pb_kits/playbook/pb_form/_form.scss
789
797
  - app/pb_kits/playbook/pb_form/_form_form_with.html.erb
790
798
  - app/pb_kits/playbook/pb_form/_form_simple_form.html.erb