playbook_ui 14.5.0.pre.alpha.PLAY1510railsformloading3977 → 14.5.0.pre.alpha.javascriptassets3926
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_dialog/docs/_dialog_loading.html.erb +7 -30
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.md +2 -0
- data/app/pb_kits/playbook/pb_form/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_form/form.rb +0 -2
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -9
- data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_form_pill/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +1 -4
- data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +1 -3
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -3
- data/dist/chunks/{_typeahead-CbSMQAjp.js → _typeahead-BYw0HEgO.js} +2 -2
- data/dist/chunks/{_weekday_stacked-DnNh3oJT.js → _weekday_stacked-DumiyWjh.js} +1 -1
- data/dist/chunks/{lib-C9Somihj.js → lib-CEpcaI8y.js} +1 -1
- data/dist/chunks/{pb_form_validation-C8U7gqcT.js → pb_form_validation-D9zkwt2b.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/mark.js +1 -0
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/lib/playbook/pb_doc_helper.rb +5 -5
- data/lib/playbook/pb_forms_helper.rb +1 -3
- data/lib/playbook/version.rb +1 -1
- metadata +7 -12
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +0 -8
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.md +0 -1
- data/app/pb_kits/playbook/pb_form/formHelper.js +0 -39
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb +0 -19
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx +0 -27
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.md +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b893820d516fe98da09e06b94c9b3ebf312eeccfa42a8c3a59ae9426f9c0feb
|
4
|
+
data.tar.gz: 48bc0867779db4526810edf8716d95944f5c0bf81409d154a31d933a40f1b853
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b9d16196a6b1d5062f8289b1a14e8959dac6b073c831e9ad74b6be9972a01fa047ab7668eeb2e33a19d39ce209d60704ce4d8e82f369af6cb63a10f954401fb
|
7
|
+
data.tar.gz: d04022c85a0dcc86453e28d2fbf8fa629fde3a2b95986dc30afaa857c64ba860743640192d265bff56d07a4910caa63ab00699619eab9a7026244a6a241a7176
|
@@ -1,36 +1,13 @@
|
|
1
1
|
<%= pb_rails("button", props: { text: "Open Dialog", data: {"open-dialog": "dialog-loading"} }) %>
|
2
2
|
|
3
|
-
<%= pb_rails("dialog", props: {
|
4
|
-
id:"dialog-loading",
|
5
|
-
size: "sm",
|
6
|
-
title: "Loading
|
7
|
-
text: "Make a loading request?",
|
8
|
-
cancel_button: "Cancel Button",
|
3
|
+
<%= pb_rails("dialog", props: {
|
4
|
+
id:"dialog-loading",
|
5
|
+
size: "sm",
|
6
|
+
title: "Loading Exmaple",
|
7
|
+
text: "Make a loading request?",
|
8
|
+
cancel_button: "Cancel Button",
|
9
9
|
cancel_button_id: "cancel-button-loading",
|
10
|
-
confirm_button: "Okay",
|
10
|
+
confirm_button: "Okay",
|
11
11
|
confirm_button_id: "confirm-button-loading",
|
12
12
|
loading: true,
|
13
13
|
}) %>
|
14
|
-
|
15
|
-
<script>
|
16
|
-
const loadingButton = document.querySelector('[data-disable-with="Loading"]');
|
17
|
-
if (loadingButton) {
|
18
|
-
loadingButton.addEventListener("click", function() {
|
19
|
-
const okayLoadingButton = document.querySelector('[data-disable-with="Loading"]');
|
20
|
-
const cancelButton = document.querySelector('[data-disable-cancel-with="Loading"]');
|
21
|
-
let currentClass = okayLoadingButton.className;
|
22
|
-
let cancelClass = cancelButton ? cancelButton.className : "";
|
23
|
-
|
24
|
-
setTimeout(function() {
|
25
|
-
okayLoadingButton.disabled = false;
|
26
|
-
okayLoadingButton.className = currentClass.replace("_disabled_loading", "_enabled");
|
27
|
-
|
28
|
-
if (cancelButton) {
|
29
|
-
cancelButton.disabled = false;
|
30
|
-
cancelButton.className = cancelClass.replace("_disabled", "_enabled");
|
31
|
-
}
|
32
|
-
}, 5000);
|
33
|
-
|
34
|
-
});
|
35
|
-
}
|
36
|
-
</script>
|
@@ -7,7 +7,6 @@ module Playbook
|
|
7
7
|
type: Playbook::Props::Base
|
8
8
|
prop :form_system_options, deprecated: "Use options instead",
|
9
9
|
type: Playbook::Props::Base
|
10
|
-
prop :loading, type: Playbook::Props::Boolean, default: false
|
11
10
|
prop :options, type: Playbook::Props::Base
|
12
11
|
prop :validate, type: Playbook::Props::Boolean, default: false
|
13
12
|
|
@@ -23,7 +22,6 @@ module Playbook
|
|
23
22
|
aria: aria,
|
24
23
|
class: classname,
|
25
24
|
data: data,
|
26
|
-
loading: loading,
|
27
25
|
validate: validate,
|
28
26
|
}.merge(prop(:options) || prop(:form_system_options) || {})
|
29
27
|
end
|
@@ -47,13 +47,9 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
|
|
47
47
|
|
48
48
|
const iconClass = icon ? "_icon" : ""
|
49
49
|
const closeIconSize = size === "small" ? "xs" : "sm"
|
50
|
-
|
51
|
-
const filteredProps: FormPillProps = {...props}
|
52
|
-
delete filteredProps.truncate
|
53
|
-
|
54
50
|
const css = classnames(
|
55
51
|
`pb_form_pill_kit_${color}${iconClass}`,
|
56
|
-
globalProps(
|
52
|
+
globalProps(props),
|
57
53
|
className,
|
58
54
|
size === 'small' ? 'small' : null,
|
59
55
|
textTransform,
|
@@ -81,7 +77,6 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
|
|
81
77
|
className="pb_form_pill_text"
|
82
78
|
size={4}
|
83
79
|
text={name}
|
84
|
-
truncate={props.truncate}
|
85
80
|
/>
|
86
81
|
</>
|
87
82
|
)}
|
@@ -97,7 +92,6 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
|
|
97
92
|
className="pb_form_pill_text"
|
98
93
|
size={4}
|
99
94
|
text={name}
|
100
|
-
truncate={props.truncate}
|
101
95
|
/>
|
102
96
|
<Icon
|
103
97
|
className="pb_form_pill_icon"
|
@@ -117,7 +111,6 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
|
|
117
111
|
className="pb_form_pill_tag"
|
118
112
|
size={4}
|
119
113
|
text={text}
|
120
|
-
truncate={props.truncate}
|
121
114
|
/>
|
122
115
|
</>
|
123
116
|
)}
|
@@ -126,7 +119,6 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
|
|
126
119
|
className="pb_form_pill_tag"
|
127
120
|
size={4}
|
128
121
|
text={text}
|
129
|
-
truncate={props.truncate}
|
130
122
|
/>
|
131
123
|
)}
|
132
124
|
<div
|
@@ -3,7 +3,6 @@ examples:
|
|
3
3
|
rails:
|
4
4
|
- form_pill_user: Form Pill User
|
5
5
|
- form_pill_size: Form Pill Size
|
6
|
-
- form_pill_truncated_text: Truncated Text
|
7
6
|
- form_pill_tag: Form Pill Tag
|
8
7
|
- form_pill_example: Example
|
9
8
|
- form_pill_icon: Form Pill Icon
|
@@ -12,7 +11,6 @@ examples:
|
|
12
11
|
react:
|
13
12
|
- form_pill_user: Form Pill User
|
14
13
|
- form_pill_size: Form Pill Size
|
15
|
-
- form_pill_truncated_text: Truncated Text
|
16
14
|
- form_pill_tag: Form Pill Tag
|
17
15
|
- form_pill_example: Example
|
18
16
|
- form_pill_icon: Form Pill Icon
|
@@ -4,4 +4,3 @@ export { default as FormPillTag } from './_form_pill_tag.jsx'
|
|
4
4
|
export { default as FormPillExample } from './_form_pill_example.jsx'
|
5
5
|
export { default as FormPillIcon } from './_form_pill_icon.jsx'
|
6
6
|
export { default as FormPillColors } from './_form_pill_colors.jsx'
|
7
|
-
export { default as FormPillTruncatedText } from './_form_pill_truncated_text.jsx'
|
@@ -136,15 +136,12 @@ const Typeahead = ({
|
|
136
136
|
}
|
137
137
|
}
|
138
138
|
|
139
|
-
const filteredProps: TypeaheadProps = {...props}
|
140
|
-
delete filteredProps.truncate
|
141
|
-
|
142
139
|
const dataProps = buildDataProps(data)
|
143
140
|
const htmlProps = buildHtmlProps(htmlOptions)
|
144
141
|
const classes = classnames(
|
145
142
|
'pb_typeahead_kit react-select',
|
146
143
|
`mb_${marginBottom}`,
|
147
|
-
globalProps(
|
144
|
+
globalProps(props),
|
148
145
|
className
|
149
146
|
)
|
150
147
|
|
@@ -16,7 +16,7 @@ type Props = {
|
|
16
16
|
const MultiValue = (props: Props) => {
|
17
17
|
const { removeProps } = props
|
18
18
|
const { imageUrl, label } = props.data
|
19
|
-
const { dark, multiKit, pillColor
|
19
|
+
const { dark, multiKit, pillColor } = props.selectProps
|
20
20
|
|
21
21
|
const formPillProps = {
|
22
22
|
marginRight: 'xs',
|
@@ -51,7 +51,6 @@ const MultiValue = (props: Props) => {
|
|
51
51
|
name={label}
|
52
52
|
size={multiKit === 'smallPill' ? 'small' : ''}
|
53
53
|
text=''
|
54
|
-
truncate={truncate}
|
55
54
|
{...props}
|
56
55
|
/>
|
57
56
|
}
|
@@ -65,7 +64,6 @@ const MultiValue = (props: Props) => {
|
|
65
64
|
name=''
|
66
65
|
size={multiKit === 'smallPill' ? 'small' : ''}
|
67
66
|
text={label}
|
68
|
-
truncate={truncate}
|
69
67
|
{...props}
|
70
68
|
/>
|
71
69
|
}
|
@@ -65,10 +65,10 @@ module Playbook
|
|
65
65
|
def typeahead_react_options
|
66
66
|
base_options = {
|
67
67
|
className: classname,
|
68
|
+
pillColor: pill_color,
|
68
69
|
dark: dark,
|
69
70
|
defaultValue: default_options,
|
70
71
|
error: error,
|
71
|
-
htmlOptions: html_options,
|
72
72
|
id: id,
|
73
73
|
inline: inline,
|
74
74
|
isMulti: is_multi,
|
@@ -77,10 +77,8 @@ module Playbook
|
|
77
77
|
multiKit: multi_kit,
|
78
78
|
name: name,
|
79
79
|
options: options,
|
80
|
-
pillColor: pill_color,
|
81
80
|
placeholder: placeholder,
|
82
81
|
plusIcon: plus_icon,
|
83
|
-
truncate: truncate,
|
84
82
|
}
|
85
83
|
|
86
84
|
base_options[:getOptionLabel] = get_option_label if get_option_label.present?
|