playbook_ui 14.8.0.pre.alpha.PLAY1615movenegativetoleftofcurrencysign4543 → 14.8.0.pre.alpha.PLAY16254545
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_currency/_currency.tsx +3 -7
- data/app/pb_kits/playbook/pb_currency/currency.html.erb +2 -2
- data/app/pb_kits/playbook/pb_currency/currency.rb +1 -17
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +3 -0
- data/dist/chunks/_weekday_stacked-uMIX8f-A.js +45 -0
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +3 -3
- data/dist/chunks/_weekday_stacked-CVx1CzK-.js +0 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b2b5ad03216b06c9f37e1792a0b208efbfd3d44b79f73696e1a3b006f89228c
|
4
|
+
data.tar.gz: 282f44cd7aee29b4bc0ca84396be2a914a3786e91c8b308c5e7f284b84d4d74c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b14587326a80d3f8a7663ab14df6c51720aae8ad3a3492370dd853a956292a7b80901b2782e6ea04fbdb37b38d7810490234b4396bc9c891158432c208578f4
|
7
|
+
data.tar.gz: a1f50ae88764cf79258478662bd9cd294b394d8c3cbd3c96580045ba2a5a67c3d924d9ee0170daf134ca9400078c4709c18dff06ea98927392f412343b5d7216
|
@@ -101,11 +101,7 @@ const Currency = (props: CurrencyProps): React.ReactElement => {
|
|
101
101
|
return decimalPart ? `${formattedWhole}.${decimalPart}` : formattedWhole;
|
102
102
|
}
|
103
103
|
|
104
|
-
const
|
105
|
-
const handleNegative = amount.startsWith("-") && swapNegative ? "-" : ""
|
106
|
-
const getAbsoluteAmount = (amountString: string) => amountString.replace(/^-/,'')
|
107
|
-
const getAbbrOrFormatAmount = abbreviate ? getAbbreviatedValue('amount') : formatAmount(getMatchingDecimalAmount)
|
108
|
-
const getAmount = swapNegative ? getAbsoluteAmount(getAbbrOrFormatAmount) : getAbbrOrFormatAmount
|
104
|
+
const getAmount = abbreviate ? getAbbreviatedValue('amount') : formatAmount(getMatchingDecimalAmount)
|
109
105
|
const getAbbreviation = abbreviate ? getAbbreviatedValue('unit') : null
|
110
106
|
const getDecimalValue = abbreviate ? '' : getMatchingDecimalValue
|
111
107
|
|
@@ -122,7 +118,7 @@ const Currency = (props: CurrencyProps): React.ReactElement => {
|
|
122
118
|
<div className={`pb_currency_wrapper${variantClass || emphasizedClass}`}>
|
123
119
|
{unstyled ? (
|
124
120
|
<>
|
125
|
-
<div>{
|
121
|
+
<div>{symbol}</div>
|
126
122
|
<div>{getAmount}</div>
|
127
123
|
<div>
|
128
124
|
{getAbbreviation}
|
@@ -136,7 +132,7 @@ const Currency = (props: CurrencyProps): React.ReactElement => {
|
|
136
132
|
color="light"
|
137
133
|
dark={dark}
|
138
134
|
>
|
139
|
-
{
|
135
|
+
{symbol}
|
140
136
|
</Body>
|
141
137
|
|
142
138
|
<Title
|
@@ -3,12 +3,12 @@
|
|
3
3
|
|
4
4
|
<div class=<%= "pb_currency_wrapper#{object.variant_class || object.emphasized_class}" %>>
|
5
5
|
<% if object.unstyled %>
|
6
|
-
<div><%= object.
|
6
|
+
<div><%= object.symbol %></div>
|
7
7
|
<div><%= object.title_props[:text] %></div>
|
8
8
|
<div><%= object.body_props[:text] %></div>
|
9
9
|
<% else %>
|
10
10
|
<%= pb_rails("body", props: object.currency_wrapper_props) do %>
|
11
|
-
<%= object.
|
11
|
+
<%= object.symbol %>
|
12
12
|
<% end %>
|
13
13
|
<%= pb_rails("title", props: object.title_props) %>
|
14
14
|
<%= pb_rails("body", props: object.body_props) %>
|
@@ -68,20 +68,12 @@ module Playbook
|
|
68
68
|
def title_props
|
69
69
|
{
|
70
70
|
size: size_value,
|
71
|
-
text:
|
71
|
+
text: abbreviate ? abbreviated_value : formatted_amount,
|
72
72
|
classname: "pb_currency_value",
|
73
73
|
dark: dark,
|
74
74
|
}
|
75
75
|
end
|
76
76
|
|
77
|
-
def abbr_or_format_amount
|
78
|
-
abbreviate ? abbreviated_value : formatted_amount
|
79
|
-
end
|
80
|
-
|
81
|
-
def negative_sign
|
82
|
-
amount.starts_with?("-") && swap_negative ? "-" : ""
|
83
|
-
end
|
84
|
-
|
85
77
|
def body_props
|
86
78
|
{
|
87
79
|
text: units_element,
|
@@ -167,14 +159,6 @@ module Playbook
|
|
167
159
|
whole_value
|
168
160
|
end
|
169
161
|
end
|
170
|
-
|
171
|
-
def absolute_amount(amount_string)
|
172
|
-
amount_string.sub(/^-/, "")
|
173
|
-
end
|
174
|
-
|
175
|
-
def swap_negative
|
176
|
-
size == "sm" && symbol != ""
|
177
|
-
end
|
178
162
|
end
|
179
163
|
end
|
180
164
|
end
|
@@ -2,6 +2,7 @@
|
|
2
2
|
@import "../tokens/border_radius";
|
3
3
|
@import "../tokens/spacing";
|
4
4
|
@import "../tokens/shadows";
|
5
|
+
@import "../tokens/positioning";
|
5
6
|
|
6
7
|
[class^=pb_typeahead_kit] {
|
7
8
|
.typeahead-kit-select__option {
|
@@ -99,6 +100,7 @@
|
|
99
100
|
.typeahead-kit-select__menu {
|
100
101
|
background-color: $bg_dark;
|
101
102
|
color: $white;
|
103
|
+
z-index: $z_1;
|
102
104
|
}
|
103
105
|
.typeahead-kit-select__option:hover {
|
104
106
|
background-color: $active_dark;
|
@@ -182,6 +184,7 @@
|
|
182
184
|
}
|
183
185
|
|
184
186
|
.typeahead-kit-select__menu {
|
187
|
+
z-index: $z_1;
|
185
188
|
.typeahead-kit-select__menu-list {
|
186
189
|
padding: 0;
|
187
190
|
}
|