playbook_ui 13.19.0.pre.alpha.play1174fixconfimationtoastmobilebug2306 → 13.19.0.pre.alpha.play1174fixconfimationtoastmobilebug2342

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +3 -10
  3. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +1 -0
  4. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb +15 -2
  5. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx +62 -45
  6. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +2 -2
  7. data/app/pb_kits/playbook/pb_nav/_subtle_mixin.scss +4 -0
  8. data/app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents.html.erb +34 -0
  9. data/app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents.md +7 -0
  10. data/app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents_as_divs.html.erb +34 -0
  11. data/app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents_as_divs.md +3 -0
  12. data/app/pb_kits/playbook/pb_table/docs/example.yml +3 -0
  13. data/app/pb_kits/playbook/pb_table/styles/_striped.scss +2 -2
  14. data/app/pb_kits/playbook/pb_table/styles/_structure.scss +4 -2
  15. data/app/pb_kits/playbook/pb_table/table_body.html.erb +17 -0
  16. data/app/pb_kits/playbook/pb_table/table_body.rb +15 -0
  17. data/app/pb_kits/playbook/pb_table/table_cell.html.erb +17 -0
  18. data/app/pb_kits/playbook/pb_table/table_cell.rb +17 -0
  19. data/app/pb_kits/playbook/pb_table/table_head.html.erb +17 -0
  20. data/app/pb_kits/playbook/pb_table/table_head.rb +15 -0
  21. data/app/pb_kits/playbook/pb_table/table_header.html.erb +49 -39
  22. data/app/pb_kits/playbook/pb_table/table_header.rb +8 -1
  23. data/app/pb_kits/playbook/pb_table/table_row.html.erb +17 -7
  24. data/app/pb_kits/playbook/pb_table/table_row.rb +8 -1
  25. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +9 -5
  26. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_add_on.jsx +20 -0
  27. data/app/pb_kits/playbook/pb_user/docs/_user_presence_indicator_swift.md +30 -0
  28. data/app/pb_kits/playbook/pb_user/docs/_user_props_table.md +2 -1
  29. data/app/pb_kits/playbook/pb_user/docs/example.yml +1 -0
  30. data/dist/playbook-rails.js +3 -3
  31. data/lib/playbook/version.rb +1 -1
  32. metadata +13 -2
@@ -27,7 +27,7 @@ type TextInputProps = {
27
27
  required?: boolean,
28
28
  type: string,
29
29
  value: string | number,
30
- children: Node,
30
+ children: React.ReactElement,
31
31
  addOn?: {
32
32
  icon?: string,
33
33
  alignment?: "right" | "left",
@@ -85,8 +85,12 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
85
85
  icon={icon}
86
86
  />
87
87
  )
88
+
89
+ const childInput = children ? children.type === "input" : undefined
90
+
88
91
  const textInput = (
89
- <input
92
+ childInput ? React.cloneElement(children, { className: "text_input" }) :
93
+ (<input
90
94
  {...domSafeProps(props)}
91
95
  className="text_input"
92
96
  disabled={disabled}
@@ -99,7 +103,7 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
99
103
  required={required}
100
104
  type={type}
101
105
  value={value}
102
- />
106
+ />)
103
107
  )
104
108
 
105
109
  const addOnInput = (
@@ -131,7 +135,7 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
131
135
  )
132
136
 
133
137
  const render = (() => {
134
- if(children) return children
138
+ if (children && !childInput) return children
135
139
  if (shouldShowAddOn) return addOnInput
136
140
 
137
141
  return textInput
@@ -144,7 +148,7 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
144
148
  {...htmlProps}
145
149
  className={css}
146
150
  >
147
- {label &&
151
+ {label &&
148
152
  <Caption
149
153
  className="pb_text_input_kit_label"
150
154
  text={label}
@@ -58,6 +58,16 @@ const TextInputAddOn = (props) => {
58
58
  {...props}
59
59
  />
60
60
  </div>
61
+ <div>
62
+ <TextInput
63
+ addOn={{ icon: 'frog', alignment: 'right', border: true }}
64
+ label="Right-Aligned Add On With Child Input"
65
+ onChange={handleUpdateFourthInput}
66
+ {...props}
67
+ >
68
+ <input />
69
+ </TextInput>
70
+ </div>
61
71
  <div>
62
72
  <TextInput
63
73
  addOn={{ icon: 'percent', alignment: 'left', border: false }}
@@ -76,6 +86,16 @@ const TextInputAddOn = (props) => {
76
86
  {...props}
77
87
  />
78
88
  </div>
89
+ <div>
90
+ <TextInput
91
+ addOn={{ icon: 'frog', alignment: 'left', border: true }}
92
+ label="Left-Aligned Add On With Child Input"
93
+ onChange={handleUpdateFourthInput}
94
+ {...props}
95
+ >
96
+ <input />
97
+ </TextInput>
98
+ </div>
79
99
  </>
80
100
  )
81
101
  }
@@ -0,0 +1,30 @@
1
+ ![user-presence-indicator)](https://github.com/powerhome/playbook/assets/112719604/96ee8408-2e21-4aaf-ae65-9f023515cf8d)
2
+
3
+ ```swift
4
+ VStack(alignment: .leading, spacing: Spacing.small) {
5
+ PBUser(
6
+ name: name,
7
+
8
+ image: img,
9
+ size: .small,
10
+ territory: "PHL",
11
+ title: title,
12
+ status: .online
13
+ )
14
+ PBUser(
15
+ name: name,
16
+ image: img,
17
+ territory: "PHL",
18
+ title: title,
19
+ status: .away
20
+ )
21
+ PBUser(
22
+ name: name,
23
+ image: img,
24
+ size: .large,
25
+ territory: "PHL",
26
+ title: title,
27
+ status: .offline
28
+ )
29
+ }
30
+ ```
@@ -7,4 +7,5 @@
7
7
  | **orientation** | `Orientation` | Changes the orientation of the User | `.horizontal` | `.horizontal` `.verticle` |
8
8
  | **size** | `UserAvatarSize` | Changes the size of the User | `.medium` | `.small` `.medium` `.large` |
9
9
  | **territory** | `String` | Adds the User's territory | | |
10
- | **title** | `String` | Adds a title | | |
10
+ | **title** | `String` | Adds a title | | |
11
+ | **status** | `PBAvatar.PresenceStatus?` | An idicator for the current status of the user | `.none` | `.online` `.away` `.offline` |
@@ -23,4 +23,5 @@ examples:
23
23
  - user_vertical_size_swift: Vertical
24
24
  - user_text_only_swift: Text Only
25
25
  - user_size_swift: Horizontal Size
26
+ - user_presence_indicator_swift: Presence Indicator
26
27
  - user_props_table: ""