playbook_ui 7.4.0 → 7.5.1

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: ece0e08dd2a74bd0a2f15fd818b7ed785d8da6551134231265edc25df7cfc178
4
- data.tar.gz: c8d756ec4c5ff8c56325dd66f7259bf8ae29896253acb5b8c51db96bbe7c80aa
3
+ metadata.gz: b2e3243c8d0b3f501617ae799afcf22fe18d1ed660cea0ea804e0a7ce7ec7a68
4
+ data.tar.gz: 7cefaf9db5995af039de2718d49a6f69039091e435121d6bc5cda86b55d6e860
5
5
  SHA512:
6
- metadata.gz: 235b976fe8c89af0632b49a2aeb813d77d359c494f0dff0cd3508d672c6b5f3d7eacf01e366abc4b25ce1a7e16985661611b62800cb2ba989c0c9a74a41ab7ae
7
- data.tar.gz: 8947bd60837de99451fef11d8a21827bf267cbb3ba051f006f8eb65d3b59add96db9e05bae5f0f6a1cf80018af98cb525af3e4b641e031c5a15677f64d4104d7
6
+ metadata.gz: 6a7ade019568f33b966311eac89c42588ff692428b7020a6041b1e669bae2bd4e360a0380a7a1abbffc5a3bfe8449dbe2d008cba364aae5262fd42a784e34c65
7
+ data.tar.gz: ed40bc86a8fbc9bc3772730eb8984a70e44e77a2d81834d6f649de0588536128dd006239d7c101a7d7274a303fc0ddd44061e07eb0c377954f10ed311ff65670
Binary file
Binary file
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="143px" height="39px" viewBox="0 0 143 39" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 59.1 (86144) - https://sketch.com -->
4
+ <title>pb-logo</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs>
7
+ <polygon id="path-1" points="31.27995 38.3709677 6.29032258e-05 38.3709677 6.29032258e-05 0.0894483871 31.27995 0.0894483871"></polygon>
8
+ </defs>
9
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
10
+ <g id="pb-logo">
11
+ <path d="M40.900986,25.7250725 L40.900986,20.0998494 L44.9692278,20.0998494 C48.7361183,20.0998494 50.7953517,17.5634764 50.7953517,14.5499641 C50.7953517,11.5113391 48.7361183,8.97496614 44.9692278,8.97496614 L36.5816183,8.97496614 L36.5816183,25.7250725 L40.900986,25.7250725 Z M44.3163001,16.3329589 L40.900986,16.3329589 L40.900986,12.7418566 L44.3163001,12.7418566 C45.4714798,12.7418566 46.4006462,13.3947843 46.4006462,14.5499641 C46.4006462,15.6800312 45.4714798,16.3329589 44.3163001,16.3329589 Z M56.4896223,25.7250725 L56.4896223,8.97496614 L52.6222814,8.97496614 L52.6222814,25.7250725 L56.4896223,25.7250725 Z M70.3203764,25.7250725 L70.3203764,18.1410663 C70.3203764,14.3741758 67.5831026,13.2943339 64.6700407,13.2943339 C62.811708,13.2943339 60.7273619,13.8468112 59.1703805,15.1777791 L60.6017989,17.8648277 C61.5811905,17.0361118 62.7865954,16.5589723 63.9920004,16.5589723 C65.5489818,16.5589723 66.4530355,17.2872378 66.4530355,18.3419671 L66.4530355,19.5473721 C65.72477,18.6433184 64.2933516,18.1159537 62.686145,18.1159537 L62.5385458,18.1180063 C60.7078145,18.1688571 58.5174529,19.1726656 58.5174529,22.0335198 C58.5174529,24.745681 60.8278124,26.0264237 62.686145,26.0264237 C64.2431264,26.0264237 65.6996574,25.4237213 66.4530355,24.5196675 L66.4530355,25.7250725 L70.3203764,25.7250725 Z M64.2933516,23.4900508 C63.2888475,23.4900508 62.3596812,23.0380239 62.3596812,22.083745 C62.3596812,21.1294661 63.2888475,20.6774392 64.2933516,20.6774392 C65.1471801,20.6774392 66.0512338,20.9536779 66.4530355,21.5312678 L66.4530355,22.6111097 C66.0512338,23.1886996 65.1471801,23.4900508 64.2933516,23.4900508 Z M72.8755716,30.4462419 C73.2773732,30.5718049 74.181427,30.6471427 74.5330034,30.6471427 L74.7503997,30.6408447 C76.9447008,30.5602028 78.6513638,29.9591284 79.6094597,27.5764643 L85.130522,13.5956851 L81.0371676,13.5956851 L78.2998939,21.2801417 L75.5375075,13.5956851 L71.4692658,13.5956851 L76.3159982,25.9008607 L76.0397596,26.5537884 C75.8137462,27.0560405 75.2612689,27.2318287 74.3823278,27.2318287 C74.0809765,27.2318287 73.7042875,27.1564909 73.4280489,27.0058153 L72.8755716,30.4462419 Z M90.1467523,21.5312678 L90.1467523,17.8146025 C90.6238917,17.1616748 91.6283959,16.7096479 92.4571118,16.7096479 C93.9889806,16.7096479 95.1441603,17.8397151 95.1441603,19.6478225 C95.1441603,21.4810425 93.9889806,22.6111097 92.4571118,22.6111097 C91.6283959,22.6111097 90.6238917,22.1841954 90.1467523,21.5312678 Z M90.1467523,25.7250725 L90.1467523,24.3187667 C91.1512564,25.4739465 92.381774,26.0264237 93.7378545,26.0264237 C96.7262543,26.0264237 99.086839,23.7662894 99.086839,19.6478225 C99.086839,15.6800312 96.7764795,13.2943339 93.7378545,13.2943339 C92.4068866,13.2943339 91.1010312,13.8216986 90.1467523,15.0271035 L90.1467523,8.97496614 L86.2794114,8.97496614 L86.2794114,25.7250725 L90.1467523,25.7250725 Z M106.915681,26.0264237 C111.084373,26.0264237 113.545408,23.0631366 113.545408,19.6478225 C113.545408,16.2325085 111.084373,13.2943339 106.915681,13.2943339 C102.797214,13.2943339 100.336179,16.2325085 100.336179,19.6478225 C100.336179,23.0631366 102.797214,26.0264237 106.915681,26.0264237 Z M106.915681,22.6111097 C105.258249,22.6111097 104.30397,21.2801417 104.30397,19.6478225 C104.30397,18.0406159 105.258249,16.7096479 106.915681,16.7096479 C108.623338,16.7096479 109.577617,18.0406159 109.577617,19.6478225 C109.577617,21.2801417 108.623338,22.6111097 106.915681,22.6111097 Z M121.37425,26.0264237 C125.542942,26.0264237 128.003977,23.0631366 128.003977,19.6478225 C128.003977,16.2325085 125.542942,13.2943339 121.37425,13.2943339 C117.255783,13.2943339 114.794748,16.2325085 114.794748,19.6478225 C114.794748,23.0631366 117.255783,26.0264237 121.37425,26.0264237 Z M121.37425,22.6111097 C119.716818,22.6111097 118.762539,21.2801417 118.762539,19.6478225 C118.762539,18.0406159 119.716818,16.7096479 121.37425,16.7096479 C123.081907,16.7096479 124.036186,18.0406159 124.036186,19.6478225 C124.036186,21.2801417 123.081907,22.6111097 121.37425,22.6111097 Z M142.487659,25.7250725 L137.716264,25.7250725 L135.054328,21.4308173 L133.899149,22.8120105 L133.899149,25.7250725 L130.031808,25.7250725 L130.031808,8.97496614 L133.899149,8.97496614 L133.899149,18.4424176 L137.590701,13.5956851 L142.261646,13.5956851 L137.791602,19.1204578 L142.487659,25.7250725 Z" id="Playbook" fill="#0056CF" fill-rule="nonzero"></path>
12
+ <g id="Group-10" transform="translate(0.000000, 0.225194)">
13
+ <g id="Group-3">
14
+ <g id="Fill-1-Clipped">
15
+ <mask id="mask-2" fill="white">
16
+ <use xlink:href="#path-1"></use>
17
+ </mask>
18
+ <g id="path-1"></g>
19
+ <path d="M16.0020145,0.0894483871 C14.7618774,0.0894483871 13.7532242,1.1037629 13.7532242,2.35019032 L13.7532242,5.51862581 L0.999595161,14.8644726 L0.987329032,14.8735935 L0.975377419,14.8824 L0.968458065,14.8877468 C0.361441935,15.340021 6.29032258e-05,16.06215 6.29032258e-05,16.8235935 L6.29032258e-05,26.4795532 C6.29032258e-05,27.2479161 0.363958065,27.9722468 0.974748387,28.424521 L0.986070968,28.4326984 L0.992675806,28.4377306 L0.999595161,28.4427629 L13.9551435,37.9364323 C14.3423129,38.2204403 14.7999339,38.3710935 15.2779984,38.3710935 C16.51845,38.3710935 17.5274177,37.3564645 17.5274177,36.1097226 L17.5274177,32.9419161 L30.2804177,23.5957548 L30.2929984,23.5869484 L30.30495,23.5778274 L30.3109258,23.5731097 C30.9182565,23.1208355 31.27995,22.3983919 31.27995,21.6366339 L31.27995,11.9809887 C31.27995,11.2110532 30.9154258,10.4864081 30.3036919,10.0347629 L30.2929984,10.0269 L30.2870226,10.0221823 L30.2804177,10.0174645 L17.3248694,0.523795161 C16.9380145,0.240101613 16.4803935,0.0894483871 16.0020145,0.0894483871 M16.0020145,1.97654516 C16.0724661,1.97654516 16.1441758,1.99793226 16.2092806,2.04605323 L29.1651435,11.5397226 L29.1805548,11.5510452 C29.3139097,11.6485452 29.3928532,11.8073758 29.3928532,11.9759565 L29.3928532,11.9809887 L29.3928532,21.6331742 L29.3928532,21.6366339 C29.3928532,21.8064726 29.3132806,21.9649887 29.1796113,22.0628032 L29.1651435,22.0734968 L15.640321,31.9851581 L15.640321,36.1097226 C15.640321,36.3305129 15.46545,36.4839968 15.2779984,36.4839968 C15.2078613,36.4839968 15.1358371,36.4619806 15.0704177,36.4141742 L2.11518387,26.9208194 L2.09977258,26.9091823 C1.96610323,26.8113677 1.88715968,26.6531661 1.88715968,26.4845855 L1.88715968,26.4795532 L1.88715968,16.8273677 L1.88715968,16.8235935 C1.88715968,16.6540694 1.96673226,16.4952387 2.10040161,16.3977387 L2.11518387,16.3864161 L15.640321,6.47506935 L15.640321,2.35019032 C15.640321,2.13002903 15.8145629,1.97654516 16.0020145,1.97654516" id="Fill-1" fill="#0056CF" fill-rule="nonzero" mask="url(#mask-2)"></path>
20
+ </g>
21
+ </g>
22
+ <polygon id="Fill-4" fill="#0056CF" fill-rule="nonzero" points="11.4547403 17.0330927 10.5942242 16.1725766 8.31272419 18.4540766 6.03122419 16.1725766 5.17070806 17.0330927 7.45189355 19.3145927 5.17070806 21.5964073 6.03122419 22.4569234 8.31272419 20.1751089 10.5942242 22.4569234 11.4547403 21.5964073 9.17324032 19.3145927"></polygon>
23
+ <path d="M22.805596,15.6235887 C20.7672169,15.6235887 19.1144347,17.2760565 19.1144347,19.3144355 C19.1144347,21.3534435 20.7672169,23.0059113 22.805596,23.0059113 C24.843975,23.0059113 26.4964427,21.3534435 26.4964427,19.3144355 C26.4964427,17.2760565 24.843975,15.6235887 22.805596,15.6235887 M22.805596,16.8407661 C24.1696524,16.8407661 25.2792653,17.950379 25.2792653,19.3144355 C25.2792653,20.6788065 24.1696524,21.7887339 22.805596,21.7887339 C21.441225,21.7887339 20.3316121,20.6788065 20.3316121,19.3144355 C20.3316121,17.950379 21.441225,16.8407661 22.805596,16.8407661" id="Fill-6" fill="#0056CF" fill-rule="nonzero"></path>
24
+ <path d="M18.8099516,17.7868306 L15.2804516,13.9664032 L11.759129,17.7868306 L12.6212177,18.5897903 L14.6907339,16.3293629 L14.6907339,22.8977177 C14.6907339,23.2229274 14.9542984,23.4864919 15.2791935,23.4864919 C15.6047177,23.4864919 15.8679677,23.2229274 15.8679677,22.8977177 L15.8679677,16.3271613 L17.9478629,18.5897903 L18.8099516,17.7868306 Z" id="Fill-8" fill="#0056CF" fill-rule="nonzero"></path>
25
+ </g>
26
+ </g>
27
+ </g>
28
+ </svg>
@@ -2,17 +2,5 @@
2
2
  id: object.id,
3
3
  data: object.data,
4
4
  class: object.classname) do %>
5
-
6
- <% case object.variant
7
- when "updated" %>
8
- <%= pb_rails("caption", props: { text: object.format_updated_string, size: 'xs', dark: object.dark }) %>
9
- <% when "elapsed" %>
10
- <%= pb_rails("caption", props: { text: object.format_updated_string, size: 'xs', dark: object.dark }) %>
11
- <% else %>
12
- <% if object.show_date %>
13
- <%= pb_rails("caption", props: { text: object.format_datetime_string, size: 'xs', dark: object.dark }) %>
14
- <% else %>
15
- <%= pb_rails("caption", props: { text: object.format_time_string, size: 'xs', dark: object.dark }) %>
16
- <% end %>
17
- <% end %>
5
+ <%= pb_rails("caption", props: { text: object.text, tag: 'span', size: 'xs' }) %>
18
6
  <% end %>
@@ -2,112 +2,36 @@
2
2
 
3
3
  import React from 'react'
4
4
  import classnames from 'classnames'
5
- import DateTime from '../pb_kit/dateTime.js'
6
- import { buildCss } from '../utilities/props'
5
+
7
6
  import { Caption } from '../'
7
+
8
+ import { buildCss, buildDataProps } from '../utilities/props'
9
+
8
10
  import { globalProps } from '../utilities/globalProps.js'
9
11
 
10
12
  type TimestampProps = {
11
- align?: "left" | "center" | "right",
12
- className?: string | array<string>,
13
- dark?: boolean,
14
- data?: string,
15
- text: string,
16
- timestamp: string,
17
- timezone: string,
18
13
  id?: string,
19
- showDate?: boolean,
20
- showUser?: boolean,
21
- showTimezone?: boolean,
22
- variant?: "default" | "elapsed" | "updated"
14
+ data?: object,
15
+ className?: string,
16
+ text?: string,
23
17
  }
24
18
 
25
19
  const Timestamp = (props: TimestampProps) => {
26
- const {
27
- align = 'left',
28
- className,
29
- dark = false,
30
- text,
31
- timestamp,
32
- timezone,
33
- showDate = true,
34
- showUser = false,
35
- showTimezone = false,
36
- variant = 'default',
37
- } = props
38
- const classes = classnames(
39
- buildCss('pb_timestamp_kit', align, {
40
- dark: dark,
41
- variant: variant,
42
- }),
43
- globalProps(props),
44
- className
45
- )
46
-
47
- const currentYear = new Date().getFullYear().toString()
48
- const dateTimestamp = new DateTime({ value: timestamp, zone: timezone })
49
- const dateDisplay = dateTimestamp.toMonth() + ' ' + dateTimestamp.toDay()
50
- const timeDisplay = dateTimestamp.toHour() + ':' + dateTimestamp.toMinute() + dateTimestamp.toMeridian()
51
-
52
- var fullTimeDisplay = function fullTimeDisplay(dateTimestamp, timeDisplay, timezone, showTimezone) {
53
- if (showTimezone == 'true' && timezone.length > 0) {
54
- timeDisplay = timeDisplay + ' ' + dateTimestamp.toTimezone()
55
- }
56
- return timeDisplay
57
- }
58
-
59
- var fullDateDisplay = function fullDateDisplay(dateTimestamp, currentYear, dateDisplay, timezone, showTimezone) {
60
- var fullDisplay = dateTimestamp.toMonth() + ' ' + dateTimestamp.toDay()
61
- if (dateTimestamp.toYear() > currentYear) {
62
- fullDisplay = fullDisplay + ', ' + dateTimestamp.toYear().toString()
63
- }
64
- return fullDisplay + ' \u00b7 ' + fullTimeDisplay(dateTimestamp, timeDisplay, timezone, showTimezone)
65
- }
66
-
67
- var fullElapsedDisplay = function fullElapsedDisplay(showUser, text, dateTimestamp){
68
- var userDisplay = (showUser == 'true' && text.length > 0) ? ' by ' + text : ''
69
- return 'Last updated' + userDisplay + ' ' + dateTimestamp.value.fromNow()
70
- }
71
-
72
- var fullUpdatedDisplay = function fullUpdatedDisplay(showUser, text, timeDisplay, timezone, showTimezone){
73
- var userDisplay = (showUser == 'true' && text.length > 0) ? ' by ' + text : ''
74
- return 'Last updated' + userDisplay + ' at ' + fullTimeDisplay(dateTimestamp, timeDisplay, timezone, showTimezone)
75
- }
20
+ const { id, className, data = {}, text } = props
21
+ const dataProps = buildDataProps(data)
22
+ const pbCss = buildCss('pb_timestamp_kit')
76
23
 
77
24
  return (
78
- <div className={classes}>
79
- <div className="pb_timestamp_kit">
80
- <If condition={variant == 'updated'}>
81
- <Caption
82
- dark={dark}
83
- size="xs"
84
- text={fullUpdatedDisplay(showUser, text, timeDisplay, timezone, showTimezone)}
85
- />
86
- </If>
87
- <If condition={variant == 'elapsed'}>
88
- <Caption
89
- dark={dark}
90
- size="xs"
91
- text={fullElapsedDisplay(showUser, text, dateTimestamp)}
92
- />
93
- </If>
94
- <If condition={variant == 'default'}>
95
- <If condition={showDate == 'true'}>
96
- <Caption
97
- dark={dark}
98
- size="xs"
99
- text={fullDateDisplay(dateTimestamp, currentYear, dateDisplay, timezone, showTimezone)}
100
- />
101
- </If>
102
- <If condition={showDate == 'false'}>
103
- <Caption
104
- dark={dark}
105
- size="xs"
106
- text={timeDisplay}
107
- />
108
- </If>
109
- </If>
110
- </div>
25
+ <div
26
+ {...dataProps}
27
+ className={classnames(pbCss, globalProps(props), className)}
28
+ id={id}
29
+ >
30
+ <Caption
31
+ size="xs"
32
+ tag="span"
33
+ text={text}
34
+ />
111
35
  </div>
112
36
  )
113
37
  }
@@ -1,16 +1,5 @@
1
1
  @import "timestamp-mixins";
2
- @import "../tokens/colors";
3
2
 
4
- [class^=pb_timestamp_kit]{
3
+ [class^=pb_timestamp_kit] {
5
4
  @include pb_timestamp;
6
-
7
- &[class*=_center] {
8
- text-align: center;
9
- }
10
- &[class*=_right] {
11
- text-align: right;
12
- }
13
- &[class*=_dark] {
14
- color: $text_dk_default;
15
- }
16
5
  }
@@ -1,21 +1 @@
1
- <%= pb_rails("timestamp", props: {
2
- timestamp: DateTime.now,
3
- show_date: false,
4
- align: "left"
5
- }) %>
6
-
7
- <br>
8
-
9
- <%= pb_rails("timestamp", props: {
10
- timestamp: DateTime.now,
11
- show_date: true,
12
- align: "left"
13
- }) %>
14
-
15
- <br>
16
-
17
- <%= pb_rails("timestamp", props: {
18
- timestamp: DateTime.now + 4.years,
19
- show_date: true,
20
- align: "left"
21
- }) %>
1
+ <%= pb_rails("timestamp", props: { text: "20 seconds ago" }) %>
@@ -1,35 +1,8 @@
1
1
  import React from 'react'
2
- import Timestamp from '../_timestamp.jsx'
2
+ import { Timestamp } from '../../'
3
3
 
4
- const TimestampDefault = (props) => {
5
- return (
6
- <div>
7
- <Timestamp
8
- align="left"
9
- showDate="false"
10
- timestamp={new Date().getTime()}
11
- {...props}
12
- />
13
-
14
- <br />
15
-
16
- <Timestamp
17
- align="left"
18
- showDate="true"
19
- timestamp={new Date().getTime()}
20
- {...props}
21
- />
22
-
23
- <br />
24
-
25
- <Timestamp
26
- align="left"
27
- showDate="true"
28
- timestamp={new Date((new Date()).getFullYear() + 4, (new Date().getMonth()), (new Date().getDate() + 1)).getTime()}
29
- {...props}
30
- />
31
- </div>
32
- )
33
- }
4
+ const TimestampDefault = () => (
5
+ <Timestamp text="20 seconds ago" />
6
+ )
34
7
 
35
8
  export default TimestampDefault
@@ -2,20 +2,6 @@ examples:
2
2
 
3
3
  rails:
4
4
  - timestamp_default: Default
5
- - timestamp_align: Alignments
6
- - timestamp_timezones: Timezones
7
- - timestamp_timezones_align: Timezones - Alignments
8
- - timestamp_updated: Last Updated by
9
- - timestamp_updated_align: Last Updated by - Alignments
10
- - timestamp_elapsed: Time Ago
11
- - timestamp_elapsed_align: Time Ago - Alignments
12
5
 
13
6
  react:
14
7
  - timestamp_default: Default
15
- - timestamp_align: Alignments
16
- - timestamp_timezones: Timezones
17
- - timestamp_timezones_align: Timezones - Alignments
18
- - timestamp_updated: Last Updated by
19
- - timestamp_updated_align: Last Updated by - Alignments
20
- - timestamp_elapsed: Time Ago
21
- - timestamp_elapsed_align: Time Ago - Alignments
@@ -1,8 +1 @@
1
1
  export { default as TimestampDefault } from './_timestamp_default.jsx'
2
- export { default as TimestampAlign } from './_timestamp_align.jsx'
3
- export { default as TimestampTimezones } from './_timestamp_timezones.jsx'
4
- export { default as TimestampTimezonesAlign } from './_timestamp_timezones_align.jsx'
5
- export { default as TimestampUpdated } from './_timestamp_updated.jsx'
6
- export { default as TimestampUpdatedAlign } from './_timestamp_updated_align.jsx'
7
- export { default as TimestampElapsed } from './_timestamp_elapsed.jsx'
8
- export { default as TimestampElapsedAlign } from './_timestamp_elapsed_align.jsx'
@@ -3,80 +3,14 @@
3
3
  module Playbook
4
4
  module PbTimestamp
5
5
  class Timestamp
6
- include ActionView::Helpers::DateHelper
7
6
  include Playbook::Props
8
7
 
9
8
  partial "pb_timestamp/timestamp"
10
9
 
11
10
  prop :text
12
- prop :timestamp, required: true
13
-
14
- prop :dark, type: Playbook::Props::Boolean,
15
- default: false
16
- prop :align, type: Playbook::Props::Enum,
17
- values: %w[left center right],
18
- default: "left"
19
- prop :show_date, type: Playbook::Props::Boolean,
20
- default: true
21
- prop :show_timezone, type: Playbook::Props::Boolean,
22
- default: false
23
- prop :show_user, type: Playbook::Props::Boolean,
24
- default: false
25
- prop :timezone, default: "America/New_York"
26
- prop :variant, type: Playbook::Props::Enum,
27
- values: %w[default elapsed updated],
28
- default: "default"
29
11
 
30
12
  def classname
31
- generate_classname("pb_timestamp_kit", variant_class, align)
32
- end
33
-
34
- def format_year_string
35
- pb_date_time.to_year != DateTime.now.year.to_s ? ", #{pb_date_time.to_year}" : ""
36
- end
37
-
38
- def format_time_string
39
- "#{pb_date_time.to_hour}:#{pb_date_time.to_minutes}#{pb_date_time.to_meridian} #{format_timezone_string}".strip
40
- end
41
-
42
- def format_timezone_string
43
- timezone && show_timezone ? pb_date_time.to_timezone.to_s : ""
44
- end
45
-
46
- def format_date_string
47
- "#{pb_date_time.to_month_downcase} #{pb_date_time.to_unpadded_day}#{format_year_string}"
48
- end
49
-
50
- def format_datetime_string
51
- "#{format_date_string} &middot; #{format_time_string}".html_safe
52
- end
53
-
54
- def format_updated_string
55
- user_string = show_user ? " by #{text}" : ""
56
-
57
- case variant
58
- when "updated"
59
- datetime_string = " on #{format_date_string} at #{format_time_string}"
60
- when "elapsed"
61
- datetime_string = " #{time_ago_in_words(pb_date_time.convert_to_timestamp)} ago"
62
- end
63
-
64
- "Last updated#{user_string}#{datetime_string}"
65
- end
66
-
67
- private
68
-
69
- def pb_date_time
70
- Playbook::PbKit::PbDateTime.new(timestamp, timezone)
71
- end
72
-
73
- def variant_class
74
- case variant
75
- when "updated"
76
- "updated"
77
- when "elapsed"
78
- "elapsed"
79
- end
13
+ generate_classname("pb_timestamp_kit")
80
14
  end
81
15
  end
82
16
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- VERSION = "7.4.0"
4
+ VERSION = "7.5.1"
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: 7.4.0
4
+ version: 7.5.1
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-29 00:00:00.000000000 Z
12
+ date: 2020-11-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -395,6 +395,8 @@ extra_rdoc_files: []
395
395
  files:
396
396
  - README.md
397
397
  - Rakefile
398
+ - app/assets/images/clark.jpg
399
+ - app/assets/images/giant.jpg
398
400
  - app/assets/images/github-brands.svg
399
401
  - app/assets/images/landing-background.svg
400
402
  - app/assets/images/landing-image.svg
@@ -402,6 +404,7 @@ files:
402
404
  - app/assets/images/pb-check.svg
403
405
  - app/assets/images/pb-logo.svg
404
406
  - app/assets/images/pb-white-logo.svg
407
+ - app/assets/images/pb.logo.svg
405
408
  - app/controllers/playbook/application_controller.rb
406
409
  - app/helpers/playbook/application_helper.rb
407
410
  - app/helpers/playbook/layout_helper.rb
@@ -1923,7 +1926,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1923
1926
  - !ruby/object:Gem::Version
1924
1927
  version: '0'
1925
1928
  requirements: []
1926
- rubygems_version: 3.1.4
1929
+ rubyforge_project:
1930
+ rubygems_version: 2.7.3
1927
1931
  signing_key:
1928
1932
  specification_version: 4
1929
1933
  summary: Playbook Design System