playbook_ui 16.3.0.pre.rc.2 → 16.3.0.pre.rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +4 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +2 -2
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +2 -0
- data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +2 -2
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +2 -0
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +4 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +2 -0
- data/app/pb_kits/playbook/pb_select/_select.tsx +2 -0
- data/app/pb_kits/playbook/pb_select/select.html.erb +2 -2
- data/app/pb_kits/playbook/pb_star_rating/star_rating.html.erb +1 -1
- data/app/pb_kits/playbook/pb_star_rating/subcomponents/_star_rating_interactive.tsx +1 -0
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +2 -0
- data/app/pb_kits/playbook/pb_text_input/text_input.html.erb +2 -2
- data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +4 -1
- data/app/pb_kits/playbook/pb_textarea/textarea.html.erb +2 -2
- data/app/pb_kits/playbook/pb_textarea/textarea.test.js +1 -1
- data/app/pb_kits/playbook/pb_time_picker/_time_picker.tsx +6 -0
- data/app/pb_kits/playbook/pb_time_picker/time_picker.test.jsx +2 -2
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +1 -1
- data/dist/chunks/{_typeahead-DXIBDeMj.js → _typeahead-COVN8XN7.js} +1 -1
- data/dist/chunks/vendor.js +3 -3
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/lib/playbook/forms/builder/checkbox_field.rb +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4e153aae819ff62c66551a68563cda7597f5788d3971396767d1f8239b90d153
|
|
4
|
+
data.tar.gz: 96276b46239d4b7eee81b0f0209e9b48ad8736277e1c8c39150e7346af24da30
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f9930c8405e22e1bed3b2b6e2e830b380c5656b522998ece950c7f40a6938ede92771b530bc9d6b19d6343ff21eeb5f9af11c7ea46adaa4e110a80cf2fccf11b
|
|
7
|
+
data.tar.gz: d92e2c424880aec27fcc9f93aecc09a8d419a8bd521fdbb03e6b870e5d3b60f9c58ff7c7a4845fc84b41710991d0d4f9e2397d54c6a99a292803e6c2b001f8f9
|
|
@@ -221,11 +221,14 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
|
|
|
221
221
|
{!hideLabel && (
|
|
222
222
|
<label htmlFor={pickerId}>
|
|
223
223
|
{requiredIndicator ? (
|
|
224
|
-
<Caption className="pb_date_picker_kit_label"
|
|
224
|
+
<Caption className="pb_date_picker_kit_label"
|
|
225
|
+
color="lighter"
|
|
226
|
+
>
|
|
225
227
|
{label} <span style={{ color: `${colors.error}` }}>*</span>
|
|
226
228
|
</Caption>
|
|
227
229
|
) : (
|
|
228
230
|
<Caption className="pb_date_picker_kit_label"
|
|
231
|
+
color="lighter"
|
|
229
232
|
text={label}
|
|
230
233
|
/>
|
|
231
234
|
)}
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
<% if !object.hide_label && object.label %>
|
|
8
8
|
<label for="<%= object.picker_id %>">
|
|
9
9
|
<% if object.required_indicator %>
|
|
10
|
-
<%= pb_rails("caption", props: { dark: object.dark, classname: "pb_date_picker_kit_label" }) do %>
|
|
10
|
+
<%= pb_rails("caption", props: { dark: object.dark, classname: "pb_date_picker_kit_label", color: "lighter" }) do %>
|
|
11
11
|
<%= object.label %><span style="color: #DA0014;"> *</span>
|
|
12
12
|
<% end %>
|
|
13
13
|
<% else %>
|
|
14
|
-
<%= pb_rails("caption", props: { text: object.label, dark: object.dark, classname: "pb_date_picker_kit_label" }) %>
|
|
14
|
+
<%= pb_rails("caption", props: { text: object.label, dark: object.dark, classname: "pb_date_picker_kit_label", color: "lighter" }) %>
|
|
15
15
|
<% end %>
|
|
16
16
|
</label>
|
|
17
17
|
<% end %>
|
|
@@ -479,6 +479,7 @@ let Dropdown = (props: DropdownProps, ref: any): React.ReactElement | null => {
|
|
|
479
479
|
{requiredIndicator ? (
|
|
480
480
|
<Caption
|
|
481
481
|
className="pb_dropdown_kit_label"
|
|
482
|
+
color="lighter"
|
|
482
483
|
dark={dark}
|
|
483
484
|
marginBottom="xs"
|
|
484
485
|
>
|
|
@@ -487,6 +488,7 @@ let Dropdown = (props: DropdownProps, ref: any): React.ReactElement | null => {
|
|
|
487
488
|
) : (
|
|
488
489
|
<Caption
|
|
489
490
|
className="pb_dropdown_kit_label"
|
|
491
|
+
color="lighter"
|
|
490
492
|
dark={dark}
|
|
491
493
|
marginBottom="xs"
|
|
492
494
|
text={label}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
<% if object.label.present? %>
|
|
3
3
|
<label for="<%= object.select_id %>" data-dropdown="pb-dropdown-label">
|
|
4
4
|
<% if object.required_indicator %>
|
|
5
|
-
<%= pb_rails("caption", props: { margin_bottom: "xs", classname: "pb_dropdown_kit_label", dark: object.dark }) do %>
|
|
5
|
+
<%= pb_rails("caption", props: { margin_bottom: "xs", classname: "pb_dropdown_kit_label", color: "lighter", dark: object.dark }) do %>
|
|
6
6
|
<%= object.label %><span style="color: #DA0014;"> *</span>
|
|
7
7
|
<% end %>
|
|
8
8
|
<% else %>
|
|
9
|
-
<%= pb_rails("caption", props: { text: object.label, margin_bottom: "xs", classname: "pb_dropdown_kit_label", dark: object.dark }) %>
|
|
9
|
+
<%= pb_rails("caption", props: { text: object.label, margin_bottom: "xs", classname: "pb_dropdown_kit_label", color: "lighter", dark: object.dark }) %>
|
|
10
10
|
<% end %>
|
|
11
11
|
</label>
|
|
12
12
|
<% end %>
|
|
@@ -212,7 +212,7 @@ test('generated label prop', () => {
|
|
|
212
212
|
)
|
|
213
213
|
|
|
214
214
|
const kit = screen.getByTestId(testId)
|
|
215
|
-
const label = kit.querySelector('.
|
|
215
|
+
const label = kit.querySelector('.pb_caption_kit_md_lighter')
|
|
216
216
|
expect(label).toHaveTextContent('Countries')
|
|
217
217
|
})
|
|
218
218
|
|
|
@@ -532,6 +532,7 @@ const MultiLevelSelect = forwardRef<HTMLInputElement, MultiLevelSelectProps>(
|
|
|
532
532
|
{requiredIndicator ? (
|
|
533
533
|
<Caption
|
|
534
534
|
className="pb_multi_level_select_kit_label"
|
|
535
|
+
color="lighter"
|
|
535
536
|
marginBottom="xs"
|
|
536
537
|
>
|
|
537
538
|
{label} <span className="required_indicator">*</span>
|
|
@@ -539,6 +540,7 @@ const MultiLevelSelect = forwardRef<HTMLInputElement, MultiLevelSelectProps>(
|
|
|
539
540
|
) : (
|
|
540
541
|
<Caption
|
|
541
542
|
className="pb_multi_level_select_kit_label"
|
|
543
|
+
color="lighter"
|
|
542
544
|
marginBottom="xs"
|
|
543
545
|
text={label}
|
|
544
546
|
/>
|
|
@@ -119,12 +119,14 @@ const Passphrase = (props: PassphraseProps): React.ReactElement => {
|
|
|
119
119
|
{hasLabel && (requiredIndicator ? (
|
|
120
120
|
<Caption
|
|
121
121
|
className="passphrase-label"
|
|
122
|
+
color="lighter"
|
|
122
123
|
>
|
|
123
124
|
{label} <span className="required_indicator">*</span>
|
|
124
125
|
</Caption>
|
|
125
126
|
) : (
|
|
126
127
|
<Caption
|
|
127
128
|
className="passphrase-label"
|
|
129
|
+
color="lighter"
|
|
128
130
|
text={label}
|
|
129
131
|
/>
|
|
130
132
|
))}
|
|
@@ -142,12 +144,14 @@ const Passphrase = (props: PassphraseProps): React.ReactElement => {
|
|
|
142
144
|
orientation="column"
|
|
143
145
|
>
|
|
144
146
|
<Caption
|
|
147
|
+
color="lighter"
|
|
145
148
|
marginBottom="xs"
|
|
146
149
|
text="Tips for a good passphrase"
|
|
147
150
|
/>
|
|
148
151
|
<div>
|
|
149
152
|
{tips.map((tip, i) => (
|
|
150
153
|
<Caption
|
|
154
|
+
color="lighter"
|
|
151
155
|
key={i}
|
|
152
156
|
marginBottom="xs"
|
|
153
157
|
size="xs"
|
|
@@ -262,6 +262,7 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
|
|
|
262
262
|
{
|
|
263
263
|
requiredIndicator ? (
|
|
264
264
|
<Caption className="pb_text_input_kit_label"
|
|
265
|
+
color="lighter"
|
|
265
266
|
marginBottom="xs"
|
|
266
267
|
>
|
|
267
268
|
{label} <span style={{ color: `${colors.error}` }}>*</span>
|
|
@@ -269,6 +270,7 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
|
|
|
269
270
|
) : (
|
|
270
271
|
<Caption
|
|
271
272
|
className="pb_text_input_kit_label"
|
|
273
|
+
color="lighter"
|
|
272
274
|
marginBottom="xs"
|
|
273
275
|
text={label}
|
|
274
276
|
/>
|
|
@@ -134,12 +134,14 @@ const Select = ({
|
|
|
134
134
|
>
|
|
135
135
|
{requiredIndicator ? (
|
|
136
136
|
<Caption
|
|
137
|
+
color="lighter"
|
|
137
138
|
dark={props.dark}>
|
|
138
139
|
{label}
|
|
139
140
|
<span style={{ color: "#DA0014" }}> *</span>
|
|
140
141
|
</Caption>
|
|
141
142
|
) : (
|
|
142
143
|
<Caption
|
|
144
|
+
color="lighter"
|
|
143
145
|
dark={props.dark}
|
|
144
146
|
text={label}
|
|
145
147
|
/>
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
<% if object.label %>
|
|
5
5
|
<label class="pb_select_kit_label" for="<%= object.input_options[:id] || object.name %>">
|
|
6
6
|
<% if object.required_indicator %>
|
|
7
|
-
<%= pb_rails("caption", props: { dark: object.dark }) do %>
|
|
7
|
+
<%= pb_rails("caption", props: { color: "lighter", dark: object.dark }) do %>
|
|
8
8
|
<%= object.label %><span style="color: #DA0014;"> *</span>
|
|
9
9
|
<% end %>
|
|
10
10
|
<% else %>
|
|
11
|
-
<%= pb_rails("caption", props: { text: object.label, dark: object.dark }) %>
|
|
11
|
+
<%= pb_rails("caption", props: { color: "lighter", text: object.label, dark: object.dark }) %>
|
|
12
12
|
<% end %>
|
|
13
13
|
</label>
|
|
14
14
|
<% end %>
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<% else %>
|
|
38
38
|
<%= pb_rails("flex", props: { data: {"pb-star-rating-wrapper": "true" }, orientation: "column" }) do %>
|
|
39
39
|
<% if object.label.present? %>
|
|
40
|
-
<%= pb_rails("caption", props: {text: object.label, margin_bottom:"xs"}) %>
|
|
40
|
+
<%= pb_rails("caption", props: { color: "lighter", text: object.label, margin_bottom:"xs"}) %>
|
|
41
41
|
<% end %>
|
|
42
42
|
|
|
43
43
|
<%= hidden_input_tag %>
|
|
@@ -253,6 +253,7 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
|
253
253
|
requiredIndicator ? (
|
|
254
254
|
<Caption
|
|
255
255
|
className="pb_text_input_kit_label"
|
|
256
|
+
color="lighter"
|
|
256
257
|
dark={dark}
|
|
257
258
|
>
|
|
258
259
|
{label} <span style={{ color: dark ? colors.text_error_dark : colors.text_error }}>*</span>
|
|
@@ -260,6 +261,7 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
|
260
261
|
) : (
|
|
261
262
|
<Caption
|
|
262
263
|
className="pb_text_input_kit_label"
|
|
264
|
+
color="lighter"
|
|
263
265
|
dark={dark}
|
|
264
266
|
text={label}
|
|
265
267
|
/>
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
<% if object.label.present? %>
|
|
3
3
|
<label for="<%= object.input_options[:id] || object.id %>">
|
|
4
4
|
<% if object.required_indicator %>
|
|
5
|
-
<%= pb_rails("caption", props: { dark: object.dark, classname: "pb_text_input_kit_label" }) do %>
|
|
5
|
+
<%= pb_rails("caption", props: { dark: object.dark, classname: "pb_text_input_kit_label", color: "lighter" }) do %>
|
|
6
6
|
<%= object.label %><span style="color: #DA0014;"> *</span>
|
|
7
7
|
<% end %>
|
|
8
8
|
<% else %>
|
|
9
|
-
<%= pb_rails("caption", props: { text: object.label, dark: object.dark, classname: "pb_text_input_kit_label" }) %>
|
|
9
|
+
<%= pb_rails("caption", props: { text: object.label, dark: object.dark, classname: "pb_text_input_kit_label", color: "lighter" }) %>
|
|
10
10
|
<% end %>
|
|
11
11
|
</label>
|
|
12
12
|
<% end %>
|
|
@@ -133,11 +133,14 @@ const Textarea = ({
|
|
|
133
133
|
<label htmlFor={id}>
|
|
134
134
|
{
|
|
135
135
|
requiredIndicator ? (
|
|
136
|
-
<Caption className="pb_text_input_kit_label"
|
|
136
|
+
<Caption className="pb_text_input_kit_label"
|
|
137
|
+
color="lighter"
|
|
138
|
+
>
|
|
137
139
|
{label} <span style={{ color: `${colors.text_error}` }}>*</span>
|
|
138
140
|
</Caption>
|
|
139
141
|
) : (
|
|
140
142
|
<Caption className="pb_text_input_kit_label"
|
|
143
|
+
color="lighter"
|
|
141
144
|
text={label}
|
|
142
145
|
/>
|
|
143
146
|
)
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
<% if object.label.present? %>
|
|
3
3
|
<label for="<%= object.input_options[:id] || object.id %>" >
|
|
4
4
|
<% if object.required_indicator %>
|
|
5
|
-
<%= pb_rails("caption", props: { text: object.label, dark: object.dark }) do %>
|
|
5
|
+
<%= pb_rails("caption", props: { color: "lighter", text: object.label, dark: object.dark }) do %>
|
|
6
6
|
<%= object.label %><span style="color: #DA0014;"> *</span>
|
|
7
7
|
<% end %>
|
|
8
8
|
<% else %>
|
|
9
|
-
<%= pb_rails("caption", props: {text: object.label, dark: object.dark}) %>
|
|
9
|
+
<%= pb_rails("caption", props: { color: "lighter", text: object.label, dark: object.dark }) %>
|
|
10
10
|
<% end %>
|
|
11
11
|
</label>
|
|
12
12
|
<% end %>
|
|
@@ -149,7 +149,7 @@ describe("TextArea Kit Props", () => {
|
|
|
149
149
|
)
|
|
150
150
|
|
|
151
151
|
const kit = screen.getByTestId(testId)
|
|
152
|
-
const error = kit.querySelector(".
|
|
152
|
+
const error = kit.querySelector(".pb_caption_kit_md_lighter")
|
|
153
153
|
|
|
154
154
|
expect(error.innerHTML).toBe("Test Label")
|
|
155
155
|
})
|
|
@@ -707,6 +707,7 @@ const TimePicker = (props: TimePickerProps): JSX.Element => {
|
|
|
707
707
|
{requiredIndicator ? (
|
|
708
708
|
<Caption
|
|
709
709
|
className="pb_time_picker_kit_label"
|
|
710
|
+
color="lighter"
|
|
710
711
|
dark={dark}
|
|
711
712
|
marginBottom="xs"
|
|
712
713
|
size="md"
|
|
@@ -716,6 +717,7 @@ const TimePicker = (props: TimePickerProps): JSX.Element => {
|
|
|
716
717
|
) : (
|
|
717
718
|
<Caption
|
|
718
719
|
className="pb_time_picker_kit_label"
|
|
720
|
+
color="lighter"
|
|
719
721
|
dark={dark}
|
|
720
722
|
marginBottom="xs"
|
|
721
723
|
size="md"
|
|
@@ -766,6 +768,7 @@ const TimePicker = (props: TimePickerProps): JSX.Element => {
|
|
|
766
768
|
<label htmlFor={`${uniqueId}-hour`}>
|
|
767
769
|
<Caption
|
|
768
770
|
className="time_input_label"
|
|
771
|
+
color="lighter"
|
|
769
772
|
dark={dark}
|
|
770
773
|
size="sm"
|
|
771
774
|
text="Hour"
|
|
@@ -813,6 +816,7 @@ const TimePicker = (props: TimePickerProps): JSX.Element => {
|
|
|
813
816
|
<label htmlFor={`${uniqueId}-minute`}>
|
|
814
817
|
<Caption
|
|
815
818
|
className="time_input_label"
|
|
819
|
+
color="lighter"
|
|
816
820
|
dark={dark}
|
|
817
821
|
size="sm"
|
|
818
822
|
text="Minute"
|
|
@@ -859,6 +863,7 @@ const TimePicker = (props: TimePickerProps): JSX.Element => {
|
|
|
859
863
|
<div className="meridiem">
|
|
860
864
|
<Caption
|
|
861
865
|
className="time_input_label"
|
|
866
|
+
color="lighter"
|
|
862
867
|
dark={dark}
|
|
863
868
|
size="sm"
|
|
864
869
|
text="Period"
|
|
@@ -905,6 +910,7 @@ const TimePicker = (props: TimePickerProps): JSX.Element => {
|
|
|
905
910
|
)}
|
|
906
911
|
{showTimezone && (
|
|
907
912
|
<Caption
|
|
913
|
+
color="lighter"
|
|
908
914
|
dark={dark}
|
|
909
915
|
lineHeight="tight"
|
|
910
916
|
marginTop="sm"
|
|
@@ -71,14 +71,14 @@ describe('TimePicker', () => {
|
|
|
71
71
|
render(<TimePicker data={{ testid: 'clickable-picker' }} />)
|
|
72
72
|
const input = screen.getByPlaceholderText('Select Time')
|
|
73
73
|
fireEvent.click(input)
|
|
74
|
-
expect(screen.getByText('Hour', { selector: '.
|
|
74
|
+
expect(screen.getByText('Hour', { selector: '.pb_caption_kit_sm_lighter' })).toBeInTheDocument()
|
|
75
75
|
})
|
|
76
76
|
|
|
77
77
|
test('does not open dropdown on input click when disabled', () => {
|
|
78
78
|
render(<TimePicker disabled />)
|
|
79
79
|
const input = screen.getByPlaceholderText('Select Time')
|
|
80
80
|
fireEvent.click(input)
|
|
81
|
-
expect(screen.queryByText('Hour', { selector: '.
|
|
81
|
+
expect(screen.queryByText('Hour', { selector: '.pb_caption_kit_sm_lighter' })).not.toBeInTheDocument()
|
|
82
82
|
})
|
|
83
83
|
|
|
84
84
|
test('renders with required attribute', () => {
|
|
@@ -20,7 +20,7 @@ test('typeahead classname + label renders as expected', () => {
|
|
|
20
20
|
)
|
|
21
21
|
|
|
22
22
|
const kit = screen.getByTestId('typeahead-test')
|
|
23
|
-
const label = kit.querySelector(".
|
|
23
|
+
const label = kit.querySelector(".pb_caption_kit_md_lighter.pb_text_input_kit_label")
|
|
24
24
|
expect(kit).toHaveClass("pb_typeahead_kit")
|
|
25
25
|
expect(label).toHaveTextContent("Colors")
|
|
26
26
|
})
|