playbook_ui 14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5738 → 14.12.0.pre.alpha.PLAY1602lightboxoverlapnitrobugzindextoken5751

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.
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.12.0"
5
- VERSION = "14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5738"
5
+ VERSION = "14.12.0.pre.alpha.PLAY1602lightboxoverlapnitrobugzindextoken5751"
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: 14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5738
4
+ version: 14.12.0.pre.alpha.PLAY1602lightboxoverlapnitrobugzindextoken5751
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -1343,10 +1343,8 @@ files:
1343
1343
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss
1344
1344
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx
1345
1345
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_description.md
1346
- - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb
1347
1346
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.jsx
1348
- - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_rails.md
1349
- - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_react.md
1347
+ - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.md
1350
1348
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children.html.erb
1351
1349
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children.jsx
1352
1350
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children.md
@@ -1,33 +0,0 @@
1
- <%= pb_rails("button", props: { text: "Show Closeable Auto Close Toast", variant: "secondary", data: { toast: "#toast-auto-close-closeable" } }) %>
2
-
3
- <%= pb_rails("fixed_confirmation_toast", props: {
4
- auto_close: 10000,
5
- closeable: true,
6
- id: "toast-auto-close-closeable",
7
- text: "I will disappear in 10 seconds.",
8
- status: "tip",
9
- vertical: "top",
10
- horizontal: "center"
11
- }) %>
12
-
13
- <script>
14
- document.addEventListener('DOMContentLoaded', () => {
15
- const toast10SecCloseable = document.querySelector("#toast-auto-close-closeable")
16
- const button10SecCloseable = document.querySelector("button[data-toast='#toast-auto-close-closeable']")
17
-
18
- const originalToast = toast10SecCloseable.cloneNode(true)
19
-
20
- if (toast10SecCloseable) {
21
- toast10SecCloseable.remove()
22
- }
23
-
24
- if (button10SecCloseable) {
25
- button10SecCloseable.onclick = () => {
26
- const newToast = originalToast.cloneNode(true)
27
- newToast.style.display = "flex"
28
-
29
- document.body.appendChild(newToast)
30
- }
31
- }
32
- })
33
- </script>
@@ -1,3 +0,0 @@
1
- Auto close is used when you want the confirmation toast to close automatically after a certain time. `auto_close` property will be a delay number in ms. The `auto_close` property currently only works in rails when it is a closeable one (`closeable: true`).
2
-
3
- The script tag in this code snippet is for demonstration purposes only. It clones the toast in order to have it appear with a button click prompt and not upon initial page load. In a typical production environment the event triggering a fixed confirmation toast to appear would be handled by a controller or a separate javascript file.