playbook_ui 7.1.0.pre.alpha2 → 7.1.0

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: 9d793fb38923075c62383c618585aebba3516a5573d81ed4a7b7da05bc6ec0e1
4
- data.tar.gz: 4918ac3b820aedf79c9873f6efcceebf0c555879aefb97ce649c1329af089b43
3
+ metadata.gz: f444fe64c94fe52134b58d54feab40314cc5c10a273dca136a837dd4f32bdae2
4
+ data.tar.gz: 242b3eb07882d6e290cd1784e1916b129a4d65d3a49119bea18ac09f96890460
5
5
  SHA512:
6
- metadata.gz: efc9b1216f6970e79c45d992a67c481af899364ab851acf3953d6cf9b5152d69648f562c1086dc8c0fb4b2b20f1249a7a3b5d543d9d495b70d977c49b85caa8a
7
- data.tar.gz: 9c0d61bc682f99cb0d49265a33aa79d736905d3e62798456e99d2f540f03875d39d788746be370fd8fec7d6a917cec615ccca1b1de17d9e30f5ba58845097efa
6
+ metadata.gz: 295ff9b7e1d2612ea7a405e40241869d5ee31e2762961a32edb0ddb6443407d514929148c719e7c68a78bf62f9736e8520c22afc055aae15abd375be4eaa0a0e
7
+ data.tar.gz: 66d67a743c7c465f8b68ae80f55b0438d196713ec917c9fcd104988f7969814f13c89af20f0fa9e84d5bde3dd5118a93e8638fcb6bd2eb32d2c9012ef98da614
@@ -32,7 +32,6 @@ module Playbook
32
32
  def chart_options
33
33
  {
34
34
  id: id,
35
- className: classname,
36
35
  chartData: chart_data,
37
36
  type: chart_type,
38
37
  title: title,
@@ -5,7 +5,7 @@ module Playbook
5
5
  class Body
6
6
  include Playbook::Props
7
7
  include ActionView::Helpers
8
-
8
+
9
9
  partial "pb_body/body"
10
10
 
11
11
  prop :color, type: Playbook::Props::Enum,
@@ -1,7 +1,5 @@
1
- <%= content_tag(object.tag,
2
- aria: object.aria,
3
- id: object.id,
4
- data: object.data,
5
- class: object.classname) do %>
6
- <%= object.children.present? ? capture(&object.children) : object.text %>
7
- <% end %>
1
+ <%= content_tag(object.tag, object.text,
2
+ id: object.id,
3
+ data: object.data,
4
+ class: object.classname,
5
+ aria: object.aria) %>
@@ -1,7 +1,5 @@
1
1
  examples:
2
2
  rails:
3
3
  - caption_light: Default
4
- - caption_block: Block
5
4
  react:
6
5
  - caption_light: Default
7
- - caption_block: Block
@@ -1,3 +1,2 @@
1
1
  export { default as CaptionLight } from './_caption_light.jsx'
2
2
  export { default as CaptionVariants } from './_caption_variants.jsx'
3
- export { default as CaptionBlock } from './_caption_block.jsx'
@@ -32,7 +32,6 @@ module Playbook
32
32
  def chart_options
33
33
  {
34
34
  id: id,
35
- className: classname,
36
35
  chartData: chart_data,
37
36
  type: chart_type,
38
37
  title: title,
@@ -2,36 +2,39 @@
2
2
  id: object.id,
3
3
  data: object.data,
4
4
  class: object.classname) do %>
5
- <%
6
- # convert deprecated prop values
7
- size = object.size
8
- size = "sm" if object.size == "xs"
9
- size = "md" if object.size == "lg"
10
- %>
5
+ <%
6
+ # convert deprecated prop values
7
+ size = object.size
8
+ size = "sm" if object.size == "xs"
9
+ size = "md" if object.size == "lg"
10
+ %>
11
11
  <% if size == "md" %>
12
12
  <% if object.show_icon %>
13
13
  <%= pb_rails("body", props: { color: "light", tag: "span"}) do %>
14
- <%= pb_rails("icon", props: { icon: "clock", fixed_width: true }) %>
14
+ <%= pb_rails("icon", props: { icon: "clock", fixed_width: true, size: "lg" }) %>
15
15
  <% end %>
16
16
  <% end %>
17
- <%= pb_rails("body", props: { tag: "span", text: object.format_time_string, classname: "pb_time" }) %>
17
+ <%= pb_rails("caption", props: { tag: "span", text: object.format_time_string, size: "lg" }) %>
18
18
  <% if object.show_timezone %>
19
- <%= pb_rails("body", props: { color: "light", tag: "span", text: object.pb_date_time.to_timezone.upcase }) %>
19
+ <%= content_tag(:span, class: "pb_time_timezone") do %>
20
+ <%= object.pb_date_time.to_timezone.upcase %>
21
+ <% end %>
20
22
  <% end %>
21
23
  <% else %>
22
24
  <% if object.show_icon %>
23
25
  <%= pb_rails("body", props: { color: "light", tag: "span"}) do %>
24
- <%= pb_rails("icon", props: { icon: "clock", fixed_width: true, size: "sm" }) %>
26
+ <%= pb_rails("icon", props: { icon: "clock", fixed_width: true }) %>
25
27
  <% end %>
26
28
  <% end %>
27
-
28
- <%= pb_rails("caption", props: { color: "light", tag: "span", text: object.format_time_string }) do %>
29
+ <%= pb_rails("body", props: { color: "light", tag: "span", text: object.format_time_string }) do %>
29
30
  <%= content_tag(:time, datetime: object.pb_date_time.to_iso) do %>
30
- <%= object.format_time_string %>
31
- <% if object.show_timezone %>
32
- <span class="pb_time_timezone">
33
- <%= object.pb_date_time.to_timezone.upcase %>
34
- </span>
31
+ <%= content_tag(:span) do %>
32
+ <%= object.format_time_string %>
33
+ <% if object.show_timezone %>
34
+ <%= content_tag(:span, class: "pb_time_timezone") do %>
35
+ <%= object.pb_date_time.to_timezone.upcase %>
36
+ <% end %>
37
+ <% end %>
35
38
  <% end %>
36
39
  <% end %>
37
40
  <% end %>
@@ -18,12 +18,11 @@ type TimeProps = {
18
18
  id?: string,
19
19
  showIcon?: boolean,
20
20
  size?: 'md' | 'sm',
21
- showTimezone?: boolean,
22
21
  timeZone?: string,
23
22
  }
24
23
 
25
24
  const Time = (props: TimeProps) => {
26
- const { align, className, date, showIcon, size, timeZone, showTimezone = true } = props
25
+ const { align, className, date, showIcon, size, timeZone } = props
27
26
  const classes = classnames(
28
27
  buildCss('pb_time_kit', align, size),
29
28
  globalProps(props),
@@ -34,53 +33,41 @@ const Time = (props: TimeProps) => {
34
33
 
35
34
  return (
36
35
  <div className={classes}>
37
- <If condition={showIcon}>
38
- <Body
39
- color="light"
40
- tag="span"
41
- >
42
- <Icon
43
- fixedWidth
44
- icon="clock"
45
- size={size === 'md' ? '' : 'sm'}
46
- />
47
- </Body>
48
- {' '}
49
- </If>
50
-
51
- <time dateTime={date}>
52
- <span>
53
- <If condition={size === 'md'}>
54
- <Body
55
- className="pb_time"
56
- tag="span"
57
- text={dateTimestamp.toTimeWithMeridian()}
36
+ <span className="pb_body_kit">
37
+ <If condition={showIcon}>
38
+ <Body
39
+ color="light"
40
+ tag="span"
41
+ >
42
+ <Icon
43
+ fixedWidth
44
+ icon="clock"
45
+ size={size === 'md' ? 'lg' : 'sm'}
58
46
  />
59
- {' '}
60
- <If condition={showTimezone}>
47
+ </Body>
48
+ {' '}
49
+ </If>
50
+ <time dateTime={date}>
51
+ <span>
52
+ <If condition={size !== 'md'}>
61
53
  <Body
62
54
  color="light"
63
55
  tag="span"
64
- text={dateTimestamp.toTimezone()}
56
+ text={dateTimestamp.toTimeWithMeridian()}
65
57
  />
66
- </If>
67
- <Else />
68
- <Caption
69
- color="light"
70
- tag="span"
71
- text={dateTimestamp.toTimeWithMeridian()}
72
- />
73
- {' '}
74
- <If condition={showTimezone}>
58
+ <Else />
75
59
  <Caption
76
- color="light"
60
+ size="lg"
77
61
  tag="span"
78
- text={dateTimestamp.toTimezone()}
62
+ text={dateTimestamp.toTimeWithMeridian()}
79
63
  />
80
64
  </If>
81
- </If>
82
- </span>
83
- </time>
65
+ <If condition={timeZone !== undefined}>
66
+ <span className="pb_time_timezone">{dateTimestamp.toTimezone()}</span>
67
+ </If>
68
+ </span>
69
+ </time>
70
+ </span>
84
71
  </div>
85
72
  )
86
73
  }
@@ -5,6 +5,8 @@
5
5
  @import "../pb_caption/caption";
6
6
 
7
7
  [class^=pb_time_kit] {
8
+ letter-spacing: $lspace_looser;
9
+ text-transform: uppercase;
8
10
  &[class*=_center] {
9
11
  text-align: center;
10
12
  }
@@ -13,6 +15,10 @@
13
15
  text-align: right;
14
16
  }
15
17
 
18
+ [class^=pb_body] {
19
+ font-weight: $bold !important;
20
+ }
21
+
16
22
  [class^=pb_time_timezone] {
17
23
  color: $text_lt_light;
18
24
  font-weight: $bold;
@@ -22,12 +28,26 @@
22
28
  }
23
29
  }
24
30
 
25
- &[class*=dark] {
26
- & * {
27
- @include caption_dark;
31
+ &[class*=_md] {
32
+ [class^=pb_caption_kit] {
33
+ color: $text_lt_default;
34
+ letter-spacing: $lspace_tight;
35
+ text-transform: capitalize;
36
+ }
37
+ [class^=pb_time_timezone] {
38
+ color: $text_lt_light;
39
+ font-size: $font-large !important;
40
+ font-weight: $regular;
41
+ letter-spacing: $lspace_tight;
28
42
  }
29
- .pb_time {
43
+ }
44
+
45
+ &.dark {
46
+ [class^=pb_caption_kit] {
30
47
  color: $text_dk_default;
31
48
  }
49
+ [class^=pb_body_kit] {
50
+ color: $text_dk_light;
51
+ }
32
52
  }
33
53
  }
@@ -1,27 +1,24 @@
1
1
  import React from 'react'
2
2
  import Time from '../_time.jsx'
3
3
 
4
- const TimeAlign = (props) => {
4
+ const TimeAlign = () => {
5
5
  return (
6
6
  <div>
7
7
  <Time
8
8
  date={new Date()}
9
9
  size="md"
10
- {...props}
11
10
  />
12
11
  <br />
13
12
  <Time
14
13
  align="center"
15
14
  date={new Date()}
16
15
  size="md"
17
- {...props}
18
16
  />
19
17
  <br />
20
18
  <Time
21
19
  align="right"
22
20
  date={new Date()}
23
21
  size="md"
24
- {...props}
25
22
  />
26
23
  </div>
27
24
  )
@@ -1,38 +1,38 @@
1
1
  <%= pb_rails("time", props: {
2
2
  show_timezone: false,
3
- time: Time.now
3
+ time: Time.now,
4
4
  }) %>
5
5
 
6
6
  <br>
7
7
 
8
8
  <%= pb_rails("time", props: {
9
9
  time: DateTime.now,
10
- timezone: "America/New_York"
10
+ timezone: "America/Chicago"
11
11
  }) %>
12
12
 
13
13
  <br>
14
14
 
15
15
  <%= pb_rails("time", props: {
16
+ time: "2012-08-02T15:49:29Z",
16
17
  show_icon: true,
17
18
  show_timezone: false,
18
- time: "2012-08-02T15:49:29Z",
19
19
  }) %>
20
20
 
21
21
  <br>
22
22
 
23
23
  <%= pb_rails("time", props: {
24
- show_icon: true,
25
24
  time: "2012-08-02T15:49:29Z",
26
- timezone: "America/New_York"
25
+ show_icon: true,
26
+ timezone: "America/Chicago"
27
27
  }) %>
28
28
 
29
- <br>
30
- <br>
29
+ <br>
30
+ <br>
31
31
 
32
- <%= pb_rails("time", props: {
33
- show_timezone: false,
34
- size: "md",
32
+ <%= pb_rails("time", props: {
35
33
  time: Time.now,
34
+ size: "md",
35
+ show_timezone: false,
36
36
  }) %>
37
37
 
38
38
  <br>
@@ -47,8 +47,8 @@
47
47
 
48
48
  <%= pb_rails("time", props: {
49
49
  show_icon: true,
50
- show_timezone: false,
51
50
  size: "md",
51
+ show_timezone: false,
52
52
  time: "2012-08-02T15:49:29Z",
53
53
  }) %>
54
54
 
@@ -1,56 +1,45 @@
1
1
  import React from 'react'
2
2
  import Time from '../_time.jsx'
3
3
 
4
- const TimeDefault = (props) => {
4
+ const TimeDefault = () => {
5
5
  return (
6
6
  <div>
7
7
  <Time
8
8
  date={new Date().getTime()}
9
- showTimezone={false}
10
- {...props}
11
9
  />
12
10
  <br />
13
11
  <Time
14
12
  date={new Date()}
15
13
  timeZone="America/New_York"
16
- {...props}
17
14
  />
18
15
  <br />
19
16
  <Time
20
17
  date={new Date().getTime()}
21
18
  showIcon
22
- showTimezone={false}
23
- {...props}
24
19
  />
25
20
  <br />
26
21
  <Time
27
22
  date={new Date()}
28
23
  showIcon
29
24
  timeZone="America/New_York"
30
- {...props}
31
25
  />
32
26
  <br />
33
27
  <br />
34
28
  <Time
35
29
  date={new Date()}
36
- showTimezone={false}
37
30
  size="md"
38
- {...props}
39
31
  />
40
32
  <br />
41
33
  <Time
42
34
  date={new Date()}
43
35
  size="md"
44
36
  timeZone="America/New_York"
45
- {...props}
46
37
  />
47
38
  <br />
48
39
  <Time
49
40
  date={new Date()}
50
41
  showIcon
51
- showTimezone={false}
52
42
  size="md"
53
- {...props}
54
43
  />
55
44
  <br />
56
45
  <Time
@@ -58,7 +47,6 @@ const TimeDefault = (props) => {
58
47
  showIcon
59
48
  size="md"
60
49
  timeZone="America/New_York"
61
- {...props}
62
50
  />
63
51
  </div>
64
52
  )
@@ -1,19 +1,16 @@
1
1
  import React, { Fragment } from 'react'
2
2
  import Time from '../_time.jsx'
3
3
 
4
- const TimeSizes = (props) => {
4
+ const TimeSizes = () => {
5
5
  return (
6
6
  <Fragment>
7
7
  <Time
8
8
  date={new Date()}
9
- {...props}
10
9
  />
11
10
  <br />
12
11
  <Time
13
12
  date={new Date()}
14
13
  size="md"
15
- timeZone="America/New_York"
16
- {...props}
17
14
  />
18
15
  </Fragment>
19
16
  )
@@ -1,13 +1,12 @@
1
1
  import React from 'react'
2
2
  import Time from '../_time.jsx'
3
3
 
4
- const TimeStamp = (props) => {
4
+ const TimeStamp = () => {
5
5
  return (
6
6
  <div>
7
7
  <Time
8
8
  date={new Date()}
9
9
  size="sm"
10
- {...props}
11
10
  />
12
11
 
13
12
  <br />
@@ -15,7 +14,6 @@ const TimeStamp = (props) => {
15
14
  <Time
16
15
  date={new Date().getTime()}
17
16
  size="sm"
18
- {...props}
19
17
  />
20
18
  </div>
21
19
  )
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import Time from '../_time.jsx'
3
3
 
4
- const TimeTimezone = (props) => {
4
+ const TimeTimeZone = () => {
5
5
  const zones = {
6
6
  east: 'America/New_York',
7
7
  central: 'America/Chicago',
@@ -16,7 +16,6 @@ const TimeTimezone = (props) => {
16
16
  date={new Date()}
17
17
  size="md"
18
18
  timeZone={zones.east}
19
- {...props}
20
19
  />
21
20
 
22
21
  <br />
@@ -25,7 +24,6 @@ const TimeTimezone = (props) => {
25
24
  <Time
26
25
  date={new Date()}
27
26
  timeZone={zones.central}
28
- {...props}
29
27
  />
30
28
 
31
29
  <br />
@@ -34,7 +32,6 @@ const TimeTimezone = (props) => {
34
32
  <Time
35
33
  date={new Date()}
36
34
  timeZone={zones.mountain}
37
- {...props}
38
35
  />
39
36
 
40
37
  <br />
@@ -43,7 +40,6 @@ const TimeTimezone = (props) => {
43
40
  <Time
44
41
  date={new Date()}
45
42
  timeZone={zones.west}
46
- {...props}
47
43
  />
48
44
 
49
45
  <br />
@@ -52,11 +48,10 @@ const TimeTimezone = (props) => {
52
48
  <Time
53
49
  date={new Date()}
54
50
  timeZone={zones.asia}
55
- {...props}
56
51
  />
57
52
 
58
53
  </div>
59
54
  )
60
55
  }
61
56
 
62
- export default TimeTimezone
57
+ export default TimeTimeZone
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Playbook
3
- VERSION = "7.1.0.pre.alpha2"
3
+ VERSION = "7.1.0"
4
4
  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: 7.1.0.pre.alpha2
4
+ version: 7.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-10-14 00:00:00.000000000 Z
12
+ date: 2020-10-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -530,8 +530,6 @@ files:
530
530
  - app/pb_kits/playbook/pb_caption/_caption.scss
531
531
  - app/pb_kits/playbook/pb_caption/_caption_mixin.scss
532
532
  - app/pb_kits/playbook/pb_caption/caption.rb
533
- - app/pb_kits/playbook/pb_caption/docs/_caption_block.html.erb
534
- - app/pb_kits/playbook/pb_caption/docs/_caption_block.jsx
535
533
  - app/pb_kits/playbook/pb_caption/docs/_caption_light.html.erb
536
534
  - app/pb_kits/playbook/pb_caption/docs/_caption_light.jsx
537
535
  - app/pb_kits/playbook/pb_caption/docs/_caption_variants.html.erb
@@ -1871,9 +1869,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1871
1869
  version: '0'
1872
1870
  required_rubygems_version: !ruby/object:Gem::Requirement
1873
1871
  requirements:
1874
- - - ">"
1872
+ - - ">="
1875
1873
  - !ruby/object:Gem::Version
1876
- version: 1.3.1
1874
+ version: '0'
1877
1875
  requirements: []
1878
1876
  rubygems_version: 3.1.4
1879
1877
  signing_key:
@@ -1,11 +0,0 @@
1
- <%= pb_rails("caption") do %>
2
- Block
3
- <% end %>
4
-
5
- <%= pb_rails("caption", props: { size: 'lg' }) do %>
6
- Large Block
7
- <% end %>
8
-
9
- <%= pb_rails("caption", props: { size: 'xs' }) do %>
10
- Subcaption Block
11
- <% end %>
@@ -1,28 +0,0 @@
1
- import React from 'react'
2
- import { Caption } from '../../'
3
-
4
- const CaptionBlock = (props) => {
5
- return (
6
- <div>
7
- <Caption {...props}>
8
- {'Block'}
9
- </Caption>
10
-
11
- <Caption
12
- {...props}
13
- size="lg"
14
- >
15
- {'Large Block'}
16
- </Caption>
17
-
18
- <Caption
19
- {...props}
20
- size="xs"
21
- >
22
- {'Subcaption Block'}
23
- </Caption>
24
- </div>
25
- )
26
- }
27
-
28
- export default CaptionBlock