playbook_ui_docs 14.14.0.pre.alpha.play1868dependencyremovallodash6286 → 14.14.0.pre.alpha.play1922tooltipfloatingui6361

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 061d86c114467cb29dcd09863c10613ad2ea3d0df540102b5af47849f7e74072
4
- data.tar.gz: b54a409a2d962f6da9053e9886e4aaf528d7c44b196f47b981c6292a6314d4f8
3
+ metadata.gz: a654517eed7995d2dd04f924b21ac98079c8bf6e64ddd9389aef999c0ef814d2
4
+ data.tar.gz: b30aa5fa5020fb86b549c3ea0766a988b8588c98e314d921cb05d875568e7ece
5
5
  SHA512:
6
- metadata.gz: bc54456b0ef11d021e9aff54ce762995dcfb34d8afff6f9a5fd0abb8dd113860fa857fa3ef33594818eb7390e7151e4d884d9d4e95f1f7946ad7631148932902
7
- data.tar.gz: 4677177d296f46c457a14f343e74ea206cc0056f2233deeb0e75580654844639a8539271ea831860fd06e7c4d990dfa15ad64b3dbb2864ad212ed06b73d84bb9
6
+ metadata.gz: d37123b09e80fdca9db9c6b97ebc3ad049f2b4d7a7105c5bf8532eaed35d917089489ddc826ebe793cb671c1241e4774246425b849306487c8df3abe35b3e443
7
+ data.tar.gz: 2ceaefad3e14f464dd06d569d90eff4f7ee338384b46812fdeff3faf803bd996ac68938df67c32ca29a8edadad4350daa860515e103eaecf83b1a566d78cd036
@@ -0,0 +1,22 @@
1
+ <%= pb_rails("currency", props: {
2
+ amount: "",
3
+ label: "Nil",
4
+ margin_bottom: "md",
5
+ null_display: "--",
6
+ size: "sm"
7
+ }) %>
8
+
9
+ <%= pb_rails("currency", props: {
10
+ amount: "",
11
+ label: "Nil",
12
+ margin_bottom: "md",
13
+ null_display: "$0.00",
14
+ size: "sm"
15
+ }) %>
16
+
17
+ <%= pb_rails("currency", props: {
18
+ amount: "",
19
+ label: "Nil",
20
+ null_display: " ",
21
+ size: "sm"
22
+ }) %>
@@ -0,0 +1,34 @@
1
+ import React from 'react'
2
+ import { Currency } from 'playbook-ui'
3
+
4
+ const CurrencyNullDisplay = (props) => {
5
+ return (
6
+ <>
7
+ <Currency
8
+ amount=""
9
+ label="Null"
10
+ marginBottom="md"
11
+ nullDisplay="--"
12
+ {...props}
13
+ />
14
+
15
+ <Currency
16
+ amount=""
17
+ label="Null"
18
+ marginBottom="md"
19
+ nullDisplay="$0.00"
20
+ {...props}
21
+ />
22
+
23
+ <Currency
24
+ amount=""
25
+ label="Null"
26
+ marginBottom="md"
27
+ nullDisplay=" "
28
+ {...props}
29
+ />
30
+ </>
31
+ )
32
+ }
33
+
34
+ export default CurrencyNullDisplay
@@ -0,0 +1 @@
1
+ To customize how the `amount` field appears when it is empty, use the `null_display` prop and set it to the desired value you want to display.
@@ -0,0 +1 @@
1
+ To customize how the `amount` field appears when it is empty, use the `nullDisplay` prop and set it to the desired value you want to display.
@@ -10,6 +10,7 @@ examples:
10
10
  - currency_unstyled: Unstyled
11
11
  - currency_comma_separator: Comma Separator
12
12
  - currency_negative: Negative
13
+ - currency_null_display: Null Display
13
14
 
14
15
  react:
15
16
  - currency_variants: Variants
@@ -21,6 +22,7 @@ examples:
21
22
  - currency_unstyled: Unstyled
22
23
  - currency_comma_separator: Comma Separator
23
24
  - currency_negative: Negative
25
+ - currency_null_display: Null Display
24
26
 
25
27
  swift:
26
28
  - currency_size_swift: Size
@@ -6,4 +6,5 @@ export { default as CurrencyAbbreviated } from './_currency_abbreviated.jsx'
6
6
  export { default as CurrencyMatchingDecimals } from './_currency_matching_decimals.jsx'
7
7
  export { default as CurrencyUnstyled } from './_currency_unstyled.jsx'
8
8
  export { default as CurrencyCommaSeparator } from './_currency_comma_separator.jsx'
9
- export { default as CurrencyNegative } from './_currency_negative.jsx'
9
+ export { default as CurrencyNegative } from './_currency_negative.jsx'
10
+ export { default as CurrencyNullDisplay } from './_currency_null_display.jsx'
@@ -0,0 +1,39 @@
1
+ <%= pb_rails("flex", props: { orientation: "row", gap: "md" }) do %>
2
+ <%= pb_rails("flex/flex_item", props: {margin_top: "md"}) do %>
3
+ <%= pb_rails("button", props: {classname: "tooltip-delay", text: "1s delay"}) %>
4
+ <% end %>
5
+
6
+ <%= pb_rails("flex/flex_item", props: {margin_top: "md"}) do %>
7
+ <%= pb_rails("button", props: {classname: "tooltip-open-delay", text: "Open only"}) %>
8
+ <% end %>
9
+
10
+ <%= pb_rails("flex/flex_item", props: {margin_top: "md"}) do %>
11
+ <%= pb_rails("button", props: {classname: "tooltip-close-delay", text: "Close only"}) %>
12
+ <% end %>
13
+
14
+ <%= pb_rails("tooltip", props: {
15
+ trigger_element_selector: ".tooltip-delay",
16
+ tooltip_id: "delay-tooltip",
17
+ position: 'top',
18
+ delay_open: 1000,
19
+ delay_close: 1000
20
+ }) do %>
21
+ 1s open/close delay
22
+ <% end %>
23
+ <%= pb_rails("tooltip", props: {
24
+ trigger_element_selector: ".tooltip-open-delay",
25
+ tooltip_id: "open-tooltip",
26
+ position: 'top',
27
+ delay_open: 1000
28
+ }) do %>
29
+ 1s open delay
30
+ <% end %>
31
+ <%= pb_rails("tooltip", props: {
32
+ trigger_element_selector: ".tooltip-close-delay",
33
+ tooltip_id: "close-tooltip",
34
+ position: 'top',
35
+ delay_close: 1000
36
+ }) do %>
37
+ 1s close delay
38
+ <% end %>
39
+ <% end %>
@@ -0,0 +1,3 @@
1
+ Waits for the specified time when the event listener runs before triggering the tooltip.
2
+
3
+ The `delay_open` and `delay_close` accept numbers in milliseconds. 1 second is 1000 milliseconds.
@@ -0,0 +1,26 @@
1
+ <%= pb_rails("flex", props: { gap: "md", wrap: true }) do %>
2
+ <%= pb_rails("flex/flex_item") do %>
3
+ <%= pb_rails("button", props: { text: "With Interaction", id: "tooltip-interaction"}) %>
4
+
5
+ <%= pb_rails("tooltip", props: {
6
+ trigger_element_selector: "#tooltip-interaction",
7
+ tooltip_id: "tooltip-with-interaction",
8
+ position: 'top',
9
+ interaction: true
10
+ }) do %>
11
+ You can copy me
12
+ <% end %>
13
+ <% end %>
14
+
15
+ <%= pb_rails("flex/flex_item") do %>
16
+ <%= pb_rails("button", props: { text: "No Interaction", id: "tooltip-no-interaction"}) %>
17
+
18
+ <%= pb_rails("tooltip", props: {
19
+ trigger_element_selector: "#tooltip-no-interaction",
20
+ tooltip_id: "tooltip-without-interaction",
21
+ position: 'top',
22
+ }) do %>
23
+ I'm just a regular tooltip
24
+ <% end %>
25
+ <% end %>
26
+ <% end %>
@@ -2,8 +2,10 @@ examples:
2
2
 
3
3
  rails:
4
4
  - tooltip_default: Default
5
+ - tooltip_interaction: Content Interaction
5
6
  - tooltip_selectors: Using Common Selectors
6
7
  - tooltip_with_icon_circle: Icon Circle Tooltip
8
+ - tooltip_delay_rails: Delay
7
9
  - tooltip_show_tooltip: Show Tooltip
8
10
 
9
11
  react: