playbook_ui 10.21.1.pre.alpha1 → 10.23.0.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: 90a49eef5f7ef47b1e7921d940c7d1e6d56c7c11971e0612f88cd9aa6202079d
4
- data.tar.gz: '0068f6fa35d25227519e9400cfc73fe66755f07c8e2521170829ff47e3926231'
3
+ metadata.gz: 1064b4903003c9465a6a1b5684e3ac6d8c0f2c38ce29cfcbc7fd9b7d31d806bd
4
+ data.tar.gz: 647ec3b406545ce663b720a6fcd58afb24b7b6e46157e25f39e9d853df03c10e
5
5
  SHA512:
6
- metadata.gz: f9e65e6665780627141458de4acdb6e73e827ffe7f426cc4e0ce7ee71f40fd024d4c263c7c8fb126d88ea256b19d9a576914f60a075521959e5d2d196ec6dc10
7
- data.tar.gz: f38dcd80a6acc7940e961c3f25bae68f70cf204cce40cdbed752222c2e762cf388e1aff147f6e9ee0218eefae3bbf342c96defb1e2ec01ef33d6412c64543020
6
+ metadata.gz: 1bf4ce670bc7af1955416bca763c2bc29357e0121b2310a8008835451473832a80a888edb80dcc357785ed5cb359797b2bb465985db2982bdfce04f869601362
7
+ data.tar.gz: cccee1ed2ebd68d8249b948df123de1145960acfb2dd5ee34d5388339c24f9f97219cb31499e5e3a07c903dac7398b2b507b10badfefc0968447915af8796232
@@ -15,6 +15,7 @@ type ButtonPropTypes = {
15
15
  data?: object,
16
16
  disabled?: boolean,
17
17
  fixedWidth?: boolean,
18
+ form?: string,
18
19
  fullWidth?: boolean,
19
20
  icon?: string,
20
21
  id?: string,
@@ -69,6 +70,7 @@ const Button = (props: ButtonPropTypes) => {
69
70
  text,
70
71
  htmlType = 'button',
71
72
  value,
73
+ form = null
72
74
  } = props
73
75
 
74
76
  const ariaProps = buildAriaProps(aria)
@@ -119,6 +121,7 @@ const Button = (props: ButtonPropTypes) => {
119
121
  {...dataProps}
120
122
  className={css}
121
123
  disabled={disabled}
124
+ form={form}
122
125
  id={id}
123
126
  onClick={onClick}
124
127
  role="button"
@@ -21,6 +21,7 @@ module Playbook
21
21
  prop :size, type: Playbook::Props::Enum,
22
22
  values: ["sm", "md", "lg", nil],
23
23
  default: nil
24
+ prop :form, default: nil
24
25
 
25
26
  def options
26
27
  {
@@ -32,6 +33,7 @@ module Playbook
32
33
  role: "button",
33
34
  type: type,
34
35
  value: value,
36
+ form: form,
35
37
  }.compact
36
38
  end
37
39
 
@@ -1 +1 @@
1
- <%= pb_rails("button", props: { text: "Button with ARIA", aria: {label: "Go to Google"}, tag: "a", link: "http://google.com" }) %>
1
+ <%= pb_rails("button", props: { text: "Button with ARIA", aria: {label: "Go to Google"}, tag: "a", link: "http://google.com"}) %>
@@ -0,0 +1 @@
1
+ <%= pb_rails("button", props: { text: "Button with Form Attribute", form: "form-id"}) %>
@@ -0,0 +1,14 @@
1
+ import React from 'react'
2
+ import { Button } from '../../'
3
+
4
+ const ButtonForm = (props) => (
5
+ <div>
6
+ <Button
7
+ form="form-id"
8
+ text="Button with Form Attribute"
9
+ {...props}
10
+ />
11
+ </div>
12
+ )
13
+
14
+ export default ButtonForm
@@ -8,6 +8,7 @@ examples:
8
8
  - button_accessibility: Button Accessibility Options
9
9
  - button_options: Button Additional Options
10
10
  - button_size: Button Size
11
+ - button_form: Button Form Attribute
11
12
  react:
12
13
  - button_default: Button Variants
13
14
  - button_full_width: Button Full Width
@@ -17,3 +18,4 @@ examples:
17
18
  - button_accessibility: Button Accessibility Options
18
19
  - button_options: Button Additional Options (onClick)
19
20
  - button_size: Button Size
21
+ - button_form: Button Form Attribute
@@ -6,3 +6,4 @@ export { default as ButtonBlockContent } from './_button_block_content.jsx'
6
6
  export { default as ButtonAccessibility } from './_button_accessibility.jsx'
7
7
  export { default as ButtonOptions } from './_button_options.jsx'
8
8
  export { default as ButtonSize } from './_button_size.jsx'
9
+ export { default as ButtonForm } from './_button_form.jsx'
@@ -75,8 +75,6 @@ const TextInput = (props: TextInputProps, ref: React.ElementRef<"input">) => {
75
75
  globalProps(props),
76
76
  className,
77
77
  ])
78
- const uniqueTextInputKey = `${id ? id : ''}${Math.ceil(Math.random() * 100000)}`
79
-
80
78
  const addOnIcon = (
81
79
  <Icon
82
80
  className="add-on-icon"
@@ -91,7 +89,6 @@ const TextInput = (props: TextInputProps, ref: React.ElementRef<"input">) => {
91
89
  className="text_input"
92
90
  disabled={disabled}
93
91
  id={id}
94
- key={uniqueTextInputKey}
95
92
  name={name}
96
93
  onChange={onChange}
97
94
  placeholder={placeholder}
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "10.21.0"
5
- VERSION = "10.21.1.pre.alpha1"
5
+ VERSION = "10.23.0.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: 10.21.1.pre.alpha1
4
+ version: 10.23.0.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-03-01 00:00:00.000000000 Z
12
+ date: 2022-03-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -417,6 +417,8 @@ files:
417
417
  - app/pb_kits/playbook/pb_button/docs/_button_default.html.erb
418
418
  - app/pb_kits/playbook/pb_button/docs/_button_default.jsx
419
419
  - app/pb_kits/playbook/pb_button/docs/_button_default.md
420
+ - app/pb_kits/playbook/pb_button/docs/_button_form.html.erb
421
+ - app/pb_kits/playbook/pb_button/docs/_button_form.jsx
420
422
  - app/pb_kits/playbook/pb_button/docs/_button_full_width.html.erb
421
423
  - app/pb_kits/playbook/pb_button/docs/_button_full_width.jsx
422
424
  - app/pb_kits/playbook/pb_button/docs/_button_full_width.md