playbook_ui_docs 13.21.0.pre.alpha.PBNTR225advancedtablefeedback2438 → 13.21.0.pre.alpha.PLAY120322465

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: 5a7abf0ceeb7d0ed9e4cd3b915bf3af0baf851e488a03437584ba7aea31ad7f7
4
- data.tar.gz: 894ada11f2499a8eed0f3b76b0a13e31eb2c8e78741fee6372422db99030eb2f
3
+ metadata.gz: f124b730cdc02e434205a9a3b25d822dd89d7e9fabda25b04c63f7c07fc51fac
4
+ data.tar.gz: 8c24fc6448e11c29af55fb36e9f3a783833100dc8caa14b25b72204652727505
5
5
  SHA512:
6
- metadata.gz: '09b137eaf2072c5feefdab4375780d82a5fc4a644d9a3be84d9f6534d6d45ec118222f03cc9d0068506d7fd5b1c07aabf169b5a60e731492cb646f9b72a10721'
7
- data.tar.gz: ac620b4c6d31a9d2e565cb535c20af628e31165ec312393a12997422162b43c01c89aa3573fdb925c457b20bd590ce12251d6329aa8312cfaf97ceae21edd1c5
6
+ metadata.gz: 35a8d533b2ec3d97ea3bb1e5203db2775f7bbf73ca3f1993670da61fc1588d38d904dd1f43d426dd9b93039ac70f828941469cc3621d63ed925f8c9e81dd583c
7
+ data.tar.gz: 6bb117a5010a8cc862ffaa7479406a04b1269c59a6c0616d9f08ed73ab99a77f37f6c4085c474ec12ccfc663bcc3dc600697f388721ba1fbddb970e54d56d6e7
@@ -1,4 +1,6 @@
1
1
  examples:
2
+ # rails:
3
+ # - advanced_table_default: Default (Required Props)
2
4
  react:
3
5
  - advanced_table_default: Default (Required Props)
4
6
  - advanced_table_loading: Loading State
@@ -0,0 +1,7 @@
1
+
2
+ <%= pb_rails("date_picker", props: { picker_id: "date-picker-none", margin_bottom: "none"}) %>
3
+ <%= pb_rails("date_picker", props: { picker_id: "date-picker-xs", margin_bottom: "xs"}) %>
4
+ <%= pb_rails("date_picker", props: { picker_id: "date-picker-sm", margin_bottom: "sm"}) %>
5
+ <%= pb_rails("date_picker", props: { picker_id: "date-picker-md", margin_bottom: "md"}) %>
6
+ <%= pb_rails("date_picker", props: { picker_id: "date-picker-lg", margin_bottom: "lg"}) %>
7
+ <%= pb_rails("date_picker", props: { picker_id: "date-picker-xl", margin_bottom: "xl"}) %>
@@ -0,0 +1,41 @@
1
+
2
+ import React from 'react'
3
+
4
+ import DatePicker from '../_date_picker'
5
+
6
+ const DatePickerMarginBottom = (props) => (
7
+ <div>
8
+ <DatePicker
9
+ marginBottom="none"
10
+ pickerId="date-picker-none"
11
+ {...props}
12
+ />
13
+ <DatePicker
14
+ marginBottom="xs"
15
+ pickerId="date-picker-xs"
16
+ {...props}
17
+ />
18
+ <DatePicker
19
+ marginBottom="sm"
20
+ pickerId="date-picker-sm"
21
+ {...props}
22
+ />
23
+ <DatePicker
24
+ marginBottom="md"
25
+ pickerId="date-picker-md"
26
+ {...props}
27
+ />
28
+ <DatePicker
29
+ marginBottom="lg"
30
+ pickerId="date-picker-lg"
31
+ {...props}
32
+ />
33
+ <DatePicker
34
+ marginBottom="xl"
35
+ pickerId="date-picker-xl"
36
+ {...props}
37
+ />
38
+ </div>
39
+ )
40
+
41
+ export default DatePickerMarginBottom
@@ -20,6 +20,7 @@ examples:
20
20
  - date_picker_hooks: Hooks
21
21
  - date_picker_year_range: Year Range
22
22
  - date_picker_anti_patterns: Anti-Patterns
23
+ - date_picker_margin_bottom: Margin Bottom
23
24
  - date_picker_inline: Inline
24
25
  - date_picker_month_and_year: Month & Year Only
25
26
  - date_picker_week: Week
@@ -48,6 +49,7 @@ examples:
48
49
  - date_picker_flatpickr_methods: Flatpickr Methods
49
50
  - date_picker_hooks: Hooks
50
51
  - date_picker_year_range: Year Range
52
+ - date_picker_margin_bottom: Margin Bottom
51
53
  - date_picker_inline: Inline
52
54
  - date_picker_month_and_year: Month & Year Only
53
55
  - date_picker_week: Week
@@ -19,6 +19,7 @@ export { default as DatePickerWeek } from './_date_picker_week.jsx'
19
19
  export { default as DatePickerPositions } from './_date_picker_positions.jsx'
20
20
  export { default as DatePickerPositionsElement } from './_date_picker_positions_element.jsx'
21
21
  export { default as DatePickerAllowInput } from './_date_picker_allow_input'
22
+ export { default as DatePickerMarginBottom} from './_date_picker_margin_bottom'
22
23
  export { default as DatePickerQuickPickReact } from './_date_picker_quick_pick_react'
23
24
  export { default as DatePickerQuickPickRangeLimit } from './_date_picker_quick_pick_range_limit'
24
25
  export { default as DatePickerOnClose } from './_date_picker_on_close.jsx'
@@ -1,6 +1,7 @@
1
1
  <%= pb_rails("button", props: { text: "Open Complex Dialog", data:{"open-dialog": "dialog-complex"} }) %>
2
2
 
3
3
  <%= pb_rails("dialog", props: { id:"dialog-complex", size: "lg", full_height: true }) do %>
4
+ <form>
4
5
  <%= pb_rails("dialog/dialog_header", props: { id: "dialog-complex" } ) do %>
5
6
  <%= pb_rails("body", props: { text: "What do you need us to take care of?" }) %>
6
7
  <% end %>
@@ -12,4 +13,5 @@
12
13
 
13
14
  <% end %>
14
15
  <%= pb_rails("dialog/dialog_footer", props: {cancel_button: "Back", confirm_button: "Send my Issue", confirm_button_id:"confirm-complex", id: "dialog-complex"}) %>
16
+ </form>
15
17
  <% end %>
@@ -1,5 +1,55 @@
1
+ <%= pb_rails("button", props: { text: "Short Multiline", variant: "secondary", data: { multitoast: "#toast-short" } }) %>
2
+
1
3
  <%= pb_rails("fixed_confirmation_toast", props: {
4
+ classname: "multitoast-to-hide",
5
+ closeable: true,
6
+ id: "toast-short",
2
7
  multi_line: true,
3
- text: "Scan to Assign Selected Items. Click here to generate report",
8
+ text: "Multi-line is used when the given text will not fit on one line.",
4
9
  status: "tip",
10
+ vertical: "top",
11
+ horizontal: "center"
5
12
  }) %>
13
+
14
+ <%= pb_rails("button", props: { text: "Long Multiline", variant: "secondary", data: { multitoast: "#toast-long" } }) %>
15
+
16
+ <%= pb_rails("fixed_confirmation_toast", props: {
17
+ classname: "multitoast-to-hide",
18
+ closeable: true,
19
+ id: "toast-long",
20
+ multi_line: true,
21
+ text: "Multi-line is used when the given text will not fit on one line. Using Multi Line allows the height of the confirmation toast to grow. Simply resize the screen to see the fixed confirmation toast wrap the text.",
22
+ status: "tip",
23
+ vertical: "top",
24
+ horizontal: "center"
25
+ }) %>
26
+
27
+
28
+ <script type="text/javascript">
29
+ const multitoasts = document.querySelectorAll(".multitoast-to-hide")
30
+ const multibuttons = document.querySelectorAll("button[data-multitoast]")
31
+
32
+ const hideMultiToasts = () => {
33
+ multitoasts.forEach((toast) => {
34
+ toast.style.display = "none"
35
+ })
36
+ }
37
+
38
+ multibuttons.forEach((button) => {
39
+ button.onclick = () => {
40
+ hideMultiToasts()
41
+ let toast = document.querySelector(button.getAttribute("data-multitoast"))
42
+
43
+ if (toast) {
44
+ toast.style.display = "flex"
45
+ }
46
+ }
47
+ })
48
+ </script>
49
+
50
+ <!-- hiding toast on page load -->
51
+ <style>
52
+ #toast-long, #toast-short {
53
+ display: none;
54
+ }
55
+ </style>
@@ -1,18 +1,69 @@
1
- import React from 'react'
1
+ import React, { useState } from 'react'
2
2
 
3
+ import Button from '../../pb_button/_button'
3
4
  import FixedConfirmationToast from '../_fixed_confirmation_toast'
4
5
 
5
6
  const FixedConfirmationToastMultiLine = (props) => {
6
- return (
7
- <div>
8
- <FixedConfirmationToast
9
- multiLine
10
- status="tip"
11
- text="Scan to Assign Selected Items. Click here to generate report"
12
- {...props}
13
- />
14
- </div>
15
- )
7
+
8
+ const [openShort, setOpenShort] = useState(false)
9
+ const [openLong, setOpenLong] = useState(false)
10
+
11
+ const handleClickShort = () => {
12
+ setOpenShort(true)
13
+ }
14
+ const handleClickLong= () => {
15
+ setOpenLong(true)
16
+ }
17
+
18
+ const handleCloseShort = () => {
19
+ setOpenShort(false)
20
+ }
21
+
22
+ const handleCloseLong= () => {
23
+ setOpenLong(false)
24
+ }
25
+
26
+ return (
27
+ <>
28
+ <Button
29
+ onClick={handleClickShort}
30
+ text="Short Multiline"
31
+ variant="secondary"
32
+ {...props}
33
+ />
34
+ {' '}
35
+ <Button
36
+ onClick={handleClickLong}
37
+ text="Long Multiline"
38
+ variant="secondary"
39
+ {...props}
40
+ />
41
+
42
+ <FixedConfirmationToast
43
+ closeable
44
+ horizontal='center'
45
+ multiLine
46
+ onClose={handleCloseShort}
47
+ open={openShort}
48
+ status='tip'
49
+ text='Multi-line is used when the given text will not fit on one line.'
50
+ vertical='top'
51
+ {...props}
52
+ />
53
+
54
+ <FixedConfirmationToast
55
+ closeable
56
+ horizontal='center'
57
+ multiLine
58
+ onClose={handleCloseLong}
59
+ open={openLong}
60
+ status='tip'
61
+ text='Multi-line is used when the given text will not fit on one line. Using Multi Line allows the height of the confirmation toast to grow. Simply resize the screen to see the fixed confirmation toast wrap the text.'
62
+ vertical='top'
63
+ {...props}
64
+ />
65
+ </>
66
+ )
16
67
  }
17
68
 
18
69
  export default FixedConfirmationToastMultiLine
@@ -75,8 +75,6 @@
75
75
  })
76
76
  }
77
77
 
78
- hideToasts()
79
-
80
78
  buttons.forEach((button) => {
81
79
  button.onclick = () => {
82
80
  hideToasts()
@@ -88,3 +86,10 @@
88
86
  }
89
87
  })
90
88
  </script>
89
+
90
+ <!-- hiding toast on page load -->
91
+ <style>
92
+ #toast-top-center, #toast-top-right, #toast-top-left, #toast-bottom-center, #toast-bottom-right, #toast-bottom-left {
93
+ display: none;
94
+ }
95
+ </style>
@@ -46,7 +46,3 @@
46
46
  <%= pb_rails("flex/flex_item") do %>4<% end %>
47
47
  <% end %>
48
48
  </div>
49
-
50
-
51
-
52
- </div>