playbook_ui_docs 14.3.0.pre.rc.10 → 14.3.0.pre.rc.11

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: 31d8e19e9d7abd7e011f6625968db0aed479ba32d723abd51b553bebc399c9ba
4
- data.tar.gz: c1077d004a0013cf71b59deb3eeac8378bbbd3adca2c14c5782f249215befb20
3
+ metadata.gz: 327b5c81e7a4c5acd41521c726de5370505025031476138e97fc882630257041
4
+ data.tar.gz: a6224b64c9f26ca5455a23aca917d3ac8557cb24645e7858236f499c0c2235f3
5
5
  SHA512:
6
- metadata.gz: 20202c537d966a590a6b5c5cbe05ce519fc79a7f939c8c95463639baaaf4193a769785f81aeaee1034cd61ae4f2436207435450d3fc5b9e397f222f6567a2fde
7
- data.tar.gz: 789b069e77f00064866465e0df15f2b74ef1e10b2489631e57d6c7986f7d5cacac20003dffaed7861a235b683a723c933c80a87bafd594f14bdcdb92cc9f9587
6
+ metadata.gz: 4e358265e1e43c59dc32a0ef2c7718e275cabe652e494524f7b53d7c82f551a2da40fa0ba31d60b62444c80e5d77f459f3497c9f09fbebc1ae9d188c898039f3
7
+ data.tar.gz: 1c28076bcd8ba962990ba8528362ec56f5e5caf4330a0c9f552ea151afda56e7bab20b93c68ac28575a549cc7b395ecc8e6ab338f65e131b31044b9a21c90b61
@@ -18,29 +18,32 @@ const RadioChildren = (props) => {
18
18
  <div>
19
19
  <Radio
20
20
  label="Select"
21
+ marginBottom="sm"
21
22
  name="Group1"
22
23
  tabIndex={0}
23
24
  value="Select"
24
25
  {...props}
25
26
  >
26
27
  <Select
28
+ marginBottom="none"
27
29
  minWidth="xs"
28
30
  options={options}
29
31
  />
30
32
  </Radio>
31
33
  <Radio
32
34
  label="Typeahead"
35
+ marginBottom="sm"
33
36
  name="Group1"
34
37
  tabIndex={0}
35
38
  value="Typeahead"
36
39
  {...props}
37
40
  >
38
41
  <Typeahead
42
+ marginBottom="none"
39
43
  minWidth="xs"
40
44
  options={options}
41
45
  />
42
46
  </Radio>
43
- <br />
44
47
  <Radio
45
48
  defaultChecked={false}
46
49
  label="Typography"
@@ -0,0 +1,88 @@
1
+ <%
2
+ options = [
3
+ { label: 'Orange', value: '#FFA500' },
4
+ { label: 'Red', value: '#FF0000' },
5
+ { label: 'Green', value: '#00FF00' },
6
+ { label: 'Blue', value: '#0000FF' },
7
+ ]
8
+ %>
9
+
10
+ <%= pb_rails("typeahead", props: {
11
+ id: "typeahead-default",
12
+ placeholder: "All Colors",
13
+ options: options,
14
+ label: "None",
15
+ name: :foo,
16
+ is_multi: false,
17
+ margin_bottom: "none",
18
+ })
19
+ %>
20
+ <%= pb_rails("typeahead", props: {
21
+ id: "typeahead-default",
22
+ placeholder: "All Colors",
23
+ options: options,
24
+ label: "XXS",
25
+ name: :foo,
26
+ is_multi: false,
27
+ margin_bottom: "xxs",
28
+ })
29
+ %>
30
+ <%= pb_rails("typeahead", props: {
31
+ id: "typeahead-default",
32
+ placeholder: "All Colors",
33
+ options: options,
34
+ label: "XS",
35
+ name: :foo,
36
+ is_multi: false,
37
+ margin_bottom: "xs",
38
+ })
39
+ %>
40
+ <%= pb_rails("typeahead", props: {
41
+ id: "typeahead-default",
42
+ placeholder: "All Colors",
43
+ options: options,
44
+ label: "Default - SM",
45
+ name: :foo,
46
+ is_multi: false,
47
+ })
48
+ %>
49
+ <%= pb_rails("typeahead", props: {
50
+ id: "typeahead-default",
51
+ placeholder: "All Colors",
52
+ options: options,
53
+ label: "MD",
54
+ name: :foo,
55
+ is_multi: false,
56
+ margin_bottom: "md",
57
+ })
58
+ %>
59
+ <%= pb_rails("typeahead", props: {
60
+ id: "typeahead-default",
61
+ placeholder: "All Colors",
62
+ options: options,
63
+ label: "LG",
64
+ name: :foo,
65
+ is_multi: false,
66
+ margin_bottom: "lg",
67
+ })
68
+ %>
69
+ <%= pb_rails("typeahead", props: {
70
+ id: "typeahead-default",
71
+ placeholder: "All Colors",
72
+ options: options,
73
+ label: "XL",
74
+ name: :foo,
75
+ is_multi: false,
76
+ margin_bottom: "xl",
77
+ })
78
+ %>
79
+
80
+ <%= javascript_tag defer: "defer" do %>
81
+ document.addEventListener("pb-typeahead-kit-typeahead-default-result-option-select", function(event) {
82
+ console.log('Single Option selected')
83
+ console.dir(event.detail)
84
+ })
85
+ document.addEventListener("pb-typeahead-kit-typeahead-default-result-clear", function() {
86
+ console.log('All options cleared')
87
+ })
88
+ <% end %>
@@ -0,0 +1,60 @@
1
+ import React from 'react'
2
+
3
+ import Typeahead from '../_typeahead'
4
+
5
+ const options = [
6
+ { label: 'Orange', value: '#FFA500' },
7
+ { label: 'Red', value: '#FF0000' },
8
+ { label: 'Green', value: '#00FF00' },
9
+ { label: 'Blue', value: '#0000FF' },
10
+ ]
11
+
12
+ const TypeaheadMarginBottom = (props) => {
13
+ return (
14
+ <>
15
+ <Typeahead
16
+ label="None"
17
+ marginBottom="none"
18
+ options={options}
19
+ {...props}
20
+ />
21
+ <Typeahead
22
+ label="XXS"
23
+ marginBottom="xxs"
24
+ options={options}
25
+ {...props}
26
+ />
27
+ <Typeahead
28
+ label="XS"
29
+ marginBottom="xs"
30
+ options={options}
31
+ {...props}
32
+ />
33
+ <Typeahead
34
+ label="Default - SM"
35
+ options={options}
36
+ {...props}
37
+ />
38
+ <Typeahead
39
+ label="MD"
40
+ marginBottom="md"
41
+ options={options}
42
+ {...props}
43
+ />
44
+ <Typeahead
45
+ label="LG"
46
+ marginBottom="lg"
47
+ options={options}
48
+ {...props}
49
+ />
50
+ <Typeahead
51
+ label="XL"
52
+ marginBottom="xl"
53
+ options={options}
54
+ {...props}
55
+ />
56
+ </>
57
+ )
58
+ }
59
+
60
+ export default TypeaheadMarginBottom
@@ -9,6 +9,7 @@ examples:
9
9
  - typeahead_inline: Inline
10
10
  - typeahead_multi_kit: Multi Kit Options
11
11
  - typeahead_error_state: Error State
12
+ - typeahead_margin_bottom: Margin Bottom
12
13
 
13
14
  react:
14
15
  - typeahead_default: Default
@@ -23,3 +24,4 @@ examples:
23
24
  - typeahead_async_createable: Createable (+ Async Data)
24
25
  - typeahead_error_state: Error State
25
26
  - typeahead_custom_menu_list: Custom MenuList
27
+ - typeahead_margin_bottom: Margin Bottom
@@ -10,3 +10,4 @@ export { default as TypeaheadCreateable } from './_typeahead_createable.jsx'
10
10
  export { default as TypeaheadAsyncCreateable } from './_typeahead_async_createable.jsx'
11
11
  export { default as TypeaheadErrorState } from './_typeahead_error_state.jsx'
12
12
  export { default as TypeaheadCustomMenuList } from './_typeahead_custom_menu_list.jsx'
13
+ export { default as TypeaheadMarginBottom } from './_typeahead_margin_bottom.jsx'