playbook_ui 11.1.0 → 11.1.2.pre.alpha1

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: f3c49612b5ff10431ef8ef79803f630de5aafe8dfcdfea74dc234cfba6920af1
4
- data.tar.gz: e1199ebbc2ec5ecd70229ddef6500a1ebb9a0a31d0e25623d63a0e46034f36c9
3
+ metadata.gz: 3bf77233d115312bcc2eae399928aeb2254a98e420d62d4937ef16451995b495
4
+ data.tar.gz: 2c6391bcbe1115869d6481d728f093299eb42b27c7a2f666a2fdfa5ae3d26ae1
5
5
  SHA512:
6
- metadata.gz: 5fe817795f69f7ab21303aa4f0f0f2a72378df01785421a49984bf4058e7253b2901747607c66ad49c8dcd20153fa746d717a67cfaf572fabd96e3910f2708ab
7
- data.tar.gz: e6598e368c84ef4c8473470bcb756ca2313fccad7d3d8fde22c5df5013773b9e4a4e449daf0f2a25f323f98107f6a46073cb6f0c9372ff644f1e77b409c0959d
6
+ metadata.gz: 152cdfaa993d767dfe08d6d36bcecd723de291c8cad79536a3b7edc8b01fcc800a58826b4734e187386fc0977625422df48aee407dc9e528270e013d2fb70124
7
+ data.tar.gz: 3972f304f43411d5a2948961f2797efdb58ea23e51a6eb3f089e9a345533fcd1bb7159ddbe14ad04c109878b53bde2dc0feb89b5fd7c5e8896f500bf53633716
@@ -20,7 +20,7 @@ type RadioProps = {
20
20
  name: string,
21
21
  value: string,
22
22
  text: string,
23
- onChange: (event: React.FormEvent<HTMLInputElement>)=>void,
23
+ onChange: (event: React.FormEvent<HTMLInputElement> | null)=>void,
24
24
  } & GlobalProps
25
25
 
26
26
  const Radio = ({
@@ -36,7 +36,7 @@ const Radio = ({
36
36
  name = 'radio_name',
37
37
  text = 'Radio Text',
38
38
  value = 'radio_text',
39
- onChange = () => {},
39
+ onChange = () => { void 0 },
40
40
  ...props
41
41
  }: RadioProps, ref: any) => {
42
42
  const ariaProps = buildAriaProps(aria)
@@ -47,10 +47,10 @@ const Radio = ({
47
47
  globalProps(props),
48
48
  className)
49
49
 
50
- const displayRadio = (props: RadioProps) => {
50
+ const displayRadio = (props: RadioProps & any) => {
51
51
  if (children)
52
52
  return (children)
53
- else
53
+ else
54
54
  return (
55
55
  <input
56
56
  id={id}
@@ -71,13 +71,13 @@ const Radio = ({
71
71
  className={classes}
72
72
  htmlFor={id}
73
73
  >
74
- <>{displayRadio(null)}</>
74
+ <>{displayRadio(props)}</>
75
75
  <span className="pb_radio_button" />
76
76
  <Body
77
- dark={dark}
78
- status={error ? 'negative' : null}
79
- text={label}
80
- variant={null}
77
+ dark={dark}
78
+ status={error ? 'negative' : null}
79
+ text={label}
80
+ variant={null}
81
81
  />
82
82
  </label>
83
83
  )
@@ -1 +1 @@
1
- Use this as value for displaying number data at a high level. It’s primary function is to create hierarchy of data within a view.
1
+ Use this as value for displaying number data at a high level. It’s primary function is to create hierarchy of data within a view.
@@ -0,0 +1,3 @@
1
+ <%= pb_rails("stat_value", props: { value: 1529.00000, precision: 2 }) %>
2
+
3
+ <%= pb_rails("stat_value", props: { value: 1529.13, precision: 4 }) %>
@@ -0,0 +1,2 @@
1
+ Use this to specify how many decimal places you want to show.
2
+ In react, you can pass in a string or number, but for this rails kit, we only accept numeric values and rails will not show trailing zero's unless specified.
@@ -3,6 +3,7 @@ examples:
3
3
  rails:
4
4
  - stat_value_default: Default
5
5
  - stat_value_unit: Unit Value
6
+ - stat_value_precision: Precision Value
6
7
 
7
8
 
8
9
  react:
@@ -5,9 +5,14 @@ module Playbook
5
5
  class StatValue < Playbook::KitBase
6
6
  prop :unit
7
7
  prop :value, type: Playbook::Props::Numeric
8
+ prop :precision, type: Playbook::Props::Numeric
8
9
 
9
10
  def formatted_value
10
- number_with_delimiter(value, delimiter: ",", separator: ".")
11
+ if precision.nil?
12
+ number_with_delimiter(value, delimiter: ",", separator: ".")
13
+ else
14
+ number_with_precision(value, precision: precision, delimiter: ",", separator: ".")
15
+ end
11
16
  end
12
17
 
13
18
  def classname
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 = "11.0.1"
5
- VERSION = "11.1.0"
4
+ PREVIOUS_VERSION = "11.1.1"
5
+ VERSION = "11.1.2.pre.alpha1"
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: 11.1.0
4
+ version: 11.1.2.pre.alpha1
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: 2022-07-08 00:00:00.000000000 Z
12
+ date: 2022-07-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -1694,6 +1694,8 @@ files:
1694
1694
  - app/pb_kits/playbook/pb_stat_value/docs/_stat_value_default.html.erb
1695
1695
  - app/pb_kits/playbook/pb_stat_value/docs/_stat_value_default.jsx
1696
1696
  - app/pb_kits/playbook/pb_stat_value/docs/_stat_value_default.md
1697
+ - app/pb_kits/playbook/pb_stat_value/docs/_stat_value_precision.html.erb
1698
+ - app/pb_kits/playbook/pb_stat_value/docs/_stat_value_precision.md
1697
1699
  - app/pb_kits/playbook/pb_stat_value/docs/_stat_value_unit.html.erb
1698
1700
  - app/pb_kits/playbook/pb_stat_value/docs/_stat_value_unit.jsx
1699
1701
  - app/pb_kits/playbook/pb_stat_value/docs/example.yml
@@ -2222,9 +2224,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
2222
2224
  version: '0'
2223
2225
  required_rubygems_version: !ruby/object:Gem::Requirement
2224
2226
  requirements:
2225
- - - ">="
2227
+ - - ">"
2226
2228
  - !ruby/object:Gem::Version
2227
- version: '0'
2229
+ version: 1.3.1
2228
2230
  requirements: []
2229
2231
  rubygems_version: 3.3.7
2230
2232
  signing_key: