playbook_ui 10.9.0 → 10.13.0.pre.node.update

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.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +1 -1
  3. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_inline_styles.scss +4 -0
  4. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx +22 -2
  5. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +32 -0
  6. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions.html.erb +90 -0
  7. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions.jsx +105 -0
  8. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +2 -0
  9. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +1 -0
  10. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +11 -1
  11. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tooltip.html.erb +59 -0
  12. data/app/pb_kits/playbook/pb_progress_step/docs/example.yml +2 -2
  13. data/app/pb_kits/playbook/pb_progress_step/progress_step_item.html.erb +12 -1
  14. data/app/pb_kits/playbook/pb_progress_step/progress_step_item.rb +21 -0
  15. data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +0 -15
  16. data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +0 -15
  17. data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +0 -15
  18. data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +0 -15
  19. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +5 -1
  20. data/app/pb_kits/playbook/pb_timestamp/_timestamp.jsx +1 -1
  21. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.html.erb +24 -0
  22. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx +34 -5
  23. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.html.erb +8 -0
  24. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx +14 -3
  25. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.html.erb +20 -0
  26. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx +28 -4
  27. data/dist/reset.css +60 -1
  28. data/lib/playbook/version.rb +2 -2
  29. metadata +7 -28
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6738352dabfe04589eca748d37fea92e74bd7684ee2f48bc4e09c4c1af0971d0
4
- data.tar.gz: b896c23edb82d87be0f1f51098cf121e93ef29199b52084af8b46a12894ebac9
3
+ metadata.gz: 0e3bef4b4c16e0fe2d51c365b0fc52340324afd59b8f94650fa1ebd39307773c
4
+ data.tar.gz: 4a69c6cf7d912a368b92286224ad19fcc06de88ae3dca63074aabfdcb6217400
5
5
  SHA512:
6
- metadata.gz: d36fca433fbb9a395d407ae6f684ad46345d4803db855bad56d518efb8a96cc751f1fb6181ba0ef298a19ae6d281b974d7887bd70a06daae1a89984095907385
7
- data.tar.gz: 95dccde272cc2c53415a39a4de02dbc677db44e54a6625796d8fdc446656b9d555f81a31b7e2d9dc29d8dd7fa8dd2570ede988c56cdaafefe95539e0277ab895
6
+ metadata.gz: 95fa1b261d673deef080479651865dfe1a7bbe3305076f4270e48f36ecf1f79406e6794baa41c44475a16e8737529f3f7d8283b7b1a6b6f8f8bc9f7efa5c48dd
7
+ data.tar.gz: 94f7fe481bd6345176e026b4384e8136f24f966554f3bc39f6a30c52b9e5479f8ad038dc290a7d114694504691a0e3a135d16efd7969b43fd281e692bf34ba52
@@ -31,11 +31,11 @@
31
31
  }
32
32
  }
33
33
  }
34
+
34
35
  &:focus,:focus-within{
35
36
  div.cal_icon_wrapper, input.text_input{
36
37
  @include transition_default;
37
38
  border-color: $primary;
38
39
  }
39
40
  }
40
-
41
41
  }
@@ -9,6 +9,10 @@
9
9
  [class^=pb_date_picker_kit] {
10
10
  /*Default - No value in date picker*/
11
11
  &.inline-date-picker {
12
+ [class^="pb_text_input_kit"] .text_input_wrapper .flatpickr-wrapper input::placeholder,
13
+ [class^="pb_text_input_kit"] .text_input_wrapper .flatpickr-wrapper .text_input .placeholder {
14
+ opacity: 1;
15
+ }
12
16
  &:not(:hover) {
13
17
  #date-picker-inline-angle-down {
14
18
  svg {
@@ -1,6 +1,6 @@
1
1
  /* @flow */
2
2
 
3
- import React, { useState } from 'react'
3
+ import React, { useEffect, useState } from 'react'
4
4
  import classnames from 'classnames'
5
5
 
6
6
  import { globalProps } from '../utilities/globalProps'
@@ -19,25 +19,45 @@ type FixedConfirmationToastProps = {
19
19
  className?: string,
20
20
  closeable?: boolean,
21
21
  data?: string,
22
+ horizontal?: 'right' | 'left' | 'center',
22
23
  id?: string,
23
24
  multiLine?: boolean,
25
+ onClose?: () => void,
26
+ open?: boolean,
24
27
  status?: 'success' | 'error' | 'neutral' | 'tip',
25
28
  text: string,
29
+ vertical?: 'top' | 'bottom',
26
30
  }
27
31
 
28
32
  const FixedConfirmationToast = (props: FixedConfirmationToastProps) => {
29
33
  const [showToast, toggleToast] = useState(true)
30
- const { className, closeable = false, multiLine = false, status = 'neutral', text } = props
34
+ const {
35
+ className,
36
+ closeable = false,
37
+ horizontal,
38
+ multiLine = false,
39
+ onClose = () => {},
40
+ open = true,
41
+ status = 'neutral',
42
+ text,
43
+ vertical,
44
+ } = props
31
45
  const css = classnames(
32
46
  `pb_fixed_confirmation_toast_kit_${status}`,
33
47
  { '_multi_line': multiLine },
48
+ { [`positioned_toast ${vertical} ${horizontal}`]: vertical && horizontal },
34
49
  globalProps(props),
35
50
  className
36
51
  )
37
52
  const icon = iconMap[status]
38
53
 
54
+ useEffect(() => {
55
+ toggleToast(open)
56
+ }, [open])
57
+
39
58
  const handleClick = () => {
40
59
  toggleToast(!closeable)
60
+ onClose()
41
61
  }
42
62
 
43
63
  return (
@@ -1,3 +1,4 @@
1
+ @import "../tokens/positioning";
1
2
  @import "../tokens/spacing";
2
3
  @import "../tokens/colors";
3
4
  @import "../pb_body/body";
@@ -30,6 +31,37 @@ $confirmation_toast_colors: (
30
31
  opacity: 1;
31
32
  }
32
33
 
34
+ &.positioned_toast {
35
+ position: fixed;
36
+ z-index: $z_9;
37
+ display: flex;
38
+ justify-content: space-around;
39
+
40
+ &.top {
41
+ top: $space_md;
42
+ }
43
+
44
+ &.bottom {
45
+ bottom: $space_md;
46
+ }
47
+
48
+ &.left {
49
+ left: $space_md;
50
+ right: auto;
51
+ }
52
+
53
+ &.center {
54
+ left: 50%;
55
+ right: auto;
56
+ transform: translateX(-50%);
57
+ }
58
+
59
+ &.right {
60
+ left: auto;
61
+ right: $space_md;
62
+ }
63
+ }
64
+
33
65
  @each $color_name, $color_value in $confirmation_toast_colors {
34
66
  &[class*=_#{$color_name}] {
35
67
  background: $color_value;
@@ -0,0 +1,90 @@
1
+ <%= pb_rails("button", props: { text: "Top Center", variant: "secondary", data: { toast: "#toast-top-center" } }) %>
2
+ <%= pb_rails("button", props: { text: "Top Left", variant: "secondary", data: { toast: "#toast-top-left" } }) %>
3
+ <%= pb_rails("button", props: { text: "Top Right", variant: "secondary", data: { toast: "#toast-top-right" } }) %>
4
+ <%= pb_rails("button", props: { text: "Bottom Center", variant: "secondary", data: { toast: "#toast-bottom-center" } }) %>
5
+ <%= pb_rails("button", props: { text: "Bottom Left", variant: "secondary", data: { toast: "#toast-bottom-left" } }) %>
6
+ <%= pb_rails("button", props: { text: "Bottom Right", variant: "secondary", data: { toast: "#toast-bottom-right" } }) %>
7
+
8
+ <%= pb_rails("fixed_confirmation_toast", props: {
9
+ classname: "toast-to-hide",
10
+ closeable: true,
11
+ id: "toast-top-center",
12
+ text: "Top Center",
13
+ status: "neutral",
14
+ vertical: "top",
15
+ horizontal: "center"
16
+ }) %>
17
+
18
+ <%= pb_rails("fixed_confirmation_toast", props: {
19
+ classname: "toast-to-hide",
20
+ closeable: true,
21
+ id: "toast-top-left",
22
+ text: "Top Left",
23
+ status: "neutral",
24
+ vertical: "top",
25
+ horizontal: "left"
26
+ }) %>
27
+
28
+ <%= pb_rails("fixed_confirmation_toast", props: {
29
+ classname: "toast-to-hide",
30
+ closeable: true,
31
+ id: "toast-top-right",
32
+ text: "Top Right",
33
+ status: "neutral",
34
+ vertical: "top",
35
+ horizontal: "right"
36
+ }) %>
37
+
38
+ <%= pb_rails("fixed_confirmation_toast", props: {
39
+ classname: "toast-to-hide",
40
+ closeable: true,
41
+ id: "toast-bottom-center",
42
+ text: "Bottom Center",
43
+ status: "neutral",
44
+ vertical: "bottom",
45
+ horizontal: "center"
46
+ }) %>
47
+
48
+ <%= pb_rails("fixed_confirmation_toast", props: {
49
+ classname: "toast-to-hide",
50
+ closeable: true,
51
+ id: "toast-bottom-left",
52
+ text: "Bottom Left",
53
+ status: "neutral",
54
+ vertical: "bottom",
55
+ horizontal: "left"
56
+ }) %>
57
+
58
+ <%= pb_rails("fixed_confirmation_toast", props: {
59
+ classname: "toast-to-hide",
60
+ closeable: true,
61
+ id: "toast-bottom-right",
62
+ text: "Bottom Right",
63
+ status: "neutral",
64
+ vertical: "bottom",
65
+ horizontal: "right"
66
+ }) %>
67
+
68
+ <script type="text/javascript">
69
+ const toasts = document.querySelectorAll(".toast-to-hide")
70
+ const buttons = document.querySelectorAll("button[data-toast]")
71
+
72
+ const hideToasts = () => {
73
+ toasts.forEach((toast) => {
74
+ toast.style.display = "none"
75
+ })
76
+ }
77
+
78
+ hideToasts()
79
+
80
+ buttons.forEach((button) => {
81
+ button.onclick = () => {
82
+ hideToasts()
83
+ let toast = document.querySelector(button.getAttribute("data-toast"))
84
+
85
+ if (toast) {
86
+ toast.style.display = "flex"
87
+ }
88
+ }
89
+ })
90
+ </script>
@@ -0,0 +1,105 @@
1
+ import React, { useState } from 'react'
2
+
3
+ import Button from '../../pb_button/_button'
4
+ import FixedConfirmationToast from '../_fixed_confirmation_toast'
5
+
6
+ const FixedConfirmationToastPositions = (props) => {
7
+ const [state, setState] = useState({
8
+ open: false,
9
+ vertical: 'top',
10
+ horizontal: 'center',
11
+ })
12
+
13
+ const { vertical, horizontal, open } = state
14
+
15
+ const handleClick = (newState) => () => {
16
+ setState({ open: true, ...newState })
17
+ }
18
+
19
+ const handleClose = () => {
20
+ setState({ ...state, open: false })
21
+ }
22
+
23
+ return (
24
+ <div>
25
+ <Button
26
+ onClick={handleClick({
27
+ horizontal: 'center',
28
+ open: true,
29
+ vertical: 'top',
30
+ })}
31
+ text="Top Center"
32
+ variant="secondary"
33
+ {...props}
34
+ />
35
+ {' '}
36
+ <Button
37
+ onClick={handleClick({
38
+ horizontal: 'left',
39
+ open: true,
40
+ vertical: 'top',
41
+ })}
42
+ text="Top Left"
43
+ variant="secondary"
44
+ {...props}
45
+ />
46
+ {' '}
47
+ <Button
48
+ onClick={handleClick({
49
+ horizontal: 'right',
50
+ open: true,
51
+ vertical: 'top',
52
+ })}
53
+ text="Top Right"
54
+ variant="secondary"
55
+ {...props}
56
+ />
57
+ {' '}
58
+ <Button
59
+ onClick={handleClick({
60
+ horizontal: 'center',
61
+ open: true,
62
+ vertical: 'bottom',
63
+ })}
64
+ text="Bottom Center"
65
+ variant="secondary"
66
+ {...props}
67
+ />
68
+ {' '}
69
+ <Button
70
+ onClick={handleClick({
71
+ horizontal: 'left',
72
+ open: true,
73
+ vertical: 'bottom',
74
+ })}
75
+ text="Bottom Left"
76
+ variant="secondary"
77
+ {...props}
78
+ />
79
+ {' '}
80
+ <Button
81
+ onClick={handleClick({
82
+ horizontal: 'right',
83
+ open: true,
84
+ vertical: 'bottom',
85
+ })}
86
+ text="Bottom Right"
87
+ variant="secondary"
88
+ {...props}
89
+ />
90
+
91
+ <FixedConfirmationToast
92
+ closeable
93
+ horizontal={horizontal}
94
+ onClose={handleClose}
95
+ open={open}
96
+ status="neutral"
97
+ text={`${vertical} ${horizontal}`}
98
+ vertical={vertical}
99
+ {...props}
100
+ />
101
+ </div>
102
+ )
103
+ }
104
+
105
+ export default FixedConfirmationToastPositions
@@ -4,8 +4,10 @@ examples:
4
4
  - fixed_confirmation_toast_default: Default
5
5
  - fixed_confirmation_toast_multi_line: Multi Line
6
6
  - fixed_confirmation_toast_close: Click to Close
7
+ - fixed_confirmation_toast_positions: Click to Show Positions
7
8
 
8
9
  react:
9
10
  - fixed_confirmation_toast_default: Default
10
11
  - fixed_confirmation_toast_multi_line: Multi Line
11
12
  - fixed_confirmation_toast_close: Click to Close
13
+ - fixed_confirmation_toast_positions: Click to Show Positions
@@ -1,3 +1,4 @@
1
1
  export { default as FixedConfirmationToastDefault } from './_fixed_confirmation_toast_default.jsx'
2
2
  export { default as FixedConfirmationToastMultiLine } from './_fixed_confirmation_toast_multi_line.jsx'
3
3
  export { default as FixedConfirmationToastClose } from './_fixed_confirmation_toast_close.jsx'
4
+ export { default as FixedConfirmationToastPositions } from './_fixed_confirmation_toast_positions.jsx'
@@ -11,6 +11,12 @@ module Playbook
11
11
  default: false
12
12
  prop :closeable, type: Playbook::Props::Boolean,
13
13
  default: false
14
+ prop :horizontal, type: Playbook::Props::Enum,
15
+ values: [nil, "right", "left", "center"],
16
+ default: nil
17
+ prop :vertical, type: Playbook::Props::Enum,
18
+ values: [nil, "top", "bottom"],
19
+ default: nil
14
20
 
15
21
  def show_text?
16
22
  text.present?
@@ -20,6 +26,10 @@ module Playbook
20
26
  closeable.present? ? " remove_toast" : ""
21
27
  end
22
28
 
29
+ def position_class
30
+ horizontal && vertical ? " positioned_toast #{vertical} #{horizontal}" : ""
31
+ end
32
+
23
33
  def multi_line_class
24
34
  multi_line.present? ? "multi_line" : nil
25
35
  end
@@ -38,7 +48,7 @@ module Playbook
38
48
  end
39
49
 
40
50
  def classname
41
- generate_classname("pb_fixed_confirmation_toast_kit", status, multi_line_class) + close_class
51
+ generate_classname("pb_fixed_confirmation_toast_kit", status, multi_line_class) + close_class + position_class
42
52
  end
43
53
  end
44
54
  end
@@ -0,0 +1,59 @@
1
+ <%= pb_rails("progress_step", props: {orientation: "horizontal"}) do %>
2
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-1", tooltip: "Tooltip for step 1", tooltip_position: "right", step_direction: "horizontal" }) do %>
3
+ step 1
4
+ <% end %>
5
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-2", tooltip: "Tooltip for step 2", step_direction: "horizontal" }) do %>
6
+ step 2
7
+ <% end %>
8
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "active", classname: "tooltip-trigger-3", tooltip: "Tooltip for step 3", tooltip_position: "left", step_direction: "horizontal" }) do %>
9
+ step 3
10
+ <% end %>
11
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-4", tooltip: "Tooltip for step 4", tooltip_position: "bottom" }) do %>
12
+ step 4
13
+ <% end %>
14
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-5", tooltip: "Tooltip for step 5" }) do %>
15
+ step 5
16
+ <% end %>
17
+ <% end %>
18
+
19
+ <br /><br />
20
+
21
+ <%= pb_rails("progress_step", props: {orientation: "vertical"}) do %>
22
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-6", tooltip: "Tooltip step 1", step_direction: "vertical" }) do %>
23
+ <% end %>
24
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "active", classname: "tooltip-trigger-7", tooltip: "Tooltip step 2", tooltip_position: "left"}) do %>
25
+ <% end %>
26
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-8", tooltip: "Tooltip step 3", tooltip_position: "top", step_direction: "vertical" }) do %>
27
+ <% end %>
28
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-9", tooltip: "Tooltip step 4", tooltip_position: "bottom"}) do %>
29
+ <% end %>
30
+ <% end %>
31
+
32
+ <br /><br>
33
+ <%= pb_rails("progress_step",props:{ variant:"tracker", icon:true}) do %>
34
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-10", tooltip: "The order has been received", step_direction: "horizontal" , tooltip_position: "right" }) do %>
35
+ <%= pb_rails("caption", props:{text: "Ordered"})%>
36
+ <% end %>
37
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "active", classname: "tooltip-trigger-11", tooltip:"Item(s) have been shipped" }) do %>
38
+ <%= pb_rails("caption", props:{text: "Shipped"})%>
39
+ <% end %>
40
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-12", tooltip:"This step has not been reached", tooltip_position: "left" }) do %>
41
+ <%= pb_rails("caption", props:{text: "Delivered"})%>
42
+ <% end %>
43
+ <% end %>
44
+
45
+ <br /><br>
46
+ <%= pb_rails("progress_step",props:{ variant:"tracker", icon:true}) do %>
47
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-13", tooltip: "The order has been processed", tooltip_position: "right" }) do %>
48
+ <%= pb_rails("caption", props:{text: "Ordered"})%>
49
+ <% end %>
50
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "active", icon: "exclamation-triangle", classname: "tooltip-trigger-14", tooltip: "More details needed before shipment", tooltip_position: "bottom" }) do %>
51
+ <%= pb_rails("caption", props:{text: "Shipped"})%>
52
+ <% end %>
53
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-15", tooltip: "This step is inactive"}) do %>
54
+ <%= pb_rails("caption", props:{text: "Out for Delivery"})%>
55
+ <% end %>
56
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-16", tooltip: "Estimated delivery: Jun 27", tooltip_position: "left"}) do %>
57
+ <%= pb_rails("caption", props:{text: "Delivered"})%>
58
+ <% end %>
59
+ <% end %>
@@ -4,8 +4,8 @@ examples:
4
4
  - progress_step_vertical: Vertical
5
5
  - progress_step_tracker: Tracker
6
6
  - progress_step_custom_icon: Custom Icon
7
-
8
-
7
+ - progress_step_tooltip: Tooltip
8
+
9
9
  react:
10
10
  - progress_step_default: Default
11
11
  - progress_step_vertical: Vertical
@@ -2,10 +2,21 @@
2
2
  id: object.id,
3
3
  data: object.data,
4
4
  class: object.classname) do %>
5
- <div class="box">
5
+ <div class="box" style="max-width: min-content;" id="<%= object.tooltip_trigger_class %>">
6
6
  <div class="circle">
7
7
  <%= pb_rails("icon", props: { icon: object.icon, size: "xs" }) if object.icon.present? %>
8
8
  </div>
9
+ <% if object.tooltip.present? %>
10
+ <div>
11
+ <%= pb_rails("tooltip", props: {
12
+ trigger_element_selector: "##{object.tooltip_trigger_class}",
13
+ tooltip_id: "example-tooltip",
14
+ position: object.step_tooltip_position
15
+ }) do %>
16
+ <%= object.tooltip %>
17
+ <% end %>
18
+ </div>
19
+ <% end %>
9
20
  <div class="content">
10
21
  <%= content.presence %>
11
22
  <div>
@@ -8,6 +8,11 @@ module Playbook
8
8
  default: "inactive"
9
9
 
10
10
  prop :icon, required: false, default: "check"
11
+ prop :tooltip, required: false
12
+ prop :tooltip_position, required: false
13
+ prop :step_direction, type: Playbook::Props::Enum,
14
+ values: %w[horizontal vertical],
15
+ default: "horizontal"
11
16
 
12
17
  def name_icon
13
18
  icon || "check"
@@ -16,6 +21,22 @@ module Playbook
16
21
  def classname
17
22
  generate_classname("pb_progress_step_item", status)
18
23
  end
24
+
25
+ def tooltip_trigger_class
26
+ classname.split(" ").last
27
+ end
28
+
29
+ def step_tooltip_position
30
+ if tooltip_position.present?
31
+ if step_direction == "vertical"
32
+ "right"
33
+ else
34
+ "top"
35
+ end
36
+ else
37
+ tooltip_position
38
+ end
39
+ end
19
40
  end
20
41
  end
21
42
  end
@@ -118,19 +118,4 @@
118
118
  }
119
119
  }
120
120
  }
121
- &.hide-labels {
122
- tbody {
123
- tr {
124
- td {
125
- &::before {
126
- content: '';
127
- left: 0;
128
- padding-right: 0;
129
- position: relative;
130
- width: 0;
131
- }
132
- }
133
- }
134
- }
135
- }
136
121
  }
@@ -118,19 +118,4 @@
118
118
  }
119
119
  }
120
120
  }
121
- &.hide-labels {
122
- tbody {
123
- tr {
124
- td {
125
- &::before {
126
- content: '';
127
- left: 0;
128
- padding-right: 0;
129
- position: relative;
130
- width: 0;
131
- }
132
- }
133
- }
134
- }
135
- }
136
121
  }
@@ -118,19 +118,4 @@
118
118
  }
119
119
  }
120
120
  }
121
- &.hide-labels {
122
- tbody {
123
- tr {
124
- td {
125
- &::before {
126
- content: '';
127
- left: 0;
128
- padding-right: 0;
129
- position: relative;
130
- width: 0;
131
- }
132
- }
133
- }
134
- }
135
- }
136
121
  }
@@ -118,19 +118,4 @@
118
118
  }
119
119
  }
120
120
  }
121
- &.hide-labels {
122
- tbody {
123
- tr {
124
- td {
125
- &::before {
126
- content: '';
127
- left: 0;
128
- padding-right: 0;
129
- position: relative;
130
- width: 0;
131
- }
132
- }
133
- }
134
- }
135
- }
136
121
  }
@@ -90,7 +90,11 @@
90
90
  }
91
91
  }
92
92
  &.inline {
93
- &:not(:hover) {
93
+ .text_input_wrapper input::placeholder,
94
+ .text_input_wrapper .text_input .placeholder {
95
+ opacity: 1;
96
+ }
97
+ &:not(:hover) {
94
98
  .text_input_wrapper input:not(:focus) {
95
99
  background-color: transparent;
96
100
  border-color: transparent;
@@ -70,7 +70,7 @@ const Timestamp = (props: TimestampProps) => {
70
70
 
71
71
  const fullDateDisplay = () => {
72
72
  let fullDisplay = `${dateTimestamp.toMonth()} ${dateTimestamp.toDay()}`
73
- if (dateTimestamp.toYear() > currentYear) {
73
+ if (dateTimestamp.toYear() !== currentYear) {
74
74
  fullDisplay = `${fullDisplay}, ${dateTimestamp.toYear()}`
75
75
  }
76
76
  return `${fullDisplay} ${' \u00b7 '} ${fullTimeDisplay()}`
@@ -20,6 +20,14 @@
20
20
  align: "left"
21
21
  }) %>
22
22
 
23
+ <br>
24
+
25
+ <%= pb_rails("timestamp", props: {
26
+ timestamp: DateTime.now - 1.year,
27
+ show_date: true,
28
+ align: "left"
29
+ }) %>
30
+
23
31
  <br><br>
24
32
 
25
33
  <%= pb_rails("timestamp", props: {
@@ -44,6 +52,14 @@
44
52
  align: "center"
45
53
  }) %>
46
54
 
55
+ <br>
56
+
57
+ <%= pb_rails("timestamp", props: {
58
+ timestamp: DateTime.now - 1.year,
59
+ show_date: true,
60
+ align: "center"
61
+ }) %>
62
+
47
63
  <br><br>
48
64
 
49
65
  <%= pb_rails("timestamp", props: {
@@ -67,3 +83,11 @@
67
83
  show_date: true,
68
84
  align: "right"
69
85
  }) %>
86
+
87
+ <br>
88
+
89
+ <%= pb_rails("timestamp", props: {
90
+ timestamp: DateTime.now - 1.year,
91
+ show_date: true,
92
+ align: "right"
93
+ }) %>
@@ -2,12 +2,14 @@ import React from 'react'
2
2
  import Timestamp from '../_timestamp.jsx'
3
3
 
4
4
  const todaysDate = new Date()
5
- const year = new Date().getFullYear() + 4
5
+ const futureYear = new Date().getFullYear() + 4
6
+ const pastYear = new Date().getFullYear() - 1
6
7
  const month = new Date().getMonth()
7
8
  const date = new Date().getDate()
8
9
  const hours = new Date().getHours()
9
10
  const minutes = new Date().getMinutes()
10
- const customDate = new Date(year, month, date, hours, minutes)
11
+ const futureDate = new Date(futureYear, month, date, hours, minutes)
12
+ const pastDate = new Date(pastYear, month, date, hours, minutes)
11
13
 
12
14
  const TimestampAlign = (props) => {
13
15
  return (
@@ -33,7 +35,16 @@ const TimestampAlign = (props) => {
33
35
  <Timestamp
34
36
  align="left"
35
37
  showDate
36
- timestamp={customDate}
38
+ timestamp={futureDate}
39
+ {...props}
40
+ />
41
+
42
+ <br />
43
+
44
+ <Timestamp
45
+ align="left"
46
+ showDate
47
+ timestamp={pastDate}
37
48
  {...props}
38
49
  />
39
50
 
@@ -61,7 +72,16 @@ const TimestampAlign = (props) => {
61
72
  <Timestamp
62
73
  align="center"
63
74
  showDate
64
- timestamp={customDate}
75
+ timestamp={futureDate}
76
+ {...props}
77
+ />
78
+
79
+ <br />
80
+
81
+ <Timestamp
82
+ align="center"
83
+ showDate
84
+ timestamp={pastDate}
65
85
  {...props}
66
86
  />
67
87
 
@@ -89,7 +109,16 @@ const TimestampAlign = (props) => {
89
109
  <Timestamp
90
110
  align="right"
91
111
  showDate
92
- timestamp={customDate}
112
+ timestamp={futureDate}
113
+ {...props}
114
+ />
115
+
116
+ <br />
117
+
118
+ <Timestamp
119
+ align="right"
120
+ showDate
121
+ timestamp={pastDate}
93
122
  {...props}
94
123
  />
95
124
  </div>
@@ -19,3 +19,11 @@
19
19
  show_date: true,
20
20
  align: "left"
21
21
  }) %>
22
+
23
+ <br>
24
+
25
+ <%= pb_rails("timestamp", props: {
26
+ timestamp: DateTime.now - 1.year,
27
+ show_date: true,
28
+ align: "left"
29
+ }) %>
@@ -2,12 +2,14 @@ import React from 'react'
2
2
  import Timestamp from '../_timestamp.jsx'
3
3
 
4
4
  const todaysDate = new Date()
5
- const year = new Date().getFullYear() + 4
5
+ const futureYear = new Date().getFullYear() + 4
6
+ const pastYear = new Date().getFullYear() - 1
6
7
  const month = new Date().getMonth()
7
8
  const date = new Date().getDate()
8
9
  const hours = new Date().getHours()
9
10
  const minutes = new Date().getMinutes()
10
- const customDate = new Date(year, month, date, hours, minutes)
11
+ const futureDate = new Date(futureYear, month, date, hours, minutes)
12
+ const pastDate = new Date(pastYear, month, date, hours, minutes)
11
13
 
12
14
  const TimestampDefault = (props) => {
13
15
  return (
@@ -33,7 +35,16 @@ const TimestampDefault = (props) => {
33
35
  <Timestamp
34
36
  align="left"
35
37
  showDate
36
- timestamp={customDate}
38
+ timestamp={futureDate}
39
+ {...props}
40
+ />
41
+
42
+ <br />
43
+
44
+ <Timestamp
45
+ align="left"
46
+ showDate
47
+ timestamp={pastDate}
37
48
  {...props}
38
49
  />
39
50
  </div>
@@ -28,6 +28,16 @@
28
28
 
29
29
  <br>
30
30
 
31
+ <%= pb_rails("timestamp", props: {
32
+ timestamp: DateTime.now - 1.year,
33
+ show_date: true,
34
+ show_timezone: true,
35
+ timezone: "America/New_York",
36
+ align: "left"
37
+ }) %>
38
+
39
+ <br>
40
+
31
41
  <%= pb_rails("timestamp", props: {
32
42
  timestamp: DateTime.now,
33
43
  show_date: false,
@@ -57,3 +67,13 @@
57
67
  }) %>
58
68
 
59
69
  <br>
70
+
71
+ <%= pb_rails("timestamp", props: {
72
+ timestamp: DateTime.now - 1.year,
73
+ show_date: true,
74
+ show_timezone: true,
75
+ timezone: "Asia/Hong_Kong",
76
+ align: "left"
77
+ }) %>
78
+
79
+ <br>
@@ -2,12 +2,14 @@ import React from 'react'
2
2
  import Timestamp from '../_timestamp.jsx'
3
3
 
4
4
  const todaysDate = new Date()
5
- const year = new Date().getFullYear() + 4
5
+ const futureYear = new Date().getFullYear() + 4
6
+ const pastYear = new Date().getFullYear() - 1
6
7
  const month = new Date().getMonth()
7
8
  const date = new Date().getDate()
8
9
  const hours = new Date().getHours()
9
10
  const minutes = new Date().getMinutes()
10
- const customDate = new Date(year, month, date, hours, minutes)
11
+ const futureDate = new Date(futureYear, month, date, hours, minutes)
12
+ const pastDate = new Date(pastYear, month, date, hours, minutes)
11
13
 
12
14
  const TimestampTimezones = (props) => {
13
15
  return (
@@ -38,7 +40,18 @@ const TimestampTimezones = (props) => {
38
40
  align="left"
39
41
  showDate
40
42
  showTimezone
41
- timestamp={customDate}
43
+ timestamp={futureDate}
44
+ timezone="America/New_York"
45
+ {...props}
46
+ />
47
+
48
+ <br />
49
+
50
+ <Timestamp
51
+ align="left"
52
+ showDate
53
+ showTimezone
54
+ timestamp={pastDate}
42
55
  timezone="America/New_York"
43
56
  {...props}
44
57
  />
@@ -71,7 +84,18 @@ const TimestampTimezones = (props) => {
71
84
  align="left"
72
85
  showDate
73
86
  showTimezone
74
- timestamp={customDate}
87
+ timestamp={futureDate}
88
+ timezone="Asia/Hong_Kong"
89
+ {...props}
90
+ />
91
+
92
+ <br />
93
+
94
+ <Timestamp
95
+ align="left"
96
+ showDate
97
+ showTimezone
98
+ timestamp={pastDate}
75
99
  timezone="Asia/Hong_Kong"
76
100
  {...props}
77
101
  />
data/dist/reset.css CHANGED
@@ -1,2 +1,61 @@
1
- *{box-sizing:border-box;margin:0;padding:0}*:before,*:after{box-sizing:border-box}html{-webkit-tap-highlight-color:rgba(0,0,0,0);height:100vh;overflow-x:hidden}body{font-family:"Proxima Nova","Helvetica Neue",Helvetica,Arial,sans_serif;font-size:16px;line-height:1.5;background-color:#F3F7FB;height:100%;letter-spacing:0;font-weight:400;font-style:normal;text-rendering:optimizeLegibility;-moz-font-feature-settings:"liga" on;color:#242B42;margin:0 !important;padding:0 !important;box-sizing:border-box;min-height:100vh;padding:50px}a{text-decoration:none;color:#0056CF}
1
+ /* CLEAN UP AND REMOVE */
2
+ /* Headings */
3
+ /* Standard Font Weights */
4
+ /* Non_Standard Font Weights */
5
+ /*=====================================
6
+ Base colors should not be documented.
7
+ Only document color use.
8
+
9
+ Colors -----------------------------*/
10
+ /* Specialty Gradient -----------------*/
11
+ /* Interface colors -------------------*/
12
+ /* Main colors ------------------------*/
13
+ /*=====================================
14
+
15
+ Background colors ------------------*/
16
+ /* Card colors ------------------*/
17
+ /* Active colors ----------------------*/
18
+ /* Hover colors -----------------------*/
19
+ /* Focus colors -----------------------*/
20
+ /* Border colors ----------------------*/
21
+ /* Shadow colors ----------------------*/
22
+ /* Text colors ------------------------*/
23
+ /* Data colors ------------------------*/
24
+ /* Status colors ----------------------*/
25
+ /* Link colors ------------------------*/
26
+ /* Product colors ---------------------*/
27
+ /* Category colors ---------------------*/
28
+ * {
29
+ box-sizing: border-box;
30
+ margin: 0;
31
+ padding: 0; }
32
+ *:before, *:after {
33
+ box-sizing: border-box; }
34
+
35
+ html {
36
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
37
+ height: 100vh;
38
+ overflow-x: hidden; }
39
+
40
+ body {
41
+ font-family: "Proxima Nova", "Helvetica Neue", Helvetica, Arial, sans_serif;
42
+ font-size: 16px;
43
+ line-height: 1.5;
44
+ background-color: #F3F7FB;
45
+ height: 100%;
46
+ letter-spacing: 0;
47
+ font-weight: 400;
48
+ font-style: normal;
49
+ text-rendering: optimizeLegibility;
50
+ -moz-font-feature-settings: "liga" on;
51
+ color: #242B42;
52
+ margin: 0 !important;
53
+ padding: 0 !important;
54
+ box-sizing: border-box;
55
+ min-height: 100vh;
56
+ padding: 50px; }
57
+
58
+ a {
59
+ text-decoration: none;
60
+ color: #0056CF; }
2
61
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- PREVIOUS_VERSION = "10.8.0"
5
- VERSION = "10.9.0"
4
+ PREVIOUS_VERSION = "10.12.0"
5
+ VERSION = "10.13.0.pre.node.update"
6
6
  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: 10.9.0
4
+ version: 10.13.0.pre.node.update
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: 2021-09-20 00:00:00.000000000 Z
12
+ date: 2021-11-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -18,9 +18,6 @@ dependencies:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 5.2.4.5
21
- - - "<"
22
- - !ruby/object:Gem::Version
23
- version: '6.0'
24
21
  type: :runtime
25
22
  prerelease: false
26
23
  version_requirements: !ruby/object:Gem::Requirement
@@ -28,9 +25,6 @@ dependencies:
28
25
  - - ">="
29
26
  - !ruby/object:Gem::Version
30
27
  version: 5.2.4.5
31
- - - "<"
32
- - !ruby/object:Gem::Version
33
- version: '6.0'
34
28
  - !ruby/object:Gem::Dependency
35
29
  name: actionview
36
30
  requirement: !ruby/object:Gem::Requirement
@@ -38,9 +32,6 @@ dependencies:
38
32
  - - ">="
39
33
  - !ruby/object:Gem::Version
40
34
  version: 5.2.4.5
41
- - - "<"
42
- - !ruby/object:Gem::Version
43
- version: '6.0'
44
35
  type: :runtime
45
36
  prerelease: false
46
37
  version_requirements: !ruby/object:Gem::Requirement
@@ -48,9 +39,6 @@ dependencies:
48
39
  - - ">="
49
40
  - !ruby/object:Gem::Version
50
41
  version: 5.2.4.5
51
- - - "<"
52
- - !ruby/object:Gem::Version
53
- version: '6.0'
54
42
  - !ruby/object:Gem::Dependency
55
43
  name: activesupport
56
44
  requirement: !ruby/object:Gem::Requirement
@@ -58,9 +46,6 @@ dependencies:
58
46
  - - ">="
59
47
  - !ruby/object:Gem::Version
60
48
  version: 5.2.4.5
61
- - - "<"
62
- - !ruby/object:Gem::Version
63
- version: '6.0'
64
49
  type: :runtime
65
50
  prerelease: false
66
51
  version_requirements: !ruby/object:Gem::Requirement
@@ -68,9 +53,6 @@ dependencies:
68
53
  - - ">="
69
54
  - !ruby/object:Gem::Version
70
55
  version: 5.2.4.5
71
- - - "<"
72
- - !ruby/object:Gem::Version
73
- version: '6.0'
74
56
  - !ruby/object:Gem::Dependency
75
57
  name: react-rails
76
58
  requirement: !ruby/object:Gem::Requirement
@@ -176,9 +158,6 @@ dependencies:
176
158
  - - ">="
177
159
  - !ruby/object:Gem::Version
178
160
  version: 5.2.4.5
179
- - - "<"
180
- - !ruby/object:Gem::Version
181
- version: '6.0'
182
161
  type: :development
183
162
  prerelease: false
184
163
  version_requirements: !ruby/object:Gem::Requirement
@@ -186,9 +165,6 @@ dependencies:
186
165
  - - ">="
187
166
  - !ruby/object:Gem::Version
188
167
  version: 5.2.4.5
189
- - - "<"
190
- - !ruby/object:Gem::Version
191
- version: '6.0'
192
168
  - !ruby/object:Gem::Dependency
193
169
  name: rspec-html-matchers
194
170
  requirement: !ruby/object:Gem::Requirement
@@ -833,6 +809,8 @@ files:
833
809
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
834
810
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx
835
811
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.md
812
+ - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions.html.erb
813
+ - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions.jsx
836
814
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml
837
815
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js
838
816
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb
@@ -1402,6 +1380,7 @@ files:
1402
1380
  - app/pb_kits/playbook/pb_progress_step/docs/_progress_step_custom_icon.html.erb
1403
1381
  - app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.html.erb
1404
1382
  - app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.jsx
1383
+ - app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tooltip.html.erb
1405
1384
  - app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.html.erb
1406
1385
  - app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.jsx
1407
1386
  - app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
@@ -2072,9 +2051,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
2072
2051
  version: '0'
2073
2052
  required_rubygems_version: !ruby/object:Gem::Requirement
2074
2053
  requirements:
2075
- - - ">="
2054
+ - - ">"
2076
2055
  - !ruby/object:Gem::Version
2077
- version: '0'
2056
+ version: 1.3.1
2078
2057
  requirements: []
2079
2058
  rubygems_version: 3.0.3
2080
2059
  signing_key: